diff -Nru a/CREDITS b/CREDITS
--- a/CREDITS	Wed Oct 30 16:44:30 2002
+++ b/CREDITS	Wed Oct 30 16:44:30 2002
@@ -1024,7 +1024,7 @@
 S: USA
 
 N: Jeff Garzik
-E: jgarzik@mandrakesoft.com
+E: jgarzik@pobox.com
 
 N: Jacques Gelinas
 E: jacques@solucorp.qc.ca
diff -Nru a/Documentation/00-INDEX b/Documentation/00-INDEX
--- a/Documentation/00-INDEX	Wed Oct 30 16:44:26 2002
+++ b/Documentation/00-INDEX	Wed Oct 30 16:44:26 2002
@@ -28,8 +28,6 @@
 	- how to access I/O mapped memory from within device drivers.
 IRQ-affinity.txt
 	- how to select which CPU(s) handle which interrupt events on SMP.
-LVM-HOWTO
-	- info on setting up logical volume management (virtual disks etc.)
 README.DAC960
 	- info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux
 README.moxa
diff -Nru a/Documentation/BK-usage/00-INDEX b/Documentation/BK-usage/00-INDEX
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/BK-usage/00-INDEX	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,38 @@
+bk-kernel-howto.txt: Description of kernel workflow under BitKeeper
+
+bk-make-sum: Create summary of changesets in one repository and not
+another, typically in preparation to be sent to an upstream maintainer.
+Typical usage:
+	cd my-updated-repo
+	bk-make-sum ~/repo/original-repo
+	mv /tmp/linus.txt ../original-repo.txt
+
+bksend: Create readable text output containing summary of changes, GNU
+patch of the changes, and BK metadata of changes (as needed for proper
+importing into BitKeeper by an upstream maintainer).  This output is
+suitable for emailing BitKeeper changes.  The recipient of this output
+may pipe it directly to 'bk receive'.
+
+bz64wrap: helper script. Uncompressed input is piped to this script,
+which compresses its input, and then outputs the uu-/base64-encoded
+version of the compressed input.
+
+csets-to-patches: Produces a delta of two BK repositories, in the form
+of individual files, each containing a single cset as a GNU patch.
+Output is several files, each with the filename "/tmp/rev-$REV.patch"
+Typical usage:
+	cd my-updated-repo
+	bk changes -L ~/repo/original-repo 2>&1 | \
+		perl csets-to-patches
+
+cset-to-linus: Produces a delta of two BK repositories, in the form of
+changeset descriptions, with 'diffstat' output created for each
+individual changset.
+Typical usage:
+	cd my-updated-repo
+	bk changes -L ~/repo/original-repo 2>&1 | \
+		perl cset-to-linus > summary.txt
+
+unbz64wrap: Reverse an encoded, compressed data stream created by
+bz64wrap into an uncompressed, typically text/plain output.
+
diff -Nru a/Documentation/BK-usage/bk-kernel-howto.txt b/Documentation/BK-usage/bk-kernel-howto.txt
--- a/Documentation/BK-usage/bk-kernel-howto.txt	Wed Oct 30 16:44:19 2002
+++ b/Documentation/BK-usage/bk-kernel-howto.txt	Wed Oct 30 16:44:19 2002
@@ -32,7 +32,7 @@
 
 Let's start with this progression:
 Each BitKeeper source tree on disk is a repository unto itself.
-Each repository has a parent.
+Each repository has a parent (except the root/original, of course).
 Each repository contains a set of a changesets ("csets").
 Each cset is one or more changed files, bundled together.
 
diff -Nru a/Documentation/Changes b/Documentation/Changes
--- a/Documentation/Changes	Wed Oct 30 16:44:33 2002
+++ b/Documentation/Changes	Wed Oct 30 16:44:33 2002
@@ -114,9 +114,6 @@
 DevFS is now in the kernel.  See Documentation/filesystems/devfs/* in
 the kernel source tree for all the gory details.
 
-The Logical Volume Manager (LVM) is now in the kernel.  If you want to
-use this, you'll need to install the necessary LVM toolset.
-
 32-bit UID support is now in place.  Have fun!
 
 Linux documentation for functions is transitioning to inline
@@ -329,10 +326,6 @@
 Xfsprogs
 --------
 o  <ftp://oss.sgi.com/projects/xfs/download/cmd_tars/xfsprogs-2.1.0.src.tar.gz>
-
-LVM toolset
------------
-o  <http://www.sistina.com/lvm/>
 
 Pcmcia-cs
 ---------
diff -Nru a/Documentation/DocBook/procfs-guide.tmpl b/Documentation/DocBook/procfs-guide.tmpl
--- a/Documentation/DocBook/procfs-guide.tmpl	Wed Oct 30 16:44:30 2002
+++ b/Documentation/DocBook/procfs-guide.tmpl	Wed Oct 30 16:44:30 2002
@@ -99,7 +99,7 @@
 
     <para>
       I'd like to thank Jeff Garzik
-      <email>jgarzik@mandrakesoft.com</email> and Alexander Viro
+      <email>jgarzik@pobox.com</email> and Alexander Viro
       <email>viro@math.psu.edu</email> for their input, Tim Waugh
       <email>twaugh@redhat.com</email> for his <ulink
       url="http://people.redhat.com/twaugh/docbook/selfdocbook/">Selfdocbook</ulink>,
diff -Nru a/Documentation/DocBook/tulip-user.tmpl b/Documentation/DocBook/tulip-user.tmpl
--- a/Documentation/DocBook/tulip-user.tmpl	Wed Oct 30 16:44:26 2002
+++ b/Documentation/DocBook/tulip-user.tmpl	Wed Oct 30 16:44:26 2002
@@ -10,7 +10,7 @@
     <surname>Garzik</surname>
     <affiliation>
      <address>
-      <email>jgarzik@mandrakesoft.com</email>
+      <email>jgarzik@pobox.com</email>
      </address>
     </affiliation>
    </author>
@@ -57,7 +57,7 @@
     <title>Introduction</title>
 <para>
 The Tulip Ethernet Card Driver
-is maintained by Jeff Garzik (<email>jgarzik@mandrakesoft.com</email>).
+is maintained by Jeff Garzik (<email>jgarzik@pobox.com</email>).
 </para>
 
 <para>
diff -Nru a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl
--- a/Documentation/DocBook/writing_usb_driver.tmpl	Wed Oct 30 16:44:28 2002
+++ b/Documentation/DocBook/writing_usb_driver.tmpl	Wed Oct 30 16:44:28 2002
@@ -307,7 +307,7 @@
   </programlisting>
   <para>
      When the write urb is filled up with the proper information using the
-     FILL_BULK_URB function, we point the urb's completion callback to call our
+     usb_fill_bulk_urb function, we point the urb's completion callback to call our
      own skel_write_bulk_callback function. This function is called when the
      urb is finished by the USB subsystem. The callback function is called in
      interrupt context, so caution must be taken not to do very much processing
diff -Nru a/Documentation/LVM-HOWTO b/Documentation/LVM-HOWTO
--- a/Documentation/LVM-HOWTO	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,119 +0,0 @@
-Heinz Mauelshagen's LVM (Logical Volume Manager) howto.             02/10/1999
-
-
-Abstract:
----------
-The LVM adds a kind of virtual disks and virtual partitions functionality
-to the Linux operating system.
-
-It achieves this by adding an additional layer between the physical peripherals
-and the i/o interface in the kernel.
-
-This allows the concatenation of several disk partitions or total disks
-(so-called physical volumes or PVs) or even multiple devices
-to form a storage pool (so-called Volume Group or VG) with
-allocation units called physical extents (called PE).
-You can think of the volume group as a virtual disk.
-Please see scenario below.
-
-Some or all PEs of this VG then can be allocated to so-called Logical Volumes
-or LVs in units called logical extents or LEs.
-Each LE is mapped to a corresponding PE.
-LEs and PEs are equal in size.
-Logical volumes are a kind of virtual partitions.
-
-
-The LVs can be used through device special files similar to the known
-/dev/sd[a-z]* or /dev/hd[a-z]* named /dev/VolumeGroupName/LogicalVolumeName.
-
-But going beyond this, you are able to extend or reduce
-VGs _AND_ LVs at runtime!
-
-So...
-If for example the capacity of a LV gets too small and your VG containing
-this LV is full, you could add another PV to that VG and simply extend
-the LV afterwards.
-If you reduce or delete a LV you can use the freed capacity for different
-LVs in the same VG.
-
-
-The above scenario looks like this:
-
-     /------------------------------------------\
-     |  /--PV2---\      VG 1      /--PVn---\    |
-     |  |-VGDA---|                |-VGDA-- |    |
-     |  |PE1PE2..|                |PE1PE2..|    |
-     |  |        |     ......     |        |    |
-     |  |        |                |        |    |
-     |  |    /-----------------------\     |    |
-     |  |    \-------LV 1------------/     |    |
-     |  |   ..PEn|                |   ..PEn|    |
-     |  \--------/                \--------/    |
-     \------------------------------------------/
-
-PV 1 could be /dev/sdc1 sized 3GB
-PV n could be /dev/sde1 sized 4GB
-VG 1 could be test_vg
-LV 1 could be /dev/test_vg/test_lv
-VGDA is the volume group descriptor area holding the LVM metadata
-PE1 up to PEn is the number of physical extents on each disk(partition)
-
-
-
-Installation steps see INSTALL and insmod(1)/modprobe(1), kmod/kerneld(8)
-to load the logical volume manager module if you did not bind it
-into the kernel.
-
-
-Configuration steps for getting the above scenario:
-
-1. Set the partition system id to 0x8e on /dev/sdc1 and /dev/sde1.
-
-2. do a "pvcreate /dev/sd[ce]1"
-   For testing purposes you can use more than one partition on a disk.
-   You should not use more than one partition because in the case of
-   a striped LV you'll have a performance breakdown.
-
-3. do a "vgcreate test_vg /dev/sd[ce]1" to create the new VG named "test_vg"
-   which has the total capacity of both partitions.
-   vgcreate activates (transfers the metadata into the LVM driver in the kernel)
-   the new volume group too to be able to create LVs in the next step.
-
-4. do a "lvcreate -L1500 -ntest_lv test_vg" to get a 1500MB linear LV named
-   "test_lv" and it's block device special "/dev/test_vg/test_lv".
-
-   Or do a "lvcreate -i2 -I4 -l1500 -nanother_test_lv test_vg" to get a 100 LE
-   large logical volume with 2 stripes and stripesize 4 KB.
-
-5. For example generate a filesystem in one LV with
-   "mke2fs /dev/test_vg/test_lv" and mount it.
-
-6. extend /dev/test_vg/test_lv to 1600MB with relative size by
-   "lvextend -L+100 /dev/test_vg/test_lv"
-   or with absolute size by
-   "lvextend -L1600 /dev/test_vg/test_lv"
- 
-7. reduce /dev/test_vg/test_lv to 900 logical extents with relative extents by
-   "lvreduce -l-700 /dev/test_vg/test_lv"
-   or with absolute extents by
-   "lvreduce -l900 /dev/test_vg/test_lv"
- 
-9. rename a VG by deactivating it with
-   "vgchange -an test_vg"   # only VGs with _no_ open LVs can be deactivated!
-   "vgrename test_vg whatever"
-   and reactivate it again by
-   "vgchange -ay whatever"
-
-9. rename a LV after closing it by
-   "lvchange -an /dev/whatever/test_lv" # only closed LVs can be deactivated
-   "lvrename  /dev/whatever/test_lv  /dev/whatever/whatvolume"
-   or by
-   "lvrename  whatever test_lv whatvolume"
-   and reactivate it again by
-   "lvchange -ay /dev/whatever/whatvolume"
-
-10. if you own Ted Tso's/Powerquest's resize2fs program, you are able to
-    resize the ext2 type filesystems contained in logical volumes without
-    destroyiing the data by
-    "e2fsadm -L+100 /dev/test_vg/another_test_lv"
-
diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/crypto/api-intro.txt	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,177 @@
+
+                    Scatterlist Cryptographic API
+                   
+INTRODUCTION
+
+The Scatterlist Crypto API takes page vectors (scatterlists) as
+arguments, and works directly on pages.  In some cases (e.g. ECB
+mode ciphers), this will allow for pages to be encrypted in-place
+with no copying.
+
+One of the initial goals of this design was to readily support IPsec,
+so that processing can be applied to paged skb's without the need
+for linearization.
+
+
+DETAILS
+
+At the lowest level are algorithms, which register dynamically with the
+API.
+
+'Transforms' are user-instantiated objects, which maintain state, handle all
+of the implementation logic (e.g. manipulating page vectors), provide an 
+abstraction to the underlying algorithms, and handle common logical 
+operations (e.g. cipher modes, HMAC for digests).  However, at the user 
+level they are very simple.
+
+Conceptually, the API layering looks like this:
+
+  [transform api]  (user interface)
+  [transform ops]  (per-type logic glue e.g. cipher.c, digest.c)
+  [algorithm api]  (for registering algorithms)
+  
+The idea is to make the user interface and algorithm registration API
+very simple, while hiding the core logic from both.  Many good ideas
+from existing APIs such as Cryptoapi and Nettle have been adapted for this.
+
+The API currently supports three types of transforms: Ciphers, Digests and
+Compressors.  The compression algorithms especially seem to be performing
+very well so far.
+
+An asynchronous scheduling interface is in planning but not yet
+implemented, as we need to further analyze the requirements of all of
+the possible hardware scenarios (e.g. IPsec NIC offload).
+
+Here's an example of how to use the API:
+
+	#include <linux/crypto.h>
+	
+	struct scatterlist sg[2];
+	char result[128];
+	struct crypto_tfm *tfm;
+	
+	tfm = crypto_alloc_tfm("md5", 0);
+	if (tfm == NULL)
+		fail();
+		
+	/* ... set up the scatterlists ... */
+	
+	crypto_digest_init(tfm);
+	crypto_digest_update(tfm, &sg, 2);
+	crypto_digest_final(tfm, result);
+	
+	crypto_free_tfm(tfm);
+
+    
+Many real examples are available in the regression test module (tcrypt.c).
+
+
+CONFIGURATION NOTES
+
+As Triple DES is part of the DES module, for those using modular builds,
+add the following line to /etc/modules.conf:
+
+  alias des3_ede des
+
+
+DEVELOPER NOTES
+
+None of this code should be called from hardirq context, only softirq and
+user contexts.
+
+When using the API for ciphers, performance will be optimal if each
+scatterlist contains data which is a multiple of the cipher's block
+size (typically 8 bytes).  This prevents having to do any copying
+across non-aligned page fragment boundaries.
+
+
+ADDING NEW ALGORITHMS
+
+When submitting a new algorithm for inclusion, a mandatory requirement
+is that at least a few test vectors from known sources (preferably
+standards) be included.
+
+Converting existing well known code is preferred, as it is more likely
+to have been reviewed and widely tested.  If submitting code from LGPL
+sources, please consider changing the license to GPL (see section 3 of
+the LGPL).
+
+Algorithms submitted must also be generally patent-free (e.g. IDEA
+will not be included in the mainline until around 2011), and be based
+on a recognized standard and/or have been subjected to appropriate
+peer review.
+
+
+BUGS
+
+Send bug reports to:
+James Morris <jmorris@intercode.com.au>
+Cc: David S. Miller <davem@redhat.com>
+
+
+FURTHER INFORMATION
+
+For further patches and various updates, including the current TODO
+list, see:
+http://samba.org/~jamesm/crypto/
+
+Ongoing development discussion may also be found on
+kerneli cryptoapi-devel, 
+see http://www.kerneli.org/mailman/listinfo/cryptoapi-devel
+
+
+AUTHORS
+
+James Morris
+David S. Miller
+Jean-Francois Dive (SHA1 algorithm module)
+
+
+CREDITS
+
+The following people provided invaluable feedback during the development
+of the API:
+
+  Alexey Kuznetzov
+  Rusty Russell
+  Herbert Valerio Riedel
+  Jeff Garzik
+  Michael Richardson
+  Andrew Morton
+  Ingo Oeser
+  Christoph Hellwig
+
+Portions of this API were derived from the following projects:
+  
+  Kerneli Cryptoapi (http://www.kerneli.org/)
+    Alexander Kjeldaas
+    Herbert Valerio Riedel
+    Kyle McMartin
+    Jean-Luc Cooke
+    David Bryson
+    Clemens Fruhwirth
+    Tobias Ringstrom
+    Harald Welte
+
+and;
+  
+  Nettle (http://www.lysator.liu.se/~nisse/nettle/)
+    Niels Möller
+
+Original developers of the initial set of crypto algorithms:
+
+  Dana L. How (DES)
+  Andrew Tridgell and Steve French (MD4)
+  Colin Plumb (MD5)
+  Steve Raid (SHA1)
+  Kazunori Miyazawa / USAGI (HMAC)
+
+The DES code was subsequently redeveloped by:
+
+  Raimar Falke
+  Gisle Sælensminde
+  Niels Möller
+
+Please send any credits updates or corrections to:
+James Morris <jmorris@intercode.com.au>
+
diff -Nru a/Documentation/crypto/descore-readme.txt b/Documentation/crypto/descore-readme.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/crypto/descore-readme.txt	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,352 @@
+Below is the orginal README file from the descore.shar package.
+------------------------------------------------------------------------------
+
+des - fast & portable DES encryption & decryption.
+Copyright (C) 1992  Dana L. How
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library 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 Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Author's address: how@isl.stanford.edu
+
+$Id: README,v 1.15 1992/05/20 00:25:32 how E $
+
+
+==>> To compile after untarring/unsharring, just `make' <<==
+
+
+This package was designed with the following goals:
+1.	Highest possible encryption/decryption PERFORMANCE.
+2.	PORTABILITY to any byte-addressable host with a 32bit unsigned C type
+3.	Plug-compatible replacement for KERBEROS's low-level routines.
+
+This second release includes a number of performance enhancements for
+register-starved machines.  My discussions with Richard Outerbridge,
+71755.204@compuserve.com, sparked a number of these enhancements.
+
+To more rapidly understand the code in this package, inspect desSmallFips.i
+(created by typing `make') BEFORE you tackle desCode.h.  The latter is set
+up in a parameterized fashion so it can easily be modified by speed-daemon
+hackers in pursuit of that last microsecond.  You will find it more
+illuminating to inspect one specific implementation,
+and then move on to the common abstract skeleton with this one in mind.
+
+
+performance comparison to other available des code which i could
+compile on a SPARCStation 1 (cc -O4, gcc -O2):
+
+this code (byte-order independent):
+   30us per encryption (options: 64k tables, no IP/FP)
+   33us per encryption (options: 64k tables, FIPS standard bit ordering)
+   45us per encryption (options:  2k tables, no IP/FP)
+   48us per encryption (options:  2k tables, FIPS standard bit ordering)
+  275us to set a new key (uses 1k of key tables)
+	this has the quickest encryption/decryption routines i've seen.
+	since i was interested in fast des filters rather than crypt(3)
+	and password cracking, i haven't really bothered yet to speed up
+	the key setting routine. also, i have no interest in re-implementing
+	all the other junk in the mit kerberos des library, so i've just
+	provided my routines with little stub interfaces so they can be
+	used as drop-in replacements with mit's code or any of the mit-
+	compatible packages below. (note that the first two timings above
+	are highly variable because of cache effects).
+
+kerberos des replacement from australia (version 1.95):
+   53us per encryption (uses 2k of tables)
+   96us to set a new key (uses 2.25k of key tables)
+	so despite the author's inclusion of some of the performance
+	improvements i had suggested to him, this package's
+	encryption/decryption is still slower on the sparc and 68000.
+	more specifically, 19-40% slower on the 68020 and 11-35% slower
+	on the sparc,  depending on the compiler;
+	in full gory detail (ALT_ECB is a libdes variant):
+	compiler   	machine		desCore	libdes	ALT_ECB	slower by
+	gcc 2.1 -O2	Sun 3/110	304  uS	369.5uS	461.8uS	 22%
+	cc      -O1	Sun 3/110	336  uS	436.6uS	399.3uS	 19%
+	cc      -O2	Sun 3/110	360  uS	532.4uS	505.1uS	 40%
+	cc      -O4	Sun 3/110	365  uS	532.3uS	505.3uS	 38%
+	gcc 2.1 -O2	Sun 4/50	 48  uS	 53.4uS	 57.5uS	 11%
+	cc      -O2	Sun 4/50	 48  uS	 64.6uS	 64.7uS	 35%
+	cc      -O4	Sun 4/50	 48  uS	 64.7uS	 64.9uS	 35%
+	(my time measurements are not as accurate as his).
+   the comments in my first release of desCore on version 1.92:
+   68us per encryption (uses 2k of tables)
+   96us to set a new key (uses 2.25k of key tables)
+	this is a very nice package which implements the most important
+	of the optimizations which i did in my encryption routines.
+	it's a bit weak on common low-level optimizations which is why
+	it's 39%-106% slower.  because he was interested in fast crypt(3) and
+	password-cracking applications,  he also used the same ideas to
+	speed up the key-setting routines with impressive results.
+	(at some point i may do the same in my package).  he also implements
+	the rest of the mit des library.
+	(code from eay@psych.psy.uq.oz.au via comp.sources.misc)
+
+fast crypt(3) package from denmark:
+	the des routine here is buried inside a loop to do the
+	crypt function and i didn't feel like ripping it out and measuring
+	performance. his code takes 26 sparc instructions to compute one
+	des iteration; above, Quick (64k) takes 21 and Small (2k) takes 37.
+	he claims to use 280k of tables but the iteration calculation seems
+	to use only 128k.  his tables and code are machine independent.
+	(code from glad@daimi.aau.dk via alt.sources or comp.sources.misc)
+
+swedish reimplementation of Kerberos des library
+  108us per encryption (uses 34k worth of tables)
+  134us to set a new key (uses 32k of key tables to get this speed!)
+	the tables used seem to be machine-independent;
+	he seems to have included a lot of special case code
+	so that, e.g., `long' loads can be used instead of 4 `char' loads
+	when the machine's architecture allows it.
+	(code obtained from chalmers.se:pub/des)
+
+crack 3.3c package from england:
+	as in crypt above, the des routine is buried in a loop. it's
+	also very modified for crypt.  his iteration code uses 16k
+	of tables and appears to be slow.
+	(code obtained from aem@aber.ac.uk via alt.sources or comp.sources.misc)
+
+``highly optimized'' and tweaked Kerberos/Athena code (byte-order dependent):
+  165us per encryption (uses 6k worth of tables)
+  478us to set a new key (uses <1k of key tables)
+	so despite the comments in this code, it was possible to get
+	faster code AND smaller tables, as well as making the tables
+	machine-independent.
+	(code obtained from prep.ai.mit.edu)
+
+UC Berkeley code (depends on machine-endedness):
+  226us per encryption
+10848us to set a new key
+	table sizes are unclear, but they don't look very small
+	(code obtained from wuarchive.wustl.edu)
+
+
+motivation and history
+
+a while ago i wanted some des routines and the routines documented on sun's
+man pages either didn't exist or dumped core.  i had heard of kerberos,
+and knew that it used des,  so i figured i'd use its routines.  but once
+i got it and looked at the code,  it really set off a lot of pet peeves -
+it was too convoluted, the code had been written without taking
+advantage of the regular structure of operations such as IP, E, and FP
+(i.e. the author didn't sit down and think before coding),
+it was excessively slow,  the author had attempted to clarify the code
+by adding MORE statements to make the data movement more `consistent'
+instead of simplifying his implementation and cutting down on all data
+movement (in particular, his use of L1, R1, L2, R2), and it was full of
+idiotic `tweaks' for particular machines which failed to deliver significant
+speedups but which did obfuscate everything.  so i took the test data
+from his verification program and rewrote everything else.
+
+a while later i ran across the great crypt(3) package mentioned above.
+the fact that this guy was computing 2 sboxes per table lookup rather
+than one (and using a MUCH larger table in the process) emboldened me to
+do the same - it was a trivial change from which i had been scared away
+by the larger table size.  in his case he didn't realize you don't need to keep
+the working data in TWO forms, one for easy use of half the sboxes in
+indexing, the other for easy use of the other half; instead you can keep
+it in the form for the first half and use a simple rotate to get the other
+half.  this means i have (almost) half the data manipulation and half
+the table size.  in fairness though he might be encoding something particular
+to crypt(3) in his tables - i didn't check.
+
+i'm glad that i implemented it the way i did, because this C version is
+portable (the ifdef's are performance enhancements) and it is faster
+than versions hand-written in assembly for the sparc!
+
+
+porting notes
+
+one thing i did not want to do was write an enormous mess
+which depended on endedness and other machine quirks,
+and which necessarily produced different code and different lookup tables
+for different machines.  see the kerberos code for an example
+of what i didn't want to do; all their endedness-specific `optimizations'
+obfuscate the code and in the end were slower than a simpler machine
+independent approach.  however, there are always some portability
+considerations of some kind, and i have included some options
+for varying numbers of register variables.
+perhaps some will still regard the result as a mess!
+
+1) i assume everything is byte addressable, although i don't actually
+   depend on the byte order, and that bytes are 8 bits.
+   i assume word pointers can be freely cast to and from char pointers.
+   note that 99% of C programs make these assumptions.
+   i always use unsigned char's if the high bit could be set.
+2) the typedef `word' means a 32 bit unsigned integral type.
+   if `unsigned long' is not 32 bits, change the typedef in desCore.h.
+   i assume sizeof(word) == 4 EVERYWHERE.
+
+the (worst-case) cost of my NOT doing endedness-specific optimizations
+in the data loading and storing code surrounding the key iterations
+is less than 12%.  also, there is the added benefit that
+the input and output work areas do not need to be word-aligned.
+
+
+OPTIONAL performance optimizations
+
+1) you should define one of `i386,' `vax,' `mc68000,' or `sparc,'
+   whichever one is closest to the capabilities of your machine.
+   see the start of desCode.h to see exactly what this selection implies.
+   note that if you select the wrong one, the des code will still work;
+   these are just performance tweaks.
+2) for those with functional `asm' keywords: you should change the
+   ROR and ROL macros to use machine rotate instructions if you have them.
+   this will save 2 instructions and a temporary per use,
+   or about 32 to 40 instructions per en/decryption.
+   note that gcc is smart enough to translate the ROL/R macros into
+   machine rotates!
+
+these optimizations are all rather persnickety, yet with them you should
+be able to get performance equal to assembly-coding, except that:
+1) with the lack of a bit rotate operator in C, rotates have to be synthesized
+   from shifts.  so access to `asm' will speed things up if your machine
+   has rotates, as explained above in (3) (not necessary if you use gcc).
+2) if your machine has less than 12 32-bit registers i doubt your compiler will
+   generate good code.
+   `i386' tries to configure the code for a 386 by only declaring 3 registers
+   (it appears that gcc can use ebx, esi and edi to hold register variables).
+   however, if you like assembly coding, the 386 does have 7 32-bit registers,
+   and if you use ALL of them, use `scaled by 8' address modes with displacement
+   and other tricks, you can get reasonable routines for DesQuickCore... with
+   about 250 instructions apiece.  For DesSmall... it will help to rearrange
+   des_keymap, i.e., now the sbox # is the high part of the index and
+   the 6 bits of data is the low part; it helps to exchange these.
+   since i have no way to conveniently test it i have not provided my
+   shoehorned 386 version.  note that with this release of desCore, gcc is able
+   to put everything in registers(!), and generate about 370 instructions apiece
+   for the DesQuickCore... routines!
+
+coding notes
+
+the en/decryption routines each use 6 necessary register variables,
+with 4 being actively used at once during the inner iterations.
+if you don't have 4 register variables get a new machine.
+up to 8 more registers are used to hold constants in some configurations.
+
+i assume that the use of a constant is more expensive than using a register:
+a) additionally, i have tried to put the larger constants in registers.
+   registering priority was by the following:
+	anything more than 12 bits (bad for RISC and CISC)
+	greater than 127 in value (can't use movq or byte immediate on CISC)
+	9-127 (may not be able to use CISC shift immediate or add/sub quick),
+	1-8 were never registered, being the cheapest constants.
+b) the compiler may be too stupid to realize table and table+256 should
+   be assigned to different constant registers and instead repetitively
+   do the arithmetic, so i assign these to explicit `m' register variables
+   when possible and helpful.
+
+i assume that indexing is cheaper or equivalent to auto increment/decrement,
+where the index is 7 bits unsigned or smaller.
+this assumption is reversed for 68k and vax.
+
+i assume that addresses can be cheaply formed from two registers,
+or from a register and a small constant.
+for the 68000, the `two registers and small offset' form is used sparingly.
+all index scaling is done explicitly - no hidden shifts by log2(sizeof).
+
+the code is written so that even a dumb compiler
+should never need more than one hidden temporary,
+increasing the chance that everything will fit in the registers.
+KEEP THIS MORE SUBTLE POINT IN MIND IF YOU REWRITE ANYTHING.
+(actually, there are some code fragments now which do require two temps,
+but fixing it would either break the structure of the macros or
+require declaring another temporary).
+
+
+special efficient data format
+
+bits are manipulated in this arrangement most of the time (S7 S5 S3 S1):
+	003130292827xxxx242322212019xxxx161514131211xxxx080706050403xxxx
+(the x bits are still there, i'm just emphasizing where the S boxes are).
+bits are rotated left 4 when computing S6 S4 S2 S0:
+	282726252423xxxx201918171615xxxx121110090807xxxx040302010031xxxx
+the rightmost two bits are usually cleared so the lower byte can be used
+as an index into an sbox mapping table. the next two x'd bits are set
+to various values to access different parts of the tables.
+
+
+how to use the routines
+
+datatypes:
+	pointer to 8 byte area of type DesData
+	used to hold keys and input/output blocks to des.
+
+	pointer to 128 byte area of type DesKeys
+	used to hold full 768-bit key.
+	must be long-aligned.
+
+DesQuickInit()
+	call this before using any other routine with `Quick' in its name.
+	it generates the special 64k table these routines need.
+DesQuickDone()
+	frees this table
+
+DesMethod(m, k)
+	m points to a 128byte block, k points to an 8 byte des key
+	which must have odd parity (or -1 is returned) and which must
+	not be a (semi-)weak key (or -2 is returned).
+	normally DesMethod() returns 0.
+	m is filled in from k so that when one of the routines below
+	is called with m, the routine will act like standard des
+	en/decryption with the key k. if you use DesMethod,
+	you supply a standard 56bit key; however, if you fill in
+	m yourself, you will get a 768bit key - but then it won't
+	be standard.  it's 768bits not 1024 because the least significant
+	two bits of each byte are not used.  note that these two bits
+	will be set to magic constants which speed up the encryption/decryption
+	on some machines.  and yes, each byte controls
+	a specific sbox during a specific iteration.
+	you really shouldn't use the 768bit format directly;  i should
+	provide a routine that converts 128 6-bit bytes (specified in
+	S-box mapping order or something) into the right format for you.
+	this would entail some byte concatenation and rotation.
+
+Des{Small|Quick}{Fips|Core}{Encrypt|Decrypt}(d, m, s)
+	performs des on the 8 bytes at s into the 8 bytes at d. (d,s: char *).
+	uses m as a 768bit key as explained above.
+	the Encrypt|Decrypt choice is obvious.
+	Fips|Core determines whether a completely standard FIPS initial
+	and final permutation is done; if not, then the data is loaded
+	and stored in a nonstandard bit order (FIPS w/o IP/FP).
+	Fips slows down Quick by 10%, Small by 9%.
+	Small|Quick determines whether you use the normal routine
+	or the crazy quick one which gobbles up 64k more of memory.
+	Small is 50% slower then Quick, but Quick needs 32 times as much
+	memory.  Quick is included for programs that do nothing but DES,
+	e.g., encryption filters, etc.
+
+
+Getting it to compile on your machine
+
+there are no machine-dependencies in the code (see porting),
+except perhaps the `now()' macro in desTest.c.
+ALL generated tables are machine independent.
+you should edit the Makefile with the appropriate optimization flags
+for your compiler (MAX optimization).
+
+
+Speeding up kerberos (and/or its des library)
+
+note that i have included a kerberos-compatible interface in desUtil.c
+through the functions des_key_sched() and des_ecb_encrypt().
+to use these with kerberos or kerberos-compatible code put desCore.a
+ahead of the kerberos-compatible library on your linker's command line.
+you should not need to #include desCore.h;  just include the header
+file provided with the kerberos library.
+
+Other uses
+
+the macros in desCode.h would be very useful for putting inline des
+functions in more complicated encryption routines.
diff -Nru a/Documentation/devices.txt b/Documentation/devices.txt
--- a/Documentation/devices.txt	Wed Oct 30 16:44:27 2002
+++ b/Documentation/devices.txt	Wed Oct 30 16:44:27 2002
@@ -2667,7 +2667,7 @@
 cannot be provided with standard device nodes.
 
 /dev/pts	devpts		PTY slave filesystem
-/dev/shm	shmfs		POSIX shared memory maintenance access
+/dev/shm	tmpfs		POSIX shared memory maintenance access
 
  ****	TERMINAL DEVICES
 
diff -Nru a/Documentation/fb/clgenfb.txt b/Documentation/fb/clgenfb.txt
--- a/Documentation/fb/clgenfb.txt	Wed Oct 30 16:44:19 2002
+++ b/Documentation/fb/clgenfb.txt	Wed Oct 30 16:44:19 2002
@@ -1,6 +1,6 @@
 
 		Framebuffer driver for Cirrus Logic chipsets
-		Copyright 1999 Jeff Garzik <jgarzik@mandrakesoft.com>
+		Copyright 1999 Jeff Garzik <jgarzik@pobox.com>
 
 
 
diff -Nru a/Documentation/filesystems/befs.txt b/Documentation/filesystems/befs.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/filesystems/befs.txt	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,111 @@
+BeOS filesystem for Linux
+
+Document last updated: Dec 6, 2001
+
+WARNING
+=======
+Make sure you understand that this is alpha software.  This means that the
+implementation is neither complete nor well-tested. 
+
+I DISCLAIM ALL RESPONSIBILTY FOR ANY POSSIBLE BAD EFFECTS OF THIS CODE!
+
+LICENSE
+=====
+This software is covered by the GNU General Public License. 
+See the file COPYING for the complete text of the license.
+Or the GNU website: <http://www.gnu.org/licenses/licenses.html>
+
+AUTHOR
+=====
+Current maintainer: Will Dyson <will_dyson@pobox.com>
+Has been working on the code since Aug 13, 2001. See the changelog for details.
+
+Original Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
+His orriginal code can still be found at: <http://hp.vector.co.jp/authors/VA008030/bfs/>
+Does anyone know of a more current email address for Makoto? He doesn't respond
+to the address given above...
+
+WHAT IS THIS DRIVER?
+==================
+This module implements the native filesystem of BeOS <http://www.be.com/>
+for the linux 2.4.1 and later kernels. Currently it is a read-only implementation.
+
+Which is it, BFS or BEFS?
+================
+Be, Inc said, "BeOS Filesystem is officially called BFS, not BeFS". 
+But Unixware Boot Filesystem is called bfs, too. And they are already in the
+kernel.
+Because of this nameing conflict, on Linux the BeOS filesystem is called befs.
+
+HOW TO INSTALL
+==============
+step 1.  Install the BeFS  patch into the source code tree of linux.
+
+Apply the patchfile to your kernel source tree.
+Assuming that your kernel source is in /foo/bar/linux and the patchfile is called
+patch-befs-xxx, you would do the following:
+
+	cd /foo/bar/linux
+	patch -p1 < /path/to/patch-befs-xxx
+
+if the patching step fails (i.e. there are rejected hunks), you can try to
+figure it out yourself (it shouldn't be hard), or mail the maintainer 
+(Will Dyson <will_dyson@pobox.com>) for help.
+
+step 2.  Configuretion & make kernel
+
+The linux kernel has many compile-time options. Most of them are beyond the
+scope of this document. I suggest the Kernel-HOWTO document as a good general
+reference on this topic. <http://www.linux.com/howto/Kernel-HOWTO.html>
+
+However, to use the BeFS module, you must enable it at configure time.
+
+	cd /foo/bar/linux
+	make menuconfig (or xconfig)
+
+The BeFS module is not a standard part of the linux kernel, so you must first
+enable support for experimental code under the "Code maturity level" menu.
+
+Then, under the "Filesystems" menu will be an option called "BeFS filesystem (experimental)",
+or something like that. Enable that option (it is fine to make it a module).
+
+Save your kernel configuration and then build your kernel.
+
+step 3.  Install
+
+See the kernel howto <http://www.linux.com/howto/Kernel-HOWTO.html> for
+instructions on this critical step.
+
+USING BFS
+=========
+To use the BeOS filesystem, use filesystem type 'befs'.
+
+ex)
+    mount -t befs /dev/fd0 /beos
+
+MOUNT OPTIONS
+=============
+uid=nnn        All files in the partition will be owned by user id nnn.
+gid=nnn	       All files in the partition will be in group nnn.
+iocharset=xxx  Use xxx as the name of the NLS translation table.
+debug          The driver will output debugging information to the syslog.
+
+HOW TO GET LASTEST VERSION
+==========================
+
+The latest version is currently available at:
+<http://befs-driver.sourceforge.net/>
+
+ANY KNOWN BUGS?
+===========
+As of Jan 20, 2002:
+	
+	None
+
+SPECIAL THANKS
+==============
+Dominic Giampalo ... Writing "Practical file system design with Be filesystem"
+Hiroyuki Yamada  ... Testing LinuxPPC.
+
+
+
diff -Nru a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt
--- a/Documentation/filesystems/tmpfs.txt	Wed Oct 30 16:44:17 2002
+++ b/Documentation/filesystems/tmpfs.txt	Wed Oct 30 16:44:17 2002
@@ -47,10 +47,9 @@
    shared memory)
 
 3) Some people (including me) find it very convenient to mount it
-   e.g. on /tmp and /var/tmp and have a big swap partition. But be
-   aware: loop mounts of tmpfs files do not work due to the internal
-   design. So mkinitrd shipped by most distributions will fail with a
-   tmpfs /tmp.
+   e.g. on /tmp and /var/tmp and have a big swap partition. And now
+   loop mounts of tmpfs files do work, so mkinitrd shipped by most
+   distributions should succeed with a tmpfs /tmp.
 
 4) And probably a lot more I do not know about :-)
 
@@ -90,13 +89,9 @@
    size=50% the tmpfs instance should be able to grow to 50 percent of
    RAM + swap. So the instance should adapt automatically if you add
    or remove swap space.
-2) loop mounts: This is difficult since loop.c relies on the readpage
-   operation. This operation gets a page from the caller to be filled
-   with the content of the file at that position. But tmpfs always has
-   the page and thus cannot copy the content to the given page. So it
-   cannot provide this operation. The VM had to be changed seriously
-   to achieve this.
-3) Show the number of tmpfs RAM pages. (As shared?)
+2) Show the number of tmpfs RAM pages. (As shared?)
 
 Author:
    Christoph Rohland <cr@sap.com>, 1.12.01
+Updated:
+   Hugh Dickins <hugh@veritas.com>, 17 Oct 2002
diff -Nru a/Documentation/i810_rng.txt b/Documentation/i810_rng.txt
--- a/Documentation/i810_rng.txt	Wed Oct 30 16:44:29 2002
+++ b/Documentation/i810_rng.txt	Wed Oct 30 16:44:29 2002
@@ -1,5 +1,5 @@
 	Hardware driver for Intel i810 Random Number Generator (RNG)
-	Copyright 2000,2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+	Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
 
 Introduction:
diff -Nru a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt
--- a/Documentation/ioctl-number.txt	Wed Oct 30 16:44:34 2002
+++ b/Documentation/ioctl-number.txt	Wed Oct 30 16:44:34 2002
@@ -188,5 +188,3 @@
 0xB1	00-1F	PPPoX			<mailto:mostrows@styx.uwaterloo.ca>
 0xCB	00-1F	CBM serial IEC bus	in development:
 					<mailto:michael.klein@puffin.lb.shuttle.de>
-
-0xFE	00-9F	Logical Volume Manager	<mailto:linux-lvm@sistina.com>
diff -Nru a/Documentation/kobject.txt b/Documentation/kobject.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/kobject.txt	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,154 @@
+kobjects - Simple, Generic Kernel Objects
+
+Patrick Mochel <mochel@osdl.org>
+
+30 October 2002
+
+
+kobjects
+
+struct kobject introduces a simple, intregral datatype and a simple
+set of semantics for operating on the device. kobjects are intended to
+be embedded in larger data structures and replace fields it
+duplicates. A set of library functions has been developed to assist in
+the manipulation of kobjects.
+
+struct kobject looks like this:
+
+
+struct kobject {
+	char			name[16];
+	atomic_t		refcount;
+	struct list_head	entry;
+	struct kobject		* parent;
+	struct subsystem	* subsys;
+	struct dentry		* dentry;
+};
+
+void kobject_init(struct kobject *);
+int kobject_register(struct kobject *);
+void kobject_unregister(struct kobject *);
+struct kobject * kobject_get(struct kobject *);
+void kobject_put(struct kobject *);
+
+
+
+subsystems
+
+struct subsystem is introduced to describe a collection of objects of
+a certain type. subsystems are kobjects themselves, though they
+contain lists of kobjects that belong to that subsystem. Objects of a
+subsystem (the embedder objects in which kobjects live) are all of the
+same type. The interface looks like:
+
+
+struct subsystem {
+	struct kobject		kobj;
+	struct list_head	list;
+	struct rw_semaphore	rwsem;
+	struct subsystem	* parent;
+	void (*release)(struct kobject *);
+	struct sysfs_ops	* sysfs_ops;
+	struct attribute	** default_attrs;
+};
+
+void subsystem_init(struct subsystem *);
+int subsystem_register(struct subsystem *);
+void subsystem_unregister(struct subsystem *);
+
+struct subsystem * subsys_get(struct subsystem * s);
+void subsys_put(struct subsystem * s);
+
+
+
+Familial Relations
+
+kobjects and subsystems intersect and intertwine in several ways. Each
+is well-defined (though maybe they could be made simpler). Each kobject
+belongs to a subsystem. Since subsystems are kobjects themselves, they
+also belong to a controlling subsystem. This implies that subsystems
+are hierarchial. 
+
+Many kobjects are hierarchial in nature, which is represented by
+including a pointer to its parent kobject in struct kobject. Many
+different types of kobject-embedding objects may all point to the same
+parent. 
+
+The ancestral hierarchy of kobjects should not be confused with
+membership in a subsystem, or the ancestral relationship of
+subsystems. A set of kobjects may all belong to a subsystem, but all
+have different parents. 
+
+kobjects may be orphans and have no explicit parent. In that case, the
+subsystem to which the object belongs becomes its parent. 
+
+
+Sysfs
+
+These rules force a complete kobject hierarchy, which Suprise! maps
+very well onto a filesystem.
+
+driverfs was recently cloned, and there now exists sysfs. All driverfs
+operations operate on a separate data type: struct driver_dir_entry,
+which all objects that are represented in driverfs must have. driverfs
+also allowed rogue directory creation that had no explicit objects
+associated with them.
+
+struct kobject is intended to be the common data type which sysfs
+operates on. This gives the filesystem the ability to directly access
+more fields of the object, including the reference count. This also
+forces each directory in the filesystem to be tied directly to a
+kobject. 
+
+
+Directory Placement
+
+Parental relationships are determined in the kobject/subsystem layer,
+and the kobject is then passed off to the sysfs layer. kobjects with
+no parent have directories created for them in the sysfs root
+directory. Per the rules above, the only kobjects that remain orphans
+are subsystems without parent subsystems (since leaf objects either
+have an explicit parent, or are assigned their controlling subsystem
+as their foster parent). 
+
+
+File Callbacks
+
+Previously, each driverfs directory contained a pointer to a list of file
+operations for reading and writing driverfs files. These callbacks
+received a struct driver_dir_entry, when they performed a
+container_of() transform on to receive the specific object type for
+which the call was meant. 
+
+These callbacks have been converted to accept a struct kobject instead
+of struct driver_dir_entry. Since all kobjects belong to a subsystem
+that contains kobjects all of the same type, the sysfs operations
+have been moved to reside in the subsystem, since they are common for
+all kobjects.
+
+
+Default Attributes
+
+Most subsystems have a set of default attributes associated with an
+object that registers with them. A subsystem definition may contain a
+NULL-terminated array of attributes that will be exported when an
+object is registered with the subsystem. 
+
+
+Reference Counting
+
+All objects contain reference counts. All functions accessing objects
+should increment the reference count until they are finished, and
+decrement the reference count. When an object is initialized, it
+receives a reference count of 1. When a device is unregistered, the
+reference is decremented. When the reference counts reaches 0, the
+subsystem's ->release() callback for that object type (remember
+subsystems control only one type of device each) is called; and the
+reference counts of the kobject's subsystem and parent are
+decremented. 
+
+The ->release() callback is the opportunity for the subsystem to free
+memory allocated for the object. It is the notification that
+absolutely no one is using the structure any more (and can't acquire a
+reference to it), so it is safe to free it.
+
diff -Nru a/Documentation/networking/8139too.txt b/Documentation/networking/8139too.txt
--- a/Documentation/networking/8139too.txt	Wed Oct 30 16:44:29 2002
+++ b/Documentation/networking/8139too.txt	Wed Oct 30 16:44:29 2002
@@ -2,7 +2,7 @@
 		"8139too" Fast Ethernet driver for Linux
 	 RTL-8139, -8129, and -8130 10/100 Fast Ethernet adapters
 
-	Copyright 2000,2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+	Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
 
                 http://sourceforge.net/projects/gkernel/
 
diff -Nru a/Documentation/networking/NAPI_HOWTO.txt b/Documentation/networking/NAPI_HOWTO.txt
--- a/Documentation/networking/NAPI_HOWTO.txt	Wed Oct 30 16:44:29 2002
+++ b/Documentation/networking/NAPI_HOWTO.txt	Wed Oct 30 16:44:29 2002
@@ -746,4 +746,4 @@
 Andrew Morton  <akpm@zip.com.au>
 Manfred Spraul <manfred@colorfullife.com>
 Donald Becker <becker@scyld.com>
-Jeff Garzik <jgarzik@mandrakesoft.com>
+Jeff Garzik <jgarzik@pobox.com>
diff -Nru a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
--- a/Documentation/networking/ip-sysctl.txt	Wed Oct 30 16:44:28 2002
+++ b/Documentation/networking/ip-sysctl.txt	Wed Oct 30 16:44:28 2002
@@ -351,15 +351,26 @@
 	Change the maximum number of multicast groups we can subscribe to.
 	Default: 20
 
-conf/interface/*: 
-conf/all/* is special and changes the settings for all interfaces.
-	Change special settings per interface.
+conf/interface/*  changes special settings per interface (where "interface" is 
+		  the name of your network interface)
+conf/all/*	  is special, changes the settings for all interfaces
+
 
 log_martians - BOOLEAN
 	Log packets with impossible addresses to kernel log.
+	log_martians for the interface will be enabled if at least one of
+	conf/{all,interface}/log_martians is set to TRUE,
+	it will be disabled otherwise
 
 accept_redirects - BOOLEAN
 	Accept ICMP redirect messages.
+	accept_redirects for the interface will be enabled if:
+	- both conf/{all,interface}/accept_redirects are TRUE in the case forwarding
+	  for the interface is enabled
+	or
+	- at least one of conf/{all,interface}/accept_redirects is TRUE in the case
+	  forwarding for the interface is disabled
+	accept_redirects for the interface will be disabled otherwise
 	default TRUE (host)
 		FALSE (router)
 
@@ -369,6 +380,8 @@
 mc_forwarding - BOOLEAN
 	Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE
 	and a multicast routing daemon is required.
+	conf/all/mc_forwarding must also be set to TRUE to enable multicast routing
+	for the interface
 
 medium_id - INTEGER
 	Integer value used to differentiate the devices by the medium they
@@ -383,30 +396,46 @@
 
 proxy_arp - BOOLEAN
 	Do proxy arp.
+	proxy_arp for the interface will be enabled if at least one of
+	conf/{all,interface}/proxy_arp is set to TRUE,
+	it will be disabled otherwise
 
 shared_media - BOOLEAN
 	Send(router) or accept(host) RFC1620 shared media redirects.
 	Overrides ip_secure_redirects.
+	shared_media for the interface will be enabled if at least one of
+	conf/{all,interface}/shared_media is set to TRUE,
+	it will be disabled otherwise
 	default TRUE
 
 secure_redirects - BOOLEAN
 	Accept ICMP redirect messages only for gateways,
 	listed in default gateway list.
+	secure_redirects for the interface will be enabled if at least one of
+	conf/{all,interface}/secure_redirects is set to TRUE,
+	it will be disabled otherwise
 	default TRUE
 
 send_redirects - BOOLEAN
-	Send redirects, if router. Default: TRUE
+	Send redirects, if router.
+	send_redirects for the interface will be enabled if at least one of
+	conf/{all,interface}/send_redirects is set to TRUE,
+	it will be disabled otherwise
+	Default: TRUE
 
 bootp_relay - BOOLEAN
 	Accept packets with source address 0.b.c.d destined
 	not to this host as local ones. It is supposed, that
 	BOOTP relay daemon will catch and forward such packets.
-
+	conf/all/bootp_relay must also be set to TRUE to enable BOOTP relay
+	for the interface
 	default FALSE
 	Not Implemented Yet.
 
 accept_source_route - BOOLEAN
 	Accept packets with SRR option.
+	conf/all/accept_source_route must also be set to TRUE to accept packets
+	with SRR option on the interface
 	default TRUE (router)
 		FALSE (host)
 
@@ -417,7 +446,10 @@
 	    networks running a slow unreliable protocol (sort of RIP),
 	    or using static routes.
 
-	0 - No source validation. 
+	0 - No source validation.
+
+	conf/all/rp_filter must also be set to TRUE to do source validation
+	on the interface
 
 	Default value is 0. Note that some distributions enable it
 	in startup scripts.
@@ -437,6 +469,10 @@
 	particular interfaces. Only for more complex setups like load-
 	balancing, does this behaviour cause problems.
 
+	arp_filter for the interface will be enabled if at least one of
+	conf/{all,interface}/arp_filter is set to TRUE,
+	it will be disabled otherwise
+
 tag - INTEGER
 	Allows you to write a number, which can be used as required.
 	Default value is 0.
@@ -451,8 +487,8 @@
 Updated by:
 Andi Kleen
 ak@muc.de
-
-
+Nicolas Delon
+delon.nicolas@wanadoo.fr
 
 
 
@@ -462,6 +498,15 @@
 IPv6 has no global variables such as tcp_*.  tcp_* settings under ipv4/ also
 apply to IPv6 [XXX?].
 
+bindv6only - BOOLEAN
+	Default value for IPV6_V6ONLY socket option,
+	which restricts use of the IPv6 socket to IPv6 communication 
+	only.
+		TRUE: disable IPv4-mapped address feature
+		FALSE: enable IPv4-mapped address feature
+
+	Default: FALSE (as specified in RFC2553bis)
+
 conf/default/*:
 	Change the interface-specific default settings.
 
@@ -560,8 +605,14 @@
 	routers are present.
 	Default: 3
 
+icmp/*:
+ratelimit - INTEGER
+	Limit the maximal rates for sending ICMPv6 packets.
+	0 to disable any limiting, otherwise the maximal rate in jiffies(1)
+	Default: 100
+
 IPv6 Update by:
-Pekka Savola
-pekkas@netcore.fi
+Pekka Savola <pekkas@netcore.fi>
+YOSHIFUJI Hideaki / USAGI Project <yoshfuji@linux-ipv6.org>
 
 $Id: ip-sysctl.txt,v 1.20 2001/12/13 09:00:18 davem Exp $
diff -Nru a/Documentation/parisc/IODC.txt b/Documentation/parisc/IODC.txt
--- a/Documentation/parisc/IODC.txt	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,68 +0,0 @@
-Some notes on IODC, its general brokenness, and how to work around it.
-
-Short Version
-
-IODC is HP's pre-PCI standard for device identification (a la PCI vendor,
-device IDs), detection, configuration, initialization and so on.
-
-It also can provide firmware function to do the actual IO, which are slow,
-not really defined for runtime usage and generally not desirable.  (There
-are other firmware standards, such as STI, to do real IO).
-
-Usually, there are two parts to IODC.  The actual ROMs, which are laid out,
-detected aso in a bus-specific manner (IO_DC_ADDRESS / IO_DC_DATA on
-GSC/Runway, PCI spec - compliant ROMs for PCI, God-only-knows how on EISA),
-and the slightly cooked data read by PDC_IODC.
-
-The ROM layout is generally icky (only one byte out of every 4-byte-word
-might be valid, and many devices don't implement required options), so
-using PDC_IODC is highly recommended.  (In fact, you should use the device
-lists set up by the kernel proper instead of calling PDC_IODC yourself).
-
-Now, let's have a look at what the cooked ROM looks like (see iodc.pdf for
-the details, this is the simplified version).
-
-Basically, the first 8 bytes of IODC contain two 32-bit ids called HVERSION
-and SVERSION.  Those are further split up into bit fields, and
-unfortunately just ignoring this split up isn't an option.
-
-SVERSION consists of a 4-bit revision field, a 20-bit model field and a
-8-bit opt field.  Now, forget the revision and opt fields exist.  Basically,
-the model field is equivalent to a PCI device id (there is no vendor id.
-this is proprietary hardware we're talking about).  That is, all your
-driver cares for, in 90 % of the cases, is to find all devices that match
-the model field.
-
-The rev field is - you guessed it - roughly equivalent to the revision
-byte for PCI, with the exception that higher revisions should be strict
-supersets of lower revisions.
-
-The last byte of HVERSION, "type", and the last byte of SVERSION, "opt",
-belong together;  type gives a very rough indication of what the device
-is supposed to do, and opt contains some type-specific information. (For
-example, the "bus converter" (ie bus bridge) type encodes the kind of
-bus behind the bridge in the opt field.
-
-The rest of HVERSION contains, in most cases, a number identifying the
-machine the chip was used in, or a revision indicator that just fixed
-bugs and didn't add any features (or was done in a shrinked process or
-whatever).
-
-So, here's the interface you actually should use to find your devices:
-
-
-/* Find a device, matching the model field of sversion only (from=NULL
- * for the first call */
-struct iodc_dev *iodc_find_device(u32 sversion, struct iodc_dev *from);
-
-
-Here's a function you should use if you have special requirements, such
-as finding devices by type rather than by model.  Generally, if you're
-using this, you should be me).
-
-/* Find a device, masking out bits as specified */
-struct iodc_dev *iodc_find_device_mask(u32 hversion, u32 sversion,
-	u32 hversion_mask, u32 sversion_mask, struct iodc_dev *from);
-
-
-	Philipp Rumpf <prumpf@tux.org>
diff -Nru a/Documentation/usb/URB.txt b/Documentation/usb/URB.txt
--- a/Documentation/usb/URB.txt	Wed Oct 30 16:44:27 2002
+++ b/Documentation/usb/URB.txt	Wed Oct 30 16:44:27 2002
@@ -109,7 +109,7 @@
 
 Flags:
 For ISO there are two startup behaviors: Specified start_frame or ASAP.
-For ASAP set USB_ISO_ASAP in transfer_flags.
+For ASAP set URB_ISO_ASAP in transfer_flags.
 
 If short packets should NOT be tolerated, set URB_SHORT_NOT_OK in 
 transfer_flags.
@@ -156,7 +156,7 @@
 with usb_free_urb().
 
 There is also an asynchronous unlink mode.  To use this, set the
-the USB_ASYNC_UNLINK flag in urb->transfer flags before calling
+the URB_ASYNC_UNLINK flag in urb->transfer flags before calling
 usb_unlink_urb().  When using async unlinking, the URB will not
 normally be unlinked when usb_unlink_urb() returns.  Instead, wait
 for the completion handler to be called.
diff -Nru a/Documentation/vm/overcommit-accounting b/Documentation/vm/overcommit-accounting
--- a/Documentation/vm/overcommit-accounting	Wed Oct 30 16:44:26 2002
+++ b/Documentation/vm/overcommit-accounting	Wed Oct 30 16:44:26 2002
@@ -1,4 +1,4 @@
-The Linux kernel supports four overcommit handling modes
+The Linux kernel supports three overcommit handling modes
 
 0	-	Heuristic overcommit handling. Obvious overcommits of
 		address space are refused. Used for a typical system. It
diff -Nru a/Documentation/voyager.txt b/Documentation/voyager.txt
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/Documentation/voyager.txt	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,95 @@
+Running Linux on the Voyager Architecture
+=========================================
+
+For full details and current project status, see
+
+http://www.hansenpartnership.com/voyager
+
+The voyager architecture was designed by NCR in the mid 80s to be a
+fully SMP capable RAS computing architecture built around intel's 486
+chip set.  The voyager came in three levels of architectural
+sophistication: 3,4 and 5 --- 1 and 2 never made it out of prototype.
+The linux patches support only the Level 5 voyager architecture (any
+machine class 3435 and above).
+
+The Voyager Architecture
+------------------------
+
+Voyager machines consist of a Baseboard with a 386 diagnostic
+processor, a Power Supply Interface (PSI) a Primary and possibly
+Secondary Microchannel bus and between 2 and 20 voyager slots.  The
+voyager slots can be populated with memory and cpu cards (up to 4GB
+memory and from 1 486 to 32 Pentium Pro processors).  Internally, the
+voyager has a dual arbitrated system bus and a configuration and test
+bus (CAT).  The voyager bus speed is 40MHz.  Therefore (since all
+voyager cards are dual ported for each system bus) the maximum
+transfer rate is 320Mb/s but only if you have your slot configuration
+tuned (only memory cards can communicate with both busses at once, CPU
+cards utilise them one at a time).
+
+Voyager SMP
+-----------
+
+Since voyager was the first intel based SMP system, it is slightly
+more primitive than the Intel IO-APIC approach to SMP.  Voyager allows
+arbitrary interrupt routing (including processor affinity routing) of
+all 16 PC type interrupts.  However it does this by using a modified
+5259 master/slave chip set instead of an APIC bus.  Additionally,
+voyager supports Cross Processor Interrupts (CPI) equivalent to the
+APIC IPIs.  There are two routed voyager interrupt lines provided to
+each slot.
+
+Processor Cards
+---------------
+
+These come in single, dyadic and quad configurations (the quads are
+problematic--see later).  The maximum configuration is 8 quad cards
+for 32 way SMP.
+
+Quad Processors
+---------------
+
+Because voyager only supplies two interrupt lines to each Processor
+card, the Quad processors have to be configured (and Bootstrapped) in
+as a pair of Master/Slave processors.
+
+In fact, most Quad cards only accept one VIC interrupt line, so they
+have one interrupt handling processor (called the VIC extended
+processor) and three non-interrupt handling processors.
+
+Current Status
+--------------
+
+The System will boot on Mono, Dyad and Quad cards.  There was
+originally a Quad boot problem which has been fixed by proper gdt
+alignment in the initial boot loader.  If you still cannot get your
+voyager system to boot, email me at:
+
+<J.E.J.Bottomley@HansenPartnership.com>
+
+
+The Quad cards now support using the separate Quad CPI vectors instead
+of going through the VIC mailbox system.
+
+The Level 4 architecture (3430 and 3360 Machines) should also work
+fine.
+
+Dump Switch
+-----------
+
+The voyager dump switch sends out a broadcast NMI which the voyager
+code intercepts and does a task dump.
+
+Power Switch
+------------
+
+The front panel power switch is intercepted by the kernel and should
+cause a system shutdown and power off.
+
+A Note About Mixed CPU Systems
+------------------------------
+
+Linux isn't designed to handle mixed CPU systems very well.  In order
+to get everything going you *must* make sure that your lowest
+capability CPU is used for booting.  Also, mixing CPU classes
+(e.g. 486 and 586) is really not going to work very well at all.
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS	Wed Oct 30 16:44:29 2002
+++ b/MAINTAINERS	Wed Oct 30 16:44:29 2002
@@ -104,12 +104,12 @@
 
 8139CP 10/100 FAST ETHERNET DRIVER
 P:	Jeff Garzik
-M:	jgarzik@mandrakesoft.com
+M:	jgarzik@pobox.com
 S:	Maintained
 
 8139TOO 10/100 FAST ETHERNET DRIVER
 P:	Jeff Garzik
-M:	jgarzik@mandrakesoft.com
+M:	jgarzik@pobox.com
 W:	http://sourceforge.net/projects/gkernel/
 S:	Maintained
 
@@ -298,7 +298,7 @@
 
 CIRRUS LOGIC GENERIC FBDEV DRIVER
 P:	Jeff Garzik
-M:	jgarzik@mandrakesoft.com
+M:	jgarzik@pobox.com
 L:	linux-fbdev-devel@lists.sourceforge.net
 S:	Odd Fixes
 
@@ -806,7 +806,7 @@
 
 INTEL I8XX RANDOM NUMBER GENERATOR SUPPORT
 P:	Jeff Garzik
-M:	jgarzik@mandrakesoft.com
+M:	jgarzik@pobox.com
 W:	http://sourceforge.net/projects/gkernel/
 S:	Maintained
 
@@ -990,12 +990,6 @@
 W:	http://ldm.sourceforge.net
 S:	Maintained
 
-LOGICAL VOLUME MANAGER
-P:	Heinz Mauelshagen
-L:	linux-LVM@sistina.com
-W:	http://www.sistina.com/lvm
-S:	Maintained 
-
 LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
 P:	Gerard Roudier
 M:	groudier@free.fr
@@ -1126,7 +1120,7 @@
 P:	Andrew Morton
 M:	akpm@zip.com.au
 P:	Jeff Garzik
-M:	jgarzik@mandrakesoft.com
+M:	jgarzik@pobox.com
 L:	linux-net@vger.kernel.org
 S:	Maintained
 
@@ -1216,6 +1210,12 @@
 L:	linux-sound@vger.kernel.org
 S:	Maintained
 
+OPROFILE
+P:	John Levon
+M:	levon@movementarian.org
+L:	oprofile-list@lists.sf.net
+S:	Maintained
+
 ORINOCO DRIVER
 P:	David Gibson
 M:	hermes@gibson.dropbear.id.au
@@ -1644,7 +1644,7 @@
 
 TULIP NETWORK DRIVER
 P:	Jeff Garzik
-M:	jgarzik@mandrakesoft.com
+M:	jgarzik@pobox.com
 L:	tulip-users@lists.sourceforge.net
 W:	http://sourceforge.net/projects/tulip/
 S:	Maintained
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Wed Oct 30 16:44:21 2002
+++ b/Makefile	Wed Oct 30 16:44:21 2002
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 5
-SUBLEVEL = 44
+SUBLEVEL = 45
 EXTRAVERSION =
 
 # *DOCUMENTATION*
@@ -38,13 +38,17 @@
 
 KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
 
+UTS_MACHINE := $(ARCH)
+
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 	  else if [ -x /bin/bash ]; then echo /bin/bash; \
 	  else echo sh; fi ; fi)
 TOPDIR	:= $(CURDIR)
 
 HOSTCC  	= gcc
+HOSTCXX  	= g++
 HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCXXFLAGS	= -O2
 
 CROSS_COMPILE 	=
 
@@ -106,11 +110,20 @@
 
 MAKEFLAGS += --no-print-directory
 
+# For maximum performance (+ possibly random breakage, uncomment
+# the following)
+
+#MAKEFLAGS += -rR
+
 #	If the user wants quiet mode, echo short versions of the commands 
 #	only
 
-ifneq ($(KBUILD_VERBOSE),1)
+ifeq ($(KBUILD_VERBOSE),1)
+  quiet =
+  Q =
+else
   quiet=quiet_
+  Q = @
 endif
 
 #	If the user is running make -s (silent mode), suppress echoing of
@@ -120,7 +133,7 @@
   quiet=silent_
 endif
 
-export quiet KBUILD_VERBOSE
+export quiet Q KBUILD_VERBOSE
 
 #	Paths to obj / src tree
 
@@ -142,7 +155,6 @@
 STRIP		= $(CROSS_COMPILE)strip
 OBJCOPY		= $(CROSS_COMPILE)objcopy
 OBJDUMP		= $(CROSS_COMPILE)objdump
-MAKEFILES	= .config
 GENKSYMS	= /sbin/genksyms
 DEPMOD		= /sbin/depmod
 KALLSYMS	= /sbin/kallsyms
@@ -161,7 +173,8 @@
 
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
 	CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
-	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL
+	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL UTS_MACHINE \
+	HOSTCXX HOSTCXXFLAGS
 
 export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS
 export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 
@@ -187,7 +200,7 @@
 
 .PHONY: scripts
 scripts:
-	+@$(call descend,scripts,)
+	+@$(Q)$(MAKE) -f scripts/Makefile.build obj=scripts
 
 # Objects we will link into vmlinux / subdirs we need to visit
 # ---------------------------------------------------------------------------
@@ -201,7 +214,7 @@
 
 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
 
-include-config := 1
+export include-config := 1
 
 -include .config
 
@@ -209,7 +222,7 @@
 
 include arch/$(ARCH)/Makefile
 
-core-y		+= kernel/ mm/ fs/ ipc/ security/
+core-y		+= kernel/ mm/ fs/ ipc/ security/ crypto/
 
 SUBDIRS		+= $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
 		     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
@@ -237,21 +250,7 @@
 
 #	In this section, we need .config
 
-#	If .config doesn't exist - tough luck
-
-.config: arch/$(ARCH)/config.in # FIXME $(shell find . -name Config.in)
-	@echo '***'
-	@if [ -f $@ ]; then \
-	  echo '*** The tree was updated, so your .config may be'; \
-	  echo '*** out of date!'; \
-	else \
-	  echo '*** You have not yet configured your kernel!'; \
-	fi
-	@echo '***'
-	@echo '*** Please run some configurator (e.g. "make oldconfig" or'
-	@echo '*** "make menuconfig" or "make xconfig").'
-	@echo '***'
-	@exit 1
+-include ..config.cmd
 
 ifdef CONFIG_MODULES
 export EXPORT_FLAGS := -DEXPORT_SYMTAB
@@ -306,7 +305,7 @@
 	  echo '  Generating build number'
 	  . scripts/mkversion > .tmp_version
 	  mv -f .tmp_version .version
-	  +$(call descend,init,)
+	  $(Q)$(MAKE) -f scripts/Makefile.build obj=init
 	)
 	$(call cmd,vmlinux__)
 	echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
@@ -365,7 +364,7 @@
 
 .PHONY: $(SUBDIRS)
 $(SUBDIRS): .hdepend prepare
-	+@$(call descend,$@,)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$@
 
 #	Things we need done before we descend to build or make
 #	module versions are listed in "prepare"
@@ -388,17 +387,17 @@
 # ---------------------------------------------------------------------------
 
 %.s: %.c scripts FORCE
-	+@$(call descend,$(@D),$@)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(@D) $@
 %.i: %.c scripts FORCE
-	+@$(call descend,$(@D),$@)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(@D) $@
 %.o: %.c scripts FORCE
-	+@$(call descend,$(@D),$@)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(@D) $@
 %.lst: %.c scripts FORCE
-	+@$(call descend,$(@D),$@)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(@D) $@
 %.s: %.S scripts FORCE
-	+@$(call descend,$(@D),$@)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(@D) $@
 %.o: %.S scripts FORCE
-	+@$(call descend,$(@D),$@)
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$(@D) $@
 
 # 	FIXME: The asm symlink changes when $(ARCH) changes. That's
 #	hard to detect, but I suppose "make mrproper" is a good idea
@@ -419,11 +418,8 @@
 # 	with it and forgot to run make oldconfig
 
 include/linux/autoconf.h: .config
-	@echo '***'
-	@echo '*** You changed .config w/o running make *config?'
-	@echo '*** Please run "make oldconfig"'
-	@echo '***'
-	@exit 1
+	+@$(call descend,scripts/kconfig,scripts/kconfig/conf)
+	./scripts/kconfig/conf -s arch/$(ARCH)/Kconfig
 
 # Generate some files
 # ---------------------------------------------------------------------------
@@ -472,9 +468,11 @@
 
 # 	Update modversions.h, but only if it would change.
 
-include/linux/modversions.h: FORCE
+.PHONY: __rm_tmp_export-objs
+__rm_tmp_export-objs: 
 	@rm -rf .tmp_export-objs
-	@$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS))
+
+include/linux/modversions.h: $(patsubst %,_modver_%,$(SUBDIRS))
 	@echo -n '  Generating $@'
 	@( echo "#ifndef _LINUX_MODVERSIONS_H";\
 	   echo "#define _LINUX_MODVERSIONS_H"; \
@@ -487,8 +485,9 @@
 	) > $@.tmp; \
 	$(update-if-changed)
 
-$(patsubst %,_sfdep_%,$(SUBDIRS)): FORCE
-	+@$(call descend,$(patsubst _sfdep_%,%,$@),fastdep)
+.PHONY: $(patsubst %, _modver_%, $(SUBDIRS))
+$(patsubst %, _modver_%, $(SUBDIRS)): __rm_tmp_export-objs
+	$(Q)$(MAKE) -f scripts/Makefile.modver obj=$(patsubst _modver_%,%,$@)
 
 else # !CONFIG_MODVERSIONS
 
@@ -540,8 +539,7 @@
 
 .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
 $(patsubst %, _modinst_%, $(SUBDIRS)) :
-	+@$(call descend,$(patsubst _modinst_%,%,$@),modules_install)
-
+	$(Q)$(MAKE) -f scripts/Makefile.modinst obj=$(patsubst _modinst_%,%,$@)
 else # CONFIG_MODULES
 
 # Modules not configured
@@ -637,34 +635,36 @@
 .PHONY: oldconfig xconfig menuconfig config \
 	make_with_config
 
-xconfig:
-	+@$(call descend,scripts,scripts/kconfig.tk)
-	wish -f scripts/kconfig.tk
+scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf: scripts/fixdep FORCE
+	+@$(call descend,scripts/kconfig,$@)
+
+xconfig: scripts/kconfig/qconf
+	./scripts/kconfig/qconf arch/$(ARCH)/Kconfig
 
-menuconfig:
-	+@$(call descend,scripts,lxdialog)
-	$(CONFIG_SHELL) $(src)/scripts/Menuconfig arch/$(ARCH)/config.in
+menuconfig: scripts/kconfig/mconf
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=scripts lxdialog
+	./scripts/kconfig/mconf arch/$(ARCH)/Kconfig
 
-config:
-	$(CONFIG_SHELL) $(src)/scripts/Configure arch/$(ARCH)/config.in
+config: scripts/kconfig/conf
+	./scripts/kconfig/conf arch/$(ARCH)/Kconfig
 
-oldconfig:
-	$(CONFIG_SHELL) $(src)/scripts/Configure -d arch/$(ARCH)/config.in
+oldconfig: scripts/kconfig/conf
+	./scripts/kconfig/conf -o arch/$(ARCH)/Kconfig
 
-randconfig:
-	$(CONFIG_SHELL) $(src)/scripts/Configure -r arch/$(ARCH)/config.in
+randconfig: scripts/kconfig/conf
+	./scripts/kconfig/conf -r arch/$(ARCH)/Kconfig
 
-allyesconfig:
-	$(CONFIG_SHELL) $(src)/scripts/Configure -y arch/$(ARCH)/config.in
+allyesconfig: scripts/kconfig/conf
+	./scripts/kconfig/conf -y arch/$(ARCH)/Kconfig
 
-allnoconfig:
-	$(CONFIG_SHELL) $(src)/scripts/Configure -n arch/$(ARCH)/config.in
+allnoconfig: scripts/kconfig/conf
+	./scripts/kconfig/conf -n arch/$(ARCH)/Kconfig
 
-allmodconfig:
-	$(CONFIG_SHELL) $(src)/scripts/Configure -m arch/$(ARCH)/config.in
+allmodconfig: scripts/kconfig/conf
+	./scripts/kconfig/conf -m arch/$(ARCH)/Kconfig
 
-defconfig:
-	yes '' | $(CONFIG_SHELL) $(src)/scripts/Configure -d arch/$(ARCH)/config.in
+defconfig: scripts/kconfig/conf
+	./scripts/kconfig/conf -d arch/$(ARCH)/Kconfig
 
 ###
 # Cleaning is done on three levels.
@@ -698,7 +698,7 @@
 clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook scripts
 
 $(addprefix _clean_,$(clean-dirs)):
-	$(MAKE) MAKEFILES= -rR -f scripts/Makefile.clean obj=$(patsubst _clean_%,%,$@)
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=$(patsubst _clean_%,%,$@)
 
 quiet_cmd_rmclean = RM  $$(CLEAN_FILES)
 cmd_rmclean	  = rm -f $(CLEAN_FILES)
@@ -798,7 +798,7 @@
 # Documentation targets
 # ---------------------------------------------------------------------------
 sgmldocs psdocs pdfdocs htmldocs: scripts
-	+@$(call descend,Documentation/DocBook,$@)
+	$(Q)$(MAKE) -f Documentation/DocBook/Makefile $@
 
 # Scripts to check various things for consistency
 # ---------------------------------------------------------------------------
@@ -833,12 +833,10 @@
 # FIXME Should go into a make.lib or something 
 # ===========================================================================
 
-echo_target = $@
-
 a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \
 	  $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
 
-quiet_cmd_as_s_S = CPP     $(echo_target)
+quiet_cmd_as_s_S = CPP     $@
 cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
 
 # read all saved command lines
@@ -885,13 +883,9 @@
 		mv -f $@.tmp $@; \
 	fi
 endef
-
 #	$(call descend,<dir>,<target>)
-#	Recursively call a sub-make in <dir> with target <target> 
+#	Recursively call a sub-make in <dir> with target <target>
 
-ifeq ($(KBUILD_VERBOSE),1)
-descend = echo '$(MAKE) -f $(1)/Makefile $(2)';
-endif
-descend += $(MAKE) -f $(1)/Makefile obj=$(1) $(2)
+descend = $(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2)
 
 FORCE:
diff -Nru a/Rules.make b/Rules.make
--- a/Rules.make	Wed Oct 30 16:44:27 2002
+++ b/Rules.make	Wed Oct 30 16:44:27 2002
@@ -1,625 +1 @@
 
-ifndef no-rules.make
-
-#
-# This file contains rules which are shared between multiple Makefiles.
-#
-
-# Some standard vars
-
-comma   := ,
-empty   :=
-space   := $(empty) $(empty)
-
-# Some bug traps
-# ---------------------------------------------------------------------------
-
-ifdef O_TARGET
-$(error kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.5. Please fix!)
-endif
-
-ifdef L_TARGET
-ifneq ($(L_TARGET),lib.a)
-$(warning kbuild: $(obj)/Makefile - L_TARGET := $(L_TARGET) target shall be renamed to lib.a. Please fix!)
-endif
-endif
-
-ifdef list-multi
-$(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.5. Please fix!)
-endif
-
-# Some paths for the Makefiles to use
-# ---------------------------------------------------------------------------
-
-# FIXME. For now, we leave it possible to use make -C or make -f
-# to do work in subdirs.
-
-ifndef obj
-obj = .
-CFLAGS := $(patsubst -I%,-I$(TOPDIR)/%,$(patsubst -I$(TOPDIR)/%,-I%,$(CFLAGS)))
-AFLAGS := $(patsubst -I%,-I$(TOPDIR)/%,$(patsubst -I$(TOPDIR)/%,-I%,$(AFLAGS)))
-endif
-
-# For use in the quiet output
-echo_target = $@
-
-# Usage:
-#
-# $(obj)/target.o                     : target.o in the build dir
-# $(src)/target.c                     : target.c in the source dir
-# $(objtree)/include/linux/version.h  : Some file relative to the build
-#					dir root
-# $(srctree)/include/linux/module.h   : Some file relative to the source
-#				        dir root
-#
-# $(obj) and $(src) can only be used in the section after
-# include $(TOPDIR)/Rules.make, i.e for generated files and the like.
-# Intentionally.
-#
-# We don't support separate source / object yet, so these are just
-# placeholders for now
-
-src := $(obj)
-
-# Figure out what we need to build from the various variables
-# ===========================================================================
-
-# When an object is listed to be built compiled-in and modular,
-# only build the compiled-in version
-
-obj-m := $(filter-out $(obj-y),$(obj-m))
-
-# Handle objects in subdirs
-# ---------------------------------------------------------------------------
-# o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o
-#   and add the directory to the list of dirs to descend into: $(subdir-y)
-# o if we encounter foo/ in $(obj-m), remove it from $(obj-m) 
-#   and add the directory to the list of dirs to descend into: $(subdir-m)
-
-__subdir-y	:= $(patsubst %/,%,$(filter %/, $(obj-y)))
-subdir-y	+= $(__subdir-y)
-__subdir-m	:= $(patsubst %/,%,$(filter %/, $(obj-m)))
-subdir-m	+= $(__subdir-m)
-__subdir-n	:= $(patsubst %/,%,$(filter %/, $(obj-n)))
-subdir-n	+= $(__subdir-n)
-__subdir-	:= $(patsubst %/,%,$(filter %/, $(obj-)))
-subdir-		+= $(__subdir-)
-obj-y		:= $(patsubst %/, %/built-in.o, $(obj-y))
-obj-m		:= $(filter-out %/, $(obj-m))
-
-# Subdirectories we need to descend into
-
-subdir-ym	:= $(sort $(subdir-y) $(subdir-m))
-subdir-ymn      := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
-
-# export.o is never a composite object, since $(export-objs) has a
-# fixed meaning (== objects which EXPORT_SYMBOL())
-__obj-y = $(filter-out export.o,$(obj-y))
-__obj-m = $(filter-out export.o,$(obj-m))
-
-# if $(foo-objs) exists, foo.o is a composite object 
-multi-used-y := $(sort $(foreach m,$(__obj-y), $(if $($(m:.o=-objs)), $(m))))
-multi-used-m := $(sort $(foreach m,$(__obj-m), $(if $($(m:.o=-objs)), $(m))))
-
-# Build list of the parts of our composite objects, our composite
-# objects depend on those (obviously)
-multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)))
-multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)))
-
-# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live
-# in the local directory
-subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
-
-# Replace multi-part objects by their individual parts, look at local dir only
-real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m))) $(EXTRA_TARGETS)
-real-objs-m := $(foreach m, $(obj-m), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m)))
-
-# Only build module versions for files which are selected to be built
-export-objs := $(filter $(export-objs),$(real-objs-y) $(real-objs-m))
-
-host-progs-single     := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m)))
-host-progs-multi      := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m)))
-host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs))
-
-# Add subdir path
-
-EXTRA_TARGETS	:= $(addprefix $(obj)/,$(EXTRA_TARGETS))
-obj-y		:= $(addprefix $(obj)/,$(obj-y))
-obj-m		:= $(addprefix $(obj)/,$(obj-m))
-export-objs	:= $(addprefix $(obj)/,$(export-objs))
-subdir-obj-y	:= $(addprefix $(obj)/,$(subdir-obj-y))
-real-objs-y	:= $(addprefix $(obj)/,$(real-objs-y))
-real-objs-m	:= $(addprefix $(obj)/,$(real-objs-m))
-multi-used-y	:= $(addprefix $(obj)/,$(multi-used-y))
-multi-used-m	:= $(addprefix $(obj)/,$(multi-used-m))
-multi-objs-y	:= $(addprefix $(obj)/,$(multi-objs-y))
-multi-objs-m	:= $(addprefix $(obj)/,$(multi-objs-m))
-subdir-ym	:= $(addprefix $(obj)/,$(subdir-ym))
-subdir-ymn	:= $(addprefix $(obj)/,$(subdir-ymn))
-clean-files	:= $(addprefix $(obj)/,$(clean-files))
-host-progs	:= $(addprefix $(obj)/,$(host-progs))
-host-progs-single     := $(addprefix $(obj)/,$(host-progs-single))
-host-progs-multi      := $(addprefix $(obj)/,$(host-progs-multi))
-host-progs-multi-objs := $(addprefix $(obj)/,$(host-progs-multi-objs))
-
-# The temporary file to save gcc -MD generated dependencies must not
-# contain a comma
-depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
-
-# We're called for one of four purposes:
-# o subdirclean: Delete intermidiate files in the current directory
-# o fastdep: build module version files (.ver) for $(export-objs) in
-#   the current directory
-# o modules_install: install the modules in the current directory
-# o build: When no target is given, first_rule is the default and
-#   will build the built-in and modular objects in this dir
-#   (or a subset thereof, depending on $(KBUILD_MODULES),$(KBUILD_BUILTIN)
-#   When targets are given directly (like foo.o), we just build these
-#   targets (That happens when someone does make some/dir/foo.[ois])
-
-ifeq ($(MAKECMDGOALS),subdirclean)
-
-__clean-files := $(wildcard $(EXTRA_TARGETS) $(host-progs) $(clean-files))
-
-subdirclean: $(subdir-ymn)
-ifneq ($(strip $(__clean-files) $(clean-rule)),)
-	rm -f $(__clean-files)
-	$(clean-rule)
-else
-	@:
-endif
-
-else
-ifeq ($(MAKECMDGOALS),fastdep)
-
-# ===========================================================================
-# Module versions
-# ===========================================================================
-
-ifeq ($(strip $(export-objs)),)
-
-# If we don't export any symbols in this dir, just descend
-# ---------------------------------------------------------------------------
-
-fastdep: $(subdir-ym)
-	@:
-
-else
-
-# This sets version suffixes on exported symbols
-# ---------------------------------------------------------------------------
-
-MODVERDIR := include/linux/modules
-
-#
-# Added the SMP separator to stop module accidents between uniprocessor
-# and SMP Intel boxes - AC - from bits by Michael Chastain
-#
-
-ifdef CONFIG_SMP
-	genksyms_smp_prefix := -p smp_
-else
-	genksyms_smp_prefix := 
-endif
-
-#	Don't include modversions.h, we're just about to generate it here.
-
-CFLAGS_MODULE := $(filter-out -include linux/modversions.h,$(CFLAGS_MODULE))
-
-$(addprefix $(MODVERDIR)/,$(real-objs-y:.o=.ver)): modkern_cflags := $(CFLAGS_KERNEL)
-$(addprefix $(MODVERDIR)/,$(real-objs-m:.o=.ver)): modkern_cflags := $(CFLAGS_MODULE)
-$(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver)): export_flags   := -D__GENKSYMS__
-
-c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
-	  $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \
-	  -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \
-	  $(export_flags) 
-
-# Our objects only depend on modversions.h, not on the individual .ver
-# files (fix-dep filters them), so touch modversions.h if any of the .ver
-# files changes
-
-quiet_cmd_cc_ver_c = MKVER   include/linux/modules/$*.ver
-cmd_cc_ver_c = $(CPP) $(c_flags) $< | $(GENKSYMS) $(genksyms_smp_prefix) \
-		 -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp
-
-# Okay, let's explain what's happening in rule_make_cc_ver_c:
-# o echo the command
-# o execute the command
-# o If the $(CPP) fails, we won't notice because it's output is piped
-#   to $(GENKSYMS) which does not fail. We recognize this case by
-#   looking if the generated $(depfile) exists, though.
-# o If the .ver file changed, touch modversions.h, which is our maker
-#   of any changed .ver files.
-# o Move command line and deps into their normal .*.cmd place.  
-
-define rule_cc_ver_c
-	$(if $($(quiet)cmd_cc_ver_c),echo '  $($(quiet)cmd_cc_ver_c)';) \
-	$(cmd_cc_ver_c); \
-	if [ ! -r $(depfile) ]; then exit 1; fi; \
-	scripts/fixdep $(depfile) $@ '$(cmd_cc_ver_c)' > $(@D)/.$(@F).tmp; \
-	rm -f $(depfile); \
-	if [ ! -r $@ ] || cmp -s $@ $@.tmp; then \
-	  touch include/linux/modversions.h; \
-	fi; \
-	mv -f $@.tmp $@
-	mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd
-endef
-
-$(MODVERDIR)/%.ver: %.c FORCE
-	@$(call if_changed_rule,cc_ver_c)
-
-targets := $(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver))
-
-fastdep: $(targets) $(subdir-ym)
-	@mkdir -p $(dir $(addprefix .tmp_export-objs/modules/,$(export-objs:.o=.ver)))
-	@touch $(addprefix .tmp_export-objs/modules/,$(export-objs:.o=.ver))
-
-endif # export-objs 
-
-else # ! fastdep
-ifeq ($(MAKECMDGOALS),modules_install)
-
-# ==========================================================================
-# Installing modules
-# ==========================================================================
-
-quiet_cmd_modules_install = INSTALL $(obj-m)
-cmd_modules_install = mkdir -p $(MODLIB)/kernel/$(obj); \
-		      cp $(obj-m) $(MODLIB)/kernel/$(obj)
-
-.PHONY: modules_install
-
-modules_install: $(subdir-ym)
-ifneq ($(obj-m),)
-	$(call cmd,modules_install)
-else
-	@:
-endif
-
-else # ! modules_install
-
-# ==========================================================================
-# Building
-# ==========================================================================
-
-# If a Makefile does not define a L_TARGET, link an object called "built-in.o"
-
-ifdef L_TARGET
-L_TARGET := $(obj)/$(L_TARGET)
-else
-O_TARGET := $(obj)/built-in.o
-endif
-
-first_rule: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
-	    $(if $(KBUILD_MODULES),$(obj-m)) \
-	    $(subdir-ym)
-	@:
-
-# Compile C sources (.c)
-# ---------------------------------------------------------------------------
-
-# Default is built-in, unless we know otherwise
-modkern_cflags := $(CFLAGS_KERNEL)
-
-$(real-objs-m)        : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.i)  : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE)
-
-$(export-objs)        : export_flags   := $(EXPORT_FLAGS)
-$(export-objs:.o=.i)  : export_flags   := $(EXPORT_FLAGS)
-$(export-objs:.o=.s)  : export_flags   := $(EXPORT_FLAGS)
-$(export-objs:.o=.lst): export_flags   := $(EXPORT_FLAGS)
-
-c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
-	  $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \
-	  -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \
-	  $(export_flags) 
-
-quiet_cmd_cc_s_c = CC      $(echo_target)
-cmd_cc_s_c       = $(CC) $(c_flags) -S -o $@ $< 
-
-%.s: %.c FORCE
-	$(call if_changed_dep,cc_s_c)
-
-quiet_cmd_cc_i_c = CPP     $(echo_target)
-cmd_cc_i_c       = $(CPP) $(c_flags)   -o $@ $<
-
-%.i: %.c FORCE
-	$(call if_changed_dep,cc_i_c)
-
-quiet_cmd_cc_o_c = CC      $(echo_target)
-cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
-
-%.o: %.c FORCE
-	$(call if_changed_dep,cc_o_c)
-
-quiet_cmd_cc_lst_c = MKLST   $(echo_target)
-cmd_cc_lst_c       = $(CC) $(c_flags) -g -c -o $*.o $< && sh scripts/makelst $*.o System.map $(OBJDUMP) > $@
-
-%.lst: %.c FORCE
-	$(call if_changed_dep,cc_lst_c)
-
-# Compile assembler sources (.S)
-# ---------------------------------------------------------------------------
-
-modkern_aflags := $(AFLAGS_KERNEL)
-
-$(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
-$(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
-
-a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \
-	  $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
-
-quiet_cmd_as_s_S = CPP     $(echo_target)
-cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
-
-%.s: %.S FORCE
-	$(call if_changed_dep,as_s_S)
-
-quiet_cmd_as_o_S = AS      $(echo_target)
-cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
-
-%.o: %.S FORCE
-	$(call if_changed_dep,as_o_S)
-
-targets += $(real-objs-y) $(real-objs-m) $(EXTRA_TARGETS) $(MAKECMDGOALS)
-
-# Build the compiled-in targets
-# ---------------------------------------------------------------------------
-
-# To build objects in subdirs, we need to descend into the directories
-$(sort $(subdir-obj-y)): $(subdir-ym) ;
-
-#
-# Rule to compile a set of .o files into one .o file
-#
-ifdef O_TARGET
-quiet_cmd_link_o_target = LD      $(echo_target)
-# If the list of objects to link is empty, just create an empty O_TARGET
-cmd_link_o_target = $(if $(strip $(obj-y)),\
-		      $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^),\
-		      rm -f $@; $(AR) rcs $@)
-
-$(O_TARGET): $(obj-y) FORCE
-	$(call if_changed,link_o_target)
-
-targets += $(O_TARGET)
-endif # O_TARGET
-
-#
-# Rule to compile a set of .o files into one .a file
-#
-ifdef L_TARGET
-quiet_cmd_link_l_target = AR      $(echo_target)
-cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(obj-y)
-
-$(L_TARGET): $(obj-y) FORCE
-	$(call if_changed,link_l_target)
-
-targets += $(L_TARGET)
-endif
-
-#
-# Rule to link composite objects
-#
-
-quiet_cmd_link_multi = LD      $(echo_target)
-cmd_link_multi = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(addprefix $(obj)/,$($(subst $(obj)/,,$(@:.o=-objs)))),$^)
-
-# We would rather have a list of rules like
-# 	foo.o: $(foo-objs)
-# but that's not so easy, so we rather make all composite objects depend
-# on the set of all their parts
-$(multi-used-y) : %.o: $(multi-objs-y) FORCE
-	$(call if_changed,link_multi)
-
-$(multi-used-m) : %.o: $(multi-objs-m) FORCE
-	$(call if_changed,link_multi)
-
-targets += $(multi-used-y) $(multi-used-m)
-
-# Compile programs on the host
-# ===========================================================================
-
-quiet_cmd_host_cc__c  = HOSTCC  $(echo_target)
-cmd_host_cc__c        = $(HOSTCC) -Wp,-MD,$(depfile) \
-			$(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
-			$(HOST_LOADLIBES) -o $@ $<
-
-$(host-progs-single): %: %.c FORCE
-	$(call if_changed_dep,host_cc__c)
-
-quiet_cmd_host_cc_o_c = HOSTCC  $(echo_target)
-cmd_host_cc_o_c       = $(HOSTCC) -Wp,-MD,$(depfile) \
-			$(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
-
-$(host-progs-multi-objs): %.o: %.c FORCE
-	$(call if_changed_dep,host_cc_o_c)
-
-quiet_cmd_host_cc__o  = HOSTLD  $(echo_target)
-cmd_host_cc__o        = $(HOSTCC) $(HOSTLDFLAGS) -o $@ $(addprefix $(obj)/,$($(subst $(obj)/,,$@)-objs)) \
-			$(HOST_LOADLIBES)
-
-$(host-progs-multi): %: $(host-progs-multi-objs) FORCE
-	$(call if_changed,host_cc__o)
-
-targets += $(host-progs-single) $(host-progs-multi-objs) $(host-progs-multi) 
-
-endif # ! subdirclean
-endif # ! modules_install
-endif # ! fastdep
-
-# Shipped files
-# ===========================================================================
-
-quiet_cmd_shipped = SHIPPED $(echo_target)
-cmd_shipped = cat $< > $@
-
-%:: %_shipped
-	$(call cmd,shipped)
-
-# Commands useful for building a boot image
-# ===========================================================================
-# 
-#	Use as following:
-#
-#	target: source(s) FORCE
-#		$(if_changed,ld/objcopy/gzip)
-#
-#	and add target to EXTRA_TARGETS so that we know we have to
-#	read in the saved command line
-
-# Linking
-# ---------------------------------------------------------------------------
-
-quiet_cmd_ld = LD      $(echo_target)
-cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
-	       $(filter-out FORCE,$^) -o $@ 
-
-# Objcopy
-# ---------------------------------------------------------------------------
-
-quiet_cmd_objcopy = OBJCOPY $(echo_target)
-cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@
-
-# Gzip
-# ---------------------------------------------------------------------------
-
-quiet_cmd_gzip = GZIP    $(echo_target)
-cmd_gzip = gzip -f -9 < $< > $@
-
-# ===========================================================================
-# Generic stuff
-# ===========================================================================
-
-# Descending
-# ---------------------------------------------------------------------------
-
-.PHONY: $(subdir-ymn)
-
-$(subdir-ymn):
-	+@$(call descend,$@,$(MAKECMDGOALS))
-
-# Add FORCE to the prequisites of a target to force it to be always rebuilt.
-# ---------------------------------------------------------------------------
-
-.PHONY: FORCE
-
-FORCE:
-
-#
-# This sets version suffixes on exported symbols
-# Separate the object into "normal" objects and "exporting" objects
-# Exporting objects are: all objects that define symbol tables
-#
-
-# ---------------------------------------------------------------------------
-# Check if command line has changed
-
-# Usage:
-# normally one uses rules like
-#
-# %.o: %.c
-# 	<command line>
-#
-# However, these only rebuild the target when the source has changed,
-# but not when e.g. the command or the flags on the command line changed.
-#
-# This extension allows to do the following:
-#
-# command = <command line>
-#
-# %.o: %.c dummy
-#	$(call if_changed,command)
-#
-# which will make sure to rebuild the target when either its prerequisites
-# change or the command line changes
-#
-# The magic works as follows:
-# The addition of dummy to the dependencies causes the rule for rebuilding
-# to be always executed. However, the if_changed function will generate
-# an empty command when 
-# o none of the prequesites changed (i.e $? is empty)
-# o the command line did not change (we compare the old command line,
-#   which is saved in .<target>.o, to the current command line using
-#   the two filter-out commands)
-
-# Read all saved command lines and dependencies for the $(targets) we
-# may be building above, using $(if_changed{,_dep}). As an
-# optimization, we don't need to read them if the target does not
-# exist, we will rebuild anyway in that case.
-
-targets := $(wildcard $(sort $(targets)))
-cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
-
-ifneq ($(cmd_files),)
-  include $(cmd_files)
-endif
-
-# function to only execute the passed command if necessary
-
-if_changed = $(if $(strip $? \
-		          $(filter-out $(cmd_$(1)),$(cmd_$@))\
-			  $(filter-out $(cmd_$@),$(cmd_$(1)))),\
-	@set -e; \
-	$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))';) \
-	$(cmd_$(1)); \
-	echo 'cmd_$@ := $(cmd_$(1))' > $(@D)/.$(@F).cmd)
-
-
-# execute the command and also postprocess generated .d dependencies
-# file
-
-if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
-		          $(filter-out $(cmd_$(1)),$(cmd_$@))\
-			  $(filter-out $(cmd_$@),$(cmd_$(1)))),\
-	@set -e; \
-	$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))';) \
-	$(cmd_$(1)); \
-	scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
-	rm -f $(depfile); \
-	mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
-
-# Usage: $(call if_changed_rule,foo)
-# will check if $(cmd_foo) changed, or any of the prequisites changed,
-# and if so will execute $(rule_foo)
-
-if_changed_rule = $(if $(strip $? \
-		               $(filter-out $(cmd_$(1)),$(cmd_$@))\
-			       $(filter-out $(cmd_$@),$(cmd_$(1)))),\
-			@set -e; \
-			mkdir -p $(dir $@); \
-			$(rule_$(1)))
-
-# If quiet is set, only print short version of command
-
-cmd = @$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
-
-# do_cmd is a shorthand used to support both compressed, verbose
-# and silent output in a single line.
-# Compared to cmd described avobe, do_cmd does no rely on any variables 
-# previously assigned a value.
-#
-# Usage $(call do_cmd,CMD   $@,cmd_to_execute bla bla)
-# Example:
-# $(call do_cmd,CP $@,cp -b $< $@)
-# make -s => nothing will be printed
-# make KBUILD_VERBOSE=1 => cp -b path/to/src.file path/to/dest.file
-# make KBUILD_VERBOSE=0 =>   CP path/to/dest.file
-define do_cmd
-        @$(if $(filter quiet_,$(quiet)), echo '  $(1)' &&,
-           $(if $(filter silent_,$(quiet)),,
-             echo "$(2)" &&)) \
-        $(2)
-endef
-
-#	$(call descend,<dir>,<target>)
-#	Recursively call a sub-make in <dir> with target <target> 
-
-ifeq ($(KBUILD_VERBOSE),1)
-descend = echo '$(MAKE) -f $(1)/Makefile $(2)';
-endif
-descend += $(MAKE) -f $(1)/Makefile obj=$(1) $(2)
-
-endif
diff -Nru a/arch/alpha/Config.help b/arch/alpha/Config.help
--- a/arch/alpha/Config.help	Wed Oct 30 16:44:22 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,627 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_ALPHA
-  The Alpha is a 64-bit general-purpose processor designed and
-  marketed by the Digital Equipment Corporation of blessed memory, now
-  Compaq.  Alpha Linux dates from 1995-1996 and was the first non-x86
-  port. The Alpha Linux project has a home page at
-  <http://www.alphalinux.org/>.
-
-CONFIG_MATHEMU
-  This option is required for IEEE compliant floating point arithmetic
-  on the Alpha. The only time you would ever not say Y is to say M in
-  order to debug the code. Say Y unless you know what you are doing.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_DISCONTIGMEM
-  Say Y to upport 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.
-
-CONFIG_NUMA
-  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
-  Access).  This option is for configuring high-end multiprocessor
-  server machines.  If in doubt, say N.
-
-CONFIG_ALPHA_GENERIC
-  This is the system type of your hardware.  A "generic" kernel will
-  run on any supported Alpha system. However, if you configure a
-  kernel for your specific system, it will be faster and smaller.
-
-  To find out what type of Alpha system you have, you may want to
-  check out the Linux/Alpha FAQ, accessible on the WWW from
-  <http://www.alphalinux.org/>. In summary:
-
-  Alcor/Alpha-XLT     AS 600
-  Alpha-XL            XL-233, XL-266
-  AlphaBook1          Alpha laptop
-  Avanti              AS 200, AS 205, AS 250, AS 255, AS 300, AS 400
-  Cabriolet           AlphaPC64, AlphaPCI64
-  DP264               DP264
-  EB164               EB164 21164 evaluation board
-  EB64+               EB64+ 21064 evaluation board
-  EB66                EB66 21066 evaluation board
-  EB66+               EB66+ 21066 evaluation board
-  Jensen              DECpc 150, DEC 2000 model 300,
-                      DEC 2000 model 500
-  LX164               AlphaPC164-LX
-  Miata               Personal Workstation 433a, 433au, 500a,
-                      500au, 600a, or 600au
-  Mikasa              AS 1000
-  Noname              AXPpci33, UDB (Multia)
-  Noritake            AS 1000A, AS 600A, AS 800
-  PC164               AlphaPC164
-  Rawhide             AS 1200, AS 4000, AS 4100
-  Ruffian             RPX164-2, AlphaPC164-UX, AlphaPC164-BX
-  SX164               AlphaPC164-SX
-  Sable               AS 2000, AS 2100
-  Shark		      DS 20L
-  Takara              Takara
-  Titan               Privateer
-  Wildfire            AlphaServer GS 40/80/160/320
-
-  If you don't know what to do, choose "generic".
-
-CONFIG_ALPHA_ALCOR
-  For systems using the Digital ALCOR chipset: 5 chips (4, 64-bit data
-  slices (Data Switch, DSW) - 208-pin PQFP and 1 control (Control, I/O
-  Address, CIA) - a 383 pin plastic PGA).  It provides a DRAM
-  controller (256-bit memory bus) and a PCI interface.  It also does
-  all the work required to support an external Bcache and to maintain
-  memory coherence when a PCI device DMAs into (or out of) memory.
-
-CONFIG_ALPHA_XL
-  XL-233 and XL-266-based Alpha systems.
-
-CONFIG_ALPHA_BOOK1
-  Dec AlphaBook1/Burns Alpha-based laptops.
-
-CONFIG_ALPHA_AVANTI
-  Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based
-  Alphas. Info at
-  <http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
-
-CONFIG_ALPHA_CABRIOLET
-  Cabriolet AlphaPC64, AlphaPCI64 systems.  Derived from EB64+ but now
-  baby-AT with Flash boot ROM, no on-board SCSI or Ethernet. 3 ISA
-  slots, 4 PCI slots (one pair are on a shared slot), uses plug-in
-  Bcache SIMMs.  Requires power supply with 3.3V output.
-
-CONFIG_ALPHA_DP264
-  Various 21264 systems with the tsunami core logic chipset.
-  API Networks: 264DP, UP2000(+), CS20;
-  Compaq: DS10(E,L), XP900, XP1000, DS20(E), ES40.
-
-CONFIG_ALPHA_EB164
-  EB164 21164 evaluation board from DEC.  Uses 21164 and ALCOR.  Has
-  ISA and PCI expansion (3 ISA slots, 2 64-bit PCI slots (one is
-  shared with an ISA slot) and 2 32-bit PCI slots.  Uses plus-in
-  Bcache SIMMs. I/O sub-system provides SuperI/O (2S, 1P, FD), KBD,
-  MOUSE (PS2 style), RTC/NVRAM.  Boot ROM is Flash.  PC-AT-sized
-  motherboard.  Requires power supply with 3.3V output.
-
-CONFIG_ALPHA_EB64P
-  Uses 21064 or 21064A and APECs.  Has ISA and PCI expansion (3 ISA,
-  2 PCI, one pair are on a shared slot). Supports 36-bit DRAM SIMs.
-  ISA bus generated by Intel SaturnI/O PCI-ISA bridge. On-board SCSI
-  (NCR 810 on PCI) Ethernet (Digital 21040), KBD, MOUSE (PS2 style),
-  SuperI/O (2S, 1P, FD), RTC/NVRAM. Boot ROM is EPROM.  PC-AT size.
-  Runs from standard PC power supply.
-
-CONFIG_ALPHA_EB66
-  A Digital DS group board.  Uses 21066 or 21066A.  I/O sub-system is
-  identical to EB64+.  Baby PC-AT size.  Runs from standard PC power
-  supply.  The EB66 schematic was published as a marketing poster
-  advertising the 21066 as "the first microprocessor in the world with
-  embedded PCI".
-
-CONFIG_ALPHA_EB66P
-  Later variant of the EB66 board.
-
-CONFIG_ALPHA_EIGER
-  Apparently an obscure OEM single-board computer based on the
-  Typhoon/Tsunami chipset family. Information on it is scanty.
-
-CONFIG_ALPHA_JENSEN
-  DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one
-  of the first-generation Alpha systems. A number of these systems
-  seem to be available on the second- hand market. The Jensen is a
-  floor-standing tower system which originally used a 150MHz 21064 It
-  used programmable logic to interface a 486 EISA I/O bridge to the
-  CPU.
-
-CONFIG_ALPHA_LX164
-  A technical overview of this board is available at
-  <http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>.
-
-CONFIG_ALPHA_MIATA
-  The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a,
-  or 600au).  There is an Installation HOWTO for this hardware at
-  <http://members.brabant.chello.nl/~s.vandereijk/miata.html>.
-
-CONFIG_ALPHA_MIKASA
-  AlphaServer 1000-based Alpha systems.
-
-CONFIG_ALPHA_NAUTILUS
-  Alpha systems based on the AMD 751 & ALI 1543C chipsets.
-
-CONFIG_ALPHA_NONAME
-  The AXPpci33 (aka NoName), is based on the EB66 (includes the Multia
-  UDB).  This design was produced by Digital's Technical OEM (TOEM)
-  group. It uses the 21066 processor running at 166MHz or 233MHz. It
-  is a baby-AT size, and runs from a standard PC power supply. It has
-  5 ISA slots and 3 PCI slots (one pair are a shared slot). There are
-  2 versions, with either PS/2 or large DIN connectors for the
-  keyboard.
-
-CONFIG_ALPHA_NORITAKE
-  AlphaServer 1000A, AlphaServer 600A, and AlphaServer 800-based
-  systems.
-
-CONFIG_ALPHA_RAWHIDE
-  AlphaServer 1200, AlphaServer 4000 and AlphaServer 4100 machines.
-  See HOWTO at
-  <http://www.alphalinux.org/docs/rawhide/4100_install.shtml>.
-
-CONFIG_ALPHA_RUFFIAN
-  Samsung APC164UX.  There is a page on known problems and workarounds
-  at <http://www.alphalinux.org/faq/FAQ-11.html>.
-
-CONFIG_ALPHA_SABLE
-  Digital AlphaServer 2000 and 2100-based systems.
-
-CONFIG_ALPHA_TAKARA
-  Alpha 11164-based OEM single-board computer.
-
-CONFIG_ALPHA_WILDFIRE
-  AlphaServer GS 40/80/160/320 SMP based on the EV67 core.
-
-CONFIG_ALPHA_PRIMO
-  Say Y if you have an AS 1000 5/xxx or an AS 1000A 5/xxx.
-
-CONFIG_ALPHA_GAMMA
-  Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx.
-
-CONFIG_ALPHA_EV67
-  Is this a machine based on the EV67 core?  If in doubt, select N here
-  and the machine will be treated as an EV6.
-
-CONFIG_ALPHA_SRM
-  There are two different types of booting firmware on Alphas: SRM,
-  which is command line driven, and ARC, which uses menus and arrow
-  keys. Details about the Linux/Alpha booting process are contained in
-  the Linux/Alpha FAQ, accessible on the WWW from
-  <http://www.alphalinux.org/>.
-
-  The usual way to load Linux on an Alpha machine is to use MILO
-  (a bootloader that lets you pass command line parameters to the
-  kernel just like lilo does for the x86 architecture) which can be
-  loaded either from ARC or can be installed directly as a permanent
-  firmware replacement from floppy (which requires changing a certain
-  jumper on the motherboard). If you want to do either of these, say N
-  here. If MILO doesn't work on your system (true for Jensen
-  motherboards), you can bypass it altogether and boot Linux directly
-  from an SRM console; say Y here in order to do that. Note that you
-  won't be able to boot from an IDE disk using SRM.
-
-  If unsure, say N.
-
-CONFIG_ALPHA_LEGACY_START_ADDRESS
-  The 2.4 kernel changed the kernel start address from 0x310000
-  to 0x810000 to make room for the Wildfire's larger SRM console.
-
-  If you're using aboot 0.7 or later, the bootloader will examine the
-  ELF headers to determine where to transfer control. Unfortunately,
-  most older bootloaders -- APB or MILO -- hardcoded the kernel start
-  address rather than examining the ELF headers, and the result is a
-  hard lockup.
-
-  Say Y if you have a broken bootloader.  Say N if you do not, or if
-  you wish to run on Wildfire.
-
-CONFIG_ALPHA_LARGE_VMALLOC
-  Process creation and other aspects of virtual memory management can
-  be streamlined if we restrict the kernel to one PGD for all vmalloc
-  allocations.  This equates to about 8GB.
-
-  Under normal circumstances, this is so far and above what is needed
-  as to be laughable.  However, there are certain applications (such
-  as benchmark-grade in-kernel web serving) that can make use of as
-  much vmalloc space as is available.
-
-  Say N unless you know you need gobs and gobs of vmalloc space.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_KCORE_AOUT
-  Not necessary unless you're using a very out-of-date binutils
-  version.  You probably want KCORE_ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-OSF/1 v4 readv/writev compatibility
-CONFIG_OSF4_COMPAT
-  Say Y if you are using OSF/1 binaries (like Netscape and Acrobat)
-  with v4 shared libraries freely available from Compaq. If you're
-  going to use shared libraries from Tru64 version 5.0 or later, say N.
-
-CONFIG_BINFMT_EM86
-  Say Y here if you want to be able to execute Linux/Intel ELF
-  binaries just like native Alpha binaries on your Alpha machine. For
-  this to work, you need to have the emulator /usr/bin/em86 in place.
-
-  You can get the same functionality by saying N here and saying Y to
-  "Kernel support for MISC binaries".
-
-  You may answer M to compile the emulation support as a module and
-  later load the module when you want to use a Linux/Intel binary. The
-  module will be called binfmt_em86.o. If unsure, say Y.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_SRM_ENV
-  If you enable this option, a subdirectory inside /proc called
-  /proc/srm_environment will give you access to the all important
-  SRM environment variables (those which have a name) and also
-  to all others (by their internal number).
-
-  SRM is something like a BIOS for Alpha machines. There are some
-  other such BIOSes, like AlphaBIOS, which this driver cannot
-  support (hey, that's not SRM!).
-
-  Despite the fact that this driver doesn't work on all Alphas (but
-  only on those which have SRM as their firmware), it's save to
-  build it even if your particular machine doesn't know about SRM
-  (or if you intend to compile a generic kernel). It will simply
-  not create those subdirectory in /proc (and give you some warning,
-  of course).
-
-  This driver is also available as a module and will be called
-  srm_env.o then.
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  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
-  memory.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_DEBUG_RWLOCK
-  If you say Y here then read-write lock processing will count how many
-  times it has tried to get the lock and issue an error message after
-  too many attempts.  If you suspect a rwlock problem or a kernel
-  hacker asks for this option then say Y.  Otherwise say N.
-
-CONFIG_DEBUG_SEMAPHORE
-  If you say Y here then semaphore processing will issue lots of
-  verbose debugging messages.  If you suspect a semaphore problem or a
-  kernel hacker asks for this option then say Y.  Otherwise say N.
-
diff -Nru a/arch/alpha/Kconfig b/arch/alpha/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/alpha/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1050 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config ALPHA
+	bool
+	default y
+	help
+	  The Alpha is a 64-bit general-purpose processor designed and
+	  marketed by the Digital Equipment Corporation of blessed memory, now
+	  Compaq.  Alpha Linux dates from 1995-1996 and was the first non-x86
+	  port. The Alpha Linux project has a home page at
+	  <http://www.alphalinux.org/>.
+
+config UID16
+	bool
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	default y
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "System setup"
+
+choice
+	prompt "Alpha system type"
+	default ALPHA_GENERIC
+
+config ALPHA_GENERIC
+	bool "Generic"
+	---help---
+	  This is the system type of your hardware.  A "generic" kernel will
+	  run on any supported Alpha system. However, if you configure a
+	  kernel for your specific system, it will be faster and smaller.
+
+	  To find out what type of Alpha system you have, you may want to
+	  check out the Linux/Alpha FAQ, accessible on the WWW from
+	  <http://www.alphalinux.org/>. In summary:
+
+	  Alcor/Alpha-XLT     AS 600
+	  Alpha-XL            XL-233, XL-266
+	  AlphaBook1          Alpha laptop
+	  Avanti              AS 200, AS 205, AS 250, AS 255, AS 300, AS 400
+	  Cabriolet           AlphaPC64, AlphaPCI64
+	  DP264               DP264
+	  EB164               EB164 21164 evaluation board
+	  EB64+               EB64+ 21064 evaluation board
+	  EB66                EB66 21066 evaluation board
+	  EB66+               EB66+ 21066 evaluation board
+	  Jensen              DECpc 150, DEC 2000 model 300,
+	  DEC 2000 model 500
+	  LX164               AlphaPC164-LX
+	  Miata               Personal Workstation 433a, 433au, 500a,
+	  500au, 600a, or 600au
+	  Mikasa              AS 1000
+	  Noname              AXPpci33, UDB (Multia)
+	  Noritake            AS 1000A, AS 600A, AS 800
+	  PC164               AlphaPC164
+	  Rawhide             AS 1200, AS 4000, AS 4100
+	  Ruffian             RPX164-2, AlphaPC164-UX, AlphaPC164-BX
+	  SX164               AlphaPC164-SX
+	  Sable               AS 2000, AS 2100
+	  Shark		      DS 20L
+	  Takara              Takara
+	  Titan               Privateer
+	  Wildfire            AlphaServer GS 40/80/160/320
+
+	  If you don't know what to do, choose "generic".
+
+config ALPHA_ALCOR
+	bool "Alcor/Alpha-XLT"
+	help
+	  For systems using the Digital ALCOR chipset: 5 chips (4, 64-bit data
+	  slices (Data Switch, DSW) - 208-pin PQFP and 1 control (Control, I/O
+	  Address, CIA) - a 383 pin plastic PGA).  It provides a DRAM
+	  controller (256-bit memory bus) and a PCI interface.  It also does
+	  all the work required to support an external Bcache and to maintain
+	  memory coherence when a PCI device DMAs into (or out of) memory.
+
+config ALPHA_XL
+	bool "Alpha-XL"
+	help
+	  XL-233 and XL-266-based Alpha systems.
+
+config ALPHA_BOOK1
+	bool "AlphaBook1"
+	help
+	  Dec AlphaBook1/Burns Alpha-based laptops.
+
+config ALPHA_AVANTI_CH
+	bool "Avanti"
+
+config ALPHA_CABRIOLET
+	bool "Cabriolet"
+	help
+	  Cabriolet AlphaPC64, AlphaPCI64 systems.  Derived from EB64+ but now
+	  baby-AT with Flash boot ROM, no on-board SCSI or Ethernet. 3 ISA
+	  slots, 4 PCI slots (one pair are on a shared slot), uses plug-in
+	  Bcache SIMMs.  Requires power supply with 3.3V output.
+
+config ALPHA_DP264
+	bool "DP264"
+	help
+	  Various 21264 systems with the tsunami core logic chipset.
+	  API Networks: 264DP, UP2000(+), CS20;
+	  Compaq: DS10(E,L), XP900, XP1000, DS20(E), ES40.
+
+config ALPHA_EB164
+	bool "EB164"
+	help
+	  EB164 21164 evaluation board from DEC.  Uses 21164 and ALCOR.  Has
+	  ISA and PCI expansion (3 ISA slots, 2 64-bit PCI slots (one is
+	  shared with an ISA slot) and 2 32-bit PCI slots.  Uses plus-in
+	  Bcache SIMMs. I/O sub-system provides SuperI/O (2S, 1P, FD), KBD,
+	  MOUSE (PS2 style), RTC/NVRAM.  Boot ROM is Flash.  PC-AT-sized
+	  motherboard.  Requires power supply with 3.3V output.
+
+config ALPHA_EB64P_CH
+	bool "EB64+"
+
+config ALPHA_EB66
+	bool "EB66"
+	help
+	  A Digital DS group board.  Uses 21066 or 21066A.  I/O sub-system is
+	  identical to EB64+.  Baby PC-AT size.  Runs from standard PC power
+	  supply.  The EB66 schematic was published as a marketing poster
+	  advertising the 21066 as "the first microprocessor in the world with
+	  embedded PCI".
+
+config ALPHA_EB66P
+	bool "EB66+"
+	help
+	  Later variant of the EB66 board.
+
+config ALPHA_EIGER
+	bool "Eiger"
+	help
+	  Apparently an obscure OEM single-board computer based on the
+	  Typhoon/Tsunami chipset family. Information on it is scanty.
+
+config ALPHA_JENSEN
+	bool "Jensen"
+	help
+	  DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one
+	  of the first-generation Alpha systems. A number of these systems
+	  seem to be available on the second- hand market. The Jensen is a
+	  floor-standing tower system which originally used a 150MHz 21064 It
+	  used programmable logic to interface a 486 EISA I/O bridge to the
+	  CPU.
+
+config ALPHA_LX164
+	bool "LX164"
+	help
+	  A technical overview of this board is available at
+	  <http://www.unix-ag.org/Linux-Alpha/Architectures/LX164.html>.
+
+config ALPHA_MIATA
+	bool "Miata"
+	help
+	  The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a,
+	  or 600au).  There is an Installation HOWTO for this hardware at
+	  <http://members.brabant.chello.nl/~s.vandereijk/miata.html>.
+
+config ALPHA_MIKASA
+	bool "Mikasa"
+	help
+	  AlphaServer 1000-based Alpha systems.
+
+config ALPHA_NAUTILUS
+	bool "Nautilus"
+	help
+	  Alpha systems based on the AMD 751 & ALI 1543C chipsets.
+
+config ALPHA_NONAME_CH
+	bool "Noname"
+
+config ALPHA_NORITAKE
+	bool "Noritake"
+	help
+	  AlphaServer 1000A, AlphaServer 600A, and AlphaServer 800-based
+	  systems.
+
+config ALPHA_PC164
+	bool "PC164"
+
+config ALPHA_P2K
+	bool "Platform2000"
+
+config ALPHA_RAWHIDE
+	bool "Rawhide"
+	help
+	  AlphaServer 1200, AlphaServer 4000 and AlphaServer 4100 machines.
+	  See HOWTO at
+	  <http://www.alphalinux.org/docs/rawhide/4100_install.shtml>.
+
+config ALPHA_RUFFIAN
+	bool "Ruffian"
+	help
+	  Samsung APC164UX.  There is a page on known problems and workarounds
+	  at <http://www.alphalinux.org/faq/FAQ-11.html>.
+
+config ALPHA_RX164
+	bool "RX164"
+
+config ALPHA_SX164
+	bool "SX164"
+
+config ALPHA_SABLE
+	bool "Sable"
+	help
+	  Digital AlphaServer 2000 and 2100-based systems.
+
+config ALPHA_SHARK
+	bool "Shark"
+
+config ALPHA_TAKARA
+	bool "Takara"
+	help
+	  Alpha 11164-based OEM single-board computer.
+
+config ALPHA_TITAN
+	bool "Titan"
+
+config ALPHA_WILDFIRE
+	bool "Wildfire"
+	help
+	  AlphaServer GS 40/80/160/320 SMP based on the EV67 core.
+
+endchoice
+
+# clear all implied options (don't want default values for those):
+# Most of these machines have ISA slots; not exactly sure which don't,
+# and this doesn't activate hordes of code, so do it always.
+config ISA
+	bool
+	default y
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	default y
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config SBUS
+	bool
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config PCI
+	bool
+	depends on !ALPHA_JENSEN
+	default y
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config ALPHA_NONAME
+	bool
+	depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
+	default y
+	help
+	  The AXPpci33 (aka NoName), is based on the EB66 (includes the Multia
+	  UDB).  This design was produced by Digital's Technical OEM (TOEM)
+	  group. It uses the 21066 processor running at 166MHz or 233MHz. It
+	  is a baby-AT size, and runs from a standard PC power supply. It has
+	  5 ISA slots and 3 PCI slots (one pair are a shared slot). There are
+	  2 versions, with either PS/2 or large DIN connectors for the
+	  keyboard.
+
+config ALPHA_EV4
+	bool
+	depends on ALPHA_JENSEN || ALPHA_SABLE && !ALPHA_GAMMA || ALPHA_NORITAKE && !ALPHA_PRIMO || ALPHA_MIKASA && !ALPHA_PRIMO || ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P_CH || ALPHA_XL || ALPHA_NONAME || ALPHA_EB66 || ALPHA_EB66P || ALPHA_P2K
+	default y
+
+config ALPHA_LCA
+	bool
+	depends on ALPHA_NONAME || ALPHA_EB66 || ALPHA_EB66P || ALPHA_P2K
+	default y
+
+config ALPHA_APECS
+	bool
+	depends on !ALPHA_PRIMO && (ALPHA_NORITAKE || ALPHA_MIKASA) || ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P_CH || ALPHA_XL
+	default y
+
+config ALPHA_EB64P
+	bool
+	depends on ALPHA_CABRIOLET || ALPHA_EB64P_CH
+	default y
+	help
+	  Uses 21064 or 21064A and APECs.  Has ISA and PCI expansion (3 ISA,
+	  2 PCI, one pair are on a shared slot). Supports 36-bit DRAM SIMs.
+	  ISA bus generated by Intel SaturnI/O PCI-ISA bridge. On-board SCSI
+	  (NCR 810 on PCI) Ethernet (Digital 21040), KBD, MOUSE (PS2 style),
+	  SuperI/O (2S, 1P, FD), RTC/NVRAM. Boot ROM is EPROM.  PC-AT size.
+	  Runs from standard PC power supply.
+
+config ALPHA_EV5
+	bool
+	depends on ALPHA_RX164 || ALPHA_RAWHIDE || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_SABLE && ALPHA_GAMMA || ALPHA_NORITAKE && ALPHA_PRIMO || ALPHA_MIKASA && ALPHA_PRIMO || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR
+	default y
+
+config ALPHA_CIA
+	bool
+	depends on ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_NORITAKE && ALPHA_PRIMO || ALPHA_MIKASA && ALPHA_PRIMO || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR
+	default y
+
+config ALPHA_EV56
+	bool "EV56 CPU (speed >= 366MHz)?" if ALPHA_ALCOR
+	default y if ALPHA_RX164 || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN || ALPHA_PC164 || ALPHA_TAKARA
+
+config ALPHA_EV56
+	prompt "EV56 CPU (speed >= 333MHz)?"
+	depends on ALPHA_NORITAKE && ALPHA_PRIMO
+
+config ALPHA_EV56
+	prompt "EV56 CPU (speed >= 400MHz)?"
+	depends on ALPHA_RAWHIDE
+
+config ALPHA_PRIMO
+	bool "EV5 CPU daughtercard (model 5/xxx)?"
+	depends on ALPHA_NORITAKE || ALPHA_MIKASA
+	help
+	  Say Y if you have an AS 1000 5/xxx or an AS 1000A 5/xxx.
+
+config ALPHA_GAMMA
+	bool "EV5 CPU(s) (model 5/xxx)?"
+	depends on ALPHA_SABLE
+	help
+	  Say Y if you have an AS 2000 5/xxx or an AS 2100 5/xxx.
+
+config ALPHA_T2
+	bool
+	depends on ALPHA_SABLE
+	default y
+
+config ALPHA_PYXIS
+	bool
+	depends on ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_RUFFIAN
+	default y
+
+config ALPHA_EV6
+	bool
+	depends on ALPHA_NAUTILUS || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_DP264 || ALPHA_EIGER
+	default y
+
+config ALPHA_TSUNAMI
+	bool
+	depends on ALPHA_SHARK || ALPHA_DP264 || ALPHA_EIGER
+	default y
+
+config ALPHA_EV67
+	bool "EV67 (or later) CPU (speed > 600MHz)?" if ALPHA_DP264 || ALPHA_EIGER
+	default y if ALPHA_NAUTILUS || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK
+	help
+	  Is this a machine based on the EV67 core?  If in doubt, select N here
+	  and the machine will be treated as an EV6.
+
+config ALPHA_MCPCIA
+	bool
+	depends on ALPHA_RAWHIDE
+	default y
+
+config ALPHA_POLARIS
+	bool
+	depends on ALPHA_RX164
+	default y
+
+config ALPHA_IRONGATE
+	bool
+	depends on ALPHA_NAUTILUS
+	default y
+
+config ALPHA_SRM
+	bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
+	default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK
+	---help---
+	  There are two different types of booting firmware on Alphas: SRM,
+	  which is command line driven, and ARC, which uses menus and arrow
+	  keys. Details about the Linux/Alpha booting process are contained in
+	  the Linux/Alpha FAQ, accessible on the WWW from
+	  <http://www.alphalinux.org/>.
+
+	  The usual way to load Linux on an Alpha machine is to use MILO
+	  (a bootloader that lets you pass command line parameters to the
+	  kernel just like lilo does for the x86 architecture) which can be
+	  loaded either from ARC or can be installed directly as a permanent
+	  firmware replacement from floppy (which requires changing a certain
+	  jumper on the motherboard). If you want to do either of these, say N
+	  here. If MILO doesn't work on your system (true for Jensen
+	  motherboards), you can bypass it altogether and boot Linux directly
+	  from an SRM console; say Y here in order to do that. Note that you
+	  won't be able to boot from an IDE disk using SRM.
+
+	  If unsure, say N.
+
+config ALPHA_EISA
+	bool
+	depends on ALPHA_ALCOR || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_NORITAKE || ALPHA_RAWHIDE
+	default y
+
+config ALPHA_AVANTI
+	bool
+	depends on ALPHA_XL || ALPHA_AVANTI_CH
+	default y
+	help
+	  Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based
+	  Alphas. Info at
+	  <http://www.unix-ag.org/Linux-Alpha/Architectures/Avanti.html>.
+
+config ALPHA_BROKEN_IRQ_MASK
+	bool
+	depends on ALPHA_GENERIC || ALPHA_PC164
+	default y
+
+config SMP
+	bool "Symmetric multi-processing support"
+	depends on ALPHA_SABLE || ALPHA_RAWHIDE || ALPHA_DP264 || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_GENERIC || ALPHA_SHARK
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config HAVE_DEC_LOCK
+	bool
+	depends on SMP
+	default y
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-64)"
+	depends on SMP
+	default "64"
+
+config DISCONTIGMEM
+	bool "Discontiguous Memory Support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  Say Y to upport 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.
+
+config NUMA
+	bool "NUMA Support (EXPERIMENTAL)"
+	depends on DISCONTIGMEM
+	help
+	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
+	  Access).  This option is for configuring high-end multiprocessor
+	  server machines.  If in doubt, say N.
+
+# LARGE_VMALLOC is racy, if you *really* need it then fix it first
+config ALPHA_LARGE_VMALLOC
+	bool
+	---help---
+	  Process creation and other aspects of virtual memory management can
+	  be streamlined if we restrict the kernel to one PGD for all vmalloc
+	  allocations.  This equates to about 8GB.
+
+	  Under normal circumstances, this is so far and above what is needed
+	  as to be laughable.  However, there are certain applications (such
+	  as benchmark-grade in-kernel web serving) that can make use of as
+	  much vmalloc space as is available.
+
+	  Say N unless you know you need gobs and gobs of vmalloc space.
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+choice
+	prompt "Kernel core (/proc/kcore) format"
+	depends on PROC_FS
+	default KCORE_ELF
+
+config KCORE_ELF
+	bool "ELF"
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config KCORE_AOUT
+	bool "A.OUT"
+	help
+	  Not necessary unless you're using a very out-of-date binutils
+	  version.  You probably want KCORE_ELF.
+
+endchoice
+
+config SRM_ENV
+	tristate "SRM environment through procfs"
+	depends on PROC_FS
+	---help---
+	  If you enable this option, a subdirectory inside /proc called
+	  /proc/srm_environment will give you access to the all important
+	  SRM environment variables (those which have a name) and also
+	  to all others (by their internal number).
+
+	  SRM is something like a BIOS for Alpha machines. There are some
+	  other such BIOSes, like AlphaBIOS, which this driver cannot
+	  support (hey, that's not SRM!).
+
+	  Despite the fact that this driver doesn't work on all Alphas (but
+	  only on those which have SRM as their firmware), it's save to
+	  build it even if your particular machine doesn't know about SRM
+	  (or if you intend to compile a generic kernel). It will simply
+	  not create those subdirectory in /proc (and give you some warning,
+	  of course).
+
+	  This driver is also available as a module and will be called
+	  srm_env.o then.
+
+config BINFMT_AOUT
+	tristate "Kernel support for a.out (ECOFF) binaries"
+	---help---
+	  A.out (Assembler.OUTput) is a set of formats for libraries and
+	  executables used in the earliest versions of UNIX. Linux used the
+	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
+	  ELF format.
+
+	  As more and more programs are converted to ELF, the use for a.out
+	  will gradually diminish. If you disable this option it will reduce
+	  your kernel by one page. This is not much and by itself does not
+	  warrant removing support. However its removal is a good idea if you
+	  wish to ensure that absolutely none of your programs will use this
+	  older executable format. If you don't know what to answer at this
+	  point then answer Y. If someone told you "You need a kernel with
+	  QMAGIC support" then you'll have to say Y here. You may answer M to
+	  compile a.out support as a module and later load the module when you
+	  want to use a program or library in a.out format. The module will be
+	  called binfmt_aout.o. Saying M or N here is dangerous though,
+	  because some crucial programs on your system might still be in A.OUT
+	  format.
+
+config OSF4_COMPAT
+	bool "OSF/1 v4 readv/writev compatibility"
+	depends on BINFMT_AOUT
+	help
+	  Say Y if you are using OSF/1 binaries (like Netscape and Acrobat)
+	  with v4 shared libraries freely available from Compaq. If you're
+	  going to use shared libraries from Tru64 version 5.0 or later, say N.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config BINFMT_EM86
+	tristate "Kernel support for Linux/Intel ELF binaries"
+	---help---
+	  Say Y here if you want to be able to execute Linux/Intel ELF
+	  binaries just like native Alpha binaries on your Alpha machine. For
+	  this to work, you need to have the emulator /usr/bin/em86 in place.
+
+	  You can get the same functionality by saying N here and saying Y to
+	  "Kernel support for MISC binaries".
+
+	  You may answer M to compile the emulation support as a module and
+	  later load the module when you want to use a Linux/Intel binary. The
+	  module will be called binfmt_em86.o. If unsure, say Y.
+
+source "drivers/parport/Kconfig"
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+if PCI
+source "drivers/message/fusion/Kconfig"
+endif
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+#  if [ "$CONFIG_PCI" = "y" -a "$CONFIG_VGA_CONSOLE" = "y" ]; then
+#    bool '   Allow VGA on any bus?' CONFIG_VGA_HOSE
+#    if [ "$CONFIG_VGA_HOSE" = "y" ]; then
+#      define_bool CONFIG_DUMMY_CONSOLE y
+#    fi
+#  fi
+source "drivers/video/Kconfig"
+
+config PCI_CONSOLE
+	bool
+	depends on FB
+	default y
+
+endmenu
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "Kernel hacking"
+
+config ALPHA_LEGACY_START_ADDRESS
+	bool "Legacy kernel start address"
+	---help---
+	  The 2.4 kernel changed the kernel start address from 0x310000
+	  to 0x810000 to make room for the Wildfire's larger SRM console.
+
+	  If you're using aboot 0.7 or later, the bootloader will examine the
+	  ELF headers to determine where to transfer control. Unfortunately,
+	  most older bootloaders -- APB or MILO -- hardcoded the kernel start
+	  address rather than examining the ELF headers, and the result is a
+	  hard lockup.
+
+	  Say Y if you have a broken bootloader.  Say N if you do not, or if
+	  you wish to run on Wildfire.
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config MATHEMU
+	tristate "Kernel FP software completion" if DEBUG_KERNEL
+	default y if !DEBUG_KERNEL
+	help
+	  This option is required for IEEE compliant floating point arithmetic
+	  on the Alpha. The only time you would ever not say Y is to say M in
+	  order to debug the code. Say Y unless you know what you are doing.
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	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
+	  memory.
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and build SMP to catch missing spinlock initialization
+	  and certain other kinds of spinlock errors commonly made.  This is
+	  best used in conjunction with the NMI watchdog so that spinlock
+	  deadlocks are also debuggable.
+
+config DEBUG_RWLOCK
+	bool "Read-write spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here then read-write lock processing will count how many
+	  times it has tried to get the lock and issue an error message after
+	  too many attempts.  If you suspect a rwlock problem or a kernel
+	  hacker asks for this option then say Y.  Otherwise say N.
+
+config DEBUG_SEMAPHORE
+	bool "Semaphore debugging"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here then semaphore processing will issue lots of
+	  verbose debugging messages.  If you suspect a semaphore problem or a
+	  kernel hacker asks for this option then say Y.  Otherwise say N.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/alpha/config.in b/arch/alpha/config.in
--- a/arch/alpha/config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,401 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-
-define_bool CONFIG_ALPHA y
-define_bool CONFIG_UID16 n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'System setup'
-
-choice 'Alpha system type' \
-	"Generic		CONFIG_ALPHA_GENERIC		\
-	 Alcor/Alpha-XLT	CONFIG_ALPHA_ALCOR		\
-	 Alpha-XL		CONFIG_ALPHA_XL			\
-	 AlphaBook1		CONFIG_ALPHA_BOOK1		\
-	 Avanti			CONFIG_ALPHA_AVANTI		\
-	 Cabriolet		CONFIG_ALPHA_CABRIOLET		\
-	 DP264			CONFIG_ALPHA_DP264		\
-	 EB164			CONFIG_ALPHA_EB164		\
-	 EB64+			CONFIG_ALPHA_EB64P		\
-	 EB66			CONFIG_ALPHA_EB66		\
-	 EB66+			CONFIG_ALPHA_EB66P		\
-	 Eiger			CONFIG_ALPHA_EIGER		\
-	 Jensen			CONFIG_ALPHA_JENSEN		\
-	 LX164			CONFIG_ALPHA_LX164		\
-	 Miata			CONFIG_ALPHA_MIATA		\
-	 Mikasa			CONFIG_ALPHA_MIKASA		\
-	 Nautilus		CONFIG_ALPHA_NAUTILUS		\
-	 Noname			CONFIG_ALPHA_NONAME		\
-	 Noritake		CONFIG_ALPHA_NORITAKE		\
-	 PC164			CONFIG_ALPHA_PC164		\
-	 Platform2000		CONFIG_ALPHA_P2K		\
-	 Rawhide		CONFIG_ALPHA_RAWHIDE		\
-	 Ruffian		CONFIG_ALPHA_RUFFIAN		\
-	 RX164			CONFIG_ALPHA_RX164		\
-	 SX164			CONFIG_ALPHA_SX164		\
-	 Sable			CONFIG_ALPHA_SABLE		\
-	 Shark			CONFIG_ALPHA_SHARK		\
-	 Takara			CONFIG_ALPHA_TAKARA		\
-	 Titan			CONFIG_ALPHA_TITAN		\
-	 Wildfire		CONFIG_ALPHA_WILDFIRE" Generic
-
-# clear all implied options (don't want default values for those):
-unset CONFIG_ALPHA_EV4 CONFIG_ALPHA_EV5 CONFIG_ALPHA_EV6 CONFIG_ALPHA_EV67
-unset CONFIG_ALPHA_EISA
-unset CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS CONFIG_ALPHA_CIA
-unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS CONFIG_ALPHA_POLARIS
-unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA
-unset CONFIG_ALPHA_IRONGATE
-unset CONFIG_ALPHA_BROKEN_IRQ_MASK
-
-# Most of these machines have ISA slots; not exactly sure which don't,
-# and this doesn't activate hordes of code, so do it always.
-define_bool CONFIG_ISA y
-define_bool CONFIG_EISA y
-define_bool CONFIG_SBUS n
-define_bool CONFIG_MCA n
-
-if [ "$CONFIG_ALPHA_JENSEN" = "y" ]
-then
-	define_bool CONFIG_PCI n
-else
-	define_bool CONFIG_PCI y
-fi
-
-if [ "$CONFIG_ALPHA_BOOK1" = "y" ]
-then
-	define_bool CONFIG_ALPHA_NONAME y
-fi
-if [ "$CONFIG_ALPHA_NONAME" = "y" -o "$CONFIG_ALPHA_EB66" = "y" \
-	-o "$CONFIG_ALPHA_EB66P" = "y" -o "$CONFIG_ALPHA_P2K" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV4 y
-	define_bool CONFIG_ALPHA_LCA y
-fi
-if [ "$CONFIG_ALPHA_CABRIOLET" = "y" -o "$CONFIG_ALPHA_AVANTI" = "y" \
-	-o "$CONFIG_ALPHA_EB64P" = "y" -o "$CONFIG_ALPHA_XL" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV4 y
-	define_bool CONFIG_ALPHA_APECS y
-fi
-if [ "$CONFIG_ALPHA_CABRIOLET" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EB64P y
-fi
-if [ "$CONFIG_ALPHA_ALCOR" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV5 y
-	define_bool CONFIG_ALPHA_CIA y
-	bool 'EV56 CPU (speed >= 366MHz)?' CONFIG_ALPHA_EV56
-fi
-if [ "$CONFIG_ALPHA_EB164" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV5 y
-	define_bool CONFIG_ALPHA_CIA y
-fi
-if [ "$CONFIG_ALPHA_PC164" = "y" -o "$CONFIG_ALPHA_TAKARA" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV5 y
-	define_bool CONFIG_ALPHA_EV56 y
-	define_bool CONFIG_ALPHA_CIA y
-fi
-if [ "$CONFIG_ALPHA_MIKASA" = "y" ]
-then
-	bool 'EV5 CPU daughtercard (model 5/xxx)?' CONFIG_ALPHA_PRIMO
-	if [ "$CONFIG_ALPHA_PRIMO" = "y" ]
-	then
-		define_bool CONFIG_ALPHA_EV5 y
-		define_bool CONFIG_ALPHA_CIA y
-	else
-		define_bool CONFIG_ALPHA_EV4 y
-		define_bool CONFIG_ALPHA_APECS y
-	fi
-fi
-if [ "$CONFIG_ALPHA_NORITAKE" = "y" ]
-then
-	bool 'EV5 CPU daughtercard (model 5/xxx)?' CONFIG_ALPHA_PRIMO
-	if [ "$CONFIG_ALPHA_PRIMO" = "y" ]
-	then
-		define_bool CONFIG_ALPHA_EV5 y
-		define_bool CONFIG_ALPHA_CIA y
-		bool 'EV56 CPU (speed >= 333MHz)?' CONFIG_ALPHA_EV56
-	else
-		define_bool CONFIG_ALPHA_EV4 y
-		define_bool CONFIG_ALPHA_APECS y
-	fi
-fi
-if [ "$CONFIG_ALPHA_SABLE" = "y" ]
-then
-	bool 'EV5 CPU(s) (model 5/xxx)?' CONFIG_ALPHA_GAMMA
-	if [ "$CONFIG_ALPHA_GAMMA" = "y" ]
-	then
-		define_bool CONFIG_ALPHA_EV5 y
-	else
-		define_bool CONFIG_ALPHA_EV4 y
-	fi
-	define_bool CONFIG_ALPHA_T2 y
-fi
-if [ "$CONFIG_ALPHA_MIATA" = "y" -o "$CONFIG_ALPHA_LX164" = "y" \
-	-o "$CONFIG_ALPHA_SX164" = "y" -o "$CONFIG_ALPHA_RUFFIAN" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV5 y
-	define_bool CONFIG_ALPHA_EV56 y
-	define_bool CONFIG_ALPHA_CIA y
-	define_bool CONFIG_ALPHA_PYXIS y
-fi
-if [ "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_EIGER" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV6 y
-	define_bool CONFIG_ALPHA_TSUNAMI y
-	bool 'EV67 (or later) CPU (speed > 600MHz)?' CONFIG_ALPHA_EV67
-fi
-if [ "$CONFIG_ALPHA_SHARK" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV6 y
-	define_bool CONFIG_ALPHA_EV67 y
-	define_bool CONFIG_ALPHA_TSUNAMI y
-fi
-if [ "$CONFIG_ALPHA_WILDFIRE" = "y" -o "$CONFIG_ALPHA_TITAN" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV6 y
-	define_bool CONFIG_ALPHA_EV67 y
-fi
-if [ "$CONFIG_ALPHA_RAWHIDE" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV5 y
-	define_bool CONFIG_ALPHA_MCPCIA y
-	bool 'EV56 CPU (speed >= 400MHz)?' CONFIG_ALPHA_EV56
-fi
-if [ "$CONFIG_ALPHA_RX164" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV5 y
-	define_bool CONFIG_ALPHA_EV56 y
-	define_bool CONFIG_ALPHA_POLARIS y
-fi
-if [ "$CONFIG_ALPHA_JENSEN" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EV4 y
-fi
-if [ "$CONFIG_ALPHA_NAUTILUS" = "y" ]
-then
-	define_bool CONFIG_ALPHA_IRONGATE y
-	define_bool CONFIG_ALPHA_EV6 y
-	define_bool CONFIG_ALPHA_EV67 y
-fi
-
-if [ "$CONFIG_ALPHA_JENSEN" = "y" -o "$CONFIG_ALPHA_MIKASA" = "y" \
-	-o "$CONFIG_ALPHA_SABLE" = "y" -o "$CONFIG_ALPHA_NORITAKE" = "y" \
-	-o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" \
-	-o "$CONFIG_ALPHA_EIGER" = "y" -o "$CONFIG_ALPHA_WILDFIRE" = "y" \
-	-o "$CONFIG_ALPHA_TITAN" = "y" -o "$CONFIG_ALPHA_SHARK" = "y" ]
-then
-	define_bool CONFIG_ALPHA_SRM y
-fi
-if [ "$CONFIG_ALPHA_CABRIOLET" = "y" -o "$CONFIG_ALPHA_AVANTI" = "y" \
-	-o "$CONFIG_ALPHA_EB64P" = "y" 	-o "$CONFIG_ALPHA_PC164" = "y" \
-	-o "$CONFIG_ALPHA_TAKARA" = "y" -o "$CONFIG_ALPHA_EB164" = "y" \
-	-o "$CONFIG_ALPHA_ALCOR" = "y"  -o "$CONFIG_ALPHA_MIATA" = "y" \
-	-o "$CONFIG_ALPHA_LX164" = "y"  -o "$CONFIG_ALPHA_SX164" = "y" \
-	-o "$CONFIG_ALPHA_NAUTILUS" = "y" -o "$CONFIG_ALPHA_NONAME" = "y" ]
-then
-  bool 'Use SRM as bootloader' CONFIG_ALPHA_SRM
-fi
-
-if [ "$CONFIG_ALPHA_ALCOR" = "y" -o "$CONFIG_ALPHA_MIKASA" = "y" \
-	-o "$CONFIG_ALPHA_SABLE" = "y" -o "$CONFIG_ALPHA_NORITAKE" = "y" \
-	-o "$CONFIG_ALPHA_RAWHIDE" = "y" ]
-then
-	define_bool CONFIG_ALPHA_EISA y
-fi
-if [ "$CONFIG_ALPHA_XL" = "y" ]
-then
-	define_bool CONFIG_ALPHA_AVANTI y
-fi
-if [ "$CONFIG_ALPHA_GENERIC" = "y" -o "$CONFIG_ALPHA_PC164" = "y" ]
-then
-	define_bool CONFIG_ALPHA_BROKEN_IRQ_MASK y
-fi
-
-if [ "$CONFIG_ALPHA_SABLE" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" \
-	-o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_WILDFIRE" = "y" \
-	-o "$CONFIG_ALPHA_TITAN" = "y" -o "$CONFIG_ALPHA_GENERIC" = "y" \
-	-o "$CONFIG_ALPHA_SHARK" = "y" ]
-then
-	bool 'Symmetric multi-processing support' CONFIG_SMP
-fi
-
-if [ "$CONFIG_SMP" = "y" ]; then
-   define_bool CONFIG_HAVE_DEC_LOCK y
-   int  'Maximum number of CPUs (2-64)' CONFIG_NR_CPUS 64
-fi
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool 'Discontiguous Memory Support (EXPERIMENTAL)' CONFIG_DISCONTIGMEM
-   if [ "$CONFIG_DISCONTIGMEM" = "y" ]; then
-      bool ' NUMA Support (EXPERIMENTAL)' CONFIG_NUMA
-   fi
-fi
-
-# LARGE_VMALLOC is racy, if you *really* need it then fix it first
-define_bool CONFIG_ALPHA_LARGE_VMALLOC n
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
- 
-if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-   source drivers/pcmcia/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   choice 'Kernel core (/proc/kcore) format' \
-	"ELF		CONFIG_KCORE_ELF	\
-	 A.OUT		CONFIG_KCORE_AOUT" ELF
-fi
-if [ "$CONFIG_PROC_FS" != "n" ]; then
-   tristate 'SRM environment through procfs' CONFIG_SRM_ENV
-fi
- 
-tristate 'Kernel support for a.out (ECOFF) binaries' CONFIG_BINFMT_AOUT
-if [ "$CONFIG_BINFMT_AOUT" != "n" ]; then
-	bool '  OSF/1 v4 readv/writev compatibility' CONFIG_OSF4_COMPAT
-fi
-
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86
-source drivers/parport/Config.in
-endmenu
-
-source drivers/mtd/Config.in
-
-source drivers/pnp/Config.in
-
-source drivers/block/Config.in
-
-source drivers/md/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-  source drivers/scsi/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_PCI" = "y" ]; then
-  source drivers/message/fusion/Config.in
-fi
-
-if [ "$CONFIG_NET" = "y" ]; then
-  source net/Config.in
-
-  mainmenu_option next_comment
-  comment 'Network device support'
-
-  bool 'Network device support' CONFIG_NETDEVICES
-  if [ "$CONFIG_NETDEVICES" = "y" ]; then
-    source drivers/net/Config.in
-    if [ "$CONFIG_ATM" = "y" ]; then
-      source drivers/atm/Config.in
-    fi
-  fi
-  endmenu
-fi
-
-source net/ax25/Config.in
-
-source drivers/isdn/Config.in
-
-mainmenu_option next_comment
-comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-
-bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-  source drivers/cdrom/Config.in
-fi
-endmenu
-
-source drivers/input/Config.in
-source drivers/char/Config.in
-
-#source drivers/misc/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-  mainmenu_option next_comment
-  comment 'Console drivers'
-  bool 'VGA text console' CONFIG_VGA_CONSOLE
-#  if [ "$CONFIG_PCI" = "y" -a "$CONFIG_VGA_CONSOLE" = "y" ]; then
-#    bool '   Allow VGA on any bus?' CONFIG_VGA_HOSE
-#    if [ "$CONFIG_VGA_HOSE" = "y" ]; then
-#      define_bool CONFIG_DUMMY_CONSOLE y
-#    fi
-#  fi
-  source drivers/video/Config.in
-  if [ "$CONFIG_FB" = "y" ]; then
-    define_bool CONFIG_PCI_CONSOLE y
-  fi
-  endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-  source sound/Config.in
-fi
-endmenu
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Legacy kernel start address' CONFIG_ALPHA_LEGACY_START_ADDRESS
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   tristate '  Kernel FP software completion' CONFIG_MATHEMU
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   bool '  Read-write spinlock debugging' CONFIG_DEBUG_RWLOCK
-   bool '  Semaphore debugging' CONFIG_DEBUG_SEMAPHORE
-else
-   define_tristate CONFIG_MATHEMU y
-fi
-
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/arm/Config.help b/arch/arm/Config.help
--- a/arch/arm/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,702 +0,0 @@
-CONFIG_ARM
-  The ARM series is a line of low-power-consumption RISC chip designs
-  licensed by ARM ltd and targeted at embedded applications and
-  handhelds such as the Compaq IPAQ.  ARM-based PCs are no longer
-  manufactured, but  legacy ARM-based PC hardware remains popular in
-  Europe.  There is an ARM Linux project with a web page at
-  <http://www.arm.linux.org.uk/>.
-
-CONFIG_LEDS
-  If you say Y here, the LEDs on your machine will be used
-  to provide useful information about your current system status.
-
-  If you are compiling a kernel for a NetWinder or EBSA-285, you will
-  be able to select which LEDs are active using the options below. If
-  you are compiling a kernel for the EBSA-110 or the LART however, the
-  red LED will simply flash regularly to indicate that the system is
-  still functional. It is safe to say Y here if you have a CATS
-  system, but the driver will do nothing.
-
-CONFIG_LEDS_TIMER
-  If you say Y here, one of the system LEDs (the green one on the
-  NetWinder, the amber one on the EBSA285, or the red one on the LART)
-  will flash regularly to indicate that the system is still
-  operational. This is mainly useful to kernel hackers who are
-  debugging unstable kernels.
-
-  The LART uses the same LED for both Timer LED and CPU usage LED
-  functions. You may choose to use both, but the Timer LED function
-  will overrule the CPU usage LED.
-
-CONFIG_LEDS_CPU
-  If you say Y here, the red LED will be used to give a good real
-  time indication of CPU usage, by lighting whenever the idle task
-  is not currently executing.
-
-  The LART uses the same LED for both Timer LED and CPU usage LED
-  functions. You may choose to use both, but the Timer LED function
-  will overrule the CPU usage LED.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_DISCONTIGMEM
-  Say Y to upport 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.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_PCI_INTEGRATOR
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  This allows applications to run more reliably even when the system is
-  under load.
-
-  Say Y here if you are building a kernel for a desktop, embedded
-  or real-time system.  Say N if you are unsure.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_KCORE_AOUT
-  Not necessary unless you're using a very out-of-date binutils
-  version.  You probably want KCORE_ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_ARCH_ANAKIN
-  The Anakin is a StrongArm based SA110 - 2 DIN Vehicle Telematics Platform.
-  64MB SDRAM - 4 Mb Flash - Compact Flash Interface - 1 MB VRAM
-
-  On board peripherals:
-        * Front display: 400x234 16 bit TFT touchscreen
-        * External independent second screen interface
-        * CAN controller SJA1000
-        * USB host controller
-        * 6 channel video codec with hardware overlay
-        * Smartcard reader
-        * IrDa
-
-  Modules interfaced over the Multi Media Extension slots:
-        * A communication card
-                Wavecom GPRS modem
-                uBlock GPS
-                Bosch DAB module
-        * An audio card ( 4 * 40W, AC97 Codec, I2S)
-
-CONFIG_ARCH_CAMELOT
-  This enables support for Altera's Excalibur XA10 development board.
-  If you would like to build your kernel to run on one of these boards
-  then you must say 'Y' here. Otherwise say 'N'
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_ARM_THUMB
-  Say Y if you want to have kernel support for ARM Thumb instructions,
-  fault handlers, and system calls.
-
-  The Thumb instruction set is a compressed form of the standard ARM
-  instruction set resulting in smaller binaries at the expense of
-  slightly less efficient code.
-
-  If you don't know what this all is, saying Y is a safe choice.
-
-CONFIG_PM
-  "Power Management" means that parts of your computer are shut
-  off or put into a power conserving "sleep" mode if they are not
-  being used.  There are two competing standards for doing this: APM
-  and ACPI.  If you want to use either one, say Y here and then also
-  to the requisite support below.
-
-  Power Management is most important for battery powered laptop
-  computers; if you have a laptop, check out the Linux Laptop home
-  page on the WWW at
-  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
-  Battery Powered Linux mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that, even if you say N here, Linux on the x86 architecture
-  will issue the hlt instruction if nothing is to be done, thereby
-  sending the processor to sleep and saving power.
-
-CONFIG_APM
-  APM is a BIOS specification for saving power using several different
-  techniques. This is mostly useful for battery powered laptops with
-  APM compliant BIOSes. If you say Y here, the system time will be
-  reset after a RESUME operation, the /proc/apm device will provide
-  battery status information, and user-space programs will receive
-  notification of APM "events" (e.g. battery status change).
-
-  If you select "Y" here, you can disable actual use of the APM
-  BIOS by passing the "apm=off" option to the kernel at boot time.
-
-  Note that the APM support is almost completely disabled for
-  machines with more than one CPU.
-
-  In order to use APM, you will need supporting software. For location
-  and more information, read <file:Documentation/pm.txt> and the
-  Battery Powered Linux mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver does not spin down disk drives (see the hdparm(8)
-  manpage ("man 8 hdparm") for that), and it doesn't turn off
-  VESA-compliant "green" monitors.
-
-  This driver does not support the TI 4000M TravelMate and the ACER
-  486/DX4/75 because they don't have compliant BIOSes. Many "green"
-  desktop machines also don't have compliant BIOSes, and this driver
-  may cause those machines to panic during the boot phase.
-
-  Generally, if you don't have a battery in your machine, there isn't
-  much point in using this driver and you should say N. If you get
-  random kernel OOPSes or reboots that don't seem to be related to
-  anything, try disabling/enabling this option (or disabling/enabling
-  APM in your BIOS).
-
-  Some other things you should try when experiencing seemingly random,
-  "weird" problems:
-
-   1) make sure that you have enough swap space and that it is
-      enabled.
-   2) pass the "no-hlt" option to the kernel
-   3) switch on floating point emulation in the kernel and pass
-      the "no387" option to the kernel
-   4) pass the "floppy=nodma" option to the kernel
-   5) pass the "mem=4M" option to the kernel (thereby disabling
-      all but the first 4 MB of RAM)
-   6) make sure that the CPU is not over clocked.
-   7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
-   8) disable the cache from your BIOS settings
-   9) install a fan for the video card or exchange video RAM
-   10) install a better fan for the CPU
-   11) exchange RAM chips
-   12) exchange the motherboard.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  apm.o.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_ARCH_EBSA110
-  This is an evaluation board for the StrongARM processor available
-  from Digital. It has limited hardware on-board, including an onboard
-  Ethernet interface, two PCMCIA sockets, two serial ports and a
-  parallel port.
-
-CONFIG_ARCH_RPC
-  On the Acorn Risc-PC, Linux can support the internal IDE disk and
-  CD-ROM interface, serial and parallel port, and the floppy drive.
-
-CONFIG_ARCH_L7200
-  Say Y here if you intend to run this kernel on a LinkUp Systems
-  L7200 Software Development Board which uses an ARM720T processor.
-  Information on this board can be obtained at:
-
-  <http://www.linkupsys.com/>
-
-  If you have any questions or comments about the Linux kernel port
-  to this board, send e-mail to sjhill@cotw.com.
-
-CONFIG_CPU_ARM610
-  The ARM610 is the successor to the ARM3 processor
-  and was produced by VLSI Technology Inc.
-
-  Say Y if you want support for the ARM610 processor.
-  Otherwise, say N.
-
-CONFIG_CPU_ARM710
-  A 32-bit RISC microprocessor based on the ARM7 processor core
-  designed by Advanced RISC Machines Ltd. The ARM710 is the
-  successor to the ARM610 processor. It was released in
-  July 1994 by VLSI Technology Inc.
-
-  Say Y if you want support for the ARM710 processor.
-  Otherwise, say N.
-
-CONFIG_CPU_ARM720T
-  A 32-bit RISC processor with 8kByte Cache, Write Buffer and
-  MMU built around an ARM7TDMI core.
-
-  Say Y if you want support for the ARM720T processor.
-  Otherwise, say N.
-
-CONFIG_CPU_ARM920T
-  The ARM920T is licensed to be produced by numerous vendors,
-  and is used in the Maverick EP9312.  More information at
-  <http://linuxdevices.com/products/PD2382866068.html>.
-
-  Say Y if you want support for the ARM920T processor.
-  Otherwise, say N.
-
-CONFIG_CPU_ARM922T
-  The ARM922T is a version of the ARM920T, but with smaller
-  instruction and data caches. It is used in Altera's
-  Excalibur XA device family.
-
-  Say Y if you want support for the ARM922T processor.
-  Otherwise, say N.
-
-CONFIG_CPU_ARM1020
-  The ARM1020 is the cached version of the ARM10 processor,
-  with an addition of a floating-point unit.
-
-  Say Y if you want support for the ARM1020 processor.
-  Otherwise, say N.
-
-CONFIG_CPU_SA110
-  The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
-  is available at five speeds ranging from 100 MHz to 233 MHz.
-  More information is available at
-  <http://developer.intel.com/design/strong/sa110.htm>.
-
-  Say Y if you want support for the SA-110 processor.
-  Otherwise, say N.
-
-CONFIG_CPU_ICACHE_DISABLE
-  Say Y here to disable the processor instruction cache. Unless
-  you have a reason not to or are unsure, say N.
-
-CONFIG_CPU_DCACHE_DISABLE
-  Say Y here to disable the processor data cache. Unless
-  you have a reason not to or are unsure, say N.
-
-CONFIG_CPU_DCACHE_WRITETHROUGH
-  Say Y here to use the data cache in writethough mode. Unless you
-  specifically require this or are unsure, say N.
-
-CONFIG_CPU_CACHE_ROUND_ROBIN
-  Say Y here to use the predictable round-robin cache replacement
-  policy.  Unless you specifically require this or are unsure, say N.
-
-CONFIG_CPU_BPREDICT_DISABLE
-  Say Y here to disable branch prediction.  If unsure, say N.
-
-CONFIG_FPE_NWFPE
-  Say Y to include the NWFPE floating point emulator in the kernel.
-  This is necessary to run most binaries. Linux does not currently
-  support floating point hardware so you need to say Y here even if
-  your machine has an FPA or floating point co-processor podule.
-
-  It is also possible to say M to build the emulator as a module
-  (nwfpe.o) or indeed to leave it out altogether. However, unless you
-  know what you are doing this can easily render your machine
-  unbootable. Saying Y is the safe option.
-
-  You may say N here if you are going to load the Acorn FPEmulator
-  early in the bootup.
-
-CONFIG_FPE_FASTFPE
-  Say Y here to include the FAST floating point emulator in the kernel.
-  This is an experimental much faster emulator which now also has full
-  precision for the mantissa.  It does not support any exceptions.
-  It is very simple, and approximately 3-6 times faster than NWFPE.
-
-  It should be sufficient for most programs.  It may be not suitable
-  for scientific calculations, but you have to check this for yourself.
-  If you do not feel you need a faster FP emulation you should better
-  choose NWFPE.
-
-  It is also possible to say M to build the emulator as a module
-  (fastfpe.o).  But keep in mind that you should only load the FP
-  emulator early in the bootup.  You should never change from NWFPE to
-  FASTFPE or vice versa in an active system!
-
-CONFIG_DEBUG_ERRORS
-  This option controls verbose debugging information which can be
-  printed when the kernel detects an internal error. This debugging
-  information is useful to kernel hackers when tracking down problems,
-  but mostly meaningless to other people. It's safe to say Y unless
-  you are concerned with the code size or don't want to see these
-  messages.
-
-CONFIG_NO_FRAME_POINTER
-  If you say Y here, the resulting kernel will be slightly smaller and
-  faster. However, when a problem occurs with the kernel, the
-  information that is reported is severely limited. Most people
-  should say N here.
-
-CONFIG_DEBUG_USER
-  When a user program crashes due to an exception, the kernel can
-  print a brief message explaining what the problem was. This is
-  sometimes helpful for debugging but serves no purpose on a
-  production system. Most people should say N here.
-
-CONFIG_DEBUG_INFO
-  Say Y here to include source-level debugging information in the
-  `vmlinux' binary image. This is handy if you want to use gdb or
-  addr2line to debug the kernel. It has no impact on the in-memory
-  footprint of the running kernel but it can increase the amount of
-  time and disk space needed for compilation of the kernel. If in
-  doubt say N.
-
-CONFIG_DEBUG_LL
-  Say Y here to include definitions of printascii, printchar, printhex
-  in the kernel.  This is helpful if you are debugging code that
-  executes before the console is initialized.
-
-CONFIG_DEBUG_DC21285_PORT
-  Say Y here if you want the debug print routines to direct their
-  output to the serial port in the DC21285 (Footbridge). Saying N
-  will cause the debug messages to appear on the first 16550
-  serial port.
-
-CONFIG_DEBUG_CLPS711X_UART2
-  Say Y here if you want the debug print routines to direct their
-  output to the second serial port on these devices.  Saying N will
-  cause the debug messages to appear on the first serial port.
-
-CONFIG_NO_PGT_CACHE
-  Normally the kernel maintains a `quicklist' of preallocated
-  pagetable structures in order to increase performance. On machines
-  with very few pages this may however be a loss. Say Y here to
-  disable the pgtable cache.
-
-CONFIG_ARTHUR
-  Say Y here to include the kernel code necessary if you want to run
-  Acorn RISC OS/Arthur binaries under Linux. This code is still very
-  experimental; if this sounds frightening, say N and sleep in peace.
-  You can also say M here to compile this support as a module (which
-  will be called arthur.o).
-
-CONFIG_CMDLINE
-  On some architectures (EBSA110 and CATS), there is currently no way
-  for the boot loader to pass arguments to the kernel. For these
-  architectures, you should supply some command-line options at build
-  time by entering them here. As a minimum, you should specify the
-  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-CONFIG_ALIGNMENT_TRAP
-  ARM processors can not fetch/store information which is not
-  naturally aligned on the bus, i.e., a 4 byte fetch must start at an
-  address divisible by 4. On 32-bit ARM processors, these non-aligned
-  fetch/store instructions will be emulated in software if you say
-  here, which has a severe performance impact. This is necessary for
-  correct operation of some network protocols. With an IP-only
-  configuration it is safe to say N, otherwise say Y.
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  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
-  memory.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_DEBUG_BUGVERBOSE
-  Say Y here to make BUG() panics output the file name and line number
-  of the BUG call as well as the EIP and oops trace.  This aids
-  debugging but costs about 70-100K of memory.
-
-CONFIG_ZBOOT_ROM
-  Say Y here if you intend to execute your compressed kernel image (zImage)
-  directly from ROM or flash.  If unsure, say N.
-
-CONFIG_ZBOOT_ROM_TEXT
-  The base address for zImage.  Unless you have special requirements, you
-  should not change this value.
-
-CONFIG_ZBOOT_ROM_BSS
-  The base address of 64KiB of read/write memory, which must be available
-  while the decompressor is running.  Unless you have special requirements,
-  you should not change this value.
-
-CONFIG_CPU_FREQ
-  CPU clock scaling allows you to change the clock speed of the
-  running CPU on the fly. This is a nice method to save battery power,
-  because the lower the clock speed, the less power the CPU
-  consumes. Note that this driver doesn't automatically change the CPU
-  clock speed, you need some userland tools (which still have to be
-  written) to implement the policy. If you don't understand what this
-  is all about, it's safe to say 'N'.
-
-CONFIG_CPU_ARM926T
-  This is a variant of the ARM920.  It has slightly different
-  instruction sequences for cache and TLB operations.  Curiously,
-  there is no documentation on it at the ARM corporate website.
-
-  Say Y if you want support for the ARM926T processor.
-  Otherwise, say N.
-
diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,1237 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+
+mainmenu "Linux Kernel Configuration"
+
+config ARM
+	bool
+	default y
+	help
+	  The ARM series is a line of low-power-consumption RISC chip designs
+	  licensed by ARM ltd and targeted at embedded applications and
+	  handhelds such as the Compaq IPAQ.  ARM-based PCs are no longer
+	  manufactured, but  legacy ARM-based PC hardware remains popular in
+	  Europe.  There is an ARM Linux project with a web page at
+	  <http://www.arm.linux.org.uk/>.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config SBUS
+	bool
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_BUST_SPINLOCK
+	bool
+
+config GENERIC_ISA_DMA
+	bool
+
+source "init/Kconfig"
+
+
+menu "System Type"
+
+choice
+	prompt "ARM system type"
+	default ARCH_RPC
+
+config ARCH_ADIFCC
+	bool "ADIFCC-based"
+
+config ARCH_ANAKIN
+	bool "Anakin"
+	---help---
+	  The Anakin is a StrongArm based SA110 - 2 DIN Vehicle Telematics Platform.
+	  64MB SDRAM - 4 Mb Flash - Compact Flash Interface - 1 MB VRAM
+
+	  On board peripherals:
+	  * Front display: 400x234 16 bit TFT touchscreen
+	  * External independent second screen interface
+	  * CAN controller SJA1000
+	  * USB host controller
+	  * 6 channel video codec with hardware overlay
+	  * Smartcard reader
+	  * IrDa
+
+	  Modules interfaced over the Multi Media Extension slots:
+	  * A communication card
+	  Wavecom GPRS modem
+	  uBlock GPS
+	  Bosch DAB module
+	  * An audio card ( 4 * 40W, AC97 Codec, I2S)
+
+config ARCH_ARCA5K
+	bool "Archimedes/A5000"
+	help
+	  This selects what ARM system you wish to build the kernel for. It
+	  also selects to some extent the CPU type. If you are unsure what
+	  to set this option to, please consult any information supplied with
+	  your system.
+
+config ARCH_CLPS7500
+	bool "Cirrus-CL-PS7500FE"
+
+config ARCH_CLPS711X
+	bool "CLPS711x/EP721x-based"
+
+config ARCH_CO285
+	bool "Co-EBSA285"
+
+config ARCH_PXA
+	bool "PXA250/210-based"
+
+config ARCH_EBSA110
+	bool "EBSA-110"
+	help
+	  This is an evaluation board for the StrongARM processor available
+	  from Digital. It has limited hardware on-board, including an onboard
+	  Ethernet interface, two PCMCIA sockets, two serial ports and a
+	  parallel port.
+
+config ARCH_CAMELOT
+	bool "Epxa10db"
+	help
+	  This enables support for Altera's Excalibur XA10 development board.
+	  If you would like to build your kernel to run on one of these boards
+	  then you must say 'Y' here. Otherwise say 'N'
+
+config ARCH_FOOTBRIDGE
+	bool "FootBridge"
+
+config ARCH_INTEGRATOR
+	bool "Integrator"
+
+config ARCH_IOP310
+	bool "IOP310-based"
+
+config ARCH_L7200
+	bool "LinkUp-L7200"
+	help
+	  Say Y here if you intend to run this kernel on a LinkUp Systems
+	  L7200 Software Development Board which uses an ARM720T processor.
+	  Information on this board can be obtained at:
+
+	  <http://www.linkupsys.com/>
+
+	  If you have any questions or comments about the Linux kernel port
+	  to this board, send e-mail to sjhill@cotw.com.
+
+config ARCH_RPC
+	bool "RiscPC"
+	help
+	  On the Acorn Risc-PC, Linux can support the internal IDE disk and
+	  CD-ROM interface, serial and parallel port, and the floppy drive.
+
+config ARCH_SA1100
+	bool "SA1100-based"
+
+config ARCH_SHARK
+	bool "Shark"
+
+endchoice
+
+source "arch/arm/mach-arc/Kconfig"
+
+source "arch/arm/mach-clps711x/Kconfig"
+
+source "arch/arm/mach-epxa10db/Kconfig"
+
+source "arch/arm/mach-footbridge/Kconfig"
+
+source "arch/arm/mach-iop310/Kconfig"
+
+source "arch/arm/mach-pxa/Kconfig"
+
+source "arch/arm/mach-sa1100/Kconfig"
+
+# Definitions to make life easier
+config ARCH_ACORN
+	bool
+	depends on ARCH_ARCA5K || ARCH_RPC
+	default y
+
+#####################################################################
+# Footbridge support
+config FOOTBRIDGE
+	bool
+	depends on ARCH_CO285 || ARCH_FOOTBRIDGE
+	default y
+
+config FOOTBRIDGE_HOST
+	bool
+	depends on ARCH_CATS || ARCH_EBSA285_HOST || ARCH_NETWINDER || ARCH_PERSONAL_SERVER
+	default y
+
+config FOOTBRIDGE_ADDIN
+	bool
+	depends on ARCH_CO285 || ARCH_EBSA285_ADDIN
+	default y
+
+config ARCH_EBSA285
+	bool
+	depends on ARCH_EBSA285_HOST || ARCH_EBSA285_ADDIN
+	default y
+
+#####################################################################
+# SA1111 support
+config SA1111
+	bool
+	depends on ASSABET_NEPONSET || SA1100_ADSBITSY || SA1100_BADGE4 || SA1100_CONSUS || SA1100_GRAPHICSMASTER || SA1100_JORNADA720 || ARCH_LUBBOCK || SA1100_PFS168 || SA1100_PT_SYSTEM3 || SA1100_XP860
+	default y
+
+config FORCE_MAX_ZONEORDER
+	int
+	depends on ASSABET_NEPONSET || SA1100_ADSBITSY || SA1100_BADGE4 || SA1100_CONSUS || SA1100_GRAPHICSMASTER || SA1100_JORNADA720 || ARCH_LUBBOCK || SA1100_PFS168 || SA1100_PT_SYSTEM3 || SA1100_XP860
+	default "9"
+
+comment "Processor Type"
+
+# Figure out whether this system uses 26-bit or 32-bit CPUs.
+config CPU_32
+	bool
+	depends on !ARCH_ARCA5K
+	default y
+
+config CPU_26
+	bool
+	depends on ARCH_ARCA5K
+	default y
+
+# Select CPU types depending on the architecture selected.  This selects
+# which CPUs we support in the kernel image, and the compiler instruction
+# optimiser behaviour.
+# ARM610
+config CPU_ARM610
+	bool "Support ARM610 processor"
+	depends on ARCH_RPC
+	help
+	  The ARM610 is the successor to the ARM3 processor
+	  and was produced by VLSI Technology Inc.
+
+	  Say Y if you want support for the ARM610 processor.
+	  Otherwise, say N.
+
+# ARM710
+config CPU_ARM710
+	bool "Support ARM710 processor" if !ARCH_CLPS7500 && ARCH_RPC
+	default y if ARCH_CLPS7500
+	help
+	  A 32-bit RISC microprocessor based on the ARM7 processor core
+	  designed by Advanced RISC Machines Ltd. The ARM710 is the
+	  successor to the ARM610 processor. It was released in
+	  July 1994 by VLSI Technology Inc.
+
+	  Say Y if you want support for the ARM710 processor.
+	  Otherwise, say N.
+
+# ARM720T
+config CPU_ARM720T
+	bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR
+	default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712
+	help
+	  A 32-bit RISC processor with 8kByte Cache, Write Buffer and
+	  MMU built around an ARM7TDMI core.
+
+	  Say Y if you want support for the ARM720T processor.
+	  Otherwise, say N.
+
+# ARM920T
+config CPU_ARM920T
+	bool "Support ARM920T processor"
+	depends on ARCH_INTEGRATOR
+	help
+	  The ARM920T is licensed to be produced by numerous vendors,
+	  and is used in the Maverick EP9312.  More information at
+	  <http://linuxdevices.com/products/PD2382866068.html>.
+
+	  Say Y if you want support for the ARM920T processor.
+	  Otherwise, say N.
+
+# ARM922T
+config CPU_ARM922T
+	bool
+	depends on ARCH_CAMELOT
+	default y
+	help
+	  The ARM922T is a version of the ARM920T, but with smaller
+	  instruction and data caches. It is used in Altera's
+	  Excalibur XA device family.
+
+	  Say Y if you want support for the ARM922T processor.
+	  Otherwise, say N.
+
+# ARM926T
+config CPU_ARM926T
+	bool "Support ARM926T processor"
+	depends on ARCH_INTEGRATOR
+	help
+	  This is a variant of the ARM920.  It has slightly different
+	  instruction sequences for cache and TLB operations.  Curiously,
+	  there is no documentation on it at the ARM corporate website.
+
+	  Say Y if you want support for the ARM926T processor.
+	  Otherwise, say N.
+
+# ARM1020
+config CPU_ARM1020
+	bool "Support ARM1020 processor"
+	depends on ARCH_INTEGRATOR
+	help
+	  The ARM1020 is the cached version of the ARM10 processor,
+	  with an addition of a floating-point unit.
+
+	  Say Y if you want support for the ARM1020 processor.
+	  Otherwise, say N.
+
+# SA110
+config CPU_SA110
+	bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && !ARCH_ANAKIN && ARCH_RPC
+	default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_ANAKIN
+	help
+	  The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and
+	  is available at five speeds ranging from 100 MHz to 233 MHz.
+	  More information is available at
+	  <http://developer.intel.com/design/strong/sa110.htm>.
+
+	  Say Y if you want support for the SA-110 processor.
+	  Otherwise, say N.
+
+# SA1100
+config CPU_SA1100
+	bool
+	depends on ARCH_SA1100
+	default y
+
+# XScale
+config CPU_XSCALE
+	bool
+	depends on ARCH_IOP310 || ARCH_ADIFCC || ARCH_PXA
+	default y
+
+# Figure out what processor architecture version we should be using.
+# This defines the compiler instruction set which depends on the machine type.
+config CPU_32v3
+	bool
+	depends on ARCH_RPC || ARCH_CLPS7500
+	default y
+
+config CPU_32v4
+	bool
+	depends on ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_CLPS711X || ARCH_INTEGRATOR || ARCH_SA1100 || ARCH_L7200 || ARCH_ANAKIN || ARCH_CAMELOT
+	default y
+
+config CPU_32v5
+	bool
+	depends on ARCH_IOP310 || ARCH_ADIFCC || ARCH_PXA
+	default y
+
+comment "Processor Features"
+
+config ARM_THUMB
+	bool "Support Thumb instructions (EXPERIMENTAL)"
+	depends on (CPU_ARM720T || CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020 || CPU_XSCALE) && EXPERIMENTAL
+	help
+	  Say Y if you want to have kernel support for ARM Thumb instructions,
+	  fault handlers, and system calls.
+
+	  The Thumb instruction set is a compressed form of the standard ARM
+	  instruction set resulting in smaller binaries at the expense of
+	  slightly less efficient code.
+
+	  If you don't know what this all is, saying Y is a safe choice.
+
+config CPU_ICACHE_DISABLE
+	bool "Disable I-Cache"
+	depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
+	help
+	  Say Y here to disable the processor instruction cache. Unless
+	  you have a reason not to or are unsure, say N.
+
+config CPU_DCACHE_DISABLE
+	bool "Disable D-Cache"
+	depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
+	help
+	  Say Y here to disable the processor data cache. Unless
+	  you have a reason not to or are unsure, say N.
+
+config CPU_DCACHE_WRITETHROUGH
+	bool "Force write through D-cache"
+	depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE
+	help
+	  Say Y here to use the data cache in writethough mode. Unless you
+	  specifically require this or are unsure, say N.
+
+config CPU_CACHE_ROUND_ROBIN
+	bool "Round robin I and D cache replacement algorithm"
+	depends on (CPU_ARM926T || CPU_ARM1020) && (!CPU_ICACHE_DISABLE || !CPU_DCACHE_DISABLE)
+	help
+	  Say Y here to use the predictable round-robin cache replacement
+	  policy.  Unless you specifically require this or are unsure, say N.
+
+config CPU_BPREDICT_DISABLE
+	bool "Disable branch prediction"
+	depends on CPU_ARM1020
+	help
+	  Say Y here to disable branch prediction.  If unsure, say N.
+
+#  bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER
+config XSCALE_PMU
+	bool
+	depends on CPU_XSCALE && !XSCALE_PMU_TIMER
+	default y
+
+endmenu
+
+
+menu "General setup"
+
+# Select various configuration options depending on the machine type
+config DISCONTIGMEM
+	bool
+	depends on ARCH_EDB7211 || ARCH_SA1100
+	default y
+	help
+	  Say Y to upport 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.
+
+# Now handle the bus types
+config PCI
+	bool
+	default PCI_INTEGRATOR if !ARCH_FTVPCI && !ARCH_SHARK && !FOOTBRIDGE_HOST && !ARCH_IOP310 && ARCH_INTEGRATOR
+	default y if ARCH_FTVPCI || ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP310
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config PCI_INTEGRATOR
+	bool "PCI support"
+	depends on !ARCH_FTVPCI && !ARCH_SHARK && !FOOTBRIDGE_HOST && !ARCH_IOP310 && ARCH_INTEGRATOR
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  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
+	default y
+
+config ISA
+	bool
+	depends on FOOTBRIDGE_HOST || ARCH_SHARK || ARCH_CLPS7500 || ARCH_EBSA110 || ARCH_CDB89712 || ARCH_EDB7211 || ARCH_SA1100
+	default y
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config ISA_DMA
+	bool
+	depends on FOOTBRIDGE_HOST || ARCH_SHARK
+	default y
+
+config FIQ
+	bool
+	depends on ARCH_ACORN || ARCH_L7200
+	default y
+
+# Compressed boot loader in ROM.  Yes, we really want to ask about
+# TEXT and BSS so we preserve their values in the config files.
+config ZBOOT_ROM
+	bool "Compressed boot loader in ROM/flash"
+	help
+	  Say Y here if you intend to execute your compressed kernel image (zImage)
+	  directly from ROM or flash.  If unsure, say N.
+
+config ZBOOT_ROM_TEXT
+	hex "Compressed ROM boot loader base address"
+	default "0"
+	help
+	  The base address for zImage.  Unless you have special requirements, you
+	  should not change this value.
+
+config ZBOOT_ROM_BSS
+	hex "Compressed ROM boot loader BSS address"
+	default "0"
+	help
+	  The base address of 64KiB of read/write memory, which must be available
+	  while the decompressor is running.  Unless you have special requirements,
+	  you should not change this value.
+
+config CPU_FREQ
+	bool "Support CPU clock change (EXPERIMENTAL)"
+	depends on (ARCH_SA1100 || ARCH_INTEGRATOR) && EXPERIMENTAL
+	help
+	  CPU clock scaling allows you to change the clock speed of the
+	  running CPU on the fly. This is a nice method to save battery power,
+	  because the lower the clock speed, the less power the CPU
+	  consumes. Note that this driver doesn't automatically change the CPU
+	  clock speed, you need some userland tools (which still have to be
+	  written) to implement the policy. If you don't understand what this
+	  is all about, it's safe to say 'N'.
+
+config CPU_FREQ_24_API
+	bool
+	depends on CPU_FREQ
+	default y
+
+config CPU_FREQ_26_API
+	bool
+	depends on CPU_FREQ
+	default y
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+comment "At least one math emulation must be selected"
+
+config FPE_NWFPE
+	tristate "NWFPE math emulation"
+	---help---
+	  Say Y to include the NWFPE floating point emulator in the kernel.
+	  This is necessary to run most binaries. Linux does not currently
+	  support floating point hardware so you need to say Y here even if
+	  your machine has an FPA or floating point co-processor podule.
+
+	  It is also possible to say M to build the emulator as a module
+	  (nwfpe.o) or indeed to leave it out altogether. However, unless you
+	  know what you are doing this can easily render your machine
+	  unbootable. Saying Y is the safe option.
+
+	  You may say N here if you are going to load the Acorn FPEmulator
+	  early in the bootup.
+
+config FPE_FASTFPE
+	tristate "FastFPE math emulation (EXPERIMENTAL)"
+	depends on !CPU_26 && !CPU_32v3 && EXPERIMENTAL
+	---help---
+	  Say Y here to include the FAST floating point emulator in the kernel.
+	  This is an experimental much faster emulator which now also has full
+	  precision for the mantissa.  It does not support any exceptions.
+	  It is very simple, and approximately 3-6 times faster than NWFPE.
+
+	  It should be sufficient for most programs.  It may be not suitable
+	  for scientific calculations, but you have to check this for yourself.
+	  If you do not feel you need a faster FP emulation you should better
+	  choose NWFPE.
+
+	  It is also possible to say M to build the emulator as a module
+	  (fastfpe.o).  But keep in mind that you should only load the FP
+	  emulator early in the bootup.  You should never change from NWFPE to
+	  FASTFPE or vice versa in an active system!
+
+choice
+	prompt "Kernel core (/proc/kcore) format"
+	default KCORE_ELF
+
+config KCORE_ELF
+	bool "ELF"
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config KCORE_AOUT
+	bool "A.OUT"
+	help
+	  Not necessary unless you're using a very out-of-date binutils
+	  version.  You probably want KCORE_ELF.
+
+endchoice
+
+config BINFMT_AOUT
+	tristate "Kernel support for a.out binaries"
+	---help---
+	  A.out (Assembler.OUTput) is a set of formats for libraries and
+	  executables used in the earliest versions of UNIX. Linux used the
+	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
+	  ELF format.
+
+	  As more and more programs are converted to ELF, the use for a.out
+	  will gradually diminish. If you disable this option it will reduce
+	  your kernel by one page. This is not much and by itself does not
+	  warrant removing support. However its removal is a good idea if you
+	  wish to ensure that absolutely none of your programs will use this
+	  older executable format. If you don't know what to answer at this
+	  point then answer Y. If someone told you "You need a kernel with
+	  QMAGIC support" then you'll have to say Y here. You may answer M to
+	  compile a.out support as a module and later load the module when you
+	  want to use a program or library in a.out format. The module will be
+	  called binfmt_aout.o. Saying M or N here is dangerous though,
+	  because some crucial programs on your system might still be in A.OUT
+	  format.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config PM
+	bool "Power Management support"
+	---help---
+	  "Power Management" means that parts of your computer are shut
+	  off or put into a power conserving "sleep" mode if they are not
+	  being used.  There are two competing standards for doing this: APM
+	  and ACPI.  If you want to use either one, say Y here and then also
+	  to the requisite support below.
+
+	  Power Management is most important for battery powered laptop
+	  computers; if you have a laptop, check out the Linux Laptop home
+	  page on the WWW at
+	  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
+	  Battery Powered Linux mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that, even if you say N here, Linux on the x86 architecture
+	  will issue the hlt instruction if nothing is to be done, thereby
+	  sending the processor to sleep and saving power.
+
+config PREEMPT
+	bool "Preemptible Kernel (EXPERIMENTAL)"
+	depends on CPU_32 && EXPERIMENTAL
+	help
+	  This option reduces the latency of the kernel when reacting to
+	  real-time or interactive events by allowing a low priority process to
+	  be preempted even if it is in kernel mode executing a system call.
+	  This allows applications to run more reliably even when the system is
+	  under load.
+
+	  Say Y here if you are building a kernel for a desktop, embedded
+	  or real-time system.  Say N if you are unsure.
+
+config APM
+	tristate "Advanced Power Management Emulation"
+	depends on PM
+	---help---
+	  APM is a BIOS specification for saving power using several different
+	  techniques. This is mostly useful for battery powered laptops with
+	  APM compliant BIOSes. If you say Y here, the system time will be
+	  reset after a RESUME operation, the /proc/apm device will provide
+	  battery status information, and user-space programs will receive
+	  notification of APM "events" (e.g. battery status change).
+
+	  If you select "Y" here, you can disable actual use of the APM
+	  BIOS by passing the "apm=off" option to the kernel at boot time.
+
+	  Note that the APM support is almost completely disabled for
+	  machines with more than one CPU.
+
+	  In order to use APM, you will need supporting software. For location
+	  and more information, read <file:Documentation/pm.txt> and the
+	  Battery Powered Linux mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver does not spin down disk drives (see the hdparm(8)
+	  manpage ("man 8 hdparm") for that), and it doesn't turn off
+	  VESA-compliant "green" monitors.
+
+	  This driver does not support the TI 4000M TravelMate and the ACER
+	  486/DX4/75 because they don't have compliant BIOSes. Many "green"
+	  desktop machines also don't have compliant BIOSes, and this driver
+	  may cause those machines to panic during the boot phase.
+
+	  Generally, if you don't have a battery in your machine, there isn't
+	  much point in using this driver and you should say N. If you get
+	  random kernel OOPSes or reboots that don't seem to be related to
+	  anything, try disabling/enabling this option (or disabling/enabling
+	  APM in your BIOS).
+
+	  Some other things you should try when experiencing seemingly random,
+	  "weird" problems:
+
+	  1) make sure that you have enough swap space and that it is
+	  enabled.
+	  2) pass the "no-hlt" option to the kernel
+	  3) switch on floating point emulation in the kernel and pass
+	  the "no387" option to the kernel
+	  4) pass the "floppy=nodma" option to the kernel
+	  5) pass the "mem=4M" option to the kernel (thereby disabling
+	  all but the first 4 MB of RAM)
+	  6) make sure that the CPU is not over clocked.
+	  7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
+	  8) disable the cache from your BIOS settings
+	  9) install a fan for the video card or exchange video RAM
+	  10) install a better fan for the CPU
+	  11) exchange RAM chips
+	  12) exchange the motherboard.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  apm.o.
+
+config ARTHUR
+	tristate "RISC OS personality"
+	depends on CPU_32
+	help
+	  Say Y here to include the kernel code necessary if you want to run
+	  Acorn RISC OS/Arthur binaries under Linux. This code is still very
+	  experimental; if this sounds frightening, say N and sleep in peace.
+	  You can also say M here to compile this support as a module (which
+	  will be called arthur.o).
+
+config CMDLINE
+	string "Default kernel command string"
+	default ""
+	help
+	  On some architectures (EBSA110 and CATS), there is currently no way
+	  for the boot loader to pass arguments to the kernel. For these
+	  architectures, you should supply some command-line options at build
+	  time by entering them here. As a minimum, you should specify the
+	  memory size and the root device (e.g., mem=64M root=/dev/nfs).
+
+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 || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T
+	help
+	  If you say Y here, the LEDs on your machine will be used
+	  to provide useful information about your current system status.
+
+	  If you are compiling a kernel for a NetWinder or EBSA-285, you will
+	  be able to select which LEDs are active using the options below. If
+	  you are compiling a kernel for the EBSA-110 or the LART however, the
+	  red LED will simply flash regularly to indicate that the system is
+	  still functional. It is safe to say Y here if you have a CATS
+	  system, but the driver will do nothing.
+
+config LEDS_TIMER
+	bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T)
+	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_FTVPCI || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T
+	default y if ARCH_EBSA110
+	help
+	  If you say Y here, one of the system LEDs (the green one on the
+	  NetWinder, the amber one on the EBSA285, or the red one on the LART)
+	  will flash regularly to indicate that the system is still
+	  operational. This is mainly useful to kernel hackers who are
+	  debugging unstable kernels.
+
+	  The LART uses the same LED for both Timer LED and CPU usage LED
+	  functions. You may choose to use both, but the Timer LED function
+	  will overrule the CPU usage LED.
+
+config LEDS_CPU
+	bool "CPU usage LED"
+	depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T)
+	help
+	  If you say Y here, the red LED will be used to give a good real
+	  time indication of CPU usage, by lighting whenever the idle task
+	  is not currently executing.
+
+	  The LART uses the same LED for both Timer LED and CPU usage LED
+	  functions. You may choose to use both, but the Timer LED function
+	  will overrule the CPU usage LED.
+
+config ALIGNMENT_TRAP
+	bool
+	depends on CPU_32
+	default y
+	help
+	  ARM processors can not fetch/store information which is not
+	  naturally aligned on the bus, i.e., a 4 byte fetch must start at an
+	  address divisible by 4. On 32-bit ARM processors, these non-aligned
+	  fetch/store instructions will be emulated in software if you say
+	  here, which has a severe performance impact. This is necessary for
+	  correct operation of some network protocols. With an IP-only
+	  configuration it is safe to say N, otherwise say Y.
+
+endmenu
+
+source "drivers/parport/Kconfig"
+
+if ALIGNMENT_TRAP
+source "drivers/mtd/Kconfig"
+endif
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+source "drivers/acorn/block/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+endmenu
+
+#   source net/ax25/Config.in
+source "net/irda/Kconfig"
+
+source "net/ax25/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+#if [ "$CONFIG_ARCH_CLPS711X" = "y" ]; then
+#   source drivers/ssi/Config.in
+#fi
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+config KBDMOUSE
+	bool
+	depends on ARCH_ACORN && BUSMOUSE=y && !ARCH_RPC
+	default y
+
+config RPCMOUSE
+	bool
+	depends on ARCH_ACORN && BUSMOUSE=y && ARCH_RPC
+	default y
+
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	depends on !ARCH_ACORN && !ARCH_EBSA110
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+source "drivers/video/Kconfig"
+
+endmenu
+
+
+menu "Sound"
+	depends on ARCH_ACORN || ARCH_CLPS7500 || ARCH_TBOX || ARCH_SHARK || ARCH_SA1100 || PCI
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/misc/Kconfig"
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "Kernel hacking"
+
+# Always compile kernel with framepointer (until 2.4 real comes out)
+# Bug reports aren't much use without this.
+config NO_FRAME_POINTER
+	bool "Compile kernel without frame pointer"
+	help
+	  If you say Y here, the resulting kernel will be slightly smaller and
+	  faster. However, when a problem occurs with the kernel, the
+	  information that is reported is severely limited. Most people
+	  should say N here.
+
+config DEBUG_USER
+	bool "Verbose user fault messages"
+	help
+	  When a user program crashes due to an exception, the kernel can
+	  print a brief message explaining what the problem was. This is
+	  sometimes helpful for debugging but serves no purpose on a
+	  production system. Most people should say N here.
+
+config DEBUG_INFO
+	bool "Include debugging information in kernel binary"
+	help
+	  Say Y here to include source-level debugging information in the
+	  `vmlinux' binary image. This is handy if you want to use gdb or
+	  addr2line to debug the kernel. It has no impact on the in-memory
+	  footprint of the running kernel but it can increase the amount of
+	  time and disk space needed for compilation of the kernel. If in
+	  doubt say N.
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	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
+	  memory.
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and build SMP to catch missing spinlock initialization
+	  and certain other kinds of spinlock errors commonly made.  This is
+	  best used in conjunction with the NMI watchdog so that spinlock
+	  deadlocks are also debuggable.
+
+config DEBUG_WAITQ
+	bool "Wait queue debugging"
+	depends on DEBUG_KERNEL
+
+config DEBUG_BUGVERBOSE
+	bool "Verbose BUG() reporting (adds 70K)"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to make BUG() panics output the file name and line number
+	  of the BUG call as well as the EIP and oops trace.  This aids
+	  debugging but costs about 70-100K of memory.
+
+config DEBUG_ERRORS
+	bool "Verbose kernel error messages"
+	depends on DEBUG_KERNEL
+	help
+	  This option controls verbose debugging information which can be
+	  printed when the kernel detects an internal error. This debugging
+	  information is useful to kernel hackers when tracking down problems,
+	  but mostly meaningless to other people. It's safe to say Y unless
+	  you are concerned with the code size or don't want to see these
+	  messages.
+
+# These options are only for real kernel hackers who want to get their hands dirty. 
+config DEBUG_LL
+	bool "Kernel low-level debugging functions"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to include definitions of printascii, printchar, printhex
+	  in the kernel.  This is helpful if you are debugging code that
+	  executes before the console is initialized.
+
+config DEBUG_DC21285_PORT
+	bool "Kernel low-level debugging messages via footbridge serial port"
+	depends on DEBUG_LL && FOOTBRIDGE
+	help
+	  Say Y here if you want the debug print routines to direct their
+	  output to the serial port in the DC21285 (Footbridge). Saying N
+	  will cause the debug messages to appear on the first 16550
+	  serial port.
+
+config DEBUG_CLPS711X_UART2
+	bool "Kernel low-level debugging messages via UART2"
+	depends on DEBUG_LL && ARCH_CLPS711X
+	help
+	  Say Y here if you want the debug print routines to direct their
+	  output to the second serial port on these devices.  Saying N will
+	  cause the debug messages to appear on the first serial port.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/arm/config.in b/arch/arm/config.in
--- a/arch/arm/config.in	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,556 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-mainmenu_name "Linux Kernel Configuration"
-
-define_bool CONFIG_ARM y
-define_bool CONFIG_EISA n
-define_bool CONFIG_SBUS n
-define_bool CONFIG_MCA n
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_GENERIC_BUST_SPINLOCK n
-define_bool CONFIG_GENERIC_ISA_DMA n
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'System Type'
-
-choice 'ARM system type' \
-	"ADIFCC-based		CONFIG_ARCH_ADIFCC \
-	 Anakin			CONFIG_ARCH_ANAKIN \
-	 Archimedes/A5000	CONFIG_ARCH_ARCA5K \
-	 Cirrus-CL-PS7500FE     CONFIG_ARCH_CLPS7500 \
- 	 CLPS711x/EP721x-based	CONFIG_ARCH_CLPS711X \
-	 Co-EBSA285		CONFIG_ARCH_CO285 \
-	 PXA250/210-based	CONFIG_ARCH_PXA \
-	 EBSA-110		CONFIG_ARCH_EBSA110 \
- 	 Epxa10db               CONFIG_ARCH_CAMELOT \
-	 FootBridge		CONFIG_ARCH_FOOTBRIDGE \
-	 Integrator		CONFIG_ARCH_INTEGRATOR \
- 	 IOP310-based		CONFIG_ARCH_IOP310 \
-	 LinkUp-L7200		CONFIG_ARCH_L7200 \
-	 RiscPC			CONFIG_ARCH_RPC \
- 	 SA1100-based		CONFIG_ARCH_SA1100 \
-	 Shark			CONFIG_ARCH_SHARK" RiscPC
-
-source arch/arm/mach-arc/Config.in
-source arch/arm/mach-clps711x/Config.in
-source arch/arm/mach-epxa10db/Config.in
-source arch/arm/mach-footbridge/Config.in
-source arch/arm/mach-iop310/Config.in
-source arch/arm/mach-pxa/Config.in
-source arch/arm/mach-sa1100/Config.in
-
-# Definitions to make life easier
-if [ "$CONFIG_ARCH_ARCA5K" = "y" -o \
-     "$CONFIG_ARCH_RPC" = "y" ]; then
-   define_bool CONFIG_ARCH_ACORN y
-else
-   define_bool CONFIG_ARCH_ACORN n
-fi
-
-#####################################################################
-# Footbridge support
-if [ "$CONFIG_ARCH_CO285" = "y" -o \
-     "$CONFIG_ARCH_FOOTBRIDGE" = "y" ]; then
-   define_bool CONFIG_FOOTBRIDGE y
-else
-   define_bool CONFIG_FOOTBRIDGE n
-fi
-if [ "$CONFIG_ARCH_CATS" = "y" -o \
-     "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
-     "$CONFIG_ARCH_NETWINDER" = "y" -o \
-     "$CONFIG_ARCH_PERSONAL_SERVER" = "y" ]; then
-   define_bool CONFIG_FOOTBRIDGE_HOST y
-else
-   define_bool CONFIG_FOOTBRIDGE_HOST n
-fi
-if [ "$CONFIG_ARCH_CO285" = "y" -o \
-     "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then
-   define_bool CONFIG_FOOTBRIDGE_ADDIN y
-else
-   define_bool CONFIG_FOOTBRIDGE_ADDIN n
-fi
-if [ "$CONFIG_ARCH_EBSA285_HOST" = "y" -o \
-     "$CONFIG_ARCH_EBSA285_ADDIN" = "y" ]; then
-   define_bool CONFIG_ARCH_EBSA285 y
-fi
-
-#####################################################################
-# SA1111 support
-if [ "$CONFIG_ASSABET_NEPONSET" = "y" -o \
-     "$CONFIG_SA1100_ADSBITSY" = "y" -o \
-     "$CONFIG_SA1100_BADGE4" = "y" -o \
-     "$CONFIG_SA1100_CONSUS" = "y" -o \
-     "$CONFIG_SA1100_GRAPHICSMASTER" = "y" -o \
-     "$CONFIG_SA1100_JORNADA720" = "y" -o \
-     "$CONFIG_ARCH_LUBBOCK" = "y" -o \
-     "$CONFIG_SA1100_PFS168" = "y" -o \
-     "$CONFIG_SA1100_PT_SYSTEM3" = "y" -o \
-     "$CONFIG_SA1100_XP860" = "y" ]; then
-   define_bool CONFIG_SA1111 y
-   define_int CONFIG_FORCE_MAX_ZONEORDER 9
-else
-   define_bool CONFIG_SA1111 n
-fi
-
-comment 'Processor Type'
-
-# Figure out whether this system uses 26-bit or 32-bit CPUs.
-if [ "$CONFIG_ARCH_ARCA5K" = "y" ]; then
-   define_bool CONFIG_CPU_32 n
-   define_bool CONFIG_CPU_26 y
-else
-   define_bool CONFIG_CPU_32 y
-   define_bool CONFIG_CPU_26 n
-fi
-
-# Select CPU types depending on the architecture selected.  This selects
-# which CPUs we support in the kernel image, and the compiler instruction
-# optimiser behaviour.
-
-# ARM610
-if [ "$CONFIG_ARCH_RPC" = "y" ]; then
-   bool 'Support ARM610 processor' CONFIG_CPU_ARM610
-else
-   define_bool CONFIG_CPU_ARM610 n
-fi
-
-# ARM710
-if [ "$CONFIG_ARCH_CLPS7500" = "y" ]; then
-   define_bool CONFIG_CPU_ARM710 y
-else
-   if [ "$CONFIG_ARCH_RPC" = "y" ]; then
-      bool 'Support ARM710 processor' CONFIG_CPU_ARM710
-   else
-      define_bool CONFIG_CPU_ARM710 n
-   fi
-fi
-
-# ARM720T
-if [ "$CONFIG_ARCH_CLPS711X" = "y" -o \
-     "$CONFIG_ARCH_L7200"    = "y" -o \
-     "$CONFIG_ARCH_CDB89712" = "y" ]; then
-   define_bool CONFIG_CPU_ARM720T y
-else
-   if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-      bool 'Support ARM720T processor' CONFIG_CPU_ARM720T
-   else
-      define_bool CONFIG_CPU_ARM720T n
-   fi
-fi
-
-# ARM920T
-if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-   bool 'Support ARM920T processor' CONFIG_CPU_ARM920T
-else
-   define_bool CONFIG_CPU_ARM920T n
-fi
-
-# ARM922T
-if [ "$CONFIG_ARCH_CAMELOT" = "y" ]; then
-         define_bool CONFIG_CPU_ARM922T y
-else
-         define_bool CONFIG_CPU_ARM922T n
-fi
-
-# ARM926T
-if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-   bool 'Support ARM926T processor' CONFIG_CPU_ARM926T
-else
-   define_bool CONFIG_CPU_ARM926T n
-fi
-
-# ARM1020
-if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-   bool 'Support ARM1020 processor' CONFIG_CPU_ARM1020
-else
-    define_bool CONFIG_CPU_ARM1020 n
-fi
-
-# SA110
-if [ "$CONFIG_ARCH_EBSA110"  = "y" -o "$CONFIG_FOOTBRIDGE" = "y" -o \
-     "$CONFIG_ARCH_TBOX"     = "y" -o "$CONFIG_ARCH_SHARK" = "y" -o \
-     "$CONFIG_ARCH_NEXUSPCI" = "y" -o "$CONFIG_ARCH_ANAKIN" = "y" ]; then
-   define_bool CONFIG_CPU_SA110 y
-else
-   if [ "$CONFIG_ARCH_RPC" = "y" ]; then
-      bool 'Support StrongARM(R) SA-110 processor' CONFIG_CPU_SA110
-   else
-      define_bool CONFIG_CPU_SA110 n
-   fi
-fi
-
-# SA1100
-if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
-   define_bool CONFIG_CPU_SA1100 y
-else
-   define_bool CONFIG_CPU_SA1100 n
-fi
-
-# XScale
-if [ "$CONFIG_ARCH_IOP310" = "y" -o \
-     "$CONFIG_ARCH_ADIFCC" = "y" -o \
-     "$CONFIG_ARCH_PXA" = "y" ]; then
-   define_bool CONFIG_CPU_XSCALE y
-else
-   define_bool CONFIG_CPU_XSCALE n
-fi
-
-# Figure out what processor architecture version we should be using.
-# This defines the compiler instruction set which depends on the machine type.
-
-if [ "$CONFIG_ARCH_RPC"        = "y" -o "$CONFIG_ARCH_CLPS7500" = "y" ]; then
-   define_bool CONFIG_CPU_32v3 y
-else
-   define_bool CONFIG_CPU_32v3 n
-fi
-if [ "$CONFIG_ARCH_EBSA110"    = "y" -o "$CONFIG_FOOTBRIDGE"    = "y" -o \
-     "$CONFIG_ARCH_TBOX"       = "y" -o "$CONFIG_ARCH_SHARK"    = "y" -o \
-     "$CONFIG_ARCH_NEXUSPCI"   = "y" -o "$CONFIG_ARCH_CLPS711X" = "y" -o \
-     "$CONFIG_ARCH_INTEGRATOR" = "y" -o "$CONFIG_ARCH_SA1100"   = "y" -o \
-     "$CONFIG_ARCH_L7200"      = "y" -o "$CONFIG_ARCH_ANAKIN"	= "y" -o \
-     "$CONFIG_ARCH_CAMELOT"    = "y" ]; then
-   define_bool CONFIG_CPU_32v4 y
-else
-   define_bool CONFIG_CPU_32v4 n
-fi
-if [ "$CONFIG_ARCH_IOP310" = "y" -o \
-     "$CONFIG_ARCH_ADIFCC" = "y" -o \
-     "$CONFIG_ARCH_PXA" = "y" ]; then
-   define_bool CONFIG_CPU_32v5 y
-else
-   define_bool CONFIG_CPU_32v5 n
-fi
-
-comment 'Processor Features'
-
-if [ "$CONFIG_CPU_ARM720T" = "y" -o "$CONFIG_CPU_ARM920T" = "y" -o \
-     "$CONFIG_CPU_ARM922T" = "y" -o "$CONFIG_CPU_ARM926T" = "y" -o \
-     "$CONFIG_CPU_ARM1020" = "y" -o "$CONFIG_CPU_XSCALE" = "y" ]; then
-   dep_bool 'Support Thumb instructions (EXPERIMENTAL)' CONFIG_ARM_THUMB $CONFIG_EXPERIMENTAL
-else
-   define_bool CONFIG_ARM_THUMB n
-fi
-if [ "$CONFIG_CPU_ARM920T" = "y" -o "$CONFIG_CPU_ARM922T" = "y" -o \
-     "$CONFIG_CPU_ARM926T" = "y" -o "$CONFIG_CPU_ARM1020" = "y" ]; then
-   bool 'Disable I-Cache' CONFIG_CPU_ICACHE_DISABLE
-   bool 'Disable D-Cache' CONFIG_CPU_DCACHE_DISABLE
-   if [ "$CONFIG_CPU_DISABLE_DCACHE" = "n" ]; then
-      bool 'Force write through D-cache' CONFIG_CPU_DCACHE_WRITETHROUGH
-   fi
-fi
-if [ "$CONFIG_CPU_ARM926T" = "y" -o "$CONFIG_CPU_ARM1020" = "y" ]; then
-   if [ "$CONFIG_CPU_ICACHE_DISABLE" = "n" -o "$CONFIG_CPU_DCACHE_DISABLE" = "n" ]; then
-      bool 'Round robin I and D cache replacement algorithm' CONFIG_CPU_CACHE_ROUND_ROBIN
-   fi
-fi
-if [ "$CONFIG_CPU_ARM1020" = "y" ]; then
-   bool 'Disable branch prediction' CONFIG_CPU_BPREDICT_DISABLE
-fi
-
-if [ "$CONFIG_CPU_XSCALE" = "y" ]; then
-#  bool 'Use XScale PMU as timer source' CONFIG_XSCALE_PMU_TIMER
-   if [ "$CONFIG_XSCALE_PMU_TIMER" != "y" ]; then
-      define_bool CONFIG_XSCALE_PMU y
-   else
-      define_bool CONFIG_XSCALE_PMU n
-   fi
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-# Select various configuration options depending on the machine type
-if [ "$CONFIG_ARCH_EDB7211" = "y" -o \
-     "$CONFIG_ARCH_SA1100" = "y" ]; then
-   define_bool CONFIG_DISCONTIGMEM y
-else
-   define_bool CONFIG_DISCONTIGMEM n
-fi
-
-# Now handle the bus types
-if [ "$CONFIG_ARCH_FTVPCI" = "y" -o \
-     "$CONFIG_ARCH_SHARK" = "y" -o \
-     "$CONFIG_FOOTBRIDGE_HOST" = "y" -o \
-     "$CONFIG_ARCH_IOP310" = "y" ]; then
-   define_bool CONFIG_PCI y
-else
-   if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-      bool 'PCI support' CONFIG_PCI_INTEGRATOR
-      define_bool CONFIG_PCI $CONFIG_PCI_INTEGRATOR
-   else
-      define_bool CONFIG_PCI n
-   fi
-fi
-
-# Select the host bridge type
-if [ "$CONFIG_PCI" = "y" ]; then
-   if [ "$CONFIG_ARCH_FTVPCI" = "y" ]; then
-      define_bool CONFIG_PCI_HOST_PLX90X0 y
-   else
-      define_bool CONFIG_PCI_HOST_PLX90X0 n
-   fi
-   if [ "$CONFIG_ARCH_SHARK" = "y" ]; then
-      define_bool CONFIG_PCI_HOST_VIA82C505 y
-   else
-      define_bool CONFIG_PCI_HOST_VIA82C505 n
-   fi
-fi
-
-if [ "$CONFIG_FOOTBRIDGE_HOST" = "y" -o \
-     "$CONFIG_ARCH_SHARK" = "y" -o \
-     "$CONFIG_ARCH_CLPS7500" = "y" -o \
-     "$CONFIG_ARCH_EBSA110" = "y" -o \
-     "$CONFIG_ARCH_CDB89712" = "y" -o \
-     "$CONFIG_ARCH_EDB7211" = "y" -o \
-     "$CONFIG_ARCH_SA1100" = "y" ]; then
-   define_bool CONFIG_ISA y
-else
-   define_bool CONFIG_ISA n
-fi
-
-if [ "$CONFIG_FOOTBRIDGE_HOST" = "y" -o \
-     "$CONFIG_ARCH_SHARK" = "y" ]; then
-   define_bool CONFIG_ISA_DMA y
-else
-   define_bool CONFIG_ISA_DMA n
-fi
-
-if [ "$CONFIG_ARCH_ACORN" = "y" -o \
-     "$CONFIG_ARCH_L7200" = "y" ]; then
-   define_bool CONFIG_FIQ y
-else
-   define_bool CONFIG_FIQ n
-fi
-
-# Compressed boot loader in ROM.  Yes, we really want to ask about
-# TEXT and BSS so we preserve their values in the config files.
-bool 'Compressed boot loader in ROM/flash' CONFIG_ZBOOT_ROM
-hex 'Compressed ROM boot loader base address' CONFIG_ZBOOT_ROM_TEXT 0
-hex 'Compressed ROM boot loader BSS address' CONFIG_ZBOOT_ROM_BSS 0
-
-if [ "$CONFIG_ARCH_SA1100" = "y" -o \
-     "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-   dep_bool 'Support CPU clock change (EXPERIMENTAL)' CONFIG_CPU_FREQ $CONFIG_EXPERIMENTAL
-else
-   define_bool CONFIG_CPU_FREQ n
-fi
-
-if [ "$CONFIG_CPU_FREQ" = "y" ]; then
-   define_bool CONFIG_CPU_FREQ_24_API y
-   define_bool CONFIG_CPU_FREQ_26_API y
-else
-   define_bool CONFIG_CPU_FREQ_24_API n
-   define_bool CONFIG_CPU_FREQ_26_API n
-fi
-
-source drivers/pci/Config.in
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-if [ "$CONFIG_HOTPLUG" = "y" ]; then
-   source drivers/pcmcia/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-comment 'At least one math emulation must be selected'
-tristate 'NWFPE math emulation' CONFIG_FPE_NWFPE
-if [ "$CONFIG_CPU_26" = "n" -a "$CONFIG_CPU_32v3" = "n" ]; then
-   dep_tristate 'FastFPE math emulation (EXPERIMENTAL)' CONFIG_FPE_FASTFPE $CONFIG_EXPERIMENTAL
-fi
-choice 'Kernel core (/proc/kcore) format' \
-	"ELF		CONFIG_KCORE_ELF	\
-	 A.OUT		CONFIG_KCORE_AOUT" ELF
-tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-bool 'Power Management support' CONFIG_PM
-dep_bool 'Preemptible Kernel (EXPERIMENTAL)' CONFIG_PREEMPT $CONFIG_CPU_32 $CONFIG_EXPERIMENTAL
-dep_tristate 'Advanced Power Management Emulation' CONFIG_APM $CONFIG_PM
-dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32
-string 'Default kernel command string' CONFIG_CMDLINE ""
-
-if [ "$CONFIG_ARCH_NETWINDER" = "y" -o  \
-     "$CONFIG_ARCH_EBSA110" = "y" -o    \
-     "$CONFIG_ARCH_EBSA285" = "y" -o    \
-     "$CONFIG_ARCH_FTVPCI" = "y" -o     \
-     "$CONFIG_ARCH_SHARK" = "y" -o      \
-     "$CONFIG_ARCH_CO285" = "y" -o      \
-     "$CONFIG_ARCH_SA1100" = "y" -o     \
-     "$CONFIG_ARCH_LUBBOCK" = "y" -o    \
-     "$CONFIG_ARCH_PXA_IDP" = "y" -o \
-     "$CONFIG_ARCH_INTEGRATOR" = "y" -o \
-     "$CONFIG_ARCH_CDB89712" = "y" -o   \
-     "$CONFIG_ARCH_P720T" = "y" ]; then
-   bool 'Timer and CPU usage LEDs' CONFIG_LEDS
-   if [ "$CONFIG_LEDS" = "y" ]; then
-      if [ "$CONFIG_ARCH_NETWINDER" = "y" -o  \
-	   "$CONFIG_ARCH_EBSA285" = "y" -o    \
-	   "$CONFIG_ARCH_SHARK" = "y" -o      \
-	   "$CONFIG_ARCH_CO285" = "y" -o      \
-	   "$CONFIG_ARCH_SA1100" = "y" -o     \
-	   "$CONFIG_ARCH_LUBBOCK" = "y" -o    \
-	   "$CONFIG_ARCH_PXA_IDP" = "y" -o    \
-	   "$CONFIG_ARCH_INTEGRATOR" = "y" -o \
-	   "$CONFIG_ARCH_P720T" = "y" ]; then
-         bool '  Timer LED' CONFIG_LEDS_TIMER
-         bool '  CPU usage LED' CONFIG_LEDS_CPU
-      fi
-   fi
-   if [ "$CONFIG_ARCH_EBSA110" = "y" ]; then
-      define_bool CONFIG_LEDS_TIMER y
-   fi
-fi
-
-if [ "$CONFIG_CPU_32" = "y" ]; then
-   define_bool CONFIG_ALIGNMENT_TRAP y
-else
-   define_bool CONFIG_ALIGNMENT_TRAP n
-fi
-endmenu
-
-source drivers/parport/Config.in
-
-if [ "$CONFIG_ALIGNMENT_TRAP" = "y" ]; then
-  source drivers/mtd/Config.in
-else
-  define_bool CONFIG_MTD n
-fi
-
-source drivers/pnp/Config.in
-source drivers/block/Config.in
-source drivers/md/Config.in
-
-if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-   source drivers/acorn/block/Config.in
-fi
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-   fi
-   endmenu
-
-   source net/ax25/Config.in
-
-   source net/irda/Config.in
-fi
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_ARCH_CLPS711X" = "y" ]; then
-   source drivers/ssi/Config.in
-fi
-
-source drivers/ieee1394/Config.in
-
-source drivers/message/i2o/Config.in
-
-source drivers/isdn/Config.in
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-
-source drivers/char/Config.in
-if [ "$CONFIG_ARCH_ACORN" = "y" -a \
-     "$CONFIG_BUSMOUSE" = "y" ]; then
-   if [ "$CONFIG_ARCH_RPC" != "y" ]; then
-      define_bool CONFIG_KBDMOUSE y
-   else
-      define_bool CONFIG_RPCMOUSE y
-   fi
-fi
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then
-      bool 'VGA text console' CONFIG_VGA_CONSOLE
-   fi
-   source drivers/video/Config.in
-   endmenu
-fi
-
-if [ "$CONFIG_ARCH_ACORN" = "y" -o \
-     "$CONFIG_ARCH_CLPS7500" = "y" -o \
-     "$CONFIG_ARCH_TBOX" = "y" -o \
-     "$CONFIG_ARCH_SHARK" = "y" -o \
-     "$CONFIG_ARCH_SA1100" = "y" -o \
-     "$CONFIG_PCI" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Sound'
-
-   tristate 'Sound card support' CONFIG_SOUND
-   if [ "$CONFIG_SOUND" != "n" ]; then
-      source sound/Config.in
-   fi
-   endmenu
-fi
-
-source drivers/misc/Config.in
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-# Always compile kernel with framepointer (until 2.4 real comes out)
-# Bug reports aren't much use without this.
-bool 'Compile kernel without frame pointer' CONFIG_NO_FRAME_POINTER
-bool 'Verbose user fault messages' CONFIG_DEBUG_USER
-bool 'Include debugging information in kernel binary' CONFIG_DEBUG_INFO
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-dep_bool '  Debug memory allocations' CONFIG_DEBUG_SLAB $CONFIG_DEBUG_KERNEL
-dep_bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ $CONFIG_DEBUG_KERNEL
-dep_bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK $CONFIG_DEBUG_KERNEL
-dep_bool '  Wait queue debugging' CONFIG_DEBUG_WAITQ $CONFIG_DEBUG_KERNEL
-dep_bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE $CONFIG_DEBUG_KERNEL
-dep_bool '  Verbose kernel error messages' CONFIG_DEBUG_ERRORS $CONFIG_DEBUG_KERNEL
-# These options are only for real kernel hackers who want to get their hands dirty. 
-dep_bool '  Kernel low-level debugging functions' CONFIG_DEBUG_LL $CONFIG_DEBUG_KERNEL
-dep_bool '    Kernel low-level debugging messages via footbridge serial port' CONFIG_DEBUG_DC21285_PORT $CONFIG_DEBUG_LL $CONFIG_FOOTBRIDGE
-dep_bool '    Kernel low-level debugging messages via UART2' CONFIG_DEBUG_CLPS711X_UART2 $CONFIG_DEBUG_LL $CONFIG_ARCH_CLPS711X
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/arm/mach-arc/Config.help b/arch/arm/mach-arc/Config.help
--- a/arch/arm/mach-arc/Config.help	Wed Oct 30 16:44:25 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,24 +0,0 @@
-CONFIG_ARCH_ARCA5K
-  This selects what ARM system you wish to build the kernel for. It
-  also selects to some extent the CPU type. If you are unsure what
-  to set this option to, please consult any information supplied with
-  your system.
-
-CONFIG_ARCH_A5K
-  Say Y here to to support the Acorn A5000.  Linux can support the
-  internal IDE disk and CD-ROM interface, serial and parallel port,
-  and the floppy drive.  Note that on some A5000s the floppy is
-  plugged into the wrong socket on the motherboard.
-
-CONFIG_ARCH_ARC
-  The Acorn Archimedes was an personal computer based on an 8K ARM2
-  processor, released in 1987.  It supported 512K of RAM and 2 800K
-  floppy disks.  Picture and more detailed specifications at
-  <http://www.computingmuseum.com/museum/archi.htm>.
-
-CONFIG_PAGESIZE_16
-  Say Y here if your Archimedes or A5000 system has only 2MB of
-  memory, otherwise say N.  The resulting kernel will not run on a
-  machine with 4MB of memory.
-
-
diff -Nru a/arch/arm/mach-arc/Config.in b/arch/arm/mach-arc/Config.in
--- a/arch/arm/mach-arc/Config.in	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,15 +0,0 @@
-mainmenu_option next_comment
-comment 'Archimedes/A5000 Implementations'
-# These architectures will be combined.  However, until this
-# is complete...  Note that the ARC will take precedence over
-# A5K
-comment 'Archimedes/A5000 Implementations (select only ONE)'
-dep_bool '  Archimedes' CONFIG_ARCH_ARC $CONFIG_ARCH_ARCA5K
-dep_bool '  A5000' CONFIG_ARCH_A5K $CONFIG_ARCH_ARCA5K
-
-if [ "$CONFIG_ARCH_ARCA5K" = "y" ]; then
-   bool '2MB physical memory' CONFIG_PAGESIZE_16
-fi
-
-endmenu
-
diff -Nru a/arch/arm/mach-arc/Kconfig b/arch/arm/mach-arc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-arc/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,36 @@
+
+menu "Archimedes/A5000 Implementations"
+
+# These architectures will be combined.  However, until this
+# is complete...  Note that the ARC will take precedence over
+# A5K
+comment "Archimedes/A5000 Implementations (select only ONE)"
+
+config ARCH_ARC
+	bool "Archimedes"
+	depends on ARCH_ARCA5K
+	help
+	  The Acorn Archimedes was an personal computer based on an 8K ARM2
+	  processor, released in 1987.  It supported 512K of RAM and 2 800K
+	  floppy disks.  Picture and more detailed specifications at
+	  <http://www.computingmuseum.com/museum/archi.htm>.
+
+config ARCH_A5K
+	bool "A5000"
+	depends on ARCH_ARCA5K
+	help
+	  Say Y here to to support the Acorn A5000.  Linux can support the
+	  internal IDE disk and CD-ROM interface, serial and parallel port,
+	  and the floppy drive.  Note that on some A5000s the floppy is
+	  plugged into the wrong socket on the motherboard.
+
+config PAGESIZE_16
+	bool "2MB physical memory"
+	depends on ARCH_ARCA5K
+	help
+	  Say Y here if your Archimedes or A5000 system has only 2MB of
+	  memory, otherwise say N.  The resulting kernel will not run on a
+	  machine with 4MB of memory.
+
+endmenu
+
diff -Nru a/arch/arm/mach-clps711x/Config.help b/arch/arm/mach-clps711x/Config.help
--- a/arch/arm/mach-clps711x/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,33 +0,0 @@
-CONFIG_ARCH_AUTCPU12
-  Say Y if you intend to run the kernel on the autronix autcpu12
-  board. This board is based on a Cirrus Logic CS89712.
-
-CONFIG_ARCH_CDB89712
-  This is an evaluation board from Cirrus for the CS89712 processor.
-  The board includes 2 serial ports, Ethernet, IRDA, and expansion
-  headers.  It comes with 16 MB SDRAM and 8 MB flash ROM.
-
-CONFIG_ARCH_CEIVA
-  Say Y here if you intend to run this kernel on the Ceiva/Polaroid
-  PhotoMax Digital Picture Frame.
-
-CONFIG_ARCH_EDB7211
-  Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
-  evaluation board.
-
-CONFIG_ARCH_P720T
-  Say Y here if you intend to run this kernel on the ARM Prospector
-  720T.
-
-CONFIG_EP72XX_ROM_BOOT
-  If you say Y here, your CLPS711x-based kernel will use the bootstrap
-  mode memory map instead of the normal memory map.
-
-  Processors derived from the Cirrus CLPS-711X core support two boot
-  modes.  Normal mode boots from the external memory device at CS0.
-  Bootstrap mode rearranges parts of the memory map, placing an
-  internal 128 byte bootstrap ROM at CS0.  This option performs the
-  address map changes required to support booting in this mode.
-
-  You almost surely want to say N here.
-
diff -Nru a/arch/arm/mach-clps711x/Config.in b/arch/arm/mach-clps711x/Config.in
--- a/arch/arm/mach-clps711x/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,31 +0,0 @@
-mainmenu_option next_comment
-comment 'CLPS711X/EP721X Implementations'
-dep_bool '  AUTCPU12' CONFIG_ARCH_AUTCPU12 $CONFIG_ARCH_CLPS711X
-dep_bool '  CDB89712' CONFIG_ARCH_CDB89712 $CONFIG_ARCH_CLPS711X
-dep_bool '  CEIVA' CONFIG_ARCH_CEIVA $CONFIG_ARCH_CLPS711X
-dep_bool '  CLEP7312' CONFIG_ARCH_CLEP7312 $CONFIG_ARCH_CLPS711X
-dep_bool '  EDB7211' CONFIG_ARCH_EDB7211 $CONFIG_ARCH_CLPS711X
-dep_bool '  P720T' CONFIG_ARCH_P720T $CONFIG_ARCH_CLPS711X
-dep_bool '  FORTUNET' CONFIG_ARCH_FORTUNET $CONFIG_ARCH_CLPS711X
-
-# XXX Maybe these should indicate register compatibility
-# instead of being mutually exclusive.
-if [ "$CONFIG_ARCH_EDB7211" = "y" ]; then
-   define_bool CONFIG_ARCH_EP7211 y
-else
-   define_bool CONFIG_ARCH_EP7211 n
-fi
-
-if [ "$CONFIG_ARCH_P720T" = "y" -o \
-     "$CONFIG_ARCH_CEIVA" = "y" ]; then
-   define_bool CONFIG_ARCH_EP7212 y
-else
-   define_bool CONFIG_ARCH_EP7212 n
-fi
-
-if [ "$CONFIG_ARCH_EP7211" = "y" -o \
-     "$CONFIG_ARCH_EP7212" = "y" ]; then
-   bool '  EP72xx ROM boot' CONFIG_EP72XX_ROM_BOOT
-fi
-endmenu
-
diff -Nru a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-clps711x/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,76 @@
+
+menu "CLPS711X/EP721X Implementations"
+
+config ARCH_AUTCPU12
+	bool "AUTCPU12"
+	depends on ARCH_CLPS711X
+	help
+	  Say Y if you intend to run the kernel on the autronix autcpu12
+	  board. This board is based on a Cirrus Logic CS89712.
+
+config ARCH_CDB89712
+	bool "CDB89712"
+	depends on ARCH_CLPS711X
+	help
+	  This is an evaluation board from Cirrus for the CS89712 processor.
+	  The board includes 2 serial ports, Ethernet, IRDA, and expansion
+	  headers.  It comes with 16 MB SDRAM and 8 MB flash ROM.
+
+config ARCH_CEIVA
+	bool "CEIVA"
+	depends on ARCH_CLPS711X
+	help
+	  Say Y here if you intend to run this kernel on the Ceiva/Polaroid
+	  PhotoMax Digital Picture Frame.
+
+config ARCH_CLEP7312
+	bool "CLEP7312"
+	depends on ARCH_CLPS711X
+
+config ARCH_EDB7211
+	bool "EDB7211"
+	depends on ARCH_CLPS711X
+	help
+	  Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
+	  evaluation board.
+
+config ARCH_P720T
+	bool "P720T"
+	depends on ARCH_CLPS711X
+	help
+	  Say Y here if you intend to run this kernel on the ARM Prospector
+	  720T.
+
+config ARCH_FORTUNET
+	bool "FORTUNET"
+	depends on ARCH_CLPS711X
+
+# XXX Maybe these should indicate register compatibility
+# instead of being mutually exclusive.
+config ARCH_EP7211
+	bool
+	depends on ARCH_EDB7211
+	default y
+
+config ARCH_EP7212
+	bool
+	depends on ARCH_P720T || ARCH_CEIVA
+	default y
+
+config EP72XX_ROM_BOOT
+	bool "EP72xx ROM boot"
+	depends on ARCH_EP7211 || ARCH_EP7212
+	---help---
+	  If you say Y here, your CLPS711x-based kernel will use the bootstrap
+	  mode memory map instead of the normal memory map.
+
+	  Processors derived from the Cirrus CLPS-711X core support two boot
+	  modes.  Normal mode boots from the external memory device at CS0.
+	  Bootstrap mode rearranges parts of the memory map, placing an
+	  internal 128 byte bootstrap ROM at CS0.  This option performs the
+	  address map changes required to support booting in this mode.
+
+	  You almost surely want to say N here.
+
+endmenu
+
diff -Nru a/arch/arm/mach-epxa10db/Config.help b/arch/arm/mach-epxa10db/Config.help
--- a/arch/arm/mach-epxa10db/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-CONFIG_PLD_HOTSWAP
-  This enables support for the dynamic loading and configuration of
-  compatible drivers when the contents of the PLD are changed. This
-  is still experimental and requires configuration tools which are
-  not yet generally available. Say N here. You must enable the kernel
-  module loader for this feature to work.
-
-
diff -Nru a/arch/arm/mach-epxa10db/Config.in b/arch/arm/mach-epxa10db/Config.in
--- a/arch/arm/mach-epxa10db/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-mainmenu_option next_comment
-comment 'Epxa10db'
-
-if [ "$CONFIG_ARCH_CAMELOT" = "y" ]; then
-   comment 'PLD hotswap support'
-   define_bool CONFIG_PLD y
-   dep_bool 'Support for PLD device hotplugging (experimental)' CONFIG_PLD_HOTSWAP $CONFIG_EXPERIMENTAL
-fi
-
-endmenu
diff -Nru a/arch/arm/mach-epxa10db/Kconfig b/arch/arm/mach-epxa10db/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-epxa10db/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,23 @@
+
+menu "Epxa10db"
+
+comment "PLD hotswap support"
+	depends on ARCH_CAMELOT
+
+config PLD
+	bool
+	depends on ARCH_CAMELOT
+	default y
+
+config PLD_HOTSWAP
+	bool "Support for PLD device hotplugging (experimental)"
+	depends on ARCH_CAMELOT && EXPERIMENTAL
+	help
+	  This enables support for the dynamic loading and configuration of
+	  compatible drivers when the contents of the PLD are changed. This
+	  is still experimental and requires configuration tools which are
+	  not yet generally available. Say N here. You must enable the kernel
+	  module loader for this feature to work.
+
+endmenu
+
diff -Nru a/arch/arm/mach-footbridge/Config.help b/arch/arm/mach-footbridge/Config.help
--- a/arch/arm/mach-footbridge/Config.help	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,40 +0,0 @@
-CONFIG_ARCH_CATS
-  Say Y here if you intend to run this kernel on the CATS.
-
-  Saying N will reduce the size of the Footbridge kernel.
-
-CONFIG_ARCH_EBSA285_ADDIN
-  Say Y here if you intend to run this kernel on the EBSA285 card
-  in addin mode.
-
-  Saying N will reduce the size of the Footbridge kernel.
-
-CONFIG_ARCH_EBSA285_HOST
-  Say Y here if you intend to run this kernel on the EBSA285 card
-  in host ("central function") mode.
-
-  Saying N will reduce the size of the Footbridge kernel.
-
-CONFIG_ARCH_NETWINDER
-  Say Y here if you intend to run this kernel on the Rebel.COM
-  NetWinder.  Information about this machine can be found at:
-
-  <http://www.netwinder.org/>
-
-  Saying N will reduce the size of the Footbridge kernel.
-
-CONFIG_ARCH_PERSONAL_SERVER
-  Say Y here if you intend to run this kernel on the Compaq
-  Personal Server.
-
-  Saying N will reduce the size of the Footbridge kernel.
-
-  The Compaq Personal Server is not available for purchase.
-  There are no product plans beyond the current research
-  prototypes at this time.  Information is available at:
-
-  <http://crl.research.compaq.com/projects/personalserver/>
-
-  If you have any questions or comments about the  Compaq Personal
-  Server, send e-mail to skiff@crl.dec.com.
-
diff -Nru a/arch/arm/mach-footbridge/Config.in b/arch/arm/mach-footbridge/Config.in
--- a/arch/arm/mach-footbridge/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,9 +0,0 @@
-mainmenu_option next_comment
-comment 'Footbridge Implementations'
-dep_bool '  CATS' CONFIG_ARCH_CATS $CONFIG_ARCH_FOOTBRIDGE
-dep_bool '  Compaq Personal Server' CONFIG_ARCH_PERSONAL_SERVER $CONFIG_ARCH_FOOTBRIDGE
-dep_bool '  EBSA285 (addin mode)' CONFIG_ARCH_EBSA285_ADDIN $CONFIG_ARCH_FOOTBRIDGE
-dep_bool '  EBSA285 (host mode)' CONFIG_ARCH_EBSA285_HOST $CONFIG_ARCH_FOOTBRIDGE
-dep_bool '  NetWinder' CONFIG_ARCH_NETWINDER $CONFIG_ARCH_FOOTBRIDGE
-endmenu
-
diff -Nru a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-footbridge/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,60 @@
+
+menu "Footbridge Implementations"
+
+config ARCH_CATS
+	bool "CATS"
+	depends on ARCH_FOOTBRIDGE
+	help
+	  Say Y here if you intend to run this kernel on the CATS.
+
+	  Saying N will reduce the size of the Footbridge kernel.
+
+config ARCH_PERSONAL_SERVER
+	bool "Compaq Personal Server"
+	depends on ARCH_FOOTBRIDGE
+	---help---
+	  Say Y here if you intend to run this kernel on the Compaq
+	  Personal Server.
+
+	  Saying N will reduce the size of the Footbridge kernel.
+
+	  The Compaq Personal Server is not available for purchase.
+	  There are no product plans beyond the current research
+	  prototypes at this time.  Information is available at:
+
+	  <http://crl.research.compaq.com/projects/personalserver/>
+
+	  If you have any questions or comments about the  Compaq Personal
+	  Server, send e-mail to skiff@crl.dec.com.
+
+config ARCH_EBSA285_ADDIN
+	bool "EBSA285 (addin mode)"
+	depends on ARCH_FOOTBRIDGE
+	help
+	  Say Y here if you intend to run this kernel on the EBSA285 card
+	  in addin mode.
+
+	  Saying N will reduce the size of the Footbridge kernel.
+
+config ARCH_EBSA285_HOST
+	bool "EBSA285 (host mode)"
+	depends on ARCH_FOOTBRIDGE
+	help
+	  Say Y here if you intend to run this kernel on the EBSA285 card
+	  in host ("central function") mode.
+
+	  Saying N will reduce the size of the Footbridge kernel.
+
+config ARCH_NETWINDER
+	bool "NetWinder"
+	depends on ARCH_FOOTBRIDGE
+	help
+	  Say Y here if you intend to run this kernel on the Rebel.COM
+	  NetWinder.  Information about this machine can be found at:
+
+	  <http://www.netwinder.org/>
+
+	  Saying N will reduce the size of the Footbridge kernel.
+
+endmenu
+
diff -Nru a/arch/arm/mach-iop310/Config.help b/arch/arm/mach-iop310/Config.help
--- a/arch/arm/mach-iop310/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,5 +0,0 @@
-CONFIG_ARCH_IQ80310
-  Say Y here if you want to run your kernel on the Intel IQ80310
-  evaluation kit for the IOP310 chipset.
-
-
diff -Nru a/arch/arm/mach-iop310/Config.in b/arch/arm/mach-iop310/Config.in
--- a/arch/arm/mach-iop310/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-mainmenu_option next_comment
-comment 'IOP310 Implementation Options'
-dep_bool '  IQ80310' CONFIG_ARCH_IQ80310 $CONFIG_ARCH_IOP310
-comment 'IOP310 Chipset Features'
-dep_bool 'Support Intel 80312 Application Accelerator Unit (EXPERIMENTAL)' CONFIG_IOP310_AAU $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
-dep_bool 'Support Intel 80312 DMA (EXPERIMENTAL)' CONFIG_IOP310_DMA $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
-dep_bool 'Support Intel 80312 Messaging Unit (EXPERIMENTAL)' CONFIG_IOP310_MU $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
-dep_bool 'Support Intel 80312 Performance Monitor (EXPERIMENTAL)' CONFIG_IOP310_PMON $CONFIG_ARCH_IOP310 $CONFIG_EXPERIMENTAL
-endmenu
-
diff -Nru a/arch/arm/mach-iop310/Kconfig b/arch/arm/mach-iop310/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-iop310/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,30 @@
+
+menu "IOP310 Implementation Options"
+
+config ARCH_IQ80310
+	bool "IQ80310"
+	depends on ARCH_IOP310
+	help
+	  Say Y here if you want to run your kernel on the Intel IQ80310
+	  evaluation kit for the IOP310 chipset.
+
+comment "IOP310 Chipset Features"
+
+config IOP310_AAU
+	bool "Support Intel 80312 Application Accelerator Unit (EXPERIMENTAL)"
+	depends on ARCH_IOP310 && EXPERIMENTAL
+
+config IOP310_DMA
+	bool "Support Intel 80312 DMA (EXPERIMENTAL)"
+	depends on ARCH_IOP310 && EXPERIMENTAL
+
+config IOP310_MU
+	bool "Support Intel 80312 Messaging Unit (EXPERIMENTAL)"
+	depends on ARCH_IOP310 && EXPERIMENTAL
+
+config IOP310_PMON
+	bool "Support Intel 80312 Performance Monitor (EXPERIMENTAL)"
+	depends on ARCH_IOP310 && EXPERIMENTAL
+
+endmenu
+
diff -Nru a/arch/arm/mach-pxa/Config.in b/arch/arm/mach-pxa/Config.in
--- a/arch/arm/mach-pxa/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,6 +0,0 @@
-mainmenu_option next_comment
-comment 'Intel PXA250/210 Implementations'
-dep_bool '  Intel DBPXA250 Development Platform' CONFIG_ARCH_LUBBOCK $CONFIG_ARCH_PXA
-dep_bool '  Accelent Xscale IDP' CONFIG_ARCH_PXA_IDP $CONFIG_ARCH_PXA
-endmenu
-
diff -Nru a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-pxa/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,13 @@
+
+menu "Intel PXA250/210 Implementations"
+
+config ARCH_LUBBOCK
+	bool "Intel DBPXA250 Development Platform"
+	depends on ARCH_PXA
+
+config ARCH_PXA_IDP
+	bool "Accelent Xscale IDP"
+	depends on ARCH_PXA
+
+endmenu
+
diff -Nru a/arch/arm/mach-sa1100/Config.help b/arch/arm/mach-sa1100/Config.help
--- a/arch/arm/mach-sa1100/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,189 +0,0 @@
-CONFIG_SA1100_ASSABET
-  Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
-  Microprocessor Development Board (also known as the Assabet).
-
-CONFIG_ASSABET_NEPONSET
-  Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
-  Microprocessor Development Board (Assabet)  with the SA-1111
-  Development Board (Nepon).
-
-CONFIG_SA1100_ADSBITSY
-  Say Y here if you are using Applied Data Systems Intel(R)
-  StrongARM(R) 1110 based Bitsy, 3 x 5 inches in size, Compaq - IPAQ -
-  like platform. See
-  <http://www.applieddata.net/products_bitsySpec.asp> for more
-  information.
-
-CONFIG_SA1100_BRUTUS
-  Say Y here if you are using the Intel(R) StrongARM(R) SA-1100
-  Microprocessor Development Board (also known as the Brutus).
-
-CONFIG_SA1100_CERF
-  The Intrinsyc CerfBoard is based on the StrongARM 1110.
-  More information is available at:
-  <http://www.intrinsyc.com/products/referenceplatforms/cerfboard.html>.
-
-  Say Y if configuring for an Intrinsyc CerfBoard.
-  Say N otherwise.
-
-CONFIG_SA1100_CERF_CPLD
-  Say Y here to support the Linux CerfPDA development kit from
-  Intrinsyc. This is a StrongARM-1110-based reference platform for
-  designing custom PDAs.  Product info is at
-  <http://www.intrinsyc.com/products/referencedesigns/cerfpda.asp>.
-
-CONFIG_SA1100_H3100
-  Say Y here if you intend to run this kernel on the Compaq iPAQ
-  H3100 handheld computer.  Information about this machine and the
-  Linux port to this machine can be found at:
-
-  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3100>
-  <http://www.compaq.com/products/handhelds/pocketpc/>
-
-CONFIG_SA1100_H3600
-  Say Y here if you intend to run this kernel on the Compaq iPAQ
-  H3600 handheld computer.  Information about this machine and the
-  Linux port to this machine can be found at:
-
-  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3600>
-  <http://www.compaq.com/products/handhelds/pocketpc/>
-
-CONFIG_SA1100_H3800
-  Say Y here if you intend to run this kernel on the Compaq iPAQ H3800
-  series handheld computer.  Information about this machine and the
-  Linux port to this machine can be found at:
-
-  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3800>
-  <http://www.compaq.com/products/handhelds/pocketpc/>
-
-CONFIG_H3600_SLEEVE
-  Choose this option to enable support for extension packs (sleeves)
-  for the Compaq iPAQ H3XXX series of handheld computers.  This option
-  is required for the CF, PCMCIA, Bluetooth and GSM/GPRS extension
-  packs.
-
-CONFIG_SA1100_FLEXANET
-  Say Y here if you intend to run this kernel on the FlexaNet
-  handheld instruments. Information about this machine can be
-  found at: <http://www.flexanet.com/>.
-
-CONFIG_SA1100_FREEBIRD
-  Support the FreeBird board used in Coventive embedded products.  See
-  Documentation/arm/SA1100/Freebird for more.
-
-CONFIG_SA1100_GRAPHICSCLIENT
-  Say Y here if you are using an Applied Data Systems Intel(R)
-  StrongARM(R) SA-1100 based Graphics Client SBC.  See
-  <http://www.flatpanels.com/> for information on this system.
-
-CONFIG_SA1100_GRAPHICSMASTER
-  Say Y here if you are using an Applied Data Systems Intel(R)
-  StrongARM(R) SA-1100 based Graphics Master SBC with SA-1111
-  StrongARM companion chip.  See
-  <http://www.applieddata.net/products_masterSpec.asp> for information
-  on this system.
-
-CONFIG_SA1100_BADGE4
-  Say Y here if you want to build a kernel for the HP Laboratories
-  BadgePAD 4.
-
-CONFIG_SA1100_JORNADA720
-  Say Y here if you want to build a kernel for the HP Jornada 720
-  handheld computer.  See <http://www.hp.com/jornada/products/720>
-  for details.
-
-CONFIG_SA1100_HUW_WEBPANEL
-  Say Y here to support the HuW Webpanel produced by Hoeft & Wessel
-  AG.  English-language website is at
-  <http://www.hoeft-wessel.de/en.htm>; credits and build instructions
-  at Documentation/arm/SA1100/HUW_WEBPANEL.
-
-CONFIG_SA1100_ITSY
-  Say Y here if you are using the Compaq Itsy experimental pocket
-  computer. See <http://research.compaq.com/wrl/projects/itsy/> for
-  more information.
-
-CONFIG_SA1100_LART
-  Say Y here if you are using the Linux Advanced Radio Terminal
-  (also known as the LART).  See <http://www.lart.tudelft.nl/> for
-  information on the LART.
-
-CONFIG_SA1100_NANOENGINE
-  The nanoEngine is a StrongARM 1110-based single board computer
-  from Bright Star Engineering. More information is available at:
-  <http://www.brightstareng.com/arm/nanoeng.htm>.
-
-  Say Y if configuring for a nanoEngine.
-  Say N otherwise.
-
-CONFIG_SA1100_OMNIMETER
-  Say Y here if you are using the inhand electronics OmniMeter.  See
-  <http://www.inhandelectronics.com/html/omni1.html> for details.
-
-CONFIG_SA1100_PANGOLIN
-  Pangolin is a StrongARM 1110-based evaluation platform produced
-  by Dialogue Technology.  It has EISA slots for ease of configuration
-  with SDRAM/Flash memory card, USB/Serial/Audio card, Compact Flash
-  card, and TFT-LCD card.
-
-  Say Y if configuring for a Pangolin.
-  Say N otherwise.
-
-CONFIG_SA1100_PLEB
-  Say Y here if you are using a Portable Linux Embedded Board
-  (also known as PLEB). See <http://www.cse.unsw.edu.au/~pleb/>
-  for more information.
-
-CONFIG_SA1100_PT_SYSTEM3
-   Say Y here if you intend to build a kernel suitable to run on
-   a Pruftechnik Digital Board. For more information see
-   <http://www.pruftechnik.com>
-
-CONFIG_SA1100_SHANNON
-  The Shannon (also known as a Tuxscreen, and also as a IS2630) was a
-  limited edition webphone produced by Philips. The Shannon is a SA1100
-  platform with a 640x480 LCD, touchscreen, CIR keyboard, PCMCIA slots,
-  and a telco interface.
-
-CONFIG_SA1100_SHERMAN
-  Say Y here to support the Blazie Engineering `Sherman' StrongARM
-  1110-based SBC, used primarily in assistance products for the
-  visually impaired.  The company is now Freedom Scientific, with
-  a website at <http://www.freedomscientific.com/index.html>. The
-  Sherman product, however, appears to have been discontinued.
-
-CONFIG_SA1100_SIMPAD
-  The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
-  are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
-  FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a
-  PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same
-  like CL4 in additional it has a PCMCIA-Slot. For more information
-  visit <http://www.my-siemens.com or www.siemens.ch>.
-
-CONFIG_SA1100_PFS168
-  The Radisys Corp. PFS-168 (aka Tulsa) is an Intel® StrongArm® SA-1110 based
-  computer which includes the SA-1111 Microprocessor Companion Chip and other
-  custom I/O designed to add connectivity and multimedia features for vending
-  and business machine applications. Say Y here if you require support for
-  this target.
-
-CONFIG_SA1100_VICTOR
-  Say Y here if you are using a Visu Aide Intel(R) StrongARM(R)
-  SA-1100 based Victor Digital Talking Book Reader.  See
-  <http://www.visuaide.com/pagevictor.en.html> for information on
-  this system.
-
-CONFIG_SA1100_XP860
-  :: Config help missing ::
-  :: 06 August 2002 ::
-
-CONFIG_SA1100_YOPY
-  Say Y here to support the Yopy PDA.  Product information at
-  <http://www.yopy.com/>.  See Documentation/arm/SA110/Yopy
-  for more.
-
-CONFIG_SA1100_STORK
-  Say Y here if you intend to run this kernel on the Stork
-  handheld computer.
-
-
diff -Nru a/arch/arm/mach-sa1100/Config.in b/arch/arm/mach-sa1100/Config.in
--- a/arch/arm/mach-sa1100/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,58 +0,0 @@
-mainmenu_option next_comment
-comment 'SA11x0 Implementations'
-dep_bool '  Assabet' CONFIG_SA1100_ASSABET $CONFIG_ARCH_SA1100
-dep_bool '    Include support for Neponset' CONFIG_ASSABET_NEPONSET $CONFIG_SA1100_ASSABET
-dep_bool '  ADS Bitsy' CONFIG_SA1100_ADSBITSY $CONFIG_ARCH_SA1100
-dep_bool '  Brutus' CONFIG_SA1100_BRUTUS $CONFIG_ARCH_SA1100
-dep_bool '  CerfBoard' CONFIG_SA1100_CERF $CONFIG_ARCH_SA1100
-if [ "$CONFIG_SA1100_CERF" = "y" ]; then
-   choice 'Cerf Flash available'  \
-        "8MB    CONFIG_SA1100_CERF_FLASH_8MB \
-         16MB   CONFIG_SA1100_CERF_FLASH_16MB \
-         32MB   CONFIG_SA1100_CERF_FLASH_32MB" 8MB
-   bool 'Cerf w/CPLD support (CerfPDA)' CONFIG_SA1100_CERF_CPLD
-fi
-dep_bool '  Compaq iPAQ H3100' CONFIG_SA1100_H3100 $CONFIG_ARCH_SA1100
-dep_bool '  Compaq iPAQ H3600/H3700' CONFIG_SA1100_H3600 $CONFIG_ARCH_SA1100
-dep_bool '  Compaq iPAQ H3800' CONFIG_SA1100_H3800 $CONFIG_ARCH_SA1100
-if [ "$CONFIG_SA1100_H3100" = "y" -o "$CONFIG_SA1100_H3600" = "y" -o "$CONFIG_SA1100_H3800" = "y" ]; then
-  define_bool CONFIG_SA1100_H3XXX y
-else
-  define_bool CONFIG_SA1100_H3XXX n
-fi
-#dep_bool '  Consus' CONFIG_SA1100_CONSUS $CONFIG_ARCH_SA1100
-#dep_bool '  Empeg' CONFIG_SA1100_EMPEG $CONFIG_ARCH_SA1100
-dep_bool '  Extenex HandHeld Theater (Squashtail)' CONFIG_SA1100_EXTENEX1 $CONFIG_ARCH_SA1100
-if [ "$CONFIG_SA1100_EXTENEX1" = "y" ]; then
-   bool '    Support 16 MB of DRAM (not just 8)' CONFIG_SA1100_EXTENEX1_16MB
-fi
-dep_bool '  FlexaNet' CONFIG_SA1100_FLEXANET $CONFIG_ARCH_SA1100
-dep_bool '  FreeBird-v1.1' CONFIG_SA1100_FREEBIRD $CONFIG_ARCH_SA1100
-dep_bool '  GraphicsClient Plus' CONFIG_SA1100_GRAPHICSCLIENT $CONFIG_ARCH_SA1100
-dep_bool '  GraphicsMaster' CONFIG_SA1100_GRAPHICSMASTER $CONFIG_ARCH_SA1100
-dep_bool '  HP Labs BadgePAD 4' CONFIG_SA1100_BADGE4 $CONFIG_ARCH_SA1100
-dep_bool '  HP Jornada 720' CONFIG_SA1100_JORNADA720 $CONFIG_ARCH_SA1100
-dep_bool '  HuW WebPanel' CONFIG_SA1100_HUW_WEBPANEL $CONFIG_ARCH_SA1100
-dep_bool '  Itsy' CONFIG_SA1100_ITSY $CONFIG_ARCH_SA1100
-dep_bool '  LART' CONFIG_SA1100_LART $CONFIG_ARCH_SA1100
-dep_bool '  nanoEngine' CONFIG_SA1100_NANOENGINE $CONFIG_ARCH_SA1100
-dep_bool '  OmniMeter' CONFIG_SA1100_OMNIMETER $CONFIG_ARCH_SA1100
-dep_bool '  Pangolin' CONFIG_SA1100_PANGOLIN $CONFIG_ARCH_SA1100
-dep_bool '  PLEB' CONFIG_SA1100_PLEB $CONFIG_ARCH_SA1100
-dep_bool '  PT System 3' CONFIG_SA1100_PT_SYSTEM3 $CONFIG_ARCH_SA1100
-dep_bool '  Shannon' CONFIG_SA1100_SHANNON $CONFIG_ARCH_SA1100
-dep_bool '  Sherman' CONFIG_SA1100_SHERMAN $CONFIG_ARCH_SA1100
-dep_bool '  Simpad' CONFIG_SA1100_SIMPAD $CONFIG_ARCH_SA1100
-dep_bool '  Tulsa' CONFIG_SA1100_PFS168 $CONFIG_ARCH_SA1100
-dep_bool '  Victor' CONFIG_SA1100_VICTOR $CONFIG_ARCH_SA1100
-dep_bool '  XP860' CONFIG_SA1100_XP860 $CONFIG_ARCH_SA1100
-dep_bool '  Yopy' CONFIG_SA1100_YOPY $CONFIG_ARCH_SA1100
-dep_bool '  Stork' CONFIG_SA1100_STORK $CONFIG_ARCH_SA1100
-
-dep_tristate 'SA1100 USB function support' CONFIG_SA1100_USB $CONFIG_ARCH_SA1100
-dep_tristate '  Support for SA11x0 USB network link function' CONFIG_SA1100_USB_NETLINK $CONFIG_SA1100_USB
-dep_tristate '  Support for SA11x0 USB character device emulation' CONFIG_SA1100_USB_CHAR $CONFIG_SA1100_USB
-
-dep_tristate 'Compaq iPAQ Handheld sleeve support' CONFIG_H3600_SLEEVE $CONFIG_SA1100_H3600
-endmenu
-
diff -Nru a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/arm/mach-sa1100/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,332 @@
+
+menu "SA11x0 Implementations"
+
+config SA1100_ASSABET
+	bool "Assabet"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
+	  Microprocessor Development Board (also known as the Assabet).
+
+config ASSABET_NEPONSET
+	bool "Include support for Neponset"
+	depends on SA1100_ASSABET
+	help
+	  Say Y here if you are using the Intel(R) StrongARM(R) SA-1110
+	  Microprocessor Development Board (Assabet)  with the SA-1111
+	  Development Board (Nepon).
+
+config SA1100_ADSBITSY
+	bool "ADS Bitsy"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using Applied Data Systems Intel(R)
+	  StrongARM(R) 1110 based Bitsy, 3 x 5 inches in size, Compaq - IPAQ -
+	  like platform. See
+	  <http://www.applieddata.net/products_bitsySpec.asp> for more
+	  information.
+
+config SA1100_BRUTUS
+	bool "Brutus"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using the Intel(R) StrongARM(R) SA-1100
+	  Microprocessor Development Board (also known as the Brutus).
+
+config SA1100_CERF
+	bool "CerfBoard"
+	depends on ARCH_SA1100
+	help
+	  The Intrinsyc CerfBoard is based on the StrongARM 1110.
+	  More information is available at:
+	  <http://www.intrinsyc.com/products/referenceplatforms/cerfboard.html>.
+
+	  Say Y if configuring for an Intrinsyc CerfBoard.
+	  Say N otherwise.
+
+choice
+	prompt "Cerf Flash available"
+	depends on SA1100_CERF
+	default SA1100_CERF_FLASH_8MB
+
+config SA1100_CERF_FLASH_8MB
+	bool "8MB"
+
+config SA1100_CERF_FLASH_16MB
+	bool "16MB"
+
+config SA1100_CERF_FLASH_32MB
+	bool "32MB"
+
+endchoice
+
+config SA1100_CERF_CPLD
+	bool "Cerf w/CPLD support (CerfPDA)"
+	depends on SA1100_CERF
+	help
+	  Say Y here to support the Linux CerfPDA development kit from
+	  Intrinsyc. This is a StrongARM-1110-based reference platform for
+	  designing custom PDAs.  Product info is at
+	  <http://www.intrinsyc.com/products/referencedesigns/cerfpda.asp>.
+
+config SA1100_H3100
+	bool "Compaq iPAQ H3100"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you intend to run this kernel on the Compaq iPAQ
+	  H3100 handheld computer.  Information about this machine and the
+	  Linux port to this machine can be found at:
+
+	  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3100>
+	  <http://www.compaq.com/products/handhelds/pocketpc/>
+
+config SA1100_H3600
+	bool "Compaq iPAQ H3600/H3700"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you intend to run this kernel on the Compaq iPAQ
+	  H3600 handheld computer.  Information about this machine and the
+	  Linux port to this machine can be found at:
+
+	  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3600>
+	  <http://www.compaq.com/products/handhelds/pocketpc/>
+
+config SA1100_H3800
+	bool "Compaq iPAQ H3800"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you intend to run this kernel on the Compaq iPAQ H3800
+	  series handheld computer.  Information about this machine and the
+	  Linux port to this machine can be found at:
+
+	  <http://www.handhelds.org/Compaq/index.html#iPAQ_H3800>
+	  <http://www.compaq.com/products/handhelds/pocketpc/>
+
+config SA1100_H3XXX
+	bool
+	depends on SA1100_H3100 || SA1100_H3600 || SA1100_H3800
+	default y
+
+#dep_bool '  Consus' CONFIG_SA1100_CONSUS $CONFIG_ARCH_SA1100
+#dep_bool '  Empeg' CONFIG_SA1100_EMPEG $CONFIG_ARCH_SA1100
+config SA1100_EXTENEX1
+	bool "Extenex HandHeld Theater (Squashtail)"
+	depends on ARCH_SA1100
+
+config SA1100_EXTENEX1_16MB
+	bool "Support 16 MB of DRAM (not just 8)"
+	depends on SA1100_EXTENEX1
+
+config SA1100_FLEXANET
+	bool "FlexaNet"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you intend to run this kernel on the FlexaNet
+	  handheld instruments. Information about this machine can be
+	  found at: <http://www.flexanet.com/>.
+
+config SA1100_FREEBIRD
+	bool "FreeBird-v1.1"
+	depends on ARCH_SA1100
+	help
+	  Support the FreeBird board used in Coventive embedded products.  See
+	  Documentation/arm/SA1100/Freebird for more.
+
+config SA1100_GRAPHICSCLIENT
+	bool "GraphicsClient Plus"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using an Applied Data Systems Intel(R)
+	  StrongARM(R) SA-1100 based Graphics Client SBC.  See
+	  <http://www.flatpanels.com/> for information on this system.
+
+config SA1100_GRAPHICSMASTER
+	bool "GraphicsMaster"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using an Applied Data Systems Intel(R)
+	  StrongARM(R) SA-1100 based Graphics Master SBC with SA-1111
+	  StrongARM companion chip.  See
+	  <http://www.applieddata.net/products_masterSpec.asp> for information
+	  on this system.
+
+config SA1100_BADGE4
+	bool "HP Labs BadgePAD 4"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you want to build a kernel for the HP Laboratories
+	  BadgePAD 4.
+
+config SA1100_JORNADA720
+	bool "HP Jornada 720"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you want to build a kernel for the HP Jornada 720
+	  handheld computer.  See <http://www.hp.com/jornada/products/720>
+	  for details.
+
+config SA1100_HUW_WEBPANEL
+	bool "HuW WebPanel"
+	depends on ARCH_SA1100
+	help
+	  Say Y here to support the HuW Webpanel produced by Hoeft & Wessel
+	  AG.  English-language website is at
+	  <http://www.hoeft-wessel.de/en.htm>; credits and build instructions
+	  at Documentation/arm/SA1100/HUW_WEBPANEL.
+
+config SA1100_ITSY
+	bool "Itsy"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using the Compaq Itsy experimental pocket
+	  computer. See <http://research.compaq.com/wrl/projects/itsy/> for
+	  more information.
+
+config SA1100_LART
+	bool "LART"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using the Linux Advanced Radio Terminal
+	  (also known as the LART).  See <http://www.lart.tudelft.nl/> for
+	  information on the LART.
+
+config SA1100_NANOENGINE
+	bool "nanoEngine"
+	depends on ARCH_SA1100
+	help
+	  The nanoEngine is a StrongARM 1110-based single board computer
+	  from Bright Star Engineering. More information is available at:
+	  <http://www.brightstareng.com/arm/nanoeng.htm>.
+
+	  Say Y if configuring for a nanoEngine.
+	  Say N otherwise.
+
+config SA1100_OMNIMETER
+	bool "OmniMeter"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using the inhand electronics OmniMeter.  See
+	  <http://www.inhandelectronics.com/html/omni1.html> for details.
+
+config SA1100_PANGOLIN
+	bool "Pangolin"
+	depends on ARCH_SA1100
+	help
+	  Pangolin is a StrongARM 1110-based evaluation platform produced
+	  by Dialogue Technology.  It has EISA slots for ease of configuration
+	  with SDRAM/Flash memory card, USB/Serial/Audio card, Compact Flash
+	  card, and TFT-LCD card.
+
+	  Say Y if configuring for a Pangolin.
+	  Say N otherwise.
+
+config SA1100_PLEB
+	bool "PLEB"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using a Portable Linux Embedded Board
+	  (also known as PLEB). See <http://www.cse.unsw.edu.au/~pleb/>
+	  for more information.
+
+config SA1100_PT_SYSTEM3
+	bool "PT System 3"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you intend to build a kernel suitable to run on
+	  a Pruftechnik Digital Board. For more information see
+	  <http://www.pruftechnik.com>
+
+config SA1100_SHANNON
+	bool "Shannon"
+	depends on ARCH_SA1100
+	help
+	  The Shannon (also known as a Tuxscreen, and also as a IS2630) was a
+	  limited edition webphone produced by Philips. The Shannon is a SA1100
+	  platform with a 640x480 LCD, touchscreen, CIR keyboard, PCMCIA slots,
+	  and a telco interface.
+
+config SA1100_SHERMAN
+	bool "Sherman"
+	depends on ARCH_SA1100
+	help
+	  Say Y here to support the Blazie Engineering `Sherman' StrongARM
+	  1110-based SBC, used primarily in assistance products for the
+	  visually impaired.  The company is now Freedom Scientific, with
+	  a website at <http://www.freedomscientific.com/index.html>. The
+	  Sherman product, however, appears to have been discontinued.
+
+config SA1100_SIMPAD
+	bool "Simpad"
+	depends on ARCH_SA1100
+	help
+	  The SIEMENS webpad SIMpad is based on the StrongARM 1110. There
+	  are two different versions CL4 and SL4. CL4 has 32MB RAM and 16MB
+	  FLASH. The SL4 version got 64 MB RAM and 32 MB FLASH and a
+	  PCMCIA-Slot. The version for the Germany Telecom (DTAG) is the same
+	  like CL4 in additional it has a PCMCIA-Slot. For more information
+	  visit <http://www.my-siemens.com or www.siemens.ch>.
+
+config SA1100_PFS168
+	bool "Tulsa"
+	depends on ARCH_SA1100
+	help
+	  The Radisys Corp. PFS-168 (aka Tulsa) is an Intel® StrongArm® SA-1110 based
+	  computer which includes the SA-1111 Microprocessor Companion Chip and other
+	  custom I/O designed to add connectivity and multimedia features for vending
+	  and business machine applications. Say Y here if you require support for
+	  this target.
+
+config SA1100_VICTOR
+	bool "Victor"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you are using a Visu Aide Intel(R) StrongARM(R)
+	  SA-1100 based Victor Digital Talking Book Reader.  See
+	  <http://www.visuaide.com/pagevictor.en.html> for information on
+	  this system.
+
+config SA1100_XP860
+	bool "XP860"
+	depends on ARCH_SA1100
+	help
+	  :: Config help missing ::
+	  :: 06 August 2002 ::
+
+config SA1100_YOPY
+	bool "Yopy"
+	depends on ARCH_SA1100
+	help
+	  Say Y here to support the Yopy PDA.  Product information at
+	  <http://www.yopy.com/>.  See Documentation/arm/SA110/Yopy
+	  for more.
+
+config SA1100_STORK
+	bool "Stork"
+	depends on ARCH_SA1100
+	help
+	  Say Y here if you intend to run this kernel on the Stork
+	  handheld computer.
+
+config SA1100_USB
+	tristate "SA1100 USB function support"
+	depends on ARCH_SA1100
+
+config SA1100_USB_NETLINK
+	tristate "Support for SA11x0 USB network link function"
+	depends on SA1100_USB
+
+config SA1100_USB_CHAR
+	tristate "Support for SA11x0 USB character device emulation"
+	depends on SA1100_USB
+
+config H3600_SLEEVE
+	tristate "Compaq iPAQ Handheld sleeve support"
+	depends on SA1100_H3600
+	help
+	  Choose this option to enable support for extension packs (sleeves)
+	  for the Compaq iPAQ H3XXX series of handheld computers.  This option
+	  is required for the CF, PCMCIA, Bluetooth and GSM/GPRS extension
+	  packs.
+
+endmenu
+
diff -Nru a/arch/cris/Config.help b/arch/cris/Config.help
--- a/arch/cris/Config.help	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,417 +0,0 @@
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_ETRAX100LX
-  Support version 1 of the Etrax 100LX.
-
-CONFIG_ETRAX100LX_V2
-  Support version 2 of the Etrax 100LX.
-
-CONFIG_SVINTO_SIM
-  Support the xsim ETRAX Simulator.
-
-CONFIG_ETRAX_DRAM_SIZE
-  Size of DRAM (decimal in MB) typically 2, 8 or 16.
-
-CONFIG_ETRAX_FLASH_BUSWIDTH
-  Width in bytes of the Flash bus (1, 2 or 4). Is usually 2.
-
-CONFIG_ETRAX_PA_LEDS
-  The Etrax network driver is responsible for flashing LED's when
-  packets arrive and are sent.  It uses macros defined in
-  <file:include/asm-cris/io.h>, and those macros are defined after what
-  YOU choose in this option.  The actual bits used are configured
-  separately.  Select this if the LEDs are on port PA.  Some products
-  put the leds on PB or a memory-mapped latch (CSP0) instead.
-
-CONFIG_ETRAX_PB_LEDS
-  The Etrax network driver is responsible for flashing LED's when
-  packets arrive and are sent.  It uses macros defined in
-  <file:include/asm-cris/io.h>, and those macros are defined after what
-  YOU choose in this option.  The actual bits used are configured
-  separately.  Select this if the LEDs are on port PB.  Some products
-  put the leds on PA or a memory-mapped latch (CSP0) instead.
-
-CONFIG_ETRAX_CSP0_LEDS
-  The Etrax network driver is responsible for flashing LED's when
-  packets arrive and are sent. It uses macros defined in
-  <file:include/asm-cris/io.h>, and those macros are defined after what
-  YOU choose in this option.  The actual bits used are configured
-  separately.  Select this if the LEDs are on a memory-mapped latch
-  using chip select CSP0, this is mapped at 0x90000000.
-  Some products put the leds on PA or PB instead.
-
-CONFIG_ETRAX_NO_LEDS
-  Select this option if you don't have any LED at all.
-
-CONFIG_ETRAX_LED1G
-  Bit to use for the first green LED.
-  Most Axis products use bit 2 here.
-
-CONFIG_ETRAX_LED1R
-  Bit to use for the first red LED.
-  Most Axis products use bit 3 here.
-  For products with only one controllable LED,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED2G
-  Bit to use for the second green LED. The "Active" LED.
-  Most Axis products use bit 4 here.
-  For products with only one controllable LED,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED2R
-  Bit to use for the second red LED.
-  Most Axis products use bit 5 here.
-  For products with only one controllable LED,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED3G
-  Bit to use for the third green LED. The "Drive" LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED3R
-  Bit to use for the third red LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED4G
-  Bit to use for the fourth green LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED4R
-  Bit to use for the fourth red LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED5G
-  Bit to use for the fifth green LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED5R
-  Bit to use for the fifth red LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED6G
-  Bit to use for the sixth green LED. The "Drive" LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED6R
-  Bit to use for the sixth red LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED7G
-  Bit to use for the seventh green LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED7R
-  Bit to use for the seventh red LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED8Y
-  Bit to use for the eighth yellow LED. The "Drive" LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED9Y
-  Bit to use for the ninth yellow LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED10Y
-  Bit to use for the tenth yellow LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED11Y
-  Bit to use for the eleventh yellow LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_LED12R
-  Bit to use for the twelfth red LED.
-  For products with only one or two controllable LEDs,
-  set this to same as CONFIG_ETRAX_LED1G (normally 2).
-
-CONFIG_ETRAX_KGDB
-  The CRIS version of gdb can be used to remotely debug a running
-  Linux kernel via the serial debug port.  Provided you have gdb-cris
-  installed, run gdb-cris vmlinux, then type
-
-  (gdb) set remotebaud 115200           <- kgdb uses 115200 as default
-  (gdb) target remote /dev/ttyS0        <- maybe you use another port
-
-  This should connect you to your booted kernel (or boot it now if you
-  didn't before).  The kernel halts when it boots, waiting for gdb if
-  this option is turned on!
-
-CONFIG_ETRAX_DEF_R_WAITSTATES
-  Waitstates for SRAM, Flash and peripherials (not DRAM).  95f8 is a
-  good choice for most Axis products...
-
-CONFIG_ETRAX_DEF_R_BUS_CONFIG
-  Assorted bits controlling write mode, DMA burst length etc.  104 is
-  a good choice for most Axis products...
-
-CONFIG_ETRAX_SDRAM
-  Enable this if you use SDRAM chips and configure
-  R_SDRAM_CONFIG and R_SDRAM_TIMING as well.
-
-CONFIG_ETRAX_DEF_R_DRAM_CONFIG
-  The R_DRAM_CONFIG register specifies everything on how the DRAM
-  chips in the system are connected to the Etrax CPU.  This is
-  different depending on the manufacturer, chip type and number of
-  chips.  So this value often needs to be different for each Axis
-  product.
-
-CONFIG_ETRAX_DEF_R_DRAM_TIMING
-  Different DRAM chips have different speeds.  Current Axis products
-  use 50ns DRAM chips which can use the timing: 5611.
-
-CONFIG_ETRAX_DEF_R_SDRAM_CONFIG
-  The R_SDRAM_CONFIG register specifies everything on how the SDRAM
-  chips in the system are connected to the Etrax CPU.  This is
-  different depending on the manufacturer, chip type and number of
-  chips.  So this value often needs to be different for each Axis
-  product.
-
-CONFIG_ETRAX_DEF_R_SDRAM_TIMING
-  Different SDRAM chips have different timing.
-
-CONFIG_ETRAX_DEF_R_PORT_PA_DIR
-  Configures the direction of general port A bits.  1 is out, 0 is in.
-  This is often totally different depending on the product used.
-  There are some guidelines though - if you know that only LED's are
-  connected to port PA, then they are usually connected to bits 2-4
-  and you can therefore use 1c.  On other boards which don't have the
-  LED's at the general ports, these bits are used for all kinds of
-  stuff.  If you don't know what to use, it is always safe to put all
-  as inputs, although floating inputs isn't good.
-
-CONFIG_ETRAX_DEF_R_PORT_PA_DATA
-  Configures the initial data for the general port A bits.  Most
-  products should use 00 here.
-
-CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG
-  Configures the type of the general port B bits.  1 is chip select,
-  0 is port.  Most products should use 00 here.
-
-CONFIG_ETRAX_DEF_R_PORT_PB_DIR
-  Configures the direction of general port B bits. 1 is out, 0 is in.
-  This is often totally different depending on the product used.  Bits
-  0 and 1 on port PB are usually used for I2C communication, but the
-  kernel I2C driver sets the appropriate directions itself so you
-  don't need to take that into consideration when setting this option.
-  If you don't know what to use, it is always safe to put all as
-  inputs.
-
-CONFIG_ETRAX_DEF_R_PORT_PB_DATA
-  Configures the initial data for the general port A bits.  Most
-  products should use FF here.
-
-CONFIG_ETRAX_WATCHDOG
-  Enable the built-in watchdog timer support on Etrax100 embedded
-  network computers.
-
-CONFIG_ETRAX_DEBUG_PORT0
-  Choose a serial port for the ETRAX debug console.  Default to
-  port 0.
-
-CONFIG_ETRAX_DEBUG_PORT1
-  Use serial port 1 for the console.
-
-CONFIG_ETRAX_DEBUG_PORT2
-  Use serial port 2 for the console.
-
-CONFIG_ETRAX_DEBUG_PORT3
-  Use serial port 3 for the console.
-
-CONFIG_ETRAX_DEBUG_PORT_NULL
-  Disable serial-port debugging.
-
-CONFIG_ETRAX_RESCUE_SER0
-  Select one of the four serial ports as a rescue port.  The default
-  is port 0.
-
-CONFIG_ETRAX_RESCUE_SER1
-  Use serial port 1 as the rescue port.
-
-CONFIG_ETRAX_RESCUE_SER2
-  Use serial port 2 as the rescue port.
-
-CONFIG_ETRAX_RESCUE_SER3
-  Use serial port 3 as the rescue port.
-
-CONFIG_ETRAX_POWERBUTTON_BIT
-  Configure where power button is connected.
-
-CONFIG_ETRAX_ROOT_DEVICE
-  Specifies the device that should be mounted as root file system
-  when booting from flash. The axisflashmap driver adds an additional
-  mtd partition for the appended root file system image, so this option
-  should normally be the mtdblock device for the partition after the
-  last partition in the partition table.
-
-CONFIG_ETRAX_SHUTDOWN_BIT
-  Configure what pin on CSPO-port that is used for controlling power
-  supply.
-
-CONFIG_ETRAX_SOFT_SHUTDOWN
-  Enable this if Etrax is used with a power-supply that can be turned
-  off and on with PS_ON signal. Gives the possibility to detect
-  powerbutton and then do a power off after unmounting disks.
-
-CONFIG_ETRAX_WATCHDOG_NICE_DOGGY
-  By enabling this you make sure that the watchdog does not bite while
-  printing oopses. Recommended for development systems but not for
-  production releases.
diff -Nru a/arch/cris/Kconfig b/arch/cris/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/cris/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,753 @@
+#
+# For a description of the syntax of this configuration file,
+# see the Configure script.
+#
+
+mainmenu "Linux/CRIS Kernel Configuration"
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+source "init/Kconfig"
+
+
+menu "General setup"
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config ETRAX_KGDB
+	bool "Use kernel gdb debugger"
+	---help---
+	  The CRIS version of gdb can be used to remotely debug a running
+	  Linux kernel via the serial debug port.  Provided you have gdb-cris
+	  installed, run gdb-cris vmlinux, then type
+
+	  (gdb) set remotebaud 115200           <- kgdb uses 115200 as default
+	  (gdb) target remote /dev/ttyS0        <- maybe you use another port
+
+	  This should connect you to your booted kernel (or boot it now if you
+	  didn't before).  The kernel halts when it boots, waiting for gdb if
+	  this option is turned on!
+
+config ETRAX_WATCHDOG
+	bool "Enable Etrax100 watchdog"
+	help
+	  Enable the built-in watchdog timer support on Etrax100 embedded
+	  network computers.
+
+config ETRAX_WATCHDOG_NICE_DOGGY
+	bool "Disable watchdog during Oops printouts"
+	depends on ETRAX_WATCHDOG
+	help
+	  By enabling this you make sure that the watchdog does not bite while
+	  printing oopses. Recommended for development systems but not for
+	  production releases.
+
+endmenu
+
+
+menu "Hardware setup"
+
+choice
+	prompt "Processor type"
+	default ETRAX100LX
+
+config ETRAX100LX
+	bool "Etrax-100-LX-v1"
+	help
+	  Support version 1 of the Etrax 100LX.
+
+config ETRAX100LX_V2
+	bool "Etrax-100-LX-v2"
+	help
+	  Support version 2 of the Etrax 100LX.
+
+config SVINTO_SIM
+	bool "Etrax-100-LX-for-xsim-simulator"
+	help
+	  Support the xsim ETRAX Simulator.
+
+endchoice
+
+# Etrax100 LX v1 has a MMU "feature" requiring a low mapping
+config CRIS_LOW_MAP
+	bool
+	depends on ETRAX100LX
+	default y
+
+config ETRAX_DRAM_VIRTUAL_BASE
+	hex
+	default "c0000000" if !ETRAX100LX
+	default "60000000" if ETRAX100LX
+
+config ETRAX_DRAM_SIZE
+	int "DRAM size (dec, in MB)"
+	default "8"
+	help
+	  Size of DRAM (decimal in MB) typically 2, 8 or 16.
+
+config ETRAX_FLASH_BUSWIDTH
+	int "Buswidth of flash in bytes"
+	default "2"
+	help
+	  Width in bytes of the Flash bus (1, 2 or 4). Is usually 2.
+
+config ETRAX_ROOT_DEVICE
+	string "Root device name"
+	default "/dev/mtdblock3"
+	help
+	  Specifies the device that should be mounted as root file system
+	  when booting from flash. The axisflashmap driver adds an additional
+	  mtd partition for the appended root file system image, so this option
+	  should normally be the mtdblock device for the partition after the
+	  last partition in the partition table.
+
+choice
+	prompt "Product LED port"
+	default ETRAX_PA_LEDS
+
+config ETRAX_PA_LEDS
+	bool "Port-PA-LEDs"
+	help
+	  The Etrax network driver is responsible for flashing LED's when
+	  packets arrive and are sent.  It uses macros defined in
+	  <file:include/asm-cris/io.h>, and those macros are defined after what
+	  YOU choose in this option.  The actual bits used are configured
+	  separately.  Select this if the LEDs are on port PA.  Some products
+	  put the leds on PB or a memory-mapped latch (CSP0) instead.
+
+config ETRAX_PB_LEDS
+	bool "Port-PB-LEDs"
+	help
+	  The Etrax network driver is responsible for flashing LED's when
+	  packets arrive and are sent.  It uses macros defined in
+	  <file:include/asm-cris/io.h>, and those macros are defined after what
+	  YOU choose in this option.  The actual bits used are configured
+	  separately.  Select this if the LEDs are on port PB.  Some products
+	  put the leds on PA or a memory-mapped latch (CSP0) instead.
+
+config ETRAX_CSP0_LEDS
+	bool "Port-CSP0-LEDs"
+	help
+	  The Etrax network driver is responsible for flashing LED's when
+	  packets arrive and are sent. It uses macros defined in
+	  <file:include/asm-cris/io.h>, and those macros are defined after what
+	  YOU choose in this option.  The actual bits used are configured
+	  separately.  Select this if the LEDs are on a memory-mapped latch
+	  using chip select CSP0, this is mapped at 0x90000000.
+	  Some products put the leds on PA or PB instead.
+
+config ETRAX_NO_LEDS
+	bool "None"
+	help
+	  Select this option if you don't have any LED at all.
+
+endchoice
+
+config ETRAX_LED1G
+	int "First green LED bit"
+	depends on !ETRAX_NO_LEDS
+	default "2"
+	help
+	  Bit to use for the first green LED.
+	  Most Axis products use bit 2 here.
+
+config ETRAX_LED1R
+	int "First red LED bit"
+	depends on !ETRAX_NO_LEDS
+	default "3"
+	help
+	  Bit to use for the first red LED.
+	  Most Axis products use bit 3 here.
+	  For products with only one controllable LED,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED2G
+	int "Second green LED bit"
+	depends on !ETRAX_NO_LEDS
+	default "4"
+	help
+	  Bit to use for the second green LED. The "Active" LED.
+	  Most Axis products use bit 4 here.
+	  For products with only one controllable LED,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED2R
+	int "Second red LED bit"
+	depends on !ETRAX_NO_LEDS
+	default "5"
+	help
+	  Bit to use for the second red LED.
+	  Most Axis products use bit 5 here.
+	  For products with only one controllable LED,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED3G
+	int "Third green LED bit"
+	depends on !ETRAX_NO_LEDS
+	default "2"
+	help
+	  Bit to use for the third green LED. The "Drive" LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED3R
+	int "Third red LED bit"
+	depends on !ETRAX_NO_LEDS
+	default "2"
+	help
+	  Bit to use for the third red LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED4R
+	int "Fourth red LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the fourth red LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED4G
+	int "Fourth green LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the fourth green LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED5R
+	int "Fifth red LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the fifth red LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED5G
+	int "Fifth green LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the fifth green LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED6R
+	int "Sixth red LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the sixth red LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED6G
+	int "Sixth green LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the sixth green LED. The "Drive" LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED7R
+	int "Seventh red LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the seventh red LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED7G
+	int "Seventh green LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the seventh green LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED8Y
+	int "Eigth yellow LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the eighth yellow LED. The "Drive" LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED9Y
+	int "Ninth yellow LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the ninth yellow LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED10Y
+	int "Tenth yellow LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the tenth yellow LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED11Y
+	int "Eleventh yellow LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the eleventh yellow LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED12R
+	int "Twelfth red LED bit"
+	depends on ETRAX_CSP0_LEDS
+	default "2"
+	help
+	  Bit to use for the twelfth red LED.
+	  For products with only one or two controllable LEDs,
+	  set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+choice
+	prompt "Product debug-port"
+	default ETRAX_DEBUG_PORT0
+
+config ETRAX_DEBUG_PORT0
+	bool "Serial-0"
+	help
+	  Choose a serial port for the ETRAX debug console.  Default to
+	  port 0.
+
+config ETRAX_DEBUG_PORT1
+	bool "Serial-1"
+	help
+	  Use serial port 1 for the console.
+
+config ETRAX_DEBUG_PORT2
+	bool "Serial-2"
+	help
+	  Use serial port 2 for the console.
+
+config ETRAX_DEBUG_PORT3
+	bool "Serial-3"
+	help
+	  Use serial port 3 for the console.
+
+config ETRAX_DEBUG_PORT_NULL
+	bool "disabled"
+	help
+	  Disable serial-port debugging.
+
+endchoice
+
+choice
+	prompt "Product rescue-port"
+	default ETRAX_RESCUE_SER0
+
+config ETRAX_RESCUE_SER0
+	bool "Serial-0"
+	help
+	  Select one of the four serial ports as a rescue port.  The default
+	  is port 0.
+
+config ETRAX_RESCUE_SER1
+	bool "Serial-1"
+	help
+	  Use serial port 1 as the rescue port.
+
+config ETRAX_RESCUE_SER2
+	bool "Serial-2"
+	help
+	  Use serial port 2 as the rescue port.
+
+config ETRAX_RESCUE_SER3
+	bool "Serial-3"
+	help
+	  Use serial port 3 as the rescue port.
+
+endchoice
+
+config ETRAX_DEF_R_WAITSTATES
+	hex "R_WAITSTATES"
+	default "95a6"
+	help
+	  Waitstates for SRAM, Flash and peripherials (not DRAM).  95f8 is a
+	  good choice for most Axis products...
+
+config ETRAX_DEF_R_BUS_CONFIG
+	hex "R_BUS_CONFIG"
+	default "104"
+	help
+	  Assorted bits controlling write mode, DMA burst length etc.  104 is
+	  a good choice for most Axis products...
+
+config ETRAX_SDRAM
+	bool "SDRAM support"
+	help
+	  Enable this if you use SDRAM chips and configure
+	  R_SDRAM_CONFIG and R_SDRAM_TIMING as well.
+
+config ETRAX_DEF_R_DRAM_CONFIG
+	hex "R_DRAM_CONFIG"
+	depends on !ETRAX_SDRAM
+	default "1a200040"
+	help
+	  The R_DRAM_CONFIG register specifies everything on how the DRAM
+	  chips in the system are connected to the Etrax CPU.  This is
+	  different depending on the manufacturer, chip type and number of
+	  chips.  So this value often needs to be different for each Axis
+	  product.
+
+config ETRAX_DEF_R_DRAM_TIMING
+	hex "R_DRAM_TIMING"
+	depends on !ETRAX_SDRAM
+	default "5611"
+	help
+	  Different DRAM chips have different speeds.  Current Axis products
+	  use 50ns DRAM chips which can use the timing: 5611.
+
+config ETRAX_DEF_R_SDRAM_CONFIG
+	hex "R_SDRAM_CONFIG"
+	depends on ETRAX_SDRAM
+	default "d2fa7878"
+	help
+	  The R_SDRAM_CONFIG register specifies everything on how the SDRAM
+	  chips in the system are connected to the Etrax CPU.  This is
+	  different depending on the manufacturer, chip type and number of
+	  chips.  So this value often needs to be different for each Axis
+	  product.
+
+config ETRAX_DEF_R_SDRAM_TIMING
+	hex "R_SDRAM_TIMING"
+	depends on ETRAX_SDRAM
+	default "80004801"
+	help
+	  Different SDRAM chips have different timing.
+
+config ETRAX_DEF_R_PORT_PA_DIR
+	hex "R_PORT_PA_DIR"
+	default "1c"
+	help
+	  Configures the direction of general port A bits.  1 is out, 0 is in.
+	  This is often totally different depending on the product used.
+	  There are some guidelines though - if you know that only LED's are
+	  connected to port PA, then they are usually connected to bits 2-4
+	  and you can therefore use 1c.  On other boards which don't have the
+	  LED's at the general ports, these bits are used for all kinds of
+	  stuff.  If you don't know what to use, it is always safe to put all
+	  as inputs, although floating inputs isn't good.
+
+config ETRAX_DEF_R_PORT_PA_DATA
+	hex "R_PORT_PA_DATA"
+	default "00"
+	help
+	  Configures the initial data for the general port A bits.  Most
+	  products should use 00 here.
+
+config ETRAX_DEF_R_PORT_PB_CONFIG
+	hex "R_PORT_PB_CONFIG"
+	default "00"
+	help
+	  Configures the type of the general port B bits.  1 is chip select,
+	  0 is port.  Most products should use 00 here.
+
+config ETRAX_DEF_R_PORT_PB_DIR
+	hex "R_PORT_PB_DIR"
+	default "00"
+	help
+	  Configures the direction of general port B bits. 1 is out, 0 is in.
+	  This is often totally different depending on the product used.  Bits
+	  0 and 1 on port PB are usually used for I2C communication, but the
+	  kernel I2C driver sets the appropriate directions itself so you
+	  don't need to take that into consideration when setting this option.
+	  If you don't know what to use, it is always safe to put all as
+	  inputs.
+
+config ETRAX_DEF_R_PORT_PB_DATA
+	hex "R_PORT_PB_DATA"
+	default "ff"
+	help
+	  Configures the initial data for the general port A bits.  Most
+	  products should use FF here.
+
+config ETRAX_SOFT_SHUTDOWN
+	bool "Software Shutdown Support"
+	help
+	  Enable this if Etrax is used with a power-supply that can be turned
+	  off and on with PS_ON signal. Gives the possibility to detect
+	  powerbutton and then do a power off after unmounting disks.
+
+config ETRAX_SHUTDOWN_BIT
+	int "Shutdown bit on port CSP0"
+	depends on ETRAX_SOFT_SHUTDOWN
+	default "12"
+	help
+	  Configure what pin on CSPO-port that is used for controlling power
+	  supply.
+
+config ETRAX_POWERBUTTON_BIT
+	int "Power button bit on port G"
+	depends on ETRAX_SOFT_SHUTDOWN
+	default "25"
+	help
+	  Configure where power button is connected.
+
+endmenu
+
+# bring in Etrax built-in drivers
+source "arch/cris/drivers/Kconfig"
+
+# standard linux drivers
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+
+menu "ATA/IDE/MFM/RLL support"
+
+config IDE
+	tristate "ATA/IDE/MFM/RLL support"
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+
+menu "Kernel hacking"
+
+#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
+config PROFILE
+	bool "Kernel profiling support"
+
+config PROFILE_SHIFT
+	int "Profile shift count"
+	depends on PROFILE
+	default "2"
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/cris/config.in b/arch/cris/config.in
--- a/arch/cris/config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,232 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see the Configure script.
-#
-mainmenu_name "Linux/CRIS Kernel Configuration"
-
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'General setup'
-
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-
-bool 'Use kernel gdb debugger' CONFIG_ETRAX_KGDB
-
-bool 'Enable Etrax100 watchdog' CONFIG_ETRAX_WATCHDOG
-if [ "$CONFIG_ETRAX_WATCHDOG" = "y" ]; then
-	bool 'Disable watchdog during Oops printouts' CONFIG_ETRAX_WATCHDOG_NICE_DOGGY
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'Hardware setup'
-
-choice 'Processor type' \
-	"Etrax-100-LX-v1	CONFIG_ETRAX100LX	\
-	 Etrax-100-LX-v2	CONFIG_ETRAX100LX_V2	\
-	 Etrax-100-LX-for-xsim-simulator   CONFIG_SVINTO_SIM" Etrax-100-LX-v1
-
-# Etrax100 LX v1 has a MMU "feature" requiring a low mapping
-
-if [ "$CONFIG_ETRAX100LX" = "y" ]; then
-	define_bool CONFIG_CRIS_LOW_MAP y
-	define_hex  CONFIG_ETRAX_DRAM_VIRTUAL_BASE 60000000
-else
-	define_hex  CONFIG_ETRAX_DRAM_VIRTUAL_BASE c0000000
-fi
-
-int 'DRAM size (dec, in MB)' CONFIG_ETRAX_DRAM_SIZE 8
-
-int 'Buswidth of flash in bytes' CONFIG_ETRAX_FLASH_BUSWIDTH 2
-
-string 'Root device name' CONFIG_ETRAX_ROOT_DEVICE "/dev/mtdblock3"
-
-choice 'Product LED port' \
-	"Port-PA-LEDs	CONFIG_ETRAX_PA_LEDS	\
-	 Port-PB-LEDs	CONFIG_ETRAX_PB_LEDS	\
-	 Port-CSP0-LEDs	CONFIG_ETRAX_CSP0_LEDS  \
-	 None	CONFIG_ETRAX_NO_LEDS" Port-PA-LEDs
-
-if [ "$CONFIG_ETRAX_NO_LEDS" != "y" ]; then
-  int '  First green LED bit' CONFIG_ETRAX_LED1G 2
-  int '  First red LED bit' CONFIG_ETRAX_LED1R 3
-  int '  Second green LED bit' CONFIG_ETRAX_LED2G 4
-  int '  Second red LED bit' CONFIG_ETRAX_LED2R 5
-  int '  Third green LED bit' CONFIG_ETRAX_LED3G 2
-  int '  Third red LED bit' CONFIG_ETRAX_LED3R 2
-fi
-
-if [ "$CONFIG_ETRAX_CSP0_LEDS" = "y" ]; then
-  int '  Fourth red LED bit' CONFIG_ETRAX_LED4R 2
-  int '  Fourth green LED bit' CONFIG_ETRAX_LED4G 2
-  int '  Fifth red LED bit' CONFIG_ETRAX_LED5R 2
-  int '  Fifth green LED bit' CONFIG_ETRAX_LED5G 2
-  int '  Sixth red LED bit' CONFIG_ETRAX_LED6R 2
-  int '  Sixth green LED bit' CONFIG_ETRAX_LED6G 2
-  int '  Seventh red LED bit' CONFIG_ETRAX_LED7R 2
-  int '  Seventh green LED bit' CONFIG_ETRAX_LED7G 2
-  int '  Eigth yellow LED bit' CONFIG_ETRAX_LED8Y 2
-  int '  Ninth yellow LED bit' CONFIG_ETRAX_LED9Y 2
-  int '  Tenth yellow LED bit' CONFIG_ETRAX_LED10Y 2
-  int '  Eleventh yellow LED bit' CONFIG_ETRAX_LED11Y 2
-  int '  Twelfth red LED bit' CONFIG_ETRAX_LED12R 2
-fi  
-
-choice 'Product debug-port' \
-	"Serial-0	CONFIG_ETRAX_DEBUG_PORT0	\
-	 Serial-1	CONFIG_ETRAX_DEBUG_PORT1	\
-	 Serial-2	CONFIG_ETRAX_DEBUG_PORT2	\
-	 Serial-3	CONFIG_ETRAX_DEBUG_PORT3	\
-	 disabled	CONFIG_ETRAX_DEBUG_PORT_NULL" Serial-0 
-
-choice 'Product rescue-port' \
-	"Serial-0	CONFIG_ETRAX_RESCUE_SER0	\
-	 Serial-1	CONFIG_ETRAX_RESCUE_SER1	\
-	 Serial-2	CONFIG_ETRAX_RESCUE_SER2	\
-	 Serial-3	CONFIG_ETRAX_RESCUE_SER3" Serial-0
-
-hex 'R_WAITSTATES' CONFIG_ETRAX_DEF_R_WAITSTATES 95a6
-hex 'R_BUS_CONFIG' CONFIG_ETRAX_DEF_R_BUS_CONFIG 104
-
-bool 'SDRAM support' CONFIG_ETRAX_SDRAM
-if [ "$CONFIG_ETRAX_SDRAM" = "n" ]; then
-	hex 'R_DRAM_CONFIG' CONFIG_ETRAX_DEF_R_DRAM_CONFIG 1a200040
-	hex 'R_DRAM_TIMING' CONFIG_ETRAX_DEF_R_DRAM_TIMING 5611
-fi
-
-if [ "$CONFIG_ETRAX_SDRAM" = "y" ]; then
-	hex 'R_SDRAM_CONFIG' CONFIG_ETRAX_DEF_R_SDRAM_CONFIG d2fa7878
-	hex 'R_SDRAM_TIMING' CONFIG_ETRAX_DEF_R_SDRAM_TIMING 80004801
-fi
-
-hex 'R_PORT_PA_DIR' CONFIG_ETRAX_DEF_R_PORT_PA_DIR 1c
-hex 'R_PORT_PA_DATA' CONFIG_ETRAX_DEF_R_PORT_PA_DATA 00
-hex 'R_PORT_PB_CONFIG' CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG 00
-hex 'R_PORT_PB_DIR' CONFIG_ETRAX_DEF_R_PORT_PB_DIR 00
-hex 'R_PORT_PB_DATA' CONFIG_ETRAX_DEF_R_PORT_PB_DATA ff
-
-bool 'Software Shutdown Support' CONFIG_ETRAX_SOFT_SHUTDOWN
-if [ "$CONFIG_ETRAX_SOFT_SHUTDOWN" = "y" ]; then
-   int 'Shutdown bit on port CSP0' CONFIG_ETRAX_SHUTDOWN_BIT 12
-   int 'Power button bit on port G' CONFIG_ETRAX_POWERBUTTON_BIT 25
-fi
-
-endmenu
-
-# bring in Etrax built-in drivers
-
-source arch/cris/drivers/Config.in
-
-# standard linux drivers
-
-source drivers/mtd/Config.in
-
-source drivers/parport/Config.in
-
-source drivers/pnp/Config.in
-
-source drivers/block/Config.in
-
-source drivers/md/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/IDE/MFM/RLL support'
-
-tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-  source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/ieee1394/Config.in
-
-source drivers/message/i2o/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-  source net/Config.in
-
-  mainmenu_option next_comment
-  comment 'Network device support'
-
-  bool 'Network device support' CONFIG_NETDEVICES
-  if [ "$CONFIG_NETDEVICES" = "y" ]; then
-    source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-         source drivers/atm/Config.in
-      fi
-  fi
-  endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-source drivers/telephony/Config.in
-
-mainmenu_option next_comment
-comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-
-bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-   source drivers/cdrom/Config.in
-fi
-endmenu
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-source drivers/char/Config.in
-
-#source drivers/misc/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-  source sound/Config.in
-fi
-endmenu
-
-source drivers/usb/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
-bool 'Kernel profiling support' CONFIG_PROFILE
-if [ "$CONFIG_PROFILE" = "y" ]; then
-  int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
-fi
-
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/cris/drivers/Config.help b/arch/cris/drivers/Config.help
--- a/arch/cris/drivers/Config.help	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,610 +0,0 @@
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_BLK_DEV_IDE
-  If you say Y here, you will use the full-featured IDE driver to
-  control up to ten ATA/IDE interfaces, each being able to serve a
-  "master" and a "slave" device, for a total of up to twenty ATA/IDE
-  disk/cdrom/tape/floppy drives.
-
-  Useful information about large (>540 MB) IDE disks, multiple
-  interfaces, what to do if ATA/IDE devices are not automatically
-  detected, sound card ATA/IDE ports, module support, and other
-  topics, is contained in <file:Documentation/ide.txt>. For detailed
-  information about hard drives, consult the Disk-HOWTO and the
-  Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  To fine-tune ATA/IDE drive/interface parameters for improved
-  performance, look for the hdparm package at
-  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/ide.txt>. The module will be called ide-mod.o.
-  Do not compile this driver as a module if your root file system (the
-  one containing the directory /) is located on an IDE device.
-
-  If you have one or more IDE drives, say Y or M here. If your system
-  has no IDE drives, or if memory requirements are really tight, you
-  could say N here, and select the "Old hard disk driver" below
-  instead to save about 13 KB of memory in the kernel.
-
-CONFIG_BLK_DEV_IDEDISK
-  This will include enhanced support for MFM/RLL/IDE hard disks.  If
-  you have a MFM/RLL/IDE disk, and there is no special reason to use
-  the old hard disk driver instead, say Y.  If you have an SCSI-only
-  system, you can say N here.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ide-disk.o.  Do not compile this driver as a module
-  if your root file system (the one containing the directory /) is
-  located on the IDE disk. If unsure, say Y.
-
-CONFIG_BLK_DEV_IDECD
-  If you have a CD-ROM drive using the ATAPI protocol, say Y. ATAPI is
-  a newer protocol used by IDE CD-ROM and TAPE drives, similar to the
-  SCSI protocol. Most new CD-ROM drives use ATAPI, including the
-  NEC-260, Mitsumi FX400, Sony 55E, and just about all non-SCSI
-  double(2X) or better speed drives.
-
-  If you say Y here, the CD-ROM drive will be identified at boot time
-  along with other IDE devices, as "hdb" or "hdc", or something
-  similar (check the boot messages with dmesg). If this is your only
-  CD-ROM drive, you can say N to all other CD-ROM options, but be sure
-  to say Y or M to "ISO 9660 CD-ROM file system support".
-
-  Note that older versions of LILO (LInux LOader) cannot properly deal
-  with IDE/ATAPI CD-ROMs, so install LILO 16 or higher, available from
-  <ftp://brun.dyndns.org/pub/linux/lilo/>.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ide-cd.o.
-
-CONFIG_PARPORT
-  If you want to use devices connected to your machine's parallel port
-  (the connector at the computer with 25 holes), e.g. printer, ZIP
-  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
-  create a mini network by connecting the parallel ports of two local
-  machines) etc., then you need to say Y here; please read
-  <file:Documentation/parport.txt> and
-  <file:drivers/parport/BUGS-parport>.
-
-  For extensive information about drivers for many devices attaching
-  to the parallel port see <http://www.torque.net/linux-pp.html> on
-  the WWW.
-
-  It is possible to share a single parallel port among several devices
-  and it is safe to compile all the corresponding drivers into the
-  kernel.  If you want to compile parallel port support as a module
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport.o.  If you have more than one parallel port and want to
-  specify which port and IRQ to be used by this driver at module load
-  time, take a look at <file:Documentation/parport.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_1284
-  If you have a printer that supports status readback or device ID, or
-  want to use a device that uses enhanced parallel port transfer modes
-  such as EPP and ECP, say Y here to enable advanced IEEE 1284
-  transfer modes. Also say Y if you want device ID information to
-  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
-
-CONFIG_NET_ETHERNET
-  Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common
-  type of Local Area Network (LAN) in universities and companies.
-
-  Common varieties of Ethernet are: 10BASE-2 or Thinnet (10 Mbps over
-  coaxial cable, linking computers in a chain), 10BASE-T or twisted
-  pair (10 Mbps over twisted pair cable, linking computers to central
-  hubs), 10BASE-F (10 Mbps over optical fiber links, using hubs),
-  100BASE-TX (100 Mbps over two twisted pair cables, using hubs),
-  100BASE-T4 (100 Mbps over 4 standard voice-grade twisted pair
-  cables, using hubs), 100BASE-FX (100 Mbps over optical fiber links)
-  [the 100BASE varieties are also known as Fast Ethernet], and Gigabit
-  Ethernet (1 Gbps over optical fiber or short copper links).
-
-  If your Linux machine will be connected to an Ethernet and you have
-  an Ethernet network interface card (NIC) installed in your computer,
-  say Y here and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. You will then also have
-  to say Y to the driver for your particular NIC.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about Ethernet network cards. If unsure, say N.
-
-CONFIG_MTD
-  Memory Technology Devices are flash, RAM and similar chips, often
-  used for solid state file systems on embedded devices. This option
-  will provide the generic support for MTD drivers to register
-  themselves with the kernel and for potential users of MTD devices
-  to enumerate the devices which are present and obtain a handle on
-  them. It will also allow you to select individual drivers for 
-  particular hardware and users of MTD devices. If unsure, say N.
-
-CONFIG_MTD_PARTITIONS
-  If you have a device which needs to divide its flash chip(s) up
-  into multiple 'partitions', each of which appears to the user as
-  a separate MTD device, you require this option to be enabled. If
-  unsure, say 'Y'.
-
-  Note, however, that you don't need this option for the DiskOnChip
-  devices. Partitioning on NFTL 'devices' is a different - that's the
-  'normal' form of partitioning used on a block device.
-
-CONFIG_MTD_CHAR
-  This provides a character device for each MTD device present in
-  the system, allowing the user to read and write directly to the
-  memory chips, and also use ioctl() to obtain information about
-  the device, or to erase parts of it.
-
-CONFIG_MTD_BLOCK
-  Although most flash chips have an erase size too large to be useful
-  as block devices, it is possible to use MTD devices which are based
-  on RAM chips in this manner. This block device is a user of MTD
-  devices performing that function.
-
-  At the moment, it is also required for the Journalling Flash File
-  System(s) to obtain a handle on the MTD device when it's mounted
-  (although JFFS and JFFS2 don't actually use any of the functionality
-  of the mtdblock device).
-
-  Later, it may be extended to perform read/erase/modify/write cycles
-  on flash chips to emulate a smaller block size. Needless to say,
-  this is very unsafe, but could be useful for file systems which are
-  almost never written to.
-
-  You do not need this option for use with the DiskOnChip devices. For
-  those, enable NFTL support (CONFIG_NFTL) instead.
-
-CONFIG_MTD_CFI
-  The Common Flash Interface specification was developed by Intel,
-  AMD and other flash manufactures that provides a universal method
-  for probing the capabilities of flash devices. If you wish to
-  support any device that is CFI-compliant, you need to enable this
-  option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
-  for more information on CFI.
-
-CONFIG_MTD_CFI_INTELEXT
-  The Common Flash Interface defines a number of different command
-  sets which a CFI-compliant chip may claim to implement. This code
-  provides support for one of those command sets, used on Intel
-  StrataFlash and other parts.
-
-CONFIG_MTD_CFI_AMDSTD
-  The Common Flash Interface defines a number of different command
-  sets which a CFI-compliant chip may claim to implement. This code
-  provides support for one of those command sets, used on chips 
-  chips including the AMD Am29LV320.
-
-CONFIG_MTD_AMDSTD
-  This option enables support for flash chips using AMD-compatible
-  commands, including some which are not CFI-compatible and hence 
-  cannot be used with the CONFIG_MTD_CFI_AMDSTD option.
-
-  It also works on AMD compatible chips that do conform to CFI.
-
-CONFIG_USB
-  Universal Serial Bus (USB) is a specification for a serial bus
-  subsystem which offers higher speeds and more features than the
-  traditional PC serial port.  The bus supplies power to peripherals
-  and allows for hot swapping.  Up to 127 USB peripherals can be
-  connected to a single USB port in a tree structure.  The USB port is
-  the root of the tree, the peripherals are the leaves and the inner
-  nodes are special USB devices called hubs.  Many newer PC's have USB
-  ports and newer peripherals such as scanners, keyboards, mice,
-  modems, and printers support the USB protocol and can be connected
-  to the PC via those ports.
-
-  Say Y here if your computer has a USB port and you want to use USB
-  devices.  You then need to say Y to at least one of "UHCI support"
-  or "OHCI support" below (the type of interface that the USB hardware
-  in your computer provides to the operating system) and then choose
-  from among the drivers for USB peripherals.  You may want to check
-  out the information provided in <file:Documentation/usb/> and
-  especially the links given in <file:Documentation/usb/usb-help.txt>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usbcore.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_PRINTER
-  If you intend to attach a printer to the parallel port of your Linux
-  box (as opposed to using a serial printer; if the connector at the
-  printer has 9 or 25 holes ["female"], then it's serial), say Y.
-  Also read the Printing-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  It is possible to share one parallel port among several devices
-  (e.g. printer and ZIP drive) and it is safe to compile the
-  corresponding drivers into the kernel.  If you want to compile this
-  driver as a module however ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt> and
-  <file:Documentation/parport.txt>.  The module will be called lp.o.
-
-  If you have several parallel ports, you can specify which ports to
-  use with the "lp" kernel command line option.  (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.)  The syntax of the
-  "lp" command line option can be found in <file:drivers/char/lp.c>.
-
-  If you have more than 8 printers, you need to increase the LP_NO
-  macro in lp.c and the PARPORT_MAX macro in parport.h.
-
-CONFIG_ETRAX_PA_BUTTON_BITMASK
-  This is a bitmask with information about what bits on PA that
-  are used for buttons.
-  Most products has a so called TEST button on PA1, if that's true
-  use 02 here.
-  Use 00 if there are no buttons on PA.
-  If the bitmask is <> 00 a button driver will be included in the gpio
-  driver. Etrax general I/O support must be enabled.
-
-CONFIG_ETRAX_PA_CHANGEABLE_DIR
-  This is a bitmask with information of what bits in PA that a user
-  can change direction on using ioctl's.
-  Bit set = changeable.
-  You probably want 00 here.
-
-CONFIG_ETRAX_PA_CHANGEABLE_BITS
-  This is a bitmask with information of what bits in PA that a user
-  can change change the value on using ioctl's.
-  Bit set = changeable.
-  You probably want 00 here.
-
-CONFIG_ETRAX_PB_CHANGEABLE_DIR
-  This is a bitmask with information of what bits in PB that a user
-  can change direction on using ioctl's.
-  Bit set = changeable.
-  You probably want 00 here.
-
-CONFIG_ETRAX_PB_CHANGEABLE_BITS
-  This is a bitmask with information of what bits in PB that a user
-  can change the value on using ioctl's.
-  Bit set = changeable.
-  You probably want 00 here.
-
-CONFIG_ETRAX_GPIO
-  Enables the Etrax general port device (major 120, minors 0 and 1).
-  You can use this driver to access the general port bits. It supports
-  these ioctl's:
-        #include <linux/etraxgpio.h>
-       fd = open("/dev/gpioa", O_RDWR); // or /dev/gpiob
-       ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS), bits_to_set);
-       ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS), bits_to_clear);
-       val = ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_READBITS), NULL);
-  Remember that you need to setup the port directions appropriately in
-  the General configuration.
-
-CONFIG_ETRAX_SERIAL
-  Enables the ETRAX 100 serial driver for ser0 (ttyS0)
-  You probably want this enabled.
-
-CONFIG_ETRAX_SERIAL_FAST_TIMER
-  Select this to have the serial DMAs flushed at a higher rate than
-  normally, possible by using the fast timer API, the timeout is
-  approx. 4 character times.
-  If unsure, say N.
-
-CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST
-  Select this to have the serial DMAs flushed at a higher rate than
-  normally possible through a fast timer interrupt (currently at
-  15360 Hz).
-  If unsure, say N.
-
-CONFIG_ETRAX_SERIAL_RX_TIMEOUT_TICKS
-  Number of timer ticks between flush of receive fifo (1 tick = 10ms).
-  Try 0-3 for low latency applications.  Approx 5 for high load
-  applications (e.g. PPP).  Maybe this should be more adaptive some
-  day...
-
-CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
-  Enables the status and control signals DTR, RI, DSR and CD on PB for
-  ser0.
-
-CONFIG_ETRAX_SERIAL_PORT1
-  Enables the ETRAX 100 serial driver for ser1 (ttyS1).
-
-CONFIG_ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
-  Enables the status and control signals DTR, RI, DSR and CD on PB for
-  ser1.
-
-CONFIG_ETRAX_SERIAL_PORT2
-  Enables the ETRAX 100 serial driver for ser2 (ttyS2).
-
-CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
-  Enables the status and control signals DTR, RI, DSR and CD on PA for
-  ser2.
-
-CONFIG_ETRAX_SERIAL_PORT3
-  Enables the ETRAX 100 serial driver for ser3 (ttyS3).
-
-CONFIG_ETRAX_RS485
-  Enables support for RS-485 serial communication.  For a primer on
-  RS-485, see <http://www.hw.cz/english/docs/rs485/rs485.html>.
-
-CONFIG_ETRAX_RS485_ON_PA
-  Control Driver Output Enable on RS485 tranceiver using a pin on PA
-  port:
-          Axis 2400/2401 uses PA 3.
-
-CONFIG_ETRAX_RS485_ON_PA_BIT
-  Control Driver Output Enable on RS485 tranceiver using a this bit
-  on PA port.
-
-CONFIG_ETRAX_SER0_DTR_ON_PB_BIT
-  Specify the pin of the PB port to carry the DTR signal for serial
-  port 0.
-
-CONFIG_ETRAX_SER0_RI_ON_PB_BIT
-  Specify the pin of the PB port to carry the RI signal for serial
-  port 0.
-
-CONFIG_ETRAX_SER0_DSR_ON_PB_BIT
-  Specify the pin of the PB port to carry the DSR signal for serial
-  port 0.
-
-CONFIG_ETRAX_SER0_CD_ON_PB_BIT
-  Specify the pin of the PB port to carry the CD signal for serial
-  port 0.
-
-CONFIG_ETRAX_SER1_DTR_ON_PB_BIT
-  Specify the pin of the PB port to carry the DTR signal for serial
-  port 1.
-
-CONFIG_ETRAX_SER1_RI_ON_PB_BIT
-  Specify the pin of the PB port to carry the RI signal for serial
-  port 1.
-
-CONFIG_ETRAX_SER1_DSR_ON_PB_BIT
-  Specify the pin of the PB port to carry the DSR signal for serial
-  port 1.
-
-CONFIG_ETRAX_SER1_CD_ON_PB_BIT
-  Specify the pin of the PB port to carry the CD signal for serial
-  port 1.
-
-CONFIG_ETRAX_SER2_DTR_ON_PA_BIT
-  Specify the pin of the PA port to carry the DTR signal for serial
-  port 2.
-
-CONFIG_ETRAX_SER2_RI_ON_PA_BIT
-  Specify the pin of the PA port to carry the RI signal for serial
-  port 2.
-
-CONFIG_ETRAX_SER2_DSR_ON_PA_BIT
-  Specify the pin of the PA port to carry the DTR signal for serial
-  port 2.
-
-CONFIG_ETRAX_SER2_CD_ON_PA_BIT
-  Specify the pin of the PA port to carry the CD signal for serial
-  port 2.
-
-CONFIG_ETRAX_RS485_DISABLE_RECEIVER
-  It's necessary to disable the serial receiver to avoid serial
-  loopback.  Not all products are able to do this in software only.
-  Axis 2400/2401 must disable receiver.
-
-CONFIG_ETRAX_I2C
-  Enables an I2C driver on PB0 and PB1 on ETRAX100.
-  EXAMPLE usage:
-        i2c_arg = I2C_WRITEARG(STA013_WRITE_ADDR, reg, val);
-       ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_WRITEREG), i2c_arg);
-       i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
-       val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
-
-CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C
-  Select whether to use the special I2C mode in the PB I/O register or
-  not.  This option needs to be selected in order to use some drivers
-  that access the I2C I/O pins directly instead of going through the
-  I2C driver, like the DS1302 realtime-clock driver.  If you are
-  uncertain, choose Y here.
-
-CONFIG_ETRAX_I2C_EEPROM
-  Enables I2C EEPROM (non-volatile RAM) on PB0 and PB1 using the I2C
-  driver.  Select size option: Probed, 2k, 8k, 16k.
-  (Probing works for 2k and 8k but not that well for 16k)
-
-CONFIG_ETRAX_I2C_EEPROM_16KB
-  Use a 16kB EEPROM.
-
-CONFIG_ETRAX_I2C_EEPROM_2KB
-  Use a 2kB EEPROM.
-
-CONFIG_ETRAX_I2C_EEPROM_8KB
-  Use a 8kB EEPROM.
-
-CONFIG_ETRAX_I2C_EEPROM_PROBE
-  Specifies size or auto probe of the EEPROM size.
-  Options: Probed, 2k, 8k, 16k.
-  (Probing works for 2k and 8k but not that well for 16k)
-
-CONFIG_ETRAX_DS1302
-  Enables the driver for the DS1302 Real-Time Clock battery-backed
-  chip on some products.  The kernel reads the time when booting, and
-  the date can be set using ioctl(fd, RTC_SET_TIME, &rt) with rt a
-  rtc_time struct (see <file:include/asm-cris/rtc.h>) on the /dev/rtc
-  device, major 121.  You can check the time with cat /proc/rtc, but
-  normal time reading should be done using libc function time and
-  friends.
-
-CONFIG_ETRAX_DS1302_RST_ON_GENERIC_PORT
-  If your product has the RST signal line for the DS1302 RTC on the
-  Generic Port then say Y here, otherwise leave it as N in which
-  case the RST signal line is assumed to be connected to Port PB
-  (just like the SCL and SDA lines).
-
-CONFIG_ETRAX_DS1302_RSTBIT
-  This is the bit number for the RST signal line of the DS1302 RTC on
-  the selected port. If you have selected the generic port then it
-  should be bit 27, otherwise your best bet is bit 5.
-
-CONFIG_ETRAX_DS1302_SCLBIT
-  This is the bit number for the SCL signal line of the DS1302 RTC on
-  Port PB. This is probably best left at 3.
-
-CONFIG_ETRAX_DS1302_SDABIT
-  This is the bit number for the SDA signal line of the DS1302 RTC on
-  Port PB. This is probably best left at 2.
-
-CONFIG_ETRAX_IDE_CSP0_8_RESET
-  Configures the pin used to reset the IDE bus.
-
-CONFIG_ETRAX_IDE_DELAY
-  Sets the time to wait for disks to regain consciousness after reset.
-
-CONFIG_ETRAX_IDE_G27_RESET
-  Configures the pin used to reset the IDE bus.
-
-CONFIG_ETRAX_IDE_PB7_RESET
-  Configures the pin used to reset the IDE bus.
-
-CONFIG_ETRAX_USB_HOST
-  This option enables the host functionality of the ETRAX 100LX
-  built-in USB controller. In host mode the controller is designed
-  for CTRL and BULK traffic only, INTR traffic may work as well
-  however (depending on the requirements of timeliness).
-
-CONFIG_ETRAX_USB_HOST_PORT1
-  This option enables port 1 of the ETRAX 100LX USB root hub (RH).
-
-CONFIG_ETRAX_USB_HOST_PORT2
-  This option enables port 2 of the ETRAX 100LX USB root hub (RH).
-
-CONFIG_ETRAX_ETHERNET
-  This option enables the ETRAX 100LX built-in 10/100Mbit Ethernet
-  controller.
-
-CONFIG_ETRAX_SYNCHRONOUS_SERIAL
-  This option enables support for the ETRAX 100LX built-in
-  synchronous serial ports. These ports are used for continuous
-  streamed data like audio. The default setting is compatible
-  with the STA 013 MP3 decoder, but can easily be tuned to fit
-  any other audio encoder/decoder and SPI.
-
-CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT0
-  Enables the ETRAX 100LX synchronous serial port 0 (syncser0).
-
-CONFIG_ETRAX_SYNCHRONOUS_SERIAL0_DMA
-  Makes synchronous serial port 0 use DMA.
-
-CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1
-  Enables the ETRAX 100LX synchronous serial port 1 (syncser1).
-
-CONFIG_ETRAX_SYNCHRONOUS_SERIAL1_DMA
-  Makes synchronous serial port 1 use DMA.
-
-CONFIG_JULIETTE
-  The ARTPEC-1 is a video-compression chip used in the AXIS 2100
-  network camera, which is built around an ETRAX-100 board.  With this
-  option selected, the ETRAX kernel configures a DMA channel at boot
-  time to talk to the chip.
-
-CONFIG_ETRAX_AXISFLASHMAP
-  This option enables MTD mapping of flash devices.  Needed to use
-  flash memories.  If unsure, say Y.
-
-CONFIG_ETRAX_PTABLE_SECTOR
-  Byte-offset of the partition table in the first flash chip.
-  The default value is 64kB and should not be changed unless
-  you know exactly what you are doing. The only valid reason
-  for changing this is when the flash block size is bigger
-  than 64kB (e.g. when using two parallel 16 bit flashes).
-
-CONFIG_ETRAX_PARPORT
-  Say Y here to enable the ETRAX on-board parallel ports.
-
-CONFIG_ETRAX_PARALLEL_PORT0
-  Say Y here to enable parallel port 0.
-
-CONFIG_ETRAX_PARALLEL_PORT1
-  Say Y here to enable parallel port 1.
-
-CONFIG_ETRAX_ETHERNET_LPSLAVE
-  This option enables a slave ETRAX 100 or ETRAX 100LX, connected to a
-  master ETRAX 100 or ETRAX 100LX through par0 and par1, to act as an
-  Ethernet controller.
-
-CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS
-  Enable if the slave has it's own LEDs.
-
-CONFIG_ETRAX_IDE
-  Enable this to get support for ATA/IDE.  You can't use parallel
-  ports or SCSI ports at the same time.
-
-CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY
-  Selecting LED_on_when_link will light the LED when there is a
-  connection and will flash off when there is activity.
-
-  Selecting LED_on_when_activity will light the LED only when
-  there is activity.
-
-  This setting will also affect the behaviour of other activity LEDs
-  e.g. Bluetooth.
-
-CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK
-  Selecting LED_on_when_link will light the LED when there is a
-  connection and will flash off when there is activity.
-
-  Selecting LED_on_when_activity will light the LED only when
-  there is activity.
-
-  This setting will also affect the behaviour of other activity LEDs
-  e.g. Bluetooth.
-
-CONFIG_ETRAX_SERIAL_PORT0
-  Enables the ETRAX 100 serial driver for ser0 (ttyS0)
-  Normally you want this on, unless you use external DMA 1 that uses
-  the same DMA channels.
diff -Nru a/arch/cris/drivers/Config.in b/arch/cris/drivers/Config.in
--- a/arch/cris/drivers/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,200 +0,0 @@
-mainmenu_option next_comment
-comment 'Drivers for ETRAX 100LX built-in interfaces'
-
-bool 'Ethernet support' CONFIG_ETRAX_ETHERNET
-if [ "$CONFIG_ETRAX_ETHERNET" = "y" ]; then
-# this is just so that the user does not have to go into the
-# normal ethernet driver section just to enable ethernetworking
-  define_bool CONFIG_NET_ETHERNET y
-  
-  choice 'Network LED behavior' \
-  "LED_on_when_link      CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK    \
-   LED_on_when_activity  CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY" \
-     LED_on_when_activity
-
-else
-  define_bool CONFIG_NET_ETHERNET n
-fi
-
-bool 'Etrax Ethernet slave support (over lp0/1)' CONFIG_ETRAX_ETHERNET_LPSLAVE
-if [ "$CONFIG_ETRAX_ETHERNET_LPSLAVE" = "y" ]; then
-  bool '  Slave has its own LEDs' CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS
-fi 
-
-bool 'Serial-port support' CONFIG_ETRAX_SERIAL
-if [ "$CONFIG_ETRAX_SERIAL" = "y" ]; then
-#  bool '  Use fast timers for DMA flush and RS-485 timing' CONFIG_ETRAX_SERIAL_FAST_TIMER n
-  define_bool CONFIG_ETRAX_SERIAL_FAST_TIMER n
-  if [ "$CONFIG_ETRAX_SERIAL_FAST_TIMER" = "n" ]; then
-    bool '  Fast serial port DMA flush' CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST
-    if [ "$CONFIG_ETRAX100_SERIAL_FLUSH_DMA_FAST" = "n" ]; then
-      int '  Receive flush timeout (ticks) ' CONFIG_ETRAX_SERIAL_RX_TIMEOUT_TICKS 5
-    fi
-  fi
-  bool '  Serial port 0 enabled' CONFIG_ETRAX_SERIAL_PORT0
-  if [ "$CONFIG_ETRAX_SERIAL_PORT0" = "y" ]; then
-    bool '  Ser0 DTR, RI, DSR, CD on PB' CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
-    if [ "$CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB" = "y" ]; then
-      int '    Ser0 DTR on PB bit' CONFIG_ETRAX_SER0_DTR_ON_PB_BIT 4
-      int '    Ser0 RI  on PB bit' CONFIG_ETRAX_SER0_RI_ON_PB_BIT 5
-      int '    Ser0 DSR on PB bit' CONFIG_ETRAX_SER0_DSR_ON_PB_BIT 6
-      int '    Ser0 CD  on PB bit' CONFIG_ETRAX_SER0_CD_ON_PB_BIT 7
-    fi
-  fi
-
-  bool '  Serial port 1 enabled' CONFIG_ETRAX_SERIAL_PORT1
-  if [ "$CONFIG_ETRAX_SERIAL_PORT1" = "y" ]; then
-    bool '  Ser1 DTR, RI, DSR, CD on PB' CONFIG_ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
-    if [ "$CONFIG_ETRAX_SER1_DTR_RI_DSR_CD_ON_PB" = "y" ]; then
-      int '    Ser1 DTR on PB bit' CONFIG_ETRAX_SER1_DTR_ON_PB_BIT 4
-      int '    Ser1 RI  on PB bit' CONFIG_ETRAX_SER1_RI_ON_PB_BIT 5
-      int '    Ser1 DSR on PB bit' CONFIG_ETRAX_SER1_DSR_ON_PB_BIT 6
-      int '    Ser1 CD  on PB bit' CONFIG_ETRAX_SER1_CD_ON_PB_BIT 7
-    fi
-  fi
-  if [ "$CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB" = "y" -a \
-       "$CONFIG_ETRAX_SER1_DTR_RI_DSR_CD_ON_PB" = "y" ]; then
-    comment 'Make sure you dont have the same PB bits more than once!'
-  fi
-  bool '  Serial port 2 enabled' CONFIG_ETRAX_SERIAL_PORT2
-  if [ "$CONFIG_ETRAX_SERIAL_PORT2" = "y" ]; then
-    bool '    Ser2 DTR, RI, DSR, CD on PA' CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
-    if [ "$CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PA" = "y" ]; then
-      int '      Ser2 DTR on PA bit' CONFIG_ETRAX_SER2_DTR_ON_PA_BIT 4
-      int '      Ser2 RI  on PA bit' CONFIG_ETRAX_SER2_RI_ON_PA_BIT 5
-      int '      Ser2 DSR on PA bit' CONFIG_ETRAX_SER2_DSR_ON_PA_BIT 6
-      int '      Ser2 CD  on PA bit' CONFIG_ETRAX_SER2_CD_ON_PA_BIT 7
-    fi 
-  fi
-  bool '  Serial port 3 enabled' CONFIG_ETRAX_SERIAL_PORT3
-  bool '  RS-485 support' CONFIG_ETRAX_RS485
-  if [ "$CONFIG_ETRAX_RS485" = "y" ]; then
-    bool '    RS-485 mode on PA' CONFIG_ETRAX_RS485_ON_PA
-    if [ "$CONFIG_ETRAX_RS485_ON_PA" = "y" ]; then
-      int '      RS-485 mode on PA bit' CONFIG_ETRAX_RS485_ON_PA_BIT 3
-    fi
-    bool '    Disable serial receiver' CONFIG_ETRAX_RS485_DISABLE_RECEIVER
-  fi
-fi
-
-bool 'Synchronous serial port support' CONFIG_ETRAX_SYNCHRONOUS_SERIAL
-if [ "$CONFIG_ETRAX_SYNCHRONOUS_SERIAL" = "y" ]; then 
-  bool '  Synchronous serial port 0 enabled' CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT0
-  if [ "$CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT0" = "y" ]; then
-    bool '    Synchronous serial port 0 uses DMA' CONFIG_ETRAX_SYNCHRONOUS_SERIAL0_DMA
-  fi
-  bool '  Synchronous serial port 1 enabled' CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1
-  if [ "$CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT1" = "y" ]; then
-    bool '    Synchronous serial port 1 uses DMA' CONFIG_ETRAX_SYNCHRONOUS_SERIAL1_DMA
-  fi 
-fi
-
-bool 'Parallel port support' CONFIG_ETRAX_PARPORT
-if [ "$CONFIG_ETRAX_PARPORT" = "y" ]; then
-	bool '  Parallel port 0 enabled' CONFIG_ETRAX_PARALLEL_PORT0
-	bool '  Parallel port 1 enabled' CONFIG_ETRAX_PARALLEL_PORT1
-# here we define the CONFIG_'s necessary to enable parallel port support
-	define_tristate CONFIG_PARPORT y
-        define_bool CONFIG_PARPORT_1284 y
-        define_tristate CONFIG_PRINTER y
-else
-	define_tristate CONFIG_PARPORT n
-        define_bool CONFIG_PARPORT_1284 n
-        define_tristate CONFIG_PRINTER n
-fi
-
-
-bool 'ATA/IDE support' CONFIG_ETRAX_IDE
-
-if [ "$CONFIG_ETRAX_IDE" = "y" ]; then
-# here we should add the CONFIG_'s necessary to enable the basic
-# general ide drivers so the common case does not need to go
-# into that config submenu. enable disk and CD support. others
-# need to go fiddle in the submenu..
-	define_bool CONFIG_IDE y
-
-	define_bool CONFIG_BLK_DEV_IDE y
-	define_bool CONFIG_BLK_DEV_IDEDISK y
-	define_bool CONFIG_BLK_DEV_IDECD y
-
-	define_bool CONFIG_BLK_DEV_IDEDMA y
-	
-	int 'Delay for drives to regain consciousness' CONFIG_ETRAX_IDE_DELAY 15
-	
-	choice 'IDE reset pin' \
-  	"Port_PB_Bit_7  CONFIG_ETRAX_IDE_PB7_RESET\
-   	 Port_G_Bit_27  CONFIG_ETRAX_IDE_G27_RESET\
-	 Port_CSE1_Bit_16  CONFIG_ETRAX_IDE_CSE1_16_RESET\
-	 Port_CSP0_Bit_08   CONFIG_ETRAX_IDE_CSP0_8_RESET"  Port_PB_Bit_7
-else
-	define_bool CONFIG_IDE n
-fi
-
-bool 'Axis flash-map support' CONFIG_ETRAX_AXISFLASHMAP
-
-if [ "$CONFIG_ETRAX_AXISFLASHMAP" = "y" ]; then
-        int  '  Byte-offset of partition table sector' CONFIG_ETRAX_PTABLE_SECTOR 65536
-# here we define the CONFIG_'s necessary to enable MTD support
-# for the flash
-	define_bool CONFIG_MTD y
-
-	define_bool CONFIG_MTD_CFI y
-	define_bool CONFIG_MTD_CFI_INTELEXT n
-	define_bool CONFIG_MTD_CFI_AMDSTD y
-
-	define_bool CONFIG_MTD_AMDSTD y
-
-	define_bool CONFIG_MTD_CHAR y
-	define_bool CONFIG_MTD_BLOCK y
-	define_bool CONFIG_MTD_PARTITIONS y
-fi
-
-bool 'I2C support' CONFIG_ETRAX_I2C
-if [ "$CONFIG_ETRAX_I2C" = "y" ]; then
-# this is true for most products since PB-I2C seems to be somewhat
-# flawed.. 
-	bool 'I2C uses PB not PB-I2C' CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C
-fi
-
-bool 'I2C EEPROM (non-volatile RAM) support' CONFIG_ETRAX_I2C_EEPROM
-if [ "$CONFIG_ETRAX_I2C_EEPROM" = "y" ]; then
-  choice '  EEPROM size' \
-    "Probed CONFIG_ETRAX_I2C_EEPROM_PROBE \
-     2kB    CONFIG_ETRAX_I2C_EEPROM_2KB   \
-     8kB    CONFIG_ETRAX_I2C_EEPROM_8KB   \
-     16kB   CONFIG_ETRAX_I2C_EEPROM_16KB" Probed
-fi
-
-bool 'GPIO support' CONFIG_ETRAX_GPIO
-if [ "$CONFIG_ETRAX_GPIO" = "y" ]; then
-  hex  '  PA-buttons bitmask' CONFIG_ETRAX_PA_BUTTON_BITMASK 02
-  hex  '  PA user changeable dir mask' CONFIG_ETRAX_PA_CHANGEABLE_DIR 00
-  hex  '  PA user changeable bits mask' CONFIG_ETRAX_PA_CHANGEABLE_BITS FF
-  hex  '  PB user changeable dir mask' CONFIG_ETRAX_PB_CHANGEABLE_DIR 00
-  hex  '  PB user changeable bits mask' CONFIG_ETRAX_PB_CHANGEABLE_BITS FF
-fi
-
-#bool 'ARTPEC-1 support' CONFIG_JULIETTE
-#
-#if [ "$CONFIG_JULIETTE" = "y" ]; then
-#   source arch/cris/drivers/juliette/Config.in
-#fi
-
-bool 'USB host' CONFIG_ETRAX_USB_HOST
-if [ "$CONFIG_ETRAX_USB_HOST" = "y" ]; then
-	define_bool CONFIG_USB y
-	bool '  USB port 1 enabled' CONFIG_ETRAX_USB_HOST_PORT1
-	bool '  USB port 2 enabled' CONFIG_ETRAX_USB_HOST_PORT2
-else
-	define_bool CONFIG_USB n
-fi
-
-bool 'DS1302 Real Time Clock support' CONFIG_ETRAX_DS1302
-if [ "$CONFIG_ETRAX_DS1302" = "y" ]; then
-  bool '  DS1302 RST on Generic Port' CONFIG_ETRAX_DS1302_RST_ON_GENERIC_PORT
-  int '  DS1302 RST bit number' CONFIG_ETRAX_DS1302_RSTBIT 2
-  int '  DS1302 SCL bit number' CONFIG_ETRAX_DS1302_SCLBIT 1
-  int '  DS1302 SDA bit number' CONFIG_ETRAX_DS1302_SDABIT 0
-fi
-
-endmenu
diff -Nru a/arch/cris/drivers/Kconfig b/arch/cris/drivers/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/cris/drivers/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,923 @@
+
+menu "Drivers for ETRAX 100LX built-in interfaces"
+
+config ETRAX_ETHERNET
+	bool "Ethernet support"
+	help
+	  This option enables the ETRAX 100LX built-in 10/100Mbit Ethernet
+	  controller.
+
+# this is just so that the user does not have to go into the
+# normal ethernet driver section just to enable ethernetworking
+config NET_ETHERNET
+	bool
+	depends on ETRAX_ETHERNET
+	default y
+	---help---
+	  Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common
+	  type of Local Area Network (LAN) in universities and companies.
+
+	  Common varieties of Ethernet are: 10BASE-2 or Thinnet (10 Mbps over
+	  coaxial cable, linking computers in a chain), 10BASE-T or twisted
+	  pair (10 Mbps over twisted pair cable, linking computers to central
+	  hubs), 10BASE-F (10 Mbps over optical fiber links, using hubs),
+	  100BASE-TX (100 Mbps over two twisted pair cables, using hubs),
+	  100BASE-T4 (100 Mbps over 4 standard voice-grade twisted pair
+	  cables, using hubs), 100BASE-FX (100 Mbps over optical fiber links)
+	  [the 100BASE varieties are also known as Fast Ethernet], and Gigabit
+	  Ethernet (1 Gbps over optical fiber or short copper links).
+
+	  If your Linux machine will be connected to an Ethernet and you have
+	  an Ethernet network interface card (NIC) installed in your computer,
+	  say Y here and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. You will then also have
+	  to say Y to the driver for your particular NIC.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about Ethernet network cards. If unsure, say N.
+
+choice
+	prompt "Network LED behavior"
+	depends on ETRAX_ETHERNET
+	default ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY
+
+config ETRAX_NETWORK_LED_ON_WHEN_LINK
+	bool "LED_on_when_link"
+	help
+	  Selecting LED_on_when_link will light the LED when there is a
+	  connection and will flash off when there is activity.
+
+	  Selecting LED_on_when_activity will light the LED only when
+	  there is activity.
+
+	  This setting will also affect the behaviour of other activity LEDs
+	  e.g. Bluetooth.
+
+config ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY
+	bool "LED_on_when_activity"
+	help
+	  Selecting LED_on_when_link will light the LED when there is a
+	  connection and will flash off when there is activity.
+
+	  Selecting LED_on_when_activity will light the LED only when
+	  there is activity.
+
+	  This setting will also affect the behaviour of other activity LEDs
+	  e.g. Bluetooth.
+
+endchoice
+
+config ETRAX_ETHERNET_LPSLAVE
+	bool "Etrax Ethernet slave support (over lp0/1)"
+	help
+	  This option enables a slave ETRAX 100 or ETRAX 100LX, connected to a
+	  master ETRAX 100 or ETRAX 100LX through par0 and par1, to act as an
+	  Ethernet controller.
+
+config ETRAX_ETHERNET_LPSLAVE_HAS_LEDS
+	bool "Slave has its own LEDs"
+	depends on ETRAX_ETHERNET_LPSLAVE
+	help
+	  Enable if the slave has it's own LEDs.
+
+config ETRAX_SERIAL
+	bool "Serial-port support"
+	help
+	  Enables the ETRAX 100 serial driver for ser0 (ttyS0)
+	  You probably want this enabled.
+
+#  bool '  Use fast timers for DMA flush and RS-485 timing' CONFIG_ETRAX_SERIAL_FAST_TIMER n
+config ETRAX_SERIAL_FAST_TIMER
+	bool
+	help
+	  Select this to have the serial DMAs flushed at a higher rate than
+	  normally, possible by using the fast timer API, the timeout is
+	  approx. 4 character times.
+	  If unsure, say N.
+
+config ETRAX_SERIAL_FLUSH_DMA_FAST
+	bool "Fast serial port DMA flush"
+	depends on ETRAX_SERIAL && !ETRAX_SERIAL_FAST_TIMER
+	help
+	  Select this to have the serial DMAs flushed at a higher rate than
+	  normally possible through a fast timer interrupt (currently at
+	  15360 Hz).
+	  If unsure, say N.
+
+config ETRAX_SERIAL_RX_TIMEOUT_TICKS
+	int "Receive flush timeout (ticks) "
+	depends on ETRAX_SERIAL && !ETRAX_SERIAL_FAST_TIMER && !ETRAX100_SERIAL_FLUSH_DMA_FAST
+	default "5"
+	help
+	  Number of timer ticks between flush of receive fifo (1 tick = 10ms).
+	  Try 0-3 for low latency applications.  Approx 5 for high load
+	  applications (e.g. PPP).  Maybe this should be more adaptive some
+	  day...
+
+config ETRAX_SERIAL_PORT0
+	bool "Serial port 0 enabled"
+	depends on ETRAX_SERIAL
+	help
+	  Enables the ETRAX 100 serial driver for ser0 (ttyS0)
+	  Normally you want this on, unless you use external DMA 1 that uses
+	  the same DMA channels.
+
+config ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
+	bool "Ser0 DTR, RI, DSR, CD on PB"
+	depends on ETRAX_SERIAL_PORT0
+	help
+	  Enables the status and control signals DTR, RI, DSR and CD on PB for
+	  ser0.
+
+config ETRAX_SER0_DTR_ON_PB_BIT
+	int "Ser0 DTR on PB bit"
+	depends on ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
+	default "4"
+	help
+	  Specify the pin of the PB port to carry the DTR signal for serial
+	  port 0.
+
+config ETRAX_SER0_RI_ON_PB_BIT
+	int "Ser0 RI  on PB bit"
+	depends on ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
+	default "5"
+	help
+	  Specify the pin of the PB port to carry the RI signal for serial
+	  port 0.
+
+config ETRAX_SER0_DSR_ON_PB_BIT
+	int "Ser0 DSR on PB bit"
+	depends on ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
+	default "6"
+	help
+	  Specify the pin of the PB port to carry the DSR signal for serial
+	  port 0.
+
+config ETRAX_SER0_CD_ON_PB_BIT
+	int "Ser0 CD  on PB bit"
+	depends on ETRAX_SER0_DTR_RI_DSR_CD_ON_PB
+	default "7"
+	help
+	  Specify the pin of the PB port to carry the CD signal for serial
+	  port 0.
+
+config ETRAX_SERIAL_PORT1
+	bool "Serial port 1 enabled"
+	depends on ETRAX_SERIAL
+	help
+	  Enables the ETRAX 100 serial driver for ser1 (ttyS1).
+
+config ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
+	bool "Ser1 DTR, RI, DSR, CD on PB"
+	depends on ETRAX_SERIAL_PORT1
+	help
+	  Enables the status and control signals DTR, RI, DSR and CD on PB for
+	  ser1.
+
+config ETRAX_SER1_DTR_ON_PB_BIT
+	int "Ser1 DTR on PB bit"
+	depends on ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
+	default "4"
+	help
+	  Specify the pin of the PB port to carry the DTR signal for serial
+	  port 1.
+
+config ETRAX_SER1_RI_ON_PB_BIT
+	int "Ser1 RI  on PB bit"
+	depends on ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
+	default "5"
+	help
+	  Specify the pin of the PB port to carry the RI signal for serial
+	  port 1.
+
+config ETRAX_SER1_DSR_ON_PB_BIT
+	int "Ser1 DSR on PB bit"
+	depends on ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
+	default "6"
+	help
+	  Specify the pin of the PB port to carry the DSR signal for serial
+	  port 1.
+
+config ETRAX_SER1_CD_ON_PB_BIT
+	int "Ser1 CD  on PB bit"
+	depends on ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
+	default "7"
+	help
+	  Specify the pin of the PB port to carry the CD signal for serial
+	  port 1.
+
+comment "Make sure you dont have the same PB bits more than once!"
+	depends on ETRAX_SERIAL && ETRAX_SER0_DTR_RI_DSR_CD_ON_PB && ETRAX_SER1_DTR_RI_DSR_CD_ON_PB
+
+config ETRAX_SERIAL_PORT2
+	bool "Serial port 2 enabled"
+	depends on ETRAX_SERIAL
+	help
+	  Enables the ETRAX 100 serial driver for ser2 (ttyS2).
+
+config ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
+	bool "Ser2 DTR, RI, DSR, CD on PA"
+	depends on ETRAX_SERIAL_PORT2
+	help
+	  Enables the status and control signals DTR, RI, DSR and CD on PA for
+	  ser2.
+
+config ETRAX_SER2_DTR_ON_PA_BIT
+	int "Ser2 DTR on PA bit"
+	depends on ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
+	default "4"
+	help
+	  Specify the pin of the PA port to carry the DTR signal for serial
+	  port 2.
+
+config ETRAX_SER2_RI_ON_PA_BIT
+	int "Ser2 RI  on PA bit"
+	depends on ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
+	default "5"
+	help
+	  Specify the pin of the PA port to carry the RI signal for serial
+	  port 2.
+
+config ETRAX_SER2_DSR_ON_PA_BIT
+	int "Ser2 DSR on PA bit"
+	depends on ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
+	default "6"
+	help
+	  Specify the pin of the PA port to carry the DTR signal for serial
+	  port 2.
+
+config ETRAX_SER2_CD_ON_PA_BIT
+	int "Ser2 CD  on PA bit"
+	depends on ETRAX_SER2_DTR_RI_DSR_CD_ON_PA
+	default "7"
+	help
+	  Specify the pin of the PA port to carry the CD signal for serial
+	  port 2.
+
+config ETRAX_SERIAL_PORT3
+	bool "Serial port 3 enabled"
+	depends on ETRAX_SERIAL
+	help
+	  Enables the ETRAX 100 serial driver for ser3 (ttyS3).
+
+config ETRAX_RS485
+	bool "RS-485 support"
+	depends on ETRAX_SERIAL
+	help
+	  Enables support for RS-485 serial communication.  For a primer on
+	  RS-485, see <http://www.hw.cz/english/docs/rs485/rs485.html>.
+
+config ETRAX_RS485_ON_PA
+	bool "RS-485 mode on PA"
+	depends on ETRAX_RS485
+	help
+	  Control Driver Output Enable on RS485 tranceiver using a pin on PA
+	  port:
+	  Axis 2400/2401 uses PA 3.
+
+config ETRAX_RS485_ON_PA_BIT
+	int "RS-485 mode on PA bit"
+	depends on ETRAX_RS485_ON_PA
+	default "3"
+	help
+	  Control Driver Output Enable on RS485 tranceiver using a this bit
+	  on PA port.
+
+config ETRAX_RS485_DISABLE_RECEIVER
+	bool "Disable serial receiver"
+	depends on ETRAX_RS485
+	help
+	  It's necessary to disable the serial receiver to avoid serial
+	  loopback.  Not all products are able to do this in software only.
+	  Axis 2400/2401 must disable receiver.
+
+config ETRAX_SYNCHRONOUS_SERIAL
+	bool "Synchronous serial port support"
+	help
+	  This option enables support for the ETRAX 100LX built-in
+	  synchronous serial ports. These ports are used for continuous
+	  streamed data like audio. The default setting is compatible
+	  with the STA 013 MP3 decoder, but can easily be tuned to fit
+	  any other audio encoder/decoder and SPI.
+
+config ETRAX_SYNCHRONOUS_SERIAL_PORT0
+	bool "Synchronous serial port 0 enabled"
+	depends on ETRAX_SYNCHRONOUS_SERIAL
+	help
+	  Enables the ETRAX 100LX synchronous serial port 0 (syncser0).
+
+config ETRAX_SYNCHRONOUS_SERIAL0_DMA
+	bool "Synchronous serial port 0 uses DMA"
+	depends on ETRAX_SYNCHRONOUS_SERIAL_PORT0
+	help
+	  Makes synchronous serial port 0 use DMA.
+
+config ETRAX_SYNCHRONOUS_SERIAL_PORT1
+	bool "Synchronous serial port 1 enabled"
+	depends on ETRAX_SYNCHRONOUS_SERIAL
+	help
+	  Enables the ETRAX 100LX synchronous serial port 1 (syncser1).
+
+config ETRAX_SYNCHRONOUS_SERIAL1_DMA
+	bool "Synchronous serial port 1 uses DMA"
+	depends on ETRAX_SYNCHRONOUS_SERIAL_PORT1
+	help
+	  Makes synchronous serial port 1 use DMA.
+
+config ETRAX_PARPORT
+	bool "Parallel port support"
+	help
+	  Say Y here to enable the ETRAX on-board parallel ports.
+
+config ETRAX_PARALLEL_PORT0
+	bool "Parallel port 0 enabled"
+	depends on ETRAX_PARPORT
+	help
+	  Say Y here to enable parallel port 0.
+
+config ETRAX_PARALLEL_PORT1
+	bool "Parallel port 1 enabled"
+	depends on ETRAX_PARPORT
+	help
+	  Say Y here to enable parallel port 1.
+
+# here we define the CONFIG_'s necessary to enable parallel port support
+config PARPORT
+	tristate
+	depends on ETRAX_PARPORT
+	default y
+	---help---
+	  If you want to use devices connected to your machine's parallel port
+	  (the connector at the computer with 25 holes), e.g. printer, ZIP
+	  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
+	  create a mini network by connecting the parallel ports of two local
+	  machines) etc., then you need to say Y here; please read
+	  <file:Documentation/parport.txt> and
+	  <file:drivers/parport/BUGS-parport>.
+
+	  For extensive information about drivers for many devices attaching
+	  to the parallel port see <http://www.torque.net/linux-pp.html> on
+	  the WWW.
+
+	  It is possible to share a single parallel port among several devices
+	  and it is safe to compile all the corresponding drivers into the
+	  kernel.  If you want to compile parallel port support as a module
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport.o.  If you have more than one parallel port and want to
+	  specify which port and IRQ to be used by this driver at module load
+	  time, take a look at <file:Documentation/parport.txt>.
+
+	  If unsure, say Y.
+
+config PARPORT_1284
+	bool
+	depends on ETRAX_PARPORT
+	default y
+	help
+	  If you have a printer that supports status readback or device ID, or
+	  want to use a device that uses enhanced parallel port transfer modes
+	  such as EPP and ECP, say Y here to enable advanced IEEE 1284
+	  transfer modes. Also say Y if you want device ID information to
+	  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
+
+config PRINTER
+	tristate
+	depends on ETRAX_PARPORT
+	default y
+	---help---
+	  If you intend to attach a printer to the parallel port of your Linux
+	  box (as opposed to using a serial printer; if the connector at the
+	  printer has 9 or 25 holes ["female"], then it's serial), say Y.
+	  Also read the Printing-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  It is possible to share one parallel port among several devices
+	  (e.g. printer and ZIP drive) and it is safe to compile the
+	  corresponding drivers into the kernel.  If you want to compile this
+	  driver as a module however ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt> and
+	  <file:Documentation/parport.txt>.  The module will be called lp.o.
+
+	  If you have several parallel ports, you can specify which ports to
+	  use with the "lp" kernel command line option.  (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.)  The syntax of the
+	  "lp" command line option can be found in <file:drivers/char/lp.c>.
+
+	  If you have more than 8 printers, you need to increase the LP_NO
+	  macro in lp.c and the PARPORT_MAX macro in parport.h.
+
+config ETRAX_IDE
+	bool "ATA/IDE support"
+	help
+	  Enable this to get support for ATA/IDE.  You can't use parallel
+	  ports or SCSI ports at the same time.
+
+# here we should add the CONFIG_'s necessary to enable the basic
+# general ide drivers so the common case does not need to go
+# into that config submenu. enable disk and CD support. others
+# need to go fiddle in the submenu..
+config IDE
+	tristate
+	depends on ETRAX_IDE
+	default y
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+config BLK_DEV_IDE
+	tristate
+	depends on ETRAX_IDE
+	default y
+	---help---
+	  If you say Y here, you will use the full-featured IDE driver to
+	  control up to ten ATA/IDE interfaces, each being able to serve a
+	  "master" and a "slave" device, for a total of up to twenty ATA/IDE
+	  disk/cdrom/tape/floppy drives.
+
+	  Useful information about large (>540 MB) IDE disks, multiple
+	  interfaces, what to do if ATA/IDE devices are not automatically
+	  detected, sound card ATA/IDE ports, module support, and other
+	  topics, is contained in <file:Documentation/ide.txt>. For detailed
+	  information about hard drives, consult the Disk-HOWTO and the
+	  Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  To fine-tune ATA/IDE drive/interface parameters for improved
+	  performance, look for the hdparm package at
+	  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/ide.txt>. The module will be called ide-mod.o.
+	  Do not compile this driver as a module if your root file system (the
+	  one containing the directory /) is located on an IDE device.
+
+	  If you have one or more IDE drives, say Y or M here. If your system
+	  has no IDE drives, or if memory requirements are really tight, you
+	  could say N here, and select the "Old hard disk driver" below
+	  instead to save about 13 KB of memory in the kernel.
+
+config BLK_DEV_IDEDISK
+	tristate
+	depends on ETRAX_IDE
+	default y
+	---help---
+	  This will include enhanced support for MFM/RLL/IDE hard disks.  If
+	  you have a MFM/RLL/IDE disk, and there is no special reason to use
+	  the old hard disk driver instead, say Y.  If you have an SCSI-only
+	  system, you can say N here.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ide-disk.o.  Do not compile this driver as a module
+	  if your root file system (the one containing the directory /) is
+	  located on the IDE disk. If unsure, say Y.
+
+config BLK_DEV_IDECD
+	tristate
+	depends on ETRAX_IDE
+	default y
+	---help---
+	  If you have a CD-ROM drive using the ATAPI protocol, say Y. ATAPI is
+	  a newer protocol used by IDE CD-ROM and TAPE drives, similar to the
+	  SCSI protocol. Most new CD-ROM drives use ATAPI, including the
+	  NEC-260, Mitsumi FX400, Sony 55E, and just about all non-SCSI
+	  double(2X) or better speed drives.
+
+	  If you say Y here, the CD-ROM drive will be identified at boot time
+	  along with other IDE devices, as "hdb" or "hdc", or something
+	  similar (check the boot messages with dmesg). If this is your only
+	  CD-ROM drive, you can say N to all other CD-ROM options, but be sure
+	  to say Y or M to "ISO 9660 CD-ROM file system support".
+
+	  Note that older versions of LILO (LInux LOader) cannot properly deal
+	  with IDE/ATAPI CD-ROMs, so install LILO 16 or higher, available from
+	  <ftp://brun.dyndns.org/pub/linux/lilo/>.
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ide-cd.o.
+
+config BLK_DEV_IDEDMA
+	bool
+	depends on ETRAX_IDE
+	default y
+
+config ETRAX_IDE_DELAY
+	int "Delay for drives to regain consciousness"
+	depends on ETRAX_IDE
+	default "15"
+	help
+	  Sets the time to wait for disks to regain consciousness after reset.
+
+choice
+	prompt "IDE reset pin"
+	depends on ETRAX_IDE
+	default ETRAX_IDE_PB7_RESET
+
+config ETRAX_IDE_PB7_RESET
+	bool "Port_PB_Bit_7"
+	help
+	  Configures the pin used to reset the IDE bus.
+
+config ETRAX_IDE_G27_RESET
+	bool "Port_G_Bit_27"
+	help
+	  Configures the pin used to reset the IDE bus.
+
+config ETRAX_IDE_CSE1_16_RESET
+	bool "Port_CSE1_Bit_16"
+
+config ETRAX_IDE_CSP0_8_RESET
+	bool "Port_CSP0_Bit_08"
+	help
+	  Configures the pin used to reset the IDE bus.
+
+endchoice
+
+config ETRAX_AXISFLASHMAP
+	bool "Axis flash-map support"
+	help
+	  This option enables MTD mapping of flash devices.  Needed to use
+	  flash memories.  If unsure, say Y.
+
+config ETRAX_PTABLE_SECTOR
+	int "Byte-offset of partition table sector"
+	depends on ETRAX_AXISFLASHMAP
+	default "65536"
+	help
+	  Byte-offset of the partition table in the first flash chip.
+	  The default value is 64kB and should not be changed unless
+	  you know exactly what you are doing. The only valid reason
+	  for changing this is when the flash block size is bigger
+	  than 64kB (e.g. when using two parallel 16 bit flashes).
+
+# here we define the CONFIG_'s necessary to enable MTD support
+# for the flash
+config MTD
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	help
+	  Memory Technology Devices are flash, RAM and similar chips, often
+	  used for solid state file systems on embedded devices. This option
+	  will provide the generic support for MTD drivers to register
+	  themselves with the kernel and for potential users of MTD devices
+	  to enumerate the devices which are present and obtain a handle on
+	  them. It will also allow you to select individual drivers for 
+	  particular hardware and users of MTD devices. If unsure, say N.
+
+config MTD_CFI
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	help
+	  The Common Flash Interface specification was developed by Intel,
+	  AMD and other flash manufactures that provides a universal method
+	  for probing the capabilities of flash devices. If you wish to
+	  support any device that is CFI-compliant, you need to enable this
+	  option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
+	  for more information on CFI.
+
+config MTD_CFI_AMDSTD
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	help
+	  The Common Flash Interface defines a number of different command
+	  sets which a CFI-compliant chip may claim to implement. This code
+	  provides support for one of those command sets, used on chips 
+	  chips including the AMD Am29LV320.
+
+config MTD_AMDSTD
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	help
+	  This option enables support for flash chips using AMD-compatible
+	  commands, including some which are not CFI-compatible and hence 
+	  cannot be used with the CONFIG_MTD_CFI_AMDSTD option.
+
+	  It also works on AMD compatible chips that do conform to CFI.
+
+config MTD_CHAR
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	help
+	  This provides a character device for each MTD device present in
+	  the system, allowing the user to read and write directly to the
+	  memory chips, and also use ioctl() to obtain information about
+	  the device, or to erase parts of it.
+
+config MTD_BLOCK
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	---help---
+	  Although most flash chips have an erase size too large to be useful
+	  as block devices, it is possible to use MTD devices which are based
+	  on RAM chips in this manner. This block device is a user of MTD
+	  devices performing that function.
+
+	  At the moment, it is also required for the Journalling Flash File
+	  System(s) to obtain a handle on the MTD device when it's mounted
+	  (although JFFS and JFFS2 don't actually use any of the functionality
+	  of the mtdblock device).
+
+	  Later, it may be extended to perform read/erase/modify/write cycles
+	  on flash chips to emulate a smaller block size. Needless to say,
+	  this is very unsafe, but could be useful for file systems which are
+	  almost never written to.
+
+	  You do not need this option for use with the DiskOnChip devices. For
+	  those, enable NFTL support (CONFIG_NFTL) instead.
+
+config MTD_PARTITIONS
+	tristate
+	depends on ETRAX_AXISFLASHMAP
+	default y
+	help
+	  If you have a device which needs to divide its flash chip(s) up
+	  into multiple 'partitions', each of which appears to the user as
+	  a separate MTD device, you require this option to be enabled. If
+	  unsure, say 'Y'.
+
+	  Note, however, that you don't need this option for the DiskOnChip
+	  devices. Partitioning on NFTL 'devices' is a different - that's the
+	  'normal' form of partitioning used on a block device.
+
+config ETRAX_I2C
+	bool "I2C support"
+	help
+	  Enables an I2C driver on PB0 and PB1 on ETRAX100.
+	  EXAMPLE usage:
+	  i2c_arg = I2C_WRITEARG(STA013_WRITE_ADDR, reg, val);
+	  ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_WRITEREG), i2c_arg);
+	  i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
+	  val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
+
+# this is true for most products since PB-I2C seems to be somewhat
+# flawed.. 
+config ETRAX_I2C_USES_PB_NOT_PB_I2C
+	bool "I2C uses PB not PB-I2C"
+	depends on ETRAX_I2C
+	help
+	  Select whether to use the special I2C mode in the PB I/O register or
+	  not.  This option needs to be selected in order to use some drivers
+	  that access the I2C I/O pins directly instead of going through the
+	  I2C driver, like the DS1302 realtime-clock driver.  If you are
+	  uncertain, choose Y here.
+
+config ETRAX_I2C_EEPROM
+	bool "I2C EEPROM (non-volatile RAM) support"
+	help
+	  Enables I2C EEPROM (non-volatile RAM) on PB0 and PB1 using the I2C
+	  driver.  Select size option: Probed, 2k, 8k, 16k.
+	  (Probing works for 2k and 8k but not that well for 16k)
+
+choice
+	prompt "EEPROM size"
+	depends on ETRAX_I2C_EEPROM
+	default ETRAX_I2C_EEPROM_PROBE
+
+config ETRAX_I2C_EEPROM_PROBE
+	bool "Probed"
+	help
+	  Specifies size or auto probe of the EEPROM size.
+	  Options: Probed, 2k, 8k, 16k.
+	  (Probing works for 2k and 8k but not that well for 16k)
+
+config ETRAX_I2C_EEPROM_2KB
+	bool "2kB"
+	help
+	  Use a 2kB EEPROM.
+
+config ETRAX_I2C_EEPROM_8KB
+	bool "8kB"
+	help
+	  Use a 8kB EEPROM.
+
+config ETRAX_I2C_EEPROM_16KB
+	bool "16kB"
+	help
+	  Use a 16kB EEPROM.
+
+endchoice
+
+config ETRAX_GPIO
+	bool "GPIO support"
+	---help---
+	  Enables the Etrax general port device (major 120, minors 0 and 1).
+	  You can use this driver to access the general port bits. It supports
+	  these ioctl's:
+	  #include <linux/etraxgpio.h>
+	  fd = open("/dev/gpioa", O_RDWR); // or /dev/gpiob
+	  ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS), bits_to_set);
+	  ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS), bits_to_clear);
+	  val = ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_READBITS), NULL);
+	  Remember that you need to setup the port directions appropriately in
+	  the General configuration.
+
+config ETRAX_PA_BUTTON_BITMASK
+	hex "PA-buttons bitmask"
+	depends on ETRAX_GPIO
+	default "02"
+	help
+	  This is a bitmask with information about what bits on PA that
+	  are used for buttons.
+	  Most products has a so called TEST button on PA1, if that's true
+	  use 02 here.
+	  Use 00 if there are no buttons on PA.
+	  If the bitmask is <> 00 a button driver will be included in the gpio
+	  driver. Etrax general I/O support must be enabled.
+
+config ETRAX_PA_CHANGEABLE_DIR
+	hex "PA user changeable dir mask"
+	depends on ETRAX_GPIO
+	default "00"
+	help
+	  This is a bitmask with information of what bits in PA that a user
+	  can change direction on using ioctl's.
+	  Bit set = changeable.
+	  You probably want 00 here.
+
+config ETRAX_PA_CHANGEABLE_BITS
+	hex "PA user changeable bits mask"
+	depends on ETRAX_GPIO
+	default "FF"
+	help
+	  This is a bitmask with information of what bits in PA that a user
+	  can change change the value on using ioctl's.
+	  Bit set = changeable.
+	  You probably want 00 here.
+
+config ETRAX_PB_CHANGEABLE_DIR
+	hex "PB user changeable dir mask"
+	depends on ETRAX_GPIO
+	default "00"
+	help
+	  This is a bitmask with information of what bits in PB that a user
+	  can change direction on using ioctl's.
+	  Bit set = changeable.
+	  You probably want 00 here.
+
+config ETRAX_PB_CHANGEABLE_BITS
+	hex "PB user changeable bits mask"
+	depends on ETRAX_GPIO
+	default "FF"
+	help
+	  This is a bitmask with information of what bits in PB that a user
+	  can change the value on using ioctl's.
+	  Bit set = changeable.
+	  You probably want 00 here.
+
+#bool 'ARTPEC-1 support' CONFIG_JULIETTE
+#
+#if [ "$CONFIG_JULIETTE" = "y" ]; then
+#   source arch/cris/drivers/juliette/Config.in
+#fi
+config ETRAX_USB_HOST
+	bool "USB host"
+	help
+	  This option enables the host functionality of the ETRAX 100LX
+	  built-in USB controller. In host mode the controller is designed
+	  for CTRL and BULK traffic only, INTR traffic may work as well
+	  however (depending on the requirements of timeliness).
+
+config USB
+	tristate
+	depends on ETRAX_USB_HOST
+	default y
+	---help---
+	  Universal Serial Bus (USB) is a specification for a serial bus
+	  subsystem which offers higher speeds and more features than the
+	  traditional PC serial port.  The bus supplies power to peripherals
+	  and allows for hot swapping.  Up to 127 USB peripherals can be
+	  connected to a single USB port in a tree structure.  The USB port is
+	  the root of the tree, the peripherals are the leaves and the inner
+	  nodes are special USB devices called hubs.  Many newer PC's have USB
+	  ports and newer peripherals such as scanners, keyboards, mice,
+	  modems, and printers support the USB protocol and can be connected
+	  to the PC via those ports.
+
+	  Say Y here if your computer has a USB port and you want to use USB
+	  devices.  You then need to say Y to at least one of "UHCI support"
+	  or "OHCI support" below (the type of interface that the USB hardware
+	  in your computer provides to the operating system) and then choose
+	  from among the drivers for USB peripherals.  You may want to check
+	  out the information provided in <file:Documentation/usb/> and
+	  especially the links given in <file:Documentation/usb/usb-help.txt>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usbcore.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config ETRAX_USB_HOST_PORT1
+	bool "USB port 1 enabled"
+	depends on ETRAX_USB_HOST
+	help
+	  This option enables port 1 of the ETRAX 100LX USB root hub (RH).
+
+config ETRAX_USB_HOST_PORT2
+	bool "USB port 2 enabled"
+	depends on ETRAX_USB_HOST
+	help
+	  This option enables port 2 of the ETRAX 100LX USB root hub (RH).
+
+config ETRAX_DS1302
+	bool "DS1302 Real Time Clock support"
+	help
+	  Enables the driver for the DS1302 Real-Time Clock battery-backed
+	  chip on some products.  The kernel reads the time when booting, and
+	  the date can be set using ioctl(fd, RTC_SET_TIME, &rt) with rt a
+	  rtc_time struct (see <file:include/asm-cris/rtc.h>) on the /dev/rtc
+	  device, major 121.  You can check the time with cat /proc/rtc, but
+	  normal time reading should be done using libc function time and
+	  friends.
+
+config ETRAX_DS1302_RST_ON_GENERIC_PORT
+	bool "DS1302 RST on Generic Port"
+	depends on ETRAX_DS1302
+	help
+	  If your product has the RST signal line for the DS1302 RTC on the
+	  Generic Port then say Y here, otherwise leave it as N in which
+	  case the RST signal line is assumed to be connected to Port PB
+	  (just like the SCL and SDA lines).
+
+config ETRAX_DS1302_RSTBIT
+	int "DS1302 RST bit number"
+	depends on ETRAX_DS1302
+	default "2"
+	help
+	  This is the bit number for the RST signal line of the DS1302 RTC on
+	  the selected port. If you have selected the generic port then it
+	  should be bit 27, otherwise your best bet is bit 5.
+
+config ETRAX_DS1302_SCLBIT
+	int "DS1302 SCL bit number"
+	depends on ETRAX_DS1302
+	default "1"
+	help
+	  This is the bit number for the SCL signal line of the DS1302 RTC on
+	  Port PB. This is probably best left at 3.
+
+config ETRAX_DS1302_SDABIT
+	int "DS1302 SDA bit number"
+	depends on ETRAX_DS1302
+	default "0"
+	help
+	  This is the bit number for the SDA signal line of the DS1302 RTC on
+	  Port PB. This is probably best left at 2.
+
+endmenu
+
diff -Nru a/arch/i386/Config.help b/arch/i386/Config.help
--- a/arch/i386/Config.help	Wed Oct 30 16:44:21 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1104 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_HUGETLB_PAGE
-  This enables support for huge pages.  User space applications
-  can make use of this support with the sys_alloc_hugepages and
-  sys_free_hugepages system calls.  If your applications are
-  huge page aware and your processor (Pentium or later for x86)
-  supports this, then say Y here.
-
-  Otherwise, say N.
-
-CONFIG_NR_CPUS
-  This allows you to specify the maximum number of CPUs which this
-  kernel will support.  The maximum supported value is 32 and the
-  minimum value which makes sense is 2.
-
-  This is purely to save memory - each supported CPU adds
-  approximately eight kilobytes to the kernel image.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  This allows applications to run more reliably even when the system is
-  under load.
-
-  Say Y here if you are building a kernel for a desktop, embedded
-  or real-time system.  Say N if you are unsure.
-
-CONFIG_X86
-  This is Linux's home port.  Linux was originally native to the Intel
-  386, and runs on all the later x86 processors including the Intel
-  486, 586, Pentiums, and various instruction-set-compatible chips by
-  AMD, Cyrix, and others.
-
-CONFIG_X86_NUMAQ
-  This option is used for getting Linux to run on a (IBM/Sequent) NUMA 
-  multiquad box. This changes the way that processors are bootstrapped,
-  and uses Clustered Logical APIC addressing mode instead of Flat Logical.
-  You will need a new lynxer.elf file to flash your firmware with - send
-  email to Martin.Bligh@us.ibm.com
-
-CONFIG_X86_CYCLONE
-  This patch used the Cyclone performance counter on IBM x440, x360,
-  and other Summit based systems for calculating gettimeofday. This 
-  fixes problems resulting from TSC skew found in multi-CEC system. 
-
-  If you are suffering from time skew using a multi-CEC system, say YES.
-  Otherwise it is safe to say NO.
-
-CONFIG_X86_SUMMIT
-  This option is needed for IBM systems that use the Summit/EXA chipset.
-  In particular, it is needed for the x440.
-
-  If you don't have one of these computers, you should say N here.
-
-CONFIG_X86_UP_IOAPIC
-  An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
-  SMP-capable replacement for PC-style interrupt controllers. Most
-  SMP systems and a small number of uniprocessor systems have one.
-  If you have a single-CPU system with an IO-APIC, you can say Y here
-  to use it. If you say Y here even though your machine doesn't have
-  an IO-APIC, then the kernel will still run with no slowdown at all.
-
-  If you have a system with several CPUs, you do not need to say Y
-  here: the IO-APIC will be used automatically.
-
-CONFIG_X86_UP_APIC
-  A local APIC (Advanced Programmable Interrupt Controller) is an
-  integrated interrupt controller in the CPU. If you have a single-CPU
-  system which has a processor with a local APIC, you can say Y here to
-  enable and use it. If you say Y here even though your machine doesn't
-  have a local APIC, then the kernel will still run with no slowdown at
-  all. The local APIC supports CPU-generated self-interrupts (timer,
-  performance counters), and the NMI watchdog which detects hard lockups.
-
-  If you have a system with several CPUs, you do not need to say Y
-  here: the local APIC will be used automatically.
-
-CONFIG_MATH_EMULATION
-  Linux can emulate a math coprocessor (used for floating point
-  operations) if you don't have one. 486DX and Pentium processors have
-  a math coprocessor built in, 486SX and 386 do not, unless you added
-  a 487DX or 387, respectively. (The messages during boot time can
-  give you some hints here ["man dmesg"].) Everyone needs either a
-  coprocessor or this emulation.
-
-  If you don't have a math coprocessor, you need to say Y here; if you
-  say Y here even though you have a coprocessor, the coprocessor will
-  be used nevertheless. (This behavior can be changed with the kernel
-  command line option "no387", which comes handy if your coprocessor
-  is broken. 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.) This means that it is a good idea to say Y here if you
-  intend to use this kernel on different machines.
-
-  More information about the internals of the Linux math coprocessor
-  emulation can be found in <file:arch/i386/math-emu/README>.
-
-  If you are not sure, say Y; apart from resulting in a 66 KB bigger
-  kernel, it won't hurt.
-
-CONFIG_NOHIGHMEM
-  Linux can use up to 64 Gigabytes of physical memory on x86 systems.
-  However, the address space of 32-bit x86 processors is only 4
-  Gigabytes large. That means that, if you have a large amount of
-  physical memory, not all of it can be "permanently mapped" by the
-  kernel. The physical memory that's not permanently mapped is called
-  "high memory".
-
-  If you are compiling a kernel which will never run on a machine with
-  more than 1 Gigabyte total physical RAM, answer "off" here (default
-  choice and suitable for most users). This will result in a "3GB/1GB"
-  split: 3GB are mapped so that each process sees a 3GB virtual memory
-  space and the remaining part of the 4GB virtual memory space is used
-  by the kernel to permanently map as much physical memory as
-  possible.
-
-  If the machine has between 1 and 4 Gigabytes physical RAM, then
-  answer "4GB" here.
-
-  If more than 4 Gigabytes is used then answer "64GB" here. This
-  selection turns Intel PAE (Physical Address Extension) mode on.
-  PAE implements 3-level paging on IA32 processors. PAE is fully
-  supported by Linux, PAE mode is implemented on all recent Intel
-  processors (Pentium Pro and better). NOTE: If you say "64GB" here,
-  then the kernel will not boot on CPUs that don't support PAE!
-
-  The actual amount of total physical memory will either be
-  auto detected or can be forced by using a kernel command line option
-  such as "mem=256M". (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.)
-
-  If unsure, say "off".
-
-CONFIG_HIGHPTE
-  The VM uses one page table entry for each page of physical memory.
-  For systems with a lot of RAM, this can be wasteful of precious
-  low memory.  Setting this option will put user-space page table
-  entries in high memory.
-
-CONFIG_HIGHMEM4G
-  Select this if you have a 32-bit processor and between 1 and 4
-  gigabytes of physical RAM.
-
-CONFIG_HIGHMEM64G
-  Select this if you have a 32-bit processor and more than 4
-  gigabytes of physical RAM.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_PCI_GOBIOS
-  On PCI systems, the BIOS can be used to detect the PCI devices and
-  determine their configuration. However, some old PCI motherboards
-  have BIOS bugs and may crash if this is done. Also, some embedded
-  PCI-based systems don't have any BIOS at all. Linux can also try to
-  detect the PCI hardware directly without using the BIOS.
-
-  With this option, you can specify how Linux should detect the PCI
-  devices. If you choose "BIOS", the BIOS will be used, if you choose
-  "Direct", the BIOS won't be used, and if you choose "Any", the
-  kernel will try the direct access method and falls back to the BIOS
-  if that doesn't work. If unsure, go with the default, which is
-  "Any".
-
-CONFIG_HOTPLUG_PCI
-  Say Y here if you have a motherboard with a PCI Hotplug controller.
-  This allows you to add and remove PCI cards while the machine is
-  powered up and running.  The file system pcihpfs must be mounted
-  in order to interact with any PCI Hotplug controllers.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called pci_hotplug.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  When in doubt, say N.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_VISWS
-  The SGI Visual Workstation series is an IA32-based workstation
-  based on SGI systems chips with some legacy PC hardware attached.
-  Say Y here to create a kernel to run on the SGI 320 or 540.
-  A kernel compiled for the Visual Workstation will not run on other
-  PC boards and vice versa.
-  See <file:Documentation/sgi-visws.txt> for more.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_KCORE_AOUT
-  Not necessary unless you're using a very out-of-date binutils
-  version.  You probably want KCORE_ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_M386
-  This is the processor type of your CPU. This information is used for
-  optimizing purposes. In order to compile a kernel that can run on
-  all x86 CPU types (albeit not optimally fast), you can specify
-  "386" here.
-
-  The kernel will not necessarily run on earlier architectures than
-  the one you have chosen, e.g. a Pentium optimized kernel will run on
-  a PPro, but not necessarily on a i486.
-
-  Here are the settings recommended for greatest speed:
-   - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
-     486DLC/DLC2, UMC 486SX-S and NexGen Nx586.  Only "386" kernels
-     will run on a 386 class machine.
-   - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
-     SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
-   - "586" for generic Pentium CPUs lacking the TSC
-     (time stamp counter) register.
-   - "Pentium-Classic" for the Intel Pentium.
-   - "Pentium-MMX" for the Intel Pentium MMX.
-   - "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II.
-   - "Pentium-III" for the Intel Pentium III
-     and Celerons based on the Coppermine core.
-   - "Pentium-4" for the Intel Pentium 4.
-   - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
-   - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
-   - "Crusoe" for the Transmeta Crusoe series.
-   - "Winchip-C6" for original IDT Winchip.
-   - "Winchip-2" for IDT Winchip 2.
-   - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
-   - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
-
-  If you don't know what to do, choose "386".
-
-CONFIG_M486
-  Select this for a x486 processor, ether Intel or one of the
-  compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,
-  DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
-  U5S.
-
-CONFIG_M586
-  Select this for an x586 or x686 processor such as the AMD K5, the
-  Intel 5x86 or 6x86, or the Intel 6x86MX.  This choice does not
-  assume the RDTSC (Read Time Stamp Counter) instruction.
-
-CONFIG_M586TSC
-  Select this for a Pentium Classic processor with the RDTSC (Read
-  Time Stamp Counter) instruction for benchmarking.
-
-CONFIG_M586MMX
-  Select this for a Pentium with the MMX graphics/multimedia
-  extended instructions.
-
-CONFIG_M686
-  Select this for a Pro/Celeron/Pentium II.  This enables the use of
-  Pentium Pro extended instructions, and disables the init-time guard
-  against the f00f bug found in earlier Pentiums.
-
-CONFIG_MPENTIUMIII
-  Select this for Intel chips based on the Pentium-III and
-  Celeron-Coppermine core.  Enables use of some extended prefetch
-  instructions, in addition to the Pentium II extensions.
-
-CONFIG_MPENTIUM4
-  Select this for Intel Pentium 4 chips.  Presently these are
-  treated almost like Pentium IIIs, but with a different cache
-  shift.
-
-CONFIG_MCRUSOE
-  Select this for Transmeta Crusoe processor.  Treats the processor
-  like a 586 with TSC, and sets some GCC optimization flags (like a
-  Pentium Pro with no alignment requirements).
-
-CONFIG_MK6
-  Select this for an AMD K6-family processor.  Enables use of
-  some extended instructions, and passes appropriate optimization
-  flags to GCC.
-
-CONFIG_MK7
-  Select this for an AMD Athlon K7-family processor.  Enables use of
-  some extended instructions, and passes appropriate optimization
-  flags to GCC.
-
-CONFIG_MCYRIXIII
-  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
-  treat this chip as a generic 586. Whilst the CPU is 686 class,
-  it lacks the cmov extension which gcc assumes is present when
-  generating 686 code.
-
-CONFIG_MWINCHIPC6
-  Select this for a IDT Winchip C6 chip.  Linux and GCC
-  treat this chip as a 586TSC with some extended instructions
-  and alignment requirements.
-
-CONFIG_MWINCHIP2
-  Select this for a IDT Winchip-2.  Linux and GCC
-  treat this chip as a 586TSC with some extended instructions
-  and alignment requirements.
-
-CONFIG_MWINCHIP3D
-  Select this for a IDT Winchip-2A or 3.  Linux and GCC
-  treat this chip as a 586TSC with some extended instructions
-  and alignment reqirements.  Development kernels also enable
-  out of order memory stores for this CPU, which can increase
-  performance of some operations.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_VIDEO_SELECT
-  This enables support for text mode selection on kernel startup. If
-  you want to take advantage of some high-resolution text mode your
-  card's BIOS offers, but the traditional Linux utilities like
-  SVGATextMode don't, you can say Y here and set the mode using the
-  "vga=" option from your boot loader (lilo or loadlin) or set
-  "vga=ask" which brings up a video mode menu on kernel startup. (Try
-  "man bootparam" or see the documentation of your boot loader about
-  how to pass options to the kernel.)
-
-  Read the file <file:Documentation/svga.txt> for more information
-  about the Video mode selection support. If unsure, say N.
-
-CONFIG_MDA_CONSOLE
-  Say Y here if you have an old MDA or monochrome Hercules graphics
-  adapter in your system acting as a second head ( = video card). You
-  will then be able to use two monitors with your Linux system. Do not
-  say Y here if your MDA card is the primary card in your system; the
-  normal VGA driver will handle it.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called mdacon.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_MTRR
-  On Intel P6 family processors (Pentium Pro, Pentium II and later)
-  the Memory Type Range Registers (MTRRs) may be used to control
-  processor access to memory ranges. This is most useful if you have
-  a video (VGA) card on a PCI or AGP bus. Enabling write-combining
-  allows bus write transfers to be combined into a larger transfer
-  before bursting over the PCI/AGP bus. This can increase performance
-  of image write operations 2.5 times or more. Saying Y here creates a
-  /proc/mtrr file which may be used to manipulate your processor's
-  MTRRs. Typically the X server should use this.
-
-  This code has a reasonably generic interface so that similar
-  control registers on other processors can be easily supported
-  as well:
-
-  The Cyrix 6x86, 6x86MX and M II processors have Address Range
-  Registers (ARRs) which provide a similar functionality to MTRRs. For
-  these, the ARRs are used to emulate the MTRRs.
-  The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
-  MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
-  write-combining. All of these processors are supported by this code
-  and it makes sense to say Y here if you have one of them.
-
-  Saying Y here also fixes a problem with buggy SMP BIOSes which only
-  set the MTRRs for the boot CPU and not for the secondary CPUs. This
-  can lead to all sorts of problems, so it's good to say Y here.
-
-  You can safely say Y even if your machine doesn't have MTRRs, you'll
-  just add about 9 KB to your kernel.
-
-  See <file:Documentation/mtrr.txt> for more information.
-
-CONFIG_PM
-  "Power Management" means that parts of your computer are shut
-  off or put into a power conserving "sleep" mode if they are not
-  being used.  There are two competing standards for doing this: APM
-  and ACPI.  If you want to use either one, say Y here and then also
-  to the requisite support below.
-
-  Power Management is most important for battery powered laptop
-  computers; if you have a laptop, check out the Linux Laptop home
-  page on the WWW at
-  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
-  Battery Powered Linux mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that, even if you say N here, Linux on the x86 architecture
-  will issue the hlt instruction if nothing is to be done, thereby
-  sending the processor to sleep and saving power.
-
-CONFIG_ACPI
-  Advanced Configuration and Power Interface (ACPI) support for 
-  Linux requires an ACPI compliant platform (hardware/firmware),
-  and assumes the presence of OS-directed configuration and power
-  management (OSPM) software.  This option will enlarge your 
-  kernel by about 70K.
-
-  Linux ACPI provides a robust functional replacement for several 
-  legacy configuration and power management intefaces, including 
-  the Plug-and-Play BIOS specification (PnP BIOS), the 
-  MultiProcessor Specification (MPS), and the Advanced Power 
-  Management (APM) specification.  If both ACPI and APM support 
-  are configured, whichever is loaded first shall be used.
-  
-  The ACPI SourceForge project contains the latest source code, 
-  documentation, tools, mailing list subscription, and other 
-  information.  This project is available at:
-    <http://sourceforge.net/projects/acpi>
-
-  Linux support for ACPI is based on Intel Corporation's ACPI
-  Component Architecture (ACPI CA).  For more information see:
-    <http://developer.intel.com/technology/iapc/acpi>
-
-  ACPI is an open industry specification co-developed by Compaq, 
-  Intel, Microsoft, Phoenix, and Toshiba.  The specification is 
-  available at:
-    <http://www.acpi.info>
-
-CONFIG_APM
-  APM is a BIOS specification for saving power using several different
-  techniques. This is mostly useful for battery powered laptops with
-  APM compliant BIOSes. If you say Y here, the system time will be
-  reset after a RESUME operation, the /proc/apm device will provide
-  battery status information, and user-space programs will receive
-  notification of APM "events" (e.g. battery status change).
-
-  If you select "Y" here, you can disable actual use of the APM
-  BIOS by passing the "apm=off" option to the kernel at boot time.
-
-  Note that the APM support is almost completely disabled for
-  machines with more than one CPU.
-
-  In order to use APM, you will need supporting software. For location
-  and more information, read <file:Documentation/pm.txt> and the
-  Battery Powered Linux mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver does not spin down disk drives (see the hdparm(8)
-  manpage ("man 8 hdparm") for that), and it doesn't turn off
-  VESA-compliant "green" monitors.
-
-  This driver does not support the TI 4000M TravelMate and the ACER
-  486/DX4/75 because they don't have compliant BIOSes. Many "green"
-  desktop machines also don't have compliant BIOSes, and this driver
-  may cause those machines to panic during the boot phase.
-
-  Generally, if you don't have a battery in your machine, there isn't
-  much point in using this driver and you should say N. If you get
-  random kernel OOPSes or reboots that don't seem to be related to
-  anything, try disabling/enabling this option (or disabling/enabling
-  APM in your BIOS).
-
-  Some other things you should try when experiencing seemingly random,
-  "weird" problems:
-
-   1) make sure that you have enough swap space and that it is
-      enabled.
-   2) pass the "no-hlt" option to the kernel
-   3) switch on floating point emulation in the kernel and pass
-      the "no387" option to the kernel
-   4) pass the "floppy=nodma" option to the kernel
-   5) pass the "mem=4M" option to the kernel (thereby disabling
-      all but the first 4 MB of RAM)
-   6) make sure that the CPU is not over clocked.
-   7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
-   8) disable the cache from your BIOS settings
-   9) install a fan for the video card or exchange video RAM
-   10) install a better fan for the CPU
-   11) exchange RAM chips
-   12) exchange the motherboard.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  apm.o.
-
-CONFIG_APM_IGNORE_USER_SUSPEND
-  This option will ignore USER SUSPEND requests. On machines with a
-  compliant APM BIOS, you want to say N. However, on the NEC Versa M
-  series notebooks, it is necessary to say Y because of a BIOS bug.
-
-CONFIG_APM_DO_ENABLE
-  Enable APM features at boot time. From page 36 of the APM BIOS
-  specification: "When disabled, the APM BIOS does not automatically
-  power manage devices, enter the Standby State, enter the Suspend
-  State, or take power saving steps in response to CPU Idle calls."
-  This driver will make CPU Idle calls when Linux is idle (unless this
-  feature is turned off -- see "Do CPU IDLE calls", below). This
-  should always save battery power, but more complicated APM features
-  will be dependent on your BIOS implementation. You may need to turn
-  this option off if your computer hangs at boot time when using APM
-  support, or if it beeps continuously instead of suspending. Turn
-  this off if you have a NEC UltraLite Versa 33/C or a Toshiba
-  T400CDT. This is off by default since most machines do fine without
-  this feature.
-
-CONFIG_APM_CPU_IDLE
-  Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
-  On some machines, this can activate improved power savings, such as
-  a slowed CPU clock rate, when the machine is idle. These idle calls
-  are made after the idle loop has run for some length of time (e.g.,
-  333 mS). On some machines, this will cause a hang at boot time or
-  whenever the CPU becomes idle. (On machines with more than one CPU,
-  this option does nothing.)
-
-CONFIG_APM_DISPLAY_BLANK
-  Enable console blanking using the APM. Some laptops can use this to
-  turn off the LCD backlight when the screen blanker of the Linux
-  virtual console blanks the screen. Note that this is only used by
-  the virtual console screen blanker, and won't turn off the backlight
-  when using the X Window system. This also doesn't have anything to
-  do with your VESA-compliant power-saving monitor. Further, this
-  option doesn't work for all laptops -- it might not turn off your
-  backlight at all, or it might print a lot of errors to the console,
-  especially if you are using gpm.
-
-CONFIG_APM_RTC_IS_GMT
-  Say Y here if your RTC (Real Time Clock a.k.a. hardware clock)
-  stores the time in GMT (Greenwich Mean Time). Say N if your RTC
-  stores localtime.
-
-  It is in fact recommended to store GMT in your RTC, because then you
-  don't have to worry about daylight savings time changes. The only
-  reason not to use GMT in your RTC is if you also run a broken OS
-  that doesn't understand GMT.
-
-CONFIG_APM_ALLOW_INTS
-  Normally we disable external interrupts while we are making calls to
-  the APM BIOS as a measure to lessen the effects of a badly behaving
-  BIOS implementation.  The BIOS should reenable interrupts if it
-  needs to.  Unfortunately, some BIOSes do not -- especially those in
-  many of the newer IBM Thinkpads.  If you experience hangs when you
-  suspend, try setting this to Y.  Otherwise, say N.
-
-CONFIG_APM_REAL_MODE_POWER_OFF
-  Use real mode APM BIOS calls to switch off the computer. This is
-  a work-around for a number of buggy BIOSes. Switch this option on if
-  your computer crashes instead of powering off properly.
-
-CONFIG_X86_MCE
-  Machine Check Exception support allows the processor to notify the
-  kernel if it detects a problem (e.g. overheating, component failure).
-  The action the kernel takes depends on the severity of the problem,
-  ranging from a warning message on the console, to halting the machine.
-  Your processor must be a Pentium or newer to support this - check the
-  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
-  have a design flaw which leads to false MCE events - hence MCE is
-  disabled on all P5 processors, unless explicitly enabled with "mce"
-  as a boot argument.  Similarly, if MCE is built in and creates a
-  problem on some new non-standard machine, you can boot with "nomce"
-  to disable it.  MCE support simply ignores non-MCE processors like
-  the 386 and 486, so nearly everyone can say Y here.
-
-CONFIG_X86_MCE_NONFATAL
-  Enabling this feature starts a timer that triggers every 5 seconds which
-  will look at the machine check registers to see if anything happened.
-  Non-fatal problems automatically get corrected (but still logged).
-  Disable this if you don't want to see these messages.
-  Seeing the messages this option prints out may be indicative of dying hardware,
-  or out-of-spec (ie, overclocked) hardware.
-  This option only does something on hardware with Intel P6 style MCE.
-  (Pentium Pro and above, AMD Athlon/Duron)
-
-CONFIG_X86_MCE_P4THERMAL
-  Enabling this feature will cause a message to be printed when the P4
-  enters thermal throttling.
-
-CONFIG_CPU_FREQ
-  Clock scaling allows you to change the clock speed of CPUs on the
-  fly. This is a nice method to save battery power on notebooks,
-  because the lower the clock speed, the less power the CPU consumes.
-
-  For more information, take a look at linux/Documentation/cpufreq or
-  at <http://www.brodo.de/cpufreq/>
-
-  If in doubt, say N.
-
-CONFIG_CPU_FREQ_24_API
-  This enables the /proc/sys/cpu/ sysctl interface for controlling
-  CPUFreq, as known from the 2.4.-kernel patches for CPUFreq. Note
-  that some drivers do not support this interface or offer less
-  functionality. 
-
-  If you say N here, you'll be able to control CPUFreq using the
-  new /proc/cpufreq interface.
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_X86_POWERNOW_K6
-  This adds the CPUFreq driver for mobile AMD K6-2+ and mobile
-  AMD K6-3+ processors.
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_X86_P4_CLOCKMOD
-  This adds the CPUFreq driver for Intel Pentium 4 / XEON
-  processors.
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_ELAN_CPUFREQ
-  This adds the CPUFreq driver for AMD Elan SC400 and SC410
-  processors.
-
-  You need to specify the processor maximum speed as boot
-  parameter: elanfreq=maxspeed (in kHz) or as module
-  parameter "max_freq".
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_X86_LONGHAUL
-  This adds the CPUFreq driver for VIA Samuel/CyrixIII, 
-  VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T 
-  processors.
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_X86_SPEEDSTEP
-  This adds the CPUFreq driver for certain mobile Intel Pentium III
-  (Coppermine), all mobile Intel Pentium III-M (Tulatin) and all
-  mobile Intel Pentium 4 P4-Ms.
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_X86_LONGRUN
-  This adds the CPUFreq driver for Transmeta Crusoe processors which
-  support LongRun.
-
-  For details, take a look at linux/Documentation/cpufreq. 
-
-  If in doubt, say N.
-
-CONFIG_TOSHIBA
-  This adds a driver to safely access the System Management Mode of
-  the CPU on Toshiba portables with a genuine Toshiba BIOS. It does
-  not work on models with a Pheonix BIOS. The System Management Mode
-  is used to set the BIOS and power saving options on Toshiba portables.
-
-  For information on utilities to make use of this driver see the
-  Toshiba Linux utilities web site at:
-  <http://www.buzzard.org.uk/toshiba/>.
-
-  Say Y if you intend to run this kernel on a Toshiba portable.
-  Say N otherwise.
-
-CONFIG_I8K
-  This adds a driver to safely access the System Management Mode
-  of the CPU on the Dell Inspiron 8000. The System Management Mode
-  is used to read cpu temperature and cooling fan status and to
-  control the fans on the I8K portables.
-
-  This driver has been tested only on the Inspiron 8000 but it may
-  also work with other Dell laptops. You can force loading on other
-  models by passing the parameter `force=1' to the module. Use at
-  your own risk.
-
-  For information on utilities to make use of this driver see the
-  I8K Linux utilities web site at:
-  <http://www.debian.org/~dz/i8k/>
-
-  Say Y if you intend to run this kernel on a Dell Inspiron 8000.
-  Say N otherwise.
-
-CONFIG_MICROCODE
-  If you say Y here and also to "/dev file system support" in the
-  'File systems' section, you will be able to update the microcode on
-  Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
-  Pentium III, Pentium 4, Xeon etc.  You will obviously need the
-  actual microcode binary data itself which is not shipped with the
-  Linux kernel.
-
-  For latest news and information on obtaining all the required
-  ingredients for this driver, check:
-  <http://www.urbanmyth.org/microcode/>.
-
-  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 microcode.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.  If
-  you use modprobe or kmod you may also want to add the line
-  'alias char-major-10-184 microcode' to your /etc/modules.conf file.
-
-CONFIG_X86_MSR
-  This device gives privileged processes access to the x86
-  Model-Specific Registers (MSRs).  It is a character device with
-  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
-  MSR accesses are directed to a specific CPU on multi-processor
-  systems.
-
-CONFIG_X86_CPUID
-  This device gives processes access to the x86 CPUID instruction to
-  be executed on a specific processor.  It is a character device
-  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
-  /dev/cpu/31/cpuid.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_DEBUG_HIGHMEM
-  This options enables addition error checking for high memory systems.
-  Disable for production systems.
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  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
-  memory.
-
-CONFIG_DEBUG_IOVIRT
-  Say Y here to get warned whenever an attempt is made to do I/O on
-  obviously invalid addresses such as those generated when ioremap()
-  calls are forgotten.  Memory mapped I/O will go through an extra
-  check to catch access to unmapped ISA addresses, an access method
-  that can still be used by old drivers that are being ported from
-  2.0/2.2.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_DEBUG_BUGVERBOSE
-  Say Y here to make BUG() panics output the file name and line number
-  of the BUG call as well as the EIP and oops trace.  This aids
-  debugging but costs about 70-100K of memory.
-
-CONFIG_KALLSYMS
-  Say Y here to let the kernel print out symbolic crash information and
-  symbolic stack backtraces. This increases the size of the kernel
-  somewhat, as all symbols have to be loaded into the kernel image.
-
-CONFIG_DEBUG_OBSOLETE
-  Say Y here if you want to reduce the chances of the tree compiling,
-  and are prepared to dig into driver internals to fix compile errors.
-
-Profiling support
-CONFIG_PROFILING
-  Say Y here to enable the extended profiling support mechanisms used
-  by profilers such as OProfile.
- 
-Software Suspend
-CONFIG_SOFTWARE_SUSPEND
-  Enable the possibilty of suspendig machine. It doesn't need APM.
-  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
-  (patch for sysvinit needed). 
-
-  It creates an image which is saved in your active swaps. By the next
-  booting the, pass 'resume=/path/to/your/swap/file' and kernel will 
-  detect the saved image, restore the memory from
-  it and then it continues to run as before you've suspended.
-  If you don't want the previous state to continue use the 'noresume'
-  kernel option. However note that your partitions will be fsck'd and
-  you must re-mkswap your swap partitions/files.
-
-  Right now you may boot without resuming and then later resume but
-  in meantime you cannot use those swap partitions/files which were
-  involved in suspending. Also in this case there is a risk that buffers
-  on disk won't match with saved ones.
-
-  SMP is supported ``as-is''. There's a code for it but doesn't work.
-  There have been problems reported relating SCSI.
-  
-  This option is about getting stable. However there is still some
-  absence of features.
-
-  For more information take a look at Documentation/swsusp.txt.
-
-CONFIG_SCx200
-  This provides basic support for the National Semiconductor SCx200 
-  processor.  Right now this is just a driver for the GPIO pins.
-
-  If you don't know what to do here, say N.
-
-  This support is also available as a module.  If compiled as a
-  module, it will be called scx200.o.
-
-CONFIG_EDD
-  Say Y or M here if you want to enable BIOS Enhanced Disk Drive
-  Services real mode BIOS calls to determine which disk
-  BIOS tries boot from.  This information is then exported via driverfs.
-
-  This option is experimental, but believed to be safe,
-  and most disk controller BIOS vendors do not yet implement this feature.
diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1651 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+
+mainmenu "Linux Kernel Configuration"
+
+config X86
+	bool
+	default y
+	help
+	  This is Linux's home port.  Linux was originally native to the Intel
+	  386, and runs on all the later x86 processors including the Intel
+	  486, 586, Pentiums, and various instruction-set-compatible chips by
+	  AMD, Cyrix, and others.
+
+config SBUS
+	bool
+
+config UID16
+	bool
+	default y
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "Processor type and features"
+
+choice
+	prompt "Processor family"
+	default M686
+
+config M386
+	bool "386"
+	---help---
+	  This is the processor type of your CPU. This information is used for
+	  optimizing purposes. In order to compile a kernel that can run on
+	  all x86 CPU types (albeit not optimally fast), you can specify
+	  "386" here.
+
+	  The kernel will not necessarily run on earlier architectures than
+	  the one you have chosen, e.g. a Pentium optimized kernel will run on
+	  a PPro, but not necessarily on a i486.
+
+	  Here are the settings recommended for greatest speed:
+	  - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
+	  486DLC/DLC2, UMC 486SX-S and NexGen Nx586.  Only "386" kernels
+	  will run on a 386 class machine.
+	  - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
+	  SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
+	  - "586" for generic Pentium CPUs lacking the TSC
+	  (time stamp counter) register.
+	  - "Pentium-Classic" for the Intel Pentium.
+	  - "Pentium-MMX" for the Intel Pentium MMX.
+	  - "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II.
+	  - "Pentium-III" for the Intel Pentium III
+	  and Celerons based on the Coppermine core.
+	  - "Pentium-4" for the Intel Pentium 4.
+	  - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
+	  - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
+	  - "Crusoe" for the Transmeta Crusoe series.
+	  - "Winchip-C6" for original IDT Winchip.
+	  - "Winchip-2" for IDT Winchip 2.
+	  - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
+	  - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
+
+	  If you don't know what to do, choose "386".
+
+config M486
+	bool "486"
+	help
+	  Select this for a x486 processor, ether Intel or one of the
+	  compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,
+	  DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
+	  U5S.
+
+config M586
+	bool "586/K5/5x86/6x86/6x86MX"
+	help
+	  Select this for an x586 or x686 processor such as the AMD K5, the
+	  Intel 5x86 or 6x86, or the Intel 6x86MX.  This choice does not
+	  assume the RDTSC (Read Time Stamp Counter) instruction.
+
+config M586TSC
+	bool "Pentium-Classic"
+	help
+	  Select this for a Pentium Classic processor with the RDTSC (Read
+	  Time Stamp Counter) instruction for benchmarking.
+
+config M586MMX
+	bool "Pentium-MMX"
+	help
+	  Select this for a Pentium with the MMX graphics/multimedia
+	  extended instructions.
+
+config M686
+	bool "Pentium-Pro/Celeron/Pentium-II"
+	help
+	  Select this for a Pro/Celeron/Pentium II.  This enables the use of
+	  Pentium Pro extended instructions, and disables the init-time guard
+	  against the f00f bug found in earlier Pentiums.
+
+config MPENTIUMIII
+	bool "Pentium-III/Celeron(Coppermine)"
+	help
+	  Select this for Intel chips based on the Pentium-III and
+	  Celeron-Coppermine core.  Enables use of some extended prefetch
+	  instructions, in addition to the Pentium II extensions.
+
+config MPENTIUM4
+	bool "Pentium-4"
+	help
+	  Select this for Intel Pentium 4 chips.  Presently these are
+	  treated almost like Pentium IIIs, but with a different cache
+	  shift.
+
+config MK6
+	bool "K6/K6-II/K6-III"
+	help
+	  Select this for an AMD K6-family processor.  Enables use of
+	  some extended instructions, and passes appropriate optimization
+	  flags to GCC.
+
+config MK7
+	bool "Athlon/Duron/K7"
+	help
+	  Select this for an AMD Athlon K7-family processor.  Enables use of
+	  some extended instructions, and passes appropriate optimization
+	  flags to GCC.
+
+config MELAN
+	bool "Elan"
+
+config MCRUSOE
+	bool "Crusoe"
+	help
+	  Select this for Transmeta Crusoe processor.  Treats the processor
+	  like a 586 with TSC, and sets some GCC optimization flags (like a
+	  Pentium Pro with no alignment requirements).
+
+config MWINCHIPC6
+	bool "Winchip-C6"
+	help
+	  Select this for a IDT Winchip C6 chip.  Linux and GCC
+	  treat this chip as a 586TSC with some extended instructions
+	  and alignment requirements.
+
+config MWINCHIP2
+	bool "Winchip-2"
+	help
+	  Select this for a IDT Winchip-2.  Linux and GCC
+	  treat this chip as a 586TSC with some extended instructions
+	  and alignment requirements.
+
+config MWINCHIP3D
+	bool "Winchip-2A/Winchip-3"
+	help
+	  Select this for a IDT Winchip-2A or 3.  Linux and GCC
+	  treat this chip as a 586TSC with some extended instructions
+	  and alignment reqirements.  Development kernels also enable
+	  out of order memory stores for this CPU, which can increase
+	  performance of some operations.
+
+config MCYRIXIII
+	bool "CyrixIII/VIA-C3"
+	help
+	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
+	  treat this chip as a generic 586. Whilst the CPU is 686 class,
+	  it lacks the cmov extension which gcc assumes is present when
+	  generating 686 code.
+
+endchoice
+
+#
+# Define implied options from the CPU selection here
+#
+config X86_CMPXCHG
+	bool
+	depends on !M386
+	default y
+
+config X86_XADD
+	bool
+	depends on !M386
+	default y
+
+config X86_L1_CACHE_SHIFT
+	int
+	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MCYRIXIII || MK6 || MPENTIUMIII || M686 || M586MMX || M586TSC || M586
+	default "4" if MELAN || M486 || M386
+	default "6" if MK7
+	default "7" if MPENTIUM4
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	depends on M386
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	depends on !M386
+	default y
+
+config X86_PPRO_FENCE
+	bool
+	depends on M686 || M586MMX || M586TSC || M586 || M486 || M386
+	default y
+
+config X86_F00F_BUG
+	bool
+	depends on M586MMX || M586TSC || M586 || M486 || M386
+	default y
+
+config X86_WP_WORKS_OK
+	bool
+	depends on !M386
+	default y
+
+config X86_INVLPG
+	bool
+	depends on !M386
+	default y
+
+config X86_BSWAP
+	bool
+	depends on !M386
+	default y
+
+config X86_POPAD_OK
+	bool
+	depends on !M386
+	default y
+
+config X86_USE_STRING_486
+	bool
+	depends on MELAN || M586MMX || M586TSC || M586 || M486
+	default y
+
+config X86_ALIGNMENT_16
+	bool
+	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486
+	default y
+
+config X86_TSC
+	bool
+	depends on MWINCHIP3D || MWINCHIP2 || MCRUSOE || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMIII || M686 || M586MMX || M586TSC
+	default y
+
+config X86_GOOD_APIC
+	bool
+	depends on MK7 || MPENTIUM4 || MPENTIUMIII || M686 || M586MMX
+	default y
+
+config X86_INTEL_USERCOPY
+	bool
+	depends on MPENTIUM4 || MPENTIUMIII || M586MMX
+	default y
+
+config X86_USE_PPRO_CHECKSUM
+	bool
+	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMIII || M686
+	default y
+
+config X86_USE_3DNOW
+	bool
+	depends on MCYRIXIII || MK7
+	default y
+
+config X86_OOSTORE
+	bool
+	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6
+	default y
+
+config HUGETLB_PAGE
+	bool "Huge TLB Page Support"
+	help
+	  This enables support for huge pages.  User space applications
+	  can make use of this support with the sys_alloc_hugepages and
+	  sys_free_hugepages system calls.  If your applications are
+	  huge page aware and your processor (Pentium or later for x86)
+	  supports this, then say Y here.
+
+	  Otherwise, say N.
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config PREEMPT
+	bool "Preemptible Kernel"
+	help
+	  This option reduces the latency of the kernel when reacting to
+	  real-time or interactive events by allowing a low priority process to
+	  be preempted even if it is in kernel mode executing a system call.
+	  This allows applications to run more reliably even when the system is
+	  under load.
+
+	  Say Y here if you are building a kernel for a desktop, embedded
+	  or real-time system.  Say N if you are unsure.
+
+config X86_UP_APIC
+	bool "Local APIC support on uniprocessors" if !SMP
+	default y if SMP
+	---help---
+	  A local APIC (Advanced Programmable Interrupt Controller) is an
+	  integrated interrupt controller in the CPU. If you have a single-CPU
+	  system which has a processor with a local APIC, you can say Y here to
+	  enable and use it. If you say Y here even though your machine doesn't
+	  have a local APIC, then the kernel will still run with no slowdown at
+	  all. The local APIC supports CPU-generated self-interrupts (timer,
+	  performance counters), and the NMI watchdog which detects hard lockups.
+
+	  If you have a system with several CPUs, you do not need to say Y
+	  here: the local APIC will be used automatically.
+
+config X86_UP_IOAPIC
+	bool "IO-APIC support on uniprocessors"
+	depends on !SMP && X86_UP_APIC
+	help
+	  An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
+	  SMP-capable replacement for PC-style interrupt controllers. Most
+	  SMP systems and a small number of uniprocessor systems have one.
+	  If you have a single-CPU system with an IO-APIC, you can say Y here
+	  to use it. If you say Y here even though your machine doesn't have
+	  an IO-APIC, then the kernel will still run with no slowdown at all.
+
+	  If you have a system with several CPUs, you do not need to say Y
+	  here: the IO-APIC will be used automatically.
+
+config X86_LOCAL_APIC
+	bool
+	depends on !SMP && X86_UP_APIC
+	default y
+
+config X86_IO_APIC
+	bool
+	depends on !SMP && X86_UP_IOAPIC
+	default y
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+	help
+	  This allows you to specify the maximum number of CPUs which this
+	  kernel will support.  The maximum supported value is 32 and the
+	  minimum value which makes sense is 2.
+
+	  This is purely to save memory - each supported CPU adds
+	  approximately eight kilobytes to the kernel image.
+
+config X86_NUMA
+	bool "Multi-node NUMA system support"
+	depends on SMP
+
+#Platform Choices
+config X86_NUMAQ
+	bool "Multiquad (IBM/Sequent) NUMAQ support"
+	depends on X86_NUMA
+	help
+	  This option is used for getting Linux to run on a (IBM/Sequent) NUMA 
+	  multiquad box. This changes the way that processors are bootstrapped,
+	  and uses Clustered Logical APIC addressing mode instead of Flat Logical.
+	  You will need a new lynxer.elf file to flash your firmware with - send
+	  email to Martin.Bligh@us.ibm.com
+
+config X86_SUMMIT
+	bool "IBM x440 (Summit/EXA) support"
+	depends on X86_NUMA
+	help
+	  This option is needed for IBM systems that use the Summit/EXA chipset.
+	  In particular, it is needed for the x440.
+
+	  If you don't have one of these computers, you should say N here.
+
+config CLUSTERED_APIC
+	bool
+	depends on X86_NUMA && (X86_NUMAQ || X86_SUMMIT)
+	default y
+
+# Common NUMA Features
+config NUMA
+	bool "Numa Memory Allocation Support"
+	depends on X86_NUMAQ
+
+config DISCONTIGMEM
+	bool
+	depends on NUMA
+	default y
+
+config HAVE_ARCH_BOOTMEM_NODE
+	bool
+	depends on NUMA
+	default y
+
+config X86_MCE
+	bool "Machine Check Exception"
+	---help---
+	  Machine Check Exception support allows the processor to notify the
+	  kernel if it detects a problem (e.g. overheating, component failure).
+	  The action the kernel takes depends on the severity of the problem,
+	  ranging from a warning message on the console, to halting the machine.
+	  Your processor must be a Pentium or newer to support this - check the
+	  flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
+	  have a design flaw which leads to false MCE events - hence MCE is
+	  disabled on all P5 processors, unless explicitly enabled with "mce"
+	  as a boot argument.  Similarly, if MCE is built in and creates a
+	  problem on some new non-standard machine, you can boot with "nomce"
+	  to disable it.  MCE support simply ignores non-MCE processors like
+	  the 386 and 486, so nearly everyone can say Y here.
+
+config X86_MCE_NONFATAL
+	bool "Check for non-fatal errors on Athlon/Duron"
+	depends on X86_MCE
+	help
+	  Enabling this feature starts a timer that triggers every 5 seconds which
+	  will look at the machine check registers to see if anything happened.
+	  Non-fatal problems automatically get corrected (but still logged).
+	  Disable this if you don't want to see these messages.
+	  Seeing the messages this option prints out may be indicative of dying hardware,
+	  or out-of-spec (ie, overclocked) hardware.
+	  This option only does something on hardware with Intel P6 style MCE.
+	  (Pentium Pro and above, AMD Athlon/Duron)
+
+config X86_MCE_P4THERMAL
+	bool "check for P4 thermal throttling interrupt."
+	depends on X86_MCE && X86_UP_APIC
+	help
+	  Enabling this feature will cause a message to be printed when the P4
+	  enters thermal throttling.
+
+config CPU_FREQ
+	bool "CPU Frequency scaling"
+	help
+	  Clock scaling allows you to change the clock speed of CPUs on the
+	  fly. This is a nice method to save battery power on notebooks,
+	  because the lower the clock speed, the less power the CPU consumes.
+
+	  For more information, take a look at linux/Documentation/cpufreq or
+	  at <http://www.brodo.de/cpufreq/>
+
+	  If in doubt, say N.
+
+config CPU_FREQ_24_API
+	bool "/proc/sys/cpu/ interface (2.4.)"
+	depends on CPU_FREQ
+	---help---
+	  This enables the /proc/sys/cpu/ sysctl interface for controlling
+	  CPUFreq, as known from the 2.4.-kernel patches for CPUFreq. Note
+	  that some drivers do not support this interface or offer less
+	  functionality. 
+
+	  If you say N here, you'll be able to control CPUFreq using the
+	  new /proc/cpufreq interface.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config CPU_FREQ_26_API
+	bool
+	depends on CPU_FREQ && !CPU_FREQ_24_API
+	default y
+
+config X86_POWERNOW_K6
+	tristate "AMD Mobile K6-2/K6-3 PowerNow!"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for mobile AMD K6-2+ and mobile
+	  AMD K6-3+ processors.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config ELAN_CPUFREQ
+	tristate "AMD Elan"
+	depends on CPU_FREQ && MELAN
+	---help---
+	  This adds the CPUFreq driver for AMD Elan SC400 and SC410
+	  processors.
+
+	  You need to specify the processor maximum speed as boot
+	  parameter: elanfreq=maxspeed (in kHz) or as module
+	  parameter "max_freq".
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_LONGHAUL
+	tristate "VIA Cyrix III Longhaul"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for VIA Samuel/CyrixIII, 
+	  VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T 
+	  processors.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_SPEEDSTEP
+	tristate "Intel Speedstep"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for certain mobile Intel Pentium III
+	  (Coppermine), all mobile Intel Pentium III-M (Tulatin) and all
+	  mobile Intel Pentium 4 P4-Ms.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_P4_CLOCKMOD
+	tristate "Intel Pentium 4 clock modulation"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for Intel Pentium 4 / XEON
+	  processors.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_LONGRUN
+	tristate "Transmeta LongRun"
+	depends on CPU_FREQ && !CPU_FREQ_24_API
+	help
+	  This adds the CPUFreq driver for Transmeta Crusoe processors which
+	  support LongRun.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config TOSHIBA
+	tristate "Toshiba Laptop support"
+	---help---
+	  This adds a driver to safely access the System Management Mode of
+	  the CPU on Toshiba portables with a genuine Toshiba BIOS. It does
+	  not work on models with a Pheonix BIOS. The System Management Mode
+	  is used to set the BIOS and power saving options on Toshiba portables.
+
+	  For information on utilities to make use of this driver see the
+	  Toshiba Linux utilities web site at:
+	  <http://www.buzzard.org.uk/toshiba/>.
+
+	  Say Y if you intend to run this kernel on a Toshiba portable.
+	  Say N otherwise.
+
+config I8K
+	tristate "Dell laptop support"
+	---help---
+	  This adds a driver to safely access the System Management Mode
+	  of the CPU on the Dell Inspiron 8000. The System Management Mode
+	  is used to read cpu temperature and cooling fan status and to
+	  control the fans on the I8K portables.
+
+	  This driver has been tested only on the Inspiron 8000 but it may
+	  also work with other Dell laptops. You can force loading on other
+	  models by passing the parameter `force=1' to the module. Use at
+	  your own risk.
+
+	  For information on utilities to make use of this driver see the
+	  I8K Linux utilities web site at:
+	  <http://www.debian.org/~dz/i8k/>
+
+	  Say Y if you intend to run this kernel on a Dell Inspiron 8000.
+	  Say N otherwise.
+
+config MICROCODE
+	tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
+	---help---
+	  If you say Y here and also to "/dev file system support" in the
+	  'File systems' section, you will be able to update the microcode on
+	  Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
+	  Pentium III, Pentium 4, Xeon etc.  You will obviously need the
+	  actual microcode binary data itself which is not shipped with the
+	  Linux kernel.
+
+	  For latest news and information on obtaining all the required
+	  ingredients for this driver, check:
+	  <http://www.urbanmyth.org/microcode/>.
+
+	  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 microcode.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.  If
+	  you use modprobe or kmod you may also want to add the line
+	  'alias char-major-10-184 microcode' to your /etc/modules.conf file.
+
+config X86_MSR
+	tristate "/dev/cpu/*/msr - Model-specific register support"
+	help
+	  This device gives privileged processes access to the x86
+	  Model-Specific Registers (MSRs).  It is a character device with
+	  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
+	  MSR accesses are directed to a specific CPU on multi-processor
+	  systems.
+
+config X86_CPUID
+	tristate "/dev/cpu/*/cpuid - CPU information support"
+	help
+	  This device gives processes access to the x86 CPUID instruction to
+	  be executed on a specific processor.  It is a character device
+	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
+	  /dev/cpu/31/cpuid.
+
+config EDD
+	tristate "BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  Say Y or M here if you want to enable BIOS Enhanced Disk Drive
+	  Services real mode BIOS calls to determine which disk
+	  BIOS tries boot from.  This information is then exported via driverfs.
+
+	  This option is experimental, but believed to be safe,
+	  and most disk controller BIOS vendors do not yet implement this feature.
+
+choice
+	prompt "High Memory Support"
+	default NOHIGHMEM
+
+config NOHIGHMEM
+	bool "off"
+	---help---
+	  Linux can use up to 64 Gigabytes of physical memory on x86 systems.
+	  However, the address space of 32-bit x86 processors is only 4
+	  Gigabytes large. That means that, if you have a large amount of
+	  physical memory, not all of it can be "permanently mapped" by the
+	  kernel. The physical memory that's not permanently mapped is called
+	  "high memory".
+
+	  If you are compiling a kernel which will never run on a machine with
+	  more than 1 Gigabyte total physical RAM, answer "off" here (default
+	  choice and suitable for most users). This will result in a "3GB/1GB"
+	  split: 3GB are mapped so that each process sees a 3GB virtual memory
+	  space and the remaining part of the 4GB virtual memory space is used
+	  by the kernel to permanently map as much physical memory as
+	  possible.
+
+	  If the machine has between 1 and 4 Gigabytes physical RAM, then
+	  answer "4GB" here.
+
+	  If more than 4 Gigabytes is used then answer "64GB" here. This
+	  selection turns Intel PAE (Physical Address Extension) mode on.
+	  PAE implements 3-level paging on IA32 processors. PAE is fully
+	  supported by Linux, PAE mode is implemented on all recent Intel
+	  processors (Pentium Pro and better). NOTE: If you say "64GB" here,
+	  then the kernel will not boot on CPUs that don't support PAE!
+
+	  The actual amount of total physical memory will either be
+	  auto detected or can be forced by using a kernel command line option
+	  such as "mem=256M". (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.)
+
+	  If unsure, say "off".
+
+config HIGHMEM4G
+	bool "4GB"
+	help
+	  Select this if you have a 32-bit processor and between 1 and 4
+	  gigabytes of physical RAM.
+
+config HIGHMEM64G
+	bool "64GB"
+	help
+	  Select this if you have a 32-bit processor and more than 4
+	  gigabytes of physical RAM.
+
+endchoice
+
+config HIGHMEM
+	bool
+	depends on HIGHMEM64G || HIGHMEM4G
+	default y
+
+config X86_PAE
+	bool
+	depends on HIGHMEM64G
+	default y
+
+config HIGHPTE
+	bool "Allocate 3rd-level pagetables from highmem"
+	depends on HIGHMEM4G || HIGHMEM64G
+	help
+	  The VM uses one page table entry for each page of physical memory.
+	  For systems with a lot of RAM, this can be wasteful of precious
+	  low memory.  Setting this option will put user-space page table
+	  entries in high memory.
+
+config MATH_EMULATION
+	bool "Math emulation"
+	---help---
+	  Linux can emulate a math coprocessor (used for floating point
+	  operations) if you don't have one. 486DX and Pentium processors have
+	  a math coprocessor built in, 486SX and 386 do not, unless you added
+	  a 487DX or 387, respectively. (The messages during boot time can
+	  give you some hints here ["man dmesg"].) Everyone needs either a
+	  coprocessor or this emulation.
+
+	  If you don't have a math coprocessor, you need to say Y here; if you
+	  say Y here even though you have a coprocessor, the coprocessor will
+	  be used nevertheless. (This behavior can be changed with the kernel
+	  command line option "no387", which comes handy if your coprocessor
+	  is broken. 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.) This means that it is a good idea to say Y here if you
+	  intend to use this kernel on different machines.
+
+	  More information about the internals of the Linux math coprocessor
+	  emulation can be found in <file:arch/i386/math-emu/README>.
+
+	  If you are not sure, say Y; apart from resulting in a 66 KB bigger
+	  kernel, it won't hurt.
+
+config MTRR
+	bool "MTRR (Memory Type Range Register) support"
+	---help---
+	  On Intel P6 family processors (Pentium Pro, Pentium II and later)
+	  the Memory Type Range Registers (MTRRs) may be used to control
+	  processor access to memory ranges. This is most useful if you have
+	  a video (VGA) card on a PCI or AGP bus. Enabling write-combining
+	  allows bus write transfers to be combined into a larger transfer
+	  before bursting over the PCI/AGP bus. This can increase performance
+	  of image write operations 2.5 times or more. Saying Y here creates a
+	  /proc/mtrr file which may be used to manipulate your processor's
+	  MTRRs. Typically the X server should use this.
+
+	  This code has a reasonably generic interface so that similar
+	  control registers on other processors can be easily supported
+	  as well:
+
+	  The Cyrix 6x86, 6x86MX and M II processors have Address Range
+	  Registers (ARRs) which provide a similar functionality to MTRRs. For
+	  these, the ARRs are used to emulate the MTRRs.
+	  The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
+	  MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
+	  write-combining. All of these processors are supported by this code
+	  and it makes sense to say Y here if you have one of them.
+
+	  Saying Y here also fixes a problem with buggy SMP BIOSes which only
+	  set the MTRRs for the boot CPU and not for the secondary CPUs. This
+	  can lead to all sorts of problems, so it's good to say Y here.
+
+	  You can safely say Y even if your machine doesn't have MTRRs, you'll
+	  just add about 9 KB to your kernel.
+
+	  See <file:Documentation/mtrr.txt> for more information.
+
+config HAVE_DEC_LOCK
+	bool
+	depends on (SMP || PREEMPT) && X86_CMPXCHG
+	default y
+
+endmenu
+
+
+menu "Power management options (ACPI, APM)"
+
+source "drivers/acpi/Kconfig"
+
+config PM
+	bool "Power Management support"
+	---help---
+	  "Power Management" means that parts of your computer are shut
+	  off or put into a power conserving "sleep" mode if they are not
+	  being used.  There are two competing standards for doing this: APM
+	  and ACPI.  If you want to use either one, say Y here and then also
+	  to the requisite support below.
+
+	  Power Management is most important for battery powered laptop
+	  computers; if you have a laptop, check out the Linux Laptop home
+	  page on the WWW at
+	  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
+	  Battery Powered Linux mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that, even if you say N here, Linux on the x86 architecture
+	  will issue the hlt instruction if nothing is to be done, thereby
+	  sending the processor to sleep and saving power.
+
+config APM
+	tristate "Advanced Power Management BIOS support"
+	depends on PM
+	---help---
+	  APM is a BIOS specification for saving power using several different
+	  techniques. This is mostly useful for battery powered laptops with
+	  APM compliant BIOSes. If you say Y here, the system time will be
+	  reset after a RESUME operation, the /proc/apm device will provide
+	  battery status information, and user-space programs will receive
+	  notification of APM "events" (e.g. battery status change).
+
+	  If you select "Y" here, you can disable actual use of the APM
+	  BIOS by passing the "apm=off" option to the kernel at boot time.
+
+	  Note that the APM support is almost completely disabled for
+	  machines with more than one CPU.
+
+	  In order to use APM, you will need supporting software. For location
+	  and more information, read <file:Documentation/pm.txt> and the
+	  Battery Powered Linux mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver does not spin down disk drives (see the hdparm(8)
+	  manpage ("man 8 hdparm") for that), and it doesn't turn off
+	  VESA-compliant "green" monitors.
+
+	  This driver does not support the TI 4000M TravelMate and the ACER
+	  486/DX4/75 because they don't have compliant BIOSes. Many "green"
+	  desktop machines also don't have compliant BIOSes, and this driver
+	  may cause those machines to panic during the boot phase.
+
+	  Generally, if you don't have a battery in your machine, there isn't
+	  much point in using this driver and you should say N. If you get
+	  random kernel OOPSes or reboots that don't seem to be related to
+	  anything, try disabling/enabling this option (or disabling/enabling
+	  APM in your BIOS).
+
+	  Some other things you should try when experiencing seemingly random,
+	  "weird" problems:
+
+	  1) make sure that you have enough swap space and that it is
+	  enabled.
+	  2) pass the "no-hlt" option to the kernel
+	  3) switch on floating point emulation in the kernel and pass
+	  the "no387" option to the kernel
+	  4) pass the "floppy=nodma" option to the kernel
+	  5) pass the "mem=4M" option to the kernel (thereby disabling
+	  all but the first 4 MB of RAM)
+	  6) make sure that the CPU is not over clocked.
+	  7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
+	  8) disable the cache from your BIOS settings
+	  9) install a fan for the video card or exchange video RAM
+	  10) install a better fan for the CPU
+	  11) exchange RAM chips
+	  12) exchange the motherboard.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  apm.o.
+
+config APM_IGNORE_USER_SUSPEND
+	bool "Ignore USER SUSPEND"
+	depends on APM
+	help
+	  This option will ignore USER SUSPEND requests. On machines with a
+	  compliant APM BIOS, you want to say N. However, on the NEC Versa M
+	  series notebooks, it is necessary to say Y because of a BIOS bug.
+
+config APM_DO_ENABLE
+	bool "Enable PM at boot time"
+	depends on APM
+	---help---
+	  Enable APM features at boot time. From page 36 of the APM BIOS
+	  specification: "When disabled, the APM BIOS does not automatically
+	  power manage devices, enter the Standby State, enter the Suspend
+	  State, or take power saving steps in response to CPU Idle calls."
+	  This driver will make CPU Idle calls when Linux is idle (unless this
+	  feature is turned off -- see "Do CPU IDLE calls", below). This
+	  should always save battery power, but more complicated APM features
+	  will be dependent on your BIOS implementation. You may need to turn
+	  this option off if your computer hangs at boot time when using APM
+	  support, or if it beeps continuously instead of suspending. Turn
+	  this off if you have a NEC UltraLite Versa 33/C or a Toshiba
+	  T400CDT. This is off by default since most machines do fine without
+	  this feature.
+
+config APM_CPU_IDLE
+	bool "Make CPU Idle calls when idle"
+	depends on APM
+	help
+	  Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
+	  On some machines, this can activate improved power savings, such as
+	  a slowed CPU clock rate, when the machine is idle. These idle calls
+	  are made after the idle loop has run for some length of time (e.g.,
+	  333 mS). On some machines, this will cause a hang at boot time or
+	  whenever the CPU becomes idle. (On machines with more than one CPU,
+	  this option does nothing.)
+
+config APM_DISPLAY_BLANK
+	bool "Enable console blanking using APM"
+	depends on APM
+	help
+	  Enable console blanking using the APM. Some laptops can use this to
+	  turn off the LCD backlight when the screen blanker of the Linux
+	  virtual console blanks the screen. Note that this is only used by
+	  the virtual console screen blanker, and won't turn off the backlight
+	  when using the X Window system. This also doesn't have anything to
+	  do with your VESA-compliant power-saving monitor. Further, this
+	  option doesn't work for all laptops -- it might not turn off your
+	  backlight at all, or it might print a lot of errors to the console,
+	  especially if you are using gpm.
+
+config APM_RTC_IS_GMT
+	bool "RTC stores time in GMT"
+	depends on APM
+	help
+	  Say Y here if your RTC (Real Time Clock a.k.a. hardware clock)
+	  stores the time in GMT (Greenwich Mean Time). Say N if your RTC
+	  stores localtime.
+
+	  It is in fact recommended to store GMT in your RTC, because then you
+	  don't have to worry about daylight savings time changes. The only
+	  reason not to use GMT in your RTC is if you also run a broken OS
+	  that doesn't understand GMT.
+
+config APM_ALLOW_INTS
+	bool "Allow interrupts during APM BIOS calls"
+	depends on APM
+	help
+	  Normally we disable external interrupts while we are making calls to
+	  the APM BIOS as a measure to lessen the effects of a badly behaving
+	  BIOS implementation.  The BIOS should reenable interrupts if it
+	  needs to.  Unfortunately, some BIOSes do not -- especially those in
+	  many of the newer IBM Thinkpads.  If you experience hangs when you
+	  suspend, try setting this to Y.  Otherwise, say N.
+
+config APM_REAL_MODE_POWER_OFF
+	bool "Use real mode APM BIOS call to power off"
+	depends on APM
+	help
+	  Use real mode APM BIOS calls to switch off the computer. This is
+	  a work-around for a number of buggy BIOSes. Switch this option on if
+	  your computer crashes instead of powering off properly.
+
+endmenu
+
+
+menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
+
+# Visual Workstation support is utterly broken.
+# If you want to see it working mail an VW540 to hch@infradead.org 8)
+#bool 'SGI Visual Workstation support' CONFIG_VISWS
+config X86_VISWS_APIC
+	bool
+	depends on VISWS
+	default y
+
+config X86_LOCAL_APIC
+	bool
+	depends on !VISWS && SMP || VISWS
+	default y
+
+config PCI
+	bool "PCI support" if !VISWS
+	default y if VISWS
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config X86_IO_APIC
+	bool
+	depends on !VISWS && SMP
+	default y
+
+choice
+	prompt "PCI access mode"
+	depends on !VISWS && PCI
+	default PCI_GOANY
+
+config PCI_GOBIOS
+	bool "BIOS"
+	---help---
+	  On PCI systems, the BIOS can be used to detect the PCI devices and
+	  determine their configuration. However, some old PCI motherboards
+	  have BIOS bugs and may crash if this is done. Also, some embedded
+	  PCI-based systems don't have any BIOS at all. Linux can also try to
+	  detect the PCI hardware directly without using the BIOS.
+
+	  With this option, you can specify how Linux should detect the PCI
+	  devices. If you choose "BIOS", the BIOS will be used, if you choose
+	  "Direct", the BIOS won't be used, and if you choose "Any", the
+	  kernel will try the direct access method and falls back to the BIOS
+	  if that doesn't work. If unsure, go with the default, which is
+	  "Any".
+
+config PCI_GODIRECT
+	bool "Direct"
+
+config PCI_GOANY
+	bool "Any"
+
+endchoice
+
+config PCI_BIOS
+	bool
+	depends on !VISWS && PCI && (PCI_GOBIOS || PCI_GOANY)
+	default y
+
+config PCI_DIRECT
+	bool
+	depends on !VISWS && PCI && (PCI_GODIRECT || PCI_GOANY)
+	default y
+
+config SCx200
+	tristate "NatSemi SCx200 support"
+	help
+	  This provides basic support for the National Semiconductor SCx200 
+	  processor.  Right now this is just a driver for the GPIO pins.
+
+	  If you don't know what to do here, say N.
+
+	  This support is also available as a module.  If compiled as a
+	  module, it will be called scx200.o.
+
+source "drivers/pci/Kconfig"
+
+config ISA
+	bool "ISA support"
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool "EISA support"
+	depends on ISA
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool "MCA support"
+	depends on !VISWS
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/hotplug/Kconfig"
+
+endmenu
+
+
+menu "Executable file formats"
+
+choice
+	prompt "Kernel core (/proc/kcore) format"
+	depends on PROC_FS
+	default KCORE_ELF
+
+config KCORE_ELF
+	bool "ELF"
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config KCORE_AOUT
+	bool "A.OUT"
+	help
+	  Not necessary unless you're using a very out-of-date binutils
+	  version.  You probably want KCORE_ELF.
+
+endchoice
+
+config BINFMT_AOUT
+	tristate "Kernel support for a.out binaries"
+	---help---
+	  A.out (Assembler.OUTput) is a set of formats for libraries and
+	  executables used in the earliest versions of UNIX. Linux used the
+	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
+	  ELF format.
+
+	  As more and more programs are converted to ELF, the use for a.out
+	  will gradually diminish. If you disable this option it will reduce
+	  your kernel by one page. This is not much and by itself does not
+	  warrant removing support. However its removal is a good idea if you
+	  wish to ensure that absolutely none of your programs will use this
+	  older executable format. If you don't know what to answer at this
+	  point then answer Y. If someone told you "You need a kernel with
+	  QMAGIC support" then you'll have to say Y here. You may answer M to
+	  compile a.out support as a module and later load the module when you
+	  want to use a program or library in a.out format. The module will be
+	  called binfmt_aout.o. Saying M or N here is dangerous though,
+	  because some crucial programs on your system might still be in A.OUT
+	  format.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL device support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL device support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI device support"
+
+config SCSI
+	tristate "SCSI device support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+	depends on ISA
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+source "drivers/md/Kconfig"
+
+source "drivers/message/fusion/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+config VIDEO_SELECT
+	bool "Video mode selection support"
+	---help---
+	  This enables support for text mode selection on kernel startup. If
+	  you want to take advantage of some high-resolution text mode your
+	  card's BIOS offers, but the traditional Linux utilities like
+	  SVGATextMode don't, you can say Y here and set the mode using the
+	  "vga=" option from your boot loader (lilo or loadlin) or set
+	  "vga=ask" which brings up a video mode menu on kernel startup. (Try
+	  "man bootparam" or see the documentation of your boot loader about
+	  how to pass options to the kernel.)
+
+	  Read the file <file:Documentation/svga.txt> for more information
+	  about the Video mode selection support. If unsure, say N.
+
+if EXPERIMENTAL
+
+config MDA_CONSOLE
+	tristate "MDA text console (dual-headed) (EXPERIMENTAL)"
+	---help---
+	  Say Y here if you have an old MDA or monochrome Hercules graphics
+	  adapter in your system acting as a second head ( = video card). You
+	  will then be able to use two monitors with your Linux system. Do not
+	  say Y here if your MDA card is the primary card in your system; the
+	  normal VGA driver will handle it.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called mdacon.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+source "drivers/video/Kconfig"
+
+endif
+
+endmenu
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+source "arch/i386/oprofile/Kconfig"
+
+
+menu "Kernel hacking"
+
+config SOFTWARE_SUSPEND
+	bool "Software Suspend (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && PM
+	---help---
+	  Enable the possibilty of suspendig machine. It doesn't need APM.
+	  You may suspend your machine by 'swsusp' or 'shutdown -z <time>' 
+	  (patch for sysvinit needed). 
+
+	  It creates an image which is saved in your active swaps. By the next
+	  booting the, pass 'resume=/path/to/your/swap/file' and kernel will 
+	  detect the saved image, restore the memory from
+	  it and then it continues to run as before you've suspended.
+	  If you don't want the previous state to continue use the 'noresume'
+	  kernel option. However note that your partitions will be fsck'd and
+	  you must re-mkswap your swap partitions/files.
+
+	  Right now you may boot without resuming and then later resume but
+	  in meantime you cannot use those swap partitions/files which were
+	  involved in suspending. Also in this case there is a risk that buffers
+	  on disk won't match with saved ones.
+
+	  SMP is supported ``as-is''. There's a code for it but doesn't work.
+	  There have been problems reported relating SCSI.
+
+	  This option is about getting stable. However there is still some
+	  absence of features.
+
+	  For more information take a look at Documentation/swsusp.txt.
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config DEBUG_STACKOVERFLOW
+	bool "Check for stack overflows"
+	depends on DEBUG_KERNEL
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	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
+	  memory.
+
+config DEBUG_IOVIRT
+	bool "Memory mapped I/O debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to get warned whenever an attempt is made to do I/O on
+	  obviously invalid addresses such as those generated when ioremap()
+	  calls are forgotten.  Memory mapped I/O will go through an extra
+	  check to catch access to unmapped ISA addresses, an access method
+	  that can still be used by old drivers that are being ported from
+	  2.0/2.2.
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and build SMP to catch missing spinlock initialization
+	  and certain other kinds of spinlock errors commonly made.  This is
+	  best used in conjunction with the NMI watchdog so that spinlock
+	  deadlocks are also debuggable.
+
+config DEBUG_HIGHMEM
+	bool "Highmem debugging"
+	depends on DEBUG_KERNEL && HIGHMEM
+	help
+	  This options enables addition error checking for high memory systems.
+	  Disable for production systems.
+
+config KALLSYMS
+	bool "Load all symbols for debugging/kksymoops"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to let the kernel print out symbolic crash information and
+	  symbolic stack backtraces. This increases the size of the kernel
+	  somewhat, as all symbols have to be loaded into the kernel image.
+
+config X86_EXTRA_IRQS
+	bool
+	depends on X86_LOCAL_APIC
+	default y
+
+config X86_FIND_SMP_CONFIG
+	bool
+	depends on X86_LOCAL_APIC
+	default y
+
+config X86_MPPARSE
+	bool
+	depends on X86_LOCAL_APIC
+	default y
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
+config X86_SMP
+	bool
+	depends on SMP
+	default y
+
+config X86_HT
+	bool
+	depends on SMP
+	default y
+
+config X86_BIOS_REBOOT
+	bool
+	default y
+
diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile
--- a/arch/i386/Makefile	Wed Oct 30 16:44:27 2002
+++ b/arch/i386/Makefile	Wed Oct 30 16:44:27 2002
@@ -22,24 +22,26 @@
 
 CFLAGS += -pipe
 
+check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
+
 # prevent gcc from keeping the stack 16 byte aligned
-CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi)
+CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
 
 cflags-$(CONFIG_M386)		+= -march=i386
 cflags-$(CONFIG_M486)		+= -march=i486
 cflags-$(CONFIG_M586)		+= -march=i586
 cflags-$(CONFIG_M586TSC)	+= -march=i586
-cflags-$(CONFIG_M586MMX)	+= -march=i586
+cflags-$(CONFIG_M586MMX)	+= $(call check_gcc,-march=pentium-mmx,-march=i586)
 cflags-$(CONFIG_M686)		+= -march=i686
-cflags-$(CONFIG_MPENTIUMIII)	+= -march=i686
-cflags-$(CONFIG_MPENTIUM4)	+= -march=i686
-cflags-$(CONFIG_MK6)		+= $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6"; else echo "-march=i586"; fi)
-cflags-$(CONFIG_MK7)		+= $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi) 
+cflags-$(CONFIG_MPENTIUMIII)	+= $(call check_gcc,-march=pentium3,-march=i686)
+cflags-$(CONFIG_MPENTIUM4)	+= $(call check_gcc,-march=pentium4,-march=i686)
+cflags-$(CONFIG_MK6)		+= $(call check_gcc,-march=k6,-march=i586)
+cflags-$(CONFIG_MK7)		+= $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
 cflags-$(CONFIG_MCRUSOE)	+= -march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0
-cflags-$(CONFIG_MWINCHIPC6)	+= -march=i586
-cflags-$(CONFIG_MWINCHIP2)	+= -march=i586
+cflags-$(CONFIG_MWINCHIPC6)	+= $(call check_gcc,-march=winchip-c6,-march=i586)
+cflags-$(CONFIG_MWINCHIP2)	+= $(call check_gcc,-march=winchip2,-march=i586)
 cflags-$(CONFIG_MWINCHIP3D)	+= -march=i586
-cflags-$(CONFIG_MCYRIXIII)	+= -march=i586
+cflags-$(CONFIG_MCYRIXIII)	+= $(call check_gcc,-march=c3,-march=i586)
 
 CFLAGS += $(cflags-y)
 
@@ -88,6 +90,6 @@
 	+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) install)
 
 archclean:
-	$(MAKE) -rR -f scripts/Makefile.clean obj=arch/i386/boot
+	@$(MAKE) -f scripts/Makefile.clean obj=arch/i386/boot
 
 archmrproper:
diff -Nru a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
--- a/arch/i386/boot/Makefile	Wed Oct 30 16:44:27 2002
+++ b/arch/i386/boot/Makefile	Wed Oct 30 16:44:27 2002
@@ -46,7 +46,7 @@
 $(obj)/bzImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
 $(obj)/bzImage: BUILDFLAGS   := -b
 
-quiet_cmd_image = BUILD   $(echo_target)
+quiet_cmd_image = BUILD   $@
 cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
 	    $(obj)/vmlinux.bin $(ROOT_DEV) > $@
 
diff -Nru a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
--- a/arch/i386/boot/setup.S	Wed Oct 30 16:44:19 2002
+++ b/arch/i386/boot/setup.S	Wed Oct 30 16:44:19 2002
@@ -46,8 +46,9 @@
  * by Robert Schwebel, December 2001 <robert@schwebel.de>
  *    
  * BIOS Enhanced Disk Drive support
- * by Matt Domsch <Matt_Domsch@dell.com> September 2002 
- *
+ * by Matt Domsch <Matt_Domsch@dell.com> October 2002
+ * conformant to T13 Committee www.t13.org
+ *   projects 1572D, 1484D, 1386D, 1226DT
  */
 
 #include <linux/config.h>
@@ -549,6 +550,27 @@
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 # Do the BIOS Enhanced Disk Drive calls
+# This consists of two calls:
+#    int 13h ah=41h "Check Extensions Present"
+#    int 13h ah=48h "Get Device Parameters"
+#
+# A buffer of size EDDMAXNR*(EDDEXTSIZE+EDDPARMSIZE) is reserved for our use
+# in the empty_zero_page at EDDBUF.  The first four bytes of which are
+# used to store the device number, interface support map and version
+# results from fn41.  The following 74 bytes are used to store
+# the results from fn48.  Starting from device 80h, fn41, then fn48
+# are called and their results stored in EDDBUF+n*(EDDEXTSIZE+EDDPARMIZE).
+# Then the pointer is incremented to store the data for the next call.
+# This repeats until either a device doesn't exist, or until EDDMAXNR
+# devices have been stored.
+# The one tricky part is that ds:si always points four bytes into
+# the structure, and the fn41 results are stored at offsets
+# from there.  This removes the need to increment the pointer for
+# every store, and leaves it ready for the fn48 call.
+# A second one-byte buffer, EDDNR, in the empty_zero_page stores
+# the number of BIOS devices which exist, up to EDDMAXNR.
+# In setup.c, copy_edd() stores both empty_zero_page buffers away
+# for later use, as they would get overwritten otherwise. 
 # This code is sensitive to the size of the structs in edd.h
 edd_start:  
 						# %ds points to the bootsector
@@ -559,12 +581,12 @@
     	movb	$0x80, %dl			# BIOS device 0x80
 
 edd_check_ext:
-	movb	$0x41, %ah			# Function 41
-	movw	$0x55aa, %bx			# magic
+	movb	$CHECKEXTENSIONSPRESENT, %ah    # Function 41
+	movw	$EDDMAGIC1, %bx			# magic
 	int	$0x13				# make the call
 	jc	edd_done			# no more BIOS devices
 
-    	cmpw	$0xAA55, %bx			# is magic right?
+    	cmpw	$EDDMAGIC2, %bx			# is magic right?
 	jne	edd_next			# nope, next...
 
     	movb	%dl, %ds:-4(%si)		# store device number
@@ -574,7 +596,7 @@
         
 edd_get_device_params:  
 	movw	$EDDPARMSIZE, %ds:(%si)		# put size
-    	movb	$0x48, %ah			# Function 48
+    	movb	$GETDEVICEPARAMETERS, %ah	# Function 48
 	int	$0x13				# make the call
 						# Don't check for fail return
 						# it doesn't matter.
diff -Nru a/arch/i386/config.in b/arch/i386/config.in
--- a/arch/i386/config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,487 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-mainmenu_name "Linux Kernel Configuration"
-
-define_bool CONFIG_X86 y
-define_bool CONFIG_SBUS n
-
-define_bool CONFIG_UID16 y
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Processor type and features'
-choice 'Processor family' \
-	"386					CONFIG_M386 \
-	 486					CONFIG_M486 \
-	 586/K5/5x86/6x86/6x86MX		CONFIG_M586 \
-	 Pentium-Classic			CONFIG_M586TSC \
-	 Pentium-MMX				CONFIG_M586MMX \
-	 Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
-	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
-	 Pentium-4				CONFIG_MPENTIUM4 \
-	 K6/K6-II/K6-III			CONFIG_MK6 \
-	 Athlon/Duron/K7			CONFIG_MK7 \
-	 Elan					CONFIG_MELAN \
-	 Crusoe					CONFIG_MCRUSOE \
-	 Winchip-C6				CONFIG_MWINCHIPC6 \
-	 Winchip-2				CONFIG_MWINCHIP2 \
-	 Winchip-2A/Winchip-3			CONFIG_MWINCHIP3D \
-	 CyrixIII/VIA-C3			CONFIG_MCYRIXIII" Pentium-Pro
-#
-# Define implied options from the CPU selection here
-#
-
-if [ "$CONFIG_M386" = "y" ]; then
-   define_bool CONFIG_X86_CMPXCHG n
-   define_bool CONFIG_X86_XADD n
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 4
-   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-   define_bool CONFIG_X86_PPRO_FENCE y
-   define_bool CONFIG_X86_F00F_BUG y
-else
-   define_bool CONFIG_X86_WP_WORKS_OK y
-   define_bool CONFIG_X86_INVLPG y
-   define_bool CONFIG_X86_CMPXCHG y
-   define_bool CONFIG_X86_XADD y
-   define_bool CONFIG_X86_BSWAP y
-   define_bool CONFIG_X86_POPAD_OK y
-   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-fi
-if [ "$CONFIG_M486" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 4
-   define_bool CONFIG_X86_USE_STRING_486 y
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_PPRO_FENCE y
-   define_bool CONFIG_X86_F00F_BUG y
-fi
-if [ "$CONFIG_M586" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_USE_STRING_486 y
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_PPRO_FENCE y
-   define_bool CONFIG_X86_F00F_BUG y
-fi
-if [ "$CONFIG_M586TSC" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_USE_STRING_486 y
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_PPRO_FENCE y
-   define_bool CONFIG_X86_F00F_BUG y
-fi
-if [ "$CONFIG_M586MMX" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_USE_STRING_486 y
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_GOOD_APIC y
-   define_bool CONFIG_X86_PPRO_FENCE y
-   define_bool CONFIG_X86_F00F_BUG y
-fi
-if [ "$CONFIG_M686" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_GOOD_APIC y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-   define_bool CONFIG_X86_PPRO_FENCE y
-fi
-if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_GOOD_APIC y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-fi
-if [ "$CONFIG_MPENTIUM4" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_GOOD_APIC y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-fi
-if [ "$CONFIG_MK6" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-fi
-if [ "$CONFIG_MK7" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_GOOD_APIC y
-   define_bool CONFIG_X86_USE_3DNOW y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-fi
-if [ "$CONFIG_MELAN" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 4
-   define_bool CONFIG_X86_USE_STRING_486 y
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-fi
-if [ "$CONFIG_MCYRIXIII" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_USE_3DNOW y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-fi
-if [ "$CONFIG_MCRUSOE" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_TSC y
-fi
-if [ "$CONFIG_MWINCHIPC6" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-   define_bool CONFIG_X86_OOSTORE y
-fi
-if [ "$CONFIG_MWINCHIP2" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-   define_bool CONFIG_X86_OOSTORE y
-fi
-if [ "$CONFIG_MWINCHIP3D" = "y" ]; then
-   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-   define_bool CONFIG_X86_ALIGNMENT_16 y
-   define_bool CONFIG_X86_TSC y
-   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-   define_bool CONFIG_X86_OOSTORE y
-fi
-
-bool 'Huge TLB Page Support' CONFIG_HUGETLB_PAGE
-
-bool 'Symmetric multi-processing support' CONFIG_SMP
-bool 'Preemptible Kernel' CONFIG_PREEMPT
-if [ "$CONFIG_SMP" != "y" ]; then
-   bool 'Local APIC support on uniprocessors' CONFIG_X86_UP_APIC
-   dep_bool 'IO-APIC support on uniprocessors' CONFIG_X86_UP_IOAPIC $CONFIG_X86_UP_APIC
-   if [ "$CONFIG_X86_UP_APIC" = "y" ]; then
-      define_bool CONFIG_X86_LOCAL_APIC y
-   fi
-   if [ "$CONFIG_X86_UP_IOAPIC" = "y" ]; then
-      define_bool CONFIG_X86_IO_APIC y
-   fi
-else
-  int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-  bool 'Multi-node NUMA system support' CONFIG_X86_NUMA
-  if [ "$CONFIG_X86_NUMA" = "y" ]; then
-     #Platform Choices
-     bool 'Multiquad (IBM/Sequent) NUMAQ support' CONFIG_X86_NUMAQ
-     bool 'IBM x440 (Summit/EXA) support' CONFIG_X86_SUMMIT
-     if [ "$CONFIG_X86_NUMAQ" = "y" -o "$CONFIG_X86_SUMMIT" = "y" ]; then
-        define_bool CONFIG_CLUSTERED_APIC y
-     fi
-     # Common NUMA Features
-     if [ "$CONFIG_X86_NUMAQ" = "y" ]; then
-        bool 'Numa Memory Allocation Support' CONFIG_NUMA
-        if [ "$CONFIG_NUMA" = "y" ]; then
-           define_bool CONFIG_DISCONTIGMEM y
-           define_bool CONFIG_HAVE_ARCH_BOOTMEM_NODE y
-        fi
-     fi
-  fi
-fi
-
-bool 'Machine Check Exception' CONFIG_X86_MCE
-dep_bool 'Check for non-fatal errors on Athlon/Duron' CONFIG_X86_MCE_NONFATAL $CONFIG_X86_MCE
-dep_bool 'check for P4 thermal throttling interrupt.' CONFIG_X86_MCE_P4THERMAL $CONFIG_X86_MCE $CONFIG_X86_UP_APIC
-
-bool 'CPU Frequency scaling' CONFIG_CPU_FREQ
-if [ "$CONFIG_CPU_FREQ" = "y" ]; then
-   bool ' /proc/sys/cpu/ interface (2.4.)' CONFIG_CPU_FREQ_24_API
-   if [ "$CONFIG_CPU_FREQ_24_API" = "n" ]; then
-       define_bool CONFIG_CPU_FREQ_26_API y
-   fi
-   tristate ' AMD Mobile K6-2/K6-3 PowerNow!' CONFIG_X86_POWERNOW_K6
-   if [ "$CONFIG_MELAN" = "y" ]; then
-       tristate ' AMD Elan' CONFIG_ELAN_CPUFREQ
-   fi
-   tristate ' VIA Cyrix III Longhaul' CONFIG_X86_LONGHAUL
-   tristate ' Intel Speedstep' CONFIG_X86_SPEEDSTEP
-   tristate ' Intel Pentium 4 clock modulation' CONFIG_X86_P4_CLOCKMOD
-   if [ "$CONFIG_CPU_FREQ_24_API" = "n" ]; then
-       tristate ' Transmeta LongRun' CONFIG_X86_LONGRUN
-   fi
-fi
-
-tristate 'Toshiba Laptop support' CONFIG_TOSHIBA
-tristate 'Dell laptop support' CONFIG_I8K
-
-tristate '/dev/cpu/microcode - Intel IA32 CPU microcode support' CONFIG_MICROCODE
-tristate '/dev/cpu/*/msr - Model-specific register support' CONFIG_X86_MSR
-tristate '/dev/cpu/*/cpuid - CPU information support' CONFIG_X86_CPUID
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
-fi
-
-choice 'High Memory Support' \
-	"off           CONFIG_NOHIGHMEM \
-	 4GB           CONFIG_HIGHMEM4G \
-	 64GB          CONFIG_HIGHMEM64G" off
-
-if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
-   define_bool CONFIG_HIGHMEM y
-fi
-
-if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
-   define_bool CONFIG_HIGHMEM y
-   define_bool CONFIG_X86_PAE y
-fi
-
-if [ "$CONFIG_HIGHMEM4G" = "y" -o "$CONFIG_HIGHMEM64G" = "y" ]; then
-   bool 'Allocate 3rd-level pagetables from highmem' CONFIG_HIGHPTE
-fi
-
-bool 'Math emulation' CONFIG_MATH_EMULATION
-bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR
-
-if [ "$CONFIG_SMP" = "y" -o "$CONFIG_PREEMPT" = "y" ]; then
-   if [ "$CONFIG_X86_CMPXCHG" = "y" ]; then
-      define_bool CONFIG_HAVE_DEC_LOCK y
-   fi
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'Power management options (ACPI, APM)'
-
-source drivers/acpi/Config.in
-bool 'Power Management support' CONFIG_PM
-
-dep_tristate '  Advanced Power Management BIOS support' CONFIG_APM $CONFIG_PM
-if [ "$CONFIG_APM" != "n" ]; then
-   bool '    Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
-   bool '    Enable PM at boot time' CONFIG_APM_DO_ENABLE
-   bool '    Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE
-   bool '    Enable console blanking using APM' CONFIG_APM_DISPLAY_BLANK
-   bool '    RTC stores time in GMT' CONFIG_APM_RTC_IS_GMT
-   bool '    Allow interrupts during APM BIOS calls' CONFIG_APM_ALLOW_INTS
-   bool '    Use real mode APM BIOS call to power off' CONFIG_APM_REAL_MODE_POWER_OFF
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'Bus options (PCI, PCMCIA, EISA, MCA, ISA)'
-
-# Visual Workstation support is utterly broken.
-# If you want to see it working mail an VW540 to hch@infradead.org 8)
-#bool 'SGI Visual Workstation support' CONFIG_VISWS
-if [ "$CONFIG_VISWS" = "y" ]; then
-   define_bool CONFIG_X86_VISWS_APIC y
-   define_bool CONFIG_X86_LOCAL_APIC y
-   define_bool CONFIG_PCI y
-else
-   if [ "$CONFIG_SMP" = "y" ]; then
-      define_bool CONFIG_X86_IO_APIC y
-      define_bool CONFIG_X86_LOCAL_APIC y
-   fi
-   bool 'PCI support' CONFIG_PCI
-   if [ "$CONFIG_PCI" = "y" ]; then
-      choice '  PCI access mode' \
-	"BIOS		CONFIG_PCI_GOBIOS	\
-	 Direct		CONFIG_PCI_GODIRECT	\
-	 Any		CONFIG_PCI_GOANY"	Any
-      if [ "$CONFIG_PCI_GOBIOS" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
-         define_bool CONFIG_PCI_BIOS y
-      fi
-      if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
-         define_bool CONFIG_PCI_DIRECT y
-      fi
-   fi
-fi
-
-tristate 'NatSemi SCx200 support' CONFIG_SCx200
-
-source drivers/pci/Config.in
-
-bool 'ISA support' CONFIG_ISA
-dep_bool 'EISA support' CONFIG_EISA $CONFIG_ISA
-
-if [ "$CONFIG_VISWS" != "y" ]; then
-   bool 'MCA support' CONFIG_MCA
-else
-   define_bool CONFIG_MCA n
-fi
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-   source drivers/pcmcia/Config.in
-   source drivers/hotplug/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-   define_bool CONFIG_HOTPLUG_PCI n
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'Executable file formats'
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   choice 'Kernel core (/proc/kcore) format' \
-	"ELF		CONFIG_KCORE_ELF	\
-	 A.OUT		CONFIG_KCORE_AOUT" ELF
-fi
-tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-endmenu
-
-source drivers/mtd/Config.in
-
-source drivers/parport/Config.in
-
-source drivers/pnp/Config.in
-
-source drivers/block/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL device support'
-
-tristate 'ATA/ATAPI/MFM/RLL device support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-   source drivers/ide/Config.in
-else
-   define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI device support'
-
-tristate 'SCSI device support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_ISA" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-
-   bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-   if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-      source drivers/cdrom/Config.in
-   fi
-   endmenu
-fi
-
-source drivers/md/Config.in
-
-source drivers/message/fusion/Config.in
-
-source drivers/ieee1394/Config.in
-
-source drivers/message/i2o/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-         source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-source drivers/telephony/Config.in
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-source drivers/char/Config.in
-
-#source drivers/misc/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   bool 'VGA text console' CONFIG_VGA_CONSOLE
-   bool 'Video mode selection support' CONFIG_VIDEO_SELECT
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
-      source drivers/video/Config.in
-   fi
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-source arch/i386/oprofile/Config.in
- 
-mainmenu_option next_comment
-comment 'Kernel hacking'
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   dep_bool 'Software Suspend (EXPERIMENTAL)' CONFIG_SOFTWARE_SUSPEND $CONFIG_PM
-fi
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   bool '  Check for stack overflows' CONFIG_DEBUG_STACKOVERFLOW
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   if [ "$CONFIG_HIGHMEM" = "y" ]; then
-      bool '  Highmem debugging' CONFIG_DEBUG_HIGHMEM
-   fi
-   bool '  Load all symbols for debugging/kksymoops' CONFIG_KALLSYMS
-fi
-
-if [ "$CONFIG_X86_LOCAL_APIC" = "y" ]; then
-   define_bool CONFIG_X86_EXTRA_IRQS y
-   define_bool CONFIG_X86_FIND_SMP_CONFIG y
-   define_bool CONFIG_X86_MPPARSE y
-fi
-
-endmenu
-
-source security/Config.in
-source lib/Config.in
-
-if [ "$CONFIG_SMP" = "y" ]; then
-   define_bool CONFIG_X86_SMP y
-   define_bool CONFIG_X86_HT y
-fi
-
-define_bool CONFIG_X86_BIOS_REBOOT y
diff -Nru a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
--- a/arch/i386/kernel/apm.c	Wed Oct 30 16:44:20 2002
+++ b/arch/i386/kernel/apm.c	Wed Oct 30 16:44:20 2002
@@ -40,6 +40,7 @@
  * Nov 2000, Version 1.14
  * Oct 2001, Version 1.15
  * Jan 2002, Version 1.16
+ * Oct 2002, Version 1.16ac
  *
  * History:
  *    0.6b: first version in official kernel, Linux 1.3.46
@@ -177,6 +178,9 @@
  *         CONFIG_APM_CPU_IDLE now just affects the default value of
  *         idle_threshold (sfr).
  *         Change name of kernel apm daemon (as it no longer idles) (sfr).
+ *   1.16ac: Fix up SMP support somewhat. You can now force SMP on and we
+ *	   make _all_ APM calls on the CPU#0. Fix unsafe sign bug.
+ *	   TODO: determine if its "boot CPU" or "CPU0" we want to lock to.
  *
  * APM 1.1 Reference:
  *
@@ -250,6 +254,7 @@
  *	    					powering off
  *	    [no-]debug			log some debugging messages
  *	    [no-]power[-_]off		power off on shutdown
+ *	    [no-]smp			Use apm even on an SMP box
  *	    bounce[-_]interval=<n>	number of ticks to ignore suspend
  *	    				bounces
  *          idle[-_]threshold=<n>       System idle percentage above which to
@@ -396,6 +401,7 @@
 static int			got_clock_diff;
 #endif
 static int			debug;
+static int			smp;
 static int			apm_disabled = -1;
 #ifdef CONFIG_SMP
 static int			power_off;
@@ -422,7 +428,7 @@
 static spinlock_t		user_list_lock = SPIN_LOCK_UNLOCKED;
 static struct desc_struct	bad_bios_desc = { 0, 0x00409200 };
 
-static char			driver_version[] = "1.16";	/* no spaces */
+static char			driver_version[] = "1.16ac";	/* no spaces */
 
 /*
  *	APM event names taken from the APM 1.2 specification. These are
@@ -499,6 +505,38 @@
 }
 
 /*
+ * Lock APM functionality to physical CPU 0
+ */
+ 
+#ifdef CONFIG_SMP
+
+static unsigned long apm_save_cpus(void)
+{
+	unsigned long x = current->cpus_allowed;
+	/* Some bioses don't like being called from CPU != 0 */
+	set_cpus_allowed(current, 1 << 0);
+	if (unlikely(smp_processor_id() != 0))
+		BUG();
+	return x;
+}
+
+static inline void apm_restore_cpus(unsigned long mask)
+{
+	set_cpus_allowed(current, mask);
+}
+
+#else
+
+/*
+ *	No CPU lockdown needed on a uniprocessor
+ */
+ 
+#define apm_save_cpus()	0
+#define apm_restore_cpus(x)	(void)(x)
+
+#endif
+
+/*
  * These are the actual BIOS calls.  Depending on APM_ZERO_SEGS and
  * apm_info.allow_ints, we are being really paranoid here!  Not only
  * are interrupts disabled, but all the segment registers (except SS)
@@ -571,9 +609,12 @@
 {
 	APM_DECL_SEGS
 	unsigned long		flags;
+	unsigned long		cpus;
 	int			cpu;
 	struct desc_struct	save_desc_40;
 
+	cpus = apm_save_cpus();
+	
 	cpu = get_cpu();
 	save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
 	cpu_gdt_table[cpu][0x40 / 8] = bad_bios_desc;
@@ -601,6 +642,8 @@
 	local_irq_restore(flags);
 	cpu_gdt_table[cpu][0x40 / 8] = save_desc_40;
 	put_cpu();
+	apm_restore_cpus(cpus);
+	
 	return *eax & 0xff;
 }
 
@@ -623,9 +666,13 @@
 	u8			error;
 	APM_DECL_SEGS
 	unsigned long		flags;
+	unsigned long		cpus;
 	int			cpu;
 	struct desc_struct	save_desc_40;
 
+
+	cpus = apm_save_cpus();
+	
 	cpu = get_cpu();
 	save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
 	cpu_gdt_table[cpu][0x40 / 8] = bad_bios_desc;
@@ -657,6 +704,7 @@
 	local_irq_restore(flags);
 	cpu_gdt_table[smp_processor_id()][0x40 / 8] = save_desc_40;
 	put_cpu();
+	apm_restore_cpus(cpus);
 	return error;
 }
 
@@ -772,7 +820,11 @@
 	if (apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax)) {
 		static unsigned long t;
 
-		if (time_after(jiffies, t + 10 * HZ)) {
+		/* This always fails on some SMP boards running UP kernels.
+		 * Only report the failure the first 5 times.
+		 */
+		if (++t < 5)
+		{
 			printk(KERN_DEBUG "apm_do_idle failed (%d)\n",
 					(eax >> 8) & 0xff);
 			t = jiffies;
@@ -912,14 +964,16 @@
 #ifdef CONFIG_SMP
 	/* Some bioses don't like being called from CPU != 0 */
 	if (smp_processor_id() != 0) {
-		current->cpus_allowed = 1;
-		schedule();
+		set_cpus_allowed(current, 1 << 0);
 		if (unlikely(smp_processor_id() != 0))
 			BUG();
 	}
 #endif
 	if (apm_info.realmode_power_off)
+	{
+		(void)apm_save_cpus();
 		machine_real_restart(po_bios_call, sizeof(po_bios_call));
+	}
 	else
 		(void) set_system_power_state(APM_STATE_OFF);
 }
@@ -1096,6 +1150,19 @@
 	}
 	if ((error == APM_SUCCESS) || (error == APM_NO_ERROR))
 		return 1;
+	if (error == APM_NOT_ENGAGED) {
+		static int tried;
+		int eng_error;
+		if (tried++ == 0) {
+			eng_error = apm_engage_power_management(APM_DEVICE_ALL, 1);
+			if (eng_error) {
+				apm_error("set display", error);
+				apm_error("engage interface", eng_error);
+				return 0;
+			} else
+				return apm_console_blank(blank);
+		}
+	}
 	apm_error("set display", error);
 	return 0;
 }
@@ -1424,7 +1491,7 @@
 	as = fp->private_data;
 	if (check_apm_user(as, "read"))
 		return -EIO;
-	if (count < sizeof(apm_event_t))
+	if ((int)count < sizeof(apm_event_t))
 		return -EINVAL;
 	if ((queue_empty(as)) && (fp->f_flags & O_NONBLOCK))
 		return -EAGAIN;
@@ -1693,8 +1760,7 @@
 	 * Method suggested by Ingo Molnar.
 	 */
 	if (smp_processor_id() != 0) {
-		current->cpus_allowed = 1;
-		schedule();
+		set_cpus_allowed(current, 1 << 0);
 		if (unlikely(smp_processor_id() != 0))
 			BUG();
 	}
@@ -1746,7 +1812,7 @@
 		}
 	}
 
-	if (debug) {
+	if (debug && (num_online_cpus() == 1 || smp )) {
 		error = apm_get_power_status(&bx, &cx, &dx);
 		if (error)
 			printk(KERN_INFO "apm: power status not available\n");
@@ -1790,7 +1856,7 @@
 		pm_power_off = apm_power_off;
 	register_sysrq_key('o', &sysrq_poweroff_op);
 
-	if (num_online_cpus() == 1) {
+	if (num_online_cpus() == 1 || smp) {
 #if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT)
 		console_blank_hook = apm_console_blank;
 #endif
@@ -1832,6 +1898,11 @@
 		if ((strncmp(str, "power-off", 9) == 0) ||
 		    (strncmp(str, "power_off", 9) == 0))
 			power_off = !invert;
+		if (strncmp(str, "smp", 3) == 0)
+		{
+			smp = !invert;
+			idle_threshold = 100;
+		}
 		if ((strncmp(str, "allow-ints", 10) == 0) ||
 		    (strncmp(str, "allow_ints", 10) == 0))
  			apm_info.allow_ints = !invert;
@@ -1934,7 +2005,7 @@
 		printk(KERN_NOTICE "apm: disabled on user request.\n");
 		return -ENODEV;
 	}
-	if ((num_online_cpus() > 1) && !power_off) {
+	if ((num_online_cpus() > 1) && !power_off && !smp) {
 		printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n");
 		return -ENODEV;
 	}
@@ -1980,6 +2051,14 @@
 				(apm_info.bios.cseg_16_len - 1) & 0xffff);
 			_set_limit((char *)&cpu_gdt_table[i][APM_DS >> 3],
 				(apm_info.bios.dseg_len - 1) & 0xffff);
+		      /* workaround for broken BIOSes */
+	                if (apm_info.bios.cseg_len <= apm_info.bios.offset)
+        	                _set_limit((char *)&cpu_gdt_table[i][APM_CS >> 3], 64 * 1024 -1);
+                       if (apm_info.bios.dseg_len <= 0x40) { /* 0x40 * 4kB == 64kB */
+                        	/* for the BIOS that assumes granularity = 1 */
+                        	cpu_gdt_table[i][APM_DS >> 3].b |= 0x800000;
+                        	printk(KERN_NOTICE "apm: we set the granularity of dseg.\n");
+        	        }
 		}
 #endif
 	}
@@ -1990,7 +2069,7 @@
 
 	kernel_thread(apm, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD);
 
-	if (num_online_cpus() > 1) {
+	if (num_online_cpus() > 1 && !smp ) {
 		printk(KERN_NOTICE
 		   "apm: disabled - APM is not SMP safe (power off active).\n");
 		return 0;
@@ -2058,3 +2137,7 @@
 MODULE_PARM(idle_period, "i");
 MODULE_PARM_DESC(idle_period,
 	"Period (in sec/100) over which to caculate the idle percentage");
+MODULE_PARM(smp, "i");
+MODULE_PARM_DESC(smp,
+	"Set this to enable APM use on an SMP platform. Use with caution on older systems");
+
diff -Nru a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c
--- a/arch/i386/kernel/cpu/intel.c	Wed Oct 30 16:44:26 2002
+++ b/arch/i386/kernel/cpu/intel.c	Wed Oct 30 16:44:26 2002
@@ -6,6 +6,7 @@
 #include <asm/processor.h>
 #include <asm/thread_info.h>
 #include <asm/msr.h>
+#include <asm/uaccess.h>
 
 #include "cpu.h"
 
@@ -13,6 +14,13 @@
 static int disable_P4_HT __initdata = 0;
 extern int trap_init_f00f_bug(void);
 
+#ifdef CONFIG_X86_INTEL_USERCOPY
+/*
+ * Alignment at which movsl is preferred for bulk memory copies.
+ */
+struct movsl_mask movsl_mask;
+#endif
+
 /*
  *	Early probe support logic for ppro memory erratum #50
  *
@@ -348,6 +356,24 @@
 
 	/* Work around errata */
 	Intel_errata_workarounds(c);
+
+#ifdef CONFIG_X86_INTEL_USERCOPY
+	/*
+	 * Set up the preferred alignment for movsl bulk memory moves
+	 */
+	switch (c->x86) {
+	case 4:		/* 486: untested */
+		break;
+	case 5:		/* Old Pentia: untested */
+		break;
+	case 6:		/* PII/PIII only like movsl with 8-byte alignment */
+		movsl_mask.mask = 7;
+		break;
+	case 15:	/* P4 is OK down to 8-byte alignment */
+		movsl_mask.mask = 7;
+		break;
+	}
+#endif
 }
 
 
diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
--- a/arch/i386/kernel/dmi_scan.c	Wed Oct 30 16:44:27 2002
+++ b/arch/i386/kernel/dmi_scan.c	Wed Oct 30 16:44:27 2002
@@ -21,8 +21,13 @@
 	u16	handle;
 };
 
+#undef DMI_DEBUG
+
+#ifdef DMI_DEBUG
+#define dmi_printk(x) printk x
+#else
 #define dmi_printk(x)
-//#define dmi_printk(x) printk x
+#endif
 
 static char * __init dmi_string(struct dmi_header *dm, u8 s)
 {
@@ -832,7 +837,9 @@
 
 static void __init dmi_decode(struct dmi_header *dm)
 {
+#ifdef DMI_DEBUG
 	u8 *data = (u8 *)dm;
+#endif
 	
 	switch(dm->type)
 	{
diff -Nru a/arch/i386/kernel/edd.c b/arch/i386/kernel/edd.c
--- a/arch/i386/kernel/edd.c	Wed Oct 30 16:44:27 2002
+++ b/arch/i386/kernel/edd.c	Wed Oct 30 16:44:27 2002
@@ -26,14 +26,10 @@
 
 /*
  * Known issues:
- * - module unload leaves a directory around.  Seems related to
- *   creating symlinks in that directory.  Seen on kernel 2.5.41.
  * - refcounting of struct device objects could be improved.
  *
  * TODO:
  * - Add IDE and USB disk device support
- * - when driverfs model of discs and partitions changes,
- *   update symlink accordingly.
  * - Get symlink creator helper functions exported from
  *   drivers/base instead of duplicating them here.
  * - move edd.[ch] to better locations if/when one is decided
@@ -61,10 +57,12 @@
 MODULE_DESCRIPTION("driverfs interface to BIOS EDD information");
 MODULE_LICENSE("GPL");
 
-#define EDD_VERSION "0.06 2002-Oct-09"
+#define EDD_VERSION "0.07 2002-Oct-24"
 #define EDD_DEVICE_NAME_SIZE 16
 #define REPORT_URL "http://domsch.com/linux/edd30/results.html"
 
+#define left (count - (p - buf) - 1)
+
 /*
  * bios_dir may go away completely,
  * and it definitely won't be at the root
@@ -78,7 +76,6 @@
 struct edd_device {
 	char name[EDD_DEVICE_NAME_SIZE];
 	struct edd_info *info;
-	struct list_head node;
 	struct driver_dir_entry dir;
 };
 
@@ -86,6 +83,7 @@
 	struct attribute attr;
 	ssize_t(*show) (struct edd_device * edev, char *buf, size_t count,
 			loff_t off);
+	int (*test) (struct edd_device * edev);
 };
 
 /* forward declarations */
@@ -95,10 +93,11 @@
 
 static struct edd_device *edd_devices[EDDMAXNR];
 
-#define EDD_DEVICE_ATTR(_name,_mode,_show) \
+#define EDD_DEVICE_ATTR(_name,_mode,_show,_test) \
 struct edd_attribute edd_attr_##_name = { 	\
 	.attr = {.name = __stringify(_name), .mode = _mode },	\
 	.show	= _show,				\
+	.test	= _test,				\
 };
 
 static inline struct edd_info *
@@ -133,35 +132,36 @@
 };
 
 static int
-edd_dump_raw_data(char *b, void *data, int length)
+edd_dump_raw_data(char *b, int count, void *data, int length)
 {
 	char *orig_b = b;
-	char buffer1[80], buffer2[80], *b1, *b2, c;
+	char hexbuf[80], ascbuf[20], *h, *a, c;
 	unsigned char *p = data;
 	unsigned long column = 0;
-	int length_printed = 0;
+	int length_printed = 0, d;
 	const char maxcolumn = 16;
-	while (length_printed < length) {
-		b1 = buffer1;
-		b2 = buffer2;
+	while (length_printed < length && count > 0) {
+		h = hexbuf;
+		a = ascbuf;
 		for (column = 0;
 		     column < maxcolumn && length_printed < length; column++) {
-			b1 += sprintf(b1, "%02x ", (unsigned char) *p);
-			if (*p < 32 || *p > 126)
+			h += sprintf(h, "%02x ", (unsigned char) *p);
+			if (!isprint(*p))
 				c = '.';
 			else
 				c = *p;
-			b2 += sprintf(b2, "%c", c);
+			a += sprintf(a, "%c", c);
 			p++;
 			length_printed++;
 		}
 		/* pad out the line */
 		for (; column < maxcolumn; column++) {
-			b1 += sprintf(b1, "   ");
-			b2 += sprintf(b2, " ");
+			h += sprintf(h, "   ");
+			a += sprintf(a, " ");
 		}
-
-		b += sprintf(b, "%s\t%s\n", buffer1, buffer2);
+		d = snprintf(b, count, "%s\t%s\n", hexbuf, ascbuf);
+		b += d;
+		count -= d;
 	}
 	return (b - orig_b);
 }
@@ -179,19 +179,19 @@
 
 	for (i = 0; i < 4; i++) {
 		if (isprint(info->params.host_bus_type[i])) {
-			p += sprintf(p, "%c", info->params.host_bus_type[i]);
+			p += snprintf(p, left, "%c", info->params.host_bus_type[i]);
 		} else {
-			p += sprintf(p, " ");
+			p += snprintf(p, left, " ");
 		}
 	}
 
 	if (!strncmp(info->params.host_bus_type, "ISA", 3)) {
-		p += sprintf(p, "\tbase_address: %x\n",
+		p += snprintf(p, left, "\tbase_address: %x\n",
 			     info->params.interface_path.isa.base_address);
 	} else if (!strncmp(info->params.host_bus_type, "PCIX", 4) ||
 		   !strncmp(info->params.host_bus_type, "PCI", 3)) {
-		p += sprintf(p,
-			     "\t%02x:%02x.%01x  channel: %u\n",
+		p += snprintf(p, left,
+			     "\t%02x:%02x.%d  channel: %u\n",
 			     info->params.interface_path.pci.bus,
 			     info->params.interface_path.pci.slot,
 			     info->params.interface_path.pci.function,
@@ -199,12 +199,12 @@
 	} else if (!strncmp(info->params.host_bus_type, "IBND", 4) ||
 		   !strncmp(info->params.host_bus_type, "XPRS", 4) ||
 		   !strncmp(info->params.host_bus_type, "HTPT", 4)) {
-		p += sprintf(p,
+		p += snprintf(p, left,
 			     "\tTBD: %llx\n",
 			     info->params.interface_path.ibnd.reserved);
 
 	} else {
-		p += sprintf(p, "\tunknown: %llx\n",
+		p += snprintf(p, left, "\tunknown: %llx\n",
 			     info->params.interface_path.unknown.reserved);
 	}
 	return (p - buf);
@@ -223,43 +223,43 @@
 
 	for (i = 0; i < 8; i++) {
 		if (isprint(info->params.interface_type[i])) {
-			p += sprintf(p, "%c", info->params.interface_type[i]);
+			p += snprintf(p, left, "%c", info->params.interface_type[i]);
 		} else {
-			p += sprintf(p, " ");
+			p += snprintf(p, left, " ");
 		}
 	}
 	if (!strncmp(info->params.interface_type, "ATAPI", 5)) {
-		p += sprintf(p, "\tdevice: %u  lun: %u\n",
+		p += snprintf(p, left, "\tdevice: %u  lun: %u\n",
 			     info->params.device_path.atapi.device,
 			     info->params.device_path.atapi.lun);
 	} else if (!strncmp(info->params.interface_type, "ATA", 3)) {
-		p += sprintf(p, "\tdevice: %u\n",
+		p += snprintf(p, left, "\tdevice: %u\n",
 			     info->params.device_path.ata.device);
 	} else if (!strncmp(info->params.interface_type, "SCSI", 4)) {
-		p += sprintf(p, "\tid: %u  lun: %llu\n",
+		p += snprintf(p, left, "\tid: %u  lun: %llu\n",
 			     info->params.device_path.scsi.id,
 			     info->params.device_path.scsi.lun);
 	} else if (!strncmp(info->params.interface_type, "USB", 3)) {
-		p += sprintf(p, "\tserial_number: %llx\n",
+		p += snprintf(p, left, "\tserial_number: %llx\n",
 			     info->params.device_path.usb.serial_number);
 	} else if (!strncmp(info->params.interface_type, "1394", 4)) {
-		p += sprintf(p, "\teui: %llx\n",
+		p += snprintf(p, left, "\teui: %llx\n",
 			     info->params.device_path.i1394.eui);
 	} else if (!strncmp(info->params.interface_type, "FIBRE", 5)) {
-		p += sprintf(p, "\twwid: %llx lun: %llx\n",
+		p += snprintf(p, left, "\twwid: %llx lun: %llx\n",
 			     info->params.device_path.fibre.wwid,
 			     info->params.device_path.fibre.lun);
 	} else if (!strncmp(info->params.interface_type, "I2O", 3)) {
-		p += sprintf(p, "\tidentity_tag: %llx\n",
+		p += snprintf(p, left, "\tidentity_tag: %llx\n",
 			     info->params.device_path.i2o.identity_tag);
 	} else if (!strncmp(info->params.interface_type, "RAID", 4)) {
-		p += sprintf(p, "\tidentity_tag: %x\n",
+		p += snprintf(p, left, "\tidentity_tag: %x\n",
 			     info->params.device_path.raid.array_number);
 	} else if (!strncmp(info->params.interface_type, "SATA", 4)) {
-		p += sprintf(p, "\tdevice: %u\n",
+		p += snprintf(p, left, "\tdevice: %u\n",
 			     info->params.device_path.sata.device);
 	} else {
-		p += sprintf(p, "\tunknown: %llx %llx\n",
+		p += snprintf(p, left, "\tunknown: %llx %llx\n",
 			     info->params.device_path.unknown.reserved1,
 			     info->params.device_path.unknown.reserved2);
 	}
@@ -289,15 +289,15 @@
 	if (!(info->params.key == 0xBEDD || info->params.key == 0xDDBE))
 		len = info->params.length;
 
-	p += sprintf(p, "int13 fn48 returned data:\n\n");
-	p += edd_dump_raw_data(p, ((char *) edd) + 4, len);
+	p += snprintf(p, left, "int13 fn48 returned data:\n\n");
+	p += edd_dump_raw_data(p, left, ((char *) edd) + 4, len);
 
 	/* Spec violation.  Adaptec AIC7899 returns 0xDDBE
 	   here, when it should be 0xBEDD.
 	 */
-	p += sprintf(p, "\n");
+	p += snprintf(p, left, "\n");
 	if (info->params.key == 0xDDBE) {
-		p += sprintf(p,
+		p += snprintf(p, left,
 			     "Warning: Spec violation.  Key should be 0xBEDD, is 0xDDBE\n");
 		email++;
 	}
@@ -314,13 +314,13 @@
 	}
 
 	if (checksum) {
-		p += sprintf(p,
+		p += snprintf(p, left,
 			     "Warning: Spec violation.  Device Path checksum invalid.\n");
 		email++;
 	}
 
 	if (!nonzero_path) {
-		p += sprintf(p, "Error: Spec violation.  Empty device path.\n");
+		p += snprintf(p, left, "Error: Spec violation.  Empty device path.\n");
 		email++;
 		goto out;
 	}
@@ -337,7 +337,7 @@
 	}
 
 	if (warn_padding) {
-		p += sprintf(p,
+		p += snprintf(p, left,
 			     "Warning: Spec violation.  Padding should be 0x20.\n");
 		email++;
 	}
@@ -350,8 +350,8 @@
 						  info->params.interface_path.
 						  pci.function));
 		if (!pci_dev) {
-			p += sprintf(p, "Error: BIOS says this is a PCI device, but the OS doesn't know\n");
-			p += sprintf(p, "  about a PCI device at %02x:%02x.%01x\n",
+			p += snprintf(p, left, "Error: BIOS says this is a PCI device, but the OS doesn't know\n");
+			p += snprintf(p, left, "  about a PCI device at %02x:%02x.%d\n",
 				     info->params.interface_path.pci.bus,
 				     info->params.interface_path.pci.slot,
 				     info->params.interface_path.pci.function);
@@ -362,21 +362,21 @@
 		}
 	}
 
-	if (found_pci) {
+	if (found_pci && !edd_dev_is_type(edev, "SCSI")) {
 		sd = edd_find_matching_scsi_device(edev);
 		if (!sd) {
-			p += sprintf(p, "Error: BIOS says this is a SCSI device, but\n");
-			p += sprintf(p, "  the OS doesn't know about this SCSI device.\n");
-			p += sprintf(p, "  Do you have it's driver module loaded?\n");
+			p += snprintf(p, left, "Error: BIOS says this is a SCSI device, but\n");
+			p += snprintf(p, left, "  the OS doesn't know about this SCSI device.\n");
+			p += snprintf(p, left, "  Do you have it's driver module loaded?\n");
 			email++;
 		}
 	}
 
 out:
 	if (email) {
-		p += sprintf(p, "\nPlease check %s\n", REPORT_URL);
-		p += sprintf(p, "to see if this has been reported.  If not,\n");
-		p += sprintf(p, "please send the information requested there.\n");
+		p += snprintf(p, left, "\nPlease check %s\n", REPORT_URL);
+		p += snprintf(p, left, "to see if this has been reported.  If not,\n");
+		p += snprintf(p, left, "please send the information requested there.\n");
 	}
 
 	return (p - buf);
@@ -391,7 +391,7 @@
 		return 0;
 	}
 
-	p += sprintf(p, "0x%02x\n", info->version);
+	p += snprintf(p, left, "0x%02x\n", info->version);
 	return (p - buf);
 }
 
@@ -406,16 +406,16 @@
 	}
 
 	if (info->interface_support & EDD_EXT_FIXED_DISK_ACCESS) {
-		p += sprintf(p, "Fixed disk access\n");
+		p += snprintf(p, left, "Fixed disk access\n");
 	}
 	if (info->interface_support & EDD_EXT_DEVICE_LOCKING_AND_EJECTING) {
-		p += sprintf(p, "Device locking and ejecting\n");
+		p += snprintf(p, left, "Device locking and ejecting\n");
 	}
 	if (info->interface_support & EDD_EXT_ENHANCED_DISK_DRIVE_SUPPORT) {
-		p += sprintf(p, "Enhanced Disk Drive support\n");
+		p += snprintf(p, left, "Enhanced Disk Drive support\n");
 	}
 	if (info->interface_support & EDD_EXT_64BIT_EXTENSIONS) {
-		p += sprintf(p, "64-bit extensions\n");
+		p += snprintf(p, left, "64-bit extensions\n");
 	}
 	return (p - buf);
 }
@@ -431,21 +431,21 @@
 	}
 
 	if (info->params.info_flags & EDD_INFO_DMA_BOUNDRY_ERROR_TRANSPARENT)
-		p += sprintf(p, "DMA boundry error transparent\n");
+		p += snprintf(p, left, "DMA boundry error transparent\n");
 	if (info->params.info_flags & EDD_INFO_GEOMETRY_VALID)
-		p += sprintf(p, "geometry valid\n");
+		p += snprintf(p, left, "geometry valid\n");
 	if (info->params.info_flags & EDD_INFO_REMOVABLE)
-		p += sprintf(p, "removable\n");
+		p += snprintf(p, left, "removable\n");
 	if (info->params.info_flags & EDD_INFO_WRITE_VERIFY)
-		p += sprintf(p, "write verify\n");
+		p += snprintf(p, left, "write verify\n");
 	if (info->params.info_flags & EDD_INFO_MEDIA_CHANGE_NOTIFICATION)
-		p += sprintf(p, "media change notification\n");
+		p += snprintf(p, left, "media change notification\n");
 	if (info->params.info_flags & EDD_INFO_LOCKABLE)
-		p += sprintf(p, "lockable\n");
+		p += snprintf(p, left, "lockable\n");
 	if (info->params.info_flags & EDD_INFO_NO_MEDIA_PRESENT)
-		p += sprintf(p, "no media present\n");
+		p += snprintf(p, left, "no media present\n");
 	if (info->params.info_flags & EDD_INFO_USE_INT13_FN50)
-		p += sprintf(p, "use int13 fn50\n");
+		p += snprintf(p, left, "use int13 fn50\n");
 	return (p - buf);
 }
 
@@ -459,7 +459,7 @@
 		return 0;
 	}
 
-	p += sprintf(p, "0x%x\n", info->params.num_default_cylinders);
+	p += snprintf(p, left, "0x%x\n", info->params.num_default_cylinders);
 	return (p - buf);
 }
 
@@ -473,7 +473,7 @@
 		return 0;
 	}
 
-	p += sprintf(p, "0x%x\n", info->params.num_default_heads);
+	p += snprintf(p, left, "0x%x\n", info->params.num_default_heads);
 	return (p - buf);
 }
 
@@ -487,7 +487,7 @@
 		return 0;
 	}
 
-	p += sprintf(p, "0x%x\n", info->params.sectors_per_track);
+	p += snprintf(p, left, "0x%x\n", info->params.sectors_per_track);
 	return (p - buf);
 }
 
@@ -500,21 +500,10 @@
 		return 0;
 	}
 
-	p += sprintf(p, "0x%llx\n", info->params.number_of_sectors);
+	p += snprintf(p, left, "0x%llx\n", info->params.number_of_sectors);
 	return (p - buf);
 }
 
-static EDD_DEVICE_ATTR(raw_data, 0444, edd_show_raw_data);
-static EDD_DEVICE_ATTR(version, 0444, edd_show_version);
-static EDD_DEVICE_ATTR(extensions, 0444, edd_show_extensions);
-static EDD_DEVICE_ATTR(info_flags, 0444, edd_show_info_flags);
-static EDD_DEVICE_ATTR(default_cylinders, 0444, edd_show_default_cylinders);
-static EDD_DEVICE_ATTR(default_heads, 0444, edd_show_default_heads);
-static EDD_DEVICE_ATTR(default_sectors_per_track, 0444,
-		       edd_show_default_sectors_per_track);
-static EDD_DEVICE_ATTR(sectors, 0444, edd_show_sectors);
-static EDD_DEVICE_ATTR(interface, 0444, edd_show_interface);
-static EDD_DEVICE_ATTR(host_bus, 0444, edd_show_host_bus);
 
 /*
  * Some device instances may not have all the above attributes,
@@ -524,16 +513,7 @@
  * if the default_{cylinders,heads,sectors_per_track} values
  * are zero, the BIOS doesn't provide sane values, don't bother
  * creating files for them either.
- *
- * struct attr_test pairs an attribute and a test,
- * (the default NULL test being true - the attribute exists)
- * and individual existence tests may be written for each
- * attribute.
  */
-struct attr_test {
-	struct edd_attribute *attr;
-	int (*test) (struct edd_device * edev);
-};
 
 static int
 edd_has_default_cylinders(struct edd_device *edev)
@@ -590,23 +570,34 @@
 	return 0;
 }
 
-static struct attr_test def_attrs[] = {
-	{.attr = &edd_attr_raw_data},
-	{.attr = &edd_attr_version},
-	{.attr = &edd_attr_extensions},
-	{.attr = &edd_attr_info_flags},
-	{.attr = &edd_attr_sectors},
-	{.attr = &edd_attr_default_cylinders,
-	 .test = &edd_has_default_cylinders},
-	{.attr = &edd_attr_default_heads,
-	 .test = &edd_has_default_heads},
-	{.attr = &edd_attr_default_sectors_per_track,
-	 .test = &edd_has_default_sectors_per_track},
-	{.attr = &edd_attr_interface,
-	 .test = &edd_has_edd30},
-	{.attr = &edd_attr_host_bus,
-	 .test = &edd_has_edd30},
-	{.attr = NULL,.test = NULL},
+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(default_cylinders, 0444, edd_show_default_cylinders,
+		       edd_has_default_cylinders);
+static EDD_DEVICE_ATTR(default_heads, 0444, edd_show_default_heads,
+		       edd_has_default_heads);
+static EDD_DEVICE_ATTR(default_sectors_per_track, 0444,
+		       edd_show_default_sectors_per_track,
+		       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 struct edd_attribute * def_attrs[] = {
+	&edd_attr_raw_data,
+	&edd_attr_version,
+	&edd_attr_extensions,
+	&edd_attr_info_flags,
+	&edd_attr_sectors,
+	&edd_attr_default_cylinders,
+	&edd_attr_default_heads,
+	&edd_attr_default_sectors_per_track,
+	&edd_attr_interface,
+	&edd_attr_host_bus,
+	NULL,
 };
 
 /* edd_get_devpath_length(), edd_fill_devpath(), and edd_device_link()
@@ -857,23 +848,19 @@
 static inline void
 edd_device_unregister(struct edd_device *edev)
 {
-	driverfs_remove_file(&edev->dir, "pci_dev");
-	driverfs_remove_file(&edev->dir, "disc");
 	driverfs_remove_dir(&edev->dir);
-	list_del_init(&edev->node);
 }
 
 static int
 edd_populate_dir(struct edd_device *edev)
 {
-	struct attr_test *s;
+	struct edd_attribute *attr;
 	int i;
 	int error = 0;
 
-	for (i = 0; def_attrs[i].attr; i++) {
-		s = &def_attrs[i];
-		if (!s->test || (s->test && !s->test(edev))) {
-			if ((error = edd_create_file(edev, s->attr))) {
+	for (i = 0; (attr=def_attrs[i]); i++) {
+		if (!attr->test || (attr->test && !attr->test(edev))) {
+			if ((error = edd_create_file(edev, attr))) {
 				break;
 			}
 		}
@@ -928,7 +915,7 @@
 edd_init(void)
 {
 	unsigned int i;
-	int rc;
+	int rc=0;
 	struct edd_device *edev;
 
 	printk(KERN_INFO "BIOS EDD facility v%s, %d devices found\n",
diff -Nru a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S	Wed Oct 30 16:44:26 2002
+++ b/arch/i386/kernel/entry.S	Wed Oct 30 16:44:26 2002
@@ -737,6 +737,10 @@
 	.long sys_free_hugepages
 	.long sys_exit_group
 	.long sys_lookup_dcookie
+	.long sys_epoll_create
+	.long sys_epoll_ctl	/* 255 */
+	.long sys_epoll_wait
+
 
 	.rept NR_syscalls-(.-sys_call_table)/4
 		.long sys_ni_syscall
diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
--- a/arch/i386/kernel/i386_ksyms.c	Wed Oct 30 16:44:35 2002
+++ b/arch/i386/kernel/i386_ksyms.c	Wed Oct 30 16:44:35 2002
@@ -72,7 +72,9 @@
 #ifdef CONFIG_X86_NUMAQ
 EXPORT_SYMBOL(xquad_portio);
 #endif
+#ifndef CONFIG_X86_WP_WORKS_OK
 EXPORT_SYMBOL(__verify_write);
+#endif
 EXPORT_SYMBOL(dump_thread);
 EXPORT_SYMBOL(dump_fpu);
 EXPORT_SYMBOL(dump_extended_fpu);
@@ -116,8 +118,10 @@
 EXPORT_SYMBOL(__strncpy_from_user);
 EXPORT_SYMBOL(clear_user);
 EXPORT_SYMBOL(__clear_user);
-EXPORT_SYMBOL(__generic_copy_from_user);
-EXPORT_SYMBOL(__generic_copy_to_user);
+EXPORT_SYMBOL(copy_from_user);
+EXPORT_SYMBOL(__copy_from_user);
+EXPORT_SYMBOL(copy_to_user);
+EXPORT_SYMBOL(__copy_to_user);
 EXPORT_SYMBOL(strnlen_user);
 
 EXPORT_SYMBOL(pci_alloc_consistent);
diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
--- a/arch/i386/kernel/irq.c	Wed Oct 30 16:44:20 2002
+++ b/arch/i386/kernel/irq.c	Wed Oct 30 16:44:20 2002
@@ -328,20 +328,21 @@
 	irq_desc_t *desc = irq_desc + irq;
 	struct irqaction * action;
 	unsigned int status;
-	long esp;
 
 	irq_enter();
 
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
 	/* Debugging check for stack overflow: is there less than 1KB free? */
-	__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
-	if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
-		extern void show_stack(unsigned long *);
+	{
+		long esp;
 
-		printk("do_IRQ: stack overflow: %ld\n",
-		esp - sizeof(struct task_struct));
-		__asm__ __volatile__("movl %%esp,%0" : "=r" (esp));
-		show_stack((void *)esp);
+		__asm__ __volatile__("andl %%esp,%0" :
+					"=r" (esp) : "0" (8191));
+		if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
+			printk("do_IRQ: stack overflow: %ld\n",
+				esp - sizeof(struct task_struct));
+			dump_stack();
+		}
 	}
 #endif
 	kstat.irqs[cpu][irq]++;
diff -Nru a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c
--- a/arch/i386/kernel/mca.c	Wed Oct 30 16:44:31 2002
+++ b/arch/i386/kernel/mca.c	Wed Oct 30 16:44:31 2002
@@ -194,10 +194,9 @@
 
 #define MCA_STANDARD_RESOURCES	(sizeof(mca_standard_resources)/sizeof(struct resource))
 
-void __init mca_init(void)
+int __init mca_init(void)
 {
 	unsigned int i, j;
-	unsigned long flags;
 
 	/* WARNING: Be careful when making changes here. Putting an adapter
 	 * and the motherboard simultaneously into setup mode may result in
@@ -209,16 +208,16 @@
 	/* Make sure the MCA bus is present */
 
 	if(!MCA_bus)
-		return;
-	printk("Micro Channel bus detected.\n");
+		return -ENODEV;
+	printk(KERN_INFO "Micro Channel bus detected.\n");
 
 	/* Allocate MCA_info structure (at address divisible by 8) */
 
 	mca_info = (struct MCA_info *)kmalloc(sizeof(struct MCA_info), GFP_KERNEL);
 
 	if(mca_info == NULL) {
-		printk("Failed to allocate memory for mca_info!");
-		return;
+		printk(KERN_ERR "Failed to allocate memory for mca_info!");
+		return -ENOMEM;
 	}
 	memset(mca_info, 0, sizeof(struct MCA_info));
 
@@ -320,6 +319,8 @@
 #ifdef CONFIG_PROC_FS
 	mca_do_proc_init();
 #endif
+
+	return 0;
 }
 
 subsys_initcall(mca_init);
@@ -329,16 +330,16 @@
 static void mca_handle_nmi_slot(int slot, int check_flag)
 {
 	if(slot < MCA_MAX_SLOT_NR) {
-		printk("NMI: caused by MCA adapter in slot %d (%s)\n", slot+1,
+		printk(KERN_CRIT "NMI: caused by MCA adapter in slot %d (%s)\n", slot+1,
 			mca_info->slot[slot].name);
 	} else if(slot == MCA_INTEGSCSI) {
-		printk("NMI: caused by MCA integrated SCSI adapter (%s)\n",
+		printk(KERN_CRIT "NMI: caused by MCA integrated SCSI adapter (%s)\n",
 			mca_info->slot[slot].name);
 	} else if(slot == MCA_INTEGVIDEO) {
-		printk("NMI: caused by MCA integrated video adapter (%s)\n",
+		printk(KERN_CRIT "NMI: caused by MCA integrated video adapter (%s)\n",
 			mca_info->slot[slot].name);
 	} else if(slot == MCA_MOTHERBOARD) {
-		printk("NMI: caused by motherboard (%s)\n",
+		printk(KERN_CRIT "NMI: caused by motherboard (%s)\n",
 			mca_info->slot[slot].name);
 	}
 
@@ -350,7 +351,7 @@
 		pos6 = mca_read_pos(slot, 6);
 		pos7 = mca_read_pos(slot, 7);
 
-		printk("NMI: POS 6 = 0x%x, POS 7 = 0x%x\n", pos6, pos7);
+		printk(KERN_CRIT "NMI: POS 6 = 0x%x, POS 7 = 0x%x\n", pos6, pos7);
 	}
 
 } /* mca_handle_nmi_slot */
@@ -367,21 +368,19 @@
 	 * adapter was responsible for the error.
 	 */
 
-	for(i = 0; i < MCA_NUMADAPTERS; i++) {
-
-	/* Bit 7 of POS 5 is reset when this adapter has a hardware
-	 * error. Bit 7 it reset if there's error information
-	 * available in POS 6 and 7.
-	 */
+	for(i = 0; i < MCA_NUMADAPTERS; i++) 
+	{
+		/* Bit 7 of POS 5 is reset when this adapter has a hardware
+		 * error. Bit 7 it reset if there's error information
+		 * available in POS 6 and 7.
+		 */
+		pos5 = mca_read_pos(i, 5);
 
-	pos5 = mca_read_pos(i, 5);
-
-	if(!(pos5 & 0x80)) {
+		if(!(pos5 & 0x80)) {
 			mca_handle_nmi_slot(i, !(pos5 & 0x40));
 			return;
 		}
 	}
-
 	mca_nmi_hook();
 } /* mca_handle_nmi */
 
diff -Nru a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
--- a/arch/i386/kernel/ptrace.c	Wed Oct 30 16:44:26 2002
+++ b/arch/i386/kernel/ptrace.c	Wed Oct 30 16:44:26 2002
@@ -375,12 +375,8 @@
 			break;
 		}
 		ret = 0;
-		if ( !child->used_math ) {
-			/* Simulate an empty FPU. */
-			set_fpu_cwd(child, 0x037f);
-			set_fpu_swd(child, 0x0000);
-			set_fpu_twd(child, 0xffff);
-		}
+		if (!child->used_math)
+			init_fpu(child);
 		get_fpregs((struct user_i387_struct *)data, child);
 		break;
 	}
@@ -403,13 +399,8 @@
 			ret = -EIO;
 			break;
 		}
-		if ( !child->used_math ) {
-			/* Simulate an empty FPU. */
-			set_fpu_cwd(child, 0x037f);
-			set_fpu_swd(child, 0x0000);
-			set_fpu_twd(child, 0xffff);
-			set_fpu_mxcsr(child, 0x1f80);
-		}
+		if (!child->used_math)
+			init_fpu(child);
 		ret = get_fpxregs((struct user_fxsr_struct *)data, child);
 		break;
 	}
diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c	Wed Oct 30 16:44:28 2002
+++ b/arch/i386/kernel/setup.c	Wed Oct 30 16:44:28 2002
@@ -471,7 +471,8 @@
 unsigned char eddnr;
 struct edd_info edd[EDDNR];
 /**
- * copy_edd() - Copy the BIOS EDD information into a safe place.
+ * copy_edd() - Copy the BIOS EDD information
+ *              from empty_zero_page into a safe place.
  *
  */
 static inline void copy_edd(void)
diff -Nru a/arch/i386/kernel/suspend.c b/arch/i386/kernel/suspend.c
--- a/arch/i386/kernel/suspend.c	Wed Oct 30 16:44:31 2002
+++ b/arch/i386/kernel/suspend.c	Wed Oct 30 16:44:31 2002
@@ -54,10 +54,10 @@
 	/*
 	 * 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" (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));
 
 	/*
 	 * save the general registers.
@@ -67,22 +67,22 @@
 	 * It's really not necessary, and kinda fishy (check the assembly output),
 	 * so it's avoided. 
 	 */
-	asm volatile ("movl %%esp, (%0)" : "=m" (saved_context.esp));
-	asm volatile ("movl %%eax, (%0)" : "=m" (saved_context.eax));
-	asm volatile ("movl %%ebx, (%0)" : "=m" (saved_context.ebx));
-	asm volatile ("movl %%ecx, (%0)" : "=m" (saved_context.ecx));
-	asm volatile ("movl %%edx, (%0)" : "=m" (saved_context.edx));
-	asm volatile ("movl %%ebp, (%0)" : "=m" (saved_context.ebp));
-	asm volatile ("movl %%esi, (%0)" : "=m" (saved_context.esi));
-	asm volatile ("movl %%edi, (%0)" : "=m" (saved_context.edi));
-
+	asm volatile ("movl %%esp, %0" : "=m" (saved_context.esp));
+	asm volatile ("movl %%eax, %0" : "=m" (saved_context.eax));
+	asm volatile ("movl %%ebx, %0" : "=m" (saved_context.ebx));
+	asm volatile ("movl %%ecx, %0" : "=m" (saved_context.ecx));
+	asm volatile ("movl %%edx, %0" : "=m" (saved_context.edx));
+	asm volatile ("movl %%ebp, %0" : "=m" (saved_context.ebp));
+	asm volatile ("movl %%esi, %0" : "=m" (saved_context.esi));
+	asm volatile ("movl %%edi, %0" : "=m" (saved_context.edi));
+	/* FIXME: Need to save XMM0..XMM15? */
 	/*
 	 * segment registers
 	 */
-	asm volatile ("movw %%es, %0" : "=r" (saved_context.es));
-	asm volatile ("movw %%fs, %0" : "=r" (saved_context.fs));
-	asm volatile ("movw %%gs, %0" : "=r" (saved_context.gs));
-	asm volatile ("movw %%ss, %0" : "=r" (saved_context.ss));
+	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));
 
 	/*
 	 * control registers 
@@ -95,7 +95,7 @@
 	/*
 	 * eflags
 	 */
-	asm volatile ("pushfl ; popl (%0)" : "=m" (saved_context.eflags));
+	asm volatile ("pushfl ; popl %0" : "=m" (saved_context.eflags));
 }
 
 static void
@@ -125,9 +125,7 @@
 	/*
 	 * first restore %ds, so we can access our data properly
 	 */
-	asm volatile (".align 4");
-	asm volatile ("movw %0, %%ds" :: "r" ((u16)__KERNEL_DS));
-
+	asm volatile ("movw %0, %%ds" :: "r" (__KERNEL_DS));
 
 	/*
 	 * control registers
@@ -136,7 +134,7 @@
 	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));
-	
+
 	/*
 	 * segment registers
 	 */
@@ -167,9 +165,9 @@
 	 * 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" (saved_context.gdt_limit));
+	asm volatile ("lidt %0" :: "m" (saved_context.idt_limit));
+	asm volatile ("lldt %0" :: "m" (saved_context.ldt));
 
 	fix_processor_context();
 
diff -Nru a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c
--- a/arch/i386/lib/usercopy.c	Wed Oct 30 16:44:17 2002
+++ b/arch/i386/lib/usercopy.c	Wed Oct 30 16:44:17 2002
@@ -9,59 +9,14 @@
 #include <asm/uaccess.h>
 #include <asm/mmx.h>
 
-#ifdef CONFIG_X86_USE_3DNOW_AND_WORKS
-
-unsigned long
-__generic_copy_to_user(void *to, const void *from, unsigned long n)
-{
-	if (access_ok(VERIFY_WRITE, to, n))
-	{
-		if(n<512)
-			__copy_user(to,from,n);
-		else
-			mmx_copy_user(to,from,n);
-	}
-	return n;
-}
-
-unsigned long
-__generic_copy_from_user(void *to, const void *from, unsigned long n)
-{
-	if (access_ok(VERIFY_READ, from, n))
-	{
-		if(n<512)
-			__copy_user_zeroing(to,from,n);
-		else
-			mmx_copy_user_zeroing(to, from, n);
-	}
-	else
-		memset(to, 0, n);
-	return n;
-}
-
-#else
-
-unsigned long
-__generic_copy_to_user(void *to, const void *from, unsigned long n)
-{
-	prefetch(from);
-	if (access_ok(VERIFY_WRITE, to, n))
-		__copy_user(to,from,n);
-	return n;
-}
-
-unsigned long
-__generic_copy_from_user(void *to, const void *from, unsigned long n)
+static inline int movsl_is_ok(const void *a1, const void *a2, unsigned long n)
 {
-	prefetchw(to);
-	if (access_ok(VERIFY_READ, from, n))
-		__copy_user_zeroing(to,from,n);
-	else
-		memset(to, 0, n);
-	return n;
-}
-
+#ifdef CONFIG_X86_INTEL_USERCOPY
+	if (n >= 64 && (((const long)a1 ^ (const long)a2) & movsl_mask.mask))
+		return 0;
 #endif
+	return 1;
+}
 
 /*
  * Copy a null terminated string from userspace.
@@ -187,4 +142,311 @@
 		:"0" (n), "1" (s), "2" (0), "3" (mask)
 		:"cc");
 	return res & mask;
+}
+
+#ifdef CONFIG_X86_INTEL_USERCOPY
+static unsigned long
+__copy_user_intel(void *to, const void *from,unsigned long size)
+{
+	int d0, d1;
+	__asm__ __volatile__(
+		       "       .align 2,0x90\n" 
+		       "0:     movl 32(%4), %%eax\n"
+		       "       cmpl $67, %0\n"     
+		       "       jbe 1f\n"            
+		       "       movl 64(%4), %%eax\n"
+		       "       .align 2,0x90\n"     
+		       "1:     movl 0(%4), %%eax\n" 
+		       "       movl 4(%4), %%edx\n" 
+		       "2:     movl %%eax, 0(%3)\n" 
+		       "21:    movl %%edx, 4(%3)\n" 
+		       "       movl 8(%4), %%eax\n" 
+		       "       movl 12(%4),%%edx\n" 
+		       "3:     movl %%eax, 8(%3)\n" 
+		       "31:    movl %%edx, 12(%3)\n"
+		       "       movl 16(%4), %%eax\n"
+		       "       movl 20(%4), %%edx\n"
+		       "4:     movl %%eax, 16(%3)\n"
+		       "41:    movl %%edx, 20(%3)\n"
+		       "       movl 24(%4), %%eax\n"
+		       "       movl 28(%4), %%edx\n"
+		       "10:    movl %%eax, 24(%3)\n"
+		       "51:    movl %%edx, 28(%3)\n"
+		       "       movl 32(%4), %%eax\n"
+		       "       movl 36(%4), %%edx\n"
+		       "11:    movl %%eax, 32(%3)\n"
+		       "61:    movl %%edx, 36(%3)\n"
+		       "       movl 40(%4), %%eax\n"
+		       "       movl 44(%4), %%edx\n"
+		       "12:    movl %%eax, 40(%3)\n"
+		       "71:    movl %%edx, 44(%3)\n"
+		       "       movl 48(%4), %%eax\n"
+		       "       movl 52(%4), %%edx\n"
+		       "13:    movl %%eax, 48(%3)\n"
+		       "81:    movl %%edx, 52(%3)\n"
+		       "       movl 56(%4), %%eax\n"
+		       "       movl 60(%4), %%edx\n"
+		       "14:    movl %%eax, 56(%3)\n"
+		       "91:    movl %%edx, 60(%3)\n"
+		       "       addl $-64, %0\n"     
+		       "       addl $64, %4\n"      
+		       "       addl $64, %3\n"      
+		       "       cmpl $63, %0\n"      
+		       "       ja  0b\n"            
+		       "5:     movl  %0, %%eax\n"   
+		       "       shrl  $2, %0\n"      
+		       "       andl  $3, %%eax\n"   
+		       "       cld\n"               
+		       "6:     rep; movsl\n"        
+		       "       movl %%eax, %0\n"    
+		       "7:     rep; movsb\n"		
+		       "8:\n"				
+		       ".section .fixup,\"ax\"\n"	
+		       "9:     lea 0(%%eax,%0,4),%0\n"	
+		       "       jmp 8b\n"               
+		       ".previous\n"			
+		       ".section __ex_table,\"a\"\n"	
+		       "       .align 4\n"		
+		       "       .long 2b,8b\n"		
+		       "       .long 21b,8b\n"	
+		       "       .long 3b,8b\n"		
+		       "       .long 31b,8b\n"	
+		       "       .long 4b,8b\n"		
+		       "       .long 41b,8b\n"	
+		       "       .long 10b,8b\n"	
+		       "       .long 51b,8b\n"	
+		       "       .long 11b,8b\n"	
+		       "       .long 61b,8b\n"	
+		       "       .long 12b,8b\n"	
+		       "       .long 71b,8b\n"	
+		       "       .long 13b,8b\n"	
+		       "       .long 81b,8b\n"	
+		       "       .long 14b,8b\n"	
+		       "       .long 91b,8b\n"	
+		       "       .long 6b,9b\n"		
+		       "       .long 7b,8b\n"          
+		       ".previous"			
+		       : "=&c"(size), "=&D" (d0), "=&S" (d1)
+		       :  "1"(to), "2"(from), "0"(size)
+		       : "eax", "edx", "memory");			
+	return size;
+}
+
+static unsigned long
+__copy_user_zeroing_intel(void *to, const void *from, unsigned long size)
+{
+	int d0, d1;
+	__asm__ __volatile__(
+		       "        .align 2,0x90\n"
+		       "0:      movl 32(%4), %%eax\n"
+		       "        cmpl $67, %0\n"      
+		       "        jbe 2f\n"            
+		       "1:      movl 64(%4), %%eax\n"
+		       "        .align 2,0x90\n"     
+		       "2:      movl 0(%4), %%eax\n" 
+		       "21:     movl 4(%4), %%edx\n" 
+		       "        movl %%eax, 0(%3)\n" 
+		       "        movl %%edx, 4(%3)\n" 
+		       "3:      movl 8(%4), %%eax\n" 
+		       "31:     movl 12(%4),%%edx\n" 
+		       "        movl %%eax, 8(%3)\n" 
+		       "        movl %%edx, 12(%3)\n"
+		       "4:      movl 16(%4), %%eax\n"
+		       "41:     movl 20(%4), %%edx\n"
+		       "        movl %%eax, 16(%3)\n"
+		       "        movl %%edx, 20(%3)\n"
+		       "10:     movl 24(%4), %%eax\n"
+		       "51:     movl 28(%4), %%edx\n"
+		       "        movl %%eax, 24(%3)\n"
+		       "        movl %%edx, 28(%3)\n"
+		       "11:     movl 32(%4), %%eax\n"
+		       "61:     movl 36(%4), %%edx\n"
+		       "        movl %%eax, 32(%3)\n"
+		       "        movl %%edx, 36(%3)\n"
+		       "12:     movl 40(%4), %%eax\n"
+		       "71:     movl 44(%4), %%edx\n"
+		       "        movl %%eax, 40(%3)\n"
+		       "        movl %%edx, 44(%3)\n"
+		       "13:     movl 48(%4), %%eax\n"
+		       "81:     movl 52(%4), %%edx\n"
+		       "        movl %%eax, 48(%3)\n"
+		       "        movl %%edx, 52(%3)\n"
+		       "14:     movl 56(%4), %%eax\n"
+		       "91:     movl 60(%4), %%edx\n"
+		       "        movl %%eax, 56(%3)\n"
+		       "        movl %%edx, 60(%3)\n"
+		       "        addl $-64, %0\n"     
+		       "        addl $64, %4\n"      
+		       "        addl $64, %3\n"      
+		       "        cmpl $63, %0\n"      
+		       "        ja  0b\n"            
+		       "5:      movl  %0, %%eax\n"   
+		       "        shrl  $2, %0\n"      
+		       "        andl $3, %%eax\n"    
+		       "        cld\n"               
+		       "6:      rep; movsl\n"   
+		       "        movl %%eax,%0\n"
+		       "7:      rep; movsb\n"	
+		       "8:\n"			
+		       ".section .fixup,\"ax\"\n"
+		       "9:      lea 0(%%eax,%0,4),%0\n"	
+		       "16:     pushl %0\n"	
+		       "        pushl %%eax\n"	
+		       "        xorl %%eax,%%eax\n"
+		       "        rep; stosb\n"	
+		       "        popl %%eax\n"	
+		       "        popl %0\n"	
+		       "        jmp 8b\n"	
+		       ".previous\n"		
+		       ".section __ex_table,\"a\"\n"
+		       "	.align 4\n"	   
+		       "	.long 0b,16b\n"	 
+		       "	.long 1b,16b\n"
+		       "	.long 2b,16b\n"
+		       "	.long 21b,16b\n"
+		       "	.long 3b,16b\n"	
+		       "	.long 31b,16b\n"
+		       "	.long 4b,16b\n"	
+		       "	.long 41b,16b\n"
+		       "	.long 10b,16b\n"
+		       "	.long 51b,16b\n"
+		       "	.long 11b,16b\n"
+		       "	.long 61b,16b\n"
+		       "	.long 12b,16b\n"
+		       "	.long 71b,16b\n"
+		       "	.long 13b,16b\n"
+		       "	.long 81b,16b\n"
+		       "	.long 14b,16b\n"
+		       "	.long 91b,16b\n"
+		       "	.long 6b,9b\n"	
+		       "        .long 7b,16b\n" 
+		       ".previous"		
+		       : "=&c"(size), "=&D" (d0), "=&S" (d1)
+		       :  "1"(to), "2"(from), "0"(size)
+		       : "eax", "edx", "memory");
+	return size;
+}
+#else
+/*
+ * Leave these declared but undefined.  They should not be any references to
+ * them
+ */
+unsigned long
+__copy_user_zeroing_intel(void *to, const void *from, unsigned long size);
+unsigned long
+__copy_user_intel(void *to, const void *from,unsigned long size);
+#endif /* CONFIG_X86_INTEL_USERCOPY */
+
+/* Generic arbitrary sized copy.  */
+#define __copy_user(to,from,size)					\
+do {									\
+	int __d0, __d1, __d2;						\
+	__asm__ __volatile__(						\
+		"	cmp  $7,%0\n"					\
+		"	jbe  1f\n"					\
+		"	movl %1,%0\n"					\
+		"	negl %0\n"					\
+		"	andl $7,%0\n"					\
+		"	subl %0,%3\n"					\
+		"4:	rep; movsb\n"					\
+		"	movl %3,%0\n"					\
+		"	shrl $2,%0\n"					\
+		"	andl $3,%3\n"					\
+		"	.align 2,0x90\n"				\
+		"0:	rep; movsl\n"					\
+		"	movl %3,%0\n"					\
+		"1:	rep; movsb\n"					\
+		"2:\n"							\
+		".section .fixup,\"ax\"\n"				\
+		"5:	addl %3,%0\n"					\
+		"	jmp 2b\n"					\
+		"3:	lea 0(%3,%0,4),%0\n"				\
+		"	jmp 2b\n"					\
+		".previous\n"						\
+		".section __ex_table,\"a\"\n"				\
+		"	.align 4\n"					\
+		"	.long 4b,5b\n"					\
+		"	.long 0b,3b\n"					\
+		"	.long 1b,2b\n"					\
+		".previous"						\
+		: "=&c"(size), "=&D" (__d0), "=&S" (__d1), "=r"(__d2)	\
+		: "3"(size), "0"(size), "1"(to), "2"(from)		\
+		: "memory");						\
+} while (0)
+
+#define __copy_user_zeroing(to,from,size)				\
+do {									\
+	int __d0, __d1, __d2;						\
+	__asm__ __volatile__(						\
+		"	cmp  $7,%0\n"					\
+		"	jbe  1f\n"					\
+		"	movl %1,%0\n"					\
+		"	negl %0\n"					\
+		"	andl $7,%0\n"					\
+		"	subl %0,%3\n"					\
+		"4:	rep; movsb\n"					\
+		"	movl %3,%0\n"					\
+		"	shrl $2,%0\n"					\
+		"	andl $3,%3\n"					\
+		"	.align 2,0x90\n"				\
+		"0:	rep; movsl\n"					\
+		"	movl %3,%0\n"					\
+		"1:	rep; movsb\n"					\
+		"2:\n"							\
+		".section .fixup,\"ax\"\n"				\
+		"5:	addl %3,%0\n"					\
+		"	jmp 6f\n"					\
+		"3:	lea 0(%3,%0,4),%0\n"				\
+		"6:	pushl %0\n"					\
+		"	pushl %%eax\n"					\
+		"	xorl %%eax,%%eax\n"				\
+		"	rep; stosb\n"					\
+		"	popl %%eax\n"					\
+		"	popl %0\n"					\
+		"	jmp 2b\n"					\
+		".previous\n"						\
+		".section __ex_table,\"a\"\n"				\
+		"	.align 4\n"					\
+		"	.long 4b,5b\n"					\
+		"	.long 0b,3b\n"					\
+		"	.long 1b,6b\n"					\
+		".previous"						\
+		: "=&c"(size), "=&D" (__d0), "=&S" (__d1), "=r"(__d2)	\
+		: "3"(size), "0"(size), "1"(to), "2"(from)		\
+		: "memory");						\
+} while (0)
+
+
+unsigned long __copy_to_user(void *to, const void *from, unsigned long n)
+{
+	if (movsl_is_ok(to, from, n))
+		__copy_user(to, from, n);
+	else
+		n = __copy_user_intel(to, from, n);
+	return n;
+}
+
+unsigned long __copy_from_user(void *to, const void *from, unsigned long n)
+{
+	if (movsl_is_ok(to, from, n))
+		__copy_user_zeroing(to, from, n);
+	else
+		n = __copy_user_zeroing_intel(to, from, n);
+	return n;
+}
+
+unsigned long copy_to_user(void *to, const void *from, unsigned long n)
+{
+	prefetch(from);
+	if (access_ok(VERIFY_WRITE, to, n))
+		n = __copy_to_user(to, from, n);
+	return n;
+}
+
+unsigned long copy_from_user(void *to, const void *from, unsigned long n)
+{
+	prefetchw(to);
+	if (access_ok(VERIFY_READ, from, n))
+		n = __copy_from_user(to, from, n);
+	return n;
 }
diff -Nru a/arch/i386/mach-voyager/Makefile b/arch/i386/mach-voyager/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/Makefile	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,17 @@
+#
+# Makefile for the linux 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).
+#
+# Note 2! The CFLAGS definitions are now in the main makefile...
+
+EXTRA_CFLAGS	+= -I../kernel
+export-objs	:=
+
+obj-y			:= setup.o voyager_basic.o voyager_thread.o
+
+obj-$(CONFIG_SMP)	+= voyager_smp.o voyager_cat.o
+
+include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/mach-voyager/do_timer.h b/arch/i386/mach-voyager/do_timer.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/do_timer.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,22 @@
+/* defines for inline arch setup functions */
+#include <asm/voyager.h>
+
+static inline void do_timer_interrupt_hook(struct pt_regs *regs)
+{
+	do_timer(regs);
+
+	voyager_timer_interrupt(regs);
+}
+
+static inline int do_timer_overflow(int count)
+{
+	/* can't read the ISR, just assume 1 tick
+	   overflow */
+	if(count > LATCH || count < 0) {
+		printk(KERN_ERR "VOYAGER PROBLEM: count is %d, latch is %d\n", count, LATCH);
+		count = LATCH;
+	}
+	count -= LATCH;
+
+	return count;
+}
diff -Nru a/arch/i386/mach-voyager/entry_arch.h b/arch/i386/mach-voyager/entry_arch.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/entry_arch.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,26 @@
+/* -*- mode: c; c-basic-offset: 8 -*- */
+
+/* Copyright (C) 2002
+ *
+ * Author: James.Bottomley@HansenPartnership.com
+ *
+ * linux/arch/i386/voyager/entry_arch.h
+ *
+ * This file builds the VIC and QIC CPI gates
+ */
+
+/* initialise the voyager interrupt gates 
+ *
+ * This uses the macros in irq.h to set up assembly jump gates.  The
+ * calls are then redirected to the same routine with smp_ prefixed */
+BUILD_INTERRUPT(vic_sys_interrupt, VIC_SYS_INT)
+BUILD_INTERRUPT(vic_cmn_interrupt, VIC_CMN_INT)
+BUILD_INTERRUPT(vic_cpi_interrupt, VIC_CPI_LEVEL0);
+
+/* do all the QIC interrupts */
+BUILD_INTERRUPT(qic_timer_interrupt, QIC_TIMER_CPI);
+BUILD_INTERRUPT(qic_invalidate_interrupt, QIC_INVALIDATE_CPI);
+BUILD_INTERRUPT(qic_reschedule_interrupt, QIC_RESCHEDULE_CPI);
+BUILD_INTERRUPT(qic_enable_irq_interrupt, QIC_ENABLE_IRQ_CPI);
+BUILD_INTERRUPT(qic_call_function_interrupt, QIC_CALL_FUNCTION_CPI);
+
diff -Nru a/arch/i386/mach-voyager/irq_vectors.h b/arch/i386/mach-voyager/irq_vectors.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/irq_vectors.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,71 @@
+/* -*- mode: c; c-basic-offset: 8 -*- */
+
+/* Copyright (C) 2002
+ *
+ * Author: James.Bottomley@HansenPartnership.com
+ *
+ * linux/arch/i386/voyager/irq_vectors.h
+ *
+ * This file provides definitions for the VIC and QIC CPIs
+ */
+
+#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.
+ */
+
+/* These define the CPIs we use in linux */
+#define VIC_CPI_LEVEL0			0
+#define VIC_CPI_LEVEL1			1
+/* now the fake CPIs */
+#define VIC_TIMER_CPI			2
+#define VIC_INVALIDATE_CPI		3
+#define VIC_RESCHEDULE_CPI		4
+#define VIC_ENABLE_IRQ_CPI		5
+#define VIC_CALL_FUNCTION_CPI		6
+
+/* Now the QIC CPIs:  Since we don't need the two initial levels,
+ * these are 2 less than the VIC CPIs */
+#define QIC_CPI_OFFSET			1
+#define QIC_TIMER_CPI			(VIC_TIMER_CPI - QIC_CPI_OFFSET)
+#define QIC_INVALIDATE_CPI		(VIC_INVALIDATE_CPI - QIC_CPI_OFFSET)
+#define QIC_RESCHEDULE_CPI		(VIC_RESCHEDULE_CPI - QIC_CPI_OFFSET)
+#define QIC_ENABLE_IRQ_CPI		(VIC_ENABLE_IRQ_CPI - QIC_CPI_OFFSET)
+#define QIC_CALL_FUNCTION_CPI		(VIC_CALL_FUNCTION_CPI - QIC_CPI_OFFSET)
+
+#define VIC_START_FAKE_CPI		VIC_TIMER_CPI
+#define VIC_END_FAKE_CPI		VIC_CALL_FUNCTION_CPI
+
+/* this is the SYS_INT CPI. */
+#define VIC_SYS_INT			8
+#define VIC_CMN_INT			15
+
+/* This is the boot CPI for alternate processors.  It gets overwritten
+ * by the above once the system has activated all available processors */
+#define VIC_CPU_BOOT_CPI		VIC_CPI_LEVEL0
+#define VIC_CPU_BOOT_ERRATA_CPI		(VIC_CPI_LEVEL0 + 8)
+
+#define NR_IRQS 224
+
+#ifndef __ASSEMBLY__
+extern asmlinkage void vic_cpi_interrupt(void);
+extern asmlinkage void vic_sys_interrupt(void);
+extern asmlinkage void vic_cmn_interrupt(void);
+extern asmlinkage void qic_timer_interrupt(void);
+extern asmlinkage void qic_invalidate_interrupt(void);
+extern asmlinkage void qic_reschedule_interrupt(void);
+extern asmlinkage void qic_enable_irq_interrupt(void);
+extern asmlinkage void qic_call_function_interrupt(void);
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_IRQ_VECTORS_H */
diff -Nru a/arch/i386/mach-voyager/setup.c b/arch/i386/mach-voyager/setup.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/setup.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,43 @@
+/*
+ *	Machine specific setup for generic
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <asm/arch_hooks.h>
+
+void __init pre_intr_init_hook(void)
+{
+	init_ISA_irqs();
+}
+
+/*
+ * IRQ2 is cascade interrupt to second interrupt controller
+ */
+static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL};
+
+void __init intr_init_hook(void)
+{
+#ifdef CONFIG_SMP
+	smp_intr_init();
+#endif
+
+	setup_irq(2, &irq2);
+}
+
+void __init pre_setup_arch_hook(void)
+{
+}
+
+void __init trap_init_hook(void)
+{
+}
+
+static struct irqaction irq0  = { timer_interrupt, SA_INTERRUPT, 0, "timer", NULL, NULL};
+
+void __init time_init_hook(void)
+{
+	setup_irq(0, &irq0);
+}
diff -Nru a/arch/i386/mach-voyager/setup_arch_post.h b/arch/i386/mach-voyager/setup_arch_post.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/setup_arch_post.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,73 @@
+/* Hook for machine specific memory setup.
+ *
+ * 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;
+
+	who = "NOT VOYAGER";
+
+	if(voyager_level == 5) {
+		__u32 addr, length;
+		int i;
+
+		who = "Voyager-SUS";
+
+		e820.nr_map = 0;
+		for(i=0; voyager_memory_detect(i, &addr, &length); i++) {
+			add_memory_region(addr, length, E820_RAM);
+		}
+		return who;
+	} else if(voyager_level == 4) {
+		__u32 tom;
+		__u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8;
+		/* select the DINO config space */
+		outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT);
+		/* Read DINO top of memory register */
+		tom = ((inb(catbase + 0x4) & 0xf0) << 16)
+			+ ((inb(catbase + 0x5) & 0x7f) << 24);
+
+		if(inb(catbase) != VOYAGER_DINO) {
+			printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");
+			tom = (EXT_MEM_K)<<10;
+		}
+		who = "Voyager-TOM";
+		add_memory_region(0, 0x9f000, E820_RAM);
+		/* map from 1M to top of memory */
+		add_memory_region(1*1024*1024, tom - 1*1024*1024, E820_RAM);
+		/* FIXME: Should check the ASICs to see if I need to
+		 * take out the 8M window.  Just do it at the moment
+		 * */
+		add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED);
+		return who;
+	}
+
+	who = "BIOS-e820";
+
+	/*
+	 * Try to copy the BIOS-supplied E820-map.
+	 *
+	 * Otherwise fake a memory map; one section from 0k->640k,
+	 * the next section from 1mb->appropriate_mem_k
+	 */
+	sanitize_e820_map(E820_MAP, &E820_MAP_NR);
+	if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {
+		unsigned long mem_size;
+
+		/* compare results from other methods and take the greater */
+		if (ALT_MEM_K < EXT_MEM_K) {
+			mem_size = EXT_MEM_K;
+			who = "BIOS-88";
+		} else {
+			mem_size = ALT_MEM_K;
+			who = "BIOS-e801";
+		}
+
+		e820.nr_map = 0;
+		add_memory_region(0, LOWMEMSIZE(), E820_RAM);
+		add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
+  	}
+	return who;
+}
diff -Nru a/arch/i386/mach-voyager/setup_arch_pre.h b/arch/i386/mach-voyager/setup_arch_pre.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/setup_arch_pre.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,10 @@
+#include <asm/voyager.h>
+#define VOYAGER_BIOS_INFO ((struct voyager_bios_info *)(PARAM+0x40))
+
+/* Hook to call BIOS initialisation function */
+
+/* for voyager, pass the voyager BIOS/SUS info area to the detection 
+ * routines */
+
+#define ARCH_SETUP	voyager_detect(VOYAGER_BIOS_INFO);
+
diff -Nru a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/voyager_basic.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,312 @@
+/* Copyright (C) 1999,2001 
+ *
+ * Author: J.E.J.Bottomley@HansenPartnership.com
+ *
+ * linux/arch/i386/kernel/voyager.c
+ *
+ * This file contains all the voyager specific routines for getting
+ * initialisation of the architecture to function.  For additional
+ * features see:
+ *
+ *	voyager_cat.c - Voyager CAT bus interface
+ *	voyager_smp.c - Voyager SMP hal (emulates linux smp.c)
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/sched.h>
+#include <linux/ptrace.h>
+#include <linux/ioport.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/reboot.h>
+#include <asm/io.h>
+#include <asm/pgalloc.h>
+#include <asm/voyager.h>
+#include <asm/vic.h>
+#include <linux/pm.h>
+#include <linux/irq.h>
+#include <asm/tlbflush.h>
+#include <asm/arch_hooks.h>
+
+/*
+ * Power off function, if any
+ */
+void (*pm_power_off)(void);
+
+int reboot_thru_bios;
+
+int voyager_level = 0;
+
+struct voyager_SUS *voyager_SUS = NULL;
+
+void
+voyager_detect(struct voyager_bios_info *bios)
+{
+	if(bios->len != 0xff) {
+		int class = (bios->class_1 << 8) 
+			| (bios->class_2 & 0xff);
+
+		printk("Voyager System detected.\n"
+		       "        Class %x, Revision %d.%d\n",
+		       class, bios->major, bios->minor);
+		if(class == VOYAGER_LEVEL4) 
+			voyager_level = 4;
+		else if(class < VOYAGER_LEVEL5_AND_ABOVE)
+			voyager_level = 3;
+		else
+			voyager_level = 5;
+		printk("        Architecture Level %d\n", voyager_level);
+		if(voyager_level < 4)
+			printk("\n**WARNING**: Voyager HAL only supports Levels 4 and 5 Architectures at the moment\n\n");
+		/* install the power off handler */
+		pm_power_off = voyager_power_off;
+	} else {
+		printk("\n\n**WARNING**: No Voyager Subsystem Found\n");
+	}
+}
+
+void
+voyager_system_interrupt(int cpl, void *dev_id, struct pt_regs *regs)
+{
+	printk("Voyager: detected system interrupt\n");
+}
+
+/* Routine to read information from the extended CMOS area */
+__u8
+voyager_extended_cmos_read(__u16 addr)
+{
+	outb(addr & 0xff, 0x74);
+	outb((addr >> 8) & 0xff, 0x75);
+	return inb(0x76);
+}
+
+/* internal definitions for the SUS Click Map of memory */
+
+#define CLICK_ENTRIES	16
+#define CLICK_SIZE	4096	/* click to byte conversion for Length */
+
+typedef struct ClickMap {
+	struct Entry {
+		__u32	Address;
+		__u32	Length;
+	} Entry[CLICK_ENTRIES];
+} ClickMap_t;
+
+
+/* This routine is pretty much an awful hack to read the bios clickmap by
+ * mapping it into page 0.  There are usually three regions in the map:
+ * 	Base Memory
+ * 	Extended Memory
+ *	zero length marker for end of map
+ *
+ * Returns are 0 for failure and 1 for success on extracting region.
+ */
+int __init
+voyager_memory_detect(int region, __u32 *start, __u32 *length)
+{
+	int i;
+	int retval = 0;
+	__u8 cmos[4];
+	ClickMap_t *map;
+	unsigned long map_addr;
+	unsigned long old;
+
+	if(region >= CLICK_ENTRIES) {
+		printk("Voyager: Illegal ClickMap region %d\n", region);
+		return 0;
+	}
+
+	for(i = 0; i < sizeof(cmos); i++)
+		cmos[i] = voyager_extended_cmos_read(VOYAGER_MEMORY_CLICKMAP + i);
+
+	map_addr = *(unsigned long *)cmos;
+
+	/* steal page 0 for this */
+	old = pg0[0];
+	pg0[0] = ((map_addr & PAGE_MASK) | _PAGE_RW | _PAGE_PRESENT);
+	local_flush_tlb();
+	/* now clear everything out but page 0 */
+	map = (ClickMap_t *)(map_addr & (~PAGE_MASK));
+
+	/* zero length is the end of the clickmap */
+	if(map->Entry[region].Length != 0) {
+		*length = map->Entry[region].Length * CLICK_SIZE;
+		*start = map->Entry[region].Address;
+		retval = 1;
+	}
+
+	/* replace the mapping */
+	pg0[0] = old;
+	local_flush_tlb();
+	return retval;
+}
+
+void
+voyager_dump()
+{
+	/* get here via a sysrq */
+#ifdef CONFIG_SMP
+	voyager_smp_dump();
+#endif
+}
+
+/* voyager specific handling code for timer interrupts.  Used to hand
+ * off the timer tick to the SMP code, since the VIC doesn't have an
+ * internal timer (The QIC does, but that's another story). */
+void
+voyager_timer_interrupt(struct pt_regs *regs)
+{
+	if((jiffies & 0x3ff) == 0) {
+
+		/* There seems to be something flaky in either
+		 * hardware or software that is resetting the timer 0
+		 * count to something much higher than it should be
+		 * This seems to occur in the boot sequence, just
+		 * before root is mounted.  Therefore, every 10
+		 * seconds or so, we sanity check the timer zero count
+		 * and kick it back to where it should be.
+		 *
+		 * FIXME: This is the most awful hack yet seen.  I
+		 * should work out exactly what is interfering with
+		 * the timer count settings early in the boot sequence
+		 * and swiftly introduce it to something sharp and
+		 * pointy.  */
+		__u16 val;
+		extern spinlock_t i8253_lock;
+
+		spin_lock(&i8253_lock);
+		
+		outb_p(0x00, 0x43);
+		val = inb_p(0x40);
+		val |= inb(0x40) << 8;
+		spin_unlock(&i8253_lock);
+
+		if(val > LATCH) {
+			printk("\nVOYAGER: countdown timer value too high (%d), resetting\n\n", val);
+			spin_lock(&i8253_lock);
+			outb(0x34,0x43);
+			outb_p(LATCH & 0xff , 0x40);	/* LSB */
+			outb(LATCH >> 8 , 0x40);	/* MSB */
+			spin_unlock(&i8253_lock);
+		}
+	}
+#ifdef CONFIG_SMP
+	smp_vic_timer_interrupt(regs);
+#endif
+}
+
+void
+voyager_power_off(void)
+{
+	printk("VOYAGER Power Off\n");
+
+	if(voyager_level == 5) {
+		voyager_cat_power_off();
+	} else if(voyager_level == 4) {
+		/* This doesn't apparently work on most L4 machines,
+		 * but the specs say to do this to get automatic power
+		 * off.  Unfortunately, if it doesn't power off the
+		 * machine, it ends up doing a cold restart, which
+		 * isn't really intended, so comment out the code */
+#if 0
+		int port;
+
+	  
+		/* enable the voyager Configuration Space */
+		outb((inb(VOYAGER_MC_SETUP) & 0xf0) | 0x8, 
+		     VOYAGER_MC_SETUP);
+		/* the port for the power off flag is an offset from the
+		   floating base */
+		port = (inb(VOYAGER_SSPB_RELOCATION_PORT) << 8) + 0x21;
+		/* set the power off flag */
+		outb(inb(port) | 0x1, port);
+#endif
+	}
+	/* and wait for it to happen */
+	for(;;) {
+		__asm("cli");
+		__asm("hlt");
+	}
+}
+
+/* copied from process.c */
+static inline void
+kb_wait(void)
+{
+	int i;
+
+	for (i=0; i<0x10000; i++)
+		if ((inb_p(0x64) & 0x02) == 0)
+			break;
+}
+
+void
+machine_restart(char *cmd)
+{
+	printk("Voyager Warm Restart\n");
+	kb_wait();
+
+	if(voyager_level == 5) {
+		/* write magic values to the RTC to inform system that
+		 * shutdown is beginning */
+		outb(0x8f, 0x70);
+		outb(0x5 , 0x71);
+		
+		udelay(50);
+		outb(0xfe,0x64);         /* pull reset low */
+	} else if(voyager_level == 4) {
+		__u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8;
+		__u8 basebd = inb(VOYAGER_MC_SETUP);
+		
+		outb(basebd | 0x08, VOYAGER_MC_SETUP);
+		outb(0x02, catbase + 0x21);
+	}
+	for(;;) {
+		asm("cli");
+		asm("hlt");
+	}
+}
+
+void
+mca_nmi_hook(void)
+{
+	__u8 dumpval __attribute__((unused)) = inb(0xf823);
+	__u8 swnmi __attribute__((unused)) = inb(0xf813);
+	extern void show_stack(unsigned long *);
+
+	/* FIXME: assume dump switch pressed */
+	/* check to see if the dump switch was pressed */
+	VDEBUG(("VOYAGER: dumpval = 0x%x, swnmi = 0x%x\n", dumpval, swnmi));
+	/* clear swnmi */
+	outb(0xff, 0xf813);
+	/* tell SUS to ignore dump */
+	if(voyager_level == 5 && voyager_SUS != NULL) {
+		if(voyager_SUS->SUS_mbox == VOYAGER_DUMP_BUTTON_NMI) {
+			voyager_SUS->kernel_mbox = VOYAGER_NO_COMMAND;
+			voyager_SUS->kernel_flags |= VOYAGER_OS_IN_PROGRESS;
+			udelay(1000);
+			voyager_SUS->kernel_mbox = VOYAGER_IGNORE_DUMP;
+			voyager_SUS->kernel_flags &= ~VOYAGER_OS_IN_PROGRESS;
+		}
+	}
+	printk(KERN_ERR "VOYAGER: Dump switch pressed, printing CPU%d tracebacks\n", smp_processor_id());
+	show_stack(NULL);
+	show_state();
+}
+
+
+
+void
+machine_halt(void)
+{
+	/* treat a halt like a power off */
+	machine_power_off();
+}
+
+void machine_power_off(void)
+{
+	if (pm_power_off)
+		pm_power_off();
+}
diff -Nru a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/voyager_cat.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1178 @@
+/* -*- mode: c; c-basic-offset: 8 -*- */
+
+/* Copyright (C) 1999,2001
+ *
+ * Author: J.E.J.Bottomley@HansenPartnership.com
+ *
+ * linux/arch/i386/kernel/voyager_cat.c
+ *
+ * This file contains all the logic for manipulating the CAT bus
+ * in a level 5 machine.
+ *
+ * The CAT bus is a serial configuration and test bus.  Its primary
+ * uses are to probe the initial configuration of the system and to
+ * diagnose error conditions when a system interrupt occurs.  The low
+ * level interface is fairly primitive, so most of this file consists
+ * of bit shift manipulations to send and receive packets on the
+ * serial bus */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/completion.h>
+#include <linux/sched.h>
+#include <asm/voyager.h>
+#include <asm/vic.h>
+#include <linux/ioport.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <asm/io.h>
+
+#ifdef VOYAGER_CAT_DEBUG
+#define CDEBUG(x)	printk x
+#else
+#define CDEBUG(x)
+#endif
+
+/* the CAT command port */
+#define CAT_CMD		(sspb + 0xe)
+/* the CAT data port */
+#define CAT_DATA	(sspb + 0xd)
+
+/* the internal cat functions */
+static void cat_pack(__u8 *msg, __u16 start_bit, __u8 *data, 
+		     __u16 num_bits);
+static void cat_unpack(__u8 *msg, __u16 start_bit, __u8 *data,
+		       __u16 num_bits);
+static void cat_build_header(__u8 *header, const __u16 len, 
+			     const __u16 smallest_reg_bits,
+			     const __u16 longest_reg_bits);
+static int cat_sendinst(voyager_module_t *modp, voyager_asic_t *asicp,
+			__u8 reg, __u8 op);
+static int cat_getdata(voyager_module_t *modp, voyager_asic_t *asicp,
+		       __u8 reg, __u8 *value);
+static int cat_shiftout(__u8 *data, __u16 data_bytes, __u16 header_bytes,
+			__u8 pad_bits);
+static int cat_write(voyager_module_t *modp, voyager_asic_t *asicp, __u8 reg,
+		     __u8 value);
+static int cat_read(voyager_module_t *modp, voyager_asic_t *asicp, __u8 reg,
+		    __u8 *value);
+static int cat_subread(voyager_module_t *modp, voyager_asic_t *asicp,
+		       __u16 offset, __u16 len, void *buf);
+static int cat_senddata(voyager_module_t *modp, voyager_asic_t *asicp,
+			__u8 reg, __u8 value);
+static int cat_disconnect(voyager_module_t *modp, voyager_asic_t *asicp);
+static int cat_connect(voyager_module_t *modp, voyager_asic_t *asicp);
+
+static inline const char *
+cat_module_name(int module_id)
+{
+	switch(module_id) {
+	case 0x10:
+		return "Processor Slot 0";
+	case 0x11:
+		return "Processor Slot 1";
+	case 0x12:
+		return "Processor Slot 2";
+	case 0x13:
+		return "Processor Slot 4";
+	case 0x14:
+		return "Memory Slot 0";
+	case 0x15:
+		return "Memory Slot 1";
+	case 0x18:
+		return "Primary Microchannel";
+	case 0x19:
+		return "Secondary Microchannel";
+	case 0x1a:
+		return "Power Supply Interface";
+	case 0x1c:
+		return "Processor Slot 5";
+	case 0x1d:
+		return "Processor Slot 6";
+	case 0x1e:
+		return "Processor Slot 7";
+	case 0x1f:
+		return "Processor Slot 8";
+	default:
+		return "Unknown Module";
+	}
+}
+
+static int sspb = 0;		/* stores the super port location */
+int voyager_8slot = 0;		/* set to true if a 51xx monster */
+
+voyager_module_t *voyager_cat_list;
+
+/* the I/O port assignments for the VIC and QIC */
+static struct resource vic_res = {
+	"Voyager Interrupt Controller", 0xFC00, 0xFC6F };
+static struct resource qic_res = {
+	"Quad Interrupt Controller", 0xFC70, 0xFCFF };
+
+/* This function is used to pack a data bit stream inside a message.
+ * It writes num_bits of the data buffer in msg starting at start_bit.
+ * Note: This function assumes that any unused bit in the data stream
+ * is set to zero so that the ors will work correctly */
+#define BITS_PER_BYTE 8
+static void
+cat_pack(__u8 *msg, const __u16 start_bit, __u8 *data, const __u16 num_bits)
+{
+	/* compute initial shift needed */
+	const __u16 offset = start_bit % BITS_PER_BYTE;
+	__u16 len = num_bits / BITS_PER_BYTE;
+	__u16 byte = start_bit / BITS_PER_BYTE;
+	__u16 residue = (num_bits % BITS_PER_BYTE) + offset;
+	int i;
+
+	/* adjust if we have more than a byte of residue */
+	if(residue >= BITS_PER_BYTE) {
+		residue -= BITS_PER_BYTE;
+		len++;
+	}
+
+	/* clear out the bits.  We assume here that if len==0 then
+	 * residue >= offset.  This is always true for the catbus
+	 * operations */
+	msg[byte] &= 0xff << (BITS_PER_BYTE - offset); 
+	msg[byte++] |= data[0] >> offset;
+	if(len == 0)
+		return;
+	for(i = 1; i < len; i++)
+		msg[byte++] = (data[i-1] << (BITS_PER_BYTE - offset))
+			| (data[i] >> offset);
+	if(residue != 0) {
+		__u8 mask = 0xff >> residue;
+		__u8 last_byte = data[i-1] << (BITS_PER_BYTE - offset)
+			| (data[i] >> offset);
+		
+		last_byte &= ~mask;
+		msg[byte] &= mask;
+		msg[byte] |= last_byte;
+	}
+	return;
+}
+/* unpack the data again (same arguments as cat_pack()). data buffer
+ * must be zero populated.
+ *
+ * Function: given a message string move to start_bit and copy num_bits into
+ * data (starting at bit 0 in data).
+ */
+static void
+cat_unpack(__u8 *msg, const __u16 start_bit, __u8 *data, const __u16 num_bits)
+{
+	/* compute initial shift needed */
+	const __u16 offset = start_bit % BITS_PER_BYTE;
+	__u16 len = num_bits / BITS_PER_BYTE;
+	const __u8 last_bits = num_bits % BITS_PER_BYTE;
+	__u16 byte = start_bit / BITS_PER_BYTE;
+	int i;
+
+	if(last_bits != 0)
+		len++;
+
+	/* special case: want < 8 bits from msg and we can get it from
+	 * a single byte of the msg */
+	if(len == 0 && BITS_PER_BYTE - offset >= num_bits) {
+		data[0] = msg[byte] << offset;
+		data[0] &= 0xff >> (BITS_PER_BYTE - num_bits);
+		return;
+	}
+	for(i = 0; i < len; i++) {
+		/* this annoying if has to be done just in case a read of
+		 * msg one beyond the array causes a panic */
+		if(offset != 0) {
+			data[i] = msg[byte++] << offset;
+			data[i] |= msg[byte] >> (BITS_PER_BYTE - offset);
+		}
+		else {
+			data[i] = msg[byte++];
+		}
+	}
+	/* do we need to truncate the final byte */
+	if(last_bits != 0) {
+		data[i-1] &= 0xff << (BITS_PER_BYTE - last_bits);
+	}
+	return;
+}
+
+static void
+cat_build_header(__u8 *header, const __u16 len, const __u16 smallest_reg_bits,
+		 const __u16 longest_reg_bits)
+{
+	int i;
+	__u16 start_bit = (smallest_reg_bits - 1) % BITS_PER_BYTE;
+	__u8 *last_byte = &header[len - 1];
+
+	if(start_bit == 0)
+		start_bit = 1;	/* must have at least one bit in the hdr */
+	
+	for(i=0; i < len; i++)
+		header[i] = 0;
+
+	for(i = start_bit; i > 0; i--)
+		*last_byte = ((*last_byte) << 1) + 1;
+
+}
+
+static int
+cat_sendinst(voyager_module_t *modp, voyager_asic_t *asicp, __u8 reg, __u8 op)
+{
+	__u8 parity, inst, inst_buf[4] = { 0 };
+	__u8 iseq[VOYAGER_MAX_SCAN_PATH], hseq[VOYAGER_MAX_REG_SIZE];
+	__u16 ibytes, hbytes, padbits;
+	int i;
+	
+	/* 
+	 * Parity is the parity of the register number + 1 (READ_REGISTER
+	 * and WRITE_REGISTER always add '1' to the number of bits == 1)
+	 */
+	parity = (__u8)(1 + (reg & 0x01) +
+	         ((__u8)(reg & 0x02) >> 1) +
+	         ((__u8)(reg & 0x04) >> 2) +
+	         ((__u8)(reg & 0x08) >> 3)) % 2;
+
+	inst = ((parity << 7) | (reg << 2) | op);
+
+	outb(VOYAGER_CAT_IRCYC, CAT_CMD);
+	if(!modp->scan_path_connected) {
+		if(asicp->asic_id != VOYAGER_CAT_ID) {
+			printk("**WARNING***: cat_sendinst has disconnected scan path not to CAT asic\n");
+			return 1;
+		}
+		outb(VOYAGER_CAT_HEADER, CAT_DATA);
+		outb(inst, CAT_DATA);
+		if(inb(CAT_DATA) != VOYAGER_CAT_HEADER) {
+			CDEBUG(("VOYAGER CAT: cat_sendinst failed to get CAT_HEADER\n"));
+			return 1;
+		}
+		return 0;
+	}
+	ibytes = modp->inst_bits / BITS_PER_BYTE;
+	if((padbits = modp->inst_bits % BITS_PER_BYTE) != 0) {
+		padbits = BITS_PER_BYTE - padbits;
+		ibytes++;
+	}
+	hbytes = modp->largest_reg / BITS_PER_BYTE;
+	if(modp->largest_reg % BITS_PER_BYTE)
+		hbytes++;
+	CDEBUG(("cat_sendinst: ibytes=%d, hbytes=%d\n", ibytes, hbytes));
+	/* initialise the instruction sequence to 0xff */
+	for(i=0; i < ibytes + hbytes; i++)
+		iseq[i] = 0xff;
+	cat_build_header(hseq, hbytes, modp->smallest_reg, modp->largest_reg);
+	cat_pack(iseq, modp->inst_bits, hseq, hbytes * BITS_PER_BYTE);
+	inst_buf[0] = inst;
+	inst_buf[1] = 0xFF >> (modp->largest_reg % BITS_PER_BYTE);
+	cat_pack(iseq, asicp->bit_location, inst_buf, asicp->ireg_length);
+#ifdef VOYAGER_CAT_DEBUG
+	printk("ins = 0x%x, iseq: ", inst);
+	for(i=0; i< ibytes + hbytes; i++)
+		printk("0x%x ", iseq[i]);
+	printk("\n");
+#endif
+	if(cat_shiftout(iseq, ibytes, hbytes, padbits)) {
+		CDEBUG(("VOYAGER CAT: cat_sendinst: cat_shiftout failed\n"));
+		return 1;
+	}
+	CDEBUG(("CAT SHIFTOUT DONE\n"));
+	return 0;
+}
+
+static int
+cat_getdata(voyager_module_t *modp, voyager_asic_t *asicp, __u8 reg, 
+	    __u8 *value)
+{
+	if(!modp->scan_path_connected) {
+		if(asicp->asic_id != VOYAGER_CAT_ID) {
+			CDEBUG(("VOYAGER CAT: ERROR: cat_getdata to CAT asic with scan path connected\n"));
+			return 1;
+		}
+		if(reg > VOYAGER_SUBADDRHI) 
+			outb(VOYAGER_CAT_RUN, CAT_CMD);
+		outb(VOYAGER_CAT_DRCYC, CAT_CMD);
+		outb(VOYAGER_CAT_HEADER, CAT_DATA);
+		*value = inb(CAT_DATA);
+		outb(0xAA, CAT_DATA);
+		if(inb(CAT_DATA) != VOYAGER_CAT_HEADER) {
+			CDEBUG(("cat_getdata: failed to get VOYAGER_CAT_HEADER\n"));
+			return 1;
+		}
+		return 0;
+	}
+	else {
+		__u16 sbits = modp->num_asics -1 + asicp->ireg_length;
+		__u16 sbytes = sbits / BITS_PER_BYTE;
+		__u16 tbytes;
+		__u8 string[VOYAGER_MAX_SCAN_PATH], trailer[VOYAGER_MAX_REG_SIZE];
+		__u8 padbits;
+		int i;
+		
+		outb(VOYAGER_CAT_DRCYC, CAT_CMD);
+
+		if((padbits = sbits % BITS_PER_BYTE) != 0) {
+			padbits = BITS_PER_BYTE - padbits;
+			sbytes++;
+		}
+		tbytes = asicp->ireg_length / BITS_PER_BYTE;
+		if(asicp->ireg_length % BITS_PER_BYTE)
+			tbytes++;
+		CDEBUG(("cat_getdata: tbytes = %d, sbytes = %d, padbits = %d\n",
+			tbytes,	sbytes, padbits));
+		cat_build_header(trailer, tbytes, 1, asicp->ireg_length);
+
+		
+		for(i = tbytes - 1; i >= 0; i--) {
+			outb(trailer[i], CAT_DATA);
+			string[sbytes + i] = inb(CAT_DATA);
+		}
+
+		for(i = sbytes - 1; i >= 0; i--) {
+			outb(0xaa, CAT_DATA);
+			string[i] = inb(CAT_DATA);
+		}
+		*value = 0;
+		cat_unpack(string, padbits + (tbytes * BITS_PER_BYTE) + asicp->asic_location, value, asicp->ireg_length);
+#ifdef VOYAGER_CAT_DEBUG
+		printk("value=0x%x, string: ", *value);
+		for(i=0; i< tbytes+sbytes; i++)
+			printk("0x%x ", string[i]);
+		printk("\n");
+#endif
+		
+		/* sanity check the rest of the return */
+		for(i=0; i < tbytes; i++) {
+			__u8 input = 0;
+
+			cat_unpack(string, padbits + (i * BITS_PER_BYTE), &input, BITS_PER_BYTE);
+			if(trailer[i] != input) {
+				CDEBUG(("cat_getdata: failed to sanity check rest of ret(%d) 0x%x != 0x%x\n", i, input, trailer[i]));
+				return 1;
+			}
+		}
+		CDEBUG(("cat_getdata DONE\n"));
+		return 0;
+	}
+}
+
+static int
+cat_shiftout(__u8 *data, __u16 data_bytes, __u16 header_bytes, __u8 pad_bits)
+{
+	int i;
+	
+	for(i = data_bytes + header_bytes - 1; i >= header_bytes; i--)
+		outb(data[i], CAT_DATA);
+
+	for(i = header_bytes - 1; i >= 0; i--) {
+		__u8 header = 0;
+		__u8 input;
+
+		outb(data[i], CAT_DATA);
+		input = inb(CAT_DATA);
+		CDEBUG(("cat_shiftout: returned 0x%x\n", input));
+		cat_unpack(data, ((data_bytes + i) * BITS_PER_BYTE) - pad_bits,
+			   &header, BITS_PER_BYTE);
+		if(input != header) {
+			CDEBUG(("VOYAGER CAT: cat_shiftout failed to return header 0x%x != 0x%x\n", input, header));
+			return 1;
+		}
+	}
+	return 0;
+}
+
+static int
+cat_senddata(voyager_module_t *modp, voyager_asic_t *asicp, 
+	     __u8 reg, __u8 value)
+{
+	outb(VOYAGER_CAT_DRCYC, CAT_CMD);
+	if(!modp->scan_path_connected) {
+		if(asicp->asic_id != VOYAGER_CAT_ID) {
+			CDEBUG(("VOYAGER CAT: ERROR: scan path disconnected when asic != CAT\n"));
+			return 1;
+		}
+		outb(VOYAGER_CAT_HEADER, CAT_DATA);
+		outb(value, CAT_DATA);
+		if(inb(CAT_DATA) != VOYAGER_CAT_HEADER) {
+			CDEBUG(("cat_senddata: failed to get correct header response to sent data\n"));
+			return 1;
+		}
+		if(reg > VOYAGER_SUBADDRHI) {
+			outb(VOYAGER_CAT_RUN, CAT_CMD);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			outb(VOYAGER_CAT_RUN, CAT_CMD);
+		}
+		
+		return 0;
+	}
+	else {
+		__u16 hbytes = asicp->ireg_length / BITS_PER_BYTE;
+		__u16 dbytes = (modp->num_asics - 1 + asicp->ireg_length)/BITS_PER_BYTE;
+		__u8 padbits, dseq[VOYAGER_MAX_SCAN_PATH], 
+			hseq[VOYAGER_MAX_REG_SIZE];
+		int i;
+
+		if((padbits = (modp->num_asics - 1 
+			       + asicp->ireg_length) % BITS_PER_BYTE) != 0) {
+			padbits = BITS_PER_BYTE - padbits;
+			dbytes++;
+		}
+		if(asicp->ireg_length % BITS_PER_BYTE)
+			hbytes++;
+		
+		cat_build_header(hseq, hbytes, 1, asicp->ireg_length);
+		
+		for(i = 0; i < dbytes + hbytes; i++)
+			dseq[i] = 0xff;
+		CDEBUG(("cat_senddata: dbytes=%d, hbytes=%d, padbits=%d\n",
+			dbytes, hbytes, padbits));
+		cat_pack(dseq, modp->num_asics - 1 + asicp->ireg_length,
+			 hseq, hbytes * BITS_PER_BYTE);
+		cat_pack(dseq, asicp->asic_location, &value, 
+			 asicp->ireg_length);
+#ifdef VOYAGER_CAT_DEBUG
+		printk("dseq ");
+		for(i=0; i<hbytes+dbytes; i++) {
+			printk("0x%x ", dseq[i]);
+		}
+		printk("\n");
+#endif
+		return cat_shiftout(dseq, dbytes, hbytes, padbits);
+	}
+}
+
+static int
+cat_write(voyager_module_t *modp, voyager_asic_t *asicp, __u8 reg,
+	 __u8 value)
+{
+	if(cat_sendinst(modp, asicp, reg, VOYAGER_WRITE_CONFIG))
+		return 1;
+	return cat_senddata(modp, asicp, reg, value);
+}
+
+static int
+cat_read(voyager_module_t *modp, voyager_asic_t *asicp, __u8 reg,
+	 __u8 *value)
+{
+	if(cat_sendinst(modp, asicp, reg, VOYAGER_READ_CONFIG))
+		return 1;
+	return cat_getdata(modp, asicp, reg, value);
+}
+
+static int
+cat_subaddrsetup(voyager_module_t *modp, voyager_asic_t *asicp, __u16 offset,
+		 __u16 len)
+{
+	__u8 val;
+
+	if(len > 1) {
+		/* set auto increment */
+		__u8 newval;
+		
+		if(cat_read(modp, asicp, VOYAGER_AUTO_INC_REG, &val)) {
+			CDEBUG(("cat_subaddrsetup: read of VOYAGER_AUTO_INC_REG failed\n"));
+			return 1;
+		}
+		CDEBUG(("cat_subaddrsetup: VOYAGER_AUTO_INC_REG = 0x%x\n", val));
+		newval = val | VOYAGER_AUTO_INC;
+		if(newval != val) {
+			if(cat_write(modp, asicp, VOYAGER_AUTO_INC_REG, val)) {
+				CDEBUG(("cat_subaddrsetup: write to VOYAGER_AUTO_INC_REG failed\n"));
+				return 1;
+			}
+		}
+	}
+	if(cat_write(modp, asicp, VOYAGER_SUBADDRLO, (__u8)(offset &0xff))) {
+		CDEBUG(("cat_subaddrsetup: write to SUBADDRLO failed\n"));
+		return 1;
+	}
+	if(asicp->subaddr > VOYAGER_SUBADDR_LO) {
+		if(cat_write(modp, asicp, VOYAGER_SUBADDRHI, (__u8)(offset >> 8))) {
+			CDEBUG(("cat_subaddrsetup: write to SUBADDRHI failed\n"));
+			return 1;
+		}
+		cat_read(modp, asicp, VOYAGER_SUBADDRHI, &val);
+		CDEBUG(("cat_subaddrsetup: offset = %d, hi = %d\n", offset, val));
+	}
+	cat_read(modp, asicp, VOYAGER_SUBADDRLO, &val);
+	CDEBUG(("cat_subaddrsetup: offset = %d, lo = %d\n", offset, val));
+	return 0;
+}
+		
+static int
+cat_subwrite(voyager_module_t *modp, voyager_asic_t *asicp, __u16 offset,
+	    __u16 len, void *buf)
+{
+	int i, retval;
+
+	/* FIXME: need special actions for VOYAGER_CAT_ID here */
+	if(asicp->asic_id == VOYAGER_CAT_ID) {
+		CDEBUG(("cat_subwrite: ATTEMPT TO WRITE TO CAT ASIC\n"));
+		/* FIXME -- This is supposed to be handled better
+		 * There is a problem writing to the cat asic in the
+		 * PSI.  The 30us delay seems to work, though */
+		udelay(30);
+	}
+		
+	if((retval = cat_subaddrsetup(modp, asicp, offset, len)) != 0) {
+		printk("cat_subwrite: cat_subaddrsetup FAILED\n");
+		return retval;
+	}
+	
+	if(cat_sendinst(modp, asicp, VOYAGER_SUBADDRDATA, VOYAGER_WRITE_CONFIG)) {
+		printk("cat_subwrite: cat_sendinst FAILED\n");
+		return 1;
+	}
+	for(i = 0; i < len; i++) {
+		if(cat_senddata(modp, asicp, 0xFF, ((__u8 *)buf)[i])) {
+			printk("cat_subwrite: cat_sendata element at %d FAILED\n", i);
+			return 1;
+		}
+	}
+	return 0;
+}
+static int
+cat_subread(voyager_module_t *modp, voyager_asic_t *asicp, __u16 offset,
+	    __u16 len, void *buf)
+{
+	int i, retval;
+
+	if((retval = cat_subaddrsetup(modp, asicp, offset, len)) != 0) {
+		CDEBUG(("cat_subread: cat_subaddrsetup FAILED\n"));
+		return retval;
+	}
+
+	if(cat_sendinst(modp, asicp, VOYAGER_SUBADDRDATA, VOYAGER_READ_CONFIG)) {
+		CDEBUG(("cat_subread: cat_sendinst failed\n"));
+		return 1;
+	}
+	for(i = 0; i < len; i++) {
+		if(cat_getdata(modp, asicp, 0xFF,
+			       &((__u8 *)buf)[i])) {
+			CDEBUG(("cat_subread: cat_getdata element %d failed\n", i));
+			return 1;
+		}
+	}
+	return 0;
+}
+
+
+/* buffer for storing EPROM data read in during initialisation */
+static __initdata __u8 eprom_buf[0xFFFF];
+static voyager_module_t *voyager_initial_module;
+
+/* Initialise the cat bus components.  We assume this is called by the
+ * boot cpu *after* all memory initialisation has been done (so we can
+ * use kmalloc) but before smp initialisation, so we can probe the SMP
+ * configuration and pick up necessary information.  */
+void
+voyager_cat_init(void)
+{
+	voyager_module_t **modpp = &voyager_initial_module;
+	voyager_asic_t **asicpp;
+	voyager_asic_t *qabc_asic = NULL;
+	int i, j;
+	unsigned long qic_addr = 0;
+	__u8 qabc_data[0x20];
+	__u8 num_submodules, val;
+	voyager_eprom_hdr_t *eprom_hdr = (voyager_eprom_hdr_t *)&eprom_buf[0];
+	
+	__u8 cmos[4];
+	unsigned long addr;
+	
+	/* initiallise the SUS mailbox */
+	for(i=0; i<sizeof(cmos); i++)
+		cmos[i] = voyager_extended_cmos_read(VOYAGER_DUMP_LOCATION + i);
+	addr = *(unsigned long *)cmos;
+	if((addr & 0xff000000) != 0xff000000) {
+		printk(KERN_ERR "Voyager failed to get SUS mailbox (addr = 0x%lx\n", addr);
+	} else {
+		static struct resource res;
+		
+		res.name = "voyager SUS";
+		res.start = addr;
+		res.end = addr+0x3ff;
+		
+		request_resource(&iomem_resource, &res);
+		voyager_SUS = (struct voyager_SUS *)
+			ioremap(addr, 0x400);
+		printk(KERN_NOTICE "Voyager SUS mailbox version 0x%x\n",
+		       voyager_SUS->SUS_version);
+		voyager_SUS->kernel_version = VOYAGER_MAILBOX_VERSION;
+		voyager_SUS->kernel_flags = VOYAGER_OS_HAS_SYSINT;
+	}
+
+	/* clear the processor counts */
+	voyager_extended_vic_processors = 0;
+	voyager_quad_processors = 0;
+
+
+
+	printk("VOYAGER: beginning CAT bus probe\n");
+	/* set up the SuperSet Port Block which tells us where the
+	 * CAT communication port is */
+	sspb = inb(VOYAGER_SSPB_RELOCATION_PORT) * 0x100;
+	VDEBUG(("VOYAGER DEBUG: sspb = 0x%x\n", sspb));
+
+	/* now find out if were 8 slot or normal */
+	if((inb(VIC_PROC_WHO_AM_I) & EIGHT_SLOT_IDENTIFIER)
+	   == EIGHT_SLOT_IDENTIFIER) {
+		voyager_8slot = 1;
+		printk(KERN_NOTICE "Voyager: Eight slot 51xx configuration detected\n");
+	}
+
+	for(i = VOYAGER_MIN_MODULE;
+	    i <= VOYAGER_MAX_MODULE; i++) {
+		__u8 input;
+		int asic;
+		__u16 eprom_size;
+		__u16 sp_offset;
+
+		outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT);
+		outb(i, VOYAGER_CAT_CONFIG_PORT);
+
+		/* check the presence of the module */
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		outb(VOYAGER_CAT_IRCYC, CAT_CMD);
+		outb(VOYAGER_CAT_HEADER, CAT_DATA);
+		/* stream series of alternating 1's and 0's to stimulate
+		 * response */
+		outb(0xAA, CAT_DATA);
+		input = inb(CAT_DATA);
+		outb(VOYAGER_CAT_END, CAT_CMD);
+		if(input != VOYAGER_CAT_HEADER) {
+			continue;
+		}
+		CDEBUG(("VOYAGER DEBUG: found module id 0x%x, %s\n", i,
+			cat_module_name(i)));
+		*modpp = kmalloc(sizeof(voyager_module_t), GFP_KERNEL); /*&voyager_module_storage[cat_count++];*/
+		if(*modpp == NULL) {
+			printk("**WARNING** kmalloc failure in cat_init\n");
+			continue;
+		}
+		memset(*modpp, 0, sizeof(voyager_module_t));
+		/* need temporary asic for cat_subread.  It will be
+		 * filled in correctly later */
+		(*modpp)->asic = kmalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count];*/
+		if((*modpp)->asic == NULL) {
+			printk("**WARNING** kmalloc failure in cat_init\n");
+			continue;
+		}
+		memset((*modpp)->asic, 0, sizeof(voyager_asic_t));
+		(*modpp)->asic->asic_id = VOYAGER_CAT_ID;
+		(*modpp)->asic->subaddr = VOYAGER_SUBADDR_HI;
+		(*modpp)->module_addr = i;
+		(*modpp)->scan_path_connected = 0;
+		if(i == VOYAGER_PSI) {
+			/* Exception leg for modules with no EEPROM */
+			printk("Module \"%s\"\n", cat_module_name(i));
+			continue;
+		}
+			       
+		CDEBUG(("cat_init: Reading eeprom for module 0x%x at offset %d\n", i, VOYAGER_XSUM_END_OFFSET));
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		cat_disconnect(*modpp, (*modpp)->asic);
+		if(cat_subread(*modpp, (*modpp)->asic,
+			       VOYAGER_XSUM_END_OFFSET, sizeof(eprom_size),
+			       &eprom_size)) {
+			printk("**WARNING**: Voyager couldn't read EPROM size for module 0x%x\n", i);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+		if(eprom_size > sizeof(eprom_buf)) {
+			printk("**WARNING**: Voyager insufficient size to read EPROM data, module 0x%x.  Need %d\n", i, eprom_size);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+		outb(VOYAGER_CAT_END, CAT_CMD);
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		CDEBUG(("cat_init: module 0x%x, eeprom_size %d\n", i, eprom_size));
+		if(cat_subread(*modpp, (*modpp)->asic, 0, 
+			       eprom_size, eprom_buf)) {
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+		outb(VOYAGER_CAT_END, CAT_CMD);
+		printk("Module \"%s\", version 0x%x, tracer 0x%x, asics %d\n",
+		       cat_module_name(i), eprom_hdr->version_id,
+		       *((__u32 *)eprom_hdr->tracer),  eprom_hdr->num_asics);
+		(*modpp)->ee_size = eprom_hdr->ee_size;
+		(*modpp)->num_asics = eprom_hdr->num_asics;
+		asicpp = &((*modpp)->asic);
+		sp_offset = eprom_hdr->scan_path_offset;
+		/* All we really care about are the Quad cards.  We
+                 * identify them because they are in a processor slot
+                 * and have only four asics */
+		if((i < 0x10 || (i>=0x14 && i < 0x1c) || i>0x1f)) {
+			modpp = &((*modpp)->next);
+			continue;
+		}
+		/* Now we know it's in a processor slot, does it have
+		 * a quad baseboard submodule */
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		cat_read(*modpp, (*modpp)->asic, VOYAGER_SUBMODPRESENT,
+			 &num_submodules);
+		/* lowest two bits, active low */
+		num_submodules = ~(0xfc | num_submodules);
+		CDEBUG(("VOYAGER CAT: %d submodules present\n", num_submodules));
+		if(num_submodules == 0) {
+			/* fill in the dyadic extended processors */
+			__u8 cpu = i & 0x07;
+
+			printk("Module \"%s\": Dyadic Processor Card\n",
+			       cat_module_name(i));
+			voyager_extended_vic_processors |= (1<<cpu);
+			cpu += 4;
+			voyager_extended_vic_processors |= (1<<cpu);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+
+		/* now we want to read the asics on the first submodule,
+		 * which should be the quad base board */
+
+		cat_read(*modpp, (*modpp)->asic, VOYAGER_SUBMODSELECT, &val);
+		CDEBUG(("cat_init: SUBMODSELECT value = 0x%x\n", val));
+		val = (val & 0x7c) | VOYAGER_QUAD_BASEBOARD;
+		cat_write(*modpp, (*modpp)->asic, VOYAGER_SUBMODSELECT, val);
+
+		outb(VOYAGER_CAT_END, CAT_CMD);
+			 
+
+		CDEBUG(("cat_init: Reading eeprom for module 0x%x at offset %d\n", i, VOYAGER_XSUM_END_OFFSET));
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		cat_disconnect(*modpp, (*modpp)->asic);
+		if(cat_subread(*modpp, (*modpp)->asic,
+			       VOYAGER_XSUM_END_OFFSET, sizeof(eprom_size),
+			       &eprom_size)) {
+			printk("**WARNING**: Voyager couldn't read EPROM size for module 0x%x\n", i);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+		if(eprom_size > sizeof(eprom_buf)) {
+			printk("**WARNING**: Voyager insufficient size to read EPROM data, module 0x%x.  Need %d\n", i, eprom_size);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+		outb(VOYAGER_CAT_END, CAT_CMD);
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		CDEBUG(("cat_init: module 0x%x, eeprom_size %d\n", i, eprom_size));
+		if(cat_subread(*modpp, (*modpp)->asic, 0, 
+			       eprom_size, eprom_buf)) {
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			continue;
+		}
+		outb(VOYAGER_CAT_END, CAT_CMD);
+		/* Now do everything for the QBB submodule 1 */
+		(*modpp)->ee_size = eprom_hdr->ee_size;
+		(*modpp)->num_asics = eprom_hdr->num_asics;
+		asicpp = &((*modpp)->asic);
+		sp_offset = eprom_hdr->scan_path_offset;
+		/* get rid of the dummy CAT asic and read the real one */
+		kfree((*modpp)->asic);
+		for(asic=0; asic < (*modpp)->num_asics; asic++) {
+			int j;
+			voyager_asic_t *asicp = *asicpp 
+				= kmalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count++];*/
+			voyager_sp_table_t *sp_table;
+			voyager_at_t *asic_table;
+			voyager_jtt_t *jtag_table;
+
+			if(asicp == NULL) {
+				printk("**WARNING** kmalloc failure in cat_init\n");
+				continue;
+			}
+			memset(asicp, 0, sizeof(voyager_asic_t));
+			asicpp = &(asicp->next);
+			asicp->asic_location = asic;
+			sp_table = (voyager_sp_table_t *)(eprom_buf + sp_offset);
+			asicp->asic_id = sp_table->asic_id;
+			asic_table = (voyager_at_t *)(eprom_buf + sp_table->asic_data_offset);
+			for(j=0; j<4; j++)
+				asicp->jtag_id[j] = asic_table->jtag_id[j];
+			jtag_table = (voyager_jtt_t *)(eprom_buf + asic_table->jtag_offset);
+			asicp->ireg_length = jtag_table->ireg_len;
+			asicp->bit_location = (*modpp)->inst_bits;
+			(*modpp)->inst_bits += asicp->ireg_length;
+			if(asicp->ireg_length > (*modpp)->largest_reg)
+				(*modpp)->largest_reg = asicp->ireg_length;
+			if (asicp->ireg_length < (*modpp)->smallest_reg ||
+			    (*modpp)->smallest_reg == 0)
+				(*modpp)->smallest_reg = asicp->ireg_length;
+			CDEBUG(("asic 0x%x, ireg_length=%d, bit_location=%d\n",
+				asicp->asic_id, asicp->ireg_length,
+				asicp->bit_location));
+			if(asicp->asic_id == VOYAGER_QUAD_QABC) {
+				CDEBUG(("VOYAGER CAT: QABC ASIC found\n"));
+				qabc_asic = asicp;
+			}
+			sp_offset += sizeof(voyager_sp_table_t);
+		}
+		CDEBUG(("Module inst_bits = %d, largest_reg = %d, smallest_reg=%d\n",
+			(*modpp)->inst_bits, (*modpp)->largest_reg,
+			(*modpp)->smallest_reg));
+		/* OK, now we have the QUAD ASICs set up, use them.
+		 * we need to:
+		 *
+		 * 1. Find the Memory area for the Quad CPIs.
+		 * 2. Find the Extended VIC processor
+		 * 3. Configure a second extended VIC processor (This
+		 *    cannot be done for the 51xx.
+		 * */
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		cat_connect(*modpp, (*modpp)->asic);
+		CDEBUG(("CAT CONNECTED!!\n"));
+		cat_subread(*modpp, qabc_asic, 0, sizeof(qabc_data), qabc_data);
+		qic_addr = qabc_data[5] << 8;
+		qic_addr = (qic_addr | qabc_data[6]) << 8;
+		qic_addr = (qic_addr | qabc_data[7]) << 8;
+		printk("Module \"%s\": Quad Processor Card; CPI 0x%lx, SET=0x%x\n",
+		       cat_module_name(i), qic_addr, qabc_data[8]);
+#if 0				/* plumbing fails---FIXME */
+		if((qabc_data[8] & 0xf0) == 0) {
+			/* FIXME: 32 way 8 CPU slot monster cannot be
+			 * plumbed this way---need to check for it */
+
+			printk("Plumbing second Extended Quad Processor\n");
+			/* second VIC line hardwired to Quad CPU 1 */
+			qabc_data[8] |= 0x20;
+			cat_subwrite(*modpp, qabc_asic, 8, 1, &qabc_data[8]);
+#ifdef VOYAGER_CAT_DEBUG
+			/* verify plumbing */
+			cat_subread(*modpp, qabc_asic, 8, 1, &qabc_data[8]);
+			if((qabc_data[8] & 0xf0) == 0) {
+				CDEBUG(("PLUMBING FAILED: 0x%x\n", qabc_data[8]));
+			}
+#endif
+		}
+#endif
+
+		{
+			struct resource *res = kmalloc(sizeof(struct resource),GFP_KERNEL);
+			memset(res, 0, sizeof(struct resource));
+			res->name = kmalloc(128, GFP_KERNEL);
+			sprintf((char *)res->name, "Voyager %s Quad CPI", cat_module_name(i));
+			res->start = qic_addr;
+			res->end = qic_addr + 0x3ff;
+			request_resource(&iomem_resource, res);
+		}
+
+		qic_addr = (unsigned long)ioremap(qic_addr, 0x400);
+				
+		for(j = 0; j < 4; j++) {
+			__u8 cpu;
+
+			if(voyager_8slot) {
+				/* 8 slot has a different mapping,
+				 * each slot has only one vic line, so
+				 * 1 cpu in each slot must be < 8 */
+				cpu = (i & 0x07) + j*8;
+			} else {
+				cpu = (i & 0x03) + j*4;
+			}
+			if( (qabc_data[8] & (1<<j))) {
+				voyager_extended_vic_processors |= (1<<cpu);
+			}
+			if(qabc_data[8] & (1<<(j+4)) ) {
+				/* Second SET register plumbed: Quad
+				 * card has two VIC connected CPUs.
+				 * Secondary cannot be booted as a VIC
+				 * CPU */
+				voyager_extended_vic_processors |= (1<<cpu);
+				voyager_allowed_boot_processors &= (~(1<<cpu));
+			}
+
+			voyager_quad_processors |= (1<<cpu);
+			voyager_quad_cpi_addr[cpu] = (struct voyager_qic_cpi *)
+				(qic_addr+(j<<8));
+			CDEBUG(("CPU%d: CPI address 0x%lx\n", cpu,
+				(unsigned long)voyager_quad_cpi_addr[cpu]));
+		}
+		outb(VOYAGER_CAT_END, CAT_CMD);
+
+		
+		
+		*asicpp = NULL;
+		modpp = &((*modpp)->next);
+	}
+	*modpp = NULL;
+	printk("CAT Bus Initialisation finished: extended procs 0x%x, quad procs 0x%x, allowed vic boot = 0x%x\n", voyager_extended_vic_processors, voyager_quad_processors, voyager_allowed_boot_processors);
+	request_resource(&ioport_resource, &vic_res);
+	if(voyager_quad_processors)
+		request_resource(&ioport_resource, &qic_res);
+	/* set up the front power switch */
+}
+
+int
+voyager_cat_readb(__u8 module, __u8 asic, int reg)
+{
+	return 0;
+}
+
+static int
+cat_disconnect(voyager_module_t *modp, voyager_asic_t *asicp) 
+{
+	__u8 val;
+	int err = 0;
+
+	if(!modp->scan_path_connected)
+		return 0;
+	if(asicp->asic_id != VOYAGER_CAT_ID) {
+		CDEBUG(("cat_disconnect: ASIC is not CAT\n"));
+		return 1;
+	}
+	err = cat_read(modp, asicp, VOYAGER_SCANPATH, &val);
+	if(err) {
+		CDEBUG(("cat_disconnect: failed to read SCANPATH\n"));
+		return err;
+	}
+	val &= VOYAGER_DISCONNECT_ASIC;
+	err = cat_write(modp, asicp, VOYAGER_SCANPATH, val);
+	if(err) {
+		CDEBUG(("cat_disconnect: failed to write SCANPATH\n"));
+		return err;
+	}
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	modp->scan_path_connected = 0;
+
+	return 0;
+}
+
+static int
+cat_connect(voyager_module_t *modp, voyager_asic_t *asicp) 
+{
+	__u8 val;
+	int err = 0;
+
+	if(modp->scan_path_connected)
+		return 0;
+	if(asicp->asic_id != VOYAGER_CAT_ID) {
+		CDEBUG(("cat_connect: ASIC is not CAT\n"));
+		return 1;
+	}
+
+	err = cat_read(modp, asicp, VOYAGER_SCANPATH, &val);
+	if(err) {
+		CDEBUG(("cat_connect: failed to read SCANPATH\n"));
+		return err;
+	}
+	val |= VOYAGER_CONNECT_ASIC;
+	err = cat_write(modp, asicp, VOYAGER_SCANPATH, val);
+	if(err) {
+		CDEBUG(("cat_connect: failed to write SCANPATH\n"));
+		return err;
+	}
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	modp->scan_path_connected = 1;
+
+	return 0;
+}
+
+void
+voyager_cat_power_off(void)
+{
+	/* Power the machine off by writing to the PSI over the CAT
+         * bus */
+	__u8 data;
+	voyager_module_t psi = { 0 };
+	voyager_asic_t psi_asic = { 0 };
+
+	psi.asic = &psi_asic;
+	psi.asic->asic_id = VOYAGER_CAT_ID;
+	psi.asic->subaddr = VOYAGER_SUBADDR_HI;
+	psi.module_addr = VOYAGER_PSI;
+	psi.scan_path_connected = 0;
+
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	/* Connect the PSI to the CAT Bus */
+	outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT);
+	outb(VOYAGER_PSI, VOYAGER_CAT_CONFIG_PORT);
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	cat_disconnect(&psi, &psi_asic);
+	/* Read the status */
+	cat_subread(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, 1, &data);
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	CDEBUG(("PSI STATUS 0x%x\n", data));
+	/* These two writes are power off prep and perform */
+	data = PSI_CLEAR;
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, 1, &data);
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	data = PSI_POWER_DOWN;
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, 1, &data);
+	outb(VOYAGER_CAT_END, CAT_CMD);
+}
+
+struct voyager_status voyager_status = { 0 };
+
+void
+voyager_cat_psi(__u8 cmd, __u16 reg, __u8 *data)
+{
+	voyager_module_t psi = { 0 };
+	voyager_asic_t psi_asic = { 0 };
+
+	psi.asic = &psi_asic;
+	psi.asic->asic_id = VOYAGER_CAT_ID;
+	psi.asic->subaddr = VOYAGER_SUBADDR_HI;
+	psi.module_addr = VOYAGER_PSI;
+	psi.scan_path_connected = 0;
+
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	/* Connect the PSI to the CAT Bus */
+	outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT);
+	outb(VOYAGER_PSI, VOYAGER_CAT_CONFIG_PORT);
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	cat_disconnect(&psi, &psi_asic);
+	switch(cmd) {
+	case VOYAGER_PSI_READ:
+		cat_read(&psi, &psi_asic, reg, data);
+		break;
+	case VOYAGER_PSI_WRITE:
+		cat_write(&psi, &psi_asic, reg, *data);
+		break;
+	case VOYAGER_PSI_SUBREAD:
+		cat_subread(&psi, &psi_asic, reg, 1, data);
+		break;
+	case VOYAGER_PSI_SUBWRITE:
+		cat_subwrite(&psi, &psi_asic, reg, 1, data);
+		break;
+	default:
+		printk(KERN_ERR "Voyager PSI, unrecognised command %d\n", cmd);
+		break;
+	}
+	outb(VOYAGER_CAT_END, CAT_CMD);
+}
+
+void
+voyager_cat_do_common_interrupt(void)
+{
+	/* This is caused either by a memory parity error or something
+	 * in the PSI */
+	__u8 data;
+	voyager_module_t psi = { 0 };
+	voyager_asic_t psi_asic = { 0 };
+	struct voyager_psi psi_reg;
+	int i;
+ re_read:
+	psi.asic = &psi_asic;
+	psi.asic->asic_id = VOYAGER_CAT_ID;
+	psi.asic->subaddr = VOYAGER_SUBADDR_HI;
+	psi.module_addr = VOYAGER_PSI;
+	psi.scan_path_connected = 0;
+
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	/* Connect the PSI to the CAT Bus */
+	outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT);
+	outb(VOYAGER_PSI, VOYAGER_CAT_CONFIG_PORT);
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	cat_disconnect(&psi, &psi_asic);
+	/* Read the status.  NOTE: Need to read *all* the PSI regs here
+	 * otherwise the cmn int will be reasserted */
+	for(i = 0; i < sizeof(psi_reg.regs); i++) {
+		cat_read(&psi, &psi_asic, i, &((__u8 *)&psi_reg.regs)[i]);
+	}
+	outb(VOYAGER_CAT_END, CAT_CMD);
+	if((psi_reg.regs.checkbit & 0x02) == 0) {
+		psi_reg.regs.checkbit |= 0x02;
+		cat_write(&psi, &psi_asic, 5, psi_reg.regs.checkbit);
+		printk("VOYAGER RE-READ PSI\n");
+		goto re_read;
+	}
+	outb(VOYAGER_CAT_RUN, CAT_CMD);
+	for(i = 0; i < sizeof(psi_reg.subregs); i++) {
+		/* This looks strange, but the PSI doesn't do auto increment
+		 * correctly */
+		cat_subread(&psi, &psi_asic, VOYAGER_PSI_SUPPLY_REG + i, 
+			    1, &((__u8 *)&psi_reg.subregs)[i]); 
+	}
+	outb(VOYAGER_CAT_END, CAT_CMD);
+#ifdef VOYAGER_CAT_DEBUG
+	printk("VOYAGER PSI: ");
+	for(i=0; i<sizeof(psi_reg.regs); i++)
+		printk("%02x ", ((__u8 *)&psi_reg.regs)[i]);
+	printk("\n           ");
+	for(i=0; i<sizeof(psi_reg.subregs); i++)
+		printk("%02x ", ((__u8 *)&psi_reg.subregs)[i]);
+	printk("\n");
+#endif
+	if(psi_reg.regs.intstatus & PSI_MON) {
+		/* switch off or power fail */
+
+		if(psi_reg.subregs.supply & PSI_SWITCH_OFF) {
+			if(voyager_status.switch_off) {
+				printk(KERN_ERR "Voyager front panel switch turned off again---Immediate power off!\n");
+				voyager_cat_power_off();
+				/* not reached */
+			} else {
+				printk(KERN_ERR "Voyager front panel switch turned off\n");
+				voyager_status.switch_off = 1;
+				voyager_status.request_from_kernel = 1;
+				up(&kvoyagerd_sem);
+			}
+			/* Tell the hardware we're taking care of the
+			 * shutdown, otherwise it will power the box off
+			 * within 3 seconds of the switch being pressed and,
+			 * which is much more important to us, continue to 
+			 * assert the common interrupt */
+			data = PSI_CLR_SWITCH_OFF;
+			outb(VOYAGER_CAT_RUN, CAT_CMD);
+			cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_SUPPLY_REG,
+				     1, &data);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+		} else {
+
+			VDEBUG(("Voyager ac fail reg 0x%x\n",
+				psi_reg.subregs.ACfail));
+			if((psi_reg.subregs.ACfail & AC_FAIL_STAT_CHANGE) == 0) {
+				/* No further update */
+				return;
+			}
+#if 0
+			/* Don't bother trying to find out who failed.
+			 * FIXME: This probably makes the code incorrect on
+			 * anything other than a 345x */
+			for(i=0; i< 5; i++) {
+				if( psi_reg.subregs.ACfail &(1<<i)) {
+					break;
+				}
+			}
+			printk(KERN_NOTICE "AC FAIL IN SUPPLY %d\n", i);
+#endif
+			/* DON'T do this: it shuts down the AC PSI 
+			outb(VOYAGER_CAT_RUN, CAT_CMD);
+			data = PSI_MASK_MASK | i;
+			cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_MASK,
+				     1, &data);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			*/
+			printk(KERN_ERR "Voyager AC power failure\n");
+			outb(VOYAGER_CAT_RUN, CAT_CMD);
+			data = PSI_COLD_START;
+			cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG,
+				     1, &data);
+			outb(VOYAGER_CAT_END, CAT_CMD);
+			voyager_status.power_fail = 1;
+			voyager_status.request_from_kernel = 1;
+			up(&kvoyagerd_sem);
+		}
+		
+		
+	} else if(psi_reg.regs.intstatus & PSI_FAULT) {
+		/* Major fault! */
+		printk(KERN_ERR "Voyager PSI Detected major fault, immediate power off!\n");
+		voyager_cat_power_off();
+		/* not reached */
+	} else if(psi_reg.regs.intstatus & (PSI_DC_FAIL | PSI_ALARM
+					    | PSI_CURRENT | PSI_DVM
+					    | PSI_PSCFAULT | PSI_STAT_CHG)) {
+		/* other psi fault */
+
+		printk(KERN_WARNING "Voyager PSI status 0x%x\n", data);
+		/* clear the PSI fault */
+		outb(VOYAGER_CAT_RUN, CAT_CMD);
+		cat_write(&psi, &psi_asic, VOYAGER_PSI_STATUS_REG, 0);
+		outb(VOYAGER_CAT_END, CAT_CMD);
+	}
+}
diff -Nru a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/voyager_smp.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1989 @@
+/* -*- mode: c; c-basic-offset: 8 -*- */
+
+/* Copyright (C) 1999,2001
+ *
+ * Author: J.E.J.Bottomley@HansenPartnership.com
+ *
+ * linux/arch/i386/kernel/voyager_smp.c
+ *
+ * This file provides all the same external entries as smp.c but uses
+ * the voyager hal to provide the functionality
+ */
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/kernel_stat.h>
+#include <linux/delay.h>
+#include <linux/mc146818rtc.h>
+#include <linux/cache.h>
+#include <linux/interrupt.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/bootmem.h>
+#include <linux/completion.h>
+#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>
+#include <asm/smpboot.h>
+#include <asm/desc.h>
+#include <asm/arch_hooks.h>
+
+#include <linux/irq.h>
+
+int reboot_smp = 0;
+
+/* TLB state -- visible externally, indexed physically */
+struct tlb_state cpu_tlbstate[NR_CPUS] __cacheline_aligned = {[0 ... NR_CPUS-1] = { &init_mm, 0 }};
+
+/* CPU IRQ affinity -- set to all ones initially */
+static unsigned long cpu_irq_affinity[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1]  = ~0UL };
+
+/* Set when the idlers are all forked - Set in main.c but not actually
+ * used by any other parts of the kernel */
+int smp_threads_ready = 0;
+
+/* per CPU data structure (for /proc/cpuinfo et al), visible externally
+ * indexed physically */
+struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
+
+/* Per CPU interrupt stacks */
+extern union thread_union init_irq_union;
+union thread_union *irq_stacks[NR_CPUS] __cacheline_aligned =
+	{ &init_irq_union, };
+
+/* physical ID of the CPU used to boot the system */
+unsigned char boot_cpu_id;
+
+/* The memory line addresses for the Quad CPIs */
+struct voyager_qic_cpi *voyager_quad_cpi_addr[NR_CPUS] __cacheline_aligned;
+
+/* The masks for the Extended VIC processors, filled in by cat_init */
+__u32 voyager_extended_vic_processors = 0;
+
+/* Masks for the extended Quad processors which cannot be VIC booted */
+__u32 voyager_allowed_boot_processors = 0;
+
+/* The mask for the Quad Processors (both extended and non-extended) */
+__u32 voyager_quad_processors = 0;
+
+/* Total count of live CPUs, used in process.c to display
+ * the CPU information and in irq.c for the per CPU irq
+ * activity count.  Finally exported by i386_ksyms.c */
+static int voyager_extended_cpus = 1;
+
+/* Have we found an SMP box - used by time.c to do the profiling
+   interrupt for timeslicing; do not set to 1 until the per CPU timer
+   interrupt is active */
+int smp_found_config = 0;
+
+/* Used for the invalidate map that's also checked in the spinlock */
+volatile unsigned long smp_invalidate_needed;
+
+/* Bitmask of currently online CPUs - used by setup.c for
+   /proc/cpuinfo, visible externally but still physical */
+unsigned long cpu_online_map = 0;
+
+/* Bitmask of CPUs present in the system - exported by i386_syms.c, used
+ * by scheduler but indexed physically */
+unsigned long phys_cpu_present_map = 0;
+
+/* estimate of time used to flush the SMP-local cache - used in
+ * processor affinity calculations */
+cycles_t cacheflush_time = 0;
+
+/* cache decay ticks for scheduler---a fairly useless quantity for the
+   voyager system with its odd affinity and huge L3 cache */
+unsigned long cache_decay_ticks = 20;
+
+
+/* The internal functions */
+static void send_CPI(__u32 cpuset, __u8 cpi);
+static void ack_CPI(__u8 cpi);
+static int ack_QIC_CPI(__u8 cpi);
+static void ack_special_QIC_CPI(__u8 cpi);
+static void ack_VIC_CPI(__u8 cpi);
+static void send_CPI_allbutself(__u8 cpi);
+static void enable_vic_irq(unsigned int irq);
+static void disable_vic_irq(unsigned int irq);
+static unsigned int startup_vic_irq(unsigned int irq);
+static void enable_local_vic_irq(unsigned int irq);
+static void disable_local_vic_irq(unsigned int irq);
+static void before_handle_vic_irq(unsigned int irq);
+static void after_handle_vic_irq(unsigned int irq);
+static void set_vic_irq_affinity(unsigned int irq, unsigned long mask);
+static void ack_vic_irq(unsigned int irq);
+static void vic_enable_cpi(void);
+static void do_boot_cpu(__u8 cpuid);
+static void do_quad_bootstrap(void);
+static inline void wrapper_smp_local_timer_interrupt(struct pt_regs *);
+
+int hard_smp_processor_id(void);
+
+/* Inline functions */
+static inline void
+send_one_QIC_CPI(__u8 cpu, __u8 cpi)
+{
+	voyager_quad_cpi_addr[cpu]->qic_cpi[cpi].cpi =
+		(smp_processor_id() << 16) + cpi;
+}
+
+static inline void
+send_QIC_CPI(__u32 cpuset, __u8 cpi)
+{
+	int mask;
+	__u8 cpu;
+
+	for_each_cpu(cpu, mask) {
+		if(cpuset & (1<<cpu)) {
+#ifdef VOYAGER_DEBUG
+			if(!test_bit(cpu, cpu_online_map))
+				VDEBUG(("CPU%d sending cpi %d to CPU%d not in cpu_online_map\n", hard_smp_processor_id(), cpi, cpu));
+#endif
+			send_one_QIC_CPI(cpu, cpi - QIC_CPI_OFFSET);
+		}
+	}
+}
+
+static inline void
+send_one_CPI(__u8 cpu, __u8 cpi)
+{
+	if(voyager_quad_processors & (1<<cpu))
+		send_one_QIC_CPI(cpu, cpi - QIC_CPI_OFFSET);
+	else
+		send_CPI(1<<cpu, cpi);
+}
+
+static inline void
+send_CPI_allbutself(__u8 cpi)
+{
+	__u8 cpu = smp_processor_id();
+	__u32 mask = (cpu_online_map & (~(1<<cpu)));
+	send_CPI(mask, cpi);
+}
+
+static inline int
+is_cpu_quad(void)
+{
+	__u8 cpumask = inb(VIC_PROC_WHO_AM_I);
+	return ((cpumask & QUAD_IDENTIFIER) == QUAD_IDENTIFIER);
+}
+
+static inline int
+is_cpu_extended(void)
+{
+	__u8 cpu = hard_smp_processor_id();
+
+	return(voyager_extended_vic_processors & (1<<cpu));
+}
+
+static inline int
+is_cpu_vic_boot(void)
+{
+	__u8 cpu = hard_smp_processor_id();
+
+	return(voyager_extended_vic_processors
+	       & voyager_allowed_boot_processors & (1<<cpu));
+}
+
+
+static inline void
+ack_CPI(__u8 cpi)
+{
+	switch(cpi) {
+	case VIC_CPU_BOOT_CPI:
+		if(is_cpu_quad() && !is_cpu_vic_boot())
+			ack_QIC_CPI(cpi);
+		else
+			ack_VIC_CPI(cpi);
+		break;
+	case VIC_SYS_INT:
+	case VIC_CMN_INT: 
+		/* These are slightly strange.  Even on the Quad card,
+		 * They are vectored as VIC CPIs */
+		if(is_cpu_quad())
+			ack_special_QIC_CPI(cpi);
+		else
+			ack_VIC_CPI(cpi);
+		break;
+	default:
+		printk("VOYAGER ERROR: CPI%d is in common CPI code\n", cpi);
+		break;
+	}
+}
+
+/* local variables */
+
+/* The VIC IRQ descriptors -- these look almost identical to the
+ * 8259 IRQs except that masks and things must be kept per processor
+ */
+static struct hw_interrupt_type vic_irq_type = {
+	"VIC-level",
+	startup_vic_irq,	/* startup */
+	disable_vic_irq,	/* shutdown */
+	enable_vic_irq,		/* enable */
+	disable_vic_irq,	/* disable */
+	before_handle_vic_irq,	/* ack */
+	after_handle_vic_irq,	/* end */
+	set_vic_irq_affinity,	/* affinity */
+};
+
+/* used to count up as CPUs are brought on line (starts at 0) */
+static int cpucount = 0;
+
+/* steal a page from the bottom of memory for the trampoline and
+ * squirrel its address away here.  This will be in kernel virtual
+ * space */
+static __u32 trampoline_base;
+
+/* The per cpu profile stuff - used in smp_local_timer_interrupt */
+static unsigned int prof_multiplier[NR_CPUS] __cacheline_aligned = { 1, };
+static unsigned int prof_old_multiplier[NR_CPUS] __cacheline_aligned = { 1, };
+static unsigned int prof_counter[NR_CPUS] __cacheline_aligned = { 1, };
+
+/* the map used to check if a CPU has booted */
+static __u32 cpu_booted_map;
+
+/* the synchronize flag used to hold all secondary CPUs spinning in
+ * a tight loop until the boot sequence is ready for them */
+static unsigned long smp_commenced_mask = 0;
+
+/* This is for the new dynamic CPU boot code */
+volatile unsigned long cpu_callin_map = 0;
+unsigned long cpu_callout_map = 0;
+
+/* The per processor IRQ masks (these are usually kept in sync) */
+static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned;
+
+/* the list of IRQs to be enabled by the VIC_ENABLE_IRQ_CPI */
+static __u16 vic_irq_enable_mask[NR_CPUS] __cacheline_aligned = { 0 };
+
+/* Lock for enable/disable of VIC interrupts */
+static spinlock_t vic_irq_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+
+/* The boot processor is correctly set up in PC mode when it 
+ * comes up, but the secondaries need their master/slave 8259
+ * pairs initializing correctly */
+
+/* Interrupt counters (per cpu) and total - used to try to
+ * even up the interrupt handling routines */
+static long vic_intr_total = 0;
+static long vic_intr_count[NR_CPUS] __cacheline_aligned = { 0 };
+static unsigned long vic_tick[NR_CPUS] __cacheline_aligned = { 0 };
+
+/* Since we can only use CPI0, we fake all the other CPIs */
+static unsigned long vic_cpi_mailbox[NR_CPUS] __cacheline_aligned;
+
+/* debugging routine to read the isr of the cpu's pic */
+static inline __u16
+vic_read_isr(void)
+{
+	__u16 isr;
+
+	outb(0x0b, 0xa0);
+	isr = inb(0xa0) << 8;
+	outb(0x0b, 0x20);
+	isr |= inb(0x20);
+
+	return isr;
+}
+
+static __init void
+qic_setup(void)
+{
+	if(!is_cpu_quad()) {
+		/* not a quad, no setup */
+		return;
+	}
+	outb(QIC_DEFAULT_MASK0, QIC_MASK_REGISTER0);
+	outb(QIC_CPI_ENABLE, QIC_MASK_REGISTER1);
+	
+	if(is_cpu_extended()) {
+		/* the QIC duplicate of the VIC base register */
+		outb(VIC_DEFAULT_CPI_BASE, QIC_VIC_CPI_BASE_REGISTER);
+		outb(QIC_DEFAULT_CPI_BASE, QIC_CPI_BASE_REGISTER);
+
+		/* FIXME: should set up the QIC timer and memory parity
+		 * error vectors here */
+	}
+}
+
+static __init void
+vic_setup_pic(void)
+{
+	outb(1, VIC_REDIRECT_REGISTER_1);
+	/* clear the claim registers for dynamic routing */
+	outb(0, VIC_CLAIM_REGISTER_0);
+	outb(0, VIC_CLAIM_REGISTER_1);
+
+	outb(0, VIC_PRIORITY_REGISTER);
+	/* Set the Primary and Secondary Microchannel vector
+	 * bases to be the same as the ordinary interrupts
+	 *
+	 * FIXME: This would be more efficient using separate
+	 * vectors. */
+	outb(FIRST_EXTERNAL_VECTOR, VIC_PRIMARY_MC_BASE);
+	outb(FIRST_EXTERNAL_VECTOR, VIC_SECONDARY_MC_BASE);
+	/* Now initiallise the master PIC belonging to this CPU by
+	 * sending the four ICWs */
+
+	/* ICW1: level triggered, ICW4 needed */
+	outb(0x19, 0x20);
+
+	/* ICW2: vector base */
+	outb(FIRST_EXTERNAL_VECTOR, 0x21);
+
+	/* ICW3: slave at line 2 */
+	outb(0x04, 0x21);
+
+	/* ICW4: 8086 mode */
+	outb(0x01, 0x21);
+
+	/* now the same for the slave PIC */
+
+	/* ICW1: level trigger, ICW4 needed */
+	outb(0x19, 0xA0);
+
+	/* ICW2: slave vector base */
+	outb(FIRST_EXTERNAL_VECTOR + 8, 0xA1);
+	
+	/* ICW3: slave ID */
+	outb(0x02, 0xA1);
+
+	/* ICW4: 8086 mode */
+	outb(0x01, 0xA1);
+}
+
+static void
+do_quad_bootstrap(void)
+{
+	if(is_cpu_quad() && is_cpu_vic_boot()) {
+		int i;
+		unsigned long flags;
+		__u8 cpuid = hard_smp_processor_id();
+
+		local_irq_save(flags);
+
+		for(i = 0; i<4; i++) {
+			/* FIXME: this would be >>3 &0x7 on the 32 way */
+			if(((cpuid >> 2) & 0x03) == i)
+				/* don't lower our own mask! */
+				continue;
+
+			/* masquerade as local Quad CPU */
+			outb(QIC_CPUID_ENABLE | i, QIC_PROCESSOR_ID);
+			/* enable the startup CPI */
+			outb(QIC_BOOT_CPI_MASK, QIC_MASK_REGISTER1);
+			/* restore cpu id */
+			outb(0, QIC_PROCESSOR_ID);
+		}
+		local_irq_restore(flags);
+	}
+}
+
+
+/* Set up all the basic stuff: read the SMP config and make all the
+ * SMP information reflect only the boot cpu.  All others will be
+ * brought on-line later. */
+void __init 
+find_smp_config(void)
+{
+	int i;
+
+	boot_cpu_id = hard_smp_processor_id();
+
+	printk("VOYAGER SMP: Boot cpu is %d\n", boot_cpu_id);
+
+	/* initialize the CPU structures (moved from smp_boot_cpus) */
+	for(i=0; i<NR_CPUS; i++) {
+		prof_counter[i] = 1;
+		prof_old_multiplier[i] = 1;
+		prof_multiplier[i] = 1;
+		cpu_irq_affinity[i] = ~0;
+	}
+	cpu_online_map = (1<<boot_cpu_id);
+
+	/* The boot CPU must be extended */
+	voyager_extended_vic_processors = 1<<boot_cpu_id;
+	/* initially, all of the first 8 cpu's can boot */
+	voyager_allowed_boot_processors = 0xff;
+	/* 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 = voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK);
+	phys_cpu_present_map |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8;
+	phys_cpu_present_map |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 2) << 16;
+	phys_cpu_present_map |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 3) << 24;
+	printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", phys_cpu_present_map);
+	/* 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);
+	outb(1, VIC_REDIRECT_REGISTER_1);
+	/* set the claim registers for static routing --- Boot CPU gets
+	 * all interrupts untill all other CPUs started */
+	outb(0xff, VIC_CLAIM_REGISTER_0);
+	outb(0xff, VIC_CLAIM_REGISTER_1);
+	/* Set the Primary and Secondary Microchannel vector
+	 * bases to be the same as the ordinary interrupts
+	 *
+	 * FIXME: This would be more efficient using separate
+	 * vectors. */
+	outb(FIRST_EXTERNAL_VECTOR, VIC_PRIMARY_MC_BASE);
+	outb(FIRST_EXTERNAL_VECTOR, VIC_SECONDARY_MC_BASE);
+
+	/* Finally tell the firmware that we're driving */
+	outb(inb(VOYAGER_SUS_IN_CONTROL_PORT) | VOYAGER_IN_CONTROL_FLAG,
+	     VOYAGER_SUS_IN_CONTROL_PORT);
+
+	current_thread_info()->cpu = boot_cpu_id;
+}
+
+/*
+ *	The bootstrap kernel entry code has set these up. Save them
+ *	for a given CPU, id is physical */
+void __init
+smp_store_cpu_info(int id)
+{
+	struct cpuinfo_x86 *c=&cpu_data[id];
+
+	*c = boot_cpu_data;
+	identify_cpu(c);
+}
+
+/* set up the trampoline and return the physical address of the code */
+static __u32 __init
+setup_trampoline(void)
+{
+	/* these two are global symbols in trampoline.S */
+	extern __u8 trampoline_end[];
+	extern __u8 trampoline_data[];
+
+	memcpy((__u8 *)trampoline_base, trampoline_data,
+	       trampoline_end - trampoline_data);
+	return virt_to_phys((__u8 *)trampoline_base);
+}
+
+/* Routine initially called when a non-boot CPU is brought online */
+int __init
+start_secondary(void *unused)
+{
+	__u8 cpuid = hard_smp_processor_id();
+	/* external functions not defined in the headers */
+	extern void calibrate_delay(void);
+	extern int cpu_idle(void);
+
+	cpu_init();
+
+	/* OK, we're in the routine */
+	ack_CPI(VIC_CPU_BOOT_CPI);
+
+	/* setup the 8259 master slave pair belonging to this CPU ---
+         * we won't actually receive any until the boot CPU
+         * relinquishes it's static routing mask */
+	vic_setup_pic();
+
+	qic_setup();
+
+	if(is_cpu_quad() && !is_cpu_vic_boot()) {
+		/* clear the boot CPI */
+		__u8 dummy;
+
+		dummy = voyager_quad_cpi_addr[cpuid]->qic_cpi[VIC_CPU_BOOT_CPI].cpi;
+		printk("read dummy %d\n", dummy);
+	}
+
+	/* lower the mask to receive CPIs */
+	vic_enable_cpi();
+
+	VDEBUG(("VOYAGER SMP: CPU%d, stack at about %p\n", cpuid, &cpuid));
+
+	/* enable interrupts */
+	local_irq_enable();
+
+	/* get our bogomips */
+	calibrate_delay();
+
+	/* save our processor parameters */
+	smp_store_cpu_info(cpuid);
+
+	/* if we're a quad, we may need to bootstrap other CPUs */
+	do_quad_bootstrap();
+
+	set_bit(cpuid, &cpu_callin_map);
+
+	/* signal that we're done */
+	cpu_booted_map = 1;
+
+	while (!test_bit(cpuid, &smp_commenced_mask))
+		rep_nop();
+
+	local_flush_tlb();
+
+	set_bit(cpuid, &cpu_online_map);
+	wmb();
+	return cpu_idle();
+}
+
+static struct task_struct * __init
+fork_by_hand(void)
+{
+	struct pt_regs regs;
+	/* don't care about the eip and regs settings since we'll
+	 * never reschedule the forked task. */
+	return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL);
+}
+
+
+static void __init setup_irq_stack(struct task_struct *p, int cpu)
+{
+	unsigned long stk;
+
+	stk = __get_free_pages(GFP_KERNEL, THREAD_ORDER+1);
+	if (!stk)
+		panic("I can't seem to allocate my irq stack.  Oh well, giving up.");
+
+	irq_stacks[cpu] = (void *)stk;
+	memset(irq_stacks[cpu], 0, THREAD_SIZE);
+	irq_stacks[cpu]->thread_info.cpu = cpu;
+	irq_stacks[cpu]->thread_info.preempt_count = 1;
+					/* interrupts are not preemptable */
+	p->thread_info->irq_stack = irq_stacks[cpu];
+
+	/* If we want to make the irq stack more than one unit
+	 * deep, we can chain then off of the irq_stack pointer
+	 * here.
+	 */
+}
+
+
+/* Routine to kick start the given CPU and wait for it to report ready
+ * (or timeout in startup).  When this routine returns, the requested
+ * CPU is either fully running and configured or known to be dead.
+ *
+ * We call this routine sequentially 1 CPU at a time, so no need for
+ * locking */
+
+static void __init
+do_boot_cpu(__u8 cpu)
+{
+	struct task_struct *idle;
+	int timeout;
+	unsigned long flags;
+	int quad_boot = (1<<cpu) & voyager_quad_processors 
+		& ~( voyager_extended_vic_processors
+		     & voyager_allowed_boot_processors);
+
+	/* For the 486, we can't use the 4Mb page table trick, so
+	 * must map a region of memory */
+#ifdef CONFIG_M486
+	int i;
+	unsigned long *page_table_copies = (unsigned long *)
+		__get_free_page(GFP_KERNEL);
+#endif
+	pgd_t orig_swapper_pg_dir0;
+
+	/* This is an area in head.S which was used to set up the
+	 * initial kernel stack.  We need to alter this to give the
+	 * booting CPU a new stack (taken from its idle process) */
+	extern struct {
+		__u8 *esp;
+		unsigned short ss;
+	} stack_start;
+	/* This is the format of the CPI IDT gate (in real mode) which
+	 * we're hijacking to boot the CPU */
+	union 	IDTFormat {
+		struct seg {
+			__u16	Offset;
+			__u16	Segment;
+		} idt;
+		__u32 val;
+	} hijack_source;
+
+	__u32 *hijack_vector;
+	__u32 start_phys_address = setup_trampoline();
+
+	/* There's a clever trick to this: The linux trampoline is
+	 * compiled to begin at absolute location zero, so make the
+	 * address zero but have the data segment selector compensate
+	 * for the actual address */
+	hijack_source.idt.Offset = start_phys_address & 0x000F;
+	hijack_source.idt.Segment = (start_phys_address >> 4) & 0xFFFF;
+
+	cpucount++;
+	idle = fork_by_hand();
+	if(IS_ERR(idle))
+		panic("failed fork for CPU%d", cpu);
+
+	setup_irq_stack(idle, cpu);
+
+	init_idle(idle, cpu);
+
+	idle->thread.eip = (unsigned long) start_secondary;
+	unhash_process(idle);
+
+	/* The -4 is to correct for the fact that the stack pointer
+	 * is used to find the location of the thread_info structure
+	 * by masking off several of the LSBs.  Without the -4, esp
+	 * is pointing to the page after the one the stack is on.
+	 */
+	stack_start.esp = (void *)(THREAD_SIZE - 4 + (char *)idle->thread_info);
+
+	/* Note: Don't modify initial ss override */
+	VDEBUG(("VOYAGER SMP: Booting CPU%d at 0x%lx[%x:%x], stack %p\n", cpu, 
+		(unsigned long)hijack_source.val, hijack_source.idt.Segment,
+		hijack_source.idt.Offset, stack_start.esp));
+	/* set the original swapper_pg_dir[0] to map 0 to 4Mb transparently
+	 * (so that the booting CPU can find start_32 */
+	orig_swapper_pg_dir0 = swapper_pg_dir[0];
+#ifdef CONFIG_M486
+	if(page_table_copies == NULL)
+		panic("No free memory for 486 page tables\n");
+	for(i = 0; i < PAGE_SIZE/sizeof(unsigned long); i++)
+		page_table_copies[i] = (i * PAGE_SIZE) 
+			| _PAGE_RW | _PAGE_USER | _PAGE_PRESENT;
+
+	((unsigned long *)swapper_pg_dir)[0] = 
+		((virt_to_phys(page_table_copies)) & PAGE_MASK)
+		| _PAGE_RW | _PAGE_USER | _PAGE_PRESENT;
+#else
+	((unsigned long *)swapper_pg_dir)[0] = 0x102007;
+#endif
+
+	if(quad_boot) {
+		printk("CPU %d: non extended Quad boot\n", cpu);
+		hijack_vector = (__u32 *)phys_to_virt((VIC_CPU_BOOT_CPI + QIC_DEFAULT_CPI_BASE)*4);
+		*hijack_vector = hijack_source.val;
+	} else {
+		printk("CPU%d: extended VIC boot\n", cpu);
+		hijack_vector = (__u32 *)phys_to_virt((VIC_CPU_BOOT_CPI + VIC_DEFAULT_CPI_BASE)*4);
+		*hijack_vector = hijack_source.val;
+		/* VIC errata, may also receive interrupt at this address */
+		hijack_vector = (__u32 *)phys_to_virt((VIC_CPU_BOOT_ERRATA_CPI + VIC_DEFAULT_CPI_BASE)*4);
+		*hijack_vector = hijack_source.val;
+	}
+	/* All non-boot CPUs start with interrupts fully masked.  Need
+	 * to lower the mask of the CPI we're about to send.  We do
+	 * this in the VIC by masquerading as the processor we're
+	 * about to boot and lowering its interrupt mask */
+	local_irq_save(flags);
+	if(quad_boot) {
+		send_one_QIC_CPI(cpu, VIC_CPU_BOOT_CPI);
+	} else {
+		outb(VIC_CPU_MASQUERADE_ENABLE | cpu, VIC_PROCESSOR_ID);
+		/* here we're altering registers belonging to `cpu' */
+		
+		outb(VIC_BOOT_INTERRUPT_MASK, 0x21);
+		/* now go back to our original identity */
+		outb(boot_cpu_id, VIC_PROCESSOR_ID);
+
+		/* and boot the CPU */
+
+		send_CPI((1<<cpu), VIC_CPU_BOOT_CPI);
+	}
+	cpu_booted_map = 0;
+	local_irq_restore(flags);
+
+	/* now wait for it to become ready (or timeout) */
+	for(timeout = 0; timeout < 50000; timeout++) {
+		if(cpu_booted_map)
+			break;
+		udelay(100);
+	}
+	/* reset the page table */
+	swapper_pg_dir[0] = orig_swapper_pg_dir0;
+	local_flush_tlb();
+#ifdef CONFIG_M486
+	free_page((unsigned long)page_table_copies);
+#endif
+	  
+	if(cpu_booted_map) {
+		VDEBUG(("CPU%d: Booted successfully, back in CPU %d\n",
+			cpu, smp_processor_id()));
+	
+		printk("CPU%d: ", cpu);
+		print_cpu_info(&cpu_data[cpu]);
+		wmb();
+		set_bit(cpu, &cpu_callout_map);
+	}
+	else {
+		printk("CPU%d FAILED TO BOOT: ", cpu);
+		if (*((volatile unsigned char *)phys_to_virt(start_phys_address))==0xA5)
+			printk("Stuck.\n");
+		else
+			printk("Not responding.\n");
+		
+		cpucount--;
+	}
+}
+
+void __init
+smp_boot_cpus(void)
+{
+	int i;
+
+	/* CAT BUS initialisation must be done after the memory */
+	/* FIXME: The L4 has a catbus too, it just needs to be
+	 * accessed in a totally different way */
+	if(voyager_level == 5) {
+		voyager_cat_init();
+
+		/* now that the cat has probed the Voyager System Bus, sanity
+		 * check the cpu map */
+		if( ((voyager_quad_processors | voyager_extended_vic_processors)
+		     & phys_cpu_present_map) != phys_cpu_present_map) {
+			/* should panic */
+			printk("\n\n***WARNING*** Sanity check of CPU present map FAILED\n");
+		}
+	} else if(voyager_level == 4) {
+		voyager_extended_vic_processors = phys_cpu_present_map;
+	}
+
+	/* this sets up the idle task to run on the current cpu */
+	voyager_extended_cpus = 1;
+	/* Remove the global_irq_holder setting, it triggers a BUG() on
+	 * schedule at the moment */
+	//global_irq_holder = boot_cpu_id;
+
+	/* FIXME: Need to do something about this but currently only works
+	 * on CPUs with a tsc which none of mine have. 
+	smp_tune_scheduling();
+	 */
+	smp_store_cpu_info(boot_cpu_id);
+	printk("CPU%d: ", boot_cpu_id);
+	print_cpu_info(&cpu_data[boot_cpu_id]);
+
+	if(is_cpu_quad()) {
+		/* booting on a Quad CPU */
+		printk("VOYAGER SMP: Boot CPU is Quad\n");
+		qic_setup();
+		do_quad_bootstrap();
+	}
+
+	/* enable our own CPIs */
+	vic_enable_cpi();
+	
+	/* loop over all the extended VIC CPUs and boot them.  The 
+	 * Quad CPUs must be bootstrapped by their extended VIC cpu */
+	for(i = 0; i < NR_CPUS; i++) {
+		if( i == boot_cpu_id || ((1<<i) & (phys_cpu_present_map) ) == 0)
+			continue;
+		do_boot_cpu(i);
+		/* This udelay seems to be needed for the Quad boots
+		 * don't remove unless you know what you're doing */
+		udelay(1000);
+	}
+	/* we could compute the total bogomips here, but why bother?,
+	 * Code added from smpboot.c */
+	{
+		unsigned long bogosum = 0;
+		for (i = 0; i < NR_CPUS; i++)
+			if (cpu_online_map & (1<<i))
+				bogosum += cpu_data[i].loops_per_jiffy;
+		printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
+			cpucount+1,
+			bogosum/(500000/HZ),
+			(bogosum/(5000/HZ))%100);
+	}
+	voyager_extended_cpus = hweight32(voyager_extended_vic_processors);
+	printk("VOYAGER: Extended (interrupt handling CPUs): %d, non-extended: %d\n", voyager_extended_cpus, num_booting_cpus() - voyager_extended_cpus);
+	/* that's it, switch to symmetric mode */
+	outb(0, VIC_PRIORITY_REGISTER);
+	outb(0, VIC_CLAIM_REGISTER_0);
+	outb(0, VIC_CLAIM_REGISTER_1);
+	
+	VDEBUG(("VOYAGER SMP: Booted with %d CPUs\n", num_booting_cpus()));
+}
+
+/* Reload the secondary CPUs task structure (this function does not
+ * return ) */
+void __init 
+initialize_secondary(void)
+{
+#if 0
+	// AC kernels only
+	set_current(hard_get_current());
+#endif
+
+	/*
+	 * We don't actually need to load the full TSS,
+	 * basically just the stack pointer and the eip.
+	 */
+
+	asm volatile(
+		"movl %0,%%esp\n\t"
+		"jmp *%1"
+		:
+		:"r" (current->thread.esp),"r" (current->thread.eip));
+}
+
+/* handle a Voyager SYS_INT -- If we don't, the base board will
+ * panic the system.
+ *
+ * System interrupts occur because some problem was detected on the
+ * various busses.  To find out what you have to probe all the
+ * hardware via the CAT bus.  FIXME: At the moment we do nothing. */
+asmlinkage void
+smp_vic_sys_interrupt(void)
+{
+	ack_CPI(VIC_SYS_INT);
+	printk("Voyager SYSTEM INTERRUPT\n");
+}
+
+/* Handle a voyager CMN_INT; These interrupts occur either because of
+ * a system status change or because a single bit memory error
+ * occurred.  FIXME: At the moment, ignore all this. */
+asmlinkage void
+smp_vic_cmn_interrupt(void)
+{
+	static __u8 in_cmn_int = 0;
+	static spinlock_t cmn_int_lock = SPIN_LOCK_UNLOCKED;
+
+	/* common ints are broadcast, so make sure we only do this once */
+	_raw_spin_lock(&cmn_int_lock);
+	if(in_cmn_int)
+		goto unlock_end;
+
+	in_cmn_int++;
+	_raw_spin_unlock(&cmn_int_lock);
+
+	VDEBUG(("Voyager COMMON INTERRUPT\n"));
+
+	if(voyager_level == 5)
+		voyager_cat_do_common_interrupt();
+
+	_raw_spin_lock(&cmn_int_lock);
+	in_cmn_int = 0;
+ unlock_end:
+	_raw_spin_unlock(&cmn_int_lock);
+	ack_CPI(VIC_CMN_INT);
+}
+
+/*
+ * Reschedule call back. Nothing to do, all the work is done
+ * automatically when we return from the interrupt.  */
+asmlinkage void
+smp_reschedule_interrupt(void)
+{
+	/* do nothing */
+}
+
+static struct mm_struct * flush_mm;
+static unsigned long flush_va;
+static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+#define FLUSH_ALL	0xffffffff
+
+/*
+ * We cannot call mmdrop() because we are in interrupt context, 
+ * instead update mm->cpu_vm_mask.
+ *
+ * We need to reload %cr3 since the page tables may be going
+ * away from under us..
+ */
+static void inline 
+leave_mm (unsigned long cpu)
+{
+	if (cpu_tlbstate[cpu].state == TLBSTATE_OK)
+		BUG();
+	clear_bit(cpu,  &cpu_tlbstate[cpu].active_mm->cpu_vm_mask);
+	load_cr3(swapper_pg_dir);
+}
+
+
+/*
+ * Invalidate call-back
+ */
+asmlinkage void 
+smp_invalidate_interrupt(void)
+{
+	__u8 cpu = get_cpu();
+
+	if(!test_bit(cpu, &smp_invalidate_needed))
+		goto out;
+	/* This will flood messages.  Don't uncomment unless you see
+	 * Problems with cross cpu invalidation
+	VDEBUG(("VOYAGER SMP: CPU%d received INVALIDATE_CPI\n",
+		smp_processor_id()));
+	*/
+
+	if (flush_mm == cpu_tlbstate[cpu].active_mm) {
+		if (cpu_tlbstate[cpu].state == TLBSTATE_OK) {
+			if (flush_va == FLUSH_ALL)
+				local_flush_tlb();
+			else
+				__flush_tlb_one(flush_va);
+		} else
+			leave_mm(cpu);
+	}
+	clear_bit(cpu, &smp_invalidate_needed);
+ out:
+	put_cpu_no_resched();
+}
+
+/* All the new flush operations for 2.4 */
+
+
+/* This routine is called with a physical cpu mask */
+static void
+flush_tlb_others (unsigned long cpumask, struct mm_struct *mm,
+						unsigned long va)
+{
+	int stuck = 50000;
+
+	if (!cpumask)
+		BUG();
+	if ((cpumask & cpu_online_map) != cpumask)
+		BUG();
+	if (cpumask & (1 << smp_processor_id()))
+		BUG();
+	if (!mm)
+		BUG();
+
+	spin_lock(&tlbstate_lock);
+	
+	flush_mm = mm;
+	flush_va = va;
+	atomic_set_mask(cpumask, &smp_invalidate_needed);
+	/*
+	 * We have to send the CPI only to
+	 * CPUs affected.
+	 */
+	send_CPI(cpumask, VIC_INVALIDATE_CPI);
+
+	while (smp_invalidate_needed) {
+		if(--stuck == 0) {
+			printk("***WARNING*** Stuck doing invalidate CPI (CPU%d)\n", smp_processor_id());
+			break;
+		}
+	}
+
+	/* Uncomment only to debug invalidation problems
+	VDEBUG(("VOYAGER SMP: Completed invalidate CPI (CPU%d)\n", cpu));
+	*/
+
+	flush_mm = NULL;
+	flush_va = 0;
+	spin_unlock(&tlbstate_lock);
+}
+
+void
+flush_tlb_current_task(void)
+{
+	struct mm_struct *mm = current->mm;
+	unsigned long cpu_mask;
+
+	preempt_disable();
+
+	cpu_mask = mm->cpu_vm_mask & ~(1 << smp_processor_id());
+	local_flush_tlb();
+	if (cpu_mask)
+		flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
+
+	preempt_enable();
+}
+
+
+void
+flush_tlb_mm (struct mm_struct * mm)
+{
+	unsigned long cpu_mask;
+
+	preempt_disable();
+
+	cpu_mask = mm->cpu_vm_mask & ~(1 << smp_processor_id());
+
+	if (current->active_mm == mm) {
+		if (current->mm)
+			local_flush_tlb();
+		else
+			leave_mm(smp_processor_id());
+	}
+	if (cpu_mask)
+		flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
+
+	preempt_enable();
+}
+
+void flush_tlb_page(struct vm_area_struct * vma, unsigned long va)
+{
+	struct mm_struct *mm = vma->vm_mm;
+	unsigned long cpu_mask;
+
+	preempt_disable();
+
+	cpu_mask = mm->cpu_vm_mask & ~(1 << smp_processor_id());
+	if (current->active_mm == mm) {
+		if(current->mm)
+			__flush_tlb_one(va);
+		 else
+		 	leave_mm(smp_processor_id());
+	}
+
+	if (cpu_mask)
+		flush_tlb_others(cpu_mask, mm, va);
+
+	preempt_enable();
+}
+
+/* enable the requested IRQs */
+asmlinkage void
+smp_enable_irq_interrupt(void)
+{
+	__u8 irq;
+	__u8 cpu = get_cpu();
+
+	VDEBUG(("VOYAGER SMP: CPU%d enabling irq mask 0x%x\n", cpu,
+	       vic_irq_enable_mask[cpu]));
+
+	spin_lock(&vic_irq_lock);
+	for(irq = 0; irq < 16; irq++) {
+		if(vic_irq_enable_mask[cpu] & (1<<irq))
+			enable_local_vic_irq(irq);
+	}
+	vic_irq_enable_mask[cpu] = 0;
+	spin_unlock(&vic_irq_lock);
+
+	put_cpu_no_resched();
+}
+	
+/*
+ *	CPU halt call-back
+ */
+static void
+smp_stop_cpu_function(void *dummy)
+{
+	VDEBUG(("VOYAGER SMP: CPU%d is STOPPING\n", smp_processor_id()));
+	clear_bit(smp_processor_id(), &cpu_online_map);
+	local_irq_disable();
+	for(;;)
+	       __asm__("hlt");
+}
+
+static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+
+struct call_data_struct {
+	void (*func) (void *info);
+	void *info;
+	volatile unsigned long started;
+	volatile unsigned long finished;
+	int wait;
+};
+
+static struct call_data_struct * call_data;
+
+/* execute a thread on a new CPU.  The function to be called must be
+ * previously set up.  This is used to schedule a function for
+ * execution on all CPU's - set up the function then broadcast a
+ * function_interrupt CPI to come here on each CPU */
+asmlinkage void
+smp_call_function_interrupt(void)
+{
+	void (*func) (void *info) = call_data->func;
+	void *info = call_data->info;
+	/* must take copy of wait because call_data may be replaced
+	 * unless the function is waiting for us to finish */
+	int wait = call_data->wait;
+	__u8 cpu = smp_processor_id();
+
+	/*
+	 * Notify initiating CPU that I've grabbed the data and am
+	 * about to execute the function
+	 */
+	mb();
+	if(!test_and_clear_bit(cpu, &call_data->started)) {
+		/* If the bit wasn't set, this could be a replay */
+		printk(KERN_WARNING "VOYAGER SMP: CPU %d received call funtion with no call pending\n", cpu);
+		return;
+	}
+	/*
+	 * At this point the info structure may be out of scope unless wait==1
+	 */
+	irq_enter();
+	(*func)(info);
+	irq_exit();
+	if (wait) {
+		mb();
+		clear_bit(cpu, &call_data->finished);
+	}
+}
+
+/* Call this function on all CPUs using the function_interrupt above 
+    <func> The function to run. This must be fast and non-blocking.
+    <info> An arbitrary pointer to pass to the function.
+    <retry> If true, keep retrying until ready.
+    <wait> If true, wait until function has completed on other CPUs.
+    [RETURNS] 0 on success, else a negative status code. Does not return until
+    remote CPUs are nearly ready to execute <<func>> or are or have executed.
+*/
+int
+smp_call_function (void (*func) (void *info), void *info, int retry,
+		   int wait)
+{
+	struct call_data_struct data;
+	__u32 mask = cpu_online_map;
+
+	mask &= ~(1<<smp_processor_id());
+
+	if (!mask)
+		return 0;
+
+	data.func = func;
+	data.info = info;
+	data.started = mask;
+	data.wait = wait;
+	if (wait)
+		data.finished = mask;
+
+	spin_lock(&call_lock);
+	call_data = &data;
+	wmb();
+	/* Send a message to all other CPUs and wait for them to respond */
+	send_CPI_allbutself(VIC_CALL_FUNCTION_CPI);
+
+	/* Wait for response */
+	while (data.started)
+		barrier();
+
+	if (wait)
+		while (data.finished)
+			barrier();
+
+	spin_unlock(&call_lock);
+
+	return 0;
+}
+
+/* Sorry about the name.  In an APIC based system, the APICs
+ * themselves are programmed to send a timer interrupt.  This is used
+ * by linux to reschedule the processor.  Voyager doesn't have this,
+ * so we use the system clock to interrupt one processor, which in
+ * turn, broadcasts a timer CPI to all the others --- we receive that
+ * CPI here.  We don't use this actually for counting so losing
+ * ticks doesn't matter 
+ *
+ * FIXME: For those CPU's which actually have a local APIC, we could
+ * try to use it to trigger this interrupt instead of having to
+ * broadcast the timer tick.  Unfortunately, all my pentium DYADs have
+ * no local APIC, so I can't do this
+ *
+ * This function is currently a placeholder and is unused in the code */
+asmlinkage void 
+smp_apic_timer_interrupt(struct pt_regs regs)
+{
+	wrapper_smp_local_timer_interrupt(&regs);
+}
+
+/* All of the QUAD interrupt GATES */
+asmlinkage void
+smp_qic_timer_interrupt(struct pt_regs regs)
+{
+	ack_QIC_CPI(QIC_TIMER_CPI);
+	wrapper_smp_local_timer_interrupt(&regs);
+}
+
+asmlinkage void
+smp_qic_invalidate_interrupt(void)
+{
+	ack_QIC_CPI(QIC_INVALIDATE_CPI);
+	smp_invalidate_interrupt();
+}
+
+asmlinkage void
+smp_qic_reschedule_interrupt(void)
+{
+	ack_QIC_CPI(QIC_RESCHEDULE_CPI);
+	smp_reschedule_interrupt();
+}
+
+asmlinkage void
+smp_qic_enable_irq_interrupt(void)
+{
+	ack_QIC_CPI(QIC_ENABLE_IRQ_CPI);
+	smp_enable_irq_interrupt();
+}
+
+asmlinkage void
+smp_qic_call_function_interrupt(void)
+{
+	ack_QIC_CPI(QIC_CALL_FUNCTION_CPI);
+	smp_call_function_interrupt();
+}
+
+asmlinkage void
+smp_vic_cpi_interrupt(struct pt_regs regs)
+{
+	__u8 cpu = smp_processor_id();
+
+	if(is_cpu_quad())
+		ack_QIC_CPI(VIC_CPI_LEVEL0);
+	else
+		ack_VIC_CPI(VIC_CPI_LEVEL0);
+
+	if(test_and_clear_bit(VIC_TIMER_CPI, &vic_cpi_mailbox[cpu]))
+		wrapper_smp_local_timer_interrupt(&regs);
+	if(test_and_clear_bit(VIC_INVALIDATE_CPI, &vic_cpi_mailbox[cpu]))
+		smp_invalidate_interrupt();
+	if(test_and_clear_bit(VIC_RESCHEDULE_CPI, &vic_cpi_mailbox[cpu]))
+		smp_reschedule_interrupt();
+	if(test_and_clear_bit(VIC_ENABLE_IRQ_CPI, &vic_cpi_mailbox[cpu]))
+		smp_enable_irq_interrupt();
+	if(test_and_clear_bit(VIC_CALL_FUNCTION_CPI, &vic_cpi_mailbox[cpu]))
+		smp_call_function_interrupt();
+}
+
+static inline void
+do_flush_tlb_all_local(void)
+{
+	unsigned long cpu = smp_processor_id();
+
+	__flush_tlb_all();
+	if (cpu_tlbstate[cpu].state == TLBSTATE_LAZY)
+		leave_mm(cpu);
+}
+
+
+static void
+flush_tlb_all_function(void* info)
+{
+	do_flush_tlb_all_local();
+}
+
+/* flush the TLB of every active CPU in the system */
+void
+flush_tlb_all(void)
+{
+	smp_call_function (flush_tlb_all_function, 0, 1, 1);
+
+	do_flush_tlb_all_local();
+}
+
+/* used to set up the trampoline for other CPUs when the memory manager
+ * is sorted out */
+void __init
+smp_alloc_memory(void)
+{
+	trampoline_base = (__u32)alloc_bootmem_low_pages(PAGE_SIZE);
+	if(__pa(trampoline_base) >= 0x93000)
+		BUG();
+}
+
+/* send a reschedule CPI to one CPU by physical CPU number*/
+void
+smp_send_reschedule(int cpu)
+{
+	send_one_CPI(cpu, VIC_RESCHEDULE_CPI);
+}
+
+
+int
+hard_smp_processor_id(void)
+{
+	__u8 i;
+	__u8 cpumask = inb(VIC_PROC_WHO_AM_I);
+	if((cpumask & QUAD_IDENTIFIER) == QUAD_IDENTIFIER)
+		return cpumask & 0x1F;
+
+	for(i = 0; i < 8; i++) {
+		if(cpumask & (1<<i))
+			return i;
+	}
+	printk("** WARNING ** Illegal cpuid returned by VIC: %d", cpumask);
+	return 0;
+}
+
+/* broadcast a halt to all other CPUs */
+void
+smp_send_stop(void)
+{
+	smp_call_function(smp_stop_cpu_function, NULL, 1, 1);
+}
+
+/* this function is triggered in time.c when a clock tick fires
+ * we need to re-broadcast the tick to all CPUs */
+void
+smp_vic_timer_interrupt(struct pt_regs *regs)
+{
+	send_CPI_allbutself(VIC_TIMER_CPI);
+	smp_local_timer_interrupt(regs);
+}
+
+static inline void
+wrapper_smp_local_timer_interrupt(struct pt_regs *regs)
+{
+	__u8 cpu = smp_processor_id();
+
+	irq_enter();
+	smp_local_timer_interrupt(regs);
+	irq_exit();
+	
+}
+
+/* local (per CPU) timer interrupt.  It does both profiling and
+ * process statistics/rescheduling.
+ *
+ * We do profiling in every local tick, statistics/rescheduling
+ * happen only every 'profiling multiplier' ticks. The default
+ * multiplier is 1 and it can be changed by writing the new multiplier
+ * value into /proc/profile.
+ */
+void
+smp_local_timer_interrupt(struct pt_regs * regs)
+{
+	int cpu = smp_processor_id();
+	long weight;
+
+	x86_do_profile(regs);
+
+	if (--prof_counter[cpu] <= 0) {
+		/*
+		 * The multiplier may have changed since the last time we got
+		 * to this point as a result of the user writing to
+		 * /proc/profile. In this case we need to adjust the APIC
+		 * timer accordingly.
+		 *
+		 * Interrupts are already masked off at this point.
+		 */
+		prof_counter[cpu] = prof_multiplier[cpu];
+		if (prof_counter[cpu] != prof_old_multiplier[cpu]) {
+			/* FIXME: need to update the vic timer tick here */
+			prof_old_multiplier[cpu] = prof_counter[cpu];
+		}
+
+		update_process_times(user_mode(regs));
+	}
+
+	if( ((1<<cpu) & voyager_extended_vic_processors) == 0)
+		/* only extended VIC processors participate in
+		 * interrupt distribution */
+		return;
+
+	/*
+	 * We take the 'long' return path, and there every subsystem
+	 * grabs the apropriate locks (kernel lock/ irq lock).
+	 *
+	 * we might want to decouple profiling from the 'long path',
+	 * and do the profiling totally in assembly.
+	 *
+	 * Currently this isn't too much of an issue (performance wise),
+	 * we can take more than 100K local irqs per second on a 100 MHz P5.
+	 */
+
+	if((++vic_tick[cpu] & 0x7) != 0)
+		return;
+	/* get here every 16 ticks (about every 1/6 of a second) */
+
+	/* Change our priority to give someone else a chance at getting
+         * the IRQ. The algorithm goes like this:
+	 *
+	 * In the VIC, the dynamically routed interrupt is always
+	 * handled by the lowest priority eligible (i.e. receiving
+	 * interrupts) CPU.  If >1 eligible CPUs are equal lowest, the
+	 * lowest processor number gets it.
+	 *
+	 * The priority of a CPU is controlled by a special per-CPU
+	 * VIC priority register which is 3 bits wide 0 being lowest
+	 * and 7 highest priority..
+	 *
+	 * Therefore we subtract the average number of interrupts from
+	 * the number we've fielded.  If this number is negative, we
+	 * lower the activity count and if it is positive, we raise
+	 * it.
+	 *
+	 * I'm afraid this still leads to odd looking interrupt counts:
+	 * the totals are all roughly equal, but the individual ones
+	 * look rather skewed.
+	 *
+	 * FIXME: This algorithm is total crap when mixed with SMP
+	 * affinity code since we now try to even up the interrupt
+	 * counts when an affinity binding is keeping them on a
+	 * particular CPU*/
+	weight = (vic_intr_count[cpu]*voyager_extended_cpus
+		  - vic_intr_total) >> 4;
+	weight += 4;
+	if(weight > 7)
+		weight = 7;
+	if(weight < 0)
+		weight = 0;
+	
+	outb((__u8)weight, VIC_PRIORITY_REGISTER);
+
+#ifdef VOYAGER_DEBUG
+	if((vic_tick[cpu] & 0xFFF) == 0) {
+		/* print this message roughly every 25 secs */
+		printk("VOYAGER SMP: vic_tick[%d] = %lu, weight = %ld\n",
+		       cpu, vic_tick[cpu], weight);
+	}
+#endif
+}
+
+/* setup the profiling timer */
+int 
+setup_profiling_timer(unsigned int multiplier)
+{
+	int i;
+
+	if ( (!multiplier))
+		return -EINVAL;
+
+	/* 
+	 * Set the new multiplier for each CPU. CPUs don't start using the
+	 * new values until the next timer interrupt in which they do process
+	 * accounting.
+	 */
+	for (i = 0; i < NR_CPUS; ++i)
+		prof_multiplier[i] = multiplier;
+
+	return 0;
+}
+
+
+/*  The CPIs are handled in the per cpu 8259s, so they must be
+ *  enabled to be received: FIX: enabling the CPIs in the early
+ *  boot sequence interferes with bug checking; enable them later
+ *  on in smp_init */
+#define VIC_SET_GATE(cpi, vector) \
+	set_intr_gate((cpi) + VIC_DEFAULT_CPI_BASE, (vector))
+#define QIC_SET_GATE(cpi, vector) \
+	set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector))
+
+void __init
+smp_intr_init(void)
+{
+	int i;
+
+	/* initialize the per cpu irq mask to all disabled */
+	for(i = 0; i < NR_CPUS; i++)
+		vic_irq_mask[i] = 0xFFFF;
+
+	VIC_SET_GATE(VIC_CPI_LEVEL0, vic_cpi_interrupt);
+
+	VIC_SET_GATE(VIC_SYS_INT, vic_sys_interrupt);
+	VIC_SET_GATE(VIC_CMN_INT, vic_cmn_interrupt);
+
+	QIC_SET_GATE(QIC_TIMER_CPI, qic_timer_interrupt);
+	QIC_SET_GATE(QIC_INVALIDATE_CPI, qic_invalidate_interrupt);
+	QIC_SET_GATE(QIC_RESCHEDULE_CPI, qic_reschedule_interrupt);
+	QIC_SET_GATE(QIC_ENABLE_IRQ_CPI, qic_enable_irq_interrupt);
+	QIC_SET_GATE(QIC_CALL_FUNCTION_CPI, qic_call_function_interrupt);
+	
+
+	/* now put the VIC descriptor into the first 48 IRQs 
+	 *
+	 * This is for later: first 16 correspond to PC IRQs; next 16
+	 * are Primary MC IRQs and final 16 are Secondary MC IRQs */
+	for(i = 0; i < 48; i++)
+		irq_desc[i].handler = &vic_irq_type;
+}
+
+/* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per
+ * processor to recieve CPI */
+static void
+send_CPI(__u32 cpuset, __u8 cpi)
+{
+	int mask;
+	__u8 cpu;
+	__u32 quad_cpuset = (cpuset & voyager_quad_processors);
+
+	if(cpi < VIC_START_FAKE_CPI) {
+		/* fake CPI are only used for booting, so send to the 
+		 * extended quads as well---Quads must be VIC booted */
+		outb((__u8)(cpuset), VIC_CPI_Registers[cpi]);
+		return;
+	}
+	if(quad_cpuset)
+		send_QIC_CPI(quad_cpuset, cpi);
+	cpuset &= ~quad_cpuset;
+	cpuset &= 0xff;		/* only first 8 CPUs vaild for VIC CPI */
+	if(cpuset == 0)
+		return;
+	for_each_cpu(cpu, mask) {
+		if(cpuset & (1<<cpu))
+			set_bit(cpi, &vic_cpi_mailbox[cpu]);
+	}
+	if(cpuset)
+		outb((__u8)cpuset, VIC_CPI_Registers[VIC_CPI_LEVEL0]);
+}
+
+/* Acknowlege receipt of CPI in the QIC, clear in QIC hardware and
+ * set the cache line to shared by reading it.
+ *
+ * DON'T make this inline otherwise the cache line read will be
+ * optimised away
+ * */
+static int
+ack_QIC_CPI(__u8 cpi) {
+	__u8 cpu = hard_smp_processor_id();
+
+	cpi &= 7;
+
+	outb(1<<cpi, QIC_INTERRUPT_CLEAR1);
+	return voyager_quad_cpi_addr[cpu]->qic_cpi[cpi].cpi;
+}
+
+static void
+ack_special_QIC_CPI(__u8 cpi)
+{
+	switch(cpi) {
+	case VIC_CMN_INT:
+		outb(QIC_CMN_INT, QIC_INTERRUPT_CLEAR0);
+		break;
+	case VIC_SYS_INT:
+		outb(QIC_SYS_INT, QIC_INTERRUPT_CLEAR0);
+		break;
+	}
+	/* also clear at the VIC, just in case (nop for non-extended proc) */
+	ack_VIC_CPI(cpi);
+}
+
+/* Acknowledge receipt of CPI in the VIC (essentially an EOI) */
+static void
+ack_VIC_CPI(__u8 cpi)
+{
+#ifdef VOYAGER_DEBUG
+	unsigned long flags;
+	__u16 isr;
+	__u8 cpu = smp_processor_id();
+
+	local_irq_save(flags);
+	isr = vic_read_isr();
+	if((isr & (1<<(cpi &7))) == 0) {
+		printk("VOYAGER SMP: CPU%d lost CPI%d\n", cpu, cpi);
+	}
+#endif
+	/* send specific EOI; the two system interrupts have
+	 * bit 4 set for a separate vector but behave as the
+	 * corresponding 3 bit intr */
+	outb_p(0x60|(cpi & 7),0x20);
+
+#ifdef VOYAGER_DEBUG
+	if((vic_read_isr() & (1<<(cpi &7))) != 0) {
+		printk("VOYAGER SMP: CPU%d still asserting CPI%d\n", cpu, cpi);
+	}
+	local_irq_restore(flags);
+#endif
+}
+
+/* cribbed with thanks from irq.c */
+#define __byte(x,y) 	(((unsigned char *)&(y))[x])
+#define cached_21(cpu)	(__byte(0,vic_irq_mask[cpu]))
+#define cached_A1(cpu)	(__byte(1,vic_irq_mask[cpu]))
+
+static unsigned int
+startup_vic_irq(unsigned int irq)
+{
+	enable_vic_irq(irq);
+
+	return 0;
+}
+
+/* The enable and disable routines.  This is where we run into
+ * conflicting architectural philosophy.  Fundamentally, the voyager
+ * architecture does not expect to have to disable interrupts globally
+ * (the IRQ controllers belong to each CPU).  The processor masquerade
+ * which is used to start the system shouldn't be used in a running OS
+ * since it will cause great confusion if two separate CPUs drive to
+ * the same IRQ controller (I know, I've tried it).
+ *
+ * The solution is a variant on the NCR lazy SPL design:
+ *
+ * 1) To disable an interrupt, do nothing (other than set the
+ *    IRQ_DISABLED flag).  This dares the interrupt actually to arrive.
+ *
+ * 2) If the interrupt dares to come in, raise the local mask against
+ *    it (this will result in all the CPU masks being raised
+ *    eventually).
+ *
+ * 3) To enable the interrupt, lower the mask on the local CPU and
+ *    broadcast an Interrupt enable CPI which causes all other CPUs to
+ *    adjust their masks accordingly.  */
+
+static void
+enable_vic_irq(unsigned int irq)
+{
+	int tmpmask;
+	/* linux doesn't to processor-irq affinity, so enable on
+	 * all CPUs we know about */
+	__u8 cpu = smp_processor_id(), real_cpu;
+	__u16 mask = (1<<irq);
+	__u32 processorList = 0;
+	unsigned long flags;
+
+	VDEBUG(("VOYAGER: enable_vic_irq(%d) CPU%d affinity 0x%lx\n",
+		irq, cpu, cpu_irq_affinity[cpu]));
+	spin_lock_irqsave(&vic_irq_lock, flags);
+	for_each_cpu(real_cpu, tmpmask) {
+		if(!(voyager_extended_vic_processors & (1<<real_cpu)))
+			continue;
+		if(!(cpu_irq_affinity[real_cpu] & mask)) {
+			/* irq has no affinity for this CPU, ignore */
+			continue;
+		}
+		if(real_cpu == cpu) {
+			enable_local_vic_irq(irq);
+		}
+		else if(vic_irq_mask[real_cpu] & mask) {
+			vic_irq_enable_mask[real_cpu] |= mask;
+			processorList |= (1<<real_cpu);
+		}
+	}
+	spin_unlock_irqrestore(&vic_irq_lock, flags);
+	if(processorList)
+		send_CPI(processorList, VIC_ENABLE_IRQ_CPI);
+}
+
+static void
+disable_vic_irq(unsigned int irq)
+{
+	/* lazy disable, do nothing */
+}
+
+static void
+enable_local_vic_irq(unsigned int irq)
+{
+	__u8 cpu = smp_processor_id();
+	__u16 mask = ~(1 << irq);
+	__u16 old_mask = vic_irq_mask[cpu];
+
+	vic_irq_mask[cpu] &= mask;
+	if(vic_irq_mask[cpu] == old_mask)
+		return;
+
+	VDEBUG(("VOYAGER DEBUG: Enabling irq %d in hardware on CPU %d\n",
+		irq, cpu));
+
+	if (irq & 8) {
+		outb_p(cached_A1(cpu),0xA1);
+		(void)inb_p(0xA1);
+	}
+	else {
+		outb_p(cached_21(cpu),0x21);
+		(void)inb_p(0x21);
+	}
+}
+
+static void
+disable_local_vic_irq(unsigned int irq)
+{
+	__u8 cpu = smp_processor_id();
+	__u16 mask = (1 << irq);
+	__u16 old_mask = vic_irq_mask[cpu];
+
+	if(irq == 7)
+		return;
+
+	vic_irq_mask[cpu] |= mask;
+	if(old_mask == vic_irq_mask[cpu])
+		return;
+
+	VDEBUG(("VOYAGER DEBUG: Disabling irq %d in hardware on CPU %d\n",
+		irq, cpu));
+
+	if (irq & 8) {
+		outb_p(cached_A1(cpu),0xA1);
+		(void)inb_p(0xA1);
+	}
+	else {
+		outb_p(cached_21(cpu),0x21);
+		(void)inb_p(0x21);
+	}
+}
+
+/* The VIC is level triggered, so the ack can only be issued after the
+ * interrupt completes.  However, we do Voyager lazy interrupt
+ * handling here: It is an extremely expensive operation to mask an
+ * interrupt in the vic, so we merely set a flag (IRQ_DISABLED).  If
+ * this interrupt actually comes in, then we mask and ack here to push
+ * the interrupt off to another CPU */
+static void
+before_handle_vic_irq(unsigned int irq)
+{
+	irq_desc_t *desc = irq_desc + irq;
+	__u8 cpu = smp_processor_id();
+
+	_raw_spin_lock(&vic_irq_lock);
+	vic_intr_total++;
+	vic_intr_count[cpu]++;
+
+	if(!(cpu_irq_affinity[cpu] & (1<<irq))) {
+		/* The irq is not in our affinity mask, push it off
+		 * onto another CPU */
+		VDEBUG(("VOYAGER DEBUG: affinity triggered disable of irq %d on cpu %d\n",
+			irq, cpu));
+		disable_local_vic_irq(irq);
+		/* set IRQ_INPROGRESS to prevent the handler in irq.c from
+		 * actually calling the interrupt routine */
+		desc->status |= IRQ_REPLAY | IRQ_INPROGRESS;
+	} else if(desc->status & IRQ_DISABLED) {
+		/* Damn, the interrupt actually arrived, do the lazy
+		 * disable thing. The interrupt routine in irq.c will
+		 * not handle a IRQ_DISABLED interrupt, so nothing more
+		 * need be done here */
+		VDEBUG(("VOYAGER DEBUG: lazy disable of irq %d on CPU %d\n",
+			irq, cpu));
+		disable_local_vic_irq(irq);
+		desc->status |= IRQ_REPLAY;
+	} else {
+		desc->status &= ~IRQ_REPLAY;
+	}
+
+	_raw_spin_unlock(&vic_irq_lock);
+}
+
+/* Finish the VIC interrupt: basically mask */
+static void
+after_handle_vic_irq(unsigned int irq)
+{
+	irq_desc_t *desc = irq_desc + irq;
+
+	_raw_spin_lock(&vic_irq_lock);
+	{
+		unsigned int status = desc->status & ~IRQ_INPROGRESS;
+#ifdef VOYAGER_DEBUG
+		__u16 isr;
+#endif
+
+		desc->status = status;
+		if ((status & IRQ_DISABLED))
+			disable_local_vic_irq(irq);
+#ifdef VOYAGER_DEBUG
+		/* DEBUG: before we ack, check what's in progress */
+		isr = vic_read_isr();
+		if((isr & (1<<irq) && !(status & IRQ_REPLAY)) == 0) {
+			int i;
+			__u8 cpu = smp_processor_id();
+			__u8 real_cpu;
+			int mask;
+
+			printk("VOYAGER SMP: CPU%d lost interrupt %d\n",
+			       cpu, irq);
+			for_each_cpu(real_cpu, mask) {
+
+				outb(VIC_CPU_MASQUERADE_ENABLE | real_cpu,
+				     VIC_PROCESSOR_ID);
+				isr = vic_read_isr();
+				if(isr & (1<<irq)) {
+					printk("VOYAGER SMP: CPU%d ack irq %d\n",
+					       real_cpu, irq);
+					ack_vic_irq(irq);
+				}
+				outb(cpu, VIC_PROCESSOR_ID);
+			}
+		}
+#endif /* VOYAGER_DEBUG */
+		/* as soon as we ack, the interrupt is eligible for
+		 * receipt by another CPU so everything must be in
+		 * order here  */
+		ack_vic_irq(irq);
+		if(status & IRQ_REPLAY) {
+			/* replay is set if we disable the interrupt
+			 * in the before_handle_vic_irq() routine, so
+			 * clear the in progress bit here to allow the
+			 * next CPU to handle this correctly */
+			desc->status &= ~(IRQ_REPLAY | IRQ_INPROGRESS);
+		}
+#ifdef VOYAGER_DEBUG
+		isr = vic_read_isr();
+		if((isr & (1<<irq)) != 0)
+			printk("VOYAGER SMP: after_handle_vic_irq() after ack irq=%d, isr=0x%x\n",
+			       irq, isr);
+#endif /* VOYAGER_DEBUG */
+	}
+	_raw_spin_unlock(&vic_irq_lock);
+
+	/* All code after this point is out of the main path - the IRQ
+	 * may be intercepted by another CPU if reasserted */
+}
+
+
+/* Linux processor - interrupt affinity manipulations.
+ *
+ * For each processor, we maintain a 32 bit irq affinity mask.
+ * Initially it is set to all 1's so every processor accepts every
+ * interrupt.  In this call, we change the processor's affinity mask:
+ *
+ * Change from enable to disable:
+ *
+ * If the interrupt ever comes in to the processor, we will disable it
+ * and ack it to push it off to another CPU, so just accept the mask here.
+ *
+ * Change from disable to enable:
+ *
+ * change the mask and then do an interrupt enable CPI to re-enable on
+ * the selected processors */
+
+void
+set_vic_irq_affinity(unsigned int irq, unsigned long mask) 
+{
+	/* Only extended processors handle interrupts */
+	unsigned long real_mask = mask & voyager_extended_vic_processors;
+	unsigned long irq_mask = (1<<irq);
+	int tmpmask;
+	__u8 cpu;
+	
+	if(mask == 0)
+		/* can't have no cpu's to accept the interrupt -- extremely
+		 * bad things will happen */
+		return;
+
+	if(irq == 0)
+		/* can't change the affinity of the timer IRQ.  This
+		 * is due to the constraint in the voyager
+		 * architecture that the CPI also comes in on and IRQ
+		 * line and we have chosen IRQ0 for this.  If you
+		 * raise the mask on this interrupt, the processor
+		 * will no-longer be able to accept VIC CPIs */
+		return;
+
+	if(irq >= 32) 
+		/* You can only have 32 interrupts in a voyager system
+		 * (and 32 only if you have a secondary microchannel
+		 * bus) */
+		return;
+
+	for_each_cpu(cpu, tmpmask) {
+		unsigned long cpu_mask = (1<<cpu);
+		
+		if(cpu_mask & real_mask) {
+			/* enable the interrupt for this cpu */
+			cpu_irq_affinity[cpu] |= irq_mask;
+		} else {
+			/* disable the interrupt for this cpu */
+			cpu_irq_affinity[cpu] &= ~irq_mask;
+		}
+	}
+	/* this is magic, we now have the correct affinity maps, so
+	 * enable the interrupt.  This will send an enable CPI to
+	 * those cpu's who need to enable it in their local masks,
+	 * causing them to correct for the new affinity . If the
+	 * interrupt is currently globally disabled, it will simply be
+	 * disabled again as it comes in (voyager lazy disable).  If
+	 * the affinity map is tightened to disable the interrupt on a
+	 * cpu, it will be pushed off when it comes in */
+	enable_vic_irq(irq);
+}
+
+static void
+ack_vic_irq(unsigned int irq)
+{
+	if (irq & 8) {
+		outb(0x62,0x20);	/* Specific EOI to cascade */
+		outb(0x60|(irq & 7),0xA0);
+	} else {
+		outb(0x60 | (irq & 7),0x20);
+	}
+}
+
+/* enable the CPIs.  In the VIC, the CPIs are delivered by the 8259
+ * but are not vectored by it.  This means that the 8259 mask must be
+ * lowered to receive them */
+static __init void
+vic_enable_cpi(void)
+{
+	__u8 cpu = smp_processor_id();
+	
+	/* just take a copy of the current mask (nop for boot cpu) */
+	vic_irq_mask[cpu] = vic_irq_mask[boot_cpu_id];
+
+	enable_local_vic_irq(VIC_CPI_LEVEL0);
+	enable_local_vic_irq(VIC_CPI_LEVEL1);
+	/* for sys int and cmn int */
+	enable_local_vic_irq(7);
+
+	if(is_cpu_quad()) {
+		outb(QIC_DEFAULT_MASK0, QIC_MASK_REGISTER0);
+		outb(QIC_CPI_ENABLE, QIC_MASK_REGISTER1);
+		VDEBUG(("VOYAGER SMP: QIC ENABLE CPI: CPU%d: MASK 0x%x\n",
+			cpu, QIC_CPI_ENABLE));
+	}
+
+	VDEBUG(("VOYAGER SMP: ENABLE CPI: CPU%d: MASK 0x%x\n",
+		cpu, vic_irq_mask[cpu]));
+}
+
+void
+voyager_smp_dump()
+{
+	int mask;
+	__u8 old_cpu = smp_processor_id(), cpu;
+
+	/* dump the interrupt masks of each processor */
+	for_each_cpu(cpu, mask) {
+		__u16 imr, isr, irr;
+		unsigned long flags;
+
+		local_irq_save(flags);
+		outb(VIC_CPU_MASQUERADE_ENABLE | cpu, VIC_PROCESSOR_ID);
+		imr = (inb(0xa1) << 8) | inb(0x21);
+		outb(0x0a, 0xa0);
+		irr = inb(0xa0) << 8;
+		outb(0x0a, 0x20);
+		irr |= inb(0x20);
+		outb(0x0b, 0xa0);
+		isr = inb(0xa0) << 8;
+		outb(0x0b, 0x20);
+		isr |= inb(0x20);
+		outb(old_cpu, VIC_PROCESSOR_ID);
+		local_irq_restore(flags);
+		printk("\tCPU%d: mask=0x%x, IMR=0x%x, IRR=0x%x, ISR=0x%x\n",
+		       cpu, vic_irq_mask[cpu], imr, irr, isr);
+#if 0
+		/* These lines are put in to try to unstick an un ack'd irq */
+		if(isr != 0) {
+			int irq;
+			for(irq=0; irq<16; irq++) {
+				if(isr & (1<<irq)) {
+					printk("\tCPU%d: ack irq %d\n",
+					       cpu, irq);
+					local_irq_save(flags);
+					outb(VIC_CPU_MASQUERADE_ENABLE | cpu,
+					     VIC_PROCESSOR_ID);
+					ack_vic_irq(irq);
+					outb(old_cpu, VIC_PROCESSOR_ID);
+					local_irq_restore(flags);
+				}
+			}
+		}
+#endif
+	}
+}
+
+void
+smp_voyager_power_off(void *dummy)
+{
+	if(smp_processor_id() == boot_cpu_id) 
+		voyager_power_off();
+	else
+		smp_stop_cpu_function(NULL);
+}
+
+void __init
+smp_prepare_cpus(unsigned int max_cpus)
+{
+	/* FIXME: ignore max_cpus for now */
+	smp_boot_cpus();
+}
+
+int __devinit
+__cpu_up(unsigned int cpu)
+{
+	/* This only works at boot for x86.  See "rewrite" above. */
+	if (test_bit(cpu, &smp_commenced_mask))
+		return -ENOSYS;
+
+	/* In case one didn't come up */
+	if (!test_bit(cpu, &cpu_callin_map))
+		return -EIO;
+	/* Unleash the CPU! */
+	set_bit(cpu, &smp_commenced_mask);
+	while (!test_bit(cpu, &cpu_online_map))
+		mb();
+	return 0;
+}
+
+void __init 
+smp_cpus_done(unsigned int max_cpus)
+{
+	zap_low_mappings();
+}
diff -Nru a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/mach-voyager/voyager_thread.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,178 @@
+/* -*- mode: c; c-basic-offset: 8 -*- */
+
+/* Copyright (C) 2001
+ *
+ * Author: J.E.J.Bottomley@HansenPartnership.com
+ *
+ * linux/arch/i386/kernel/voyager_thread.c
+ *
+ * This module provides the machine status monitor thread for the
+ * voyager architecture.  This allows us to monitor the machine
+ * environment (temp, voltage, fan function) and the front panel and
+ * internal UPS.  If a fault is detected, this thread takes corrective
+ * action (usually just informing init)
+ * */
+
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/kernel_stat.h>
+#include <linux/delay.h>
+#include <linux/mc146818rtc.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+#include <linux/kmod.h>
+#include <linux/completion.h>
+#include <linux/sched.h>
+#include <asm/desc.h>
+#include <asm/voyager.h>
+#include <asm/vic.h>
+#include <asm/pgalloc.h>
+#include <asm/mtrr.h>
+#include <asm/msr.h>
+
+#include <linux/irq.h>
+
+#define THREAD_NAME "kvoyagerd"
+
+/* external variables */
+int kvoyagerd_running = 0;
+DECLARE_MUTEX_LOCKED(kvoyagerd_sem);
+
+static int thread(void *);
+
+static __u8 set_timeout = 0;
+
+/* Start the machine monitor thread.  Return 1 if OK, 0 if fail */
+static int __init
+voyager_thread_start(void)
+{
+	if(kernel_thread(thread, NULL, CLONE_KERNEL) < 0) {
+		/* This is serious, but not fatal */
+		printk(KERN_ERR "Voyager: Failed to create system monitor thread!!!\n");
+		return 1;
+	}
+	return 0;
+}
+
+static int
+execute_helper(void *string)
+{
+	int ret;
+
+	char *envp[] = {
+		"HOME=/",
+		"TERM=linux",
+		"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
+		NULL,
+	};
+	char *argv[] = {
+		"/bin/bash",
+		"-c",
+		(char *)string,
+		NULL,
+	};
+
+	if((ret = exec_usermodehelper(argv[0], argv, envp)) < 0) {
+		printk(KERN_ERR "Voyager failed to execute \"%s\"\n",
+		       (char *)string);
+	}
+	return ret;
+}
+
+static void
+execute(char *string)
+{
+	if(kernel_thread(execute_helper, (void *)string, CLONE_VFORK | SIGCHLD) < 0) {
+		printk(KERN_ERR "Voyager failed to fork before exec of \"%s\"\n",
+		       string);
+	}
+}
+
+static void
+check_from_kernel(void)
+{
+	if(voyager_status.switch_off) {
+		
+		/* FIXME: This should be configureable via proc */
+		execute("umask 600; echo 0 > /etc/initrunlvl; kill -HUP 1");
+	} else if(voyager_status.power_fail) {
+		VDEBUG(("Voyager daemon detected AC power failure\n"));
+		
+		/* FIXME: This should be configureable via proc */
+		execute("umask 600; echo F > /etc/powerstatus; kill -PWR 1");
+		set_timeout = 1;
+	}
+}
+
+static void
+check_continuing_condition(void)
+{
+	if(voyager_status.power_fail) {
+		__u8 data;
+		voyager_cat_psi(VOYAGER_PSI_SUBREAD, 
+				VOYAGER_PSI_AC_FAIL_REG, &data);
+		if((data & 0x1f) == 0) {
+			/* all power restored */
+			printk(KERN_NOTICE "VOYAGER AC power restored, cancelling shutdown\n");
+			/* FIXME: should be user configureable */
+			execute("umask 600; echo O > /etc/powerstatus; kill -PWR 1");
+			set_timeout = 0;
+		}
+	}
+}
+
+static void
+wakeup(unsigned long unused)
+{
+	up(&kvoyagerd_sem);
+}
+
+static int
+thread(void *unused)
+{
+	struct timer_list wakeup_timer;
+
+	kvoyagerd_running = 1;
+
+	reparent_to_init();
+	daemonize();
+
+	set_timeout = 0;
+
+	init_timer(&wakeup_timer);
+
+	strcpy(current->comm, THREAD_NAME);
+	sigfillset(&current->blocked);
+	current->tty = NULL;	/* get rid of controlling tty */
+
+	printk(KERN_NOTICE "Voyager starting monitor thread\n");
+
+	for(;;) {
+		down_interruptible(&kvoyagerd_sem);
+		VDEBUG(("Voyager Daemon awoken\n"));
+		if(voyager_status.request_from_kernel == 0) {
+			/* probably awoken from timeout */
+			check_continuing_condition();
+		} else {
+			check_from_kernel();
+			voyager_status.request_from_kernel = 0;
+		}
+		if(set_timeout) {
+			del_timer(&wakeup_timer);
+			wakeup_timer.expires = HZ + jiffies;
+			wakeup_timer.function = wakeup;
+			add_timer(&wakeup_timer);
+		}
+	}
+}
+
+static void __exit
+voyager_thread_stop(void)
+{
+	/* FIXME: do nothing at the moment */
+}
+
+module_init(voyager_thread_start);
+//module_exit(voyager_thread_stop);
diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
--- a/arch/i386/mm/fault.c	Wed Oct 30 16:44:17 2002
+++ b/arch/i386/mm/fault.c	Wed Oct 30 16:44:17 2002
@@ -30,17 +30,20 @@
 
 extern int console_loglevel;
 
+#ifndef CONFIG_X86_WP_WORKS_OK
 /*
  * Ugly, ugly, but the goto's result in better assembly..
  */
 int __verify_write(const void * addr, unsigned long size)
 {
+	struct mm_struct *mm = current->mm;
 	struct vm_area_struct * vma;
 	unsigned long start = (unsigned long) addr;
 
-	if (!size)
+	if (!size || segment_eq(get_fs(),KERNEL_DS))
 		return 1;
 
+	down_read(&mm->mmap_sem);
 	vma = find_vma(current->mm, start);
 	if (!vma)
 		goto bad_area;
@@ -80,6 +83,13 @@
 		if (!(vma->vm_flags & VM_WRITE))
 			goto bad_area;;
 	}
+	/*
+	 * We really need to hold mmap_sem over the whole access to
+	 * userspace, else another thread could change permissions.
+	 * This is unfixable, so don't use i386-class machines for
+	 * critical servers.
+	 */
+	up_read(&mm->mmap_sem);
 	return 1;
 
 check_stack:
@@ -89,6 +99,7 @@
 		goto good_area;
 
 bad_area:
+	up_read(&mm->mmap_sem);
 	return 0;
 
 out_of_memory:
@@ -98,6 +109,7 @@
 	}
 	goto bad_area;
 }
+#endif
 
 /*
  * Unlock any spinlocks which will prevent us from getting the
diff -Nru a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
--- a/arch/i386/mm/highmem.c	Wed Oct 30 16:44:29 2002
+++ b/arch/i386/mm/highmem.c	Wed Oct 30 16:44:29 2002
@@ -19,10 +19,12 @@
 }
 
 /*
- * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
- * gives a more generic (and caching) interface. But kmap_atomic can
- * be used in IRQ contexts, so in some (very limited) cases we need
- * it.
+ * kmap_atomic/kunmap_atomic is significantly faster than kmap/kunmap because
+ * no global lock is needed and because the kmap code must perform a global TLB
+ * invalidation when the kmap pool wraps.
+ *
+ * However when holding an atomic kmap is is not legal to sleep, so atomic
+ * kmaps are appropriate for short, tight code paths only.
  */
 void *kmap_atomic(struct page *page, enum km_type type)
 {
diff -Nru a/arch/i386/mm/init.c b/arch/i386/mm/init.c
--- a/arch/i386/mm/init.c	Wed Oct 30 16:44:31 2002
+++ b/arch/i386/mm/init.c	Wed Oct 30 16:44:31 2002
@@ -378,15 +378,10 @@
  * This function cannot be __init, since exceptions don't work in that
  * section.
  */
-static int do_test_wp_bit(unsigned long vaddr);
+static int do_test_wp_bit(void);
 
 void __init test_wp_bit(void)
 {
-	const unsigned long vaddr = PAGE_OFFSET;
-	pgd_t *pgd;
-	pmd_t *pmd;
-	pte_t *pte, old_pte;
-
 	if (cpu_has_pse) {
 		/* Ok, all PSE-capable CPUs are definitely handling the WP bit right. */
 		boot_cpu_data.wp_works_ok = 1;
@@ -395,17 +390,10 @@
 
 	printk("Checking if this processor honours the WP bit even in supervisor mode... ");
 
-	pgd = swapper_pg_dir + __pgd_offset(vaddr);
-	pmd = pmd_offset(pgd, vaddr);
-	pte = pte_offset_kernel(pmd, vaddr);
-	old_pte = *pte;
-	*pte = pfn_pte(0, PAGE_READONLY);
-	local_flush_tlb();
-
-	boot_cpu_data.wp_works_ok = do_test_wp_bit(vaddr);
-
-	*pte = old_pte;
-	local_flush_tlb();
+	/* Any page-aligned address will do, the test is non-destructive */
+	__set_fixmap(FIX_WP_TEST, __pa(&swapper_pg_dir), PAGE_READONLY);
+	boot_cpu_data.wp_works_ok = do_test_wp_bit();
+	clear_fixmap(FIX_WP_TEST);
 
 	if (!boot_cpu_data.wp_works_ok) {
 		printk("No.\n");
@@ -550,7 +538,7 @@
 #endif
 
 /* Put this after the callers, so that it cannot be inlined */
-static int do_test_wp_bit(unsigned long vaddr)
+static int do_test_wp_bit(void)
 {
 	char tmp_reg;
 	int flag;
@@ -564,7 +552,7 @@
 		"	.align 4	\n"
 		"	.long 1b,2b	\n"
 		".previous		\n"
-		:"=m" (*(char *) vaddr),
+		:"=m" (*(char *)fix_to_virt(FIX_WP_TEST)),
 		 "=q" (tmp_reg),
 		 "=r" (flag)
 		:"2" (1)
diff -Nru a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c
--- a/arch/i386/mm/ioremap.c	Wed Oct 30 16:44:26 2002
+++ b/arch/i386/mm/ioremap.c	Wed Oct 30 16:44:26 2002
@@ -289,7 +289,7 @@
 
 	idx = FIX_BTMAP_BEGIN;
 	while (nrpages > 0) {
-		__set_fixmap(idx, 0, __pgprot(0));
+		clear_fixmap(idx);
 		--idx;
 		--nrpages;
 	}
diff -Nru a/arch/i386/oprofile/Config.help b/arch/i386/oprofile/Config.help
--- a/arch/i386/oprofile/Config.help	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,6 +0,0 @@
-CONFIG_OPROFILE
-  OProfile is a profiling system capable of profiling the
-  whole system, include the kernel, kernel modules, libraries,
-  and applications.
-
-  If unsure, say N.
diff -Nru a/arch/i386/oprofile/Config.in b/arch/i386/oprofile/Config.in
--- a/arch/i386/oprofile/Config.in	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,9 +0,0 @@
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Profiling support'
-   bool 'Profiling support (EXPERIMENTAL)' CONFIG_PROFILING
-   if [ "$CONFIG_PROFILING" = "y" ]; then
-      tristate '  OProfile system profiling (EXPERIMENTAL)' CONFIG_OPROFILE
-   fi
-   endmenu
-fi
diff -Nru a/arch/i386/oprofile/Kconfig b/arch/i386/oprofile/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/i386/oprofile/Kconfig	Wed Oct 30 16:44:39 2002
@@ -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 -Nru a/arch/i386/oprofile/op_model_athlon.c b/arch/i386/oprofile/op_model_athlon.c
--- a/arch/i386/oprofile/op_model_athlon.c	Wed Oct 30 16:44:30 2002
+++ b/arch/i386/oprofile/op_model_athlon.c	Wed Oct 30 16:44:30 2002
@@ -95,17 +95,16 @@
 			      struct pt_regs * const regs)
 {
 	unsigned int low, high;
-	int handled = 0;
 	int i;
 	for (i = 0 ; i < NUM_COUNTERS; ++i) {
 		CTR_READ(low, high, msrs, i);
 		if (CTR_OVERFLOWED(low)) {
 			oprofile_add_sample(regs->eip, i, cpu);
 			CTR_WRITE(reset_value[i], msrs, i);
-			handled = 1;
+			return 1;
 		}
 	}
-	return handled;
+	return 0;
 }
 
  
diff -Nru a/arch/i386/oprofile/op_model_ppro.c b/arch/i386/oprofile/op_model_ppro.c
--- a/arch/i386/oprofile/op_model_ppro.c	Wed Oct 30 16:44:30 2002
+++ b/arch/i386/oprofile/op_model_ppro.c	Wed Oct 30 16:44:30 2002
@@ -90,17 +90,16 @@
 {
 	unsigned int low, high;
 	int i;
-	int handled = 0;
  
 	for (i = 0 ; i < NUM_COUNTERS; ++i) {
 		CTR_READ(low, high, msrs, i);
 		if (CTR_OVERFLOWED(low)) {
 			oprofile_add_sample(regs->eip, i, cpu);
 			CTR_WRITE(reset_value[i], msrs, i);
-			handled = 1;
+			return 1;
 		}
 	}
-	return handled;
+	return 0;
 }
 
  
diff -Nru a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile
--- a/arch/i386/pci/Makefile	Wed Oct 30 16:44:29 2002
+++ b/arch/i386/pci/Makefile	Wed Oct 30 16:44:29 2002
@@ -3,7 +3,7 @@
 obj-$(CONFIG_PCI_BIOS)		+= pcbios.o
 obj-$(CONFIG_PCI_DIRECT)	+= direct.o
 
-ifdef	CONFIG_MULTIQUAD
+ifdef	CONFIG_X86_NUMAQ
 obj-y		+= numa.o
 else
 obj-y		+= fixup.o
@@ -14,7 +14,7 @@
 obj-y		+= legacy.o
 
 
-endif		# CONFIG_MULTIQUAD
+endif		# CONFIG_X86_NUMAQ
 obj-y		+= irq.o common.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/Config.help b/arch/ia64/Config.help
--- a/arch/ia64/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,564 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_IA64
-  The Itanium is Intel's 64-bit successor to the 32-bit X86 line.  As
-  of early 2001 it is not yet in widespread production use.  The Linux
-  IA-64 project has a home page at <http://www.linuxia64.org/>.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_DISCONTIGMEM
-  Say Y to upport 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.
-
-CONFIG_NUMA
-  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
-  Access).  This option is for configuring high-end multiprocessor
-  server machines.  If in doubt, say N.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_DEVFS_FS
-  This is support for devfs, a virtual file system (like /proc) which
-  provides the file system interface to device drivers, normally found
-  in /dev. Devfs does not depend on major and minor number
-  allocations. Device drivers register entries in /dev which then
-  appear automatically, which means that the system administrator does
-  not have to create character and block special device files in the
-  /dev directory using the mknod command (or MAKEDEV script) anymore.
-
-  This is work in progress. If you want to use this, you *must* read
-  the material in <file:Documentation/filesystems/devfs/>, especially
-  the file README there.
-
-  If unsure, say N.
-
-CONFIG_DEVFS_DEBUG
-  If you say Y here, then the /dev file system code will generate
-  debugging messages. See the file
-  <file:Documentation/filesystems/devfs/boot-options> for more
-  details.
-
-  If unsure, say N.
-
-CONFIG_PM
-  "Power Management" means that parts of your computer are shut
-  off or put into a power conserving "sleep" mode if they are not
-  being used.  There are two competing standards for doing this: APM
-  and ACPI.  If you want to use either one, say Y here and then also
-  to the requisite support below.
-
-  Power Management is most important for battery powered laptop
-  computers; if you have a laptop, check out the Linux Laptop home
-  page on the WWW at
-  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
-  Battery Powered Linux mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that, even if you say N here, Linux on the x86 architecture
-  will issue the hlt instruction if nothing is to be done, thereby
-  sending the processor to sleep and saving power.
-
-CONFIG_ACPI
-  ACPI/OSPM support for Linux is currently under development. As such,
-  this support is preliminary and EXPERIMENTAL.  Configuring ACPI
-  support enables kernel interfaces that allow higher level software
-  (OSPM) to manipulate ACPI defined hardware and software interfaces,
-  including the evaluation of ACPI control methods.  If unsure, choose
-  N here.  Note, this option will enlarge your kernel by about 120K.
-
-  This support requires an ACPI compliant platform (hardware/firmware).
-  If both ACPI and Advanced Power Management (APM) support are
-  configured, whichever is loaded first shall be used.
-
-  This code DOES NOT currently provide a complete OSPM implementation
-  -- it has not yet reached APM's level of functionality.  When fully
-  implemented, Linux ACPI/OSPM will provide a more robust functional
-  replacement for legacy configuration and power management
-  interfaces, including the Plug-and-Play BIOS specification (PnP
-  BIOS), the Multi-Processor Specification (MPS), and the Advanced
-  Power Management specification (APM).
-
-  Linux support for ACPI/OSPM is based on Intel Corporation's ACPI
-  Component Architecture (ACPI CA). The latest ACPI CA source code,
-  documentation, debug builds, and implementation status information
-  can be downloaded from:
-  <http://developer.intel.com/technology/iapc/acpi/downloads.htm>.
-
-  The ACPI Sourceforge project may also be of interest:
-  <http://sf.net/projects/acpi/>
-
-CONFIG_ACPI_KERNEL_CONFIG
-  If you say `Y' here, Linux's ACPI support will use the
-  hardware-level system descriptions found on IA64 machines.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_ITANIUM
-  Select your IA64 processor type.  The default is Intel Itanium.
-
-CONFIG_MCKINLEY
-  Select this to configure for an Itanium 2 (McKinley) processor.
-
-CONFIG_IA64_GENERIC
-  This selects the system type of your hardware.  A "generic" kernel
-  will run on any supported IA-64 system.  However, if you configure
-  a kernel for your specific system, it will be faster and smaller.
-
-  To find out what type of IA-64 system you have, you may want to
-  check the IA-64 Linux web site at <http://www.linux-ia64.org/>.
-  As of the time of this writing, most hardware is DIG compliant,
-  so the "DIG-compliant" option is usually the right choice.
-
-  HP-simulator   For the HP simulator
-                 (<http://software.hp.com/ia64linux/>).
-  HP-zx1         For HP zx1 platforms.
-  SN1-simulator  For the SGI SN1 simulator.
-  DIG-compliant  For DIG ("Developer's Interface Guide") compliant
-                 systems.
-
-  If you don't know what to do, choose "generic".
-
-CONFIG_IA64_HP_ZX1
-  Build a kernel that runs on HP zx1-based systems.  This adds support
-  for the zx1 IOMMU and makes root bus bridges appear in PCI config space
-  (required for zx1 agpgart support).
-
-CONFIG_IA64_PAGE_SIZE_4KB
-  This lets you select the page size of the kernel.  For best IA-64
-  performance, a page size of 8KB or 16KB is recommended.  For best
-  IA-32 compatibility, a page size of 4KB should be selected (the vast
-  majority of IA-32 binaries work perfectly fine with a larger page
-  size).  For Itanium systems, do NOT chose a page size larger than
-  16KB.
-
-  4KB                For best IA-32 compatibility
-  8KB                For best IA-64 performance
-  16KB               For best IA-64 performance
-  64KB               Not for Itanium.
-
-  If you don't know what to do, choose 8KB.
-
-CONFIG_ITANIUM_BSTEP_SPECIFIC
-  Select this option to build a kernel for an Itanium prototype system
-  with a B-step CPU.  You have a B-step CPU if the "revision" field in
-  /proc/cpuinfo has a value in the range from 1 to 4.
-
-CONFIG_IA64_SGI_AUTOTEST
-  Build a kernel used for hardware validation. If you include the
-  keyword "autotest" on the boot command line, the kernel does NOT boot.
-  Instead, it starts all cpus and runs cache coherency tests instead.
-
-  If unsure, say N.
-
-CONFIG_IA64_SGI_SN_DEBUG
-  Turns on extra debugging code in the SGI SN (Scalable NUMA) platform
-  for IA64.  Unless you are debugging problems on an SGI SN IA64 box,
-  say N.
-
-CONFIG_IA64_SGI_SN_SIM
-  If you are compiling a kernel that will run under SGI's IA64
-  simulator (Medusa) then say Y, otherwise say N.
-
-CONFIG_SERIAL_SGI_L1_PROTOCOL
-  Uses protocol mode instead of raw mode for the level 1 console on the
-  SGI SN (Scalable NUMA) platform for IA64.  If you are compiling for
-  an SGI SN box then Y is the recommended value, otherwise say N.
-
-CONFIG_PCIBA
-  IRIX PCIBA-inspired user mode PCI interface for the SGI SN (Scalable
-  NUMA) platform for IA64.  Unless you are compiling a kernel for an
-  SGI SN IA64 box, say N.
-
-CONFIG_IA64_MCA
-  Say Y here to enable machine check support for IA-64.  If you're
-  unsure, answer Y.
-
-CONFIG_DISABLE_VHPT
-  The Virtual Hash Page Table (VHPT) enhances virtual address
-  translation performance.  Normally you want the VHPT active but you
-  can select this option to disable the VHPT for debugging.  If you're
-  unsure, answer N.
-
-CONFIG_MCKINLEY_ASTEP_SPECIFIC
-  Select this option to build a kernel for an IA64 McKinley system
-  with any A-stepping CPU.
-
-CONFIG_MCKINLEY_A0_SPECIFIC
-  Select this option to build a kernel for an IA64 McKinley system
-  with an A0 or A1 stepping CPU.
-
-CONFIG_IA64_DEBUG_CMPXCHG
-  Selecting this option turns on bug checking for the IA64
-  compare-and-exchange instructions.  This is slow!  Itaniums
-  from step B3 or later don't have this problem. If you're unsure,
-  select N.
-
-CONFIG_IA64_DEBUG_IRQ
-  Selecting this option turns on bug checking for the IA64 irq_save
-  and restore instructions.  It's useful for tracking down spinlock
-  problems, but slow!  If you're unsure, select N.
-
-CONFIG_IA64_EARLY_PRINTK
-  Selecting this option uses the VGA screen for printk() output before
-  the consoles are initialised.  It is useful for debugging problems
-  early in the boot process, but only if you have a VGA screen
-  attached.  If you're unsure, select N.
-
-CONFIG_IA64_PRINT_HAZARDS
-  Selecting this option prints more information for Illegal Dependency
-  Faults, that is, for Read after Write, Write after Write or Write
-  after Read violations.  This option is ignored if you are compiling
-  for an Itanium A step processor (CONFIG_ITANIUM_ASTEP_SPECIFIC).  If
-  you're unsure, select Y.
-
-CONFIG_PERFMON
-  Selects whether support for the IA-64 performance monitor hardware
-  is included in the kernel.  This makes some kernel data-structures a
-  little bigger and slows down execution a bit, but it is still
-  usually a good idea to turn this on.  If you're unsure, say N.
-
-CONFIG_IA64_PALINFO
-  If you say Y here, you are able to get PAL (Processor Abstraction
-  Layer) information in /proc/pal.  This contains useful information
-  about the processors in your systems, such as cache and TLB sizes
-  and the PAL firmware version in use.
-
-  To use this option, you have to check that the "/proc file system
-  support" (CONFIG_PROC_FS) is enabled, too.
-
-CONFIG_IA32_SUPPORT
-  IA64 processors can run IA32 (that is, x86) binaries by emulating
-  the IA32 instruction set.  Say Y here to build in kernel support for
-  this.  If in doubt, say Y.
-
-CONFIG_EFI_VARS
-  If you say Y here, you are able to get EFI (Extensible Firmware
-  Interface) variable information in /proc/efi/vars.  You may read,
-  write, create, and destroy EFI variables through this interface.
-
-  To use this option, you have to check that the "/proc file system
-  support" (CONFIG_PROC_FS) is enabled, too.
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  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
-  memory.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_IA64_GRANULE_16MB
-  IA64 identity-mapped regions use a large page size called "granules".
-
-  Select "16MB" for a small granule size.
-  Select "64MB" for a large granule size.  This is the current default.
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ia64/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,991 @@
+
+mainmenu "IA-64 Linux Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Processor type and features"
+
+config IA64
+	bool
+	default y
+	help
+	  The Itanium is Intel's 64-bit successor to the 32-bit X86 line.  As
+	  of early 2001 it is not yet in widespread production use.  The Linux
+	  IA-64 project has a home page at <http://www.linuxia64.org/>.
+
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config SBUS
+	bool
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+choice
+	prompt "IA-64 processor type"
+	default ITANIUM
+
+config ITANIUM
+	bool "Itanium"
+	help
+	  Select your IA64 processor type.  The default is Intel Itanium.
+
+config MCKINLEY
+	bool "Itanium-2"
+	help
+	  Select this to configure for an Itanium 2 (McKinley) processor.
+
+endchoice
+
+choice
+	prompt "IA-64 system type"
+	default IA64_GENERIC
+
+config IA64_GENERIC
+	bool "generic"
+	---help---
+	  This selects the system type of your hardware.  A "generic" kernel
+	  will run on any supported IA-64 system.  However, if you configure
+	  a kernel for your specific system, it will be faster and smaller.
+
+	  To find out what type of IA-64 system you have, you may want to
+	  check the IA-64 Linux web site at <http://www.linux-ia64.org/>.
+	  As of the time of this writing, most hardware is DIG compliant,
+	  so the "DIG-compliant" option is usually the right choice.
+
+	  HP-simulator   For the HP simulator
+	  (<http://software.hp.com/ia64linux/>).
+	  HP-zx1         For HP zx1 platforms.
+	  SN1-simulator  For the SGI SN1 simulator.
+	  DIG-compliant  For DIG ("Developer's Interface Guide") compliant
+	  systems.
+
+	  If you don't know what to do, choose "generic".
+
+config IA64_DIG
+	bool "DIG-compliant"
+
+config IA64_HP_SIM
+	bool "HP-simulator"
+
+config IA64_HP_ZX1
+	bool "HP-zx1"
+	help
+	  Build a kernel that runs on HP zx1-based systems.  This adds support
+	  for the zx1 IOMMU and makes root bus bridges appear in PCI config space
+	  (required for zx1 agpgart support).
+
+config IA64_SGI_SN1
+	bool "SGI-SN1"
+
+config IA64_SGI_SN2
+	bool "SGI-SN2"
+
+endchoice
+
+choice
+	prompt "Kernel page size"
+	default IA64_PAGE_SIZE_16KB
+
+config IA64_PAGE_SIZE_4KB
+	bool "4KB"
+	---help---
+	  This lets you select the page size of the kernel.  For best IA-64
+	  performance, a page size of 8KB or 16KB is recommended.  For best
+	  IA-32 compatibility, a page size of 4KB should be selected (the vast
+	  majority of IA-32 binaries work perfectly fine with a larger page
+	  size).  For Itanium systems, do NOT chose a page size larger than
+	  16KB.
+
+	  4KB                For best IA-32 compatibility
+	  8KB                For best IA-64 performance
+	  16KB               For best IA-64 performance
+	  64KB               Not for Itanium.
+
+	  If you don't know what to do, choose 8KB.
+
+config IA64_PAGE_SIZE_8KB
+	bool "8KB"
+
+config IA64_PAGE_SIZE_16KB
+	bool "16KB"
+
+config IA64_PAGE_SIZE_64KB
+	depends on !ITANIUM
+	bool "64KB"
+
+endchoice
+
+config ACPI
+	bool
+	depends on !IA64_HP_SIM
+	default y
+	---help---
+	  ACPI/OSPM support for Linux is currently under development. As such,
+	  this support is preliminary and EXPERIMENTAL.  Configuring ACPI
+	  support enables kernel interfaces that allow higher level software
+	  (OSPM) to manipulate ACPI defined hardware and software interfaces,
+	  including the evaluation of ACPI control methods.  If unsure, choose
+	  N here.  Note, this option will enlarge your kernel by about 120K.
+
+	  This support requires an ACPI compliant platform (hardware/firmware).
+	  If both ACPI and Advanced Power Management (APM) support are
+	  configured, whichever is loaded first shall be used.
+
+	  This code DOES NOT currently provide a complete OSPM implementation
+	  -- it has not yet reached APM's level of functionality.  When fully
+	  implemented, Linux ACPI/OSPM will provide a more robust functional
+	  replacement for legacy configuration and power management
+	  interfaces, including the Plug-and-Play BIOS specification (PnP
+	  BIOS), the Multi-Processor Specification (MPS), and the Advanced
+	  Power Management specification (APM).
+
+	  Linux support for ACPI/OSPM is based on Intel Corporation's ACPI
+	  Component Architecture (ACPI CA). The latest ACPI CA source code,
+	  documentation, debug builds, and implementation status information
+	  can be downloaded from:
+	  <http://developer.intel.com/technology/iapc/acpi/downloads.htm>.
+
+	  The ACPI Sourceforge project may also be of interest:
+	  <http://sf.net/projects/acpi/>
+
+config ACPI_EFI
+	bool
+	depends on !IA64_HP_SIM
+	default y
+
+config ACPI_INTERPRETER
+	bool
+	depends on !IA64_HP_SIM
+	default y
+
+config ACPI_KERNEL_CONFIG
+	bool
+	depends on !IA64_HP_SIM
+	default y
+	help
+	  If you say `Y' here, Linux's ACPI support will use the
+	  hardware-level system descriptions found on IA64 machines.
+
+config IA64_BRL_EMU
+	bool
+	depends on ITANIUM
+	default y
+
+config ITANIUM_BSTEP_SPECIFIC
+	bool "Enable Itanium B-step specific code"
+	depends on ITANIUM
+	help
+	  Select this option to build a kernel for an Itanium prototype system
+	  with a B-step CPU.  You have a B-step CPU if the "revision" field in
+	  /proc/cpuinfo has a value in the range from 1 to 4.
+
+# align cache-sensitive data to 128 bytes
+config IA64_L1_CACHE_SHIFT
+	int
+	default "7" if MCKINLEY || ITANIUM && IA64_SGI_SN1
+	default "6" if ITANIUM && !IA64_SGI_SN1
+
+# align cache-sensitive data to 64 bytes
+config MCKINLEY_ASTEP_SPECIFIC
+	bool "Enable McKinley A-step specific code"
+	depends on MCKINLEY
+	help
+	  Select this option to build a kernel for an IA64 McKinley system
+	  with any A-stepping CPU.
+
+config MCKINLEY_A0_SPECIFIC
+	bool "Enable McKinley A0/A1-step specific code"
+	depends on MCKINLEY_ASTEP_SPECIFIC
+	help
+	  Select this option to build a kernel for an IA64 McKinley system
+	  with an A0 or A1 stepping CPU.
+
+config NUMA
+	bool "Enable NUMA support" if IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
+	default y if IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
+	  Access).  This option is for configuring high-end multiprocessor
+	  server machines.  If in doubt, say N.
+
+config DISCONTIGMEM
+	bool
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2 || (IA64_GENERIC || IA64_DIG || IA64_HP_ZX1) && NUMA
+	default y
+	help
+	  Say Y to upport 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.
+
+config IA64_MCA
+	bool "Enable IA-64 Machine Check Abort" if IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
+	default y if IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  Say Y here to enable machine check support for IA-64.  If you're
+	  unsure, answer Y.
+
+config PM
+	bool
+	depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
+	default y
+	---help---
+	  "Power Management" means that parts of your computer are shut
+	  off or put into a power conserving "sleep" mode if they are not
+	  being used.  There are two competing standards for doing this: APM
+	  and ACPI.  If you want to use either one, say Y here and then also
+	  to the requisite support below.
+
+	  Power Management is most important for battery powered laptop
+	  computers; if you have a laptop, check out the Linux Laptop home
+	  page on the WWW at
+	  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
+	  Battery Powered Linux mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that, even if you say N here, Linux on the x86 architecture
+	  will issue the hlt instruction if nothing is to be done, thereby
+	  sending the processor to sleep and saving power.
+
+config IOSAPIC
+	bool
+	depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
+	default y
+
+config IA64_SGI_SN
+	bool
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	default y
+
+config IA64_SGI_SN_DEBUG
+	bool "Enable extra debugging code"
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  Turns on extra debugging code in the SGI SN (Scalable NUMA) platform
+	  for IA64.  Unless you are debugging problems on an SGI SN IA64 box,
+	  say N.
+
+config IA64_SGI_SN_SIM
+	bool "Enable SGI Medusa Simulator Support"
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  If you are compiling a kernel that will run under SGI's IA64
+	  simulator (Medusa) then say Y, otherwise say N.
+
+config IA64_SGI_AUTOTEST
+	bool "Enable autotest (llsc). Option to run cache test instead of booting"
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  Build a kernel used for hardware validation. If you include the
+	  keyword "autotest" on the boot command line, the kernel does NOT boot.
+	  Instead, it starts all cpus and runs cache coherency tests instead.
+
+	  If unsure, say N.
+
+config SERIAL_SGI_L1_PROTOCOL
+	bool "Enable protocol mode for the L1 console"
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  Uses protocol mode instead of raw mode for the level 1 console on the
+	  SGI SN (Scalable NUMA) platform for IA64.  If you are compiling for
+	  an SGI SN box then Y is the recommended value, otherwise say N.
+
+config PERCPU_IRQ
+	bool
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	default y
+
+config PCIBA
+	tristate "PCIBA support"
+	depends on IA64_SGI_SN1 || IA64_SGI_SN2
+	help
+	  IRIX PCIBA-inspired user mode PCI interface for the SGI SN (Scalable
+	  NUMA) platform for IA64.  Unless you are compiling a kernel for an
+	  SGI SN IA64 box, say N.
+
+# On IA-64, we always want an ELF /proc/kcore.
+config KCORE_ELF
+	bool
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config FORCE_MAX_ZONEORDER
+	int
+	default "18"
+
+config HUGETLB_PAGE
+	bool "IA-64 Huge TLB Page Support"
+
+choice
+	prompt "IA-64 Huge TLB Page Size"
+	depends on HUGETLB_PAGE
+	default HUGETLB_PAGE_SIZE_16MB
+
+config HUGETLB_PAGE_SIZE_4GB
+	depends on MCKINLEY
+	bool "4GB"
+
+config HUGETLB_PAGE_SIZE_256MB
+	bool "256MB"
+
+config HUGETLB_PAGE_SIZE_64MB
+	bool "64MB"
+
+config HUGETLB_PAGE_SIZE_16MB
+	bool "16MB"
+
+config HUGETLB_PAGE_SIZE_4MB
+	bool "4MB"
+
+config HUGETLB_PAGE_SIZE_1MB
+	bool "1MB"
+
+config HUGETLB_PAGE_SIZE_256KB
+	bool "256KB"
+
+endchoice
+
+config SMP
+	bool "SMP support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config IA32_SUPPORT
+	bool "Support running of Linux/x86 binaries"
+	help
+	  IA64 processors can run IA32 (that is, x86) binaries by emulating
+	  the IA32 instruction set.  Say Y here to build in kernel support for
+	  this.  If in doubt, say Y.
+
+config PERFMON
+	bool "Performance monitor support"
+	help
+	  Selects whether support for the IA-64 performance monitor hardware
+	  is included in the kernel.  This makes some kernel data-structures a
+	  little bigger and slows down execution a bit, but it is still
+	  usually a good idea to turn this on.  If you're unsure, say N.
+
+config IA64_PALINFO
+	tristate "/proc/pal support"
+	help
+	  If you say Y here, you are able to get PAL (Processor Abstraction
+	  Layer) information in /proc/pal.  This contains useful information
+	  about the processors in your systems, such as cache and TLB sizes
+	  and the PAL firmware version in use.
+
+	  To use this option, you have to check that the "/proc file system
+	  support" (CONFIG_PROC_FS) is enabled, too.
+
+config EFI_VARS
+	tristate "/proc/efi/vars support"
+	help
+	  If you say Y here, you are able to get EFI (Extensible Firmware
+	  Interface) variable information in /proc/efi/vars.  You may read,
+	  write, create, and destroy EFI variables through this interface.
+
+	  To use this option, you have to check that the "/proc file system
+	  support" (CONFIG_PROC_FS) is enabled, too.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-64)"
+	depends on SMP
+	default "64"
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+if !IA64_HP_SIM
+
+source "drivers/acpi/Kconfig"
+
+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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/hotplug/Kconfig"
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+endif
+
+endmenu
+
+if !IA64_HP_SIM
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "drivers/md/Kconfig"
+
+source "drivers/message/fusion/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+endif
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "net/Kconfig"
+
+
+if !IA64_HP_SIM
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+
+menu "CD-ROM drivers (not for SCSI or IDE/ATAPI drives)"
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+source "drivers/media/Kconfig"
+
+endif
+
+
+menu "Block devices"
+	depends on IA64_HP_SIM
+
+config BLK_DEV_LOOP
+	tristate "Loopback device support"
+
+config BLK_DEV_NBD
+	tristate "Network block device support"
+	depends on NET
+
+config BLK_DEV_RAM
+	tristate "RAM disk support"
+
+config BLK_DEV_RAM_SIZE
+	int "Default RAM disk size"
+	depends on BLK_DEV_RAM
+	default "4096"
+
+endmenu
+
+source "fs/Kconfig"
+
+if !IA64_HP_SIM
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+source "drivers/video/Kconfig"
+
+config PCI_CONSOLE
+	bool
+	depends on FB
+	default y
+
+endmenu
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "lib/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+endif
+
+source "arch/ia64/hp/sim/Kconfig"
+
+
+menu "Kernel hacking"
+
+choice
+	prompt "Physical memory granularity"
+	default IA64_GRANULE_64MB
+
+config IA64_GRANULE_16MB
+	bool "16MB"
+	help
+	  IA64 identity-mapped regions use a large page size called "granules".
+
+	  Select "16MB" for a small granule size.
+	  Select "64MB" for a large granule size.  This is the current default.
+
+config IA64_GRANULE_64MB
+	bool "64MB"
+
+endchoice
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config KALLSYMS
+	bool "Load all symbols for debugging/kksymoops"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to let the kernel print out symbolic crash information and
+	  symbolic stack backtraces. This increases the size of the kernel
+	  somewhat, as all symbols have to be loaded into the kernel image.
+
+config IA64_PRINT_HAZARDS
+	bool "Print possible IA64 hazards to console"
+	depends on DEBUG_KERNEL
+	help
+	  Selecting this option prints more information for Illegal Dependency
+	  Faults, that is, for Read after Write, Write after Write or Write
+	  after Read violations.  This option is ignored if you are compiling
+	  for an Itanium A step processor (CONFIG_ITANIUM_ASTEP_SPECIFIC).  If
+	  you're unsure, select Y.
+
+config DISABLE_VHPT
+	bool "Disable VHPT"
+	depends on DEBUG_KERNEL
+	help
+	  The Virtual Hash Page Table (VHPT) enhances virtual address
+	  translation performance.  Normally you want the VHPT active but you
+	  can select this option to disable the VHPT for debugging.  If you're
+	  unsure, answer N.
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config IA64_EARLY_PRINTK
+	bool "Early printk support"
+	depends on DEBUG_KERNEL
+	help
+	  Selecting this option uses the VGA screen for printk() output before
+	  the consoles are initialised.  It is useful for debugging problems
+	  early in the boot process, but only if you have a VGA screen
+	  attached.  If you're unsure, select N.
+
+config IA64_EARLY_PRINTK_UART
+	bool "Early printk on MMIO serial port"
+	depends on IA64_EARLY_PRINTK
+
+config IA64_EARLY_PRINTK_UART_BASE
+	hex "UART MMIO base address"
+	depends on IA64_EARLY_PRINTK_UART
+	default "ff5e0000"
+
+config IA64_EARLY_PRINTK_VGA
+	bool "Early printk on VGA"
+	depends on IA64_EARLY_PRINTK
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	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
+	  memory.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and build SMP to catch missing spinlock initialization
+	  and certain other kinds of spinlock errors commonly made.  This is
+	  best used in conjunction with the NMI watchdog so that spinlock
+	  deadlocks are also debuggable.
+
+config IA64_DEBUG_CMPXCHG
+	bool "Turn on compare-and-exchange bug checking (slow!)"
+	depends on DEBUG_KERNEL
+	help
+	  Selecting this option turns on bug checking for the IA64
+	  compare-and-exchange instructions.  This is slow!  Itaniums
+	  from step B3 or later don't have this problem. If you're unsure,
+	  select N.
+
+config IA64_DEBUG_IRQ
+	bool "Turn on irq debug checks (slow!)"
+	depends on DEBUG_KERNEL
+	help
+	  Selecting this option turns on bug checking for the IA64 irq_save
+	  and restore instructions.  It's useful for tracking down spinlock
+	  problems, but slow!  If you're unsure, select N.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
diff -Nru a/arch/ia64/Makefile b/arch/ia64/Makefile
--- a/arch/ia64/Makefile	Wed Oct 30 16:44:19 2002
+++ b/arch/ia64/Makefile	Wed Oct 30 16:44:19 2002
@@ -33,44 +33,48 @@
 	CFLAGS += -mb-step
 endif
 
-HEAD := arch/$(ARCH)/kernel/head.o arch/ia64/kernel/init_task.o
+HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
 
-core-$(CONFIG_IA64_GENERIC) 	+= arch/$(ARCH)/hp/	  arch/$(ARCH)/dig/
-core-$(CONFIG_IA64_HP_SIM)	+= arch/$(ARCH)/hp/
-core-$(CONFIG_IA64_HP_ZX1)	+= arch/$(ARCH)/hp/ 	  arch/$(ARCH)/dig/
-core-$(CONFIG_IA64_SGI_SN)	+= arch/$(ARCH)/sn/kernel arch/$(ARCH)/sn/io
+libs-y				+= arch/$(ARCH)/lib/
+core-y				+= arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
+core-$(CONFIG_IA32_SUPPORT)	+= arch/$(ARCH)/ia32/
 core-$(CONFIG_IA64_DIG) 	+= arch/$(ARCH)/dig/
+core-$(CONFIG_IA64_GENERIC) 	+= arch/$(ARCH)/dig/ arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/ \
+				   arch/$(ARCH)/hp/sim/
+core-$(CONFIG_IA64_HP_ZX1)	+= arch/$(ARCH)/dig/
+core-$(CONFIG_IA64_SGI_SN)	+= arch/$(ARCH)/sn/kernel arch/$(ARCH)/sn/io \
+				   arch/$(ARCH)/sn/fakeprom
+drivers-$(CONFIG_PCI)		+= arch/$(ARCH)/pci/
+drivers-$(CONFIG_IA64_HP_SIM)	+= arch/$(ARCH)/hp/sim/
+drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/
 
 ifdef CONFIG_IA64_SGI_SN
 	CFLAGS			+= -DBRINGUP
         SUBDIRS         	+= arch/$(ARCH)/sn/fakeprom
 endif
 
-core-$(CONFIG_IA32_SUPPORT)	+= arch/$(ARCH)/ia32/
+makeboot = $(call descend,arch/ia64/boot,$(1))
+maketool = $(call descend,arch/ia64/tools,$(1))
 
-libs-y				+= arch/$(ARCH)/lib/
-core-y				+= arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
-drivers-$(CONFIG_PCI)		+= arch/$(ARCH)/pci/
-drivers-$(CONFIG_IA64_HP_ZX1)	+= arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/
+.PHONY: compressed archclean archmrproper $(TOPDIR)/include/asm-ia64/offsets.h
+
+all: compressed boot
 
-MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
+boot: vmlinux
+	+@$(call makeboot,all)
 
 compressed: vmlinux
 	$(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux-tmp
 	gzip vmlinux-tmp
 	mv vmlinux-tmp.gz vmlinux.gz
 
-rawboot:
-	@$(MAKEBOOT) rawboot
-
 archclean:
-	@$(MAKEBOOT) clean
+	$(MAKE) -rR -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
 
 archmrproper:
-	@$(MAKE) -C arch/$(ARCH)/tools mrproper
 
 prepare: $(TOPDIR)/include/asm-ia64/offsets.h
 
 $(TOPDIR)/include/asm-ia64/offsets.h: include/asm include/linux/version.h \
 				      include/config/MARKER
-	@$(MAKE) -C arch/$(ARCH)/tools $@
+	+@$(call maketool,$@)
diff -Nru a/arch/ia64/boot/Makefile b/arch/ia64/boot/Makefile
--- a/arch/ia64/boot/Makefile	Wed Oct 30 16:44:29 2002
+++ b/arch/ia64/boot/Makefile	Wed Oct 30 16:44:29 2002
@@ -8,9 +8,9 @@
 # Copyright (C) 1998 by David Mosberger-Tang <davidm@hpl.hp.com>
 #
 
-LINKFLAGS = -static -T bootloader.lds
+LINKFLAGS = -static -T $(src)/bootloader.lds
 
-OBJECTS	= bootloader.o
+OBJS	= $(obj)/bootloader.o
 
 targets-$(CONFIG_IA64_HP_SIM)	+= bootloader
 targets-$(CONFIG_IA64_GENERIC)	+= bootloader
@@ -19,8 +19,8 @@
 
 all:	$(targets-y)
 
-bootloader: $(OBJECTS)
-	$(LD) $(LINKFLAGS) $(OBJECTS) $(TOPDIR)/lib/lib.a $(TOPDIR)/arch/$(ARCH)/lib/lib.a \
+bootloader: $(OBJS)
+	$(LD) $(LINKFLAGS) $(OBJS) $(TOPDIR)/lib/lib.a $(TOPDIR)/arch/$(ARCH)/lib/lib.a \
 	-o bootloader
 
 clean:
diff -Nru a/arch/ia64/config.in b/arch/ia64/config.in
--- a/arch/ia64/config.in	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,290 +0,0 @@
-mainmenu_name "IA-64 Linux Kernel Configuration"
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Processor type and features'
-
-define_bool CONFIG_IA64 y
-
-define_bool CONFIG_ISA n
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_SBUS n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-
-choice 'IA-64 processor type' \
-	"Itanium			CONFIG_ITANIUM \
-	 Itanium-2			CONFIG_MCKINLEY" Itanium
-
-choice 'IA-64 system type'					\
-	"generic		CONFIG_IA64_GENERIC		\
-	 DIG-compliant		CONFIG_IA64_DIG			\
-	 HP-simulator		CONFIG_IA64_HP_SIM		\
-	 HP-zx1			CONFIG_IA64_HP_ZX1		\
-	 SGI-SN1		CONFIG_IA64_SGI_SN1		\
-	 SGI-SN2		CONFIG_IA64_SGI_SN2" generic
-
-if [ "$CONFIG_ITANIUM" = "y" ]; then
-  choice 'Kernel page size'						\
-	"4KB			CONFIG_IA64_PAGE_SIZE_4KB		\
-	 8KB			CONFIG_IA64_PAGE_SIZE_8KB		\
-	 16KB			CONFIG_IA64_PAGE_SIZE_16KB" 16KB
-else
-  choice 'Kernel page size'						\
-	"4KB			CONFIG_IA64_PAGE_SIZE_4KB		\
-	 8KB			CONFIG_IA64_PAGE_SIZE_8KB		\
-	 16KB			CONFIG_IA64_PAGE_SIZE_16KB		\
-	 64KB			CONFIG_IA64_PAGE_SIZE_64KB" 16KB
-fi
-
-if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
-  define_bool CONFIG_ACPI y
-  define_bool CONFIG_ACPI_EFI y
-  define_bool CONFIG_ACPI_INTERPRETER y
-  define_bool CONFIG_ACPI_KERNEL_CONFIG y
-fi
-
-if [ "$CONFIG_ITANIUM" = "y" ]; then
-	define_bool CONFIG_IA64_BRL_EMU y
-	bool '  Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC
-	if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then
-	  define_int CONFIG_IA64_L1_CACHE_SHIFT 7 # align cache-sensitive data to 128 bytes
-	else
-	  define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data to 64 bytes
-	fi
-fi
-
-if [ "$CONFIG_MCKINLEY" = "y" ]; then
-	define_int CONFIG_IA64_L1_CACHE_SHIFT 7
-	bool '  Enable McKinley A-step specific code' CONFIG_MCKINLEY_ASTEP_SPECIFIC
-	if [ "$CONFIG_MCKINLEY_ASTEP_SPECIFIC" = "y" ]; then
-	  bool '   Enable McKinley A0/A1-step specific code' CONFIG_MCKINLEY_A0_SPECIFIC
-	fi
-fi
-
-if [ "$CONFIG_IA64_GENERIC" = "y" -o "$CONFIG_IA64_DIG" = "y" -o "$CONFIG_IA64_HP_ZX1" = "y" ];
-then
-	bool '  Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA
-	define_bool CONFIG_PM y
-	define_bool CONFIG_IOSAPIC y
-fi
-
-if [ "$CONFIG_IA64_SGI_SN1" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ]; then
-	define_bool CONFIG_IA64_SGI_SN y
-	bool '  Enable extra debugging code' CONFIG_IA64_SGI_SN_DEBUG
-	bool '  Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN_SIM
-	bool '  Enable autotest (llsc). Option to run cache test instead of booting' \
-			CONFIG_IA64_SGI_AUTOTEST
-	bool '  Enable protocol mode for the L1 console' CONFIG_SERIAL_SGI_L1_PROTOCOL
-	define_bool CONFIG_DISCONTIGMEM y
-	define_bool CONFIG_IA64_MCA y
-	define_bool CONFIG_NUMA y
-	define_bool CONFIG_PERCPU_IRQ y
-	tristate '  PCIBA support' CONFIG_PCIBA
-fi
-
-define_bool CONFIG_KCORE_ELF y	# On IA-64, we always want an ELF /proc/kcore.
-
-define_int CONFIG_FORCE_MAX_ZONEORDER 18
-
-bool 'IA-64 Huge TLB Page Support' CONFIG_HUGETLB_PAGE
-
-if [ "$CONFIG_HUGETLB_PAGE" = "y" ]; then
-	if [ "$CONFIG_MCKINLEY" = "y" ]; then
-		choice '    IA-64 Huge TLB Page Size'				\
-		 	"4GB           CONFIG_HUGETLB_PAGE_SIZE_4GB		\
-		 	256MB          CONFIG_HUGETLB_PAGE_SIZE_256MB		\
-			64MB           CONFIG_HUGETLB_PAGE_SIZE_64MB		\
-			16MB           CONFIG_HUGETLB_PAGE_SIZE_16MB		\
-			4MB            CONFIG_HUGETLB_PAGE_SIZE_4MB		\
-			1MB            CONFIG_HUGETLB_PAGE_SIZE_1MB		\
-			256KB          CONFIG_HUGETLB_PAGE_SIZE_256KB" 16MB
-	else
-		choice '    IA-64 Huge TLB Page Size'				\
-		 	"256MB         CONFIG_HUGETLB_PAGE_SIZE_256MB		\
-			64MB           CONFIG_HUGETLB_PAGE_SIZE_64MB		\
-			16MB           CONFIG_HUGETLB_PAGE_SIZE_16MB		\
-			4MB            CONFIG_HUGETLB_PAGE_SIZE_4MB		\
-			1MB            CONFIG_HUGETLB_PAGE_SIZE_1MB		\
-			256KB          CONFIG_HUGETLB_PAGE_SIZE_256KB" 16MB
-	fi
-fi
-
-bool 'SMP support' CONFIG_SMP
-bool 'Support running of Linux/x86 binaries' CONFIG_IA32_SUPPORT
-bool 'Performance monitor support' CONFIG_PERFMON
-tristate '/proc/pal support' CONFIG_IA64_PALINFO
-tristate '/proc/efi/vars support' CONFIG_EFI_VARS
-
-if [ "$CONFIG_SMP" = "y" ]; then
-   int  'Maximum number of CPUs (2-64)' CONFIG_NR_CPUS 64
-fi
-
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
-  source drivers/acpi/Config.in
-
-  bool 'PCI support' CONFIG_PCI
-  source drivers/pci/Config.in
-
-  bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-  if [ "$CONFIG_HOTPLUG" = "y" ]; then
-     source drivers/hotplug/Config.in
-     source drivers/pcmcia/Config.in
-  else
-     define_bool CONFIG_PCMCIA n
-  fi
-
-  source drivers/parport/Config.in
-fi # !HP_SIM
-
-endmenu
-
-if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
-  source drivers/mtd/Config.in
-  source drivers/pnp/Config.in
-  source drivers/block/Config.in
-  source drivers/ieee1394/Config.in
-  source drivers/message/i2o/Config.in
-  source drivers/md/Config.in
-  source drivers/message/fusion/Config.in
-
-  mainmenu_option next_comment
-  comment 'ATA/ATAPI/MFM/RLL support'
-
-  tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-  if [ "$CONFIG_IDE" != "n" ]; then
-    source drivers/ide/Config.in
-  else
-    define_bool CONFIG_BLK_DEV_HD n
-  fi
-  endmenu
-fi
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-  source drivers/scsi/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_NET" = "y" ]; then
-  source net/Config.in
-fi
-
-if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
-  if [ "$CONFIG_NET" = "y" ]; then
-    mainmenu_option next_comment
-    comment 'Network device support'
-
-    bool 'Network device support' CONFIG_NETDEVICES
-    if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-    fi
-    endmenu
-  fi
-  source net/ax25/Config.in
-  source drivers/isdn/Config.in
-
-  mainmenu_option next_comment
-  comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
-
-  bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-  if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-    source drivers/cdrom/Config.in
-  fi
-  endmenu
-
-  #
-  # input before char - char/joystick depends on it. As does USB.
-  #
-  source drivers/input/Config.in
-  source drivers/char/Config.in
-
-  #source drivers/misc/Config.in
-
-  source drivers/media/Config.in
-else # HP_SIM
-
-  mainmenu_option next_comment
-  comment 'Block devices'
-  tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
-  dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-
-  tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-  if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
-    int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
-  fi
-  endmenu
-fi # HP_SIM
-
-source fs/Config.in
-
-if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
-  if [ "$CONFIG_VT" = "y" ]; then
-    mainmenu_option next_comment
-    comment 'Console drivers'
-    bool 'VGA text console' CONFIG_VGA_CONSOLE
-    source drivers/video/Config.in
-    if [ "$CONFIG_FB" = "y" ]; then
-      define_bool CONFIG_PCI_CONSOLE y
-    fi
-    endmenu
-  fi
-
-  mainmenu_option next_comment
-  comment 'Sound'
-
-  tristate 'Sound card support' CONFIG_SOUND
-  if [ "$CONFIG_SOUND" != "n" ]; then
-    source sound/Config.in
-  fi
-  endmenu
-
-  source drivers/usb/Config.in
-  source lib/Config.in
-  source net/bluetooth/Config.in
-fi # !HP_SIM
-
-if [ "$CONFIG_IA64_HP_SIM" != "n" -o "$CONFIG_IA64_GENERIC" != "n" ]; then
-  source arch/ia64/hp/sim/Config.in
-fi
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-choice 'Physical memory granularity'				\
-	"16MB			CONFIG_IA64_GRANULE_16MB	\
-	 64MB			CONFIG_IA64_GRANULE_64MB" 64MB
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   bool '  Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS
-   bool '  Disable VHPT' CONFIG_DISABLE_VHPT
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-
-   bool '  Early printk support' CONFIG_IA64_EARLY_PRINTK
-   if [ "$CONFIG_IA64_EARLY_PRINTK" != "n" ]; then
-      bool '    Early printk on MMIO serial port' CONFIG_IA64_EARLY_PRINTK_UART
-      if [ "$CONFIG_IA64_EARLY_PRINTK_UART" != "n" ]; then
-         hex '      UART MMIO base address' CONFIG_IA64_EARLY_PRINTK_UART_BASE ff5e0000
-      fi
-      bool '    Early printk on VGA' CONFIG_IA64_EARLY_PRINTK_VGA
-   fi
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   bool '  Turn on compare-and-exchange bug checking (slow!)' CONFIG_IA64_DEBUG_CMPXCHG
-   bool '  Turn on irq debug checks (slow!)' CONFIG_IA64_DEBUG_IRQ
-fi
-
-endmenu
-
-source security/Config.in
diff -Nru a/arch/ia64/defconfig b/arch/ia64/defconfig
--- a/arch/ia64/defconfig	Wed Oct 30 16:44:20 2002
+++ b/arch/ia64/defconfig	Wed Oct 30 16:44:20 2002
@@ -43,7 +43,6 @@
 # CONFIG_IA64_PAGE_SIZE_4KB is not set
 # CONFIG_IA64_PAGE_SIZE_8KB is not set
 CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
 CONFIG_ACPI=y
 CONFIG_ACPI_EFI=y
 CONFIG_ACPI_INTERPRETER=y
@@ -51,34 +50,38 @@
 CONFIG_IA64_BRL_EMU=y
 # CONFIG_ITANIUM_BSTEP_SPECIFIC is not set
 CONFIG_IA64_L1_CACHE_SHIFT=6
+# CONFIG_NUMA is not set
 CONFIG_IA64_MCA=y
 CONFIG_PM=y
+CONFIG_IOSAPIC=y
 CONFIG_KCORE_ELF=y
+CONFIG_FORCE_MAX_ZONEORDER=18
+# CONFIG_HUGETLB_PAGE is not set
 CONFIG_SMP=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
 CONFIG_EFI_VARS=y
+CONFIG_NR_CPUS=16
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
-CONFIG_NR_CPUS=64
 
 #
 # ACPI Support
 #
+CONFIG_ACPI_BUTTON=y
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_PCI=y
 CONFIG_ACPI=y
 CONFIG_ACPI_EFI=y
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_BUS=y
 CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_PCI=y
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_BUTTON=y
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_DEBUG is not set
 CONFIG_PCI=y
 CONFIG_PCI_NAMES=y
 # CONFIG_HOTPLUG is not set
@@ -90,50 +93,6 @@
 # CONFIG_PARPORT is not set
 
 #
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-CONFIG_FILTER=y
-CONFIG_UNIX=y
-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_IPV6 is not set
-# CONFIG_KHTTPD is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q 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
-
-#
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
@@ -142,6 +101,12 @@
 # Plug and Play configuration
 #
 # CONFIG_PNP is not set
+# CONFIG_PNP_NAMES is not set
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
 # CONFIG_ISAPNP is not set
 # CONFIG_PNPBIOS is not set
 
@@ -155,6 +120,7 @@
 # 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_UMEM is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -188,12 +154,21 @@
 # CONFIG_BLK_DEV_LVM is not set
 
 #
-# ATA/IDE/MFM/RLL support
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_BOOT is not set
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LAN is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
 
 #
-# ATA and ATAPI Block devices
+# IDE, ATA and ATAPI Block devices
 #
 CONFIG_BLK_DEV_IDE=y
 
@@ -207,29 +182,35 @@
 # CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
 CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
 CONFIG_BLK_DEV_IDESCSI=y
+# CONFIG_IDE_TASK_IOCTL is not set
 
 #
-# IDE chipset support
+# IDE chipset support/bugfixes
 #
 # CONFIG_BLK_DEV_CMD640 is not set
 # CONFIG_BLK_DEV_CMD640_ENHANCED is not set
 # CONFIG_BLK_DEV_ISAPNP is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_IDEPCI=y
+# CONFIG_BLK_DEV_GENERIC is not set
 CONFIG_IDEPCI_SHARE_IRQ=y
 CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDE_TCQ is not set
+# CONFIG_BLK_DEV_IDE_TCQ_DEFAULT is not set
+# CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 # CONFIG_IDEDMA_PCI_AUTO is not set
 # CONFIG_IDEDMA_ONLYDISK is not set
 CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_PCI_WIP is not set
 # CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
+CONFIG_BLK_DEV_ADMA=y
 # CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_AEC62XX_TUNING is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_WDC_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_AMD74XX_OVERRIDE is not set
 # CONFIG_BLK_DEV_CMD64X is not set
 # CONFIG_BLK_DEV_CY82C693 is not set
 # CONFIG_BLK_DEV_CS5530 is not set
@@ -237,21 +218,25 @@
 # CONFIG_HPT34X_AUTODMA is not set
 # CONFIG_BLK_DEV_HPT366 is not set
 # CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_NFORCE is not set
 # CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
 # CONFIG_PDC202XX_BURST is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_PDC202XX_FORCE is not set
+# CONFIG_BLK_DEV_RZ1000 is not set
 # CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
 # CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_IDE_CHIPSETS is not set
-# CONFIG_IDEDMA_IVB is not set
 # CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_ATARAID is not set
-# CONFIG_BLK_DEV_ATARAID_PDC is not set
-# CONFIG_BLK_DEV_ATARAID_HPT is not set
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_DMA_NONPCI is not set
+CONFIG_BLK_DEV_IDE_MODES=y
 
 #
 # SCSI support
@@ -272,6 +257,7 @@
 # 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
 
@@ -281,9 +267,7 @@
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_7000FASST is not set
 # CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AACRAID is not set
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_DPT_I2O is not set
@@ -316,15 +300,60 @@
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=y
-# CONFIG_SCSI_QLOGIC_QLA2100 is not set
-# CONFIG_SCSI_SIM710 is not set
 # CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
 #
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+# CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+CONFIG_FILTER=y
+CONFIG_UNIX=y
+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_IPV6 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_LLC is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_DEV_APPLETALK is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE 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 device support
 #
 CONFIG_NETDEVICES=y
@@ -352,6 +381,11 @@
 # 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_HP100 is not set
 # CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
@@ -373,10 +407,11 @@
 # CONFIG_8139TOO_PIO is not set
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_NEW_RX_RESET 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_SUNDANCE_MMIO is not set
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 # CONFIG_VIA_RHINE_MMIO is not set
@@ -388,6 +423,7 @@
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
+# CONFIG_E1000_NAPI is not set
 # CONFIG_MYRI_SBUS is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
@@ -419,11 +455,6 @@
 # CONFIG_WAN is not set
 
 #
-# "Tulip" family network device support
-#
-# CONFIG_NET_TULIP is not set
-
-#
 # Amateur Radio support
 #
 # CONFIG_HAMRADIO is not set
@@ -431,7 +462,7 @@
 #
 # ISDN subsystem
 #
-# CONFIG_ISDN is not set
+# CONFIG_ISDN_BOOL is not set
 
 #
 # CD-ROM drivers (not for SCSI or IDE/ATAPI drives)
@@ -442,22 +473,50 @@
 # Input device support
 #
 CONFIG_INPUT=y
-CONFIG_INPUT_KEYBDEV=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=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
 # CONFIG_GAMEPORT_NS558 is not set
 # CONFIG_GAMEPORT_L4 is not set
-# CONFIG_INPUT_EMU10K1 is not set
-# CONFIG_GAMEPORT_PCIGAME is not set
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
 # CONFIG_GAMEPORT_FM801 is not set
 # CONFIG_GAMEPORT_CS461x is not set
 CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
 CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD 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_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_JOYSTICK_ANALOG is not set
 # CONFIG_JOYSTICK_A3D is not set
@@ -465,30 +524,56 @@
 # CONFIG_JOYSTICK_COBRA is not set
 # CONFIG_JOYSTICK_GF2K is not set
 # CONFIG_JOYSTICK_GRIP is not set
+# CONFIG_JOYSTICK_GRIP_MP is not set
+# CONFIG_JOYSTICK_GUILLEMOT is not set
 # CONFIG_JOYSTICK_INTERACT is not set
 # CONFIG_JOYSTICK_SIDEWINDER is not set
 # CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE_USB is not set
-# CONFIG_JOYSTICK_IFORCE_232 is not set
+# CONFIG_JOYSTICK_IFORCE is not set
 # CONFIG_JOYSTICK_WARRIOR is not set
 # CONFIG_JOYSTICK_MAGELLAN is not set
 # CONFIG_JOYSTICK_SPACEORB is not set
 # CONFIG_JOYSTICK_SPACEBALL is not set
 # CONFIG_JOYSTICK_STINGER is not set
+# CONFIG_JOYSTICK_TWIDDLER is not set
 # CONFIG_JOYSTICK_DB9 is not set
 # CONFIG_JOYSTICK_GAMECON is not set
 # CONFIG_JOYSTICK_TURBOGRAFX is not set
+# CONFIG_INPUT_JOYDUMP is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SERIAL_ACPI=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_CS is not set
+# CONFIG_SERIAL_8250_ACPI is not set
+# CONFIG_SERIAL_8250_HCDP is not set
+CONFIG_SERIAL_8250_EXTENDED=y
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_MULTIPORT is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -500,6 +585,8 @@
 # CONFIG_I2C_PHILIPSPAR is not set
 # CONFIG_I2C_ELV is not set
 # CONFIG_I2C_VELLEMAN is not set
+# CONFIG_SCx200_I2C is not set
+# CONFIG_SCx200_ACB is not set
 # CONFIG_I2C_ALGOPCF is not set
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_PROC=y
@@ -508,10 +595,6 @@
 # Mice
 #
 # CONFIG_BUSMOUSE is not set
-CONFIG_MOUSE=y
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
@@ -521,6 +604,7 @@
 # CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
 CONFIG_EFI_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
@@ -531,71 +615,37 @@
 #
 # CONFIG_FTAPE is not set
 CONFIG_AGP=y
-# CONFIG_AGP_INTEL is not set
+CONFIG_AGP_INTEL=y
+CONFIG_AGP_I810=y
+CONFIG_AGP_VIA=y
+CONFIG_AGP_AMD=y
+CONFIG_AGP_SIS=y
+CONFIG_AGP_ALI=y
+CONFIG_AGP_SWORKS=y
+# CONFIG_AGP_AMD_8151 is not set
 CONFIG_AGP_I460=y
-# CONFIG_AGP_I810 is not set
-# CONFIG_AGP_VIA is not set
-# CONFIG_AGP_AMD is not set
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_ALI is not set
-# CONFIG_AGP_SWORKS is not set
+CONFIG_AGP_HP_ZX1=y
+CONFIG_DRM=y
 CONFIG_DRM_TDFX=y
-# CONFIG_DRM_GAMMA is not set
-# CONFIG_DRM_R128 is not set
-# CONFIG_DRM_RADEON is not set
-# CONFIG_DRM_I810 is not set
-# CONFIG_DRM_MGA is not set
+CONFIG_DRM_R128=y
+CONFIG_DRM_RADEON=y
+CONFIG_DRM_I810=y
+CONFIG_DRM_I830=y
+CONFIG_DRM_MGA=y
+# CONFIG_SCx200_GPIO is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
 # Multimedia devices
 #
-CONFIG_VIDEO_DEV=y
-
-#
-# Video For Linux
-#
-CONFIG_VIDEO_PROC_FS=y
-# CONFIG_I2C_PARPORT is not set
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_ZORAN_BUZ is not set
-# CONFIG_VIDEO_ZORAN_DC10 is not set
-# CONFIG_VIDEO_ZORAN_LML33 is not set
-# CONFIG_VIDEO_ZR36120 is not set
-# CONFIG_VIDEO_MEYE is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_MIROPCM20 is not set
-# CONFIG_RADIO_MIROPCM20_RDS is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
+# CONFIG_VIDEO_DEV is not set
 
 #
 # File systems
 #
 # CONFIG_QUOTA is not set
+# CONFIG_QFMT_V1 is not set
+# CONFIG_QFMT_V2 is not set
 CONFIG_AUTOFS_FS=y
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_REISERFS_FS is not set
@@ -606,9 +656,9 @@
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
 # CONFIG_BFS_FS is not set
-CONFIG_EXT3_FS=m
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
+CONFIG_EXT3_FS=y
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 CONFIG_FAT_FS=y
 CONFIG_MSDOS_FS=y
 # CONFIG_UMSDOS_FS is not set
@@ -645,6 +695,9 @@
 # CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
 # CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_QUOTA is not set
 
 #
 # Network File Systems
@@ -653,13 +706,17 @@
 # CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
 # CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+# CONFIG_CIFS is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_NCPFS_PACKET_SIGNING is not set
@@ -670,6 +727,7 @@
 # CONFIG_NCPFS_SMALLDOS is not set
 # CONFIG_NCPFS_NLS is not set
 # CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
 # CONFIG_ZISOFS_FS is not set
 
 #
@@ -792,23 +850,23 @@
 # Miscellaneous USB options
 #
 CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_LONG_TIMEOUT is not set
+# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
 
 #
 # USB Host Controller Drivers
 #
 # CONFIG_USB_EHCI_HCD is not set
 # CONFIG_USB_OHCI_HCD is not set
-CONFIG_USB_UHCI=m
-# CONFIG_USB_UHCI_ALT is not set
-# CONFIG_USB_OHCI is not set
+CONFIG_USB_UHCI_HCD_ALT=y
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_AUDIO is not set
 # CONFIG_USB_BLUETOOTH_TTY is not set
+# CONFIG_USB_MIDI is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 # CONFIG_USB_STORAGE is not set
@@ -819,22 +877,26 @@
 # CONFIG_USB_STORAGE_DPCM is not set
 # CONFIG_USB_STORAGE_HP8200e is not set
 # CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 
 #
 # USB Human Interface Devices (HID)
 #
-CONFIG_USB_HID=m
+CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_HID_FF is not set
+# CONFIG_HID_PID is not set
+# CONFIG_LOGITECH_FF is not set
 CONFIG_USB_HIDDEV=y
-CONFIG_USB_KBD=m
-CONFIG_USB_MOUSE=m
+# CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_XPAD is not set
 
 #
 # USB Imaging devices
 #
-# CONFIG_USB_DC2XX is not set
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_SCANNER is not set
 # CONFIG_USB_MICROTEK is not set
@@ -844,6 +906,10 @@
 # USB Multimedia devices
 #
 # CONFIG_USB_DABUSB is not set
+
+#
+#   Video4Linux support is needed for USB Multimedia device support
+#
 # CONFIG_USB_VICAM is not set
 # CONFIG_USB_DSBR is not set
 # CONFIG_USB_IBMCAM is not set
@@ -882,6 +948,7 @@
 # CONFIG_USB_SERIAL_IPAQ is not set
 # CONFIG_USB_SERIAL_IR is not set
 # CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI 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
@@ -891,6 +958,8 @@
 # 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_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
 # CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
 # CONFIG_USB_SERIAL_KLSI is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
@@ -908,6 +977,10 @@
 # CONFIG_USB_TIGL is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
+# CONFIG_USB_BRLVGER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_SPEEDTOUCH is not set
+# CONFIG_USB_TEST is not set
 
 #
 # Library routines
@@ -927,11 +1000,19 @@
 # CONFIG_IA64_GRANULE_16MB is not set
 CONFIG_IA64_GRANULE_64MB=y
 CONFIG_DEBUG_KERNEL=y
+CONFIG_KALLSYMS=y
 CONFIG_IA64_PRINT_HAZARDS=y
 # CONFIG_DISABLE_VHPT is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_IA64_EARLY_PRINTK=y
+# CONFIG_IA64_EARLY_PRINTK_UART is not set
+CONFIG_IA64_EARLY_PRINTK_VGA=y
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_IA64_DEBUG_CMPXCHG is not set
 # CONFIG_IA64_DEBUG_IRQ is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY_CAPABILITIES=y
diff -Nru a/arch/ia64/hp/Makefile b/arch/ia64/hp/Makefile
--- a/arch/ia64/hp/Makefile	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-# arch/ia64/hp/Makefile
-# Copyright (c) 2002 Matthew Wilcox for Hewlett Packard
-
-obj-$(CONFIG_IA64_GENERIC)	+= sim/ zx1/ common/
-obj-$(CONFIG_IA64_HP_SIM)	+= sim/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/hp/sim/Config.in b/arch/ia64/hp/sim/Config.in
--- a/arch/ia64/hp/sim/Config.in	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,9 +0,0 @@
-mainmenu_option next_comment
-comment 'HP Simulator drivers'
-
-bool 'Simulated Ethernet ' CONFIG_HP_SIMETH
-bool 'Simulated serial driver support' CONFIG_HP_SIMSERIAL
-if [ "$CONFIG_SCSI" != "n" ]; then
-  bool 'Simulated SCSI disk' CONFIG_HP_SIMSCSI
-fi
-endmenu
diff -Nru a/arch/ia64/hp/sim/Kconfig b/arch/ia64/hp/sim/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ia64/hp/sim/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,16 @@
+
+menu "HP Simulator drivers"
+	depends on IA64_HP_SIM || IA64_GENERIC
+
+config HP_SIMETH
+	bool "Simulated Ethernet "
+
+config HP_SIMSERIAL
+	bool "Simulated serial driver support"
+
+config HP_SIMSCSI
+	bool "Simulated SCSI disk"
+	depends on SCSI
+
+endmenu
+
diff -Nru a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
--- a/arch/ia64/hp/sim/simscsi.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/hp/sim/simscsi.c	Wed Oct 30 16:44:28 2002
@@ -20,7 +20,6 @@
 #include <asm/irq.h>
 
 #include "../drivers/scsi/scsi.h"
-#include "../drivers/scsi/sd.h"
 #include "../drivers/scsi/hosts.h"
 #include "simscsi.h"
 
@@ -146,13 +145,12 @@
 }
 
 int
-simscsi_biosparam (Disk *disk, struct block_device *n, int ip[])
+simscsi_biosparam (struct scsi_device *sdev, struct block_device *n,
+		sector_t capacity, int ip[])
 {
-	int size = disk->capacity;
-
 	ip[0] = 64;		/* heads */
 	ip[1] = 32;		/* sectors */
-	ip[2] = size >> 11;	/* cylinders */
+	ip[2] = capacity >> 11;	/* cylinders */
 	return 0;
 }
 
@@ -361,7 +359,9 @@
 			break;
 
 		      case MODE_SENSE:
-			printk("MODE_SENSE\n");
+			/* sd.c uses this to determine whether disk does write-caching. */
+			memset(sc->request_buffer, 0, 128);
+			sc->result = GOOD;
 			break;
 
 		      case START_STOP:
@@ -390,7 +390,5 @@
 
 
 static Scsi_Host_Template driver_template = SIMSCSI;
-
-#define __initcall(fn)	late_initcall(fn)
 
 #include "../drivers/scsi/scsi_module.c"
diff -Nru a/arch/ia64/hp/sim/simscsi.h b/arch/ia64/hp/sim/simscsi.h
--- a/arch/ia64/hp/sim/simscsi.h	Wed Oct 30 16:44:17 2002
+++ b/arch/ia64/hp/sim/simscsi.h	Wed Oct 30 16:44:17 2002
@@ -17,7 +17,8 @@
 extern int simscsi_queuecommand (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 extern int simscsi_abort (Scsi_Cmnd *);
 extern int simscsi_reset (Scsi_Cmnd *, unsigned int);
-extern int simscsi_biosparam (Disk *, struct block_device *, int[]);
+extern int simscsi_biosparam (struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 
 #define SIMSCSI {					\
 	detect:			simscsi_detect,		\
diff -Nru a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
--- a/arch/ia64/hp/sim/simserial.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/hp/sim/simserial.c	Wed Oct 30 16:44:28 2002
@@ -752,8 +752,7 @@
 	info->flags = sstate->flags;
 	info->xmit_fifo_size = sstate->xmit_fifo_size;
 	info->line = line;
-	info->tqueue.routine = do_softint;
-	info->tqueue.data = info;
+	INIT_WORK(&info->work, do_softint, info);
 	info->state = sstate;
 	if (sstate->info) {
 		kfree(info);
diff -Nru a/arch/ia64/ia32/ia32_ioctl.c b/arch/ia64/ia32/ia32_ioctl.c
--- a/arch/ia64/ia32/ia32_ioctl.c	Wed Oct 30 16:44:31 2002
+++ b/arch/ia64/ia32/ia32_ioctl.c	Wed Oct 30 16:44:31 2002
@@ -26,6 +26,12 @@
 #include <linux/if_ppp.h>
 #include <linux/ixjuser.h>
 #include <linux/i2o-dev.h>
+#include <scsi/scsi.h>
+/* Ugly hack. */
+#undef	__KERNEL__
+#include <scsi/scsi_ioctl.h>
+#define	__KERNEL__
+#include <scsi/sg.h>
 
 #include <asm/ia32.h>
 
@@ -60,6 +66,235 @@
 		|| put_user(d->d_reclen, &d32->d_reclen)
 		|| copy_to_user(d32->d_name, d->d_name, namelen + 1));
 }
+/*
+ *  The transform code for the SG_IO ioctl was brazenly lifted from
+ *  the Sparc64 port in the file `arch/sparc64/kernel/ioctl32.c'.
+ *  Thanks to Jakub Jelinek & Eddie C. Dost.
+ */
+typedef struct sg_io_hdr32 {
+	int interface_id;	/* [i] 'S' for SCSI generic (required) */
+	int dxfer_direction;	/* [i] data transfer direction  */
+	char  cmd_len;		/* [i] SCSI command length ( <= 16 bytes) */
+	char  mx_sb_len;		/* [i] max length to write to sbp */
+	short iovec_count;	/* [i] 0 implies no scatter gather */
+	int dxfer_len;		/* [i] byte count of data transfer */
+	int dxferp;		/* [i], [*io] points to data transfer memory
+					      or scatter gather list */
+	int cmdp;		/* [i], [*i] points to command to perform */
+	int sbp;		/* [i], [*o] points to sense_buffer memory */
+	int timeout;		/* [i] MAX_UINT->no timeout (unit: millisec) */
+	int flags;		/* [i] 0 -> default, see SG_FLAG... */
+	int pack_id;		/* [i->o] unused internally (normally) */
+	int usr_ptr;		/* [i->o] unused internally */
+	char  status;		/* [o] scsi status */
+	char  masked_status;	/* [o] shifted, masked scsi status */
+	char  msg_status;	/* [o] messaging level data (optional) */
+	char  sb_len_wr;	/* [o] byte count actually written to sbp */
+	short host_status;	/* [o] errors from host adapter */
+	short driver_status;	/* [o] errors from software driver */
+	int resid;		/* [o] dxfer_len - actual_transferred */
+	int duration;		/* [o] time taken by cmd (unit: millisec) */
+	int info;		/* [o] auxiliary information */
+} sg_io_hdr32_t;  /* 64 bytes long (on IA32) */
+
+struct iovec32 { unsigned int iov_base; int iov_len; };
+
+static int alloc_sg_iovec(sg_io_hdr_t *sgp, int uptr32)
+{
+	struct iovec32 *uiov = (struct iovec32 *) P(uptr32);
+	sg_iovec_t *kiov;
+	int i;
+
+	sgp->dxferp = kmalloc(sgp->iovec_count *
+			      sizeof(sg_iovec_t), GFP_KERNEL);
+	if (!sgp->dxferp)
+		return -ENOMEM;
+	memset(sgp->dxferp, 0,
+	       sgp->iovec_count * sizeof(sg_iovec_t));
+
+	kiov = (sg_iovec_t *) sgp->dxferp;
+	for (i = 0; i < sgp->iovec_count; i++) {
+		int iov_base32;
+		if (__get_user(iov_base32, &uiov->iov_base) ||
+		    __get_user(kiov->iov_len, &uiov->iov_len))
+			return -EFAULT;
+
+		kiov->iov_base = kmalloc(kiov->iov_len, GFP_KERNEL);
+		if (!kiov->iov_base)
+			return -ENOMEM;
+		if (copy_from_user(kiov->iov_base,
+				   (void *) P(iov_base32),
+				   kiov->iov_len))
+			return -EFAULT;
+
+		uiov++;
+		kiov++;
+	}
+
+	return 0;
+}
+
+static int copy_back_sg_iovec(sg_io_hdr_t *sgp, int uptr32)
+{
+	struct iovec32 *uiov = (struct iovec32 *) P(uptr32);
+	sg_iovec_t *kiov = (sg_iovec_t *) sgp->dxferp;
+	int i;
+
+	for (i = 0; i < sgp->iovec_count; i++) {
+		int iov_base32;
+
+		if (__get_user(iov_base32, &uiov->iov_base))
+			return -EFAULT;
+
+		if (copy_to_user((void *) P(iov_base32),
+				 kiov->iov_base,
+				 kiov->iov_len))
+			return -EFAULT;
+
+		uiov++;
+		kiov++;
+	}
+
+	return 0;
+}
+
+static void free_sg_iovec(sg_io_hdr_t *sgp)
+{
+	sg_iovec_t *kiov = (sg_iovec_t *) sgp->dxferp;
+	int i;
+
+	for (i = 0; i < sgp->iovec_count; i++) {
+		if (kiov->iov_base) {
+			kfree(kiov->iov_base);
+			kiov->iov_base = NULL;
+		}
+		kiov++;
+	}
+	kfree(sgp->dxferp);
+	sgp->dxferp = NULL;
+}
+
+static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	sg_io_hdr32_t *sg_io32;
+	sg_io_hdr_t sg_io64;
+	int dxferp32, cmdp32, sbp32;
+	mm_segment_t old_fs;
+	int err = 0;
+
+	sg_io32 = (sg_io_hdr32_t *)arg;
+	err = __get_user(sg_io64.interface_id, &sg_io32->interface_id);
+	err |= __get_user(sg_io64.dxfer_direction, &sg_io32->dxfer_direction);
+	err |= __get_user(sg_io64.cmd_len, &sg_io32->cmd_len);
+	err |= __get_user(sg_io64.mx_sb_len, &sg_io32->mx_sb_len);
+	err |= __get_user(sg_io64.iovec_count, &sg_io32->iovec_count);
+	err |= __get_user(sg_io64.dxfer_len, &sg_io32->dxfer_len);
+	err |= __get_user(sg_io64.timeout, &sg_io32->timeout);
+	err |= __get_user(sg_io64.flags, &sg_io32->flags);
+	err |= __get_user(sg_io64.pack_id, &sg_io32->pack_id);
+
+	sg_io64.dxferp = NULL;
+	sg_io64.cmdp = NULL;
+	sg_io64.sbp = NULL;
+
+	err |= __get_user(cmdp32, &sg_io32->cmdp);
+	sg_io64.cmdp = kmalloc(sg_io64.cmd_len, GFP_KERNEL);
+	if (!sg_io64.cmdp) {
+		err = -ENOMEM;
+		goto out;
+	}
+	if (copy_from_user(sg_io64.cmdp,
+			   (void *) P(cmdp32),
+			   sg_io64.cmd_len)) {
+		err = -EFAULT;
+		goto out;
+	}
+
+	err |= __get_user(sbp32, &sg_io32->sbp);
+	sg_io64.sbp = kmalloc(sg_io64.mx_sb_len, GFP_KERNEL);
+	if (!sg_io64.sbp) {
+		err = -ENOMEM;
+		goto out;
+	}
+	if (copy_from_user(sg_io64.sbp,
+			   (void *) P(sbp32),
+			   sg_io64.mx_sb_len)) {
+		err = -EFAULT;
+		goto out;
+	}
+
+	err |= __get_user(dxferp32, &sg_io32->dxferp);
+	if (sg_io64.iovec_count) {
+		int ret;
+
+		if ((ret = alloc_sg_iovec(&sg_io64, dxferp32))) {
+			err = ret;
+			goto out;
+		}
+	} else {
+		sg_io64.dxferp = kmalloc(sg_io64.dxfer_len, GFP_KERNEL);
+		if (!sg_io64.dxferp) {
+			err = -ENOMEM;
+			goto out;
+		}
+		if (copy_from_user(sg_io64.dxferp,
+				   (void *) P(dxferp32),
+				   sg_io64.dxfer_len)) {
+			err = -EFAULT;
+			goto out;
+		}
+	}
+
+	/* Unused internally, do not even bother to copy it over. */
+	sg_io64.usr_ptr = NULL;
+
+	if (err)
+		return -EFAULT;
+
+	old_fs = get_fs();
+	set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, cmd, (unsigned long) &sg_io64);
+	set_fs (old_fs);
+
+	if (err < 0)
+		goto out;
+
+	err = __put_user(sg_io64.pack_id, &sg_io32->pack_id);
+	err |= __put_user(sg_io64.status, &sg_io32->status);
+	err |= __put_user(sg_io64.masked_status, &sg_io32->masked_status);
+	err |= __put_user(sg_io64.msg_status, &sg_io32->msg_status);
+	err |= __put_user(sg_io64.sb_len_wr, &sg_io32->sb_len_wr);
+	err |= __put_user(sg_io64.host_status, &sg_io32->host_status);
+	err |= __put_user(sg_io64.driver_status, &sg_io32->driver_status);
+	err |= __put_user(sg_io64.resid, &sg_io32->resid);
+	err |= __put_user(sg_io64.duration, &sg_io32->duration);
+	err |= __put_user(sg_io64.info, &sg_io32->info);
+	err |= copy_to_user((void *)P(sbp32), sg_io64.sbp, sg_io64.mx_sb_len);
+	if (sg_io64.dxferp) {
+		if (sg_io64.iovec_count)
+			err |= copy_back_sg_iovec(&sg_io64, dxferp32);
+		else
+			err |= copy_to_user((void *)P(dxferp32),
+					    sg_io64.dxferp,
+					    sg_io64.dxfer_len);
+	}
+	if (err)
+		err = -EFAULT;
+
+out:
+	if (sg_io64.cmdp)
+		kfree(sg_io64.cmdp);
+	if (sg_io64.sbp)
+		kfree(sg_io64.sbp);
+	if (sg_io64.dxferp) {
+		if (sg_io64.iovec_count) {
+			free_sg_iovec(&sg_io64);
+		} else {
+			kfree(sg_io64.dxferp);
+		}
+	}
+	return err;
+}
 
 asmlinkage long
 sys32_ioctl (unsigned int fd, unsigned int cmd, unsigned int arg)
@@ -270,6 +505,9 @@
 		break;
 	      default:
 		return sys_ioctl(fd, cmd, (unsigned long)arg);
+
+		case IOCTL_NR(SG_IO):
+			return(sg_ioctl_trans(fd, cmd, arg));
 
 	}
 	printk("%x:unimplemented IA32 ioctl system call\n", cmd);
diff -Nru a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c
--- a/arch/ia64/ia32/ia32_signal.c	Wed Oct 30 16:44:19 2002
+++ b/arch/ia64/ia32/ia32_signal.c	Wed Oct 30 16:44:19 2002
@@ -39,6 +39,16 @@
 #define __IA32_NR_sigreturn            119
 #define __IA32_NR_rt_sigreturn         173
 
+register double f16 asm ("f16"); register double f17 asm ("f17");
+register double f18 asm ("f18"); register double f19 asm ("f19");
+register double f20 asm ("f20"); register double f21 asm ("f21");
+register double f22 asm ("f22"); register double f23 asm ("f23");
+
+register double f24 asm ("f24"); register double f25 asm ("f25");
+register double f26 asm ("f26"); register double f27 asm ("f27");
+register double f28 asm ("f28"); register double f29 asm ("f29");
+register double f30 asm ("f30"); register double f31 asm ("f31");
+
 struct sigframe_ia32
 {
        int pretcode;
@@ -143,6 +153,282 @@
 	return err;
 }
 
+
+/*
+ *  SAVE and RESTORE of ia32 fpstate info, from ia64 current state
+ *  Used in exception handler to pass the fpstate to the user, and restore
+ *  the fpstate while returning from the exception handler.
+ *
+ *    fpstate info and their mapping to IA64 regs:
+ *    fpstate    REG(BITS)      Attribute    Comments
+ *    cw         ar.fcr(0:12)                with bits 7 and 6 not used
+ *    sw         ar.fsr(0:15)
+ *    tag        ar.fsr(16:31)               with odd numbered bits not used
+ *                                           (read returns 0, writes ignored)
+ *    ipoff      ar.fir(0:31)   RO
+ *    cssel      ar.fir(32:47)  RO
+ *    dataoff    ar.fdr(0:31)   RO
+ *    datasel    ar.fdr(32:47)  RO
+ *
+ *    _st[(0+TOS)%8]   f8
+ *    _st[(1+TOS)%8]   f9                    (f8, f9 from ptregs)
+ *      : :            :                     (f10..f15 from live reg)
+ *      : :            :
+ *    _st[(7+TOS)%8]   f15                   TOS=sw.top(bits11:13)
+ *
+ *    status     Same as sw     RO
+ *    magic      0                           as X86_FXSR_MAGIC in ia32
+ *    mxcsr      Bits(7:15)=ar.fcr(39:47)
+ *               Bits(0:5) =ar.fsr(32:37)    with bit 6 reserved
+ *    _xmm[0..7] f16..f31                    (live registers)
+ *                                           with _xmm[0]
+ *                                             Bit(64:127)=f17(0:63)
+ *                                             Bit(0:63)=f16(0:63)
+ *    All other fields unused...
+ */
+
+#define __ldfe(regnum, x)						\
+({									\
+ 	register double __f__ asm ("f"#regnum);				\
+	__asm__ __volatile__ ("ldfe %0=[%1] ;;" :"=f"(__f__): "r"(x));	\
+})
+
+#define __ldf8(regnum, x)						\
+({									\
+ 	register double __f__ asm ("f"#regnum);				\
+	__asm__ __volatile__ ("ldf8 %0=[%1] ;;" :"=f"(__f__): "r"(x));	\
+})
+
+#define __stfe(x, regnum)							\
+({										\
+ 	register double __f__ asm ("f"#regnum);					\
+	__asm__ __volatile__ ("stfe [%0]=%1" :: "r"(x), "f"(__f__) : "memory");	\
+})
+
+#define __stf8(x, regnum)							\
+({										\
+ 	register double __f__ asm ("f"#regnum);					\
+	__asm__ __volatile__ ("stf8 [%0]=%1" :: "r"(x), "f"(__f__) : "memory");	\
+})
+
+static int
+save_ia32_fpstate_live (struct _fpstate_ia32 *save)
+{
+	struct task_struct *tsk = current;
+	struct pt_regs *ptp;
+	struct _fpreg_ia32 *fpregp;
+	char buf[32];
+	unsigned long fsr, fcr, fir, fdr;
+	unsigned long new_fsr;
+	unsigned long num128[2];
+	unsigned long mxcsr=0;
+	int fp_tos, fr8_st_map;
+
+	if (!access_ok(VERIFY_WRITE, save, sizeof(*save)))
+		return -EFAULT;
+
+	/* Readin fsr, fcr, fir, fdr and copy onto fpstate */
+	asm volatile ( "mov %0=ar.fsr;" : "=r"(fsr));
+	asm volatile ( "mov %0=ar.fcr;" : "=r"(fcr));
+	asm volatile ( "mov %0=ar.fir;" : "=r"(fir));
+	asm volatile ( "mov %0=ar.fdr;" : "=r"(fdr));
+	/*
+	 * We need to clear the exception state before calling the signal handler. Clear
+	 * the bits 15, bits 0-7 in fp status word. Similar to the functionality of fnclex
+	 * instruction.
+	 */
+	new_fsr = fsr & ~0x80ff;
+	asm volatile ( "mov ar.fsr=%0;" :: "r"(new_fsr));
+
+	__put_user(fcr & 0xffff, &save->cw);
+	__put_user(fsr & 0xffff, &save->sw);
+	__put_user((fsr>>16) & 0xffff, &save->tag);
+	__put_user(fir, &save->ipoff);
+	__put_user((fir>>32) & 0xffff, &save->cssel);
+	__put_user(fdr, &save->dataoff);
+	__put_user((fdr>>32) & 0xffff, &save->datasel);
+	__put_user(fsr & 0xffff, &save->status);
+
+	mxcsr = ((fcr>>32) & 0xff80) | ((fsr>>32) & 0x3f);
+	__put_user(mxcsr & 0xffff, &save->mxcsr);
+	__put_user( 0, &save->magic); //#define X86_FXSR_MAGIC   0x0000
+
+	/*
+	 * save f8 and f9  from pt_regs
+	 * save f10..f15 from live register set
+	 */
+	/*
+	 *  Find the location where f8 has to go in fp reg stack.  This depends on
+	 *  TOP(11:13) field of sw. Other f reg continue sequentially from where f8 maps
+	 *  to.
+	 */
+	fp_tos = (fsr>>11)&0x7;
+	fr8_st_map = (8-fp_tos)&0x7;
+	ptp = ia64_task_regs(tsk);
+	fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15);
+	ia64f2ia32f(fpregp, &ptp->f8);
+	copy_to_user(&save->_st[(0+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+	ia64f2ia32f(fpregp, &ptp->f9);
+	copy_to_user(&save->_st[(1+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+
+	__stfe(fpregp, 10);
+	copy_to_user(&save->_st[(2+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+	__stfe(fpregp, 11);
+	copy_to_user(&save->_st[(3+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+	__stfe(fpregp, 12);
+	copy_to_user(&save->_st[(4+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+	__stfe(fpregp, 13);
+	copy_to_user(&save->_st[(5+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+	__stfe(fpregp, 14);
+	copy_to_user(&save->_st[(6+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+	__stfe(fpregp, 15);
+	copy_to_user(&save->_st[(7+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32));
+
+	__stf8(&num128[0], 16);
+	__stf8(&num128[1], 17);
+	copy_to_user(&save->_xmm[0], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 18);
+	__stf8(&num128[1], 19);
+	copy_to_user(&save->_xmm[1], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 20);
+	__stf8(&num128[1], 21);
+	copy_to_user(&save->_xmm[2], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 22);
+	__stf8(&num128[1], 23);
+	copy_to_user(&save->_xmm[3], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 24);
+	__stf8(&num128[1], 25);
+	copy_to_user(&save->_xmm[4], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 26);
+	__stf8(&num128[1], 27);
+	copy_to_user(&save->_xmm[5], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 28);
+	__stf8(&num128[1], 29);
+	copy_to_user(&save->_xmm[6], num128, sizeof(struct _xmmreg_ia32));
+
+	__stf8(&num128[0], 30);
+	__stf8(&num128[1], 31);
+	copy_to_user(&save->_xmm[7], num128, sizeof(struct _xmmreg_ia32));
+	return 0;
+}
+
+static int
+restore_ia32_fpstate_live (struct _fpstate_ia32 *save)
+{
+	struct task_struct *tsk = current;
+	struct pt_regs *ptp;
+	unsigned int lo, hi;
+	unsigned long num128[2];
+	unsigned long num64, mxcsr;
+	struct _fpreg_ia32 *fpregp;
+	char buf[32];
+	unsigned long fsr, fcr;
+	int fp_tos, fr8_st_map;
+
+	if (!access_ok(VERIFY_READ, save, sizeof(*save)))
+		return(-EFAULT);
+
+	/*
+	 * Updating fsr, fcr, fir, fdr.
+	 * Just a bit more complicated than save.
+	 * - Need to make sure that we dont write any value other than the
+	 *   specific fpstate info
+	 * - Need to make sure that the untouched part of frs, fdr, fir, fcr
+	 *   should remain same while writing.
+	 * So, we do a read, change specific fields and write.
+	 */
+	asm volatile ( "mov %0=ar.fsr;" : "=r"(fsr));
+	asm volatile ( "mov %0=ar.fcr;" : "=r"(fcr));
+
+	__get_user(mxcsr, (unsigned int *)&save->mxcsr);
+	/* setting bits 0..5 8..12 with cw and 39..47 from mxcsr */
+	__get_user(lo, (unsigned int *)&save->cw);
+	num64 = mxcsr & 0xff10;
+	num64 = (num64 << 32) | (lo & 0x1f3f);
+	fcr = (fcr & (~0xff1000001f3f)) | num64;
+
+	/* setting bits 0..31 with sw and tag and 32..37 from mxcsr */
+	__get_user(lo, (unsigned int *)&save->sw);
+	__get_user(hi, (unsigned int *)&save->tag);
+	num64 = mxcsr & 0x3f;
+	num64 = (num64 << 16) | (hi & 0xffff);
+	num64 = (num64 << 16) | (lo & 0xffff);
+	fsr = (fsr & (~0x3fffffffff)) | num64;
+
+	asm volatile ( "mov ar.fsr=%0;" :: "r"(fsr));
+	asm volatile ( "mov ar.fcr=%0;" :: "r"(fcr));
+	/*
+	 * restore f8, f9 onto pt_regs
+	 * restore f10..f15 onto live registers
+	 */
+	/*
+	 *  Find the location where f8 has to go in fp reg stack.  This depends on
+	 *  TOP(11:13) field of sw. Other f reg continue sequentially from where f8 maps
+	 *  to.
+	 */
+	fp_tos = (fsr>>11)&0x7;
+	fr8_st_map = (8-fp_tos)&0x7;
+	fpregp = (struct _fpreg_ia32 *)(((unsigned long)buf + 15) & ~15);
+
+	ptp = ia64_task_regs(tsk);
+	copy_from_user(fpregp, &save->_st[(0+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	ia32f2ia64f(&ptp->f8, fpregp);
+	copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	ia32f2ia64f(&ptp->f9, fpregp);
+
+	copy_from_user(fpregp, &save->_st[(2+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	__ldfe(10, fpregp);
+	copy_from_user(fpregp, &save->_st[(3+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	__ldfe(11, fpregp);
+	copy_from_user(fpregp, &save->_st[(4+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	__ldfe(12, fpregp);
+	copy_from_user(fpregp, &save->_st[(5+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	__ldfe(13, fpregp);
+	copy_from_user(fpregp, &save->_st[(6+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	__ldfe(14, fpregp);
+	copy_from_user(fpregp, &save->_st[(7+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32));
+	__ldfe(15, fpregp);
+
+	copy_from_user(num128, &save->_xmm[0], sizeof(struct _xmmreg_ia32));
+	__ldf8(16, &num128[0]);
+	__ldf8(17, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[1], sizeof(struct _xmmreg_ia32));
+	__ldf8(18, &num128[0]);
+	__ldf8(19, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[2], sizeof(struct _xmmreg_ia32));
+	__ldf8(20, &num128[0]);
+	__ldf8(21, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[3], sizeof(struct _xmmreg_ia32));
+	__ldf8(22, &num128[0]);
+	__ldf8(23, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[4], sizeof(struct _xmmreg_ia32));
+	__ldf8(24, &num128[0]);
+	__ldf8(25, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[5], sizeof(struct _xmmreg_ia32));
+	__ldf8(26, &num128[0]);
+	__ldf8(27, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[6], sizeof(struct _xmmreg_ia32));
+	__ldf8(28, &num128[0]);
+	__ldf8(29, &num128[1]);
+
+	copy_from_user(num128, &save->_xmm[7], sizeof(struct _xmmreg_ia32));
+	__ldf8(30, &num128[0]);
+	__ldf8(31, &num128[1]);
+	return 0;
+}
+
 static inline void
 sigact_set_handler (struct k_sigaction *sa, unsigned int handler, unsigned int restorer)
 {
@@ -170,13 +456,13 @@
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
 
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	{
 		oldset = current->blocked;
 		current->blocked = set;
 		recalc_sigpending();
 	}
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	/*
 	 * The return below usually returns to the signal handler.  We need to pre-set the
@@ -371,6 +657,9 @@
 	int  err = 0;
 	unsigned long flag;
 
+	if (!access_ok(VERIFY_WRITE, sc, sizeof(*sc)))
+		return -EFAULT;
+
 	err |= __put_user((regs->r16 >> 32) & 0xffff, (unsigned int *)&sc->fs);
 	err |= __put_user((regs->r16 >> 48) & 0xffff, (unsigned int *)&sc->gs);
 	err |= __put_user((regs->r16 >> 16) & 0xffff, (unsigned int *)&sc->es);
@@ -397,6 +686,11 @@
 	err |= __put_user(regs->r12, &sc->esp_at_signal);
 	err |= __put_user((regs->r17 >> 16) & 0xffff, (unsigned int *)&sc->ss);
 
+	if ( save_ia32_fpstate_live(fpstate) < 0 )
+		err = -EFAULT;
+	else
+		err |= __put_user((u32)(u64)fpstate, &sc->fpstate);
+
 #if 0
 	tmp = save_i387(fpstate);
 	if (tmp < 0)
@@ -418,6 +712,9 @@
 {
 	unsigned int err = 0;
 
+	if (!access_ok(VERIFY_READ, sc, sizeof(*sc)))
+		return(-EFAULT);
+
 #define COPY(ia64x, ia32x)	err |= __get_user(regs->ia64x, &sc->ia32x)
 
 #define copyseg_gs(tmp)		(regs->r16 |= (unsigned long) tmp << 48)
@@ -477,6 +774,16 @@
 		regs->r1 = -1;	/* disable syscall checks, r1 is orig_eax */
 	}
 
+	{
+		struct _fpstate_ia32 *buf = NULL;
+		u32    fpstate_ptr;
+		err |= get_user(fpstate_ptr, &(sc->fpstate));
+		buf = (struct _fpstate_ia32 *)(u64)fpstate_ptr;
+		if (buf) {
+			err |= restore_ia32_fpstate_live(buf);
+		}
+	}
+
 #if 0
 	{
 		struct _fpstate * buf;
@@ -686,10 +993,10 @@
 		goto badframe;
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	current->blocked = (sigset_t) set;
 	recalc_sigpending();
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	if (restore_sigcontext_ia32(regs, &frame->sc, &eax))
 		goto badframe;
@@ -717,10 +1024,10 @@
 		goto badframe;
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	current->blocked =  set;
 	recalc_sigpending();
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	if (restore_sigcontext_ia32(regs, &frame->uc.uc_mcontext, &eax))
 		goto badframe;
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c	Wed Oct 30 16:44:29 2002
+++ b/arch/ia64/ia32/sys_ia32.c	Wed Oct 30 16:44:29 2002
@@ -2842,20 +2842,6 @@
 	}
 }
 
-static inline void
-ia32f2ia64f (void *dst, void *src)
-{
-	asm volatile ("ldfe f6=[%1];; stf.spill [%0]=f6" :: "r"(dst), "r"(src) : "memory");
-	return;
-}
-
-static inline void
-ia64f2ia32f (void *dst, void *src)
-{
-	asm volatile ("ldf.fill f6=[%1];; stfe [%0]=f6" :: "r"(dst),  "r"(src) : "memory");
-	return;
-}
-
 static void
 put_fpreg (int regno, struct _fpreg_ia32 *reg, struct pt_regs *ptp, struct switch_stack *swp,
 	   int tos)
diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
--- a/arch/ia64/kernel/acpi.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/kernel/acpi.c	Wed Oct 30 16:44:28 2002
@@ -8,6 +8,9 @@
  *  Copyright (C) 2000 Intel Corp.
  *  Copyright (C) 2000,2001 J.I. Lee <jung-ik.lee@intel.com>
  *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
+ *  Copyright (C) 2001 Jenna Hall <jenna.s.hall@intel.com>
+ *  Copyright (C) 2001 Takayoshi Kochi <t-kouchi@cq.jp.nec.com>
+ *  Copyright (C) 2002 Erich Focht <efocht@ess.nec.de>
  *
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
@@ -43,6 +46,7 @@
 #include <asm/machvec.h>
 #include <asm/page.h>
 #include <asm/system.h>
+#include <asm/numa.h>
 
 
 #define PREFIX			"ACPI: "
@@ -447,6 +451,189 @@
 }
 
 
+#ifdef CONFIG_ACPI_NUMA
+
+#define SLIT_DEBUG
+
+#define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32)
+
+static int __initdata srat_num_cpus;			/* number of cpus */
+static u32 __initdata pxm_flag[PXM_FLAG_LEN];
+#define pxm_bit_set(bit)	(set_bit(bit,(void *)pxm_flag))
+#define pxm_bit_test(bit)	(test_bit(bit,(void *)pxm_flag))
+/* maps to convert between proximity domain and logical node ID */
+int __initdata pxm_to_nid_map[MAX_PXM_DOMAINS];
+int __initdata nid_to_pxm_map[NR_NODES];
+static struct acpi_table_slit __initdata *slit_table;
+
+/*
+ * ACPI 2.0 SLIT (System Locality Information Table)
+ * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
+ */
+void __init
+acpi_numa_slit_init (struct acpi_table_slit *slit)
+{
+	u32 len;
+
+	len = sizeof(struct acpi_table_header) + 8
+		+ slit->localities * slit->localities;
+	if (slit->header.length != len) {
+		printk("ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n",
+		      len, slit->header.length);
+		memset(numa_slit, 10, sizeof(numa_slit));
+		return;
+	}
+	slit_table = slit;
+}
+
+void __init
+acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa)
+{
+	/* record this node in proximity bitmap */
+	pxm_bit_set(pa->proximity_domain);
+
+	node_cpuid[srat_num_cpus].phys_id = (pa->apic_id << 8) | (pa->lsapic_eid);
+	/* nid should be overridden as logical node id later */
+	node_cpuid[srat_num_cpus].nid = pa->proximity_domain;
+	srat_num_cpus++;
+}
+
+void __init
+acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma)
+{
+	unsigned long paddr, size, hole_size, min_hole_size;
+	u8 pxm;
+	struct node_memblk_s *p, *q, *pend;
+
+	pxm = ma->proximity_domain;
+
+	/* fill node memory chunk structure */
+	paddr = ma->base_addr_hi;
+	paddr = (paddr << 32) | ma->base_addr_lo;
+	size = ma->length_hi;
+	size = (size << 32) | ma->length_lo;
+
+	if (num_memblks >= NR_MEMBLKS) {
+		printk("Too many mem chunks in SRAT. Ignoring %ld MBytes at %lx\n",
+			size/(1024*1024), paddr);
+		return;
+	}
+
+	/* Ignore disabled entries */
+	if (!ma->flags.enabled)
+		return;
+
+	/*
+	 * When the chunk is not the first one in the node, check distance
+	 * from the other chunks. When the hole is too huge ignore the chunk.
+	 * This restriction should be removed when multiple chunks per node
+	 * is supported.
+	 */
+	pend = &node_memblk[num_memblks];
+	min_hole_size = 0;
+	for (p = &node_memblk[0]; p < pend; p++) {
+		if (p->nid != pxm)
+			continue;
+		if (p->start_paddr < paddr)
+			hole_size = paddr - (p->start_paddr + p->size);
+		else
+			hole_size = p->start_paddr - (paddr + size);
+
+		if (!min_hole_size || hole_size < min_hole_size)
+			min_hole_size = hole_size;
+	}
+
+	if (min_hole_size) {
+		if (min_hole_size > size) {
+			printk("Too huge memory hole. Ignoring %ld MBytes at %lx\n",
+				size/(1024*1024), paddr);
+			return;
+		}
+	}
+
+	/* record this node in proximity bitmap */
+	pxm_bit_set(pxm);
+
+	/* Insertion sort based on base address */
+	pend = &node_memblk[num_memblks];
+	for (p = &node_memblk[0]; p < pend; p++) {
+		if (paddr < p->start_paddr)
+			break;
+	}
+	if (p < pend) {
+		for (q = pend; q >= p; q--)
+			*(q + 1) = *q;
+	}
+	p->start_paddr = paddr;
+	p->size = size;
+	p->nid = pxm;
+	num_memblks++;
+}
+
+void __init
+acpi_numa_arch_fixup(void)
+{
+	int i, j, node_from, node_to;
+
+	/* calculate total number of nodes in system from PXM bitmap */
+	numnodes = 0;		/* init total nodes in system */
+
+	memset(pxm_to_nid_map, -1, sizeof(pxm_to_nid_map));
+	memset(nid_to_pxm_map, -1, sizeof(nid_to_pxm_map));
+	for (i = 0; i < MAX_PXM_DOMAINS; i++) {
+		if (pxm_bit_test(i)) {
+			pxm_to_nid_map[i] = numnodes;
+			nid_to_pxm_map[numnodes++] = i;
+		}
+	}
+
+	/* set logical node id in memory chunk structure */
+	for (i = 0; i < num_memblks; i++)
+		node_memblk[i].nid = pxm_to_nid_map[node_memblk[i].nid];
+
+	/* assign memory bank numbers for each chunk on each node */
+	for (i = 0; i < numnodes; i++) {
+		int bank;
+
+		bank = 0;
+		for (j = 0; j < num_memblks; j++)
+			if (node_memblk[j].nid == i)
+				node_memblk[j].bank = bank++;
+	}
+
+	/* set logical node id in cpu structure */
+	for (i = 0; i < srat_num_cpus; i++)
+		node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid];
+
+	printk("Number of logical nodes in system = %d\n", numnodes);
+	printk("Number of memory chunks in system = %d\n", num_memblks);
+
+	if (!slit_table) return;
+	memset(numa_slit, -1, sizeof(numa_slit));
+	for (i=0; i<slit_table->localities; i++) {
+		if (!pxm_bit_test(i))
+			continue;
+		node_from = pxm_to_nid_map[i];
+		for (j=0; j<slit_table->localities; j++) {
+			if (!pxm_bit_test(j))
+				continue;
+			node_to = pxm_to_nid_map[j];
+			node_distance(node_from, node_to) = 
+				slit_table->entry[i*slit_table->localities + j];
+		}
+	}
+
+#ifdef SLIT_DEBUG
+	printk("ACPI 2.0 SLIT locality table:\n");
+	for (i = 0; i < numnodes; i++) {
+		for (j = 0; j < numnodes; j++)
+			printk("%03d ", node_distance(i,j));
+		printk("\n");
+	}
+#endif
+}
+#endif /* CONFIG_ACPI_NUMA */
+
 static int __init
 acpi_parse_fadt (unsigned long phys_addr, unsigned long size)
 {
@@ -556,12 +743,6 @@
 int __init
 acpi_boot_init (char *cmdline)
 {
-	int result;
-
-	/* Initialize the ACPI boot-time table parser */
-	result = acpi_table_init(cmdline);
-	if (result)
-		return result;
 
 	/*
 	 * MADT
@@ -631,6 +812,9 @@
 	smp_boot_data.cpu_count = total_cpus;
 
 	smp_build_cpu_map();
+#ifdef CONFIG_NUMA
+	build_cpu_to_node_map();
+#endif
 #endif
 	/* Make boot-up look pretty */
 	printk("%d CPUs available, %d CPUs total\n", available_cpus, total_cpus);
diff -Nru a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
--- a/arch/ia64/kernel/efi.c	Wed Oct 30 16:44:19 2002
+++ b/arch/ia64/kernel/efi.c	Wed Oct 30 16:44:19 2002
@@ -60,66 +60,156 @@
 
 static unsigned long mem_limit = ~0UL;
 
-static efi_status_t
-phys_get_time (efi_time_t *tm, efi_time_cap_t *tc)
-{
-	return efi_call_phys(__va(runtime->get_time), __pa(tm), __pa(tc));
-}
-
-static efi_status_t
-phys_set_time (efi_time_t *tm)
-{
-	return efi_call_phys(__va(runtime->set_time), __pa(tm));
-}
-
-static efi_status_t
-phys_get_wakeup_time (efi_bool_t *enabled, efi_bool_t *pending, efi_time_t *tm)
-{
-	return efi_call_phys(__va(runtime->get_wakeup_time), __pa(enabled), __pa(pending),
-			     __pa(tm));
-}
-
-static efi_status_t
-phys_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm)
-{
-	return efi_call_phys(__va(runtime->set_wakeup_time), enabled, __pa(tm));
-}
-
-static efi_status_t
-phys_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr,
-		   unsigned long *data_size, void *data)
-{
-	return efi_call_phys(__va(runtime->get_variable), __pa(name), __pa(vendor), __pa(attr),
-			     __pa(data_size), __pa(data));
-}
-
-static efi_status_t
-phys_get_next_variable (unsigned long *name_size, efi_char16_t *name, efi_guid_t *vendor)
-{
-	return efi_call_phys(__va(runtime->get_next_variable), __pa(name_size), __pa(name),
-			     __pa(vendor));
-}
-
-static efi_status_t
-phys_set_variable (efi_char16_t *name, efi_guid_t *vendor, u32 attr,
-		   unsigned long data_size, void *data)
-{
-	return efi_call_phys(__va(runtime->set_variable), __pa(name), __pa(vendor), attr,
-			     data_size, __pa(data));
-}
+#define efi_call_virt(f, args...)	(*(f))(args)
 
-static efi_status_t
-phys_get_next_high_mono_count (u64 *count)
-{
-	return efi_call_phys(__va(runtime->get_next_high_mono_count), __pa(count));
-}
-
-static void
-phys_reset_system (int reset_type, efi_status_t status,
-		   unsigned long data_size, efi_char16_t *data)
-{
-	efi_call_phys(__va(runtime->reset_system), status, data_size, __pa(data));
-}
+#define STUB_GET_TIME(prefix, adjust_arg)							\
+static efi_status_t										\
+prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc)						\
+{												\
+	struct ia64_fpreg fr[6];								\
+	efi_status_t ret;									\
+												\
+	ia64_save_scratch_fpregs(fr);								\
+	ret = efi_call_##prefix((efi_get_time_t *) __va(runtime->get_time), adjust_arg(tm),	\
+				adjust_arg(tc));						\
+	ia64_load_scratch_fpregs(fr);								\
+	return ret;										\
+}
+
+#define STUB_SET_TIME(prefix, adjust_arg)							\
+static efi_status_t										\
+prefix##_set_time (efi_time_t *tm)								\
+{												\
+	struct ia64_fpreg fr[6];								\
+	efi_status_t ret;									\
+												\
+	ia64_save_scratch_fpregs(fr);								\
+	ret = efi_call_##prefix((efi_set_time_t *) __va(runtime->set_time), adjust_arg(tm));	\
+	ia64_load_scratch_fpregs(fr);								\
+	return ret;										\
+}
+
+#define STUB_GET_WAKEUP_TIME(prefix, adjust_arg)						\
+static efi_status_t										\
+prefix##_get_wakeup_time (efi_bool_t *enabled, efi_bool_t *pending, efi_time_t *tm)		\
+{												\
+	struct ia64_fpreg fr[6];								\
+	efi_status_t ret;									\
+												\
+	ia64_save_scratch_fpregs(fr);								\
+	ret = efi_call_##prefix((efi_get_wakeup_time_t *) __va(runtime->get_wakeup_time),	\
+				adjust_arg(enabled), adjust_arg(pending), adjust_arg(tm));	\
+	ia64_load_scratch_fpregs(fr);								\
+	return ret;										\
+}
+
+#define STUB_SET_WAKEUP_TIME(prefix, adjust_arg)						\
+static efi_status_t										\
+prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm)					\
+{												\
+	struct ia64_fpreg fr[6];								\
+	efi_status_t ret;									\
+												\
+	ia64_save_scratch_fpregs(fr);								\
+	ret = efi_call_##prefix((efi_set_wakeup_time_t *) __va(runtime->set_wakeup_time),	\
+				enabled, adjust_arg(tm));					\
+	ia64_load_scratch_fpregs(fr);								\
+	return ret;										\
+}
+
+#define STUB_GET_VARIABLE(prefix, adjust_arg)						\
+static efi_status_t									\
+prefix##_get_variable (efi_char16_t *name, efi_guid_t *vendor, u32 *attr,		\
+		       unsigned long *data_size, void *data)				\
+{											\
+	struct ia64_fpreg fr[6];							\
+	efi_status_t ret;								\
+											\
+	ia64_save_scratch_fpregs(fr);							\
+	ret = efi_call_##prefix((efi_get_variable_t *) __va(runtime->get_variable),	\
+				adjust_arg(name), adjust_arg(vendor), adjust_arg(attr),	\
+				adjust_arg(data_size), adjust_arg(data));		\
+	ia64_load_scratch_fpregs(fr);							\
+	return ret;									\
+}
+
+#define STUB_GET_NEXT_VARIABLE(prefix, adjust_arg)						\
+static efi_status_t										\
+prefix##_get_next_variable (unsigned long *name_size, efi_char16_t *name, efi_guid_t *vendor)	\
+{												\
+	struct ia64_fpreg fr[6];								\
+	efi_status_t ret;									\
+												\
+	ia64_save_scratch_fpregs(fr);								\
+	ret = efi_call_##prefix((efi_get_next_variable_t *) __va(runtime->get_next_variable),	\
+				adjust_arg(name_size), adjust_arg(name), adjust_arg(vendor));	\
+	ia64_load_scratch_fpregs(fr);								\
+	return ret;										\
+}
+
+#define STUB_SET_VARIABLE(prefix, adjust_arg)						\
+static efi_status_t									\
+prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor, u32 attr,		\
+		       unsigned long data_size, void *data)				\
+{											\
+	struct ia64_fpreg fr[6];							\
+	efi_status_t ret;								\
+											\
+	ia64_save_scratch_fpregs(fr);							\
+	ret = efi_call_##prefix((efi_set_variable_t *) __va(runtime->set_variable),	\
+				adjust_arg(name), adjust_arg(vendor), attr, data_size,	\
+				adjust_arg(data));					\
+	ia64_load_scratch_fpregs(fr);							\
+	return ret;									\
+}
+
+#define STUB_GET_NEXT_HIGH_MONO_COUNT(prefix, adjust_arg)					\
+static efi_status_t										\
+prefix##_get_next_high_mono_count (u64 *count)							\
+{												\
+	struct ia64_fpreg fr[6];								\
+	efi_status_t ret;									\
+												\
+	ia64_save_scratch_fpregs(fr);								\
+	ret = efi_call_##prefix((efi_get_next_high_mono_count_t *)				\
+				__va(runtime->get_next_high_mono_count), adjust_arg(count));	\
+	ia64_load_scratch_fpregs(fr);								\
+	return ret;										\
+}
+
+#define STUB_RESET_SYSTEM(prefix, adjust_arg)					\
+static void									\
+prefix##_reset_system (int reset_type, efi_status_t status,			\
+		       unsigned long data_size, efi_char16_t *data)		\
+{										\
+	struct ia64_fpreg fr[6];						\
+										\
+	ia64_save_scratch_fpregs(fr);						\
+	efi_call_##prefix((efi_reset_system_t *) __va(runtime->reset_system),	\
+			  reset_type, status, data_size, adjust_arg(data));	\
+	/* should not return, but just in case... */				\
+	ia64_load_scratch_fpregs(fr);						\
+}
+
+STUB_GET_TIME(phys, __pa)
+STUB_SET_TIME(phys, __pa)
+STUB_GET_WAKEUP_TIME(phys, __pa)
+STUB_SET_WAKEUP_TIME(phys, __pa)
+STUB_GET_VARIABLE(phys, __pa)
+STUB_GET_NEXT_VARIABLE(phys, __pa)
+STUB_SET_VARIABLE(phys, __pa)
+STUB_GET_NEXT_HIGH_MONO_COUNT(phys, __pa)
+STUB_RESET_SYSTEM(phys, __pa)
+
+STUB_GET_TIME(virt, )
+STUB_SET_TIME(virt, )
+STUB_GET_WAKEUP_TIME(virt, )
+STUB_SET_WAKEUP_TIME(virt, )
+STUB_GET_VARIABLE(virt, )
+STUB_GET_NEXT_VARIABLE(virt, )
+STUB_SET_VARIABLE(virt, )
+STUB_GET_NEXT_HIGH_MONO_COUNT(virt, )
+STUB_RESET_SYSTEM(virt, )
 
 void
 efi_gettimeofday (struct timeval *tv)
@@ -574,18 +664,17 @@
 	}
 
 	/*
-	 * Now that EFI is in virtual mode, we arrange for EFI functions to be
-	 * called directly:
+	 * Now that EFI is in virtual mode, we call the EFI functions more efficiently:
 	 */
-	efi.get_time = __va(runtime->get_time);
-	efi.set_time = __va(runtime->set_time);
-	efi.get_wakeup_time = __va(runtime->get_wakeup_time);
-	efi.set_wakeup_time = __va(runtime->set_wakeup_time);
-	efi.get_variable = __va(runtime->get_variable);
-	efi.get_next_variable = __va(runtime->get_next_variable);
-	efi.set_variable = __va(runtime->set_variable);
-	efi.get_next_high_mono_count = __va(runtime->get_next_high_mono_count);
-	efi.reset_system = __va(runtime->reset_system);
+	efi.get_time = virt_get_time;
+	efi.set_time = virt_set_time;
+	efi.get_wakeup_time = virt_get_wakeup_time;
+	efi.set_wakeup_time = virt_set_wakeup_time;
+	efi.get_variable = virt_get_variable;
+	efi.get_next_variable = virt_get_next_variable;
+	efi.set_variable = virt_set_variable;
+	efi.get_next_high_mono_count = virt_get_next_high_mono_count;
+	efi.reset_system = virt_reset_system;
 }
 
 /*
diff -Nru a/arch/ia64/kernel/fw-emu.c b/arch/ia64/kernel/fw-emu.c
--- a/arch/ia64/kernel/fw-emu.c	Wed Oct 30 16:44:19 2002
+++ b/arch/ia64/kernel/fw-emu.c	Wed Oct 30 16:44:19 2002
@@ -2,7 +2,7 @@
  * PAL & SAL emulation.
  *
  * Copyright (C) 1998-2001 Hewlett-Packard Co
- * Copyright (C) 1998-2001 David Mosberger-Tang <davidm@hpl.hp.com>
+ *	David Mosberger-Tang <davidm@hpl.hp.com>
  *
  * For the HP simulator, this file gets include in boot/bootloader.c.
  * For SoftSDV, this file gets included in sys_softsdv.c.
diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
--- a/arch/ia64/kernel/iosapic.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/kernel/iosapic.c	Wed Oct 30 16:44:28 2002
@@ -133,12 +133,8 @@
 	return -1;
 }
 
-/*
- * Translate GSI number to the corresponding IA-64 interrupt vector.  If no
- * entry exists, return -1.
- */
-int
-gsi_to_vector (unsigned int gsi)
+static inline int
+_gsi_to_vector (unsigned int gsi)
 {
 	struct iosapic_intr_info *info;
 
@@ -148,6 +144,26 @@
 	return -1;
 }
 
+/*
+ * Translate GSI number to the corresponding IA-64 interrupt vector.  If no
+ * entry exists, return -1.
+ */
+inline int
+gsi_to_vector (unsigned int gsi)
+{
+	return _gsi_to_vector(gsi);
+}
+
+int
+gsi_to_irq (unsigned int gsi)
+{
+	/*
+	 * XXX fix me: this assumes an identity mapping vetween IA-64 vector and Linux irq
+	 * numbers...
+	 */
+	return _gsi_to_vector(gsi);
+}
+
 static void
 set_rte (unsigned int vector, unsigned int dest)
 {
@@ -157,7 +173,7 @@
 	int rte_index;
 	char redir;
 
-	DBG(KERN_DEBUG"IOSAPIC: routing vector %d to %x\n", vector, dest);
+	DBG(KERN_DEBUG"IOSAPIC: routing vector %d to 0x%x\n", vector, dest);
 
 	rte_index = iosapic_intr_info[vector].rte_index;
 	if (rte_index < 0)
diff -Nru a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
--- a/arch/ia64/kernel/ivt.S	Wed Oct 30 16:44:24 2002
+++ b/arch/ia64/kernel/ivt.S	Wed Oct 30 16:44:24 2002
@@ -116,8 +116,8 @@
 	;;
 (p8)	dep r25=r18,r25,2,6
 (p8)	shr r22=r22,HPAGE_SHIFT-PAGE_SHIFT
-	;;
 #endif
+	;;
 	cmp.eq p6,p7=5,r17			// is IFA pointing into to region 5?
 	shr.u r18=r22,PGDIR_SHIFT		// get bits 33-63 of the faulting address
 	;;
diff -Nru a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
--- a/arch/ia64/kernel/mca.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/kernel/mca.c	Wed Oct 30 16:44:28 2002
@@ -1012,28 +1012,13 @@
 void
 ia64_log_rec_header_print (sal_log_record_header_t *lh, prfunc_t prfunc)
 {
-	char str_buf[32];
-
-	sprintf(str_buf, "%2d.%02d",
-		(lh->revision.major >> 4) * 10 + (lh->revision.major & 0xf),
-		(lh->revision.minor >> 4) * 10 + (lh->revision.minor & 0xf));
-	prfunc("+Err Record ID: %d    SAL Rev: %s\n", lh->id, str_buf);
-	sprintf(str_buf, "%02d/%02d/%04d/ %02d:%02d:%02d",
-		(lh->timestamp.slh_month >> 4) * 10 +
-		(lh->timestamp.slh_month & 0xf),
-		(lh->timestamp.slh_day >> 4) * 10 +
-		(lh->timestamp.slh_day & 0xf),
-		(lh->timestamp.slh_century >> 4) * 1000 +
-		(lh->timestamp.slh_century & 0xf) * 100 +
-		(lh->timestamp.slh_year >> 4) * 10 +
-		(lh->timestamp.slh_year & 0xf),
-		(lh->timestamp.slh_hour >> 4) * 10 +
-		(lh->timestamp.slh_hour & 0xf),
-		(lh->timestamp.slh_minute >> 4) * 10 +
-		(lh->timestamp.slh_minute & 0xf),
-		(lh->timestamp.slh_second >> 4) * 10 +
-		(lh->timestamp.slh_second & 0xf));
-	prfunc("+Time: %s    Severity %d\n", str_buf, lh->severity);
+	prfunc("+Err Record ID: %d    SAL Rev: %2x.%02x\n", lh->id,
+			lh->revision.major, lh->revision.minor);
+	prfunc("+Time: %02x/%02x/%02x%02x %02x:%02x:%02x    Severity %d\n",
+			lh->timestamp.slh_month, lh->timestamp.slh_day,
+			lh->timestamp.slh_century, lh->timestamp.slh_year,
+			lh->timestamp.slh_hour, lh->timestamp.slh_minute,
+			lh->timestamp.slh_second, lh->severity);
 }
 
 /*
diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
--- a/arch/ia64/kernel/perfmon.c	Wed Oct 30 16:44:34 2002
+++ b/arch/ia64/kernel/perfmon.c	Wed Oct 30 16:44:34 2002
@@ -63,6 +63,26 @@
  * Misc macros and definitions
  */
 #define PMU_FIRST_COUNTER	4
+#define PMU_MAX_PMCS		256
+#define PMU_MAX_PMDS		256
+
+/*
+ * type of a PMU register (bitmask).
+ * bitmask structure:
+ * 	bit0   : register implemented
+ * 	bit1   : end marker 
+ * 	bit2-3 : reserved
+ * 	bit4-7 : register type
+ * 	bit8-31: reserved
+ */
+#define PFM_REG_IMPL		0x1 /* register implemented */
+#define PFM_REG_END		0x2 /* end marker */
+#define PFM_REG_MONITOR		(0x1<<4|PFM_REG_IMPL) /* a PMC with a pmc.pm field only */
+#define PFM_REG_COUNTING	(0x2<<4|PFM_REG_IMPL) /* a PMC with a pmc.pm AND pmc.oi, a PMD used as a counter */
+#define PFM_REG_CONTROL		(0x3<<4|PFM_REG_IMPL) /* PMU control register */
+#define	PFM_REG_CONFIG		(0x4<<4|PFM_REG_IMPL) /* refine configuration */
+#define PFM_REG_BUFFER	 	(0x5<<4|PFM_REG_IMPL) /* PMD used as buffer */
+
 
 #define PFM_IS_DISABLED() pmu_conf.pfm_is_disabled
 
@@ -70,13 +90,18 @@
 #define PFM_FL_INHERIT_MASK	(PFM_FL_INHERIT_NONE|PFM_FL_INHERIT_ONCE|PFM_FL_INHERIT_ALL)
 
 /* i assume unsigned */
-#define PMC_IS_IMPL(i)	  (i<pmu_conf.num_pmcs && pmu_conf.impl_regs[i>>6] & (1UL<< (i) %64))
-#define PMD_IS_IMPL(i)	  (i<pmu_conf.num_pmds &&  pmu_conf.impl_regs[4+(i>>6)] & (1UL<<(i) % 64))
+#define PMC_IS_IMPL(i)	  (i< PMU_MAX_PMCS && (pmu_conf.pmc_desc[i].type & PFM_REG_IMPL))
+#define PMD_IS_IMPL(i)	  (i< PMU_MAX_PMDS && (pmu_conf.pmd_desc[i].type & PFM_REG_IMPL))
 
 /* XXX: these three assume that register i is implemented */
 #define PMD_IS_COUNTING(i) (pmu_conf.pmd_desc[i].type == PFM_REG_COUNTING)
 #define PMC_IS_COUNTING(i) (pmu_conf.pmc_desc[i].type == PFM_REG_COUNTING)
 #define PMC_IS_MONITOR(i)  (pmu_conf.pmc_desc[i].type == PFM_REG_MONITOR)
+#define PMC_DFL_VAL(i)     pmu_conf.pmc_desc[i].default_value
+#define PMC_RSVD_MASK(i)   pmu_conf.pmc_desc[i].reserved_mask
+#define PMD_PMD_DEP(i)	   pmu_conf.pmd_desc[i].dep_pmd[0]
+#define PMC_PMD_DEP(i)	   pmu_conf.pmc_desc[i].dep_pmd[0]
+
 
 /* k assume unsigned */
 #define IBR_IS_IMPL(k)	  (k<pmu_conf.num_ibrs)
@@ -176,19 +201,6 @@
 #define UNLOCK_PSB(p)	spin_unlock(&(p)->psb_lock)
 
 /*
- * The possible type of a PMU register
- */
-typedef enum { 
-	PFM_REG_NOTIMPL, /* not implemented */
-	PFM_REG_NONE, 	 /* end marker */
-	PFM_REG_MONITOR, /* a PMC with a pmc.pm field only */
-	PFM_REG_COUNTING,/* a PMC with a pmc.pm AND pmc.oi, a PMD used as a counter */
-	PFM_REG_CONTROL, /* PMU control register */
-	PFM_REG_CONFIG,  /* refine configuration */
-	PFM_REG_BUFFER	 /* PMD used as buffer */
-} pfm_pmu_reg_type_t;
-
-/*
  * 64-bit software counter structure
  */
 typedef struct {
@@ -283,13 +295,16 @@
  * dep_pmc[]: a bitmask of dependent PMC registers
  */
 typedef struct {
-	pfm_pmu_reg_type_t	type;
+	unsigned int		type;
 	int			pm_pos;
+	unsigned long		default_value;	/* power-on default value */
+	unsigned long		reserved_mask;	/* bitmask of reserved bits */
 	int			(*read_check)(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs);
 	int			(*write_check)(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs);
 	unsigned long		dep_pmd[4];
 	unsigned long		dep_pmc[4];
 } pfm_reg_desc_t;
+
 /* assume cnum is a valid monitor */
 #define PMC_PM(cnum, val)	(((val) >> (pmu_conf.pmc_desc[cnum].pm_pos)) & 0x1)
 #define PMC_WR_FUNC(cnum)	(pmu_conf.pmc_desc[cnum].write_check)
@@ -401,8 +416,6 @@
 };
 static struct ctl_table_header *pfm_sysctl_header;
 
-static unsigned long reset_pmcs[IA64_NUM_PMC_REGS];	/* contains PAL reset values for PMCS */
-
 static void pfm_vm_close(struct vm_area_struct * area);
 
 static struct vm_operations_struct pfm_vm_ops={
@@ -422,7 +435,7 @@
 /*
  * forward declarations
  */
-static void ia64_reset_pmu(struct task_struct *);
+static void pfm_reset_pmu(struct task_struct *);
 #ifdef CONFIG_SMP
 static void pfm_fetch_regs(int cpu, struct task_struct *task, pfm_context_t *ctx);
 #endif
@@ -2244,7 +2257,7 @@
 		pfm_lazy_save_regs(PMU_OWNER());
 
 	/* reset all registers to stable quiet state */
-	ia64_reset_pmu(task);
+	pfm_reset_pmu(task);
 
 	/* make sure nothing starts */
 	if (ctx->ctx_fl_system) {
@@ -2307,7 +2320,7 @@
 
 		if (!PMC_IS_IMPL(cnum)) goto abort_mission;
 
-		tmp.reg_value = reset_pmcs[cnum];
+		tmp.reg_value = PMC_DFL_VAL(cnum);
 
 		PFM_REG_RETFLAG_SET(tmp.reg_flags, 0);
 
@@ -2998,6 +3011,8 @@
 		p += sprintf(p, "CPU%-2d recorded samples : %lu\n", i, pfm_stats[i].pfm_recorded_samples_count);
 		p += sprintf(p, "CPU%-2d smpl buffer full : %lu\n", i, pfm_stats[i].pfm_full_smpl_buffer_count);
 		p += sprintf(p, "CPU%-2d owner            : %d\n", i, pmu_owners[i].owner ? pmu_owners[i].owner->pid: -1);
+		p += sprintf(p, "CPU%-2d syst_wide        : %d\n", i, per_cpu(pfm_syst_wide, i));
+		p += sprintf(p, "CPU%-2d dcr_pp           : %d\n", i, per_cpu(pfm_dcr_pp, i));
 	}
 
 	LOCK_PFS();
@@ -3398,11 +3413,10 @@
  * XXX: make this routine able to work with non current context
  */
 static void
-ia64_reset_pmu(struct task_struct *task)
+pfm_reset_pmu(struct task_struct *task)
 {
 	struct thread_struct *t = &task->thread;
 	pfm_context_t *ctx = t->pfm_context;
-	unsigned long mask;
 	int i;
 
 	if (task != current) {
@@ -3415,30 +3429,27 @@
 
 	/*
 	 * install reset values for PMC. We skip PMC0 (done above)
-	 * XX: good up to 64 PMCS
 	 */
-	mask = pmu_conf.impl_regs[0] >> 1;
-	for(i=1; mask; mask>>=1, i++) {
-		if (mask & 0x1) {
-			ia64_set_pmc(i, reset_pmcs[i]);
-			/*
-			 * When restoring context, we must restore ALL pmcs, even the ones 
-			 * that the task does not use to avoid leaks and possibly corruption
-			 * of the sesion because of configuration conflicts. So here, we 
-			 * initialize the entire set used in the context switch restore routine.
-	 		 */
-			t->pmc[i] = reset_pmcs[i];
-			DBprintk((" pmc[%d]=0x%lx\n", i, reset_pmcs[i]));
-						 
-		}
+	for (i=1; (pmu_conf.pmc_desc[i].type & PFM_REG_END) == 0; i++) {
+		if ((pmu_conf.pmc_desc[i].type & PFM_REG_IMPL) == 0) continue;
+		ia64_set_pmc(i, PMC_DFL_VAL(i));
+		/*
+		 * When restoring context, we must restore ALL pmcs, even the ones 
+		 * that the task does not use to avoid leaks and possibly corruption
+		 * of the sesion because of configuration conflicts. So here, we 
+		 * initialize the entire set used in the context switch restore routine.
+	 	 */
+		t->pmc[i] = PMC_DFL_VAL(i);
+		DBprintk(("pmc[%d]=0x%lx\n", i, t->pmc[i]));
 	}
+
 	/*
 	 * clear reset values for PMD. 
 	 * XXX: good up to 64 PMDS. Suppose that zero is a valid value.
 	 */
-	mask = pmu_conf.impl_regs[4];
-	for(i=0; mask; mask>>=1, i++) {
-		if (mask & 0x1) ia64_set_pmd(i, 0UL);
+	for (i=0; (pmu_conf.pmd_desc[i].type & PFM_REG_END) == 0; i++) {
+		if ((pmu_conf.pmd_desc[i].type & PFM_REG_IMPL) == 0) continue;
+		ia64_set_pmd(i, 0UL);
 		t->pmd[i] = 0UL;
 	}
 
@@ -4119,23 +4130,6 @@
 };
 
 
-static void
-pfm_pmu_snapshot(void)
-{
-	int i;
-
-	for (i=0; i < IA64_NUM_PMC_REGS; i++) {
-		if (i >= pmu_conf.num_pmcs) break;
-		if (PMC_IS_IMPL(i)) reset_pmcs[i] = ia64_get_pmc(i);
-	}
-#ifdef CONFIG_MCKINLEY
-	/*
-	 * set the 'stupid' enable bit to power the PMU!
-	 */
-	reset_pmcs[4] |= 1UL << 23;
-#endif
-}
-
 /*
  * perfmon initialization routine, called from the initcall() table
  */
@@ -4160,6 +4154,9 @@
 	}
 
 	pmu_conf.perf_ovfl_val = (1UL << pm_info.pal_perf_mon_info_s.width) - 1;
+	/*
+	 * XXX: use the pfm_*_desc tables instead and simply verify with PAL
+	 */
 	pmu_conf.max_counters  = pm_info.pal_perf_mon_info_s.generic;
 	pmu_conf.num_pmcs      = find_num_pm_regs(pmu_conf.impl_regs);
 	pmu_conf.num_pmds      = find_num_pm_regs(&pmu_conf.impl_regs[4]);
@@ -4184,23 +4181,10 @@
 	pmu_conf.num_dbrs <<=1;
 
 	/*
-	 * take a snapshot of all PMU registers. PAL is supposed
-	 * to configure them with stable/safe values, i.e., not
-	 * capturing anything.
-	 * We take a snapshot now, before we make any modifications. This
-	 * will become our master copy. Then we will reuse the snapshot
-	 * to reset the PMU in pfm_enable(). Using this technique, perfmon
-	 * does NOT have to know about the specific values to program for
-	 * the PMC/PMD. The safe values may be different from one CPU model to
-	 * the other.
-	 */
-	pfm_pmu_snapshot();
-
-	/*
 	 * setup the register configuration descriptions for the CPU
 	 */
-	pmu_conf.pmc_desc = pmc_desc;
-	pmu_conf.pmd_desc = pmd_desc;
+	pmu_conf.pmc_desc = pfm_pmc_desc;
+	pmu_conf.pmd_desc = pfm_pmd_desc;
 
 	/* we are all set */
 	pmu_conf.pfm_is_disabled = 0;
@@ -4222,11 +4206,34 @@
 void
 perfmon_init_percpu (void)
 {
+	int i;
+
 	if (smp_processor_id() == 0)
 		register_percpu_irq(IA64_PERFMON_VECTOR, &perfmon_irqaction);
 
 	ia64_set_pmv(IA64_PERFMON_VECTOR);
 	ia64_srlz_d();
+
+	/*
+	 * we first initialize the PMU to a stable state.
+	 * the values may have been changed from their power-up
+	 * values by software executed before the kernel took over.
+	 *
+	 * At this point, pmu_conf has not yet been initialized
+	 *
+	 * On McKinley, this code is ineffective until PMC4 is initialized.
+	 */
+	for (i=1; (pfm_pmc_desc[i].type & PFM_REG_END) == 0;  i++) {
+		if ((pfm_pmc_desc[i].type & PFM_REG_IMPL) == 0) continue;
+		ia64_set_pmc(i, pfm_pmc_desc[i].default_value);
+	}
+	for (i=0; (pfm_pmd_desc[i].type & PFM_REG_END) == 0; i++) {
+		if ((pfm_pmd_desc[i].type & PFM_REG_IMPL) == 0) continue;
+		ia64_set_pmd(i, 0UL);
+	}
+	ia64_set_pmc(0,1UL);
+	ia64_srlz_d();
+
 }
 
 #else /* !CONFIG_PERFMON */
diff -Nru a/arch/ia64/kernel/perfmon_generic.h b/arch/ia64/kernel/perfmon_generic.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ia64/kernel/perfmon_generic.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,29 @@
+#define RDEP(x)	(1UL<<(x))
+
+#if defined(CONFIG_ITANIUM) || defined(CONFIG_MCKINLEY)
+#error "This file should only be used when CONFIG_ITANIUM and CONFIG_MCKINLEY are not defined"
+#endif
+
+static pfm_reg_desc_t pmc_desc[PMU_MAX_PMCS]={
+/* pmc0  */ { PFM_REG_CONTROL , 0, 0x1UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc1  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc2  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc3  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc4  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {RDEP(4),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc5  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {RDEP(5),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc6  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {RDEP(6),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc7  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {RDEP(7),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+	     { PFM_REG_END     , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}}, /* end marker */
+};
+
+static pfm_reg_desc_t pmd_desc[PMU_MAX_PMDS]={
+/* pmd0  */ { PFM_REG_NOTIMPL , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}},
+/* pmd1  */ { PFM_REG_NOTIMPL , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}},
+/* pmd2  */ { PFM_REG_NOTIMPL , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}},
+/* pmd3  */ { PFM_REG_NOTIMPL , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}},
+/* pmd4  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(4),0UL, 0UL, 0UL}},
+/* pmd5  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(5),0UL, 0UL, 0UL}},
+/* pmd6  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(6),0UL, 0UL, 0UL}},
+/* pmd7  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(7),0UL, 0UL, 0UL}},
+	     { PFM_REG_END     , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}}, /* end marker */
+};
diff -Nru a/arch/ia64/kernel/perfmon_itanium.h b/arch/ia64/kernel/perfmon_itanium.h
--- a/arch/ia64/kernel/perfmon_itanium.h	Wed Oct 30 16:44:36 2002
+++ b/arch/ia64/kernel/perfmon_itanium.h	Wed Oct 30 16:44:36 2002
@@ -15,44 +15,44 @@
 static int pfm_ita_pmc_check(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs);
 static int pfm_write_ibr_dbr(int mode, struct task_struct *task, void *arg, int count, struct pt_regs *regs);
 
-static pfm_reg_desc_t pmc_desc[256]={
-/* pmc0  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc1  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc2  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc3  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc4  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(4),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc5  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(5),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc6  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(6),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc7  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(7),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc8  */ { PFM_REG_CONFIG, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc9  */ { PFM_REG_CONFIG, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc10 */ { PFM_REG_MONITOR, 6, NULL, NULL, {RDEP(0)|RDEP(1),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc11 */ { PFM_REG_MONITOR, 6, NULL, pfm_ita_pmc_check, {RDEP(2)|RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc12 */ { PFM_REG_MONITOR, 6, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc13 */ { PFM_REG_CONFIG, 0, NULL, pfm_ita_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-	    { PFM_REG_NONE, 0, NULL, NULL, {0,}, {0,}}, /* end marker */
+static pfm_reg_desc_t pfm_pmc_desc[PMU_MAX_PMCS]={
+/* pmc0  */ { PFM_REG_CONTROL , 0, 0x1UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc1  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc2  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc3  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc4  */ { PFM_REG_COUNTING, 6, 0x0UL, -1UL, NULL, NULL, {RDEP(4),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc5  */ { PFM_REG_COUNTING, 6, 0x0UL, -1UL, NULL, NULL, {RDEP(5),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc6  */ { PFM_REG_COUNTING, 6, 0x0UL, -1UL, NULL, NULL, {RDEP(6),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc7  */ { PFM_REG_COUNTING, 6, 0x0UL, -1UL, NULL, NULL, {RDEP(7),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc8  */ { PFM_REG_CONFIG  , 0, 0xf00000003ffffff8UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc9  */ { PFM_REG_CONFIG  , 0, 0xf00000003ffffff8UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc10 */ { PFM_REG_MONITOR , 6, 0x0UL, -1UL, NULL, NULL, {RDEP(0)|RDEP(1),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc11 */ { PFM_REG_MONITOR , 6, 0x0000000010000000UL, -1UL, NULL, pfm_ita_pmc_check, {RDEP(2)|RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc12 */ { PFM_REG_MONITOR , 6, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc13 */ { PFM_REG_CONFIG  , 0, 0x0003ffff00000001UL, -1UL, NULL, pfm_ita_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+	    { PFM_REG_END     , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}}, /* end marker */
 };
 
-static pfm_reg_desc_t pmd_desc[256]={
-/* pmd0  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(1),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
-/* pmd1  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(0),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
-/* pmd2  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
-/* pmd3  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(2)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
-/* pmd4  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(4),0UL, 0UL, 0UL}},
-/* pmd5  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(5),0UL, 0UL, 0UL}},
-/* pmd6  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(6),0UL, 0UL, 0UL}},
-/* pmd7  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(7),0UL, 0UL, 0UL}},
-/* pmd8  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd9  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd10 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd11 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd12 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd13 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd14 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd15 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd16 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd17 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(2)|RDEP(3),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
-	    { PFM_REG_NONE, 0, NULL, NULL, {0,}, {0,}}, /* end marker */
+static pfm_reg_desc_t pfm_pmd_desc[PMU_MAX_PMDS]={
+/* pmd0  */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(1),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
+/* pmd1  */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(0),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
+/* pmd2  */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
+/* pmd3  */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(2)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
+/* pmd4  */ { PFM_REG_COUNTING, 0, 0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(4),0UL, 0UL, 0UL}},
+/* pmd5  */ { PFM_REG_COUNTING, 0, 0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(5),0UL, 0UL, 0UL}},
+/* pmd6  */ { PFM_REG_COUNTING, 0, 0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(6),0UL, 0UL, 0UL}},
+/* pmd7  */ { PFM_REG_COUNTING, 0, 0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(7),0UL, 0UL, 0UL}},
+/* pmd8  */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd9  */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd10 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd11 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd12 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd13 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd14 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd15 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd16 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd17 */ { PFM_REG_BUFFER  , 0, 0UL, -1UL, NULL, NULL, {RDEP(2)|RDEP(3),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
+	    { PFM_REG_END     , 0, 0UL, -1UL, NULL, NULL, {0,}, {0,}}, /* end marker */
 };
 
 static int
diff -Nru a/arch/ia64/kernel/perfmon_mckinley.h b/arch/ia64/kernel/perfmon_mckinley.h
--- a/arch/ia64/kernel/perfmon_mckinley.h	Wed Oct 30 16:44:30 2002
+++ b/arch/ia64/kernel/perfmon_mckinley.h	Wed Oct 30 16:44:30 2002
@@ -12,51 +12,73 @@
 #error "This file is only valid when CONFIG_MCKINLEY is defined"
 #endif
 
+static int pfm_mck_reserved(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs);
 static int pfm_mck_pmc_check(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs);
 static int pfm_write_ibr_dbr(int mode, struct task_struct *task, void *arg, int count, struct pt_regs *regs);
 
-static pfm_reg_desc_t pmc_desc[256]={
-/* pmc0  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc1  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc2  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc3  */ { PFM_REG_CONTROL, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc4  */ { PFM_REG_COUNTING, 6, NULL, pfm_mck_pmc_check, {RDEP(4),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc5  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(5),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc6  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(6),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc7  */ { PFM_REG_COUNTING, 6, NULL, NULL, {RDEP(7),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc8  */ { PFM_REG_CONFIG, 0, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc9  */ { PFM_REG_CONFIG, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc10 */ { PFM_REG_MONITOR, 4, NULL, NULL, {RDEP(0)|RDEP(1),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc11 */ { PFM_REG_MONITOR, 6, NULL, NULL, {RDEP(2)|RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc12 */ { PFM_REG_MONITOR, 6, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc13 */ { PFM_REG_CONFIG, 0, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc14 */ { PFM_REG_CONFIG, 0, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-/* pmc15 */ { PFM_REG_CONFIG, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
-	    { PFM_REG_NONE, 0, NULL, NULL, {0,}, {0,}}, /* end marker */
+static pfm_reg_desc_t pfm_pmc_desc[PMU_MAX_PMCS]={
+/* pmc0  */ { PFM_REG_CONTROL , 0, 0x1UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc1  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc2  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc3  */ { PFM_REG_CONTROL , 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc4  */ { PFM_REG_COUNTING, 6, 0x0000000000800000UL, 0xfffff7fUL, NULL, pfm_mck_pmc_check, {RDEP(4),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc5  */ { PFM_REG_COUNTING, 6, 0x0UL, 0xfffff7fUL, NULL,  pfm_mck_reserved, {RDEP(5),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc6  */ { PFM_REG_COUNTING, 6, 0x0UL, 0xfffff7fUL, NULL,  pfm_mck_reserved, {RDEP(6),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc7  */ { PFM_REG_COUNTING, 6, 0x0UL, 0xfffff7fUL, NULL,  pfm_mck_reserved, {RDEP(7),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc8  */ { PFM_REG_CONFIG  , 0, 0xffffffff3fffffffUL, 0xffffffff9fffffffUL, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc9  */ { PFM_REG_CONFIG  , 0, 0xffffffff3ffffffcUL, 0xffffffff9fffffffUL, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc10 */ { PFM_REG_MONITOR , 4, 0x0UL, 0xffffUL, NULL, pfm_mck_reserved, {RDEP(0)|RDEP(1),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc11 */ { PFM_REG_MONITOR , 6, 0x0UL, 0x30f01cf, NULL,  pfm_mck_reserved, {RDEP(2)|RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc12 */ { PFM_REG_MONITOR , 6, 0x0UL, 0xffffUL, NULL,  pfm_mck_reserved, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc13 */ { PFM_REG_CONFIG  , 0, 0x00002078fefefefeUL, 0x1e00018181818UL, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc14 */ { PFM_REG_CONFIG  , 0, 0x0db60db60db60db6UL, 0x2492UL, NULL, pfm_mck_pmc_check, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+/* pmc15 */ { PFM_REG_CONFIG  , 0, 0x00000000fffffff0UL, 0xfUL, NULL, pfm_mck_reserved, {0UL,0UL, 0UL, 0UL}, {0UL,0UL, 0UL, 0UL}},
+	    { PFM_REG_END     , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}}, /* end marker */
 };
 
-static pfm_reg_desc_t pmd_desc[256]={
-/* pmd0  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(1),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
-/* pmd1  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(0),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
-/* pmd2  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
-/* pmd3  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(2)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
-/* pmd4  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(4),0UL, 0UL, 0UL}},
-/* pmd5  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(5),0UL, 0UL, 0UL}},
-/* pmd6  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(6),0UL, 0UL, 0UL}},
-/* pmd7  */ { PFM_REG_COUNTING, 0, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(7),0UL, 0UL, 0UL}},
-/* pmd8  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd9  */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd10 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd11 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd12 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd13 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd14 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd15 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd16 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
-/* pmd17 */ { PFM_REG_BUFFER, 0, NULL, NULL, {RDEP(2)|RDEP(3),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
-	    { PFM_REG_NONE, 0, NULL, NULL, {0,}, {0,}}, /* end marker */
+static pfm_reg_desc_t pfm_pmd_desc[PMU_MAX_PMDS]={
+/* pmd0  */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(1),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
+/* pmd1  */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(0),0UL, 0UL, 0UL}, {RDEP(10),0UL, 0UL, 0UL}},
+/* pmd2  */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(3)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
+/* pmd3  */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(2)|RDEP(17),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
+/* pmd4  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(4),0UL, 0UL, 0UL}},
+/* pmd5  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(5),0UL, 0UL, 0UL}},
+/* pmd6  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(6),0UL, 0UL, 0UL}},
+/* pmd7  */ { PFM_REG_COUNTING, 0, 0x0UL, -1UL, NULL, NULL, {0UL,0UL, 0UL, 0UL}, {RDEP(7),0UL, 0UL, 0UL}},
+/* pmd8  */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd9  */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd10 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd11 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd12 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(13)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd13 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(14)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd14 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(15)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd15 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(16),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd16 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(8)|RDEP(9)|RDEP(10)|RDEP(11)|RDEP(12)|RDEP(13)|RDEP(14)|RDEP(15),0UL, 0UL, 0UL}, {RDEP(12),0UL, 0UL, 0UL}},
+/* pmd17 */ { PFM_REG_BUFFER  , 0, 0x0UL, -1UL, NULL, NULL, {RDEP(2)|RDEP(3),0UL, 0UL, 0UL}, {RDEP(11),0UL, 0UL, 0UL}},
+	    { PFM_REG_END     , 0, 0x0UL, -1UL, NULL, NULL, {0,}, {0,}}, /* end marker */
 };
 
+/*
+ * PMC reserved fields must have their power-up values preserved
+ */
+static int
+pfm_mck_reserved(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs)
+{
+	unsigned long tmp1, tmp2, ival = *val;
+
+	/* remove reserved areas from user value */
+	tmp1 = ival & PMC_RSVD_MASK(cnum);
+
+	/* get reserved fields values */
+	tmp2 = PMC_DFL_VAL(cnum) & ~PMC_RSVD_MASK(cnum);
+
+	*val = tmp1 | tmp2;
+
+	DBprintk(("pmc[%d]=0x%lx, mask=0x%lx, reset=0x%lx, val=0x%lx\n", 
+		  cnum, ival, PMC_RSVD_MASK(cnum), PMC_DFL_VAL(cnum), *val)); 
+	return 0;
+}
+
 static int
 pfm_mck_pmc_check(struct task_struct *task, unsigned int cnum, unsigned long *val, struct pt_regs *regs)
 {
@@ -65,6 +87,9 @@
 	int ret = 0, check_case1 = 0;
 	unsigned long val8 = 0, val14 = 0, val13 = 0;
 
+	/* first preserve the reserved fields */
+	pfm_mck_reserved(task, cnum, val, regs);
+
 	/*
 	 * we must clear the debug registers if any pmc13.ena_dbrpX bit is enabled 
 	 * before they are written (fl_using_dbreg==0) to avoid picking up stale information. 
@@ -105,7 +130,10 @@
 		case  8: val8 = *val;
 			 val13 = th->pmc[13];
 			 val14 = th->pmc[14];
+			 *val |= 1UL << 2; /* bit 2 must always be 1 */
 			 check_case1 = 1;
+			 break;
+		case  9: *val |= 1UL << 2; /* bit 2 must always be 1 */
 			 break;
 		case 13: val8  = th->pmc[8];
 			 val13 = *val;
diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
--- a/arch/ia64/kernel/process.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/kernel/process.c	Wed Oct 30 16:44:28 2002
@@ -12,6 +12,7 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 #include <linux/personality.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -45,8 +46,9 @@
 do_show_stack (struct unw_frame_info *info, void *arg)
 {
 	unsigned long ip, sp, bsp;
+	char buf[80];			/* don't make it so big that it overflows the stack! */
 
-	printk("\nCall Trace: ");
+	printk("\nCall Trace:\n");
 	do {
 		unw_get_ip(info, &ip);
 		if (ip == 0)
@@ -54,7 +56,9 @@
 
 		unw_get_sp(info, &sp);
 		unw_get_bsp(info, &bsp);
-		printk("[<%016lx>] sp=0x%016lx bsp=0x%016lx\n", ip, sp, bsp);
+		snprintf(buf, sizeof(buf), " [<%016lx>] %%s sp=0x%016lx bsp=0x%016lx\n",
+			 ip, sp, bsp);
+		print_symbol(buf, ip);
 	} while (unw_unwind(info) >= 0);
 }
 
@@ -94,6 +98,7 @@
 	printk("\nPid: %d, comm: %20s\n", current->pid, current->comm);
 	printk("psr : %016lx ifs : %016lx ip  : [<%016lx>]    %s\n",
 	       regs->cr_ipsr, regs->cr_ifs, ip, print_tainted());
+	print_symbol("ip is at %s\n", ip);
 	printk("unat: %016lx pfs : %016lx rsc : %016lx\n",
 	       regs->ar_unat, regs->ar_pfs, regs->ar_rsc);
 	printk("rnat: %016lx bsps: %016lx pr  : %016lx\n",
@@ -199,10 +204,8 @@
 	if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
 		pfm_save_regs(task);
 
-# ifdef CONFIG_SMP
 	if (__get_cpu_var(pfm_syst_wide))
 		pfm_syst_wide_update_task(task, 0);
-# endif
 #endif
 
 #ifdef CONFIG_IA32_SUPPORT
@@ -221,9 +224,8 @@
 	if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
 		pfm_load_regs(task);
 
-# ifdef CONFIG_SMP
-	if (__get_cpu_var(pfm_syst_wide)) pfm_syst_wide_update_task(task, 1);
-# endif
+	if (__get_cpu_var(pfm_syst_wide)) 
+		pfm_syst_wide_update_task(task, 1);
 #endif
 
 #ifdef CONFIG_IA32_SUPPORT
diff -Nru a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
--- a/arch/ia64/kernel/setup.c	Wed Oct 30 16:44:23 2002
+++ b/arch/ia64/kernel/setup.c	Wed Oct 30 16:44:23 2002
@@ -34,6 +34,7 @@
 
 #include <asm/ia32.h>
 #include <asm/page.h>
+#include <asm/pgtable.h>
 #include <asm/machvec.h>
 #include <asm/processor.h>
 #include <asm/sal.h>
@@ -49,9 +50,6 @@
 # error "struct cpuinfo_ia64 too big!"
 #endif
 
-#define MIN(a,b)	((a) < (b) ? (a) : (b))
-#define MAX(a,b)	((a) > (b) ? (a) : (b))
-
 extern char _end;
 
 #ifdef CONFIG_SMP
@@ -95,6 +93,10 @@
 static struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
 static int num_rsvd_regions;
 
+#define IGNORE_PFN0	1	/* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */
+
+#ifndef CONFIG_DISCONTIGMEM
+
 static unsigned long bootmap_start; /* physical address where the bootmem map is located */
 
 static int
@@ -108,17 +110,63 @@
 	return 0;
 }
 
-#define IGNORE_PFN0	1	/* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */
+#else /* CONFIG_DISCONTIGMEM */
 
 /*
- * Free available memory based on the primitive map created from
- * the boot parameters. This routine does not assume the incoming
- * segments are sorted.
+ * efi_memmap_walk() knows nothing about layout of memory across nodes. Find
+ * out to which node a block of memory belongs.  Ignore memory that we cannot
+ * identify, and split blocks that run across multiple nodes.
+ *
+ * Take this opportunity to round the start address up and the end address
+ * down to page boundaries.
  */
-static int
-free_available_memory (unsigned long start, unsigned long end, void *arg)
+void
+call_pernode_memory (unsigned long start, unsigned long end, void *arg)
+{
+	unsigned long rs, re;
+	void (*func)(unsigned long, unsigned long, int, int);
+	int i;
+
+	start = PAGE_ALIGN(start);
+	end &= PAGE_MASK;
+	if (start >= end)
+		return;
+
+	func = arg;
+
+	if (!num_memblks) {
+		/*
+		 * This machine doesn't have SRAT, so call func with
+		 * nid=0, bank=0.
+		 */
+		if (start < end)
+			(*func)(start, end - start, 0, 0);
+		return;
+	}
+
+	for (i = 0; i < num_memblks; i++) {
+		rs = max(start, node_memblk[i].start_paddr);
+		re = min(end, node_memblk[i].start_paddr+node_memblk[i].size);
+
+		if (rs < re)
+			(*func)(rs, re-rs, node_memblk[i].nid,
+				node_memblk[i].bank);
+	}
+}
+
+#endif /* CONFIG_DISCONTIGMEM */
+
+/*
+ * Filter incoming memory segments based on the primitive map created from the boot
+ * parameters. Segments contained in the map are removed from the memory ranges. A
+ * caller-specified function is called with the memory ranges that remain after filtering.
+ * This routine does not assume the incoming segments are sorted.
+ */
+int
+filter_rsvd_memory (unsigned long start, unsigned long end, void *arg)
 {
 	unsigned long range_start, range_end, prev_start;
+	void (*func)(unsigned long, unsigned long);
 	int i;
 
 #if IGNORE_PFN0
@@ -132,13 +180,18 @@
 	 * lowest possible address(walker uses virtual)
 	 */
 	prev_start = PAGE_OFFSET;
+	func = arg;
 
 	for (i = 0; i < num_rsvd_regions; ++i) {
-		range_start = MAX(start, prev_start);
-		range_end   = MIN(end, rsvd_region[i].start);
+		range_start = max(start, prev_start);
+		range_end   = min(end, rsvd_region[i].start);
 
 		if (range_start < range_end)
-			free_bootmem(__pa(range_start), range_end - range_start);
+#ifdef CONFIG_DISCONTIGMEM
+			call_pernode_memory(__pa(range_start), __pa(range_end), func);
+#else
+			(*func)(__pa(range_start), range_end - range_start);
+#endif
 
 		/* nothing more available in this segment */
 		if (range_end == end) return 0;
@@ -150,6 +203,7 @@
 }
 
 
+#ifndef CONFIG_DISCONTIGMEM
 /*
  * Find a place to put the bootmap and return its starting address in bootmap_start.
  * This address must be page-aligned.
@@ -171,8 +225,8 @@
 	free_start = PAGE_OFFSET;
 
 	for (i = 0; i < num_rsvd_regions; i++) {
-		range_start = MAX(start, free_start);
-		range_end   = MIN(end, rsvd_region[i].start & PAGE_MASK);
+		range_start = max(start, free_start);
+		range_end   = min(end, rsvd_region[i].start & PAGE_MASK);
 
 		if (range_end <= range_start) continue;	/* skip over empty range */
 
@@ -188,6 +242,7 @@
 	}
 	return 0;
 }
+#endif /* !CONFIG_DISCONTIGMEM */
 
 static void
 sort_regions (struct rsvd_region *rsvd_region, int max)
@@ -252,6 +307,15 @@
 
 	sort_regions(rsvd_region, num_rsvd_regions);
 
+#ifdef CONFIG_DISCONTIGMEM
+	{
+		extern void discontig_mem_init (void);
+
+		bootmap_size = max_pfn = 0;	/* stop gcc warnings */
+		discontig_mem_init();
+	}
+#else /* !CONFIG_DISCONTIGMEM */
+
 	/* first find highest page frame number */
 	max_pfn = 0;
 	efi_memmap_walk(find_max_pfn, &max_pfn);
@@ -268,8 +332,9 @@
 	bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn);
 
 	/* Free all available memory, then mark bootmem-map as being in use.  */
-	efi_memmap_walk(free_available_memory, 0);
+	efi_memmap_walk(filter_rsvd_memory, free_bootmem);
 	reserve_bootmem(bootmap_start, bootmap_size);
+#endif /* !CONFIG_DISCONTIGMEM */
 
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (ia64_boot_param->initrd_start) {
@@ -296,6 +361,16 @@
 
 	efi_init();
 
+#ifdef CONFIG_ACPI_BOOT
+	/* Initialize the ACPI boot-time table parser */
+	acpi_table_init(*cmdline_p);
+
+#ifdef CONFIG_ACPI_NUMA
+	acpi_numa_init();
+#endif
+
+#endif /* CONFIG_APCI_BOOT */
+
 	find_memory();
 
 #if 0
@@ -530,6 +605,7 @@
 	/* start_kernel() requires this... */
 }
 
+
 /*
  * cpu_init() initializes state that is per-CPU.  This function acts
  * as a 'CPU state barrier', nothing should get across.
@@ -542,32 +618,40 @@
 	unsigned long num_phys_stacked;
 	pal_vm_info_2_u_t vmi;
 	unsigned int max_ctx;
-	struct cpuinfo_ia64 *my_cpu_info;
-	void *my_cpu_data;
+	struct cpuinfo_ia64 *cpu_info;
+	void *cpu_data;
 
 #ifdef CONFIG_SMP
 	extern char __per_cpu_end[];
-	int cpu = smp_processor_id();
+	int cpu;
 
 	if (__per_cpu_end - __per_cpu_start > PAGE_SIZE)
 		panic("Per-cpu data area too big! (%Zu > %Zu)",
 		      __per_cpu_end - __per_cpu_start, PAGE_SIZE);
 
+
 	/*
-	 * On the BSP, the page allocator isn't initialized by the time we get here.  On
-	 * the APs, the bootmem allocator is no longer available...
+	 * get_free_pages() cannot be used before cpu_init() done.  BSP allocates
+	 * "NR_CPUS" pages for all CPUs to avoid that AP calls get_zeroed_page().
 	 */
-	if (cpu == 0)
-		my_cpu_data = alloc_bootmem_pages(__per_cpu_end - __per_cpu_start);
-	else
-		my_cpu_data = (void *) get_zeroed_page(GFP_KERNEL);
-	memcpy(my_cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
-	__per_cpu_offset[cpu] = (char *) my_cpu_data - __per_cpu_start;
-	my_cpu_info = my_cpu_data + ((char *) &__get_cpu_var(cpu_info) - __per_cpu_start);
-#else
-	my_cpu_data = __phys_per_cpu_start;
+	if (smp_processor_id() == 0) {
+		cpu_data = (unsigned long)alloc_bootmem_pages(PAGE_SIZE * NR_CPUS);
+		for (cpu = 0; cpu < NR_CPUS; cpu++) {
+			memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
+			__per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start;
+			cpu_data += PAGE_SIZE;
+		}
+	}
+	cpu_data = __per_cpu_start + __per_cpu_offset[smp_processor_id()];
+#else /* !CONFIG_SMP */
+	cpu_data = __phys_per_cpu_start;
+#endif /* !CONFIG_SMP */
+
+	cpu_info = cpu_data + ((char *) &__get_cpu_var(cpu_info) - __per_cpu_start);
+#ifdef CONFIG_NUMA
+	cpu_info->node_data = get_node_data_ptr();
+	cpu_info->nodeid = boot_get_local_nodeid();
 #endif
-	my_cpu_info = my_cpu_data + ((char *) &__get_cpu_var(cpu_info) - __per_cpu_start);
 
 	/*
 	 * We can't pass "local_cpu_data" to identify_cpu() because we haven't called
@@ -575,14 +659,14 @@
 	 * depends on the data returned by identify_cpu().  We break the dependency by
 	 * accessing cpu_data() the old way, through identity mapped space.
 	 */
-	identify_cpu(my_cpu_info);
+	identify_cpu(cpu_info);
 
 #ifdef CONFIG_MCKINLEY
 	{
-#define FEATURE_SET 16
+#		define FEATURE_SET 16
 		struct ia64_pal_retval iprv;
 
-		if (my_cpu_info->family == 0x1f) {
+		if (cpu_info->family == 0x1f) {
 			PAL_CALL_PHYS(iprv, PAL_PROC_GET_FEATURES, 0, FEATURE_SET, 0);
 			if ((iprv.status == 0) && (iprv.v0 & 0x80) && (iprv.v2 & 0x80))
 				PAL_CALL_PHYS(iprv, PAL_PROC_SET_FEATURES,
@@ -613,7 +697,7 @@
 	if (current->mm)
 		BUG();
 
-	ia64_mmu_init(my_cpu_data);
+	ia64_mmu_init(cpu_data);
 
 #ifdef CONFIG_IA32_SUPPORT
 	/* initialize global ia32 state - CR0 and CR4 */
diff -Nru a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
--- a/arch/ia64/kernel/signal.c	Wed Oct 30 16:44:29 2002
+++ b/arch/ia64/kernel/signal.c	Wed Oct 30 16:44:29 2002
@@ -41,6 +41,16 @@
 # define GET_SIGSET(k,u)	__get_user((k)->sig[0], &(u)->sig[0])
 #endif
 
+register double f16 asm ("f16"); register double f17 asm ("f17");
+register double f18 asm ("f18"); register double f19 asm ("f19");
+register double f20 asm ("f20"); register double f21 asm ("f21");
+register double f22 asm ("f22"); register double f23 asm ("f23");
+
+register double f24 asm ("f24"); register double f25 asm ("f25");
+register double f26 asm ("f26"); register double f27 asm ("f27");
+register double f28 asm ("f28"); register double f29 asm ("f29");
+register double f30 asm ("f30"); register double f31 asm ("f31");
+
 long
 ia64_rt_sigsuspend (sigset_t *uset, size_t sigsetsize, struct sigscratch *scr)
 {
@@ -58,13 +68,13 @@
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
 
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	{
 		oldset = current->blocked;
 		current->blocked = set;
 		recalc_sigpending();
 	}
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	/*
 	 * The return below usually returns to the signal handler.  We need to
@@ -264,12 +274,12 @@
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
 
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	{
 		current->blocked = set;
 		recalc_sigpending();
 	}
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	if (restore_sigcontext(sc, scr))
 		goto give_sigsegv;
@@ -458,13 +468,13 @@
 		ka->sa.sa_handler = SIG_DFL;
 
 	if (!(ka->sa.sa_flags & SA_NODEFER)) {
-		spin_lock_irq(&current->sigmask_lock);
+		spin_lock_irq(&current->sig->siglock);
 		{
 			sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
 			sigaddset(&current->blocked, sig);
 			recalc_sigpending();
 		}
-		spin_unlock_irq(&current->sigmask_lock);
+		spin_unlock_irq(&current->sig->siglock);
 	}
 	return 1;
 }
diff -Nru a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
--- a/arch/ia64/kernel/smpboot.c	Wed Oct 30 16:44:26 2002
+++ b/arch/ia64/kernel/smpboot.c	Wed Oct 30 16:44:26 2002
@@ -16,6 +16,7 @@
 
 #include <linux/config.h>
 
+#include <linux/acpi.h>
 #include <linux/bootmem.h>
 #include <linux/delay.h>
 #include <linux/init.h>
@@ -426,6 +427,37 @@
 		cpu++;
 	}
 }
+
+#ifdef CONFIG_NUMA
+
+char cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+
+/*
+ * Build cpu to node mapping.
+ */
+void __init
+build_cpu_to_node_map (void)
+{
+	int cpu, i;
+
+	for(cpu = 0; cpu < NR_CPUS; ++cpu) {
+		/*
+		 * All Itanium NUMA platforms I know use ACPI, so maybe we
+		 * can drop this ifdef completely.                    [EF]
+		 */
+#ifdef CONFIG_ACPI_NUMA
+		for (i = 0; i < NR_CPUS; ++i)
+			if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) {
+				cpu_to_node_map[cpu] = node_cpuid[i].nid;
+				break;
+			}
+#else
+#		error Fixme: Dunno how to build CPU-to-node map.
+#endif
+	}
+}
+
+#endif /* CONFIG_NUMA */
 
 /*
  * Cycle through the APs sending Wakeup IPIs to boot each.
diff -Nru a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
--- a/arch/ia64/kernel/sys_ia64.c	Wed Oct 30 16:44:29 2002
+++ b/arch/ia64/kernel/sys_ia64.c	Wed Oct 30 16:44:29 2002
@@ -282,18 +282,20 @@
 	extern int free_hugepages(struct vm_area_struct *);
 	int retval;
 
-	vma = find_vma(mm, addr);
-	if (!vma || !is_vm_hugetlb_page(vma) || (vma->vm_start != addr))
-		return -EINVAL;
-
 	down_write(&mm->mmap_sem);
 	{
+		vma = find_vma(mm, addr);
+		if (!vma || !is_vm_hugetlb_page(vma) || (vma->vm_start != addr))
+			retval = -EINVAL;
+			goto out;
+
 		spin_lock(&mm->page_table_lock);
 		{
 			retval = free_hugepages(vma);
 		}
 		spin_unlock(&mm->page_table_lock);
 	}
+out:
 	up_write(&mm->mmap_sem);
 	return retval;
 }
diff -Nru a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
--- a/arch/ia64/kernel/time.c	Wed Oct 30 16:44:25 2002
+++ b/arch/ia64/kernel/time.c	Wed Oct 30 16:44:25 2002
@@ -1,9 +1,9 @@
 /*
  * linux/arch/ia64/kernel/time.c
  *
- * Copyright (C) 1998-2001 Hewlett-Packard Co
- * Copyright (C) 1998-2000 Stephane Eranian <eranian@hpl.hp.com>
- * Copyright (C) 1999-2001 David Mosberger <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2002 Hewlett-Packard Co
+ *	Stephane Eranian <eranian@hpl.hp.com>
+ *	David Mosberger <davidm@hpl.hp.com>
  * Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
  * Copyright (C) 1999-2000 VA Linux Systems
  * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com>
@@ -12,6 +12,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/profile.h>
 #include <linux/sched.h>
 #include <linux/time.h>
 #include <linux/interrupt.h>
diff -Nru a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
--- a/arch/ia64/kernel/traps.c	Wed Oct 30 16:44:34 2002
+++ b/arch/ia64/kernel/traps.c	Wed Oct 30 16:44:34 2002
@@ -54,8 +54,8 @@
 	if (ia64_boot_param->fpswa) {
 		/* FPSWA fixup: make the interface pointer a kernel virtual address: */
 		fpswa_interface = __va(ia64_boot_param->fpswa);
-		major = fpswa_interface->revision & 0xffff;
-		minor = fpswa_interface->revision >> 16;
+		major = fpswa_interface->revision >> 16;
+		minor = fpswa_interface->revision & 0xffff;
 	}
 	printk("fpswa interface at %lx (rev %d.%d)\n", ia64_boot_param->fpswa, major, minor);
 }
@@ -69,7 +69,6 @@
 {
 	int loglevel_save = console_loglevel;
 
-	spin_lock_init(&timerlist_lock);
 	if (yes) {
 		oops_in_progress = 1;
 		return;
diff -Nru a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile
--- a/arch/ia64/lib/Makefile	Wed Oct 30 16:44:34 2002
+++ b/arch/ia64/lib/Makefile	Wed Oct 30 16:44:34 2002
@@ -32,26 +32,26 @@
 AFLAGS___modsi3.o	=	     -DMODULO
 AFLAGS___umodsi3.o	= -DUNSIGNED -DMODULO
 
-__divdi3.o: idiv64.S
+$(obj)/__divdi3.o: $(src)/idiv64.S
 	$(cmd_as_o_S)
 
-__udivdi3.o: idiv64.S
+$(obj)/__udivdi3.o: $(src)/idiv64.S
 	$(cmd_as_o_S)
 
-__moddi3.o: idiv64.S
+$(obj)/__moddi3.o: $(src)/idiv64.S
 	$(cmd_as_o_S)
 
-__umoddi3.o: idiv64.S
+$(obj)/__umoddi3.o: $(src)/idiv64.S
 	$(cmd_as_o_S)
 
-__divsi3.o: idiv32.S
+$(obj)/__divsi3.o: $(src)/idiv32.S
 	$(cmd_as_o_S)
 
-__udivsi3.o: idiv32.S
+$(obj)/__udivsi3.o: $(src)/idiv32.S
 	$(cmd_as_o_S)
 
-__modsi3.o: idiv32.S
+$(obj)/__modsi3.o: $(src)/idiv32.S
 	$(cmd_as_o_S)
 
-__umodsi3.o: idiv32.S
+$(obj)/__umodsi3.o: $(src)/idiv32.S
 	$(cmd_as_o_S)
diff -Nru a/arch/ia64/mm/Makefile b/arch/ia64/mm/Makefile
--- a/arch/ia64/mm/Makefile	Wed Oct 30 16:44:26 2002
+++ b/arch/ia64/mm/Makefile	Wed Oct 30 16:44:27 2002
@@ -9,5 +9,7 @@
 
 obj-y	 := init.o fault.o tlb.o extable.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
+obj-$(CONFIG_NUMA) += numa.o
+obj-$(CONFIG_DISCONTIGMEM) += discontig.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ia64/mm/discontig.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,305 @@
+/*
+ * Copyright (c) 2000 Silicon Graphics, Inc.  All rights reserved.
+ * Copyright (c) 2001 Intel Corp.
+ * Copyright (c) 2001 Tony Luck <tony.luck@intel.com>
+ * Copyright (c) 2002 NEC Corp.
+ * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
+ */
+
+/*
+ * Platform initialization for Discontig Memory
+ */
+
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/bootmem.h>
+#include <linux/mmzone.h>
+#include <linux/acpi.h>
+#include <linux/efi.h>
+
+
+/*
+ * Round an address upward to the next multiple of GRANULE size.
+ */
+#define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
+
+static struct ia64_node_data	*node_data[NR_NODES];
+static long			boot_pg_data[8*NR_NODES+sizeof(pg_data_t)]  __initdata;
+static pg_data_t		*pg_data_ptr[NR_NODES] __initdata;
+static bootmem_data_t		bdata[NR_NODES][NR_BANKS_PER_NODE+1] __initdata;
+
+extern int  filter_rsvd_memory (unsigned long start, unsigned long end, void *arg);
+
+/*
+ * Return the compact node number of this cpu. Used prior to
+ * setting up the cpu_data area.
+ *	Note - not fast, intended for boot use only!!
+ */
+int
+boot_get_local_nodeid(void)
+{
+	int	i;
+
+	for (i = 0; i < NR_CPUS; i++)
+		if (node_cpuid[i].phys_id == hard_smp_processor_id())
+			return node_cpuid[i].nid;
+
+	/* node info missing, so nid should be 0.. */
+	return 0;
+}
+
+/*
+ * Return a pointer to the pg_data structure for a node.
+ * This function is used ONLY in early boot before the cpu_data
+ * structure is available.
+ */
+pg_data_t* __init
+boot_get_pg_data_ptr(long node)
+{
+	return pg_data_ptr[node];
+}
+
+
+/*
+ * Return a pointer to the node data for the current node.
+ *	(boottime initialization only)
+ */
+struct ia64_node_data *
+get_node_data_ptr(void)
+{
+	return node_data[boot_get_local_nodeid()];
+}
+
+/*
+ * We allocate one of the bootmem_data_t structs for each piece of memory
+ * that we wish to treat as a contiguous block.  Each such block must start
+ * on a BANKSIZE boundary.  Multiple banks per node is not supported.
+ */
+static int __init
+build_maps(unsigned long pstart, unsigned long length, int node)
+{
+	bootmem_data_t	*bdp;
+	unsigned long cstart, epfn;
+
+	bdp = pg_data_ptr[node]->bdata;
+	epfn = GRANULEROUNDUP(pstart + length) >> PAGE_SHIFT;
+	cstart = pstart & ~(BANKSIZE - 1);
+
+	if (!bdp->node_low_pfn) {
+		bdp->node_boot_start = cstart;
+		bdp->node_low_pfn = epfn;
+	} else {
+		bdp->node_boot_start = min(cstart, bdp->node_boot_start);
+		bdp->node_low_pfn = max(epfn, bdp->node_low_pfn);
+	}
+
+	min_low_pfn = min(min_low_pfn, bdp->node_boot_start>>PAGE_SHIFT);
+	max_low_pfn = max(max_low_pfn, bdp->node_low_pfn);
+
+	return 0;
+}
+
+/*
+ * Find space on each node for the bootmem map.
+ *
+ * Called by efi_memmap_walk to find boot memory on each node. Note that
+ * only blocks that are free are passed to this routine (currently filtered by
+ * free_available_memory).
+ */
+static int __init
+find_bootmap_space(unsigned long pstart, unsigned long length, int node)
+{
+	unsigned long	mapsize, pages, epfn;
+	bootmem_data_t	*bdp;
+
+	epfn = (pstart + length) >> PAGE_SHIFT;
+	bdp = &pg_data_ptr[node]->bdata[0];
+
+	if (pstart < bdp->node_boot_start || epfn > bdp->node_low_pfn)
+		return 0;
+
+	if (!bdp->node_bootmem_map) {
+		pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT);
+		mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
+		if (length > mapsize) {
+			init_bootmem_node(
+				BOOT_NODE_DATA(node),
+				pstart>>PAGE_SHIFT, 
+				bdp->node_boot_start>>PAGE_SHIFT,
+				bdp->node_low_pfn);
+		}
+
+	}
+
+	return 0;
+}
+
+
+/*
+ * Free available memory to the bootmem allocator.
+ *
+ * Note that only blocks that are free are passed to this routine (currently 
+ * filtered by free_available_memory).
+ *
+ */
+static int __init
+discontig_free_bootmem_node(unsigned long pstart, unsigned long length, int node)
+{
+	free_bootmem_node(BOOT_NODE_DATA(node), pstart, length);
+
+	return 0;
+}
+
+
+/*
+ * Reserve the space used by the bootmem maps.
+ */
+static void __init
+discontig_reserve_bootmem(void)
+{
+	int		node;
+	unsigned long	mapbase, mapsize, pages;
+	bootmem_data_t	*bdp;
+
+	for (node = 0; node < numnodes; node++) {
+		bdp = BOOT_NODE_DATA(node)->bdata;
+
+		pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT);
+		mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
+		mapbase = __pa(bdp->node_bootmem_map);
+		reserve_bootmem_node(BOOT_NODE_DATA(node), mapbase, mapsize);
+	}
+}
+
+/*
+ * Allocate per node tables.
+ * 	- the pg_data structure is allocated on each node. This minimizes offnode 
+ *	  memory references
+ *	- the node data is allocated & initialized. Portions of this structure is read-only (after 
+ *	  boot) and contains node-local pointers to usefuls data structures located on
+ *	  other nodes.
+ *
+ * We also switch to using the "real" pg_data structures at this point. Earlier in boot, we
+ * use a different structure. The only use for pg_data prior to the point in boot is to get 
+ * the pointer to the bdata for the node.
+ */
+static void __init
+allocate_pernode_structures(void)
+{
+	pg_data_t	*pgdat=0, *new_pgdat_list=0;
+	int		node, mynode;
+
+	mynode = boot_get_local_nodeid();
+	for (node = numnodes - 1; node >= 0 ; node--) {
+		node_data[node] = alloc_bootmem_node(BOOT_NODE_DATA(node), sizeof (struct ia64_node_data));
+		pgdat = __alloc_bootmem_node(BOOT_NODE_DATA(node), sizeof(pg_data_t), SMP_CACHE_BYTES, 0);
+		pgdat->bdata = &(bdata[node][0]);
+		pg_data_ptr[node] = pgdat;
+		pgdat->pgdat_next = new_pgdat_list;
+		new_pgdat_list = pgdat;
+	}
+	
+	memcpy(node_data[mynode]->pg_data_ptrs, pg_data_ptr, sizeof(pg_data_ptr));
+	memcpy(node_data[mynode]->node_data_ptrs, node_data, sizeof(node_data));
+
+	pgdat_list = new_pgdat_list;
+}
+
+/*
+ * Called early in boot to setup the boot memory allocator, and to
+ * allocate the node-local pg_data & node-directory data structures..
+ */
+void __init
+discontig_mem_init(void)
+{
+	int	node;
+
+	if (numnodes == 0) {
+		printk("node info missing!\n");
+		numnodes = 1;
+	}
+
+	for (node = 0; node < numnodes; node++) {
+		pg_data_ptr[node] = (pg_data_t*) &boot_pg_data[node];
+		pg_data_ptr[node]->bdata = &bdata[node][0];
+	}
+
+	min_low_pfn = -1;
+	max_low_pfn = 0;
+
+        efi_memmap_walk(filter_rsvd_memory, build_maps);
+        efi_memmap_walk(filter_rsvd_memory, find_bootmap_space);
+        efi_memmap_walk(filter_rsvd_memory, discontig_free_bootmem_node);
+	discontig_reserve_bootmem();
+	allocate_pernode_structures();
+}
+
+/*
+ * Initialize the paging system.
+ *	- determine sizes of each node
+ *	- initialize the paging system for the node
+ *	- build the nodedir for the node. This contains pointers to
+ *	  the per-bank mem_map entries.
+ *	- fix the page struct "virtual" pointers. These are bank specific
+ *	  values that the paging system doesnt understand.
+ *	- replicate the nodedir structure to other nodes	
+ */ 
+
+void __init
+discontig_paging_init(void)
+{
+	int		node, mynode;
+	unsigned long	max_dma, zones_size[MAX_NR_ZONES];
+	unsigned long	kaddr, ekaddr, bid;
+	struct page	*page;
+	bootmem_data_t	*bdp;
+
+	max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
+
+	mynode = boot_get_local_nodeid();
+	for (node = 0; node < numnodes; node++) {
+		long pfn, startpfn;
+
+		memset(zones_size, 0, sizeof(zones_size));
+
+		startpfn = -1;
+		bdp = BOOT_NODE_DATA(node)->bdata;
+		pfn = bdp->node_boot_start >> PAGE_SHIFT;
+		if (startpfn == -1)
+			startpfn = pfn;
+		if (pfn > max_dma)
+			zones_size[ZONE_NORMAL] += (bdp->node_low_pfn - pfn);
+		else if (bdp->node_low_pfn < max_dma)
+			zones_size[ZONE_DMA] += (bdp->node_low_pfn - pfn);
+		else {
+			zones_size[ZONE_DMA] += (max_dma - pfn);
+			zones_size[ZONE_NORMAL] += (bdp->node_low_pfn - max_dma);
+		}
+
+		free_area_init_node(node, NODE_DATA(node), NULL, zones_size, startpfn, 0);
+
+		page = NODE_DATA(node)->node_mem_map;
+
+		bdp = BOOT_NODE_DATA(node)->bdata;
+
+		kaddr = (unsigned long)__va(bdp->node_boot_start);
+		ekaddr = (unsigned long)__va(bdp->node_low_pfn << PAGE_SHIFT);
+		while (kaddr < ekaddr) {
+			bid = BANK_MEM_MAP_INDEX(kaddr);
+			node_data[mynode]->node_id_map[bid] = node;
+			node_data[mynode]->bank_mem_map_base[bid] = page;
+			kaddr += BANKSIZE;
+			page += BANKSIZE/PAGE_SIZE;
+		}
+	}
+
+	/*
+	 * Finish setting up the node data for this node, then copy it to the other nodes.
+	 */
+	for (node=0; node < numnodes; node++)
+		if (mynode != node) {
+			memcpy(node_data[node], node_data[mynode], sizeof(struct ia64_node_data));
+			node_data[node]->node = node;
+		}
+}
+
diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
--- a/arch/ia64/mm/init.c	Wed Oct 30 16:44:27 2002
+++ b/arch/ia64/mm/init.c	Wed Oct 30 16:44:28 2002
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/swap.h>
 #include <linux/efi.h>
+#include <linux/mmzone.h>
 
 #include <asm/a.out.h>
 #include <asm/bitops.h>
@@ -78,7 +79,7 @@
 		vma->vm_mm = current->mm;
 		vma->vm_start = IA64_RBS_BOT;
 		vma->vm_end = vma->vm_start + PAGE_SIZE;
-		vma->vm_page_prot = protection_map[VM_READ | VM_WRITE];
+		vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
 		vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE|VM_GROWSUP;
 		vma->vm_ops = NULL;
 		vma->vm_pgoff = 0;
@@ -347,6 +348,15 @@
 extern struct list_head htlbpage_freelist;
 #endif
 
+#ifdef CONFIG_DISCONTIGMEM
+void
+paging_init (void)
+{
+	extern void discontig_paging_init(void);
+
+	discontig_paging_init();
+}
+#else /* !CONFIG_DISCONTIGMEM */
 void
 paging_init (void)
 {
@@ -365,6 +375,7 @@
 	}
 	free_area_init(zones_size);
 }
+#endif /* !CONFIG_DISCONTIGMEM */
 
 static int
 count_pages (u64 start, u64 end, void *arg)
@@ -380,10 +391,9 @@
 {
 	unsigned long num_reserved = 0;
 	unsigned long *count = arg;
-	struct page *pg;
 
-	for (pg = virt_to_page(start); pg < virt_to_page(end); ++pg)
-		if (PageReserved(pg))
+	for (; start < end; start += PAGE_SIZE)
+		if (PageReserved(virt_to_page(start)))
 			++num_reserved;
 	*count += num_reserved;
 	return 0;
@@ -395,6 +405,7 @@
 	extern char __start_gate_section[];
 	long reserved_pages, codesize, datasize, initsize;
 	unsigned long num_pgt_pages;
+	pg_data_t *pgdat;
 
 #ifdef CONFIG_PCI
 	/*
@@ -405,16 +416,19 @@
 	platform_pci_dma_init();
 #endif
 
+#ifndef CONFIG_DISCONTIGMEM
 	if (!mem_map)
 		BUG();
+	max_mapnr = max_low_pfn;
+#endif
 
 	num_physpages = 0;
 	efi_memmap_walk(count_pages, &num_physpages);
 
-	max_mapnr = max_low_pfn;
 	high_memory = __va(max_low_pfn * PAGE_SIZE);
 
-	totalram_pages += free_all_bootmem();
+	for_each_pgdat(pgdat)
+		totalram_pages += free_all_bootmem_node(pgdat);
 
 	reserved_pages = 0;
 	efi_memmap_walk(count_reserved_pages, &reserved_pages);
@@ -425,7 +439,7 @@
 
 	printk("Memory: %luk/%luk available (%luk code, %luk reserved, %luk data, %luk init)\n",
 	       (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10),
-	       max_mapnr << (PAGE_SHIFT - 10), codesize >> 10, reserved_pages << (PAGE_SHIFT - 10),
+	       num_physpages << (PAGE_SHIFT - 10), codesize >> 10, reserved_pages << (PAGE_SHIFT - 10),
 	       datasize >> 10, initsize >> 10);
 
 	/*
@@ -440,6 +454,8 @@
 		num_pgt_pages = nr_free_pages() / 10;
 	if (num_pgt_pages > pgt_cache_water[1])
 		pgt_cache_water[1] = num_pgt_pages;
+
+	show_mem();
 
 	/* install the gate page in the global page table: */
 	put_gate_page(virt_to_page(__start_gate_section), GATE_ADDR);
diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ia64/mm/numa.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,46 @@
+/*
+ * 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 file contains NUMA specific variables and functions which can
+ * be split away from DISCONTIGMEM and are used on NUMA machines with
+ * contiguous memory.
+ * 
+ *                         2002/08/07 Erich Focht <efocht@ess.nec.de>
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+#include <linux/mmzone.h>
+#include <asm/numa.h>
+
+/*
+ * The following structures are usually initialized by ACPI or
+ * similar mechanisms and describe the NUMA characteristics of the machine.
+ */
+int num_memblks = 0;
+struct node_memblk_s node_memblk[NR_MEMBLKS];
+struct node_cpuid_s node_cpuid[NR_CPUS];
+/*
+ * This is a matrix with "distances" between nodes, they should be
+ * proportional to the memory access latency ratios.
+ */
+u8 numa_slit[NR_NODES * NR_NODES];
+
+/* Identify which cnode a physical address resides on */
+int
+paddr_to_nid(unsigned long paddr)
+{
+	int	i;
+
+	for (i = 0; i < num_memblks; i++)
+		if (paddr >= node_memblk[i].start_paddr &&
+		    paddr < node_memblk[i].start_paddr + node_memblk[i].size)
+			break;
+
+	return (i < num_memblks) ? node_memblk[i].nid : -1;
+}
diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
--- a/arch/ia64/pci/pci.c	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/pci/pci.c	Wed Oct 30 16:44:28 2002
@@ -141,13 +141,13 @@
 /*
  *  Called after each bus is probed, but before its children are examined.
  */
-void __init
+void __devinit
 pcibios_fixup_bus (struct pci_bus *b)
 {
 	return;
 }
 
-void __init
+void __devinit
 pcibios_update_resource (struct pci_dev *dev, struct resource *root,
 			 struct resource *res, int resource)
 {
@@ -163,7 +163,7 @@
 	/* ??? FIXME -- record old value for shutdown.  */
 }
 
-void __init
+void __devinit
 pcibios_update_irq (struct pci_dev *dev, int irq)
 {
 	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
@@ -171,7 +171,7 @@
 	/* ??? FIXME -- record old value for shutdown.  */
 }
 
-void __init
+void __devinit
 pcibios_fixup_pbus_ranges (struct pci_bus * bus, struct pbus_set_ranges_data * ranges)
 {
 }
diff -Nru a/arch/ia64/tools/Makefile b/arch/ia64/tools/Makefile
--- a/arch/ia64/tools/Makefile	Wed Oct 30 16:44:28 2002
+++ b/arch/ia64/tools/Makefile	Wed Oct 30 16:44:28 2002
@@ -2,6 +2,8 @@
 
 TARGET	= $(TOPDIR)/include/asm-ia64/offsets.h
 
+src = $(obj)
+
 all:
 
 fastdep:
@@ -9,13 +11,13 @@
 mrproper: clean
 
 clean:
-	rm -f print_offsets.s print_offsets offsets.h
+	rm -f $(obj)/print_offsets.s $(obj)/print_offsets $(obj)/offsets.h
 
-$(TARGET): offsets.h
-	@if ! cmp -s offsets.h ${TARGET}; then	\
+$(TARGET): $(obj)/offsets.h
+	@if ! cmp -s $(obj)/offsets.h ${TARGET}; then	\
 		echo -e "*** Updating ${TARGET}...";	\
-		cp offsets.h ${TARGET};		\
-	else					\
+		cp $(obj)/offsets.h ${TARGET};		\
+	else						\
 		echo "*** ${TARGET} is up to date";	\
 	fi
 
@@ -30,25 +32,26 @@
 
 ifeq ($(CROSS_COMPILE),)
 
-offsets.h: print_offsets
-	./print_offsets > offsets.h
+$(obj)/offsets.h: $(obj)/print_offsets
+	$(obj)/print_offsets > $(obj)/offsets.h
 
 comma	:= ,
 
-print_offsets: print_offsets.c FORCE
+$(obj)/print_offsets: $(src)/print_offsets.c FORCE
+	[ -r $(TARGET) ] || echo "#define IA64_TASK_SIZE 0" > $(TARGET)
 	$(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \
-		print_offsets.c -o $@
+		$(src)/print_offsets.c -o $@
 
 FORCE:
 
 else
 
-offsets.h: print_offsets.s
-	$(AWK) -f print_offsets.awk $^ > $@
+$(obj)/offsets.h: $(obj)/print_offsets.s
+	$(AWK) -f $(src)/print_offsets.awk $^ > $@
 
-print_offsets.s: print_offsets.c
-	$(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -S \
-		print_offsets.c -o $@
+$(obj)/print_offsets.s: $(src)/print_offsets.c
+	[ -r $(TARGET) ] || echo "#define IA64_TASK_SIZE 0" > $(TARGET)
+	$(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -S $^ -o $@
 
 endif
 
diff -Nru a/arch/ia64/vmlinux.lds.S b/arch/ia64/vmlinux.lds.S
--- a/arch/ia64/vmlinux.lds.S	Wed Oct 30 16:44:32 2002
+++ b/arch/ia64/vmlinux.lds.S	Wed Oct 30 16:44:32 2002
@@ -12,11 +12,11 @@
 {
   /* Sections to be discarded */
   /DISCARD/ : {
-	*(.text.exit)
-	*(.data.exit)
+	*(.exit.text)
+	*(.exit.data)
 	*(.exitcall.exit)
-	*(.IA_64.unwind.text.exit)
-	*(.IA_64.unwind_info.text.exit)
+	*(.IA_64.unwind.exit.text)
+	*(.IA_64.unwind_info.exit.text)
 	}
 
   v = PAGE_OFFSET;	/* this symbol is here to make debugging easier... */
@@ -65,6 +65,13 @@
 	{ *(__ksymtab) }
   __stop___ksymtab = .;
 
+  __kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
+	{
+	  __start___kallsyms = .;	/* All kernel symbols */
+	  *(__kallsyms)
+	  __stop___kallsyms = .;
+	}
+
   /* Unwind info & table: */
   . = ALIGN(8);
   .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - PAGE_OFFSET)
@@ -85,15 +92,15 @@
 
   . = ALIGN(PAGE_SIZE);
   __init_begin = .;
-  .text.init : AT(ADDR(.text.init) - PAGE_OFFSET)
-	{ *(.text.init) }
+  .init.text : AT(ADDR(.init.text) - PAGE_OFFSET)
+	{ *(.init.text) }
 
-  .data.init : AT(ADDR(.data.init) - PAGE_OFFSET)
-	{ *(.data.init) }
+  .init.data : AT(ADDR(.init.data) - PAGE_OFFSET)
+	{ *(.init.data) }
    . = ALIGN(16);
   __setup_start = .;
-  .setup.init : AT(ADDR(.setup.init) - PAGE_OFFSET)
-        { *(.setup.init) }
+  .init.setup : AT(ADDR(.init.setup) - PAGE_OFFSET)
+        { *(.init.setup) }
   __setup_end = .;
   __initcall_start = .;
   .initcall.init : AT(ADDR(.initcall.init) - PAGE_OFFSET)
diff -Nru a/arch/m68k/Config.help b/arch/m68k/Config.help
--- a/arch/m68k/Config.help	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1691 +0,0 @@
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_WARPENGINE_SCSI
-  Support for MacroSystem Development's WarpEngine Amiga SCSI-2
-  controller. Info at
-  <http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>.
-
-CONFIG_HEARTBEAT
-  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_SERIAL_EXTENDED
-  If you wish to use any non-standard features of the standard "dumb"
-  driver, say Y here. This includes HUB6 support, shared serial
-  interrupts, special multiport support, support for more than the
-  four COM 1/2/3/4 boards, etc.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about serial driver options. If unsure, say N.
-
-CONFIG_SERIAL_MANY_PORTS
-  Say Y here if you have dumb serial boards other than the four
-  standard COM 1/2/3/4 ports. This may happen if you have an AST
-  FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available
-  from <http://www.linuxdoc.org/docs.html#howto>), or other custom
-  serial port hardware which acts similar to standard serial port
-  hardware. If you only use the standard COM 1/2/3/4 ports, you can
-  say N here to save some memory. You can also say Y if you have an
-  "intelligent" multiport card such as Cyclades, Digiboards, etc.
-
-CONFIG_SERIAL_SHARE_IRQ
-  Some serial boards have hardware support which allows multiple dumb
-  serial ports on the same board to share a single IRQ. To enable
-  support for this in the serial driver, say Y here.
-
-CONFIG_SERIAL_MULTIPORT
-  Some multiport serial ports have special ports which are used to
-  signal when there are any serial ports on the board which need
-  servicing. Say Y here to enable the serial driver to take advantage
-  of those special I/O ports.
-
-CONFIG_HUB6
-  Say Y here to enable support in the dumb serial driver to support
-  the HUB6 card.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_KCORE_AOUT
-  Not necessary unless you're using a very out-of-date binutils
-  version.  You probably want KCORE_ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_APOLLO
-  Say Y here if you want to run Linux on an MC680x0-based Apollo
-  Domain workstation such as the DN3500.
-
-CONFIG_APOLLO_ELPLUS
-  Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card.
-  If you don't have one made for Apollos, you can use one from a PC,
-  except that your Apollo won't be able to boot from it (because the
-  code in the ROM will be for a PC).
-
-CONFIG_PARPORT
-  If you want to use devices connected to your machine's parallel port
-  (the connector at the computer with 25 holes), e.g. printer, ZIP
-  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
-  create a mini network by connecting the parallel ports of two local
-  machines) etc., then you need to say Y here; please read
-  <file:Documentation/parport.txt> and
-  <file:drivers/parport/BUGS-parport>.
-
-  For extensive information about drivers for many devices attaching
-  to the parallel port see <http://www.torque.net/linux-pp.html> on
-  the WWW.
-
-  It is possible to share a single parallel port among several devices
-  and it is safe to compile all the corresponding drivers into the
-  kernel.  If you want to compile parallel port support as a module
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport.o.  If you have more than one parallel port and want to
-  specify which port and IRQ to be used by this driver at module load
-  time, take a look at <file:Documentation/parport.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_PC
-  You should say Y here if you have a PC-style parallel port. All IBM
-  PC compatible computers and some Alphas have PC-style parallel
-  ports.
-
-  This code is also available as a module.  If you want to compile it
-  as a module ( = code which can be inserted in and removed from the
-  running kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport_pc.o.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_AMIGA
-  Say Y here if you need support for the parallel port hardware on
-  Amiga machines. This code is also available as a module (say M),
-  called parport_amiga.o. If in doubt, saying N is the safe plan.
-
-CONFIG_PARPORT_ATARI
-  Say Y here if you need support for the parallel port hardware on
-  Atari machines. This code is also available as a module (say M),
-  called parport_atari.o. If in doubt, saying N is the safe plan.
-
-CONFIG_PARPORT_MFC3
-  Say Y here if you need parallel port support for the MFC3 card.
-  This code is also available as a module (say M), called
-  parport_mfc3.o. If in doubt, saying N is the safe plan.
-
-CONFIG_PARPORT_1284
-  If you have a printer that supports status readback or device ID, or
-  want to use a device that uses enhanced parallel port transfer modes
-  such as EPP and ECP, say Y here to enable advanced IEEE 1284
-  transfer modes. Also say Y if you want device ID information to
-  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_BLK_DEV_SD
-  If you want to use a SCSI hard disk or the SCSI or parallel port
-  version of the IOMEGA ZIP drive under Linux, say Y and read the
-  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
-  CD-ROMs.
-
-  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 sd_mod.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  Do not compile this driver as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI disk. In this case, do not compile the driver
-  for your SCSI host adapter (below) as a module either.
-
-CONFIG_SD_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted.  In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional disks that can be loaded after the
-  first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_ST_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted.  In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional tapes that can be loaded after the
-  first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_CHR_DEV_ST
-  If you want to use a SCSI tape drive under Linux, say Y and read the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and
-  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
-  SCSI CD-ROMs.
-
-  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 st.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_BLK_DEV_SR
-  If you want to use a SCSI CD-ROM under Linux, say Y and read the
-  SCSI-HOWTO and the CD-ROM-HOWTO at
-  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
-  or M to "ISO 9660 CD-ROM file system support" later.
-
-  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 sr_mod.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_SR_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted. In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional CD-ROMs that can be loaded after
-  the first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_BLK_DEV_SR_VENDOR
-  This enables the usage of vendor specific SCSI commands. This is
-  required to support multisession CDs with old NEC/TOSHIBA cdrom
-  drives (and HP Writers). If you have such a drive and get the first
-  session only, try saying Y here; everybody else says N.
-
-CONFIG_CHR_DEV_SG
-  If you want to use SCSI scanners, synthesizers or CD-writers or just
-  about anything having "SCSI" in its name other than hard disks,
-  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
-  directly, so you need some additional software which knows how to
-  talk to these devices using the SCSI protocol:
-
-  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
-  writer software look at Cdrtools
-  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
-  and for burning a "disk at once": CDRDAO
-  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
-  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
-  For other devices, it's possible that you'll have to write the
-  driver software yourself. Please read the file
-  <file:Documentation/scsi-generic.txt> for more information.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
-  say N.
-
-CONFIG_SCSI_MULTI_LUN
-  If you have a SCSI device that supports more than one LUN (Logical
-  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-  can say Y here to force the SCSI driver to probe for multiple LUNs.
-  A SCSI device with multiple LUNs acts logically like multiple SCSI
-  devices. The vast majority of SCSI devices have only one LUN, and
-  so most people can say N here and should in fact do so, because it
-  is safer.
-
-CONFIG_SCSI_CONSTANTS
-  The error messages regarding your SCSI hardware will be easier to
-  understand if you say Y here; it will enlarge your kernel by about
-  12 KB. If in doubt, say Y.
-
-CONFIG_SCSI_LOGGING
-  This turns on a logging facility that can be used to debug a number
-  of SCSI related problems.
-
-  If you say Y here, no logging output will appear by default, but you
-  can enable logging by saying Y to "/proc file system support" and
-  "Sysctl support" below and executing the command
-
-     echo "scsi log token [level]" > /proc/scsi/scsi
-
-  at boot time after the /proc file system has been mounted.
-
-  There are a number of things that can be used for 'token' (you can
-  find them in the source: <file:drivers/scsi/scsi.c>), and this
-  allows you to select the types of information you want, and the
-  level allows you to select the level of verbosity.
-
-  If you say N here, it may be harder to track down some types of SCSI
-  problems. If you say Y here your kernel will be somewhat larger, but
-  there should be no noticeable performance impact as long as you have
-  logging turned off.
-
-CONFIG_SCSI_DEBUG
-  This is a host adapter simulator that can be programmed to simulate
-  a large number of conditions that could occur on a real bus. The
-  advantage is that many hard to reproduce problems can be tested in a
-  controlled environment where there is reduced risk of losing
-  important data. This is primarily of use to people trying to debug
-  the middle and upper layers of the SCSI subsystem. If unsure, say N.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_DUMMY
-  This is essentially a bit-bucket device (i.e. traffic you send to
-  this device is consigned into oblivion) with a configurable IP
-  address. It is most commonly used in order to make your currently
-  inactive SLIP address seem like a real address for local programs.
-  If you use SLIP or PPP, you might want to say Y here. Since this
-  thing often comes in handy, the default is Y. It won't enlarge your
-  kernel either. What a deal. Read about it in the Network
-  Administrator's Guide, available from
-  <http://www.linuxdoc.org/docs.html#guide>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called dummy.o.  If you want to use more than one dummy
-  device at a time, you need to compile this driver as a module.
-  Instead of 'dummy', the devices will then be called 'dummy0',
-  'dummy1' etc.
-
-CONFIG_SLIP
-  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
-  connect to your Internet service provider or to connect to some
-  other local Unix box or if you want to configure your Linux box as a
-  Slip/CSlip server for other people to dial in. SLIP (Serial Line
-  Internet Protocol) is a protocol used to send Internet traffic over
-  serial connections such as telephone lines or null modem cables;
-  nowadays, the protocol PPP is more commonly used for this same
-  purpose.
-
-  Normally, your access provider has to support SLIP in order for you
-  to be able to use it, but there is now a SLIP emulator called SLiRP
-  around (available from
-  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-  allows you to use SLIP over a regular dial up shell connection. If
-  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
-  NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, explains how to
-  configure SLIP. Note that you don't need this option if you just
-  want to run term (term is a program which gives you almost full
-  Internet connectivity if you have a regular dial up shell account on
-  some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
-  support will enlarge your kernel by about 4 KB. If unsure, say N.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>. The module will be
-  called slip.o.
-
-CONFIG_SLIP_COMPRESSED
-  This protocol is faster than SLIP because it uses compression on the
-  TCP/IP headers (not on the data itself), but it has to be supported
-  on both ends. Ask your access provider if you are not sure and
-  answer Y, just in case. You will still be able to use plain SLIP. If
-  you plan to use SLiRP, the SLIP emulator (available from
-  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-  allows you to use SLIP over a regular dial up shell connection, you
-  definitely want to say Y here. The NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
-  CSLIP. This won't enlarge your kernel.
-
-CONFIG_SLIP_SMART
-  Adds additional capabilities to the SLIP driver to support the
-  RELCOM line fill and keepalive monitoring. Ideal on poor quality
-  analogue lines.
-
-CONFIG_SLIP_MODE_SLIP6
-  Just occasionally you may need to run IP over hostile serial
-  networks that don't pass all control characters or are only seven
-  bit. Saying Y here adds an extra mode you can use with SLIP:
-  "slip6". In this mode, SLIP will only send normal ASCII symbols over
-  the serial device. Naturally, this has to be supported at the other
-  end of the link as well. It's good enough, for example, to run IP
-  over the async ports of a Camtec JNT Pad. If unsure, say N.
-
-CONFIG_PPP
-  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
-  the same purpose: sending Internet traffic over telephone (and other
-  serial) lines.  Ask your access provider if they support it, because
-  otherwise you can't use it; most Internet access providers these
-  days support PPP rather than SLIP.
-
-  To use PPP, you need an additional program called pppd as described
-  in the PPP-HOWTO, available at
-  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
-  the version of pppd recommended in <file:Documentation/Changes>.
-  The PPP option enlarges your kernel by about 16 KB.
-
-  There are actually two versions of PPP: the traditional PPP for
-  asynchronous lines, such as regular analog phone lines, and
-  synchronous PPP which can be used over digital ISDN lines for
-  example.  If you want to use PPP over phone lines or other
-  asynchronous serial lines, you need to say Y (or M) here and also to
-  the next option, "PPP support for async serial ports".  For PPP over
-  synchronous lines, you should say Y (or M) here and to "Support
-  synchronous PPP", below.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you said Y to "Version information on all symbols" above, then
-  you cannot compile the PPP driver into the kernel; you can then only
-  compile it as a module.  The module will be called ppp_generic.o.
-  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>.
-
-CONFIG_PLIP
-  PLIP (Parallel Line Internet Protocol) is used to create a
-  reasonably fast mini network consisting of two (or, rarely, more)
-  local machines.  A PLIP link from a Linux box is a popular means to
-  install a Linux distribution on a machine which doesn't have a
-  CD-ROM drive (a minimal system has to be transferred with floppies
-  first). The kernels on both machines need to have this PLIP option
-  enabled for this to work.
-
-  The PLIP driver has two modes, mode 0 and mode 1.  The parallel
-  ports (the connectors at the computers with 25 holes) are connected
-  with "null printer" or "Turbo Laplink" cables which can transmit 4
-  bits at a time (mode 0) or with special PLIP cables, to be used on
-  bidirectional parallel ports only, which can transmit 8 bits at a
-  time (mode 1); you can find the wiring of these cables in
-  <file:Documentation/networking/PLIP.txt>.  The cables can be up to
-  15m long.  Mode 0 works also if one of the machines runs DOS/Windows
-  and has some PLIP software installed, e.g. the Crynwr PLIP packet
-  driver (<http://oak.oakland.edu/simtel.net/msdos/pktdrvr-pre.html>)
-  and winsock or NCSA's telnet.
-
-  If you want to use PLIP, say Y and read the PLIP mini-HOWTO as well
-  as the NET-3-HOWTO, both available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Note that the PLIP
-  protocol has been changed and this PLIP driver won't work together
-  with the PLIP support in Linux versions 1.0.x.  This option enlarges
-  your kernel by about 8 KB.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called plip.o.  If unsure, say Y or M, in case you buy a laptop
-  later.
-
-CONFIG_EQUALIZER
-  If you have two serial connections to some other computer (this
-  usually requires two modems and two telephone lines) and you use
-  SLIP (the protocol for sending Internet traffic over telephone
-  lines) or PPP (a better SLIP) on them, you can make them behave like
-  one double speed connection using this driver.  Naturally, this has
-  to be supported at the other end as well, either with a similar EQL
-  Linux driver or with a Livingston Portmaster 2e.
-
-  Say Y if you want this and read
-  <file:Documentation/networking/eql.txt>.  You may also want to read
-  section 6.2 of the NET-3-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 eql.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_SMC9194
-  This is support for the SMC9xxx based Ethernet cards. Choose this
-  option if you have a DELL laptop with the docking station, or
-  another SMC9192/9194 based chipset.  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 smc9194.o.  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>.
-
-CONFIG_NE2000
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Many Ethernet cards
-  without a specific driver are compatible with NE2000.
-
-  If you have a PCI NE2000 card however, say N here and Y to "PCI
-  NE2000 support", above. If you have a NE2000 card and are running on
-  an MCA system (a bus system used on some IBM PS/2 computers and
-  laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
-  below.
-
-  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 ne.o.  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>.
-
-CONFIG_SUN3LANCE
-  Most Sun3 and Sun3x motherboards (including the 3/50, 3/60 and 3/80)
-  featured an AMD Lance 10Mbit Ethernet controller on board; say Y
-  here to compile in the Linux driver for this and enable Ethernet.
-  General Linux information on the Sun 3 and 3x series (now
-  discontinued) is at
-  <http://www.angelfire.com/ca2/tech68k/sun3.html>.
-
-  If you're not building a kernel for a Sun 3, say N.
-
-CONFIG_SUN3_82586
-  This driver enables support for the on-board Intel 82586 based
-  Ethernet adapter found on Sun 3/1xx and 3/2xx motherboards.  Note
-  that this driver does not support 82586-based adapters on additional
-  VME boards.
-
-CONFIG_INPUT_ADBHID
-  Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
-  such as keyboards, mice, joysticks, or graphic tablets handled by
-  the input layer.  If you say Y here, make sure to say Y to the
-  corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
-  "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
-  support" (CONFIG_INPUT_EVDEV) as well.
-
-  If you say N here, you still have the option of using the old ADB
-  keyboard and mouse drivers.
-
-  If unsure, say Y.
-
-CONFIG_VT
-  If you say Y here, you will get support for terminal devices with
-  display and keyboard devices. These are called "virtual" because you
-  can run several virtual terminals (also called virtual consoles) on
-  one physical terminal. This is rather useful, for example one
-  virtual terminal can collect system messages and warnings, another
-  one can be used for a text-mode user session, and a third could run
-  an X session, all in parallel. Switching between virtual terminals
-  is done with certain key combinations, usually Alt-<function key>.
-
-  The setterm command ("man setterm") can be used to change the
-  properties (such as colors or beeping) of a virtual terminal. The
-  man page console_codes(4) ("man console_codes") contains the special
-  character sequences that can be used to change those properties
-  directly. The fonts used on virtual terminals can be changed with
-  the setfont ("man setfont") command and the key bindings are defined
-  with the loadkeys ("man loadkeys") command.
-
-  You need at least one virtual terminal device in order to make use
-  of your keyboard and monitor. Therefore, only people configuring an
-  embedded system would want to say N here in order to save some
-  memory; the only way to log into such a system is then via a serial
-  or network connection.
-
-  If unsure, say Y, or else you won't be able to do much with your new
-  shiny Linux system :-)
-
-CONFIG_VT_CONSOLE
-  The system console is the device which receives all kernel messages
-  and warnings and which allows logins in single user mode. If you
-  answer Y here, a virtual terminal (the device used to interact with
-  a physical terminal) can be used as system console. This is the most
-  common mode of operations, so you should say Y here unless you want
-  the kernel messages be output only to a serial port (in which case
-  you should say Y to "Console on serial port", below).
-
-  If you do say Y here, by default the currently visible virtual
-  terminal (/dev/tty0) will be used as system console. You can change
-  that with a kernel command line option such as "console=tty3" which
-  would use the third virtual terminal as system console. (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.)
-
-  If unsure, say Y.
-
-CONFIG_ADB
-  Apple Desktop Bus (ADB) support is for support of devices which
-  are connected to an ADB port.  ADB devices tend to have 4 pins.
-  If you have an Apple Macintosh prior to the iMac, or a
-  "Blue and White G3", you probably want to say Y here.  Otherwise
-  say N.
-
-CONFIG_ADB_CUDA
-  This provides support for CUDA based Power Macintosh systems.  This
-  includes most OldWorld PowerMacs, the first generation iMacs, the
-  Blue&White G3 and the Yikes G4 (PCI Graphics).  All later models
-  should use CONFIG_ADB_PMU instead.
-
-  If unsure say Y.
-
-CONFIG_ADB_KEYBOARD
-  This option allows you to use an ADB keyboard attached to your
-  machine. Note that this disables any other (ie. PS/2) keyboard
-  support, even if your machine is physically capable of using both at
-  the same time.
-
-  If you use an ADB keyboard (4 pin connector), say Y here.
-  If you use a PS/2 keyboard (6 pin connector), say N here.
-
-CONFIG_ADB_IOP
-  The I/O Processor (IOP) is an Apple custom IC designed to provide
-  intelligent support for I/O controllers.  It is described at
-  <http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct
-  support for it, say 'Y' here.
-
-CONFIG_ADB_MACII
-  Say Y here if want your kernel to support Macintosh systems that use
-  the Mac II style ADB.  This includes the II, IIx, IIcx, SE/30, IIci,
-  Quadra 610, Quadra 650, Quadra 700, Quadra 800, Centris 610 and
-  Centris 650.
-
-CONFIG_ADB_MACIISI
-  Say Y here if want your kernel to support Macintosh systems that use
-  the Mac IIsi style ADB.  This includes the IIsi, IIvi, IIvx, Classic
-  II, LC, LC II, LC III, Performa 460, and the Performa 600.
-
-CONFIG_ADB_PMU68K
-  Say Y here if want your kernel to support the m68k based Powerbooks.
-  This includes the PowerBook 140, PowerBook 145, PowerBook 150,
-  PowerBook 160, PowerBook 165, PowerBook 165c, PowerBook 170,
-  PowerBook 180, PowerBook, 180c, PowerBook 190cs, PowerBook 520,
-  PowerBook Duo 210, PowerBook Duo 230, PowerBook Duo 250,
-  PowerBook Duo 270c, PowerBook Duo 280 and PowerBook Duo 280c.
-
-CONFIG_MAC8390
-  If you want to include a driver to support Nubus or LC-PDS
-  Ethernet cards using an NS8390 chipset or its equivalent, say Y
-  and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_MAC89x0
-  Support for CS89x0 chipset based Ethernet cards.  If you have a
-  Nubus or LC-PDS network (Ethernet) card of this type, say Y and
-  read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  This module will
-  be called mac89x0.o.
-
-CONFIG_MACMACE
-  Support for the onboard AMD 79C940 MACE Ethernet controller used in
-  the 660AV and 840AV Macintosh.  If you have one of these Macintoshes
-  say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_MACSONIC
-  Support for NatSemi SONIC based Ethernet devices.  This includes
-  the onboard Ethernet in many Quadras as well as some LC-PDS,
-  a few Nubus and all known Comm Slot Ethernet cards.  If you have
-  one of these say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  This module will
-  be called macsonic.o.
-
-CONFIG_MAC_SCSI
-  This is the NCR 5380 SCSI controller included on most of the 68030
-  based Macintoshes.  If you have one of these say Y and read the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_SCSI_MAC_ESP
-  This is the NCR 53c9x SCSI controller found on most of the 68040
-  based Macintoshes.  If you have one of these say Y and read the
-  SCSI-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 mac_esp.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIAL
-  This selects whether you want to include the driver for the standard
-  serial ports.  The standard answer is Y.  People who might say N
-  here are those that are setting up dedicated Ethernet WWW/FTP
-  servers, or users that have one of the various bus mice instead of a
-  serial mouse and don't intend to use their machine's standard serial
-  port for anything.  (Note that the Cyclades and Stallion multi
-  serial port drivers do not need this driver built in for them to
-  work.)
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  serial.o.
-  [WARNING: Do not compile this driver as a module if you are using
-  non-standard serial ports, since the configuration information will
-  be lost when the driver is unloaded.  This limitation may be lifted
-  in the future.]
-
-  BTW1: If you have a mouseman serial mouse which is not recognized by
-  the X window system, try running gpm first.
-
-  BTW2: If you intend to use a software modem (also called Winmodem)
-  under Linux, forget it.  These modems are crippled and require
-  proprietary drivers which are only available under Windows.
-
-  Most people will say Y or M here, so that they can use serial mice,
-  modems and similar devices connecting to the standard serial ports.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_PRINTER
-  If you intend to attach a printer to the parallel port of your Linux
-  box (as opposed to using a serial printer; if the connector at the
-  printer has 9 or 25 holes ["female"], then it's serial), say Y.
-  Also read the Printing-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  It is possible to share one parallel port among several devices
-  (e.g. printer and ZIP drive) and it is safe to compile the
-  corresponding drivers into the kernel.  If you want to compile this
-  driver as a module however ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt> and
-  <file:Documentation/parport.txt>.  The module will be called lp.o.
-
-  If you have several parallel ports, you can specify which ports to
-  use with the "lp" kernel command line option.  (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.)  The syntax of the
-  "lp" command line option can be found in <file:drivers/char/lp.c>.
-
-  If you have more than 8 printers, you need to increase the LP_NO
-  macro in lp.c and the PARPORT_MAX macro in parport.h.
-
-CONFIG_BUSMOUSE
-  Say Y here if your machine has a bus mouse as opposed to a serial
-  mouse. Most people have a regular serial MouseSystem or
-  Microsoft mouse (made by Logitech) that plugs into a COM port
-  (rectangular with 9 or 25 pins). These people say N here. 
-
-  If you have a laptop, you either have to check the documentation or
-  experiment a bit to find out whether the trackball is a serial mouse
-  or not; it's best to say Y here for you.
-
-  This is the generic bus mouse driver code. If you have a bus mouse,
-  you will have to say Y here and also to the specific driver for your
-  mouse below.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called busmouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_WATCHDOG
-  If you say Y here (and to one of the following options) and create a
-  character special file /dev/watchdog with major number 10 and minor
-  number 130 using mknod ("man mknod"), you will get a watchdog, i.e.:
-  subsequently opening the file and then failing to write to it for
-  longer than 1 minute will result in rebooting the machine. This
-  could be useful for a networked machine that needs to come back
-  online as fast as possible after a lock-up. There's both a watchdog
-  implementation entirely in software (which can sometimes fail to
-  reboot the machine) and a driver for hardware watchdog boards, which
-  are more robust and can also keep track of the temperature inside
-  your computer. For details, read <file:Documentation/watchdog.txt>
-  in the kernel source.
-
-  The watchdog is usually used together with the watchdog daemon
-  which is available from
-  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
-  also monitor NFS connections and can reboot the machine when the process
-  table is full.
-
-  If unsure, say N.
-
-CONFIG_WATCHDOG_NOWAYOUT
-  The default watchdog behaviour (which you get if you say N here) is
-  to stop the timer if the process managing it closes the file
-  /dev/watchdog. It's always remotely possible that this process might
-  get killed. If you say Y here, the watchdog cannot be stopped once
-  it has been started.
-
-CONFIG_SOFT_WATCHDOG
-  A software monitoring watchdog. This will fail to reboot your system
-  from some situations that the hardware watchdog will recover
-  from. Equally it's a lot cheaper to install.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called
-   softdog.o.
-
-CONFIG_RTC
-  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
-  into your computer.
-
-  Every PC has such a clock built in. It can be used to generate
-  signals from as low as 1Hz up to 8192Hz, and can also be used
-  as a 24 hour alarm. It reports status information via the file
-  /proc/driver/rtc and its behaviour is set by various ioctls on
-  /dev/rtc.
-
-  If you run Linux on a multiprocessor machine and said Y to
-  "Symmetric Multi Processing" above, you should say Y here to read
-  and set the RTC in an SMP compatible fashion.
-
-  If you think you have a use for such a device (such as periodic data
-  sampling), then say Y here, and read <file:Documentation/rtc.txt>
-  for details.
-
-  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 is called rtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_NVRAM
-  If you say Y here and create a character special file /dev/nvram
-  with major number 10 and minor number 144 using mknod ("man mknod"),
-  you get read and write access to the 50 bytes of non-volatile memory
-  in the real time clock (RTC), which is contained in every PC and
-  most Ataris.
-
-  This memory is conventionally called "CMOS RAM" on PCs and "NVRAM"
-  on Ataris. /dev/nvram may be used to view settings there, or to
-  change them (with some utility). It could also be used to frequently
-  save a few bits of very important data that may not be lost over
-  power-off and for which writing to disk is too insecure. Note
-  however that most NVRAM space in a PC belongs to the BIOS and you
-  should NEVER idly tamper with it. See Ralf Brown's interrupt list
-  for a guide to the use of CMOS bytes by your BIOS.
-
-  On Atari machines, /dev/nvram is always configured and does not need
-  to be selected.
-
-  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 nvram.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_PROC_HARDWARE
-  Say Y here to support the /proc/hardware file, which gives you
-  access to information about the machine you're running on,
-  including the model, CPU, MMU, clock speed, BogoMIPS rating,
-  and memory size.
-
-CONFIG_AMIGA
-  This option enables support for the Amiga series of computers. If
-  you plan to use this kernel on an Amiga, say Y here and browse the
-  material available in <file:Documentation/m68k>; otherwise say N.
-
-CONFIG_A2232
-  This option supports the 2232 7-port serial card shipped with the
-  Amiga 2000 and other Zorro-bus machines, dating from 1989.  At
-  a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
-  each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
-  ports were connected with 8 pin DIN connectors on the card bracket,
-  for which 8 pin to DB25 adapters were supplied. The card also had
-  jumpers internally to toggle various pinning configurations.
-
-  This driver can be built as a module; but then "generic_serial.o"
-  will also be built as a module. This has to be loaded before
-  "ser_a2232.o". If you want to do this, answer M here and read
-  "<file:Documentation/modules.txt>".
-
-CONFIG_A4000T_SCSI
-  Support for the NCR53C710 SCSI controller on the Amiga 4000T.
-
-CONFIG_A4091_SCSI
-  Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller
-  (1993).  Very obscure -- the 4091 was part of an Amiga 4000 upgrade
-  plan at the time the Amiga business was sold to DKB.
-
-CONFIG_ATARI
-  This option enables support for the 68000-based Atari series of
-  computers (including the TT, Falcon and Medusa). If you plan to use
-  this kernel on an Atari, say Y here and browse the material
-  available in <file:Documentation/m68k>; otherwise say N.
-
-CONFIG_HADES
-  This option enables support for the Hades Atari clone. If you plan
-  to use this kernel on a Hades, say Y here; otherwise say N.
-
-CONFIG_MAC
-  This option enables support for the Apple Macintosh series of
-  computers (yes, there is experimental support now, at least for part
-  of the series).
-
-  Say N unless you're willing to code the remaining necessary support.
-  ;)
-
-CONFIG_HP300
-  This option enables support for the HP9000/300 series of
-  workstations. Support for these machines is still very experimental.
-  If you plan to try to use the kernel on such a machine say Y here.
-  Everybody else says N.
-
-CONFIG_Q40
-  The Q40 is a Motorola 68040-based successor to the Sinclair QL
-  manufactured in Germany.  There is an official Q40 home page at
-  <http://www.q40.de/>.  This option enables support for the Q40 and
-  Q60. Select your CPU below.  For 68LC060 don't forget to enable FPU
-  emulation.
-
-CONFIG_SUN3
-  This option enables support for the Sun 3 series of workstations.
-  Currently, only the Sun 3/80 is supported within the Sun 3x family.
-  You will also want to enable 68030 support.  General Linux
-  information on the Sun 3x series (now discontinued) is at
-  <http://www.angelfire.com/ca2/tech68k/sun3.html>.
-
-  If you don't want to compile a kernel for a Sun 3, say N.
-
-CONFIG_SUN3X
-  This option enables support for the Sun 3x series of workstations.
-  Be warned that this support is very experimental. You will also want
-  to say Y to 68020 support and N to the other processors below.
-  General Linux information on the Sun 3x series (now discontinued)
-  is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
-
-  If you don't want to compile a kernel for a Sun 3x, say N.
-
-CONFIG_SUN3X_ZS
-  ZS refers to a type of asynchronous serial port built in to the Sun3
-  and Sun3x workstations; if you have a Sun 3, you probably have
-  these.  Say 'Y' to support ZS ports directly.  This option must be
-  enabled in order to support the
-  keyboard and mouse ports.
-
-CONFIG_SUN_KEYBOARD
-  Say Y here to support the keyboard found on Sun 3 and 3x
-  workstations.  It can also be used support Sun Type-5 keyboards
-  through an adaptor.  See
-  <http://www.suse.cz/development/input/adapters.html> and
-  <http://sourceforge.net/projects/linuxconsole/> for details on the
-  latter.
-
-CONFIG_M68020
-  If you anticipate running this kernel on a computer with a MC68020
-  processor, say Y. Otherwise, say N. Note that the 68020 requires a
-  68851 MMU (Memory Management Unit) to run Linux/m68k, except on the
-  Sun 3, which provides its own version.
-
-CONFIG_M68030
-  If you anticipate running this kernel on a computer with a MC68030
-  processor, say Y. Otherwise, say N. Note that a MC68EC030 will not
-  work, as it does not include an MMU (Memory Management Unit).
-
-CONFIG_M68040
-  If you anticipate running this kernel on a computer with a MC68LC040
-  or MC68040 processor, say Y. Otherwise, say N. Note that an
-  MC68EC040 will not work, as it does not include an MMU (Memory
-  Management Unit).
-
-CONFIG_M68060
-  If you anticipate running this kernel on a computer with a MC68060
-  processor, say Y. Otherwise, say N.
-
-CONFIG_M68KFPU_EMU
-  At some point in the future, this will cause floating-point math
-  instructions to be emulated by the kernel on machines that lack a
-  floating-point math coprocessor.  Thrill-seekers and chronically
-  sleep-deprived psychotic hacker types can say Y now, everyone else
-  should probably wait a while.
-
-CONFIG_M68KFPU_EMU_ONLY
-  This option prevents any floating-point instructions from being
-  compiled into the kernel, thereby the kernel doesn't save any
-  floating point context anymore during task switches, so this
-  kernel will only be usable on machines without a floating-point
-  math coprocessor. This makes the kernel a bit faster as no tests
-  needs to be executed whether a floating-point instruction in the
-  kernel should be executed or not.
-
-CONFIG_M68KFPU_EMU_EXTRAPREC
-  The fpu uses normally a few bit more during calculations for
-  correct rounding, the emulator can (often) do the same but this
-  extra calculation can cost quite some time, so you can disable
-  it here. The emulator will then "only" calculate with a 64 bit
-  mantissa and round slightly incorrect, what is more then enough
-  for normal usage.
-
-CONFIG_ADVANCED
-  This gives you access to some advanced options for the CPU. The
-  defaults should be fine for most users, but these options may make
-  it possible for you to improve performance somewhat if you know what
-  you are doing.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these options.
-
-  Most users should say N to this question.
-
-CONFIG_SINGLE_MEMORY_CHUNK
-  Ignore all but the first contiguous chunk of physical memory for VM
-  purposes.  This will save a few bytes kernel size and may speed up
-  some operations.  Say N if not sure.
-
-CONFIG_RMW_INSNS
-  This allows to use certain instructions that work with indivisible
-  read-modify-write bus cycles. While this is faster than the
-  workaround of disabling interrupts, it can conflict with DMA
-  ( = direct memory access) on many Amiga systems, and it is also said
-  to destabilize other machines. It is very likely that this will
-  cause serious problems on any Amiga or Atari Medusa if set. The only
-  configuration where it should work are 68030-based Ataris, where it
-  apparently improves performance. But you've been warned! Unless you
-  really know what you are doing, say N. Try Y only if you're quite
-  adventurous.
-
-CONFIG_ZORRO
-  This enables support for the Zorro bus in the Amiga. If you have
-  expansion cards in your Amiga that conform to the Amiga
-  AutoConfig(tm) specification, say Y, otherwise N. Note that even
-  expansion cards that do not fit in the Zorro slots but fit in e.g.
-  the CPU slot may fall in this category, so you have to say Y to let
-  Linux use these.
-
-CONFIG_AMIGA_PCMCIA
-  Include support in the kernel for pcmcia on Amiga 1200 and Amiga
-  600. If you intend to use pcmcia cards say Y; otherwise say N.
-
-CONFIG_WHIPPET_SERIAL
-  HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
-  is no listing for the Whippet in their Amiga section.
-
-CONFIG_STRAM_SWAP
-  Some Atari 68k macines (including the 520STF and 1020STE) divide
-  their addressible memory into ST and TT sections.  The TT section
-  (up to 512MB) is the main memory; the ST section (up to 4MB) is
-  accessible to the built-in graphics board, runs slower, and is
-  present mainly for backward compatibility with older machines.
-
-  This enables support for using (parts of) ST-RAM as swap space,
-  instead of as normal system memory. This can first enhance system
-  performance if you have lots of alternate RAM (compared to the size
-  of ST-RAM), because executable code always will reside in faster
-  memory. ST-RAM will remain as ultra-fast swap space. On the other
-  hand, it allows much improved dynamic allocations of ST-RAM buffers
-  for device driver modules (e.g. floppy, ACSI, SLM printer, DMA
-  sound). The probability that such allocations at module load time
-  fail is drastically reduced.
-
-CONFIG_STRAM_PROC
-  Say Y here to report ST-RAM usage statistics in /proc/stram.  See
-  the help for CONFIG_STRAM_SWAP for discussion of ST-RAM and its
-  uses.
-
-CONFIG_A3000_SCSI
-  If you have an Amiga 3000 and have SCSI devices connected to the
-  built-in SCSI controller, say Y. Otherwise, say N. 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 is
-  called wd33c93.o. If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.
-
-CONFIG_A2091_SCSI
-  If you have a Commodore A2091 SCSI controller, say Y. Otherwise,
-  say N. 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 is called wd33c93.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GVP11_SCSI
-  If you have a Great Valley Products Series II SCSI controller,
-  answer Y. Also say Y if you have a later model of GVP SCSI
-  controller (such as the GVP A4008 or a Combo board). Otherwise,
-  answer N. This driver does NOT work for the T-Rex series of
-  accelerators from TekMagic and GVP-M.
-
-  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 gvp11.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_CYBERSTORM_SCSI
-  If you have an Amiga with an original (MkI) Phase5 Cyberstorm
-  accelerator board and the optional Cyberstorm SCSI controller,
-  answer Y. Otherwise, say N.
-
-CONFIG_CYBERSTORMII_SCSI
-  If you have an Amiga with a Phase5 Cyberstorm MkII accelerator board
-  and the optional Cyberstorm SCSI controller, say Y. Otherwise,
-  answer N.
-
-CONFIG_BLZ2060_SCSI
-  If you have an Amiga with a Phase5 Blizzard 2060 accelerator board
-  and want to use the onboard SCSI controller, say Y. Otherwise,
-  answer N.
-
-CONFIG_BLZ1230_SCSI
-  If you have an Amiga 1200 with a Phase5 Blizzard 1230IV or Blizzard
-  1260 accelerator, and the optional SCSI module, say Y. Otherwise,
-  say N.
-
-CONFIG_BLZ603EPLUS_SCSI
-  If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+
-  accelerator, say Y. Otherwise, say N.
-
-CONFIG_FASTLANE_SCSI
-  If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
-  one in the near future, say Y to this question. Otherwise, say N.
-
-CONFIG_OKTAGON_SCSI
-  If you have the BSC Oktagon SCSI disk controller for the Amiga, say
-  Y to this question.  If you're in doubt about whether you have one,
-  see the picture at
-  <http://amiga.multigraph.com/photos/oktagon.html>.
-
-CONFIG_ATARI_SCSI
-  If you have an Atari with built-in NCR5380 SCSI controller (TT,
-  Falcon, ...) say Y to get it supported. Of course also, if you have
-  a compatible SCSI controller (e.g. for Medusa).  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 is called
-  atari_scsi.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.  This driver supports both
-  styles of NCR integration into the system: the TT style (separate
-  DMA), and the Falcon style (via ST-DMA, replacing ACSI).  It does
-  NOT support other schemes, like in the Hades (without DMA).
-
-CONFIG_ATARI_SCSI_TOSHIBA_DELAY
-  This option increases the delay after a SCSI arbitration to
-  accommodate some flaky Toshiba CD-ROM drives. Say Y if you intend to
-  use a Toshiba CD-ROM drive; otherwise, the option is not needed and
-  would impact performance a bit, so say N.
-
-CONFIG_ATARI_SCSI_RESET_BOOT
-  Reset the devices on your Atari whenever it boots.  This makes the
-  boot process fractionally longer but may assist recovery from errors
-  that leave the devices with SCSI operations partway completed.
-
-CONFIG_TT_DMA_EMUL
-  This option enables code which emulates the TT SCSI DMA chip on the
-  Hades. This increases the SCSI transfer rates at least ten times
-  compared to PIO transfers.
-
-CONFIG_ARIADNE
-  If you have a Village Tronic Ariadne Ethernet adapter, say Y.
-  Otherwise, say N.
-
-  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 is called ariadne.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ARIADNE2
-  This driver is for the Village Tronic Ariadne II and the Individual
-  Computers X-Surf Ethernet cards. If you have such a card, say Y.
-  Otherwise, say N.
-
-  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 ariadne2.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_A2065
-  If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise,
-  say N.
-
-  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 is called a2065.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_HYDRA
-  If you have a Hydra Ethernet adapter, say Y. Otherwise, say N.
-
-  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 is called hydra.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUN3_SCSI
-  This option will enable support for the OBIO (onboard io) NCR5380
-  SCSI controller found in the Sun 3/50 and 3/60.  Note that this
-  driver does not provide support for VME SCSI boards.
-  General Linux information on the Sun 3 series (now discontinued)
-  is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
-
-CONFIG_SUN3X_ESP
-  The ESP was an on-board SCSI controller used on Sun 3/80
-  machines.  Say Y here to compile in support for it.
-
-CONFIG_APNE
-  If you have a PCMCIA NE2000 compatible adapter, say Y.  Otherwise,
-  say N.
-
-  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 is called apne.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ATARILANCE
-  Say Y to include support for several Atari Ethernet adapters based
-  on the AMD Lance chipset: RieblCard (with or without battery), or
-  PAMCard VME (also the version by Rhotron, with different addresses).
-
-CONFIG_ATARI_BIONET
-  Say Y to include support for BioData's BioNet-100 Ethernet adapter
-  for the ACSI port. The driver works (has to work...) with a polled
-  I/O scheme, so it's rather slow :-(
-
-CONFIG_ATARI_PAMSNET
-  Say Y to include support for the PAMsNet Ethernet adapter for the
-  ACSI port ("ACSI node"). The driver works (has to work...) with a
-  polled I/O scheme, so it's rather slow :-(
-
-CONFIG_AMIGAMOUSE
-  If you want to be able to use an Amiga mouse in Linux, say Y.
-
-  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 is called amigamouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ATARIMOUSE
-  If you want to be able to use an Atari mouse in Linux, say Y.
-
-  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 is called atarimouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ATARI_MFPSER
-  If you like to use the MFP serial ports ("Modem1", "Serial1") under
-  Linux, say Y. The driver equally supports all kinds of MFP serial
-  ports and automatically detects whether Serial1 is available.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  Note for Falcon users: You also have an MFP port, it's just not
-  wired to the outside... But you could use the port under Linux.
-
-CONFIG_ATARI_SCC
-  If you have serial ports based on a Zilog SCC chip (Modem2, Serial2,
-  LAN) and like to use them under Linux, say Y. All built-in SCC's are
-  supported (TT, MegaSTE, Falcon), and also the ST-ESCC. If you have
-  two connectors for channel A (Serial2 and LAN), they are visible as
-  two separate devices.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_ATARI_SCC_DMA
-  This enables DMA support for receiving data on channel A of the SCC.
-  If you have a TT you may say Y here and read
-  drivers/char/atari_SCC.README. All other users should say N here,
-  because only the TT has SCC-DMA, even if your machine keeps claiming
-  so at boot time.
-
-CONFIG_ATARI_MIDI
-  If you want to use your Atari's MIDI port in Linux, say Y.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_ATARI_DSP56K
-  If you want to be able to use the DSP56001 in Falcons, say Y. This
-  driver is still experimental, and if you don't know what it is, or
-  if you don't have this processor, just say N.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_AMIGA_BUILTIN_SERIAL
-  If you want to use your Amiga's built-in serial port in Linux,
-  answer Y.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_GVPIOEXT
-  If you want to use a GVP IO-Extender serial card in Linux, say Y.
-  Otherwise, say N.
-
-CONFIG_GVPIOEXT_LP
-  Say Y to enable driving a printer from the parallel port on your
-  GVP IO-Extender card, N otherwise.
-
-CONFIG_GVPIOEXT_PLIP
-  Say Y to enable doing IP over the parallel port on your GVP
-  IO-Extender card, N otherwise.
-
-CONFIG_MULTIFACE_III_TTY
-  If you want to use a Multiface III card's serial port in Linux,
-  answer Y.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_HPDCA
-  If you want to use the internal "DCA" serial ports on an HP300
-  machine, say Y here.
-
-CONFIG_HPLANCE
-  If you want to use the builtin "LANCE" Ethernet controller on an
-  HP300 machine, say Y here.
-
-CONFIG_DIO
-  Say Y here to enable support for the "DIO" expansion bus used in
-  HP300 machines. If you are using such a system you almost certainly
-  want this.
-
-CONFIG_MAC_ADBKEYCODES
-  This provides support for sending raw ADB keycodes to console
-  devices.  This is the default up to 2.4.0, but in future this may be
-  phased out in favor of generic Linux keycodes.  If you say Y here,
-  you can dynamically switch via the
-      /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
-  sysctl and with the "keyboard_sends_linux_keycodes=" kernel
-  argument.
-
-  If unsure, say Y here.
-
-CONFIG_MAC_EMUMOUSEBTN
-  This provides generic support for emulating the 2nd and 3rd mouse
-  button with keypresses.  If you say Y here, the emulation is still
-  disabled by default.  The emulation is controlled by these sysctl
-  entries:
-      /proc/sys/dev/mac_hid/mouse_button_emulation
-      /proc/sys/dev/mac_hid/mouse_button2_keycode
-      /proc/sys/dev/mac_hid/mouse_button3_keycode
-
-CONFIG_VME
-  Say Y here if you want to build a kernel for a 680x0 based VME
-  board.  Boards currently supported include Motorola boards MVME147,
-  MVME162, MVME166, MVME167, MVME172, and MVME177.  BVME4000 and
-  BVME6000 boards from BVM Ltd are also supported.
-
-CONFIG_MVME147
-  Say Y to include support for early Motorola VME boards.  This will
-  build a kernel which can run on MVME147 single-board computers.  If
-  you select this option you will have to select the appropriate
-  drivers for SCSI, Ethernet and serial ports later on.
-
-CONFIG_MVME16x
-  Say Y to include support for Motorola VME boards.  This will build a
-  kernel which can run on MVME162, MVME166, MVME167, MVME172, and
-  MVME177 boards.  If you select this option you will have to select
-  the appropriate drivers for SCSI, Ethernet and serial ports later
-  on.
-
-CONFIG_BVME6000
-  Say Y to include support for VME boards from BVM Ltd.  This will
-  build a kernel which can run on BVME4000 and BVME6000 boards.  If
-  you select this option you will have to select the appropriate
-  drivers for SCSI, Ethernet and serial ports later on.
-
-CONFIG_060_WRITETHROUGH
-  The 68060 generally uses copyback caching of recently accessed data.
-  Copyback caching means that memory writes will be held in an on-chip
-  cache and only written back to memory some time later.  Saying Y
-  here will force supervisor (kernel) accesses to use writethrough
-  caching.  Writethrough caching means that data is written to memory
-  straight away, so that cache and memory data always agree.
-  Writethrough caching is less efficient, but is needed for some
-  drivers on 68060 based systems where the 68060 bus snooping signal
-  is hardwired on.  The 53c710 SCSI driver is known to suffer from
-  this problem.
-
-CONFIG_MVME147_SCSI
-  Support for the on-board SCSI controller on the Motorola MVME147
-  single-board computer.
-
-CONFIG_MVME147_SCC
-  This is the driver for the serial ports on the Motorola MVME147
-  boards.  Everyone using one of these boards should say Y here.
-
-CONFIG_MVME16x_SCSI
-  The Motorola MVME162, 166, 167, 172 and 177 boards use the NCR53C710
-  SCSI controller chip.  Almost everyone using one of these boards
-  will want to say Y to this question.
-
-CONFIG_BVME6000_SCSI
-  The BVME4000 and BVME6000 boards from BVM Ltd use the NCR53C710
-  SCSI controller chip.  Almost everyone using one of these boards
-  will want to say Y to this question.
-
-CONFIG_MVME147_NET
-  Support for the on-board Ethernet interface on the Motorola MVME147
-  single-board computer.  Say Y here to include the
-  driver for this chip in your kernel.   If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MVME16x_NET
-  This is the driver for the Ethernet interface on the Motorola
-  MVME162, 166, 167, 172 and 177 boards.  Say Y here to include the
-  driver for this chip in your kernel.   If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_BVME6000_NET
-  This is the driver for the Ethernet interface on BVME4000 and
-  BVME6000 VME boards.  Say Y here to include the driver for this chip
-  in your kernel.   If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIAL167
-  This is the driver for the serial ports on the Motorola MVME166,
-  167, and 172 boards.  Everyone using one of these boards should say
-  Y here.
-
-CONFIG_MVME162_SCC
-  This is the driver for the serial ports on the Motorola MVME162 and
-  172 boards.  Everyone using one of these boards should say Y here.
-
-CONFIG_BVME6000_SCC
-  This is the driver for the serial ports on the BVME4000 and BVME6000
-  boards from BVM Ltd.  Everyone using one of these boards should say
-  Y here.
-
diff -Nru a/arch/m68k/Kconfig b/arch/m68k/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/m68k/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,2386 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config M68K
+	bool
+	default y
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+
+mainmenu "Linux/68k Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Platform dependent setup"
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config PCMCIA
+	tristate
+	---help---
+	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
+	  computer.  These are credit-card size devices such as network cards,
+	  modems or hard drives often used with laptops computers.  There are
+	  actually two varieties of these cards: the older 16 bit PCMCIA cards
+	  and the newer 32 bit CardBus cards.  If you want to use CardBus
+	  cards, you need to say Y here and also to "CardBus support" below.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  Please also read the PCMCIA-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).
+	  When compiled this way, there will be modules called pcmcia_core.o
+	  and ds.o.  If you want to compile it as a module, say M here and
+	  read <file:Documentation/modules.txt>.
+
+config AMIGA
+	bool "Amiga support"
+	help
+	  This option enables support for the Amiga series of computers. If
+	  you plan to use this kernel on an Amiga, say Y here and browse the
+	  material available in <file:Documentation/m68k>; otherwise say N.
+
+config ATARI
+	bool "Atari support"
+	help
+	  This option enables support for the 68000-based Atari series of
+	  computers (including the TT, Falcon and Medusa). If you plan to use
+	  this kernel on an Atari, say Y here and browse the material
+	  available in <file:Documentation/m68k>; otherwise say N.
+
+config HADES
+	bool "Hades support"
+	depends on ATARI
+	help
+	  This option enables support for the Hades Atari clone. If you plan
+	  to use this kernel on a Hades, say Y here; otherwise say N.
+
+config PCI
+	bool
+	depends on HADES
+	default y
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config MAC
+	bool "Macintosh support"
+	help
+	  This option enables support for the Apple Macintosh series of
+	  computers (yes, there is experimental support now, at least for part
+	  of the series).
+
+	  Say N unless you're willing to code the remaining necessary support.
+	  ;)
+
+config NUBUS
+	bool
+	depends on MAC
+	default y
+
+config M68K_L2_CACHE
+	bool
+	depends on MAC
+	default y
+
+config APOLLO
+	bool "Apollo support"
+	help
+	  Say Y here if you want to run Linux on an MC680x0-based Apollo
+	  Domain workstation such as the DN3500.
+
+config VME
+	bool "VME (Motorola and BVM) support"
+	help
+	  Say Y here if you want to build a kernel for a 680x0 based VME
+	  board.  Boards currently supported include Motorola boards MVME147,
+	  MVME162, MVME166, MVME167, MVME172, and MVME177.  BVME4000 and
+	  BVME6000 boards from BVM Ltd are also supported.
+
+config MVME147
+	bool "MVME147 support"
+	depends on VME
+	help
+	  Say Y to include support for early Motorola VME boards.  This will
+	  build a kernel which can run on MVME147 single-board computers.  If
+	  you select this option you will have to select the appropriate
+	  drivers for SCSI, Ethernet and serial ports later on.
+
+config MVME16x
+	bool "MVME162, 166 and 167 support"
+	depends on VME
+	help
+	  Say Y to include support for Motorola VME boards.  This will build a
+	  kernel which can run on MVME162, MVME166, MVME167, MVME172, and
+	  MVME177 boards.  If you select this option you will have to select
+	  the appropriate drivers for SCSI, Ethernet and serial ports later
+	  on.
+
+config BVME6000
+	bool "BVME4000 and BVME6000 support"
+	depends on VME
+	help
+	  Say Y to include support for VME boards from BVM Ltd.  This will
+	  build a kernel which can run on BVME4000 and BVME6000 boards.  If
+	  you select this option you will have to select the appropriate
+	  drivers for SCSI, Ethernet and serial ports later on.
+
+config HP300
+	bool "HP9000/300 support"
+	help
+	  This option enables support for the HP9000/300 series of
+	  workstations. Support for these machines is still very experimental.
+	  If you plan to try to use the kernel on such a machine say Y here.
+	  Everybody else says N.
+
+config DIO
+	bool "DIO bus support"
+	depends on HP300
+	help
+	  Say Y here to enable support for the "DIO" expansion bus used in
+	  HP300 machines. If you are using such a system you almost certainly
+	  want this.
+
+config SUN3X
+	bool "Sun3x support"
+	help
+	  This option enables support for the Sun 3x series of workstations.
+	  Be warned that this support is very experimental. You will also want
+	  to say Y to 68020 support and N to the other processors below.
+	  General Linux information on the Sun 3x series (now discontinued)
+	  is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+	  If you don't want to compile a kernel for a Sun 3x, say N.
+
+config SUN3
+	bool "Sun3 support"
+	help
+	  This option enables support for the Sun 3 series of workstations.
+	  Currently, only the Sun 3/80 is supported within the Sun 3x family.
+	  You will also want to enable 68030 support.  General Linux
+	  information on the Sun 3x series (now discontinued) is at
+	  <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+	  If you don't want to compile a kernel for a Sun 3, say N.
+
+config Q40
+	bool "Q40/Q60 support"
+	help
+	  The Q40 is a Motorola 68040-based successor to the Sinclair QL
+	  manufactured in Germany.  There is an official Q40 home page at
+	  <http://www.q40.de/>.  This option enables support for the Q40 and
+	  Q60. Select your CPU below.  For 68LC060 don't forget to enable FPU
+	  emulation.
+
+comment "Processor type"
+
+config M68020
+	bool "68020 support"
+	help
+	  If you anticipate running this kernel on a computer with a MC68020
+	  processor, say Y. Otherwise, say N. Note that the 68020 requires a
+	  68851 MMU (Memory Management Unit) to run Linux/m68k, except on the
+	  Sun 3, which provides its own version.
+
+config M68030
+	bool "68030 support"
+	help
+	  If you anticipate running this kernel on a computer with a MC68030
+	  processor, say Y. Otherwise, say N. Note that a MC68EC030 will not
+	  work, as it does not include an MMU (Memory Management Unit).
+
+config M68040
+	bool "68040 support"
+	help
+	  If you anticipate running this kernel on a computer with a MC68LC040
+	  or MC68040 processor, say Y. Otherwise, say N. Note that an
+	  MC68EC040 will not work, as it does not include an MMU (Memory
+	  Management Unit).
+
+config M68060
+	bool "68060 support"
+	help
+	  If you anticipate running this kernel on a computer with a MC68060
+	  processor, say Y. Otherwise, say N.
+
+config M68KFPU_EMU
+	bool "Math emulation support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  At some point in the future, this will cause floating-point math
+	  instructions to be emulated by the kernel on machines that lack a
+	  floating-point math coprocessor.  Thrill-seekers and chronically
+	  sleep-deprived psychotic hacker types can say Y now, everyone else
+	  should probably wait a while.
+
+config M68KFPU_EMU_EXTRAPREC
+	bool "Math emulation extra precision"
+	depends on M68KFPU_EMU
+	help
+	  The fpu uses normally a few bit more during calculations for
+	  correct rounding, the emulator can (often) do the same but this
+	  extra calculation can cost quite some time, so you can disable
+	  it here. The emulator will then "only" calculate with a 64 bit
+	  mantissa and round slightly incorrect, what is more then enough
+	  for normal usage.
+
+config M68KFPU_EMU_ONLY
+	bool "Math emulation only kernel"
+	depends on M68KFPU_EMU
+	help
+	  This option prevents any floating-point instructions from being
+	  compiled into the kernel, thereby the kernel doesn't save any
+	  floating point context anymore during task switches, so this
+	  kernel will only be usable on machines without a floating-point
+	  math coprocessor. This makes the kernel a bit faster as no tests
+	  needs to be executed whether a floating-point instruction in the
+	  kernel should be executed or not.
+
+config ADVANCED
+	bool "Advanced configuration options"
+	---help---
+	  This gives you access to some advanced options for the CPU. The
+	  defaults should be fine for most users, but these options may make
+	  it possible for you to improve performance somewhat if you know what
+	  you are doing.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these options.
+
+	  Most users should say N to this question.
+
+config RMW_INSNS
+	bool "Use read-modify-write instructions"
+	depends on ADVANCED
+	---help---
+	  This allows to use certain instructions that work with indivisible
+	  read-modify-write bus cycles. While this is faster than the
+	  workaround of disabling interrupts, it can conflict with DMA
+	  ( = direct memory access) on many Amiga systems, and it is also said
+	  to destabilize other machines. It is very likely that this will
+	  cause serious problems on any Amiga or Atari Medusa if set. The only
+	  configuration where it should work are 68030-based Ataris, where it
+	  apparently improves performance. But you've been warned! Unless you
+	  really know what you are doing, say N. Try Y only if you're quite
+	  adventurous.
+
+config SINGLE_MEMORY_CHUNK
+	bool "Use one physical chunk of memory only"
+	depends on ADVANCED && !SUN3
+	help
+	  Ignore all but the first contiguous chunk of physical memory for VM
+	  purposes.  This will save a few bytes kernel size and may speed up
+	  some operations.  Say N if not sure.
+
+config 060_WRITETHROUGH
+	bool "Use write-through caching for 68060 supervisor accesses"
+	depends on ADVANCED && M68060
+	---help---
+	  The 68060 generally uses copyback caching of recently accessed data.
+	  Copyback caching means that memory writes will be held in an on-chip
+	  cache and only written back to memory some time later.  Saying Y
+	  here will force supervisor (kernel) accesses to use writethrough
+	  caching.  Writethrough caching means that data is written to memory
+	  straight away, so that cache and memory data always agree.
+	  Writethrough caching is less efficient, but is needed for some
+	  drivers on 68060 based systems where the 68060 bus snooping signal
+	  is hardwired on.  The 53c710 SCSI driver is known to suffer from
+	  this problem.
+
+endmenu
+
+
+menu "General setup"
+
+choice
+	prompt "Kernel core (/proc/kcore) format"
+	depends on PROC_FS
+	default KCORE_ELF
+
+config KCORE_ELF
+	bool "ELF"
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config KCORE_AOUT
+	bool "A.OUT"
+	help
+	  Not necessary unless you're using a very out-of-date binutils
+	  version.  You probably want KCORE_ELF.
+
+endchoice
+
+config BINFMT_AOUT
+	tristate "Kernel support for a.out binaries"
+	---help---
+	  A.out (Assembler.OUTput) is a set of formats for libraries and
+	  executables used in the earliest versions of UNIX. Linux used the
+	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
+	  ELF format.
+
+	  As more and more programs are converted to ELF, the use for a.out
+	  will gradually diminish. If you disable this option it will reduce
+	  your kernel by one page. This is not much and by itself does not
+	  warrant removing support. However its removal is a good idea if you
+	  wish to ensure that absolutely none of your programs will use this
+	  older executable format. If you don't know what to answer at this
+	  point then answer Y. If someone told you "You need a kernel with
+	  QMAGIC support" then you'll have to say Y here. You may answer M to
+	  compile a.out support as a module and later load the module when you
+	  want to use a program or library in a.out format. The module will be
+	  called binfmt_aout.o. Saying M or N here is dangerous though,
+	  because some crucial programs on your system might still be in A.OUT
+	  format.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config ZORRO
+	bool "Amiga Zorro (AutoConfig) bus support"
+	depends on AMIGA
+	help
+	  This enables support for the Zorro bus in the Amiga. If you have
+	  expansion cards in your Amiga that conform to the Amiga
+	  AutoConfig(tm) specification, say Y, otherwise N. Note that even
+	  expansion cards that do not fit in the Zorro slots but fit in e.g.
+	  the CPU slot may fall in this category, so you have to say Y to let
+	  Linux use these.
+
+config AMIGA_PCMCIA
+	bool "Amiga 1200/600 PCMCIA support (EXPERIMENTAL)"
+	depends on AMIGA && EXPERIMENTAL
+	help
+	  Include support in the kernel for pcmcia on Amiga 1200 and Amiga
+	  600. If you intend to use pcmcia cards say Y; otherwise say N.
+
+config STRAM_SWAP
+	bool "Support for ST-RAM as swap space"
+	depends on ATARI
+	---help---
+	  Some Atari 68k macines (including the 520STF and 1020STE) divide
+	  their addressible memory into ST and TT sections.  The TT section
+	  (up to 512MB) is the main memory; the ST section (up to 4MB) is
+	  accessible to the built-in graphics board, runs slower, and is
+	  present mainly for backward compatibility with older machines.
+
+	  This enables support for using (parts of) ST-RAM as swap space,
+	  instead of as normal system memory. This can first enhance system
+	  performance if you have lots of alternate RAM (compared to the size
+	  of ST-RAM), because executable code always will reside in faster
+	  memory. ST-RAM will remain as ultra-fast swap space. On the other
+	  hand, it allows much improved dynamic allocations of ST-RAM buffers
+	  for device driver modules (e.g. floppy, ACSI, SLM printer, DMA
+	  sound). The probability that such allocations at module load time
+	  fail is drastically reduced.
+
+config STRAM_PROC
+	bool "ST-RAM statistics in /proc"
+	depends on ATARI
+	help
+	  Say Y here to report ST-RAM usage statistics in /proc/stram.  See
+	  the help for CONFIG_STRAM_SWAP for discussion of ST-RAM and its
+	  uses.
+
+config HEARTBEAT
+	bool "Use power LED as a heartbeat" if AMIGA || ATARI || Q40
+	default y if !AMIGA && !ATARI && !Q40 && HP300
+	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.
+
+# We have a dedicated heartbeat LED. :-)
+config PROC_HARDWARE
+	bool "/proc/hardware support"
+	help
+	  Say Y here to support the /proc/hardware file, which gives you
+	  access to information about the machine you're running on,
+	  including the model, CPU, MMU, clock speed, BogoMIPS rating,
+	  and memory size.
+
+config PARPORT
+	tristate "Parallel port support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  If you want to use devices connected to your machine's parallel port
+	  (the connector at the computer with 25 holes), e.g. printer, ZIP
+	  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
+	  create a mini network by connecting the parallel ports of two local
+	  machines) etc., then you need to say Y here; please read
+	  <file:Documentation/parport.txt> and
+	  <file:drivers/parport/BUGS-parport>.
+
+	  For extensive information about drivers for many devices attaching
+	  to the parallel port see <http://www.torque.net/linux-pp.html> on
+	  the WWW.
+
+	  It is possible to share a single parallel port among several devices
+	  and it is safe to compile all the corresponding drivers into the
+	  kernel.  If you want to compile parallel port support as a module
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport.o.  If you have more than one parallel port and want to
+	  specify which port and IRQ to be used by this driver at module load
+	  time, take a look at <file:Documentation/parport.txt>.
+
+	  If unsure, say Y.
+
+config PARPORT_AMIGA
+	tristate "Amiga builtin port"
+	depends on AMIGA && PARPORT
+	help
+	  Say Y here if you need support for the parallel port hardware on
+	  Amiga machines. This code is also available as a module (say M),
+	  called parport_amiga.o. If in doubt, saying N is the safe plan.
+
+config PARPORT_MFC3
+	tristate "Multiface III parallel port"
+	depends on ZORRO && PARPORT
+	help
+	  Say Y here if you need parallel port support for the MFC3 card.
+	  This code is also available as a module (say M), called
+	  parport_mfc3.o. If in doubt, saying N is the safe plan.
+
+config PARPORT_PC
+	bool
+	depends on Q40 && PARPORT
+	default y
+	---help---
+	  You should say Y here if you have a PC-style parallel port. All IBM
+	  PC compatible computers and some Alphas have PC-style parallel
+	  ports.
+
+	  This code is also available as a module.  If you want to compile it
+	  as a module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport_pc.o.
+
+	  If unsure, say Y.
+
+config PARPORT_ATARI
+	tristate "Atari builtin port"
+	depends on ATARI && PARPORT
+	help
+	  Say Y here if you need support for the parallel port hardware on
+	  Atari machines. This code is also available as a module (say M),
+	  called parport_atari.o. If in doubt, saying N is the safe plan.
+
+config PRINTER
+	tristate "Parallel printer support"
+	depends on PARPORT
+	---help---
+	  If you intend to attach a printer to the parallel port of your Linux
+	  box (as opposed to using a serial printer; if the connector at the
+	  printer has 9 or 25 holes ["female"], then it's serial), say Y.
+	  Also read the Printing-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  It is possible to share one parallel port among several devices
+	  (e.g. printer and ZIP drive) and it is safe to compile the
+	  corresponding drivers into the kernel.  If you want to compile this
+	  driver as a module however ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt> and
+	  <file:Documentation/parport.txt>.  The module will be called lp.o.
+
+	  If you have several parallel ports, you can specify which ports to
+	  use with the "lp" kernel command line option.  (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.)  The syntax of the
+	  "lp" command line option can be found in <file:drivers/char/lp.c>.
+
+	  If you have more than 8 printers, you need to increase the LP_NO
+	  macro in lp.c and the PARPORT_MAX macro in parport.h.
+
+config PARPORT_1284
+	bool "IEEE 1284 transfer modes"
+	depends on PRINTER
+	help
+	  If you have a printer that supports status readback or device ID, or
+	  want to use a device that uses enhanced parallel port transfer modes
+	  such as EPP and ECP, say Y here to enable advanced IEEE 1284
+	  transfer modes. Also say Y if you want device ID information to
+	  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
+
+config ISA
+	bool
+	depends on Q40 || AMIGA_PCMCIA || GG2
+	default y
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+source "drivers/pci/Kconfig"
+
+source "drivers/zorro/Kconfig"
+
+if Q40
+source "drivers/pnp/Kconfig"
+endif
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+if MAC
+source "drivers/input/Kconfig"
+endif
+
+
+menu "ATA/ATAPI/MFM/RLL device support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL device support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI device support"
+
+config SCSI
+	tristate "SCSI device support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+comment "SCSI support type (disk, tape, CD-ROM)"
+	depends on SCSI
+
+config BLK_DEV_SD
+	tristate "SCSI disk support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI hard disk or the SCSI or parallel port
+	  version of the IOMEGA ZIP drive under Linux, say Y and read the
+	  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
+	  CD-ROMs.
+
+	  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 sd_mod.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  Do not compile this driver as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI disk. In this case, do not compile the driver
+	  for your SCSI host adapter (below) as a module either.
+
+config SD_EXTRA_DEVS
+	int "Maximum number of SCSI disks that can be loaded as modules"
+	depends on BLK_DEV_SD
+	default "40"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted.  In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional disks that can be loaded after the
+	  first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_ST
+	tristate "SCSI tape support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI tape drive under Linux, say Y and read the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and
+	  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
+	  SCSI CD-ROMs.
+
+	  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 st.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config ST_EXTRA_DEVS
+	int "Maximum number of SCSI tapes that can be loaded as modules"
+	depends on CHR_DEV_ST
+	default "2"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted.  In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional tapes that can be loaded after the
+	  first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config BLK_DEV_SR
+	tristate "SCSI CDROM support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI CD-ROM under Linux, say Y and read the
+	  SCSI-HOWTO and the CD-ROM-HOWTO at
+	  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
+	  or M to "ISO 9660 CD-ROM file system support" later.
+
+	  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 sr_mod.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR_VENDOR
+	bool "Enable vendor-specific extensions (for SCSI CDROM)"
+	depends on BLK_DEV_SR
+	help
+	  This enables the usage of vendor specific SCSI commands. This is
+	  required to support multisession CDs with old NEC/TOSHIBA cdrom
+	  drives (and HP Writers). If you have such a drive and get the first
+	  session only, try saying Y here; everybody else says N.
+
+config SR_EXTRA_DEVS
+	int "Maximum number of CDROM devices that can be loaded as modules"
+	depends on BLK_DEV_SR
+	default "2"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted. In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional CD-ROMs that can be loaded after
+	  the first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_SG
+	tristate "SCSI generic support"
+	depends on SCSI
+	---help---
+	  If you want to use SCSI scanners, synthesizers or CD-writers or just
+	  about anything having "SCSI" in its name other than hard disks,
+	  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
+	  directly, so you need some additional software which knows how to
+	  talk to these devices using the SCSI protocol:
+
+	  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
+	  writer software look at Cdrtools
+	  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
+	  and for burning a "disk at once": CDRDAO
+	  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
+	  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
+	  For other devices, it's possible that you'll have to write the
+	  driver software yourself. Please read the file
+	  <file:Documentation/scsi-generic.txt> for more information.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
+	  say N.
+
+comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+	depends on SCSI
+
+config SCSI_MULTI_LUN
+	bool "Probe all LUNs on each SCSI device"
+	depends on SCSI
+	help
+	  If you have a SCSI device that supports more than one LUN (Logical
+	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
+	  can say Y here to force the SCSI driver to probe for multiple LUNs.
+	  A SCSI device with multiple LUNs acts logically like multiple SCSI
+	  devices. The vast majority of SCSI devices have only one LUN, and
+	  so most people can say N here and should in fact do so, because it
+	  is safer.
+
+config SCSI_CONSTANTS
+	bool "Verbose SCSI error reporting (kernel size +=12K)"
+	depends on SCSI
+	help
+	  The error messages regarding your SCSI hardware will be easier to
+	  understand if you say Y here; it will enlarge your kernel by about
+	  12 KB. If in doubt, say Y.
+
+config SCSI_LOGGING
+	bool "SCSI logging facility"
+	depends on SCSI
+	---help---
+	  This turns on a logging facility that can be used to debug a number
+	  of SCSI related problems.
+
+	  If you say Y here, no logging output will appear by default, but you
+	  can enable logging by saying Y to "/proc file system support" and
+	  "Sysctl support" below and executing the command
+
+	  echo "scsi log token [level]" > /proc/scsi/scsi
+
+	  at boot time after the /proc file system has been mounted.
+
+	  There are a number of things that can be used for 'token' (you can
+	  find them in the source: <file:drivers/scsi/scsi.c>), and this
+	  allows you to select the types of information you want, and the
+	  level allows you to select the level of verbosity.
+
+	  If you say N here, it may be harder to track down some types of SCSI
+	  problems. If you say Y here your kernel will be somewhat larger, but
+	  there should be no noticeable performance impact as long as you have
+	  logging turned off.
+
+
+menu "SCSI low-level drivers"
+	depends on SCSI!=n
+
+config A3000_SCSI
+	tristate "A3000 WD33C93A support"
+	depends on AMIGA && SCSI
+	help
+	  If you have an Amiga 3000 and have SCSI devices connected to the
+	  built-in SCSI controller, say Y. Otherwise, say N. 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 is
+	  called wd33c93.o. If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.
+
+config A4000T_SCSI
+	bool "A4000T SCSI support (EXPERIMENTAL)"
+	depends on AMIGA && EXPERIMENTAL
+	help
+	  Support for the NCR53C710 SCSI controller on the Amiga 4000T.
+
+config A2091_SCSI
+	tristate "A2091 WD33C93A support"
+	depends on ZORRO && SCSI
+	help
+	  If you have a Commodore A2091 SCSI controller, say Y. Otherwise,
+	  say N. 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 is called wd33c93.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config GVP11_SCSI
+	tristate "GVP Series II WD33C93A support"
+	depends on ZORRO && SCSI
+	---help---
+	  If you have a Great Valley Products Series II SCSI controller,
+	  answer Y. Also say Y if you have a later model of GVP SCSI
+	  controller (such as the GVP A4008 or a Combo board). Otherwise,
+	  answer N. This driver does NOT work for the T-Rex series of
+	  accelerators from TekMagic and GVP-M.
+
+	  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 gvp11.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config CYBERSTORM_SCSI
+	tristate "CyberStorm SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga with an original (MkI) Phase5 Cyberstorm
+	  accelerator board and the optional Cyberstorm SCSI controller,
+	  answer Y. Otherwise, say N.
+
+config CYBERSTORMII_SCSI
+	tristate "CyberStorm Mk II SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga with a Phase5 Cyberstorm MkII accelerator board
+	  and the optional Cyberstorm SCSI controller, say Y. Otherwise,
+	  answer N.
+
+config BLZ2060_SCSI
+	tristate "Blizzard 2060 SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga with a Phase5 Blizzard 2060 accelerator board
+	  and want to use the onboard SCSI controller, say Y. Otherwise,
+	  answer N.
+
+config BLZ1230_SCSI
+	tristate "Blizzard 1230IV/1260 SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga 1200 with a Phase5 Blizzard 1230IV or Blizzard
+	  1260 accelerator, and the optional SCSI module, say Y. Otherwise,
+	  say N.
+
+config FASTLANE_SCSI
+	tristate "Fastlane SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
+	  one in the near future, say Y to this question. Otherwise, say N.
+
+config A4091_SCSI
+	bool "A4091 SCSI support (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL
+	help
+	  Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller
+	  (1993).  Very obscure -- the 4091 was part of an Amiga 4000 upgrade
+	  plan at the time the Amiga business was sold to DKB.
+
+config WARPENGINE_SCSI
+	bool "WarpEngine SCSI support (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL
+	help
+	  Support for MacroSystem Development's WarpEngine Amiga SCSI-2
+	  controller. Info at
+	  <http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>.
+
+config BLZ603EPLUS_SCSI
+	bool "Blizzard PowerUP 603e+ SCSI (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL
+	help
+	  If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+
+	  accelerator, say Y. Otherwise, say N.
+
+config OKTAGON_SCSI
+	tristate "BSC Oktagon SCSI support (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL && SCSI
+	help
+	  If you have the BSC Oktagon SCSI disk controller for the Amiga, say
+	  Y to this question.  If you're in doubt about whether you have one,
+	  see the picture at
+	  <http://amiga.multigraph.com/photos/oktagon.html>.
+
+#	 bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI
+#	 bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI
+config ATARI_SCSI
+	tristate "Atari native SCSI support"
+	depends on ATARI && SCSI
+	---help---
+	  If you have an Atari with built-in NCR5380 SCSI controller (TT,
+	  Falcon, ...) say Y to get it supported. Of course also, if you have
+	  a compatible SCSI controller (e.g. for Medusa).  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 is called
+	  atari_scsi.o.  If you want to compile it as a module, say M here and
+	  read <file:Documentation/modules.txt>.  This driver supports both
+	  styles of NCR integration into the system: the TT style (separate
+	  DMA), and the Falcon style (via ST-DMA, replacing ACSI).  It does
+	  NOT support other schemes, like in the Hades (without DMA).
+
+config ATARI_SCSI_TOSHIBA_DELAY
+	bool "Long delays for Toshiba CD-ROMs"
+	depends on ATARI_SCSI
+	help
+	  This option increases the delay after a SCSI arbitration to
+	  accommodate some flaky Toshiba CD-ROM drives. Say Y if you intend to
+	  use a Toshiba CD-ROM drive; otherwise, the option is not needed and
+	  would impact performance a bit, so say N.
+
+config ATARI_SCSI_RESET_BOOT
+	bool "Reset SCSI-devices at boottime"
+	depends on ATARI_SCSI
+	help
+	  Reset the devices on your Atari whenever it boots.  This makes the
+	  boot process fractionally longer but may assist recovery from errors
+	  that leave the devices with SCSI operations partway completed.
+
+config TT_DMA_EMUL
+	bool "Hades SCSI DMA emulator"
+	depends on ATARI_SCSI && HADES
+	help
+	  This option enables code which emulates the TT SCSI DMA chip on the
+	  Hades. This increases the SCSI transfer rates at least ten times
+	  compared to PIO transfers.
+
+config MAC_SCSI
+	bool "Macintosh NCR5380 SCSI"
+	depends on MAC
+	help
+	  This is the NCR 5380 SCSI controller included on most of the 68030
+	  based Macintoshes.  If you have one of these say Y and read the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config SCSI_MAC_ESP
+	tristate "Macintosh NCR53c9[46] SCSI"
+	depends on MAC && SCSI
+	help
+	  This is the NCR 53c9x SCSI controller found on most of the 68040
+	  based Macintoshes.  If you have one of these say Y and read the
+	  SCSI-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 mac_esp.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+#   dep_tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG $CONFIG_SCSI
+config MVME147_SCSI
+	bool "WD33C93 SCSI driver for MVME147"
+	depends on MVME147
+	help
+	  Support for the on-board SCSI controller on the Motorola MVME147
+	  single-board computer.
+
+config MVME16x_SCSI
+	bool "NCR53C710 SCSI driver for MVME16x"
+	depends on MVME16x
+	help
+	  The Motorola MVME162, 166, 167, 172 and 177 boards use the NCR53C710
+	  SCSI controller chip.  Almost everyone using one of these boards
+	  will want to say Y to this question.
+
+config BVME6000_SCSI
+	bool "NCR53C710 SCSI driver for BVME6000"
+	depends on BVME6000
+	help
+	  The BVME4000 and BVME6000 boards from BVM Ltd use the NCR53C710
+	  SCSI controller chip.  Almost everyone using one of these boards
+	  will want to say Y to this question.
+
+config SUN3_SCSI
+	tristate "Sun3 NCR5380 SCSI"
+	depends on SUN3 && SCSI
+	help
+	  This option will enable support for the OBIO (onboard io) NCR5380
+	  SCSI controller found in the Sun 3/50 and 3/60.  Note that this
+	  driver does not provide support for VME SCSI boards.
+	  General Linux information on the Sun 3 series (now discontinued)
+	  is at <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+config SUN3X_ESP
+	bool "Sun3x ESP SCSI"
+	depends on SUN3X
+	help
+	  The ESP was an on-board SCSI controller used on Sun 3/80
+	  machines.  Say Y here to compile in support for it.
+
+endmenu
+
+endmenu
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+#
+# Network device configuration
+#
+config DUMMY
+	tristate "Dummy net driver support"
+	depends on NETDEVICES
+	---help---
+	  This is essentially a bit-bucket device (i.e. traffic you send to
+	  this device is consigned into oblivion) with a configurable IP
+	  address. It is most commonly used in order to make your currently
+	  inactive SLIP address seem like a real address for local programs.
+	  If you use SLIP or PPP, you might want to say Y here. Since this
+	  thing often comes in handy, the default is Y. It won't enlarge your
+	  kernel either. What a deal. Read about it in the Network
+	  Administrator's Guide, available from
+	  <http://www.linuxdoc.org/docs.html#guide>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called dummy.o.  If you want to use more than one dummy
+	  device at a time, you need to compile this driver as a module.
+	  Instead of 'dummy', the devices will then be called 'dummy0',
+	  'dummy1' etc.
+
+config SLIP
+	tristate "SLIP (serial line) support"
+	depends on NETDEVICES
+	---help---
+	  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
+	  connect to your Internet service provider or to connect to some
+	  other local Unix box or if you want to configure your Linux box as a
+	  Slip/CSlip server for other people to dial in. SLIP (Serial Line
+	  Internet Protocol) is a protocol used to send Internet traffic over
+	  serial connections such as telephone lines or null modem cables;
+	  nowadays, the protocol PPP is more commonly used for this same
+	  purpose.
+
+	  Normally, your access provider has to support SLIP in order for you
+	  to be able to use it, but there is now a SLIP emulator called SLiRP
+	  around (available from
+	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
+	  allows you to use SLIP over a regular dial up shell connection. If
+	  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
+	  NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, explains how to
+	  configure SLIP. Note that you don't need this option if you just
+	  want to run term (term is a program which gives you almost full
+	  Internet connectivity if you have a regular dial up shell account on
+	  some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
+	  support will enlarge your kernel by about 4 KB. If unsure, say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>. The module will be
+	  called slip.o.
+
+config SLIP_COMPRESSED
+	bool "CSLIP compressed headers"
+	depends on SLIP
+	---help---
+	  This protocol is faster than SLIP because it uses compression on the
+	  TCP/IP headers (not on the data itself), but it has to be supported
+	  on both ends. Ask your access provider if you are not sure and
+	  answer Y, just in case. You will still be able to use plain SLIP. If
+	  you plan to use SLiRP, the SLIP emulator (available from
+	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
+	  allows you to use SLIP over a regular dial up shell connection, you
+	  definitely want to say Y here. The NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
+	  CSLIP. This won't enlarge your kernel.
+
+config SLIP_SMART
+	bool "Keepalive and linefill"
+	depends on SLIP
+	help
+	  Adds additional capabilities to the SLIP driver to support the
+	  RELCOM line fill and keepalive monitoring. Ideal on poor quality
+	  analogue lines.
+
+config SLIP_MODE_SLIP6
+	bool "Six bit SLIP encapsulation"
+	depends on SLIP
+	help
+	  Just occasionally you may need to run IP over hostile serial
+	  networks that don't pass all control characters or are only seven
+	  bit. Saying Y here adds an extra mode you can use with SLIP:
+	  "slip6". In this mode, SLIP will only send normal ASCII symbols over
+	  the serial device. Naturally, this has to be supported at the other
+	  end of the link as well. It's good enough, for example, to run IP
+	  over the async ports of a Camtec JNT Pad. If unsure, say N.
+
+config PPP
+	tristate "PPP (point-to-point protocol) support"
+	depends on NETDEVICES
+	---help---
+	  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
+	  the same purpose: sending Internet traffic over telephone (and other
+	  serial) lines.  Ask your access provider if they support it, because
+	  otherwise you can't use it; most Internet access providers these
+	  days support PPP rather than SLIP.
+
+	  To use PPP, you need an additional program called pppd as described
+	  in the PPP-HOWTO, available at
+	  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
+	  the version of pppd recommended in <file:Documentation/Changes>.
+	  The PPP option enlarges your kernel by about 16 KB.
+
+	  There are actually two versions of PPP: the traditional PPP for
+	  asynchronous lines, such as regular analog phone lines, and
+	  synchronous PPP which can be used over digital ISDN lines for
+	  example.  If you want to use PPP over phone lines or other
+	  asynchronous serial lines, you need to say Y (or M) here and also to
+	  the next option, "PPP support for async serial ports".  For PPP over
+	  synchronous lines, you should say Y (or M) here and to "Support
+	  synchronous PPP", below.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you said Y to "Version information on all symbols" above, then
+	  you cannot compile the PPP driver into the kernel; you can then only
+	  compile it as a module.  The module will be called ppp_generic.o.
+	  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>.
+
+config PPP_MULTILINK
+	bool "PPP multilink support (EXPERIMENTAL)"
+	depends on PPP && EXPERIMENTAL
+
+config PPP_FILTER
+	bool "PPP filtering"
+	depends on PPP && FILTER
+
+config PPP_ASYNC
+	tristate "PPP support for async serial ports"
+	depends on PPP
+
+config PPP_SYNC_TTY
+	tristate "PPP support for sync tty ports"
+	depends on PPP
+
+config PPP_DEFLATE
+	tristate "PPP Deflate compression"
+	depends on PPP
+
+config PPP_BSDCOMP
+	tristate "PPP BSD-Compress compression"
+	depends on PPP
+
+config PPPOE
+	tristate "PPP over Ethernet (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && PPP
+
+config EQUALIZER
+	tristate "EQL (serial line load balancing) support"
+	depends on NETDEVICES
+	---help---
+	  If you have two serial connections to some other computer (this
+	  usually requires two modems and two telephone lines) and you use
+	  SLIP (the protocol for sending Internet traffic over telephone
+	  lines) or PPP (a better SLIP) on them, you can make them behave like
+	  one double speed connection using this driver.  Naturally, this has
+	  to be supported at the other end as well, either with a similar EQL
+	  Linux driver or with a Livingston Portmaster 2e.
+
+	  Say Y if you want this and read
+	  <file:Documentation/networking/eql.txt>.  You may also want to read
+	  section 6.2 of the NET-3-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 eql.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config ARIADNE
+	tristate "Ariadne support"
+	depends on NETDEVICES && ZORRO
+	help
+	  If you have a Village Tronic Ariadne Ethernet adapter, say Y.
+	  Otherwise, say N.
+
+	  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 is called ariadne.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config ARIADNE2
+	tristate "Ariadne II support"
+	depends on NETDEVICES && ZORRO
+	help
+	  This driver is for the Village Tronic Ariadne II and the Individual
+	  Computers X-Surf Ethernet cards. If you have such a card, say Y.
+	  Otherwise, say N.
+
+	  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 ariadne2.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config A2065
+	tristate "A2065 support"
+	depends on NETDEVICES && ZORRO
+	help
+	  If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise,
+	  say N.
+
+	  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 is called a2065.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config HYDRA
+	tristate "Hydra support"
+	depends on NETDEVICES && ZORRO
+	help
+	  If you have a Hydra Ethernet adapter, say Y. Otherwise, say N.
+
+	  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 is called hydra.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config APNE
+	tristate "PCMCIA NE2000 support"
+	depends on NETDEVICES && AMIGA_PCMCIA
+	help
+	  If you have a PCMCIA NE2000 compatible adapter, say Y.  Otherwise,
+	  say N.
+
+	  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 is called apne.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config APOLLO_ELPLUS
+	tristate "Apollo 3c505 support"
+	depends on NETDEVICES && APOLLO
+	help
+	  Say Y or M here if your Apollo has a 3Com 3c505 ISA Ethernet card.
+	  If you don't have one made for Apollos, you can use one from a PC,
+	  except that your Apollo won't be able to boot from it (because the
+	  code in the ROM will be for a PC).
+
+config MAC8390
+	bool "Macintosh NS 8390 based ethernet cards"
+	depends on NETDEVICES && MAC
+	help
+	  If you want to include a driver to support Nubus or LC-PDS
+	  Ethernet cards using an NS8390 chipset or its equivalent, say Y
+	  and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config MACSONIC
+	tristate "Macintosh SONIC based ethernet (onboard, NuBus, LC, CS)"
+	depends on NETDEVICES && MAC
+	---help---
+	  Support for NatSemi SONIC based Ethernet devices.  This includes
+	  the onboard Ethernet in many Quadras as well as some LC-PDS,
+	  a few Nubus and all known Comm Slot Ethernet cards.  If you have
+	  one of these say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  This module will
+	  be called macsonic.o.
+
+config SMC9194
+	tristate "Macintosh SMC 9194 based ethernet cards"
+	depends on NETDEVICES && MAC
+	---help---
+	  This is support for the SMC9xxx based Ethernet cards. Choose this
+	  option if you have a DELL laptop with the docking station, or
+	  another SMC9192/9194 based chipset.  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 smc9194.o.  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>.
+
+config MAC89x0
+	tristate "Macintosh CS89x0 based ethernet cards"
+	depends on NETDEVICES && MAC
+	---help---
+	  Support for CS89x0 chipset based Ethernet cards.  If you have a
+	  Nubus or LC-PDS network (Ethernet) card of this type, say Y and
+	  read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  This module will
+	  be called mac89x0.o.
+
+config MACMACE
+	bool "Macintosh (AV) onboard MACE ethernet (EXPERIMENTAL)"
+	depends on NETDEVICES && MAC && EXPERIMENTAL
+	help
+	  Support for the onboard AMD 79C940 MACE Ethernet controller used in
+	  the 660AV and 840AV Macintosh.  If you have one of these Macintoshes
+	  say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config MVME147_NET
+	tristate "MVME147 (Lance) Ethernet support"
+	depends on NETDEVICES && MVME147
+	help
+	  Support for the on-board Ethernet interface on the Motorola MVME147
+	  single-board computer.  Say Y here to include the
+	  driver for this chip in your kernel.   If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config MVME16x_NET
+	tristate "MVME16x Ethernet support"
+	depends on NETDEVICES && MVME16x
+	help
+	  This is the driver for the Ethernet interface on the Motorola
+	  MVME162, 166, 167, 172 and 177 boards.  Say Y here to include the
+	  driver for this chip in your kernel.   If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config BVME6000_NET
+	tristate "BVME6000 Ethernet support"
+	depends on NETDEVICES && BVME6000
+	help
+	  This is the driver for the Ethernet interface on BVME4000 and
+	  BVME6000 VME boards.  Say Y here to include the driver for this chip
+	  in your kernel.   If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.
+
+config ATARILANCE
+	tristate "Atari Lance support"
+	depends on NETDEVICES && ATARI
+	help
+	  Say Y to include support for several Atari Ethernet adapters based
+	  on the AMD Lance chipset: RieblCard (with or without battery), or
+	  PAMCard VME (also the version by Rhotron, with different addresses).
+
+config ATARI_BIONET
+	tristate "BioNet-100 support"
+	depends on NETDEVICES && ATARI && ATARI_ACSI!=n
+	help
+	  Say Y to include support for BioData's BioNet-100 Ethernet adapter
+	  for the ACSI port. The driver works (has to work...) with a polled
+	  I/O scheme, so it's rather slow :-(
+
+config ATARI_PAMSNET
+	tristate "PAMsNet support"
+	depends on NETDEVICES && ATARI && ATARI_ACSI!=n
+	help
+	  Say Y to include support for the PAMsNet Ethernet adapter for the
+	  ACSI port ("ACSI node"). The driver works (has to work...) with a
+	  polled I/O scheme, so it's rather slow :-(
+
+config SUN3LANCE
+	tristate "Sun3/Sun3x on-board LANCE support"
+	depends on NETDEVICES && (SUN3 || SUN3X)
+	help
+	  Most Sun3 and Sun3x motherboards (including the 3/50, 3/60 and 3/80)
+	  featured an AMD Lance 10Mbit Ethernet controller on board; say Y
+	  here to compile in the Linux driver for this and enable Ethernet.
+	  General Linux information on the Sun 3 and 3x series (now
+	  discontinued) is at
+	  <http://www.angelfire.com/ca2/tech68k/sun3.html>.
+
+	  If you're not building a kernel for a Sun 3, say N.
+
+config SUN3_82586
+	tristate "Sun3 on-board Intel 82586 support"
+	depends on NETDEVICES && SUN3
+	help
+	  This driver enables support for the on-board Intel 82586 based
+	  Ethernet adapter found on Sun 3/1xx and 3/2xx motherboards.  Note
+	  that this driver does not support 82586-based adapters on additional
+	  VME boards.
+
+config HPLANCE
+	bool "HP on-board LANCE support"
+	depends on NETDEVICES && HP300
+	help
+	  If you want to use the builtin "LANCE" Ethernet controller on an
+	  HP300 machine, say Y here.
+
+config PLIP
+	tristate "PLIP (parallel port) support"
+	depends on NETDEVICES && Q40 && PARPORT
+	---help---
+	  PLIP (Parallel Line Internet Protocol) is used to create a
+	  reasonably fast mini network consisting of two (or, rarely, more)
+	  local machines.  A PLIP link from a Linux box is a popular means to
+	  install a Linux distribution on a machine which doesn't have a
+	  CD-ROM drive (a minimal system has to be transferred with floppies
+	  first). The kernels on both machines need to have this PLIP option
+	  enabled for this to work.
+
+	  The PLIP driver has two modes, mode 0 and mode 1.  The parallel
+	  ports (the connectors at the computers with 25 holes) are connected
+	  with "null printer" or "Turbo Laplink" cables which can transmit 4
+	  bits at a time (mode 0) or with special PLIP cables, to be used on
+	  bidirectional parallel ports only, which can transmit 8 bits at a
+	  time (mode 1); you can find the wiring of these cables in
+	  <file:Documentation/networking/PLIP.txt>.  The cables can be up to
+	  15m long.  Mode 0 works also if one of the machines runs DOS/Windows
+	  and has some PLIP software installed, e.g. the Crynwr PLIP packet
+	  driver (<http://oak.oakland.edu/simtel.net/msdos/pktdrvr-pre.html>)
+	  and winsock or NCSA's telnet.
+
+	  If you want to use PLIP, say Y and read the PLIP mini-HOWTO as well
+	  as the NET-3-HOWTO, both available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Note that the PLIP
+	  protocol has been changed and this PLIP driver won't work together
+	  with the PLIP support in Linux versions 1.0.x.  This option enlarges
+	  your kernel by about 8 KB.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called plip.o.  If unsure, say Y or M, in case you buy a laptop
+	  later.
+
+config NE2000
+	tristate "NE2000/NE1000 support"
+	depends on NETDEVICES && Q40 && m
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Many Ethernet cards
+	  without a specific driver are compatible with NE2000.
+
+	  If you have a PCI NE2000 card however, say N here and Y to "PCI
+	  NE2000 support", above. If you have a NE2000 card and are running on
+	  an MCA system (a bus system used on some IBM PS/2 computers and
+	  laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
+	  below.
+
+	  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 ne.o.  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>.
+
+endmenu
+
+
+menu "Character devices"
+
+config SERIAL
+	tristate "Q40 Standard/generic serial support" if Q40
+	default DN_SERIAL if APOLLO
+	---help---
+	  This selects whether you want to include the driver for the standard
+	  serial ports.  The standard answer is Y.  People who might say N
+	  here are those that are setting up dedicated Ethernet WWW/FTP
+	  servers, or users that have one of the various bus mice instead of a
+	  serial mouse and don't intend to use their machine's standard serial
+	  port for anything.  (Note that the Cyclades and Stallion multi
+	  serial port drivers do not need this driver built in for them to
+	  work.)
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  serial.o.
+	  [WARNING: Do not compile this driver as a module if you are using
+	  non-standard serial ports, since the configuration information will
+	  be lost when the driver is unloaded.  This limitation may be lifted
+	  in the future.]
+
+	  BTW1: If you have a mouseman serial mouse which is not recognized by
+	  the X window system, try running gpm first.
+
+	  BTW2: If you intend to use a software modem (also called Winmodem)
+	  under Linux, forget it.  These modems are crippled and require
+	  proprietary drivers which are only available under Windows.
+
+	  Most people will say Y or M here, so that they can use serial mice,
+	  modems and similar devices connecting to the standard serial ports.
+
+config SERIAL_EXTENDED
+	bool "Extended dumb serial driver options"
+	depends on SERIAL=y
+	help
+	  If you wish to use any non-standard features of the standard "dumb"
+	  driver, say Y here. This includes HUB6 support, shared serial
+	  interrupts, special multiport support, support for more than the
+	  four COM 1/2/3/4 boards, etc.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about serial driver options. If unsure, say N.
+
+config SERIAL_MANY_PORTS
+	bool "Support more than 4 serial ports"
+	depends on SERIAL_EXTENDED
+	help
+	  Say Y here if you have dumb serial boards other than the four
+	  standard COM 1/2/3/4 ports. This may happen if you have an AST
+	  FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available
+	  from <http://www.linuxdoc.org/docs.html#howto>), or other custom
+	  serial port hardware which acts similar to standard serial port
+	  hardware. If you only use the standard COM 1/2/3/4 ports, you can
+	  say N here to save some memory. You can also say Y if you have an
+	  "intelligent" multiport card such as Cyclades, Digiboards, etc.
+
+config SERIAL_SHARE_IRQ
+	bool "Support for sharing serial interrupts"
+	depends on SERIAL_EXTENDED
+	help
+	  Some serial boards have hardware support which allows multiple dumb
+	  serial ports on the same board to share a single IRQ. To enable
+	  support for this in the serial driver, say Y here.
+
+config SERIAL_MULTIPORT
+	bool "Support special multiport boards"
+	depends on SERIAL_EXTENDED
+	help
+	  Some multiport serial ports have special ports which are used to
+	  signal when there are any serial ports on the board which need
+	  servicing. Say Y here to enable the serial driver to take advantage
+	  of those special I/O ports.
+
+config HUB6
+	bool "Support the Bell Technologies HUB6 card"
+	depends on SERIAL_EXTENDED
+	help
+	  Say Y here to enable support in the dumb serial driver to support
+	  the HUB6 card.
+
+config VT
+	bool "Virtual terminal"
+	---help---
+	  If you say Y here, you will get support for terminal devices with
+	  display and keyboard devices. These are called "virtual" because you
+	  can run several virtual terminals (also called virtual consoles) on
+	  one physical terminal. This is rather useful, for example one
+	  virtual terminal can collect system messages and warnings, another
+	  one can be used for a text-mode user session, and a third could run
+	  an X session, all in parallel. Switching between virtual terminals
+	  is done with certain key combinations, usually Alt-<function key>.
+
+	  The setterm command ("man setterm") can be used to change the
+	  properties (such as colors or beeping) of a virtual terminal. The
+	  man page console_codes(4) ("man console_codes") contains the special
+	  character sequences that can be used to change those properties
+	  directly. The fonts used on virtual terminals can be changed with
+	  the setfont ("man setfont") command and the key bindings are defined
+	  with the loadkeys ("man loadkeys") command.
+
+	  You need at least one virtual terminal device in order to make use
+	  of your keyboard and monitor. Therefore, only people configuring an
+	  embedded system would want to say N here in order to save some
+	  memory; the only way to log into such a system is then via a serial
+	  or network connection.
+
+	  If unsure, say Y, or else you won't be able to do much with your new
+	  shiny Linux system :-)
+
+config VT_CONSOLE
+	bool "Support for console on virtual terminal"
+	depends on VT
+	---help---
+	  The system console is the device which receives all kernel messages
+	  and warnings and which allows logins in single user mode. If you
+	  answer Y here, a virtual terminal (the device used to interact with
+	  a physical terminal) can be used as system console. This is the most
+	  common mode of operations, so you should say Y here unless you want
+	  the kernel messages be output only to a serial port (in which case
+	  you should say Y to "Console on serial port", below).
+
+	  If you do say Y here, by default the currently visible virtual
+	  terminal (/dev/tty0) will be used as system console. You can change
+	  that with a kernel command line option such as "console=tty3" which
+	  would use the third virtual terminal as system console. (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.)
+
+	  If unsure, say Y.
+
+config NVRAM
+	bool
+	depends on ATARI
+	default y
+	---help---
+	  If you say Y here and create a character special file /dev/nvram
+	  with major number 10 and minor number 144 using mknod ("man mknod"),
+	  you get read and write access to the 50 bytes of non-volatile memory
+	  in the real time clock (RTC), which is contained in every PC and
+	  most Ataris.
+
+	  This memory is conventionally called "CMOS RAM" on PCs and "NVRAM"
+	  on Ataris. /dev/nvram may be used to view settings there, or to
+	  change them (with some utility). It could also be used to frequently
+	  save a few bits of very important data that may not be lost over
+	  power-off and for which writing to disk is too insecure. Note
+	  however that most NVRAM space in a PC belongs to the BIOS and you
+	  should NEVER idly tamper with it. See Ralf Brown's interrupt list
+	  for a guide to the use of CMOS bytes by your BIOS.
+
+	  On Atari machines, /dev/nvram is always configured and does not need
+	  to be selected.
+
+	  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 nvram.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config AMIGAMOUSE
+	tristate "Amiga mouse support"
+	depends on AMIGA
+	help
+	  If you want to be able to use an Amiga mouse in Linux, say Y.
+
+	  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 is called amigamouse.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config BUSMOUSE
+	bool
+	depends on SUN3X_ZS || ATARI && VT && ATARIMOUSE || AMIGA && AMIGAMOUSE
+	default y
+	---help---
+	  Say Y here if your machine has a bus mouse as opposed to a serial
+	  mouse. Most people have a regular serial MouseSystem or
+	  Microsoft mouse (made by Logitech) that plugs into a COM port
+	  (rectangular with 9 or 25 pins). These people say N here. 
+
+	  If you have a laptop, you either have to check the documentation or
+	  experiment a bit to find out whether the trackball is a serial mouse
+	  or not; it's best to say Y here for you.
+
+	  This is the generic bus mouse driver code. If you have a bus mouse,
+	  you will have to say Y here and also to the specific driver for your
+	  mouse below.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called busmouse.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config ATARIMOUSE
+	tristate "Atari mouse support"
+	depends on ATARI && VT
+	help
+	  If you want to be able to use an Atari mouse in Linux, say Y.
+
+	  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 is called atarimouse.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config ATARI_MFPSER
+	tristate "Atari MFP serial support"
+	depends on ATARI
+	---help---
+	  If you like to use the MFP serial ports ("Modem1", "Serial1") under
+	  Linux, say Y. The driver equally supports all kinds of MFP serial
+	  ports and automatically detects whether Serial1 is available.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  Note for Falcon users: You also have an MFP port, it's just not
+	  wired to the outside... But you could use the port under Linux.
+
+config ATARI_SCC
+	tristate "Atari SCC serial support"
+	depends on ATARI
+	---help---
+	  If you have serial ports based on a Zilog SCC chip (Modem2, Serial2,
+	  LAN) and like to use them under Linux, say Y. All built-in SCC's are
+	  supported (TT, MegaSTE, Falcon), and also the ST-ESCC. If you have
+	  two connectors for channel A (Serial2 and LAN), they are visible as
+	  two separate devices.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config ATARI_SCC_DMA
+	bool "Atari SCC serial DMA support"
+	depends on ATARI_SCC
+	help
+	  This enables DMA support for receiving data on channel A of the SCC.
+	  If you have a TT you may say Y here and read
+	  drivers/char/atari_SCC.README. All other users should say N here,
+	  because only the TT has SCC-DMA, even if your machine keeps claiming
+	  so at boot time.
+
+config ATARI_MIDI
+	tristate "Atari MIDI serial support"
+	depends on ATARI
+	help
+	  If you want to use your Atari's MIDI port in Linux, say Y.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config ATARI_DSP56K
+	tristate "Atari DSP56k support (EXPERIMENTAL)"
+	depends on ATARI && EXPERIMENTAL
+	help
+	  If you want to be able to use the DSP56001 in Falcons, say Y. This
+	  driver is still experimental, and if you don't know what it is, or
+	  if you don't have this processor, just say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config AMIGA_BUILTIN_SERIAL
+	tristate "Amiga builtin serial support"
+	depends on AMIGA
+	help
+	  If you want to use your Amiga's built-in serial port in Linux,
+	  answer Y.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config WHIPPET_SERIAL
+	tristate "Hisoft Whippet PCMCIA serial support"
+	depends on AMIGA_PCMCIA
+	help
+	  HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
+	  is no listing for the Whippet in their Amiga section.
+
+config MULTIFACE_III_TTY
+	tristate "Multiface Card III serial support"
+	depends on AMIGA
+	help
+	  If you want to use a Multiface III card's serial port in Linux,
+	  answer Y.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config A2232
+	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
+	depends on AMIGA && EXPERIMENTAL
+	---help---
+	  This option supports the 2232 7-port serial card shipped with the
+	  Amiga 2000 and other Zorro-bus machines, dating from 1989.  At
+	  a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
+	  each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
+	  ports were connected with 8 pin DIN connectors on the card bracket,
+	  for which 8 pin to DB25 adapters were supplied. The card also had
+	  jumpers internally to toggle various pinning configurations.
+
+	  This driver can be built as a module; but then "generic_serial.o"
+	  will also be built as a module. This has to be loaded before
+	  "ser_a2232.o". If you want to do this, answer M here and read
+	  "<file:Documentation/modules.txt>".
+
+config GVPIOEXT
+	tristate "GVP IO-Extender support"
+	depends on PARPORT=n && ZORRO
+	help
+	  If you want to use a GVP IO-Extender serial card in Linux, say Y.
+	  Otherwise, say N.
+
+config GVPIOEXT_LP
+	tristate "GVP IO-Extender parallel printer support"
+	depends on GVPIOEXT
+	help
+	  Say Y to enable driving a printer from the parallel port on your
+	  GVP IO-Extender card, N otherwise.
+
+config GVPIOEXT_PLIP
+	tristate "GVP IO-Extender PLIP support"
+	depends on GVPIOEXT
+	help
+	  Say Y to enable doing IP over the parallel port on your GVP
+	  IO-Extender card, N otherwise.
+
+config MAC_SCC
+	tristate "Macintosh serial support"
+	depends on MAC
+
+config ADB
+	bool "Apple Desktop Bus (ADB) support"
+	depends on MAC
+	help
+	  Apple Desktop Bus (ADB) support is for support of devices which
+	  are connected to an ADB port.  ADB devices tend to have 4 pins.
+	  If you have an Apple Macintosh prior to the iMac, or a
+	  "Blue and White G3", you probably want to say Y here.  Otherwise
+	  say N.
+
+config ADB_MACII
+	bool "Include Mac II ADB driver"
+	depends on ADB
+	help
+	  Say Y here if want your kernel to support Macintosh systems that use
+	  the Mac II style ADB.  This includes the II, IIx, IIcx, SE/30, IIci,
+	  Quadra 610, Quadra 650, Quadra 700, Quadra 800, Centris 610 and
+	  Centris 650.
+
+config ADB_MACIISI
+	bool "Include Mac IIsi ADB driver"
+	depends on ADB
+	help
+	  Say Y here if want your kernel to support Macintosh systems that use
+	  the Mac IIsi style ADB.  This includes the IIsi, IIvi, IIvx, Classic
+	  II, LC, LC II, LC III, Performa 460, and the Performa 600.
+
+config ADB_CUDA
+	bool "Include CUDA ADB driver"
+	depends on ADB
+	help
+	  This provides support for CUDA based Power Macintosh systems.  This
+	  includes most OldWorld PowerMacs, the first generation iMacs, the
+	  Blue&White G3 and the Yikes G4 (PCI Graphics).  All later models
+	  should use CONFIG_ADB_PMU instead.
+
+	  If unsure say Y.
+
+config ADB_IOP
+	bool "Include IOP (IIfx/Quadra 9x0) ADB driver"
+	depends on ADB
+	help
+	  The I/O Processor (IOP) is an Apple custom IC designed to provide
+	  intelligent support for I/O controllers.  It is described at
+	  <http://www.angelfire.com/ca2/dev68k/iopdesc.html> to enable direct
+	  support for it, say 'Y' here.
+
+config ADB_PMU68K
+	bool "Include PMU (Powerbook) ADB driver"
+	depends on ADB
+	help
+	  Say Y here if want your kernel to support the m68k based Powerbooks.
+	  This includes the PowerBook 140, PowerBook 145, PowerBook 150,
+	  PowerBook 160, PowerBook 165, PowerBook 165c, PowerBook 170,
+	  PowerBook 180, PowerBook, 180c, PowerBook 190cs, PowerBook 520,
+	  PowerBook Duo 210, PowerBook Duo 230, PowerBook Duo 250,
+	  PowerBook Duo 270c, PowerBook Duo 280 and PowerBook Duo 280c.
+
+config INPUT_ADBHID
+	bool "Use input layer for ADB devices"
+	depends on MAC && INPUT=y
+	---help---
+	  Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
+	  such as keyboards, mice, joysticks, or graphic tablets handled by
+	  the input layer.  If you say Y here, make sure to say Y to the
+	  corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
+	  "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
+	  support" (CONFIG_INPUT_EVDEV) as well.
+
+	  If you say N here, you still have the option of using the old ADB
+	  keyboard and mouse drivers.
+
+	  If unsure, say Y.
+
+config MAC_HID
+	bool
+	depends on INPUT_ADBHID
+	default y
+
+config MAC_ADBKEYCODES
+	bool "Support for ADB raw keycodes"
+	depends on INPUT_ADBHID
+	help
+	  This provides support for sending raw ADB keycodes to console
+	  devices.  This is the default up to 2.4.0, but in future this may be
+	  phased out in favor of generic Linux keycodes.  If you say Y here,
+	  you can dynamically switch via the
+	  /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
+	  sysctl and with the "keyboard_sends_linux_keycodes=" kernel
+	  argument.
+
+	  If unsure, say Y here.
+
+config MAC_EMUMOUSEBTN
+	bool "Support for mouse button 2+3 emulation"
+	depends on INPUT_ADBHID
+	help
+	  This provides generic support for emulating the 2nd and 3rd mouse
+	  button with keypresses.  If you say Y here, the emulation is still
+	  disabled by default.  The emulation is controlled by these sysctl
+	  entries:
+	  /proc/sys/dev/mac_hid/mouse_button_emulation
+	  /proc/sys/dev/mac_hid/mouse_button2_keycode
+	  /proc/sys/dev/mac_hid/mouse_button3_keycode
+
+config ADB_KEYBOARD
+	bool "Support for ADB keyboard (old driver)"
+	depends on MAC && !INPUT_ADBHID
+	help
+	  This option allows you to use an ADB keyboard attached to your
+	  machine. Note that this disables any other (ie. PS/2) keyboard
+	  support, even if your machine is physically capable of using both at
+	  the same time.
+
+	  If you use an ADB keyboard (4 pin connector), say Y here.
+	  If you use a PS/2 keyboard (6 pin connector), say N here.
+
+config HPDCA
+	tristate "HP DCA serial support"
+	depends on DIO
+	help
+	  If you want to use the internal "DCA" serial ports on an HP300
+	  machine, say Y here.
+
+config SUN3X_ZS
+	bool "Sun3/3x builtin serial support"
+	depends on SUN3 || SUN3X
+	help
+	  ZS refers to a type of asynchronous serial port built in to the Sun3
+	  and Sun3x workstations; if you have a Sun 3, you probably have
+	  these.  Say 'Y' to support ZS ports directly.  This option must be
+	  enabled in order to support the
+	  keyboard and mouse ports.
+
+config SUN_KEYBOARD
+	bool
+	depends on SUN3X_ZS
+	default y
+	help
+	  Say Y here to support the keyboard found on Sun 3 and 3x
+	  workstations.  It can also be used support Sun Type-5 keyboards
+	  through an adaptor.  See
+	  <http://www.suse.cz/development/input/adapters.html> and
+	  <http://sourceforge.net/projects/linuxconsole/> for details on the
+	  latter.
+
+config SUN_MOUSE
+	bool
+	depends on SUN3X_ZS
+	default y
+
+config SBUS
+	bool
+	depends on SUN3X_ZS
+	default y
+
+config SBUSCHAR
+	bool
+	depends on SUN3X_ZS
+	default y
+
+config SUN_SERIAL
+	bool
+	depends on SUN3X_ZS
+	default y
+
+config MVME147_SCC
+	bool "SCC support for MVME147 serial ports"
+	depends on MVME147
+	help
+	  This is the driver for the serial ports on the Motorola MVME147
+	  boards.  Everyone using one of these boards should say Y here.
+
+config SERIAL167
+	bool "CD2401 support for MVME166/7 serial ports"
+	depends on MVME16x
+	help
+	  This is the driver for the serial ports on the Motorola MVME166,
+	  167, and 172 boards.  Everyone using one of these boards should say
+	  Y here.
+
+config MVME162_SCC
+	bool "SCC support for MVME162 serial ports"
+	depends on MVME16x
+	help
+	  This is the driver for the serial ports on the Motorola MVME162 and
+	  172 boards.  Everyone using one of these boards should say Y here.
+
+config BVME6000_SCC
+	bool "SCC support for BVME6000 serial ports"
+	depends on BVME6000
+	help
+	  This is the driver for the serial ports on the BVME4000 and BVME6000
+	  boards from BVM Ltd.  Everyone using one of these boards should say
+	  Y here.
+
+config DN_SERIAL
+	bool "Support for DN serial port (dummy)"
+	depends on APOLLO
+
+config SERIAL_CONSOLE
+	bool "Support for serial port console"
+	depends on (AMIGA || ATARI || MAC || HP300 || SUN3 || SUN3X || VME || APOLLO) && (ATARI_MFPSER=y || ATARI_SCC=y || ATARI_MIDI=y || MAC_SCC=y || AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y || HPDCA=y || SUN3X_ZS || SERIAL=y || MVME147_SCC || SERIAL167 || MVME162_SCC || BVME6000_SCC || DN_SERIAL)
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+config USERIAL
+	bool "Support for user serial device modules"
+
+config WATCHDOG
+	bool "Watchdog Timer Support"
+	---help---
+	  If you say Y here (and to one of the following options) and create a
+	  character special file /dev/watchdog with major number 10 and minor
+	  number 130 using mknod ("man mknod"), you will get a watchdog, i.e.:
+	  subsequently opening the file and then failing to write to it for
+	  longer than 1 minute will result in rebooting the machine. This
+	  could be useful for a networked machine that needs to come back
+	  online as fast as possible after a lock-up. There's both a watchdog
+	  implementation entirely in software (which can sometimes fail to
+	  reboot the machine) and a driver for hardware watchdog boards, which
+	  are more robust and can also keep track of the temperature inside
+	  your computer. For details, read <file:Documentation/watchdog.txt>
+	  in the kernel source.
+
+	  The watchdog is usually used together with the watchdog daemon
+	  which is available from
+	  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
+	  also monitor NFS connections and can reboot the machine when the process
+	  table is full.
+
+	  If unsure, say N.
+
+config WATCHDOG_NOWAYOUT
+	bool "Disable watchdog shutdown on close"
+	depends on WATCHDOG
+	help
+	  The default watchdog behaviour (which you get if you say N here) is
+	  to stop the timer if the process managing it closes the file
+	  /dev/watchdog. It's always remotely possible that this process might
+	  get killed. If you say Y here, the watchdog cannot be stopped once
+	  it has been started.
+
+config SOFT_WATCHDOG
+	bool "Software watchdog"
+	depends on WATCHDOG
+	help
+	  A software monitoring watchdog. This will fail to reboot your system
+	  from some situations that the hardware watchdog will recover
+	  from. Equally it's a lot cheaper to install.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called
+	  softdog.o.
+
+config RTC
+	bool "Enhanced Real Time Clock Support"
+	depends on ATARI
+	---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
+	  into your computer.
+
+	  Every PC has such a clock built in. It can be used to generate
+	  signals from as low as 1Hz up to 8192Hz, and can also be used
+	  as a 24 hour alarm. It reports status information via the file
+	  /proc/driver/rtc and its behaviour is set by various ioctls on
+	  /dev/rtc.
+
+	  If you run Linux on a multiprocessor machine and said Y to
+	  "Symmetric Multi Processing" above, you should say Y here to read
+	  and set the RTC in an SMP compatible fashion.
+
+	  If you think you have a use for such a device (such as periodic data
+	  sampling), then say Y here, and read <file:Documentation/rtc.txt>
+	  for details.
+
+	  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 is called rtc.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+config GEN_RTC
+	tristate "Generic /dev/rtc emulation" if !SUN3
+	depends on !ATARI
+	default y if SUN3
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+	---help---
+	  A pseudo terminal (PTY) is a software device consisting of two
+	  halves: a master and a slave. The slave device behaves identical to
+	  a physical terminal; the master device is used by a process to
+	  read data from and write data to the slave, thereby emulating a
+	  terminal. Typical programs for the master side are telnet servers
+	  and xterms.
+
+	  Linux has traditionally used the BSD-like names /dev/ptyxx for
+	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
+	  has a number of problems. The GNU C library glibc 2.1 and later,
+	  however, supports the Unix98 naming standard: in order to acquire a
+	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
+	  terminal is then made available to the process and the pseudo
+	  terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The entries in /dev/pts/ are created on the fly by a virtual
+	  file system; therefore, if you say Y here you should say Y to
+	  "/dev/pts file system for Unix98 PTYs" as well.
+
+	  If you want to say Y here, you need to have the C library glibc 2.1
+	  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
+	  Read the instructions in <file:Documentation/Changes> pertaining to
+	  pseudo terminals. It's safe to say N.
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+	help
+	  The maximum number of Unix98 PTYs that can be used at any one time.
+	  The default is 256, and should be enough for desktop systems. Server
+	  machines which support incoming telnet/rlogin/ssh connections and/or
+	  serve several X terminals may want to increase this: every incoming
+	  connection and every xterm uses up one PTY.
+
+	  When not in use, each additional set of 256 PTYs occupy
+	  approximately 8 KB of kernel memory on 32-bit architectures.
+
+endmenu
+
+
+menu "Sound support"
+
+config SOUND
+	tristate "Sound card support"
+
+source "sound/oss/dmasound/Kconfig"
+
+endmenu
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+source "drivers/video/Kconfig"
+
+endmenu
+
+
+menu "Kernel hacking"
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	depends on DEBUG_KERNEL
+
+config DEBUG_BUGVERBOSE
+	bool "Verbose BUG() reporting"
+	depends on DEBUG_KERNEL
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/m68k/config.in b/arch/m68k/config.in
--- a/arch/m68k/config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,550 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-
-define_bool CONFIG_M68K y
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-mainmenu_name "Linux/68k Kernel Configuration"
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Platform dependent setup'
-
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_PCMCIA n
-
-bool 'Amiga support' CONFIG_AMIGA
-bool 'Atari support' CONFIG_ATARI
-dep_bool '  Hades support' CONFIG_HADES $CONFIG_ATARI
-if [ "$CONFIG_HADES" = "y" ]; then
-   define_bool CONFIG_PCI y
-else
-   define_bool CONFIG_PCI n
-fi  
-bool 'Macintosh support' CONFIG_MAC
-if [ "$CONFIG_MAC" = "y" ]; then
-   define_bool CONFIG_NUBUS y
-   define_bool CONFIG_M68K_L2_CACHE y
-fi
-bool 'Apollo support' CONFIG_APOLLO
-bool 'VME (Motorola and BVM) support' CONFIG_VME
-if [ "$CONFIG_VME" = "y" ]; then
-   bool '  MVME147 support' CONFIG_MVME147
-   bool '  MVME162, 166 and 167 support' CONFIG_MVME16x
-   bool '  BVME4000 and BVME6000 support' CONFIG_BVME6000
-fi
-bool 'HP9000/300 support' CONFIG_HP300
-if [ "$CONFIG_HP300" = "y" ]; then
-   bool '  DIO bus support' CONFIG_DIO
-fi
-bool 'Sun3x support' CONFIG_SUN3X
-bool 'Sun3 support' CONFIG_SUN3
-  
-bool 'Q40/Q60 support' CONFIG_Q40
-
-comment 'Processor type'
-bool '68020 support' CONFIG_M68020
-bool '68030 support' CONFIG_M68030
-bool '68040 support' CONFIG_M68040
-bool '68060 support' CONFIG_M68060
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool 'Math emulation support (EXPERIMENTAL)' CONFIG_M68KFPU_EMU
-   if [ "$CONFIG_M68KFPU_EMU" = "y" ]; then
-      bool '  Math emulation extra precision' CONFIG_M68KFPU_EMU_EXTRAPREC
-      bool '  Math emulation only kernel' CONFIG_M68KFPU_EMU_ONLY
-   fi
-fi
-bool 'Advanced configuration options' CONFIG_ADVANCED
-if [ "$CONFIG_ADVANCED" = "y" ]; then
-   bool 'Use read-modify-write instructions' CONFIG_RMW_INSNS
-   if [ "$CONFIG_SUN3" = "y" ]; then
-      define_bool CONFIG_SINGLE_MEMORY_CHUNK n
-   else
-      bool 'Use one physical chunk of memory only' CONFIG_SINGLE_MEMORY_CHUNK
-   fi
-   if [ "$CONFIG_M68060" = "y" ]; then
-      bool 'Use write-through caching for 68060 supervisor accesses' CONFIG_060_WRITETHROUGH
-   fi
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   choice 'Kernel core (/proc/kcore) format' \
-	"ELF		CONFIG_KCORE_ELF	\
-	 A.OUT		CONFIG_KCORE_AOUT" ELF
-fi
-tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-if [ "$CONFIG_AMIGA" = "y" ]; then
-  bool 'Amiga Zorro (AutoConfig) bus support' CONFIG_ZORRO
-  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-     bool 'Amiga 1200/600 PCMCIA support (EXPERIMENTAL)' CONFIG_AMIGA_PCMCIA
-  fi
-fi
-if [ "$CONFIG_ATARI" = "y" ]; then
-   bool 'Support for ST-RAM as swap space' CONFIG_STRAM_SWAP
-   bool 'ST-RAM statistics in /proc' CONFIG_STRAM_PROC
-fi
-if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_ATARI" = "y" -o "$CONFIG_Q40" = "y" ]; then
-   bool 'Use power LED as a heartbeat' CONFIG_HEARTBEAT
-else
-  if [ "$CONFIG_HP300" = "y" ]; then
-     # We have a dedicated heartbeat LED. :-)
-     define_bool CONFIG_HEARTBEAT y
-  fi
-fi
-bool '/proc/hardware support' CONFIG_PROC_HARDWARE
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   tristate 'Parallel port support (EXPERIMENTAL)' CONFIG_PARPORT
-   if [ "$CONFIG_PARPORT" != "n" ]; then
-      if [ "$CONFIG_AMIGA" != "n" ]; then
-         dep_tristate '  Amiga builtin port' CONFIG_PARPORT_AMIGA $CONFIG_PARPORT
-	 if [ "$CONFIG_ZORRO" != "n" ]; then
-            dep_tristate '  Multiface III parallel port' CONFIG_PARPORT_MFC3 $CONFIG_PARPORT
-	 fi
-      fi
-      if [ "$CONFIG_Q40" != "n" ]; then
-	 if [ "$CONFIG_PARPORT" != "n" ]; then
-	    define_bool CONFIG_PARPORT_PC y
-	 fi
-      fi
-   fi
-   if [ "$CONFIG_ATARI" = "y" ]; then
-      dep_tristate '  Atari builtin port' CONFIG_PARPORT_ATARI $CONFIG_PARPORT
-   fi
-   dep_tristate '  Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
-   if [ "$CONFIG_PRINTER" != "n" ]; then
-      bool '    IEEE 1284 transfer modes' CONFIG_PARPORT_1284
-   fi
-fi
-
-if [ "$CONFIG_Q40" = "y" -o "$CONFIG_AMIGA_PCMCIA" = "y" \
-      -o "$CONFIG_GG2" = "y" ]; then
-   define_bool CONFIG_ISA y
-else
-   define_bool CONFIG_ISA n
-fi
-
-source drivers/pci/Config.in
-source drivers/zorro/Config.in
-
-if [ "$CONFIG_Q40" = "y" ]; then
-   source drivers/pnp/Config.in
-fi
-
-endmenu
-
-source drivers/mtd/Config.in
-
-source drivers/block/Config.in
-
-source drivers/md/Config.in
-
-if [ "$CONFIG_MAC" = "y" ]; then
-   source drivers/input/Config.in
-fi
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL device support'
-
-tristate 'ATA/ATAPI/MFM/RLL device support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI device support'
-
-tristate 'SCSI device support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-
-   comment 'SCSI support type (disk, tape, CD-ROM)'
-
-   dep_tristate '  SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
-   if [ "$CONFIG_BLK_DEV_SD" != "n" ]; then
-      int  'Maximum number of SCSI disks that can be loaded as modules' CONFIG_SD_EXTRA_DEVS 40
-   fi
-   dep_tristate '  SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
-   if [ "$CONFIG_CHR_DEV_ST" != "n" ]; then
-      int  'Maximum number of SCSI tapes that can be loaded as modules' CONFIG_ST_EXTRA_DEVS 2
-   fi
-   dep_tristate '  SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
-   if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-      bool '    Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
-      int  'Maximum number of CDROM devices that can be loaded as modules' CONFIG_SR_EXTRA_DEVS 2
-   fi
-   dep_tristate '  SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
-
-   comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
-
-   bool '  Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
-
-   bool '  Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
-   bool '  SCSI logging facility' CONFIG_SCSI_LOGGING
-
-   mainmenu_option next_comment
-   comment 'SCSI low-level drivers'
-
-   if [ "$CONFIG_AMIGA" = "y" ]; then
-      dep_tristate 'A3000 WD33C93A support' CONFIG_A3000_SCSI $CONFIG_SCSI
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	 bool 'A4000T SCSI support (EXPERIMENTAL)' CONFIG_A4000T_SCSI
-      fi
-   fi
-   if [ "$CONFIG_ZORRO" = "y" ]; then
-      dep_tristate 'A2091 WD33C93A support' CONFIG_A2091_SCSI $CONFIG_SCSI
-      dep_tristate 'GVP Series II WD33C93A support' CONFIG_GVP11_SCSI $CONFIG_SCSI
-      dep_tristate 'CyberStorm SCSI support' CONFIG_CYBERSTORM_SCSI $CONFIG_SCSI
-      dep_tristate 'CyberStorm Mk II SCSI support' CONFIG_CYBERSTORMII_SCSI $CONFIG_SCSI
-      dep_tristate 'Blizzard 2060 SCSI support' CONFIG_BLZ2060_SCSI $CONFIG_SCSI
-      dep_tristate 'Blizzard 1230IV/1260 SCSI support' CONFIG_BLZ1230_SCSI $CONFIG_SCSI
-      dep_tristate 'Fastlane SCSI support' CONFIG_FASTLANE_SCSI $CONFIG_SCSI
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	 bool 'A4091 SCSI support (EXPERIMENTAL)' CONFIG_A4091_SCSI
-	 bool 'WarpEngine SCSI support (EXPERIMENTAL)' CONFIG_WARPENGINE_SCSI
-	 bool 'Blizzard PowerUP 603e+ SCSI (EXPERIMENTAL)' CONFIG_BLZ603EPLUS_SCSI
-	 dep_tristate 'BSC Oktagon SCSI support (EXPERIMENTAL)' CONFIG_OKTAGON_SCSI $CONFIG_SCSI
-#	 bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI
-#	 bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI
-      fi
-   fi
-   if [ "$CONFIG_ATARI" = "y" ]; then
-      dep_tristate 'Atari native SCSI support' CONFIG_ATARI_SCSI $CONFIG_SCSI
-      if [ "$CONFIG_ATARI_SCSI" != "n" ]; then
-	 bool '  Long delays for Toshiba CD-ROMs' CONFIG_ATARI_SCSI_TOSHIBA_DELAY
-	 bool '  Reset SCSI-devices at boottime' CONFIG_ATARI_SCSI_RESET_BOOT
-	 if [ "$CONFIG_HADES" = "y" ]; then
-	    bool '  Hades SCSI DMA emulator' CONFIG_TT_DMA_EMUL
-	 fi
-      fi
-   fi
-   if [ "$CONFIG_MAC" = "y" ]; then
-      bool 'Macintosh NCR5380 SCSI' CONFIG_MAC_SCSI
-      dep_tristate 'Macintosh NCR53c9[46] SCSI' CONFIG_SCSI_MAC_ESP $CONFIG_SCSI
-   fi
-#   dep_tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG $CONFIG_SCSI
-
-   if [ "$CONFIG_VME" = "y" -a "$CONFIG_MVME147" = "y" ]; then
-      bool 'WD33C93 SCSI driver for MVME147' CONFIG_MVME147_SCSI
-   fi
-
-   if [ "$CONFIG_VME" = "y" -a "$CONFIG_MVME16x" = "y" ]; then
-      bool 'NCR53C710 SCSI driver for MVME16x' CONFIG_MVME16x_SCSI
-   fi
-
-   if [ "$CONFIG_VME" = "y" -a "$CONFIG_BVME6000" = "y" ]; then
-      bool 'NCR53C710 SCSI driver for BVME6000' CONFIG_BVME6000_SCSI
-   fi
-
-   if [ "$CONFIG_SUN3" = "y" ]; then
-	dep_tristate 'Sun3 NCR5380 SCSI' CONFIG_SUN3_SCSI $CONFIG_SCSI
-   fi
-
-   if [ "$CONFIG_SUN3X" = "y" ]; then
-      bool 'Sun3x ESP SCSI' CONFIG_SUN3X_ESP
-   fi
-
-   endmenu
-
-fi
-endmenu
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      #
-      # Network device configuration
-      #
-      tristate '  Dummy net driver support' CONFIG_DUMMY
-      tristate '  SLIP (serial line) support' CONFIG_SLIP
-      if [ "$CONFIG_SLIP" != "n" ]; then
-	 bool '    CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
-	 bool '    Keepalive and linefill' CONFIG_SLIP_SMART
-	 bool '    Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
-      fi
-      tristate 'PPP (point-to-point protocol) support' CONFIG_PPP
-      if [ ! "$CONFIG_PPP" = "n" ]; then
-         dep_bool '  PPP multilink support (EXPERIMENTAL)' CONFIG_PPP_MULTILINK $CONFIG_EXPERIMENTAL
-         dep_bool '  PPP filtering' CONFIG_PPP_FILTER $CONFIG_FILTER
-         dep_tristate '  PPP support for async serial ports' CONFIG_PPP_ASYNC $CONFIG_PPP
-         dep_tristate '  PPP support for sync tty ports' CONFIG_PPP_SYNC_TTY $CONFIG_PPP
-         dep_tristate '  PPP Deflate compression' CONFIG_PPP_DEFLATE $CONFIG_PPP
-         dep_tristate '  PPP BSD-Compress compression' CONFIG_PPP_BSDCOMP $CONFIG_PPP
-         if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-             dep_tristate '  PPP over Ethernet (EXPERIMENTAL)' CONFIG_PPPOE $CONFIG_PPP
-         fi
-      fi
-      tristate '  EQL (serial line load balancing) support' CONFIG_EQUALIZER
-      if [ "$CONFIG_ZORRO" = "y" ]; then
-	 tristate '  Ariadne support' CONFIG_ARIADNE
-	 tristate '  Ariadne II support' CONFIG_ARIADNE2
-	 tristate '  A2065 support' CONFIG_A2065
-	 tristate '  Hydra support' CONFIG_HYDRA
-      fi
-      if [ "$CONFIG_AMIGA_PCMCIA" = "y" ]; then
-	 tristate '  PCMCIA NE2000 support' CONFIG_APNE
-      fi
-      if [ "$CONFIG_APOLLO" = "y" ]; then
-	 tristate '  Apollo 3c505 support' CONFIG_APOLLO_ELPLUS
-      fi
-      if [ "$CONFIG_MAC" = "y" ]; then
-	 bool '  Macintosh NS 8390 based ethernet cards' CONFIG_MAC8390
-	 tristate '  Macintosh SONIC based ethernet (onboard, NuBus, LC, CS)' CONFIG_MACSONIC
-	 tristate '  Macintosh SMC 9194 based ethernet cards' CONFIG_SMC9194
-	 tristate '  Macintosh CS89x0 based ethernet cards' CONFIG_MAC89x0
-	 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-		bool '  Macintosh (AV) onboard MACE ethernet (EXPERIMENTAL)' CONFIG_MACMACE
-	 fi
-      fi
-      if [ "$CONFIG_VME" = "y" -a "$CONFIG_MVME147" = "y" ]; then
-	 tristate '  MVME147 (Lance) Ethernet support' CONFIG_MVME147_NET
-      fi
-      if [ "$CONFIG_VME" = "y" -a "$CONFIG_MVME16x" = "y" ]; then
-	 tristate '  MVME16x Ethernet support' CONFIG_MVME16x_NET
-      fi
-      if [ "$CONFIG_VME" = "y" -a "$CONFIG_BVME6000" = "y" ]; then
-	 tristate '  BVME6000 Ethernet support' CONFIG_BVME6000_NET
-      fi
-      if [ "$CONFIG_ATARI" = "y" ]; then
-	 tristate '  Atari Lance support' CONFIG_ATARILANCE
-	 if [ "$CONFIG_ATARI_ACSI" != "n" ]; then
-	    tristate '  BioNet-100 support' CONFIG_ATARI_BIONET
-	    tristate '  PAMsNet support' CONFIG_ATARI_PAMSNET
-	 fi
-      fi
-      if [ "$CONFIG_SUN3" = "y" -o "$CONFIG_SUN3X" = "y" ]; then
-	tristate '  Sun3/Sun3x on-board LANCE support' CONFIG_SUN3LANCE
-      fi
-      if [ "$CONFIG_SUN3" = "y" ]; then
-	tristate '  Sun3 on-board Intel 82586 support' CONFIG_SUN3_82586
-      fi
-      if [ "$CONFIG_HP300" = "y" ]; then
-	 bool '  HP on-board LANCE support' CONFIG_HPLANCE
-      fi
-      if [ "$CONFIG_Q40" = "y" ]; then
-         if [  "$CONFIG_PARPORT" != "n" ]; then
-	    dep_tristate '  PLIP (parallel port) support' CONFIG_PLIP $CONFIG_PARPORT
-	 fi
-         dep_tristate 'NE2000/NE1000 support' CONFIG_NE2000 m
-      fi
-   fi
-   endmenu
-
-fi
-
-mainmenu_option next_comment
-comment 'Character devices'
- 
-if [ "$CONFIG_Q40" = "y" ]; then
-   tristate 'Q40 Standard/generic serial support' CONFIG_SERIAL
-fi
-
-if [ "$CONFIG_SERIAL" = "y" ]; then
-   bool '  Extended dumb serial driver options' CONFIG_SERIAL_EXTENDED
-fi
-
-if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
-   bool '    Support more than 4 serial ports' CONFIG_SERIAL_MANY_PORTS
-   bool '    Support for sharing serial interrupts' CONFIG_SERIAL_SHARE_IRQ
-   bool '    Support special multiport boards' CONFIG_SERIAL_MULTIPORT
-   bool '    Support the Bell Technologies HUB6 card' CONFIG_HUB6
-fi
-
-bool 'Virtual terminal' CONFIG_VT
-if [ "$CONFIG_VT" = "y" ]; then
-   bool 'Support for console on virtual terminal' CONFIG_VT_CONSOLE
-fi
-
-if [ "$CONFIG_ATARI" = "y" ]; then
-   define_bool CONFIG_NVRAM y
-fi
-
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   tristate 'Amiga mouse support' CONFIG_AMIGAMOUSE
-   if [ "$CONFIG_AMIGAMOUSE" != "n" ]; then
-      define_bool CONFIG_BUSMOUSE y
-   fi
-fi
-if [ "$CONFIG_ATARI" = "y" -a "$CONFIG_VT" = "y" ]; then
-   tristate 'Atari mouse support' CONFIG_ATARIMOUSE
-   if [ "$CONFIG_ATARIMOUSE" != "n" ]; then
-      define_bool CONFIG_BUSMOUSE y
-   fi
-fi
-if [ "$CONFIG_ATARI" = "y" ]; then
-   tristate 'Atari MFP serial support' CONFIG_ATARI_MFPSER
-   tristate 'Atari SCC serial support' CONFIG_ATARI_SCC
-   if [ "$CONFIG_ATARI_SCC" = "y" -o "$CONFIG_ATARI_SCC" = "m" ]; then
-      bool '  Atari SCC serial DMA support' CONFIG_ATARI_SCC_DMA
-   fi
-   tristate 'Atari MIDI serial support' CONFIG_ATARI_MIDI
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'Atari DSP56k support (EXPERIMENTAL)' CONFIG_ATARI_DSP56K
-   fi
-fi
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   tristate 'Amiga builtin serial support' CONFIG_AMIGA_BUILTIN_SERIAL
-   if [ "$CONFIG_AMIGA_PCMCIA" = "y" ]; then
-      tristate 'Hisoft Whippet PCMCIA serial support' CONFIG_WHIPPET_SERIAL
-   fi
-   tristate 'Multiface Card III serial support' CONFIG_MULTIFACE_III_TTY
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
-   fi
-fi
-if [ "$CONFIG_PARPORT" = "n" ]; then
-   if [ "$CONFIG_ZORRO" = "y" ]; then
-      tristate 'GVP IO-Extender support' CONFIG_GVPIOEXT
-      dep_tristate '  GVP IO-Extender parallel printer support' CONFIG_GVPIOEXT_LP $CONFIG_GVPIOEXT
-      dep_tristate '  GVP IO-Extender PLIP support' CONFIG_GVPIOEXT_PLIP $CONFIG_GVPIOEXT
-   fi
-fi
-if [ "$CONFIG_MAC" = "y" ]; then
-   tristate 'Macintosh serial support' CONFIG_MAC_SCC
-   bool 'Apple Desktop Bus (ADB) support' CONFIG_ADB
-   if [ "$CONFIG_ADB" = "y" ]; then
-      bool '   Include Mac II ADB driver' CONFIG_ADB_MACII
-      bool '   Include Mac IIsi ADB driver' CONFIG_ADB_MACIISI
-      bool '   Include CUDA ADB driver' CONFIG_ADB_CUDA
-      bool '   Include IOP (IIfx/Quadra 9x0) ADB driver' CONFIG_ADB_IOP
-      bool '   Include PMU (Powerbook) ADB driver' CONFIG_ADB_PMU68K
-   fi
-   dep_bool '   Use input layer for ADB devices' CONFIG_INPUT_ADBHID $CONFIG_INPUT
-   if [ "$CONFIG_INPUT_ADBHID" = "y" ]; then
-      define_bool CONFIG_MAC_HID y
-      bool '     Support for ADB raw keycodes' CONFIG_MAC_ADBKEYCODES
-      bool '     Support for mouse button 2+3 emulation' CONFIG_MAC_EMUMOUSEBTN
-   else
-      bool '   Support for ADB keyboard (old driver)' CONFIG_ADB_KEYBOARD
-   fi
-fi
-if [ "$CONFIG_HP300" = "y" -a "$CONFIG_DIO" = "y" ]; then
-   tristate 'HP DCA serial support' CONFIG_HPDCA
-fi
-
-if [ "$CONFIG_SUN3" = "y" -o "$CONFIG_SUN3X" = "y" ]; then
-   bool 'Sun3/3x builtin serial support' CONFIG_SUN3X_ZS
-else
-   define_bool CONFIG_SUN3X_ZS n
-fi
-if [ "$CONFIG_SUN3X_ZS" = "y" ]; then
-   define_bool CONFIG_SUN_KEYBOARD y
-   define_bool CONFIG_SUN_MOUSE y
-   define_bool CONFIG_BUSMOUSE y
-   define_bool CONFIG_SBUS y
-   define_bool CONFIG_SBUSCHAR y
-   define_bool CONFIG_SUN_SERIAL y
-else
-   define_bool CONFIG_SUN_KEYBOARD n
-   define_bool CONFIG_SUN_MOUSE n
-   define_bool CONFIG_SBUS n
-fi
-if [ "$CONFIG_VME" = "y" ]; then
-   if [ "$CONFIG_MVME147" = "y" ]; then
-      bool 'SCC support for MVME147 serial ports' CONFIG_MVME147_SCC
-   fi
-   if [ "$CONFIG_MVME16x" = "y" ]; then
-      bool 'CD2401 support for MVME166/7 serial ports' CONFIG_SERIAL167
-      bool 'SCC support for MVME162 serial ports' CONFIG_MVME162_SCC
-   fi
-   if [ "$CONFIG_BVME6000" = "y" ]; then
-      bool 'SCC support for BVME6000 serial ports' CONFIG_BVME6000_SCC
-   fi
-fi
-if [ "$CONFIG_APOLLO" = "y" ]; then
-   bool 'Support for DN serial port (dummy)' CONFIG_DN_SERIAL
-   define_tristate CONFIG_SERIAL $CONFIG_DN_SERIAL
-fi 
-
-if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_ATARI" = "y" -o \
-     "$CONFIG_MAC" = "y" -o "$CONFIG_HP300" = "y" -o \
-     "$CONFIG_SUN3" = "y" -o "$CONFIG_SUN3X" = "y" -o \
-     "$CONFIG_VME" = "y" -o "$CONFIG_APOLLO" = "y" ]; then
-   if [ "$CONFIG_ATARI_MFPSER" = "y" -o "$CONFIG_ATARI_SCC" = "y" -o \
-        "$CONFIG_ATARI_MIDI" = "y" -o "$CONFIG_MAC_SCC" = "y" -o \
-        "$CONFIG_AMIGA_BUILTIN_SERIAL" = "y" -o \
-        "$CONFIG_GVPIOEXT" = "y" -o "$CONFIG_MULTIFACE_III_TTY" = "y" -o \
-        "$CONFIG_HPDCA" = "y" -o "$CONFIG_SUN3X_ZS" = "y" -o \
-        "$CONFIG_SERIAL" = "y" -o "$CONFIG_MVME147_SCC" = "y" -o \
-	"$CONFIG_SERIAL167" = "y" -o "$CONFIG_MVME162_SCC" = "y" -o \
-	"$CONFIG_BVME6000_SCC" = "y" -o "$CONFIG_DN_SERIAL" = "y" ]; then
-      bool 'Support for serial port console' CONFIG_SERIAL_CONSOLE
-   fi
-fi
-bool 'Support for user serial device modules' CONFIG_USERIAL
-bool 'Watchdog Timer Support'	CONFIG_WATCHDOG
-if [ "$CONFIG_WATCHDOG" != "n" ]; then
-   bool '  Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT
-   bool '  Software watchdog' CONFIG_SOFT_WATCHDOG
-fi
-if [ "$CONFIG_ATARI" = "y" ]; then
-   bool 'Enhanced Real Time Clock Support' CONFIG_RTC
-else
-   if [ "$CONFIG_SUN3" = "y" ]; then
-      define_bool CONFIG_GEN_RTC y
-   else
-      tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC
-   fi
-fi
-bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-   int '  Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'Sound support'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/oss/dmasound/Config.in
-fi
-endmenu
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   source drivers/video/Config.in
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Verbose BUG() reporting' CONFIG_DEBUG_BUGVERBOSE
-fi
-
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/mips/Config.help b/arch/mips/Config.help
--- a/arch/mips/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,878 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_ACER_PICA_61
-  This is a machine with a R4400 133/150 MHz CPU. To compile a Linux
-  kernel that runs on these, say Y here. For details about Linux on
-  the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
-  <http://oss.sgi.com/mips/>.
-
-CONFIG_ALGOR_P4032
-  This is an evaluation board of the British company Algorithmics.
-  The board uses the R4300 and a R5230 CPUs.  For more information
-  about this board see <http://www.algor.co.uk/>.
-
-CONFIG_BAGET_MIPS
-  This enables support for the Baget, a Russian embedded system.  For
-  more details about the Baget see the Linux/MIPS FAQ on
-  <http://oss.sgi.com/mips/>.
-
-CONFIG_DECSTATION
-  This enables support for DEC's MIPS based workstations.  For details
-  see the Linux/MIPS FAQ on <http://oss.sgi.com/mips/> and the
-  DECstation porting pages on <http://decstation.unix-ag.org/>.
-
-  If you have one of the following DECstation Models you definitely
-  want to choose R4xx0 for the CPU Type:
-
-	DECstation 5000/50
-	DECstation 5000/150
-	DECstation 5000/260
-	DECsystem 5900/260
-
-  otherwise choose R3000.
-
-CONFIG_MOMENCO_OCELOT
-  The Ocelot is a MIPS-based Single Board Computer (SBC) made by
-  Momentum Computer <http://www.momenco.com/>.
-
-CONFIG_DDB5074
-  This enables support for the VR5000-based NEC DDB Vrc-5074
-  evaluation board.
-
-CONFIG_DDB5476
-  This enables support for the R5432-based NEC DDB Vrc-5476
-  evaluation board.
-
-  Features : kernel debugging, serial terminal, NFS root fs, on-board
-  ether port (Need an additional patch at <http://linux.junsun.net/>),
-  USB, AC97, PCI, PCI VGA card & framebuffer console, IDE controller,
-  PS2 keyboard, PS2 mouse, etc.
-
-CONFIG_DDB5477
-  This enables support for the R5432-based NEC DDB Vrc-5477
-  evaluation board.
-
-  Features : kernel debugging, serial terminal, NFS root fs, on-board
-  ether port (Need an additional patch at <http://linux.junsun.net/>),
-  USB, AC97, PCI, etc.
-
-CONFIG_MIPS_ATLAS
-  This enables support for the QED R5231-based MIPS Atlas evaluation
-  board.
-
-CONFIG_MIPS_MALTA
-  This enables support for the VR5000-based MIPS Malta evaluation
-  board.
-
-CONFIG_MIPS_MAGNUM_4000
-  This is a machine with a R4000 100 MHz CPU. To compile a Linux
-  kernel that runs on these, say Y here. For details about Linux on
-  the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
-  <http://oss.sgi.com/mips/>.
-
-CONFIG_QTRONIX_KEYBOARD
-  Images of Qtronix keyboards are at
-  <http://www.qtronix.com/keyboard.html>.
-
-CONFIG_OLIVETTI_M700
-  This is a machine with a R4000 100 MHz CPU. To compile a Linux
-  kernel that runs on these, say Y here. For details about Linux on
-  the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
-  <http://oss.sgi.com/mips/>.
-
-CONFIG_SNI_RM200_PCI
-  The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens
-  Nixdorf Informationssysteme (SNI), parent company of Pyramid
-  Technology and now in turn merged with Fujitsu.  Say Y here to
-  support this machine type.
-
-CONFIG_SGI_IP22
-  This are the SGI Indy, Challenge S and Indigo2, as well as certain
-  OEM variants like the Tandem CMN B006S. To compile a Linux kernel
-  that runs on these, say Y here.
-
-CONFIG_MIPS_GT96100
-  Say Y here to support the Galileo Technology GT96100 communications
-  controller card.  There is a web page at <http://www.galileot.com/>.
-
-CONFIG_DZ
-  DZ11-family serial controllers for VAXstations, including the
-  DC7085, M7814, and M7819.
-
-CONFIG_TC
-  TurboChannel is a DEC (now Compaq) bus for Alpha and MIPS processors.
-  Documentation on writing device drivers for TurboChannel is available at:
-  <http://www.cs.arizona.edu/computer.help/policy/DIGITAL_unix/AA-PS3HD-TET1_html/TITLE.html>.
-
-CONFIG_ZS
-  Documentation on the Zilog 85C350 serial communications controller
-  is downloadable at <http://www.zilog.com/pdfs/serial/z85c30.pdf>.
-
-CONFIG_CPU_R3000
-  Please make sure to pick the right CPU type. Linux/MIPS is not
-  designed to be generic, i.e. Kernels compiled for R3000 CPUs will
-  *not* work on R4000 machines and vice versa.  However, since most
-  of the supported machines have an R4000 (or similar) CPU, R4x00
-  might be a safe bet.  If the resulting kernel does not work,
-  try to recompile with R3000.
-
-  R3000    MIPS Technologies R3000-series processors,
-           including the 3041, 3051, and 3081.
-
-  R6000    MIPS Technologies R6000-series processors,
-           including the 64474, 64475, 64574 and 64575.
-
-  R4300    MIPS Technologies R4300-series processors.
-
-  R4x00    MIPS Technologies R4000-series processors other than 4300,
-           including the 4640, 4650, and 4700.
-
-  R5000    MIPS Technologies R5000-series processors other than the
-           Nevada.
-
-  R52xx    MIPS Technologies R52xx-series ("Nevada") processors.
-
-  R10000   MIPS Technologies R10000-series processors.
-
-CONFIG_CPU_R6000
-  MIPS Technologies R6000-series processors, including the 64474,
-  64475, 64574 and 64575.
-
-CONFIG_CPU_R4300
-  MIPS Technologies R4300-series processors.
-
-CONFIG_CPU_R4X00
-  MIPS Technologies R4000-series processors other than 4300, including
-  the 4640, 4650, and 4700.
-
-CONFIG_CPU_R5000
-  MIPS Technologies R5000-series processors other than the Nevada.
-
-CONFIG_CPU_NEVADA
-  MIPS Technologies R52x0-series ("Nevada") processors.
-
-CONFIG_CPU_R10000
-  MIPS Technologies R10000-series processors.
-
-CONFIG_CPU_VR41XX
-  The options selects support for the NEC VR41xx series of processors.
-  Only choose this option if you have one of these processors as a
-  kernel built with this option will not run on any other type of
-  processor or vice versa.
-
-CONFIG_CPU_ADVANCED
-  Saying yes here allows you to select support for various features
-  your CPU may or may not have.  Most people should say N here.
-
-CONFIG_CPU_HAS_LLSC
-  MIPS R4000 series and later provide the Load Linked (ll)
-  and Store Conditional (sc) instructions. More information is
-  available at <http://www.go-ecs.com/mips/miptek1.htm>.
-
-  Say Y here if your CPU has the ll and sc instructions.  Say Y here
-  for better performance, N if you don't know.  You must say Y here
-  for multiprocessor machines.
-
-CONFIG_CPU_HAS_LLDSCD
-  Say Y here if your CPU has the lld and scd instructions, the 64-bit
-  equivalents of ll and sc.  Say Y here for better performance, N if
-  you don't know.  You must say Y here for multiprocessor machines.
-
-CONFIG_CPU_HAS_WB
-  Say N here for slightly better performance.  You must say Y here for
-  machines which require flushing of write buffers in software.  Saying
-  Y is the safe option; N may result in kernel malfunction and crashes.
-
-CONFIG_CPU_LITTLE_ENDIAN
-  Some MIPS machines can be configured for either little or big endian
-  byte order. These modes require different kernels. Say Y if your
-  machine is little endian, N if it's a big endian machine.
-
-CONFIG_SGI_NEWPORT_CONSOLE
-  Say Y here if you want the console on the Newport aka XL graphics
-  card of your Indy.  Most people say Y here.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_FB
-  The frame buffer device provides an abstraction for the graphics
-  hardware. It represents the frame buffer of some video hardware and
-  allows application software to access the graphics hardware through
-  a well-defined interface, so the software doesn't need to know
-  anything about the low-level (hardware register) stuff.
-
-  Frame buffer devices work identically across the different
-  architectures supported by Linux and make the implementation of
-  application programs easier and more portable; at this point, an X
-  server exists which uses the frame buffer device exclusively.
-  On several non-X86 architectures, the frame buffer device is the
-  only way to use the graphics hardware.
-
-  The device is accessed through special device nodes, usually located
-  in the /dev directory, i.e. /dev/fb*.
-
-  You need an utility program called fbset to make full use of frame
-  buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
-  and the Framebuffer-HOWTO at
-  <http://www.tahallah.demon.co.uk/programming/prog.html> for more
-  information.
-
-  Say Y here and to the driver for your graphics board below if you
-  are compiling a kernel for a non-x86 architecture.
-
-  If you are compiling for the x86 architecture, you can say Y if you
-  want to play with it, but it is not essential. Please note that
-  running graphical applications that directly touch the hardware
-  (e.g. an accelerated X server) and that are not frame buffer
-  device-aware may cause unexpected results. If unsure, say N.
-
-CONFIG_FONT_8x16
-  This is the "high resolution" font for the VGA frame buffer (the one
-  provided by the VGA text console 80x25 mode.
-
-  If unsure, say Y.
-
-CONFIG_MDA_CONSOLE
-  Say Y here if you have an old MDA or monochrome Hercules graphics
-  adapter in your system acting as a second head ( = video card). You
-  will then be able to use two monitors with your Linux system. Do not
-  say Y here if your MDA card is the primary card in your system; the
-  normal VGA driver will handle it.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called mdacon.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_MODULES
-  Kernel modules are small pieces of compiled code which can be
-  inserted in or removed from the running kernel, using the programs
-  insmod and rmmod. This is described in the file
-  <file:Documentation/modules.txt>, including the fact that you have
-  to say "make modules" in order to compile the modules that you chose
-  during kernel configuration.  Modules can be device drivers, file
-  systems, binary executable formats, and so on. If you think that you
-  may want to make use of modules with this kernel in the future, then
-  say Y here.  If unsure, say Y.
-
-CONFIG_MODVERSIONS
-  Usually, modules have to be recompiled whenever you switch to a new
-  kernel.  Saying Y here makes it possible, and safe, to use the
-  same modules even after compiling a new kernel; this requires the
-  program modprobe. All the software needed for module support is in
-  the modutils package (check the file <file:Documentation/Changes>
-  for location and latest version).  NOTE: if you say Y here but don't
-  have the program genksyms (which is also contained in the above
-  mentioned modutils package), then the building of your kernel will
-  fail.  If you are going to use modules that are generated from
-  non-kernel sources, you would benefit from this option.  Otherwise
-  it's not that important.  So, N ought to be a safe bet.
-
-CONFIG_KMOD
-  Normally when you have selected some drivers and/or file systems to
-  be created as loadable modules, you also have the responsibility to
-  load the corresponding modules (using the programs insmod or
-  modprobe) before you can use them. If you say Y here however, the
-  kernel will be able to load modules for itself: when a part of the
-  kernel needs a module, it runs modprobe with the appropriate
-  arguments, thereby loading the module if it is available. (This is a
-  replacement for kerneld.) Say Y here and read about configuring it
-  in <file:Documentation/kmod.txt>.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_VT
-  If you say Y here, you will get support for terminal devices with
-  display and keyboard devices. These are called "virtual" because you
-  can run several virtual terminals (also called virtual consoles) on
-  one physical terminal. This is rather useful, for example one
-  virtual terminal can collect system messages and warnings, another
-  one can be used for a text-mode user session, and a third could run
-  an X session, all in parallel. Switching between virtual terminals
-  is done with certain key combinations, usually Alt-<function key>.
-
-  The setterm command ("man setterm") can be used to change the
-  properties (such as colors or beeping) of a virtual terminal. The
-  man page console_codes(4) ("man console_codes") contains the special
-  character sequences that can be used to change those properties
-  directly. The fonts used on virtual terminals can be changed with
-  the setfont ("man setfont") command and the key bindings are defined
-  with the loadkeys ("man loadkeys") command.
-
-  You need at least one virtual terminal device in order to make use
-  of your keyboard and monitor. Therefore, only people configuring an
-  embedded system would want to say N here in order to save some
-  memory; the only way to log into such a system is then via a serial
-  or network connection.
-
-  If unsure, say Y, or else you won't be able to do much with your new
-  shiny Linux system :-)
-
-CONFIG_VT_CONSOLE
-  The system console is the device which receives all kernel messages
-  and warnings and which allows logins in single user mode. If you
-  answer Y here, a virtual terminal (the device used to interact with
-  a physical terminal) can be used as system console. This is the most
-  common mode of operations, so you should say Y here unless you want
-  the kernel messages be output only to a serial port (in which case
-  you should say Y to "Console on serial port", below).
-
-  If you do say Y here, by default the currently visible virtual
-  terminal (/dev/tty0) will be used as system console. You can change
-  that with a kernel command line option such as "console=tty3" which
-  would use the third virtual terminal as system console. (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.)
-
-  If unsure, say Y.
-
-CONFIG_SERIAL
-  This selects whether you want to include the driver for the standard
-  serial ports.  The standard answer is Y.  People who might say N
-  here are those that are setting up dedicated Ethernet WWW/FTP
-  servers, or users that have one of the various bus mice instead of a
-  serial mouse and don't intend to use their machine's standard serial
-  port for anything.  (Note that the Cyclades and Stallion multi
-  serial port drivers do not need this driver built in for them to
-  work.)
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  serial.o.
-  [WARNING: Do not compile this driver as a module if you are using
-  non-standard serial ports, since the configuration information will
-  be lost when the driver is unloaded.  This limitation may be lifted
-  in the future.]
-
-  BTW1: If you have a mouseman serial mouse which is not recognized by
-  the X window system, try running gpm first.
-
-  BTW2: If you intend to use a software modem (also called Winmodem)
-  under Linux, forget it.  These modems are crippled and require
-  proprietary drivers which are only available under Windows.
-
-  Most people will say Y or M here, so that they can use serial mice,
-  modems and similar devices connecting to the standard serial ports.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_MOUSE
-  This is for machines with a mouse which is neither a serial nor a
-  bus mouse. Examples are PS/2 mice (such as the track balls on some
-  laptops) and some digitizer pads. Most people have a regular serial
-  MouseSystem or Microsoft mouse (made by Logitech) that plugs into a
-  COM port (rectangular with 9 or 25 pins). These people say N here.
-  If you have something else, read the Busmouse-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. This HOWTO contains
-  information about all non-serial mice, not just bus mice.
-
-  If you have a laptop, you either have to check the documentation or
-  experiment a bit to find out whether the trackball is a serial mouse
-  or not; it's best to say Y here for you.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about non-serial mice. If unsure, say Y.
-
-CONFIG_PSMOUSE
-  The PS/2 mouse connects to a special mouse port that looks much like
-  the keyboard port (small circular connector with 6 pins). This way,
-  the mouse does not use any serial ports. This port can also be used
-  for other input devices like light pens, tablets, keypads. Compaq,
-  AST and IBM all use this as their mouse port on currently shipping
-  machines. The trackballs of some laptops are PS/2 mice also. In
-  particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse.
-
-  Although PS/2 mice are not technically bus mice, they are explained
-  in detail in the Busmouse-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  When using a PS/2 mouse, you can get problems if you want to use the
-  mouse both on the Linux console and under X. Using the "-R" option
-  of the Linux mouse managing program gpm (available from
-  <ftp://gnu.systemy.it/pub/gpm/>) solves this problem, or you can get
-  the "mconv2" utility from <ftp://ibiblio.org/pub/Linux/system/mouse/>.
-
-CONFIG_RTC
-  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
-  into your computer.
-
-  Every PC has such a clock built in. It can be used to generate
-  signals from as low as 1Hz up to 8192Hz, and can also be used
-  as a 24 hour alarm. It reports status information via the file
-  /proc/driver/rtc and its behaviour is set by various ioctls on
-  /dev/rtc.
-
-  If you run Linux on a multiprocessor machine and said Y to
-  "Symmetric Multi Processing" above, you should say Y here to read
-  and set the RTC in an SMP compatible fashion.
-
-  If you think you have a use for such a device (such as periodic data
-  sampling), then say Y here, and read <file:Documentation/rtc.txt>
-  for details.
-
-  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 is called rtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_CROSSCOMPILE
-  Say Y here if you are compiling the kernel on a different
-  architecture than the one it is intended to run on.
-
-CONFIG_MIPS_EV64120
-  This is an evaluation board based on the Galileo GT-64120
-  single-chip system controller that contains a MIPS R5000 compatible
-  core running at 75/100MHz.  Their website is located at
-  <http://www.galileot.com/>.  Say Y here if you wish to build a
-  kernel for this platform.
-
-CONFIG_MIPS_EV96100
-  This is an evaluation board based on the Galielo GT-96100 LAN/WAN
-  communications controllers containing a MIPS R5000 compatible core
-  running at 83MHz. Their website is <http://www.galileot.com/>. Say Y
-  here if you wish to build a kernel for this platform.
-
-CONFIG_MIPS_ITE8172
-  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
-  ITE8172G companion internet appliance chip. The MIPS core can be
-  either a NEC Vr5432 or QED RM5231. Say Y here if you wish to build
-  a kernel for this platform.
-
-CONFIG_MIPS_IVR
-  This is an evaluation board built by Globespan to showcase thir
-  iVR (Internet Video Recorder) design. It utilizes a QED RM5231
-  R5000 MIPS core. More information can be found out their website
-  located at <http://www.globespan.net/products/product4.html>P. Say Y
-  here if you wish to build a kernel for this platform.
-
-CONFIG_MIPS_PB1000
-  This is an evaluation board built by Alchemy Semiconducttor to
-  showcase their Au1000 Internet Edge Processor. It is SOC design
-  containing a MIPS32 core running at 266/400/500MHz with many
-  integrated peripherals. Further information can be found at their
-  website, <http://www.alchemysemi.com/>. Say Y here if you wish to
-  build a kernel for this platform.
-
-CONFIG_NINO
-  Say Y here to select a kernel for the Philips Nino Palm PC. The
-  website at <http://www.realitydiluted.com/projects/nino/index.html>
-  will have more information.
-
-CONFIG_NINO_16MB
-  Say Y here to build a kernel specifically for Nino 500/501 color
-  Palm PCs from Philips (INCOMPLETE).
-
-CONFIG_NINO_8MB
-  Say Y here to build a kernel specifically for Nino Palm PCs with
-  8MB of memory. These include models 200/210/312/320/325/350/390.
-
-CONFIG_NINO_4MB
-  Say Y here to build a kernel specifically for Nino Palm PCs with
-  4MB of memory. These include models 300/301/302/319.
-
-CONFIG_LL_DEBUG
-  Enable low-level debugging assertion macros in the kernel code.
-  Currently used only by the time services code in the MIPS port.
-  Don't turn this on unless you know what you are doing.
-
-CONFIG_REMOTE_DEBUG
-  If you say Y here, it will be possible to remotely debug the MIPS
-  kernel using gdb. This enlarges your kernel image disk size by
-  several megabytes and requires a machine with more than 16 MB,
-  better 32 MB RAM to avoid excessive linking time. This is only
-  useful for kernel hackers. If unsure, say N.
-
-CONFIG_MIPS_UNCACHED
-  If you say Y here there kernel will disable all CPU caches.  This will
-  reduce the system's performance dramatically but can help finding
-  otherwise hard to track bugs.  It can also useful if you're doing
-  hardware debugging with a logic analyzer and need to see all traffic
-  on the bus.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_GDB_CONSOLE
-  If you are using GDB for remote debugging over a serial port and
-  would like kernel messages to be formatted into GDB $O packets so
-  that GDB prints them as program output, say 'Y'.
-
diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/mips/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,1340 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config MIPS
+	bool
+	default y
+
+config SMP
+	bool
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+
+mainmenu "Linux Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Machine selection"
+
+config ACER_PICA_61
+	bool "Support for Acer PICA 1 chipset (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This is a machine with a R4400 133/150 MHz CPU. To compile a Linux
+	  kernel that runs on these, say Y here. For details about Linux on
+	  the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
+	  <http://oss.sgi.com/mips/>.
+
+config ALGOR_P4032
+	bool "Support for Algorithmics P4032 (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This is an evaluation board of the British company Algorithmics.
+	  The board uses the R4300 and a R5230 CPUs.  For more information
+	  about this board see <http://www.algor.co.uk/>.
+
+config BAGET_MIPS
+	bool "Support for BAGET MIPS series (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This enables support for the Baget, a Russian embedded system.  For
+	  more details about the Baget see the Linux/MIPS FAQ on
+	  <http://oss.sgi.com/mips/>.
+
+config DECSTATION
+	bool "Support for DECstations (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  This enables support for DEC's MIPS based workstations.  For details
+	  see the Linux/MIPS FAQ on <http://oss.sgi.com/mips/> and the
+	  DECstation porting pages on <http://decstation.unix-ag.org/>.
+
+	  If you have one of the following DECstation Models you definitely
+	  want to choose R4xx0 for the CPU Type:
+
+	  	DECstation 5000/50
+	  	DECstation 5000/150
+	  	DECstation 5000/260
+	  	DECsystem 5900/260
+
+	  otherwise choose R3000.
+
+config DDB5074
+	bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This enables support for the VR5000-based NEC DDB Vrc-5074
+	  evaluation board.
+
+config MIPS_EV96100
+	bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This is an evaluation board based on the Galielo GT-96100 LAN/WAN
+	  communications controllers containing a MIPS R5000 compatible core
+	  running at 83MHz. Their website is <http://www.galileot.com/>. Say Y
+	  here if you wish to build a kernel for this platform.
+
+config MIPS_EV64120
+	bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This is an evaluation board based on the Galileo GT-64120
+	  single-chip system controller that contains a MIPS R5000 compatible
+	  core running at 75/100MHz.  Their website is located at
+	  <http://www.galileot.com/>.  Say Y here if you wish to build a
+	  kernel for this platform.
+
+config EVB_PCI1
+	bool "Enable Second PCI (PCI1)"
+	depends on MIPS_EV64120
+
+choice
+	prompt "Galileo Chip Clock"
+	depends on MIPS_EV64120
+
+config SYSCLK_75
+	bool "75"
+
+config SYSCLK_83
+	bool "83.3"
+
+config SYSCLK_100_1
+	bool "100"
+
+endchoice
+
+config MIPS_ATLAS
+	bool "Support for MIPS Atlas board (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This enables support for the QED R5231-based MIPS Atlas evaluation
+	  board.
+
+config MIPS_MALTA
+	bool "Support for MIPS Malta board (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This enables support for the VR5000-based MIPS Malta evaluation
+	  board.
+
+config NINO
+	bool "Support for Philips Nino (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  Say Y here to select a kernel for the Philips Nino Palm PC. The
+	  website at <http://www.realitydiluted.com/projects/nino/index.html>
+	  will have more information.
+
+choice
+	prompt "Nino Model Number"
+	depends on NINO
+
+config NINO_4MB
+	bool "Model-300/301/302/319"
+	help
+	  Say Y here to build a kernel specifically for Nino Palm PCs with
+	  4MB of memory. These include models 300/301/302/319.
+
+config NINO_8MB
+	bool "Model-200/210/312/320/325/350/390"
+	help
+	  Say Y here to build a kernel specifically for Nino Palm PCs with
+	  8MB of memory. These include models 200/210/312/320/325/350/390.
+
+config NINO_16MB
+	bool "Model-500/510"
+	help
+	  Say Y here to build a kernel specifically for Nino 500/501 color
+	  Palm PCs from Philips (INCOMPLETE).
+
+endchoice
+
+config MIPS_MAGNUM_4000
+	bool "Support for Mips Magnum 4000"
+	help
+	  This is a machine with a R4000 100 MHz CPU. To compile a Linux
+	  kernel that runs on these, say Y here. For details about Linux on
+	  the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
+	  <http://oss.sgi.com/mips/>.
+
+config MOMENCO_OCELOT
+	bool "Support for Momentum Ocelot board"
+	help
+	  The Ocelot is a MIPS-based Single Board Computer (SBC) made by
+	  Momentum Computer <http://www.momenco.com/>.
+
+config DDB5476
+	bool "Support for NEC DDB Vrc-5476"
+	help
+	  This enables support for the R5432-based NEC DDB Vrc-5476
+	  evaluation board.
+
+	  Features : kernel debugging, serial terminal, NFS root fs, on-board
+	  ether port (Need an additional patch at <http://linux.junsun.net/>),
+	  USB, AC97, PCI, PCI VGA card & framebuffer console, IDE controller,
+	  PS2 keyboard, PS2 mouse, etc.
+
+config DDB5477
+	bool "Support for NEC DDB Vrc-5477"
+	help
+	  This enables support for the R5432-based NEC DDB Vrc-5477
+	  evaluation board.
+
+	  Features : kernel debugging, serial terminal, NFS root fs, on-board
+	  ether port (Need an additional patch at <http://linux.junsun.net/>),
+	  USB, AC97, PCI, etc.
+
+config OLIVETTI_M700
+	bool "Support for Olivetti M700-10"
+	help
+	  This is a machine with a R4000 100 MHz CPU. To compile a Linux
+	  kernel that runs on these, say Y here. For details about Linux on
+	  the MIPS architecture, check out the Linux/MIPS FAQ on the WWW at
+	  <http://oss.sgi.com/mips/>.
+
+config SGI_IP22
+	bool "Support for SGI IP22"
+	help
+	  This are the SGI Indy, Challenge S and Indigo2, as well as certain
+	  OEM variants like the Tandem CMN B006S. To compile a Linux kernel
+	  that runs on these, say Y here.
+
+config SNI_RM200_PCI
+	bool "Support for SNI RM200 PCI"
+	help
+	  The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens
+	  Nixdorf Informationssysteme (SNI), parent company of Pyramid
+	  Technology and now in turn merged with Fujitsu.  Say Y here to
+	  support this machine type.
+
+config MIPS_ITE8172
+	bool "Support for ITE 8172G board"
+	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
+	  ITE8172G companion internet appliance chip. The MIPS core can be
+	  either a NEC Vr5432 or QED RM5231. Say Y here if you wish to build
+	  a kernel for this platform.
+
+config IT8172_REVC
+	bool "Support for older IT8172 (Rev C)"
+	depends on MIPS_ITE8172
+	help
+	  Say Y here to support the older, Revision C version of the Integrated
+	  Technology Express, Inc. ITE8172 SBC.  Vendor page at
+	  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
+	  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
+
+config QTRONIX_KEYBOARD
+	bool "Enable Qtronix 990P Keyboard Support"
+	depends on MIPS_IVR || MIPS_ITE8172
+	help
+	  Images of Qtronix keyboards are at
+	  <http://www.qtronix.com/keyboard.html>.
+
+config IT8172_CIR
+	bool
+	depends on QTRONIX_KEYBOARD && (MIPS_IVR || MIPS_ITE8172)
+	default y
+
+config PC_KEYB
+	bool "Enable PS2 Keyboard Support" if MIPS_ITE8172 && !QTRONIX_KEYBOARD
+	default y if NINO || MIPS_ITE8172 || DDB5476 || DDB5074 || SNI_RM200_PCI || SGI_IP22 || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
+
+config IT8172_SCR0
+	bool "Enable Smart Card Reader 0 Support "
+	depends on MIPS_IVR || MIPS_ITE8172
+	help
+	  Say Y here to support smart-card reader 0 (SCR0) on the Integrated
+	  Technology Express, Inc. ITE8172 SBC.  Vendor page at
+	  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
+	  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
+
+config IT8172_SCR1
+	bool "Enable Smart Card Reader 1 Support "
+	depends on MIPS_ITE8172
+	help
+	  Say Y here to support smart-card reader 1 (SCR1) on the Integrated
+	  Technology Express, Inc. ITE8172 SBC.  Vendor page at
+	  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
+	  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
+
+config MIPS_IVR
+	bool "Support for Globespan IVR board"
+	help
+	  This is an evaluation board built by Globespan to showcase thir
+	  iVR (Internet Video Recorder) design. It utilizes a QED RM5231
+	  R5000 MIPS core. More information can be found out their website
+	  located at <http://www.globespan.net/products/product4.html>P. Say Y
+	  here if you wish to build a kernel for this platform.
+
+config MIPS_PB1000
+	bool "Support for Alchemy Semi PB1000 board"
+	help
+	  This is an evaluation board built by Alchemy Semiconducttor to
+	  showcase their Au1000 Internet Edge Processor. It is SOC design
+	  containing a MIPS32 core running at 266/400/500MHz with many
+	  integrated peripherals. Further information can be found at their
+	  website, <http://www.alchemysemi.com/>. Say Y here if you wish to
+	  build a kernel for this platform.
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+#
+# Select some configuration options automatically for certain systems.
+#
+config ISA
+	bool
+	depends on DDB5476 || DDB5074 || SNI_RM200_PCI || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
+	default y
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	depends on ISA
+	default y
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config PCI
+	bool
+	depends on MIPS_IVR || MIPS_ITE8172 || DDB5477 || DDB5476 || DDB5074 || SNI_RM200_PCI || MOMENCO_OCELOT || MIPS_MALTA || MIPS_ATLAS || ALGOR_P4032 || MIPS_EV64120 || MIPS_EV96100
+	default y
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config SBUS
+	bool
+
+config I8259
+	bool
+	depends on DDB5074 || SNI_RM200_PCI || MIPS_MALTA || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
+	default y
+
+config MIPS_GT96100
+	bool
+	depends on MIPS_EV96100
+	default y
+	help
+	  Say Y here to support the Galileo Technology GT96100 communications
+	  controller card.  There is a web page at <http://www.galileot.com/>.
+
+config SWAP_IO_SPACE
+	bool
+	depends on MOMENCO_OCELOT || MIPS_MALTA || MIPS_ATLAS || MIPS_EV96100
+	default y
+
+config NEW_PCI
+	bool
+	depends on MIPS_ITE8172 || MIPS_EV96100
+	default y
+
+config PCI_AUTO
+	bool
+	depends on MIPS_ITE8172 || MIPS_EV96100
+	default y
+
+config MIPS_GT64120
+	bool
+	depends on MIPS_EV64120
+	default y
+
+config OLD_TIME_C
+	bool
+	depends on DDB5074 || SNI_RM200_PCI || SGI_IP22 || MOMENCO_OCELOT || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || ALGOR_P4032 || MIPS_EV64120
+	default y
+
+config ARC32
+	bool
+	depends on SNI_RM200_PCI || SGI_IP22 || ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
+	default y
+
+config FB
+	bool
+	depends on MIPS_MAGNUM_4000 || OLIVETTI_M700
+	default y
+	---help---
+	  The frame buffer device provides an abstraction for the graphics
+	  hardware. It represents the frame buffer of some video hardware and
+	  allows application software to access the graphics hardware through
+	  a well-defined interface, so the software doesn't need to know
+	  anything about the low-level (hardware register) stuff.
+
+	  Frame buffer devices work identically across the different
+	  architectures supported by Linux and make the implementation of
+	  application programs easier and more portable; at this point, an X
+	  server exists which uses the frame buffer device exclusively.
+	  On several non-X86 architectures, the frame buffer device is the
+	  only way to use the graphics hardware.
+
+	  The device is accessed through special device nodes, usually located
+	  in the /dev directory, i.e. /dev/fb*.
+
+	  You need an utility program called fbset to make full use of frame
+	  buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
+	  and the Framebuffer-HOWTO at
+	  <http://www.tahallah.demon.co.uk/programming/prog.html> for more
+	  information.
+
+	  Say Y here and to the driver for your graphics board below if you
+	  are compiling a kernel for a non-x86 architecture.
+
+	  If you are compiling for the x86 architecture, you can say Y if you
+	  want to play with it, but it is not essential. Please note that
+	  running graphical applications that directly touch the hardware
+	  (e.g. an accelerated X server) and that are not frame buffer
+	  device-aware may cause unexpected results. If unsure, say N.
+
+config FB_G364
+	bool
+	depends on MIPS_MAGNUM_4000 || OLIVETTI_M700
+	default y
+
+config MIPS_JAZZ
+	bool
+	depends on ACER_PICA_61 || MIPS_MAGNUM_4000 || OLIVETTI_M700
+	default y
+
+config ROTTEN_IRQ
+	bool
+	depends on DDB5476 || DDB5074 || SNI_RM200_PCI || ACER_PICA_61
+	default y
+
+config HAVE_STD_PC_SERIAL_PORT
+	bool
+	depends on DDB5476 || DDB5074 || MIPS_MALTA
+	default y
+
+config NEW_IRQ
+	bool
+	depends on MIPS_PB1000 || DDB5477 || SGI_IP22 || MOMENCO_OCELOT || MIPS_MALTA
+	default y
+
+config SYSCLK_100_2
+	bool
+	depends on MOMENCO_OCELOT
+	default y
+
+config BOARD_SCACHE
+	bool
+	depends on SGI_IP22
+	default y
+
+config SGI
+	bool
+	depends on SGI_IP22
+	default y
+
+config NEW_TIME_C
+	bool
+	depends on DDB5477 || DDB5476
+	default y
+
+config CPU_LITTLE_ENDIAN
+	bool
+	depends on DDB5477
+	default y
+	help
+	  Some MIPS machines can be configured for either little or big endian
+	  byte order. These modes require different kernels. Say Y if your
+	  machine is little endian, N if it's a big endian machine.
+
+config IT8712
+	bool
+	depends on MIPS_ITE8172
+	default y
+
+config MIPS_AU1000
+	bool
+	depends on MIPS_PB1000
+	default y
+
+config SYSCLK_100
+	bool
+	depends on SYSCLK_100_1 || SYSCLK_100_2
+	default y
+
+endmenu
+
+
+menu "CPU selection"
+
+choice
+	prompt "CPU type"
+	default CPU_R4X00
+
+config CPU_R3000
+	bool "R3000"
+	---help---
+	  Please make sure to pick the right CPU type. Linux/MIPS is not
+	  designed to be generic, i.e. Kernels compiled for R3000 CPUs will
+	  *not* work on R4000 machines and vice versa.  However, since most
+	  of the supported machines have an R4000 (or similar) CPU, R4x00
+	  might be a safe bet.  If the resulting kernel does not work,
+	  try to recompile with R3000.
+
+	  R3000    MIPS Technologies R3000-series processors,
+	  including the 3041, 3051, and 3081.
+
+	  R6000    MIPS Technologies R6000-series processors,
+	  including the 64474, 64475, 64574 and 64575.
+
+	  R4300    MIPS Technologies R4300-series processors.
+
+	  R4x00    MIPS Technologies R4000-series processors other than 4300,
+	  including the 4640, 4650, and 4700.
+
+	  R5000    MIPS Technologies R5000-series processors other than the
+	  Nevada.
+
+	  R52xx    MIPS Technologies R52xx-series ("Nevada") processors.
+
+	  R10000   MIPS Technologies R10000-series processors.
+
+config CPU_R6000
+	bool "R6000"
+	help
+	  MIPS Technologies R6000-series processors, including the 64474,
+	  64475, 64574 and 64575.
+
+config CPU_VR41XX
+	bool "R41xx"
+	help
+	  The options selects support for the NEC VR41xx series of processors.
+	  Only choose this option if you have one of these processors as a
+	  kernel built with this option will not run on any other type of
+	  processor or vice versa.
+
+config CPU_R4300
+	bool "R4300"
+	help
+	  MIPS Technologies R4300-series processors.
+
+config CPU_R4X00
+	bool "R4x00"
+	help
+	  MIPS Technologies R4000-series processors other than 4300, including
+	  the 4640, 4650, and 4700.
+
+config CPU_R5000
+	bool "R5000"
+	help
+	  MIPS Technologies R5000-series processors other than the Nevada.
+
+config CPU_R5432
+	bool "R5432"
+
+config CPU_RM7000
+	bool "RM7000"
+
+config CPU_NEVADA
+	bool "R52xx"
+	help
+	  MIPS Technologies R52x0-series ("Nevada") processors.
+
+config CPU_R10000
+	bool "R10000"
+	help
+	  MIPS Technologies R10000-series processors.
+
+config CPU_SB1
+	bool "SB1"
+
+config CPU_MIPS32
+	bool "MIPS32"
+
+config CPU_MIPS64
+	bool "MIPS64"
+
+endchoice
+
+config CPU_ADVANCED
+	bool "Override CPU Options"
+	help
+	  Saying yes here allows you to select support for various features
+	  your CPU may or may not have.  Most people should say N here.
+
+config CPU_HAS_LLSC
+	bool "ll/sc Instructions available" if CPU_ADVANCED
+	default y if !CPU_ADVANCED && !CPU_R3000 && !CPU_VR41XX
+	help
+	  MIPS R4000 series and later provide the Load Linked (ll)
+	  and Store Conditional (sc) instructions. More information is
+	  available at <http://www.go-ecs.com/mips/miptek1.htm>.
+
+	  Say Y here if your CPU has the ll and sc instructions.  Say Y here
+	  for better performance, N if you don't know.  You must say Y here
+	  for multiprocessor machines.
+
+config CPU_HAS_LLDSCD
+	bool "lld/scd Instructions available" if CPU_ADVANCED
+	default y if !CPU_ADVANCED && !CPU_R3000 && !CPU_VR41XX && !CPU_MIPS32
+	help
+	  Say Y here if your CPU has the lld and scd instructions, the 64-bit
+	  equivalents of ll and sc.  Say Y here for better performance, N if
+	  you don't know.  You must say Y here for multiprocessor machines.
+
+config CPU_HAS_WB
+	bool "Writeback Buffer available" if CPU_ADVANCED
+	default y if !CPU_ADVANCED && (CPU_R3000 || CPU_VR41XX) && CONFIG_DECSTATION=y
+	help
+	  Say N here for slightly better performance.  You must say Y here for
+	  machines which require flushing of write buffers in software.  Saying
+	  Y is the safe option; N may result in kernel malfunction and crashes.
+
+endmenu
+
+
+menu "General setup"
+
+config CPU_LITTLE_ENDIAN
+	bool "Generate little endian code" if !DECSTATION && !DDB5074 && !DDB5476 && !NINO
+	default y if DECSTATION || DDB5074 || DDB5476 || NINO
+
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config ELF_KERNEL
+	bool
+	default y
+
+config BINFMT_IRIX
+	bool "Include IRIX binary compatibility"
+	depends on !CPU_LITTLE_ENDIAN
+
+config FORWARD_KEYBOARD
+	bool "Include forward keyboard"
+	depends on !CPU_LITTLE_ENDIAN
+
+config ARC_CONSOLE
+	bool "ARC console support"
+	depends on ARC32
+
+config BINFMT_AOUT
+	bool
+	---help---
+	  A.out (Assembler.OUTput) is a set of formats for libraries and
+	  executables used in the earliest versions of UNIX. Linux used the
+	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
+	  ELF format.
+
+	  As more and more programs are converted to ELF, the use for a.out
+	  will gradually diminish. If you disable this option it will reduce
+	  your kernel by one page. This is not much and by itself does not
+	  warrant removing support. However its removal is a good idea if you
+	  wish to ensure that absolutely none of your programs will use this
+	  older executable format. If you don't know what to answer at this
+	  point then answer Y. If someone told you "You need a kernel with
+	  QMAGIC support" then you'll have to say Y here. You may answer M to
+	  compile a.out support as a module and later load the module when you
+	  want to use a program or library in a.out format. The module will be
+	  called binfmt_aout.o. Saying M or N here is dangerous though,
+	  because some crucial programs on your system might still be in A.OUT
+	  format.
+
+config BINFMT_ELF
+	bool
+	default y
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+config TC
+	bool "TURBOchannel support"
+	depends on DECSTATION
+	help
+	  TurboChannel is a DEC (now Compaq) bus for Alpha and MIPS processors.
+	  Documentation on writing device drivers for TurboChannel is available at:
+	  <http://www.cs.arizona.edu/computer.help/policy/DIGITAL_unix/AA-PS3HD-TET1_html/TITLE.html>.
+
+#    if [ "$CONFIG_TC" = "y" ]; then
+#	bool ' Access.Bus support' CONFIG_ACCESSBUS
+#    fi
+endmenu
+
+
+if ISA
+source "drivers/pnp/Kconfig"
+endif
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+	depends on !SGI_IP22 && !DECSTATION
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+
+if !DECSTATION" && !SGI_IP22
+source "drivers/message/i2o/Kconfig"
+endif
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+source "drivers/media/Kconfig"
+
+
+menu "DECStation Character devices"
+	depends on DECSTATION
+
+config VT
+	bool "Virtual terminal"
+
+config VT_CONSOLE
+	bool "Support for console on virtual terminal"
+	depends on VT
+
+config SERIAL
+	tristate "Standard/generic (dumb) serial support"
+	---help---
+	  This selects whether you want to include the driver for the standard
+	  serial ports.  The standard answer is Y.  People who might say N
+	  here are those that are setting up dedicated Ethernet WWW/FTP
+	  servers, or users that have one of the various bus mice instead of a
+	  serial mouse and don't intend to use their machine's standard serial
+	  port for anything.  (Note that the Cyclades and Stallion multi
+	  serial port drivers do not need this driver built in for them to
+	  work.)
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  serial.o.
+	  [WARNING: Do not compile this driver as a module if you are using
+	  non-standard serial ports, since the configuration information will
+	  be lost when the driver is unloaded.  This limitation may be lifted
+	  in the future.]
+
+	  BTW1: If you have a mouseman serial mouse which is not recognized by
+	  the X window system, try running gpm first.
+
+	  BTW2: If you intend to use a software modem (also called Winmodem)
+	  under Linux, forget it.  These modems are crippled and require
+	  proprietary drivers which are only available under Windows.
+
+	  Most people will say Y or M here, so that they can use serial mice,
+	  modems and similar devices connecting to the standard serial ports.
+
+config DZ
+	bool "DZ11 Serial Support"
+	depends on SERIAL=y
+	help
+	  DZ11-family serial controllers for VAXstations, including the
+	  DC7085, M7814, and M7819.
+
+config ZS
+	bool "Z85C30 Serial Support"
+	depends on SERIAL=y && TC
+	help
+	  Documentation on the Zilog 85C350 serial communications controller
+	  is downloadable at <http://www.zilog.com/pdfs/serial/z85c30.pdf>.
+
+config SERIAL_CONSOLE
+	bool "Support for console on serial port"
+	depends on SERIAL=y
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+
+#   if [ "$CONFIG_ACCESSBUS" = "y" ]; then
+#      bool 'MAXINE Access.Bus mouse (VSXXX-BB/GB) support' CONFIG_DTOP_MOUSE
+#   fi
+config RTC
+	tristate "Enhanced Real Time Clock Support"
+
+endmenu
+
+
+menu "SGI Character devices"
+	depends on SGI_IP22
+
+config VT
+	bool "Virtual terminal"
+
+config VT_CONSOLE
+	bool "Support for console on virtual terminal"
+	depends on VT
+
+config SGI_NEWPORT_CONSOLE
+	tristate "SGI Newport Console support"
+	depends on VT
+	help
+	  Say Y here if you want the console on the Newport aka XL graphics
+	  card of your Indy.  Most people say Y here.
+
+config DUMMY_CONSOLE
+	bool
+	depends on VT && SGI_NEWPORT_CONSOLE!=y
+	default y
+
+config FONT_8x16
+	bool
+	depends on VT && SGI_NEWPORT_CONSOLE=y
+	default y
+	help
+	  This is the "high resolution" font for the VGA frame buffer (the one
+	  provided by the VGA text console 80x25 mode.
+
+	  If unsure, say Y.
+
+config PSMOUSE
+	bool "PS/2 mouse support (aka \"auxiliary device\")"
+	---help---
+	  The PS/2 mouse connects to a special mouse port that looks much like
+	  the keyboard port (small circular connector with 6 pins). This way,
+	  the mouse does not use any serial ports. This port can also be used
+	  for other input devices like light pens, tablets, keypads. Compaq,
+	  AST and IBM all use this as their mouse port on currently shipping
+	  machines. The trackballs of some laptops are PS/2 mice also. In
+	  particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse.
+
+	  Although PS/2 mice are not technically bus mice, they are explained
+	  in detail in the Busmouse-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  When using a PS/2 mouse, you can get problems if you want to use the
+	  mouse both on the Linux console and under X. Using the "-R" option
+	  of the Linux mouse managing program gpm (available from
+	  <ftp://gnu.systemy.it/pub/gpm/>) solves this problem, or you can get
+	  the "mconv2" utility from <ftp://ibiblio.org/pub/Linux/system/mouse/>.
+
+config MOUSE
+	bool
+	depends on PSMOUSE
+	default y
+	---help---
+	  This is for machines with a mouse which is neither a serial nor a
+	  bus mouse. Examples are PS/2 mice (such as the track balls on some
+	  laptops) and some digitizer pads. Most people have a regular serial
+	  MouseSystem or Microsoft mouse (made by Logitech) that plugs into a
+	  COM port (rectangular with 9 or 25 pins). These people say N here.
+	  If you have something else, read the Busmouse-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. This HOWTO contains
+	  information about all non-serial mice, not just bus mice.
+
+	  If you have a laptop, you either have to check the documentation or
+	  experiment a bit to find out whether the trackball is a serial mouse
+	  or not; it's best to say Y here for you.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about non-serial mice. If unsure, say Y.
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+
+endmenu
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+if EXPERIMENTAL
+
+config MDA_CONSOLE
+	tristate "MDA text console (dual-headed) (EXPERIMENTAL)"
+	---help---
+	  Say Y here if you have an old MDA or monochrome Hercules graphics
+	  adapter in your system acting as a second head ( = video card). You
+	  will then be able to use two monitors with your Linux system. Do not
+	  say Y here if your MDA card is the primary card in your system; the
+	  normal VGA driver will handle it.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called mdacon.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+source "drivers/video/Kconfig"
+
+endif
+
+endmenu
+
+
+menu "Sound"
+	depends on !DECSTATION
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/sgi/Kconfig"
+
+source "drivers/usb/Kconfig"
+
+
+menu "Kernel hacking"
+
+config CROSSCOMPILE
+	bool "Are you using a crosscompiler"
+	help
+	  Say Y here if you are compiling the kernel on a different
+	  architecture than the one it is intended to run on.
+
+config REMOTE_DEBUG
+	bool "Remote GDB kernel debugging"
+	depends on SERIAL=y || AU1000_UART
+	help
+	  If you say Y here, it will be possible to remotely debug the MIPS
+	  kernel using gdb. This enlarges your kernel image disk size by
+	  several megabytes and requires a machine with more than 16 MB,
+	  better 32 MB RAM to avoid excessive linking time. This is only
+	  useful for kernel hackers. If unsure, say N.
+
+config GDB_CONSOLE
+	bool "Console output to GDB"
+	depends on REMOTE_DEBUG
+	help
+	  If you are using GDB for remote debugging over a serial port and
+	  would like kernel messages to be formatted into GDB $O packets so
+	  that GDB prints them as program output, say 'Y'.
+
+config LL_DEBUG
+	bool "Low-level debugging"
+	depends on SERIAL=y
+	help
+	  Enable low-level debugging assertion macros in the kernel code.
+	  Currently used only by the time services code in the MIPS port.
+	  Don't turn this on unless you know what you are doing.
+
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config MIPS_UNCACHED
+	bool "Run uncached"
+	depends on !SMP
+	help
+	  If you say Y here there kernel will disable all CPU caches.  This will
+	  reduce the system's performance dramatically but can help finding
+	  otherwise hard to track bugs.  It can also useful if you're doing
+	  hardware debugging with a logic analyzer and need to see all traffic
+	  on the bus.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/mips/config.in b/arch/mips/config.in
--- a/arch/mips/config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,500 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-define_bool CONFIG_MIPS y
-define_bool CONFIG_SMP n
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-mainmenu_name "Linux Kernel Configuration"
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Machine selection'
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool 'Support for Acer PICA 1 chipset (EXPERIMENTAL)' CONFIG_ACER_PICA_61
-   bool 'Support for Algorithmics P4032 (EXPERIMENTAL)' CONFIG_ALGOR_P4032
-   bool 'Support for BAGET MIPS series (EXPERIMENTAL)' CONFIG_BAGET_MIPS
-   bool 'Support for DECstations (EXPERIMENTAL)' CONFIG_DECSTATION
-   bool 'Support for NEC DDB Vrc-5074 (EXPERIMENTAL)' CONFIG_DDB5074
-   bool 'Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)' CONFIG_MIPS_EV96100
-   bool 'Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)' CONFIG_MIPS_EV64120
-   if [ "$CONFIG_MIPS_EV64120" = "y" ]; then
-		  bool 'Enable Second PCI (PCI1)' CONFIG_EVB_PCI1
-      choice 'Galileo Chip Clock' \
-        "75 CONFIG_SYSCLK_75\
-         83.3 CONFIG_SYSCLK_83\
-         100 CONFIG_SYSCLK_100" CONFIG_SYSCLK_83
-   fi
-   bool 'Support for MIPS Atlas board (EXPERIMENTAL)' CONFIG_MIPS_ATLAS
-   bool 'Support for MIPS Malta board (EXPERIMENTAL)' CONFIG_MIPS_MALTA
-   bool 'Support for Philips Nino (EXPERIMENTAL)' CONFIG_NINO
-   if [ "$CONFIG_NINO" = "y" ]; then
-      choice 'Nino Model Number' \
-        "Model-300/301/302/319 CONFIG_NINO_4MB \
-         Model-200/210/312/320/325/350/390 CONFIG_NINO_8MB \
-         Model-500/510 CONFIG_NINO_16MB" CONFIG_NINO_8MB
-   fi
-fi
-bool 'Support for Mips Magnum 4000' CONFIG_MIPS_MAGNUM_4000
-bool 'Support for Momentum Ocelot board' CONFIG_MOMENCO_OCELOT
-bool 'Support for NEC DDB Vrc-5476' CONFIG_DDB5476
-bool 'Support for NEC DDB Vrc-5477' CONFIG_DDB5477
-bool 'Support for Olivetti M700-10' CONFIG_OLIVETTI_M700
-bool 'Support for SGI IP22' CONFIG_SGI_IP22
-bool 'Support for SNI RM200 PCI' CONFIG_SNI_RM200_PCI
-bool 'Support for ITE 8172G board' CONFIG_MIPS_ITE8172
-   if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
-       bool '    Support for older IT8172 (Rev C)' CONFIG_IT8172_REVC
-       bool '    Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
-       if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
-	   define_bool CONFIG_IT8172_CIR y
-       else
-           bool '    Enable PS2 Keyboard Support' CONFIG_PC_KEYB
-       fi
-       bool '    Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
-       bool '    Enable Smart Card Reader 1 Support ' CONFIG_IT8172_SCR1
-   fi
-   bool 'Support for Globespan IVR board' CONFIG_MIPS_IVR
-   if [ "$CONFIG_MIPS_IVR" = "y" ]; then
-       bool '    Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
-       if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
-	   define_bool CONFIG_IT8172_CIR y
-       fi
-       bool '    Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
-   fi
-bool 'Support for Alchemy Semi PB1000 board' CONFIG_MIPS_PB1000
-
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-
-#
-# Select some configuration options automatically for certain systems.
-#
-unset CONFIG_ARC32
-unset CONFIG_BOARD_SCACHE
-unset CONFIG_COHERENT_IO
-unset CONFIG_HAVE_STD_PC_SERIAL_PORT
-unset CONFIG_I8259
-unset CONFIG_ISA
-unset CONFIG_PCI
-unset CONFIG_MIPS_JAZZ
-unset CONFIG_SWAP_IO_SPACE
-unset CONFIG_VIDEO_G364
-unset CONFIG_PC_KEYB
-
-define_bool CONFIG_MCA n
-define_bool CONFIG_SBUS n
-
-if [ "$CONFIG_MIPS_EV96100" = "y" ]; then
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_MIPS_GT96100 y
-   define_bool CONFIG_SWAP_IO_SPACE y
-   define_bool CONFIG_NEW_PCI y
-   define_bool CONFIG_PCI_AUTO y
-fi
-if [ "$CONFIG_MIPS_EV64120" = "y" ]; then
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_ISA n
-   define_bool CONFIG_MIPS_GT64120 y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-
-if [ "$CONFIG_ALGOR_P4032" = "y" ]; then
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_MIPS_MAGNUM_4000" = "y" -o \
-     "$CONFIG_OLIVETTI_M700" = "y" ]; then
-   define_bool CONFIG_ARC32 y
-   define_bool CONFIG_I8259 y
-   define_bool CONFIG_ISA y
-   define_bool CONFIG_FB y
-   define_bool CONFIG_FB_G364 y	
-   define_bool CONFIG_MIPS_JAZZ y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_ACER_PICA_61" = "y" ]; then
-   define_bool CONFIG_ARC32 y
-   define_bool CONFIG_I8259 y
-   define_bool CONFIG_ISA y
-   define_bool CONFIG_MIPS_JAZZ y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_ROTTEN_IRQ y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_MIPS_ATLAS" = "y" ]; then
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_SWAP_IO_SPACE y
-fi
-if [ "$CONFIG_MIPS_MALTA" = "y" ]; then
-   define_bool CONFIG_I8259 y
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_HAVE_STD_PC_SERIAL_PORT y
-   define_bool CONFIG_NEW_IRQ y
-   define_bool CONFIG_SWAP_IO_SPACE y
-fi
-if [ "$CONFIG_MOMENCO_OCELOT" = "y" ]; then
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_SYSCLK_100 y
-   define_bool CONFIG_SWAP_IO_SPACE y
-   define_bool CONFIG_NEW_IRQ y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_SGI_IP22" = "y" ]; then
-   define_bool CONFIG_ARC32 y
-   define_bool CONFIG_BOARD_SCACHE y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_SGI y
-   define_bool CONFIG_NEW_IRQ y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then
-   define_bool CONFIG_ARC32 y
-   define_bool CONFIG_I8259 y
-   define_bool CONFIG_ISA y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_ROTTEN_IRQ y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_DDB5074" = "y" ]; then
-   define_bool CONFIG_I8259 y
-   define_bool CONFIG_ISA y
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_ROTTEN_IRQ y
-   define_bool CONFIG_HAVE_STD_PC_SERIAL_PORT y
-   define_bool CONFIG_OLD_TIME_C y
-fi
-if [ "$CONFIG_DDB5476"  = "y" ]; then
-   define_bool CONFIG_ISA y
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_ROTTEN_IRQ y
-   define_bool CONFIG_HAVE_STD_PC_SERIAL_PORT y
-   define_bool CONFIG_NEW_TIME_C y
-fi
-if [ "$CONFIG_DDB5477" = "y" ]; then
-   define_bool CONFIG_CPU_LITTLE_ENDIAN y
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_NEW_TIME_C y
-   define_bool CONFIG_NEW_IRQ y
-fi
-if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_IT8712 y
-   define_bool CONFIG_PC_KEYB y
-   define_bool CONFIG_NEW_PCI y
-   define_bool CONFIG_PCI_AUTO y
-fi
-if [ "$CONFIG_MIPS_IVR" = "y" ]; then
-   define_bool CONFIG_PCI y
-fi
-if [ "$CONFIG_MIPS_PB1000" = "y" ]; then
-   define_bool CONFIG_MIPS_AU1000 y
-   define_bool CONFIG_NEW_IRQ y
-fi
-if [ "$CONFIG_NINO" = "y" ]; then
-   define_bool CONFIG_PC_KEYB y
-fi
-
-if [ "$CONFIG_ISA" != "y" ]; then
-   define_bool CONFIG_ISA n
-   define_bool CONFIG_EISA n
-else
-   define_bool CONFIG_EISA y
-fi
-
-if [ "$CONFIG_PCI" != "y" ]; then
-   define_bool CONFIG_PCI n
-fi
-
-if [ "$CONFIG_I8259" != "y" ]; then
-   define_bool CONFIG_I8259 n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'CPU selection'
-
-choice 'CPU type' \
-	"R3000 CONFIG_CPU_R3000	\
-	 R6000 CONFIG_CPU_R6000	\
-	 R41xx CONFIG_CPU_VR41XX \
-	 R4300 CONFIG_CPU_R4300	\
-	 R4x00 CONFIG_CPU_R4X00	\
-	 R5000 CONFIG_CPU_R5000	\
-	 R5432 CONFIG_CPU_R5432 \
-	 RM7000 CONFIG_CPU_RM7000 \
-	 R52xx CONFIG_CPU_NEVADA \
-	 R10000 CONFIG_CPU_R10000 \
-	 SB1    CONFIG_CPU_SB1    \
-	 MIPS32 CONFIG_CPU_MIPS32 \
-	 MIPS64 CONFIG_CPU_MIPS64" R4x00
-
-bool 'Override CPU Options' CONFIG_CPU_ADVANCED
-
-if [ "$CONFIG_CPU_ADVANCED" = "y" ]; then
-   bool '  ll/sc Instructions available' CONFIG_CPU_HAS_LLSC
-   bool '  lld/scd Instructions available' CONFIG_CPU_HAS_LLDSCD
-   bool '  Writeback Buffer available' CONFIG_CPU_HAS_WB
-else
-   if [ "$CONFIG_CPU_R3000" = "y" -o "$CONFIG_CPU_VR41XX" = "y" ]; then
-      if [ "CONFIG_DECSTATION" = "y" ]; then
-	 define_bool CONFIG_CPU_HAS_LLSC n
-	 define_bool CONFIG_CPU_HAS_LLDSCD n
-	 define_bool CONFIG_CPU_HAS_WB y
-      else
-	 define_bool CONFIG_CPU_HAS_LLSC n
-	 define_bool CONFIG_CPU_HAS_LLDSCD n
-	 define_bool CONFIG_CPU_HAS_WB n
-      fi
-   else
-      if [ "$CONFIG_CPU_MIPS32" = "y" ]; then
-	 define_bool CONFIG_CPU_HAS_LLSC y
-	 define_bool CONFIG_CPU_HAS_LLDSCD n
-	 define_bool CONFIG_CPU_HAS_WB n
-      else
-	 define_bool CONFIG_CPU_HAS_LLSC y
-	 define_bool CONFIG_CPU_HAS_LLDSCD y
-	 define_bool CONFIG_CPU_HAS_WB n
-      fi
-   fi
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-if [ "$CONFIG_DECSTATION" = "y" -o \
-     "$CONFIG_DDB5074" = "y" -o    \
-     "$CONFIG_DDB5476" = "y" -o    \
-     "$CONFIG_NINO" = "y" ]; then
-   define_bool CONFIG_CPU_LITTLE_ENDIAN y
-else
-   bool 'Generate little endian code' CONFIG_CPU_LITTLE_ENDIAN
-fi
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-define_bool CONFIG_ELF_KERNEL y
-
-if [ "$CONFIG_CPU_LITTLE_ENDIAN" = "n" ]; then
-   bool 'Include IRIX binary compatibility' CONFIG_BINFMT_IRIX 
-   bool 'Include forward keyboard' CONFIG_FORWARD_KEYBOARD 
-fi
-
-if [ "$CONFIG_ARC32" = "y" ]; then
-   bool 'ARC console support' CONFIG_ARC_CONSOLE
-fi
-
-define_bool CONFIG_BINFMT_AOUT n
-define_bool CONFIG_BINFMT_ELF y
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-   source drivers/pcmcia/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-
-if [ "$CONFIG_DECSTATION" = "y" ]; then
-    bool 'TURBOchannel support' CONFIG_TC
-#    if [ "$CONFIG_TC" = "y" ]; then
-#	bool ' Access.Bus support' CONFIG_ACCESSBUS
-#    fi
-fi
-endmenu
-
-if [ "$CONFIG_ISA" = "y" ]; then
-   source drivers/pnp/Config.in
-fi
-
-source drivers/mtd/Config.in
-
-source drivers/parport/Config.in
-
-source drivers/block/Config.in
-
-source drivers/md/Config.in
-
-if [ "$CONFIG_SGI_IP22" != "y" -a \
-     "$CONFIG_DECSTATION" != "y" ]; then
-
-   mainmenu_option next_comment
-   comment 'ATA/ATAPI/MFM/RLL support'
-    
-   tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-    
-   if [ "$CONFIG_IDE" != "n" ]; then
-      source drivers/ide/Config.in
-   else
-      define_bool CONFIG_BLK_DEV_HD n
-   fi
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_DECSTATION" != "y" -a \
-     "$CONFIG_SGI_IP22" != "y" ]; then
-   source drivers/message/i2o/Config.in
-fi
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-         source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-source drivers/telephony/Config.in
-
-mainmenu_option next_comment
-comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-
-bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-   source drivers/cdrom/Config.in
-fi
-endmenu
-
-source drivers/input/Config.in
-
-source drivers/char/Config.in
-
-source drivers/media/Config.in
-
-if [ "$CONFIG_DECSTATION" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'DECStation Character devices'
-
-   bool 'Virtual terminal' CONFIG_VT
-   if [ "$CONFIG_VT" = "y" ]; then
-      bool 'Support for console on virtual terminal' CONFIG_VT_CONSOLE
-   fi
-   tristate 'Standard/generic (dumb) serial support' CONFIG_SERIAL
-   if [ "$CONFIG_SERIAL" = "y" ]; then
-      bool 'DZ11 Serial Support' CONFIG_DZ
-      if [ "$CONFIG_TC" = "y" ]; then
-	 bool 'Z85C30 Serial Support' CONFIG_ZS
-      fi
-   bool '   Support for console on serial port' CONFIG_SERIAL_CONSOLE
-   fi
-   bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-   if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-      int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-   fi
-#   if [ "$CONFIG_ACCESSBUS" = "y" ]; then
-#      bool 'MAXINE Access.Bus mouse (VSXXX-BB/GB) support' CONFIG_DTOP_MOUSE
-#   fi
-   bool 'Enhanced Real Time Clock Support' CONFIG_RTC
-
-   endmenu
-fi
-
-if [ "$CONFIG_SGI_IP22" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'SGI Character devices'
-   bool 'Virtual terminal' CONFIG_VT
-   if [ "$CONFIG_VT" = "y" ]; then
-      bool 'Support for console on virtual terminal' CONFIG_VT_CONSOLE
-      tristate 'SGI Newport Console support' CONFIG_SGI_NEWPORT_CONSOLE
-      if [ "$CONFIG_SGI_NEWPORT_CONSOLE" != "y" ]; then
-	 define_bool CONFIG_DUMMY_CONSOLE y
-      else
-	 define_bool CONFIG_FONT_8x16 y
-      fi
-   fi
-   bool 'PS/2 mouse support (aka "auxiliary device")' CONFIG_PSMOUSE
-   if [ "$CONFIG_PSMOUSE" != "n" ]; then
-      define_bool CONFIG_MOUSE y
-   fi
-   bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-   if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-      int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-   fi
-   endmenu
-fi
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   bool 'VGA text console' CONFIG_VGA_CONSOLE
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
-      source drivers/video/Config.in
-   fi
-   endmenu
-fi
-
-if [ "$CONFIG_DECSTATION" != "y" ]; then
-   mainmenu_option next_comment
-   comment 'Sound'
-
-   tristate 'Sound card support' CONFIG_SOUND
-   if [ "$CONFIG_SOUND" != "n" ]; then
-      source sound/Config.in
-   fi
-   endmenu
-fi
-
-if [ "$CONFIG_SGI_IP22" = "y" ]; then
-   source drivers/sgi/Config.in
-fi
-
-source drivers/usb/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Are you using a crosscompiler' CONFIG_CROSSCOMPILE
-if [ "$CONFIG_SERIAL" = "y" -o "$CONFIG_AU1000_UART" = "y" ]; then
-  bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
-  dep_bool 'Console output to GDB' CONFIG_GDB_CONSOLE $CONFIG_REMOTE_DEBUG
-fi
-if [ "$CONFIG_SERIAL" = "y" ]; then
-  bool 'Low-level debugging' CONFIG_LL_DEBUG
-fi
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-if [ "$CONFIG_SMP" != "y" ]; then
-   bool 'Run uncached' CONFIG_MIPS_UNCACHED
-else
-   int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-fi
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/mips64/Config.help b/arch/mips64/Config.help
--- a/arch/mips64/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,416 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_SGI_IP22
-  This are the SGI Indy, Challenge S and Indigo2, as well as certain
-  OEM variants like the Tandem CMN B006S. To compile a Linux kernel
-  that runs on these, say Y here.
-
-CONFIG_SGI_IP27
-  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
-  workstations.  To compile a Linux kernel that runs on these, say Y
-  here.
-
-CONFIG_SGI_SN0_N_MODE
-  The nodes of Origin 200, Origin 2000 and Onyx 2 systems can be
-  configured in either N-Modes which allows for more nodes or M-Mode
-  which allows for more memory.  Your system is most probably
-  running in M-Mode, so you should say N here.
-
-CONFIG_MIPS_FPU_EMULATOR
-  This option enables the MIPS software floatingpoint support.  Due to
-  the way floating point works you should always enable this option
-  unless you exactly know what you're doing.
-
-CONFIG_CPU_R4300
-  MIPS Technologies R4300-series processors.
-
-CONFIG_CPU_R4X00
-  MIPS Technologies R4000-series processors other than 4300, including
-  the 4640, 4650, and 4700.
-
-CONFIG_CPU_R5000
-  MIPS Technologies R5000-series processors other than the Nevada.
-
-CONFIG_CPU_NEVADA
-  MIPS Technologies R52x0-series ("Nevada") processors.
-
-CONFIG_CPU_R8000
-  MIPS Technologies R8000-series processors.
-
-CONFIG_CPU_R10000
-  MIPS Technologies R10000-series processors.
-
-CONFIG_DISCONTIGMEM
-  Say Y to upport 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.
-
-CONFIG_MAPPED_KERNEL
-  Change the way a Linux kernel is loaded unto memory on a MIPS64
-  machine.  This is required in order to support text replication and
-  NUMA.  If you need to undersatand it, read the source code.
-
-CONFIG_REPLICATE_KTEXT
-  Say Y here to enable replicating the kernel text across multiple
-  nodes in a NUMA cluster.  This trades memory for speed.
-
-CONFIG_REPLICATE_EXHANDLERS
-  Say Y here to enable replicating the kernel exception handlers
-  across multiple nodes in a NUMA cluster. This trades memory for
-  speed.
-
-CONFIG_NUMA
-  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
-  Access).  This option is for configuring high-end multiprocessor
-  server machines.  If in doubt, say N.
-
-CONFIG_MIPS_INSANE_LARGE
-  MIPS R10000 does support a 44 bit / 16TB address space as opposed to
-  previous 64-bit processors which only supported 40 bit / 1TB. If you
-  need processes of more than 1TB virtual address space, say Y here.
-  This will result in additional memory usage, so it is not
-  recommended for normal users.
-
-CONFIG_CPU_LITTLE_ENDIAN
-  Some MIPS machines can be configured for either little or big endian
-  byte order. These modes require different kernels. Say Y if your
-  machine is little endian, N if it's a big endian machine.
-
-CONFIG_SGI_NEWPORT_CONSOLE
-  Say Y here if you want the console on the Newport aka XL graphics
-  card of your Indy.  Most people say Y here.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_FONT_8x16
-  This is the "high resolution" font for the VGA frame buffer (the one
-  provided by the VGA text console 80x25 mode.
-
-  If unsure, say Y.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_CROSSCOMPILE
-  Say Y here if you are compiling the kernel on a different
-  architecture than the one it is intended to run on.
-
-CONFIG_MIPS32_COMPAT
-  Select this option if you want Linux/MIPS 32-bit binary
-  compatibility. Since all software available for Linux/MIPS is
-  currently 32-bit you should say Y here.
-
-CONFIG_MIPS_FPE_MODULE
-  Build the floating point exception handler module. This option is
-  only useful for people working on the floating point exception
-  handler. If you don't, say N.
-
-CONFIG_REMOTE_DEBUG
-  If you say Y here, it will be possible to remotely debug the MIPS
-  kernel using gdb. This enlarges your kernel image disk size by
-  several megabytes and requires a machine with more than 16 MB,
-  better 32 MB RAM to avoid excessive linking time. This is only
-  useful for kernel hackers. If unsure, say N.
-
-CONFIG_MIPS_UNCACHED
-  If you say Y here there kernel will disable all CPU caches.  This will
-  reduce the system's performance dramatically but can help finding
-  otherwise hard to track bugs.  It can also useful if you're doing
-  hardware debugging with a logic analyzer and need to see all traffic
-  on the bus.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_BINFMT_ELF32
-  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
-  Everybody wants this; say Y.
-
diff -Nru a/arch/mips64/Kconfig b/arch/mips64/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/mips64/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,739 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+
+mainmenu "Linux Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Machine selection"
+
+choice
+	prompt "Machine type"
+	default SGI_IP27
+
+config SGI_IP22
+	bool "SGI-IP22,Indy/Indigo2"
+	help
+	  This are the SGI Indy, Challenge S and Indigo2, as well as certain
+	  OEM variants like the Tandem CMN B006S. To compile a Linux kernel
+	  that runs on these, say Y here.
+
+config SGI_IP27
+	bool "SGI-IP27,Origin200/2000"
+	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
+	  here.
+
+endchoice
+
+config SGI_SN0_N_MODE
+	bool "IP27 N-Mode"
+	depends on SGI_IP27
+	help
+	  The nodes of Origin 200, Origin 2000 and Onyx 2 systems can be
+	  configured in either N-Modes which allows for more nodes or M-Mode
+	  which allows for more memory.  Your system is most probably
+	  running in M-Mode, so you should say N here.
+
+config DISCONTIGMEM
+	bool "Discontiguous Memory Support"
+	depends on SGI_IP27
+	help
+	  Say Y to upport 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.
+
+config NUMA
+	bool "NUMA Support"
+	depends on SGI_IP27
+	help
+	  Say Y to compile the kernel to support NUMA (Non-Uniform Memory
+	  Access).  This option is for configuring high-end multiprocessor
+	  server machines.  If in doubt, say N.
+
+config MAPPED_KERNEL
+	bool "Mapped kernel support"
+	depends on SGI_IP27
+	help
+	  Change the way a Linux kernel is loaded unto memory on a MIPS64
+	  machine.  This is required in order to support text replication and
+	  NUMA.  If you need to undersatand it, read the source code.
+
+config REPLICATE_KTEXT
+	bool "Kernel text replication support"
+	depends on SGI_IP27
+	help
+	  Say Y here to enable replicating the kernel text across multiple
+	  nodes in a NUMA cluster.  This trades memory for speed.
+
+config REPLICATE_EXHANDLERS
+	bool "Exception handler replication support"
+	depends on SGI_IP27
+	help
+	  Say Y here to enable replicating the kernel exception handlers
+	  across multiple nodes in a NUMA cluster. This trades memory for
+	  speed.
+
+config SMP
+	bool "Multi-Processing support"
+	depends on SGI_IP27
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+#bool '  IP27 XXL' CONFIG_SGI_SN0_XXL
+endmenu
+
+#
+# Select some configuration options automatically based on user selections
+#
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+config PCI
+	bool
+	depends on SGI_IP27
+	default y
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	depends on ISA
+	default y
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config BOOT_ELF32
+	bool
+	depends on SGI_IP22
+	default y
+
+config ARC32
+	bool
+	depends on SGI_IP22
+	default y
+
+config BOARD_SCACHE
+	bool
+	depends on SGI_IP22
+	default y
+
+config ARC_MEMORY
+	bool
+	depends on SGI_IP22
+	default y
+
+config SGI
+	bool
+	depends on SGI_IP22
+	default y
+
+config L1_CACHE_SHIFT
+	int
+	default "7" if SGI_IP27
+	default "5" if SGI_IP22
+
+config BOOT_ELF64
+	bool
+	depends on SGI_IP27
+	default y
+
+config ARC64
+	bool
+	depends on SGI_IP27
+	default y
+
+config COHERENT_IO
+	bool
+	depends on SGI_IP27
+	default y
+
+config MAPPED_PCI_IO
+	bool
+	depends on SGI_IP27
+	default y
+
+config QL_ISP_A64
+	bool
+	depends on SGI_IP27
+	default y
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config SBUS
+	bool
+
+
+menu "CPU selection"
+
+choice
+	prompt "CPU type"
+	default CPU_R4X00
+
+config CPU_R4300
+	bool "R4300"
+	help
+	  MIPS Technologies R4300-series processors.
+
+config CPU_R4X00
+	bool "R4x00"
+	help
+	  MIPS Technologies R4000-series processors other than 4300, including
+	  the 4640, 4650, and 4700.
+
+config CPU_R5000
+	bool "R5000"
+	help
+	  MIPS Technologies R5000-series processors other than the Nevada.
+
+config CPU_NEVADA
+	bool "R52x0"
+	help
+	  MIPS Technologies R52x0-series ("Nevada") processors.
+
+config CPU_R8000
+	bool "R8000"
+	help
+	  MIPS Technologies R8000-series processors.
+
+config CPU_R10000
+	bool "R10000"
+	help
+	  MIPS Technologies R10000-series processors.
+
+endchoice
+
+endmenu
+
+
+menu "General setup"
+
+config MIPS_INSANE_LARGE
+	bool "Support for large 64-bit configurations"
+	depends on CPU_R10000
+	help
+	  MIPS R10000 does support a 44 bit / 16TB address space as opposed to
+	  previous 64-bit processors which only supported 40 bit / 1TB. If you
+	  need processes of more than 1TB virtual address space, say Y here.
+	  This will result in additional memory usage, so it is not
+	  recommended for normal users.
+
+config CPU_LITTLE_ENDIAN
+	bool "Generate little endian code"
+	help
+	  Some MIPS machines can be configured for either little or big endian
+	  byte order. These modes require different kernels. Say Y if your
+	  machine is little endian, N if it's a big endian machine.
+
+config MIPS_FPU_EMULATOR
+	bool "Kernel floating-point emulation"
+	depends on EXPERIMENTAL
+	help
+	  This option enables the MIPS software floatingpoint support.  Due to
+	  the way floating point works you should always enable this option
+	  unless you exactly know what you're doing.
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+config ARC_CONSOLE
+	bool "ARC console support"
+	depends on ARC32
+
+config BINFMT_ELF
+	tristate "Kernel support for 64-bit ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config MIPS32_COMPAT
+	bool "Kernel support for Linux/MIPS 32-bit binary compatibility"
+	help
+	  Select this option if you want Linux/MIPS 32-bit binary
+	  compatibility. Since all software available for Linux/MIPS is
+	  currently 32-bit you should say Y here.
+
+config BINFMT_ELF32
+	bool
+	depends on MIPS32_COMPAT
+	default y
+	help
+	  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
+	  Everybody wants this; say Y.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+endmenu
+
+source "drivers/pci/Kconfig"
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+#source drivers/message/i2o/Config.in
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+source "drivers/video/Kconfig"
+
+config SGI_NEWPORT_CONSOLE
+	tristate "SGI Newport Console support"
+	depends on SGI_IP22
+	help
+	  Say Y here if you want the console on the Newport aka XL graphics
+	  card of your Indy.  Most people say Y here.
+
+config DUMMY_CONSOLE
+	bool
+	depends on SGI_IP22 && SGI_NEWPORT_CONSOLE!=y
+	default y
+
+config FONT_8x16
+	bool
+	depends on SGI_IP22 && SGI_NEWPORT_CONSOLE=y
+	default y
+
+endmenu
+
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/sgi/Kconfig"
+
+source "drivers/usb/Kconfig"
+
+
+menu "Kernel hacking"
+
+#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
+config CROSSCOMPILE
+	bool "Are you using a crosscompiler"
+	help
+	  Say Y here if you are compiling the kernel on a different
+	  architecture than the one it is intended to run on.
+
+config MIPS_FPE_MODULE
+	bool "Build fp execption handler module"
+	depends on MODULES
+	help
+	  Build the floating point exception handler module. This option is
+	  only useful for people working on the floating point exception
+	  handler. If you don't, say N.
+
+config REMOTE_DEBUG
+	bool "Remote GDB kernel debugging"
+	help
+	  If you say Y here, it will be possible to remotely debug the MIPS
+	  kernel using gdb. This enlarges your kernel image disk size by
+	  several megabytes and requires a machine with more than 16 MB,
+	  better 32 MB RAM to avoid excessive linking time. This is only
+	  useful for kernel hackers. If unsure, say N.
+
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config MIPS_UNCACHED
+	bool "Run uncached"
+	depends on !SMP
+	help
+	  If you say Y here there kernel will disable all CPU caches.  This will
+	  reduce the system's performance dramatically but can help finding
+	  otherwise hard to track bugs.  It can also useful if you're doing
+	  hardware debugging with a logic analyzer and need to see all traffic
+	  on the bus.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-64)"
+	depends on SMP
+	default "64"
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/mips64/config.in b/arch/mips64/config.in
--- a/arch/mips64/config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,254 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-mainmenu_name "Linux Kernel Configuration"
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Machine selection'
-choice 'Machine type'						\
-	"SGI-IP22,Indy/Indigo2 CONFIG_SGI_IP22			\
-	 SGI-IP27,Origin200/2000 CONFIG_SGI_IP27" SGI-IP27,Origin200/2000
-
-if [ "$CONFIG_SGI_IP27" = "y" ]; then
-   bool '  IP27 N-Mode' CONFIG_SGI_SN0_N_MODE
-   bool '  Discontiguous Memory Support' CONFIG_DISCONTIGMEM
-   bool '  NUMA Support' CONFIG_NUMA
-   bool '  Mapped kernel support' CONFIG_MAPPED_KERNEL
-   bool '  Kernel text replication support' CONFIG_REPLICATE_KTEXT
-   bool '  Exception handler replication support' CONFIG_REPLICATE_EXHANDLERS
-   bool '  Multi-Processing support' CONFIG_SMP
-   #bool '  IP27 XXL' CONFIG_SGI_SN0_XXL
-fi
-endmenu
-
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-#
-# Select some configuration options automatically based on user selections
-#
-unset CONFIG_ARC32
-unset CONFIG_ARC64
-unset CONFIG_BINFMT_ELF32
-unset CONFIG_BOARD_SCACHE
-unset CONFIG_BOOT_ELF32
-unset CONFIG_BOOT_ELF64
-unset CONFIG_COHERENT_IO
-unset CONFIG_ISA
-unset CONFIG_MAPPED_PCI_IO
-unset CONFIG_PCI
-
-if [ "$CONFIG_SGI_IP22" = "y" ]; then
-   define_bool CONFIG_BOOT_ELF32 y
-   define_bool CONFIG_ARC32 y
-   define_bool CONFIG_BOARD_SCACHE y
-   define_bool CONFIG_ARC_MEMORY y
-   define_bool CONFIG_SGI y
-   define_int CONFIG_L1_CACHE_SHIFT 5
-fi
-
-if [ "$CONFIG_SGI_IP27" = "y" ]; then
-   define_bool CONFIG_BOOT_ELF64 y
-   define_bool CONFIG_ARC64 y
-   define_bool CONFIG_COHERENT_IO y
-   define_bool CONFIG_MAPPED_PCI_IO y
-   define_bool CONFIG_PCI y
-   define_bool CONFIG_QL_ISP_A64 y
-   define_int CONFIG_L1_CACHE_SHIFT 7
-fi
-
-if [ "$CONFIG_ISA" != "y" ]; then
-   define_bool CONFIG_ISA n
-   define_bool CONFIG_EISA n
-else
-   define_bool CONFIG_EISA y
-fi
-
-if [ "$CONFIG_PCI" != "y" ]; then
-   define_bool CONFIG_PCI n
-fi
-
-define_bool CONFIG_MCA n
-define_bool CONFIG_SBUS n
-
-mainmenu_option next_comment
-comment 'CPU selection'
-
-choice 'CPU type'				\
-	"R4300 CONFIG_CPU_R4300			\
-	 R4x00 CONFIG_CPU_R4X00			\
-	 R5000 CONFIG_CPU_R5000			\
-	 R52x0 CONFIG_CPU_NEVADA		\
-	 R8000 CONFIG_CPU_R8000			\
-	 R10000 CONFIG_CPU_R10000" R4x00
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-if [ "$CONFIG_CPU_R10000" = "y" ]; then
-   bool 'Support for large 64-bit configurations' CONFIG_MIPS_INSANE_LARGE
-fi
-bool 'Generate little endian code' CONFIG_CPU_LITTLE_ENDIAN
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool 'Kernel floating-point emulation' CONFIG_MIPS_FPU_EMULATOR
-fi
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-   source drivers/pcmcia/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-
-if [ "$CONFIG_ARC32" = "y" ]; then
-   bool 'ARC console support' CONFIG_ARC_CONSOLE
-fi
-
-tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
-bool 'Kernel support for Linux/MIPS 32-bit binary compatibility' CONFIG_MIPS32_COMPAT
-if [ "$CONFIG_MIPS32_COMPAT" = "y" ]; then
-   define_bool CONFIG_BINFMT_ELF32 y
-fi
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-endmenu
-
-source drivers/pci/Config.in
-
-source drivers/mtd/Config.in
-
-source drivers/parport/Config.in
-
-source drivers/block/Config.in
-
-source drivers/md/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-#source drivers/message/i2o/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-	 source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-source drivers/telephony/Config.in
-
-mainmenu_option next_comment
-comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-
-bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-   source drivers/cdrom/Config.in
-fi
-endmenu
-
-source drivers/input/Config.in
-
-source drivers/char/Config.in
-
-#source drivers/misc/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   source drivers/video/Config.in
-   if [ "$CONFIG_SGI_IP22" = "y" ]; then
-      tristate 'SGI Newport Console support' CONFIG_SGI_NEWPORT_CONSOLE
-      if [ "$CONFIG_SGI_NEWPORT_CONSOLE" != "y" ]; then
-	 define_bool CONFIG_DUMMY_CONSOLE y
-      else
-	 define_bool CONFIG_FONT_8x16 y
-      fi
-   fi
-  endmenu
-fi
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_SGI_IP22" = "y" ]; then
-   source drivers/sgi/Config.in
-fi
-
-source drivers/usb/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
-bool 'Are you using a crosscompiler' CONFIG_CROSSCOMPILE
-if [ "$CONFIG_MODULES" = "y" ]; then
-   bool ' Build fp execption handler module' CONFIG_MIPS_FPE_MODULE
-fi
-bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-if [ "$CONFIG_SMP" != "y" ]; then
-   bool 'Run uncached' CONFIG_MIPS_UNCACHED
-else
-   int  'Maximum number of CPUs (2-64)' CONFIG_NR_CPUS 64
-fi
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/parisc/Config.help b/arch/parisc/Config.help
--- a/arch/parisc/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,528 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_PARISC
-  The PA-RISC microprocessor is a RISC chip designed by
-  Hewlett-Packard and used in their line of workstations.  The PA-RISC
-  Linux project has a home page at <www.parisc-linux.org>.
-
-CONFIG_SCSI_ZALON
-  The Zalon is an interface chip that sits between the PA-RISC
-  processor and the NCR 53c720 SCSI controller on K-series PA-RISC
-  boards (these are used, among other places, on some HP 780
-  workstations).  Say Y here to make sure it gets initialized
-  correctly before the Linux kernel tries to talk to the controller.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_SOM
-  SOM is a binary executable format inherited from HP/UX.  Say Y here
-  to be able to load and execute SOM binaries directly.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_BINFMT_JAVA
-  If you say Y here, the kernel will load and execute Java J-code
-  binaries directly.  Note: this option is obsolete and scheduled for
-  removal, use CONFIG_BINFMT_MISC instead.
-
-CONFIG_PARPORT
-  If you want to use devices connected to your machine's parallel port
-  (the connector at the computer with 25 holes), e.g. printer, ZIP
-  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
-  create a mini network by connecting the parallel ports of two local
-  machines) etc., then you need to say Y here; please read
-  <file:Documentation/parport.txt> and
-  <file:drivers/parport/BUGS-parport>.
-
-  For extensive information about drivers for many devices attaching
-  to the parallel port see <http://www.torque.net/linux-pp.html> on
-  the WWW.
-
-  It is possible to share a single parallel port among several devices
-  and it is safe to compile all the corresponding drivers into the
-  kernel.  If you want to compile parallel port support as a module
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport.o.  If you have more than one parallel port and want to
-  specify which port and IRQ to be used by this driver at module load
-  time, take a look at <file:Documentation/parport.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_PC
-  You should say Y here if you have a PC-style parallel port. All IBM
-  PC compatible computers and some Alphas have PC-style parallel
-  ports.
-
-  This code is also available as a module.  If you want to compile it
-  as a module ( = code which can be inserted in and removed from the
-  running kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport_pc.o.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_PC_FIFO
-  Many parallel port chipsets provide hardware that can speed up
-  printing. Say Y here if you want to take advantage of that.
-
-  As well as actually having a FIFO, or DMA capability, the kernel
-  will need to know which IRQ the parallel port has.  By default,
-  parallel port interrupts will not be used, and so neither will the
-  FIFO.  See <file:Documentation/parport.txt> to find out how to
-  specify which IRQ/DMA to use.
-
-CONFIG_PARPORT_PC_SUPERIO
-  Saying Y here enables some probes for Super-IO chipsets in order to
-  find out things like base addresses, IRQ lines and DMA channels.  It
-  is safe to say N.
-
-CONFIG_PARPORT_OTHER
-  Say Y here if you want to be able to load driver modules to support
-  other non-standard types of parallel ports. This causes a
-  performance loss, so most people say N.
-
-CONFIG_PARPORT_1284
-  If you have a printer that supports status readback or device ID, or
-  want to use a device that uses enhanced parallel port transfer modes
-  such as EPP and ECP, say Y here to enable advanced IEEE 1284
-  transfer modes. Also say Y if you want device ID information to
-  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
-
-CONFIG_MODULES
-  Kernel modules are small pieces of compiled code which can be
-  inserted in or removed from the running kernel, using the programs
-  insmod and rmmod. This is described in the file
-  <file:Documentation/modules.txt>, including the fact that you have
-  to say "make modules" in order to compile the modules that you chose
-  during kernel configuration.  Modules can be device drivers, file
-  systems, binary executable formats, and so on. If you think that you
-  may want to make use of modules with this kernel in the future, then
-  say Y here.  If unsure, say Y.
-
-CONFIG_MODVERSIONS
-  Usually, modules have to be recompiled whenever you switch to a new
-  kernel.  Saying Y here makes it possible, and safe, to use the
-  same modules even after compiling a new kernel; this requires the
-  program modprobe. All the software needed for module support is in
-  the modutils package (check the file <file:Documentation/Changes>
-  for location and latest version).  NOTE: if you say Y here but don't
-  have the program genksyms (which is also contained in the above
-  mentioned modutils package), then the building of your kernel will
-  fail.  If you are going to use modules that are generated from
-  non-kernel sources, you would benefit from this option.  Otherwise
-  it's not that important.  So, N ought to be a safe bet.
-
-CONFIG_KMOD
-  Normally when you have selected some drivers and/or file systems to
-  be created as loadable modules, you also have the responsibility to
-  load the corresponding modules (using the programs insmod or
-  modprobe) before you can use them. If you say Y here however, the
-  kernel will be able to load modules for itself: when a part of the
-  kernel needs a module, it runs modprobe with the appropriate
-  arguments, thereby loading the module if it is available. (This is a
-  replacement for kerneld.) Say Y here and read about configuring it
-  in <file:Documentation/kmod.txt>.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_BLK_DEV_SD
-  If you want to use a SCSI hard disk or the SCSI or parallel port
-  version of the IOMEGA ZIP drive under Linux, say Y and read the
-  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
-  CD-ROMs.
-
-  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 sd_mod.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  Do not compile this driver as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI disk. In this case, do not compile the driver
-  for your SCSI host adapter (below) as a module either.
-
-CONFIG_SD_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted.  In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional disks that can be loaded after the
-  first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_CHR_DEV_ST
-  If you want to use a SCSI tape drive under Linux, say Y and read the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and
-  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
-  SCSI CD-ROMs.
-
-  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 st.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_BLK_DEV_SR
-  If you want to use a SCSI CD-ROM under Linux, say Y and read the
-  SCSI-HOWTO and the CD-ROM-HOWTO at
-  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
-  or M to "ISO 9660 CD-ROM file system support" later.
-
-  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 sr_mod.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_SR_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted. In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional CD-ROMs that can be loaded after
-  the first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_BLK_DEV_SR_VENDOR
-  This enables the usage of vendor specific SCSI commands. This is
-  required to support multisession CDs with old NEC/TOSHIBA cdrom
-  drives (and HP Writers). If you have such a drive and get the first
-  session only, try saying Y here; everybody else says N.
-
-CONFIG_CHR_DEV_SG
-  If you want to use SCSI scanners, synthesizers or CD-writers or just
-  about anything having "SCSI" in its name other than hard disks,
-  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
-  directly, so you need some additional software which knows how to
-  talk to these devices using the SCSI protocol:
-
-  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
-  writer software look at Cdrtools
-  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
-  and for burning a "disk at once": CDRDAO
-  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
-  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
-  For other devices, it's possible that you'll have to write the
-  driver software yourself. Please read the file
-  <file:Documentation/scsi-generic.txt> for more information.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
-  say N.
-
-CONFIG_SCSI_MULTI_LUN
-  If you have a SCSI device that supports more than one LUN (Logical
-  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-  can say Y here to force the SCSI driver to probe for multiple LUNs.
-  A SCSI device with multiple LUNs acts logically like multiple SCSI
-  devices. The vast majority of SCSI devices have only one LUN, and
-  so most people can say N here and should in fact do so, because it
-  is safer.
-
-CONFIG_SCSI_CONSTANTS
-  The error messages regarding your SCSI hardware will be easier to
-  understand if you say Y here; it will enlarge your kernel by about
-  12 KB. If in doubt, say Y.
-
-CONFIG_SCSI_SYM53C8XX
-  This driver supports all the features of recent 53C8XX chips (used
-  in PCI SCSI controllers), notably the hardware phase mismatch
-  feature of the SYM53C896.
-
-  Older versions of the 53C8XX chips are not supported by this
-  driver.  If your system uses either a 810 rev. < 16, a 815, or a 825
-  rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
-  driver ("NCR53C8XX SCSI support" above) or configure both the
-  NCR53C8XX and this SYM53C8XX drivers either as module or linked to
-  the kernel image.
-
-  When both drivers are linked into the kernel, the SYM53C8XX driver
-  is called first at initialization and you can use the 'excl=ioaddr'
-  driver boot option to exclude attachment of adapters by the
-  SYM53C8XX driver.  For example, entering
-  'sym53c8xx=excl:0xb400,excl=0xc000' at the lilo prompt prevents
-  adapters at io address 0xb400 and 0xc000 from being attached by the
-  SYM53C8XX driver, thus allowing the NCR53C8XX driver to attach them.
-  The 'excl' option is also supported by the NCR53C8XX driver.
-
-  Please read <file:drivers/scsi/README.ncr53c8xx> for more
-  information.
-
-CONFIG_SCSI_NCR53C8XX_SYNC
-  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
-  rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers
-  are respectively the maximum data transfer rates in mega-transfers
-  per second for each class.  For example, a FAST-20 Wide 16 device is
-  able to transfer data at 20 million 16 bit packets per second for a
-  total rate of 40 MB/s.
-
-  You may specify 0 if you want to only use asynchronous data
-  transfers. This is the safest and slowest option. Otherwise, specify
-  a value between 5 and 80, depending on the capability of your SCSI
-  controller.  The higher the number, the faster the data transfer.
-  Note that 80 should normally be ok since the driver decreases the
-  value automatically according to the controller's capabilities.
-
-  Your answer to this question is ignored for controllers with NVRAM,
-  since the driver will get this information from the user set-up.  It
-  also can be overridden using a boot setup option, as follows
-  (example): 'ncr53c8xx=sync:12' will allow the driver to negotiate
-  for FAST-20 synchronous data transfer (20 mega-transfers per
-  second).
-
-  The normal answer therefore is not to go with the default but to
-  select the maximum value 80 allowing the driver to use the maximum
-  value supported by each controller. If this causes problems with
-  your SCSI devices, you should come back and decrease the value.
-
-  There is no safe option other than using good cabling, right
-  terminations and SCSI conformant devices.
-
-CONFIG_SCSI_NCR53C8XX_IOMAPPED
-  If you say Y here, the driver will use normal IO, as opposed to
-  memory mapped IO. Memory mapped IO has less latency than normal IO
-  and works for most Intel-based hardware. Under Linux/Alpha only
-  normal IO is currently supported by the driver and so, this option
-  has no effect on those systems.
-
-  The normal answer therefore is N; try Y only if you encounter SCSI
-  related problems.
-
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
-  "Tagged command queuing" is a feature of SCSI-2 which improves
-  performance: the host adapter can send several SCSI commands to a
-  device's queue even if previous commands haven't finished yet.
-  Because the device is intelligent, it can optimize its operations
-  (like head positioning) based on its own request queue. Some SCSI
-  devices don't implement this properly; if you want to disable this
-  feature, enter 0 or 1 here (it doesn't matter which).
-
-  The default value is 8 and should be supported by most hard disks.
-  This value can be overridden from the boot command line using the
-  'tags' option as follows (example):
-  'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to
-  4, set queue depth to 16 for target 2 and target 3 on controller 0
-  and set queue depth to 10 for target 0 / lun 2 on controller 1.
-
-  The normal answer therefore is to go with the default 8 and to use
-  a boot command line option for devices that need to use a different
-  command queue depth.
-
-  There is no safe option other than using good SCSI devices.
-
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS
-  This option allows you to specify the maximum number of commands
-  that can be queued to any device, when tagged command queuing is
-  possible. The default value is 32. Minimum is 2, maximum is 64.
-  Modern hard disks are able to support 64 tags and even more, but
-  do not seem to be faster when more than 32 tags are being used.
-
-  So, the normal answer here is to go with the default value 32 unless
-  you are using very large hard disks with large cache (>= 1 MB) that
-  are able to take advantage of more than 32 tagged commands.
-
-  There is no safe option and the default answer is recommended.
-
-CONFIG_SCSI_NCR53C8XX_PROFILE
-  This option allows you to enable profiling information gathering.
-  These statistics are not very accurate due to the low frequency
-  of the kernel clock (100 Hz on i386) and have performance impact
-  on systems that use very fast devices.
-
-  The normal answer therefore is N.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_STI_CONSOLE
-  The STI console is the builtin display/keyboard on HP-PARISC
-  machines.  Say Y here to build support for it into your kernel.
-  The alternative is to use your primary serial port as a console.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_KWDB
-  Include in-kernel hooks for kdb, the source level debugger for the
-  PA-RISC port.
-
-CONFIG_IODC_CONSOLE
-  IODC is HP's pre-PCI standard for device identification (a la PCI
-  vendor, device IDs), detection, configuration, initialization and so
-  on.  It also can provide firmware function to do the actual IO,
-  which are slow, not really defined for runtime usage and generally
-  not desirable.
-
-  See <http://www.linuxhq.com/kernel/v2.4/doc/parisc/IODC.txt.html>
-  for the gory details.
-
-  Say Y here to enable use of the IODC firmware functions for console
-  I/O.  This is only useful on older PA-RISC workstations.  If in
-  doubt, say Y.
-
-CONFIG_IOMMU_CCIO
-  Say Y here to enable DMA management routines for the first
-  generation of PA-RISC cache-coherent machines.  Programs the
-  U2/Uturn chip in "Virtual Mode" and use the I/O MMU.
-
-CONFIG_PCI_LBA
-  Say Y here to give the PA-RISC kernel access to PCI configuration
-  and IO-port space on PA-RISC workstations equipped with a Lower Bus
-  Adapter (LBA).  This includes A, B, C, J, L, and N-class machines
-  with 4-digit model numbers, also the A300.
-
-CONFIG_GSC_LASI
-  Say Y here to directly support the LASI controller chip found on
-  PA-RISC workstations.  Linux-oriented documentation for this chip
-  can be found at <http://www.parisc-linux.org/documentation/>.
-
-CONFIG_PARPORT_GSC
-  Say Y here to build in low-level parallel-support for PC-style
-  hardware integrated in the LASI-Controller (on the GSC Bus) for
-  HP-PARISC workstations.
-
diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,763 @@
+#
+# For a description of the syntax of this configuration file,
+# see the Configure script.
+#
+
+mainmenu "Linux Kernel Configuration"
+
+config PARISC
+	bool
+	default y
+	help
+	  The PA-RISC microprocessor is a RISC chip designed by
+	  Hewlett-Packard and used in their line of workstations.  The PA-RISC
+	  Linux project has a home page at <www.parisc-linux.org>.
+
+config UID16
+	bool
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "General options"
+
+# bool 'Symmetric multi-processing support' CONFIG_SMP
+config SMP
+	bool
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+
+config KWDB
+	bool "Kernel Debugger support"
+	help
+	  Include in-kernel hooks for kdb, the source level debugger for the
+	  PA-RISC port.
+
+# define_bool CONFIG_KWDB n
+# bool 'GSC/Gecko bus support' CONFIG_GSC y
+config GSC
+	bool
+	default y
+
+config IOMMU_CCIO
+	bool "U2/Uturn I/O MMU"
+	help
+	  Say Y here to enable DMA management routines for the first
+	  generation of PA-RISC cache-coherent machines.  Programs the
+	  U2/Uturn chip in "Virtual Mode" and use the I/O MMU.
+
+config GSC_LASI
+	bool "LASI I/O support"
+	help
+	  Say Y here to directly support the LASI controller chip found on
+	  PA-RISC workstations.  Linux-oriented documentation for this chip
+	  can be found at <http://www.parisc-linux.org/documentation/>.
+
+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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config GSC_DINO
+	bool "GSCtoPCI/DINO PCI support"
+	depends on PCI
+
+config PCI_LBA
+	bool "LBA/Elroy PCI support"
+	depends on PCI
+	help
+	  Say Y here to give the PA-RISC kernel access to PCI configuration
+	  and IO-port space on PA-RISC workstations equipped with a Lower Bus
+	  Adapter (LBA).  This includes A, B, C, J, L, and N-class machines
+	  with 4-digit model numbers, also the A300.
+
+config IOSAPIC
+	bool
+	depends on PCI_LBA
+	default y
+
+config IOMMU_SBA
+	bool
+	depends on PCI_LBA
+	default y
+
+#
+# if [ "$CONFIG_PCI_EPIC" = "y" ]; then...
+#
+endmenu
+
+
+menu "General setup"
+
+config BINFMT_SOM
+	tristate "Kernel support for SOM binaries"
+	help
+	  SOM is a binary executable format inherited from HP/UX.  Say Y here
+	  to be able to load and execute SOM binaries directly.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config BINFMT_JAVA
+	tristate "Kernel support for JAVA binaries (obsolete)"
+	depends on EXPERIMENTAL
+	help
+	  If you say Y here, the kernel will load and execute Java J-code
+	  binaries directly.  Note: this option is obsolete and scheduled for
+	  removal, use CONFIG_BINFMT_MISC instead.
+
+endmenu
+
+##source drivers/parport/Config.in
+
+menu "Parallel port support"
+
+config PARPORT
+	tristate "Parallel port support"
+	---help---
+	  If you want to use devices connected to your machine's parallel port
+	  (the connector at the computer with 25 holes), e.g. printer, ZIP
+	  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
+	  create a mini network by connecting the parallel ports of two local
+	  machines) etc., then you need to say Y here; please read
+	  <file:Documentation/parport.txt> and
+	  <file:drivers/parport/BUGS-parport>.
+
+	  For extensive information about drivers for many devices attaching
+	  to the parallel port see <http://www.torque.net/linux-pp.html> on
+	  the WWW.
+
+	  It is possible to share a single parallel port among several devices
+	  and it is safe to compile all the corresponding drivers into the
+	  kernel.  If you want to compile parallel port support as a module
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport.o.  If you have more than one parallel port and want to
+	  specify which port and IRQ to be used by this driver at module load
+	  time, take a look at <file:Documentation/parport.txt>.
+
+	  If unsure, say Y.
+
+config PARPORT_PC
+	tristate "PC-style hardware"
+	depends on PCI && PARPORT
+	---help---
+	  You should say Y here if you have a PC-style parallel port. All IBM
+	  PC compatible computers and some Alphas have PC-style parallel
+	  ports.
+
+	  This code is also available as a module.  If you want to compile it
+	  as a module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport_pc.o.
+
+	  If unsure, say Y.
+
+config PARPORT_PC_FIFO
+	bool "Use FIFO/DMA if available"
+	depends on PARPORT_PC
+	help
+	  Many parallel port chipsets provide hardware that can speed up
+	  printing. Say Y here if you want to take advantage of that.
+
+	  As well as actually having a FIFO, or DMA capability, the kernel
+	  will need to know which IRQ the parallel port has.  By default,
+	  parallel port interrupts will not be used, and so neither will the
+	  FIFO.  See <file:Documentation/parport.txt> to find out how to
+	  specify which IRQ/DMA to use.
+
+config PARPORT_PC_SUPERIO
+	bool "SuperIO chipset support (EXPERIMENTAL)"
+	depends on PARPORT_PC && EXPERIMENTAL
+	help
+	  Saying Y here enables some probes for Super-IO chipsets in order to
+	  find out things like base addresses, IRQ lines and DMA channels.  It
+	  is safe to say N.
+
+config PARPORT_GSC
+	tristate "LASI/ASP builtin parallel-port"
+	depends on GSC_LASI && PARPORT
+	help
+	  Say Y here to build in low-level parallel-support for PC-style
+	  hardware integrated in the LASI-Controller (on the GSC Bus) for
+	  HP-PARISC workstations.
+
+# If exactly one hardware type is selected then parport will optimise away
+# support for loading any others.  Defeat this if the user is keen.
+config PARPORT_OTHER
+	bool "Support foreign hardware"
+	depends on PARPORT
+	help
+	  Say Y here if you want to be able to load driver modules to support
+	  other non-standard types of parallel ports. This causes a
+	  performance loss, so most people say N.
+
+config PARPORT_1284
+	bool "IEEE 1284 transfer modes"
+	depends on PARPORT
+	help
+	  If you have a printer that supports status readback or device ID, or
+	  want to use a device that uses enhanced parallel port transfer modes
+	  such as EPP and ECP, say Y here to enable advanced IEEE 1284
+	  transfer modes. Also say Y if you want device ID information to
+	  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
+
+endmenu
+
+source "drivers/block/Kconfig"
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+comment "SCSI support type (disk, tape, CDrom)"
+	depends on SCSI
+
+config BLK_DEV_SD
+	tristate "SCSI disk support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI hard disk or the SCSI or parallel port
+	  version of the IOMEGA ZIP drive under Linux, say Y and read the
+	  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
+	  CD-ROMs.
+
+	  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 sd_mod.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  Do not compile this driver as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI disk. In this case, do not compile the driver
+	  for your SCSI host adapter (below) as a module either.
+
+config SD_EXTRA_DEVS
+	int "Maximum number of SCSI disks that can be loaded as modules"
+	depends on BLK_DEV_SD
+	default "40"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted.  In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional disks that can be loaded after the
+	  first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_ST
+	tristate "SCSI tape support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI tape drive under Linux, say Y and read the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and
+	  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
+	  SCSI CD-ROMs.
+
+	  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 st.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR
+	tristate "SCSI CDROM support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI CD-ROM under Linux, say Y and read the
+	  SCSI-HOWTO and the CD-ROM-HOWTO at
+	  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
+	  or M to "ISO 9660 CD-ROM file system support" later.
+
+	  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 sr_mod.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR_VENDOR
+	bool "Enable vendor-specific extensions (for SCSI CDROM)"
+	depends on BLK_DEV_SR
+	help
+	  This enables the usage of vendor specific SCSI commands. This is
+	  required to support multisession CDs with old NEC/TOSHIBA cdrom
+	  drives (and HP Writers). If you have such a drive and get the first
+	  session only, try saying Y here; everybody else says N.
+
+config SR_EXTRA_DEVS
+	int "Maximum number of CDROM devices that can be loaded as modules"
+	depends on BLK_DEV_SR
+	default "2"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted. In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional CD-ROMs that can be loaded after
+	  the first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_SG
+	tristate "SCSI generic support"
+	depends on SCSI
+	---help---
+	  If you want to use SCSI scanners, synthesizers or CD-writers or just
+	  about anything having "SCSI" in its name other than hard disks,
+	  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
+	  directly, so you need some additional software which knows how to
+	  talk to these devices using the SCSI protocol:
+
+	  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
+	  writer software look at Cdrtools
+	  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
+	  and for burning a "disk at once": CDRDAO
+	  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
+	  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
+	  For other devices, it's possible that you'll have to write the
+	  driver software yourself. Please read the file
+	  <file:Documentation/scsi-generic.txt> for more information.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
+	  say N.
+
+comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+	depends on SCSI
+
+config SCSI_MULTI_LUN
+	bool "Probe all LUNs on each SCSI device"
+	depends on SCSI
+	help
+	  If you have a SCSI device that supports more than one LUN (Logical
+	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
+	  can say Y here to force the SCSI driver to probe for multiple LUNs.
+	  A SCSI device with multiple LUNs acts logically like multiple SCSI
+	  devices. The vast majority of SCSI devices have only one LUN, and
+	  so most people can say N here and should in fact do so, because it
+	  is safer.
+
+config SCSI_CONSTANTS
+	bool "Verbose SCSI error reporting (kernel size +=12K)"
+	depends on SCSI
+	help
+	  The error messages regarding your SCSI hardware will be easier to
+	  understand if you say Y here; it will enlarge your kernel by about
+	  12 KB. If in doubt, say Y.
+
+
+menu "SCSI low-level drivers"
+	depends on SCSI!=n
+
+config SCSI_LASI
+	tristate "Lasi SCSI support"
+	depends on GSC_LASI && SCSI
+
+config SCSI_ZALON
+	tristate "Zalon SCSI support"
+	depends on GSC_LASI && SCSI
+	help
+	  The Zalon is an interface chip that sits between the PA-RISC
+	  processor and the NCR 53c720 SCSI controller on K-series PA-RISC
+	  boards (these are used, among other places, on some HP 780
+	  workstations).  Say Y here to make sure it gets initialized
+	  correctly before the Linux kernel tries to talk to the controller.
+
+config SCSI_SYM53C8XX
+	tristate "SYM53C8XX SCSI support"
+	depends on PCI && SCSI
+	---help---
+	  This driver supports all the features of recent 53C8XX chips (used
+	  in PCI SCSI controllers), notably the hardware phase mismatch
+	  feature of the SYM53C896.
+
+	  Older versions of the 53C8XX chips are not supported by this
+	  driver.  If your system uses either a 810 rev. < 16, a 815, or a 825
+	  rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
+	  driver ("NCR53C8XX SCSI support" above) or configure both the
+	  NCR53C8XX and this SYM53C8XX drivers either as module or linked to
+	  the kernel image.
+
+	  When both drivers are linked into the kernel, the SYM53C8XX driver
+	  is called first at initialization and you can use the 'excl=ioaddr'
+	  driver boot option to exclude attachment of adapters by the
+	  SYM53C8XX driver.  For example, entering
+	  'sym53c8xx=excl:0xb400,excl=0xc000' at the lilo prompt prevents
+	  adapters at io address 0xb400 and 0xc000 from being attached by the
+	  SYM53C8XX driver, thus allowing the NCR53C8XX driver to attach them.
+	  The 'excl' option is also supported by the NCR53C8XX driver.
+
+	  Please read <file:drivers/scsi/README.ncr53c8xx> for more
+	  information.
+
+config SCSI_NCR53C8XX_DEFAULT_TAGS
+	int "default tagged command queue depth"
+	depends on SCSI_ZALON || SCSI_SYM53C8XX
+	default "8"
+	---help---
+	  "Tagged command queuing" is a feature of SCSI-2 which improves
+	  performance: the host adapter can send several SCSI commands to a
+	  device's queue even if previous commands haven't finished yet.
+	  Because the device is intelligent, it can optimize its operations
+	  (like head positioning) based on its own request queue. Some SCSI
+	  devices don't implement this properly; if you want to disable this
+	  feature, enter 0 or 1 here (it doesn't matter which).
+
+	  The default value is 8 and should be supported by most hard disks.
+	  This value can be overridden from the boot command line using the
+	  'tags' option as follows (example):
+	  'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to
+	  4, set queue depth to 16 for target 2 and target 3 on controller 0
+	  and set queue depth to 10 for target 0 / lun 2 on controller 1.
+
+	  The normal answer therefore is to go with the default 8 and to use
+	  a boot command line option for devices that need to use a different
+	  command queue depth.
+
+	  There is no safe option other than using good SCSI devices.
+
+config SCSI_NCR53C8XX_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on SCSI_ZALON || SCSI_SYM53C8XX
+	default "32"
+	---help---
+	  This option allows you to specify the maximum number of commands
+	  that can be queued to any device, when tagged command queuing is
+	  possible. The default value is 32. Minimum is 2, maximum is 64.
+	  Modern hard disks are able to support 64 tags and even more, but
+	  do not seem to be faster when more than 32 tags are being used.
+
+	  So, the normal answer here is to go with the default value 32 unless
+	  you are using very large hard disks with large cache (>= 1 MB) that
+	  are able to take advantage of more than 32 tagged commands.
+
+	  There is no safe option and the default answer is recommended.
+
+config SCSI_NCR53C8XX_SYNC
+	int "synchronous transfers frequency in MHz"
+	depends on SCSI_ZALON || SCSI_SYM53C8XX
+	default "20"
+	---help---
+	  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
+	  rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers
+	  are respectively the maximum data transfer rates in mega-transfers
+	  per second for each class.  For example, a FAST-20 Wide 16 device is
+	  able to transfer data at 20 million 16 bit packets per second for a
+	  total rate of 40 MB/s.
+
+	  You may specify 0 if you want to only use asynchronous data
+	  transfers. This is the safest and slowest option. Otherwise, specify
+	  a value between 5 and 80, depending on the capability of your SCSI
+	  controller.  The higher the number, the faster the data transfer.
+	  Note that 80 should normally be ok since the driver decreases the
+	  value automatically according to the controller's capabilities.
+
+	  Your answer to this question is ignored for controllers with NVRAM,
+	  since the driver will get this information from the user set-up.  It
+	  also can be overridden using a boot setup option, as follows
+	  (example): 'ncr53c8xx=sync:12' will allow the driver to negotiate
+	  for FAST-20 synchronous data transfer (20 mega-transfers per
+	  second).
+
+	  The normal answer therefore is not to go with the default but to
+	  select the maximum value 80 allowing the driver to use the maximum
+	  value supported by each controller. If this causes problems with
+	  your SCSI devices, you should come back and decrease the value.
+
+	  There is no safe option other than using good cabling, right
+	  terminations and SCSI conformant devices.
+
+config SCSI_NCR53C8XX_PROFILE
+	bool "enable profiling"
+	depends on SCSI_ZALON || SCSI_SYM53C8XX
+	help
+	  This option allows you to enable profiling information gathering.
+	  These statistics are not very accurate due to the low frequency
+	  of the kernel clock (100 Hz on i386) and have performance impact
+	  on systems that use very fast devices.
+
+	  The normal answer therefore is N.
+
+config SCSI_NCR53C8XX_IOMAPPED
+	bool "use normal IO"
+	depends on SCSI_ZALON || SCSI_SYM53C8XX
+	help
+	  If you say Y here, the driver will use normal IO, as opposed to
+	  memory mapped IO. Memory mapped IO has less latency than normal IO
+	  and works for most Intel-based hardware. Under Linux/Alpha only
+	  normal IO is currently supported by the driver and so, this option
+	  has no effect on those systems.
+
+	  The normal answer therefore is N; try Y only if you encounter SCSI
+	  related problems.
+
+endmenu
+
+endmenu
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+config LASI_82596
+	tristate "Lasi ethernet"
+	depends on NETDEVICES && GSC_LASI
+	help
+	  Say Y here to support the on-board Intel 82596 ethernet controller
+	  built into Hewlett-Packard PA-RISC machines.
+
+source "drivers/net/Kconfig"
+
+endmenu
+
+source "drivers/char/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Sound Drivers"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+
+menu "Console drivers"
+	depends on VT
+
+source "drivers/video/Kconfig"
+
+#  bool 'IODC console' CONFIG_IODC_CONSOLE
+config STI_CONSOLE
+	bool "STI console"
+	help
+	  The STI console is the builtin display/keyboard on HP-PARISC
+	  machines.  Say Y here to build support for it into your kernel.
+	  The alternative is to use your primary serial port as a console.
+
+config DUMMY_CONSOLE
+	bool
+	depends on STI_CONSOLE || !IODC_CONSOLE && GSC_PS2
+	default y
+
+endmenu
+
+# endmenu
+
+menu "Kernel hacking"
+
+#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/parisc/Makefile b/arch/parisc/Makefile
--- a/arch/parisc/Makefile	Wed Oct 30 16:44:33 2002
+++ b/arch/parisc/Makefile	Wed Oct 30 16:44:33 2002
@@ -17,6 +17,19 @@
 # Mike Shaver, Helge Deller and Martin K. Petersen
 #
 
+ifdef CONFIG_PARISC64
+CROSS_COMPILE := hppa64-linux-
+UTS_MACHINE := parisc64
+#CFLAGS += -b hppa64-linux
+
+else
+MACHINE	:= $(subst 64,,$(shell uname -m))
+ifneq (${MACHINE},parisc)
+# cross compilation
+CROSS_COMPILE := hppa-linux-
+endif
+endif
+
 FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 
 
 OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
@@ -29,29 +42,63 @@
 # enable them by default.
 CFLAGS += -mno-space-regs -mfast-indirect-calls
 
-# If we become able to compile for specific platforms, this should be
-# conditional on that.
-CFLAGS += -mschedule=7200
-
 # No fixed-point multiply
 CFLAGS += -mdisable-fpregs
 
-HEAD = arch/parisc/kernel/head.o 
+# Without this, "ld -r" results in .text sections that are too big
+# (> 0x40000) for branches to reach stubs.
+CFLAGS += -ffunction-sections
+
+# select which processor to optimise for
+ifdef CONFIG_PA7100
+CFLAGS += -march=1.1 -mschedule=7100
+endif
+
+ifdef CONFIG_PA7200
+CFLAGS += -march=1.1 -mschedule=7200
+endif
+
+ifdef CONFIG_PA7100LC
+CFLAGS += -march=1.1 -mschedule=7100LC
+endif
+
+ifdef CONFIG_PA8X00
+CFLAGS += -march=2.0 -mschedule=8000
+endif
+
+HEAD := arch/parisc/kernel/head.o 
+ifdef CONFIG_PARISC64
+HEAD := arch/parisc/kernel/head64.o
+endif
 
-SUBDIRS += arch/parisc/tools
 core-y					+= arch/parisc/kernel/pdc_cons.o  \
 					   arch/parisc/kernel/process.o   \
 	   				   arch/parisc/mm/	          \
 					   arch/parisc/kernel/            \
 					   arch/parisc/hpux/		  \
+					   arch/parisc/math-emu/	  \
 					   arch/parisc/kernel/init_task.o
-libs-y					+= arch/parisc/lib/lib.a          \
+libs-y					+= arch/parisc/lib/ \
 					   `$(CC) -print-libgcc-file-name`
 drivers-$(CONFIG_MATH_EMULATION)	+= arch/parisc/math-emu/
-drivers-$(CONFIG_KWDB)			+= arch/parisc/kdb/
 
 palo: vmlinux
-	export TOPDIR=`pwd`; export CONFIG_STI_CONSOLE=$(CONFIG_STI_CONSOLE); \
+	@if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \
+		echo 'ERROR: Please install palo first (apt-get install palo)';\
+		echo 'or build it from source and install it somewhere in your $$PATH';\
+		false; \
+	fi
+	@if [ ! -f ./palo.conf ]; then \
+		cp arch/parisc/defpalo.conf palo.conf; \
+		echo 'A generic palo config file (./palo.conf) has been created for you.'; \
+		echo 'You should check it and re-run "make palo".'; \
+		echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
+		false; \
+	fi
+	palo -f ./palo.conf
+
+oldpalo: vmlinux
+	export TOPDIR=`pwd`; \
 	unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
 
 Image: palo
@@ -68,6 +115,19 @@
 
 install: 
 
+archmrproper:
+
 archclean:
 
-archmrproper:
+prepare: include/asm-$(ARCH)/offsets.h
+
+arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
+				   include/config/MARKER
+
+include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
+	@$(generate-asm-offsets.h) < $< > $@
+
+include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
+	@echo -n '  Generating $@'
+	@$(update-if-changed)
+
diff -Nru a/arch/parisc/config.in b/arch/parisc/config.in
--- a/arch/parisc/config.in	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,198 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see the Configure script.
-#
-
-mainmenu_name "Linux Kernel Configuration"
-
-define_bool CONFIG_PARISC y
-define_bool CONFIG_UID16 n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'General options'
-
-# bool 'Symmetric multi-processing support' CONFIG_SMP
-define_bool CONFIG_SMP n
-
-if [ "$CONFIG_SMP" = "y" ]; then
-   int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-fi
-
-bool 'Kernel Debugger support' CONFIG_KWDB
-# define_bool CONFIG_KWDB n
-
-# bool 'GSC/Gecko bus support' CONFIG_GSC y
-define_bool CONFIG_GSC y
-
-bool 'U2/Uturn I/O MMU' CONFIG_IOMMU_CCIO
-bool 'LASI I/O support' CONFIG_GSC_LASI
-
-bool 'PCI support' CONFIG_PCI
-
-if [ "$CONFIG_PCI" = "y" ]; then
-	bool 'GSCtoPCI/DINO PCI support' CONFIG_GSC_DINO
-	bool 'LBA/Elroy PCI support' CONFIG_PCI_LBA
-fi 
-
-if [ "$CONFIG_PCI_LBA" = "y" ]; then
-	define_bool CONFIG_IOSAPIC y
-	define_bool CONFIG_IOMMU_SBA y
-fi
-
-#
-# if [ "$CONFIG_PCI_EPIC" = "y" ]; then...
-#
-
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-tristate 'Kernel support for SOM binaries' CONFIG_BINFMT_SOM
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
-fi
-
-endmenu
-
-##source drivers/parport/Config.in
-mainmenu_option next_comment
-comment 'Parallel port support'
-
-tristate 'Parallel port support' CONFIG_PARPORT
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   if [ "$CONFIG_PCI" = "y" ]; then
-     dep_tristate '  PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
-     if [ "$CONFIG_PARPORT_PC" != "n" ]; then
-        bool '    Use FIFO/DMA if available' CONFIG_PARPORT_PC_FIFO
-        if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-           bool '    SuperIO chipset support (EXPERIMENTAL)' CONFIG_PARPORT_PC_SUPERIO
-        fi
-     fi
-   fi
-   if [ "$CONFIG_GSC_LASI" = "y" ]; then
-      dep_tristate '  LASI/ASP builtin parallel-port' CONFIG_PARPORT_GSC $CONFIG_PARPORT
-   else
-      define_tristate CONFIG_PARPORT_GSC n
-   fi
-
-   # If exactly one hardware type is selected then parport will optimise away
-   # support for loading any others.  Defeat this if the user is keen.
-   bool '  Support foreign hardware' CONFIG_PARPORT_OTHER
-
-   bool '  IEEE 1284 transfer modes' CONFIG_PARPORT_1284
-fi
-endmenu
-
-
-source drivers/block/Config.in
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-  comment 'SCSI support type (disk, tape, CDrom)'
-
-  dep_tristate 'SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
-  if [ "$CONFIG_BLK_DEV_SD" != "n" ]; then
-    int  'Maximum number of SCSI disks that can be loaded as modules' CONFIG_SD_EXTRA_DEVS 40
-  fi
-
-  dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
-  dep_tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
-  if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-    bool '  Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
-    int  'Maximum number of CDROM devices that can be loaded as modules' CONFIG_SR_EXTRA_DEVS 2
-  fi
-  dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
-
-  comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
-  bool 'Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
-  bool 'Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
-
-  mainmenu_option next_comment
-  comment 'SCSI low-level drivers'
-  if [ "$CONFIG_GSC_LASI" = "y" ]; then
-    dep_tristate 'Lasi SCSI support' CONFIG_SCSI_LASI $CONFIG_SCSI
-    dep_tristate 'Zalon SCSI support' CONFIG_SCSI_ZALON $CONFIG_SCSI
-  fi
-  if [ "$CONFIG_PCI" = "y" ]; then
-    dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
-  fi
-  if [ "$CONFIG_SCSI_ZALON" != "n" -o "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
-    int  '  default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
-    int  '  maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
-    int  '  synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 20
-    bool '  enable profiling' CONFIG_SCSI_NCR53C8XX_PROFILE
-    bool '  use normal IO' CONFIG_SCSI_NCR53C8XX_IOMAPPED
-  fi
-  endmenu
-fi
-endmenu
-
-if [ "$CONFIG_NET" = "y" ]; then
-  source net/Config.in
-
-  mainmenu_option next_comment
-  comment 'Network device support'
-
-  bool 'Network device support' CONFIG_NETDEVICES
-
-  if [ "$CONFIG_NETDEVICES" = "y" ]; then
-    if [ "$CONFIG_GSC_LASI" = "y" ]; then
-      tristate 'Lasi ethernet' CONFIG_LASI_82596
-    fi
-    source drivers/net/Config.in
-  fi
-  endmenu
-fi
-
-source drivers/char/Config.in
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'Sound Drivers'
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_VT" = "y" ]; then
-  mainmenu_option next_comment
-  comment 'Console drivers'
-  source drivers/video/Config.in
-
-#  bool 'IODC console' CONFIG_IODC_CONSOLE
-  bool 'STI console' CONFIG_STI_CONSOLE
-  if [ "$CONFIG_IODC_CONSOLE" = "n" ]; then
-    if [ "$CONFIG_GSC_PS2" = "y" ]; then
-      define_bool CONFIG_DUMMY_CONSOLE y
-    fi
-  fi
-  if [ "$CONFIG_STI_CONSOLE" = "y" ]; then
-    define_bool CONFIG_DUMMY_CONSOLE y
-  fi
-  endmenu
-fi
-# endmenu
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/parisc/defconfig b/arch/parisc/defconfig
--- a/arch/parisc/defconfig	Wed Oct 30 16:44:19 2002
+++ b/arch/parisc/defconfig	Wed Oct 30 16:44:19 2002
@@ -1,8 +1,12 @@
 #
-# Automatically generated by make menuconfig: don't edit
+# Automatically generated make config: don't edit
 #
 CONFIG_PARISC=y
 # CONFIG_UID16 is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_GENERIC_ISA_DMA=y
+# CONFIG_PM is not set
 
 #
 # Code maturity level options
@@ -10,44 +14,71 @@
 CONFIG_EXPERIMENTAL=y
 
 #
-# General options
+# General setup
+#
+CONFIG_NET=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+
 #
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Processor type and features
+#
+CONFIG_PA7100=y
+# CONFIG_PA7200 is not set
+# CONFIG_PA7100LC is not set
+# CONFIG_PA8X00 is not set
+CONFIG_PA11=y
 # CONFIG_SMP is not set
-# CONFIG_KWDB is not set
-CONFIG_GSC=y
+# CONFIG_PREEMPT is not set
+CONFIG_CHASSIS_LCD_LED=y
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
 CONFIG_IOMMU_CCIO=y
+CONFIG_GSC=y
 CONFIG_GSC_LASI=y
+CONFIG_GSC_WAX=y
+CONFIG_EISA=y
+CONFIG_ISA=y
 CONFIG_PCI=y
 CONFIG_GSC_DINO=y
 CONFIG_PCI_LBA=y
 CONFIG_IOSAPIC=y
 CONFIG_IOMMU_SBA=y
+CONFIG_SUPERIO=y
+CONFIG_PCI_NAMES=y
 
 #
-# Loadable module support
-#
-CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
-CONFIG_KMOD=y
-
-#
-# General setup
+# Executable file formats
 #
-CONFIG_NET=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+CONFIG_KCORE_ELF=y
 CONFIG_BINFMT_SOM=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
-# CONFIG_BINFMT_JAVA is not set
 
 #
 # Parallel port support
 #
 CONFIG_PARPORT=y
-# CONFIG_PARPORT_PC is not set
+CONFIG_PARPORT_PC=y
+CONFIG_PARPORT_PC_CML1=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+# CONFIG_PARPORT_PC_SUPERIO is not set
+# CONFIG_PARPORT_AMIGA is not set
+# CONFIG_PARPORT_MFC3 is not set
+# CONFIG_PARPORT_ATARI is not set
 CONFIG_PARPORT_GSC=y
+# CONFIG_PARPORT_SUNBPP is not set
 # CONFIG_PARPORT_OTHER is not set
 # CONFIG_PARPORT_1284 is not set
 
@@ -59,41 +90,157 @@
 # 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_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 
 #
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+CONFIG_MD_RAID5=y
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+# CONFIG_IDE is not set
+# CONFIG_BLK_DEV_IDE_MODES is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI support
+#
+CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_SD_EXTRA_DEVS=40
+CONFIG_CHR_DEV_ST=y
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_SR_EXTRA_DEVS=2
+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 is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID 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
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_NCR53C406A is not set
+CONFIG_SCSI_LASI700=y
+CONFIG_53C700_MEM_MAPPED=y
+CONFIG_53C700_LE_ON_BE=y
+CONFIG_53C700_USE_CONSISTENT=y
+# CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_ASK_ZALON is not set
+# CONFIG_ASK_NCR53C8XX is not set
+# CONFIG_ASK_SYM53C8XX is not set
+CONFIG_SCSI_ZALON=y
+CONFIG_ASK_ZALON=y
+CONFIG_SCSI_SYM53C8XX=y
+CONFIG_ASK_SYM53C8XX=y
+CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
+CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
+CONFIG_SCSI_NCR53C8XX_SYNC=20
+# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
+# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_SIM710 is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
 # Networking options
 #
-# CONFIG_PACKET is not set
-# CONFIG_NETLINK is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=y
 # CONFIG_NETFILTER is not set
-# CONFIG_FILTER is not set
+CONFIG_FILTER=y
 CONFIG_UNIX=y
 CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
+CONFIG_IP_MULTICAST=y
 # 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_IP_MROUTE 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_VLAN_8021Q is not set
+# CONFIG_LLC is not set
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
+# CONFIG_DEV_APPLETALK 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
@@ -106,36 +253,9 @@
 # CONFIG_NET_SCHED is not set
 
 #
-# SCSI support
-#
-CONFIG_SCSI=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_SD_EXTRA_DEVS=40
-CONFIG_CHR_DEV_ST=y
-CONFIG_BLK_DEV_SR=y
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_SR_EXTRA_DEVS=2
-CONFIG_CHR_DEV_SG=y
-# CONFIG_SCSI_MULTI_LUN is not set
-# CONFIG_SCSI_CONSTANTS is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_SCSI_LASI=y
-CONFIG_SCSI_ZALON=y
-CONFIG_SCSI_SYM53C8XX=y
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
-CONFIG_SCSI_NCR53C8XX_SYNC=20
-# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
-# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
-
-#
 # Network device support
 #
 CONFIG_NETDEVICES=y
-CONFIG_LASI_82596=y
 
 #
 # ARCnet devices
@@ -145,12 +265,18 @@
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-# CONFIG_NET_SB1000 is not set
+# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+CONFIG_LASI_82596=y
+# CONFIG_SUNLANCE is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE 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
@@ -165,33 +291,41 @@
 # CONFIG_AC3200 is not set
 # CONFIG_APRICOT is not set
 # CONFIG_CS89x0 is not set
-# CONFIG_DE4X5 is not set
-CONFIG_TULIP=y
 # CONFIG_DGRS is not set
-# CONFIG_DM9102 is not set
 # CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
 # CONFIG_LNE390 is not set
+# CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
 # CONFIG_NE3210 is not set
 # CONFIG_ES3210 is not set
-# CONFIG_RTL8129 is not set
+# CONFIG_8139CP is not set
 # CONFIG_8139TOO is not set
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139TOO_8129 is not set
+# CONFIG_8139_NEW_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_WINBOND_840 is not set
+# CONFIG_VIA_RHINE_MMIO 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_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_TIGON3 is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PLIP is not set
@@ -217,17 +351,137 @@
 # CONFIG_WAN 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_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+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=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+# CONFIG_GAMEPORT_NS558 is not set
+# CONFIG_GAMEPORT_L4 is not set
+# CONFIG_GAMEPORT_EMU10K1 is not set
+# CONFIG_GAMEPORT_VORTEX is not set
+# CONFIG_GAMEPORT_FM801 is not set
+# CONFIG_GAMEPORT_CS461x is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_I8042_REG_BASE=60
+CONFIG_I8042_KBD_IRQ=1
+CONFIG_I8042_AUX_IRQ=12
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+
+#
+#   HP HIL driver core support
+#
+CONFIG_HP_SDC=y
+# CONFIG_HP_SDC_RTC is not set
+CONFIG_HIL_MLC=y
+CONFIG_HP_SDC_MLC=y
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_HIL_KBD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_HIL_PTR is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_JOYSTICK_ANALOG is not set
+# CONFIG_JOYSTICK_A3D is not set
+# CONFIG_JOYSTICK_ADI is not set
+# CONFIG_JOYSTICK_COBRA is not set
+# CONFIG_JOYSTICK_GF2K is not set
+# CONFIG_JOYSTICK_GRIP is not set
+# CONFIG_JOYSTICK_GRIP_MP is not set
+# CONFIG_JOYSTICK_GUILLEMOT is not set
+# CONFIG_JOYSTICK_INTERACT is not set
+# CONFIG_JOYSTICK_SIDEWINDER is not set
+# CONFIG_JOYSTICK_TMDC is not set
+# CONFIG_JOYSTICK_IFORCE is not set
+# CONFIG_JOYSTICK_WARRIOR is not set
+# CONFIG_JOYSTICK_MAGELLAN is not set
+# CONFIG_JOYSTICK_SPACEORB is not set
+# CONFIG_JOYSTICK_SPACEBALL is not set
+# CONFIG_JOYSTICK_STINGER is not set
+# CONFIG_JOYSTICK_TWIDDLER is not set
+# CONFIG_JOYSTICK_DB9 is not set
+# CONFIG_JOYSTICK_GAMECON is not set
+# CONFIG_JOYSTICK_TURBOGRAFX is not set
+# CONFIG_INPUT_JOYDUMP is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_INPUT_MISC is not set
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_UINPUT is not set
+
+#
 # Character devices
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
-CONFIG_GSC_PS2=y
-CONFIG_HIL=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SERIAL_GSC=y
-# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+# CONFIG_SERIAL_8250_CONSOLE is not set
+# CONFIG_SERIAL_8250_CS 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_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_PDC_CONSOLE is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 CONFIG_PRINTER=y
@@ -243,22 +497,16 @@
 # Mice
 #
 # CONFIG_BUSMOUSE is not set
-# CONFIG_MOUSE is not set
-
-#
-# Joysticks
-#
-# CONFIG_JOYSTICK is not set
 # CONFIG_QIC02_TAPE is not set
 
 #
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
-CONFIG_GENRTC=y
-# CONFIG_INTEL_RNG is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
+CONFIG_GEN_RTC=y
+CONFIG_GEN_RTC_X=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -269,29 +517,50 @@
 # CONFIG_FTAPE is not set
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
 
 #
 # File systems
 #
 # CONFIG_QUOTA is not set
+# CONFIG_QFMT_V1 is not set
+# CONFIG_QFMT_V2 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_REISERFS_PROC_INFO 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_EXT3_FS=y
+CONFIG_JBD=y
+# 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 is not set
 # CONFIG_CRAMFS is not set
-# CONFIG_RAMFS is not set
+# CONFIG_TMPFS is not set
+CONFIG_RAMFS=y
 CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
 # CONFIG_NTFS_FS is not set
 # CONFIG_NTFS_DEBUG is not set
 # CONFIG_NTFS_RW is not set
@@ -300,13 +569,12 @@
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVFS_MOUNT is not set
 # CONFIG_DEVFS_DEBUG is not set
-# CONFIG_DEVPTS_FS 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_SYSV_FS_WRITE is not set
 # CONFIG_UDF_FS is not set
 # CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
@@ -316,13 +584,17 @@
 # Network File Systems
 #
 # CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 CONFIG_NFS_FS=y
-# CONFIG_NFS_V3 is not set
+CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y
-# CONFIG_NFSD is not set
-# CONFIG_NFSD_V3 is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_NCPFS_PACKET_SIGNING is not set
@@ -331,22 +603,59 @@
 # CONFIG_NCPFS_NFS_NS is not set
 # CONFIG_NCPFS_OS2_NS is not set
 # CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_MOUNT_SUBDIR is not set
-# CONFIG_NCPFS_NDS_DOMAINS is not set
 # CONFIG_NCPFS_NLS is not set
 # CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_NLS is not set
+# CONFIG_SMB_NLS is not set
+CONFIG_NLS=y
 
 #
-# Sound Drivers
+# Native Language Support
 #
-# CONFIG_SOUND is not set
+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
 
 #
 # Console drivers
@@ -355,10 +664,71 @@
 #
 # Frame-buffer support
 #
-# CONFIG_FB is not set
-# CONFIG_STI_CONSOLE is not set
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_CLGEN is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_STI is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_FBCON_ADVANCED is not set
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+# CONFIG_FBCON_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_STI_CONSOLE=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FBCON=y
+CONFIG_FBCON_FONT=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_6x11=y
+CONFIG_FONT_SUN12x22=y
+
+#
+# Sound Drivers
+#
+CONFIG_SOUND=y
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
 
 #
 # Kernel hacking
 #
 CONFIG_MAGIC_SYSRQ=y
+
+#
+# Security options
+#
+CONFIG_SECURITY_CAPABILITIES=y
+
+#
+# Library routines
+#
+# CONFIG_CRC32 is not set
+# CONFIG_ZLIB_INFLATE is not set
+# CONFIG_ZLIB_DEFLATE is not set
diff -Nru a/arch/parisc/defpalo.conf b/arch/parisc/defpalo.conf
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/defpalo.conf	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,21 @@
+# This a generic Palo configuration file.  For more information about how
+# it works try 'palo -?'.
+#
+# Most people using 'make palo' want a bootable file, usable for
+# network or tape booting for example.
+--init-tape=lifimage
+--recoverykernel=vmlinux
+
+########## Pick your ROOT here! ##########
+# You need at least one 'root='!
+#
+# If you want a root ramdisk, use the next 2 lines
+#   (Edit the ramdisk image name!!!!)
+--ramdisk=ram-disk-image-file
+--commandline=0/vmlinux HOME=/ root=/dev/ram initrd=0/ramdisk
+
+# If you want NFS root, use the following command line (Edit the HOSTNAME!!!)
+#--commandline=0/vmlinux HOME=/ root=/dev/nfs nfsroot=HOSTNAME ip=bootp
+
+# If you have root on a disk partition, use this (Edit the partition name!!!)
+#--commandline=0/vmlinux HOME=/ root=/dev/sda1
diff -Nru a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile
--- a/arch/parisc/kernel/Makefile	Wed Oct 30 16:44:27 2002
+++ b/arch/parisc/kernel/Makefile	Wed Oct 30 16:44:27 2002
@@ -2,29 +2,30 @@
 # Makefile for the linux kernel.
 #
 
-EXTRA_TARGETS	:= head.o init_task.o process.o pdc_cons.o
+ifdef CONFIG_PARISC64
+EXTRA_TARGETS := init_task.o pdc_cons.o process.o head64.o unaligned.o perf.o perf_asm.o
+else
+EXTRA_TARGETS := init_task.o pdc_cons.o process.o head.o unaligned.o
+endif
 
-# Object file lists.
+AFLAGS_entry.o := -traditional
+AFLAGS_pacache.o := -traditional
 
-obj-y	     	:= cache.o setup.o traps.o time.o irq.o \
-		   syscall.o entry.o sys_parisc.o pdc.o ptrace.o hardware.o \
-		   inventory.o drivers.o semaphore.o pa7300lc.o pci-dma.o \
-		   signal.o hpmc.o \
-		   real1.o real2.o led.o parisc_ksyms.o
+export-objs	:= parisc_ksyms.o keyboard.o
 
-export-objs	:= parisc_ksyms.o
+obj-y	     	:= cache.o pacache.o setup.o traps.o time.o irq.o \
+		   pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
+		   ptrace.o hardware.o inventory.o drivers.o semaphore.o \
+		   signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \
+		   processor.o pdc_chassis.o
 
+obj-$(CONFIG_SMP) += smp.o 
+obj-$(CONFIG_PA11) += pci-dma.o
 obj-$(CONFIG_PCI) += pci.o
 obj-$(CONFIG_VT) += keyboard.o
-obj-$(CONFIG_PCI_LBA) += lba_pci.o
-# I/O SAPIC is also on IA64 platforms.
-# The two could be merged into a common source some day.
-obj-$(CONFIG_IOSAPIC) += iosapic.o
-obj-$(CONFIG_IOMMU_SBA) += sba_iommu.o
-# Only use one of them: ccio-rm-dma is for PCX-W systems *only*
-# obj-$(CONFIG_IOMMU_CCIO) += ccio-rm-dma.o
-obj-$(CONFIG_IOMMU_CCIO) += ccio-dma.o
-
-EXTRA_AFLAGS	:= -traditional
+obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o \
+		ioctl32.o signal32.o
+# only supported for PCX-W/U in 64-bit mode at the moment
+obj-$(CONFIG_PARISC64) += perf.o perf_asm.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/arch/parisc/kernel/asm-offsets.c b/arch/parisc/kernel/asm-offsets.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/asm-offsets.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,250 @@
+/* 
+ * Generate definitions needed by assembly language modules.
+ * This code generates raw asm output which is post-processed to extract
+ * and format the required data.
+ */
+
+#include <linux/types.h>
+#include <linux/sched.h>
+#include <linux/thread_info.h>
+#include <linux/version.h>
+
+#include <asm/ptrace.h>
+#include <asm/processor.h>
+#include <asm/hardirq.h>
+#include <asm/pdc.h>
+
+#define DEFINE(sym, val) \
+	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define BLANK() asm volatile("\n->" : : )
+
+#ifdef __LP64__
+#define FRAME_SIZE	128
+#else
+#define FRAME_SIZE	64
+#endif
+
+#define align(x,y) (((x)+FRAME_SIZE+(y)-1) - (((x)+(y)-1)%(y)))
+
+int main(void)
+{
+	DEFINE(TASK_STATE, offsetof(struct task_struct, state));
+	DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
+	DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending));
+	DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
+	DEFINE(TASK_MM, offsetof(struct task_struct, mm));
+	DEFINE(TASK_PERSONALITY, offsetof(struct task_struct, personality));
+	BLANK();
+	DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs));
+	DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0]));
+	DEFINE(TASK_PT_GR1, offsetof(struct task_struct, thread.regs.gr[ 1]));
+	DEFINE(TASK_PT_GR2, offsetof(struct task_struct, thread.regs.gr[ 2]));
+	DEFINE(TASK_PT_GR3, offsetof(struct task_struct, thread.regs.gr[ 3]));
+	DEFINE(TASK_PT_GR4, offsetof(struct task_struct, thread.regs.gr[ 4]));
+	DEFINE(TASK_PT_GR5, offsetof(struct task_struct, thread.regs.gr[ 5]));
+	DEFINE(TASK_PT_GR6, offsetof(struct task_struct, thread.regs.gr[ 6]));
+	DEFINE(TASK_PT_GR7, offsetof(struct task_struct, thread.regs.gr[ 7]));
+	DEFINE(TASK_PT_GR8, offsetof(struct task_struct, thread.regs.gr[ 8]));
+	DEFINE(TASK_PT_GR9, offsetof(struct task_struct, thread.regs.gr[ 9]));
+	DEFINE(TASK_PT_GR10, offsetof(struct task_struct, thread.regs.gr[10]));
+	DEFINE(TASK_PT_GR11, offsetof(struct task_struct, thread.regs.gr[11]));
+	DEFINE(TASK_PT_GR12, offsetof(struct task_struct, thread.regs.gr[12]));
+	DEFINE(TASK_PT_GR13, offsetof(struct task_struct, thread.regs.gr[13]));
+	DEFINE(TASK_PT_GR14, offsetof(struct task_struct, thread.regs.gr[14]));
+	DEFINE(TASK_PT_GR15, offsetof(struct task_struct, thread.regs.gr[15]));
+	DEFINE(TASK_PT_GR16, offsetof(struct task_struct, thread.regs.gr[16]));
+	DEFINE(TASK_PT_GR17, offsetof(struct task_struct, thread.regs.gr[17]));
+	DEFINE(TASK_PT_GR18, offsetof(struct task_struct, thread.regs.gr[18]));
+	DEFINE(TASK_PT_GR19, offsetof(struct task_struct, thread.regs.gr[19]));
+	DEFINE(TASK_PT_GR20, offsetof(struct task_struct, thread.regs.gr[20]));
+	DEFINE(TASK_PT_GR21, offsetof(struct task_struct, thread.regs.gr[21]));
+	DEFINE(TASK_PT_GR22, offsetof(struct task_struct, thread.regs.gr[22]));
+	DEFINE(TASK_PT_GR23, offsetof(struct task_struct, thread.regs.gr[23]));
+	DEFINE(TASK_PT_GR24, offsetof(struct task_struct, thread.regs.gr[24]));
+	DEFINE(TASK_PT_GR25, offsetof(struct task_struct, thread.regs.gr[25]));
+	DEFINE(TASK_PT_GR26, offsetof(struct task_struct, thread.regs.gr[26]));
+	DEFINE(TASK_PT_GR27, offsetof(struct task_struct, thread.regs.gr[27]));
+	DEFINE(TASK_PT_GR28, offsetof(struct task_struct, thread.regs.gr[28]));
+	DEFINE(TASK_PT_GR29, offsetof(struct task_struct, thread.regs.gr[29]));
+	DEFINE(TASK_PT_GR30, offsetof(struct task_struct, thread.regs.gr[30]));
+	DEFINE(TASK_PT_GR31, offsetof(struct task_struct, thread.regs.gr[31]));
+	DEFINE(TASK_PT_FR0, offsetof(struct task_struct, thread.regs.fr[ 0]));
+	DEFINE(TASK_PT_FR1, offsetof(struct task_struct, thread.regs.fr[ 1]));
+	DEFINE(TASK_PT_FR2, offsetof(struct task_struct, thread.regs.fr[ 2]));
+	DEFINE(TASK_PT_FR3, offsetof(struct task_struct, thread.regs.fr[ 3]));
+	DEFINE(TASK_PT_FR4, offsetof(struct task_struct, thread.regs.fr[ 4]));
+	DEFINE(TASK_PT_FR5, offsetof(struct task_struct, thread.regs.fr[ 5]));
+	DEFINE(TASK_PT_FR6, offsetof(struct task_struct, thread.regs.fr[ 6]));
+	DEFINE(TASK_PT_FR7, offsetof(struct task_struct, thread.regs.fr[ 7]));
+	DEFINE(TASK_PT_FR8, offsetof(struct task_struct, thread.regs.fr[ 8]));
+	DEFINE(TASK_PT_FR9, offsetof(struct task_struct, thread.regs.fr[ 9]));
+	DEFINE(TASK_PT_FR10, offsetof(struct task_struct, thread.regs.fr[10]));
+	DEFINE(TASK_PT_FR11, offsetof(struct task_struct, thread.regs.fr[11]));
+	DEFINE(TASK_PT_FR12, offsetof(struct task_struct, thread.regs.fr[12]));
+	DEFINE(TASK_PT_FR13, offsetof(struct task_struct, thread.regs.fr[13]));
+	DEFINE(TASK_PT_FR14, offsetof(struct task_struct, thread.regs.fr[14]));
+	DEFINE(TASK_PT_FR15, offsetof(struct task_struct, thread.regs.fr[15]));
+	DEFINE(TASK_PT_FR16, offsetof(struct task_struct, thread.regs.fr[16]));
+	DEFINE(TASK_PT_FR17, offsetof(struct task_struct, thread.regs.fr[17]));
+	DEFINE(TASK_PT_FR18, offsetof(struct task_struct, thread.regs.fr[18]));
+	DEFINE(TASK_PT_FR19, offsetof(struct task_struct, thread.regs.fr[19]));
+	DEFINE(TASK_PT_FR20, offsetof(struct task_struct, thread.regs.fr[20]));
+	DEFINE(TASK_PT_FR21, offsetof(struct task_struct, thread.regs.fr[21]));
+	DEFINE(TASK_PT_FR22, offsetof(struct task_struct, thread.regs.fr[22]));
+	DEFINE(TASK_PT_FR23, offsetof(struct task_struct, thread.regs.fr[23]));
+	DEFINE(TASK_PT_FR24, offsetof(struct task_struct, thread.regs.fr[24]));
+	DEFINE(TASK_PT_FR25, offsetof(struct task_struct, thread.regs.fr[25]));
+	DEFINE(TASK_PT_FR26, offsetof(struct task_struct, thread.regs.fr[26]));
+	DEFINE(TASK_PT_FR27, offsetof(struct task_struct, thread.regs.fr[27]));
+	DEFINE(TASK_PT_FR28, offsetof(struct task_struct, thread.regs.fr[28]));
+	DEFINE(TASK_PT_FR29, offsetof(struct task_struct, thread.regs.fr[29]));
+	DEFINE(TASK_PT_FR30, offsetof(struct task_struct, thread.regs.fr[30]));
+	DEFINE(TASK_PT_FR31, offsetof(struct task_struct, thread.regs.fr[31]));
+	DEFINE(TASK_PT_SR0, offsetof(struct task_struct, thread.regs.sr[ 0]));
+	DEFINE(TASK_PT_SR1, offsetof(struct task_struct, thread.regs.sr[ 1]));
+	DEFINE(TASK_PT_SR2, offsetof(struct task_struct, thread.regs.sr[ 2]));
+	DEFINE(TASK_PT_SR3, offsetof(struct task_struct, thread.regs.sr[ 3]));
+	DEFINE(TASK_PT_SR4, offsetof(struct task_struct, thread.regs.sr[ 4]));
+	DEFINE(TASK_PT_SR5, offsetof(struct task_struct, thread.regs.sr[ 5]));
+	DEFINE(TASK_PT_SR6, offsetof(struct task_struct, thread.regs.sr[ 6]));
+	DEFINE(TASK_PT_SR7, offsetof(struct task_struct, thread.regs.sr[ 7]));
+	DEFINE(TASK_PT_IASQ0, offsetof(struct task_struct, thread.regs.iasq[0]));
+	DEFINE(TASK_PT_IASQ1, offsetof(struct task_struct, thread.regs.iasq[1]));
+	DEFINE(TASK_PT_IAOQ0, offsetof(struct task_struct, thread.regs.iaoq[0]));
+	DEFINE(TASK_PT_IAOQ1, offsetof(struct task_struct, thread.regs.iaoq[1]));
+	DEFINE(TASK_PT_CR27, offsetof(struct task_struct, thread.regs.cr27));
+	DEFINE(TASK_PT_ORIG_R28, offsetof(struct task_struct, thread.regs.orig_r28));
+	DEFINE(TASK_PT_KSP, offsetof(struct task_struct, thread.regs.ksp));
+	DEFINE(TASK_PT_KPC, offsetof(struct task_struct, thread.regs.kpc));
+	DEFINE(TASK_PT_SAR, offsetof(struct task_struct, thread.regs.sar));
+	DEFINE(TASK_PT_IIR, offsetof(struct task_struct, thread.regs.iir));
+	DEFINE(TASK_PT_ISR, offsetof(struct task_struct, thread.regs.isr));
+	DEFINE(TASK_PT_IOR, offsetof(struct task_struct, thread.regs.ior));
+	BLANK();
+	DEFINE(TASK_SZ, sizeof(struct task_struct));
+	DEFINE(TASK_SZ_ALGN, align(sizeof(struct task_struct), 64));
+	BLANK();
+	DEFINE(PT_PSW, offsetof(struct pt_regs, gr[ 0]));
+	DEFINE(PT_GR1, offsetof(struct pt_regs, gr[ 1]));
+	DEFINE(PT_GR2, offsetof(struct pt_regs, gr[ 2]));
+	DEFINE(PT_GR3, offsetof(struct pt_regs, gr[ 3]));
+	DEFINE(PT_GR4, offsetof(struct pt_regs, gr[ 4]));
+	DEFINE(PT_GR5, offsetof(struct pt_regs, gr[ 5]));
+	DEFINE(PT_GR6, offsetof(struct pt_regs, gr[ 6]));
+	DEFINE(PT_GR7, offsetof(struct pt_regs, gr[ 7]));
+	DEFINE(PT_GR8, offsetof(struct pt_regs, gr[ 8]));
+	DEFINE(PT_GR9, offsetof(struct pt_regs, gr[ 9]));
+	DEFINE(PT_GR10, offsetof(struct pt_regs, gr[10]));
+	DEFINE(PT_GR11, offsetof(struct pt_regs, gr[11]));
+	DEFINE(PT_GR12, offsetof(struct pt_regs, gr[12]));
+	DEFINE(PT_GR13, offsetof(struct pt_regs, gr[13]));
+	DEFINE(PT_GR14, offsetof(struct pt_regs, gr[14]));
+	DEFINE(PT_GR15, offsetof(struct pt_regs, gr[15]));
+	DEFINE(PT_GR16, offsetof(struct pt_regs, gr[16]));
+	DEFINE(PT_GR17, offsetof(struct pt_regs, gr[17]));
+	DEFINE(PT_GR18, offsetof(struct pt_regs, gr[18]));
+	DEFINE(PT_GR19, offsetof(struct pt_regs, gr[19]));
+	DEFINE(PT_GR20, offsetof(struct pt_regs, gr[20]));
+	DEFINE(PT_GR21, offsetof(struct pt_regs, gr[21]));
+	DEFINE(PT_GR22, offsetof(struct pt_regs, gr[22]));
+	DEFINE(PT_GR23, offsetof(struct pt_regs, gr[23]));
+	DEFINE(PT_GR24, offsetof(struct pt_regs, gr[24]));
+	DEFINE(PT_GR25, offsetof(struct pt_regs, gr[25]));
+	DEFINE(PT_GR26, offsetof(struct pt_regs, gr[26]));
+	DEFINE(PT_GR27, offsetof(struct pt_regs, gr[27]));
+	DEFINE(PT_GR28, offsetof(struct pt_regs, gr[28]));
+	DEFINE(PT_GR29, offsetof(struct pt_regs, gr[29]));
+	DEFINE(PT_GR30, offsetof(struct pt_regs, gr[30]));
+	DEFINE(PT_GR31, offsetof(struct pt_regs, gr[31]));
+	DEFINE(PT_FR0, offsetof(struct pt_regs, fr[ 0]));
+	DEFINE(PT_FR1, offsetof(struct pt_regs, fr[ 1]));
+	DEFINE(PT_FR2, offsetof(struct pt_regs, fr[ 2]));
+	DEFINE(PT_FR3, offsetof(struct pt_regs, fr[ 3]));
+	DEFINE(PT_FR4, offsetof(struct pt_regs, fr[ 4]));
+	DEFINE(PT_FR5, offsetof(struct pt_regs, fr[ 5]));
+	DEFINE(PT_FR6, offsetof(struct pt_regs, fr[ 6]));
+	DEFINE(PT_FR7, offsetof(struct pt_regs, fr[ 7]));
+	DEFINE(PT_FR8, offsetof(struct pt_regs, fr[ 8]));
+	DEFINE(PT_FR9, offsetof(struct pt_regs, fr[ 9]));
+	DEFINE(PT_FR10, offsetof(struct pt_regs, fr[10]));
+	DEFINE(PT_FR11, offsetof(struct pt_regs, fr[11]));
+	DEFINE(PT_FR12, offsetof(struct pt_regs, fr[12]));
+	DEFINE(PT_FR13, offsetof(struct pt_regs, fr[13]));
+	DEFINE(PT_FR14, offsetof(struct pt_regs, fr[14]));
+	DEFINE(PT_FR15, offsetof(struct pt_regs, fr[15]));
+	DEFINE(PT_FR16, offsetof(struct pt_regs, fr[16]));
+	DEFINE(PT_FR17, offsetof(struct pt_regs, fr[17]));
+	DEFINE(PT_FR18, offsetof(struct pt_regs, fr[18]));
+	DEFINE(PT_FR19, offsetof(struct pt_regs, fr[19]));
+	DEFINE(PT_FR20, offsetof(struct pt_regs, fr[20]));
+	DEFINE(PT_FR21, offsetof(struct pt_regs, fr[21]));
+	DEFINE(PT_FR22, offsetof(struct pt_regs, fr[22]));
+	DEFINE(PT_FR23, offsetof(struct pt_regs, fr[23]));
+	DEFINE(PT_FR24, offsetof(struct pt_regs, fr[24]));
+	DEFINE(PT_FR25, offsetof(struct pt_regs, fr[25]));
+	DEFINE(PT_FR26, offsetof(struct pt_regs, fr[26]));
+	DEFINE(PT_FR27, offsetof(struct pt_regs, fr[27]));
+	DEFINE(PT_FR28, offsetof(struct pt_regs, fr[28]));
+	DEFINE(PT_FR29, offsetof(struct pt_regs, fr[29]));
+	DEFINE(PT_FR30, offsetof(struct pt_regs, fr[30]));
+	DEFINE(PT_FR31, offsetof(struct pt_regs, fr[31]));
+	DEFINE(PT_SR0, offsetof(struct pt_regs, sr[ 0]));
+	DEFINE(PT_SR1, offsetof(struct pt_regs, sr[ 1]));
+	DEFINE(PT_SR2, offsetof(struct pt_regs, sr[ 2]));
+	DEFINE(PT_SR3, offsetof(struct pt_regs, sr[ 3]));
+	DEFINE(PT_SR4, offsetof(struct pt_regs, sr[ 4]));
+	DEFINE(PT_SR5, offsetof(struct pt_regs, sr[ 5]));
+	DEFINE(PT_SR6, offsetof(struct pt_regs, sr[ 6]));
+	DEFINE(PT_SR7, offsetof(struct pt_regs, sr[ 7]));
+	DEFINE(PT_IASQ0, offsetof(struct pt_regs, iasq[0]));
+	DEFINE(PT_IASQ1, offsetof(struct pt_regs, iasq[1]));
+	DEFINE(PT_IAOQ0, offsetof(struct pt_regs, iaoq[0]));
+	DEFINE(PT_IAOQ1, offsetof(struct pt_regs, iaoq[1]));
+	DEFINE(PT_CR27, offsetof(struct pt_regs, cr27));
+	DEFINE(PT_ORIG_R28, offsetof(struct pt_regs, orig_r28));
+	DEFINE(PT_KSP, offsetof(struct pt_regs, ksp));
+	DEFINE(PT_KPC, offsetof(struct pt_regs, kpc));
+	DEFINE(PT_SAR, offsetof(struct pt_regs, sar));
+	DEFINE(PT_IIR, offsetof(struct pt_regs, iir));
+	DEFINE(PT_ISR, offsetof(struct pt_regs, isr));
+	DEFINE(PT_IOR, offsetof(struct pt_regs, ior));
+	DEFINE(PT_SIZE, sizeof(struct pt_regs));
+	DEFINE(PT_SZ_ALGN, align(sizeof(struct pt_regs), 64));
+	BLANK();
+	DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain));
+	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
+	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
+	DEFINE(TI_SEGMENT, offsetof(struct thread_info, addr_limit));
+	DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
+	DEFINE(THREAD_SZ, sizeof(struct thread_info));
+	DEFINE(THREAD_SZ_ALGN, align(sizeof(struct thread_info), 64));
+	BLANK();
+	DEFINE(IRQSTAT_SIRQ_PEND, offsetof(irq_cpustat_t, __softirq_pending));
+	DEFINE(IRQSTAT_SZ, sizeof(irq_cpustat_t));
+	BLANK();
+	DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
+	DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));
+	DEFINE(ICACHE_COUNT, offsetof(struct pdc_cache_info, ic_count));
+	DEFINE(ICACHE_LOOP, offsetof(struct pdc_cache_info, ic_loop));
+	DEFINE(DCACHE_BASE, offsetof(struct pdc_cache_info, dc_base));
+	DEFINE(DCACHE_STRIDE, offsetof(struct pdc_cache_info, dc_stride));
+	DEFINE(DCACHE_COUNT, offsetof(struct pdc_cache_info, dc_count));
+	DEFINE(DCACHE_LOOP, offsetof(struct pdc_cache_info, dc_loop));
+	DEFINE(ITLB_SID_BASE, offsetof(struct pdc_cache_info, it_sp_base));
+	DEFINE(ITLB_SID_STRIDE, offsetof(struct pdc_cache_info, it_sp_stride));
+	DEFINE(ITLB_SID_COUNT, offsetof(struct pdc_cache_info, it_sp_count));
+	DEFINE(ITLB_OFF_BASE, offsetof(struct pdc_cache_info, it_off_base));
+	DEFINE(ITLB_OFF_STRIDE, offsetof(struct pdc_cache_info, it_off_stride));
+	DEFINE(ITLB_OFF_COUNT, offsetof(struct pdc_cache_info, it_off_count));
+	DEFINE(ITLB_LOOP, offsetof(struct pdc_cache_info, it_loop));
+	DEFINE(DTLB_SID_BASE, offsetof(struct pdc_cache_info, dt_sp_base));
+	DEFINE(DTLB_SID_STRIDE, offsetof(struct pdc_cache_info, dt_sp_stride));
+	DEFINE(DTLB_SID_COUNT, offsetof(struct pdc_cache_info, dt_sp_count));
+	DEFINE(DTLB_OFF_BASE, offsetof(struct pdc_cache_info, dt_off_base));
+	DEFINE(DTLB_OFF_STRIDE, offsetof(struct pdc_cache_info, dt_off_stride));
+	DEFINE(DTLB_OFF_COUNT, offsetof(struct pdc_cache_info, dt_off_count));
+	DEFINE(DTLB_LOOP, offsetof(struct pdc_cache_info, dt_loop));
+	BLANK();
+	return 0;
+}
diff -Nru a/arch/parisc/kernel/binfmt_elf32.c b/arch/parisc/kernel/binfmt_elf32.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/binfmt_elf32.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,92 @@
+/*
+ * Support for 32-bit Linux/Parisc ELF binaries on 64 bit kernels
+ *
+ * Copyright (C) 2000 John Marvin
+ * Copyright (C) 2000 Hewlett Packard Co.
+ *
+ * Heavily inspired from various other efforts to do the same thing
+ * (ia64,sparc64/mips64)
+ */
+
+/* Make sure include/asm-parisc/elf.h does the right thing */
+
+#define ELF_CLASS	ELFCLASS32
+
+typedef unsigned int elf_greg_t;
+
+#include <linux/spinlock.h>
+#include <asm/processor.h>
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/elfcore.h>
+#include "sys32.h"		/* struct timeval32 */
+
+#define elf_prstatus elf_prstatus32
+struct elf_prstatus32
+{
+	struct elf_siginfo pr_info;	/* Info associated with signal */
+	short	pr_cursig;		/* Current signal */
+	unsigned int pr_sigpend;	/* Set of pending signals */
+	unsigned int pr_sighold;	/* Set of held signals */
+	pid_t	pr_pid;
+	pid_t	pr_ppid;
+	pid_t	pr_pgrp;
+	pid_t	pr_sid;
+	struct timeval32 pr_utime;	/* User time */
+	struct timeval32 pr_stime;	/* System time */
+	struct timeval32 pr_cutime;	/* Cumulative user time */
+	struct timeval32 pr_cstime;	/* Cumulative system time */
+	elf_gregset_t pr_reg;	/* GP registers */
+	int pr_fpvalid;		/* True if math co-processor being used.  */
+};
+
+#define elf_prpsinfo elf_prpsinfo32
+struct elf_prpsinfo32
+{
+	char	pr_state;	/* numeric process state */
+	char	pr_sname;	/* char for pr_state */
+	char	pr_zomb;	/* zombie */
+	char	pr_nice;	/* nice val */
+	unsigned int pr_flag;	/* flags */
+	u16	pr_uid;
+	u16	pr_gid;
+	pid_t	pr_pid, pr_ppid, pr_pgrp, pr_sid;
+	/* Lots missing */
+	char	pr_fname[16];	/* filename of executable */
+	char	pr_psargs[ELF_PRARGSZ];	/* initial part of arg list */
+};
+
+#define elf_addr_t	unsigned int
+#define init_elf_binfmt init_elf32_binfmt
+
+#define ELF_PLATFORM  ("PARISC32\0")
+
+#define ELF_CORE_COPY_REGS(dst, pt)	\
+	memset(dst, 0, sizeof(dst));	/* don't leak any "random" bits */ \
+	{	int i; \
+		for (i = 0; i < 32; i++) dst[i] = (elf_greg_t) pt->gr[i]; \
+		for (i = 0; i < 8; i++) dst[32 + i] = (elf_greg_t) pt->sr[i]; \
+	} \
+	dst[40] = (elf_greg_t) pt->iaoq[0]; dst[41] = (elf_greg_t) pt->iaoq[1]; \
+	dst[42] = (elf_greg_t) pt->iasq[0]; dst[43] = (elf_greg_t) pt->iasq[1]; \
+	dst[44] = (elf_greg_t) pt->sar;   dst[45] = (elf_greg_t) pt->iir; \
+	dst[46] = (elf_greg_t) pt->isr;   dst[47] = (elf_greg_t) pt->ior; \
+	dst[48] = (elf_greg_t) mfctl(22); dst[49] = (elf_greg_t) mfctl(0); \
+	dst[50] = (elf_greg_t) mfctl(24); dst[51] = (elf_greg_t) mfctl(25); \
+	dst[52] = (elf_greg_t) mfctl(26); dst[53] = (elf_greg_t) mfctl(27); \
+	dst[54] = (elf_greg_t) mfctl(28); dst[55] = (elf_greg_t) mfctl(29); \
+	dst[56] = (elf_greg_t) mfctl(30); dst[57] = (elf_greg_t) mfctl(31); \
+	dst[58] = (elf_greg_t) mfctl( 8); dst[59] = (elf_greg_t) mfctl( 9); \
+	dst[60] = (elf_greg_t) mfctl(12); dst[61] = (elf_greg_t) mfctl(13); \
+	dst[62] = (elf_greg_t) mfctl(10); dst[63] = (elf_greg_t) mfctl(15);
+
+/*
+ * We should probably use this macro to set a flag somewhere to indicate
+ * this is a 32 on 64 process. We could use PER_LINUX_32BIT, or we
+ * could set a processor dependent flag in the thread_struct.
+ */
+
+#define SET_PERSONALITY(ex, ibcs2) \
+	current->personality = PER_LINUX_32BIT
+
+#include "../../../fs/binfmt_elf.c"
diff -Nru a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
--- a/arch/parisc/kernel/cache.c	Wed Oct 30 16:44:28 2002
+++ b/arch/parisc/kernel/cache.c	Wed Oct 30 16:44:28 2002
@@ -15,202 +15,87 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/seq_file.h>
 
 #include <asm/pdc.h>
 #include <asm/cache.h>
+#include <asm/cacheflush.h>
+#include <asm/tlbflush.h>
 #include <asm/system.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
+#include <asm/processor.h>
+
+int split_tlb;
+int dcache_stride;
+int icache_stride;
 
 struct pdc_cache_info cache_info;
-#ifndef __LP64__
+#ifndef CONFIG_PA20
 static struct pdc_btlb_info btlb_info;
 #endif
 
-
-void __flush_page_to_ram(unsigned long address)
-{
-	__flush_dcache_range(address, PAGE_SIZE);
-	__flush_icache_range(address, PAGE_SIZE);
-}
-
-
-
-void flush_data_cache(void)
+#ifdef CONFIG_SMP
+void
+flush_data_cache(void)
 {
-	register unsigned long base   = cache_info.dc_base;
-	register unsigned long count  = cache_info.dc_count;
-	register unsigned long loop   = cache_info.dc_loop;
-	register unsigned long stride = cache_info.dc_stride;
-	register unsigned long addr;
-	register long i, j;
-
-	for(i=0,addr=base; i<count; i++,addr+=stride)
-		for(j=0; j<loop; j++)
-			fdce(addr);
-}
-		
-static inline void flush_data_tlb_space(void)
-{
-	unsigned long base   = cache_info.dt_off_base;
-	unsigned long count  = cache_info.dt_off_count;
-	unsigned long stride = cache_info.dt_off_stride;
-	unsigned long loop   = cache_info.dt_loop;
-
-	unsigned long addr;
-	long i,j;
-	
-	for(i=0,addr=base; i<count; i++,addr+=stride)
-		for(j=0; j<loop; j++)
-			pdtlbe(addr);
-}
-
-
-
-void flush_data_tlb(void)
-{
-	unsigned long base   = cache_info.dt_sp_base;
-	unsigned long count  = cache_info.dt_sp_count;
-	unsigned long stride = cache_info.dt_sp_stride;
-	unsigned long space;
-	unsigned long old_sr1;
-	long i;
-	
-	old_sr1 = mfsp(1);
-	
-	for(i=0,space=base; i<count; i++, space+=stride) {
-		mtsp(space,1);
-		flush_data_tlb_space();
-	}
-
-	mtsp(old_sr1, 1);
+	smp_call_function((void (*)(void *))flush_data_cache_local, NULL, 1, 1);
+	flush_data_cache_local();
 }
+#endif
 
-static inline void flush_instruction_tlb_space(void)
+void
+flush_cache_all_local(void)
 {
-	unsigned long base   = cache_info.it_off_base;
-	unsigned long count  = cache_info.it_off_count;
-	unsigned long stride = cache_info.it_off_stride;
-	unsigned long loop   = cache_info.it_loop;
-
-	unsigned long addr;
-	long i,j;
-	
-	for(i=0,addr=base; i<count; i++,addr+=stride)
-		for(j=0; j<loop; j++)
-			pitlbe(addr);
-}
-
-void flush_instruction_tlb(void)
-{
-	unsigned long base   = cache_info.it_sp_base;
-	unsigned long count  = cache_info.it_sp_count;
-	unsigned long stride = cache_info.it_sp_stride;
-	unsigned long space;
-	unsigned long old_sr1;
-	unsigned int i;
-	
-	old_sr1 = mfsp(1);
-	
-	for(i=0,space=base; i<count; i++, space+=stride) {
-		mtsp(space,1);
-		flush_instruction_tlb_space();
-	}
-
-	mtsp(old_sr1, 1);
+	flush_instruction_cache_local();
+	flush_data_cache_local();
 }
 
+/* flushes EVERYTHING (tlb & cache) */
 
-void __flush_tlb_space(unsigned long space)
+void
+flush_all_caches(void)
 {
-	unsigned long old_sr1;
-
-	old_sr1 = mfsp(1);
-	mtsp(space, 1);
-	
-	flush_data_tlb_space();
-	flush_instruction_tlb_space();
-
-	mtsp(old_sr1, 1);
+	flush_cache_all();
+	flush_tlb_all();
 }
 
-
-void flush_instruction_cache(void)
+void
+update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte)
 {
-	register unsigned long base   = cache_info.ic_base;
-	register unsigned long count  = cache_info.ic_count;
-	register unsigned long loop   = cache_info.ic_loop;
-	register unsigned long stride = cache_info.ic_stride;
-	register unsigned long addr;
-	register long i, j;
-	unsigned long old_sr1;
-	
-	old_sr1 = mfsp(1);
-	mtsp(0,1);
+	struct page *page = pte_page(pte);
 
-	/*
-	 * Note: fice instruction has 3 bit space field, so one must
-	 *       be specified (otherwise you are justing using whatever
-	 *       happens to be in sr0).
-	 */
+	if (VALID_PAGE(page) && page->mapping &&
+	    test_bit(PG_dcache_dirty, &page->flags)) {
 
-	for(i=0,addr=base; i<count; i++,addr+=stride)
-		for(j=0; j<loop; j++)
-			fice(addr);
-
-	mtsp(old_sr1, 1);
-}
-
-/* not yet ... fdc() needs to be implemented in cache.h !
-void flush_datacache_range( unsigned int base, unsigned int end )
-{
-    register long offset,offset_add;
-    offset_add = ( (1<<(cache_info.dc_conf.cc_block-1)) * 
-		    cache_info.dc_conf.cc_line ) << 4;
-    for (offset=base; offset<=end; offset+=offset_add)
-	fdc(space,offset);
-    fdc(space,end);
-}
-*/
-
-/* flushes code and data-cache */
-void flush_all_caches(void)
-{
-	flush_instruction_cache();
-	flush_data_cache();
-
-	flush_instruction_tlb();
-	flush_data_tlb();
-
-	asm volatile("sync");
-	asm volatile("syncdma");
-	asm volatile("sync");
+		flush_kernel_dcache_page(page_address(page));
+		clear_bit(PG_dcache_dirty, &page->flags);
+	}
 }
 
-int get_cache_info(char *buffer)
+void
+show_cache_info(struct seq_file *m)
 {
-	char *p = buffer;
-
-	p += sprintf(p, "I-cache\t\t: %ld KB\n", 
+	seq_printf(m, "I-cache\t\t: %ld KB\n", 
 		cache_info.ic_size/1024 );
-	p += sprintf(p, "D-cache\t\t: %ld KB (%s)%s\n", 
+	seq_printf(m, "D-cache\t\t: %ld KB (%s)%s\n", 
 		cache_info.dc_size/1024,
 		(cache_info.dc_conf.cc_wt ? "WT":"WB"),
 		(cache_info.dc_conf.cc_sh ? " - shared I/D":"")
 	);
 
-	p += sprintf(p, "ITLB entries\t: %ld\n" "DTLB entries\t: %ld%s\n",
+	seq_printf(m, "ITLB entries\t: %ld\n" "DTLB entries\t: %ld%s\n",
 		cache_info.it_size,
 		cache_info.dt_size,
 		cache_info.dt_conf.tc_sh ? " - shared with ITLB":""
 	);
 		
-#ifndef __LP64__
+#ifndef CONFIG_PA20
 	/* BTLB - Block TLB */
 	if (btlb_info.max_size==0) {
-		p += sprintf(p, "BTLB\t\t: not supported\n" );
+		seq_printf(m, "BTLB\t\t: not supported\n" );
 	} else {
-		p += sprintf(p, 
+		seq_printf(m, 
 		"BTLB fixed\t: max. %d pages, pagesize=%d (%dMB)\n"
 		"BTLB fix-entr.\t: %d instruction, %d data (%d combined)\n"
 		"BTLB var-entr.\t: %d instruction, %d data (%d combined)\n",
@@ -225,29 +110,117 @@
 		);
 	}
 #endif
-
-	return p - buffer;
 }
 
-
 void __init 
-cache_init(void)
+parisc_cache_init(void)
 {
 	if(pdc_cache_info(&cache_info)<0)
-		panic("cache_init: pdc_cache_info failed");
+		panic("parisc_cache_init: pdc_cache_info failed");
 
 #if 0
-	printk("ic_size %lx dc_size %lx it_size %lx pdc_cache_info %d*long pdc_cache_cf %d\n",
+	printk(KERN_DEBUG "ic_size %lx dc_size %lx it_size %lx pdc_cache_info %d*long pdc_cache_cf %d\n",
 	    cache_info.ic_size,
 	    cache_info.dc_size,
 	    cache_info.it_size,
 	    sizeof (struct pdc_cache_info) / sizeof (long),
 	    sizeof (struct pdc_cache_cf)
 	);
+
+	printk(KERN_DEBUG "dc base %x dc stride %x dc count %x dc loop %d\n",
+	    cache_info.dc_base,
+	    cache_info.dc_stride,
+	    cache_info.dc_count,
+	    cache_info.dc_loop);
+
+	printk(KERN_DEBUG "dc conf: alias %d block %d line %d wt %d sh %d cst %d assoc %d\n",
+	    cache_info.dc_conf.cc_alias,
+	    cache_info.dc_conf.cc_block,
+	    cache_info.dc_conf.cc_line,
+	    cache_info.dc_conf.cc_wt,
+	    cache_info.dc_conf.cc_sh,
+	    cache_info.dc_conf.cc_cst,
+	    cache_info.dc_conf.cc_assoc);
+
+	printk(KERN_DEBUG "ic conf: alias %d block %d line %d wt %d sh %d cst %d assoc %d\n",
+	    cache_info.ic_conf.cc_alias,
+	    cache_info.ic_conf.cc_block,
+	    cache_info.ic_conf.cc_line,
+	    cache_info.ic_conf.cc_wt,
+	    cache_info.ic_conf.cc_sh,
+	    cache_info.ic_conf.cc_cst,
+	    cache_info.ic_conf.cc_assoc);
+
+	printk(KERN_DEBUG "dt conf: sh %d page %d cst %d aid %d pad1 %d \n",
+	    cache_info.dt_conf.tc_sh,
+	    cache_info.dt_conf.tc_page,
+	    cache_info.dt_conf.tc_cst,
+	    cache_info.dt_conf.tc_aid,
+	    cache_info.dt_conf.tc_pad1);
+
+	printk(KERN_DEBUG "it conf: sh %d page %d cst %d aid %d pad1 %d \n",
+	    cache_info.it_conf.tc_sh,
+	    cache_info.it_conf.tc_page,
+	    cache_info.it_conf.tc_cst,
+	    cache_info.it_conf.tc_aid,
+	    cache_info.it_conf.tc_pad1);
 #endif
-#ifndef __LP64__
+
+	split_tlb = 0;
+	if (cache_info.dt_conf.tc_sh == 0 || cache_info.dt_conf.tc_sh == 2) {
+
+	    if (cache_info.dt_conf.tc_sh == 2)
+		printk(KERN_WARNING "Unexpected TLB configuration. "
+			"Will flush I/D separately (could be optimized).\n");
+
+	    split_tlb = 1;
+	}
+
+	dcache_stride = ( (1<<(cache_info.dc_conf.cc_block+3)) *
+			 cache_info.dc_conf.cc_line );
+	icache_stride = ( (1<<(cache_info.ic_conf.cc_block+3)) *
+			 cache_info.ic_conf.cc_line );
+#ifndef CONFIG_PA20
 	if(pdc_btlb_info(&btlb_info)<0) {
 		memset(&btlb_info, 0, sizeof btlb_info);
 	}
 #endif
+
+	if ((boot_cpu_data.pdc.capabilities & PDC_MODEL_NVA_MASK) == PDC_MODEL_NVA_UNSUPPORTED) {
+		printk(KERN_WARNING "Only equivalent aliasing supported\n");
+#ifndef CONFIG_SMP
+		panic("SMP kernel required to avoid non-equivalent aliasing");
+#endif
+	}
+}
+
+void disable_sr_hashing(void)
+{
+    int srhash_type;
+
+    if (boot_cpu_data.cpu_type == pcxl2)
+	return; /* pcxl2 doesn't support space register hashing */
+
+    switch (boot_cpu_data.cpu_type) {
+
+    case pcx:
+	BUG(); /* We shouldn't get here. code in setup.c should prevent it */
+	return;
+
+    case pcxs:
+    case pcxt:
+    case pcxt_:
+	srhash_type = SRHASH_PCXST;
+	break;
+
+    case pcxl:
+	srhash_type = SRHASH_PCXL;
+	break;
+
+    default: /* Currently all PA2.0 machines use the same ins. sequence */
+	srhash_type = SRHASH_PA20;
+	break;
+    }
+
+    disable_sr_hashing_asm(srhash_type);
 }
diff -Nru a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
--- a/arch/parisc/kernel/drivers.c	Wed Oct 30 16:44:33 2002
+++ b/arch/parisc/kernel/drivers.c	Wed Oct 30 16:44:33 2002
@@ -1,134 +1,591 @@
 /*
-
-drivers.c
-
-Copyright (c) 1999 The Puffin Group 
-
-This is a collection of routines intended to register all the devices
-in a system, and register device drivers.
-
-*/
+ * drivers.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.
+ *
+ * Copyright (c) 1999 The Puffin Group
+ * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard
+ * Copyright (c) 2001 Helge Deller <deller@gmx.de>
+ * 
+ * The file handles registering devices and drivers, then matching them.
+ * It's the closest we get to a dating agency.
+ */
 
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/spinlock.h>
+#include <linux/string.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/pdc.h>
+#include <asm/gsc.h>
 
+/* See comments in include/asm-parisc/pci.h */
+struct pci_dma_ops *hppa_dma_ops;
 
-extern struct hp_hardware *parisc_get_reference(
-	unsigned short hw_type, unsigned long hversion, 
-	unsigned long sversion );
+static struct parisc_driver *pa_drivers;
+static struct parisc_device root;
 
+/* This lock protects the pa_drivers list _only_ since all parisc_devices
+ * are registered before smp_init() is called.  If you wish to add devices
+ * after that, this muct be serialised somehow.  I recommend a semaphore
+ * rather than a spinlock since driver ->probe functions are allowed to
+ * sleep (for example when allocating memory).
+ */
+static spinlock_t pa_lock = SPIN_LOCK_UNLOCKED;
 
-/* I'm assuming there'll never be 64 devices.  We should probably make 
-   this more flexible.  */
+#define for_each_padev(dev) \
+	for (dev = root.child; dev != NULL; dev = next_dev(dev))
 
-#define MAX_DEVICES 64
+#define check_dev(dev) \
+	(dev->id.hw_type != HPHW_FAULTY) ? dev : next_dev(dev)
 
-unsigned int num_devices = 0;
+/**
+ * next_dev - enumerates registered devices
+ * @dev: the previous device returned from next_dev
+ *
+ * next_dev does a depth-first search of the tree, returning parents
+ * before children.  Returns NULL when there are no more devices.
+ */
+struct parisc_device *next_dev(struct parisc_device *dev)
+{
+	if (dev->child) {
+		return check_dev(dev->child);
+	} else if (dev->sibling) {
+		return dev->sibling;
+	}
 
-struct hp_device devices[MAX_DEVICES];
+	/* Exhausted tree at this level, time to go up. */
+	do {
+		dev = dev->parent;
+		if (dev && dev->sibling)
+			return dev->sibling;
+	} while (dev != &root);
 
-static unsigned long pdc_result[32] __attribute__ ((aligned (16))) = {0,0,0,0};
-static  u8 iodc_data[32] __attribute__ ((aligned (64)));
+	return NULL;
+}
 
-/*
- *	XXX should we be using a locked array ?
+/**
+ * match_device - Report whether this driver can handle this device
+ * @driver: the PA-RISC driver to try
+ * @dev: the PA-RISC device to try
  */
- 
-int register_driver(struct pa_iodc_driver *driver)
+static int match_device(struct parisc_driver *driver, struct parisc_device *dev)
 {
-	unsigned int i;
-	struct hp_device * device;
+	const struct parisc_device_id *ids;
 
-	for (;driver->check;driver++)  {
+	for (ids = driver->id_table; ids->sversion; ids++) {
+		if ((ids->sversion != SVERSION_ANY_ID) &&
+		    (ids->sversion != dev->id.sversion))
+			continue;
+
+		if ((ids->hw_type != HWTYPE_ANY_ID) &&
+		    (ids->hw_type != dev->id.hw_type))
+			continue;
+
+		if ((ids->hversion != HVERSION_ANY_ID) &&
+		    (ids->hversion != dev->id.hversion))
+			continue;
 
-		for (i=0;i<num_devices;i++) {
-			device = &devices[i];
+		return 1;
+	}
+	return 0;
+}
 
-			if (device->managed) continue;
+static void claim_device(struct parisc_driver *driver, struct parisc_device *dev)
+{
+	dev->driver = driver;
+	request_mem_region(dev->hpa, 0x1000, driver->name);
+}
 
-			if ((driver->check & DRIVER_CHECK_HWTYPE) &&
-			    (driver->hw_type != device->hw_type))
-				continue;
-			if ((driver->check & DRIVER_CHECK_HVERSION) &&
-			    (driver->hversion != device->hversion))
-				continue;
-			if ((driver->check & DRIVER_CHECK_HVERSION_REV) &&
-			    (driver->hversion_rev != device->hversion_rev))
-				continue;
-			if ((driver->check & DRIVER_CHECK_SVERSION) &&
-			    (driver->sversion != device->sversion))
-				continue;
-			if ((driver->check & DRIVER_CHECK_SVERSION_REV) &&
-			    (driver->sversion_rev != device->sversion_rev))
-				continue;
-			if ((driver->check & DRIVER_CHECK_OPT) &&
-			    (driver->opt != device->opt))
-				continue;
-			if ( (*driver->callback)(device,driver) ==0) {
-				device->managed=1;
-			} else {
-				printk("Warning : device (%d, 0x%x, 0x%x, 0x%x, 0x%x) NOT claimed by %s %s\n",
-					device->hw_type,
-					device->hversion, device->hversion_rev,
-					device->sversion, device->sversion_rev,
-					driver->name, driver->version);
-			}
+/**
+ * register_parisc_driver - Register this driver if it can handle a device
+ * @driver: the PA-RISC driver to try
+ */
+int register_parisc_driver(struct parisc_driver *driver)
+{
+	struct parisc_device *device;
+
+	if (driver->next) {
+		printk(KERN_WARNING 
+		       "BUG: Skipping previously registered driver: %s\n",
+		       driver->name);
+		return 1;
+	}
+
+	for_each_padev(device) {
+		if (device->driver)
+			continue;
+		if (!match_device(driver, device))
+			continue;
+
+		if (driver->probe(device) < 0)
+			continue;
+		claim_device(driver, device);
+	}
+
+	/* Note that the list is in reverse order of registration.  This
+	 * may be significant if we ever actually support hotplug and have
+	 * multiple drivers capable of claiming the same chip.
+	 */
+
+	spin_lock(&pa_lock);
+	driver->next = pa_drivers;
+	pa_drivers = driver;
+	spin_unlock(&pa_lock);
+
+	return 0;
+}
+
+/**
+ * count_parisc_driver - count # of devices this driver would match
+ * @driver: the PA-RISC driver to try
+ *
+ * Use by IOMMU support to "guess" the right size IOPdir.
+ * Formula is something like memsize/(num_iommu * entry_size).
+ */
+int count_parisc_driver(struct parisc_driver *driver)
+{
+	struct parisc_device *device;
+	int cnt = 0;
+
+	for_each_padev(device) {
+		if (match_device(driver, device))
+			cnt++;
+	}
+
+	return cnt;
+}
+
+
+
+/**
+ * unregister_parisc_driver - Unregister this driver from the list of drivers
+ * @driver: the PA-RISC driver to unregister
+ */
+int unregister_parisc_driver(struct parisc_driver *driver)
+{
+	struct parisc_device *dev;
+
+	spin_lock(&pa_lock);
+
+	if (pa_drivers == driver) {
+		/* was head of list - update head */
+		pa_drivers = driver->next;
+	} else {
+		struct parisc_driver *prev = pa_drivers;
+
+		while (prev && driver != prev->next) {
+			prev = prev->next;
 		}
+
+		if (!prev) {
+			printk(KERN_WARNING "unregister_parisc_driver: %s wasn't registered\n", driver->name);
+		} else {
+			/* Drop driver from list */
+			prev->next = driver->next;
+			driver->next = NULL;
+		}
+
 	}
+
+	spin_unlock(&pa_lock);
+
+	for_each_padev(dev) {
+		if (dev->driver != driver)
+			continue;
+		dev->driver = NULL;
+		release_mem_region(dev->hpa, 0x1000);
+	}
+
 	return 0;
 }
 
+static struct parisc_device *find_device_by_addr(unsigned long hpa)
+{
+	struct parisc_device *dev;
+	for_each_padev(dev) {
+		if (dev->hpa == hpa)
+			return dev;
+	}
+	return NULL;
+}
+
+/**
+ * find_pa_parent_type - Find a parent of a specific type
+ * @dev: The device to start searching from
+ * @type: The device type to search for.
+ *
+ * Walks up the device tree looking for a device of the specified type.
+ * If it finds it, it returns it.  If not, it returns NULL.
+ */
+const struct parisc_device *find_pa_parent_type(const struct parisc_device *dev, int type)
+{
+	while (dev != &root) {
+		if (dev->id.hw_type == type)
+			return dev;
+		dev = dev->parent;
+	}
+
+	return NULL;
+}
+
+static void
+get_node_path(struct parisc_device *dev, struct hardware_path *path)
+{
+	int i = 5;
+	memset(&path->bc, -1, 6);
+	while (dev != &root) {
+		path->bc[i--] = dev->hw_path;
+		dev = dev->parent;
+	}
+}
+
+static char *print_hwpath(struct hardware_path *path, char *output)
+{
+	int i;
+	for (i = 0; i < 6; i++) {
+		if (path->bc[i] == -1)
+			continue;
+		output += sprintf(output, "%u/", (unsigned char) path->bc[i]);
+	}
+	output += sprintf(output, "%u", (unsigned char) path->mod);
+	return output;
+}
+
+/**
+ * print_pa_hwpath - Returns hardware path for PA devices
+ * dev: The device to return the path for
+ * output: Pointer to a previously-allocated array to place the path in.
+ *
+ * This function fills in the output array with a human-readable path
+ * to a PA device.  This string is compatible with that used by PDC, and
+ * may be printed on the outside of the box.
+ */
+char *print_pa_hwpath(struct parisc_device *dev, char *output)
+{
+	struct hardware_path path;
+
+	get_node_path(dev->parent, &path);
+	path.mod = dev->hw_path;
+	return print_hwpath(&path, output);
+}
+
 
-struct hp_device * register_module(void *hpa)
+#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
+/**
+ * get_pci_node_path - Returns hardware path for PCI devices
+ * dev: The device to return the path for
+ * output: Pointer to a previously-allocated array to place the path in.
+ *
+ * This function fills in the hardware_path structure with the route to
+ * the specified PCI device.  This structure is suitable for passing to
+ * PDC calls.
+ */
+void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path)
+{
+	struct pci_bus *bus;
+	const struct parisc_device *padev;
+	int i = 5;
+
+	memset(&path->bc, -1, 6);
+	path->mod = PCI_FUNC(dev->devfn);
+	path->bc[i--] = PCI_SLOT(dev->devfn);
+	for (bus = dev->bus; bus->parent; bus = bus->parent) {
+		unsigned int devfn = bus->self->devfn;
+		path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn) << 5);
+	}
+
+	padev = HBA_DATA(bus->sysdata)->dev;
+	while (padev != &root) {
+		path->bc[i--] = padev->hw_path;
+		padev = padev->parent;
+	}
+}
+
+/**
+ * print_pci_hwpath - Returns hardware path for PCI devices
+ * dev: The device to return the path for
+ * output: Pointer to a previously-allocated array to place the path in.
+ *
+ * This function fills in the output array with a human-readable path
+ * to a PCI device.  This string is compatible with that used by PDC, and
+ * may be printed on the outside of the box.
+ */
+char *print_pci_hwpath(struct pci_dev *dev, char *output)
+{
+	struct hardware_path path;
+
+	get_pci_node_path(dev, &path);
+	return print_hwpath(&path, output);
+}
+#endif /* defined(CONFIG_PCI) || defined(CONFIG_ISA) */
+
+
+struct parisc_device * create_tree_node(char id, struct parisc_device *parent,
+		struct parisc_device **insert)
+{
+	struct parisc_device *dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+	if (!dev)
+		return NULL;
+	memset(dev, 0, sizeof(*dev));
+	dev->hw_path = id;
+	dev->id.hw_type = HPHW_FAULTY;
+	dev->parent = parent;
+	dev->sibling = *insert;
+	*insert = dev;
+	return dev;
+}
+
+/**
+ * alloc_tree_node - returns a device entry in the iotree
+ * @parent: the parent node in the tree
+ * @id: the element of the module path for this entry
+ *
+ * Checks all the children of @parent for a matching @id.  If none
+ * found, it allocates a new device and returns it.
+ */
+struct parisc_device *
+alloc_tree_node(struct parisc_device *parent, char id)
 {
+	struct parisc_device *prev;
+	if ((!parent->child) || (parent->child->hw_path > id)) {
+		return create_tree_node(id, parent, &parent->child);
+	}
 
-	struct hp_device * d;
+	prev = parent->child;
+	if (prev->hw_path == id)
+		return prev;
+
+	while (prev->sibling && prev->sibling->hw_path < id) {
+		prev = prev->sibling;
+	}
+
+	if ((prev->sibling) && (prev->sibling->hw_path == id))
+		return prev->sibling;
+
+	return create_tree_node(id, parent, &prev->sibling);
+}
+
+static struct parisc_device *find_parisc_device(struct hardware_path *modpath)
+{
+	int i;
+	struct parisc_device *parent = &root;
+	for (i = 0; i < 6; i++) {
+		if (modpath->bc[i] == -1)
+			continue;
+		parent = alloc_tree_node(parent, modpath->bc[i]);
+	}
+	return alloc_tree_node(parent, modpath->mod);
+}
+
+struct parisc_device *
+alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
+{
 	int status;
+	unsigned long bytecnt;
+	u8 iodc_data[32];
+	struct parisc_device *dev;
+	const char *name;
+
+	/* Check to make sure this device has not already been added - Ryan */
+	if (find_device_by_addr(hpa) != NULL)
+		return NULL;
+
+	status = pdc_iodc_read(&bytecnt, hpa, 0, &iodc_data, 32);
+	if (status != PDC_OK)
+		return NULL;
+
+	dev = find_parisc_device(mod_path);
+	if (dev->id.hw_type != HPHW_FAULTY) {
+		char p[64];
+		print_pa_hwpath(dev, p);
+		printk("Two devices have hardware path %s.  Please file a bug with HP.\n"
+			"In the meantime, you could try rearranging your cards.\n", p);
+		return NULL;
+	}
+
+	dev->id.hw_type = iodc_data[3] & 0x1f;
+	dev->id.hversion = (iodc_data[0] << 4) | ((iodc_data[1] & 0xf0) >> 4);
+	dev->id.hversion_rev = iodc_data[1] & 0x0f;
+	dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
+			(iodc_data[5] << 8) | iodc_data[6];
+	dev->hpa = hpa;
+	name = parisc_hardware_description(&dev->id);
+	if (name) {
+		strncpy(dev->name, name, sizeof(dev->name)-1);
+	}
+
+	return dev;
+}
 
-	d = &devices[num_devices];
-	status = pdc_iodc_read(&pdc_result,hpa,0,&iodc_data,32 );
-	if (status !=PDC_RET_OK) {
-		/* There is no device here, so we'll skip it */
+/**
+ * register_parisc_device - Locate a driver to manage this device.
+ * @dev: The parisc device.
+ *
+ * Search the driver list for a driver that is willing to manage
+ * this device.
+ */
+int register_parisc_device(struct parisc_device *dev)
+{
+	struct parisc_driver *driver;
+
+	if (!dev)
 		return 0;
+
+	if (dev->driver)
+		return 1;
+	
+	spin_lock(&pa_lock);
+
+	/* Locate a driver which agrees to manage this device.  */
+	for (driver = pa_drivers; driver; driver = driver->next) {
+		if (!match_device(driver,dev))
+			continue;
+		if (driver->probe(dev) == 0)
+			break;
 	}
 
-	d->hw_type = iodc_data[3]&0x1f;
-	d->hversion = (iodc_data[0]<<4)|((iodc_data[1]&0xf0)>>4);
-	d->sversion = 
-		((iodc_data[4]&0x0f)<<16)|(iodc_data[5]<<8)|(iodc_data[6]);
-	d->hversion_rev = iodc_data[1]&0x0f;
-	d->sversion_rev = iodc_data[4]>>4;
-	d->opt = iodc_data[7];
-	d->hpa = hpa;
-	d->managed=0;
-	d->reference = parisc_get_reference(d->hw_type, d->hversion, 
-								d->sversion);
-		
-	num_devices++;	
+	if (driver != NULL) {
+		claim_device(driver, dev);
+	}
+	spin_unlock(&pa_lock);
+	return driver != NULL;
+}
+
+#define BC_PORT_MASK 0x8
+#define BC_LOWER_PORT 0x8
+
+#define BUS_CONVERTER(dev) \
+        ((dev->id.hw_type == HPHW_IOA) || (dev->id.hw_type == HPHW_BCPORT))
+
+#define IS_LOWER_PORT(dev) \
+        ((gsc_readl(&((struct bc_module *)dev->hpa)->io_status) \
+                & BC_PORT_MASK) == BC_LOWER_PORT)
+
+#define READ_IO_IO_LOW(dev) \
+	(dev->id.hw_type == HPHW_IOA ? \
+	        __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_low) << 16 : \
+	        __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_low))
 
-	return d;
-}	
+static void walk_native_bus(unsigned long addr, struct parisc_device *parent);
+void walk_lower_bus(struct parisc_device *dev)
+{
+
+	if(!BUS_CONVERTER(dev) || IS_LOWER_PORT(dev))
+		return;
 
-void print_devices(char * buf) {
+	walk_native_bus((unsigned long)(signed int)READ_IO_IO_LOW(dev), dev);
+}
 
+#define MAX_NATIVE_DEVICES 64
+#define NATIVE_DEVICE_OFFSET 0x1000
+
+/**
+ * walk_native_bus -- Probe a bus for devices
+ * @addr: Base address of this bus.
+ * 
+ * A native bus (eg Runway or GSC) may have up to 64 devices on it,
+ * spaced at intervals of 0x1000 bytes.  PDC may not inform us of these
+ * devices, so we have to probe for them.  Unfortunately, we may find
+ * devices which are not physically connected (such as extra serial &
+ * keyboard ports).  This problem is not yet solved.
+ */
+static void walk_native_bus(unsigned long addr, struct parisc_device *parent)
+{
 	int i;
-	struct hp_device *d;
-	printk("Found devices:\n");
-	for (i=0;i<num_devices;i++) {	
-		d = &devices[i];
-		printk(KERN_INFO 
-		"%d. %s (%d) at 0x%p, versions 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", 
-		i+1,
-		(d->reference) ? d->reference->name : "Unknown device",
-		d->hw_type,d->hpa, d->hversion, d->hversion_rev,
-		d->sversion, d->sversion_rev, d->opt);
+	struct hardware_path path;
+
+	get_node_path(parent, &path);
+	for (i = 0; i < MAX_NATIVE_DEVICES; i++) {
+		unsigned long hpa = (addr + i * NATIVE_DEVICE_OFFSET);
+		struct parisc_device *dev;
+
+		/* Was the device already added by Firmware? */
+		dev = find_device_by_addr(hpa);
+		if (!dev) {
+			path.mod = i;
+			dev = alloc_pa_dev(hpa, &path);
+			if (!dev)
+				continue;
+
+			register_parisc_device(dev);
+		}
+		walk_lower_bus(dev);
+	}
+}
+
+#define CENTRAL_BUS_ADDR (unsigned long) 0xfffffffffff80000
+
+/**
+ * walk_central_bus - Find devices attached to the central bus
+ *
+ * PDC doesn't tell us about all devices in the system.  This routine
+ * finds devices connected to the central bus.
+ */
+void walk_central_bus(void)
+{
+	walk_native_bus(CENTRAL_BUS_ADDR, &root);
+}
+
+void fixup_child_irqs(struct parisc_device *parent, int base,
+			int (*choose_irq)(struct parisc_device *))
+{
+	struct parisc_device *dev;
 
+	if (!parent->child)
+		return;
+
+	for (dev = check_dev(parent->child); dev; dev = dev->sibling) {
+		int irq = choose_irq(dev);
+		if (irq > 0) {
+#ifdef __LP64__
+			irq += 32;
+#endif
+			dev->irq = base + irq;
+		}
 	}
-	printk("That's a total of %d devices.\n",num_devices);
 }
 
+static void print_parisc_device(struct parisc_device *dev)
+{
+	char hw_path[64];
+	static int count;
 
+	print_pa_hwpath(dev, hw_path);
+	printk(KERN_INFO "%d. %s (%d) at 0x%lx [%s], versions 0x%x, 0x%x, 0x%x",
+		++count, dev->name, dev->id.hw_type, dev->hpa, hw_path,
+		dev->id.hversion, dev->id.hversion_rev, dev->id.sversion);
+
+	if (dev->num_addrs) {
+		int k;
+		printk(",  additional addresses: ");
+		for (k = 0; k < dev->num_addrs; k++)
+			printk("0x%lx ", dev->addr[k]);
+	}
+	printk("\n");
+}
+
+void print_subdevices(struct parisc_device *parent)
+{
+	struct parisc_device *dev;
+	for (dev = parent->child; dev != parent->sibling; dev = next_dev(dev)) {
+		print_parisc_device(dev);
+	}
+}
+
+/**
+ * print_parisc_devices - Print out a list of devices found in this system
+ */
+void print_parisc_devices(void)
+{
+	struct parisc_device *dev;
+	for_each_padev(dev) {
+		print_parisc_device(dev);
+	}
+}
diff -Nru a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
--- a/arch/parisc/kernel/entry.S	Wed Oct 30 16:44:25 2002
+++ b/arch/parisc/kernel/entry.S	Wed Oct 30 16:44:25 2002
@@ -1,5 +1,5 @@
-/*------------------------------------------------------------------------------
- * Native PARISC/Linux Project (http://www.puffingroup.com/parisc)
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
  *
  * kernel entry points (interruptions, system call wrappers)
  *  Copyright (C) 1999,2000 Philipp Rumpf 
@@ -23,41 +23,54 @@
  */
 
 #include <linux/config.h>
-#include <asm/offset.h>
-
-/* the following is the setup i think we should follow:
- * whenever the CPU is interruptible, the following has to be true:
- *  CR30 is the kernel sp or 0 if we currently use the kernel stack
- *  CR31 is the kernel gp */ 
+#include <asm/offsets.h>
 
 /* we have the following possibilities to act on an interruption:
  *  - handle in assembly and use shadowed registers only
  *  - save registers to kernel stack and handle in assembly or C */
 
-	.text
-
-#ifdef __LP64__
-	.level 2.0w
-#endif
 
-#define __ASSEMBLY__
 #include <asm/assembly.h>	/* for LDREG/STREG defines */
 #include <asm/pgtable.h>
 #include <asm/psw.h>
 #include <asm/signal.h>
+#include <asm/unistd.h>
+#include <asm/thread_info.h>
 
 #ifdef __LP64__
-#define FRAME_SIZE	64
+#define FRAME_SIZE	128
+#define CMPIB           cmpib,*
+#define CMPB            cmpb,*
+
+	.level 2.0w
 #else
 #define FRAME_SIZE	64
+#define CMPIB           cmpib,
+#define CMPB            cmpb,
+
+	.level 2.0
+#endif
+
+	.import         pa_dbit_lock,data
+
+	/* space_to_prot macro creates a prot id from a space id */
+
+#if (SPACEID_SHIFT) == 0
+	.macro  space_to_prot spc prot
+	depd,z  \spc,62,31,\prot
+	.endm
+#else
+	.macro  space_to_prot spc prot
+	extrd,u \spc,(64 - (SPACEID_SHIFT)),32,\prot
+	.endm
 #endif
 
 	/* Switch to virtual mapping, trashing only %r1 */
-	.macro	virt_map rfi_type
-	mtsm	%r0
-	tovirt	%r29
-	tovirt	%r30
+	.macro  virt_map
+	rsm     PSW_SM_Q,%r0
+	tovirt_r1 %r29
 	mfsp	%sr7, %r1
+	or,=    %r0,%r1,%r0 /* Only save sr7 in sr3 if sr7 != 0 */
 	mtsp	%r1, %sr3
 	mtsp	%r0, %sr4
 	mtsp	%r0, %sr5
@@ -65,95 +78,117 @@
 	mtsp	%r0, %sr7
 	ldil	L%KERNEL_PSW, %r1
 	ldo	R%KERNEL_PSW(%r1), %r1
-	LDIL_FIXUP(%r1)
 	mtctl	%r1, %cr22
 	mtctl	%r0, %cr17
 	mtctl	%r0, %cr17
-	ldil	L%.+28, %r1
-	ldo	R%.+24(%r1), %r1
-	LDIL_FIXUP(%r1)
+	ldil	L%4f, %r1
+	ldo	R%4f(%r1), %r1
 	mtctl	%r1, %cr18
 	ldo	4(%r1), %r1
 	mtctl	%r1, %cr18
-	\rfi_type
+	rfir
 	nop
+4:
 	.endm
 
-	.macro	get_stack
-	mfctl	%cr30, %r1 
-	comib,=,n 0, %r1, 0f   /* forward so predicted not taken */
+	/*
+	 * The "get_stack" macros are responsible for determining the
+	 * kernel stack value.
+	 *
+	 * For Faults:
+	 *      If sr7 == 0
+	 *          Already using a kernel stack, so call the
+	 *          get_stack_use_r30 macro to push a pt_regs structure
+	 *          on the stack, and store registers there.
+	 *      else
+	 *          Need to set up a kernel stack, so call the
+	 *          get_stack_use_cr30 macro to set up a pointer
+	 *          to the pt_regs structure contained within the
+	 *          task pointer pointed to by cr30. Set the stack
+	 *          pointer to point to the end of the task structure.
+	 *
+	 * For Interrupts:
+	 *      If sr7 == 0
+	 *          Already using a kernel stack, check to see if r30
+	 *          is already pointing to the per processor interrupt
+	 *          stack. If it is, call the get_stack_use_r30 macro
+	 *          to push a pt_regs structure on the stack, and store
+	 *          registers there. Otherwise, call get_stack_use_cr31
+	 *          to get a pointer to the base of the interrupt stack
+	 *          and push a pt_regs structure on that stack.
+	 *      else
+	 *          Need to set up a kernel stack, so call the
+	 *          get_stack_use_cr30 macro to set up a pointer
+	 *          to the pt_regs structure contained within the
+	 *          task pointer pointed to by cr30. Set the stack
+	 *          pointer to point to the end of the task structure.
+	 *          N.B: We don't use the interrupt stack for the
+	 *          first interrupt from userland, because signals/
+	 *          resched's are processed when returning to userland,
+	 *          and we can sleep in those cases.
+	 *
+	 * Note that we use shadowed registers for temps until
+	 * we can save %r26 and %r29. %r26 is used to preserve
+	 * %r8 (a shadowed register) which temporarily contained
+	 * either the fault type ("code") or the eirr. We need
+	 * to use a non-shadowed register to carry the value over
+	 * the rfir in virt_map. We use %r26 since this value winds
+	 * up being passed as the argument to either do_cpu_irq_mask
+	 * or handle_interruption. %r29 is used to hold a pointer
+	 * the register save area, and once again, it needs to
+	 * be a non-shadowed register so that it survives the rfir.
+	 *
+	 * N.B. TASK_SZ_ALGN and PT_SZ_ALGN include space for a stack frame.
+	 */
+
+	.macro  get_stack_use_cr30
 
 	/* we save the registers in the task struct */
-	ldo	TASK_REGS(%r1), %r29
-	tophys	%r29
-	STREG	%r30, PT_GR30(%r29)
-	STREG	%r1,  PT_CR30(%r29)
-	ldo	TASK_SZ_ALGN(%r1), %r30
-	b	1f		    /* unconditional so predicted taken */	
-	mtctl	%r0,%cr30
-0:
-	/* we put a struct pt_regs on the stack and save the registers there */
-	copy	%r30,%r29
-	ldo	PT_SZ_ALGN(%r30),%r30
-	tophys	%r29
-	STREG	%r30,PT_GR30(%r29)
-	STREG	%r0,PT_CR30(%r29)
-1:
-	.endm
 
-	.macro	rest_stack regs
-	LDREG	PT_CR30(\regs), %r1
-	comib,=,n 0, %r1, 2f/* forward so predicted not taken */
-
-	/* we restore the registers out of the task struct */
-	mtctl	%r1, %cr30
-	LDREG	PT_GR1(\regs), %r1
-	LDREG	PT_GR30(\regs),%r30
-	b	3f
-	LDREG	PT_GR29(\regs),%r29
-2:
-	/* we take a struct pt_regs off the stack */
-	LDREG	PT_GR1(\regs),  %r1
-	LDREG	PT_GR29(\regs), %r29
-	ldo	-PT_SZ_ALGN(%r30), %r30
-3:
+	mfctl   %cr30, %r1
+	tophys  %r1,%r9
+	LDREG	0(%r9), %r1		/* thread_info -> task_struct */
+	tophys  %r1,%r9
+	ldo     TASK_REGS(%r9),%r9
+	STREG   %r30, PT_GR30(%r9)
+	STREG   %r29,PT_GR29(%r9)
+	STREG   %r26,PT_GR26(%r9)
+	copy    %r9,%r29
+	mfctl   %cr30, %r1
+	ldo	THREAD_SZ_ALGN(%r1), %r30
 	.endm
 
-#ifdef OLD
-	/* fixme interruption handler */
-	.macro	def code
-	/* WARNING!!! THIS IS DEBUG CODE ONLY!!! */
-	b	unimplemented_64bitirq
-	ldi	\code, %r1
-	.align	32
+	.macro  get_stack_use_r30
+
+	/* we put a struct pt_regs on the stack and save the registers there */
+
+	tophys  %r30,%r9
+	STREG   %r30,PT_GR30(%r9)
+	ldo	PT_SZ_ALGN(%r30),%r30
+	STREG   %r29,PT_GR29(%r9)
+	STREG   %r26,PT_GR26(%r9)
+	copy    %r9,%r29
 	.endm
 
-	/* Use def to enable break - KWDB wants em
-	 * (calls traps.c:handle_interruption) */
-	.macro	pass_break code
+	.macro  rest_stack
+	LDREG   PT_GR1(%r29), %r1
+	LDREG   PT_GR30(%r29),%r30
+	LDREG   PT_GR29(%r29),%r29
+	.endm
 
-#else
 	/* default interruption handler
 	 * (calls traps.c:handle_interruption) */
 	.macro	def code
-#endif
-	mtctl	%r29, %cr31
-	mtctl	%r1,  %cr28
-	ldi	\code, %r1
 	b	intr_save
-	mtctl   %r1, %cr29
+	ldi     \code, %r8
 	.align	32
 	.endm
 
 	/* Interrupt interruption handler
-	 * (calls irq.c:do_irq_mask) */
+	 * (calls irq.c:do_cpu_irq_mask) */
 	.macro	extint code
-	mtctl	%r29, %cr31
-	mtctl	%r1,  %cr28
-	mfctl	%cr23, %r1
-	mtctl	%r1, %cr23
 	b	intr_extint
-	mtctl	%r1, %cr29
+	mfsp    %sr7,%r16
 	.align	32
 	.endm	
 
@@ -203,7 +238,6 @@
 	 */
 
 	.macro	itlb_20 code
-
 	mfctl	%pcsq, spc
 #ifdef __LP64__
 	b       itlb_miss_20w
@@ -298,37 +332,27 @@
 	.endm
 	
 #ifndef __LP64__
-	/* nadtlb miss interruption handler (parisc 1.1 - 32 bit)
-	 *
-	 * Note: nadtlb misses will be treated
-	 * as an ordinary dtlb miss for now.
-	 *
-	 */
+	/* nadtlb miss interruption handler (parisc 1.1 - 32 bit) */
 
 	.macro	nadtlb_11 code
 
 	mfctl	%isr,spc
-	b	dtlb_miss_11
+	b       nadtlb_miss_11
 	mfctl	%ior,va
 
 	.align		32
 	.endm
 #endif
 	
-	/* nadtlb miss interruption handler (parisc 2.0)
-	 *
-	 * Note: nadtlb misses will be treated
-	 * as an ordinary dtlb miss for now.
-	 *
-	 */
+	/* nadtlb miss interruption handler (parisc 2.0) */
 
 	.macro	nadtlb_20 code
 
 	mfctl	%isr,spc
 #ifdef __LP64__
-	b       dtlb_miss_20w
+	b       nadtlb_miss_20w
 #else
-	b	dtlb_miss_20
+	b       nadtlb_miss_20
 #endif
 	mfctl	%ior,va
 
@@ -372,13 +396,14 @@
 	 * fault_vector_11 and fault_vector_20 are on the
 	 * same page. This is only necessary as long as we
 	 * write protect the kernel text, which we may stop
-	 * doing once we use large parge translations to cover
+	 * doing once we use large page translations to cover
 	 * the static part of the kernel address space.
 	 */
 
-
 	.export fault_vector_20
 
+	.text
+
 	.align 4096
 
 fault_vector_20:
@@ -402,7 +427,11 @@
 	def		13
 	def		14
 	dtlb_20		15
+#if 0
 	naitlb_20	16
+#else
+	def             16
+#endif
 	nadtlb_20	17
 	def		18
 	def		19
@@ -446,7 +475,11 @@
 	def		13
 	def		14
 	dtlb_11		15
+#if 0
 	naitlb_11	16
+#else
+	def             16
+#endif
 	nadtlb_11	17
 	def		18
 	def		19
@@ -467,7 +500,7 @@
 
 	.import		handle_interruption,code
 	.import		handle_real_interruption,code
-	.import		do_irq_mask,code
+	.import		do_cpu_irq_mask,code
 	.import		parisc_stopkernel,code
 	.import		cpu_irq_region,data
 
@@ -492,7 +525,8 @@
 	ldo	PT_SZ_ALGN(%r30),%r30
 #ifdef __LP64__
 	/* Yo, function pointers in wide mode are little structs... -PB */
-	/* XXX FIXME do we need to honor the fptr's %dp value too? */
+	ldd	24(%r26), %r2
+	STREG	%r2, PT_GR27(%r1)	/* Store childs %dp */
 	ldd	16(%r26), %r26
 #endif
 	STREG	%r26, PT_GR26(%r1)  /* Store function & argument for child */
@@ -500,15 +534,17 @@
 	ldo	CLONE_VM(%r0), %r26   /* Force CLONE_VM since only init_mm */
 	or	%r26, %r24, %r26      /* will have kernel mappings.	 */
 	copy	%r0, %r25
-	bl	do_fork_FIXME_NOW_RETURNS_TASK_STRUCT, %r2
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
+	bl	do_fork, %r2
 	copy	%r1, %r24
 
 	/* Parent Returns here */
 
-	ldo	-PT_SZ_ALGN(%r30), %r30
-	LDREG	-RP_OFFSET(%r30), %r2
+	LDREG	-PT_SZ_ALGN-RP_OFFSET(%r30), %r2
 	bv	%r0(%r2)
-	nop
+	ldo	-PT_SZ_ALGN(%r30), %r30
 
 	/*
 	 * Child Returns here
@@ -520,11 +556,25 @@
 	.export	ret_from_kernel_thread
 ret_from_kernel_thread:
 
-	LDREG	TASK_PT_GR26-TASK_SZ_ALGN(%r30), %r1
-	LDREG	TASK_PT_GR25-TASK_SZ_ALGN(%r30), %r26
+#if CONFIG_PREEMPT || CONFIG_SMP
+	/* Call schedule_tail first though */
+	bl	schedule_tail, %r2
+	nop
+#endif
+
+	LDREG	-THREAD_SZ_ALGN(%r30), %r1
+	LDREG	TASK_PT_GR25(%r1), %r26
+#ifdef __LP64__
+	LDREG	TASK_PT_GR27(%r1), %r27
+#endif
+	LDREG	TASK_PT_GR26(%r1), %r1
 	ble	0(%sr7, %r1)
 	copy	%r31, %r2
 
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+	loadgp				/* Thread could have been in a module */
+#endif
 	b	sys_exit
 	ldi	0, %r26
 
@@ -532,23 +582,22 @@
 	.export	__execve, code
 __execve:
 	copy	%r2, %r15
-	copy	%r23, %r17
 	copy	%r30, %r16
 	ldo	PT_SZ_ALGN(%r30), %r30
 	STREG	%r26, PT_GR26(%r16)
 	STREG	%r25, PT_GR25(%r16)
 	STREG	%r24, PT_GR24(%r16)
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
 	bl	sys_execve, %r2
 	copy	%r16, %r26
 
-	comib,<>,n 0,%r28,__execve_failed
+	cmpib,=,n 0,%r28,intr_return    /* forward */
 
-	b	intr_return
-	STREG	%r17, PT_CR30(%r16)
-
-__execve_failed:
 	/* yes, this will trap and die. */
 	copy	%r15, %r2
+	copy	%r16, %r30
 	bv	%r0(%r2)
 	nop
 
@@ -567,16 +616,19 @@
 
 	ldil	L%_switch_to_ret, %r2
 	ldo	R%_switch_to_ret(%r2), %r2
-	LDIL_FIXUP(%r2)
 
 	STREG	%r2, TASK_PT_KPC(%r26)
 	LDREG	TASK_PT_KPC(%r25), %r2
 
 	STREG	%r30, TASK_PT_KSP(%r26)
 	LDREG	TASK_PT_KSP(%r25), %r30
-
+#ifdef __LP64__
+	LDREG	8(%r25), %r25
+#else
+	LDREG	4(%r25), %r25
+#endif
 	bv	%r0(%r2)
-	nop
+	mtctl   %r25,%cr30
 
 _switch_to_ret:
 	mtctl	%r0, %cr0		/* Needed for single stepping */
@@ -587,27 +639,31 @@
 	copy	%r26, %r28
 
 	/*
-	 * Common rfi return path for interruptions, kernel execve, and some
-	 * syscalls.  The sys_rt_sigreturn syscall will return via this path
-	 * if the signal was received when the process was running; if the
-	 * process was blocked on a syscall then the normal syscall_exit
-	 * path is used.  All syscalls for traced proceses exit via
-	 * intr_restore.
-	 * Note that the following code uses a "relied upon translation". See
-	 * the parisc ACD for details. The ssm is necessary due to a PCXT bug.
+	 * Common rfi return path for interruptions, kernel execve, and
+	 * sys_rt_sigreturn (sometimes).  The sys_rt_sigreturn syscall will
+	 * return via this path if the signal was received when the process
+	 * was running; if the process was blocked on a syscall then the
+	 * normal syscall_exit path is used.  All syscalls for traced
+	 * proceses exit via intr_restore.
+	 *
+	 * XXX If any syscalls that change a processes space id ever exit
+	 * this way, then we will need to copy %sr3 in to PT_SR[3..7], and
+	 * adjust IASQ[0..1].
+	 *
+	 * Note that the following code uses a "relied upon translation".
+	 * See the parisc ACD for details. The ssm is necessary due to a
+	 * PCXT bug.
 	 */
 
 	.align 4096
 
 	.export	syscall_exit_rfi
 syscall_exit_rfi:
-	copy    %r30,%r16
-	/* FIXME! depi below has hardcoded dependency on kernel stack size */
-	depi    0,31,14,%r16 /* get task pointer */
+	mfctl   %cr30,%r16
+	LDREG	0(%r16), %r16		/* thread_info -> task_struct */
 	ldo	TASK_REGS(%r16),%r16
 	/* Force iaoq to userspace, as the user has had access to our current
-	 * context via sigcontext.
-	 * XXX do we need any other protection here?
+	 * context via sigcontext. Also Filter the PSW for the same reason.
 	 */
 	LDREG	PT_IAOQ0(%r16),%r19
 	depi	3,31,2,%r19
@@ -615,57 +671,84 @@
 	LDREG	PT_IAOQ1(%r16),%r19
 	depi	3,31,2,%r19
 	STREG	%r19,PT_IAOQ1(%r16)
-	
+	LDREG   PT_PSW(%r16),%r19
+	ldil    L%USER_PSW_MASK,%r1
+	ldo     R%USER_PSW_MASK(%r1),%r1
+#ifdef __LP64__
+	ldil    L%USER_PSW_HI_MASK,%r20
+	ldo     R%USER_PSW_HI_MASK(%r20),%r20
+	depd    %r20,31,32,%r1
+#endif
+	and     %r19,%r1,%r19 /* Mask out bits that user shouldn't play with */
+	ldil    L%USER_PSW,%r1
+	ldo     R%USER_PSW(%r1),%r1
+	or      %r19,%r1,%r19 /* Make sure default USER_PSW bits are set */
+	STREG   %r19,PT_PSW(%r16)
+
+	/*
+	 * If we aren't being traced, we never saved space registers
+	 * (we don't store them in the sigcontext), so set them
+	 * to "proper" values now (otherwise we'll wind up restoring
+	 * whatever was last stored in the task structure, which might
+	 * be inconsistant if an interrupt occured while on the gateway
+	 * page) Note that we may be "trashing" values the user put in
+	 * them, but we don't support the the user changing them.
+	 */
+
+	STREG   %r0,PT_SR2(%r16)
+	mfsp    %sr3,%r19
+	STREG   %r19,PT_SR0(%r16)
+	STREG   %r19,PT_SR1(%r16)
+	STREG   %r19,PT_SR3(%r16)
+	STREG   %r19,PT_SR4(%r16)
+	STREG   %r19,PT_SR5(%r16)
+	STREG   %r19,PT_SR6(%r16)
+	STREG   %r19,PT_SR7(%r16)
+
 intr_return:
+	ssm     PSW_SM_I, %r0
 
 	/* Check for software interrupts */
 
 	.import irq_stat,data
 
-	ldil    L%irq_stat,%r19
-	ldo     R%irq_stat(%r19),%r19
-	LDIL_FIXUP(%r19)
-
+	ldil	L%irq_stat,%r19
+	ldo	R%irq_stat(%r19),%r19
 #ifdef CONFIG_SMP
-	copy    %r30,%r1
-	/* FIXME! depi below has hardcoded dependency on kernel stack size */
-	depi    0,31,14,%r1 /* get task pointer */
-	ldw     TASK_PROCESSOR(%r1),%r20 /* get cpu # - int */
-#if (IRQSTAT_SZ == 32)
-	dep     %r20,26,27,%r20 /* shift left 5 bits */
-#else
-#error IRQSTAT_SZ changed, fix dep
-#endif /* IRQSTAT_SZ */
-	add     %r19,%r20,%r19
+	mfctl   %cr30,%r1
+	ldw	TI_CPU(%r1),%r1 /* get cpu # - int */
+	/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount
+	** irq_stat[] is defined using ____cacheline_aligned.
+	*/
+#ifdef __LP64__
+	shld	%r1, 6, %r20
+#else
+	shlw	%r1, 5, %r20
+#endif
+	add     %r19,%r20,%r19	/* now have &irq_stat[smp_processor_id()] */
 #endif /* CONFIG_SMP */
 
-	ldw     IRQSTAT_SI_ACTIVE(%r19),%r20	/* hardirq.h: unsigned int */
-	ldw     IRQSTAT_SI_MASK(%r19),%r19	/* hardirq.h: unsigned int */
-	and     %r19,%r20,%r20
-	comib,<>,n 0,%r20,intr_do_softirq /* forward */
+	LDREG   IRQSTAT_SIRQ_PEND(%r19),%r20    /* hardirq.h: unsigned long */
+	cmpib,<>,n 0,%r20,intr_do_softirq /* forward */
 
 intr_check_resched:
 
 	/* check for reschedule */
-	copy    %r30,%r1
-	/* FIXME! depi below has hardcoded dependency on kernel stack size */
-	depi    0,31,14,%r1 /* get task pointer */
-#error	LDREG     TASK_NEED_RESCHED(%r1),%r19	/* sched.h: long need_resched */
-	comib,<>,n 0,%r19,intr_do_resched /* forward */
+	mfctl   %cr30,%r1
+	LDREG   TI_FLAGS(%r1),%r19	/* sched.h: TIF_NEED_RESCHED */
+	bb,<,n	%r19,31-TIF_NEED_RESCHED,intr_do_resched /* forward */
 
 intr_check_sig:
 	/* As above */
-	copy    %r30,%r1
-	depi    0,31,14,%r1 /* get task pointer */
-#error	ldw	TASK_SIGPENDING(%r1),%r19	/* sched.h: int sigpending */
-	comib,<>,n 0,%r19,intr_do_signal /* forward */
+	mfctl   %cr30,%r1
+	LDREG	TI_FLAGS(%r1),%r19	/* sched.h: TIF_SIGPENDING */
+	bb,<,n %r19, 31-TIF_SIGPENDING, intr_do_signal /* forward */
 
 intr_restore:
-	copy	    	%r16, %r29
-	ldo		PT_FR31(%r29), %r29
-	rest_fp		%r29
-	copy    	%r16, %r29
-	rest_general 	%r29
+	copy            %r16,%r29
+	ldo             PT_FR31(%r29),%r1
+	rest_fp         %r1
+	rest_general    %r29
 	ssm		0,%r0
 	nop
 	nop
@@ -674,10 +757,10 @@
 	nop
 	nop
 	nop
-	tophys		%r29
-	mtsm		%r0
+	tophys_r1       %r29
+	rsm             (PSW_SM_Q|PSW_SM_P|PSW_SM_D|PSW_SM_I),%r0
 	rest_specials	%r29
-	rest_stack	%r29
+	rest_stack
 	rfi
 	nop
 	nop
@@ -691,88 +774,173 @@
 	.import do_softirq,code
 intr_do_softirq:
 	bl      do_softirq,%r2
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#else
 	nop
+#endif
 	b       intr_check_resched
 	nop
 
 	.import schedule,code
 intr_do_resched:
 	/* Only do reschedule if we are returning to user space */
-	LDREG     PT_SR7(%r16), %r20
-	comib,= 0,%r20,intr_restore /* backward */
+	LDREG   PT_IASQ0(%r16), %r20
+	CMPIB= 0,%r20,intr_restore /* backward */
+	nop
+	LDREG   PT_IASQ1(%r16), %r20
+	CMPIB= 0,%r20,intr_restore /* backward */
 	nop
 
-	bl      schedule,%r2
-	ssm     PSW_SM_I, %r0
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
+
+	ldil	L%intr_return, %r2
+	b	schedule
+	ldo	R%intr_return(%r2), %r2	/* return to intr_return, not here */
 
-	/* It's OK to leave I bit on */
-	b       intr_return /* start over if we got a resched */
-	nop
 
 	.import do_signal,code
 intr_do_signal:
 	/* Only do signals if we are returning to user space */
-	LDREG   PT_SR7(%r16), %r20
-	comib,= 0,%r20,intr_restore /* backward */
+	LDREG   PT_IASQ0(%r16), %r20
+	CMPIB= 0,%r20,intr_restore /* backward */
+	nop
+	LDREG   PT_IASQ1(%r16), %r20
+	CMPIB= 0,%r20,intr_restore /* backward */
 	nop
 
 	copy	%r0, %r24			/* unsigned long in_syscall */
 	copy	%r16, %r25			/* struct pt_regs *regs */
 	ssm     PSW_SM_I, %r0
-#error	bl	do_signal,%r2
+#ifdef __LP64__
+	ldo	-16(%r30),%r29			/* Reference param save area */
+#endif
+#warning TAUSQ FIXME, this is wrong
+	bl	do_signal,%r2
 	copy	%r0, %r26			/* sigset_t *oldset = NULL */
 
 	b	intr_restore
 	nop
 
-	/* CR28 - saved GR1
-	 * CR29 - argument for do_irq_mask */
+	/*
+	 * External interrupts.
+	 */
 
-	/* External interrupts */
 intr_extint:
-	get_stack
+	CMPIB=,n 0,%r16,1f
+	get_stack_use_cr30
+	b,n 3f
+
+1:
+#if 0  /* Interrupt Stack support not working yet! */
+	mfctl	%cr31,%r1
+	copy	%r30,%r17
+	/* FIXME! depi below has hardcoded idea of interrupt stack size (32k)*/
+#ifdef __LP64__
+	depdi	0,63,15,%r17
+#else
+	depi	0,31,15,%r17
+#endif
+	CMPB=,n	%r1,%r17,2f
+	get_stack_use_cr31
+	b,n 3f
+#endif
+2:
+	get_stack_use_r30
+
+3:
 	save_specials	%r29
-	virt_map	rfi
+	virt_map
 	save_general	%r29
 
-	ldo		PT_FR0(%r29), %r24
-	save_fp		%r24
+	ldo	PT_FR0(%r29), %r24
+	save_fp	%r24
 	
 	loadgp
 
-	copy		%r29, %r24	/* arg2 is pt_regs */
-	copy		%r29, %r16	/* save pt_regs */
-#ifdef CONFIG_KWDB
-	copy		%r29, %r3	/* KWDB - update frame pointer (gr3) */
-#endif
+	copy	%r29, %r25	/* arg1 is pt_regs */
+	copy	%r29, %r16	/* save pt_regs */
 
-	/* sorry to put this cruft in the interrupt path */
-	ldil		L%cpu_irq_region, %r25
-	ldo		R%cpu_irq_region(%r25), %r25
-	bl		do_irq_mask,%r2
 #ifdef __LP64__
-	LDIL_FIXUP(%r25)
+	ldo	-16(%r30),%r29	/* Reference param save area */
 #else
 	nop
 #endif
-
-	b		intr_return
-	nop
+	
+	/*
+	 * We need to either load the CPU's ID or IRQ region.
+	 * Until we have "per CPU" IRQ regions, this is easy.
+	 */
+	ldil	L%cpu_irq_region, %r26
+	ldil	L%intr_return, %r2
+	ldo	R%cpu_irq_region(%r26), %r26
+	
+	b	do_cpu_irq_mask
+	ldo	R%intr_return(%r2), %r2	/* return to intr_return, not here */
 
 	/* Generic interruptions (illegal insn, unaligned, page fault, etc) */
 
 	.export         intr_save, code /* for os_hpmc */
 
 intr_save:
-	get_stack
+	mfsp    %sr7,%r16
+	CMPIB=,n 0,%r16,1f
+	get_stack_use_cr30
+	b	2f
+	copy    %r8,%r26
+
+1:
+	get_stack_use_r30
+	copy    %r8,%r26
+
+2:
 	save_specials	%r29
 
-	mfctl		%cr20, %r1
-	STREG		%r1, PT_ISR(%r29)
-	mfctl		%cr21, %r1
-	STREG		%r1, PT_IOR(%r29)
+	/* If this trap is a itlb miss, skip saving/adjusting isr/ior */
+
+	/*
+	 * FIXME: 1) Use a #define for the hardwired "6" below (and in
+	 *           traps.c.
+	 *        2) Once we start executing code above 4 Gb, we need
+	 *           to adjust iasq/iaoq here in the same way we
+	 *           adjust isr/ior below.
+	 */
+
+	CMPIB=,n        6,%r26,skip_save_ior
+
+	/* save_specials left ipsw value in r8 for us to test */
+
+	mfctl           %cr20, %r16 /* isr */
+	mfctl           %cr21, %r17 /* ior */
+
+#ifdef __LP64__
+	/*
+	 * If the interrupted code was running with W bit off (32 bit),
+	 * clear the b bits (bits 0 & 1) in the ior.
+	 */
+	extrd,u,*<>     %r8,PSW_W_BIT,1,%r0
+	depdi           0,1,2,%r17
+
+	/*
+	 * FIXME: This code has hardwired assumptions about the split
+	 *        between space bits and offset bits. This will change
+	 *        when we allow alternate page sizes.
+	 */
+
+	/* adjust isr/ior. */
+
+	extrd,u         %r16,63,7,%r1    /* get high bits from isr for ior */
+	depd            %r1,31,7,%r17    /* deposit them into ior */
+	depdi           0,63,7,%r16      /* clear them from isr */
+#endif
+	STREG           %r16, PT_ISR(%r29)
+	STREG           %r17, PT_IOR(%r29)
+
 
-	virt_map	rfi
+skip_save_ior:
+	virt_map
 	save_general	%r29
 
 	ldo		PT_FR0(%r29), %r25
@@ -781,15 +949,16 @@
 	loadgp
 
 	copy		%r29, %r25	/* arg1 is pt_regs */
-#ifdef CONFIG_KWDB
-	copy		%r29, %r3	/* KWDB - update frame pointer (gr3) */
+#ifdef __LP64__
+	ldo		-16(%r30),%r29	/* Reference param save area */
 #endif
 
-	bl		handle_interruption,%r2
-	copy		%r29, %r16	/* save pt_regs */
+	ldil		L%intr_return, %r2
+	copy		%r25, %r16	/* save pt_regs */
+
+	b		handle_interruption
+	ldo		R%intr_return(%r2), %r2	/* return to intr_return */
 
-	b		intr_return
-	nop
 
 	/*
 	 * Note for all tlb miss handlers:
@@ -821,10 +990,9 @@
 #ifdef __LP64__
 
 dtlb_miss_20w:
-
-	extrd,u         spc,31,7,t1     /* adjust va */
+	extrd,u         spc,63,7,t1     /* adjust va */
 	depd            t1,31,7,va      /* adjust va */
-	depdi           0,31,7,spc      /* adjust space */
+	depdi           0,63,7,spc      /* adjust space */
 	mfctl           %cr25,ptp	/* Assume user space miss */
 	or,*<>          %r0,spc,%r0     /* If it is user space, nullify */
 	mfctl           %cr24,ptp	/* Load kernel pgd instead */
@@ -832,20 +1000,20 @@
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,*=           %r0,t0,%r0      /* If kernel, nullify following test */
-	comb,<>,n       t0,spc,dtlb_fault /* forward */
+	cmpb,*<>,n       t0,spc,dtlb_fault /* forward */
 
 	/* First level page table lookup */
 
 	ldd,s           t1(ptp),ptp
 	extrd,u         va,42,9,t0     /* get second-level index */
-	bb,>=,n 	ptp,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,dtlb_check_alias_20w
 	depdi           0,63,12,ptp     /* clear prot bits */
 
 	/* Second level page table lookup */
 
 	ldd,s           t0(ptp),ptp
 	extrd,u         va,51,9,t0     /* get third-level index */
-	bb,>=,n 	ptp,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,dtlb_check_alias_20w
 	depdi           0,63,12,ptp     /* clear prot bits */
 
 	/* Third level page table lookup */
@@ -853,7 +1021,7 @@
 	shladd           t0,3,ptp,ptp
 	ldi		_PAGE_ACCESSED,t1
 	ldd              0(ptp),pte
-	bb,>=,n          pte,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n          pte,_PAGE_PRESENT_BIT,dtlb_check_alias_20w
 
 	/* Check whether the "accessed" bit was set, otherwise do so */
 
@@ -861,11 +1029,9 @@
 	and,*<>         t1,pte,%r0      /* test and nullify if already set */
 	std             t0,0(ptp)       /* write back pte */
 
-	copy            spc,prot	/* init prot with faulting space */
-	
-	depd		pte,8,7,prot
-	extrd,u,*=	pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
+
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -874,11 +1040,106 @@
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
 	depdi		0,63,12,pte
-	extrd,u         pte,56,32,pte
-	idtlbt		%r16,%r17
+	extrd,u         pte,56,52,pte
+	idtlbt          pte,prot
 
 	rfir
 	nop
+
+dtlb_check_alias_20w:
+
+	/* Check to see if fault is in the temporary alias region */
+
+	cmpib,*<>,n     0,spc,dtlb_fault /* forward */
+	ldil            L%(TMPALIAS_MAP_START),t0
+	copy            va,t1
+	depdi           0,63,23,t1
+	cmpb,*<>,n      t0,t1,dtlb_fault /* forward */
+	ldi             (_PAGE_DIRTY|_PAGE_WRITE|_PAGE_READ),prot
+	depd,z          prot,8,7,prot
+
+	/*
+	 * OK, it is in the temp alias region, check whether "from" or "to".
+	 * Check "subtle" note in pacache.S re: r23/r26.
+	 */
+
+	extrd,u,*=      va,41,1,r0
+	or,*tr          %r23,%r0,pte    /* If "from" use "from" page */
+	or,*            %r26,%r0,pte    /* else "to", use "to" page  */
+
+	idtlbt          pte,prot
+
+	rfir
+	nop
+
+nadtlb_miss_20w:
+	extrd,u         spc,63,7,t1     /* adjust va */
+	depd            t1,31,7,va      /* adjust va */
+	depdi           0,63,7,spc      /* adjust space */
+	mfctl           %cr25,ptp	/* Assume user space miss */
+	or,*<>          %r0,spc,%r0     /* If it is user space, nullify */
+	mfctl           %cr24,ptp	/* Load kernel pgd instead */
+	extrd,u         va,33,9,t1      /* Get pgd index */
+
+	mfsp            %sr7,t0		/* Get current space */
+	or,*=           %r0,t0,%r0      /* If kernel, nullify following test */
+	cmpb,*<>,n       t0,spc,nadtlb_fault /* forward */
+
+	/* First level page table lookup */
+
+	ldd,s           t1(ptp),ptp
+	extrd,u         va,42,9,t0     /* get second-level index */
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,nadtlb_emulate
+	depdi           0,63,12,ptp     /* clear prot bits */
+
+	/* Second level page table lookup */
+
+	ldd,s           t0(ptp),ptp
+	extrd,u         va,51,9,t0     /* get third-level index */
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,nadtlb_emulate
+	depdi           0,63,12,ptp     /* clear prot bits */
+
+	/* Third level page table lookup */
+
+	shladd           t0,3,ptp,ptp
+	ldi		_PAGE_ACCESSED,t1
+	ldd              0(ptp),pte
+	bb,>=,n          pte,_PAGE_PRESENT_BIT,nadtlb_check_flush_20w
+
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
+
+	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
+	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
+	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
+	depdi		0,11,2,prot	/* If Gateway, Set PL2 to 0 */
+
+	/* Get rid of prot bits and convert to page addr for idtlbt */
+
+	depdi		0,63,12,pte
+	extrd,u         pte,56,52,pte
+	idtlbt          pte,prot
+
+	rfir
+	nop
+
+nadtlb_check_flush_20w:
+	bb,>=,n          pte,_PAGE_FLUSH_BIT,nadtlb_emulate
+
+	/* Insert a "flush only" translation */
+
+	depdi,z         7,7,3,prot
+	depdi           1,10,1,prot
+
+	/* Get rid of prot bits and convert to page addr for idtlbt */
+
+	depdi		0,63,12,pte
+	extrd,u         pte,56,52,pte
+	idtlbt          pte,prot
+
+	rfir
+	nop
+
 #else
 
 dtlb_miss_11:
@@ -889,13 +1150,13 @@
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
-	comb,<>,n       t0,spc,dtlb_fault /* forward */
+	cmpb,<>,n       t0,spc,dtlb_fault /* forward */
 
 	/* First level page table lookup */
 
 	ldwx,s		t1(ptp),ptp
 	extru		va,19,10,t0	/* get second-level index */
-	bb,>=,n 	ptp,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,dtlb_check_alias_11
 	depi		0,31,12,ptp	/* clear prot bits */
 
 	/* Second level page table lookup */
@@ -903,7 +1164,7 @@
 	sh2addl 	 t0,ptp,ptp
 	ldi		_PAGE_ACCESSED,t1
 	ldw		 0(ptp),pte
-	bb,>=,n 	 pte,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n          pte,_PAGE_PRESENT_BIT,dtlb_check_alias_11
 
 	/* Check whether the "accessed" bit was set, otherwise do so */
 
@@ -911,8 +1172,8 @@
 	and,<>		t1,pte,%r0	/* test and nullify if already set */
 	stw		t0,0(ptp)	/* write back pte */
 
-	copy            spc,prot	/* init prot with faulting space */
-	dep		pte,8,7,prot
+	zdep            spc,30,15,prot  /* create prot id from space */
+	dep             pte,8,7,prot    /* add in prot bits from pte */
 
 	extru,=		pte,_PAGE_NO_CACHE_BIT,1,r0
 	depi		1,12,1,prot
@@ -937,9 +1198,108 @@
 	rfir
 	nop
 
-dtlb_miss_20:
-	.level 2.0
+dtlb_check_alias_11:
+
+	/* Check to see if fault is in the temporary alias region */
+
+	cmpib,<>,n      0,spc,dtlb_fault /* forward */
+	ldil            L%(TMPALIAS_MAP_START),t0
+	copy            va,t1
+	depwi           0,31,23,t1
+	cmpb,<>,n       t0,t1,dtlb_fault /* forward */
+	ldi             (_PAGE_DIRTY|_PAGE_WRITE|_PAGE_READ),prot
+	depw,z          prot,8,7,prot
+
+	/*
+	 * OK, it is in the temp alias region, check whether "from" or "to".
+	 * Check "subtle" note in pacache.S re: r23/r26.
+	 */
+
+	extrw,u,=       va,9,1,r0
+	or,tr           %r23,%r0,pte    /* If "from" use "from" page */
+	or              %r26,%r0,pte    /* else "to", use "to" page  */
+
+	idtlba          pte,(va)
+	idtlbp          prot,(va)
+
+	rfir
+	nop
+
+nadtlb_miss_11:
+	mfctl           %cr25,ptp	/* Assume user space miss */
+	or,<>           %r0,spc,%r0	/* If it is user space, nullify */
+	mfctl           %cr24,ptp	/* Load kernel pgd instead */
+	extru		va,9,10,t1	/* Get pgd index */
+
+	mfsp            %sr7,t0		/* Get current space */
+	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
+	cmpb,<>,n       t0,spc,nadtlb_fault /* forward */
+
+	/* First level page table lookup */
+
+	ldwx,s		t1(ptp),ptp
+	extru		va,19,10,t0	/* get second-level index */
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,nadtlb_emulate
+	depi		0,31,12,ptp	/* clear prot bits */
+
+	/* Second level page table lookup */
+
+	sh2addl 	 t0,ptp,ptp
+	ldi		_PAGE_ACCESSED,t1
+	ldw		 0(ptp),pte
+	bb,>=,n          pte,_PAGE_PRESENT_BIT,nadtlb_check_flush_11
+
+	zdep            spc,30,15,prot  /* create prot id from space */
+	dep             pte,8,7,prot    /* add in prot bits from pte */
+
+	extru,=		pte,_PAGE_NO_CACHE_BIT,1,r0
+	depi		1,12,1,prot
+	extru,=         pte,_PAGE_USER_BIT,1,r0
+	depi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
+	extru,= 	pte,_PAGE_GATEWAY_BIT,1,r0
+	depi		0,11,2,prot	/* If Gateway, Set PL2 to 0 */
+
+	/* Get rid of prot bits and convert to page addr for idtlba */
+
+	depi		0,31,12,pte
+	extru		pte,24,25,pte
+
+	mfsp		%sr1,t0  /* Save sr1 so we can use it in tlb inserts */
+	mtsp		spc,%sr1
+
+	idtlba		pte,(%sr1,va)
+	idtlbp		prot,(%sr1,va)
+
+	mtsp		t0, %sr1	/* Restore sr1 */
+
+	rfir
+	nop
+
+nadtlb_check_flush_11:
+	bb,>=,n          pte,_PAGE_FLUSH_BIT,nadtlb_emulate
+
+	/* Insert a "flush only" translation */
 
+	zdepi           7,7,3,prot
+	depi            1,10,1,prot
+
+	/* Get rid of prot bits and convert to page addr for idtlba */
+
+	depi		0,31,12,pte
+	extru		pte,24,25,pte
+
+	mfsp		%sr1,t0  /* Save sr1 so we can use it in tlb inserts */
+	mtsp		spc,%sr1
+
+	idtlba		pte,(%sr1,va)
+	idtlbp		prot,(%sr1,va)
+
+	mtsp		t0, %sr1	/* Restore sr1 */
+
+	rfir
+	nop
+
+dtlb_miss_20:
 	mfctl           %cr25,ptp	/* Assume user space miss */
 	or,<>           %r0,spc,%r0	/* If it is user space, nullify */
 	mfctl           %cr24,ptp	/* Load kernel pgd instead */
@@ -947,13 +1307,13 @@
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
-	comb,<>,n       t0,spc,dtlb_fault /* forward */
+	cmpb,<>,n       t0,spc,dtlb_fault /* forward */
 
 	/* First level page table lookup */
 
 	ldwx,s		t1(ptp),ptp
 	extru		va,19,10,t0	/* get second-level index */
-	bb,>=,n 	ptp,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,dtlb_check_alias_20
 	depi		0,31,12,ptp	/* clear prot bits */
 
 	/* Second level page table lookup */
@@ -961,7 +1321,7 @@
 	sh2addl 	 t0,ptp,ptp
 	ldi		_PAGE_ACCESSED,t1
 	ldw		 0(ptp),pte
-	bb,>=,n 	 pte,_PAGE_PRESENT_BIT,dtlb_fault
+	bb,>=,n          pte,_PAGE_PRESENT_BIT,dtlb_check_alias_20
 
 	/* Check whether the "accessed" bit was set, otherwise do so */
 
@@ -969,11 +1329,9 @@
 	and,<>		t1,pte,%r0	/* test and nullify if already set */
 	stw		t0,0(ptp)	/* write back pte */
 
-	copy            spc,prot	/* init prot with faulting space */
-	
-	depd		pte,8,7,prot
-	extrd,u,*=	pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
+
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -981,16 +1339,145 @@
 
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
-	idtlbt		%r16,%r17
+	extrd,s         pte,35,4,t0
+	depdi		0,63,12,pte	/* clear lower 12 bits */
+        addi,=          1,t0,0 
+        extrd,u,*tr     pte,56,25,pte 
+	extrd,s		pte,56,25,pte	/* bit 31:8 >> 8  */ 
+	idtlbt          pte,prot
+
+	rfir
+	nop
 
-	.level		1.1
+dtlb_check_alias_20:
+
+	/* Check to see if fault is in the temporary alias region */
+
+	cmpib,<>,n      0,spc,dtlb_fault /* forward */
+	ldil            L%(TMPALIAS_MAP_START),t0
+	copy            va,t1
+	depwi           0,31,23,t1
+	cmpb,<>,n       t0,t1,dtlb_fault /* forward */
+	ldi             (_PAGE_DIRTY|_PAGE_WRITE|_PAGE_READ),prot
+	depd,z          prot,8,7,prot
+
+	/*
+	 * OK, it is in the temp alias region, check whether "from" or "to".
+	 * Check "subtle" note in pacache.S re: r23/r26.
+	 */
+
+	extrw,u,=       va,9,1,r0
+	or,tr           %r23,%r0,pte    /* If "from" use "from" page */
+	or              %r26,%r0,pte    /* else "to", use "to" page  */
+
+	idtlbt          pte,prot
+
+	rfir
+	nop
+
+nadtlb_miss_20:
+	mfctl           %cr25,ptp	/* Assume user space miss */
+	or,<>           %r0,spc,%r0	/* If it is user space, nullify */
+	mfctl           %cr24,ptp	/* Load kernel pgd instead */
+	extru		va,9,10,t1	/* Get pgd index */
+
+	mfsp            %sr7,t0		/* Get current space */
+	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
+	cmpb,<>,n       t0,spc,nadtlb_fault /* forward */
+
+	/* First level page table lookup */
+
+	ldwx,s		t1(ptp),ptp
+	extru		va,19,10,t0	/* get second-level index */
+	bb,>=,n         ptp,_PAGE_PRESENT_BIT,nadtlb_emulate
+	depi		0,31,12,ptp	/* clear prot bits */
+
+	/* Second level page table lookup */
+
+	sh2addl 	 t0,ptp,ptp
+	ldi		_PAGE_ACCESSED,t1
+	ldw		 0(ptp),pte
+	bb,>=,n          pte,_PAGE_PRESENT_BIT,nadtlb_check_flush_20
+
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
+
+	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
+	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
+	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
+	depdi		0,11,2,prot	/* If Gateway, Set PL2 to 0 */
+
+	/* Get rid of prot bits and convert to page addr for idtlbt */
+
+        extrd,s         pte,35,4,t0
+        depdi           0,63,12,pte     /* clear lower 12 bits */
+        addi,=          1,t0,0
+        extrd,u,*tr     pte,56,25,pte
+        extrd,s         pte,56,25,pte   /* bit 31:8 >> 8  */
+        idtlbt          pte,prot
+
+	rfir
+	nop
+
+nadtlb_check_flush_20:
+	bb,>=,n          pte,_PAGE_FLUSH_BIT,nadtlb_emulate
+
+	/* Insert a "flush only" translation */
+
+	depdi,z         7,7,3,prot
+	depdi           1,10,1,prot
+
+	/* Get rid of prot bits and convert to page addr for idtlbt */
+
+	depdi		0,63,12,pte
+	extrd,u         pte,56,32,pte
+	idtlbt          pte,prot
 
 	rfir
 	nop
 #endif
 
+nadtlb_emulate:
+
+	/*
+	 * Non access misses can be caused by fdc,fic,pdc,lpa,probe and
+	 * probei instructions. We don't want to fault for these
+	 * instructions (not only does it not make sense, it can cause
+	 * deadlocks, since some flushes are done with the mmap
+	 * semaphore held). If the translation doesn't exist, we can't
+	 * insert a translation, so have to emulate the side effects
+	 * of the instruction. Since we don't insert a translation
+	 * we can get a lot of faults during a flush loop, so it makes
+	 * sense to try to do it here with minimum overhead. We only
+	 * emulate fdc,fic & pdc instructions whose base and index
+	 * registers are not shadowed. We defer everything else to the
+	 * "slow" path.
+	 */
+
+	mfctl           %cr19,%r9 /* Get iir */
+	ldi             0x280,%r16
+	and             %r9,%r16,%r17
+	cmpb,<>,n       %r16,%r17,nadtlb_fault /* Not fdc,fic,pdc */
+	bb,>=,n         %r9,26,nadtlb_nullify  /* m bit not set, just nullify */
+	b,l             get_register,%r25
+	extrw,u         %r9,15,5,%r8           /* Get index register # */
+	CMPIB=,n        -1,%r1,nadtlb_fault    /* have to use slow path */
+	copy            %r1,%r24
+	b,l             get_register,%r25
+	extrw,u         %r9,10,5,%r8           /* Get base register # */
+	CMPIB=,n        -1,%r1,nadtlb_fault    /* have to use slow path */
+	b,l             set_register,%r25
+	add,l           %r1,%r24,%r1           /* doesn't affect c/b bits */
+
+nadtlb_nullify:
+	mfctl           %cr22,%r8              /* Get ipsw */
+	ldil            L%PSW_N,%r9
+	or              %r8,%r9,%r8            /* Set PSW_N */
+	mtctl           %r8,%cr22
+
+	rfir
+	nop
+
 #ifdef __LP64__
 itlb_miss_20w:
 
@@ -999,9 +1486,9 @@
 	 * on the gateway page which is in the kernel address space.
 	 */
 
-	extrd,u         spc,31,7,t1     /* adjust va */
+	extrd,u         spc,63,7,t1     /* adjust va */
 	depd            t1,31,7,va      /* adjust va */
-	depdi           0,31,7,spc      /* adjust space */
+	depdi           0,63,7,spc      /* adjust space */
 	cmpib,*=        0,spc,itlb_miss_kernel_20w
 	extrd,u         va,33,9,t1      /* Get pgd index */
 
@@ -1039,11 +1526,9 @@
 	and,*<>         t1,pte,%r0      /* test and nullify if already set */
 	std             t0,0(ptp)       /* write back pte */
 
-	copy            spc,prot        /* init prot with faulting space */
-	
-	depd		pte,8,7,prot
-	extrd,u,*=	pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
+
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -1053,7 +1538,7 @@
 
 	depdi		0,63,12,pte
 	extrd,u         pte,56,32,pte
-	iitlbt          %r16,%r17
+	iitlbt          pte,prot
 
 	rfir
 	nop
@@ -1070,14 +1555,14 @@
 	 * on the gateway page which is in the kernel address space.
 	 */
 
-	comib,=         0,spc,itlb_miss_kernel_11
+	cmpib,=         0,spc,itlb_miss_kernel_11
 	extru		va,9,10,t1	/* Get pgd index */
 
 	mfctl           %cr25,ptp	/* load user pgd */
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
-	comb,<>,n       t0,spc,itlb_fault /* forward */
+	cmpb,<>,n       t0,spc,itlb_fault /* forward */
 
 	/* First level page table lookup */
 
@@ -1100,8 +1585,8 @@
 	and,<>		t1,pte,%r0	/* test and nullify if already set */
 	stw		t0,0(ptp)	/* write back pte */
 
-	copy            spc,prot        /* init prot with faulting space */
-	dep		pte,8,7,prot
+	zdep            spc,30,15,prot  /* create prot id from space */
+	dep             pte,8,7,prot    /* add in prot bits from pte */
 
 	extru,=		pte,_PAGE_NO_CACHE_BIT,1,r0
 	depi		1,12,1,prot
@@ -1137,14 +1622,14 @@
 	 * on the gateway page which is in the kernel address space.
 	 */
 
-	comib,=         0,spc,itlb_miss_kernel_20
+	cmpib,=         0,spc,itlb_miss_kernel_20
 	extru		va,9,10,t1	/* Get pgd index */
 
 	mfctl           %cr25,ptp	/* load user pgd */
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
-	comb,<>,n       t0,spc,itlb_fault /* forward */
+	cmpb,<>,n       t0,spc,itlb_fault /* forward */
 
 	/* First level page table lookup */
 
@@ -1167,13 +1652,9 @@
 	and,<>		t1,pte,%r0	/* test and nullify if already set */
 	stw		t0,0(ptp)	/* write back pte */
 
-	copy            spc,prot        /* init prot with faulting space */
-	
-	.level 2.0
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
 
-	depd		pte,8,7,prot
-	extrd,u,*=	pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -1181,10 +1662,12 @@
 
 	/* Get rid of prot bits and convert to page addr for iitlbt */
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
-	iitlbt          %r16,%r17
-	.level		1.1
+        extrd,s         pte,35,4,t0 
+        depdi           0,63,12,pte     /* clear lower 12 bits */
+        addi,=          1,t0,0
+        extrd,u,*tr     pte,56,25,pte 
+        extrd,s         pte,56,25,pte   /* bit 31:8 >> 8  */
+	iitlbt          pte,prot
 
 	rfir
 	nop
@@ -1198,11 +1681,10 @@
 #ifdef __LP64__
 
 dbit_trap_20w:
-
-	extrd,u         spc,31,7,t1     /* adjust va */
+	extrd,u         spc,63,7,t1     /* adjust va */
 	depd            t1,31,7,va      /* adjust va */
 	depdi           0,1,2,va        /* adjust va */
-	depdi           0,31,7,spc      /* adjust space */
+	depdi           0,63,7,spc      /* adjust space */
 	mfctl           %cr25,ptp	/* Assume user space miss */
 	or,*<>          %r0,spc,%r0     /* If it is user space, nullify */
 	mfctl           %cr24,ptp	/* Load kernel pgd instead */
@@ -1210,7 +1692,7 @@
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,*=           %r0,t0,%r0      /* If kernel, nullify following test */
-	comb,<>,n       t0,spc,dbit_fault /* forward */
+	cmpb,*<>,n       t0,spc,dbit_fault /* forward */
 
 	/* First level page table lookup */
 
@@ -1229,6 +1711,18 @@
 	/* Third level page table lookup */
 
 	shladd           t0,3,ptp,ptp
+#ifdef CONFIG_SMP
+	CMPIB=,n        0,spc,dbit_nolock_20w
+	ldil            L%PA(pa_dbit_lock),t0
+	ldo             R%PA(pa_dbit_lock)(t0),t0
+
+dbit_spin_20w:
+	ldcw            0(t0),t1
+	cmpib,=         0,t1,dbit_spin_20w
+	nop
+
+dbit_nolock_20w:
+#endif
 	ldi		(_PAGE_ACCESSED|_PAGE_DIRTY),t1
 	ldd              0(ptp),pte
 	bb,>=,n          pte,_PAGE_PRESENT_BIT,dbit_fault
@@ -1238,11 +1732,9 @@
 	or		t1,pte,pte
 	std             pte,0(ptp)      /* write back pte */
 
-	copy            spc,prot	/* init prot with faulting space */
-	
-	depd		pte,8,7,prot
-	extrd,u,*=	pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
+
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -1251,8 +1743,15 @@
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
 	depdi		0,63,12,pte
-	extrd,u         pte,56,32,pte
-	idtlbt		%r16,%r17
+	extrd,u         pte,56,52,pte
+	idtlbt          pte,prot
+#ifdef CONFIG_SMP
+	CMPIB=,n        0,spc,dbit_nounlock_20w
+	ldi             1,t1
+	stw             t1,0(t0)
+
+dbit_nounlock_20w:
+#endif
 
 	rfir
 	nop
@@ -1266,7 +1765,7 @@
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
-	comb,<>,n       t0,spc,dbit_fault /* forward */
+	cmpb,<>,n       t0,spc,dbit_fault /* forward */
 
 	/* First level page table lookup */
 
@@ -1278,6 +1777,18 @@
 	/* Second level page table lookup */
 
 	sh2addl 	 t0,ptp,ptp
+#ifdef CONFIG_SMP
+	CMPIB=,n        0,spc,dbit_nolock_11
+	ldil            L%PA(pa_dbit_lock),t0
+	ldo             R%PA(pa_dbit_lock)(t0),t0
+
+dbit_spin_11:
+	ldcw            0(t0),t1
+	cmpib,=         0,t1,dbit_spin_11
+	nop
+
+dbit_nolock_11:
+#endif
 	ldi		(_PAGE_ACCESSED|_PAGE_DIRTY),t1
 	ldw		 0(ptp),pte
 	bb,>=,n 	 pte,_PAGE_PRESENT_BIT,dbit_fault
@@ -1287,8 +1798,8 @@
 	or		t1,pte,pte
 	stw		pte,0(ptp)	/* write back pte */
 
-	copy            spc,prot        /* init prot with faulting space */
-	dep		pte,8,7,prot
+	zdep            spc,30,15,prot  /* create prot id from space */
+	dep             pte,8,7,prot    /* add in prot bits from pte */
 
 	extru,=		pte,_PAGE_NO_CACHE_BIT,1,r0
 	depi		1,12,1,prot
@@ -1302,13 +1813,20 @@
 	depi		0,31,12,pte
 	extru		pte,24,25,pte
 
-	mfsp		%sr1,t0  /* Save sr1 so we can use it in tlb inserts */
+	mfsp            %sr1,t1  /* Save sr1 so we can use it in tlb inserts */
 	mtsp		spc,%sr1
 
 	idtlba		pte,(%sr1,va)
 	idtlbp		prot,(%sr1,va)
 
-	mtsp		t0, %sr1     /* Restore sr1 */
+	mtsp            t1, %sr1     /* Restore sr1 */
+#ifdef CONFIG_SMP
+	CMPIB=,n        0,spc,dbit_nounlock_11
+	ldi             1,t1
+	stw             t1,0(t0)
+
+dbit_nounlock_11:
+#endif
 
 	rfir
 	nop
@@ -1321,7 +1839,7 @@
 
 	mfsp            %sr7,t0		/* Get current space */
 	or,=            %r0,t0,%r0	/* If kernel, nullify following test */
-	comb,<>,n       t0,spc,dbit_fault /* forward */
+	cmpb,<>,n       t0,spc,dbit_fault /* forward */
 
 	/* First level page table lookup */
 
@@ -1333,6 +1851,18 @@
 	/* Second level page table lookup */
 
 	sh2addl 	 t0,ptp,ptp
+#ifdef CONFIG_SMP
+	CMPIB=,n        0,spc,dbit_nolock_20
+	ldil            L%PA(pa_dbit_lock),t0
+	ldo             R%PA(pa_dbit_lock)(t0),t0
+
+dbit_spin_20:
+	ldcw            0(t0),t1
+	cmpib,=         0,t1,dbit_spin_20
+	nop
+
+dbit_nolock_20:
+#endif
 	ldi		(_PAGE_ACCESSED|_PAGE_DIRTY),t1
 	ldw		 0(ptp),pte
 	bb,>=,n 	 pte,_PAGE_PRESENT_BIT,dbit_fault
@@ -1342,25 +1872,28 @@
 	or		t1,pte,pte
 	stw		pte,0(ptp)	/* write back pte */
 
-	copy            spc,prot        /* init prot with faulting space */
-	
-	.level 2.0
+	space_to_prot   spc prot        /* create prot id from space */
+	depd            pte,8,7,prot    /* add in prot bits from pte */
 
-	depd		pte,8,7,prot
-	extrd,u,*=	pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
 	depdi		0,11,2,prot	/* If Gateway, Set PL2 to 0 */
 
-	/* Get rid of prot bits and convert to page addr for idtlbt */
+        extrd,s         pte,35,4,t0 
+        depdi           0,63,12,pte     /* clear lower 12 bits */
+        addi,=          1,t0,0
+        extrd,u,*tr     pte,56,25,pte 
+        extrd,s         pte,56,25,pte   /* bit 31:8 >> 8  */
+        idtlbt          pte,prot
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
-	idtlbt		%r16,%r17
+#ifdef CONFIG_SMP
+	CMPIB=,n        0,spc,dbit_nounlock_20
+	ldi             1,t1
+	stw             t1,0(t0)
 
-	.level		1.1
+dbit_nounlock_20:
+#endif
 
 	rfir
 	nop
@@ -1369,50 +1902,24 @@
 	.import handle_interruption,code
 
 kernel_bad_space:
-	b		tlb_fault
-	ldi		31,%r1	/* Use an unused code */
+	b               intr_save
+	ldi             31,%r8  /* Use an unused code */
 
 dbit_fault:
-	b		tlb_fault
-	ldi		20,%r1
+	b               intr_save
+	ldi             20,%r8
 
 itlb_fault:
-	b		tlb_fault
-	ldi		6,%r1
+	b               intr_save
+	ldi             6,%r8
 
-dtlb_fault:
-	ldi		15,%r1
-
-	/* Fall Through */
-
-tlb_fault:
-	mtctl		%r1,%cr29
-	mtctl		%r29,%cr31
-
-	get_stack
-	save_specials	%r29		/* Note this saves a trashed r1 */
-
-	SAVE_CR		(%cr20, PT_ISR(%r29))
-	SAVE_CR		(%cr21, PT_IOR(%r29))
-
-	virt_map	rfir
-
-	STREG		%r1,PT_GR1(%r29)	/* save good value after rfir */
-
-	save_general	%r29
-
-	ldo	PT_FR0(%r29), %r25
-	save_fp		%r25
-	
-	loadgp
-
-	copy		%r29, %r25
+nadtlb_fault:
+	b               intr_save
+	ldi             17,%r8
 
-	bl		handle_interruption, %r2
-	copy		%r29, %r16
-
-	b		intr_return
-	nop
+dtlb_fault:
+	b               intr_save
+	ldi             15,%r8
 
 	/* Register saving semantics for system calls:
 
@@ -1475,21 +1982,25 @@
 	.endm
 
 	.export sys_fork_wrapper
+	.export child_return
 sys_fork_wrapper:
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1	/* get pt regs */
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 	reg_save %r1
+	mfctl	%cr27, %r3
+	STREG	%r3, PT_CR27(%r1)
 
 	STREG	%r2,-RP_OFFSET(%r30)
 	ldo	FRAME_SIZE(%r30),%r30
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
 
 	/* These are call-clobbered registers and therefore
 	   also syscall-clobbered (we hope). */
 	STREG	%r2,PT_GR19(%r1)	/* save for child */
-	STREG	%r30,PT_GR20(%r1)
-	ldil	L%child_return, %r3
-	ldo	R%child_return(%r3), %r3
-	LDIL_FIXUP(%r3)
-	STREG	%r3,PT_GR21(%r1)	/* save for child */
+	STREG	%r30,PT_GR21(%r1)
 
 	LDREG	PT_GR30(%r1),%r25
 	copy	%r1,%r24
@@ -1499,53 +2010,73 @@
 	LDREG	-RP_OFFSET-FRAME_SIZE(%r30),%r2
 wrapper_exit:
 	ldo	-FRAME_SIZE(%r30),%r30		/* get the stackframe */
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1    /* get pt regs */
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 
+	LDREG	PT_CR27(%r1), %r3
+	mtctl	%r3, %cr27
 	reg_restore %r1
 
+	/* strace expects syscall # to be preserved in r20 */
+	ldi	__NR_fork,%r20
 	bv %r0(%r2)
-	nop
+	STREG	%r20,PT_GR20(%r1)
 
 	/* Set the return value for the child */
 child_return:
-	LDREG	TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2
+#if CONFIG_SMP || CONFIG_PREEMPT
+	bl	schedule_tail, %r2
+	nop
+#endif
+
+	mfctl	%cr30,%r2
+	LDREG	0(%r2),%r2
+	LDREG	TASK_PT_GR19(%r2),%r2
 	b	wrapper_exit
 	copy	%r0,%r28
 
 	
 	.export sys_clone_wrapper
 sys_clone_wrapper:
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1	/* get pt regs */
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 	reg_save %r1
+	mfctl	%cr27, %r3
+	STREG	%r3, PT_CR27(%r1)
 
 	STREG	%r2,-RP_OFFSET(%r30)
 	ldo	FRAME_SIZE(%r30),%r30
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
 
-	STREG	%r30,PT_GR20(%r1)
-	ldil	L%child_return,%r3
-	ldo	R%child_return(%r3),%r3
-	LDIL_FIXUP(%r3)
-
+	STREG	%r2,PT_GR19(%r1)	/* save for child */
+	STREG	%r30,PT_GR21(%r1)
 	bl	sys_clone,%r2
-	STREG	%r3,PT_GR21(%r1)	/* save for child */
+	copy	%r1,%r24
 
 	b	wrapper_exit
 	LDREG	-RP_OFFSET-FRAME_SIZE(%r30),%r2
 
-
 	.export sys_vfork_wrapper
 sys_vfork_wrapper:
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1	/* get pt regs */
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 	reg_save %r1
+	mfctl	%cr27, %r3
+	STREG	%r3, PT_CR27(%r1)
 
 	STREG	%r2,-RP_OFFSET(%r30)
 	ldo	FRAME_SIZE(%r30),%r30
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
 
-	STREG	%r30,PT_GR20(%r1)
-	ldil	L%child_return,%r3
-	ldo	R%child_return(%r3),%r3
-	LDIL_FIXUP(%r3)
-	STREG	%r3,PT_GR21(%r1)	/* save for child */
+	STREG	%r2,PT_GR19(%r1)	/* save for child */
+	STREG	%r30,PT_GR21(%r1)
 
 	bl	sys_vfork,%r2
 	copy	%r1,%r26
@@ -1555,7 +2086,9 @@
 
 	
 	.macro  execve_wrapper execve
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1	    /* get pt regs */
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 
 	/*
 	 * Do we need to save/restore r3-r18 here?
@@ -1567,6 +2100,9 @@
 
 	STREG %r2,-RP_OFFSET(%r30)
 	ldo FRAME_SIZE(%r30),%r30
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#endif
 	bl \execve,%r2
 	copy %r1,%arg0
 
@@ -1576,7 +2112,7 @@
 	/* If exec succeeded we need to load the args */
 
 	ldo -1024(%r0),%r1
-	comb,>>= %r28,%r1,error_\execve
+	cmpb,>>= %r28,%r1,error_\execve
 	copy %r2,%r19
 
 error_\execve:
@@ -1600,17 +2136,27 @@
 
 	.export sys_rt_sigreturn_wrapper
 sys_rt_sigreturn_wrapper:
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30), %r26
+	mfctl	%cr30,%r26		/* get pt regs */
+	LDREG	0(%r26),%r26
+	ldo	TASK_REGS(%r26),%r26
 	/* Don't save regs, we are going to restore them from sigcontext. */
 	STREG	%r2, -RP_OFFSET(%r30)
+#ifdef __LP64__
+	ldo	FRAME_SIZE(%r30), %r30
+	bl	sys_rt_sigreturn,%r2
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#else
 	bl	sys_rt_sigreturn,%r2
 	ldo	FRAME_SIZE(%r30), %r30
+#endif
 
 	ldo	-FRAME_SIZE(%r30), %r30
 	LDREG	-RP_OFFSET(%r30), %r2
 
 	/* FIXME: I think we need to restore a few more things here. */
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1	    /* get pt regs */
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 	reg_restore %r1
 
 	/* If the signal was received while the process was blocked on a
@@ -1623,29 +2169,65 @@
 	.export sys_sigaltstack_wrapper
 sys_sigaltstack_wrapper:
 	/* Get the user stack pointer */
-	LDREG	-TASK_SZ_ALGN-FRAME_SIZE+TASK_PT_GR30(%r30), %r24
+	mfctl	%cr30,%r24
+	LDREG	0(%r24),%r24
+	LDREG	TASK_PT_GR30(%r24),%r24
 	STREG	%r2, -RP_OFFSET(%r30)
+#ifdef __LP64__
+	ldo	FRAME_SIZE(%r30), %r30
+	bl	do_sigaltstack,%r2
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#else
 	bl	do_sigaltstack,%r2
 	ldo	FRAME_SIZE(%r30), %r30
+#endif
 
 	ldo	-FRAME_SIZE(%r30), %r30
 	LDREG	-RP_OFFSET(%r30), %r2
 	bv	%r0(%r2)
 	nop
 
+#ifdef __LP64__
+	.export sys32_sigaltstack_wrapper
+sys32_sigaltstack_wrapper:
+	/* Get the user stack pointer */
+	mfctl	%cr30,%r24
+	LDREG	0(%r24),%r24
+	LDREG	TASK_PT_GR30(%r24),%r24
+	STREG	%r2, -RP_OFFSET(%r30)
+	ldo	FRAME_SIZE(%r30), %r30
+	bl	do_sigaltstack32,%r2
+	ldo	-16(%r30),%r29		/* Reference param save area */
+
+	ldo	-FRAME_SIZE(%r30), %r30
+	LDREG	-RP_OFFSET(%r30), %r2
+	bv	%r0(%r2)
+	nop
+#endif
+
 	.export sys_rt_sigsuspend_wrapper
 sys_rt_sigsuspend_wrapper:
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30), %r24
+	mfctl	%cr30,%r24		/* get pt regs */
+	LDREG	0(%r24),%r24
+	ldo	TASK_REGS(%r24),%r24
 	reg_save %r24
 
 	STREG	%r2, -RP_OFFSET(%r30)
+#ifdef __LP64__
+	ldo	FRAME_SIZE(%r30), %r30
+	bl	sys_rt_sigsuspend,%r2
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#else
 	bl	sys_rt_sigsuspend,%r2
 	ldo	FRAME_SIZE(%r30), %r30
+#endif
 
 	ldo	-FRAME_SIZE(%r30), %r30
 	LDREG	-RP_OFFSET(%r30), %r2
 
-	ldo	TASK_REGS-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	mfctl	%cr30,%r1		/* get pt regs */
+	LDREG	0(%r1),%r1
+	ldo	TASK_REGS(%r1),%r1
 	reg_restore %r1
 
 	bv	%r0(%r2)
@@ -1658,66 +2240,90 @@
 	   values. */
 	/* NOTE: Not all syscalls exit this way.  rt_sigreturn will exit
 	 * via syscall_exit_rfi if the signal was received while the process
-	 * was running.  All traced processes will probably exit via
-	 * syscall_exit_rfi in the future.
+	 * was running.
 	 */
 
 	/* save return value now */
 
-	STREG     %r28,TASK_PT_GR28-TASK_SZ_ALGN-FRAME_SIZE(%r30)
+	mfctl     %cr30, %r1
+	LDREG     0(%r1),%r1
+	STREG     %r28,TASK_PT_GR28(%r1)
+
+	/* Save other hpux returns if personality is PER_HPUX */
+
+/* <linux/personality.h> cannot be easily included */
+#define PER_HPUX 0x10
+	LDREG     TASK_PERSONALITY(%r1),%r19
+#warning the ldo+CMPIB could probably be done better but 0x10 i soutside of range of CMPIB
+	ldo	  -PER_HPUX(%r19), %r19
+	CMPIB<>,n 0,%r19,1f
+	STREG     %r22,TASK_PT_GR22(%r1)
+	STREG     %r29,TASK_PT_GR29(%r1)
+1:
+
+	/* Seems to me that dp could be wrong here, if the syscall involved
+	 * calling a module, and nothing got round to restoring dp on return.
+	 */
+	loadgp
 
 syscall_check_bh:
 
-/* #ifdef NOTNOW */
 	/* Check for software interrupts */
 
 	.import irq_stat,data
 
 	ldil    L%irq_stat,%r19
 	ldo     R%irq_stat(%r19),%r19
-	LDIL_FIXUP(%r19)
 
 #ifdef CONFIG_SMP
 	/* sched.h: int processor */
-	ldw     TASK_PROCESSOR-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r20 /* get cpu # */
-#if (IRQSTAT_SZ == 32)
-	dep     %r20,26,27,%r20 /* shift left 5 bits */
-#else
-#error IRQSTAT_SZ changed, fix dep
-#endif /* IRQSTAT_SZ */
-	add     %r19,%r20,%r19
-#endif /* CONFIG_SMP */
+	/* %r26 is used as scratch register to index into irq_stat[] */
+	ldw     TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */
 
-	ldw     IRQSTAT_SI_ACTIVE(%r19),%r20	/* hardirq.h: unsigned int */
-	ldw     IRQSTAT_SI_MASK(%r19),%r19	/* hardirq.h: unsigned int */
-	and     %r19,%r20,%r20
-	comib,<>,n 0,%r20,syscall_do_softirq /* forward */
-/* #endif */
+	/* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */
+#ifdef __LP64__
+	shld	%r26, 6, %r20
+#else
+	shlw	%r26, 5, %r20
+#endif
+	add     %r19,%r20,%r19	/* now have &irq_stat[smp_processor_id()] */
+#endif /* CONFIG_SMP */
 
+	LDREG   IRQSTAT_SIRQ_PEND(%r19),%r20    /* hardirq.h: unsigned long */
+	cmpib,<>,n 0,%r20,syscall_do_softirq /* forward */
 
 syscall_check_resched:
 
 	/* check for reschedule */
 
-#error	LDREG  TASK_NEED_RESCHED-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r19	/* long */
-	comib,<>,n 0,%r19,syscall_do_resched /* forward */
+	LDREG  TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19	/* long */
+	bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */
 
 syscall_check_sig:
-	ldo     -TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1         /* get task ptr */
+	/* These should be the same effect, but which is faster? */
+#if 1
+	mfctl   %cr30,%r1
+#else
+	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1    /* get thread info ptr */
+#endif
 	/* check for pending signals */
-#error	ldw     TASK_SIGPENDING(%r1),%r19
-	comib,<>,n 0,%r19,syscall_do_signal  /* forward */
+	LDREG    TI_FLAGS(%r1),%r19
+	bb,<,n   %r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */
 
 syscall_restore:
-	/* disable interrupts while dicking with the kernel stack, */
-	/* or life can become unpleasant */
-	rsm	PSW_SM_I, %r20
-#error	LDREG	TASK_PTRACE(%r1), %r19		/* Are we being ptraced? */
-	bb,<,n	%r19,31,syscall_restore_rfi
-	LDREG	TASK_PT_GR20(%r1),%r19
-	mtctl	%r19, %cr27
+	mfctl   %cr30,%r1
+	LDREG	TI_FLAGS(%r1), %r19		/* Are we being ptraced? */
+	bb,<	%r19, 31-TIF_SYSCALL_TRACE,syscall_restore_rfi
+	LDREG	0(%r1),%r1		  	   /* delay slot! */
+	ldo	TASK_PT_FR31(%r1),%r19		   /* reload fpregs */
+	rest_fp	%r19
+
+	LDREG	TASK_PT_SAR(%r1),%r19		   /* restore SAR */
+	mtsar	%r19
 
 	LDREG	TASK_PT_GR2(%r1),%r2		   /* restore user rp */
+	LDREG	TASK_PT_GR19(%r1),%r19
+	LDREG   TASK_PT_GR20(%r1),%r20
 	LDREG	TASK_PT_GR21(%r1),%r21
 	LDREG	TASK_PT_GR22(%r1),%r22
 	LDREG	TASK_PT_GR23(%r1),%r23
@@ -1727,43 +2333,31 @@
 	LDREG	TASK_PT_GR27(%r1),%r27	   /* restore user dp */
 	LDREG	TASK_PT_GR28(%r1),%r28	   /* syscall return value */
 	LDREG	TASK_PT_GR29(%r1),%r29
-	LDREG	TASK_PT_GR30(%r1),%r30	   /* restore user sp */
 	LDREG	TASK_PT_GR31(%r1),%r31	   /* restore syscall rp */
-	ldo	TASK_PT_FR31(%r1),%r19		   /* reload fpregs */
-	rest_fp	%r19
-	LDREG	TASK_PT_SAR(%r1),%r19		   /* restore SAR */
-	mtsar	%r19
-	LDREG	TASK_PT_GR19(%r1),%r19
 
-	mtctl	%r1,%cr30			   /* intrhandler okay. */
+	rsm     PSW_SM_I, %r0
+	LDREG   TASK_PT_GR30(%r1),%r30             /* restore user sp */
 	mfsp	%sr3,%r1			   /* Get users space id */
+	mtsp    %r1,%sr7                           /* Restore sr7 */
+	ssm     PSW_SM_I, %r0
 	mtsp	%r1,%sr4			   /* Restore sr4 */
 	mtsp	%r1,%sr5			   /* Restore sr5 */
 	mtsp	%r1,%sr6			   /* Restore sr6 */
 
 	depi	3,31,2,%r31			   /* ensure return to user mode. */
 
-	mtsm	%r20				   /* restore irq state  */
-	mfctl	%cr27,%r20
-	
-	/*
-	 * Due to a dependency in the tlb miss handlers on sr7, it
-	 * is essential that sr7 get set in the delay slot.
-	 */
-
 #ifdef __LP64__
-
-	/* Note the be (and mtsp) is executed in narrow mode. This is OK
-	 * for 32 bit processes, but won't work once we support 64 bit
-	 * processes.
+	/* Since we are returning to a 32 bit user process, we always
+	 * clear the W bit. This means that the be (and mtsp) gets
+	 * executed in narrow mode, but that is OK, since we are
+	 * returning to a 32 bit process. When we support 64 bit processes
+	 * we won't clear the W bit, so the be will run in wide mode.
 	 */
 
-	rsm	PSW_SM_W, %r0
 	be	0(%sr3,%r31)			   /* return to user space */
-	mtsp	%r1,%sr7			   /* Restore sr7 */
+	rsm	PSW_SM_W, %r0
 #else
-	be	0(%sr3,%r31)			   /* return to user space */
-	mtsp	%r1,%sr7			   /* Restore sr7 */
+	be,n    0(%sr3,%r31)                       /* return to user space */
 #endif
 
 	/* We have to return via an RFI, so that PSW T and R bits can be set
@@ -1772,45 +2366,55 @@
 	 * the most efficient way of doing things, but it works.
 	 */
 syscall_restore_rfi:
+	LDREG	TASK_PTRACE(%r1), %r19
 	ldo	-1(%r0),%r2			   /* Set recovery cntr to -1 */
 	mtctl	%r2,%cr0			   /*   for immediate trap */
-	copy	%r0,%r2				   /* Create a reasonable PSW */
+	LDREG	TASK_PT_PSW(%r1),%r2		   /* Get old PSW */
+	ldi	0x0b,%r20			   /* Create new PSW */
+	depi	-1,13,1,%r20			   /* C, Q, D, and I bits */
+	bb,>=,n	%r19,15,try_tbit		   /* PT_SINGLESTEP */
+	depi	-1,27,1,%r20			   /* R bit */
+try_tbit:
+	bb,>=,n	%r19,14,psw_setup		   /* PT_BLOCKSTEP, see ptrace.c */
+	depi	-1,7,1,%r20			   /* T bit */
+psw_setup:
+	STREG	%r20,TASK_PT_PSW(%r1)
+
+	/* Always store space registers, since sr3 can be changed (e.g. fork) */
+
+	mfsp    %sr3,%r25
+	STREG   %r25,TASK_PT_SR3(%r1)
+	STREG   %r25,TASK_PT_SR4(%r1)
+	STREG   %r25,TASK_PT_SR5(%r1)
+	STREG   %r25,TASK_PT_SR6(%r1)
+	STREG   %r25,TASK_PT_SR7(%r1)
+	STREG   %r25,TASK_PT_IASQ0(%r1)
+	STREG   %r25,TASK_PT_IASQ1(%r1)
+
 	/* XXX W bit??? */
-	depi	-1,13,1,%r2
-	depi	-1,28,1,%r2
-	depi	-1,30,1,%r2
-	depi	-1,31,1,%r2
-	bb,<,n	%r19,15,set_rbit		   /* PT_SINGLESTEP */
-	bb,>=,n	%r19,14,set_nobit		   /* PT_BLOCKSTEP, see ptrace.c */
-set_tbit:
-	depi	-1,7,1,%r2
-	b,n	set_nobit
-set_rbit:
-	depi	-1,27,1,%r2
-set_nobit:
-	STREG	%r2,TASK_PT_PSW(%r1)
-	STREG	%r1,TASK_PT_CR30(%r1)
+	/* Now if old D bit is clear, it means we didn't save all registers
+	 * on syscall entry, so do that now.  This only happens on TRACEME
+	 * calls, or if someone attached to us while we were on a syscall.
+	 * We could make this more efficient by not saving r3-r18, but
+	 * then we wouldn't be able to use the common intr_restore path.
+	 * It is only for traced processes anyway, so performance is not
+	 * an issue.
+	 */
+	bb,<	%r2,30,pt_regs_ok		   /* Branch if D set */
+	ldo	TASK_REGS(%r1),%r25
+	reg_save %r25				   /* Save r3 to r18 */
 	mfsp	%sr0,%r2
 	STREG	%r2,TASK_PT_SR0(%r1)
 	mfsp	%sr1,%r2
 	STREG	%r2,TASK_PT_SR1(%r1)
 	mfsp	%sr2,%r2
 	STREG	%r2,TASK_PT_SR2(%r1)
-	mfsp	%sr3,%r2
-	STREG	%r2,TASK_PT_SR3(%r1)
-	STREG	%r2,TASK_PT_SR4(%r1)
-	STREG	%r2,TASK_PT_SR5(%r1)
-	STREG	%r2,TASK_PT_SR6(%r1)
-	STREG	%r2,TASK_PT_SR7(%r1)
-	STREG	%r2,TASK_PT_IASQ0(%r1)
-	STREG	%r2,TASK_PT_IASQ1(%r1)
+pt_regs_ok:
 	LDREG	TASK_PT_GR31(%r1),%r2
 	depi	3,31,2,%r2			   /* ensure return to user mode. */
 	STREG	%r2,TASK_PT_IAOQ0(%r1)
 	ldo	4(%r2),%r2
 	STREG	%r2,TASK_PT_IAOQ1(%r1)
-	ldo	TASK_REGS(%r1),%r25
-	reg_save %r25				   /* Save r3 to r18 */
 	copy	%r25,%r16
 	b	intr_restore
 	nop
@@ -1825,7 +2429,11 @@
 	.import schedule,code
 syscall_do_resched:
 	bl	schedule,%r2
+#ifdef __LP64__
+	ldo	-16(%r30),%r29		/* Reference param save area */
+#else
 	nop
+#endif
 	b       syscall_check_bh  /* if resched, we start over again */
 	nop
 
@@ -1835,33 +2443,175 @@
 	   FIXME: After this point the process structure should be
 	   consistent with all the relevant state of the process
 	   before the syscall.  We need to verify this. */
+	LDREG	0(%r1),%r1
 	ldo	TASK_REGS(%r1), %r25		/* struct pt_regs *regs */
 	reg_save %r25
 
 	ldi	1, %r24				/* unsigned long in_syscall */
 
-#error	bl	do_signal,%r2
+#ifdef __LP64__
+	ldo	-16(%r30),%r29			/* Reference param save area */
+#endif
+#warning TAUSQ FIXME, this is wrong
+	bl	do_signal,%r2
 	copy	%r0, %r26			/* sigset_t *oldset = NULL */
 
-	ldo     -TASK_SZ_ALGN-FRAME_SIZE(%r30), %r1     /* reload task ptr */
+	mfctl	%cr30,%r1			/* reload task ptr */
+	LDREG	0(%r1),%r1
 	ldo	TASK_REGS(%r1), %r20		/* reload pt_regs */
 	reg_restore %r20
 
 	b,n     syscall_restore
 
-#ifdef __LP64__
-unimplemented_64bitirq:
-	ssm PSW_SM_Q+PSW_SM_I, %r0
-	/* indicate that we had an interrupt */
-	ldi	0x77, %r28
-	ldi	0x77, %r29
-	/* save interrupt registers in GRs for diagnosis */
-	mfctl %cr17, %r17
-	mfctl %cr18, %r18
-	mfctl %cr19, %r19
-	mfctl %cr20, %r20
-	mfctl %cr21, %r21
-	mfctl %cr22, %r22
-	b,n .
-	nop
-#endif
+	/*
+	 * get_register is used by the non access tlb miss handlers to
+	 * copy the value of the general register specified in r8 into
+	 * r1. This routine can't be used for shadowed registers, since
+	 * the rfir will restore the original value. So, for the shadowed
+	 * registers we put a -1 into r1 to indicate that the register
+	 * should not be used (the register being copied could also have
+	 * a -1 in it, but that is OK, it just means that we will have
+	 * to use the slow path instead).
+	 */
+
+get_register:
+	blr     %r8,%r0
+	nop
+	bv      %r0(%r25)    /* r0 */
+	copy    %r0,%r1
+	bv      %r0(%r25)    /* r1 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r2 */
+	copy    %r2,%r1
+	bv      %r0(%r25)    /* r3 */
+	copy    %r3,%r1
+	bv      %r0(%r25)    /* r4 */
+	copy    %r4,%r1
+	bv      %r0(%r25)    /* r5 */
+	copy    %r5,%r1
+	bv      %r0(%r25)    /* r6 */
+	copy    %r6,%r1
+	bv      %r0(%r25)    /* r7 */
+	copy    %r7,%r1
+	bv      %r0(%r25)    /* r8 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r9 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r10 */
+	copy    %r10,%r1
+	bv      %r0(%r25)    /* r11 */
+	copy    %r11,%r1
+	bv      %r0(%r25)    /* r12 */
+	copy    %r12,%r1
+	bv      %r0(%r25)    /* r13 */
+	copy    %r13,%r1
+	bv      %r0(%r25)    /* r14 */
+	copy    %r14,%r1
+	bv      %r0(%r25)    /* r15 */
+	copy    %r15,%r1
+	bv      %r0(%r25)    /* r16 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r17 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r18 */
+	copy    %r18,%r1
+	bv      %r0(%r25)    /* r19 */
+	copy    %r19,%r1
+	bv      %r0(%r25)    /* r20 */
+	copy    %r20,%r1
+	bv      %r0(%r25)    /* r21 */
+	copy    %r21,%r1
+	bv      %r0(%r25)    /* r22 */
+	copy    %r22,%r1
+	bv      %r0(%r25)    /* r23 */
+	copy    %r23,%r1
+	bv      %r0(%r25)    /* r24 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r25 - shadowed */
+	ldi     -1,%r1
+	bv      %r0(%r25)    /* r26 */
+	copy    %r26,%r1
+	bv      %r0(%r25)    /* r27 */
+	copy    %r27,%r1
+	bv      %r0(%r25)    /* r28 */
+	copy    %r28,%r1
+	bv      %r0(%r25)    /* r29 */
+	copy    %r29,%r1
+	bv      %r0(%r25)    /* r30 */
+	copy    %r30,%r1
+	bv      %r0(%r25)    /* r31 */
+	copy    %r31,%r1
+
+	/*
+	 * set_register is used by the non access tlb miss handlers to
+	 * copy the value of r1 into the general register specified in
+	 * r8.
+	 */
+
+set_register:
+	blr     %r8,%r0
+	nop
+	bv      %r0(%r25)    /* r0 (silly, but it is a place holder) */
+	copy    %r1,%r0
+	bv      %r0(%r25)    /* r1 */
+	copy    %r1,%r1
+	bv      %r0(%r25)    /* r2 */
+	copy    %r1,%r2
+	bv      %r0(%r25)    /* r3 */
+	copy    %r1,%r3
+	bv      %r0(%r25)    /* r4 */
+	copy    %r1,%r4
+	bv      %r0(%r25)    /* r5 */
+	copy    %r1,%r5
+	bv      %r0(%r25)    /* r6 */
+	copy    %r1,%r6
+	bv      %r0(%r25)    /* r7 */
+	copy    %r1,%r7
+	bv      %r0(%r25)    /* r8 */
+	copy    %r1,%r8
+	bv      %r0(%r25)    /* r9 */
+	copy    %r1,%r9
+	bv      %r0(%r25)    /* r10 */
+	copy    %r1,%r10
+	bv      %r0(%r25)    /* r11 */
+	copy    %r1,%r11
+	bv      %r0(%r25)    /* r12 */
+	copy    %r1,%r12
+	bv      %r0(%r25)    /* r13 */
+	copy    %r1,%r13
+	bv      %r0(%r25)    /* r14 */
+	copy    %r1,%r14
+	bv      %r0(%r25)    /* r15 */
+	copy    %r1,%r15
+	bv      %r0(%r25)    /* r16 */
+	copy    %r1,%r16
+	bv      %r0(%r25)    /* r17 */
+	copy    %r1,%r17
+	bv      %r0(%r25)    /* r18 */
+	copy    %r1,%r18
+	bv      %r0(%r25)    /* r19 */
+	copy    %r1,%r19
+	bv      %r0(%r25)    /* r20 */
+	copy    %r1,%r20
+	bv      %r0(%r25)    /* r21 */
+	copy    %r1,%r21
+	bv      %r0(%r25)    /* r22 */
+	copy    %r1,%r22
+	bv      %r0(%r25)    /* r23 */
+	copy    %r1,%r23
+	bv      %r0(%r25)    /* r24 */
+	copy    %r1,%r24
+	bv      %r0(%r25)    /* r25 */
+	copy    %r1,%r25
+	bv      %r0(%r25)    /* r26 */
+	copy    %r1,%r26
+	bv      %r0(%r25)    /* r27 */
+	copy    %r1,%r27
+	bv      %r0(%r25)    /* r28 */
+	copy    %r1,%r28
+	bv      %r0(%r25)    /* r29 */
+	copy    %r1,%r29
+	bv      %r0(%r25)    /* r30 */
+	copy    %r1,%r30
+	bv      %r0(%r25)    /* r31 */
+	copy    %r1,%r31
diff -Nru a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/firmware.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1150 @@
+/* arch/parisc/kernel/pdc.c  - safe pdc access routines
+ *
+ * Copyright 1999 SuSE GmbH Nuernberg (Philipp Rumpf, prumpf@tux.org)
+ * portions Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy)
+ *
+ * only these routines should be used out of the real kernel (i.e. everything
+ * using virtual addresses) for obvious reasons */
+
+/*	I think it would be in everyone's best interest to follow this
+ *	guidelines when writing PDC wrappers:
+ *
+ *	 - the name of the pdc wrapper should match one of the macros
+ *	   used for the first two arguments
+ *	 - don't use caps for random parts of the name
+ *	 - use the static PDC result buffers and "copyout" to structs
+ *	   supplied by the caller to encapsulate alignment restrictions
+ *	 - hold pdc_lock while in PDC or using static result buffers
+ *	 - use __pa() to convert virtual (kernel) pointers to physical
+ *	   ones.
+ *	 - the name of the struct used for pdc return values should equal
+ *	   one of the macros used for the first two arguments to the
+ *	   corresponding PDC call
+ *	 - keep the order of arguments
+ *	 - don't be smart (setting trailing NUL bytes for strings, return
+ *	   something useful even if the call failed) unless you are sure
+ *	   it's not going to affect functionality or performance
+ *
+ *	Example:
+ *	int pdc_cache_info(struct pdc_cache_info *cache_info )
+ *	{
+ *		int retval;
+ *
+ *		spin_lock_irq(&pdc_lock);
+ *		retval = mem_pdc_call(PDC_CACHE,PDC_CACHE_INFO,__pa(cache_info),0);
+ *		convert_to_wide(pdc_result);
+ *		memcpy(cache_info, pdc_result, sizeof(*cache_info));
+ *		spin_unlock_irq(&pdc_lock);
+ *
+ *		return retval;
+ *	}
+ *					prumpf	991016	
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/spinlock.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+
+#include <asm/page.h>
+#include <asm/pdc.h>
+#include <asm/system.h>
+#include <asm/processor.h>	/* for boot_cpu_data */
+
+#include <stdarg.h>
+
+static spinlock_t pdc_lock = SPIN_LOCK_UNLOCKED;
+static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
+static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
+
+/* on all currently-supported platforms, IODC I/O calls are always
+ * 32-bit calls, and MEM_PDC calls are always the same width as the OS.
+ * This means Cxxx boxes can't run wide kernels right now. -PB
+ *
+ * CONFIG_PDC_NARROW has been added to allow 64-bit kernels to run on
+ * systems with 32-bit MEM_PDC calls. This will allow wide kernels to
+ * run on Cxxx boxes now. -RB
+ *
+ * Note that some PAT boxes may have 64-bit IODC I/O...
+ */
+
+#ifdef __LP64__
+long real64_call(unsigned long function, ...);
+#endif
+long real32_call(unsigned long function, ...);
+
+#if defined(__LP64__) && ! defined(CONFIG_PDC_NARROW)
+#define MEM_PDC (unsigned long)(PAGE0->mem_pdc_hi) << 32 | PAGE0->mem_pdc
+#   define mem_pdc_call(args...) real64_call(MEM_PDC, args)
+#else
+#define MEM_PDC (unsigned long)PAGE0->mem_pdc
+#   define mem_pdc_call(args...) real32_call(MEM_PDC, args)
+#endif
+
+
+/**
+ * f_extend - Convert PDC addresses to kernel addresses.
+ * @address: Address returned from PDC.
+ *
+ * This function is used to convert PDC addresses into kernel addresses
+ * when the PDC address size and kernel address size are different.
+ */
+static unsigned long f_extend(unsigned long address)
+{
+#ifdef CONFIG_PDC_NARROW
+	if((address & 0xff000000) == 0xf0000000)
+		return 0xf0f0f0f000000000 | (u32)address;
+
+	if((address & 0xf0000000) == 0xf0000000)
+		return 0xffffffff00000000 | (u32)address;
+#endif
+	return address;
+}
+
+/**
+ * convert_to_wide - Convert the return buffer addresses into kernel addresses.
+ * @address: The return buffer from PDC.
+ *
+ * This function is used to convert the return buffer addresses retrieved from PDC
+ * into kernel addresses when the PDC address size and kernel address size are
+ * different.
+ */
+static void convert_to_wide(unsigned long *addr)
+{
+#ifdef CONFIG_PDC_NARROW
+	int i;
+	unsigned *p = (unsigned int *)addr;
+	for(i = 31; i >= 0; --i)
+		addr[i] = p[i];
+#endif
+}
+
+/**
+ * pdc_emergency_unlock - Unlock the linux pdc lock
+ *
+ * This call unlocks the linux pdc lock in case we need some PDC functions
+ * (like pdc_add_valid) during kernel stack dump.
+ */
+void pdc_emergency_unlock(void)
+{
+        spin_unlock(&pdc_lock);
+}
+
+
+/**
+ * pdc_add_valid - Verify address can be accessed without causing a HPMC.
+ * @address: Address to be verified.
+ *
+ * This PDC call attempts to read from the specified address and verifies
+ * if the address is valid.
+ * 
+ * The return value is PDC_OK (0) in case accessing this address is valid.
+ */
+int pdc_add_valid(unsigned long address)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_ADD_VALID, PDC_ADD_VALID_VERIFY, address);
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_chassis_info - Return chassis information.
+ * @result: The return buffer.
+ * @chassis_info: The memory buffer address.
+ * @len: The size of the memory buffer address.
+ *
+ * An HVERSION dependent call for returning the chassis information.
+ */
+int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        memcpy(&pdc_result, chassis_info, sizeof(*chassis_info));
+        memcpy(&pdc_result2, led_info, len);
+        retval = mem_pdc_call(PDC_CHASSIS, PDC_RETURN_CHASSIS_INFO,
+                              __pa(pdc_result), __pa(pdc_result2), len);
+        memcpy(chassis_info, pdc_result, sizeof(*chassis_info));
+        memcpy(led_info, pdc_result2, len);
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_pat_chassis_send_log - Sends a PDC PAT CHASSIS log message.
+ * @retval: -1 on error, 0 on success. Other value are PDC errors
+ * 
+ * Must be correctly formatted or expect system crash
+ */
+#ifdef __LP64__
+int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
+{
+	if (!is_pdc_pat())
+		return -1;
+
+	int retval = 0;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_CHASSIS_LOG, PDC_PAT_CHASSIS_WRITE_LOG, __pa(&state), __pa(&data));
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+#endif
+
+/**
+ * pdc_chassis_disp - Updates display
+ * @retval: -1 on error, 0 on success
+ *
+ * Works on old PDC only (E class, others?)
+ */
+int pdc_chassis_disp(unsigned long disp)
+{
+	int retval = 0;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_DISP, disp);
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_coproc_cfg - To identify coprocessors attached to the processor.
+ * @pdc_coproc_info: Return buffer address.
+ *
+ * This PDC call returns the presence and status of all the coprocessors
+ * attached to the processor.
+ */
+int __init pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result));
+        convert_to_wide(pdc_result);
+        pdc_coproc_info->ccr_functional = pdc_result[0];
+        pdc_coproc_info->ccr_present = pdc_result[1];
+        pdc_coproc_info->revision = pdc_result[17];
+        pdc_coproc_info->model = pdc_result[18];
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_iodc_read - Read data from the modules IODC.
+ * @actcnt: The actual number of bytes.
+ * @hpa: The HPA of the module for the iodc read.
+ * @index: The iodc entry point.
+ * @iodc_data: A buffer memory for the iodc options.
+ * @iodc_data_size: Size of the memory buffer.
+ *
+ * This PDC call reads from the IODC of the module specified by the hpa
+ * argument.
+ */
+int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
+		  void *iodc_data, unsigned int iodc_data_size)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa, 
+			      index, __pa(pdc_result2), iodc_data_size);
+	convert_to_wide(pdc_result);
+	*actcnt = pdc_result[0];
+	memcpy(iodc_data, pdc_result2, iodc_data_size);
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_system_map_find_mods - Locate unarchitected modules.
+ * @pdc_mod_info: Return buffer address.
+ * @mod_path: pointer to dev path structure.
+ * @mod_index: fixed address module index.
+ *
+ * To locate and identify modules which reside at fixed I/O addresses, which
+ * do not self-identify via architected bus walks.
+ */
+int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
+			     struct pdc_module_path *mod_path, long mod_index)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_MODULE, __pa(pdc_result), 
+			      __pa(pdc_result2), mod_index);
+	convert_to_wide(pdc_result);
+	memcpy(pdc_mod_info, pdc_result, sizeof(*pdc_mod_info));
+	memcpy(mod_path, pdc_result2, sizeof(*mod_path));
+	spin_unlock_irq(&pdc_lock);
+
+	pdc_mod_info->mod_addr = f_extend(pdc_mod_info->mod_addr);
+	return retval;
+}
+
+/**
+ * pdc_system_map_find_addrs - Retrieve additional address ranges.
+ * @pdc_addr_info: Return buffer address.
+ * @mod_index: Fixed address module index.
+ * @addr_index: Address range index.
+ * 
+ * Retrieve additional information about subsequent address ranges for modules
+ * with multiple address ranges.  
+ */
+int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info, 
+			      long mod_index, long addr_index)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_ADDRESS, __pa(pdc_result),
+			      mod_index, addr_index);
+	convert_to_wide(pdc_result);
+	memcpy(pdc_addr_info, pdc_result, sizeof(*pdc_addr_info));
+	spin_unlock_irq(&pdc_lock);
+
+	pdc_addr_info->mod_addr = f_extend(pdc_addr_info->mod_addr);
+	return retval;
+}
+
+/**
+ * pdc_model_info - Return model information about the processor.
+ * @model: The return buffer.
+ *
+ * Returns the version numbers, identifiers, and capabilities from the processor module.
+ */
+int pdc_model_info(struct pdc_model *model) 
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
+	convert_to_wide(pdc_result);
+	memcpy(model, pdc_result, sizeof(*model));
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_model_sysmodel - Get the system model name.
+ * @name: A char array of at least 81 characters.
+ *
+ * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L)
+ */
+int pdc_model_sysmodel(char *name)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_SYSMODEL, __pa(pdc_result),
+                              OS_ID_HPUX, __pa(name));
+        convert_to_wide(pdc_result);
+
+        if (retval == PDC_OK) {
+                name[pdc_result[0]] = '\0'; /* add trailing '\0' */
+        } else {
+                name[0] = 0;
+        }
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_model_versions - Identify the version number of each processor.
+ * @cpu_id: The return buffer.
+ * @id: The id of the processor to check.
+ *
+ * Returns the version number for each processor component.
+ *
+ * This comment was here before, but I do not know what it means :( -RB
+ * id: 0 = cpu revision, 1 = boot-rom-version
+ */
+int pdc_model_versions(unsigned long *versions, int id)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_VERSIONS, __pa(pdc_result), id);
+        convert_to_wide(pdc_result);
+        *versions = pdc_result[0];
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_model_cpuid - Returns the CPU_ID.
+ * @cpu_id: The return buffer.
+ *
+ * Returns the CPU_ID value which uniquely identifies the cpu portion of
+ * the processor module.
+ */
+int pdc_model_cpuid(unsigned long *cpu_id)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
+        retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CPU_ID, __pa(pdc_result), 0);
+        convert_to_wide(pdc_result);
+        *cpu_id = pdc_result[0];
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_model_capabilities - Returns the platform capabilities.
+ * @capabilities: The return buffer.
+ *
+ * Returns information about platform support for 32- and/or 64-bit
+ * OSes, IO-PDIR coherency, and virtual aliasing.
+ */
+int pdc_model_capabilities(unsigned long *capabilities)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
+        retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
+        convert_to_wide(pdc_result);
+        *capabilities = pdc_result[0];
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_cache_info - Return cache and TLB information.
+ * @cache_info: The return buffer.
+ *
+ * Returns information about the processor's cache and TLB.
+ */
+int pdc_cache_info(struct pdc_cache_info *cache_info)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0);
+        convert_to_wide(pdc_result);
+        memcpy(cache_info, pdc_result, sizeof(*cache_info));
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+#ifndef CONFIG_PA20
+/**
+ * pdc_btlb_info - Return block TLB information.
+ * @btlb: The return buffer.
+ *
+ * Returns information about the hardware Block TLB.
+ */
+int pdc_btlb_info(struct pdc_btlb_info *btlb) 
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_BLOCK_TLB, PDC_BTLB_INFO, __pa(pdc_result), 0);
+        memcpy(btlb, pdc_result, sizeof(*btlb));
+        spin_unlock_irq(&pdc_lock);
+
+        if(retval < 0) {
+                btlb->max_size = 0;
+        }
+        return retval;
+}
+
+/**
+ * pdc_mem_map_hpa - Find fixed module information.  
+ * @address: The return buffer
+ * @mod_path: pointer to dev path structure.
+ *
+ * This call was developed for S700 workstations to allow the kernel to find
+ * the I/O devices (Core I/O). In the future (Kittyhawk and beyond) this
+ * call will be replaced (on workstations) by the architected PDC_SYSTEM_MAP
+ * call.
+ *
+ * This call is supported by all existing S700 workstations (up to  Gecko).
+ */
+int pdc_mem_map_hpa(struct pdc_memory_map *address,
+		struct pdc_module_path *mod_path)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        memcpy(pdc_result2, mod_path, sizeof(*mod_path));
+        retval = mem_pdc_call(PDC_MEM_MAP, PDC_MEM_MAP_HPA, __pa(pdc_result),
+				__pa(pdc_result2));
+        memcpy(address, pdc_result, sizeof(*address));
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+#endif	/* !CONFIG_PA20 */
+
+/**
+ * pdc_lan_station_id - Get the LAN address.
+ * @lan_addr: The return buffer.
+ * @hpa: The network device HPA.
+ *
+ * Get the LAN station address when it is not directly available from the LAN hardware.
+ */
+int pdc_lan_station_id(char *lan_addr, unsigned long hpa)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_LAN_STATION_ID, PDC_LAN_STATION_ID_READ,
+			__pa(pdc_result), hpa);
+	if (retval < 0) {
+		/* FIXME: else read MAC from NVRAM */
+		memset(lan_addr, 0, PDC_LAN_STATION_ID_SIZE);
+	} else {
+		memcpy(lan_addr, pdc_result, PDC_LAN_STATION_ID_SIZE);
+	}
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+
+/**
+ * pdc_get_initiator - Get the SCSI Interface Card params (SCSI ID, SDTR, SE or LVD)
+ * @hwpath: fully bc.mod style path to the device.
+ * @scsi_id: what someone told firmware the ID should be.
+ * @period: time in cycles 
+ * @width: 8 or 16-bit wide bus
+ * @mode: 0,1,2 -> SE,HVD,LVD signalling mode
+ *
+ * Get the SCSI operational parameters from PDC.
+ * Needed since HPUX never used BIOS or symbios card NVRAM.
+ * Most ncr/sym cards won't have an entry and just use whatever
+ * capabilities of the card are (eg Ultra, LVD). But there are
+ * several cases where it's useful:
+ *    o set SCSI id for Multi-initiator clusters,
+ *    o cable too long (ie SE scsi 10Mhz won't support 6m length),
+ *    o bus width exported is less than what the interface chip supports.
+ */
+int pdc_get_initiator( struct hardware_path *hwpath, unsigned char *scsi_id,
+	unsigned long *period, char *width, char *mode)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+
+/* BCJ-XXXX series boxes. E.G. "9000/785/C3000" */
+#define IS_SPROCKETS() (strlen(boot_cpu_data.pdc.sys_model_name) == 14 && \
+	strncmp(boot_cpu_data.pdc.sys_model_name, "9000/785", 9) == 0)
+
+	retval = mem_pdc_call(PDC_INITIATOR, PDC_GET_INITIATOR, 
+			      __pa(pdc_result), __pa(hwpath));
+
+
+	if (retval >= PDC_OK) {
+		*scsi_id = (unsigned char) pdc_result[0];
+
+		/* convert Bus speed in Mhz to period (in 1/10 ns) */
+		switch(pdc_result[1]) {
+		/*
+		** case  0:   driver determines rate
+		** case -1:   Settings are uninitialized.
+		*/
+		case  5:  *period = 2000; break;
+		case 10:  *period = 1000; break;
+		case 20:  *period = 500; break;
+		case 40:  *period = 250; break;
+		default: /* Do nothing */ break;
+		}
+
+		/* 
+		** pdc_result[2]	PDC suggested SCSI id
+		** pdc_result[3]	PDC suggested SCSI rate
+		*/
+
+		if (IS_SPROCKETS()) {
+			/*
+			** Revisit: PAT PDC do the same thing?
+			** A500 also exports 50-pin SE SCSI.
+			**	0 == 8-bit
+			**	1 == 16-bit
+			*/
+			*width = (char) pdc_result[4];
+
+			/* ...in case someone needs it in the future.
+			** sym53c8xx.c comments say it can't autodetect
+			** for 825/825A/875 chips.
+			**	0 == SE, 1 == HVD, 2 == LVD
+			*/
+			*mode = (char) pdc_result[5]; 
+		}
+	}
+
+	spin_unlock_irq(&pdc_lock);
+	return retval >= PDC_OK;
+}
+
+
+/**
+ * pdc_pci_irt_size - Get the number of entries in the interrupt routing table.
+ * @num_entries: The return value.
+ * @hpa: The HPA for the device.
+ *
+ * This PDC function returns the number of entries in the specified cell's
+ * interrupt table.
+ * Similar to PDC_PAT stuff - but added for Forte/Allegro boxes
+ */ 
+int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SIZE, 
+			      __pa(pdc_result), hpa);
+	convert_to_wide(pdc_result);
+	*num_entries = pdc_result[0];
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/** 
+ * pdc_pci_irt - Get the PCI interrupt routing table.
+ * @num_entries: The number of entries in the table.
+ * @hpa: The Hard Physical Address of the device.
+ * @tbl: 
+ *
+ * Get the PCI interrupt routing table for the device at the given HPA.
+ * Similar to PDC_PAT stuff - but added for Forte/Allegro boxes
+ */
+int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	pdc_result[0] = num_entries;
+	retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL, 
+			      __pa(pdc_result), hpa, __pa(tbl));
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+
+/**
+ * pdc_tod_read - Read the Time-Of-Day clock.
+ * @tod: The return buffer:
+ *
+ * Read the Time-Of-Day clock
+ */
+int pdc_tod_read(struct pdc_tod *tod)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0);
+        convert_to_wide(pdc_result);
+        memcpy(tod, pdc_result, sizeof(*tod));
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/**
+ * pdc_tod_set - Set the Time-Of-Day clock.
+ * @sec: The number of seconds since epoch.
+ * @usec: The number of micro seconds.
+ *
+ * Set the Time-Of-Day clock.
+ */ 
+int pdc_tod_set(unsigned long sec, unsigned long usec)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_TOD, PDC_TOD_WRITE, sec, usec);
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+#ifdef __LP64__
+int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
+		struct pdc_memory_table *tbl, unsigned long entries)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_MEM, PDC_MEM_TABLE, __pa(pdc_result), __pa(pdc_result2), entries);
+	convert_to_wide(pdc_result);
+	memcpy(r_addr, pdc_result, sizeof(*r_addr));
+	memcpy(tbl, pdc_result2, entries * sizeof(*tbl));
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+#endif /* __LP64__ */
+
+/* FIXME: Is this pdc used?  I could not find type reference to ftc_bitmap
+ * so I guessed at unsigned long.  Someone who knows what this does, can fix
+ * it later. :)
+ */
+int pdc_do_firm_test_reset(unsigned long ftc_bitmap)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_FIRM_TEST_RESET,
+                              PDC_FIRM_TEST_MAGIC, ftc_bitmap);
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/*
+ * pdc_do_reset - Reset the system.
+ *
+ * Reset the system.
+ */
+int pdc_do_reset()
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);
+        retval = mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_RESET);
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+/*
+ * pdc_soft_power_info - Enable soft power switch.
+ * @power_reg: address of soft power register
+ *
+ * Return the absolute address of the soft power switch register
+ */
+int __init pdc_soft_power_info(unsigned long *power_reg)
+{
+	int retval;
+
+	*power_reg = (unsigned long) (-1);
+	
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_INFO, __pa(pdc_result), 0);
+	if (retval == PDC_OK) {
+                convert_to_wide(pdc_result);
+                *power_reg = f_extend(pdc_result[0]);
+	}
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/*
+ * pdc_soft_power_button - Control the soft power button behaviour
+ * @sw_control: 0 for hardware control, 1 for software control 
+ *
+ *
+ * This PDC function places the soft power button under software or
+ * hardware control.
+ * Under software control the OS may control to when to allow to shut 
+ * down the system. Under hardware control pressing the power button 
+ * powers off the system immediately.
+ */
+int pdc_soft_power_button(int sw_control)
+{
+	int retval;
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_ENABLE, __pa(pdc_result), sw_control);
+	spin_unlock_irq(&pdc_lock);
+	return retval;
+}
+
+/*
+ * pdc_suspend_usb - Stop USB controller
+ *
+ * If PDC used the usb controller, the usb controller
+ * is still running and will crash the machines during iommu 
+ * setup, because of still running DMA. This PDC call
+ * stops the USB controller
+ */
+void pdc_suspend_usb(void)
+{
+	spin_lock_irq(&pdc_lock);  
+	mem_pdc_call(PDC_IO, PDC_IO_SUSPEND_USB, 0);
+	spin_unlock_irq(&pdc_lock);
+}
+
+/**
+ * pdc_iodc_putc - Console character print using IODC.
+ * @c: the character to output.
+ *
+ * Note that only these special chars are architected for console IODC io:
+ * BEL, BS, CR, and LF. Others are passed through.
+ * Since the HP console requires CR+LF to perform a 'newline', we translate
+ * "\n" to "\r\n".
+ */
+void pdc_iodc_putc(unsigned char c)
+{
+        /* XXX Should we spinlock posx usage */
+        static int posx;        /* for simple TAB-Simulation... */
+        static int __attribute__((aligned(8)))   iodc_retbuf[32];
+        static char __attribute__((aligned(64))) iodc_dbuf[4096];
+        unsigned int n;
+	unsigned int flags;
+
+        switch (c) {
+        case '\n':
+                iodc_dbuf[0] = '\r';
+                iodc_dbuf[1] = '\n';
+                n = 2;
+                posx = 0;
+                break;
+        case '\t':
+                pdc_iodc_putc(' ');
+                while (posx & 7)        /* expand TAB */
+                        pdc_iodc_putc(' ');
+                return;         /* return since IODC can't handle this */
+        case '\b':
+                posx-=2;                /* BS */
+        default:
+                iodc_dbuf[0] = c;
+                n = 1;
+                posx++;
+                break;
+        }
+
+        spin_lock_irqsave(&pdc_lock, flags);
+        real32_call(PAGE0->mem_cons.iodc_io,
+                    (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
+                    PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers),
+                    __pa(iodc_retbuf), 0, __pa(iodc_dbuf), n, 0);
+        spin_unlock_irqrestore(&pdc_lock, flags);
+}
+
+/**
+ * pdc_iodc_outc - Console character print using IODC (without conversions).
+ * @c: the character to output.
+ *
+ * Write the character directly to the IODC console.
+ */
+void pdc_iodc_outc(unsigned char c)
+{
+	unsigned int n, flags;
+
+	/* fill buffer with one caracter and print it */
+        static int __attribute__((aligned(8)))   iodc_retbuf[32];
+        static char __attribute__((aligned(64))) iodc_dbuf[4096];
+
+	n = 1;
+	iodc_dbuf[0] = c;
+
+	spin_lock_irqsave(&pdc_lock, flags);
+	real32_call(PAGE0->mem_cons.iodc_io,
+		    (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
+		    PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers),
+		    __pa(iodc_retbuf), 0, __pa(iodc_dbuf), n, 0);
+	spin_unlock_irqrestore(&pdc_lock, flags);
+}
+
+/**
+ * pdc_iodc_getc - Read a character (non-blocking) from the PDC console.
+ *
+ * Read a character (non-blocking) from the PDC console, returns -1 if
+ * key is not present.
+ */
+int pdc_iodc_getc(void)
+{
+	unsigned int flags;
+        static int __attribute__((aligned(8)))   iodc_retbuf[32];
+        static char __attribute__((aligned(64))) iodc_dbuf[4096];
+	int ch;
+	int status;
+
+	/* Bail if no console input device. */
+	if (!PAGE0->mem_kbd.iodc_io)
+		return 0;
+	
+	/* wait for a keyboard (rs232)-input */
+	spin_lock_irqsave(&pdc_lock, flags);
+	real32_call(PAGE0->mem_kbd.iodc_io,
+		    (unsigned long)PAGE0->mem_kbd.hpa, ENTRY_IO_CIN,
+		    PAGE0->mem_kbd.spa, __pa(PAGE0->mem_kbd.dp.layers), 
+		    __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0);
+
+	ch = *iodc_dbuf;
+	status = *iodc_retbuf;
+	spin_unlock_irqrestore(&pdc_lock, flags);
+
+	if (status == 0)
+	    return -1;
+	
+	return ch;
+}
+
+int pdc_sti_call(unsigned long func, unsigned long flags,
+                 unsigned long inptr, unsigned long outputr,
+                 unsigned long glob_cfg)
+{
+        int retval;
+
+        spin_lock_irq(&pdc_lock);  
+        retval = real32_call(func, flags, inptr, outputr, glob_cfg);
+        spin_unlock_irq(&pdc_lock);
+
+        return retval;
+}
+
+#ifdef __LP64__
+/**
+ * pdc_pat_cell_get_number - Returns the cell number.
+ * @cell_info: The return buffer.
+ *
+ * This PDC call returns the cell number of the cell from which the call
+ * is made.
+ */
+int pdc_pat_cell_get_number(struct pdc_pat_cell_num *cell_info)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_CELL, PDC_PAT_CELL_GET_NUMBER, __pa(pdc_result));
+	memcpy(cell_info, pdc_result, sizeof(*cell_info));
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_pat_cell_module - Retrieve the cell's module information.
+ * @actcnt: The number of bytes written to mem_addr.
+ * @ploc: The physical location.
+ * @mod: The module index.
+ * @view_type: The view of the address type.
+ * @mem_addr: The return buffer.
+ *
+ * This PDC call returns information about each module attached to the cell
+ * at the specified location.
+ */
+int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long mod,
+			unsigned long view_type, void *mem_addr)
+{
+	int retval;
+	static struct pdc_pat_cell_mod_maddr_block result __attribute__ ((aligned (8)));
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_CELL, PDC_PAT_CELL_MODULE, __pa(pdc_result), 
+			      ploc, mod, view_type, __pa(&result));
+	if(!retval) {
+		*actcnt = pdc_result[0];
+		memcpy(mem_addr, &result, *actcnt);
+	}
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_pat_cpu_get_number - Retrieve the cpu number.
+ * @cpu_info: The return buffer.
+ * @hpa: The Hard Physical Address of the CPU.
+ *
+ * Retrieve the cpu number for the cpu at the specified HPA.
+ */
+int pdc_pat_cpu_get_number(struct pdc_pat_cpu_num *cpu_info, void *hpa)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_CPU, PDC_PAT_CPU_GET_NUMBER,
+			      __pa(&pdc_result), hpa);
+	memcpy(cpu_info, pdc_result, sizeof(*cpu_info));
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_pat_get_irt_size - Retrieve the number of entries in the cell's interrupt table.
+ * @num_entries: The return value.
+ * @cell_num: The target cell.
+ *
+ * This PDC function returns the number of entries in the specified cell's
+ * interrupt table.
+ */
+int pdc_pat_get_irt_size(unsigned long *num_entries, unsigned long cell_num)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_GET_PCI_ROUTING_TABLE_SIZE,
+			      __pa(pdc_result), cell_num);
+	*num_entries = pdc_result[0];
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_pat_get_irt - Retrieve the cell's interrupt table.
+ * @r_addr: The return buffer.
+ * @cell_num: The target cell.
+ *
+ * This PDC function returns the actual interrupt table for the specified cell.
+ */
+int pdc_pat_get_irt(void *r_addr, unsigned long cell_num)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_GET_PCI_ROUTING_TABLE,
+			      __pa(r_addr), cell_num);
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+
+/**
+ * pdc_pat_pd_get_addr_map - Retrieve information about memory address ranges.
+ * @actlen: The return buffer.
+ * @mem_addr: Pointer to the memory buffer.
+ * @count: The number of bytes to read from the buffer.
+ * @offset: The offset with respect to the beginning of the buffer.
+ *
+ */
+int pdc_pat_pd_get_addr_map(unsigned long *actual_len, void *mem_addr, 
+			    unsigned long count, unsigned long offset)
+{
+	int retval;
+
+	spin_lock_irq(&pdc_lock);
+	retval = mem_pdc_call(PDC_PAT_PD, PDC_PAT_PD_GET_ADDR_MAP, __pa(pdc_result), 
+			      __pa(pdc_result2), count, offset);
+	*actual_len = pdc_result[0];
+	memcpy(mem_addr, pdc_result2, *actual_len);
+	spin_unlock_irq(&pdc_lock);
+
+	return retval;
+}
+#endif /* __LP64__ */
+
+
+/***************** 32-bit real-mode calls ***********/
+/* The struct below is used
+ * to overlay real_stack (real2.S), preparing a 32-bit call frame.
+ * real32_call_asm() then uses this stack in narrow real mode
+ */
+
+struct narrow_stack {
+	/* use int, not long which is 64 bits */
+	unsigned int arg13;
+	unsigned int arg12;
+	unsigned int arg11;
+	unsigned int arg10;
+	unsigned int arg9;
+	unsigned int arg8;
+	unsigned int arg7;
+	unsigned int arg6;
+	unsigned int arg5;
+	unsigned int arg4;
+	unsigned int arg3;
+	unsigned int arg2;
+	unsigned int arg1;
+	unsigned int arg0;
+	unsigned int frame_marker[8];
+	unsigned int sp;
+	/* in reality, there's nearly 8k of stack after this */
+};
+
+long real32_call(unsigned long fn, ...)
+{
+	va_list args;
+	extern struct narrow_stack real_stack;
+	extern unsigned long real32_call_asm(unsigned int *,
+					     unsigned int *, 
+					     unsigned int);
+	
+	va_start(args, fn);
+	real_stack.arg0 = va_arg(args, unsigned int);
+	real_stack.arg1 = va_arg(args, unsigned int);
+	real_stack.arg2 = va_arg(args, unsigned int);
+	real_stack.arg3 = va_arg(args, unsigned int);
+	real_stack.arg4 = va_arg(args, unsigned int);
+	real_stack.arg5 = va_arg(args, unsigned int);
+	real_stack.arg6 = va_arg(args, unsigned int);
+	real_stack.arg7 = va_arg(args, unsigned int);
+	real_stack.arg8 = va_arg(args, unsigned int);
+	real_stack.arg9 = va_arg(args, unsigned int);
+	real_stack.arg10 = va_arg(args, unsigned int);
+	real_stack.arg11 = va_arg(args, unsigned int);
+	real_stack.arg12 = va_arg(args, unsigned int);
+	real_stack.arg13 = va_arg(args, unsigned int);
+	va_end(args);
+	
+	return real32_call_asm(&real_stack.sp, &real_stack.arg0, fn);
+}
+
+#ifdef __LP64__
+/***************** 64-bit real-mode calls ***********/
+
+struct wide_stack {
+	unsigned long arg0;
+	unsigned long arg1;
+	unsigned long arg2;
+	unsigned long arg3;
+	unsigned long arg4;
+	unsigned long arg5;
+	unsigned long arg6;
+	unsigned long arg7;
+	unsigned long arg8;
+	unsigned long arg9;
+	unsigned long arg10;
+	unsigned long arg11;
+	unsigned long arg12;
+	unsigned long arg13;
+	unsigned long frame_marker[2];	/* rp, previous sp */
+	unsigned long sp;
+	/* in reality, there's nearly 8k of stack after this */
+};
+
+long real64_call(unsigned long fn, ...)
+{
+	va_list args;
+	extern struct wide_stack real_stack;
+	extern unsigned long real64_call_asm(unsigned long *,
+					     unsigned long *, 
+					     unsigned long);
+    
+	va_start(args, fn);
+	real_stack.arg0 = va_arg(args, unsigned long);
+	real_stack.arg1 = va_arg(args, unsigned long);
+	real_stack.arg2 = va_arg(args, unsigned long);
+	real_stack.arg3 = va_arg(args, unsigned long);
+	real_stack.arg4 = va_arg(args, unsigned long);
+	real_stack.arg5 = va_arg(args, unsigned long);
+	real_stack.arg6 = va_arg(args, unsigned long);
+	real_stack.arg7 = va_arg(args, unsigned long);
+	real_stack.arg8 = va_arg(args, unsigned long);
+	real_stack.arg9 = va_arg(args, unsigned long);
+	real_stack.arg10 = va_arg(args, unsigned long);
+	real_stack.arg11 = va_arg(args, unsigned long);
+	real_stack.arg12 = va_arg(args, unsigned long);
+	real_stack.arg13 = va_arg(args, unsigned long);
+	va_end(args);
+	
+	return real64_call_asm(&real_stack.sp, &real_stack.arg0, fn);
+}
+
+#endif /* __LP64__ */
+
diff -Nru a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
--- a/arch/parisc/kernel/hardware.c	Wed Oct 30 16:44:27 2002
+++ b/arch/parisc/kernel/hardware.c	Wed Oct 30 16:44:27 2002
@@ -5,7 +5,7 @@
  * 
  *    Based on the document "PA-RISC 1.1 I/O Firmware Architecture 
  *    Reference Specification", March 7, 1999, version 0.96.  This
- *    is available at ?.
+ *    is available at http://parisc-linux.org/documentation/
  *
  *    Copyright 1999 by Alex deVries <adevries@thepuffingroup.com>
  *    and copyright 1999 The Puffin Group Inc.
@@ -30,32 +30,15 @@
 #include <asm/hardware.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
-
-#define HPHW_NUM_TYPES 3431
-
-static char * hw_type_name[16] = {
-	"Processor",
-	"Memory",
-	"B DMA",
-	"Obsolete",
-	"A DMA",
-	"A Direct",
-	"Obsolete",
-	"Bus Converter Port",
-	"HP CIO Adapter",
-	"Console",
-	"Foreign I/O Module",
-	"Bus Adapter",
-	"IOA (?)",
-	"Bus Bridge to Foreign Bus",
-	"HP Clothing: Fabric Component"
-};
+#include <linux/init.h>
 
 /*
- *	XXX	Could this be __init ??
+ *	HP PARISC Hardware Database
+ *	Access to this database is only possible during bootup
+ *	so don't reference this table after starting the init process
  */
  
-static struct hp_hardware hp_hardware_list[] = {
+static struct hp_hardware hp_hardware_list[] __initdata = {
 	{HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
 	{HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
 	{HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -169,9 +152,10 @@
 	{HPHW_NPROC,0x59A,0x4,0x91,"Unlisted but reserved"},
 	{HPHW_NPROC,0x59A,0x4,0x81,"Unlisted but reserved"},
 	{HPHW_NPROC,0x59B,0x4,0x81,"Raven U 160 (9000/780/C160)"},
+	{HPHW_NPROC,0x59C,0x4,0x81,"Raven U 180 (9000/780/C180)"},
 	{HPHW_NPROC,0x59D,0x4,0x81,"Raven U 200 (9000/780/C200)"},
 	{HPHW_NPROC,0x59E,0x4,0x91,"ThunderHawk T' 120"},
-	{HPHW_NPROC,0x59F,0x4,0x91,"Raven U 180+ (9000/780/\?\?\?\?)"},
+	{HPHW_NPROC,0x59F,0x4,0x91,"Raven U 180+ (9000/780)"},
 	{HPHW_NPROC,0x5A0,0x4,0x81,"UL 1w T120 1MB/1MB (841/D260,D360)"},
 	{HPHW_NPROC,0x5A1,0x4,0x91,"UL 2w T120 1MB/1MB (851/D260,D360)"},
 	{HPHW_NPROC,0x5A2,0x4,0x81,"UL 1w U160 512K/512K (861/D270,D370)"},
@@ -201,7 +185,7 @@
 	{HPHW_NPROC,0x5B8,0x4,0x91,"SPP2250 240 MHz"},
 	{HPHW_NPROC,0x5B9,0x4,0x81,"UL 1w U+/240 (350/550)"},
 	{HPHW_NPROC,0x5BA,0x4,0x91,"UL 2w U+/240 (350/550)"},
-	{HPHW_NPROC,0x5BB,0x4,0x81,"AllegroHigh W "},
+	{HPHW_NPROC,0x5BB,0x4,0x81,"AllegroHigh W"},
 	{HPHW_NPROC,0x5BC,0x4,0x91,"AllegroLow W"},
 	{HPHW_NPROC,0x5BD,0x4,0x91,"Forte W 2-way"},
 	{HPHW_NPROC,0x5BE,0x4,0x91,"Prelude W"},
@@ -212,12 +196,41 @@
 	{HPHW_NPROC,0x5C3,0x4,0x91,"Sonata 360"},
 	{HPHW_NPROC,0x5C4,0x4,0x91,"Rhapsody 440"},
 	{HPHW_NPROC,0x5C5,0x4,0x91,"Rhapsody 360"},
-	{HPHW_NPROC,0x5C6,0x4,0x91,"Raven W 360 (9000/780/\?\?\?\?)"},
+	{HPHW_NPROC,0x5C6,0x4,0x91,"Raven W 360 (9000/780)"},
 	{HPHW_NPROC,0x5C7,0x4,0x91,"Halfdome W 440"},
 	{HPHW_NPROC,0x5C8,0x4,0x81,"Lego 360 processor"},
 	{HPHW_NPROC,0x5C9,0x4,0x91,"Rhapsody DC- 440"},
 	{HPHW_NPROC,0x5CA,0x4,0x91,"Rhapsody DC- 360"},
 	{HPHW_NPROC,0x5CB,0x4,0x91,"Crescendo 440"},
+	{HPHW_NPROC,0x5CC,0x4,0x91,"Prelude W 440"},
+	{HPHW_NPROC,0x5CD,0x4,0x91,"SPP2600"},
+	{HPHW_NPROC,0x5CE,0x4,0x91,"M2600"},
+	{HPHW_NPROC,0x5CF,0x4,0x81,"Allegro W+"},
+	{HPHW_NPROC,0x5D0,0x4,0x81,"Kazoo W+"},
+	{HPHW_NPROC,0x5D1,0x4,0x91,"Forte W+ 2w"},
+	{HPHW_NPROC,0x5D2,0x4,0x91,"Forte W+ 4w"},
+	{HPHW_NPROC,0x5D3,0x4,0x91,"Prelude W+ 540"},
+	{HPHW_NPROC,0x5D4,0x4,0x91,"Duet W+"},
+	{HPHW_NPROC,0x5D5,0x4,0x91,"Crescendo 550"},
+	{HPHW_NPROC,0x5D6,0x4,0x81,"Crescendo DC- 440"},
+	{HPHW_NPROC,0x5D7,0x4,0x91,"Keystone W+"},
+	{HPHW_NPROC,0x5D8,0x4,0x91,"Rhapsody wave 2 W+ DC-"},
+	{HPHW_NPROC,0x5D9,0x4,0x91,"Rhapsody wave 2 W+"},
+	{HPHW_NPROC,0x5DA,0x4,0x91,"Marcato W+ DC-"},
+	{HPHW_NPROC,0x5DB,0x4,0x91,"Marcato W+"},
+	{HPHW_NPROC,0x5DC,0x4,0x91,"Allegro W2"},
+	{HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"},
+	{HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"},
+	{HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"},
+	{HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"},
+	{HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"},
+	{HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"},
+	{HPHW_NPROC,0x5E3,0x4,0x91,"Crescendo 750 W2"},
+	{HPHW_NPROC,0x5E4,0x4,0x91,"Keystone/Matterhorn W2 750"},
+	{HPHW_NPROC,0x5E5,0x4,0x91,"PowerBar W+"},
+	{HPHW_NPROC,0x5E6,0x4,0x91,"Keystone/Matterhorn W2 650"},
+	{HPHW_NPROC,0x5E7,0x4,0x91,"Caribe W2 800"},
+	{HPHW_NPROC,0x5E8,0x4,0x91,"Pikes Peak W2"},
 	{HPHW_NPROC,0x5FF,0x4,0x91,"Hitachi W"},
 	{HPHW_NPROC,0x600,0x4,0x81,"Gecko (712/60)"},
 	{HPHW_NPROC,0x601,0x4,0x81,"Gecko 80 (712/80)"},
@@ -243,7 +256,7 @@
 	{HPHW_NPROC,0x616,0x4,0x81,"Piranha 120"},
 	{HPHW_NPROC,0x617,0x4,0x81,"Jason 50"},
 	{HPHW_NPROC,0x618,0x4,0x81,"Jason 100"},
-	{HPHW_NPROC,0x619,0x4,0x81,"Mirage 80 "},
+	{HPHW_NPROC,0x619,0x4,0x81,"Mirage 80"},
 	{HPHW_NPROC,0x61A,0x4,0x81,"SAIC L-80"},
 	{HPHW_NPROC,0x61B,0x4,0x81,"Rocky1 L-60"},
 	{HPHW_NPROC,0x61C,0x4,0x81,"Anole T (743/T)"},
@@ -311,6 +324,7 @@
 	{HPHW_A_DMA, 0x004, 0x00050, 0x80, "Lanbrusca 802.3 (36967A)"}, 
 	{HPHW_A_DMA, 0x004, 0x00056, 0x80, "HP-PB LoQuix FDDI"}, 
 	{HPHW_A_DMA, 0x004, 0x00057, 0x80, "HP-PB LoQuix FDDI (28670A)"}, 
+	{HPHW_A_DMA, 0x004, 0x0005E, 0x00, "Gecko Add-on Token Ring"}, 
 	{HPHW_A_DMA, 0x012, 0x00089, 0x80, "Barracuda Add-on FW-SCSI"}, 
 	{HPHW_A_DMA, 0x013, 0x00089, 0x80, "Bluefish Add-on FW-SCSI"}, 
 	{HPHW_A_DMA, 0x014, 0x00089, 0x80, "Shrike Add-on FW-SCSI"}, 
@@ -319,6 +333,7 @@
 	{HPHW_A_DMA, 0x01F, 0x00089, 0x80, "SkyHawk 100/120 FW-SCSI"}, 
 	{HPHW_A_DMA, 0x027, 0x00089, 0x80, "Piranha 100 FW-SCSI"}, 
 	{HPHW_A_DMA, 0x032, 0x00089, 0x80, "Raven T' Core FW-SCSI"}, 
+	{HPHW_A_DMA, 0x03b, 0x00089, 0x80, "Raven U/L2 Core FW-SCSI"}, 
 	{HPHW_A_DMA, 0x03d, 0x00089, 0x80, "Merlin 160 Core FW-SCSI"},
 	{HPHW_A_DMA, 0x044, 0x00089, 0x80, "Mohawk Core FW-SCSI"}, 
 	{HPHW_A_DMA, 0x051, 0x00089, 0x80, "Firehawk FW-SCSI"}, 
@@ -440,6 +455,8 @@
 	{HPHW_BA, 0x801, 0x00081, 0x0, "Hitachi Tiny 80 Core BA"}, 
 	{HPHW_BA, 0x004, 0x0008B, 0x0, "Anole Optional PCMCIA BA"}, 
 	{HPHW_BA, 0x004, 0x0008E, 0x0, "GSC ITR Wax BA"}, 
+	{HPHW_BA, 0x00C, 0x0008E, 0x0, "Gecko Optional Wax BA"}, 
+	{HPHW_BA, 0x010, 0x0008E, 0x0, "Pace Wax BA"}, 
 	{HPHW_BA, 0x011, 0x0008E, 0x0, "SuperPace Wax BA"}, 
 	{HPHW_BA, 0x012, 0x0008E, 0x0, "Mirage Jr Wax BA"}, 
 	{HPHW_BA, 0x013, 0x0008E, 0x0, "Mirage Wax BA"}, 
@@ -489,7 +506,7 @@
 	{HPHW_BA, 0x800, 0x00090, 0x0, "Hitachi Tiny 64 Wax EISA BA"}, 
 	{HPHW_BA, 0x801, 0x00090, 0x0, "Hitachi Tiny 80 Wax EISA BA"}, 
 	{HPHW_BA, 0x01A, 0x00093, 0x0, "Anole 64 TIMI BA"}, 
-	{HPHW_BA, 0x01B, 0x00093, 0x0, "Anole 64 TIMI BA"}, 
+	{HPHW_BA, 0x01B, 0x00093, 0x0, "Anole 100 TIMI BA"}, 
 	{HPHW_BA, 0x034, 0x00093, 0x0, "Anole T TIMI BA"}, 
 	{HPHW_BA, 0x04A, 0x00093, 0x0, "Anole L2 132 TIMI BA"}, 
 	{HPHW_BA, 0x04C, 0x00093, 0x0, "Anole L2 165 TIMI BA"}, 
@@ -551,6 +568,7 @@
 	{HPHW_CONSOLE, 0x01A, 0x0001F, 0x00, "Jason/Anole 64 Null Console"}, 
 	{HPHW_CONSOLE, 0x01B, 0x0001F, 0x00, "Jason/Anole 100 Null Console"}, 
 	{HPHW_FABRIC, 0x004, 0x000AA, 0x80, "Halfdome DNA Central Agent"}, 
+	{HPHW_FABRIC, 0x007, 0x000AA, 0x80, "Caribe DNA Central Agent"}, 
 	{HPHW_FABRIC, 0x004, 0x000AB, 0x00, "Halfdome TOGO Fabric Crossbar"}, 
 	{HPHW_FABRIC, 0x004, 0x000AC, 0x00, "Halfdome Sakura Fabric Router"}, 
 	{HPHW_FIO, 0x025, 0x0002E, 0x80, "Armyknife Optional X.25"}, 
@@ -588,14 +606,14 @@
 	{HPHW_FIO, 0x00D, 0x00072, 0x0, "Strider-33 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x00E, 0x00072, 0x0, "Trailways-50 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x00F, 0x00072, 0x0, "Trailways-33 Core LAN (802.3)"}, 
-	{HPHW_FIO, 0x010, 0x00072, 0x0, "Pace Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x011, 0x00072, 0x0, "Sidewinder Core Lan (802.3)"}, 
+	{HPHW_FIO, 0x010, 0x00072, 0x0, "Pace Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x011, 0x00072, 0x0, "Sidewinder Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x019, 0x00072, 0x0, "Scorpio Sr. Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x020, 0x00072, 0x0, "Scorpio 100 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x021, 0x00072, 0x0, "Spectra 50 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x022, 0x00072, 0x0, "Spectra 75 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x023, 0x00072, 0x0, "Spectra 100 Core LAN (802.3)"}, 
-	{HPHW_FIO, 0x024, 0x00072, 0x0, "Fast Pace Core Lan (802.3)"}, 
+	{HPHW_FIO, 0x024, 0x00072, 0x0, "Fast Pace Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x026, 0x00072, 0x0, "CoralII Jaguar Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x004, 0x00073, 0x0, "Cobra Core HIL"}, 
 	{HPHW_FIO, 0x005, 0x00073, 0x0, "Coral Core HIL"}, 
@@ -694,8 +712,8 @@
 	{HPHW_FIO, 0x04D, 0x00074, 0x0, "Anole L2 165 Core Centronics"}, 
 	{HPHW_FIO, 0x050, 0x00074, 0x0, "Merlin Jr 132 Core Centronics"}, 
 	{HPHW_FIO, 0x051, 0x00074, 0x0, "Firehawk Core Centronics"}, 
-	{HPHW_FIO, 0x056, 0x00074, 0x0, "Raven+ wSE FWSCSI Core Centronics"}, 
-	{HPHW_FIO, 0x057, 0x00074, 0x0, "Raven+ wDiff FWSCSI Core Centronics"}, 
+	{HPHW_FIO, 0x056, 0x00074, 0x0, "Raven+ w SE FWSCSI Core Centronics"}, 
+	{HPHW_FIO, 0x057, 0x00074, 0x0, "Raven+ w Diff FWSCSI Core Centronics"}, 
 	{HPHW_FIO, 0x058, 0x00074, 0x0, "FireHawk 200 Core Centronics"}, 
 	{HPHW_FIO, 0x05C, 0x00074, 0x0, "SummitHawk 230 Core Centronics"}, 
 	{HPHW_FIO, 0x800, 0x00074, 0x0, "Hitachi Tiny 64 Core Centronics"}, 
@@ -861,66 +879,66 @@
 	{HPHW_FIO, 0x02E, 0x00083, 0x0, "UL 350 Core PC Floppy"}, 
 	{HPHW_FIO, 0x02F, 0x00083, 0x0, "UL 550 Core PC Floppy"}, 
 	{HPHW_FIO, 0x032, 0x00083, 0x0, "Raven T' Core PC Floppy"}, 
-	{HPHW_FIO, 0x034, 0x00083, 0x0, "SAIC L-80 Core PC Floopy"}, 
-	{HPHW_FIO, 0x035, 0x00083, 0x0, "PCX-L2 712/132 Core Floopy"}, 
-	{HPHW_FIO, 0x036, 0x00083, 0x0, "PCX-L2 712/160 Core Floopy"}, 
-	{HPHW_FIO, 0x03B, 0x00083, 0x0, "Raven U/L2 Core PC Floopy"}, 
-	{HPHW_FIO, 0x03C, 0x00083, 0x0, "Merlin 132 Core PC Floopy"}, 
-	{HPHW_FIO, 0x03D, 0x00083, 0x0, "Merlin 160 Core PC Floopy"}, 
-	{HPHW_FIO, 0x03E, 0x00083, 0x0, "Merlin+ 132 Core PC Floopy"}, 
-	{HPHW_FIO, 0x03F, 0x00083, 0x0, "Merlin+ 180 Core PC Floopy"}, 
-	{HPHW_FIO, 0x045, 0x00083, 0x0, "Rocky1 Core PC Floopy"}, 
-	{HPHW_FIO, 0x046, 0x00083, 0x0, "Rocky2 120 Core PC Floopy"}, 
-	{HPHW_FIO, 0x047, 0x00083, 0x0, "Rocky2 150 Core PC Floopy"}, 
-	{HPHW_FIO, 0x04E, 0x00083, 0x0, "Kiji L2 132 Core PC Floopy"}, 
-	{HPHW_FIO, 0x050, 0x00083, 0x0, "Merlin Jr 132 Core PC Floopy"}, 
-	{HPHW_FIO, 0x056, 0x00083, 0x0, "Raven+ w SE FWSCSI Core PC Floopy"}, 
-	{HPHW_FIO, 0x057, 0x00083, 0x0, "Raven+ w Diff FWSCSI Core PC Floopy"}, 
-	{HPHW_FIO, 0x800, 0x00083, 0x0, "Hitachi Tiny 64 Core PC Floopy"}, 
-	{HPHW_FIO, 0x801, 0x00083, 0x0, "Hitachi Tiny 80 Core PC Floopy"}, 
-	{HPHW_FIO, 0x015, 0x00084, 0x0, "KittyHawk GSY Core PC Keyboard"}, 
-	{HPHW_FIO, 0x016, 0x00084, 0x0, "Gecko Core PC Keyboard"}, 
-	{HPHW_FIO, 0x018, 0x00084, 0x0, "Gecko Optional PC Keyboard"}, 
-	{HPHW_FIO, 0x01A, 0x00084, 0x0, "Anole 64 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x01B, 0x00084, 0x0, "Anole 100 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x01C, 0x00084, 0x0, "Gecko 80 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x01D, 0x00084, 0x0, "Gecko 100 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x01F, 0x00084, 0x0, "SkyHawk 100/120 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x027, 0x00084, 0x0, "Piranha 100 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x028, 0x00084, 0x0, "Mirage Jr Core PC Keyboard"}, 
-	{HPHW_FIO, 0x029, 0x00084, 0x0, "Mirage Core PC Keyboard"}, 
-	{HPHW_FIO, 0x02A, 0x00084, 0x0, "Electra Core PC Keyboard"}, 
-	{HPHW_FIO, 0x02B, 0x00084, 0x0, "Mirage 80 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x02C, 0x00084, 0x0, "Mirage 100+ Core PC Keyboard"}, 
-	{HPHW_FIO, 0x02E, 0x00084, 0x0, "UL 350 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x02F, 0x00084, 0x0, "UL 550 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x032, 0x00084, 0x0, "Raven T' Core PC Keyboard"}, 
-	{HPHW_FIO, 0x033, 0x00084, 0x0, "Anole T Core PC Keyboard"}, 
-	{HPHW_FIO, 0x034, 0x00084, 0x0, "SAIC L-80 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x035, 0x00084, 0x0, "PCX-L2 712/132 Core Keyboard"}, 
-	{HPHW_FIO, 0x036, 0x00084, 0x0, "PCX-L2 712/160 Core Keyboard"}, 
-	{HPHW_FIO, 0x03B, 0x00084, 0x0, "Raven U/L2 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x03C, 0x00084, 0x0, "Merlin 132 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x03D, 0x00084, 0x0, "Merlin 160 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x03E, 0x00084, 0x0, "Merlin+ 132 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x03F, 0x00084, 0x0, "Merlin+ 180 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x044, 0x00084, 0x0, "Mohawk Core PC Keyboard"}, 
-	{HPHW_FIO, 0x045, 0x00084, 0x0, "Rocky1 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x046, 0x00084, 0x0, "Rocky2 120 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x047, 0x00084, 0x0, "Rocky2 150 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x048, 0x00084, 0x0, "Rocky2 120 Dino PC Keyboard"}, 
-	{HPHW_FIO, 0x049, 0x00084, 0x0, "Rocky2 150 Dino PC Keyboard"}, 
-	{HPHW_FIO, 0x04B, 0x00084, 0x0, "Anole L2 132 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x04D, 0x00084, 0x0, "Anole L2 165 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x04E, 0x00084, 0x0, "Kiji L2 132 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x050, 0x00084, 0x0, "Merlin Jr 132 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x051, 0x00084, 0x0, "Firehawk Core PC Keyboard"}, 
-	{HPHW_FIO, 0x056, 0x00084, 0x0, "Raven+ w SE FWSCSI Core PC Keyboard"}, 
-	{HPHW_FIO, 0x057, 0x00084, 0x0, "Raven+ w Diff FWSCSI Core PC Keyboard"}, 
-	{HPHW_FIO, 0x058, 0x00084, 0x0, "FireHawk 200 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x05C, 0x00084, 0x0, "SummitHawk 230 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x800, 0x00084, 0x0, "Hitachi Tiny 64 Core PC Keyboard"}, 
-	{HPHW_FIO, 0x801, 0x00084, 0x0, "Hitachi Tiny 80 Core PC Keyboard"}, 
+	{HPHW_FIO, 0x034, 0x00083, 0x0, "SAIC L-80 Core PC Floppy"}, 
+	{HPHW_FIO, 0x035, 0x00083, 0x0, "PCX-L2 712/132 Core Floppy"}, 
+	{HPHW_FIO, 0x036, 0x00083, 0x0, "PCX-L2 712/160 Core Floppy"}, 
+	{HPHW_FIO, 0x03B, 0x00083, 0x0, "Raven U/L2 Core PC Floppy"}, 
+	{HPHW_FIO, 0x03C, 0x00083, 0x0, "Merlin 132 Core PC Floppy"}, 
+	{HPHW_FIO, 0x03D, 0x00083, 0x0, "Merlin 160 Core PC Floppy"}, 
+	{HPHW_FIO, 0x03E, 0x00083, 0x0, "Merlin+ 132 Core PC Floppy"}, 
+	{HPHW_FIO, 0x03F, 0x00083, 0x0, "Merlin+ 180 Core PC Floppy"}, 
+	{HPHW_FIO, 0x045, 0x00083, 0x0, "Rocky1 Core PC Floppy"}, 
+	{HPHW_FIO, 0x046, 0x00083, 0x0, "Rocky2 120 Core PC Floppy"}, 
+	{HPHW_FIO, 0x047, 0x00083, 0x0, "Rocky2 150 Core PC Floppy"}, 
+	{HPHW_FIO, 0x04E, 0x00083, 0x0, "Kiji L2 132 Core PC Floppy"}, 
+	{HPHW_FIO, 0x050, 0x00083, 0x0, "Merlin Jr 132 Core PC Floppy"}, 
+	{HPHW_FIO, 0x056, 0x00083, 0x0, "Raven+ w SE FWSCSI Core PC Floppy"}, 
+	{HPHW_FIO, 0x057, 0x00083, 0x0, "Raven+ w Diff FWSCSI Core PC Floppy"}, 
+	{HPHW_FIO, 0x800, 0x00083, 0x0, "Hitachi Tiny 64 Core PC Floppy"}, 
+	{HPHW_FIO, 0x801, 0x00083, 0x0, "Hitachi Tiny 80 Core PC Floppy"},
+	{HPHW_FIO, 0x015, 0x00084, 0x0, "KittyHawk GSY Core PS/2 Port"}, 
+	{HPHW_FIO, 0x016, 0x00084, 0x0, "Gecko Core PS/2 Port"}, 
+	{HPHW_FIO, 0x018, 0x00084, 0x0, "Gecko Optional PS/2 Port"}, 
+	{HPHW_FIO, 0x01A, 0x00084, 0x0, "Anole 64 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x01B, 0x00084, 0x0, "Anole 100 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x01C, 0x00084, 0x0, "Gecko 80 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x01D, 0x00084, 0x0, "Gecko 100 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x01F, 0x00084, 0x0, "SkyHawk 100/120 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x027, 0x00084, 0x0, "Piranha 100 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x028, 0x00084, 0x0, "Mirage Jr Core PS/2 Port"}, 
+	{HPHW_FIO, 0x029, 0x00084, 0x0, "Mirage Core PS/2 Port"}, 
+	{HPHW_FIO, 0x02A, 0x00084, 0x0, "Electra Core PS/2 Port"}, 
+	{HPHW_FIO, 0x02B, 0x00084, 0x0, "Mirage 80 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x02C, 0x00084, 0x0, "Mirage 100+ Core PS/2 Port"}, 
+	{HPHW_FIO, 0x02E, 0x00084, 0x0, "UL 350 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x02F, 0x00084, 0x0, "UL 550 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x032, 0x00084, 0x0, "Raven T' Core PS/2 Port"}, 
+	{HPHW_FIO, 0x033, 0x00084, 0x0, "Anole T Core PS/2 Port"}, 
+	{HPHW_FIO, 0x034, 0x00084, 0x0, "SAIC L-80 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x035, 0x00084, 0x0, "PCX-L2 712/132 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x036, 0x00084, 0x0, "PCX-L2 712/160 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x03B, 0x00084, 0x0, "Raven U/L2 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x03C, 0x00084, 0x0, "Merlin 132 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x03D, 0x00084, 0x0, "Merlin 160 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x03E, 0x00084, 0x0, "Merlin+ 132 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x03F, 0x00084, 0x0, "Merlin+ 180 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x044, 0x00084, 0x0, "Mohawk Core PS/2 Port"}, 
+	{HPHW_FIO, 0x045, 0x00084, 0x0, "Rocky1 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x046, 0x00084, 0x0, "Rocky2 120 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x047, 0x00084, 0x0, "Rocky2 150 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x048, 0x00084, 0x0, "Rocky2 120 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x049, 0x00084, 0x0, "Rocky2 150 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x04B, 0x00084, 0x0, "Anole L2 132 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x04D, 0x00084, 0x0, "Anole L2 165 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x04E, 0x00084, 0x0, "Kiji L2 132 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x050, 0x00084, 0x0, "Merlin Jr 132 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x051, 0x00084, 0x0, "Firehawk Core PS/2 Port"}, 
+	{HPHW_FIO, 0x056, 0x00084, 0x0, "Raven+ w SE FWSCSI Core PS/2 Port"}, 
+	{HPHW_FIO, 0x057, 0x00084, 0x0, "Raven+ w Diff FWSCSI Core PS/2 Port"}, 
+	{HPHW_FIO, 0x058, 0x00084, 0x0, "FireHawk 200 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x05C, 0x00084, 0x0, "SummitHawk 230 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x800, 0x00084, 0x0, "Hitachi Tiny 64 Core PS/2 Port"}, 
+	{HPHW_FIO, 0x801, 0x00084, 0x0, "Hitachi Tiny 80 Core PS/2 Port"}, 
 	{HPHW_FIO, 0x004, 0x00085, 0x0, "Solo GSC Optional Graphics"}, 
 	{HPHW_FIO, 0x005, 0x00085, 0x0, "Duet GSC Optional Graphics"}, 
 	{HPHW_FIO, 0x008, 0x00085, 0x0, "Anole Artist Optional Graphics"}, 
@@ -969,18 +987,17 @@
 	{HPHW_FIO, 0x034, 0x00088, 0x0, "Anole T VME Networking"}, 
 	{HPHW_FIO, 0x04A, 0x00088, 0x0, "Anole L2 132 VME Networking"}, 
 	{HPHW_FIO, 0x04C, 0x00088, 0x0, "Anole L2 165 VME Networking"}, 
-	{HPHW_FIO, 0x03B, 0x00089, 0x0, "Raven U/L2 Core FW-SCSI"}, 
-	{HPHW_FIO, 0x011, 0x0008A, 0x0, "WB-96 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x012, 0x0008A, 0x0, "Orville Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x013, 0x0008A, 0x0, "Wilbur Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x014, 0x0008A, 0x0, "WB-80 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x015, 0x0008A, 0x0, "KittyHawk GSY Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x016, 0x0008A, 0x0, "Gecko Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x018, 0x0008A, 0x0, "Gecko Optional Lan (802.3)"}, 
-	{HPHW_FIO, 0x01A, 0x0008A, 0x0, "Anole 64 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x01B, 0x0008A, 0x0, "Anole 100 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x01C, 0x0008A, 0x0, "Gecko 80 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x01D, 0x0008A, 0x0, "Gecko 100 Core Lan (802.3)"}, 
+	{HPHW_FIO, 0x011, 0x0008A, 0x0, "WB-96 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x012, 0x0008A, 0x0, "Orville Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x013, 0x0008A, 0x0, "Wilbur Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x014, 0x0008A, 0x0, "WB-80 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x015, 0x0008A, 0x0, "KittyHawk GSY Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x016, 0x0008A, 0x0, "Gecko Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x018, 0x0008A, 0x0, "Gecko Optional LAN (802.3)"}, 
+	{HPHW_FIO, 0x01A, 0x0008A, 0x0, "Anole 64 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x01B, 0x0008A, 0x0, "Anole 100 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x01C, 0x0008A, 0x0, "Gecko 80 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x01D, 0x0008A, 0x0, "Gecko 100 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x01F, 0x0008A, 0x0, "SkyHawk 100/120 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x027, 0x0008A, 0x0, "Piranha 100 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x028, 0x0008A, 0x0, "Mirage Jr Core LAN (802.3)"}, 
@@ -991,24 +1008,24 @@
 	{HPHW_FIO, 0x02E, 0x0008A, 0x0, "UL 350 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x02F, 0x0008A, 0x0, "UL 350 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x032, 0x0008A, 0x0, "Raven T' Core LAN (802.3)"}, 
-	{HPHW_FIO, 0x033, 0x0008A, 0x0, "Anole T Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x034, 0x0008A, 0x0, "SAIC L-80 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x035, 0x0008A, 0x0, "PCX-L2 712/132 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x036, 0x0008A, 0x0, "PCX-L2 712/160 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x03B, 0x0008A, 0x0, "Raven U/L2 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x03C, 0x0008A, 0x0, "Merlin 132 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x03D, 0x0008A, 0x0, "Merlin 160 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x044, 0x0008A, 0x0, "Mohawk Core Lan (802.3)"}, 
+	{HPHW_FIO, 0x033, 0x0008A, 0x0, "Anole T Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x034, 0x0008A, 0x0, "SAIC L-80 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x035, 0x0008A, 0x0, "PCX-L2 712/132 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x036, 0x0008A, 0x0, "PCX-L2 712/160 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x03B, 0x0008A, 0x0, "Raven U/L2 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x03C, 0x0008A, 0x0, "Merlin 132 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x03D, 0x0008A, 0x0, "Merlin 160 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x044, 0x0008A, 0x0, "Mohawk Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x045, 0x0008A, 0x0, "Rocky1 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x046, 0x0008A, 0x0, "Rocky2 120 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x047, 0x0008A, 0x0, "Rocky2 150 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x04B, 0x0008A, 0x0, "Anole L2 132 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x04D, 0x0008A, 0x0, "Anole L2 165 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x04E, 0x0008A, 0x0, "Kiji L2 132 Core LAN (802.3)"}, 
-	{HPHW_FIO, 0x050, 0x0008A, 0x0, "Merlin Jr 132 Core Lan (802.3)"}, 
+	{HPHW_FIO, 0x050, 0x0008A, 0x0, "Merlin Jr 132 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x058, 0x0008A, 0x0, "FireHawk 200 Core LAN (802.3)"}, 
-	{HPHW_FIO, 0x800, 0x0008A, 0x0, "Hitachi Tiny 64 Core Lan (802.3)"}, 
-	{HPHW_FIO, 0x801, 0x0008A, 0x0, "Hitachi Tiny 80 Core Lan (802.3)"}, 
+	{HPHW_FIO, 0x800, 0x0008A, 0x0, "Hitachi Tiny 64 Core LAN (802.3)"}, 
+	{HPHW_FIO, 0x801, 0x0008A, 0x0, "Hitachi Tiny 80 Core LAN (802.3)"}, 
 	{HPHW_FIO, 0x004, 0x0008C, 0x0, "SkyHawk 100/120 Wax RS-232"}, 
 	{HPHW_FIO, 0x005, 0x0008C, 0x0, "SAIC L-80 Wax RS-232"}, 
 	{HPHW_FIO, 0x006, 0x0008C, 0x0, "Raven U/L2 Dino RS-232"}, 
@@ -1099,14 +1116,15 @@
 	{HPHW_FIO, 0x005, 0x0008F, 0x0, "Rocky1 Boot Rom"}, 
 	{HPHW_FIO, 0x006, 0x0008F, 0x0, "Rocky2 120 Boot Rom"}, 
 	{HPHW_FIO, 0x007, 0x0008F, 0x0, "Rocky2 150 Boot Rom"}, 
-	{HPHW_FIO, 0x006, 0x00096, 0x0, "Raven U/L2 Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x007, 0x00096, 0x0, "Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x008, 0x00096, 0x0, "Merlin 132 Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x009, 0x00096, 0x0, "Merlin 160 Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x00A, 0x00096, 0x0, "Merlin Jr 132 Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x019, 0x00096, 0x0, "Merlin+ 180 Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x022, 0x00096, 0x0, "Merlin+ 132 Dino PS2 Keyboard"}, 
-	{HPHW_FIO, 0x004, 0x00097, 0x0, "Cascade EISA 100VG lan"}, 
+	{HPHW_FIO, 0x01B, 0x0008F, 0x0, "Anole 100 Boot Rom"}, 
+	{HPHW_FIO, 0x006, 0x00096, 0x0, "Raven U/L2 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x007, 0x00096, 0x0, "Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x008, 0x00096, 0x0, "Merlin 132 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x009, 0x00096, 0x0, "Merlin 160 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x00A, 0x00096, 0x0, "Merlin Jr 132 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x019, 0x00096, 0x0, "Merlin+ 180 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x022, 0x00096, 0x0, "Merlin+ 132 Dino PS/2 Port"}, 
+	{HPHW_FIO, 0x004, 0x00097, 0x0, "Cascade EISA 100VG LAN"}, 
 	{HPHW_FIO, 0x023, 0x00099, 0x0, "Rocky1 Wax HPIB"}, 
 	{HPHW_FIO, 0x048, 0x00099, 0x0, "Rocky2 120 Clark/Dino HPIB"}, 
 	{HPHW_FIO, 0x049, 0x00099, 0x0, "Rocky2 150 Clark/Dino HPIB"}, 
@@ -1114,14 +1132,14 @@
 	{HPHW_FIO, 0x004, 0x000A2, 0x0, "Forte Core PCI 10/100BT LAN"}, 
 	{HPHW_FIO, 0x005, 0x000A2, 0x0, "AllegroLow PCI 10/100BT LAN"}, 
 	{HPHW_FIO, 0x006, 0x000A2, 0x0, "AllegroHIgh Core PCI 10/100BT LAN"}, 
-	{HPHW_FIO, 0x007, 0x000A2, 0x0, "PCI Plug-in Lan"}, 
-	{HPHW_FIO, 0x00A, 0x000A2, 0x0, "Lego 360 Core PCI 10/100BT Lan"}, 
-	{HPHW_FIO, 0x03E, 0x000A2, 0x0, "Merlin+ 132 Core PCI Lan"}, 
-	{HPHW_FIO, 0x03F, 0x000A2, 0x0, "Merlin+ 180 Core PCI Lan"}, 
-	{HPHW_FIO, 0x056, 0x000A2, 0x0, "Raven+ w SE FWSCSI Core PCI Lan"}, 
-	{HPHW_FIO, 0x057, 0x000A2, 0x0, "Raven+ w Diff FWSCSI Core PCI Lan"}, 
-	{HPHW_FIO, 0x05E, 0x000A2, 0x0, "Staccato 132 PCI Lan"}, 
-	{HPHW_FIO, 0x05F, 0x000A2, 0x0, "Staccato 180 PCI Lan"}, 
+	{HPHW_FIO, 0x007, 0x000A2, 0x0, "PCI Plug-in LAN"}, 
+	{HPHW_FIO, 0x00A, 0x000A2, 0x0, "Lego 360 Core PCI 10/100BT LAN"}, 
+	{HPHW_FIO, 0x03E, 0x000A2, 0x0, "Merlin+ 132 Core PCI LAN"}, 
+	{HPHW_FIO, 0x03F, 0x000A2, 0x0, "Merlin+ 180 Core PCI LAN"}, 
+	{HPHW_FIO, 0x056, 0x000A2, 0x0, "Raven+ w SE FWSCSI Core PCI LAN"}, 
+	{HPHW_FIO, 0x057, 0x000A2, 0x0, "Raven+ w Diff FWSCSI Core PCI LAN"}, 
+	{HPHW_FIO, 0x05E, 0x000A2, 0x0, "Staccato 132 PCI LAN"}, 
+	{HPHW_FIO, 0x05F, 0x000A2, 0x0, "Staccato 180 PCI LAN"}, 
 	{HPHW_FIO, 0x004, 0x000A3, 0x0, "Forte Core PCI LVD Ultra2 SCSI"}, 
 	{HPHW_FIO, 0x004, 0x000A3, 0x0, "Forte Core PCI SE UltraSCSI"}, 
 	{HPHW_FIO, 0x004, 0x000A3, 0x0, "Forte Core PCI IDE/ATAPI CD-ROM"}, 
@@ -1157,160 +1175,19 @@
 	{HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"}, 
 	{HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"}, 
 	{HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"}, 
-	{HPHW_IOA, 0x581, 0x0000B, 0x10, "Uturn-IOA BC Runway Port"}, 
-	{HPHW_IOA, 0x582, 0x0000B, 0x10, "Astro BC Runway Port"}, 
-	{HPHW_IOA, 0x700, 0x0000B, 0x00, "NEC-IOS BC System Bus Port"}, 
+	{HPHW_IOA, 0x581, 0x0000B, 0x10, "Uturn-IOA BC Runway Port"},
+	{HPHW_IOA, 0x582, 0x0000B, 0x10, "Astro BC Runway Port"},
+	{HPHW_IOA, 0x700, 0x0000B, 0x00, "NEC-IOS BC System Bus Port"},
 	{HPHW_MEMORY, 0x002, 0x00008, 0x00, "MID_BUS"}, 
-	{HPHW_MEMORY, 0x00C, 0x00008, 0x08, "Kahlua 8MB"}, 
-	{HPHW_MEMORY, 0x00D, 0x00008, 0x08, "Kahlua 4MB"}, 
-	{HPHW_MEMORY, 0x00E, 0x00008, 0x08, "Tequila 16MB"}, 
-	{HPHW_MEMORY, 0x00F, 0x00008, 0x08, "Tequila 32MB"}, 
-	{HPHW_MEMORY, 0x040, 0x00008, 0x00, "Hitachi"}, 
-	{HPHW_MEMORY, 0x004, 0x00009, 0x00, "Cheetah"}, 
-	{HPHW_MEMORY, 0x005, 0x00009, 0x00, "Emerald"}, 
-	{HPHW_MEMORY, 0x008, 0x00009, 0x00, "Indigo 3MB/5MB"}, 
-	{HPHW_MEMORY, 0x00C, 0x00009, 0x00, "Indigo 8MB"}, 
-	{HPHW_MEMORY, 0x00D, 0x00009, 0x00, "Paradise 4MB"}, 
-	{HPHW_MEMORY, 0x00E, 0x00009, 0x00, "Burgundy Onboard"}, 
-	{HPHW_MEMORY, 0x012, 0x00009, 0x00, "Indigo 12MB/20MB"}, 
-	{HPHW_MEMORY, 0x013, 0x00009, 0x00, "Cobra"}, 
-	{HPHW_MEMORY, 0x014, 0x00009, 0x00, "Nova"}, 
-	{HPHW_MEMORY, 0x015, 0x00009, 0x00, "Coral"}, 
-	{HPHW_MEMORY, 0x016, 0x00009, 0x00, "Bushmaster"}, 
-	{HPHW_MEMORY, 0x017, 0x00009, 0x00, "Scorpio"}, 
-	{HPHW_MEMORY, 0x018, 0x00009, 0x00, "Flounder"}, 
-	{HPHW_MEMORY, 0x019, 0x00009, 0x00, "Hardball"}, 
-	{HPHW_MEMORY, 0x01A, 0x00009, 0x00, "CoralII 99"}, 
-	{HPHW_MEMORY, 0x01B, 0x00009, 0x00, "Scorpio Jr."}, 
-	{HPHW_MEMORY, 0x01C, 0x00009, 0x00, "Strider-50 (715T)"}, 
-	{HPHW_MEMORY, 0x01D, 0x00009, 0x00, "Strider-33 (707T)"}, 
-	{HPHW_MEMORY, 0x01E, 0x00009, 0x00, "Trailways-50 (715S)"}, 
-	{HPHW_MEMORY, 0x01F, 0x00009, 0x00, "Trailways-33 (707S)"}, 
-	{HPHW_MEMORY, 0x020, 0x00009, 0x00, "Pace"}, 
-	{HPHW_MEMORY, 0x021, 0x00009, 0x00, "Sidewinder"}, 
-	{HPHW_MEMORY, 0x022, 0x00009, 0x00, "Orville"}, 
-	{HPHW_MEMORY, 0x023, 0x00009, 0x00, "Wilbur"}, 
-	{HPHW_MEMORY, 0x026, 0x00009, 0x00, "Gecko"}, 
-	{HPHW_MEMORY, 0x027, 0x00009, 0x00, "Scorpio Sr."}, 
-	{HPHW_MEMORY, 0x028, 0x00009, 0x00, "Scorpio 100"}, 
-	{HPHW_MEMORY, 0x029, 0x00009, 0x00, "Spectra 50"}, 
-	{HPHW_MEMORY, 0x02A, 0x00009, 0x00, "CoralII 132"}, 
-	{HPHW_MEMORY, 0x02F, 0x00009, 0x00, "KittyHawk DC2-"}, 
-	{HPHW_MEMORY, 0x030, 0x00009, 0x00, "Spectra 75"}, 
-	{HPHW_MEMORY, 0x031, 0x00009, 0x00, "Spectra 100"}, 
-	{HPHW_MEMORY, 0x032, 0x00009, 0x00, "KittyHawk DC3"}, 
-	{HPHW_MEMORY, 0x033, 0x00009, 0x00, "Fast Pace"}, 
-	{HPHW_MEMORY, 0x034, 0x00009, 0x00, "Snake Eagle"}, 
-	{HPHW_MEMORY, 0x035, 0x00009, 0x00, "Anole 64"}, 
-	{HPHW_MEMORY, 0x036, 0x00009, 0x00, "Anole 100"}, 
-	{HPHW_MEMORY, 0x037, 0x00009, 0x00, "Snake Cheetah"}, 
-	{HPHW_MEMORY, 0x038, 0x00009, 0x00, "Gecko 80"}, 
-	{HPHW_MEMORY, 0x039, 0x00009, 0x00, "Gecko 100"}, 
-	{HPHW_MEMORY, 0x03A, 0x00009, 0x00, "Gecko 120"}, 
-	{HPHW_MEMORY, 0x03B, 0x00009, 0x00, "Gila 80"}, 
-	{HPHW_MEMORY, 0x03C, 0x00009, 0x00, "Gila 100"}, 
-	{HPHW_MEMORY, 0x03D, 0x00009, 0x00, "Gila 120"}, 
-	{HPHW_MEMORY, 0x03E, 0x00009, 0x00, "Scorpio-L 80"}, 
-	{HPHW_MEMORY, 0x03F, 0x00009, 0x00, "Scorpio-L 100"}, 
-	{HPHW_MEMORY, 0x040, 0x00009, 0x00, "Scorpio-L 120"}, 
-	{HPHW_MEMORY, 0x041, 0x00009, 0x00, "Spectra-L 80"}, 
-	{HPHW_MEMORY, 0x042, 0x00009, 0x00, "Spectra-L 100"}, 
-	{HPHW_MEMORY, 0x043, 0x00009, 0x00, "Spectra-L 120"}, 
-	{HPHW_MEMORY, 0x044, 0x00009, 0x00, "Piranha 100"}, 
-	{HPHW_MEMORY, 0x045, 0x00009, 0x00, "Piranha 120"}, 
-	{HPHW_MEMORY, 0x046, 0x00009, 0x00, "Jason 50"}, 
-	{HPHW_MEMORY, 0x047, 0x00009, 0x00, "Jason 100"}, 
-	{HPHW_MEMORY, 0x049, 0x00009, 0x00, "SkyHawk 100/120"}, 
-	{HPHW_MEMORY, 0x04A, 0x00009, 0x00, "Mirage Jr"}, 
-	{HPHW_MEMORY, 0x04B, 0x00009, 0x00, "Mirage 100"}, 
-	{HPHW_MEMORY, 0x04C, 0x00009, 0x00, "Mirage 100+"}, 
-	{HPHW_MEMORY, 0x04D, 0x00009, 0x00, "Electra 100"}, 
-	{HPHW_MEMORY, 0x04E, 0x00009, 0x00, "Electra 120"}, 
-	{HPHW_MEMORY, 0x04F, 0x00009, 0x00, "Mirage 80"}, 
-	{HPHW_MEMORY, 0x050, 0x00009, 0x00, "UL Proc 1 way T'100"}, 
-	{HPHW_MEMORY, 0x051, 0x00009, 0x00, "UL Proc 1 way T'120"}, 
-	{HPHW_MEMORY, 0x052, 0x00009, 0x00, "UL Proc 2 way T'100"}, 
-	{HPHW_MEMORY, 0x053, 0x00009, 0x00, "KittyHawk DC3-"}, 
-	{HPHW_MEMORY, 0x054, 0x00009, 0x00, "UL Proc 2 way T'120"}, 
-	{HPHW_MEMORY, 0x055, 0x00009, 0x00, "Raven 120 mem"}, 
-	{HPHW_MEMORY, 0x056, 0x00009, 0x00, "UL Proc L 75"}, 
-	{HPHW_MEMORY, 0x057, 0x00009, 0x00, "UL Proc L 100"}, 
-	{HPHW_MEMORY, 0x058, 0x00009, 0x00, "Anole T"}, 
-	{HPHW_MEMORY, 0x059, 0x00009, 0x00, "SAIC L-80"}, 
-	{HPHW_MEMORY, 0x05A, 0x00009, 0x00, "Merlin+ L2 180"}, 
-	{HPHW_MEMORY, 0x05B, 0x00009, 0x00, "Raven U 200 2-way"}, 
-	{HPHW_MEMORY, 0x05C, 0x00009, 0x00, "Raven U 180+"}, 
-	{HPHW_MEMORY, 0x05D, 0x00009, 0x00, "Raven U 200"}, 
-	{HPHW_MEMORY, 0x05E, 0x00009, 0x00, "Rocky2 150 Memory"}, 
-	{HPHW_MEMORY, 0x08A, 0x00009, 0x00, "Staccato L2 132 Memory"}, 
-	{HPHW_MEMORY, 0x08B, 0x00009, 0x00, "Staccato L2 180 Memory"}, 
-	{HPHW_MEMORY, 0x05F, 0x00009, 0x00, "SPP2000 Memory"}, 
-	{HPHW_MEMORY, 0x060, 0x00009, 0x00, "Merlin L2 132"}, 
-	{HPHW_MEMORY, 0x061, 0x00009, 0x00, "Merlin+ L2 132"}, 
 	{HPHW_MEMORY, 0x063, 0x00009, 0x00, "712/132 L2 Upgrade"}, 
 	{HPHW_MEMORY, 0x064, 0x00009, 0x00, "712/160 L2 Upgrade"}, 
 	{HPHW_MEMORY, 0x065, 0x00009, 0x00, "715/132 L2 Upgrade"}, 
-	{HPHW_MEMORY, 0x066, 0x00009, 0x00, "715/160 L2 Upgrade"}, 
-	{HPHW_MEMORY, 0x067, 0x00009, 0x00, "Merlin 160/ThunderHawk Memory"}, 
-	{HPHW_MEMORY, 0x068, 0x00009, 0x00, "LightningHawk Memory"}, 
-	{HPHW_MEMORY, 0x069, 0x00009, 0x00, "Rocky1 Memory"}, 
-	{HPHW_MEMORY, 0x06A, 0x00009, 0x00, "Raven L2 132"}, 
-	{HPHW_MEMORY, 0x06B, 0x00009, 0x00, "Raven L2 160"}, 
-	{HPHW_MEMORY, 0x06C, 0x00009, 0x00, "Raven L2 187"}, 
-	{HPHW_MEMORY, 0x06D, 0x00009, 0x00, "Raven L2 200"}, 
-	{HPHW_MEMORY, 0x06E, 0x00009, 0x00, "Raven U 230"}, 
-	{HPHW_MEMORY, 0x06F, 0x00009, 0x00, "Raven U 240"}, 
-	{HPHW_MEMORY, 0x070, 0x00009, 0x00, "Rocky2 120 Memory"}, 
-	{HPHW_MEMORY, 0x071, 0x00009, 0x00, "Raven U 160"}, 
-	{HPHW_MEMORY, 0x072, 0x00009, 0x00, "Raven U 180"}, 
-	{HPHW_MEMORY, 0x072, 0x00009, 0x00, "UL Proc 1 way T'120 1MB/1MB"}, 
-	{HPHW_MEMORY, 0x073, 0x00009, 0x00, "UL Proc 2 way T'120 1MB/1MB"}, 
-	{HPHW_MEMORY, 0x074, 0x00009, 0x00, "Anole L2 132 memory"}, 
-	{HPHW_MEMORY, 0x075, 0x00009, 0x00, "Anole L2 165 memory"}, 
-	{HPHW_MEMORY, 0x076, 0x00009, 0x00, "UL 1 way U160 512K/512K memory"}, 
-	{HPHW_MEMORY, 0x077, 0x00009, 0x00, "UL 2 way U160 512K/512K memory"}, 
-	{HPHW_MEMORY, 0x078, 0x00009, 0x00, "Kiji L2 132 memory"}, 
-	{HPHW_MEMORY, 0x079, 0x00009, 0x00, "UL 1 way U160 1M/1M memory"}, 
-	{HPHW_MEMORY, 0x07A, 0x00009, 0x00, "UL 2 way U160 1M/1M memory"}, 
-	{HPHW_MEMORY, 0x07B, 0x00009, 0x00, "UL 1 way U180 1M/1M memory"}, 
-	{HPHW_MEMORY, 0x07C, 0x00009, 0x00, "UL 2 way U180 1M/1M memory"}, 
-	{HPHW_MEMORY, 0x07D, 0x00009, 0x00, "UL 1 way U240 U+ 2M/2M memory"}, 
-	{HPHW_MEMORY, 0x07E, 0x00009, 0x00, "UL 2 way U240 U+ 2M/2M memory"}, 
-	{HPHW_MEMORY, 0x07F, 0x00009, 0x00, "UL L2 132 memory"}, 
-	{HPHW_MEMORY, 0x080, 0x00009, 0x00, "UL L2 160 memory"}, 
-	{HPHW_MEMORY, 0x081, 0x00009, 0x00, "Merlin Jr 132 memory"}, 
-	{HPHW_MEMORY, 0x082, 0x00009, 0x00, "FireHawk 200 Memory"}, 
-	{HPHW_MEMORY, 0x083, 0x00009, 0x00, "SummitHawk Memory"}, 
-	{HPHW_MEMORY, 0x084, 0x00009, 0x00, "Jade Upgrade Memory"}, 
-	{HPHW_MEMORY, 0x085, 0x00009, 0x00, "SPP2500 Memory"}, 
-	{HPHW_MEMORY, 0x086, 0x00009, 0x00, "AllegroHigh Memory"}, 
-	{HPHW_MEMORY, 0x087, 0x00009, 0x00, "AllegroLow Memory"}, 
-	{HPHW_MEMORY, 0x088, 0x00009, 0x00, "Forte 2w Memory"}, 
-	{HPHW_MEMORY, 0x089, 0x00009, 0x00, "Forte 4w Memory"}, 
-	{HPHW_MEMORY, 0x08A, 0x00009, 0x00, "Staccato L2 132 Memory"}, 
-	{HPHW_MEMORY, 0x08B, 0x00009, 0x00, "Staccato L2 180 Memory"}, 
-	{HPHW_MEMORY, 0x090, 0x00009, 0x00, "Prelude SMC Memory"}, 
-	{HPHW_MEMORY, 0x091, 0x00009, 0x00, "Lego 360 Memory"}, 
-	{HPHW_MEMORY, 0x7FF, 0x00009, 0x00, "NEC Aska memory"}, 
-	{HPHW_MEMORY, 0x800, 0x00009, 0x00, "Hitachi Tiny 64"}, 
-	{HPHW_MEMORY, 0x801, 0x00009, 0x00, "Hitachi Tiny 80"}, 
-	{HPHW_MEMORY, 0x8FF, 0x00009, 0x00, "Hitachi X memory"}, 
-	{HPHW_MEMORY, 0x091, 0x00009, 0x00, "M2250 Memory"}, 
-	{HPHW_MEMORY, 0x092, 0x00009, 0x00, "M2500 Memory"}, 
-	{HPHW_MEMORY, 0x093, 0x00009, 0x00, "Sonata 440 Memory"}, 
-	{HPHW_MEMORY, 0x094, 0x00009, 0x00, "Sonata 360 Memory"}, 
-	{HPHW_MEMORY, 0x095, 0x00009, 0x00, "Rhapsody 440 Memory"}, 
-	{HPHW_MEMORY, 0x096, 0x00009, 0x00, "Rhapsody 360 Memory"}, 
-	{HPHW_MEMORY, 0x097, 0x00009, 0x00, "Raven W 360 Memory"}, 
-	{HPHW_MEMORY, 0x098, 0x00009, 0x00, "Halfdome W 440 Memory"}, 
-	{HPHW_MEMORY, 0x099, 0x00009, 0x00, "Rhapsody DC- 440 Memory"}, 
-	{HPHW_MEMORY, 0x09A, 0x00009, 0x00, "Rhapsody DC- 360 Memory"}, 
-	{HPHW_MEMORY, 0x09B, 0x00009, 0x00, "Crescendo Memory"}, 
+	{HPHW_MEMORY, 0x066, 0x00009, 0x00, "715/160 L2 Upgrade"},
 	{HPHW_OTHER, 0x004, 0x00030, 0x00, "Master"}, 
 	{HPHW_OTHER, 0x004, 0x00034, 0x00, "Slave"}, 
 	{HPHW_OTHER, 0x004, 0x00038, 0x00, "EDU"}, 
 	{HPHW_OTHER, 0x004, 0x00049, 0x00, "LGB Control"}, 
-        {0, }			/* leave the last entry empty ! */
+	{HPHW_FAULTY, 0, }  /* Special Marker for last entry */
 };
 
 
@@ -1318,7 +1195,7 @@
 	unsigned short model;
 	unsigned short mask;
 	enum cpu_type cpu;
-} hp_cpu_type_mask_list[] = {
+} hp_cpu_type_mask_list[] __initdata = {
 
 	{ 0x0000, 0x0ff0, pcx    },  /* 0x0000 - 0x000f */
 	{ 0x0048, 0x0ff0, pcxl   },  /* 0x0040 - 0x004f */
@@ -1350,8 +1227,10 @@
 	{ 0x0592, 0x0fff, pcxt_  },  /* 0x0592 - 0x0592 */
 	{ 0x0593, 0x0fff, pcxu   },  /* 0x0593 - 0x0593 */
 	{ 0x0594, 0x0ffc, pcxu   },  /* 0x0594 - 0x0597 */
-	{ 0x0598, 0x0ffc, pcxu   },  /* 0x0598 - 0x059b */
-	{ 0x059c, 0x0ffe, pcxu_  },  /* 0x059c - 0x059d */
+	{ 0x0598, 0x0ffe, pcxu_  },  /* 0x0598 - 0x0599 */
+	{ 0x059a, 0x0ffe, pcxu   },  /* 0x059a - 0x059b */
+	{ 0x059c, 0x0fff, pcxu   },  /* 0x059c - 0x059c */
+	{ 0x059d, 0x0fff, pcxu_  },  /* 0x059d - 0x059d */
 	{ 0x059e, 0x0fff, pcxt_  },  /* 0x059e - 0x059e */
 	{ 0x059f, 0x0fff, pcxu   },  /* 0x059f - 0x059f */
 	{ 0x05a0, 0x0ffe, pcxt_  },  /* 0x05a0 - 0x05a1 */
@@ -1370,7 +1249,27 @@
 	{ 0x05ba, 0x0fff, pcxu_  },  /* 0x05ba - 0x05ba */
 	{ 0x05bb, 0x0fff, pcxw   },  /* 0x05bb - 0x05bb */
 	{ 0x05bc, 0x0ffc, pcxw   },  /* 0x05bc - 0x05bf */
-	{ 0x05c0, 0x0fc0, pcxw   },  /* 0x05c0 - 0x05ff */
+	{ 0x05c0, 0x0ffc, pcxw 	 },  /* 0x05c0 - 0x05c3 */
+	{ 0x05c4, 0x0ffe, pcxw 	 },  /* 0x05c4 - 0x05c5 */
+	{ 0x05c6, 0x0fff, pcxw 	 },  /* 0x05c6 - 0x05c6 */
+	{ 0x05c7, 0x0fff, pcxw_  },  /* 0x05c7 - 0x05c7 */
+	{ 0x05c8, 0x0ffc, pcxw 	 },  /* 0x05c8 - 0x05cb */
+	{ 0x05cc, 0x0ffe, pcxw 	 },  /* 0x05cc - 0x05cd */
+	{ 0x05ce, 0x0ffe, pcxw_  },  /* 0x05ce - 0x05cf */
+	{ 0x05d0, 0x0ffc, pcxw_  },  /* 0x05d0 - 0x05d3 */
+	{ 0x05d4, 0x0ffe, pcxw_  },  /* 0x05d4 - 0x05d5 */
+	{ 0x05d6, 0x0fff, pcxw 	 },  /* 0x05d6 - 0x05d6 */
+	{ 0x05d7, 0x0fff, pcxw_  },  /* 0x05d7 - 0x05d7 */
+	{ 0x05d8, 0x0ffc, pcxw_  },  /* 0x05d8 - 0x05db */
+	{ 0x05dc, 0x0ffe, pcxw2  },  /* 0x05dc - 0x05dd */
+	{ 0x05de, 0x0fff, pcxw_  },  /* 0x05de - 0x05de */
+	{ 0x05df, 0x0fff, pcxw2  },  /* 0x05df - 0x05df */
+	{ 0x05e0, 0x0ffc, pcxw2  },  /* 0x05e0 - 0x05e3 */
+	{ 0x05e4, 0x0fff, pcxw2  },  /* 0x05e4 - 0x05e4 */
+	{ 0x05e5, 0x0fff, pcxw_  },  /* 0x05e5 - 0x05e5 */
+	{ 0x05e6, 0x0ffe, pcxw2  },  /* 0x05e6 - 0x05e7 */
+	{ 0x05e8, 0x0ff8, pcxw2  },  /* 0x05e8 - 0x05ef */
+	{ 0x05f0, 0x0ff0, pcxw2  },  /* 0x05f0 - 0x05ff */
 	{ 0x0600, 0x0ff0, pcxl   },  /* 0x0600 - 0x060f */
 	{ 0x0610, 0x0ff0, pcxl   },  /* 0x0610 - 0x061f */
 	{ 0x0000, 0x0000, pcx    }	/* terminate table */
@@ -1386,36 +1285,51 @@
 	[pcxu]	{ "PA8000 (PCX-U)",	"2.0" },
 	[pcxu_]	{ "PA8200 (PCX-U+)",	"2.0" },
 	[pcxw]	{ "PA8500 (PCX-W)",	"2.0" },
-	[pcxw_]	{ "PA8600 (PCX-W+)",	"2.0" }
+	[pcxw_]	{ "PA8600 (PCX-W+)",	"2.0" },
+	[pcxw2]	{ "PA8700 (PCX-W2)",	"2.0" }
 };
 
-char *parisc_getHWtype(unsigned short hw_type)
-{
-	if (hw_type <= HPHW_CIO) {
-		return hw_type_name[hw_type];
-	} else {
-		return "Unknown Type";
-	}
-}
-
-char *parisc_getHWdescription(unsigned short hw_type, unsigned long hversion,
-		unsigned long sversion)
+const char * __init
+parisc_hardware_description(struct parisc_device_id *id)
 {
 	struct hp_hardware *listptr;
 	
-	for (listptr = hp_hardware_list; listptr->name; listptr++) {
-		if ((listptr->hw_type==hw_type) &&
-				(listptr->hversion==hversion) &&
-				(listptr->sversion==sversion)){
+	for (listptr = hp_hardware_list; listptr->hw_type != HPHW_FAULTY; listptr++) {
+		if ((listptr->hw_type == id->hw_type) &&
+				(listptr->hversion == id->hversion) &&
+				(listptr->sversion == id->sversion)){
 			return listptr->name;
 		}
 	}
+
+	/*
+	 * ok, the above hardware table isn't complete, and we haven't found
+	 * our device in this table. So let's now try to find a generic name
+	 * to describe the given hardware...
+	 */
+	switch (id->hw_type) {
+		case HPHW_NPROC:
+			return "Unknown machine";
+
+		case HPHW_A_DIRECT:
+			switch (id->sversion) {
+				case 0x0D: return "MUX port";
+				case 0x0E: return "RS-232 port";
+			}
+			break;
+			
+		case HPHW_MEMORY:
+			return "Memory";
+			
+	}
+	
 	return "unknown device";
 }
 
 
 /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
-enum cpu_type parisc_get_cpu_type(unsigned long hversion)
+enum cpu_type __init
+parisc_get_cpu_type(unsigned long hversion)
 {
 	struct hp_cpu_type_mask *ptr;
 	unsigned short model = ((unsigned short) (hversion)) >> 4;
@@ -1424,23 +1338,8 @@
 		if (ptr->model == (model & ptr->mask))
 			return ptr->cpu;
 	}
-	panic("parisc_get_cpu_type() could not identify CPU type\n");
+	panic("could not identify CPU type\n");
 
 	return pcx;	/* not reached: */
 }
 
-
-struct hp_hardware *parisc_get_reference(unsigned short hw_type,
-		unsigned long hversion, unsigned long sversion)
-{
-	struct hp_hardware *listptr = hp_hardware_list;
-
-	for (listptr = hp_hardware_list; listptr->name; listptr++) {
-		if ((listptr->hw_type == hw_type) &&
-				(listptr->hversion == hversion) &&
-				(listptr->sversion == sversion)) {
-			return listptr;
-		}
-	}
-	return NULL;
-}
diff -Nru a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
--- a/arch/parisc/kernel/head.S	Wed Oct 30 16:44:32 2002
+++ b/arch/parisc/kernel/head.S	Wed Oct 30 16:44:32 2002
@@ -8,17 +8,14 @@
  * Copyright 1999 SuSE GmbH (Philipp Rumpf)
  * Copyright 1999 Philipp Rumpf (prumpf@tux.org)
  *
- * Initial Version 04-23-1999 by Helge Deller (helge.deller@ruhr-uni-bochum.de)
+ * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de>
  */
 
+#include <linux/autoconf.h>	/* for CONFIG_SMP */
 
-#include <asm/offset.h>
+#include <asm/offsets.h>
 #include <asm/psw.h>
 
-#define __ASSEMBLY__
-/*********
-#include <asm/pdc.h>
-*********/
 #include <asm/assembly.h>
 #include <asm/pgtable.h>
 
@@ -36,9 +33,18 @@
 	.export __setup_end
 __setup_end:
 
+	.data
+
+	.export boot_args
+boot_args:
+	.word 0 /* arg0 */
+	.word 0 /* arg1 */
+	.word 0 /* arg2 */
+	.word 0 /* arg3 */
+
 	.text
 	.align	4	
-	.import init_task_union,data
+	.import init_thread_union,data
 	.import	$global$		/* forward declaration */
 	.import fault_vector_11,code	/* IVA parisc 1.1 32 bit */
 	.import fault_vector_20,code	/* IVA parisc 2.0 32 bit */
@@ -52,43 +58,129 @@
 	.callinfo
 
 	/* Make sure sr4-sr7 are set to zero for the kernel address space */
-
-	mtsp		%r0,%sr4
-	mtsp		%r0,%sr5
-	mtsp		%r0,%sr6
-	mtsp		%r0,%sr7
+	mtsp	%r0,%sr4
+	mtsp	%r0,%sr5
+	mtsp	%r0,%sr6
+	mtsp	%r0,%sr7
+
+	/* Clear BSS (shouldn't the boot loader do this?) */
+
+	.import _edata,data
+	.import _end,data
+
+	ldil            L%PA(_edata),%r3
+	ldo             R%PA(_edata)(%r3),%r3
+	ldil            L%PA(_end),%r4
+	ldo             R%PA(_end)(%r4),%r4
+$bss_loop:
+	cmpb,<<,n       %r3,%r4,$bss_loop
+	stb,ma          %r0,1(%r3)
+
+	/* Save away the arguments the boot loader passed in (32 bit args) */
+
+	ldil            L%PA(boot_args),%r1
+	ldo             R%PA(boot_args)(%r1),%r1
+	stw,ma          %arg0,4(%r1)
+	stw,ma          %arg1,4(%r1)
+	stw,ma          %arg2,4(%r1)
+	stw,ma          %arg3,4(%r1)
 
 	/* Initialize startup VM. Just map first 8 MB of memory */
-
 	ldil		L%PA(pg0),%r1
 	ldo		R%PA(pg0)(%r1),%r1
 	ldo		_PAGE_TABLE(%r1),%r3
+
 	ldil		L%PA(swapper_pg_dir),%r4
 	ldo		R%PA(swapper_pg_dir)(%r4),%r4
 	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
 	mtctl		%r4,%cr25	/* Initialize user root pointer */
-	stw		%r3,0xc00(%r4)	/* Hardwired 0xc0000000 kernel vaddr start */
+
+#if (__PAGE_OFFSET != 0x10000000UL)
+Error! Code below (the next two stw's) needs to be changed
+#endif
+
+	stw             %r3,0x100(%r4)  /* Hardwired 0x1... kernel Vaddr start*/
 	ldo		0x1000(%r3),%r3
-	stw		%r3,0xc04(%r4)
-	ldo		_PAGE_KERNEL(%r0),%r3 /* Hardwired 0x0 phys addr start */
+	stw             %r3,0x104(%r4)
+	ldo		_PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */
 $pgt_fill_loop:
 	stwm		%r3,4(%r1)
 	ldo		0x1000(%r3),%r3
 	bb,>=		%r3,8,$pgt_fill_loop
 	nop
 
+
+	/* Load the return address...er...crash 'n burn */
+	copy		%r0,%r2
+
+	/* And the RFI Target address too */
+	ldil            L%start_kernel,%r11
+	ldo             R%start_kernel(%r11),%r11
+
+	/* And the initial task pointer */
+
+	ldil            L%init_thread_union,%r6
+	ldo             R%init_thread_union(%r6),%r6
+	mtctl           %r6,%cr30
+
+	/* And the stack pointer too */
+
+	ldo             THREAD_SZ_ALGN(%r6),%sp
+
+	/* And the interrupt stack */
+
+	ldil            L%interrupt_stack,%r6
+	ldo             R%interrupt_stack(%r6),%r6
+	mtctl           %r6,%cr31
+
+#ifdef CONFIG_SMP
+	/* Set the smp rendevous address into page zero.
+	** It would be safer to do this in init_smp_config() but
+	** it's just way easier to deal with here because
+	** of 64-bit function ptrs and the address is local to this file.
+	*/
+	ldil		L%PA(smp_slave_stext),%r10
+	ldo		R%PA(smp_slave_stext)(%r10),%r10
+	stw		%r10,0x10(%r0)	/* MEM_RENDEZ */
+	stw		%r0,0x28(%r0)	/* MEM_RENDEZ_HI - assume addr < 4GB */
+
+	/* FALLTHROUGH */
+	.procend
+
+	/*
+	** Code Common to both Monarch and Slave processors.
+	** Entry:
+	**    %r11 must contain RFI target address.
+	**    %r25/%r26 args to pass to target function
+	**    %r2  in case rfi target decides it didn't like something
+	**
+	** Caller must init: SR4-7, %sp, %r10, %cr24/25, 
+	*/
+common_stext:
+	.proc
+	.callinfo
+#else
+	/* Clear PDC entry point - we won't use it */
+	stw		%r0,0x10(%r0)	/* MEM_RENDEZ */
+	stw		%r0,0x28(%r0)	/* MEM_RENDEZ_HI */
+#endif
+
+	/* PARANOID: clear user scratch/user space SR's */
+	mtsp	%r0,%sr0
+	mtsp	%r0,%sr1
+	mtsp	%r0,%sr2
+	mtsp	%r0,%sr3
+
+	/* Initialize Protection Registers */
+	mtctl	%r0,%cr8
+	mtctl	%r0,%cr9
+	mtctl	%r0,%cr12
+	mtctl	%r0,%cr13
+
 	/* Initialize the global data pointer */
 	ldil		L%$global$,%dp
 	ldo		R%$global$(%dp),%dp
-	
-	/* And the stack pointer, physical too */
-	ldil		L%init_task_union+TASK_SZ_ALGN,%sp
-	ldo		R%init_task_union+TASK_SZ_ALGN(%sp),%sp
-
-	/* we need this to take interruptions directly after the rfi below */
-	/* (which we need for PA2.0 boxes) */
-	mtctl		%r0, %cr30
-	
+
 	/*
 	 * Set up our interrupt table.  HPMCs might not work after this! 
 	 *
@@ -96,7 +188,6 @@
 	 * following short sequence of instructions can determine this
 	 * (without being illegal on a PA1.1 machine).
 	 */
-	
 	ldi		32,%r10
 	mtctl		%r10,%cr11
 	.level 2.0
@@ -114,36 +205,101 @@
 $install_iva:
 	mtctl		%r10,%cr14
 
-	/* Disable (most) interruptions */
-	mtsm		%r0			
-	
+	/* Disable Q bit so we can load the iia queue */
+	rsm            PSW_SM_Q,%r0
+
 	/* kernel PSW:
-	 *  - no interruptions except for HPMC and TOC (which are handled by PDC)
+	 *  - no interruptions except HPMC and TOC (which are handled by PDC)
 	 *  - Q bit set (IODC / PDC interruptions)
 	 *  - big-endian
 	 *  - virtually mapped
 	 */
-
 	ldil		L%KERNEL_PSW,%r10
 	ldo		R%KERNEL_PSW(%r10),%r10
 	mtctl		%r10,%ipsw
-	
-	/* Set the space pointers for the post-RFI world */
-	mtctl		%r0,%cr17		/* Clear two-level IIA Space Queue */
-	mtctl		%r0,%cr17		/*    effectively setting kernel space. */
-
-	/* And the return address(es) too */
-	ldil		L%start_parisc,%r10
-	ldo		R%start_parisc(%r10),%r10
-	mtctl		%r10,%cr18
-	ldo		4(%r10),%r10
-	mtctl		%r10,%cr18
+
+	/* Set the space pointers for the post-RFI world
+	** Clear the two-level IIA Space Queue, effectively setting
+	** Kernel space.
+	*/
+	mtctl		%r0,%cr17
+	mtctl		%r0,%cr17
+
+	/* Load RFI target into PC queue */
+	mtctl		%r11,%cr18
+	ldo		4(%r11),%r11
+	mtctl		%r11,%cr18
 
 	/* Jump to hyperspace */
 	rfi
 	nop
 
 	.procend
+
+#ifdef CONFIG_SMP
+
+	.import smp_init_current_idle_task,data
+	.import	smp_callin,code
+
+smp_callin_rtn:
+        .proc
+	.callinfo
+	break	1,1		/*  Break if returned from start_secondary */
+	nop
+	nop
+        .procend
+
+/***************************************************************************
+*
+* smp_slave_stext is executed by all non-monarch Processors when the Monarch
+* pokes the slave CPUs in smp.c:smp_boot_cpus().
+*
+* Once here, registers values are initialized in order to branch to virtual
+* mode. Once all available/eligible CPUs are in virtual mode, all are
+* released and start out by executing their own idle task.
+*****************************************************************************/
+
+
+smp_slave_stext:
+        .proc
+	.callinfo
+
+	/*
+	** Initialize Space registers
+	*/
+	mtsp	   %r0,%sr4
+	mtsp	   %r0,%sr5
+	mtsp	   %r0,%sr6
+	mtsp	   %r0,%sr7
+
+	/*  Initialize the SP - monarch sets up smp_init_current_idle_task */
+	ldil		L%PA(smp_init_current_idle_task),%sp
+	ldo		R%PA(smp_init_current_idle_task)(%sp),%sp
+	ldw		0(%sp),%sp	/* load task address */
+	mtctl           %sp,%cr30       /* store in cr30 */
+	addil		L%TASK_SZ_ALGN,%sp	/* stack is above task */
+	ldo		R%TASK_SZ_ALGN(%r1),%sp
+
+	/* point CPU to kernel page tables */
+	ldil		L%PA(swapper_pg_dir),%r4
+	ldo		R%PA(swapper_pg_dir)(%r4),%r4
+	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
+	mtctl		%r4,%cr25	/* Initialize user root pointer */
+
+	/* Load RFI *return* address in case smp_callin bails */
+	ldil		L%smp_callin_rtn,%r2
+	ldo		R%smp_callin_rtn(%r2),%r2
+
+	/* Load RFI target address.  */
+	ldil		L%smp_callin,%r11
+	ldo		R%smp_callin(%r11),%r11
+	
+	/* ok...common code can handle the rest */
+	b		common_stext
+	nop
+
+	.procend
+#endif /* CONFIG_SMP */
 
 	.data
 
diff -Nru a/arch/parisc/kernel/head64.S b/arch/parisc/kernel/head64.S
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/head64.S	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,333 @@
+/*
+ *
+ * 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 by Helge Deller
+ * Copyright 1999 SuSE GmbH (Philipp Rumpf)
+ * Copyright 1999 Philipp Rumpf (prumpf@tux.org)
+ * Copyright 2000 Hewlett Packard (Paul Bame, bame@puffin.external.hp.com)
+ * Copyright (C) 2001 Grant Grundler (Hewlett Packard)
+ *
+ * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de>
+ */
+
+
+#include <linux/autoconf.h>	/* for CONFIG_SMP */
+
+#include <asm/offsets.h>
+#include <asm/psw.h>
+
+#include <asm/assembly.h>
+#include <asm/pgtable.h>
+#include <asm/pdc.h>		/* for PDC_PSW defines */
+
+
+	.level 2.0w
+
+	.section	.initcall.init
+	.align		4
+	.export __initcall_start
+__initcall_start:
+	.export __initcall_end
+__initcall_end:
+	.export __setup_start
+__setup_start:
+	.export __setup_end
+__setup_end:
+
+	.data
+
+	.export boot_args
+boot_args:
+	.word 0 /* arg0 */
+	.word 0 /* arg1 */
+	.word 0 /* arg2 */
+	.word 0 /* arg3 */
+
+	.text
+	.align	4	
+
+	.export stext
+	.export _stext,data		/* Kernel want it this way! */
+_stext:
+stext:
+	.proc
+	.callinfo
+
+	/* Make sure sr4-sr7 are set to zero for the kernel address space */
+	mtsp	%r0,%sr4
+	mtsp	%r0,%sr5
+	mtsp	%r0,%sr6
+	mtsp	%r0,%sr7
+
+	/* Clear BSS (shouldn't the boot loader do this?) */
+
+	.import _edata,data
+	.import _end,data
+
+	ldil            L%PA(_edata),%r3
+	ldo             R%PA(_edata)(%r3),%r3
+	ldil            L%PA(_end),%r4
+	ldo             R%PA(_end)(%r4),%r4
+$bss_loop:
+	cmpb,<<,n       %r3,%r4,$bss_loop
+	stb,ma          %r0,1(%r3)
+
+	/* Save away the arguments the boot loader passed in (32 bit args) */
+
+	ldil            L%PA(boot_args),%r1
+	ldo             R%PA(boot_args)(%r1),%r1
+	stw,ma          %arg0,4(%r1)
+	stw,ma          %arg1,4(%r1)
+	stw,ma          %arg2,4(%r1)
+	stw,ma          %arg3,4(%r1)
+
+	/* Initialize startup VM. Just map first 8 MB of memory */
+
+	ldil		L%PA(pg0),%r1
+	ldo		R%PA(pg0)(%r1),%r1
+
+	ldil		L%PA(pmd0),%r5
+	ldo		R%PA(pmd0)(%r5),%r5
+	ldo		_PAGE_TABLE(%r5),%r3
+
+	ldil		L%PA(swapper_pg_dir),%r4
+	ldo		R%PA(swapper_pg_dir)(%r4),%r4
+
+	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
+	mtctl		%r4,%cr25	/* Initialize user root pointer */
+
+#if (__PAGE_OFFSET != 0x10000000UL)
+Error! Code below (the next five std's) needs to be changed
+#endif
+
+	std             %r3,0x00(%r4)   /* Hardwired 0x1... kernel Vaddr start*/
+
+	ldo		_PAGE_TABLE(%r1),%r3
+	std             %r3,0x400(%r5)  /* Hardwired 0x1... kernel Vaddr start*/
+	ldo		0x1000(%r3),%r3
+	std             %r3,0x408(%r5)
+	ldo		0x1000(%r3),%r3
+	std             %r3,0x410(%r5)
+	ldo		0x1000(%r3),%r3
+	std             %r3,0x418(%r5)
+
+	ldo		_PAGE_KERNEL(%r0),%r3 /* Hardwired 0 phys addr start */
+$pgt_fill_loop:
+	std,ma		%r3,8(%r1)
+	ldo		0x1000(%r3),%r3
+	bb,>=		%r3,8,$pgt_fill_loop
+	nop
+
+	/* And the RFI Target address too */
+	load32          start_kernel, %r11
+
+	/* And the stack pointer too */
+	load32		PA(init_thread_union+THREAD_SZ_ALGN),%sp
+
+	/* And the initial task pointer */
+
+	load32          init_thread_union,%r6
+	mtctl           %r6,%cr30
+
+	/* And the interrupt stack */
+
+	load32          interrupt_stack,%r6
+	mtctl           %r6,%cr31
+
+	/* Act like PDC just called us - that's how slave CPUs enter */
+#define MEM_PDC_LO 0x388
+#define MEM_PDC_HI 0x35C
+	ldw		MEM_PDC_LO(%r0),%r3
+	ldw		MEM_PDC_HI(%r0),%r6
+	depd		%r6, 31, 32, %r3	/* move to upper word */
+
+#ifdef CONFIG_SMP
+	/* Set the smp rendevous address into page zero.
+	** It would be safer to do this in init_smp_config() but
+	** it's just way easier to deal with here because
+	** of 64-bit function ptrs and the address is local to this file.
+	*/
+	ldil		L%PA(smp_slave_stext),%r10
+	ldo		R%PA(smp_slave_stext)(%r10),%r10
+	stw		%r10,0x10(%r0)	/* MEM_RENDEZ */
+	stw		%r0,0x28(%r0)	/* MEM_RENDEZ_HI - assume addr < 4GB */
+
+	/* FALLTHROUGH */
+	.procend
+
+	/*
+	** Code Common to both Monarch and Slave processors.
+	** Entry:
+	**    %r3	PDCE_PROC address
+	**    %r11	RFI target address.
+	**
+	** Caller must init: SR4-7, %sp, %r10, %cr24/25, 
+	*/
+common_stext:
+	.proc
+	.callinfo
+#else /* CONFIG_SMP */
+	/* Clear PDC's CPU handoff address - we won't use it */
+	stw		%r0,0x10(%r0)	/* MEM_RENDEZ */
+	stw		%r0,0x28(%r0)	/* MEM_RENDEZ_HI */
+#endif /* CONFIG_SMP */
+
+	/* Save the rfi target address */
+	std		%r11,  TASK_PT_GR11-TASK_SZ_ALGN(%sp)
+
+#ifndef CONFIG_PDC_NARROW
+	/* Switch to wide mode; Superdome doesn't support narrow PDC
+	** calls.
+	*/
+1:	mfia		%rp		/* clear upper part of pcoq */
+	ldo		2f-1b(%rp),%rp
+	depdi		0,31,32,%rp
+	bv		(%rp)
+	ssm		PSW_SM_W,%r0
+2:
+#endif /* CONFIG_PDC_NARROW */
+
+	/* Set Wide mode as the "Default" (eg for traps)
+	** First trap occurs *right* after (or part of) rfi for slave CPUs.
+	** Someday, palo might not do this for the Monarch either.
+	*/
+
+	ldo		PDC_PSW(%r0),%arg0		/* 21 */
+	ldo		PDC_PSW_SET_DEFAULTS(%r0),%arg1	/* 2 */
+	ldo		PDC_PSW_WIDE_BIT(%r0),%arg2	/* 2 */
+
+	load32		PA(stext_pdc_ret), %rp
+
+	bv		(%r3)
+	copy		%r0,%arg3
+
+stext_pdc_ret:
+	/* restore rfi target address*/
+	ldd		TASK_PT_GR11-TASK_SZ_ALGN(%sp), %r11
+
+	/* PARANOID: clear user scratch/user space SR's */
+	mtsp	%r0,%sr0
+	mtsp	%r0,%sr1
+	mtsp	%r0,%sr2
+	mtsp	%r0,%sr3
+
+	/* Initialize Protection Registers */
+	mtctl	%r0,%cr8
+	mtctl	%r0,%cr9
+	mtctl	%r0,%cr12
+	mtctl	%r0,%cr13
+
+	/* Prepare to RFI! Man all the cannons! */
+	tovirt_r1       %sp
+
+	/* Initialize the global data pointer */
+	load32		__gp,%dp
+
+	/* Set up our interrupt table.  HPMCs might not work after this! */
+	ldil		L%PA(fault_vector_20),%r10
+	ldo		R%PA(fault_vector_20)(%r10),%r10
+	mtctl		%r10,%cr14
+
+	b		aligned_rfi
+	nop
+
+	/* the magic spell */
+	.align          256
+aligned_rfi:
+	ssm		0,0
+	nop		/* 1 */
+	nop		/* 2 */
+	nop		/* 3 */
+	nop		/* 4 */
+	nop		/* 5 */
+	nop		/* 6 */
+	nop		/* 7 */
+	nop		/* 8 */
+
+	/* turn off troublesome PSW bits */
+	rsm		PSW_Q+PSW_I+PSW_D+PSW_P+PSW_R, %r0
+
+	/* kernel PSW:
+	 *  - no interruptions except HPMC and TOC (which are handled by PDC)
+	 *  - Q bit set (IODC / PDC interruptions)
+	 *  - big-endian
+	 *  - virtually mapped
+	 */
+	load32		KERNEL_PSW,%r10
+	mtctl		%r10,%ipsw
+
+	/* Set the space pointers for the post-RFI world
+	** Clear the two-level IIA Space Queue, effectively setting
+	** Kernel space.
+	*/
+	mtctl		%r0,%cr17
+	mtctl		%r0,%cr17
+
+	/* Load RFI target into PC queue */
+	mtctl		%r11,%cr18
+	ldo		4(%r11),%r11
+	mtctl		%r11,%cr18
+
+	/* Jump to hyperspace */
+	rfi
+	nop
+
+	.procend
+
+
+#ifdef CONFIG_SMP
+
+	.import smp_init_current_idle_task,data
+	.import	smp_callin,code
+
+/***************************************************************************
+*
+* smp_slave_stext is executed by all non-monarch Processors when the Monarch
+* pokes the slave CPUs in smp.c:smp_boot_cpus().
+*
+* Once here, registers values are initialized in order to branch to virtual
+* mode. Once all available/eligible CPUs are in virtual mode, all are
+* released and start out by executing their own idle task.
+*****************************************************************************/
+
+
+smp_slave_stext:
+        .proc
+	.callinfo
+
+	/*
+	** Initialize Space registers
+	*/
+	mtsp	   %r0,%sr4
+	mtsp	   %r0,%sr5
+	mtsp	   %r0,%sr6
+	mtsp	   %r0,%sr7
+
+	/*  Initialize the SP - monarch sets up smp_init_current_idle_task */
+	load32		PA(smp_init_current_idle_task),%sp
+	ldd		0(%sp),%sp	/* load task address */
+	mtctl           %sp,%cr30       /* store in cr30 */
+	ldo             TASK_SZ_ALGN(%sp),%sp
+	tophys_r1       %sp
+
+	/* point CPU to kernel page tables */
+	load32		PA(swapper_pg_dir),%r4
+	mtctl		%r4,%cr24	/* Initialize kernel root pointer */
+	mtctl		%r4,%cr25	/* Initialize user root pointer */
+
+	/* Setup PDCE_PROC entry */
+	copy		%arg0,%r3
+
+	/* Load RFI target address.  */
+	load32		smp_callin, %r11
+	
+	/* ok...common code can handle the rest */
+	b		common_stext
+	nop
+
+	.procend
+#endif /* CONFIG_SMP */
+
diff -Nru a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
--- a/arch/parisc/kernel/hpmc.S	Wed Oct 30 16:44:32 2002
+++ b/arch/parisc/kernel/hpmc.S	Wed Oct 30 16:44:32 2002
@@ -43,7 +43,6 @@
 	.level		1.1
 	.data
 
-#define __ASSEMBLY__
 #include <asm/assembly.h>
 #include <asm/pdc.h>
 
@@ -262,12 +261,10 @@
 	mtsp	%r0, %sr6
 	mtsp	%r0, %sr7
 
-	tovirt  %r30        /* make sp virtual */
+	tovirt_r1 %r30      /* make sp virtual */
 
 	rsm 8,%r0           /* Clear Q bit */
-	ldi     1,%r1
-	mtctl   %r1,%cr29   /* Set trap code to "1" for HPMC */
-	mtctl   %r0,%cr30   /* Force interruptions to use hpmc stack */
+	ldi     1,%r8       /* Set trap code to "1" for HPMC */
 	ldil    L%PA(intr_save), %r1
 	ldo     R%PA(intr_save)(%r1), %r1
 	be      0(%sr7,%r1)
diff -Nru a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
--- a/arch/parisc/kernel/init_task.c	Wed Oct 30 16:44:17 2002
+++ b/arch/parisc/kernel/init_task.c	Wed Oct 30 16:44:17 2002
@@ -9,7 +9,7 @@
 
 static struct fs_struct init_fs = INIT_FS;
 static struct files_struct init_files = INIT_FILES;
-static struct signal_struct init_signals = INIT_SIGNALS;
+static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 struct mm_struct init_mm = INIT_MM(init_mm);
 
 /*
@@ -19,11 +19,21 @@
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union task_union init_task_union 
-	__attribute__((section("init_task"), aligned(4096))) = { INIT_TASK(init_task_union.task) };
+unsigned char interrupt_stack[ISTACK_SIZE] __attribute__ ((section("init_istack"), aligned(4096)));
+union thread_union init_thread_union
+	__attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) =
+		{ INIT_THREAD_INFO(init_task) };
 
-unsigned long swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((aligned(4096))) = { 0, };
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((aligned(4096))) = { {0}, };
 #ifdef __LP64__
 unsigned long pmd0[PTRS_PER_PMD] __attribute__ ((aligned(4096))) = { 0, };
 #endif
 unsigned long pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((aligned(4096))) = { 0, };
+
+/*
+ * Initial task structure.
+ *
+ * All other task structs will be allocated on slabs in fork.c
+ */
+__asm__(".data");
+struct task_struct init_task = INIT_TASK(init_task);
diff -Nru a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c
--- a/arch/parisc/kernel/inventory.c	Wed Oct 30 16:44:20 2002
+++ b/arch/parisc/kernel/inventory.c	Wed Oct 30 16:44:20 2002
@@ -1,40 +1,157 @@
-
-/* Copyright (c) 1999 The Puffin Group */
-/* Written by David Kennedy and Alex deVries */
+/*
+ * inventory.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.
+ *
+ * Copyright (c) 1999 The Puffin Group (David Kennedy and Alex deVries)
+ * Copyright (c) 2001 Matthew Wilcox for Hewlett-Packard
+ *
+ * These are the routines to discover what hardware exists in this box.
+ * This task is complicated by there being 3 different ways of
+ * performing an inventory, depending largely on the age of the box.
+ * The recommended way to do this is to check to see whether the machine
+ * is a `Snake' first, then try System Map, then try PAT.  We try System
+ * Map before checking for a Snake -- this probably doesn't cause any
+ * problems, but...
+ */
 
 #include <linux/types.h>
 #include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/pdc.h>
+#include <asm/processor.h>
+#include <asm/page.h>
 
 /*
 ** Debug options
-**    DEBUG_PAT	Dump details which PDC PAT provides about ranges/devices.
+** DEBUG_PAT Dump details which PDC PAT provides about ranges/devices.
 */
 #undef DEBUG_PAT
 
-extern char *parisc_getHWtype(unsigned short hw_type);
+int pdc_type = PDC_TYPE_ILLEGAL;
+
+void __init setup_pdc(void)
+{
+	long status;
+	unsigned int bus_id;
+	struct pdc_system_map_mod_info module_result;
+	struct pdc_module_path module_path;
+	struct pdc_model model;
+#ifdef __LP64__
+	struct pdc_pat_cell_num cell_info;
+#endif
 
-extern struct hp_device * register_module(void *hpa);
-extern void print_devices(char * buf);
+	/* Determine the pdc "type" used on this machine */
 
+	printk(KERN_INFO "Determining PDC firmware type: ");
 
-int pdc_hpa_processor(void *address);
+	status = pdc_system_map_find_mods(&module_result, &module_path, 0);
+	if (status == PDC_OK) {
+		pdc_type = PDC_TYPE_SYSTEM_MAP;
+		printk("System Map.\n");
+		return;
+	}
 
-#ifndef __LP64__ 
-static	u8 iodc_data[32] __attribute__ ((aligned (64)));
-static	struct pdc_model model __attribute__ ((aligned (8)));
+	/*
+	 * If the machine doesn't support PDC_SYSTEM_MAP then either it
+	 * is a pdc pat box, or it is an older box. All 64 bit capable
+	 * machines are either pdc pat boxes or they support PDC_SYSTEM_MAP.
+	 */
+
+	/*
+	 * TODO: We should test for 64 bit capability and give a
+	 * clearer message.
+	 */
+
+#ifdef __LP64__
+	status = pdc_pat_cell_get_number(&cell_info);
+	if (status == PDC_OK) {
+		pdc_type = PDC_TYPE_PAT;
+		printk("64 bit PAT.\n");
+		return;
+	}
 #endif
-static	unsigned long pdc_result[32] __attribute__ ((aligned (8))) = {0,0,0,0};
-static	struct pdc_hpa processor_hpa __attribute__ ((aligned (8)));
-static	struct pdc_system_map module_result __attribute__ ((aligned (8)));
-static	struct pdc_module_path module_path __attribute__ ((aligned (8)));
+
+	/* Check the CPU's bus ID.  There's probably a better test.  */
+
+	status = pdc_model_info(&model);
+
+	bus_id = (model.hversion >> (4 + 7)) & 0x1f;
+
+	switch (bus_id) {
+	case 0x4:		/* 720, 730, 750, 735, 755 */
+	case 0x6:		/* 705, 710 */
+	case 0x7:		/* 715, 725 */
+	case 0x8:		/* 745, 747, 742 */
+	case 0xA:		/* 712 and similiar */
+	case 0xC:		/* 715/64, at least */
+
+		pdc_type = PDC_TYPE_SNAKE;
+		printk("Snake.\n");
+		return;
+
+	default:		/* Everything else */
+
+		printk("Unsupported.\n");
+		panic("If this is a 64-bit machine, please try a 64-bit kernel.\n");
+	}
+}
+
+#define PDC_PAGE_ADJ_SHIFT (PAGE_SHIFT - 12) /* pdc pages are always 4k */
+
+static void __init
+set_pmem_entry(physmem_range_t *pmem_ptr, unsigned long start,
+	       unsigned long pages4k)
+{
+	/* Rather than aligning and potentially throwing away
+	 * memory, we'll assume that any ranges are already
+	 * nicely aligned with any reasonable page size, and
+	 * panic if they are not (it's more likely that the
+	 * pdc info is bad in this case).
+	 */
+
+	if (   ((start & (PAGE_SIZE - 1)) != 0)
+	    || ((pages4k & ((1UL << PDC_PAGE_ADJ_SHIFT) - 1)) != 0) ) {
+
+		panic("Memory range doesn't align with page size!\n");
+	}
+
+	pmem_ptr->start_pfn = (start >> PAGE_SHIFT);
+	pmem_ptr->pages = (pages4k >> PDC_PAGE_ADJ_SHIFT);
+}
+
+static void __init pagezero_memconfig(void)
+{
+	unsigned long npages;
+
+	/* Use the 32 bit information from page zero to create a single
+	 * entry in the pmem_ranges[] table.
+	 *
+	 * We currently don't support machines with contiguous memory
+	 * >= 4 Gb, who report that memory using 64 bit only fields
+	 * on page zero. It's not worth doing until it can be tested,
+	 * and it is not clear we can support those machines for other
+	 * reasons.
+	 *
+	 * If that support is done in the future, this is where it
+	 * should be done.
+	 */
+
+	npages = (PAGE_ALIGN(PAGE0->imm_max_mem) >> PAGE_SHIFT);
+	set_pmem_entry(pmem_ranges,0UL,npages);
+	npmem_ranges = 1;
+}
 
 #ifdef __LP64__
-#include <asm/pdcpat.h>
 
-int pdc_pat = 0;
+/* All of the PDC PAT specific code is 64-bit only */
 
 /*
 **  The module object is filled via PDC_PAT_CELL[Return Cell Module].
@@ -47,30 +164,36 @@
 **
 */
 
-static int
-pat_query_module( ulong pcell_loc, ulong mod_index)
+static int __init 
+pat_query_module(ulong pcell_loc, ulong mod_index)
 {
-	extern int num_devices;
-	extern struct hp_device devices[];
-
 	pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;
-        struct hp_device * dev = &devices[num_devices];
-	uint64_t temp;             /* 64-bit scratch value */
-	long status;               /* PDC return value status */
+	unsigned long bytecnt;
+	unsigned long temp;	/* 64-bit scratch value */
+	long status;		/* PDC return value status */
+	struct parisc_device *dev;
 
 	/* return cell module (PA or Processor view) */
-	status = pdc_pat_cell_module(& pdc_result, pcell_loc, mod_index,
-		PA_VIEW, & pa_pdc_cell);
+	status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
+				     PA_VIEW, &pa_pdc_cell);
 
-	if (status != PDC_RET_OK) {
+	if (status != PDC_OK) {
 		/* no more cell modules or error */
 		return status;
 	}
 
+	temp = pa_pdc_cell.cba;
+	dev = alloc_pa_dev(PAT_GET_CBA(temp), &pa_pdc_cell.mod_path);
+	if (!dev) {
+		return PDC_NE_MOD;
+	}
+
+	/* alloc_pa_dev sets dev->hpa */
+
 	/*
-	** save parameters in the hp_device
+	** save parameters in the parisc_device
 	** (The idea being the device driver will call pdc_pat_cell_module()
-	** and store the results in it's own data structure.)
+	** and store the results in its own data structure.)
 	*/
 	dev->pcell_loc = pcell_loc;
 	dev->mod_index = mod_index;
@@ -79,319 +202,411 @@
 	/* REVISIT: who is the consumer of this? not sure yet... */
 	dev->mod_info = pa_pdc_cell.mod_info;	/* pass to PAT_GET_ENTITY() */
 	dev->pmod_loc = pa_pdc_cell.mod_location;
-	dev->mod_path = pa_pdc_cell.mod_path;
 
-	temp = pa_pdc_cell.cba;
-	register_module((void *) PAT_GET_CBA(temp));	/* fills in dev->hpa */
+	register_parisc_device(dev);	/* advertise device */
 
 #ifdef DEBUG_PAT
+	pdc_pat_cell_mod_maddr_block_t io_pdc_cell;
 	/* dump what we see so far... */
 	switch (PAT_GET_ENTITY(dev->mod_info)) {
-		ulong i;
+		unsigned long i;
 
 	case PAT_ENTITY_PROC:
-		printk ("PAT_ENTITY_PROC: id_eid 0x%lx\n", pa_pdc_cell.mod[0]);
+		printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n",
+			pa_pdc_cell.mod[0]);
 		break;
 
 	case PAT_ENTITY_MEM:
-		printk ("PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n",
-			pa_pdc_cell.mod[0],
-			pa_pdc_cell.mod[1],
+		printk(KERN_DEBUG 
+			"PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n",
+			pa_pdc_cell.mod[0], pa_pdc_cell.mod[1], 
 			pa_pdc_cell.mod[2]);
 		break;
 	case PAT_ENTITY_CA:
-		printk ("PAT_ENTITY_CA: %ld\n",pcell_loc);
+		printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc);
 		break;
 
 	case PAT_ENTITY_PBC:
-		printk ("PAT_ENTITY_PBC: ");
+		printk(KERN_DEBUG "PAT_ENTITY_PBC: ");
 		goto print_ranges;
 
 	case PAT_ENTITY_SBA:
-		printk ("PAT_ENTITY_SBA: ");
+		printk(KERN_DEBUG "PAT_ENTITY_SBA: ");
 		goto print_ranges;
 
 	case PAT_ENTITY_LBA:
-		printk ("PAT_ENTITY_LBA: ");
+		printk(KERN_DEBUG "PAT_ENTITY_LBA: ");
 
-print_ranges:
-		printk ("ranges %ld\n", pa_pdc_cell.mod[1]);
+ print_ranges:
+		pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
+				    IO_VIEW, &io_pdc_cell);
+		printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell.mod[1]);
 		for (i = 0; i < pa_pdc_cell.mod[1]; i++) {
-			printk ("	%ld: 0x%016lx 0x%016lx 0x%016lx\n", i,
-				pa_pdc_cell.mod[2+i*3],	/* type */
-				pa_pdc_cell.mod[3+i*3],	/* start */
-				pa_pdc_cell.mod[4+i*3]);	/* finish (ie end) */
+			printk(KERN_DEBUG 
+				"  PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", 
+				i, pa_pdc_cell.mod[2 + i * 3],	/* type */
+				pa_pdc_cell.mod[3 + i * 3],	/* start */
+				pa_pdc_cell.mod[4 + i * 3]);	/* finish (ie end) */
+			printk(KERN_DEBUG 
+				"  IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", 
+				i, io_pdc_cell.mod[2 + i * 3],	/* type */
+				io_pdc_cell.mod[3 + i * 3],	/* start */
+				io_pdc_cell.mod[4 + i * 3]);	/* finish (ie end) */
 		}
-		printk("\n");
+		printk(KERN_DEBUG "\n");
 		break;
 	}
 #endif /* DEBUG_PAT */
-	return PDC_RET_OK;
+	return PDC_OK;
 }
 
 
-static int do_pat_inventory(void)
-{
-	ulong mod_index=0;
-	int status;
-	ulong cell_num;
-	ulong pcell_loc;
+/* pat pdc can return information about a variety of different
+ * types of memory (e.g. firmware,i/o, etc) but we only care about
+ * the usable physical ram right now. Since the firmware specific
+ * information is allocated on the stack, we'll be generous, in
+ * case there is a lot of other information we don't care about.
+ */
 
-	pdc_pat = (pdc_pat_cell_get_number(&pdc_result) == PDC_OK);
-	if (!pdc_pat)
-	{
-		return 0;
-	}
-
-	cell_num = pdc_result[0];	/* Cell number call was made */
-
-	/* As of PDC PAT ARS 2.5, ret[1] is NOT architected! */
-	pcell_loc = pdc_result[1];	/* Physical location of the cell */
-
-#ifdef DEBUG_PAT
-	printk("CELL_GET_NUMBER: 0x%lx 0x%lx\n", cell_num, pcell_loc);
-#endif
-
-        status = pdc_pat_cell_num_to_loc(&pdc_result, cell_num);
-        if (status == PDC_BAD_OPTION)
-	{
-		/* Prelude (and it's successors: Lclass, A400/500) only
-		** implement PDC_PAT_CELL sub-options 0 and 2.
-		** "Home cook'n is best anyhow!"
-		*/
-	} else if (PDC_OK == status) {
-		/* so far only Halfdome supports this */
-		pcell_loc = pdc_result[0];
-	} else {
-		panic("WTF? CELL_GET_NUMBER give me invalid cell number?");
-	}
-
-	while (PDC_RET_OK == pat_query_module(pcell_loc, mod_index))
-	{
-		mod_index++;
-	}
-
-	return mod_index;
-}
-#endif /* __LP64__ */
+#define PAT_MAX_RANGES (4 * MAX_PHYSMEM_RANGES)
 
-static int do_newer_workstation_inventory(void)
+static void __init pat_memconfig(void)
 {
+	unsigned long actual_len;
+	struct pdc_pat_pd_addr_map_entry mem_table[PAT_MAX_RANGES+1];
+	struct pdc_pat_pd_addr_map_entry *mtbl_ptr;
+	physmem_range_t *pmem_ptr;
 	long status;
-	int i, num = 0;
+	int entries;
+	unsigned long length;
+	int i;
+
+	length = (PAT_MAX_RANGES + 1) * sizeof(struct pdc_pat_pd_addr_map_entry);
+
+	status = pdc_pat_pd_get_addr_map(&actual_len, mem_table, length, 0L);
+
+	if ((status != PDC_OK)
+	    || ((actual_len % sizeof(struct pdc_pat_pd_addr_map_entry)) != 0)) {
+
+		/* The above pdc call shouldn't fail, but, just in
+		 * case, just use the PAGE0 info.
+		 */
+
+		printk("\n\n\n");
+		printk(KERN_WARNING "WARNING! Could not get full memory configuration. "
+			"All memory may not be used!\n\n\n");
+		pagezero_memconfig();
+		return;
+	}
 
-	/* So the idea here is to simply try one SYSTEM_MAP call.  If 
-	   that one works, great, otherwise do it another way */
+	entries = actual_len / sizeof(struct pdc_pat_pd_addr_map_entry);
 
-	status = pdc_system_map_find_mods(&module_result,&module_path,0);
+	if (entries > PAT_MAX_RANGES) {
+		printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
+		printk(KERN_WARNING "Some memory may not be used!\n");
+	}
 
-	if (status == PDC_RET_OK) {
-		/* This is for newer non-PDC-PAT boxes */
+	/* Copy information into the firmware independent pmem_ranges
+	 * array, skipping types we don't care about. Notice we said
+	 * "may" above. We'll use all the entries that were returned.
+	 */
+
+	npmem_ranges = 0;
+	mtbl_ptr = mem_table;
+	pmem_ptr = pmem_ranges; /* Global firmware independent table */
+	for (i = 0; i < entries; i++,mtbl_ptr++) {
+		if (   (mtbl_ptr->entry_type != PAT_MEMORY_DESCRIPTOR)
+		    || (mtbl_ptr->memory_type != PAT_MEMTYPE_MEMORY)
+		    || (mtbl_ptr->pages == 0)
+		    || (   (mtbl_ptr->memory_usage != PAT_MEMUSE_GENERAL)
+			&& (mtbl_ptr->memory_usage != PAT_MEMUSE_GI)
+			&& (mtbl_ptr->memory_usage != PAT_MEMUSE_GNI) ) ) {
 
-		printk("a newer box...\n");
-		for(i=0, status=PDC_RET_OK; status != PDC_RET_NE_PROC && 
-			status != PDC_RET_NE_MOD ;i++) {
+			continue;
+		}
 
-			status = pdc_system_map_find_mods(&module_result,&module_path,i);
-			if (status == PDC_RET_OK) {
-				num++;
-				register_module(module_result.mod_addr);
-			}
+		if (npmem_ranges == MAX_PHYSMEM_RANGES) {
+			printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
+			printk(KERN_WARNING "Some memory will not be used!\n");
+			break;
 		}
-	}
 
-	return (num > 0);
+		set_pmem_entry(pmem_ptr++,mtbl_ptr->paddr,mtbl_ptr->pages);
+		npmem_ranges++;
+	}
 }
 
-#ifndef __LP64__
-static	struct  pdc_memory_map r_addr __attribute__ ((aligned (8)));
-
-static int really_do_oldhw_inventory(void)
+static int __init pat_inventory(void)
 {
-	int i, mod, num = 0;
 	int status;
-	unsigned int hw_type;
-	unsigned int func;
+	ulong mod_index = 0;
+	struct pdc_pat_cell_num cell_info;
 
-	/* This is undocumented at the time of writing, but basically 
-	   we're setting up mod_path so that bc[0..4]=0xff, and step
-	   through mod to get the "Path Structure for GSC Modules".  If
-	   it works, use the returned HPA and determine the hardware type.  */
+	/*
+	** Note:  Prelude (and it's successors: Lclass, A400/500) only
+	**        implement PDC_PAT_CELL sub-options 0 and 2.
+	*/
+	status = pdc_pat_cell_get_number(&cell_info);
+	if (status != PDC_OK) {
+		return 0;
+	}
 
-	for (i=0;i<6;i++) module_path.bc[i]=0xff;
+#ifdef DEBUG_PAT
+	printk(KERN_DEBUG "CELL_GET_NUMBER: 0x%lx 0x%lx\n", cell_info.cell_num, 
+	       cell_info.cell_loc);
+#endif
 
-	for (mod=0;mod<16;mod++) {
-		char *stype = NULL;
+	while (PDC_OK == pat_query_module(cell_info.cell_loc, mod_index)) {
+		mod_index++;
+	}
 
-		module_path.mod=mod;
-		status = pdc_mem_map_hpa(&r_addr, &module_path);
-		if (status!=PDC_RET_OK) continue;
-	
-		status = pdc_iodc_read(&pdc_result,(void *) r_addr.hpa,
-			0, &iodc_data,32 );
-		if (status!=PDC_RET_OK) continue;
-		hw_type = iodc_data[3]&0x1f;
+	return mod_index;
+}
 
-		switch (hw_type)
-		{
-		case HPHW_NPROC:	/* 0 */
-			stype="Processor"; break;
+/* We only look for extended memory ranges on a 64 bit capable box */
+static void __init sprockets_memconfig(void)
+{
+	struct pdc_memory_table_raddr r_addr;
+	struct pdc_memory_table mem_table[MAX_PHYSMEM_RANGES];
+	struct pdc_memory_table *mtbl_ptr;
+	physmem_range_t *pmem_ptr;
+	long status;
+	int entries;
+	int i;
 
-		case HPHW_MEMORY:	/* 1 */
-			stype="Memory"; break;
+	status = pdc_mem_mem_table(&r_addr,mem_table,
+				(unsigned long)MAX_PHYSMEM_RANGES);
 
-		case HPHW_B_DMA:	/* 2 */
-			stype="Type B DMA"; break;
+	if (status != PDC_OK) {
 
-		case HPHW_A_DMA:	/* 4 */
-			stype="Type A DMA"; break;
+		/* The above pdc call only works on boxes with sprockets
+		 * firmware (newer B,C,J class). Other non PAT PDC machines
+		 * do support more than 3.75 Gb of memory, but we don't
+		 * support them yet.
+		 */
 
-		case HPHW_A_DIRECT:	/* 5 */
-			stype="Type A Direct"; break;
+		pagezero_memconfig();
+		return;
+	}
+
+	if (r_addr.entries_total > MAX_PHYSMEM_RANGES) {
+		printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
+		printk(KERN_WARNING "Some memory will not be used!\n");
+	}
 
-		case HPHW_BCPORT:	/* 7 */
-			stype="Bus Converter Port"; break;
+	entries = (int)r_addr.entries_returned;
 
-		case HPHW_CONSOLE:	/* 9 */
-			stype="Console"; break;
+	npmem_ranges = 0;
+	mtbl_ptr = mem_table;
+	pmem_ptr = pmem_ranges; /* Global firmware independent table */
+	for (i = 0; i < entries; i++,mtbl_ptr++) {
+		set_pmem_entry(pmem_ptr++,mtbl_ptr->paddr,mtbl_ptr->pages);
+		npmem_ranges++;
+	}
+}
 
-		case HPHW_FIO:		/* 10 - Graphics */
-			stype="Foreign I/O (Graphics)"; break;
+#else   /* !__LP64__ */
 
-		case HPHW_BA:		/* 11 - Bus Adapter */
-			stype="Bus Adapter"; break;
+#define pat_inventory() do { } while (0)
+#define pat_memconfig() do { } while (0)
+#define sprockets_memconfig() pagezero_memconfig()
 
-		case HPHW_IOA:		/* 12 */
-			stype="I/O Adapter"; break;
+#endif	/* !__LP64__ */
 
-		case HPHW_BRIDGE:	/* 13 */
-			stype="Bridge"; break;
 
-		case HPHW_FABRIC:	/* 14 */
-			stype="Fabric"; break;
+#ifndef CONFIG_PA20
 
-		case HPHW_FAULTY:	/* 31 */
-			stype="Faulty HW"; break;
+/* Code to support Snake machines (7[2350], 7[235]5, 715/Scorpio) */
 
-		case HPHW_OTHER:	/* 42 */
-		default:	
-			printk("Don't know this hw_type: %d\n", hw_type);
-			break;
-		}
+static struct parisc_device * __init
+legacy_create_device(struct pdc_memory_map *r_addr,
+		struct pdc_module_path *module_path)
+{
+	struct parisc_device *dev;
+	int status = pdc_mem_map_hpa(r_addr, module_path);
+	if (status != PDC_OK)
+		return NULL;
+
+	dev = alloc_pa_dev(r_addr->hpa, &module_path->path);
+	if (dev == NULL)
+		return NULL;
 
-		// This is kluged. But don't want to replicate code for
-		// most of the above cases.
-		if (stype) {
-#ifdef DBG_PDC_QUERY
-			// parisc/kernel/drivers.c
-			extern int num_devices; 
-			extern struct hp_device devices[];
-			struct hp_hardware *h;
-#endif
+	register_parisc_device(dev);
+	return dev;
+}
 
-			status = pdc_mem_map_hpa(&r_addr, &module_path);
-			if (status==PDC_RET_OK && register_module((void *) r_addr.hpa) != NULL)
-					num++;
-
-
-		    if (hw_type == HPHW_BA) {
-			/* Now, we're checking for devices for each
-			   module.  I seem to think that the
-			   modules in question are Lasi (2), 2nd Lasi (6)
-			   Wax (5).  To do this, set bc[5]=0, and set
-			   bc[4] to the module, and step through the
-			   functions. */
-
-			for (i=0;i<4;i++) module_path.bc[i]=0xff;
-			module_path.bc[4]=mod;
-			for (func=0;func<16;func++) {
-				module_path.mod = func;
-				module_path.bc[5]=0;
-				status = pdc_mem_map_hpa(&r_addr, &module_path);
-				if (status!=PDC_RET_OK) continue;
-				if (register_module((void *) r_addr.hpa) != NULL) 
-					num++;
-			}
+/**
+ * snake_inventory
+ *
+ * Before PDC_SYSTEM_MAP was invented, the PDC_MEM_MAP call was used.
+ * To use it, we initialise the mod_path.bc to 0xff and try all values of
+ * mod to get the HPA for the top-level devices.  Bus adapters may have
+ * sub-devices which are discovered by setting bc[5] to 0 and bc[4] to the
+ * module, then trying all possible functions.
+ */
+static void __init snake_inventory(void)
+{
+	int mod;
+	for (mod = 0; mod < 16; mod++) {
+		struct parisc_device *dev;
+		struct pdc_module_path module_path;
+		struct pdc_memory_map r_addr;
+		unsigned int func;
+
+		memset(module_path.path.bc, 0xff, 6);
+		module_path.path.mod = mod;
+		dev = legacy_create_device(&r_addr, &module_path);
+		if ((!dev) || (dev->id.hw_type != HPHW_BA))
+			continue;
+
+		memset(module_path.path.bc, 0xff, 4);
+		module_path.path.bc[4] = mod;
+
+		for (func = 0; func < 16; func++) {
+			module_path.path.bc[5] = 0;
+			module_path.path.mod = func;
+			legacy_create_device(&r_addr, &module_path);
 		}
-		// reset module_path.bc[]
-		for (i=0;i<6;i++) module_path.bc[i]=0xff;
+	}
+}
 
+#else /* CONFIG_PA20 */
+#define snake_inventory() do { } while (0)
+#endif  /* CONFIG_PA20 */
+
+/* Common 32/64 bit based code goes here */
+
+/**
+ * add_system_map_addresses - Add additional addresses to the parisc device.
+ * @dev: The parisc device.
+ * @num_addrs: Then number of addresses to add;
+ * @module_instance: The system_map module instance.
+ *
+ * This function adds any additional addresses reported by the system_map
+ * firmware to the parisc device.
+ */
+static void __init
+add_system_map_addresses(struct parisc_device *dev, int num_addrs, 
+			 int module_instance)
+{
+	int i;
+	long status;
+	struct pdc_system_map_addr_info addr_result;
 
-#ifdef DBG_PDC_QUERY
-//
-// Let print_devices() dump everything which is registered.
-//
-			h = devices[num_devices-1].reference;
+	dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL);
+	if(!dev->addr) {
+		printk(KERN_ERR "%s %s(): memory allocation failure\n",
+		       __FILE__, __FUNCTION__);
+		return;
+	}
 
-			if (h) stype = h->name;
-			printk("Found %s at %d\n", stype, module_path.mod);
-#endif
+	for(i = 1; i <= num_addrs; ++i) {
+		status = pdc_system_map_find_addrs(&addr_result, 
+						   module_instance, i);
+		if(PDC_OK == status) {
+			dev->addr[dev->num_addrs] = (unsigned long)addr_result.mod_addr;
+			dev->num_addrs++;
+		} else {
+			printk(KERN_WARNING 
+			       "Bad PDC_FIND_ADDRESS status return (%ld) for index %d\n",
+			       status, i);
 		}
 	}
-	return num;
 }
 
-static int
-do_old_inventory(void)
+/**
+ * do_system_map_inventory - Retrieve firmware devices via SYSTEM_MAP.
+ *
+ * This function attempts to retrieve and register all the devices firmware
+ * knows about via the SYSTEM_MAP PDC call.
+ */
+static void __init system_map_inventory(void)
 {
-        unsigned int bus_id;
-	long status;
-	int ok = 0;
-
-	printk(" an older box...\n");
+	int i;
+	long status = PDC_OK;
+    
+	/*
+	 * first stop the usb controller, otherwise the machine
+	 * might crash during iommu setup
+	 */
+	pdc_suspend_usb();
+
+	for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) {
+		struct parisc_device *dev;
+		struct pdc_system_map_mod_info module_result;
+		struct pdc_module_path module_path;
+
+		status = pdc_system_map_find_mods(&module_result,
+				&module_path, i);
+		if (status != PDC_OK)
+			continue;
+		
+		dev = alloc_pa_dev(module_result.mod_addr, &module_path.path);
+		if (!dev)
+			continue;
+		
+		register_parisc_device(dev);
+
+		/* if available, get the additional addresses for a module */
+		if (!module_result.add_addrs)
+			continue;
 
-	/* Here, we're going to check the model, and decide
-	   if we should even bother trying. */
+		add_system_map_addresses(dev, module_result.add_addrs, i);
+	}
 
-	status = pdc_model_info(&model);
+	walk_central_bus();
+	return;
+}
 
-	bus_id = (model.hversion >> (4+7) ) &0x1f;
+void __init do_memory_inventory(void)
+{
+	switch (pdc_type) {
 
-	/* Here, we're checking the HVERSION of the CPU.
-	   We're only checking the 0th CPU, since it'll
-	   be the same on an SMP box. */
+	case PDC_TYPE_PAT:
+		pat_memconfig();
+		break;
 
-	switch (bus_id) {
-		case 0x4: 	/* 720, 730, 750, 735, 755 */
-		case 0x6: 	/* 705, 710 */
-		case 0x7: 	/* 715, 725 */
-		case 0x8: 	/* 745, 747, 742 */
-		case 0xA: 	/* 712 and similiar */
-		case 0xC: 	/* 715/64, at least */
-
-		/* Do inventory using MEM_MAP */
-		really_do_oldhw_inventory();
-		ok = 1;
+	case PDC_TYPE_SYSTEM_MAP:
+		sprockets_memconfig();
 		break;
-	default: 	/* Everything else */
-		printk("This is a very very old machine, with a bus_id of 0x%x.\n",bus_id);
-		panic("This will probably never run Linux.\n");
+
+	case PDC_TYPE_SNAKE:
+		pagezero_memconfig();
+		return;
+
+	default:
+		panic("Unknown PDC type!\n");
 	}
 
-	return ok;
+	if (npmem_ranges == 0 || pmem_ranges[0].start_pfn != 0) {
+		printk(KERN_WARNING "Bad memory configuration returned!\n");
+		printk(KERN_WARNING "Some memory may not be used!\n");
+		pagezero_memconfig();
+	}
 }
 
-#endif /* !__LP64__ */
+void __init do_device_inventory(void)
+{
+	printk(KERN_INFO "Searching for devices...\n");
 
-void do_inventory(void){
-	if((pdc_hpa_processor(&processor_hpa))<0){
-		printk(KERN_INFO "Couldn't get the HPA of the processor.\n" );
-	}
+	switch (pdc_type) {
+
+	case PDC_TYPE_PAT:
+		pat_inventory();
+		break;
 
-	printk("Searching for devices in PDC firmware... ");
-	printk("processor hpa 0x%lx\n", processor_hpa.hpa);
+	case PDC_TYPE_SYSTEM_MAP:
+		system_map_inventory();
+		break;
 
-	if (!(
-		do_newer_workstation_inventory()
-#ifdef __LP64__
-		|| do_pat_inventory()
-#else /* __LP64__ */
-		|| do_old_inventory()
-#endif /* __LP64__ */
-	    ))
-	{
-	    panic("I can't get the hardware inventory on this machine");
+	case PDC_TYPE_SNAKE:
+		snake_inventory();
+		break;
+
+	default:
+		panic("Unknown PDC type!\n");
 	}
-	print_devices(NULL);
-}
 
+	printk(KERN_INFO "Found devices:\n");
+	print_parisc_devices();
+}
diff -Nru a/arch/parisc/kernel/ioctl32.c b/arch/parisc/kernel/ioctl32.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/ioctl32.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,3849 @@
+/* $Id: ioctl32.c,v 1.6 2002/10/21 16:13:22 varenet Exp $
+ * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
+ *
+ * Copyright (C) 1997-2000  Jakub Jelinek  (jakub@redhat.com)
+ * Copyright (C) 1998  Eddie C. Dost  (ecd@skynet.be)
+ *
+ * These routines maintain argument size conversion between 32bit and 64bit
+ * ioctls.
+ */
+
+#include <linux/config.h>
+#include <linux/types.h>
+#include "sys32.h"
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/ioctl.h>
+#include <linux/if.h>
+#include <linux/slab.h>
+#include <linux/hdreg.h>
+#include <linux/raid/md.h>
+#include <linux/kd.h>
+#include <linux/route.h>
+#include <linux/skbuff.h>
+#include <linux/netlink.h>
+#include <linux/vt.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+#include <linux/fd.h>
+#include <linux/ppp_defs.h>
+#include <linux/if_ppp.h>
+#include <linux/if_pppox.h>
+#include <linux/if_tun.h>
+#include <linux/mtio.h>
+#include <linux/cdrom.h>
+#include <linux/loop.h>
+#include <linux/auto_fs.h>
+#include <linux/devfs_fs.h>
+#include <linux/tty.h>
+#include <linux/vt_kern.h>
+#include <linux/fb.h>
+#include <linux/ext2_fs.h>
+#include <linux/videodev.h>
+#include <linux/netdevice.h>
+#include <linux/raw.h>
+#include <linux/smb_fs.h>
+#include <linux/blkpg.h>
+#include <linux/blk.h>
+#include <linux/elevator.h>
+#include <linux/rtc.h>
+#include <linux/pci.h>
+#include <linux/serial.h>
+#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
+/* Ugh. This header really is not clean */
+/* #define min min
+#define max max */
+#include <linux/lvm.h>
+#endif /* LVM */
+
+#include <scsi/scsi.h>
+/* Ugly hack. */
+#undef __KERNEL__
+#include <scsi/scsi_ioctl.h>
+#define __KERNEL__
+#include <scsi/sg.h>
+
+#include <asm/types.h>
+#include <asm/uaccess.h>
+#include <asm/perf.h>
+#include <linux/ethtool.h>
+#include <linux/soundcard.h>
+#include <linux/lp.h>
+
+#include <linux/atm.h>
+#include <linux/atmarp.h>
+#include <linux/atmclip.h>
+#include <linux/atmdev.h>
+#include <linux/atmioc.h>
+#include <linux/atmlec.h>
+#include <linux/atmmpc.h>
+#include <linux/atmsvc.h>
+#include <linux/atm_tcp.h>
+#include <linux/sonet.h>
+#include <linux/atm_suni.h>
+#include <linux/mtd/mtd.h>
+
+#include <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci.h>
+
+#include <linux/usb.h>
+#include <linux/usbdevice_fs.h>
+#include <linux/nbd.h>
+#include <linux/random.h>
+
+#include <asm/module.h>	/* get #define module_map() */
+
+/* Use this to get at 32-bit user passed pointers. 
+   See sys_sparc32.c for description about these. */
+#define A(__x) ((unsigned long)(__x))
+/* The same for use with copy_from_user() and copy_to_user(). */
+#define B(__x) ((void *)(unsigned long)(__x))
+
+/* Aiee. Someone does not find a difference between int and long */
+#define EXT2_IOC32_GETFLAGS               _IOR('f', 1, int)
+#define EXT2_IOC32_SETFLAGS               _IOW('f', 2, int)
+#define EXT2_IOC32_GETVERSION             _IOR('v', 1, int)
+#define EXT2_IOC32_SETVERSION             _IOW('v', 2, int)
+
+extern asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
+
+static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	int err;
+	unsigned long val;
+	
+	set_fs (KERNEL_DS);
+	err = sys_ioctl(fd, cmd, (unsigned long)&val);
+	set_fs (old_fs);
+	if (!err && put_user(val, (u32 *)arg))
+		return -EFAULT;
+	return err;
+}
+ 
+static int rw_long(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	int err;
+	unsigned long val;
+	
+	if(get_user(val, (u32 *)arg))
+		return -EFAULT;
+	set_fs (KERNEL_DS);
+	err = sys_ioctl(fd, cmd, (unsigned long)&val);
+	set_fs (old_fs);
+	if (!err && put_user(val, (u32 *)arg))
+		return -EFAULT;
+	return err;
+}
+
+static int siocprivate(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	int err = sys_ioctl(fd, cmd, arg);
+	if ((unsigned) err > -4095)
+		printk(KERN_WARNING 
+			"ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
+			"supported, though some will work by accident.\n",
+		    fd, cmd, (void *)arg);
+	return err;
+}
+
+static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	/* These are just misnamed, they actually get/put from/to user an int */
+	switch (cmd) {
+	case EXT2_IOC32_GETFLAGS: cmd = EXT2_IOC_GETFLAGS; break;
+	case EXT2_IOC32_SETFLAGS: cmd = EXT2_IOC_SETFLAGS; break;
+	case EXT2_IOC32_GETVERSION: cmd = EXT2_IOC_GETVERSION; break;
+	case EXT2_IOC32_SETVERSION: cmd = EXT2_IOC_SETVERSION; break;
+	}
+	return sys_ioctl(fd, cmd, arg);
+}
+ 
+static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct timeval32 *up = (struct timeval32 *)arg;
+	struct timeval ktv;
+	mm_segment_t old_fs = get_fs();
+	int err;
+
+	set_fs(KERNEL_DS);
+	err = sys_ioctl(fd, cmd, (unsigned long)&ktv);
+	set_fs(old_fs);
+	if(!err) {
+		err = put_user(ktv.tv_sec, &up->tv_sec);
+		err |= __put_user(ktv.tv_usec, &up->tv_usec);
+	}
+	return err;
+}
+
+struct ifmap32 {
+	u32 mem_start;
+	u32 mem_end;
+	unsigned short base_addr;
+	unsigned char irq;
+	unsigned char dma;
+	unsigned char port;
+};
+
+struct ifreq32 {
+#define IFHWADDRLEN     6
+#define IFNAMSIZ        16
+        union {
+                char    ifrn_name[IFNAMSIZ];            /* if name, e.g. "en0" */
+        } ifr_ifrn;
+        union {
+                struct  sockaddr ifru_addr;
+                struct  sockaddr ifru_dstaddr;
+                struct  sockaddr ifru_broadaddr;
+                struct  sockaddr ifru_netmask;
+                struct  sockaddr ifru_hwaddr;
+                short   ifru_flags;
+                int     ifru_ivalue;
+                int     ifru_mtu;
+                struct  ifmap32 ifru_map;
+                char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
+		char	ifru_newname[IFNAMSIZ];
+                __kernel_caddr_t32 ifru_data;
+        } ifr_ifru;
+};
+
+struct ifconf32 {
+        int     ifc_len;                        /* size of buffer       */
+        __kernel_caddr_t32  ifcbuf;
+};
+
+static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct net_device *dev;
+	struct ifreq32 ifr32;
+	int err;
+
+	if (copy_from_user(&ifr32, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
+		return -EFAULT;
+
+	dev = dev_get_by_index(ifr32.ifr_ifindex);
+	if (!dev)
+		return -ENODEV;
+
+	strcpy(ifr32.ifr_name, dev->name);
+	dev_put(dev);
+
+	err = copy_to_user((struct ifreq32 *)arg, &ifr32, sizeof(struct ifreq32));
+	return (err ? -EFAULT : 0);
+}
+
+static inline int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct ifconf32 ifc32;
+	struct ifconf ifc;
+	struct ifreq32 *ifr32;
+	struct ifreq *ifr;
+	mm_segment_t old_fs;
+	unsigned int i, j;
+	int err;
+
+	if (copy_from_user(&ifc32, (struct ifconf32 *)arg, sizeof(struct ifconf32)))
+		return -EFAULT;
+
+	if(ifc32.ifcbuf == 0) {
+		ifc32.ifc_len = 0;
+		ifc.ifc_len = 0;
+		ifc.ifc_buf = NULL;
+	} else {
+		ifc.ifc_len = ((ifc32.ifc_len / sizeof (struct ifreq32)) + 1) *
+			sizeof (struct ifreq);
+		ifc.ifc_buf = kmalloc (ifc.ifc_len, GFP_KERNEL);
+		if (!ifc.ifc_buf)
+			return -ENOMEM;
+	}
+	ifr = ifc.ifc_req;
+	ifr32 = (struct ifreq32 *)A(ifc32.ifcbuf);
+	for (i = 0; i < ifc32.ifc_len; i += sizeof (struct ifreq32)) {
+		if (copy_from_user(ifr++, ifr32++, sizeof (struct ifreq32))) {
+			kfree (ifc.ifc_buf);
+			return -EFAULT;
+		}
+	}
+	old_fs = get_fs(); set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, SIOCGIFCONF, (unsigned long)&ifc);	
+	set_fs (old_fs);
+	if (!err) {
+		ifr = ifc.ifc_req;
+		ifr32 = (struct ifreq32 *)A(ifc32.ifcbuf);
+		for (i = 0, j = 0; i < ifc32.ifc_len && j < ifc.ifc_len;
+		     i += sizeof (struct ifreq32), j += sizeof (struct ifreq)) {
+			if (copy_to_user(ifr32++, ifr++, sizeof (struct ifreq32))) {
+				err = -EFAULT;
+				break;
+			}
+		}
+		if (!err) {
+			if (i <= ifc32.ifc_len)
+				ifc32.ifc_len = i;
+			else
+				ifc32.ifc_len = i - sizeof (struct ifreq32);
+			if (copy_to_user((struct ifconf32 *)arg, &ifc32, sizeof(struct ifconf32)))
+				err = -EFAULT;
+		}
+	}
+	if(ifc.ifc_buf != NULL)
+		kfree (ifc.ifc_buf);
+	return err;
+}
+
+static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct ifreq ifr;
+	mm_segment_t old_fs;
+	int err;
+	
+	switch (cmd) {
+	case SIOCSIFMAP:
+		err = copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(ifr.ifr_name));
+		err |= __get_user(ifr.ifr_map.mem_start, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_start));
+		err |= __get_user(ifr.ifr_map.mem_end, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_end));
+		err |= __get_user(ifr.ifr_map.base_addr, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.base_addr));
+		err |= __get_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
+		err |= __get_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
+		err |= __get_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
+		if (err)
+			return -EFAULT;
+		break;
+	case SIOCGPPPSTATS:
+	case SIOCGPPPCSTATS:
+	case SIOCGPPPVER:
+	case SIOCETHTOOL:
+		if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
+			return -EFAULT;
+		ifr.ifr_data = (__kernel_caddr_t)get_zeroed_page(GFP_KERNEL);
+		if (!ifr.ifr_data)
+			return -EAGAIN;
+		if(cmd == SIOCETHTOOL) {
+			u32 data;
+
+			__get_user(data, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_data));
+			if(copy_from_user(ifr.ifr_data,
+					  (char *)A(data),
+					  sizeof(struct ethtool_cmd))) {
+				free_page((unsigned long)ifr.ifr_data);
+				return -EFAULT;
+			}
+		}
+		break;
+	default:
+		if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
+			return -EFAULT;
+		break;
+	}
+	old_fs = get_fs();
+	set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, cmd, (unsigned long)&ifr);
+	set_fs (old_fs);
+	if (!err) {
+		switch (cmd) {
+		case SIOCGIFFLAGS:
+		case SIOCGIFMETRIC:
+		case SIOCGIFMTU:
+		case SIOCGIFMEM:
+		case SIOCGIFHWADDR:
+		case SIOCGIFINDEX:
+		case SIOCGIFADDR:
+		case SIOCGIFBRDADDR:
+		case SIOCGIFDSTADDR:
+		case SIOCGIFNETMASK:
+		case SIOCGIFTXQLEN:
+			if (copy_to_user((struct ifreq32 *)arg, &ifr, sizeof(struct ifreq32)))
+				return -EFAULT;
+			break;
+		case SIOCGPPPSTATS:
+		case SIOCGPPPCSTATS:
+		case SIOCGPPPVER:
+		case SIOCETHTOOL:
+		{
+			u32 data;
+			int len;
+
+			__get_user(data, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_data));
+			if(cmd == SIOCETHTOOL)
+				len = sizeof(struct ethtool_cmd);
+			if(cmd == SIOCGPPPVER)
+				len = strlen((char *)ifr.ifr_data) + 1;
+			else if(cmd == SIOCGPPPCSTATS)
+				len = sizeof(struct ppp_comp_stats);
+			else
+				len = sizeof(struct ppp_stats);
+
+			len = copy_to_user((char *)A(data), ifr.ifr_data, len);
+			free_page((unsigned long)ifr.ifr_data);
+			if(len)
+				return -EFAULT;
+			break;
+		}
+		case SIOCGIFMAP:
+			err = copy_to_user((struct ifreq32 *)arg, &ifr, sizeof(ifr.ifr_name));
+			err |= __put_user(ifr.ifr_map.mem_start, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_start));
+			err |= __put_user(ifr.ifr_map.mem_end, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_end));
+			err |= __put_user(ifr.ifr_map.base_addr, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.base_addr));
+			err |= __put_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
+			err |= __put_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
+			err |= __put_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
+			if (err)
+				err = -EFAULT;
+			break;
+		}
+	}
+	return err;
+}
+
+struct rtentry32 {
+        u32   		rt_pad1;
+        struct sockaddr rt_dst;         /* target address               */
+        struct sockaddr rt_gateway;     /* gateway addr (RTF_GATEWAY)   */
+        struct sockaddr rt_genmask;     /* target network mask (IP)     */
+        unsigned short  rt_flags;
+        short           rt_pad2;
+        u32   		rt_pad3;
+        unsigned char   rt_tos;
+        unsigned char   rt_class;
+        short           rt_pad4;
+        short           rt_metric;      /* +1 for binary compatibility! */
+        /* char * */ u32 rt_dev;        /* forcing the device at add    */
+        u32   		rt_mtu;         /* per route MTU/Window         */
+        u32   		rt_window;      /* Window clamping              */
+        unsigned short  rt_irtt;        /* Initial RTT                  */
+
+};
+
+static inline int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct rtentry r;
+	char devname[16];
+	u32 rtdev;
+	int ret;
+	mm_segment_t old_fs = get_fs();
+	
+	ret = copy_from_user (&r.rt_dst, &(((struct rtentry32 *)arg)->rt_dst), 3 * sizeof(struct sockaddr));
+	ret |= __get_user (r.rt_flags, &(((struct rtentry32 *)arg)->rt_flags));
+	ret |= __get_user (r.rt_metric, &(((struct rtentry32 *)arg)->rt_metric));
+	ret |= __get_user (r.rt_mtu, &(((struct rtentry32 *)arg)->rt_mtu));
+	ret |= __get_user (r.rt_window, &(((struct rtentry32 *)arg)->rt_window));
+	ret |= __get_user (r.rt_irtt, &(((struct rtentry32 *)arg)->rt_irtt));
+	ret |= __get_user (rtdev, &(((struct rtentry32 *)arg)->rt_dev));
+	if (rtdev) {
+		ret |= copy_from_user (devname, (char *)A(rtdev), 15);
+		r.rt_dev = devname; devname[15] = 0;
+	} else
+		r.rt_dev = 0;
+	if (ret)
+		return -EFAULT;
+	set_fs (KERNEL_DS);
+	ret = sys_ioctl (fd, cmd, (long)&r);
+	set_fs (old_fs);
+	return ret;
+}
+
+struct hd_geometry32 {
+	unsigned char heads;
+	unsigned char sectors;
+	unsigned short cylinders;
+	u32 start;
+};
+                        
+static inline int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	struct hd_geometry geo;
+	int err;
+	
+	set_fs (KERNEL_DS);
+	err = sys_ioctl(fd, HDIO_GETGEO, (unsigned long)&geo);
+	set_fs (old_fs);
+	if (!err) {
+		err = copy_to_user ((struct hd_geometry32 *)arg, &geo, 4);
+		err |= __put_user (geo.start, &(((struct hd_geometry32 *)arg)->start));
+	}
+	return err ? -EFAULT : 0;
+}
+
+
+#if 0
+/* looks like SPARC only - eg sbus video */
+struct  fbcmap32 {
+	int             index;          /* first element (0 origin) */
+	int             count;
+	u32		red;
+	u32		green;
+	u32		blue;
+};
+
+
+static inline int fbiogetputcmap(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct fbcmap f;
+	int ret;
+	char red[256], green[256], blue[256];
+	u32 r, g, b;
+	mm_segment_t old_fs = get_fs();
+	
+	ret = get_user(f.index, &(((struct fbcmap32 *)arg)->index));
+	ret |= __get_user(f.count, &(((struct fbcmap32 *)arg)->count));
+	ret |= __get_user(r, &(((struct fbcmap32 *)arg)->red));
+	ret |= __get_user(g, &(((struct fbcmap32 *)arg)->green));
+	ret |= __get_user(b, &(((struct fbcmap32 *)arg)->blue));
+	if (ret)
+		return -EFAULT;
+	if ((f.index < 0) || (f.index > 255)) return -EINVAL;
+	if (f.index + f.count > 256)
+		f.count = 256 - f.index;
+	if (cmd == FBIOPUTCMAP32) {
+		ret = copy_from_user (red, (char *)A(r), f.count);
+		ret |= copy_from_user (green, (char *)A(g), f.count);
+		ret |= copy_from_user (blue, (char *)A(b), f.count);
+		if (ret)
+			return -EFAULT;
+	}
+	f.red = red; f.green = green; f.blue = blue;
+	set_fs (KERNEL_DS);
+	ret = sys_ioctl (fd, (cmd == FBIOPUTCMAP32) ? FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, (long)&f);
+	set_fs (old_fs);
+	if (!ret && cmd == FBIOGETCMAP32) {
+		ret = copy_to_user ((char *)A(r), red, f.count);
+		ret |= copy_to_user ((char *)A(g), green, f.count);
+		ret |= copy_to_user ((char *)A(b), blue, f.count);
+	}
+	return ret ? -EFAULT : 0;
+}
+
+struct fbcursor32 {
+	short set;		/* what to set, choose from the list above */
+	short enable;		/* cursor on/off */
+	struct fbcurpos pos;	/* cursor position */
+	struct fbcurpos hot;	/* cursor hot spot */
+	struct fbcmap32 cmap;	/* color map info */
+	struct fbcurpos size;	/* cursor bit map size */
+	u32	image;		/* cursor image bits */
+	u32	mask;		/* cursor mask bits */
+};
+	
+static inline int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct fbcursor f;
+	int ret;
+	char red[2], green[2], blue[2];
+	char image[128], mask[128];
+	u32 r, g, b;
+	u32 m, i;
+	mm_segment_t old_fs = get_fs();
+	
+	ret = copy_from_user (&f, (struct fbcursor32 *)arg, 2 * sizeof (short) + 2 * sizeof(struct fbcurpos));
+	ret |= __get_user(f.size.fbx, &(((struct fbcursor32 *)arg)->size.fbx));
+	ret |= __get_user(f.size.fby, &(((struct fbcursor32 *)arg)->size.fby));
+	ret |= __get_user(f.cmap.index, &(((struct fbcursor32 *)arg)->cmap.index));
+	ret |= __get_user(f.cmap.count, &(((struct fbcursor32 *)arg)->cmap.count));
+	ret |= __get_user(r, &(((struct fbcursor32 *)arg)->cmap.red));
+	ret |= __get_user(g, &(((struct fbcursor32 *)arg)->cmap.green));
+	ret |= __get_user(b, &(((struct fbcursor32 *)arg)->cmap.blue));
+	ret |= __get_user(m, &(((struct fbcursor32 *)arg)->mask));
+	ret |= __get_user(i, &(((struct fbcursor32 *)arg)->image));
+	if (ret)
+		return -EFAULT;
+	if (f.set & FB_CUR_SETCMAP) {
+		if ((uint) f.size.fby > 32)
+			return -EINVAL;
+		ret = copy_from_user (mask, (char *)A(m), f.size.fby * 4);
+		ret |= copy_from_user (image, (char *)A(i), f.size.fby * 4);
+		if (ret)
+			return -EFAULT;
+		f.image = image; f.mask = mask;
+	}
+	if (f.set & FB_CUR_SETCMAP) {
+		ret = copy_from_user (red, (char *)A(r), 2);
+		ret |= copy_from_user (green, (char *)A(g), 2);
+		ret |= copy_from_user (blue, (char *)A(b), 2);
+		if (ret)
+			return -EFAULT;
+		f.cmap.red = red; f.cmap.green = green; f.cmap.blue = blue;
+	}
+	set_fs (KERNEL_DS);
+	ret = sys_ioctl (fd, FBIOSCURSOR, (long)&f);
+	set_fs (old_fs);
+	return ret;
+}
+#endif /* 0 */
+
+struct fb_fix_screeninfo32 {
+	char			id[16];
+        __kernel_caddr_t32	smem_start;
+	__u32			smem_len;
+	__u32			type;
+	__u32			type_aux;
+	__u32			visual;
+	__u16			xpanstep;
+	__u16			ypanstep;
+	__u16			ywrapstep;
+	__u32			line_length;
+        __kernel_caddr_t32	mmio_start;
+	__u32			mmio_len;
+	__u32			accel;
+	__u16			reserved[3];
+};
+
+struct fb_cmap32 {
+	__u32			start;
+	__u32			len;
+	__kernel_caddr_t32	red;
+	__kernel_caddr_t32	green;
+	__kernel_caddr_t32	blue;
+	__kernel_caddr_t32	transp;
+};
+
+static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	u32 red = 0, green = 0, blue = 0, transp = 0;
+	struct fb_fix_screeninfo fix;
+	struct fb_cmap cmap;
+	void *karg;
+	int err = 0;
+
+	memset(&cmap, 0, sizeof(cmap));
+	switch (cmd) {
+	case FBIOGET_FSCREENINFO:
+		karg = &fix;
+		break;
+	case FBIOGETCMAP:
+	case FBIOPUTCMAP:
+		karg = &cmap;
+		err = __get_user(cmap.start, &((struct fb_cmap32 *)arg)->start);
+		err |= __get_user(cmap.len, &((struct fb_cmap32 *)arg)->len);
+		err |= __get_user(red, &((struct fb_cmap32 *)arg)->red);
+		err |= __get_user(green, &((struct fb_cmap32 *)arg)->green);
+		err |= __get_user(blue, &((struct fb_cmap32 *)arg)->blue);
+		err |= __get_user(transp, &((struct fb_cmap32 *)arg)->transp);
+		if (err) {
+			err = -EFAULT;
+			goto out;
+		}
+		err = -ENOMEM;
+		cmap.red = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
+		if (!cmap.red)
+			goto out;
+		cmap.green = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
+		if (!cmap.green)
+			goto out;
+		cmap.blue = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
+		if (!cmap.blue)
+			goto out;
+		if (transp) {
+			cmap.transp = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
+			if (!cmap.transp)
+				goto out;
+		}
+			
+		if (cmd == FBIOGETCMAP)
+			break;
+
+		err = __copy_from_user(cmap.red, (char *)A(red), cmap.len * sizeof(__u16));
+		err |= __copy_from_user(cmap.green, (char *)A(green), cmap.len * sizeof(__u16));
+		err |= __copy_from_user(cmap.blue, (char *)A(blue), cmap.len * sizeof(__u16));
+		if (cmap.transp) err |= __copy_from_user(cmap.transp, (char *)A(transp), cmap.len * sizeof(__u16));
+		if (err) {
+			err = -EFAULT;
+			goto out;
+		}
+		break;
+	default:
+		do {
+			static int count = 0;
+			if (++count <= 20)
+				printk(KERN_WARNING
+					"%s: Unknown fb ioctl cmd fd(%d) "
+					"cmd(%08x) arg(%08lx)\n",
+					__FUNCTION__, fd, cmd, arg);
+		} while(0);
+		return -ENOSYS;
+	}
+	set_fs(KERNEL_DS);
+	err = sys_ioctl(fd, cmd, (unsigned long)karg);
+	set_fs(old_fs);
+	if (err)
+		goto out;
+	switch (cmd) {
+		struct fb_fix_screeninfo32 fix32;
+	case FBIOGET_FSCREENINFO:
+		memset(&fix32, 0, sizeof(fix32));
+		memcpy(fix32.id, fix.id, sizeof(fix32.id));
+		fix32.smem_start = (__u32)(unsigned long)fix.smem_start;
+		fix32.smem_len	= fix.smem_len;
+		fix32.type	= fix.type;
+		fix32.type_aux	= fix.type_aux;
+		fix32.visual	= fix.visual;
+		fix32.xpanstep	= fix.xpanstep;
+		fix32.ypanstep	= fix.ypanstep;
+		fix32.ywrapstep = fix.ywrapstep;
+		fix32.line_length = fix.line_length;
+		fix32.mmio_start = (__u32)(unsigned long)fix.mmio_start;
+		fix32.mmio_len	= fix.mmio_len;
+		fix32.accel	= fix.accel;
+		memcpy(fix32.reserved, fix.reserved, sizeof(fix32.reserved));
+		err = __copy_to_user((void *) arg, (const void *) &fix32, sizeof(fix32));
+
+printk("fix  : %lx %x  %x %x %x  %x %x %x %x  %lx %x %x\n",
+	fix.smem_start, fix.smem_len,
+	fix.type, fix.type_aux, fix.visual,
+	fix.xpanstep, fix.ypanstep, fix.ywrapstep, fix.line_length,
+	fix.mmio_start, fix.mmio_len, fix.accel);
+printk("fix32: %x %x  %x %x %x  %x %x %x %x  %x %x %x\n",
+	fix32.smem_start, fix32.smem_len,
+	fix32.type, fix32.type_aux, fix32.visual,
+	fix32.xpanstep, fix32.ypanstep, fix32.ywrapstep, fix32.line_length,
+	fix32.mmio_start, fix32.mmio_len, fix32.accel);
+
+		break;
+	case FBIOGETCMAP:
+		err = __copy_to_user((char *)A(red), cmap.red, cmap.len * sizeof(__u16));
+		err |= __copy_to_user((char *)A(green), cmap.blue, cmap.len * sizeof(__u16));
+		err |= __copy_to_user((char *)A(blue), cmap.blue, cmap.len * sizeof(__u16));
+		if (cmap.transp)
+			err |= __copy_to_user((char *)A(transp), cmap.transp, cmap.len * sizeof(__u16));
+		break;
+	case FBIOPUTCMAP:
+		break;
+	}
+	if (err)
+		err = -EFAULT;
+
+out:	if (cmap.red) kfree(cmap.red);
+	if (cmap.green) kfree(cmap.green);
+	if (cmap.blue) kfree(cmap.blue);
+	if (cmap.transp) kfree(cmap.transp);
+	return err;
+}
+
+static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	unsigned long kval;
+	unsigned int *uvp;
+	int error;
+
+	set_fs(KERNEL_DS);
+	error = sys_ioctl(fd, cmd, (long)&kval);
+	set_fs(old_fs);
+
+	if(error == 0) {
+		uvp = (unsigned int *)arg;
+		if(put_user(kval, uvp))
+			error = -EFAULT;
+	}
+	return error;
+}
+
+struct floppy_struct32 {
+	unsigned int	size;
+	unsigned int	sect;
+	unsigned int	head;
+	unsigned int	track;
+	unsigned int	stretch;
+	unsigned char	gap;
+	unsigned char	rate;
+	unsigned char	spec1;
+	unsigned char	fmt_gap;
+	const __kernel_caddr_t32 name;
+};
+
+struct floppy_drive_params32 {
+	char		cmos;
+	u32		max_dtr;
+	u32		hlt;
+	u32		hut;
+	u32		srt;
+	u32		spinup;
+	u32		spindown;
+	unsigned char	spindown_offset;
+	unsigned char	select_delay;
+	unsigned char	rps;
+	unsigned char	tracks;
+	u32		timeout;
+	unsigned char	interleave_sect;
+	struct floppy_max_errors max_errors;
+	char		flags;
+	char		read_track;
+	short		autodetect[8];
+	int		checkfreq;
+	int		native_format;
+};
+
+struct floppy_drive_struct32 {
+	signed char	flags;
+	u32		spinup_date;
+	u32		select_date;
+	u32		first_read_date;
+	short		probed_format;
+	short		track;
+	short		maxblock;
+	short		maxtrack;
+	int		generation;
+	int		keep_data;
+	int		fd_ref;
+	int		fd_device;
+	int		last_checked;
+	__kernel_caddr_t32 dmabuf;
+	int		bufblocks;
+};
+
+struct floppy_fdc_state32 {
+	int		spec1;
+	int		spec2;
+	int		dtr;
+	unsigned char	version;
+	unsigned char	dor;
+	u32		address;
+	unsigned int	rawcmd:2;
+	unsigned int	reset:1;
+	unsigned int	need_configure:1;
+	unsigned int	perp_mode:2;
+	unsigned int	has_fifo:1;
+	unsigned int	driver_version;
+	unsigned char	track[4];
+};
+
+struct floppy_write_errors32 {
+	unsigned int	write_errors;
+	u32		first_error_sector;
+	int		first_error_generation;
+	u32		last_error_sector;
+	int		last_error_generation;
+	unsigned int	badness;
+};
+
+#define FDSETPRM32 _IOW(2, 0x42, struct floppy_struct32)
+#define FDDEFPRM32 _IOW(2, 0x43, struct floppy_struct32)
+#define FDGETPRM32 _IOR(2, 0x04, struct floppy_struct32)
+#define FDSETDRVPRM32 _IOW(2, 0x90, struct floppy_drive_params32)
+#define FDGETDRVPRM32 _IOR(2, 0x11, struct floppy_drive_params32)
+#define FDGETDRVSTAT32 _IOR(2, 0x12, struct floppy_drive_struct32)
+#define FDPOLLDRVSTAT32 _IOR(2, 0x13, struct floppy_drive_struct32)
+#define FDGETFDCSTAT32 _IOR(2, 0x15, struct floppy_fdc_state32)
+#define FDWERRORGET32  _IOR(2, 0x17, struct floppy_write_errors32)
+
+static struct {
+	unsigned int	cmd32;
+	unsigned int	cmd;
+} fd_ioctl_trans_table[] = {
+	{ FDSETPRM32, FDSETPRM },
+	{ FDDEFPRM32, FDDEFPRM },
+	{ FDGETPRM32, FDGETPRM },
+	{ FDSETDRVPRM32, FDSETDRVPRM },
+	{ FDGETDRVPRM32, FDGETDRVPRM },
+	{ FDGETDRVSTAT32, FDGETDRVSTAT },
+	{ FDPOLLDRVSTAT32, FDPOLLDRVSTAT },
+	{ FDGETFDCSTAT32, FDGETFDCSTAT },
+	{ FDWERRORGET32, FDWERRORGET }
+};
+
+#define NR_FD_IOCTL_TRANS (sizeof(fd_ioctl_trans_table)/sizeof(fd_ioctl_trans_table[0]))
+
+static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	void *karg = NULL;
+	unsigned int kcmd = 0;
+	int i, err;
+
+	for (i = 0; i < NR_FD_IOCTL_TRANS; i++)
+		if (cmd == fd_ioctl_trans_table[i].cmd32) {
+			kcmd = fd_ioctl_trans_table[i].cmd;
+			break;
+		}
+	if (!kcmd)
+		return -EINVAL;
+
+	switch (cmd) {
+		case FDSETPRM32:
+		case FDDEFPRM32:
+		case FDGETPRM32:
+		{
+			struct floppy_struct *f;
+
+			f = karg = kmalloc(sizeof(struct floppy_struct), GFP_KERNEL);
+			if (!karg)
+				return -ENOMEM;
+			if (cmd == FDGETPRM32)
+				break;
+			err = __get_user(f->size, &((struct floppy_struct32 *)arg)->size);
+			err |= __get_user(f->sect, &((struct floppy_struct32 *)arg)->sect);
+			err |= __get_user(f->head, &((struct floppy_struct32 *)arg)->head);
+			err |= __get_user(f->track, &((struct floppy_struct32 *)arg)->track);
+			err |= __get_user(f->stretch, &((struct floppy_struct32 *)arg)->stretch);
+			err |= __get_user(f->gap, &((struct floppy_struct32 *)arg)->gap);
+			err |= __get_user(f->rate, &((struct floppy_struct32 *)arg)->rate);
+			err |= __get_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
+			err |= __get_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
+			err |= __get_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
+			if (err) {
+				err = -EFAULT;
+				goto out;
+			}
+			break;
+		}
+		case FDSETDRVPRM32:
+		case FDGETDRVPRM32:
+		{
+			struct floppy_drive_params *f;
+
+			f = karg = kmalloc(sizeof(struct floppy_drive_params), GFP_KERNEL);
+			if (!karg)
+				return -ENOMEM;
+			if (cmd == FDGETDRVPRM32)
+				break;
+			err = __get_user(f->cmos, &((struct floppy_drive_params32 *)arg)->cmos);
+			err |= __get_user(f->max_dtr, &((struct floppy_drive_params32 *)arg)->max_dtr);
+			err |= __get_user(f->hlt, &((struct floppy_drive_params32 *)arg)->hlt);
+			err |= __get_user(f->hut, &((struct floppy_drive_params32 *)arg)->hut);
+			err |= __get_user(f->srt, &((struct floppy_drive_params32 *)arg)->srt);
+			err |= __get_user(f->spinup, &((struct floppy_drive_params32 *)arg)->spinup);
+			err |= __get_user(f->spindown, &((struct floppy_drive_params32 *)arg)->spindown);
+			err |= __get_user(f->spindown_offset, &((struct floppy_drive_params32 *)arg)->spindown_offset);
+			err |= __get_user(f->select_delay, &((struct floppy_drive_params32 *)arg)->select_delay);
+			err |= __get_user(f->rps, &((struct floppy_drive_params32 *)arg)->rps);
+			err |= __get_user(f->tracks, &((struct floppy_drive_params32 *)arg)->tracks);
+			err |= __get_user(f->timeout, &((struct floppy_drive_params32 *)arg)->timeout);
+			err |= __get_user(f->interleave_sect, &((struct floppy_drive_params32 *)arg)->interleave_sect);
+			err |= __copy_from_user(&f->max_errors, &((struct floppy_drive_params32 *)arg)->max_errors, sizeof(f->max_errors));
+			err |= __get_user(f->flags, &((struct floppy_drive_params32 *)arg)->flags);
+			err |= __get_user(f->read_track, &((struct floppy_drive_params32 *)arg)->read_track);
+			err |= __copy_from_user(f->autodetect, ((struct floppy_drive_params32 *)arg)->autodetect, sizeof(f->autodetect));
+			err |= __get_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
+			err |= __get_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
+			if (err) {
+				err = -EFAULT;
+				goto out;
+			}
+			break;
+		}
+		case FDGETDRVSTAT32:
+		case FDPOLLDRVSTAT32:
+			karg = kmalloc(sizeof(struct floppy_drive_struct), GFP_KERNEL);
+			if (!karg)
+				return -ENOMEM;
+			break;
+		case FDGETFDCSTAT32:
+			karg = kmalloc(sizeof(struct floppy_fdc_state), GFP_KERNEL);
+			if (!karg)
+				return -ENOMEM;
+			break;
+		case FDWERRORGET32:
+			karg = kmalloc(sizeof(struct floppy_write_errors), GFP_KERNEL);
+			if (!karg)
+				return -ENOMEM;
+			break;
+		default:
+			return -EINVAL;
+	}
+	set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, kcmd, (unsigned long)karg);
+	set_fs (old_fs);
+	if (err)
+		goto out;
+	switch (cmd) {
+		case FDGETPRM32:
+		{
+			struct floppy_struct *f = karg;
+
+			err = __put_user(f->size, &((struct floppy_struct32 *)arg)->size);
+			err |= __put_user(f->sect, &((struct floppy_struct32 *)arg)->sect);
+			err |= __put_user(f->head, &((struct floppy_struct32 *)arg)->head);
+			err |= __put_user(f->track, &((struct floppy_struct32 *)arg)->track);
+			err |= __put_user(f->stretch, &((struct floppy_struct32 *)arg)->stretch);
+			err |= __put_user(f->gap, &((struct floppy_struct32 *)arg)->gap);
+			err |= __put_user(f->rate, &((struct floppy_struct32 *)arg)->rate);
+			err |= __put_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
+			err |= __put_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
+			err |= __put_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
+			break;
+		}
+		case FDGETDRVPRM32:
+		{
+			struct floppy_drive_params *f = karg;
+
+			err = __put_user(f->cmos, &((struct floppy_drive_params32 *)arg)->cmos);
+			err |= __put_user(f->max_dtr, &((struct floppy_drive_params32 *)arg)->max_dtr);
+			err |= __put_user(f->hlt, &((struct floppy_drive_params32 *)arg)->hlt);
+			err |= __put_user(f->hut, &((struct floppy_drive_params32 *)arg)->hut);
+			err |= __put_user(f->srt, &((struct floppy_drive_params32 *)arg)->srt);
+			err |= __put_user(f->spinup, &((struct floppy_drive_params32 *)arg)->spinup);
+			err |= __put_user(f->spindown, &((struct floppy_drive_params32 *)arg)->spindown);
+			err |= __put_user(f->spindown_offset, &((struct floppy_drive_params32 *)arg)->spindown_offset);
+			err |= __put_user(f->select_delay, &((struct floppy_drive_params32 *)arg)->select_delay);
+			err |= __put_user(f->rps, &((struct floppy_drive_params32 *)arg)->rps);
+			err |= __put_user(f->tracks, &((struct floppy_drive_params32 *)arg)->tracks);
+			err |= __put_user(f->timeout, &((struct floppy_drive_params32 *)arg)->timeout);
+			err |= __put_user(f->interleave_sect, &((struct floppy_drive_params32 *)arg)->interleave_sect);
+			err |= __copy_to_user(&((struct floppy_drive_params32 *)arg)->max_errors, &f->max_errors, sizeof(f->max_errors));
+			err |= __put_user(f->flags, &((struct floppy_drive_params32 *)arg)->flags);
+			err |= __put_user(f->read_track, &((struct floppy_drive_params32 *)arg)->read_track);
+			err |= __copy_to_user(((struct floppy_drive_params32 *)arg)->autodetect, f->autodetect, sizeof(f->autodetect));
+			err |= __put_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
+			err |= __put_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
+			break;
+		}
+		case FDGETDRVSTAT32:
+		case FDPOLLDRVSTAT32:
+		{
+			struct floppy_drive_struct *f = karg;
+
+			err = __put_user(f->flags, &((struct floppy_drive_struct32 *)arg)->flags);
+			err |= __put_user(f->spinup_date, &((struct floppy_drive_struct32 *)arg)->spinup_date);
+			err |= __put_user(f->select_date, &((struct floppy_drive_struct32 *)arg)->select_date);
+			err |= __put_user(f->first_read_date, &((struct floppy_drive_struct32 *)arg)->first_read_date);
+			err |= __put_user(f->probed_format, &((struct floppy_drive_struct32 *)arg)->probed_format);
+			err |= __put_user(f->track, &((struct floppy_drive_struct32 *)arg)->track);
+			err |= __put_user(f->maxblock, &((struct floppy_drive_struct32 *)arg)->maxblock);
+			err |= __put_user(f->maxtrack, &((struct floppy_drive_struct32 *)arg)->maxtrack);
+			err |= __put_user(f->generation, &((struct floppy_drive_struct32 *)arg)->generation);
+			err |= __put_user(f->keep_data, &((struct floppy_drive_struct32 *)arg)->keep_data);
+			err |= __put_user(f->fd_ref, &((struct floppy_drive_struct32 *)arg)->fd_ref);
+			err |= __put_user(f->fd_device, &((struct floppy_drive_struct32 *)arg)->fd_device);
+			err |= __put_user(f->last_checked, &((struct floppy_drive_struct32 *)arg)->last_checked);
+			err |= __put_user((u64)f->dmabuf, &((struct floppy_drive_struct32 *)arg)->dmabuf);
+			err |= __put_user((u64)f->bufblocks, &((struct floppy_drive_struct32 *)arg)->bufblocks);
+			break;
+		}
+		case FDGETFDCSTAT32:
+		{
+			struct floppy_fdc_state *f = karg;
+
+			err = __put_user(f->spec1, &((struct floppy_fdc_state32 *)arg)->spec1);
+			err |= __put_user(f->spec2, &((struct floppy_fdc_state32 *)arg)->spec2);
+			err |= __put_user(f->dtr, &((struct floppy_fdc_state32 *)arg)->dtr);
+			err |= __put_user(f->version, &((struct floppy_fdc_state32 *)arg)->version);
+			err |= __put_user(f->dor, &((struct floppy_fdc_state32 *)arg)->dor);
+			err |= __put_user(f->address, &((struct floppy_fdc_state32 *)arg)->address);
+			err |= __copy_to_user((char *)&((struct floppy_fdc_state32 *)arg)->address
+			    		   + sizeof(((struct floppy_fdc_state32 *)arg)->address),
+					   (char *)&f->address + sizeof(f->address), sizeof(int));
+			err |= __put_user(f->driver_version, &((struct floppy_fdc_state32 *)arg)->driver_version);
+			err |= __copy_to_user(((struct floppy_fdc_state32 *)arg)->track, f->track, sizeof(f->track));
+			break;
+		}
+		case FDWERRORGET32:
+		{
+			struct floppy_write_errors *f = karg;
+
+			err = __put_user(f->write_errors, &((struct floppy_write_errors32 *)arg)->write_errors);
+			err |= __put_user(f->first_error_sector, &((struct floppy_write_errors32 *)arg)->first_error_sector);
+			err |= __put_user(f->first_error_generation, &((struct floppy_write_errors32 *)arg)->first_error_generation);
+			err |= __put_user(f->last_error_sector, &((struct floppy_write_errors32 *)arg)->last_error_sector);
+			err |= __put_user(f->last_error_generation, &((struct floppy_write_errors32 *)arg)->last_error_generation);
+			err |= __put_user(f->badness, &((struct floppy_write_errors32 *)arg)->badness);
+			break;
+		}
+		default:
+			break;
+	}
+	if (err)
+		err = -EFAULT;
+
+out:	if (karg) kfree(karg);
+	return err;
+}
+
+struct ppp_option_data32 {
+	__kernel_caddr_t32	ptr;
+	__u32			length;
+	int			transmit;
+};
+#define PPPIOCSCOMPRESS32	_IOW('t', 77, struct ppp_option_data32)
+
+struct ppp_idle32 {
+	__kernel_time_t32 xmit_idle;
+	__kernel_time_t32 recv_idle;
+};
+#define PPPIOCGIDLE32		_IOR('t', 63, struct ppp_idle32)
+
+static int ppp_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	struct ppp_option_data32 data32;
+	struct ppp_option_data data;
+	struct ppp_idle32 idle32;
+	struct ppp_idle idle;
+	unsigned int kcmd;
+	void *karg;
+	int err = 0;
+
+	switch (cmd) {
+	case PPPIOCGIDLE32:
+		kcmd = PPPIOCGIDLE;
+		karg = &idle;
+		break;
+	case PPPIOCSCOMPRESS32:
+		if (copy_from_user(&data32, (struct ppp_option_data32 *)arg, sizeof(struct ppp_option_data32)))
+			return -EFAULT;
+		data.ptr = kmalloc (data32.length, GFP_KERNEL);
+		if (!data.ptr)
+			return -ENOMEM;
+		if (copy_from_user(data.ptr, (__u8 *)A(data32.ptr), data32.length)) {
+			kfree(data.ptr);
+			return -EFAULT;
+		}
+		data.length = data32.length;
+		data.transmit = data32.transmit;
+		kcmd = PPPIOCSCOMPRESS;
+		karg = &data;
+		break;
+	default:
+		do {
+			static int count = 0;
+			if (++count <= 20)
+				printk(KERN_WARNING
+					"ppp_ioctl: Unknown cmd fd(%d) "
+					"cmd(%08x) arg(%08x)\n",
+					(int)fd, (unsigned int)cmd, (unsigned int)arg);
+		} while(0);
+		return -EINVAL;
+	}
+	set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, kcmd, (unsigned long)karg);
+	set_fs (old_fs);
+	switch (cmd) {
+	case PPPIOCGIDLE32:
+		if (err)
+			return err;
+		idle32.xmit_idle = idle.xmit_idle;
+		idle32.recv_idle = idle.recv_idle;
+		if (copy_to_user((struct ppp_idle32 *)arg, &idle32, sizeof(struct ppp_idle32)))
+			return -EFAULT;
+		break;
+	case PPPIOCSCOMPRESS32:
+		kfree(data.ptr);
+		break;
+	default:
+		break;
+	}
+	return err;
+}
+
+
+struct mtget32 {
+	__u32	mt_type;
+	__u32	mt_resid;
+	__u32	mt_dsreg;
+	__u32	mt_gstat;
+	__u32	mt_erreg;
+	__kernel_daddr_t32	mt_fileno;
+	__kernel_daddr_t32	mt_blkno;
+};
+#define MTIOCGET32	_IOR('m', 2, struct mtget32)
+
+struct mtpos32 {
+	__u32	mt_blkno;
+};
+#define MTIOCPOS32	_IOR('m', 3, struct mtpos32)
+
+struct mtconfiginfo32 {
+	__u32	mt_type;
+	__u32	ifc_type;
+	__u16	irqnr;
+	__u16	dmanr;
+	__u16	port;
+	__u32	debug;
+	__u32	have_dens:1;
+	__u32	have_bsf:1;
+	__u32	have_fsr:1;
+	__u32	have_bsr:1;
+	__u32	have_eod:1;
+	__u32	have_seek:1;
+	__u32	have_tell:1;
+	__u32	have_ras1:1;
+	__u32	have_ras2:1;
+	__u32	have_ras3:1;
+	__u32	have_qfa:1;
+	__u32	pad1:5;
+	char	reserved[10];
+};
+#define	MTIOCGETCONFIG32	_IOR('m', 4, struct mtconfiginfo32)
+#define	MTIOCSETCONFIG32	_IOW('m', 5, struct mtconfiginfo32)
+
+static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	struct mtconfiginfo info;
+	struct mtget get;
+	struct mtpos pos;
+	unsigned long kcmd;
+	void *karg;
+	int err = 0;
+
+	switch(cmd) {
+	case MTIOCPOS32:
+		kcmd = MTIOCPOS;
+		karg = &pos;
+		break;
+	case MTIOCGET32:
+		kcmd = MTIOCGET;
+		karg = &get;
+		break;
+	case MTIOCGETCONFIG32:
+		kcmd = MTIOCGETCONFIG;
+		karg = &info;
+		break;
+	case MTIOCSETCONFIG32:
+		kcmd = MTIOCSETCONFIG;
+		karg = &info;
+		err = __get_user(info.mt_type, &((struct mtconfiginfo32 *)arg)->mt_type);
+		err |= __get_user(info.ifc_type, &((struct mtconfiginfo32 *)arg)->ifc_type);
+		err |= __get_user(info.irqnr, &((struct mtconfiginfo32 *)arg)->irqnr);
+		err |= __get_user(info.dmanr, &((struct mtconfiginfo32 *)arg)->dmanr);
+		err |= __get_user(info.port, &((struct mtconfiginfo32 *)arg)->port);
+		err |= __get_user(info.debug, &((struct mtconfiginfo32 *)arg)->debug);
+		err |= __copy_from_user((char *)&info.debug + sizeof(info.debug),
+				     (char *)&((struct mtconfiginfo32 *)arg)->debug
+				     + sizeof(((struct mtconfiginfo32 *)arg)->debug), sizeof(__u32));
+		if (err)
+			return -EFAULT;
+		break;
+	default:
+		do {
+			static int count = 0;
+			if (++count <= 20)
+				printk(KERN_WARNING
+					"mt_ioctl: Unknown cmd fd(%d) "
+					"cmd(%08x) arg(%08x)\n",
+					(int)fd, (unsigned int)cmd, (unsigned int)arg);
+		} while(0);
+		return -EINVAL;
+	}
+	set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, kcmd, (unsigned long)karg);
+	set_fs (old_fs);
+	if (err)
+		return err;
+	switch (cmd) {
+	case MTIOCPOS32:
+		err = __put_user(pos.mt_blkno, &((struct mtpos32 *)arg)->mt_blkno);
+		break;
+	case MTIOCGET32:
+		err = __put_user(get.mt_type, &((struct mtget32 *)arg)->mt_type);
+		err |= __put_user(get.mt_resid, &((struct mtget32 *)arg)->mt_resid);
+		err |= __put_user(get.mt_dsreg, &((struct mtget32 *)arg)->mt_dsreg);
+		err |= __put_user(get.mt_gstat, &((struct mtget32 *)arg)->mt_gstat);
+		err |= __put_user(get.mt_erreg, &((struct mtget32 *)arg)->mt_erreg);
+		err |= __put_user(get.mt_fileno, &((struct mtget32 *)arg)->mt_fileno);
+		err |= __put_user(get.mt_blkno, &((struct mtget32 *)arg)->mt_blkno);
+		break;
+	case MTIOCGETCONFIG32:
+		err = __put_user(info.mt_type, &((struct mtconfiginfo32 *)arg)->mt_type);
+		err |= __put_user(info.ifc_type, &((struct mtconfiginfo32 *)arg)->ifc_type);
+		err |= __put_user(info.irqnr, &((struct mtconfiginfo32 *)arg)->irqnr);
+		err |= __put_user(info.dmanr, &((struct mtconfiginfo32 *)arg)->dmanr);
+		err |= __put_user(info.port, &((struct mtconfiginfo32 *)arg)->port);
+		err |= __put_user(info.debug, &((struct mtconfiginfo32 *)arg)->debug);
+		err |= __copy_to_user((char *)&((struct mtconfiginfo32 *)arg)->debug
+			    		   + sizeof(((struct mtconfiginfo32 *)arg)->debug),
+					   (char *)&info.debug + sizeof(info.debug), sizeof(__u32));
+		break;
+	case MTIOCSETCONFIG32:
+		break;
+	}
+	return err ? -EFAULT: 0;
+}
+
+struct cdrom_read32 {
+	int			cdread_lba;
+	__kernel_caddr_t32	cdread_bufaddr;
+	int			cdread_buflen;
+};
+
+struct cdrom_read_audio32 {
+	union cdrom_addr	addr;
+	u_char			addr_format;
+	int			nframes;
+	__kernel_caddr_t32	buf;
+};
+
+struct cdrom_generic_command32 {
+	unsigned char		cmd[CDROM_PACKET_SIZE];
+	__kernel_caddr_t32	buffer;
+	unsigned int		buflen;
+	int			stat;
+	__kernel_caddr_t32	sense;
+	__kernel_caddr_t32	reserved[3];
+};
+
+static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	struct cdrom_read cdread;
+	struct cdrom_read_audio cdreadaudio;
+	struct cdrom_generic_command cgc;
+	__kernel_caddr_t32 addr;
+	char *data = 0;
+	void *karg;
+	int err = 0;
+
+	switch(cmd) {
+	case CDROMREADMODE2:
+	case CDROMREADMODE1:
+	case CDROMREADRAW:
+	case CDROMREADCOOKED:
+		karg = &cdread;
+		err = __get_user(cdread.cdread_lba, &((struct cdrom_read32 *)arg)->cdread_lba);
+		err |= __get_user(addr, &((struct cdrom_read32 *)arg)->cdread_bufaddr);
+		err |= __get_user(cdread.cdread_buflen, &((struct cdrom_read32 *)arg)->cdread_buflen);
+		if (err)
+			return -EFAULT;
+		data = kmalloc(cdread.cdread_buflen, GFP_KERNEL);
+		if (!data)
+			return -ENOMEM;
+		cdread.cdread_bufaddr = data;
+		break;
+	case CDROMREADAUDIO:
+		karg = &cdreadaudio;
+		err = copy_from_user(&cdreadaudio.addr, &((struct cdrom_read_audio32 *)arg)->addr, sizeof(cdreadaudio.addr));
+		err |= __get_user(cdreadaudio.addr_format, &((struct cdrom_read_audio32 *)arg)->addr_format);
+		err |= __get_user(cdreadaudio.nframes, &((struct cdrom_read_audio32 *)arg)->nframes); 
+		err |= __get_user(addr, &((struct cdrom_read_audio32 *)arg)->buf);
+		if (err)
+			return -EFAULT;
+		data = kmalloc(cdreadaudio.nframes * 2352, GFP_KERNEL);
+		if (!data)
+			return -ENOMEM;
+		cdreadaudio.buf = data;
+		break;
+	case CDROM_SEND_PACKET:
+		karg = &cgc;
+		err = copy_from_user(cgc.cmd, &((struct cdrom_generic_command32 *)arg)->cmd, sizeof(cgc.cmd));
+		err |= __get_user(addr, &((struct cdrom_generic_command32 *)arg)->buffer);
+		err |= __get_user(cgc.buflen, &((struct cdrom_generic_command32 *)arg)->buflen);
+		if (err)
+			return -EFAULT;
+		if ((data = kmalloc(cgc.buflen, GFP_KERNEL)) == NULL)
+			return -ENOMEM;
+		cgc.buffer = data;
+		break;
+	default:
+		do {
+			static int count = 0;
+			if (++count <= 20)
+				printk(KERN_WARNING
+					"cdrom_ioctl: Unknown cmd fd(%d) "
+					"cmd(%08x) arg(%08x)\n",
+					(int)fd, (unsigned int)cmd, (unsigned int)arg);
+		} while(0);
+		return -EINVAL;
+	}
+	set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, cmd, (unsigned long)karg);
+	set_fs (old_fs);
+	if (err)
+		goto out;
+	switch (cmd) {
+	case CDROMREADMODE2:
+	case CDROMREADMODE1:
+	case CDROMREADRAW:
+	case CDROMREADCOOKED:
+		err = copy_to_user((char *)A(addr), data, cdread.cdread_buflen);
+		break;
+	case CDROMREADAUDIO:
+		err = copy_to_user((char *)A(addr), data, cdreadaudio.nframes * 2352);
+		break;
+	case CDROM_SEND_PACKET:
+		err = copy_to_user((char *)A(addr), data, cgc.buflen);
+		break;
+	default:
+		break;
+	}
+out:	if (data)
+		kfree(data);
+	return err ? -EFAULT : 0;
+}
+
+struct loop_info32 {
+	int			lo_number;      /* ioctl r/o */
+	__kernel_dev_t32	lo_device;      /* ioctl r/o */
+	unsigned int		lo_inode;       /* ioctl r/o */
+	__kernel_dev_t32	lo_rdevice;     /* ioctl r/o */
+	int			lo_offset;
+	int			lo_encrypt_type;
+	int			lo_encrypt_key_size;    /* ioctl w/o */
+	int			lo_flags;       /* ioctl r/o */
+	char			lo_name[LO_NAME_SIZE];
+	unsigned char		lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
+	unsigned int		lo_init[2];
+	char			reserved[4];
+};
+
+static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	struct loop_info l;
+	int err = -EINVAL;
+
+	switch(cmd) {
+	case LOOP_SET_STATUS:
+		err = get_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
+		err |= __get_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
+		err |= __get_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
+		err |= __get_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
+		err |= __copy_from_user((char *)&l.lo_offset, (char *)&((struct loop_info32 *)arg)->lo_offset,
+					   8 + (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
+		if (err) {
+			err = -EFAULT;
+		} else {
+			set_fs (KERNEL_DS);
+			err = sys_ioctl (fd, cmd, (unsigned long)&l);
+			set_fs (old_fs);
+		}
+		break;
+	case LOOP_GET_STATUS:
+		set_fs (KERNEL_DS);
+		err = sys_ioctl (fd, cmd, (unsigned long)&l);
+		set_fs (old_fs);
+		if (!err) {
+			err = put_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
+			err |= __put_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
+			err |= __put_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
+			err |= __put_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
+			err |= __copy_to_user((char *)&((struct loop_info32 *)arg)->lo_offset,
+					   (char *)&l.lo_offset, (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
+			if (err)
+				err = -EFAULT;
+		}
+		break;
+	default: {
+		static int count = 0;
+		if (++count <= 20)
+			printk(KERN_WARNING
+				"%s: Unknown loop ioctl cmd, fd(%d) "
+				"cmd(%08x) arg(%08lx)\n",
+				__FUNCTION__, fd, cmd, arg);
+	}
+	}
+	return err;
+}
+
+#ifdef CONFIG_VT
+extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg);
+
+static int vt_check(struct file *file)
+{
+	struct tty_struct *tty;
+	struct inode *inode = file->f_dentry->d_inode;
+	
+	if (file->f_op->ioctl != tty_ioctl)
+		return -EINVAL;
+	                
+	tty = (struct tty_struct *)file->private_data;
+	if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
+		return -EINVAL;
+	                                                
+	if (tty->driver.ioctl != vt_ioctl)
+		return -EINVAL;
+	
+	/*
+	 * To have permissions to do most of the vt ioctls, we either have
+	 * to be the owner of the tty, or have CAP_SYS_TTY_CONFIG
+	 */
+	if (current->tty == tty || capable(CAP_SYS_TTY_CONFIG))
+		return 1;
+	return 0;                                                    
+}
+
+struct consolefontdesc32 {
+	unsigned short charcount;       /* characters in font (256 or 512) */
+	unsigned short charheight;      /* scan lines per character (1-32) */
+	u32 chardata;			/* font data in expanded form */
+};
+
+static int do_fontx_ioctl(unsigned int fd, int cmd, struct consolefontdesc32 *user_cfd, struct file *file)
+{
+	struct consolefontdesc cfdarg;
+	struct console_font_op op;
+	int i, perm;
+
+	perm = vt_check(file);
+	if (perm < 0) return perm;
+	
+	if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc32)))
+		return -EFAULT;
+	
+	cfdarg.chardata = (unsigned char *)A(((struct consolefontdesc32 *)&cfdarg)->chardata);
+ 	
+	switch (cmd) {
+	case PIO_FONTX:
+		if (!perm)
+			return -EPERM;
+		op.op = KD_FONT_OP_SET;
+		op.flags = 0;
+		op.width = 8;
+		op.height = cfdarg.charheight;
+		op.charcount = cfdarg.charcount;
+		op.data = cfdarg.chardata;
+		return con_font_op(fg_console, &op);
+	case GIO_FONTX:
+		if (!cfdarg.chardata)
+			return 0;
+		op.op = KD_FONT_OP_GET;
+		op.flags = 0;
+		op.width = 8;
+		op.height = cfdarg.charheight;
+		op.charcount = cfdarg.charcount;
+		op.data = cfdarg.chardata;
+		i = con_font_op(fg_console, &op);
+		if (i)
+			return i;
+		cfdarg.charheight = op.height;
+		cfdarg.charcount = op.charcount;
+		((struct consolefontdesc32 *)&cfdarg)->chardata	= (unsigned long)cfdarg.chardata;
+		if (copy_to_user(user_cfd, &cfdarg, sizeof(struct consolefontdesc32)))
+			return -EFAULT;
+		return 0;
+	}
+	return -EINVAL;
+}
+
+struct console_font_op32 {
+	unsigned int op;        /* operation code KD_FONT_OP_* */
+	unsigned int flags;     /* KD_FONT_FLAG_* */
+	unsigned int width, height;     /* font size */
+	unsigned int charcount;
+	u32 data;    /* font data with height fixed to 32 */
+};
+                                        
+static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, struct console_font_op32 *fontop, struct file *file)
+{
+	struct console_font_op op;
+	int perm = vt_check(file), i;
+	struct vt_struct *vt;
+	
+	if (perm < 0) return perm;
+	
+	if (copy_from_user(&op, (void *) fontop, sizeof(struct console_font_op32)))
+		return -EFAULT;
+	if (!perm && op.op != KD_FONT_OP_GET)
+		return -EPERM;
+	op.data = (unsigned char *)A(((struct console_font_op32 *)&op)->data);
+	op.flags |= KD_FONT_FLAG_OLD;
+	vt = (struct vt_struct *)((struct tty_struct *)file->private_data)->driver_data;
+	i = con_font_op(vt->vc_num, &op);
+	if (i) return i;
+	((struct console_font_op32 *)&op)->data = (unsigned long)op.data;
+	if (copy_to_user((void *) fontop, &op, sizeof(struct console_font_op32)))
+		return -EFAULT;
+	return 0;
+}
+
+struct unimapdesc32 {
+	unsigned short entry_ct;
+	u32 entries;
+};
+
+static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc32 *user_ud, struct file *file)
+{
+	struct unimapdesc32 tmp;
+	int perm = vt_check(file);
+	
+	if (perm < 0) return perm;
+	if (copy_from_user(&tmp, user_ud, sizeof tmp))
+		return -EFAULT;
+	switch (cmd) {
+	case PIO_UNIMAP:
+		if (!perm) return -EPERM;
+		return con_set_unimap(fg_console, tmp.entry_ct, (struct unipair *)A(tmp.entries));
+	case GIO_UNIMAP:
+		return con_get_unimap(fg_console, tmp.entry_ct, &(user_ud->entry_ct), (struct unipair *)A(tmp.entries));
+	}
+	return 0;
+}
+#endif
+
+#if 0
+static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	__kernel_uid_t kuid;
+	int err;
+
+	cmd = SMB_IOC_GETMOUNTUID;
+
+	set_fs(KERNEL_DS);
+	err = sys_ioctl(fd, cmd, (unsigned long)&kuid);
+	set_fs(old_fs);
+
+	if (err >= 0)
+		err = put_user(kuid, (__kernel_uid_t32 *)arg);
+
+	return err;
+}
+#endif
+
+struct atmif_sioc32 {
+        int                number;
+        int                length;
+        __kernel_caddr_t32 arg;
+};
+
+struct atm_iobuf32 {
+	int                length;
+	__kernel_caddr_t32 buffer;
+};
+
+#define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
+#define ATM_GETNAMES32    _IOW('a', ATMIOC_ITF+3, struct atm_iobuf32)
+#define ATM_GETTYPE32     _IOW('a', ATMIOC_ITF+4, struct atmif_sioc32)
+#define ATM_GETESI32	  _IOW('a', ATMIOC_ITF+5, struct atmif_sioc32)
+#define ATM_GETADDR32	  _IOW('a', ATMIOC_ITF+6, struct atmif_sioc32)
+#define ATM_RSTADDR32	  _IOW('a', ATMIOC_ITF+7, struct atmif_sioc32)
+#define ATM_ADDADDR32	  _IOW('a', ATMIOC_ITF+8, struct atmif_sioc32)
+#define ATM_DELADDR32	  _IOW('a', ATMIOC_ITF+9, struct atmif_sioc32)
+#define ATM_GETCIRANGE32  _IOW('a', ATMIOC_ITF+10, struct atmif_sioc32)
+#define ATM_SETCIRANGE32  _IOW('a', ATMIOC_ITF+11, struct atmif_sioc32)
+#define ATM_SETESI32      _IOW('a', ATMIOC_ITF+12, struct atmif_sioc32)
+#define ATM_SETESIF32     _IOW('a', ATMIOC_ITF+13, struct atmif_sioc32)
+#define ATM_GETSTAT32     _IOW('a', ATMIOC_SARCOM+0, struct atmif_sioc32)
+#define ATM_GETSTATZ32    _IOW('a', ATMIOC_SARCOM+1, struct atmif_sioc32)
+#define ATM_GETLOOP32	  _IOW('a', ATMIOC_SARCOM+2, struct atmif_sioc32)
+#define ATM_SETLOOP32	  _IOW('a', ATMIOC_SARCOM+3, struct atmif_sioc32)
+#define ATM_QUERYLOOP32	  _IOW('a', ATMIOC_SARCOM+4, struct atmif_sioc32)
+
+static struct {
+        unsigned int cmd32;
+        unsigned int cmd;
+} atm_ioctl_map[] = {
+        { ATM_GETLINKRATE32, ATM_GETLINKRATE },
+	{ ATM_GETNAMES32,    ATM_GETNAMES },
+        { ATM_GETTYPE32,     ATM_GETTYPE },
+        { ATM_GETESI32,      ATM_GETESI },
+        { ATM_GETADDR32,     ATM_GETADDR },
+        { ATM_RSTADDR32,     ATM_RSTADDR },
+        { ATM_ADDADDR32,     ATM_ADDADDR },
+        { ATM_DELADDR32,     ATM_DELADDR },
+        { ATM_GETCIRANGE32,  ATM_GETCIRANGE },
+	{ ATM_SETCIRANGE32,  ATM_SETCIRANGE },
+	{ ATM_SETESI32,      ATM_SETESI },
+	{ ATM_SETESIF32,     ATM_SETESIF },
+	{ ATM_GETSTAT32,     ATM_GETSTAT },
+	{ ATM_GETSTATZ32,    ATM_GETSTATZ },
+	{ ATM_GETLOOP32,     ATM_GETLOOP },
+	{ ATM_SETLOOP32,     ATM_SETLOOP },
+	{ ATM_QUERYLOOP32,   ATM_QUERYLOOP }
+};
+
+#define NR_ATM_IOCTL (sizeof(atm_ioctl_map)/sizeof(atm_ioctl_map[0]))
+
+
+static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct atm_iobuf32 iobuf32;
+	struct atm_iobuf   iobuf = { 0, NULL };
+	mm_segment_t old_fs;
+	int err;
+
+	err = copy_from_user(&iobuf32, (struct atm_iobuf32*)arg,
+	    sizeof(struct atm_iobuf32));
+	if (err)
+		return -EFAULT;
+
+	iobuf.length = iobuf32.length;
+
+	if (iobuf32.buffer == (__kernel_caddr_t32) NULL || iobuf32.length == 0) {
+		iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
+	} else {
+		iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
+		if (iobuf.buffer == NULL) {
+			err = -ENOMEM;
+			goto out;
+		}
+
+		err = copy_from_user(iobuf.buffer, B(iobuf32.buffer), iobuf.length);
+		if (err) {
+			err = -EFAULT;
+			goto out;
+		}
+	}
+
+	old_fs = get_fs(); set_fs (KERNEL_DS);
+	err = sys_ioctl (fd, cmd, (unsigned long)&iobuf);      
+	set_fs (old_fs);
+        if(err)
+		goto out;
+
+        if(iobuf.buffer && iobuf.length > 0) {
+		err = copy_to_user(B(iobuf32.buffer), iobuf.buffer, iobuf.length);
+		if (err) {
+			err = -EFAULT;
+			goto out;
+		}
+	}
+	err = __put_user(iobuf.length, &(((struct atm_iobuf32*)arg)->length));
+
+ out:
+        if(iobuf32.buffer && iobuf32.length > 0)
+		kfree(iobuf.buffer);
+
+	return err;
+}
+
+
+static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+        struct atmif_sioc32 sioc32;
+        struct atmif_sioc   sioc = { 0, 0, NULL };
+        mm_segment_t old_fs;
+        int err;
+        
+        err = copy_from_user(&sioc32, (struct atmif_sioc32*)arg,
+			     sizeof(struct atmif_sioc32));
+        if (err)
+                return -EFAULT;
+
+        sioc.number = sioc32.number;
+        sioc.length = sioc32.length;
+        
+	if (sioc32.arg == (__kernel_caddr_t32) NULL || sioc32.length == 0) {
+		sioc.arg = (void*)(unsigned long)sioc32.arg;
+        } else {
+                sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
+                if (sioc.arg == NULL) {
+                        err = -ENOMEM;
+			goto out;
+		}
+                
+                err = copy_from_user(sioc.arg, B(sioc32.arg), sioc32.length);
+                if (err) {
+                        err = -EFAULT;
+                        goto out;
+                }
+        }
+        
+        old_fs = get_fs(); set_fs (KERNEL_DS);
+        err = sys_ioctl (fd, cmd, (unsigned long)&sioc);	
+        set_fs (old_fs);
+        if(err) {
+                goto out;
+	}
+        
+        if(sioc.arg && sioc.length > 0) {
+                err = copy_to_user(B(sioc32.arg), sioc.arg, sioc.length);
+                if (err) {
+                        err = -EFAULT;
+                        goto out;
+                }
+        }
+        err = __put_user(sioc.length, &(((struct atmif_sioc32*)arg)->length));
+        
+ out:
+        if(sioc32.arg && sioc32.length > 0)
+		kfree(sioc.arg);
+        
+	return err;
+}
+
+
+static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg)
+{
+        int i;
+        unsigned int cmd = 0;
+        
+	switch (cmd32) {
+	case SONET_GETSTAT:
+	case SONET_GETSTATZ:
+	case SONET_GETDIAG:
+	case SONET_SETDIAG:
+	case SONET_CLRDIAG:
+	case SONET_SETFRAMING:
+	case SONET_GETFRAMING:
+	case SONET_GETFRSENSE:
+		return do_atmif_sioc(fd, cmd32, arg);
+	}
+
+		for (i = 0; i < NR_ATM_IOCTL; i++) {
+			if (cmd32 == atm_ioctl_map[i].cmd32) {
+				cmd = atm_ioctl_map[i].cmd;
+				break;
+			}
+		}
+	        if (i == NR_ATM_IOCTL) {
+	        return -EINVAL;
+	        }
+        
+        switch (cmd) {
+	case ATM_GETNAMES:
+		return do_atm_iobuf(fd, cmd, arg);
+	    
+	case ATM_GETLINKRATE:
+        case ATM_GETTYPE:
+        case ATM_GETESI:
+        case ATM_GETADDR:
+        case ATM_RSTADDR:
+        case ATM_ADDADDR:
+        case ATM_DELADDR:
+        case ATM_GETCIRANGE:
+	case ATM_SETCIRANGE:
+	case ATM_SETESI:
+	case ATM_SETESIF:
+	case ATM_GETSTAT:
+	case ATM_GETSTATZ:
+	case ATM_GETLOOP:
+	case ATM_SETLOOP:
+	case ATM_QUERYLOOP:
+                return do_atmif_sioc(fd, cmd, arg);
+        }
+
+        return -EINVAL;
+}
+
+#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
+/* Ugh, LVM. Pitty it was not cleaned up before accepted :((. */
+typedef struct {
+	uint8_t vg_name[NAME_LEN];
+	uint32_t vg_number;
+	uint32_t vg_access;
+	uint32_t vg_status;
+	uint32_t lv_max;
+	uint32_t lv_cur;
+	uint32_t lv_open;
+	uint32_t pv_max;
+	uint32_t pv_cur;
+	uint32_t pv_act;
+	uint32_t dummy;
+	uint32_t vgda;
+	uint32_t pe_size;
+	uint32_t pe_total;
+	uint32_t pe_allocated;
+	uint32_t pvg_total;
+	u32 proc;
+	u32 pv[ABS_MAX_PV + 1];
+	u32 lv[ABS_MAX_LV + 1];
+    	uint8_t vg_uuid[UUID_LEN+1];	/* volume group UUID */
+	uint8_t dummy1[200];
+} vg32_t;
+
+typedef struct {
+	uint8_t id[2];
+	uint16_t version;
+	lvm_disk_data_t pv_on_disk;
+	lvm_disk_data_t vg_on_disk;
+	lvm_disk_data_t pv_namelist_on_disk;
+	lvm_disk_data_t lv_on_disk;
+	lvm_disk_data_t pe_on_disk;
+	uint8_t pv_name[NAME_LEN];
+	uint8_t vg_name[NAME_LEN];
+	uint8_t system_id[NAME_LEN];
+	kdev_t pv_dev;
+	uint32_t pv_number;
+	uint32_t pv_status;
+	uint32_t pv_allocatable;
+	uint32_t pv_size;
+	uint32_t lv_cur;
+	uint32_t pe_size;
+	uint32_t pe_total;
+	uint32_t pe_allocated;
+	uint32_t pe_stale;
+	u32 pe;
+	u32 inode;
+	uint8_t pv_uuid[UUID_LEN+1];
+} pv32_t;
+
+typedef struct {
+	char lv_name[NAME_LEN];
+	u32 lv;
+} lv_req32_t;
+
+typedef struct {
+	u32 lv_index;
+	u32 lv;
+	/* Transfer size because user space and kernel space differ */
+	uint16_t size;
+} lv_status_byindex_req32_t;
+
+typedef struct {
+	__kernel_dev_t32 dev;
+	u32   lv;
+} lv_status_bydev_req32_t;
+
+typedef struct {
+	uint8_t lv_name[NAME_LEN];
+	kdev_t old_dev;
+	kdev_t new_dev;
+	u32 old_pe;
+	u32 new_pe;
+} le_remap_req32_t;
+
+typedef struct {
+	char pv_name[NAME_LEN];
+	u32 pv;
+} pv_status_req32_t;
+
+typedef struct {
+	uint8_t lv_name[NAME_LEN];
+	uint8_t vg_name[NAME_LEN];
+	uint32_t lv_access;
+	uint32_t lv_status;
+	uint32_t lv_open;
+	kdev_t lv_dev;
+	uint32_t lv_number;
+	uint32_t lv_mirror_copies;
+	uint32_t lv_recovery;
+	uint32_t lv_schedule;
+	uint32_t lv_size;
+	u32 lv_current_pe;
+	uint32_t lv_current_le;
+	uint32_t lv_allocated_le;
+	uint32_t lv_stripes;
+	uint32_t lv_stripesize;
+	uint32_t lv_badblock;
+	uint32_t lv_allocation;
+	uint32_t lv_io_timeout;
+	uint32_t lv_read_ahead;
+	/* delta to version 1 starts here */
+	u32 lv_snapshot_org;
+	u32 lv_snapshot_prev;
+	u32 lv_snapshot_next;
+	u32 lv_block_exception;
+	uint32_t lv_remap_ptr;
+	uint32_t lv_remap_end;
+	uint32_t lv_chunk_size;
+	uint32_t lv_snapshot_minor;
+	char dummy[200];
+} lv32_t;
+
+typedef struct {
+	u32 hash[2];
+	u32 rsector_org;
+	kdev_t rdev_org;
+	u32 rsector_new;
+	kdev_t rdev_new;
+} lv_block_exception32_t;
+
+static void put_lv_t(lv_t *l)
+{
+	if (l->lv_current_pe) vfree(l->lv_current_pe);
+	if (l->lv_block_exception) vfree(l->lv_block_exception);
+	kfree(l);
+}
+
+static lv_t *get_lv_t(u32 p, int *errp)
+{
+	int err, i;
+	u32 ptr1, ptr2;
+	size_t size;
+	lv_block_exception32_t *lbe32;
+	lv_block_exception_t *lbe;
+	lv32_t *ul = (lv32_t *)A(p);
+	lv_t *l = (lv_t *) kmalloc(sizeof(lv_t), GFP_KERNEL);
+
+	if (!l) {
+		*errp = -ENOMEM;
+		return NULL;
+	}
+	memset(l, 0, sizeof(lv_t));
+	err = copy_from_user(l, ul, (long)&((lv32_t *)0)->lv_current_pe);
+	err |= __copy_from_user(&l->lv_current_le, &ul->lv_current_le,
+				((long)&ul->lv_snapshot_org) - ((long)&ul->lv_current_le));
+	err |= __copy_from_user(&l->lv_remap_ptr, &ul->lv_remap_ptr,
+				((long)&ul->dummy[0]) - ((long)&ul->lv_remap_ptr));
+	err |= __get_user(ptr1, &ul->lv_current_pe);
+	err |= __get_user(ptr2, &ul->lv_block_exception);
+	if (err) {
+		kfree(l);
+		*errp = -EFAULT;
+		return NULL;
+	}
+	if (ptr1) {
+		size = l->lv_allocated_le * sizeof(pe_t);
+		l->lv_current_pe = vmalloc(size);
+		if (l->lv_current_pe)
+			err = copy_from_user(l->lv_current_pe, (void *)A(ptr1), size);
+	}
+	if (!err && ptr2) {
+		size = l->lv_remap_end * sizeof(lv_block_exception_t);
+		l->lv_block_exception = lbe = vmalloc(size);
+		if (l->lv_block_exception) {
+			lbe32 = (lv_block_exception32_t *)A(ptr2);
+			memset(lbe, 0, size);
+			for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) {
+				err |= get_user(lbe->rsector_org, &lbe32->rsector_org);
+				err |= __get_user(lbe->rdev_org, &lbe32->rdev_org);
+				err |= __get_user(lbe->rsector_new, &lbe32->rsector_new);
+				err |= __get_user(lbe->rdev_new, &lbe32->rdev_new);
+			}
+		}
+	}
+	if (err || (ptr1 && !l->lv_current_pe) || (ptr2 && !l->lv_block_exception)) {
+		if (!err)
+			*errp = -ENOMEM;
+		else
+			*errp = -EFAULT;
+		put_lv_t(l);
+		return NULL;
+	}
+	return l;
+}
+
+static int copy_lv_t(u32 ptr, lv_t *l)
+{
+	int err;
+	lv32_t *ul = (lv32_t *)A(ptr);
+	u32 ptr1;
+	size_t size;
+
+	err = get_user(ptr1, &ul->lv_current_pe);
+	if (err)
+		return -EFAULT;
+	err = copy_to_user(ul, l, (long)&((lv32_t *)0)->lv_current_pe);
+	err |= __copy_to_user(&ul->lv_current_le, &l->lv_current_le,
+				((long)&ul->lv_snapshot_org) - ((long)&ul->lv_current_le));
+	err |= __copy_to_user(&ul->lv_remap_ptr, &l->lv_remap_ptr,
+				((long)&ul->dummy[0]) - ((long)&ul->lv_remap_ptr));
+	size = l->lv_allocated_le * sizeof(pe_t);
+	if (ptr1)
+		err |= __copy_to_user((void *)A(ptr1), l->lv_current_pe, size);
+	return err ? -EFAULT : 0;
+}
+
+static int do_lvm_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	vg_t *v = NULL;
+	union {
+		lv_req_t lv_req;
+		le_remap_req_t le_remap;
+		lv_status_byindex_req_t lv_byindex;
+	        lv_status_bydev_req_t lv_bydev;
+		pv_status_req_t pv_status;
+	} u;
+	pv_t p;
+	int err;
+	u32 ptr = 0;
+	int i;
+	mm_segment_t old_fs;
+	void *karg = &u;
+
+	switch (cmd) {
+	case VG_STATUS:
+		v = kmalloc(sizeof(vg_t), GFP_KERNEL);
+		if (!v)
+			return -ENOMEM;
+		karg = v;
+		break;
+
+	case VG_CREATE_OLD:
+	case VG_CREATE:
+		v = kmalloc(sizeof(vg_t), GFP_KERNEL);
+		if (!v)
+			return -ENOMEM;
+		if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc)) {
+			kfree(v);
+			return -EFAULT;
+		}
+		/* 'proc' field is unused, just NULL it out. */
+		v->proc = NULL;
+		if (copy_from_user(v->vg_uuid, ((vg32_t *)arg)->vg_uuid, UUID_LEN+1)) {
+			kfree(v);
+			return -EFAULT;
+		}
+		    
+		karg = v;
+		memset(v->pv, 0, sizeof(v->pv) + sizeof(v->lv));
+		if (v->pv_max > ABS_MAX_PV || v->lv_max > ABS_MAX_LV)
+			return -EPERM;
+		for (i = 0; i < v->pv_max; i++) {
+			err = __get_user(ptr, &((vg32_t *)arg)->pv[i]);
+			if (err)
+				break;
+			if (ptr) {
+				v->pv[i] = kmalloc(sizeof(pv_t), GFP_KERNEL);
+				if (!v->pv[i]) {
+					err = -ENOMEM;
+					break;
+				}
+				err = copy_from_user(v->pv[i], (void *)A(ptr),
+						     sizeof(pv32_t) - 8 - UUID_LEN+1);
+				if (err) {
+					err = -EFAULT;
+					break;
+				}
+				err = copy_from_user(v->pv[i]->pv_uuid,
+						     ((pv32_t *)A(ptr))->pv_uuid,
+						     UUID_LEN+1);
+				if (err) {
+				        err = -EFAULT;
+					break;
+				}
+
+				v->pv[i]->pe = NULL;
+				v->pv[i]->bd = NULL;
+			}
+		}
+		if (!err) {
+			for (i = 0; i < v->lv_max; i++) {
+				err = __get_user(ptr, &((vg32_t *)arg)->lv[i]);
+				if (err)
+					break;
+				if (ptr) {
+					v->lv[i] = get_lv_t(ptr, &err);
+					if (err)
+						break;
+				}
+			}
+		}
+		break;
+
+	case LV_CREATE:
+	case LV_EXTEND:
+	case LV_REDUCE:
+	case LV_REMOVE:
+	case LV_RENAME:
+	case LV_STATUS_BYNAME:
+	        err = copy_from_user(&u.pv_status, arg, sizeof(u.pv_status.pv_name));
+		if (err)
+			return -EFAULT;
+		if (cmd != LV_REMOVE) {
+			err = __get_user(ptr, &((lv_req32_t *)arg)->lv);
+			if (err)
+				return err;
+			u.lv_req.lv = get_lv_t(ptr, &err);
+		} else
+			u.lv_req.lv = NULL;
+		break;
+
+	case LV_STATUS_BYINDEX:
+		err = get_user(u.lv_byindex.lv_index,
+			       &((lv_status_byindex_req32_t *)arg)->lv_index);
+		err |= __get_user(ptr, &((lv_status_byindex_req32_t *)arg)->lv);
+		if (err)
+			return err;
+		u.lv_byindex.lv = get_lv_t(ptr, &err);
+		break;
+
+	case LV_STATUS_BYDEV:
+	        err = get_user(u.lv_bydev.dev, &((lv_status_bydev_req32_t *)arg)->dev);
+		err |= __get_user(ptr, &((lv_status_bydev_req32_t *)arg)->lv);
+		if (err)
+			return err;
+		u.lv_bydev.lv = get_lv_t(ptr, &err);
+		break;
+
+	case VG_EXTEND:
+		err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1);
+		if (err)
+			return -EFAULT;
+		err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1);
+		if (err)
+			return -EFAULT;
+		p.pe = NULL;
+		p.bd = NULL;
+		karg = &p;
+		break;
+
+	case PV_CHANGE:
+	case PV_STATUS:
+		err = copy_from_user(&u.pv_status, arg, sizeof(u.lv_req.lv_name));
+		if (err)
+			return -EFAULT;
+		err = __get_user(ptr, &((pv_status_req32_t *)arg)->pv);
+		if (err)
+			return err;
+		u.pv_status.pv = &p;
+		if (cmd == PV_CHANGE) {
+			err = copy_from_user(&p, (void *)A(ptr),
+					     sizeof(pv32_t) - 8 - UUID_LEN+1);
+			if (err)
+				return -EFAULT;
+			p.pe = NULL;
+			p.bd = NULL;
+		}
+		break;
+	};
+
+        old_fs = get_fs(); set_fs (KERNEL_DS);
+        err = sys_ioctl (fd, cmd, (unsigned long)karg);
+        set_fs (old_fs);
+
+	switch (cmd) {
+	case VG_STATUS:
+		if (!err) {
+			if (copy_to_user((void *)arg, v, (long)&((vg32_t *)0)->proc) ||
+			    clear_user(&((vg32_t *)arg)->proc, sizeof(vg32_t) - (long)&((vg32_t *)0)->proc))
+				err = -EFAULT;
+		}
+		if (copy_to_user(((vg32_t *)arg)->vg_uuid, v->vg_uuid, UUID_LEN+1)) {
+		        err = -EFAULT;
+		}
+		kfree(v);
+		break;
+
+	case VG_CREATE_OLD:
+	case VG_CREATE:
+		for (i = 0; i < v->pv_max; i++) {
+			if (v->pv[i])
+				kfree(v->pv[i]);
+		}
+		for (i = 0; i < v->lv_max; i++) {
+			if (v->lv[i])
+				put_lv_t(v->lv[i]);
+		}
+		kfree(v);
+		break;
+
+	case LV_STATUS_BYNAME:
+		if (!err && u.lv_req.lv)
+			err = copy_lv_t(ptr, u.lv_req.lv);
+		/* Fall through */
+
+        case LV_CREATE:
+	case LV_EXTEND:
+	case LV_REDUCE:
+		if (u.lv_req.lv)
+			put_lv_t(u.lv_req.lv);
+		break;
+
+	case LV_STATUS_BYINDEX:
+		if (u.lv_byindex.lv) {
+			if (!err)
+				err = copy_lv_t(ptr, u.lv_byindex.lv);
+			put_lv_t(u.lv_byindex.lv);
+		}
+		break;
+
+	case LV_STATUS_BYDEV:
+	        if (u.lv_bydev.lv) {
+			if (!err)
+				err = copy_lv_t(ptr, u.lv_bydev.lv);
+			put_lv_t(u.lv_byindex.lv);
+	        }
+	        break;
+
+	case PV_STATUS:
+		if (!err) {
+			err = copy_to_user((void *)A(ptr), &p, sizeof(pv32_t) - 8 - UUID_LEN+1);
+			if (err)
+				return -EFAULT;
+			err = copy_to_user(((pv_t *)A(ptr))->pv_uuid, p.pv_uuid, UUID_LEN + 1);
+			if (err)
+				return -EFAULT;
+		}
+		break;
+	};
+
+	return err;
+}
+#endif
+
+#ifdef CONFIG_GENRTC
+#endif
+
+#if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
+/* This really belongs in include/linux/drm.h -DaveM */
+#include "../../../drivers/char/drm/drm.h"
+
+typedef struct drm32_version {
+	int    version_major;	  /* Major version			    */
+	int    version_minor;	  /* Minor version			    */
+	int    version_patchlevel;/* Patch level			    */
+	int    name_len;	  /* Length of name buffer		    */
+	u32    name;		  /* Name of driver			    */
+	int    date_len;	  /* Length of date buffer		    */
+	u32    date;		  /* User-space buffer to hold date	    */
+	int    desc_len;	  /* Length of desc buffer		    */
+	u32    desc;		  /* User-space buffer to hold desc	    */
+} drm32_version_t;
+#define DRM32_IOCTL_VERSION    DRM_IOWR(0x00, drm32_version_t)
+
+static int drm32_version(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_version_t *uversion = (drm32_version_t *)arg;
+	char *name_ptr, *date_ptr, *desc_ptr;
+	u32 tmp1, tmp2, tmp3;
+	drm_version_t kversion;
+	mm_segment_t old_fs;
+	int ret;
+
+	memset(&kversion, 0, sizeof(kversion));
+	if (get_user(kversion.name_len, &uversion->name_len) ||
+	    get_user(kversion.date_len, &uversion->date_len) ||
+	    get_user(kversion.desc_len, &uversion->desc_len) ||
+	    get_user(tmp1, &uversion->name) ||
+	    get_user(tmp2, &uversion->date) ||
+	    get_user(tmp3, &uversion->desc))
+		return -EFAULT;
+
+	name_ptr = (char *) A(tmp1);
+	date_ptr = (char *) A(tmp2);
+	desc_ptr = (char *) A(tmp3);
+
+	ret = -ENOMEM;
+	if (kversion.name_len && name_ptr) {
+		kversion.name = kmalloc(kversion.name_len, GFP_KERNEL);
+		if (!kversion.name)
+			goto out;
+	}
+	if (kversion.date_len && date_ptr) {
+		kversion.date = kmalloc(kversion.date_len, GFP_KERNEL);
+		if (!kversion.date)
+			goto out;
+	}
+	if (kversion.desc_len && desc_ptr) {
+		kversion.desc = kmalloc(kversion.desc_len, GFP_KERNEL);
+		if (!kversion.desc)
+			goto out;
+	}
+
+        old_fs = get_fs();
+	set_fs(KERNEL_DS);
+        ret = sys_ioctl (fd, DRM_IOCTL_VERSION, (unsigned long)&kversion);
+        set_fs(old_fs);
+
+	if (!ret) {
+		if ((kversion.name &&
+		     copy_to_user(name_ptr, kversion.name, kversion.name_len)) ||
+		    (kversion.date &&
+		     copy_to_user(date_ptr, kversion.date, kversion.date_len)) ||
+		    (kversion.desc &&
+		     copy_to_user(desc_ptr, kversion.desc, kversion.desc_len)))
+			ret = -EFAULT;
+		if (put_user(kversion.version_major, &uversion->version_major) ||
+		    put_user(kversion.version_minor, &uversion->version_minor) ||
+		    put_user(kversion.version_patchlevel, &uversion->version_patchlevel) ||
+		    put_user(kversion.name_len, &uversion->name_len) ||
+		    put_user(kversion.date_len, &uversion->date_len) ||
+		    put_user(kversion.desc_len, &uversion->desc_len))
+			ret = -EFAULT;
+	}
+
+out:
+	if (kversion.name)
+		kfree(kversion.name);
+	if (kversion.date)
+		kfree(kversion.date);
+	if (kversion.desc)
+		kfree(kversion.desc);
+	return ret;
+}
+
+typedef struct drm32_unique {
+	int	unique_len;	  /* Length of unique			    */
+	u32	unique;		  /* Unique name for driver instantiation   */
+} drm32_unique_t;
+#define DRM32_IOCTL_GET_UNIQUE DRM_IOWR(0x01, drm32_unique_t)
+#define DRM32_IOCTL_SET_UNIQUE DRM_IOW( 0x10, drm32_unique_t)
+
+static int drm32_getsetunique(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_unique_t *uarg = (drm32_unique_t *)arg;
+	drm_unique_t karg;
+	mm_segment_t old_fs;
+	char *uptr;
+	u32 tmp;
+	int ret;
+
+	if (get_user(karg.unique_len, &uarg->unique_len))
+		return -EFAULT;
+	karg.unique = NULL;
+
+	if (get_user(tmp, &uarg->unique))
+		return -EFAULT;
+
+	uptr = (char *) A(tmp);
+
+	if (uptr) {
+		karg.unique = kmalloc(karg.unique_len, GFP_KERNEL);
+		if (!karg.unique)
+			return -ENOMEM;
+		if (cmd == DRM32_IOCTL_SET_UNIQUE &&
+		    copy_from_user(karg.unique, uptr, karg.unique_len)) {
+			kfree(karg.unique);
+			return -EFAULT;
+		}
+	}
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	if (cmd == DRM32_IOCTL_GET_UNIQUE)
+		ret = sys_ioctl (fd, DRM_IOCTL_GET_UNIQUE, (unsigned long)&karg);
+	else
+		ret = sys_ioctl (fd, DRM_IOCTL_SET_UNIQUE, (unsigned long)&karg);
+        set_fs(old_fs);
+
+	if (!ret) {
+		if (cmd == DRM32_IOCTL_GET_UNIQUE &&
+		    uptr != NULL &&
+		    copy_to_user(uptr, karg.unique, karg.unique_len))
+			ret = -EFAULT;
+		if (put_user(karg.unique_len, &uarg->unique_len))
+			ret = -EFAULT;
+	}
+
+	if (karg.unique != NULL)
+		kfree(karg.unique);
+
+	return ret;
+}
+
+typedef struct drm32_map {
+	u32		offset;	 /* Requested physical address (0 for SAREA)*/
+	u32		size;	 /* Requested physical size (bytes)	    */
+	drm_map_type_t	type;	 /* Type of memory to map		    */
+	drm_map_flags_t flags;	 /* Flags				    */
+	u32		handle;  /* User-space: "Handle" to pass to mmap    */
+				 /* Kernel-space: kernel-virtual address    */
+	int		mtrr;	 /* MTRR slot used			    */
+				 /* Private data			    */
+} drm32_map_t;
+#define DRM32_IOCTL_ADD_MAP    DRM_IOWR(0x15, drm32_map_t)
+
+static int drm32_addmap(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_map_t *uarg = (drm32_map_t *) arg;
+	drm_map_t karg;
+	mm_segment_t old_fs;
+	u32 tmp;
+	int ret;
+
+	ret  = get_user(karg.offset, &uarg->offset);
+	ret |= get_user(karg.size, &uarg->size);
+	ret |= get_user(karg.type, &uarg->type);
+	ret |= get_user(karg.flags, &uarg->flags);
+	ret |= get_user(tmp, &uarg->handle);
+	ret |= get_user(karg.mtrr, &uarg->mtrr);
+	if (ret)
+		return -EFAULT;
+
+	karg.handle = (void *) A(tmp);
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_ioctl(fd, DRM_IOCTL_ADD_MAP, (unsigned long) &karg);
+	set_fs(old_fs);
+
+	if (!ret) {
+		ret  = put_user(karg.offset, &uarg->offset);
+		ret |= put_user(karg.size, &uarg->size);
+		ret |= put_user(karg.type, &uarg->type);
+		ret |= put_user(karg.flags, &uarg->flags);
+		tmp = (u32) (long)karg.handle;
+		ret |= put_user(tmp, &uarg->handle);
+		ret |= put_user(karg.mtrr, &uarg->mtrr);
+		if (ret)
+			ret = -EFAULT;
+	}
+
+	return ret;
+}
+
+typedef struct drm32_buf_info {
+	int	       count;	/* Entries in list			     */
+	u32	       list;    /* (drm_buf_desc_t *) */ 
+} drm32_buf_info_t;
+#define DRM32_IOCTL_INFO_BUFS  DRM_IOWR(0x18, drm32_buf_info_t)
+
+static int drm32_info_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_buf_info_t *uarg = (drm32_buf_info_t *)arg;
+	drm_buf_desc_t *ulist;
+	drm_buf_info_t karg;
+	mm_segment_t old_fs;
+	int orig_count, ret;
+	u32 tmp;
+
+	if (get_user(karg.count, &uarg->count) ||
+	    get_user(tmp, &uarg->list))
+		return -EFAULT;
+
+	ulist = (drm_buf_desc_t *) A(tmp);
+
+	orig_count = karg.count;
+
+	karg.list = kmalloc(karg.count * sizeof(drm_buf_desc_t), GFP_KERNEL);
+	if (!karg.list)
+		return -EFAULT;
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_ioctl(fd, DRM_IOCTL_INFO_BUFS, (unsigned long) &karg);
+	set_fs(old_fs);
+
+	if (!ret) {
+		if (karg.count <= orig_count &&
+		    (copy_to_user(ulist, karg.list,
+				  karg.count * sizeof(drm_buf_desc_t))))
+			ret = -EFAULT;
+		if (put_user(karg.count, &uarg->count))
+			ret = -EFAULT;
+	}
+
+	kfree(karg.list);
+
+	return ret;
+}
+
+typedef struct drm32_buf_free {
+	int	       count;
+	u32	       list;	/* (int *) */
+} drm32_buf_free_t;
+#define DRM32_IOCTL_FREE_BUFS  DRM_IOW( 0x1a, drm32_buf_free_t)
+
+static int drm32_free_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_buf_free_t *uarg = (drm32_buf_free_t *)arg;
+	drm_buf_free_t karg;
+	mm_segment_t old_fs;
+	int *ulist;
+	int ret;
+	u32 tmp;
+
+	if (get_user(karg.count, &uarg->count) ||
+	    get_user(tmp, &uarg->list))
+		return -EFAULT;
+
+	ulist = (int *) A(tmp);
+
+	karg.list = kmalloc(karg.count * sizeof(int), GFP_KERNEL);
+	if (!karg.list)
+		return -ENOMEM;
+
+	ret = -EFAULT;
+	if (copy_from_user(karg.list, ulist, (karg.count * sizeof(int))))
+		goto out;
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_ioctl(fd, DRM_IOCTL_FREE_BUFS, (unsigned long) &karg);
+	set_fs(old_fs);
+
+out:
+	kfree(karg.list);
+
+	return ret;
+}
+
+typedef struct drm32_buf_pub {
+	int		  idx;	       /* Index into master buflist	     */
+	int		  total;       /* Buffer size			     */
+	int		  used;	       /* Amount of buffer in use (for DMA)  */
+	u32		  address;     /* Address of buffer (void *)	     */
+} drm32_buf_pub_t;
+
+typedef struct drm32_buf_map {
+	int	      count;	/* Length of buflist			    */
+	u32	      virtual;	/* Mmaped area in user-virtual (void *)	    */
+	u32 	      list;	/* Buffer information (drm_buf_pub_t *)	    */
+} drm32_buf_map_t;
+#define DRM32_IOCTL_MAP_BUFS   DRM_IOWR(0x19, drm32_buf_map_t)
+
+static int drm32_map_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_buf_map_t *uarg = (drm32_buf_map_t *)arg;
+	drm32_buf_pub_t *ulist;
+	drm_buf_map_t karg;
+	mm_segment_t old_fs;
+	int orig_count, ret, i;
+	u32 tmp1, tmp2;
+
+	if (get_user(karg.count, &uarg->count) ||
+	    get_user(tmp1, &uarg->virtual) ||
+	    get_user(tmp2, &uarg->list))
+		return -EFAULT;
+
+	karg.virtual = (void *) A(tmp1);
+	ulist = (drm32_buf_pub_t *) A(tmp2);
+
+	orig_count = karg.count;
+
+	karg.list = kmalloc(karg.count * sizeof(drm_buf_pub_t), GFP_KERNEL);
+	if (!karg.list)
+		return -ENOMEM;
+
+	ret = -EFAULT;
+	for (i = 0; i < karg.count; i++) {
+		if (get_user(karg.list[i].idx, &ulist[i].idx) ||
+		    get_user(karg.list[i].total, &ulist[i].total) ||
+		    get_user(karg.list[i].used, &ulist[i].used) ||
+		    get_user(tmp1, &ulist[i].address))
+			goto out;
+
+		karg.list[i].address = (void *) A(tmp1);
+	}
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_ioctl(fd, DRM_IOCTL_MAP_BUFS, (unsigned long) &karg);
+	set_fs(old_fs);
+
+	if (!ret) {
+		for (i = 0; i < orig_count; i++) {
+			tmp1 = (u32) (long) karg.list[i].address;
+			if (put_user(karg.list[i].idx, &ulist[i].idx) ||
+			    put_user(karg.list[i].total, &ulist[i].total) ||
+			    put_user(karg.list[i].used, &ulist[i].used) ||
+			    put_user(tmp1, &ulist[i].address)) {
+				ret = -EFAULT;
+				goto out;
+			}
+		}
+		if (put_user(karg.count, &uarg->count))
+			ret = -EFAULT;
+	}
+
+out:
+	kfree(karg.list);
+	return ret;
+}
+
+typedef struct drm32_dma {
+				/* Indices here refer to the offset into
+				   buflist in drm_buf_get_t.  */
+	int		context;	  /* Context handle		    */
+	int		send_count;	  /* Number of buffers to send	    */
+	u32		send_indices;	  /* List of handles to buffers (int *) */
+	u32		send_sizes;	  /* Lengths of data to send (int *) */
+	drm_dma_flags_t flags;		  /* Flags			    */
+	int		request_count;	  /* Number of buffers requested    */
+	int		request_size;	  /* Desired size for buffers	    */
+	u32		request_indices;  /* Buffer information (int *)	    */
+	u32		request_sizes;    /* (int *) */
+	int		granted_count;	  /* Number of buffers granted	    */
+} drm32_dma_t;
+#define DRM32_IOCTL_DMA	     DRM_IOWR(0x29, drm32_dma_t)
+
+/* RED PEN	The DRM layer blindly dereferences the send/request
+ * 		indice/size arrays even though they are userland
+ * 		pointers.  -DaveM
+ */
+static int drm32_dma(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_dma_t *uarg = (drm32_dma_t *) arg;
+	int *u_si, *u_ss, *u_ri, *u_rs;
+	drm_dma_t karg;
+	mm_segment_t old_fs;
+	int ret;
+	u32 tmp1, tmp2, tmp3, tmp4;
+
+	karg.send_indices = karg.send_sizes = NULL;
+	karg.request_indices = karg.request_sizes = NULL;
+
+	if (get_user(karg.context, &uarg->context) ||
+	    get_user(karg.send_count, &uarg->send_count) ||
+	    get_user(tmp1, &uarg->send_indices) ||
+	    get_user(tmp2, &uarg->send_sizes) ||
+	    get_user(karg.flags, &uarg->flags) ||
+	    get_user(karg.request_count, &uarg->request_count) ||
+	    get_user(karg.request_size, &uarg->request_size) ||
+	    get_user(tmp3, &uarg->request_indices) ||
+	    get_user(tmp4, &uarg->request_sizes) ||
+	    get_user(karg.granted_count, &uarg->granted_count))
+		return -EFAULT;
+
+	u_si = (int *) A(tmp1);
+	u_ss = (int *) A(tmp2);
+	u_ri = (int *) A(tmp3);
+	u_rs = (int *) A(tmp4);
+
+	if (karg.send_count) {
+		karg.send_indices = kmalloc(karg.send_count * sizeof(int), GFP_KERNEL);
+		karg.send_sizes = kmalloc(karg.send_count * sizeof(int), GFP_KERNEL);
+
+		ret = -ENOMEM;
+		if (!karg.send_indices || !karg.send_sizes)
+			goto out;
+
+		ret = -EFAULT;
+		if (copy_from_user(karg.send_indices, u_si,
+				   (karg.send_count * sizeof(int))) ||
+		    copy_from_user(karg.send_sizes, u_ss,
+				   (karg.send_count * sizeof(int))))
+			goto out;
+	}
+
+	if (karg.request_count) {
+		karg.request_indices = kmalloc(karg.request_count * sizeof(int), GFP_KERNEL);
+		karg.request_sizes = kmalloc(karg.request_count * sizeof(int), GFP_KERNEL);
+
+		ret = -ENOMEM;
+		if (!karg.request_indices || !karg.request_sizes)
+			goto out;
+
+		ret = -EFAULT;
+		if (copy_from_user(karg.request_indices, u_ri,
+				   (karg.request_count * sizeof(int))) ||
+		    copy_from_user(karg.request_sizes, u_rs,
+				   (karg.request_count * sizeof(int))))
+			goto out;
+	}
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_ioctl(fd, DRM_IOCTL_DMA, (unsigned long) &karg);
+	set_fs(old_fs);
+
+	if (!ret) {
+		if (put_user(karg.context, &uarg->context) ||
+		    put_user(karg.send_count, &uarg->send_count) ||
+		    put_user(karg.flags, &uarg->flags) ||
+		    put_user(karg.request_count, &uarg->request_count) ||
+		    put_user(karg.request_size, &uarg->request_size) ||
+		    put_user(karg.granted_count, &uarg->granted_count))
+			ret = -EFAULT;
+
+		if (karg.send_count) {
+			if (copy_to_user(u_si, karg.send_indices,
+					 (karg.send_count * sizeof(int))) ||
+			    copy_to_user(u_ss, karg.send_sizes,
+					 (karg.send_count * sizeof(int))))
+				ret = -EFAULT;
+		}
+		if (karg.request_count) {
+			if (copy_to_user(u_ri, karg.request_indices,
+					 (karg.request_count * sizeof(int))) ||
+			    copy_to_user(u_rs, karg.request_sizes,
+					 (karg.request_count * sizeof(int))))
+				ret = -EFAULT;
+		}
+	}
+
+out:
+	if (karg.send_indices)
+		kfree(karg.send_indices);
+	if (karg.send_sizes)
+		kfree(karg.send_sizes);
+	if (karg.request_indices)
+		kfree(karg.request_indices);
+	if (karg.request_sizes)
+		kfree(karg.request_sizes);
+
+	return ret;
+}
+
+typedef struct drm32_ctx_res {
+	int		count;
+	u32		contexts; /* (drm_ctx_t *) */
+} drm32_ctx_res_t;
+#define DRM32_IOCTL_RES_CTX    DRM_IOWR(0x26, drm32_ctx_res_t)
+
+static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	drm32_ctx_res_t *uarg = (drm32_ctx_res_t *) arg;
+	drm_ctx_t *ulist;
+	drm_ctx_res_t karg;
+	mm_segment_t old_fs;
+	int orig_count, ret;
+	u32 tmp;
+
+	karg.contexts = NULL;
+	if (get_user(karg.count, &uarg->count) ||
+	    get_user(tmp, &uarg->contexts))
+		return -EFAULT;
+
+	ulist = (drm_ctx_t *) A(tmp);
+
+	orig_count = karg.count;
+	if (karg.count && ulist) {
+		karg.contexts = kmalloc((karg.count * sizeof(drm_ctx_t)), GFP_KERNEL);
+		if (!karg.contexts)
+			return -ENOMEM;
+		if (copy_from_user(karg.contexts, ulist,
+				   (karg.count * sizeof(drm_ctx_t)))) {
+			kfree(karg.contexts);
+			return -EFAULT;
+		}
+	}
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_ioctl(fd, DRM_IOCTL_RES_CTX, (unsigned long) &karg);
+	set_fs(old_fs);
+
+	if (!ret) {
+		if (orig_count) {
+			if (copy_to_user(ulist, karg.contexts,
+					 (orig_count * sizeof(drm_ctx_t))))
+				ret = -EFAULT;
+		}
+		if (put_user(karg.count, &uarg->count))
+			ret = -EFAULT;
+	}
+
+	if (karg.contexts)
+		kfree(karg.contexts);
+
+	return ret;
+}
+
+#endif
+
+static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	return -EINVAL;
+}
+
+static int broken_blkgetsize(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	/* The mkswap binary hard codes it to Intel value :-((( */
+	return w_long(fd, BLKGETSIZE, arg);
+}
+
+struct blkpg_ioctl_arg32 {
+	int op;
+	int flags;
+	int datalen;
+	u32 data;
+};
+                                
+static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd, struct blkpg_ioctl_arg32 *arg)
+{
+	struct blkpg_ioctl_arg a;
+	struct blkpg_partition p;
+	int err;
+	mm_segment_t old_fs = get_fs();
+	
+	err = get_user(a.op, &arg->op);
+	err |= __get_user(a.flags, &arg->flags);
+	err |= __get_user(a.datalen, &arg->datalen);
+	err |= __get_user((long)a.data, &arg->data);
+	if (err) return err;
+	switch (a.op) {
+	case BLKPG_ADD_PARTITION:
+	case BLKPG_DEL_PARTITION:
+		if (a.datalen < sizeof(struct blkpg_partition))
+			return -EINVAL;
+                if (copy_from_user(&p, a.data, sizeof(struct blkpg_partition)))
+			return -EFAULT;
+		a.data = &p;
+		set_fs (KERNEL_DS);
+		err = sys_ioctl(fd, cmd, (unsigned long)&a);
+		set_fs (old_fs);
+	default:
+		return -EINVAL;
+	}                                        
+	return err;
+}
+
+static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg);
+}
+
+/* USB to be done */
+
+
+struct serial_struct32 {
+	int	type;
+	int	line;
+	unsigned int	port;
+	int	irq;
+	int	flags;
+	int	xmit_fifo_size;
+	int	custom_divisor;
+	int	baud_base;
+	unsigned short	close_delay;
+	char	io_type;
+	char	reserved_char[1];
+	int	hub6;
+	unsigned short	closing_wait; /* time to wait before closing */
+	unsigned short	closing_wait2; /* no longer used... */
+	unsigned int	iomem_base;	/* char * really */
+	unsigned short	iomem_reg_shift;
+	unsigned int	port_high;
+	int	reserved[1];
+};
+
+static int do_tiocgserial(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct serial_struct ss;
+	int ret;
+	struct serial_struct32 * uptr = (struct serial_struct32 *)arg;
+	mm_segment_t old_fs = get_fs();
+
+	set_fs (KERNEL_DS);
+	ret = sys_ioctl(fd, cmd, (unsigned long) &ss);
+	set_fs(old_fs);
+
+	if (!ret) {
+		/* structs match up to iomem_base */
+		ret = copy_to_user(uptr, &ss, sizeof(struct serial_struct32));
+		ret |= put_user(ss.iomem_base, &uptr->iomem_base);
+		ret |= put_user(ss.iomem_reg_shift, &uptr->iomem_reg_shift);
+		ret |= put_user(ss.port_high, &uptr->port_high);
+		if (ret)
+			ret = -EFAULT;
+	}
+	return ret;
+}
+
+
+struct ioctl_trans {
+	unsigned long handler;
+	unsigned int cmd;
+	unsigned int next;
+};
+#define HANDLE_IOCTL(cmd, handler) asm volatile(".dword %1\n.word %0, 0" : : "i" (cmd), "i" (handler));
+
+#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd, sys_ioctl) 
+
+
+#define IOCTL_TABLE_START void ioctl32_foo(void) { asm volatile(".data\nioctl_translations:");
+#define IOCTL_TABLE_END asm volatile("\nioctl_translations_end:\n\t.previous"); }
+
+IOCTL_TABLE_START
+/* List here exlicitly which ioctl's are known to have
+ * compatable types passed or none at all...
+ */
+/* Big T */
+COMPATIBLE_IOCTL(TCGETA)
+COMPATIBLE_IOCTL(TCSETA)
+COMPATIBLE_IOCTL(TCSETAW)
+COMPATIBLE_IOCTL(TCSETAF)
+COMPATIBLE_IOCTL(TCSBRK)
+COMPATIBLE_IOCTL(TCXONC)
+COMPATIBLE_IOCTL(TCFLSH)
+COMPATIBLE_IOCTL(TCGETS)
+COMPATIBLE_IOCTL(TCSETS)
+COMPATIBLE_IOCTL(TCSETSW)
+COMPATIBLE_IOCTL(TCSETSF)
+COMPATIBLE_IOCTL(TIOCLINUX)
+COMPATIBLE_IOCTL(TIOCSTART)
+COMPATIBLE_IOCTL(TIOCSTOP)
+/* Little t */
+COMPATIBLE_IOCTL(TIOCGETD)
+COMPATIBLE_IOCTL(TIOCSETD)
+COMPATIBLE_IOCTL(TIOCEXCL)
+COMPATIBLE_IOCTL(TIOCNXCL)
+COMPATIBLE_IOCTL(TIOCCONS)
+COMPATIBLE_IOCTL(TIOCGSOFTCAR)
+COMPATIBLE_IOCTL(TIOCSSOFTCAR)
+COMPATIBLE_IOCTL(TIOCSWINSZ)
+COMPATIBLE_IOCTL(TIOCGWINSZ)
+COMPATIBLE_IOCTL(TIOCMGET)
+COMPATIBLE_IOCTL(TIOCMBIC)
+COMPATIBLE_IOCTL(TIOCMBIS)
+COMPATIBLE_IOCTL(TIOCMSET)
+COMPATIBLE_IOCTL(TIOCPKT)
+COMPATIBLE_IOCTL(TIOCNOTTY)
+COMPATIBLE_IOCTL(TIOCSTI)
+COMPATIBLE_IOCTL(TIOCOUTQ)
+COMPATIBLE_IOCTL(TIOCSPGRP)
+COMPATIBLE_IOCTL(TIOCGPGRP)
+COMPATIBLE_IOCTL(TIOCSCTTY)
+COMPATIBLE_IOCTL(TIOCGPTN)
+COMPATIBLE_IOCTL(TIOCSPTLCK)
+COMPATIBLE_IOCTL(TIOCSSERIAL)
+COMPATIBLE_IOCTL(TIOCSERGETLSR)
+COMPATIBLE_IOCTL(TIOCSLTC)
+/* Big F */
+#if 0
+COMPATIBLE_IOCTL(FBIOGTYPE)
+COMPATIBLE_IOCTL(FBIOSATTR)
+COMPATIBLE_IOCTL(FBIOGATTR)
+COMPATIBLE_IOCTL(FBIOSVIDEO)
+COMPATIBLE_IOCTL(FBIOGVIDEO)
+COMPATIBLE_IOCTL(FBIOGCURSOR32)  /* This is not implemented yet. Later it should be converted... */
+COMPATIBLE_IOCTL(FBIOSCURPOS)
+COMPATIBLE_IOCTL(FBIOGCURPOS)
+COMPATIBLE_IOCTL(FBIOGCURMAX)
+#endif
+COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
+COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
+
+COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
+COMPATIBLE_IOCTL(FBIOGET_FCURSORINFO)
+COMPATIBLE_IOCTL(FBIOGET_VCURSORINFO)
+COMPATIBLE_IOCTL(FBIOPUT_VCURSORINFO)
+COMPATIBLE_IOCTL(FBIOGET_CURSORSTATE)
+COMPATIBLE_IOCTL(FBIOPUT_CURSORSTATE)
+COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
+COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
+/* Little f */
+COMPATIBLE_IOCTL(FIOCLEX)
+COMPATIBLE_IOCTL(FIONCLEX)
+COMPATIBLE_IOCTL(FIOASYNC)
+COMPATIBLE_IOCTL(FIONBIO)
+COMPATIBLE_IOCTL(FIONREAD)  /* This is also TIOCINQ */
+/* 0x00 */
+COMPATIBLE_IOCTL(FIBMAP)
+COMPATIBLE_IOCTL(FIGETBSZ)
+/* 0x03 -- HD/IDE ioctl's used by hdparm and friends.
+ *         Some need translations, these do not.
+ */
+COMPATIBLE_IOCTL(HDIO_GET_IDENTITY)
+COMPATIBLE_IOCTL(HDIO_SET_DMA)
+COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR)
+COMPATIBLE_IOCTL(HDIO_SET_NOWERR)
+COMPATIBLE_IOCTL(HDIO_SET_32BIT)
+COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
+COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
+COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
+COMPATIBLE_IOCTL(HDIO_SET_NICE)
+/* 0x02 -- Floppy ioctls */
+COMPATIBLE_IOCTL(FDMSGON)
+COMPATIBLE_IOCTL(FDMSGOFF)
+COMPATIBLE_IOCTL(FDSETEMSGTRESH)
+COMPATIBLE_IOCTL(FDFLUSH)
+COMPATIBLE_IOCTL(FDWERRORCLR)
+COMPATIBLE_IOCTL(FDSETMAXERRS)
+COMPATIBLE_IOCTL(FDGETMAXERRS)
+COMPATIBLE_IOCTL(FDGETDRVTYP)
+COMPATIBLE_IOCTL(FDEJECT)
+COMPATIBLE_IOCTL(FDCLRPRM)
+COMPATIBLE_IOCTL(FDFMTBEG)
+COMPATIBLE_IOCTL(FDFMTEND)
+COMPATIBLE_IOCTL(FDRESET)
+COMPATIBLE_IOCTL(FDTWADDLE)
+COMPATIBLE_IOCTL(FDFMTTRK)
+COMPATIBLE_IOCTL(FDRAWCMD)
+/* 0x12 */
+COMPATIBLE_IOCTL(BLKROSET)
+COMPATIBLE_IOCTL(BLKROGET)
+COMPATIBLE_IOCTL(BLKRRPART)
+COMPATIBLE_IOCTL(BLKFLSBUF)
+COMPATIBLE_IOCTL(BLKSECTSET)
+COMPATIBLE_IOCTL(BLKSSZGET)
+COMPATIBLE_IOCTL(BLKBSZGET)
+
+/* RAID */
+COMPATIBLE_IOCTL(RAID_VERSION)
+COMPATIBLE_IOCTL(GET_ARRAY_INFO)
+COMPATIBLE_IOCTL(GET_DISK_INFO)
+COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
+COMPATIBLE_IOCTL(CLEAR_ARRAY)
+COMPATIBLE_IOCTL(ADD_NEW_DISK)
+COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
+COMPATIBLE_IOCTL(SET_ARRAY_INFO)
+COMPATIBLE_IOCTL(SET_DISK_INFO)
+COMPATIBLE_IOCTL(WRITE_RAID_INFO)
+COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
+COMPATIBLE_IOCTL(PROTECT_ARRAY)
+COMPATIBLE_IOCTL(HOT_ADD_DISK)
+COMPATIBLE_IOCTL(SET_DISK_FAULTY)
+COMPATIBLE_IOCTL(RUN_ARRAY)
+COMPATIBLE_IOCTL(START_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY_RO)
+COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
+
+/* Big K */
+COMPATIBLE_IOCTL(PIO_FONT)
+COMPATIBLE_IOCTL(GIO_FONT)
+COMPATIBLE_IOCTL(KDSIGACCEPT)
+COMPATIBLE_IOCTL(KDGETKEYCODE)
+COMPATIBLE_IOCTL(KDSETKEYCODE)
+COMPATIBLE_IOCTL(KIOCSOUND)
+COMPATIBLE_IOCTL(KDMKTONE)
+COMPATIBLE_IOCTL(KDGKBTYPE)
+COMPATIBLE_IOCTL(KDSETMODE)
+COMPATIBLE_IOCTL(KDGETMODE)
+COMPATIBLE_IOCTL(KDSKBMODE)
+COMPATIBLE_IOCTL(KDGKBMODE)
+COMPATIBLE_IOCTL(KDSKBMETA)
+COMPATIBLE_IOCTL(KDGKBMETA)
+COMPATIBLE_IOCTL(KDGKBENT)
+COMPATIBLE_IOCTL(KDSKBENT)
+COMPATIBLE_IOCTL(KDGKBSENT)
+COMPATIBLE_IOCTL(KDSKBSENT)
+COMPATIBLE_IOCTL(KDGKBDIACR)
+COMPATIBLE_IOCTL(KDSKBDIACR)
+COMPATIBLE_IOCTL(KDGKBLED)
+COMPATIBLE_IOCTL(KDSKBLED)
+COMPATIBLE_IOCTL(KDGETLED)
+COMPATIBLE_IOCTL(KDSETLED)
+COMPATIBLE_IOCTL(GIO_SCRNMAP)
+COMPATIBLE_IOCTL(PIO_SCRNMAP)
+COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
+COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
+COMPATIBLE_IOCTL(PIO_FONTRESET)
+COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
+/* Little k */
+#if 0
+COMPATIBLE_IOCTL(KIOCTYPE)
+COMPATIBLE_IOCTL(KIOCLAYOUT)
+COMPATIBLE_IOCTL(KIOCGTRANS)
+COMPATIBLE_IOCTL(KIOCTRANS)
+COMPATIBLE_IOCTL(KIOCCMD)
+COMPATIBLE_IOCTL(KIOCSDIRECT)
+COMPATIBLE_IOCTL(KIOCSLED)
+COMPATIBLE_IOCTL(KIOCGLED)
+COMPATIBLE_IOCTL(KIOCSRATE)
+COMPATIBLE_IOCTL(KIOCGRATE)
+#endif
+/* Big S */
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
+COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
+COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
+COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
+COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
+/* Big T */
+COMPATIBLE_IOCTL(TUNSETNOCSUM)
+COMPATIBLE_IOCTL(TUNSETDEBUG)
+COMPATIBLE_IOCTL(TUNSETIFF)
+COMPATIBLE_IOCTL(TUNSETPERSIST)
+COMPATIBLE_IOCTL(TUNSETOWNER)
+/* Big V */
+COMPATIBLE_IOCTL(VT_SETMODE)
+COMPATIBLE_IOCTL(VT_GETMODE)
+COMPATIBLE_IOCTL(VT_GETSTATE)
+COMPATIBLE_IOCTL(VT_OPENQRY)
+COMPATIBLE_IOCTL(VT_ACTIVATE)
+COMPATIBLE_IOCTL(VT_WAITACTIVE)
+COMPATIBLE_IOCTL(VT_RELDISP)
+COMPATIBLE_IOCTL(VT_DISALLOCATE)
+COMPATIBLE_IOCTL(VT_RESIZE)
+COMPATIBLE_IOCTL(VT_RESIZEX)
+COMPATIBLE_IOCTL(VT_LOCKSWITCH)
+COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
+/* Little v, the video4linux ioctls */
+COMPATIBLE_IOCTL(VIDIOCGCAP)
+COMPATIBLE_IOCTL(VIDIOCGCHAN)
+COMPATIBLE_IOCTL(VIDIOCSCHAN)
+COMPATIBLE_IOCTL(VIDIOCGPICT)
+COMPATIBLE_IOCTL(VIDIOCSPICT)
+COMPATIBLE_IOCTL(VIDIOCCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCKEY)
+COMPATIBLE_IOCTL(VIDIOCGAUDIO)
+COMPATIBLE_IOCTL(VIDIOCSAUDIO)
+COMPATIBLE_IOCTL(VIDIOCSYNC)
+COMPATIBLE_IOCTL(VIDIOCMCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCGMBUF)
+COMPATIBLE_IOCTL(VIDIOCGUNIT)
+COMPATIBLE_IOCTL(VIDIOCGCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCSCAPTURE)
+/* BTTV specific... */
+COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256]))
+COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256]))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int))
+COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
+/* Little m */
+COMPATIBLE_IOCTL(MTIOCTOP)
+/* Socket level stuff */
+COMPATIBLE_IOCTL(FIOSETOWN)
+COMPATIBLE_IOCTL(SIOCSPGRP)
+COMPATIBLE_IOCTL(FIOGETOWN)
+COMPATIBLE_IOCTL(SIOCGPGRP)
+COMPATIBLE_IOCTL(SIOCATMARK)
+COMPATIBLE_IOCTL(SIOCSIFLINK)
+COMPATIBLE_IOCTL(SIOCSIFENCAP)
+COMPATIBLE_IOCTL(SIOCGIFENCAP)
+COMPATIBLE_IOCTL(SIOCSIFBR)
+COMPATIBLE_IOCTL(SIOCGIFBR)
+COMPATIBLE_IOCTL(SIOCSARP)
+COMPATIBLE_IOCTL(SIOCGARP)
+COMPATIBLE_IOCTL(SIOCDARP)
+COMPATIBLE_IOCTL(SIOCSRARP)
+COMPATIBLE_IOCTL(SIOCGRARP)
+COMPATIBLE_IOCTL(SIOCDRARP)
+COMPATIBLE_IOCTL(SIOCADDDLCI)
+COMPATIBLE_IOCTL(SIOCDELDLCI)
+COMPATIBLE_IOCTL(SIOCGMIIPHY)
+COMPATIBLE_IOCTL(SIOCGMIIREG)
+COMPATIBLE_IOCTL(SIOCSMIIREG)
+COMPATIBLE_IOCTL(SIOCGIFVLAN)
+COMPATIBLE_IOCTL(SIOCSIFVLAN)
+COMPATIBLE_IOCTL(SIOCDELDLCI)
+/* SG stuff */
+COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
+COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
+COMPATIBLE_IOCTL(SG_EMULATED_HOST)
+COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
+COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
+COMPATIBLE_IOCTL(SG_GET_SCSI_ID)
+COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA)
+COMPATIBLE_IOCTL(SG_GET_LOW_DMA)
+COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID)
+COMPATIBLE_IOCTL(SG_GET_PACK_ID)
+COMPATIBLE_IOCTL(SG_GET_NUM_WAITING)
+COMPATIBLE_IOCTL(SG_SET_DEBUG)
+COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE)
+COMPATIBLE_IOCTL(SG_GET_COMMAND_Q)
+COMPATIBLE_IOCTL(SG_SET_COMMAND_Q)
+COMPATIBLE_IOCTL(SG_GET_VERSION_NUM)
+COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN)
+COMPATIBLE_IOCTL(SG_SCSI_RESET)
+COMPATIBLE_IOCTL(SG_IO)
+COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
+COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
+COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
+/* PPP stuff */
+COMPATIBLE_IOCTL(PPPIOCGFLAGS)
+COMPATIBLE_IOCTL(PPPIOCSFLAGS)
+COMPATIBLE_IOCTL(PPPIOCGASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCGUNIT)
+COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCGMRU)
+COMPATIBLE_IOCTL(PPPIOCSMRU)
+COMPATIBLE_IOCTL(PPPIOCSMAXCID)
+COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP)
+COMPATIBLE_IOCTL(LPGETSTATUS)
+COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCXFERUNIT)
+COMPATIBLE_IOCTL(PPPIOCGNPMODE)
+COMPATIBLE_IOCTL(PPPIOCSNPMODE)
+COMPATIBLE_IOCTL(PPPIOCGDEBUG)
+COMPATIBLE_IOCTL(PPPIOCSDEBUG)
+COMPATIBLE_IOCTL(PPPIOCNEWUNIT)
+COMPATIBLE_IOCTL(PPPIOCATTACH)
+COMPATIBLE_IOCTL(PPPIOCDETACH)
+COMPATIBLE_IOCTL(PPPIOCSMRRU)
+COMPATIBLE_IOCTL(PPPIOCCONNECT)
+COMPATIBLE_IOCTL(PPPIOCDISCONN)
+COMPATIBLE_IOCTL(PPPIOCATTCHAN)
+/* PPPOX */
+COMPATIBLE_IOCTL(PPPOEIOCSFWD)
+COMPATIBLE_IOCTL(PPPOEIOCDFWD)
+/* CDROM stuff */
+COMPATIBLE_IOCTL(CDROMPAUSE)
+COMPATIBLE_IOCTL(CDROMRESUME)
+COMPATIBLE_IOCTL(CDROMPLAYMSF)
+COMPATIBLE_IOCTL(CDROMPLAYTRKIND)
+COMPATIBLE_IOCTL(CDROMREADTOCHDR)
+COMPATIBLE_IOCTL(CDROMREADTOCENTRY)
+COMPATIBLE_IOCTL(CDROMSTOP)
+COMPATIBLE_IOCTL(CDROMSTART)
+COMPATIBLE_IOCTL(CDROMEJECT)
+COMPATIBLE_IOCTL(CDROMVOLCTRL)
+COMPATIBLE_IOCTL(CDROMSUBCHNL)
+COMPATIBLE_IOCTL(CDROMEJECT_SW)
+COMPATIBLE_IOCTL(CDROMMULTISESSION)
+COMPATIBLE_IOCTL(CDROM_GET_MCN)
+COMPATIBLE_IOCTL(CDROMRESET)
+COMPATIBLE_IOCTL(CDROMVOLREAD)
+COMPATIBLE_IOCTL(CDROMSEEK)
+COMPATIBLE_IOCTL(CDROMPLAYBLK)
+COMPATIBLE_IOCTL(CDROMCLOSETRAY)
+COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
+COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
+COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
+COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
+COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
+COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
+COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
+COMPATIBLE_IOCTL(CDROM_DEBUG)
+COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
+/* Big L */
+COMPATIBLE_IOCTL(LOOP_SET_FD)
+COMPATIBLE_IOCTL(LOOP_CLR_FD)
+/* Big Q for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE)
+COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL)
+COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE)
+/* Big T for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_START)
+COMPATIBLE_IOCTL(SNDCTL_TMR_STOP)
+COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO)
+COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME)
+COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT)
+/* Little m for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD)
+/* Big P for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_DSP_RESET)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED)
+COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS)
+COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_POST)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR)
+/* SNDCTL_DSP_MAPINBUF,  XXX needs translation */
+/* SNDCTL_DSP_MAPOUTBUF,  XXX needs translation */
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY)
+COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER)
+/* Big C for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_COPR_RESET)
+COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE)
+COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA)
+COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RUN)
+COMPATIBLE_IOCTL(SNDCTL_COPR_HALT)
+COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG)
+/* Big M for sound/OSS */
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3)
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR))
+COMPATIBLE_IOCTL(SOUND_MIXER_MUTE)
+/* SOUND_MIXER_READ_ENHANCE,  same value as READ_MUTE */
+/* SOUND_MIXER_READ_LOUD,  same value as READ_MUTE */
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3)
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR))
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE)
+/* SOUND_MIXER_WRITE_ENHANCE,  same value as WRITE_MUTE */
+/* SOUND_MIXER_WRITE_LOUD,  same value as WRITE_MUTE */
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC)
+COMPATIBLE_IOCTL(SOUND_MIXER_INFO)
+COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO)
+COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS)
+COMPATIBLE_IOCTL(SOUND_MIXER_AGC)
+COMPATIBLE_IOCTL(SOUND_MIXER_3DSE)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
+COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
+COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
+COMPATIBLE_IOCTL(OSS_GETVERSION)
+/* AUTOFS */
+COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
+COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
+COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
+COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
+/* DEVFS */
+COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
+COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
+COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
+COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
+/* Raw devices */
+COMPATIBLE_IOCTL(RAW_SETBIND)
+COMPATIBLE_IOCTL(RAW_GETBIND)
+/* SMB ioctls which do not need any translations */
+COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
+/* Little a */
+COMPATIBLE_IOCTL(ATMSIGD_CTRL)
+COMPATIBLE_IOCTL(ATMARPD_CTRL)
+COMPATIBLE_IOCTL(ATMLEC_CTRL)
+COMPATIBLE_IOCTL(ATMLEC_MCAST)
+COMPATIBLE_IOCTL(ATMLEC_DATA)
+COMPATIBLE_IOCTL(ATM_SETSC)
+COMPATIBLE_IOCTL(SIOCSIFATMTCP)
+COMPATIBLE_IOCTL(SIOCMKCLIP)
+COMPATIBLE_IOCTL(ATMARP_MKIP)
+COMPATIBLE_IOCTL(ATMARP_SETENTRY)
+COMPATIBLE_IOCTL(ATMARP_ENCAP)
+COMPATIBLE_IOCTL(ATMTCP_CREATE)
+COMPATIBLE_IOCTL(ATMTCP_REMOVE)
+COMPATIBLE_IOCTL(ATMMPC_CTRL)
+COMPATIBLE_IOCTL(ATMMPC_DATA)
+#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
+/* 0xfe - lvm */
+COMPATIBLE_IOCTL(VG_SET_EXTENDABLE)
+COMPATIBLE_IOCTL(VG_STATUS_GET_COUNT)
+COMPATIBLE_IOCTL(VG_STATUS_GET_NAMELIST)
+COMPATIBLE_IOCTL(VG_REMOVE)
+COMPATIBLE_IOCTL(VG_RENAME)
+COMPATIBLE_IOCTL(VG_REDUCE)
+COMPATIBLE_IOCTL(PE_LOCK_UNLOCK)
+COMPATIBLE_IOCTL(PV_FLUSH)
+COMPATIBLE_IOCTL(LVM_LOCK_LVM)
+COMPATIBLE_IOCTL(LVM_GET_IOP_VERSION)
+#ifdef LVM_TOTAL_RESET
+COMPATIBLE_IOCTL(LVM_RESET)
+#endif
+COMPATIBLE_IOCTL(LV_SET_ACCESS)
+COMPATIBLE_IOCTL(LV_SET_STATUS)
+COMPATIBLE_IOCTL(LV_SET_ALLOCATION)
+COMPATIBLE_IOCTL(LE_REMAP)
+COMPATIBLE_IOCTL(LV_BMAP)
+COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
+#endif /* LVM */
+#if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
+COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
+COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
+COMPATIBLE_IOCTL(DRM_IOCTL_AUTH_MAGIC)
+COMPATIBLE_IOCTL(DRM_IOCTL_BLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_UNBLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_CONTROL)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_BUFS)
+COMPATIBLE_IOCTL(DRM_IOCTL_MARK_BUFS)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_RM_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_MOD_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_GET_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_SWITCH_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_NEW_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_DRAW)
+COMPATIBLE_IOCTL(DRM_IOCTL_RM_DRAW)
+COMPATIBLE_IOCTL(DRM_IOCTL_LOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_FINISH)
+#endif /* DRM */
+/* elevator */
+COMPATIBLE_IOCTL(BLKELVGET)
+COMPATIBLE_IOCTL(BLKELVSET)
+/* Big R */
+COMPATIBLE_IOCTL(RNDGETENTCNT)
+COMPATIBLE_IOCTL(RNDADDTOENTCNT)
+COMPATIBLE_IOCTL(RNDGETPOOL)
+COMPATIBLE_IOCTL(RNDADDENTROPY)
+COMPATIBLE_IOCTL(RNDZAPENTCNT)
+COMPATIBLE_IOCTL(RNDCLEARPOOL)
+/* Bluetooth ioctls */
+COMPATIBLE_IOCTL(HCIDEVUP)
+COMPATIBLE_IOCTL(HCIDEVDOWN)
+COMPATIBLE_IOCTL(HCIDEVRESET)
+COMPATIBLE_IOCTL(HCIDEVRESTAT)
+COMPATIBLE_IOCTL(HCIGETDEVLIST)
+COMPATIBLE_IOCTL(HCIGETDEVINFO)
+COMPATIBLE_IOCTL(HCIGETCONNLIST)
+COMPATIBLE_IOCTL(HCIGETCONNINFO)
+COMPATIBLE_IOCTL(HCISETRAW)
+COMPATIBLE_IOCTL(HCISETSCAN)
+COMPATIBLE_IOCTL(HCISETAUTH)
+COMPATIBLE_IOCTL(HCISETENCRYPT)
+COMPATIBLE_IOCTL(HCISETPTYPE)
+COMPATIBLE_IOCTL(HCISETLINKPOL)
+COMPATIBLE_IOCTL(HCISETLINKMODE)
+COMPATIBLE_IOCTL(HCISETACLMTU)
+COMPATIBLE_IOCTL(HCISETSCOMTU)
+COMPATIBLE_IOCTL(HCIINQUIRY)
+/* Misc. */
+COMPATIBLE_IOCTL(0x41545900)		/* ATYIO_CLKR */
+COMPATIBLE_IOCTL(0x41545901)		/* ATYIO_CLKW */
+COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
+COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
+COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
+COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
+/* USB */
+COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
+COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION)
+COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER)
+COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB)
+COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
+COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
+COMPATIBLE_IOCTL(USBDEVFS_RESET)
+COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
+/* MTD */
+COMPATIBLE_IOCTL(MEMGETINFO)
+COMPATIBLE_IOCTL(MEMERASE)
+COMPATIBLE_IOCTL(MEMLOCK)
+COMPATIBLE_IOCTL(MEMUNLOCK)
+COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
+COMPATIBLE_IOCTL(MEMGETREGIONINFO)
+/* NBD */
+COMPATIBLE_IOCTL(NBD_SET_SOCK)
+COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
+COMPATIBLE_IOCTL(NBD_SET_SIZE)
+COMPATIBLE_IOCTL(NBD_DO_IT)
+COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
+COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
+COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
+COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
+COMPATIBLE_IOCTL(NBD_DISCONNECT)
+/* And these ioctls need translation */
+HANDLE_IOCTL(TIOCGSERIAL, do_tiocgserial)
+HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
+HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf)
+HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMETRIC, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMETRIC, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMTU, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMTU, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMEM, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMEM, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFHWADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFHWADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCADDMULTI, dev_ifsioc)
+HANDLE_IOCTL(SIOCDELMULTI, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFINDEX, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMAP, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFDSTADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFNETMASK, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFNETMASK, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFPFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGPPPSTATS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGPPPCSTATS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGPPPVER, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
+HANDLE_IOCTL(SIOCADDRT, routing_ioctl)
+HANDLE_IOCTL(SIOCDELRT, routing_ioctl)
+/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
+HANDLE_IOCTL(SIOCRTMSG, ret_einval)
+HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp)
+HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo)
+HANDLE_IOCTL(BLKGETSIZE, w_long)
+HANDLE_IOCTL(0x1260, broken_blkgetsize)
+HANDLE_IOCTL(BLKSECTGET, w_long)
+HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans)
+
+HANDLE_IOCTL(FBIOGET_FSCREENINFO, fb_ioctl_trans)
+HANDLE_IOCTL(FBIOGETCMAP, fb_ioctl_trans)
+HANDLE_IOCTL(FBIOPUTCMAP, fb_ioctl_trans)
+
+HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_DMA, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_32BIT, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_NOWERR, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_NICE, hdio_ioctl_trans)
+HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDSETDRVPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETDRVPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETDRVSTAT32, fd_ioctl_trans)
+HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans)
+HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans)
+HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans)
+HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans)
+HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans)
+HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans)
+HANDLE_IOCTL(MTIOCGETCONFIG32, mt_ioctl_trans)
+HANDLE_IOCTL(MTIOCSETCONFIG32, mt_ioctl_trans)
+HANDLE_IOCTL(CDROMREADMODE2, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADMODE1, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADRAW, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADCOOKED, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADAUDIO, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADALL, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROM_SEND_PACKET, cdrom_ioctl_trans)
+HANDLE_IOCTL(LOOP_SET_STATUS, loop_status)
+HANDLE_IOCTL(LOOP_GET_STATUS, loop_status)
+#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
+HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout)
+#ifdef CONFIG_VT
+HANDLE_IOCTL(PIO_FONTX, do_fontx_ioctl)
+HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl)
+HANDLE_IOCTL(PIO_UNIMAP, do_unimap_ioctl)
+HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl)
+HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl)
+#endif
+HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl)
+#if 0
+/* One SMB ioctl needs translations. */
+#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, __kernel_uid_t32)
+HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
+#endif
+HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETNAMES32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETTYPE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETESI32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_RSTADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_ADDADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_DELADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETCIRANGE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETCIRANGE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETESI32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETESIF32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETSTAT32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETSTATZ32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETLOOP32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETLOOP32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_QUERYLOOP32, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETSTAT, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETSTATZ, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETDIAG, do_atm_ioctl)
+HANDLE_IOCTL(SONET_SETDIAG, do_atm_ioctl)
+HANDLE_IOCTL(SONET_CLRDIAG, do_atm_ioctl)
+HANDLE_IOCTL(SONET_SETFRAMING, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETFRAMING, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl)
+#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
+HANDLE_IOCTL(VG_STATUS, do_lvm_ioctl)
+HANDLE_IOCTL(VG_CREATE_OLD, do_lvm_ioctl)
+HANDLE_IOCTL(VG_CREATE, do_lvm_ioctl)
+HANDLE_IOCTL(VG_EXTEND, do_lvm_ioctl)
+HANDLE_IOCTL(LV_CREATE, do_lvm_ioctl)
+HANDLE_IOCTL(LV_REMOVE, do_lvm_ioctl)
+HANDLE_IOCTL(LV_EXTEND, do_lvm_ioctl)
+HANDLE_IOCTL(LV_REDUCE, do_lvm_ioctl)
+HANDLE_IOCTL(LV_RENAME, do_lvm_ioctl)
+HANDLE_IOCTL(LV_STATUS_BYNAME, do_lvm_ioctl)
+HANDLE_IOCTL(LV_STATUS_BYINDEX, do_lvm_ioctl)
+HANDLE_IOCTL(LV_STATUS_BYDEV, do_lvm_ioctl)
+HANDLE_IOCTL(PV_CHANGE, do_lvm_ioctl)
+HANDLE_IOCTL(PV_STATUS, do_lvm_ioctl)
+#endif /* LVM */
+#if defined(CONFIG_GEN_RTC)
+COMPATIBLE_IOCTL(RTC_AIE_ON)
+COMPATIBLE_IOCTL(RTC_AIE_OFF)
+COMPATIBLE_IOCTL(RTC_UIE_ON)
+COMPATIBLE_IOCTL(RTC_UIE_OFF)
+COMPATIBLE_IOCTL(RTC_PIE_ON)
+COMPATIBLE_IOCTL(RTC_PIE_OFF)
+COMPATIBLE_IOCTL(RTC_WIE_ON)
+COMPATIBLE_IOCTL(RTC_WIE_OFF)
+COMPATIBLE_IOCTL(RTC_ALM_SET)   /* struct rtc_time only has ints */
+COMPATIBLE_IOCTL(RTC_ALM_READ)  /* struct rtc_time only has ints */
+COMPATIBLE_IOCTL(RTC_RD_TIME)   /* struct rtc_time only has ints */
+COMPATIBLE_IOCTL(RTC_SET_TIME)  /* struct rtc_time only has ints */
+HANDLE_IOCTL(RTC_IRQP_READ, w_long)
+COMPATIBLE_IOCTL(RTC_IRQP_SET)
+HANDLE_IOCTL(RTC_EPOCH_READ, w_long)
+COMPATIBLE_IOCTL(RTC_EPOCH_SET)
+#endif
+#if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
+HANDLE_IOCTL(DRM32_IOCTL_VERSION, drm32_version);
+HANDLE_IOCTL(DRM32_IOCTL_GET_UNIQUE, drm32_getsetunique);
+HANDLE_IOCTL(DRM32_IOCTL_SET_UNIQUE, drm32_getsetunique);
+HANDLE_IOCTL(DRM32_IOCTL_ADD_MAP, drm32_addmap);
+HANDLE_IOCTL(DRM32_IOCTL_INFO_BUFS, drm32_info_bufs);
+HANDLE_IOCTL(DRM32_IOCTL_FREE_BUFS, drm32_free_bufs);
+HANDLE_IOCTL(DRM32_IOCTL_MAP_BUFS, drm32_map_bufs);
+HANDLE_IOCTL(DRM32_IOCTL_DMA, drm32_dma);
+HANDLE_IOCTL(DRM32_IOCTL_RES_CTX, drm32_res_ctx);
+#endif /* DRM */
+COMPATIBLE_IOCTL(PA_PERF_ON)
+COMPATIBLE_IOCTL(PA_PERF_OFF)
+COMPATIBLE_IOCTL(PA_PERF_VERSION)
+IOCTL_TABLE_END
+
+unsigned int ioctl32_hash_table[1024];
+
+extern inline unsigned long ioctl32_hash(unsigned long cmd)
+{
+	return ((cmd >> 6) ^ (cmd >> 4) ^ cmd) & 0x3ff;
+}
+
+static void ioctl32_insert_translation(struct ioctl_trans *trans)
+{
+	unsigned long hash;
+	struct ioctl_trans *t;
+
+	hash = ioctl32_hash (trans->cmd);
+	if (!ioctl32_hash_table[hash])
+		ioctl32_hash_table[hash] = (u32)(long)trans;
+	else {
+		t = (struct ioctl_trans *)(long)ioctl32_hash_table[hash];
+		while (t->next)
+			t = (struct ioctl_trans *)(long)t->next;
+		trans->next = 0;
+		t->next = (u32)(long)trans;
+	}
+}
+
+static int __init init_sys32_ioctl(void)
+{
+	int i;
+	extern struct ioctl_trans ioctl_translations[], ioctl_translations_end[];
+
+	for (i = 0; &ioctl_translations[i] < &ioctl_translations_end[0]; i++)
+		ioctl32_insert_translation(&ioctl_translations[i]);
+	return 0;
+}
+
+__initcall(init_sys32_ioctl);
+
+static struct ioctl_trans *additional_ioctls;
+
+/* Always call these with kernel lock held! */
+
+int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
+{
+	int i;
+
+panic("register_ioctl32_conversion() is B0RKEN! Called by %p\n", __builtin_return_address(0));
+
+	if (!additional_ioctls) {
+		additional_ioctls = module_map(PAGE_SIZE);
+		if (!additional_ioctls)
+			return -ENOMEM;
+		memset(additional_ioctls, 0, PAGE_SIZE);
+	}
+	for (i = 0; i < PAGE_SIZE/sizeof(struct ioctl_trans); i++)
+		if (!additional_ioctls[i].cmd)
+			break;
+	if (i == PAGE_SIZE/sizeof(struct ioctl_trans))
+		return -ENOMEM;
+	additional_ioctls[i].cmd = cmd;
+	if (!handler)
+		additional_ioctls[i].handler = (u32)(long)sys_ioctl;
+	else
+		additional_ioctls[i].handler = (u32)(long)handler;
+	ioctl32_insert_translation(&additional_ioctls[i]);
+	return 0;
+}
+
+int unregister_ioctl32_conversion(unsigned int cmd)
+{
+	unsigned long hash = ioctl32_hash(cmd);
+	struct ioctl_trans *t, *t1;
+
+	t = (struct ioctl_trans *)(long)ioctl32_hash_table[hash];
+	if (!t) return -EINVAL;
+	if (t->cmd == cmd && t >= additional_ioctls &&
+	    (unsigned long)t < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
+		ioctl32_hash_table[hash] = t->next;
+		t->cmd = 0;
+		return 0;
+	} else while (t->next) {
+		t1 = (struct ioctl_trans *)(long)t->next;
+		if (t1->cmd == cmd && t1 >= additional_ioctls &&
+		    (unsigned long)t1 < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
+			t1->cmd = 0;
+			t->next = t1->next;
+			return 0;
+		}
+		t = t1;
+	}
+	return -EINVAL;
+}
+
+asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct file * filp;
+	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
+	unsigned long pafnptr[4];
+	extern char __gp;
+	struct ioctl_trans *t;
+	int error = -EBADF;
+
+	filp = fget(fd);
+	if(!filp)
+		goto out2;
+
+	if (!filp->f_op || !filp->f_op->ioctl) {
+		error = sys_ioctl (fd, cmd, arg);
+		goto out;
+	}
+
+	/* intercept private networking ioctl() calls here since it is
+	 * an onerous task to figure out which ones of the HANDLE_IOCTL
+	 * list map to these values.
+	 */
+	if (cmd >= SIOCDEVPRIVATE && cmd <= SIOCDEVPRIVATE + 0xf) {
+		error = siocprivate(fd, cmd, arg);
+		goto out;
+	}
+
+	t = (struct ioctl_trans *)(long)ioctl32_hash_table [ioctl32_hash (cmd)];
+
+	while (t && t->cmd != cmd)
+		t = (struct ioctl_trans *)(long)t->next;
+	if (t) {
+		handler = (void *) pafnptr;
+		pafnptr[0] = pafnptr[1] = 0UL;
+		pafnptr[2] = (unsigned long) t->handler;
+		pafnptr[3] = A(&__gp);
+		error = handler(fd, cmd, arg, filp);
+	} else {
+		static int count = 0;
+		if (++count <= 20)
+			printk(KERN_WARNING
+				"sys32_ioctl: Unknown cmd fd(%d) "
+				"cmd(%08x) arg(%08x)\n",
+				(int)fd, (unsigned int)cmd, (unsigned int)arg);
+		error = -EINVAL;
+	}
+out:
+	fput(filp);
+out2:
+	return error;
+}
diff -Nru a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
--- a/arch/parisc/kernel/irq.c	Wed Oct 30 16:44:27 2002
+++ b/arch/parisc/kernel/irq.c	Wed Oct 30 16:44:27 2002
@@ -1,13 +1,10 @@
-/* $Id: irq.c,v 1.8 2000/02/08 02:01:17 grundler Exp $
- *
+/* 
  * Code to handle x86 style IRQs plus some generic interrupt stuff.
  *
- * This is not in any way SMP-clean.
- *
  * Copyright (C) 1992 Linus Torvalds
  * Copyright (C) 1994, 1995, 1996, 1997, 1998 Ralf Baechle
- * Copyright (C) 1999 SuSE GmbH (Author: Philipp Rumpf, prumpf@tux.org)
- * Copyright (C) 2000 Hewlett Packard Corp (Co-Author: Grant Grundler, grundler@cup.hp.com)
+ * Copyright (C) 1999 SuSE GmbH (Philipp Rumpf, prumpf@tux.org)
+ * Copyright (C) 1999-2000 Grant Grundler
  *
  *    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
@@ -23,139 +20,167 @@
  *    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/bitops.h>
-#include <asm/bitops.h>
+#include <linux/config.h>
 #include <asm/pdc.h>
 #include <linux/errno.h>
 #include <linux/init.h>
-#include <linux/kernel_stat.h>
 #include <linux/signal.h>
-#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/random.h>
+#include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/kernel_stat.h>
 #include <linux/irq.h>
 #include <linux/seq_file.h>
+#include <linux/spinlock.h>
 
 #include <asm/cache.h>
 
 #undef DEBUG_IRQ
+#undef PARISC_IRQ_CR16_COUNTS
 
 extern void timer_interrupt(int, void *, struct pt_regs *);
 extern void ipi_interrupt(int, void *, struct pt_regs *);
 
 #ifdef DEBUG_IRQ
-#define DBG_IRQ(x...)   printk(x)
+#define DBG_IRQ(irq, x)	if ((irq) != TIMER_IRQ) printk x
 #else /* DEBUG_IRQ */
-#define DBG_IRQ(x...)
+#define DBG_IRQ(irq, x)	do { } while (0)
 #endif /* DEBUG_IRQ */
 
-#define EIEM_MASK(irq) (1L<<(MAX_CPU_IRQ-IRQ_OFFSET(irq)))
-#define CLEAR_EIEM_BIT(irq) set_eiem(get_eiem() & ~EIEM_MASK(irq))
-#define SET_EIEM_BIT(irq) set_eiem(get_eiem() | EIEM_MASK(irq))
+#define EIEM_MASK(irq)       (1UL<<(MAX_CPU_IRQ-IRQ_OFFSET(irq)))
+
+/* Bits in EIEM correlate with cpu_irq_action[].
+** Numbered *Big Endian*! (ie bit 0 is MSB)
+*/
+static unsigned long cpu_eiem = 0;
+
+static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED;  /* protect IRQ regions */
+
+#ifdef CONFIG_SMP
+static void cpu_set_eiem(void *info)
+{
+	set_eiem((unsigned long) info);
+}
+#endif
 
-static void disable_cpu_irq(void *unused, int irq)
+static inline void disable_cpu_irq(void *unused, int irq)
 {
-	CLEAR_EIEM_BIT(irq);
+	unsigned long eirr_bit = EIEM_MASK(irq);
+
+	cpu_eiem &= ~eirr_bit;
+	set_eiem(cpu_eiem);
+        smp_call_function(cpu_set_eiem, (void *) cpu_eiem, 1, 1);
 }
 
 static void enable_cpu_irq(void *unused, int irq)
 {
-	unsigned long mask = EIEM_MASK(irq);
+	unsigned long eirr_bit = EIEM_MASK(irq);
 
-	mtctl(mask, 23);
-	SET_EIEM_BIT(irq);
+	mtctl(eirr_bit, 23);	/* clear EIRR bit before unmasking */
+	cpu_eiem |= eirr_bit;
+        smp_call_function(cpu_set_eiem, (void *) cpu_eiem, 1, 1);
+	set_eiem(cpu_eiem);
+}
+
+/* mask and disable are the same at the CPU level
+** Difference is enable clears pending interrupts
+*/
+#define mask_cpu_irq	disable_cpu_irq
+
+static inline void unmask_cpu_irq(void *unused, int irq)
+{
+	unsigned long eirr_bit = EIEM_MASK(irq);
+	cpu_eiem |= eirr_bit;
+	/* NOTE: sending an IPI will cause do_cpu_irq_mask() to
+	** handle *any* unmasked pending interrupts.
+	** ie We don't need to check for pending interrupts here.
+	*/
+        smp_call_function(cpu_set_eiem, (void *) cpu_eiem, 1, 1);
+	set_eiem(cpu_eiem);
 }
 
 static struct irqaction cpu_irq_actions[IRQ_PER_REGION] = {
-	[IRQ_OFFSET(TIMER_IRQ)] { timer_interrupt, 0, 0, "timer", NULL, NULL },
-	[IRQ_OFFSET(IPI_IRQ)]	{ ipi_interrupt, 0, 0, "IPI", NULL, NULL },
+	[IRQ_OFFSET(TIMER_IRQ)] { handler: timer_interrupt, name: "timer", },
+#ifdef CONFIG_SMP
+	[IRQ_OFFSET(IPI_IRQ)]	{ handler: ipi_interrupt,   name: "IPI", },
+#endif
 };
 
 struct irq_region cpu_irq_region = {
-	{ disable_cpu_irq, enable_cpu_irq, NULL, NULL },
-	{ &cpu_data[0], "PA-PIC", IRQ_REG_MASK|IRQ_REG_DIS, IRQ_FROM_REGION(CPU_IRQ_REGION)},
-	cpu_irq_actions
+	ops:	{ disable_cpu_irq, enable_cpu_irq, unmask_cpu_irq, unmask_cpu_irq },
+	data:	{ dev: &cpu_data[0],
+		  name: "PA-CPU-00",
+		  irqbase: IRQ_FROM_REGION(CPU_IRQ_REGION), },
+	action:	cpu_irq_actions,
 };
 
 struct irq_region *irq_region[NR_IRQ_REGS] = {
-	[ 0 ] NULL,		/* abuse will data page fault (aka code 15) */
+	[ 0 ]              NULL, /* reserved for EISA, else causes data page fault (aka code 15) */
 	[ CPU_IRQ_REGION ] &cpu_irq_region,
 };
 
 
+/*
+** Generic interfaces that device drivers can use:
+**    mask_irq()	block IRQ
+**    unmask_irq()	re-enable IRQ and trigger if IRQ is pending
+**    disable_irq()	block IRQ
+**    enable_irq()	clear pending and re-enable IRQ
+*/
 
-/* we special-case the real IRQs here, which feels right given the relatively
- * high cost of indirect calls.  If anyone is bored enough to benchmark this
- * and find out whether I am right, feel free to.   prumpf */
-
-static inline void mask_irq(int irq)
+void mask_irq(int irq)
 {
 	struct irq_region *region;
-	
-#ifdef DEBUG_IRQ
-	if (irq != TIMER_IRQ)
-#endif
-	DBG_IRQ("mask_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq));
 
-	if(IRQ_REGION(irq) != CPU_IRQ_REGION) {
-		region = irq_region[IRQ_REGION(irq)];
-		if(region->data.flags & IRQ_REG_MASK)
-			region->ops.mask_irq(region->data.dev, IRQ_OFFSET(irq));
-	} else {
-		CLEAR_EIEM_BIT(irq);
-	}
+	DBG_IRQ(irq, ("mask_irq(%d) %d+%d eiem 0x%lx\n", irq,
+				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
+	irq = irq_cannonicalize(irq);
+	region = irq_region[IRQ_REGION(irq)];
+	if (region->ops.mask_irq)
+		region->ops.mask_irq(region->data.dev, IRQ_OFFSET(irq));
 }
 
-static inline void unmask_irq(int irq)
+void unmask_irq(int irq)
 {
 	struct irq_region *region;
 
-#ifdef DEBUG_IRQ
-	if (irq != TIMER_IRQ)
-#endif
-	DBG_IRQ("unmask_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq));
-
-	if(IRQ_REGION(irq) != CPU_IRQ_REGION) {
-		region = irq_region[IRQ_REGION(irq)];
-		if(region->data.flags & IRQ_REG_MASK)
-			region->ops.unmask_irq(region->data.dev, IRQ_OFFSET(irq));
-	} else {
-		SET_EIEM_BIT(irq);
-	}
+	DBG_IRQ(irq, ("unmask_irq(%d) %d+%d eiem 0x%lx\n", irq,
+				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
+	irq = irq_cannonicalize(irq);
+	region = irq_region[IRQ_REGION(irq)];
+	if (region->ops.unmask_irq)
+		region->ops.unmask_irq(region->data.dev, IRQ_OFFSET(irq));
 }
 
 void disable_irq(int irq)
 {
 	struct irq_region *region;
 
-#ifdef DEBUG_IRQ
-	if (irq != TIMER_IRQ)
-#endif
-	DBG_IRQ("disable_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq));
+	DBG_IRQ(irq, ("disable_irq(%d) %d+%d eiem 0x%lx\n", irq,
+				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
+	irq = irq_cannonicalize(irq);
 	region = irq_region[IRQ_REGION(irq)];
-
-	if(region->data.flags & IRQ_REG_DIS)
+	if (region->ops.disable_irq)
 		region->ops.disable_irq(region->data.dev, IRQ_OFFSET(irq));
 	else
 		BUG();
 }
 
-void enable_irq(int irq) 
+void enable_irq(int irq)
 {
 	struct irq_region *region;
 
-#ifdef DEBUG_IRQ
-	if (irq != TIMER_IRQ)
-#endif
-	DBG_IRQ("enable_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq));
+	DBG_IRQ(irq, ("enable_irq(%d) %d+%d eiem 0x%lx\n", irq,
+				IRQ_REGION(irq), IRQ_OFFSET(irq), cpu_eiem));
+	irq = irq_cannonicalize(irq);
 	region = irq_region[IRQ_REGION(irq)];
 
-	if(region->data.flags & IRQ_REG_DIS)
+	if (region->ops.enable_irq)
 		region->ops.enable_irq(region->data.dev, IRQ_OFFSET(irq));
 	else
 		BUG();
@@ -164,56 +189,88 @@
 int show_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_PROC_FS
-	int i, j;
-	int regnr, irq_no;
-	struct irq_region *region;
-	struct irqaction *action, *mainaction;
+	unsigned int regnr = 0;
+
+	seq_puts(p, "     ");
+#if 0 /* def CONFIG_SMP */
+	for (; regnr < smp_num_cpus; regnr++)
+#endif
+		seq_printf(p, "      CPU%d ", regnr);
 
-	seq_puts(p, "           ");
-	for (j=0; j<smp_num_cpus; j++)
-		seq_printf(p, "CPU%d       ",j);
+#ifdef PARISC_IRQ_CR16_COUNTS
+	seq_printf(p, "[min/avg/max] (CPU cycle counts)");
+#endif
 	seq_putc(p, '\n');
 
+	/* We don't need *irqsave lock variants since this is
+	** only allowed to change while in the base context.
+	*/
+	spin_lock(&irq_lock);
 	for (regnr = 0; regnr < NR_IRQ_REGS; regnr++) {
-	    region = irq_region[regnr];
-	    if (!region || !region->action)
+	    unsigned int i;
+	    struct irq_region *region = irq_region[regnr];
+
+            if (!region || !region->action)
 		continue;
-	    
-	    mainaction = region->action;
 
 	    for (i = 0; i <= MAX_CPU_IRQ; i++) {
-		action = mainaction++;
-		if (!action || !action->name)
-		    continue;
-		
-		irq_no = IRQ_FROM_REGION(regnr) + i;
-		
+		struct irqaction *action = &region->action[i];
+		unsigned int irq_no = IRQ_FROM_REGION(regnr) + i;
+#if 0 /* def CONFIG_SMP */
+/* We currently direct all Interrupts at the Monarch.
+ * The right way to handle SMP IRQ stats is to have one IRQ region/CPU.
+ */
+		unsigned int j;
+#endif
+
+		if (!action->handler)
+			continue;
+
 		seq_printf(p, "%3d: ", irq_no);
-#ifndef CONFIG_SMP
+#if 1 /* ndef CONFIG_SMP */
 		seq_printf(p, "%10u ", kstat_irqs(irq_no));
 #else
 		for (j = 0; j < smp_num_cpus; j++)
 		    seq_printf(p, "%10u ",
 			    kstat.irqs[cpu_logical_map(j)][irq_no]);
 #endif
-		seq_printf(p, " %14s", 
+		seq_printf(p, " %14s",
 			    region->data.name ? region->data.name : "N/A");
+#ifndef PARISC_IRQ_CR16_COUNTS
 		seq_printf(p, "  %s", action->name);
 
-		for (action=action->next; action; action = action->next)
-		    seq_printf(p, ", %s", action->name);
+		while ((action = action->next))
+			seq_printf(p, ", %s", action->name);
+#else
+		for ( ;action; action = action->next) {
+			unsigned int i, avg, min, max;
+
+			min = max = action->cr16_hist[0];
+
+			for (avg = i = 0; i < PARISC_CR16_HIST_SIZE; i++) {
+				int hist = action->cr16_hist[i];
+
+				if (hist) {
+					avg += hist;
+				} else
+					break;
+
+				if (hist > max) max = hist;
+				if (hist < min) min = hist;
+			}
+
+			avg /= i;
+			seq_printf(p, " %s[%d/%d/%d]", action->name,
+					min,avg,max);
+		}
+#endif
+
 		seq_putc(p, '\n');
-	    }	    	     
-	}  
+	    }
+	}
+	spin_unlock(&irq_lock);
 
 	seq_putc(p, '\n');
-#if CONFIG_SMP
-	seq_puts(p, "LOC: ");
-	for (j = 0; j < smp_num_cpus; j++)
-		seq_printf(p, "%10u ",
-			apic_timer_irqs[cpu_logical_map(j)]);
-	seq_putc(p, '\n');
-#endif
 #endif	/* CONFIG_PROC_FS */
 	return 0;
 }
@@ -234,8 +291,8 @@
 	int irq;
 
 	/* never return irq 0 cause that's the interval timer */
-	for(irq=1; irq<=MAX_CPU_IRQ; irq++) {
-		if(cpu_irq_region.action[irq].handler == NULL) {
+	for (irq = 1; irq <= MAX_CPU_IRQ; irq++) {
+		if (cpu_irq_region.action[irq].handler == NULL) {
 			return (IRQ_FROM_REGION(CPU_IRQ_REGION) + irq);
 		}
 	}
@@ -248,9 +305,7 @@
 txn_claim_irq(int irq)
 {
 	if (irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)].handler ==NULL)
-	{
 		return irq;
-	}
 
 	/* unlikely, but be prepared */
 	return -1;
@@ -261,10 +316,10 @@
 {
 	struct cpuinfo_parisc *dev = (struct cpuinfo_parisc *) (irq_region[IRQ_REGION(virt_irq)]->data.dev);
 
-	if (0==dev) {
+	if (!dev) {
 		printk(KERN_ERR "txn_alloc_addr(0x%x): CPU IRQ region? dev %p\n",
 			virt_irq,dev);
-		return(0UL);
+		return 0;
 	}
 	return (dev->txn_addr);
 }
@@ -277,7 +332,7 @@
 ** V-class (EPIC):          6 bits
 ** N/L-class/A500:          8 bits (iosapic)
 ** PCI 2.2 MSI:             16 bits (I think)
-** Existing PCI devices:    32-bits (NCR c720/ATM/GigE/HyperFabric)
+** Existing PCI devices:    32-bits (all Symbios SCSI/ATM/HyperFabric)
 **
 ** On the service provider side:
 ** o PA 1.1 (and PA2.0 narrow mode)     5-bits (width of EIR register)
@@ -302,117 +357,204 @@
 		panic("Sorry -- didn't allocate valid IRQ for this device\n");
 	}
 
-	return(IRQ_OFFSET(virt_irq));
+	return (IRQ_OFFSET(virt_irq));
 }
 
-
-/* FIXME: SMP, flags, bottom halves, rest */
 void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
 {
 	int cpu = smp_processor_id();
 
-	irq_enter(cpu, irq);
+	irq_enter();
+	++kstat.irqs[IRQ_REGION(irq)][IRQ_OFFSET(irq)];
 
-#ifdef DEBUG_IRQ
-	if (irq != TIMER_IRQ)
+	DBG_IRQ(irq, ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq)));
+
+	for (; action; action = action->next) {
+#ifdef PARISC_IRQ_CR16_COUNTS
+		unsigned long cr_start = mfctl(16);
 #endif
-	DBG_IRQ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq));
-	if (action->handler == NULL)
-		printk(KERN_ERR "No handler for interrupt %d !\n", irq);
 
-	for(; action && action->handler; action = action->next) {
+		if (action->handler == NULL) {
+			if (IRQ_REGION(irq) == EISA_IRQ_REGION && irq_region[EISA_IRQ_REGION]) {
+				/* were we called due to autodetecting (E)ISA irqs ? */
+				unsigned int *status;
+				status = &irq_region[EISA_IRQ_REGION]->data.status[IRQ_OFFSET(irq)];
+				if (*status & IRQ_AUTODETECT) {
+					*status &= ~IRQ_WAITING;
+					continue; 
+				}
+			}
+			printk(KERN_ERR "IRQ:  CPU:%d No handler for IRQ %d !\n", cpu, irq);
+			continue;
+		}
+
 		action->handler(irq, action->dev_id, regs);
+
+#ifdef PARISC_IRQ_CR16_COUNTS
+		{
+			unsigned long cr_end = mfctl(16);
+			unsigned long tmp = cr_end - cr_start;
+			/* check for roll over */
+			cr_start = (cr_end < cr_start) ?  -(tmp) : (tmp);
+		}
+		action->cr16_hist[action->cr16_idx++] = (int) cr_start;
+		action->cr16_idx &= PARISC_CR16_HIST_SIZE - 1;
+#endif
 	}
-	
-	irq_exit(cpu, irq);
 
-	/* don't need to care about unmasking and stuff */
-	do_softirq();
+	irq_exit();
 }
 
+
+/* ONLY called from entry.S:intr_extint() */
+void do_cpu_irq_mask(struct irq_region *region, struct pt_regs *regs)
+{
+	unsigned long eirr_val;
+	unsigned int i=3;	/* limit time in interrupt context */
+
+	/*
+	 * PSW_I or EIEM bits cannot be enabled until after the
+	 * interrupts are processed.
+	 * timer_interrupt() assumes it won't get interrupted when it
+	 * holds the xtime_lock...an unmasked interrupt source could
+	 * interrupt and deadlock by trying to grab xtime_lock too.
+	 * Keeping PSW_I and EIEM disabled avoids this.
+	 */
+	set_eiem(0UL);	/* disable all extr interrupt for now */
+
+	/* 1) only process IRQs that are enabled/unmasked (cpu_eiem)
+	 * 2) We loop here on EIRR contents in order to avoid
+	 *    nested interrupts or having to take another interupt
+	 *    when we could have just handled it right away.
+	 * 3) Limit the number of times we loop to make sure other
+	 *    processing can occur.
+	 */
+	while ((eirr_val = (mfctl(23) & cpu_eiem)) && --i) {
+		unsigned long bit = (1UL<<MAX_CPU_IRQ);
+		unsigned int irq = 0;
+
+		mtctl(eirr_val, 23); /* reset bits we are going to process */
+
+#ifdef DEBUG_IRQ
+		if (eirr_val != (1UL << MAX_CPU_IRQ))
+			printk(KERN_DEBUG "do_cpu_irq_mask  %x\n", eirr_val);
+#endif
+
+		for (; eirr_val && bit; bit>>=1, irq++)
+		{
+			unsigned int irq_num;
+			if (!(bit&eirr_val))
+				continue;
+
+			/* clear bit in mask - can exit loop sooner */
+			eirr_val &= ~bit;
+
+			irq_num = region->data.irqbase + irq;
+			do_irq(&region->action[irq], irq_num, regs);
+		}
+	}
+	set_eiem(cpu_eiem);
+}
+
+
+/* Called from second level IRQ regions: eg dino or iosapic. */
 void do_irq_mask(unsigned long mask, struct irq_region *region, struct pt_regs *regs)
 {
 	unsigned long bit;
-	int irq;
-	int cpu = smp_processor_id();
+	unsigned int irq;
 
 #ifdef DEBUG_IRQ
-	if (mask != (1L << MAX_CPU_IRQ))
-	    printk("do_irq_mask %08lx %p %p\n", mask, region, regs);
+	if (mask != (1L<<MAX_CPU_IRQ))
+	    printk(KERN_DEBUG "do_irq_mask %08lx %p %p\n", mask, region, regs);
 #endif
 
-	for(bit=(1L<<MAX_CPU_IRQ), irq = 0; mask && bit; bit>>=1, irq++) {
-		int irq_num;
-		if(!(bit&mask))
+	for (bit = (1L<<MAX_CPU_IRQ), irq = 0; mask && bit; bit>>=1, irq++) {
+		unsigned int irq_num;
+		if (!(bit&mask))
 			continue;
 
+		mask &= ~bit;	/* clear bit in mask - can exit loop sooner */
 		irq_num = region->data.irqbase + irq;
 
-		++kstat.irqs[cpu][IRQ_FROM_REGION(CPU_IRQ_REGION) | irq];
-		if (IRQ_REGION(irq_num) != CPU_IRQ_REGION)
-		    ++kstat.irqs[cpu][irq_num];
-
 		mask_irq(irq_num);
 		do_irq(&region->action[irq], irq_num, regs);
 		unmask_irq(irq_num);
 	}
 }
 
-static inline int alloc_irqregion(void)
+
+static inline int find_free_region(void)
 {
 	int irqreg;
 
-	for(irqreg=1; irqreg<=(NR_IRQ_REGS); irqreg++) {
-		if(irq_region[irqreg] == NULL)
+	for (irqreg=1; irqreg <= (NR_IRQ_REGS); irqreg++) {
+		if (irq_region[irqreg] == NULL)
 			return irqreg;
 	}
 
 	return 0;
 }
 
-struct irq_region *alloc_irq_region(
-	int count, struct irq_region_ops *ops, unsigned long flags,
-	const char *name, void *dev)
+
+/*****
+ * alloc_irq_region - allocate/init a new IRQ region
+ * @count: number of IRQs in this region.
+ * @ops: function table with request/release/mask/unmask/etc.. entries.
+ * @name: name of region owner for /proc/interrupts output.
+ * @dev: private data to associate with the new IRQ region.
+ *
+ * Every IRQ must become a MMIO write to the CPU's EIRR in
+ * order to get CPU service. The IRQ region represents the
+ * number of unique events the region handler can (or must)
+ * identify. For PARISC CPU, that's the width of the EIR Register.
+ * IRQ regions virtualize IRQs (eg EISA or PCI host bus controllers)
+ * for line based devices.
+ */
+struct irq_region *alloc_irq_region( int count, struct irq_region_ops *ops,
+					const char *name, void *dev)
 {
 	struct irq_region *region;
 	int index;
 
-	index = alloc_irqregion();
+	index = find_free_region();
+	if (index == 0) {
+		printk(KERN_ERR "Maximum number of irq regions exceeded. Increase NR_IRQ_REGS!\n");
+		return NULL;
+	}
 
-	if((IRQ_REGION(count-1)))
+	if ((IRQ_REGION(count-1)))
 		return NULL;
-	
+
 	if (count < IRQ_PER_REGION) {
-	    DBG_IRQ("alloc_irq_region() using minimum of %d irq lines for %s (%d)\n", 
-			IRQ_PER_REGION, name, count);
+	    DBG_IRQ(0, ("alloc_irq_region() using minimum of %d irq lines for %s (%d)\n",
+			IRQ_PER_REGION, name, count));
 	    count = IRQ_PER_REGION;
 	}
 
-	if(flags & IRQ_REG_MASK)
-		if(!(ops->mask_irq && ops->unmask_irq))
-			return NULL;
-			
-	if(flags & IRQ_REG_DIS)
-		if(!(ops->disable_irq && ops->enable_irq))
+	/* if either mask *or* unmask is set, both have to be set. */
+	if((ops->mask_irq || ops->unmask_irq) &&
+		!(ops->mask_irq && ops->unmask_irq))
 			return NULL;
 
-	if((irq_region[index]))
-		return NULL;
+	/* ditto for enable/disable */
+	if( (ops->disable_irq || ops->enable_irq) &&
+		!(ops->disable_irq && ops->enable_irq) )
+			return NULL;
 
-	region = kmalloc(sizeof *region, GFP_ATOMIC);
-	if(!region)
+	region = kmalloc(sizeof(*region), GFP_ATOMIC);
+	if (!region)
 		return NULL;
+	memset(region, 0, sizeof(*region));
 
-	region->action = kmalloc(sizeof *region->action * count, GFP_ATOMIC);
-	if(!region->action) {
+	region->action = kmalloc(count * sizeof(*region->action), GFP_ATOMIC);
+	if (!region->action) {
 		kfree(region);
 		return NULL;
 	}
-	memset(region->action, 0, sizeof *region->action * count);
+	memset(region->action, 0, count * sizeof(*region->action));
 
 	region->ops = *ops;
 	region->data.irqbase = IRQ_FROM_REGION(index);
-	region->data.flags = flags;
 	region->data.name = name;
 	region->data.dev = dev;
 
@@ -420,14 +562,12 @@
 
 	return irq_region[index];
 }
-	
 
-	
 /* FIXME: SMP, flags, bottom halves, rest */
 
-int request_irq(unsigned int irq, 
+int request_irq(unsigned int irq,
 		void (*handler)(int, void *, struct pt_regs *),
-		unsigned long irqflags, 
+		unsigned long irqflags,
 		const char * devname,
 		void *dev_id)
 {
@@ -436,13 +576,19 @@
 #if 0
 	printk(KERN_INFO "request_irq(%d, %p, 0x%lx, %s, %p)\n",irq, handler, irqflags, devname, dev_id);
 #endif
-	if(!handler) {
+
+	irq = irq_cannonicalize(irq);
+	/* request_irq()/free_irq() may not be called from interrupt context. */
+	if (in_interrupt())
+		BUG();
+
+	if (!handler) {
 		printk(KERN_ERR "request_irq(%d,...): Augh! No handler for irq!\n",
 			irq);
 		return -EINVAL;
 	}
 
-	if ((IRQ_REGION(irq) == 0) || irq_region[IRQ_REGION(irq)] == NULL) {
+	if (irq_region[IRQ_REGION(irq)] == NULL) {
 		/*
 		** Bug catcher for drivers which use "char" or u8 for
 		** the IRQ number. They lose the region number which
@@ -453,19 +599,24 @@
 		return -EINVAL;
 	}
 
-	action = &irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)];
+	spin_lock(&irq_lock);
+	action = &(irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)]);
 
-	if(action->handler) {
-		while(action->next)
+	/* First one is preallocated. */
+	if (action->handler) {
+		/* But it's in use...find the tail and allocate a new one */
+		while (action->next)
 			action = action->next;
 
-		action->next = kmalloc(sizeof *action, GFP_ATOMIC);
+		action->next = kmalloc(sizeof(*action), GFP_ATOMIC);
+		memset(action->next, 0, sizeof(*action));
 
 		action = action->next;
-	}			
+	}
 
-	if(!action) {
-		printk(KERN_ERR "request_irq():Augh! No action!\n") ;
+	if (!action) {
+		spin_unlock(&irq_lock);
+		printk(KERN_ERR "request_irq(): Augh! No action!\n") ;
 		return -ENOMEM;
 	}
 
@@ -475,6 +626,7 @@
 	action->name = devname;
 	action->next = NULL;
 	action->dev_id = dev_id;
+	spin_unlock(&irq_lock);
 
 	enable_irq(irq);
 	return 0;
@@ -484,14 +636,22 @@
 {
 	struct irqaction *action, **p;
 
+	/* See comments in request_irq() about interrupt context */
+	irq = irq_cannonicalize(irq);
+	
+	if (in_interrupt()) BUG();
+
+	spin_lock(&irq_lock);
 	action = &irq_region[IRQ_REGION(irq)]->action[IRQ_OFFSET(irq)];
 
-	if(action->dev_id == dev_id) {
-		if(action->next == NULL)
+	if (action->dev_id == dev_id) {
+		if (action->next == NULL) {
 			action->handler = NULL;
-		else
-			memcpy(action, action->next, sizeof *action);
+		} else {
+			memcpy(action, action->next, sizeof(*action));
+		}
 
+		spin_unlock(&irq_lock);
 		return;
 	}
 
@@ -506,27 +666,175 @@
 		*p = action->next;
 		kfree(action);
 
+		spin_unlock(&irq_lock);
 		return;
 	}
 
+	spin_unlock(&irq_lock);
 	printk(KERN_ERR "Trying to free free IRQ%d\n",irq);
 }
 
-unsigned long probe_irq_on (void)
+
+/*
+ * 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.
+ */
+
+static DECLARE_MUTEX(probe_sem);
+
+/**
+ *	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.
+ *
+ */
+
+/* TODO: spin_lock_irq(desc->lock -> irq_lock) */
+
+unsigned long probe_irq_on(void)
 {
-	return 0;
+	unsigned int i;
+	unsigned long val;
+	unsigned long delay;
+	struct irq_region *region;
+
+	/* support for irq autoprobing is limited to EISA (irq region 0) */
+	region = irq_region[EISA_IRQ_REGION];
+	if (!EISA_bus || !region)
+		return 0;
+
+	down(&probe_sem);
+
+	/*
+	 * 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 = EISA_MAX_IRQS-1; i > 0; i--) {
+		struct irqaction *action;
+		
+		spin_lock_irq(&irq_lock);
+		action = region->action + i;
+		if (!action->handler) {
+			region->data.status[i] |= IRQ_AUTODETECT | IRQ_WAITING;
+			region->ops.enable_irq(region->data.dev,i);
+		}
+		spin_unlock_irq(&irq_lock);
+	}
+
+	/*
+	 * Wait for spurious interrupts to trigger
+	 */
+	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
+		/* about 100ms delay */ barrier();
+
+	/*
+	 * Now filter out any obviously spurious interrupts
+	 */
+	val = 0;
+	for (i = 0; i < EISA_MAX_IRQS; i++) {
+		unsigned int status;
+
+		spin_lock_irq(&irq_lock);
+		status = region->data.status[i];
+
+		if (status & IRQ_AUTODETECT) {
+			/* It triggered already - consider it spurious. */
+			if (!(status & IRQ_WAITING)) {
+				region->data.status[i] = status & ~IRQ_AUTODETECT;
+				region->ops.disable_irq(region->data.dev,i);
+			} else
+				if (i < BITS_PER_LONG)
+					val |= (1 << i);
+		}
+		spin_unlock_irq(&irq_lock);
+	}
+
+	return val;
 }
 
-int probe_irq_off (unsigned long irqs)
+/*
+ * 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)
 {
-	return 0;
+        struct irq_region *region;
+	int i, irq_found, nr_irqs;
+
+        /* support for irq autoprobing is limited to EISA (irq region 0) */
+        region = irq_region[EISA_IRQ_REGION];
+        if (!EISA_bus || !region)
+		return 0;
+
+	nr_irqs = 0;
+	irq_found = 0;
+	for (i = 0; i < EISA_MAX_IRQS; i++) {
+		unsigned int status;
+		
+		spin_lock_irq(&irq_lock);
+		status = region->data.status[i];
+
+                if (status & IRQ_AUTODETECT) {
+			if (!(status & IRQ_WAITING)) {
+				if (!nr_irqs)
+					irq_found = i;
+				nr_irqs++;
+			}
+			region->ops.disable_irq(region->data.dev,i);
+			region->data.status[i] = status & ~IRQ_AUTODETECT;
+		}
+		spin_unlock_irq(&irq_lock);
+	}
+	up(&probe_sem);
+
+	if (nr_irqs > 1)
+		irq_found = -irq_found;
+	return irq_found;
 }
 
 
 void __init init_IRQ(void)
 {
+	local_irq_disable();	/* PARANOID - should already be disabled */
+	mtctl(-1L, 23);		/* EIRR : clear all pending external intr */
+#ifdef CONFIG_SMP
+	if (!cpu_eiem)
+		cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ);
+#else
+	cpu_eiem = EIEM_MASK(TIMER_IRQ);
+#endif
+        set_eiem(cpu_eiem);	/* EIEM : enable all external intr */
+
 }
 
-void init_irq_proc(void)
+#ifdef CONFIG_PROC_FS
+/* called from kernel/sysctl.c:sysctl_init() */
+void __init init_irq_proc(void)
 {
 }
+#endif
diff -Nru a/arch/parisc/kernel/keyboard.c b/arch/parisc/kernel/keyboard.c
--- a/arch/parisc/kernel/keyboard.c	Wed Oct 30 16:44:26 2002
+++ b/arch/parisc/kernel/keyboard.c	Wed Oct 30 16:44:26 2002
@@ -1,4 +1,12 @@
 /*
+ *  WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ *  ---------------------------------------------------------------
+ *  This source file will be removed as soon as we have converted
+ *  hp_psaux.c and hp_keyb.c to the input layer !
+ *  
+ */
+
+/*
  *  linux/arch/parisc/kernel/keyboard.c
  *
  *  Alex deVries <adevries@thepuffingroup.com>
@@ -7,8 +15,10 @@
  *  Copyright 2000 Philipp Rumpf
  */
 
+#include <linux/errno.h>
 #include <linux/keyboard.h>
 #include <asm/keyboard.h>
+#include <linux/module.h>
 
 static int def_setkeycode(unsigned int x, unsigned int y)
 {
@@ -43,19 +53,28 @@
 
 static char def_sysrq_xlate[NR_KEYS];
 
-static struct kbd_ops def_kbd_ops = {
-	setkeycode:	def_setkeycode,
-	getkeycode:	def_getkeycode,
-	translate:	def_translate,
-	unexpected_up:	def_unexpected_up,
-	leds:		def_leds,
-	init_hw:	def_init_hw,
-
-	sysrq_key:	0xff,
+#define DEFAULT_KEYB_OPS \
+	setkeycode:	def_setkeycode,	\
+	getkeycode:	def_getkeycode, \
+	translate:	def_translate, \
+	unexpected_up:	def_unexpected_up, \
+	leds:		def_leds, \
+	init_hw:	def_init_hw, \
+	sysrq_key:	0xff, \
 	sysrq_xlate:	def_sysrq_xlate,
+
+static struct kbd_ops def_kbd_ops = {
+	DEFAULT_KEYB_OPS
 };
 
 struct kbd_ops *kbd_ops = &def_kbd_ops;
+
+void unregister_kbd_ops(void)
+{
+	struct kbd_ops new_kbd_ops = { DEFAULT_KEYB_OPS };
+	register_kbd_ops(&new_kbd_ops);
+}
+EXPORT_SYMBOL(unregister_kbd_ops);
 
 void register_kbd_ops(struct kbd_ops *ops)
 {
diff -Nru a/arch/parisc/kernel/pa7300lc.c b/arch/parisc/kernel/pa7300lc.c
--- a/arch/parisc/kernel/pa7300lc.c	Wed Oct 30 16:44:28 2002
+++ b/arch/parisc/kernel/pa7300lc.c	Wed Oct 30 16:44:28 2002
@@ -4,11 +4,12 @@
  *
  *   Copyright (C) 2000 Philipp Rumpf */
 
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/kernel.h>
 #include <asm/gsc.h>
 #include <asm/ptrace.h>
 #include <asm/machdep.h>
-#include <linux/smp.h>
-#include <linux/kernel.h>
 
 /* CPU register indices */
 
@@ -18,12 +19,6 @@
 #define DMAERR		0xf0e8
 #define DIOERR		0xf0ec
 #define HIDMAMEM	0xf0f4
-
-/* read CPU Diagnose register index */
-static u32 diag_read(int index)
-{
-	return 0;
-}
 
 /* this returns the HPA of the CPU it was called on */
 static u32 cpu_hpa(void)
diff -Nru a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/pacache.S	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,908 @@
+/*
+ *  Parisc tlb and cache flushing support
+ *  Copyright (C) 2000 Hewlett-Packard (John Marvin)
+ *
+ *    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.
+ */
+
+/*
+ * NOTE: fdc,fic, and pdc instructions that use base register modification
+ *       should only use index and base registers that are not shadowed,
+ *       so that the fast path emulation in the non access miss handler
+ *       can be used.
+ */
+
+#ifdef __LP64__
+#define ADDIB   addib,*
+#define CMPB    cmpb,*
+#define ANDCM   andcm,*
+
+	.level 2.0w
+#else
+#define ADDIB   addib,
+#define CMPB    cmpb,
+#define ANDCM   andcm
+
+	.level 2.0
+#endif
+
+#include <asm/assembly.h>
+#include <asm/psw.h>
+#include <asm/pgtable.h>
+#include <asm/cache.h>
+
+	.text
+	.align 128
+
+	.export flush_tlb_all_local,code
+
+flush_tlb_all_local:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	/*
+	 * The pitlbe and pdtlbe instructions should only be used to
+	 * flush the entire tlb. Also, there needs to be no intervening
+	 * tlb operations, e.g. tlb misses, so the operation needs
+	 * to happen in real mode with all interruptions disabled.
+	 */
+
+	/*
+	 * Once again, we do the rfi dance ... some day we need examine
+	 * all of our uses of this type of code and see what can be
+	 * consolidated.
+	 */
+
+	rsm     PSW_SM_I,%r19      /* relied upon translation! */
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	
+	rsm     PSW_SM_Q,%r0       /* Turn off Q bit to load iia queue */
+	ldil    L%REAL_MODE_PSW, %r1
+	ldo     R%REAL_MODE_PSW(%r1), %r1
+	mtctl	%r1, %cr22
+	mtctl	%r0, %cr17
+	mtctl	%r0, %cr17
+	ldil    L%PA(1f),%r1
+	ldo     R%PA(1f)(%r1),%r1
+	mtctl	%r1, %cr18
+	ldo	4(%r1), %r1
+	mtctl	%r1, %cr18
+	rfi
+	nop
+
+1:      ldil            L%PA(cache_info),%r1
+	ldo             R%PA(cache_info)(%r1),%r1
+
+	/* Flush Instruction Tlb */
+
+	LDREG           ITLB_SID_BASE(%r1),%r20
+	LDREG           ITLB_SID_STRIDE(%r1),%r21
+	LDREG           ITLB_SID_COUNT(%r1),%r22
+	LDREG           ITLB_OFF_BASE(%r1),%arg0
+	LDREG           ITLB_OFF_STRIDE(%r1),%arg1
+	LDREG           ITLB_OFF_COUNT(%r1),%arg2
+	LDREG           ITLB_LOOP(%r1),%arg3
+
+	ADDIB=          -1,%arg3,fitoneloop     /* Preadjust and test */
+	movb,<,n        %arg3,%r31,fitdone      /* If loop < 0, skip */
+	copy            %arg0,%r28              /* Init base addr */
+
+fitmanyloop:                                    /* Loop if LOOP >= 2 */
+	mtsp            %r20,%sr1
+	add             %r21,%r20,%r20          /* increment space */
+	copy            %arg2,%r29              /* Init middle loop count */
+
+fitmanymiddle:                                  /* Loop if LOOP >= 2 */
+	ADDIB>          -1,%r31,fitmanymiddle   /* Adjusted inner loop decr */
+	pitlbe          0(%sr1,%r28)
+	pitlbe,m        %arg1(%sr1,%r28)        /* Last pitlbe and addr adjust */
+	ADDIB>          -1,%r29,fitmanymiddle   /* Middle loop decr */
+	copy            %arg3,%r31              /* Re-init inner loop count */
+
+	movb,tr         %arg0,%r28,fitmanyloop  /* Re-init base addr */
+	ADDIB<=,n       -1,%r22,fitdone         /* Outer loop count decr */
+
+fitoneloop:                                     /* Loop if LOOP = 1 */
+	mtsp            %r20,%sr1
+	copy            %arg0,%r28              /* init base addr */
+	copy            %arg2,%r29              /* init middle loop count */
+
+fitonemiddle:                                   /* Loop if LOOP = 1 */
+	ADDIB>          -1,%r29,fitonemiddle    /* Middle loop count decr */
+	pitlbe,m        %arg1(%sr1,%r28)        /* pitlbe for one loop */
+
+	ADDIB>          -1,%r22,fitoneloop      /* Outer loop count decr */
+	add             %r21,%r20,%r20          /* increment space */
+
+fitdone:
+
+	/* Flush Data Tlb */
+
+	LDREG           DTLB_SID_BASE(%r1),%r20
+	LDREG           DTLB_SID_STRIDE(%r1),%r21
+	LDREG           DTLB_SID_COUNT(%r1),%r22
+	LDREG           DTLB_OFF_BASE(%r1),%arg0
+	LDREG           DTLB_OFF_STRIDE(%r1),%arg1
+	LDREG           DTLB_OFF_COUNT(%r1),%arg2
+	LDREG           DTLB_LOOP(%r1),%arg3
+
+	ADDIB=          -1,%arg3,fdtoneloop     /* Preadjust and test */
+	movb,<,n        %arg3,%r31,fdtdone      /* If loop < 0, skip */
+	copy            %arg0,%r28              /* Init base addr */
+
+fdtmanyloop:                                    /* Loop if LOOP >= 2 */
+	mtsp            %r20,%sr1
+	add             %r21,%r20,%r20          /* increment space */
+	copy            %arg2,%r29              /* Init middle loop count */
+
+fdtmanymiddle:                                  /* Loop if LOOP >= 2 */
+	ADDIB>          -1,%r31,fdtmanymiddle   /* Adjusted inner loop decr */
+	pdtlbe          0(%sr1,%r28)
+	pdtlbe,m        %arg1(%sr1,%r28)        /* Last pdtlbe and addr adjust */
+	ADDIB>          -1,%r29,fdtmanymiddle   /* Middle loop decr */
+	copy            %arg3,%r31              /* Re-init inner loop count */
+
+	movb,tr         %arg0,%r28,fdtmanyloop  /* Re-init base addr */
+	ADDIB<=,n       -1,%r22,fdtdone         /* Outer loop count decr */
+
+fdtoneloop:                                     /* Loop if LOOP = 1 */
+	mtsp            %r20,%sr1
+	copy            %arg0,%r28              /* init base addr */
+	copy            %arg2,%r29              /* init middle loop count */
+
+fdtonemiddle:                                   /* Loop if LOOP = 1 */
+	ADDIB>          -1,%r29,fdtonemiddle    /* Middle loop count decr */
+	pdtlbe,m        %arg1(%sr1,%r28)        /* pdtlbe for one loop */
+
+	ADDIB>          -1,%r22,fdtoneloop      /* Outer loop count decr */
+	add             %r21,%r20,%r20          /* increment space */
+
+fdtdone:
+
+	/* Switch back to virtual mode */
+
+	rsm     PSW_SM_Q,%r0       /* clear Q bit to load iia queue */
+	ldil	L%KERNEL_PSW, %r1
+	ldo	R%KERNEL_PSW(%r1), %r1
+	or      %r1,%r19,%r1    /* Set I bit if set on entry */
+	mtctl	%r1, %cr22
+	mtctl	%r0, %cr17
+	mtctl	%r0, %cr17
+	ldil    L%(2f), %r1
+	ldo     R%(2f)(%r1), %r1
+	mtctl	%r1, %cr18
+	ldo	4(%r1), %r1
+	mtctl	%r1, %cr18
+	rfi
+	nop
+
+2:      bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_instruction_cache_local,code
+	.import cache_info,data
+
+flush_instruction_cache_local:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	mtsp            %r0,%sr1
+	ldil            L%cache_info,%r1
+	ldo             R%cache_info(%r1),%r1
+
+	/* Flush Instruction Cache */
+
+	LDREG           ICACHE_BASE(%r1),%arg0
+	LDREG           ICACHE_STRIDE(%r1),%arg1
+	LDREG           ICACHE_COUNT(%r1),%arg2
+	LDREG           ICACHE_LOOP(%r1),%arg3
+	ADDIB=          -1,%arg3,fioneloop      /* Preadjust and test */
+	movb,<,n        %arg3,%r31,fisync       /* If loop < 0, do sync */
+
+fimanyloop:                                     /* Loop if LOOP >= 2 */
+	ADDIB>          -1,%r31,fimanyloop      /* Adjusted inner loop decr */
+	fice            0(%sr1,%arg0)
+	fice,m          %arg1(%sr1,%arg0)       /* Last fice and addr adjust */
+	movb,tr         %arg3,%r31,fimanyloop   /* Re-init inner loop count */
+	ADDIB<=,n       -1,%arg2,fisync         /* Outer loop decr */
+
+fioneloop:                                      /* Loop if LOOP = 1 */
+	ADDIB>          -1,%arg2,fioneloop      /* Outer loop count decr */
+	fice,m          %arg1(%sr1,%arg0)       /* Fice for one loop */
+
+fisync:
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_data_cache_local,code
+	.import cache_info,data
+
+flush_data_cache_local:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	mtsp            %r0,%sr1
+	ldil            L%cache_info,%r1
+	ldo             R%cache_info(%r1),%r1
+
+	/* Flush Data Cache */
+
+	LDREG           DCACHE_BASE(%r1),%arg0
+	LDREG           DCACHE_STRIDE(%r1),%arg1
+	LDREG           DCACHE_COUNT(%r1),%arg2
+	LDREG           DCACHE_LOOP(%r1),%arg3
+	rsm             PSW_SM_I,%r22
+	ADDIB=          -1,%arg3,fdoneloop      /* Preadjust and test */
+	movb,<,n        %arg3,%r31,fdsync       /* If loop < 0, do sync */
+
+fdmanyloop:                                     /* Loop if LOOP >= 2 */
+	ADDIB>          -1,%r31,fdmanyloop      /* Adjusted inner loop decr */
+	fdce            0(%sr1,%arg0)
+	fdce,m          %arg1(%sr1,%arg0)       /* Last fdce and addr adjust */
+	movb,tr         %arg3,%r31,fdmanyloop   /* Re-init inner loop count */
+	ADDIB<=,n       -1,%arg2,fdsync         /* Outer loop decr */
+
+fdoneloop:                                      /* Loop if LOOP = 1 */
+	ADDIB>          -1,%arg2,fdoneloop      /* Outer loop count decr */
+	fdce,m          %arg1(%sr1,%arg0)       /* Fdce for one loop */
+
+fdsync:
+	syncdma
+	sync
+	mtsm    %r22
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export copy_user_page_asm,code
+
+copy_user_page_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldi 64,%r1
+
+	/*
+	 * This loop is optimized for PCXL/PCXL2 ldw/ldw and stw/stw
+	 * bundles (very restricted rules for bundling). It probably
+	 * does OK on PCXU and better, but we could do better with
+	 * ldd/std instructions. Note that until (if) we start saving
+	 * the full 64 bit register values on interrupt, we can't
+	 * use ldd/std on a 32 bit kernel.
+	 */
+
+
+1:
+	ldw 0(%r25),%r19
+	ldw 4(%r25),%r20
+	ldw 8(%r25),%r21
+	ldw 12(%r25),%r22
+	stw %r19,0(%r26)
+	stw %r20,4(%r26)
+	stw %r21,8(%r26)
+	stw %r22,12(%r26)
+	ldw 16(%r25),%r19
+	ldw 20(%r25),%r20
+	ldw 24(%r25),%r21
+	ldw 28(%r25),%r22
+	stw %r19,16(%r26)
+	stw %r20,20(%r26)
+	stw %r21,24(%r26)
+	stw %r22,28(%r26)
+	ldw 32(%r25),%r19
+	ldw 36(%r25),%r20
+	ldw 40(%r25),%r21
+	ldw 44(%r25),%r22
+	stw %r19,32(%r26)
+	stw %r20,36(%r26)
+	stw %r21,40(%r26)
+	stw %r22,44(%r26)
+	ldw 48(%r25),%r19
+	ldw 52(%r25),%r20
+	ldw 56(%r25),%r21
+	ldw 60(%r25),%r22
+	stw %r19,48(%r26)
+	stw %r20,52(%r26)
+	stw %r21,56(%r26)
+	stw %r22,60(%r26)
+	ldo 64(%r26),%r26
+	ADDIB>  -1,%r1,1b
+	ldo 64(%r25),%r25
+
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+#if (TMPALIAS_MAP_START >= 0x80000000UL)
+Warning TMPALIAS_MAP_START changed. If > 2 Gb, code in pacache.S is bogus
+#endif
+
+/*
+ * NOTE: Code in clear_user_page has a hard coded dependency on the
+ *       maximum alias boundary being 4 Mb. We've been assured by the
+ *       parisc chip designers that there will not ever be a parisc
+ *       chip with a larger alias boundary (Never say never :-) ).
+ *
+ *       Subtle: the dtlb miss handlers support the temp alias region by
+ *       "knowing" that if a dtlb miss happens within the temp alias
+ *       region it must have occurred while in clear_user_page. Since
+ *       this routine makes use of processor local translations, we
+ *       don't want to insert them into the kernel page table. Instead,
+ *       we load up some general registers (they need to be registers
+ *       which aren't shadowed) with the physical page numbers (preshifted
+ *       for tlb insertion) needed to insert the translations. When we
+ *       miss on the translation, the dtlb miss handler inserts the
+ *       translation into the tlb using these values:
+ *
+ *          %r26 physical page (shifted for tlb insert) of "to" translation
+ *          %r23 physical page (shifted for tlb insert) of "from" translation
+ */
+
+#if 0
+
+	/*
+	 * We can't do this since copy_user_page is used to bring in
+	 * file data that might have instructions. Since the data would
+	 * then need to be flushed out so the i-fetch can see it, it
+	 * makes more sense to just copy through the kernel translation
+	 * and flush it.
+	 *
+	 * I'm still keeping this around because it may be possible to
+	 * use it if more information is passed into copy_user_page().
+	 * Have to do some measurements to see if it is worthwhile to
+	 * lobby for such a change.
+	 */
+
+	.export copy_user_page_asm,code
+
+copy_user_page_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%(__PAGE_OFFSET),%r1
+	sub     %r26,%r1,%r26
+	sub     %r25,%r1,%r23  /* move physical addr into non shadowed reg */
+
+	ldil    L%(TMPALIAS_MAP_START),%r28
+#ifdef __LP64__
+	extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */
+	extrd,u %r23,56,32,%r23 /* convert phys addr to tlb insert format */
+	depd    %r24,63,22,%r28 /* Form aliased virtual address 'to' */
+	depdi   0,63,12,%r28    /* Clear any offset bits */
+	copy    %r28,%r29
+	depdi   1,41,1,%r29     /* Form aliased virtual address 'from' */
+#else
+	extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */
+	extrw,u %r23,24,25,%r23 /* convert phys addr to tlb insert format */
+	depw    %r24,31,22,%r28 /* Form aliased virtual address 'to' */
+	depwi   0,31,12,%r28    /* Clear any offset bits */
+	copy    %r28,%r29
+	depwi   1,9,1,%r29      /* Form aliased virtual address 'from' */
+#endif
+
+	/* Purge any old translations */
+
+	pdtlb   0(%r28)
+	pdtlb   0(%r29)
+
+	ldi 64,%r1
+
+	/*
+	 * This loop is optimized for PCXL/PCXL2 ldw/ldw and stw/stw
+	 * bundles (very restricted rules for bundling). It probably
+	 * does OK on PCXU and better, but we could do better with
+	 * ldd/std instructions. Note that until (if) we start saving
+	 * the full 64 bit register values on interrupt, we can't
+	 * use ldd/std on a 32 bit kernel.
+	 */
+
+
+1:
+	ldw 0(%r29),%r19
+	ldw 4(%r29),%r20
+	ldw 8(%r29),%r21
+	ldw 12(%r29),%r22
+	stw %r19,0(%r28)
+	stw %r20,4(%r28)
+	stw %r21,8(%r28)
+	stw %r22,12(%r28)
+	ldw 16(%r29),%r19
+	ldw 20(%r29),%r20
+	ldw 24(%r29),%r21
+	ldw 28(%r29),%r22
+	stw %r19,16(%r28)
+	stw %r20,20(%r28)
+	stw %r21,24(%r28)
+	stw %r22,28(%r28)
+	ldw 32(%r29),%r19
+	ldw 36(%r29),%r20
+	ldw 40(%r29),%r21
+	ldw 44(%r29),%r22
+	stw %r19,32(%r28)
+	stw %r20,36(%r28)
+	stw %r21,40(%r28)
+	stw %r22,44(%r28)
+	ldw 48(%r29),%r19
+	ldw 52(%r29),%r20
+	ldw 56(%r29),%r21
+	ldw 60(%r29),%r22
+	stw %r19,48(%r28)
+	stw %r20,52(%r28)
+	stw %r21,56(%r28)
+	stw %r22,60(%r28)
+	ldo 64(%r28),%r28
+	ADDIB>  -1,%r1,1b
+	ldo 64(%r29),%r29
+
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+#endif
+
+	.export clear_user_page_asm,code
+
+clear_user_page_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	tophys_r1 %r26
+
+	ldil    L%(TMPALIAS_MAP_START),%r28
+#ifdef __LP64__
+	extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */
+	depd    %r25,63,22,%r28 /* Form aliased virtual address 'to' */
+	depdi   0,63,12,%r28    /* Clear any offset bits */
+#else
+	extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */
+	depw    %r25,31,22,%r28 /* Form aliased virtual address 'to' */
+	depwi   0,31,12,%r28    /* Clear any offset bits */
+#endif
+
+	/* Purge any old translation */
+
+	pdtlb   0(%r28)
+
+	ldi 64,%r1
+
+1:
+	stw %r0,0(%r28)
+	stw %r0,4(%r28)
+	stw %r0,8(%r28)
+	stw %r0,12(%r28)
+	stw %r0,16(%r28)
+	stw %r0,20(%r28)
+	stw %r0,24(%r28)
+	stw %r0,28(%r28)
+	stw %r0,32(%r28)
+	stw %r0,36(%r28)
+	stw %r0,40(%r28)
+	stw %r0,44(%r28)
+	stw %r0,48(%r28)
+	stw %r0,52(%r28)
+	stw %r0,56(%r28)
+	stw %r0,60(%r28)
+	ADDIB>  -1,%r1,1b
+	ldo 64(%r28),%r28
+
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_kernel_dcache_page
+
+flush_kernel_dcache_page:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%dcache_stride,%r1
+	ldw     R%dcache_stride(%r1),%r23
+
+#ifdef __LP64__
+	depdi,z 1,63-PAGE_SHIFT,1,%r25
+#else
+	depwi,z 1,31-PAGE_SHIFT,1,%r25
+#endif
+	add     %r26,%r25,%r25
+	sub     %r25,%r23,%r25
+
+
+1:      fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	fdc,m   %r23(%r26)
+	CMPB<<  %r26,%r25,1b
+	fdc,m   %r23(%r26)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export purge_kernel_dcache_page
+
+purge_kernel_dcache_page:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%dcache_stride,%r1
+	ldw     R%dcache_stride(%r1),%r23
+
+#ifdef __LP64__
+	depdi,z 1,63-PAGE_SHIFT,1,%r25
+#else
+	depwi,z 1,31-PAGE_SHIFT,1,%r25
+#endif
+	add      %r26,%r25,%r25
+	sub      %r25,%r23,%r25
+
+1:      pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	pdc,m   %r23(%r26)
+	CMPB<<  %r26,%r25,1b
+	pdc,m   %r23(%r26)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+#if 0
+	/* Currently not used, but it still is a possible alternate
+	 * solution.
+	 */
+
+	.export flush_alias_page
+
+flush_alias_page:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	tophys_r1 %r26
+
+	ldil    L%(TMPALIAS_MAP_START),%r28
+#ifdef __LP64__
+	extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */
+	depd    %r25,63,22,%r28 /* Form aliased virtual address 'to' */
+	depdi   0,63,12,%r28    /* Clear any offset bits */
+#else
+	extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */
+	depw    %r25,31,22,%r28 /* Form aliased virtual address 'to' */
+	depwi   0,31,12,%r28    /* Clear any offset bits */
+#endif
+
+	/* Purge any old translation */
+
+	pdtlb   0(%r28)
+
+	ldil    L%dcache_stride,%r1
+	ldw     R%dcache_stride(%r1),%r23
+
+#ifdef __LP64__
+	depdi,z 1,63-PAGE_SHIFT,1,%r29
+#else
+	depwi,z 1,31-PAGE_SHIFT,1,%r29
+#endif
+	add      %r28,%r29,%r29
+	sub      %r29,%r23,%r29
+
+1:      fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	fdc,m   %r23(%r28)
+	CMPB<<  %r28,%r29,1b
+	fdc,m   %r23(%r28)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+#endif
+
+	.export flush_user_dcache_range_asm
+
+flush_user_dcache_range_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%dcache_stride,%r1
+	ldw     R%dcache_stride(%r1),%r23
+	ldo     -1(%r23),%r21
+	ANDCM   %r26,%r21,%r26
+
+1:      CMPB<<,n %r26,%r25,1b
+	fdc,m   %r23(%sr3,%r26)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_kernel_dcache_range_asm
+
+flush_kernel_dcache_range_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%dcache_stride,%r1
+	ldw     R%dcache_stride(%r1),%r23
+	ldo     -1(%r23),%r21
+	ANDCM   %r26,%r21,%r26
+
+1:      CMPB<<,n %r26,%r25,1b
+	fdc,m   %r23(%r26)
+
+	sync
+	syncdma
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_user_icache_range_asm
+
+flush_user_icache_range_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%icache_stride,%r1
+	ldw     R%icache_stride(%r1),%r23
+	ldo     -1(%r23),%r21
+	ANDCM   %r26,%r21,%r26
+
+1:      CMPB<<,n %r26,%r25,1b
+	fic,m   %r23(%sr3,%r26)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_kernel_icache_page
+
+flush_kernel_icache_page:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%icache_stride,%r1
+	ldw     R%icache_stride(%r1),%r23
+
+#ifdef __LP64__
+	depdi,z 1,63-PAGE_SHIFT,1,%r25
+#else
+	depwi,z 1,31-PAGE_SHIFT,1,%r25
+#endif
+	add     %r26,%r25,%r25
+	sub     %r25,%r23,%r25
+
+
+1:      fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	fic,m   %r23(%r26)
+	CMPB<<  %r26,%r25,1b
+	fic,m   %r23(%r26)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.export flush_kernel_icache_range_asm
+
+flush_kernel_icache_range_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	ldil    L%icache_stride,%r1
+	ldw     R%icache_stride(%r1),%r23
+	ldo     -1(%r23),%r21
+	ANDCM   %r26,%r21,%r26
+
+1:      CMPB<<,n %r26,%r25,1b
+	fic,m   %r23(%r26)
+
+	sync
+	bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.align 128
+
+	.export disable_sr_hashing_asm,code
+
+disable_sr_hashing_asm:
+	.proc
+	.callinfo NO_CALLS
+	.entry
+
+	/* Switch to real mode */
+
+	ssm     0,%r0           /* relied upon translation! */
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	
+	rsm     (PSW_SM_Q|PSW_SM_I),%r0 /* disable Q&I to load the iia queue */
+	ldil    L%REAL_MODE_PSW, %r1
+	ldo     R%REAL_MODE_PSW(%r1), %r1
+	mtctl	%r1, %cr22
+	mtctl	%r0, %cr17
+	mtctl	%r0, %cr17
+	ldil    L%PA(1f),%r1
+	ldo     R%PA(1f)(%r1),%r1
+	mtctl	%r1, %cr18
+	ldo	4(%r1), %r1
+	mtctl	%r1, %cr18
+	rfi
+	nop
+
+1:      cmpib,=,n SRHASH_PCXST,%r26,srdis_pcxs
+	cmpib,=,n SRHASH_PCXL,%r26,srdis_pcxl
+	cmpib,=,n SRHASH_PA20,%r26,srdis_pa20
+	b,n       srdis_done
+
+srdis_pcxs:
+
+	/* Disable Space Register Hashing for PCXS,PCXT,PCXT' */
+
+	.word           0x141c1a00  /* mfdiag %dr0,%r28 */
+	.word           0x141c1a00  /* must issue twice */
+	depwi           0,18,1,%r28 /* Clear DHE (dcache hash enable) */
+	depwi           0,20,1,%r28 /* Clear IHE (icache hash enable) */
+	.word           0x141c1600  /* mtdiag %r28,%dr0 */
+	.word           0x141c1600  /* must issue twice */
+	b,n             srdis_done
+
+srdis_pcxl:
+
+	/* Disable Space Register Hashing for PCXL */
+
+	.word           0x141c0600  /* mfdiag %dr0,%r28 */
+	depwi           0,28,2,%r28 /* Clear DHASH_EN & IHASH_EN */
+	.word           0x141c0240  /* mtdiag %r28,%dr0 */
+	b,n             srdis_done
+
+srdis_pa20:
+
+	/* Disable Space Register Hashing for PCXU,PCXU+,PCXW,PCXW+ */
+
+	.word           0x144008bc  /* mfdiag %dr2,%r28 */
+	depdi           0,54,1,%r28 /* clear DIAG_SPHASH_ENAB (bit 54) */
+	.word           0x145c1840  /* mtdiag %r28,%dr2 */
+
+srdis_done:
+
+	/* Switch back to virtual mode */
+
+	rsm     PSW_SM_Q,%r0           /* clear Q bit to load iia queue */
+	ldil	L%KERNEL_PSW, %r1
+	ldo	R%KERNEL_PSW(%r1), %r1
+	mtctl	%r1, %cr22
+	mtctl	%r0, %cr17
+	mtctl	%r0, %cr17
+	ldil    L%(2f), %r1
+	ldo     R%(2f)(%r1), %r1
+	mtctl	%r1, %cr18
+	ldo	4(%r1), %r1
+	mtctl	%r1, %cr18
+	rfi
+	nop
+
+2:      bv      %r0(%r2)
+	nop
+	.exit
+
+	.procend
+
+	.end
diff -Nru a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
--- a/arch/parisc/kernel/parisc_ksyms.c	Wed Oct 30 16:44:36 2002
+++ b/arch/parisc/kernel/parisc_ksyms.c	Wed Oct 30 16:44:36 2002
@@ -14,16 +14,28 @@
 EXPORT_SYMBOL(memmove);
 EXPORT_SYMBOL(strcat);
 EXPORT_SYMBOL(strchr);
+EXPORT_SYMBOL(strrchr);
 EXPORT_SYMBOL(strcmp);
 EXPORT_SYMBOL(strcpy);
 EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL(strnlen);
 EXPORT_SYMBOL(strncat);
 EXPORT_SYMBOL(strncmp);
 EXPORT_SYMBOL(strncpy);
+EXPORT_SYMBOL(strstr);
 
+#include <asm/hardware.h>	/* struct parisc_device for asm/pci.h */
 #include <linux/pci.h>
 EXPORT_SYMBOL(hppa_dma_ops);
+#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
+EXPORT_SYMBOL(get_pci_node_path);
+#endif
+
+#ifdef CONFIG_IOMMU_CCIO
+EXPORT_SYMBOL(ccio_get_fake);
+#endif
 
+#include <linux/sched.h>
 #include <asm/irq.h>
 EXPORT_SYMBOL(enable_irq);
 EXPORT_SYMBOL(disable_irq);
@@ -31,39 +43,102 @@
 #include <asm/processor.h>
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(boot_cpu_data);
+EXPORT_SYMBOL(map_hpux_gateway_page);
+#ifdef CONFIG_EISA
+EXPORT_SYMBOL(EISA_bus);
+#endif
+
+#include <linux/pm.h>
+EXPORT_SYMBOL(pm_power_off);
 
 #ifdef CONFIG_SMP
 EXPORT_SYMBOL(synchronize_irq);
+#endif /* CONFIG_SMP */
 
-#include <asm/system.h>
-EXPORT_SYMBOL(__global_sti);
-EXPORT_SYMBOL(__global_cli);
-EXPORT_SYMBOL(__global_save_flags);
-EXPORT_SYMBOL(__global_restore_flags);
-
+#include <asm/atomic.h>
+EXPORT_SYMBOL(__xchg8);
+EXPORT_SYMBOL(__xchg32);
+EXPORT_SYMBOL(__cmpxchg_u32);
+#ifdef CONFIG_SMP
+EXPORT_SYMBOL(__atomic_hash);
+#endif
+#ifdef __LP64__
+EXPORT_SYMBOL(__xchg64);
+EXPORT_SYMBOL(__cmpxchg_u64);
 #endif
 
 #include <asm/uaccess.h>
 EXPORT_SYMBOL(lcopy_to_user);
 EXPORT_SYMBOL(lcopy_from_user);
+EXPORT_SYMBOL(lstrnlen_user);
+EXPORT_SYMBOL(lclear_user);
 
+#ifndef __LP64__
 /* Needed so insmod can set dp value */
-
-extern int data_start;
-
-EXPORT_SYMBOL_NOVERS(data_start);
+extern int $global$;
+EXPORT_SYMBOL_NOVERS($global$);
+#endif
 
 #include <asm/gsc.h>
-EXPORT_SYMBOL(_gsc_writeb);
-EXPORT_SYMBOL(_gsc_writew);
-EXPORT_SYMBOL(_gsc_writel);
-EXPORT_SYMBOL(_gsc_readb);
-EXPORT_SYMBOL(_gsc_readw);
-EXPORT_SYMBOL(_gsc_readl);
-EXPORT_SYMBOL(busdevice_alloc_irq);
-EXPORT_SYMBOL(register_driver);
-EXPORT_SYMBOL(gsc_alloc_irq);
+EXPORT_SYMBOL(register_parisc_driver);
+EXPORT_SYMBOL(unregister_parisc_driver);
 EXPORT_SYMBOL(pdc_iodc_read);
+#ifdef CONFIG_GSC
+EXPORT_SYMBOL(gsc_alloc_irq);
+#endif
+
+#include <asm/io.h>
+EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(iounmap);
+EXPORT_SYMBOL(memcpy_toio);
+EXPORT_SYMBOL(memcpy_fromio);
+EXPORT_SYMBOL(memset_io);
+
+#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
+EXPORT_SYMBOL(inb);
+EXPORT_SYMBOL(inw);
+EXPORT_SYMBOL(inl);
+EXPORT_SYMBOL(outb);
+EXPORT_SYMBOL(outw);
+EXPORT_SYMBOL(outl);
+
+EXPORT_SYMBOL(insb);
+EXPORT_SYMBOL(insw);
+EXPORT_SYMBOL(insl);
+EXPORT_SYMBOL(outsb);
+EXPORT_SYMBOL(outsw);
+EXPORT_SYMBOL(outsl);
+#endif
+
+#include <asm/cache.h>
+EXPORT_SYMBOL(flush_kernel_dcache_range_asm);
+EXPORT_SYMBOL(flush_kernel_dcache_page);
+EXPORT_SYMBOL(flush_all_caches);
+
+#include <asm/unistd.h>
+extern long sys_open(const char *, int, int);
+extern off_t sys_lseek(int, off_t, int);
+extern int sys_read(int, char *, int);
+extern int sys_write(int, const char *, int);
+EXPORT_SYMBOL(sys_open);
+EXPORT_SYMBOL(sys_lseek);
+EXPORT_SYMBOL(sys_read);
+EXPORT_SYMBOL(sys_write);
+
+#include <asm/semaphore.h>
+EXPORT_SYMBOL(__up);
+EXPORT_SYMBOL(__down_interruptible);
+EXPORT_SYMBOL(__down);
+
+#include <linux/in6.h>
+#include <asm/checksum.h>
+EXPORT_SYMBOL(csum_partial_copy_nocheck);
+EXPORT_SYMBOL(csum_partial_copy_from_user);
+
+#include <asm/pdc.h>
+EXPORT_SYMBOL(pdc_add_valid);
+EXPORT_SYMBOL(pdc_lan_station_id);
+EXPORT_SYMBOL(pdc_get_initiator);
 
 extern void $$divI(void);
 extern void $$divU(void);
@@ -95,7 +170,9 @@
 EXPORT_SYMBOL_NOVERS($$remI);
 EXPORT_SYMBOL_NOVERS($$remU);
 EXPORT_SYMBOL_NOVERS($$mulI);
+#ifndef __LP64__
 EXPORT_SYMBOL_NOVERS($$mulU);
+#endif
 EXPORT_SYMBOL_NOVERS($$divU_3);
 EXPORT_SYMBOL_NOVERS($$divU_5);
 EXPORT_SYMBOL_NOVERS($$divU_6);
@@ -116,15 +193,25 @@
 EXPORT_SYMBOL_NOVERS($$divI_15);
 
 extern void __ashrdi3(void);
+extern void __ashldi3(void);
+extern void __lshrdi3(void);
+extern void __muldi3(void);
 
 EXPORT_SYMBOL_NOVERS(__ashrdi3);
+EXPORT_SYMBOL_NOVERS(__ashldi3);
+EXPORT_SYMBOL_NOVERS(__lshrdi3);
+EXPORT_SYMBOL_NOVERS(__muldi3);
 
 #ifdef __LP64__
 extern void __divdi3(void);
 extern void __udivdi3(void);
+extern void __umoddi3(void);
+extern void __moddi3(void);
 
 EXPORT_SYMBOL_NOVERS(__divdi3);
 EXPORT_SYMBOL_NOVERS(__udivdi3);
+EXPORT_SYMBOL_NOVERS(__umoddi3);
+EXPORT_SYMBOL_NOVERS(__moddi3);
 #endif
 
 #ifndef __LP64__
diff -Nru a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
--- a/arch/parisc/kernel/pci-dma.c	Wed Oct 30 16:44:33 2002
+++ b/arch/parisc/kernel/pci-dma.c	Wed Oct 30 16:44:33 2002
@@ -1,5 +1,7 @@
 /*
-** Dynamic DMA mapping support.
+** PARISC 1.1 Dynamic DMA mapping support.
+** This implementation is for PA-RISC platforms that do not support
+** I/O TLBs (aka DMA address translation hardware).
 ** See Documentation/DMA-mapping.txt for interface definitions.
 **
 **      (c) Copyright 1999,2000 Hewlett-Packard Company
@@ -7,36 +9,28 @@
 **	(c) Copyright 2000 Philipp Rumpf <prumpf@tux.org>
 **      (c) Copyright 2000 John Marvin
 **
-** This implementation is for PA-RISC platforms that do not support
-** I/O TLBs (aka DMA address translation hardware).
-**
 ** "leveraged" from 2.3.47: arch/ia64/kernel/pci-dma.c.
 ** (I assume it's from David Mosberger-Tang but there was no Copyright)
 **
 ** AFAIK, all PA7100LC and PA7300LC platforms can use this code.
-** All PA2.0 machines but V-class can alias xxx_alloc_consistent()
-** to use regular cacheable memory.
 **
 ** - ggg
 */
 
-#include <linux/types.h>
+#include <linux/init.h>
 #include <linux/mm.h>
-#include <linux/string.h>
 #include <linux/pci.h>
-#include <linux/init.h>
-
+#include <linux/proc_fs.h>
 #include <linux/slab.h>
-#include <linux/vmalloc.h>
-
-#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
+#include <linux/string.h>
+#include <linux/types.h>
 
+#include <asm/cacheflush.h>
+#include <asm/dma.h>    /* for DMA_CHUNK_SIZE */
 #include <asm/io.h>
 #include <asm/page.h>	/* get_order */
-#include <asm/dma.h>    /* for DMA_CHUNK_SIZE */
-
-#include <linux/proc_fs.h>
+#include <asm/pgalloc.h>
+#include <asm/uaccess.h>
 
 static struct proc_dir_entry * proc_gsc_root = NULL;
 static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length);
@@ -117,7 +111,7 @@
 	if (end > PGDIR_SIZE)
 		end = PGDIR_SIZE;
 	do {
-		pte_t * pte = pte_alloc_kernel(pmd, vaddr);
+		pte_t * pte = pte_alloc_kernel(&init_mm, pmd, vaddr);
 		if (!pte)
 			return -ENOMEM;
 		if (map_pte_uncached(pte, orig_vaddr, end - vaddr, paddr_ptr))
@@ -139,7 +133,7 @@
 	do {
 		pmd_t *pmd;
 		
-		pmd = pmd_alloc_kernel(dir, vaddr);
+		pmd = pmd_alloc(NULL, dir, vaddr);
 		if (!pmd)
 			return -ENOMEM;
 		if (map_pmd_uncached(pmd, vaddr, end - vaddr, &paddr))
@@ -164,7 +158,7 @@
 		pmd_clear(pmd);
 		return;
 	}
-	pte = pte_offset(pmd, vaddr);
+	pte = pte_offset_map(pmd, vaddr);
 	vaddr &= ~PMD_MASK;
 	end = vaddr + size;
 	if (end > PMD_SIZE)
@@ -347,7 +341,7 @@
     pcxl_res_hint = 0;
     pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
 					    get_order(pcxl_res_size));
-
+    memset(pcxl_res_map, 0, pcxl_res_size);
     proc_gsc_root = proc_mkdir("gsc", 0);
     create_proc_info_entry("dino", 0, proc_gsc_root, pcxl_proc_info);
     return 0;
@@ -431,10 +425,10 @@
 	    BUG();
 
 	for (i = 0; i < nents; i++, sglist++ ) {
-		sg_dma_address(sglist) = (dma_addr_t) virt_to_phys(sglist->address);
+		unsigned long vaddr = sg_virt_addr(sglist);
+		sg_dma_address(sglist) = (dma_addr_t) virt_to_phys(vaddr);
 		sg_dma_len(sglist) = sglist->length;
-		flush_kernel_dcache_range((unsigned long)sglist->address,
-				sglist->length);
+		flush_kernel_dcache_range(vaddr, sglist->length);
 	}
 	return nents;
 }
@@ -452,7 +446,7 @@
 	/* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */
 
 	for (i = 0; i < nents; i++, sglist++ )
-		flush_kernel_dcache_range((unsigned long) sglist->address, sglist->length);
+		flush_kernel_dcache_range(sg_virt_addr(sglist), sglist->length);
 	return;
 }
 
@@ -471,7 +465,7 @@
 	/* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */
 
 	for (i = 0; i < nents; i++, sglist++ )
-		flush_kernel_dcache_range((unsigned long) sglist->address, sglist->length);
+		flush_kernel_dcache_range(sg_virt_addr(sglist), sglist->length);
 }
 
 struct pci_dma_ops pcxl_dma_ops = {
@@ -510,7 +504,6 @@
 	pa11_dma_sync_sg			/* dma_sync_sg */
 };
 
-struct pci_dma_ops *hppa_dma_ops;
 
 static int pcxl_proc_info(char *buf, char **start, off_t offset, int len)
 {
diff -Nru a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
--- a/arch/parisc/kernel/pci.c	Wed Oct 30 16:44:17 2002
+++ b/arch/parisc/kernel/pci.c	Wed Oct 30 16:44:17 2002
@@ -6,25 +6,32 @@
  *
  * Copyright (C) 1997, 1998 Ralf Baechle
  * Copyright (C) 1999 SuSE GmbH
- * Copyright (C) 1999 Hewlett-Packard Company
- * Copyright (C) 1999, 2000 Grant Grundler
+ * Copyright (C) 1999-2001 Hewlett-Packard Company
+ * Copyright (C) 1999-2001 Grant Grundler
  */
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/init.h>		/* for __init and __devinit */
 #include <linux/pci.h>
-#include <linux/spinlock.h>
-#include <linux/string.h>	/* for memcpy() */
+#include <linux/slab.h>
 
+#include <asm/io.h>
 #include <asm/system.h>
+#include <asm/cache.h>		/* for L1_CACHE_BYTES */
 
-#ifdef CONFIG_PCI
+#define DEBUG_RESOURCES 0
+#define DEBUG_CONFIG 0
+
+#if DEBUG_CONFIG
+# define DBGC(x...)     printk(KERN_DEBUG x)
+#else
+# define DBGC(x...)
+#endif
 
-#undef DEBUG_RESOURCES
 
-#ifdef DEBUG_RESOURCES
-#define DBG_RES(x...)	printk(x)
+#if DEBUG_RESOURCES
+#define DBG_RES(x...)	printk(KERN_DEBUG x)
 #else
 #define DBG_RES(x...)
 #endif
@@ -42,14 +49,13 @@
 struct pci_port_ops *pci_port;
 struct pci_bios_ops *pci_bios;
 
-struct pci_hba_data *hba_list = NULL;
-int hba_count = 0;
+int pci_hba_count = 0;
 
 /*
 ** parisc_pci_hba used by pci_port->in/out() ops to lookup bus data.
 */
 #define PCI_HBA_MAX 32
-static struct pci_hba_data *parisc_pci_hba[PCI_HBA_MAX];
+struct pci_hba_data *parisc_pci_hba[PCI_HBA_MAX];
 
 
 /********************************************************************
@@ -58,24 +64,31 @@
 **
 *********************************************************************/
 
-#define PCI_PORT_HBA(a) ((a)>>16)
-#define PCI_PORT_ADDR(a) ((a) & 0xffffUL)
+/* EISA port numbers and PCI port numbers share the same interface.  Some
+ * machines have both EISA and PCI adapters installed.  Rather than turn
+ * pci_port into an array, we reserve bus 0 for EISA and call the EISA
+ * routines if the access is to a port on bus 0.  We don't want to fix
+ * EISA and ISA drivers which assume port space is <= 0xffff.
+ */
 
-/* KLUGE : inb needs to be defined differently for PCI devices than
-** for other bus interfaces. Doing this at runtime sucks but is the
-** only way one driver binary can support devices on different bus types.
-**
-*/
+#ifdef CONFIG_EISA
+#define EISA_IN(size) if (EISA_bus && (b == 0)) return eisa_in##size(addr)
+#define EISA_OUT(size) if (EISA_bus && (b == 0)) return eisa_out##size(d, addr)
+#else
+#define EISA_IN(size)
+#define EISA_OUT(size)
+#endif
 
 #define PCI_PORT_IN(type, size) \
 u##size in##type (int addr) \
 { \
 	int b = PCI_PORT_HBA(addr); \
 	u##size d = (u##size) -1; \
+	EISA_IN(size); \
 	ASSERT(pci_port); /* make sure services are defined */ \
 	ASSERT(parisc_pci_hba[b]); /* make sure ioaddr are "fixed up" */ \
 	if (parisc_pci_hba[b] == NULL) { \
-		printk(KERN_WARNING "\nPCI Host Bus Adapter %d not registered. in" #size "(0x%x) returning -1\n", b, addr); \
+		printk(KERN_WARNING "\nPCI or EISA Host Bus Adapter %d not registered. in" #size "(0x%x) returning -1\n", b, addr); \
 	} else { \
 		d = pci_port->in##type(parisc_pci_hba[b], PCI_PORT_ADDR(addr)); \
 	} \
@@ -91,6 +104,7 @@
 void out##type (u##size d, int addr) \
 { \
 	int b = PCI_PORT_HBA(addr); \
+	EISA_OUT(size); \
 	ASSERT(pci_port); \
 	pci_port->out##type(parisc_pci_hba[b], PCI_PORT_ADDR(addr), d); \
 }
@@ -104,18 +118,17 @@
 /*
  * BIOS32 replacement.
  */
-void pcibios_init(void)
+static int __init pcibios_init(void)
 {
-	ASSERT(pci_bios != NULL);
+	if (!pci_bios)
+		return -1;
 
-	if (pci_bios)
-	{
-		if (pci_bios->init) {
-			(*pci_bios->init)();
-		} else {
-			printk(KERN_WARNING "pci_bios != NULL but init() is!\n");
-		}
+	if (pci_bios->init) {
+		pci_bios->init();
+	} else {
+		printk(KERN_WARNING "pci_bios != NULL but init() is!\n");
 	}
+	return 0;
 }
 
 
@@ -124,17 +137,10 @@
 {
 	ASSERT(pci_bios != NULL);
 
-        /* If this is a bridge, get the current bases */
-	if (bus->self) {
-		pci_read_bridge_bases(bus);
-	}
-
-	if (pci_bios) {
-		if (pci_bios->fixup_bus) {
-			(*pci_bios->fixup_bus)(bus);
-		} else {
-			printk(KERN_WARNING "pci_bios != NULL but fixup_bus() is!\n");
-		}
+	if (pci_bios->fixup_bus) {
+		pci_bios->fixup_bus(bus);
+	} else {
+		printk(KERN_WARNING "pci_bios != NULL but fixup_bus() is!\n");
 	}
 }
 
@@ -144,14 +150,6 @@
 	return str;
 }
 
-#endif /* defined(CONFIG_PCI) */
-
-
-
-/* -------------------------------------------------------------------
-** linux-2.4: NEW STUFF 
-** --------------------
-*/
 
 /*
 ** Used in drivers/pci/quirks.c
@@ -201,19 +199,11 @@
 ** ------------------------------------
 ** PAT PDC systems need this routine. PA legacy PDC does not.
 **
-** Used by alpha/arm: 
-** alpha/kernel/pci.c:common_init_pci()
-** (or arm/kernel/pci.c:pcibios_init())
-**    drivers/pci/setup.c:pci_assign_unassigned_resources()
-**        drivers/pci/setup.c:pdev_assign_unassigned_resources()
-**            arch/<foo>/kernel/pci.c:pcibios_update_resource()
-**
-** When BAR's are configured by linux, this routine
-** will update configuration space with the "normalized"
-** address. "root" indicates where the range starts and res
-** is some portion of that range.
+** When BAR's are configured by linux, this routine will update
+** configuration space with the "normalized" address. "root" indicates
+** where the range starts and res is some portion of that range.
 **
-** For all PA-RISC systems except V-class, root->start would be zero.
+** VCLASS: For all PA-RISC systems except V-class, root->start would be zero.
 **
 ** PAT PDC can tell us which MMIO ranges are available or already in use.
 ** I/O port space and such are not memory mapped anyway for PA-Risc.
@@ -234,7 +224,7 @@
 		barnum, res->start, res->end, (int) res->flags);
 
 	if (barnum >= PCI_BRIDGE_RESOURCES) {
-		/* handled in pbus_set_ranges_data() */
+		/* handled in PCI-PCI bridge specific support */
 		return;
 	}
 
@@ -248,8 +238,7 @@
 	if (res->flags & IORESOURCE_IO) {
 		barval = PCI_PORT_ADDR(res->start);
 	} else if (res->flags & IORESOURCE_MEM) {
-		/* This should work for VCLASS too */
-		barval = res->start & 0xffffffffUL;
+		barval = PCI_BUS_ADDR(HBA_DATA(dev->bus->sysdata), res->start);
 	} else {
 		panic("pcibios_update_resource() WTF? flags not IO or MEM");
 	}
@@ -267,7 +256,7 @@
 	    == (PCI_BASE_ADDRESS_SPACE_MEMORY
 		| PCI_BASE_ADDRESS_MEM_TYPE_64)) {
 		pci_write_config_dword(dev, where+4, 0);
-		printk(KERN_WARNING "PCI: dev %s type 64-bit\n", dev->name);
+		DBGC("PCIBIOS: dev %s type 64-bit\n", dev->name);
 	}
 }
 
@@ -290,25 +279,79 @@
 pcibios_set_master(struct pci_dev *dev)
 {
 	u8 lat;
+
+	/* If someone already mucked with this, don't touch it. */
 	pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
 	if (lat >= 16) return;
 
 	/*
 	** HP generally has fewer devices on the bus than other architectures.
+	** upper byte is PCI_LATENCY_TIMER.
 	*/
-	printk("PCIBIOS: Setting latency timer of %s to 128\n", dev->slot_name);
-	pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x80);
+        pci_write_config_word(dev, PCI_CACHE_LINE_SIZE,
+				(0x80 << 8) | (L1_CACHE_BYTES / sizeof(u32)));
 }
 
 
+void __init
+pcibios_init_bus(struct pci_bus *bus)
+{
+	struct pci_dev *dev = bus->self;
+
+	/* We deal only with pci controllers and pci-pci bridges. */
+	if (dev && (dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
+		return;
+	
+	if (dev) {
+		unsigned short bridge_ctl;
+
+		/* PCI-PCI bridge - set the cache line and default latency
+		   (32) for primary and secondary buses. */
+		pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, 32);
+
+		/* Read bridge control */
+		pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &bridge_ctl);
+		pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bridge_ctl
+				| PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR);
+
+	}
+}
+
+
+/*
+** KLUGE: Link the child and parent resources - generic PCI didn't
+*/
+static void
+pcibios_link_hba_resources( struct resource *hba_res, struct resource *r)
+{
+	if (!r->parent) {
+		r->parent = hba_res;
+
+		/* reverse link is harder *sigh*  */
+		if (r->parent->child) {
+			if (r->parent->sibling) {
+				struct resource *next = r->parent->sibling;
+				while (next->sibling)
+					 next = next->sibling;
+				next->sibling = r;
+			} else {
+				r->parent->sibling = r;
+			}
+		} else
+			r->parent->child = r;
+	}
+}
+
 /*
-** called by drivers/pci/setup-res.c:pbus_set_ranges().
+** called by drivers/pci/setup-res.c:pci_setup_bridge().
 */
 void pcibios_fixup_pbus_ranges(
 	struct pci_bus *bus,
 	struct pbus_set_ranges_data *ranges
 	)
 {
+	struct pci_hba_data *hba = HBA_DATA(bus->sysdata);
+
 	/*
 	** I/O space may see busnumbers here. Something
 	** in the form of 0xbbxxxx where bb is the bus num
@@ -319,9 +362,20 @@
 	ranges->io_start = PCI_PORT_ADDR(ranges->io_start);
 	ranges->io_end   = PCI_PORT_ADDR(ranges->io_end);
 
+	/* Convert MMIO addr to PCI addr (undo global virtualization) */
+	ranges->mem_start = PCI_BUS_ADDR(hba, ranges->mem_start);
+	ranges->mem_end   = PCI_BUS_ADDR(hba, ranges->mem_end);
+
 	DBG_RES("pcibios_fixup_pbus_ranges(%02x, [%lx,%lx %lx,%lx])\n", bus->number,
 		ranges->io_start, ranges->io_end,
 		ranges->mem_start, ranges->mem_end);
+
+	/* KLUGE ALERT
+	** if this resource isn't linked to a "parent", then it seems
+	** to be a child of the HBA - lets link it in.
+	*/
+	pcibios_link_hba_resources(&hba->io_space, bus->resource[0]);
+	pcibios_link_hba_resources(&hba->lmmio_space, bus->resource[1]);
 }
 
 #define MAX(val1, val2)   ((val1) > (val2) ? (val1) : (val2))
@@ -355,114 +409,22 @@
 	align = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
 
 	/* Align to largest of MIN or input size */
-	mask = MAX(size, align) - 1;
+	mask = MAX(alignment, align) - 1;
 	res->start += mask;
 	res->start &= ~mask;
 
 	/*
 	** WARNING : caller is expected to update "end" field.
 	** We can't since it might really represent the *size*.
-	** The difference is "end = start + size" vs "end += size".
+	** The difference is "end = start + size" vs "end += start".
 	*/
 }
 
 
-#define ROUND_UP(x, a)		(((x) + (a) - 1) & ~((a) - 1))
-
-void __devinit
-pcibios_size_bridge(struct pci_bus *bus, struct pbus_set_ranges_data *outer)
-{
-	struct pbus_set_ranges_data inner;
-	struct pci_dev *dev;
-	struct pci_dev *bridge = bus->self;
-	struct list_head *ln;
-
-	/* set reasonable default "window" for pcibios_align_resource */
-	inner.io_start  = inner.io_end  = 0;
-	inner.mem_start = inner.mem_end = 0;
-
-	/* 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 here - we'll catch them below */
-		if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)
-			continue;
-
-		for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-			struct resource res;
-			unsigned long size;
-
-			if (dev->resource[i].flags == 0)
-				continue;
-
-			memcpy(&res, &dev->resource[i], sizeof(res));
-			size = res.end - res.start + 1;
-
-			if (res.flags & IORESOURCE_IO) {
-				res.start = inner.io_end;
-				pcibios_align_resource(dev, &res, size, 0);
-				inner.io_end += res.start + size;
-			} else if (res.flags & IORESOURCE_MEM) {
-				res.start = inner.mem_end;
-				pcibios_align_resource(dev, &res, size, 0);
-				inner.mem_end = res.start + size;
-			}
-
-		DBG_RES("    %s  inner size %lx/%x IO %lx MEM %lx\n",
-			dev->slot_name,
-			size, res.flags, inner.io_end, inner.mem_end);
-		}
-	}
-
-	/* 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), &inner);
-
-	/* turn the ending locations into sizes (subtract start) */
-	inner.io_end -= inner.io_start - 1;
-	inner.mem_end -= inner.mem_start - 1;
-
-	/* Align the sizes up by bridge rules */
-	inner.io_end = ROUND_UP(inner.io_end, 4*1024) - 1;
-	inner.mem_end = ROUND_UP(inner.mem_end, 1*1024*1024) - 1;
-
-	/* PPB - PCI bridge Device will normaller also have "outer" != NULL. */
-	if (bridge) {
-		/* Adjust the bus' allocation requirements */
-		/* PPB's pci device Bridge resources */
-
-		bus->resource[0] = &bridge->resource[PCI_BRIDGE_RESOURCES];
-		bus->resource[1] = &bridge->resource[PCI_BRIDGE_RESOURCES + 1];
-		
-		bus->resource[0]->start = bus->resource[1]->start  = 0;
-		bus->resource[0]->parent= bus->resource[1]->parent = NULL;
-
-		bus->resource[0]->end    = inner.io_end;
-		bus->resource[0]->flags  = IORESOURCE_IO;
-
-		bus->resource[1]->end    = inner.mem_end;
-		bus->resource[1]->flags  = IORESOURCE_MEM;
-	}
-
-	/* adjust parent's resource requirements */
-	if (outer) {
-		outer->io_end = ROUND_UP(outer->io_end, 4*1024);
-		outer->io_end += inner.io_end;
-
-		outer->mem_end = ROUND_UP(outer->mem_end, 1*1024*1024);
-		outer->mem_end += inner.mem_end;
-	}
-}
-
-#undef ROUND_UP
-
-
 int __devinit
-pcibios_enable_device(struct pci_dev *dev)
+pcibios_enable_device(struct pci_dev *dev, int mask)
 {
-	u16 cmd, old_cmd;
+	u16 cmd;
 	int idx;
 
 	/*
@@ -470,13 +432,19 @@
 	** enable all the same bits. We just make sure they are here.
 	*/
 	pci_read_config_word(dev, PCI_COMMAND, &cmd);
-	old_cmd = cmd;
 
 	/*
 	** See if any resources have been allocated
+	** While "regular" PCI devices only use 0-5, Bridges use a few
+	** beyond that for window registers.
 	*/
-        for (idx=0; idx<6; idx++) {
+        for (idx=0; idx<DEVICE_COUNT_RESOURCE; idx++) {
 		struct resource *r = &dev->resource[idx];
+
+		/* only setup requested resources */
+		if (!(mask & (1<<idx)))
+			continue;
+
 		if (r->flags & IORESOURCE_IO)
 			cmd |= PCI_COMMAND_IO;
 		if (r->flags & IORESOURCE_MEM)
@@ -484,7 +452,7 @@
 	}
 
 	/*
-	** System error and Parity Error reporting are enabled by default.
+	** Enable System error and Parity Error reporting by default.
 	** Devices that do NOT want those behaviors should clear them
 	** (eg PCI graphics, possibly networking).
 	** Interfaces like SCSI certainly should not. We want the
@@ -493,30 +461,48 @@
 	*/
 	cmd |= (PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
 
-	if (cmd != old_cmd) {
-		printk("PCIBIOS: Enabling device %s (%04x -> %04x)\n",
-			dev->slot_name, old_cmd, cmd);
-		pci_write_config_word(dev, PCI_COMMAND, cmd);
-	}
-
+#if 0
+	/* If bridge/bus controller has FBB enabled, child must too. */
+	if (dev->bus->bridge_ctl & PCI_BRIDGE_CTL_FAST_BACK)
+		cmd |= PCI_COMMAND_FAST_BACK;
+#endif
+	DBGC("PCIBIOS: Enabling device %s cmd 0x%04x\n", dev->slot_name, cmd);
+	pci_write_config_word(dev, PCI_COMMAND, cmd);
 	return 0;
 }
 
-
-void __devinit
-pcibios_assign_unassigned_resources(struct pci_bus *bus)
+void __init
+pcibios_setup_host_bridge(struct pci_bus *bus)
 {
-	struct list_head *ln;
+	ASSERT(pci_bios != NULL);
 
-        for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next)
+#if 0
+	if (pci_bios)
 	{
-		pdev_assign_unassigned_resources(pci_dev_b(ln));
+		if (pci_bios->setup_host_bridge) {
+			(*pci_bios->setup_host_bridge)(bus);
+		}
 	}
+#endif
+}
 
-        /* And for all of the sub-busses.  */
-	for (ln=bus->children.next; ln != &bus->children; ln=ln->next)
-		pcibios_assign_unassigned_resources(pci_bus_b(ln));
 
+/*
+** Mostly copied from drivers/pci/setup-bus.c:pci_assign_unassigned_resources()
+*/
+void __devinit
+pcibios_assign_unassigned_resources(struct pci_bus *bus)
+{
+	/* from drivers/pci/setup-bus.c */
+	extern void pbus_assign_resources(struct pci_bus *bus, struct pbus_set_ranges_data *ranges);
+
+	struct pbus_set_ranges_data ranges;
+
+	ranges.io_end = ranges.io_start
+				= bus->resource[0]->start + PCIBIOS_MIN_IO;
+	ranges.mem_end = ranges.mem_start
+				= bus->resource[1]->start + PCIBIOS_MIN_MEM;
+	pbus_assign_resources(bus, &ranges);
 }
 
 /*
@@ -524,14 +510,11 @@
 */
 void pcibios_register_hba(struct pci_hba_data *hba)
 {
-	hba->next = hba_list;
-	hba_list = hba;
-
-	ASSERT(hba_count < PCI_HBA_MAX);
+	ASSERT(pci_hba_count < PCI_HBA_MAX);
 
-	/*
-	** pci_port->in/out() uses parisc_pci_hba to lookup parameter.
-	*/
-	parisc_pci_hba[hba_count] = hba;
-	hba->hba_num = hba_count++;
+	/* pci_port->in/out() uses parisc_pci_hba to lookup parameter. */
+	parisc_pci_hba[pci_hba_count] = hba;
+	hba->hba_num = pci_hba_count++;
 }
+
+subsys_initcall(pcibios_init);
diff -Nru a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/pdc_chassis.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,205 @@
+/*
+ *		arch/parisc/kernel/pdc_chassis.c
+ *
+ * 		Copyright (C) 2002 Laurent Canet <canetl@esiee.fr>
+ *		Copyright (C) 2002 Thibaut Varene <varenet@esiee.fr>
+ *
+ *
+ *		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.
+ */
+
+#undef PDC_CHASSIS_DEBUG
+#ifdef PDC_CHASSIS_DEBUG
+#define DPRINTK(fmt, args...)	printk(fmt, ## args)
+#else
+#define DPRINTK(fmt, args...)
+#endif
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/reboot.h>
+#include <linux/notifier.h>
+
+#include <asm/pdc_chassis.h>
+#include <asm/processor.h>
+
+static int pdc_chassis_old = 0;	
+
+
+/** 
+ * pdc_chassis_checkold() - Checks for old PDC_CHASSIS compatibility
+ * @pdc_chassis_old: 1 if old pdc chassis style
+ * 
+ * Currently, only E class and A180 are known to work with this.
+ * Inspired by Christoph Plattner
+ */
+
+static void __init pdc_chassis_checkold(void)
+{
+	switch(CPU_HVERSION) {
+		case 0x480:		/* E25 */
+		case 0x481:		/* E35 */
+		case 0x482:		/* E45 */
+		case 0x483:		/* E55 */
+		case 0x516:		/* A180 */
+			pdc_chassis_old = 1;
+			break;
+
+		default:
+			break;
+	}
+	DPRINTK(KERN_DEBUG "%s: pdc_chassis_checkold(); pdc_chassis_old = %d\n", __FILE__, pdc_chassis_old);
+}
+
+
+/**
+ * pdc_chassis_panic_event() - Called by the panic handler.
+ *
+ * As soon as a panic occurs, we should inform the PDC.
+ */
+
+static int pdc_chassis_panic_event(struct notifier_block *this,
+		        unsigned long event, void *ptr)
+{
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+		return NOTIFY_DONE;
+}   
+
+
+static struct notifier_block pdc_chassis_panic_block = {
+	notifier_call: pdc_chassis_panic_event,
+	priority: INT_MAX,
+};
+
+
+/**
+ * parisc_reboot_event() - Called by the reboot handler.
+ *
+ * As soon as a reboot occurs, we should inform the PDC.
+ */
+
+static int pdc_chassis_reboot_event(struct notifier_block *this,
+		        unsigned long event, void *ptr)
+{
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
+		return NOTIFY_DONE;
+}   
+
+
+static struct notifier_block pdc_chassis_reboot_block = {
+	notifier_call: pdc_chassis_reboot_event,
+	priority: INT_MAX,
+};
+
+
+/**
+ * parisc_pdc_chassis_init() - Called at boot time.
+ */
+
+void __init parisc_pdc_chassis_init(void)
+{
+	DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__);
+
+	/* initialize panic notifier chain */
+	notifier_chain_register(&panic_notifier_list, &pdc_chassis_panic_block);
+
+	/* initialize reboot notifier chain */
+	register_reboot_notifier(&pdc_chassis_reboot_block);
+
+	/* Check for old LED Panel */
+	pdc_chassis_checkold();
+}
+
+
+/** 
+ * pdc_chassis_send_status() - Sends a predefined message to the chassis,
+ * and changes the front panel LEDs according to the new system state
+ * @retval: PDC call return value.
+ *
+ * Only machines with 64 bits PDC PAT and E-class are supported atm.
+ * 
+ * returns 0 if no error, -1 if no supported PDC is present or invalid message,
+ * else returns the appropriate PDC error code.
+ * 
+ * For a list of predefined messages, see asm-parisc/pdc_chassis.h
+ */
+
+int pdc_chassis_send_status(int message)
+{
+	/* Maybe we should do that in an other way ? */
+	int retval = 0;
+
+	DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message);
+
+#ifdef __LP64__	/* pdc_pat_chassis_send_log is defined only when #ifdef __LP64__ */
+	if (is_pdc_pat()) {
+		switch(message) {
+			case PDC_CHASSIS_DIRECT_BSTART:
+				retval = pdc_pat_chassis_send_log(PDC_CHASSIS_PMSG_BSTART, PDC_CHASSIS_LSTATE_RUN_NORMAL);
+				break;
+			
+			case PDC_CHASSIS_DIRECT_BCOMPLETE:
+				retval = pdc_pat_chassis_send_log(PDC_CHASSIS_PMSG_BCOMPLETE, PDC_CHASSIS_LSTATE_RUN_NORMAL);
+				break;
+			
+			case PDC_CHASSIS_DIRECT_SHUTDOWN:
+				retval = pdc_pat_chassis_send_log(PDC_CHASSIS_PMSG_SHUTDOWN, PDC_CHASSIS_LSTATE_NONOS);
+				break;
+			
+			case PDC_CHASSIS_DIRECT_PANIC:
+				retval = pdc_pat_chassis_send_log(PDC_CHASSIS_PMSG_PANIC, PDC_CHASSIS_LSTATE_RUN_CRASHREC);
+				break;
+		
+			case PDC_CHASSIS_DIRECT_LPMC:
+				retval = pdc_pat_chassis_send_log(PDC_CHASSIS_PMSG_LPMC, PDC_CHASSIS_LSTATE_RUN_SYSINT);
+				break;
+
+			case PDC_CHASSIS_DIRECT_HPMC:
+				retval = pdc_pat_chassis_send_log(PDC_CHASSIS_PMSG_HPMC, PDC_CHASSIS_LSTATE_RUN_NCRIT);
+				break;
+
+			default:
+				retval = -1;
+		}
+	} else retval = -1;
+#else
+	if (pdc_chassis_old) {
+		switch (message) {
+			case PDC_CHASSIS_DIRECT_BSTART:
+			case PDC_CHASSIS_DIRECT_BCOMPLETE:
+				retval = pdc_chassis_disp(PDC_CHASSIS_DISP_DATA(OSTAT_RUN));
+				break;
+							
+			case PDC_CHASSIS_DIRECT_SHUTDOWN:
+				retval = pdc_chassis_disp(PDC_CHASSIS_DISP_DATA(OSTAT_SHUT));
+				break;
+			
+			case PDC_CHASSIS_DIRECT_HPMC:
+			case PDC_CHASSIS_DIRECT_PANIC:
+				retval = pdc_chassis_disp(PDC_CHASSIS_DISP_DATA(OSTAT_FLT));
+				break;
+		
+			case PDC_CHASSIS_DIRECT_LPMC:
+				retval = pdc_chassis_disp(PDC_CHASSIS_DISP_DATA(OSTAT_WARN));
+				break;
+
+			default:
+				retval = -1;
+		}
+	} else retval = -1;
+#endif
+		
+	return retval;
+}
diff -Nru a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
--- a/arch/parisc/kernel/pdc_cons.c	Wed Oct 30 16:44:26 2002
+++ b/arch/parisc/kernel/pdc_cons.c	Wed Oct 30 16:44:26 2002
@@ -1,100 +1,50 @@
+/*
+ *  linux/arch/parisc/kernel/pdc_console.c
+ *
+ *  The PDC console is a simple console, which can be used for debugging 
+ *  boot related problems on HP PA-RISC machines.
+ *
+ *  This code uses the ROM (=PDC) based functions to read and write characters
+ *  from and to PDC's boot path.
+ *  Since all character read from that path must be polled, this code never
+ *  can or will be a fully functional linux console.
+ */
+
+/* Define EARLY_BOOTUP_DEBUG to debug kernel related boot problems. 
+ * On production kernels EARLY_BOOTUP_DEBUG should be undefined. */
+#undef EARLY_BOOTUP_DEBUG
+
+
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/console.h>
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/major.h>
 #include <asm/page.h>
 #include <asm/types.h>
 #include <asm/system.h>
-#include <asm/pdc.h>	/* for iodc_call() proto and friends */
-#include <asm/real.h>
-
-static int __attribute__((aligned(8)))   iodc_retbuf[32];
-static char __attribute__((aligned(64))) iodc_dbuf[4096];
-
-/*
- * pdc_putc:
- * Console character print using IODC.
- *
- * Note that only these special chars are architected for console IODC io:
- * BEL, BS, CR, and LF. Others are passed through.
- * Since the HP console requires CR+LF to perform a 'newline', we translate
- * "\n" to "\r\n".
- */
-
-static int posx;	/* for simple TAB-Simulation... */
-
-/* XXX Should we spinlock posx usage */
-
-void pdc_putc(unsigned char c)
-{
-	unsigned int n;
-	unsigned long flags;
+#include <asm/pdc.h>		/* for iodc_call() proto and friends */
 
-	switch (c) {
-	case '\n':
-		iodc_dbuf[0] = '\r'; 
-		iodc_dbuf[1] = '\n';
-               	n = 2;
-               	posx = 0;
-		break;
-	case '\t':
-		pdc_putc(' ');
-		while (posx & 7) 	/* expand TAB */
-			pdc_putc(' ');
-		return;		/* return since IODC can't handle this */
-	case '\b':
-		posx-=2;		/* BS */
-	default:
-		iodc_dbuf[0] = c;
-		n = 1;
-		posx++;
-		break;
-	}
-	{
-		real32_call(PAGE0->mem_cons.iodc_io,
-			(unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
-			PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers),
-			__pa(iodc_retbuf), 0, __pa(iodc_dbuf), n, 0);
-	}
-}
 
 static void pdc_console_write(struct console *co, const char *s, unsigned count)
 {
 	while(count--)
-		pdc_putc(*s++);
+		pdc_iodc_putc(*s++);
 }
 
-int pdc_console_wait_key(struct console *co)
+void pdc_outc(unsigned char c)
 {
-	int ch = 'X';
-	int status;
-
-	/* Bail if no console input device. */
-	if (!PAGE0->mem_kbd.iodc_io)
-		return 0;
-	
-	/* wait for a keyboard (rs232)-input */
-	do {
-		unsigned long flags;
-
-		save_flags(flags);
-		cli();
-		status = real32_call(PAGE0->mem_kbd.iodc_io,
-			(unsigned long)PAGE0->mem_kbd.hpa, ENTRY_IO_CIN,
-			PAGE0->mem_kbd.spa, __pa(PAGE0->mem_kbd.dp.layers),
-			__pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0);
-		restore_flags(flags);
-		ch = *iodc_dbuf;	/* save the character directly to ch */
-	} while (*iodc_retbuf == 0);	/* wait for a key */
-	return ch;
+	pdc_iodc_outc(c);
 }
 
-int pdc_getc(void)
+
+int pdc_console_poll_key(struct console *co)
 {
-	return pdc_console_wait_key(NULL);
+	return pdc_iodc_getc();
 }
 
 static int pdc_console_setup(struct console *co, char *options)
@@ -102,17 +52,34 @@
 	return 0;
 }
 
+#ifdef CONFIG_PDC_CONSOLE
+static kdev_t pdc_console_device (struct console *c)
+{
+        return mk_kdev(PDCCONS_MAJOR, 0);
+}
+#endif
+
+#ifdef CONFIG_PDC_CONSOLE
+#define PDC_CONSOLE_DEVICE pdc_console_device
+#else
+#define PDC_CONSOLE_DEVICE NULL
+#endif
+
 static struct console pdc_cons = {
 	name:		"ttyB",
 	write:		pdc_console_write,
+	device:		PDC_CONSOLE_DEVICE,
 	setup:		pdc_console_setup,
-	flags:		CON_PRINTBUFFER|CON_ENABLED,  // |CON_CONSDEV,
+	flags:		CON_PRINTBUFFER|CON_ENABLED,
 	index:		-1,
 };
 
 static int pdc_console_initialized;
+extern unsigned long con_start;	/* kernel/printk.c */
+extern unsigned long log_end;	/* kernel/printk.c */
 
-void pdc_console_init(void)
+
+static void pdc_console_init_force(void)
 {
 	if (pdc_console_initialized)
 		return;
@@ -122,23 +89,32 @@
 	if (PAGE0->mem_cons.cl_class == CL_DUPLEX)
 		memcpy(&PAGE0->mem_kbd, &PAGE0->mem_cons, sizeof(PAGE0->mem_cons));
 
-	pdc_console_write(0, "PDC Console Initialized\n", 24);
 	/* register the pdc console */
 	register_console(&pdc_cons);
 }
 
+void pdc_console_init(void)
+{
+#if defined(EARLY_BOOTUP_DEBUG) || defined(CONFIG_PDC_CONSOLE)
+	pdc_console_init_force();
+#endif
+#ifdef EARLY_BOOTUP_DEBUG
+	printk(KERN_INFO "Initialized PDC Console for debugging.\n");
+#endif
+}
+
 
 /* Unregister the pdc console with the printk console layer */
 void pdc_console_die(void)
 {
-	printk("Switching from PDC console\n");
 	if (!pdc_console_initialized)
 		return;
 	--pdc_console_initialized;
-	
-#ifdef CONFIG_VT_CONSOLE
-	schedule_console_callback();
-#endif
+
+	printk(KERN_INFO "Switching from PDC console\n");
+
+	/* Don't repeat what we've already printed */
+	con_start = log_end;
 
 	unregister_console(&pdc_cons);
 }
@@ -155,17 +131,17 @@
 void pdc_console_restart(void)
 {
 	struct console *console;
-	extern int log_size;
 
 	if (pdc_console_initialized)
 		return;
 
-	while ((console = console_drivers) != (struct console *)0)
+	while ((console = console_drivers) != NULL)
 		unregister_console(console_drivers);
 
-	log_size = 0;
-	pdc_console_init();
-	printk("Switched to PDC console\n");
-	return;
+	/* Don't repeat what we've already printed */
+	con_start = log_end;
+	
+	/* force registering the pdc console */
+	pdc_console_init_force();
 }
 
diff -Nru a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/perf.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,836 @@
+/*
+ *  Parisc performance counters
+ *  Copyright (C) 2001 Randolph Chung <tausq@debian.org>
+ *
+ *  This code is derived, with permission, from HP/UX sources.
+ *
+ *    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.
+ */
+
+/*
+ *  Edited comment from original sources:
+ *
+ *  This driver programs the PCX-U/PCX-W performance counters
+ *  on the PA-RISC 2.0 chips.  The driver keeps all images now
+ *  internally to the kernel to hopefully eliminate the possiblity
+ *  of a bad image halting the CPU.  Also, there are different
+ *  images for the PCX-W and later chips vs the PCX-U chips.
+ *
+ *  Only 1 process is allowed to access the driver at any time,
+ *  so the only protection that is needed is at open and close.
+ *  A variable "perf_enabled" is used to hold the state of the
+ *  driver.  The spinlock "perf_lock" is used to protect the
+ *  modification of the state during open/close operations so
+ *  multiple processes don't get into the driver simultaneously.
+ *
+ *  This driver accesses the processor directly vs going through
+ *  the PDC INTRIGUE calls.  This is done to eliminate bugs introduced
+ *  in various PDC revisions.  The code is much more maintainable
+ *  and reliable this way vs having to debug on every version of PDC
+ *  on every box. 
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/miscdevice.h>
+#include <linux/spinlock.h>
+
+#include <asm/gsc.h>
+#include <asm/uaccess.h>
+#include <asm/perf.h>
+#include <asm/processor.h>
+#include <asm/runway.h>
+
+#include "perf_images.h"
+
+#define MAX_RDR_WORDS	24
+#define PERF_VERSION	2	/* derived from hpux's PI v2 interface */
+
+/* definition of RDR regs */
+struct rdr_tbl_ent {
+	uint16_t	width;
+	uint8_t		num_words;
+	uint8_t		write_control;
+};
+
+static int perf_processor_interface = UNKNOWN_INTF;
+static int perf_enabled = 0;
+static spinlock_t perf_lock;
+struct parisc_device *cpu_device = NULL;
+
+/* RDRs to write for PCX-W */
+static int perf_rdrs_W[] = 
+	{ 0, 1, 4, 5, 6, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, -1 };
+
+/* RDRs to write for PCX-U */
+static int perf_rdrs_U[] =
+	{ 0, 1, 4, 5, 6, 7, 16, 17, 18, 20, 21, 22, 23, 24, 25, -1 };
+
+/* RDR register descriptions for PCX-W */
+static struct rdr_tbl_ent perf_rdr_tbl_W[] = {
+	{ 19,	1,	8 },   /* RDR 0 */
+	{ 16,	1,	16 },  /* RDR 1 */
+	{ 72,	2,	0 },   /* RDR 2 */
+	{ 81,	2,	0 },   /* RDR 3 */
+	{ 328,	6,	0 },   /* RDR 4 */
+	{ 160,	3,	0 },   /* RDR 5 */
+	{ 336,	6,	0 },   /* RDR 6 */
+	{ 164,	3,	0 },   /* RDR 7 */
+	{ 0,	0,	0 },   /* RDR 8 */
+	{ 35,	1,	0 },   /* RDR 9 */
+	{ 6,	1,	0 },   /* RDR 10 */
+	{ 18,	1,	0 },   /* RDR 11 */
+	{ 13,	1,	0 },   /* RDR 12 */
+	{ 8,	1,	0 },   /* RDR 13 */
+	{ 8,	1,	0 },   /* RDR 14 */
+	{ 8,	1,	0 },   /* RDR 15 */
+	{ 1530,	24,	0 },   /* RDR 16 */
+	{ 16,	1,	0 },   /* RDR 17 */
+	{ 4,	1,	0 },   /* RDR 18 */
+	{ 0,	0,	0 },   /* RDR 19 */
+	{ 152,	3,	24 },  /* RDR 20 */
+	{ 152,	3,	24 },  /* RDR 21 */
+	{ 233,	4,	48 },  /* RDR 22 */
+	{ 233,	4,	48 },  /* RDR 23 */
+	{ 71,	2,	0 },   /* RDR 24 */
+	{ 71,	2,	0 },   /* RDR 25 */
+	{ 11,	1,	0 },   /* RDR 26 */
+	{ 18,	1,	0 },   /* RDR 27 */
+	{ 128,	2,	0 },   /* RDR 28 */
+	{ 0,	0,	0 },   /* RDR 29 */
+	{ 16,	1,	0 },   /* RDR 30 */
+	{ 16,	1,	0 },   /* RDR 31 */
+};
+
+/* RDR register descriptions for PCX-U */
+static struct rdr_tbl_ent perf_rdr_tbl_U[] = {
+	{ 19,	1,	8 },              /* RDR 0 */
+	{ 32,	1,	16 },             /* RDR 1 */
+	{ 20,	1,	0 },              /* RDR 2 */
+	{ 0,	0,	0 },              /* RDR 3 */
+	{ 344,	6,	0 },              /* RDR 4 */
+	{ 176,	3,	0 },              /* RDR 5 */
+	{ 336,	6,	0 },              /* RDR 6 */
+	{ 0,	0,	0 },              /* RDR 7 */
+	{ 0,	0,	0 },              /* RDR 8 */
+	{ 0,	0,	0 },              /* RDR 9 */
+	{ 28,	1,	0 },              /* RDR 10 */
+	{ 33,	1,	0 },              /* RDR 11 */
+	{ 0,	0,	0 },              /* RDR 12 */
+	{ 230,	4,	0 },              /* RDR 13 */
+	{ 32,	1,	0 },              /* RDR 14 */
+	{ 128,	2,	0 },              /* RDR 15 */
+	{ 1494,	24,	0 },              /* RDR 16 */
+	{ 18,	1,	0 },              /* RDR 17 */
+	{ 4,	1,	0 },              /* RDR 18 */
+	{ 0,	0,	0 },              /* RDR 19 */
+	{ 158,	3,	24 },             /* RDR 20 */
+	{ 158,	3,	24 },             /* RDR 21 */
+	{ 194,	4,	48 },             /* RDR 22 */
+	{ 194,	4,	48 },             /* RDR 23 */
+	{ 71,	2,	0 },              /* RDR 24 */
+	{ 71,	2,	0 },              /* RDR 25 */
+	{ 28,	1,	0 },              /* RDR 26 */
+	{ 33,	1,	0 },              /* RDR 27 */
+	{ 88,	2,	0 },              /* RDR 28 */
+	{ 32,	1,	0 },              /* RDR 29 */
+	{ 24,	1,	0 },              /* RDR 30 */
+	{ 16,	1,	0 },              /* RDR 31 */
+};
+
+/*
+ * A non-zero write_control in the above tables is a byte offset into
+ * this array.
+ */
+static uint64_t perf_bitmasks[] = {
+	0x0000000000000000,     /* first dbl word must be zero */
+	0xfdffe00000000000,     /* RDR0 bitmask */
+	0x003f000000000000,     /* RDR1 bitmask */
+	0x00ffffffffffffff,     /* RDR20-RDR21 bitmask (152 bits) */
+	0xffffffffffffffff,
+	0xfffffffc00000000,
+	0xffffffffffffffff,     /* RDR22-RDR23 bitmask (233 bits) */
+	0xffffffffffffffff,
+	0xfffffffffffffffc,
+	0xff00000000000000
+};
+
+/*
+ * Write control bitmasks for Pa-8700 processor given
+ * somethings have changed slightly.
+ */
+static uint64_t perf_bitmasks_piranha[] = {
+	0x0000000000000000,     /* first dbl word must be zero */
+	0xfdffe00000000000,     /* RDR0 bitmask */
+	0x003f000000000000,     /* RDR1 bitmask */
+	0x00ffffffffffffff,     /* RDR20-RDR21 bitmask (158 bits) */
+	0xffffffffffffffff,
+	0xfffffffc00000000,
+	0xffffffffffffffff,     /* RDR22-RDR23 bitmask (210 bits) */
+	0xffffffffffffffff,
+	0xffffffffffffffff,
+	0xfffc000000000000
+};
+
+static uint64_t *bitmask_array;   /* array of bitmasks to use */
+
+/******************************************************************************
+ * Function Prototypes
+ *****************************************************************************/
+static int perf_config(uint32_t *image_ptr);
+static int perf_release(struct inode *inode, struct file *file);
+static int perf_open(struct inode *inode, struct file *file);
+static ssize_t perf_read(struct file *file, char *buf, size_t cnt, loff_t *ppos);
+static ssize_t perf_write(struct file *file, const char *buf, size_t count, 
+	loff_t *ppos);
+static int perf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+	unsigned long arg);
+static void perf_start_counters(void);
+static int perf_stop_counters(uint32_t *raddr);
+static struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num);
+static int perf_rdr_read_ubuf(uint32_t	rdr_num, uint64_t *buffer);
+static int perf_rdr_clear(uint32_t rdr_num);
+static int perf_write_image(uint64_t *memaddr);
+static void perf_rdr_write(uint32_t rdr_num, uint64_t *buffer);
+
+/* External Assembly Routines */
+extern uint64_t perf_rdr_shift_in_W (uint32_t rdr_num, uint16_t width);
+extern uint64_t perf_rdr_shift_in_U (uint32_t rdr_num, uint16_t width);
+extern void perf_rdr_shift_out_W (uint32_t rdr_num, uint64_t buffer);
+extern void perf_rdr_shift_out_U (uint32_t rdr_num, uint64_t buffer);
+extern void perf_intrigue_enable_perf_counters (void);
+extern void perf_intrigue_disable_perf_counters (void);
+
+/******************************************************************************
+ * Function Definitions
+ *****************************************************************************/
+
+
+/*
+ * configure:
+ *
+ * Configure the cpu with a given data image.  First turn off the counters, 
+ * then download the image, then turn the counters back on.
+ */
+static int perf_config(uint32_t *image_ptr)
+{
+	long error;
+	uint32_t raddr[4];
+
+	/* Stop the counters*/
+	error = perf_stop_counters(raddr);
+	if (error != 0) {
+		printk("perf_config: perf_stop_counters = %ld\n", error);
+		return -EINVAL; 
+	}
+
+printk("Preparing to write image\n");
+	/* Write the image to the chip */
+	error = perf_write_image((uint64_t *)image_ptr);
+	if (error != 0) {
+		printk("perf_config: DOWNLOAD = %ld\n", error);
+		return -EINVAL; 
+	}
+
+printk("Preparing to start counters\n");
+
+	/* Start the counters */
+	perf_start_counters();
+
+	return sizeof(uint32_t);
+}
+
+/*
+ * Open the device and initialize all of it's memory.  The device is only 
+ * opened once, but can be "queried" by multiple processes that know its
+ * file descriptor.
+ */
+static int perf_open(struct inode *inode, struct file *file)
+{
+	spin_lock(&perf_lock);
+	if (perf_enabled) {
+		spin_unlock(&perf_lock);
+		return -EBUSY;
+	}
+	perf_enabled = 1;
+ 	spin_unlock(&perf_lock);
+
+	MOD_INC_USE_COUNT;
+
+	return 0;
+}
+
+/*
+ * Close the device.
+ */
+static int perf_release(struct inode *inode, struct file *file)
+{
+	spin_lock(&perf_lock);
+	perf_enabled = 0;
+	spin_unlock(&perf_lock);
+
+	MOD_DEC_USE_COUNT;
+
+	return 0;
+}
+
+/*
+ * Read does nothing for this driver
+ */
+static ssize_t perf_read(struct file *file, char *buf, size_t cnt, loff_t *ppos)
+{
+	return 0;
+}
+
+/*
+ * write:
+ *
+ * This routine downloads the image to the chip.  It must be
+ * called on the processor that the download should happen
+ * on.
+ */
+static ssize_t perf_write(struct file *file, const char *buf, size_t count, 
+	loff_t *ppos)
+{
+	int err;
+	size_t image_size;
+	uint32_t image_type;
+	uint32_t interface_type;
+	uint32_t test;
+
+	if (perf_processor_interface == ONYX_INTF) 
+		image_size = PCXU_IMAGE_SIZE;
+	else if (perf_processor_interface == CUDA_INTF) 
+		image_size = PCXW_IMAGE_SIZE;
+	else 
+		return -EFAULT;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EACCES;
+
+	if (count != sizeof(uint32_t))
+		return -EIO;
+
+	if ((err = copy_from_user(&image_type, buf, sizeof(uint32_t))) != 0) 
+		return err;
+
+	/* Get the interface type and test type */
+   	interface_type = (image_type >> 16) & 0xffff;
+	test           = (image_type & 0xffff);
+
+	/* Make sure everything makes sense */
+
+	/* First check the machine type is correct for
+	   the requested image */
+        if (((perf_processor_interface == CUDA_INTF) &&
+		       (interface_type != CUDA_INTF)) ||
+	    ((perf_processor_interface == ONYX_INTF) &&
+	               (interface_type != ONYX_INTF))) 
+		return -EINVAL;
+
+	/* Next check to make sure the requested image
+	   is valid */
+	if (((interface_type == CUDA_INTF) && 
+		       (test >= MAX_CUDA_IMAGES)) ||
+	    ((interface_type == ONYX_INTF) && 
+		       (test >= MAX_ONYX_IMAGES))) 
+		return -EINVAL;
+
+	/* Copy the image into the processor */
+	if (interface_type == CUDA_INTF) 
+		return perf_config(cuda_images[test]);
+	else
+		return perf_config(onyx_images[test]);
+
+	return count;
+}
+
+/*
+ * Patch the images that need to know the IVA addresses.
+ */
+static void perf_patch_images(void)
+{
+#if 0 /* FIXME!! */
+/* 
+ * NOTE:  this routine is VERY specific to the current TLB image.
+ * If the image is changed, this routine might also need to be changed.
+ */
+	extern void $i_itlb_miss_2_0();
+	extern void $i_dtlb_miss_2_0();
+	extern void PA2_0_iva();
+
+	/* 
+	 * We can only use the lower 32-bits, the upper 32-bits should be 0
+	 * anyway given this is in the kernel 
+	 */
+	uint32_t itlb_addr  = (uint32_t)&($i_itlb_miss_2_0);
+	uint32_t dtlb_addr  = (uint32_t)&($i_dtlb_miss_2_0);
+	uint32_t IVAaddress = (uint32_t)&PA2_0_iva;
+
+	if (perf_processor_interface == ONYX_INTF) {
+		/* clear last 2 bytes */
+		onyx_images[TLBMISS][15] &= 0xffffff00;  
+		/* set 2 bytes */
+		onyx_images[TLBMISS][15] |= (0x000000ff&((dtlb_addr) >> 24));
+		onyx_images[TLBMISS][16] = (dtlb_addr << 8)&0xffffff00;
+		onyx_images[TLBMISS][17] = itlb_addr;
+
+		/* clear last 2 bytes */
+		onyx_images[TLBHANDMISS][15] &= 0xffffff00;  
+		/* set 2 bytes */
+		onyx_images[TLBHANDMISS][15] |= (0x000000ff&((dtlb_addr) >> 24));
+		onyx_images[TLBHANDMISS][16] = (dtlb_addr << 8)&0xffffff00;
+		onyx_images[TLBHANDMISS][17] = itlb_addr;
+
+		/* clear last 2 bytes */
+		onyx_images[BIG_CPI][15] &= 0xffffff00;  
+		/* set 2 bytes */
+		onyx_images[BIG_CPI][15] |= (0x000000ff&((dtlb_addr) >> 24));
+		onyx_images[BIG_CPI][16] = (dtlb_addr << 8)&0xffffff00;
+		onyx_images[BIG_CPI][17] = itlb_addr;
+
+	    onyx_images[PANIC][15] &= 0xffffff00;  /* clear last 2 bytes */
+	 	onyx_images[PANIC][15] |= (0x000000ff&((IVAaddress) >> 24)); /* set 2 bytes */
+		onyx_images[PANIC][16] = (IVAaddress << 8)&0xffffff00;
+
+
+	} else if (perf_processor_interface == CUDA_INTF) {
+		/* Cuda interface */
+		cuda_images[TLBMISS][16] =  
+			(cuda_images[TLBMISS][16]&0xffff0000) |
+			((dtlb_addr >> 8)&0x0000ffff);
+		cuda_images[TLBMISS][17] = 
+			((dtlb_addr << 24)&0xff000000) | ((itlb_addr >> 16)&0x000000ff);
+		cuda_images[TLBMISS][18] = (itlb_addr << 16)&0xffff0000;
+
+		cuda_images[TLBHANDMISS][16] = 
+			(cuda_images[TLBHANDMISS][16]&0xffff0000) |
+			((dtlb_addr >> 8)&0x0000ffff);
+		cuda_images[TLBHANDMISS][17] = 
+			((dtlb_addr << 24)&0xff000000) | ((itlb_addr >> 16)&0x000000ff);
+		cuda_images[TLBHANDMISS][18] = (itlb_addr << 16)&0xffff0000;
+
+		cuda_images[BIG_CPI][16] = 
+			(cuda_images[BIG_CPI][16]&0xffff0000) |
+			((dtlb_addr >> 8)&0x0000ffff);
+		cuda_images[BIG_CPI][17] = 
+			((dtlb_addr << 24)&0xff000000) | ((itlb_addr >> 16)&0x000000ff);
+		cuda_images[BIG_CPI][18] = (itlb_addr << 16)&0xffff0000;
+	} else {
+		/* Unknown type */
+	}
+#endif
+}
+
+
+/*
+ * ioctl routine
+ * All routines effect the processor that they are executed on.  Thus you 
+ * must be running on the processor that you wish to change.
+ */
+
+static int perf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+	unsigned long arg)
+{
+	long error_start;
+	uint32_t raddr[4];	
+
+	switch (cmd) {
+
+	    case PA_PERF_ON:
+			/* Start the counters */
+			perf_start_counters();
+			return 0;
+
+	    case PA_PERF_OFF:
+			error_start = perf_stop_counters(raddr);
+			if (error_start != 0) {
+				printk(KERN_ERR "perf_off: perf_stop_counters = %ld\n", error_start);
+				return -EFAULT;	
+			}
+
+			/* copy out the Counters */
+			if (copy_to_user((void *)arg, raddr, 
+					sizeof (raddr)) != 0) {
+				return -EFAULT;
+			}
+			return 0;
+
+	    case PA_PERF_VERSION:
+  	  		/* Return the version # */
+			return put_user(PERF_VERSION, (int *)arg);
+
+	    default:
+  	 		break;
+	}
+	return -ENOTTY;
+}
+
+static struct file_operations perf_fops = {
+	llseek: no_llseek,
+	read: perf_read,
+	write: perf_write,
+	ioctl: perf_ioctl,
+	open: perf_open,
+	release: perf_release
+};
+	
+static struct miscdevice perf_dev = {
+	MISC_DYNAMIC_MINOR,
+	PA_PERF_DEV,
+	&perf_fops
+};
+
+/*
+ * Initialize the module
+ */
+static int __init perf_init(void)
+{
+	/* Determine correct processor interface to use */
+	bitmask_array = perf_bitmasks;
+
+	if (boot_cpu_data.cpu_type == pcxu ||
+	    boot_cpu_data.cpu_type == pcxu_) {
+		perf_processor_interface = ONYX_INTF;
+	} else if (boot_cpu_data.cpu_type == pcxw ||
+		 boot_cpu_data.cpu_type == pcxw_ ||
+		 boot_cpu_data.cpu_type == pcxw2) {
+		perf_processor_interface = CUDA_INTF;
+		if (boot_cpu_data.cpu_type == pcxw2) 
+			bitmask_array = perf_bitmasks_piranha;
+	} else {
+		perf_processor_interface = UNKNOWN_INTF;
+		printk("Performance monitoring counters not supported on this processor\n");
+		return -ENODEV;
+	}
+
+	/* Patch the images to match the system */
+    	perf_patch_images();
+
+	spin_lock_init(&perf_lock);
+	misc_register(&perf_dev);
+
+	/* TODO: this only lets us access the first cpu.. what to do for SMP? */
+	cpu_device = cpu_data[0].dev;
+	printk("Performance monitoring counters enabled for %s\n",
+		cpu_data[0].dev->name);
+
+	return 0;
+}
+
+/*
+ * perf_start_counters(void)
+ *
+ * Start the counters.
+ */
+static void perf_start_counters(void)
+{
+	/* Enable performance monitor counters */
+	perf_intrigue_enable_perf_counters();
+}
+
+/*
+ * perf_stop_counters
+ *
+ * Stop the performance counters and save counts
+ * in a per_processor array.
+ */
+static int perf_stop_counters(uint32_t *raddr)
+{
+	uint64_t userbuf[MAX_RDR_WORDS];
+
+	/* Disable performance counters */
+	perf_intrigue_disable_perf_counters();
+
+	if (perf_processor_interface == ONYX_INTF) {
+		uint64_t tmp64;
+		/*
+		 * Read the counters
+		 */
+		if (!perf_rdr_read_ubuf(16, userbuf))
+			return -13;
+
+		/* Counter0 is bits 1398 thru 1429 */
+		tmp64 =  (userbuf[21] << 22) & 0x00000000ffc00000;
+		tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff;
+		/* OR sticky0 (bit 1430) to counter0 bit 32 */
+		tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000;
+		raddr[0] = (uint32_t)tmp64;
+
+		/* Counter1 is bits 1431 thru 1462 */
+		tmp64 =  (userbuf[22] >> 9) & 0x00000000ffffffff;
+		/* OR sticky1 (bit 1463) to counter1 bit 32 */
+		tmp64 |= (userbuf[22] << 23) & 0x0000000080000000;
+		raddr[1] = (uint32_t)tmp64;
+
+		/* Counter2 is bits 1464 thru 1495 */
+		tmp64 =  (userbuf[22] << 24) & 0x00000000ff000000;
+		tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff;
+		/* OR sticky2 (bit 1496) to counter2 bit 32 */
+		tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000;
+		raddr[2] = (uint32_t)tmp64;
+		
+		/* Counter3 is bits 1497 thru 1528 */
+		tmp64 =  (userbuf[23] >> 7) & 0x00000000ffffffff;
+		/* OR sticky3 (bit 1529) to counter3 bit 32 */
+		tmp64 |= (userbuf[23] << 25) & 0x0000000080000000;
+		raddr[3] = (uint32_t)tmp64;
+
+		/*
+		 * Zero out the counters
+		 */
+
+		/*
+		 * The counters and sticky-bits comprise the last 132 bits
+		 * (1398 - 1529) of RDR16 on a U chip.  We'll zero these
+		 * out the easy way: zero out last 10 bits of dword 21,
+		 * all of dword 22 and 58 bits (plus 6 don't care bits) of
+		 * dword 23.
+		 */
+		userbuf[21] &= 0xfffffffffffffc00;	/* 0 to last 10 bits */
+		userbuf[22] = 0;
+		userbuf[23] = 0;
+
+		/* 
+		 * Write back the zero'ed bytes + the image given
+		 * the read was destructive.
+		 */
+		perf_rdr_write(16, userbuf);
+	} else {
+
+		/*
+		 * Read RDR-15 which contains the counters and sticky bits 
+		 */
+		if (!perf_rdr_read_ubuf(15, userbuf)) {
+			return -13;
+		}
+
+		/* 
+		 * Clear out the counters
+		 */
+		perf_rdr_clear(15);
+
+		/*
+		 * Copy the counters 
+		 */
+		raddr[0] = (uint32_t)((userbuf[0] >> 32) & 0x00000000ffffffffUL);
+		raddr[1] = (uint32_t)(userbuf[0] & 0x00000000ffffffffUL);
+		raddr[2] = (uint32_t)((userbuf[1] >> 32) & 0x00000000ffffffffUL);
+		raddr[3] = (uint32_t)(userbuf[1] & 0x00000000ffffffffUL);
+	}
+ 
+	return 0;
+}
+
+/*
+ * perf_rdr_get_entry
+ *
+ * Retrieve a pointer to the description of what this
+ * RDR contains.
+ */
+static struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num)
+{
+	if (perf_processor_interface == ONYX_INTF) {
+		return &perf_rdr_tbl_U[rdr_num];
+	} else {
+		return &perf_rdr_tbl_W[rdr_num];
+	}
+}
+
+/*
+ * perf_rdr_read_ubuf
+ *
+ * Read the RDR value into the buffer specified.
+ */
+static int perf_rdr_read_ubuf(uint32_t	rdr_num, uint64_t *buffer)
+{
+	uint64_t	data, data_mask = 0;
+	uint32_t	width, xbits, i;
+	struct rdr_tbl_ent *tentry;
+
+	tentry = perf_rdr_get_entry(rdr_num);
+	if ((width = tentry->width) == 0)
+		return 0;
+
+	/* Clear out buffer */
+	i = tentry->num_words;
+	while (i--) {
+		buffer[i] = 0;
+	}	
+
+	/* Check for bits an even number of 64 */
+	if ((xbits = width & 0x03f) != 0) {
+		data_mask = 1;
+		data_mask <<= (64 - xbits);
+		data_mask--;
+	}
+
+	/* Grab all of the data */
+	i = tentry->num_words;
+	while (i--) {
+
+		if (perf_processor_interface == ONYX_INTF) {
+			data = perf_rdr_shift_in_U(rdr_num, width);
+		} else {
+			data = perf_rdr_shift_in_W(rdr_num, width);
+		}
+		if (xbits) {
+			buffer[i] |= (data << (64 - xbits));
+			if (i) {
+				buffer[i-1] |= ((data >> xbits) & data_mask);
+			}
+		} else {
+			buffer[i] = data;
+		}
+	}
+
+	return 1;
+}
+
+/*
+ * perf_rdr_clear
+ *
+ * Zero out the given RDR register
+ */
+static int perf_rdr_clear(uint32_t	rdr_num)
+{
+	struct rdr_tbl_ent *tentry;
+	int32_t		i;
+
+	tentry = perf_rdr_get_entry(rdr_num);
+
+	if (tentry->width == 0) {
+		return -1;
+	}
+
+	i = tentry->num_words;
+	while (i--) {
+		if (perf_processor_interface == ONYX_INTF) {
+			perf_rdr_shift_out_U(rdr_num, 0UL);
+		} else {
+			perf_rdr_shift_out_W(rdr_num, 0UL);
+		}
+	}
+
+	return 0;
+}
+
+
+/*
+ * perf_write_image
+ *
+ * Write the given image out to the processor
+ */
+static int perf_write_image(uint64_t *memaddr)
+{
+	uint64_t buffer[MAX_RDR_WORDS];
+	uint64_t *bptr;
+	uint32_t dwords;
+	uint32_t *intrigue_rdr;
+	uint64_t *intrigue_bitmask, tmp64, proc_hpa;
+	struct rdr_tbl_ent *tentry;
+	int i;
+
+	/* Clear out counters */
+	if (perf_processor_interface == ONYX_INTF) {
+
+		perf_rdr_clear(16);
+
+		/* Toggle performance monitor */
+		perf_intrigue_enable_perf_counters();
+		perf_intrigue_disable_perf_counters();
+
+		intrigue_rdr = perf_rdrs_U;
+	} else {
+		perf_rdr_clear(15);
+		intrigue_rdr = perf_rdrs_W;
+	}
+
+	/* Write all RDRs */
+	while (*intrigue_rdr != -1) {
+		tentry = perf_rdr_get_entry(*intrigue_rdr);
+		perf_rdr_read_ubuf(*intrigue_rdr, buffer);
+		bptr   = &buffer[0];
+		dwords = tentry->num_words;
+		if (tentry->write_control) {
+			intrigue_bitmask = &bitmask_array[tentry->write_control >> 3];
+			while (dwords--) {
+				tmp64 = *intrigue_bitmask & *memaddr++;
+				tmp64 |= (~(*intrigue_bitmask++)) & *bptr;
+				*bptr++ = tmp64;
+			}
+		} else {
+			while (dwords--) {
+				*bptr++ = *memaddr++;
+			}
+		}
+
+		perf_rdr_write(*intrigue_rdr, buffer);
+		intrigue_rdr++;
+	}
+
+	/*
+	 * Now copy out the Runway stuff which is not in RDRs
+	 */
+
+	if (cpu_device == NULL)
+	{
+		printk(KERN_ERR "write_image: cpu_device not yet initialized!\n");
+		return -1;
+	}
+
+	proc_hpa = cpu_device->hpa;
+
+	/* Merge intrigue bits into Runway STATUS 0 */
+	tmp64 = __raw_readq(proc_hpa + RUNWAY_STATUS) & 0xffecffffffffffff;
+	__raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000), proc_hpa + RUNWAY_STATUS);
+	
+	/* Write RUNWAY DEBUG registers */
+	for (i = 0; i < 8; i++) {
+		__raw_writeq(*memaddr++, proc_hpa + RUNWAY_DEBUG + i);
+	}
+
+	return 0; 
+}
+
+/*
+ * perf_rdr_write
+ *
+ * Write the given RDR register with the contents
+ * of the given buffer.
+ */
+static void perf_rdr_write(uint32_t rdr_num, uint64_t *buffer)
+{
+	struct rdr_tbl_ent *tentry;
+	int32_t		i;
+
+printk("perf_rdr_write\n");
+	tentry = perf_rdr_get_entry(rdr_num);
+	if (tentry->width == 0) { return; }
+
+	i = tentry->num_words;
+	while (i--) {
+		if (perf_processor_interface == ONYX_INTF) {
+			perf_rdr_shift_out_U(rdr_num, buffer[i]);
+		} else {
+			perf_rdr_shift_out_W(rdr_num, buffer[i]);
+		}	
+	}
+printk("perf_rdr_write done\n");
+}
+
+module_init(perf_init);
diff -Nru a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/perf_asm.S	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1679 @@
+; 
+;   Purpose:
+;	This file has the overall purpose of suppyling low-level
+;   assembly to program the intrigue portion of the cpu.
+; 
+
+#include <linux/config.h>
+#include <asm/assembly.h>
+
+#ifdef __LP64__
+	.level		2.0w
+#endif /* __LP64__ */
+
+#define MTDIAG_1(gr)    .word 0x14201840 + gr*0x10000
+#define MTDIAG_2(gr)    .word 0x14401840 + gr*0x10000
+#define MFDIAG_1(gr)    .word 0x142008A0 + gr
+#define MFDIAG_2(gr)    .word 0x144008A0 + gr
+#define STDIAG(dr)      .word 0x14000AA0 + dr*0x200000
+#define SFDIAG(dr)      .word 0x14000BA0 + dr*0x200000
+#define DR2_SLOW_RET    53
+
+
+;
+; Enable the performance counters
+;
+; The coprocessor only needs to be enabled when
+; starting/stopping the coprocessor with the pmenb/pmdis.
+;
+	.text
+	.align 32
+
+	.export perf_intrigue_enable_perf_counters,code
+perf_intrigue_enable_perf_counters:
+	.proc
+	.callinfo  frame=0,NO_CALLS
+	.entry
+	
+	ldi     0x20,%r25                ; load up perfmon bit
+	mfctl   ccr,%r26                 ; get coprocessor register
+	or      %r25,%r26,%r26             ; set bit
+	mtctl   %r26,ccr                 ; turn on performance coprocessor
+	pmenb                           ; enable performance monitor
+	ssm     0,0                     ; dummy op to ensure completion
+	sync                            ; follow ERS
+	andcm   %r26,%r25,%r26             ; clear bit now 
+	mtctl   %r26,ccr                 ; turn off performance coprocessor
+	nop                             ; NOPs as specified in ERS
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	bve    (%r2)
+	nop
+	.exit
+	.procend
+
+	.export perf_intrigue_disable_perf_counters,code
+perf_intrigue_disable_perf_counters:
+	.proc
+	.callinfo  frame=0,NO_CALLS
+	.entry
+	ldi     0x20,%r25                ; load up perfmon bit
+	mfctl   ccr,%r26                 ; get coprocessor register
+	or      %r25,%r26,%r26             ; set bit
+	mtctl   %r26,ccr                 ; turn on performance coprocessor
+	pmdis                           ; disable performance monitor
+	ssm     0,0                     ; dummy op to ensure completion
+	andcm   %r26,%r25,%r26             ; clear bit now 
+	bve    (%r2)
+	mtctl   %r26,ccr                 ; turn off performance coprocessor
+	.exit
+	.procend
+
+;************************************************************************
+;*																		*
+;* Name: perf_rdr_shift_in_W												*
+;*																		*
+;* Description:															*
+;*	This routine shifts data in from the RDR in arg0 and returns		*
+;*	the result in ret0.  If the RDR is <= 64 bits in length, it			*
+;*	is shifted shifted backup immediately.  This is to compensate		*
+;*	for RDR10 which has bits that preclude PDC stack operations			*
+;*	when they are in the wrong state.									*
+;*																		*
+;* Arguments:															*
+;*	arg0 : rdr to be read												*
+;*	arg1 : bit length of rdr											*
+;*																		*
+;* Returns:																*
+;*	ret0 = next 64 bits of rdr data from staging register				*
+;*																		*
+;* Register usage:														*
+;*	arg0 : rdr to be read												*
+;*	arg1 : bit length of rdr											*
+;*	%r24  - original DR2 value											*
+;*	%r1   - scratch														*
+;*  %r29  - scratch														*
+;*																		*
+;* Returns:																*
+;*	ret0 = RDR data (right justified)									*
+;*																		*
+;************************************************************************
+
+	.export perf_rdr_shift_in_W,code
+perf_rdr_shift_in_W:
+	.proc
+	.callinfo frame=0,NO_CALLS
+	.entry
+;
+; read(shift in) the RDR.
+;
+
+; NOTE: The PCX-W ERS states that DR2_SLOW_RET must be set before any
+; shifting is done, from or to, remote diagnose registers.
+;
+
+	depdi,z		1,DR2_SLOW_RET,1,%r29
+	MFDIAG_2	(24)
+	or		    %r24,%r29,%r29
+	MTDIAG_2	(29)			; set DR2_SLOW_RET
+
+	nop
+	nop
+	nop
+	nop	
+
+;
+; Cacheline start (32-byte cacheline)
+;
+	nop
+	nop
+	nop
+	extrd,u		arg1,63,6,%r1    ; setup shift amount based on bits to move 
+
+	mtsar		%r1
+	shladd		arg0,2,%r0,%r1	; %r1 = 4 * RDR number
+	blr  		%r1,%r0		    ; branch to 8-instruction sequence
+	nop
+
+;
+; Cacheline start (32-byte cacheline)
+;
+
+	;
+	; RDR 0 sequence
+	;
+	SFDIAG		(0)		
+	ssm		    0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)					; mtdiag %dr1, %r1 
+	STDIAG		(0)
+	ssm		    0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 1 sequence
+	;
+	sync			
+	ssm		    0,0
+	SFDIAG		(1)
+	ssm		    0,0
+	MFDIAG_1	(28)
+	ssm		    0,0
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	
+	;
+	; RDR 2 read sequence
+	;
+	SFDIAG		(2)		
+	ssm		    0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(2)
+	ssm		    0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 3 read sequence
+	;
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	;
+	; RDR 4 read sequence
+	;
+	sync				
+	ssm			0,0
+	SFDIAG		(4)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	; 
+	; RDR 5 read sequence
+	;
+	sync	
+	ssm			0,0
+	SFDIAG		(5)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 6 read sequence
+	;
+	sync	
+	ssm			0,0
+	SFDIAG		(6)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 7 read sequence
+	;
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	;
+	; RDR 8 read sequence
+	;
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	;
+	; RDR 9 read sequence
+	;
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	;
+	; RDR 10 read sequence
+	;
+	SFDIAG		(10)
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(10)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 11 read sequence
+	;
+	SFDIAG		(11)
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(11)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 12 read sequence
+	;
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	;
+	; RDR 13 read sequence
+	;
+	sync
+	ssm			0,0
+	SFDIAG		(13)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 14 read sequence
+	;
+	SFDIAG		(14)	
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(14)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 15 read sequence
+	;
+	sync				; RDR 15 read sequence
+	ssm			0,0
+	SFDIAG		(15)
+	ssm			0,0
+	MFDIAG_1	(28)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	
+	;
+	; RDR 16 read sequence
+	;
+	sync				; RDR 16 read sequence
+	ssm			0,0
+	SFDIAG		(16)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 17 read sequence
+	;
+	SFDIAG		(17)	
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(17)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 18 read sequence
+	;
+	SFDIAG		(18)	
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(18)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+;
+; RDR 19 read sequence
+;
+	b,n         perf_rdr_shift_in_W_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	;
+	; RDR 20 read sequence
+	;
+	sync
+	ssm			0,0
+	SFDIAG		(20)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 21 read sequence
+	;
+	sync
+	ssm			0,0
+	SFDIAG		(21)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 22 read sequence
+	;
+	sync
+	ssm			0,0
+	SFDIAG		(22)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 23 read sequence
+	;
+	sync		
+	ssm			0,0
+	SFDIAG		(23)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 24 read sequence
+	;
+	sync	
+	ssm			0,0
+	SFDIAG		(24)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 25 read sequence
+	;
+	sync
+	ssm			0,0
+	SFDIAG		(25)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 26 read sequence
+	;
+	SFDIAG		(26)		
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(26)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 27 read sequence
+	;
+	SFDIAG		(27)
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(27)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 28 read sequence
+	;
+	sync				
+	ssm			0,0
+	SFDIAG		(28)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 29 read sequence
+	;
+	sync		
+	ssm			0,0
+	SFDIAG		(29)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_W_leave
+	ssm			0,0
+	nop
+	
+	;
+	; RDR 30 read sequence
+	;
+	SFDIAG		(30)
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(30)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_W_leave
+	
+	;
+	; RDR 31 read sequence
+	;
+	sync		
+	ssm			0,0
+	SFDIAG		(31)
+	ssm			0,0
+	MFDIAG_1	(28)
+	nop
+	ssm			0,0
+	nop
+
+	;
+	; Fallthrough
+	;
+
+perf_rdr_shift_in_W_leave:
+	bve		    (%r2)
+	.exit
+	MTDIAG_2	(24)			; restore DR2
+	.procend
+
+
+;************************************************************************
+;*																		*
+;* Name: perf_rdr_shift_out_W												*
+;*																		*
+;* Description:															*
+;*	This routine moves data to the RDR's.  The double-word that			*
+;*	arg1 points to is loaded and moved into the staging register.		*
+;*	Then the STDIAG instruction for the RDR # in arg0 is called			*
+;*	to move the data to the RDR.										*
+;*																		*
+;* Arguments:															*
+;*	arg0 = rdr number													*
+;*	arg1 = 64-bit value to write										*
+;*	%r24 - DR2 | DR2_SLOW_RET											*
+;*	%r23 - original DR2 value											*
+;*																		*
+;* Returns:																*
+;*	None																*
+;*																		*
+;* Register usage:														*
+;*																		*
+;************************************************************************
+
+	.export perf_rdr_shift_out_W,code
+perf_rdr_shift_out_W:
+	.proc
+	.callinfo frame=0,NO_CALLS
+	.entry
+;
+; NOTE: The PCX-W ERS states that DR2_SLOW_RET must be set before any
+; shifting is done, from or to, the remote diagnose registers.
+;
+
+	depdi,z		1,DR2_SLOW_RET,1,%r24
+	MFDIAG_2	(23)
+	or		     %r24,%r23,%r24
+	MTDIAG_2	(24)			; set DR2_SLOW_RET
+
+	MTDIAG_1	(25)			; data to the staging register
+	shladd		arg0,2,%r0,%r1	; %r1 = 4 * RDR number
+	blr		    %r1,%r0		    ; branch to 8-instruction sequence
+	nop
+
+	;
+	; RDR 0 write sequence
+	;
+	sync				; RDR 0 write sequence
+	ssm			0,0
+	STDIAG		(0)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm			0,0
+	nop
+
+	;
+	; RDR 1 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(1)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 2 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(2)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 3 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(3)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 4 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(4)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 5 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(5)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 6 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(6)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 7 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(7)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 8 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(8)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 9 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(9)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 10 write sequence
+	;
+	sync	
+	ssm		0,0
+	STDIAG		(10)
+	STDIAG		(26)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	ssm		0,0
+	nop
+
+	;
+	; RDR 11 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(11)
+	STDIAG		(27)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	ssm		0,0
+	nop
+
+	;
+	; RDR 12 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(12)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 13 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(13)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 14 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(14)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 15 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(15)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 16 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(16)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 17 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(17)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 18 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(18)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 19 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(19)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 20 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(20)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 21 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(21)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 22 write sequence
+	;
+	sync	
+	ssm		0,0
+	STDIAG		(22)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 23 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(23)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 24 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(24)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 25 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(25)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 26 write sequence
+	;
+	sync	
+	ssm		0,0
+	STDIAG		(10)
+	STDIAG		(26)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	ssm		0,0
+	nop
+
+	;
+	; RDR 27 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(11)
+	STDIAG		(27)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	ssm		0,0
+	nop
+
+	;
+	; RDR 28 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(28)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 29 write sequence
+	;
+	sync
+	ssm		0,0
+	STDIAG		(29)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 30 write sequence
+	;
+	sync	
+	ssm		0,0
+	STDIAG		(30)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+	;
+	; RDR 31 write sequence
+	;
+	sync				
+	ssm		0,0
+	STDIAG		(31)
+	ssm		0,0
+	b,n         perf_rdr_shift_out_W_leave
+	nop
+	ssm		0,0
+	nop
+
+perf_rdr_shift_out_W_leave:
+	bve		(%r2)
+	.exit
+	MTDIAG_2	(23)			; restore DR2
+	.procend
+
+
+;**************************** CHRIS ***********************************
+
+;************************************************************************
+;*																		*
+;* Name: rdr_shift_in_U													*
+;*																		*
+;* Description:															*
+;*	This routine shifts data in from the RDR in arg0 and returns		*
+;*	the result in ret0.  If the RDR is <= 64 bits in length, it			*
+;*	is shifted shifted backup immediately.  This is to compensate		*
+;*	for RDR10 which has bits that preclude PDC stack operations			*
+;*	when they are in the wrong state.									*
+;*																		*
+;* Arguments:															*
+;*	arg0 : rdr to be read												*
+;*	arg1 : bit length of rdr											*
+;*																		*
+;* Returns:																*
+;*	ret0 = next 64 bits of rdr data from staging register				*
+;*																		*
+;* Register usage:														*
+;*	arg0 : rdr to be read						                        *
+;*	arg1 : bit length of rdr					                        *
+;*	%r24 - original DR2 value											*
+;*	%r23 - DR2 | DR2_SLOW_RET											*
+;*	%r1  - scratch														*
+;*																		*
+;************************************************************************
+
+	.export perf_rdr_shift_in_U,code
+perf_rdr_shift_in_U:
+	.proc
+	.callinfo frame=0,NO_CALLS
+	.entry
+
+; read(shift in) the RDR.
+;
+; NOTE: The PCX-U ERS states that DR2_SLOW_RET must be set before any
+; shifting is done, from or to, remote diagnose registers.
+
+	depdi,z		1,DR2_SLOW_RET,1,%r29
+	MFDIAG_2	(24)
+	or			%r24,%r29,%r29
+	MTDIAG_2	(29)			; set DR2_SLOW_RET
+
+	nop
+	nop
+	nop
+	nop
+
+;
+; Start of next 32-byte cacheline
+;
+	nop
+	nop
+	nop
+	extrd,u		arg1,63,6,%r1
+
+	mtsar		%r1
+	shladd		arg0,2,%r0,%r1	; %r1 = 4 * RDR number
+	blr 		%r1,%r0		; branch to 8-instruction sequence
+	nop
+
+;
+; Start of next 32-byte cacheline
+;
+	SFDIAG		(0)		; RDR 0 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(0)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(1)		; RDR 1 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(1)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	sync				; RDR 2 read sequence
+	ssm			0,0
+	SFDIAG		(4)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 3 read sequence
+	ssm			0,0
+	SFDIAG		(3)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+
+	sync				; RDR 4 read sequence
+	ssm			0,0
+	SFDIAG		(4)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 5 read sequence
+	ssm			0,0
+	SFDIAG		(5)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 6 read sequence
+	ssm			0,0
+	SFDIAG		(6)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 7 read sequence
+	ssm			0,0
+	SFDIAG		(7)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+
+	b,n         perf_rdr_shift_in_U_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	SFDIAG		(9)		; RDR 9 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(9)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+
+	SFDIAG		(10)		; RDR 10 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(10)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(11)		; RDR 11 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(11)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(12)		; RDR 12 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(12)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+
+	SFDIAG		(13)		; RDR 13 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(13)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(14)		; RDR 14 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(14)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(15)		; RDR 15 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(15)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	sync				; RDR 16 read sequence
+	ssm			0,0
+	SFDIAG		(16)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	SFDIAG		(17)		; RDR 17 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(17)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(18)		; RDR 18 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(18)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	b,n         perf_rdr_shift_in_U_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+
+	sync				; RDR 20 read sequence
+	ssm			0,0
+	SFDIAG		(20)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 21 read sequence
+	ssm			0,0
+	SFDIAG		(21)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 22 read sequence
+	ssm			0,0
+	SFDIAG		(22)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 23 read sequence
+	ssm			0,0
+	SFDIAG		(23)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 24 read sequence
+	ssm			0,0
+	SFDIAG		(24)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	sync				; RDR 25 read sequence
+	ssm			0,0
+	SFDIAG		(25)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	SFDIAG		(26)		; RDR 26 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(26)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(27)		; RDR 27 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(27)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	sync				; RDR 28 read sequence
+	ssm			0,0
+	SFDIAG		(28)
+	ssm			0,0
+	MFDIAG_1	(28)
+	b,n         perf_rdr_shift_in_U_leave
+	ssm			0,0
+	nop
+	
+	b,n         perf_rdr_shift_in_U_leave
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	nop
+	
+	SFDIAG		(30)		; RDR 30 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(30)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	
+	SFDIAG		(31)		; RDR 31 read sequence
+	ssm			0,0
+	MFDIAG_1	(28)
+	shrpd		ret0,%r0,%sar,%r1
+	MTDIAG_1	(1)
+	STDIAG		(31)
+	ssm			0,0
+	b,n         perf_rdr_shift_in_U_leave
+	nop
+
+perf_rdr_shift_in_U_leave:
+	bve		    (%r2)
+	.exit
+	MTDIAG_2	(24)			; restore DR2
+	.procend
+
+;************************************************************************
+;*																		*
+;* Name: rdr_shift_out_U												*
+;*																		*
+;* Description:															*
+;*	This routine moves data to the RDR's.  The double-word that			*
+;*	arg1 points to is loaded and moved into the staging register.		*
+;*	Then the STDIAG instruction for the RDR # in arg0 is called			*
+;*	to move the data to the RDR.										*
+;*																		*
+;* Arguments:															*
+;*	arg0 = rdr target													*
+;*	arg1 = buffer pointer												*
+;*																		*
+;* Returns:																*
+;*	None																*
+;*																		*
+;* Register usage:														*
+;*	arg0 = rdr target													*
+;*	arg1 = buffer pointer												*
+;*	%r24 - DR2 | DR2_SLOW_RET											*
+;*	%r23 - original DR2 value											*
+;*																		*
+;************************************************************************
+
+	.export perf_rdr_shift_out_U,code
+perf_rdr_shift_out_U:
+	.proc
+	.callinfo frame=0,NO_CALLS
+	.entry
+
+;
+; NOTE: The PCX-U ERS states that DR2_SLOW_RET must be set before any
+; shifting is done, from or to, the remote diagnose registers.
+;
+
+	depdi,z		1,DR2_SLOW_RET,1,%r24
+	MFDIAG_2	(23)
+	or		%r24,%r23,%r24
+	MTDIAG_2	(24)			; set DR2_SLOW_RET
+
+	MTDIAG_1	(25)			; data to the staging register
+	shladd		 arg0,2,%r0,%r1	; %r1 = 4 * RDR number
+	blr		    %r1,%r0		    ; branch to 8-instruction sequence
+	nop
+
+;
+; 32-byte cachline aligned
+;
+
+	sync				; RDR 0 write sequence
+	ssm			0,0
+	STDIAG		(0)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 1 write sequence
+	ssm			0,0
+	STDIAG		(1)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 2 write sequence
+	ssm			0,0
+	STDIAG		(2)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 3 write sequence
+	ssm			0,0
+	STDIAG		(3)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 4 write sequence
+	ssm			0,0
+	STDIAG		(4)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 5 write sequence
+	ssm			0,0
+	STDIAG		(5)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 6 write sequence
+	ssm			0,0
+	STDIAG		(6)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 7 write sequence
+	ssm			0,0
+	STDIAG		(7)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 8 write sequence
+	ssm			0,0
+	STDIAG		(8)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 9 write sequence
+	ssm			0,0
+	STDIAG		(9)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 10 write sequence
+	ssm			0,0
+	STDIAG		(10)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 11 write sequence
+	ssm			0,0
+	STDIAG		(11)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 12 write sequence
+	ssm			0,0
+	STDIAG		(12)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 13 write sequence
+	ssm			0,0
+	STDIAG		(13)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 14 write sequence
+	ssm			0,0
+	STDIAG		(14)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 15 write sequence
+	ssm			0,0
+	STDIAG		(15)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 16 write sequence
+	ssm			0,0
+	STDIAG		(16)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 17 write sequence
+	ssm			0,0
+	STDIAG		(17)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 18 write sequence
+	ssm			0,0
+	STDIAG		(18)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 19 write sequence
+	ssm			0,0
+	STDIAG		(19)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 20 write sequence
+	ssm			0,0
+	STDIAG		(20)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 21 write sequence
+	ssm			0,0
+	STDIAG		(21)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 22 write sequence
+	ssm			0,0
+	STDIAG		(22)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 23 write sequence
+	ssm			0,0
+	STDIAG		(23)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 24 write sequence
+	ssm			0,0
+	STDIAG		(24)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 25 write sequence
+	ssm			0,0
+	STDIAG		(25)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 26 write sequence
+	ssm			0,0
+	STDIAG		(26)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 27 write sequence
+	ssm			0,0
+	STDIAG		(27)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 28 write sequence
+	ssm			0,0
+	STDIAG		(28)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 29 write sequence
+	ssm			0,0
+	STDIAG		(29)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 30 write sequence
+	ssm			0,0
+	STDIAG		(30)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+	sync				; RDR 31 write sequence
+	ssm			0,0
+	STDIAG		(31)
+	ssm			0,0
+	b,n         perf_rdr_shift_out_U_leave
+	nop
+	ssm			0,0
+	nop
+
+perf_rdr_shift_out_U_leave:
+	bve		(%r2)
+	.exit
+	MTDIAG_2	(23)			; restore DR2
+	.procend
+
diff -Nru a/arch/parisc/kernel/perf_images.h b/arch/parisc/kernel/perf_images.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/perf_images.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,3122 @@
+#ifndef PERF_IMAGES_H
+#define PERF_IMAGES_H
+
+/* Magic numbers taken without modification from HPUX stuff */
+
+/*
+ * Imagine for use with the Onyx cpu interface
+ */
+
+#define PCXU_IMAGE_SIZE 584
+
+static uint32_t onyx_images[][PCXU_IMAGE_SIZE/sizeof(uint32_t)] = {
+/*
+ * CPI:
+ *
+ * Counts the following:
+ *
+ * ctr0 : total cycles
+ * ctr1 : total cycles where nothing retired
+ * ctr2 : total instructions retired, including nullified
+ * ctr3 : total instructions retired, less nullified instructions
+ */
+         {
+         0x4c00c000, 0x00000000, 0x00060000, 0x00000000,
+         0xe0e0e0e0, 0x004e0004, 0x07ffffff, 0xffc01380,
+         0x0101ffff, 0xfffff104, 0xe000c07f, 0xfffffffc,
+         0x01380010, 0x1fffffff, 0xff000000, 0x00000000,
+         0x00000fff, 0xff00000f, 0xffff0000, 0x0fffff00,
+         0x000fffff, 0x00000000, 0x00000000, 0x00ffffff,
+         0xfffff000, 0x0000000f, 0xffffffff, 0xff000000,
+         0x0000ffff, 0xfffffff0, 0x00000000, 0x0fffffff,
+         0xffff0000, 0x00000000, 0x6fffffff, 0xffffffff,
+         0xfff55fff, 0xffffffff, 0xffffffff, 0xf0000000,
+         0xf0000030, 0x00003c00, 0x067f080c, 0x02019fc0,
+         0x02804067, 0xf0009030, 0x19fc002c, 0x40067f08,
+         0x0c12019f, 0xc0028440, 0x67f00091, 0x3019fc00,
+         0x2fc007ff, 0xf800f001, 0xfffe003c, 0x007fff80,
+         0x0f001fff, 0xe003c007, 0xfff800f0, 0x01fffe00,
+         0x3c007fff, 0x800f001f, 0xffe003c0, 0x07fff800,
+         0xf001fffe, 0x003c007f, 0xff800f00, 0x1fffe003,
+         0xc007fff8, 0x00f001ff, 0xfe003c00, 0x7fff800f,
+         0x001fffe0, 0x03c007ff, 0xf800f001, 0xfffe003c,
+         0x007fff80, 0x0f001fff, 0xe003c007, 0xfff800f0,
+         0x01fffe00, 0x3c007fff, 0x800f001f, 0xffe00000,
+         0x00000000, 0x00000000, 0x00000000, 0x00000000,
+         0x6fff0000, 0x00000000, 0x60000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xfffffc00, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xfffffc00, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0x00030000, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff},
+
+/* Bus utilization image (bus_util)
+ *
+ * ctr0 : counts address valid cycles
+ * ctr1 : counts data valid cycles
+ * ctr2 : counts overflow from counter 0
+ * ctr3 : counts overflow from counter 1
+ */
+         {
+         0x0c01e000, 0x00000000, 0x00060000, 0x00000000,
+         0xefefefef, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xff000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffff0000, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000,
+         0x0000000c, 0x00003c00, 0x07930000, 0x0041e4c0,
+         0x01002079, 0x3000800c, 0x1e4c0030, 0x00279300,
+         0x010049e4, 0xc0014022, 0x79300090, 0x0c9e4c00,
+         0x34004793, 0x00020051, 0xe4c00180, 0x24793000,
+         0xa00d1e4c, 0x00380067, 0x93000300, 0x59e4c001,
+         0xc0267930, 0x00b00d9e, 0x4c003fff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xfffffc00,
+         0x00000000, 0x00000000, 0x00000000, 0x00000000,
+         0xffff0000, 0x00000000, 0xf0000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xfffffc00, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xfffffc00, 0x00000000,
+         0xffffffff, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0x00100000, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff },
+
+/*
+ * TLB counts (same as tlbStats image):
+ *
+ * Counts the following:
+ *
+ * ctr0: DTLB misses
+ * ctr1: ITLB misses
+ * ctr2: total cycles in the miss handlers
+ * ctr3: total cycles
+ */
+
+         {
+         0x0c00c000, 0x00000000, 0x00060000, 0x00000000,
+         0xe7e7e0e0, 0x004e0004, 0x07ffffff, 0xffc01380,
+         0x0101ffff, 0xfffff104, 0xe000c06a, 0xafffc85c,
+         0x01380010, 0x1fffffff, 0xff000000, 0x00000000,
+         0x01b9e000, 0x0001b8c0, 0x00000000, 0x0fffff00,
+         0x000fffff, 0x00000000, 0x00000000, 0x00400000,
+         0x00001000, 0x00000004, 0x00000000, 0x01000000,
+         0x0000ffff, 0xfffffff0, 0x00000000, 0x0fffffff,
+         0xffff0000, 0x00000000, 0x6fffffff, 0xffffffff,
+         0xfff55ff5, 0xffffffff, 0xffffffff, 0xf0000000,
+         0xf0000000, 0x00003c00, 0x01ff0001, 0x08007fc2,
+         0x02c1001f, 0xf0807100, 0x1bfc200c, 0x4806ff00,
+         0x03f001ff, 0xfe003c00, 0x7fff800f, 0x001fffe0,
+         0x03c007ff, 0xf800f001, 0xfffe003c, 0x007fff80,
+         0x0f001fff, 0xe003c007, 0xfff800f0, 0x01fffe00,
+         0x3c007fff, 0x800f001f, 0xffe003c0, 0x07fff800,
+         0xf001fffe, 0x003c007f, 0xff800f00, 0x1fffe003,
+         0xc007fff8, 0x00f001ff, 0xfe003c00, 0x7fff800f,
+         0x001fffe0, 0x03c007ff, 0xf800f001, 0xfffe003c,
+         0x007fff80, 0x0f001fff, 0xe003c007, 0xfff800f0,
+         0x01fffe00, 0x3c007fff, 0x800f001f, 0xffe00000,
+         0x00000000, 0x00000000, 0x00000000, 0x00000000,
+         0x6fff0000, 0x00000000, 0x60000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xfffffc00, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xfffffc00, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0x00030000, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff },
+
+/* tlbHandMiss
+ *
+ * ctr0: counts TLB misses 
+ * ctr1: counts dmisses inside tlb miss handlers 
+ * ctr2: counts cycles in the tlb miss handlers 
+ * ctr3: counts overflows of ctr2 
+ */
+{
+0x1c00c000,00000000,0x00060000,00000000,
+0xe7e7e0e0,0x004e0004,0x07ffffff,0xffc01380,
+0x0101ffff,0xfffff104,0xe000c06a,0xafffc85c,
+0x01380010,0x1fffffff,0xff000000,00000000,
+0x01b9e000,0x0001b8c0,00000000,0x0fffff00,
+0x000fffff,00000000,00000000,0x00400000,
+0x00001000,0x00000004,00000000,0x01000000,
+0x0000ffff,0xfffffff0,00000000,0x0fffffff,
+0xffff0000,00000000,0x6fffffff,0xffffffff,
+0xfff55ff5,0xffffffff,0xffffffff,0xf0000000,
+0xf0000000,0x00003c00,0x01fd0000,0x08007f42,
+0x0281001f,0xd080a100,0x19f42008,0x44067d08,
+0x0612019f,0x400084c0,0x67d00060,0x0047f400,
+0x042011fd,0x080b0404,0x7f4202c4,0x0167d080,
+0x311059f4,0x201c4816,0x7d000313,0x059f4001,
+0xfc007fff,0x800f001f,0xffe003c0,0x07fff800,
+0xf001fffe,0x003c007f,0xff800f00,0x1fffe003,
+0xc007fff8,0x00f001ff,0xfe003c00,0x7fff800f,
+0x001fffe0,0x03c007ff,0xf800f001,0xfffe003c,
+0x007fff80,0x0f001fff,0xe003c007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x6fff0000,00000000,0x60000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff},
+
+/* branch_taken image (ptkn image)
+ *
+ * ctr0: overflow for ctr1
+ * ctr1: predicted taken branches, actually taken
+ * ctr2: all predicted taken branches (nullfied or not)
+ * ctr3: overflow for ctr2
+ */
+
+        {
+        0xcc01e000, 0x00000000, 0x00060000, 0x00000000,
+        0xa08080a0, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xff000000, 0x00000000,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0x00000000, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffff0000, 0x00000000, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000,
+        0xf0000000, 0x00003c00, 0x04f90000, 0x02013e40,
+        0x0081004f, 0x90004060, 0x13e40018, 0x0024f900,
+        0x0802093e, 0x40028102, 0x4f9000c0, 0x6093e400,
+        0x380014f9, 0x00010205, 0x3e4000c1, 0x014f9000,
+        0x506053e4, 0x001c0034, 0xf9000902, 0x0d3e4002,
+        0xc1034f90, 0x00d060d3, 0xe4003fff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xfffffc00,
+        0x00000000, 0x00000000, 0x00000000, 0x00000000,
+        0xffff0000, 0x00000000, 0xf0000000, 0x00000000,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xfffffc00, 0x00000000, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xfffffc00, 0x00000000,
+        0xffffffff, 0xffffffff, 0xf3ffffff, 0xffffffff,
+        0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+        0xffffffff, 0xffffffff, 0xf3ffffff, 0xffffffff,
+        0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+        0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+        0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+        0x00030000, 0x00000000, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+        0xffffffff, 0xffffffff },
+
+/* branch_nottaken (pntkn image)
+ *
+ * ctr0: overflow for ctr1
+ * ctr1: counts branches predicted not-taken, but actually taken
+ * ctr2: counts all predictable branches predicted not-taken
+ * ctr3: overflow for ctr2
+ */
+{
+0xcc01e000,00000000,0x00060000,00000000,
+0xc0c0c0e0,0xffb1fffb,0xfff7ffff,0xffffffff,
+0xffffffff,0xfffffffb,0x1fffbfff,0x7fffffff,
+0xfcc7ffff,0xffdffffa,0x5f000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff},
+
+
+/* imiss image
+ *
+ * ctr0 : counts imiss aligned on 0
+ * ctr1 : counts imiss aligned on 4
+ * ctr2 : counts imiss aligned on 8
+ * ctr3 : counts imiss aligned on C
+ */
+         {
+         0x0c00c000, 0x00000000, 0x00010000, 0x00000000,
+         0xe7ebedee, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xff000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffff0000, 0x00000000, 0x6fffffff, 0xffffffff,
+         0xfff55fff, 0xffffffff, 0xffffffff, 0xf0000000,
+         0xf0000000, 0x00003c00, 0x007f0000, 0x01001fc0,
+         0x00408007, 0xf0002030, 0x01fc000c, 0x10007f00,
+         0x0405001f, 0xc0014180, 0x07f00060, 0x7001fc00,
+         0x1c20007f, 0x00080900, 0x1fc00242, 0x8007f000,
+         0xa0b001fc, 0x002c3000, 0x7f000c0d, 0x001fc003,
+         0x438007f0, 0x00e0f001, 0xfc003fff, 0xfffff800,
+         0xfffffffe, 0x003fffff, 0xff800fff, 0xffffe003,
+         0xfffffff8, 0x00ffffff, 0xfe003fff, 0xffff800f,
+         0xffffffe0, 0x03ffffff, 0xf800ffff, 0xfffe003f,
+         0xffffff80, 0x0fffffff, 0xe003ffff, 0xfff800ff,
+         0xfffffe00, 0x3fffffff, 0x800fffff, 0xffe00000,
+         0x00000000, 0x00000000, 0x00000000, 0x00000000,
+         0x6fff0000, 0x00000000, 0x60000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xfffffc00, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xfffffc00, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0x00030000, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff},
+
+/* dmiss image
+ * 
+ * ctr0 : counts cycles
+ * ctr1 : counts cycles where something retired
+ * ctr2 : counts dmisses
+ * ctr3 : (same as ctr2)
+ */
+         {
+         0x3c00c000, 0x00000000, 0x00060000, 0x00000000,
+         0xe0e0e0e0, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xff000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffff0000, 0x00000000, 0x6fffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xf0000000,
+         0xf0000000, 0x00003c04, 0x007f0009, 0x02001fc0,
+         0x0280c007, 0xf000b040, 0x01fc0030, 0x14007f00,
+         0x0d06001f, 0xc00381c0, 0x07f000f0, 0x8001fc00,
+         0x2024007f, 0x00090a00, 0x1fc00282, 0xc007f000,
+         0xb0c001fc, 0x00303400, 0x7f000d0e, 0x001fc003,
+         0x83c007f0, 0x00f00001, 0xfc0023ff, 0xfffff800,
+         0xfffffffe, 0x003fffff, 0xff800fff, 0xffffe003,
+         0xfffffff8, 0x00ffffff, 0xfe003fff, 0xffff800f,
+         0xffffffe0, 0x03ffffff, 0xf800ffff, 0xfffe003f,
+         0xffffff80, 0x0fffffff, 0xe003ffff, 0xfff800ff,
+         0xfffffe00, 0x3fffffff, 0x800fffff, 0xffe00000,
+         0x00000000, 0x00000000, 0x00000000, 0x00000000,
+         0x6fff0000, 0x00000000, 0x60000000, 0x00000000,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xfffffc00, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xfffffc00, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffaaaa, 0xffffffff, 0xf3ffffff, 0xffffffff,
+         0xfdffffff, 0xffffffff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0xffffffff, 0xfffff9ff, 0xfe000000, 0x00000000,
+         0x00030000, 0x00000000, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+         0xffffffff, 0xffffffff },
+
+/* dcmiss 
+ *
+ * ctr0: counts store instructions retired 
+ * ctr1: counts load instructions retired
+ * ctr2: counts dmisses 
+ * ctr3: counts READ_SHARED_OR_PRIV and READ_PRIVATE transactions on Runway 
+ */
+{
+0x2c90c000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x6fffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf00000e8,0x00003c02,0x00bf0001,0x02002fc0,
+0x0080a00b,0xf0003040,0x02fc0010,0x1200bf00,
+0x0506002f,0xc00181a0,0x0bf00070,0x8002fc00,
+0x202200bf,0x00090a00,0x2fc00282,0xa00bf000,
+0xb0c002fc,0x00303200,0xbf000d0e,0x002fc003,
+0x83a00bf0,0x00ffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0x6fff0000,00000000,0x60000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0x55555555,0xd5555555,
+0x55555555,0x75555555,0x5e1ffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00100000,00000000,0xf8000000,00000000,
+00000000,00000000,0xf4000000,00000000,
+0xffffffff,0xffffffff,0x00ffffff,0xffffffff,
+00000000,00000000,0x00ffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* big_cpi
+ *
+ * ctr0: counts total cycles 
+ * ctr1: counts overflows of ctr0 (for greater than 32-bit values) 
+ * ctr2: counts overflows of ctr3 (for greater than 32-bit values) 
+ * ctr3: counts unnullified instructions retired 
+ */
+{
+0x0c00c000,00000000,0x00060000,00000000,
+0xe7e7e0e0,0x004e0004,0x07ffffff,0xffc01380,
+0x0101ffff,0xfffff104,0xe000c06a,0xafffc85c,
+0x01380010,0x1fffffff,0xff000000,00000000,
+0x01b9e000,0x0001b8c0,00000000,0x0fffff00,
+0x000fffff,00000000,00000000,0x00400000,
+0x00001000,0x00000004,00000000,0x01000000,
+0x0000ffff,0xfffffff0,00000000,0x0fffffff,
+0xffff0000,00000000,0x6fffffff,0xffffffff,
+0xfff55ff5,0xffffffff,0xffffffff,0xf0000000,
+0xf0000010,0x00003c00,0x01760008,0x00025d80,
+0x02800417,0x6000c001,0x25d80038,0x04017600,
+0x0901025d,0x8002c044,0x176000d0,0x1125d800,
+0x3c2001f6,0x08080400,0x7d820203,0x001f6080,
+0x804027d8,0x20282009,0xf6080a0c,0x027d8202,
+0x81041f60,0x80c08107,0xd8203030,0x41f6080c,
+0x04127d82,0x0382049f,0x6080e0c1,0x27d82038,
+0x4006f608,0x081011bd,0x82030400,0xef6080a1,
+0x013bd820,0x384806f6,0x00081211,0xbd800304,
+0x80ef6000,0xa1213bd8,0x003bc007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x6fff0000,00000000,0x60000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* big_ls
+ *
+ * ctr0:counts the total number of cycles for which local_stall_A1 is asserted. 
+ * ctr1: is the overflow for counter 0. 
+ * ctr2: counts IFLUSH_AV 
+ * ctr3: is the overflow for counter 2. 
+ */
+{
+0x0c000000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x0fffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x00029408,0x02f50002,0x0800bd40,
+0x0202802f,0x5000a000,0x4bd40004,0x0812f500,
+0x030804bd,0x40024281,0x2f5000b0,0x010bd400,
+0x100842f5,0x00060810,0xbd400302,0x842f5000,
+0xe0014bd4,0x00140852,0xf5000708,0x14bd4003,
+0x42852f50,0x00ff001f,0xffe003c0,0x07fff800,
+0xf001fffe,0x003c007f,0xff800f00,0x1fffe003,
+0xc007fff8,0x00f001ff,0xfe003c00,0x7fff800f,
+0x001fffe0,0x03c007ff,0xf800f001,0xfffe003c,
+0x007fff80,0x0f001fff,0xe003c007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x0df70000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* br_abort
+ *
+ * ctr0: counts BRAD_STALLH 
+ * ctr1: counts ONE_QUAD 
+ * ctr2: counts BR0_ABRT 
+ * ctr3: counts BR1_ABRT
+ */
+{
+0x0c002000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x1fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x1a250000,00000000,0x10000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff},
+
+/* isnt
+ *
+ * ctr0: counts the total number of cycles for which iside_notrans is asserted 
+ * ctr1: counts the number of times iside_notrans is asserted for 1-4 cycles 
+ * ctr2: counts the number of times iside_notrans is asserted for 5-7 cycles 
+ * ctr3: counts the number of times iside_notrans is asserted for > 7 cycles 
+ */
+{
+0x0c018000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xcfffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x00021c20,0x03ff0808,0x1800ffc4,
+0x0204003f,0xf0004280,0x0ffc6020,0x8003ff00,
+0x043800ff,0xc8020c00,0x3ff00044,0x800ffca0,
+0x210003ff,0x00045800,0xffcc0214,0x003ff000,
+0x26800ffc,0xe0218003,0xff000278,0x00ffd002,
+0x1c003ff0,0x0028800f,0xfd002200,0x03ff0001,
+0xf001fffe,0x003c007f,0xff800f00,0x1fffe003,
+0xc007fff8,0x00f001ff,0xfe003c00,0x7fff800f,
+0x001fffe0,0x03c007ff,0xf800f001,0xfffe003c,
+0x007fff80,0x0f001fff,0xe003c007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0xcdff0000,00000000,0xc0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff},
+
+/* quadrant
+ *
+ * ctr0: Total number of instructions in quadrant 0 
+ * ctr1: Total number of instructions in quadrant 1 
+ * ctr2: Total number of instructions in quadrant 2 
+ * ctr3: Total number of instructions in quadrant 3 
+ * Works only with 32-bit
+ */
+
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0x004e0004,   0x07ffffff,   0xffc01380,
+   0x0101ffff,   0xfffff004,   0xe000407f,   0xfffffffc,
+   0x01380010,   0x1fffffff,   0xff000000,   0x00000000,
+   0x00000fff,   0xff00000f,   0xffff0000,   0x0fffff00,
+   0x000fffff,   0x00000000,   0x00000000,   0x00ffffff,
+   0xffcff000,   0x0000040f,   0xfffffffc,   0xff000000,
+   0x0080ffff,   0xffffcff0,   0x0000000c,   0x0fffffff,
+   0xfcff0000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xfff55ff5,   0x5fffffff,   0xffffffff,   0xf0000000,
+   0xf00000f0,   0x00003c00,   0x007f0000,   0x01001fc0,
+   0x00408007,   0xf0002030,   0x01fc000c,   0x10007f00,
+   0x0405001f,   0xc0014180,   0x07f00060,   0x7001fc00,
+   0x1c20007f,   0x00080900,   0x1fc00242,   0x8007f000,
+   0xa0b001fc,   0x002c3000,   0x7f000c0d,   0x001fc003,
+   0x438007f0,   0x00e0f001,   0xfc003fff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffffc00,
+   0x00000000,   0x00000000,   0x00000000,   0x00000000,
+   0xffff0000,   0x00000000,   0xf0000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xfffffc00,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xfffffc00,   0x00000000,
+   0xffffffff,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0x00030000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff},
+
+/* rw_pdfet (READ_PRIV transactions)
+ *
+ * ctr0: counts address valid cycles 
+ * ctr1: counts *all* data valid cycles 
+ * ctr2: is the overflow from counter 0 
+ * ctr3: is the overflow from counter 1 
+ */
+{
+0x0c01e000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0x0000000c,0x00003c00,0x07930000,0x0041e4c0,
+0x01002079,0x3000800c,0x1e4c0030,0x00279300,
+0x010049e4,0xc0014022,0x79300090,0x0c9e4c00,
+0x34004793,0x00020051,0xe4c00180,0x24793000,
+0xa00d1e4c,0x00380067,0x93000300,0x59e4c001,
+0xc0267930,0x00b00d9e,0x4c003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00100000,00000000,0xf8000000,00000000,
+00000000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0x00ffffff,0xffffffff,
+00000000,00000000,00000000,00000000,
+0xffffffff,0xffffffff},
+
+/* rw_wdfet (WRITEBACKS)
+ *
+ * ctr0: counts address valid cycles 
+ * ctr1: counts *all* data valid cycles 
+ * ctr2: is the overflow from counter 0 
+ * ctr3: is the overflow from counter 1
+ */
+{
+0x0c01e000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0x0000000c,0x00003c00,0x07930000,0x0041e4c0,
+0x01002079,0x3000800c,0x1e4c0030,0x00279300,
+0x010049e4,0xc0014022,0x79300090,0x0c9e4c00,
+0x34004793,0x00020051,0xe4c00180,0x24793000,
+0xa00d1e4c,0x00380067,0x93000300,0x59e4c001,
+0xc0267930,0x00b00d9e,0x4c003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00100000,00000000,0x98000000,00000000,
+00000000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0x00ffffff,0xffffffff,
+00000000,00000000,00000000,00000000,
+0xffffffff,0xffffffff},
+
+/* shlib_cpi
+ *
+ * ctr0: Total number of instructions in quad 0 
+ * ctr1: Total number of CPU clock cycles in quad 0 
+ * ctr2: total instructions without nullified   
+ * ctr3: total number of CPU clock cycles 
+ */
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0x004e0004,   0x07ffffff,   0xffc01380,
+   0x0101ffff,   0xfffff004,   0xe000407f,   0xfffffffc,
+   0x01380010,   0x1fffffff,   0xff000000,   0x00000000,
+   0x00000fff,   0xff00000f,   0xffffffff,   0xffffffff,
+   0xffffffff,   0x00000000,   0x00000000,   0x00ffffff,
+   0xffcff000,   0x0000000f,   0xfffffffc,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xfff77ff5,   0x7fffffff,   0xffffffff,   0xf0000000,
+   0xf00000a0,   0x00003c00,   0x01ff0005,   0x08007fc0,
+   0x03c1001f,   0xf08030c0,   0x07fc203c,   0x4001ff08,
+   0x0118007f,   0xc003c500,   0x1ff08031,   0xc007fc00,
+   0x3fffffff,   0xf800ffff,   0xfffe003f,   0xffffff80,
+   0x0fffffff,   0xe003ffff,   0xfff800ff,   0xfffffe00,
+   0x3fffffff,   0x800fffff,   0xffe003ff,   0xfffff800,
+   0xfffffffe,   0x003fffff,   0xff800fff,   0xffffe003,
+   0xfffffff8,   0x00ffffff,   0xfe003fff,   0xffff800f,
+   0xffffffe0,   0x03ffffff,   0xf800ffff,   0xfffe003f,
+   0xffffff80,   0x0fffffff,   0xe003ffff,   0xfff800ff,
+   0xfffffe00,   0x3fffffff,   0x800fffff,   0xffe00000,
+   0x00000000,   0x00000000,   0x00000000,   0x00000000,
+   0xffff0000,   0x00000000,   0xf0000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xfffffc00,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xfffffc00,   0x00000000,
+   0xffffffff,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0x00030000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff},
+
+
+/* addr_inv_abort_alu
+ *
+ * ctr0: counts ABORT_ALU0L 
+ * ctr1: counts ABORT_ALU1L 
+ * ctr2: counts ADDR0_INVALID 
+ * ctr3: counts ADDR1_INVALID 
+ */
+
+{
+0x0c00c000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x6fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000d,0x01001fc0,
+0x03008007,0xf000f030,0x01fc0038,0x10007f00,
+0x0905001f,0xc0020180,0x07f000b0,0x7001fc00,
+0x2820007f,0x00050900,0x1fc00102,0x8007f000,
+0x70b001fc,0x00183000,0x7f00010d,0x001fc000,
+0x038007f0,0x0030f001,0xfc000bff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x65380000,00000000,0x60000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+
+
+/* brad_stall
+ *
+ * ctr0: counts the total number of cycles for which brad_stall is asserted 
+ * ctr1: counts the number of times brad_stall is asserted for 1-4 cycles 
+ * ctr2: counts the number of times brad_stall is asserted for 5-7 cycles 
+ * ctr3: counts the number of times brad_stall is asserted for > 7 cycles 
+ */
+{
+0x0c002000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x1fffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x00021c20,0x03ff0808,0x1800ffc4,
+0x0204003f,0xf0004280,0x0ffc6020,0x8003ff00,
+0x043800ff,0xc8020c00,0x3ff00044,0x800ffca0,
+0x210003ff,0x00045800,0xffcc0214,0x003ff000,
+0x26800ffc,0xe0218003,0xff000278,0x00ffd002,
+0x1c003ff0,0x0028800f,0xfd002200,0x03ff0001,
+0xf001fffe,0x003c007f,0xff800f00,0x1fffe003,
+0xc007fff8,0x00f001ff,0xfe003c00,0x7fff800f,
+0x001fffe0,0x03c007ff,0xf800f001,0xfffe003c,
+0x007fff80,0x0f001fff,0xe003c007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x1bff0000,00000000,0x10000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff},
+
+/* cntl_in_pipel
+ *
+ * ctr0: counts the total number of cycles for which cntl_in_pipel is asserted 
+ * ctr1: counts the number of times cntl_in_pipel is asserted for 1-4 cycles 
+ * ctr2: counts the number of times cntl_in_pipel is asserted for 5-7 cycles 
+ * ctr3: counts the number of times cntl_in_pipel is asserted for > 7 cycles 
+ */
+{
+0x0c006000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x3fffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x00021c00,0x03ff0808,0x1000ffc4,
+0x0206003f,0xf0004200,0x0ffc6020,0xa003ff00,
+0x043000ff,0xc8020e00,0x3ff00044,0x000ffca0,
+0x212003ff,0x00045000,0xffcc0216,0x003ff000,
+0x26000ffc,0xe021a003,0xff000270,0x00ffd002,
+0x1e003ff0,0x0028000f,0xfd002220,0x03ff0001,
+0xf001fffe,0x003c007f,0xff800f00,0x1fffe003,
+0xc007fff8,0x00f001ff,0xfe003c00,0x7fff800f,
+0x001fffe0,0x03c007ff,0xf800f001,0xfffe003c,
+0x007fff80,0x0f001fff,0xe003c007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x3fff0000,00000000,0x30000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+
+/* dsnt_xfh
+ *
+ * ctr0: counts dside_notrans 
+ * ctr1: counts xfhang 
+ * ctr2: is the overflow for ctr0 
+ * ctr3: is the overflow for ctr1 
+ */
+{
+0x0c018000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xcfffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x00030000,0x01f30000,0x00087cc0,
+0x0040041f,0x30002001,0x87cc000c,0x1001f300,
+0x0404087c,0xc0014104,0x1f300060,0x4187cc00,
+0x1c2001f3,0x00080808,0x7cc00242,0x041f3000,
+0xa08187cc,0x002c3001,0xf3000c0c,0x087cc003,
+0x43041f30,0x00e0c187,0xcc003fc0,0x07fff800,
+0xf001fffe,0x003c007f,0xff800f00,0x1fffe003,
+0xc007fff8,0x00f001ff,0xfe003c00,0x7fff800f,
+0x001fffe0,0x03c007ff,0xf800f001,0xfffe003c,
+0x007fff80,0x0f001fff,0xe003c007,0xfff800f0,
+0x01fffe00,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0xcb3f0000,00000000,0xc0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff }, 
+
+/* fet_sig1
+ *
+ * ctr0: counts ICORE_AV 
+ * ctr1: counts ITRANS_STALL 
+ * ctr2: counts SEL_PCQH 
+ * ctr3: counts OUT_OF_CONTEXT 
+ */
+{
+0x0c000000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x0fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x07c10000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff},
+
+/* fet_sig2
+ *
+ * ctr0: counts ICORE_AV  
+ * ctr1: counts IRTN_AV 
+ * ctr2: counts ADDRESS_INC 
+ * ctr3: counts ADDRESS_DEC 
+ */
+{
+0x0c000000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x0fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x06930000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* g7_1
+ *
+ * ctr0: counts HIT_RETRY0 
+ * ctr1: counts HIT_RETRY1 
+ * ctr2: counts GO_TAG_E 
+ * ctr3: counts GO_TAG_O 
+ */
+{
+0x0c00e000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x7fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x71c10000,00000000,0x70000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* g7_2
+ *
+ * ctr0: counts HIT_DM0 
+ * ctr1: counts HIT_DM1 
+ * ctr2: counts GO_STORE_E 
+ * ctr3: counts GO_STORE_O 
+ */
+{
+0x0c00e000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x7fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x72930000,00000000,0x70000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* g7_3
+ *
+ * ctr0: counts HIT_DV0 
+ * ctr1: counts HIT_DV1 
+ * ctr2: counts STBYPT_E (load bypasses from store queue) 
+ * ctr3: counts STBYPT_O
+ */
+{
+0x0c00e000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x7fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f0002,0x01001fc0,
+0x00c08007,0xf0000030,0x01fc0004,0x10007f00,
+0x0605001f,0xc001c180,0x07f00040,0x7001fc00,
+0x1420007f,0x000a0900,0x1fc002c2,0x8007f000,
+0x80b001fc,0x00243000,0x7f000e0d,0x001fc003,
+0xc38007f0,0x00c0f001,0xfc0037ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x77250000,00000000,0x70000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* g7_4
+ *
+ * ctr0: counts HIT_DIRTY0 
+ * ctr1: counts HIT_DIRTY1 
+ * ctr2: counts CA_BYP_E (quick launch) 
+ * ctr3: counts CA_BYP_O 
+ */
+{
+0x0c00e000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x7fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x7bb70000,00000000,0x70000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+
+/* mpb_labort
+ *
+ * ctr0: counts L_ABORT_ALU0L
+ * ctr1: counts L_ABORT_ALU1L 
+ * ctr2: counts MPB0H 
+ * ctr3: counts MPB1H 
+ */
+{
+0x0c00c000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffa5ffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x6fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+00000000,0x0003f800,0x007f000e,0x01001fc0,
+0x03c08007,0xf000c030,0x01fc0034,0x10007f00,
+0x0a05001f,0xc002c180,0x07f00080,0x7001fc00,
+0x2420007f,0x00060900,0x1fc001c2,0x8007f000,
+0x40b001fc,0x00143000,0x7f00020d,0x001fc000,
+0xc38007f0,0x0000f001,0xfc0007ff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x605c0000,00000000,0x60000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffaaaa,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* panic
+ *
+ * ctr0: is the overflow for counter 1 
+ * ctr1: counts traps and RFI's 
+ * ctr2: counts panic traps 
+ * ctr3: is the overflow for counter 2
+ */
+{
+0x0c002000,00000000,0x00060000,00000000,
+0xe7efe0e0,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffffc,
+0x41380030,0x1aabfff2,0x17000000,00000000,
+0x01b80000,0x3effffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,00000000,0x00400000,
+0x00001fff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x1fffffff,0xffffffff,
+0xfff7fff7,0xffffffff,0xffffffff,0xf0000000,
+0xb0000000,0x00012c04,0x05790804,0x14013e44,
+0x0008004f,0x90000040,0x15e46000,0xc0047920,
+0x004a003e,0x40011080,0x0f900024,0x4003e460,
+0x00c80479,0x00023301,0x1e400100,0x4157d080,
+0x514053f4,0x40048014,0xfd000104,0x055f4600,
+0x4c0147d2,0x0014a043,0xf4001508,0x10fd0003,
+0x44043f46,0x004c8147,0xd0003330,0x51f40014,
+0x04257908,0x0c14093e,0x44020802,0x4f900080,
+0x4095e460,0x20c02479,0x20084a08,0x3e400310,
+0x820f9000,0xa44083e4,0x6020c824,0x79000a33,
+0x091e4003,0x3c007fff,0x800f001f,0xffe00000,
+00000000,00000000,00000000,00000000,
+0x10400000,00000000,0x10000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* rare_inst
+ *
+ * ctr0: counts sync and syncdma instructions 
+ * ctr1: counts pxtlbx,x instructions 
+ * ctr2: counts ixtlbt instructions 
+ * ctr3: counts cycles 
+ */
+{
+0x0c01e000,00000000,0x00060000,00000000,
+0xe0e0e0e0,0x004e000c,0x000843fc,0x85c09380,
+0x0121ebfd,0xff217124,0xe0004000,0x943fc85f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xe00000e0,0x00003c00,0x007f0001,0x01001fc0,
+0x00408007,0xf0003030,0x01fc000c,0x10007f00,
+0x0505001f,0xc0014180,0x07f00070,0x7001fc00,
+0x1c20007f,0x00090900,0x1fc00242,0x8007f000,
+0xb0b001fc,0x002c3000,0x7f000d0d,0x001fc003,
+0x438007f0,0x00f0f001,0xfc003fff,0xfffff800,
+0xfffffffe,0x003fffff,0xff800fff,0xffffe003,
+0xfffffff8,0x00ffffff,0xfe003fff,0xffff800f,
+0xffffffe0,0x03ffffff,0xf800ffff,0xfffe003f,
+0xffffff80,0x0fffffff,0xe003ffff,0xfff800ff,
+0xfffffe00,0x3fffffff,0x800fffff,0xffe00000,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* rw_dfet (for D-cache misses and writebacks)
+ *
+ * ctr0: counts address valid cycles 
+ * ctr1: counts *all* data valid cycles 
+ * ctr2: is the overflow from counter 0 
+ * ctr3: is the overflow from counter 1 
+ */
+{
+0x0c01e000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0x0000000c,0x00003c00,0x07930000,0x0041e4c0,
+0x01002079,0x3000800c,0x1e4c0030,0x00279300,
+0x010049e4,0xc0014022,0x79300090,0x0c9e4c00,
+0x34004793,0x00020051,0xe4c00180,0x24793000,
+0xa00d1e4c,0x00380067,0x93000300,0x59e4c001,
+0xc0267930,0x00b00d9e,0x4c003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00100000,00000000,0xf0000000,00000000,
+00000000,00000000,0x98000000,00000000,
+0xffffffff,0xffffffff,0x0fffffff,0xffffffff,
+00000000,00000000,0x00ffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* rw_ifet (I-cache misses -- actually dumb READ transactions)
+ *
+ * ctr0: counts address valid cycles 
+ * ctr1: counts *all* data valid cycles 
+ * ctr2: is the overflow from counter 0 
+ * ctr3: is the overflow from counter 1 
+ */
+{
+0x0c01e000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0x0000000c,0x00003c00,0x07930000,0x0041e4c0,
+0x01002079,0x3000800c,0x1e4c0030,0x00279300,
+0x010049e4,0xc0014022,0x79300090,0x0c9e4c00,
+0x34004793,0x00020051,0xe4c00180,0x24793000,
+0xa00d1e4c,0x00380067,0x93000300,0x59e4c001,
+0xc0267930,0x00b00d9e,0x4c003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00100000,00000000,0xd0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0x00ffffff,0xffffffff,
+0xffffffff,0xffffffff,00000000,00000000,
+0xffffffff,0xffffffff },
+
+
+/* rw_sdfet (READ_SHARED_OR_PRIVATE transactions)
+ *
+ * ctr0: counts address valid cycles
+ * ctr1: counts *all* data valid cycles 
+ * ctr2: is the overflow from counter 0 
+ * ctr3: is the overflow from counter 1 
+ */
+{
+0x0c01e000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0x0000000c,0x00003c00,0x07930000,0x0041e4c0,
+0x01002079,0x3000800c,0x1e4c0030,0x00279300,
+0x010049e4,0xc0014022,0x79300090,0x0c9e4c00,
+0x34004793,0x00020051,0xe4c00180,0x24793000,
+0xa00d1e4c,0x00380067,0x93000300,0x59e4c001,
+0xc0267930,0x00b00d9e,0x4c003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00100000,00000000,0xf4000000,00000000,
+00000000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0x00ffffff,0xffffffff,
+00000000,00000000,00000000,00000000,
+0xffffffff,0xffffffff },
+
+
+/* spec_ifet
+ *
+ * ICORE_AV fires for every request which the Instruction Fetch Unit sends
+ * to the Runway Interface Block.  Hence, this counts all I-misses, speculative
+ * or not, but does *not* include I-cache prefetches, which are generated by
+ * RIB.
+ * IRTN_AV fires twice for every I-cache miss returning from RIB to the IFU.
+ * It will not fire if a second I-cache miss is issued from the IFU to RIB
+ * before the first returns.  Therefore, if the IRTN_AV count is much less
+ * than 2x the ICORE_AV count, many speculative I-cache misses are occuring
+ * which are "discovered" to be incorrect fairly quickly.
+ * The ratio of I-cache miss transactions on Runway to the ICORE_AV count is
+ * a measure of the effectiveness of instruction prefetching.  This ratio
+ * should be between 1 and 2.  If it is close to 1, most prefetches are
+ * eventually called for by the IFU; if it is close to 2, almost no prefetches
+ * are useful and they are wasted bus traffic.
+ *
+ * ctr0: counts ICORE_AV 
+ * ctr1: counts IRTN_AV 
+ * ctr2: counts all non-coherent READ transactions on Runway. (TTYPE D0) 
+ *	This should be just I-cache miss and I-prefetch transactions.
+ * ctr3: counts total processor cycles 
+ */
+{
+0x0c000000,00000000,0x00060000,00000000,
+0xefefefef,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0x0fffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0x00000008,0x00030c00,0x01bf0001,0x00806fc0,
+0x00c1001b,0xf0005048,0x06fc001c,0x2001bf00,
+0x0908806f,0xc002c300,0x1bf000d0,0xc806fc00,
+0x3fffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0x06bf0000,00000000,00000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00110000,00000000,0xd0ffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0x00ffffff,0xffffffff,
+0xffffffff,0xffffffff,00000000,00000000,
+0xffffffff,0xffffffff },
+
+/* st_cond0
+ *
+ * ctr0: is the overflow for ctr1
+ * ctr1: counts major ops 0C and 0E (fp ops, not fmac or fmpyadd) 
+ * ctr2: counts B,L (including long and push) and GATE (including nullified),
+ *	 predicted not-taken
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0e0c0e0,0xffffffff,0xffffffff,0xffc13380,
+0x0101ffff,0xffa1f057,0xe000407f,0xdfffc87f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* st_cond1
+ *
+ * ctr0: is the overflow for ctr1 
+ * ctr1: counts major ops 1x (most of the load/stores) 
+ * ctr2: counts CMPB (dw) predicted not-taken 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0e0c0e0,0xffffffff,0xffffffff,0xffc01b80,
+0x0101ffff,0xffb7f03d,0xe000407f,0xffffc8ff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* st_cond2
+ *
+ * ctr0: is the overflow for ctr1 
+ * ctr1: counts major op 03 
+ * ctr2: counts CMPIB (dw) predicted not taken. 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0e0c0e0,0xffffffff,0xffffffff,0xffc09780,
+0x0101ffff,0xff21f077,0xe000407f,0xffffc87f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* st_cond3
+ *
+ * ctr0: is the overflow for ctr1 
+ * ctr1: counts major ops 06 & 26 
+ * ctr2: counts BB, BVB, MOVB, MOVIB (incl. nullified) predicted not-taken 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0e0c0e0,0xffffffff,0xffffffff,0xffc03780,
+0x0101ffff,0xff29f016,0xe000407f,0xffffe97f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* st_cond4
+ *
+ * ctr0: is the overflow for ctr1 
+ * ctr1: counts major op 2E 
+ * ctr2: counts CMPB, CMPIB, ADDB, ADDIB (incl. nullified) predicted not-taken 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0e0c0e0,0xffffffff,0xffffffff,0xffc17780,
+0x0101ffff,0xff21f014,0xe000407f,0xffffe9ff,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* st_unpred0
+ *
+ * ctr0: is the overflow for ctr1 
+ * ctr1: counts BE and BE,L 
+ * ctr2: counts BE and BE,L including nullified 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0c0c0e0,0xffffffff,0xffffffff,0xffdf5bbf,
+0xffffffff,0xff25f7d6,0xefffffff,0xffffc97f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* st_unpred1
+ *
+ * ctr0: is the overflow for ctr1 
+ * ctr1: counts BLR, BV, BVE, BVE,L 
+ * ctr2: counts BLR, BV, BVE, BVE,L including nullified 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0x4c01e000,00000000,0x00060000,00000000,
+0xe0c0c0e0,0xffffffff,0xffffffff,0xffc15f80,
+0x0501ff7f,0xff21f057,0xe001407f,0xdfffc87f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf0000060,0x00003c00,0x04f90000,0x02013e40,
+0x0081004f,0x90004060,0x13e40018,0x0024f900,
+0x0802093e,0x40028102,0x4f9000c0,0x6093e400,
+0x380014f9,0x00010205,0x3e4000c1,0x014f9000,
+0x506053e4,0x001c0034,0xf9000902,0x0d3e4002,
+0xc1034f90,0x00d060d3,0xe4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+
+/* unpred
+ *
+ * ctr0: counts non-nullified unpredictable branches 
+ * ctr1: is the overflow for ctr0 
+ * ctr2: counts all unpredictable branches (nullified or not) 
+ * ctr3: is the overflow for ctr2 
+ */
+{
+0xcc01e000,00000000,0x00060000,00000000,
+0x20202020,0xff31ffff,0xfff7fffe,0x97ffcc7f,
+0xfffffdff,0xffa5fff3,0x1fffffff,0x7fffe97f,
+0xffffffff,0xffffffff,0xff000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffff0000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xf0000000,
+0xf00000a0,0x00003c00,0x02f50000,0x0004bd40,
+0x0040802f,0x50002020,0x4bd4000c,0x0042f500,
+0x040014bd,0x40014084,0x2f500060,0x214bd400,
+0x1c2002f5,0x00080804,0xbd400242,0x802f5000,
+0xa0a04bd4,0x002c2042,0xf5000c08,0x14bd4003,
+0x42842f50,0x00e0a14b,0xd4003fff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xfffffc00,
+00000000,00000000,00000000,00000000,
+0xffff0000,00000000,0xf0000000,00000000,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xfffffc00,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xfffffc00,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xffffffff,0xf3ffffff,0xffffffff,
+0xfdffffff,0xffffffff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0xffffffff,0xfffff9ff,0xfe000000,00000000,
+0x00030000,00000000,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff,0xffffffff,0xffffffff,
+0xffffffff,0xffffffff },
+   
+
+/* go_store
+ *
+ * ctr0: Overflow for counter 2 
+ * ctr1: Overflow for counter 3 
+ * ctr2: count of GO_STORE_E signal 
+ * ctr3: count of GO_STORE_O signal 
+ */
+
+   {
+   0x0c00e000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffa5ffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xff000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x7fffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xf0000000,
+   0x00000000,   0x0000c000,   0x067c0000,   0x01019f00,
+   0x00408067,   0xc0002030,   0x19f0000c,   0x000e7c00,
+   0x0401039f,   0x00014080,   0xe7c00060,   0x3039f000,
+   0x1c00167c,   0x00080105,   0x9f000240,   0x8167c000,
+   0xa03059f0,   0x002c001e,   0x7c000c01,   0x079f0003,
+   0x4081e7c0,   0x00e03079,   0xf0003fc0,   0x07fff800,
+   0xf001fffe,   0x003c007f,   0xff800f00,   0x1fffe003,
+   0xc007fff8,   0x00f001ff,   0xfe003c00,   0x7fff800f,
+   0x001fffe0,   0x03c007ff,   0xf800f001,   0xfffe003c,
+   0x007fff80,   0x0f001fff,   0xe003c007,   0xfff800f0,
+   0x01fffe00,   0x3c007fff,   0x800f001f,   0xffe00000,
+   0x00000000,   0x00000000,   0x00000000,   0x00000000,
+   0x70130000,   0x00000000,   0x70000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xfffffc00,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xfffffc00,   0x00000000,
+   0xffffaaaa,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffaaaa,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0x00030000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff
+   },
+
+
+/* shlib_call
+ *
+ * ctr0: SharedLib call Depth1 
+ * ctr1: SharedLib call Depth2 
+ * ctr2: SharedLib call Depth3 
+ * ctr3: SharedLib call Depth>3 
+ */
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0xc76fa005,   0x07dd7e9c,   0x87115b80,
+   0x01100200,   0x07200004,   0xe000407f,   0xfffffffc,
+   0x01380010,   0x1fffffff,   0xff000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xf0000000,
+   0xf0000000,   0x00003c20,   0x01ff0808,   0x04007fc0,
+   0x0003001f,   0xf0000180,   0x07fc4010,   0x5001ff00,
+   0x001c007f,   0xc2000a00,   0x1ff18022,   0x4007fc20,
+   0x00b001ff,   0x10003800,   0x7fc8004d,   0x001ff100,
+   0x03c007fc,   0x60012001,   0xff280144,   0x007fc600,
+   0x13001ff2,   0x00058007,   0xfcc00550,   0x01ff2000,
+   0x5c007fca,   0x001a001f,   0xf3801640,   0x07fca001,
+   0xb001ff30,   0x0078007f,   0xd0005d00,   0x1ff30007,
+   0xc007fce0,   0x022001ff,   0x48018400,   0x7fce0023,
+   0x001ff400,   0x098007fd,   0x20065001,   0xff40009c,
+   0x007fd200,   0x3fffffff,   0x800fffff,   0xffe00000,
+   0x00000000,   0x00000000,   0x00000000,   0x00000000,
+   0xffff0000,   0x00000000,   0xf0000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xfffffc00,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xfffffc00,   0x00000000,
+   0xffffffff,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xf3ffffff,   0xffffffff,
+   0xfdffffff,   0xffffffff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0xffffffff,   0xfffff9ff,   0xfe000000,   0x00000000,
+   0x00030000,   0x00000000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff
+   }
+};
+#define PCXW_IMAGE_SIZE 576
+
+static uint32_t cuda_images[][PCXW_IMAGE_SIZE/sizeof(uint32_t)] = {
+/*
+ * CPI:     FROM CPI.IDF (Image 0)
+ *
+ * Counts the following:
+ *
+ * ctr0 : total cycles
+ * ctr1 : total cycles where nothing retired
+ * ctr2 : total instructions retired, including nullified
+ * ctr3 : total instructions retired, less nullified instructions
+ */
+   {
+   0x4c00c000,   0x00000000,   0x00060000,   0x00000000, 
+   0xe0e0e0e0,   0x00001fff,   0xfc00007f,   0xfff00001, 
+   0xffffc000,   0x07ffff00,   0x07ffffff,   0x6007ffff, 
+   0xff0007ff,   0xffff0007,   0xffffff00,   0x00000000, 
+   0x60f00000,   0x0fffff00,   0x000fffff,   0x00000fff, 
+   0xff00000f,   0xffff0000,   0x00000000,   0x00ffffff, 
+   0xfffff000,   0x0000000f,   0xffffffff,   0xff000000, 
+   0x0000ffff,   0xfffffff0,   0x00000000,   0x0fffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0x00270000,   0x00000055, 
+   0x0200000e,   0x4d300000,   0x00000000,   0x0ff00002, 
+   0x70000000,   0x00000020,   0x0000e400,   0x00000ff0, 
+   0x00000000,   0x00000000,   0x00000055,   0xffffff00, 
+   0x00000000,   0x0000ff00,   0x00000000,   0x0f000000, 
+   0x0000055f,   0xfffff000,   0x00000000,   0x000ff000, 
+   0x00000000,   0x00000000,   0x000055ff,   0xffff0000, 
+   0x00000000,   0x00ff0000,   0x00000000,   0xf0000000, 
+   0x000055ff,   0xffff0000,   0x00000000,   0x00ff0000, 
+   0x00000000,   0x00000000,   0x00055fff,   0xfff00000, 
+   0x00000000,   0x0ff00000,   0x00000030,   0x00000000, 
+   0x00157fff,   0xffc00000,   0x034c0000,   0x00000000, 
+   0x03fc0000,   0x00000000,   0x6fff0000,   0x00000000, 
+   0x60000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff7fbfc,   0x00000000,   0xffffafff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffafff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* Bus utilization image   FROM BUS_UTIL.IDF (Image 1)
+ *
+ * ctr0 : counts address valid cycles
+ * ctr1 : counts data valid cycles
+ * ctr2 : counts overflow from counter 0
+ * ctr3 : counts overflow from counter 1
+ */
+         {
+	 0x0c01e000, 0x00000000, 0x00060000, 0x00000000,
+	 0xefefefef, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffff00, 0x00000000,
+	 0xf0ffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffff0000, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffff0000, 0x00000000, 0x00000000, 0x00000000,
+	 0x00000000, 0x00000000, 0x00001b00, 0xaa000000,
+	 0x00000001, 0x30700000, 0x00055aaf, 0xf0000000,
+	 0x01b00000, 0x00000000, 0x00001037, 0x00000000,
+	 0x55aaff00, 0x00c00000, 0x1b55aa00, 0x00000000,
+	 0x0001fff0, 0xcfffff00, 0x00000000, 0x0f0fffff,
+	 0xffffffff, 0xffffffff, 0x30ffff0c, 0xfffff000,
+	 0x00000000, 0x00ffffff, 0xffffffff, 0xfffffff3,
+	 0x0ffff0cf, 0xffff0000, 0x00000000, 0x00ffffff,
+	 0xffffffff, 0xfffffff3, 0x0ffff0cf, 0xffff0000,
+	 0x00000000, 0x0fffffff, 0xffffffff, 0xffffff30,
+	 0xfff70000, 0x000055aa, 0xff000000, 0x000006d5,
+	 0x40000000, 0x00000000, 0x731c0000, 0x000156ab,
+	 0xfc000000, 0x00000000, 0xffff0000, 0x00000000,
+	 0xf0000000, 0x00000000, 0x00ffffff, 0xff3fffff,
+	 0xffffffff, 0xffcfffff, 0xfff7fbfc, 0x00000000,
+	 0x00ffffff, 0xff3fffff, 0xffffffff, 0xffcfffff,
+	 0xfff7fbfc, 0x00000000, 0xffffffff, 0xffffff3f,
+	 0xffffffff, 0xffffff7f, 0xffffffff, 0xfffffefc,
+	 0x00000000, 0x00000000, 0xffffffff, 0xffffff3f,
+	 0xffffffff, 0xffffff7f, 0xffffffff, 0xfffffefc,
+	 0x00000000, 0x00000000, 0xffffffff, 0xfffff9ff,
+	 0xfe000000, 0x00000000, 0xffffffff, 0xfffff9ff,
+	 0xfe000000, 0x00000000, 0x00100000, 0x00000000,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+	 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+   },
+
+/*
+ * TLB counts:    FROM TLBSTATS.IDF (Image 2)
+ *
+ * Counts the following:
+ *
+ * ctr0: DTLB misses
+ * ctr1: ITLB misses
+ * ctr2: total cycles in the miss handlers
+ * ctr3: total cycles
+ */
+
+   {
+   0x0c00c000,   0x00000000,   0x00060000,   0x00000000, 
+   0xe7e7e0e0,   0x00001fff,   0xfc00007f,   0xfff00001, 
+   0xfff00000,   0x07ffff00,   0x07ffffff,   0x6007ffff, 
+   0xa00007ff,   0xffff0007,   0xffffff00,   0x00000000, 
+   0x603001c1,   0xe0000001,   0xc0c00000,   0x00000fff, 
+   0xff00000f,   0xffff0000,   0x00000000,   0x00400000, 
+   0x00001000,   0x00000004,   0x00000000,   0x01000000, 
+   0x0000ffff,   0xfffffff0,   0x00000000,   0x0fffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0x00800000,   0x00153f7f, 
+   0x55000000,   0xaf800000,   0xc0000000,   0x0403f240, 
+   0x00000000,   0x00001010,   0x00004700,   0x00000ff0, 
+   0x00000000,   0x00000000,   0x00000055,   0xffffff00, 
+   0x00000000,   0x0000ff00,   0x00000000,   0x0f000000, 
+   0x0000055f,   0xfffff000,   0x00000000,   0x000ff000, 
+   0x00000000,   0x00000000,   0x000055ff,   0xffff0000, 
+   0x00000000,   0x00ff0000,   0x00000000,   0xf0000000, 
+   0x000055ff,   0xffff0000,   0x00000000,   0x00ff0000, 
+   0x00000000,   0x00000000,   0x00055fff,   0xfff00000, 
+   0x00000000,   0x0ff00000,   0x00000000,   0x00000000, 
+   0x00157fff,   0xffc00000,   0x00000000,   0x3fc00000, 
+   0x00040000,   0x00000000,   0x6fff0000,   0x00000000, 
+   0x60000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff7fbfc,   0x00000000,   0xffffafff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffafff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* tlbhandler  FROM tlbHandMiss.idf (Image 3)
+ *
+ * ctr0: TLB misses
+ * ctr1: dmisses inside the TLB miss handler
+ * ctr2: cycles in the TLB miss handler
+ * ctr3: overflow of ctr2
+ */
+   {
+   0x1c00c000,   0x00000000,   0x00060000,   0x00000000, 
+   0xe7e7e0e0,   0x00001fff,   0xfc00007f,   0xfff00001, 
+   0xfff00000,   0x07ffff00,   0x07ffffff,   0x6007ffff, 
+   0xa00007ff,   0xffff0007,   0xffffff00,   0x00000000, 
+   0x603001c1,   0xe0000001,   0xc0c00000,   0x00000fff, 
+   0xff00000f,   0xffff0000,   0x00000000,   0x00400000, 
+   0x00001000,   0x00000004,   0x00000000,   0x01000000, 
+   0x0000ffff,   0xfffffff0,   0x00000000,   0x0fffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0x006c0000,   0x01000054, 
+   0x02000002,   0xc3200000,   0xc00aa000,   0x0c03f240, 
+   0x00000000,   0x00001010,   0x000044f4,   0x00000c00, 
+   0xaa0000f0,   0x0f0000b0,   0x00005005,   0x0f5f0000, 
+   0x0001f000,   0x0000ff00,   0x00000000,   0x0f000000, 
+   0x0000055f,   0xfffff000,   0x00000000,   0x000ff000, 
+   0x00000000,   0x00000000,   0x000055ff,   0xffff0000, 
+   0x00000000,   0x00ff0000,   0x00000000,   0xf0000000, 
+   0x000055ff,   0xffff0000,   0x00000000,   0x00ff0000, 
+   0x00000000,   0x00000000,   0x00055fff,   0xfff00000, 
+   0x00000000,   0x0ff00a00,   0x000f0000,   0x24004000, 
+   0x15400001,   0x40c00003,   0x3da00000,   0x0002a800, 
+   0x00ff0000,   0x00000000,   0x6fff0000,   0x00000000, 
+   0x60000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff7fbfc,   0x00000000,   0xffffafff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffafff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* branch_taken image  FROM PTKN.IDF (Image 4)
+ *
+ * ctr0: mispredicted branches
+ * ctr1: predicted taken branches, actually taken
+ * ctr2: predicted taken branches (includes nullfied)
+ * ctr3: all branches
+ */
+
+   {
+   0xcc01e000,   0x00000000,   0x00000000,   0x00000000, 
+   0xa08080a0,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xfffffeff,   0xfffeffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf4ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xd22d0000,   0x00000000, 
+   0x0000000b,   0x46000000,   0x00000000,   0x0ffff900, 
+   0x90000000,   0x00000000,   0x0000907e,   0x00000000, 
+   0x000000ff,   0xff00bfdf,   0x03030303,   0x03030000, 
+   0x000dbfff,   0xffffff00,   0x00000000,   0x0f0fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffff5555,   0x55500000,   0x003f3ff0,   0x2766c000, 
+   0x00000000,   0x00000002,   0x67840000,   0x00000000, 
+   0x03fffc00,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* branch_nottaken  FROM PNTKN.IDF (Image 5)
+ *
+ * ctr0: mispredicted branches
+ * ctr1: branches predicted not-taken, but actually taken
+ * ctr2: branches predicted not-taken (includes nullified)
+ * ctr3: all branches
+ */
+   {
+   0xcc01e000,   0x00000000,   0x00000000,   0x00000000, 
+   0xe0c0c0e0,   0xffffffff,   0xffffffff,   0xffefffff, 
+   0xffffbfff,   0xfffffeff,   0xfffeffff,   0xfffffeff, 
+   0xfffffffe,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf4ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xd22d0000,   0x00000000, 
+   0x0000000b,   0x46000000,   0x00000000,   0x0ffff900, 
+   0x90000000,   0x00000000,   0x0000907e,   0x00000000, 
+   0x000000ff,   0xff00bfdf,   0x03030303,   0x03030000, 
+   0x000dbfff,   0xffffff00,   0x00000000,   0x0f0fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffff5555,   0x55500000,   0x003f3ff0,   0x2766c000, 
+   0x00000000,   0x00000002,   0x67840000,   0x00000000, 
+   0x03fffc00,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+   
+/* IMISS image (Image 6)
+ *
+ * ctr0 : icache misses for retired instructions
+ * ctr1 : total cycles
+ * ctr2 : dcache misses for retired instructions
+ * ctr3 : number of retired instructions
+ */
+   {
+   0x2801e000,   0x00000000,   0x00010000,   0x00000000, 
+   0x00001000,   0xffffffff,   0xffffffff,   0xfff00fff, 
+   0xfffa3fff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xf2fdf0f0,   0xf0f0f0f0, 
+   0xffffffff,   0xf6c00000,   0x00000000,   0x0ff55800, 
+   0x90000000,   0x00000000,   0x0000b0ff,   0xfffffff0, 
+   0x00000003,   0x0100bfff,   0x3f3f3f3f,   0x3f3f5555, 
+   0x555fffff,   0xffffff00,   0x00000000,   0x000fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xfff00000,   0x000301b0,   0x2fefcfcf, 
+   0xcfcfcfcf,   0xd5555557,   0xf7b40000,   0x00000000, 
+   0x03c14000,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* DMISS image (Image 7)
+ *
+ * ctr0 : icache misses for retired instructions
+ * ctr1 : total cycles
+ * ctr2 : dcache misses for retired instructions
+ * ctr3 : number of retired instructions
+ */
+   {
+   0x2801e000,   0x00000000,   0x00010000,   0x00000000, 
+   0x00001000,   0xffffffff,   0xffffffff,   0xfff00fff, 
+   0xfffa3fff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xf2fdf0f0,   0xf0f0f0f0, 
+   0xffffffff,   0xf6c00000,   0x00000000,   0x0ff55800, 
+   0x90000000,   0x00000000,   0x0000b0ff,   0xfffffff0, 
+   0x00000003,   0x0100bfff,   0x3f3f3f3f,   0x3f3f5555, 
+   0x555fffff,   0xffffff00,   0x00000000,   0x000fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xfff00000,   0x000301b0,   0x2fefcfcf, 
+   0xcfcfcfcf,   0xd5555557,   0xf7b40000,   0x00000000, 
+   0x03c14000,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* dmiss_access image    FROM DMISS_RATIO.IDF  (Image 8)
+ * 
+ * ctr0 : all loads and stores that retire (even lines)
+ * ctr1 : all loads and stores that retire (odd lines)
+ * ctr2 : dcache misses of retired loads/stores
+ * ctr3 : all READ_PRIV and READ_SHAR_OR_PRIV on Runway
+ *        (Speculative and Non-Speculative)
+ */
+   {
+   0x2d81e000,   0x00000000,   0x00000000,   0x00000000, 
+   0x10101010,   0x00ffffff,   0xa003ffff,   0xfe800fff, 
+   0xfffa003f,   0xffffe8ff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xd2280a00,   0x00000000, 
+   0x0000000b,   0x46000000,   0x00000005,   0x555ff900, 
+   0x80200000,   0x00000000,   0x0000907e,   0x00000000, 
+   0x00005555,   0xff80bf8b,   0xab030303,   0x03030000, 
+   0x000dbfff,   0xffffff00,   0x00000000,   0x000fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffff5555,   0x55500000,   0x15153fe0,   0x27628880, 
+   0x00000000,   0x00000002,   0x67840000,   0x00000001, 
+   0x5557fc00,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00110000,   0x00000000, 
+   0xf4ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xf8ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0x00ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0x00ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+
+/* big_cpi image  (Image 9)
+ * 
+ * ctr0 : Total number of CPU clock cycles. 
+ * ctr1 : Unused 
+ * ctr2 : Unused
+ * ctr3 : Total number of Non-Nullified instructions retired. 
+ */
+   {
+   0x0c00c000,   0x00000000,   0x00060000,   0x00000000,
+   0xe7e7e0e0,   0x00001fff,   0xfc00007f,   0xfff00001,
+   0xfff00000,   0x07ffff00,   0x07ffffff,   0x6007ffff,
+   0xa00007ff,   0xffff0007,   0xffffff00,   0x00000000,
+   0x603001c1,   0xe0000001,   0xc0c00000,   0x00000fff,
+   0xff00000f,   0xffff0000,   0x00000000,   0x00400000,
+   0x00001000,   0x00000004,   0x00000000,   0x01000000,
+   0x0000ffff,   0xfffffff0,   0x00000000,   0x0fffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x00550005,   0x00220000,
+   0x0000000c,   0x71f00000,   0x00f00aa0,   0x0aaff000,
+   0x00005002,   0x20000000,   0x0000c413,   0x00000c0f,
+   0x00aa0000,   0xff00b600,   0x000500a0,   0x00000300,
+   0x000cc3f0,   0x0000c0f0,   0x0aa0000f,   0xff000000,
+   0x011000a0,   0x05503000,   0x00d03700,   0x00000f00,
+   0xaa005500,   0x00000000,   0x000055ff,   0xffff0000,
+   0x00000000,   0x00ff0000,   0x00000000,   0xf000aa00,
+   0x11000a00,   0x55000000,   0x0d037000,   0x00c0f00a,
+   0xa0055000,   0x0db00005,   0x5002a000,   0x00300000,
+   0xf40f0000,   0x0c0f00aa,   0x0000ff10,   0x27400000,
+   0x00008000,   0x00c00003,   0x037c0000,   0x003c02a8,
+   0x02abfc00,   0x00000000,   0x6fff0000,   0x00000000,
+   0x60000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffafff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffafff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* big_ls image  (Image 10)
+ * 
+ * ctr0 : Total number of CPU clock cycles during which local_stall_A1 is asserted 
+ * ctr1 : Overflow of Counter 0 
+ * ctr2 : Total number of IFLUSH_AV 
+ * ctr3 : Overflow of Counter 2 
+ */
+   {
+   0x0c000000,   0x00000000,   0x00060000,   0x00000000,
+   0xefefefef,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0x00ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x28880001,   0x54000000,
+   0x00000004,   0xb6200000,   0x000aaaa0,   0x05555288,
+   0x80000010,   0x00000000,   0x0000486e,   0x00000000,
+   0xaaaa0055,   0x55002888,   0x00545401,   0x03030000,
+   0x0007b000,   0x0000ff00,   0x00000000,   0x05000000,
+   0x0000055f,   0xfffff000,   0x00000000,   0x000ff000,
+   0x00000000,   0x00000000,   0x000055ff,   0xffff0000,
+   0x00000000,   0x00ff0000,   0x00000000,   0x00000000,
+   0x000055ff,   0xffff0000,   0x00000000,   0x00ff0000,
+   0x00000000,   0xa0000000,   0x00055fff,   0xfff00000,
+   0x00aa0000,   0x05502a2a,   0x00151500,   0x0a220015,
+   0x40400000,   0x00000001,   0xe2980000,   0x0002aaa8,
+   0x01555400,   0x00000000,   0x0df70000,   0x00000000,
+   0x00000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* br_abort image  (Image 12)
+ * 
+ * ctr0 : Total number of BRAD_STALLH
+ * ctr1 : Total number of ONE_QUAD
+ * ctr2 : Total number of BR0_ABRT
+ * ctr3 : Total number of BR1_ABRT
+ */
+
+   {
+   0x0c002000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0xffffffff,   0xffffffff,   0xff0fffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0x1077ffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x551b0000,   0x00000000,
+   0x0000000c,   0xd4f00000,   0x00000000,   0x0ffff001,
+   0xb0000000,   0x00000000,   0x0000fd4c,   0x00000000,
+   0x000000ff,   0xff00ff1b,   0x00000000,   0x00000000,
+   0x0000d000,   0x0000ff00,   0x00000000,   0x0e0fffff,
+   0xffffffff,   0xfffff000,   0x00000000,   0x000ff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffff0000,
+   0x00000000,   0x00ff0000,   0x00000000,   0x00ffffff,
+   0xffffffff,   0xffff0000,   0x00000000,   0x00ff0000,
+   0x00000000,   0xffffffff,   0xffffffff,   0xfff00000,
+   0x00400000,   0x00000000,   0x00ffff00,   0x2a86c000,
+   0x00000000,   0x00000000,   0xf50c0000,   0x00000000,
+   0x03fffc00,   0x00000000,   0x1a250000,   0x00000000,
+   0x10000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffafff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffafff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+
+/* isnt image  (Image 13)
+ * 
+ * ctr0 : Total number of cycles for which iside_notrans is asserted. 
+ * ctr1 : Total number of times iside_notrans is asserted for 1-4 cycles. 
+ * ctr2 : Total number of times iside_notrans is asserted for 5-7 cycles. 
+ * ctr3 : Total number of times iside_notrans is asserted for > 7 cycles. 
+ */
+
+   {
+   0x0c018000,   0x00000000,   0x00060000,   0x00000000,
+   0xefefefef,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0xc0ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x22000000,   0x000001bc,
+   0x10000006,   0x00900000,   0x50000000,   0x00055a20,
+   0x00000000,   0x00016060,   0x0000c021,   0x00000540,
+   0x00000000,   0x55002200,   0x00000000,   0x56bc4000,
+   0x00048000,   0x0000ff00,   0x00000000,   0x17000000,
+   0x0000055f,   0xfffff000,   0x00000000,   0x000ff000,
+   0x00000000,   0x00000000,   0x000055ff,   0xffff0000,
+   0x00000000,   0x00ff0000,   0x00000000,   0x00000000,
+   0x000055ff,   0xffff0000,   0x00000000,   0x00ff0000,
+   0x00000000,   0x80000000,   0x00015bf3,   0xf5500000,
+   0x02210000,   0x00100000,   0x00005500,   0x08800000,
+   0x00001545,   0x85000001,   0x80240000,   0x11000000,
+   0x00015400,   0x00000000,   0xcdff0000,   0x00000000,
+   0xc0000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* quadrant image  (image 14)
+ * 
+ * ctr0 : Total number of instructions in quadrant 0. 
+ * ctr1 : Total number of instructions in quadrant 1. 
+ * ctr2 : Total number of instructions in quadrant 2. 
+ * ctr3 : Total number of instructions in quadrant 3. 
+ *
+ * Only works for 32-bit applications.
+ */
+
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0x00001fff,   0xfc00007f,   0xfff00001,
+   0xffffc000,   0x07ffff00,   0x07ffffff,   0x0007ffff,
+   0xff0007ff,   0xffff0007,   0xffffff00,   0x00000000,
+   0xf0000000,   0x0fffff00,   0x000fffff,   0x00000fff,
+   0xff00000f,   0xffff0000,   0x00000000,   0x00ffffff,
+   0xffcff000,   0x0000040f,   0xfffffffc,   0xff000000,
+   0x0080ffff,   0xffffcff0,   0x0000000c,   0x0fffffff,
+   0xfcff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x551b0000,   0x00000000,
+   0x00000003,   0x17000000,   0x00000000,   0x0ffff001,
+   0xb0000000,   0x00000000,   0x00000173,   0x00000000,
+   0x000000ff,   0xff00ff1b,   0x00000000,   0x00000000,
+   0x000f1ff0,   0xcfffff00,   0x00000000,   0x0f0fffff,
+   0xffffffff,   0xffffffff,   0x30ffff0c,   0xfffff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xfffffff3,
+   0x0ffff0cf,   0xffff0000,   0x00000000,   0xf0ffffff,
+   0xffffffff,   0xfffffff3,   0x0ffff0cf,   0xffff0000,
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffff30,
+   0xff7f0000,   0x00000000,   0x00fffff0,   0x2a86c000,
+   0x00000000,   0x00000003,   0x05f00000,   0x00000000,
+   0x03fffc00,   0x00000000,   0xffff0000,   0x00000000,
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* rw_pdfet image (Image 15)
+ * 
+ * ctr0 : Total of all READ_PRIV address valid cycles. 
+ * ctr1 : Total of all READ_PRIV data valid cycles. 
+ * ctr2 : Overflow of Counter 0. 
+ * ctr3 : Overflow of Counter 1. 
+ */
+
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xefefefef,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x00001b00,   0xaa000000,
+   0x00000001,   0x30700000,   0x00055aaf,   0xf0000000,
+   0x01b00000,   0x00000000,   0x00001037,   0x00000000,
+   0x55aaff00,   0x00c00000,   0x1b55aa00,   0x00000000,
+   0x0001fff0,   0xcfffff00,   0x00000000,   0x0f0fffff,
+   0xffffffff,   0xffffffff,   0x30ffff0c,   0xfffff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xfffffff3,
+   0x0ffff0cf,   0xffff0000,   0x00000000,   0x00ffffff,
+   0xffffffff,   0xfffffff3,   0x0ffff0cf,   0xffff0000,
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffff30,
+   0xfff70000,   0x000055aa,   0xff000000,   0x000006d5,
+   0x40000000,   0x00000000,   0x731c0000,   0x000156ab,
+   0xfc000000,   0x00000000,   0xffff0000,   0x00000000,
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00100000,   0x00000000,
+   0xf8000000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffffff,
+   0x00ffffff,   0xffffffff,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffffff,
+   },
+
+
+/* rw_wdfet image  (Image 16)
+ * 
+ * ctr0 : Counts total number of writeback transactions. 
+ * ctr1 : Total number of data valid Runway cycles. 
+ * ctr2 : Overflow of Counter 0. 
+ * ctr3 : Overflow of Counter 1. 
+ */
+
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xefefefef,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x00001b00,   0xaa000000,
+   0x00000001,   0x30700000,   0x00055aaf,   0xf0000000,
+   0x01b00000,   0x00000000,   0x00001037,   0x00000000,
+   0x55aaff00,   0x00c00000,   0x1b55aa00,   0x00000000,
+   0x0001fff0,   0xcfffff00,   0x00000000,   0x0f0fffff,
+   0xffffffff,   0xffffffff,   0x30ffff0c,   0xfffff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xfffffff3,
+   0x0ffff0cf,   0xffff0000,   0x00000000,   0x00ffffff,
+   0xffffffff,   0xfffffff3,   0x0ffff0cf,   0xffff0000,
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffff30,
+   0xfff70000,   0x000055aa,   0xff000000,   0x000006d5,
+   0x40000000,   0x00000000,   0x731c0000,   0x000156ab,
+   0xfc000000,   0x00000000,   0xffff0000,   0x00000000,
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00100000,   0x00000000,
+   0x98000000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffffff,
+   0x00ffffff,   0xffffffff,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffffff,
+   },
+
+/* shlib_cpi image  (Image 17)
+ * 
+ * ctr0 : Total number of instructions in quadrant 0. 
+ * ctr1 : Total number of CPU clock cycles in quadrant 0. 
+ * ctr2 : Total number of Non-Nullified instructions retired. 
+ * ctr3 : Total number of CPU clock cycles. 
+ *
+ * Only works for 32-bit shared libraries.
+ */
+
+   {
+   0x0c01e000,   0x00000000,   0x00060000,   0x00000000,
+   0xe0e0e0e0,   0x00001fff,   0xfc00007f,   0xfff00001,
+   0xffffc000,   0x07ffff00,   0x07ffffff,   0x0007ffff,
+   0xff0007ff,   0xffff0007,   0xffffff00,   0x00000000,
+   0xf0150000,   0x0fffff00,   0x000fffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0x00000000,   0x00ffffff,
+   0xffcff000,   0x0000000f,   0xfffffffc,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0x27000000,   0x00000055,
+   0x02000005,   0x7f500000,   0xc0000000,   0x000ff270,
+   0x00000000,   0x00000000,   0x00007700,   0x00000ff0,
+   0x00000000,   0x0000ffff,   0xffffffff,   0xffffff00,
+   0x00000000,   0x0000ff00,   0x00000000,   0x0f0fffff,
+   0xffffffff,   0xfffff000,   0x00000000,   0x000ff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffff0000,
+   0x00000000,   0x00ff0000,   0x00000000,   0xf0ffffff,
+   0xffffffff,   0xffff0000,   0x00000000,   0x00ff0000,
+   0x00000000,   0x0fffffff,   0xffffffff,   0xfff00000,
+   0x00000000,   0x0ff00000,   0x000000a0,   0x3fffffff,
+   0xffffffff,   0xffc00000,   0x03d40000,   0x20000000,
+   0x0003fc00,   0x00000000,   0xffff0000,   0x00000000,
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff7fbfc,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff7fbfc,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00030000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* flop image  (Image 18)
+ * 
+ * ctr0 : Total number of floating point instructions (opcode = 0xc). 
+ * ctr1 : Total number of floating point instructions (opcode = 0xe, 0x6, 0x2e, 0x26). 
+ * ctr2 : Unused
+ * ctr3 : Unused 
+ */
+
+   {
+   0x0001e000,   0x00000000,   0x00000000,   0x00000000,
+   0x00001010,   0x33ffffff,   0x006fffff,   0xfc5fffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0xd22d0000,   0x00000000,
+   0x0000000b,   0x46000000,   0x00000000,   0x0ffff900,
+   0x90000000,   0x00000000,   0x0000907e,   0x00000000,
+   0x000000ff,   0xff00bfdf,   0x03030303,   0x03030000,
+   0x000dbfff,   0xffffff00,   0x00000000,   0x000fffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000,
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff,
+   0xffff5555,   0x55500000,   0x003f3ff0,   0x2766c000,
+   0x00000000,   0x00000002,   0x67840000,   0x00000000,
+   0x03fffc00,   0x00000000,   0xffff0000,   0x00000000,
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* cachemiss image    FROM I_D_MISSES.IDF  (Image 19)
+ *
+ * ctr0 : icache misses for retired instructions
+ * ctr1 : total cycles
+ * ctr2 : dcache misses for retired instructions
+ * ctr3 : number of retired instructions
+ */
+   {
+   0x2801e000,   0x00000000,   0x00010000,   0x00000000, 
+   0x00001000,   0xffffffff,   0xffffffff,   0xfff00fff, 
+   0xfffa3fff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf0ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xf2fdf0f0,   0xf0f0f0f0, 
+   0xffffffff,   0xf6c00000,   0x00000000,   0x0ff55800, 
+   0x90000000,   0x00000000,   0x0000b0ff,   0xfffffff0, 
+   0x00000003,   0x0100bfff,   0x3f3f3f3f,   0x3f3f5555, 
+   0x555fffff,   0xffffff00,   0x00000000,   0x000fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xfff00000,   0x000301b0,   0x2fefcfcf, 
+   0xcfcfcfcf,   0xd5555557,   0xf7b40000,   0x00000000, 
+   0x03c14000,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* branch   FROM br_report3.idf 
+ *
+ * ctr0 : Total number of mispredicted branches. 
+ * ctr1 : Some Non-Nullified unpredictable branches. 
+ * ctr2 : Total number of branches (Nullified + Non-Nullified)
+ *        (Unpredicted+ Predicted Taken +Predicted Not Taken). 
+ *	  Total of All Branches.
+ * ctr3 : Remaining Non-Nullified unpredictable branches.
+ */
+   {
+   0x4001e000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0xffffffff,   0xff9fffff,   0xfe0fffff, 
+   0xffffbaff,   0xfdffc0ff,   0xfffdffff,   0xfffffeff, 
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf4ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xd22d0000,   0x00000000, 
+   0x0000000b,   0x46000000,   0x00000000,   0x0ffff900, 
+   0x90000000,   0x00000000,   0x0000907e,   0x00000000, 
+   0x000000ff,   0xff00bfdf,   0x03030303,   0x03030000, 
+   0x000dbfff,   0xffffff00,   0x00000000,   0x000fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffff5555,   0x55500000,   0x003f3ff0,   0x2766c000, 
+   0x00000000,   0x00000002,   0x67840000,   0x00000000, 
+   0x03fffc00,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* crstack  FROM crs_report.idf
+ *
+ * ctr0: correctly predicted branches by the pop_latch
+ * ctr1: some procedure returns
+ * ctr2: all branches, (includes nullified)
+ * ctr3: remaining procedure returns
+ */
+   {
+   0x4001e000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0xffffffff,   0xffa10300,   0x000fffff, 
+   0xffffbaf8,   0x3000007f,   0xffffffff,   0xfffffeff, 
+   0xff7fffff,   0xffffffff,   0xffffff00,   0x00000000, 
+   0xf2ffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000, 
+   0x00000000,   0x00000000,   0xd22d0000,   0x00000000, 
+   0x0000000b,   0x46000000,   0x00000000,   0x0ffff900, 
+   0x90000000,   0x00000000,   0x0000907e,   0x00000000, 
+   0x000000ff,   0xff00bfdf,   0x03030303,   0x03030000, 
+   0x000dbfff,   0xffffff00,   0x00000000,   0x000fffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000, 
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffff0000,   0x00000000,   0xf0ffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000, 
+   0x00000000,   0x0fffffff,   0xffffffff,   0xffffffff, 
+   0xffff5555,   0x55500000,   0x003f3ff0,   0x2766c000, 
+   0x00000000,   0x00000002,   0x67840000,   0x00000000, 
+   0x03fffc00,   0x00000000,   0xffff0000,   0x00000000, 
+   0xf0000000,   0x00000000,   0x00ffffff,   0xff3fffff, 
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000, 
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff, 
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f, 
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc, 
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff, 
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff, 
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   },
+
+/* icache_report image 
+ * 
+ * ctr0 : Icache misses actually used by the core. 
+ * ctr1 : ICORE_AV (Icache misses the core THINKS it needs, including fetching down speculative paths). 
+ * ctr2 : READs on Runway (Icache misses that made it out to Runway, including
+ *	  prefetches).
+ * ctr3 : Prefetch returns (1x and 2x). 
+ */
+   {
+   0x00000000,   0x00000000,   0x00010000,   0x00000000,
+   0x00000000,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffff00,   0x00000000,
+   0x00ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffff0000,   0x00000000,   0x00000000,   0x00000000,
+   0x00000000,   0x00000000,   0xd2002d00,   0x00000000,
+   0x0000000b,   0x46000000,   0x0000000f,   0xf00ff900,
+   0x00900000,   0x00000000,   0x0000907e,   0x00000000,
+   0x0000ff00,   0xff83bf03,   0xdf030303,   0x03030000,
+   0x000dbfff,   0xffffff00,   0x00000000,   0x000fffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xfffff000,
+   0x00000000,   0x00ffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffff0000,   0x00000000,   0x80ffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffff0000,
+   0x00000000,   0x4fffffff,   0xffffffff,   0xffffffff,
+   0xffff5555,   0x55500000,   0x3f003f80,   0x274026c0,
+   0x00000000,   0x00000002,   0x67840000,   0x00000003,
+   0xfc03fc00,   0x00000000,   0x0eff0000,   0x00000000,
+   0x00000000,   0x00000000,   0x00ffffff,   0xff3fffff,
+   0xffffffff,   0xffcfffff,   0xfff6fb7c,   0x00000000,
+   0x00ffffff,   0xff3fffff,   0xffffffff,   0xffcfffff,
+   0xfff6fb7c,   0x00000000,   0xffff0fff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffff0fff,   0xffffff3f,
+   0xffffffff,   0xffffff7f,   0xffffffff,   0xfffffefc,
+   0x00000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0xffffffff,   0xfffff9ff,
+   0xfe000000,   0x00000000,   0x00130000,   0x00000000,
+   0xd0ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0x00ffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   0xffffffff,   0xffffffff,   0xffffffff,   0xffffffff,
+   
+   }
+
+};
+
+#endif
diff -Nru a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
--- a/arch/parisc/kernel/process.c	Wed Oct 30 16:44:35 2002
+++ b/arch/parisc/kernel/process.c	Wed Oct 30 16:44:35 2002
@@ -26,29 +26,25 @@
 #include <linux/init.h>
 #include <linux/version.h>
 #include <linux/elf.h>
+#include <linux/personality.h>
 
 #include <asm/machdep.h>
-#include <asm/offset.h>
+#include <asm/offsets.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
+#include <asm/pgalloc.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/gsc.h>
 #include <asm/processor.h>
+#include <asm/pdc_chassis.h>
 
-spinlock_t semaphore_wake_lock = SPIN_LOCK_UNLOCKED;
+int hlt_counter;
 
-#ifdef __LP64__
-/* The 64-bit code should work equally well in 32-bit land but I didn't
- * want to take the time to confirm that.  -PB
- */
-extern unsigned int ret_from_kernel_thread;
-#else
-asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread");
-#endif
-
-
-int hlt_counter=0;
+/*
+ * Power off function, if any
+ */ 
+void (*pm_power_off)(void);
 
 void disable_hlt(void)
 {
@@ -60,6 +56,11 @@
 	hlt_counter--;
 }
 
+void default_idle(void)
+{
+	barrier();
+}
+
 /*
  * The idle thread. There's no useful work to be
  * done, so just try to conserve power and have a
@@ -69,9 +70,6 @@
 void cpu_idle(void)
 {
 	/* endless idle loop with no priority at all */
-	init_idle();
-	current->nice = 20;
-
 	while (1) {
 		while (!need_resched())
 			barrier();
@@ -80,35 +78,90 @@
 	}
 }
 
-void __init reboot_setup(char *str, int *ints)
-{
-}
 
-struct notifier_block *mach_notifier;
+#ifdef __LP64__
+#define COMMAND_GLOBAL  0xfffffffffffe0030UL
+#else
+#define COMMAND_GLOBAL  0xfffe0030
+#endif
+
+#define CMD_RESET       5       /* reset any module */
 
-void machine_restart(char *ptr)
+/*
+** The Wright Brothers and Gecko systems have a H/W problem
+** (Lasi...'nuf said) may cause a broadcast reset to lockup
+** the system. An HVERSION dependent PDC call was developed
+** to perform a "safe", platform specific broadcast reset instead
+** of kludging up all the code.
+**
+** Older machines which do not implement PDC_BROADCAST_RESET will
+** return (with an error) and the regular broadcast reset can be
+** issued. Obviously, if the PDC does implement PDC_BROADCAST_RESET
+** the PDC call will not return (the system will be reset).
+*/
+void machine_restart(char *cmd)
 {
-	notifier_call_chain(&mach_notifier, MACH_RESTART, ptr);
+#ifdef FASTBOOT_SELFTEST_SUPPORT
+	/*
+	 ** If user has modified the Firmware Selftest Bitmap,
+	 ** run the tests specified in the bitmap after the
+	 ** system is rebooted w/PDC_DO_RESET.
+	 **
+	 ** ftc_bitmap = 0x1AUL "Skip destructive memory tests"
+	 **
+	 ** Using "directed resets" at each processor with the MEM_TOC
+	 ** vector cleared will also avoid running destructive
+	 ** memory self tests. (Not implemented yet)
+	 */
+	if (ftc_bitmap) {
+		pdc_do_firm_test_reset(ftc_bitmap);
+	}
+#endif
+	/* set up a new led state on systems shipped with a LED State panel */
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
+	
+	/* "Normal" system reset */
+	pdc_do_reset();
+
+	/* Nope...box should reset with just CMD_RESET now */
+	gsc_writel(CMD_RESET, COMMAND_GLOBAL);
+
+	/* Wait for RESET to lay us to rest. */
+	while (1) ;
+
 }
 
 void machine_halt(void)
 {
-	notifier_call_chain(&mach_notifier, MACH_HALT, NULL);
+	/*
+	** The LED/ChassisCodes are updated by the led_halt()
+	** function, called by the reboot notifier chain.
+	*/
 }
 
-void machine_power_on(void)
-{
-	notifier_call_chain(&mach_notifier, MACH_POWER_ON, NULL);
-}
 
+/*
+ * This routine is called from sys_reboot to actually turn off the
+ * machine 
+ */
 void machine_power_off(void)
 {
-	notifier_call_chain(&mach_notifier, MACH_POWER_OFF, NULL);
-}
+	/* If there is a registered power off handler, call it. */
+	if(pm_power_off)
+		pm_power_off();
+
+	/* Put the soft power button back under hardware control.
+	 * If the user had already pressed the power button, the
+	 * following call will immediately power off. */
+	pdc_soft_power_button(0);
+	
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
+		
+	/* It seems we have no way to power the system off via
+	 * software. The user has to press the button himself. */
 
-
-void machine_heartbeat(void)
-{
+	printk(KERN_EMERG "System shut down completed.\n"
+	       KERN_EMERG "Please power this system off now.");
 }
 
 
@@ -137,6 +190,9 @@
 
 void flush_thread(void)
 {
+	/* Only needs to handle fpu stuff or perf monitors.
+	** REVISIT: several arches implement a "lazy fpu state".
+	*/
 	set_fs(USER_DS);
 }
 
@@ -147,6 +203,7 @@
 /*
  * Fill in the FPU structure for a core dump.
  */
+
 int dump_fpu (struct pt_regs * regs, elf_fpregset_t *r)
 {
 	memcpy(r, regs->fr, sizeof *r);
@@ -160,7 +217,8 @@
 	  struct pt_regs *regs)
 {
 	struct task_struct *p;
-	p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0);
+	int *user_tid = (int *)regs->gr[26];
+	p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid);
 	return IS_ERR(p) ? PTR_ERR(p) : p->pid;
 }
 
@@ -168,7 +226,7 @@
 sys_vfork(struct pt_regs *regs)
 {
 	struct task_struct *p;
-	p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gr[30], regs, 0);
+	p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gr[30], regs, 0, NULL);
 	return IS_ERR(p) ? PTR_ERR(p) : p->pid;
 }
 
@@ -178,7 +236,14 @@
 	    struct task_struct * p, struct pt_regs * pregs)
 {
 	struct pt_regs * cregs = &(p->thread.regs);
-	long ksp;
+	struct thread_info *ti = p->thread_info;
+	
+	/* We have to use void * instead of a function pointer, because
+	 * function pointers aren't a pointer to the function on 64-bit.
+	 * Make them const so the compiler knows they live in .text */
+	extern void * const ret_from_kernel_thread;
+	extern void * const child_return;
+	extern void * const hpux_child_return;
 
 	*cregs = *pregs;
 
@@ -195,34 +260,37 @@
 	 * in zero for usp.
 	 */
 	if (usp == 0) {
-		/* Kernel Thread */
-		ksp = (((unsigned long)(p)) + TASK_SZ_ALGN);
-		cregs->ksp = ksp;	    /* always return to kernel */
-#ifdef __LP64__
+		/* kernel thread */
+		cregs->ksp = (((unsigned long)(ti)) + THREAD_SZ_ALGN);
+		/* Must exit via ret_from_kernel_thread in order
+		 * to call schedule_tail()
+		 */
 		cregs->kpc = (unsigned long) &ret_from_kernel_thread;
-#else
-		cregs->kpc = (unsigned long) ret_from_kernel_thread;
-#endif
-
 		/*
 		 * Copy function and argument to be called from
 		 * ret_from_kernel_thread.
 		 */
+#ifdef __LP64__
+		cregs->gr[27] = pregs->gr[27];
+#endif
 		cregs->gr[26] = pregs->gr[26];
 		cregs->gr[25] = pregs->gr[25];
-
 	} else {
-		/* User Thread:
-		 *
-		 * Use same stack depth as parent when in wrapper
-		 *
+		/* user thread */
+		/*
 		 * Note that the fork wrappers are responsible
-		 * for setting gr[20] and gr[21].
+		 * for setting gr[21].
 		 */
 
-		cregs->ksp = ((unsigned long)(p))
-			+ (pregs->gr[20] & (INIT_TASK_SIZE - 1));
-		cregs->kpc = pregs->gr[21];
+		/* Use same stack depth as parent */
+		cregs->ksp = ((unsigned long)(ti))
+			+ (pregs->gr[21] & (INIT_THREAD_SIZE - 1));
+		cregs->gr[30] = usp;
+		if (p->personality == PER_HPUX) {
+			cregs->kpc = (unsigned long) &hpux_child_return;
+		} else {
+			cregs->kpc = (unsigned long) &child_return;
+		}
 	}
 
 	return 0;
diff -Nru a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/processor.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,374 @@
+/*    $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $
+ *
+ *    Initial setup-routines for HP 9000 based hardware.
+ *
+ *    Copyright (C) 1991, 1992, 1995  Linus Torvalds
+ *    Modifications for PA-RISC (C) 1999 Helge Deller <deller@gmx.de>
+ *    Modifications copyright 1999 SuSE GmbH (Philipp Rumpf)
+ *    Modifications copyright 2000 Martin K. Petersen <mkp@mkp.net>
+ *    Modifications copyright 2000 Philipp Rumpf <prumpf@tux.org>
+ *    Modifications copyright 2001 Ryan Bradetich <rbradetich@uswest.net>
+ *
+ *    Initial PA-RISC Version: 04-23-1999 by Helge Deller
+ *
+ *    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.
+ *
+ */
+#include <linux/config.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/seq_file.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#define PCI_DEBUG
+#include <linux/pci.h>
+#undef PCI_DEBUG
+
+#include <asm/cache.h>
+#include <asm/hardware.h>	/* for register_parisc_driver() stuff */
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/pdc.h>
+#include <asm/irq.h>		/* for struct irq_region */
+
+struct system_cpuinfo_parisc boot_cpu_data;
+struct cpuinfo_parisc cpu_data[NR_CPUS];
+
+/*
+**  	PARISC CPU driver - claim "device" and initialize CPU data structures.
+**
+** Consolidate per CPU initialization into (mostly) one module.
+** Monarch CPU will initialize boot_cpu_data which shouldn't
+** change once the system has booted.
+**
+** The callback *should* do per-instance initialization of
+** everything including the monarch. "Per CPU" init code in
+** setup.c:start_parisc() has migrated here and start_parisc()
+** will call register_parisc_driver(&cpu_driver) before calling do_inventory().
+**
+** The goal of consolidating CPU initialization into one place is
+** to make sure all CPU's get initialized the same way.
+** The code path not shared is how PDC hands control of the CPU to the OS.
+** The initialization of OS data structures is the same (done below).
+*/
+
+/**
+ * processor_probe - Determine if processor driver should claim this device.
+ * @dev: The device which has been found.
+ *
+ * Determine if processor driver should claim this chip (return 0) or not 
+ * (return 1).  If so, initialize the chip and tell other partners in crime 
+ * they have work to do.
+ */
+static int __init processor_probe(struct parisc_device *dev)
+{
+	unsigned long txn_addr;
+	unsigned long cpuid;
+	struct cpuinfo_parisc *p;
+
+#ifndef CONFIG_SMP
+	if (boot_cpu_data.cpu_count > 0) {
+		printk(KERN_INFO "CONFIG_SMP=n  ignoring additional CPUs\n");
+		return 1;
+	}
+#endif
+
+	/* logical CPU ID and update global counter
+	 * May get overwritten by PAT code.
+	 */
+	cpuid = boot_cpu_data.cpu_count;
+	txn_addr = dev->hpa;	/* for legacy PDC */
+
+#ifdef __LP64__
+	if (is_pdc_pat()) {
+		ulong status;
+		unsigned long bytecnt;
+	        pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;
+#undef USE_PAT_CPUID
+#ifdef USE_PAT_CPUID
+		struct pdc_pat_cpu_num cpu_info;
+#endif
+
+		status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc,
+			dev->mod_index, PA_VIEW, &pa_pdc_cell);
+
+		ASSERT(PDC_OK == status);
+
+		/* verify it's the same as what do_pat_inventory() found */
+		ASSERT(dev->mod_info == pa_pdc_cell.mod_info);
+		ASSERT(dev->pmod_loc == pa_pdc_cell.mod_location);
+
+		txn_addr = pa_pdc_cell.mod[0];   /* id_eid for IO sapic */
+
+#ifdef USE_PAT_CPUID
+/* We need contiguous numbers for cpuid. Firmware's notion
+ * of cpuid is for physical CPUs and we just don't care yet.
+ * We'll care when we need to query PAT PDC about a CPU *after*
+ * boot time (ie shutdown a CPU from an OS perspective).
+ */
+		/* get the cpu number */
+		status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa);
+
+		ASSERT(PDC_OK == status);
+
+		if (cpu_info.cpu_num >= NR_CPUS) {
+			printk(KERN_WARNING "IGNORING CPU at 0x%x,"
+				" cpu_slot_id > NR_CPUS"
+				" (%ld > %d)\n",
+				dev->hpa, cpu_info.cpu_num, NR_CPUS);
+			/* Ignore CPU since it will only crash */
+			boot_cpu_data.cpu_count--;
+			return 1;
+		} else {
+			cpuid = cpu_info.cpu_num;
+		}
+#endif
+	}
+#endif
+
+	p = &cpu_data[cpuid];
+	boot_cpu_data.cpu_count++;
+
+	/* initialize counters */
+	memset(p, 0, sizeof(struct cpuinfo_parisc));
+
+	p->dev = dev;		/* Save IODC data in case we need it */
+	p->hpa = dev->hpa;	/* save CPU hpa */
+	p->cpuid = cpuid;	/* save CPU id */
+	p->txn_addr = txn_addr;	/* save CPU IRQ address */
+#ifdef CONFIG_SMP
+	p->lock = SPIN_LOCK_UNLOCKED;
+
+	/*
+	** FIXME: review if any other initialization is clobbered
+	**	for boot_cpu by the above memset().
+	*/
+
+	/* stolen from init_percpu_prof() */
+	cpu_data[cpuid].prof_counter = 1;
+	cpu_data[cpuid].prof_multiplier = 1;
+#endif
+
+	/*
+	** CONFIG_SMP: init_smp_config() will attempt to get CPU's into
+	** OS control. RENDEZVOUS is the default state - see mem_set above.
+	**	p->state = STATE_RENDEZVOUS;
+	*/
+
+	/*
+	** itimer and ipi IRQ handlers are statically initialized in
+	** arch/parisc/kernel/irq.c. ie Don't need to register them.
+	*/
+	p->region = irq_region[IRQ_FROM_REGION(CPU_IRQ_REGION)];
+
+	return 0;
+}
+
+/**
+ * collect_boot_cpu_data - Fill the boot_cpu_data structure.
+ *
+ * This function collects and stores the generic processor information
+ * in the boot_cpu_data structure.
+ */
+void __init collect_boot_cpu_data(void)
+{
+	memset(&boot_cpu_data, 0, sizeof(boot_cpu_data));
+
+	boot_cpu_data.cpu_hz = 100 * PAGE0->mem_10msec; /* Hz of this PARISC */
+
+	/* get CPU-Model Information... */
+#define p ((unsigned long *)&boot_cpu_data.pdc.model)
+	if (pdc_model_info(&boot_cpu_data.pdc.model) == PDC_OK)
+		printk(KERN_INFO 
+			"model %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+			p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]);
+#undef p
+
+	if (pdc_model_versions(&boot_cpu_data.pdc.versions, 0) == PDC_OK)
+		printk(KERN_INFO "vers  %08lx\n", 
+			boot_cpu_data.pdc.versions);
+
+	if (pdc_model_cpuid(&boot_cpu_data.pdc.cpuid) == PDC_OK)
+		printk(KERN_INFO "CPUID vers %ld rev %ld (0x%08lx)\n",
+			(boot_cpu_data.pdc.cpuid >> 5) & 127,
+			boot_cpu_data.pdc.cpuid & 31,
+			boot_cpu_data.pdc.cpuid);
+
+	if (pdc_model_capabilities(&boot_cpu_data.pdc.capabilities) == PDC_OK)
+		printk(KERN_INFO "capabilities 0x%lx\n",
+			boot_cpu_data.pdc.capabilities);
+
+	if (pdc_model_sysmodel(boot_cpu_data.pdc.sys_model_name) == PDC_OK)
+		printk(KERN_INFO "model %s\n",
+			boot_cpu_data.pdc.sys_model_name);
+
+	boot_cpu_data.hversion =  boot_cpu_data.pdc.model.hversion;
+	boot_cpu_data.sversion =  boot_cpu_data.pdc.model.sversion;
+
+	boot_cpu_data.cpu_type =
+			parisc_get_cpu_type(boot_cpu_data.hversion);
+
+	boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0];
+	boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1];
+}
+
+
+/**
+ * init_cpu_profiler - enable/setup per cpu profiling hooks.
+ * @cpunum: The processor instance.
+ *
+ * FIXME: doesn't do much yet...
+ */
+static inline void __init
+init_percpu_prof(int cpunum)
+{
+	cpu_data[cpunum].prof_counter = 1;
+	cpu_data[cpunum].prof_multiplier = 1;
+}
+
+
+/**
+ * init_per_cpu - Handle individual processor initializations.
+ * @cpunum: logical processor number.
+ *
+ * This function handles initialization for *every* CPU
+ * in the system:
+ *
+ * o Set "default" CPU width for trap handlers
+ *
+ * o Enable FP coprocessor
+ *   REVISIT: this could be done in the "code 22" trap handler.
+ *	(frowands idea - that way we know which processes need FP
+ *	registers saved on the interrupt stack.)
+ *   NEWS FLASH: wide kernels need FP coprocessor enabled to handle
+ *	formatted printing of %lx for example (double divides I think)
+ *
+ * o Enable CPU profiling hooks.
+ */
+int __init init_per_cpu(int cpunum)
+{
+	int ret;
+	struct pdc_coproc_cfg coproc_cfg;
+
+	ret = pdc_coproc_cfg(&coproc_cfg);
+
+	if(ret >= 0 && coproc_cfg.ccr_functional) {
+		mtctl(coproc_cfg.ccr_functional, 10);  /* 10 == Coprocessor Control Reg */
+
+		/* FWIW, FP rev/model is a more accurate way to determine
+		** CPU type. CPU rev/model has some ambiguous cases.
+		*/
+		cpu_data[cpunum].fp_rev = coproc_cfg.revision;
+		cpu_data[cpunum].fp_model = coproc_cfg.model;
+
+		printk(KERN_INFO  "FP[%d] enabled: Rev %ld Model %ld\n",
+			cpunum, coproc_cfg.revision, coproc_cfg.model);
+
+		/*
+		** store status register to stack (hopefully aligned)
+		** and clear the T-bit.
+		*/
+		asm volatile ("fstd    %fr0,8(%sp)");
+
+	} else {
+		printk(KERN_WARNING  "WARNING: No FP CoProcessor?!"
+			" (coproc_cfg.ccr_functional == 0x%lx, expected 0xc0)\n"
+#ifdef __LP64__
+			"Halting Machine - FP required\n"
+#endif
+			, coproc_cfg.ccr_functional);
+#ifdef __LP64__
+		mdelay(100);	/* previous chars get pushed to console */
+		panic("FP CoProc not reported");
+#endif
+	}
+
+	/* FUTURE: Enable Performance Monitor : ccr bit 0x20 */
+	init_percpu_prof(cpunum);
+
+	return ret;
+}
+
+/*
+ * Display cpu info for all cpu's.
+ */
+int
+show_cpuinfo (struct seq_file *m, void *v)
+{
+	int	n;
+
+	for(n=0; n<boot_cpu_data.cpu_count; n++) {
+#ifdef CONFIG_SMP
+		if (0 == cpu_data[n].hpa)
+			continue;
+#ifdef ENTRY_SYS_CPUS
+#error iCOD support wants to show CPU state here
+#endif
+#endif
+		seq_printf(m, "processor\t: %d\n"
+				"cpu family\t: PA-RISC %s\n",
+				 n, boot_cpu_data.family_name);
+
+		seq_printf(m, "cpu\t\t: %s\n",  boot_cpu_data.cpu_name );
+
+		/* cpu MHz */
+		seq_printf(m, "cpu MHz\t\t: %d.%06d\n",
+				 boot_cpu_data.cpu_hz / 1000000,
+				 boot_cpu_data.cpu_hz % 1000000  );
+
+		seq_printf(m, "model\t\t: %s\n"
+				"model name\t: %s\n",
+				 boot_cpu_data.pdc.sys_model_name,
+				 cpu_data[n].dev ? 
+				 cpu_data[n].dev->name : "Unknown" );
+
+		seq_printf(m, "hversion\t: 0x%08x\n"
+			        "sversion\t: 0x%08x\n",
+				 boot_cpu_data.hversion,
+				 boot_cpu_data.sversion );
+
+		/* print cachesize info */
+		show_cache_info(m);
+
+		seq_printf(m, "bogomips\t: %lu.%02lu\n",
+			     loops_per_jiffy / (500000 / HZ),
+			     (loops_per_jiffy / (5000 / HZ)) % 100);
+
+		seq_printf(m, "software id\t: %ld\n\n",
+				boot_cpu_data.pdc.model.sw_id);
+	}
+	return 0;
+}
+
+static struct parisc_device_id processor_tbl[] = {
+	{ HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
+	{ 0, }
+};
+
+static struct parisc_driver cpu_driver = {
+	name:		"CPU",
+	id_table:	processor_tbl,
+	probe:		processor_probe
+};
+
+/**
+ * processor_init - Processor initalization procedure.
+ *
+ * Register this driver.
+ */
+void __init processor_init(void)
+{
+	register_parisc_driver(&cpu_driver);
+}
diff -Nru a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
--- a/arch/parisc/kernel/ptrace.c	Wed Oct 30 16:44:22 2002
+++ b/arch/parisc/kernel/ptrace.c	Wed Oct 30 16:44:22 2002
@@ -14,12 +14,13 @@
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
+#include <linux/personality.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/processor.h>
-#include <asm/offset.h>
+#include <asm/offsets.h>
 
 /* These are used in entry.S, syscall_restore_rfi.  We need to record the
  * current stepping mode somewhere other than in PSW, because there is no
@@ -31,6 +32,47 @@
 #define PT_SINGLESTEP	0x10000
 #define PT_BLOCKSTEP	0x20000
 
+/* PSW bits we allow the debugger to modify */
+#define USER_PSW_BITS	(PSW_N | PSW_V | PSW_CB)
+
+#undef DEBUG_PTRACE
+
+#ifdef DEBUG_PTRACE
+#define DBG(x)	printk x
+#else
+#define DBG(x)
+#endif
+
+#ifdef __LP64__
+
+#define CHILD_IS_32BIT	(child->personality == PER_LINUX_32BIT)
+
+/* This function is needed to translate 32 bit pt_regs offsets in to
+ * 64 bit pt_regs offsets.  For example, a 32 bit gdb under a 64 bit kernel
+ * will request offset 12 if it wants gr3, but the lower 32 bits of
+ * the 64 bit kernels view of gr3 will be at offset 28 (3*8 + 4).
+ * This code relies on a 32 bit pt_regs being comprised of 32 bit values
+ * except for the fp registers which (a) are 64 bits, and (b) follow
+ * the gr registers at the start of pt_regs.  The 32 bit pt_regs should
+ * be half the size of the 64 bit pt_regs, plus 32*4 to allow for fr[]
+ * being 64 bit in both cases.
+ */
+
+static long translate_usr_offset(long offset)
+{
+	if (offset < 0)
+		return -1;
+	else if (offset <= 32*4)	/* gr[0..31] */
+		return offset * 2 + 4;
+	else if (offset <= 32*4+32*8)	/* gr[0..31] + fr[0..31] */
+		return offset + 32*4;
+	else if (offset < sizeof(struct pt_regs)/2 + 32*4)
+		return offset * 2 + 4 - 32*8;
+	else
+		return -1;
+}
+#endif
+
 /*
  * Called by kernel/ptrace.c when detaching..
  *
@@ -49,6 +91,9 @@
 {
 	struct task_struct *child;
 	long ret;
+#ifdef DEBUG_PTRACE
+	long oaddr=addr, odata=data;
+#endif
 
 	lock_kernel();
 	ret = -EPERM;
@@ -78,27 +123,41 @@
 		ret = ptrace_attach(child);
 		goto out_tsk;
 	}
-	ret = -ESRCH;
-	if (!(child->ptrace & PT_PTRACED))
-		goto out_tsk;
-	if (child->state != TASK_STOPPED) {
-		if (request != PTRACE_KILL)
-			goto out_tsk;
-	}
-	if (child->p_pptr != current)
+
+	ret = ptrace_check_attach(child, request == PTRACE_KILL);
+	if (ret < 0)
 		goto out_tsk;
 
 	switch (request) {
 	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))
-			goto out_tsk;
-		ret = put_user(tmp,(unsigned long *) data);
+#ifdef __LP64__
+		if (CHILD_IS_32BIT) {
+			unsigned int tmp;
+
+			addr &= 0xffffffffL;
+			copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+			ret = -EIO;
+			if (copied != sizeof(tmp))
+				goto out_tsk;
+			ret = put_user(tmp,(unsigned int *) data);
+			DBG(("sys_ptrace(PEEK%s, %d, %lx, %lx) returning %ld, data %x\n",
+				request == PTRACE_PEEKTEXT ? "TEXT" : "DATA",
+				pid, oaddr, odata, ret, tmp));
+		}
+		else
+#endif
+		{
+			unsigned long tmp;
+
+			copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
+			ret = -EIO;
+			if (copied != sizeof(tmp))
+				goto out_tsk;
+			ret = put_user(tmp,(unsigned long *) data);
+		}
 		goto out_tsk;
 	}
 
@@ -106,22 +165,53 @@
 	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))
-			goto out_tsk;
+#ifdef __LP64__
+		if (CHILD_IS_32BIT) {
+			unsigned int tmp = (unsigned int)data;
+			DBG(("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
+				request == PTRACE_POKETEXT ? "TEXT" : "DATA",
+				pid, oaddr, odata));
+			addr &= 0xffffffffL;
+			if (access_process_vm(child, addr, &tmp, sizeof(tmp), 1) == sizeof(tmp))
+				goto out_tsk;
+		}
+		else
+#endif
+		{
+			if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
+				goto out_tsk;
+		}
 		ret = -EIO;
 		goto out_tsk;
 
-	/* Read the word at location addr in the USER area.  This will need
-	   to change when the kernel no longer saves all regs on a syscall. */
+	/* Read the word at location addr in the USER area.  For ptraced
+	   processes, the kernel saves all regs on a syscall. */
 	case PTRACE_PEEKUSR: {
-		unsigned long tmp;
-
 		ret = -EIO;
-		if ((addr & 3) || (unsigned long) addr >= sizeof(struct pt_regs))
-			goto out_tsk;
-
-		tmp = *(unsigned long *) ((char *) task_regs(child) + addr);
-		ret = put_user(tmp, (unsigned long *) data);
+#ifdef __LP64__
+		if (CHILD_IS_32BIT) {
+			unsigned int tmp;
+
+			if (addr & (sizeof(int)-1))
+				goto out_tsk;
+			if ((addr = translate_usr_offset(addr)) < 0)
+				goto out_tsk;
+
+			tmp = *(unsigned int *) ((char *) task_regs(child) + addr);
+			ret = put_user(tmp, (unsigned int *) data);
+			DBG(("sys_ptrace(PEEKUSR, %d, %lx, %lx) returning %ld, addr %lx, data %x\n",
+				pid, oaddr, odata, ret, addr, tmp));
+		}
+		else
+#endif
+		{
+			unsigned long tmp;
+
+			if ((addr & (sizeof(long)-1)) || (unsigned long) addr >= sizeof(struct pt_regs))
+				goto out_tsk;
+			tmp = *(unsigned long *) ((char *) task_regs(child) + addr);
+			ret = put_user(tmp, (unsigned long *) data);
+		}
 		goto out_tsk;
 	}
 
@@ -133,32 +223,81 @@
 	   exit. */
 	case PTRACE_POKEUSR:
 		ret = -EIO;
-		if ((addr & 3) || (unsigned long) addr >= sizeof(struct pt_regs))
-			goto out_tsk;
-		/* XXX This test probably needs adjusting.  We probably want to
-		 * allow writes to some bits of PSW, and may want to block writes
-		 * to (some) space registers.  Some register values written here
-		 * may be ignored in entry.S:syscall_restore_rfi; e.g. iaoq is
-		 * written with r31/r31+4, and not with the values in pt_regs.
+		/* Some register values written here may be ignored in
+		 * entry.S:syscall_restore_rfi; e.g. iaoq is written with
+		 * r31/r31+4, and not with the values in pt_regs.
 		 */
-		/* Allow writing of gr1-gr31, fr*, sr*, iasq*, iaoq*, sar */
-		if (addr == PT_PSW || (addr > PT_IAOQ1 && addr != PT_SAR))
+		 /* PT_PSW=0, so this is valid for 32 bit processes under 64
+		 * bit kernels.
+		 */
+		if (addr == PT_PSW) {
+			/* PT_PSW=0, so this is valid for 32 bit processes
+			 * under 64 bit kernels.
+			 *
+			 * Allow writing to Nullify, Divide-step-correction,
+			 * and carry/borrow bits.
+			 * BEWARE, if you set N, and then single step, it wont
+			 * stop on the nullified instruction.
+			 */
+			DBG(("sys_ptrace(POKEUSR, %d, %lx, %lx)\n",
+				pid, oaddr, odata));
+			data &= USER_PSW_BITS;
+			task_regs(child)->gr[0] &= ~USER_PSW_BITS;
+			task_regs(child)->gr[0] |= data;
+			ret = 0;
 			goto out_tsk;
-
-		*(unsigned long *) ((char *) task_regs(child) + addr) = data;
-		ret = 0;
-		goto out_tsk;
+		}
+#ifdef __LP64__
+		if (CHILD_IS_32BIT) {
+			if (addr & (sizeof(int)-1))
+				goto out_tsk;
+			if ((addr = translate_usr_offset(addr)) < 0)
+				goto out_tsk;
+			DBG(("sys_ptrace(POKEUSR, %d, %lx, %lx) addr %lx\n",
+				pid, oaddr, odata, addr));
+			if (addr >= PT_FR0 && addr <= PT_FR31) {
+				/* Special case, fp regs are 64 bits anyway */
+				*(unsigned int *) ((char *) task_regs(child) + addr) = data;
+				ret = 0;
+			}
+			else if ((addr >= PT_GR1+4 && addr <= PT_GR31+4) ||
+					addr == PT_IAOQ0+4 || addr == PT_IAOQ1+4 ||
+					addr == PT_SAR+4) {
+				/* Zero the top 32 bits */
+				*(unsigned int *) ((char *) task_regs(child) + addr - 4) = 0;
+				*(unsigned int *) ((char *) task_regs(child) + addr) = data;
+				ret = 0;
+			}
+			goto out_tsk;
+		}
+		else
+#endif
+		{
+			if ((addr & (sizeof(long)-1)) || (unsigned long) addr >= sizeof(struct pt_regs))
+				goto out_tsk;
+			if ((addr >= PT_GR1 && addr <= PT_GR31) ||
+					addr == PT_IAOQ0 || addr == PT_IAOQ1 ||
+					(addr >= PT_FR0 && addr <= PT_FR31) ||
+					addr == PT_SAR) {
+				*(unsigned long *) ((char *) task_regs(child) + addr) = data;
+				ret = 0;
+			}
+			goto out_tsk;
+		}
 
 	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
 	case PTRACE_CONT:
 		ret = -EIO;
+		DBG(("sys_ptrace(%s)\n",
+			request == PTRACE_SYSCALL ? "SYSCALL" : "CONT"));
 		if ((unsigned long) data > _NSIG)
 			goto out_tsk;
 		child->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP);
-		if (request == PTRACE_SYSCALL)
-			child->ptrace |= PT_TRACESYS;
-		else
-			child->ptrace &= ~PT_TRACESYS;
+		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;
 		goto out_wake_notrap;
 
@@ -168,16 +307,19 @@
 		 * sigkill.  perhaps it should be put in the status
 		 * that it wants to exit.
 		 */
+		DBG(("sys_ptrace(KILL)\n"));
 		if (child->state == TASK_ZOMBIE)	/* already dead */
 			goto out_tsk;
 		child->exit_code = SIGKILL;
 		goto out_wake_notrap;
 
 	case PTRACE_SINGLEBLOCK:
+		DBG(("sys_ptrace(SINGLEBLOCK)\n"));
 		ret = -EIO;
 		if ((unsigned long) data > _NSIG)
 			goto out_tsk;
-		child->ptrace &= ~(PT_TRACESYS|PT_SINGLESTEP);
+		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		child->ptrace &= ~PT_SINGLESTEP;
 		child->ptrace |= PT_BLOCKSTEP;
 		child->exit_code = data;
 
@@ -189,10 +331,12 @@
 		goto out_wake;
 
 	case PTRACE_SINGLESTEP:
+		DBG(("sys_ptrace(SINGLESTEP)\n"));
 		ret = -EIO;
 		if ((unsigned long) data > _NSIG)
 			goto out_tsk;
-		child->ptrace &= ~(PT_TRACESYS|PT_BLOCKSTEP);
+		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+		child->ptrace &= ~PT_BLOCKSTEP;
 		child->ptrace |= PT_SINGLESTEP;
 		child->exit_code = data;
 
@@ -208,10 +352,7 @@
 			pa_psw(child)->y = 0;
 			pa_psw(child)->z = 0;
 			pa_psw(child)->b = 0;
-			pa_psw(child)->r = 0;
-			pa_psw(child)->t = 0;
-			pa_psw(child)->h = 0;
-			pa_psw(child)->l = 0;
+			ptrace_disable(child);
 			/* Don't wake up the child, but let the
 			   parent know something happened. */
 			si.si_code = TRAP_TRACE;
@@ -249,25 +390,24 @@
 	}
 
 out_wake_notrap:
-	/* make sure the trap bits are not set */
-	pa_psw(child)->r = 0;
-	pa_psw(child)->t = 0;
-	pa_psw(child)->h = 0;
-	pa_psw(child)->l = 0;
+	ptrace_disable(child);
 out_wake:
 	wake_up_process(child);
 	ret = 0;
 out_tsk:
-	free_task_struct(child);
+	put_task_struct(child);
 out:
 	unlock_kernel();
+	DBG(("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
+		request, pid, oaddr, odata, ret));
 	return ret;
 }
 
 void syscall_trace(void)
 {
-	if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) !=
-			(PT_PTRACED|PT_TRACESYS))
+	if (!test_thread_flag(TIF_SYSCALL_TRACE))
+		return;
+	if (!(current->ptrace & PT_PTRACED))
 		return;
 	current->exit_code = SIGTRAP;
 	current->state = TASK_STOPPED;
diff -Nru a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S
--- a/arch/parisc/kernel/real2.S	Wed Oct 30 16:44:28 2002
+++ b/arch/parisc/kernel/real2.S	Wed Oct 30 16:44:28 2002
@@ -7,7 +7,6 @@
  * Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com)
  *
  */
-#define __ASSEMBLY__
 #include <asm/assembly.h>
 #include <asm/psw.h>
 
@@ -31,8 +30,11 @@
 
 /************************ 32-bit real-mode calls ***********************/
 /* This can be called in both narrow and wide kernels */
+
 	.text
+
 	.export real32_call_asm
+
 	/* unsigned long real32_call_asm(unsigned int *sp,
 	 *		unsigned int *arg0p,
 	 *		unsigned int iodc_fn)
@@ -40,6 +42,7 @@
 	 *	arg0p points to where saved arg values may be found
 	 *	iodc_fn is the IODC function to call
 	 */
+
 real32_call_asm:
 	STREG	%rp, -RP_OFFSET(%sp)	/* save RP */
 #ifdef __LP64__
@@ -61,7 +64,7 @@
 	ldw	-12(%arg1), %arg3
 	ldw	-4(%arg1), %arg1	/* obviously must do this one last! */
 
-	tophys	%sp
+	tophys_r1  %sp
 
 	b,l	rfi_virt2real,%r2
 	nop
@@ -88,7 +91,7 @@
 	b,l	rfi_real2virt,%r2
 	nop
 
-	tovirt	%sp
+	tovirt_r1 %sp
 	LDREG	-REG_SZ(%sp), %sp	/* restore SP */
 #ifdef __LP64__
 	LDREG	-1*REG_SZ(%sp), %r27
@@ -150,14 +153,14 @@
 	nop
 	nop
 	
-	mtsm		0		/* disable interruptions */
+	rsm             (PSW_SM_Q|PSW_SM_I),%r0  /* disable Q & I bits to load iia queue */
 	mtctl		0, %cr17	/* space 0 */
 	mtctl		0, %cr17
 	load32		PA(rfi_v2r_1), %r1
 	mtctl		%r1, %cr18
 	ldo		4(%r1), %r1
 	mtctl		%r1, %cr18
-	load32		PDC_PSW, %r1
+	load32          REAL_MODE_PSW, %r1
 	mtctl		%r1, %cr22
 	rfi
 	
@@ -170,7 +173,7 @@
 	nop
 	nop
 rfi_v2r_1:
-	tophys	%r2
+	tophys_r1 %r2
 	bv	0(%r2)
 	nop
 
@@ -187,7 +190,7 @@
 	nop
 	nop
 	
-	mtsm		0		/* disable interruptions */
+	rsm             PSW_SM_Q,%r0    /* disable Q bit to load iia queue */
 	mtctl		0, %cr17	/* space 0 */
 	mtctl		0, %cr17
 	load32		(rfi_r2v_1), %r1
@@ -207,7 +210,7 @@
 	nop
 	nop
 rfi_r2v_1:
-	tovirt	%r2
+	tovirt_r1 %r2
 	bv	0(%r2)
 	nop
 
@@ -246,7 +249,7 @@
 	ldd	7*REG_SZ(%arg1), %r19
 	ldd	1*REG_SZ(%arg1), %arg1		/* do this one last! */
 
-	tophys	%sp
+	tophys_r1 %sp
 
 	b,l	rfi_virt2real,%r2
 	nop
@@ -265,10 +268,18 @@
 	b,l	rfi_real2virt,%r2
 	nop
 
-	tovirt	%sp
+	tovirt_r1 %sp
 	ldd	-8(%sp), %sp		/* restore SP */
 	ldd	-0x10(%sp), %rp		/* restore RP */
 	bv	0(%rp)
 	nop
 
 #endif
+	.export pc_in_user_space
+	.text
+	/* Doesn't belong here but I couldn't find a nicer spot. */
+	/* Should never get called, only used by profile stuff in time.c */
+pc_in_user_space:
+	bv,n	0(%rp)
+	nop
+
diff -Nru a/arch/parisc/kernel/semaphore.c b/arch/parisc/kernel/semaphore.c
--- a/arch/parisc/kernel/semaphore.c	Wed Oct 30 16:44:31 2002
+++ b/arch/parisc/kernel/semaphore.c	Wed Oct 30 16:44:31 2002
@@ -1,131 +1,101 @@
 /*
- * 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>
+ * Semaphore implementation Copyright (c) 2001 Matthew Wilcox, Hewlett-Packard
  */
 
 #include <linux/sched.h>
-#include <asm/semaphore-helper.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
 
 /*
- * 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.
+ * Semaphores are complex as we wish to avoid using two variables.
+ * `count' has multiple roles, depending on its value.  If it is positive
+ * or zero, there are no waiters.  The functions here will never be
+ * called; see <asm/semaphore.h>
+ *
+ * When count is -1 it indicates there is at least one task waiting
+ * for the semaphore.
+ *
+ * When count is less than that, there are '- count - 1' wakeups
+ * pending.  ie if it has value -3, there are 2 wakeups pending.
+ *
+ * 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);
+	sem->count--;
 	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 wakers(count) (-1 - count)
 
-#define DOWN_HEAD(task_state)						\
+#define DOWN_HEAD							\
+	int ret = 0;							\
+	DECLARE_WAITQUEUE(wait, current);				\
 									\
+	/* Note that someone is waiting */				\
+	if (sem->count == 0)						\
+		sem->count = -1;					\
 									\
-	current->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)			\
-		current->state = (task_state);	\
-	}					\
-	current->state = TASK_RUNNING;		\
-	remove_wait_queue(&sem->wait, &wait);
+	/* protected by the sentry still -- use unlocked version */	\
+	wait.flags = WQ_FLAG_EXCLUSIVE;					\
+	__add_wait_queue_tail(&sem->wait, &wait);			\
+ lost_race:								\
+	spin_unlock_irq(&sem->sentry);					\
+
+#define DOWN_TAIL							\
+	spin_lock_irq(&sem->sentry);					\
+	if (wakers(sem->count) == 0 && ret == 0)			\
+		goto lost_race;	/* Someone stole our wakeup */		\
+	__remove_wait_queue(&sem->wait, &wait);				\
+	current->state = TASK_RUNNING;					\
+	if (!waitqueue_active(&sem->wait) && (sem->count < 0))		\
+		sem->count = wakers(sem->count);
+
+#define UPDATE_COUNT							\
+	sem->count += (sem->count < 0) ? 1 : - 1;
+	
 
 void __down(struct semaphore * sem)
 {
-	DECLARE_WAITQUEUE(wait, current);
+	DOWN_HEAD
+
+	for(;;) {
+		set_task_state(current, TASK_UNINTERRUPTIBLE);
+		/* we can _read_ this without the sentry */
+		if (sem->count != -1)
+			break;
+ 		schedule();
+ 	}
 
-	DOWN_HEAD(TASK_UNINTERRUPTIBLE)
-	if (waking_non_zero(sem))
-		break;
-	schedule();
-	DOWN_TAIL(TASK_UNINTERRUPTIBLE)
+	DOWN_TAIL
+	UPDATE_COUNT
 }
 
 int __down_interruptible(struct semaphore * sem)
 {
-	DECLARE_WAITQUEUE(wait, current);
-	int ret = 0;
+	DOWN_HEAD
 
-	DOWN_HEAD(TASK_INTERRUPTIBLE)
+	for(;;) {
+		set_task_state(current, TASK_INTERRUPTIBLE);
+		/* we can _read_ this without the sentry */
+		if (sem->count != -1)
+			break;
+
+		if (signal_pending(current)) {
+			ret = -EINTR;
+			break;
+		}
+		schedule();
+	}
 
-	ret = waking_non_zero_interruptible(sem, current);
-	if (ret)
-	{
-		if (ret == 1)
-			/* ret != 0 only if we get interrupted -arca */
-			ret = 0;
-		break;
+	DOWN_TAIL
+
+	if (!ret) {
+		UPDATE_COUNT
 	}
-	schedule();
-	DOWN_TAIL(TASK_INTERRUPTIBLE)
-	return ret;
-}
 
-int __down_trylock(struct semaphore * sem)
-{
-	return waking_non_zero_trylock(sem);
+	return ret;
 }
diff -Nru a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
--- a/arch/parisc/kernel/setup.c	Wed Oct 30 16:44:34 2002
+++ b/arch/parisc/kernel/setup.c	Wed Oct 30 16:44:34 2002
@@ -1,12 +1,13 @@
 /*    $Id: setup.c,v 1.8 2000/02/02 04:42:38 prumpf Exp $
  *
  *    Initial setup-routines for HP 9000 based hardware.
- * 
+ *
  *    Copyright (C) 1991, 1992, 1995  Linus Torvalds
- *    Modifications for PA-RISC (C) 1999 Helge Deller <helge.deller@ruhr-uni-bochum.de>
+ *    Modifications for PA-RISC (C) 1999 Helge Deller <deller@gmx.de>
  *    Modifications copyright 1999 SuSE GmbH (Philipp Rumpf)
  *    Modifications copyright 2000 Martin K. Petersen <mkp@mkp.net>
  *    Modifications copyright 2000 Philipp Rumpf <prumpf@tux.org>
+ *    Modifications copyright 2001 Ryan Bradetich <rbradetich@uswest.net>
  *
  *    Initial PA-RISC Version: 04-23-1999 by Helge Deller
  *
@@ -19,596 +20,319 @@
  *    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.
  *
  */
 
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
-#include <linux/ptrace.h>
-#include <linux/sched.h>
-#include <linux/stddef.h>
-#include <linux/unistd.h>
-#include <linux/user.h>
-#include <linux/tty.h>
 #include <linux/config.h>
-#include <linux/fs.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
-#include <linux/string.h>
-#include <linux/blk.h>
+#include <linux/kernel.h>
+#include <linux/blk.h>          /* for initrd_start and initrd_end */
 #include <linux/init.h>
-#include <linux/interrupt.h>
 #include <linux/console.h>
-#include <linux/bootmem.h>
-#include <linux/delay.h>
+#include <linux/seq_file.h>
+#define PCI_DEBUG
 #include <linux/pci.h>
-#include <linux/threads.h>
+#undef PCI_DEBUG
+#include <linux/proc_fs.h>
 
-#include <asm/cache.h>
-#include <asm/hardware.h>	/* for register_driver() stuff */
 #include <asm/processor.h>
-#include <asm/page.h>
 #include <asm/pdc.h>
 #include <asm/led.h>
-#include <asm/real.h>
-#include <asm/system.h>
 #include <asm/machdep.h>	/* for pa7300lc_init() proto */
-
-#include <asm/irq.h>		/* for struct irq_region */
-#include <asm/pdcpat.h>		/* for PA_VIEW PDC_PAT_CPU_GET_NUMBER etc */
-
-#include <linux/proc_fs.h>
+#include <asm/pdc_chassis.h>
 
 #define COMMAND_LINE_SIZE 1024
 char	saved_command_line[COMMAND_LINE_SIZE];
+char	command_line[COMMAND_LINE_SIZE];
 
-/*
-** KLUGE ALERT!
-**
-** We *really* should be using a combination of request_resource()
-** and request_region()! But request_region() requires kmalloc since
-** returns a new struct resource. And kmalloc just isn't available
-** until after mem_init() is called from start_kernel().
-**
-** FIXME: assume contiguous memory initially.
-**     Additional chunks of memory might be added to sysram_resource.sibling.
-*/
-static struct resource sysrom_resource  = {
-	name: "System ROM", start: 0x0f0000000UL, end: 0x0f00fffffUL,
-	flags: IORESOURCE_BUSY | IORESOURCE_MEM,
-	parent: &iomem_resource, sibling: NULL, child: NULL };
-
-static struct resource pdcdata_resource;
-
-static struct resource sysram_resource  = {
-	name: "System RAM", start: 0UL, end: ~0UL /* bogus */,
-	flags: IORESOURCE_MEM,
-	parent: &iomem_resource, sibling: &sysrom_resource, child: &pdcdata_resource};
-
-extern char _text;	/* start of kernel code, defined by linker */
-extern int  data_start; 
-extern char _edata;	/* end of data, begin BSS, defined by linker */
-extern char _end;	/* end of BSS, defined by linker */
-
-static struct resource data_resource    = {
-	name: "kernel Data", start: virt_to_phys(&data_start), end: virt_to_phys(&_end)-1,
-	flags: IORESOURCE_BUSY | IORESOURCE_MEM,
-	parent: &sysram_resource, sibling: NULL, child: NULL};
-
-static struct resource code_resource = {
-	name: "Kernel Code", start: virt_to_phys(&_text), end: virt_to_phys(&data_start)-1,
-	flags: IORESOURCE_BUSY | IORESOURCE_MEM,
-	parent: &sysram_resource, sibling: &data_resource, child: NULL};
-
-static struct resource pdcdata_resource = {
-	name: "PDC data (Page Zero)", start: 0, end: 0x9ff,
-	flags: IORESOURCE_BUSY | IORESOURCE_MEM,
-	parent: &sysram_resource, sibling: &code_resource, child: NULL};
-
-
+/* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
+struct proc_dir_entry * proc_runway_root = NULL;
+struct proc_dir_entry * proc_gsc_root = NULL;
 
+#ifdef CONFIG_EISA
+int EISA_bus;	/* This has to go somewhere in architecture specific code. */
+#endif
 
-struct system_cpuinfo_parisc boot_cpu_data;
-struct cpuinfo_parisc cpu_data[NR_CPUS];
-
-extern void do_inventory(void);
-extern void cache_init(void);
-extern struct hp_device * register_module(void *hpa);
-
-static int cpu_driver_callback(struct hp_device *, struct pa_iodc_driver *);
-
-static struct pa_iodc_driver cpu_drivers_for[] = {
-	{HPHW_NPROC, 0x0, 0x0, 0x0, 0, 0,
-		DRIVER_CHECK_HWTYPE,
-		"CPU", "PARISC", (void *) cpu_driver_callback},
-	{0,0,0,0,0,0,
-		0,
-		(char *) NULL, (char *) NULL, (void *) NULL }
-};
+void __init setup_cmdline(char **cmdline_p)
+{
+	extern unsigned int boot_args[];
 
-static long fallback_cpu_hpa[] = { 0xfffa0000L, 0xfffbe000L, 0x0 };
+	/* Collect stuff passed in from the boot loader */
 
+	/* boot_args[0] is free-mem start, boot_args[1] is ptr to command line */
+	if (boot_args[0] < 64) {
+		/* called from hpux boot loader */
+		saved_command_line[0] = '\0';
+	} else {
+		strcpy(saved_command_line, (char *)__va(boot_args[1]));
 
-/*
-**  	PARISC CPU driver - claim "device" and initialize CPU data structures.
-**
-** Consolidate per CPU initialization into (mostly) one module.
-** Monarch CPU will initialize boot_cpu_data which shouldn't
-** change once the system has booted.
-**
-** The callback *should* do per-instance initialization of
-** everything including the monarch. Some of the code that's
-** in setup.c:start_parisc() should migrate here and start_parisc()
-** should "register_driver(cpu_driver_for)" before calling
-** do_inventory().
-**
-** The goal of consolidating CPU initialization into one place is
-** to make sure all CPU's get initialized the same way.
-** It would be nice if the even the manarch through the exact same code path.
-** (up to rendevous at least).
-*/
-#undef ASSERT
-#define ASSERT(expr) \
-	if(!(expr)) { \
-		printk( "\n" __FILE__ ":%d: Assertion " #expr " failed!\n",__LINE__); \
-		panic(#expr); \
+#ifdef CONFIG_BLK_DEV_INITRD
+		if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
+		{
+		    initrd_start = (unsigned long)__va(boot_args[2]);
+		    initrd_end = (unsigned long)__va(boot_args[3]);
+		}
+#endif
 	}
 
-static int
-cpu_driver_callback(struct hp_device *d, struct pa_iodc_driver *dri)
+	strcpy(command_line, saved_command_line);
+	*cmdline_p = command_line;
+}
+
+#ifdef CONFIG_PA11
+void __init dma_ops_init(void)
 {
-#ifdef __LP64__
-	extern int pdc_pat;	/* arch/parisc/kernel/inventory.c */
-	static unsigned long pdc_result[32] __attribute__ ((aligned (8))) = {0,0,0,0};
-#endif
-	struct cpuinfo_parisc *p;
+	switch (boot_cpu_data.cpu_type) {
+	case pcx:
+		/*
+		 * We've got way too many dependencies on 1.1 semantics
+		 * to support 1.0 boxes at this point.
+		 */
+		panic(	"PA-RISC Linux currently only supports machines that conform to\n"
+			"the PA-RISC 1.1 or 2.0 architecture specification.\n");
 
-#ifndef CONFIG_SMP
-	if (boot_cpu_data.cpu_count > 0) {
-		printk(KERN_INFO "CONFIG_SMP disabled - not claiming addional CPUs\n");
-		return(1);
+	case pcxs:
+	case pcxt:
+		hppa_dma_ops = &pcx_dma_ops;
+		break;
+	case pcxl2:
+		pa7300lc_init();
+	case pcxl: /* falls through */
+		hppa_dma_ops = &pcxl_dma_ops;
+		break;
+	default:
+		break;
 	}
+}
 #endif
 
-	p = &cpu_data[boot_cpu_data.cpu_count];
-	boot_cpu_data.cpu_count++;
-
-/* TODO: Enable FP regs - done early in start_parisc() now */
+extern int init_per_cpu(int cpuid);
+extern void collect_boot_cpu_data(void);
 
-	/* initialize counters */
-	memset(p, 0, sizeof(struct cpuinfo_parisc));
-
-	p->hpa = (unsigned long) d->hpa; /* save CPU hpa */
+void __init setup_arch(char **cmdline_p)
+{
+	init_per_cpu(smp_processor_id());	/* Set Modes & Enable FP */
 
 #ifdef __LP64__
-	if (pdc_pat) {
-		ulong status;
-	        pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;
-
-		status = pdc_pat_cell_module(& pdc_result, d->pcell_loc,
-			d->mod_index, PA_VIEW, & pa_pdc_cell);
-
-		ASSERT(PDC_RET_OK == status);
-
-		/* verify it's the same as what do_pat_inventory() found */
-		ASSERT(d->mod_info == pa_pdc_cell.mod_info);
-		ASSERT(d->pmod_loc == pa_pdc_cell.mod_location);
-		ASSERT(d->mod_path == pa_pdc_cell.mod_path);
-
-		p->txn_addr = pa_pdc_cell.mod[0];   /* id_eid for IO sapic */
-
-		/* get the cpu number */
-		status = mem_pdc_call( PDC_PAT_CPU, PDC_PAT_CPU_GET_NUMBER,
-				__pa(& pdc_result), d->hpa);
+	printk(KERN_INFO "The 64-bit Kernel has started...\n");
+#else
+	printk(KERN_INFO "The 32-bit Kernel has started...\n");
+#endif
 
-		ASSERT(PDC_RET_OK == status);
+	pdc_console_init();
 
-		p->cpuid = pdc_result[0];
+#ifdef CONFIG_PDC_NARROW
+	printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
+#endif
+	setup_pdc();
+	setup_cmdline(cmdline_p);
+	collect_boot_cpu_data();
+	do_memory_inventory();  /* probe for physical memory */
+	parisc_cache_init();
+	paging_init();
 
-	} else
+#ifdef CONFIG_CHASSIS_LCD_LED
+	/* initialize the LCD/LED after boot_cpu_data is available ! */
+        led_init();				/* LCD/LED initialization */
 #endif
-	{
-		p->txn_addr = (unsigned long) d->hpa;	/* for normal parisc */
 
-		/* logical CPU ID and update global counter */
-		p->cpuid = boot_cpu_data.cpu_count - 1;
-	}
+#ifdef CONFIG_PA11
+	dma_ops_init();
+#endif
 
-	/*
-	** itimer and ipi IRQ handlers are statically initialized in
-	** arch/parisc/kernel/irq.c
-	*/
-	p->region = irq_region[IRQ_FROM_REGION(CPU_IRQ_REGION)];
+#ifdef CONFIG_VT
+# if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
+        conswitchp = &dummy_con;        /* we use take_over_console() later ! */
+# endif
+#endif
 
-	return(0);
 }
 
+/*
+ * Display cpu info for all cpu's.
+ * for parisc this is in processor.c
+ */
+extern int show_cpuinfo (struct seq_file *m, void *v);
 
-void __xchg_called_with_bad_pointer(void)
+static void *
+c_start (struct seq_file *m, loff_t *pos)
 {
-    printk(KERN_EMERG "xchg() called with bad pointer !\n");
+    	/* Looks like the caller will call repeatedly until we return
+	 * 0, signaling EOF perhaps.  This could be used to sequence
+	 * through CPUs for example.  Since we print all cpu info in our
+	 * show_cpuinfo() disregarding 'pos' (which I assume is 'v' above)
+	 * we only allow for one "position".  */
+	return ((long)*pos < 1) ? (void *)1 : NULL;
 }
 
-
-/* Some versions of IODC don't list the CPU, and since we don't walk
- * the bus yet, we have to probe for processors at well known hpa
- * addresses.  
- */
-
-void __init register_fallback_cpu (void)
+static void *
+c_next (struct seq_file *m, void *v, loff_t *pos)
 {
-	struct hp_device *d = NULL;
-	int i = 0;
-	
-#ifdef CONFIG_SMP
-#error "Revisit CPU fallback addresses for SMP (Assuming bus walk hasn't been implemented)"
-#endif
-	printk ("No CPUs reported by firmware - probing...\n");
-	
-	while (fallback_cpu_hpa[i]) {
-		
-		d = register_module ((void *) fallback_cpu_hpa[i]);
-		
-		if (d > 0) {
-			printk ("Found CPU at %lx\n", fallback_cpu_hpa[i]);
-			cpu_driver_callback (d, 0);
-			return;
-		}
-		
-		i++;
-	}
-	
-	panic ("No CPUs found.  System halted.\n");
-	return;
+	++*pos;
+	return c_start(m, pos);
 }
 
-
-/*
- * Get CPU information and store it in the boot_cpu_data structure.  */
-void __init collect_boot_cpu_data(void)
+static void
+c_stop (struct seq_file *m, void *v)
 {
-	memset(&boot_cpu_data,0,sizeof(boot_cpu_data));
-
-	boot_cpu_data.cpu_hz = 100 * PAGE0->mem_10msec; /* Hz of this PARISC */
-
-	/* get CPU-Model Information... */
-#define p ((unsigned long *)&boot_cpu_data.pdc.model)
-	if(pdc_model_info(&boot_cpu_data.pdc.model)==0)
-		printk("model	%08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-			p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]);
-#undef p
-
-	if(pdc_model_versions(&boot_cpu_data.pdc.versions, 0)==0)
-		printk("vers	%08lx\n", boot_cpu_data.pdc.versions.cpuid);
-
-	if(pdc_model_cpuid(&boot_cpu_data.pdc.cpuid)==0)
-		printk("cpuid	%08lx\n", boot_cpu_data.pdc.cpuid.cpuid);
-	
-	printk("CPUID	vers %ld rev %ld\n",
-		(boot_cpu_data.pdc.cpuid.cpuid >> 5) & 127,
-		boot_cpu_data.pdc.cpuid.cpuid & 31);
-
-	if (pdc_model_sysmodel(boot_cpu_data.pdc.sys_model_name)==0)
-		printk("model	%s\n",boot_cpu_data.pdc.sys_model_name);
-
-	boot_cpu_data.model_name = parisc_getHWdescription(HPHW_NPROC,
-		boot_cpu_data.pdc.model.hversion>>4,
-		boot_cpu_data.pdc.model.sversion>>8);
-	
-	boot_cpu_data.hversion =  boot_cpu_data.pdc.model.hversion;
-	boot_cpu_data.sversion =  boot_cpu_data.pdc.model.sversion;
-
-	boot_cpu_data.cpu_type =
-			parisc_get_cpu_type(boot_cpu_data.pdc.model.hversion);
-
-	boot_cpu_data.cpu_name = cpu_name_version[boot_cpu_data.cpu_type][0];
-	boot_cpu_data.family_name = cpu_name_version[boot_cpu_data.cpu_type][1];
 }
 
+struct seq_operations cpuinfo_op = {
+	start:	c_start,
+	next:	c_next,
+	stop:	c_stop,
+	show:	show_cpuinfo
+};
 
-#ifdef __LP64__
-#define COMMAND_GLOBAL  0xfffffffffffe0030UL
-#else
-#define COMMAND_GLOBAL  0xfffe0030
-#endif
-
-#define CMD_RESET       5       /* reset any module */
-
-/*
-** The Wright Brothers and Gecko systems have a H/W problem
-** (Lasi...'nuf said) may cause a broadcast reset to lockup
-** the system. An HVERSION dependent PDC call was developed
-** to perform a "safe", platform specific broadcast reset instead
-** of kludging up all the code.
-**
-** Older machines which do not implement PDC_BROADCAST_RESET will
-** return (with an error) and the regular broadcast reset can be
-** issued. Obviously, if the PDC does implement PDC_BROADCAST_RESET
-** the PDC call will not return (the system will be reset).
-*/
-static int
-reset_parisc(struct notifier_block *self, unsigned long command, void *ptr)
+static void parisc_proc_mkdir(void)
 {
-	printk("%s: %s(cmd=%lu)\n", __FILE__, __FUNCTION__, command);
-
-	switch(command) {
-	case MACH_RESTART:
-#ifdef FASTBOOT_SELFTEST_SUPPORT
-		/*
-		** If user has modified the Firmware Selftest Bitmap,
-		** run the tests specified in the bitmap after the
-		** system is rebooted w/PDC_DO_RESET.
-		**
-		** ftc_bitmap = 0x1AUL "Skip destructive memory tests"
-		**
-		** Using "directed resets" at each processor with the MEM_TOC
-		** vector cleared will also avoid running destructive
-		** memory self tests. (Not implemented yet)
-		*/
-		if (ftc_bitmap) {
-			mem_pdc_call( PDC_BROADCAST_RESET,
-				PDC_DO_FIRM_TEST_RESET, PDC_FIRM_TEST_MAGIC,
-				ftc_bitmap);
+	/*
+	** Can't call proc_mkdir() until after proc_root_init() has been
+	** called by start_kernel(). In other words, this code can't
+	** live in arch/.../setup.c because start_parisc() calls
+	** start_kernel().
+	*/
+	switch (boot_cpu_data.cpu_type) {
+	case pcxl:
+	case pcxl2:
+		if (NULL == proc_gsc_root)
+		{
+			proc_gsc_root = proc_mkdir("bus/gsc", 0);
 		}
-#endif
-
-		/* "Normal" system reset */
-		(void) mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_RESET,
-			0L, 0L, 0L);
-
-		/* Nope...box should reset with just CMD_RESET now */
-		gsc_writel(CMD_RESET, COMMAND_GLOBAL);
-
-		/* Wait for RESET to lay us to rest. */
-		while (1) ;
-
 		break;
+        case pcxt_:
+        case pcxu:
+        case pcxu_:
+        case pcxw:
+        case pcxw_:
+        case pcxw2:
+                if (NULL == proc_runway_root)
+                {
+                        proc_runway_root = proc_mkdir("bus/runway", 0);
+                }
+                break;
 	}
-	return NOTIFY_DONE;
 }
 
-static struct notifier_block parisc_block = { reset_parisc, NULL, 0 };
+static struct resource central_bus = {
+	name:	"Central Bus",
+	start:	(unsigned long)0xfffffffffff80000,
+	end:    (unsigned long)0xfffffffffffaffff,
+	flags:	IORESOURCE_MEM,
+};
 
+static struct resource local_broadcast = {
+	name:	"Local Broadcast",
+	start:	(unsigned long)0xfffffffffffb0000,
+	end:	(unsigned long)0xfffffffffffdffff,
+	flags:	IORESOURCE_MEM,
+};
 
-/*  start_parisc() will be called from head.S to setup our new memory_start 
-    and actually start our kernel !
-    Memory-Layout is:
-	- Kernel-Image (code+data+BSS)
-	- Stack (stack-size see below!, stack-setup-code is in head.S)
-	- memory_start at end of stack..
-*/
-
-unsigned long mem_start, mem_max;
-unsigned long start_pfn, max_pfn;
-extern asmlinkage void __init start_kernel(void);
-
-#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
-#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
-#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
+static struct resource global_broadcast = {
+	name:	"Global Broadcast",
+	start:	(unsigned long)0xfffffffffffe0000,
+	end:	(unsigned long)0xffffffffffffffff,
+	flags:	IORESOURCE_MEM,
+};
 
-void __init start_parisc(unsigned arg0, unsigned arg1,
-			 unsigned arg2, unsigned arg3)
+int __init parisc_init_resources(void)
 {
-	register unsigned long ccr;
-	unsigned long memory_start;
+	int result;
 
-	/* Clear BSS */
-
-	{
-		char *p = &_edata, *q = &_end;
-
-		while (p < q) {
-			*p++ = 0;
-		}
+	result = request_resource(&iomem_resource, &central_bus);
+	if (result < 0) {
+		printk(KERN_ERR 
+		       "%s: failed to claim %s address space!\n", 
+		       __FILE__, central_bus.name);
+		return result;
 	}
 
-
-	pdc_console_init();
-
-#ifdef __LP64__
-	printk("The 64-bit Kernel has started...\n");
-#else
-	printk("The 32-bit Kernel has started...\n");
-#endif
-
-	/*
-	** Enable FP coprocessor
-	**
-	** REVISIT: ccr should be set by PDC_COPROC results to support PA1.0.
-	** Hardcoding works for PA1.1 processors.
-	**
-	** REVISIT: this could be done in the "code 22" trap handler.
-	** (frowands idea - that way we know which processes need FP
-	** registers saved on the interrupt stack.)
-	**
-	** NEWS FLASH: wide kernels need FP coprocessor enabled to handle
-	** formatted printing of %lx for example (double divides I think)
-	*/
-	ccr = 0xc0;
-	mtctl(ccr, 10);
-	printk("Enabled FP coprocessor\n");
-
-#ifdef __LP64__
-	printk( "If this is the LAST MESSAGE YOU SEE, you're probably using\n"
-		"32-bit millicode by mistake.\n");
-#endif
-
-	memory_start = (unsigned long) &_end;
-	memory_start = (memory_start + PAGE_SIZE) & PAGE_MASK;
-	printk("Free memory starts at: 0x%lx\n", memory_start);
-
-	/* Collect stuff passed in from the boot loader */
-	printk(KERN_WARNING  "%s(0x%x,0x%x,0x%x,0x%x)\n", 
-		    __FUNCTION__, arg0, arg1, arg2, arg3);
-
-	/* arg0 is free-mem start, arg1 is ptr to command line */
-	if (arg0 < 64) {
-		/* called from hpux boot loader */
-		saved_command_line[0] = '\0';
-	} else {
-		strcpy(saved_command_line, (char *)__va(arg1));
-		printk("PALO command line: '%s'\nPALO initrd %x-%x\n",
-		    saved_command_line, arg2, arg3);
-
-#ifdef CONFIG_BLK_DEV_INITRD
-		if (arg2 != 0) /* did palo pass us a ramdisk? */
-		{
-		    initrd_start = (unsigned long)__va(arg2);
-		    initrd_end = (unsigned long)__va(arg3);
-		}
-#endif
+	result = request_resource(&iomem_resource, &local_broadcast);
+	if (result < 0) {
+		printk(KERN_ERR 
+		       "%s: failed to claim %saddress space!\n", 
+		       __FILE__, local_broadcast.name);
+		return result;
 	}
 
-	mem_start = __pa(memory_start);
-#define MAX_MEM (512*1024*1024)
-	mem_max = (PAGE0->imm_max_mem > MAX_MEM ? MAX_MEM : PAGE0->imm_max_mem);
-
-	collect_boot_cpu_data();
+	result = request_resource(&iomem_resource, &global_broadcast);
+	if (result < 0) {
+		printk(KERN_ERR 
+		       "%s: failed to claim %s address space!\n", 
+		       __FILE__, global_broadcast.name);
+		return result;
+	}
 
-	/* initialize the LCD/LED after boot_cpu_data is available ! */
-        led_init();				/* LCD/LED initialization */
+	return 0;
+}
 
-	do_inventory();				/* probe for hardware */
-        register_driver(cpu_drivers_for);	/* claim all the CPUs */
+extern void gsc_init(void);
+extern void processor_init(void);
+extern void ccio_init(void);
+extern void dino_init(void);
+extern void iosapic_init(void);
+extern void lba_init(void);
+extern void sba_init(void);
+extern void eisa_init(void);
 
-	if (boot_cpu_data.cpu_count == 0)
-	    register_fallback_cpu();
+static int __init parisc_init(void)
+{
+	parisc_proc_mkdir();
+	parisc_init_resources();
+	do_device_inventory();                  /* probe for hardware */
 
-	printk("CPU(s): %d x %s at %d.%06d MHz\n", 
+	parisc_pdc_chassis_init();
+	
+	/* set up a new led state on systems shipped LED State panel */
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BSTART);
+	
+	processor_init();
+	printk(KERN_INFO "CPU(s): %d x %s at %d.%06d MHz\n",
 			boot_cpu_data.cpu_count,
 			boot_cpu_data.cpu_name,
-			boot_cpu_data.cpu_hz / 1000000, 
+			boot_cpu_data.cpu_hz / 1000000,
 			boot_cpu_data.cpu_hz % 1000000	);
 
-	switch (boot_cpu_data.cpu_type) {
-	case pcx:
-	case pcxs:
-	case pcxt:
-		hppa_dma_ops = &pcx_dma_ops;
-		break;
-	case pcxl2:
-		pa7300lc_init();
-	case pcxl: /* falls through */
-		hppa_dma_ops = &pcxl_dma_ops;
-		break;
-	default:
-		break;
-	}
-
-#if 1
-	/* KLUGE! this really belongs in kernel/resource.c! */
-	iomem_resource.end = ~0UL;
-#endif
-	sysram_resource.end = mem_max - 1;
-	notifier_chain_register(&mach_notifier, &parisc_block);
-	start_kernel(); 	/* now back to arch-generic code... */
-}
-
-void __init setup_arch(char **cmdline_p)
-{
-	unsigned long bootmap_size;
-	unsigned long start_pfn;
-	unsigned long mem_free;
-
-	*cmdline_p = saved_command_line;
-
-	/* initialize bootmem */
-
-	start_pfn = PFN_UP(mem_start);
-	max_pfn = PFN_DOWN(mem_max);
-
-	bootmap_size = init_bootmem(start_pfn, max_pfn);
-
-	mem_start += bootmap_size;
-	mem_free = mem_max - mem_start;
-
-	/* free_bootmem handles rounding nicely */
-	printk("free_bootmem(0x%lx, 0x%lx)\n", (unsigned long)mem_start,
-			(unsigned long)mem_free);
-	free_bootmem(mem_start, mem_free);
-
-#ifdef CONFIG_BLK_DEV_INITRD
-	printk("initrd: %08x-%08x\n", (int) initrd_start, (int) initrd_end);
-
-	if (initrd_end != 0) {
-		initrd_below_start_ok = 1;
-		reserve_bootmem(__pa(initrd_start), initrd_end - initrd_start);
-	}
+	/* These are in a non-obvious order, will fix when we have an iotree */
+#if defined(CONFIG_IOSAPIC)
+	iosapic_init();
 #endif
-
-	cache_init();
-
-	paging_init();
-
-	if((unsigned long)&init_task_union&(INIT_TASK_SIZE - 1)) {
-		printk("init_task_union not aligned.  Please recompile the kernel after changing the first line in arch/parisc/kernel/init_task.c from \n\"#define PAD 0\" to\n\"#define PAD 1\" or vice versa\n");
-		for(;;);
-	}
-
-
-#ifdef CONFIG_SERIAL_CONSOLE
-	/* nothing */
-#elif CONFIG_VT
-#if   defined(CONFIG_STI_CONSOLE)
-	conswitchp = &dummy_con;	/* we use take_over_console() later ! */
-#elif defined(CONFIG_IODC_CONSOLE)
-	conswitchp = &prom_con;		/* it's currently really "prom_con" */
-#elif defined(CONFIG_DUMMY_CONSOLE)
-	conswitchp = &dummy_con;
+#if defined(CONFIG_IOMMU_SBA)
+	sba_init();
 #endif
+#if defined(CONFIG_PCI_LBA)
+	lba_init();
 #endif
 
-}
-
-#ifdef CONFIG_PROC_FS
-/*
- *	Get CPU information for use by procfs.
- */
+	/* CCIO before any potential subdevices */
+#if defined(CONFIG_IOMMU_CCIO)
+	ccio_init();
+#endif
 
-int get_cpuinfo(char *buffer)
-{
-	char		  *p = buffer;
-	int		  n;
+	/*
+	 * Need to register Asp & Wax before the EISA adapters for the IRQ
+	 * regions.  EISA must come before PCI to be sure it gets IRQ region
+	 * 0.
+	 */
+#if defined(CONFIG_GSC_LASI) || defined(CONFIG_GSC_WAX)
+	gsc_init();
+#endif
+#ifdef CONFIG_EISA
+	eisa_init();
+#endif
+#if defined(CONFIG_GSC_DINO)
+	dino_init();
+#endif
 
-	for(n=0; n<boot_cpu_data.cpu_count; n++) {
-#ifdef CONFIG_SMP
-		if (!(cpu_online_map & (1<<n)))
-			continue;
-#endif
-		p += sprintf(p, "processor\t: %d\n"
-				"cpu family\t: PA-RISC %s\n",
-				n, boot_cpu_data.family_name);
+#ifdef CONFIG_CHASSIS_LCD_LED
+	register_led_regions();	/* register LED port info in procfs */
+#endif
 
-		p += sprintf(p, "cpu\t\t: %s\n",  boot_cpu_data.cpu_name );
-	
-		/* cpu MHz */
-		p += sprintf(p, "cpu MHz\t\t: %d.%06d\n",
-				 boot_cpu_data.cpu_hz / 1000000, 
-				 boot_cpu_data.cpu_hz % 1000000  );
-
-		p += sprintf(p, "model\t\t: %s\n"
-				"model name\t: %s\n",
-				boot_cpu_data.pdc.sys_model_name,
-				boot_cpu_data.model_name);
-
-		p += sprintf(p, "hversion\t: 0x%08x\n"
-			        "sversion\t: 0x%08x\n",
-				boot_cpu_data.hversion,
-				boot_cpu_data.sversion );
-
-		p += get_cache_info(p);
-		/* print cachesize info ? */
-		p += sprintf(p, "bogomips\t: %lu.%02lu\n",
-			     (loops_per_sec+2500)/500000,
-			     ((loops_per_sec+2500)/5000) % 100);
-	}
-	return p - buffer;
+	return 0;
 }
-#endif
+
+arch_initcall(parisc_init);
 
diff -Nru a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
--- a/arch/parisc/kernel/signal.c	Wed Oct 30 16:44:34 2002
+++ b/arch/parisc/kernel/signal.c	Wed Oct 30 16:44:34 2002
@@ -26,20 +26,24 @@
 #include <linux/unistd.h>
 #include <linux/stddef.h>
 #include <asm/ucontext.h>
+#include <asm/rt_sigframe.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
 
 #define DEBUG_SIG 0
 
+#if DEBUG_SIG
+#define DBG(x)	printk x
+#else
+#define DBG(x)
+#endif
+
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
-extern long sys_wait4 (int, int *, int, struct rusage *);
 int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall);
 
 int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
 {
-	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
-		return -EFAULT;
 	if (from->si_code < 0)
 		return __copy_to_user(to, from, sizeof(siginfo_t));
 	else {
@@ -109,11 +113,11 @@
 #endif
 	sigdelsetmask(&newset, ~_BLOCKABLE);
 
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	saveset = current->blocked;
 	current->blocked = newset;
 	recalc_sigpending();
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	regs->gr[28] = -EINTR;
 	while (1) {
@@ -128,30 +132,15 @@
  * Do a signal return - restore sigcontext.
  */
 
-struct rt_sigframe {
-	unsigned int tramp[4];
-	struct siginfo info;
-	struct ucontext uc;
-};
-
 /* Trampoline for calling rt_sigreturn() */
 #define INSN_LDI_R25_0	 0x34190000 /* ldi  0,%r25 (in_syscall=0) */
 #define INSN_LDI_R25_1	 0x34190002 /* ldi  1,%r25 (in_syscall=1) */
 #define INSN_LDI_R20	 0x3414015a /* ldi  __NR_rt_sigreturn,%r20 */
 #define INSN_BLE_SR2_R0  0xe4008200 /* be,l 0x100(%sr2,%r0),%sr0,%r31 */
-#define INSN_NOP	 0x80000240 /* nop */
+#define INSN_NOP	 0x08000240 /* nop */
 /* For debugging */
 #define INSN_DIE_HORRIBLY 0x68000ccc /* stw %r0,0x666(%sr0,%r0) */
 
-/*
- * The 32-bit ABI wants at least 48 bytes for a function call frame:
- * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
- * which Linux/parisc uses is sp-20 for the saved return pointer...)
- * Then, the stack pointer must be rounded to a cache line (64 bytes).
- */
-#define PARISC_RT_SIGFRAME_SIZE					\
-	(((sizeof(struct rt_sigframe) + 48) + 63) & -64)
-
 static long
 restore_sigcontext(struct sigcontext *sc, struct pt_regs *regs)
 {
@@ -162,10 +151,7 @@
 	err |= __copy_from_user(regs->iaoq, sc->sc_iaoq, sizeof(regs->iaoq));
 	err |= __copy_from_user(regs->iasq, sc->sc_iasq, sizeof(regs->iasq));
 	err |= __get_user(regs->sar, &sc->sc_sar);
-
-#if DEBUG_SIG
-	printk("restore_sigcontext: r28 is %ld\n", regs->gr[28]);
-#endif
+	DBG(("restore_sigcontext: r28 is %ld\n", regs->gr[28]));
 	return err;
 }
 
@@ -180,30 +166,22 @@
 	/* Unwind the user stack to get the rt_sigframe structure. */
 	frame = (struct rt_sigframe *)
 		(usp - PARISC_RT_SIGFRAME_SIZE);
-#if DEBUG_SIG
-	printk("in sys_rt_sigreturn, frame is %p\n", frame);
-#endif
+	DBG(("in sys_rt_sigreturn, frame is %p\n", frame));
 
-	/* Verify that it's a good sigcontext before using it */
-	if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
-		goto give_sigsegv;
 	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
 		goto give_sigsegv;
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
-	spin_lock_irq(&current->sigmask_lock);
+	spin_lock_irq(&current->sig->siglock);
 	current->blocked = set;
 	recalc_sigpending();
-	spin_unlock_irq(&current->sigmask_lock);
+	spin_unlock_irq(&current->sig->siglock);
 
 	/* Good thing we saved the old gr[30], eh? */
 	if (restore_sigcontext(&frame->uc.uc_mcontext, regs))
 		goto give_sigsegv;
 
-#if DEBUG_SIG
-	printk("usp: %#08lx stack %p",
-	       usp, &frame->uc.uc_stack);
-#endif
+	DBG(("usp: %#08lx stack %p", usp, &frame->uc.uc_stack));
 
 	/* I don't know why everyone else assumes they can call this
            with a pointer to a stack_t on the kernel stack.  That
@@ -218,16 +196,14 @@
 	if (in_syscall)
 		regs->gr[31] = regs->iaoq[0];
 #if DEBUG_SIG
-	printk("returning to %#lx\n", regs->iaoq[0]);
-	printk("in sys_rt_sigreturn:\n");
+	DBG(("returning to %#lx\n", regs->iaoq[0]));
+	DBG(("in sys_rt_sigreturn:\n"));
 	show_regs(regs);
 #endif
 	return;
 
 give_sigsegv:
-#if DEBUG_SIG
-	printk("fuckup in sys_rt_sigreturn, sending SIGSEGV\n");
-#endif
+	DBG(("sys_rt_sigreturn sending SIGSEGV\n"));
 	si.si_signo = SIGSEGV;
 	si.si_errno = 0;
 	si.si_code = SI_KERNEL;
@@ -246,7 +222,7 @@
 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;
+		sp = current->sas_ss_sp; /* Stacks grow up! */
 
 	return (void *) sp; /* Stacks grow up.  Fun. */
 }
@@ -265,24 +241,22 @@
 		/* regs->iaoq is undefined in the syscall return path */
 		err |= __put_user(regs->gr[31], &sc->sc_iaoq[0]);
 		err |= __put_user(regs->gr[31]+4, &sc->sc_iaoq[1]);
-#if DEBUG_SIG
-		printk("setup_sigcontext: iaoq %#lx/%#lx\n", regs->gr[31], regs->gr[31]);
-#endif
+		err |= __put_user(regs->sr[3], &sc->sc_iasq[0]);
+		err |= __put_user(regs->sr[3], &sc->sc_iasq[1]);
+		DBG(("setup_sigcontext: iaoq %#lx/%#lx\n",
+			regs->gr[31], regs->gr[31]));
 	} else {
 		err |= __copy_to_user(sc->sc_iaoq, regs->iaoq, sizeof(regs->iaoq));
 		err |= __copy_to_user(sc->sc_iasq, regs->iasq, sizeof(regs->iasq));
-#if DEBUG_SIG
-		printk("setup_sigcontext: iaoq %#lx/%#lx\n", regs->iaoq[0], regs->iaoq[1]);
-#endif
+		DBG(("setup_sigcontext: iaoq %#lx/%#lx\n", 
+			regs->iaoq[0], regs->iaoq[1]));
 	}
 
 	err |= __put_user(flags, &sc->sc_flags);
 	err |= __copy_to_user(sc->sc_gr, regs->gr, sizeof(regs->gr));
 	err |= __copy_to_user(sc->sc_fr, regs->fr, sizeof(regs->fr));
 	err |= __put_user(regs->sar, &sc->sc_sar);
-#if DEBUG_SIG
-	printk("setup_sigcontext: r28 is %ld\n", regs->gr[28]);
-#endif
+	DBG(("setup_sigcontext: r28 is %ld\n", regs->gr[28]));
 
 	return err;
 }
@@ -297,22 +271,9 @@
 	int err = 0;
 
 	usp = regs->gr[30];
-	/* access_ok is broken, so do a simplistic "are we stomping on
-           kernel space" assertion. */
-	if (usp > PAGE_OFFSET) {
-		printk("setup_rt_frame: called on kernel space (usp=%#lx),  NOW YOU MUST DIE!!!\n",
-		       usp);
-		show_regs(regs);
-		while(1);
-	}
-		
 	frame = get_sigframe(ka, usp, sizeof(*frame));
-	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
-		goto give_sigsegv;
 
-#if DEBUG_SIG
-	printk("setup_rt_frame 1: frame %p info %p\n", frame, info);
-#endif
+	DBG(("setup_rt_frame 1: frame %p info %p\n", frame, info));
 
 	err |= __copy_to_user(&frame->info, info, sizeof(siginfo_t));
 	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
@@ -337,8 +298,8 @@
 	{
 		int sid;
 		asm ("mfsp %%sr3,%0" : "=r" (sid));
-		printk("flushing 64 bytes at space %#x offset %p\n",
-		       sid, frame->tramp);
+		DBG(("flushing 64 bytes at space %#x offset %p\n",
+		       sid, frame->tramp));
 	}
 #endif
 
@@ -387,6 +348,7 @@
 	if (in_syscall)
 		regs->gr[31] = (HACK) haddr;
 	else {
+		regs->gr[0] = USER_PSW;
 		regs->iaoq[0] = (HACK) haddr | 3;
 		regs->iaoq[1] = regs->iaoq[0] + 4;
 	}
@@ -395,26 +357,20 @@
 	regs->gr[26] = sig;               /* signal number */
 	regs->gr[25] = (HACK) &frame->info; /* siginfo pointer */
 	regs->gr[24] = (HACK) &frame->uc;   /* ucontext pointer */
-#if DEBUG_SIG
-	printk("making sigreturn frame: %#lx + %#lx = %#lx\n",
+	DBG(("making sigreturn frame: %#lx + %#x = %#lx\n",
 	       regs->gr[30], PARISC_RT_SIGFRAME_SIZE,
-	       regs->gr[30] + PARISC_RT_SIGFRAME_SIZE);
-#endif
+	       regs->gr[30] + PARISC_RT_SIGFRAME_SIZE));
 	/* Raise the user stack pointer to make a proper call frame. */
 	regs->gr[30] = ((HACK) frame + PARISC_RT_SIGFRAME_SIZE);
 
-#if DEBUG_SIG
-	printk("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
+	DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
 	       current->comm, current->pid, frame, regs->gr[30],
-	       regs->iaoq[0], regs->iaoq[1], rp);
-#endif
+	       regs->iaoq[0], regs->iaoq[1], rp));
 
 	return 1;
 
 give_sigsegv:
-#if DEBUG_SIG
-	printk("fuckup in setup_rt_frame, sending SIGSEGV\n");
-#endif
+	DBG(("setup_rt_frame sending SIGSEGV\n"));
 	if (sig == SIGSEGV)
 		ka->sa.sa_handler = SIG_DFL;
 	si.si_signo = SIGSEGV;
@@ -437,10 +393,9 @@
 {
 	struct k_sigaction *ka = &current->sig->action[sig-1];
 
-#if DEBUG_SIG
-	printk("handle_signal(sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p)\n",
-	       sig, ka, info, oldset, regs);
-#endif
+	DBG(("handle_signal(sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p)\n",
+	       sig, ka, info, oldset, regs));
+	
 	/* Set up the stack frame */
 	if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall))
 		return 0;
@@ -449,11 +404,11 @@
 		ka->sa.sa_handler = SIG_DFL;
 
 	if (!(ka->sa.sa_flags & SA_NODEFER)) {
-		spin_lock_irq(&current->sigmask_lock);
+		spin_lock_irq(&current->sig->siglock);
 		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
 		sigaddset(&current->blocked,sig);
 		recalc_sigpending();
-		spin_unlock_irq(&current->sigmask_lock);
+		spin_unlock_irq(&current->sig->siglock);
 	}
 	return 1;
 }
@@ -469,6 +424,7 @@
  * registers).  As noted below, the syscall number gets restored for
  * us due to the magic of delayed branching.
  */
+
 asmlinkage int
 do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
 {
@@ -476,10 +432,9 @@
 	struct k_sigaction *ka;
 	int signr;
 
-#if DEBUG_SIG
-	printk("do_signal(oldset=0x%p, regs=0x%p, sr7 %#lx, pending %d, in_syscall=%d\n",
-	       oldset, regs, regs->sr[7], current->sigpending, in_syscall);
-#endif
+	DBG(("do_signal(oldset=0x%p, regs=0x%p, sr7 %#lx, pending %d, in_syscall=%d\n",
+	       oldset, regs, regs->sr[7], current->sigpending, in_syscall));
+
 	/* Everyone else checks to see if they are in kernel mode at
 	   this point and exits if that's the case.  I'm not sure why
 	   we would be called in that case, but for some reason we
@@ -488,9 +443,9 @@
 	if (!oldset)
 		oldset = &current->blocked;
 
-#if DEBUG_SIG
-	printk("do_signal: oldset %08lx:%08lx\n", oldset->sig[0], oldset->sig[1]);
-#endif
+	DBG(("do_signal: oldset %08lx:%08lx\n", 
+		oldset->sig[0], oldset->sig[1]));
+
 
 	signr = get_signal_to_deliver(&info, regs);
 	if (signr > 0) {
@@ -499,18 +454,14 @@
 			/* Check the return code */
 			switch (regs->gr[28]) {
 			case -ERESTARTNOHAND:
-#if DEBUG_SIG
-				printk("ERESTARTNOHAND: returning -EINTR\n");
-#endif
+				DBG(("ERESTARTNOHAND: returning -EINTR\n"));
 				regs->gr[28] = -EINTR;
 				break;
 
 			case -ERESTARTSYS:
 				ka = &current->sig->action[signr-1];
 				if (!(ka->sa.sa_flags & SA_RESTART)) {
-#if DEBUG_SIG
-					printk("ERESTARTSYS: putting -EINTR\n");
-#endif
+					DBG(("ERESTARTSYS: putting -EINTR\n"));
 					regs->gr[28] = -EINTR;
 					break;
 				}
@@ -529,9 +480,9 @@
 		   delivery failed, we need to continue to iterate in
 		   this loop so we can deliver the SIGSEGV... */
 		if (handle_signal(signr, &info, oldset, regs, in_syscall)) {
-#if DEBUG_SIG
-			printk("Exiting do_signal (success), regs->gr[28] = %ld\n", regs->gr[28]);
-#endif
+			DBG((KERN_DEBUG
+				"Exiting do_signal (success), regs->gr[28] = %ld\n",
+				regs->gr[28]));
 			return 1;
 		}
 	}
@@ -551,8 +502,9 @@
 			regs->gr[28] = regs->orig_r28;
 		}
 	}
-#if DEBUG_SIG
-	printk("Exiting do_signal (not delivered), regs->gr[28] = %ld\n", regs->gr[28]);
-#endif
+	
+	DBG(("Exiting do_signal (not delivered), regs->gr[28] = %ld\n", 
+		regs->gr[28]));
+
 	return 0;
 }
diff -Nru a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/signal32.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,214 @@
+/* mostly borrowed from kernel/signal.c */
+#include <linux/config.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/unistd.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+
+#include <asm/uaccess.h>
+#include "sys32.h"
+
+struct k_sigaction32 {
+	struct sigaction32 sa;
+};
+
+typedef unsigned int old_sigset_t32;
+
+static int
+put_old_sigset32(old_sigset_t32 *up, old_sigset_t *set)
+{
+	old_sigset_t32 set32 = *set;
+	return put_user(set32, up);
+}
+
+static int
+get_old_segset32(old_sigset_t32 *up, old_sigset_t *set)
+{
+	old_sigset_t32 set32;
+	int r;
+
+	if ((r = get_user(set32, up)) == 0)
+		*set = set32;
+
+	return r;
+}
+
+long
+sys32_sigpending(old_sigset_t32 *set)
+{
+	extern long sys_sigpending(old_sigset_t *set);
+	old_sigset_t pending;
+	int ret;
+
+	KERNEL_SYSCALL(ret, sys_sigpending, &pending);
+
+	/* can't put_user an old_sigset_t -- it is too big */
+	if (put_old_sigset32(set, &pending))
+		return -EFAULT;
+
+	return ret;
+}
+
+int sys32_sigprocmask(int how, old_sigset_t32 *set, 
+				 old_sigset_t32 *oset)
+{
+	extern int sys_sigprocmask(int how, old_sigset_t *set, 
+				 old_sigset_t *oset);
+	old_sigset_t s;
+	int ret;
+
+	if (set && get_old_segset32 (set, &s))
+		return -EFAULT;
+	KERNEL_SYSCALL(ret, sys_sigprocmask, how, set ? &s : NULL, oset ? &s : NULL);
+	if (!ret && oset && put_old_sigset32(oset, &s))
+		return -EFAULT;
+	return ret;
+}
+
+static inline void
+sigset_32to64(sigset_t *s64, sigset_t32 *s32)
+{
+	s64->sig[0] = s32->sig[0] | ((unsigned long)s32->sig[1] << 32);
+}
+
+static inline void
+sigset_64to32(sigset_t32 *s32, sigset_t *s64)
+{
+	s32->sig[0] = s64->sig[0] & 0xffffffffUL;
+	s32->sig[1] = (s64->sig[0] >> 32) & 0xffffffffUL;
+}
+
+static int
+put_sigset32(sigset_t32 *up, sigset_t *set, size_t sz)
+{
+	sigset_t32 s;
+
+	if (sz != sizeof *set) panic("put_sigset32()");
+	sigset_64to32(&s, set);
+
+	return copy_to_user(up, &s, sizeof s);
+}
+
+static int
+get_sigset32(sigset_t32 *up, sigset_t *set, size_t sz)
+{
+	sigset_t32 s;
+	int r;
+
+	if (sz != sizeof *set) panic("put_sigset32()");
+
+	if ((r = copy_from_user(&s, up, sz)) == 0) {
+		sigset_32to64(set, &s);
+	}
+
+	return r;
+}
+
+int sys32_rt_sigprocmask(int how, sigset_t32 *set, sigset_t32 *oset,
+				    unsigned int sigsetsize)
+{
+	extern long sys_rt_sigprocmask(int how,
+				    sigset_t *set, sigset_t *oset,
+				   size_t sigsetsize);
+	sigset_t old_set, new_set;
+	int ret;
+
+	if (set && get_sigset32(set, &new_set, sigsetsize))
+		return -EFAULT;
+	
+	KERNEL_SYSCALL(ret, sys_rt_sigprocmask, how, set ? &new_set : NULL,
+				 oset ? &old_set : NULL, sigsetsize);
+
+	if (!ret && oset && put_sigset32(oset, &old_set, sigsetsize))
+		return -EFAULT;
+
+	return ret;
+}
+
+
+int sys32_rt_sigpending(sigset_t32 *uset, unsigned int sigsetsize)
+{
+	int ret;
+	sigset_t set;
+	extern long sys_rt_sigpending(sigset_t *set, size_t sigsetsize);
+
+	KERNEL_SYSCALL(ret, sys_rt_sigpending, &set, sigsetsize);
+
+	if (!ret && put_sigset32(uset, &set, sigsetsize))
+		return -EFAULT;
+
+	return ret;
+}
+
+long
+sys32_rt_sigaction(int sig, const struct sigaction32 *act, struct sigaction32 *oact,
+                 size_t sigsetsize)
+{
+	struct k_sigaction32 new_sa32, old_sa32;
+	struct k_sigaction new_sa, old_sa;
+	int ret = -EINVAL;
+
+	if (act) {
+		if (copy_from_user(&new_sa32.sa, act, sizeof new_sa32.sa))
+			return -EFAULT;
+		new_sa.sa.sa_handler = (__sighandler_t)(unsigned long)new_sa32.sa.sa_handler;
+		new_sa.sa.sa_flags = new_sa32.sa.sa_flags;
+		sigset_32to64(&new_sa.sa.sa_mask, &new_sa32.sa.sa_mask);
+	}
+
+	ret = do_sigaction(sig, act ? &new_sa : NULL, oact ? &old_sa : NULL);
+
+	if (!ret && oact) {
+		sigset_64to32(&old_sa32.sa.sa_mask, &old_sa.sa.sa_mask);
+		old_sa32.sa.sa_flags = old_sa.sa.sa_flags;
+		old_sa32.sa.sa_handler = (__sighandler_t32)(unsigned long)old_sa.sa.sa_handler;
+		if (copy_to_user(oact, &old_sa32.sa, sizeof old_sa32.sa))
+			return -EFAULT;
+	}
+	return ret;
+}
+
+typedef struct {
+	unsigned int ss_sp;
+	int ss_flags;
+	__kernel_size_t32 ss_size;
+} stack_t32;
+
+int 
+do_sigaltstack32 (const stack_t32 *uss32, stack_t32 *uoss32, unsigned long sp)
+{
+	stack_t32 ss32, oss32;
+	stack_t ss, oss;
+	stack_t *ssp = NULL, *ossp = NULL;
+	int ret;
+
+	if (uss32) {
+		if (copy_from_user(&ss32, uss32, sizeof ss32))
+			return -EFAULT;
+
+		ss.ss_sp = (void *)(unsigned long)ss32.ss_sp;
+		ss.ss_flags = ss32.ss_flags;
+		ss.ss_size = ss32.ss_size;
+
+		ssp = &ss;
+	}
+
+	if (uoss32)
+		ossp = &oss;
+
+	KERNEL_SYSCALL(ret, do_sigaltstack, ssp, ossp, sp);
+
+	if (!ret && uoss32) {
+		oss32.ss_sp = (unsigned int)(unsigned long)oss.ss_sp;
+		oss32.ss_flags = oss.ss_flags;
+		oss32.ss_size = oss.ss_size;
+		if (copy_to_user(uoss32, &oss32, sizeof *uoss32))
+			return -EFAULT;
+	}
+
+	return ret;
+}
diff -Nru a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/smp.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,820 @@
+/*
+** SMP Support
+**
+** Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
+** Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+** Copyright (C) 2001 Grant Grundler <grundler@parisc-linux.org>
+** 
+** Lots of stuff stolen from arch/alpha/kernel/smp.c
+** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^)
+**
+** Thanks to John Curry and Ullas Ponnadi. I learned alot from their work.
+** -grant (1/12/2001)
+**
+**	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 __KERNEL_SYSCALLS__
+#undef ENTRY_SYS_CPUS	/* syscall support for iCOD-like functionality */
+
+#include <linux/autoconf.h>
+
+#include <linux/types.h>
+#include <linux/spinlock.h>
+#include <linux/slab.h>
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/smp.h>
+#include <linux/kernel_stat.h>
+#include <linux/mm.h>
+#include <linux/delay.h>
+
+#include <asm/system.h>
+#include <asm/atomic.h>
+#include <asm/bitops.h>
+#include <asm/current.h>
+#include <asm/delay.h>
+#include <asm/pgalloc.h>	/* for flush_tlb_all() proto/macro */
+
+#include <asm/io.h>
+#include <asm/irq.h>		/* for CPU_IRQ_REGION and friends */
+#include <asm/mmu_context.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/pgalloc.h>
+#include <asm/processor.h>
+#include <asm/ptrace.h>
+#include <asm/unistd.h>
+#include <asm/cacheflush.h>
+
+#define kDEBUG 0
+
+spinlock_t pa_dbit_lock = SPIN_LOCK_UNLOCKED;
+
+spinlock_t smp_lock = SPIN_LOCK_UNLOCKED;
+
+volatile struct task_struct *smp_init_current_idle_task;
+
+static volatile int smp_commenced = 0;   /* Set when the idlers are all forked */
+static volatile int cpu_now_booting = 0;      /* track which CPU is booting */
+volatile unsigned long cpu_online_map = 0;   /* Bitmap of online CPUs */
+#define IS_LOGGED_IN(cpunum) (test_bit(cpunum, (atomic_t *)&cpu_online_map))
+
+int smp_num_cpus = 1;
+int smp_threads_ready = 0;
+unsigned long cache_decay_ticks;
+static int max_cpus = -1;			     /* Command line */
+unsigned long cpu_present_mask;
+
+struct smp_call_struct {
+	void (*func) (void *info);
+	void *info;
+	long wait;
+	atomic_t unstarted_count;
+	atomic_t unfinished_count;
+};
+static volatile struct smp_call_struct *smp_call_function_data;
+
+enum ipi_message_type {
+	IPI_NOP=0,
+	IPI_RESCHEDULE=1,
+	IPI_CALL_FUNC,
+	IPI_CPU_START,
+	IPI_CPU_STOP,
+	IPI_CPU_TEST
+};
+
+
+/********** SMP inter processor interrupt and communication routines */
+
+#undef PER_CPU_IRQ_REGION
+#ifdef PER_CPU_IRQ_REGION
+/* XXX REVISIT Ignore for now.
+**    *May* need this "hook" to register IPI handler
+**    once we have perCPU ExtIntr switch tables.
+*/
+static void
+ipi_init(int cpuid)
+{
+
+	/* If CPU is present ... */
+#ifdef ENTRY_SYS_CPUS
+	/* *and* running (not stopped) ... */
+#error iCOD support wants state checked here.
+#endif
+
+#error verify IRQ_OFFSET(IPI_IRQ) is ipi_interrupt() in new IRQ region
+
+	if(IS_LOGGED_IN(cpuid) )
+	{
+		switch_to_idle_task(current);
+	}
+
+	return;
+}
+#endif
+
+
+/*
+** Yoink this CPU from the runnable list... 
+**
+*/
+static void
+halt_processor(void) 
+{
+#ifdef ENTRY_SYS_CPUS
+#error halt_processor() needs rework
+/*
+** o migrate I/O interrupts off this CPU.
+** o leave IPI enabled - __cli() will disable IPI.
+** o leave CPU in online map - just change the state
+*/
+	cpu_data[this_cpu].state = STATE_STOPPED;
+	mark_bh(IPI_BH);
+#else
+	/* REVISIT : redirect I/O Interrupts to another CPU? */
+	/* REVISIT : does PM *know* this CPU isn't available? */
+	clear_bit(smp_processor_id(), (void *)&cpu_online_map);
+	local_irq_disable();
+	for (;;)
+		;
+#endif
+}
+
+
+void
+ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs) 
+{
+	int this_cpu = smp_processor_id();
+	struct cpuinfo_parisc *p = &cpu_data[this_cpu];
+	unsigned long ops;
+	unsigned long flags;
+
+	/* Count this now; we may make a call that never returns. */
+	p->ipi_count++;
+
+	mb();	/* Order interrupt and bit testing. */
+
+	for (;;) {
+		spin_lock_irqsave(&(p->lock),flags);
+		ops = p->pending_ipi;
+		p->pending_ipi = 0;
+		spin_unlock_irqrestore(&(p->lock),flags);
+
+		mb(); /* Order bit clearing and data access. */
+
+		if (!ops)
+		    break;
+
+		while (ops) {
+			unsigned long which = ffz(~ops);
+
+			switch (which) {
+			case IPI_RESCHEDULE:
+#if (kDEBUG>=100)
+				printk(KERN_DEBUG "CPU%d IPI_RESCHEDULE\n",this_cpu);
+#endif /* kDEBUG */
+				ops &= ~(1 << IPI_RESCHEDULE);
+				/*
+				 * Reschedule callback.  Everything to be
+				 * done is done by the interrupt return path.
+				 */
+				break;
+
+			case IPI_CALL_FUNC:
+#if (kDEBUG>=100)
+				printk(KERN_DEBUG "CPU%d IPI_CALL_FUNC\n",this_cpu);
+#endif /* kDEBUG */
+				ops &= ~(1 << IPI_CALL_FUNC);
+				{
+					volatile struct smp_call_struct *data;
+					void (*func)(void *info);
+					void *info;
+					int wait;
+
+					data = smp_call_function_data;
+					func = data->func;
+					info = data->info;
+					wait = data->wait;
+
+					mb();
+					atomic_dec ((atomic_t *)&data->unstarted_count);
+
+					/* At this point, *data can't
+					 * be relied upon.
+					 */
+
+					(*func)(info);
+
+					/* Notify the sending CPU that the
+					 * task is done.
+					 */
+					mb();
+					if (wait)
+						atomic_dec ((atomic_t *)&data->unfinished_count);
+				}
+				break;
+
+			case IPI_CPU_START:
+#if (kDEBUG>=100)
+				printk(KERN_DEBUG "CPU%d IPI_CPU_START\n",this_cpu);
+#endif /* kDEBUG */
+				ops &= ~(1 << IPI_CPU_START);
+#ifdef ENTRY_SYS_CPUS
+				p->state = STATE_RUNNING;
+#endif
+				break;
+
+			case IPI_CPU_STOP:
+#if (kDEBUG>=100)
+				printk(KERN_DEBUG "CPU%d IPI_CPU_STOP\n",this_cpu);
+#endif /* kDEBUG */
+				ops &= ~(1 << IPI_CPU_STOP);
+#ifdef ENTRY_SYS_CPUS
+#else
+				halt_processor();
+#endif
+				break;
+
+			case IPI_CPU_TEST:
+#if (kDEBUG>=100)
+				printk(KERN_DEBUG "CPU%d is alive!\n",this_cpu);
+#endif /* kDEBUG */
+				ops &= ~(1 << IPI_CPU_TEST);
+				break;
+
+			default:
+				printk(KERN_CRIT "Unknown IPI num on CPU%d: %lu\n",
+					this_cpu, which);
+				ops &= ~(1 << which);
+				return;
+			} /* Switch */
+		} /* while (ops) */
+	}
+	return;
+}
+
+
+static inline void
+ipi_send(int cpu, enum ipi_message_type op)
+{
+	struct cpuinfo_parisc *p = &cpu_data[cpu];
+	unsigned long flags;
+
+	spin_lock_irqsave(&(p->lock),flags);
+	p->pending_ipi |= 1 << op;
+	__raw_writel(IRQ_OFFSET(IPI_IRQ), cpu_data[cpu].hpa);
+	spin_unlock_irqrestore(&(p->lock),flags);
+}
+
+
+static inline void
+send_IPI_single(int dest_cpu, enum ipi_message_type op)
+{
+	if (dest_cpu == NO_PROC_ID) {
+		BUG();
+		return;
+	}
+
+	ipi_send(dest_cpu, op);
+}
+
+static inline void
+send_IPI_allbutself(enum ipi_message_type op)
+{
+	int i;
+	
+	for (i = 0; i < smp_num_cpus; i++) {
+		if (i != smp_processor_id())
+			send_IPI_single(i, op);
+	}
+}
+
+inline void 
+smp_send_stop(void)	{ send_IPI_allbutself(IPI_CPU_STOP); }
+
+static inline void
+smp_send_start(void)	{ send_IPI_allbutself(IPI_CPU_START); }
+
+void 
+smp_send_reschedule(int cpu) { send_IPI_single(cpu, IPI_RESCHEDULE); }
+
+
+/**
+ * Run a function on all other CPUs.
+ *  <func>	The function to run. This must be fast and non-blocking.
+ *  <info>	An arbitrary pointer to pass to the function.
+ *  <retry>	If true, keep retrying until ready.
+ *  <wait>	If true, wait until function has completed on other CPUs.
+ *  [RETURNS]   0 on success, else a negative status code.
+ *
+ * Does not return until remote CPUs are nearly ready to execute <func>
+ * or have executed.
+ */
+
+int
+smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
+{
+	struct smp_call_struct data;
+	long timeout;
+	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+	
+	data.func = func;
+	data.info = info;
+	data.wait = wait;
+	atomic_set(&data.unstarted_count, smp_num_cpus - 1);
+	atomic_set(&data.unfinished_count, smp_num_cpus - 1);
+
+	if (retry) {
+		spin_lock (&lock);
+		while (smp_call_function_data != 0)
+			barrier();
+	}
+	else {
+		spin_lock (&lock);
+		if (smp_call_function_data) {
+			spin_unlock (&lock);
+			return -EBUSY;
+		}
+	}
+
+	smp_call_function_data = &data;
+	spin_unlock (&lock);
+	
+	/*  Send a message to all other CPUs and wait for them to respond  */
+	send_IPI_allbutself(IPI_CALL_FUNC);
+
+	/*  Wait for response  */
+	timeout = jiffies + HZ;
+	while ( (atomic_read (&data.unstarted_count) > 0) &&
+		time_before (jiffies, timeout) )
+		barrier ();
+
+	/* We either got one or timed out. Release the lock */
+
+	mb();
+	smp_call_function_data = NULL;
+	if (atomic_read (&data.unstarted_count) > 0) {
+		printk(KERN_CRIT "SMP CALL FUNCTION TIMED OUT! (cpu=%d)\n",
+		      smp_processor_id());
+		return -ETIMEDOUT;
+	}
+
+	while (wait && atomic_read (&data.unfinished_count) > 0)
+			barrier ();
+
+	return 0;
+}
+
+
+
+/*
+ *	Setup routine for controlling SMP activation
+ *
+ *	Command-line option of "nosmp" or "maxcpus=0" will disable SMP
+ *	activation entirely (the MPS table probe still happens, though).
+ *
+ *	Command-line option of "maxcpus=<NUM>", where <NUM> is an integer
+ *	greater than 0, limits the maximum number of CPUs activated in
+ *	SMP mode to <NUM>.
+ */
+
+static int __init nosmp(char *str)
+{
+	max_cpus = 0;
+	return 1;
+}
+
+__setup("nosmp", nosmp);
+
+static int __init maxcpus(char *str)
+{
+	get_option(&str, &max_cpus);
+	return 1;
+}
+
+__setup("maxcpus=", maxcpus);
+
+/*
+ * Flush all other CPU's tlb and then mine.  Do this with smp_call_function()
+ * as we want to ensure all TLB's flushed before proceeding.
+ */
+
+extern void flush_tlb_all_local(void);
+
+void
+smp_flush_tlb_all(void)
+{
+	smp_call_function((void (*)(void *))flush_tlb_all_local, NULL, 1, 1);
+	flush_tlb_all_local();
+}
+
+
+void 
+smp_do_timer(struct pt_regs *regs)
+{
+	int cpu = smp_processor_id();
+	struct cpuinfo_parisc *data = &cpu_data[cpu];
+
+        if (!--data->prof_counter) {
+		data->prof_counter = data->prof_multiplier;
+		update_process_times(user_mode(regs));
+	}
+}
+
+/*
+ * Called by secondaries to update state and initialize CPU registers.
+ */
+static void __init
+smp_cpu_init(int cpunum)
+{
+	extern int init_per_cpu(int);  /* arch/parisc/kernel/setup.c */
+	extern void init_IRQ(void);    /* arch/parisc/kernel/irq.c */
+
+	/* Set modes and Enable floating point coprocessor */
+	(void) init_per_cpu(cpunum);
+
+	disable_sr_hashing();
+
+	mb();
+
+	/* Well, support 2.4 linux scheme as well. */
+	if (test_and_set_bit(cpunum, (unsigned long *) (&cpu_online_map)))
+	{
+		extern void machine_halt(void); /* arch/parisc.../process.c */
+
+		printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
+		machine_halt();
+	}  
+
+	/* Initialise the idle task for this CPU */
+	atomic_inc(&init_mm.mm_count);
+	current->active_mm = &init_mm;
+	if(current->mm)
+		BUG();
+	enter_lazy_tlb(&init_mm, current, cpunum);
+
+	init_IRQ();   /* make sure no IRQ's are enabled or pending */
+}
+
+
+/*
+ * Slaves start using C here. Indirectly called from smp_slave_stext.
+ * Do what start_kernel() and main() do for boot strap processor (aka monarch)
+ */
+void __init smp_callin(void)
+{
+	extern void cpu_idle(void);	/* arch/parisc/kernel/process.c */
+	int slave_id = cpu_now_booting;
+#if 0
+	void *istack;
+#endif
+
+	smp_cpu_init(slave_id);
+
+#if 0	/* NOT WORKING YET - see entry.S */
+	istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER);
+	if (istack == NULL) {
+	    printk(KERN_CRIT "Failed to allocate interrupt stack for cpu %d\n",slave_id);
+	    BUG();
+	}
+	mtctl(istack,31);
+#endif
+
+	flush_cache_all_local(); /* start with known state */
+	flush_tlb_all_local();
+
+	local_irq_enable();  /* Interrupts have been off until now */
+
+	/* Slaves wait here until Big Poppa daddy say "jump" */
+	mb();	/* PARANOID */
+	while (!smp_commenced) ;
+	mb();	/* PARANOID */
+
+	cpu_idle();      /* Wait for timer to schedule some work */
+
+	/* NOTREACHED */
+	panic("smp_callin() AAAAaaaaahhhh....\n");
+}
+
+/*
+ * Create the idle task for a new Slave CPU.  DO NOT use kernel_thread()
+ * because that could end up calling schedule(). If it did, the new idle
+ * task could get scheduled before we had a chance to remove it from the
+ * run-queue...
+ */
+static struct task_struct *fork_by_hand(void)
+{
+	struct pt_regs regs;  
+
+	/*
+	 * don't care about the regs settings since
+	 * we'll never reschedule the forked task.
+	 */
+	return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL);
+}
+
+
+/*
+ * Bring one cpu online.
+ */
+static int smp_boot_one_cpu(int cpuid, int cpunum)
+{
+	struct task_struct *idle;
+	long timeout;
+
+	/* 
+	 * Create an idle task for this CPU.  Note the address wed* give 
+	 * to kernel_thread is irrelevant -- it's going to start
+	 * where OS_BOOT_RENDEVZ vector in SAL says to start.  But
+	 * this gets all the other task-y sort of data structures set
+	 * up like we wish.   We need to pull the just created idle task 
+	 * off the run queue and stuff it into the init_tasks[] array.  
+	 * Sheesh . . .
+	 */
+
+	if ((idle = fork_by_hand()) == 0) 
+		panic("SMP: fork failed for CPU:%d", cpuid);
+
+	init_idle(idle, cpunum);
+	unhash_process(idle);
+	idle->thread_info->cpu = cpunum;
+
+	/* Let _start know what logical CPU we're booting
+	** (offset into init_tasks[],cpu_data[])
+	*/
+	cpu_now_booting = cpunum;
+
+	/* 
+	** boot strap code needs to know the task address since
+	** it also contains the process stack.
+	*/
+	smp_init_current_idle_task = idle ;
+	mb();
+
+	/*
+	** This gets PDC to release the CPU from a very tight loop.
+	** See MEM_RENDEZ comments in head.S.
+	*/
+	__raw_writel(IRQ_OFFSET(TIMER_IRQ), cpu_data[cpunum].hpa);
+	mb();
+
+	/* 
+	 * OK, wait a bit for that CPU to finish staggering about. 
+	 * Slave will set a bit when it reaches smp_cpu_init() and then
+	 * wait for smp_commenced to be 1.
+	 * Once we see the bit change, we can move on.
+	 */
+	for (timeout = 0; timeout < 10000; timeout++) {
+		if(IS_LOGGED_IN(cpunum)) {
+			/* Which implies Slave has started up */
+			cpu_now_booting = 0;
+			smp_init_current_idle_task = NULL;
+			goto alive ;
+		}
+		udelay(100);
+		barrier();
+	}
+
+	put_task_struct(idle);
+	idle = NULL;
+
+	printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid);
+	return -1;
+
+alive:
+	/* Remember the Slave data */
+#if (kDEBUG>=100)
+	printk(KERN_DEBUG "SMP: CPU:%d (num %d) came alive after %ld _us\n",
+		cpuid,  cpunum, timeout * 100);
+#endif /* kDEBUG */
+#ifdef ENTRY_SYS_CPUS
+	cpu_data[cpunum].state = STATE_RUNNING;
+#endif
+	return 0;
+}
+
+
+
+
+/*
+** inventory.c:do_inventory() has already 'discovered' the additional CPU's.
+** We are ready to wrest them from PDC's control now.
+** Called by smp_init bring all the secondaries online and hold them.  
+**
+** o Setup of the IPI irq handler is done in irq.c.
+** o MEM_RENDEZ is initialzed in head.S:stext()
+**
+*/
+void __init smp_boot_cpus(void)
+{
+	int i, cpu_count = 1;
+	unsigned long bogosum = loops_per_jiffy; /* Count Monarch */
+
+	/* REVISIT - assumes first CPU reported by PAT PDC is BSP */
+	int bootstrap_processor=cpu_data[0].cpuid;	/* CPU ID of BSP */
+
+	/* Setup BSP mappings */
+	printk(KERN_DEBUG "SMP: bootstrap CPU ID is %d\n",bootstrap_processor);
+	init_task.thread_info->cpu = bootstrap_processor; 
+	current->thread_info->cpu = bootstrap_processor;
+	cpu_online_map = 1 << bootstrap_processor; /* Mark Boostrap processor as present */
+	current->active_mm = &init_mm;
+
+#ifdef ENTRY_SYS_CPUS
+	cpu_data[0].state = STATE_RUNNING;
+#endif
+	cpu_present_mask = 1UL << bootstrap_processor;
+
+	/* Nothing to do when told not to.  */
+	if (max_cpus == 0) {
+		printk(KERN_INFO "SMP mode deactivated.\n");
+		return;
+	}
+
+	if (max_cpus != -1) 
+		printk(KERN_INFO "Limiting CPUs to %d\n", max_cpus);
+
+	/* We found more than one CPU.... */
+	if (boot_cpu_data.cpu_count > 1) {
+
+		for (i = 0; i < NR_CPUS; i++) {
+			if (cpu_data[i].cpuid == NO_PROC_ID || 
+			    cpu_data[i].cpuid == bootstrap_processor)
+				continue;
+
+			if (smp_boot_one_cpu(cpu_data[i].cpuid, cpu_count) < 0)
+				continue;
+
+			bogosum += loops_per_jiffy;
+			cpu_count++; /* Count good CPUs only... */
+			
+			cpu_present_mask |= 1UL << i;
+			
+			/* Bail when we've started as many CPUS as told to */
+			if (cpu_count == max_cpus)
+				break;
+		}
+	}
+	if (cpu_count == 1) {
+		printk(KERN_INFO "SMP: Bootstrap processor only.\n");
+	}
+
+	/*
+	 * FIXME very rough.
+	 */
+	cache_decay_ticks = HZ/100;
+
+	printk(KERN_INFO "SMP: Total %d of %d processors activated "
+	       "(%lu.%02lu BogoMIPS noticed) (Present Mask: %lu).\n",
+	       cpu_count, boot_cpu_data.cpu_count, (bogosum + 25) / 5000,
+	       ((bogosum + 25) / 50) % 100, cpu_present_mask);
+
+	smp_num_cpus = cpu_count;
+#ifdef PER_CPU_IRQ_REGION
+	ipi_init();
+#endif
+	return;
+}
+
+/* 
+ * Called from main.c by Monarch Processor.
+ * After this, any CPU can schedule any task.
+ */
+void smp_commence(void)
+{
+	smp_commenced = 1;
+	mb();
+	return;
+}
+
+/*
+ * XXX FIXME : do nothing
+ */
+void smp_cpus_done(unsigned int cpu_max)
+{
+	smp_threads_ready = 1;
+}
+
+void __init smp_prepare_cpus(unsigned int max_cpus)
+{
+	smp_boot_cpus();
+}
+
+int __devinit __cpu_up(unsigned int cpu)
+{
+	return cpu_online(cpu) ? 0 : -ENOSYS;
+}
+
+
+
+#ifdef ENTRY_SYS_CPUS
+/* Code goes along with:
+**    entry.s:        ENTRY_NAME(sys_cpus)   / * 215, for cpu stat * /
+*/
+int sys_cpus(int argc, char **argv)
+{
+	int i,j=0;
+	extern int current_pid(int cpu);
+
+	if( argc > 2 ) {
+		printk("sys_cpus:Only one argument supported\n");
+		return (-1);
+	}
+	if ( argc == 1 ){
+	
+#ifdef DUMP_MORE_STATE
+		for(i=0; i<NR_CPUS; i++) {
+			int cpus_per_line = 4;
+			if(IS_LOGGED_IN(i)) {
+				if (j++ % cpus_per_line)
+					printk(" %3d",i);
+				else
+					printk("\n %3d",i);
+			}
+		}
+		printk("\n"); 
+#else
+	    	printk("\n 0\n"); 
+#endif
+	} else if((argc==2) && !(strcmp(argv[1],"-l"))) {
+		printk("\nCPUSTATE  TASK CPUNUM CPUID HARDCPU(HPA)\n");
+#ifdef DUMP_MORE_STATE
+		for(i=0;i<NR_CPUS;i++) {
+			if (!IS_LOGGED_IN(i))
+				continue;
+			if (cpu_data[i].cpuid != NO_PROC_ID) {
+				switch(cpu_data[i].state) {
+					case STATE_RENDEZVOUS:
+						printk("RENDEZVS ");
+						break;
+					case STATE_RUNNING:
+						printk((current_pid(i)!=0) ? "RUNNING  " : "IDLING   ");
+						break;
+					case STATE_STOPPED:
+						printk("STOPPED  ");
+						break;
+					case STATE_HALTED:
+						printk("HALTED   ");
+						break;
+					default:
+						printk("%08x?", cpu_data[i].state);
+						break;
+				}
+				if(IS_LOGGED_IN(i)) {
+					printk(" %4d",current_pid(i));
+				}	
+				printk(" %6d",cpu_number_map(i));
+				printk(" %5d",i);
+				printk(" 0x%lx\n",cpu_data[i].hpa);
+			}	
+		}
+#else
+		printk("\n%s  %4d      0     0 --------",
+			(current->pid)?"RUNNING ": "IDLING  ",current->pid); 
+#endif
+	} else if ((argc==2) && !(strcmp(argv[1],"-s"))) { 
+#ifdef DUMP_MORE_STATE
+     		printk("\nCPUSTATE   CPUID\n");
+		for (i=0;i<NR_CPUS;i++) {
+			if (!IS_LOGGED_IN(i))
+				continue;
+			if (cpu_data[i].cpuid != NO_PROC_ID) {
+				switch(cpu_data[i].state) {
+					case STATE_RENDEZVOUS:
+						printk("RENDEZVS");break;
+					case STATE_RUNNING:
+						printk((current_pid(i)!=0) ? "RUNNING " : "IDLING");
+						break;
+					case STATE_STOPPED:
+						printk("STOPPED ");break;
+					case STATE_HALTED:
+						printk("HALTED  ");break;
+					default:
+				}
+				printk("  %5d\n",i);
+			}	
+		}
+#else
+		printk("\n%s    CPU0",(current->pid==0)?"RUNNING ":"IDLING  "); 
+#endif
+	} else {
+		printk("sys_cpus:Unknown request\n");
+		return (-1);
+	}
+	return 0;
+}
+#endif /* ENTRY_SYS_CPUS */
+
+#ifdef CONFIG_PROC_FS
+int __init
+setup_profiling_timer(unsigned int multiplier)
+{
+	return -EINVAL;
+}
+#endif
diff -Nru a/arch/parisc/kernel/sys32.h b/arch/parisc/kernel/sys32.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/sys32.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,33 @@
+#ifndef _PARISC64_KERNEL_SYS32_H
+#define _PARISC64_KERNEL_SYS32_H
+
+/* Call a kernel syscall which will use kernel space instead of user
+ * space for its copy_to/from_user.
+ */
+#define KERNEL_SYSCALL(ret, syscall, args...) \
+{ \
+    mm_segment_t old_fs = get_fs(); \
+    set_fs(KERNEL_DS); \
+    ret = syscall(args); \
+    set_fs (old_fs); \
+}
+
+struct timeval32 {
+	int tv_sec;
+	int tv_usec;
+};
+
+typedef __u32 __sighandler_t32;
+
+#include <linux/signal.h>
+typedef struct {
+	unsigned int sig[_NSIG_WORDS * 2];
+} sigset_t32;
+
+struct sigaction32 {
+	__sighandler_t32 sa_handler;
+	unsigned int sa_flags;
+	sigset_t32 sa_mask;		/* mask last for extensibility */
+};
+
+#endif
diff -Nru a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
--- a/arch/parisc/kernel/sys_parisc.c	Wed Oct 30 16:44:32 2002
+++ b/arch/parisc/kernel/sys_parisc.c	Wed Oct 30 16:44:32 2002
@@ -1,7 +1,7 @@
 /*
  * linux/arch/parisc/kernel/sys_parisc.c
  *
- * this implements the missing syscalls.
+ * this implements syscalls which are handled per-arch.
  */
 
 #include <asm/uaccess.h>
@@ -10,26 +10,15 @@
 #include <linux/linkage.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
+#include <linux/shm.h>
 #include <linux/smp_lock.h>
 
-/* for some reason, "old_readdir" is the only syscall which does not begin
- * with "sys_", which breaks the ENTRY_* macros in syscall.S so I "fixed"
- * it here.
- */
-
-int sys_old_readdir(unsigned int fd, void *dirent, unsigned int count)
-{
-    return old_readdir(fd, dirent, count);
-}
-
 int sys_pipe(int *fildes)
 {
 	int fd[2];
 	int error;
 
-	lock_kernel();
 	error = do_pipe(fd);
-	unlock_kernel();
 	if (!error) {
 		if (copy_to_user(fildes, fd, 2*sizeof(int)))
 			error = -EFAULT;
@@ -37,40 +26,117 @@
 	return error;
 }
 
-int sys_mmap(unsigned long addr, unsigned long len,
-		unsigned long prot, unsigned long flags, unsigned long fd,
-		unsigned long offset)
+static unsigned long get_unshared_area(unsigned long addr, unsigned long len)
 {
-	struct file * file = NULL;
-	int error;
+	struct vm_area_struct *vma;
 
-	down_write(&current->mm->mmap_sem);
-	lock_kernel();
+	if (!addr)
+		addr = TASK_UNMAPPED_BASE;
+	addr = PAGE_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;
+	}
+}
+
+#define DCACHE_ALIGN(addr) (((addr) + (SHMLBA - 1)) &~ (SHMLBA - 1))
+
+static unsigned long get_shared_area(struct inode *inode, unsigned long addr,
+		unsigned long len, unsigned long pgoff)
+{
+	struct vm_area_struct *vma, *first_vma;
+	int offset;
+
+	first_vma = list_entry(inode->i_mapping->i_mmap_shared.next, struct vm_area_struct, shared);
+	offset = (first_vma->vm_start + ((pgoff - first_vma->vm_pgoff) << PAGE_SHIFT)) & (SHMLBA - 1);
+
+	if (!addr)
+		addr = TASK_UNMAPPED_BASE;
+	addr = DCACHE_ALIGN(addr - offset) + offset;
+
+	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 = DCACHE_ALIGN(vma->vm_end - offset) + offset;
+		if (addr < vma->vm_end) /* handle wraparound */
+			return -ENOMEM;
+	}
+}
+
+unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
+		unsigned long len, unsigned long pgoff, unsigned long flags)
+{
+	struct inode *inode = NULL;
+
+	if (len > TASK_SIZE)
+		return -ENOMEM;
+
+	if (filp) {
+		inode = filp->f_dentry->d_inode;
+	}
+
+	if (inode && (flags & MAP_SHARED) && (!list_empty(&inode->i_mapping->i_mmap_shared))) {
+		addr = get_shared_area(inode, addr, len, pgoff);
+	} else {
+		addr = get_unshared_area(addr, len);
+	}
+	return addr;
+}
+
+static unsigned long do_mmap2(unsigned long addr, unsigned long len,
+	unsigned long prot, unsigned long flags, unsigned long fd,
+	unsigned long pgoff)
+{
+	struct file * file = NULL;
+	unsigned long error = -EBADF;
 	if (!(flags & MAP_ANONYMOUS)) {
-		error = -EBADF;
 		file = fget(fd);
 		if (!file)
 			goto out;
 	}
+
 	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
-	error = do_mmap(file, addr, len, prot, flags, offset);
+
+	down_write(&current->mm->mmap_sem);
+	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+	up_write(&current->mm->mmap_sem);
+
 	if (file != NULL)
 		fput(file);
 out:
-	unlock_kernel();
-	up_write(&current->mm->mmap_sem);
 	return error;
 }
 
-int sys_ioperm(unsigned long from, unsigned long num, int on)
+asmlinkage unsigned long sys_mmap2(unsigned long addr, unsigned long len,
+	unsigned long prot, unsigned long flags, unsigned long fd,
+	unsigned long pgoff)
 {
-	return -ENOSYS;
+	/* Make sure the shift for mmap2 is constant (12), no matter what PAGE_SIZE
+	   we have. */
+	return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT - 12));
 }
 
-long sys_shmat_wrapper(int shmid, void *shmaddr, int shmflag)
+asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
+		unsigned long prot, unsigned long flags, unsigned long fd,
+		unsigned long offset)
+{
+	if (!(offset & ~PAGE_MASK)) {
+		return do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
+	} else {
+		return -EINVAL;
+	}
+}
+
+long sys_shmat_wrapper(int shmid, char *shmaddr, int shmflag)
 {
-	extern int sys_shmat(int shmid, char *shmaddr, int shmflg,
-			     unsigned long * raddr);
 	unsigned long raddr;
 	int r;
 
@@ -78,4 +144,115 @@
 	if (r < 0)
 		return r;
 	return raddr;
+}
+
+
+/*
+ * FIXME, please remove this crap as soon as possible
+ *
+ * This is here to fix up broken glibc structures, 
+ * which are already fixed in newer glibcs
+ */
+#include <linux/msg.h>
+#include <linux/sem.h>
+#include <linux/shm.h>
+#include "sys32.h"
+
+struct broken_ipc_perm
+{
+    key_t key;			/* Key.  */
+    uid_t uid;			/* Owner's user ID.  */
+    gid_t gid;			/* Owner's group ID.  */
+    uid_t cuid;			/* Creator's user ID.  */
+    gid_t cgid;			/* Creator's group ID.  */
+    unsigned short int mode;		/* Read/write permission.  */
+    unsigned short int __pad1;
+    unsigned short int seq;		/* Sequence number.  */
+    unsigned short int __pad2;
+    unsigned long int __unused1;
+    unsigned long int __unused2;
+};
+		    
+struct broken_shmid64_ds {
+	struct broken_ipc_perm	shm_perm;	/* operation perms */
+	size_t			shm_segsz;	/* size of segment (bytes) */
+#ifndef __LP64__
+	unsigned int		__pad1;
+#endif
+	__kernel_time_t		shm_atime;	/* last attach time */
+#ifndef __LP64__
+	unsigned int		__pad2;
+#endif
+	__kernel_time_t		shm_dtime;	/* last detach time */
+#ifndef __LP64__
+	unsigned int		__pad3;
+#endif
+	__kernel_time_t		shm_ctime;	/* last change time */
+	__kernel_pid_t		shm_cpid;	/* pid of creator */
+	__kernel_pid_t		shm_lpid;	/* pid of last operator */
+	unsigned int		shm_nattch;	/* no. of current attaches */
+	unsigned int		__unused1;
+	unsigned int		__unused2;
+};
+
+static void convert_broken_perm (struct broken_ipc_perm *out, struct ipc64_perm *in)
+{
+	out->key  = in->key;
+	out->uid  = in->uid;
+	out->gid  = in->gid;
+	out->cuid = in->cuid;
+	out->cgid = in->cgid;
+	out->mode = in->mode;
+	out->seq  = in->seq;
+}
+
+static int copyout_broken_shmid64(struct broken_shmid64_ds *buf, struct shmid64_ds *sbuf)
+{
+	struct broken_shmid64_ds tbuf;
+	
+	memset(&tbuf, 0, sizeof tbuf);
+	convert_broken_perm (&tbuf.shm_perm, &sbuf->shm_perm);
+	tbuf.shm_segsz = sbuf->shm_segsz;
+	tbuf.shm_atime = sbuf->shm_atime;
+	tbuf.shm_dtime = sbuf->shm_dtime;
+	tbuf.shm_ctime = sbuf->shm_ctime;
+	tbuf.shm_cpid = sbuf->shm_cpid;
+	tbuf.shm_lpid = sbuf->shm_lpid;
+	tbuf.shm_nattch = sbuf->shm_nattch;
+	return copy_to_user(buf, &tbuf, sizeof tbuf);
+}
+
+int sys_msgctl_broken(int msqid, int cmd, struct msqid_ds *buf)
+{
+	return sys_msgctl (msqid, cmd & ~IPC_64, buf);
+}
+
+int sys_semctl_broken(int semid, int semnum, int cmd, union semun arg)
+{
+	return sys_semctl (semid, semnum, cmd & ~IPC_64, arg);
+}
+
+int sys_shmctl_broken(int shmid, int cmd, struct shmid64_ds *buf)
+{
+	struct shmid64_ds sbuf;
+	int err;
+
+	if (cmd & IPC_64) {
+		cmd &= ~IPC_64;
+		if (cmd == IPC_STAT || cmd == SHM_STAT) {
+			KERNEL_SYSCALL(err, sys_shmctl, shmid, cmd, (struct shmid_ds *)&sbuf);
+			if (err == 0)
+				err = copyout_broken_shmid64((struct broken_shmid64_ds *)buf, &sbuf);
+			return err;
+		}
+	}
+	return sys_shmctl (shmid, cmd, (struct shmid_ds *)buf);
+}
+
+/*
+ * This changes the io permissions bitmap in the current task.
+ */
+asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
+{
+	return -ENOSYS;
 }
diff -Nru a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/sys_parisc32.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,3114 @@
+/*
+ * sys_parisc32.c: Conversion between 32bit and 64bit native syscalls.
+ *
+ * Copyright (C) 2000-2001 Hewlett Packard Company
+ * Copyright (C) 2000 John Marvin
+ * Copyright (C) 2001 Matthew Wilcox
+ *
+ * These routines maintain argument size conversion between 32bit and 64bit
+ * environment. Based heavily on sys_ia32.c and sys_sparc32.c.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/fs.h> 
+#include <linux/mm.h> 
+#include <linux/file.h> 
+#include <linux/signal.h>
+#include <linux/utime.h>
+#include <linux/resource.h>
+#include <linux/times.h>
+#include <linux/utsname.h>
+#include <linux/timex.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/sem.h>
+#include <linux/msg.h>
+#include <linux/shm.h>
+#include <linux/slab.h>
+#include <linux/uio.h>
+#include <linux/nfs_fs.h>
+#include <linux/smb_fs.h>
+#include <linux/smb_mount.h>
+#include <linux/ncp_fs.h>
+#include <linux/quota.h>
+#include <linux/module.h>
+#include <linux/sunrpc/svc.h>
+#include <linux/nfsd/nfsd.h>
+#include <linux/nfsd/cache.h>
+#include <linux/nfsd/xdr.h>
+#include <linux/nfsd/syscall.h>
+#include <linux/poll.h>
+#include <linux/personality.h>
+#include <linux/stat.h>
+#include <linux/filter.h>			/* for setsockopt() */
+#include <linux/icmpv6.h>			/* for setsockopt() */
+#include <linux/netfilter_ipv4/ip_queue.h>	/* for setsockopt() */
+#include <linux/netfilter_ipv4/ip_tables.h>	/* for setsockopt() */
+#include <linux/netfilter_ipv6/ip6_tables.h>	/* for setsockopt() */
+#include <linux/highmem.h>
+#include <linux/highuid.h>
+#include <linux/mman.h>
+#include <linux/binfmts.h>
+#include <linux/namei.h>
+
+#include <asm/types.h>
+#include <asm/uaccess.h>
+#include <asm/semaphore.h>
+#include <asm/mmu_context.h>
+
+#include "sys32.h"
+
+#define A(__x) ((unsigned long)(__x))
+
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x)	printk x
+#else
+#define DBG(x)
+#endif
+
+/* For this source file, we want overflow handling. */
+
+#undef high2lowuid
+#undef high2lowgid
+#undef low2highuid
+#undef low2highgid
+#undef SET_UID16
+#undef SET_GID16
+#undef NEW_TO_OLD_UID
+#undef NEW_TO_OLD_GID
+#undef SET_OLDSTAT_UID
+#undef SET_OLDSTAT_GID
+#undef SET_STAT_UID
+#undef SET_STAT_GID
+
+#define high2lowuid(uid) ((uid) > 65535) ? (u16)overflowuid : (u16)(uid)
+#define high2lowgid(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid)
+#define low2highuid(uid) ((uid) == (u16)-1) ? (uid_t)-1 : (uid_t)(uid)
+#define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid)
+#define SET_UID16(var, uid)	var = high2lowuid(uid)
+#define SET_GID16(var, gid)	var = high2lowgid(gid)
+#define NEW_TO_OLD_UID(uid)	high2lowuid(uid)
+#define NEW_TO_OLD_GID(gid)	high2lowgid(gid)
+#define SET_OLDSTAT_UID(stat, uid)	(stat).st_uid = high2lowuid(uid)
+#define SET_OLDSTAT_GID(stat, gid)	(stat).st_gid = high2lowgid(gid)
+#define SET_STAT_UID(stat, uid)		(stat).st_uid = high2lowuid(uid)
+#define SET_STAT_GID(stat, gid)		(stat).st_gid = high2lowgid(gid)
+
+/*
+ * count32() counts the number of arguments/envelopes. It is basically
+ *           a copy of count() from fs/exec.c, except that it works
+ *           with 32 bit argv and envp pointers.
+ */
+
+static int count32(u32 *argv, int max)
+{
+	int i = 0;
+
+	if (argv != NULL) {
+		for (;;) {
+			u32 p;
+			int error;
+
+			error = get_user(p,argv);
+			if (error)
+				return error;
+			if (!p)
+				break;
+			argv++;
+			if(++i > max)
+				return -E2BIG;
+		}
+	}
+	return i;
+}
+
+
+/*
+ * copy_strings32() is basically a copy of copy_strings() from fs/exec.c
+ *                  except that it works with 32 bit argv and envp pointers.
+ */
+
+
+static int copy_strings32(int argc, u32 *argv, struct linux_binprm *bprm)
+{
+	while (argc-- > 0) {
+		u32 str;
+		int len;
+		unsigned long pos;
+
+		if (get_user(str, argv + argc) ||
+		    !str ||
+		    !(len = strnlen_user((char *)A(str), bprm->p)))
+			return -EFAULT;
+
+		if (bprm->p < len) 
+			return -E2BIG; 
+
+		bprm->p -= len;
+
+		pos = bprm->p;
+		while (len > 0) {
+			char *kaddr;
+			int i, new, err;
+			struct page *page;
+			int offset, bytes_to_copy;
+
+			offset = pos % PAGE_SIZE;
+			i = pos/PAGE_SIZE;
+			page = bprm->page[i];
+			new = 0;
+			if (!page) {
+				page = alloc_page(GFP_HIGHUSER);
+				bprm->page[i] = page;
+				if (!page)
+					return -ENOMEM;
+				new = 1;
+			}
+			kaddr = (char *)kmap(page);
+
+			if (new && offset)
+				memset(kaddr, 0, offset);
+			bytes_to_copy = PAGE_SIZE - offset;
+			if (bytes_to_copy > len) {
+				bytes_to_copy = len;
+				if (new)
+					memset(kaddr+offset+len, 0, PAGE_SIZE-offset-len);
+			}
+			err = copy_from_user(kaddr + offset, (char *)A(str), bytes_to_copy);
+			flush_dcache_page(page);
+			flush_page_to_ram(page);
+			kunmap(page);
+
+			if (err)
+				return -EFAULT; 
+
+			pos += bytes_to_copy;
+			str += bytes_to_copy;
+			len -= bytes_to_copy;
+		}
+	}
+	return 0;
+}
+
+/*
+ * do_execve32() is mostly a copy of do_execve(), with the exception
+ * that it processes 32 bit argv and envp pointers.
+ */
+
+static inline int 
+do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs)
+{
+	struct linux_binprm bprm;
+	struct file *file;
+	int retval;
+	int i;
+
+	file = open_exec(filename);
+
+	retval = PTR_ERR(file);
+	if (IS_ERR(file))
+		return retval;
+
+	bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
+	memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0]));
+
+	DBG(("do_execve32(%s, %p, %p, %p)\n", filename, argv, envp, regs));
+
+	bprm.file = file;
+	bprm.filename = filename;
+	bprm.sh_bang = 0;
+	bprm.loader = 0;
+	bprm.exec = 0;
+
+	bprm.mm = mm_alloc();
+	retval = -ENOMEM;
+	if (!bprm.mm)
+		goto out_file;
+
+	retval = init_new_context(current, bprm.mm);
+	if (retval < 0)
+		goto out_mm;
+
+	if ((bprm.argc = count32(argv, bprm.p / sizeof(u32))) < 0) 
+		goto out_mm;
+
+	if ((bprm.envc = count32(envp, bprm.p / sizeof(u32))) < 0) 
+		goto out_mm;
+
+	retval = prepare_binprm(&bprm);
+	if (retval < 0)
+		goto out;
+	
+	retval = copy_strings_kernel(1, &bprm.filename, &bprm);
+	if (retval < 0)
+		goto out;
+
+	bprm.exec = bprm.p;
+	retval = copy_strings32(bprm.envc, envp, &bprm);
+	if (retval < 0)
+		goto out;
+
+	retval = copy_strings32(bprm.argc, argv, &bprm);
+	if (retval < 0)
+		goto out;
+
+	retval = search_binary_handler(&bprm,regs);
+	if (retval >= 0)
+		/* execve success */
+		return retval;
+
+out:
+	/* Something went wrong, return the inode and free the argument pages*/
+	for (i = 0; i < MAX_ARG_PAGES; i++) {
+		struct page *page = bprm.page[i];
+		if (page)
+			__free_page(page);
+	}
+
+out_mm:
+	mmdrop(bprm.mm);
+
+out_file:
+	if (bprm.file) {
+		allow_write_access(bprm.file);
+		fput(bprm.file);
+	}
+
+	return retval;
+}
+
+/*
+ * sys32_execve() executes a new program.
+ */
+
+asmlinkage int sys32_execve(struct pt_regs *regs)
+{
+	int error;
+	char *filename;
+
+	DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26]));
+	filename = getname((char *) regs->gr[26]);
+	error = PTR_ERR(filename);
+	if (IS_ERR(filename))
+		goto out;
+	error = do_execve32(filename, (u32 *) regs->gr[25],
+		(u32 *) regs->gr[24], regs);
+	if (error == 0)
+		current->ptrace &= ~PT_DTRACE;
+	putname(filename);
+out:
+
+	return error;
+}
+
+asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
+	int r22, int r21, int r20)
+{
+    printk(KERN_ERR "%s(%d): Unimplemented 32 on 64 syscall #%d!\n", 
+    	current->comm, current->pid, r20);
+    return -ENOSYS;
+}
+
+/* 32-bit user apps use struct statfs which uses 'long's */
+struct statfs32 {
+	__s32 f_type;
+	__s32 f_bsize;
+	__s32 f_blocks;
+	__s32 f_bfree;
+	__s32 f_bavail;
+	__s32 f_files;
+	__s32 f_ffree;
+	__kernel_fsid_t f_fsid;
+	__s32 f_namelen;
+	__s32 f_spare[6];
+};
+
+/* convert statfs struct to statfs32 struct and copy result to user */
+static unsigned long statfs32_to_user(struct statfs32 *ust32, struct statfs *st)
+{
+    struct statfs32 st32;
+#undef CP
+#define CP(a) st32.a = st->a
+    CP(f_type);
+    CP(f_bsize);
+    CP(f_blocks);
+    CP(f_bfree);
+    CP(f_bavail);
+    CP(f_files);
+    CP(f_ffree);
+    CP(f_fsid);
+    CP(f_namelen);
+    return copy_to_user(ust32, &st32, sizeof st32);
+}
+
+/* The following statfs calls are copies of code from linux/fs/open.c and
+ * should be checked against those from time to time */
+asmlinkage long sys32_statfs(const char * path, struct statfs32 * buf)
+{
+	struct nameidata nd;
+	int error;
+
+	error = user_path_walk(path, &nd);
+	if (!error) {
+		struct statfs tmp;
+		error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
+		if (!error && statfs32_to_user(buf, &tmp))
+			error = -EFAULT;
+		path_release(&nd);
+	}
+	return error;
+}
+
+asmlinkage long sys32_fstatfs(unsigned int fd, struct statfs32 * buf)
+{
+	struct file * file;
+	struct statfs tmp;
+	int error;
+
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+	error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
+	if (!error && statfs32_to_user(buf, &tmp))
+		error = -EFAULT;
+	fput(file);
+out:
+	return error;
+}
+
+/* These may not work without my local types changes, but I wanted the
+ * code available in case it's useful to others. -PB
+ */
+
+/* from utime.h */
+struct utimbuf32 {
+	__kernel_time_t32 actime;
+	__kernel_time_t32 modtime;
+};
+
+asmlinkage long sys32_utime(char *filename, struct utimbuf32 *times)
+{
+    struct utimbuf32 times32;
+    struct utimbuf times64;
+    extern long sys_utime(char *filename, struct utimbuf *times);
+    char *fname;
+    long ret;
+
+    if (!times)
+    	return sys_utime(filename, NULL);
+
+    /* get the 32-bit struct from user space */
+    if (copy_from_user(&times32, times, sizeof times32))
+    	return -EFAULT;
+
+    /* convert it into the 64-bit one */
+    times64.actime = times32.actime;
+    times64.modtime = times32.modtime;
+
+    /* grab the file name */
+    fname = getname(filename);
+
+    KERNEL_SYSCALL(ret, sys_utime, fname, &times64);
+
+    /* free the file name */
+    putname(fname);
+
+    return ret;
+}
+
+struct tms32 {
+	__kernel_clock_t32 tms_utime;
+	__kernel_clock_t32 tms_stime;
+	__kernel_clock_t32 tms_cutime;
+	__kernel_clock_t32 tms_cstime;
+};
+                                
+asmlinkage long sys32_times(struct tms32 *tbuf)
+{
+	struct tms t;
+	long ret;
+	extern asmlinkage long sys_times(struct tms * tbuf);
+int err;
+	
+	KERNEL_SYSCALL(ret, sys_times, tbuf ? &t : NULL);
+	if (tbuf) {
+		err = put_user (t.tms_utime, &tbuf->tms_utime);
+		err |= __put_user (t.tms_stime, &tbuf->tms_stime);
+		err |= __put_user (t.tms_cutime, &tbuf->tms_cutime);
+		err |= __put_user (t.tms_cstime, &tbuf->tms_cstime);
+		if (err)
+			ret = -EFAULT;
+	}
+	return ret;
+}
+
+struct flock32 {
+	short l_type;
+	short l_whence;
+	__kernel_off_t32 l_start;
+	__kernel_off_t32 l_len;
+	__kernel_pid_t32 l_pid;
+};
+
+
+static inline int get_flock(struct flock *kfl, struct flock32 *ufl)
+{
+	int err;
+	
+	err = get_user(kfl->l_type, &ufl->l_type);
+	err |= __get_user(kfl->l_whence, &ufl->l_whence);
+	err |= __get_user(kfl->l_start, &ufl->l_start);
+	err |= __get_user(kfl->l_len, &ufl->l_len);
+	err |= __get_user(kfl->l_pid, &ufl->l_pid);
+	return err;
+}
+
+static inline int put_flock(struct flock *kfl, struct flock32 *ufl)
+{
+	int err;
+	
+	err = __put_user(kfl->l_type, &ufl->l_type);
+	err |= __put_user(kfl->l_whence, &ufl->l_whence);
+	err |= __put_user(kfl->l_start, &ufl->l_start);
+	err |= __put_user(kfl->l_len, &ufl->l_len);
+	err |= __put_user(kfl->l_pid, &ufl->l_pid);
+	return err;
+}
+
+extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
+
+asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	switch (cmd) {
+	case F_GETLK:
+	case F_SETLK:
+	case F_SETLKW:
+		{
+			struct flock f;
+			long ret;
+			
+			if(get_flock(&f, (struct flock32 *)arg))
+				return -EFAULT;
+			KERNEL_SYSCALL(ret, sys_fcntl, fd, cmd, (unsigned long)&f);
+			if (ret) return ret;
+			if (f.l_start >= 0x7fffffffUL ||
+			    f.l_len >= 0x7fffffffUL ||
+			    f.l_start + f.l_len >= 0x7fffffffUL)
+				return -EOVERFLOW;
+			if(put_flock(&f, (struct flock32 *)arg))
+				return -EFAULT;
+			return 0;
+		}
+	default:
+		return sys_fcntl(fd, cmd, (unsigned long)arg);
+	}
+}
+
+#ifdef CONFIG_SYSCTL
+
+struct __sysctl_args32 {
+	u32 name;
+	int nlen;
+	u32 oldval;
+	u32 oldlenp;
+	u32 newval;
+	u32 newlen;
+	u32 __unused[4];
+};
+
+asmlinkage long sys32_sysctl(struct __sysctl_args32 *args)
+{
+	struct __sysctl_args32 tmp;
+	int error;
+	unsigned int oldlen32;
+	size_t oldlen, *oldlenp = NULL;
+	unsigned long addr = (((long)&args->__unused[0]) + 7) & ~7;
+	extern int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
+	       void *newval, size_t newlen);
+
+	DBG(("sysctl32(%p)\n", args));
+
+	if (copy_from_user(&tmp, args, sizeof(tmp)))
+		return -EFAULT;
+
+	if (tmp.oldval && tmp.oldlenp) {
+		/* Duh, this is ugly and might not work if sysctl_args
+		   is in read-only memory, but do_sysctl does indirectly
+		   a lot of uaccess in both directions and we'd have to
+		   basically copy the whole sysctl.c here, and
+		   glibc's __sysctl uses rw memory for the structure
+		   anyway.  */
+		/* a possibly better hack than this, which will avoid the
+		 * problem if the struct is read only, is to push the
+		 * 'oldlen' value out to the user's stack instead. -PB
+		 */
+		if (get_user(oldlen32, (u32 *)(u64)tmp.oldlenp))
+			return -EFAULT;
+		oldlen = oldlen32;
+		if (put_user(oldlen, (size_t *)addr))
+			return -EFAULT;
+		oldlenp = (size_t *)addr;
+	}
+
+	lock_kernel();
+	error = do_sysctl((int *)(u64)tmp.name, tmp.nlen, (void *)(u64)tmp.oldval,
+			  oldlenp, (void *)(u64)tmp.newval, tmp.newlen);
+	unlock_kernel();
+	if (oldlenp) {
+		if (!error) {
+			if (get_user(oldlen, (size_t *)addr)) {
+				error = -EFAULT;
+			} else {
+				oldlen32 = oldlen;
+				if (put_user(oldlen32, (u32 *)(u64)tmp.oldlenp))
+					error = -EFAULT;
+			}
+		}
+		if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
+			error = -EFAULT;
+	}
+	return error;
+}
+
+#else /* CONFIG_SYSCTL */
+
+asmlinkage long sys32_sysctl(struct __sysctl_args *args)
+{
+	return -ENOSYS;
+}
+#endif /* CONFIG_SYSCTL */
+
+struct timespec32 {
+	s32    tv_sec;
+	s32    tv_nsec;
+};
+                
+static int
+put_timespec32(struct timespec32 *u, struct timespec *t)
+{
+	struct timespec32 t32;
+	t32.tv_sec = t->tv_sec;
+	t32.tv_nsec = t->tv_nsec;
+	return copy_to_user(u, &t32, sizeof t32);
+}
+
+asmlinkage int sys32_nanosleep(struct timespec32 *rqtp, struct timespec32 *rmtp)
+{
+	struct timespec t;
+	struct timespec32 t32;
+	int ret;
+	extern asmlinkage int sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp);
+	
+	if (copy_from_user(&t32, rqtp, sizeof t32))
+		return -EFAULT;
+	t.tv_sec = t32.tv_sec;
+	t.tv_nsec = t32.tv_nsec;
+
+	DBG(("sys32_nanosleep({%d, %d})\n", t32.tv_sec, t32.tv_nsec));
+
+	KERNEL_SYSCALL(ret, sys_nanosleep, &t, rmtp ? &t : NULL);
+	if (rmtp && ret == -EINTR) {
+		if (put_timespec32(rmtp, &t))
+			return -EFAULT;
+	}
+	return ret;
+}
+
+asmlinkage long sys32_sched_rr_get_interval(pid_t pid,
+	struct timespec32 *interval)
+{
+	struct timespec t;
+	int ret;
+	extern asmlinkage long sys_sched_rr_get_interval(pid_t pid, struct timespec *interval);
+	
+	KERNEL_SYSCALL(ret, sys_sched_rr_get_interval, pid, &t);
+	if (put_timespec32(interval, &t))
+		return -EFAULT;
+	return ret;
+}
+
+typedef __kernel_time_t32 time_t32;
+
+static int
+put_timeval32(struct timeval32 *u, struct timeval *t)
+{
+	struct timeval32 t32;
+	t32.tv_sec = t->tv_sec;
+	t32.tv_usec = t->tv_usec;
+	return copy_to_user(u, &t32, sizeof t32);
+}
+
+static int
+get_timeval32(struct timeval32 *u, struct timeval *t)
+{
+	int err;
+	struct timeval32 t32;
+
+	if ((err = copy_from_user(&t32, u, sizeof t32)) == 0)
+	{
+	    t->tv_sec = t32.tv_sec;
+	    t->tv_usec = t32.tv_usec;
+	}
+	return err;
+}
+
+asmlinkage long sys32_time(time_t32 *tloc)
+{
+    time_t now = CURRENT_TIME;
+    time_t32 now32 = now;
+
+    if (tloc)
+    	if (put_user(now32, tloc))
+		now32 = -EFAULT;
+
+    return now32;
+}
+
+asmlinkage int
+sys32_gettimeofday(struct timeval32 *tv, struct timezone *tz)
+{
+    extern void do_gettimeofday(struct timeval *tv);
+
+    if (tv) {
+	    struct timeval ktv;
+	    do_gettimeofday(&ktv);
+	    if (put_timeval32(tv, &ktv))
+		    return -EFAULT;
+    }
+    if (tz) {
+	    extern struct timezone sys_tz;
+	    if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
+		    return -EFAULT;
+    }
+    return 0;
+}
+
+asmlinkage int
+sys32_settimeofday(struct timeval32 *tv, struct timezone *tz)
+{
+    struct timeval ktv;
+    struct timezone ktz;
+    extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
+
+    if (tv) {
+	    if (get_timeval32(tv, &ktv))
+		    return -EFAULT;
+    }
+    if (tz) {
+	    if (copy_from_user(&ktz, tz, sizeof(ktz)))
+		    return -EFAULT;
+    }
+
+    return do_sys_settimeofday(tv ? &ktv : NULL, tz ? &ktz : NULL);
+}
+
+struct	itimerval32 {
+	struct	timeval32 it_interval;	/* timer interval */
+	struct	timeval32 it_value;	/* current value */
+};
+
+asmlinkage long sys32_getitimer(int which, struct itimerval32 *ov32)
+{
+	int error = -EFAULT;
+	struct itimerval get_buffer;
+	extern int do_getitimer(int which, struct itimerval *value);
+
+	if (ov32) {
+		error = do_getitimer(which, &get_buffer);
+		if (!error) {
+			struct itimerval32 gb32;
+			gb32.it_interval.tv_sec = get_buffer.it_interval.tv_sec;
+			gb32.it_interval.tv_usec = get_buffer.it_interval.tv_usec;
+			gb32.it_value.tv_sec = get_buffer.it_value.tv_sec;
+			gb32.it_value.tv_usec = get_buffer.it_value.tv_usec;
+			if (copy_to_user(ov32, &gb32, sizeof(gb32)))
+				error = -EFAULT; 
+		}
+	}
+	return error;
+}
+
+asmlinkage long sys32_setitimer(int which, struct itimerval32 *v32,
+			      struct itimerval32 *ov32)
+{
+	struct itimerval set_buffer, get_buffer;
+	struct itimerval32 sb32, gb32;
+	extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ov32);
+	int error;
+
+	if (v32) {
+		if(copy_from_user(&sb32, v32, sizeof(sb32)))
+			return -EFAULT;
+
+		set_buffer.it_interval.tv_sec = sb32.it_interval.tv_sec;
+		set_buffer.it_interval.tv_usec = sb32.it_interval.tv_usec;
+		set_buffer.it_value.tv_sec = sb32.it_value.tv_sec;
+		set_buffer.it_value.tv_usec = sb32.it_value.tv_usec;
+	} else
+		memset((char *) &set_buffer, 0, sizeof(set_buffer));
+
+	error = do_setitimer(which, &set_buffer, ov32 ? &get_buffer : 0);
+	if (error || !ov32)
+		return error;
+
+	gb32.it_interval.tv_sec = get_buffer.it_interval.tv_sec;
+	gb32.it_interval.tv_usec = get_buffer.it_interval.tv_usec;
+	gb32.it_value.tv_sec = get_buffer.it_value.tv_sec;
+	gb32.it_value.tv_usec = get_buffer.it_value.tv_usec;
+	if (copy_to_user(ov32, &gb32, sizeof(gb32)))
+		return -EFAULT; 
+	return 0;
+}
+
+struct rusage32 {
+        struct timeval32 ru_utime;
+        struct timeval32 ru_stime;
+        int    ru_maxrss;
+        int    ru_ixrss;
+        int    ru_idrss;
+        int    ru_isrss;
+        int    ru_minflt;
+        int    ru_majflt;
+        int    ru_nswap;
+        int    ru_inblock;
+        int    ru_oublock;
+        int    ru_msgsnd; 
+        int    ru_msgrcv; 
+        int    ru_nsignals;
+        int    ru_nvcsw;
+        int    ru_nivcsw;
+};
+
+static int
+put_rusage32(struct rusage32 *ru32p, struct rusage *r)
+{
+	struct rusage32 r32;
+#undef CP
+#define CP(t) r32.t = r->t;
+	CP(ru_utime.tv_sec); CP(ru_utime.tv_usec);
+	CP(ru_stime.tv_sec); CP(ru_stime.tv_usec);
+	CP(ru_maxrss);
+	CP(ru_ixrss);
+	CP(ru_idrss);
+	CP(ru_isrss);
+	CP(ru_minflt);
+	CP(ru_majflt);
+	CP(ru_nswap);
+	CP(ru_inblock);
+	CP(ru_oublock);
+	CP(ru_msgsnd);
+	CP(ru_msgrcv);
+	CP(ru_nsignals);
+	CP(ru_nvcsw);
+	CP(ru_nivcsw);
+	return copy_to_user(ru32p, &r32, sizeof r32);
+}
+
+asmlinkage int
+sys32_getrusage(int who, struct rusage32 *ru)
+{
+	struct rusage r;
+	int ret;
+	extern asmlinkage int sys_getrusage(int who, struct rusage *ru);
+		
+	KERNEL_SYSCALL(ret, sys_getrusage, who, &r);
+	if (put_rusage32(ru, &r)) return -EFAULT;
+	return ret;
+}
+
+asmlinkage int
+sys32_wait4(__kernel_pid_t32 pid, unsigned int * stat_addr, int options,
+	    struct rusage32 * ru)
+{
+	if (!ru)
+		return sys_wait4(pid, stat_addr, options, NULL);
+	else {
+		struct rusage r;
+		int ret;
+		unsigned int status;
+	
+		KERNEL_SYSCALL(ret, sys_wait4, pid, stat_addr ? &status : NULL, options, &r);
+		if (put_rusage32(ru, &r)) return -EFAULT;
+		if (stat_addr && put_user(status, stat_addr))
+			return -EFAULT;
+		return ret;
+	}
+}
+
+struct stat32 {
+	__kernel_dev_t32		st_dev;		/* dev_t is 32 bits on parisc */
+	__kernel_ino_t32		st_ino;		/* 32 bits */
+	__kernel_mode_t32	st_mode;	/* 16 bits */
+	__kernel_nlink_t32		st_nlink;	/* 16 bits */
+	unsigned short	st_reserved1;	/* old st_uid */
+	unsigned short	st_reserved2;	/* old st_gid */
+	__kernel_dev_t32		st_rdev;
+	__kernel_off_t32		st_size;
+	__kernel_time_t32	st_atime;
+	unsigned int	st_spare1;
+	__kernel_time_t32	st_mtime;
+	unsigned int	st_spare2;
+	__kernel_time_t32	st_ctime;
+	unsigned int	st_spare3;
+	int		st_blksize;
+	int		st_blocks;
+	unsigned int	__unused1;	/* ACL stuff */
+	__kernel_dev_t32		__unused2;	/* network */
+	__kernel_ino_t32		__unused3;	/* network */
+	unsigned int	__unused4;	/* cnodes */
+	unsigned short	__unused5;	/* netsite */
+	short		st_fstype;
+	__kernel_dev_t32		st_realdev;
+	unsigned short	st_basemode;
+	unsigned short	st_spareshort;
+	__kernel_uid_t32		st_uid;
+	__kernel_gid_t32		st_gid;
+	unsigned int	st_spare4[3];
+};
+
+static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
+{
+	int err;
+
+	err  = put_user(stat->dev, &statbuf->st_dev);
+	err |= put_user(stat->ino, &statbuf->st_ino);
+	err |= put_user(stat->mode, &statbuf->st_mode);
+	err |= put_user(stat->nlink, &statbuf->st_nlink);
+	err |= put_user(0, &statbuf->st_reserved1);
+	err |= put_user(0, &statbuf->st_reserved2);
+	err |= put_user(stat->rdev, &statbuf->st_rdev);
+	if (stat->size > MAX_NON_LFS)
+		return -EOVERFLOW;
+	err |= put_user(stat->size, &statbuf->st_size);
+	err |= put_user(stat->atime, &statbuf->st_atime);
+	err |= put_user(0, &statbuf->st_spare1);
+	err |= put_user(stat->mtime, &statbuf->st_mtime);
+	err |= put_user(0, &statbuf->st_spare2);
+	err |= put_user(stat->ctime, &statbuf->st_ctime);
+	err |= put_user(0, &statbuf->st_spare3);
+	err |= put_user(stat->blksize, &statbuf->st_blksize);
+	err |= put_user(stat->blocks, &statbuf->st_blocks);
+	err |= put_user(0, &statbuf->__unused1);
+	err |= put_user(0, &statbuf->__unused2);
+	err |= put_user(0, &statbuf->__unused3);
+	err |= put_user(0, &statbuf->__unused4);
+	err |= put_user(0, &statbuf->__unused5);
+	err |= put_user(0, &statbuf->st_fstype); /* not avail */
+	err |= put_user(0, &statbuf->st_realdev); /* not avail */
+	err |= put_user(0, &statbuf->st_basemode); /* not avail */
+	err |= put_user(0, &statbuf->st_spareshort);
+	err |= put_user(stat->uid, &statbuf->st_uid);
+	err |= put_user(stat->gid, &statbuf->st_gid);
+	err |= put_user(0, &statbuf->st_spare4[0]);
+	err |= put_user(0, &statbuf->st_spare4[1]);
+	err |= put_user(0, &statbuf->st_spare4[2]);
+
+	return err;
+}
+
+asmlinkage long sys32_newstat(char * filename, struct stat32 *statbuf)
+{
+	struct kstat stat;
+	int error = vfs_stat(filename, &stat);
+
+	if (!error) 
+		error = cp_new_stat32(&stat, statbuf);
+	
+	return error;
+}
+
+asmlinkage long sys32_newlstat(char * filename, struct stat32 *statbuf)
+{
+	struct kstat stat;
+	int error = vfs_lstat(filename, &stat);
+
+	if (!error)
+		error = cp_new_stat32(&stat, statbuf);
+
+	return error;
+}
+
+asmlinkage long sys32_newfstat(unsigned int fd, struct stat32 *statbuf)
+{
+	struct kstat stat;
+	int error = vfs_fstat(fd, &stat);
+
+	if (!error)
+		error = cp_new_stat32(&stat, statbuf);
+
+	return error;
+}
+
+struct linux32_dirent {
+	u32	d_ino;
+	__kernel_off_t32	d_off;
+	u16	d_reclen;
+	char	d_name[1];
+};
+
+struct old_linux32_dirent {
+	u32	d_ino;
+	u32	d_offset;
+	u16	d_namlen;
+	char	d_name[1];
+};
+
+struct getdents32_callback {
+	struct linux32_dirent * current_dir;
+	struct linux32_dirent * previous;
+	int count;
+	int error;
+};
+
+struct readdir32_callback {
+	struct old_linux32_dirent * dirent;
+	int count;
+};
+
+#define ROUND_UP(x,a)	((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
+#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
+static int
+filldir32 (void *__buf, const char *name, int namlen, loff_t offset, ino_t ino,
+	   unsigned int d_type)
+{
+	struct linux32_dirent * dirent;
+	struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
+	int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4);
+
+	buf->error = -EINVAL;	/* only used if we fail.. */
+	if (reclen > buf->count)
+		return -EINVAL;
+	dirent = buf->previous;
+	if (dirent)
+		put_user(offset, &dirent->d_off);
+	dirent = buf->current_dir;
+	buf->previous = dirent;
+	put_user(ino, &dirent->d_ino);
+	put_user(reclen, &dirent->d_reclen);
+	copy_to_user(dirent->d_name, name, namlen);
+	put_user(0, dirent->d_name + namlen);
+	((char *) dirent) += reclen;
+	buf->current_dir = dirent;
+	buf->count -= reclen;
+	return 0;
+}
+
+asmlinkage long
+sys32_getdents (unsigned int fd, void * dirent, unsigned int count)
+{
+	struct file * file;
+	struct linux32_dirent * lastdirent;
+	struct getdents32_callback buf;
+	int error;
+
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+
+	buf.current_dir = (struct linux32_dirent *) dirent;
+	buf.previous = NULL;
+	buf.count = count;
+	buf.error = 0;
+
+	error = vfs_readdir(file, filldir32, &buf);
+	if (error < 0)
+		goto out_putf;
+	error = buf.error;
+	lastdirent = buf.previous;
+	if (lastdirent) {
+		put_user(file->f_pos, &lastdirent->d_off);
+		error = count - buf.count;
+	}
+
+out_putf:
+	fput(file);
+out:
+	return error;
+}
+
+static int
+fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, ino_t ino,
+	      unsigned int d_type)
+{
+	struct readdir32_callback * buf = (struct readdir32_callback *) __buf;
+	struct old_linux32_dirent * dirent;
+
+	if (buf->count)
+		return -EINVAL;
+	buf->count++;
+	dirent = buf->dirent;
+	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);
+	return 0;
+}
+
+asmlinkage long
+sys32_readdir (unsigned int fd, void * dirent, unsigned int count)
+{
+	int error;
+	struct file * file;
+	struct readdir32_callback buf;
+
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+
+	buf.count = 0;
+	buf.dirent = dirent;
+
+	error = vfs_readdir(file, fillonedir32, &buf);
+	if (error >= 0)
+		error = buf.count;
+	fput(file);
+out:
+	return error;
+}
+
+struct rlimit32 {
+	__u32	rlim_cur;
+	__u32	rlim_max;
+};
+
+#define RLIM32_INFINITY 0xffffffff
+
+asmlinkage long sys32_getrlimit(unsigned int resource, struct rlimit32 *rlim)
+{
+	struct rlimit32 rlim32;
+	struct rlimit *rlimip;
+
+	if (resource >= RLIM_NLIMITS)
+		return -EINVAL;
+	rlimip = current->rlim + resource;
+	if (rlimip->rlim_cur >= RLIM32_INFINITY) {
+		rlim32.rlim_cur = RLIM32_INFINITY;
+	} else {
+		rlim32.rlim_cur = rlimip->rlim_cur;
+	}
+	if (rlimip->rlim_max >= RLIM32_INFINITY) {
+		rlim32.rlim_max = RLIM32_INFINITY;
+	} else {
+		rlim32.rlim_max = rlimip->rlim_max;
+	}
+	return copy_to_user(rlim, &rlim32, sizeof (struct rlimit32));
+}
+
+asmlinkage long sys32_setrlimit(unsigned int resource, struct rlimit32 *rlim)
+{
+	struct rlimit32 rlim32;
+	struct rlimit new_rlim, *old_rlim;
+
+	if (resource >= RLIM_NLIMITS)
+		return -EINVAL;
+	if (copy_from_user(&rlim32, rlim, sizeof(rlim)))
+		return -EFAULT;
+	if (rlim32.rlim_cur == RLIM32_INFINITY) {
+		new_rlim.rlim_cur = RLIM_INFINITY;
+	} else {
+		new_rlim.rlim_cur = rlim32.rlim_cur;
+	}
+	if (rlim32.rlim_max == RLIM32_INFINITY) {
+		new_rlim.rlim_max = RLIM_INFINITY;
+	} else {
+		new_rlim.rlim_max = rlim32.rlim_max;
+	}
+
+	old_rlim = current->rlim + resource;
+	if (((new_rlim.rlim_cur > old_rlim->rlim_max) ||
+	     (new_rlim.rlim_max > old_rlim->rlim_max)) &&
+	    !capable(CAP_SYS_RESOURCE))
+		return -EPERM;
+	if (resource == RLIMIT_NOFILE) {
+		if (new_rlim.rlim_cur > NR_OPEN || new_rlim.rlim_max > NR_OPEN)
+			return -EPERM;
+	}
+	if (resource == RLIMIT_STACK) {
+		if (new_rlim.rlim_max > 1024 * 1024 * 1024) {
+			new_rlim.rlim_max = 1024 * 1024 * 1024;
+		}
+		new_rlim.rlim_max = PAGE_ALIGN(new_rlim.rlim_max);
+	}
+	
+	*old_rlim = new_rlim;
+	return 0;
+}
+
+static int copy_mount_stuff_to_kernel(const void *user, unsigned long *kernel)
+{
+	int i;
+	unsigned long page;
+	struct vm_area_struct *vma;
+
+	*kernel = 0;
+	if(!user)
+		return 0;
+	vma = find_vma(current->mm, (unsigned long)user);
+	if(!vma || (unsigned long)user < vma->vm_start)
+		return -EFAULT;
+	if(!(vma->vm_flags & VM_READ))
+		return -EFAULT;
+	i = vma->vm_end - (unsigned long) user;
+	if(PAGE_SIZE <= (unsigned long) i)
+		i = PAGE_SIZE - 1;
+	if(!(page = __get_free_page(GFP_KERNEL)))
+		return -ENOMEM;
+	if(copy_from_user((void *) page, user, i)) {
+		free_page(page);
+		return -EFAULT;
+	}
+	*kernel = page;
+	return 0;
+}
+
+#define SMBFS_NAME	"smbfs"
+#define NCPFS_NAME	"ncpfs"
+
+asmlinkage int sys32_mount(char *dev_name, char *dir_name, char *type, unsigned long new_flags, u32 data)
+{
+	unsigned long type_page = 0;
+	unsigned long data_page = 0;
+	unsigned long dev_page = 0;
+	unsigned long dir_page = 0;
+	int err, is_smb, is_ncp;
+
+	is_smb = is_ncp = 0;
+
+	err = copy_mount_stuff_to_kernel((const void *)type, &type_page);
+	if (err)
+		goto out;
+
+	if (!type_page) {
+		err = -EINVAL;
+		goto out;
+	}
+
+	is_smb = !strcmp((char *)type_page, SMBFS_NAME);
+	is_ncp = !strcmp((char *)type_page, NCPFS_NAME);
+
+	err = copy_mount_stuff_to_kernel((const void *)(unsigned long)data, &data_page);
+	if (err)
+		goto type_out;
+
+	err = copy_mount_stuff_to_kernel(dev_name, &dev_page);
+	if (err)
+		goto data_out;
+
+	err = copy_mount_stuff_to_kernel(dir_name, &dir_page);
+	if (err)
+		goto dev_out;
+
+	if (!is_smb && !is_ncp) {
+		lock_kernel();
+		err = do_mount((char*)dev_page, (char*)dir_page,
+				(char*)type_page, new_flags, (char*)data_page);
+		unlock_kernel();
+	} else {
+		if (is_ncp)
+			panic("NCP mounts not yet supported 32/64 parisc");
+			/* do_ncp_super_data_conv((void *)data_page); */
+		else {
+			panic("SMB mounts not yet supported 32/64 parisc");
+			/* do_smb_super_data_conv((void *)data_page); */
+		}
+
+		lock_kernel();
+		err = do_mount((char*)dev_page, (char*)dir_page,
+				(char*)type_page, new_flags, (char*)data_page);
+		unlock_kernel();
+	}
+	free_page(dir_page);
+
+dev_out:
+	free_page(dev_page);
+
+data_out:
+	free_page(data_page);
+
+type_out:
+	free_page(type_page);
+
+out:
+	return err;
+}
+
+
+#ifdef CONFIG_MODULES
+
+struct module_info32 {
+	u32 addr;
+	u32 size;
+	u32 flags;
+	s32 usecount;
+};
+
+/* Query various bits about modules.  */
+
+static inline long
+get_mod_name(const char *user_name, char **buf)
+{
+	unsigned long page;
+	long retval;
+
+	if ((unsigned long)user_name >= TASK_SIZE
+	    && !segment_eq(get_fs (), KERNEL_DS))
+		return -EFAULT;
+
+	page = __get_free_page(GFP_KERNEL);
+	if (!page)
+		return -ENOMEM;
+
+	retval = strncpy_from_user((char *)page, user_name, PAGE_SIZE);
+	if (retval > 0) {
+		if (retval < PAGE_SIZE) {
+			*buf = (char *)page;
+			return retval;
+		}
+		retval = -ENAMETOOLONG;
+	} else if (!retval)
+		retval = -EINVAL;
+
+	free_page(page);
+	return retval;
+}
+
+static inline void
+put_mod_name(char *buf)
+{
+	free_page((unsigned long)buf);
+}
+
+static __inline__ struct module *find_module(const char *name)
+{
+	struct module *mod;
+
+	for (mod = module_list; mod ; mod = mod->next) {
+		if (mod->flags & MOD_DELETED)
+			continue;
+		if (!strcmp(mod->name, name))
+			break;
+	}
+
+	return mod;
+}
+
+static int
+qm_modules(char *buf, size_t bufsize, __kernel_size_t32 *ret)
+{
+	struct module *mod;
+	size_t nmod, space, len;
+
+	nmod = space = 0;
+
+	for (mod = module_list; mod->next != NULL; mod = mod->next, ++nmod) {
+		len = strlen(mod->name)+1;
+		if (len > bufsize)
+			goto calc_space_needed;
+		if (copy_to_user(buf, mod->name, len))
+			return -EFAULT;
+		buf += len;
+		bufsize -= len;
+		space += len;
+	}
+
+	if (put_user(nmod, ret))
+		return -EFAULT;
+	else
+		return 0;
+
+calc_space_needed:
+	space += len;
+	while ((mod = mod->next)->next != NULL)
+		space += strlen(mod->name)+1;
+
+	if (put_user(space, ret))
+		return -EFAULT;
+	else
+		return -ENOSPC;
+}
+
+static int
+qm_deps(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret)
+{
+	size_t i, space, len;
+
+	if (mod->next == NULL)
+		return -EINVAL;
+	if (!MOD_CAN_QUERY(mod))
+		return put_user(0, ret);
+
+	space = 0;
+	for (i = 0; i < mod->ndeps; ++i) {
+		const char *dep_name = mod->deps[i].dep->name;
+
+		len = strlen(dep_name)+1;
+		if (len > bufsize)
+			goto calc_space_needed;
+		if (copy_to_user(buf, dep_name, len))
+			return -EFAULT;
+		buf += len;
+		bufsize -= len;
+		space += len;
+	}
+
+	return put_user(i, ret);
+
+calc_space_needed:
+	space += len;
+	while (++i < mod->ndeps)
+		space += strlen(mod->deps[i].dep->name)+1;
+
+	if (put_user(space, ret))
+		return -EFAULT;
+	else
+		return -ENOSPC;
+}
+
+static int
+qm_refs(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret)
+{
+	size_t nrefs, space, len;
+	struct module_ref *ref;
+
+	if (mod->next == NULL)
+		return -EINVAL;
+	if (!MOD_CAN_QUERY(mod))
+		if (put_user(0, ret))
+			return -EFAULT;
+		else
+			return 0;
+
+	space = 0;
+	for (nrefs = 0, ref = mod->refs; ref ; ++nrefs, ref = ref->next_ref) {
+		const char *ref_name = ref->ref->name;
+
+		len = strlen(ref_name)+1;
+		if (len > bufsize)
+			goto calc_space_needed;
+		if (copy_to_user(buf, ref_name, len))
+			return -EFAULT;
+		buf += len;
+		bufsize -= len;
+		space += len;
+	}
+
+	if (put_user(nrefs, ret))
+		return -EFAULT;
+	else
+		return 0;
+
+calc_space_needed:
+	space += len;
+	while ((ref = ref->next_ref) != NULL)
+		space += strlen(ref->ref->name)+1;
+
+	if (put_user(space, ret))
+		return -EFAULT;
+	else
+		return -ENOSPC;
+}
+
+static inline int
+qm_symbols(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret)
+{
+	size_t i, space, len;
+	struct module_symbol *s;
+	char *strings;
+	unsigned *vals;
+
+	if (!MOD_CAN_QUERY(mod))
+		if (put_user(0, ret))
+			return -EFAULT;
+		else
+			return 0;
+
+	space = mod->nsyms * 2*sizeof(u32);
+
+	i = len = 0;
+	s = mod->syms;
+
+	if (space > bufsize)
+		goto calc_space_needed;
+
+	if (!access_ok(VERIFY_WRITE, buf, space))
+		return -EFAULT;
+
+	bufsize -= space;
+	vals = (unsigned *)buf;
+	strings = buf+space;
+
+	for (; i < mod->nsyms ; ++i, ++s, vals += 2) {
+		len = strlen(s->name)+1;
+		if (len > bufsize)
+			goto calc_space_needed;
+
+		if (copy_to_user(strings, s->name, len)
+		    || __put_user(s->value, vals+0)
+		    || __put_user(space, vals+1))
+			return -EFAULT;
+
+		strings += len;
+		bufsize -= len;
+		space += len;
+	}
+
+	if (put_user(i, ret))
+		return -EFAULT;
+	else
+		return 0;
+
+calc_space_needed:
+	for (; i < mod->nsyms; ++i, ++s)
+		space += strlen(s->name)+1;
+
+	if (put_user(space, ret))
+		return -EFAULT;
+	else
+		return -ENOSPC;
+}
+
+static inline int
+qm_info(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret)
+{
+	int error = 0;
+
+	if (mod->next == NULL)
+		return -EINVAL;
+
+	if (sizeof(struct module_info32) <= bufsize) {
+		struct module_info32 info;
+		info.addr = (unsigned long)mod;
+		info.size = mod->size;
+		info.flags = mod->flags;
+		info.usecount =
+			((mod_member_present(mod, can_unload)
+			  && mod->can_unload)
+			 ? -1 : atomic_read(&mod->uc.usecount));
+
+		if (copy_to_user(buf, &info, sizeof(struct module_info32)))
+			return -EFAULT;
+	} else
+		error = -ENOSPC;
+
+	if (put_user(sizeof(struct module_info32), ret))
+		return -EFAULT;
+
+	return error;
+}
+
+asmlinkage int sys32_query_module(char *name_user, int which, char *buf, __kernel_size_t32 bufsize, __kernel_size_t32 *ret)
+{
+	struct module *mod;
+	int err;
+
+	lock_kernel();
+	if (name_user == 0) {
+		/* This finds "kernel_module" which is not exported. */
+		for(mod = module_list; mod->next != NULL; mod = mod->next)
+			;
+	} else {
+		long namelen;
+		char *name;
+
+		if ((namelen = get_mod_name(name_user, &name)) < 0) {
+			err = namelen;
+			goto out;
+		}
+		err = -ENOENT;
+		if (namelen == 0) {
+			/* This finds "kernel_module" which is not exported. */
+			for(mod = module_list; mod->next != NULL; mod = mod->next)
+				;
+		} else if ((mod = find_module(name)) == NULL) {
+			put_mod_name(name);
+			goto out;
+		}
+		put_mod_name(name);
+	}
+
+	switch (which)
+	{
+	case 0:
+		err = 0;
+		break;
+	case QM_MODULES:
+		err = qm_modules(buf, bufsize, ret);
+		break;
+	case QM_DEPS:
+		err = qm_deps(mod, buf, bufsize, ret);
+		break;
+	case QM_REFS:
+		err = qm_refs(mod, buf, bufsize, ret);
+		break;
+	case QM_SYMBOLS:
+		err = qm_symbols(mod, buf, bufsize, ret);
+		break;
+	case QM_INFO:
+		err = qm_info(mod, buf, bufsize, ret);
+		break;
+	default:
+		err = -EINVAL;
+		break;
+	}
+out:
+	unlock_kernel();
+	return err;
+}
+
+struct kernel_sym32 {
+	u32 value;
+	char name[60];
+};
+		 
+extern asmlinkage int sys_get_kernel_syms(struct kernel_sym *table);
+
+asmlinkage int sys32_get_kernel_syms(struct kernel_sym32 *table)
+{
+	int len, i;
+	struct kernel_sym *tbl;
+	mm_segment_t old_fs;
+	
+	len = sys_get_kernel_syms(NULL);
+	if (!table) return len;
+	tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL);
+	if (!tbl) return -ENOMEM;
+	old_fs = get_fs();
+	set_fs (KERNEL_DS);
+	sys_get_kernel_syms(tbl);
+	set_fs (old_fs);
+	for (i = 0; i < len; i++, table++) {
+		if (put_user (tbl[i].value, &table->value) ||
+		    copy_to_user (table->name, tbl[i].name, 60))
+			break;
+	}
+	kfree (tbl);
+	return i;
+}
+
+#else /* CONFIG_MODULES */
+
+asmlinkage int
+sys32_query_module(const char *name_user, int which, char *buf, size_t bufsize,
+		 size_t *ret)
+{
+	/* Let the program know about the new interface.  Not that
+	   it'll do them much good.  */
+	if (which == 0)
+		return 0;
+
+	return -ENOSYS;
+}
+
+asmlinkage int
+sys32_get_kernel_syms(struct kernel_sym *table)
+{
+	return -ENOSYS;
+}
+
+#endif  /* CONFIG_MODULES */
+
+/* readv/writev stolen from mips64 */
+struct iovec32 { unsigned int iov_base; int iov_len; };
+
+typedef ssize_t (*IO_fn_t)(struct file *, char *, size_t, loff_t *);
+
+static long
+do_readv_writev32(int type, struct file *file, const struct iovec32 *vector,
+		  u32 count)
+{
+	unsigned long tot_len;
+	struct iovec iovstack[UIO_FASTIOV];
+	struct iovec *iov=iovstack, *ivp;
+	struct inode *inode;
+	long retval, i;
+	IO_fn_t fn;
+
+	/* First get the "struct iovec" from user memory and
+	 * verify all the pointers
+	 */
+	if (!count)
+		return 0;
+	if(verify_area(VERIFY_READ, vector, sizeof(struct iovec32)*count))
+		return -EFAULT;
+	if (count > UIO_MAXIOV)
+		return -EINVAL;
+	if (count > UIO_FASTIOV) {
+		iov = kmalloc(count*sizeof(struct iovec), GFP_KERNEL);
+		if (!iov)
+			return -ENOMEM;
+	}
+
+	tot_len = 0;
+	i = count;
+	ivp = iov;
+	while (i > 0) {
+		u32 len;
+		u32 buf;
+
+		__get_user(len, &vector->iov_len);
+		__get_user(buf, &vector->iov_base);
+		tot_len += len;
+		ivp->iov_base = (void *)A(buf);
+		ivp->iov_len = (__kernel_size_t) len;
+		vector++;
+		ivp++;
+		i--;
+	}
+
+	inode = file->f_dentry->d_inode;
+	/* VERIFY_WRITE actually means a read, as we write to user space */
+	retval = locks_verify_area((type == VERIFY_WRITE
+				    ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
+				   inode, file, file->f_pos, tot_len);
+	if (retval) {
+		if (iov != iovstack)
+			kfree(iov);
+		return retval;
+	}
+
+	/* Then do the actual IO.  Note that sockets need to be handled
+	 * specially as they have atomicity guarantees and can handle
+	 * iovec's natively
+	 */
+	if (inode->i_sock) {
+		int err;
+		err = sock_readv_writev(type, inode, file, iov, count, tot_len);
+		if (iov != iovstack)
+			kfree(iov);
+		return err;
+	}
+
+	if (!file->f_op) {
+		if (iov != iovstack)
+			kfree(iov);
+		return -EINVAL;
+	}
+	/* VERIFY_WRITE actually means a read, as we write to user space */
+	fn = file->f_op->read;
+	if (type == VERIFY_READ)
+		fn = (IO_fn_t) file->f_op->write;		
+	ivp = iov;
+	while (count > 0) {
+		void * base;
+		int len, nr;
+
+		base = ivp->iov_base;
+		len = ivp->iov_len;
+		ivp++;
+		count--;
+		nr = fn(file, base, len, &file->f_pos);
+		if (nr < 0) {
+			if (retval)
+				break;
+			retval = nr;
+			break;
+		}
+		retval += nr;
+		if (nr != len)
+			break;
+	}
+	if (iov != iovstack)
+		kfree(iov);
+
+	return retval;
+}
+
+asmlinkage long
+sys32_readv(int fd, struct iovec32 *vector, u32 count)
+{
+	struct file *file;
+	ssize_t ret;
+
+	ret = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto bad_file;
+	if (file->f_op && (file->f_mode & FMODE_READ) &&
+	    (file->f_op->readv || file->f_op->read))
+		ret = do_readv_writev32(VERIFY_WRITE, file, vector, count);
+
+	fput(file);
+
+bad_file:
+	return ret;
+}
+
+asmlinkage long
+sys32_writev(int fd, struct iovec32 *vector, u32 count)
+{
+	struct file *file;
+	ssize_t ret;
+
+	ret = -EBADF;
+	file = fget(fd);
+	if(!file)
+		goto bad_file;
+	if (file->f_op && (file->f_mode & FMODE_WRITE) &&
+	    (file->f_op->writev || file->f_op->write))
+	        ret = do_readv_writev32(VERIFY_READ, file, vector, count);
+	fput(file);
+
+bad_file:
+	return ret;
+}
+
+/********** Borrowed from sparc64 -- hardly reviewed, not tested *****/
+#include <linux/net.h>
+#include <net/scm.h>
+/* XXX This really belongs in some header file... -DaveM */
+#define MAX_SOCK_ADDR	128		/* 108 for Unix domain - 
+					   16 for IP, 16 for IPX,
+					   24 for IPv6,
+					   about 80 for AX.25 */
+
+extern struct socket *sockfd_lookup(int fd, int *err);
+
+struct msghdr32 {
+        u32               msg_name;
+        int               msg_namelen;
+        u32               msg_iov;
+        __kernel_size_t32 msg_iovlen;
+        u32               msg_control;
+        __kernel_size_t32 msg_controllen;
+        unsigned          msg_flags;
+};
+
+struct cmsghdr32 {
+        __kernel_size_t32 cmsg_len;
+        int               cmsg_level;
+        int               cmsg_type;
+};
+
+/* Bleech... */
+#define __CMSG32_NXTHDR(ctl, len, cmsg, cmsglen) __cmsg32_nxthdr((ctl),(len),(cmsg),(cmsglen))
+#define CMSG32_NXTHDR(mhdr, cmsg, cmsglen) cmsg32_nxthdr((mhdr), (cmsg), (cmsglen))
+
+#define CMSG32_ALIGN(len) ( ((len)+sizeof(int)-1) & ~(sizeof(int)-1) )
+
+#define CMSG32_DATA(cmsg)	((void *)((char *)(cmsg) + CMSG32_ALIGN(sizeof(struct cmsghdr32))))
+#define CMSG32_SPACE(len) (CMSG32_ALIGN(sizeof(struct cmsghdr32)) + CMSG32_ALIGN(len))
+#define CMSG32_LEN(len) (CMSG32_ALIGN(sizeof(struct cmsghdr32)) + (len))
+
+#define __CMSG32_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr32) ? \
+				    (struct cmsghdr32 *)(ctl) : \
+				    (struct cmsghdr32 *)NULL)
+#define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
+
+__inline__ struct cmsghdr32 *__cmsg32_nxthdr(void *__ctl, __kernel_size_t __size,
+					      struct cmsghdr32 *__cmsg, int __cmsg_len)
+{
+	struct cmsghdr32 * __ptr;
+
+	__ptr = (struct cmsghdr32 *)(((unsigned char *) __cmsg) +
+				     CMSG32_ALIGN(__cmsg_len));
+	if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size)
+		return NULL;
+
+	return __ptr;
+}
+
+__inline__ struct cmsghdr32 *cmsg32_nxthdr (struct msghdr *__msg,
+					    struct cmsghdr32 *__cmsg,
+					    int __cmsg_len)
+{
+	return __cmsg32_nxthdr(__msg->msg_control, __msg->msg_controllen,
+			       __cmsg, __cmsg_len);
+}
+
+static inline int iov_from_user32_to_kern(struct iovec *kiov,
+					  struct iovec32 *uiov32,
+					  int niov)
+{
+	int tot_len = 0;
+
+	while(niov > 0) {
+		u32 len, buf;
+
+		if(get_user(len, &uiov32->iov_len) ||
+		   get_user(buf, &uiov32->iov_base)) {
+			tot_len = -EFAULT;
+			break;
+		}
+		tot_len += len;
+		kiov->iov_base = (void *)A(buf);
+		kiov->iov_len = (__kernel_size_t) len;
+		uiov32++;
+		kiov++;
+		niov--;
+	}
+	return tot_len;
+}
+
+static inline int msghdr_from_user32_to_kern(struct msghdr *kmsg,
+					     struct msghdr32 *umsg)
+{
+	u32 tmp1, tmp2, tmp3;
+	int err;
+
+	err = get_user(tmp1, &umsg->msg_name);
+	err |= __get_user(tmp2, &umsg->msg_iov);
+	err |= __get_user(tmp3, &umsg->msg_control);
+	if (err)
+		return -EFAULT;
+
+	kmsg->msg_name = (void *)A(tmp1);
+	kmsg->msg_iov = (struct iovec *)A(tmp2);
+	kmsg->msg_control = (void *)A(tmp3);
+
+	err = get_user(kmsg->msg_namelen, &umsg->msg_namelen);
+	err |= get_user(kmsg->msg_iovlen, &umsg->msg_iovlen);
+	err |= get_user(kmsg->msg_controllen, &umsg->msg_controllen);
+	err |= get_user(kmsg->msg_flags, &umsg->msg_flags);
+	
+	return err;
+}
+
+/* I've named the args so it is easy to tell whose space the pointers are in. */
+static int verify_iovec32(struct msghdr *kern_msg, struct iovec *kern_iov,
+			  char *kern_address, int mode)
+{
+	int tot_len;
+
+	if(kern_msg->msg_namelen) {
+		if(mode==VERIFY_READ) {
+			int err = move_addr_to_kernel(kern_msg->msg_name,
+						      kern_msg->msg_namelen,
+						      kern_address);
+			if(err < 0)
+				return err;
+		}
+		kern_msg->msg_name = kern_address;
+	} else
+		kern_msg->msg_name = NULL;
+
+	if(kern_msg->msg_iovlen > UIO_FASTIOV) {
+		kern_iov = kmalloc(kern_msg->msg_iovlen * sizeof(struct iovec),
+				   GFP_KERNEL);
+		if(!kern_iov)
+			return -ENOMEM;
+	}
+
+	tot_len = iov_from_user32_to_kern(kern_iov,
+					  (struct iovec32 *)kern_msg->msg_iov,
+					  kern_msg->msg_iovlen);
+	if(tot_len >= 0)
+		kern_msg->msg_iov = kern_iov;
+	else if(kern_msg->msg_iovlen > UIO_FASTIOV)
+		kfree(kern_iov);
+
+	return tot_len;
+}
+
+/* There is a lot of hair here because the alignment rules (and
+ * thus placement) of cmsg headers and length are different for
+ * 32-bit apps.  -DaveM
+ */
+static int cmsghdr_from_user32_to_kern(struct msghdr *kmsg,
+				       unsigned char *stackbuf, int stackbuf_size)
+{
+	struct cmsghdr32 *ucmsg;
+	struct cmsghdr *kcmsg, *kcmsg_base;
+	__kernel_size_t32 ucmlen;
+	__kernel_size_t kcmlen, tmp;
+
+	kcmlen = 0;
+	kcmsg_base = kcmsg = (struct cmsghdr *)stackbuf;
+	ucmsg = CMSG32_FIRSTHDR(kmsg);
+	while(ucmsg != NULL) {
+		if(get_user(ucmlen, &ucmsg->cmsg_len))
+			return -EFAULT;
+
+		/* Catch bogons. */
+		if(CMSG32_ALIGN(ucmlen) <
+		   CMSG32_ALIGN(sizeof(struct cmsghdr32)))
+			return -EINVAL;
+		if((unsigned long)(((char *)ucmsg - (char *)kmsg->msg_control)
+				   + ucmlen) > kmsg->msg_controllen)
+			return -EINVAL;
+
+		tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+		       CMSG_ALIGN(sizeof(struct cmsghdr)));
+		kcmlen += tmp;
+		ucmsg = CMSG32_NXTHDR(kmsg, ucmsg, ucmlen);
+	}
+	if(kcmlen == 0)
+		return -EINVAL;
+
+	/* The kcmlen holds the 64-bit version of the control length.
+	 * It may not be modified as we do not stick it into the kmsg
+	 * until we have successfully copied over all of the data
+	 * from the user.
+	 */
+	if(kcmlen > stackbuf_size)
+		kcmsg_base = kcmsg = kmalloc(kcmlen, GFP_KERNEL);
+	if(kcmsg == NULL)
+		return -ENOBUFS;
+
+	/* Now copy them over neatly. */
+	memset(kcmsg, 0, kcmlen);
+	ucmsg = CMSG32_FIRSTHDR(kmsg);
+	while(ucmsg != NULL) {
+		__get_user(ucmlen, &ucmsg->cmsg_len);
+		tmp = ((ucmlen - CMSG32_ALIGN(sizeof(*ucmsg))) +
+		       CMSG_ALIGN(sizeof(struct cmsghdr)));
+		kcmsg->cmsg_len = tmp;
+		__get_user(kcmsg->cmsg_level, &ucmsg->cmsg_level);
+		__get_user(kcmsg->cmsg_type, &ucmsg->cmsg_type);
+
+		/* Copy over the data. */
+		if(copy_from_user(CMSG_DATA(kcmsg),
+				  CMSG32_DATA(ucmsg),
+				  (ucmlen - CMSG32_ALIGN(sizeof(*ucmsg)))))
+			goto out_free_efault;
+
+		/* Advance. */
+		kcmsg = (struct cmsghdr *)((char *)kcmsg + CMSG_ALIGN(tmp));
+		ucmsg = CMSG32_NXTHDR(kmsg, ucmsg, ucmlen);
+	}
+
+	/* Ok, looks like we made it.  Hook it up and return success. */
+	kmsg->msg_control = kcmsg_base;
+	kmsg->msg_controllen = kcmlen;
+	return 0;
+
+out_free_efault:
+	if(kcmsg_base != (struct cmsghdr *)stackbuf)
+		kfree(kcmsg_base);
+	return -EFAULT;
+}
+
+static void put_cmsg32(struct msghdr *kmsg, int level, int type,
+		       int len, void *data)
+{
+	struct cmsghdr32 *cm = (struct cmsghdr32 *) kmsg->msg_control;
+	struct cmsghdr32 cmhdr;
+	int cmlen = CMSG32_LEN(len);
+
+	if(cm == NULL || kmsg->msg_controllen < sizeof(*cm)) {
+		kmsg->msg_flags |= MSG_CTRUNC;
+		return;
+	}
+
+	if(kmsg->msg_controllen < cmlen) {
+		kmsg->msg_flags |= MSG_CTRUNC;
+		cmlen = kmsg->msg_controllen;
+	}
+	cmhdr.cmsg_level = level;
+	cmhdr.cmsg_type = type;
+	cmhdr.cmsg_len = cmlen;
+
+	if(copy_to_user(cm, &cmhdr, sizeof cmhdr))
+		return;
+	if(copy_to_user(CMSG32_DATA(cm), data, cmlen - sizeof(struct cmsghdr32)))
+		return;
+	cmlen = CMSG32_SPACE(len);
+	kmsg->msg_control += cmlen;
+	kmsg->msg_controllen -= cmlen;
+}
+
+static void scm_detach_fds32(struct msghdr *kmsg, struct scm_cookie *scm)
+{
+	struct cmsghdr32 *cm = (struct cmsghdr32 *) kmsg->msg_control;
+	int fdmax = (kmsg->msg_controllen - sizeof(struct cmsghdr32)) / sizeof(int);
+	int fdnum = scm->fp->count;
+	struct file **fp = scm->fp->fp;
+	int *cmfptr;
+	int err = 0, i;
+
+	if (fdnum < fdmax)
+		fdmax = fdnum;
+
+	for (i = 0, cmfptr = (int *) CMSG32_DATA(cm); i < fdmax; i++, cmfptr++) {
+		int new_fd;
+		err = get_unused_fd();
+		if (err < 0)
+			break;
+		new_fd = err;
+		err = put_user(new_fd, cmfptr);
+		if (err) {
+			put_unused_fd(new_fd);
+			break;
+		}
+		/* Bump the usage count and install the file. */
+		get_file(fp[i]);
+		fd_install(new_fd, fp[i]);
+	}
+
+	if (i > 0) {
+		int cmlen = CMSG32_LEN(i * sizeof(int));
+		if (!err)
+			err = put_user(SOL_SOCKET, &cm->cmsg_level);
+		if (!err)
+			err = put_user(SCM_RIGHTS, &cm->cmsg_type);
+		if (!err)
+			err = put_user(cmlen, &cm->cmsg_len);
+		if (!err) {
+			cmlen = CMSG32_SPACE(i * sizeof(int));
+			kmsg->msg_control += cmlen;
+			kmsg->msg_controllen -= cmlen;
+		}
+	}
+	if (i < fdnum)
+		kmsg->msg_flags |= MSG_CTRUNC;
+
+	/*
+	 * All of the files that fit in the message have had their
+	 * usage counts incremented, so we just free the list.
+	 */
+	__scm_destroy(scm);
+}
+
+/* In these cases we (currently) can just copy to data over verbatim
+ * because all CMSGs created by the kernel have well defined types which
+ * have the same layout in both the 32-bit and 64-bit API.  One must add
+ * some special cased conversions here if we start sending control messages
+ * with incompatible types.
+ *
+ * SCM_RIGHTS and SCM_CREDENTIALS are done by hand in recvmsg32 right after
+ * we do our work.  The remaining cases are:
+ *
+ * SOL_IP	IP_PKTINFO	struct in_pktinfo	32-bit clean
+ *		IP_TTL		int			32-bit clean
+ *		IP_TOS		__u8			32-bit clean
+ *		IP_RECVOPTS	variable length		32-bit clean
+ *		IP_RETOPTS	variable length		32-bit clean
+ *		(these last two are clean because the types are defined
+ *		 by the IPv4 protocol)
+ *		IP_RECVERR	struct sock_extended_err +
+ *				struct sockaddr_in	32-bit clean
+ * SOL_IPV6	IPV6_RECVERR	struct sock_extended_err +
+ *				struct sockaddr_in6	32-bit clean
+ *		IPV6_PKTINFO	struct in6_pktinfo	32-bit clean
+ *		IPV6_HOPLIMIT	int			32-bit clean
+ *		IPV6_FLOWINFO	u32			32-bit clean
+ *		IPV6_HOPOPTS	ipv6 hop exthdr		32-bit clean
+ *		IPV6_DSTOPTS	ipv6 dst exthdr(s)	32-bit clean
+ *		IPV6_RTHDR	ipv6 routing exthdr	32-bit clean
+ *		IPV6_AUTHHDR	ipv6 auth exthdr	32-bit clean
+ */
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+{
+	unsigned char *workbuf, *wp;
+	unsigned long bufsz, space_avail;
+	struct cmsghdr *ucmsg;
+
+	bufsz = ((unsigned long)kmsg->msg_control) - orig_cmsg_uptr;
+	space_avail = kmsg->msg_controllen + bufsz;
+	wp = workbuf = kmalloc(bufsz, GFP_KERNEL);
+	if(workbuf == NULL)
+		goto fail;
+
+	/* To make this more sane we assume the kernel sends back properly
+	 * formatted control messages.  Because of how the kernel will truncate
+	 * the cmsg_len for MSG_TRUNC cases, we need not check that case either.
+	 */
+	ucmsg = (struct cmsghdr *) orig_cmsg_uptr;
+	while(((unsigned long)ucmsg) <=
+	      (((unsigned long)kmsg->msg_control) - sizeof(struct cmsghdr))) {
+		struct cmsghdr32 *kcmsg32 = (struct cmsghdr32 *) wp;
+		int clen64, clen32;
+
+		/* UCMSG is the 64-bit format CMSG entry in user-space.
+		 * KCMSG32 is within the kernel space temporary buffer
+		 * we use to convert into a 32-bit style CMSG.
+		 */
+		__get_user(kcmsg32->cmsg_len, &ucmsg->cmsg_len);
+		__get_user(kcmsg32->cmsg_level, &ucmsg->cmsg_level);
+		__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
+
+		clen64 = kcmsg32->cmsg_len;
+		copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
+			       clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
+		clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
+			  CMSG32_ALIGN(sizeof(struct cmsghdr32)));
+		kcmsg32->cmsg_len = clen32;
+
+		ucmsg = (struct cmsghdr *) (((char *)ucmsg) + CMSG_ALIGN(clen64));
+		wp = (((char *)kcmsg32) + CMSG32_ALIGN(clen32));
+	}
+
+	/* Copy back fixed up data, and adjust pointers. */
+	bufsz = (wp - workbuf);
+	copy_to_user((void *)orig_cmsg_uptr, workbuf, bufsz);
+
+	kmsg->msg_control = (struct cmsghdr *)
+		(((char *)orig_cmsg_uptr) + bufsz);
+	kmsg->msg_controllen = space_avail - bufsz;
+
+	kfree(workbuf);
+	return;
+
+fail:
+	/* If we leave the 64-bit format CMSG chunks in there,
+	 * the application could get confused and crash.  So to
+	 * ensure greater recovery, we report no CMSGs.
+	 */
+	kmsg->msg_controllen += bufsz;
+	kmsg->msg_control = (void *) orig_cmsg_uptr;
+}
+
+asmlinkage int sys32_sendmsg(int fd, struct msghdr32 *user_msg, unsigned user_flags)
+{
+	struct socket *sock;
+	char address[MAX_SOCK_ADDR];
+	struct iovec iov[UIO_FASTIOV];
+	unsigned char ctl[sizeof(struct cmsghdr) + 20];
+	unsigned char *ctl_buf = ctl;
+	struct msghdr kern_msg;
+	int err, total_len;
+
+	if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
+		return -EFAULT;
+	if(kern_msg.msg_iovlen > UIO_MAXIOV)
+		return -EINVAL;
+	err = verify_iovec32(&kern_msg, iov, address, VERIFY_READ);
+	if (err < 0)
+		goto out;
+	total_len = err;
+
+	if(kern_msg.msg_controllen) {
+		err = cmsghdr_from_user32_to_kern(&kern_msg, ctl, sizeof(ctl));
+		if(err)
+			goto out_freeiov;
+		ctl_buf = kern_msg.msg_control;
+	}
+	kern_msg.msg_flags = user_flags;
+
+	sock = sockfd_lookup(fd, &err);
+	if (sock != NULL) {
+		if (sock->file->f_flags & O_NONBLOCK)
+			kern_msg.msg_flags |= MSG_DONTWAIT;
+		err = sock_sendmsg(sock, &kern_msg, total_len);
+		sockfd_put(sock);
+	}
+
+	/* N.B. Use kfree here, as kern_msg.msg_controllen might change? */
+	if(ctl_buf != ctl)
+		kfree(ctl_buf);
+out_freeiov:
+	if(kern_msg.msg_iov != iov)
+		kfree(kern_msg.msg_iov);
+out:
+	return err;
+}
+
+asmlinkage int sys32_recvmsg(int fd, struct msghdr32 *user_msg, unsigned int user_flags)
+{
+	struct iovec iovstack[UIO_FASTIOV];
+	struct msghdr kern_msg;
+	char addr[MAX_SOCK_ADDR];
+	struct socket *sock;
+	struct iovec *iov = iovstack;
+	struct sockaddr *uaddr;
+	int *uaddr_len;
+	unsigned long cmsg_ptr;
+	int err, total_len, len = 0;
+
+	if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
+		return -EFAULT;
+	if(kern_msg.msg_iovlen > UIO_MAXIOV)
+		return -EINVAL;
+
+	uaddr = kern_msg.msg_name;
+	uaddr_len = &user_msg->msg_namelen;
+	err = verify_iovec32(&kern_msg, iov, addr, VERIFY_WRITE);
+	if (err < 0)
+		goto out;
+	total_len = err;
+
+	cmsg_ptr = (unsigned long) kern_msg.msg_control;
+	kern_msg.msg_flags = 0;
+
+	sock = sockfd_lookup(fd, &err);
+	if (sock != NULL) {
+		struct sock_iocb *si;
+		struct kiocb iocb;
+
+		if (sock->file->f_flags & O_NONBLOCK)
+			user_flags |= MSG_DONTWAIT;
+
+		init_sync_kiocb(&iocb, NULL);
+		si = kiocb_to_siocb(&iocb);
+		si->sock = sock;
+		si->scm = &si->async_scm;
+		si->msg = &kern_msg;
+		si->size = total_len;
+		si->flags = user_flags;
+		memset(si->scm, 0, sizeof(*si->scm));
+
+		err = sock->ops->recvmsg(&iocb, sock, &kern_msg, total_len,
+					 user_flags, si->scm);
+		if (-EIOCBQUEUED == err)
+			err = wait_on_sync_kiocb(&iocb);
+
+		if(err >= 0) {
+			len = err;
+			if(!kern_msg.msg_control) {
+				if(sock->passcred || si->scm->fp)
+					kern_msg.msg_flags |= MSG_CTRUNC;
+				if(si->scm->fp)
+					__scm_destroy(si->scm);
+			} else {
+				/* If recvmsg processing itself placed some
+				 * control messages into user space, it's is
+				 * using 64-bit CMSG processing, so we need
+				 * to fix it up before we tack on more stuff.
+				 */
+				if((unsigned long) kern_msg.msg_control != cmsg_ptr)
+					cmsg32_recvmsg_fixup(&kern_msg, cmsg_ptr);
+
+				/* Wheee... */
+				if(sock->passcred)
+					put_cmsg32(&kern_msg,
+						   SOL_SOCKET, SCM_CREDENTIALS,
+						   sizeof(si->scm->creds),
+						   &si->scm->creds);
+				if(si->scm->fp != NULL)
+					scm_detach_fds32(&kern_msg, si->scm);
+			}
+		}
+		sockfd_put(sock);
+	}
+
+	if(uaddr != NULL && err >= 0)
+		err = move_addr_to_user(addr, kern_msg.msg_namelen, uaddr, uaddr_len);
+	if(cmsg_ptr != 0 && err >= 0) {
+		unsigned long ucmsg_ptr = ((unsigned long)kern_msg.msg_control);
+		__kernel_size_t32 uclen = (__kernel_size_t32) (ucmsg_ptr - cmsg_ptr);
+		err |= __put_user(uclen, &user_msg->msg_controllen);
+	}
+	if(err >= 0)
+		err = __put_user(kern_msg.msg_flags, &user_msg->msg_flags);
+	if(kern_msg.msg_iov != iov)
+		kfree(kern_msg.msg_iov);
+out:
+	if(err < 0)
+		return err;
+	return len;
+}
+
+
+extern asmlinkage int sys_setsockopt(int fd, int level, int optname,
+				     char *optval, int optlen);
+
+static int do_set_attach_filter(int fd, int level, int optname,
+				char *optval, int optlen)
+{
+	struct sock_fprog32 {
+		__u16 len;
+		__u32 filter;
+	} *fprog32 = (struct sock_fprog32 *)optval;
+	struct sock_fprog kfprog;
+	struct sock_filter *kfilter;
+	unsigned int fsize;
+	mm_segment_t old_fs;
+	__u32 uptr;
+	int ret;
+
+	if (get_user(kfprog.len, &fprog32->len) ||
+	    __get_user(uptr, &fprog32->filter))
+		return -EFAULT;
+
+	kfprog.filter = (struct sock_filter *)A(uptr);
+	fsize = kfprog.len * sizeof(struct sock_filter);
+
+	kfilter = (struct sock_filter *)kmalloc(fsize, GFP_KERNEL);
+	if (kfilter == NULL)
+		return -ENOMEM;
+
+	if (copy_from_user(kfilter, kfprog.filter, fsize)) {
+		kfree(kfilter);
+		return -EFAULT;
+	}
+
+	kfprog.filter = kfilter;
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_setsockopt(fd, level, optname,
+			     (char *)&kfprog, sizeof(kfprog));
+	set_fs(old_fs);
+
+	kfree(kfilter);
+
+	return ret;
+}
+
+static int do_set_icmpv6_filter(int fd, int level, int optname,
+				char *optval, int optlen)
+{
+	struct icmp6_filter kfilter;
+	mm_segment_t old_fs;
+	int ret, i;
+
+	if (copy_from_user(&kfilter, optval, sizeof(kfilter)))
+		return -EFAULT;
+
+
+	for (i = 0; i < 8; i += 2) {
+		u32 tmp = kfilter.data[i];
+
+		kfilter.data[i] = kfilter.data[i + 1];
+		kfilter.data[i + 1] = tmp;
+	}
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+	ret = sys_setsockopt(fd, level, optname,
+			     (char *) &kfilter, sizeof(kfilter));
+	set_fs(old_fs);
+
+	return ret;
+}
+
+
+static int do_ipv4_set_replace(int fd, int level, int optname,
+				char *optval, int optlen)
+#if 1
+/* Fields happen to be padded such that this works.
+** Don't need to change iptables.h:struct ipt_replace
+*/
+{
+	struct ipt_replace *repl = (struct ipt_replace *) optval;
+	unsigned long ptr64;
+	unsigned int ptr32;
+	int ret;
+
+	if (copy_from_user(&ptr32, &repl->counters, sizeof(ptr32)))
+		return -EFAULT;
+	ptr64 = (unsigned long) ptr32;
+	if (copy_to_user(&repl->counters, &ptr64, sizeof(ptr64)))
+		return -EFAULT;
+
+	ret = sys_setsockopt(fd, level, optname, (char *) optval, optlen);
+
+	/* Restore 32-bit ptr */
+	if (copy_to_user(&repl->counters, &ptr32, sizeof(ptr32)))
+		return -EFAULT;
+
+	return ret;
+}
+#else
+/* This version tries to "do it right". ie allocate kernel buffers for
+** everything and copy data in/out. Way too complicated.
+** NOT TESTED for correctness!
+*/
+{
+	struct ipt_replace  *kern_repl;
+	struct ipt_counters *kern_counters;
+	unsigned int user_counters;
+	mm_segment_t old_fs;
+	int ret = 0;
+
+	kern_repl = (struct ipt_replace *) kmalloc(optlen+8, GFP_KERNEL);
+	if (!kern_repl)
+		return -ENOMEM;
+
+	if (copy_from_user(kern_repl, optval, optlen)) {
+		ret = -EFAULT;
+		goto err02;
+	}
+
+	/* 32-bit ptr is in the MSB's */
+	user_counters = (unsigned int) (((unsigned long) kern_repl->counters) >> 32);
+	/*
+	** We are going to set_fs() to kernel space - and thus need
+	** "relocate" the counters buffer to the kernel space.
+	*/
+	kern_counters = (struct ipt_counters *) kmalloc(kern_repl->num_counters * sizeof(struct ipt_counters), GFP_KERNEL);
+	if (!user_counters) {
+		ret = -ENOMEM;
+		goto err02;
+	}
+
+	if (copy_from_user(kern_counters, (char *) user_counters, optlen)) {
+		ret = -EFAULT;
+		goto err01;
+	}
+
+	/* We can update the kernel ptr now that we have the data. */
+	kern_repl->counters = kern_counters;
+
+	old_fs = get_fs();
+	set_fs(KERNEL_DS);
+
+	ret = sys_setsockopt(fd, level, optname, (char *) optval, optlen);
+
+	set_fs(old_fs);
+
+	/* Copy counters back out to user space */
+	if (copy_to_user((char *) user_counters, kern_counters,
+			kern_repl->num_counters * sizeof(struct ipt_counters)))
+	{
+		ret = -EFAULT;
+		goto err01;
+	}
+
+	/* restore counters so userspace can consume it */
+	kern_repl->counters = NULL;
+	(unsigned int) kern_repl->counters = user_counters;
+
+	/* Copy repl back out to user space */
+	if (copy_to_user(optval, kern_repl, optlen))
+	{
+		ret = -EFAULT;
+	}
+
+err01:
+	kfree(kern_counters);
+err02:
+	kfree(kern_repl);
+	return ret;
+}
+#endif
+
+
+asmlinkage int sys32_setsockopt(int fd, int level, int optname,
+				char *optval, int optlen)
+{
+	if (optname == SO_ATTACH_FILTER)
+		return do_set_attach_filter(fd, level, optname, optval, optlen);
+
+	if (level == SOL_ICMPV6   && optname == ICMPV6_FILTER)
+		return do_set_icmpv6_filter(fd, level, optname, optval, optlen);
+
+	/*
+	** Beware:    IPT_SO_SET_REPLACE == IP6T_SO_SET_REPLACE
+	*/
+	if (level == IPPROTO_IP   && optname == IPT_SO_SET_REPLACE)
+		return do_ipv4_set_replace(fd, level, optname, optval, optlen);
+
+	if (level == IPPROTO_IPV6 && optname == IP6T_SO_SET_REPLACE)
+#if 0
+		/* FIXME: I don't (yet) use IPV6. -ggg */
+		return do_ipv6_set_replace(fd, level, optname, optval, optlen);
+#else
+	{
+		BUG();
+		return -ENXIO;
+	}
+#endif
+
+	return sys_setsockopt(fd, level, optname, optval, optlen);
+}
+
+
+/*** copied from mips64 ***/
+/*
+ * Ooo, nasty.  We need here to frob 32-bit unsigned longs to
+ * 64-bit unsigned longs.
+ */
+
+static inline int
+get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
+{
+	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
+	if (ufdset) {
+		unsigned long odd;
+
+		if (verify_area(VERIFY_WRITE, ufdset, n*sizeof(u32)))
+			return -EFAULT;
+
+		odd = n & 1UL;
+		n &= ~1UL;
+		while (n) {
+			unsigned long h, l;
+			__get_user(l, ufdset);
+			__get_user(h, ufdset+1);
+			ufdset += 2;
+			*fdset++ = h << 32 | l;
+			n -= 2;
+		}
+		if (odd)
+			__get_user(*fdset, ufdset);
+	} else {
+		/* Tricky, must clear full unsigned long in the
+		 * kernel fdset at the end, this makes sure that
+		 * actually happens.
+		 */
+		memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32));
+	}
+	return 0;
+}
+
+static inline void
+set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset)
+{
+	unsigned long odd;
+	n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32));
+
+	if (!ufdset)
+		return;
+
+	odd = n & 1UL;
+	n &= ~1UL;
+	while (n) {
+		unsigned long h, l;
+		l = *fdset++;
+		h = l >> 32;
+		__put_user(l, ufdset);
+		__put_user(h, ufdset+1);
+		ufdset += 2;
+		n -= 2;
+	}
+	if (odd)
+		__put_user(*fdset, ufdset);
+}
+
+/*** This is a virtual copy of sys_select from fs/select.c and probably
+ *** should be compared to it from time to time
+ ***/
+static inline void *select_bits_alloc(int size)
+{
+	return kmalloc(6 * size, GFP_KERNEL);
+}
+
+static inline void select_bits_free(void *bits, int size)
+{
+	kfree(bits);
+}
+
+/*
+ * We can actually return ERESTARTSYS instead of EINTR, but I'd
+ * like to be certain this leads to no problems. So I return
+ * EINTR just for safety.
+ *
+ * Update: ERESTARTSYS breaks at least the xview clock binary, so
+ * I'm trying ERESTARTNOHAND which restart only when you want to.
+ */
+#define MAX_SELECT_SECONDS \
+	((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
+#define DIVIDE_ROUND_UP(x,y) (((x)+(y)-1)/(y))
+
+asmlinkage long
+sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, struct timeval32 *tvp)
+{
+	fd_set_bits fds;
+	char *bits;
+	long timeout;
+	int ret, size, err;
+
+	timeout = MAX_SCHEDULE_TIMEOUT;
+	if (tvp) {
+		struct timeval32 tv32;
+		time_t sec, usec;
+
+		if ((ret = copy_from_user(&tv32, tvp, sizeof tv32)))
+			goto out_nofds;
+
+		sec = tv32.tv_sec;
+		usec = tv32.tv_usec;
+
+		ret = -EINVAL;
+		if (sec < 0 || usec < 0)
+			goto out_nofds;
+
+		if ((unsigned long) sec < MAX_SELECT_SECONDS) {
+			timeout = DIVIDE_ROUND_UP(usec, 1000000/HZ);
+			timeout += sec * (unsigned long) HZ;
+		}
+	}
+
+	ret = -EINVAL;
+	if (n < 0)
+		goto out_nofds;
+
+	if (n > current->files->max_fdset)
+		n = current->files->max_fdset;
+
+	/*
+	 * We need 6 bitmaps (in/out/ex for both incoming and outgoing),
+	 * since we used fdset we need to allocate memory in units of
+	 * long-words. 
+	 */
+	ret = -ENOMEM;
+	size = FDS_BYTES(n);
+	bits = select_bits_alloc(size);
+	if (!bits)
+		goto out_nofds;
+	fds.in      = (unsigned long *)  bits;
+	fds.out     = (unsigned long *) (bits +   size);
+	fds.ex      = (unsigned long *) (bits + 2*size);
+	fds.res_in  = (unsigned long *) (bits + 3*size);
+	fds.res_out = (unsigned long *) (bits + 4*size);
+	fds.res_ex  = (unsigned long *) (bits + 5*size);
+
+	if ((ret = get_fd_set32(n, inp, fds.in)) ||
+	    (ret = get_fd_set32(n, outp, fds.out)) ||
+	    (ret = get_fd_set32(n, exp, fds.ex)))
+		goto out;
+	zero_fd_set(n, fds.res_in);
+	zero_fd_set(n, fds.res_out);
+	zero_fd_set(n, fds.res_ex);
+
+	ret = do_select(n, &fds, &timeout);
+
+	if (tvp && !(current->personality & STICKY_TIMEOUTS)) {
+		time_t sec = 0, usec = 0;
+		if (timeout) {
+			sec = timeout / HZ;
+			usec = timeout % HZ;
+			usec *= (1000000/HZ);
+		}
+		err = put_user(sec, &tvp->tv_sec);
+		err |= __put_user(usec, &tvp->tv_usec);
+		if (err)
+			ret = -EFAULT;
+	}
+
+	if (ret < 0)
+		goto out;
+	if (!ret) {
+		ret = -ERESTARTNOHAND;
+		if (signal_pending(current))
+			goto out;
+		ret = 0;
+	}
+
+	set_fd_set32(n, inp, fds.res_in);
+	set_fd_set32(n, outp, fds.res_out);
+	set_fd_set32(n, exp, fds.res_ex);
+
+out:
+	select_bits_free(bits, size);
+out_nofds:
+	return ret;
+}
+
+struct msgbuf32 {
+    int mtype;
+    char mtext[1];
+};
+
+asmlinkage long sys32_msgsnd(int msqid,
+				struct msgbuf32 *umsgp32,
+				size_t msgsz, int msgflg)
+{
+	struct msgbuf *mb;
+	struct msgbuf32 mb32;
+	int err;
+
+	if ((mb = kmalloc(msgsz + sizeof *mb + 4, GFP_KERNEL)) == NULL)
+		return -ENOMEM;
+
+	err = get_user(mb32.mtype, &umsgp32->mtype);
+	mb->mtype = mb32.mtype;
+	err |= copy_from_user(mb->mtext, &umsgp32->mtext, msgsz);
+
+	if (err)
+		err = -EFAULT;
+	else
+		KERNEL_SYSCALL(err, sys_msgsnd, msqid, mb, msgsz, msgflg);
+
+	kfree(mb);
+	return err;
+}
+
+asmlinkage long sys32_msgrcv(int msqid,
+				struct msgbuf32 *umsgp32,
+				size_t msgsz, long msgtyp, int msgflg)
+{
+	struct msgbuf *mb;
+	struct msgbuf32 mb32;
+	int err, len;
+
+	if ((mb = kmalloc(msgsz + sizeof *mb + 4, GFP_KERNEL)) == NULL)
+		return -ENOMEM;
+
+	KERNEL_SYSCALL(err, sys_msgrcv, msqid, mb, msgsz, msgtyp, msgflg);
+
+	if (err >= 0) {
+		len = err;
+		mb32.mtype = mb->mtype;
+		err = put_user(mb32.mtype, &umsgp32->mtype);
+		err |= copy_to_user(&umsgp32->mtext, mb->mtext, len);
+		if (err)
+			err = -EFAULT;
+		else
+			err = len;
+	}
+
+	kfree(mb);
+	return err;
+}
+
+/* LFS */
+
+extern asmlinkage long sys_truncate(const char *, loff_t);
+extern asmlinkage long sys_ftruncate(unsigned int, loff_t);
+extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);
+
+asmlinkage long sys32_truncate64(const char * path, unsigned int high, unsigned int low)
+{
+	return sys_truncate(path, (loff_t)high << 32 | low);
+}
+
+asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned int high, unsigned int low)
+{
+	return sys_ftruncate(fd, (loff_t)high << 32 | low);
+}
+
+asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	switch (cmd) {
+		case F_GETLK64:
+			cmd = F_GETLK;
+			break;
+		case F_SETLK64:
+			cmd = F_SETLK;
+			break;
+		case F_SETLKW64:
+			cmd = F_SETLKW;
+			break;
+		default:
+			break;
+	}
+	return sys_fcntl(fd, cmd, arg);
+}
+
+/* EXPORT/UNEXPORT */
+struct nfsctl_export32 {
+	char			ex_client[NFSCLNT_IDMAX+1];
+	char			ex_path[NFS_MAXPATHLEN+1];
+	__kernel_dev_t		ex_dev;
+	__kernel_ino_t32	ex_ino;
+	int			ex_flags;
+	__kernel_uid_t		ex_anon_uid;
+	__kernel_gid_t		ex_anon_gid;
+};
+
+/* GETFH */
+struct nfsctl_fhparm32 {
+	struct sockaddr		gf_addr;
+	__kernel_dev_t		gf_dev;
+	__kernel_ino_t32	gf_ino;
+	int			gf_version;
+};
+
+/* UGIDUPDATE */
+struct nfsctl_uidmap32 {
+	__kernel_caddr_t32	ug_ident;
+	__kernel_uid_t		ug_uidbase;
+	int			ug_uidlen;
+	__kernel_caddr_t32	ug_udimap;
+	__kernel_gid_t		ug_gidbase;
+	int			ug_gidlen;
+	__kernel_caddr_t32	ug_gdimap;
+};
+
+struct nfsctl_arg32 {
+	int			ca_version;	/* safeguard */
+	/* wide kernel places this union on 8-byte boundary, narrow on 4 */
+	union {
+		struct nfsctl_svc	u_svc;
+		struct nfsctl_client	u_client;
+		struct nfsctl_export32	u_export;
+		struct nfsctl_uidmap32	u_umap;
+		struct nfsctl_fhparm32	u_getfh;
+		struct nfsctl_fdparm	u_getfd;
+		struct nfsctl_fsparm	u_getfs;
+	} u;
+};
+
+asmlinkage int sys32_nfsservctl(int cmd, void *argp, void *resp)
+{
+	int ret, tmp;
+	struct nfsctl_arg32 n32;
+	struct nfsctl_arg n;
+
+	ret = copy_from_user(&n, argp, sizeof n.ca_version);
+	if (ret != 0)
+		return ret;
+
+	/* adjust argp to point at the union inside the user's n32 struct */
+	tmp = (unsigned long)&n32.u - (unsigned long)&n32;
+	argp = (void *)((unsigned long)argp + tmp);
+	switch(cmd) {
+	case NFSCTL_SVC:
+		ret = copy_from_user(&n.u, argp, sizeof n.u.u_svc);
+		break;
+
+	case NFSCTL_ADDCLIENT:
+	case NFSCTL_DELCLIENT:
+		ret = copy_from_user(&n.u, argp, sizeof n.u.u_client);
+		break;
+
+	case NFSCTL_GETFD:
+		ret = copy_from_user(&n.u, argp, sizeof n.u.u_getfd);
+		break;
+
+	case NFSCTL_GETFS:
+		ret = copy_from_user(&n.u, argp, sizeof n.u.u_getfs);
+		break;
+
+	case NFSCTL_GETFH:		/* nfsctl_fhparm */
+		ret = copy_from_user(&n32.u, argp, sizeof n32.u.u_getfh);
+#undef CP
+#define CP(x)	n.u.u_getfh.gf_##x = n32.u.u_getfh.gf_##x
+		CP(addr);
+		CP(dev);
+		CP(ino);
+		CP(version);
+		break;
+
+	case NFSCTL_UGIDUPDATE:		/* nfsctl_uidmap */
+		ret = copy_from_user(&n32.u, argp, sizeof n32.u.u_umap);
+#undef CP
+#define CP(x)	n.u.u_umap.ug_##x = n32.u.u_umap.ug_##x
+		n.u.u_umap.ug_ident = (char *)(u_long)n32.u.u_umap.ug_ident;
+		CP(uidbase);
+		CP(uidlen);
+		n.u.u_umap.ug_udimap = (__kernel_uid_t *)(u_long)n32.u.u_umap.ug_udimap;
+		CP(gidbase);
+		CP(gidlen);
+		n.u.u_umap.ug_gdimap = (__kernel_gid_t *)(u_long)n32.u.u_umap.ug_gdimap;
+		break;
+
+	case NFSCTL_UNEXPORT:		/* nfsctl_export */
+	case NFSCTL_EXPORT:		/* nfsctl_export */
+		ret = copy_from_user(&n32.u, argp, sizeof n32.u.u_export);
+#undef CP
+#define CP(x)	n.u.u_export.ex_##x = n32.u.u_export.ex_##x
+		memcpy(n.u.u_export.ex_client, n32.u.u_export.ex_client, sizeof n32.u.u_export.ex_client);
+		memcpy(n.u.u_export.ex_path, n32.u.u_export.ex_path, sizeof n32.u.u_export.ex_path);
+		CP(dev);
+		CP(ino);
+		CP(flags);
+		CP(anon_uid);
+		CP(anon_gid);
+		break;
+
+	default:
+		BUG(); /* new cmd values to be translated... */
+		ret = -EINVAL;
+		break;
+	}
+
+	if (ret == 0) {
+		unsigned char rbuf[NFS_FHSIZE + sizeof (struct knfsd_fh)];
+		KERNEL_SYSCALL(ret, sys_nfsservctl, cmd, &n, &rbuf);
+		if (cmd == NFSCTL_GETFH || cmd == NFSCTL_GETFD) {
+			ret = copy_to_user(resp, rbuf, NFS_FHSIZE);
+		} else if (cmd == NFSCTL_GETFS) {
+			ret = copy_to_user(resp, rbuf, sizeof (struct knfsd_fh));
+		}
+	}
+
+	return ret;
+}
+
+#include <linux/quota.h>
+
+struct dqblk32 {
+    __u32 dqb_bhardlimit;
+    __u32 dqb_bsoftlimit;
+    __u32 dqb_curblocks;
+    __u32 dqb_ihardlimit;
+    __u32 dqb_isoftlimit;
+    __u32 dqb_curinodes;
+    __kernel_time_t32 dqb_btime;
+    __kernel_time_t32 dqb_itime;
+};
+                                
+
+asmlinkage int sys32_quotactl(int cmd, const char *special, int id, unsigned long addr)
+{
+#if 0
+	extern int sys_quotactl(int cmd, const char *special, int id, caddr_t addr);
+	int cmds = cmd >> SUBCMDSHIFT;
+	int err;
+	struct dqblk d;
+	char *spec;
+	
+	switch (cmds) {
+	case Q_GETQUOTA:
+		break;
+	case Q_SETQUOTA:
+	case Q_SETUSE:
+	case Q_SETQLIM:
+		if (copy_from_user (&d, (struct dqblk32 *)addr,
+				    sizeof (struct dqblk32)))
+			return -EFAULT;
+		d.dqb_itime = ((struct dqblk32 *)&d)->dqb_itime;
+		d.dqb_btime = ((struct dqblk32 *)&d)->dqb_btime;
+		break;
+	default:
+		return sys_quotactl(cmd, special,
+				    id, (caddr_t)addr);
+	}
+	spec = getname (special);
+	err = PTR_ERR(spec);
+	if (IS_ERR(spec)) return err;
+	KERNEL_SYSCALL(err, sys_quotactl, cmd, (const char *)spec, id, (caddr_t)&d);
+	putname (spec);
+	if (cmds == Q_GETQUOTA) {
+		__kernel_time_t b = d.dqb_btime, i = d.dqb_itime;
+		((struct dqblk32 *)&d)->dqb_itime = i;
+		((struct dqblk32 *)&d)->dqb_btime = b;
+		if (copy_to_user ((struct dqblk32 *)addr, &d,
+				  sizeof (struct dqblk32)))
+			return -EFAULT;
+	}
+	return err;
+#endif
+	/* TODO */
+	BUG();
+	return -EINVAL;
+}
+
+struct timex32 {
+	unsigned int modes;	/* mode selector */
+	int offset;		/* time offset (usec) */
+	int freq;		/* frequency offset (scaled ppm) */
+	int maxerror;		/* maximum error (usec) */
+	int esterror;		/* estimated error (usec) */
+	int status;		/* clock command/status */
+	int constant;		/* pll time constant */
+	int precision;		/* clock precision (usec) (read only) */
+	int tolerance;		/* clock frequency tolerance (ppm)
+				 * (read only)
+				 */
+	struct timeval32 time;	/* (read only) */
+	int tick;		/* (modified) usecs between clock ticks */
+
+	int ppsfreq;           /* pps frequency (scaled ppm) (ro) */
+	int jitter;            /* pps jitter (us) (ro) */
+	int shift;              /* interval duration (s) (shift) (ro) */
+	int stabil;            /* pps stability (scaled ppm) (ro) */
+	int jitcnt;            /* jitter limit exceeded (ro) */
+	int calcnt;            /* calibration intervals (ro) */
+	int errcnt;            /* calibration errors (ro) */
+	int stbcnt;            /* stability limit exceeded (ro) */
+
+	int  :32; int  :32; int  :32; int  :32;
+	int  :32; int  :32; int  :32; int  :32;
+	int  :32; int  :32; int  :32; int  :32;
+};
+
+asmlinkage long sys32_adjtimex(struct timex32 *txc_p32)
+{
+	struct timex txc;
+	struct timex32 t32;
+	int ret;
+	extern int do_adjtimex(struct timex *txc);
+
+	if(copy_from_user(&t32, txc_p32, sizeof(struct timex32)))
+		return -EFAULT;
+#undef CP
+#define CP(x) txc.x = t32.x
+	CP(modes); CP(offset); CP(freq); CP(maxerror); CP(esterror);
+	CP(status); CP(constant); CP(precision); CP(tolerance);
+	CP(time.tv_sec); CP(time.tv_usec); CP(tick); CP(ppsfreq); CP(jitter);
+	CP(shift); CP(stabil); CP(jitcnt); CP(calcnt); CP(errcnt);
+	CP(stbcnt);
+	ret = do_adjtimex(&txc);
+#undef CP
+#define CP(x) t32.x = txc.x
+	CP(modes); CP(offset); CP(freq); CP(maxerror); CP(esterror);
+	CP(status); CP(constant); CP(precision); CP(tolerance);
+	CP(time.tv_sec); CP(time.tv_usec); CP(tick); CP(ppsfreq); CP(jitter);
+	CP(shift); CP(stabil); CP(jitcnt); CP(calcnt); CP(errcnt);
+	CP(stbcnt);
+	return copy_to_user(txc_p32, &t32, sizeof(struct timex32)) ? -EFAULT : ret;
+}
+
+
+struct sysinfo32 {
+	s32 uptime;
+	u32 loads[3];
+	u32 totalram;
+	u32 freeram;
+	u32 sharedram;
+	u32 bufferram;
+	u32 totalswap;
+	u32 freeswap;
+	unsigned short procs;
+	u32 totalhigh;
+	u32 freehigh;
+	u32 mem_unit;
+	char _f[12];
+};
+
+/* We used to call sys_sysinfo and translate the result.  But sys_sysinfo
+ * undoes the good work done elsewhere, and rather than undoing the
+ * damage, I decided to just duplicate the code from sys_sysinfo here.
+ */
+
+asmlinkage int sys32_sysinfo(struct sysinfo32 *info)
+{
+	struct sysinfo val;
+	int err;
+	extern rwlock_t xtime_lock;
+
+	/* We don't need a memset here because we copy the
+	 * struct to userspace once element at a time.
+	 */
+
+	read_lock_irq(&xtime_lock);
+	val.uptime = jiffies / HZ;
+
+	val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
+	val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
+	val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
+
+	val.procs = nr_threads;
+	read_unlock_irq(&xtime_lock);
+
+	si_meminfo(&val);
+	si_swapinfo(&val);
+	
+	err = put_user (val.uptime, &info->uptime);
+	err |= __put_user (val.loads[0], &info->loads[0]);
+	err |= __put_user (val.loads[1], &info->loads[1]);
+	err |= __put_user (val.loads[2], &info->loads[2]);
+	err |= __put_user (val.totalram, &info->totalram);
+	err |= __put_user (val.freeram, &info->freeram);
+	err |= __put_user (val.sharedram, &info->sharedram);
+	err |= __put_user (val.bufferram, &info->bufferram);
+	err |= __put_user (val.totalswap, &info->totalswap);
+	err |= __put_user (val.freeswap, &info->freeswap);
+	err |= __put_user (val.procs, &info->procs);
+	err |= __put_user (val.totalhigh, &info->totalhigh);
+	err |= __put_user (val.freehigh, &info->freehigh);
+	err |= __put_user (val.mem_unit, &info->mem_unit);
+	return err ? -EFAULT : 0;
+}
+
+
+/* lseek() needs a wrapper because 'offset' can be negative, but the top
+ * half of the argument has been zeroed by syscall.S.
+ */
+
+extern asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin);
+
+asmlinkage int sys32_lseek(unsigned int fd, int offset, unsigned int origin)
+{
+	return sys_lseek(fd, offset, origin);
+}
+
+asmlinkage long sys32_semctl_broken(int semid, int semnum, int cmd, union semun arg)
+{
+        union semun u;
+	
+	cmd &= ~IPC_64; /* should be removed together with the _broken suffix */
+
+        if (cmd == SETVAL) {
+                /* Ugh.  arg is a union of int,ptr,ptr,ptr, so is 8 bytes.
+                 * The int should be in the first 4, but our argument
+                 * frobbing has left it in the last 4.
+                 */
+                u.val = *((int *)&arg + 1);
+                return sys_semctl (semid, semnum, cmd, u);
+	}
+	return sys_semctl (semid, semnum, cmd, arg);
+}
+
diff -Nru a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
--- a/arch/parisc/kernel/syscall.S	Wed Oct 30 16:44:36 2002
+++ b/arch/parisc/kernel/syscall.S	Wed Oct 30 16:44:36 2002
@@ -1,5 +1,5 @@
 /* 
- * Linux/PARISC Project (http://www.thepuffingroup.com/parisc)
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
  * 
  * System call entry code Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai>
  * Licensed under the GNU GPL.
@@ -7,15 +7,14 @@
  * sorry about the wall, puffin..
  */
 
-#include <asm/offset.h>
+#include <asm/offsets.h>
 #include <asm/unistd.h>
 #include <asm/errno.h>
 #include <asm/psw.h>
+#include <asm/thread_info.h>
 
-#define __ASSEMBLY__
 #include <asm/assembly.h>
 #include <asm/processor.h>
-#include <linux/version.h>
 
 #ifdef __LP64__
 	.level          2.0w
@@ -23,7 +22,13 @@
 	.level		1.1
 #endif
 	.text
-	
+
+#ifdef __LP64__
+#define FRAME_SIZE	128
+#else
+#define FRAME_SIZE	64
+#endif
+
 	.import syscall_exit,code
 	.import syscall_exit_rfi,code
 	.export linux_gateway_page
@@ -39,17 +44,30 @@
 	.align 4096
 linux_gateway_page:
 
+	.rept 56
+	break   0,0
+	.endr
+
+set_thread_pointer:
+	gate	.+8, %r0		/* increase privilege */
+	depi	3, 31, 2, %r31		/* Ensure we return into user mode. */
+	be	0(%sr7,%r31)		/* return to user space */
+	mtctl	%r26, %cr27		/* move arg0 to the control register */
+
+	.rept 4
 	break   0,0
+	.endr
 
+/* This address must remain fixed, or user binaries go splat. */
 	.align 256
 linux_gateway_entry:
-	mfsp	%sr7,%r1			/* we must set sr3 to the space */
-	mtsp	%r1,%sr3			/* of the user before the gate */
 	gate	.+8, %r0			/* become privileged */
 	mtsp	%r0,%sr4			/* get kernel space into sr4 */
 	mtsp	%r0,%sr5			/* get kernel space into sr5 */
 	mtsp	%r0,%sr6			/* get kernel space into sr6 */
-	mtsp	%r0,%sr7			/* get kernel space into sr7 */
+	mfsp    %sr7,%r1                        /* save user sr7 */
+	mtsp    %r1,%sr3                        /* and store it in sr3 */
+
 #ifdef __LP64__
 	/* for now we can *always* set the W bit on entry to the syscall
 	 * since we don't support wide userland processes.  We could
@@ -58,16 +76,42 @@
 	 * whether to do narrow or wide syscalls. -PB
 	 */
 	ssm	PSW_SM_W, %r0
+	/* The top halves of argument registers must be cleared on syscall
+	 * entry.
+	 */
+	depdi	0, 31, 32, %r26
+	depdi	0, 31, 32, %r25
+	depdi	0, 31, 32, %r24
+	depdi	0, 31, 32, %r23
+	depdi	0, 31, 32, %r22
+	depdi	0, 31, 32, %r21
 #endif
-	mtctl	%r28,%cr27
-	rsm	PSW_I, %r28			/* no ints for a bit  */
-	mfctl	%cr30,%r1			/* get the kernel task ptr */
-	mtctl	%r0,%cr30			/* zero it (flag) */
+	mfctl   %cr30,%r1
+	xor     %r1,%r30,%r30                   /* ye olde xor trick */
+	xor     %r1,%r30,%r1
+	xor     %r1,%r30,%r30
+	ldo     THREAD_SZ_ALGN+FRAME_SIZE(%r30),%r30  /* set up kernel stack */
+
+	/* N.B.: It is critical that we don't set sr7 to 0 until r30
+	 *       contains a valid kernel stack pointer. It is also
+	 *       critical that we don't start using the kernel stack
+	 *       until after sr7 has been set to 0.
+	 */
+
+	mtsp	%r0,%sr7			/* get kernel space into sr7 */
+	STREG	%r1,0(%r30)			/* Stick r1 (usp) here for now */
+	mfctl	%cr30,%r1			/*  get task ptr in %r1 */
+	LDREG	0(%r1),%r1
 
 	/* Save some registers for sigcontext and potential task
 	   switch (see entry.S for the details of which ones are
-	   saved/restored) */
+	   saved/restored).  TASK_PT_PSW is zeroed so we can see whether
+	   a process is on a syscall or not.  For an interrupt the real
+	   PSW value is stored.  This is needed for gdb and sys_ptrace. */
+	STREG	%r0,  TASK_PT_PSW(%r1)
 	STREG	%r2,  TASK_PT_GR2(%r1)		/* preserve rp */
+	LDREG	0(%r30), %r2			/* get users sp back */
+	STREG	%r2,  TASK_PT_GR30(%r1)		/* ... and save it */
 	STREG	%r19, TASK_PT_GR19(%r1)
 	STREG	%r20, TASK_PT_GR20(%r1)
 	STREG	%r21, TASK_PT_GR21(%r1)
@@ -77,11 +121,9 @@
 	STREG	%r25, TASK_PT_GR25(%r1)		/* 2nd argument */
 	STREG	%r26, TASK_PT_GR26(%r1)	 	/* 1st argument */
 	STREG	%r27, TASK_PT_GR27(%r1)		/* user dp */
-	mfctl	%cr27,%r19
-	STREG	%r19, TASK_PT_GR28(%r1)		/* return value 0 */
-	STREG	%r19, TASK_PT_ORIG_R28(%r1)	/* return value 0 (saved for signals) */
+	STREG   %r28, TASK_PT_GR28(%r1)         /* return value 0 */
+	STREG   %r28, TASK_PT_ORIG_R28(%r1)     /* return value 0 (saved for signals) */
 	STREG	%r29, TASK_PT_GR29(%r1)		/* return value 1 */
-	STREG	%r30, TASK_PT_GR30(%r1)		/* preserve userspace sp */
 	STREG	%r31, TASK_PT_GR31(%r1)		/* preserve syscall return ptr */
 	
 	ldo	TASK_PT_FR0(%r1), %r27		/* save fpregs from the kernel */
@@ -92,27 +134,24 @@
 
 	loadgp
 
-	ldo	TASK_SZ_ALGN+64(%r1),%r30	/* set up kernel stack */
-
-#ifndef __LP64__
-	/* no need to save these on stack because in wide mode the first 8
+#ifdef __LP64__
+	ldo	-16(%r30),%r29			/* Reference param save area */
+#else
+	/* no need to save these on stack in wide mode because the first 8
 	 * args are passed in registers */
 	stw     %r22, -52(%r30)                 /* 5th argument */
 	stw     %r21, -56(%r30)                 /* 6th argument */
 #endif
 
-	/* for some unknown reason, task_struct.ptrace is an unsigned long so use LDREG */
-	LDREG	TASK_PTRACE(%r1), %r19		/* Are we being ptraced? */
-	mtsm	%r28				/* irqs back  */
-
-	bb,<,n	%r19, 31, .Ltracesys		/* must match PT_PTRACE bit */
+	mfctl	%cr30, %r1
+	LDREG	TI_FLAGS(%r1), %r19
+	bb,<,n	%r19,31-TIF_SYSCALL_TRACE,.Ltracesys
 	
 	/* Note!  We cannot use the syscall table that is mapped
 	nearby since the gateway page is mapped execute-only. */
 
 	ldil	L%sys_call_table, %r1
 	ldo     R%sys_call_table(%r1), %r19
-	LDIL_FIXUP(%r19)
 	
 	comiclr,>>=	__NR_Linux_syscalls, %r20, %r0
 	b,n	.Lsyscall_nosys
@@ -131,13 +170,11 @@
 	comb,=	%r2,%r20,.Lrt_sigreturn
 .Lin_syscall:
 	ldil	L%syscall_exit,%r2
-	LDIL_FIXUP(%r2)
 	be      0(%sr7,%r19)
 	ldo	R%syscall_exit(%r2),%r2
 .Lrt_sigreturn:
 	comib,<> 0,%r25,.Lin_syscall
 	ldil	L%syscall_exit_rfi,%r2
-	LDIL_FIXUP(%r2)
 	be      0(%sr7,%r19)
 	ldo	R%syscall_exit_rfi(%r2),%r2
 
@@ -149,7 +186,6 @@
 .Lsyscall_nosys:
 syscall_nosys:
 	ldil	L%syscall_exit,%r1
-	LDIL_FIXUP(%r1)
 	be	R%syscall_exit(%sr7,%r1)
 	ldo	-ENOSYS(%r0),%r28		   /* set errno */
 
@@ -159,12 +195,18 @@
 .Ltracesys:
 tracesys:
 	/* Need to save more registers so the debugger can see where we
-	 * are.
+	 * are.  This saves only the lower 8 bits of PSW, so that the C
+	 * bit is still clear on syscalls, and the D bit is set if this
+	 * full register save path has been executed.  We check the D
+	 * bit on syscall_return_rfi to determine which registers to
+	 * restore.  An interrupt results in a full PSW saved with the
+	 * C bit set, a non-straced syscall entry results in C and D clear
+	 * in the saved PSW.
 	 */
-	ldo     -TASK_SZ_ALGN-64(%r30),%r1      /* get task ptr */
-	ssm	0,%r2				/* Lower 8 bits only!! */
-	STREG	%r2,TASK_PT_PSW(%r1)
-	STREG	%r1,TASK_PT_CR30(%r1)
+	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
+	LDREG	0(%r1), %r1
+	ssm	0,%r2
+	STREG	%r2,TASK_PT_PSW(%r1)		/* Lower 8 bits only!! */
 	mfsp	%sr0,%r2
 	STREG	%r2,TASK_PT_SR0(%r1)
 	mfsp	%sr1,%r2
@@ -204,18 +246,16 @@
 	/* Finished saving things for the debugger */
 
 	ldil	L%syscall_trace,%r1
-	LDIL_FIXUP(%r1)
 	ldil	L%tracesys_next,%r2
-	LDIL_FIXUP(%r2)
 	be	R%syscall_trace(%sr7,%r1)
 	ldo	R%tracesys_next(%r2),%r2
 	
 tracesys_next:	
 	ldil	L%sys_call_table,%r1
-	LDIL_FIXUP(%r1)
 	ldo     R%sys_call_table(%r1), %r19
 
-	ldo     -TASK_SZ_ALGN-64(%r30),%r1      /* get task ptr */
+	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
+	LDREG	0(%r1), %r1
 	LDREG   TASK_PT_GR20(%r1), %r20
 	LDREG   TASK_PT_GR26(%r1), %r26		/* Restore the users args */
 	LDREG   TASK_PT_GR25(%r1), %r25
@@ -224,6 +264,7 @@
 #ifdef __LP64__
 	LDREG   TASK_PT_GR22(%r1), %r22
 	LDREG   TASK_PT_GR21(%r1), %r21
+	ldo	-16(%r30),%r29			/* Reference param save area */
 #endif
 
 	comiclr,>>=	__NR_Linux_syscalls, %r20, %r0
@@ -243,7 +284,6 @@
 	comb,=	%r2,%r20,.Ltrace_rt_sigreturn
 .Ltrace_in_syscall:
 	ldil	L%tracesys_exit,%r2
-	LDIL_FIXUP(%r2)
 	be      0(%sr7,%r19)
 	ldo	R%tracesys_exit(%r2),%r2
 
@@ -251,30 +291,36 @@
 	makes a direct call to syscall_trace. */
 	
 tracesys_exit:
-	ldo     -TASK_SZ_ALGN-64(%r30),%r1      /* get task ptr */
+	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
+	LDREG	0(%r1), %r1
+#ifdef __LP64__
+	ldo	-16(%r30),%r29			/* Reference param save area */
+#endif
 	bl	syscall_trace, %r2
 	STREG   %r28,TASK_PT_GR28(%r1)          /* save return value now */
-	ldo     -TASK_SZ_ALGN-64(%r30),%r1      /* get task ptr */
+	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
+	LDREG	0(%r1), %r1
 	LDREG   TASK_PT_GR28(%r1), %r28		/* Restore return val. */
 
 	ldil	L%syscall_exit,%r1
-	LDIL_FIXUP(%r1)
 	be,n	R%syscall_exit(%sr7,%r1)
 
 .Ltrace_rt_sigreturn:
 	comib,<> 0,%r25,.Ltrace_in_syscall
 	ldil	L%tracesys_sigexit,%r2
-	LDIL_FIXUP(%r2)
 	be      0(%sr7,%r19)
 	ldo	R%tracesys_sigexit(%r2),%r2
 
 tracesys_sigexit:
-	ldo     -TASK_SZ_ALGN-64(%r30),%r1      /* get task ptr */
+	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
+	LDREG	0(%r1), %r1
+#ifdef __LP64__
+	ldo	-16(%r30),%r29			/* Reference param save area */
+#endif
 	bl	syscall_trace, %r2
 	nop
 
 	ldil	L%syscall_exit_rfi,%r1
-	LDIL_FIXUP(%r1)
 	be,n	R%syscall_exit_rfi(%sr7,%r1)
 
 #ifdef __LP64__
@@ -284,7 +330,7 @@
  */
 #define ENTRY_SAME(_name_) .dword sys_##_name_
 #define ENTRY_DIFF(_name_) .dword sys32_##_name_
-#define ENTRY_UHOH(_name_) .dword sys32_unimplemented
+#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
 #else
 #define ENTRY_SAME(_name_) .word sys_##_name_
 #define ENTRY_DIFF(_name_) .word sys_##_name_
@@ -316,7 +362,7 @@
 	ENTRY_SAME(socket)
 	/* struct stat is MAYBE identical wide and narrow ?? */
 	ENTRY_DIFF(newstat)
-	ENTRY_SAME(lseek)
+	ENTRY_DIFF(lseek)
 	ENTRY_SAME(getpid)		/* 20 */
 	/* the 'void * data' parameter may need re-packing in wide */
 	ENTRY_DIFF(mount)
@@ -391,8 +437,8 @@
 	ENTRY_DIFF(getrlimit)
 	ENTRY_DIFF(getrusage)
 	/* struct timeval and timezone are maybe?? consistent wide and narrow */
-	ENTRY_SAME(gettimeofday)
-	ENTRY_SAME(settimeofday)
+	ENTRY_DIFF(gettimeofday)
+	ENTRY_DIFF(settimeofday)
 	ENTRY_SAME(getgroups)	/* 80 */
 	ENTRY_SAME(setgroups)
 	/* struct socketaddr... */
@@ -402,12 +448,12 @@
 	ENTRY_DIFF(newlstat)
 	ENTRY_SAME(readlink)	/* 85 */
 	/* suspect we'll need some work for narrow shlibs on wide kernel */
+	/* NOTE this doesn't get used when I boot 32-bit userspace */
+	/* containing working shlib apps -- can this be nuked? */
 	ENTRY_UHOH(uselib)
 	ENTRY_SAME(swapon)
 	ENTRY_SAME(reboot)
-	/* argh! struct dirent contains a long */
-	ENTRY_UHOH(old_readdir)
-	/* I'm not certain about off_t... */
+	ENTRY_SAME(mmap2)
 	ENTRY_SAME(mmap)		/* 90 */
 	ENTRY_SAME(munmap)
 	ENTRY_SAME(truncate)
@@ -419,28 +465,27 @@
 	ENTRY_SAME(recv)
 	ENTRY_DIFF(statfs)
 	ENTRY_DIFF(fstatfs)		/* 100 */
-	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(stat64)
 	/* don't think hppa glibc even provides an entry pt for this
 	 * so disable for now */
 	ENTRY_UHOH(socketcall)
 	ENTRY_SAME(syslog)
 	/* even though manpage says struct timeval contains longs, ours has
 	 * time_t and suseconds_t -- both of which are safe wide/narrow */
-	ENTRY_SAME(setitimer)
-	ENTRY_SAME(getitimer)	/* 105 */
+	ENTRY_DIFF(setitimer)
+	ENTRY_DIFF(getitimer)	/* 105 */
 	ENTRY_SAME(capget)
 	ENTRY_SAME(capset)
-	ENTRY_SAME(pread)
-	ENTRY_SAME(pwrite)
+	ENTRY_SAME(pread64)
+	ENTRY_SAME(pwrite64)
 	ENTRY_SAME(getcwd)		/* 110 */
 	ENTRY_SAME(vhangup)
-	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(fstat64)
 	ENTRY_SAME(vfork_wrapper)
 	/* struct rusage contains longs... */
 	ENTRY_DIFF(wait4)
 	ENTRY_SAME(swapoff)		/* 115 */
-	/* struct sysinfo contains longs */
-	ENTRY_SAME(sysinfo)
+	ENTRY_DIFF(sysinfo)
 	ENTRY_SAME(shutdown)
 	ENTRY_SAME(fsync)
 	ENTRY_SAME(madvise)
@@ -450,7 +495,7 @@
 	/* struct sockaddr... */
 	ENTRY_SAME(recvfrom)
 	/* struct timex contains longs */
-	ENTRY_UHOH(adjtimex)
+	ENTRY_DIFF(adjtimex)
 	ENTRY_SAME(mprotect)	/* 125 */
 	/* old_sigset_t forced to 32 bits.  Beware glibc sigset_t */
 	ENTRY_DIFF(sigprocmask)
@@ -461,12 +506,11 @@
 	ENTRY_SAME(delete_module)
 	/* struct kernel_sym contains a long. Linus never heard of size_t? */
 	ENTRY_DIFF(get_kernel_syms)	/* 130 */
-	ENTRY_SAME(quotactl)
+	/* time_t inside struct dqblk */
+	ENTRY_DIFF(quotactl) /* -- FIXME, doesn't work */
 	ENTRY_SAME(getpgid)
 	ENTRY_SAME(fchdir)
-	/* bdflush(func, addr) where func has least-significant-bit set means
-	 * addr is a pointer to long :-( */
-	ENTRY_UHOH(bdflush)
+	ENTRY_SAME(bdflush)
 	ENTRY_SAME(sysfs)		/* 135 */
 	ENTRY_SAME(personality)
 	ENTRY_SAME(ni_syscall)	/* for afs_syscall */
@@ -479,12 +523,12 @@
 	ENTRY_DIFF(getdents)
 	/* it is POSSIBLE that select will be OK because even though fd_set
 	 * contains longs, the macros and sizes are clever. */
-	ENTRY_SAME(select)
+	ENTRY_DIFF(select)
 	ENTRY_SAME(flock)
 	ENTRY_SAME(msync)
 	/* struct iovec contains pointers */
-	ENTRY_UHOH(readv)		/* 145 */
-	ENTRY_UHOH(writev)
+	ENTRY_DIFF(readv)		/* 145 */
+	ENTRY_DIFF(writev)
 	ENTRY_SAME(getsid)
 	ENTRY_SAME(fdatasync)
 	/* struct __sysctl_args is a mess */
@@ -509,13 +553,12 @@
 	ENTRY_SAME(mremap)
 	ENTRY_SAME(setresuid)
 	ENTRY_SAME(getresuid)	/* 165 */
-	/* might work, but in general signals need a thorough review */
-	ENTRY_UHOH(sigaltstack_wrapper)
+	ENTRY_DIFF(sigaltstack_wrapper)
 	/* struct passed back to user can contain long symbol values */
 	ENTRY_DIFF(query_module)
 	ENTRY_SAME(poll)
 	/* structs contain pointers and an in_addr... */
-	ENTRY_UHOH(nfsservctl)
+	ENTRY_DIFF(nfsservctl)
 	ENTRY_SAME(setresgid)	/* 170 */
 	ENTRY_SAME(getresgid)
 	ENTRY_SAME(prctl)
@@ -525,36 +568,50 @@
 	ENTRY_DIFF(rt_sigprocmask)	/* 175 */
 	ENTRY_DIFF(rt_sigpending)
 	ENTRY_UHOH(rt_sigtimedwait)
-	ENTRY_UHOH(rt_sigqueueinfo)
+	/* even though the struct siginfo_t is different, it appears like
+	 * all the paths use values which should be same wide and narrow.
+	 * Also the struct is padded to 128 bytes which means we don't have
+	 * to worry about faulting trying to copy in a larger 64-bit
+	 * struct from a 32-bit user-space app.
+	 */
+	ENTRY_SAME(rt_sigqueueinfo)
 	ENTRY_SAME(rt_sigsuspend_wrapper) /* not really SAME -- see the code */
 	ENTRY_SAME(chown)		/* 180 */
-	/* *sockopt() might work... */
-	ENTRY_SAME(setsockopt)
+	/* setsockopt() used by iptables: SO_SET_REPLACE/SO_SET_ADD_COUNTERS */
+	ENTRY_DIFF(setsockopt)
 	ENTRY_SAME(getsockopt)
-	/* struct msghdr contains pointers... */
-	ENTRY_UHOH(sendmsg)
-	ENTRY_UHOH(recvmsg)
+	ENTRY_DIFF(sendmsg)
+	ENTRY_DIFF(recvmsg)
 	ENTRY_SAME(semop)		/* 185 */
 	ENTRY_SAME(semget)
-	/* needs a more careful review */
-	ENTRY_UHOH(semctl)
-	/* struct msgbuf contains a long */
-	ENTRY_UHOH(msgsnd)
-	ENTRY_UHOH(msgrcv)
+	ENTRY_DIFF(semctl_broken)
+	ENTRY_DIFF(msgsnd)
+	ENTRY_DIFF(msgrcv)
 	ENTRY_SAME(msgget)		/* 190 */
-	/* struct msqid_ds contains pointers */
-	ENTRY_UHOH(msgctl)
+	ENTRY_SAME(msgctl_broken)
 	ENTRY_SAME(shmat_wrapper)
 	ENTRY_SAME(shmdt)
 	ENTRY_SAME(shmget)
-	/***************/
-	/* struct shmid_ds contains pointers */
-	ENTRY_UHOH(shmctl)		/* 195 */
+	ENTRY_SAME(shmctl_broken)		/* 195 */
 	ENTRY_SAME(ni_syscall)		/* streams1 */
 	ENTRY_SAME(ni_syscall)		/* streams2 */
-	ENTRY_SAME(gettid)
-	ENTRY_SAME(tkill)
-
+	ENTRY_SAME(lstat64)
+	ENTRY_DIFF(truncate64)
+	ENTRY_DIFF(ftruncate64)	/* 200 */
+	ENTRY_SAME(getdents64)
+	ENTRY_DIFF(fcntl64)
+#ifdef CONFIG_XFS_FS
+	ENTRY_SAME(attrctl)
+	ENTRY_SAME(acl_get)
+	ENTRY_SAME(acl_set)            /* 205 */
+#else
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+#endif
+	ENTRY_SAME(gettid)             
+	ENTRY_SAME(readahead)          
+	ENTRY_SAME(ni_syscall)		/* tkill */
 .end
 
 	/* Make sure nothing else is placed on this page */
diff -Nru a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
--- a/arch/parisc/kernel/time.c	Wed Oct 30 16:44:27 2002
+++ b/arch/parisc/kernel/time.c	Wed Oct 30 16:44:27 2002
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/time.c
+ *  linux/arch/parisc/kernel/time.c
  *
  *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
  *  Modifications for ARM (C) 1994, 1995, 1996,1997 Russell King
@@ -10,6 +10,7 @@
  * 1998-12-20  Updated NTP code according to technical memorandum Jan '96
  *             "A Kernel Model for Precision Timekeeping" by Dave Mills
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -20,6 +21,7 @@
 #include <linux/time.h>
 #include <linux/init.h>
 #include <linux/smp.h>
+#include <linux/profile.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -32,69 +34,209 @@
 
 u64 jiffies_64;
 
+/* xtime and wall_jiffies keep wall-clock time */
+extern unsigned long wall_jiffies;
 extern rwlock_t xtime_lock;
 
-static int timer_value;
-static int timer_delta;
-static struct pdc_tod tod_data __attribute__((aligned(8)));
+static long clocktick;	/* timer cycles per tick */
+static long halftick;
 
-void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+#ifdef CONFIG_SMP
+extern void smp_do_timer(struct pt_regs *regs);
+#endif
+
+static inline void
+parisc_do_profile(unsigned long pc)
 {
-	int old;
-	int lost = 0;
-	int cr16;
-	
-	old = timer_value;
+	extern char _stext;
 
-	cr16 = mfctl(16);
-	while((timer_value - cr16) < (timer_delta / 2)) {
-		timer_value += timer_delta;
-		lost++;
-	}
+	if (!prof_buffer)
+		return;
 
-	mtctl(timer_value ,16);
+	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;
+	atomic_inc((atomic_t *)&prof_buffer[pc]);
+}
 
-	do_timer(regs);
+void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	long now = mfctl(16);
+	long next_tick;
+	int nticks;
+	int cpu = smp_processor_id();
+
+	/* initialize next_tick to time at last clocktick */
+
+	next_tick = cpu_data[cpu].it_value;
+
+	/* since time passes between the interrupt and the mfctl()
+	 * above, it is never true that last_tick + clocktick == now.  If we
+	 * never miss a clocktick, we could set next_tick = last_tick + clocktick
+	 * but maybe we'll miss ticks, hence the loop.
+	 *
+	 * Variables are *signed*.
+	 */
+
+	nticks = 0;
+	while((next_tick - now) < halftick) {
+		next_tick += clocktick;
+		nticks++;
+	}
+	mtctl(next_tick, 16);
+	cpu_data[cpu].it_value = next_tick;
+
+	while (nticks--) {
+#ifdef CONFIG_SMP
+		smp_do_timer(regs);
+#endif
+		if (cpu == 0) {
+			write_lock(&xtime_lock);
+#ifndef CONFIG_SMP
+			extern int pc_in_user_space;
+			if (!user_mode(regs))
+				parisc_do_profile(regs->iaoq[0]);
+			else
+				parisc_do_profile((unsigned long)&pc_in_user_space);
+#endif
+			do_timer(regs);
+			write_unlock(&xtime_lock);
+		}
+	}
     
-	led_interrupt_func();
+#ifdef CONFIG_CHASSIS_LCD_LED
+	/* Only schedule the led tasklet on cpu 0, and only if it
+	 * is enabled.
+	 */
+	if (cpu == 0 && !atomic_read(&led_tasklet.count))
+		tasklet_schedule(&led_tasklet);
+#endif
+
+	/* check soft power switch status */
+	if (cpu == 0 && !atomic_read(&power_tasklet.count))
+		tasklet_schedule(&power_tasklet);
 }
 
-void do_gettimeofday(struct timeval *tv)
+/*** converted from ia64 ***/
+/*
+ * Return the number of micro-seconds that elapsed since the last
+ * update to wall time (aka xtime aka wall_jiffies).  The xtime_lock
+ * must be at least read-locked when calling this routine.
+ */
+static inline unsigned long
+gettimeoffset (void)
 {
-	unsigned long flags;
-	
+#ifndef CONFIG_SMP
+	/*
+	 * FIXME: This won't work on smp because jiffies are updated by cpu 0.
+	 *    Once parisc-linux learns the cr16 difference between processors,
+	 *    this could be made to work.
+	 */
+	long last_tick;
+	long elapsed_cycles;
+
+	/* it_value is the intended time of the next tick */
+	last_tick = cpu_data[smp_processor_id()].it_value;
+
+	/* Subtract one tick and account for possible difference between
+	 * when we expected the tick and when it actually arrived.
+	 * (aka wall vs real)
+	 */
+	last_tick -= clocktick * (jiffies - wall_jiffies + 1);
+	elapsed_cycles = mfctl(16) - last_tick;
+
+	/* the precision of this math could be improved */
+	return elapsed_cycles / (PAGE0->mem_10msec / 10000);
+#else
+	return 0;
+#endif
+}
+
+void
+do_gettimeofday (struct timeval *tv)
+{
+	unsigned long flags, usec, sec;
+
 	read_lock_irqsave(&xtime_lock, flags);
-	tv->tv_sec = xtime.tv_sec;
-	tv->tv_usec = xtime.tv_usec;
+	{
+		usec = gettimeoffset();
+	
+		sec = xtime.tv_sec;
+		usec += (xtime.tv_nsec / 1000);
+	}
 	read_unlock_irqrestore(&xtime_lock, flags);
 
+	while (usec >= 1000000) {
+		usec -= 1000000;
+		++sec;
+	}
+
+	tv->tv_sec = sec;
+	tv->tv_usec = usec;
 }
 
-void do_settimeofday(struct timeval *tv)
+void
+do_settimeofday (struct timeval *tv)
 {
 	write_lock_irq(&xtime_lock);
-	xtime.tv_sec = tv->tv_sec;
-	xtime.tv_usec = tv->tv_usec;
+	{
+		/*
+		 * 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
+		 * done, and then undo it!
+		 */
+		tv->tv_usec -= gettimeoffset();
+		tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
+
+		while (tv->tv_usec < 0) {
+			tv->tv_usec += 1000000;
+			tv->tv_sec--;
+		}
+
+		xtime.tv_sec = tv->tv_sec;
+		xtime.tv_nsec = (tv->tv_usec * 1000);
+		time_adjust = 0;		/* stop active adjtime() */
+		time_status |= STA_UNSYNC;
+		time_maxerror = NTP_PHASE_LIMIT;
+		time_esterror = NTP_PHASE_LIMIT;
+	}
 	write_unlock_irq(&xtime_lock);
 }
 
+
 void __init time_init(void)
 {
-	timer_delta = (100 * PAGE0->mem_10msec) / HZ;
+	unsigned long next_tick;
+	static struct pdc_tod tod_data;
+
+	clocktick = (100 * PAGE0->mem_10msec) / HZ;
+	halftick = clocktick / 2;
 
-	/* make the first timer interrupt go off in one second */
-	timer_value = mfctl(16) + (HZ * timer_delta);
-	mtctl(timer_value, 16);
+	/* Setup clock interrupt timing */
 
+	next_tick = mfctl(16);
+	next_tick += clocktick;
+	cpu_data[smp_processor_id()].it_value = next_tick;
+
+	/* kick off Itimer (CR16) */
+	mtctl(next_tick, 16);
 
 	if(pdc_tod_read(&tod_data) == 0) {
+		write_lock_irq(&xtime_lock);
 		xtime.tv_sec = tod_data.tod_sec;
-		xtime.tv_usec = tod_data.tod_usec;
+		xtime.tv_nsec = tod_data.tod_usec * 1000;
+		write_unlock_irq(&xtime_lock);
 	} else {
 		printk(KERN_ERR "Error reading tod clock\n");
 	        xtime.tv_sec = 0;
-		xtime.tv_usec = 0;
+		xtime.tv_nsec = 0;
 	}
-
 }
-
diff -Nru a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
--- a/arch/parisc/kernel/traps.c	Wed Oct 30 16:44:36 2002
+++ b/arch/parisc/kernel/traps.c	Wed Oct 30 16:44:36 2002
@@ -18,171 +18,259 @@
 #include <linux/ptrace.h>
 #include <linux/timer.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/spinlock.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/console.h>
+
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/traps.h>
+#include <asm/unaligned.h>
 #include <asm/atomic.h>
-
 #include <asm/smp.h>
 #include <asm/pdc.h>
+#include <asm/pdc_chassis.h>
 
-#ifdef CONFIG_KWDB
-#include <kdb/break.h>		/* for BI2_KGDB_GDB */
-#include <kdb/kgdb_types.h>	/* for __() */
-#include <kdb/save_state.h>	/* for struct save_state */
-#include <kdb/kgdb_machine.h>	/* for pt_regs_to_ssp and ssp_to_pt_regs */
-#include <kdb/trap.h>		/* for I_BRK_INST */
-#endif /* CONFIG_KWDB */
+#include "../math-emu/math-emu.h"	/* for handle_fpe() */
 
+#define PRINT_USER_FAULTS /* (turn this on if you want user faults to be */
+			  /*  dumped to the console via printk)          */
 
-static inline void console_verbose(void)
-{
-	extern int console_loglevel;
-	console_loglevel = 15;
-}
-
-
-void page_exception(void);
-
-/*
- * These constants are for searching for possible module text
- * segments.  VMALLOC_OFFSET comes from mm/vmalloc.c; MODULE_RANGE is
- * a guess of how much space is likely to be vmalloced.
- */
-#define VMALLOC_OFFSET (8*1024*1024)
-#define MODULE_RANGE (8*1024*1024)
-
-static void printbinary(unsigned long x, int nbits)
+static int printbinary(char *buf, unsigned long x, int nbits)
 {
 	unsigned long mask = 1UL << (nbits - 1);
 	while (mask != 0) {
-		printk(mask & x ? "1" : "0");
+		*buf++ = (mask & x ? '1' : '0');
 		mask >>= 1;
 	}
+	*buf = '\0';
+
+	return nbits;
 }
 
-void show_regs(struct pt_regs *regs)
-{
-	int i;
 #ifdef __LP64__
-#define RFMT " %016lx"
+#define RFMT "%016lx"
 #else
-#define RFMT " %08lx"
+#define RFMT "%08lx"
 #endif
 
-	printk("\n"); /* don't want to have that pretty register dump messed up */
-
-	printk("     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\nPSW: ");
-	printbinary(regs->gr[0], 32);
-	printk("    %s\n", print_tainted());
+void show_regs(struct pt_regs *regs)
+{
+	int i;
+	char buf[128], *p;
+	char *level;
+	unsigned long cr30;
+	unsigned long cr31;
+
+	level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT;
+
+	printk("%s\n", level); /* don't want to have that pretty register dump messed up */
+
+	printk("%s     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\n", level);
+	printbinary(buf, regs->gr[0], 32);
+	printk("%sPSW: %s %s\n", level, buf, print_tainted());
 
 	for (i = 0; i < 32; i += 4) {
 		int j;
-		printk("r%d-%d\t", i, i + 3);
+		p = buf;
+		p += sprintf(p, "%sr%02d-%02d ", level, i, i + 3);
 		for (j = 0; j < 4; j++) {
-			printk(RFMT, i + j == 0 ? 0 : regs->gr[i + j]);
+			p += sprintf(p, " " RFMT, (i+j) == 0 ? 0 : regs->gr[i + j]);
 		}
-		printk("\n");
+		printk("%s\n", buf);
 	}
 
 	for (i = 0; i < 8; i += 4) {
 		int j;
-		printk("sr%d-%d\t", i, i + 4);
+		p = buf;
+		p += sprintf(p, "%ssr%d-%d  ", level, i, i + 3);
 		for (j = 0; j < 4; j++) {
-			printk(RFMT, regs->sr[i + j]);
+			p += sprintf(p, " " RFMT, regs->sr[i + j]);
 		}
-		printk("\n");
+		printk("%s\n", buf);
 	}
 
-#if REDICULOUSLY_VERBOSE
-	for (i = 0; i < 32; i++) {
-		printk("FR%2d : %016lx  ", i, regs->fr[i]);
-		if ((i & 1) == 1)
-			printk("\n");
+#if RIDICULOUSLY_VERBOSE
+	for (i = 0; i < 32; i += 2)
+		printk("%sFR%02d : %016lx  FR%2d : %016lx", level, i,
+				regs->fr[i], i+1, regs->fr[i+1]);
+#endif
+
+	cr30 = mfctl(30);
+	cr31 = mfctl(31);
+	printk("%s\n", level);
+	printk("%sIASQ: " RFMT " " RFMT " IAOQ: " RFMT " " RFMT "\n",
+	       level, regs->iasq[0], regs->iasq[1], regs->iaoq[0], regs->iaoq[1]);
+	printk("%s IIR: %08lx    ISR: " RFMT "  IOR: " RFMT "\n",
+	       level, regs->iir, regs->isr, regs->ior);
+	printk("%s CPU: %8d   CR30: " RFMT " CR31: " RFMT "\n",
+	       level, current_thread_info()->cpu, cr30, cr31);
+	printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28);
+}
+
+
+void dump_stack(void)
+{
+	unsigned long stack;
+	show_trace(&stack);
+}
+
+
+static int kstack_depth_to_print = 48;
+extern struct module kernel_module;
+
+static inline int kernel_text_address(unsigned long addr)
+{
+#ifdef CONFIG_MODULES
+	struct module *mod;
+#endif
+	extern char _stext, _etext;
+
+	if (addr >= (unsigned long) &_stext &&
+	    addr <= (unsigned long) &_etext)
+		return 1;
+
+#ifdef CONFIG_MODULES
+	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
+		/* mod_bound tests for addr being inside the vmalloc'ed
+		 * module area. Of course it'd be better to test only
+		 * for the .text subset... */
+		if (mod_bound(addr, 0, mod))
+			return 1;
 	}
 #endif
 
-	printk("\nIASQ:" RFMT RFMT " IAOQ:" RFMT RFMT "\n",
-	       regs->iasq[0], regs->iasq[1], regs->iaoq[0], regs->iaoq[1]);
-	printk(" IIR: %08lx    ISR:" RFMT "  IOR:" RFMT "\nORIG_R28:" RFMT
-	       "\n", regs->iir, regs->isr, regs->ior, regs->orig_r28);
+	return 0;
+}
+
+void show_stack(unsigned long *sp)
+{
+	unsigned long *stack;
+	int i;
+
+	/*
+	 * debugging aid: "show_stack(NULL);" prints the
+	 * back trace for this cpu.
+	 */
+	if (sp==NULL)
+		sp = (unsigned long*)&sp;
+
+	stack = sp;
+	printk("\n" KERN_CRIT "Stack Dump:\n");
+	printk(KERN_CRIT " " RFMT ":  ", (unsigned long) stack);
+	for (i=0; i < kstack_depth_to_print; i++) {
+		if (((long) stack & (THREAD_SIZE-1)) == 0)
+			break;
+		if (i && ((i & 0x03) == 0))
+			printk("\n" KERN_CRIT " " RFMT ":  ",
+				(unsigned long) stack);
+		printk(RFMT " ", *stack--);
+	}
+	printk("\n" KERN_CRIT "\n");
+	show_trace(sp);
 }
 
-void
-die_if_kernel (char *str, struct pt_regs *regs, long err)
+
+void show_trace(unsigned long *stack)
 {
+	unsigned long *startstack;
+	unsigned long addr;
+	int i;
+
+	startstack = (unsigned long *)((unsigned long)stack & ~(THREAD_SIZE - 1));
+	i = 1;
+	printk("Kernel addresses on the stack:\n");
+	while (stack >= startstack) {
+		addr = *stack--;
+		/*
+		 * If the address is either in the text segment of the
+		 * kernel, or in the region which contains vmalloc'ed
+		 * memory, it *may* be the address of a calling
+		 * routine; if so, print it so that someone tracing
+		 * down the cause of the crash will be able to figure
+		 * out the call path that was taken.
+		 */
+		if (kernel_text_address(addr)) {
+			printk(" [<" RFMT ">] ", addr);
+#ifdef CONFIG_KALLSYMS
+			print_symbol("%s\n", addr);
+#else
+			if ((i & 0x03) == 0)
+				printk("\n");
+#endif
+			i++;
+		}
+	}
+	printk("\n");
+}
+
+void show_trace_task(struct task_struct *tsk)
+{
+	show_trace((unsigned long *)tsk->thread.regs.ksp);
+}
+
+void die_if_kernel(char *str, struct pt_regs *regs, long err)
+{
+	/* Amuse the user in a SPARC fashion */
+	printk(
+"      _______________________________ \n"
+"     < Your System ate a SPARC! Gah! >\n"
+"      ------------------------------- \n"
+"             \\   ^__^\n"
+"              \\  (xx)\\_______\n"
+"                 (__)\\       )\\/\\\n"
+"                  U  ||----w |\n"
+"                     ||     ||\n");
+
 	if (user_mode(regs)) {
-#if 1
+#ifdef PRINT_USER_FAULTS
 		if (err == 0)
 			return; /* STFU */
 
 		/* XXX for debugging only */
-		printk ("!!die_if_kernel: %s(%d): %s %ld\n",
+		printk(KERN_DEBUG "%s (pid %d): %s (code %ld)\n",
 			current->comm, current->pid, str, err);
 		show_regs(regs);
 #endif
 		return;
 	}
+	
+	/* unlock the pdc lock if necessary */
+	pdc_emergency_unlock();
 
-	printk("%s[%d]: %s %ld\n", current->comm, current->pid, str, err);
-
+	/* maybe the kernel hasn't booted very far yet and hasn't been able 
+	 * to initialize the serial or STI console. In that case we should 
+	 * re-enable the pdc console, so that the user will be able to 
+	 * identify the problem. */
+	if (!console_drivers)
+		pdc_console_restart();
+	
+	printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n",
+		current->comm, current->pid, str, err);
 	show_regs(regs);
 
 	/* Wot's wrong wif bein' racy? */
 	if (current->thread.flags & PARISC_KERNEL_DEATH) {
-		printk("die_if_kernel recursion detected.\n");
-		sti();
+		printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);
+		local_irq_enable();
 		while (1);
 	}
+
 	current->thread.flags |= PARISC_KERNEL_DEATH;
 	do_exit(SIGSEGV);
 }
 
-asmlinkage void cache_flush_denied(struct pt_regs * regs, long error_code)
-{
-}
-
-asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
-{
-}
-
-#ifndef CONFIG_MATH_EMULATION
-
-asmlinkage void math_emulate(long arg)
-{
-}
-
-#endif /* CONFIG_MATH_EMULATION */
-
 int syscall_ipi(int (*syscall) (struct pt_regs *), struct pt_regs *regs)
 {
 	return syscall(regs);
 }
 
-struct {
-	int retval;
-
-	int (*func) (void *, struct pt_regs *);
-	void * data;
-} ipi_action[NR_CPUS];
-
-void ipi_interrupt(int irq, void *unused, struct pt_regs *regs)
-{
-	int cpu = smp_processor_id();
-
-	if(!ipi_action[cpu].func)
-		BUG();
-
-	ipi_action[cpu].retval =
-		ipi_action[cpu].func(ipi_action[cpu].data, regs);
-}
-
 /* gdb uses break 4,8 */
 #define GDB_BREAK_INSN 0x10004
 void handle_gdb_break(struct pt_regs *regs, int wot)
@@ -199,19 +287,17 @@
 void handle_break(unsigned iir, struct pt_regs *regs)
 {
 	struct siginfo si;
-#ifdef CONFIG_KWDB
-	struct save_state ssp;
-#endif /* CONFIG_KWDB */   
 
-	flush_all_caches();
 	switch(iir) {
 	case 0x00:
-		/* show registers, halt */
-		cli();
-		printk("break 0,0: pid=%d command='%s'\n",
+#ifdef PRINT_USER_FAULTS
+		printk(KERN_DEBUG "break 0,0: pid=%d command='%s'\n",
 		       current->pid, current->comm);
+#endif
 		die_if_kernel("Breakpoint", regs, 0);
+#ifdef PRINT_USER_FAULTS
 		show_regs(regs);
+#endif
 		si.si_code = TRAP_BRKPT;
 		si.si_addr = (void *) (regs->iaoq[0] & ~3);
 		si.si_signo = SIGTRAP;
@@ -223,33 +309,12 @@
 		handle_gdb_break(regs, TRAP_BRKPT);
 		break;
 
-#ifdef CONFIG_KWDB
-
-	case KGDB_BREAK_INSN:
-		mtctl(0, 15);
-		pt_regs_to_ssp(regs, &ssp);
-		kgdb_trap(I_BRK_INST, &ssp, 1);
-		ssp_to_pt_regs(&ssp, regs);
-		break;
-
-	case KGDB_INIT_BREAK_INSN:
-		mtctl(0, 15);
-		pt_regs_to_ssp(regs, &ssp);
-		kgdb_trap(I_BRK_INST, &ssp, 1);
-		ssp_to_pt_regs(&ssp, regs);
-
-		/* Advance pcoq to skip break */
-		regs->iaoq[0] = regs->iaoq[1];
-		regs->iaoq[1] += 4;
-		break;
-
-#endif /* CONFIG_KWDB */
-
 	default:
-		set_eiem(0);
-		printk("break %#08x: pid=%d command='%s'\n",
+#ifdef PRINT_USER_FAULTS
+		printk(KERN_DEBUG "break %#08x: pid=%d command='%s'\n",
 		       iir, current->pid, current->comm);
 		show_regs(regs);
+#endif
 		si.si_signo = SIGTRAP;
 		si.si_code = TRAP_BRKPT;
 		si.si_addr = (void *) (regs->iaoq[0] & ~3);
@@ -258,336 +323,285 @@
 	}
 }
 
-/* Format of the floating-point exception registers. */
-struct exc_reg {
-	unsigned int exception : 6;
-	unsigned int ei : 26;
-};
-
-/* Macros for grabbing bits of the instruction format from the 'ei'
-   field above. */
-/* Major opcode 0c and 0e */
-#define FP0CE_UID(i) (((i) >> 6) & 3)
-#define FP0CE_CLASS(i) (((i) >> 9) & 3)
-#define FP0CE_SUBOP(i) (((i) >> 13) & 7)
-#define FP0CE_SUBOP1(i) (((i) >> 15) & 7) /* Class 1 subopcode */
-#define FP0C_FORMAT(i) (((i) >> 11) & 3)
-#define FP0E_FORMAT(i) (((i) >> 11) & 1)
-
-/* Major opcode 0c, uid 2 (performance monitoring) */
-#define FPPM_SUBOP(i) (((i) >> 9) & 0x1f)
-
-/* Major opcode 2e (fused operations).   */
-#define FP2E_SUBOP(i)  (((i) >> 5) & 1)
-#define FP2E_FORMAT(i) (((i) >> 11) & 1)
-
-/* Major opcode 26 (FMPYSUB) */
-/* Major opcode 06 (FMPYADD) */
-#define FPx6_FORMAT(i) ((i) & 0x1f)
-
-/* Flags and enable bits of the status word. */
-#define FPSW_FLAGS(w) ((w) >> 27)
-#define FPSW_ENABLE(w) ((w) & 0x1f)
-#define FPSW_V (1<<4)
-#define FPSW_Z (1<<3)
-#define FPSW_O (1<<2)
-#define FPSW_U (1<<1)
-#define FPSW_I (1<<0)
-
-/* Emulate a floating point instruction if necessary and possible
-   (this will be moved elsewhere eventually).  Return zero if
-   successful or if emulation was not required, -1 if the instruction
-   is actually illegal or unimplemented.  The status word passed as
-   the first parameter will be modified to signal exceptions, if
-   any. */
-
-/* FIXME!!!  This is really incomplete and, at the moment, most
-   illegal FP instructions will simply act as no-ops.  Obviously that
-   is *not* what we want.  Also we don't even try to handle exception
-   types other than the 'unimplemented' ones. */
-int
-fp_emul_insn(u32 *sw, struct exc_reg exc, struct pt_regs *regs)
-{
-	switch (exc.exception) {
-	case 0x3:  /* Unimplemented, opcode 06 */
-		break;
-	case 0x9:  /* Unimplemented, opcode 0c */
-		/* We do not support quadword operations, end of
-                   story.  There's no support for them in GCC. */
-		if (FP0C_FORMAT(exc.ei) == 3)
-			return -1; /* SIGILL */
-		/* Fall through. */
-	case 0xa:  /* Unimplemented, opcode 0e */
-		if (FP0CE_CLASS(exc.ei) == 1) {
-			/* FCNV instructions of various sorts. */
-		} else {
-			if (FP0CE_CLASS(exc.ei == 0)
-			    && FP0CE_SUBOP(exc.ei == 5)) {
-				/* FRND instructions should be
-                                   emulated, at some point, I
-                                   guess. */
-				return -1; /* SIGILL */
-			}
-		}
-		break;
-	case 0x23: /* Unimplemented, opcode 26 */
-		break;
-	case 0x2b: /* Unimplemented, opcode 2e */
-		break;
-	case 0x1:  /* Unimplemented, opcode 0e/0c */
-		/* FIXME: How the hell are we supposed to tell which
-                   opcode it is? */
-		break;
-	default:
-		return -1; /* Punt */
-	}
 
+int handle_toc(void)
+{
+	printk(KERN_CRIT "TOC call.\n");
 	return 0;
 }
 
-/* Handle a floating point exception.  Return zero if the faulting
-   instruction can be completed successfully. */
-int
-handle_fpe(struct pt_regs *regs)
+static void default_trap(int code, struct pt_regs *regs)
 {
-	struct siginfo si;
-	union {
-		struct fpsw {
-			/* flag bits */
-			unsigned int fv : 1;
-			unsigned int fz : 1;
-			unsigned int fo : 1;
-			unsigned int fu : 1;
-			unsigned int fi : 1;
-
-			unsigned int c : 1;
-			unsigned int pad1 : 4;
-			unsigned int cq : 11;
-			unsigned int rm : 2;
-			unsigned int pad2 : 2;
-			unsigned int t : 1;
-			unsigned int d : 1;
-
-			/* enable bits */
-			unsigned int ev : 1;
-			unsigned int ez : 1;
-			unsigned int eo : 1;
-			unsigned int eu : 1;
-			unsigned int ei : 1;
-		} status;
-		u32 word;
-	} sw;
-	struct exc_reg excepts[7];
-	unsigned int code = 0;
-	unsigned int throw;
-
-	/* Status word = FR0L. */
-	memcpy(&sw, regs->fr, sizeof(sw));
-	/* Exception words = FR0R-FR3R. */
-	memcpy(excepts, ((char *) regs->fr) + 4, sizeof(excepts));
-
-	/* This is all CPU dependent.  Since there is no public
-           documentation on the PA2.0 processors we will just assume
-           everything is like the 7100/7100LC/7300LC for now.
-
-	   Specifically: All exceptions are marked as "unimplemented"
-	   in the exception word, and the only exception word used is
-	   excepts[1]. */
-
-	/* Try to emulate the instruction.  Also determine if it is
-           really an illegal instruction in the process.
-
-	   FIXME: fp_emul_insn() only checks for the "unimplemented"
-	   exceptions at the moment.  So this may break horribly on
-	   PA2.0, where we may want to also check to see if we should
-	   just send SIGFPE (or maybe not, let's see the documentation
-	   first...) */
-	if (fp_emul_insn(&sw.word, excepts[1], regs) == -1)
-		goto send_sigill;
-
-	/* Take the intersection of the flag bits in the FPSW and the
-           enable bits in the FPSW. */
-	throw = FPSW_FLAGS(sw.word) & FPSW_ENABLE(sw.word);
-
-	/* Concoct an appropriate si_code.  Of course we don't know
-           what to do if multiple exceptions were enabled and multiple
-           flags were set.  Maybe that's why HP/UX doesn't implement
-           feenableexcept(). */
-
-	if (throw == 0)
-		goto success; /* Duh. */
-	else if (throw & FPSW_V)
-		code = FPE_FLTINV;
-	else if (throw & FPSW_Z)
-		code = FPE_FLTDIV;
-	else if (throw & FPSW_O)
-		code = FPE_FLTOVF;
-	else if (throw & FPSW_U)
-		code = FPE_FLTUND;
-	else if (throw & FPSW_I)
-		code = FPE_FLTRES;
-
-#if 1 /* Debugging... */
-	printk("Unemulated floating point exception, pid=%d (%s)\n",
-	       current->pid, current->comm);
+	printk(KERN_ERR "Trap %d on CPU %d\n", code, smp_processor_id());
 	show_regs(regs);
-	{
-		int i;
-		printk("FP Status: %08x\n", sw.word);
-		printk("FP Exceptions:\n");
-		for (i = 0; i < 7; i++) {
-			printk("\tExcept%d: exception %03x insn %06x\n",
-			       i, excepts[i].exception, excepts[i].ei);
-		}
-	}
-#endif
+}
 
-	/* FIXME: Should we clear the flag bits, T bit, and exception
-           registers here? */
+void (*cpu_lpmc) (int code, struct pt_regs *regs) = default_trap;
 
-	si.si_signo = SIGFPE;
-	si.si_errno = 0;
-	si.si_code = code;
-	si.si_addr = (void *) regs->iaoq[0];
-	force_sig_info(SIGFPE, &si, current);
-	return -1;
 
- send_sigill:
-	si.si_signo = SIGILL;
-	si.si_errno = 0;
-	si.si_code = ILL_COPROC;
-	si.si_addr = (void *) regs->iaoq[0];
-	force_sig_info(SIGILL, &si, current);
-	return -1;
-
- success:
-	/* We absolutely have to clear the T bit and exception
-           registers to allow the process to recover.  Otherwise every
-           subsequent floating point instruction will trap. */
-	sw.status.t = 0;
-	memset(excepts, 0, sizeof(excepts));
+void transfer_pim_to_trap_frame(struct pt_regs *regs)
+{
+    register int i;
+    extern unsigned int hpmc_pim_data[];
+    struct pdc_hpmc_pim_11 *pim_narrow;
+    struct pdc_hpmc_pim_20 *pim_wide;
 
-	memcpy(regs->fr, &sw, sizeof(sw));
-	memcpy(((char *) regs->fr) + 4,excepts , sizeof(excepts));
-	return 0;
-}
+    if (boot_cpu_data.cpu_type >= pcxu) {
 
-int handle_toc(void)
-{
-	return 0;
+	pim_wide = (struct pdc_hpmc_pim_20 *)hpmc_pim_data;
+
+	/*
+	 * Note: The following code will probably generate a
+	 * bunch of truncation error warnings from the compiler.
+	 * Could be handled with an ifdef, but perhaps there
+	 * is a better way.
+	 */
+
+	regs->gr[0] = pim_wide->cr[22];
+
+	for (i = 1; i < 32; i++)
+	    regs->gr[i] = pim_wide->gr[i];
+
+	for (i = 0; i < 32; i++)
+	    regs->fr[i] = pim_wide->fr[i];
+
+	for (i = 0; i < 8; i++)
+	    regs->sr[i] = pim_wide->sr[i];
+
+	regs->iasq[0] = pim_wide->cr[17];
+	regs->iasq[1] = pim_wide->iasq_back;
+	regs->iaoq[0] = pim_wide->cr[18];
+	regs->iaoq[1] = pim_wide->iaoq_back;
+
+	regs->sar  = pim_wide->cr[11];
+	regs->iir  = pim_wide->cr[19];
+	regs->isr  = pim_wide->cr[20];
+	regs->ior  = pim_wide->cr[21];
+    }
+    else {
+	pim_narrow = (struct pdc_hpmc_pim_11 *)hpmc_pim_data;
+
+	regs->gr[0] = pim_narrow->cr[22];
+
+	for (i = 1; i < 32; i++)
+	    regs->gr[i] = pim_narrow->gr[i];
+
+	for (i = 0; i < 32; i++)
+	    regs->fr[i] = pim_narrow->fr[i];
+
+	for (i = 0; i < 8; i++)
+	    regs->sr[i] = pim_narrow->sr[i];
+
+	regs->iasq[0] = pim_narrow->cr[17];
+	regs->iasq[1] = pim_narrow->iasq_back;
+	regs->iaoq[0] = pim_narrow->cr[18];
+	regs->iaoq[1] = pim_narrow->iaoq_back;
+
+	regs->sar  = pim_narrow->cr[11];
+	regs->iir  = pim_narrow->cr[19];
+	regs->isr  = pim_narrow->cr[20];
+	regs->ior  = pim_narrow->cr[21];
+    }
+
+    /*
+     * The following fields only have meaning if we came through
+     * another path. So just zero them here.
+     */
+
+    regs->ksp = 0;
+    regs->kpc = 0;
+    regs->orig_r28 = 0;
 }
 
-void default_trap(int code, struct pt_regs *regs)
+
+/*
+ * This routine handles page faults.  It determines the address,
+ * and the problem, and then passes it off to one of the appropriate
+ * routines.
+ */
+void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset)
 {
-	printk("Trap %d on CPU %d\n", code, smp_processor_id());
+	static spinlock_t terminate_lock = SPIN_LOCK_UNLOCKED;
 
-	show_regs(regs);
-}
+	set_eiem(0);
+	local_irq_disable();
+	spin_lock(&terminate_lock);
 
-void (*cpu_lpmc) (int code, struct pt_regs *regs) = default_trap;
+	/* unlock the pdc lock if necessary */
+	pdc_emergency_unlock();
+
+	/* restart pdc console if necessary */
+	if (!console_drivers)
+		pdc_console_restart();
+
+	if (code == 1)
+	    transfer_pim_to_trap_frame(regs);
+
+	show_stack((unsigned long *)regs->gr[30]);
 
+	printk("\n");
+	printk(KERN_CRIT "%s: Code=%d regs=%p (Addr=" RFMT ")\n",
+			msg, code, regs, offset);
+	show_regs(regs);
 
-#ifdef CONFIG_KWDB
-int
-debug_call (void) {
-    printk ("Debug call.\n");
-    return 0;
-}
-
-int
-debug_call_leaf (void) {
-    return 0;
-}
-#endif /* CONFIG_KWDB */
-
-extern void do_page_fault(struct pt_regs *, int, unsigned long);
-extern void parisc_terminate(char *, struct pt_regs *, int, unsigned long);
-extern void transfer_pim_to_trap_frame(struct pt_regs *);
-extern void pdc_console_restart(void);
+	spin_unlock(&terminate_lock);
+
+	/* put soft power button back under hardware control;
+	 * if the user had pressed it once at any time, the 
+	 * system will shut down immediately right here. */
+	pdc_soft_power_button(0);
+	
+	for(;;)
+	    ;
+}
 
 void handle_interruption(int code, struct pt_regs *regs)
 {
 	unsigned long fault_address = 0;
 	unsigned long fault_space = 0;
 	struct siginfo si;
-#ifdef CONFIG_KWDB
-	struct save_state ssp;
-#endif /* CONFIG_KWDB */   
 
 	if (code == 1)
 	    pdc_console_restart();  /* switch back to pdc if HPMC */
 	else
-	    sti();
-
-#ifdef __LP64__
-
-	/*
-	 * FIXME:
-	 * For 32 bit processes we don't want the b bits (bits 0 & 1)
-	 * in the ior. This is more appropriately handled in the tlb
-	 * miss handlers. Changes need to be made to support addresses
-	 * >32 bits for 64 bit processes.
-	 */
-
-	regs->ior &= 0x3FFFFFFFFFFFFFFFUL;
-#endif
+	    local_irq_enable();
 
 #if 0
-	printk("interrupted with code %d, regs %p\n", code, regs);
-	show_regs(regs);
+	printk(KERN_CRIT "Interruption # %d\n", code);
 #endif
 
 	switch(code) {
+
 	case  1:
-		parisc_terminate("High Priority Machine Check (HPMC)",regs,code,0);
+		/* High-priority machine check (HPMC) */
+		
+		/* set up a new led state on systems shipped with a LED State panel */
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_HPMC);
+		    
+	    	parisc_terminate("High Priority Machine Check (HPMC)",
+				regs, code, 0);
 		/* NOT REACHED */
-	case  3: /* Recovery counter trap */
+		
+	case  2:
+		/* Power failure interrupt */
+		printk(KERN_CRIT "Power failure interrupt !\n");
+		return;
+
+	case  3:
+		/* Recovery counter trap */
 		regs->gr[0] &= ~PSW_R;
 		if (regs->iasq[0])
 			handle_gdb_break(regs, TRAP_TRACE);
-		/* else this must be the start of a syscall - just let it
-		 * run.
-		 */
+		/* else this must be the start of a syscall - just let it run */
 		return;
 
 	case  5:
+		/* Low-priority machine check */
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_LPMC);
+		
 		flush_all_caches();
 		cpu_lpmc(5, regs);
 		return;
 
 	case  6:
+		/* Instruction TLB miss fault/Instruction page fault */
 		fault_address = regs->iaoq[0];
 		fault_space   = regs->iasq[0];
 		break;
 
-	case  9: /* Break Instruction */
+	case  8:
+		/* Illegal instruction trap */
+		die_if_kernel("Illegal instruction", regs, code);
+		si.si_code = ILL_ILLOPC;
+		goto give_sigill;
+
+	case  9:
+		/* Break instruction trap */
 		handle_break(regs->iir,regs);
 		return;
+	
+	case 10:
+		/* Privileged operation trap */
+		die_if_kernel("Privileged operation", regs, code);
+		si.si_code = ILL_PRVOPC;
+		goto give_sigill;
+	
+	case 11:
+		/* Privileged register trap */
+		if ((regs->iir & 0xffdfffe0) == 0x034008a0) {
+
+			/* This is a MFCTL cr26/cr27 to gr instruction.
+			 * PCXS traps on this, so we need to emulate it.
+			 */
+
+			if (regs->iir & 0x00200000)
+				regs->gr[regs->iir & 0x1f] = mfctl(27);
+			else
+				regs->gr[regs->iir & 0x1f] = mfctl(26);
+
+			regs->iaoq[0] = regs->iaoq[1];
+			regs->iaoq[1] += 4;
+			regs->iasq[0] = regs->iasq[1];
+			return;
+		}
+
+		die_if_kernel("Privileged register usage", regs, code);
+		si.si_code = ILL_PRVREG;
+	give_sigill:
+		si.si_signo = SIGILL;
+		si.si_errno = 0;
+		si.si_addr = (void *) regs->iaoq[0];
+		force_sig_info(SIGILL, &si, current);
+		return;
+
+	case 12:
+		/* Overflow Trap, let the userland signal handler do the cleanup */
+		si.si_signo = SIGFPE;
+		si.si_code = FPE_INTOVF;
+		si.si_addr = (void *) regs->iaoq[0];
+		force_sig_info(SIGFPE, &si, current);
+		return;
 
 	case 14:
 		/* Assist Exception Trap, i.e. floating point exception. */
 		die_if_kernel("Floating point exception", regs, 0); /* quiet */
 		handle_fpe(regs);
 		return;
-	case 15:
-	case 16:  /* Non-Access TLB miss faulting address is in IOR */
+
 	case 17:
-	case 26:
+		/* Non-access data TLB miss fault/Non-access data page fault */
+		/* TODO: Still need to add slow path emulation code here */
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+		
 		fault_address = regs->ior;
-		fault_space   = regs->isr;
+		parisc_terminate("Non access data tlb fault!",regs,code,fault_address);
 
-		if (code == 26 && fault_space == 0)
-		    parisc_terminate("Data access rights fault in kernel",regs,code,fault_address);
+	case 18:
+		/* PCXS only -- later cpu's split this into types 26,27 & 28 */
+		/* Check for unaligned access */
+		if (check_unaligned(regs)) {
+			handle_unaligned(regs);
+			return;
+		}
+		/* Fall Through */
+
+	case 15: /* Data TLB miss fault/Data page fault */
+	case 26: /* PCXL: Data memory access rights trap */
+		fault_address = regs->ior;
+		fault_space   = regs->isr;
 		break;
 
 	case 19:
+		/* Data memory break trap */
 		regs->gr[0] |= PSW_X; /* So we can single-step over the trap */
 		/* fall thru */
 	case 21:
+		/* Page reference trap */
 		handle_gdb_break(regs, TRAP_HWBKPT);
 		return;
 
-	case 25: /* Taken branch trap */
+	case 25:
+		/* Taken branch trap */
 		regs->gr[0] &= ~PSW_T;
 		if (regs->iasq[0])
 			handle_gdb_break(regs, TRAP_BRANCH);
@@ -596,48 +610,64 @@
 		 */
 		return;
 
-#if 0 /* def CONFIG_KWDB */
-	case I_TAKEN_BR:	/* 25 */
-		mtctl(0, 15);
-		pt_regs_to_ssp(regs, &ssp);
-		kgdb_trap(I_TAKEN_BR, &ssp, 1);
-		ssp_to_pt_regs(&ssp, regs);
-		break;
-#endif /* CONFIG_KWDB */
+	case  7:  
+		/* Instruction access rights */
+		/* PCXL: Instruction memory protection trap */
+
+		/*
+		 * This could be caused by either: 1) a process attempting
+		 * to execute within a vma that does not have execute
+		 * permission, or 2) an access rights violation caused by a
+		 * flush only translation set up by ptep_get_and_clear().
+		 * So we check the vma permissions to differentiate the two.
+		 * If the vma indicates we have execute permission, then
+		 * the cause is the latter one. In this case, we need to
+		 * call do_page_fault() to fix the problem.
+		 */
 
-	case  8:
-		die_if_kernel("Illegal instruction", regs, code);
-		si.si_code = ILL_ILLOPC;
-		goto give_sigill;
+		if (user_mode(regs)) {
+			struct vm_area_struct *vma;
 
-	case 10:
-		die_if_kernel("Priviledged operation - shouldn't happen!", regs, code);
-		si.si_code = ILL_PRVOPC;
-		goto give_sigill;
-	case 11:
-		die_if_kernel("Priviledged register - shouldn't happen!", regs, code);
-		si.si_code = ILL_PRVREG;
-	give_sigill:
-		si.si_signo = SIGILL;
+			down_read(&current->mm->mmap_sem);
+			vma = find_vma(current->mm,regs->iaoq[0]);
+			if (vma && (regs->iaoq[0] >= vma->vm_start)
+				&& (vma->vm_flags & VM_EXEC)) {
+
+				fault_address = regs->iaoq[0];
+				fault_space = regs->iasq[0];
+
+				up_read(&current->mm->mmap_sem);
+				break; /* call do_page_fault() */
+			}
+			up_read(&current->mm->mmap_sem);
+		}
+		/* Fall Through */
+
+	case 27: 
+		/* Data memory protection ID trap */
+		die_if_kernel("Protection id trap", regs, code);
+		si.si_code = SEGV_MAPERR;
+		si.si_signo = SIGSEGV;
 		si.si_errno = 0;
-		si.si_addr = (void *) regs->iaoq[0];
-		force_sig_info(SIGILL, &si, current);
+		if (code == 7)
+		    si.si_addr = (void *) regs->iaoq[0];
+		else
+		    si.si_addr = (void *) regs->ior;
+		force_sig_info(SIGSEGV, &si, current);
 		return;
 
-	case 28:  /* Unaligned just causes SIGBUS for now */
-		die_if_kernel("Unaligned data reference", regs, code);
-		si.si_code = BUS_ADRALN;
-		si.si_signo = SIGBUS;
-		si.si_errno = 0;
-		si.si_addr = (void *) regs->ior;
-		force_sig_info(SIGBUS, &si, current);
+	case 28: 
+		/* Unaligned data reference trap */
+		handle_unaligned(regs);
 		return;
 
 	default:
 		if (user_mode(regs)) {
-			printk("\nhandle_interruption() pid=%d command='%s'\n",
+#ifdef PRINT_USER_FAULTS
+			printk(KERN_DEBUG "\nhandle_interruption() pid=%d command='%s'\n",
 			    current->pid, current->comm);
 			show_regs(regs);
+#endif
 			/* SIGBUS, for lack of a better one. */
 			si.si_signo = SIGBUS;
 			si.si_code = BUS_OBJERR;
@@ -646,18 +676,22 @@
 			force_sig_info(SIGBUS, &si, current);
 			return;
 		}
-		parisc_terminate("Unexpected Interruption!",regs,code,0);
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+		
+		parisc_terminate("Unexpected interruption", regs, code, 0);
 		/* NOT REACHED */
 	}
 
 	if (user_mode(regs)) {
 	    if (fault_space != regs->sr[7]) {
+#ifdef PRINT_USER_FAULTS
 		if (fault_space == 0)
-			printk("User Fault on Kernel Space ");
-		else /* this case should never happen, but whatever... */
-			printk("User Fault (long pointer) ");
+			printk(KERN_DEBUG "User Fault on Kernel Space ");
+		else
+			printk(KERN_DEBUG "User Fault (long pointer) ");
 		printk("pid=%d command='%s'\n", current->pid, current->comm);
 		show_regs(regs);
+#endif
 		si.si_signo = SIGSEGV;
 		si.si_errno = 0;
 		si.si_code = SEGV_MAPERR;
@@ -672,158 +706,17 @@
 	     * The kernel should never fault on its own address space.
 	     */
 
-	    if (fault_space == 0)
-		    parisc_terminate("Kernel Fault",regs,code,fault_address);
-	}
-
-#ifdef CONFIG_KWDB
-	debug_call_leaf ();
-#endif /* CONFIG_KWDB */
-
-	do_page_fault(regs, code, fault_address);
-
-	/*
-	 * This should not be necessary.
-	 * However, we do not currently
-	 * implement flush_page_to_ram.
-	 *
-	 * The problem is that if we just
-	 * brought in some code through the
-	 * D-cache, the I-cache may not see
-	 * it since it hasn't been flushed
-	 * to ram.
-	 */
-
-/* 	flush_all_caches(); */
-
-#if 0
-	printk("returning %p\n", regs);
-/*	show_regs(regs); */
-#endif
-
-	return;
-
-}
-
-void show_stack(unsigned long sp)
-{
-#if 1
-	if ((sp & 0xc0000000UL) == 0xc0000000UL) {
-
-	    __u32 *stackptr;
-	    __u32 *dumpptr;
-
-	    /* Stack Dump! */
-
-	    stackptr = (__u32 *)sp;
-	    dumpptr  = (__u32 *)(sp & ~(INIT_TASK_SIZE - 1));
-	    printk("\nDumping Stack from %p to %p:\n",dumpptr,stackptr);
-	    while (dumpptr < stackptr) {
-		printk("%04x %08x %08x %08x %08x %08x %08x %08x %08x\n",
-		    ((__u32)dumpptr) & 0xffff,
-		    dumpptr[0], dumpptr[1], dumpptr[2], dumpptr[3],
-		    dumpptr[4], dumpptr[5], dumpptr[6], dumpptr[7]);
-		dumpptr += 8;
+	    if (fault_space == 0) 
+	    {
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+		parisc_terminate("Kernel Fault", regs, code, fault_address);
+	
 	    }
 	}
-#endif
-}
 
-
-void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset)
-{
-	set_eiem(0);
-	cli();
-
-	if (code == 1)
-	    transfer_pim_to_trap_frame(regs);
-
-#if 1
-	show_stack(regs->gr[30]);
-#endif
-
-	printk("\n%s: Code=%d regs=%p (Addr=%08lx)\n",msg,code,regs,offset);
-	show_regs(regs);
-
-	for(;;)
-	    ;
+	do_page_fault(regs, code, fault_address);
 }
 
-void transfer_pim_to_trap_frame(struct pt_regs *regs)
-{
-    register int i;
-    extern unsigned int hpmc_pim_data[];
-    struct pdc_hpmc_pim_11 *pim_narrow;
-    struct pdc_hpmc_pim_20 *pim_wide;
-
-    if (boot_cpu_data.cpu_type >= pcxu) {
-
-	pim_wide = (struct pdc_hpmc_pim_20 *)hpmc_pim_data;
-
-	/*
-	 * Note: The following code will probably generate a
-	 * bunch of truncation error warnings from the compiler.
-	 * Could be handled with an ifdef, but perhaps there
-	 * is a better way.
-	 */
-
-	regs->gr[0] = pim_wide->cr[22];
-
-	for (i = 1; i < 32; i++)
-	    regs->gr[i] = pim_wide->gr[i];
-
-	for (i = 0; i < 32; i++)
-	    regs->fr[i] = pim_wide->fr[i];
-
-	for (i = 0; i < 8; i++)
-	    regs->sr[i] = pim_wide->sr[i];
-
-	regs->iasq[0] = pim_wide->cr[17];
-	regs->iasq[1] = pim_wide->iasq_back;
-	regs->iaoq[0] = pim_wide->cr[18];
-	regs->iaoq[1] = pim_wide->iaoq_back;
-
-	regs->cr30 = pim_wide->cr[30];
-	regs->sar  = pim_wide->cr[11];
-	regs->iir  = pim_wide->cr[19];
-	regs->isr  = pim_wide->cr[20];
-	regs->ior  = pim_wide->cr[21];
-    }
-    else {
-	pim_narrow = (struct pdc_hpmc_pim_11 *)hpmc_pim_data;
-
-	regs->gr[0] = pim_narrow->cr[22];
-
-	for (i = 1; i < 32; i++)
-	    regs->gr[i] = pim_narrow->gr[i];
-
-	for (i = 0; i < 32; i++)
-	    regs->fr[i] = pim_narrow->fr[i];
-
-	for (i = 0; i < 8; i++)
-	    regs->sr[i] = pim_narrow->sr[i];
-
-	regs->iasq[0] = pim_narrow->cr[17];
-	regs->iasq[1] = pim_narrow->iasq_back;
-	regs->iaoq[0] = pim_narrow->cr[18];
-	regs->iaoq[1] = pim_narrow->iaoq_back;
-
-	regs->cr30 = pim_narrow->cr[30];
-	regs->sar  = pim_narrow->cr[11];
-	regs->iir  = pim_narrow->cr[19];
-	regs->isr  = pim_narrow->cr[20];
-	regs->ior  = pim_narrow->cr[21];
-    }
-
-    /*
-     * The following fields only have meaning if we came through
-     * another path. So just zero them here.
-     */
-
-    regs->ksp = 0;
-    regs->kpc = 0;
-    regs->orig_r28 = 0;
-}
 
 int __init check_ivt(void *iva)
 {
@@ -835,7 +728,7 @@
 	extern void os_hpmc(void);
 	extern void os_hpmc_end(void);
 
-	if(strcmp((char *)iva, "cows can fly"))
+	if (strcmp((char *)iva, "cows can fly"))
 		return -1;
 
 	ivap = (u32 *)iva;
@@ -850,10 +743,10 @@
 
 	hpmcp = (u32 *)os_hpmc;
 
-	for(i=0; i<length/4; i++)
+	for (i=0; i<length/4; i++)
 	    check += *hpmcp++;
 
-	for(i=0; i<8; i++)
+	for (i=0; i<8; i++)
 	    check += ivap[i];
 
 	ivap[5] = -check;
@@ -868,11 +761,8 @@
 
 void __init trap_init(void)
 {
-	volatile long eiem;
 	void *iva;
 
-	printk("trap_init\n");
-	
 	if (boot_cpu_data.cpu_type >= pcxu)
 		iva = (void *) &fault_vector_20;
 	else
@@ -882,12 +772,6 @@
 		iva = (void *) &fault_vector_11;
 #endif
 
-	if(check_ivt(iva))
+	if (check_ivt(iva))
 		panic("IVT invalid");
-
-	mtctl(0, 30);
-	mtctl(90000000, 16);
-	set_eiem(-1L);
-	mtctl(-1L, 23);
-	asm volatile ("rsm 0,%0" : "=r" (eiem));
 }
diff -Nru a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/kernel/unaligned.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,434 @@
+/*    $Id: unaligned.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $
+ *
+ *    Unaligned memory access handler
+ *
+ *    Copyright (C) 2001 Randolph Chung <tausq@debian.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.
+ *
+ */
+
+#include <linux/config.h>
+#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/spinlock.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/atomic.h>
+
+#include <asm/smp.h>
+#include <asm/pdc.h>
+
+/* #define DEBUG_UNALIGNED 1 */
+
+#ifdef DEBUG_UNALIGNED
+#define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __FUNCTION__ ); printk(KERN_DEBUG fmt, ##args ); } while (0)
+#else
+#define DPRINTF(fmt, args...)
+#endif
+
+#ifdef __LP64__
+#define RFMT "%016lx"
+#else
+#define RFMT "%08lx"
+#endif
+
+/* 1111 1100 0000 0000 0001 0011 1100 0000 */
+#define OPCODE1(a,b,c)	((a)<<26|(b)<<12|(c)<<6) 
+#define OPCODE2(a,b)	((a)<<26|(b)<<1)
+#define OPCODE3(a,b)	((a)<<26|(b)<<2)
+#define OPCODE4(a)	((a)<<26)
+#define OPCODE1_MASK	OPCODE1(0x3f,1,0xf)
+#define OPCODE2_MASK 	OPCODE2(0x3f,1)
+#define OPCODE3_MASK	OPCODE3(0x3f,1)
+#define OPCODE4_MASK    OPCODE4(0x3f)
+
+/* skip LDB (index) */
+#define OPCODE_LDH_I	OPCODE1(0x03,0,0x1)
+#define OPCODE_LDW_I	OPCODE1(0x03,0,0x2)
+#define OPCODE_LDD_I	OPCODE1(0x03,0,0x3)
+#define OPCODE_LDDA_I	OPCODE1(0x03,0,0x4)
+/* skip LDCD (index) */
+#define OPCODE_LDWA_I	OPCODE1(0x03,0,0x6)
+/* skip LDCW (index) */
+/* skip LDB (short) */
+#define OPCODE_LDH_S	OPCODE1(0x03,1,0x1)
+#define OPCODE_LDW_S	OPCODE1(0x03,1,0x2)
+#define OPCODE_LDD_S	OPCODE1(0x03,1,0x3)
+#define OPCODE_LDDA_S	OPCODE1(0x03,1,0x4)
+/* skip LDCD (short) */
+#define OPCODE_LDWA_S	OPCODE1(0x03,1,0x6)
+/* skip LDCW (short) */
+/* skip STB */
+#define OPCODE_STH	OPCODE1(0x03,1,0x9)
+#define OPCODE_STW	OPCODE1(0x03,1,0xa)
+#define OPCODE_STD	OPCODE1(0x03,1,0xb)
+/* skip STBY */
+/* skip STDBY */
+#define OPCODE_STWA	OPCODE1(0x03,1,0xe)
+#define OPCODE_STDA	OPCODE1(0x03,1,0xf)
+
+#define OPCODE_LDD_L	OPCODE2(0x14,0)
+#define OPCODE_FLDD_L	OPCODE2(0x14,1)
+#define OPCODE_STD_L	OPCODE2(0x1c,0)
+#define OPCODE_FSTD_L	OPCODE2(0x1c,1)
+
+#define OPCODE_LDW_M	OPCODE3(0x17,1)
+#define OPCODE_FLDW_L	OPCODE3(0x17,0)
+#define OPCODE_FSTW_L	OPCODE3(0x1f,0)
+#define OPCODE_STW_M	OPCODE3(0x1f,1)
+
+#define OPCODE_LDH_L    OPCODE4(0x11)
+#define OPCODE_LDW_L    OPCODE4(0x12)
+#define OPCODE_LDW_L2   OPCODE4(0x13)
+#define OPCODE_STH_L    OPCODE4(0x19)
+#define OPCODE_STW_L    OPCODE4(0x1A)
+#define OPCODE_STW_L2   OPCODE4(0x1B)
+
+
+
+void die_if_kernel (char *str, struct pt_regs *regs, long err);
+
+static int emulate_load(struct pt_regs *regs, int len, int toreg)
+{
+	unsigned long saddr = regs->ior;
+	unsigned long val = 0;
+	int ret = 0;
+
+	if (regs->isr != regs->sr[7])
+	{
+		printk(KERN_CRIT "isr verification failed (isr: " RFMT ", sr7: " RFMT "\n",
+			regs->isr, regs->sr[7]);
+		return 1;
+	}
+
+	DPRINTF("load " RFMT ":" RFMT " to r%d for %d bytes\n", 
+		regs->isr, regs->ior, toreg, len);
+
+	__asm__ __volatile__  (
+"       mfsp %%sr1, %%r20\n"
+"       mtsp %6, %%sr1\n"
+"	copy %%r0, %0\n"
+"0:	ldbs,ma	1(%%sr1,%4), %%r19\n"
+"	addi -1, %5, %5\n"
+"	cmpib,>= 0, %5, 2f\n"
+"	or %%r19, %0, %0\n"
+"	b 0b\n"
+	
+#ifdef __LP64__
+	"depd,z %0, 55, 56, %0\n"
+#else
+	"depw,z %0, 23, 24, %0\n"
+#endif
+	
+"1:	ldi	10, %1\n"
+"2:     mtsp %%r20, %%sr1\n"
+"	.section __ex_table,\"a\"\n"
+#ifdef __LP64__
+	".dword 0b, (1b-0b)\n"
+#else
+	".word 0b, (1b-0b)\n"
+#endif
+	".previous\n" 
+	: "=r" (val), "=r" (ret)
+	: "0" (val), "1" (ret), "r" (saddr), "r" (len), "r" (regs->isr)
+	: "r19", "r20" );
+
+	DPRINTF("val = 0x" RFMT "\n", val);
+
+	regs->gr[toreg] = val;
+
+	return ret;
+}
+
+static int emulate_store(struct pt_regs *regs, int len, int frreg)
+{
+	int ret = 0;
+#ifdef __LP64__
+	unsigned long val = regs->gr[frreg] << (64 - (len << 3));
+#else
+	unsigned long val = regs->gr[frreg] << (32 - (len << 3));
+#endif
+
+	if (regs->isr != regs->sr[7])
+	{
+		printk(KERN_CRIT "isr verification failed (isr: " RFMT ", sr7: " RFMT "\n",
+			regs->isr, regs->sr[7]);
+		return 1;
+	}
+
+	DPRINTF("store r%d (0x" RFMT ") to " RFMT ":" RFMT " for %d bytes\n", frreg, 
+		regs->gr[frreg], regs->isr, regs->ior, len);
+
+
+	__asm__ __volatile__ (
+"       mfsp %%sr1, %%r20\n"		/* save sr1 */
+"       mtsp %5, %%sr1\n"
+#ifdef __LP64__
+"0:	extrd,u %2, 7, 8, %%r19\n"
+#else
+"0:	extrw,u %2, 7, 8, %%r19\n"
+#endif
+"1:	stb,ma %%r19, 1(%%sr1, %3)\n"
+"	addi -1, %4, %4\n"
+"	cmpib,>= 0, %4, 3f\n"
+	
+#ifdef __LP64__
+	"depd,z %2, 55, 56, %2\n"
+#else
+	"depw,z %2, 23, 24, %2\n"
+#endif
+
+"	b 0b\n"
+"	nop\n"
+
+"2:	ldi 11, %0\n"
+"3:     mtsp %%r20, %%sr1\n"
+"	.section __ex_table,\"a\"\n"
+#ifdef __LP64__
+	".dword 1b, (2b-1b)\n"
+#else
+	".word 1b, (2b-1b)\n"
+#endif
+	".previous\n" 
+	: "=r" (ret)
+	: "0" (ret), "r" (val), "r" (regs->ior), "r" (len), "r" (regs->isr)
+	: "r19", "r20" );
+
+	return ret;
+}
+
+
+void handle_unaligned(struct pt_regs *regs)
+{
+	unsigned long unaligned_count = 0;
+	unsigned long last_time = 0;
+	int ret = -1;
+	struct siginfo si;
+
+	/* if the unaligned access is inside the kernel:
+	 *   if the access is caused by a syscall, then we fault the calling
+	 *     user process
+	 *   otherwise we halt the kernel
+	 */
+	if (!user_mode(regs))
+	{
+		const struct exception_table_entry *fix;
+
+		/* see if the offending code have its own
+		 * exception handler 
+		 */ 
+
+		fix = search_exception_table(regs->iaoq[0]);
+		if (fix)
+		{
+			/* lower bits of fix->skip are flags
+			 * upper bits are the handler addr
+			 */
+			if (fix->skip & 1)
+				regs->gr[8] = -EFAULT;
+			if (fix->skip & 2)
+				regs->gr[9] = 0;
+
+			regs->iaoq[0] += ((fix->skip) & ~3);
+			regs->iaoq[1] = regs->iaoq[0] + 4;
+			regs->gr[0] &= ~PSW_B;
+
+			return;
+		}
+	}
+
+	/* log a message with pacing */
+	if (user_mode(regs))
+	{
+		if (unaligned_count > 5 && jiffies - last_time > 5*HZ)
+		{
+			unaligned_count = 0;
+			last_time = jiffies;
+		}
+		if (++unaligned_count < 5)
+		{
+			char buf[256];
+			sprintf(buf, "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n",
+				current->comm, current->pid, regs->ior, regs->iaoq[0]);
+			printk(KERN_WARNING "%s", buf);
+#ifdef DEBUG_UNALIGNED
+			show_regs(regs);
+#endif		
+		}
+	}
+
+	/* TODO: make this cleaner... */
+	switch (regs->iir & OPCODE1_MASK)
+	{
+	case OPCODE_LDH_I:
+	case OPCODE_LDH_S:
+		ret = emulate_load(regs, 2, regs->iir & 0x1f);
+		break;
+
+	case OPCODE_LDW_I:
+	case OPCODE_LDWA_I:
+	case OPCODE_LDW_S:
+	case OPCODE_LDWA_S:
+		ret = emulate_load(regs, 4, regs->iir&0x1f);
+		break;
+
+	case OPCODE_LDD_I:
+	case OPCODE_LDDA_I:
+	case OPCODE_LDD_S:
+	case OPCODE_LDDA_S:
+		ret = emulate_load(regs, 8, regs->iir&0x1f);
+		break;
+
+	case OPCODE_STH:
+		ret = emulate_store(regs, 2, (regs->iir>>16)&0x1f);
+		break;
+
+	case OPCODE_STW:
+	case OPCODE_STWA:
+		ret = emulate_store(regs, 4, (regs->iir>>16)&0x1f);
+		break;
+
+	case OPCODE_STD:
+	case OPCODE_STDA:
+		ret = emulate_store(regs, 8, (regs->iir>>16)&0x1f);
+		break;
+	}
+	switch (regs->iir & OPCODE2_MASK)
+	{
+	case OPCODE_LDD_L:
+	case OPCODE_FLDD_L:
+		ret = emulate_load(regs, 8, (regs->iir>>16)&0x1f);
+		break;
+
+	case OPCODE_STD_L:
+	case OPCODE_FSTD_L:
+		ret = emulate_store(regs, 8, (regs->iir>>16)&0x1f);
+		break;
+	}
+	switch (regs->iir & OPCODE3_MASK)
+	{
+	case OPCODE_LDW_M:
+	case OPCODE_FLDW_L:
+		ret = emulate_load(regs, 4, (regs->iir>>16)&0x1f);
+		break;
+
+	case OPCODE_FSTW_L:
+	case OPCODE_STW_M:
+		ret = emulate_store(regs, 4, (regs->iir>>16)&0x1f);
+		break;
+	}
+	switch (regs->iir & OPCODE4_MASK)
+	{
+	case OPCODE_LDH_L:
+		ret = emulate_load(regs, 2, (regs->iir>>16)&0x1f);
+		break;
+	case OPCODE_LDW_L:
+	case OPCODE_LDW_L2:
+		ret = emulate_load(regs, 4, (regs->iir>>16)&0x1f);
+		break;
+	case OPCODE_STH_L:
+		ret = emulate_store(regs, 2, (regs->iir>>16)&0x1f);
+		break;
+	case OPCODE_STW_L:
+	case OPCODE_STW_L2:
+		ret = emulate_store(regs, 4, (regs->iir>>16)&0x1f);
+		break;
+	}
+
+	if (ret < 0)
+		printk(KERN_CRIT "Not-handled unaligned insn 0x%08lx\n", regs->iir);
+
+	DPRINTF("ret = %d\n", ret);
+
+	if (ret)
+	{
+		printk(KERN_CRIT "Unaligned handler failed, ret = %d\n", ret);
+		die_if_kernel("Unaligned data reference", regs, 28);
+
+		/* couldn't handle it ... */
+		si.si_signo = SIGBUS;
+		si.si_errno = 0;
+		si.si_code = BUS_ADRALN;
+		si.si_addr = (void *)regs->ior;
+		force_sig_info(SIGBUS, &si, current);
+		
+		return;
+	}
+
+	/* else we handled it, advance the PC.... */
+	regs->iaoq[0] = regs->iaoq[1];
+	regs->iaoq[1] = regs->iaoq[0] + 4;
+}
+
+/*
+ * NB: check_unaligned() is only used for PCXS processors right
+ * now, so we only check for PA1.1 encodings at this point.
+ */
+
+int
+check_unaligned(struct pt_regs *regs)
+{
+	unsigned long align_mask;
+
+	/* Get alignment mask */
+
+	align_mask = 0UL;
+	switch (regs->iir & OPCODE1_MASK) {
+
+	case OPCODE_LDH_I:
+	case OPCODE_LDH_S:
+	case OPCODE_STH:
+		align_mask = 1UL;
+		break;
+
+	case OPCODE_LDW_I:
+	case OPCODE_LDWA_I:
+	case OPCODE_LDW_S:
+	case OPCODE_LDWA_S:
+	case OPCODE_STW:
+	case OPCODE_STWA:
+		align_mask = 3UL;
+		break;
+
+	default:
+		switch (regs->iir & OPCODE4_MASK) {
+		case OPCODE_LDH_L:
+		case OPCODE_STH_L:
+			align_mask = 1UL;
+			break;
+		case OPCODE_LDW_L:
+		case OPCODE_LDW_L2:
+		case OPCODE_STW_L:
+		case OPCODE_STW_L2:
+			align_mask = 3UL;
+			break;
+		}
+		break;
+	}
+
+	return (int)(regs->ior & align_mask);
+}
diff -Nru a/arch/parisc/lib/Makefile b/arch/parisc/lib/Makefile
--- a/arch/parisc/lib/Makefile	Wed Oct 30 16:44:29 2002
+++ b/arch/parisc/lib/Makefile	Wed Oct 30 16:44:29 2002
@@ -2,10 +2,8 @@
 # Makefile for parisc-specific library files..
 #
 
-L_TARGET = lib.a
-
-obj-y := lusercopy.o bitops.o checksum.o
 
-EXTRA_AFLAGS := -traditional
+L_TARGET = lib.a
+obj-y	:= lusercopy.o bitops.o checksum.o io.o memset.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c
--- a/arch/parisc/lib/bitops.c	Wed Oct 30 16:44:21 2002
+++ b/arch/parisc/lib/bitops.c	Wed Oct 30 16:44:21 2002
@@ -1,7 +1,10 @@
-/* atomic.c: atomic operations which got too long to be inlined all over
- * the place.
+/*
+ * bitops.c: atomic operations which got too long to be inlined all over
+ *      the place.
  * 
- * Copyright 1999 Philipp Rumpf (prumpf@tux.org */
+ * Copyright 1999 Philipp Rumpf (prumpf@tux.org)
+ * Copyright 2000 Grant Grundler (grundler@cup.hp.com)
+ */
 
 #include <linux/config.h>
 #include <linux/kernel.h>
@@ -17,44 +20,67 @@
 
 spinlock_t __atomic_lock = SPIN_LOCK_UNLOCKED;
 
-#ifndef __LP64__
-unsigned long __xchg(unsigned long x, unsigned long *ptr, int size)
+#ifdef __LP64__
+unsigned long __xchg64(unsigned long x, unsigned long *ptr)
 {
 	unsigned long temp, flags;
 
-	if (size != sizeof x) {
-		printk("__xchg called with bad pointer\n");
-	}
-	spin_lock_irqsave(&__atomic_lock, flags);
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
 	temp = *ptr;
 	*ptr = x;
-	spin_unlock_irqrestore(&__atomic_lock, flags);
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
 	return temp;
 }
-#else
-unsigned long __xchg(unsigned long x, unsigned long *ptr, int size)
+#endif
+
+unsigned long __xchg32(int x, int *ptr)
 {
-	unsigned long temp, flags;
-	unsigned int *ptr32;
+	unsigned long flags;
+	unsigned long temp;
+
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
+	(long) temp = (long) *ptr;	/* XXX - sign extension wanted? */
+	*ptr = x;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
+	return temp;
+}
+
+
+unsigned long __xchg8(char x, char *ptr)
+{
+	unsigned long flags;
+	unsigned long temp;
 
-	if (size == 8) {
-try_long:
-		spin_lock_irqsave(&__atomic_lock, flags);
-		temp = *ptr;
-		*ptr = x;
-		spin_unlock_irqrestore(&__atomic_lock, flags);
-		return temp;
-	}
-	if (size == 4) {
-		ptr32 = (unsigned int *)ptr;
-		spin_lock_irqsave(&__atomic_lock, flags);
-		temp = (unsigned long)*ptr32;
-		*ptr32 = (unsigned int)x;
-		spin_unlock_irqrestore(&__atomic_lock, flags);
-		return temp;
-	}
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
+	(long) temp = (long) *ptr;	/* XXX - sign extension wanted? */
+	*ptr = x;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
+	return temp;
+}
+
+
+#ifdef __LP64__
+unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new)
+{
+	unsigned long flags;
+	unsigned long prev;
 
-	printk("__xchg called with bad pointer\n");
-	goto try_long;
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
+	if ((prev = *ptr) == old)
+		*ptr = new;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
+	return prev;
 }
 #endif
+
+unsigned long __cmpxchg_u32(volatile unsigned int *ptr, unsigned int old, unsigned int new)
+{
+	unsigned long flags;
+	unsigned int prev;
+
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(ptr), flags);
+	if ((prev = *ptr) == old)
+		*ptr = new;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(ptr), flags);
+	return (unsigned long)prev;
+}
diff -Nru a/arch/parisc/lib/io.c b/arch/parisc/lib/io.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/lib/io.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,459 @@
+/*
+ * arch/parisc/lib/io.c
+ *
+ * Copyright (c) Matthew Wilcox 2001 for Hewlett-Packard
+ * Copyright (c) Randolph Chung 2001 <tausq@debian.org>
+ *
+ * IO accessing functions which shouldn't be inlined because they're too big
+ */
+
+#include <linux/kernel.h>
+#include <asm/io.h>
+
+/* Copies a block of memory to a device in an efficient manner.
+ * Assumes the device can cope with 32-bit transfers.  If it can't,
+ * don't use this function.
+ */
+void memcpy_toio(unsigned long dest, const void *src, int count)
+{
+	if ((dest & 3) != ((unsigned long)src & 3))
+		goto bytecopy;
+	while (dest & 3) {
+		writeb(*(char *)src, dest++);
+		((char *)src)++;
+		count--;
+	}
+	while (count > 3) {
+		__raw_writel(*(u32 *)src, dest);
+		(unsigned long) src += 4;
+		dest += 4;
+		count -= 4;
+	}
+ bytecopy:
+	while (count--) {
+		writeb(*(char *)src, dest++);
+		((char *)src)++;
+	}
+}
+
+/*
+** Copies a block of memory from a device in an efficient manner.
+** Assumes the device can cope with 32-bit transfers.  If it can't,
+** don't use this function.
+**
+** CR16 counts on C3000 reading 256 bytes from Symbios 896 RAM:
+**	27341/64    = 427 cyc per int
+**	61311/128   = 478 cyc per short
+**	122637/256  = 479 cyc per byte
+** Ergo bus latencies dominant (not transfer size).
+**      Minimize total number of transfers at cost of CPU cycles.
+**	TODO: only look at src alignment and adjust the stores to dest.
+*/
+void memcpy_fromio(void *dest, unsigned long src, int count)
+{
+	/* first compare alignment of src/dst */ 
+	if ( (((unsigned long)dest ^ src) & 1) || (count < 2) )
+		goto bytecopy;
+
+	if ( (((unsigned long)dest ^ src) & 2) || (count < 4) )
+		goto shortcopy;
+
+	/* Then check for misaligned start address */
+	if (src & 1) {
+		*(u8 *)dest = readb(src);
+		((u8 *)src)++;
+		((u8 *)dest)++;
+		count--;
+		if (count < 2) goto bytecopy;
+	}
+
+	if (src & 2) {
+		*(u16 *)dest = __raw_readw(src);
+		((u16 *)src)++;
+		((u16 *)dest)++;
+		count-=2;
+	}
+
+	while (count > 3) {
+		*(u32 *)dest = __raw_readl(src);
+		dest += 4;
+		src += 4;
+		count -= 4;
+	}
+
+ shortcopy:
+	while (count > 1) {
+		*(u16 *)dest = __raw_readw(src);
+		((u16 *)src)++;
+		((u16 *)dest)++;
+		count-=2;
+	}
+
+ bytecopy:
+	while (count--) {
+		*(char *)dest = readb(src);
+		((char *)src)++;
+		((char *)dest)++;
+	}
+}
+
+/* Sets a block of memory on a device to a given value.
+ * Assumes the device can cope with 32-bit transfers.  If it can't,
+ * don't use this function.
+ */
+void memset_io(unsigned long dest, char fill, int count)
+{
+	u32 fill32 = (fill << 24) | (fill << 16) | (fill << 8) | fill;
+	while (dest & 3) {
+		writeb(fill, dest++);
+		count--;
+	}
+	while (count > 3) {
+		__raw_writel(fill32, dest);
+		dest += 4;
+		count -= 4;
+	}
+	while (count--) {
+		writeb(fill, dest++);
+	}
+}
+
+/*
+ * Read COUNT 8-bit bytes from port PORT into memory starting at
+ * SRC.
+ */
+void insb (unsigned long port, void *dst, unsigned long count)
+{
+	while (((unsigned long)dst) & 0x3) {
+		if (!count)
+			return;
+		count--;
+		*(unsigned char *) dst = inb(port);
+		((unsigned char *) dst)++;
+	}
+
+	while (count >= 4) {
+		unsigned int w;
+		count -= 4;
+		w = inb(port) << 24;
+		w |= inb(port) << 16;
+		w |= inb(port) << 8;
+		w |= inb(port);
+		*(unsigned int *) dst = w;
+		((unsigned int *) dst)++;
+	}
+
+	while (count) {
+		--count;
+		*(unsigned char *) dst = inb(port);
+		((unsigned char *) dst)++;
+	}
+}
+
+
+/*
+ * Read COUNT 16-bit words from port PORT into memory starting at
+ * SRC.  SRC must be at least short aligned.  This is used by the
+ * IDE driver to read disk sectors.  Performance is important, but
+ * the interfaces seems to be slow: just using the inlined version
+ * of the inw() breaks things.
+ */
+void insw (unsigned long port, void *dst, unsigned long count)
+{
+	unsigned int l = 0, l2;
+	
+	if (!count)
+		return;
+	
+	switch (((unsigned long) dst) & 0x3)
+	{
+	 case 0x00:			/* Buffer 32-bit aligned */
+		while (count>=2) {
+			
+			count -= 2;
+			l = cpu_to_le16(inw(port)) << 16;
+			l |= cpu_to_le16(inw(port));
+			*(unsigned int *) dst = l;
+			((unsigned int *) dst)++;
+		}
+		if (count) {
+			*(unsigned short *) dst = cpu_to_le16(inw(port));
+		}
+		break;
+	
+	 case 0x02:			/* Buffer 16-bit aligned */
+		*(unsigned short *) dst = cpu_to_le16(inw(port));
+		((unsigned short *) dst)++;
+		count--;
+		while (count>=2) {
+			
+			count -= 2;
+			l = cpu_to_le16(inw(port)) << 16;
+			l |= cpu_to_le16(inw(port));
+			*(unsigned int *) dst = l;
+			((unsigned int *) dst)++;
+		}
+		if (count) {
+			*(unsigned short *) dst = cpu_to_le16(inw(port));
+		}
+		break;
+		
+	 case 0x01:			/* Buffer 8-bit aligned */
+	 case 0x03:
+		/* I don't bother with 32bit transfers
+		 * in this case, 16bit will have to do -- DE */
+		--count;
+		
+		l = cpu_to_le16(inw(port));
+		*(unsigned char *) dst = l >> 8;
+		((unsigned char *) dst)++;
+		while (count--)
+		{
+			l2 = cpu_to_le16(inw(port));
+			*(unsigned short *) dst = (l & 0xff) << 8 | (l2 >> 8);
+			((unsigned short *) dst)++;
+			l = l2;
+		}
+		*(unsigned char *) dst = l & 0xff;
+		break;
+	}
+}
+
+
+
+/*
+ * Read COUNT 32-bit words from port PORT into memory starting at
+ * SRC. Now works with any alignment in SRC. Performance is important,
+ * but the interfaces seems to be slow: just using the inlined version
+ * of the inl() breaks things.
+ */
+void insl (unsigned long port, void *dst, unsigned long count)
+{
+	unsigned int l = 0, l2;
+	
+	if (!count)
+		return;
+	
+	switch (((unsigned long) dst) & 0x3)
+	{
+	 case 0x00:			/* Buffer 32-bit aligned */
+		while (count--)
+		{
+			*(unsigned int *) dst = cpu_to_le32(inl(port));
+			((unsigned int *) dst)++;
+		}
+		break;
+	
+	 case 0x02:			/* Buffer 16-bit aligned */
+		--count;
+		
+		l = cpu_to_le32(inl(port));
+		*(unsigned short *) dst = l >> 16;
+		((unsigned short *) dst)++;
+		
+		while (count--)
+		{
+			l2 = cpu_to_le32(inl(port));
+			*(unsigned int *) dst = (l & 0xffff) << 16 | (l2 >> 16);
+			((unsigned int *) dst)++;
+			l = l2;
+		}
+		*(unsigned short *) dst = l & 0xffff;
+		break;
+	 case 0x01:			/* Buffer 8-bit aligned */
+		--count;
+		
+		l = cpu_to_le32(inl(port));
+		*(unsigned char *) dst = l >> 24;
+		((unsigned char *) dst)++;
+		*(unsigned short *) dst = (l >> 8) & 0xffff;
+		((unsigned short *) dst)++;
+		while (count--)
+		{
+			l2 = cpu_to_le32(inl(port));
+			*(unsigned int *) dst = (l & 0xff) << 24 | (l2 >> 8);
+			((unsigned int *) dst)++;
+			l = l2;
+		}
+		*(unsigned char *) dst = l & 0xff;
+		break;
+	 case 0x03:			/* Buffer 8-bit aligned */
+		--count;
+		
+		l = cpu_to_le32(inl(port));
+		*(unsigned char *) dst = l >> 24;
+		((unsigned char *) dst)++;
+		while (count--)
+		{
+			l2 = cpu_to_le32(inl(port));
+			*(unsigned int *) dst = (l & 0xffffff) << 8 | l2 >> 24;
+			((unsigned int *) dst)++;
+			l = l2;
+		}
+		*(unsigned short *) dst = (l >> 8) & 0xffff;
+		((unsigned short *) dst)++;
+		*(unsigned char *) dst = l & 0xff;
+		break;
+	}
+}
+
+
+/*
+ * Like insb but in the opposite direction.
+ * Don't worry as much about doing aligned memory transfers:
+ * doing byte reads the "slow" way isn't nearly as slow as
+ * doing byte writes the slow way (no r-m-w cycle).
+ */
+void outsb(unsigned long port, const void * src, unsigned long count)
+{
+	while (count) {
+		count--;
+		outb(*(char *)src, port);
+		((char *) src)++;
+	}
+}
+
+/*
+ * Like insw but in the opposite direction.  This is used by the IDE
+ * driver to write disk sectors.  Performance is important, but the
+ * interfaces seems to be slow: just using the inlined version of the
+ * outw() breaks things.
+ */
+void outsw (unsigned long port, const void *src, unsigned long count)
+{
+	unsigned int l = 0, l2;
+	
+	if (!count)
+		return;
+	
+	switch (((unsigned long) src) & 0x3)
+	{
+	 case 0x00:			/* Buffer 32-bit aligned */
+		while (count>=2) {
+			count -= 2;
+			l = *(unsigned int *) src;
+			((unsigned int *) src)++;
+			outw(le16_to_cpu(l >> 16), port);
+			outw(le16_to_cpu(l & 0xffff), port);
+		}
+		if (count) {
+			outw(le16_to_cpu(*(unsigned short*)src), port);
+		}
+		break;
+	
+	 case 0x02:			/* Buffer 16-bit aligned */
+		
+		outw(le16_to_cpu(*(unsigned short*)src), port);
+		((unsigned short *) src)++;
+		count--;
+		
+		while (count>=2) {
+			count -= 2;
+			l = *(unsigned int *) src;
+			((unsigned int *) src)++;
+			outw(le16_to_cpu(l >> 16), port);
+			outw(le16_to_cpu(l & 0xffff), port);
+		}
+		if (count) {
+			outw(le16_to_cpu(*(unsigned short*)src), port);
+		}
+		break;
+		
+	 case 0x01:			/* Buffer 8-bit aligned */	
+		/* I don't bother with 32bit transfers
+		 * in this case, 16bit will have to do -- DE */
+		
+		l  = *(unsigned char *) src << 8;
+		((unsigned char *) src)++;
+		count--;
+		while (count)
+		{
+			count--;
+			l2 = *(unsigned short *) src;
+			((unsigned short *) src)++;
+			outw(le16_to_cpu(l | l2 >> 8), port);
+		        l = l2 << 8;
+		}
+		l2 = *(unsigned char *) src;
+		outw (le16_to_cpu(l | l2>>8), port);
+		break;
+	
+	}
+}
+
+
+/*
+ * Like insl but in the opposite direction.  This is used by the IDE
+ * driver to write disk sectors.  Works with any alignment in SRC.
+ *  Performance is important, but the interfaces seems to be slow:
+ * just using the inlined version of the outl() breaks things.
+ */
+void outsl (unsigned long port, const void *src, unsigned long count)
+{
+	unsigned int l = 0, l2;
+	
+	if (!count)
+		return;
+	
+	switch (((unsigned long) src) & 0x3)
+	{
+	 case 0x00:			/* Buffer 32-bit aligned */
+		while (count--)
+		{
+			outl(le32_to_cpu(*(unsigned int *) src), port);
+			((unsigned int *) src)++;
+		}
+		break;
+	
+	 case 0x02:			/* Buffer 16-bit aligned */
+		--count;
+		
+		l = *(unsigned short *) src;
+		((unsigned short *) src)++;
+		
+		while (count--)
+		{
+			l2 = *(unsigned int *) src;
+			((unsigned int *) src)++;
+			outl (le32_to_cpu(l << 16 | l2 >> 16), port);
+			l = l2;
+		}
+		l2 = *(unsigned short *) src;
+		outl (le32_to_cpu(l << 16 | l2), port);
+		break;
+	 case 0x01:			/* Buffer 8-bit aligned */
+		--count;
+		
+		l  = *(unsigned char *) src << 24;
+		((unsigned char *) src)++;
+		l |= *(unsigned short *) src << 8;
+		((unsigned short *) src)++;
+		while (count--)
+		{
+			l2 = *(unsigned int *) src;
+			((unsigned int *) src)++;
+			outl (le32_to_cpu(l | l2 >> 24), port);
+			l = l2 << 8;
+		}
+		l2 = *(unsigned char *) src;
+		      outl (le32_to_cpu(l | l2), port);
+		break;
+	 case 0x03:			/* Buffer 8-bit aligned */
+		--count;
+		
+		l  = *(unsigned char *) src << 24;
+		((unsigned char *) src)++;
+		while (count--)
+		{
+			l2 = *(unsigned int *) src;
+			((unsigned int *) src)++;
+			outl (le32_to_cpu(l | l2 >> 8), port);
+			l = l2 << 24;
+		}
+		l2  = *(unsigned short *) src << 16;
+		((unsigned short *) src)++;
+		l2 |= *(unsigned char *) src;
+		outl (le32_to_cpu(l | l2), port);
+		break;
+	}
+}
diff -Nru a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S
--- a/arch/parisc/lib/lusercopy.S	Wed Oct 30 16:44:20 2002
+++ b/arch/parisc/lib/lusercopy.S	Wed Oct 30 16:44:20 2002
@@ -1,5 +1,5 @@
-/*------------------------------------------------------------------------------
- * Native PARISC/Linux Project (http://www.puffingroup.com/parisc)
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
  *
  * Assembly Language User Access Routines
  *  Copyright (C) 2000 Hewlett-Packard (John Marvin)
@@ -30,7 +30,6 @@
  */
 
 
-	.level		1.1
 	.text
 	
 #include <asm/assembly.h>
@@ -42,12 +41,9 @@
 	 * on the flag stored in the task structure.
 	 */
 
-	/* FIXME! depi below has hardcoded idea of kernel stack size */
-
 	.macro  get_sr
-	copy        %r30,%r1        ;! Get task structure
-	depi        0,31,14,%r1     ;! into r1
-	ldw         TASK_SEGMENT(%r1),%r22
+	mfctl       %cr30,%r1
+	ldw         TI_SEGMENT(%r1),%r22
 	mfsp        %sr3,%r1
 	or,<>       %r22,%r0,%r0
 	copy        %r0,%r1
@@ -82,7 +78,11 @@
 	ldo         1(%r24),%r24
 
 	.section __ex_table,"a"
+#ifdef __LP64__
+	.dword      1b,(2b-1b)
+#else
 	.word       1b,(2b-1b)
+#endif
 	.previous
 
 	.procend
@@ -123,7 +123,11 @@
 	nop
 
 	.section __ex_table,"a"
+#ifdef __LP64__
+	.dword      1b,(2b-1b)
+#else
 	.word       1b,(2b-1b)
+#endif
 	.previous
 
 	.procend
@@ -133,7 +137,7 @@
 	 *
 	 * Returns -EFAULT if exception before terminator,
 	 *         N if the entire buffer filled,
-	 *         otherwise strlen + 1 (i.e. includes zero byte)
+	 *         otherwise strlen (i.e. excludes zero byte)
 	 */
 
 	.export lstrncpy_from_user,code
@@ -142,7 +146,7 @@
 	.callinfo NO_CALLS
 	.entry
 	comib,=     0,%r24,$lsfu_done
-	copy        %r26,%r23
+	copy        %r24,%r23
 	get_sr
 1:      ldbs,ma     1(%sr1,%r25),%r1
 $lsfu_loop:
@@ -151,7 +155,7 @@
 	addib,<>,n  -1,%r24,$lsfu_loop
 2:      ldbs,ma     1(%sr1,%r25),%r1
 $lsfu_done:
-	sub         %r26,%r23,%r28
+	sub         %r23,%r24,%r28
 $lsfu_exit:
 	bv          %r0(%r2)
 	nop
@@ -161,8 +165,13 @@
 	ldi         -EFAULT,%r28
 
 	.section __ex_table,"a"
+#ifdef __LP64__
+	.dword      1b,(3b-1b)
+	.dword      2b,(3b-2b)
+#else
 	.word       1b,(3b-1b)
-	.word       2b,(2b-1b)
+	.word       2b,(3b-2b)
+#endif
 	.previous
 
 	.procend
@@ -194,7 +203,11 @@
 	ldo        1(%r25),%r25
 
 	.section __ex_table,"a"
+#ifdef __LP64__
+	.dword      1b,(2b-1b)
+#else
 	.word       1b,(2b-1b)
+#endif
 	.previous
 
 	.procend
@@ -233,8 +246,13 @@
 	copy        %r24,%r26    /* reset r26 so 0 is returned on fault */
 
 	.section __ex_table,"a"
+#ifdef __LP64__
+	.dword      1b,(3b-1b)
+	.dword      2b,(3b-2b)
+#else
 	.word       1b,(3b-1b)
-	.word       2b,(2b-1b)
+	.word       2b,(3b-2b)
+#endif
 	.previous
 
 	.procend
diff -Nru a/arch/parisc/lib/memset.c b/arch/parisc/lib/memset.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/lib/memset.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,91 @@
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Slight modifications for pa-risc linux - Paul Bame <bame@debian.org> */
+
+#include <linux/types.h>
+#include <asm/string.h>
+
+#define OPSIZ (BITS_PER_LONG/8)
+typedef unsigned long op_t;
+
+void *
+memset (void *dstpp, int sc, size_t len)
+{
+  unsigned int c = sc;
+  long int dstp = (long int) dstpp;
+
+  if (len >= 8)
+    {
+      size_t xlen;
+      op_t cccc;
+
+      cccc = (unsigned char) c;
+      cccc |= cccc << 8;
+      cccc |= cccc << 16;
+      if (OPSIZ > 4)
+	/* Do the shift in two steps to avoid warning if long has 32 bits.  */
+	cccc |= (cccc << 16) << 16;
+
+      /* There are at least some bytes to set.
+	 No need to test for LEN == 0 in this alignment loop.  */
+      while (dstp % OPSIZ != 0)
+	{
+	  ((unsigned char *) dstp)[0] = c;
+	  dstp += 1;
+	  len -= 1;
+	}
+
+      /* Write 8 `op_t' per iteration until less than 8 `op_t' remain.  */
+      xlen = len / (OPSIZ * 8);
+      while (xlen > 0)
+	{
+	  ((op_t *) dstp)[0] = cccc;
+	  ((op_t *) dstp)[1] = cccc;
+	  ((op_t *) dstp)[2] = cccc;
+	  ((op_t *) dstp)[3] = cccc;
+	  ((op_t *) dstp)[4] = cccc;
+	  ((op_t *) dstp)[5] = cccc;
+	  ((op_t *) dstp)[6] = cccc;
+	  ((op_t *) dstp)[7] = cccc;
+	  dstp += 8 * OPSIZ;
+	  xlen -= 1;
+	}
+      len %= OPSIZ * 8;
+
+      /* Write 1 `op_t' per iteration until less than OPSIZ bytes remain.  */
+      xlen = len / OPSIZ;
+      while (xlen > 0)
+	{
+	  ((op_t *) dstp)[0] = cccc;
+	  dstp += OPSIZ;
+	  xlen -= 1;
+	}
+      len %= OPSIZ;
+    }
+
+  /* Write the last few bytes.  */
+  while (len > 0)
+    {
+      ((unsigned char *) dstp)[0] = c;
+      dstp += 1;
+      len -= 1;
+    }
+
+  return dstpp;
+}
diff -Nru a/arch/parisc/math-emu/Makefile b/arch/parisc/math-emu/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/Makefile	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,21 @@
+#
+# Makefile for the linux/parisc floating point code
+#
+# 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).
+#
+# Note 2! The CFLAGS definition is now in the main makefile...
+
+obj-y	 := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \
+		dfmpy.o sfmpy.o sfsqrt.o dfsqrt.o dfadd.o fmpyfadd.o \
+		sfadd.o dfsub.o sfsub.o fcnvfxt.o fcnvff.o fcnvxf.o \
+		fcnvfx.o fcnvuf.o fcnvfu.o fcnvfut.o dfdiv.o sfdiv.o \
+		dfrem.o sfrem.o dfcmp.o sfcmp.o
+
+# Math emulation code beyond the FRND is required for 712/80i and
+# other very old or stripped-down PA-RISC CPUs -- not currently supported
+
+obj-$CONFIG_MATH_EMULATION	+= unimplemented-math-emulation.o
+
+include $(TOPDIR)/Rules.make
diff -Nru a/arch/parisc/math-emu/README b/arch/parisc/math-emu/README
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/README	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,11 @@
+All files except driver.c are snapshots from the HP-UX kernel.  They've
+been modified as little as possible.  Even though they don't fit the
+Linux coding style, please leave them in their funny format just in case
+someone in the future, with access to HP-UX source code, is generous
+enough to update our copies with later changes from HP-UX -- it'll
+make their 'diff' job easier if our code is relatively unmodified.
+
+Required Disclaimer: Hewlett-Packard makes no implied or expressed
+warranties about this code nor any promises to maintain or test it
+in any way.  This copy of this snapshot is no longer the property
+of Hewlett-Packard.
diff -Nru a/arch/parisc/math-emu/cnv_float.h b/arch/parisc/math-emu/cnv_float.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/cnv_float.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,377 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+/*
+ * Some more constants
+ */
+#define SGL_FX_MAX_EXP 30
+#define DBL_FX_MAX_EXP 62
+#define QUAD_FX_MAX_EXP 126
+
+#define Dintp1(object) (object)
+#define Dintp2(object) (object)
+
+#define Duintp1(object) (object)
+#define Duintp2(object) (object)
+
+#define Qintp0(object) (object)
+#define Qintp1(object) (object)
+#define Qintp2(object) (object)
+#define Qintp3(object) (object)
+
+
+/*
+ * These macros will be used specifically by the convert instructions.
+ *
+ *
+ * Single format macros
+ */
+
+#define Sgl_to_dbl_exponent(src_exponent,dest)			\
+    Deposit_dexponent(dest,src_exponent+(DBL_BIAS-SGL_BIAS))
+
+#define Sgl_to_dbl_mantissa(src_mantissa,destA,destB)	\
+    Deposit_dmantissap1(destA,src_mantissa>>3);		\
+    Dmantissap2(destB) = src_mantissa << 29
+
+#define Sgl_isinexact_to_fix(sgl_value,exponent)	\
+    ((exponent < (SGL_P - 1)) ?				\
+     (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : FALSE)
+
+#define Int_isinexact_to_sgl(int_value)	(int_value << 33 - SGL_EXP_LENGTH)
+
+#define Sgl_roundnearest_from_int(int_value,sgl_value)			\
+    if (int_value & 1<<(SGL_EXP_LENGTH - 2))   /* round bit */		\
+    	if ((int_value << 34 - SGL_EXP_LENGTH) || Slow(sgl_value))	\
+		Sall(sgl_value)++
+
+#define Dint_isinexact_to_sgl(dint_valueA,dint_valueB)		\
+    ((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) || Dintp2(dint_valueB))
+
+#define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value)	\
+    if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2)) 			\
+    	if ((Dintp1(dint_valueA) << 34 - SGL_EXP_LENGTH) ||		\
+    	Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++
+
+#define Dint_isinexact_to_dbl(dint_value) 	\
+    (Dintp2(dint_value) << 33 - DBL_EXP_LENGTH)
+
+#define Dbl_roundnearest_from_dint(dint_opndB,dbl_opndA,dbl_opndB) 	\
+    if (Dintp2(dint_opndB) & 1<<(DBL_EXP_LENGTH - 2))			\
+       if ((Dintp2(dint_opndB) << 34 - DBL_EXP_LENGTH) || Dlowp2(dbl_opndB))  \
+          if ((++Dallp2(dbl_opndB))==0) Dallp1(dbl_opndA)++
+
+#define Sgl_isone_roundbit(sgl_value,exponent)			\
+    ((Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) >> 31)
+
+#define Sgl_isone_stickybit(sgl_value,exponent)		\
+    (exponent < (SGL_P - 2) ?				\
+     Sall(sgl_value) << (SGL_EXP_LENGTH + 2 + exponent) : FALSE)
+
+
+/* 
+ * Double format macros
+ */
+
+#define Dbl_to_sgl_exponent(src_exponent,dest)			\
+    dest = src_exponent + (SGL_BIAS - DBL_BIAS)
+
+#define Dbl_to_sgl_mantissa(srcA,srcB,dest,inexact,guard,sticky,odd)	\
+    Shiftdouble(Dmantissap1(srcA),Dmantissap2(srcB),29,dest); 	\
+    guard = Dbit3p2(srcB);					\
+    sticky = Dallp2(srcB)<<4;					\
+    inexact = guard | sticky;					\
+    odd = Dbit2p2(srcB)
+
+#define Dbl_to_sgl_denormalized(srcA,srcB,exp,dest,inexact,guard,sticky,odd,tiny) \
+    Deposit_dexponent(srcA,1);						\
+    tiny = TRUE;							\
+    if (exp >= -2) {							\
+	if (exp == 0) {							\
+	    inexact = Dallp2(srcB) << 3;				\
+	    guard = inexact >> 31;					\
+	    sticky = inexact << 1;					\
+	    Shiftdouble(Dmantissap1(srcA),Dmantissap2(srcB),29,dest);	\
+	    odd = dest << 31;						\
+	    if (inexact) {						\
+		switch(Rounding_mode()) {				\
+		    case ROUNDPLUS:					\
+			if (Dbl_iszero_sign(srcA)) {			\
+			    dest++;					\
+			    if (Sgl_isone_hidden(dest))	\
+				tiny = FALSE;				\
+			    dest--;					\
+			}						\
+			break;						\
+		    case ROUNDMINUS:					\
+			if (Dbl_isone_sign(srcA)) {			\
+			    dest++;					\
+			    if (Sgl_isone_hidden(dest))	\
+				tiny = FALSE;				\
+			    dest--;					\
+			}						\
+			break;						\
+		    case ROUNDNEAREST:					\
+			if (guard && (sticky || odd)) {			\
+			    dest++;					\
+			    if (Sgl_isone_hidden(dest))	\
+				tiny = FALSE;				\
+			    dest--;					\
+			}						\
+			break;						\
+		}							\
+	    }								\
+		/* shift right by one to get correct result */		\
+		guard = odd;						\
+		sticky = inexact;					\
+		inexact |= guard;					\
+		dest >>= 1;						\
+    		Deposit_dsign(srcA,0);					\
+    	        Shiftdouble(Dallp1(srcA),Dallp2(srcB),30,dest);		\
+	        odd = dest << 31;					\
+	}								\
+	else {								\
+    	    inexact = Dallp2(srcB) << (2 + exp);			\
+    	    guard = inexact >> 31;					\
+    	    sticky = inexact << 1; 					\
+    	    Deposit_dsign(srcA,0);					\
+    	    if (exp == -2) dest = Dallp1(srcA);				\
+    	    else Variable_shift_double(Dallp1(srcA),Dallp2(srcB),30-exp,dest); \
+    	    odd = dest << 31;						\
+	}								\
+    }									\
+    else {								\
+    	Deposit_dsign(srcA,0);						\
+    	if (exp > (1 - SGL_P)) {					\
+    	    dest = Dallp1(srcA) >> (- 2 - exp);				\
+    	    inexact = Dallp1(srcA) << (34 + exp);			\
+    	    guard = inexact >> 31;					\
+    	    sticky = (inexact << 1) | Dallp2(srcB);			\
+    	    inexact |= Dallp2(srcB); 					\
+    	    odd = dest << 31;						\
+    	}								\
+    	else {								\
+    	    dest = 0;							\
+    	    inexact = Dallp1(srcA) | Dallp2(srcB);			\
+    	    if (exp == (1 - SGL_P)) {					\
+    	    	guard = Dhidden(srcA);					\
+    	    	sticky = Dmantissap1(srcA) | Dallp2(srcB); 		\
+    	    }								\
+    	    else {							\
+    	    	guard = 0;						\
+    	    	sticky = inexact;					\
+    	    }								\
+    	    odd = 0;							\
+    	}								\
+    }									\
+    exp = 0
+
+#define Dbl_isinexact_to_fix(dbl_valueA,dbl_valueB,exponent)		\
+    (exponent < (DBL_P-33) ? 						\
+     Dallp2(dbl_valueB) || Dallp1(dbl_valueA) << (DBL_EXP_LENGTH+1+exponent) : \
+     (exponent < (DBL_P-1) ? Dallp2(dbl_valueB) << (exponent + (33-DBL_P)) :   \
+      FALSE))
+
+#define Dbl_isoverflow_to_int(exponent,dbl_valueA,dbl_valueB)		\
+    ((exponent > SGL_FX_MAX_EXP + 1) || Dsign(dbl_valueA)==0 ||		\
+     Dmantissap1(dbl_valueA)!=0 || (Dallp2(dbl_valueB)>>21)!=0 ) 
+
+#define Dbl_isone_roundbit(dbl_valueA,dbl_valueB,exponent)              \
+    ((exponent < (DBL_P - 33) ?						\
+      Dallp1(dbl_valueA) >> ((30 - DBL_EXP_LENGTH) - exponent) :	\
+      Dallp2(dbl_valueB) >> ((DBL_P - 2) - exponent)) & 1)
+
+#define Dbl_isone_stickybit(dbl_valueA,dbl_valueB,exponent)		\
+    (exponent < (DBL_P-34) ? 						\
+     (Dallp2(dbl_valueB) || Dallp1(dbl_valueA)<<(DBL_EXP_LENGTH+2+exponent)) : \
+     (exponent<(DBL_P-2) ? (Dallp2(dbl_valueB) << (exponent + (34-DBL_P))) : \
+      FALSE))
+
+
+/* Int macros */
+
+#define Int_from_sgl_mantissa(sgl_value,exponent)	\
+    Sall(sgl_value) = 				\
+    	(unsigned)(Sall(sgl_value) << SGL_EXP_LENGTH)>>(31 - exponent)
+
+#define Int_from_dbl_mantissa(dbl_valueA,dbl_valueB,exponent)	\
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),22,Dallp1(dbl_valueA)); \
+    if (exponent < 31) Dallp1(dbl_valueA) >>= 30 - exponent;	\
+    else Dallp1(dbl_valueA) <<= 1
+
+#define Int_negate(int_value) int_value = -int_value
+
+
+/* Dint macros */
+
+#define Dint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB)	\
+    {Sall(sgl_value) <<= SGL_EXP_LENGTH;  /*  left-justify  */		\
+    if (exponent <= 31) {						\
+    	Dintp1(dresultA) = 0;						\
+    	Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \
+    }									\
+    else {								\
+    	Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent);		\
+    	Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31);		\
+    }}
+
+
+#define Dint_from_dbl_mantissa(dbl_valueA,dbl_valueB,exponent,destA,destB) \
+    {if (exponent < 32) {						\
+    	Dintp1(destA) = 0;						\
+    	if (exponent <= 20)						\
+    	    Dintp2(destB) = Dallp1(dbl_valueA) >> 20-exponent;		\
+    	else Variable_shift_double(Dallp1(dbl_valueA),Dallp2(dbl_valueB), \
+	     52-exponent,Dintp2(destB));					\
+    }									\
+    else {								\
+    	if (exponent <= 52) {						\
+    	    Dintp1(destA) = Dallp1(dbl_valueA) >> 52-exponent;		\
+	    if (exponent == 52) Dintp2(destB) = Dallp2(dbl_valueB);	\
+	    else Variable_shift_double(Dallp1(dbl_valueA),Dallp2(dbl_valueB), \
+	    52-exponent,Dintp2(destB));					\
+        }								\
+    	else {								\
+    	    Variable_shift_double(Dallp1(dbl_valueA),Dallp2(dbl_valueB), \
+	    84-exponent,Dintp1(destA));					\
+    	    Dintp2(destB) = Dallp2(dbl_valueB) << exponent-52;		\
+    	}								\
+    }}
+
+#define Dint_setzero(dresultA,dresultB) 	\
+    Dintp1(dresultA) = 0; 	\
+    Dintp2(dresultB) = 0
+
+#define Dint_setone_sign(dresultA,dresultB)		\
+    Dintp1(dresultA) = ~Dintp1(dresultA);		\
+    if ((Dintp2(dresultB) = -Dintp2(dresultB)) == 0) Dintp1(dresultA)++
+
+#define Dint_set_minint(dresultA,dresultB)		\
+    Dintp1(dresultA) = (unsigned int)1<<31;		\
+    Dintp2(dresultB) = 0
+
+#define Dint_isone_lowp2(dresultB)  (Dintp2(dresultB) & 01)
+
+#define Dint_increment(dresultA,dresultB) 		\
+    if ((++Dintp2(dresultB))==0) Dintp1(dresultA)++
+
+#define Dint_decrement(dresultA,dresultB) 		\
+    if ((Dintp2(dresultB)--)==0) Dintp1(dresultA)--
+
+#define Dint_negate(dresultA,dresultB)			\
+    Dintp1(dresultA) = ~Dintp1(dresultA);		\
+    if ((Dintp2(dresultB) = -Dintp2(dresultB))==0) Dintp1(dresultA)++
+
+#define Dint_copyfromptr(src,destA,destB) \
+     Dintp1(destA) = src->wd0;		\
+     Dintp2(destB) = src->wd1
+#define Dint_copytoptr(srcA,srcB,dest)	\
+    dest->wd0 = Dintp1(srcA);		\
+    dest->wd1 = Dintp2(srcB)
+
+
+/* other macros  */
+
+#define Find_ms_one_bit(value, position)	\
+    {						\
+	int var;				\
+	for (var=8; var >=1; var >>= 1) {	\
+	    if (value >> 32 - position)		\
+		position -= var;		\
+		else position += var;		\
+	}					\
+	if ((value >> 32 - position) == 0)	\
+	    position--;				\
+	else position -= 2;			\
+    }
+
+
+/*
+ * Unsigned int macros
+ */
+#define Duint_copyfromptr(src,destA,destB) \
+    Dint_copyfromptr(src,destA,destB)
+#define Duint_copytoptr(srcA,srcB,dest)	\
+    Dint_copytoptr(srcA,srcB,dest)
+
+#define Suint_isinexact_to_sgl(int_value) \
+    (int_value << 32 - SGL_EXP_LENGTH)
+
+#define Sgl_roundnearest_from_suint(suint_value,sgl_value)		\
+    if (suint_value & 1<<(SGL_EXP_LENGTH - 1))   /* round bit */	\
+    	if ((suint_value << 33 - SGL_EXP_LENGTH) || Slow(sgl_value))	\
+		Sall(sgl_value)++
+
+#define Duint_isinexact_to_sgl(duint_valueA,duint_valueB)	\
+    ((Duintp1(duint_valueA) << 32 - SGL_EXP_LENGTH) || Duintp2(duint_valueB))
+
+#define Sgl_roundnearest_from_duint(duint_valueA,duint_valueB,sgl_value) \
+    if (Duintp1(duint_valueA) & 1<<(SGL_EXP_LENGTH - 1))		\
+    	if ((Duintp1(duint_valueA) << 33 - SGL_EXP_LENGTH) ||		\
+    	Duintp2(duint_valueB) || Slow(sgl_value)) Sall(sgl_value)++
+
+#define Duint_isinexact_to_dbl(duint_value) 	\
+    (Duintp2(duint_value) << 32 - DBL_EXP_LENGTH)
+
+#define Dbl_roundnearest_from_duint(duint_opndB,dbl_opndA,dbl_opndB) 	\
+    if (Duintp2(duint_opndB) & 1<<(DBL_EXP_LENGTH - 1))			\
+       if ((Duintp2(duint_opndB) << 33 - DBL_EXP_LENGTH) || Dlowp2(dbl_opndB)) \
+          if ((++Dallp2(dbl_opndB))==0) Dallp1(dbl_opndA)++
+
+#define Suint_from_sgl_mantissa(src,exponent,result)	\
+    Sall(result) = (unsigned)(Sall(src) << SGL_EXP_LENGTH)>>(31 - exponent)
+
+#define Sgl_isinexact_to_unsigned(sgl_value,exponent)	\
+    Sgl_isinexact_to_fix(sgl_value,exponent)
+
+#define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB)	\
+  {Sall(sgl_value) <<= SGL_EXP_LENGTH;  /*  left-justify  */		\
+    if (exponent <= 31) {						\
+    	Dintp1(dresultA) = 0;						\
+    	Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \
+    }									\
+    else {								\
+    	Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent);		\
+    	Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31);		\
+    }									\
+    Sall(sgl_value) >>= SGL_EXP_LENGTH;  /* return to original */	\
+  }
+
+#define Duint_setzero(dresultA,dresultB) 	\
+    Dint_setzero(dresultA,dresultB)
+
+#define Duint_increment(dresultA,dresultB) Dint_increment(dresultA,dresultB) 
+
+#define Duint_isone_lowp2(dresultB)  Dint_isone_lowp2(dresultB)
+
+#define Suint_from_dbl_mantissa(srcA,srcB,exponent,dest) \
+    Shiftdouble(Dallp1(srcA),Dallp2(srcB),21,dest); \
+    dest = (unsigned)dest >> 31 - exponent
+
+#define Dbl_isinexact_to_unsigned(dbl_valueA,dbl_valueB,exponent) \
+    Dbl_isinexact_to_fix(dbl_valueA,dbl_valueB,exponent)
+
+#define Duint_from_dbl_mantissa(dbl_valueA,dbl_valueB,exponent,destA,destB) \
+    Dint_from_dbl_mantissa(dbl_valueA,dbl_valueB,exponent,destA,destB) 
diff -Nru a/arch/parisc/math-emu/dbl_float.h b/arch/parisc/math-emu/dbl_float.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dbl_float.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,847 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+/* 32-bit word grabing functions */
+#define Dbl_firstword(value) Dallp1(value)
+#define Dbl_secondword(value) Dallp2(value)
+#define Dbl_thirdword(value) dummy_location
+#define Dbl_fourthword(value) dummy_location
+
+#define Dbl_sign(object) Dsign(object)
+#define Dbl_exponent(object) Dexponent(object)
+#define Dbl_signexponent(object) Dsignexponent(object)
+#define Dbl_mantissap1(object) Dmantissap1(object)
+#define Dbl_mantissap2(object) Dmantissap2(object)
+#define Dbl_exponentmantissap1(object) Dexponentmantissap1(object)
+#define Dbl_allp1(object) Dallp1(object)
+#define Dbl_allp2(object) Dallp2(object)
+
+/* dbl_and_signs ands the sign bits of each argument and puts the result
+ * into the first argument. dbl_or_signs ors those same sign bits */
+#define Dbl_and_signs( src1dst, src2)		\
+    Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst)
+#define Dbl_or_signs( src1dst, src2)		\
+    Dallp1(src1dst) = (Dallp1(src2)&((unsigned int)1<<31)) | Dallp1(src1dst)
+
+/* The hidden bit is always the low bit of the exponent */
+#define Dbl_clear_exponent_set_hidden(srcdst) Deposit_dexponent(srcdst,1)
+#define Dbl_clear_signexponent_set_hidden(srcdst) \
+    Deposit_dsignexponent(srcdst,1)
+#define Dbl_clear_sign(srcdst) Dallp1(srcdst) &= ~((unsigned int)1<<31)
+#define Dbl_clear_signexponent(srcdst) \
+    Dallp1(srcdst) &= Dmantissap1((unsigned int)-1)
+
+/* Exponent field for doubles has already been cleared and may be
+ * included in the shift.  Here we need to generate two double width
+ * variable shifts.  The insignificant bits can be ignored.
+ *      MTSAR f(varamount)
+ *      VSHD	srcdst.high,srcdst.low => srcdst.low
+ *	VSHD	0,srcdst.high => srcdst.high 
+ * This is very difficult to model with C expressions since the shift amount
+ * could exceed 32.  */
+/* varamount must be less than 64 */
+#define Dbl_rightshift(srcdstA, srcdstB, varamount)			\
+    {if((varamount) >= 32) {						\
+        Dallp2(srcdstB) = Dallp1(srcdstA) >> (varamount-32);		\
+        Dallp1(srcdstA)=0;						\
+    }									\
+    else if(varamount > 0) {						\
+	Variable_shift_double(Dallp1(srcdstA), Dallp2(srcdstB), 	\
+	  (varamount), Dallp2(srcdstB));				\
+	Dallp1(srcdstA) >>= varamount;					\
+    } }
+/* varamount must be less than 64 */
+#define Dbl_rightshift_exponentmantissa(srcdstA, srcdstB, varamount)	\
+    {if((varamount) >= 32) {						\
+        Dallp2(srcdstB) = Dexponentmantissap1(srcdstA) >> (varamount-32); \
+	Dallp1(srcdstA) &= ((unsigned int)1<<31);  /* clear expmant field */ \
+    }									\
+    else if(varamount > 0) {						\
+	Variable_shift_double(Dexponentmantissap1(srcdstA), Dallp2(srcdstB), \
+	(varamount), Dallp2(srcdstB));					\
+	Deposit_dexponentmantissap1(srcdstA,				\
+	    (Dexponentmantissap1(srcdstA)>>varamount));			\
+    } }
+/* varamount must be less than 64 */
+#define Dbl_leftshift(srcdstA, srcdstB, varamount)			\
+    {if((varamount) >= 32) {						\
+	Dallp1(srcdstA) = Dallp2(srcdstB) << (varamount-32);		\
+	Dallp2(srcdstB)=0;						\
+    }									\
+    else {								\
+	if ((varamount) > 0) {						\
+	    Dallp1(srcdstA) = (Dallp1(srcdstA) << (varamount)) |	\
+		(Dallp2(srcdstB) >> (32-(varamount)));			\
+	    Dallp2(srcdstB) <<= varamount;				\
+	}								\
+    } }
+#define Dbl_leftshiftby1_withextent(lefta,leftb,right,resulta,resultb)	\
+    Shiftdouble(Dallp1(lefta), Dallp2(leftb), 31, Dallp1(resulta));	\
+    Shiftdouble(Dallp2(leftb), Extall(right), 31, Dallp2(resultb)) 
+    
+#define Dbl_rightshiftby1_withextent(leftb,right,dst)		\
+    Extall(dst) = (Dallp2(leftb) << 31) | ((unsigned int)Extall(right) >> 1) | \
+		  Extlow(right)
+
+#define Dbl_arithrightshiftby1(srcdstA,srcdstB)			\
+    Shiftdouble(Dallp1(srcdstA),Dallp2(srcdstB),1,Dallp2(srcdstB));\
+    Dallp1(srcdstA) = (int)Dallp1(srcdstA) >> 1
+   
+/* Sign extend the sign bit with an integer destination */
+#define Dbl_signextendedsign(value)  Dsignedsign(value)
+
+#define Dbl_isone_hidden(dbl_value) (Is_dhidden(dbl_value)!=0)
+/* Singles and doubles may include the sign and exponent fields.  The
+ * hidden bit and the hidden overflow must be included. */
+#define Dbl_increment(dbl_valueA,dbl_valueB) \
+    if( (Dallp2(dbl_valueB) += 1) == 0 )  Dallp1(dbl_valueA) += 1
+#define Dbl_increment_mantissa(dbl_valueA,dbl_valueB) \
+    if( (Dmantissap2(dbl_valueB) += 1) == 0 )  \
+    Deposit_dmantissap1(dbl_valueA,dbl_valueA+1)
+#define Dbl_decrement(dbl_valueA,dbl_valueB) \
+    if( Dallp2(dbl_valueB) == 0 )  Dallp1(dbl_valueA) -= 1; \
+    Dallp2(dbl_valueB) -= 1
+
+#define Dbl_isone_sign(dbl_value) (Is_dsign(dbl_value)!=0)
+#define Dbl_isone_hiddenoverflow(dbl_value) (Is_dhiddenoverflow(dbl_value)!=0)
+#define Dbl_isone_lowmantissap1(dbl_valueA) (Is_dlowp1(dbl_valueA)!=0)
+#define Dbl_isone_lowmantissap2(dbl_valueB) (Is_dlowp2(dbl_valueB)!=0)
+#define Dbl_isone_signaling(dbl_value) (Is_dsignaling(dbl_value)!=0)
+#define Dbl_is_signalingnan(dbl_value) (Dsignalingnan(dbl_value)==0xfff)
+#define Dbl_isnotzero(dbl_valueA,dbl_valueB) \
+    (Dallp1(dbl_valueA) || Dallp2(dbl_valueB))
+#define Dbl_isnotzero_hiddenhigh7mantissa(dbl_value) \
+    (Dhiddenhigh7mantissa(dbl_value)!=0)
+#define Dbl_isnotzero_exponent(dbl_value) (Dexponent(dbl_value)!=0)
+#define Dbl_isnotzero_mantissa(dbl_valueA,dbl_valueB) \
+    (Dmantissap1(dbl_valueA) || Dmantissap2(dbl_valueB))
+#define Dbl_isnotzero_mantissap1(dbl_valueA) (Dmantissap1(dbl_valueA)!=0)
+#define Dbl_isnotzero_mantissap2(dbl_valueB) (Dmantissap2(dbl_valueB)!=0)
+#define Dbl_isnotzero_exponentmantissa(dbl_valueA,dbl_valueB) \
+    (Dexponentmantissap1(dbl_valueA) || Dmantissap2(dbl_valueB))
+#define Dbl_isnotzero_low4p2(dbl_value) (Dlow4p2(dbl_value)!=0)
+#define Dbl_iszero(dbl_valueA,dbl_valueB) (Dallp1(dbl_valueA)==0 && \
+    Dallp2(dbl_valueB)==0)
+#define Dbl_iszero_allp1(dbl_value) (Dallp1(dbl_value)==0)
+#define Dbl_iszero_allp2(dbl_value) (Dallp2(dbl_value)==0)
+#define Dbl_iszero_hidden(dbl_value) (Is_dhidden(dbl_value)==0)
+#define Dbl_iszero_hiddenoverflow(dbl_value) (Is_dhiddenoverflow(dbl_value)==0)
+#define Dbl_iszero_hiddenhigh3mantissa(dbl_value) \
+    (Dhiddenhigh3mantissa(dbl_value)==0)
+#define Dbl_iszero_hiddenhigh7mantissa(dbl_value) \
+    (Dhiddenhigh7mantissa(dbl_value)==0)
+#define Dbl_iszero_sign(dbl_value) (Is_dsign(dbl_value)==0)
+#define Dbl_iszero_exponent(dbl_value) (Dexponent(dbl_value)==0)
+#define Dbl_iszero_mantissa(dbl_valueA,dbl_valueB) \
+    (Dmantissap1(dbl_valueA)==0 && Dmantissap2(dbl_valueB)==0)
+#define Dbl_iszero_exponentmantissa(dbl_valueA,dbl_valueB) \
+    (Dexponentmantissap1(dbl_valueA)==0 && Dmantissap2(dbl_valueB)==0)
+#define Dbl_isinfinity_exponent(dbl_value)		\
+    (Dexponent(dbl_value)==DBL_INFINITY_EXPONENT)
+#define Dbl_isnotinfinity_exponent(dbl_value)		\
+    (Dexponent(dbl_value)!=DBL_INFINITY_EXPONENT)
+#define Dbl_isinfinity(dbl_valueA,dbl_valueB)			\
+    (Dexponent(dbl_valueA)==DBL_INFINITY_EXPONENT &&	\
+    Dmantissap1(dbl_valueA)==0 && Dmantissap2(dbl_valueB)==0)
+#define Dbl_isnan(dbl_valueA,dbl_valueB)		\
+    (Dexponent(dbl_valueA)==DBL_INFINITY_EXPONENT &&	\
+    (Dmantissap1(dbl_valueA)!=0 || Dmantissap2(dbl_valueB)!=0))
+#define Dbl_isnotnan(dbl_valueA,dbl_valueB)		\
+    (Dexponent(dbl_valueA)!=DBL_INFINITY_EXPONENT ||	\
+    (Dmantissap1(dbl_valueA)==0 && Dmantissap2(dbl_valueB)==0))
+
+#define Dbl_islessthan(dbl_op1a,dbl_op1b,dbl_op2a,dbl_op2b)	\
+    (Dallp1(dbl_op1a) < Dallp1(dbl_op2a) ||			\
+     (Dallp1(dbl_op1a) == Dallp1(dbl_op2a) &&			\
+      Dallp2(dbl_op1b) < Dallp2(dbl_op2b)))
+#define Dbl_isgreaterthan(dbl_op1a,dbl_op1b,dbl_op2a,dbl_op2b)	\
+    (Dallp1(dbl_op1a) > Dallp1(dbl_op2a) ||			\
+     (Dallp1(dbl_op1a) == Dallp1(dbl_op2a) &&			\
+      Dallp2(dbl_op1b) > Dallp2(dbl_op2b)))
+#define Dbl_isnotlessthan(dbl_op1a,dbl_op1b,dbl_op2a,dbl_op2b)	\
+    (Dallp1(dbl_op1a) > Dallp1(dbl_op2a) ||			\
+     (Dallp1(dbl_op1a) == Dallp1(dbl_op2a) &&			\
+      Dallp2(dbl_op1b) >= Dallp2(dbl_op2b)))
+#define Dbl_isnotgreaterthan(dbl_op1a,dbl_op1b,dbl_op2a,dbl_op2b) \
+    (Dallp1(dbl_op1a) < Dallp1(dbl_op2a) ||			\
+     (Dallp1(dbl_op1a) == Dallp1(dbl_op2a) &&			\
+      Dallp2(dbl_op1b) <= Dallp2(dbl_op2b)))
+#define Dbl_isequal(dbl_op1a,dbl_op1b,dbl_op2a,dbl_op2b)	\
+     ((Dallp1(dbl_op1a) == Dallp1(dbl_op2a)) &&			\
+      (Dallp2(dbl_op1b) == Dallp2(dbl_op2b)))
+
+#define Dbl_leftshiftby8(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),24,Dallp1(dbl_valueA)); \
+    Dallp2(dbl_valueB) <<= 8
+#define Dbl_leftshiftby7(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),25,Dallp1(dbl_valueA)); \
+    Dallp2(dbl_valueB) <<= 7
+#define Dbl_leftshiftby4(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),28,Dallp1(dbl_valueA)); \
+    Dallp2(dbl_valueB) <<= 4
+#define Dbl_leftshiftby3(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),29,Dallp1(dbl_valueA)); \
+    Dallp2(dbl_valueB) <<= 3
+#define Dbl_leftshiftby2(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),30,Dallp1(dbl_valueA)); \
+    Dallp2(dbl_valueB) <<= 2
+#define Dbl_leftshiftby1(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),31,Dallp1(dbl_valueA)); \
+    Dallp2(dbl_valueB) <<= 1
+
+#define Dbl_rightshiftby8(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),8,Dallp2(dbl_valueB)); \
+    Dallp1(dbl_valueA) >>= 8
+#define Dbl_rightshiftby4(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),4,Dallp2(dbl_valueB)); \
+    Dallp1(dbl_valueA) >>= 4
+#define Dbl_rightshiftby2(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),2,Dallp2(dbl_valueB)); \
+    Dallp1(dbl_valueA) >>= 2
+#define Dbl_rightshiftby1(dbl_valueA,dbl_valueB) \
+    Shiftdouble(Dallp1(dbl_valueA),Dallp2(dbl_valueB),1,Dallp2(dbl_valueB)); \
+    Dallp1(dbl_valueA) >>= 1
+    
+/* This magnitude comparison uses the signless first words and
+ * the regular part2 words.  The comparison is graphically:
+ *
+ *       1st greater?  -------------
+ *                                 |
+ *       1st less?-----------------+---------
+ *                                 |        |
+ *       2nd greater or equal----->|        |
+ *                               False     True
+ */
+#define Dbl_ismagnitudeless(leftB,rightB,signlessleft,signlessright)	\
+      ((signlessleft <= signlessright) &&				\
+       ( (signlessleft < signlessright) || (Dallp2(leftB)<Dallp2(rightB)) ))
+    
+#define Dbl_copytoint_exponentmantissap1(src,dest) \
+    dest = Dexponentmantissap1(src)
+
+/* A quiet NaN has the high mantissa bit clear and at least on other (in this
+ * case the adjacent bit) bit set. */
+#define Dbl_set_quiet(dbl_value) Deposit_dhigh2mantissa(dbl_value,1)
+#define Dbl_set_exponent(dbl_value, exp) Deposit_dexponent(dbl_value,exp)
+
+#define Dbl_set_mantissa(desta,destb,valuea,valueb)	\
+    Deposit_dmantissap1(desta,valuea);			\
+    Dmantissap2(destb) = Dmantissap2(valueb)
+#define Dbl_set_mantissap1(desta,valuea)		\
+    Deposit_dmantissap1(desta,valuea)
+#define Dbl_set_mantissap2(destb,valueb)		\
+    Dmantissap2(destb) = Dmantissap2(valueb)
+
+#define Dbl_set_exponentmantissa(desta,destb,valuea,valueb)	\
+    Deposit_dexponentmantissap1(desta,valuea);			\
+    Dmantissap2(destb) = Dmantissap2(valueb)
+#define Dbl_set_exponentmantissap1(dest,value)			\
+    Deposit_dexponentmantissap1(dest,value)
+
+#define Dbl_copyfromptr(src,desta,destb) \
+    Dallp1(desta) = src->wd0;		\
+    Dallp2(destb) = src->wd1 
+#define Dbl_copytoptr(srca,srcb,dest)	\
+    dest->wd0 = Dallp1(srca);		\
+    dest->wd1 = Dallp2(srcb)
+
+/*  An infinity is represented with the max exponent and a zero mantissa */
+#define Dbl_setinfinity_exponent(dbl_value) \
+    Deposit_dexponent(dbl_value,DBL_INFINITY_EXPONENT)
+#define Dbl_setinfinity_exponentmantissa(dbl_valueA,dbl_valueB)	\
+    Deposit_dexponentmantissap1(dbl_valueA, 			\
+    (DBL_INFINITY_EXPONENT << (32-(1+DBL_EXP_LENGTH))));	\
+    Dmantissap2(dbl_valueB) = 0
+#define Dbl_setinfinitypositive(dbl_valueA,dbl_valueB)		\
+    Dallp1(dbl_valueA) 						\
+        = (DBL_INFINITY_EXPONENT << (32-(1+DBL_EXP_LENGTH)));	\
+    Dmantissap2(dbl_valueB) = 0
+#define Dbl_setinfinitynegative(dbl_valueA,dbl_valueB)		\
+    Dallp1(dbl_valueA) = ((unsigned int)1<<31) |		\
+         (DBL_INFINITY_EXPONENT << (32-(1+DBL_EXP_LENGTH)));	\
+    Dmantissap2(dbl_valueB) = 0
+#define Dbl_setinfinity(dbl_valueA,dbl_valueB,sign)		\
+    Dallp1(dbl_valueA) = ((unsigned int)sign << 31) | 		\
+	(DBL_INFINITY_EXPONENT << (32-(1+DBL_EXP_LENGTH)));	\
+    Dmantissap2(dbl_valueB) = 0
+
+#define Dbl_sethigh4bits(dbl_value, extsign) Deposit_dhigh4p1(dbl_value,extsign)
+#define Dbl_set_sign(dbl_value,sign) Deposit_dsign(dbl_value,sign)
+#define Dbl_invert_sign(dbl_value) Deposit_dsign(dbl_value,~Dsign(dbl_value))
+#define Dbl_setone_sign(dbl_value) Deposit_dsign(dbl_value,1)
+#define Dbl_setone_lowmantissap2(dbl_value) Deposit_dlowp2(dbl_value,1)
+#define Dbl_setzero_sign(dbl_value) Dallp1(dbl_value) &= 0x7fffffff
+#define Dbl_setzero_exponent(dbl_value) 		\
+    Dallp1(dbl_value) &= 0x800fffff
+#define Dbl_setzero_mantissa(dbl_valueA,dbl_valueB)	\
+    Dallp1(dbl_valueA) &= 0xfff00000; 			\
+    Dallp2(dbl_valueB) = 0
+#define Dbl_setzero_mantissap1(dbl_value) Dallp1(dbl_value) &= 0xfff00000
+#define Dbl_setzero_mantissap2(dbl_value) Dallp2(dbl_value) = 0
+#define Dbl_setzero_exponentmantissa(dbl_valueA,dbl_valueB)	\
+    Dallp1(dbl_valueA) &= 0x80000000;		\
+    Dallp2(dbl_valueB) = 0
+#define Dbl_setzero_exponentmantissap1(dbl_valueA)	\
+    Dallp1(dbl_valueA) &= 0x80000000
+#define Dbl_setzero(dbl_valueA,dbl_valueB) \
+    Dallp1(dbl_valueA) = 0; Dallp2(dbl_valueB) = 0
+#define Dbl_setzerop1(dbl_value) Dallp1(dbl_value) = 0
+#define Dbl_setzerop2(dbl_value) Dallp2(dbl_value) = 0
+#define Dbl_setnegativezero(dbl_value) \
+    Dallp1(dbl_value) = (unsigned int)1 << 31; Dallp2(dbl_value) = 0
+#define Dbl_setnegativezerop1(dbl_value) Dallp1(dbl_value) = (unsigned int)1<<31
+
+/* Use the following macro for both overflow & underflow conditions */
+#define ovfl -
+#define unfl +
+#define Dbl_setwrapped_exponent(dbl_value,exponent,op) \
+    Deposit_dexponent(dbl_value,(exponent op DBL_WRAP))
+
+#define Dbl_setlargestpositive(dbl_valueA,dbl_valueB) 			\
+    Dallp1(dbl_valueA) = ((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \
+			| ((1<<(32-(1+DBL_EXP_LENGTH))) - 1 );		\
+    Dallp2(dbl_valueB) = 0xFFFFFFFF
+#define Dbl_setlargestnegative(dbl_valueA,dbl_valueB) 			\
+    Dallp1(dbl_valueA) = ((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \
+			| ((1<<(32-(1+DBL_EXP_LENGTH))) - 1 )		\
+			| ((unsigned int)1<<31);			\
+    Dallp2(dbl_valueB) = 0xFFFFFFFF
+#define Dbl_setlargest_exponentmantissa(dbl_valueA,dbl_valueB)		\
+    Deposit_dexponentmantissap1(dbl_valueA,				\
+	(((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH)))		\
+			| ((1<<(32-(1+DBL_EXP_LENGTH))) - 1 )));	\
+    Dallp2(dbl_valueB) = 0xFFFFFFFF
+
+#define Dbl_setnegativeinfinity(dbl_valueA,dbl_valueB) 			\
+    Dallp1(dbl_valueA) = ((1<<DBL_EXP_LENGTH) | DBL_INFINITY_EXPONENT) 	\
+			 << (32-(1+DBL_EXP_LENGTH)) ; 			\
+    Dallp2(dbl_valueB) = 0
+#define Dbl_setlargest(dbl_valueA,dbl_valueB,sign)			\
+    Dallp1(dbl_valueA) = ((unsigned int)sign << 31) |			\
+         ((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) |	 	\
+	 ((1 << (32-(1+DBL_EXP_LENGTH))) - 1 );				\
+    Dallp2(dbl_valueB) = 0xFFFFFFFF
+    
+
+/* The high bit is always zero so arithmetic or logical shifts will work. */
+#define Dbl_right_align(srcdstA,srcdstB,shift,extent)			\
+    if( shift >= 32 ) 							\
+	{								\
+	/* Big shift requires examining the portion shift off 		\
+	the end to properly set inexact.  */				\
+	if(shift < 64)							\
+	    {								\
+	    if(shift > 32)						\
+		{							\
+	        Variable_shift_double(Dallp1(srcdstA),Dallp2(srcdstB),	\
+		 shift-32, Extall(extent));				\
+	        if(Dallp2(srcdstB) << 64 - (shift)) Ext_setone_low(extent); \
+	        }							\
+	    else Extall(extent) = Dallp2(srcdstB);			\
+	    Dallp2(srcdstB) = Dallp1(srcdstA) >> (shift - 32);		\
+	    }								\
+	else								\
+	    {								\
+	    Extall(extent) = Dallp1(srcdstA);				\
+	    if(Dallp2(srcdstB)) Ext_setone_low(extent);			\
+	    Dallp2(srcdstB) = 0;					\
+	    }								\
+	Dallp1(srcdstA) = 0;						\
+	}								\
+    else								\
+	{								\
+	/* Small alignment is simpler.  Extension is easily set. */	\
+	if (shift > 0)							\
+	    {								\
+	    Extall(extent) = Dallp2(srcdstB) << 32 - (shift);		\
+	    Variable_shift_double(Dallp1(srcdstA),Dallp2(srcdstB),shift, \
+	     Dallp2(srcdstB));						\
+	    Dallp1(srcdstA) >>= shift;					\
+	    }								\
+	else Extall(extent) = 0;					\
+	}
+
+/* 
+ * Here we need to shift the result right to correct for an overshift
+ * (due to the exponent becoming negative) during normalization.
+ */
+#define Dbl_fix_overshift(srcdstA,srcdstB,shift,extent)			\
+	    Extall(extent) = Dallp2(srcdstB) << 32 - (shift);		\
+	    Dallp2(srcdstB) = (Dallp1(srcdstA) << 32 - (shift)) |	\
+		(Dallp2(srcdstB) >> (shift));				\
+	    Dallp1(srcdstA) = Dallp1(srcdstA) >> shift
+
+#define Dbl_hiddenhigh3mantissa(dbl_value) Dhiddenhigh3mantissa(dbl_value)
+#define Dbl_hidden(dbl_value) Dhidden(dbl_value)
+#define Dbl_lowmantissap2(dbl_value) Dlowp2(dbl_value)
+
+/* The left argument is never smaller than the right argument */
+#define Dbl_subtract(lefta,leftb,righta,rightb,resulta,resultb)			\
+    if( Dallp2(rightb) > Dallp2(leftb) ) Dallp1(lefta)--;	\
+    Dallp2(resultb) = Dallp2(leftb) - Dallp2(rightb);		\
+    Dallp1(resulta) = Dallp1(lefta) - Dallp1(righta)
+
+/* Subtract right augmented with extension from left augmented with zeros and
+ * store into result and extension. */
+#define Dbl_subtract_withextension(lefta,leftb,righta,rightb,extent,resulta,resultb)	\
+    Dbl_subtract(lefta,leftb,righta,rightb,resulta,resultb);		\
+    if( (Extall(extent) = 0-Extall(extent)) )				\
+        {								\
+        if((Dallp2(resultb)--) == 0) Dallp1(resulta)--;			\
+        }
+
+#define Dbl_addition(lefta,leftb,righta,rightb,resulta,resultb)		\
+    /* If the sum of the low words is less than either source, then	\
+     * an overflow into the next word occurred. */			\
+    Dallp1(resulta) = Dallp1(lefta) + Dallp1(righta);			\
+    if((Dallp2(resultb) = Dallp2(leftb) + Dallp2(rightb)) < Dallp2(rightb)) \
+	Dallp1(resulta)++
+
+#define Dbl_xortointp1(left,right,result)			\
+    result = Dallp1(left) XOR Dallp1(right)
+
+#define Dbl_xorfromintp1(left,right,result)			\
+    Dallp1(result) = left XOR Dallp1(right)
+
+#define Dbl_swap_lower(left,right)				\
+    Dallp2(left)  = Dallp2(left) XOR Dallp2(right);		\
+    Dallp2(right) = Dallp2(left) XOR Dallp2(right);		\
+    Dallp2(left)  = Dallp2(left) XOR Dallp2(right)
+
+/* Need to Initialize */
+#define Dbl_makequietnan(desta,destb)					\
+    Dallp1(desta) = ((DBL_EMAX+DBL_BIAS)+1)<< (32-(1+DBL_EXP_LENGTH))	\
+                 | (1<<(32-(1+DBL_EXP_LENGTH+2)));			\
+    Dallp2(destb) = 0
+#define Dbl_makesignalingnan(desta,destb)				\
+    Dallp1(desta) = ((DBL_EMAX+DBL_BIAS)+1)<< (32-(1+DBL_EXP_LENGTH))	\
+                 | (1<<(32-(1+DBL_EXP_LENGTH+1)));			\
+    Dallp2(destb) = 0
+
+#define Dbl_normalize(dbl_opndA,dbl_opndB,exponent)			\
+	while(Dbl_iszero_hiddenhigh7mantissa(dbl_opndA)) {		\
+		Dbl_leftshiftby8(dbl_opndA,dbl_opndB);			\
+		exponent -= 8;						\
+	}								\
+	if(Dbl_iszero_hiddenhigh3mantissa(dbl_opndA)) {			\
+		Dbl_leftshiftby4(dbl_opndA,dbl_opndB);			\
+		exponent -= 4;						\
+	}								\
+	while(Dbl_iszero_hidden(dbl_opndA)) {				\
+		Dbl_leftshiftby1(dbl_opndA,dbl_opndB);			\
+		exponent -= 1;						\
+	}
+
+#define Twoword_add(src1dstA,src1dstB,src2A,src2B)		\
+	/* 							\
+	 * want this macro to generate:				\
+	 *	ADD	src1dstB,src2B,src1dstB;		\
+	 *	ADDC	src1dstA,src2A,src1dstA;		\
+	 */							\
+	if ((src1dstB) + (src2B) < (src1dstB)) Dallp1(src1dstA)++; \
+	Dallp1(src1dstA) += (src2A);				\
+	Dallp2(src1dstB) += (src2B)
+
+#define Twoword_subtract(src1dstA,src1dstB,src2A,src2B)		\
+	/* 							\
+	 * want this macro to generate:				\
+	 *	SUB	src1dstB,src2B,src1dstB;		\
+	 *	SUBB	src1dstA,src2A,src1dstA;		\
+	 */							\
+	if ((src1dstB) < (src2B)) Dallp1(src1dstA)--;		\
+	Dallp1(src1dstA) -= (src2A);				\
+	Dallp2(src1dstB) -= (src2B)
+
+#define Dbl_setoverflow(resultA,resultB)				\
+	/* set result to infinity or largest number */			\
+	switch (Rounding_mode()) {					\
+		case ROUNDPLUS:						\
+			if (Dbl_isone_sign(resultA)) {			\
+				Dbl_setlargestnegative(resultA,resultB); \
+			}						\
+			else {						\
+				Dbl_setinfinitypositive(resultA,resultB); \
+			}						\
+			break;						\
+		case ROUNDMINUS:					\
+			if (Dbl_iszero_sign(resultA)) {			\
+				Dbl_setlargestpositive(resultA,resultB); \
+			}						\
+			else {						\
+				Dbl_setinfinitynegative(resultA,resultB); \
+			}						\
+			break;						\
+		case ROUNDNEAREST:					\
+			Dbl_setinfinity_exponentmantissa(resultA,resultB); \
+			break;						\
+		case ROUNDZERO:						\
+			Dbl_setlargest_exponentmantissa(resultA,resultB); \
+	}
+
+#define Dbl_denormalize(opndp1,opndp2,exponent,guard,sticky,inexact)	\
+    Dbl_clear_signexponent_set_hidden(opndp1);				\
+    if (exponent >= (1-DBL_P)) {					\
+	if (exponent >= -31) {						\
+	    guard = (Dallp2(opndp2) >> -exponent) & 1;			\
+	    if (exponent < 0) sticky |= Dallp2(opndp2) << (32+exponent); \
+	    if (exponent > -31) {					\
+		Variable_shift_double(opndp1,opndp2,1-exponent,opndp2);	\
+		Dallp1(opndp1) >>= 1-exponent;				\
+	    }								\
+	    else {							\
+		Dallp2(opndp2) = Dallp1(opndp1);			\
+		Dbl_setzerop1(opndp1);					\
+	    }								\
+	}								\
+	else {								\
+	    guard = (Dallp1(opndp1) >> -32-exponent) & 1;		\
+	    if (exponent == -32) sticky |= Dallp2(opndp2);		\
+	    else sticky |= (Dallp2(opndp2) | Dallp1(opndp1) << 64+exponent); \
+	    Dallp2(opndp2) = Dallp1(opndp1) >> -31-exponent;		\
+	    Dbl_setzerop1(opndp1);					\
+	}								\
+	inexact = guard | sticky;					\
+    }									\
+    else {								\
+	guard = 0;							\
+	sticky |= (Dallp1(opndp1) | Dallp2(opndp2));			\
+	Dbl_setzero(opndp1,opndp2);					\
+	inexact = sticky;						\
+    }
+
+/* 
+ * The fused multiply add instructions requires a double extended format,
+ * with 106 bits of mantissa.
+ */
+#define DBLEXT_THRESHOLD 106
+
+#define Dblext_setzero(valA,valB,valC,valD)	\
+    Dextallp1(valA) = 0; Dextallp2(valB) = 0;	\
+    Dextallp3(valC) = 0; Dextallp4(valD) = 0
+
+
+#define Dblext_isnotzero_mantissap3(valC) (Dextallp3(valC)!=0)
+#define Dblext_isnotzero_mantissap4(valD) (Dextallp3(valD)!=0)
+#define Dblext_isone_lowp2(val) (Dextlowp2(val)!=0)
+#define Dblext_isone_highp3(val) (Dexthighp3(val)!=0)
+#define Dblext_isnotzero_low31p3(val) (Dextlow31p3(val)!=0)
+#define Dblext_iszero(valA,valB,valC,valD) (Dextallp1(valA)==0 && \
+    Dextallp2(valB)==0 && Dextallp3(valC)==0 && Dextallp4(valD)==0)
+
+#define Dblext_copy(srca,srcb,srcc,srcd,desta,destb,destc,destd) \
+    Dextallp1(desta) = Dextallp4(srca);	\
+    Dextallp2(destb) = Dextallp4(srcb);	\
+    Dextallp3(destc) = Dextallp4(srcc);	\
+    Dextallp4(destd) = Dextallp4(srcd)
+
+#define Dblext_swap_lower(leftp2,leftp3,leftp4,rightp2,rightp3,rightp4)  \
+    Dextallp2(leftp2)  = Dextallp2(leftp2) XOR Dextallp2(rightp2);  \
+    Dextallp2(rightp2) = Dextallp2(leftp2) XOR Dextallp2(rightp2);  \
+    Dextallp2(leftp2)  = Dextallp2(leftp2) XOR Dextallp2(rightp2);  \
+    Dextallp3(leftp3)  = Dextallp3(leftp3) XOR Dextallp3(rightp3);  \
+    Dextallp3(rightp3) = Dextallp3(leftp3) XOR Dextallp3(rightp3);  \
+    Dextallp3(leftp3)  = Dextallp3(leftp3) XOR Dextallp3(rightp3);  \
+    Dextallp4(leftp4)  = Dextallp4(leftp4) XOR Dextallp4(rightp4);  \
+    Dextallp4(rightp4) = Dextallp4(leftp4) XOR Dextallp4(rightp4);  \
+    Dextallp4(leftp4)  = Dextallp4(leftp4) XOR Dextallp4(rightp4)
+
+#define Dblext_setone_lowmantissap4(dbl_value) Deposit_dextlowp4(dbl_value,1)
+
+/* The high bit is always zero so arithmetic or logical shifts will work. */
+#define Dblext_right_align(srcdstA,srcdstB,srcdstC,srcdstD,shift) \
+  {int shiftamt, sticky;						\
+    shiftamt = shift % 32;						\
+    sticky = 0;								\
+    switch (shift/32) {							\
+     case 0: if (shiftamt > 0) {					\
+	        sticky = Dextallp4(srcdstD) << 32 - (shiftamt); 	\
+                Variable_shift_double(Dextallp3(srcdstC),		\
+		 Dextallp4(srcdstD),shiftamt,Dextallp4(srcdstD));	\
+                Variable_shift_double(Dextallp2(srcdstB),		\
+		 Dextallp3(srcdstC),shiftamt,Dextallp3(srcdstC));	\
+                Variable_shift_double(Dextallp1(srcdstA),		\
+		 Dextallp2(srcdstB),shiftamt,Dextallp2(srcdstB));	\
+	        Dextallp1(srcdstA) >>= shiftamt;			\
+	     }								\
+	     break;							\
+     case 1: if (shiftamt > 0) {					\
+                sticky = (Dextallp3(srcdstC) << 31 - shiftamt) |	\
+			 Dextallp4(srcdstD);				\
+                Variable_shift_double(Dextallp2(srcdstB),		\
+		 Dextallp3(srcdstC),shiftamt,Dextallp4(srcdstD));	\
+                Variable_shift_double(Dextallp1(srcdstA),		\
+		 Dextallp2(srcdstB),shiftamt,Dextallp3(srcdstC));	\
+	     }								\
+	     else {							\
+		sticky = Dextallp4(srcdstD);				\
+		Dextallp4(srcdstD) = Dextallp3(srcdstC);		\
+		Dextallp3(srcdstC) = Dextallp2(srcdstB);		\
+	     }								\
+	     Dextallp2(srcdstB) = Dextallp1(srcdstA) >> shiftamt;	\
+	     Dextallp1(srcdstA) = 0;					\
+	     break;							\
+     case 2: if (shiftamt > 0) {					\
+                sticky = (Dextallp2(srcdstB) << 31 - shiftamt) |	\
+			 Dextallp3(srcdstC) | Dextallp4(srcdstD);	\
+                Variable_shift_double(Dextallp1(srcdstA),		\
+		 Dextallp2(srcdstB),shiftamt,Dextallp4(srcdstD));	\
+	     }								\
+	     else {							\
+		sticky = Dextallp3(srcdstC) | Dextallp4(srcdstD);	\
+		Dextallp4(srcdstD) = Dextallp2(srcdstB);		\
+	     }								\
+	     Dextallp3(srcdstC) = Dextallp1(srcdstA) >> shiftamt;	\
+	     Dextallp1(srcdstA) = Dextallp2(srcdstB) = 0;		\
+	     break;							\
+     case 3: if (shiftamt > 0) {					\
+                sticky = (Dextallp1(srcdstA) << 31 - shiftamt) |	\
+			 Dextallp2(srcdstB) | Dextallp3(srcdstC) |	\
+			 Dextallp4(srcdstD);				\
+	     }								\
+	     else {							\
+		sticky = Dextallp2(srcdstB) | Dextallp3(srcdstC) |	\
+		    Dextallp4(srcdstD);					\
+	     }								\
+	     Dextallp4(srcdstD) = Dextallp1(srcdstA) >> shiftamt;	\
+	     Dextallp1(srcdstA) = Dextallp2(srcdstB) = 0;		\
+	     Dextallp3(srcdstC) = 0;					\
+	     break;							\
+    }									\
+    if (sticky) Dblext_setone_lowmantissap4(srcdstD);			\
+  }
+
+/* The left argument is never smaller than the right argument */
+#define Dblext_subtract(lefta,leftb,leftc,leftd,righta,rightb,rightc,rightd,resulta,resultb,resultc,resultd) \
+    if( Dextallp4(rightd) > Dextallp4(leftd) ) 			\
+	if( (Dextallp3(leftc)--) == 0)				\
+	    if( (Dextallp2(leftb)--) == 0) Dextallp1(lefta)--;	\
+    Dextallp4(resultd) = Dextallp4(leftd) - Dextallp4(rightd);	\
+    if( Dextallp3(rightc) > Dextallp3(leftc) ) 			\
+        if( (Dextallp2(leftb)--) == 0) Dextallp1(lefta)--;	\
+    Dextallp3(resultc) = Dextallp3(leftc) - Dextallp3(rightc);	\
+    if( Dextallp2(rightb) > Dextallp2(leftb) ) Dextallp1(lefta)--; \
+    Dextallp2(resultb) = Dextallp2(leftb) - Dextallp2(rightb);	\
+    Dextallp1(resulta) = Dextallp1(lefta) - Dextallp1(righta)
+
+#define Dblext_addition(lefta,leftb,leftc,leftd,righta,rightb,rightc,rightd,resulta,resultb,resultc,resultd) \
+    /* If the sum of the low words is less than either source, then \
+     * an overflow into the next word occurred. */ \
+    if ((Dextallp4(resultd) = Dextallp4(leftd)+Dextallp4(rightd)) < \
+	Dextallp4(rightd)) \
+	if((Dextallp3(resultc) = Dextallp3(leftc)+Dextallp3(rightc)+1) <= \
+	    Dextallp3(rightc)) \
+	    if((Dextallp2(resultb) = Dextallp2(leftb)+Dextallp2(rightb)+1) \
+	        <= Dextallp2(rightb))  \
+		    Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta)+1; \
+	    else Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta); \
+	else \
+	    if ((Dextallp2(resultb) = Dextallp2(leftb)+Dextallp2(rightb)) < \
+	        Dextallp2(rightb)) \
+		    Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta)+1; \
+	    else Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta); \
+    else \
+	if ((Dextallp3(resultc) = Dextallp3(leftc)+Dextallp3(rightc)) < \
+	    Dextallp3(rightc))  \
+	    if ((Dextallp2(resultb) = Dextallp2(leftb)+Dextallp2(rightb)+1) \
+	        <= Dextallp2(rightb)) \
+		    Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta)+1; \
+	    else Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta); \
+	else \
+	    if ((Dextallp2(resultb) = Dextallp2(leftb)+Dextallp2(rightb)) < \
+	        Dextallp2(rightb)) \
+		    Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta)+1; \
+	    else Dextallp1(resulta) = Dextallp1(lefta)+Dextallp1(righta)
+
+
+#define Dblext_arithrightshiftby1(srcdstA,srcdstB,srcdstC,srcdstD)	\
+    Shiftdouble(Dextallp3(srcdstC),Dextallp4(srcdstD),1,Dextallp4(srcdstD)); \
+    Shiftdouble(Dextallp2(srcdstB),Dextallp3(srcdstC),1,Dextallp3(srcdstC)); \
+    Shiftdouble(Dextallp1(srcdstA),Dextallp2(srcdstB),1,Dextallp2(srcdstB)); \
+    Dextallp1(srcdstA) = (int)Dextallp1(srcdstA) >> 1
+   
+#define Dblext_leftshiftby8(valA,valB,valC,valD) \
+    Shiftdouble(Dextallp1(valA),Dextallp2(valB),24,Dextallp1(valA)); \
+    Shiftdouble(Dextallp2(valB),Dextallp3(valC),24,Dextallp2(valB)); \
+    Shiftdouble(Dextallp3(valC),Dextallp4(valD),24,Dextallp3(valC)); \
+    Dextallp4(valD) <<= 8
+#define Dblext_leftshiftby4(valA,valB,valC,valD) \
+    Shiftdouble(Dextallp1(valA),Dextallp2(valB),28,Dextallp1(valA)); \
+    Shiftdouble(Dextallp2(valB),Dextallp3(valC),28,Dextallp2(valB)); \
+    Shiftdouble(Dextallp3(valC),Dextallp4(valD),28,Dextallp3(valC)); \
+    Dextallp4(valD) <<= 4
+#define Dblext_leftshiftby3(valA,valB,valC,valD) \
+    Shiftdouble(Dextallp1(valA),Dextallp2(valB),29,Dextallp1(valA)); \
+    Shiftdouble(Dextallp2(valB),Dextallp3(valC),29,Dextallp2(valB)); \
+    Shiftdouble(Dextallp3(valC),Dextallp4(valD),29,Dextallp3(valC)); \
+    Dextallp4(valD) <<= 3
+#define Dblext_leftshiftby2(valA,valB,valC,valD) \
+    Shiftdouble(Dextallp1(valA),Dextallp2(valB),30,Dextallp1(valA)); \
+    Shiftdouble(Dextallp2(valB),Dextallp3(valC),30,Dextallp2(valB)); \
+    Shiftdouble(Dextallp3(valC),Dextallp4(valD),30,Dextallp3(valC)); \
+    Dextallp4(valD) <<= 2
+#define Dblext_leftshiftby1(valA,valB,valC,valD) \
+    Shiftdouble(Dextallp1(valA),Dextallp2(valB),31,Dextallp1(valA)); \
+    Shiftdouble(Dextallp2(valB),Dextallp3(valC),31,Dextallp2(valB)); \
+    Shiftdouble(Dextallp3(valC),Dextallp4(valD),31,Dextallp3(valC)); \
+    Dextallp4(valD) <<= 1
+
+#define Dblext_rightshiftby4(valueA,valueB,valueC,valueD) \
+    Shiftdouble(Dextallp3(valueC),Dextallp4(valueD),4,Dextallp4(valueD)); \
+    Shiftdouble(Dextallp2(valueB),Dextallp3(valueC),4,Dextallp3(valueC)); \
+    Shiftdouble(Dextallp1(valueA),Dextallp2(valueB),4,Dextallp2(valueB)); \
+    Dextallp1(valueA) >>= 4
+#define Dblext_rightshiftby1(valueA,valueB,valueC,valueD) \
+    Shiftdouble(Dextallp3(valueC),Dextallp4(valueD),1,Dextallp4(valueD)); \
+    Shiftdouble(Dextallp2(valueB),Dextallp3(valueC),1,Dextallp3(valueC)); \
+    Shiftdouble(Dextallp1(valueA),Dextallp2(valueB),1,Dextallp2(valueB)); \
+    Dextallp1(valueA) >>= 1
+
+#define Dblext_xortointp1(left,right,result) Dbl_xortointp1(left,right,result)
+
+#define Dblext_xorfromintp1(left,right,result) \
+	Dbl_xorfromintp1(left,right,result)
+
+#define Dblext_copytoint_exponentmantissap1(src,dest) \
+	Dbl_copytoint_exponentmantissap1(src,dest)
+
+#define Dblext_ismagnitudeless(leftB,rightB,signlessleft,signlessright) \
+	Dbl_ismagnitudeless(leftB,rightB,signlessleft,signlessright)
+
+#define Dbl_copyto_dblext(src1,src2,dest1,dest2,dest3,dest4) \
+	Dextallp1(dest1) = Dallp1(src1); Dextallp2(dest2) = Dallp2(src2); \
+	Dextallp3(dest3) = 0; Dextallp4(dest4) = 0
+
+#define Dblext_set_sign(dbl_value,sign)  Dbl_set_sign(dbl_value,sign)  
+#define Dblext_clear_signexponent_set_hidden(srcdst) \
+	Dbl_clear_signexponent_set_hidden(srcdst) 
+#define Dblext_clear_signexponent(srcdst) Dbl_clear_signexponent(srcdst) 
+#define Dblext_clear_sign(srcdst) Dbl_clear_sign(srcdst) 
+#define Dblext_isone_hidden(dbl_value) Dbl_isone_hidden(dbl_value) 
+
+/*
+ * The Fourword_add() macro assumes that integers are 4 bytes in size.
+ * It will break if this is not the case.
+ */
+
+#define Fourword_add(src1dstA,src1dstB,src1dstC,src1dstD,src2A,src2B,src2C,src2D) \
+	/* 								\
+	 * want this macro to generate:					\
+	 *	ADD	src1dstD,src2D,src1dstD;			\
+	 *	ADDC	src1dstC,src2C,src1dstC;			\
+	 *	ADDC	src1dstB,src2B,src1dstB;			\
+	 *	ADDC	src1dstA,src2A,src1dstA;			\
+	 */								\
+	if ((unsigned int)(src1dstD += (src2D)) < (unsigned int)(src2D)) { \
+	   if ((unsigned int)(src1dstC += (src2C) + 1) <=		\
+	       (unsigned int)(src2C)) {					\
+	     if ((unsigned int)(src1dstB += (src2B) + 1) <=		\
+		 (unsigned int)(src2B)) src1dstA++;			\
+	   }								\
+	   else if ((unsigned int)(src1dstB += (src2B)) < 		\
+		    (unsigned int)(src2B)) src1dstA++;			\
+	}								\
+	else {								\
+	   if ((unsigned int)(src1dstC += (src2C)) <			\
+	       (unsigned int)(src2C)) {					\
+	      if ((unsigned int)(src1dstB += (src2B) + 1) <=		\
+		  (unsigned int)(src2B)) src1dstA++;			\
+	   }								\
+	   else if ((unsigned int)(src1dstB += (src2B)) <		\
+		    (unsigned int)(src2B)) src1dstA++;			\
+	}								\
+	src1dstA += (src2A)
+
+#define Dblext_denormalize(opndp1,opndp2,opndp3,opndp4,exponent,is_tiny) \
+  {int shiftamt, sticky;						\
+    is_tiny = TRUE;							\
+    if (exponent == 0 && (Dextallp3(opndp3) || Dextallp4(opndp4))) {	\
+	switch (Rounding_mode()) {					\
+	case ROUNDPLUS:							\
+		if (Dbl_iszero_sign(opndp1)) {				\
+			Dbl_increment(opndp1,opndp2);			\
+			if (Dbl_isone_hiddenoverflow(opndp1))		\
+				is_tiny = FALSE;			\
+			Dbl_decrement(opndp1,opndp2);			\
+		}							\
+		break;							\
+	case ROUNDMINUS:						\
+		if (Dbl_isone_sign(opndp1)) {				\
+			Dbl_increment(opndp1,opndp2);			\
+			if (Dbl_isone_hiddenoverflow(opndp1))		\
+				is_tiny = FALSE;			\
+			Dbl_decrement(opndp1,opndp2);			\
+		}							\
+		break;							\
+	case ROUNDNEAREST:						\
+		if (Dblext_isone_highp3(opndp3) &&			\
+		    (Dblext_isone_lowp2(opndp2) || 			\
+		     Dblext_isnotzero_low31p3(opndp3)))	{		\
+			Dbl_increment(opndp1,opndp2);			\
+			if (Dbl_isone_hiddenoverflow(opndp1))		\
+				is_tiny = FALSE;			\
+			Dbl_decrement(opndp1,opndp2);			\
+		}							\
+		break;							\
+	}								\
+    }									\
+    Dblext_clear_signexponent_set_hidden(opndp1);			\
+    if (exponent >= (1-QUAD_P)) {					\
+	shiftamt = (1-exponent) % 32;					\
+	switch((1-exponent)/32) {					\
+	  case 0: sticky = Dextallp4(opndp4) << 32-(shiftamt);		\
+		  Variableshiftdouble(opndp3,opndp4,shiftamt,opndp4);	\
+		  Variableshiftdouble(opndp2,opndp3,shiftamt,opndp3);	\
+		  Variableshiftdouble(opndp1,opndp2,shiftamt,opndp2);	\
+		  Dextallp1(opndp1) >>= shiftamt;			\
+		  break;						\
+	  case 1: sticky = (Dextallp3(opndp3) << 32-(shiftamt)) | 	\
+			   Dextallp4(opndp4);				\
+		  Variableshiftdouble(opndp2,opndp3,shiftamt,opndp4);	\
+		  Variableshiftdouble(opndp1,opndp2,shiftamt,opndp3);	\
+		  Dextallp2(opndp2) = Dextallp1(opndp1) >> shiftamt;	\
+		  Dextallp1(opndp1) = 0;				\
+		  break;						\
+	  case 2: sticky = (Dextallp2(opndp2) << 32-(shiftamt)) |	\
+			    Dextallp3(opndp3) | Dextallp4(opndp4);	\
+		  Variableshiftdouble(opndp1,opndp2,shiftamt,opndp4);	\
+		  Dextallp3(opndp3) = Dextallp1(opndp1) >> shiftamt;	\
+		  Dextallp1(opndp1) = Dextallp2(opndp2) = 0;		\
+		  break;						\
+	  case 3: sticky = (Dextallp1(opndp1) << 32-(shiftamt)) |	\
+		  	Dextallp2(opndp2) | Dextallp3(opndp3) | 	\
+			Dextallp4(opndp4);				\
+		  Dextallp4(opndp4) = Dextallp1(opndp1) >> shiftamt;	\
+		  Dextallp1(opndp1) = Dextallp2(opndp2) = 0;		\
+		  Dextallp3(opndp3) = 0;				\
+		  break;						\
+	}								\
+    }									\
+    else {								\
+	sticky = Dextallp1(opndp1) | Dextallp2(opndp2) |		\
+		 Dextallp3(opndp3) | Dextallp4(opndp4);			\
+	Dblext_setzero(opndp1,opndp2,opndp3,opndp4);			\
+    }									\
+    if (sticky) Dblext_setone_lowmantissap4(opndp4);			\
+    exponent = 0;							\
+  }
diff -Nru a/arch/parisc/math-emu/decode_exc.c b/arch/parisc/math-emu/decode_exc.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/decode_exc.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,368 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/fp/decode_exc.c		$ Revision: $
+ *
+ *  Purpose:
+ *	<<please update with a synopsis of the functionality provided by this file>>
+ *
+ *  External Interfaces:
+ *	<<the following list was autogenerated, please review>>
+ *	decode_fpu(Fpu_register, trap_counts)
+ *
+ *  Internal Interfaces:
+ *	<<please update>>
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+/* #include "types.h" */
+#include <asm/signal.h>
+#include <asm/siginfo.h>
+/* #include <machine/sys/mdep_private.h> */
+
+#undef Fpustatus_register
+#define Fpustatus_register Fpu_register[0]
+
+/* General definitions */
+#define DOESTRAP 1
+#define NOTRAP 0
+#define SIGNALCODE(signal, code) ((signal) << 24 | (code));
+#define copropbit	1<<31-2	/* bit position 2 */
+#define opclass		9	/* bits 21 & 22 */
+#define fmt		11	/* bits 19 & 20 */
+#define df		13	/* bits 17 & 18 */
+#define twobits		3	/* mask low-order 2 bits */
+#define fivebits	31	/* mask low-order 5 bits */
+#define MAX_EXCP_REG	7	/* number of excpeption registers to check */
+
+/* Exception register definitions */
+#define Excp_type(index) Exceptiontype(Fpu_register[index])
+#define Excp_instr(index) Instructionfield(Fpu_register[index])
+#define Clear_excp_register(index) Allexception(Fpu_register[index]) = 0
+#define Excp_format() \
+    (current_ir >> ((current_ir>>opclass & twobits)==1 ? df : fmt) & twobits)
+
+/* Miscellaneous definitions */
+#define Fpu_sgl(index) Fpu_register[index*2]
+
+#define Fpu_dblp1(index) Fpu_register[index*2]
+#define Fpu_dblp2(index) Fpu_register[(index*2)+1]
+
+#define Fpu_quadp1(index) Fpu_register[index*2]
+#define Fpu_quadp2(index) Fpu_register[(index*2)+1]
+#define Fpu_quadp3(index) Fpu_register[(index*2)+2]
+#define Fpu_quadp4(index) Fpu_register[(index*2)+3]
+
+/* Single precision floating-point definitions */
+#ifndef Sgl_decrement
+# define Sgl_decrement(sgl_value) Sall(sgl_value)--
+#endif
+
+/* Double precision floating-point definitions */
+#ifndef Dbl_decrement
+# define Dbl_decrement(dbl_valuep1,dbl_valuep2) \
+    if ((Dallp2(dbl_valuep2)--) == 0) Dallp1(dbl_valuep1)-- 
+#endif
+
+
+#define update_trap_counts(Fpu_register, aflags, bflags, trap_counts) {	\
+	aflags=(Fpu_register[0])>>27;	/* assumes zero fill. 32 bit */	\
+	Fpu_register[0] |= bflags;					\
+}
+
+u_int
+decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[])
+{
+    unsigned int current_ir, excp;
+    int target, exception_index = 1;
+    boolean inexact;
+    unsigned int aflags;
+    unsigned int bflags;
+    unsigned int excptype;
+
+
+    /* Keep stats on how many floating point exceptions (based on type)
+     * that happen.  Want to keep this overhead low, but still provide
+     * some information to the customer.  All exits from this routine
+     * need to restore Fpu_register[0]
+    */
+
+    bflags=(Fpu_register[0] & 0xf8000000);
+    Fpu_register[0] &= 0x07ffffff;
+
+    /* exception_index is used to index the exception register queue.  It
+     *   always points at the last register that contains a valid exception.  A
+     *   zero value implies no exceptions (also the initialized value).  Setting
+     *   the T-bit resets the exception_index to zero.
+     */
+
+    /*
+     * Check for reserved-op exception.  A reserved-op exception does not 
+     * set any exception registers nor does it set the T-bit.  If the T-bit
+     * is not set then a reserved-op exception occurred.
+     *
+     * At some point, we may want to report reserved op exceptions as
+     * illegal instructions.
+     */
+    
+    if (!Is_tbit_set()) {
+	update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+	return SIGNALCODE(SIGILL, ILL_COPROC);
+    }
+
+    /* 
+     * Is a coprocessor op. 
+     *
+     * Now we need to determine what type of exception occurred.
+     */
+    for (exception_index=1; exception_index<=MAX_EXCP_REG; exception_index++) {
+	current_ir = Excp_instr(exception_index);
+	  /*
+	   * On PA89: there are 5 different unimplemented exception
+	   * codes: 0x1, 0x9, 0xb, 0x3, and 0x23.  PA-RISC 2.0 adds
+	   * another, 0x2b.  Only these have the low order bit set.
+	   */
+	excptype = Excp_type(exception_index);
+	if (excptype & UNIMPLEMENTEDEXCEPTION) {
+		/*
+		 * Clear T-bit and exception register so that
+		 * we can tell if a trap really occurs while 
+		 * emulating the instruction.
+		 */
+		Clear_tbit();
+		Clear_excp_register(exception_index);
+		/*
+		 * Now emulate this instruction.  If a trap occurs,
+		 * fpudispatch will return a non-zero number 
+		 */
+		excp = fpudispatch(current_ir,excptype,0,Fpu_register);
+		/* accumulate the status flags, don't lose them as in hpux */
+		if (excp) {
+			/*
+			 * We now need to make sure that the T-bit and the
+			 * exception register contain the correct values
+			 * before continuing.
+			 */
+			/*
+			 * Set t-bit since it might still be needed for a
+			 * subsequent real trap (I don't understand fully -PB)
+			 */
+			Set_tbit();
+			/* some of the following code uses
+			 * Excp_type(exception_index) so fix that up */
+			Set_exceptiontype_and_instr_field(excp,current_ir,
+			 Fpu_register[exception_index]);
+			if (excp == UNIMPLEMENTEDEXCEPTION) {
+				/*
+			 	 * it is really unimplemented, so restore the
+			 	 * TIMEX extended unimplemented exception code
+			 	 */
+				excp = excptype;
+				update_trap_counts(Fpu_register, aflags, bflags, 
+					   trap_counts);
+				return SIGNALCODE(SIGILL, ILL_COPROC);
+			}
+			/* some of the following code uses excptype, so
+			 * fix that up too */
+			excptype = excp;
+		}
+		/* handle exceptions other than the real UNIMPLIMENTED the
+		 * same way as if the hardware had caused them */
+		if (excp == NOEXCEPTION)
+			/* For now use 'break', should technically be 'continue' */
+			break;
+	}
+
+	  /*
+	   * In PA89, the underflow exception has been extended to encode
+	   * additional information.  The exception looks like pp01x0,
+	   * where x is 1 if inexact and pp represent the inexact bit (I)
+	   * and the round away bit (RA)
+	   */
+	if (excptype & UNDERFLOWEXCEPTION) {
+		/* check for underflow trap enabled */
+		if (Is_underflowtrap_enabled()) {
+			update_trap_counts(Fpu_register, aflags, bflags, 
+					   trap_counts);
+			return SIGNALCODE(SIGFPE, FPE_FLTUND);
+		} else {
+		    /*
+		     * Isn't a real trap; we need to 
+		     * return the default value.
+		     */
+		    target = current_ir & fivebits;
+#ifndef lint
+		    if (Ibit(Fpu_register[exception_index])) inexact = TRUE;
+		    else inexact = FALSE;
+#endif
+		    switch (Excp_format()) {
+		      case SGL:
+		        /*
+		         * If ra (round-away) is set, will 
+		         * want to undo the rounding done
+		         * by the hardware.
+		         */
+		        if (Rabit(Fpu_register[exception_index])) 
+				Sgl_decrement(Fpu_sgl(target));
+
+			/* now denormalize */
+			sgl_denormalize(&Fpu_sgl(target),&inexact,Rounding_mode());
+		    	break;
+		      case DBL:
+		    	/*
+		    	 * If ra (round-away) is set, will 
+		    	 * want to undo the rounding done
+		    	 * by the hardware.
+		    	 */
+		    	if (Rabit(Fpu_register[exception_index])) 
+				Dbl_decrement(Fpu_dblp1(target),Fpu_dblp2(target));
+
+			/* now denormalize */
+			dbl_denormalize(&Fpu_dblp1(target),&Fpu_dblp2(target),
+			  &inexact,Rounding_mode());
+		    	break;
+		    }
+		    if (inexact) Set_underflowflag();
+		    /* 
+		     * Underflow can generate an inexact
+		     * exception.  If inexact trap is enabled,
+		     * want to do an inexact trap, otherwise 
+		     * set inexact flag.
+		     */
+		    if (inexact && Is_inexacttrap_enabled()) {
+		    	/*
+		    	 * Set exception field of exception register
+		    	 * to inexact, parm field to zero.
+			 * Underflow bit should be cleared.
+		    	 */
+		    	Set_exceptiontype(Fpu_register[exception_index],
+			 INEXACTEXCEPTION);
+			Set_parmfield(Fpu_register[exception_index],0);
+			update_trap_counts(Fpu_register, aflags, bflags, 
+					   trap_counts);
+			return SIGNALCODE(SIGFPE, FPE_FLTRES);
+		    }
+		    else {
+		    	/*
+		    	 * Exception register needs to be cleared.  
+			 * Inexact flag needs to be set if inexact.
+		    	 */
+		    	Clear_excp_register(exception_index);
+		    	if (inexact) Set_inexactflag();
+		    }
+		}
+		continue;
+	}
+	switch(Excp_type(exception_index)) {
+	  case OVERFLOWEXCEPTION:
+	  case OVERFLOWEXCEPTION | INEXACTEXCEPTION:
+		/* check for overflow trap enabled */
+			update_trap_counts(Fpu_register, aflags, bflags, 
+					   trap_counts);
+		if (Is_overflowtrap_enabled()) {
+			update_trap_counts(Fpu_register, aflags, bflags, 
+					   trap_counts);
+			return SIGNALCODE(SIGFPE, FPE_FLTOVF);
+		} else {
+			/*
+			 * Isn't a real trap; we need to 
+			 * return the default value.
+			 */
+			target = current_ir & fivebits;
+			switch (Excp_format()) {
+			  case SGL: 
+				Sgl_setoverflow(Fpu_sgl(target));
+				break;
+			  case DBL:
+				Dbl_setoverflow(Fpu_dblp1(target),Fpu_dblp2(target));
+				break;
+			}
+			Set_overflowflag();
+			/* 
+			 * Overflow always generates an inexact
+			 * exception.  If inexact trap is enabled,
+			 * want to do an inexact trap, otherwise 
+			 * set inexact flag.
+			 */
+			if (Is_inexacttrap_enabled()) {
+				/*
+				 * Set exception field of exception
+				 * register to inexact.  Overflow
+				 * bit should be cleared.
+				 */
+				Set_exceptiontype(Fpu_register[exception_index],
+				 INEXACTEXCEPTION);
+				update_trap_counts(Fpu_register, aflags, bflags,
+					   trap_counts);
+				return SIGNALCODE(SIGFPE, FPE_FLTRES);
+			}
+			else {
+				/*
+				 * Exception register needs to be cleared.  
+				 * Inexact flag needs to be set.
+				 */
+				Clear_excp_register(exception_index);
+				Set_inexactflag();
+			}
+		}
+		break;
+	  case INVALIDEXCEPTION:
+		update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+		return SIGNALCODE(SIGFPE, FPE_FLTINV);
+	  case DIVISIONBYZEROEXCEPTION:
+		update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+	  	return SIGNALCODE(SIGFPE, FPE_FLTDIV);
+	  case INEXACTEXCEPTION:
+		update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+		return SIGNALCODE(SIGFPE, FPE_FLTRES);
+	  default:
+		update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+		printk(__FILE__ "(%d) Unknown FPU exception 0x%x\n",
+			__LINE__, Excp_type(exception_index));
+		return SIGNALCODE(SIGILL, ILL_COPROC);
+	  case NOEXCEPTION:	/* no exception */
+		/*
+		 * Clear exception register in case 
+		 * other fields are non-zero.
+		 */
+		Clear_excp_register(exception_index);
+		break;
+	}
+    }
+    /*
+     * No real exceptions occurred.
+     */
+    Clear_tbit();
+    update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
+    return(NOTRAP);
+}
diff -Nru a/arch/parisc/math-emu/denormal.c b/arch/parisc/math-emu/denormal.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/denormal.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,135 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/fp/denormal.c		$ Revision: $
+ *
+ *  Purpose:
+ *	<<please update with a synopsis of the functionality provided by this file>>
+ *
+ *  External Interfaces:
+ *	<<the following list was autogenerated, please review>>
+ *	dbl_denormalize(dbl_opndp1,dbl_opndp2,inexactflag,rmode)
+ *	sgl_denormalize(sgl_opnd,inexactflag,rmode)
+ *
+ *  Internal Interfaces:
+ *	<<please update>>
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "hppa.h"
+#include "types.h"
+/* #include <machine/sys/mdep_private.h> */
+
+#undef Fpustatus_register
+#define Fpustatus_register Fpu_register[0]
+
+void
+sgl_denormalize(unsigned int *sgl_opnd, boolean *inexactflag, int rmode)
+{
+	unsigned int opnd;
+	int sign, exponent;
+	boolean guardbit = FALSE, stickybit, inexact;
+
+	opnd = *sgl_opnd;
+	stickybit = *inexactflag;
+        exponent = Sgl_exponent(opnd) - SGL_WRAP;
+        sign = Sgl_sign(opnd);
+	Sgl_denormalize(opnd,exponent,guardbit,stickybit,inexact);
+	if (inexact) {
+	    switch (rmode) {
+	      case ROUNDPLUS:
+		if (sign == 0) {
+			Sgl_increment(opnd);
+		}
+		break;
+	      case ROUNDMINUS:
+		if (sign != 0) {
+			Sgl_increment(opnd);
+		}
+		break;
+	      case ROUNDNEAREST:
+		if (guardbit && (stickybit || 
+		       Sgl_isone_lowmantissa(opnd))) {
+			   Sgl_increment(opnd);
+		}
+		break;
+	    }
+	}
+	Sgl_set_sign(opnd,sign);
+	*sgl_opnd = opnd;
+	*inexactflag = inexact;
+	return;
+}
+
+void
+dbl_denormalize(unsigned int *dbl_opndp1,
+	unsigned int * dbl_opndp2,
+	boolean *inexactflag,
+	int rmode)
+{
+	unsigned int opndp1, opndp2;
+	int sign, exponent;
+	boolean guardbit = FALSE, stickybit, inexact;
+
+	opndp1 = *dbl_opndp1;
+	opndp2 = *dbl_opndp2;
+	stickybit = *inexactflag;
+	exponent = Dbl_exponent(opndp1) - DBL_WRAP;
+	sign = Dbl_sign(opndp1);
+	Dbl_denormalize(opndp1,opndp2,exponent,guardbit,stickybit,inexact);
+	if (inexact) {
+	    switch (rmode) {
+	      case ROUNDPLUS:
+		if (sign == 0) {
+			Dbl_increment(opndp1,opndp2);
+		}
+		break;
+	      case ROUNDMINUS:
+		if (sign != 0) {
+			Dbl_increment(opndp1,opndp2);
+		}
+		break;
+	      case ROUNDNEAREST:
+		if (guardbit && (stickybit || 
+		       Dbl_isone_lowmantissap2(opndp2))) {
+			   Dbl_increment(opndp1,opndp2);
+		}
+		break;
+	    }
+	}
+	Dbl_set_sign(opndp1,sign);
+	*dbl_opndp1 = opndp1;
+	*dbl_opndp2 = opndp2;
+	*inexactflag = inexact;
+	return;
+}
diff -Nru a/arch/parisc/math-emu/dfadd.c b/arch/parisc/math-emu/dfadd.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfadd.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,524 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfadd.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double_add: add two double precision values.
+ *
+ *  External Interfaces:
+ *	dbl_fadd(leftptr, rightptr, dstptr, status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "dbl_float.h"
+
+/*
+ * Double_add: add two double precision values.
+ */
+dbl_fadd(
+    dbl_floating_point *leftptr,
+    dbl_floating_point *rightptr,
+    dbl_floating_point *dstptr,
+    unsigned int *status)
+{
+    register unsigned int signless_upper_left, signless_upper_right, save;
+    register unsigned int leftp1, leftp2, rightp1, rightp2, extent;
+    register unsigned int resultp1 = 0, resultp2 = 0;
+    
+    register int result_exponent, right_exponent, diff_exponent;
+    register int sign_save, jumpsize;
+    register boolean inexact = FALSE;
+    register boolean underflowtrap;
+        
+    /* Create local copies of the numbers */
+    Dbl_copyfromptr(leftptr,leftp1,leftp2);
+    Dbl_copyfromptr(rightptr,rightp1,rightp2);
+
+    /* A zero "save" helps discover equal operands (for later),  *
+     * and is used in swapping operands (if needed).             */
+    Dbl_xortointp1(leftp1,rightp1,/*to*/save);
+
+    /*
+     * check first operand for NaN's or infinity
+     */
+    if ((result_exponent = Dbl_exponent(leftp1)) == DBL_INFINITY_EXPONENT)
+	{
+	if (Dbl_iszero_mantissa(leftp1,leftp2)) 
+	    {
+	    if (Dbl_isnotnan(rightp1,rightp2)) 
+		{
+		if (Dbl_isinfinity(rightp1,rightp2) && save!=0) 
+		    {
+		    /* 
+		     * invalid since operands are opposite signed infinity's
+		     */
+		    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                    Set_invalidflag();
+                    Dbl_makequietnan(resultp1,resultp2);
+		    Dbl_copytoptr(resultp1,resultp2,dstptr);
+		    return(NOEXCEPTION);
+		    }
+		/*
+	 	 * return infinity
+	 	 */
+		Dbl_copytoptr(leftp1,leftp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    }
+	else 
+	    {
+            /*
+             * is NaN; signaling or quiet?
+             */
+            if (Dbl_isone_signaling(leftp1)) 
+		{
+               	/* trap if INVALIDTRAP enabled */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+        	/* make NaN quiet */
+        	Set_invalidflag();
+        	Dbl_set_quiet(leftp1);
+        	}
+	    /* 
+	     * is second operand a signaling NaN? 
+	     */
+	    else if (Dbl_is_signalingnan(rightp1)) 
+		{
+        	/* trap if INVALIDTRAP enabled */
+               	if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+		/* make NaN quiet */
+		Set_invalidflag();
+		Dbl_set_quiet(rightp1);
+		Dbl_copytoptr(rightp1,rightp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    /*
+ 	     * return quiet NaN
+ 	     */
+	    Dbl_copytoptr(leftp1,leftp2,dstptr);
+ 	    return(NOEXCEPTION);
+	    }
+	} /* End left NaN or Infinity processing */
+    /*
+     * check second operand for NaN's or infinity
+     */
+    if (Dbl_isinfinity_exponent(rightp1)) 
+	{
+	if (Dbl_iszero_mantissa(rightp1,rightp2)) 
+	    {
+	    /* return infinity */
+	    Dbl_copytoptr(rightp1,rightp2,dstptr);
+	    return(NOEXCEPTION);
+	    }
+        /*
+         * is NaN; signaling or quiet?
+         */
+        if (Dbl_isone_signaling(rightp1)) 
+	    {
+            /* trap if INVALIDTRAP enabled */
+	    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+	    /* make NaN quiet */
+	    Set_invalidflag();
+	    Dbl_set_quiet(rightp1);
+	    }
+	/*
+	 * return quiet NaN
+ 	 */
+	Dbl_copytoptr(rightp1,rightp2,dstptr);
+	return(NOEXCEPTION);
+    	} /* End right NaN or Infinity processing */
+
+    /* Invariant: Must be dealing with finite numbers */
+
+    /* Compare operands by removing the sign */
+    Dbl_copytoint_exponentmantissap1(leftp1,signless_upper_left);
+    Dbl_copytoint_exponentmantissap1(rightp1,signless_upper_right);
+
+    /* sign difference selects add or sub operation. */
+    if(Dbl_ismagnitudeless(leftp2,rightp2,signless_upper_left,signless_upper_right))
+	{
+	/* Set the left operand to the larger one by XOR swap *
+	 *  First finish the first word using "save"          */
+	Dbl_xorfromintp1(save,rightp1,/*to*/rightp1);
+	Dbl_xorfromintp1(save,leftp1,/*to*/leftp1);
+     	Dbl_swap_lower(leftp2,rightp2);
+	result_exponent = Dbl_exponent(leftp1);
+	}
+    /* Invariant:  left is not smaller than right. */ 
+
+    if((right_exponent = Dbl_exponent(rightp1)) == 0)
+        {
+	/* Denormalized operands.  First look for zeroes */
+	if(Dbl_iszero_mantissa(rightp1,rightp2)) 
+	    {
+	    /* right is zero */
+	    if(Dbl_iszero_exponentmantissa(leftp1,leftp2))
+		{
+		/* Both operands are zeros */
+		if(Is_rounding_mode(ROUNDMINUS))
+		    {
+		    Dbl_or_signs(leftp1,/*with*/rightp1);
+		    }
+		else
+		    {
+		    Dbl_and_signs(leftp1,/*with*/rightp1);
+		    }
+		}
+	    else 
+		{
+		/* Left is not a zero and must be the result.  Trapped
+		 * underflows are signaled if left is denormalized.  Result
+		 * is always exact. */
+		if( (result_exponent == 0) && Is_underflowtrap_enabled() )
+		    {
+		    /* need to normalize results mantissa */
+	    	    sign_save = Dbl_signextendedsign(leftp1);
+		    Dbl_leftshiftby1(leftp1,leftp2);
+		    Dbl_normalize(leftp1,leftp2,result_exponent);
+		    Dbl_set_sign(leftp1,/*using*/sign_save);
+                    Dbl_setwrapped_exponent(leftp1,result_exponent,unfl);
+		    Dbl_copytoptr(leftp1,leftp2,dstptr);
+		    /* inexact = FALSE */
+		    return(UNDERFLOWEXCEPTION);
+		    }
+		}
+	    Dbl_copytoptr(leftp1,leftp2,dstptr);
+	    return(NOEXCEPTION);
+	    }
+
+	/* Neither are zeroes */
+	Dbl_clear_sign(rightp1);	/* Exponent is already cleared */
+	if(result_exponent == 0 )
+	    {
+	    /* Both operands are denormalized.  The result must be exact
+	     * and is simply calculated.  A sum could become normalized and a
+	     * difference could cancel to a true zero. */
+	    if( (/*signed*/int) save < 0 )
+		{
+		Dbl_subtract(leftp1,leftp2,/*minus*/rightp1,rightp2,
+		/*into*/resultp1,resultp2);
+		if(Dbl_iszero_mantissa(resultp1,resultp2))
+		    {
+		    if(Is_rounding_mode(ROUNDMINUS))
+			{
+			Dbl_setone_sign(resultp1);
+			}
+		    else
+			{
+			Dbl_setzero_sign(resultp1);
+			}
+		    Dbl_copytoptr(resultp1,resultp2,dstptr);
+		    return(NOEXCEPTION);
+		    }
+		}
+	    else
+		{
+		Dbl_addition(leftp1,leftp2,rightp1,rightp2,
+		/*into*/resultp1,resultp2);
+		if(Dbl_isone_hidden(resultp1))
+		    {
+		    Dbl_copytoptr(resultp1,resultp2,dstptr);
+		    return(NOEXCEPTION);
+		    }
+		}
+	    if(Is_underflowtrap_enabled())
+		{
+		/* need to normalize result */
+	    	sign_save = Dbl_signextendedsign(resultp1);
+		Dbl_leftshiftby1(resultp1,resultp2);
+		Dbl_normalize(resultp1,resultp2,result_exponent);
+		Dbl_set_sign(resultp1,/*using*/sign_save);
+                Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
+	        Dbl_copytoptr(resultp1,resultp2,dstptr);
+		/* inexact = FALSE */
+	        return(UNDERFLOWEXCEPTION);
+		}
+	    Dbl_copytoptr(resultp1,resultp2,dstptr);
+	    return(NOEXCEPTION);
+	    }
+	right_exponent = 1;	/* Set exponent to reflect different bias
+				 * with denomalized numbers. */
+	}
+    else
+	{
+	Dbl_clear_signexponent_set_hidden(rightp1);
+	}
+    Dbl_clear_exponent_set_hidden(leftp1);
+    diff_exponent = result_exponent - right_exponent;
+
+    /* 
+     * Special case alignment of operands that would force alignment 
+     * beyond the extent of the extension.  A further optimization
+     * could special case this but only reduces the path length for this
+     * infrequent case.
+     */
+    if(diff_exponent > DBL_THRESHOLD)
+	{
+	diff_exponent = DBL_THRESHOLD;
+	}
+    
+    /* Align right operand by shifting to right */
+    Dbl_right_align(/*operand*/rightp1,rightp2,/*shifted by*/diff_exponent,
+    /*and lower to*/extent);
+
+    /* Treat sum and difference of the operands separately. */
+    if( (/*signed*/int) save < 0 )
+	{
+	/*
+	 * Difference of the two operands.  Their can be no overflow.  A
+	 * borrow can occur out of the hidden bit and force a post
+	 * normalization phase.
+	 */
+	Dbl_subtract_withextension(leftp1,leftp2,/*minus*/rightp1,rightp2,
+	/*with*/extent,/*into*/resultp1,resultp2);
+	if(Dbl_iszero_hidden(resultp1))
+	    {
+	    /* Handle normalization */
+	    /* A straight foward algorithm would now shift the result
+	     * and extension left until the hidden bit becomes one.  Not
+	     * all of the extension bits need participate in the shift.
+	     * Only the two most significant bits (round and guard) are
+	     * needed.  If only a single shift is needed then the guard
+	     * bit becomes a significant low order bit and the extension
+	     * must participate in the rounding.  If more than a single 
+	     * shift is needed, then all bits to the right of the guard 
+	     * bit are zeros, and the guard bit may or may not be zero. */
+	    sign_save = Dbl_signextendedsign(resultp1);
+            Dbl_leftshiftby1_withextent(resultp1,resultp2,extent,resultp1,resultp2);
+
+            /* Need to check for a zero result.  The sign and exponent
+	     * fields have already been zeroed.  The more efficient test
+	     * of the full object can be used.
+	     */
+    	    if(Dbl_iszero(resultp1,resultp2))
+		/* Must have been "x-x" or "x+(-x)". */
+		{
+		if(Is_rounding_mode(ROUNDMINUS)) Dbl_setone_sign(resultp1);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    result_exponent--;
+	    /* Look to see if normalization is finished. */
+	    if(Dbl_isone_hidden(resultp1))
+		{
+		if(result_exponent==0)
+		    {
+		    /* Denormalized, exponent should be zero.  Left operand *
+		     * was normalized, so extent (guard, round) was zero    */
+		    goto underflow;
+		    }
+		else
+		    {
+		    /* No further normalization is needed. */
+		    Dbl_set_sign(resultp1,/*using*/sign_save);
+	    	    Ext_leftshiftby1(extent);
+		    goto round;
+		    }
+		}
+
+	    /* Check for denormalized, exponent should be zero.  Left    *
+	     * operand was normalized, so extent (guard, round) was zero */
+	    if(!(underflowtrap = Is_underflowtrap_enabled()) &&
+	       result_exponent==0) goto underflow;
+
+	    /* Shift extension to complete one bit of normalization and
+	     * update exponent. */
+	    Ext_leftshiftby1(extent);
+
+	    /* Discover first one bit to determine shift amount.  Use a
+	     * modified binary search.  We have already shifted the result
+	     * one position right and still not found a one so the remainder
+	     * of the extension must be zero and simplifies rounding. */
+	    /* Scan bytes */
+	    while(Dbl_iszero_hiddenhigh7mantissa(resultp1))
+		{
+		Dbl_leftshiftby8(resultp1,resultp2);
+		if((result_exponent -= 8) <= 0  && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Now narrow it down to the nibble */
+	    if(Dbl_iszero_hiddenhigh3mantissa(resultp1))
+		{
+		/* The lower nibble contains the normalizing one */
+		Dbl_leftshiftby4(resultp1,resultp2);
+		if((result_exponent -= 4) <= 0 && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Select case were first bit is set (already normalized)
+	     * otherwise select the proper shift. */
+	    if((jumpsize = Dbl_hiddenhigh3mantissa(resultp1)) > 7)
+		{
+		/* Already normalized */
+		if(result_exponent <= 0) goto underflow;
+		Dbl_set_sign(resultp1,/*using*/sign_save);
+		Dbl_set_exponent(resultp1,/*using*/result_exponent);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    Dbl_sethigh4bits(resultp1,/*using*/sign_save);
+	    switch(jumpsize) 
+		{
+		case 1:
+		    {
+		    Dbl_leftshiftby3(resultp1,resultp2);
+		    result_exponent -= 3;
+		    break;
+		    }
+		case 2:
+		case 3:
+		    {
+		    Dbl_leftshiftby2(resultp1,resultp2);
+		    result_exponent -= 2;
+		    break;
+		    }
+		case 4:
+		case 5:
+		case 6:
+		case 7:
+		    {
+		    Dbl_leftshiftby1(resultp1,resultp2);
+		    result_exponent -= 1;
+		    break;
+		    }
+		}
+	    if(result_exponent > 0) 
+		{
+		Dbl_set_exponent(resultp1,/*using*/result_exponent);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION); 	/* Sign bit is already set */
+		}
+	    /* Fixup potential underflows */
+	  underflow:
+	    if(Is_underflowtrap_enabled())
+		{
+		Dbl_set_sign(resultp1,sign_save);
+                Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		/* inexact = FALSE */
+		return(UNDERFLOWEXCEPTION);
+		}
+	    /* 
+	     * Since we cannot get an inexact denormalized result,
+	     * we can now return.
+	     */
+	    Dbl_fix_overshift(resultp1,resultp2,(1-result_exponent),extent);
+	    Dbl_clear_signexponent(resultp1);
+	    Dbl_set_sign(resultp1,sign_save);
+	    Dbl_copytoptr(resultp1,resultp2,dstptr);
+	    return(NOEXCEPTION);
+	    } /* end if(hidden...)... */
+	/* Fall through and round */
+	} /* end if(save < 0)... */
+    else 
+	{
+	/* Add magnitudes */
+	Dbl_addition(leftp1,leftp2,rightp1,rightp2,/*to*/resultp1,resultp2);
+	if(Dbl_isone_hiddenoverflow(resultp1))
+	    {
+	    /* Prenormalization required. */
+	    Dbl_rightshiftby1_withextent(resultp2,extent,extent);
+	    Dbl_arithrightshiftby1(resultp1,resultp2);
+	    result_exponent++;
+	    } /* end if hiddenoverflow... */
+	} /* end else ...add magnitudes... */
+    
+    /* Round the result.  If the extension is all zeros,then the result is
+     * exact.  Otherwise round in the correct direction.  No underflow is
+     * possible. If a postnormalization is necessary, then the mantissa is
+     * all zeros so no shift is needed. */
+  round:
+    if(Ext_isnotzero(extent))
+	{
+	inexact = TRUE;
+	switch(Rounding_mode())
+	    {
+	    case ROUNDNEAREST: /* The default. */
+	    if(Ext_isone_sign(extent))
+		{
+		/* at least 1/2 ulp */
+		if(Ext_isnotzero_lower(extent)  ||
+		  Dbl_isone_lowmantissap2(resultp2))
+		    {
+		    /* either exactly half way and odd or more than 1/2ulp */
+		    Dbl_increment(resultp1,resultp2);
+		    }
+		}
+	    break;
+
+	    case ROUNDPLUS:
+	    if(Dbl_iszero_sign(resultp1))
+		{
+		/* Round up positive results */
+		Dbl_increment(resultp1,resultp2);
+		}
+	    break;
+	    
+	    case ROUNDMINUS:
+	    if(Dbl_isone_sign(resultp1))
+		{
+		/* Round down negative results */
+		Dbl_increment(resultp1,resultp2);
+		}
+	    
+	    case ROUNDZERO:;
+	    /* truncate is simple */
+	    } /* end switch... */
+	if(Dbl_isone_hiddenoverflow(resultp1)) result_exponent++;
+	}
+    if(result_exponent == DBL_INFINITY_EXPONENT)
+        {
+        /* Overflow */
+        if(Is_overflowtrap_enabled())
+	    {
+	    Dbl_setwrapped_exponent(resultp1,result_exponent,ovfl);
+	    Dbl_copytoptr(resultp1,resultp2,dstptr);
+	    if (inexact)
+		if (Is_inexacttrap_enabled())
+			return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+		else Set_inexactflag();
+	    return(OVERFLOWEXCEPTION);
+	    }
+        else
+	    {
+	    inexact = TRUE;
+	    Set_overflowflag();
+	    Dbl_setoverflow(resultp1,resultp2);
+	    }
+	}
+    else Dbl_set_exponent(resultp1,result_exponent);
+    Dbl_copytoptr(resultp1,resultp2,dstptr);
+    if(inexact) 
+	if(Is_inexacttrap_enabled())
+	    return(INEXACTEXCEPTION);
+	else Set_inexactflag();
+    return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/dfcmp.c b/arch/parisc/math-emu/dfcmp.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfcmp.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,181 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfcmp.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	dbl_cmp: compare two values
+ *
+ *  External Interfaces:
+ *	dbl_fcmp(leftptr, rightptr, cond, status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+
+#include "float.h"
+#include "dbl_float.h"
+    
+/*
+ * dbl_cmp: compare two values
+ */
+int
+dbl_fcmp (dbl_floating_point * leftptr, dbl_floating_point * rightptr,
+	  unsigned int cond, unsigned int *status)
+                                           
+                       /* The predicate to be tested */
+                         
+    {
+    register unsigned int leftp1, leftp2, rightp1, rightp2;
+    register int xorresult;
+        
+    /* Create local copies of the numbers */
+    Dbl_copyfromptr(leftptr,leftp1,leftp2);
+    Dbl_copyfromptr(rightptr,rightp1,rightp2);
+    /*
+     * Test for NaN
+     */
+    if(    (Dbl_exponent(leftp1) == DBL_INFINITY_EXPONENT)
+        || (Dbl_exponent(rightp1) == DBL_INFINITY_EXPONENT) )
+	{
+	/* Check if a NaN is involved.  Signal an invalid exception when 
+	 * comparing a signaling NaN or when comparing quiet NaNs and the
+	 * low bit of the condition is set */
+        if( ((Dbl_exponent(leftp1) == DBL_INFINITY_EXPONENT)
+	    && Dbl_isnotzero_mantissa(leftp1,leftp2) 
+	    && (Exception(cond) || Dbl_isone_signaling(leftp1)))
+	   ||
+	    ((Dbl_exponent(rightp1) == DBL_INFINITY_EXPONENT)
+	    && Dbl_isnotzero_mantissa(rightp1,rightp2) 
+	    && (Exception(cond) || Dbl_isone_signaling(rightp1))) )
+	    {
+	    if( Is_invalidtrap_enabled() ) {
+	    	Set_status_cbit(Unordered(cond));
+		return(INVALIDEXCEPTION);
+	    }
+	    else Set_invalidflag();
+	    Set_status_cbit(Unordered(cond));
+	    return(NOEXCEPTION);
+	    }
+	/* All the exceptional conditions are handled, now special case
+	   NaN compares */
+        else if( ((Dbl_exponent(leftp1) == DBL_INFINITY_EXPONENT)
+	    && Dbl_isnotzero_mantissa(leftp1,leftp2))
+	   ||
+	    ((Dbl_exponent(rightp1) == DBL_INFINITY_EXPONENT)
+	    && Dbl_isnotzero_mantissa(rightp1,rightp2)) )
+	    {
+	    /* NaNs always compare unordered. */
+	    Set_status_cbit(Unordered(cond));
+	    return(NOEXCEPTION);
+	    }
+	/* infinities will drop down to the normal compare mechanisms */
+	}
+    /* First compare for unequal signs => less or greater or
+     * special equal case */
+    Dbl_xortointp1(leftp1,rightp1,xorresult);
+    if( xorresult < 0 )
+        {
+        /* left negative => less, left positive => greater.
+         * equal is possible if both operands are zeros. */
+        if( Dbl_iszero_exponentmantissa(leftp1,leftp2) 
+	  && Dbl_iszero_exponentmantissa(rightp1,rightp2) )
+            {
+	    Set_status_cbit(Equal(cond));
+	    }
+	else if( Dbl_isone_sign(leftp1) )
+	    {
+	    Set_status_cbit(Lessthan(cond));
+	    }
+	else
+	    {
+	    Set_status_cbit(Greaterthan(cond));
+	    }
+        }
+    /* Signs are the same.  Treat negative numbers separately
+     * from the positives because of the reversed sense.  */
+    else if(Dbl_isequal(leftp1,leftp2,rightp1,rightp2))
+        {
+        Set_status_cbit(Equal(cond));
+        }
+    else if( Dbl_iszero_sign(leftp1) )
+        {
+        /* Positive compare */
+	if( Dbl_allp1(leftp1) < Dbl_allp1(rightp1) )
+	    {
+	    Set_status_cbit(Lessthan(cond));
+	    }
+	else if( Dbl_allp1(leftp1) > Dbl_allp1(rightp1) )
+	    {
+	    Set_status_cbit(Greaterthan(cond));
+	    }
+	else
+	    {
+	    /* Equal first parts.  Now we must use unsigned compares to
+	     * resolve the two possibilities. */
+	    if( Dbl_allp2(leftp2) < Dbl_allp2(rightp2) )
+		{
+		Set_status_cbit(Lessthan(cond));
+		}
+	    else 
+		{
+		Set_status_cbit(Greaterthan(cond));
+		}
+	    }
+	}
+    else
+        {
+        /* Negative compare.  Signed or unsigned compares
+         * both work the same.  That distinction is only
+         * important when the sign bits differ. */
+	if( Dbl_allp1(leftp1) > Dbl_allp1(rightp1) )
+	    {
+	    Set_status_cbit(Lessthan(cond));
+	    }
+	else if( Dbl_allp1(leftp1) < Dbl_allp1(rightp1) )
+	    {
+	    Set_status_cbit(Greaterthan(cond));
+	    }
+	else
+	    {
+	    /* Equal first parts.  Now we must use unsigned compares to
+	     * resolve the two possibilities. */
+	    if( Dbl_allp2(leftp2) > Dbl_allp2(rightp2) )
+		{
+		Set_status_cbit(Lessthan(cond));
+		}
+	    else 
+		{
+		Set_status_cbit(Greaterthan(cond));
+		}
+	    }
+        }
+	return(NOEXCEPTION);
+    }
diff -Nru a/arch/parisc/math-emu/dfdiv.c b/arch/parisc/math-emu/dfdiv.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfdiv.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,400 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfdiv.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double Precision Floating-point Divide
+ *
+ *  External Interfaces:
+ *	dbl_fdiv(srcptr1,srcptr2,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "dbl_float.h"
+
+/*
+ *  Double Precision Floating-point Divide
+ */
+
+int
+dbl_fdiv (dbl_floating_point * srcptr1, dbl_floating_point * srcptr2,
+	  dbl_floating_point * dstptr, unsigned int *status)
+{
+	register unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2;
+	register unsigned int opnd3p1, opnd3p2, resultp1, resultp2;
+	register int dest_exponent, count;
+	register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE;
+	boolean is_tiny;
+
+	Dbl_copyfromptr(srcptr1,opnd1p1,opnd1p2);
+	Dbl_copyfromptr(srcptr2,opnd2p1,opnd2p2);
+	/* 
+	 * set sign bit of result 
+	 */
+	if (Dbl_sign(opnd1p1) ^ Dbl_sign(opnd2p1)) 
+		Dbl_setnegativezerop1(resultp1);  
+	else Dbl_setzerop1(resultp1);
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd1p1)) {
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			if (Dbl_isnotnan(opnd2p1,opnd2p2)) {
+				if (Dbl_isinfinity(opnd2p1,opnd2p2)) {
+					/* 
+					 * invalid since both operands 
+					 * are infinity 
+					 */
+					if (Is_invalidtrap_enabled())
+                                		return(INVALIDEXCEPTION);
+                                	Set_invalidflag();
+                                	Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+				/*
+			 	 * return infinity
+			 	 */
+				Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+                	/*
+                 	 * is NaN; signaling or quiet?
+                 	 */
+                	if (Dbl_isone_signaling(opnd1p1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled())
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Dbl_set_quiet(opnd1p1);
+                	}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd2p1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled())
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Dbl_set_quiet(opnd2p1);
+				Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+                		return(NOEXCEPTION);
+			}
+                	/*
+                 	 * return quiet NaN
+                 	 */
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+                	return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd2p1)) {
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			/*
+			 * return zero
+			 */
+			Dbl_setzero_exponentmantissa(resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+                /*
+                 * is NaN; signaling or quiet?
+                 */
+                if (Dbl_isone_signaling(opnd2p1)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Dbl_set_quiet(opnd2p1);
+                }
+                /*
+                 * return quiet NaN
+                 */
+		Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+                return(NOEXCEPTION);
+	}
+        /*
+         * check for division by zero
+         */
+        if (Dbl_iszero_exponentmantissa(opnd2p1,opnd2p2)) {
+                if (Dbl_iszero_exponentmantissa(opnd1p1,opnd1p2)) {
+                        /* invalid since both operands are zero */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        Set_invalidflag();
+                        Dbl_makequietnan(resultp1,resultp2);
+                        Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        return(NOEXCEPTION);
+                }
+                if (Is_divisionbyzerotrap_enabled())
+                       	return(DIVISIONBYZEROEXCEPTION);
+                Set_divisionbyzeroflag();
+                Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+                Dbl_copytoptr(resultp1,resultp2,dstptr);
+                return(NOEXCEPTION);
+        }
+	/*
+	 * Generate exponent 
+	 */
+	dest_exponent = Dbl_exponent(opnd1p1) - Dbl_exponent(opnd2p1) + DBL_BIAS;
+
+	/*
+	 * Generate mantissa
+	 */
+	if (Dbl_isnotzero_exponent(opnd1p1)) {
+		/* set hidden bit */
+		Dbl_clear_signexponent_set_hidden(opnd1p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			Dbl_setzero_exponentmantissa(resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+                /* is denormalized, want to normalize */
+                Dbl_clear_signexponent(opnd1p1);
+                Dbl_leftshiftby1(opnd1p1,opnd1p2);
+		Dbl_normalize(opnd1p1,opnd1p2,dest_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Dbl_isnotzero_exponent(opnd2p1)) {
+		Dbl_clear_signexponent_set_hidden(opnd2p1);
+	}
+	else {
+                /* is denormalized; want to normalize */
+                Dbl_clear_signexponent(opnd2p1);
+                Dbl_leftshiftby1(opnd2p1,opnd2p2);
+                while (Dbl_iszero_hiddenhigh7mantissa(opnd2p1)) {
+                        dest_exponent+=8;
+                        Dbl_leftshiftby8(opnd2p1,opnd2p2);
+                }
+                if (Dbl_iszero_hiddenhigh3mantissa(opnd2p1)) {
+                        dest_exponent+=4;
+                        Dbl_leftshiftby4(opnd2p1,opnd2p2);
+                }
+                while (Dbl_iszero_hidden(opnd2p1)) {
+                        dest_exponent++;
+                        Dbl_leftshiftby1(opnd2p1,opnd2p2);
+                }
+	}
+
+	/* Divide the source mantissas */
+
+	/* 
+	 * A non-restoring divide algorithm is used.
+	 */
+	Twoword_subtract(opnd1p1,opnd1p2,opnd2p1,opnd2p2);
+	Dbl_setzero(opnd3p1,opnd3p2);
+	for (count=1; count <= DBL_P && (opnd1p1 || opnd1p2); count++) {
+		Dbl_leftshiftby1(opnd1p1,opnd1p2);
+		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+		if (Dbl_iszero_sign(opnd1p1)) {
+			Dbl_setone_lowmantissap2(opnd3p2);
+			Twoword_subtract(opnd1p1,opnd1p2,opnd2p1,opnd2p2);
+		}
+		else {
+			Twoword_add(opnd1p1, opnd1p2, opnd2p1, opnd2p2);
+		}
+	}
+	if (count <= DBL_P) {
+		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+		Dbl_setone_lowmantissap2(opnd3p2);
+		Dbl_leftshift(opnd3p1,opnd3p2,(DBL_P-count));
+		if (Dbl_iszero_hidden(opnd3p1)) {
+			Dbl_leftshiftby1(opnd3p1,opnd3p2);
+			dest_exponent--;
+		}
+	}
+	else {
+		if (Dbl_iszero_hidden(opnd3p1)) {
+			/* need to get one more bit of result */
+			Dbl_leftshiftby1(opnd1p1,opnd1p2);
+			Dbl_leftshiftby1(opnd3p1,opnd3p2);
+			if (Dbl_iszero_sign(opnd1p1)) {
+				Dbl_setone_lowmantissap2(opnd3p2);
+				Twoword_subtract(opnd1p1,opnd1p2,opnd2p1,opnd2p2);
+			}
+			else {
+				Twoword_add(opnd1p1,opnd1p2,opnd2p1,opnd2p2);
+			}
+			dest_exponent--;
+		}
+		if (Dbl_iszero_sign(opnd1p1)) guardbit = TRUE;
+		stickybit = Dbl_allp1(opnd1p1) || Dbl_allp2(opnd1p2);
+	}
+	inexact = guardbit | stickybit;
+
+	/* 
+	 * round result 
+	 */
+	if (inexact && (dest_exponent > 0 || Is_underflowtrap_enabled())) {
+		Dbl_clear_signexponent(opnd3p1);
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Dbl_iszero_sign(resultp1)) 
+					Dbl_increment(opnd3p1,opnd3p2);
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) 
+					Dbl_increment(opnd3p1,opnd3p2);
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Dbl_isone_lowmantissap2(opnd3p2))) {
+			      		Dbl_increment(opnd3p1,opnd3p2);
+				}
+		}
+		if (Dbl_isone_hidden(opnd3p1)) dest_exponent++;
+	}
+	Dbl_set_mantissa(resultp1,resultp2,opnd3p1,opnd3p2);
+
+        /* 
+         * Test for overflow
+         */
+	if (dest_exponent >= DBL_INFINITY_EXPONENT) {
+                /* trap if OVERFLOWTRAP enabled */
+                if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Dbl_setwrapped_exponent(resultp1,dest_exponent,ovfl);
+                        Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        if (inexact) 
+                            if (Is_inexacttrap_enabled())
+                                return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return(OVERFLOWEXCEPTION);
+                }
+		Set_overflowflag();
+                /* set result to infinity or largest number */
+		Dbl_setoverflow(resultp1,resultp2);
+		inexact = TRUE;
+	}
+        /* 
+         * Test for underflow
+         */
+	else if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Dbl_setwrapped_exponent(resultp1,dest_exponent,unfl);
+                        Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        if (inexact) 
+                            if (Is_inexacttrap_enabled())
+                                return(UNDERFLOWEXCEPTION | INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return(UNDERFLOWEXCEPTION);
+                }
+
+		/* Determine if should set underflow flag */
+		is_tiny = TRUE;
+		if (dest_exponent == 0 && inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Dbl_iszero_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+					if (Dbl_isone_hiddenoverflow(opnd3p1))
+                			    is_tiny = FALSE;
+					Dbl_decrement(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+					if (Dbl_isone_hiddenoverflow(opnd3p1))
+                			    is_tiny = FALSE;
+					Dbl_decrement(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Dbl_isone_lowmantissap2(opnd3p2))) {
+				      	Dbl_increment(opnd3p1,opnd3p2);
+					if (Dbl_isone_hiddenoverflow(opnd3p1))
+                			    is_tiny = FALSE;
+					Dbl_decrement(opnd3p1,opnd3p2);
+				}
+				break;
+			}
+		}
+
+                /*
+                 * denormalize result or set to signed zero
+                 */
+		stickybit = inexact;
+		Dbl_denormalize(opnd3p1,opnd3p2,dest_exponent,guardbit,
+		 stickybit,inexact);
+
+		/* return rounded number */ 
+		if (inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				if (Dbl_iszero_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Dbl_isone_lowmantissap2(opnd3p2))) {
+			      		Dbl_increment(opnd3p1,opnd3p2);
+				}
+				break;
+			}
+                	if (is_tiny) Set_underflowflag();
+                }
+		Dbl_set_exponentmantissa(resultp1,resultp2,opnd3p1,opnd3p2);
+	}
+	else Dbl_set_exponent(resultp1,dest_exponent);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+
+	/* check for inexact */
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/dfmpy.c b/arch/parisc/math-emu/dfmpy.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfmpy.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,394 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfmpy.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double Precision Floating-point Multiply
+ *
+ *  External Interfaces:
+ *	dbl_fmpy(srcptr1,srcptr2,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "dbl_float.h"
+
+/*
+ *  Double Precision Floating-point Multiply
+ */
+
+int
+dbl_fmpy(
+	    dbl_floating_point *srcptr1,
+	    dbl_floating_point *srcptr2,
+	    dbl_floating_point *dstptr,
+	    unsigned int *status)
+{
+	register unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2;
+	register unsigned int opnd3p1, opnd3p2, resultp1, resultp2;
+	register int dest_exponent, count;
+	register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE;
+	boolean is_tiny;
+
+	Dbl_copyfromptr(srcptr1,opnd1p1,opnd1p2);
+	Dbl_copyfromptr(srcptr2,opnd2p1,opnd2p2);
+
+	/* 
+	 * set sign bit of result 
+	 */
+	if (Dbl_sign(opnd1p1) ^ Dbl_sign(opnd2p1)) 
+		Dbl_setnegativezerop1(resultp1); 
+	else Dbl_setzerop1(resultp1);
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd1p1)) {
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			if (Dbl_isnotnan(opnd2p1,opnd2p2)) {
+				if (Dbl_iszero_exponentmantissa(opnd2p1,opnd2p2)) {
+					/* 
+					 * invalid since operands are infinity 
+					 * and zero 
+					 */
+					if (Is_invalidtrap_enabled())
+                                		return(INVALIDEXCEPTION);
+                                	Set_invalidflag();
+                                	Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+				/*
+			 	 * return infinity
+			 	 */
+				Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+                	/*
+                 	 * is NaN; signaling or quiet?
+                 	 */
+                	if (Dbl_isone_signaling(opnd1p1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Dbl_set_quiet(opnd1p1);
+                	}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd2p1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled())
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Dbl_set_quiet(opnd2p1);
+				Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+                		return(NOEXCEPTION);
+			}
+                	/*
+                 	 * return quiet NaN
+                 	 */
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+                	return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd2p1)) {
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			if (Dbl_iszero_exponentmantissa(opnd1p1,opnd1p2)) {
+				/* invalid since operands are zero & infinity */
+				if (Is_invalidtrap_enabled())
+                                	return(INVALIDEXCEPTION);
+                                Set_invalidflag();
+                                Dbl_makequietnan(opnd2p1,opnd2p2);
+				Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/*
+			 * return infinity
+			 */
+			Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+                /*
+                 * is NaN; signaling or quiet?
+                 */
+                if (Dbl_isone_signaling(opnd2p1)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Dbl_set_quiet(opnd2p1);
+                }
+                /*
+                 * return quiet NaN
+                 */
+		Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+                return(NOEXCEPTION);
+	}
+	/*
+	 * Generate exponent 
+	 */
+	dest_exponent = Dbl_exponent(opnd1p1) + Dbl_exponent(opnd2p1) -DBL_BIAS;
+
+	/*
+	 * Generate mantissa
+	 */
+	if (Dbl_isnotzero_exponent(opnd1p1)) {
+		/* set hidden bit */
+		Dbl_clear_signexponent_set_hidden(opnd1p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			Dbl_setzero_exponentmantissa(resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+                /* is denormalized, adjust exponent */
+                Dbl_clear_signexponent(opnd1p1);
+                Dbl_leftshiftby1(opnd1p1,opnd1p2);
+		Dbl_normalize(opnd1p1,opnd1p2,dest_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Dbl_isnotzero_exponent(opnd2p1)) {
+		Dbl_clear_signexponent_set_hidden(opnd2p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			Dbl_setzero_exponentmantissa(resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+                /* is denormalized; want to normalize */
+                Dbl_clear_signexponent(opnd2p1);
+                Dbl_leftshiftby1(opnd2p1,opnd2p2);
+		Dbl_normalize(opnd2p1,opnd2p2,dest_exponent);
+	}
+
+	/* Multiply two source mantissas together */
+
+	/* make room for guard bits */
+	Dbl_leftshiftby7(opnd2p1,opnd2p2);
+	Dbl_setzero(opnd3p1,opnd3p2);
+        /* 
+         * Four bits at a time are inspected in each loop, and a 
+         * simple shift and add multiply algorithm is used. 
+         */ 
+	for (count=1;count<=DBL_P;count+=4) {
+		stickybit |= Dlow4p2(opnd3p2);
+		Dbl_rightshiftby4(opnd3p1,opnd3p2);
+		if (Dbit28p2(opnd1p2)) {
+	 		/* Twoword_add should be an ADDC followed by an ADD. */
+                        Twoword_add(opnd3p1, opnd3p2, opnd2p1<<3 | opnd2p2>>29, 
+				    opnd2p2<<3);
+		}
+		if (Dbit29p2(opnd1p2)) {
+                        Twoword_add(opnd3p1, opnd3p2, opnd2p1<<2 | opnd2p2>>30, 
+				    opnd2p2<<2);
+		}
+		if (Dbit30p2(opnd1p2)) {
+                        Twoword_add(opnd3p1, opnd3p2, opnd2p1<<1 | opnd2p2>>31,
+				    opnd2p2<<1);
+		}
+		if (Dbit31p2(opnd1p2)) {
+                        Twoword_add(opnd3p1, opnd3p2, opnd2p1, opnd2p2);
+		}
+		Dbl_rightshiftby4(opnd1p1,opnd1p2);
+	}
+	if (Dbit3p1(opnd3p1)==0) {
+		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+	}
+	else {
+		/* result mantissa >= 2. */
+		dest_exponent++;
+	}
+	/* check for denormalized result */
+	while (Dbit3p1(opnd3p1)==0) {
+		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+		dest_exponent--;
+	}
+	/*
+	 * check for guard, sticky and inexact bits 
+	 */
+	stickybit |= Dallp2(opnd3p2) << 25;
+	guardbit = (Dallp2(opnd3p2) << 24) >> 31;
+	inexact = guardbit | stickybit;
+
+	/* align result mantissa */
+	Dbl_rightshiftby8(opnd3p1,opnd3p2);
+
+	/* 
+	 * round result 
+	 */
+	if (inexact && (dest_exponent>0 || Is_underflowtrap_enabled())) {
+		Dbl_clear_signexponent(opnd3p1);
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Dbl_iszero_sign(resultp1)) 
+					Dbl_increment(opnd3p1,opnd3p2);
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) 
+					Dbl_increment(opnd3p1,opnd3p2);
+				break;
+			case ROUNDNEAREST:
+				if (guardbit) {
+			   	if (stickybit || Dbl_isone_lowmantissap2(opnd3p2))
+			      	Dbl_increment(opnd3p1,opnd3p2);
+				}
+		}
+		if (Dbl_isone_hidden(opnd3p1)) dest_exponent++;
+	}
+	Dbl_set_mantissa(resultp1,resultp2,opnd3p1,opnd3p2);
+
+        /* 
+         * Test for overflow
+         */
+	if (dest_exponent >= DBL_INFINITY_EXPONENT) {
+                /* trap if OVERFLOWTRAP enabled */
+                if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+			Dbl_setwrapped_exponent(resultp1,dest_exponent,ovfl);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			if (inexact) 
+			    if (Is_inexacttrap_enabled())
+				return (OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+			    else Set_inexactflag();
+			return (OVERFLOWEXCEPTION);
+                }
+		inexact = TRUE;
+		Set_overflowflag();
+                /* set result to infinity or largest number */
+		Dbl_setoverflow(resultp1,resultp2);
+	}
+        /* 
+         * Test for underflow
+         */
+	else if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+			Dbl_setwrapped_exponent(resultp1,dest_exponent,unfl);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			if (inexact) 
+			    if (Is_inexacttrap_enabled())
+				return (UNDERFLOWEXCEPTION | INEXACTEXCEPTION);
+			    else Set_inexactflag();
+			return (UNDERFLOWEXCEPTION);
+                }
+
+		/* Determine if should set underflow flag */
+		is_tiny = TRUE;
+		if (dest_exponent == 0 && inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Dbl_iszero_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+					if (Dbl_isone_hiddenoverflow(opnd3p1))
+                			    is_tiny = FALSE;
+					Dbl_decrement(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+					if (Dbl_isone_hiddenoverflow(opnd3p1))
+                			    is_tiny = FALSE;
+					Dbl_decrement(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Dbl_isone_lowmantissap2(opnd3p2))) {
+				      	Dbl_increment(opnd3p1,opnd3p2);
+					if (Dbl_isone_hiddenoverflow(opnd3p1))
+                			    is_tiny = FALSE;
+					Dbl_decrement(opnd3p1,opnd3p2);
+				}
+				break;
+			}
+		}
+
+		/*
+		 * denormalize result or set to signed zero
+		 */
+		stickybit = inexact;
+		Dbl_denormalize(opnd3p1,opnd3p2,dest_exponent,guardbit,
+		 stickybit,inexact);
+
+		/* return zero or smallest number */
+		if (inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Dbl_iszero_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) {
+					Dbl_increment(opnd3p1,opnd3p2);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Dbl_isone_lowmantissap2(opnd3p2))) {
+			      		Dbl_increment(opnd3p1,opnd3p2);
+				}
+				break;
+			}
+                	if (is_tiny) Set_underflowflag();
+		}
+		Dbl_set_exponentmantissa(resultp1,resultp2,opnd3p1,opnd3p2);
+	}
+	else Dbl_set_exponent(resultp1,dest_exponent);
+	/* check for inexact */
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/dfrem.c b/arch/parisc/math-emu/dfrem.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfrem.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,297 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfrem.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double Precision Floating-point Remainder
+ *
+ *  External Interfaces:
+ *	dbl_frem(srcptr1,srcptr2,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+
+#include "float.h"
+#include "dbl_float.h"
+
+/*
+ *  Double Precision Floating-point Remainder
+ */
+
+int
+dbl_frem (dbl_floating_point * srcptr1, dbl_floating_point * srcptr2,
+	  dbl_floating_point * dstptr, unsigned int *status)
+{
+	register unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2;
+	register unsigned int resultp1, resultp2;
+	register int opnd1_exponent, opnd2_exponent, dest_exponent, stepcount;
+	register boolean roundup = FALSE;
+
+	Dbl_copyfromptr(srcptr1,opnd1p1,opnd1p2);
+	Dbl_copyfromptr(srcptr2,opnd2p1,opnd2p2);
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if ((opnd1_exponent = Dbl_exponent(opnd1p1)) == DBL_INFINITY_EXPONENT) {
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			if (Dbl_isnotnan(opnd2p1,opnd2p2)) {
+				/* invalid since first operand is infinity */
+				if (Is_invalidtrap_enabled()) 
+                                	return(INVALIDEXCEPTION);
+                                Set_invalidflag();
+                                Dbl_makequietnan(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+                	/*
+                 	 * is NaN; signaling or quiet?
+                 	 */
+                	if (Dbl_isone_signaling(opnd1p1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Dbl_set_quiet(opnd1p1);
+                	}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd2p1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Dbl_set_quiet(opnd2p1);
+				Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+                		return(NOEXCEPTION);
+			}
+                	/*
+                 	 * return quiet NaN
+                 	 */
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+                	return(NOEXCEPTION);
+		}
+	} 
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if ((opnd2_exponent = Dbl_exponent(opnd2p1)) == DBL_INFINITY_EXPONENT) {
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			/*
+			 * return first operand
+			 */
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+			return(NOEXCEPTION);
+		}
+                /*
+                 * is NaN; signaling or quiet?
+                 */
+                if (Dbl_isone_signaling(opnd2p1)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Dbl_set_quiet(opnd2p1);
+                }
+                /*
+                 * return quiet NaN
+                 */
+		Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+                return(NOEXCEPTION);
+	}
+	/*
+	 * check second operand for zero
+	 */
+	if (Dbl_iszero_exponentmantissa(opnd2p1,opnd2p2)) {
+		/* invalid since second operand is zero */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                Set_invalidflag();
+                Dbl_makequietnan(resultp1,resultp2);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+
+	/* 
+	 * get sign of result
+	 */
+	resultp1 = opnd1p1;  
+
+	/* 
+	 * check for denormalized operands
+	 */
+	if (opnd1_exponent == 0) {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* normalize, then continue */
+		opnd1_exponent = 1;
+		Dbl_normalize(opnd1p1,opnd1p2,opnd1_exponent);
+	}
+	else {
+		Dbl_clear_signexponent_set_hidden(opnd1p1);
+	}
+	if (opnd2_exponent == 0) {
+		/* normalize, then continue */
+		opnd2_exponent = 1;
+		Dbl_normalize(opnd2p1,opnd2p2,opnd2_exponent);
+	}
+	else {
+		Dbl_clear_signexponent_set_hidden(opnd2p1);
+	}
+
+	/* find result exponent and divide step loop count */
+	dest_exponent = opnd2_exponent - 1;
+	stepcount = opnd1_exponent - opnd2_exponent;
+
+	/*
+	 * check for opnd1/opnd2 < 1
+	 */
+	if (stepcount < 0) {
+		/*
+		 * check for opnd1/opnd2 > 1/2
+		 *
+		 * In this case n will round to 1, so 
+		 *    r = opnd1 - opnd2 
+		 */
+		if (stepcount == -1 && 
+		    Dbl_isgreaterthan(opnd1p1,opnd1p2,opnd2p1,opnd2p2)) {
+			/* set sign */
+			Dbl_allp1(resultp1) = ~Dbl_allp1(resultp1);
+			/* align opnd2 with opnd1 */
+			Dbl_leftshiftby1(opnd2p1,opnd2p2); 
+			Dbl_subtract(opnd2p1,opnd2p2,opnd1p1,opnd1p2,
+			 opnd2p1,opnd2p2);
+			/* now normalize */
+                	while (Dbl_iszero_hidden(opnd2p1)) {
+                        	Dbl_leftshiftby1(opnd2p1,opnd2p2);
+                        	dest_exponent--;
+			}
+			Dbl_set_exponentmantissa(resultp1,resultp2,opnd2p1,opnd2p2);
+			goto testforunderflow;
+		}
+		/*
+		 * opnd1/opnd2 <= 1/2
+		 *
+		 * In this case n will round to zero, so 
+		 *    r = opnd1
+		 */
+		Dbl_set_exponentmantissa(resultp1,resultp2,opnd1p1,opnd1p2);
+		dest_exponent = opnd1_exponent;
+		goto testforunderflow;
+	}
+
+	/*
+	 * Generate result
+	 *
+	 * Do iterative subtract until remainder is less than operand 2.
+	 */
+	while (stepcount-- > 0 && (Dbl_allp1(opnd1p1) || Dbl_allp2(opnd1p2))) {
+		if (Dbl_isnotlessthan(opnd1p1,opnd1p2,opnd2p1,opnd2p2)) {
+			Dbl_subtract(opnd1p1,opnd1p2,opnd2p1,opnd2p2,opnd1p1,opnd1p2);
+		}
+		Dbl_leftshiftby1(opnd1p1,opnd1p2);
+	}
+	/*
+	 * Do last subtract, then determine which way to round if remainder 
+	 * is exactly 1/2 of opnd2 
+	 */
+	if (Dbl_isnotlessthan(opnd1p1,opnd1p2,opnd2p1,opnd2p2)) {
+		Dbl_subtract(opnd1p1,opnd1p2,opnd2p1,opnd2p2,opnd1p1,opnd1p2);
+		roundup = TRUE;
+	}
+	if (stepcount > 0 || Dbl_iszero(opnd1p1,opnd1p2)) {
+		/* division is exact, remainder is zero */
+		Dbl_setzero_exponentmantissa(resultp1,resultp2);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+
+	/* 
+	 * Check for cases where opnd1/opnd2 < n 
+	 *
+	 * In this case the result's sign will be opposite that of
+	 * opnd1.  The mantissa also needs some correction.
+	 */
+	Dbl_leftshiftby1(opnd1p1,opnd1p2);
+	if (Dbl_isgreaterthan(opnd1p1,opnd1p2,opnd2p1,opnd2p2)) {
+		Dbl_invert_sign(resultp1);
+		Dbl_leftshiftby1(opnd2p1,opnd2p2);
+		Dbl_subtract(opnd2p1,opnd2p2,opnd1p1,opnd1p2,opnd1p1,opnd1p2);
+	}
+	/* check for remainder being exactly 1/2 of opnd2 */
+	else if (Dbl_isequal(opnd1p1,opnd1p2,opnd2p1,opnd2p2) && roundup) { 
+		Dbl_invert_sign(resultp1);
+	}
+
+	/* normalize result's mantissa */
+        while (Dbl_iszero_hidden(opnd1p1)) {
+                dest_exponent--;
+                Dbl_leftshiftby1(opnd1p1,opnd1p2);
+        }
+	Dbl_set_exponentmantissa(resultp1,resultp2,opnd1p1,opnd1p2);
+
+        /* 
+         * Test for underflow
+         */
+    testforunderflow:
+	if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Dbl_setwrapped_exponent(resultp1,dest_exponent,unfl);
+			/* frem is always exact */
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(UNDERFLOWEXCEPTION);
+                }
+                /*
+                 * denormalize result or set to signed zero
+                 */
+                if (dest_exponent >= (1 - DBL_P)) {
+			Dbl_rightshift_exponentmantissa(resultp1,resultp2,
+			 1-dest_exponent);
+                }
+                else {
+			Dbl_setzero_exponentmantissa(resultp1,resultp2);
+		}
+	}
+	else Dbl_set_exponent(resultp1,dest_exponent);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/dfsqrt.c b/arch/parisc/math-emu/dfsqrt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfsqrt.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,195 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfsqrt.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double Floating-point Square Root
+ *
+ *  External Interfaces:
+ *	dbl_fsqrt(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "dbl_float.h"
+
+/*
+ *  Double Floating-point Square Root
+ */
+
+/*ARGSUSED*/
+unsigned int
+dbl_fsqrt(
+	    dbl_floating_point *srcptr,
+	    unsigned int *nullptr,
+	    dbl_floating_point *dstptr,
+	    unsigned int *status)
+{
+	register unsigned int srcp1, srcp2, resultp1, resultp2;
+	register unsigned int newbitp1, newbitp2, sump1, sump2;
+	register int src_exponent;
+	register boolean guardbit = FALSE, even_exponent;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+        /*
+         * check source operand for NaN or infinity
+         */
+        if ((src_exponent = Dbl_exponent(srcp1)) == DBL_INFINITY_EXPONENT) {
+                /*
+                 * is signaling NaN?
+                 */
+                if (Dbl_isone_signaling(srcp1)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Dbl_set_quiet(srcp1);
+                }
+                /*
+                 * Return quiet NaN or positive infinity.
+		 *  Fall thru to negative test if negative infinity.
+                 */
+		if (Dbl_iszero_sign(srcp1) || 
+		    Dbl_isnotzero_mantissa(srcp1,srcp2)) {
+                	Dbl_copytoptr(srcp1,srcp2,dstptr);
+                	return(NOEXCEPTION);
+		}
+        }
+
+        /*
+         * check for zero source operand
+         */
+	if (Dbl_iszero_exponentmantissa(srcp1,srcp2)) {
+		Dbl_copytoptr(srcp1,srcp2,dstptr);
+		return(NOEXCEPTION);
+	}
+
+        /*
+         * check for negative source operand 
+         */
+	if (Dbl_isone_sign(srcp1)) {
+		/* trap if INVALIDTRAP enabled */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+		/* make NaN quiet */
+		Set_invalidflag();
+		Dbl_makequietnan(srcp1,srcp2);
+		Dbl_copytoptr(srcp1,srcp2,dstptr);
+		return(NOEXCEPTION);
+	}
+
+	/*
+	 * Generate result
+	 */
+	if (src_exponent > 0) {
+		even_exponent = Dbl_hidden(srcp1);
+		Dbl_clear_signexponent_set_hidden(srcp1);
+	}
+	else {
+		/* normalize operand */
+		Dbl_clear_signexponent(srcp1);
+		src_exponent++;
+		Dbl_normalize(srcp1,srcp2,src_exponent);
+		even_exponent = src_exponent & 1;
+	}
+	if (even_exponent) {
+		/* exponent is even */
+		/* Add comment here.  Explain why odd exponent needs correction */
+		Dbl_leftshiftby1(srcp1,srcp2);
+	}
+	/*
+	 * Add comment here.  Explain following algorithm.
+	 * 
+	 * Trust me, it works.
+	 *
+	 */
+	Dbl_setzero(resultp1,resultp2);
+	Dbl_allp1(newbitp1) = 1 << (DBL_P - 32);
+	Dbl_setzero_mantissap2(newbitp2);
+	while (Dbl_isnotzero(newbitp1,newbitp2) && Dbl_isnotzero(srcp1,srcp2)) {
+		Dbl_addition(resultp1,resultp2,newbitp1,newbitp2,sump1,sump2);
+		if(Dbl_isnotgreaterthan(sump1,sump2,srcp1,srcp2)) {
+			Dbl_leftshiftby1(newbitp1,newbitp2);
+			/* update result */
+			Dbl_addition(resultp1,resultp2,newbitp1,newbitp2,
+			 resultp1,resultp2);  
+			Dbl_subtract(srcp1,srcp2,sump1,sump2,srcp1,srcp2);
+			Dbl_rightshiftby2(newbitp1,newbitp2);
+		}
+		else {
+			Dbl_rightshiftby1(newbitp1,newbitp2);
+		}
+		Dbl_leftshiftby1(srcp1,srcp2);
+	}
+	/* correct exponent for pre-shift */
+	if (even_exponent) {
+		Dbl_rightshiftby1(resultp1,resultp2);
+	}
+
+	/* check for inexact */
+	if (Dbl_isnotzero(srcp1,srcp2)) {
+		if (!even_exponent && Dbl_islessthan(resultp1,resultp2,srcp1,srcp2)) {
+			Dbl_increment(resultp1,resultp2);
+		}
+		guardbit = Dbl_lowmantissap2(resultp2);
+		Dbl_rightshiftby1(resultp1,resultp2);
+
+		/*  now round result  */
+		switch (Rounding_mode()) {
+		case ROUNDPLUS:
+		     Dbl_increment(resultp1,resultp2);
+		     break;
+		case ROUNDNEAREST:
+		     /* stickybit is always true, so guardbit 
+		      * is enough to determine rounding */
+		     if (guardbit) {
+			    Dbl_increment(resultp1,resultp2);
+		     }
+		     break;
+		}
+		/* increment result exponent by 1 if mantissa overflowed */
+		if (Dbl_isone_hiddenoverflow(resultp1)) src_exponent+=2;
+
+		if (Is_inexacttrap_enabled()) {
+			Dbl_set_exponent(resultp1,
+			 ((src_exponent-DBL_BIAS)>>1)+DBL_BIAS);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	else {
+		Dbl_rightshiftby1(resultp1,resultp2);
+	}
+	Dbl_set_exponent(resultp1,((src_exponent-DBL_BIAS)>>1)+DBL_BIAS);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/dfsub.c b/arch/parisc/math-emu/dfsub.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/dfsub.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,526 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/dfsub.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double_subtract: subtract two double precision values.
+ *
+ *  External Interfaces:
+ *	dbl_fsub(leftptr, rightptr, dstptr, status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "dbl_float.h"
+
+/*
+ * Double_subtract: subtract two double precision values.
+ */
+int
+dbl_fsub(
+	    dbl_floating_point *leftptr,
+	    dbl_floating_point *rightptr,
+	    dbl_floating_point *dstptr,
+	    unsigned int *status)
+    {
+    register unsigned int signless_upper_left, signless_upper_right, save;
+    register unsigned int leftp1, leftp2, rightp1, rightp2, extent;
+    register unsigned int resultp1 = 0, resultp2 = 0;
+    
+    register int result_exponent, right_exponent, diff_exponent;
+    register int sign_save, jumpsize;
+    register boolean inexact = FALSE, underflowtrap;
+        
+    /* Create local copies of the numbers */
+    Dbl_copyfromptr(leftptr,leftp1,leftp2);
+    Dbl_copyfromptr(rightptr,rightp1,rightp2);
+
+    /* A zero "save" helps discover equal operands (for later),  *
+     * and is used in swapping operands (if needed).             */
+    Dbl_xortointp1(leftp1,rightp1,/*to*/save);
+
+    /*
+     * check first operand for NaN's or infinity
+     */
+    if ((result_exponent = Dbl_exponent(leftp1)) == DBL_INFINITY_EXPONENT)
+	{
+	if (Dbl_iszero_mantissa(leftp1,leftp2)) 
+	    {
+	    if (Dbl_isnotnan(rightp1,rightp2)) 
+		{
+		if (Dbl_isinfinity(rightp1,rightp2) && save==0) 
+		    {
+		    /* 
+		     * invalid since operands are same signed infinity's
+		     */
+		    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                    Set_invalidflag();
+                    Dbl_makequietnan(resultp1,resultp2);
+		    Dbl_copytoptr(resultp1,resultp2,dstptr);
+		    return(NOEXCEPTION);
+		    }
+		/*
+	 	 * return infinity
+	 	 */
+		Dbl_copytoptr(leftp1,leftp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    }
+	else 
+	    {
+            /*
+             * is NaN; signaling or quiet?
+             */
+            if (Dbl_isone_signaling(leftp1)) 
+		{
+               	/* trap if INVALIDTRAP enabled */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+        	/* make NaN quiet */
+        	Set_invalidflag();
+        	Dbl_set_quiet(leftp1);
+        	}
+	    /* 
+	     * is second operand a signaling NaN? 
+	     */
+	    else if (Dbl_is_signalingnan(rightp1)) 
+		{
+        	/* trap if INVALIDTRAP enabled */
+               	if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+		/* make NaN quiet */
+		Set_invalidflag();
+		Dbl_set_quiet(rightp1);
+		Dbl_copytoptr(rightp1,rightp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    /*
+ 	     * return quiet NaN
+ 	     */
+	    Dbl_copytoptr(leftp1,leftp2,dstptr);
+ 	    return(NOEXCEPTION);
+	    }
+	} /* End left NaN or Infinity processing */
+    /*
+     * check second operand for NaN's or infinity
+     */
+    if (Dbl_isinfinity_exponent(rightp1)) 
+	{
+	if (Dbl_iszero_mantissa(rightp1,rightp2)) 
+	    {
+	    /* return infinity */
+	    Dbl_invert_sign(rightp1);
+	    Dbl_copytoptr(rightp1,rightp2,dstptr);
+	    return(NOEXCEPTION);
+	    }
+        /*
+         * is NaN; signaling or quiet?
+         */
+        if (Dbl_isone_signaling(rightp1)) 
+	    {
+            /* trap if INVALIDTRAP enabled */
+	    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+	    /* make NaN quiet */
+	    Set_invalidflag();
+	    Dbl_set_quiet(rightp1);
+	    }
+	/*
+	 * return quiet NaN
+ 	 */
+	Dbl_copytoptr(rightp1,rightp2,dstptr);
+	return(NOEXCEPTION);
+    	} /* End right NaN or Infinity processing */
+
+    /* Invariant: Must be dealing with finite numbers */
+
+    /* Compare operands by removing the sign */
+    Dbl_copytoint_exponentmantissap1(leftp1,signless_upper_left);
+    Dbl_copytoint_exponentmantissap1(rightp1,signless_upper_right);
+
+    /* sign difference selects add or sub operation. */
+    if(Dbl_ismagnitudeless(leftp2,rightp2,signless_upper_left,signless_upper_right))
+	{
+	/* Set the left operand to the larger one by XOR swap *
+	 *  First finish the first word using "save"          */
+	Dbl_xorfromintp1(save,rightp1,/*to*/rightp1);
+	Dbl_xorfromintp1(save,leftp1,/*to*/leftp1);
+     	Dbl_swap_lower(leftp2,rightp2);
+	result_exponent = Dbl_exponent(leftp1);
+	Dbl_invert_sign(leftp1);
+	}
+    /* Invariant:  left is not smaller than right. */ 
+
+    if((right_exponent = Dbl_exponent(rightp1)) == 0)
+        {
+	/* Denormalized operands.  First look for zeroes */
+	if(Dbl_iszero_mantissa(rightp1,rightp2)) 
+	    {
+	    /* right is zero */
+	    if(Dbl_iszero_exponentmantissa(leftp1,leftp2))
+		{
+		/* Both operands are zeros */
+		Dbl_invert_sign(rightp1);
+		if(Is_rounding_mode(ROUNDMINUS))
+		    {
+		    Dbl_or_signs(leftp1,/*with*/rightp1);
+		    }
+		else
+		    {
+		    Dbl_and_signs(leftp1,/*with*/rightp1);
+		    }
+		}
+	    else 
+		{
+		/* Left is not a zero and must be the result.  Trapped
+		 * underflows are signaled if left is denormalized.  Result
+		 * is always exact. */
+		if( (result_exponent == 0) && Is_underflowtrap_enabled() )
+		    {
+		    /* need to normalize results mantissa */
+	    	    sign_save = Dbl_signextendedsign(leftp1);
+		    Dbl_leftshiftby1(leftp1,leftp2);
+		    Dbl_normalize(leftp1,leftp2,result_exponent);
+		    Dbl_set_sign(leftp1,/*using*/sign_save);
+                    Dbl_setwrapped_exponent(leftp1,result_exponent,unfl);
+		    Dbl_copytoptr(leftp1,leftp2,dstptr);
+		    /* inexact = FALSE */
+		    return(UNDERFLOWEXCEPTION);
+		    }
+		}
+	    Dbl_copytoptr(leftp1,leftp2,dstptr);
+	    return(NOEXCEPTION);
+	    }
+
+	/* Neither are zeroes */
+	Dbl_clear_sign(rightp1);	/* Exponent is already cleared */
+	if(result_exponent == 0 )
+	    {
+	    /* Both operands are denormalized.  The result must be exact
+	     * and is simply calculated.  A sum could become normalized and a
+	     * difference could cancel to a true zero. */
+	    if( (/*signed*/int) save >= 0 )
+		{
+		Dbl_subtract(leftp1,leftp2,/*minus*/rightp1,rightp2,
+		 /*into*/resultp1,resultp2);
+		if(Dbl_iszero_mantissa(resultp1,resultp2))
+		    {
+		    if(Is_rounding_mode(ROUNDMINUS))
+			{
+			Dbl_setone_sign(resultp1);
+			}
+		    else
+			{
+			Dbl_setzero_sign(resultp1);
+			}
+		    Dbl_copytoptr(resultp1,resultp2,dstptr);
+		    return(NOEXCEPTION);
+		    }
+		}
+	    else
+		{
+		Dbl_addition(leftp1,leftp2,rightp1,rightp2,
+		 /*into*/resultp1,resultp2);
+		if(Dbl_isone_hidden(resultp1))
+		    {
+		    Dbl_copytoptr(resultp1,resultp2,dstptr);
+		    return(NOEXCEPTION);
+		    }
+		}
+	    if(Is_underflowtrap_enabled())
+		{
+		/* need to normalize result */
+	    	sign_save = Dbl_signextendedsign(resultp1);
+		Dbl_leftshiftby1(resultp1,resultp2);
+		Dbl_normalize(resultp1,resultp2,result_exponent);
+		Dbl_set_sign(resultp1,/*using*/sign_save);
+                Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		/* inexact = FALSE */
+		return(UNDERFLOWEXCEPTION);
+		}
+	    Dbl_copytoptr(resultp1,resultp2,dstptr);
+	    return(NOEXCEPTION);
+	    }
+	right_exponent = 1;	/* Set exponent to reflect different bias
+				 * with denomalized numbers. */
+	}
+    else
+	{
+	Dbl_clear_signexponent_set_hidden(rightp1);
+	}
+    Dbl_clear_exponent_set_hidden(leftp1);
+    diff_exponent = result_exponent - right_exponent;
+
+    /* 
+     * Special case alignment of operands that would force alignment 
+     * beyond the extent of the extension.  A further optimization
+     * could special case this but only reduces the path length for this
+     * infrequent case.
+     */
+    if(diff_exponent > DBL_THRESHOLD)
+	{
+	diff_exponent = DBL_THRESHOLD;
+	}
+    
+    /* Align right operand by shifting to right */
+    Dbl_right_align(/*operand*/rightp1,rightp2,/*shifted by*/diff_exponent,
+     /*and lower to*/extent);
+
+    /* Treat sum and difference of the operands separately. */
+    if( (/*signed*/int) save >= 0 )
+	{
+	/*
+	 * Difference of the two operands.  Their can be no overflow.  A
+	 * borrow can occur out of the hidden bit and force a post
+	 * normalization phase.
+	 */
+	Dbl_subtract_withextension(leftp1,leftp2,/*minus*/rightp1,rightp2,
+	 /*with*/extent,/*into*/resultp1,resultp2);
+	if(Dbl_iszero_hidden(resultp1))
+	    {
+	    /* Handle normalization */
+	    /* A straight foward algorithm would now shift the result
+	     * and extension left until the hidden bit becomes one.  Not
+	     * all of the extension bits need participate in the shift.
+	     * Only the two most significant bits (round and guard) are
+	     * needed.  If only a single shift is needed then the guard
+	     * bit becomes a significant low order bit and the extension
+	     * must participate in the rounding.  If more than a single 
+	     * shift is needed, then all bits to the right of the guard 
+	     * bit are zeros, and the guard bit may or may not be zero. */
+	    sign_save = Dbl_signextendedsign(resultp1);
+            Dbl_leftshiftby1_withextent(resultp1,resultp2,extent,resultp1,resultp2);
+
+            /* Need to check for a zero result.  The sign and exponent
+	     * fields have already been zeroed.  The more efficient test
+	     * of the full object can be used.
+	     */
+    	    if(Dbl_iszero(resultp1,resultp2))
+		/* Must have been "x-x" or "x+(-x)". */
+		{
+		if(Is_rounding_mode(ROUNDMINUS)) Dbl_setone_sign(resultp1);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    result_exponent--;
+	    /* Look to see if normalization is finished. */
+	    if(Dbl_isone_hidden(resultp1))
+		{
+		if(result_exponent==0)
+		    {
+		    /* Denormalized, exponent should be zero.  Left operand *
+		     * was normalized, so extent (guard, round) was zero    */
+		    goto underflow;
+		    }
+		else
+		    {
+		    /* No further normalization is needed. */
+		    Dbl_set_sign(resultp1,/*using*/sign_save);
+	    	    Ext_leftshiftby1(extent);
+		    goto round;
+		    }
+		}
+
+	    /* Check for denormalized, exponent should be zero.  Left    *
+	     * operand was normalized, so extent (guard, round) was zero */
+	    if(!(underflowtrap = Is_underflowtrap_enabled()) &&
+	       result_exponent==0) goto underflow;
+
+	    /* Shift extension to complete one bit of normalization and
+	     * update exponent. */
+	    Ext_leftshiftby1(extent);
+
+	    /* Discover first one bit to determine shift amount.  Use a
+	     * modified binary search.  We have already shifted the result
+	     * one position right and still not found a one so the remainder
+	     * of the extension must be zero and simplifies rounding. */
+	    /* Scan bytes */
+	    while(Dbl_iszero_hiddenhigh7mantissa(resultp1))
+		{
+		Dbl_leftshiftby8(resultp1,resultp2);
+		if((result_exponent -= 8) <= 0  && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Now narrow it down to the nibble */
+	    if(Dbl_iszero_hiddenhigh3mantissa(resultp1))
+		{
+		/* The lower nibble contains the normalizing one */
+		Dbl_leftshiftby4(resultp1,resultp2);
+		if((result_exponent -= 4) <= 0 && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Select case were first bit is set (already normalized)
+	     * otherwise select the proper shift. */
+	    if((jumpsize = Dbl_hiddenhigh3mantissa(resultp1)) > 7)
+		{
+		/* Already normalized */
+		if(result_exponent <= 0) goto underflow;
+		Dbl_set_sign(resultp1,/*using*/sign_save);
+		Dbl_set_exponent(resultp1,/*using*/result_exponent);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+		}
+	    Dbl_sethigh4bits(resultp1,/*using*/sign_save);
+	    switch(jumpsize) 
+		{
+		case 1:
+		    {
+		    Dbl_leftshiftby3(resultp1,resultp2);
+		    result_exponent -= 3;
+		    break;
+		    }
+		case 2:
+		case 3:
+		    {
+		    Dbl_leftshiftby2(resultp1,resultp2);
+		    result_exponent -= 2;
+		    break;
+		    }
+		case 4:
+		case 5:
+		case 6:
+		case 7:
+		    {
+		    Dbl_leftshiftby1(resultp1,resultp2);
+		    result_exponent -= 1;
+		    break;
+		    }
+		}
+	    if(result_exponent > 0) 
+		{
+		Dbl_set_exponent(resultp1,/*using*/result_exponent);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);		/* Sign bit is already set */
+		}
+	    /* Fixup potential underflows */
+	  underflow:
+	    if(Is_underflowtrap_enabled())
+		{
+		Dbl_set_sign(resultp1,sign_save);
+                Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		/* inexact = FALSE */
+		return(UNDERFLOWEXCEPTION);
+		}
+	    /* 
+	     * Since we cannot get an inexact denormalized result,
+	     * we can now return.
+	     */
+	    Dbl_fix_overshift(resultp1,resultp2,(1-result_exponent),extent);
+	    Dbl_clear_signexponent(resultp1);
+	    Dbl_set_sign(resultp1,sign_save);
+	    Dbl_copytoptr(resultp1,resultp2,dstptr);
+	    return(NOEXCEPTION);
+	    } /* end if(hidden...)... */
+	/* Fall through and round */
+	} /* end if(save >= 0)... */
+    else 
+	{
+	/* Subtract magnitudes */
+	Dbl_addition(leftp1,leftp2,rightp1,rightp2,/*to*/resultp1,resultp2);
+	if(Dbl_isone_hiddenoverflow(resultp1))
+	    {
+	    /* Prenormalization required. */
+	    Dbl_rightshiftby1_withextent(resultp2,extent,extent);
+	    Dbl_arithrightshiftby1(resultp1,resultp2);
+	    result_exponent++;
+	    } /* end if hiddenoverflow... */
+	} /* end else ...subtract magnitudes... */
+    
+    /* Round the result.  If the extension is all zeros,then the result is
+     * exact.  Otherwise round in the correct direction.  No underflow is
+     * possible. If a postnormalization is necessary, then the mantissa is
+     * all zeros so no shift is needed. */
+  round:
+    if(Ext_isnotzero(extent))
+	{
+	inexact = TRUE;
+	switch(Rounding_mode())
+	    {
+	    case ROUNDNEAREST: /* The default. */
+	    if(Ext_isone_sign(extent))
+		{
+		/* at least 1/2 ulp */
+		if(Ext_isnotzero_lower(extent)  ||
+		  Dbl_isone_lowmantissap2(resultp2))
+		    {
+		    /* either exactly half way and odd or more than 1/2ulp */
+		    Dbl_increment(resultp1,resultp2);
+		    }
+		}
+	    break;
+
+	    case ROUNDPLUS:
+	    if(Dbl_iszero_sign(resultp1))
+		{
+		/* Round up positive results */
+		Dbl_increment(resultp1,resultp2);
+		}
+	    break;
+	    
+	    case ROUNDMINUS:
+	    if(Dbl_isone_sign(resultp1))
+		{
+		/* Round down negative results */
+		Dbl_increment(resultp1,resultp2);
+		}
+	    
+	    case ROUNDZERO:;
+	    /* truncate is simple */
+	    } /* end switch... */
+	if(Dbl_isone_hiddenoverflow(resultp1)) result_exponent++;
+	}
+    if(result_exponent == DBL_INFINITY_EXPONENT)
+        {
+        /* Overflow */
+        if(Is_overflowtrap_enabled())
+	    {
+	    Dbl_setwrapped_exponent(resultp1,result_exponent,ovfl);
+	    Dbl_copytoptr(resultp1,resultp2,dstptr);
+	    if (inexact)
+	    if (Is_inexacttrap_enabled())
+		return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+		else Set_inexactflag();
+	    return(OVERFLOWEXCEPTION);
+	    }
+        else
+	    {
+	    inexact = TRUE;
+	    Set_overflowflag();
+	    Dbl_setoverflow(resultp1,resultp2);
+	    }
+	}
+    else Dbl_set_exponent(resultp1,result_exponent);
+    Dbl_copytoptr(resultp1,resultp2,dstptr);
+    if(inexact) 
+	if(Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+	else Set_inexactflag();
+    return(NOEXCEPTION);
+    }
diff -Nru a/arch/parisc/math-emu/driver.c b/arch/parisc/math-emu/driver.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/driver.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,125 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ *  linux/arch/math-emu/driver.c.c
+ *
+ *	decodes and dispatches unimplemented FPU instructions
+ *
+ *  Copyright (C) 1999, 2000  Philipp Rumpf <prumpf@tux.org>
+ *  Copyright (C) 2001	      Hewlett-Packard <bame@debian.org>
+ */
+
+#include <linux/config.h>
+#include <linux/sched.h>
+#include "float.h"
+#include "math-emu.h"
+
+
+#define fptpos 31
+#define fpr1pos 10
+#define extru(r,pos,len) (((r) >> (31-(pos))) & (( 1 << (len)) - 1))
+
+#define FPUDEBUG 0
+
+/* Format of the floating-point exception registers. */
+struct exc_reg {
+	unsigned int exception : 6;
+	unsigned int ei : 26;
+};
+
+/* Macros for grabbing bits of the instruction format from the 'ei'
+   field above. */
+/* Major opcode 0c and 0e */
+#define FP0CE_UID(i) (((i) >> 6) & 3)
+#define FP0CE_CLASS(i) (((i) >> 9) & 3)
+#define FP0CE_SUBOP(i) (((i) >> 13) & 7)
+#define FP0CE_SUBOP1(i) (((i) >> 15) & 7) /* Class 1 subopcode */
+#define FP0C_FORMAT(i) (((i) >> 11) & 3)
+#define FP0E_FORMAT(i) (((i) >> 11) & 1)
+
+/* Major opcode 0c, uid 2 (performance monitoring) */
+#define FPPM_SUBOP(i) (((i) >> 9) & 0x1f)
+
+/* Major opcode 2e (fused operations).   */
+#define FP2E_SUBOP(i)  (((i) >> 5) & 1)
+#define FP2E_FORMAT(i) (((i) >> 11) & 1)
+
+/* Major opcode 26 (FMPYSUB) */
+/* Major opcode 06 (FMPYADD) */
+#define FPx6_FORMAT(i) ((i) & 0x1f)
+
+/* Flags and enable bits of the status word. */
+#define FPSW_FLAGS(w) ((w) >> 27)
+#define FPSW_ENABLE(w) ((w) & 0x1f)
+#define FPSW_V (1<<4)
+#define FPSW_Z (1<<3)
+#define FPSW_O (1<<2)
+#define FPSW_U (1<<1)
+#define FPSW_I (1<<0)
+
+/* Handle a floating point exception.  Return zero if the faulting
+   instruction can be completed successfully. */
+int
+handle_fpe(struct pt_regs *regs)
+{
+	extern void printbinary(unsigned long x, int nbits);
+	struct siginfo si;
+	unsigned int orig_sw, sw;
+	int signalcode;
+	/* need an intermediate copy of float regs because FPU emulation
+	 * code expects an artificial last entry which contains zero
+	 */
+	__u64 frcopy[33];
+
+	memcpy(frcopy, regs->fr, sizeof regs->fr);
+	frcopy[32] = 0;
+
+	memcpy(&orig_sw, frcopy, sizeof(orig_sw));
+
+	if (FPUDEBUG) {
+		printk(KERN_DEBUG "FP VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI ->\n   ");
+		printbinary(orig_sw, 32);
+		printk(KERN_DEBUG "\n");
+	}
+
+	signalcode = decode_fpu(frcopy, 0x666);
+
+	/* Status word = FR0L. */
+	memcpy(&sw, frcopy, sizeof(sw));
+	if (FPUDEBUG) {
+		printk(KERN_DEBUG "VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI decode_fpu returns %d|0x%x\n",
+			signalcode >> 24, signalcode & 0xffffff);
+		printbinary(sw, 32);
+		printk(KERN_DEBUG "\n");
+	}
+
+	memcpy(regs->fr, frcopy, sizeof regs->fr);
+	if (signalcode != 0) {
+	    si.si_signo = signalcode >> 24;
+	    si.si_errno = 0;
+	    si.si_code = signalcode & 0xffffff;
+	    si.si_addr = (void *) regs->iaoq[0];
+	    force_sig_info(si.si_signo, &si, current);
+	    return -1;
+	}
+
+	return signalcode ? -1 : 0;
+}
diff -Nru a/arch/parisc/math-emu/fcnvff.c b/arch/parisc/math-emu/fcnvff.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvff.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,309 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvff.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Floating-point to Double Floating-point
+ *	Double Floating-point to Single Floating-point
+ *
+ *  External Interfaces:
+ *	dbl_to_sgl_fcnvff(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvff(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/*
+ *  Single Floating-point to Double Floating-point 
+ */
+/*ARGSUSED*/
+int
+sgl_to_dbl_fcnvff(
+	    sgl_floating_point *srcptr,
+	    unsigned int *nullptr,
+	    dbl_floating_point *dstptr,
+	    unsigned int *status)
+{
+	register unsigned int src, resultp1, resultp2;
+	register int src_exponent;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src);
+	Dbl_allp1(resultp1) = Sgl_all(src);  /* set sign of result */
+	/* 
+ 	 * Test for NaN or infinity
+ 	 */
+	if (src_exponent == SGL_INFINITY_EXPONENT) {
+		/*
+		 * determine if NaN or infinity
+		 */
+		if (Sgl_iszero_mantissa(src)) {
+			/*
+			 * is infinity; want to return double infinity
+			 */
+			Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		else {
+			/* 
+			 * is NaN; signaling or quiet?
+			 */
+			if (Sgl_isone_signaling(src)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(INVALIDEXCEPTION);
+				/* make NaN quiet */
+				else {
+					Set_invalidflag();
+					Sgl_set_quiet(src);
+				}
+			}
+			/* 
+			 * NaN is quiet, return as double NaN 
+			 */
+			Dbl_setinfinity_exponent(resultp1);
+			Sgl_to_dbl_mantissa(src,resultp1,resultp2);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+	/* 
+ 	 * Test for zero or denormalized
+ 	 */
+	if (src_exponent == 0) {
+		/*
+		 * determine if zero or denormalized
+		 */
+		if (Sgl_isnotzero_mantissa(src)) {
+			/*
+			 * is denormalized; want to normalize
+			 */
+			Sgl_clear_signexponent(src);
+			Sgl_leftshiftby1(src);
+			Sgl_normalize(src,src_exponent);
+			Sgl_to_dbl_exponent(src_exponent,resultp1);
+			Sgl_to_dbl_mantissa(src,resultp1,resultp2);
+		}
+		else {
+			Dbl_setzero_exponentmantissa(resultp1,resultp2);
+		}
+		Dbl_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * No special cases, just complete the conversion
+	 */
+	Sgl_to_dbl_exponent(src_exponent, resultp1);
+	Sgl_to_dbl_mantissa(Sgl_mantissa(src), resultp1,resultp2);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Single Floating-point 
+ */
+/*ARGSUSED*/
+int
+dbl_to_sgl_fcnvff(
+		    dbl_floating_point *srcptr,
+		    unsigned int *nullptr,
+		    sgl_floating_point *dstptr,
+		    unsigned int *status)
+{
+        register unsigned int srcp1, srcp2, result;
+        register int src_exponent, dest_exponent, dest_mantissa;
+        register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE;
+	register boolean lsb_odd = FALSE;
+	boolean is_tiny;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+        src_exponent = Dbl_exponent(srcp1);
+	Sgl_all(result) = Dbl_allp1(srcp1);  /* set sign of result */
+        /* 
+         * Test for NaN or infinity
+         */
+        if (src_exponent == DBL_INFINITY_EXPONENT) {
+                /*
+                 * determine if NaN or infinity
+                 */
+                if (Dbl_iszero_mantissa(srcp1,srcp2)) {
+                        /*
+                         * is infinity; want to return single infinity
+                         */
+                        Sgl_setinfinity_exponentmantissa(result);
+                        *dstptr = result;
+                        return(NOEXCEPTION);
+                }
+                /* 
+                 * is NaN; signaling or quiet?
+                 */
+                if (Dbl_isone_signaling(srcp1)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        else {
+				Set_invalidflag();
+                        	/* make NaN quiet */
+                        	Dbl_set_quiet(srcp1);
+			}
+                }
+                /* 
+                 * NaN is quiet, return as single NaN 
+                 */
+                Sgl_setinfinity_exponent(result);
+		Sgl_set_mantissa(result,Dallp1(srcp1)<<3 | Dallp2(srcp2)>>29);
+		if (Sgl_iszero_mantissa(result)) Sgl_set_quiet(result);
+                *dstptr = result;
+                return(NOEXCEPTION);
+        }
+        /*
+         * Generate result
+         */
+        Dbl_to_sgl_exponent(src_exponent,dest_exponent);
+	if (dest_exponent > 0) {
+        	Dbl_to_sgl_mantissa(srcp1,srcp2,dest_mantissa,inexact,guardbit, 
+		stickybit,lsb_odd);
+	}
+	else {
+		if (Dbl_iszero_exponentmantissa(srcp1,srcp2)){
+			Sgl_setzero_exponentmantissa(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+                if (Is_underflowtrap_enabled()) {
+			Dbl_to_sgl_mantissa(srcp1,srcp2,dest_mantissa,inexact,
+			guardbit,stickybit,lsb_odd);
+                }
+		else {
+			/* compute result, determine inexact info,
+			 * and set Underflowflag if appropriate
+			 */
+			Dbl_to_sgl_denormalized(srcp1,srcp2,dest_exponent,
+			dest_mantissa,inexact,guardbit,stickybit,lsb_odd,
+			is_tiny);
+		}
+	}
+        /* 
+         * Now round result if not exact
+         */
+        if (inexact) {
+                switch (Rounding_mode()) {
+                        case ROUNDPLUS: 
+                                if (Sgl_iszero_sign(result)) dest_mantissa++;
+                                break;
+                        case ROUNDMINUS: 
+                                if (Sgl_isone_sign(result)) dest_mantissa++;
+                                break;
+                        case ROUNDNEAREST:
+                                if (guardbit) {
+                                   if (stickybit || lsb_odd) dest_mantissa++;
+                                   }
+                }
+        }
+        Sgl_set_exponentmantissa(result,dest_mantissa);
+
+        /*
+         * check for mantissa overflow after rounding
+         */
+        if ((dest_exponent>0 || Is_underflowtrap_enabled()) && 
+	    Sgl_isone_hidden(result)) dest_exponent++;
+
+        /* 
+         * Test for overflow
+         */
+        if (dest_exponent >= SGL_INFINITY_EXPONENT) {
+                /* trap if OVERFLOWTRAP enabled */
+                if (Is_overflowtrap_enabled()) {
+                        /* 
+                         * Check for gross overflow
+                         */
+                        if (dest_exponent >= SGL_INFINITY_EXPONENT+SGL_WRAP) 
+                        	return(UNIMPLEMENTEDEXCEPTION);
+                        
+                        /*
+                         * Adjust bias of result
+                         */
+			Sgl_setwrapped_exponent(result,dest_exponent,ovfl);
+			*dstptr = result;
+			if (inexact) 
+			    if (Is_inexacttrap_enabled())
+				return(OVERFLOWEXCEPTION|INEXACTEXCEPTION);
+			    else Set_inexactflag();
+                        return(OVERFLOWEXCEPTION);
+                }
+                Set_overflowflag();
+		inexact = TRUE;
+		/* set result to infinity or largest number */
+		Sgl_setoverflow(result);
+        }
+        /* 
+         * Test for underflow
+         */
+        else if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /* 
+                         * Check for gross underflow
+                         */
+                        if (dest_exponent <= -(SGL_WRAP))
+                        	return(UNIMPLEMENTEDEXCEPTION);
+                        /*
+                         * Adjust bias of result
+                         */
+			Sgl_setwrapped_exponent(result,dest_exponent,unfl);
+			*dstptr = result;
+			if (inexact) 
+			    if (Is_inexacttrap_enabled())
+				return(UNDERFLOWEXCEPTION|INEXACTEXCEPTION);
+			    else Set_inexactflag();
+                        return(UNDERFLOWEXCEPTION);
+                }
+                 /* 
+                  * result is denormalized or signed zero
+                  */
+               if (inexact && is_tiny) Set_underflowflag();
+
+        }
+	else Sgl_set_exponent(result,dest_exponent);
+	*dstptr = result;
+        /* 
+         * Trap if inexact trap is enabled
+         */
+        if (inexact)
+        	if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+        	else Set_inexactflag();
+        return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/fcnvfu.c b/arch/parisc/math-emu/fcnvfu.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvfu.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,536 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvfu.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Floating-point to Unsigned Fixed-point Converts
+ *
+ *  External Interfaces:
+ *	dbl_to_dbl_fcnvfu(srcptr,nullptr,dstptr,status)
+ *	dbl_to_sgl_fcnvfu(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvfu(srcptr,nullptr,dstptr,status)
+ *	sgl_to_sgl_fcnvfu(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/************************************************************************
+ *  Floating-point to Unsigned Fixed-point Converts			*
+ ************************************************************************/
+
+/*
+ *  Single Floating-point to Single Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+sgl_to_sgl_fcnvfu(
+			sgl_floating_point *srcptr,
+			unsigned int *nullptr,
+			unsigned int *dstptr,
+			unsigned int *status)
+{
+	register unsigned int src, result;
+	register int src_exponent;
+	register boolean inexact = FALSE;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP + 1) {
+		if (Sgl_isone_sign(src)) {
+			result = 0;
+		} else {
+			result = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Sgl_isone_sign(src)) {
+			result = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+		Sgl_clear_signexponent_set_hidden(src);
+		Suint_from_sgl_mantissa(src,src_exponent,result);
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_unsigned(src,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				result++;
+				break;
+			case ROUNDMINUS: /* never negative */
+				break;
+			case ROUNDNEAREST:
+				if (Sgl_isone_roundbit(src,src_exponent) &&
+				    (Sgl_isone_stickybit(src,src_exponent) ||
+				     (result & 1))) {
+			     		result++;
+				}
+				break;
+			}
+		}
+	} else {
+		result = 0;
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				if (Sgl_iszero_sign(src)) {
+					result++;
+				}
+				break;
+			case ROUNDMINUS:
+				if (Sgl_isone_sign(src)) {
+					result = 0;
+					if (Is_invalidtrap_enabled()) {
+						return(INVALIDEXCEPTION);
+					}
+					Set_invalidflag();
+					inexact = FALSE;
+				}
+				break;
+			case ROUNDNEAREST:
+				if (src_exponent == -1 &&
+				    Sgl_isnotzero_mantissa(src)) {
+					if (Sgl_isone_sign(src)) {
+						result = 0;
+						if (Is_invalidtrap_enabled()) {
+							return(INVALIDEXCEPTION);
+						}
+						Set_invalidflag();
+						inexact = FALSE;
+					}
+			      		else result++;
+				}
+				break;
+			}
+		}
+	}
+	*dstptr = result;
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Floating-point to Double Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+sgl_to_dbl_fcnvfu(
+		    sgl_floating_point *srcptr,
+		    unsigned int *nullptr,
+		    dbl_unsigned *dstptr,
+		    unsigned int *status)
+{
+	register int src_exponent;
+	register unsigned int src, resultp1, resultp2;
+	register boolean inexact = FALSE;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP + 1) {
+		if (Sgl_isone_sign(src)) {
+			resultp1 = resultp2 = 0;
+		} else {
+			resultp1 = resultp2 = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+    		Duint_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Sgl_isone_sign(src)) {
+			resultp1 = resultp2 = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+    			Duint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		Sgl_clear_signexponent_set_hidden(src);
+		Duint_from_sgl_mantissa(src,src_exponent,resultp1,resultp2);
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_unsigned(src,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				Duint_increment(resultp1,resultp2);
+				break;
+			case ROUNDMINUS: /* never negative */
+				break;
+			case ROUNDNEAREST:
+				if (Sgl_isone_roundbit(src,src_exponent) &&
+				    (Sgl_isone_stickybit(src,src_exponent) || 
+				     Duint_isone_lowp2(resultp2))) {
+					Duint_increment(resultp1,resultp2);
+				}
+				break;
+			}
+		}
+	} else {
+		Duint_setzero(resultp1,resultp2);
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				if (Sgl_iszero_sign(src)) {
+					Duint_increment(resultp1,resultp2);
+				}
+				break;
+			case ROUNDMINUS:
+				if (Sgl_isone_sign(src)) {
+					resultp1 = resultp2 = 0;
+					if (Is_invalidtrap_enabled()) {
+						return(INVALIDEXCEPTION);
+					}
+					Set_invalidflag();
+					inexact = FALSE;
+				}
+				break;
+			case ROUNDNEAREST:
+				if (src_exponent == -1 &&
+				    Sgl_isnotzero_mantissa(src)) {
+					if (Sgl_isone_sign(src)) {
+						resultp1 = 0;
+						resultp2 = 0;
+						if (Is_invalidtrap_enabled()) {
+							return(INVALIDEXCEPTION);
+						}
+						Set_invalidflag();
+						inexact = FALSE;
+					}
+					else Duint_increment(resultp1,resultp2);
+				}
+			}
+		}
+	}
+	Duint_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Single Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+dbl_to_sgl_fcnvfu (dbl_floating_point * srcptr, unsigned int *nullptr,
+		   unsigned int *dstptr, unsigned int *status)
+{
+	register unsigned int srcp1, srcp2, result;
+	register int src_exponent;
+	register boolean inexact = FALSE;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP + 1) {
+		if (Dbl_isone_sign(srcp1)) {
+			result = 0;
+		} else {
+			result = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Dbl_isone_sign(srcp1)) {
+			result = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+		Dbl_clear_signexponent_set_hidden(srcp1);
+		Suint_from_dbl_mantissa(srcp1,srcp2,src_exponent,result);
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_unsigned(srcp1,srcp2,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     result++;
+			     break;
+			case ROUNDMINUS: /* never negative */
+			     break;
+			case ROUNDNEAREST:
+			     if(Dbl_isone_roundbit(srcp1,srcp2,src_exponent) &&
+				(Dbl_isone_stickybit(srcp1,srcp2,src_exponent)||
+				 result&1))
+				   result++;
+			     break;
+			}
+			/* check for overflow */
+			if (result == 0) {
+				result = 0xffffffff;
+				if (Is_invalidtrap_enabled()) {
+					return(INVALIDEXCEPTION);
+				}
+				Set_invalidflag();
+				*dstptr = result;
+				return(NOEXCEPTION);
+			}
+		}
+	} else {
+		result = 0;
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				if (Dbl_iszero_sign(srcp1)) result++;
+				break;
+			case ROUNDMINUS:
+				if (Dbl_isone_sign(srcp1)) {
+					result = 0;
+					if (Is_invalidtrap_enabled()) {
+						return(INVALIDEXCEPTION);
+					}
+					Set_invalidflag();
+					inexact = FALSE;
+				}
+				break;
+			case ROUNDNEAREST:
+				if (src_exponent == -1 &&
+				    Dbl_isnotzero_mantissa(srcp1,srcp2))
+					if (Dbl_isone_sign(srcp1)) {
+						result = 0;
+						if (Is_invalidtrap_enabled()) {
+							return(INVALIDEXCEPTION);
+						}
+						Set_invalidflag();
+						inexact = FALSE;
+					}
+					else result++;
+			}
+		}
+	}
+	*dstptr = result;
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Double Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+dbl_to_dbl_fcnvfu (dbl_floating_point * srcptr, unsigned int *nullptr,
+		   dbl_unsigned * dstptr, unsigned int *status)
+{
+	register int src_exponent;
+	register unsigned int srcp1, srcp2, resultp1, resultp2;
+	register boolean inexact = FALSE;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP + 1) {
+		if (Dbl_isone_sign(srcp1)) {
+			resultp1 = resultp2 = 0;
+		} else {
+			resultp1 = resultp2 = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+    		Duint_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+ 
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Dbl_isone_sign(srcp1)) {
+			resultp1 = resultp2 = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+    			Duint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		Dbl_clear_signexponent_set_hidden(srcp1);
+		Duint_from_dbl_mantissa(srcp1,srcp2,src_exponent,resultp1,
+		  resultp2);
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_unsigned(srcp1,srcp2,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				Duint_increment(resultp1,resultp2);
+				break;
+			case ROUNDMINUS: /* never negative */
+				break;
+			case ROUNDNEAREST:
+				if(Dbl_isone_roundbit(srcp1,srcp2,src_exponent))
+				  if(Dbl_isone_stickybit(srcp1,srcp2,src_exponent) || 
+				     Duint_isone_lowp2(resultp2))
+					Duint_increment(resultp1,resultp2);
+			} 
+		}
+	} else {
+		Duint_setzero(resultp1,resultp2);
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				if (Dbl_iszero_sign(srcp1)) {
+					Duint_increment(resultp1,resultp2);
+				}
+				break;
+			case ROUNDMINUS:
+				if (Dbl_isone_sign(srcp1)) {
+					resultp1 = resultp2 = 0;
+					if (Is_invalidtrap_enabled()) {
+						return(INVALIDEXCEPTION);
+					}
+					Set_invalidflag();
+					inexact = FALSE;
+				}
+				break;
+			case ROUNDNEAREST:
+				if (src_exponent == -1 &&
+				    Dbl_isnotzero_mantissa(srcp1,srcp2))
+					if (Dbl_iszero_sign(srcp1)) {
+						Duint_increment(resultp1,resultp2);
+					} else {
+						resultp1 = 0;
+						resultp2 = 0;
+						if (Is_invalidtrap_enabled()) {
+							return(INVALIDEXCEPTION);
+						}
+						Set_invalidflag();
+						inexact = FALSE;
+					}
+			}
+		}
+	}
+	Duint_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
+
diff -Nru a/arch/parisc/math-emu/fcnvfut.c b/arch/parisc/math-emu/fcnvfut.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvfut.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,332 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvfut.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Floating-point to Unsigned Fixed-point Converts with Truncation
+ *
+ *  External Interfaces:
+ *	dbl_to_dbl_fcnvfut(srcptr,nullptr,dstptr,status)
+ *	dbl_to_sgl_fcnvfut(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvfut(srcptr,nullptr,dstptr,status)
+ *	sgl_to_sgl_fcnvfut(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/************************************************************************
+ *  Floating-point to Unsigned Fixed-point Converts with Truncation	*
+ ************************************************************************/
+
+/*
+ *  Convert single floating-point to single fixed-point format
+ *  with truncated result
+ */
+/*ARGSUSED*/
+int
+sgl_to_sgl_fcnvfut (sgl_floating_point * srcptr, unsigned int *nullptr,
+		    unsigned int *dstptr, unsigned int *status)
+{
+	register unsigned int src, result;
+	register int src_exponent;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP + 1) {
+		if (Sgl_isone_sign(src)) {
+			result = 0;
+		} else {
+			result = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Sgl_isone_sign(src)) {
+			result = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+		Sgl_clear_signexponent_set_hidden(src);
+		Suint_from_sgl_mantissa(src,src_exponent,result);
+		*dstptr = result;
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_unsigned(src,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		*dstptr = 0;
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Floating-point to Double Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+sgl_to_dbl_fcnvfut (sgl_floating_point * srcptr, unsigned int *nullptr,
+		    dbl_unsigned * dstptr, unsigned int *status)
+{
+	register int src_exponent;
+	register unsigned int src, resultp1, resultp2;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP + 1) {
+		if (Sgl_isone_sign(src)) {
+			resultp1 = resultp2 = 0;
+		} else {
+			resultp1 = resultp2 = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+    		Duint_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Sgl_isone_sign(src)) {
+			resultp1 = resultp2 = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+    			Duint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		Sgl_clear_signexponent_set_hidden(src);
+		Duint_from_sgl_mantissa(src,src_exponent,resultp1,resultp2);
+		Duint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_unsigned(src,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		Duint_setzero(resultp1,resultp2);
+		Duint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Single Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+dbl_to_sgl_fcnvfut (dbl_floating_point * srcptr, unsigned int *nullptr,
+		    unsigned int *dstptr, unsigned int *status)
+{
+	register unsigned int srcp1, srcp2, result;
+	register int src_exponent;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP + 1) {
+		if (Dbl_isone_sign(srcp1)) {
+			result = 0;
+		} else {
+			result = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Dbl_isone_sign(srcp1)) {
+			result = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+		Dbl_clear_signexponent_set_hidden(srcp1);
+		Suint_from_dbl_mantissa(srcp1,srcp2,src_exponent,result);
+		*dstptr = result;
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_unsigned(srcp1,srcp2,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		*dstptr = 0;
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Double Unsigned Fixed 
+ */
+/*ARGSUSED*/
+int
+dbl_to_dbl_fcnvfut (dbl_floating_point * srcptr, unsigned int *nullptr,
+		    dbl_unsigned * dstptr, unsigned int *status)
+{
+	register int src_exponent;
+	register unsigned int srcp1, srcp2, resultp1, resultp2;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP + 1) {
+		if (Dbl_isone_sign(srcp1)) {
+			resultp1 = resultp2 = 0;
+		} else {
+			resultp1 = resultp2 = 0xffffffff;
+		}
+		if (Is_invalidtrap_enabled()) {
+			return(INVALIDEXCEPTION);
+		}
+		Set_invalidflag();
+    		Duint_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		/* 
+		 * Check sign.
+		 * If negative, trap unimplemented.
+		 */
+		if (Dbl_isone_sign(srcp1)) {
+			resultp1 = resultp2 = 0;
+			if (Is_invalidtrap_enabled()) {
+				return(INVALIDEXCEPTION);
+			}
+			Set_invalidflag();
+    			Duint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		Dbl_clear_signexponent_set_hidden(srcp1);
+		Duint_from_dbl_mantissa(srcp1,srcp2,src_exponent,
+		  resultp1,resultp2);
+		Duint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_unsigned(srcp1,srcp2,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		Duint_setzero(resultp1,resultp2);
+		Duint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/fcnvfx.c b/arch/parisc/math-emu/fcnvfx.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvfx.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,501 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvfx.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Floating-point to Single Fixed-point
+ *	Single Floating-point to Double Fixed-point 
+ *	Double Floating-point to Single Fixed-point 
+ *	Double Floating-point to Double Fixed-point 
+ *
+ *  External Interfaces:
+ *	dbl_to_dbl_fcnvfx(srcptr,nullptr,dstptr,status)
+ *	dbl_to_sgl_fcnvfx(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvfx(srcptr,nullptr,dstptr,status)
+ *	sgl_to_sgl_fcnvfx(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/*
+ *  Single Floating-point to Single Fixed-point 
+ */
+/*ARGSUSED*/
+int
+sgl_to_sgl_fcnvfx(
+		    sgl_floating_point *srcptr,
+		    sgl_floating_point *nullptr,
+		    int *dstptr,
+		    sgl_floating_point *status)
+{
+	register unsigned int src, temp;
+	register int src_exponent, result;
+	register boolean inexact = FALSE;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP) {
+		/* check for MININT */
+		if ((src_exponent > SGL_FX_MAX_EXP + 1) || 
+		Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
+                        if (Sgl_iszero_sign(src)) result = 0x7fffffff;
+                        else result = 0x80000000; 
+
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+       		}
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		temp = src;
+		Sgl_clear_signexponent_set_hidden(temp);
+		Int_from_sgl_mantissa(temp,src_exponent);
+		if (Sgl_isone_sign(src))  result = -Sgl_all(temp);
+		else result = Sgl_all(temp);
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_fix(src,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     if (Sgl_iszero_sign(src)) result++;
+			     break;
+			case ROUNDMINUS:
+			     if (Sgl_isone_sign(src)) result--;
+			     break;
+			case ROUNDNEAREST:
+			     if (Sgl_isone_roundbit(src,src_exponent)) {
+			        if (Sgl_isone_stickybit(src,src_exponent) 
+				|| (Sgl_isone_lowmantissa(temp)))
+			           if (Sgl_iszero_sign(src)) result++;
+			           else result--;
+			     }
+			} 
+		}
+	}
+	else {
+		result = 0;
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     if (Sgl_iszero_sign(src)) result++;
+			     break;
+			case ROUNDMINUS:
+			     if (Sgl_isone_sign(src)) result--;
+			     break;
+			case ROUNDNEAREST:
+			     if (src_exponent == -1)
+			        if (Sgl_isnotzero_mantissa(src))
+			           if (Sgl_iszero_sign(src)) result++;
+			           else result--;
+			} 
+		}
+	}
+	*dstptr = result;
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Floating-point to Double Fixed-point 
+ */
+/*ARGSUSED*/
+int
+sgl_to_dbl_fcnvfx(
+		sgl_floating_point *srcptr,
+		unsigned int *nullptr,
+		dbl_integer *dstptr,
+		unsigned int *status)
+{
+	register int src_exponent, resultp1;
+	register unsigned int src, temp, resultp2;
+	register boolean inexact = FALSE;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP) {
+		/* check for MININT */
+		if ((src_exponent > DBL_FX_MAX_EXP + 1) || 
+		Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
+                        if (Sgl_iszero_sign(src)) {
+                              resultp1 = 0x7fffffff;
+			      resultp2 = 0xffffffff;
+			}
+                        else {
+			    resultp1 = 0x80000000; 
+			    resultp2 = 0;
+			}
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+    		        Dint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		Dint_set_minint(resultp1,resultp2);
+		Dint_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		temp = src;
+		Sgl_clear_signexponent_set_hidden(temp);
+		Dint_from_sgl_mantissa(temp,src_exponent,resultp1,resultp2);
+		if (Sgl_isone_sign(src)) {
+			Dint_setone_sign(resultp1,resultp2);
+		}
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_fix(src,src_exponent)) {
+			inexact = TRUE;
+                        /*  round result  */
+                        switch (Rounding_mode()) {
+                        case ROUNDPLUS:
+                             if (Sgl_iszero_sign(src)) {
+				Dint_increment(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDMINUS:
+                             if (Sgl_isone_sign(src)) {
+				Dint_decrement(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDNEAREST:
+                             if (Sgl_isone_roundbit(src,src_exponent))
+                                if (Sgl_isone_stickybit(src,src_exponent) || 
+				(Dint_isone_lowp2(resultp2)))
+				   if (Sgl_iszero_sign(src)) {
+				      Dint_increment(resultp1,resultp2);
+				   }
+                                   else {
+				      Dint_decrement(resultp1,resultp2);
+				   }
+                        }
+                }
+        }
+	else {
+		Dint_setzero(resultp1,resultp2);
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			inexact = TRUE;
+                        /*  round result  */
+                        switch (Rounding_mode()) {
+                        case ROUNDPLUS:
+                             if (Sgl_iszero_sign(src)) {
+				Dint_increment(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDMINUS:
+                             if (Sgl_isone_sign(src)) {
+				Dint_decrement(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDNEAREST:
+                             if (src_exponent == -1)
+                                if (Sgl_isnotzero_mantissa(src))
+                                   if (Sgl_iszero_sign(src)) {
+				      Dint_increment(resultp1,resultp2);
+				   }
+                                   else {
+				      Dint_decrement(resultp1,resultp2);
+				   }
+			}
+		}
+	}
+	Dint_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Single Fixed-point 
+ */
+/*ARGSUSED*/
+int
+dbl_to_sgl_fcnvfx(
+		    dbl_floating_point *srcptr,
+		    unsigned int *nullptr,
+		    int *dstptr,
+		    unsigned int *status)
+{
+	register unsigned int srcp1,srcp2, tempp1,tempp2;
+	register int src_exponent, result;
+	register boolean inexact = FALSE;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP) {
+		/* check for MININT */
+		if (Dbl_isoverflow_to_int(src_exponent,srcp1,srcp2)) {
+                        if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff;
+                        else result = 0x80000000; 
+
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		tempp1 = srcp1;
+		tempp2 = srcp2;
+		Dbl_clear_signexponent_set_hidden(tempp1);
+		Int_from_dbl_mantissa(tempp1,tempp2,src_exponent);
+		if (Dbl_isone_sign(srcp1) && (src_exponent <= SGL_FX_MAX_EXP))
+			result = -Dbl_allp1(tempp1);
+		else result = Dbl_allp1(tempp1);
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_fix(srcp1,srcp2,src_exponent)) {
+                        inexact = TRUE;
+                        /*  round result  */
+                        switch (Rounding_mode()) {
+                        case ROUNDPLUS:
+                             if (Dbl_iszero_sign(srcp1)) result++;
+                             break;
+                        case ROUNDMINUS:
+                             if (Dbl_isone_sign(srcp1)) result--;
+                             break;
+                        case ROUNDNEAREST:
+                             if (Dbl_isone_roundbit(srcp1,srcp2,src_exponent))
+                                if (Dbl_isone_stickybit(srcp1,srcp2,src_exponent) || 
+				(Dbl_isone_lowmantissap1(tempp1)))
+                                   if (Dbl_iszero_sign(srcp1)) result++;
+                                   else result--;
+                        } 
+			/* check for overflow */
+			if ((Dbl_iszero_sign(srcp1) && result < 0) ||
+			    (Dbl_isone_sign(srcp1) && result > 0)) {
+			        
+                          if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff;
+                          else result = 0x80000000; 
+
+	                  if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                          }
+                          Set_invalidflag();
+			  *dstptr = result;
+			  return(NOEXCEPTION);
+			}
+                }
+	}
+	else {
+		result = 0;
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+                        inexact = TRUE;
+                        /*  round result  */
+                        switch (Rounding_mode()) {
+                        case ROUNDPLUS:
+                             if (Dbl_iszero_sign(srcp1)) result++;
+                             break;
+                        case ROUNDMINUS:
+                             if (Dbl_isone_sign(srcp1)) result--;
+                             break;
+                        case ROUNDNEAREST:
+                             if (src_exponent == -1)
+                                if (Dbl_isnotzero_mantissa(srcp1,srcp2))
+                                   if (Dbl_iszero_sign(srcp1)) result++;
+                                   else result--;
+			}
+                }
+	}
+	*dstptr = result;
+        if (inexact) {
+                if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+        }
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Double Fixed-point 
+ */
+/*ARGSUSED*/
+int
+dbl_to_dbl_fcnvfx(
+		    dbl_floating_point *srcptr,
+		    unsigned int *nullptr,
+		    dbl_integer *dstptr,
+		    unsigned int *status)
+{
+	register int src_exponent, resultp1;
+	register unsigned int srcp1, srcp2, tempp1, tempp2, resultp2;
+	register boolean inexact = FALSE;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP) {
+		/* check for MININT */
+		if ((src_exponent > DBL_FX_MAX_EXP + 1) || 
+		Dbl_isnotzero_mantissa(srcp1,srcp2) || Dbl_iszero_sign(srcp1)) {
+                        if (Dbl_iszero_sign(srcp1)) {
+                              resultp1 = 0x7fffffff;
+			      resultp2 = 0xffffffff;
+			}
+                        else {
+			    resultp1 = 0x80000000; 
+			    resultp2 = 0;
+			}
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+    		        Dint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+ 
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		tempp1 = srcp1;
+		tempp2 = srcp2;
+		Dbl_clear_signexponent_set_hidden(tempp1);
+		Dint_from_dbl_mantissa(tempp1,tempp2,src_exponent,resultp1,
+		resultp2);
+		if (Dbl_isone_sign(srcp1)) {
+			Dint_setone_sign(resultp1,resultp2);
+		}
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_fix(srcp1,srcp2,src_exponent)) {
+                        inexact = TRUE;
+                        /*  round result  */
+                        switch (Rounding_mode()) {
+                        case ROUNDPLUS:
+                             if (Dbl_iszero_sign(srcp1)) {
+				Dint_increment(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDMINUS:
+                             if (Dbl_isone_sign(srcp1)) {
+				Dint_decrement(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDNEAREST:
+                             if (Dbl_isone_roundbit(srcp1,srcp2,src_exponent))
+                                if (Dbl_isone_stickybit(srcp1,srcp2,src_exponent) || 
+				(Dint_isone_lowp2(resultp2)))
+                                   if (Dbl_iszero_sign(srcp1)) {
+				      Dint_increment(resultp1,resultp2);
+				   }
+                                   else {
+				      Dint_decrement(resultp1,resultp2);
+				   }
+                        } 
+                }
+	}
+	else {
+		Dint_setzero(resultp1,resultp2);
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+                        inexact = TRUE;
+                        /*  round result  */
+                        switch (Rounding_mode()) {
+                        case ROUNDPLUS:
+                             if (Dbl_iszero_sign(srcp1)) {
+				Dint_increment(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDMINUS:
+                             if (Dbl_isone_sign(srcp1)) {
+				Dint_decrement(resultp1,resultp2);
+			     }
+                             break;
+                        case ROUNDNEAREST:
+                             if (src_exponent == -1)
+                                if (Dbl_isnotzero_mantissa(srcp1,srcp2))
+                                   if (Dbl_iszero_sign(srcp1)) {
+				      Dint_increment(resultp1,resultp2);
+				   }
+                                   else {
+				      Dint_decrement(resultp1,resultp2);
+				   }
+			}
+                }
+	}
+	Dint_copytoptr(resultp1,resultp2,dstptr);
+        if (inexact) {
+                if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+        	else Set_inexactflag();
+        }
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/fcnvfxt.c b/arch/parisc/math-emu/fcnvfxt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvfxt.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,328 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvfxt.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Floating-point to Single Fixed-point /w truncated result
+ *	Single Floating-point to Double Fixed-point /w truncated result
+ *	Double Floating-point to Single Fixed-point /w truncated result
+ *	Double Floating-point to Double Fixed-point /w truncated result
+ *
+ *  External Interfaces:
+ *	dbl_to_dbl_fcnvfxt(srcptr,nullptr,dstptr,status)
+ *	dbl_to_sgl_fcnvfxt(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvfxt(srcptr,nullptr,dstptr,status)
+ *	sgl_to_sgl_fcnvfxt(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/*
+ *  Convert single floating-point to single fixed-point format
+ *  with truncated result
+ */
+/*ARGSUSED*/
+int
+sgl_to_sgl_fcnvfxt(
+		    sgl_floating_point *srcptr,
+		    unsigned int *nullptr,
+		    int *dstptr,
+		    unsigned int *status)
+{
+	register unsigned int src, temp;
+	register int src_exponent, result;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP) {
+		/* check for MININT */
+		if ((src_exponent > SGL_FX_MAX_EXP + 1) || 
+		Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
+                        if (Sgl_iszero_sign(src)) result = 0x7fffffff;
+                        else result = 0x80000000; 
+
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		temp = src;
+		Sgl_clear_signexponent_set_hidden(temp);
+		Int_from_sgl_mantissa(temp,src_exponent);
+		if (Sgl_isone_sign(src))  result = -Sgl_all(temp);
+		else result = Sgl_all(temp);
+		*dstptr = result;
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_fix(src,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		*dstptr = 0;
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Floating-point to Double Fixed-point 
+ */
+/*ARGSUSED*/
+int
+sgl_to_dbl_fcnvfxt(
+		    sgl_floating_point *srcptr,
+		    unsigned int *nullptr,
+		    dbl_integer *dstptr,
+		    unsigned int *status)
+{
+	register int src_exponent, resultp1;
+	register unsigned int src, temp, resultp2;
+
+	src = *srcptr;
+	src_exponent = Sgl_exponent(src) - SGL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP) {
+		/* check for MININT */
+		if ((src_exponent > DBL_FX_MAX_EXP + 1) || 
+		Sgl_isnotzero_mantissa(src) || Sgl_iszero_sign(src)) {
+                        if (Sgl_iszero_sign(src)) {
+                              resultp1 = 0x7fffffff;
+			      resultp2 = 0xffffffff;
+			}
+                        else {
+			    resultp1 = 0x80000000; 
+			    resultp2 = 0;
+			}
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+    		        Dint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+		Dint_set_minint(resultp1,resultp2);
+		Dint_copytoptr(resultp1,resultp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		temp = src;
+		Sgl_clear_signexponent_set_hidden(temp);
+		Dint_from_sgl_mantissa(temp,src_exponent,resultp1,resultp2);
+		if (Sgl_isone_sign(src)) {
+			Dint_setone_sign(resultp1,resultp2);
+		}
+		Dint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Sgl_isinexact_to_fix(src,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		Dint_setzero(resultp1,resultp2);
+		Dint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Single Fixed-point 
+ */
+/*ARGSUSED*/
+int
+dbl_to_sgl_fcnvfxt(
+			dbl_floating_point *srcptr,
+			unsigned int *nullptr,
+			int *dstptr,
+			unsigned int *status)
+{
+	register unsigned int srcp1, srcp2, tempp1, tempp2;
+	register int src_exponent, result;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > SGL_FX_MAX_EXP) {
+		/* check for MININT */
+		if (Dbl_isoverflow_to_int(src_exponent,srcp1,srcp2)) {
+                        if (Dbl_iszero_sign(srcp1)) result = 0x7fffffff;
+                        else result = 0x80000000; 
+
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		tempp1 = srcp1;
+		tempp2 = srcp2;
+		Dbl_clear_signexponent_set_hidden(tempp1);
+		Int_from_dbl_mantissa(tempp1,tempp2,src_exponent);
+		if (Dbl_isone_sign(srcp1) && (src_exponent <= SGL_FX_MAX_EXP))
+			result = -Dbl_allp1(tempp1);
+		else result = Dbl_allp1(tempp1);
+		*dstptr = result;
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_fix(srcp1,srcp2,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		*dstptr = 0;
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point to Double Fixed-point 
+ */
+/*ARGSUSED*/
+int
+dbl_to_dbl_fcnvfxt(
+			dbl_floating_point *srcptr,
+			unsigned int *nullptr,
+			dbl_integer *dstptr,
+			unsigned int *status)
+{
+	register int src_exponent, resultp1;
+	register unsigned int srcp1, srcp2, tempp1, tempp2, resultp2;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+	src_exponent = Dbl_exponent(srcp1) - DBL_BIAS;
+
+	/* 
+	 * Test for overflow
+	 */
+	if (src_exponent > DBL_FX_MAX_EXP) {
+		/* check for MININT */
+		if ((src_exponent > DBL_FX_MAX_EXP + 1) || 
+		Dbl_isnotzero_mantissa(srcp1,srcp2) || Dbl_iszero_sign(srcp1)) {
+                        if (Dbl_iszero_sign(srcp1)) {
+                              resultp1 = 0x7fffffff;
+			      resultp2 = 0xffffffff;
+			}
+                        else {
+			    resultp1 = 0x80000000; 
+			    resultp2 = 0;
+			}
+	                if (Is_invalidtrap_enabled()) {
+                            return(INVALIDEXCEPTION);
+                        }
+                        Set_invalidflag();
+    		        Dint_copytoptr(resultp1,resultp2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		tempp1 = srcp1;
+		tempp2 = srcp2;
+		Dbl_clear_signexponent_set_hidden(tempp1);
+		Dint_from_dbl_mantissa(tempp1,tempp2,src_exponent,
+		resultp1,resultp2);
+		if (Dbl_isone_sign(srcp1)) {
+			Dint_setone_sign(resultp1,resultp2);
+		}
+		Dint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Dbl_isinexact_to_fix(srcp1,srcp2,src_exponent)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	else {
+		Dint_setzero(resultp1,resultp2);
+		Dint_copytoptr(resultp1,resultp2,dstptr);
+
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+			else Set_inexactflag();
+		}
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/fcnvuf.c b/arch/parisc/math-emu/fcnvuf.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvuf.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,318 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvuf.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Fixed point to Floating-point Converts
+ *
+ *  External Interfaces:
+ *	dbl_to_dbl_fcnvuf(srcptr,nullptr,dstptr,status)
+ *	dbl_to_sgl_fcnvuf(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvuf(srcptr,nullptr,dstptr,status)
+ *	sgl_to_sgl_fcnvuf(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/************************************************************************
+ *  Fixed point to Floating-point Converts				*
+ ************************************************************************/
+
+/*
+ *  Convert Single Unsigned Fixed to Single Floating-point format
+ */
+
+int
+sgl_to_sgl_fcnvuf(
+			unsigned int *srcptr,
+			unsigned int *nullptr,
+			sgl_floating_point *dstptr,
+			unsigned int *status)
+{
+	register unsigned int src, result = 0;
+	register int dst_exponent;
+
+	src = *srcptr;
+
+	/* Check for zero */ 
+	if (src == 0) { 
+	       	Sgl_setzero(result); 
+		*dstptr = result;
+	       	return(NOEXCEPTION); 
+	} 
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	/*
+	 * Check word for most significant bit set.  Returns
+	 * a value in dst_exponent indicating the bit position,
+	 * between -1 and 30.
+	 */
+	Find_ms_one_bit(src,dst_exponent);
+	/*  left justify source, with msb at bit position 0  */
+	src <<= dst_exponent+1;
+	Sgl_set_mantissa(result, src >> SGL_EXP_LENGTH);
+	Sgl_set_exponent(result, 30+SGL_BIAS - dst_exponent);
+
+	/* check for inexact */
+	if (Suint_isinexact_to_sgl(src)) {
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				Sgl_increment(result);
+				break;
+			case ROUNDMINUS: /* never negative */
+				break;
+			case ROUNDNEAREST:
+				Sgl_roundnearest_from_suint(src,result);
+				break;
+		}
+		if (Is_inexacttrap_enabled()) {
+			*dstptr = result;
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	*dstptr = result;
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Unsigned Fixed to Double Floating-point 
+ */
+
+int
+sgl_to_dbl_fcnvuf(
+			unsigned int *srcptr,
+			unsigned int *nullptr,
+			dbl_floating_point *dstptr,
+			unsigned int *status)
+{
+	register int dst_exponent;
+	register unsigned int src, resultp1 = 0, resultp2 = 0;
+
+	src = *srcptr;
+
+	/* Check for zero */
+	if (src == 0) {
+	       	Dbl_setzero(resultp1,resultp2);
+	       	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	       	return(NOEXCEPTION);
+	}
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	/*
+	 * Check word for most significant bit set.  Returns
+	 * a value in dst_exponent indicating the bit position,
+	 * between -1 and 30.
+	 */
+	Find_ms_one_bit(src,dst_exponent);
+	/*  left justify source, with msb at bit position 0  */
+	src <<= dst_exponent+1;
+	Dbl_set_mantissap1(resultp1, src >> DBL_EXP_LENGTH);
+	Dbl_set_mantissap2(resultp2, src << (32-DBL_EXP_LENGTH));
+	Dbl_set_exponent(resultp1, (30+DBL_BIAS) - dst_exponent);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Unsigned Fixed to Single Floating-point 
+ */
+
+int
+dbl_to_sgl_fcnvuf(
+			dbl_unsigned *srcptr,
+			unsigned int *nullptr,
+			sgl_floating_point *dstptr,
+			unsigned int *status)
+{
+	int dst_exponent;
+	unsigned int srcp1, srcp2, result = 0;
+
+	Duint_copyfromptr(srcptr,srcp1,srcp2);
+
+	/* Check for zero */
+	if (srcp1 == 0 && srcp2 == 0) {
+	       	Sgl_setzero(result);
+	       	*dstptr = result;
+	       	return(NOEXCEPTION);
+	}
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	if (srcp1 == 0) {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 */
+		Find_ms_one_bit(srcp2,dst_exponent);
+		/*  left justify source, with msb at bit position 0  */
+		srcp1 = srcp2 << dst_exponent+1;    
+		srcp2 = 0;
+		/*
+		 *  since msb set is in second word, need to 
+		 *  adjust bit position count
+		 */
+		dst_exponent += 32;
+	}
+	else {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 *
+		 */
+		Find_ms_one_bit(srcp1,dst_exponent);
+		/*  left justify source, with msb at bit position 0  */
+		if (dst_exponent >= 0) {
+			Variable_shift_double(srcp1,srcp2,(31-dst_exponent),
+			 srcp1); 
+			srcp2 <<= dst_exponent+1;
+		}
+	}
+	Sgl_set_mantissa(result, srcp1 >> SGL_EXP_LENGTH);
+	Sgl_set_exponent(result, (62+SGL_BIAS) - dst_exponent);
+
+	/* check for inexact */
+	if (Duint_isinexact_to_sgl(srcp1,srcp2)) {
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				Sgl_increment(result);
+				break;
+			case ROUNDMINUS: /* never negative */
+				break;
+			case ROUNDNEAREST:
+				Sgl_roundnearest_from_duint(srcp1,srcp2,result);
+				break;
+		}
+		if (Is_inexacttrap_enabled()) {
+			*dstptr = result;
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	*dstptr = result;
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Unsigned Fixed to Double Floating-point 
+ */
+
+int
+dbl_to_dbl_fcnvuf(
+		    dbl_unsigned *srcptr,
+		    unsigned int *nullptr,
+		    dbl_floating_point *dstptr,
+		    unsigned int *status)
+{
+	register int dst_exponent;
+	register unsigned int srcp1, srcp2, resultp1 = 0, resultp2 = 0;
+
+	Duint_copyfromptr(srcptr,srcp1,srcp2);
+
+	/* Check for zero */
+	if (srcp1 == 0 && srcp2 ==0) {
+	       	Dbl_setzero(resultp1,resultp2);
+	       	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	       	return(NOEXCEPTION);
+	}
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	if (srcp1 == 0) {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 */
+		Find_ms_one_bit(srcp2,dst_exponent);
+		/*  left justify source, with msb at bit position 0  */
+		srcp1 = srcp2 << dst_exponent+1;
+		srcp2 = 0;
+		/*
+		 *  since msb set is in second word, need to 
+		 *  adjust bit position count
+		 */
+		dst_exponent += 32;
+	}
+	else {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 */
+		Find_ms_one_bit(srcp1,dst_exponent);
+		/*  left justify source, with msb at bit position 0  */
+		if (dst_exponent >= 0) {
+			Variable_shift_double(srcp1,srcp2,(31-dst_exponent),
+			 srcp1); 
+			srcp2 <<= dst_exponent+1;
+		}
+	}
+	Dbl_set_mantissap1(resultp1, srcp1 >> DBL_EXP_LENGTH);
+	Shiftdouble(srcp1,srcp2,DBL_EXP_LENGTH,resultp2);
+	Dbl_set_exponent(resultp1, (62+DBL_BIAS) - dst_exponent);
+
+	/* check for inexact */
+	if (Duint_isinexact_to_dbl(srcp2)) {
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				Dbl_increment(resultp1,resultp2);
+				break;
+			case ROUNDMINUS: /* never negative */
+				break;
+			case ROUNDNEAREST:
+				Dbl_roundnearest_from_duint(srcp2,resultp1,
+				resultp2);
+				break;
+		}
+		if (Is_inexacttrap_enabled()) {
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
+
diff -Nru a/arch/parisc/math-emu/fcnvxf.c b/arch/parisc/math-emu/fcnvxf.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fcnvxf.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,386 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fcnvxf.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Fixed-point to Single Floating-point
+ *	Single Fixed-point to Double Floating-point 
+ *	Double Fixed-point to Single Floating-point 
+ *	Double Fixed-point to Double Floating-point 
+ *
+ *  External Interfaces:
+ *	dbl_to_dbl_fcnvxf(srcptr,nullptr,dstptr,status)
+ *	dbl_to_sgl_fcnvxf(srcptr,nullptr,dstptr,status)
+ *	sgl_to_dbl_fcnvxf(srcptr,nullptr,dstptr,status)
+ *	sgl_to_sgl_fcnvxf(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/*
+ *  Convert single fixed-point to single floating-point format
+ */
+
+int
+sgl_to_sgl_fcnvxf(
+		    int *srcptr,
+		    unsigned int *nullptr,
+		    sgl_floating_point *dstptr,
+		    unsigned int *status)
+{
+	register int src, dst_exponent;
+	register unsigned int result = 0;
+
+	src = *srcptr;
+	/* 
+	 * set sign bit of result and get magnitude of source 
+	 */
+	if (src < 0) {
+		Sgl_setone_sign(result);  
+		Int_negate(src);
+	}
+	else {
+		Sgl_setzero_sign(result);
+        	/* Check for zero */ 
+        	if (src == 0) { 
+                	Sgl_setzero(result); 
+			*dstptr = result;
+                	return(NOEXCEPTION); 
+        	} 
+	}
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	/*
+	 * Check word for most significant bit set.  Returns
+	 * a value in dst_exponent indicating the bit position,
+	 * between -1 and 30.
+	 */
+	Find_ms_one_bit(src,dst_exponent);
+	/*  left justify source, with msb at bit position 1  */
+	if (dst_exponent >= 0) src <<= dst_exponent;
+	else src = 1 << 30;
+	Sgl_set_mantissa(result, src >> (SGL_EXP_LENGTH-1));
+	Sgl_set_exponent(result, 30+SGL_BIAS - dst_exponent);
+
+	/* check for inexact */
+	if (Int_isinexact_to_sgl(src)) {
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) 
+					Sgl_increment(result);
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) 
+					Sgl_increment(result);
+				break;
+			case ROUNDNEAREST:
+				Sgl_roundnearest_from_int(src,result);
+		}
+		if (Is_inexacttrap_enabled()) {
+			*dstptr = result;
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	*dstptr = result;
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Fixed-point to Double Floating-point 
+ */
+
+int
+sgl_to_dbl_fcnvxf(
+		    int *srcptr,
+		    unsigned int *nullptr,
+		    dbl_floating_point *dstptr,
+		    unsigned int *status)
+{
+	register int src, dst_exponent;
+	register unsigned int resultp1 = 0, resultp2 = 0;
+
+	src = *srcptr;
+	/* 
+	 * set sign bit of result and get magnitude of source 
+	 */
+	if (src < 0) {
+		Dbl_setone_sign(resultp1);  
+		Int_negate(src);
+	}
+	else {
+		Dbl_setzero_sign(resultp1);
+        	/* Check for zero */
+        	if (src == 0) {
+                	Dbl_setzero(resultp1,resultp2);
+                	Dbl_copytoptr(resultp1,resultp2,dstptr);
+                	return(NOEXCEPTION);
+        	}
+	}
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	/*
+	 * Check word for most significant bit set.  Returns
+	 * a value in dst_exponent indicating the bit position,
+	 * between -1 and 30.
+	 */
+	Find_ms_one_bit(src,dst_exponent);
+	/*  left justify source, with msb at bit position 1  */
+	if (dst_exponent >= 0) src <<= dst_exponent;
+	else src = 1 << 30;
+	Dbl_set_mantissap1(resultp1, src >> DBL_EXP_LENGTH - 1);
+	Dbl_set_mantissap2(resultp2, src << (33-DBL_EXP_LENGTH));
+	Dbl_set_exponent(resultp1, (30+DBL_BIAS) - dst_exponent);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Fixed-point to Single Floating-point 
+ */
+
+int
+dbl_to_sgl_fcnvxf(
+			dbl_integer *srcptr,
+			unsigned int *nullptr,
+			sgl_floating_point *dstptr,
+			unsigned int *status)
+{
+	int dst_exponent, srcp1;
+	unsigned int result = 0, srcp2;
+
+	Dint_copyfromptr(srcptr,srcp1,srcp2);
+	/* 
+	 * set sign bit of result and get magnitude of source 
+	 */
+	if (srcp1 < 0) {
+		Sgl_setone_sign(result);  
+		Dint_negate(srcp1,srcp2);
+	}
+	else {
+		Sgl_setzero_sign(result);
+        	/* Check for zero */
+        	if (srcp1 == 0 && srcp2 == 0) {
+                	Sgl_setzero(result);
+                	*dstptr = result;
+                	return(NOEXCEPTION);
+		}
+        }
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	if (srcp1 == 0) {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 */
+		Find_ms_one_bit(srcp2,dst_exponent);
+		/*  left justify source, with msb at bit position 1  */
+		if (dst_exponent >= 0) {
+			srcp1 = srcp2 << dst_exponent;    
+			srcp2 = 0;
+		}
+		else {
+			srcp1 = srcp2 >> 1;
+			srcp2 <<= 31; 
+		}
+		/*
+		 *  since msb set is in second word, need to 
+		 *  adjust bit position count
+		 */
+		dst_exponent += 32;
+	}
+	else {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 *
+		 */
+		Find_ms_one_bit(srcp1,dst_exponent);
+		/*  left justify source, with msb at bit position 1  */
+		if (dst_exponent > 0) {
+			Variable_shift_double(srcp1,srcp2,(32-dst_exponent),
+			 srcp1); 
+			srcp2 <<= dst_exponent;
+		}
+		/*
+		 * If dst_exponent = 0, we don't need to shift anything.
+		 * If dst_exponent = -1, src = - 2**63 so we won't need to 
+		 * shift srcp2.
+		 */
+		else srcp1 >>= -(dst_exponent);
+	}
+	Sgl_set_mantissa(result, srcp1 >> SGL_EXP_LENGTH - 1);
+	Sgl_set_exponent(result, (62+SGL_BIAS) - dst_exponent);
+
+	/* check for inexact */
+	if (Dint_isinexact_to_sgl(srcp1,srcp2)) {
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) 
+					Sgl_increment(result);
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) 
+					Sgl_increment(result);
+				break;
+			case ROUNDNEAREST:
+				Sgl_roundnearest_from_dint(srcp1,srcp2,result);
+		}
+		if (Is_inexacttrap_enabled()) {
+			*dstptr = result;
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	*dstptr = result;
+	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Fixed-point to Double Floating-point 
+ */
+
+int
+dbl_to_dbl_fcnvxf(
+		    dbl_integer *srcptr,
+		    unsigned int *nullptr,
+		    dbl_floating_point *dstptr,
+		    unsigned int *status)
+{
+	register int srcp1, dst_exponent;
+	register unsigned int srcp2, resultp1 = 0, resultp2 = 0;
+
+	Dint_copyfromptr(srcptr,srcp1,srcp2);
+	/* 
+	 * set sign bit of result and get magnitude of source 
+	 */
+	if (srcp1 < 0) {
+		Dbl_setone_sign(resultp1);
+		Dint_negate(srcp1,srcp2);
+	}
+	else {
+		Dbl_setzero_sign(resultp1);
+        	/* Check for zero */
+        	if (srcp1 == 0 && srcp2 ==0) {
+                	Dbl_setzero(resultp1,resultp2);
+                	Dbl_copytoptr(resultp1,resultp2,dstptr);
+                	return(NOEXCEPTION);
+		}
+        }
+	/*
+	 * Generate exponent and normalized mantissa
+	 */
+	dst_exponent = 16;    /* initialize for normalization */
+	if (srcp1 == 0) {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 */
+		Find_ms_one_bit(srcp2,dst_exponent);
+		/*  left justify source, with msb at bit position 1  */
+		if (dst_exponent >= 0) {
+			srcp1 = srcp2 << dst_exponent;    
+			srcp2 = 0;
+		}
+		else {
+			srcp1 = srcp2 >> 1;
+			srcp2 <<= 31;
+		}
+		/*
+		 *  since msb set is in second word, need to 
+		 *  adjust bit position count
+		 */
+		dst_exponent += 32;
+	}
+	else {
+		/*
+		 * Check word for most significant bit set.  Returns
+		 * a value in dst_exponent indicating the bit position,
+		 * between -1 and 30.
+		 */
+		Find_ms_one_bit(srcp1,dst_exponent);
+		/*  left justify source, with msb at bit position 1  */
+		if (dst_exponent > 0) {
+			Variable_shift_double(srcp1,srcp2,(32-dst_exponent),
+			 srcp1); 
+			srcp2 <<= dst_exponent;
+		}
+		/*
+		 * If dst_exponent = 0, we don't need to shift anything.
+		 * If dst_exponent = -1, src = - 2**63 so we won't need to 
+		 * shift srcp2.
+		 */
+		else srcp1 >>= -(dst_exponent);
+	}
+	Dbl_set_mantissap1(resultp1, srcp1 >> (DBL_EXP_LENGTH-1));
+	Shiftdouble(srcp1,srcp2,DBL_EXP_LENGTH-1,resultp2);
+	Dbl_set_exponent(resultp1, (62+DBL_BIAS) - dst_exponent);
+
+	/* check for inexact */
+	if (Dint_isinexact_to_dbl(srcp2)) {
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Dbl_iszero_sign(resultp1)) {
+					Dbl_increment(resultp1,resultp2);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Dbl_isone_sign(resultp1)) {
+					Dbl_increment(resultp1,resultp2);
+				}
+				break;
+			case ROUNDNEAREST:
+				Dbl_roundnearest_from_dint(srcp2,resultp1,
+				resultp2);
+		}
+		if (Is_inexacttrap_enabled()) {
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/float.h b/arch/parisc/math-emu/float.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/float.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,582 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ * 
+ *  File: 
+ *      @(#)	pa/spmath/float.h		$Revision: 1.1 $
+ * 
+ *  Purpose:
+ *      <<please update with a synopis of the functionality provided by this file>>
+ * 
+ *  BE header:  no
+ *
+ *  Shipped:  yes
+ *	/usr/conf/pa/spmath/float.h
+ *
+ * END_DESC  
+*/
+
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+#include "fpbits.h"
+#include "hppa.h"
+/*
+ * Want to pick up the FPU capability flags, not the PDC structures.
+ * 'LOCORE' isn't really true in this case, but we don't want the C structures
+ * so it suits our purposes
+ */
+#define LOCORE
+#include "fpu.h"
+
+/*
+ * Declare the basic structures for the 3 different
+ * floating-point precisions.
+ *        
+ * Single number  
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |s|       exp     |               mantissa                      |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+#define	Sall(object) (object)
+#define	Ssign(object) Bitfield_extract( 0,  1,object)
+#define	Ssignedsign(object) Bitfield_signed_extract( 0,  1,object)
+#define	Sexponent(object) Bitfield_extract( 1,  8,object)
+#define	Smantissa(object) Bitfield_mask( 9, 23,object)
+#define	Ssignaling(object) Bitfield_extract( 9,  1,object)
+#define	Ssignalingnan(object) Bitfield_extract( 1,  9,object)
+#define	Shigh2mantissa(object) Bitfield_extract( 9,  2,object)
+#define	Sexponentmantissa(object) Bitfield_mask( 1, 31,object)
+#define	Ssignexponent(object) Bitfield_extract( 0,  9,object)
+#define	Shidden(object) Bitfield_extract( 8,  1,object)
+#define	Shiddenoverflow(object) Bitfield_extract( 7,  1,object)
+#define	Shiddenhigh7mantissa(object) Bitfield_extract( 8,  8,object)
+#define	Shiddenhigh3mantissa(object) Bitfield_extract( 8,  4,object)
+#define	Slow(object) Bitfield_mask( 31,  1,object)
+#define	Slow4(object) Bitfield_mask( 28,  4,object)
+#define	Slow31(object) Bitfield_mask( 1, 31,object)
+#define	Shigh31(object) Bitfield_extract( 0, 31,object)
+#define	Ssignedhigh31(object) Bitfield_signed_extract( 0, 31,object)
+#define	Shigh4(object) Bitfield_extract( 0,  4,object)
+#define	Sbit24(object) Bitfield_extract( 24,  1,object)
+#define	Sbit28(object) Bitfield_extract( 28,  1,object)
+#define	Sbit29(object) Bitfield_extract( 29,  1,object)
+#define	Sbit30(object) Bitfield_extract( 30,  1,object)
+#define	Sbit31(object) Bitfield_mask( 31,  1,object)
+
+#define Deposit_ssign(object,value) Bitfield_deposit(value,0,1,object)
+#define Deposit_sexponent(object,value) Bitfield_deposit(value,1,8,object)
+#define Deposit_smantissa(object,value) Bitfield_deposit(value,9,23,object)
+#define Deposit_shigh2mantissa(object,value) Bitfield_deposit(value,9,2,object)
+#define Deposit_sexponentmantissa(object,value) \
+    Bitfield_deposit(value,1,31,object)
+#define Deposit_ssignexponent(object,value) Bitfield_deposit(value,0,9,object)
+#define Deposit_slow(object,value) Bitfield_deposit(value,31,1,object)
+#define Deposit_shigh4(object,value) Bitfield_deposit(value,0,4,object)
+
+#define	Is_ssign(object) Bitfield_mask( 0,  1,object)
+#define	Is_ssignaling(object) Bitfield_mask( 9,  1,object)
+#define	Is_shidden(object) Bitfield_mask( 8,  1,object)
+#define	Is_shiddenoverflow(object) Bitfield_mask( 7,  1,object)
+#define	Is_slow(object) Bitfield_mask( 31,  1,object)
+#define	Is_sbit24(object) Bitfield_mask( 24,  1,object)
+#define	Is_sbit28(object) Bitfield_mask( 28,  1,object)
+#define	Is_sbit29(object) Bitfield_mask( 29,  1,object)
+#define	Is_sbit30(object) Bitfield_mask( 30,  1,object)
+#define	Is_sbit31(object) Bitfield_mask( 31,  1,object)
+
+/* 
+ * Double number.
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |s|       exponent      |          mantissa part 1              |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    mantissa part 2                            |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+#define Dallp1(object) (object)
+#define Dsign(object) Bitfield_extract( 0,  1,object)
+#define Dsignedsign(object) Bitfield_signed_extract( 0,  1,object)
+#define Dexponent(object) Bitfield_extract( 1,  11,object)
+#define Dmantissap1(object) Bitfield_mask( 12, 20,object)
+#define Dsignaling(object) Bitfield_extract( 12,  1,object)
+#define Dsignalingnan(object) Bitfield_extract( 1,  12,object)
+#define Dhigh2mantissa(object) Bitfield_extract( 12,  2,object)
+#define Dexponentmantissap1(object) Bitfield_mask( 1, 31,object)
+#define Dsignexponent(object) Bitfield_extract( 0, 12,object)
+#define Dhidden(object) Bitfield_extract( 11,  1,object)
+#define Dhiddenoverflow(object) Bitfield_extract( 10,  1,object)
+#define Dhiddenhigh7mantissa(object) Bitfield_extract( 11,  8,object)
+#define Dhiddenhigh3mantissa(object) Bitfield_extract( 11,  4,object)
+#define Dlowp1(object) Bitfield_mask( 31,  1,object)
+#define Dlow31p1(object) Bitfield_mask( 1, 31,object)
+#define Dhighp1(object) Bitfield_extract( 0,  1,object)
+#define Dhigh4p1(object) Bitfield_extract( 0,  4,object)
+#define Dhigh31p1(object) Bitfield_extract( 0, 31,object)
+#define Dsignedhigh31p1(object) Bitfield_signed_extract( 0, 31,object)
+#define Dbit3p1(object) Bitfield_extract( 3,  1,object)
+
+#define Deposit_dsign(object,value) Bitfield_deposit(value,0,1,object)
+#define Deposit_dexponent(object,value) Bitfield_deposit(value,1,11,object)
+#define Deposit_dmantissap1(object,value) Bitfield_deposit(value,12,20,object)
+#define Deposit_dhigh2mantissa(object,value) Bitfield_deposit(value,12,2,object)
+#define Deposit_dexponentmantissap1(object,value) \
+    Bitfield_deposit(value,1,31,object)
+#define Deposit_dsignexponent(object,value) Bitfield_deposit(value,0,12,object)
+#define Deposit_dlowp1(object,value) Bitfield_deposit(value,31,1,object)
+#define Deposit_dhigh4p1(object,value) Bitfield_deposit(value,0,4,object)
+
+#define Is_dsign(object) Bitfield_mask( 0,  1,object)
+#define Is_dsignaling(object) Bitfield_mask( 12,  1,object)
+#define Is_dhidden(object) Bitfield_mask( 11,  1,object)
+#define Is_dhiddenoverflow(object) Bitfield_mask( 10,  1,object)
+#define Is_dlowp1(object) Bitfield_mask( 31,  1,object)
+#define Is_dhighp1(object) Bitfield_mask( 0,  1,object)
+#define Is_dbit3p1(object) Bitfield_mask( 3,  1,object)
+
+#define Dallp2(object) (object)
+#define Dmantissap2(object) (object)
+#define Dlowp2(object) Bitfield_mask( 31,  1,object)
+#define Dlow4p2(object) Bitfield_mask( 28,  4,object)
+#define Dlow31p2(object) Bitfield_mask( 1, 31,object)
+#define Dhighp2(object) Bitfield_extract( 0,  1,object)
+#define Dhigh31p2(object) Bitfield_extract( 0, 31,object)
+#define Dbit2p2(object) Bitfield_extract( 2,  1,object)
+#define Dbit3p2(object) Bitfield_extract( 3,  1,object)
+#define Dbit21p2(object) Bitfield_extract( 21,  1,object)
+#define Dbit28p2(object) Bitfield_extract( 28,  1,object)
+#define Dbit29p2(object) Bitfield_extract( 29,  1,object)
+#define Dbit30p2(object) Bitfield_extract( 30,  1,object)
+#define Dbit31p2(object) Bitfield_mask( 31,  1,object)
+
+#define Deposit_dlowp2(object,value) Bitfield_deposit(value,31,1,object)
+
+#define Is_dlowp2(object) Bitfield_mask( 31,  1,object)
+#define Is_dhighp2(object) Bitfield_mask( 0,  1,object)
+#define Is_dbit2p2(object) Bitfield_mask( 2,  1,object)
+#define Is_dbit3p2(object) Bitfield_mask( 3,  1,object)
+#define Is_dbit21p2(object) Bitfield_mask( 21,  1,object)
+#define Is_dbit28p2(object) Bitfield_mask( 28,  1,object)
+#define Is_dbit29p2(object) Bitfield_mask( 29,  1,object)
+#define Is_dbit30p2(object) Bitfield_mask( 30,  1,object)
+#define Is_dbit31p2(object) Bitfield_mask( 31,  1,object)
+
+/* 
+ * Quad number.
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |s|          exponent           |      mantissa part 1          |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    mantissa part 2                            |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    mantissa part 3                            |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    mantissa part 4                            |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+typedef struct
+    {
+    union
+	{
+	struct { unsigned qallp1; } u_qallp1;
+/* Not needed for now...
+	Bitfield_extract( 0,  1,u_qsign,qsign)
+	Bitfield_signed_extract( 0,  1,u_qsignedsign,qsignedsign)
+	Bitfield_extract( 1, 15,u_qexponent,qexponent)
+	Bitfield_extract(16, 16,u_qmantissap1,qmantissap1)
+	Bitfield_extract(16,  1,u_qsignaling,qsignaling)
+	Bitfield_extract(1,  16,u_qsignalingnan,qsignalingnan)
+	Bitfield_extract(16,  2,u_qhigh2mantissa,qhigh2mantissa)
+	Bitfield_extract( 1, 31,u_qexponentmantissap1,qexponentmantissap1)
+	Bitfield_extract( 0, 16,u_qsignexponent,qsignexponent)
+	Bitfield_extract(15,  1,u_qhidden,qhidden)
+	Bitfield_extract(14,  1,u_qhiddenoverflow,qhiddenoverflow)
+	Bitfield_extract(15,  8,u_qhiddenhigh7mantissa,qhiddenhigh7mantissa)
+	Bitfield_extract(15,  4,u_qhiddenhigh3mantissa,qhiddenhigh3mantissa)
+	Bitfield_extract(31,  1,u_qlowp1,qlowp1)
+	Bitfield_extract( 1, 31,u_qlow31p1,qlow31p1)
+	Bitfield_extract( 0,  1,u_qhighp1,qhighp1)
+	Bitfield_extract( 0,  4,u_qhigh4p1,qhigh4p1)
+	Bitfield_extract( 0, 31,u_qhigh31p1,qhigh31p1)
+  */
+	} quad_u1;
+    union
+	{
+	struct { unsigned qallp2; } u_qallp2;
+  /* Not needed for now...
+	Bitfield_extract(31,  1,u_qlowp2,qlowp2)
+	Bitfield_extract( 1, 31,u_qlow31p2,qlow31p2)
+	Bitfield_extract( 0,  1,u_qhighp2,qhighp2)
+	Bitfield_extract( 0, 31,u_qhigh31p2,qhigh31p2)
+   */
+	} quad_u2;
+    union
+	{
+	struct { unsigned qallp3; } u_qallp3;
+  /* Not needed for now...
+	Bitfield_extract(31,  1,u_qlowp3,qlowp3)
+	Bitfield_extract( 1, 31,u_qlow31p3,qlow31p3)
+	Bitfield_extract( 0,  1,u_qhighp3,qhighp3)
+	Bitfield_extract( 0, 31,u_qhigh31p3,qhigh31p3)
+   */ 
+	} quad_u3;
+    union
+	{
+	struct { unsigned qallp4; } u_qallp4;
+    /* Not need for now...
+	Bitfield_extract(31,  1,u_qlowp4,qlowp4)
+	Bitfield_extract( 1, 31,u_qlow31p4,qlow31p4)
+	Bitfield_extract( 0,  1,u_qhighp4,qhighp4)
+	Bitfield_extract( 0, 31,u_qhigh31p4,qhigh31p4)
+     */
+	} quad_u4;
+    } quad_floating_point;
+
+/* Extension - An additional structure to hold the guard, round and
+ *             sticky bits during computations.
+ */
+#define Extall(object) (object)
+#define Extsign(object) Bitfield_extract( 0,  1,object)
+#define Exthigh31(object) Bitfield_extract( 0, 31,object)
+#define Extlow31(object) Bitfield_extract( 1, 31,object)
+#define Extlow(object) Bitfield_extract( 31,  1,object)
+
+/*
+ * Single extended - The upper word is just like single precision,
+ *                 but one additional word of mantissa is needed.
+ */
+#define Sextallp1(object) (object)
+#define Sextallp2(object) (object)
+#define Sextlowp1(object) Bitfield_extract( 31,  1,object)
+#define Sexthighp2(object) Bitfield_extract( 0,  1,object)
+#define Sextlow31p2(object) Bitfield_extract( 1, 31,object)
+#define Sexthiddenoverflow(object) Bitfield_extract( 4,  1,object)
+#define Is_sexthiddenoverflow(object) Bitfield_mask( 4,  1,object)
+
+/*
+ * Double extended - The upper two words are just like double precision,
+ *		     but two additional words of mantissa are needed.
+ */
+#define Dextallp1(object) (object)
+#define Dextallp2(object) (object)
+#define Dextallp3(object) (object)
+#define Dextallp4(object) (object)
+#define Dextlowp2(object) Bitfield_extract( 31,  1,object)
+#define Dexthighp3(object) Bitfield_extract( 0,  1,object)
+#define Dextlow31p3(object) Bitfield_extract( 1, 31,object)
+#define Dexthiddenoverflow(object) Bitfield_extract( 10,  1,object)
+#define Is_dexthiddenoverflow(object) Bitfield_mask( 10,  1,object)
+#define Deposit_dextlowp4(object,value) Bitfield_deposit(value,31,1,object)
+
+/*
+ * Declare the basic structures for the 3 different
+ * fixed-point precisions.
+ *        
+ * Single number  
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |s|                    integer                                  |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+typedef int sgl_integer;
+
+/* 
+ * Double number.
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |s|                     high integer                            |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                       low integer                             |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+struct dint {
+        int  wd0;
+        unsigned int wd1;
+};
+
+struct dblwd {
+        unsigned int wd0;
+        unsigned int wd1;
+};
+
+/* 
+ * Quad number.
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |s|                  integer part1                              |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    integer part 2                             |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    integer part 3                             |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                    integer part 4                             |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+
+struct quadwd {
+        int  wd0;
+        unsigned int wd1;
+        unsigned int wd2;
+        unsigned int wd3;
+};
+
+typedef struct quadwd quad_integer;
+
+
+/* useful typedefs */
+typedef unsigned int sgl_floating_point;
+typedef struct dblwd dbl_floating_point;
+typedef struct dint dbl_integer;
+typedef struct dblwd dbl_unsigned;
+
+/* 
+ * Define the different precisions' parameters.
+ */
+#define SGL_BITLENGTH 32
+#define SGL_EMAX 127
+#define SGL_EMIN (-126)
+#define SGL_BIAS 127
+#define SGL_WRAP 192
+#define SGL_INFINITY_EXPONENT (SGL_EMAX+SGL_BIAS+1)
+#define SGL_THRESHOLD 32
+#define SGL_EXP_LENGTH 8
+#define SGL_P 24
+
+#define DBL_BITLENGTH 64
+#define DBL_EMAX 1023
+#define DBL_EMIN (-1022)
+#define DBL_BIAS 1023
+#define DBL_WRAP 1536
+#define DBL_INFINITY_EXPONENT (DBL_EMAX+DBL_BIAS+1)
+#define DBL_THRESHOLD 64
+#define DBL_EXP_LENGTH 11
+#define DBL_P 53
+
+#define QUAD_BITLENGTH 128
+#define QUAD_EMAX 16383
+#define QUAD_EMIN (-16382)
+#define QUAD_BIAS 16383
+#define QUAD_WRAP 24576
+#define QUAD_INFINITY_EXPONENT (QUAD_EMAX+QUAD_BIAS+1)
+#define QUAD_P 113
+
+/* Boolean Values etc. */
+#define FALSE 0
+#define TRUE (!FALSE)
+#define NOT !
+#define XOR ^
+
+/* other constants */
+#undef NULL
+#define NULL 0
+#define NIL 0
+#define SGL 0
+#define DBL 1
+#define BADFMT 2
+#define QUAD 3
+
+
+/* Types */
+typedef int boolean;
+typedef int FORMAT;
+typedef int VOID;
+
+
+/* Declare status register equivalent to FPUs architecture.
+ *
+ *  0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930 1
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |V|Z|O|U|I|C|  rsv  |  model    | version |RM |rsv|T|r|V|Z|O|U|I|
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+#define Cbit(object) Bitfield_extract( 5, 1,object)
+#define Tbit(object) Bitfield_extract( 25, 1,object)
+#define Roundingmode(object) Bitfield_extract( 21, 2,object)
+#define Invalidtrap(object) Bitfield_extract( 27, 1,object)
+#define Divisionbyzerotrap(object) Bitfield_extract( 28, 1,object)
+#define Overflowtrap(object) Bitfield_extract( 29, 1,object)
+#define Underflowtrap(object) Bitfield_extract( 30, 1,object)
+#define Inexacttrap(object) Bitfield_extract( 31, 1,object)
+#define Invalidflag(object) Bitfield_extract( 0, 1,object)
+#define Divisionbyzeroflag(object) Bitfield_extract( 1, 1,object)
+#define Overflowflag(object) Bitfield_extract( 2, 1,object)
+#define Underflowflag(object) Bitfield_extract( 3, 1,object)
+#define Inexactflag(object) Bitfield_extract( 4, 1,object)
+#define Allflags(object) Bitfield_extract( 0, 5,object)
+
+/* Definitions relevant to the status register */
+
+/* Rounding Modes */
+#define ROUNDNEAREST 0
+#define ROUNDZERO    1
+#define ROUNDPLUS    2
+#define ROUNDMINUS   3
+
+/* Exceptions */
+#define NOEXCEPTION		0x0
+#define INVALIDEXCEPTION	0x20
+#define DIVISIONBYZEROEXCEPTION	0x10
+#define OVERFLOWEXCEPTION	0x08
+#define UNDERFLOWEXCEPTION	0x04
+#define INEXACTEXCEPTION	0x02
+#define UNIMPLEMENTEDEXCEPTION	0x01
+
+/* New exceptions for the 2E Opcode */
+#define OPC_2E_INVALIDEXCEPTION     0x30
+#define OPC_2E_OVERFLOWEXCEPTION    0x18
+#define OPC_2E_UNDERFLOWEXCEPTION   0x0c
+#define OPC_2E_INEXACTEXCEPTION     0x12
+
+/* Declare exception registers equivalent to FPUs architecture 
+ *
+ *  0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930 1
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |excepttype |  r1     | r2/ext  |  operation  |parm |n| t/cond  |
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+#define Allexception(object) (object)
+#define Exceptiontype(object) Bitfield_extract( 0, 6,object)
+#define Instructionfield(object) Bitfield_mask( 6,26,object)
+#define Parmfield(object) Bitfield_extract( 23, 3,object)
+#define Rabit(object) Bitfield_extract( 24, 1,object)
+#define Ibit(object) Bitfield_extract( 25, 1,object)
+
+#define Set_exceptiontype(object,value) Bitfield_deposit(value, 0, 6,object)
+#define Set_parmfield(object,value) Bitfield_deposit(value, 23, 3,object)
+#define Set_exceptiontype_and_instr_field(exception,instruction,object) \
+    object = exception << 26 | instruction
+
+/* Declare the condition field
+ *
+ *  0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930 1
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ * |                                                     |G|L|E|U|X|
+ * +-------+-------+-------+-------+-------+-------+-------+-------+
+ */
+#define Allexception(object) (object)
+#define Greaterthanbit(object) Bitfield_extract( 27, 1,object)
+#define Lessthanbit(object) Bitfield_extract( 28, 1,object)
+#define Equalbit(object) Bitfield_extract( 29, 1,object)
+#define Unorderedbit(object) Bitfield_extract( 30, 1,object)
+#define Exceptionbit(object) Bitfield_extract( 31, 1,object)
+
+/* An alias name for the status register */
+#define Fpustatus_register (*status)
+
+/**************************************************
+ * Status register referencing and manipulation.  *
+ **************************************************/
+
+/* Rounding mode */
+#define Rounding_mode()  Roundingmode(Fpustatus_register)
+#define Is_rounding_mode(rmode) \
+    (Roundingmode(Fpustatus_register) == rmode)
+#define Set_rounding_mode(value) \
+    Bitfield_deposit(value,21,2,Fpustatus_register)
+
+/* Boolean testing of the trap enable bits */
+#define Is_invalidtrap_enabled() Invalidtrap(Fpustatus_register)
+#define Is_divisionbyzerotrap_enabled() Divisionbyzerotrap(Fpustatus_register)
+#define Is_overflowtrap_enabled() Overflowtrap(Fpustatus_register)
+#define Is_underflowtrap_enabled() Underflowtrap(Fpustatus_register)
+#define Is_inexacttrap_enabled() Inexacttrap(Fpustatus_register)
+
+/* Set the indicated flags in the status register */
+#define Set_invalidflag() Bitfield_deposit(1,0,1,Fpustatus_register)
+#define Set_divisionbyzeroflag() Bitfield_deposit(1,1,1,Fpustatus_register)
+#define Set_overflowflag() Bitfield_deposit(1,2,1,Fpustatus_register)
+#define Set_underflowflag() Bitfield_deposit(1,3,1,Fpustatus_register)
+#define Set_inexactflag() Bitfield_deposit(1,4,1,Fpustatus_register)
+
+#define Clear_all_flags() Bitfield_deposit(0,0,5,Fpustatus_register)
+
+/* Manipulate the trap and condition code bits (tbit and cbit) */
+#define Set_tbit() Bitfield_deposit(1,25,1,Fpustatus_register)
+#define Clear_tbit() Bitfield_deposit(0,25,1,Fpustatus_register)
+#define Is_tbit_set() Tbit(Fpustatus_register)
+#define Is_cbit_set() Cbit(Fpustatus_register)
+
+#define Set_status_cbit(value)  \
+        Bitfield_deposit(value,5,1,Fpustatus_register)
+
+/*******************************
+ * Condition field referencing *
+ *******************************/
+#define Unordered(cond) Unorderedbit(cond)
+#define Equal(cond) Equalbit(cond)
+#define Lessthan(cond) Lessthanbit(cond)
+#define Greaterthan(cond) Greaterthanbit(cond)
+#define Exception(cond) Exceptionbit(cond)
+
+
+/* Defines for the extension */
+#define Ext_isone_sign(extent) (Extsign(extent))
+#define Ext_isnotzero(extent) \
+    (Extall(extent))
+#define Ext_isnotzero_lower(extent) \
+    (Extlow31(extent))
+#define Ext_leftshiftby1(extent) \
+    Extall(extent) <<= 1
+#define Ext_negate(extent) \
+    (int )Extall(extent) = 0 - (int )Extall(extent)
+#define Ext_setone_low(extent) Bitfield_deposit(1,31,1,extent)
+#define Ext_setzero(extent) Extall(extent) = 0
+
+typedef int operation;
+
+/* error messages */
+
+#define		NONE		0
+#define		UNDEFFPINST	1
+
+/* Function definitions: opcode, opclass */
+#define FTEST	(1<<2) | 0
+#define FCPY	(2<<2) | 0
+#define FABS	(3<<2) | 0
+#define FSQRT   (4<<2) | 0
+#define FRND    (5<<2) | 0
+
+#define FCNVFF	(0<<2) | 1
+#define FCNVXF	(1<<2) | 1
+#define FCNVFX	(2<<2) | 1
+#define FCNVFXT	(3<<2) | 1
+
+#define FCMP    (0<<2) | 2
+
+#define FADD	(0<<2) | 3
+#define FSUB	(1<<2) | 3
+#define FMPY	(2<<2) | 3
+#define FDIV	(3<<2) | 3
+#define FREM	(4<<2) | 3
+
diff -Nru a/arch/parisc/math-emu/fmpyfadd.c b/arch/parisc/math-emu/fmpyfadd.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fmpyfadd.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,2655 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/fmpyfadd.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Double Floating-point Multiply Fused Add
+ *	Double Floating-point Multiply Negate Fused Add
+ *	Single Floating-point Multiply Fused Add
+ *	Single Floating-point Multiply Negate Fused Add
+ *
+ *  External Interfaces:
+ *	dbl_fmpyfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+ *	dbl_fmpynfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+ *	sgl_fmpyfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+ *	sgl_fmpynfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+
+
+/*
+ *  Double Floating-point Multiply Fused Add
+ */
+
+int
+dbl_fmpyfadd(
+	    dbl_floating_point *src1ptr,
+	    dbl_floating_point *src2ptr,
+	    dbl_floating_point *src3ptr,
+	    unsigned int *status,
+	    dbl_floating_point *dstptr)
+{
+	unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2, opnd3p1, opnd3p2;
+	register unsigned int tmpresp1, tmpresp2, tmpresp3, tmpresp4;
+	unsigned int rightp1, rightp2, rightp3, rightp4;
+	unsigned int resultp1, resultp2 = 0, resultp3 = 0, resultp4 = 0;
+	register int mpy_exponent, add_exponent, count;
+	boolean inexact = FALSE, is_tiny = FALSE;
+
+	unsigned int signlessleft1, signlessright1, save;
+	register int result_exponent, diff_exponent;
+	int sign_save, jumpsize;
+	
+	Dbl_copyfromptr(src1ptr,opnd1p1,opnd1p2);
+	Dbl_copyfromptr(src2ptr,opnd2p1,opnd2p2);
+	Dbl_copyfromptr(src3ptr,opnd3p1,opnd3p2);
+
+	/* 
+	 * set sign bit of result of multiply
+	 */
+	if (Dbl_sign(opnd1p1) ^ Dbl_sign(opnd2p1)) 
+		Dbl_setnegativezerop1(resultp1); 
+	else Dbl_setzerop1(resultp1);
+
+	/*
+	 * Generate multiply exponent 
+	 */
+	mpy_exponent = Dbl_exponent(opnd1p1) + Dbl_exponent(opnd2p1) - DBL_BIAS;
+
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd1p1)) {
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			if (Dbl_isnotnan(opnd2p1,opnd2p2) &&
+			    Dbl_isnotnan(opnd3p1,opnd3p2)) {
+				if (Dbl_iszero_exponentmantissa(opnd2p1,opnd2p2)) {
+					/* 
+					 * invalid since operands are infinity 
+					 * and zero 
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Dbl_isinfinity(opnd3p1,opnd3p2) &&
+				    (Dbl_sign(resultp1) ^ Dbl_sign(opnd3p1))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+			 	 * return infinity
+			 	 */
+				Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+		 	 * is NaN; signaling or quiet?
+		 	 */
+			if (Dbl_isone_signaling(opnd1p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled()) 
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd1p1);
+			}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd2p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd2p1);
+				Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd3p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd3p1);
+				Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/*
+		 	 * return quiet NaN
+		 	 */
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd2p1)) {
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			if (Dbl_isnotnan(opnd3p1,opnd3p2)) {
+				if (Dbl_iszero_exponentmantissa(opnd1p1,opnd1p2)) {
+					/* 
+					 * invalid since multiply operands are
+					 * zero & infinity
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Dbl_makequietnan(opnd2p1,opnd2p2);
+					Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Dbl_isinfinity(opnd3p1,opnd3p2) &&
+				    (Dbl_sign(resultp1) ^ Dbl_sign(opnd3p1))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+				       		return(OPC_2E_INVALIDEXCEPTION);
+				       	Set_invalidflag();
+				       	Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * return infinity
+				 */
+				Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Dbl_isone_signaling(opnd2p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd2p1);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd3p1)) {
+			       	/* trap if INVALIDTRAP enabled */
+			       	if (Is_invalidtrap_enabled())
+				   		return(OPC_2E_INVALIDEXCEPTION);
+			       	/* make NaN quiet */
+			       	Set_invalidflag();
+			       	Dbl_set_quiet(opnd3p1);
+				Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+		       		return(NOEXCEPTION);
+			}
+			/*
+			 * return quiet NaN
+			 */
+			Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check third operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd3p1)) {
+		if (Dbl_iszero_mantissa(opnd3p1,opnd3p2)) {
+			/* return infinity */
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		} else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Dbl_isone_signaling(opnd3p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd3p1);
+			}
+			/*
+			 * return quiet NaN
+ 			 */
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		}
+    	}
+
+	/*
+	 * Generate multiply mantissa
+	 */
+	if (Dbl_isnotzero_exponent(opnd1p1)) {
+		/* set hidden bit */
+		Dbl_clear_signexponent_set_hidden(opnd1p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Dbl_iszero_exponentmantissa(opnd3p1,opnd3p2)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Dbl_or_signs(opnd3p1,resultp1);
+				} else {
+					Dbl_and_signs(opnd3p1,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Dbl_iszero_exponent(opnd3p1) &&
+			         Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Dbl_signextendedsign(opnd3p1);
+				result_exponent = 0;
+                    		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+                    		Dbl_normalize(opnd3p1,opnd3p2,result_exponent);
+                    		Dbl_set_sign(opnd3p1,/*using*/sign_save);
+                    		Dbl_setwrapped_exponent(opnd3p1,result_exponent,
+							unfl);
+                    		Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized, adjust exponent */
+		Dbl_clear_signexponent(opnd1p1);
+		Dbl_leftshiftby1(opnd1p1,opnd1p2);
+		Dbl_normalize(opnd1p1,opnd1p2,mpy_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Dbl_isnotzero_exponent(opnd2p1)) {
+		Dbl_clear_signexponent_set_hidden(opnd2p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Dbl_iszero_exponentmantissa(opnd3p1,opnd3p2)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Dbl_or_signs(opnd3p1,resultp1);
+				} else {
+					Dbl_and_signs(opnd3p1,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Dbl_iszero_exponent(opnd3p1) &&
+			    Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Dbl_signextendedsign(opnd3p1);
+				result_exponent = 0;
+                    		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+                    		Dbl_normalize(opnd3p1,opnd3p2,result_exponent);
+                    		Dbl_set_sign(opnd3p1,/*using*/sign_save);
+                    		Dbl_setwrapped_exponent(opnd3p1,result_exponent,
+							unfl);
+                    		Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+                    		/* inexact = FALSE */
+				return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized; want to normalize */
+		Dbl_clear_signexponent(opnd2p1);
+		Dbl_leftshiftby1(opnd2p1,opnd2p2);
+		Dbl_normalize(opnd2p1,opnd2p2,mpy_exponent);
+	}
+
+	/* Multiply the first two source mantissas together */
+
+	/* 
+	 * The intermediate result will be kept in tmpres,
+	 * which needs enough room for 106 bits of mantissa,
+	 * so lets call it a Double extended.
+	 */
+	Dblext_setzero(tmpresp1,tmpresp2,tmpresp3,tmpresp4);
+
+	/* 
+	 * Four bits at a time are inspected in each loop, and a 
+	 * simple shift and add multiply algorithm is used. 
+	 */ 
+	for (count = DBL_P-1; count >= 0; count -= 4) {
+		Dblext_rightshiftby4(tmpresp1,tmpresp2,tmpresp3,tmpresp4);
+		if (Dbit28p2(opnd1p2)) {
+	 		/* Fourword_add should be an ADD followed by 3 ADDC's */
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4, 
+			 opnd2p1<<3 | opnd2p2>>29, opnd2p2<<3, 0, 0);
+		}
+		if (Dbit29p2(opnd1p2)) {
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4,
+			 opnd2p1<<2 | opnd2p2>>30, opnd2p2<<2, 0, 0);
+		}
+		if (Dbit30p2(opnd1p2)) {
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4,
+			 opnd2p1<<1 | opnd2p2>>31, opnd2p2<<1, 0, 0);
+		}
+		if (Dbit31p2(opnd1p2)) {
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4,
+			 opnd2p1, opnd2p2, 0, 0);
+		}
+		Dbl_rightshiftby4(opnd1p1,opnd1p2);
+	}
+	if (Is_dexthiddenoverflow(tmpresp1)) {
+		/* result mantissa >= 2 (mantissa overflow) */
+		mpy_exponent++;
+		Dblext_rightshiftby1(tmpresp1,tmpresp2,tmpresp3,tmpresp4);
+	}
+
+	/*
+	 * Restore the sign of the mpy result which was saved in resultp1.
+	 * The exponent will continue to be kept in mpy_exponent.
+	 */
+	Dblext_set_sign(tmpresp1,Dbl_sign(resultp1));
+
+	/* 
+	 * No rounding is required, since the result of the multiply
+	 * is exact in the extended format.
+	 */
+
+	/*
+	 * Now we are ready to perform the add portion of the operation.
+	 *
+	 * The exponents need to be kept as integers for now, since the
+	 * multiply result might not fit into the exponent field.  We
+	 * can't overflow or underflow because of this yet, since the
+	 * add could bring the final result back into range.
+	 */
+	add_exponent = Dbl_exponent(opnd3p1);
+
+	/*
+	 * Check for denormalized or zero add operand.
+	 */
+	if (add_exponent == 0) {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd3p1,opnd3p2)) {
+			/* right is zero */
+			/* Left can't be zero and must be result.
+			 *
+			 * The final result is now in tmpres and mpy_exponent,
+			 * and needs to be rounded and squeezed back into
+			 * double precision format from double extended.
+			 */
+			result_exponent = mpy_exponent;
+			Dblext_copy(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
+				resultp1,resultp2,resultp3,resultp4);
+			sign_save = Dbl_signextendedsign(resultp1);/*save sign*/
+			goto round;
+		}
+
+		/* 
+		 * Neither are zeroes.  
+		 * Adjust exponent and normalize add operand.
+		 */
+		sign_save = Dbl_signextendedsign(opnd3p1);	/* save sign */
+		Dbl_clear_signexponent(opnd3p1);
+		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+		Dbl_normalize(opnd3p1,opnd3p2,add_exponent);
+		Dbl_set_sign(opnd3p1,sign_save);	/* restore sign */
+	} else {
+		Dbl_clear_exponent_set_hidden(opnd3p1);
+	}
+	/*
+	 * Copy opnd3 to the double extended variable called right.
+	 */
+	Dbl_copyto_dblext(opnd3p1,opnd3p2,rightp1,rightp2,rightp3,rightp4);
+
+	/*
+	 * A zero "save" helps discover equal operands (for later),
+	 * and is used in swapping operands (if needed).
+	 */
+	Dblext_xortointp1(tmpresp1,rightp1,/*to*/save);
+
+	/*
+	 * Compare magnitude of operands.
+	 */
+	Dblext_copytoint_exponentmantissap1(tmpresp1,signlessleft1);
+	Dblext_copytoint_exponentmantissap1(rightp1,signlessright1);
+	if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
+	    Dblext_ismagnitudeless(tmpresp2,rightp2,signlessleft1,signlessright1)){
+		/*
+		 * Set the left operand to the larger one by XOR swap.
+		 * First finish the first word "save".
+		 */
+		Dblext_xorfromintp1(save,rightp1,/*to*/rightp1);
+		Dblext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
+		Dblext_swap_lower(tmpresp2,tmpresp3,tmpresp4,
+			rightp2,rightp3,rightp4);
+		/* also setup exponents used in rest of routine */
+		diff_exponent = add_exponent - mpy_exponent;
+		result_exponent = add_exponent;
+	} else {
+		/* also setup exponents used in rest of routine */
+		diff_exponent = mpy_exponent - add_exponent;
+		result_exponent = mpy_exponent;
+	}
+	/* Invariant: left is not smaller than right. */
+
+	/*
+	 * Special case alignment of operands that would force alignment
+	 * beyond the extent of the extension.  A further optimization
+	 * could special case this but only reduces the path length for
+	 * this infrequent case.
+	 */
+	if (diff_exponent > DBLEXT_THRESHOLD) {
+		diff_exponent = DBLEXT_THRESHOLD;
+	}
+
+	/* Align right operand by shifting it to the right */
+	Dblext_clear_sign(rightp1);
+	Dblext_right_align(rightp1,rightp2,rightp3,rightp4,
+		/*shifted by*/diff_exponent);
+	
+	/* Treat sum and difference of the operands separately. */
+	if ((int)save < 0) {
+		/*
+		 * Difference of the two operands.  Overflow can occur if the
+		 * multiply overflowed.  A borrow can occur out of the hidden
+		 * bit and force a post normalization phase.
+		 */
+		Dblext_subtract(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
+			rightp1,rightp2,rightp3,rightp4,
+			resultp1,resultp2,resultp3,resultp4);
+		sign_save = Dbl_signextendedsign(resultp1);
+		if (Dbl_iszero_hidden(resultp1)) {
+			/* Handle normalization */
+		/* A straight foward algorithm would now shift the
+		 * result and extension left until the hidden bit
+		 * becomes one.  Not all of the extension bits need
+		 * participate in the shift.  Only the two most 
+		 * significant bits (round and guard) are needed.
+		 * If only a single shift is needed then the guard
+		 * bit becomes a significant low order bit and the
+		 * extension must participate in the rounding.
+		 * If more than a single shift is needed, then all
+		 * bits to the right of the guard bit are zeros, 
+		 * and the guard bit may or may not be zero. */
+			Dblext_leftshiftby1(resultp1,resultp2,resultp3,
+				resultp4);
+
+			/* Need to check for a zero result.  The sign and
+			 * exponent fields have already been zeroed.  The more
+			 * efficient test of the full object can be used.
+			 */
+			 if(Dblext_iszero(resultp1,resultp2,resultp3,resultp4)){
+				/* Must have been "x-x" or "x+(-x)". */
+				if (Is_rounding_mode(ROUNDMINUS))
+					Dbl_setone_sign(resultp1);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+			result_exponent--;
+
+			/* Look to see if normalization is finished. */
+			if (Dbl_isone_hidden(resultp1)) {
+				/* No further normalization is needed */
+				goto round;
+			}
+
+			/* Discover first one bit to determine shift amount.
+			 * Use a modified binary search.  We have already
+			 * shifted the result one position right and still
+			 * not found a one so the remainder of the extension
+			 * must be zero and simplifies rounding. */
+			/* Scan bytes */
+			while (Dbl_iszero_hiddenhigh7mantissa(resultp1)) {
+				Dblext_leftshiftby8(resultp1,resultp2,resultp3,resultp4);
+				result_exponent -= 8;
+			}
+			/* Now narrow it down to the nibble */
+			if (Dbl_iszero_hiddenhigh3mantissa(resultp1)) {
+				/* The lower nibble contains the
+				 * normalizing one */
+				Dblext_leftshiftby4(resultp1,resultp2,resultp3,resultp4);
+				result_exponent -= 4;
+			}
+			/* Select case where first bit is set (already
+			 * normalized) otherwise select the proper shift. */
+			jumpsize = Dbl_hiddenhigh3mantissa(resultp1);
+			if (jumpsize <= 7) switch(jumpsize) {
+			case 1:
+				Dblext_leftshiftby3(resultp1,resultp2,resultp3,
+					resultp4);
+				result_exponent -= 3;
+				break;
+			case 2:
+			case 3:
+				Dblext_leftshiftby2(resultp1,resultp2,resultp3,
+					resultp4);
+				result_exponent -= 2;
+				break;
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				Dblext_leftshiftby1(resultp1,resultp2,resultp3,
+					resultp4);
+				result_exponent -= 1;
+				break;
+			}
+		} /* end if (hidden...)... */
+	/* Fall through and round */
+	} /* end if (save < 0)... */
+	else {
+		/* Add magnitudes */
+		Dblext_addition(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
+			rightp1,rightp2,rightp3,rightp4,
+			/*to*/resultp1,resultp2,resultp3,resultp4);
+		sign_save = Dbl_signextendedsign(resultp1);
+		if (Dbl_isone_hiddenoverflow(resultp1)) {
+	    		/* Prenormalization required. */
+	    		Dblext_arithrightshiftby1(resultp1,resultp2,resultp3,
+				resultp4);
+	    		result_exponent++;
+		} /* end if hiddenoverflow... */
+	} /* end else ...add magnitudes... */
+
+	/* Round the result.  If the extension and lower two words are
+	 * all zeros, then the result is exact.  Otherwise round in the
+	 * correct direction.  Underflow is possible. If a postnormalization
+	 * is necessary, then the mantissa is all zeros so no shift is needed.
+	 */
+  round:
+	if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
+		Dblext_denormalize(resultp1,resultp2,resultp3,resultp4,
+			result_exponent,is_tiny);
+	}
+	Dbl_set_sign(resultp1,/*using*/sign_save);
+	if (Dblext_isnotzero_mantissap3(resultp3) || 
+	    Dblext_isnotzero_mantissap4(resultp4)) {
+		inexact = TRUE;
+		switch(Rounding_mode()) {
+		case ROUNDNEAREST: /* The default. */
+			if (Dblext_isone_highp3(resultp3)) {
+				/* at least 1/2 ulp */
+				if (Dblext_isnotzero_low31p3(resultp3) ||
+				    Dblext_isnotzero_mantissap4(resultp4) ||
+				    Dblext_isone_lowp2(resultp2)) {
+					/* either exactly half way and odd or
+					 * more than 1/2ulp */
+					Dbl_increment(resultp1,resultp2);
+				}
+			}
+	    		break;
+
+		case ROUNDPLUS:
+	    		if (Dbl_iszero_sign(resultp1)) {
+				/* Round up positive results */
+				Dbl_increment(resultp1,resultp2);
+			}
+			break;
+	    
+		case ROUNDMINUS:
+	    		if (Dbl_isone_sign(resultp1)) {
+				/* Round down negative results */
+				Dbl_increment(resultp1,resultp2);
+			}
+	    
+		case ROUNDZERO:;
+			/* truncate is simple */
+		} /* end switch... */
+		if (Dbl_isone_hiddenoverflow(resultp1)) result_exponent++;
+	}
+	if (result_exponent >= DBL_INFINITY_EXPONENT) {
+                /* trap if OVERFLOWTRAP enabled */
+                if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Dbl_setwrapped_exponent(resultp1,result_exponent,ovfl);
+                        Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_OVERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return (OPC_2E_OVERFLOWEXCEPTION);
+                }
+                inexact = TRUE;
+                Set_overflowflag();
+                /* set result to infinity or largest number */
+                Dbl_setoverflow(resultp1,resultp2);
+
+	} else if (result_exponent <= 0) {	/* underflow case */
+		if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                	Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_UNDERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+	    		return(OPC_2E_UNDERFLOWEXCEPTION);
+		}
+		else if (inexact && is_tiny) Set_underflowflag();
+	}
+	else Dbl_set_exponent(resultp1,result_exponent);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) 
+		if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION);
+		else Set_inexactflag();
+    	return(NOEXCEPTION);
+}
+
+/*
+ *  Double Floating-point Multiply Negate Fused Add
+ */
+
+dbl_fmpynfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+
+dbl_floating_point *src1ptr, *src2ptr, *src3ptr, *dstptr;
+unsigned int *status;
+{
+	unsigned int opnd1p1, opnd1p2, opnd2p1, opnd2p2, opnd3p1, opnd3p2;
+	register unsigned int tmpresp1, tmpresp2, tmpresp3, tmpresp4;
+	unsigned int rightp1, rightp2, rightp3, rightp4;
+	unsigned int resultp1, resultp2 = 0, resultp3 = 0, resultp4 = 0;
+	register int mpy_exponent, add_exponent, count;
+	boolean inexact = FALSE, is_tiny = FALSE;
+
+	unsigned int signlessleft1, signlessright1, save;
+	register int result_exponent, diff_exponent;
+	int sign_save, jumpsize;
+	
+	Dbl_copyfromptr(src1ptr,opnd1p1,opnd1p2);
+	Dbl_copyfromptr(src2ptr,opnd2p1,opnd2p2);
+	Dbl_copyfromptr(src3ptr,opnd3p1,opnd3p2);
+
+	/* 
+	 * set sign bit of result of multiply
+	 */
+	if (Dbl_sign(opnd1p1) ^ Dbl_sign(opnd2p1)) 
+		Dbl_setzerop1(resultp1);
+	else
+		Dbl_setnegativezerop1(resultp1); 
+
+	/*
+	 * Generate multiply exponent 
+	 */
+	mpy_exponent = Dbl_exponent(opnd1p1) + Dbl_exponent(opnd2p1) - DBL_BIAS;
+
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd1p1)) {
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			if (Dbl_isnotnan(opnd2p1,opnd2p2) &&
+			    Dbl_isnotnan(opnd3p1,opnd3p2)) {
+				if (Dbl_iszero_exponentmantissa(opnd2p1,opnd2p2)) {
+					/* 
+					 * invalid since operands are infinity 
+					 * and zero 
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Dbl_isinfinity(opnd3p1,opnd3p2) &&
+				    (Dbl_sign(resultp1) ^ Dbl_sign(opnd3p1))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+			 	 * return infinity
+			 	 */
+				Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+		 	 * is NaN; signaling or quiet?
+		 	 */
+			if (Dbl_isone_signaling(opnd1p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled()) 
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd1p1);
+			}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd2p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd2p1);
+				Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd3p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd3p1);
+				Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/*
+		 	 * return quiet NaN
+		 	 */
+			Dbl_copytoptr(opnd1p1,opnd1p2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd2p1)) {
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			if (Dbl_isnotnan(opnd3p1,opnd3p2)) {
+				if (Dbl_iszero_exponentmantissa(opnd1p1,opnd1p2)) {
+					/* 
+					 * invalid since multiply operands are
+					 * zero & infinity
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Dbl_makequietnan(opnd2p1,opnd2p2);
+					Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Dbl_isinfinity(opnd3p1,opnd3p2) &&
+				    (Dbl_sign(resultp1) ^ Dbl_sign(opnd3p1))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+				       		return(OPC_2E_INVALIDEXCEPTION);
+				       	Set_invalidflag();
+				       	Dbl_makequietnan(resultp1,resultp2);
+					Dbl_copytoptr(resultp1,resultp2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * return infinity
+				 */
+				Dbl_setinfinity_exponentmantissa(resultp1,resultp2);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Dbl_isone_signaling(opnd2p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd2p1);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Dbl_is_signalingnan(opnd3p1)) {
+			       	/* trap if INVALIDTRAP enabled */
+			       	if (Is_invalidtrap_enabled())
+				   		return(OPC_2E_INVALIDEXCEPTION);
+			       	/* make NaN quiet */
+			       	Set_invalidflag();
+			       	Dbl_set_quiet(opnd3p1);
+				Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+		       		return(NOEXCEPTION);
+			}
+			/*
+			 * return quiet NaN
+			 */
+			Dbl_copytoptr(opnd2p1,opnd2p2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check third operand for NaN's or infinity
+	 */
+	if (Dbl_isinfinity_exponent(opnd3p1)) {
+		if (Dbl_iszero_mantissa(opnd3p1,opnd3p2)) {
+			/* return infinity */
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		} else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Dbl_isone_signaling(opnd3p1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Dbl_set_quiet(opnd3p1);
+			}
+			/*
+			 * return quiet NaN
+ 			 */
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		}
+    	}
+
+	/*
+	 * Generate multiply mantissa
+	 */
+	if (Dbl_isnotzero_exponent(opnd1p1)) {
+		/* set hidden bit */
+		Dbl_clear_signexponent_set_hidden(opnd1p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd1p1,opnd1p2)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Dbl_iszero_exponentmantissa(opnd3p1,opnd3p2)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Dbl_or_signs(opnd3p1,resultp1);
+				} else {
+					Dbl_and_signs(opnd3p1,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Dbl_iszero_exponent(opnd3p1) &&
+			         Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Dbl_signextendedsign(opnd3p1);
+				result_exponent = 0;
+                    		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+                    		Dbl_normalize(opnd3p1,opnd3p2,result_exponent);
+                    		Dbl_set_sign(opnd3p1,/*using*/sign_save);
+                    		Dbl_setwrapped_exponent(opnd3p1,result_exponent,
+							unfl);
+                    		Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized, adjust exponent */
+		Dbl_clear_signexponent(opnd1p1);
+		Dbl_leftshiftby1(opnd1p1,opnd1p2);
+		Dbl_normalize(opnd1p1,opnd1p2,mpy_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Dbl_isnotzero_exponent(opnd2p1)) {
+		Dbl_clear_signexponent_set_hidden(opnd2p1);
+	}
+	else {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd2p1,opnd2p2)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Dbl_iszero_exponentmantissa(opnd3p1,opnd3p2)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Dbl_or_signs(opnd3p1,resultp1);
+				} else {
+					Dbl_and_signs(opnd3p1,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Dbl_iszero_exponent(opnd3p1) &&
+			    Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Dbl_signextendedsign(opnd3p1);
+				result_exponent = 0;
+                    		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+                    		Dbl_normalize(opnd3p1,opnd3p2,result_exponent);
+                    		Dbl_set_sign(opnd3p1,/*using*/sign_save);
+                    		Dbl_setwrapped_exponent(opnd3p1,result_exponent,
+							unfl);
+                    		Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Dbl_copytoptr(opnd3p1,opnd3p2,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized; want to normalize */
+		Dbl_clear_signexponent(opnd2p1);
+		Dbl_leftshiftby1(opnd2p1,opnd2p2);
+		Dbl_normalize(opnd2p1,opnd2p2,mpy_exponent);
+	}
+
+	/* Multiply the first two source mantissas together */
+
+	/* 
+	 * The intermediate result will be kept in tmpres,
+	 * which needs enough room for 106 bits of mantissa,
+	 * so lets call it a Double extended.
+	 */
+	Dblext_setzero(tmpresp1,tmpresp2,tmpresp3,tmpresp4);
+
+	/* 
+	 * Four bits at a time are inspected in each loop, and a 
+	 * simple shift and add multiply algorithm is used. 
+	 */ 
+	for (count = DBL_P-1; count >= 0; count -= 4) {
+		Dblext_rightshiftby4(tmpresp1,tmpresp2,tmpresp3,tmpresp4);
+		if (Dbit28p2(opnd1p2)) {
+	 		/* Fourword_add should be an ADD followed by 3 ADDC's */
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4, 
+			 opnd2p1<<3 | opnd2p2>>29, opnd2p2<<3, 0, 0);
+		}
+		if (Dbit29p2(opnd1p2)) {
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4,
+			 opnd2p1<<2 | opnd2p2>>30, opnd2p2<<2, 0, 0);
+		}
+		if (Dbit30p2(opnd1p2)) {
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4,
+			 opnd2p1<<1 | opnd2p2>>31, opnd2p2<<1, 0, 0);
+		}
+		if (Dbit31p2(opnd1p2)) {
+			Fourword_add(tmpresp1, tmpresp2, tmpresp3, tmpresp4,
+			 opnd2p1, opnd2p2, 0, 0);
+		}
+		Dbl_rightshiftby4(opnd1p1,opnd1p2);
+	}
+	if (Is_dexthiddenoverflow(tmpresp1)) {
+		/* result mantissa >= 2 (mantissa overflow) */
+		mpy_exponent++;
+		Dblext_rightshiftby1(tmpresp1,tmpresp2,tmpresp3,tmpresp4);
+	}
+
+	/*
+	 * Restore the sign of the mpy result which was saved in resultp1.
+	 * The exponent will continue to be kept in mpy_exponent.
+	 */
+	Dblext_set_sign(tmpresp1,Dbl_sign(resultp1));
+
+	/* 
+	 * No rounding is required, since the result of the multiply
+	 * is exact in the extended format.
+	 */
+
+	/*
+	 * Now we are ready to perform the add portion of the operation.
+	 *
+	 * The exponents need to be kept as integers for now, since the
+	 * multiply result might not fit into the exponent field.  We
+	 * can't overflow or underflow because of this yet, since the
+	 * add could bring the final result back into range.
+	 */
+	add_exponent = Dbl_exponent(opnd3p1);
+
+	/*
+	 * Check for denormalized or zero add operand.
+	 */
+	if (add_exponent == 0) {
+		/* check for zero */
+		if (Dbl_iszero_mantissa(opnd3p1,opnd3p2)) {
+			/* right is zero */
+			/* Left can't be zero and must be result.
+			 *
+			 * The final result is now in tmpres and mpy_exponent,
+			 * and needs to be rounded and squeezed back into
+			 * double precision format from double extended.
+			 */
+			result_exponent = mpy_exponent;
+			Dblext_copy(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
+				resultp1,resultp2,resultp3,resultp4);
+			sign_save = Dbl_signextendedsign(resultp1);/*save sign*/
+			goto round;
+		}
+
+		/* 
+		 * Neither are zeroes.  
+		 * Adjust exponent and normalize add operand.
+		 */
+		sign_save = Dbl_signextendedsign(opnd3p1);	/* save sign */
+		Dbl_clear_signexponent(opnd3p1);
+		Dbl_leftshiftby1(opnd3p1,opnd3p2);
+		Dbl_normalize(opnd3p1,opnd3p2,add_exponent);
+		Dbl_set_sign(opnd3p1,sign_save);	/* restore sign */
+	} else {
+		Dbl_clear_exponent_set_hidden(opnd3p1);
+	}
+	/*
+	 * Copy opnd3 to the double extended variable called right.
+	 */
+	Dbl_copyto_dblext(opnd3p1,opnd3p2,rightp1,rightp2,rightp3,rightp4);
+
+	/*
+	 * A zero "save" helps discover equal operands (for later),
+	 * and is used in swapping operands (if needed).
+	 */
+	Dblext_xortointp1(tmpresp1,rightp1,/*to*/save);
+
+	/*
+	 * Compare magnitude of operands.
+	 */
+	Dblext_copytoint_exponentmantissap1(tmpresp1,signlessleft1);
+	Dblext_copytoint_exponentmantissap1(rightp1,signlessright1);
+	if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
+	    Dblext_ismagnitudeless(tmpresp2,rightp2,signlessleft1,signlessright1)){
+		/*
+		 * Set the left operand to the larger one by XOR swap.
+		 * First finish the first word "save".
+		 */
+		Dblext_xorfromintp1(save,rightp1,/*to*/rightp1);
+		Dblext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
+		Dblext_swap_lower(tmpresp2,tmpresp3,tmpresp4,
+			rightp2,rightp3,rightp4);
+		/* also setup exponents used in rest of routine */
+		diff_exponent = add_exponent - mpy_exponent;
+		result_exponent = add_exponent;
+	} else {
+		/* also setup exponents used in rest of routine */
+		diff_exponent = mpy_exponent - add_exponent;
+		result_exponent = mpy_exponent;
+	}
+	/* Invariant: left is not smaller than right. */
+
+	/*
+	 * Special case alignment of operands that would force alignment
+	 * beyond the extent of the extension.  A further optimization
+	 * could special case this but only reduces the path length for
+	 * this infrequent case.
+	 */
+	if (diff_exponent > DBLEXT_THRESHOLD) {
+		diff_exponent = DBLEXT_THRESHOLD;
+	}
+
+	/* Align right operand by shifting it to the right */
+	Dblext_clear_sign(rightp1);
+	Dblext_right_align(rightp1,rightp2,rightp3,rightp4,
+		/*shifted by*/diff_exponent);
+	
+	/* Treat sum and difference of the operands separately. */
+	if ((int)save < 0) {
+		/*
+		 * Difference of the two operands.  Overflow can occur if the
+		 * multiply overflowed.  A borrow can occur out of the hidden
+		 * bit and force a post normalization phase.
+		 */
+		Dblext_subtract(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
+			rightp1,rightp2,rightp3,rightp4,
+			resultp1,resultp2,resultp3,resultp4);
+		sign_save = Dbl_signextendedsign(resultp1);
+		if (Dbl_iszero_hidden(resultp1)) {
+			/* Handle normalization */
+		/* A straight foward algorithm would now shift the
+		 * result and extension left until the hidden bit
+		 * becomes one.  Not all of the extension bits need
+		 * participate in the shift.  Only the two most 
+		 * significant bits (round and guard) are needed.
+		 * If only a single shift is needed then the guard
+		 * bit becomes a significant low order bit and the
+		 * extension must participate in the rounding.
+		 * If more than a single shift is needed, then all
+		 * bits to the right of the guard bit are zeros, 
+		 * and the guard bit may or may not be zero. */
+			Dblext_leftshiftby1(resultp1,resultp2,resultp3,
+				resultp4);
+
+			/* Need to check for a zero result.  The sign and
+			 * exponent fields have already been zeroed.  The more
+			 * efficient test of the full object can be used.
+			 */
+			 if (Dblext_iszero(resultp1,resultp2,resultp3,resultp4)) {
+				/* Must have been "x-x" or "x+(-x)". */
+				if (Is_rounding_mode(ROUNDMINUS))
+					Dbl_setone_sign(resultp1);
+				Dbl_copytoptr(resultp1,resultp2,dstptr);
+				return(NOEXCEPTION);
+			}
+			result_exponent--;
+
+			/* Look to see if normalization is finished. */
+			if (Dbl_isone_hidden(resultp1)) {
+				/* No further normalization is needed */
+				goto round;
+			}
+
+			/* Discover first one bit to determine shift amount.
+			 * Use a modified binary search.  We have already
+			 * shifted the result one position right and still
+			 * not found a one so the remainder of the extension
+			 * must be zero and simplifies rounding. */
+			/* Scan bytes */
+			while (Dbl_iszero_hiddenhigh7mantissa(resultp1)) {
+				Dblext_leftshiftby8(resultp1,resultp2,resultp3,resultp4);
+				result_exponent -= 8;
+			}
+			/* Now narrow it down to the nibble */
+			if (Dbl_iszero_hiddenhigh3mantissa(resultp1)) {
+				/* The lower nibble contains the
+				 * normalizing one */
+				Dblext_leftshiftby4(resultp1,resultp2,resultp3,resultp4);
+				result_exponent -= 4;
+			}
+			/* Select case where first bit is set (already
+			 * normalized) otherwise select the proper shift. */
+			jumpsize = Dbl_hiddenhigh3mantissa(resultp1);
+			if (jumpsize <= 7) switch(jumpsize) {
+			case 1:
+				Dblext_leftshiftby3(resultp1,resultp2,resultp3,
+					resultp4);
+				result_exponent -= 3;
+				break;
+			case 2:
+			case 3:
+				Dblext_leftshiftby2(resultp1,resultp2,resultp3,
+					resultp4);
+				result_exponent -= 2;
+				break;
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				Dblext_leftshiftby1(resultp1,resultp2,resultp3,
+					resultp4);
+				result_exponent -= 1;
+				break;
+			}
+		} /* end if (hidden...)... */
+	/* Fall through and round */
+	} /* end if (save < 0)... */
+	else {
+		/* Add magnitudes */
+		Dblext_addition(tmpresp1,tmpresp2,tmpresp3,tmpresp4,
+			rightp1,rightp2,rightp3,rightp4,
+			/*to*/resultp1,resultp2,resultp3,resultp4);
+		sign_save = Dbl_signextendedsign(resultp1);
+		if (Dbl_isone_hiddenoverflow(resultp1)) {
+	    		/* Prenormalization required. */
+	    		Dblext_arithrightshiftby1(resultp1,resultp2,resultp3,
+				resultp4);
+	    		result_exponent++;
+		} /* end if hiddenoverflow... */
+	} /* end else ...add magnitudes... */
+
+	/* Round the result.  If the extension and lower two words are
+	 * all zeros, then the result is exact.  Otherwise round in the
+	 * correct direction.  Underflow is possible. If a postnormalization
+	 * is necessary, then the mantissa is all zeros so no shift is needed.
+	 */
+  round:
+	if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
+		Dblext_denormalize(resultp1,resultp2,resultp3,resultp4,
+			result_exponent,is_tiny);
+	}
+	Dbl_set_sign(resultp1,/*using*/sign_save);
+	if (Dblext_isnotzero_mantissap3(resultp3) || 
+	    Dblext_isnotzero_mantissap4(resultp4)) {
+		inexact = TRUE;
+		switch(Rounding_mode()) {
+		case ROUNDNEAREST: /* The default. */
+			if (Dblext_isone_highp3(resultp3)) {
+				/* at least 1/2 ulp */
+				if (Dblext_isnotzero_low31p3(resultp3) ||
+				    Dblext_isnotzero_mantissap4(resultp4) ||
+				    Dblext_isone_lowp2(resultp2)) {
+					/* either exactly half way and odd or
+					 * more than 1/2ulp */
+					Dbl_increment(resultp1,resultp2);
+				}
+			}
+	    		break;
+
+		case ROUNDPLUS:
+	    		if (Dbl_iszero_sign(resultp1)) {
+				/* Round up positive results */
+				Dbl_increment(resultp1,resultp2);
+			}
+			break;
+	    
+		case ROUNDMINUS:
+	    		if (Dbl_isone_sign(resultp1)) {
+				/* Round down negative results */
+				Dbl_increment(resultp1,resultp2);
+			}
+	    
+		case ROUNDZERO:;
+			/* truncate is simple */
+		} /* end switch... */
+		if (Dbl_isone_hiddenoverflow(resultp1)) result_exponent++;
+	}
+	if (result_exponent >= DBL_INFINITY_EXPONENT) {
+		/* Overflow */
+		if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Dbl_setwrapped_exponent(resultp1,result_exponent,ovfl);
+                        Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_OVERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return (OPC_2E_OVERFLOWEXCEPTION);
+		}
+		inexact = TRUE;
+		Set_overflowflag();
+		Dbl_setoverflow(resultp1,resultp2);
+	} else if (result_exponent <= 0) {	/* underflow case */
+		if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                	Dbl_setwrapped_exponent(resultp1,result_exponent,unfl);
+			Dbl_copytoptr(resultp1,resultp2,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_UNDERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+	    		return(OPC_2E_UNDERFLOWEXCEPTION);
+		}
+		else if (inexact && is_tiny) Set_underflowflag();
+	}
+	else Dbl_set_exponent(resultp1,result_exponent);
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) 
+		if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION);
+		else Set_inexactflag();
+    	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Floating-point Multiply Fused Add
+ */
+
+sgl_fmpyfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+
+sgl_floating_point *src1ptr, *src2ptr, *src3ptr, *dstptr;
+unsigned int *status;
+{
+	unsigned int opnd1, opnd2, opnd3;
+	register unsigned int tmpresp1, tmpresp2;
+	unsigned int rightp1, rightp2;
+	unsigned int resultp1, resultp2 = 0;
+	register int mpy_exponent, add_exponent, count;
+	boolean inexact = FALSE, is_tiny = FALSE;
+
+	unsigned int signlessleft1, signlessright1, save;
+	register int result_exponent, diff_exponent;
+	int sign_save, jumpsize;
+	
+	Sgl_copyfromptr(src1ptr,opnd1);
+	Sgl_copyfromptr(src2ptr,opnd2);
+	Sgl_copyfromptr(src3ptr,opnd3);
+
+	/* 
+	 * set sign bit of result of multiply
+	 */
+	if (Sgl_sign(opnd1) ^ Sgl_sign(opnd2)) 
+		Sgl_setnegativezero(resultp1); 
+	else Sgl_setzero(resultp1);
+
+	/*
+	 * Generate multiply exponent 
+	 */
+	mpy_exponent = Sgl_exponent(opnd1) + Sgl_exponent(opnd2) - SGL_BIAS;
+
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd1)) {
+		if (Sgl_iszero_mantissa(opnd1)) {
+			if (Sgl_isnotnan(opnd2) && Sgl_isnotnan(opnd3)) {
+				if (Sgl_iszero_exponentmantissa(opnd2)) {
+					/* 
+					 * invalid since operands are infinity 
+					 * and zero 
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Sgl_makequietnan(resultp1);
+					Sgl_copytoptr(resultp1,dstptr);
+					return(NOEXCEPTION);
+				}
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Sgl_isinfinity(opnd3) &&
+				    (Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Sgl_makequietnan(resultp1);
+					Sgl_copytoptr(resultp1,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+			 	 * return infinity
+			 	 */
+				Sgl_setinfinity_exponentmantissa(resultp1);
+				Sgl_copytoptr(resultp1,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+		 	 * is NaN; signaling or quiet?
+		 	 */
+			if (Sgl_isone_signaling(opnd1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled()) 
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd1);
+			}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd2)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd2);
+				Sgl_copytoptr(opnd2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd3)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd3);
+				Sgl_copytoptr(opnd3,dstptr);
+				return(NOEXCEPTION);
+			}
+			/*
+		 	 * return quiet NaN
+		 	 */
+			Sgl_copytoptr(opnd1,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd2)) {
+		if (Sgl_iszero_mantissa(opnd2)) {
+			if (Sgl_isnotnan(opnd3)) {
+				if (Sgl_iszero_exponentmantissa(opnd1)) {
+					/* 
+					 * invalid since multiply operands are
+					 * zero & infinity
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Sgl_makequietnan(opnd2);
+					Sgl_copytoptr(opnd2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Sgl_isinfinity(opnd3) &&
+				    (Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+				       		return(OPC_2E_INVALIDEXCEPTION);
+				       	Set_invalidflag();
+				       	Sgl_makequietnan(resultp1);
+					Sgl_copytoptr(resultp1,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * return infinity
+				 */
+				Sgl_setinfinity_exponentmantissa(resultp1);
+				Sgl_copytoptr(resultp1,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Sgl_isone_signaling(opnd2)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd2);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd3)) {
+			       	/* trap if INVALIDTRAP enabled */
+			       	if (Is_invalidtrap_enabled())
+				   		return(OPC_2E_INVALIDEXCEPTION);
+			       	/* make NaN quiet */
+			       	Set_invalidflag();
+			       	Sgl_set_quiet(opnd3);
+				Sgl_copytoptr(opnd3,dstptr);
+		       		return(NOEXCEPTION);
+			}
+			/*
+			 * return quiet NaN
+			 */
+			Sgl_copytoptr(opnd2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check third operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd3)) {
+		if (Sgl_iszero_mantissa(opnd3)) {
+			/* return infinity */
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		} else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Sgl_isone_signaling(opnd3)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd3);
+			}
+			/*
+			 * return quiet NaN
+ 			 */
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		}
+    	}
+
+	/*
+	 * Generate multiply mantissa
+	 */
+	if (Sgl_isnotzero_exponent(opnd1)) {
+		/* set hidden bit */
+		Sgl_clear_signexponent_set_hidden(opnd1);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd1)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Sgl_iszero_exponentmantissa(opnd3)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Sgl_or_signs(opnd3,resultp1);
+				} else {
+					Sgl_and_signs(opnd3,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Sgl_iszero_exponent(opnd3) &&
+			         Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Sgl_signextendedsign(opnd3);
+				result_exponent = 0;
+                    		Sgl_leftshiftby1(opnd3);
+                    		Sgl_normalize(opnd3,result_exponent);
+                    		Sgl_set_sign(opnd3,/*using*/sign_save);
+                    		Sgl_setwrapped_exponent(opnd3,result_exponent,
+							unfl);
+                    		Sgl_copytoptr(opnd3,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized, adjust exponent */
+		Sgl_clear_signexponent(opnd1);
+		Sgl_leftshiftby1(opnd1);
+		Sgl_normalize(opnd1,mpy_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Sgl_isnotzero_exponent(opnd2)) {
+		Sgl_clear_signexponent_set_hidden(opnd2);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd2)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Sgl_iszero_exponentmantissa(opnd3)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Sgl_or_signs(opnd3,resultp1);
+				} else {
+					Sgl_and_signs(opnd3,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Sgl_iszero_exponent(opnd3) &&
+			    Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Sgl_signextendedsign(opnd3);
+				result_exponent = 0;
+                    		Sgl_leftshiftby1(opnd3);
+                    		Sgl_normalize(opnd3,result_exponent);
+                    		Sgl_set_sign(opnd3,/*using*/sign_save);
+                    		Sgl_setwrapped_exponent(opnd3,result_exponent,
+							unfl);
+                    		Sgl_copytoptr(opnd3,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized; want to normalize */
+		Sgl_clear_signexponent(opnd2);
+		Sgl_leftshiftby1(opnd2);
+		Sgl_normalize(opnd2,mpy_exponent);
+	}
+
+	/* Multiply the first two source mantissas together */
+
+	/* 
+	 * The intermediate result will be kept in tmpres,
+	 * which needs enough room for 106 bits of mantissa,
+	 * so lets call it a Double extended.
+	 */
+	Sglext_setzero(tmpresp1,tmpresp2);
+
+	/* 
+	 * Four bits at a time are inspected in each loop, and a 
+	 * simple shift and add multiply algorithm is used. 
+	 */ 
+	for (count = SGL_P-1; count >= 0; count -= 4) {
+		Sglext_rightshiftby4(tmpresp1,tmpresp2);
+		if (Sbit28(opnd1)) {
+	 		/* Twoword_add should be an ADD followed by 2 ADDC's */
+			Twoword_add(tmpresp1, tmpresp2, opnd2<<3, 0);
+		}
+		if (Sbit29(opnd1)) {
+			Twoword_add(tmpresp1, tmpresp2, opnd2<<2, 0);
+		}
+		if (Sbit30(opnd1)) {
+			Twoword_add(tmpresp1, tmpresp2, opnd2<<1, 0);
+		}
+		if (Sbit31(opnd1)) {
+			Twoword_add(tmpresp1, tmpresp2, opnd2, 0);
+		}
+		Sgl_rightshiftby4(opnd1);
+	}
+	if (Is_sexthiddenoverflow(tmpresp1)) {
+		/* result mantissa >= 2 (mantissa overflow) */
+		mpy_exponent++;
+		Sglext_rightshiftby4(tmpresp1,tmpresp2);
+	} else {
+		Sglext_rightshiftby3(tmpresp1,tmpresp2);
+	}
+
+	/*
+	 * Restore the sign of the mpy result which was saved in resultp1.
+	 * The exponent will continue to be kept in mpy_exponent.
+	 */
+	Sglext_set_sign(tmpresp1,Sgl_sign(resultp1));
+
+	/* 
+	 * No rounding is required, since the result of the multiply
+	 * is exact in the extended format.
+	 */
+
+	/*
+	 * Now we are ready to perform the add portion of the operation.
+	 *
+	 * The exponents need to be kept as integers for now, since the
+	 * multiply result might not fit into the exponent field.  We
+	 * can't overflow or underflow because of this yet, since the
+	 * add could bring the final result back into range.
+	 */
+	add_exponent = Sgl_exponent(opnd3);
+
+	/*
+	 * Check for denormalized or zero add operand.
+	 */
+	if (add_exponent == 0) {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd3)) {
+			/* right is zero */
+			/* Left can't be zero and must be result.
+			 *
+			 * The final result is now in tmpres and mpy_exponent,
+			 * and needs to be rounded and squeezed back into
+			 * double precision format from double extended.
+			 */
+			result_exponent = mpy_exponent;
+			Sglext_copy(tmpresp1,tmpresp2,resultp1,resultp2);
+			sign_save = Sgl_signextendedsign(resultp1);/*save sign*/
+			goto round;
+		}
+
+		/* 
+		 * Neither are zeroes.  
+		 * Adjust exponent and normalize add operand.
+		 */
+		sign_save = Sgl_signextendedsign(opnd3);	/* save sign */
+		Sgl_clear_signexponent(opnd3);
+		Sgl_leftshiftby1(opnd3);
+		Sgl_normalize(opnd3,add_exponent);
+		Sgl_set_sign(opnd3,sign_save);		/* restore sign */
+	} else {
+		Sgl_clear_exponent_set_hidden(opnd3);
+	}
+	/*
+	 * Copy opnd3 to the double extended variable called right.
+	 */
+	Sgl_copyto_sglext(opnd3,rightp1,rightp2);
+
+	/*
+	 * A zero "save" helps discover equal operands (for later),
+	 * and is used in swapping operands (if needed).
+	 */
+	Sglext_xortointp1(tmpresp1,rightp1,/*to*/save);
+
+	/*
+	 * Compare magnitude of operands.
+	 */
+	Sglext_copytoint_exponentmantissa(tmpresp1,signlessleft1);
+	Sglext_copytoint_exponentmantissa(rightp1,signlessright1);
+	if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
+	    Sglext_ismagnitudeless(signlessleft1,signlessright1)) {
+		/*
+		 * Set the left operand to the larger one by XOR swap.
+		 * First finish the first word "save".
+		 */
+		Sglext_xorfromintp1(save,rightp1,/*to*/rightp1);
+		Sglext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
+		Sglext_swap_lower(tmpresp2,rightp2);
+		/* also setup exponents used in rest of routine */
+		diff_exponent = add_exponent - mpy_exponent;
+		result_exponent = add_exponent;
+	} else {
+		/* also setup exponents used in rest of routine */
+		diff_exponent = mpy_exponent - add_exponent;
+		result_exponent = mpy_exponent;
+	}
+	/* Invariant: left is not smaller than right. */
+
+	/*
+	 * Special case alignment of operands that would force alignment
+	 * beyond the extent of the extension.  A further optimization
+	 * could special case this but only reduces the path length for
+	 * this infrequent case.
+	 */
+	if (diff_exponent > SGLEXT_THRESHOLD) {
+		diff_exponent = SGLEXT_THRESHOLD;
+	}
+
+	/* Align right operand by shifting it to the right */
+	Sglext_clear_sign(rightp1);
+	Sglext_right_align(rightp1,rightp2,/*shifted by*/diff_exponent);
+	
+	/* Treat sum and difference of the operands separately. */
+	if ((int)save < 0) {
+		/*
+		 * Difference of the two operands.  Overflow can occur if the
+		 * multiply overflowed.  A borrow can occur out of the hidden
+		 * bit and force a post normalization phase.
+		 */
+		Sglext_subtract(tmpresp1,tmpresp2, rightp1,rightp2,
+			resultp1,resultp2);
+		sign_save = Sgl_signextendedsign(resultp1);
+		if (Sgl_iszero_hidden(resultp1)) {
+			/* Handle normalization */
+		/* A straight foward algorithm would now shift the
+		 * result and extension left until the hidden bit
+		 * becomes one.  Not all of the extension bits need
+		 * participate in the shift.  Only the two most 
+		 * significant bits (round and guard) are needed.
+		 * If only a single shift is needed then the guard
+		 * bit becomes a significant low order bit and the
+		 * extension must participate in the rounding.
+		 * If more than a single shift is needed, then all
+		 * bits to the right of the guard bit are zeros, 
+		 * and the guard bit may or may not be zero. */
+			Sglext_leftshiftby1(resultp1,resultp2);
+
+			/* Need to check for a zero result.  The sign and
+			 * exponent fields have already been zeroed.  The more
+			 * efficient test of the full object can be used.
+			 */
+			 if (Sglext_iszero(resultp1,resultp2)) {
+				/* Must have been "x-x" or "x+(-x)". */
+				if (Is_rounding_mode(ROUNDMINUS))
+					Sgl_setone_sign(resultp1);
+				Sgl_copytoptr(resultp1,dstptr);
+				return(NOEXCEPTION);
+			}
+			result_exponent--;
+
+			/* Look to see if normalization is finished. */
+			if (Sgl_isone_hidden(resultp1)) {
+				/* No further normalization is needed */
+				goto round;
+			}
+
+			/* Discover first one bit to determine shift amount.
+			 * Use a modified binary search.  We have already
+			 * shifted the result one position right and still
+			 * not found a one so the remainder of the extension
+			 * must be zero and simplifies rounding. */
+			/* Scan bytes */
+			while (Sgl_iszero_hiddenhigh7mantissa(resultp1)) {
+				Sglext_leftshiftby8(resultp1,resultp2);
+				result_exponent -= 8;
+			}
+			/* Now narrow it down to the nibble */
+			if (Sgl_iszero_hiddenhigh3mantissa(resultp1)) {
+				/* The lower nibble contains the
+				 * normalizing one */
+				Sglext_leftshiftby4(resultp1,resultp2);
+				result_exponent -= 4;
+			}
+			/* Select case where first bit is set (already
+			 * normalized) otherwise select the proper shift. */
+			jumpsize = Sgl_hiddenhigh3mantissa(resultp1);
+			if (jumpsize <= 7) switch(jumpsize) {
+			case 1:
+				Sglext_leftshiftby3(resultp1,resultp2);
+				result_exponent -= 3;
+				break;
+			case 2:
+			case 3:
+				Sglext_leftshiftby2(resultp1,resultp2);
+				result_exponent -= 2;
+				break;
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				Sglext_leftshiftby1(resultp1,resultp2);
+				result_exponent -= 1;
+				break;
+			}
+		} /* end if (hidden...)... */
+	/* Fall through and round */
+	} /* end if (save < 0)... */
+	else {
+		/* Add magnitudes */
+		Sglext_addition(tmpresp1,tmpresp2,
+			rightp1,rightp2, /*to*/resultp1,resultp2);
+		sign_save = Sgl_signextendedsign(resultp1);
+		if (Sgl_isone_hiddenoverflow(resultp1)) {
+	    		/* Prenormalization required. */
+	    		Sglext_arithrightshiftby1(resultp1,resultp2);
+	    		result_exponent++;
+		} /* end if hiddenoverflow... */
+	} /* end else ...add magnitudes... */
+
+	/* Round the result.  If the extension and lower two words are
+	 * all zeros, then the result is exact.  Otherwise round in the
+	 * correct direction.  Underflow is possible. If a postnormalization
+	 * is necessary, then the mantissa is all zeros so no shift is needed.
+	 */
+  round:
+	if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
+		Sglext_denormalize(resultp1,resultp2,result_exponent,is_tiny);
+	}
+	Sgl_set_sign(resultp1,/*using*/sign_save);
+	if (Sglext_isnotzero_mantissap2(resultp2)) {
+		inexact = TRUE;
+		switch(Rounding_mode()) {
+		case ROUNDNEAREST: /* The default. */
+			if (Sglext_isone_highp2(resultp2)) {
+				/* at least 1/2 ulp */
+				if (Sglext_isnotzero_low31p2(resultp2) ||
+				    Sglext_isone_lowp1(resultp1)) {
+					/* either exactly half way and odd or
+					 * more than 1/2ulp */
+					Sgl_increment(resultp1);
+				}
+			}
+	    		break;
+
+		case ROUNDPLUS:
+	    		if (Sgl_iszero_sign(resultp1)) {
+				/* Round up positive results */
+				Sgl_increment(resultp1);
+			}
+			break;
+	    
+		case ROUNDMINUS:
+	    		if (Sgl_isone_sign(resultp1)) {
+				/* Round down negative results */
+				Sgl_increment(resultp1);
+			}
+	    
+		case ROUNDZERO:;
+			/* truncate is simple */
+		} /* end switch... */
+		if (Sgl_isone_hiddenoverflow(resultp1)) result_exponent++;
+	}
+	if (result_exponent >= SGL_INFINITY_EXPONENT) {
+		/* Overflow */
+		if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Sgl_setwrapped_exponent(resultp1,result_exponent,ovfl);
+                        Sgl_copytoptr(resultp1,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_OVERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return (OPC_2E_OVERFLOWEXCEPTION);
+		}
+		inexact = TRUE;
+		Set_overflowflag();
+		Sgl_setoverflow(resultp1);
+	} else if (result_exponent <= 0) {	/* underflow case */
+		if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                	Sgl_setwrapped_exponent(resultp1,result_exponent,unfl);
+			Sgl_copytoptr(resultp1,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_UNDERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+	    		return(OPC_2E_UNDERFLOWEXCEPTION);
+		}
+		else if (inexact && is_tiny) Set_underflowflag();
+	}
+	else Sgl_set_exponent(resultp1,result_exponent);
+	Sgl_copytoptr(resultp1,dstptr);
+	if (inexact) 
+		if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION);
+		else Set_inexactflag();
+    	return(NOEXCEPTION);
+}
+
+/*
+ *  Single Floating-point Multiply Negate Fused Add
+ */
+
+sgl_fmpynfadd(src1ptr,src2ptr,src3ptr,status,dstptr)
+
+sgl_floating_point *src1ptr, *src2ptr, *src3ptr, *dstptr;
+unsigned int *status;
+{
+	unsigned int opnd1, opnd2, opnd3;
+	register unsigned int tmpresp1, tmpresp2;
+	unsigned int rightp1, rightp2;
+	unsigned int resultp1, resultp2 = 0;
+	register int mpy_exponent, add_exponent, count;
+	boolean inexact = FALSE, is_tiny = FALSE;
+
+	unsigned int signlessleft1, signlessright1, save;
+	register int result_exponent, diff_exponent;
+	int sign_save, jumpsize;
+	
+	Sgl_copyfromptr(src1ptr,opnd1);
+	Sgl_copyfromptr(src2ptr,opnd2);
+	Sgl_copyfromptr(src3ptr,opnd3);
+
+	/* 
+	 * set sign bit of result of multiply
+	 */
+	if (Sgl_sign(opnd1) ^ Sgl_sign(opnd2)) 
+		Sgl_setzero(resultp1);
+	else 
+		Sgl_setnegativezero(resultp1); 
+
+	/*
+	 * Generate multiply exponent 
+	 */
+	mpy_exponent = Sgl_exponent(opnd1) + Sgl_exponent(opnd2) - SGL_BIAS;
+
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd1)) {
+		if (Sgl_iszero_mantissa(opnd1)) {
+			if (Sgl_isnotnan(opnd2) && Sgl_isnotnan(opnd3)) {
+				if (Sgl_iszero_exponentmantissa(opnd2)) {
+					/* 
+					 * invalid since operands are infinity 
+					 * and zero 
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Sgl_makequietnan(resultp1);
+					Sgl_copytoptr(resultp1,dstptr);
+					return(NOEXCEPTION);
+				}
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Sgl_isinfinity(opnd3) &&
+				    (Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Sgl_makequietnan(resultp1);
+					Sgl_copytoptr(resultp1,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+			 	 * return infinity
+			 	 */
+				Sgl_setinfinity_exponentmantissa(resultp1);
+				Sgl_copytoptr(resultp1,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+		 	 * is NaN; signaling or quiet?
+		 	 */
+			if (Sgl_isone_signaling(opnd1)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled()) 
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd1);
+			}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd2)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd2);
+				Sgl_copytoptr(opnd2,dstptr);
+				return(NOEXCEPTION);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd3)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+			    		return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd3);
+				Sgl_copytoptr(opnd3,dstptr);
+				return(NOEXCEPTION);
+			}
+			/*
+		 	 * return quiet NaN
+		 	 */
+			Sgl_copytoptr(opnd1,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd2)) {
+		if (Sgl_iszero_mantissa(opnd2)) {
+			if (Sgl_isnotnan(opnd3)) {
+				if (Sgl_iszero_exponentmantissa(opnd1)) {
+					/* 
+					 * invalid since multiply operands are
+					 * zero & infinity
+					 */
+					if (Is_invalidtrap_enabled())
+						return(OPC_2E_INVALIDEXCEPTION);
+					Set_invalidflag();
+					Sgl_makequietnan(opnd2);
+					Sgl_copytoptr(opnd2,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * Check third operand for infinity with a
+				 *  sign opposite of the multiply result
+				 */
+				if (Sgl_isinfinity(opnd3) &&
+				    (Sgl_sign(resultp1) ^ Sgl_sign(opnd3))) {
+					/* 
+					 * invalid since attempting a magnitude
+					 * subtraction of infinities
+					 */
+					if (Is_invalidtrap_enabled())
+				       		return(OPC_2E_INVALIDEXCEPTION);
+				       	Set_invalidflag();
+				       	Sgl_makequietnan(resultp1);
+					Sgl_copytoptr(resultp1,dstptr);
+					return(NOEXCEPTION);
+				}
+
+				/*
+				 * return infinity
+				 */
+				Sgl_setinfinity_exponentmantissa(resultp1);
+				Sgl_copytoptr(resultp1,dstptr);
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Sgl_isone_signaling(opnd2)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd2);
+			}
+			/* 
+			 * is third operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd3)) {
+			       	/* trap if INVALIDTRAP enabled */
+			       	if (Is_invalidtrap_enabled())
+				   		return(OPC_2E_INVALIDEXCEPTION);
+			       	/* make NaN quiet */
+			       	Set_invalidflag();
+			       	Sgl_set_quiet(opnd3);
+				Sgl_copytoptr(opnd3,dstptr);
+		       		return(NOEXCEPTION);
+			}
+			/*
+			 * return quiet NaN
+			 */
+			Sgl_copytoptr(opnd2,dstptr);
+			return(NOEXCEPTION);
+		}
+	}
+
+	/*
+	 * check third operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd3)) {
+		if (Sgl_iszero_mantissa(opnd3)) {
+			/* return infinity */
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		} else {
+			/*
+			 * is NaN; signaling or quiet?
+			 */
+			if (Sgl_isone_signaling(opnd3)) {
+				/* trap if INVALIDTRAP enabled */
+				if (Is_invalidtrap_enabled())
+					return(OPC_2E_INVALIDEXCEPTION);
+				/* make NaN quiet */
+				Set_invalidflag();
+				Sgl_set_quiet(opnd3);
+			}
+			/*
+			 * return quiet NaN
+ 			 */
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		}
+    	}
+
+	/*
+	 * Generate multiply mantissa
+	 */
+	if (Sgl_isnotzero_exponent(opnd1)) {
+		/* set hidden bit */
+		Sgl_clear_signexponent_set_hidden(opnd1);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd1)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Sgl_iszero_exponentmantissa(opnd3)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Sgl_or_signs(opnd3,resultp1);
+				} else {
+					Sgl_and_signs(opnd3,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Sgl_iszero_exponent(opnd3) &&
+			         Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Sgl_signextendedsign(opnd3);
+				result_exponent = 0;
+                    		Sgl_leftshiftby1(opnd3);
+                    		Sgl_normalize(opnd3,result_exponent);
+                    		Sgl_set_sign(opnd3,/*using*/sign_save);
+                    		Sgl_setwrapped_exponent(opnd3,result_exponent,
+							unfl);
+                    		Sgl_copytoptr(opnd3,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized, adjust exponent */
+		Sgl_clear_signexponent(opnd1);
+		Sgl_leftshiftby1(opnd1);
+		Sgl_normalize(opnd1,mpy_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Sgl_isnotzero_exponent(opnd2)) {
+		Sgl_clear_signexponent_set_hidden(opnd2);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd2)) {
+			/*
+			 * Perform the add opnd3 with zero here.
+			 */
+			if (Sgl_iszero_exponentmantissa(opnd3)) {
+				if (Is_rounding_mode(ROUNDMINUS)) {
+					Sgl_or_signs(opnd3,resultp1);
+				} else {
+					Sgl_and_signs(opnd3,resultp1);
+				}
+			}
+			/*
+			 * Now let's check for trapped underflow case.
+			 */
+			else if (Sgl_iszero_exponent(opnd3) &&
+			    Is_underflowtrap_enabled()) {
+                    		/* need to normalize results mantissa */
+                    		sign_save = Sgl_signextendedsign(opnd3);
+				result_exponent = 0;
+                    		Sgl_leftshiftby1(opnd3);
+                    		Sgl_normalize(opnd3,result_exponent);
+                    		Sgl_set_sign(opnd3,/*using*/sign_save);
+                    		Sgl_setwrapped_exponent(opnd3,result_exponent,
+							unfl);
+                    		Sgl_copytoptr(opnd3,dstptr);
+                    		/* inexact = FALSE */
+                    		return(OPC_2E_UNDERFLOWEXCEPTION);
+			}
+			Sgl_copytoptr(opnd3,dstptr);
+			return(NOEXCEPTION);
+		}
+		/* is denormalized; want to normalize */
+		Sgl_clear_signexponent(opnd2);
+		Sgl_leftshiftby1(opnd2);
+		Sgl_normalize(opnd2,mpy_exponent);
+	}
+
+	/* Multiply the first two source mantissas together */
+
+	/* 
+	 * The intermediate result will be kept in tmpres,
+	 * which needs enough room for 106 bits of mantissa,
+	 * so lets call it a Double extended.
+	 */
+	Sglext_setzero(tmpresp1,tmpresp2);
+
+	/* 
+	 * Four bits at a time are inspected in each loop, and a 
+	 * simple shift and add multiply algorithm is used. 
+	 */ 
+	for (count = SGL_P-1; count >= 0; count -= 4) {
+		Sglext_rightshiftby4(tmpresp1,tmpresp2);
+		if (Sbit28(opnd1)) {
+	 		/* Twoword_add should be an ADD followed by 2 ADDC's */
+			Twoword_add(tmpresp1, tmpresp2, opnd2<<3, 0);
+		}
+		if (Sbit29(opnd1)) {
+			Twoword_add(tmpresp1, tmpresp2, opnd2<<2, 0);
+		}
+		if (Sbit30(opnd1)) {
+			Twoword_add(tmpresp1, tmpresp2, opnd2<<1, 0);
+		}
+		if (Sbit31(opnd1)) {
+			Twoword_add(tmpresp1, tmpresp2, opnd2, 0);
+		}
+		Sgl_rightshiftby4(opnd1);
+	}
+	if (Is_sexthiddenoverflow(tmpresp1)) {
+		/* result mantissa >= 2 (mantissa overflow) */
+		mpy_exponent++;
+		Sglext_rightshiftby4(tmpresp1,tmpresp2);
+	} else {
+		Sglext_rightshiftby3(tmpresp1,tmpresp2);
+	}
+
+	/*
+	 * Restore the sign of the mpy result which was saved in resultp1.
+	 * The exponent will continue to be kept in mpy_exponent.
+	 */
+	Sglext_set_sign(tmpresp1,Sgl_sign(resultp1));
+
+	/* 
+	 * No rounding is required, since the result of the multiply
+	 * is exact in the extended format.
+	 */
+
+	/*
+	 * Now we are ready to perform the add portion of the operation.
+	 *
+	 * The exponents need to be kept as integers for now, since the
+	 * multiply result might not fit into the exponent field.  We
+	 * can't overflow or underflow because of this yet, since the
+	 * add could bring the final result back into range.
+	 */
+	add_exponent = Sgl_exponent(opnd3);
+
+	/*
+	 * Check for denormalized or zero add operand.
+	 */
+	if (add_exponent == 0) {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd3)) {
+			/* right is zero */
+			/* Left can't be zero and must be result.
+			 *
+			 * The final result is now in tmpres and mpy_exponent,
+			 * and needs to be rounded and squeezed back into
+			 * double precision format from double extended.
+			 */
+			result_exponent = mpy_exponent;
+			Sglext_copy(tmpresp1,tmpresp2,resultp1,resultp2);
+			sign_save = Sgl_signextendedsign(resultp1);/*save sign*/
+			goto round;
+		}
+
+		/* 
+		 * Neither are zeroes.  
+		 * Adjust exponent and normalize add operand.
+		 */
+		sign_save = Sgl_signextendedsign(opnd3);	/* save sign */
+		Sgl_clear_signexponent(opnd3);
+		Sgl_leftshiftby1(opnd3);
+		Sgl_normalize(opnd3,add_exponent);
+		Sgl_set_sign(opnd3,sign_save);		/* restore sign */
+	} else {
+		Sgl_clear_exponent_set_hidden(opnd3);
+	}
+	/*
+	 * Copy opnd3 to the double extended variable called right.
+	 */
+	Sgl_copyto_sglext(opnd3,rightp1,rightp2);
+
+	/*
+	 * A zero "save" helps discover equal operands (for later),
+	 * and is used in swapping operands (if needed).
+	 */
+	Sglext_xortointp1(tmpresp1,rightp1,/*to*/save);
+
+	/*
+	 * Compare magnitude of operands.
+	 */
+	Sglext_copytoint_exponentmantissa(tmpresp1,signlessleft1);
+	Sglext_copytoint_exponentmantissa(rightp1,signlessright1);
+	if (mpy_exponent < add_exponent || mpy_exponent == add_exponent &&
+	    Sglext_ismagnitudeless(signlessleft1,signlessright1)) {
+		/*
+		 * Set the left operand to the larger one by XOR swap.
+		 * First finish the first word "save".
+		 */
+		Sglext_xorfromintp1(save,rightp1,/*to*/rightp1);
+		Sglext_xorfromintp1(save,tmpresp1,/*to*/tmpresp1);
+		Sglext_swap_lower(tmpresp2,rightp2);
+		/* also setup exponents used in rest of routine */
+		diff_exponent = add_exponent - mpy_exponent;
+		result_exponent = add_exponent;
+	} else {
+		/* also setup exponents used in rest of routine */
+		diff_exponent = mpy_exponent - add_exponent;
+		result_exponent = mpy_exponent;
+	}
+	/* Invariant: left is not smaller than right. */
+
+	/*
+	 * Special case alignment of operands that would force alignment
+	 * beyond the extent of the extension.  A further optimization
+	 * could special case this but only reduces the path length for
+	 * this infrequent case.
+	 */
+	if (diff_exponent > SGLEXT_THRESHOLD) {
+		diff_exponent = SGLEXT_THRESHOLD;
+	}
+
+	/* Align right operand by shifting it to the right */
+	Sglext_clear_sign(rightp1);
+	Sglext_right_align(rightp1,rightp2,/*shifted by*/diff_exponent);
+	
+	/* Treat sum and difference of the operands separately. */
+	if ((int)save < 0) {
+		/*
+		 * Difference of the two operands.  Overflow can occur if the
+		 * multiply overflowed.  A borrow can occur out of the hidden
+		 * bit and force a post normalization phase.
+		 */
+		Sglext_subtract(tmpresp1,tmpresp2, rightp1,rightp2,
+			resultp1,resultp2);
+		sign_save = Sgl_signextendedsign(resultp1);
+		if (Sgl_iszero_hidden(resultp1)) {
+			/* Handle normalization */
+		/* A straight foward algorithm would now shift the
+		 * result and extension left until the hidden bit
+		 * becomes one.  Not all of the extension bits need
+		 * participate in the shift.  Only the two most 
+		 * significant bits (round and guard) are needed.
+		 * If only a single shift is needed then the guard
+		 * bit becomes a significant low order bit and the
+		 * extension must participate in the rounding.
+		 * If more than a single shift is needed, then all
+		 * bits to the right of the guard bit are zeros, 
+		 * and the guard bit may or may not be zero. */
+			Sglext_leftshiftby1(resultp1,resultp2);
+
+			/* Need to check for a zero result.  The sign and
+			 * exponent fields have already been zeroed.  The more
+			 * efficient test of the full object can be used.
+			 */
+			 if (Sglext_iszero(resultp1,resultp2)) {
+				/* Must have been "x-x" or "x+(-x)". */
+				if (Is_rounding_mode(ROUNDMINUS))
+					Sgl_setone_sign(resultp1);
+				Sgl_copytoptr(resultp1,dstptr);
+				return(NOEXCEPTION);
+			}
+			result_exponent--;
+
+			/* Look to see if normalization is finished. */
+			if (Sgl_isone_hidden(resultp1)) {
+				/* No further normalization is needed */
+				goto round;
+			}
+
+			/* Discover first one bit to determine shift amount.
+			 * Use a modified binary search.  We have already
+			 * shifted the result one position right and still
+			 * not found a one so the remainder of the extension
+			 * must be zero and simplifies rounding. */
+			/* Scan bytes */
+			while (Sgl_iszero_hiddenhigh7mantissa(resultp1)) {
+				Sglext_leftshiftby8(resultp1,resultp2);
+				result_exponent -= 8;
+			}
+			/* Now narrow it down to the nibble */
+			if (Sgl_iszero_hiddenhigh3mantissa(resultp1)) {
+				/* The lower nibble contains the
+				 * normalizing one */
+				Sglext_leftshiftby4(resultp1,resultp2);
+				result_exponent -= 4;
+			}
+			/* Select case where first bit is set (already
+			 * normalized) otherwise select the proper shift. */
+			jumpsize = Sgl_hiddenhigh3mantissa(resultp1);
+			if (jumpsize <= 7) switch(jumpsize) {
+			case 1:
+				Sglext_leftshiftby3(resultp1,resultp2);
+				result_exponent -= 3;
+				break;
+			case 2:
+			case 3:
+				Sglext_leftshiftby2(resultp1,resultp2);
+				result_exponent -= 2;
+				break;
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				Sglext_leftshiftby1(resultp1,resultp2);
+				result_exponent -= 1;
+				break;
+			}
+		} /* end if (hidden...)... */
+	/* Fall through and round */
+	} /* end if (save < 0)... */
+	else {
+		/* Add magnitudes */
+		Sglext_addition(tmpresp1,tmpresp2,
+			rightp1,rightp2, /*to*/resultp1,resultp2);
+		sign_save = Sgl_signextendedsign(resultp1);
+		if (Sgl_isone_hiddenoverflow(resultp1)) {
+	    		/* Prenormalization required. */
+	    		Sglext_arithrightshiftby1(resultp1,resultp2);
+	    		result_exponent++;
+		} /* end if hiddenoverflow... */
+	} /* end else ...add magnitudes... */
+
+	/* Round the result.  If the extension and lower two words are
+	 * all zeros, then the result is exact.  Otherwise round in the
+	 * correct direction.  Underflow is possible. If a postnormalization
+	 * is necessary, then the mantissa is all zeros so no shift is needed.
+	 */
+  round:
+	if (result_exponent <= 0 && !Is_underflowtrap_enabled()) {
+		Sglext_denormalize(resultp1,resultp2,result_exponent,is_tiny);
+	}
+	Sgl_set_sign(resultp1,/*using*/sign_save);
+	if (Sglext_isnotzero_mantissap2(resultp2)) {
+		inexact = TRUE;
+		switch(Rounding_mode()) {
+		case ROUNDNEAREST: /* The default. */
+			if (Sglext_isone_highp2(resultp2)) {
+				/* at least 1/2 ulp */
+				if (Sglext_isnotzero_low31p2(resultp2) ||
+				    Sglext_isone_lowp1(resultp1)) {
+					/* either exactly half way and odd or
+					 * more than 1/2ulp */
+					Sgl_increment(resultp1);
+				}
+			}
+	    		break;
+
+		case ROUNDPLUS:
+	    		if (Sgl_iszero_sign(resultp1)) {
+				/* Round up positive results */
+				Sgl_increment(resultp1);
+			}
+			break;
+	    
+		case ROUNDMINUS:
+	    		if (Sgl_isone_sign(resultp1)) {
+				/* Round down negative results */
+				Sgl_increment(resultp1);
+			}
+	    
+		case ROUNDZERO:;
+			/* truncate is simple */
+		} /* end switch... */
+		if (Sgl_isone_hiddenoverflow(resultp1)) result_exponent++;
+	}
+	if (result_exponent >= SGL_INFINITY_EXPONENT) {
+		/* Overflow */
+		if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Sgl_setwrapped_exponent(resultp1,result_exponent,ovfl);
+                        Sgl_copytoptr(resultp1,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_OVERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return (OPC_2E_OVERFLOWEXCEPTION);
+		}
+		inexact = TRUE;
+		Set_overflowflag();
+		Sgl_setoverflow(resultp1);
+	} else if (result_exponent <= 0) {	/* underflow case */
+		if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                	Sgl_setwrapped_exponent(resultp1,result_exponent,unfl);
+			Sgl_copytoptr(resultp1,dstptr);
+                        if (inexact)
+                            if (Is_inexacttrap_enabled())
+                                return (OPC_2E_UNDERFLOWEXCEPTION |
+					OPC_2E_INEXACTEXCEPTION);
+                            else Set_inexactflag();
+	    		return(OPC_2E_UNDERFLOWEXCEPTION);
+		}
+		else if (inexact && is_tiny) Set_underflowflag();
+	}
+	else Sgl_set_exponent(resultp1,result_exponent);
+	Sgl_copytoptr(resultp1,dstptr);
+	if (inexact) 
+		if (Is_inexacttrap_enabled()) return(OPC_2E_INEXACTEXCEPTION);
+		else Set_inexactflag();
+    	return(NOEXCEPTION);
+}
+
diff -Nru a/arch/parisc/math-emu/fpbits.h b/arch/parisc/math-emu/fpbits.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fpbits.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,65 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+
+/*
+ *  These macros are designed to be portable to all machines that have
+ *  a wordsize greater than or equal to 32 bits that support the portable
+ *  C compiler and the standard C preprocessor.  Wordsize (default 32)
+ *  and bitfield assignment (default left-to-right,  unlike VAX, PDP-11)
+ *  should be predefined using the constants HOSTWDSZ and BITFRL and
+ *  the C compiler "-D" flag (e.g., -DHOSTWDSZ=36 -DBITFLR for the DEC-20).
+ *  Note that the macro arguments assume that the integer being referenced
+ *  is a 32-bit integer (right-justified on the 20) and that bit 0 is the
+ *  most significant bit.
+ */
+
+#ifndef HOSTWDSZ
+#define	HOSTWDSZ	32
+#endif
+
+
+/*###########################  Macros  ######################################*/
+
+/*-------------------------------------------------------------------------
+ * NewDeclareBitField_Reference - Declare a structure similar to the simulator
+ * function "DeclBitfR" except its use is restricted to occur within a larger
+ * enclosing structure or union definition.  This declaration is an unnamed
+ * structure with the argument, name, as the member name and the argument,
+ * uname, as the element name. 
+ *----------------------------------------------------------------------- */
+#define Bitfield_extract(start, length, object) 	\
+    ((object) >> (HOSTWDSZ - (start) - (length)) & 	\
+    ((unsigned)-1 >> (HOSTWDSZ - (length))))
+
+#define Bitfield_signed_extract(start, length, object) \
+    ((int)((object) << start) >> (HOSTWDSZ - (length)))
+
+#define Bitfield_mask(start, len, object)		\
+    ((object) & (((unsigned)-1 >> (HOSTWDSZ-len)) << (HOSTWDSZ-start-len)))
+
+#define Bitfield_deposit(value,start,len,object)  object = \
+    ((object) & ~(((unsigned)-1 >> (HOSTWDSZ-len)) << (HOSTWDSZ-start-len))) | \
+    (((value) & ((unsigned)-1 >> (HOSTWDSZ-len))) << (HOSTWDSZ-start-len))
diff -Nru a/arch/parisc/math-emu/fpu.h b/arch/parisc/math-emu/fpu.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fpu.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,76 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ * 
+ *  File: 
+ *      @(#)	pa/fp/fpu.h		$Revision: 1.1 $
+ * 
+ *  Purpose:
+ *      <<please update with a synopis of the functionality provided by this file>>
+ * 
+ * 
+ * END_DESC  
+*/
+
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+
+#ifndef _MACHINE_FPU_INCLUDED /* allows multiple inclusion */
+#define _MACHINE_FPU_INCLUDED
+
+#if 0
+#ifndef _SYS_STDSYMS_INCLUDED
+#    include <sys/stdsyms.h>
+#endif   /* _SYS_STDSYMS_INCLUDED  */
+#include  <machine/pdc/pdc_rqsts.h>
+#endif
+
+#define PA83_FPU_FLAG    0x00000001
+#define PA89_FPU_FLAG    0x00000002
+#define PA2_0_FPU_FLAG   0x00000010
+
+#define TIMEX_EXTEN_FLAG 0x00000004
+
+#define ROLEX_EXTEN_FLAG 0x00000008
+#define COPR_FP 	0x00000080	/* Floating point -- Coprocessor 0 */
+#define SFU_MPY_DIVIDE	0x00008000	/* Multiply/Divide __ SFU 0 */
+
+
+#define EM_FPU_TYPE_OFFSET 272
+
+/* version of EMULATION software for COPR,0,0 instruction */
+#define EMULATION_VERSION 4
+
+/*
+ * The only was to differeniate between TIMEX and ROLEX (or PCX-S and PCX-T)
+ * is thorough the potential type field from the PDC_MODEL call.  The 
+ * following flags are used at assist this differeniation.
+ */
+
+#define ROLEX_POTENTIAL_KEY_FLAGS	PDC_MODEL_CPU_KEY_WORD_TO_IO
+#define TIMEX_POTENTIAL_KEY_FLAGS	(PDC_MODEL_CPU_KEY_QUAD_STORE | \
+					 PDC_MODEL_CPU_KEY_RECIP_SQRT)
+
+
+#endif /* ! _MACHINE_FPU_INCLUDED */
diff -Nru a/arch/parisc/math-emu/fpudispatch.c b/arch/parisc/math-emu/fpudispatch.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/fpudispatch.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1425 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/fp/fpudispatch.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	<<please update with a synopsis of the functionality provided by this file>>
+ *
+ *  External Interfaces:
+ *	<<the following list was autogenerated, please review>>
+ *	emfpudispatch(ir, dummy1, dummy2, fpregs)
+ *	fpudispatch(ir, excp_code, holder, fpregs)
+ *
+ *  Internal Interfaces:
+ *	<<the following list was autogenerated, please review>>
+ *	static u_int decode_06(u_int, u_int *)
+ *	static u_int decode_0c(u_int, u_int, u_int, u_int *)
+ *	static u_int decode_0e(u_int, u_int, u_int, u_int *)
+ *	static u_int decode_26(u_int, u_int *)
+ *	static u_int decode_2e(u_int, u_int *)
+ *	static void update_status_cbit(u_int *, u_int, u_int, u_int)
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+#define FPUDEBUG 0
+
+#include "float.h"
+#include "types.h"
+/* #include <sys/debug.h> */
+/* #include <machine/sys/mdep_private.h> */
+
+#define COPR_INST 0x30000000
+
+/*
+ * definition of extru macro.  If pos and len are constants, the compiler
+ * will generate an extru instruction when optimized
+ */
+#define extru(r,pos,len)	(((r) >> (31-(pos))) & (( 1 << (len)) - 1))
+/* definitions of bit field locations in the instruction */
+#define fpmajorpos 5
+#define fpr1pos	10
+#define fpr2pos 15
+#define fptpos	31
+#define fpsubpos 18
+#define fpclass1subpos 16
+#define fpclasspos 22
+#define fpfmtpos 20
+#define fpdfpos 18
+#define fpnulpos 26
+/*
+ * the following are the extra bits for the 0E major op
+ */
+#define fpxr1pos 24
+#define fpxr2pos 19
+#define fpxtpos 25
+#define fpxpos 23
+#define fp0efmtpos 20
+/*
+ * the following are for the multi-ops
+ */
+#define fprm1pos 10
+#define fprm2pos 15
+#define fptmpos 31
+#define fprapos 25
+#define fptapos 20
+#define fpmultifmt 26
+/*
+ * the following are for the fused FP instructions
+ */
+     /* fprm1pos 10 */
+     /* fprm2pos 15 */
+#define fpraupos 18
+#define fpxrm2pos 19
+     /* fpfmtpos 20 */
+#define fpralpos 23
+#define fpxrm1pos 24
+     /* fpxtpos 25 */
+#define fpfusedsubop 26
+     /* fptpos	31 */
+
+/*
+ * offset to constant zero in the FP emulation registers
+ */
+#define fpzeroreg (32*sizeof(double)/sizeof(u_int))
+
+/*
+ * extract the major opcode from the instruction
+ */
+#define get_major(op) extru(op,fpmajorpos,6)
+/*
+ * extract the two bit class field from the FP instruction. The class is at bit
+ * positions 21-22
+ */
+#define get_class(op) extru(op,fpclasspos,2)
+/*
+ * extract the 3 bit subop field.  For all but class 1 instructions, it is
+ * located at bit positions 16-18
+ */
+#define get_subop(op) extru(op,fpsubpos,3)
+/*
+ * extract the 2 or 3 bit subop field from class 1 instructions.  It is located
+ * at bit positions 15-16 (PA1.1) or 14-16 (PA2.0)
+ */
+#define get_subop1_PA1_1(op) extru(op,fpclass1subpos,2)	/* PA89 (1.1) fmt */
+#define get_subop1_PA2_0(op) extru(op,fpclass1subpos,3)	/* PA 2.0 fmt */
+
+/* definitions of unimplemented exceptions */
+#define MAJOR_0C_EXCP	0x09
+#define MAJOR_0E_EXCP	0x0b
+#define MAJOR_06_EXCP	0x03
+#define MAJOR_26_EXCP	0x23
+#define MAJOR_2E_EXCP	0x2b
+#define PA83_UNIMP_EXCP	0x01
+
+/*
+ * Special Defines for TIMEX specific code
+ */
+
+#define FPU_TYPE_FLAG_POS (EM_FPU_TYPE_OFFSET>>2)
+#define TIMEX_ROLEX_FPU_MASK (TIMEX_EXTEN_FLAG|ROLEX_EXTEN_FLAG)
+
+/*
+ * Static function definitions
+ */
+#define _PROTOTYPES
+#if defined(_PROTOTYPES) || defined(_lint)
+static u_int decode_0c(u_int, u_int, u_int, u_int *);
+static u_int decode_0e(u_int, u_int, u_int, u_int *);
+static u_int decode_06(u_int, u_int *);
+static u_int decode_26(u_int, u_int *);
+static u_int decode_2e(u_int, u_int *);
+static void update_status_cbit(u_int *, u_int, u_int, u_int);
+#else /* !_PROTOTYPES&&!_lint */
+static u_int decode_0c();
+static u_int decode_0e();
+static u_int decode_06();
+static u_int decode_26();
+static u_int decode_2e();
+static void update_status_cbit();
+#endif /* _PROTOTYPES&&!_lint */
+
+#define VASSERT(x)
+
+/*
+ * this routine will decode the excepting floating point instruction and
+ * call the approiate emulation routine.
+ * It is called by decode_fpu with the following parameters:
+ * fpudispatch(current_ir, unimplemented_code, 0, &Fpu_register)
+ * where current_ir is the instruction to be emulated,
+ * unimplemented_code is the exception_code that the hardware generated
+ * and &Fpu_register is the address of emulated FP reg 0.
+ */
+u_int
+fpudispatch(u_int ir, u_int excp_code, u_int holder, u_int fpregs[])
+{
+	u_int class, subop;
+	u_int fpu_type_flags;
+
+	/* All FP emulation code assumes that ints are 4-bytes in length */
+	VASSERT(sizeof(int) == 4);
+
+	fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];  /* get fpu type flags */
+
+	class = get_class(ir);
+	if (class == 1) {
+		if  (fpu_type_flags & PA2_0_FPU_FLAG)
+			subop = get_subop1_PA2_0(ir);
+		else
+			subop = get_subop1_PA1_1(ir);
+	}
+	else
+		subop = get_subop(ir);
+
+	if (FPUDEBUG) printk("class %d subop %d\n", class, subop);
+
+	switch (excp_code) {
+		case MAJOR_0C_EXCP:
+		case PA83_UNIMP_EXCP:
+			return(decode_0c(ir,class,subop,fpregs));
+		case MAJOR_0E_EXCP:
+			return(decode_0e(ir,class,subop,fpregs));
+		case MAJOR_06_EXCP:
+			return(decode_06(ir,fpregs));
+		case MAJOR_26_EXCP:
+			return(decode_26(ir,fpregs));
+		case MAJOR_2E_EXCP:
+			return(decode_2e(ir,fpregs));
+		default:
+			/* "crashme Night Gallery painting nr 2. (asm_crash.s).
+			 * This was fixed for multi-user kernels, but
+			 * workstation kernels had a panic here.  This allowed
+			 * any arbitrary user to panic the kernel by executing
+			 * setting the FP exception registers to strange values
+			 * and generating an emulation trap.  The emulation and
+			 * exception code must never be able to panic the
+			 * kernel.
+			 */
+			return(UNIMPLEMENTEDEXCEPTION);
+	}
+}
+
+/*
+ * this routine is called by $emulation_trap to emulate a coprocessor
+ * instruction if one doesn't exist
+ */
+u_int
+emfpudispatch(u_int ir, u_int dummy1, u_int dummy2, u_int fpregs[])
+{
+	u_int class, subop, major;
+	u_int fpu_type_flags;
+
+	/* All FP emulation code assumes that ints are 4-bytes in length */
+	VASSERT(sizeof(int) == 4);
+
+	fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];  /* get fpu type flags */
+
+	major = get_major(ir);
+	class = get_class(ir);
+	if (class == 1) {
+		if  (fpu_type_flags & PA2_0_FPU_FLAG)
+			subop = get_subop1_PA2_0(ir);
+		else
+			subop = get_subop1_PA1_1(ir);
+	}
+	else
+		subop = get_subop(ir);
+	switch (major) {
+		case 0x0C:
+			return(decode_0c(ir,class,subop,fpregs));
+		case 0x0E:
+			return(decode_0e(ir,class,subop,fpregs));
+		case 0x06:
+			return(decode_06(ir,fpregs));
+		case 0x26:
+			return(decode_26(ir,fpregs));
+		case 0x2E:
+			return(decode_2e(ir,fpregs));
+		default:
+			return(PA83_UNIMP_EXCP);
+	}
+}
+	
+
+static u_int
+decode_0c(u_int ir, u_int class, u_int subop, u_int fpregs[])
+{
+	u_int r1,r2,t;		/* operand register offsets */ 
+	u_int fmt;		/* also sf for class 1 conversions */
+	u_int  df;		/* for class 1 conversions */
+	u_int *status;
+	u_int retval, local_status;
+	u_int fpu_type_flags;
+
+	if (ir == COPR_INST) {
+		fpregs[0] = EMULATION_VERSION << 11;
+		return(NOEXCEPTION);
+	}
+	status = &fpregs[0];	/* fp status register */
+	local_status = fpregs[0]; /* and local copy */
+	r1 = extru(ir,fpr1pos,5) * sizeof(double)/sizeof(u_int);
+	if (r1 == 0)		/* map fr0 source to constant zero */
+		r1 = fpzeroreg;
+	t = extru(ir,fptpos,5) * sizeof(double)/sizeof(u_int);
+	if (t == 0 && class != 2)	/* don't allow fr0 as a dest */
+		return(MAJOR_0C_EXCP);
+	fmt = extru(ir,fpfmtpos,2);	/* get fmt completer */
+
+	switch (class) {
+	    case 0:
+		switch (subop) {
+			case 0:	/* COPR 0,0 emulated above*/
+			case 1:
+				return(MAJOR_0C_EXCP);
+			case 2:	/* FCPY */
+				switch (fmt) {
+				    case 2: /* illegal */
+					return(MAJOR_0C_EXCP);
+				    case 3: /* quad */
+					t &= ~3;  /* force to even reg #s */
+					r1 &= ~3;
+					fpregs[t+3] = fpregs[r1+3];
+					fpregs[t+2] = fpregs[r1+2];
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					fpregs[t] = fpregs[r1];
+					return(NOEXCEPTION);
+				}
+			case 3: /* FABS */
+				switch (fmt) {
+				    case 2: /* illegal */
+					return(MAJOR_0C_EXCP);
+				    case 3: /* quad */
+					t &= ~3;  /* force to even reg #s */
+					r1 &= ~3;
+					fpregs[t+3] = fpregs[r1+3];
+					fpregs[t+2] = fpregs[r1+2];
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					/* copy and clear sign bit */
+					fpregs[t] = fpregs[r1] & 0x7fffffff;
+					return(NOEXCEPTION);
+				}
+			case 6: /* FNEG */
+				switch (fmt) {
+				    case 2: /* illegal */
+					return(MAJOR_0C_EXCP);
+				    case 3: /* quad */
+					t &= ~3;  /* force to even reg #s */
+					r1 &= ~3;
+					fpregs[t+3] = fpregs[r1+3];
+					fpregs[t+2] = fpregs[r1+2];
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					/* copy and invert sign bit */
+					fpregs[t] = fpregs[r1] ^ 0x80000000;
+					return(NOEXCEPTION);
+				}
+			case 7: /* FNEGABS */
+				switch (fmt) {
+				    case 2: /* illegal */
+					return(MAJOR_0C_EXCP);
+				    case 3: /* quad */
+					t &= ~3;  /* force to even reg #s */
+					r1 &= ~3;
+					fpregs[t+3] = fpregs[r1+3];
+					fpregs[t+2] = fpregs[r1+2];
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					/* copy and set sign bit */
+					fpregs[t] = fpregs[r1] | 0x80000000;
+					return(NOEXCEPTION);
+				}
+			case 4: /* FSQRT */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fsqrt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fsqrt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2:
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			case 5: /* FRND */
+				switch (fmt) {
+				    case 0:
+					return(sgl_frnd(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_frnd(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2:
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+		} /* end of switch (subop) */
+
+	case 1: /* class 1 */
+		df = extru(ir,fpdfpos,2); /* get dest format */
+		if ((df & 2) || (fmt & 2)) {
+			/*
+			 * fmt's 2 and 3 are illegal of not implemented
+			 * quad conversions
+			 */
+			return(MAJOR_0C_EXCP);
+		}
+		/*
+		 * encode source and dest formats into 2 bits.
+		 * high bit is source, low bit is dest.
+		 * bit = 1 --> double precision
+		 */
+		fmt = (fmt << 1) | df;
+		switch (subop) {
+			case 0: /* FCNVFF */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(MAJOR_0C_EXCP);
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvff(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvff(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(MAJOR_0C_EXCP);
+				}
+			case 1: /* FCNVXF */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 2: /* FCNVFX */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 3: /* FCNVFXT */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 5: /* FCNVUF (PA2.0 only) */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 6: /* FCNVFU (PA2.0 only) */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 7: /* FCNVFUT (PA2.0 only) */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 4: /* undefined */
+				return(MAJOR_0C_EXCP);
+		} /* end of switch subop */
+
+	case 2: /* class 2 */
+		fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];
+		r2 = extru(ir, fpr2pos, 5) * sizeof(double)/sizeof(u_int);
+		if (r2 == 0)
+			r2 = fpzeroreg;
+		if  (fpu_type_flags & PA2_0_FPU_FLAG) {
+			/* FTEST if nullify bit set, otherwise FCMP */
+			if (extru(ir, fpnulpos, 1)) {  /* FTEST */
+				switch (fmt) {
+				    case 0:
+					/*
+					 * arg0 is not used
+					 * second param is the t field used for
+					 * ftest,acc and ftest,rej
+					 * third param is the subop (y-field)
+					 */
+					BUG();
+					/* Unsupported
+					 * return(ftest(0L,extru(ir,fptpos,5),
+					 *	 &fpregs[0],subop));
+					 */
+				    case 1:
+				    case 2:
+				    case 3:
+					return(MAJOR_0C_EXCP);
+				}
+			} else {  /* FCMP */
+				switch (fmt) {
+				    case 0:
+					retval = sgl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				    case 1:
+					retval = dbl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			}
+		}  /* end of if for PA2.0 */
+		else {	/* PA1.0 & PA1.1 */
+		    switch (subop) {
+			case 2:
+			case 3:
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				return(MAJOR_0C_EXCP);
+			case 0: /* FCMP */
+				switch (fmt) {
+				    case 0:
+					retval = sgl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				    case 1:
+					retval = dbl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			case 1: /* FTEST */
+				switch (fmt) {
+				    case 0:
+					/*
+					 * arg0 is not used
+					 * second param is the t field used for
+					 * ftest,acc and ftest,rej
+					 * third param is the subop (y-field)
+					 */
+					BUG();
+					/* unsupported
+					 * return(ftest(0L,extru(ir,fptpos,5),
+					 *     &fpregs[0],subop));
+					 */
+				    case 1:
+				    case 2:
+				    case 3:
+					return(MAJOR_0C_EXCP);
+				}
+		    } /* end of switch subop */
+		} /* end of else for PA1.0 & PA1.1 */
+	case 3: /* class 3 */
+		r2 = extru(ir,fpr2pos,5) * sizeof(double)/sizeof(u_int);
+		if (r2 == 0)
+			r2 = fpzeroreg;
+		switch (subop) {
+			case 5:
+			case 6:
+			case 7:
+				return(MAJOR_0C_EXCP);
+			
+			case 0: /* FADD */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fadd(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fadd(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			case 1: /* FSUB */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fsub(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fsub(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			case 2: /* FMPY */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fmpy(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fmpy(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			case 3: /* FDIV */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fdiv(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fdiv(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+			case 4: /* FREM */
+				switch (fmt) {
+				    case 0:
+					return(sgl_frem(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_frem(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 2: /* illegal */
+				    case 3: /* quad not implemented */
+					return(MAJOR_0C_EXCP);
+				}
+		} /* end of class 3 switch */
+	} /* end of switch(class) */
+
+	/* If we get here, something is really wrong! */
+	return(MAJOR_0C_EXCP);
+}
+
+static u_int
+decode_0e(ir,class,subop,fpregs)
+u_int ir,class,subop;
+u_int fpregs[];
+{
+	u_int r1,r2,t;		/* operand register offsets */
+	u_int fmt;		/* also sf for class 1 conversions */
+	u_int df;		/* dest format for class 1 conversions */
+	u_int *status;
+	u_int retval, local_status;
+	u_int fpu_type_flags;
+
+	status = &fpregs[0];
+	local_status = fpregs[0];
+	r1 = ((extru(ir,fpr1pos,5)<<1)|(extru(ir,fpxr1pos,1)));
+	if (r1 == 0)
+		r1 = fpzeroreg;
+	t = ((extru(ir,fptpos,5)<<1)|(extru(ir,fpxtpos,1)));
+	if (t == 0 && class != 2)
+		return(MAJOR_0E_EXCP);
+	if (class < 2)		/* class 0 or 1 has 2 bit fmt */
+		fmt = extru(ir,fpfmtpos,2);
+	else 			/* class 2 and 3 have 1 bit fmt */
+		fmt = extru(ir,fp0efmtpos,1);
+	/*
+	 * An undefined combination, double precision accessing the
+	 * right half of a FPR, can get us into trouble.  
+	 * Let's just force proper alignment on it.
+	 */
+	if (fmt == DBL) {
+		r1 &= ~1;
+		if (class != 1)
+			t &= ~1;
+	}
+
+	switch (class) {
+	    case 0:
+		switch (subop) {
+			case 0: /* unimplemented */
+			case 1:
+				return(MAJOR_0E_EXCP);
+			case 2: /* FCPY */
+				switch (fmt) {
+				    case 2:
+				    case 3:
+					return(MAJOR_0E_EXCP);
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					fpregs[t] = fpregs[r1];
+					return(NOEXCEPTION);
+				}
+			case 3: /* FABS */
+				switch (fmt) {
+				    case 2:
+				    case 3:
+					return(MAJOR_0E_EXCP);
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					fpregs[t] = fpregs[r1] & 0x7fffffff;
+					return(NOEXCEPTION);
+				}
+			case 6: /* FNEG */
+				switch (fmt) {
+				    case 2:
+				    case 3:
+					return(MAJOR_0E_EXCP);
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					fpregs[t] = fpregs[r1] ^ 0x80000000;
+					return(NOEXCEPTION);
+				}
+			case 7: /* FNEGABS */
+				switch (fmt) {
+				    case 2:
+				    case 3:
+					return(MAJOR_0E_EXCP);
+				    case 1: /* double */
+					fpregs[t+1] = fpregs[r1+1];
+				    case 0: /* single */
+					fpregs[t] = fpregs[r1] | 0x80000000;
+					return(NOEXCEPTION);
+				}
+			case 4: /* FSQRT */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fsqrt(&fpregs[r1],0,
+						&fpregs[t], status));
+				    case 1:
+					return(dbl_fsqrt(&fpregs[r1],0,
+						&fpregs[t], status));
+				    case 2:
+				    case 3:
+					return(MAJOR_0E_EXCP);
+				}
+			case 5: /* FRMD */
+				switch (fmt) {
+				    case 0:
+					return(sgl_frnd(&fpregs[r1],0,
+						&fpregs[t], status));
+				    case 1:
+					return(dbl_frnd(&fpregs[r1],0,
+						&fpregs[t], status));
+				    case 2:
+				    case 3:
+					return(MAJOR_0E_EXCP);
+				}
+		} /* end of switch (subop */
+	
+	case 1: /* class 1 */
+		df = extru(ir,fpdfpos,2); /* get dest format */
+		/*
+		 * Fix Crashme problem (writing to 31R in double precision)
+		 * here too.
+		 */
+		if (df == DBL) {
+			t &= ~1;
+		}
+		if ((df & 2) || (fmt & 2))
+			return(MAJOR_0E_EXCP);
+		
+		fmt = (fmt << 1) | df;
+		switch (subop) {
+			case 0: /* FCNVFF */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(MAJOR_0E_EXCP);
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvff(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvff(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(MAJOR_0E_EXCP);
+				}
+			case 1: /* FCNVXF */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvxf(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 2: /* FCNVFX */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfx(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 3: /* FCNVFXT */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfxt(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 5: /* FCNVUF (PA2.0 only) */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvuf(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 6: /* FCNVFU (PA2.0 only) */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfu(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 7: /* FCNVFUT (PA2.0 only) */
+				switch(fmt) {
+				    case 0: /* sgl/sgl */
+					return(sgl_to_sgl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 1: /* sgl/dbl */
+					return(sgl_to_dbl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 2: /* dbl/sgl */
+					return(dbl_to_sgl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				    case 3: /* dbl/dbl */
+					return(dbl_to_dbl_fcnvfut(&fpregs[r1],0,
+						&fpregs[t],status));
+				}
+			case 4: /* undefined */
+				return(MAJOR_0C_EXCP);
+		} /* end of switch subop */
+	case 2: /* class 2 */
+		/*
+		 * Be careful out there.
+		 * Crashme can generate cases where FR31R is specified
+		 * as the source or target of a double precision operation.
+		 * Since we just pass the address of the floating-point
+		 * register to the emulation routines, this can cause
+		 * corruption of fpzeroreg.
+		 */
+		if (fmt == DBL)
+			r2 = (extru(ir,fpr2pos,5)<<1);
+		else
+			r2 = ((extru(ir,fpr2pos,5)<<1)|(extru(ir,fpxr2pos,1)));
+		fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];
+		if (r2 == 0)
+			r2 = fpzeroreg;
+		if  (fpu_type_flags & PA2_0_FPU_FLAG) {
+			/* FTEST if nullify bit set, otherwise FCMP */
+			if (extru(ir, fpnulpos, 1)) {  /* FTEST */
+				/* not legal */
+				return(MAJOR_0E_EXCP);
+			} else {  /* FCMP */
+			switch (fmt) {
+				    /*
+				     * fmt is only 1 bit long
+				     */
+				    case 0:
+					retval = sgl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				    case 1:
+					retval = dbl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				}
+			}
+		}  /* end of if for PA2.0 */
+		else {  /* PA1.0 & PA1.1 */
+		    switch (subop) {
+			case 1:
+			case 2:
+			case 3:
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+				return(MAJOR_0E_EXCP);
+			case 0: /* FCMP */
+				switch (fmt) {
+				    /*
+				     * fmt is only 1 bit long
+				     */
+				    case 0:
+					retval = sgl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				    case 1:
+					retval = dbl_fcmp(&fpregs[r1],
+						&fpregs[r2],extru(ir,fptpos,5),
+						&local_status);
+					update_status_cbit(status,local_status,
+						fpu_type_flags, subop);
+					return(retval);
+				}
+		    } /* end of switch subop */
+		} /* end of else for PA1.0 & PA1.1 */
+	case 3: /* class 3 */
+		/*
+		 * Be careful out there.
+		 * Crashme can generate cases where FR31R is specified
+		 * as the source or target of a double precision operation.
+		 * Since we just pass the address of the floating-point
+		 * register to the emulation routines, this can cause
+		 * corruption of fpzeroreg.
+		 */
+		if (fmt == DBL)
+			r2 = (extru(ir,fpr2pos,5)<<1);
+		else
+			r2 = ((extru(ir,fpr2pos,5)<<1)|(extru(ir,fpxr2pos,1)));
+		if (r2 == 0)
+			r2 = fpzeroreg;
+		switch (subop) {
+			case 5:
+			case 6:
+			case 7:
+				return(MAJOR_0E_EXCP);
+			
+			/*
+			 * Note that fmt is only 1 bit for class 3 */
+			case 0: /* FADD */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fadd(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fadd(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				}
+			case 1: /* FSUB */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fsub(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fsub(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				}
+			case 2: /* FMPY or XMPYU */
+				/*
+				 * check for integer multiply (x bit set)
+				 */
+				if (extru(ir,fpxpos,1)) {
+				    /*
+				     * emulate XMPYU
+				     */
+				    switch (fmt) {
+					case 0:
+					    /*
+					     * bad instruction if t specifies
+					     * the right half of a register
+					     */
+					    if (t & 1)
+						return(MAJOR_0E_EXCP);
+					    BUG();
+					    /* unsupported
+					     * impyu(&fpregs[r1],&fpregs[r2],
+						 * &fpregs[t]);
+					     */
+					    return(NOEXCEPTION);
+					case 1:
+						return(MAJOR_0E_EXCP);
+				    }
+				}
+				else { /* FMPY */
+				    switch (fmt) {
+				        case 0:
+					    return(sgl_fmpy(&fpregs[r1],
+					       &fpregs[r2],&fpregs[t],status));
+				        case 1:
+					    return(dbl_fmpy(&fpregs[r1],
+					       &fpregs[r2],&fpregs[t],status));
+				    }
+				}
+			case 3: /* FDIV */
+				switch (fmt) {
+				    case 0:
+					return(sgl_fdiv(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_fdiv(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				}
+			case 4: /* FREM */
+				switch (fmt) {
+				    case 0:
+					return(sgl_frem(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				    case 1:
+					return(dbl_frem(&fpregs[r1],&fpregs[r2],
+						&fpregs[t],status));
+				}
+		} /* end of class 3 switch */
+	} /* end of switch(class) */
+
+	/* If we get here, something is really wrong! */
+	return(MAJOR_0E_EXCP);
+}
+
+
+/*
+ * routine to decode the 06 (FMPYADD and FMPYCFXT) instruction
+ */
+static u_int
+decode_06(ir,fpregs)
+u_int ir;
+u_int fpregs[];
+{
+	u_int rm1, rm2, tm, ra, ta; /* operands */
+	u_int fmt;
+	u_int error = 0;
+	u_int status;
+	u_int fpu_type_flags;
+	union {
+		double dbl;
+		float flt;
+		struct { u_int i1; u_int i2; } ints;
+	} mtmp, atmp;
+
+
+	status = fpregs[0];		/* use a local copy of status reg */
+	fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS];  /* get fpu type flags */
+	fmt = extru(ir, fpmultifmt, 1);	/* get sgl/dbl flag */
+	if (fmt == 0) { /* DBL */
+		rm1 = extru(ir, fprm1pos, 5) * sizeof(double)/sizeof(u_int);
+		if (rm1 == 0)
+			rm1 = fpzeroreg;
+		rm2 = extru(ir, fprm2pos, 5) * sizeof(double)/sizeof(u_int);
+		if (rm2 == 0)
+			rm2 = fpzeroreg;
+		tm = extru(ir, fptmpos, 5) * sizeof(double)/sizeof(u_int);
+		if (tm == 0)
+			return(MAJOR_06_EXCP);
+		ra = extru(ir, fprapos, 5) * sizeof(double)/sizeof(u_int);
+		ta = extru(ir, fptapos, 5) * sizeof(double)/sizeof(u_int);
+		if (ta == 0)
+			return(MAJOR_06_EXCP);
+
+		if  (fpu_type_flags & TIMEX_ROLEX_FPU_MASK)  {
+
+			if (ra == 0) {
+			 	/* special case FMPYCFXT, see sgl case below */
+				if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],
+					&mtmp.ints.i1,&status))
+					error = 1;
+				if (dbl_to_sgl_fcnvfxt(&fpregs[ta],
+					&atmp.ints.i1,&atmp.ints.i1,&status))
+					error = 1;
+				}
+			else {
+
+			if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],&mtmp.ints.i1,
+					&status))
+				error = 1;
+			if (dbl_fadd(&fpregs[ta], &fpregs[ra], &atmp.ints.i1,
+					&status))
+				error = 1;
+				}
+			}
+
+		else
+
+			{
+			if (ra == 0)
+				ra = fpzeroreg;
+
+			if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],&mtmp.ints.i1,
+					&status))
+				error = 1;
+			if (dbl_fadd(&fpregs[ta], &fpregs[ra], &atmp.ints.i1,
+					&status))
+				error = 1;
+
+			}
+
+		if (error)
+			return(MAJOR_06_EXCP);
+		else {
+			/* copy results */
+			fpregs[tm] = mtmp.ints.i1;
+			fpregs[tm+1] = mtmp.ints.i2;
+			fpregs[ta] = atmp.ints.i1;
+			fpregs[ta+1] = atmp.ints.i2;
+			fpregs[0] = status;
+			return(NOEXCEPTION);
+		}
+	}
+	else { /* SGL */
+		/*
+		 * calculate offsets for single precision numbers
+		 * See table 6-14 in PA-89 architecture for mapping
+		 */
+		rm1 = (extru(ir,fprm1pos,4) | 0x10 ) << 1;	/* get offset */
+		rm1 |= extru(ir,fprm1pos-4,1);	/* add right word offset */
+
+		rm2 = (extru(ir,fprm2pos,4) | 0x10 ) << 1;	/* get offset */
+		rm2 |= extru(ir,fprm2pos-4,1);	/* add right word offset */
+
+		tm = (extru(ir,fptmpos,4) | 0x10 ) << 1;	/* get offset */
+		tm |= extru(ir,fptmpos-4,1);	/* add right word offset */
+
+		ra = (extru(ir,fprapos,4) | 0x10 ) << 1;	/* get offset */
+		ra |= extru(ir,fprapos-4,1);	/* add right word offset */
+
+		ta = (extru(ir,fptapos,4) | 0x10 ) << 1;	/* get offset */
+		ta |= extru(ir,fptapos-4,1);	/* add right word offset */
+		
+		if (ra == 0x20 &&(fpu_type_flags & TIMEX_ROLEX_FPU_MASK)) {
+			/* special case FMPYCFXT (really 0)
+			  * This instruction is only present on the Timex and
+			  * Rolex fpu's in so if it is the special case and
+			  * one of these fpu's we run the FMPYCFXT instruction
+			  */
+			if (sgl_fmpy(&fpregs[rm1],&fpregs[rm2],&mtmp.ints.i1,
+					&status))
+				error = 1;
+			if (sgl_to_sgl_fcnvfxt(&fpregs[ta],&atmp.ints.i1,
+				&atmp.ints.i1,&status))
+				error = 1;
+		}
+		else {
+			if (sgl_fmpy(&fpregs[rm1],&fpregs[rm2],&mtmp.ints.i1,
+					&status))
+				error = 1;
+			if (sgl_fadd(&fpregs[ta], &fpregs[ra], &atmp.ints.i1,
+					&status))
+				error = 1;
+		}
+		if (error)
+			return(MAJOR_06_EXCP);
+		else {
+			/* copy results */
+			fpregs[tm] = mtmp.ints.i1;
+			fpregs[ta] = atmp.ints.i1;
+			fpregs[0] = status;
+			return(NOEXCEPTION);
+		}
+	}
+}
+
+/*
+ * routine to decode the 26 (FMPYSUB) instruction
+ */
+static u_int
+decode_26(ir,fpregs)
+u_int ir;
+u_int fpregs[];
+{
+	u_int rm1, rm2, tm, ra, ta; /* operands */
+	u_int fmt;
+	u_int error = 0;
+	u_int status;
+	union {
+		double dbl;
+		float flt;
+		struct { u_int i1; u_int i2; } ints;
+	} mtmp, atmp;
+
+
+	status = fpregs[0];
+	fmt = extru(ir, fpmultifmt, 1);	/* get sgl/dbl flag */
+	if (fmt == 0) { /* DBL */
+		rm1 = extru(ir, fprm1pos, 5) * sizeof(double)/sizeof(u_int);
+		if (rm1 == 0)
+			rm1 = fpzeroreg;
+		rm2 = extru(ir, fprm2pos, 5) * sizeof(double)/sizeof(u_int);
+		if (rm2 == 0)
+			rm2 = fpzeroreg;
+		tm = extru(ir, fptmpos, 5) * sizeof(double)/sizeof(u_int);
+		if (tm == 0)
+			return(MAJOR_26_EXCP);
+		ra = extru(ir, fprapos, 5) * sizeof(double)/sizeof(u_int);
+		if (ra == 0)
+			return(MAJOR_26_EXCP);
+		ta = extru(ir, fptapos, 5) * sizeof(double)/sizeof(u_int);
+		if (ta == 0)
+			return(MAJOR_26_EXCP);
+		
+		if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],&mtmp.ints.i1,&status))
+			error = 1;
+		if (dbl_fsub(&fpregs[ta], &fpregs[ra], &atmp.ints.i1,&status))
+			error = 1;
+		if (error)
+			return(MAJOR_26_EXCP);
+		else {
+			/* copy results */
+			fpregs[tm] = mtmp.ints.i1;
+			fpregs[tm+1] = mtmp.ints.i2;
+			fpregs[ta] = atmp.ints.i1;
+			fpregs[ta+1] = atmp.ints.i2;
+			fpregs[0] = status;
+			return(NOEXCEPTION);
+		}
+	}
+	else { /* SGL */
+		/*
+		 * calculate offsets for single precision numbers
+		 * See table 6-14 in PA-89 architecture for mapping
+		 */
+		rm1 = (extru(ir,fprm1pos,4) | 0x10 ) << 1;	/* get offset */
+		rm1 |= extru(ir,fprm1pos-4,1);	/* add right word offset */
+
+		rm2 = (extru(ir,fprm2pos,4) | 0x10 ) << 1;	/* get offset */
+		rm2 |= extru(ir,fprm2pos-4,1);	/* add right word offset */
+
+		tm = (extru(ir,fptmpos,4) | 0x10 ) << 1;	/* get offset */
+		tm |= extru(ir,fptmpos-4,1);	/* add right word offset */
+
+		ra = (extru(ir,fprapos,4) | 0x10 ) << 1;	/* get offset */
+		ra |= extru(ir,fprapos-4,1);	/* add right word offset */
+
+		ta = (extru(ir,fptapos,4) | 0x10 ) << 1;	/* get offset */
+		ta |= extru(ir,fptapos-4,1);	/* add right word offset */
+		
+		if (sgl_fmpy(&fpregs[rm1],&fpregs[rm2],&mtmp.ints.i1,&status))
+			error = 1;
+		if (sgl_fsub(&fpregs[ta], &fpregs[ra], &atmp.ints.i1,&status))
+			error = 1;
+		if (error)
+			return(MAJOR_26_EXCP);
+		else {
+			/* copy results */
+			fpregs[tm] = mtmp.ints.i1;
+			fpregs[ta] = atmp.ints.i1;
+			fpregs[0] = status;
+			return(NOEXCEPTION);
+		}
+	}
+
+}
+
+/*
+ * routine to decode the 2E (FMPYFADD,FMPYNFADD) instructions
+ */
+static u_int
+decode_2e(ir,fpregs)
+u_int ir;
+u_int fpregs[];
+{
+	u_int rm1, rm2, ra, t; /* operands */
+	u_int fmt;
+
+	fmt = extru(ir,fpfmtpos,1);	/* get fmt completer */
+	if (fmt == DBL) { /* DBL */
+		rm1 = extru(ir,fprm1pos,5) * sizeof(double)/sizeof(u_int);
+		if (rm1 == 0)
+			rm1 = fpzeroreg;
+		rm2 = extru(ir,fprm2pos,5) * sizeof(double)/sizeof(u_int);
+		if (rm2 == 0)
+			rm2 = fpzeroreg;
+		ra = ((extru(ir,fpraupos,3)<<2)|(extru(ir,fpralpos,3)>>1)) *
+		     sizeof(double)/sizeof(u_int);
+		if (ra == 0)
+			ra = fpzeroreg;
+		t = extru(ir,fptpos,5) * sizeof(double)/sizeof(u_int);
+		if (t == 0)
+			return(MAJOR_2E_EXCP);
+
+		if (extru(ir,fpfusedsubop,1)) { /* fmpyfadd or fmpynfadd? */
+			return(dbl_fmpynfadd(&fpregs[rm1], &fpregs[rm2],
+					&fpregs[ra], &fpregs[0], &fpregs[t]));
+		} else {
+			return(dbl_fmpyfadd(&fpregs[rm1], &fpregs[rm2],
+					&fpregs[ra], &fpregs[0], &fpregs[t]));
+		}
+	} /* end DBL */
+	else { /* SGL */
+		rm1 = (extru(ir,fprm1pos,5)<<1)|(extru(ir,fpxrm1pos,1));
+		if (rm1 == 0)
+			rm1 = fpzeroreg;
+		rm2 = (extru(ir,fprm2pos,5)<<1)|(extru(ir,fpxrm2pos,1));
+		if (rm2 == 0)
+			rm2 = fpzeroreg;
+		ra = (extru(ir,fpraupos,3)<<3)|extru(ir,fpralpos,3);
+		if (ra == 0)
+			ra = fpzeroreg;
+		t = ((extru(ir,fptpos,5)<<1)|(extru(ir,fpxtpos,1)));
+		if (t == 0)
+			return(MAJOR_2E_EXCP);
+
+		if (extru(ir,fpfusedsubop,1)) { /* fmpyfadd or fmpynfadd? */
+			return(sgl_fmpynfadd(&fpregs[rm1], &fpregs[rm2],
+					&fpregs[ra], &fpregs[0], &fpregs[t]));
+		} else {
+			return(sgl_fmpyfadd(&fpregs[rm1], &fpregs[rm2],
+					&fpregs[ra], &fpregs[0], &fpregs[t]));
+		}
+	} /* end SGL */
+}
+
+/*
+ * update_status_cbit
+ *
+ *	This routine returns the correct FP status register value in
+ *	*status, based on the C-bit & V-bit returned by the FCMP
+ *	emulation routine in new_status.  The architecture type
+ *	(PA83, PA89 or PA2.0) is available in fpu_type.  The y_field
+ *	and the architecture type are used to determine what flavor
+ *	of FCMP is being emulated.
+ */
+static void
+update_status_cbit(status, new_status, fpu_type, y_field)
+u_int *status, new_status;
+u_int fpu_type;
+u_int y_field;
+{
+	/*
+	 * For PA89 FPU's which implement the Compare Queue and
+	 * for PA2.0 FPU's, update the Compare Queue if the y-field = 0,
+	 * otherwise update the specified bit in the Compare Array.
+	 * Note that the y-field will always be 0 for non-PA2.0 FPU's.
+	 */
+	if ((fpu_type & TIMEX_EXTEN_FLAG) || 
+	    (fpu_type & ROLEX_EXTEN_FLAG) ||
+	    (fpu_type & PA2_0_FPU_FLAG)) {
+		if (y_field == 0) {
+			*status = ((*status & 0x04000000) >> 5) | /* old Cbit */
+				  ((*status & 0x003ff000) >> 1) | /* old CQ   */
+				  (new_status & 0xffc007ff); /* all other bits*/
+		} else {
+			*status = (*status & 0x04000000) |     /* old Cbit */
+				  ((new_status & 0x04000000) >> (y_field+4)) |
+				  (new_status & ~0x04000000 &  /* other bits */
+				   ~(0x04000000 >> (y_field+4)));
+		}
+	}
+	/* if PA83, just update the C-bit */
+	else {
+		*status = new_status;
+	}
+}
diff -Nru a/arch/parisc/math-emu/frnd.c b/arch/parisc/math-emu/frnd.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/frnd.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,252 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  Purpose:
+ *	Single Floating-point Round to Integer
+ *	Double Floating-point Round to Integer
+ *	Quad Floating-point Round to Integer (returns unimplemented)
+ *
+ *  External Interfaces:
+ *	dbl_frnd(srcptr,nullptr,dstptr,status)
+ *	sgl_frnd(srcptr,nullptr,dstptr,status)
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+#include "dbl_float.h"
+#include "cnv_float.h"
+
+/*
+ *  Single Floating-point Round to Integer
+ */
+
+/*ARGSUSED*/
+int
+sgl_frnd(sgl_floating_point *srcptr,
+	unsigned int *nullptr,
+	sgl_floating_point *dstptr,
+	unsigned int *status)
+{
+	register unsigned int src, result;
+	register int src_exponent;
+	register boolean inexact = FALSE;
+
+	src = *srcptr;
+        /*
+         * check source operand for NaN or infinity
+         */
+        if ((src_exponent = Sgl_exponent(src)) == SGL_INFINITY_EXPONENT) {
+                /*
+                 * is signaling NaN?
+                 */
+                if (Sgl_isone_signaling(src)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Sgl_set_quiet(src);
+                }
+                /*
+                 * return quiet NaN or infinity
+                 */
+                *dstptr = src;
+                return(NOEXCEPTION);
+        }
+	/* 
+	 * Need to round?
+	 */
+	if ((src_exponent -= SGL_BIAS) >= SGL_P - 1) {
+		*dstptr = src;
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		Sgl_clear_exponent_set_hidden(src);
+		result = src;
+		Sgl_rightshift(result,(SGL_P-1) - (src_exponent));
+		/* check for inexact */
+		if (Sgl_isinexact_to_fix(src,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     if (Sgl_iszero_sign(src)) Sgl_increment(result);
+			     break;
+			case ROUNDMINUS:
+			     if (Sgl_isone_sign(src)) Sgl_increment(result);
+			     break;
+			case ROUNDNEAREST:
+			     if (Sgl_isone_roundbit(src,src_exponent))
+			        if (Sgl_isone_stickybit(src,src_exponent) 
+				|| (Sgl_isone_lowmantissa(result))) 
+					Sgl_increment(result);
+			} 
+		}
+		Sgl_leftshift(result,(SGL_P-1) - (src_exponent));
+		if (Sgl_isone_hiddenoverflow(result)) 
+			Sgl_set_exponent(result,src_exponent + (SGL_BIAS+1));
+		else Sgl_set_exponent(result,src_exponent + SGL_BIAS);
+	}
+	else {
+		result = src;  		/* set sign */
+		Sgl_setzero_exponentmantissa(result);
+		/* check for inexact */
+		if (Sgl_isnotzero_exponentmantissa(src)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     if (Sgl_iszero_sign(src)) 
+				Sgl_set_exponent(result,SGL_BIAS);
+			     break;
+			case ROUNDMINUS:
+			     if (Sgl_isone_sign(src)) 
+				Sgl_set_exponent(result,SGL_BIAS);
+			     break;
+			case ROUNDNEAREST:
+			     if (src_exponent == -1)
+			        if (Sgl_isnotzero_mantissa(src))
+				   Sgl_set_exponent(result,SGL_BIAS);
+			} 
+		}
+	}
+	*dstptr = result;
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+} 
+
+/*
+ *  Double Floating-point Round to Integer
+ */
+
+/*ARGSUSED*/
+int
+dbl_frnd(
+	dbl_floating_point *srcptr,
+	unsigned int *nullptr,
+	dbl_floating_point *dstptr,
+	unsigned int *status)
+{
+	register unsigned int srcp1, srcp2, resultp1, resultp2;
+	register int src_exponent;
+	register boolean inexact = FALSE;
+
+	Dbl_copyfromptr(srcptr,srcp1,srcp2);
+        /*
+         * check source operand for NaN or infinity
+         */
+        if ((src_exponent = Dbl_exponent(srcp1)) == DBL_INFINITY_EXPONENT) {
+                /*
+                 * is signaling NaN?
+                 */
+                if (Dbl_isone_signaling(srcp1)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Dbl_set_quiet(srcp1);
+                }
+                /*
+                 * return quiet NaN or infinity
+                 */
+                Dbl_copytoptr(srcp1,srcp2,dstptr);
+                return(NOEXCEPTION);
+        }
+	/* 
+	 * Need to round?
+	 */
+	if ((src_exponent -= DBL_BIAS) >= DBL_P - 1) {
+		Dbl_copytoptr(srcp1,srcp2,dstptr);
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate result
+	 */
+	if (src_exponent >= 0) {
+		Dbl_clear_exponent_set_hidden(srcp1);
+		resultp1 = srcp1;
+		resultp2 = srcp2;
+		Dbl_rightshift(resultp1,resultp2,(DBL_P-1) - (src_exponent));
+		/* check for inexact */
+		if (Dbl_isinexact_to_fix(srcp1,srcp2,src_exponent)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     if (Dbl_iszero_sign(srcp1)) 
+				Dbl_increment(resultp1,resultp2);
+			     break;
+			case ROUNDMINUS:
+			     if (Dbl_isone_sign(srcp1)) 
+				Dbl_increment(resultp1,resultp2);
+			     break;
+			case ROUNDNEAREST:
+			     if (Dbl_isone_roundbit(srcp1,srcp2,src_exponent))
+			      if (Dbl_isone_stickybit(srcp1,srcp2,src_exponent) 
+				  || (Dbl_isone_lowmantissap2(resultp2))) 
+					Dbl_increment(resultp1,resultp2);
+			} 
+		}
+		Dbl_leftshift(resultp1,resultp2,(DBL_P-1) - (src_exponent));
+		if (Dbl_isone_hiddenoverflow(resultp1))
+			Dbl_set_exponent(resultp1,src_exponent + (DBL_BIAS+1));
+		else Dbl_set_exponent(resultp1,src_exponent + DBL_BIAS);
+	}
+	else {
+		resultp1 = srcp1;  /* set sign */
+		Dbl_setzero_exponentmantissa(resultp1,resultp2);
+		/* check for inexact */
+		if (Dbl_isnotzero_exponentmantissa(srcp1,srcp2)) {
+			inexact = TRUE;
+			/*  round result  */
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+			     if (Dbl_iszero_sign(srcp1)) 
+				Dbl_set_exponent(resultp1,DBL_BIAS);
+			     break;
+			case ROUNDMINUS:
+			     if (Dbl_isone_sign(srcp1)) 
+				Dbl_set_exponent(resultp1,DBL_BIAS);
+			     break;
+			case ROUNDNEAREST:
+			     if (src_exponent == -1)
+			        if (Dbl_isnotzero_mantissa(srcp1,srcp2))
+				   Dbl_set_exponent(resultp1,DBL_BIAS);
+			} 
+		}
+	}
+	Dbl_copytoptr(resultp1,resultp2,dstptr);
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/hppa.h b/arch/parisc/math-emu/hppa.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/hppa.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,42 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+
+/* amount is assumed to be a constant between 0 and 32 (non-inclusive) */
+#define Shiftdouble(left,right,amount,dest)			\
+    /* int left, right, amount, dest; */			\
+    dest = ((left) << (32-(amount))) | ((unsigned int)(right) >> (amount))
+
+/* amount must be less than 32 */
+#define Variableshiftdouble(left,right,amount,dest)		\
+    /* unsigned int left, right;  int amount, dest; */		\
+    if (amount == 0) dest = right;				\
+    else dest = ((((unsigned) left)&0x7fffffff) << (32-(amount))) |	\
+          ((unsigned) right >> (amount))
+
+/* amount must be between 0 and 32 (non-inclusive) */
+#define Variable_shift_double(left,right,amount,dest)		\
+    /* unsigned int left, right;  int amount, dest; */		\
+    dest = (left << (32-(amount))) | ((unsigned) right >> (amount))
diff -Nru a/arch/parisc/math-emu/math-emu.h b/arch/parisc/math-emu/math-emu.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/math-emu.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,27 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+#ifndef _PARISC_MATH_EMU_H
+#define _PARISC_MATH_EMU_H
+
+#include <asm/ptrace.h>
+extern int handle_fpe(struct pt_regs *regs);
+
+#endif
diff -Nru a/arch/parisc/math-emu/sfadd.c b/arch/parisc/math-emu/sfadd.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfadd.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,518 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfadd.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single_add: add two single precision values.
+ *
+ *  External Interfaces:
+ *	sgl_fadd(leftptr, rightptr, dstptr, status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+
+/*
+ * Single_add: add two single precision values.
+ */
+int
+sgl_fadd(
+    sgl_floating_point *leftptr,
+    sgl_floating_point *rightptr,
+    sgl_floating_point *dstptr,
+    unsigned int *status)
+    {
+    register unsigned int left, right, result, extent;
+    register unsigned int signless_upper_left, signless_upper_right, save;
+    
+    
+    register int result_exponent, right_exponent, diff_exponent;
+    register int sign_save, jumpsize;
+    register boolean inexact = FALSE;
+    register boolean underflowtrap;
+        
+    /* Create local copies of the numbers */
+    left = *leftptr;
+    right = *rightptr;
+
+    /* A zero "save" helps discover equal operands (for later),  *
+     * and is used in swapping operands (if needed).             */
+    Sgl_xortointp1(left,right,/*to*/save);
+
+    /*
+     * check first operand for NaN's or infinity
+     */
+    if ((result_exponent = Sgl_exponent(left)) == SGL_INFINITY_EXPONENT)
+	{
+	if (Sgl_iszero_mantissa(left)) 
+	    {
+	    if (Sgl_isnotnan(right)) 
+		{
+		if (Sgl_isinfinity(right) && save!=0) 
+		    {
+		    /* 
+		     * invalid since operands are opposite signed infinity's
+		     */
+		    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                    Set_invalidflag();
+                    Sgl_makequietnan(result);
+		    *dstptr = result;
+		    return(NOEXCEPTION);
+		    }
+		/*
+	 	 * return infinity
+	 	 */
+		*dstptr = left;
+		return(NOEXCEPTION);
+		}
+	    }
+	else 
+	    {
+            /*
+             * is NaN; signaling or quiet?
+             */
+            if (Sgl_isone_signaling(left)) 
+		{
+               	/* trap if INVALIDTRAP enabled */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+        	/* make NaN quiet */
+        	Set_invalidflag();
+        	Sgl_set_quiet(left);
+        	}
+	    /* 
+	     * is second operand a signaling NaN? 
+	     */
+	    else if (Sgl_is_signalingnan(right)) 
+		{
+        	/* trap if INVALIDTRAP enabled */
+               	if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+		/* make NaN quiet */
+		Set_invalidflag();
+		Sgl_set_quiet(right);
+		*dstptr = right;
+		return(NOEXCEPTION);
+		}
+	    /*
+ 	     * return quiet NaN
+ 	     */
+ 	    *dstptr = left;
+ 	    return(NOEXCEPTION);
+	    }
+	} /* End left NaN or Infinity processing */
+    /*
+     * check second operand for NaN's or infinity
+     */
+    if (Sgl_isinfinity_exponent(right)) 
+	{
+	if (Sgl_iszero_mantissa(right)) 
+	    {
+	    /* return infinity */
+	    *dstptr = right;
+	    return(NOEXCEPTION);
+	    }
+        /*
+         * is NaN; signaling or quiet?
+         */
+        if (Sgl_isone_signaling(right)) 
+	    {
+            /* trap if INVALIDTRAP enabled */
+	    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+	    /* make NaN quiet */
+	    Set_invalidflag();
+	    Sgl_set_quiet(right);
+	    }
+	/*
+	 * return quiet NaN
+ 	 */
+	*dstptr = right;
+	return(NOEXCEPTION);
+    	} /* End right NaN or Infinity processing */
+
+    /* Invariant: Must be dealing with finite numbers */
+
+    /* Compare operands by removing the sign */
+    Sgl_copytoint_exponentmantissa(left,signless_upper_left);
+    Sgl_copytoint_exponentmantissa(right,signless_upper_right);
+
+    /* sign difference selects add or sub operation. */
+    if(Sgl_ismagnitudeless(signless_upper_left,signless_upper_right))
+	{
+	/* Set the left operand to the larger one by XOR swap *
+	 *  First finish the first word using "save"          */
+	Sgl_xorfromintp1(save,right,/*to*/right);
+	Sgl_xorfromintp1(save,left,/*to*/left);
+	result_exponent = Sgl_exponent(left);
+	}
+    /* Invariant:  left is not smaller than right. */ 
+
+    if((right_exponent = Sgl_exponent(right)) == 0)
+        {
+	/* Denormalized operands.  First look for zeroes */
+	if(Sgl_iszero_mantissa(right)) 
+	    {
+	    /* right is zero */
+	    if(Sgl_iszero_exponentmantissa(left))
+		{
+		/* Both operands are zeros */
+		if(Is_rounding_mode(ROUNDMINUS))
+		    {
+		    Sgl_or_signs(left,/*with*/right);
+		    }
+		else
+		    {
+		    Sgl_and_signs(left,/*with*/right);
+		    }
+		}
+	    else 
+		{
+		/* Left is not a zero and must be the result.  Trapped
+		 * underflows are signaled if left is denormalized.  Result
+		 * is always exact. */
+		if( (result_exponent == 0) && Is_underflowtrap_enabled() )
+		    {
+		    /* need to normalize results mantissa */
+	    	    sign_save = Sgl_signextendedsign(left);
+		    Sgl_leftshiftby1(left);
+		    Sgl_normalize(left,result_exponent);
+		    Sgl_set_sign(left,/*using*/sign_save);
+		    Sgl_setwrapped_exponent(left,result_exponent,unfl);
+		    *dstptr = left;
+		    return(UNDERFLOWEXCEPTION);
+		    }
+		}
+	    *dstptr = left;
+	    return(NOEXCEPTION);
+	    }
+
+	/* Neither are zeroes */
+	Sgl_clear_sign(right);	/* Exponent is already cleared */
+	if(result_exponent == 0 )
+	    {
+	    /* Both operands are denormalized.  The result must be exact
+	     * and is simply calculated.  A sum could become normalized and a
+	     * difference could cancel to a true zero. */
+	    if( (/*signed*/int) save < 0 )
+		{
+		Sgl_subtract(left,/*minus*/right,/*into*/result);
+		if(Sgl_iszero_mantissa(result))
+		    {
+		    if(Is_rounding_mode(ROUNDMINUS))
+			{
+			Sgl_setone_sign(result);
+			}
+		    else
+			{
+			Sgl_setzero_sign(result);
+			}
+		    *dstptr = result;
+		    return(NOEXCEPTION);
+		    }
+		}
+	    else
+		{
+		Sgl_addition(left,right,/*into*/result);
+		if(Sgl_isone_hidden(result))
+		    {
+		    *dstptr = result;
+		    return(NOEXCEPTION);
+		    }
+		}
+	    if(Is_underflowtrap_enabled())
+		{
+		/* need to normalize result */
+	    	sign_save = Sgl_signextendedsign(result);
+		Sgl_leftshiftby1(result);
+		Sgl_normalize(result,result_exponent);
+		Sgl_set_sign(result,/*using*/sign_save);
+                Sgl_setwrapped_exponent(result,result_exponent,unfl);
+		*dstptr = result;
+		return(UNDERFLOWEXCEPTION);
+		}
+	    *dstptr = result;
+	    return(NOEXCEPTION);
+	    }
+	right_exponent = 1;	/* Set exponent to reflect different bias
+				 * with denomalized numbers. */
+	}
+    else
+	{
+	Sgl_clear_signexponent_set_hidden(right);
+	}
+    Sgl_clear_exponent_set_hidden(left);
+    diff_exponent = result_exponent - right_exponent;
+
+    /* 
+     * Special case alignment of operands that would force alignment 
+     * beyond the extent of the extension.  A further optimization
+     * could special case this but only reduces the path length for this
+     * infrequent case.
+     */
+    if(diff_exponent > SGL_THRESHOLD)
+	{
+	diff_exponent = SGL_THRESHOLD;
+	}
+    
+    /* Align right operand by shifting to right */
+    Sgl_right_align(/*operand*/right,/*shifted by*/diff_exponent,
+     /*and lower to*/extent);
+
+    /* Treat sum and difference of the operands separately. */
+    if( (/*signed*/int) save < 0 )
+	{
+	/*
+	 * Difference of the two operands.  Their can be no overflow.  A
+	 * borrow can occur out of the hidden bit and force a post
+	 * normalization phase.
+	 */
+	Sgl_subtract_withextension(left,/*minus*/right,/*with*/extent,/*into*/result);
+	if(Sgl_iszero_hidden(result))
+	    {
+	    /* Handle normalization */
+	    /* A straight foward algorithm would now shift the result
+	     * and extension left until the hidden bit becomes one.  Not
+	     * all of the extension bits need participate in the shift.
+	     * Only the two most significant bits (round and guard) are
+	     * needed.  If only a single shift is needed then the guard
+	     * bit becomes a significant low order bit and the extension
+	     * must participate in the rounding.  If more than a single 
+	     * shift is needed, then all bits to the right of the guard 
+	     * bit are zeros, and the guard bit may or may not be zero. */
+	    sign_save = Sgl_signextendedsign(result);
+            Sgl_leftshiftby1_withextent(result,extent,result);
+
+            /* Need to check for a zero result.  The sign and exponent
+	     * fields have already been zeroed.  The more efficient test
+	     * of the full object can be used.
+	     */
+    	    if(Sgl_iszero(result))
+		/* Must have been "x-x" or "x+(-x)". */
+		{
+		if(Is_rounding_mode(ROUNDMINUS)) Sgl_setone_sign(result);
+		*dstptr = result;
+		return(NOEXCEPTION);
+		}
+	    result_exponent--;
+	    /* Look to see if normalization is finished. */
+	    if(Sgl_isone_hidden(result))
+		{
+		if(result_exponent==0)
+		    {
+		    /* Denormalized, exponent should be zero.  Left operand *
+ 		     * was normalized, so extent (guard, round) was zero    */
+		    goto underflow;
+		    }
+		else
+		    {
+		    /* No further normalization is needed. */
+		    Sgl_set_sign(result,/*using*/sign_save);
+	    	    Ext_leftshiftby1(extent);
+		    goto round;
+		    }
+		}
+
+	    /* Check for denormalized, exponent should be zero.  Left    * 
+	     * operand was normalized, so extent (guard, round) was zero */
+	    if(!(underflowtrap = Is_underflowtrap_enabled()) &&
+	       result_exponent==0) goto underflow;
+
+	    /* Shift extension to complete one bit of normalization and
+	     * update exponent. */
+	    Ext_leftshiftby1(extent);
+
+	    /* Discover first one bit to determine shift amount.  Use a
+	     * modified binary search.  We have already shifted the result
+	     * one position right and still not found a one so the remainder
+	     * of the extension must be zero and simplifies rounding. */
+	    /* Scan bytes */
+	    while(Sgl_iszero_hiddenhigh7mantissa(result))
+		{
+		Sgl_leftshiftby8(result);
+		if((result_exponent -= 8) <= 0  && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Now narrow it down to the nibble */
+	    if(Sgl_iszero_hiddenhigh3mantissa(result))
+		{
+		/* The lower nibble contains the normalizing one */
+		Sgl_leftshiftby4(result);
+		if((result_exponent -= 4) <= 0 && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Select case were first bit is set (already normalized)
+	     * otherwise select the proper shift. */
+	    if((jumpsize = Sgl_hiddenhigh3mantissa(result)) > 7)
+		{
+		/* Already normalized */
+		if(result_exponent <= 0) goto underflow;
+		Sgl_set_sign(result,/*using*/sign_save);
+		Sgl_set_exponent(result,/*using*/result_exponent);
+		*dstptr = result;
+		return(NOEXCEPTION);
+		}
+	    Sgl_sethigh4bits(result,/*using*/sign_save);
+	    switch(jumpsize) 
+		{
+		case 1:
+		    {
+		    Sgl_leftshiftby3(result);
+		    result_exponent -= 3;
+		    break;
+		    }
+		case 2:
+		case 3:
+		    {
+		    Sgl_leftshiftby2(result);
+		    result_exponent -= 2;
+		    break;
+		    }
+		case 4:
+		case 5:
+		case 6:
+		case 7:
+		    {
+		    Sgl_leftshiftby1(result);
+		    result_exponent -= 1;
+		    break;
+		    }
+		}
+	    if(result_exponent > 0) 
+		{
+		Sgl_set_exponent(result,/*using*/result_exponent);
+		*dstptr = result;
+		return(NOEXCEPTION); /* Sign bit is already set */
+		}
+	    /* Fixup potential underflows */
+	  underflow:
+	    if(Is_underflowtrap_enabled())
+		{
+		Sgl_set_sign(result,sign_save);
+                Sgl_setwrapped_exponent(result,result_exponent,unfl);
+		*dstptr = result;
+		/* inexact = FALSE; */
+		return(UNDERFLOWEXCEPTION);
+		}
+	    /* 
+	     * Since we cannot get an inexact denormalized result,
+	     * we can now return.
+	     */
+	    Sgl_right_align(result,/*by*/(1-result_exponent),extent);
+	    Sgl_clear_signexponent(result);
+	    Sgl_set_sign(result,sign_save);
+	    *dstptr = result;
+	    return(NOEXCEPTION);
+	    } /* end if(hidden...)... */
+	/* Fall through and round */
+	} /* end if(save < 0)... */
+    else 
+	{
+	/* Add magnitudes */
+	Sgl_addition(left,right,/*to*/result);
+	if(Sgl_isone_hiddenoverflow(result))
+	    {
+	    /* Prenormalization required. */
+	    Sgl_rightshiftby1_withextent(result,extent,extent);
+	    Sgl_arithrightshiftby1(result);
+	    result_exponent++;
+	    } /* end if hiddenoverflow... */
+	} /* end else ...add magnitudes... */
+    
+    /* Round the result.  If the extension is all zeros,then the result is
+     * exact.  Otherwise round in the correct direction.  No underflow is
+     * possible. If a postnormalization is necessary, then the mantissa is
+     * all zeros so no shift is needed. */
+  round:
+    if(Ext_isnotzero(extent))
+	{
+	inexact = TRUE;
+	switch(Rounding_mode())
+	    {
+	    case ROUNDNEAREST: /* The default. */
+	    if(Ext_isone_sign(extent))
+		{
+		/* at least 1/2 ulp */
+		if(Ext_isnotzero_lower(extent)  ||
+		  Sgl_isone_lowmantissa(result))
+		    {
+		    /* either exactly half way and odd or more than 1/2ulp */
+		    Sgl_increment(result);
+		    }
+		}
+	    break;
+
+	    case ROUNDPLUS:
+	    if(Sgl_iszero_sign(result))
+		{
+		/* Round up positive results */
+		Sgl_increment(result);
+		}
+	    break;
+	    
+	    case ROUNDMINUS:
+	    if(Sgl_isone_sign(result))
+		{
+		/* Round down negative results */
+		Sgl_increment(result);
+		}
+	    
+	    case ROUNDZERO:;
+	    /* truncate is simple */
+	    } /* end switch... */
+	if(Sgl_isone_hiddenoverflow(result)) result_exponent++;
+	}
+    if(result_exponent == SGL_INFINITY_EXPONENT)
+        {
+        /* Overflow */
+        if(Is_overflowtrap_enabled())
+	    {
+	    Sgl_setwrapped_exponent(result,result_exponent,ovfl);
+	    *dstptr = result;
+	    if (inexact)
+		if (Is_inexacttrap_enabled())
+		    return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+		else Set_inexactflag();
+	    return(OVERFLOWEXCEPTION);
+	    }
+        else
+	    {
+	    Set_overflowflag();
+	    inexact = TRUE;
+	    Sgl_setoverflow(result);
+	    }
+	}
+    else Sgl_set_exponent(result,result_exponent);
+    *dstptr = result;
+    if(inexact) 
+	if(Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+	else Set_inexactflag();
+    return(NOEXCEPTION);
+    }
diff -Nru a/arch/parisc/math-emu/sfcmp.c b/arch/parisc/math-emu/sfcmp.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfcmp.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,155 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfcmp.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	sgl_cmp: compare two values
+ *
+ *  External Interfaces:
+ *	sgl_fcmp(leftptr, rightptr, cond, status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+    
+/*
+ * sgl_cmp: compare two values
+ */
+int
+sgl_fcmp (sgl_floating_point * leftptr, sgl_floating_point * rightptr,
+	  unsigned int cond, unsigned int *status)
+                                           
+                       /* The predicate to be tested */
+                         
+    {
+    register unsigned int left, right;
+    register int xorresult;
+        
+    /* Create local copies of the numbers */
+    left = *leftptr;
+    right = *rightptr;
+
+    /*
+     * Test for NaN
+     */
+    if(    (Sgl_exponent(left) == SGL_INFINITY_EXPONENT)
+        || (Sgl_exponent(right) == SGL_INFINITY_EXPONENT) )
+	{
+	/* Check if a NaN is involved.  Signal an invalid exception when 
+	 * comparing a signaling NaN or when comparing quiet NaNs and the
+	 * low bit of the condition is set */
+        if( (  (Sgl_exponent(left) == SGL_INFINITY_EXPONENT)
+	    && Sgl_isnotzero_mantissa(left) 
+	    && (Exception(cond) || Sgl_isone_signaling(left)))
+	   ||
+	    (  (Sgl_exponent(right) == SGL_INFINITY_EXPONENT)
+	    && Sgl_isnotzero_mantissa(right) 
+	    && (Exception(cond) || Sgl_isone_signaling(right)) ) )
+	    {
+	    if( Is_invalidtrap_enabled() ) {
+	    	Set_status_cbit(Unordered(cond));
+		return(INVALIDEXCEPTION);
+	    }
+	    else Set_invalidflag();
+	    Set_status_cbit(Unordered(cond));
+	    return(NOEXCEPTION);
+	    }
+	/* All the exceptional conditions are handled, now special case
+	   NaN compares */
+        else if( ((Sgl_exponent(left) == SGL_INFINITY_EXPONENT)
+	    && Sgl_isnotzero_mantissa(left))
+	   ||
+	    ((Sgl_exponent(right) == SGL_INFINITY_EXPONENT)
+	    && Sgl_isnotzero_mantissa(right)) )
+	    {
+	    /* NaNs always compare unordered. */
+	    Set_status_cbit(Unordered(cond));
+	    return(NOEXCEPTION);
+	    }
+	/* infinities will drop down to the normal compare mechanisms */
+	}
+    /* First compare for unequal signs => less or greater or
+     * special equal case */
+    Sgl_xortointp1(left,right,xorresult);
+    if( xorresult < 0 )
+        {
+        /* left negative => less, left positive => greater.
+         * equal is possible if both operands are zeros. */
+        if( Sgl_iszero_exponentmantissa(left) 
+	  && Sgl_iszero_exponentmantissa(right) )
+            {
+	    Set_status_cbit(Equal(cond));
+	    }
+	else if( Sgl_isone_sign(left) )
+	    {
+	    Set_status_cbit(Lessthan(cond));
+	    }
+	else
+	    {
+	    Set_status_cbit(Greaterthan(cond));
+	    }
+        }
+    /* Signs are the same.  Treat negative numbers separately
+     * from the positives because of the reversed sense.  */
+    else if( Sgl_all(left) == Sgl_all(right) )
+        {
+        Set_status_cbit(Equal(cond));
+        }
+    else if( Sgl_iszero_sign(left) )
+        {
+        /* Positive compare */
+        if( Sgl_all(left) < Sgl_all(right) )
+	    {
+	    Set_status_cbit(Lessthan(cond));
+	    }
+	else
+	    {
+	    Set_status_cbit(Greaterthan(cond));
+	    }
+	}
+    else
+        {
+        /* Negative compare.  Signed or unsigned compares
+         * both work the same.  That distinction is only
+         * important when the sign bits differ. */
+        if( Sgl_all(left) > Sgl_all(right) )
+	    {
+	    Set_status_cbit(Lessthan(cond));
+	    }
+        else
+	    {
+	    Set_status_cbit(Greaterthan(cond));
+	    }
+        }
+	return(NOEXCEPTION);
+    }
diff -Nru a/arch/parisc/math-emu/sfdiv.c b/arch/parisc/math-emu/sfdiv.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfdiv.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,392 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfdiv.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Precision Floating-point Divide
+ *
+ *  External Interfaces:
+ *	sgl_fdiv(srcptr1,srcptr2,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+
+/*
+ *  Single Precision Floating-point Divide
+ */
+
+int
+sgl_fdiv (sgl_floating_point * srcptr1, sgl_floating_point * srcptr2,
+	  sgl_floating_point * dstptr, unsigned int *status)
+{
+	register unsigned int opnd1, opnd2, opnd3, result;
+	register int dest_exponent, count;
+	register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE;
+	boolean is_tiny;
+
+	opnd1 = *srcptr1;
+	opnd2 = *srcptr2;
+	/* 
+	 * set sign bit of result 
+	 */
+	if (Sgl_sign(opnd1) ^ Sgl_sign(opnd2)) Sgl_setnegativezero(result);  
+	else Sgl_setzero(result);
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd1)) {
+		if (Sgl_iszero_mantissa(opnd1)) {
+			if (Sgl_isnotnan(opnd2)) {
+				if (Sgl_isinfinity(opnd2)) {
+					/* 
+					 * invalid since both operands 
+					 * are infinity 
+					 */
+					if (Is_invalidtrap_enabled()) 
+                                		return(INVALIDEXCEPTION);
+                                	Set_invalidflag();
+                                	Sgl_makequietnan(result);
+					*dstptr = result;
+					return(NOEXCEPTION);
+				}
+				/*
+			 	 * return infinity
+			 	 */
+				Sgl_setinfinity_exponentmantissa(result);
+				*dstptr = result;
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+                	/*
+                 	 * is NaN; signaling or quiet?
+                 	 */
+                	if (Sgl_isone_signaling(opnd1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Sgl_set_quiet(opnd1);
+                	}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd2)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled())
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Sgl_set_quiet(opnd2);
+                		*dstptr = opnd2;
+                		return(NOEXCEPTION);
+			}
+                	/*
+                 	 * return quiet NaN
+                 	 */
+                	*dstptr = opnd1;
+                	return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd2)) {
+		if (Sgl_iszero_mantissa(opnd2)) {
+			/*
+			 * return zero
+			 */
+			Sgl_setzero_exponentmantissa(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+                /*
+                 * is NaN; signaling or quiet?
+                 */
+                if (Sgl_isone_signaling(opnd2)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Sgl_set_quiet(opnd2);
+                }
+                /*
+                 * return quiet NaN
+                 */
+                *dstptr = opnd2;
+                return(NOEXCEPTION);
+	}
+	/*
+	 * check for division by zero
+	 */
+	if (Sgl_iszero_exponentmantissa(opnd2)) {
+		if (Sgl_iszero_exponentmantissa(opnd1)) {
+			/* invalid since both operands are zero */
+			if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        Set_invalidflag();
+                        Sgl_makequietnan(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+		if (Is_divisionbyzerotrap_enabled())
+                        return(DIVISIONBYZEROEXCEPTION);
+                Set_divisionbyzeroflag();
+                Sgl_setinfinity_exponentmantissa(result);
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+	/*
+	 * Generate exponent 
+	 */
+	dest_exponent = Sgl_exponent(opnd1) - Sgl_exponent(opnd2) + SGL_BIAS;
+
+	/*
+	 * Generate mantissa
+	 */
+	if (Sgl_isnotzero_exponent(opnd1)) {
+		/* set hidden bit */
+		Sgl_clear_signexponent_set_hidden(opnd1);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd1)) {
+			Sgl_setzero_exponentmantissa(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+                /* is denormalized; want to normalize */
+                Sgl_clear_signexponent(opnd1);
+                Sgl_leftshiftby1(opnd1);
+		Sgl_normalize(opnd1,dest_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Sgl_isnotzero_exponent(opnd2)) {
+		Sgl_clear_signexponent_set_hidden(opnd2);
+	}
+	else {
+                /* is denormalized; want to normalize */
+                Sgl_clear_signexponent(opnd2);
+                Sgl_leftshiftby1(opnd2);
+		while(Sgl_iszero_hiddenhigh7mantissa(opnd2)) {
+			Sgl_leftshiftby8(opnd2);
+			dest_exponent += 8;
+		}
+		if(Sgl_iszero_hiddenhigh3mantissa(opnd2)) {
+			Sgl_leftshiftby4(opnd2);
+			dest_exponent += 4;
+		}
+		while(Sgl_iszero_hidden(opnd2)) {
+			Sgl_leftshiftby1(opnd2);
+			dest_exponent += 1;
+		}
+	}
+
+	/* Divide the source mantissas */
+
+	/*
+	 * A non_restoring divide algorithm is used.
+	 */
+	Sgl_subtract(opnd1,opnd2,opnd1);
+	Sgl_setzero(opnd3);
+	for (count=1;count<=SGL_P && Sgl_all(opnd1);count++) {
+		Sgl_leftshiftby1(opnd1);
+		Sgl_leftshiftby1(opnd3);
+		if (Sgl_iszero_sign(opnd1)) {
+			Sgl_setone_lowmantissa(opnd3);
+			Sgl_subtract(opnd1,opnd2,opnd1);
+		}
+		else Sgl_addition(opnd1,opnd2,opnd1);
+	}
+	if (count <= SGL_P) {
+		Sgl_leftshiftby1(opnd3);
+		Sgl_setone_lowmantissa(opnd3);
+		Sgl_leftshift(opnd3,SGL_P-count);
+		if (Sgl_iszero_hidden(opnd3)) {
+			Sgl_leftshiftby1(opnd3);
+			dest_exponent--;
+		}
+	}
+	else {
+		if (Sgl_iszero_hidden(opnd3)) {
+			/* need to get one more bit of result */
+			Sgl_leftshiftby1(opnd1);
+			Sgl_leftshiftby1(opnd3);
+			if (Sgl_iszero_sign(opnd1)) {
+				Sgl_setone_lowmantissa(opnd3);
+				Sgl_subtract(opnd1,opnd2,opnd1);
+			}
+			else Sgl_addition(opnd1,opnd2,opnd1);
+			dest_exponent--;
+		}
+		if (Sgl_iszero_sign(opnd1)) guardbit = TRUE;
+		stickybit = Sgl_all(opnd1);
+	}
+	inexact = guardbit | stickybit;
+
+	/* 
+	 * round result 
+	 */
+	if (inexact && (dest_exponent > 0 || Is_underflowtrap_enabled())) {
+		Sgl_clear_signexponent(opnd3);
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) 
+					Sgl_increment_mantissa(opnd3);
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) 
+					Sgl_increment_mantissa(opnd3);
+				break;
+			case ROUNDNEAREST:
+				if (guardbit) {
+			   	if (stickybit || Sgl_isone_lowmantissa(opnd3))
+			      	    Sgl_increment_mantissa(opnd3);
+				}
+		}
+		if (Sgl_isone_hidden(opnd3)) dest_exponent++;
+	}
+	Sgl_set_mantissa(result,opnd3);
+
+        /* 
+         * Test for overflow
+         */
+	if (dest_exponent >= SGL_INFINITY_EXPONENT) {
+                /* trap if OVERFLOWTRAP enabled */
+                if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Sgl_setwrapped_exponent(result,dest_exponent,ovfl);
+                        *dstptr = result;
+                        if (inexact) 
+                            if (Is_inexacttrap_enabled())
+                                return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return(OVERFLOWEXCEPTION);
+                }
+		Set_overflowflag();
+                /* set result to infinity or largest number */
+		Sgl_setoverflow(result);
+		inexact = TRUE;
+	}
+        /* 
+         * Test for underflow
+         */
+	else if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Sgl_setwrapped_exponent(result,dest_exponent,unfl);
+                        *dstptr = result;
+                        if (inexact) 
+                            if (Is_inexacttrap_enabled())
+                                return(UNDERFLOWEXCEPTION | INEXACTEXCEPTION);
+                            else Set_inexactflag();
+                        return(UNDERFLOWEXCEPTION);
+                }
+
+		/* Determine if should set underflow flag */
+		is_tiny = TRUE;
+		if (dest_exponent == 0 && inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) {
+					Sgl_increment(opnd3);
+					if (Sgl_isone_hiddenoverflow(opnd3))
+                			    is_tiny = FALSE;
+					Sgl_decrement(opnd3);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) {
+					Sgl_increment(opnd3);
+					if (Sgl_isone_hiddenoverflow(opnd3))
+                			    is_tiny = FALSE;
+					Sgl_decrement(opnd3);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Sgl_isone_lowmantissa(opnd3))) {
+				      	Sgl_increment(opnd3);
+					if (Sgl_isone_hiddenoverflow(opnd3))
+                			    is_tiny = FALSE;
+					Sgl_decrement(opnd3);
+				}
+				break;
+			}
+		}
+
+                /*
+                 * denormalize result or set to signed zero
+                 */
+		stickybit = inexact;
+		Sgl_denormalize(opnd3,dest_exponent,guardbit,stickybit,inexact);
+
+		/* return rounded number */ 
+		if (inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS:
+				if (Sgl_iszero_sign(result)) {
+					Sgl_increment(opnd3);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result))  {
+					Sgl_increment(opnd3);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Sgl_isone_lowmantissa(opnd3))) {
+			      		Sgl_increment(opnd3);
+				}
+				break;
+			}
+                	if (is_tiny) Set_underflowflag();
+                }
+		Sgl_set_exponentmantissa(result,opnd3);
+	}
+	else Sgl_set_exponent(result,dest_exponent);
+	*dstptr = result;
+	/* check for inexact */
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else  Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/sfmpy.c b/arch/parisc/math-emu/sfmpy.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfmpy.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,380 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfmpy.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Precision Floating-point Multiply
+ *
+ *  External Interfaces:
+ *	sgl_fmpy(srcptr1,srcptr2,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+
+/*
+ *  Single Precision Floating-point Multiply
+ */
+
+int
+sgl_fmpy(
+    sgl_floating_point *srcptr1,
+    sgl_floating_point *srcptr2,
+    sgl_floating_point *dstptr,
+    unsigned int *status)
+{
+	register unsigned int opnd1, opnd2, opnd3, result;
+	register int dest_exponent, count;
+	register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE;
+	boolean is_tiny;
+
+	opnd1 = *srcptr1;
+	opnd2 = *srcptr2;
+	/* 
+	 * set sign bit of result 
+	 */
+	if (Sgl_sign(opnd1) ^ Sgl_sign(opnd2)) Sgl_setnegativezero(result);  
+	else Sgl_setzero(result);
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd1)) {
+		if (Sgl_iszero_mantissa(opnd1)) {
+			if (Sgl_isnotnan(opnd2)) {
+				if (Sgl_iszero_exponentmantissa(opnd2)) {
+					/* 
+					 * invalid since operands are infinity 
+					 * and zero 
+					 */
+					if (Is_invalidtrap_enabled()) 
+                                		return(INVALIDEXCEPTION);
+                                	Set_invalidflag();
+                                	Sgl_makequietnan(result);
+					*dstptr = result;
+					return(NOEXCEPTION);
+				}
+				/*
+			 	 * return infinity
+			 	 */
+				Sgl_setinfinity_exponentmantissa(result);
+				*dstptr = result;
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+                	/*
+                 	 * is NaN; signaling or quiet?
+                 	 */
+                	if (Sgl_isone_signaling(opnd1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Sgl_set_quiet(opnd1);
+                	}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd2)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Sgl_set_quiet(opnd2);
+                		*dstptr = opnd2;
+                		return(NOEXCEPTION);
+			}
+                	/*
+                 	 * return quiet NaN
+                 	 */
+                	*dstptr = opnd1;
+                	return(NOEXCEPTION);
+		}
+	}
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if (Sgl_isinfinity_exponent(opnd2)) {
+		if (Sgl_iszero_mantissa(opnd2)) {
+			if (Sgl_iszero_exponentmantissa(opnd1)) {
+				/* invalid since operands are zero & infinity */
+				if (Is_invalidtrap_enabled()) 
+                                	return(INVALIDEXCEPTION);
+                                Set_invalidflag();
+                                Sgl_makequietnan(opnd2);
+				*dstptr = opnd2;
+				return(NOEXCEPTION);
+			}
+			/*
+			 * return infinity
+			 */
+			Sgl_setinfinity_exponentmantissa(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+                /*
+                 * is NaN; signaling or quiet?
+                 */
+                if (Sgl_isone_signaling(opnd2)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Sgl_set_quiet(opnd2);
+                }
+                /*
+                 * return quiet NaN
+                 */
+                *dstptr = opnd2;
+                return(NOEXCEPTION);
+	}
+	/*
+	 * Generate exponent 
+	 */
+	dest_exponent = Sgl_exponent(opnd1) + Sgl_exponent(opnd2) - SGL_BIAS;
+
+	/*
+	 * Generate mantissa
+	 */
+	if (Sgl_isnotzero_exponent(opnd1)) {
+		/* set hidden bit */
+		Sgl_clear_signexponent_set_hidden(opnd1);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd1)) {
+			Sgl_setzero_exponentmantissa(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+                /* is denormalized, adjust exponent */
+                Sgl_clear_signexponent(opnd1);
+		Sgl_leftshiftby1(opnd1);
+		Sgl_normalize(opnd1,dest_exponent);
+	}
+	/* opnd2 needs to have hidden bit set with msb in hidden bit */
+	if (Sgl_isnotzero_exponent(opnd2)) {
+		Sgl_clear_signexponent_set_hidden(opnd2);
+	}
+	else {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd2)) {
+			Sgl_setzero_exponentmantissa(result);
+			*dstptr = result;
+			return(NOEXCEPTION);
+		}
+                /* is denormalized; want to normalize */
+                Sgl_clear_signexponent(opnd2);
+                Sgl_leftshiftby1(opnd2);
+		Sgl_normalize(opnd2,dest_exponent);
+	}
+
+	/* Multiply two source mantissas together */
+
+	Sgl_leftshiftby4(opnd2);     /* make room for guard bits */
+	Sgl_setzero(opnd3);
+	/*
+	 * Four bits at a time are inspected in each loop, and a
+	 * simple shift and add multiply algorithm is used.
+	 */
+	for (count=1;count<SGL_P;count+=4) {
+		stickybit |= Slow4(opnd3);
+		Sgl_rightshiftby4(opnd3);
+		if (Sbit28(opnd1)) Sall(opnd3) += (Sall(opnd2) << 3);
+		if (Sbit29(opnd1)) Sall(opnd3) += (Sall(opnd2) << 2);
+		if (Sbit30(opnd1)) Sall(opnd3) += (Sall(opnd2) << 1);
+		if (Sbit31(opnd1)) Sall(opnd3) += Sall(opnd2);
+		Sgl_rightshiftby4(opnd1);
+	}
+	/* make sure result is left-justified */
+	if (Sgl_iszero_sign(opnd3)) {
+		Sgl_leftshiftby1(opnd3);
+	}
+	else {
+		/* result mantissa >= 2. */
+		dest_exponent++;
+	}
+	/* check for denormalized result */
+	while (Sgl_iszero_sign(opnd3)) {
+		Sgl_leftshiftby1(opnd3);
+		dest_exponent--;
+	}
+	/*
+	 * check for guard, sticky and inexact bits
+	 */
+	stickybit |= Sgl_all(opnd3) << (SGL_BITLENGTH - SGL_EXP_LENGTH + 1);
+	guardbit = Sbit24(opnd3);
+	inexact = guardbit | stickybit;
+
+	/* re-align mantissa */
+	Sgl_rightshiftby8(opnd3);
+
+	/* 
+	 * round result 
+	 */
+	if (inexact && (dest_exponent>0 || Is_underflowtrap_enabled())) {
+		Sgl_clear_signexponent(opnd3);
+		switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) 
+					Sgl_increment(opnd3);
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) 
+					Sgl_increment(opnd3);
+				break;
+			case ROUNDNEAREST:
+				if (guardbit) {
+			   	if (stickybit || Sgl_isone_lowmantissa(opnd3))
+			      	Sgl_increment(opnd3);
+				}
+		}
+		if (Sgl_isone_hidden(opnd3)) dest_exponent++;
+	}
+	Sgl_set_mantissa(result,opnd3);
+
+        /* 
+         * Test for overflow
+         */
+	if (dest_exponent >= SGL_INFINITY_EXPONENT) {
+                /* trap if OVERFLOWTRAP enabled */
+                if (Is_overflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+			Sgl_setwrapped_exponent(result,dest_exponent,ovfl);
+			*dstptr = result;
+			if (inexact) 
+			    if (Is_inexacttrap_enabled())
+				return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+			    else Set_inexactflag();
+			return(OVERFLOWEXCEPTION);
+                }
+		inexact = TRUE;
+		Set_overflowflag();
+                /* set result to infinity or largest number */
+		Sgl_setoverflow(result);
+	}
+        /* 
+         * Test for underflow
+         */
+	else if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+			Sgl_setwrapped_exponent(result,dest_exponent,unfl);
+			*dstptr = result;
+			if (inexact) 
+			    if (Is_inexacttrap_enabled())
+				return(UNDERFLOWEXCEPTION | INEXACTEXCEPTION);
+			    else Set_inexactflag();
+			return(UNDERFLOWEXCEPTION);
+                }
+
+		/* Determine if should set underflow flag */
+		is_tiny = TRUE;
+		if (dest_exponent == 0 && inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) {
+					Sgl_increment(opnd3);
+					if (Sgl_isone_hiddenoverflow(opnd3))
+                			    is_tiny = FALSE;
+					Sgl_decrement(opnd3);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) {
+					Sgl_increment(opnd3);
+					if (Sgl_isone_hiddenoverflow(opnd3))
+                			    is_tiny = FALSE;
+					Sgl_decrement(opnd3);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Sgl_isone_lowmantissa(opnd3))) {
+				      	Sgl_increment(opnd3);
+					if (Sgl_isone_hiddenoverflow(opnd3))
+                			    is_tiny = FALSE;
+					Sgl_decrement(opnd3);
+				}
+				break;
+			}
+		}
+
+                /*
+                 * denormalize result or set to signed zero
+                 */
+		stickybit = inexact;
+		Sgl_denormalize(opnd3,dest_exponent,guardbit,stickybit,inexact);
+
+		/* return zero or smallest number */
+		if (inexact) {
+			switch (Rounding_mode()) {
+			case ROUNDPLUS: 
+				if (Sgl_iszero_sign(result)) {
+					Sgl_increment(opnd3);
+				}
+				break;
+			case ROUNDMINUS: 
+				if (Sgl_isone_sign(result)) {
+					Sgl_increment(opnd3);
+				}
+				break;
+			case ROUNDNEAREST:
+				if (guardbit && (stickybit || 
+				    Sgl_isone_lowmantissa(opnd3))) {
+			      		Sgl_increment(opnd3);
+				}
+				break;
+			}
+                if (is_tiny) Set_underflowflag();
+		}
+		Sgl_set_exponentmantissa(result,opnd3);
+	}
+	else Sgl_set_exponent(result,dest_exponent);
+	*dstptr = result;
+
+	/* check for inexact */
+	if (inexact) {
+		if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+		else Set_inexactflag();
+	}
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/sfrem.c b/arch/parisc/math-emu/sfrem.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfrem.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,290 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfrem.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Precision Floating-point Remainder
+ *
+ *  External Interfaces:
+ *	sgl_frem(srcptr1,srcptr2,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+
+#include "float.h"
+#include "sgl_float.h"
+
+/*
+ *  Single Precision Floating-point Remainder
+ */
+
+int
+sgl_frem (sgl_floating_point * srcptr1, sgl_floating_point * srcptr2,
+	  sgl_floating_point * dstptr, unsigned int *status)
+{
+	register unsigned int opnd1, opnd2, result;
+	register int opnd1_exponent, opnd2_exponent, dest_exponent, stepcount;
+	register boolean roundup = FALSE;
+
+	opnd1 = *srcptr1;
+	opnd2 = *srcptr2;
+	/*
+	 * check first operand for NaN's or infinity
+	 */
+	if ((opnd1_exponent = Sgl_exponent(opnd1)) == SGL_INFINITY_EXPONENT) {
+		if (Sgl_iszero_mantissa(opnd1)) {
+			if (Sgl_isnotnan(opnd2)) {
+				/* invalid since first operand is infinity */
+				if (Is_invalidtrap_enabled()) 
+                                	return(INVALIDEXCEPTION);
+                                Set_invalidflag();
+                                Sgl_makequietnan(result);
+				*dstptr = result;
+				return(NOEXCEPTION);
+			}
+		}
+		else {
+                	/*
+                 	 * is NaN; signaling or quiet?
+                 	 */
+                	if (Sgl_isone_signaling(opnd1)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Sgl_set_quiet(opnd1);
+                	}
+			/* 
+			 * is second operand a signaling NaN? 
+			 */
+			else if (Sgl_is_signalingnan(opnd2)) {
+                        	/* trap if INVALIDTRAP enabled */
+                        	if (Is_invalidtrap_enabled()) 
+                            		return(INVALIDEXCEPTION);
+                        	/* make NaN quiet */
+                        	Set_invalidflag();
+                        	Sgl_set_quiet(opnd2);
+                		*dstptr = opnd2;
+                		return(NOEXCEPTION);
+			}
+                	/*
+                 	 * return quiet NaN
+                 	 */
+                	*dstptr = opnd1;
+                	return(NOEXCEPTION);
+		}
+	} 
+	/*
+	 * check second operand for NaN's or infinity
+	 */
+	if ((opnd2_exponent = Sgl_exponent(opnd2)) == SGL_INFINITY_EXPONENT) {
+		if (Sgl_iszero_mantissa(opnd2)) {
+			/*
+			 * return first operand
+			 */
+                	*dstptr = opnd1;
+			return(NOEXCEPTION);
+		}
+                /*
+                 * is NaN; signaling or quiet?
+                 */
+                if (Sgl_isone_signaling(opnd2)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Sgl_set_quiet(opnd2);
+                }
+                /*
+                 * return quiet NaN
+                 */
+                *dstptr = opnd2;
+                return(NOEXCEPTION);
+	}
+	/*
+	 * check second operand for zero
+	 */
+	if (Sgl_iszero_exponentmantissa(opnd2)) {
+		/* invalid since second operand is zero */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                Set_invalidflag();
+                Sgl_makequietnan(result);
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+
+	/* 
+	 * get sign of result
+	 */
+	result = opnd1;  
+
+	/* 
+	 * check for denormalized operands
+	 */
+	if (opnd1_exponent == 0) {
+		/* check for zero */
+		if (Sgl_iszero_mantissa(opnd1)) {
+			*dstptr = opnd1;
+			return(NOEXCEPTION);
+		}
+		/* normalize, then continue */
+		opnd1_exponent = 1;
+		Sgl_normalize(opnd1,opnd1_exponent);
+	}
+	else {
+		Sgl_clear_signexponent_set_hidden(opnd1);
+	}
+	if (opnd2_exponent == 0) {
+		/* normalize, then continue */
+		opnd2_exponent = 1;
+		Sgl_normalize(opnd2,opnd2_exponent);
+	}
+	else {
+		Sgl_clear_signexponent_set_hidden(opnd2);
+	}
+
+	/* find result exponent and divide step loop count */
+	dest_exponent = opnd2_exponent - 1;
+	stepcount = opnd1_exponent - opnd2_exponent;
+
+	/*
+	 * check for opnd1/opnd2 < 1
+	 */
+	if (stepcount < 0) {
+		/*
+		 * check for opnd1/opnd2 > 1/2
+		 *
+		 * In this case n will round to 1, so 
+		 *    r = opnd1 - opnd2 
+		 */
+		if (stepcount == -1 && Sgl_isgreaterthan(opnd1,opnd2)) {
+			Sgl_all(result) = ~Sgl_all(result);   /* set sign */
+			/* align opnd2 with opnd1 */
+			Sgl_leftshiftby1(opnd2); 
+			Sgl_subtract(opnd2,opnd1,opnd2);
+			/* now normalize */
+                	while (Sgl_iszero_hidden(opnd2)) {
+                        	Sgl_leftshiftby1(opnd2);
+                        	dest_exponent--;
+			}
+			Sgl_set_exponentmantissa(result,opnd2);
+			goto testforunderflow;
+		}
+		/*
+		 * opnd1/opnd2 <= 1/2
+		 *
+		 * In this case n will round to zero, so 
+		 *    r = opnd1
+		 */
+		Sgl_set_exponentmantissa(result,opnd1);
+		dest_exponent = opnd1_exponent;
+		goto testforunderflow;
+	}
+
+	/*
+	 * Generate result
+	 *
+	 * Do iterative subtract until remainder is less than operand 2.
+	 */
+	while (stepcount-- > 0 && Sgl_all(opnd1)) {
+		if (Sgl_isnotlessthan(opnd1,opnd2))
+			Sgl_subtract(opnd1,opnd2,opnd1);
+		Sgl_leftshiftby1(opnd1);
+	}
+	/*
+	 * Do last subtract, then determine which way to round if remainder 
+	 * is exactly 1/2 of opnd2 
+	 */
+	if (Sgl_isnotlessthan(opnd1,opnd2)) {
+		Sgl_subtract(opnd1,opnd2,opnd1);
+		roundup = TRUE;
+	}
+	if (stepcount > 0 || Sgl_iszero(opnd1)) {
+		/* division is exact, remainder is zero */
+		Sgl_setzero_exponentmantissa(result);
+		*dstptr = result;
+		return(NOEXCEPTION);
+	}
+
+	/* 
+	 * Check for cases where opnd1/opnd2 < n 
+	 *
+	 * In this case the result's sign will be opposite that of
+	 * opnd1.  The mantissa also needs some correction.
+	 */
+	Sgl_leftshiftby1(opnd1);
+	if (Sgl_isgreaterthan(opnd1,opnd2)) {
+		Sgl_invert_sign(result);
+		Sgl_subtract((opnd2<<1),opnd1,opnd1);
+	}
+	/* check for remainder being exactly 1/2 of opnd2 */
+	else if (Sgl_isequal(opnd1,opnd2) && roundup) { 
+		Sgl_invert_sign(result);
+	}
+
+	/* normalize result's mantissa */
+        while (Sgl_iszero_hidden(opnd1)) {
+                dest_exponent--;
+                Sgl_leftshiftby1(opnd1);
+        }
+	Sgl_set_exponentmantissa(result,opnd1);
+
+        /* 
+         * Test for underflow
+         */
+    testforunderflow:
+	if (dest_exponent <= 0) {
+                /* trap if UNDERFLOWTRAP enabled */
+                if (Is_underflowtrap_enabled()) {
+                        /*
+                         * Adjust bias of result
+                         */
+                        Sgl_setwrapped_exponent(result,dest_exponent,unfl);
+			*dstptr = result;
+			/* frem is always exact */
+			return(UNDERFLOWEXCEPTION);
+                }
+                /*
+                 * denormalize result or set to signed zero
+                 */
+                if (dest_exponent >= (1 - SGL_P)) {
+			Sgl_rightshift_exponentmantissa(result,1-dest_exponent);
+                }
+                else {
+			Sgl_setzero_exponentmantissa(result);
+		}
+	}
+	else Sgl_set_exponent(result,dest_exponent);
+	*dstptr = result;
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/sfsqrt.c b/arch/parisc/math-emu/sfsqrt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfsqrt.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,187 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfsqrt.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single Floating-point Square Root
+ *
+ *  External Interfaces:
+ *	sgl_fsqrt(srcptr,nullptr,dstptr,status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+
+/*
+ *  Single Floating-point Square Root
+ */
+
+/*ARGSUSED*/
+unsigned int
+sgl_fsqrt(
+    sgl_floating_point *srcptr,
+    unsigned int *nullptr,
+    sgl_floating_point *dstptr,
+    unsigned int *status)
+{
+	register unsigned int src, result;
+	register int src_exponent;
+	register unsigned int newbit, sum;
+	register boolean guardbit = FALSE, even_exponent;
+
+	src = *srcptr;
+        /*
+         * check source operand for NaN or infinity
+         */
+        if ((src_exponent = Sgl_exponent(src)) == SGL_INFINITY_EXPONENT) {
+                /*
+                 * is signaling NaN?
+                 */
+                if (Sgl_isone_signaling(src)) {
+                        /* trap if INVALIDTRAP enabled */
+                        if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                        /* make NaN quiet */
+                        Set_invalidflag();
+                        Sgl_set_quiet(src);
+                }
+                /*
+                 * Return quiet NaN or positive infinity.
+		 *  Fall thru to negative test if negative infinity.
+                 */
+		if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) {
+                	*dstptr = src;
+                	return(NOEXCEPTION);
+		}
+        }
+
+        /*
+         * check for zero source operand
+         */
+	if (Sgl_iszero_exponentmantissa(src)) {
+		*dstptr = src;
+		return(NOEXCEPTION);
+	}
+
+        /*
+         * check for negative source operand 
+         */
+	if (Sgl_isone_sign(src)) {
+		/* trap if INVALIDTRAP enabled */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+		/* make NaN quiet */
+		Set_invalidflag();
+		Sgl_makequietnan(src);
+		*dstptr = src;
+		return(NOEXCEPTION);
+	}
+
+	/*
+	 * Generate result
+	 */
+	if (src_exponent > 0) {
+		even_exponent = Sgl_hidden(src);
+		Sgl_clear_signexponent_set_hidden(src);
+	}
+	else {
+		/* normalize operand */
+		Sgl_clear_signexponent(src);
+		src_exponent++;
+		Sgl_normalize(src,src_exponent);
+		even_exponent = src_exponent & 1;
+	}
+	if (even_exponent) {
+		/* exponent is even */
+		/* Add comment here.  Explain why odd exponent needs correction */
+		Sgl_leftshiftby1(src);
+	}
+	/*
+	 * Add comment here.  Explain following algorithm.
+	 * 
+	 * Trust me, it works.
+	 *
+	 */
+	Sgl_setzero(result);
+	newbit = 1 << SGL_P;
+	while (newbit && Sgl_isnotzero(src)) {
+		Sgl_addition(result,newbit,sum);
+		if(sum <= Sgl_all(src)) {
+			/* update result */
+			Sgl_addition(result,(newbit<<1),result);
+			Sgl_subtract(src,sum,src);
+		}
+		Sgl_rightshiftby1(newbit);
+		Sgl_leftshiftby1(src);
+	}
+	/* correct exponent for pre-shift */
+	if (even_exponent) {
+		Sgl_rightshiftby1(result);
+	}
+
+	/* check for inexact */
+	if (Sgl_isnotzero(src)) {
+		if (!even_exponent && Sgl_islessthan(result,src)) 
+			Sgl_increment(result);
+		guardbit = Sgl_lowmantissa(result);
+		Sgl_rightshiftby1(result);
+
+		/*  now round result  */
+		switch (Rounding_mode()) {
+		case ROUNDPLUS:
+		     Sgl_increment(result);
+		     break;
+		case ROUNDNEAREST:
+		     /* stickybit is always true, so guardbit 
+		      * is enough to determine rounding */
+		     if (guardbit) {
+			Sgl_increment(result);
+		     }
+		     break;
+		}
+		/* increment result exponent by 1 if mantissa overflowed */
+		if (Sgl_isone_hiddenoverflow(result)) src_exponent+=2;
+
+		if (Is_inexacttrap_enabled()) {
+			Sgl_set_exponent(result,
+			 ((src_exponent-SGL_BIAS)>>1)+SGL_BIAS);
+			*dstptr = result;
+			return(INEXACTEXCEPTION);
+		}
+		else Set_inexactflag();
+	}
+	else {
+		Sgl_rightshiftby1(result);
+	}
+	Sgl_set_exponent(result,((src_exponent-SGL_BIAS)>>1)+SGL_BIAS);
+	*dstptr = result;
+	return(NOEXCEPTION);
+}
diff -Nru a/arch/parisc/math-emu/sfsub.c b/arch/parisc/math-emu/sfsub.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sfsub.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,521 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+/*
+ * BEGIN_DESC
+ *
+ *  File:
+ *	@(#)	pa/spmath/sfsub.c		$Revision: 1.1 $
+ *
+ *  Purpose:
+ *	Single_subtract: subtract two single precision values.
+ *
+ *  External Interfaces:
+ *	sgl_fsub(leftptr, rightptr, dstptr, status)
+ *
+ *  Internal Interfaces:
+ *
+ *  Theory:
+ *	<<please update with a overview of the operation of this file>>
+ *
+ * END_DESC
+*/
+
+
+#include "float.h"
+#include "sgl_float.h"
+
+/*
+ * Single_subtract: subtract two single precision values.
+ */
+int
+sgl_fsub(
+	    sgl_floating_point *leftptr,
+	    sgl_floating_point *rightptr,
+	    sgl_floating_point *dstptr,
+	    unsigned int *status)
+    {
+    register unsigned int left, right, result, extent;
+    register unsigned int signless_upper_left, signless_upper_right, save;
+    
+    register int result_exponent, right_exponent, diff_exponent;
+    register int sign_save, jumpsize;
+    register boolean inexact = FALSE, underflowtrap;
+        
+    /* Create local copies of the numbers */
+    left = *leftptr;
+    right = *rightptr;
+
+    /* A zero "save" helps discover equal operands (for later),  *
+     * and is used in swapping operands (if needed).             */
+    Sgl_xortointp1(left,right,/*to*/save);
+
+    /*
+     * check first operand for NaN's or infinity
+     */
+    if ((result_exponent = Sgl_exponent(left)) == SGL_INFINITY_EXPONENT)
+	{
+	if (Sgl_iszero_mantissa(left)) 
+	    {
+	    if (Sgl_isnotnan(right)) 
+		{
+		if (Sgl_isinfinity(right) && save==0) 
+		    {
+		    /* 
+		     * invalid since operands are same signed infinity's
+		     */
+		    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+                    Set_invalidflag();
+                    Sgl_makequietnan(result);
+		    *dstptr = result;
+		    return(NOEXCEPTION);
+		    }
+		/*
+	 	 * return infinity
+	 	 */
+		*dstptr = left;
+		return(NOEXCEPTION);
+		}
+	    }
+	else 
+	    {
+            /*
+             * is NaN; signaling or quiet?
+             */
+            if (Sgl_isone_signaling(left)) 
+		{
+               	/* trap if INVALIDTRAP enabled */
+		if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+        	/* make NaN quiet */
+        	Set_invalidflag();
+        	Sgl_set_quiet(left);
+        	}
+	    /* 
+	     * is second operand a signaling NaN? 
+	     */
+	    else if (Sgl_is_signalingnan(right)) 
+		{
+        	/* trap if INVALIDTRAP enabled */
+               	if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+		/* make NaN quiet */
+		Set_invalidflag();
+		Sgl_set_quiet(right);
+		*dstptr = right;
+		return(NOEXCEPTION);
+		}
+	    /*
+ 	     * return quiet NaN
+ 	     */
+ 	    *dstptr = left;
+ 	    return(NOEXCEPTION);
+	    }
+	} /* End left NaN or Infinity processing */
+    /*
+     * check second operand for NaN's or infinity
+     */
+    if (Sgl_isinfinity_exponent(right)) 
+	{
+	if (Sgl_iszero_mantissa(right)) 
+	    {
+	    /* return infinity */
+	    Sgl_invert_sign(right);
+	    *dstptr = right;
+	    return(NOEXCEPTION);
+	    }
+        /*
+         * is NaN; signaling or quiet?
+         */
+        if (Sgl_isone_signaling(right)) 
+	    {
+            /* trap if INVALIDTRAP enabled */
+	    if (Is_invalidtrap_enabled()) return(INVALIDEXCEPTION);
+	    /* make NaN quiet */
+	    Set_invalidflag();
+	    Sgl_set_quiet(right);
+	    }
+	/*
+	 * return quiet NaN
+ 	 */
+	*dstptr = right;
+	return(NOEXCEPTION);
+    	} /* End right NaN or Infinity processing */
+
+    /* Invariant: Must be dealing with finite numbers */
+
+    /* Compare operands by removing the sign */
+    Sgl_copytoint_exponentmantissa(left,signless_upper_left);
+    Sgl_copytoint_exponentmantissa(right,signless_upper_right);
+
+    /* sign difference selects sub or add operation. */
+    if(Sgl_ismagnitudeless(signless_upper_left,signless_upper_right))
+	{
+	/* Set the left operand to the larger one by XOR swap *
+	 *  First finish the first word using "save"          */
+	Sgl_xorfromintp1(save,right,/*to*/right);
+	Sgl_xorfromintp1(save,left,/*to*/left);
+	result_exponent = Sgl_exponent(left);
+	Sgl_invert_sign(left);
+	}
+    /* Invariant:  left is not smaller than right. */ 
+
+    if((right_exponent = Sgl_exponent(right)) == 0)
+        {
+	/* Denormalized operands.  First look for zeroes */
+	if(Sgl_iszero_mantissa(right)) 
+	    {
+	    /* right is zero */
+	    if(Sgl_iszero_exponentmantissa(left))
+		{
+		/* Both operands are zeros */
+		Sgl_invert_sign(right);
+		if(Is_rounding_mode(ROUNDMINUS))
+		    {
+		    Sgl_or_signs(left,/*with*/right);
+		    }
+		else
+		    {
+		    Sgl_and_signs(left,/*with*/right);
+		    }
+		}
+	    else 
+		{
+		/* Left is not a zero and must be the result.  Trapped
+		 * underflows are signaled if left is denormalized.  Result
+		 * is always exact. */
+		if( (result_exponent == 0) && Is_underflowtrap_enabled() )
+		    {
+		    /* need to normalize results mantissa */
+	    	    sign_save = Sgl_signextendedsign(left);
+		    Sgl_leftshiftby1(left);
+		    Sgl_normalize(left,result_exponent);
+		    Sgl_set_sign(left,/*using*/sign_save);
+                    Sgl_setwrapped_exponent(left,result_exponent,unfl);
+		    *dstptr = left;
+		    /* inexact = FALSE */
+		    return(UNDERFLOWEXCEPTION);
+		    }
+		}
+	    *dstptr = left;
+	    return(NOEXCEPTION);
+	    }
+
+	/* Neither are zeroes */
+	Sgl_clear_sign(right);	/* Exponent is already cleared */
+	if(result_exponent == 0 )
+	    {
+	    /* Both operands are denormalized.  The result must be exact
+	     * and is simply calculated.  A sum could become normalized and a
+	     * difference could cancel to a true zero. */
+	    if( (/*signed*/int) save >= 0 )
+		{
+		Sgl_subtract(left,/*minus*/right,/*into*/result);
+		if(Sgl_iszero_mantissa(result))
+		    {
+		    if(Is_rounding_mode(ROUNDMINUS))
+			{
+			Sgl_setone_sign(result);
+			}
+		    else
+			{
+			Sgl_setzero_sign(result);
+			}
+		    *dstptr = result;
+		    return(NOEXCEPTION);
+		    }
+		}
+	    else
+		{
+		Sgl_addition(left,right,/*into*/result);
+		if(Sgl_isone_hidden(result))
+		    {
+		    *dstptr = result;
+		    return(NOEXCEPTION);
+		    }
+		}
+	    if(Is_underflowtrap_enabled())
+		{
+		/* need to normalize result */
+	    	sign_save = Sgl_signextendedsign(result);
+		Sgl_leftshiftby1(result);
+		Sgl_normalize(result,result_exponent);
+		Sgl_set_sign(result,/*using*/sign_save);
+                Sgl_setwrapped_exponent(result,result_exponent,unfl);
+		*dstptr = result;
+		/* inexact = FALSE */
+		return(UNDERFLOWEXCEPTION);
+		}
+	    *dstptr = result;
+	    return(NOEXCEPTION);
+	    }
+	right_exponent = 1;	/* Set exponent to reflect different bias
+				 * with denomalized numbers. */
+	}
+    else
+	{
+	Sgl_clear_signexponent_set_hidden(right);
+	}
+    Sgl_clear_exponent_set_hidden(left);
+    diff_exponent = result_exponent - right_exponent;
+
+    /* 
+     * Special case alignment of operands that would force alignment 
+     * beyond the extent of the extension.  A further optimization
+     * could special case this but only reduces the path length for this
+     * infrequent case.
+     */
+    if(diff_exponent > SGL_THRESHOLD)
+	{
+	diff_exponent = SGL_THRESHOLD;
+	}
+    
+    /* Align right operand by shifting to right */
+    Sgl_right_align(/*operand*/right,/*shifted by*/diff_exponent,
+      /*and lower to*/extent);
+
+    /* Treat sum and difference of the operands separately. */
+    if( (/*signed*/int) save >= 0 )
+	{
+	/*
+	 * Difference of the two operands.  Their can be no overflow.  A
+	 * borrow can occur out of the hidden bit and force a post
+	 * normalization phase.
+	 */
+	Sgl_subtract_withextension(left,/*minus*/right,/*with*/extent,/*into*/result);
+	if(Sgl_iszero_hidden(result))
+	    {
+	    /* Handle normalization */
+	    /* A straight foward algorithm would now shift the result
+	     * and extension left until the hidden bit becomes one.  Not
+	     * all of the extension bits need participate in the shift.
+	     * Only the two most significant bits (round and guard) are
+	     * needed.  If only a single shift is needed then the guard
+	     * bit becomes a significant low order bit and the extension
+	     * must participate in the rounding.  If more than a single 
+	     * shift is needed, then all bits to the right of the guard 
+	     * bit are zeros, and the guard bit may or may not be zero. */
+	    sign_save = Sgl_signextendedsign(result);
+            Sgl_leftshiftby1_withextent(result,extent,result);
+
+            /* Need to check for a zero result.  The sign and exponent
+	     * fields have already been zeroed.  The more efficient test
+	     * of the full object can be used.
+	     */
+    	    if(Sgl_iszero(result))
+		/* Must have been "x-x" or "x+(-x)". */
+		{
+		if(Is_rounding_mode(ROUNDMINUS)) Sgl_setone_sign(result);
+		*dstptr = result;
+		return(NOEXCEPTION);
+		}
+	    result_exponent--;
+	    /* Look to see if normalization is finished. */
+	    if(Sgl_isone_hidden(result))
+		{
+		if(result_exponent==0)
+		    {
+		    /* Denormalized, exponent should be zero.  Left operand *
+ 		     * was normalized, so extent (guard, round) was zero    */
+		    goto underflow;
+		    }
+		else
+		    {
+		    /* No further normalization is needed. */
+		    Sgl_set_sign(result,/*using*/sign_save);
+	    	    Ext_leftshiftby1(extent);
+		    goto round;
+		    }
+		}
+
+	    /* Check for denormalized, exponent should be zero.  Left    *
+	     * operand was normalized, so extent (guard, round) was zero */
+	    if(!(underflowtrap = Is_underflowtrap_enabled()) &&
+	       result_exponent==0) goto underflow;
+
+	    /* Shift extension to complete one bit of normalization and
+	     * update exponent. */
+	    Ext_leftshiftby1(extent);
+
+	    /* Discover first one bit to determine shift amount.  Use a
+	     * modified binary search.  We have already shifted the result
+	     * one position right and still not found a one so the remainder
+	     * of the extension must be zero and simplifies rounding. */
+	    /* Scan bytes */
+	    while(Sgl_iszero_hiddenhigh7mantissa(result))
+		{
+		Sgl_leftshiftby8(result);
+		if((result_exponent -= 8) <= 0  && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Now narrow it down to the nibble */
+	    if(Sgl_iszero_hiddenhigh3mantissa(result))
+		{
+		/* The lower nibble contains the normalizing one */
+		Sgl_leftshiftby4(result);
+		if((result_exponent -= 4) <= 0 && !underflowtrap)
+		    goto underflow;
+		}
+	    /* Select case were first bit is set (already normalized)
+	     * otherwise select the proper shift. */
+	    if((jumpsize = Sgl_hiddenhigh3mantissa(result)) > 7)
+		{
+		/* Already normalized */
+		if(result_exponent <= 0) goto underflow;
+		Sgl_set_sign(result,/*using*/sign_save);
+		Sgl_set_exponent(result,/*using*/result_exponent);
+		*dstptr = result;
+		return(NOEXCEPTION);
+		}
+	    Sgl_sethigh4bits(result,/*using*/sign_save);
+	    switch(jumpsize) 
+		{
+		case 1:
+		    {
+		    Sgl_leftshiftby3(result);
+		    result_exponent -= 3;
+		    break;
+		    }
+		case 2:
+		case 3:
+		    {
+		    Sgl_leftshiftby2(result);
+		    result_exponent -= 2;
+		    break;
+		    }
+		case 4:
+		case 5:
+		case 6:
+		case 7:
+		    {
+		    Sgl_leftshiftby1(result);
+		    result_exponent -= 1;
+		    break;
+		    }
+		}
+	    if(result_exponent > 0) 
+		{
+		Sgl_set_exponent(result,/*using*/result_exponent);
+		*dstptr = result;	/* Sign bit is already set */
+		return(NOEXCEPTION);
+		}
+	    /* Fixup potential underflows */
+	  underflow:
+	    if(Is_underflowtrap_enabled())
+		{
+		Sgl_set_sign(result,sign_save);
+                Sgl_setwrapped_exponent(result,result_exponent,unfl);
+		*dstptr = result;
+		/* inexact = FALSE */
+		return(UNDERFLOWEXCEPTION);
+		}
+	    /*
+	     * Since we cannot get an inexact denormalized result,
+	     * we can now return.
+	     */
+	    Sgl_right_align(result,/*by*/(1-result_exponent),extent);
+	    Sgl_clear_signexponent(result);
+	    Sgl_set_sign(result,sign_save);
+	    *dstptr = result;
+	    return(NOEXCEPTION);
+	    } /* end if(hidden...)... */
+	/* Fall through and round */
+	} /* end if(save >= 0)... */
+    else 
+	{
+	/* Add magnitudes */
+	Sgl_addition(left,right,/*to*/result);
+	if(Sgl_isone_hiddenoverflow(result))
+	    {
+	    /* Prenormalization required. */
+	    Sgl_rightshiftby1_withextent(result,extent,extent);
+	    Sgl_arithrightshiftby1(result);
+	    result_exponent++;
+	    } /* end if hiddenoverflow... */
+	} /* end else ...sub magnitudes... */
+    
+    /* Round the result.  If the extension is all zeros,then the result is
+     * exact.  Otherwise round in the correct direction.  No underflow is
+     * possible. If a postnormalization is necessary, then the mantissa is
+     * all zeros so no shift is needed. */
+  round:
+    if(Ext_isnotzero(extent))
+	{
+	inexact = TRUE;
+	switch(Rounding_mode())
+	    {
+	    case ROUNDNEAREST: /* The default. */
+	    if(Ext_isone_sign(extent))
+		{
+		/* at least 1/2 ulp */
+		if(Ext_isnotzero_lower(extent)  ||
+		  Sgl_isone_lowmantissa(result))
+		    {
+		    /* either exactly half way and odd or more than 1/2ulp */
+		    Sgl_increment(result);
+		    }
+		}
+	    break;
+
+	    case ROUNDPLUS:
+	    if(Sgl_iszero_sign(result))
+		{
+		/* Round up positive results */
+		Sgl_increment(result);
+		}
+	    break;
+	    
+	    case ROUNDMINUS:
+	    if(Sgl_isone_sign(result))
+		{
+		/* Round down negative results */
+		Sgl_increment(result);
+		}
+	    
+	    case ROUNDZERO:;
+	    /* truncate is simple */
+	    } /* end switch... */
+	if(Sgl_isone_hiddenoverflow(result)) result_exponent++;
+	}
+    if(result_exponent == SGL_INFINITY_EXPONENT)
+        {
+        /* Overflow */
+        if(Is_overflowtrap_enabled())
+	    {
+	    Sgl_setwrapped_exponent(result,result_exponent,ovfl);
+	    *dstptr = result;
+	    if (inexact)
+		if (Is_inexacttrap_enabled())
+		    return(OVERFLOWEXCEPTION | INEXACTEXCEPTION);
+		else Set_inexactflag();
+	    return(OVERFLOWEXCEPTION);
+	    }
+        else
+	    {
+	    Set_overflowflag();
+	    inexact = TRUE;
+	    Sgl_setoverflow(result);
+	    }
+	}
+    else Sgl_set_exponent(result,result_exponent);
+    *dstptr = result;
+    if(inexact) 
+	if(Is_inexacttrap_enabled()) return(INEXACTEXCEPTION);
+	else Set_inexactflag();
+    return(NOEXCEPTION);
+    }
diff -Nru a/arch/parisc/math-emu/sgl_float.h b/arch/parisc/math-emu/sgl_float.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/sgl_float.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,486 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+
+#ifdef __NO_PA_HDRS
+    PA header file -- do not include this header file for non-PA builds.
+#endif
+
+/* 32-bit word grabing functions */
+#define Sgl_firstword(value) Sall(value)
+#define Sgl_secondword(value) dummy_location
+#define Sgl_thirdword(value) dummy_location
+#define Sgl_fourthword(value) dummy_location
+
+#define Sgl_sign(object) Ssign(object)
+#define Sgl_exponent(object) Sexponent(object)
+#define Sgl_signexponent(object) Ssignexponent(object)
+#define Sgl_mantissa(object) Smantissa(object)
+#define Sgl_exponentmantissa(object) Sexponentmantissa(object)
+#define Sgl_all(object) Sall(object)
+
+/* sgl_and_signs ands the sign bits of each argument and puts the result
+ * into the first argument. sgl_or_signs ors those same sign bits */
+#define Sgl_and_signs( src1dst, src2)		\
+    Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst)
+#define Sgl_or_signs( src1dst, src2)		\
+    Sall(src1dst) = (Sall(src2)&((unsigned int)1<<31)) | Sall(src1dst)
+
+/* The hidden bit is always the low bit of the exponent */
+#define Sgl_clear_exponent_set_hidden(srcdst) Deposit_sexponent(srcdst,1)
+#define Sgl_clear_signexponent_set_hidden(srcdst) \
+    Deposit_ssignexponent(srcdst,1)
+#define Sgl_clear_sign(srcdst) Sall(srcdst) &= ~((unsigned int)1<<31)
+#define Sgl_clear_signexponent(srcdst) Sall(srcdst) &= 0x007fffff
+
+/* varamount must be less than 32 for the next three functions */
+#define Sgl_rightshift(srcdst, varamount)	\
+    Sall(srcdst) >>= varamount
+#define Sgl_leftshift(srcdst, varamount)	\
+    Sall(srcdst) <<= varamount
+#define Sgl_rightshift_exponentmantissa(srcdst, varamount) \
+    Sall(srcdst) = \
+	(Sexponentmantissa(srcdst) >> varamount) | \
+	(Sall(srcdst) & ((unsigned int)1<<31))
+
+#define Sgl_leftshiftby1_withextent(left,right,result) \
+    Shiftdouble(Sall(left),Extall(right),31,Sall(result))
+    
+#define Sgl_rightshiftby1_withextent(left,right,dst)		\
+    Shiftdouble(Sall(left),Extall(right),1,Extall(right))
+#define Sgl_arithrightshiftby1(srcdst)	\
+    Sall(srcdst) = (int)Sall(srcdst) >> 1
+    
+/* Sign extend the sign bit with an integer destination */
+#define Sgl_signextendedsign(value) Ssignedsign(value)
+
+#define Sgl_isone_hidden(sgl_value) (Shidden(sgl_value))
+#define Sgl_increment(sgl_value) Sall(sgl_value) += 1
+#define Sgl_increment_mantissa(sgl_value) \
+    Deposit_smantissa(sgl_value,sgl_value+1)
+#define Sgl_decrement(sgl_value) Sall(sgl_value) -= 1
+
+#define Sgl_isone_sign(sgl_value) (Is_ssign(sgl_value)!=0)
+#define Sgl_isone_hiddenoverflow(sgl_value) \
+    (Is_shiddenoverflow(sgl_value)!=0)
+#define Sgl_isone_lowmantissa(sgl_value) (Is_slow(sgl_value)!=0)
+#define Sgl_isone_signaling(sgl_value) (Is_ssignaling(sgl_value)!=0)
+#define Sgl_is_signalingnan(sgl_value) (Ssignalingnan(sgl_value)==0x1ff)
+#define Sgl_isnotzero(sgl_value) (Sall(sgl_value)!=0)
+#define Sgl_isnotzero_hiddenhigh7mantissa(sgl_value) \
+    (Shiddenhigh7mantissa(sgl_value)!=0)
+#define Sgl_isnotzero_low4(sgl_value) (Slow4(sgl_value)!=0)
+#define Sgl_isnotzero_exponent(sgl_value) (Sexponent(sgl_value)!=0)
+#define Sgl_isnotzero_mantissa(sgl_value) (Smantissa(sgl_value)!=0)
+#define Sgl_isnotzero_exponentmantissa(sgl_value) \
+    (Sexponentmantissa(sgl_value)!=0)
+#define Sgl_iszero(sgl_value) (Sall(sgl_value)==0)
+#define Sgl_iszero_signaling(sgl_value) (Is_ssignaling(sgl_value)==0)
+#define Sgl_iszero_hidden(sgl_value) (Is_shidden(sgl_value)==0)
+#define Sgl_iszero_hiddenoverflow(sgl_value) \
+    (Is_shiddenoverflow(sgl_value)==0)
+#define Sgl_iszero_hiddenhigh3mantissa(sgl_value) \
+    (Shiddenhigh3mantissa(sgl_value)==0)
+#define Sgl_iszero_hiddenhigh7mantissa(sgl_value) \
+    (Shiddenhigh7mantissa(sgl_value)==0)
+#define Sgl_iszero_sign(sgl_value) (Is_ssign(sgl_value)==0)
+#define Sgl_iszero_exponent(sgl_value) (Sexponent(sgl_value)==0)
+#define Sgl_iszero_mantissa(sgl_value) (Smantissa(sgl_value)==0)
+#define Sgl_iszero_exponentmantissa(sgl_value) \
+    (Sexponentmantissa(sgl_value)==0)
+#define Sgl_isinfinity_exponent(sgl_value) 		\
+    (Sgl_exponent(sgl_value)==SGL_INFINITY_EXPONENT)
+#define Sgl_isnotinfinity_exponent(sgl_value) 		\
+    (Sgl_exponent(sgl_value)!=SGL_INFINITY_EXPONENT)
+#define Sgl_isinfinity(sgl_value)			\
+    (Sgl_exponent(sgl_value)==SGL_INFINITY_EXPONENT &&	\
+    Sgl_mantissa(sgl_value)==0)
+#define Sgl_isnan(sgl_value)				\
+    (Sgl_exponent(sgl_value)==SGL_INFINITY_EXPONENT &&	\
+    Sgl_mantissa(sgl_value)!=0)
+#define Sgl_isnotnan(sgl_value)				\
+    (Sgl_exponent(sgl_value)!=SGL_INFINITY_EXPONENT ||	\
+    Sgl_mantissa(sgl_value)==0)
+#define Sgl_islessthan(sgl_op1,sgl_op2)			\
+    (Sall(sgl_op1) < Sall(sgl_op2))
+#define Sgl_isgreaterthan(sgl_op1,sgl_op2)		\
+    (Sall(sgl_op1) > Sall(sgl_op2))
+#define Sgl_isnotlessthan(sgl_op1,sgl_op2)		\
+    (Sall(sgl_op1) >= Sall(sgl_op2))
+#define Sgl_isequal(sgl_op1,sgl_op2)			\
+    (Sall(sgl_op1) == Sall(sgl_op2))
+
+#define Sgl_leftshiftby8(sgl_value) \
+    Sall(sgl_value) <<= 8
+#define Sgl_leftshiftby4(sgl_value) \
+    Sall(sgl_value) <<= 4
+#define Sgl_leftshiftby3(sgl_value) \
+    Sall(sgl_value) <<= 3
+#define Sgl_leftshiftby2(sgl_value) \
+    Sall(sgl_value) <<= 2
+#define Sgl_leftshiftby1(sgl_value) \
+    Sall(sgl_value) <<= 1
+#define Sgl_rightshiftby1(sgl_value) \
+    Sall(sgl_value) >>= 1
+#define Sgl_rightshiftby4(sgl_value) \
+    Sall(sgl_value) >>= 4
+#define Sgl_rightshiftby8(sgl_value) \
+    Sall(sgl_value) >>= 8
+    
+#define Sgl_ismagnitudeless(signlessleft,signlessright)			\
+/*  unsigned int signlessleft, signlessright; */			\
+      (signlessleft < signlessright)  
+    
+
+#define Sgl_copytoint_exponentmantissa(source,dest)     \
+    dest = Sexponentmantissa(source)
+
+/* A quiet NaN has the high mantissa bit clear and at least on other (in this
+ * case the adjacent bit) bit set. */
+#define Sgl_set_quiet(sgl_value) Deposit_shigh2mantissa(sgl_value,1)
+#define Sgl_set_exponent(sgl_value,exp) Deposit_sexponent(sgl_value,exp)
+
+#define Sgl_set_mantissa(dest,value) Deposit_smantissa(dest,value)
+#define Sgl_set_exponentmantissa(dest,value) \
+    Deposit_sexponentmantissa(dest,value)
+
+/*  An infinity is represented with the max exponent and a zero mantissa */
+#define Sgl_setinfinity_exponent(sgl_value) \
+    Deposit_sexponent(sgl_value,SGL_INFINITY_EXPONENT)
+#define Sgl_setinfinity_exponentmantissa(sgl_value)	\
+    Deposit_sexponentmantissa(sgl_value, \
+	(SGL_INFINITY_EXPONENT << (32-(1+SGL_EXP_LENGTH))))
+#define Sgl_setinfinitypositive(sgl_value)		\
+    Sall(sgl_value) = (SGL_INFINITY_EXPONENT << (32-(1+SGL_EXP_LENGTH)))
+#define Sgl_setinfinitynegative(sgl_value)		\
+    Sall(sgl_value) = (SGL_INFINITY_EXPONENT << (32-(1+SGL_EXP_LENGTH))) \
+    | ((unsigned int)1<<31)
+#define Sgl_setinfinity(sgl_value,sign)					\
+    Sall(sgl_value) = (SGL_INFINITY_EXPONENT << (32-(1+SGL_EXP_LENGTH))) | \
+     ((unsigned int)sign << 31)
+#define Sgl_sethigh4bits(sgl_value, extsign)  \
+    Deposit_shigh4(sgl_value,extsign)
+#define Sgl_set_sign(sgl_value,sign) Deposit_ssign(sgl_value,sign)
+#define Sgl_invert_sign(sgl_value)  \
+    Deposit_ssign(sgl_value,~Ssign(sgl_value))
+#define Sgl_setone_sign(sgl_value) Deposit_ssign(sgl_value,1)
+#define Sgl_setone_lowmantissa(sgl_value) Deposit_slow(sgl_value,1)
+#define Sgl_setzero_sign(sgl_value)  Sall(sgl_value) &= 0x7fffffff
+#define Sgl_setzero_exponent(sgl_value) Sall(sgl_value) &= 0x807fffff
+#define Sgl_setzero_mantissa(sgl_value) Sall(sgl_value) &= 0xff800000
+#define Sgl_setzero_exponentmantissa(sgl_value)  Sall(sgl_value) &= 0x80000000
+#define Sgl_setzero(sgl_value) Sall(sgl_value) = 0
+#define Sgl_setnegativezero(sgl_value) Sall(sgl_value) = (unsigned int)1 << 31
+
+/* Use following macro for both overflow & underflow conditions */
+#define ovfl -
+#define unfl +
+#define Sgl_setwrapped_exponent(sgl_value,exponent,op) \
+    Deposit_sexponent(sgl_value,(exponent op SGL_WRAP))
+
+#define Sgl_setlargestpositive(sgl_value) 				\
+    Sall(sgl_value) = ((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH)))	\
+                      | ((1<<(32-(1+SGL_EXP_LENGTH))) - 1 )
+#define Sgl_setlargestnegative(sgl_value)				\
+    Sall(sgl_value) = ((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH)))	\
+                      | ((1<<(32-(1+SGL_EXP_LENGTH))) - 1 )		\
+		      | ((unsigned int)1<<31)
+
+#define Sgl_setnegativeinfinity(sgl_value)	\
+    Sall(sgl_value) = 				\
+    ((1<<SGL_EXP_LENGTH) | SGL_INFINITY_EXPONENT) << (32-(1+SGL_EXP_LENGTH))
+#define Sgl_setlargest(sgl_value,sign) 					\
+    Sall(sgl_value) = (unsigned int)sign << 31 |			\
+        (((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH)))		\
+	  | ((1 << (32-(1+SGL_EXP_LENGTH))) - 1 ))
+#define Sgl_setlargest_exponentmantissa(sgl_value)			\
+    Sall(sgl_value) = Sall(sgl_value) & ((unsigned int)1<<31) |		\
+        (((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH)))		\
+	  | ((1 << (32-(1+SGL_EXP_LENGTH))) - 1 ))
+
+/* The high bit is always zero so arithmetic or logical shifts will work. */
+#define Sgl_right_align(srcdst,shift,extent)				\
+    /* sgl_floating_point srcdst; int shift; extension extent */	\
+    if (shift < 32) {							\
+	Extall(extent) = Sall(srcdst) << (32-(shift));			\
+    	Sall(srcdst) >>= shift;						\
+    }									\
+    else {								\
+	Extall(extent) = Sall(srcdst);					\
+	Sall(srcdst) = 0;						\
+    }
+#define Sgl_hiddenhigh3mantissa(sgl_value) Shiddenhigh3mantissa(sgl_value)
+#define Sgl_hidden(sgl_value) Shidden(sgl_value)
+#define Sgl_lowmantissa(sgl_value) Slow(sgl_value)
+
+/* The left argument is never smaller than the right argument */
+#define Sgl_subtract(sgl_left,sgl_right,sgl_result) \
+    Sall(sgl_result) = Sall(sgl_left) - Sall(sgl_right)
+
+/* Subtract right augmented with extension from left augmented with zeros and
+ * store into result and extension. */
+#define Sgl_subtract_withextension(left,right,extent,result)		\
+    /* sgl_floating_point left,right,result; extension extent */	\
+  Sgl_subtract(left,right,result);					\
+  if((Extall(extent) = 0-Extall(extent)))				\
+      Sall(result) = Sall(result)-1
+
+#define Sgl_addition(sgl_left,sgl_right,sgl_result) \
+    Sall(sgl_result) = Sall(sgl_left) + Sall(sgl_right)
+
+#define Sgl_xortointp1(left,right,result)			\
+    result = Sall(left) XOR Sall(right);
+
+#define Sgl_xorfromintp1(left,right,result)			\
+    Sall(result) = left XOR Sall(right)
+
+/* Need to Initialize */
+#define Sgl_makequietnan(dest)						\
+    Sall(dest) = ((SGL_EMAX+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH))	\
+                 | (1<<(32-(1+SGL_EXP_LENGTH+2)))
+#define Sgl_makesignalingnan(dest)					\
+    Sall(dest) = ((SGL_EMAX+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH))	\
+                 | (1<<(32-(1+SGL_EXP_LENGTH+1)))
+
+#define Sgl_normalize(sgl_opnd,exponent)			\
+	while(Sgl_iszero_hiddenhigh7mantissa(sgl_opnd)) {	\
+		Sgl_leftshiftby8(sgl_opnd);			\
+		exponent -= 8;					\
+	}							\
+	if(Sgl_iszero_hiddenhigh3mantissa(sgl_opnd)) {		\
+		Sgl_leftshiftby4(sgl_opnd);			\
+		exponent -= 4;					\
+	}							\
+	while(Sgl_iszero_hidden(sgl_opnd)) {			\
+		Sgl_leftshiftby1(sgl_opnd);			\
+		exponent -= 1;					\
+	}
+
+#define Sgl_setoverflow(sgl_opnd)				\
+	/* set result to infinity or largest number */		\
+	switch (Rounding_mode()) {				\
+		case ROUNDPLUS:					\
+			if (Sgl_isone_sign(sgl_opnd)) {		\
+				Sgl_setlargestnegative(sgl_opnd); \
+			}					\
+			else {					\
+				Sgl_setinfinitypositive(sgl_opnd); \
+			}					\
+			break;					\
+		case ROUNDMINUS:				\
+			if (Sgl_iszero_sign(sgl_opnd)) {	\
+				Sgl_setlargestpositive(sgl_opnd); \
+			}					\
+			else {					\
+				Sgl_setinfinitynegative(sgl_opnd); \
+			}					\
+			break;					\
+		case ROUNDNEAREST:				\
+			Sgl_setinfinity_exponentmantissa(sgl_opnd); \
+			break;					\
+		case ROUNDZERO:					\
+			Sgl_setlargest_exponentmantissa(sgl_opnd); \
+	}
+
+#define Sgl_denormalize(opnd,exponent,guard,sticky,inexact)		\
+	Sgl_clear_signexponent_set_hidden(opnd);			\
+	if (exponent >= (1 - SGL_P)) {					\
+		guard = (Sall(opnd) >> -exponent) & 1;			\
+		if (exponent < 0) sticky |= Sall(opnd) << (32+exponent); \
+		inexact = guard | sticky;				\
+		Sall(opnd) >>= (1-exponent);				\
+	}								\
+	else {								\
+		guard = 0;						\
+		sticky |= Sall(opnd);					\
+		inexact = sticky;					\
+		Sgl_setzero(opnd);					\
+	}
+
+/* 
+ * The fused multiply add instructions requires a single extended format,
+ * with 48 bits of mantissa.
+ */
+#define SGLEXT_THRESHOLD 48
+
+#define Sglext_setzero(valA,valB)	\
+    Sextallp1(valA) = 0; Sextallp2(valB) = 0
+
+#define Sglext_isnotzero_mantissap2(valB) (Sextallp2(valB)!=0)
+#define Sglext_isone_lowp1(val) (Sextlowp1(val)!=0)
+#define Sglext_isone_highp2(val) (Sexthighp2(val)!=0)
+#define Sglext_isnotzero_low31p2(val) (Sextlow31p2(val)!=0)
+#define Sglext_iszero(valA,valB) (Sextallp1(valA)==0 && Sextallp2(valB)==0)
+
+#define Sgl_copytoptr(src,destptr) *destptr = src
+#define Sgl_copyfromptr(srcptr,dest) dest = *srcptr
+#define Sglext_copy(srca,srcb,desta,destb) \
+    Sextallp1(desta) = Sextallp1(srca);	\
+    Sextallp2(destb) = Sextallp2(srcb)
+#define Sgl_copyto_sglext(src1,dest1,dest2) \
+	Sextallp1(dest1) = Sall(src1); Sextallp2(dest2) = 0
+
+#define Sglext_swap_lower(leftp2,rightp2)  \
+    Sextallp2(leftp2)  = Sextallp2(leftp2) XOR Sextallp2(rightp2);  \
+    Sextallp2(rightp2) = Sextallp2(leftp2) XOR Sextallp2(rightp2);  \
+    Sextallp2(leftp2)  = Sextallp2(leftp2) XOR Sextallp2(rightp2)
+
+#define Sglext_setone_lowmantissap2(value) Deposit_dlowp2(value,1)
+
+/* The high bit is always zero so arithmetic or logical shifts will work. */
+#define Sglext_right_align(srcdstA,srcdstB,shift) \
+  {int shiftamt, sticky;						\
+    shiftamt = shift % 32;						\
+    sticky = 0;								\
+    switch (shift/32) {							\
+     case 0: if (shiftamt > 0) {					\
+	        sticky = Sextallp2(srcdstB) << 32 - (shiftamt);		\
+                Variable_shift_double(Sextallp1(srcdstA),		\
+		 Sextallp2(srcdstB),shiftamt,Sextallp2(srcdstB));	\
+	        Sextallp1(srcdstA) >>= shiftamt;			\
+	     }								\
+	     break;							\
+     case 1: if (shiftamt > 0) {					\
+	        sticky = (Sextallp1(srcdstA) << 32 - (shiftamt)) |	\
+			 Sextallp2(srcdstB);				\
+	     }								\
+	     else {							\
+		sticky = Sextallp2(srcdstB);				\
+	     }								\
+	     Sextallp2(srcdstB) = Sextallp1(srcdstA) >> shiftamt;	\
+	     Sextallp1(srcdstA) = 0;					\
+	     break;							\
+    }									\
+    if (sticky) Sglext_setone_lowmantissap2(srcdstB);			\
+  }
+
+/* The left argument is never smaller than the right argument */
+#define Sglext_subtract(lefta,leftb,righta,rightb,resulta,resultb) \
+    if( Sextallp2(rightb) > Sextallp2(leftb) ) Sextallp1(lefta)--; \
+    Sextallp2(resultb) = Sextallp2(leftb) - Sextallp2(rightb);	\
+    Sextallp1(resulta) = Sextallp1(lefta) - Sextallp1(righta)
+
+#define Sglext_addition(lefta,leftb,righta,rightb,resulta,resultb) \
+    /* If the sum of the low words is less than either source, then \
+     * an overflow into the next word occurred. */ \
+    if ((Sextallp2(resultb) = Sextallp2(leftb)+Sextallp2(rightb)) < \
+        Sextallp2(rightb)) \
+	    Sextallp1(resulta) = Sextallp1(lefta)+Sextallp1(righta)+1; \
+    else Sextallp1(resulta) = Sextallp1(lefta)+Sextallp1(righta)
+
+
+#define Sglext_arithrightshiftby1(srcdstA,srcdstB)	\
+    Shiftdouble(Sextallp1(srcdstA),Sextallp2(srcdstB),1,Sextallp2(srcdstB)); \
+    Sextallp1(srcdstA) = (int)Sextallp1(srcdstA) >> 1
+   
+#define Sglext_leftshiftby8(valA,valB) \
+    Shiftdouble(Sextallp1(valA),Sextallp2(valB),24,Sextallp1(valA)); \
+    Sextallp2(valB) <<= 8
+#define Sglext_leftshiftby4(valA,valB) \
+    Shiftdouble(Sextallp1(valA),Sextallp2(valB),28,Sextallp1(valA)); \
+    Sextallp2(valB) <<= 4
+#define Sglext_leftshiftby3(valA,valB) \
+    Shiftdouble(Sextallp1(valA),Sextallp2(valB),29,Sextallp1(valA)); \
+    Sextallp2(valB) <<= 3
+#define Sglext_leftshiftby2(valA,valB) \
+    Shiftdouble(Sextallp1(valA),Sextallp2(valB),30,Sextallp1(valA)); \
+    Sextallp2(valB) <<= 2
+#define Sglext_leftshiftby1(valA,valB) \
+    Shiftdouble(Sextallp1(valA),Sextallp2(valB),31,Sextallp1(valA)); \
+    Sextallp2(valB) <<= 1
+
+#define Sglext_rightshiftby4(valueA,valueB) \
+    Shiftdouble(Sextallp1(valueA),Sextallp2(valueB),4,Sextallp2(valueB)); \
+    Sextallp1(valueA) >>= 4
+#define Sglext_rightshiftby3(valueA,valueB) \
+    Shiftdouble(Sextallp1(valueA),Sextallp2(valueB),3,Sextallp2(valueB)); \
+    Sextallp1(valueA) >>= 3
+#define Sglext_rightshiftby1(valueA,valueB) \
+    Shiftdouble(Sextallp1(valueA),Sextallp2(valueB),1,Sextallp2(valueB)); \
+    Sextallp1(valueA) >>= 1
+
+#define Sglext_xortointp1(left,right,result) Sgl_xortointp1(left,right,result)
+#define Sglext_xorfromintp1(left,right,result) \
+	Sgl_xorfromintp1(left,right,result)
+#define Sglext_copytoint_exponentmantissa(src,dest) \
+	Sgl_copytoint_exponentmantissa(src,dest)
+#define Sglext_ismagnitudeless(signlessleft,signlessright) \
+	Sgl_ismagnitudeless(signlessleft,signlessright)
+
+#define Sglext_set_sign(dbl_value,sign)  Sgl_set_sign(dbl_value,sign)  
+#define Sglext_clear_signexponent_set_hidden(srcdst) \
+	Sgl_clear_signexponent_set_hidden(srcdst) 
+#define Sglext_clear_signexponent(srcdst) Sgl_clear_signexponent(srcdst) 
+#define Sglext_clear_sign(srcdst) Sgl_clear_sign(srcdst) 
+#define Sglext_isone_hidden(dbl_value) Sgl_isone_hidden(dbl_value) 
+
+#define Sglext_denormalize(opndp1,opndp2,exponent,is_tiny)		\
+  {int sticky;								\
+    is_tiny = TRUE;							\
+    if (exponent == 0 && Sextallp2(opndp2)) {				\
+	switch (Rounding_mode()) {					\
+	case ROUNDPLUS:							\
+		if (Sgl_iszero_sign(opndp1))				\
+			if (Sgl_isone_hiddenoverflow(opndp1 + 1))	\
+				is_tiny = FALSE;			\
+		break;							\
+	case ROUNDMINUS:						\
+		if (Sgl_isone_sign(opndp1)) {				\
+			if (Sgl_isone_hiddenoverflow(opndp1 + 1))	\
+				is_tiny = FALSE;			\
+		}							\
+		break;							\
+	case ROUNDNEAREST:						\
+		if (Sglext_isone_highp2(opndp2) &&			\
+		    (Sglext_isone_lowp1(opndp1) || 			\
+		     Sglext_isnotzero_low31p2(opndp2)))			\
+			if (Sgl_isone_hiddenoverflow(opndp1 + 1))	\
+				is_tiny = FALSE;			\
+		break;							\
+	}								\
+    }									\
+    Sglext_clear_signexponent_set_hidden(opndp1);			\
+    if (exponent >= (1-DBL_P)) {					\
+	if (exponent >= -31) {						\
+	    if (exponent > -31) {					\
+		sticky = Sextallp2(opndp2) << 31+exponent;		\
+		Variable_shift_double(opndp1,opndp2,1-exponent,opndp2);	\
+		Sextallp1(opndp1) >>= 1-exponent;			\
+	    }								\
+	    else {							\
+		sticky = Sextallp2(opndp2);				\
+		Sextallp2(opndp2) = Sextallp1(opndp1);			\
+		Sextallp1(opndp1) = 0;					\
+	    }								\
+	}								\
+	else {								\
+	    sticky = (Sextallp1(opndp1) << 31+exponent) | 		\
+		     Sextallp2(opndp2);					\
+	    Sextallp2(opndp2) = Sextallp1(opndp1) >> -31-exponent;	\
+	    Sextallp1(opndp1) = 0;					\
+	}								\
+    }									\
+    else {								\
+	sticky = Sextallp1(opndp1) | Sextallp2(opndp2);			\
+	Sglext_setzero(opndp1,opndp2);					\
+    }									\
+    if (sticky) Sglext_setone_lowmantissap2(opndp2);			\
+    exponent = 0;							\
+  }
diff -Nru a/arch/parisc/math-emu/types.h b/arch/parisc/math-emu/types.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/math-emu/types.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,25 @@
+/*
+ * Linux/PA-RISC Project (http://www.parisc-linux.org/)
+ *
+ * Floating-point emulation code
+ *  Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.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.
+ */
+
+#include <linux/kernel.h>
+#define BUG() do { \
+        printk(KERN_ERR "floating-pt emulation BUG at %s:%d!\n", __FILE__, __LINE__); \
+} while (0)
diff -Nru a/arch/parisc/mm/Makefile b/arch/parisc/mm/Makefile
--- a/arch/parisc/mm/Makefile	Wed Oct 30 16:44:32 2002
+++ b/arch/parisc/mm/Makefile	Wed Oct 30 16:44:32 2002
@@ -2,6 +2,6 @@
 # Makefile for the linux parisc-specific parts of the memory manager.
 #
 
-objs-y	 := init.o fault.o kmap.o extable.o
+obj-y	 := init.o fault.o extable.o ioremap.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/arch/parisc/mm/extable.c b/arch/parisc/mm/extable.c
--- a/arch/parisc/mm/extable.c	Wed Oct 30 16:44:26 2002
+++ b/arch/parisc/mm/extable.c	Wed Oct 30 16:44:26 2002
@@ -46,17 +46,17 @@
 const struct exception_table_entry *
 search_exception_table (unsigned long addr)
 {
-#ifndef CONFIG_MODULE
+#ifndef CONFIG_MODULES
 	/* There is only the kernel to search.  */
 	return search_one_table(__start___ex_table, 
                                 __stop___ex_table - 1, 
                                 addr);
 #else
-	struct exception_table_entry *ret;
 	/* The kernel is the last "module" -- no need to treat it special. */
 	struct module *mp;
 
 	for (mp = module_list; mp ; mp = mp->next) {
+		const struct exception_table_entry *ret;
 		if (!mp->ex_table_start)
 			continue;
 		ret = search_one_table(mp->ex_table_start, mp->ex_table_end - 1,
diff -Nru a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
--- a/arch/parisc/mm/fault.c	Wed Oct 30 16:44:32 2002
+++ b/arch/parisc/mm/fault.c	Wed Oct 30 16:44:32 2002
@@ -17,6 +17,10 @@
 #include <linux/interrupt.h>
 
 #include <asm/uaccess.h>
+#include <asm/traps.h>
+
+#define PRINT_USER_FAULTS /* (turn this on if you want user faults to be */
+			 /*  dumped to the console via printk)          */
 
 
 /* Defines for parisc_acctyp()	*/
@@ -114,59 +118,31 @@
 #undef isGraphicsFlushRead
 #undef BITSSET
 
-/* This is similar to expand_stack(), except that it is for stacks
- * that grow upwards.
- */
-
-static inline int expand_stackup(struct vm_area_struct * vma, unsigned long address)
-{
-	unsigned long grow;
-
-	address += 4 + PAGE_SIZE - 1;
-	address &= PAGE_MASK;
-	grow = (address - vma->vm_end) >> PAGE_SHIFT;
-	if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur ||
-	    ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur)
-		return -ENOMEM;
-	vma->vm_end = address;
-	vma->vm_mm->total_vm += grow;
-	if (vma->vm_flags & VM_LOCKED)
-		vma->vm_mm->locked_vm += grow;
-	return 0;
-}
-
-
-/* This is similar to find_vma(), except that it understands that stacks
- * grow up rather than down.
- * XXX Optimise by making use of cache and avl tree as per find_vma().
- */
 
-struct vm_area_struct * pa_find_vma(struct mm_struct * mm, unsigned long addr)
-{
-	struct vm_area_struct *vma = NULL;
-
-	if (mm) {
-		vma = mm->mmap;
-		if (!vma || addr < vma->vm_start)
-			return NULL;
-		while (vma->vm_next && addr >= vma->vm_next->vm_start)
-			vma = vma->vm_next;
-	}
-	return vma;
-}
-
-
-/*
- * This routine handles page faults.  It determines the address,
- * and the problem, and then passes it off to one of the appropriate
- * routines.
- */
-extern void parisc_terminate(char *, struct pt_regs *, int, unsigned long);
+#if 0
+/* This is the treewalk to find a vma which is the highest that has
+ * a start < addr.  We're using find_vma_prev instead right now, but
+ * we might want to use this at some point in the future.  Probably
+ * not, but I want it committed to CVS so I don't lose it :-)
+ */
+			while (tree != vm_avl_empty) {
+				if (tree->vm_start > addr) {
+					tree = tree->vm_avl_left;
+				} else {
+					prev = tree;
+					if (prev->vm_next == NULL)
+						break;
+					if (prev->vm_next->vm_start > addr)
+						break;
+					tree = tree->vm_avl_right;
+				}
+			}
+#endif
 
 void do_page_fault(struct pt_regs *regs, unsigned long code,
 			      unsigned long address)
 {
-	struct vm_area_struct * vma;
+	struct vm_area_struct *vma, *prev_vma;
 	struct task_struct *tsk = current;
 	struct mm_struct *mm = tsk->mm;
 	const struct exception_table_entry *fix;
@@ -176,13 +152,9 @@
 		goto no_context;
 
 	down_read(&mm->mmap_sem);
-	vma = pa_find_vma(mm, address);
-	if (!vma)
-		goto bad_area;
-	if (address < vma->vm_end)
-		goto good_area;
-	if (!(vma->vm_flags & VM_GROWSUP) || expand_stackup(vma, address))
-		goto bad_area;
+	vma = find_vma_prev(mm, address, &prev_vma);
+	if (!vma || address < vma->vm_start)
+		goto check_expansion;
 /*
  * Ok, we have a good vm_area for this memory access. We still need to
  * check the access permissions.
@@ -221,6 +193,11 @@
 	up_read(&mm->mmap_sem);
 	return;
 
+check_expansion:
+	vma = prev_vma;
+	if (vma && (expand_stack(vma, address) == 0))
+		goto good_area;
+
 /*
  * Something tried to access memory that isn't in our memory map..
  */
@@ -230,9 +207,16 @@
 	if (user_mode(regs)) {
 		struct siginfo si;
 
-		printk("\ndo_page_fault() pid=%d command='%s'\n",
-		    tsk->pid, tsk->comm);
+#ifdef PRINT_USER_FAULTS
+		printk(KERN_DEBUG "\n");
+		printk(KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n",
+		    tsk->pid, tsk->comm, code, address);
+		if (vma) {
+			printk(KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n",
+					vma->vm_start, vma->vm_end);
+		}
 		show_regs(regs);
+#endif
 		/* FIXME: actually we need to get the signo and code correct */
 		si.si_signo = SIGSEGV;
 		si.si_errno = 0;
@@ -272,11 +256,11 @@
 		}
 	}
 
-	parisc_terminate("Bad Address (null pointer deref?)",regs,code,address);
+	parisc_terminate("Bad Address (null pointer deref?)", regs, code, address);
 
   out_of_memory:
 	up_read(&mm->mmap_sem);
-	printk("VM: killing process %s\n", current->comm);
+	printk(KERN_CRIT "VM: killing process %s\n", current->comm);
 	if (user_mode(regs))
 		do_exit(SIGKILL);
 	goto no_context;
diff -Nru a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
--- a/arch/parisc/mm/init.c	Wed Oct 30 16:44:28 2002
+++ b/arch/parisc/mm/init.c	Wed Oct 30 16:44:28 2002
@@ -15,14 +15,406 @@
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/pci.h>		/* for hppa_dma_ops and pcxl_dma_ops */
+#include <linux/blk.h>          /* for initrd_start and initrd_end */
 #include <linux/swap.h>
 #include <linux/unistd.h>
 
 #include <asm/pgalloc.h>
+#include <asm/tlb.h>
+#include <asm/pdc_chassis.h>
 
-extern unsigned long max_pfn, mem_max;
+mmu_gather_t mmu_gathers[NR_CPUS];
 
-void free_initmem(void)  {
+extern char _text;	/* start of kernel code, defined by linker */
+extern int  data_start;
+extern char _end;	/* end of BSS, defined by linker */
+extern char __init_begin, __init_end;
+
+#ifdef CONFIG_DISCONTIGMEM
+struct node_map_data node_data[MAX_PHYSMEM_RANGES];
+bootmem_data_t bmem_data[MAX_PHYSMEM_RANGES];
+unsigned char *chunkmap;
+unsigned int maxchunkmap;
+#endif
+
+static struct resource data_resource = {
+	name:	"Kernel data",
+	flags:	IORESOURCE_BUSY | IORESOURCE_MEM,
+};
+
+static struct resource code_resource = {
+	name:	"Kernel code",
+	flags:	IORESOURCE_BUSY | IORESOURCE_MEM,
+};
+
+static struct resource pdcdata_resource = {
+	name:	"PDC data (Page Zero)",
+	start:	0,
+	end:	0x9ff,
+	flags:	IORESOURCE_BUSY | IORESOURCE_MEM,
+};
+
+static struct resource sysram_resources[MAX_PHYSMEM_RANGES];
+
+static unsigned long max_pfn;
+
+/* The following array is initialized from the firmware specific
+ * information retrieved in kernel/inventory.c.
+ */
+
+physmem_range_t pmem_ranges[MAX_PHYSMEM_RANGES];
+int npmem_ranges;
+
+#ifdef __LP64__
+#define MAX_MEM         (~0UL)
+#else /* !__LP64__ */
+#define MAX_MEM         (3584U*1024U*1024U)
+#endif /* !__LP64__ */
+
+static unsigned long mem_limit = MAX_MEM;
+
+static void __init mem_limit_func(void)
+{
+	char *cp, *end;
+	unsigned long limit;
+	extern char saved_command_line[];
+
+	/* We need this before __setup() functions are called */
+
+	limit = MAX_MEM;
+	for (cp = saved_command_line; *cp; ) {
+		if (memcmp(cp, "mem=", 4) == 0) {
+			cp += 4;
+			limit = memparse(cp, &end);
+			if (end != cp)
+				break;
+			cp = end;
+		} else {
+			while (*cp != ' ' && *cp)
+				++cp;
+			while (*cp == ' ')
+				++cp;
+		}
+	}
+
+	if (limit < mem_limit)
+		mem_limit = limit;
+}
+
+#define MAX_GAP (0x40000000UL >> PAGE_SHIFT)
+
+static void __init setup_bootmem(void)
+{
+	unsigned long bootmap_size;
+	unsigned long mem_max;
+	unsigned long bootmap_pages;
+	unsigned long bootmap_start_pfn;
+	unsigned long bootmap_pfn;
+#ifndef CONFIG_DISCONTIGMEM
+	physmem_range_t pmem_holes[MAX_PHYSMEM_RANGES - 1];
+	int npmem_holes;
+#endif
+	int i, sysram_resource_count;
+
+	disable_sr_hashing(); /* Turn off space register hashing */
+
+#ifdef CONFIG_DISCONTIGMEM
+	/*
+	 * The below is still true as of 2.4.2. If this is ever fixed,
+	 * we can remove this warning!
+	 */
+
+	printk(KERN_WARNING "\n\n");
+	printk(KERN_WARNING "CONFIG_DISCONTIGMEM is enabled, which is probably a mistake. This\n");
+	printk(KERN_WARNING "option can lead to heavy swapping, even when there are gigabytes\n");
+	printk(KERN_WARNING "of free memory.\n\n");
+#endif
+
+#ifdef __LP64__
+
+#ifndef CONFIG_DISCONTIGMEM
+	/*
+	 * Sort the ranges. Since the number of ranges is typically
+	 * small, and performance is not an issue here, just do
+	 * a simple insertion sort.
+	 */
+
+	for (i = 1; i < npmem_ranges; i++) {
+		int j;
+
+		for (j = i; j > 0; j--) {
+			unsigned long tmp;
+
+			if (pmem_ranges[j-1].start_pfn <
+			    pmem_ranges[j].start_pfn) {
+
+				break;
+			}
+			tmp = pmem_ranges[j-1].start_pfn;
+			pmem_ranges[j-1].start_pfn = pmem_ranges[j].start_pfn;
+			pmem_ranges[j].start_pfn = tmp;
+			tmp = pmem_ranges[j-1].pages;
+			pmem_ranges[j-1].pages = pmem_ranges[j].pages;
+			pmem_ranges[j].pages = tmp;
+		}
+	}
+
+	/*
+	 * Throw out ranges that are too far apart (controlled by
+	 * MAX_GAP). If CONFIG_DISCONTIGMEM wasn't implemented so
+	 * poorly, we would recommend enabling that option, but,
+	 * until it is fixed, this is the best way to go.
+	 */
+
+	for (i = 1; i < npmem_ranges; i++) {
+		if (pmem_ranges[i].start_pfn -
+			(pmem_ranges[i-1].start_pfn +
+			 pmem_ranges[i-1].pages) > MAX_GAP) {
+			npmem_ranges = i;
+			break;
+		}
+	}
+#endif
+
+	if (npmem_ranges > 1) {
+
+		/* Print the memory ranges */
+
+		printk(KERN_INFO "Memory Ranges:\n");
+
+		for (i = 0; i < npmem_ranges; i++) {
+			unsigned long start;
+			unsigned long size;
+
+			size = (pmem_ranges[i].pages << PAGE_SHIFT);
+			start = (pmem_ranges[i].start_pfn << PAGE_SHIFT);
+			printk(KERN_INFO "%2d) Start 0x%016lx End 0x%016lx Size %6ld Mb\n",
+				i,start, start + (size - 1), size >> 20);
+		}
+	}
+
+#endif /* __LP64__ */
+
+#if 1
+	/* KLUGE! this really belongs in kernel/resource.c! */
+	iomem_resource.end = ~0UL;
+#endif
+
+	sysram_resource_count = npmem_ranges;
+	for (i = 0; i < sysram_resource_count; i++) {
+		struct resource *res = &sysram_resources[i];
+		res->name = "System RAM";
+		res->start = pmem_ranges[i].start_pfn << PAGE_SHIFT;
+		res->end = res->start + (pmem_ranges[i].pages << PAGE_SHIFT)-1;
+		res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+		request_resource(&iomem_resource, res);
+	}
+
+	/*
+	 * For 32 bit kernels we limit the amount of memory we can
+	 * support, in order to preserve enough kernel address space
+	 * for other purposes. For 64 bit kernels we don't normally
+	 * limit the memory, but this mechanism can be used to
+	 * artificially limit the amount of memory (and it is written
+	 * to work with multiple memory ranges).
+	 */
+
+	mem_limit_func();       /* check for "mem=" argument */
+
+	mem_max = 0;
+	for (i = 0; i < npmem_ranges; i++) {
+		unsigned long rsize;
+
+		rsize = pmem_ranges[i].pages << PAGE_SHIFT;
+		if ((mem_max + rsize) > mem_limit) {
+			printk(KERN_WARNING "Memory truncated to %ld Mb\n", mem_limit >> 20);
+			if (mem_max == mem_limit)
+				npmem_ranges = i;
+			else {
+				pmem_ranges[i].pages =   (mem_limit >> PAGE_SHIFT)
+						       - (mem_max >> PAGE_SHIFT);
+				npmem_ranges = i + 1;
+				mem_max = mem_limit;
+			}
+			break;
+		}
+		mem_max += rsize;
+	}
+
+	printk(KERN_INFO "Total Memory: %ld Mb\n",mem_max >> 20);
+
+#ifndef CONFIG_DISCONTIGMEM
+
+	/* Merge the ranges, keeping track of the holes */
+
+	{
+		unsigned long end_pfn;
+		unsigned long hole_pages;
+
+		npmem_holes = 0;
+		end_pfn = pmem_ranges[0].start_pfn + pmem_ranges[0].pages;
+		for (i = 1; i < npmem_ranges; i++) {
+
+			hole_pages = pmem_ranges[i].start_pfn - end_pfn;
+			if (hole_pages) {
+				pmem_holes[npmem_holes].start_pfn = end_pfn;
+				pmem_holes[npmem_holes++].pages = hole_pages;
+				end_pfn += hole_pages;
+			}
+			end_pfn += pmem_ranges[i].pages;
+		}
+
+		pmem_ranges[0].pages = end_pfn - pmem_ranges[0].start_pfn;
+		npmem_ranges = 1;
+	}
+#endif
+
+	bootmap_pages = 0;
+	for (i = 0; i < npmem_ranges; i++)
+		bootmap_pages += bootmem_bootmap_pages(pmem_ranges[i].pages);
+
+	bootmap_start_pfn = PAGE_ALIGN(__pa((unsigned long) &_end)) >> PAGE_SHIFT;
+
+#ifdef CONFIG_DISCONTIGMEM
+	for (i = 0; i < npmem_ranges; i++)
+		node_data[i].pg_data.bdata = &bmem_data[i];
+#endif
+	/*
+	 * Initialize and free the full range of memory in each range.
+	 * Note that the only writing these routines do are to the bootmap,
+	 * and we've made sure to locate the bootmap properly so that they
+	 * won't be writing over anything important.
+	 */
+
+	bootmap_pfn = bootmap_start_pfn;
+	max_pfn = 0;
+	for (i = 0; i < npmem_ranges; i++) {
+		unsigned long start_pfn;
+		unsigned long npages;
+
+		start_pfn = pmem_ranges[i].start_pfn;
+		npages = pmem_ranges[i].pages;
+
+		bootmap_size = init_bootmem_node(NODE_DATA(i),
+						bootmap_pfn,
+						start_pfn,
+						(start_pfn + npages) );
+		free_bootmem_node(NODE_DATA(i),
+				  (start_pfn << PAGE_SHIFT),
+				  (npages << PAGE_SHIFT) );
+		bootmap_pfn += (bootmap_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
+		if ((start_pfn + npages) > max_pfn)
+			max_pfn = start_pfn + npages;
+	}
+
+	if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) {
+		printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n");
+		BUG();
+	}
+
+	/* reserve PAGE0 pdc memory, kernel text/data/bss & bootmap */
+
+#define PDC_CONSOLE_IO_IODC_SIZE 32768
+
+	reserve_bootmem_node(NODE_DATA(0), 0UL,
+			(unsigned long)(PAGE0->mem_free + PDC_CONSOLE_IO_IODC_SIZE));
+	reserve_bootmem_node(NODE_DATA(0),__pa((unsigned long)&_text),
+			(unsigned long)(&_end - &_text));
+	reserve_bootmem_node(NODE_DATA(0), (bootmap_start_pfn << PAGE_SHIFT),
+			((bootmap_pfn - bootmap_start_pfn) << PAGE_SHIFT));
+
+#ifndef CONFIG_DISCONTIGMEM
+
+	/* reserve the holes */
+
+	for (i = 0; i < npmem_holes; i++) {
+		reserve_bootmem_node(NODE_DATA(0),
+				(pmem_holes[i].start_pfn << PAGE_SHIFT),
+				(pmem_holes[i].pages << PAGE_SHIFT));
+	}
+#endif
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_start) {
+		printk(KERN_INFO "initrd: %08lx-%08lx\n", initrd_start, initrd_end);
+		if (__pa(initrd_start) < mem_max) {
+			unsigned long initrd_reserve;
+
+			if (__pa(initrd_end) > mem_max) {
+				initrd_reserve = mem_max - __pa(initrd_start);
+			} else {
+				initrd_reserve = initrd_end - initrd_start;
+			}
+			initrd_below_start_ok = 1;
+			printk(KERN_INFO "initrd: reserving %08lx-%08lx (mem_max %08lx)\n", __pa(initrd_start), __pa(initrd_start) + initrd_reserve, mem_max);
+
+			reserve_bootmem_node(NODE_DATA(0),__pa(initrd_start), initrd_reserve);
+		}
+	}
+#endif
+
+	data_resource.start =  virt_to_phys(&data_start);
+	data_resource.end = virt_to_phys(&_end)-1;
+	code_resource.start = virt_to_phys(&_text);
+	code_resource.end = virt_to_phys(&data_start)-1;
+
+	/* We don't know which region the kernel will be in, so try
+	 * all of them.
+	 */
+	for (i = 0; i < sysram_resource_count; i++) {
+		struct resource *res = &sysram_resources[i];
+		request_resource(res, &code_resource);
+		request_resource(res, &data_resource);
+	}
+	request_resource(&sysram_resources[0], &pdcdata_resource);
+}
+
+void free_initmem(void)
+{
+	/* FIXME: */
+#if 0
+	printk(KERN_INFO "NOT FREEING INITMEM (%dk)\n",
+			(&__init_end - &__init_begin) >> 10);
+	return;
+#else
+	unsigned long addr;
+	
+	printk(KERN_INFO "Freeing unused kernel memory: ");
+
+#if 1
+	/* Attempt to catch anyone trying to execute code here
+	 * by filling the page with BRK insns.
+	 * 
+	 * If we disable interrupts for all CPUs, then IPI stops working.
+	 * Kinda breaks the global cache flushing.
+	 */
+	local_irq_disable();
+
+	memset(&__init_begin, 0x00, 
+		(unsigned long)&__init_end - (unsigned long)&__init_begin);
+
+	flush_data_cache();
+	asm volatile("sync" : : );
+	flush_icache_range((unsigned long)&__init_begin, (unsigned long)&__init_end);
+	asm volatile("sync" : : );
+
+	local_irq_enable();
+#endif
+	
+	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);
+		num_physpages++;
+		totalram_pages++;
+	}
+
+	/* set up a new led state on systems shipped LED State panel */
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE);
+	
+	printk("%luk freed\n", (unsigned long)(&__init_end - &__init_begin) >> 10);
+#endif
 }
 
 /*
@@ -36,67 +428,43 @@
  * a hole of 4kB between each vmalloced area for the same reason.
  */
 
+#define MAP_START 0x4000 /* Leave room for gateway page expansion */
 #define VM_MAP_OFFSET  (32*1024)
 #define SET_MAP_OFFSET(x) ((void *)(((unsigned long)(x) + VM_MAP_OFFSET) \
 				     & ~(VM_MAP_OFFSET-1)))
 
 void *vmalloc_start;
+#ifdef CONFIG_PA11
 unsigned long pcxl_dma_start;
+#endif
 
 void __init mem_init(void)
 {
-	max_mapnr = num_physpages = max_low_pfn;
-	high_memory = __va(max_low_pfn * PAGE_SIZE);
+	int i;
 
-	totalram_pages += free_all_bootmem();
-	printk("Memory: %luk available\n", totalram_pages << (PAGE_SHIFT-10));
+	high_memory = __va((max_pfn << PAGE_SHIFT));
+	max_mapnr = (virt_to_page(high_memory - 1) - mem_map) + 1;
 
-	if (hppa_dma_ops == &pcxl_dma_ops) {
-	    pcxl_dma_start = (unsigned long)SET_MAP_OFFSET(high_memory);
-	    vmalloc_start = SET_MAP_OFFSET(pcxl_dma_start + PCXL_DMA_MAP_SIZE);
-	}
-	else {
-	    pcxl_dma_start = 0;
-	    vmalloc_start = SET_MAP_OFFSET(high_memory);
-	}
-}
+	num_physpages = 0;
+	mem_map = zone_table[0]->zone_mem_map;
+	for (i = 0; i < npmem_ranges; i++)
+		num_physpages += free_all_bootmem_node(NODE_DATA(i));
+	totalram_pages = num_physpages;
 
-void __bad_pgd(pgd_t *pgd)
-{
-	printk("Bad pgd in pmd_alloc: %08lx\n", pgd_val(*pgd));
-	pgd_val(*pgd) = _PAGE_TABLE + __pa(BAD_PAGETABLE);
-}
-
-void __bad_pmd(pmd_t *pmd)
-{
-	printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
-	pmd_val(*pmd) = _PAGE_TABLE + __pa(BAD_PAGETABLE);
-}
-
-pte_t *get_pte_slow(pmd_t *pmd, unsigned long offset)
-{
-	pte_t *pte;
-
-	pte = (pte_t *) __get_free_page(GFP_KERNEL);
-
-	if (pmd_none(*pmd)) {
-		if (pte) {
-			clear_page(pte);
-			pmd_val(*pmd) = _PAGE_TABLE + __pa((unsigned long)pte);
-			return pte + offset;
-		}
-		pmd_val(*pmd) = _PAGE_TABLE + __pa(BAD_PAGETABLE);
-		return NULL;
-	}
+	printk(KERN_INFO "Memory: %luk available\n", num_physpages << (PAGE_SHIFT-10));
 
-	free_page((unsigned long)pte);
-
-	if (pmd_bad(*pmd)) {
-		__bad_pmd(pmd);
-		return NULL;
+#ifdef CONFIG_PA11
+	if (hppa_dma_ops == &pcxl_dma_ops) {
+		pcxl_dma_start = (unsigned long)SET_MAP_OFFSET(MAP_START);
+		vmalloc_start = SET_MAP_OFFSET(pcxl_dma_start + PCXL_DMA_MAP_SIZE);
+	} else {
+		pcxl_dma_start = 0;
+		vmalloc_start = SET_MAP_OFFSET(MAP_START);
 	}
+#else
+	vmalloc_start = SET_MAP_OFFSET(MAP_START);
+#endif
 
-	return (pte_t *) pmd_page(*pmd) + offset;
 }
 
 int do_check_pgt_cache(int low, int high)
@@ -104,40 +472,16 @@
 	return 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.
- */
-pte_t * __bad_pagetable(void)
-{
-	return (pte_t *) NULL;
-}
-
 unsigned long *empty_zero_page;
-unsigned long *empty_bad_page;
-
-pte_t __bad_page(void)
-{
-	return *(pte_t *)NULL;
-}
 
 void show_mem(void)
 {
 	int i,free = 0,total = 0,reserved = 0;
 	int shared = 0, cached = 0;
 
-	printk("Mem-info:\n");
+	printk(KERN_INFO "Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:	 %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk(KERN_INFO "Free swap:	 %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
@@ -150,53 +494,49 @@
 		else
 			shared += atomic_read(&mem_map[i].count) - 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(KERN_INFO "%d pages of RAM\n", total);
+	printk(KERN_INFO "%d reserved pages\n", reserved);
+	printk(KERN_INFO "%d pages shared\n", shared);
+	printk(KERN_INFO "%d pages swap cached\n", cached);
 }
 
-void set_pte_phys (unsigned long vaddr, unsigned long phys)
-{
-}
 
-
-/*
- * pagetable_init() sets up the page tables
- *
- * Note that gateway_init() places the Linux gateway page at page 0.
- * Since gateway pages cannot be dereferenced this has the desirable
- * side effect of trapping those pesky NULL-reference errors in the
- * kernel.
- */
-static void __init pagetable_init(void)
+static void __init map_pages(unsigned long start_vaddr, unsigned long start_paddr, unsigned long size, pgprot_t pgprot)
 {
 	pgd_t *pg_dir;
 	pmd_t *pmd;
 	pte_t *pg_table;
+	unsigned long end_paddr;
+	unsigned long start_pmd;
+	unsigned long start_pte;
 	unsigned long tmp1;
 	unsigned long tmp2;
 	unsigned long address;
 	unsigned long ro_start;
 	unsigned long ro_end;
 	unsigned long fv_addr;
-	extern  const int stext;
-	extern  int data_start;
-	extern  const unsigned long fault_vector_20;
+	unsigned long gw_addr;
+	extern const unsigned long fault_vector_20;
+	extern void * const linux_gateway_page;
 
-	ro_start = __pa((unsigned long)&stext);
+	ro_start = __pa((unsigned long)&_text);
 	ro_end   = __pa((unsigned long)&data_start);
 	fv_addr  = __pa((unsigned long)&fault_vector_20) & PAGE_MASK;
+	gw_addr  = __pa((unsigned long)&linux_gateway_page) & PAGE_MASK;
 
-	printk("pagetable_init\n");
+	end_paddr = start_paddr + size;
 
-	/* Map whole memory from PAGE_OFFSET */
-	pg_dir = (pgd_t *)swapper_pg_dir + USER_PGD_PTRS;
+	pg_dir = pgd_offset_k(start_vaddr);
 
-	address = 0;
-	while (address < mem_max) {
-		/* XXX: BTLB should be done here */
+#if PTRS_PER_PMD == 1
+	start_pmd = 0;
+#else
+	start_pmd = ((start_vaddr >> PMD_SHIFT) & (PTRS_PER_PMD - 1));
+#endif
+	start_pte = ((start_vaddr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
 
+	address = start_paddr;
+	while (address < end_paddr) {
 #if PTRS_PER_PMD == 1
 		pmd = (pmd_t *)__pa(pg_dir);
 #else
@@ -207,7 +547,7 @@
 		 */
 
 		if (!pmd) {
-			pmd = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+			pmd = (pmd_t *) alloc_bootmem_low_pages_node(NODE_DATA(0),PAGE_SIZE);
 			pmd = (pmd_t *) __pa(pmd);
 		}
 
@@ -217,8 +557,8 @@
 
 		/* now change pmd to kernel virtual addresses */
 
-		pmd = (pmd_t *) __va(pmd);
-		for (tmp1 = 0 ; tmp1 < PTRS_PER_PMD ; tmp1++,pmd++) {
+		pmd = (pmd_t *)__va(pmd) + start_pmd;
+		for (tmp1 = start_pmd; tmp1 < PTRS_PER_PMD; tmp1++,pmd++) {
 
 			/*
 			 * pg_table is physical at this point
@@ -227,7 +567,7 @@
 			pg_table = (pte_t *) (PAGE_MASK & pmd_val(*pmd));
 			if (!pg_table) {
 				pg_table = (pte_t *)
-					alloc_bootmem_low_pages(PAGE_SIZE);
+					alloc_bootmem_low_pages_node(NODE_DATA(0),PAGE_SIZE);
 				pg_table = (pte_t *) __pa(pg_table);
 			}
 
@@ -236,64 +576,90 @@
 
 			/* now change pg_table to kernel virtual addresses */
 
-			pg_table = (pte_t *) __va(pg_table);
-			for (tmp2=0; tmp2 < PTRS_PER_PTE; tmp2++,pg_table++) {
+			pg_table = (pte_t *) __va(pg_table) + start_pte;
+			for (tmp2 = start_pte; tmp2 < PTRS_PER_PTE; tmp2++,pg_table++) {
 				pte_t pte;
 
-#if !defined(CONFIG_KWDB) && !defined(CONFIG_STI_CONSOLE)
+#if !defined(CONFIG_STI_CONSOLE)
 #warning STI console should explicitly allocate executable pages but does not
-/* KWDB needs to write kernel text when setting break points.
-**
-** The right thing to do seems like KWDB modify only the pte which
-** has a break point on it...otherwise we might mask worse bugs.
-*/
+				/*
+				 * Map the fault vector writable so we can
+				 * write the HPMC checksum.
+				 */
 				if (address >= ro_start && address < ro_end
-							&& address != fv_addr)
+							&& address != fv_addr
+							&& address != gw_addr)
 				    pte = __mk_pte(address, PAGE_KERNEL_RO);
 				else
 #endif
-				    pte = __mk_pte(address, PAGE_KERNEL);
+				    pte = __mk_pte(address, pgprot);
 
-				if (address >= mem_max)
+				if (address >= end_paddr)
 					pte_val(pte) = 0;
 
 				set_pte(pg_table, pte);
 
 				address += PAGE_SIZE;
 			}
+			start_pte = 0;
 
-			if (address >= mem_max)
+			if (address >= end_paddr)
 			    break;
 		}
+		start_pmd = 0;
 	}
+}
+
+/*
+ * pagetable_init() sets up the page tables
+ *
+ * Note that gateway_init() places the Linux gateway page at page 0.
+ * Since gateway pages cannot be dereferenced this has the desirable
+ * side effect of trapping those pesky NULL-reference errors in the
+ * kernel.
+ */
+static void __init pagetable_init(void)
+{
+	int range;
+
+	printk("pagetable_init\n");
+
+	/* Map each physical memory range to its kernel vaddr */
+
+	for (range = 0; range < npmem_ranges; range++) {
+		unsigned long start_paddr;
+		unsigned long end_paddr;
+		unsigned long size;
+
+		start_paddr = pmem_ranges[range].start_pfn << PAGE_SHIFT;
+		end_paddr = start_paddr + (pmem_ranges[range].pages << PAGE_SHIFT);
+		size = pmem_ranges[range].pages << PAGE_SHIFT;
+
+		map_pages((unsigned long)__va(start_paddr), start_paddr,
+			size, PAGE_KERNEL);
+	}
+
+#ifdef CONFIG_BLK_DEV_INITRD
+	if (initrd_end && initrd_end > mem_limit) {
+		printk("initrd: mapping %08lx-%08lx\n", initrd_start, initrd_end);
+		map_pages(initrd_start, __pa(initrd_start),
+			initrd_end - initrd_start, PAGE_KERNEL);
+	}
+#endif
 
 	empty_zero_page = alloc_bootmem_pages(PAGE_SIZE);
 	memset(empty_zero_page, 0, PAGE_SIZE);
 }
 
-unsigned long gateway_pgd_offset;
-unsigned long gateway_pgd_entry;
-
 static void __init gateway_init(void)
 {
-	unsigned long hpux_gateway_page_addr;
 	unsigned long linux_gateway_page_addr;
-	pgd_t *pg_dir;
-	pmd_t *pmd_base;
-	pmd_t *pmd;
-	pte_t *pg_table_base;
-	pte_t *pg_table;
-	/* FIXME: These are 'const' in order to trick the compiler
-           into not treating them as DP-relative data. */
-	extern void * const hpux_gateway_page;
+	/* FIXME: This is 'const' in order to trick the compiler
+	   into not treating it as DP-relative data. */
 	extern void * const linux_gateway_page;
-	pte_t pte;
 
-	hpux_gateway_page_addr = HPUX_GATEWAY_ADDR & PAGE_MASK;
 	linux_gateway_page_addr = LINUX_GATEWAY_ADDR & PAGE_MASK;
 
-	gateway_pgd_offset = hpux_gateway_page_addr >> PGDIR_SHIFT;
-
 	/*
 	 * Setup Linux Gateway page.
 	 *
@@ -301,151 +667,345 @@
 	 * page 0), so it doesn't need to be aliased into user space.
 	 */
 
-	pg_dir = (pgd_t *)swapper_pg_dir;
-
-#if PTRS_PER_PMD == 1
-	pmd_base = (pmd_t *)pg_dir;
-	pmd = pmd_base +
-		((linux_gateway_page_addr) >> PGDIR_SHIFT);
-
-#else
-	pmd_base = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE);
-	pgd_val(*(pg_dir + (linux_gateway_page_addr >> PGDIR_SHIFT))) =
-		_PAGE_TABLE | __pa(pmd_base);
+	map_pages(linux_gateway_page_addr, __pa(&linux_gateway_page),
+		PAGE_SIZE, PAGE_GATEWAY);
+}
 
-	pmd = pmd_base +
-		((linux_gateway_page_addr & (PMD_MASK) & (PGDIR_SIZE - 1)) >>
-								PMD_SHIFT);
-#endif
+void
+map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm)
+{
+	pgd_t *pg_dir;
+	pmd_t *pmd;
+	pte_t *pg_table;
+	unsigned long start_pmd;
+	unsigned long start_pte;
+	unsigned long address;
+	unsigned long hpux_gw_page_addr;
+	/* FIXME: This is 'const' in order to trick the compiler
+	   into not treating it as DP-relative data. */
+	extern void * const hpux_gateway_page;
 
-	pg_table_base = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
+	hpux_gw_page_addr = HPUX_GATEWAY_ADDR & PAGE_MASK;
 
-	pmd_val(*pmd) = _PAGE_TABLE | __pa(pg_table_base);
+	/*
+	 * Setup HP-UX Gateway page.
+	 *
+	 * The HP-UX gateway page resides in the user address space,
+	 * so it needs to be aliased into each process.
+	 */
 
-	pte = __mk_pte(__pa(&linux_gateway_page), PAGE_GATEWAY);
+	pg_dir = pgd_offset(mm,hpux_gw_page_addr);
 
-	pg_table = pg_table_base +
-		((linux_gateway_page_addr & (PAGE_MASK) & (PMD_SIZE - 1)) >>
-								PAGE_SHIFT);
+#if PTRS_PER_PMD == 1
+	start_pmd = 0;
+#else
+	start_pmd = ((hpux_gw_page_addr >> PMD_SHIFT) & (PTRS_PER_PMD - 1));
+#endif
+	start_pte = ((hpux_gw_page_addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
 
-	set_pte(pg_table,pte);
+	address = __pa(&hpux_gateway_page);
+#if PTRS_PER_PMD == 1
+	pmd = (pmd_t *)__pa(pg_dir);
+#else
+	pmd = (pmd_t *) (PAGE_MASK & pgd_val(*pg_dir));
 
 	/*
-	 * Setup HP-UX gateway page.
-	 * This page will be aliased into each user address space.
+	 * pmd is physical at this point
 	 */
 
-	pg_table_base = (pte_t *) alloc_bootmem_pages(PAGE_SIZE);
-
-	pte = __mk_pte(__pa(&hpux_gateway_page), PAGE_GATEWAY);
-	pg_table = pg_table_base +
-		((hpux_gateway_page_addr & (PAGE_MASK) & (PMD_SIZE - 1)) >>
-								PAGE_SHIFT);
-
-	set_pte(pg_table,pte);
-
+	if (!pmd) {
+		pmd = (pmd_t *) get_zeroed_page(GFP_KERNEL);
+		pmd = (pmd_t *) __pa(pmd);
+	}
 
-#if PTRS_PER_PMD == 1
-	pmd_base = (pmd_t *)pg_table_base;
-#else
-	pmd_base = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE);
-	pmd = pmd_base +
-		((hpux_gateway_page_addr & (PMD_MASK) & (PGDIR_SIZE - 1)) >>
-								PMD_SHIFT);
-	pmd_val(*pmd) = _PAGE_TABLE | __pa(pg_table_base);
+	pgd_val(*pg_dir) = _PAGE_TABLE | (unsigned long) pmd;
 #endif
+	/* now change pmd to kernel virtual addresses */
 
-	gateway_pgd_entry = _PAGE_TABLE | __pa(pmd_base);
+	pmd = (pmd_t *)__va(pmd) + start_pmd;
 
 	/*
-	 * We will be aliasing the HP-UX gateway page into all HP-UX
-	 * user spaces at the same address (not counting the space register
-	 * value) that will be equivalently mapped as long as space register
-	 * hashing is disabled. It will be a problem if anyone touches
-	 * the gateway pages at its "kernel" address, since that is
-	 * NOT equivalently mapped. We'll flush the caches at this
-	 * point, just in case some code has touched those addresses
-	 * previous to this, but all bets are off if they get touched
-	 * after this point.
+	 * pg_table is physical at this point
 	 */
 
-	flush_all_caches();
+	pg_table = (pte_t *) (PAGE_MASK & pmd_val(*pmd));
+	if (!pg_table)
+		pg_table = (pte_t *) __pa(get_zeroed_page(GFP_KERNEL));
 
-	return;
+	pmd_val(*pmd) = _PAGE_TABLE | (unsigned long) pg_table;
+
+	/* now change pg_table to kernel virtual addresses */
+
+	pg_table = (pte_t *) __va(pg_table) + start_pte;
+	set_pte(pg_table, __mk_pte(address, PAGE_GATEWAY));
 }
 
+extern void flush_tlb_all_local(void);
+
 void __init paging_init(void)
 {
+	int i;
+
+	setup_bootmem();
 	pagetable_init();
 	gateway_init();
+	flush_cache_all_local(); /* start with known state */
+	flush_tlb_all_local();
 
-	{
-		unsigned long zones_size[MAX_NR_ZONES] = { max_pfn/2, max_pfn/2, };
+	for (i = 0; i < npmem_ranges; i++) {
+		unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0, };
+
+		zones_size[ZONE_DMA] = pmem_ranges[i].pages;
+		free_area_init_node(i,NODE_DATA(i),NULL,zones_size,
+				(pmem_ranges[i].start_pfn << PAGE_SHIFT),0);
+	}
+
+#ifdef CONFIG_DISCONTIGMEM
+	/*
+	 * Initialize support for virt_to_page() macro.
+	 *
+	 * Note that MAX_ADDRESS is the largest virtual address that
+	 * we can map. However, since we map all physical memory into
+	 * the kernel address space, it also has an effect on the maximum
+	 * physical address we can map (MAX_ADDRESS - PAGE_OFFSET).
+	 */
 
-		free_area_init(zones_size);
+	maxchunkmap = MAX_ADDRESS >> CHUNKSHIFT;
+	chunkmap = (unsigned char *)alloc_bootmem(maxchunkmap);
+
+	for (i = 0; i < maxchunkmap; i++)
+	    chunkmap[i] = BADCHUNK;
+
+	for (i = 0; i < npmem_ranges; i++) {
+
+		ADJ_NODE_MEM_MAP(i) = NODE_MEM_MAP(i) - pmem_ranges[i].start_pfn;
+		{
+			unsigned long chunk_paddr;
+			unsigned long end_paddr;
+			int chunknum;
+
+			chunk_paddr = (pmem_ranges[i].start_pfn << PAGE_SHIFT);
+			end_paddr = chunk_paddr + (pmem_ranges[i].pages << PAGE_SHIFT);
+			chunk_paddr &= CHUNKMASK;
+
+			chunknum = (int)CHUNKNUM(chunk_paddr);
+			while (chunk_paddr < end_paddr) {
+				if (chunknum >= maxchunkmap)
+					goto badchunkmap1;
+				if (chunkmap[chunknum] != BADCHUNK)
+					goto badchunkmap2;
+				chunkmap[chunknum] = (unsigned char)i;
+				chunk_paddr += CHUNKSZ;
+				chunknum++;
+			}
+		}
 	}
+
+	return;
+
+badchunkmap1:
+	panic("paging_init: Physical address exceeds maximum address space!\n");
+badchunkmap2:
+	panic("paging_init: Collision in chunk map array. CHUNKSZ needs to be smaller\n");
+#endif
 }
 
-#define NR_SPACE_IDS	8192
+#ifdef CONFIG_PA20
 
-static unsigned long space_id[NR_SPACE_IDS / (8 * sizeof(long))];
-static unsigned long space_id_index;
-static unsigned long free_space_ids = NR_SPACE_IDS;
+/*
+ * Currently, all PA20 chips have 18 bit protection id's, which is the
+ * limiting factor (space ids are 32 bits).
+ */
+
+#define NR_SPACE_IDS 262144
+
+#else
 
 /*
- * XXX: We should probably unfold the set_bit / test_bit / clear_bit
- * locking out of these two functions and have a single spinlock on the
- * space_id data structures.
- *
- * Don't bother. This is all going to be significantly changed in the
- * very near future.
+ * Currently we have a one-to-one relationship between space id's and
+ * protection id's. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only
+ * support 15 bit protection id's, so that is the limiting factor.
+ * PCXT' has 18 bit protection id's, but only 16 bit spaceids, so it's
+ * probably not worth the effort for a special case here.
  */
 
-#define SPACEID_SHIFT (PAGE_SHIFT + (PT_NLEVELS)*(PAGE_SHIFT - PT_NLEVELS) - 32)
+#define NR_SPACE_IDS 32768
+
+#endif  /* !CONFIG_PA20 */
+
+#define RECYCLE_THRESHOLD (NR_SPACE_IDS / 2)
+#define SID_ARRAY_SIZE  (NR_SPACE_IDS / (8 * sizeof(long)))
+
+static unsigned long space_id[SID_ARRAY_SIZE] = { 1 }; /* disallow space 0 */
+static unsigned long dirty_space_id[SID_ARRAY_SIZE];
+static unsigned long space_id_index;
+static unsigned long free_space_ids = NR_SPACE_IDS - 1;
+static unsigned long dirty_space_ids = 0;
+
+static spinlock_t sid_lock = SPIN_LOCK_UNLOCKED;
 
 unsigned long alloc_sid(void)
 {
 	unsigned long index;
 
-	if (free_space_ids == 0)
-		BUG();
+	spin_lock(&sid_lock);
 
-	free_space_ids--;
+	if (free_space_ids == 0) {
+		if (dirty_space_ids != 0) {
+			spin_unlock(&sid_lock);
+			flush_tlb_all(); /* flush_tlb_all() calls recycle_sids() */
+			spin_lock(&sid_lock);
+		}
+		if (free_space_ids == 0)
+			BUG();
+	}
 
-	do {
-		index = find_next_zero_bit(space_id, NR_SPACE_IDS, space_id_index);
-	} while(test_and_set_bit(index, space_id));
+	free_space_ids--;
 
+	index = find_next_zero_bit(space_id, NR_SPACE_IDS, space_id_index);
+	space_id[index >> SHIFT_PER_LONG] |= (1L << (index & (BITS_PER_LONG - 1)));
 	space_id_index = index;
 
+	spin_unlock(&sid_lock);
+
 	return index << SPACEID_SHIFT;
 }
 
 void free_sid(unsigned long spaceid)
 {
 	unsigned long index = spaceid >> SPACEID_SHIFT;
-	if (index < 0)
-		BUG();
+	unsigned long *dirty_space_offset;
+
+	dirty_space_offset = dirty_space_id + (index >> SHIFT_PER_LONG);
+	index &= (BITS_PER_LONG - 1);
+
+	spin_lock(&sid_lock);
+
+	if (*dirty_space_offset & (1L << index))
+	    BUG(); /* attempt to free space id twice */
+
+	*dirty_space_offset |= (1L << index);
+	dirty_space_ids++;
 
-	clear_bit(index, space_id);
+	spin_unlock(&sid_lock);
+}
+
+
+#ifdef CONFIG_SMP
+static void get_dirty_sids(unsigned long *ndirtyptr,unsigned long *dirty_array)
+{
+	int i;
+
+	/* NOTE: sid_lock must be held upon entry */
 
-	if (space_id_index > index) {
-		space_id_index = index;
+	*ndirtyptr = dirty_space_ids;
+	if (dirty_space_ids != 0) {
+	    for (i = 0; i < SID_ARRAY_SIZE; i++) {
+		dirty_array[i] = dirty_space_id[i];
+		dirty_space_id[i] = 0;
+	    }
+	    dirty_space_ids = 0;
 	}
-	free_space_ids++;
+
+	return;
 }
 
+static void recycle_sids(unsigned long ndirty,unsigned long *dirty_array)
+{
+	int i;
+
+	/* NOTE: sid_lock must be held upon entry */
+
+	if (ndirty != 0) {
+		for (i = 0; i < SID_ARRAY_SIZE; i++) {
+			space_id[i] ^= dirty_array[i];
+		}
+
+		free_space_ids += ndirty;
+		space_id_index = 0;
+	}
+}
+
+#else /* CONFIG_SMP */
+
+static void recycle_sids(void)
+{
+	int i;
+
+	/* NOTE: sid_lock must be held upon entry */
+
+	if (dirty_space_ids != 0) {
+		for (i = 0; i < SID_ARRAY_SIZE; i++) {
+			space_id[i] ^= dirty_space_id[i];
+			dirty_space_id[i] = 0;
+		}
+
+		free_space_ids += dirty_space_ids;
+		dirty_space_ids = 0;
+		space_id_index = 0;
+	}
+}
+#endif
+
+/*
+ * flush_tlb_all() calls recycle_sids(), since whenever the entire tlb is
+ * purged, we can safely reuse the space ids that were released but
+ * not flushed from the tlb.
+ */
+
+#ifdef CONFIG_SMP
+
+static unsigned long recycle_ndirty;
+static unsigned long recycle_dirty_array[SID_ARRAY_SIZE];
+static unsigned int recycle_inuse = 0;
+
+void flush_tlb_all(void)
+{
+	int do_recycle;
+
+	do_recycle = 0;
+	spin_lock(&sid_lock);
+	if (dirty_space_ids > RECYCLE_THRESHOLD) {
+	    if (recycle_inuse) {
+		BUG();  /* FIXME: Use a semaphore/wait queue here */
+	    }
+	    get_dirty_sids(&recycle_ndirty,recycle_dirty_array);
+	    recycle_inuse++;
+	    do_recycle++;
+	}
+	spin_unlock(&sid_lock);
+	smp_call_function((void (*)(void *))flush_tlb_all_local, NULL, 1, 1);
+	flush_tlb_all_local();
+	if (do_recycle) {
+	    spin_lock(&sid_lock);
+	    recycle_sids(recycle_ndirty,recycle_dirty_array);
+	    recycle_inuse = 0;
+	    spin_unlock(&sid_lock);
+	}
+}
+#else
+void flush_tlb_all(void)
+{
+	spin_lock(&sid_lock);
+	flush_tlb_all_local();
+	recycle_sids();
+	spin_unlock(&sid_lock);
+}
+#endif
+
 #ifdef CONFIG_BLK_DEV_INITRD
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
 #if 0
+	if (start < end)
+		printk(KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
 	for (; start < end; start += PAGE_SIZE) {
-		ClearPageReserved(mem_map + MAP_NR(start));
-		set_page_count(mem_map+MAP_NR(start), 1);
+		ClearPageReserved(virt_to_page(start));
+		set_page_count(virt_to_page(start), 1);
 		free_page(start);
+		num_physpages++;
 		totalram_pages++;
 	}
-	printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
 #endif
 }
 #endif
diff -Nru a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/parisc/mm/ioremap.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,178 @@
+/*
+ * arch/parisc/mm/ioremap.c
+ *
+ * Re-map IO memory to kernel address space so that we can access it.
+ * This is needed for high PCI addresses that aren't mapped in the
+ * 640k-1MB IO memory area on PC's
+ *
+ * (C) Copyright 1995 1996 Linus Torvalds
+ * (C) Copyright 2001 Helge Deller <deller@gmx.de>
+ */
+
+#include <linux/vmalloc.h>
+#include <linux/errno.h>
+#include <asm/io.h>
+#include <asm/pgalloc.h>
+
+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;
+
+	address &= ~PMD_MASK;
+	end = address + size;
+	if (end > PMD_SIZE)
+		end = PMD_SIZE;
+	if (address >= end)
+		BUG();
+	do {
+		if (!pte_none(*pte)) {
+			printk(KERN_ERR "remap_area_pte: page already exists\n");
+			BUG();
+		}
+		set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW | 
+					_PAGE_DIRTY | _PAGE_ACCESSED | flags)));
+		address += PAGE_SIZE;
+		phys_addr += PAGE_SIZE;
+		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(NULL, 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;
+}
+
+#if (USE_HPPA_IOREMAP)
+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(&init_mm, address);
+	flush_cache_all();
+	if (address >= end)
+		BUG();
+	spin_lock(&init_mm.page_table_lock);
+	do {
+		pmd_t *pmd;
+		pmd = pmd_alloc(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 error;
+}
+#endif /* USE_HPPA_IOREMAP */
+
+/*
+ * 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)
+{
+#if !(USE_HPPA_IOREMAP)
+
+	unsigned long end = phys_addr + size - 1;
+	/* Support EISA addresses */
+	if ((phys_addr >= 0x00080000 && end < 0x000fffff)
+			|| (phys_addr >= 0x00500000 && end < 0x03bfffff)) {
+		phys_addr |= 0xfc000000;
+	}
+
+	return (void *)phys_addr;
+
+#else
+	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;
+
+	/*
+	 * Don't allow anybody to remap normal RAM that we're using..
+	 */
+	if (phys_addr < virt_to_phys(high_memory)) {
+		char *t_addr, *t_end;
+		struct page *page;
+
+		t_addr = __va(phys_addr);
+		t_end = t_addr + (size - 1);
+	   
+		for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
+			if(!PageReserved(page))
+				return NULL;
+	}
+
+	/*
+	 * Mappings have to be page-aligned
+	 */
+	offset = phys_addr & ~PAGE_MASK;
+	phys_addr &= PAGE_MASK;
+	size = PAGE_ALIGN(last_addr) - phys_addr;
+
+	/*
+	 * Ok, go for it..
+	 */
+	area = get_vm_area(size, VM_IOREMAP);
+	if (!area)
+		return NULL;
+	addr = area->addr;
+	if (remap_area_pages(VMALLOC_VMADDR(addr), phys_addr, size, flags)) {
+		vfree(addr);
+		return NULL;
+	}
+	return (void *) (offset + (char *)addr);
+#endif
+}
+
+void iounmap(void *addr)
+{
+#if !(USE_HPPA_IOREMAP)
+	return;
+#else
+	if (addr > high_memory)
+		return vfree((void *) (PAGE_MASK & (unsigned long) addr));
+#endif
+}
diff -Nru a/arch/parisc/mm/pa11.c b/arch/parisc/mm/pa11.c
--- a/arch/parisc/mm/pa11.c	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,171 +0,0 @@
-/* $Id: pa11.c,v 1.1 1999/03/17 01:05:41 pjlahaie Exp $
- *
- * pa11.c: PA 1.1 specific mmu/cache code.
- *
- */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/system.h>
-#include <asm/sgialib.h>
-#include <asm/mmu_context.h>
-
-extern unsigned long mips_tlb_entries;
-
-/* page functions */
-void pa11_clear_page(unsigned long page)
-{
-}
-
-static void pa11_copy_page(unsigned long to, unsigned long from)
-{
-}
-
-/* Cache operations. */
-static inline void pa11_flush_cache_all(void) { }
-static void pa11_flush_cache_mm(struct mm_struct *mm) { }
-static void pa11_flush_cache_range(struct vm_area_struct *vma,
-				    unsigned long start,
-				    unsigned long end)
-{
-}
-
-static void pa11_flush_cache_page(struct vm_area_struct *vma,
-				   unsigned long page)
-{
-}
-
-static void pa11_flush_page_to_ram(unsigned long page)
-{
-}
-
-static void pa11_flush_cache_sigtramp(unsigned long page)
-{
-}
-
-/* TLB operations. */
-static inline void pa11_flush_tlb_all(void)
-{
-	unsigned long flags;
-	int entry;
-
-	save_and_cli(flags);
-/* Here we will need to flush all the TLBs */
-	restore_flags(flags);
-}
-
-static void pa11_flush_tlb_mm(struct mm_struct *mm)
-{
-/* This is what the MIPS does..  Is it the right thing for PA-RISC? */
-	if(mm == current->mm)
-		pa11_flush_tlb_all();
-}
-
-static void pa11_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
-				  unsigned long end)
-{
-	if (vma == NULL || vma->vm_mm == current->mm)
-		pa11_flush_tlb_all();
-}
-
-static void pa11_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
-{
-	if(vma->vm_mm == current->mm)
-		pa11_flush_tlb_all();
-}
-
-static void pa11_load_pgd(unsigned long pg_dir)
-{
-	unsigned long flags;
-    /* We need to do the right thing here */
-}
-
-/*
- * Initialize new page directory with pointers to invalid ptes
- */
-static void pa11_pgd_init(unsigned long page)
-{
-	unsigned long dummy1, dummy2;
-
-}
-
-static void pa11_update_mmu_cache(struct vm_area_struct * vma,
-				   unsigned long address, pte_t pte)
-{
-	pa11_flush_tlb_page(vma, address);
-}
-
-static void pa11_show_regs(struct pt_regs * regs)
-{
-	/*
-	 * Saved main processor registers
-	 */
-	printk("$0 : %08x %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-	       0, (unsigned long) regs->regs[1], (unsigned long) regs->regs[2],
-	       (unsigned long) regs->regs[3], (unsigned long) regs->regs[4],
-	       (unsigned long) regs->regs[5], (unsigned long) regs->regs[6],
-	       (unsigned long) regs->regs[7]);
-	printk("$8 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-	       (unsigned long) regs->regs[8], (unsigned long) regs->regs[9],
-	       (unsigned long) regs->regs[10], (unsigned long) regs->regs[11],
-               (unsigned long) regs->regs[12], (unsigned long) regs->regs[13],
-	       (unsigned long) regs->regs[14], (unsigned long) regs->regs[15]);
-	printk("$16: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-	       (unsigned long) regs->regs[16], (unsigned long) regs->regs[17],
-	       (unsigned long) regs->regs[18], (unsigned long) regs->regs[19],
-               (unsigned long) regs->regs[20], (unsigned long) regs->regs[21],
-	       (unsigned long) regs->regs[22], (unsigned long) regs->regs[23]);
-	printk("$24: %08lx %08lx                   %08lx %08lx %08lx %08lx\n",
-	       (unsigned long) regs->regs[24], (unsigned long) regs->regs[25],
-	       (unsigned long) regs->regs[28], (unsigned long) regs->regs[29],
-               (unsigned long) regs->regs[30], (unsigned long) regs->regs[31]);
-
-	/*
-	 * Saved cp0 registers
-	 */
-	printk("epc  : %08lx    %s\nStatus: %08x\nCause : %08x\n",
-	       (unsigned long) regs->cp0_epc, print_tainted(),
-	       (unsigned int) regs->cp0_status,
-	       (unsigned int) regs->cp0_cause);
-}
-
-static int pa11_user_mode(struct pt_regs *regs)
-{
-       /* Return user mode stuff?? */
-}
-
-__initfunc(void ld_mmu_pa11(void))
-{
-
-    /* Taken directly from the MIPS arch..  Lots of bad things here */
-	clear_page = pa11_clear_page;
-	copy_page = pa11_copy_page;
-
-	flush_cache_all = pa11_flush_cache_all;
-	flush_cache_mm = pa11_flush_cache_mm;
-	flush_cache_range = pa11_flush_cache_range;
-	flush_cache_page = pa11_flush_cache_page;
-	flush_cache_sigtramp = pa11_flush_cache_sigtramp;
-	flush_page_to_ram = pa11_flush_page_to_ram;
-
-	flush_tlb_all = pa11_flush_tlb_all;
-	flush_tlb_mm = pa11_flush_tlb_mm;
-	flush_tlb_range = pa11_flush_tlb_range;
-	flush_tlb_page = pa11_flush_tlb_page;
-	pa11_asid_setup();
-
-	load_pgd = pa11_load_pgd;
-	pgd_init = pa11_pgd_init;
-	update_mmu_cache = pa11_update_mmu_cache;
-
-	show_regs = pa11_show_regs;
-    
-        add_wired_entry = pa11_add_wired_entry;
-
-	user_mode = pa11_user_mode;
-	flush_tlb_all();
-}
diff -Nru a/arch/parisc/mm/pa20.c b/arch/parisc/mm/pa20.c
--- a/arch/parisc/mm/pa20.c	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,171 +0,0 @@
-/* $Id: pa20.c,v 1.1 1999/03/17 01:05:41 pjlahaie Exp $
- *
- * pa20.c: PA 2.0 specific mmu/cache code.
- *
- */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/system.h>
-#include <asm/sgialib.h>
-#include <asm/mmu_context.h>
-
-extern unsigned long mips_tlb_entries;
-
-/* page functions */
-void pa20_clear_page(unsigned long page)
-{
-}
-
-static void pa20_copy_page(unsigned long to, unsigned long from)
-{
-}
-
-/* Cache operations. */
-static inline void pa20_flush_cache_all(void) { }
-static void pa20_flush_cache_mm(struct mm_struct *mm) { }
-static void pa20_flush_cache_range(struct vm_area_struct *vma,
-				    unsigned long start,
-				    unsigned long end)
-{
-}
-
-static void pa20_flush_cache_page(struct vm_area_struct *vma,
-				   unsigned long page)
-{
-}
-
-static void pa20_flush_page_to_ram(unsigned long page)
-{
-}
-
-static void pa20_flush_cache_sigtramp(unsigned long page)
-{
-}
-
-/* TLB operations. */
-static inline void pa20_flush_tlb_all(void)
-{
-	unsigned long flags;
-	int entry;
-
-	save_and_cli(flags);
-/* Here we will need to flush all the TLBs */
-	restore_flags(flags);
-}
-
-static void pa20_flush_tlb_mm(struct mm_struct *mm)
-{
-/* This is what the MIPS does..  Is it the right thing for PA-RISC? */
-	if(mm == current->mm)
-		pa20_flush_tlb_all();
-}
-
-static void pa20_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
-				  unsigned long end)
-{
-	if (vma == NULL || vma->vm_mm == current->mm)
-		pa20_flush_tlb_all();
-}
-
-static void pa20_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
-{
-	if(vma->vm_mm == current->mm)
-		pa20_flush_tlb_all();
-}
-
-static void pa20_load_pgd(unsigned long pg_dir)
-{
-	unsigned long flags;
-    /* We need to do the right thing here */
-}
-
-/*
- * Initialize new page directory with pointers to invalid ptes
- */
-static void pa20_pgd_init(unsigned long page)
-{
-	unsigned long dummy1, dummy2;
-
-}
-
-static void pa20_update_mmu_cache(struct vm_area_struct * vma,
-				   unsigned long address, pte_t pte)
-{
-	pa20_flush_tlb_page(vma, address);
-}
-
-static void pa20_show_regs(struct pt_regs * regs)
-{
-	/*
-	 * Saved main processor registers
-	 */
-	printk("$0 : %08x %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-	       0, (unsigned long) regs->regs[1], (unsigned long) regs->regs[2],
-	       (unsigned long) regs->regs[3], (unsigned long) regs->regs[4],
-	       (unsigned long) regs->regs[5], (unsigned long) regs->regs[6],
-	       (unsigned long) regs->regs[7]);
-	printk("$8 : %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-	       (unsigned long) regs->regs[8], (unsigned long) regs->regs[9],
-	       (unsigned long) regs->regs[10], (unsigned long) regs->regs[11],
-               (unsigned long) regs->regs[12], (unsigned long) regs->regs[13],
-	       (unsigned long) regs->regs[14], (unsigned long) regs->regs[15]);
-	printk("$16: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
-	       (unsigned long) regs->regs[16], (unsigned long) regs->regs[17],
-	       (unsigned long) regs->regs[18], (unsigned long) regs->regs[19],
-               (unsigned long) regs->regs[20], (unsigned long) regs->regs[21],
-	       (unsigned long) regs->regs[22], (unsigned long) regs->regs[23]);
-	printk("$24: %08lx %08lx                   %08lx %08lx %08lx %08lx\n",
-	       (unsigned long) regs->regs[24], (unsigned long) regs->regs[25],
-	       (unsigned long) regs->regs[28], (unsigned long) regs->regs[29],
-               (unsigned long) regs->regs[30], (unsigned long) regs->regs[31]);
-
-	/*
-	 * Saved cp0 registers
-	 */
-	printk("epc  : %08lx    %s\nStatus: %08x\nCause : %08x\n",
-	       (unsigned long) regs->cp0_epc, print_tainted(),
-	       (unsigned int) regs->cp0_status,
-	       (unsigned int) regs->cp0_cause);
-}
-
-static int pa20_user_mode(struct pt_regs *regs)
-{
-       /* Return user mode stuff?? */
-}
-
-__initfunc(void ld_mmu_pa20(void))
-{
-
-    /* Taken directly from the MIPS arch..  Lots of bad things here */
-	clear_page = pa20_clear_page;
-	copy_page = pa20_copy_page;
-
-	flush_cache_all = pa20_flush_cache_all;
-	flush_cache_mm = pa20_flush_cache_mm;
-	flush_cache_range = pa20_flush_cache_range;
-	flush_cache_page = pa20_flush_cache_page;
-	flush_cache_sigtramp = pa20_flush_cache_sigtramp;
-	flush_page_to_ram = pa20_flush_page_to_ram;
-
-	flush_tlb_all = pa20_flush_tlb_all;
-	flush_tlb_mm = pa20_flush_tlb_mm;
-	flush_tlb_range = pa20_flush_tlb_range;
-	flush_tlb_page = pa20_flush_tlb_page;
-	pa20_asid_setup();
-
-	load_pgd = pa20_load_pgd;
-	pgd_init = pa20_pgd_init;
-	update_mmu_cache = pa20_update_mmu_cache;
-
-	show_regs = pa20_show_regs;
-    
-        add_wired_entry = pa20_add_wired_entry;
-
-	user_mode = pa20_user_mode;
-	flush_tlb_all();
-}
diff -Nru a/arch/parisc/tools/Makefile b/arch/parisc/tools/Makefile
--- a/arch/parisc/tools/Makefile	Wed Oct 30 16:44:35 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,23 +0,0 @@
-# Makefile for MIPS kernel build tools.
-#
-# Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
-# Copyright (C) 1997 Ralf Baechle (ralf@gnu.ai.mit.edu)
-#
-# $Id: Makefile,v 1.3 1999/09/29 05:19:56 grundler Exp $
-#
-TARGET	:= $(TOPDIR)/include/asm-$(ARCH)/offset.h
-
-all: $(TARGET)
-
-$(TARGET): offset.h
-	cmp -s $^ $@ || (cp $^ $(TARGET).new && mv $(TARGET).new $(TARGET))
-
-offset.h: offset.s
-	sed -n '/^@@@/s///p' $^ >$@
-
-offset.s: offset.c
-
-clean:
-	rm -f offset.[hs] $(TARGET).new
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/parisc/tools/offset.c b/arch/parisc/tools/offset.c
--- a/arch/parisc/tools/offset.c	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,326 +0,0 @@
-/* $Id: offset.c,v 1.2 2000/01/31 13:42:59 jsm Exp $
- *
- * offset.c: Calculate pt_regs and task_struct offsets.
- *
- * Copyright (C) 1996 David S. Miller
- * Made portable by Ralf Baechle
- * Adapted to parisc by Philipp Rumpf, (C) 1999 SuSE GmbH Nuernberg */
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/version.h>
-
-#include <asm/ptrace.h>
-#include <asm/processor.h>
-#include <asm/hardirq.h>
-
-#define text(t) __asm__("\n@@@" t)
-#define _offset(type, member) (&(((type *)NULL)->member))
-
-#define offset(string, ptr, member) \
-	__asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member)))
-#define size(string, size) \
-	__asm__("\n@@@" string "%0" : : "i" (sizeof(size)))
-#define align(x,y) (((x)+(2*(y))-1)-(((x)+(y)-1)%(y)))
-#define size_align(string, size, algn) \
-	__asm__("\n@@@" string "%0" : : "i" \
-		align(sizeof(size),algn))
-#define linefeed text("")
-
-text("/* DO NOT TOUCH, AUTOGENERATED BY OFFSET.C */");
-linefeed;
-text("#ifndef _PARISC_OFFSET_H");
-text("#define _PARISC_OFFSET_H");
-linefeed;
-
-void output_task_ptreg_defines(void)
-{
-	text("/* PA-RISC task pt_regs offsets. */");
-	offset("#define TASK_REGS       ", struct task_struct, thread.regs);
-	offset("#define TASK_PT_PSW     ", struct task_struct, thread.regs.gr[ 0]);
-	offset("#define TASK_PT_GR1     ", struct task_struct, thread.regs.gr[ 1]);
-	offset("#define TASK_PT_GR2     ", struct task_struct, thread.regs.gr[ 2]);
-	offset("#define TASK_PT_GR3     ", struct task_struct, thread.regs.gr[ 3]);
-	offset("#define TASK_PT_GR4     ", struct task_struct, thread.regs.gr[ 4]);
-	offset("#define TASK_PT_GR5     ", struct task_struct, thread.regs.gr[ 5]);
-	offset("#define TASK_PT_GR6     ", struct task_struct, thread.regs.gr[ 6]);
-	offset("#define TASK_PT_GR7     ", struct task_struct, thread.regs.gr[ 7]);
-	offset("#define TASK_PT_GR8     ", struct task_struct, thread.regs.gr[ 8]);
-	offset("#define TASK_PT_GR9     ", struct task_struct, thread.regs.gr[ 9]);
-	offset("#define TASK_PT_GR10    ", struct task_struct, thread.regs.gr[10]);
-	offset("#define TASK_PT_GR11    ", struct task_struct, thread.regs.gr[11]);
-	offset("#define TASK_PT_GR12    ", struct task_struct, thread.regs.gr[12]);
-	offset("#define TASK_PT_GR13    ", struct task_struct, thread.regs.gr[13]);
-	offset("#define TASK_PT_GR14    ", struct task_struct, thread.regs.gr[14]);
-	offset("#define TASK_PT_GR15    ", struct task_struct, thread.regs.gr[15]);
-	offset("#define TASK_PT_GR16    ", struct task_struct, thread.regs.gr[16]);
-	offset("#define TASK_PT_GR17    ", struct task_struct, thread.regs.gr[17]);
-	offset("#define TASK_PT_GR18    ", struct task_struct, thread.regs.gr[18]);
-	offset("#define TASK_PT_GR19    ", struct task_struct, thread.regs.gr[19]);
-	offset("#define TASK_PT_GR20    ", struct task_struct, thread.regs.gr[20]);
-	offset("#define TASK_PT_GR21    ", struct task_struct, thread.regs.gr[21]);
-	offset("#define TASK_PT_GR22    ", struct task_struct, thread.regs.gr[22]);
-	offset("#define TASK_PT_GR23    ", struct task_struct, thread.regs.gr[23]);
-	offset("#define TASK_PT_GR24    ", struct task_struct, thread.regs.gr[24]);
-	offset("#define TASK_PT_GR25    ", struct task_struct, thread.regs.gr[25]);
-	offset("#define TASK_PT_GR26    ", struct task_struct, thread.regs.gr[26]);
-	offset("#define TASK_PT_GR27    ", struct task_struct, thread.regs.gr[27]);
-	offset("#define TASK_PT_GR28    ", struct task_struct, thread.regs.gr[28]);
-	offset("#define TASK_PT_GR29    ", struct task_struct, thread.regs.gr[29]);
-	offset("#define TASK_PT_GR30    ", struct task_struct, thread.regs.gr[30]);
-	offset("#define TASK_PT_GR31    ", struct task_struct, thread.regs.gr[31]);
-	offset("#define TASK_PT_FR0     ", struct task_struct, thread.regs.fr[ 0]);
-	offset("#define TASK_PT_FR1     ", struct task_struct, thread.regs.fr[ 1]);
-	offset("#define TASK_PT_FR2     ", struct task_struct, thread.regs.fr[ 2]);
-	offset("#define TASK_PT_FR3     ", struct task_struct, thread.regs.fr[ 3]);
-	offset("#define TASK_PT_FR4     ", struct task_struct, thread.regs.fr[ 4]);
-	offset("#define TASK_PT_FR5     ", struct task_struct, thread.regs.fr[ 5]);
-	offset("#define TASK_PT_FR6     ", struct task_struct, thread.regs.fr[ 6]);
-	offset("#define TASK_PT_FR7     ", struct task_struct, thread.regs.fr[ 7]);
-	offset("#define TASK_PT_FR8     ", struct task_struct, thread.regs.fr[ 8]);
-	offset("#define TASK_PT_FR9     ", struct task_struct, thread.regs.fr[ 9]);
-	offset("#define TASK_PT_FR10    ", struct task_struct, thread.regs.fr[10]);
-	offset("#define TASK_PT_FR11    ", struct task_struct, thread.regs.fr[11]);
-	offset("#define TASK_PT_FR12    ", struct task_struct, thread.regs.fr[12]);
-	offset("#define TASK_PT_FR13    ", struct task_struct, thread.regs.fr[13]);
-	offset("#define TASK_PT_FR14    ", struct task_struct, thread.regs.fr[14]);
-	offset("#define TASK_PT_FR15    ", struct task_struct, thread.regs.fr[15]);
-	offset("#define TASK_PT_FR16    ", struct task_struct, thread.regs.fr[16]);
-	offset("#define TASK_PT_FR17    ", struct task_struct, thread.regs.fr[17]);
-	offset("#define TASK_PT_FR18    ", struct task_struct, thread.regs.fr[18]);
-	offset("#define TASK_PT_FR19    ", struct task_struct, thread.regs.fr[19]);
-	offset("#define TASK_PT_FR20    ", struct task_struct, thread.regs.fr[20]);
-	offset("#define TASK_PT_FR21    ", struct task_struct, thread.regs.fr[21]);
-	offset("#define TASK_PT_FR22    ", struct task_struct, thread.regs.fr[22]);
-	offset("#define TASK_PT_FR23    ", struct task_struct, thread.regs.fr[23]);
-	offset("#define TASK_PT_FR24    ", struct task_struct, thread.regs.fr[24]);
-	offset("#define TASK_PT_FR25    ", struct task_struct, thread.regs.fr[25]);
-	offset("#define TASK_PT_FR26    ", struct task_struct, thread.regs.fr[26]);
-	offset("#define TASK_PT_FR27    ", struct task_struct, thread.regs.fr[27]);
-	offset("#define TASK_PT_FR28    ", struct task_struct, thread.regs.fr[28]);
-	offset("#define TASK_PT_FR29    ", struct task_struct, thread.regs.fr[29]);
-	offset("#define TASK_PT_FR30    ", struct task_struct, thread.regs.fr[30]);
-	offset("#define TASK_PT_FR31    ", struct task_struct, thread.regs.fr[31]);
-	offset("#define TASK_PT_SR0     ", struct task_struct, thread.regs.sr[ 0]);
-	offset("#define TASK_PT_SR1     ", struct task_struct, thread.regs.sr[ 1]);
-	offset("#define TASK_PT_SR2     ", struct task_struct, thread.regs.sr[ 2]);
-	offset("#define TASK_PT_SR3     ", struct task_struct, thread.regs.sr[ 3]);
-	offset("#define TASK_PT_SR4     ", struct task_struct, thread.regs.sr[ 4]);
-	offset("#define TASK_PT_SR5     ", struct task_struct, thread.regs.sr[ 5]);
-	offset("#define TASK_PT_SR6     ", struct task_struct, thread.regs.sr[ 6]);
-	offset("#define TASK_PT_SR7     ", struct task_struct, thread.regs.sr[ 7]);
-	offset("#define TASK_PT_IASQ0   ", struct task_struct, thread.regs.iasq[0]);
-	offset("#define TASK_PT_IASQ1   ", struct task_struct, thread.regs.iasq[1]);
-	offset("#define TASK_PT_IAOQ0   ", struct task_struct, thread.regs.iaoq[0]);
-	offset("#define TASK_PT_IAOQ1   ", struct task_struct, thread.regs.iaoq[1]);
-	offset("#define TASK_PT_CR24    ", struct task_struct, thread.regs.cr24);
-	offset("#define TASK_PT_CR25    ", struct task_struct, thread.regs.cr25);
-	offset("#define TASK_PT_CR26    ", struct task_struct, thread.regs.cr26);
-	offset("#define TASK_PT_CR27    ", struct task_struct, thread.regs.cr27);
-	offset("#define TASK_PT_CR30    ", struct task_struct, thread.regs.cr30);
-	offset("#define TASK_PT_ORIG_R28 ", struct task_struct, thread.regs.orig_r28);
-	offset("#define TASK_PT_KSP     ", struct task_struct, thread.regs.ksp);
-	offset("#define TASK_PT_KPC     ", struct task_struct, thread.regs.kpc);
-	offset("#define TASK_PT_SAR     ", struct task_struct, thread.regs.sar);
-	offset("#define TASK_PT_CR11    ", struct task_struct, thread.regs.sar);
-	offset("#define TASK_PT_IIR     ", struct task_struct, thread.regs.iir);
-	offset("#define TASK_PT_ISR     ", struct task_struct, thread.regs.isr);
-	offset("#define TASK_PT_IOR     ", struct task_struct, thread.regs.ior);
-	offset("#define TASK_PT_CR_PID0 ", struct task_struct, thread.regs.cr_pid[0]);
-	offset("#define TASK_PT_CR_PID1 ", struct task_struct, thread.regs.cr_pid[1]);
-	offset("#define TASK_PT_CR_PID2 ", struct task_struct, thread.regs.cr_pid[2]);
-	offset("#define TASK_PT_CR_PID3 ", struct task_struct, thread.regs.cr_pid[3]);
-	size("#define TASK_SZ      ", struct task_struct);
-	size_align("#define TASK_SZ_ALGN  ", struct task_struct, 64);
-	linefeed;
-}
-
-void output_ptreg_defines(void)
-{
-	text("/* PA-RISC pt_regs offsets. */");
-	offset("#define PT_PSW     ", struct pt_regs, gr[ 0]);
-	offset("#define PT_GR1     ", struct pt_regs, gr[ 1]);
-	offset("#define PT_GR2     ", struct pt_regs, gr[ 2]);
-	offset("#define PT_GR3     ", struct pt_regs, gr[ 3]);
-	offset("#define PT_GR4     ", struct pt_regs, gr[ 4]);
-	offset("#define PT_GR5     ", struct pt_regs, gr[ 5]);
-	offset("#define PT_GR6     ", struct pt_regs, gr[ 6]);
-	offset("#define PT_GR7     ", struct pt_regs, gr[ 7]);
-	offset("#define PT_GR8     ", struct pt_regs, gr[ 8]);
-	offset("#define PT_GR9     ", struct pt_regs, gr[ 9]);
-	offset("#define PT_GR10    ", struct pt_regs, gr[10]);
-	offset("#define PT_GR11    ", struct pt_regs, gr[11]);
-	offset("#define PT_GR12    ", struct pt_regs, gr[12]);
-	offset("#define PT_GR13    ", struct pt_regs, gr[13]);
-	offset("#define PT_GR14    ", struct pt_regs, gr[14]);
-	offset("#define PT_GR15    ", struct pt_regs, gr[15]);
-	offset("#define PT_GR16    ", struct pt_regs, gr[16]);
-	offset("#define PT_GR17    ", struct pt_regs, gr[17]);
-	offset("#define PT_GR18    ", struct pt_regs, gr[18]);
-	offset("#define PT_GR19    ", struct pt_regs, gr[19]);
-	offset("#define PT_GR20    ", struct pt_regs, gr[20]);
-	offset("#define PT_GR21    ", struct pt_regs, gr[21]);
-	offset("#define PT_GR22    ", struct pt_regs, gr[22]);
-	offset("#define PT_GR23    ", struct pt_regs, gr[23]);
-	offset("#define PT_GR24    ", struct pt_regs, gr[24]);
-	offset("#define PT_GR25    ", struct pt_regs, gr[25]);
-	offset("#define PT_GR26    ", struct pt_regs, gr[26]);
-	offset("#define PT_GR27    ", struct pt_regs, gr[27]);
-	offset("#define PT_GR28    ", struct pt_regs, gr[28]);
-	offset("#define PT_GR29    ", struct pt_regs, gr[29]);
-	offset("#define PT_GR30    ", struct pt_regs, gr[30]);
-	offset("#define PT_GR31    ", struct pt_regs, gr[31]);
-	offset("#define PT_FR0     ", struct pt_regs, fr[ 0]);
-	offset("#define PT_FR1     ", struct pt_regs, fr[ 1]);
-	offset("#define PT_FR2     ", struct pt_regs, fr[ 2]);
-	offset("#define PT_FR3     ", struct pt_regs, fr[ 3]);
-	offset("#define PT_FR4     ", struct pt_regs, fr[ 4]);
-	offset("#define PT_FR5     ", struct pt_regs, fr[ 5]);
-	offset("#define PT_FR6     ", struct pt_regs, fr[ 6]);
-	offset("#define PT_FR7     ", struct pt_regs, fr[ 7]);
-	offset("#define PT_FR8     ", struct pt_regs, fr[ 8]);
-	offset("#define PT_FR9     ", struct pt_regs, fr[ 9]);
-	offset("#define PT_FR10    ", struct pt_regs, fr[10]);
-	offset("#define PT_FR11    ", struct pt_regs, fr[11]);
-	offset("#define PT_FR12    ", struct pt_regs, fr[12]);
-	offset("#define PT_FR13    ", struct pt_regs, fr[13]);
-	offset("#define PT_FR14    ", struct pt_regs, fr[14]);
-	offset("#define PT_FR15    ", struct pt_regs, fr[15]);
-	offset("#define PT_FR16    ", struct pt_regs, fr[16]);
-	offset("#define PT_FR17    ", struct pt_regs, fr[17]);
-	offset("#define PT_FR18    ", struct pt_regs, fr[18]);
-	offset("#define PT_FR19    ", struct pt_regs, fr[19]);
-	offset("#define PT_FR20    ", struct pt_regs, fr[20]);
-	offset("#define PT_FR21    ", struct pt_regs, fr[21]);
-	offset("#define PT_FR22    ", struct pt_regs, fr[22]);
-	offset("#define PT_FR23    ", struct pt_regs, fr[23]);
-	offset("#define PT_FR24    ", struct pt_regs, fr[24]);
-	offset("#define PT_FR25    ", struct pt_regs, fr[25]);
-	offset("#define PT_FR26    ", struct pt_regs, fr[26]);
-	offset("#define PT_FR27    ", struct pt_regs, fr[27]);
-	offset("#define PT_FR28    ", struct pt_regs, fr[28]);
-	offset("#define PT_FR29    ", struct pt_regs, fr[29]);
-	offset("#define PT_FR30    ", struct pt_regs, fr[30]);
-	offset("#define PT_FR31    ", struct pt_regs, fr[31]);
-	offset("#define PT_SR0     ", struct pt_regs, sr[ 0]);
-	offset("#define PT_SR1     ", struct pt_regs, sr[ 1]);
-	offset("#define PT_SR2     ", struct pt_regs, sr[ 2]);
-	offset("#define PT_SR3     ", struct pt_regs, sr[ 3]);
-	offset("#define PT_SR4     ", struct pt_regs, sr[ 4]);
-	offset("#define PT_SR5     ", struct pt_regs, sr[ 5]);
-	offset("#define PT_SR6     ", struct pt_regs, sr[ 6]);
-	offset("#define PT_SR7     ", struct pt_regs, sr[ 7]);
-	offset("#define PT_IASQ0   ", struct pt_regs, iasq[0]);
-	offset("#define PT_IASQ1   ", struct pt_regs, iasq[1]);
-	offset("#define PT_IAOQ0   ", struct pt_regs, iaoq[0]);
-	offset("#define PT_IAOQ1   ", struct pt_regs, iaoq[1]);
-	offset("#define PT_CR24    ", struct pt_regs, cr24);
-	offset("#define PT_CR25    ", struct pt_regs, cr25);
-	offset("#define PT_CR26    ", struct pt_regs, cr26);
-	offset("#define PT_CR27    ", struct pt_regs, cr27);
-	offset("#define PT_CR30    ", struct pt_regs, cr30);
-	offset("#define PT_ORIG_R28 ", struct pt_regs, orig_r28);
-	offset("#define PT_KSP     ", struct pt_regs, ksp);
-	offset("#define PT_KPC     ", struct pt_regs, kpc);
-	offset("#define PT_SAR     ", struct pt_regs, sar);
-	offset("#define PT_CR11    ", struct pt_regs, sar);
-	offset("#define PT_IIR     ", struct pt_regs, iir);
-	offset("#define PT_ISR     ", struct pt_regs, isr);
-	offset("#define PT_IOR     ", struct pt_regs, ior);
-	offset("#define PT_CR_PID0 ", struct pt_regs, cr_pid[0]);
-	offset("#define PT_CR_PID1 ", struct pt_regs, cr_pid[1]);
-	offset("#define PT_CR_PID2 ", struct pt_regs, cr_pid[2]);
-	offset("#define PT_CR_PID3 ", struct pt_regs, cr_pid[3]);
-	size("#define PT_SIZE    ", struct pt_regs);
-	size_align("#define PT_SZ_ALGN  ", struct pt_regs, 64);
-	linefeed;
-}
-
-void output_task_defines(void)
-{
-	text("/* PARISC task_struct offsets. */");
-	offset("#define TASK_STATE         ", struct task_struct, state);
-	offset("#define TASK_FLAGS         ", struct task_struct, flags);
-#error	offset("#define TASK_SIGPENDING    ", struct task_struct, sigpending);
-	offset("#define TASK_SEGMENT       ", struct task_struct, addr_limit);
-#error	offset("#define TASK_NEED_RESCHED  ", struct task_struct, need_resched);
-	offset("#define TASK_COUNTER       ", struct task_struct, counter);
-#error	offset("#define TASK_PTRACE        ", struct task_struct, ptrace);
-	offset("#define TASK_NICE          ", struct task_struct, nice);
-	offset("#define TASK_MM            ", struct task_struct, mm);
-	offset("#define TASK_PROCESSOR     ", struct task_struct, processor);
-	size  ("#define TASK_SZ          ", struct task_struct);
-	size_align("#define TASK_SZ_ALGN       ", struct task_struct, 64);
-	linefeed;
-}
-
-void output_irq_stat_defines(void)
-{
-	text("/* PARISC irq_cpustat_t offsets. */");
-	offset("#define IRQSTAT_SI_ACTIVE  ", irq_cpustat_t, __softirq_active);
-	offset("#define IRQSTAT_SI_MASK    ", irq_cpustat_t, __softirq_mask);
-	size  ("#define IRQSTAT_SZ         ", irq_cpustat_t);
-	linefeed;
-}
-
-#ifdef PRUMPF_HAD_MORE_TIME
-void output_thread_defines(void)
-{
-	text("/* PARISC specific thread_struct offsets. */");
-	offset("#define THREAD_REG16   ", struct task_struct, thread.reg16);
-	offset("#define THREAD_REG17   ", struct task_struct, thread.reg17);
-	offset("#define THREAD_REG18   ", struct task_struct, thread.reg18);
-	offset("#define THREAD_REG19   ", struct task_struct, thread.reg19);
-	offset("#define THREAD_REG20   ", struct task_struct, thread.reg20);
-	offset("#define THREAD_REG21   ", struct task_struct, thread.reg21);
-	offset("#define THREAD_REG22   ", struct task_struct, thread.reg22);
-	offset("#define THREAD_REG23   ", struct task_struct, thread.reg23);
-	offset("#define THREAD_REG29   ", struct task_struct, thread.reg29);
-	offset("#define THREAD_REG30   ", struct task_struct, thread.reg30);
-	offset("#define THREAD_REG31   ", struct task_struct, thread.reg31);
-	offset("#define THREAD_STATUS  ", struct task_struct, thread.cp0_status);
-	offset("#define THREAD_FPU     ", struct task_struct, thread.fpu);
-	offset("#define THREAD_BVADDR  ", struct task_struct, thread.cp0_badvaddr);
-	offset("#define THREAD_BUADDR  ", struct task_struct, thread.cp0_baduaddr);
-	offset("#define THREAD_ECODE   ", struct task_struct, thread.error_code);
-	offset("#define THREAD_TRAPNO  ", struct task_struct, thread.trap_no);
-	offset("#define THREAD_PGDIR   ", struct task_struct, thread.pg_dir);
-	offset("#define THREAD_MFLAGS  ", struct task_struct, thread.mflags);
-	offset("#define THREAD_CURDS   ", struct task_struct, thread.current_ds);
-	offset("#define THREAD_TRAMP   ", struct task_struct, thread.irix_trampoline);
-	offset("#define THREAD_OLDCTX  ", struct task_struct, thread.irix_oldctx);
-	linefeed;
-}
-
-void output_mm_defines(void)
-{
-	text("/* Linux mm_struct offsets. */");
-	offset("#define MM_COUNT      ", struct mm_struct, count);
-	offset("#define MM_PGD        ", struct mm_struct, pgd);
-	offset("#define MM_CONTEXT    ", struct mm_struct, context);
-	linefeed;
-}
-
-void output_sc_defines(void)
-{
-	text("/* Linux sigcontext offsets. */");
-	offset("#define SC_REGMASK    ", struct sigcontext, sc_regmask);
-	offset("#define SC_STATUS     ", struct sigcontext, sc_status);
-	offset("#define SC_PC         ", struct sigcontext, sc_pc);
-	offset("#define SC_REGS       ", struct sigcontext, sc_regs);
-	offset("#define SC_FPREGS     ", struct sigcontext, sc_fpregs);
-	offset("#define SC_OWNEDFP    ", struct sigcontext, sc_ownedfp);
-	offset("#define SC_FPC_CSR    ", struct sigcontext, sc_fpc_csr);
-	offset("#define SC_FPC_EIR    ", struct sigcontext, sc_fpc_eir);
-	offset("#define SC_SSFLAGS    ", struct sigcontext, sc_ssflags);
-	offset("#define SC_MDHI       ", struct sigcontext, sc_mdhi);
-	offset("#define SC_MDLO       ", struct sigcontext, sc_mdlo);
-	offset("#define SC_CAUSE      ", struct sigcontext, sc_cause);
-	offset("#define SC_BADVADDR   ", struct sigcontext, sc_badvaddr);
-	offset("#define SC_SIGSET     ", struct sigcontext, sc_sigset);
-	linefeed;
-}
-
-#endif
-
-text("#endif /* !(_PARISC_OFFSET_H) */");
diff -Nru a/arch/parisc/vmlinux.lds.S b/arch/parisc/vmlinux.lds.S
--- a/arch/parisc/vmlinux.lds.S	Wed Oct 30 16:44:24 2002
+++ b/arch/parisc/vmlinux.lds.S	Wed Oct 30 16:44:24 2002
@@ -1,17 +1,24 @@
+#include <linux/config.h>
+
 /* ld script to make hppa Linux kernel */
-OUTPUT_FORMAT("elf32-hppa")
+#ifndef CONFIG_PARISC64
+OUTPUT_FORMAT("elf32-hppa-linux")
 OUTPUT_ARCH(hppa)
+#else
+OUTPUT_FORMAT("elf64-hppa-linux")
+OUTPUT_ARCH(hppa:hppa2.0w)
+#endif
+
 ENTRY(_stext)
+#ifndef CONFIG_PARISC64
 jiffies = jiffies_64 + 4;
+#else
+jiffies = jiffies_64;
+#endif
 SECTIONS
 {
 
-/* right now use 0x10000/0x11000, later when we don't use Console and
- * Boot-Device IODC, we will change this to 0x8000 !!!
- */
-
-  . = 0xc0100000;   
-/*	. = 0x10000;  */
+  . = 0x10100000;
 
   _text = .;			/* Text and read-only data */
   .text BLOCK(16) : {
@@ -22,12 +29,12 @@
 	*(.gnu.warning)
 	} = 0
 
+  _etext = .;			/* End of text section */
+
   . = ALIGN(16);
   .rodata : { *(.rodata) *(.rodata.*) }
   .kstrtab : { *(.kstrtab) }
 
-  _etext = .;			/* End of text section */
-  
   .data BLOCK(8192) : {			/* Data without special */
 	data_start = .;
 	*(.data)
@@ -42,6 +49,16 @@
   __ksymtab : { *(__ksymtab) }
   __stop___ksymtab = .;
 
+  __start___kallsyms = .;       /* All kernel symbols */
+  __kallsyms : { *(__kallsyms) }
+  __stop___kallsyms = .;
+
+#ifdef CONFIG_PARISC64
+  . = ALIGN(16);               /* Linkage tables */
+  .opd : { *(.opd) } PROVIDE (__gp = .); 
+  .plt : { *(.plt) } 
+  .dlt : { *(.dlt) }
+#endif
 
   . = ALIGN(16384);
   __init_begin = .;
@@ -49,7 +66,7 @@
   .init.data : { *(.init.data) }
   . = ALIGN(16);
   __setup_start = .;
-  .setup.init : { *(.setup.init) }
+  .init.setup : { *(.init.setup) }
   __setup_end = .;
   __initcall_start = .;
   .initcall.init : {
@@ -62,9 +79,13 @@
 	*(.initcall7.init)
   }
   __initcall_end = .;
+  . = ALIGN(32);
+  __per_cpu_start = .;
+  .data.percpu  : { *(.data.percpu) }
+  __per_cpu_end = .;
+  . = ALIGN(4096);
   __init_end = .;
 
-
   init_task BLOCK(16384) : { *(init_task) }  /* The initial task and kernel stack */
 
   _edata = .;			/* End of data section */
@@ -84,5 +105,15 @@
   .stab.indexstr 0 : { *(.stab.indexstr) }
   .comment 0 : { *(.comment) }
   .note 0 : { *(.note) }	
-	
+
+#ifdef CONFIG_PARISC64
+  /* temporary hack until binutils is fixed to not emit these
+     for static binaries */
+  /DISCARD/ : {
+    *(.dynsym)
+    *(.dynstr)
+    *(.dynamic)
+    *(.hash)
+  }
+#endif
 }
diff -Nru a/arch/ppc/8260_io/Config.help b/arch/ppc/8260_io/Config.help
--- a/arch/ppc/8260_io/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-CONFIG_FEC_ENET
-  Enable Ethernet support via the Fast Ethernet Controller (FCC) on
-  the Motorola MPC8260.
-
-CONFIG_FCC1_ENET
-  Use MPC8260 fast Ethernet controller 1 to drive Ethernet (default).
-
-CONFIG_FCC2_ENET
-  Use MPC8260 fast Ethernet controller 2 to drive Ethernet.
-
-CONFIG_FCC3_ENET
-  Use MPC8260 fast Ethernet controller 3 to drive Ethernet.
-
-CONFIG_SCC_ENET
-  Enable Ethernet support via the Motorola MPC8xx serial
-  commmunications controller.
-
-CONFIG_SCC1_ENET
-  Use MPC8xx serial communications controller 1 to drive Ethernet
-  (default).
-
-CONFIG_SCC2_ENET
-  Use MPC8xx serial communications controller 2 to drive Ethernet.
-
-CONFIG_DCACHE_DISABLE
-  This option allows you to run the kernel with data cache disabled.
-  Say Y if you experience CPM lock-ups.
diff -Nru a/arch/ppc/8260_io/Config.in b/arch/ppc/8260_io/Config.in
--- a/arch/ppc/8260_io/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,36 +0,0 @@
-#
-# MPC8260 Communication options
-#
-mainmenu_option next_comment
-comment 'MPC8260 CPM Options'
-bool 'Enable SCC Console' CONFIG_SCC_CONSOLE
-if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
-  if [ "$CONFIG_SCC_ENET" = "y" ]; then
-  bool 'Ethernet on SCC1' CONFIG_SCC1_ENET
-    if [ "$CONFIG_SCC1_ENET" != "y" ]; then
-      bool 'Ethernet on SCC2' CONFIG_SCC2_ENET
-    fi
-  fi
-#
-#  CONFIG_FEC_ENET is only used to get netdevices to call our init
-#    function.  Any combination of FCC1,2,3 are supported.
-#
-  bool 'FCC Ethernet' CONFIG_FEC_ENET
-  if [ "$CONFIG_FEC_ENET" = "y" ]; then
-    bool 'Ethernet on FCC1' CONFIG_FCC1_ENET
-    bool 'Ethernet on FCC2' CONFIG_FCC2_ENET
-    bool 'Ethernet on FCC3' CONFIG_FCC3_ENET
-    bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO
-    if [ "$CONFIG_USE_MDIO" = "y" ]; then
-      choice 'Type of PHY'	\
-	"LXT970		CONFIG_FCC_LXT970	\
-	 LXT971		CONFIG_FCC_LXT971	\
-	 QS6612		CONFIG_FCC_QS6612"	LXT971
-      fi
-  fi
-fi
-
-comment 'Generic MPC8260 Options'
-bool 'Disable data cache' CONFIG_DCACHE_DISABLE
-endmenu
diff -Nru a/arch/ppc/8260_io/Kconfig b/arch/ppc/8260_io/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/8260_io/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,70 @@
+#
+# MPC8260 Communication options
+#
+
+menu "MPC8260 CPM Options"
+	depends on 8260
+
+config SCC_CONSOLE
+	bool "Enable SCC Console"
+
+config SCC_ENET
+	bool "CPM SCC Ethernet"
+	depends on NET_ETHERNET
+
+#
+#  CONFIG_FEC_ENET is only used to get netdevices to call our init
+#    function.  Any combination of FCC1,2,3 are supported.
+#
+config FEC_ENET
+	bool "FCC Ethernet"
+	depends on NET_ETHERNET
+
+config FCC1_ENET
+	bool "Ethernet on FCC1"
+	depends on FEC_ENET
+	help
+	  Use MPC8260 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.
+
+config FCC3_ENET
+	bool "Ethernet on FCC3"
+	depends on FEC_ENET
+	help
+	  Use MPC8260 fast Ethernet controller 3 to drive Ethernet.
+
+config USE_MDIO
+	bool "Use MDIO for PHY configuration"
+	depends on FEC_ENET
+
+choice
+	prompt "Type of PHY"
+	depends on 8260 && USE_MDIO
+	default FCC_LXT971
+
+config FCC_LXT970
+	bool "LXT970"
+
+config FCC_LXT971
+	bool "LXT971"
+
+config FCC_QS6612
+	bool "QS6612"
+
+endchoice
+
+comment "Generic MPC8260 Options"
+
+config DCACHE_DISABLE
+	bool "Disable data cache"
+	help
+	  This option allows you to run the kernel with data cache disabled.
+	  Say Y if you experience CPM lock-ups.
+
+endmenu
+
diff -Nru a/arch/ppc/8xx_io/Config.help b/arch/ppc/8xx_io/Config.help
--- a/arch/ppc/8xx_io/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,72 +0,0 @@
-CONFIG_USE_MDIO
-  On some boards the hardware configuration of the ethernet PHY can be
-  used without any software interaction over the MDIO interface, so
-  all MII code can be omitted. Say N here if unsure or if you don't
-  need link status reports.
-
-CONFIG_FEC_ENET
-  Enable Ethernet support via the Fast Ethernet Controller (FCC) on
-  the Motorola MPC8260.
-
-CONFIG_SCC_ENET
-  Enable Ethernet support via the Motorola MPC8xx serial
-  commmunications controller.
-
-CONFIG_SCC1_ENET
-  Use MPC8xx serial communications controller 1 to drive Ethernet
-  (default).
-
-CONFIG_SCC2_ENET
-  Use MPC8xx serial communications controller 2 to drive Ethernet.
-
-CONFIG_SCC3_ENET
-  Use MPC8xx serial communications controller 3 to drive Ethernet.
-
-CONFIG_ENET_BIG_BUFFERS
-  Allocate large buffers for MPC8xx Etherenet.  Increases throughput
-  and decreases the likelihood of dropped packets, but costs memory.
-
-CONFIG_8xx_COPYBACK
-  Saying Y here will cause the cache on an MPC8xx processor to be used
-  in Copy-Back mode.  If you say N here, it is used in Writethrough
-  mode.
-
-  If in doubt, say Y here.
-
-CONFIG_8xx_CPU6
-  MPC860 CPUs, prior to Rev C have some bugs in the silicon, which
-  require workarounds for Linux (and most other OSes to work).  If you
-  get a BUG() very early in boot, this might fix the problem.  For
-  more details read the document entitled "MPC860 Family Device Errata
-  Reference" on Motorola's website.  This option also incurs a
-  performance hit.
-
-  If in doubt, say N here.
-
-CONFIG_SMC2_UART
-  If you would like to use SMC2 as a serial port, say Y here.
-
-  If in doubt, say Y here.
-
-CONFIG_CONS_SMC2
-  If you are going to have a serial console on your device and are
-  using SMC2 for your serial port, say Y here, else say N.
-
-CONFIG_ALTSMC2
-  If you have an MPC823 or MPC850 and would like to use the alternate
-  SMC2 for I/O, say Y here.
-
-  If in doubt, say N here.
-
-CONFIG_USE_SCC_IO
-  If your MPC8xx board has other SCC ports that you would like to use
-  for for a serial port, say Y here.
-
-  If in doubt, say N here.
-
-CONFIG_UCODE_PATCH
-  Motorola releases microcode updates for their 8xx CPM modules.  The
-  microcode update file has updates for IIC, SMC and USB.  Currently only
-  the USB update is available by default, if the MPC8xx USB option is
-  enabled.  If in doubt, say 'N' here.
-
diff -Nru a/arch/ppc/8xx_io/Config.in b/arch/ppc/8xx_io/Config.in
--- a/arch/ppc/8xx_io/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,40 +0,0 @@
-#
-# MPC8xx Communication options
-#
-mainmenu_option next_comment
-comment 'MPC8xx CPM Options'
-
-if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
-  if [ "$CONFIG_SCC_ENET" = "y" ]; then
-    choice 'SCC used for Ethernet'	\
-  	"SCC1	CONFIG_SCC1_ENET	\
-	 SCC2	CONFIG_SCC2_ENET	\
-	 SCC3	CONFIG_SCC3_ENET"	SCC1
-  fi
-  bool '860T FEC Ethernet' CONFIG_FEC_ENET
-  if [ "$CONFIG_FEC_ENET" = "y" ]; then
-    bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO
-  fi
-  bool 'Use Big CPM Ethernet Buffers' CONFIG_ENET_BIG_BUFFERS
-fi
-bool 'Use SMC2 for UART' CONFIG_SMC2_UART
-if [ "$CONFIG_SMC2_UART" = "y" ]; then
-  bool 'Use Alternate SMC2 I/O (823/850)' CONFIG_ALTSMC2
-  bool 'Use SMC2 for Console' CONFIG_CONS_SMC2
-fi
-bool 'Enable SCC2 and SCC3 for UART' CONFIG_USE_SCC_IO
-
-if [ "$CONFIG_SOUND" = "y" ]; then
-	bool 'Embedded Planet HIOX Audio' CONFIG_HTDMSOUND
-fi
-
-# This doesn't really belong here, but it is convenient to ask
-# 8xx specific questions.
-
-comment 'Generic MPC8xx Options'
-bool 'Copy-Back Data Cache (else Writethrough)' CONFIG_8xx_COPYBACK
-bool 'CPU6 Silicon Errata (860 Pre Rev. C)' CONFIG_8xx_CPU6
-bool 'I2C/SPI Microcode Patch' CONFIG_UCODE_PATCH
-
-endmenu
diff -Nru a/arch/ppc/8xx_io/Kconfig b/arch/ppc/8xx_io/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/8xx_io/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,130 @@
+#
+# MPC8xx Communication options
+#
+
+menu "MPC8xx CPM Options"
+	depends on 8xx
+
+config SCC_ENET
+	bool "CPM SCC Ethernet"
+	depends on NET_ETHERNET
+	help
+	  Enable Ethernet support via the Motorola MPC8xx serial
+	  commmunications controller.
+
+choice
+	prompt "SCC used for Ethernet"
+	depends on SCC_ENET
+	default SCC1_ENET
+
+config SCC1_ENET
+	bool "SCC1"
+	help
+	  Use MPC8xx serial communications controller 1 to drive Ethernet
+	  (default).
+
+config SCC2_ENET
+	bool "SCC2"
+	help
+	  Use MPC8xx serial communications controller 2 to drive Ethernet.
+
+config SCC3_ENET
+	bool "SCC3"
+	help
+	  Use MPC8xx serial communications controller 3 to drive Ethernet.
+
+endchoice
+
+config FEC_ENET
+	bool "860T FEC Ethernet"
+	depends on NET_ETHERNET
+	help
+	  Enable Ethernet support via the Fast Ethernet Controller (FCC) on
+	  the Motorola MPC8260.
+
+config USE_MDIO
+	bool "Use MDIO for PHY configuration"
+	depends on FEC_ENET
+	help
+	  On some boards the hardware configuration of the ethernet PHY can be
+	  used without any software interaction over the MDIO interface, so
+	  all MII code can be omitted. Say N here if unsure or if you don't
+	  need link status reports.
+
+config ENET_BIG_BUFFERS
+	bool "Use Big CPM Ethernet Buffers"
+	depends on NET_ETHERNET
+	help
+	  Allocate large buffers for MPC8xx Etherenet.  Increases throughput
+	  and decreases the likelihood of dropped packets, but costs memory.
+
+config SMC2_UART
+	bool "Use SMC2 for UART"
+	help
+	  If you would like to use SMC2 as a serial port, say Y here.
+
+	  If in doubt, say Y here.
+
+config ALTSMC2
+	bool "Use Alternate SMC2 I/O (823/850)"
+	depends on SMC2_UART
+	help
+	  If you have an MPC823 or MPC850 and would like to use the alternate
+	  SMC2 for I/O, say Y here.
+
+	  If in doubt, say N here.
+
+config CONS_SMC2
+	bool "Use SMC2 for Console"
+	depends on SMC2_UART
+	help
+	  If you are going to have a serial console on your device and are
+	  using SMC2 for your serial port, say Y here, else say N.
+
+config USE_SCC_IO
+	bool "Enable SCC2 and SCC3 for UART"
+	help
+	  If your MPC8xx board has other SCC ports that you would like to use
+	  for for a serial port, say Y here.
+
+	  If in doubt, say N here.
+
+config HTDMSOUND
+	bool "Embedded Planet HIOX Audio"
+	depends on SOUND=y
+
+# This doesn't really belong here, but it is convenient to ask
+# 8xx specific questions.
+comment "Generic MPC8xx Options"
+
+config 8xx_COPYBACK
+	bool "Copy-Back Data Cache (else Writethrough)"
+	help
+	  Saying Y here will cause the cache on an MPC8xx processor to be used
+	  in Copy-Back mode.  If you say N here, it is used in Writethrough
+	  mode.
+
+	  If in doubt, say Y here.
+
+config 8xx_CPU6
+	bool "CPU6 Silicon Errata (860 Pre Rev. C)"
+	help
+	  MPC860 CPUs, prior to Rev C have some bugs in the silicon, which
+	  require workarounds for Linux (and most other OSes to work).  If you
+	  get a BUG() very early in boot, this might fix the problem.  For
+	  more details read the document entitled "MPC860 Family Device Errata
+	  Reference" on Motorola's website.  This option also incurs a
+	  performance hit.
+
+	  If in doubt, say N here.
+
+config UCODE_PATCH
+	bool "I2C/SPI Microcode Patch"
+	help
+	  Motorola releases microcode updates for their 8xx CPM modules.  The
+	  microcode update file has updates for IIC, SMC and USB.  Currently only
+	  the USB update is available by default, if the MPC8xx USB option is
+	  enabled.  If in doubt, say 'N' here.
+
+endmenu
+
diff -Nru a/arch/ppc/Config.help b/arch/ppc/Config.help
--- a/arch/ppc/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1000 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, say N. If you have a system with more
-  than one CPU, say Y.  Note that the kernel does not currently
-  support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
-  since they have inadequate hardware support for multiprocessor
-  operation.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on single-processor machines.
-  On a single-processor machine, the kernel will run faster if you say
-  N here.
-
-  If you don't know what to do here, say N.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  Unfortunately the kernel code has some race conditions if both
-  CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
-  currently disabled if you are building an SMP kernel.
-
-  Say Y here if you are building a kernel for a desktop, embedded
-  or real-time system.  Say N if you are unsure.
-
-CONFIG_PPC
-  The PowerPC is a modern RISC architecture descended from the POWER
-  architecture designed by IBM.  The PowerPC architecture is designed
-  to allow high-speed implementations which can execute several
-  instructions in each clock cycle.  IBM and Motorola design and
-  manufacture PowerPC processors aimed at embedded, desktop and server
-  applications.  PowerPC chips are used in Apple Power Macintoshes
-  (including iMacs, iBooks and PowerBooks), in IBM pSeries (RS/6000)
-  and iSeries (AS/400) machines, and in a broad range of embedded
-  applications.  The Linux PowerPC port has a home page at
-  <http://penguinppc.org/intro.shtml>.
-
-CONFIG_MATH_EMULATION
-  Some PowerPC chips designed for embedded applications do not have 
-  a floating-point unit and therefore do not implement the
-  floating-point instructions in the PowerPC instruction set.  If you
-  say Y here, the kernel will include code to emulate a floating-point
-  unit, which will allow programs that use floating-point
-  instructions to run.
-
-  If you have an Apple machine or an IBM RS/6000 or pSeries machine,
-  or any machine with a 6xx, 7xx or 7xxx series processor, say N
-  here.  Saying Y here will not hurt performance (on any machine) but
-  will increase the size of the kernel.
-
-CONFIG_MAC_FLOPPY
-  If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple)
-  floppy controller, say Y here. Most commonly found in PowerMacs.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984.  Quite a number of
-  disks use the IDE interface.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_HEARTBEAT
-  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_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA is the
-  name of a bus system, i.e. the way the CPU talks to the other stuff
-  inside your box.  If you have an Apple machine, say N here; if you
-  have an IBM RS/6000 or pSeries machine or a PReP machine, say Y.  If
-  you have an embedded board, consult your board documentation.
-
-CONFIG_PCI
-  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
-  your box.  If you say Y here, the kernel will include drivers and
-  infrastructure code to support PCI bus devices.
-
-CONFIG_PCI_QSPAN
-  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_MCA
-  MicroChannel Architecture is found in some older IBM RS/6000
-  machines.  It is a bus system similar to PCI or ISA.  MCA-based
-  RS/6000 machines are currently not supported by Linux.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus is a bus
-  architecture used on some older intel-based PCs.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image in ELF format. This
-  can be used in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp.  It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>).  Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard.  This can be
-  useful on PReP systems and IBM RS/6000 or pSeries machines but is of
-  limited usefulness on Apple machines.
-
-  Say N here if you have an Apple machine.
-
-CONFIG_IRQ_ALL_CPUS
-  This option gives the kernel permission to distribute IRQs across
-  multiple CPUs.  Saying N here will route all IRQs to the first
-  CPU.  Generally saying Y is safe, although some problems have been
-  reported with SMP Power Macintoshes with this option enabled.
-
-CONFIG_FB
-  The frame buffer device provides an abstraction for the graphics
-  hardware. It represents the frame buffer of some video hardware and
-  allows application software to access the graphics hardware through
-  a well-defined interface, so the software doesn't need to know
-  anything about the low-level (hardware register) stuff.
-
-  Frame buffer devices work identically across the different
-  architectures supported by Linux and make the implementation of
-  application programs easier and more portable; at this point, an X
-  server exists which uses the frame buffer device exclusively.
-  On several non-X86 architectures, the frame buffer device is the
-  only way to use the graphics hardware.
-
-  The device is accessed through special device nodes, usually located
-  in the /dev directory, i.e. /dev/fb*.
-
-  You need an utility program called fbset to make full use of frame
-  buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
-  and the Framebuffer-HOWTO at
-  <http://www.tahallah.demon.co.uk/programming/prog.html> for more
-  information.
-
-  Saying Y here is recommended if your machine has graphics hardware,
-  and strongly recommended if you are compiling a kernel for an Apple
-  machine.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_PREP_RESIDUAL
-  Some PReP systems have residual data passed to the kernel by the
-  firmware.  This allows detection of memory size, devices present and
-  other useful pieces of information.  Sometimes this information is
-  not present or incorrect.
-
-  Unless you expect to boot on a PReP system, there is no need to
-  select Y.
-
-PReP residual data available in /proc/residual
-CONFIG_PROC_PREPRESIDUAL
-  Enabling this option will create a /proc/residual file which allows
-  you to get at the residual data on PReP systems.  You will need a tool
-  (lsresidual) to parse it.  If you aren't on a PReP system, you don't
-  want this.
-
-CONFIG_ADB
-  Apple Desktop Bus (ADB) support is for support of devices which
-  are connected to an ADB port.  ADB devices tend to have 4 pins.
-  If you have an Apple Macintosh prior to the iMac, an iBook or
-  PowerBook, or a "Blue and White G3", you probably want to say Y
-  here.  Otherwise say N.
-
-CONFIG_ADB_CUDA
-  This provides support for CUDA based Power Macintosh systems.  This
-  includes most OldWorld PowerMacs, the first generation iMacs, the
-  Blue&White G3 and the "Yikes" G4 (PCI Graphics).  All later models
-  should use CONFIG_ADB_PMU instead.  It is safe to say Y here even if
-  your machine doesn't have a CUDA.
-
-  If unsure say Y.
-
-CONFIG_ADB_PMU
-  On PowerBooks, iBooks, and recent iMacs and Power Macintoshes, the
-  PMU is an embedded microprocessor whose primary function is to
-  control system power, and battery charging on the portable models.
-  The PMU also controls the ADB (Apple Desktop Bus) which connects to
-  the keyboard and mouse on some machines, as well as the non-volatile
-  RAM and the RTC (real time clock) chip.  Say Y to enable support for
-  this device; you should do so if your machine is one of those
-  mentioned above.
-
-CONFIG_ADB_MACIO
-  Say Y here to include direct support for the ADB controller in the
-  Hydra chip used on PowerPC Macintoshes of the CHRP type.  (The Hydra
-  also includes a MESH II SCSI controller, DBDMA controller, VIA chip,
-  OpenPIC controller and two RS422/Geoports.)
-
-CONFIG_INPUT_ADBHID
-  Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
-  such as keyboards, mice, joysticks, trackpads  or graphic tablets
-  handled by the input layer.  If you say Y here, make sure to say Y to
-  the corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
-  "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
-  support" (CONFIG_INPUT_EVDEV) as well.
-
-  If unsure, say Y.
-
-CONFIG_MAC_EMUMOUSEBTN
-  This provides generic support for emulating the 2nd and 3rd mouse
-  button with keypresses.  If you say Y here, the emulation is still
-  disabled by default.  The emulation is controlled by these sysctl
-  entries:
-      /proc/sys/dev/mac_hid/mouse_button_emulation
-      /proc/sys/dev/mac_hid/mouse_button2_keycode
-      /proc/sys/dev/mac_hid/mouse_button3_keycode
-
-  If you have an Apple machine with a 1-button mouse, say Y here.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a graphics card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_MAC_SERIAL
-  If you have Macintosh style serial ports (8 pin mini-DIN), say Y
-  here. If you also have regular serial ports and enable the driver
-  for them, you can't currently use the serial console feature.
-
-CONFIG_BUSMOUSE
-  Say Y here if your machine has a bus mouse as opposed to a serial,
-  PS/2 or USB mouse.  Say Y here if you have an Apple machine with an
-  ADB mouse and you are not using the input layer (that is,
-  CONFIG_INPUT_ADBHID is N), or if you have a PC-style mouse interface
-  card plugged into your PCI or ISA bus.  Otherwise say N.
-
-  This is the generic bus mouse driver code. If you have a bus mouse,
-  you will have to say Y here and also to the specific driver for your
-  mouse below.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called busmouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MOUSE
-  This is for machines with a mouse which is neither a serial nor a
-  USB nor a bus mouse.  Examples are PS/2 mice (including the track
-  balls on some laptops) and some digitizer pads.  Say Y here if you
-  have a CHRP machine (such as an IBM RS/6000 or pSeries machine) with
-  a PS/2-style mouse.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about non-serial mice. If unsure, say Y.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_AMIGA
-  This option enables support for the Amiga series of computers.
-
-CONFIG_A2232
-  This option supports the 2232 7-port serial card shipped with the
-  Amiga 2000 and other Zorro-bus machines, dating from 1989.  At
-  a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
-  each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
-  ports were connected with 8 pin DIN connectors on the card bracket,
-  for which 8 pin to DB25 adapters were supplied. The card also had
-  jumpers internally to toggle various pinning configurations.
-
-  This driver can be built as a module; but then "generic_serial.o"
-  will also be built as a module. This has to be loaded before
-  "ser_a2232.o". If you want to do this, answer M here and read
-  "<file:Documentation/modules.txt>".
-
-CONFIG_ZORRO
-  This enables support for the Zorro bus in the Amiga. If you have
-  expansion cards in your Amiga that conform to the Amiga
-  AutoConfig(tm) specification, say Y, otherwise N. Note that even
-  expansion cards that do not fit in the Zorro slots but fit in e.g.
-  the CPU slot may fall in this category, so you have to say Y to let
-  Linux use these.
-
-CONFIG_AMIGA_PCMCIA
-  Include support in the kernel for pcmcia on Amiga 1200 and Amiga
-  600. If you intend to use pcmcia cards say Y; otherwise say N.
-
-CONFIG_WHIPPET_SERIAL
-  HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
-  is no listing for the Whippet in their Amiga section.
-
-CONFIG_APNE
-  If you have a PCMCIA NE2000 compatible adapter, say Y.  Otherwise,
-  say N.
-
-  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 is called apne.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_AMIGAMOUSE
-  If you want to be able to use an Amiga mouse in Linux, say Y.
-
-  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 is called amigamouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_AMIGA_BUILTIN_SERIAL
-  If you want to use your Amiga's built-in serial port in Linux,
-  answer Y.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_GVPIOEXT
-  If you want to use a GVP IO-Extender serial card in Linux, say Y.
-  Otherwise, say N.
-
-CONFIG_GVPIOEXT_LP
-  Say Y to enable driving a printer from the parallel port on your
-  GVP IO-Extender card, N otherwise.
-
-CONFIG_GVPIOEXT_PLIP
-  Say Y to enable doing IP over the parallel port on your GVP
-  IO-Extender card, N otherwise.
-
-CONFIG_MULTIFACE_III_TTY
-  If you want to use a Multiface III card's serial port in Linux,
-  answer Y.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_BOOTX_TEXT
-  Say Y here to see progress messages from the boot firmware in text
-  mode. Requires either BootX or Open Firmware.
-
-CONFIG_6xx
-  There are four types of PowerPC chips supported.  The more common
-  types (601, 603, 604, 740, 750, 7400), the Motorola embedded
-  versions (821, 823, 850, 855, 860, 8260), the IBM embedded versions
-  (403 and 405) and the high end 64 bit Power processors (POWER 3)
-  Unless you are building a kernel for one of the embedded processor
-  systems, or a 64 bit IBM RS/6000, choose 6xx.  Note that the kernel
-  runs in 32-bit mode even on 64-bit chips.  Also note that because
-  the 82xx family has a 603e core, specific support for that chipset
-  is asked later on.
-
-CONFIG_8260
-  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.
-
-  If in doubt, say N.
-
-CONFIG_OAK
-  Select Oak if you have an IBM 403GCX "Oak" Evaluation Board.
-
-  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
-
-  More information on these boards is available at:
-  <http://www.chips.ibm.com/products/powerpc/tools/evk_pn.html#GCX>.
-
-CONFIG_WALNUT
-  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
-
-CONFIG_PPC601_SYNC_FIX
-  Some versions of the PPC601 (the first PowerPC chip) have bugs which
-  mean that extra synchronization instructions are required near
-  certain instructions, typically those that make major changes to the
-  CPU state.  These extra instructions reduce performance slightly.
-  If you say N here, these extra instructions will not be included,
-  resulting in a kernel which will run faster but may not run at all
-  on some systems with the PPC601 chip.
-
-  If in doubt, say Y here.
-
-CONFIG_ALL_PPC
-  Linux currently supports several different kinds of PowerPC-based
-  machines: Apple Power Macintoshes and clones (such as the Motorola
-  Starmax series), PReP (PowerPC Reference Platform) machines (such
-  as the Motorola PowerStacks, Motorola cPCI/VME embedded systems,
-  and some IBM RS/6000 systems), CHRP (Common Hardware Reference
-  Platform) machines (including all of the recent IBM RS/6000 and
-  pSeries machines), and several embedded PowerPC systems containing
-  4xx, 6xx, 7xx, 8xx, 74xx, and 82xx processors.  Currently, the
-  default option is to build a kernel which works on the first three.
-
-  Select CHRP/PowerMac/PReP if configuring for an IBM RS/6000 or
-  pSeries machine, a Power Macintosh (including iMacs, iBooks and
-  Powerbooks), or a PReP machine.
-
-  Select Gemini if configuring for a Synergy Microsystems' Gemini
-  series Single Board Computer.  More information is available at:
-  <http://www.synergymicro.com/PressRel/97_10_15.html>.
-
-  Select APUS if configuring for a PowerUP Amiga.  More information is
-  available at: <http://linux-apus.sourceforge.net/>.
-
-CONFIG_GEMINI
-  Select Gemini if configuring for a Synergy Microsystems' Gemini
-  series Single Board Computer.  More information is available at:
-  <http://www.synergymicro.com/PressRel/97_10_15.html>.
-
-CONFIG_APUS
-  Select APUS if configuring for a PowerUP Amiga.
-  More information is available at:
-  <http://linux-apus.sourceforge.net/>.
-
-CONFIG_ALTIVEC
-  This option enables kernel support for the Altivec extensions to the
-  PowerPC processor. The kernel currently supports saving and restoring
-  altivec registers, and turning on the 'altivec enable' bit so user
-  processes can execute altivec instructions.
-
-  This option is only usefully if you have a processor that supports
-  altivec (G4, otherwise known as 74xx series), but does not have
-  any affect on a non-altivec cpu (it does, however add code to the
-  kernel).
-
-  If in doubt, say Y here.
-
-CONFIG_TAU
-  G3 and G4 processors have an on-chip temperature sensor called the
-  'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die
-  temperature within 2-4 degrees Celsius. This option shows the current
-  on-die temperature in /proc/cpuinfo if the cpu supports it.
-
-  Unfortunately, on some chip revisions, this sensor is very inaccurate
-  and in some cases, does not work at all, so don't assume the cpu
-  temp is actually what /proc/cpuinfo says it is.
-
-CONFIG_TAU_INT
-  The TAU supports an interrupt driven mode which causes an interrupt
-  whenever the temperature goes out of range. This is the fastest way
-  to get notified the temp has exceeded a range. With this option off,
-  a timer is used to re-check the temperature periodically.
-
-  However, on some cpus it appears that the TAU interrupt hardware
-  is buggy and can cause a situation which would lead unexplained hard
-  lockups.
-
-  Unless you are extending the TAU driver, or enjoy kernel/hardware
-  debugging, leave this option off.
-
-CONFIG_TAU_AVERAGE
-  The TAU hardware can compare the temperature to an upper and lower
-  bound.  The default behavior is to show both the upper and lower
-  bound in /proc/cpuinfo. If the range is large, the temperature is
-  either changing a lot, or the TAU hardware is broken (likely on some
-  G4's). If the range is small (around 4 degrees), the temperature is
-  relatively stable.  If you say Y here, a single temperature value,
-  halfway between the upper and lower bounds, will be reported in
-  /proc/cpuinfo.
-
-  If in doubt, say N here.
-
-CONFIG_PMAC_PBOOK
-  This provides support for putting a PowerBook to sleep; it also
-  enables media bay support.  Power management works on the
-  PB2400/3400/3500, Wallstreet, Lombard, and Bronze PowerBook G3 and
-  the Titanium Powerbook G4, as well as the iBooks.  You should get
-  the power management daemon, pmud, to make it work and you must have
-  the /dev/pmu device (see the pmud README).
-
-  Get pmud from <ftp://ftp.samba.org/pub/ppclinux/pmud/>.
-
-  If you have a PowerBook, you should say Y here.
-
-  You may also want to compile the dma sound driver as a module and
-  have it autoloaded. The act of removing the module shuts down the
-  sound hardware for more power savings.
-
-CONFIG_PMAC_BACKLIGHT
-  Say Y here to build in code to manage the LCD backlight on a
-  Macintosh PowerBook.  With this code, the backlight will be turned
-  on and off appropriately on power-management and lid-open/lid-closed
-  events; also, the PowerBook button device will be enabled so you can
-  change the screen brightness.
-
-CONFIG_RPXLITE
-  Single-board computers based around the PowerPC MPC8xx chips and
-  intended for embedded applications.  The following types are
-  supported:
-
-  RPX-Lite:
-    Embedded Planet RPX Lite. PC104 form-factor SBC based on the MPC823.
-
-  RPX-Classic:
-    Embedded Planet RPX Classic Low-fat. Credit-card-size SBC based on 
-    the MPC 860
-
-  BSE-IP: 
-    Bright Star Engineering ip-Engine.
-
-  TQM823L:
-  TQM850L:
-  TQM855L:
-  TQM860L:
-    MPC8xx based family of mini modules, half credit card size,
-    up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports,
-    2 x CAN bus interface, ...
-      Manufacturer: TQ Components, www.tq-group.de
-      Date of Release: October (?) 1999
-      End of Life: not yet :-)
-      URL:
-      - module: <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>
-      - starter kit: <http://www.denx.de/PDF/STK8xxLHWM201.pdf>
-      - images: <http://www.denx.de/embedded-ppc-en.html>
-
-  FPS850L:
-    FingerPrint Sensor System (based on TQM850L)
-      Manufacturer: IKENDI AG, <http://www.ikendi.com/>
-      Date of Release: November 1999
-      End of life: end 2000 ?
-      URL: see TQM850L
-
-  SPD823TS:
-    MPC823 based board used in the "Tele Server" product
-    Manufacturer: Speech Design, <http://www.speech-design.de/>
-    Date of Release: Mid 2000 (?)
-    End of life: -
-    URL: <http://www.speech-design.de/>
-         select "English", then "Teleteam Solutions", then "TeleServer"
-
-  IVMS8:
-    MPC860 based board used in the "Integrated Voice Mail System",
-    Small Version (8 voice channels)
-    Manufacturer: Speech Design, <http://www.speech-design.de/>
-    Date of Release: December 2000 (?)
-    End of life: -
-    URL: <http://www.speech-design.de/>
-
-  IVML24:
-    MPC860 based board used in the "Integrated Voice Mail System", 
-    Large Version (24 voice channels)
-    Manufacturer: Speech Design, <http://www.speech-design.de/>
-    Date of Release: March 2001  (?)
-    End of life: -
-    URL: <http://www.speech-design.de/>
-
-  SM850:
-    Service Module (based on TQM850L)
-    Manufacturer: Dependable Computer Systems, <http://www.decomsys.com/>
-    Date of Release: end 2000 (?)
-    End of life: mid 2001 (?)
-    URL: <http://www.tz-mikroelektronik.de/ServiceModule/index.html>
-
-  HERMES:
-    Hermes-Pro ISDN/LAN router with integrated 8 x hub
-    Manufacturer: Multidata Gesellschaft für Datentechnik und Informatik
-      <http://www.multidata.de/>
-    Date of Release: 2000 (?)
-    End of life: -
-    URL: <http://www.multidata.de/english/products/hpro.htm>
-
-  IP860:	
-    VMEBus IP (Industry Pack) carrier board with MPC860
-    Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
-    Date of Release: ?
-    End of life: -
-    URL: <http://www.microsys.de/html/ip860.html>
-
-  PCU_E:
-    PCU = Peripheral Controller Unit, Extended
-    Manufacturer: Siemens AG, ICN (Information and Communication Networks)
-    	<http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html>
-    Date of Release: April 2001
-    End of life: August 2001
-    URL: n. a.
-
-CONFIG_RPXCLASSIC
-  The RPX-Classic is a single-board computer based on the Motorola
-  MPC860.  It features 16MB of DRAM and a variable amount of flash,
-  I2C EEPROM, thermal monitoring, a PCMCIA slot, a DIP switch and two
-  LEDs.  Variants with Ethernet ports exist.  Say Y here to support it
-  directly.
-
-CONFIG_BSEIP
-  Say Y here to support the Bright Star Engineering ipEngine SBC.
-  This is a credit-card-sized device featuring a MPC823 processor,
-  26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video
-  controller, and two RS232 ports.
-
-CONFIG_TQM823L
-  Say Y here to support the TQM823L, one of an MPC8xx-based family of
-  mini SBCs (half credit-card size) from TQ Components first released
-  in late 1999.  Technical references are at
-  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
-  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
-  <http://www.denx.de/embedded-ppc-en.html>.
-
-CONFIG_TQM850L
-  Say Y here to support the TQM850L, one of an MPC8xx-based family of
-  mini SBCs (half credit-card size) from TQ Components first released
-  in late 1999.  Technical references are at
-  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
-  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
-  <http://www.denx.de/embedded-ppc-en.html>.
-
-CONFIG_TQM855L
-  Say Y here to support the TQM855L, one of an MPC8xx-based family of
-  mini SBCs (half credit-card size) from TQ Components first released
-  in late 1999.  Technical references are at
-  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
-  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
-  <http://www.denx.de/embedded-ppc-en.html>.
-
-CONFIG_TQM860L
-  Say Y here to support the TQM860L, one of an MPC8xx-based family of
-  mini SBCs (half credit-card size) from TQ Components first released
-  in late 1999.  Technical references are at
-  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
-  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
-  <http://www.denx.de/embedded-ppc-en.html>.
-
-CONFIG_TQM860
-  Say Y here to support the TQM860, one of an MPC8xx-based family of
-  SBCs (credit-card size) from TQ Components first released in 
-  mid-1999 and discontinued mid-2000.
-
-CONFIG_SM850
-  Say Y here to support the Service Module 850 from Dependable
-  Computer Systems, an SBC based on the TQM850L module by TQ
-  Components.  This board is no longer in production.  The
-  manufacturer's website is at <http://www.decomsys.com/>.
-
-CONFIG_SPD823TS
-  Say Y here to support the Speech Design 823 Tele-Server from Speech
-  Design, released in 2000.  The manufacturer's website is at
-  <http://www.speech-design.de/>.
-
-CONFIG_IVMS8
-  Say Y here to support the Integrated Voice-Mail Small 8-channel SBC
-  from Speech Design, released March 2001.  The manufacturer's website
-  is at <http://www.speech-design.de/>.
-
-CONFIG_IVML24
-  Say Y here to support the Integrated Voice-Mail Large 24-channel SBC
-  from Speech Design, released March 2001.  The manufacturer's website
-  is at <http://www.speech-design.de/>.
-
-CONFIG_MBX
-  MBX is a line of Motorola single-board computer based around the
-  MPC821 and MPC860 processors, and intended for embedded-controller
-  applications.  Say Y here to support these boards directly.
-
-CONFIG_WINCEPT
-  The Wincept 100/110 is a Motorola single-board computer based on the
-  MPC821 PowerPC, introduced in 1998 and designed to be used in
-  thin-client machines.  Say Y to support it directly.
-
-CONFIG_EST8260
-  EST8260:
-    The EST8260 is a single-board computer manufactured by Wind River
-    Systems, Inc. (formerly Embedded Support Tools Corp.) and based on
-    the MPC8260.  Wind River Systems has a website at
-    <http://www.windriver.com/>, but the EST8260 cannot be found on it
-    and has probably been discontinued or rebadged.
-
-  TQM8260:
-    MPC8260 based module, little larger than credit card,
-    up to 128 MB global + 64 MB local RAM, 32 MB Flash,
-    32 kB EEPROM, 256 kB L@ Cache, 10baseT + 100baseT Ethernet,
-    2 x serial ports, ...
-      Manufacturer: TQ Components, www.tq-group.de
-      Date of Release: June 2001
-      End of Life: not yet :-)
-      URL: <http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf>
-
-  PM826:
-    Modular system with MPC8260 CPU
-    Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
-    Date of Release: mid 2001
-    End of life: -
-    URL: <http://www.microsys.de/html/pm826.html>
-
-  CU824:
-    VMEBus Board with PCI extension with MPC8240 CPU
-    Manufacturer: MicroSys GmbH, http://www.microsys.de/
-    Date of Release: early 2001 (?)
-    End of life: -
-    URL: <http://www.microsys.de/html/cu824.html>
-
-CONFIG_PPC_RTC
-  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
-  into your computer.
-
-  If unsure, say Y here.
-
-CONFIG_PROC_DEVICETREE
-  This option adds a device-tree directory under /proc which contains
-  an image of the device tree that the kernel copies from Open
-  Firmware. If unsure, say Y here.
-
-CONFIG_PPC_RTAS
-  When you use this option, you will be able to use RTAS from
-  userspace.
-
-  RTAS stands for RunTime Abstraction Services and should
-  provide a portable way to access and set system information. This is
-  commonly used on RS/6000 (pSeries) computers.
-
-  You can access RTAS via the special proc file system entry rtas.
-  Don't confuse this rtas entry with the one in /proc/device-tree/rtas
-  which is readonly.
-
-  If you don't know if you can use RTAS look into
-  /proc/device-tree/rtas. If there are some entries, it is very likely
-  that you will be able to use RTAS.
-
-  You can do cool things with rtas. To print out information about
-  various sensors in the system, just do a
-
-    $ cat /proc/rtas/sensors
-
-  or if you power off your machine at night but want it running when
-  you enter your office at 7:45 am, do a
-
-    # date -d 'tomorrow 7:30' +%s > /proc/rtas/poweron
-
-  and shutdown.
-
-  If unsure, say Y.
-
-CONFIG_CMDLINE
-  On some platforms, there is currently no way for the boot loader to
-  pass arguments to the kernel. For these platforms, you can supply
-  some command-line options at build time by entering them here.  In
-  most cases you will need to specify the root device here.
-
-CONFIG_KGDB
-  Include in-kernel hooks for kgdb, the Linux kernel source level
-  debugger.  See <http://kgdb.sourceforge.net/> for more information.
-  Unless you are intending to debug the kernel, say N here.
-
-CONFIG_XMON
-  Include in-kernel hooks for the xmon kernel monitor/debugger.
-  Unless you are intending to debug the kernel, say N here.
-
-Include BDI2000 debugger support
-CONFIG_BDI_SWITCH
-  Include in-kernel support for the Abatron BDI2000 debugger.
-  Unless you are intending to debug the kernel with one of these
-  machines, say N here.
-
-Add additional CFLAGS to the kernel build
-CONFIG_MORE_COMPILE_OPTIONS
-  If you want to add additional CFLAGS to the kernel build, such as -g
-  for KGDB or the BDI2000, enable this option and then enter what you
-  would like to add in the next question.
-
-CONFIG_ADVANCED_OPTIONS
-  This option will enable prompting for a variety of advanced kernel
-  configuration options.  These options can cause the kernel to not
-  work if they are set incorrectly, but can be used to optimize certain
-  aspects of kernel memory management.
-
-  Unless you know what you are doing, say N here.
-
-CONFIG_HIGHMEM_START_BOOL
-  This option allows you to set the base address of the kernel virtual
-  area used to map high memory pages.  This can be useful in
-  optimizing the layout of kernel virtual memory.
-
-  Say N here unless you know what you are doing.
-
-CONFIG_LOWMEM_SIZE_BOOL
-  This option allows you to set the maximum amount of memory which
-  will be used as "low memory", that is, memory which the kernel can
-  access directly, without having to set up a kernel virtual mapping.
-  This can be useful in optimizing the layout of kernel virtual
-  memory.
-
-  Say N here unless you know what you are doing.
-
-CONFIG_KERNEL_START_BOOL
-  This option allows you to set the kernel virtual address at which
-  the kernel will map low memory (the kernel image will be linked at
-  this address).  This can be useful in optimizing the virtual memory
-  layout of the system.
-
-  Say N here unless you know what you are doing.
-
-CONFIG_TASK_SIZE_BOOL
-  This option allows you to set the amount of virtual address space
-  allocated to user tasks.  This can be useful in optimizing the
-  virtual memory layout of the system.
-
-  Say N here unless you know what you are doing.
-
-CONFIG_BOOT_LOAD_BOOL
-  This option allows you to set the initial load address of the zImage
-  or zImage.initrd file.  This can be useful if you are on a board
-  which has a small amount of memory.
-
-  Say N here unless you know what you are doing.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and to CONFIG_SMP to include code to check for missing
-  spinlock initialization and some other common spinlock errors.
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1853 @@
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config UID16
+	bool
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	default y
+
+config HAVE_DEC_LOCK
+	bool
+	default y
+
+
+mainmenu "Linux/PowerPC Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Platform support"
+
+config PPC
+	bool
+	default y
+	---help---
+	  The PowerPC is a modern RISC architecture descended from the POWER
+	  architecture designed by IBM.  The PowerPC architecture is designed
+	  to allow high-speed implementations which can execute several
+	  instructions in each clock cycle.  IBM and Motorola design and
+	  manufacture PowerPC processors aimed at embedded, desktop and server
+	  applications.  PowerPC chips are used in Apple Power Macintoshes
+	  (including iMacs, iBooks and PowerBooks), in IBM pSeries (RS/6000)
+	  and iSeries (AS/400) machines, and in a broad range of embedded
+	  applications.  The Linux PowerPC port has a home page at
+	  <http://penguinppc.org/intro.shtml>.
+
+config PPC32
+	bool
+	default y
+
+choice
+	prompt "Processor Type"
+	default 6xx
+
+config 6xx
+	bool "6xx/7xx/74xx/8260"
+	help
+	  There are four types of PowerPC chips supported.  The more common
+	  types (601, 603, 604, 740, 750, 7400), the Motorola embedded
+	  versions (821, 823, 850, 855, 860, 8260), the IBM embedded versions
+	  (403 and 405) and the high end 64 bit Power processors (POWER 3)
+	  Unless you are building a kernel for one of the embedded processor
+	  systems, or a 64 bit IBM RS/6000, choose 6xx.  Note that the kernel
+	  runs in 32-bit mode even on 64-bit chips.  Also note that because
+	  the 82xx family has a 603e core, specific support for that chipset
+	  is asked later on.
+
+config 40x
+	bool "40x"
+
+config POWER3
+	bool "POWER3"
+
+config 8xx
+	bool "8xx"
+
+config PPC_ISERIES
+	bool "iSeries"
+
+endchoice
+
+config 4xx
+	bool
+	depends on 40x
+	default y
+
+config 8260
+	bool "MPC8260 CPM Support"
+	depends on 6xx
+	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.
+
+	  If in doubt, say N.
+
+config GENERIC_ISA_DMA
+	bool
+	depends on POWER3 || 6xx && !8260
+	default y
+
+config PPC64BRIDGE
+	bool
+	depends on PPC_ISERIES || POWER3
+	default y
+
+config ALL_PPC
+	bool
+	depends on ALL_PPC_CH || POWER3
+	default y
+	---help---
+	  Linux currently supports several different kinds of PowerPC-based
+	  machines: Apple Power Macintoshes and clones (such as the Motorola
+	  Starmax series), PReP (PowerPC Reference Platform) machines (such
+	  as the Motorola PowerStacks, Motorola cPCI/VME embedded systems,
+	  and some IBM RS/6000 systems), CHRP (Common Hardware Reference
+	  Platform) machines (including all of the recent IBM RS/6000 and
+	  pSeries machines), and several embedded PowerPC systems containing
+	  4xx, 6xx, 7xx, 8xx, 74xx, and 82xx processors.  Currently, the
+	  default option is to build a kernel which works on the first three.
+
+	  Select CHRP/PowerMac/PReP if configuring for an IBM RS/6000 or
+	  pSeries machine, a Power Macintosh (including iMacs, iBooks and
+	  Powerbooks), or a PReP machine.
+
+	  Select Gemini if configuring for a Synergy Microsystems' Gemini
+	  series Single Board Computer.  More information is available at:
+	  <http://www.synergymicro.com/PressRel/97_10_15.html>.
+
+	  Select APUS if configuring for a PowerUP Amiga.  More information is
+	  available at: <http://linux-apus.sourceforge.net/>.
+
+config PPC_STD_MMU
+	bool
+	depends on 6xx || POWER3
+	default y
+
+config SERIAL_CONSOLE
+	bool
+	depends on 8xx || 8260
+	default y
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a graphics card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+choice
+	prompt "Machine Type"
+	depends on 8260
+	default WILLOW_1
+
+config EST8260
+	bool "EST8260"
+	---help---
+	  EST8260:
+	  The EST8260 is a single-board computer manufactured by Wind River
+	  Systems, Inc. (formerly Embedded Support Tools Corp.) and based on
+	  the MPC8260.  Wind River Systems has a website at
+	  <http://www.windriver.com/>, but the EST8260 cannot be found on it
+	  and has probably been discontinued or rebadged.
+
+	  TQM8260:
+	  MPC8260 based module, little larger than credit card,
+	  up to 128 MB global + 64 MB local RAM, 32 MB Flash,
+	  32 kB EEPROM, 256 kB L@ Cache, 10baseT + 100baseT Ethernet,
+	  2 x serial ports, ...
+	  Manufacturer: TQ Components, www.tq-group.de
+	  Date of Release: June 2001
+	  End of Life: not yet :-)
+	  URL: <http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf>
+
+	  PM826:
+	  Modular system with MPC8260 CPU
+	  Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
+	  Date of Release: mid 2001
+	  End of life: -
+	  URL: <http://www.microsys.de/html/pm826.html>
+
+	  CU824:
+	  VMEBus Board with PCI extension with MPC8240 CPU
+	  Manufacturer: MicroSys GmbH, http://www.microsys.de/
+	  Date of Release: early 2001 (?)
+	  End of life: -
+	  URL: <http://www.microsys.de/html/cu824.html>
+
+config SBS8260
+	bool "SBS8260"
+
+config RPX6
+	bool "RPXSUPER"
+
+config TQM8260
+	bool "TQM8260"
+
+config WILLOW_1
+	bool "Willow"
+
+endchoice
+
+choice
+	prompt "Machine Type"
+	depends on 40x
+	default WALNUT
+
+config ASH
+	bool "Ash"
+
+config CEDER
+	bool "Ceder"
+
+config CPCI405
+	bool "CPCI405"
+
+config EP405
+	bool "EP405/EP405PC"
+
+config OAK
+	bool "Oak"
+	help
+	  Select Oak if you have an IBM 403GCX "Oak" Evaluation Board.
+
+	  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
+
+	  More information on these boards is available at:
+	  <http://www.chips.ibm.com/products/powerpc/tools/evk_pn.html#GCX>.
+
+config REDWOOD_4
+	bool "Redwood-4"
+
+config REDWOOD_5
+	bool "Redwood-5"
+
+config TIVO
+	bool "Tivo"
+
+config WALNUT
+	bool "Walnut"
+	help
+	  Select Walnut if you have an IBM 405GP "Walnut" Evaluation Board.
+
+endchoice
+
+config EP405PC
+	bool "EP405PC Support"
+	depends on EP405
+
+config NOT_COHERENT_CACHE
+	bool
+	depends on 40x || 8xx
+	default y
+
+choice
+	prompt "Machine Type"
+	depends on 8xx
+	default RPXLITE
+
+config RPXLITE
+	bool "RPX-Lite"
+	---help---
+	  Single-board computers based around the PowerPC MPC8xx chips and
+	  intended for embedded applications.  The following types are
+	  supported:
+
+	  RPX-Lite:
+	  Embedded Planet RPX Lite. PC104 form-factor SBC based on the MPC823.
+
+	  RPX-Classic:
+	  Embedded Planet RPX Classic Low-fat. Credit-card-size SBC based on 
+	  the MPC 860
+
+	  BSE-IP: 
+	  Bright Star Engineering ip-Engine.
+
+	  TQM823L:
+	  TQM850L:
+	  TQM855L:
+	  TQM860L:
+	  MPC8xx based family of mini modules, half credit card size,
+	  up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports,
+	  2 x CAN bus interface, ...
+	  Manufacturer: TQ Components, www.tq-group.de
+	  Date of Release: October (?) 1999
+	  End of Life: not yet :-)
+	  URL:
+	  - module: <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>
+	  - starter kit: <http://www.denx.de/PDF/STK8xxLHWM201.pdf>
+	  - images: <http://www.denx.de/embedded-ppc-en.html>
+
+	  FPS850L:
+	  FingerPrint Sensor System (based on TQM850L)
+	  Manufacturer: IKENDI AG, <http://www.ikendi.com/>
+	  Date of Release: November 1999
+	  End of life: end 2000 ?
+	  URL: see TQM850L
+
+	  SPD823TS:
+	  MPC823 based board used in the "Tele Server" product
+	  Manufacturer: Speech Design, <http://www.speech-design.de/>
+	  Date of Release: Mid 2000 (?)
+	  End of life: -
+	  URL: <http://www.speech-design.de/>
+	  select "English", then "Teleteam Solutions", then "TeleServer"
+
+	  IVMS8:
+	  MPC860 based board used in the "Integrated Voice Mail System",
+	  Small Version (8 voice channels)
+	  Manufacturer: Speech Design, <http://www.speech-design.de/>
+	  Date of Release: December 2000 (?)
+	  End of life: -
+	  URL: <http://www.speech-design.de/>
+
+	  IVML24:
+	  MPC860 based board used in the "Integrated Voice Mail System", 
+	  Large Version (24 voice channels)
+	  Manufacturer: Speech Design, <http://www.speech-design.de/>
+	  Date of Release: March 2001  (?)
+	  End of life: -
+	  URL: <http://www.speech-design.de/>
+
+	  SM850:
+	  Service Module (based on TQM850L)
+	  Manufacturer: Dependable Computer Systems, <http://www.decomsys.com/>
+	  Date of Release: end 2000 (?)
+	  End of life: mid 2001 (?)
+	  URL: <http://www.tz-mikroelektronik.de/ServiceModule/index.html>
+
+	  HERMES:
+	  Hermes-Pro ISDN/LAN router with integrated 8 x hub
+	  Manufacturer: Multidata Gesellschaft für Datentechnik und Informatik
+	  <http://www.multidata.de/>
+	  Date of Release: 2000 (?)
+	  End of life: -
+	  URL: <http://www.multidata.de/english/products/hpro.htm>
+
+	  IP860:	
+	  VMEBus IP (Industry Pack) carrier board with MPC860
+	  Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
+	  Date of Release: ?
+	  End of life: -
+	  URL: <http://www.microsys.de/html/ip860.html>
+
+	  PCU_E:
+	  PCU = Peripheral Controller Unit, Extended
+	  Manufacturer: Siemens AG, ICN (Information and Communication Networks)
+	  	<http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html>
+	  Date of Release: April 2001
+	  End of life: August 2001
+	  URL: n. a.
+
+config RPXCLASSIC
+	bool "RPX-Classic"
+	help
+	  The RPX-Classic is a single-board computer based on the Motorola
+	  MPC860.  It features 16MB of DRAM and a variable amount of flash,
+	  I2C EEPROM, thermal monitoring, a PCMCIA slot, a DIP switch and two
+	  LEDs.  Variants with Ethernet ports exist.  Say Y here to support it
+	  directly.
+
+config BSEIP
+	bool "BSE-IP"
+	help
+	  Say Y here to support the Bright Star Engineering ipEngine SBC.
+	  This is a credit-card-sized device featuring a MPC823 processor,
+	  26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video
+	  controller, and two RS232 ports.
+
+config FADS
+	bool "FADS"
+
+config TQM823L
+	bool "TQM823L"
+	help
+	  Say Y here to support the TQM823L, one of an MPC8xx-based family of
+	  mini SBCs (half credit-card size) from TQ Components first released
+	  in late 1999.  Technical references are at
+	  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
+	  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
+	  <http://www.denx.de/embedded-ppc-en.html>.
+
+config TQM850L
+	bool "TQM850L"
+	help
+	  Say Y here to support the TQM850L, one of an MPC8xx-based family of
+	  mini SBCs (half credit-card size) from TQ Components first released
+	  in late 1999.  Technical references are at
+	  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
+	  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
+	  <http://www.denx.de/embedded-ppc-en.html>.
+
+config TQM855L
+	bool "TQM855L"
+	help
+	  Say Y here to support the TQM855L, one of an MPC8xx-based family of
+	  mini SBCs (half credit-card size) from TQ Components first released
+	  in late 1999.  Technical references are at
+	  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
+	  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
+	  <http://www.denx.de/embedded-ppc-en.html>.
+
+config TQM860L
+	bool "TQM860L"
+	help
+	  Say Y here to support the TQM860L, one of an MPC8xx-based family of
+	  mini SBCs (half credit-card size) from TQ Components first released
+	  in late 1999.  Technical references are at
+	  <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
+	  <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
+	  <http://www.denx.de/embedded-ppc-en.html>.
+
+config FPS850L
+	bool "FPS850L"
+
+config SPD823TS
+	bool "SPD823TS"
+	help
+	  Say Y here to support the Speech Design 823 Tele-Server from Speech
+	  Design, released in 2000.  The manufacturer's website is at
+	  <http://www.speech-design.de/>.
+
+config IVMS8
+	bool "IVMS8"
+	help
+	  Say Y here to support the Integrated Voice-Mail Small 8-channel SBC
+	  from Speech Design, released March 2001.  The manufacturer's website
+	  is at <http://www.speech-design.de/>.
+
+config IVML24
+	bool "IVML24"
+	help
+	  Say Y here to support the Integrated Voice-Mail Large 24-channel SBC
+	  from Speech Design, released March 2001.  The manufacturer's website
+	  is at <http://www.speech-design.de/>.
+
+config SM850
+	bool "SM850"
+	help
+	  Say Y here to support the Service Module 850 from Dependable
+	  Computer Systems, an SBC based on the TQM850L module by TQ
+	  Components.  This board is no longer in production.  The
+	  manufacturer's website is at <http://www.decomsys.com/>.
+
+config HERMES_PRO
+	bool "HERMES"
+
+config IP860
+	bool "IP860"
+
+config LWMON
+	bool "LWMON"
+
+config PCU_E
+	bool "PCU_E"
+
+config CCM
+	bool "CCM"
+
+config LANTEC
+	bool "LANTEC"
+
+config MBX
+	bool "MBX"
+	help
+	  MBX is a line of Motorola single-board computer based around the
+	  MPC821 and MPC860 processors, and intended for embedded-controller
+	  applications.  Say Y here to support these boards directly.
+
+config WINCEPT
+	bool "WinCept"
+	help
+	  The Wincept 100/110 is a Motorola single-board computer based on the
+	  MPC821 PowerPC, introduced in 1998 and designed to be used in
+	  thin-client machines.  Say Y to support it directly.
+
+endchoice
+
+config TQM8xxL
+	bool
+	depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L || SM850)
+	default y
+
+choice
+	prompt "Machine Type"
+	depends on 6xx && !8260
+	default ALL_PPC_CH
+
+config ALL_PPC_CH
+	bool "CHRP/PowerMac/PReP"
+
+config APUS
+	bool "Amiga-APUS"
+	help
+	  Select APUS if configuring for a PowerUP Amiga.
+	  More information is available at:
+	  <http://linux-apus.sourceforge.net/>.
+
+config WILLOW_2
+	bool "Cogent-Willow"
+
+config PCORE
+	bool "Force-PowerCore"
+
+config POWERPMC250
+	bool "Force-PowerPMC250"
+
+config EV64260
+	bool "Galileo-EV-64260-BP"
+
+config SPRUCE
+	bool "IBM-Spruce"
+
+config MENF1
+	bool "MEN-F1"
+
+config LOPEC
+	bool "Motorola-LoPEC"
+
+config MCPN765
+	bool "Motorola-MCPN765"
+
+config MVME5100
+	bool "Motorola-MVME5100"
+
+config PPLUS
+	bool "Motorola-PowerPlus"
+
+config PRPMC750
+	bool "Motorola-PrPMC750"
+
+config PRPMC800
+	bool "Motorola-PrPMC800"
+
+config SANDPOINT
+	bool "Motorola-Sandpoint"
+
+config ADIR
+	bool "SBS-Adirondack"
+
+config K2
+	bool "SBS-K2"
+
+config PAL4
+	bool "SBS-Palomar4"
+
+config GEMINI
+	bool "Synergy-Gemini"
+	help
+	  Select Gemini if configuring for a Synergy Microsystems' Gemini
+	  series Single Board Computer.  More information is available at:
+	  <http://www.synergymicro.com/PressRel/97_10_15.html>.
+
+config ZX4500
+	bool "Zynx-ZX4500"
+
+endchoice
+
+config SANDPOINT_X3
+	bool "Sandpoint X3"
+	depends on SANDPOINT
+
+config FORCE
+	bool
+	depends on 6xx && !8260 && (PCORE || POWERPMC250)
+	default y
+
+config EPIC_SERIAL_MODE
+	bool
+	depends on 6xx && !8260 && (LOPEC || SANDPOINT_X3)
+	default y
+
+config WILLOW
+	bool
+	depends on WILLOW_1 || WILLOW_2
+	default y
+
+config MPC10X_STORE_GATHERING
+	bool "Enable MPC10x store gathering"
+	depends on FORCE || MENF1 || SANDPOINT || ZX4500
+
+config GT64260
+	bool
+	depends on EV64260
+	default y
+
+config SERIAL_CONSOLE_BAUD
+	int
+	depends on EV64260
+	default "115200"
+
+config CPC710_DATA_GATHERING
+	bool "Enable CPC710 data gathering"
+	depends on K2
+
+config MVME5100_IPMC761_PRESENT
+	bool "MVME5100 configured with an IPMC761"
+	depends on MVME5100
+
+config SPRUCE_BAUD_33M
+	bool "Spruce baud clock support"
+	depends on SPRUCE
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, say N. If you have a system with more
+	  than one CPU, say Y.  Note that the kernel does not currently
+	  support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
+	  since they have inadequate hardware support for multiprocessor
+	  operation.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on single-processor machines.
+	  On a single-processor machine, the kernel will run faster if you say
+	  N here.
+
+	  If you don't know what to do here, say N.
+
+config IRQ_ALL_CPUS
+	bool "Distribute interrupts on all CPUs by default"
+	depends on SMP
+	help
+	  This option gives the kernel permission to distribute IRQs across
+	  multiple CPUs.  Saying N here will route all IRQs to the first
+	  CPU.  Generally saying Y is safe, although some problems have been
+	  reported with SMP Power Macintoshes with this option enabled.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+
+config PREEMPT
+	bool "Preemptible Kernel"
+	depends on !SMP
+	help
+	  This option reduces the latency of the kernel when reacting to
+	  real-time or interactive events by allowing a low priority process to
+	  be preempted even if it is in kernel mode executing a system call.
+	  Unfortunately the kernel code has some race conditions if both
+	  CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
+	  currently disabled if you are building an SMP kernel.
+
+	  Say Y here if you are building a kernel for a desktop, embedded
+	  or real-time system.  Say N if you are unsure.
+
+config ALTIVEC
+	bool "AltiVec Support"
+	depends on 6xx && !8260
+	---help---
+	  This option enables kernel support for the Altivec extensions to the
+	  PowerPC processor. The kernel currently supports saving and restoring
+	  altivec registers, and turning on the 'altivec enable' bit so user
+	  processes can execute altivec instructions.
+
+	  This option is only usefully if you have a processor that supports
+	  altivec (G4, otherwise known as 74xx series), but does not have
+	  any affect on a non-altivec 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
+	help
+	  G3 and G4 processors have an on-chip temperature sensor called the
+	  'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die
+	  temperature within 2-4 degrees Celsius. This option shows the current
+	  on-die temperature in /proc/cpuinfo if the cpu supports it.
+
+	  Unfortunately, on some chip revisions, this sensor is very inaccurate
+	  and in some cases, does not work at all, so don't assume the cpu
+	  temp is actually what /proc/cpuinfo says it is.
+
+config TAU_INT
+	bool "Interrupt driven TAU driver (DANGEROUS)"
+	depends on TAU
+	---help---
+	  The TAU supports an interrupt driven mode which causes an interrupt
+	  whenever the temperature goes out of range. This is the fastest way
+	  to get notified the temp has exceeded a range. With this option off,
+	  a timer is used to re-check the temperature periodically.
+
+	  However, on some cpus it appears that the TAU interrupt hardware
+	  is buggy and can cause a situation which would lead unexplained hard
+	  lockups.
+
+	  Unless you are extending the TAU driver, or enjoy kernel/hardware
+	  debugging, leave this option off.
+
+config TAU_AVERAGE
+	bool "Average high and low temp"
+	depends on TAU
+	---help---
+	  The TAU hardware can compare the temperature to an upper and lower
+	  bound.  The default behavior is to show both the upper and lower
+	  bound in /proc/cpuinfo. If the range is large, the temperature is
+	  either changing a lot, or the TAU hardware is broken (likely on some
+	  G4's). If the range is small (around 4 degrees), the temperature is
+	  relatively stable.  If you say Y here, a single temperature value,
+	  halfway between the upper and lower bounds, will be reported in
+	  /proc/cpuinfo.
+
+	  If in doubt, say N here.
+
+config MATH_EMULATION
+	bool "Math emulation"
+	depends on 4xx || 8xx
+	---help---
+	  Some PowerPC chips designed for embedded applications do not have 
+	  a floating-point unit and therefore do not implement the
+	  floating-point instructions in the PowerPC instruction set.  If you
+	  say Y here, the kernel will include code to emulate a floating-point
+	  unit, which will allow programs that use floating-point
+	  instructions to run.
+
+	  If you have an Apple machine or an IBM RS/6000 or pSeries machine,
+	  or any machine with a 6xx, 7xx or 7xxx series processor, say N
+	  here.  Saying Y here will not hurt performance (on any machine) but
+	  will increase the size of the kernel.
+
+# It's often necessary to know the specific 4xx processor type.
+# Fortunately, it is impled (so far) from the board type, so we
+# don't need to ask more redundant questions.
+config NP405H
+	bool
+	depends on ASH
+	default y
+
+config TREEBOOT
+	bool
+	depends on 40x && (WALNUT || REDWOOD_5 || REDWOOD_4 || OAK || TIVO || CEDER || ASH)
+	default y
+
+config IBM405_ERR77
+	bool
+	depends on 40x && (WALNUT || REDWOOD_5 || REDWOOD_4 || EP405 || CPCI405 || CEDER || ASH)
+	default y
+
+config IBM_OCP
+	bool
+	depends on 40x && (WALNUT || REDWOOD_5 || REDWOOD_4 || EP405 || CPCI405 || CEDER || ASH)
+	default y
+
+config NP405L
+	bool
+	depends on CEDER
+	default y
+
+config BIOS_FIXUP
+	bool
+	depends on 40x && (WALNUT || EP405 || CEDER)
+	default y
+
+config 405GP
+	bool
+	depends on 40x && (WALNUT || EP405 || CPCI405)
+	default y
+
+config EMBEDDEDBOOT
+	bool
+	depends on 8xx || 8260 || 40x && EP405
+	default y
+
+config 403GCX
+	bool
+	depends on 40x && (OAK || TIVO)
+	default y
+
+config STB03xxx
+	bool
+	depends on 40x && (REDWOOD_5 || REDWOOD_4)
+	default y
+
+config 405_DMA
+	bool "Blue Logic DMA"
+	depends on 40x
+
+config PM
+	bool "Power Management support (EXPERIMENTAL)"
+	depends on 40x && EXPERIMENTAL
+
+choice
+	prompt "TTYS0 device and default console"
+	depends on 40x
+	default UART0_TTYS0
+
+config UART0_TTYS0
+	bool "UART0"
+
+config UART0_TTYS1
+	bool "UART1"
+
+endchoice
+
+config IBM405_ERR51
+	bool
+	depends on 40x
+	default y
+
+endmenu
+
+
+menu "General setup"
+
+config HIGHMEM
+	bool "High memory support"
+
+config ISA
+	bool "Support for ISA-bus hardware"
+	depends on ALL_PPC
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA is the
+	  name of a bus system, i.e. the way the CPU talks to the other stuff
+	  inside your box.  If you have an Apple machine, say N here; if you
+	  have an IBM RS/6000 or pSeries machine or a PReP machine, say Y.  If
+	  you have an embedded board, consult your board documentation.
+
+config EISA
+	bool
+	help
+	  The Extended Industry Standard Architecture (EISA) bus is a bus
+	  architecture used on some older intel-based PCs.
+
+config SBUS
+	bool
+
+# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some older IBM RS/6000
+	  machines.  It is a bus system similar to PCI or ISA.  MCA-based
+	  RS/6000 machines are currently not supported by Linux.
+
+config PCI
+	bool "PCI support" if 4xx || 8260
+	default y if !4xx && !8260 && !8xx && !APUS && !PPC_ISERIES
+	default PCI_ISERIES if !4xx && !8260 && !8xx && !APUS && PPC_ISERIES
+	default PCI_PERMEDIA if !4xx && !8260 && !8xx && APUS
+	default PCI_QSPAN if !4xx && !8260 && 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
+	  your box.  If you say Y here, the kernel will include drivers and
+	  infrastructure code to support PCI bus devices.
+
+config PC_KEYBOARD
+	bool "PC PS/2 style Keyboard"
+	depends on 4xx || 8260
+
+config PCI_QSPAN
+	bool "QSpan PCI"
+	depends on !4xx && !8260 && 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_PERMEDIA
+	bool "PCI for Permedia2"
+	depends on !4xx && !8xx && APUS
+
+config PCI_ISERIES
+	bool "IBM iSeries Native I/O Support"
+	depends on !4xx && !8260 && !8xx && !APUS && PPC_ISERIES
+
+# only elf supported, a.out is not -- Cort
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	help
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image in ELF format. This
+	  can be used in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel.
+
+config BINFMT_ELF
+	bool
+	default y
+	help
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems.
+
+config KERNEL_ELF
+	bool
+	default y
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp.  It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>).  Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+config PPC601_SYNC_FIX
+	bool "Workarounds for PPC601 bugs"
+	depends on ALL_PPC && !POWER3
+	help
+	  Some versions of the PPC601 (the first PowerPC chip) have bugs which
+	  mean that extra synchronization instructions are required near
+	  certain instructions, typically those that make major changes to the
+	  CPU state.  These extra instructions reduce performance slightly.
+	  If you say N here, these extra instructions will not be included,
+	  resulting in a kernel which will run faster but may not run at all
+	  on some systems with the PPC601 chip.
+
+	  If in doubt, say Y here.
+
+config PROC_DEVICETREE
+	bool "Support for Open Firmware device tree in /proc"
+	depends on ALL_PPC
+	help
+	  This option adds a device-tree directory under /proc which contains
+	  an image of the device tree that the kernel copies from Open
+	  Firmware. If unsure, say Y here.
+
+config PPC_RTAS
+	bool "Support for RTAS (RunTime Abstraction Services) in /proc"
+	depends on ALL_PPC
+	---help---
+	  When you use this option, you will be able to use RTAS from
+	  userspace.
+
+	  RTAS stands for RunTime Abstraction Services and should
+	  provide a portable way to access and set system information. This is
+	  commonly used on RS/6000 (pSeries) computers.
+
+	  You can access RTAS via the special proc file system entry rtas.
+	  Don't confuse this rtas entry with the one in /proc/device-tree/rtas
+	  which is readonly.
+
+	  If you don't know if you can use RTAS look into
+	  /proc/device-tree/rtas. If there are some entries, it is very likely
+	  that you will be able to use RTAS.
+
+	  You can do cool things with rtas. To print out information about
+	  various sensors in the system, just do a
+
+	  $ cat /proc/rtas/sensors
+
+	  or if you power off your machine at night but want it running when
+	  you enter your office at 7:45 am, do a
+
+	  # date -d 'tomorrow 7:30' +%s > /proc/rtas/poweron
+
+	  and shutdown.
+
+	  If unsure, say Y.
+
+config PREP_RESIDUAL
+	bool "Support for PReP Residual Data"
+	depends on ALL_PPC
+	help
+	  Some PReP systems have residual data passed to the kernel by the
+	  firmware.  This allows detection of memory size, devices present and
+	  other useful pieces of information.  Sometimes this information is
+	  not present or incorrect.
+
+	  Unless you expect to boot on a PReP system, there is no need to
+	  select Y.
+
+config PROC_PREPRESIDUAL
+	bool "Support for reading of PReP Residual Data in /proc"
+	depends on PREP_RESIDUAL
+	help
+	  Enabling this option will create a /proc/residual file which allows
+	  you to get at the residual data on PReP systems.  You will need a tool
+	  (lsresidual) to parse it.  If you aren't on a PReP system, you don't
+	  want this.
+
+config PPCBUG_NVRAM
+	bool "Enable reading PPCBUG NVRAM during boot" if PPLUS || LOPEC
+	default y if ALL_PPC
+
+config CMDLINE_BOOL
+	bool "Default bootloader kernel arguments"
+
+config CMDLINE
+	string "Initial kernel command string"
+	depends on CMDLINE_BOOL
+	default "console=ttyS0,9600 console=tty0 root=/dev/sda2"
+	help
+	  On some platforms, there is currently no way for the boot loader to
+	  pass arguments to the kernel. For these platforms, you can supply
+	  some command-line options at build time by entering them here.  In
+	  most cases you will need to specify the root device here.
+
+config FB_CONSOLE
+	bool
+	depends on APUS
+	default y
+
+config AMIGA
+	bool
+	depends on APUS
+	default y
+	help
+	  This option enables support for the Amiga series of computers.
+
+config ZORRO
+	bool
+	depends on APUS
+	default y
+	help
+	  This enables support for the Zorro bus in the Amiga. If you have
+	  expansion cards in your Amiga that conform to the Amiga
+	  AutoConfig(tm) specification, say Y, otherwise N. Note that even
+	  expansion cards that do not fit in the Zorro slots but fit in e.g.
+	  the CPU slot may fall in this category, so you have to say Y to let
+	  Linux use these.
+
+config ABSTRACT_CONSOLE
+	bool
+	depends on APUS
+	default y
+
+config APUS_FAST_EXCEPT
+	bool
+	depends on APUS
+	default y
+
+config AMIGA_PCMCIA
+	bool "Amiga 1200/600 PCMCIA support"
+	depends on APUS && EXPERIMENTAL
+	help
+	  Include support in the kernel for pcmcia on Amiga 1200 and Amiga
+	  600. If you intend to use pcmcia cards say Y; otherwise say N.
+
+config AMIGA_BUILTIN_SERIAL
+	tristate "Amiga builtin serial support"
+	depends on APUS
+	help
+	  If you want to use your Amiga's built-in serial port in Linux,
+	  answer Y.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config GVPIOEXT
+	tristate "GVP IO-Extender support"
+	depends on APUS
+	help
+	  If you want to use a GVP IO-Extender serial card in Linux, say Y.
+	  Otherwise, say N.
+
+config GVPIOEXT_LP
+	tristate "GVP IO-Extender parallel printer support"
+	depends on GVPIOEXT
+	help
+	  Say Y to enable driving a printer from the parallel port on your
+	  GVP IO-Extender card, N otherwise.
+
+config GVPIOEXT_PLIP
+	tristate "GVP IO-Extender PLIP support"
+	depends on GVPIOEXT
+	help
+	  Say Y to enable doing IP over the parallel port on your GVP
+	  IO-Extender card, N otherwise.
+
+config MULTIFACE_III_TTY
+	tristate "Multiface Card III serial support"
+	depends on APUS
+	help
+	  If you want to use a Multiface III card's serial port in Linux,
+	  answer Y.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config A2232
+	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && APUS
+	---help---
+	  This option supports the 2232 7-port serial card shipped with the
+	  Amiga 2000 and other Zorro-bus machines, dating from 1989.  At
+	  a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
+	  each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
+	  ports were connected with 8 pin DIN connectors on the card bracket,
+	  for which 8 pin to DB25 adapters were supplied. The card also had
+	  jumpers internally to toggle various pinning configurations.
+
+	  This driver can be built as a module; but then "generic_serial.o"
+	  will also be built as a module. This has to be loaded before
+	  "ser_a2232.o". If you want to do this, answer M here and read
+	  "<file:Documentation/modules.txt>".
+
+config WHIPPET_SERIAL
+	tristate "Hisoft Whippet PCMCIA serial support"
+	depends on AMIGA_PCMCIA
+	help
+	  HiSoft has a web page at <http://www.hisoft.co.uk/>, but there
+	  is no listing for the Whippet in their Amiga section.
+
+config APNE
+	tristate "PCMCIA NE2000 support"
+	depends on AMIGA_PCMCIA
+	help
+	  If you have a PCMCIA NE2000 compatible adapter, say Y.  Otherwise,
+	  say N.
+
+	  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 is called apne.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIAL_CONSOLE
+	bool "Support for serial port console"
+	depends on APUS && (AMIGA_BUILTIN_SERIAL=y || GVPIOEXT=y || MULTIFACE_III_TTY=y)
+
+config HEARTBEAT
+	bool "Use power LED as a heartbeat"
+	depends on APUS
+	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 PROC_HARDWARE
+	bool "/proc/hardware support"
+	depends on APUS
+
+source "drivers/zorro/Kconfig"
+
+endmenu
+
+
+menu "Advanced setup"
+
+config ADVANCED_OPTIONS
+	bool "Prompt for advanced kernel configuration options"
+	help
+	  This option will enable prompting for a variety of advanced kernel
+	  configuration options.  These options can cause the kernel to not
+	  work if they are set incorrectly, but can be used to optimize certain
+	  aspects of kernel memory management.
+
+	  Unless you know what you are doing, say N here.
+
+config HIGHMEM_START_BOOL
+	bool "Set high memory pool address"
+	depends on ADVANCED_OPTIONS && HIGHMEM
+	help
+	  This option allows you to set the base address of the kernel virtual
+	  area used to map high memory pages.  This can be useful in
+	  optimizing the layout of kernel virtual memory.
+
+	  Say N here unless you know what you are doing.
+
+config HIGHMEM_START
+	hex "Virtual start address of high memory pool"
+	depends on HIGHMEM_START_BOOL
+	default "0xfe000000"
+
+config LOWMEM_SIZE_BOOL
+	bool "Set maximum low memory"
+	depends on ADVANCED_OPTIONS && HIGHMEM
+	help
+	  This option allows you to set the maximum amount of memory which
+	  will be used as "low memory", that is, memory which the kernel can
+	  access directly, without having to set up a kernel virtual mapping.
+	  This can be useful in optimizing the layout of kernel virtual
+	  memory.
+
+	  Say N here unless you know what you are doing.
+
+config LOWMEM_SIZE
+	hex "Maximum low memory size (in bytes)"
+	depends on LOWMEM_SIZE_BOOL
+	default "0x20000000"
+
+config KERNEL_START_BOOL
+	bool "Set custom kernel base address"
+	depends on ADVANCED_OPTIONS
+	help
+	  This option allows you to set the kernel virtual address at which
+	  the kernel will map low memory (the kernel image will be linked at
+	  this address).  This can be useful in optimizing the virtual memory
+	  layout of the system.
+
+	  Say N here unless you know what you are doing.
+
+config KERNEL_START
+	hex "Virtual address of kernel base"
+	depends on KERNEL_START_BOOL
+	default "0xc0000000"
+
+config TASK_SIZE_BOOL
+	bool "Set custom user task size"
+	depends on ADVANCED_OPTIONS
+	help
+	  This option allows you to set the amount of virtual address space
+	  allocated to user tasks.  This can be useful in optimizing the
+	  virtual memory layout of the system.
+
+	  Say N here unless you know what you are doing.
+
+config TASK_SIZE
+	hex "Size of user task space"
+	depends on TASK_SIZE_BOOL
+	default "0x80000000"
+
+config PIN_TLB
+	bool "Pinned Kernel TLBs (860 ONLY)"
+	depends on ADVANCED_OPTIONS && 8xx
+
+config BOOT_LOAD_BOOL
+	bool "Set the boot link/load address"
+	depends on ADVANCED_OPTIONS && !ALL_PPC
+	help
+	  This option allows you to set the initial load address of the zImage
+	  or zImage.initrd file.  This can be useful if you are on a board
+	  which has a small amount of memory.
+
+	  Say N here unless you know what you are doing.
+
+config BOOT_LOAD
+	hex "Link/load address for booting"
+	depends on BOOT_LOAD_BOOL
+	default "0x00400000"
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+
+menu "ATA/IDE/MFM/RLL support"
+
+config IDE
+	tristate "ATA/IDE/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984.  Quite a number of
+	  disks use the IDE interface.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/message/fusion/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+
+menu "Console drivers"
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	depends on !4xx && !8xx
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard.  This can be
+	  useful on PReP systems and IBM RS/6000 or pSeries machines but is of
+	  limited usefulness on Apple machines.
+
+	  Say N here if you have an Apple machine.
+
+source "drivers/video/Kconfig"
+
+endmenu
+
+
+menu "iSeries device drivers"
+	depends on PPC_ISERIES
+
+config VIOCONS
+	tristate "iSeries Virtual Console Support"
+
+config VIODASD
+	tristate "iSeries Virtual I/O disk support"
+
+config VIODASD_IDE
+	bool "iSeries Virtual disk IDE emulation"
+	depends on VIODASD
+
+config VIOCD
+	tristate "iSeries Virtual I/O CD support"
+
+config VIOCD_AZTECH
+	bool "iSeries Virtual CD Aztech emulation"
+	depends on VIOCD
+
+config VIOTAPE
+	tristate "iSeries Virtual Tape Support"
+
+config VETH
+	tristate "iSeries Virtual Ethernet driver support"
+
+config VIOPATH
+	bool
+	depends on VIOCONS || VIODASD || VIOTAPE || VIOCD
+	default y
+
+config CD_NO_IDESCSI
+	bool
+	depends on VIOCD=y
+	default y
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+config BLK_DEV_IDECD
+	tristate
+	depends on VIOCD=y
+	default y
+
+endmenu
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+	depends on !PPC_ISERIES
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+source "drivers/input/Kconfig"
+
+
+menu "Macintosh device drivers"
+
+# we want to change this to something like CONFIG_SYSCTRL_CUDA/PMU
+config ADB_CUDA
+	bool "Support for CUDA based PowerMacs"
+	depends on ALL_PPC
+	help
+	  This provides support for CUDA based Power Macintosh systems.  This
+	  includes most OldWorld PowerMacs, the first generation iMacs, the
+	  Blue&White G3 and the "Yikes" G4 (PCI Graphics).  All later models
+	  should use CONFIG_ADB_PMU instead.  It is safe to say Y here even if
+	  your machine doesn't have a CUDA.
+
+	  If unsure say Y.
+
+config ADB_PMU
+	bool "Support for PMU  based PowerMacs"
+	depends on ALL_PPC
+	help
+	  On PowerBooks, iBooks, and recent iMacs and Power Macintoshes, the
+	  PMU is an embedded microprocessor whose primary function is to
+	  control system power, and battery charging on the portable models.
+	  The PMU also controls the ADB (Apple Desktop Bus) which connects to
+	  the keyboard and mouse on some machines, as well as the non-volatile
+	  RAM and the RTC (real time clock) chip.  Say Y to enable support for
+	  this device; you should do so if your machine is one of those
+	  mentioned above.
+
+config PMAC_PBOOK
+	bool "Power management support for PowerBooks"
+	depends on ADB_PMU
+	---help---
+	  This provides support for putting a PowerBook to sleep; it also
+	  enables media bay support.  Power management works on the
+	  PB2400/3400/3500, Wallstreet, Lombard, and Bronze PowerBook G3 and
+	  the Titanium Powerbook G4, as well as the iBooks.  You should get
+	  the power management daemon, pmud, to make it work and you must have
+	  the /dev/pmu device (see the pmud README).
+
+	  Get pmud from <ftp://ftp.samba.org/pub/ppclinux/pmud/>.
+
+	  If you have a PowerBook, you should say Y here.
+
+	  You may also want to compile the dma sound driver as a module and
+	  have it autoloaded. The act of removing the module shuts down the
+	  sound hardware for more power savings.
+
+config PM
+	bool
+	depends on ALL_PPC && ADB_PMU && PMAC_PBOOK
+	default y
+
+config PMAC_APM_EMU
+	tristate "APM emulation"
+	depends on PMAC_PBOOK
+
+# made a separate option since backlight may end up beeing used
+# on non-powerbook machines (but only on PMU based ones AFAIK)
+config PMAC_BACKLIGHT
+	bool "Backlight control for LCD screens"
+	depends on ADB_PMU
+	help
+	  Say Y here to build in code to manage the LCD backlight on a
+	  Macintosh PowerBook.  With this code, the backlight will be turned
+	  on and off appropriately on power-management and lid-open/lid-closed
+	  events; also, the PowerBook button device will be enabled so you can
+	  change the screen brightness.
+
+config MAC_FLOPPY
+	bool "Support for PowerMac floppy"
+	depends on ALL_PPC
+	help
+	  If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple)
+	  floppy controller, say Y here. Most commonly found in PowerMacs.
+
+config MAC_SERIAL
+	tristate "Support for PowerMac serial ports"
+	depends on ALL_PPC
+	help
+	  If you have Macintosh style serial ports (8 pin mini-DIN), say Y
+	  here. If you also have regular serial ports and enable the driver
+	  for them, you can't currently use the serial console feature.
+
+config SERIAL_CONSOLE
+	bool "Support for console on serial port"
+	depends on ALL_PPC && MAC_SERIAL=y
+
+config ADB
+	bool "Apple Desktop Bus (ADB) support"
+	depends on ALL_PPC
+	help
+	  Apple Desktop Bus (ADB) support is for support of devices which
+	  are connected to an ADB port.  ADB devices tend to have 4 pins.
+	  If you have an Apple Macintosh prior to the iMac, an iBook or
+	  PowerBook, or a "Blue and White G3", you probably want to say Y
+	  here.  Otherwise say N.
+
+config ADB_MACIO
+	bool "Include MacIO (CHRP) ADB driver"
+	depends on ADB
+	help
+	  Say Y here to include direct support for the ADB controller in the
+	  Hydra chip used on PowerPC Macintoshes of the CHRP type.  (The Hydra
+	  also includes a MESH II SCSI controller, DBDMA controller, VIA chip,
+	  OpenPIC controller and two RS422/Geoports.)
+
+config INPUT_ADBHID
+	bool "Support for ADB input devices (keyboard, mice, ...)"
+	depends on ADB && INPUT=y
+	help
+	  Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
+	  such as keyboards, mice, joysticks, trackpads  or graphic tablets
+	  handled by the input layer.  If you say Y here, make sure to say Y to
+	  the corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV),
+	  "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface
+	  support" (CONFIG_INPUT_EVDEV) as well.
+
+	  If unsure, say Y.
+
+config MAC_EMUMOUSEBTN
+	bool "Support for mouse button 2+3 emulation"
+	depends on INPUT_ADBHID
+	help
+	  This provides generic support for emulating the 2nd and 3rd mouse
+	  button with keypresses.  If you say Y here, the emulation is still
+	  disabled by default.  The emulation is controlled by these sysctl
+	  entries:
+	  /proc/sys/dev/mac_hid/mouse_button_emulation
+	  /proc/sys/dev/mac_hid/mouse_button2_keycode
+	  /proc/sys/dev/mac_hid/mouse_button3_keycode
+
+	  If you have an Apple machine with a 1-button mouse, say Y here.
+
+config ANSLCD
+	bool "Support for ANS LCD display"
+	depends on ADB_CUDA
+
+endmenu
+
+source "drivers/char/Kconfig"
+
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/oss/dmasound/Kconfig"
+
+source "sound/Kconfig"
+
+endmenu
+
+source "arch/ppc/8xx_io/Kconfig"
+
+source "arch/ppc/8260_io/Kconfig"
+
+
+menu "IBM 40x options"
+	depends on 40x
+
+config SERIAL_SICC
+	bool "SICC Serial port"
+	depends on STB03xxx
+
+config UART1_DFLT_CONSOLE
+	bool
+	depends on SERIAL_SICC && UART0_TTYS1
+	default y
+
+config SERIAL_SICC_CONSOLE
+	bool
+	depends on SERIAL_SICC && UART0_TTYS1
+	default y
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+source "lib/Kconfig"
+
+
+menu "Kernel hacking"
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	depends on DEBUG_KERNEL
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and to CONFIG_SMP to include code to check for missing
+	  spinlock initialization and some other common spinlock errors.
+
+config DEBUG_HIGHMEM
+	bool "Highmem debugging"
+	depends on DEBUG_KERNEL && HIGHMEM
+
+config KALLSYMS
+	bool "Load all symbols for debugging/kksymoops"
+	depends on DEBUG_KERNEL
+
+config KGDB
+	bool "Include kgdb kernel debugger"
+	depends on DEBUG_KERNEL
+	help
+	  Include in-kernel hooks for kgdb, the Linux kernel source level
+	  debugger.  See <http://kgdb.sourceforge.net/> for more information.
+	  Unless you are intending to debug the kernel, say N here.
+
+choice
+	prompt "Serial Port"
+	depends on KGDB
+	default KGDB_TTYS1
+
+config KGDB_TTYS0
+	bool "ttyS0"
+
+config KGDB_TTYS1
+	bool "ttyS1"
+
+config KGDB_TTYS2
+	bool "ttyS2"
+
+config KGDB_TTYS3
+	bool "ttyS3"
+
+endchoice
+
+config XMON
+	bool "Include xmon kernel debugger"
+	depends on DEBUG_KERNEL
+	help
+	  Include in-kernel hooks for the xmon kernel monitor/debugger.
+	  Unless you are intending to debug the kernel, say N here.
+
+config BDI_SWITCH
+	bool "Include BDI-2000 user context switcher"
+	depends on DEBUG_KERNEL
+	help
+	  Include in-kernel support for the Abatron BDI2000 debugger.
+	  Unless you are intending to debug the kernel with one of these
+	  machines, say N here.
+
+config MORE_COMPILE_OPTIONS
+	bool "Add any additional compile options"
+	depends on DEBUG_KERNEL && (KGDB || XMON || BDI_SWITCH)
+	help
+	  If you want to add additional CFLAGS to the kernel build, such as -g
+	  for KGDB or the BDI2000, enable this option and then enter what you
+	  would like to add in the next question.
+
+config COMPILE_OPTIONS
+	string "Additional compile arguments"
+	depends on MORE_COMPILE_OPTIONS
+	default "-g -ggdb"
+
+config BOOTX_TEXT
+	bool "Support for early boot text console (BootX or OpenFirmware only)"
+	depends on ALL_PPC
+	help
+	  Say Y here to see progress messages from the boot firmware in text
+	  mode. Requires either BootX or Open Firmware.
+
+config SERIAL_TEXT_DEBUG
+	bool "Support for early boot texts over serial port"
+	depends on 4xx || GT64260 || LOPEC || MCPN765 || PPLUS || PRPMC800 || SANDPOINT || ZX4500
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
diff -Nru a/arch/ppc/config.in b/arch/ppc/config.in
--- a/arch/ppc/config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,628 +0,0 @@
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-define_bool CONFIG_UID16 n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-define_bool CONFIG_HAVE_DEC_LOCK y
-
-mainmenu_name "Linux/PowerPC Kernel Configuration"
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Platform support'
-define_bool CONFIG_PPC y
-define_bool CONFIG_PPC32 y
-choice 'Processor Type'	\
-	"6xx/7xx/74xx/8260	CONFIG_6xx	\
-	 40x			CONFIG_40x	\
-	 POWER3               	CONFIG_POWER3	\
-	 8xx			CONFIG_8xx	\
-	 iSeries		CONFIG_PPC_ISERIES"	6xx
-
-if [ "$CONFIG_40x" = "y" ]; then
-  define_bool CONFIG_4xx y
-fi
-
-if [ "$CONFIG_6xx" = "y" ]; then
-   bool 'MPC8260 CPM Support' CONFIG_8260
-   if [ "$CONFIG_8260" = "n" ]; then
-      define_bool CONFIG_GENERIC_ISA_DMA y
-   fi
-fi
-
-if [ "$CONFIG_POWER3" = "y" ]; then
-   define_bool CONFIG_GENERIC_ISA_DMA y
-   define_bool CONFIG_PPC64BRIDGE y
-   define_bool CONFIG_ALL_PPC y
-fi
-
-if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
-   define_bool CONFIG_PPC64BRIDGE y
-fi
-
-if [ "$CONFIG_6xx" = "y" -o "$CONFIG_POWER3" = "y" ]; then
-   define_bool CONFIG_PPC_STD_MMU y
-else
-   define_bool CONFIG_PPC_STD_MMU n
-fi
-
-if [ "$CONFIG_8260" = "y" ]; then
-   define_bool CONFIG_SERIAL_CONSOLE y
-   choice 'Machine Type'	\
-	"EST8260	CONFIG_EST8260	\
-	 SBS8260	CONFIG_SBS8260	\
-	 RPXSUPER	CONFIG_RPX6	\
- 	 TQM8260	CONFIG_TQM8260	\
-	 Willow		CONFIG_WILLOW"	Willow
-fi
-
-if [ "$CONFIG_40x" = "y" ]; then
-    choice 'Machine Type'			\
-	"Ash		CONFIG_ASH		\
-	 Ceder		CONFIG_CEDER		\
-	 CPCI405	CONFIG_CPCI405 		\
-	 EP405/EP405PC	CONFIG_EP405 		\
-	 Oak		CONFIG_OAK 		\
-	 Redwood-4	CONFIG_REDWOOD_4 	\
-	 Redwood-5	CONFIG_REDWOOD_5 	\
-	 Tivo		CONFIG_TIVO 		\
-	 Walnut		CONFIG_WALNUT"	Walnut
-
-   if [ "$CONFIG_EP405" = "y" ]; then
-      bool 'EP405PC Support' CONFIG_EP405PC
-   fi  
-fi
-
-if [ "$CONFIG_8xx" = "y" ]; then
-   define_bool CONFIG_SERIAL_CONSOLE y
-   define_bool CONFIG_NOT_COHERENT_CACHE y
-
-   choice 'Machine Type'		\
-	"RPX-Lite	CONFIG_RPXLITE		\
-	 RPX-Classic	CONFIG_RPXCLASSIC	\
-	 BSE-IP		CONFIG_BSEIP		\
-	 FADS		CONFIG_FADS		\
- 	 TQM823L	CONFIG_TQM823L		\
- 	 TQM850L	CONFIG_TQM850L		\
- 	 TQM855L	CONFIG_TQM855L		\
-  	 TQM860L	CONFIG_TQM860L		\
- 	 FPS850L	CONFIG_FPS850L		\
- 	 SPD823TS	CONFIG_SPD823TS		\
- 	 IVMS8		CONFIG_IVMS8		\
-	 IVML24		CONFIG_IVML24		\
- 	 SM850		CONFIG_SM850		\
-	 HERMES		CONFIG_HERMES_PRO	\
-	 IP860		CONFIG_IP860		\
-	 LWMON		CONFIG_LWMON		\
-	 PCU_E		CONFIG_PCU_E		\
-	 CCM		CONFIG_CCM		\
-	 LANTEC		CONFIG_LANTEC		\
-	 MBX		CONFIG_MBX		\
-	 WinCept	CONFIG_WINCEPT"		RPX-Lite
-
-   if [ "$CONFIG_TQM823L" = "y" -o \
-       "$CONFIG_TQM850L" = "y" -o \
-       "$CONFIG_FPS850L" = "y" -o \
-       "$CONFIG_TQM855L" = "y" -o \
-       "$CONFIG_TQM860L" = "y" -o \
-       "$CONFIG_SM850"   = "y" ]; then
-      define_bool CONFIG_TQM8xxL y
-   fi
-fi
-
-if [ "$CONFIG_6xx" = "y" -a "$CONFIG_8260" = "n" ]; then
-   choice 'Machine Type'		\
-	"CHRP/PowerMac/PReP	CONFIG_ALL_PPC		\
-	 Amiga-APUS		CONFIG_APUS		\
-	 Cogent-Willow		CONFIG_WILLOW		\
-	 Force-PowerCore	CONFIG_PCORE		\
-	 Force-PowerPMC250	CONFIG_POWERPMC250	\
-	 Galileo-EV-64260-BP	CONFIG_EV64260		\
-	 IBM-Spruce		CONFIG_SPRUCE		\
-	 MEN-F1			CONFIG_MENF1		\
-	 Motorola-LoPEC		CONFIG_LOPEC		\
-	 Motorola-MCPN765	CONFIG_MCPN765		\
-	 Motorola-MVME5100	CONFIG_MVME5100		\
-         Motorola-PowerPlus     CONFIG_PPLUS            \
-	 Motorola-PrPMC750	CONFIG_PRPMC750		\
-	 Motorola-PrPMC800	CONFIG_PRPMC800		\
-	 Motorola-Sandpoint	CONFIG_SANDPOINT	\
-	 SBS-Adirondack		CONFIG_ADIR		\
-	 SBS-K2			CONFIG_K2		\
-	 SBS-Palomar4		CONFIG_PAL4		\
-	 Synergy-Gemini		CONFIG_GEMINI		\
-	 Zynx-ZX4500		CONFIG_ZX4500"		CHRP/PowerMac/PReP
-
-   if [ "$CONFIG_SANDPOINT" = "y" ]; then
-      bool '  Sandpoint X3' CONFIG_SANDPOINT_X3
-   fi
-   if [ "$CONFIG_PCORE" = "y" -o "$CONFIG_POWERPMC250" = "y" ]; then
-      define_bool CONFIG_FORCE y
-   fi
-   if [ "$CONFIG_LOPEC" = "y" -o "$CONFIG_SANDPOINT_X3" = "y" ]; then
-      define_bool CONFIG_EPIC_SERIAL_MODE y
-   fi
-fi
-
-if [ "$CONFIG_FORCE" = "y" -o "$CONFIG_MENF1" = "y" \
-     -o "$CONFIG_SANDPOINT" = "y" -o "$CONFIG_ZX4500" = "y" ]; then
-   bool 'Enable MPC10x store gathering' CONFIG_MPC10X_STORE_GATHERING
-fi
-
-if [ "$CONFIG_EV64260" = "y" ]; then
-   define_bool CONFIG_GT64260 y
-   define_int CONFIG_SERIAL_CONSOLE_BAUD 115200
-fi
-
-if [ "$CONFIG_K2" = "y" ]; then
-   bool 'Enable CPC710 data gathering' CONFIG_CPC710_DATA_GATHERING
-fi
-
-if [ "$CONFIG_MVME5100" = "y" ]; then
-   bool 'MVME5100 configured with an IPMC761' CONFIG_MVME5100_IPMC761_PRESENT
-fi
-
-if [ "$CONFIG_SPRUCE" = "y" ]; then
-   bool 'Spruce baud clock support' CONFIG_SPRUCE_BAUD_33M
-fi
-
-if [ "$CONFIG_PPC_STD_MMU" != "y" ]; then
-   define_bool CONFIG_ALL_PPC n
-fi
-
-bool 'Symmetric multi-processing support' CONFIG_SMP
-if [ "$CONFIG_SMP" = "y" ]; then
-   bool '  Distribute interrupts on all CPUs by default' CONFIG_IRQ_ALL_CPUS
-   int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-fi
-if [ "$CONFIG_SMP" != "y" ]; then
-   bool 'Preemptible Kernel' CONFIG_PREEMPT
-fi
-
-if [ "$CONFIG_6xx" = "y" -a "$CONFIG_8260" = "n" ];then
-   bool 'AltiVec Support' CONFIG_ALTIVEC
-   bool 'Thermal Management Support' CONFIG_TAU
-   if [ "$CONFIG_TAU" = "y" ]; then
-      bool '    Interrupt driven TAU driver (DANGEROUS)' CONFIG_TAU_INT
-      bool '    Average high and low temp' CONFIG_TAU_AVERAGE
-   fi
-fi
-
-if [ "$CONFIG_4xx" = "y" -o "$CONFIG_8xx" = "y" ]; then
-   bool 'Math emulation' CONFIG_MATH_EMULATION
-fi
-
-if [ "$CONFIG_40x" = "y" ]; then
-# It's often necessary to know the specific 4xx processor type.
-# Fortunately, it is impled (so far) from the board type, so we
-# don't need to ask more redundant questions.
-   if [ "$CONFIG_ASH" = "y" ]; then
-      define_bool CONFIG_NP405H y
-      define_bool CONFIG_TREEBOOT y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-   if [ "$CONFIG_CEDER" = "y" ]; then
-      define_bool CONFIG_NP405L y
-      define_bool CONFIG_BIOS_FIXUP y
-      define_bool CONFIG_TREEBOOT y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-   if [ "$CONFIG_CPCI405" = "y" ]; then
-      define_bool CONFIG_405GP y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-   if [ "$CONFIG_EP405" = "y" ]; then
-      define_bool CONFIG_405GP y
-      define_bool CONFIG_BIOS_FIXUP y
-      define_bool CONFIG_EMBEDDEDBOOT y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-   if [ "$CONFIG_OAK" = "y" -o "$CONFIG_TIVO" = "y" ]; then
-      define_bool CONFIG_403GCX y
-      define_bool CONFIG_TREEBOOT y
-   fi
-   if [ "$CONFIG_REDWOOD_4" = "y" ]; then
-      define_bool CONFIG_STB03xxx y
-      define_bool CONFIG_TREEBOOT y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-   if [ "$CONFIG_REDWOOD_5" = "y" ]; then
-      define_bool CONFIG_STB03xxx y
-      define_bool CONFIG_TREEBOOT y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-   if [ "$CONFIG_WALNUT" = "y" ]; then
-      define_bool CONFIG_405GP y
-      define_bool CONFIG_BIOS_FIXUP y
-      define_bool CONFIG_TREEBOOT y
-      define_bool CONFIG_IBM405_ERR77 y
-      define_bool CONFIG_IBM_OCP y
-   fi
-
-   bool 'Blue Logic DMA' CONFIG_405_DMA
-   dep_bool 'Power Management support (EXPERIMENTAL)' CONFIG_PM $CONFIG_EXPERIMENTAL
-
-   choice 'TTYS0 device and default console'	\
-	"UART0  CONFIG_UART0_TTYS0		\
-	 UART1	CONFIG_UART0_TTYS1"		UART0
-
-   define_bool CONFIG_IBM405_ERR51 y
-   define_bool CONFIG_NOT_COHERENT_CACHE y
-fi
-
-if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then
-      define_bool CONFIG_EMBEDDEDBOOT y
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-bool 'High memory support' CONFIG_HIGHMEM
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   bool 'Support for ISA-bus hardware' CONFIG_ISA
-else
-   define_bool CONFIG_ISA n
-fi
-define_bool CONFIG_EISA n
-define_bool CONFIG_SBUS n
-
-# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
-define_bool CONFIG_MCA n
-
-if [ "$CONFIG_4xx" = "y" -o "$CONFIG_8260" = "y" ]; then
-   bool "PCI support" CONFIG_PCI
-   bool 'PC PS/2 style Keyboard' CONFIG_PC_KEYBOARD
-else
-   if [ "$CONFIG_8xx" = "y" ]; then
-      bool 'QSpan PCI' CONFIG_PCI_QSPAN
-      define_bool CONFIG_PCI $CONFIG_PCI_QSPAN
-   else
-      if [ "$CONFIG_APUS" = "y" ]; then
-        bool 'PCI for Permedia2' CONFIG_PCI_PERMEDIA
-        define_bool CONFIG_PCI $CONFIG_PCI_PERMEDIA
-      else
-         if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
-	    bool "IBM iSeries Native I/O Support" CONFIG_PCI_ISERIES
-	    define_bool CONFIG_PCI $CONFIG_PCI_ISERIES
-	 else
-	    define_bool CONFIG_PCI y
-	 fi
-      fi
-   fi
-fi
-
-# only elf supported, a.out is not -- Cort
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-define_bool CONFIG_BINFMT_ELF y
-define_bool CONFIG_KERNEL_ELF y
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ]; then
-   source drivers/pcmcia/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-
-source drivers/parport/Config.in
-
-if [ "$CONFIG_ALL_PPC" = "y" -a "$CONFIG_POWER3" = "n" ] ; then
-   bool 'Workarounds for PPC601 bugs' CONFIG_PPC601_SYNC_FIX
-fi
-
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE
-   bool 'Support for RTAS (RunTime Abstraction Services) in /proc' CONFIG_PPC_RTAS
-   bool 'Support for PReP Residual Data' CONFIG_PREP_RESIDUAL
-   dep_bool '  Support for reading of PReP Residual Data in /proc' CONFIG_PROC_PREPRESIDUAL $CONFIG_PREP_RESIDUAL
-   define_bool CONFIG_PPCBUG_NVRAM y
-fi
-if [ "$CONFIG_PPLUS" = "y" -o "$CONFIG_LOPEC" = "y" ]; then
-   bool 'Enable reading PPCBUG NVRAM during boot' CONFIG_PPCBUG_NVRAM
-fi
-
-bool 'Default bootloader kernel arguments' CONFIG_CMDLINE_BOOL
-if [ "$CONFIG_CMDLINE_BOOL" = "y" ] ; then
-   string 'Initial kernel command string' CONFIG_CMDLINE "console=ttyS0,9600 console=tty0 root=/dev/sda2"
-fi
-
-if [ "$CONFIG_APUS" = "y" ]; then
-   define_bool CONFIG_FB_CONSOLE y
-   define_bool CONFIG_AMIGA y
-   define_bool CONFIG_ZORRO y
-   define_bool CONFIG_ABSTRACT_CONSOLE y
-   define_bool CONFIG_APUS_FAST_EXCEPT y
-
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      bool 'Amiga 1200/600 PCMCIA support' CONFIG_AMIGA_PCMCIA
-   fi
-
-   tristate 'Amiga builtin serial support' CONFIG_AMIGA_BUILTIN_SERIAL
-   tristate 'GVP IO-Extender support' CONFIG_GVPIOEXT
-   dep_tristate 'GVP IO-Extender parallel printer support' CONFIG_GVPIOEXT_LP $CONFIG_GVPIOEXT
-   dep_tristate 'GVP IO-Extender PLIP support' CONFIG_GVPIOEXT_PLIP $CONFIG_GVPIOEXT
-   tristate 'Multiface Card III serial support' CONFIG_MULTIFACE_III_TTY
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
-   fi
-   if [ "$CONFIG_AMIGA_PCMCIA" = "y" ]; then
-      tristate 'Hisoft Whippet PCMCIA serial support' CONFIG_WHIPPET_SERIAL
-      tristate 'PCMCIA NE2000 support' CONFIG_APNE
-   fi
-   if [ "$CONFIG_AMIGA_BUILTIN_SERIAL" = "y" -o "$CONFIG_GVPIOEXT" = "y" -o \
-        "$CONFIG_MULTIFACE_III_TTY" = "y" ]; then
-      bool 'Support for serial port console' CONFIG_SERIAL_CONSOLE
-   fi
-   bool 'Use power LED as a heartbeat' CONFIG_HEARTBEAT
-   bool '/proc/hardware support' CONFIG_PROC_HARDWARE
-   source drivers/zorro/Config.in
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'Advanced setup'
-bool 'Prompt for advanced kernel configuration options' CONFIG_ADVANCED_OPTIONS
-if [ "$CONFIG_ADVANCED_OPTIONS" = "y" ]; then
-   if [ "$CONFIG_HIGHMEM" = "y" ]; then
-      bool "  Set high memory pool address" CONFIG_HIGHMEM_START_BOOL
-      if [ "$CONFIG_HIGHMEM_START_BOOL" = "y" ]; then
-         hex "    Virtual start address of high memory pool" CONFIG_HIGHMEM_START 0xfe000000
-      fi
-      bool "  Set maximum low memory" CONFIG_LOWMEM_SIZE_BOOL
-      if [ "$CONFIG_LOWMEM_SIZE_BOOL" = "y" ]; then
-         hex "    Maximum low memory size (in bytes)" CONFIG_LOWMEM_SIZE 0x20000000
-      fi
-   fi
-
-   bool "Set custom kernel base address" CONFIG_KERNEL_START_BOOL
-   if [ "$CONFIG_KERNEL_START_BOOL" = "y" ]; then
-      hex "  Virtual address of kernel base" CONFIG_KERNEL_START 0xc0000000
-   fi
-   bool "Set custom user task size" CONFIG_TASK_SIZE_BOOL
-   if [ "$CONFIG_TASK_SIZE_BOOL" = "y" ]; then
-      hex "  Size of user task space" CONFIG_TASK_SIZE 0x80000000
-   fi
-   if [ "$CONFIG_8xx" = "y" ]; then
-      bool "Pinned Kernel TLBs (860 ONLY)" CONFIG_PIN_TLB
-   fi
-   if [ "$CONFIG_ALL_PPC" != "y" ]; then
-      bool "Set the boot link/load address" CONFIG_BOOT_LOAD_BOOL
-      if [ "$CONFIG_BOOT_LOAD_BOOL" = "y" ]; then
-         hex "  Link/load address for booting" CONFIG_BOOT_LOAD 0x00400000
-      fi
-   fi
-fi
-endmenu
-
-source drivers/mtd/Config.in
-source drivers/pnp/Config.in
-source drivers/block/Config.in
-source drivers/md/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/IDE/MFM/RLL support'
-
-tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
-if [ "$CONFIG_IDE" != "n" ]; then
-   source drivers/ide/Config.in
-else
-   define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-tristate 'SCSI support' CONFIG_SCSI
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/message/fusion/Config.in
-
-source drivers/ieee1394/Config.in
-
-source drivers/message/i2o/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-         source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-mainmenu_option next_comment
-comment 'Console drivers'
-if [ "$CONFIG_4xx" != "y" -a "$CONFIG_8xx" != "y" ]; then
-   bool 'VGA text console' CONFIG_VGA_CONSOLE
-fi
-source drivers/video/Config.in
-endmenu
-
-
-if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'iSeries device drivers'
-   tristate 'iSeries Virtual Console Support' CONFIG_VIOCONS
-   tristate 'iSeries Virtual I/O disk support' CONFIG_VIODASD
-   if [ "$CONFIG_VIODASD" = "y" -o "$CONFIG_VIODASD" = "m" ]; then
-      bool 'iSeries Virtual disk IDE emulation' CONFIG_VIODASD_IDE
-   fi
-   tristate 'iSeries Virtual I/O CD support' CONFIG_VIOCD
-   if [ "$CONFIG_VIOCD" = "y" -o "$CONFIG_VIOCD" = "m" ]; then
-      bool 'iSeries Virtual CD Aztech emulation' CONFIG_VIOCD_AZTECH
-   fi
-   tristate 'iSeries Virtual Tape Support' CONFIG_VIOTAPE
-   tristate 'iSeries Virtual Ethernet driver support' CONFIG_VETH
-   if [ "$CONFIG_VIOCONS" != "n" -o "$CONFIG_VIODASD" != "n" \
-	-o "$CONFIG_VIOTAPE" != "n" -o "$CONFIG_VIOCD" != "n" ]; then
-      define_bool CONFIG_VIOPATH y
-   fi
-   if [ "$CONFIG_VIOCD" = "y" ]; then
-      define_bool CONFIG_CD_NO_IDESCSI y
-      define_bool CONFIG_BLK_DEV_IDECD y
-   fi
-   endmenu
-else
-   mainmenu_option next_comment
-   comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-   bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-   if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-      source drivers/cdrom/Config.in
-   fi
-   endmenu
-fi
-
-source drivers/input/Config.in
-
-mainmenu_option next_comment
-comment 'Macintosh device drivers'
-
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   # we want to change this to something like CONFIG_SYSCTRL_CUDA/PMU
-   bool 'Support for CUDA based PowerMacs' CONFIG_ADB_CUDA
-   bool 'Support for PMU  based PowerMacs' CONFIG_ADB_PMU
-   if [ "$CONFIG_ADB_PMU" = "y" ]; then
-      bool '   Power management support for PowerBooks' CONFIG_PMAC_PBOOK
-      if [ "$CONFIG_PMAC_PBOOK" = "y" ]; then
-         define_bool CONFIG_PM y
-         tristate '     APM emulation' CONFIG_PMAC_APM_EMU
-      fi
-      # made a separate option since backlight may end up beeing used
-      # on non-powerbook machines (but only on PMU based ones AFAIK)
-      bool '   Backlight control for LCD screens' CONFIG_PMAC_BACKLIGHT
-   fi
-   bool 'Support for PowerMac floppy' CONFIG_MAC_FLOPPY
-   tristate 'Support for PowerMac serial ports' CONFIG_MAC_SERIAL
-   if [ "$CONFIG_MAC_SERIAL" = "y" ]; then
-      bool '   Support for console on serial port' CONFIG_SERIAL_CONSOLE
-   fi
-   bool 'Apple Desktop Bus (ADB) support' CONFIG_ADB
-   if [ "$CONFIG_ADB" = "y" ]; then
-      bool '   Include MacIO (CHRP) ADB driver' CONFIG_ADB_MACIO
-      dep_bool '   Support for ADB input devices (keyboard, mice, ...)' CONFIG_INPUT_ADBHID $CONFIG_INPUT
-      if [ "$CONFIG_INPUT_ADBHID" = "y" ]; then
-         bool '     Support for mouse button 2+3 emulation' CONFIG_MAC_EMUMOUSEBTN
-      fi
-   fi
-   if [ "$CONFIG_ADB_CUDA" != "n" ]; then
-      bool 'Support for ANS LCD display' CONFIG_ANSLCD
-   fi
-fi
-endmenu
-
-source drivers/char/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'Sound'
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/oss/dmasound/Config.in
-   source sound/Config.in
-fi
-endmenu
-
-if [ "$CONFIG_8xx" = "y" ]; then
-   source arch/ppc/8xx_io/Config.in
-fi
-
-if [ "$CONFIG_8260" = "y" ]; then
-   source arch/ppc/8260_io/Config.in
-fi
-
-if [ "$CONFIG_40x" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'IBM 40x options'
-   if [ "$CONFIG_STB03xxx" = "y" ]; then
-      bool 'SICC Serial port' CONFIG_SERIAL_SICC
-      if [ "$CONFIG_SERIAL_SICC" = "y" -a "$CONFIG_UART0_TTYS1" = "y" ]; then
-	 define_bool CONFIG_UART1_DFLT_CONSOLE y	
-	 define_bool CONFIG_SERIAL_SICC_CONSOLE y
-      fi
-   fi
-   endmenu
-fi
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-source lib/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" = "y" ]; then
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   if [ "$CONFIG_HIGHMEM" = "y" ]; then
-      bool '  Highmem debugging' CONFIG_DEBUG_HIGHMEM
-   fi
-   bool '  Load all symbols for debugging/kksymoops' CONFIG_KALLSYMS
-   bool '  Include kgdb kernel debugger' CONFIG_KGDB
-   if [ "$CONFIG_KGDB" = "y" ]; then
-      choice '    Serial Port'			\
-	"ttyS0	CONFIG_KGDB_TTYS0		\
-	 ttyS1	CONFIG_KGDB_TTYS1		\
-	 ttyS2	CONFIG_KGDB_TTYS2		\
-	 ttyS3	CONFIG_KGDB_TTYS3"		ttyS1
-   fi
-   bool '  Include xmon kernel debugger' CONFIG_XMON
-   bool '  Include BDI-2000 user context switcher' CONFIG_BDI_SWITCH
-   if [ "$CONFIG_KGDB" = "y" -o "$CONFIG_XMON" = "y" \
-	-o "$CONFIG_BDI_SWITCH" = "y" ]; then
-      bool '  Add any additional compile options' CONFIG_MORE_COMPILE_OPTIONS
-      if [ "$CONFIG_MORE_COMPILE_OPTIONS" = "y" ]; then
-	 string '    Additional compile arguments' CONFIG_COMPILE_OPTIONS "-g -ggdb"
-      fi
-   fi
-fi
-
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   bool 'Support for early boot text console (BootX or OpenFirmware only)' CONFIG_BOOTX_TEXT
-fi
-if [ "$CONFIG_4xx" = "y" -o "$CONFIG_GT64260" = "y"		\
-     -o "$CONFIG_LOPEC" = "y" -o "$CONFIG_MCPN765" = "y"	\
-     -o "$CONFIG_PPLUS" = "y" -o "$CONFIG_PRPMC800" = "y"	\
-     -o "$CONFIG_SANDPOINT" = "y" -o "$CONFIG_ZX4500" = "y" ]; then
-   bool 'Support for early boot texts over serial port' CONFIG_SERIAL_TEXT_DEBUG
-fi
-endmenu
-
-source security/Config.in
-
diff -Nru a/arch/ppc64/Config.help b/arch/ppc64/Config.help
--- a/arch/ppc64/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,299 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, say N. If you have a system with more
-  than one CPU, say Y.  Note that the kernel does not currently
-  support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
-  since they have inadequate hardware support for multiprocessor
-  operation.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on single-processor machines.
-  On a single-processor machine, the kernel will run faster if you say
-  N here.
-
-  If you don't know what to do here, say N.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  Unfortunately the kernel code has some race conditions if both
-  CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
-  currently disabled if you are building an SMP kernel.
-
-  Say Y here if you are building a kernel for a desktop, embedded
-  or real-time system.  Say N if you are unsure.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984.  Quite a number of
-  disks use the IDE interface.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA is the
-  name of a bus system, i.e. the way the CPU talks to the other stuff
-  inside your box.  If you have an Apple machine, say N here; if you
-  have an IBM RS/6000 or pSeries machine or a PReP machine, say Y.  If
-  you have an embedded board, consult your board documentation.
-
-CONFIG_PCI
-  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
-  your box.  If you say Y here, the kernel will include drivers and
-  infrastructure code to support PCI bus devices.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image in ELF format. This
-  can be used in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp.  It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>).  Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard.  This can be
-  useful on PReP systems and IBM RS/6000 or pSeries machines but is of
-  limited usefulness on Apple machines.
-
-  Say N here if you have an Apple machine.
-
-CONFIG_IRQ_ALL_CPUS
-  This option gives the kernel permission to distribute IRQs across
-  multiple CPUs.  Saying N here will route all IRQs to the first
-  CPU.  Generally saying Y is safe, although some problems have been
-  reported with SMP Power Macintoshes with this option enabled.
-
-CONFIG_FB
-  The frame buffer device provides an abstraction for the graphics
-  hardware. It represents the frame buffer of some video hardware and
-  allows application software to access the graphics hardware through
-  a well-defined interface, so the software doesn't need to know
-  anything about the low-level (hardware register) stuff.
-
-  Frame buffer devices work identically across the different
-  architectures supported by Linux and make the implementation of
-  application programs easier and more portable; at this point, an X
-  server exists which uses the frame buffer device exclusively.
-  On several non-X86 architectures, the frame buffer device is the
-  only way to use the graphics hardware.
-
-  The device is accessed through special device nodes, usually located
-  in the /dev directory, i.e. /dev/fb*.
-
-  You need an utility program called fbset to make full use of frame
-  buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
-  and the Framebuffer-HOWTO at
-  <http://www.tahallah.demon.co.uk/programming/prog.html> for more
-  information.
-
-  Saying Y here is recommended if your machine has graphics hardware,
-  and strongly recommended if you are compiling a kernel for an Apple
-  machine.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a graphics card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_MOUSE
-  This is for machines with a mouse which is neither a serial nor a
-  USB nor a bus mouse.  Examples are PS/2 mice (including the track
-  balls on some laptops) and some digitizer pads.  Say Y here if you
-  have a CHRP machine (such as an IBM RS/6000 or pSeries machine) with
-  a PS/2-style mouse.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about non-serial mice. If unsure, say Y.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_PROC_DEVICETREE
-  This option adds a device-tree directory under /proc which contains
-  an image of the device tree that the kernel copies from Open
-  Firmware. If unsure, say Y here.
-
-CONFIG_CMDLINE
-  On some platforms, there is currently no way for the boot loader to
-  pass arguments to the kernel. For these platforms, you can supply
-  some command-line options at build time by entering them here.  In
-  most cases you will need to specify the root device here.
-
-CONFIG_XMON
-  Include in-kernel hooks for the xmon kernel monitor/debugger.
-  Unless you are intending to debug the kernel, say N here.
diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/ppc64/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,533 @@
+# 
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config UID16
+	bool
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	default y
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+config HAVE_DEC_LOCK
+	bool
+	default y
+
+config EARLY_PRINTK
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "Platform support"
+
+choice
+	prompt "Platform Type"
+	default PPC_PSERIES
+
+config PPC_ISERIES
+	bool "iSeries"
+
+config PPC_PSERIES
+	bool "pSeries"
+
+endchoice
+
+config PPC
+	bool
+	default y
+
+config PPC64
+	bool
+	default y
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, say N. If you have a system with more
+	  than one CPU, say Y.  Note that the kernel does not currently
+	  support SMP machines with 603/603e/603ev or PPC750 ("G3") processors
+	  since they have inadequate hardware support for multiprocessor
+	  operation.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on single-processor machines.
+	  On a single-processor machine, the kernel will run faster if you say
+	  N here.
+
+	  If you don't know what to do here, say N.
+
+config IRQ_ALL_CPUS
+	bool "Distribute interrupts on all CPUs by default"
+	depends on SMP
+	help
+	  This option gives the kernel permission to distribute IRQs across
+	  multiple CPUs.  Saying N here will route all IRQs to the first
+	  CPU.  Generally saying Y is safe, although some problems have been
+	  reported with SMP Power Macintoshes with this option enabled.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-64)"
+	depends on SMP
+	default "32"
+
+config HMT
+	bool "Hardware multithreading"
+	depends on SMP && PPC_PSERIES
+
+config DISCONTIGMEM
+	bool "Discontiguous Memory Support"
+	depends on SMP && PPC_PSERIES
+
+config NUMA
+	bool "NUMA support"
+	depends on DISCONTIGMEM
+
+config PREEMPT
+	bool
+	help
+	  This option reduces the latency of the kernel when reacting to
+	  real-time or interactive events by allowing a low priority process to
+	  be preempted even if it is in kernel mode executing a system call.
+	  Unfortunately the kernel code has some race conditions if both
+	  CONFIG_SMP and CONFIG_PREEMPT are enabled, so this option is
+	  currently disabled if you are building an SMP kernel.
+
+	  Say Y here if you are building a kernel for a desktop, embedded
+	  or real-time system.  Say N if you are unsure.
+
+config MSCHUNKS
+	bool
+	depends on PPC_ISERIES
+	default y
+
+config RTAS_FLASH
+	tristate "Firmware flash interface"
+	depends on !PPC_ISERIES
+
+endmenu
+
+
+menu "General setup"
+
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA is the
+	  name of a bus system, i.e. the way the CPU talks to the other stuff
+	  inside your box.  If you have an Apple machine, say N here; if you
+	  have an IBM RS/6000 or pSeries machine or a PReP machine, say Y.  If
+	  you have an embedded board, consult your board documentation.
+
+config SBUS
+	bool
+
+config MCA
+	bool
+
+config EISA
+	bool
+
+config PCI
+	bool
+	default y
+	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
+	  your box.  If you say Y here, the kernel will include drivers and
+	  infrastructure code to support PCI bus devices.
+
+# only elf supported, a.out is not -- Cort
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	help
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image in ELF format. This
+	  can be used in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel.
+
+config BINFMT_ELF
+	bool "Kernel support for 64-bit ELF binaries"
+	help
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems.
+
+config BINFMT_ELF32
+	tristate "Kernel support for 32-bit ELF binaries"
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp.  It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>).  Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/hotplug/Kconfig"
+
+config PROC_DEVICETREE
+	bool "Support for Open Firmware device tree in /proc"
+	depends on !PPC_ISERIES
+	help
+	  This option adds a device-tree directory under /proc which contains
+	  an image of the device tree that the kernel copies from Open
+	  Firmware. If unsure, say Y here.
+
+config CMDLINE_BOOL
+	bool "Default bootloader kernel arguments"
+	depends on !PPC_ISERIES
+
+config CMDLINE
+	string "Initial kernel command string"
+	depends on CMDLINE_BOOL
+	default "console=ttyS0,9600 console=tty0 root=/dev/sda2"
+	help
+	  On some platforms, there is currently no way for the boot loader to
+	  pass arguments to the kernel. For these platforms, you can supply
+	  some command-line options at build time by entering them here.  In
+	  most cases you will need to specify the root device here.
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984.  Quite a number of
+	  disks use the IDE interface.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI device support"
+
+config SCSI
+	tristate "SCSI device support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/md/Kconfig"
+
+source "drivers/message/fusion/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+source "drivers/video/Kconfig"
+
+endmenu
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "iSeries device drivers"
+	depends on PPC_ISERIES
+
+config VIOCONS
+	tristate "iSeries Virtual Console Support"
+
+config VIODASD
+	tristate "iSeries Virtual I/O disk support"
+
+config VIODASD_IDE
+	bool "iSeries Virtual disk IDE emulation"
+	depends on VIODASD
+
+config VIOCD
+	tristate "iSeries Virtual I/O CD support"
+
+config VIOCD_AZTECH
+	bool "iSeries Virtual CD Aztech emulation"
+	depends on VIOCD
+
+config VIOTAPE
+	tristate "iSeries Virtual Tape Support"
+
+config VETH
+	tristate "iSeries Virtual Ethernet driver support"
+
+endmenu
+
+config VIOPATH
+	bool
+	depends on PPC_ISERIES
+	default y
+
+
+menu "Kernel hacking"
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	depends on DEBUG_KERNEL
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config XMON
+	bool "Include xmon kernel debugger"
+	depends on DEBUG_KERNEL
+	help
+	  Include in-kernel hooks for the xmon kernel monitor/debugger.
+	  Unless you are intending to debug the kernel, say N here.
+
+config XMON_DEFAULT
+	bool "Enable xmon by default"
+	depends on XMON
+
+config PPCDBG
+	bool "Include PPCDBG realtime debugging"
+	depends on DEBUG_KERNEL
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/ppc64/config.in b/arch/ppc64/config.in
--- a/arch/ppc64/config.in	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,210 +0,0 @@
-# 
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-define_bool CONFIG_UID16 n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-define_bool CONFIG_GENERIC_ISA_DMA y
-define_bool CONFIG_HAVE_DEC_LOCK y
-define_bool CONFIG_EARLY_PRINTK y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Platform support'
-choice 'Platform Type'	\
-	 "iSeries               CONFIG_PPC_ISERIES \
-	 pSeries                CONFIG_PPC_PSERIES " pSeries
-define_bool CONFIG_PPC y
-define_bool CONFIG_PPC64 y
-
-bool 'Symmetric multi-processing support' CONFIG_SMP
-if [ "$CONFIG_SMP" = "y" ]; then
-  bool '  Distribute interrupts on all CPUs by default' CONFIG_IRQ_ALL_CPUS
-  int  'Maximum number of CPUs (2-64)' CONFIG_NR_CPUS 32
-  if [ "$CONFIG_PPC_PSERIES" = "y" ]; then
-    bool '  Hardware multithreading' CONFIG_HMT
-    bool '  Discontiguous Memory Support' CONFIG_DISCONTIGMEM
-    if [ "$CONFIG_DISCONTIGMEM" = "y" ]; then
-      bool '    NUMA support' CONFIG_NUMA
-    fi
-  fi
-fi
-define_bool CONFIG_PREEMPT n
-
-if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
-   define_bool CONFIG_MSCHUNKS y
-else
-   tristate '  Firmware flash interface' CONFIG_RTAS_FLASH
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-define_bool CONFIG_ISA n
-define_bool CONFIG_SBUS n
-define_bool CONFIG_MCA n
-define_bool CONFIG_EISA n
-define_bool CONFIG_PCI y
-
-# only elf supported, a.out is not -- Cort
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-
-bool 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
-
-tristate 'Kernel support for 32-bit ELF binaries' CONFIG_BINFMT_ELF32
-
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ]; then
-   source drivers/pcmcia/Config.in
-   source drivers/hotplug/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-   define_bool CONFIG_HOTPLUG_PCI n
-fi
-
-if [ "$CONFIG_PPC_ISERIES" != "y" ]; then
-   bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE
-
-   bool 'Default bootloader kernel arguments' CONFIG_CMDLINE_BOOL
-   if [ "$CONFIG_CMDLINE_BOOL" = "y" ] ; then
-     string 'Initial kernel command string' CONFIG_CMDLINE "console=ttyS0,9600 console=tty0 root=/dev/sda2"
-   fi
-fi
-
-endmenu
-
-source drivers/mtd/Config.in
-source drivers/parport/Config.in
-source drivers/pnp/Config.in
-source drivers/block/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI device support'
-tristate 'SCSI device support' CONFIG_SCSI
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/md/Config.in
-
-source drivers/message/fusion/Config.in
-
-source drivers/ieee1394/Config.in
-
-source drivers/message/i2o/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-         source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-source drivers/telephony/Config.in
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-
-source drivers/char/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   source drivers/video/Config.in
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Sound'
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-
-endmenu
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
-mainmenu_option next_comment
-comment 'iSeries device drivers'
-   tristate 'iSeries Virtual Console Support' CONFIG_VIOCONS
-   tristate 'iSeries Virtual I/O disk support' CONFIG_VIODASD
-   if [ "$CONFIG_VIODASD" = "y" -o "$CONFIG_VIODASD" = "m" ]; then
-      bool 'iSeries Virtual disk IDE emulation' CONFIG_VIODASD_IDE
-   fi
-   tristate 'iSeries Virtual I/O CD support' CONFIG_VIOCD
-   if [ "$CONFIG_VIOCD" = "y" -o "$CONFIG_VIOCD" = "m" ]; then
-      bool 'iSeries Virtual CD Aztech emulation' CONFIG_VIOCD_AZTECH
-   fi
-   tristate 'iSeries Virtual Tape Support' CONFIG_VIOTAPE
-   tristate 'iSeries Virtual Ethernet driver support' CONFIG_VETH
-endmenu
-
-   define_bool CONFIG_VIOPATH y
-fi
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Include xmon kernel debugger' CONFIG_XMON
-   if [ "$CONFIG_XMON" = "y" ]; then
-      bool '  Enable xmon by default' CONFIG_XMON_DEFAULT
-   fi
-   bool '  Include PPCDBG realtime debugging' CONFIG_PPCDBG
-fi
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/s390/Config.help b/arch/s390/Config.help
--- a/arch/s390/Config.help	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,209 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_MATHEMU
-  This option is required for IEEE compliant floating point arithmetic
-  on the Alpha. The only time you would ever not say Y is to say M in
-  order to debug the code. Say Y unless you know what you are doing.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_REMOTE_DEBUG
-  If you say Y here, it will be possible to remotely debug the MIPS
-  kernel using gdb. This enlarges your kernel image disk size by
-  several megabytes and requires a machine with more than 16 MB,
-  better 32 MB RAM to avoid excessive linking time. This is only
-  useful for kernel hackers. If unsure, say N.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_ARCH_S390
-  Select this option, if you want to run the Kernel on one of IBM's
-  mainframes of the S/390 generation. You should have installed the
-  s390-compiler released by IBM (based on gcc-2.95.1) before.
-
-CONFIG_IPL
-  If you want to use the produced kernel to IPL directly from a
-  device, you have to merge a bootsector specific to the device
-  into the first bytes of the kernel. You will have to select the
-  IPL device.
-
-CONFIG_IPL_TAPE
-  Select "tape" if you want to IPL the image from a Tape.
-
-  Select "vm_reader" if you are running under VM/ESA and want
-  to IPL the image from the emulated card reader.
-
-CONFIG_MACHCHK_WARNING
-  Select this option if you want the machine check handler on IBM S/390 or 
-  zSeries to process warning machine checks (e.g. on power failures). 
-  If unsure, say "Y".
-
-CONFIG_PROCESS_DEBUG
-  Say Y to print all process fault locations to the console.  This is
-  a debugging option; you probably do not want to set it unless you
-  are an S390 port maintainer.
-
-CONFIG_PFAULT
-  Select this option, if you want to use PFAULT pseudo page fault
-  handling under VM. If running native or in LPAR, this option
-  has no effect. If your VM does not support PFAULT, PAGEEX
-  pseudo page fault handling will be used.
-  Note that VM 4.2 supports PFAULT but has a bug in its
-  implementation that causes some problems.
-  Everybody who wants to run Linux under VM != VM4.2 should select
-  this option.
-
-CONFIG_SHARED_KERNEL
-  Select this option, if you want to share the text segment of the
-  Linux kernel between different VM guests. This reduces memory
-  usage with lots of guests but greatly increases kernel size.
-  You should only select this option if you know what you are
-  doing and want to exploit this feature.
-
-CONFIG_QDIO
-  This driver provides the Queued Direct I/O base support for the
-  IBM S/390 (G5 and G6) and eServer zSeries (z800 and z900).
-
-  For details please refer to the documentation provided by IBM at
-  <http://www10.software.ibm.com/developerworks/opensource/linux390>
-
-  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 qdio.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-Performance statistics for QDIO base support
-CONFIG_QDIO_PERF_STATS
-  Say Y here to get performance statistics in /proc/qdio_perf
-
-  If unsure, say N.
-
diff -Nru a/arch/s390/Kconfig b/arch/s390/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/s390/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,322 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	default y
+
+config GENERIC_BUST_SPINLOCK
+	bool
+
+
+mainmenu "Linux Kernel Configuration"
+
+config ARCH_S390
+	bool
+	default y
+	help
+	  Select this option, if you want to run the Kernel on one of IBM's
+	  mainframes of the S/390 generation. You should have installed the
+	  s390-compiler released by IBM (based on gcc-2.95.1) before.
+
+source "init/Kconfig"
+
+
+menu "Base setup"
+
+comment "Processor type and features"
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config MATHEMU
+	bool "IEEE FPU emulation"
+	help
+	  This option is required for IEEE compliant floating point arithmetic
+	  on the Alpha. The only time you would ever not say Y is to say M in
+	  order to debug the code. Say Y unless you know what you are doing.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+
+comment "I/O subsystem configuration"
+
+config MACHCHK_WARNING
+	bool "Process warning machine checks"
+	help
+	  Select this option if you want the machine check handler on IBM S/390 or 
+	  zSeries to process warning machine checks (e.g. on power failures). 
+	  If unsure, say "Y".
+
+config QDIO
+	tristate "QDIO support"
+	---help---
+	  This driver provides the Queued Direct I/O base support for the
+	  IBM S/390 (G5 and G6) and eServer zSeries (z800 and z900).
+
+	  For details please refer to the documentation provided by IBM at
+	  <http://www10.software.ibm.com/developerworks/opensource/linux390>
+
+	  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 qdio.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config QDIO_PERF_STATS
+	bool "Performance statistics in /proc"
+	depends on QDIO
+	help
+	  Say Y here to get performance statistics in /proc/qdio_perf
+
+	  If unsure, say N.
+
+comment "Misc"
+
+config PREEMPT
+	bool "Preemptible Kernel"
+
+config IPL
+	bool "Builtin IPL record support"
+	help
+	  If you want to use the produced kernel to IPL directly from a
+	  device, you have to merge a bootsector specific to the device
+	  into the first bytes of the kernel. You will have to select the
+	  IPL device.
+
+choice
+	prompt "IPL method generated into head.S"
+	depends on IPL
+	default IPL_TAPE
+
+config IPL_TAPE
+	bool "tape"
+	help
+	  Select "tape" if you want to IPL the image from a Tape.
+
+	  Select "vm_reader" if you are running under VM/ESA and want
+	  to IPL the image from the emulated card reader.
+
+config IPL_VM
+	bool "vm_reader"
+
+endchoice
+
+config KCORE_ELF
+	bool
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config PROCESS_DEBUG
+	bool "Show crashed user process info"
+	help
+	  Say Y to print all process fault locations to the console.  This is
+	  a debugging option; you probably do not want to set it unless you
+	  are an S390 port maintainer.
+
+config PFAULT
+	bool "Pseudo page fault support"
+	help
+	  Select this option, if you want to use PFAULT pseudo page fault
+	  handling under VM. If running native or in LPAR, this option
+	  has no effect. If your VM does not support PFAULT, PAGEEX
+	  pseudo page fault handling will be used.
+	  Note that VM 4.2 supports PFAULT but has a bug in its
+	  implementation that causes some problems.
+	  Everybody who wants to run Linux under VM != VM4.2 should select
+	  this option.
+
+config SHARED_KERNEL
+	bool "VM shared kernel support"
+	help
+	  Select this option, if you want to share the text segment of the
+	  Linux kernel between different VM guests. This reduces memory
+	  usage with lots of guests but greatly increases kernel size.
+	  You should only select this option if you know what you are
+	  doing and want to exploit this feature.
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/s390/Kconfig"
+
+source "net/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Kernel hacking"
+
+#if [ "$CONFIG_CTC" = "y" ]; then
+#  bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
+#fi
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/s390/config.in b/arch/s390/config.in
--- a/arch/s390/config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,79 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-
-define_bool CONFIG_ISA n
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-define_bool CONFIG_GENERIC_BUST_SPINLOCK n
-
-mainmenu_name "Linux Kernel Configuration"
-define_bool CONFIG_ARCH_S390 y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Base setup'
-comment 'Processor type and features'
-bool 'Symmetric multi-processing support' CONFIG_SMP
-bool 'IEEE FPU emulation' CONFIG_MATHEMU
-if [ "$CONFIG_SMP" = "y" ]; then
-   int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-fi
-
-comment 'I/O subsystem configuration'
-bool 'Process warning machine checks' CONFIG_MACHCHK_WARNING
-tristate 'QDIO support' CONFIG_QDIO
-if [ "$CONFIG_QDIO" != "n" ]; then
-  bool '   Performance statistics in /proc' CONFIG_QDIO_PERF_STATS
-fi
-
-comment 'Misc'
-bool 'Preemptible Kernel' CONFIG_PREEMPT
-bool 'Builtin IPL record support' CONFIG_IPL
-if [ "$CONFIG_IPL" = "y" ]; then
-  choice 'IPL method generated into head.S' \
-          "tape                   CONFIG_IPL_TAPE \
-           vm_reader              CONFIG_IPL_VM" tape
-fi
-define_bool CONFIG_KCORE_ELF y
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG
-bool 'Pseudo page fault support' CONFIG_PFAULT
-bool 'VM shared kernel support' CONFIG_SHARED_KERNEL
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/s390/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-  source net/Config.in
-fi
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-#if [ "$CONFIG_CTC" = "y" ]; then
-#  bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
-#fi
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/s390x/Config.help b/arch/s390x/Config.help
--- a/arch/s390x/Config.help	Wed Oct 30 16:44:22 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,213 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_REMOTE_DEBUG
-  If you say Y here, it will be possible to remotely debug the MIPS
-  kernel using gdb. This enlarges your kernel image disk size by
-  several megabytes and requires a machine with more than 16 MB,
-  better 32 MB RAM to avoid excessive linking time. This is only
-  useful for kernel hackers. If unsure, say N.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_BINFMT_ELF32
-  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
-  Everybody wants this; say Y.
-
-CONFIG_ARCH_S390
-  Select this option, if you want to run the Kernel on one of IBM's
-  mainframes of the S/390 generation. You should have installed the
-  s390-compiler released by IBM (based on gcc-2.95.1) before.
-
-CONFIG_IPL
-  If you want to use the produced kernel to IPL directly from a
-  device, you have to merge a bootsector specific to the device
-  into the first bytes of the kernel. You will have to select the
-  IPL device.
-
-CONFIG_IPL_TAPE
-  Select "tape" if you want to IPL the image from a Tape.
-
-  Select "vm_reader" if you are running under VM/ESA and want
-  to IPL the image from the emulated card reader.
-
-CONFIG_MACHCHK_WARNING
-  Select this option if you want the machine check handler on IBM S/390 or
-  zSeries to process warning machine checks (e.g. on power failures). 
-  If unsure, say "Y".
-
-CONFIG_S390_SUPPORT
-  Select this option if you want to enable your system kernel to
-  handle system-calls from ELF binaries for 31 bit ESA.  This option
-  (and some other stuff like libraries and such) is needed for
-  executing 31 bit applications.  It is safe to say "Y".
-
-CONFIG_PROCESS_DEBUG
-  Say Y to print all process fault locations to the console.  This is
-  a debugging option; you probably do not want to set it unless you
-  are an S390 port maintainer.
-
-CONFIG_PFAULT
-  Select this option, if you want to use PFAULT pseudo page fault
-  handling under VM. If running native or in LPAR, this option
-  has no effect. If your VM does not support PFAULT, PAGEEX
-  pseudo page fault handling will be used.
-  Note that VM 4.2 supports PFAULT but has a bug in its
-  implementation that causes some problems.
-  Everybody who wants to run Linux under VM != VM4.2 should select
-  this option.
-
-CONFIG_SHARED_KERNEL
-  Select this option, if you want to share the text segment of the
-  Linux kernel between different VM guests. This reduces memory
-  usage with lots of guests but greatly increases kernel size.
-  You should only select this option if you know what you are
-  doing and want to exploit this feature.
-
-CONFIG_QDIO
-  This driver provides the Queued Direct I/O base support for the
-  IBM S/390 (G5 and G6) and eServer zSeries (z800 and z900).
-
-  For details please refer to the documentation provided by IBM at
-  <http://www10.software.ibm.com/developerworks/opensource/linux390>
-
-  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 qdio.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-Performance statistics for QDIO base support
-CONFIG_QDIO_PERF_STATS
-  Say Y here to get performance statistics in /proc/qdio_perf
-
-  If unsure, say N.
diff -Nru a/arch/s390x/Kconfig b/arch/s390x/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/s390x/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,330 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	default y
+
+config GENERIC_BUST_SPINLOCK
+	bool
+
+
+mainmenu "Linux Kernel Configuration"
+
+config ARCH_S390
+	bool
+	default y
+	help
+	  Select this option, if you want to run the Kernel on one of IBM's
+	  mainframes of the S/390 generation. You should have installed the
+	  s390-compiler released by IBM (based on gcc-2.95.1) before.
+
+config ARCH_S390X
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "Base setup"
+
+comment "Processor type and features"
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-64)"
+	depends on SMP
+	default "64"
+
+config S390_SUPPORT
+	bool "Kernel support for 31 bit emulation"
+	help
+	  Select this option if you want to enable your system kernel to
+	  handle system-calls from ELF binaries for 31 bit ESA.  This option
+	  (and some other stuff like libraries and such) is needed for
+	  executing 31 bit applications.  It is safe to say "Y".
+
+config BINFMT_ELF32
+	tristate "Kernel support for 31 bit ELF binaries"
+	depends on S390_SUPPORT
+	help
+	  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
+	  Everybody wants this; say Y.
+
+comment "I/O subsystem configuration"
+
+config MACHCHK_WARNING
+	bool "Process warning machine checks"
+	help
+	  Select this option if you want the machine check handler on IBM S/390 or
+	  zSeries to process warning machine checks (e.g. on power failures). 
+	  If unsure, say "Y".
+
+config QDIO
+	tristate "QDIO support"
+	---help---
+	  This driver provides the Queued Direct I/O base support for the
+	  IBM S/390 (G5 and G6) and eServer zSeries (z800 and z900).
+
+	  For details please refer to the documentation provided by IBM at
+	  <http://www10.software.ibm.com/developerworks/opensource/linux390>
+
+	  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 qdio.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config QDIO_PERF_STATS
+	bool "Performance statistics in /proc"
+	depends on QDIO
+	help
+	  Say Y here to get performance statistics in /proc/qdio_perf
+
+	  If unsure, say N.
+
+comment "Misc"
+
+config PREEMPT
+	bool "Preemptible Kernel"
+
+config IPL
+	bool "Builtin IPL record support"
+	help
+	  If you want to use the produced kernel to IPL directly from a
+	  device, you have to merge a bootsector specific to the device
+	  into the first bytes of the kernel. You will have to select the
+	  IPL device.
+
+choice
+	prompt "IPL method generated into head.S"
+	depends on IPL
+	default IPL_TAPE
+
+config IPL_TAPE
+	bool "tape"
+	help
+	  Select "tape" if you want to IPL the image from a Tape.
+
+	  Select "vm_reader" if you are running under VM/ESA and want
+	  to IPL the image from the emulated card reader.
+
+config IPL_VM
+	bool "vm_reader"
+
+endchoice
+
+config KCORE_ELF
+	bool
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config PROCESS_DEBUG
+	bool "Show crashed user process info"
+	help
+	  Say Y to print all process fault locations to the console.  This is
+	  a debugging option; you probably do not want to set it unless you
+	  are an S390 port maintainer.
+
+config PFAULT
+	bool "Pseudo page fault support"
+	help
+	  Select this option, if you want to use PFAULT pseudo page fault
+	  handling under VM. If running native or in LPAR, this option
+	  has no effect. If your VM does not support PFAULT, PAGEEX
+	  pseudo page fault handling will be used.
+	  Note that VM 4.2 supports PFAULT but has a bug in its
+	  implementation that causes some problems.
+	  Everybody who wants to run Linux under VM != VM4.2 should select
+	  this option.
+
+config SHARED_KERNEL
+	bool "VM shared kernel support"
+	help
+	  Select this option, if you want to share the text segment of the
+	  Linux kernel between different VM guests. This reduces memory
+	  usage with lots of guests but greatly increases kernel size.
+	  You should only select this option if you know what you are
+	  doing and want to exploit this feature.
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/s390/Kconfig"
+
+source "net/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Kernel hacking"
+
+#if [ "$CONFIG_CTC" = "y" ]; then
+#  bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
+#fi
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/s390x/config.in b/arch/s390x/config.in
--- a/arch/s390x/config.in	Wed Oct 30 16:44:21 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,83 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-
-define_bool CONFIG_ISA n
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-define_bool CONFIG_GENERIC_BUST_SPINLOCK n
-
-mainmenu_name "Linux Kernel Configuration"
-define_bool CONFIG_ARCH_S390 y
-define_bool CONFIG_ARCH_S390X y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Base setup'
-comment 'Processor type and features'
-bool 'Symmetric multi-processing support' CONFIG_SMP
-if [ "$CONFIG_SMP" = "y" ]; then
-   int  'Maximum number of CPUs (2-64)' CONFIG_NR_CPUS 64
-fi
-bool 'Kernel support for 31 bit emulation' CONFIG_S390_SUPPORT
-if [ "$CONFIG_S390_SUPPORT" = "y" ]; then
-  tristate 'Kernel support for 31 bit ELF binaries' CONFIG_BINFMT_ELF32 
-fi
-
-comment 'I/O subsystem configuration'
-bool 'Process warning machine checks' CONFIG_MACHCHK_WARNING
-tristate 'QDIO support' CONFIG_QDIO
-if [ "$CONFIG_QDIO" != "n" ]; then
-  bool '   Performance statistics in /proc' CONFIG_QDIO_PERF_STATS
-fi
-
-comment 'Misc'
-bool 'Preemptible Kernel' CONFIG_PREEMPT
-bool 'Builtin IPL record support' CONFIG_IPL
-if [ "$CONFIG_IPL" = "y" ]; then
-  choice 'IPL method generated into head.S' \
-          "tape                   CONFIG_IPL_TAPE \
-           vm_reader              CONFIG_IPL_VM" tape
-fi
-
-define_bool CONFIG_KCORE_ELF y
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG
-bool 'Pseudo page fault support' CONFIG_PFAULT
-bool 'VM shared kernel support' CONFIG_SHARED_KERNEL
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/s390/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-  source net/Config.in
-fi
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-#if [ "$CONFIG_CTC" = "y" ]; then
-#  bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
-#fi
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/sh/Config.help b/arch/sh/Config.help
--- a/arch/sh/Config.help	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,880 +0,0 @@
-CONFIG_SUPERH
-  The SuperH is a RISC processor targeted for use in embedded systems
-  and consumer electronics; it was also used in the Sega Dreamcast
-  gaming console.  The SuperH port has a home page at
-  <http://www.sh-linux.org/>.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_DISCONTIGMEM
-  Say Y to upport 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.
-
-CONFIG_CPU_LITTLE_ENDIAN
-  Some MIPS machines can be configured for either little or big endian
-  byte order. These modes require different kernels. Say Y if your
-  machine is little endian, N if it's a big endian machine.
-
-CONFIG_HEARTBEAT
-  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_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_PCI_GOBIOS
-  On PCI systems, the BIOS can be used to detect the PCI devices and
-  determine their configuration. However, some old PCI motherboards
-  have BIOS bugs and may crash if this is done. Also, some embedded
-  PCI-based systems don't have any BIOS at all. Linux can also try to
-  detect the PCI hardware directly without using the BIOS.
-
-  With this option, you can specify how Linux should detect the PCI
-  devices. If you choose "BIOS", the BIOS will be used, if you choose
-  "Direct", the BIOS won't be used, and if you choose "Any", the
-  kernel will try the direct access method and falls back to the BIOS
-  if that doesn't work. If unsure, go with the default, which is
-  "Any".
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_KCORE_AOUT
-  Not necessary unless you're using a very out-of-date binutils
-  version.  You probably want KCORE_ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_VIDEO_SELECT
-  This enables support for text mode selection on kernel startup. If
-  you want to take advantage of some high-resolution text mode your
-  card's BIOS offers, but the traditional Linux utilities like
-  SVGATextMode don't, you can say Y here and set the mode using the
-  "vga=" option from your boot loader (lilo or loadlin) or set
-  "vga=ask" which brings up a video mode menu on kernel startup. (Try
-  "man bootparam" or see the documentation of your boot loader about
-  how to pass options to the kernel.)
-
-  Read the file <file:Documentation/svga.txt> for more information
-  about the Video mode selection support. If unsure, say N.
-
-CONFIG_MDA_CONSOLE
-  Say Y here if you have an old MDA or monochrome Hercules graphics
-  adapter in your system acting as a second head ( = video card). You
-  will then be able to use two monitors with your Linux system. Do not
-  say Y here if your MDA card is the primary card in your system; the
-  normal VGA driver will handle it.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called mdacon.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_MEMORY_SET
-  This is an option about which you will never be asked a question.
-  Therefore, I conclude that you do not exist - go away.
-
-  There is a grue here.
-
-CONFIG_MEMORY_SIZE
-  This sets the default memory size assumed by your SH kernel. It can
-  be overridden as normal by the 'mem=' argument on the kernel command
-  line. If unsure, consult your board specifications or just leave it
-  as 0x00400000 which was the default value before this became
-  configurable.
-
-CONFIG_SH_PCIDMA_NONCOHERENT
-  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'.
-
-CONFIG_VT
-  If you say Y here, you will get support for terminal devices with
-  display and keyboard devices. These are called "virtual" because you
-  can run several virtual terminals (also called virtual consoles) on
-  one physical terminal. This is rather useful, for example one
-  virtual terminal can collect system messages and warnings, another
-  one can be used for a text-mode user session, and a third could run
-  an X session, all in parallel. Switching between virtual terminals
-  is done with certain key combinations, usually Alt-<function key>.
-
-  The setterm command ("man setterm") can be used to change the
-  properties (such as colors or beeping) of a virtual terminal. The
-  man page console_codes(4) ("man console_codes") contains the special
-  character sequences that can be used to change those properties
-  directly. The fonts used on virtual terminals can be changed with
-  the setfont ("man setfont") command and the key bindings are defined
-  with the loadkeys ("man loadkeys") command.
-
-  You need at least one virtual terminal device in order to make use
-  of your keyboard and monitor. Therefore, only people configuring an
-  embedded system would want to say N here in order to save some
-  memory; the only way to log into such a system is then via a serial
-  or network connection.
-
-  If unsure, say Y, or else you won't be able to do much with your new
-  shiny Linux system :-)
-
-CONFIG_VT_CONSOLE
-  The system console is the device which receives all kernel messages
-  and warnings and which allows logins in single user mode. If you
-  answer Y here, a virtual terminal (the device used to interact with
-  a physical terminal) can be used as system console. This is the most
-  common mode of operations, so you should say Y here unless you want
-  the kernel messages be output only to a serial port (in which case
-  you should say Y to "Console on serial port", below).
-
-  If you do say Y here, by default the currently visible virtual
-  terminal (/dev/tty0) will be used as system console. You can change
-  that with a kernel command line option such as "console=tty3" which
-  would use the third virtual terminal as system console. (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.)
-
-  If unsure, say Y.
-
-CONFIG_SERIAL
-  This selects whether you want to include the driver for the standard
-  serial ports.  The standard answer is Y.  People who might say N
-  here are those that are setting up dedicated Ethernet WWW/FTP
-  servers, or users that have one of the various bus mice instead of a
-  serial mouse and don't intend to use their machine's standard serial
-  port for anything.  (Note that the Cyclades and Stallion multi
-  serial port drivers do not need this driver built in for them to
-  work.)
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  serial.o.
-  [WARNING: Do not compile this driver as a module if you are using
-  non-standard serial ports, since the configuration information will
-  be lost when the driver is unloaded.  This limitation may be lifted
-  in the future.]
-
-  BTW1: If you have a mouseman serial mouse which is not recognized by
-  the X window system, try running gpm first.
-
-  BTW2: If you intend to use a software modem (also called Winmodem)
-  under Linux, forget it.  These modems are crippled and require
-  proprietary drivers which are only available under Windows.
-
-  Most people will say Y or M here, so that they can use serial mice,
-  modems and similar devices connecting to the standard serial ports.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_PRINTER
-  If you intend to attach a printer to the parallel port of your Linux
-  box (as opposed to using a serial printer; if the connector at the
-  printer has 9 or 25 holes ["female"], then it's serial), say Y.
-  Also read the Printing-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  It is possible to share one parallel port among several devices
-  (e.g. printer and ZIP drive) and it is safe to compile the
-  corresponding drivers into the kernel.  If you want to compile this
-  driver as a module however ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt> and
-  <file:Documentation/parport.txt>.  The module will be called lp.o.
-
-  If you have several parallel ports, you can specify which ports to
-  use with the "lp" kernel command line option.  (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.)  The syntax of the
-  "lp" command line option can be found in <file:drivers/char/lp.c>.
-
-  If you have more than 8 printers, you need to increase the LP_NO
-  macro in lp.c and the PARPORT_MAX macro in parport.h.
-
-CONFIG_LP_CONSOLE
-  If you want kernel messages to be printed out as they occur, you
-  can have a console on the printer. This option adds support for
-  doing that; to actually get it to happen you need to pass the
-  option "console=lp0" to the kernel at boot time.
-
-  If the printer is out of paper (or off, or unplugged, or too
-  busy..) the kernel will stall until the printer is ready again.
-  By defining CONSOLE_LP_STRICT to 0 (at your own risk) you
-  can make the kernel continue when this happens,
-  but it'll lose the kernel messages.
-
-  If unsure, say N.
-
-CONFIG_PPDEV
-  Saying Y to this adds support for /dev/parport device nodes.  This
-  is needed for programs that want portable access to the parallel
-  port, for instance deviceid (which displays Plug-and-Play device
-  IDs).
-
-  This is the parallel port equivalent of SCSI generic support (sg).
-  It is safe to say N to this -- it is not needed for normal printing
-  or parallel port CD-ROM/disk support.
-
-  This support is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  ppdev.o.
-
-  If unsure, say N.
-
-CONFIG_PSMOUSE
-  The PS/2 mouse connects to a special mouse port that looks much like
-  the keyboard port (small circular connector with 6 pins). This way,
-  the mouse does not use any serial ports. This port can also be used
-  for other input devices like light pens, tablets, keypads. Compaq,
-  AST and IBM all use this as their mouse port on currently shipping
-  machines. The trackballs of some laptops are PS/2 mice also. In
-  particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse.
-
-  Although PS/2 mice are not technically bus mice, they are explained
-  in detail in the Busmouse-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  When using a PS/2 mouse, you can get problems if you want to use the
-  mouse both on the Linux console and under X. Using the "-R" option
-  of the Linux mouse managing program gpm (available from
-  <ftp://gnu.systemy.it/pub/gpm/>) solves this problem, or you can get
-  the "mconv2" utility from <ftp://ibiblio.org/pub/Linux/system/mouse/>.
-
-CONFIG_WATCHDOG
-  If you say Y here (and to one of the following options) and create a
-  character special file /dev/watchdog with major number 10 and minor
-  number 130 using mknod ("man mknod"), you will get a watchdog, i.e.:
-  subsequently opening the file and then failing to write to it for
-  longer than 1 minute will result in rebooting the machine. This
-  could be useful for a networked machine that needs to come back
-  online as fast as possible after a lock-up. There's both a watchdog
-  implementation entirely in software (which can sometimes fail to
-  reboot the machine) and a driver for hardware watchdog boards, which
-  are more robust and can also keep track of the temperature inside
-  your computer. For details, read <file:Documentation/watchdog.txt>
-  in the kernel source.
-
-  The watchdog is usually used together with the watchdog daemon
-  which is available from
-  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
-  also monitor NFS connections and can reboot the machine when the process
-  table is full.
-
-  If unsure, say N.
-
-CONFIG_WATCHDOG_NOWAYOUT
-  The default watchdog behaviour (which you get if you say N here) is
-  to stop the timer if the process managing it closes the file
-  /dev/watchdog. It's always remotely possible that this process might
-  get killed. If you say Y here, the watchdog cannot be stopped once
-  it has been started.
-
-CONFIG_SH_WDT
-  This driver adds watchdog support for the integrated watchdog in the
-  SuperH 3 and 4 processors. If you have one of these processors, say Y,
-  otherwise say N.
-
-  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 is called shwdt.o. If you want to compile it as a module,
-  say M here and read Documentation/modules.txt.
-
-CONFIG_RTC
-  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
-  into your computer.
-
-  Every PC has such a clock built in. It can be used to generate
-  signals from as low as 1Hz up to 8192Hz, and can also be used
-  as a 24 hour alarm. It reports status information via the file
-  /proc/driver/rtc and its behaviour is set by various ioctls on
-  /dev/rtc.
-
-  If you run Linux on a multiprocessor machine and said Y to
-  "Symmetric Multi Processing" above, you should say Y here to read
-  and set the RTC in an SMP compatible fashion.
-
-  If you think you have a use for such a device (such as periodic data
-  sampling), then say Y here, and read <file:Documentation/rtc.txt>
-  for details.
-
-  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 is called rtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_SH_RTC
-  Selecting this option will allow the Linux kernel to emulate
-  PC's RTC.
-
-  If unsure, say N.
-
-CONFIG_SH_DMA
-  Selecting this option will provide same API as PC's Direct Memory
-  Access Controller(8237A) for SuperH DMAC.
-
-  If unsure, say N.
-
-CONFIG_CF_AREA5
-  If your board has "Directly Connected" CompactFlash, You should
-  select the area where your CF is connected to.
-  
-  - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
-  - "Area6" if it is connected to Area 6 (0x18000000)
-
-  "Area6" will work for most boards. For ADX, select "Area5".
-
-CONFIG_CF_ENABLER
-  Compact Flash is a small, removable mass storage device introduced
-  in 1994 originally as a PCMCIA device.  If you say `Y' here, you
-  compile in support for Compact Flash devices directly connected to
-  a SuperH processor.  A Compact Flash FAQ is available at
-  <http://www.compactflash.org/faqs/faq.htm>.
-
-  If your board has "Directly Connected" CompactFlash at area 5 or 6,
-  you may want to enable this option.  Then, you can use CF as
-  primary IDE drive (only tested for SanDisk).
-
-  If in doubt, select 'N'.
-
-CONFIG_SH_GENERIC
-  Select Generic if configuring for a generic SuperH system.
-  The "generic" option compiles in *all* the possible hardware
-  support and relies on the sh_mv= kernel commandline option to choose
-  at runtime which routines to use.  "MV" stands for "machine vector";
-  each of the machines below is described by a machine vector.
-
-  Select SolutionEngine if configuring for a Hitachi SH7709
-  or SH7750/7750S evalutation board.
-
-  Select Overdrive if configuring for a ST407750 Overdrive board.
-  More information at
-  <http://linuxsh.sourceforge.net/docs/7750overdrive.php3>.
-
-  Select HP620 if configuring for a HP Jornada HP620.
-  More information (hardware only) at
-  <http://www.hp.com/jornada/>.
-
-  Select HP680 if configuring for a HP Jornada HP680.
-  More information (hardware only) at
-  <http://www.hp.com/jornada/products/680/>.
-
-  Select HP690 if configuring for a HP Jornada HP690.
-  More information (hardware only) at
-  <http://www.hp.com/jornada/products/680/>.
-
-  Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
-  More information at
-  <http://sources.redhat.com/ecos/hardware.html#SuperH>.
-
-  Select DMIDA if configuring for a DataMyte 4000 Industrial
-  Digital Assistant. More information at <http://www.dmida.com/>.
-
-  Select EC3104 if configuring for a system with an Eclipse
-  International EC3104 chip, e.g. the Harris AD2000 or Compaq Aero 8000.
-
-  Select Dreamcast if configuring for a SEGA Dreamcast.
-  More information at
-  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
-  Dreamcast project is at <http://linuxdc.sourceforge.net/>.
-
-  Select BareCPU if you know what this means, and it applies
-  to your system.
-
-CONFIG_SH_SOLUTION_ENGINE
-  Select SolutionEngine if configuring for a Hitachi SH7709
-  or SH7750 evalutation board.
-
-CONFIG_SH_7751_SOLUTION_ENGINE
-  Select 7751 SolutionEngine if configuring for a Hitachi SH7751
-  evalutation board.
-
-CONFIG_SH_HP620
-  Select HP620 if configuring for a HP jornada HP620.
-  More information (hardware only) at
-  <http://www.hp.com/jornada/>.
-
-CONFIG_SH_HP680
-  Select HP680 if configuring for a HP Jornada HP680.
-  More information (hardware only) at
-  <http://www.hp.com/jornada/products/680/>.
-
-CONFIG_SH_HP690
-  Select HP690 if configuring for a HP Jornada HP690.
-  More information (hardware only)
-  at <http://www.hp.com/jornada/products/680/>.
-
-CONFIG_SH_CQREEK
-  Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
-  More information at
-  <http://sources.redhat.com/ecos/hardware.html#SuperH>.
-
-CONFIG_SH_DMIDA
-  Select DMIDA if configuring for a DataMyte 4000 Industrial
-  Digital Assistant. More information at <http://www.dmida.com/>.
-
-CONFIG_SH_EC3104
-  Select EC3104 if configuring for a system with an Eclipse
-  International EC3104 chip, e.g. the Harris AD2000.
-
-CONFIG_SH_DREAMCAST
-  Select Dreamcast if configuring for a SEGA Dreamcast.
-  More information at
-  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
-  Dreamcast project is at <http://linuxdc.sourceforge.net/>.
-
-CONFIG_SH_UNKNOWN
-  "Bare CPU" aka "unknown" means an SH-based system which is not one
-  of the specific ones mentioned above, which means you need to enter
-  all sorts of stuff like CONFIG_MEMORY_START because the config
-  system doesn't already know what it is.  You get a machine vector
-  without any platform-specific code in it, so things like the RTC may
-  not work.
-
-  This option is for the early stages of porting to a new machine.
-
-CONFIG_CPU_SUBTYPE_SH7707
-  Select the type of SuperH processor you have. This information is
-  used for optimizing and configuration purposes.
-
-  Select SH7707 if you have a  60 Mhz SH-3 HD6417707 CPU.
-
-  Select SH7708 if you have a  60 Mhz SH-3 HD6417708S or
-                if you have a 100 Mhz SH-3 HD6417708R CPU.
-
-  Select SH7709 if you have a  80 Mhz SH-3 HD6417709 CPU.
-
-  Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
-
-  Select SH7751 if you have a SH7751
-
-  Select ST40STB1 if you have a ST40STB1
-
-CONFIG_CPU_SUBTYPE_SH7708
-  Select SH7708 if you have a  60 Mhz SH-3 HD6417708S or
-                if you have a 100 Mhz SH-3 HD6417708R CPU.
-
-CONFIG_CPU_SUBTYPE_SH7709
-  Select SH7709 if you have a  80 Mhz SH-3 HD6417709 CPU.
-
-CONFIG_CPU_SUBTYPE_SH7750
-  Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
-
-CONFIG_MEMORY_START
-  Computers built with Hitachi SuperH processors always
-  map the ROM starting at address zero.  But the processor
-  does not specify the range that RAM takes.  
-
-  The physical memory (RAM) start address will be automatically
-  set to 08000000, unless you selected one of the following
-  processor types: SolutionEngine, Overdrive, HP620, HP680, HP690,
-  in which case the start address will be set to 0c000000.
-
-  Tweak this only when porting to a new machine which is not already
-  known by the config system.  Changing it from the known correct
-  value on any of the known systems will only lead to disaster.
-
-CONFIG_HD64461
-  The Hitachi HD64461 provides an interface for
-  the SH7709 CPU, supporting a LCD controller,
-  CRT color controller, IrDA up to 4 Mbps, and a
-  PCMCIA controller supporting 2 slots.
-
-  More information is available at
-  <http://semiconductor.hitachi.com/windowsce/superh/sld013.htm>.
-
-  Say Y if you want support for the HD64461.
-  Otherwise, say N.
-
-CONFIG_HD64461_ENABLER
-  Say Y here if you want to enable PCMCIA support
-  via the HD64461 companion chip.
-  Otherwise, say N.
-
-CONFIG_HD64461_IRQ
-  The default setting of the HD64461 IRQ is 36.
-
-  Do not change this unless you know what you are doing.
-
-CONFIG_HD64465
-  The Hitachi HD64465 provides an interface for
-  the SH7750 CPU, supporting a LCD controller,
-  CRT color controller, IrDA, USB, PCMCIA,
-  keyboard controller, and a printer interface.
-
-  More information is available at
-  <http://global.hitachi.com/New/cnews/E/1998/981019B.html>.
-
-  Say Y if you want support for the HD64465.
-  Otherwise, say N.
-
-CONFIG_HD64465_IRQ
-  The default setting of the HD64465 IRQ is 5.
-
-  Do not change this unless you know what you are doing.
-
-CONFIG_HD64465_IOBASE
-  The default setting of the HD64465 IO base address is 0xb0000000.
-
-  Do not change this unless you know what you are doing.
-
-CONFIG_SH_EARLY_PRINTK
-  Say Y here to redirect kernel printk messages to the serial port
-  used by the SH-IPL bootloader, starting very early in the boot
-  process and ending when the kernel's serial console is initialised.
-  This option is only useful porting the kernel to a new machine,
-  when the kernel may crash or hang before the serial console is
-  initialised. If unsure, say N.
-
-CONFIG_SH_SCI
-  Selecting this option will allow the Linux kernel to transfer data
-  over SCI (Serial Communication Interface) and/or SCIF (Serial
-  Communication Interface with FIFO) which are built into the Hitachi
-  SuperH processor.  The option provides 1 to 3 (depending
-  on the CPU model) standard Linux tty devices, /dev/ttySC[012]; one
-  of these is normally used as the system console.
-
-  If in doubt, press "y".
-
-CONFIG_SH_STANDARD_BIOS
-  Say Y here if your target has the gdb-sh-stub
-  package from www.m17n.org (or any conforming standard LinuxSH BIOS)
-  in FLASH or EPROM.  The kernel will use standard BIOS calls during
-  boot for various housekeeping tasks (including calls to read and
-  write characters to a system console, get a MAC address from an
-  on-board Ethernet interface, and shut down the hardware).  Note this
-  does not work with machines with an existing operating system in
-  mask ROM and no flash (WindowsCE machines fall in this category).
-  If unsure, say N.
-
diff -Nru a/arch/sh/Kconfig b/arch/sh/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/sh/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1325 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+
+mainmenu "Linux/SuperH Kernel Configuration"
+
+config SUPERH
+	bool
+	default y
+	help
+	  The SuperH is a RISC processor targeted for use in embedded systems
+	  and consumer electronics; it was also used in the Sega Dreamcast
+	  gaming console.  The SuperH port has a home page at
+	  <http://www.sh-linux.org/>.
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "Processor type and features"
+
+choice
+	prompt "SuperH system type"
+	default SH_GENERIC
+
+config SH_GENERIC
+	bool "Generic"
+	---help---
+	  Select Generic if configuring for a generic SuperH system.
+	  The "generic" option compiles in *all* the possible hardware
+	  support and relies on the sh_mv= kernel commandline option to choose
+	  at runtime which routines to use.  "MV" stands for "machine vector";
+	  each of the machines below is described by a machine vector.
+
+	  Select SolutionEngine if configuring for a Hitachi SH7709
+	  or SH7750/7750S evalutation board.
+
+	  Select Overdrive if configuring for a ST407750 Overdrive board.
+	  More information at
+	  <http://linuxsh.sourceforge.net/docs/7750overdrive.php3>.
+
+	  Select HP620 if configuring for a HP Jornada HP620.
+	  More information (hardware only) at
+	  <http://www.hp.com/jornada/>.
+
+	  Select HP680 if configuring for a HP Jornada HP680.
+	  More information (hardware only) at
+	  <http://www.hp.com/jornada/products/680/>.
+
+	  Select HP690 if configuring for a HP Jornada HP690.
+	  More information (hardware only) at
+	  <http://www.hp.com/jornada/products/680/>.
+
+	  Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
+	  More information at
+	  <http://sources.redhat.com/ecos/hardware.html#SuperH>.
+
+	  Select DMIDA if configuring for a DataMyte 4000 Industrial
+	  Digital Assistant. More information at <http://www.dmida.com/>.
+
+	  Select EC3104 if configuring for a system with an Eclipse
+	  International EC3104 chip, e.g. the Harris AD2000 or Compaq Aero 8000.
+
+	  Select Dreamcast if configuring for a SEGA Dreamcast.
+	  More information at
+	  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
+	  Dreamcast project is at <http://linuxdc.sourceforge.net/>.
+
+	  Select BareCPU if you know what this means, and it applies
+	  to your system.
+
+config SH_SOLUTION_ENGINE
+	bool "SolutionEngine"
+	help
+	  Select SolutionEngine if configuring for a Hitachi SH7709
+	  or SH7750 evalutation board.
+
+config SH_7751_SOLUTION_ENGINE
+	bool "SolutionEngine7751"
+	help
+	  Select 7751 SolutionEngine if configuring for a Hitachi SH7751
+	  evalutation board.
+
+config SH_STB1_HARP
+	bool "STB1_Harp"
+
+config SH_STB1_OVERDRIVE
+	bool "STB1_Overdrive"
+
+config SH_HP620
+	bool "HP620"
+	help
+	  Select HP620 if configuring for a HP jornada HP620.
+	  More information (hardware only) at
+	  <http://www.hp.com/jornada/>.
+
+config SH_HP680
+	bool "HP680"
+	help
+	  Select HP680 if configuring for a HP Jornada HP680.
+	  More information (hardware only) at
+	  <http://www.hp.com/jornada/products/680/>.
+
+config SH_HP690
+	bool "HP690"
+	help
+	  Select HP690 if configuring for a HP Jornada HP690.
+	  More information (hardware only)
+	  at <http://www.hp.com/jornada/products/680/>.
+
+config SH_CQREEK
+	bool "CqREEK"
+	help
+	  Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
+	  More information at
+	  <http://sources.redhat.com/ecos/hardware.html#SuperH>.
+
+config SH_DMIDA
+	bool "DMIDA"
+	help
+	  Select DMIDA if configuring for a DataMyte 4000 Industrial
+	  Digital Assistant. More information at <http://www.dmida.com/>.
+
+config SH_EC3104
+	bool "EC3104"
+	help
+	  Select EC3104 if configuring for a system with an Eclipse
+	  International EC3104 chip, e.g. the Harris AD2000.
+
+config SH_DREAMCAST
+	bool "Dreamcast"
+	help
+	  Select Dreamcast if configuring for a SEGA Dreamcast.
+	  More information at
+	  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
+	  Dreamcast project is at <http://linuxdc.sourceforge.net/>.
+
+config SH_CAT68701
+	bool "CAT68701"
+
+config SH_BIGSUR
+	bool "BigSur"
+
+config SH_SH2000
+	bool "SH2000"
+
+config SH_ADX
+	bool "ADX"
+
+config SH_UNKNOWN
+	bool "BareCPU"
+	help
+	  "Bare CPU" aka "unknown" means an SH-based system which is not one
+	  of the specific ones mentioned above, which means you need to enter
+	  all sorts of stuff like CONFIG_MEMORY_START because the config
+	  system doesn't already know what it is.  You get a machine vector
+	  without any platform-specific code in it, so things like the RTC may
+	  not work.
+
+	  This option is for the early stages of porting to a new machine.
+
+endchoice
+
+# The SH7750 RTC module is disabled in the Dreamcast
+config SH_RTC
+	bool
+	depends on !SH_DREAMCAST
+	default y
+	help
+	  Selecting this option will allow the Linux kernel to emulate
+	  PC's RTC.
+
+	  If unsure, say N.
+
+config SH_HP600
+	bool
+	depends on SH_HP620 || SH_HP680 || SH_HP690
+	default y
+
+choice
+	prompt "Processor type"
+	default CPU_SUBTYPE_SH7708
+
+config CPU_SUBTYPE_SH7707
+	bool "SH7707"
+	---help---
+	  Select the type of SuperH processor you have. This information is
+	  used for optimizing and configuration purposes.
+
+	  Select SH7707 if you have a  60 Mhz SH-3 HD6417707 CPU.
+
+	  Select SH7708 if you have a  60 Mhz SH-3 HD6417708S or
+	  if you have a 100 Mhz SH-3 HD6417708R CPU.
+
+	  Select SH7709 if you have a  80 Mhz SH-3 HD6417709 CPU.
+
+	  Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
+
+	  Select SH7751 if you have a SH7751
+
+	  Select ST40STB1 if you have a ST40STB1
+
+config CPU_SUBTYPE_SH7708
+	bool "SH7708"
+	help
+	  Select SH7708 if you have a  60 Mhz SH-3 HD6417708S or
+	  if you have a 100 Mhz SH-3 HD6417708R CPU.
+
+config CPU_SUBTYPE_SH7709
+	bool "SH7709"
+	help
+	  Select SH7709 if you have a  80 Mhz SH-3 HD6417709 CPU.
+
+config CPU_SUBTYPE_SH7750
+	bool "SH7750"
+	help
+	  Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU.
+
+config CPU_SUBTYPE_SH7751
+	bool "SH7751"
+
+config CPU_SUBTYPE_ST40STB1
+	bool "ST40STB1"
+
+endchoice
+
+config CPU_SH3
+	bool
+	depends on CPU_SUBTYPE_SH7709 || CPU_SUBTYPE_SH7708 || CPU_SUBTYPE_SH7707
+	default y
+
+config CPU_SH4
+	bool
+	depends on CPU_SUBTYPE_ST40STB1 || CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7750
+	default y
+
+config CPU_LITTLE_ENDIAN
+	bool "Little Endian"
+	help
+	  Some MIPS machines can be configured for either little or big endian
+	  byte order. These modes require different kernels. Say Y if your
+	  machine is little endian, N if it's a big endian machine.
+
+# Platform-specific memory start and size definitions
+config MEMORY_START
+	hex "Physical memory start address" if !MEMORY_SET
+	default "08000000" if !MEMORY_SET || SH_ADX || CPU_SUBTYPE_ST40STB1 && ST40_LMI_MEMORY
+	default "0c000000" if SH_HP600 || SH_BIGSUR || SH_DREAMCAST || SH_SH2000 || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE
+	---help---
+	  Computers built with Hitachi SuperH processors always
+	  map the ROM starting at address zero.  But the processor
+	  does not specify the range that RAM takes.  
+
+	  The physical memory (RAM) start address will be automatically
+	  set to 08000000, unless you selected one of the following
+	  processor types: SolutionEngine, Overdrive, HP620, HP680, HP690,
+	  in which case the start address will be set to 0c000000.
+
+	  Tweak this only when porting to a new machine which is not already
+	  known by the config system.  Changing it from the known correct
+	  value on any of the known systems will only lead to disaster.
+
+config MEMORY_SIZE
+	hex "Physical memory size" if !MEMORY_SET
+	default "00400000" if !MEMORY_SET || SH_ADX || CPU_SUBTYPE_ST40STB1 && ST40_LMI_MEMORY || SH_HP600 || SH_BIGSUR || SH_DREAMCAST || SH_SH2000
+	default "04000000" if SH_7751_SOLUTION_ENGINE
+	default "02000000" if SH_SOLUTION_ENGINE
+	help
+	  This sets the default memory size assumed by your SH kernel. It can
+	  be overridden as normal by the 'mem=' argument on the kernel command
+	  line. If unsure, consult your board specifications or just leave it
+	  as 0x00400000 which was the default value before this became
+	  configurable.
+
+config MEMORY_SET
+	bool
+	depends on SH_ADX || CPU_SUBTYPE_ST40STB1 && ST40_LMI_MEMORY || SH_HP600 || SH_BIGSUR || SH_DREAMCAST || SH_SH2000 || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE
+	default y
+	help
+	  This is an option about which you will never be asked a question.
+	  Therefore, I conclude that you do not exist - go away.
+
+	  There is a grue here.
+
+config ST40_LMI_MEMORY
+	bool "Memory on LMI"
+	depends on CPU_SUBTYPE_ST40STB1
+
+# If none of the above have set memory start/size, ask the user.
+endmenu
+
+config DISCONTIGMEM
+	bool
+	depends on SH_HP690
+	default y
+	help
+	  Say Y to upport 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.
+
+
+menu "General setup"
+
+# Even on SuperH devices which don't have an ISA bus,
+# this variable helps the PCMCIA modules handle
+# IRQ requesting properly -- Greg Banks.
+config ISA
+	bool
+	default y
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config SBUS
+	bool
+
+config CF_ENABLER
+	bool "Compact Flash Enabler support"
+	depends on SH_GENERIC || SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_CAT68701 || SH_ADX
+	---help---
+	  Compact Flash is a small, removable mass storage device introduced
+	  in 1994 originally as a PCMCIA device.  If you say `Y' here, you
+	  compile in support for Compact Flash devices directly connected to
+	  a SuperH processor.  A Compact Flash FAQ is available at
+	  <http://www.compactflash.org/faqs/faq.htm>.
+
+	  If your board has "Directly Connected" CompactFlash at area 5 or 6,
+	  you may want to enable this option.  Then, you can use CF as
+	  primary IDE drive (only tested for SanDisk).
+
+	  If in doubt, select 'N'.
+
+choice
+	prompt "Compact Flash Connection Area"
+	depends on CF_ENABLER
+	default CF_AREA6
+
+config CF_AREA5
+	bool "Area5"
+	help
+	  If your board has "Directly Connected" CompactFlash, You should
+	  select the area where your CF is connected to.
+
+	  - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
+	  - "Area6" if it is connected to Area 6 (0x18000000)
+
+	  "Area6" will work for most boards. For ADX, select "Area5".
+
+config CF_AREA6
+	bool "Area6"
+
+endchoice
+
+config CF_BASE_ADDR
+	hex
+	depends on CF_ENABLER
+	default "b8000000" if CF_AREA6
+	default "b4000000" if CF_AREA5
+
+config HD64461
+	bool "Hitachi HD64461 companion chip support"
+	---help---
+	  The Hitachi HD64461 provides an interface for
+	  the SH7709 CPU, supporting a LCD controller,
+	  CRT color controller, IrDA up to 4 Mbps, and a
+	  PCMCIA controller supporting 2 slots.
+
+	  More information is available at
+	  <http://semiconductor.hitachi.com/windowsce/superh/sld013.htm>.
+
+	  Say Y if you want support for the HD64461.
+	  Otherwise, say N.
+
+config HD64461_IRQ
+	int "HD64461 IRQ"
+	depends on HD64461
+	default "36"
+	help
+	  The default setting of the HD64461 IRQ is 36.
+
+	  Do not change this unless you know what you are doing.
+
+config HD64461_ENABLER
+	bool "HD64461 PCMCIA enabler"
+	depends on HD64461
+	help
+	  Say Y here if you want to enable PCMCIA support
+	  via the HD64461 companion chip.
+	  Otherwise, say N.
+
+config HD64465
+	bool "Hitachi HD64465 companion chip support"
+	---help---
+	  The Hitachi HD64465 provides an interface for
+	  the SH7750 CPU, supporting a LCD controller,
+	  CRT color controller, IrDA, USB, PCMCIA,
+	  keyboard controller, and a printer interface.
+
+	  More information is available at
+	  <http://global.hitachi.com/New/cnews/E/1998/981019B.html>.
+
+	  Say Y if you want support for the HD64465.
+	  Otherwise, say N.
+
+config HD64465_IOBASE
+	hex "HD64465 start address"
+	depends on HD64465
+	default "b0000000"
+	help
+	  The default setting of the HD64465 IO base address is 0xb0000000.
+
+	  Do not change this unless you know what you are doing.
+
+config HD64465_IRQ
+	int "HD64465 IRQ"
+	depends on HD64465
+	default "5"
+	help
+	  The default setting of the HD64465 IRQ is 5.
+
+	  Do not change this unless you know what you are doing.
+
+config SH_DMA
+	bool "DMA controller (DMAC) support"
+	help
+	  Selecting this option will provide same API as PC's Direct Memory
+	  Access Controller(8237A) for SuperH DMAC.
+
+	  If unsure, say N.
+
+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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+choice
+	prompt "PCI access mode"
+	depends on PCI
+	default PCI_GOANY
+
+config PCI_GOBIOS
+	bool "BIOS"
+	---help---
+	  On PCI systems, the BIOS can be used to detect the PCI devices and
+	  determine their configuration. However, some old PCI motherboards
+	  have BIOS bugs and may crash if this is done. Also, some embedded
+	  PCI-based systems don't have any BIOS at all. Linux can also try to
+	  detect the PCI hardware directly without using the BIOS.
+
+	  With this option, you can specify how Linux should detect the PCI
+	  devices. If you choose "BIOS", the BIOS will be used, if you choose
+	  "Direct", the BIOS won't be used, and if you choose "Any", the
+	  kernel will try the direct access method and falls back to the BIOS
+	  if that doesn't work. If unsure, go with the default, which is
+	  "Any".
+
+config PCI_GODIRECT
+	bool "Direct"
+
+config PCI_GOANY
+	bool "Any"
+
+endchoice
+
+config PCI_BIOS
+	bool
+	depends on PCI && (PCI_GOBIOS || PCI_GOANY)
+	default y
+
+config PCI_DIRECT
+	bool
+	depends on PCI && (PCI_GODIRECT || PCI_GOANY)
+	default y
+
+config SH_PCIDMA_NONCOHERENT
+	bool "Cache and PCI noncoherent"
+	depends on PCI
+	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"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+choice
+	prompt "Kernel core (/proc/kcore) format"
+	depends on PROC_FS
+	default KCORE_ELF
+
+config KCORE_ELF
+	bool "ELF"
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config KCORE_AOUT
+	bool "A.OUT"
+	help
+	  Not necessary unless you're using a very out-of-date binutils
+	  version.  You probably want KCORE_ELF.
+
+endchoice
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+source "drivers/parport/Kconfig"
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/ieee1394/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+
+menu "Old CD-ROM drivers (not SCSI, not IDE)"
+
+config CD_NO_IDESCSI
+	bool "Support non-SCSI/IDE/ATAPI CDROM drives"
+	---help---
+	  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
+	  here, otherwise N. Read the CD-ROM-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about these CD-ROM drives. If you are unsure what you
+	  have, say Y and find out whether you have one of the following
+	  drives.
+
+	  For each of these drivers, a file Documentation/cdrom/{driver_name}
+	  exists. Especially in cases where you do not know exactly which kind
+	  of drive you have you should read there. Most of these drivers use a
+	  file drivers/cdrom/{driver_name}.h where you can define your
+	  interface parameters and switch some internal goodies.
+
+	  All these CD-ROM drivers are also usable as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile them as module, say M instead of Y and
+	  read <file:Documentation/modules.txt>.
+
+	  If you want to use any of these CD-ROM drivers, you also have to
+	  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
+	  answer will get "defaulted" for you if you enable any of the Linux
+	  CD-ROM drivers).
+
+source "drivers/cdrom/Kconfig"
+
+endmenu
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+#if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
+#   source drivers/maple/Config.in
+#fi
+
+menu "Character devices"
+
+config VT
+	bool "Virtual terminal"
+	---help---
+	  If you say Y here, you will get support for terminal devices with
+	  display and keyboard devices. These are called "virtual" because you
+	  can run several virtual terminals (also called virtual consoles) on
+	  one physical terminal. This is rather useful, for example one
+	  virtual terminal can collect system messages and warnings, another
+	  one can be used for a text-mode user session, and a third could run
+	  an X session, all in parallel. Switching between virtual terminals
+	  is done with certain key combinations, usually Alt-<function key>.
+
+	  The setterm command ("man setterm") can be used to change the
+	  properties (such as colors or beeping) of a virtual terminal. The
+	  man page console_codes(4) ("man console_codes") contains the special
+	  character sequences that can be used to change those properties
+	  directly. The fonts used on virtual terminals can be changed with
+	  the setfont ("man setfont") command and the key bindings are defined
+	  with the loadkeys ("man loadkeys") command.
+
+	  You need at least one virtual terminal device in order to make use
+	  of your keyboard and monitor. Therefore, only people configuring an
+	  embedded system would want to say N here in order to save some
+	  memory; the only way to log into such a system is then via a serial
+	  or network connection.
+
+	  If unsure, say Y, or else you won't be able to do much with your new
+	  shiny Linux system :-)
+
+config VT_CONSOLE
+	bool "Support for console on virtual terminal"
+	depends on VT
+	---help---
+	  The system console is the device which receives all kernel messages
+	  and warnings and which allows logins in single user mode. If you
+	  answer Y here, a virtual terminal (the device used to interact with
+	  a physical terminal) can be used as system console. This is the most
+	  common mode of operations, so you should say Y here unless you want
+	  the kernel messages be output only to a serial port (in which case
+	  you should say Y to "Console on serial port", below).
+
+	  If you do say Y here, by default the currently visible virtual
+	  terminal (/dev/tty0) will be used as system console. You can change
+	  that with a kernel command line option such as "console=tty3" which
+	  would use the third virtual terminal as system console. (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.)
+
+	  If unsure, say Y.
+
+config SERIAL
+	tristate "Serial (8250, 16450, 16550 or compatible) support"
+	---help---
+	  This selects whether you want to include the driver for the standard
+	  serial ports.  The standard answer is Y.  People who might say N
+	  here are those that are setting up dedicated Ethernet WWW/FTP
+	  servers, or users that have one of the various bus mice instead of a
+	  serial mouse and don't intend to use their machine's standard serial
+	  port for anything.  (Note that the Cyclades and Stallion multi
+	  serial port drivers do not need this driver built in for them to
+	  work.)
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  serial.o.
+	  [WARNING: Do not compile this driver as a module if you are using
+	  non-standard serial ports, since the configuration information will
+	  be lost when the driver is unloaded.  This limitation may be lifted
+	  in the future.]
+
+	  BTW1: If you have a mouseman serial mouse which is not recognized by
+	  the X window system, try running gpm first.
+
+	  BTW2: If you intend to use a software modem (also called Winmodem)
+	  under Linux, forget it.  These modems are crippled and require
+	  proprietary drivers which are only available under Windows.
+
+	  Most people will say Y or M here, so that they can use serial mice,
+	  modems and similar devices connecting to the standard serial ports.
+
+config SH_SCI
+	tristate "Serial (SCI, SCIF) support"
+	help
+	  Selecting this option will allow the Linux kernel to transfer data
+	  over SCI (Serial Communication Interface) and/or SCIF (Serial
+	  Communication Interface with FIFO) which are built into the Hitachi
+	  SuperH processor.  The option provides 1 to 3 (depending
+	  on the CPU model) standard Linux tty devices, /dev/ttySC[012]; one
+	  of these is normally used as the system console.
+
+	  If in doubt, press "y".
+
+config SERIAL_CONSOLE
+	bool "Support for console on serial port"
+	depends on SERIAL=y || SH_SCI=y
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+comment "Unix 98 PTY support"
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+	---help---
+	  A pseudo terminal (PTY) is a software device consisting of two
+	  halves: a master and a slave. The slave device behaves identical to
+	  a physical terminal; the master device is used by a process to
+	  read data from and write data to the slave, thereby emulating a
+	  terminal. Typical programs for the master side are telnet servers
+	  and xterms.
+
+	  Linux has traditionally used the BSD-like names /dev/ptyxx for
+	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
+	  has a number of problems. The GNU C library glibc 2.1 and later,
+	  however, supports the Unix98 naming standard: in order to acquire a
+	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
+	  terminal is then made available to the process and the pseudo
+	  terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The entries in /dev/pts/ are created on the fly by a virtual
+	  file system; therefore, if you say Y here you should say Y to
+	  "/dev/pts file system for Unix98 PTYs" as well.
+
+	  If you want to say Y here, you need to have the C library glibc 2.1
+	  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
+	  Read the instructions in <file:Documentation/Changes> pertaining to
+	  pseudo terminals. It's safe to say N.
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+	help
+	  The maximum number of Unix98 PTYs that can be used at any one time.
+	  The default is 256, and should be enough for desktop systems. Server
+	  machines which support incoming telnet/rlogin/ssh connections and/or
+	  serve several X terminals may want to increase this: every incoming
+	  connection and every xterm uses up one PTY.
+
+	  When not in use, each additional set of 256 PTYs occupy
+	  approximately 8 KB of kernel memory on 32-bit architectures.
+
+config HEARTBEAT
+	bool "Heartbeat LED"
+	depends on SH_GENERIC || SH_CAT68701 || SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || SH_7751_SOLUTION_ENGINE || SH_SOLUTION_ENGINE
+	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.
+
+
+menu "Maple Bus input peripherals"
+	depends on SH_DREAMCAST && MAPLE
+
+config MAPLE_KEYBOARD
+	tristate "Maple Bus keyboard support"
+	depends on INPUT
+
+config MAPLE_MOUSE
+	tristate "Maple Bus mouse support"
+	depends on INPUT
+
+comment "Input core support is required for Maple input peripherals"
+	depends on INPUT=n
+
+endmenu
+
+#source drivers/char/joystick/Config.in
+config PRINTER
+	tristate "Parallel printer support"
+	depends on PARPORT
+	---help---
+	  If you intend to attach a printer to the parallel port of your Linux
+	  box (as opposed to using a serial printer; if the connector at the
+	  printer has 9 or 25 holes ["female"], then it's serial), say Y.
+	  Also read the Printing-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  It is possible to share one parallel port among several devices
+	  (e.g. printer and ZIP drive) and it is safe to compile the
+	  corresponding drivers into the kernel.  If you want to compile this
+	  driver as a module however ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt> and
+	  <file:Documentation/parport.txt>.  The module will be called lp.o.
+
+	  If you have several parallel ports, you can specify which ports to
+	  use with the "lp" kernel command line option.  (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.)  The syntax of the
+	  "lp" command line option can be found in <file:drivers/char/lp.c>.
+
+	  If you have more than 8 printers, you need to increase the LP_NO
+	  macro in lp.c and the PARPORT_MAX macro in parport.h.
+
+config LP_CONSOLE
+	bool "Support for console on line printer"
+	depends on PRINTER
+	---help---
+	  If you want kernel messages to be printed out as they occur, you
+	  can have a console on the printer. This option adds support for
+	  doing that; to actually get it to happen you need to pass the
+	  option "console=lp0" to the kernel at boot time.
+
+	  If the printer is out of paper (or off, or unplugged, or too
+	  busy..) the kernel will stall until the printer is ready again.
+	  By defining CONSOLE_LP_STRICT to 0 (at your own risk) you
+	  can make the kernel continue when this happens,
+	  but it'll lose the kernel messages.
+
+	  If unsure, say N.
+
+config PPDEV
+	tristate "Support for user-space parallel port device drivers"
+	depends on PARPORT
+	---help---
+	  Saying Y to this adds support for /dev/parport device nodes.  This
+	  is needed for programs that want portable access to the parallel
+	  port, for instance deviceid (which displays Plug-and-Play device
+	  IDs).
+
+	  This is the parallel port equivalent of SCSI generic support (sg).
+	  It is safe to say N to this -- it is not needed for normal printing
+	  or parallel port CD-ROM/disk support.
+
+	  This support is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  ppdev.o.
+
+	  If unsure, say N.
+
+config PSMOUSE
+	bool "PS/2 mouse (aka \"auxiliary device\") support"
+	---help---
+	  The PS/2 mouse connects to a special mouse port that looks much like
+	  the keyboard port (small circular connector with 6 pins). This way,
+	  the mouse does not use any serial ports. This port can also be used
+	  for other input devices like light pens, tablets, keypads. Compaq,
+	  AST and IBM all use this as their mouse port on currently shipping
+	  machines. The trackballs of some laptops are PS/2 mice also. In
+	  particular, the C&T 82C710 mouse on TI Travelmates is a PS/2 mouse.
+
+	  Although PS/2 mice are not technically bus mice, they are explained
+	  in detail in the Busmouse-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  When using a PS/2 mouse, you can get problems if you want to use the
+	  mouse both on the Linux console and under X. Using the "-R" option
+	  of the Linux mouse managing program gpm (available from
+	  <ftp://gnu.systemy.it/pub/gpm/>) solves this problem, or you can get
+	  the "mconv2" utility from <ftp://ibiblio.org/pub/Linux/system/mouse/>.
+
+
+menu "Watchdog Cards"
+
+config WATCHDOG
+	bool "Watchdog Timer Support"
+	---help---
+	  If you say Y here (and to one of the following options) and create a
+	  character special file /dev/watchdog with major number 10 and minor
+	  number 130 using mknod ("man mknod"), you will get a watchdog, i.e.:
+	  subsequently opening the file and then failing to write to it for
+	  longer than 1 minute will result in rebooting the machine. This
+	  could be useful for a networked machine that needs to come back
+	  online as fast as possible after a lock-up. There's both a watchdog
+	  implementation entirely in software (which can sometimes fail to
+	  reboot the machine) and a driver for hardware watchdog boards, which
+	  are more robust and can also keep track of the temperature inside
+	  your computer. For details, read <file:Documentation/watchdog.txt>
+	  in the kernel source.
+
+	  The watchdog is usually used together with the watchdog daemon
+	  which is available from
+	  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
+	  also monitor NFS connections and can reboot the machine when the process
+	  table is full.
+
+	  If unsure, say N.
+
+config WATCHDOG_NOWAYOUT
+	bool "Disable watchdog shutdown on close"
+	depends on WATCHDOG
+	help
+	  The default watchdog behaviour (which you get if you say N here) is
+	  to stop the timer if the process managing it closes the file
+	  /dev/watchdog. It's always remotely possible that this process might
+	  get killed. If you say Y here, the watchdog cannot be stopped once
+	  it has been started.
+
+config SH_WDT
+	tristate "SH 3/4 Watchdog"
+	depends on WATCHDOG
+	help
+	  This driver adds watchdog support for the integrated watchdog in the
+	  SuperH 3 and 4 processors. If you have one of these processors, say Y,
+	  otherwise say N.
+
+	  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 is called shwdt.o. If you want to compile it as a module,
+	  say M here and read Documentation/modules.txt.
+
+endmenu
+
+config RTC
+	tristate "Enhanced Real Time Clock Support"
+	---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
+	  into your computer.
+
+	  Every PC has such a clock built in. It can be used to generate
+	  signals from as low as 1Hz up to 8192Hz, and can also be used
+	  as a 24 hour alarm. It reports status information via the file
+	  /proc/driver/rtc and its behaviour is set by various ioctls on
+	  /dev/rtc.
+
+	  If you run Linux on a multiprocessor machine and said Y to
+	  "Symmetric Multi Processing" above, you should say Y here to read
+	  and set the RTC in an SMP compatible fashion.
+
+	  If you think you have a use for such a device (such as periodic data
+	  sampling), then say Y here, and read <file:Documentation/rtc.txt>
+	  for details.
+
+	  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 is called rtc.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+source "drivers/char/pcmcia/Kconfig"
+
+endmenu
+
+source "fs/Kconfig"
+
+source "drivers/media/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+config VIDEO_SELECT
+	bool "Video mode selection support"
+	---help---
+	  This enables support for text mode selection on kernel startup. If
+	  you want to take advantage of some high-resolution text mode your
+	  card's BIOS offers, but the traditional Linux utilities like
+	  SVGATextMode don't, you can say Y here and set the mode using the
+	  "vga=" option from your boot loader (lilo or loadlin) or set
+	  "vga=ask" which brings up a video mode menu on kernel startup. (Try
+	  "man bootparam" or see the documentation of your boot loader about
+	  how to pass options to the kernel.)
+
+	  Read the file <file:Documentation/svga.txt> for more information
+	  about the Video mode selection support. If unsure, say N.
+
+if EXPERIMENTAL
+
+config MDA_CONSOLE
+	tristate "MDA text console (dual-headed) (EXPERIMENTAL)"
+	---help---
+	  Say Y here if you have an old MDA or monochrome Hercules graphics
+	  adapter in your system acting as a second head ( = video card). You
+	  will then be able to use two monitors with your Linux system. Do not
+	  say Y here if your MDA card is the primary card in your system; the
+	  normal VGA driver will handle it.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called mdacon.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+source "drivers/video/Kconfig"
+
+endif
+
+endmenu
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config SH_STANDARD_BIOS
+	bool "Use LinuxSH standard BIOS"
+	help
+	  Say Y here if your target has the gdb-sh-stub
+	  package from www.m17n.org (or any conforming standard LinuxSH BIOS)
+	  in FLASH or EPROM.  The kernel will use standard BIOS calls during
+	  boot for various housekeeping tasks (including calls to read and
+	  write characters to a system console, get a MAC address from an
+	  on-board Ethernet interface, and shut down the hardware).  Note this
+	  does not work with machines with an existing operating system in
+	  mask ROM and no flash (WindowsCE machines fall in this category).
+	  If unsure, say N.
+
+config SH_EARLY_PRINTK
+	bool "Early printk support"
+	depends on SH_STANDARD_BIOS
+	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
+	  process and ending when the kernel's serial console is initialised.
+	  This option is only useful porting the kernel to a new machine,
+	  when the kernel may crash or hang before the serial console is
+	  initialised. If unsure, say N.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/sh/config.in b/arch/sh/config.in
--- a/arch/sh/config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,372 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-mainmenu_name "Linux/SuperH Kernel Configuration"
-
-define_bool CONFIG_SUPERH y
-
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Processor type and features'
-choice 'SuperH system type'					\
-	"Generic		CONFIG_SH_GENERIC		\
-	 SolutionEngine		CONFIG_SH_SOLUTION_ENGINE	\
-	 SolutionEngine7751	CONFIG_SH_7751_SOLUTION_ENGINE	\
-	 STB1_Harp		CONFIG_SH_STB1_HARP		\
-	 STB1_Overdrive		CONFIG_SH_STB1_OVERDRIVE	\
-	 HP620			CONFIG_SH_HP620			\
-	 HP680			CONFIG_SH_HP680			\
-	 HP690			CONFIG_SH_HP690			\
-	 CqREEK			CONFIG_SH_CQREEK		\
-	 DMIDA			CONFIG_SH_DMIDA    		\
-	 EC3104			CONFIG_SH_EC3104		\
-	 Dreamcast		CONFIG_SH_DREAMCAST		\
-	 CAT68701		CONFIG_SH_CAT68701		\
-	 BigSur			CONFIG_SH_BIGSUR		\
-	 SH2000			CONFIG_SH_SH2000		\
-	 ADX			CONFIG_SH_ADX			\
-	 BareCPU		CONFIG_SH_UNKNOWN" Generic
-
-# The SH7750 RTC module is disabled in the Dreamcast
-if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
-   define_bool CONFIG_SH_RTC n
-else
-   define_bool CONFIG_SH_RTC y
-fi
-
-if [ "$CONFIG_SH_HP620" = "y" -o "$CONFIG_SH_HP680" = "y" -o \
-     "$CONFIG_SH_HP690" = "y" ]; then
-	define_bool CONFIG_SH_HP600 y
-fi
-
-choice 'Processor type' \
-   "SH7707 CONFIG_CPU_SUBTYPE_SH7707 \
-    SH7708 CONFIG_CPU_SUBTYPE_SH7708 \
-    SH7709 CONFIG_CPU_SUBTYPE_SH7709 \
-    SH7750 CONFIG_CPU_SUBTYPE_SH7750 \
-    SH7751 CONFIG_CPU_SUBTYPE_SH7751 \
-    ST40STB1 CONFIG_CPU_SUBTYPE_ST40STB1" SH7708
-if [ "$CONFIG_CPU_SUBTYPE_SH7707" = "y" ]; then
-   define_bool CONFIG_CPU_SH3 y
-   define_bool CONFIG_CPU_SH4 n
-fi
-if [ "$CONFIG_CPU_SUBTYPE_SH7708" = "y" ]; then
-   define_bool CONFIG_CPU_SH3 y
-   define_bool CONFIG_CPU_SH4 n
-fi
-if [ "$CONFIG_CPU_SUBTYPE_SH7709" = "y" ]; then
-   define_bool CONFIG_CPU_SH3 y
-   define_bool CONFIG_CPU_SH4 n
-fi
-if [ "$CONFIG_CPU_SUBTYPE_SH7750" = "y" ]; then
-   define_bool CONFIG_CPU_SH3 n
-   define_bool CONFIG_CPU_SH4 y
-fi
-if [ "$CONFIG_CPU_SUBTYPE_SH7751" = "y" ]; then
-   define_bool CONFIG_CPU_SH3 n
-   define_bool CONFIG_CPU_SH4 y
-fi
-if [ "$CONFIG_CPU_SUBTYPE_ST40STB1" = "y" ]; then
-   define_bool CONFIG_CPU_SH3 n
-   define_bool CONFIG_CPU_SH4 y
-fi
-bool 'Little Endian' CONFIG_CPU_LITTLE_ENDIAN
-# Platform-specific memory start and size definitions
-if [ "$CONFIG_SH_SOLUTION_ENGINE" = "y" ]; then
-   define_hex CONFIG_MEMORY_START 0c000000
-   define_hex CONFIG_MEMORY_SIZE 02000000
-   define_bool CONFIG_MEMORY_SET y
-fi
-if [ "$CONFIG_SH_7751_SOLUTION_ENGINE" = "y" ]; then
-   define_hex CONFIG_MEMORY_START 0c000000
-   define_hex CONFIG_MEMORY_SIZE 04000000
-   define_bool CONFIG_MEMORY_SET y
-fi
-if [ "$CONFIG_SH_HP600" = "y" -o "$CONFIG_SH_BIGSUR" = "y" -o \
-     "$CONFIG_SH_DREAMCAST" = "y" -o "$CONFIG_SH_SH2000" = "y" ]; then
-   define_hex CONFIG_MEMORY_START 0c000000
-   define_hex CONFIG_MEMORY_SIZE 00400000
-   define_bool CONFIG_MEMORY_SET y
-fi
-if [ "$CONFIG_CPU_SUBTYPE_ST40STB1" = "y" ]; then
-   bool 'Memory on LMI' CONFIG_ST40_LMI_MEMORY
-   if [ "$CONFIG_ST40_LMI_MEMORY" = "y" ] ; then
-      define_hex CONFIG_MEMORY_START 08000000
-      define_hex CONFIG_MEMORY_SIZE 00400000
-      define_bool CONFIG_MEMORY_SET y
-   fi
-fi
-if [ "$CONFIG_SH_ADX" = "y" ]; then
-   define_hex CONFIG_MEMORY_START 08000000
-   define_hex CONFIG_MEMORY_SIZE 00400000
-   define_bool CONFIG_MEMORY_SET y
-fi
-# If none of the above have set memory start/size, ask the user.
-if [ "$CONFIG_MEMORY_SET" != "y" ]; then
-   hex 'Physical memory start address' CONFIG_MEMORY_START 08000000
-   hex 'Physical memory size' CONFIG_MEMORY_SIZE 00400000
-fi
-endmenu
-
-if [ "$CONFIG_SH_HP690" = "y" ]; then
-  define_bool CONFIG_DISCONTIGMEM y
-else
-  define_bool CONFIG_DISCONTIGMEM n
-fi
-
-mainmenu_option next_comment
-comment 'General setup'
-
-# Even on SuperH devices which don't have an ISA bus,
-# this variable helps the PCMCIA modules handle
-# IRQ requesting properly -- Greg Banks.
-define_bool CONFIG_ISA y
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_SBUS n
-
-if [ "$CONFIG_SH_GENERIC" = "y" -o "$CONFIG_SH_SOLUTION_ENGINE" = "y" -o \
-     "$CONFIG_SH_UNKNOWN" = "y" -o "$CONFIG_SH_CAT68701" = "y" -o \
-     "$CONFIG_SH_ADX" = "y" ]; then
-  bool 'Compact Flash Enabler support' CONFIG_CF_ENABLER
-fi
-
-if [ "$CONFIG_CF_ENABLER" = "y" ]; then
-   choice 'Compact Flash Connection Area' \
-	"Area5 CONFIG_CF_AREA5 \
-	 Area6 CONFIG_CF_AREA6" Area6
-   if [ "$CONFIG_CF_AREA5" = "y" ]; then
-      define_hex CONFIG_CF_BASE_ADDR b4000000
-   fi
-   if [ "$CONFIG_CF_AREA6" = "y" ]; then
-      define_hex CONFIG_CF_BASE_ADDR b8000000
-   fi
-fi
-
-bool 'Hitachi HD64461 companion chip support' CONFIG_HD64461
-if [ "$CONFIG_HD64461" = "y" ]; then
-   int 'HD64461 IRQ' CONFIG_HD64461_IRQ 36
-   bool 'HD64461 PCMCIA enabler' CONFIG_HD64461_ENABLER
-fi
-
-bool 'Hitachi HD64465 companion chip support' CONFIG_HD64465
-if [ "$CONFIG_HD64465" = "y" ]; then
-   hex 'HD64465 start address' CONFIG_HD64465_IOBASE b0000000
-   int 'HD64465 IRQ' CONFIG_HD64465_IRQ 5
-fi
-
-bool 'DMA controller (DMAC) support' CONFIG_SH_DMA
-
-bool 'PCI support' CONFIG_PCI
-if [ "$CONFIG_PCI" = "y" ]; then
-   choice '  PCI access mode' \
-	"BIOS		CONFIG_PCI_GOBIOS	\
-	 Direct		CONFIG_PCI_GODIRECT	\
-	 Any		CONFIG_PCI_GOANY"	Any
-   if [ "$CONFIG_PCI_GOBIOS" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
-      define_bool CONFIG_PCI_BIOS y
-   fi
-   if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then
-      define_bool CONFIG_PCI_DIRECT y
-   fi
-   bool 'Cache and PCI noncoherent' CONFIG_SH_PCIDMA_NONCOHERENT
-fi
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-   source drivers/pcmcia/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   choice 'Kernel core (/proc/kcore) format' \
-	"ELF		CONFIG_KCORE_ELF	\
-	 A.OUT		CONFIG_KCORE_AOUT" ELF
-fi
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-source drivers/parport/Config.in
-
-endmenu
-
-source drivers/mtd/Config.in
-
-source drivers/block/Config.in
-
-source drivers/md/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/ieee1394/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-         source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Old CD-ROM drivers (not SCSI, not IDE)'
-
-bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
-if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
-   source drivers/cdrom/Config.in
-fi
-endmenu
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-
-if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
-   source drivers/maple/Config.in
-fi
-
-mainmenu_option next_comment
-comment 'Character devices'
-
-bool 'Virtual terminal' CONFIG_VT
-if [ "$CONFIG_VT" = "y" ]; then
-   bool '  Support for console on virtual terminal' CONFIG_VT_CONSOLE
-fi
-
-tristate 'Serial (8250, 16450, 16550 or compatible) support' CONFIG_SERIAL
-tristate 'Serial (SCI, SCIF) support' CONFIG_SH_SCI
-if [ "$CONFIG_SERIAL" = "y" -o "$CONFIG_SH_SCI" = "y" ]; then
-   bool '  Support for console on serial port' CONFIG_SERIAL_CONSOLE
-fi
-comment 'Unix 98 PTY support'
-bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-   int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-fi
-
-if [ "$CONFIG_SH_GENERIC" = "y" -o \
-     "$CONFIG_SH_CAT68701" = "y" -o \
-     "$CONFIG_SH_STB1_HARP" = "y" -o \
-     "$CONFIG_SH_STB1_OVERDRIVE" = "y" -o \
-     "$CONFIG_SH_BIGSUR" = "y" -o \
-     "$CONFIG_SH_7751_SOLUTION_ENGINE" = "y" -o \
-     "$CONFIG_SH_SOLUTION_ENGINE" = "y" ]; then
-   bool 'Heartbeat LED' CONFIG_HEARTBEAT
-fi
-
-if [ "$CONFIG_SH_DREAMCAST" = "y" -a "$CONFIG_MAPLE" != "n" ]; then
-   mainmenu_option next_comment
-   comment 'Maple Bus input peripherals'
-   if [ "$CONFIG_INPUT" != "n" ]; then
-      dep_tristate '  Maple Bus keyboard support' CONFIG_MAPLE_KEYBOARD $CONFIG_INPUT
-      dep_tristate '  Maple Bus mouse support' CONFIG_MAPLE_MOUSE $CONFIG_INPUT
-   else
-      comment 'Input core support is required for Maple input peripherals'
-   fi
-   endmenu
-fi
-
-source drivers/char/joystick/Config.in
-
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
-   if [ "$CONFIG_PRINTER" != "n" ]; then
-      bool '  Support for console on line printer' CONFIG_LP_CONSOLE
-   fi
-   dep_tristate 'Support for user-space parallel port device drivers' CONFIG_PPDEV $CONFIG_PARPORT
-fi
-bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE
-
-mainmenu_option next_comment
-comment 'Watchdog Cards'
-bool 'Watchdog Timer Support' CONFIG_WATCHDOG
-if [ "$CONFIG_WATCHDOG" != "n" ]; then
-   bool '  Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT
-   tristate '  SH 3/4 Watchdog' CONFIG_SH_WDT
-fi
-endmenu
-
-tristate 'Enhanced Real Time Clock Support' CONFIG_RTC
-if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
-   source drivers/char/pcmcia/Config.in
-fi
-endmenu
-
-source fs/Config.in
-
-source drivers/media/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   bool 'VGA text console' CONFIG_VGA_CONSOLE
-   bool 'Video mode selection support' CONFIG_VIDEO_SELECT
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
-      source drivers/video/Config.in
-   fi
-   endmenu
-fi
-
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-bool 'Use LinuxSH standard BIOS' CONFIG_SH_STANDARD_BIOS
-if [ "$CONFIG_SH_STANDARD_BIOS" = "y" ]; then
-   bool 'Early printk support' CONFIG_SH_EARLY_PRINTK
-fi
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
--- a/arch/sh/mm/fault.c	Wed Oct 30 16:44:26 2002
+++ b/arch/sh/mm/fault.c	Wed Oct 30 16:44:26 2002
@@ -30,58 +30,6 @@
 extern void die(const char *,struct pt_regs *,long);
 
 /*
- * Ugly, ugly, but the goto's result in better assembly..
- */
-int __verify_write(const void * addr, unsigned long size)
-{
-	struct vm_area_struct * vma;
-	unsigned long start = (unsigned long) addr;
-
-	if (!size)
-		return 1;
-
-	vma = find_vma(current->mm, start);
-	if (!vma)
-		goto bad_area;
-	if (vma->vm_start > start)
-		goto check_stack;
-
-good_area:
-	if (!(vma->vm_flags & VM_WRITE))
-		goto bad_area;
-	size--;
-	size += start & ~PAGE_MASK;
-	size >>= PAGE_SHIFT;
-	start &= PAGE_MASK;
-
-	for (;;) {
-		if (handle_mm_fault(current->mm, vma, start, 1) <= 0)
-			goto bad_area;
-		if (!size)
-			break;
-		size--;
-		start += PAGE_SIZE;
-		if (start < vma->vm_end)
-			continue;
-		vma = vma->vm_next;
-		if (!vma || vma->vm_start != start)
-			goto bad_area;
-		if (!(vma->vm_flags & VM_WRITE))
-			goto bad_area;;
-	}
-	return 1;
-
-check_stack:
-	if (!(vma->vm_flags & VM_GROWSDOWN))
-		goto bad_area;
-	if (expand_stack(vma, start) == 0)
-		goto good_area;
-
-bad_area:
-	return 0;
-}
-
-/*
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
  * routines.
diff -Nru a/arch/sparc/Config.help b/arch/sparc/Config.help
--- a/arch/sparc/Config.help	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1061 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_SPARC32
-  SPARC is a family of RISC microprocessors designed and marketed by
-  Sun Microsystems, incorporated.  They are very widely found in Sun
-  workstations and clones. This port covers the original 32-bit SPARC;
-  it is old and stable and usually considered one of the "big three"
-  along with the Intel and Alpha ports.  The UltraLinux project
-  maintains both the SPARC32 and SPARC64 ports; its web page is
-  available at <http://www.ultralinux.org/>.
-
-SPARC power management support
-CONFIG_SUN_PM
-  Enable power management and CPU standby features on supported 
-  SPARC platforms. 
-
-CONFIG_BLK_DEV_FD
-  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
-  Thinkpad users, is contained in <file:Documentation/floppy.txt>.
-  That file also contains the location of the Floppy driver FAQ as
-  well as location of the fdutils package used to configure additional
-  parameters of the driver at run time.
-
-  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 floppy.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_BLK_DEV_RAM
-  Saying Y here will allow you to use a portion of your RAM memory as
-  a block device, so that you can make file systems on it, read and
-  write to it and do all the other things that you can do with normal
-  block devices (such as hard drives). It is usually used to load and
-  store a copy of a minimal root file system off of a floppy into RAM
-  during the initial install of Linux.
-
-  Note that the kernel command line option "ramdisk=XX" is now
-  obsolete. For details, read <file:Documentation/ramdisk.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M and read <file:Documentation/modules.txt>. The module will be
-  called rd.o.
-
-  Most normal users won't need the RAM disk functionality, and can
-  thus say N here.
-
-CONFIG_BLK_DEV_RAM_SIZE
-  The default value is 4096. Only change this if you know what are
-  you doing. If you are using IBM S/390, then set this to 8192.
-
-CONFIG_BLK_DEV_INITRD
-  The initial RAM disk is a RAM disk that is loaded by the boot loader
-  (loadlin or lilo) and that is mounted as root before the normal boot
-  procedure. It is typically used to load modules needed to mount the
-  "real" root file system, etc. See <file:Documentation/initrd.txt>
-  for details.
-
-CONFIG_BLK_DEV_LOOP
-  Saying Y here will allow you to use a regular file as a block
-  device; you can then create a file system on that block device and
-  mount it just as you would mount other block devices such as hard
-  drive partitions, CD-ROM drives or floppy drives. The loop devices
-  are block special device files with major number 7 and typically
-  called /dev/loop0, /dev/loop1 etc.
-
-  This is useful if you want to check an ISO 9660 file system before
-  burning the CD, or if you want to use floppy images without first
-  writing them to floppy. Furthermore, some Linux distributions avoid
-  the need for a dedicated Linux partition by keeping their complete
-  root file system inside a DOS FAT file using this loop device
-  driver.
-
-  The loop device driver can also be used to "hide" a file system in a
-  disk partition, floppy, or regular file, either using encryption
-  (scrambling the data) or steganography (hiding the data in the low
-  bits of, say, a sound file). This is also safe if the file resides
-  on a remote file server. If you want to do this, you will first have
-  to acquire and install a kernel patch from
-  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
-  say Y to this option.
-
-  Note that alternative ways to use encrypted file systems are
-  provided by the cfs package, which can be gotten from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
-  package, available at <http://tcfs.dia.unisa.it/>. You do not need
-  to say Y here if you want to use one of these. However, using cfs
-  requires saying Y to "NFS file system support" below while using
-  tcfs requires applying a kernel patch. An alternative steganography
-  solution is provided by StegFS, also available from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
-
-  To use the loop device, you need the losetup utility and a recent
-  version of the mount program, both contained in the util-linux
-  package. The location and current version number of util-linux is
-  contained in the file <file:Documentation/Changes>.
-
-  Note that this loop device has nothing to do with the loopback
-  device used for network connections from the machine to itself.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called loop.o.
-
-  Most users will answer N here.
-
-CONFIG_BLK_DEV_NBD
-  Saying Y here will allow your computer to be a client for network
-  block devices, i.e. it will be able to use block devices exported by
-  servers (mount file systems on them etc.). Communication between
-  client and server works over TCP/IP networking, but to the client
-  program this is hidden: it looks like a regular local file access to
-  a block device special file such as /dev/nd0.
-
-  Network block devices also allows you to run a block-device in
-  userland (making server and client physically the same computer,
-  communicating using the loopback network device).
-
-  Read <file:Documentation/nbd.txt> for more information, especially
-  about where to find the server code, which runs in user space and
-  does not need special kernel support.
-
-  Note that this has nothing to do with the network file systems NFS
-  or Coda; you can say N here even if you intend to use NFS or Coda.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called nbd.o.
-
-  If unsure, say N.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_BLK_DEV_LVM
-  This driver lets you combine several hard disks, hard disk
-  partitions, multiple devices or even loop devices (for evaluation
-  purposes) into a volume group.  Imagine a volume group as a kind of
-  virtual disk. Logical volumes, which can be thought of as virtual
-  partitions, can be created in the volume group.  You can resize
-  volume groups and logical volumes after creation time, corresponding
-  to new capacity needs.  Logical volumes are accessed as block
-  devices named /dev/VolumeGroupName/LogicalVolumeName.
-
-  For details see <file:Documentation/LVM-HOWTO>.  You will need
-  supporting user space software; location is in
-  <file:Documentation/Changes>.
-
-  If you want to compile this support as a module ( = code which can
-  be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called lvm-mod.o.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_BLK_DEV_SD
-  If you want to use a SCSI hard disk or the SCSI or parallel port
-  version of the IOMEGA ZIP drive under Linux, say Y and read the
-  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
-  CD-ROMs.
-
-  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 sd_mod.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  Do not compile this driver as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI disk. In this case, do not compile the driver
-  for your SCSI host adapter (below) as a module either.
-
-CONFIG_SD_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted.  In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional disks that can be loaded after the
-  first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_CHR_DEV_ST
-  If you want to use a SCSI tape drive under Linux, say Y and read the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and
-  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
-  SCSI CD-ROMs.
-
-  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 st.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_CHR_DEV_OSST
-  The OnStream SC-x0 SCSI tape drives can not be driven by the
-  standard st driver, but instead need this special osst driver and
-  use the  /dev/osstX char device nodes (major 206).  Via usb-storage
-  and ide-scsi, you may be able to drive the USB-x0 and DI-x0 drives
-  as well.  Note that there is also a second generation of OnStream
-  tape drives (ADR-x0) that supports the standard SCSI-2 commands for
-  tapes (QIC-157) and can be driven by the standard driver st.
-  For more information, you may have a look at the SCSI-HOWTO
-  <http://www.linuxdoc.org/docs.html#howto>  and
-  <file:drivers/scsi/README.osst>  in the kernel source.
-  More info on the OnStream driver may be found on
-  <http://linux1.onstream.nl/test/>
-  Please also have a look at the standard st docu, as most of it
-  applies to osst as well.
-
-  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 osst.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_BLK_DEV_SR
-  If you want to use a SCSI CD-ROM under Linux, say Y and read the
-  SCSI-HOWTO and the CD-ROM-HOWTO at
-  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
-  or M to "ISO 9660 CD-ROM file system support" later.
-
-  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 sr_mod.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_SR_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted. In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional CD-ROMs that can be loaded after
-  the first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_BLK_DEV_SR_VENDOR
-  This enables the usage of vendor specific SCSI commands. This is
-  required to support multisession CDs with old NEC/TOSHIBA cdrom
-  drives (and HP Writers). If you have such a drive and get the first
-  session only, try saying Y here; everybody else says N.
-
-CONFIG_CHR_DEV_SG
-  If you want to use SCSI scanners, synthesizers or CD-writers or just
-  about anything having "SCSI" in its name other than hard disks,
-  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
-  directly, so you need some additional software which knows how to
-  talk to these devices using the SCSI protocol:
-
-  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
-  writer software look at Cdrtools
-  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
-  and for burning a "disk at once": CDRDAO
-  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
-  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
-  For other devices, it's possible that you'll have to write the
-  driver software yourself. Please read the file
-  <file:Documentation/scsi-generic.txt> for more information.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
-  say N.
-
-CONFIG_SCSI_MULTI_LUN
-  If you have a SCSI device that supports more than one LUN (Logical
-  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-  can say Y here to force the SCSI driver to probe for multiple LUNs.
-  A SCSI device with multiple LUNs acts logically like multiple SCSI
-  devices. The vast majority of SCSI devices have only one LUN, and
-  so most people can say N here and should in fact do so, because it
-  is safer.
-
-CONFIG_SCSI_CONSTANTS
-  The error messages regarding your SCSI hardware will be easier to
-  understand if you say Y here; it will enlarge your kernel by about
-  12 KB. If in doubt, say Y.
-
-CONFIG_SCSI_LOGGING
-  This turns on a logging facility that can be used to debug a number
-  of SCSI related problems.
-
-  If you say Y here, no logging output will appear by default, but you
-  can enable logging by saying Y to "/proc file system support" and
-  "Sysctl support" below and executing the command
-
-     echo "scsi log token [level]" > /proc/scsi/scsi
-
-  at boot time after the /proc file system has been mounted.
-
-  There are a number of things that can be used for 'token' (you can
-  find them in the source: <file:drivers/scsi/scsi.c>), and this
-  allows you to select the types of information you want, and the
-  level allows you to select the level of verbosity.
-
-  If you say N here, it may be harder to track down some types of SCSI
-  problems. If you say Y here your kernel will be somewhat larger, but
-  there should be no noticeable performance impact as long as you have
-  logging turned off.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_DUMMY
-  This is essentially a bit-bucket device (i.e. traffic you send to
-  this device is consigned into oblivion) with a configurable IP
-  address. It is most commonly used in order to make your currently
-  inactive SLIP address seem like a real address for local programs.
-  If you use SLIP or PPP, you might want to say Y here. Since this
-  thing often comes in handy, the default is Y. It won't enlarge your
-  kernel either. What a deal. Read about it in the Network
-  Administrator's Guide, available from
-  <http://www.linuxdoc.org/docs.html#guide>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called dummy.o.  If you want to use more than one dummy
-  device at a time, you need to compile this driver as a module.
-  Instead of 'dummy', the devices will then be called 'dummy0',
-  'dummy1' etc.
-
-CONFIG_BONDING
-  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
-  Channels together. This is called 'Etherchannel' by Cisco,
-  'Trunking' by Sun, and 'Bonding' in Linux.
-
-  If you have two Ethernet connections to some other computer, you can
-  make them behave like one double speed connection using this driver.
-  Naturally, this has to be supported at the other end as well, either
-  with a similar Bonding Linux driver, a Cisco 5500 switch or a
-  SunTrunking SunSoft driver.
-
-  This is similar to the EQL driver, but it merges Ethernet segments
-  instead of serial lines.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called bonding.o.
-
-CONFIG_SLIP
-  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
-  connect to your Internet service provider or to connect to some
-  other local Unix box or if you want to configure your Linux box as a
-  Slip/CSlip server for other people to dial in. SLIP (Serial Line
-  Internet Protocol) is a protocol used to send Internet traffic over
-  serial connections such as telephone lines or null modem cables;
-  nowadays, the protocol PPP is more commonly used for this same
-  purpose.
-
-  Normally, your access provider has to support SLIP in order for you
-  to be able to use it, but there is now a SLIP emulator called SLiRP
-  around (available from
-  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-  allows you to use SLIP over a regular dial up shell connection. If
-  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
-  NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, explains how to
-  configure SLIP. Note that you don't need this option if you just
-  want to run term (term is a program which gives you almost full
-  Internet connectivity if you have a regular dial up shell account on
-  some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
-  support will enlarge your kernel by about 4 KB. If unsure, say N.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>. The module will be
-  called slip.o.
-
-CONFIG_SLIP_COMPRESSED
-  This protocol is faster than SLIP because it uses compression on the
-  TCP/IP headers (not on the data itself), but it has to be supported
-  on both ends. Ask your access provider if you are not sure and
-  answer Y, just in case. You will still be able to use plain SLIP. If
-  you plan to use SLiRP, the SLIP emulator (available from
-  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-  allows you to use SLIP over a regular dial up shell connection, you
-  definitely want to say Y here. The NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
-  CSLIP. This won't enlarge your kernel.
-
-CONFIG_SLIP_SMART
-  Adds additional capabilities to the SLIP driver to support the
-  RELCOM line fill and keepalive monitoring. Ideal on poor quality
-  analogue lines.
-
-CONFIG_SLIP_MODE_SLIP6
-  Just occasionally you may need to run IP over hostile serial
-  networks that don't pass all control characters or are only seven
-  bit. Saying Y here adds an extra mode you can use with SLIP:
-  "slip6". In this mode, SLIP will only send normal ASCII symbols over
-  the serial device. Naturally, this has to be supported at the other
-  end of the link as well. It's good enough, for example, to run IP
-  over the async ports of a Camtec JNT Pad. If unsure, say N.
-
-CONFIG_PPP
-  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
-  the same purpose: sending Internet traffic over telephone (and other
-  serial) lines.  Ask your access provider if they support it, because
-  otherwise you can't use it; most Internet access providers these
-  days support PPP rather than SLIP.
-
-  To use PPP, you need an additional program called pppd as described
-  in the PPP-HOWTO, available at
-  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
-  the version of pppd recommended in <file:Documentation/Changes>.
-  The PPP option enlarges your kernel by about 16 KB.
-
-  There are actually two versions of PPP: the traditional PPP for
-  asynchronous lines, such as regular analog phone lines, and
-  synchronous PPP which can be used over digital ISDN lines for
-  example.  If you want to use PPP over phone lines or other
-  asynchronous serial lines, you need to say Y (or M) here and also to
-  the next option, "PPP support for async serial ports".  For PPP over
-  synchronous lines, you should say Y (or M) here and to "Support
-  synchronous PPP", below.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you said Y to "Version information on all symbols" above, then
-  you cannot compile the PPP driver into the kernel; you can then only
-  compile it as a module.  The module will be called ppp_generic.o.
-  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>.
-
-CONFIG_PPP_ASYNC
-  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
-  a modem (not a synchronous or ISDN modem) to contact your ISP, you
-  need this option.
-
-  This code is also available as a module (code which can be inserted
-  into and removed from the running kernel).  If you want to compile
-  it as a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PPP_SYNC_TTY
-  Say Y (or M) here if you want to be able to use PPP over synchronous
-  (HDLC) tty devices, such as the SyncLink adapter. These devices
-  are often used for high-speed leased lines like T1/E1.
-
-  This code is also available as a module (code which can be inserted
-  into and removed from the running kernel).  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_PPP_DEFLATE
-  Support for the Deflate compression method for PPP, which uses the
-  Deflate algorithm (the same algorithm that gzip uses) to compress
-  each PPP packet before it is sent over the wire.  The machine at the
-  other end of the PPP link (usually your ISP) has to support the
-  Deflate compression method as well for this to be useful.  Even if
-  they don't support it, it is safe to say Y here.
-
-  This code is also available as a module (code which can be inserted
-  into and removed from the running kernel).  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_PPP_BSDCOMP
-  Support for the BSD-Compress compression method for PPP, which uses
-  the LZW compression method to compress each PPP packet before it is
-  sent over the wire. The machine at the other end of the PPP link
-  (usually your ISP) has to support the BSD-Compress compression
-  method as well for this to be useful. Even if they don't support it,
-  it is safe to say Y here.
-
-  The PPP Deflate compression method ("PPP Deflate compression",
-  above) is preferable to BSD-Compress, because it compresses better
-  and is patent-free.
-
-  Note that the BSD compression code will always be compiled as a
-  module; it is called bsd_comp.o and will show up in the directory
-  modules once you have said "make modules". If unsure, say N.
-
-CONFIG_TUN
-  TUN/TAP provides packet reception and transmission for user space
-  programs.  It can be viewed as a simple Point-to-Point or Ethernet
-  device, which instead of receiving packets from a physical media,
-  receives them from user space program and instead of sending packets
-  via physical media writes them to the user space program.
-
-  When a program opens /dev/net/tun, driver creates and registers
-  corresponding net device tunX or tapX.  After a program closed above
-  devices, driver will automatically delete tunXX or tapXX device and
-  all routes corresponding to it.
-
-  Please read <file:Documentation/networking/tuntap.txt> for more
-  information.
-
-  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 tun.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you don't know what to use this for, you don't need it.
-
-CONFIG_ETHERTAP
-  If you say Y here (and have said Y to "Kernel/User network link
-  driver", above) and create a character special file /dev/tap0 with
-  major number 36 and minor number 16 using mknod ("man mknod"), you
-  will be able to have a user space program read and write raw
-  Ethernet frames from/to that special file.  tap0 can be configured
-  with ifconfig and route like any other Ethernet device but it is not
-  connected to any physical LAN; everything written by the user to
-  /dev/tap0 is treated by the kernel as if it had come in from a LAN
-  to the device tap0; everything the kernel wants to send out over the
-  device tap0 can instead be read by the user from /dev/tap0: the user
-  mode program replaces the LAN that would be attached to an ordinary
-  Ethernet device. Please read the file
-  <file:Documentation/networking/ethertap.txt> for more information.
-
-  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 ethertap.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you don't know what to use this for, you don't need it.
-
-CONFIG_MYRI_SBUS
-  This driver supports MyriCOM Sbus gigabit Ethernet cards.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called myri_sbus.o.
-
-CONFIG_VORTEX
-  This option enables driver support for a large number of 10mbps and
-  10/100mbps EISA, PCI and PCMCIA 3Com network cards:
-
-  "Vortex"    (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
-  "Boomerang" (EtherLink XL 3c900 or 3c905)            PCI
-  "Cyclone"   (3c540/3c900/3c905/3c980/3c575/3c656)    PCI and Cardbus
-  "Tornado"   (3c905)                                  PCI
-  "Hurricane" (3c555/3cSOHO)                           PCI
-
-  If you have such a card, say Y and read the Ethernet-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>. More
-  specific information is in
-  <file:Documentation/networking/vortex.txt> and in the comments at
-  the beginning of <file:drivers/net/3c59x.c>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.
-
-CONFIG_HAPPYMEAL
-  This driver supports the "hme" interface present on most Ultra
-  systems and as an option on older Sbus systems. This driver supports
-  both PCI and Sbus devices. This driver also supports the "qfe" quad
-  100baseT device available in both PCI and Sbus configurations.
-
-  This support is also available as a module called sunhme.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUNLANCE
-  This driver supports the "le" interface present on all 32-bit Sparc
-  systems, on some older Ultra systems and as an Sbus option.  These
-  cards are based on the AMD Lance chipset, which is better known
-  via the NE2100 cards.
-
-  This support is also available as a module called sunlance.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUNBMAC
-  This driver supports the "be" interface available as an Sbus option.
-  This is Sun's older 100baseT Ethernet device.
-
-  This support is also available as a module called sunbmac.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUNQE
-  This driver supports the "qe" 10baseT Ethernet device, available as
-  an Sbus option. Note that this is not the same as Quad FastEthernet
-  "qfe" which is supported by the Happy Meal driver instead.
-
-  This support is also available as a module called sunqe.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_FDDI
-  Fiber Distributed Data Interface is a high speed local area network
-  design; essentially a replacement for high speed Ethernet. FDDI can
-  run over copper or fiber. If you are connected to such a network and
-  want a driver for the FDDI card in your computer, say Y here (and
-  then also Y to the driver for your FDDI card, below). Most people
-  will say N.
-
-CONFIG_VT
-  If you say Y here, you will get support for terminal devices with
-  display and keyboard devices. These are called "virtual" because you
-  can run several virtual terminals (also called virtual consoles) on
-  one physical terminal. This is rather useful, for example one
-  virtual terminal can collect system messages and warnings, another
-  one can be used for a text-mode user session, and a third could run
-  an X session, all in parallel. Switching between virtual terminals
-  is done with certain key combinations, usually Alt-<function key>.
-
-  The setterm command ("man setterm") can be used to change the
-  properties (such as colors or beeping) of a virtual terminal. The
-  man page console_codes(4) ("man console_codes") contains the special
-  character sequences that can be used to change those properties
-  directly. The fonts used on virtual terminals can be changed with
-  the setfont ("man setfont") command and the key bindings are defined
-  with the loadkeys ("man loadkeys") command.
-
-  You need at least one virtual terminal device in order to make use
-  of your keyboard and monitor. Therefore, only people configuring an
-  embedded system would want to say N here in order to save some
-  memory; the only way to log into such a system is then via a serial
-  or network connection.
-
-  If unsure, say Y, or else you won't be able to do much with your new
-  shiny Linux system :-)
-
-CONFIG_VT_CONSOLE
-  The system console is the device which receives all kernel messages
-  and warnings and which allows logins in single user mode. If you
-  answer Y here, a virtual terminal (the device used to interact with
-  a physical terminal) can be used as system console. This is the most
-  common mode of operations, so you should say Y here unless you want
-  the kernel messages be output only to a serial port (in which case
-  you should say Y to "Console on serial port", below).
-
-  If you do say Y here, by default the currently visible virtual
-  terminal (/dev/tty0) will be used as system console. You can change
-  that with a kernel command line option such as "console=tty3" which
-  would use the third virtual terminal as system console. (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.)
-
-  If unsure, say Y.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_PRINTER
-  If you intend to attach a printer to the parallel port of your Linux
-  box (as opposed to using a serial printer; if the connector at the
-  printer has 9 or 25 holes ["female"], then it's serial), say Y.
-  Also read the Printing-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  It is possible to share one parallel port among several devices
-  (e.g. printer and ZIP drive) and it is safe to compile the
-  corresponding drivers into the kernel.  If you want to compile this
-  driver as a module however ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt> and
-  <file:Documentation/parport.txt>.  The module will be called lp.o.
-
-  If you have several parallel ports, you can specify which ports to
-  use with the "lp" kernel command line option.  (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.)  The syntax of the
-  "lp" command line option can be found in <file:drivers/char/lp.c>.
-
-  If you have more than 8 printers, you need to increase the LP_NO
-  macro in lp.c and the PARPORT_MAX macro in parport.h.
-
-CONFIG_SOFT_WATCHDOG
-  A software monitoring watchdog. This will fail to reboot your system
-  from some situations that the hardware watchdog will recover
-  from. Equally it's a lot cheaper to install.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called
-   softdog.o.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_SUN4
-  Say Y here if, and only if, your machine is a Sun4. Note that
-  a kernel compiled with this option will run only on Sun4.
-  (And the current version will probably work only on sun4/330.)
-
-CONFIG_SCSI_SUNESP
-  This is the driver for the Sun ESP SCSI host adapter. The ESP
-  chipset is present in most SPARC SBUS-based computers.
-
-  This support is also available as a module called esp.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGICPTI
-  This driver supports SBUS SCSI controllers from PTI or QLogic. These
-  controllers are known under Solaris as qpti and in the openprom as
-  PTI,ptisp or QLGC,isp. Note that PCI QLogic SCSI controllers are
-  driven by a different driver.
-
-  This support is also available as a module called qlogicpti.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_PROM_CONSOLE
-  Say Y to build a console driver for Sun machines that uses the
-  terminal emulation built into their console PROMS.
-
-CONFIG_SUN_OPENPROMFS
-  If you say Y, the OpenPROM device tree will be available as a
-  virtual file system, which you can mount to /proc/openprom by "mount
-  -t openpromfs none /proc/openprom".
-
-  If you want to compile the /proc/openprom support as a module ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called openpromfs.o.  If unsure, say M.
-
-CONFIG_SUNOS_EMUL
-  This allows you to run most SunOS binaries.  If you want to do this,
-  say Y here and place appropriate files in /usr/gnemul/sunos. See
-  <http://www.ultralinux.org/faq.html> for more information.  If you
-  want to run SunOS binaries on an Ultra you must also say Y to
-  "Kernel support for 32-bit a.out binaries" above.
-
diff -Nru a/arch/sparc/Kconfig b/arch/sparc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/sparc/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1426 @@
+# $Id: config.in,v 1.113 2002/01/24 22:14:44 davem Exp $
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+
+mainmenu "Linux/SPARC Kernel Configuration"
+
+config UID16
+	bool
+	default y
+
+config HIGHMEM
+	bool
+	default y
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "General setup"
+
+config VT
+	bool
+	default y
+	---help---
+	  If you say Y here, you will get support for terminal devices with
+	  display and keyboard devices. These are called "virtual" because you
+	  can run several virtual terminals (also called virtual consoles) on
+	  one physical terminal. This is rather useful, for example one
+	  virtual terminal can collect system messages and warnings, another
+	  one can be used for a text-mode user session, and a third could run
+	  an X session, all in parallel. Switching between virtual terminals
+	  is done with certain key combinations, usually Alt-<function key>.
+
+	  The setterm command ("man setterm") can be used to change the
+	  properties (such as colors or beeping) of a virtual terminal. The
+	  man page console_codes(4) ("man console_codes") contains the special
+	  character sequences that can be used to change those properties
+	  directly. The fonts used on virtual terminals can be changed with
+	  the setfont ("man setfont") command and the key bindings are defined
+	  with the loadkeys ("man loadkeys") command.
+
+	  You need at least one virtual terminal device in order to make use
+	  of your keyboard and monitor. Therefore, only people configuring an
+	  embedded system would want to say N here in order to save some
+	  memory; the only way to log into such a system is then via a serial
+	  or network connection.
+
+	  If unsure, say Y, or else you won't be able to do much with your new
+	  shiny Linux system :-)
+
+config VT_CONSOLE
+	bool
+	default y
+	---help---
+	  The system console is the device which receives all kernel messages
+	  and warnings and which allows logins in single user mode. If you
+	  answer Y here, a virtual terminal (the device used to interact with
+	  a physical terminal) can be used as system console. This is the most
+	  common mode of operations, so you should say Y here unless you want
+	  the kernel messages be output only to a serial port (in which case
+	  you should say Y to "Console on serial port", below).
+
+	  If you do say Y here, by default the currently visible virtual
+	  terminal (/dev/tty0) will be used as system console. You can change
+	  that with a kernel command line option such as "console=tty3" which
+	  would use the third virtual terminal as system console. (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.)
+
+	  If unsure, say Y.
+
+config HW_CONSOLE
+	bool
+	default y
+
+config SMP
+	bool "Symmetric multi-processing support (does not work on sun4/sun4c)"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+
+# Identify this as a Sparc32 build
+config SPARC32
+	bool
+	default y
+	help
+	  SPARC is a family of RISC microprocessors designed and marketed by
+	  Sun Microsystems, incorporated.  They are very widely found in Sun
+	  workstations and clones. This port covers the original 32-bit SPARC;
+	  it is old and stable and usually considered one of the "big three"
+	  along with the Intel and Alpha ports.  The UltraLinux project
+	  maintains both the SPARC32 and SPARC64 ports; its web page is
+	  available at <http://www.ultralinux.org/>.
+
+# Global things across all Sun machines.
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config PCMCIA
+	tristate
+	---help---
+	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
+	  computer.  These are credit-card size devices such as network cards,
+	  modems or hard drives often used with laptops computers.  There are
+	  actually two varieties of these cards: the older 16 bit PCMCIA cards
+	  and the newer 32 bit CardBus cards.  If you want to use CardBus
+	  cards, you need to say Y here and also to "CardBus support" below.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  Please also read the PCMCIA-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).
+	  When compiled this way, there will be modules called pcmcia_core.o
+	  and ds.o.  If you want to compile it as a module, say M here and
+	  read <file:Documentation/modules.txt>.
+
+config SBUS
+	bool
+	default y
+
+config SBUSCHAR
+	bool
+	default y
+
+config SERIAL_CONSOLE
+	bool
+	default y
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+config SUN_AUXIO
+	bool
+	default y
+
+config SUN_IO
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config SUN_PM
+	bool
+	default y
+	help
+	  Enable power management and CPU standby features on supported 
+	  SPARC platforms. 
+
+config SUN4
+	bool "Support for SUN4 machines (disables SUN4[CDM] support)"
+	help
+	  Say Y here if, and only if, your machine is a Sun4. Note that
+	  a kernel compiled with this option will run only on Sun4.
+	  (And the current version will probably work only on sun4/330.)
+
+if !SUN4
+
+config PCI
+	bool "Support for PCI and PS/2 keyboard/mouse"
+	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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+source "drivers/pci/Kconfig"
+
+endif
+
+config SUN_OPENPROMFS
+	tristate "Openprom tree appears in /proc/openprom"
+	help
+	  If you say Y, the OpenPROM device tree will be available as a
+	  virtual file system, which you can mount to /proc/openprom by "mount
+	  -t openpromfs none /proc/openprom".
+
+	  If you want to compile the /proc/openprom support as a module ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called openpromfs.o.  If unsure, say M.
+
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config BINFMT_AOUT
+	tristate "Kernel support for a.out binaries"
+	---help---
+	  A.out (Assembler.OUTput) is a set of formats for libraries and
+	  executables used in the earliest versions of UNIX. Linux used the
+	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
+	  ELF format.
+
+	  As more and more programs are converted to ELF, the use for a.out
+	  will gradually diminish. If you disable this option it will reduce
+	  your kernel by one page. This is not much and by itself does not
+	  warrant removing support. However its removal is a good idea if you
+	  wish to ensure that absolutely none of your programs will use this
+	  older executable format. If you don't know what to answer at this
+	  point then answer Y. If someone told you "You need a kernel with
+	  QMAGIC support" then you'll have to say Y here. You may answer M to
+	  compile a.out support as a module and later load the module when you
+	  want to use a program or library in a.out format. The module will be
+	  called binfmt_aout.o. Saying M or N here is dangerous though,
+	  because some crucial programs on your system might still be in A.OUT
+	  format.
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config SUNOS_EMUL
+	bool "SunOS binary emulation"
+	help
+	  This allows you to run most SunOS binaries.  If you want to do this,
+	  say Y here and place appropriate files in /usr/gnemul/sunos. See
+	  <http://www.ultralinux.org/faq.html> for more information.  If you
+	  want to run SunOS binaries on an Ultra you must also say Y to
+	  "Kernel support for 32-bit a.out binaries" above.
+
+source "drivers/parport/Kconfig"
+
+config PRINTER
+	tristate "Parallel printer support"
+	depends on PARPORT
+	---help---
+	  If you intend to attach a printer to the parallel port of your Linux
+	  box (as opposed to using a serial printer; if the connector at the
+	  printer has 9 or 25 holes ["female"], then it's serial), say Y.
+	  Also read the Printing-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  It is possible to share one parallel port among several devices
+	  (e.g. printer and ZIP drive) and it is safe to compile the
+	  corresponding drivers into the kernel.  If you want to compile this
+	  driver as a module however ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt> and
+	  <file:Documentation/parport.txt>.  The module will be called lp.o.
+
+	  If you have several parallel ports, you can specify which ports to
+	  use with the "lp" kernel command line option.  (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.)  The syntax of the
+	  "lp" command line option can be found in <file:drivers/char/lp.c>.
+
+	  If you have more than 8 printers, you need to increase the LP_NO
+	  macro in lp.c and the PARPORT_MAX macro in parport.h.
+
+endmenu
+
+
+menu "Console drivers"
+
+config PROM_CONSOLE
+	bool "PROM console"
+	help
+	  Say Y to build a console driver for Sun machines that uses the
+	  terminal emulation built into their console PROMS.
+
+config DUMMY_CONSOLE
+	bool
+	depends on !PROM_CONSOLE
+	default y
+
+source "drivers/video/Kconfig"
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/serial/Kconfig"
+
+if !SUN4
+source "drivers/sbus/char/Kconfig"
+endif
+
+
+menu "Block devices"
+
+config BLK_DEV_FD
+	bool "Normal floppy disk support"
+	---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
+	  Thinkpad users, is contained in <file:Documentation/floppy.txt>.
+	  That file also contains the location of the Floppy driver FAQ as
+	  well as location of the fdutils package used to configure additional
+	  parameters of the driver at run time.
+
+	  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 floppy.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config BLK_DEV_LOOP
+	tristate "Loopback device support"
+	---help---
+	  Saying Y here will allow you to use a regular file as a block
+	  device; you can then create a file system on that block device and
+	  mount it just as you would mount other block devices such as hard
+	  drive partitions, CD-ROM drives or floppy drives. The loop devices
+	  are block special device files with major number 7 and typically
+	  called /dev/loop0, /dev/loop1 etc.
+
+	  This is useful if you want to check an ISO 9660 file system before
+	  burning the CD, or if you want to use floppy images without first
+	  writing them to floppy. Furthermore, some Linux distributions avoid
+	  the need for a dedicated Linux partition by keeping their complete
+	  root file system inside a DOS FAT file using this loop device
+	  driver.
+
+	  The loop device driver can also be used to "hide" a file system in a
+	  disk partition, floppy, or regular file, either using encryption
+	  (scrambling the data) or steganography (hiding the data in the low
+	  bits of, say, a sound file). This is also safe if the file resides
+	  on a remote file server. If you want to do this, you will first have
+	  to acquire and install a kernel patch from
+	  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
+	  say Y to this option.
+
+	  Note that alternative ways to use encrypted file systems are
+	  provided by the cfs package, which can be gotten from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
+	  package, available at <http://tcfs.dia.unisa.it/>. You do not need
+	  to say Y here if you want to use one of these. However, using cfs
+	  requires saying Y to "NFS file system support" below while using
+	  tcfs requires applying a kernel patch. An alternative steganography
+	  solution is provided by StegFS, also available from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
+
+	  To use the loop device, you need the losetup utility and a recent
+	  version of the mount program, both contained in the util-linux
+	  package. The location and current version number of util-linux is
+	  contained in the file <file:Documentation/Changes>.
+
+	  Note that this loop device has nothing to do with the loopback
+	  device used for network connections from the machine to itself.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called loop.o.
+
+	  Most users will answer N here.
+
+config BLK_DEV_NBD
+	tristate "Network block device support"
+	depends on NET
+	---help---
+	  Saying Y here will allow your computer to be a client for network
+	  block devices, i.e. it will be able to use block devices exported by
+	  servers (mount file systems on them etc.). Communication between
+	  client and server works over TCP/IP networking, but to the client
+	  program this is hidden: it looks like a regular local file access to
+	  a block device special file such as /dev/nd0.
+
+	  Network block devices also allows you to run a block-device in
+	  userland (making server and client physically the same computer,
+	  communicating using the loopback network device).
+
+	  Read <file:Documentation/nbd.txt> for more information, especially
+	  about where to find the server code, which runs in user space and
+	  does not need special kernel support.
+
+	  Note that this has nothing to do with the network file systems NFS
+	  or Coda; you can say N here even if you intend to use NFS or Coda.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called nbd.o.
+
+	  If unsure, say N.
+
+source "drivers/md/Kconfig"
+
+config BLK_DEV_RAM
+	tristate "RAM disk support"
+	---help---
+	  Saying Y here will allow you to use a portion of your RAM memory as
+	  a block device, so that you can make file systems on it, read and
+	  write to it and do all the other things that you can do with normal
+	  block devices (such as hard drives). It is usually used to load and
+	  store a copy of a minimal root file system off of a floppy into RAM
+	  during the initial install of Linux.
+
+	  Note that the kernel command line option "ramdisk=XX" is now
+	  obsolete. For details, read <file:Documentation/ramdisk.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M and read <file:Documentation/modules.txt>. The module will be
+	  called rd.o.
+
+	  Most normal users won't need the RAM disk functionality, and can
+	  thus say N here.
+
+config BLK_DEV_RAM_SIZE
+	int "Default RAM disk size"
+	depends on BLK_DEV_RAM
+	default "4096"
+	help
+	  The default value is 4096. Only change this if you know what are
+	  you doing. If you are using IBM S/390, then set this to 8192.
+
+config BLK_DEV_INITRD
+	bool "Initial RAM disk (initrd) support"
+	depends on BLK_DEV_RAM=y
+	help
+	  The initial RAM disk is a RAM disk that is loaded by the boot loader
+	  (loadlin or lilo) and that is mounted as root before the normal boot
+	  procedure. It is typically used to load modules needed to mount the
+	  "real" root file system, etc. See <file:Documentation/initrd.txt>
+	  for details.
+
+endmenu
+
+# Don't frighten a common SBus user
+if PCI
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+endif
+
+source "drivers/isdn/Kconfig"
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+comment "SCSI support type (disk, tape, CDrom)"
+	depends on SCSI
+
+config BLK_DEV_SD
+	tristate "SCSI disk support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI hard disk or the SCSI or parallel port
+	  version of the IOMEGA ZIP drive under Linux, say Y and read the
+	  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
+	  CD-ROMs.
+
+	  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 sd_mod.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  Do not compile this driver as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI disk. In this case, do not compile the driver
+	  for your SCSI host adapter (below) as a module either.
+
+config SD_EXTRA_DEVS
+	int "Maximum number of SCSI disks that can be loaded as modules"
+	depends on BLK_DEV_SD
+	default "40"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted.  In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional disks that can be loaded after the
+	  first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_ST
+	tristate "SCSI tape support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI tape drive under Linux, say Y and read the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and
+	  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
+	  SCSI CD-ROMs.
+
+	  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 st.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config CHR_DEV_OSST
+	tristate "SCSI OnStream SC-x0 tape support"
+	depends on SCSI
+	---help---
+	  The OnStream SC-x0 SCSI tape drives can not be driven by the
+	  standard st driver, but instead need this special osst driver and
+	  use the  /dev/osstX char device nodes (major 206).  Via usb-storage
+	  and ide-scsi, you may be able to drive the USB-x0 and DI-x0 drives
+	  as well.  Note that there is also a second generation of OnStream
+	  tape drives (ADR-x0) that supports the standard SCSI-2 commands for
+	  tapes (QIC-157) and can be driven by the standard driver st.
+	  For more information, you may have a look at the SCSI-HOWTO
+	  <http://www.linuxdoc.org/docs.html#howto>  and
+	  <file:drivers/scsi/README.osst>  in the kernel source.
+	  More info on the OnStream driver may be found on
+	  <http://linux1.onstream.nl/test/>
+	  Please also have a look at the standard st docu, as most of it
+	  applies to osst as well.
+
+	  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 osst.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR
+	tristate "SCSI CDROM support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI CD-ROM under Linux, say Y and read the
+	  SCSI-HOWTO and the CD-ROM-HOWTO at
+	  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
+	  or M to "ISO 9660 CD-ROM file system support" later.
+
+	  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 sr_mod.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR_VENDOR
+	bool "Enable vendor-specific extensions (for SCSI CDROM)"
+	depends on BLK_DEV_SR
+	help
+	  This enables the usage of vendor specific SCSI commands. This is
+	  required to support multisession CDs with old NEC/TOSHIBA cdrom
+	  drives (and HP Writers). If you have such a drive and get the first
+	  session only, try saying Y here; everybody else says N.
+
+config SR_EXTRA_DEVS
+	int "Maximum number of CDROM devices that can be loaded as modules"
+	depends on BLK_DEV_SR
+	default "2"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted. In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional CD-ROMs that can be loaded after
+	  the first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_SG
+	tristate "SCSI generic support"
+	depends on SCSI
+	---help---
+	  If you want to use SCSI scanners, synthesizers or CD-writers or just
+	  about anything having "SCSI" in its name other than hard disks,
+	  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
+	  directly, so you need some additional software which knows how to
+	  talk to these devices using the SCSI protocol:
+
+	  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
+	  writer software look at Cdrtools
+	  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
+	  and for burning a "disk at once": CDRDAO
+	  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
+	  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
+	  For other devices, it's possible that you'll have to write the
+	  driver software yourself. Please read the file
+	  <file:Documentation/scsi-generic.txt> for more information.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
+	  say N.
+
+comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+	depends on SCSI
+
+config SCSI_MULTI_LUN
+	bool "Probe all LUNs on each SCSI device"
+	depends on SCSI
+	help
+	  If you have a SCSI device that supports more than one LUN (Logical
+	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
+	  can say Y here to force the SCSI driver to probe for multiple LUNs.
+	  A SCSI device with multiple LUNs acts logically like multiple SCSI
+	  devices. The vast majority of SCSI devices have only one LUN, and
+	  so most people can say N here and should in fact do so, because it
+	  is safer.
+
+config SCSI_CONSTANTS
+	bool "Verbose SCSI error reporting (kernel size +=12K)"
+	depends on SCSI
+	help
+	  The error messages regarding your SCSI hardware will be easier to
+	  understand if you say Y here; it will enlarge your kernel by about
+	  12 KB. If in doubt, say Y.
+
+config SCSI_LOGGING
+	bool "SCSI logging facility"
+	depends on SCSI
+	---help---
+	  This turns on a logging facility that can be used to debug a number
+	  of SCSI related problems.
+
+	  If you say Y here, no logging output will appear by default, but you
+	  can enable logging by saying Y to "/proc file system support" and
+	  "Sysctl support" below and executing the command
+
+	  echo "scsi log token [level]" > /proc/scsi/scsi
+
+	  at boot time after the /proc file system has been mounted.
+
+	  There are a number of things that can be used for 'token' (you can
+	  find them in the source: <file:drivers/scsi/scsi.c>), and this
+	  allows you to select the types of information you want, and the
+	  level allows you to select the level of verbosity.
+
+	  If you say N here, it may be harder to track down some types of SCSI
+	  problems. If you say Y here your kernel will be somewhat larger, but
+	  there should be no noticeable performance impact as long as you have
+	  logging turned off.
+
+
+menu "SCSI low-level drivers"
+	depends on SCSI!=n
+
+config SCSI_SUNESP
+	tristate "Sparc ESP Scsi Driver"
+	depends on SCSI
+	help
+	  This is the driver for the Sun ESP SCSI host adapter. The ESP
+	  chipset is present in most SPARC SBUS-based computers.
+
+	  This support is also available as a module called esp.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGICPTI
+	tristate "PTI Qlogic,ISP Driver"
+	depends on SCSI
+	help
+	  This driver supports SBUS SCSI controllers from PTI or QLogic. These
+	  controllers are known under Solaris as qpti and in the openprom as
+	  PTI,ptisp or QLGC,isp. Note that PCI QLogic SCSI controllers are
+	  driven by a different driver.
+
+	  This support is also available as a module called qlogicpti.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+endmenu
+
+endmenu
+
+source "drivers/fc4/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+config DUMMY
+	tristate "Dummy net driver support"
+	depends on NETDEVICES
+	---help---
+	  This is essentially a bit-bucket device (i.e. traffic you send to
+	  this device is consigned into oblivion) with a configurable IP
+	  address. It is most commonly used in order to make your currently
+	  inactive SLIP address seem like a real address for local programs.
+	  If you use SLIP or PPP, you might want to say Y here. Since this
+	  thing often comes in handy, the default is Y. It won't enlarge your
+	  kernel either. What a deal. Read about it in the Network
+	  Administrator's Guide, available from
+	  <http://www.linuxdoc.org/docs.html#guide>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called dummy.o.  If you want to use more than one dummy
+	  device at a time, you need to compile this driver as a module.
+	  Instead of 'dummy', the devices will then be called 'dummy0',
+	  'dummy1' etc.
+
+config BONDING
+	tristate "Bonding driver support"
+	depends on NETDEVICES
+	---help---
+	  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
+	  Channels together. This is called 'Etherchannel' by Cisco,
+	  'Trunking' by Sun, and 'Bonding' in Linux.
+
+	  If you have two Ethernet connections to some other computer, you can
+	  make them behave like one double speed connection using this driver.
+	  Naturally, this has to be supported at the other end as well, either
+	  with a similar Bonding Linux driver, a Cisco 5500 switch or a
+	  SunTrunking SunSoft driver.
+
+	  This is similar to the EQL driver, but it merges Ethernet segments
+	  instead of serial lines.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called bonding.o.
+
+config TUN
+	tristate "Universal TUN/TAP device driver support"
+	depends on NETDEVICES
+	---help---
+	  TUN/TAP provides packet reception and transmission for user space
+	  programs.  It can be viewed as a simple Point-to-Point or Ethernet
+	  device, which instead of receiving packets from a physical media,
+	  receives them from user space program and instead of sending packets
+	  via physical media writes them to the user space program.
+
+	  When a program opens /dev/net/tun, driver creates and registers
+	  corresponding net device tunX or tapX.  After a program closed above
+	  devices, driver will automatically delete tunXX or tapXX device and
+	  all routes corresponding to it.
+
+	  Please read <file:Documentation/networking/tuntap.txt> for more
+	  information.
+
+	  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 tun.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you don't know what to use this for, you don't need it.
+
+config ETHERTAP
+	tristate "Ethertap network tap (OBSOLETE)"
+	depends on NETDEVICES && EXPERIMENTAL && NETLINK
+	---help---
+	  If you say Y here (and have said Y to "Kernel/User network link
+	  driver", above) and create a character special file /dev/tap0 with
+	  major number 36 and minor number 16 using mknod ("man mknod"), you
+	  will be able to have a user space program read and write raw
+	  Ethernet frames from/to that special file.  tap0 can be configured
+	  with ifconfig and route like any other Ethernet device but it is not
+	  connected to any physical LAN; everything written by the user to
+	  /dev/tap0 is treated by the kernel as if it had come in from a LAN
+	  to the device tap0; everything the kernel wants to send out over the
+	  device tap0 can instead be read by the user from /dev/tap0: the user
+	  mode program replaces the LAN that would be attached to an ordinary
+	  Ethernet device. Please read the file
+	  <file:Documentation/networking/ethertap.txt> for more information.
+
+	  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 ethertap.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you don't know what to use this for, you don't need it.
+
+config PPP
+	tristate "PPP (point-to-point protocol) support"
+	depends on NETDEVICES
+	---help---
+	  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
+	  the same purpose: sending Internet traffic over telephone (and other
+	  serial) lines.  Ask your access provider if they support it, because
+	  otherwise you can't use it; most Internet access providers these
+	  days support PPP rather than SLIP.
+
+	  To use PPP, you need an additional program called pppd as described
+	  in the PPP-HOWTO, available at
+	  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
+	  the version of pppd recommended in <file:Documentation/Changes>.
+	  The PPP option enlarges your kernel by about 16 KB.
+
+	  There are actually two versions of PPP: the traditional PPP for
+	  asynchronous lines, such as regular analog phone lines, and
+	  synchronous PPP which can be used over digital ISDN lines for
+	  example.  If you want to use PPP over phone lines or other
+	  asynchronous serial lines, you need to say Y (or M) here and also to
+	  the next option, "PPP support for async serial ports".  For PPP over
+	  synchronous lines, you should say Y (or M) here and to "Support
+	  synchronous PPP", below.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you said Y to "Version information on all symbols" above, then
+	  you cannot compile the PPP driver into the kernel; you can then only
+	  compile it as a module.  The module will be called ppp_generic.o.
+	  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>.
+
+config PPP_ASYNC
+	tristate "PPP support for async serial ports"
+	depends on PPP
+	---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
+	  a modem (not a synchronous or ISDN modem) to contact your ISP, you
+	  need this option.
+
+	  This code is also available as a module (code which can be inserted
+	  into and removed from the running kernel).  If you want to compile
+	  it as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config PPP_SYNC_TTY
+	tristate "PPP support for sync tty ports"
+	depends on PPP
+	help
+	  Say Y (or M) here if you want to be able to use PPP over synchronous
+	  (HDLC) tty devices, such as the SyncLink adapter. These devices
+	  are often used for high-speed leased lines like T1/E1.
+
+	  This code is also available as a module (code which can be inserted
+	  into and removed from the running kernel).  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config PPP_DEFLATE
+	tristate "PPP Deflate compression"
+	depends on PPP
+	---help---
+	  Support for the Deflate compression method for PPP, which uses the
+	  Deflate algorithm (the same algorithm that gzip uses) to compress
+	  each PPP packet before it is sent over the wire.  The machine at the
+	  other end of the PPP link (usually your ISP) has to support the
+	  Deflate compression method as well for this to be useful.  Even if
+	  they don't support it, it is safe to say Y here.
+
+	  This code is also available as a module (code which can be inserted
+	  into and removed from the running kernel).  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config PPP_BSDCOMP
+	tristate "PPP BSD-Compress compression"
+	depends on NETDEVICES && PPP!=n && m
+	---help---
+	  Support for the BSD-Compress compression method for PPP, which uses
+	  the LZW compression method to compress each PPP packet before it is
+	  sent over the wire. The machine at the other end of the PPP link
+	  (usually your ISP) has to support the BSD-Compress compression
+	  method as well for this to be useful. Even if they don't support it,
+	  it is safe to say Y here.
+
+	  The PPP Deflate compression method ("PPP Deflate compression",
+	  above) is preferable to BSD-Compress, because it compresses better
+	  and is patent-free.
+
+	  Note that the BSD compression code will always be compiled as a
+	  module; it is called bsd_comp.o and will show up in the directory
+	  modules once you have said "make modules". If unsure, say N.
+
+config SLIP
+	tristate "SLIP (serial line) support"
+	depends on NETDEVICES
+	---help---
+	  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
+	  connect to your Internet service provider or to connect to some
+	  other local Unix box or if you want to configure your Linux box as a
+	  Slip/CSlip server for other people to dial in. SLIP (Serial Line
+	  Internet Protocol) is a protocol used to send Internet traffic over
+	  serial connections such as telephone lines or null modem cables;
+	  nowadays, the protocol PPP is more commonly used for this same
+	  purpose.
+
+	  Normally, your access provider has to support SLIP in order for you
+	  to be able to use it, but there is now a SLIP emulator called SLiRP
+	  around (available from
+	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
+	  allows you to use SLIP over a regular dial up shell connection. If
+	  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
+	  NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, explains how to
+	  configure SLIP. Note that you don't need this option if you just
+	  want to run term (term is a program which gives you almost full
+	  Internet connectivity if you have a regular dial up shell account on
+	  some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
+	  support will enlarge your kernel by about 4 KB. If unsure, say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>. The module will be
+	  called slip.o.
+
+config SLIP_COMPRESSED
+	bool "CSLIP compressed headers"
+	depends on SLIP
+	---help---
+	  This protocol is faster than SLIP because it uses compression on the
+	  TCP/IP headers (not on the data itself), but it has to be supported
+	  on both ends. Ask your access provider if you are not sure and
+	  answer Y, just in case. You will still be able to use plain SLIP. If
+	  you plan to use SLiRP, the SLIP emulator (available from
+	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
+	  allows you to use SLIP over a regular dial up shell connection, you
+	  definitely want to say Y here. The NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
+	  CSLIP. This won't enlarge your kernel.
+
+config SLIP_SMART
+	bool "Keepalive and linefill"
+	depends on SLIP
+	help
+	  Adds additional capabilities to the SLIP driver to support the
+	  RELCOM line fill and keepalive monitoring. Ideal on poor quality
+	  analogue lines.
+
+config SLIP_MODE_SLIP6
+	bool "Six bit SLIP encapsulation"
+	depends on SLIP
+	help
+	  Just occasionally you may need to run IP over hostile serial
+	  networks that don't pass all control characters or are only seven
+	  bit. Saying Y here adds an extra mode you can use with SLIP:
+	  "slip6". In this mode, SLIP will only send normal ASCII symbols over
+	  the serial device. Naturally, this has to be supported at the other
+	  end of the link as well. It's good enough, for example, to run IP
+	  over the async ports of a Camtec JNT Pad. If unsure, say N.
+
+config SUNLANCE
+	tristate "Sun LANCE support"
+	depends on NETDEVICES
+	help
+	  This driver supports the "le" interface present on all 32-bit Sparc
+	  systems, on some older Ultra systems and as an Sbus option.  These
+	  cards are based on the AMD Lance chipset, which is better known
+	  via the NE2100 cards.
+
+	  This support is also available as a module called sunlance.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config HAPPYMEAL
+	tristate "Sun Happy Meal 10/100baseT support"
+	depends on NETDEVICES
+	help
+	  This driver supports the "hme" interface present on most Ultra
+	  systems and as an option on older Sbus systems. This driver supports
+	  both PCI and Sbus devices. This driver also supports the "qfe" quad
+	  100baseT device available in both PCI and Sbus configurations.
+
+	  This support is also available as a module called sunhme.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SUNBMAC
+	tristate "Sun BigMAC 10/100baseT support (EXPERIMENTAL)"
+	depends on NETDEVICES && EXPERIMENTAL
+	help
+	  This driver supports the "be" interface available as an Sbus option.
+	  This is Sun's older 100baseT Ethernet device.
+
+	  This support is also available as a module called sunbmac.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SUNQE
+	tristate "Sun QuadEthernet support"
+	depends on NETDEVICES
+	help
+	  This driver supports the "qe" 10baseT Ethernet device, available as
+	  an Sbus option. Note that this is not the same as Quad FastEthernet
+	  "qfe" which is supported by the Happy Meal driver instead.
+
+	  This support is also available as a module called sunqe.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config MYRI_SBUS
+	tristate "MyriCOM Gigabit Ethernet support"
+	depends on NETDEVICES
+	help
+	  This driver supports MyriCOM Sbus gigabit Ethernet cards.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called myri_sbus.o.
+
+config VORTEX
+	tristate "3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" support"
+	depends on NETDEVICES && PCI
+	---help---
+	  This option enables driver support for a large number of 10mbps and
+	  10/100mbps EISA, PCI and PCMCIA 3Com network cards:
+
+	  "Vortex"    (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
+	  "Boomerang" (EtherLink XL 3c900 or 3c905)            PCI
+	  "Cyclone"   (3c540/3c900/3c905/3c980/3c575/3c656)    PCI and Cardbus
+	  "Tornado"   (3c905)                                  PCI
+	  "Hurricane" (3c555/3cSOHO)                           PCI
+
+	  If you have such a card, say Y and read the Ethernet-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>. More
+	  specific information is in
+	  <file:Documentation/networking/vortex.txt> and in the comments at
+	  the beginning of <file:drivers/net/3c59x.c>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.
+
+#      bool '  FDDI driver support' CONFIG_FDDI
+#      if [ "$CONFIG_FDDI" = "y" ]; then
+#      fi
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+# This one must be before the filesystem configs. -DaveM
+
+menu "Unix98 PTY support"
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+	---help---
+	  A pseudo terminal (PTY) is a software device consisting of two
+	  halves: a master and a slave. The slave device behaves identical to
+	  a physical terminal; the master device is used by a process to
+	  read data from and write data to the slave, thereby emulating a
+	  terminal. Typical programs for the master side are telnet servers
+	  and xterms.
+
+	  Linux has traditionally used the BSD-like names /dev/ptyxx for
+	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
+	  has a number of problems. The GNU C library glibc 2.1 and later,
+	  however, supports the Unix98 naming standard: in order to acquire a
+	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
+	  terminal is then made available to the process and the pseudo
+	  terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The entries in /dev/pts/ are created on the fly by a virtual
+	  file system; therefore, if you say Y here you should say Y to
+	  "/dev/pts file system for Unix98 PTYs" as well.
+
+	  If you want to say Y here, you need to have the C library glibc 2.1
+	  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
+	  Read the instructions in <file:Documentation/Changes> pertaining to
+	  pseudo terminals. It's safe to say N.
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+	help
+	  The maximum number of Unix98 PTYs that can be used at any one time.
+	  The default is 256, and should be enough for desktop systems. Server
+	  machines which support incoming telnet/rlogin/ssh connections and/or
+	  serve several X terminals may want to increase this: every incoming
+	  connection and every xterm uses up one PTY.
+
+	  When not in use, each additional set of 256 PTYs occupy
+	  approximately 8 KB of kernel memory on 32-bit architectures.
+
+endmenu
+
+source "drivers/input/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Sound card support"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "Watchdog"
+
+config SOFT_WATCHDOG
+	tristate "Software watchdog"
+	help
+	  A software monitoring watchdog. This will fail to reboot your system
+	  from some situations that the hardware watchdog will recover
+	  from. Equally it's a lot cheaper to install.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called
+	  softdog.o.
+
+endmenu
+
+
+menu "Kernel hacking"
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+
+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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/sparc/boot/btfixupprep.c b/arch/sparc/boot/btfixupprep.c
--- a/arch/sparc/boot/btfixupprep.c	Wed Oct 30 16:44:32 2002
+++ b/arch/sparc/boot/btfixupprep.c	Wed Oct 30 16:44:32 2002
@@ -161,17 +161,31 @@
 		shift = nbase + 5;
 		if (buffer[nbase+4] == 's' && buffer[nbase+5] == '_') {
 			shift = nbase + 6;
-			if (strcmp (sect, ".text.init")) {
-				fprintf(stderr, "Wrong use of '%s' BTFIXUPSET.\nBTFIXUPSET_CALL can be used only in __init sections\n", buffer+shift);
+			if (strcmp (sect, ".init.text")) {
+				fprintf(stderr,
+				    "Wrong use of '%s' BTFIXUPSET in '%s' section.\n"
+				    "BTFIXUPSET_CALL can be used only in"
+				    " __init sections\n",
+				    buffer + shift, sect);
 				exit(1);
 			}
 		} else if (buffer[nbase+4] != '_')
 			continue;
-		if (strcmp (sect, ".text") && strcmp (sect, ".text.init") && strcmp (sect, ".fixup") && (strcmp (sect, "__ksymtab") || buffer[nbase+3] != 'f')) {
+		if (strcmp (sect, ".text") &&
+		    strcmp (sect, ".init.text") &&
+		    strcmp (sect, ".fixup") &&
+		    (strcmp (sect, "__ksymtab") || buffer[nbase+3] != 'f')) {
 			if (buffer[nbase+3] == 'f')
-				fprintf(stderr, "Wrong use of '%s' in '%s' section. It can be only used in .text, .text.init, .fixup and __ksymtab\n", buffer + shift, sect);
+				fprintf(stderr,
+				    "Wrong use of '%s' in '%s' section.\n"
+				    " It can be used only in .text, .init.text,"
+				    " .fixup and __ksymtab\n",
+				    buffer + shift, sect);
 			else
-				fprintf(stderr, "Wrong use of '%s' in '%s' section. It can be only used in .text, .fixup and .text.init\n", buffer + shift, sect);
+				fprintf(stderr,
+				    "Wrong use of '%s' in '%s' section.\n"
+				    " It can be only used in .text, .init.text,"
+				    " and .fixup\n", buffer + shift, sect);
 			exit(1);
 		}
 		p = strstr (buffer + shift, "__btset_");
@@ -326,7 +340,7 @@
 		for (r = f->rel, j--; r != NULL; j--, r = r->next) {
 			if (!strcmp (r->sect, ".text"))
 				printf ("_stext+0x%08lx", r->offset);
-			else if (!strcmp (r->sect, ".text.init"))
+			else if (!strcmp (r->sect, ".init.text"))
 				printf ("__init_begin+0x%08lx", r->offset);
 			else if (!strcmp (r->sect, "__ksymtab"))
 				printf ("__start___ksymtab+0x%08lx", r->offset);
diff -Nru a/arch/sparc/config.in b/arch/sparc/config.in
--- a/arch/sparc/config.in	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,255 +0,0 @@
-# $Id: config.in,v 1.113 2002/01/24 22:14:44 davem Exp $
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-mainmenu_name "Linux/SPARC Kernel Configuration"
-
-define_bool CONFIG_UID16 y
-define_bool CONFIG_HIGHMEM y
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'General setup'
-
-define_bool CONFIG_VT y
-define_bool CONFIG_VT_CONSOLE y
-define_bool CONFIG_HW_CONSOLE y
-
-bool 'Symmetric multi-processing support (does not work on sun4/sun4c)' CONFIG_SMP
-
-if [ "$CONFIG_SMP" = "y" ]; then
-   int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-fi
-
-# Identify this as a Sparc32 build
-define_bool CONFIG_SPARC32 y
-
-# Global things across all Sun machines.
-define_bool CONFIG_ISA n
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_PCMCIA n
-define_bool CONFIG_SBUS y
-define_bool CONFIG_SBUSCHAR y
-define_bool CONFIG_SERIAL_CONSOLE y
-define_bool CONFIG_SUN_AUXIO y
-define_bool CONFIG_SUN_IO y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_SUN_PM y
-
-bool 'Support for SUN4 machines (disables SUN4[CDM] support)' CONFIG_SUN4
-if [ "$CONFIG_SUN4" != "y" ]; then
-   bool 'Support for PCI and PS/2 keyboard/mouse' CONFIG_PCI
-   source drivers/pci/Config.in
-else
-   define_bool CONFIG_PCI n
-fi
-
-tristate 'Openprom tree appears in /proc/openprom' CONFIG_SUN_OPENPROMFS
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL
-source drivers/parport/Config.in
-dep_tristate '  Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
-endmenu
-
-mainmenu_option next_comment
-comment 'Console drivers'
-bool 'PROM console' CONFIG_PROM_CONSOLE
-if [ "$CONFIG_PROM_CONSOLE" != "y" ]; then
-   define_bool CONFIG_DUMMY_CONSOLE y
-fi
-source drivers/video/Config.in
-endmenu
-
-source drivers/mtd/Config.in
-
-source drivers/serial/Config.in
-if [ "$CONFIG_SUN4" != "y" ]; then
-   source drivers/sbus/char/Config.in
-fi
-
-mainmenu_option next_comment
-comment 'Block devices'
-
-bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD
-
-tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
-dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-
-source drivers/md/Config.in
-
-tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
-	int '   Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
-fi
-dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
-
-endmenu
-
-# Don't frighten a common SBus user
-if [ "$CONFIG_PCI" = "y" ]; then
-
-  mainmenu_option next_comment
-  comment 'ATA/ATAPI/MFM/RLL support'
-
-  tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-  if [ "$CONFIG_IDE" != "n" ]; then
-    source drivers/ide/Config.in
-  else
-    define_bool CONFIG_BLK_DEV_HD n
-  fi
-  endmenu
-else
-  define_bool CONFIG_IDE n
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-
-source drivers/isdn/Config.in
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   comment 'SCSI support type (disk, tape, CDrom)'
-
-   dep_tristate '  SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
-
-   if [ "$CONFIG_BLK_DEV_SD" != "n" ]; then
-      int  'Maximum number of SCSI disks that can be loaded as modules' CONFIG_SD_EXTRA_DEVS 40
-   fi
-
-   dep_tristate '  SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
-
-   dep_tristate '  SCSI OnStream SC-x0 tape support' CONFIG_CHR_DEV_OSST $CONFIG_SCSI
-
-   dep_tristate '  SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
-
-   if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-      bool '    Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
-      int  'Maximum number of CDROM devices that can be loaded as modules' CONFIG_SR_EXTRA_DEVS 2
-   fi
-
-   dep_tristate '  SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
-
-   comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
-
-   bool '  Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
-
-   bool '  Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
-   bool '  SCSI logging facility' CONFIG_SCSI_LOGGING
-
-   mainmenu_option next_comment
-   comment 'SCSI low-level drivers'
-
-   dep_tristate 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
-   dep_tristate 'PTI Qlogic,ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
-   endmenu
-fi
-endmenu
-
-source drivers/fc4/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      tristate '  Dummy net driver support' CONFIG_DUMMY
-      tristate '  Bonding driver support' CONFIG_BONDING
-      tristate '  Universal TUN/TAP device driver support' CONFIG_TUN
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-        if [ "$CONFIG_NETLINK" = "y" ]; then
-          tristate '  Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP
-        fi
-      fi
-      tristate '  PPP (point-to-point protocol) support' CONFIG_PPP
-      if [ ! "$CONFIG_PPP" = "n" ]; then
-        dep_tristate '  PPP support for async serial ports' CONFIG_PPP_ASYNC $CONFIG_PPP
-        dep_tristate '  PPP support for sync tty ports' CONFIG_PPP_SYNC_TTY $CONFIG_PPP
-        dep_tristate '  PPP Deflate compression' CONFIG_PPP_DEFLATE $CONFIG_PPP
-        dep_tristate '  PPP BSD-Compress compression' CONFIG_PPP_BSDCOMP m
-      fi
-      tristate '  SLIP (serial line) support' CONFIG_SLIP
-      if [ "$CONFIG_SLIP" != "n" ]; then
-	 bool '    CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
-	 bool '    Keepalive and linefill' CONFIG_SLIP_SMART
-	 bool '    Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
-      fi
-      tristate '  Sun LANCE support' CONFIG_SUNLANCE
-      tristate '  Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	 tristate '  Sun BigMAC 10/100baseT support (EXPERIMENTAL)' CONFIG_SUNBMAC
-      fi
-      tristate '  Sun QuadEthernet support' CONFIG_SUNQE
-      tristate '  MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS
-      if [ "$CONFIG_PCI" = "y" ]; then
-         tristate '3c590/3c900 series (592/595/597) "Vortex/Boomerang" support' CONFIG_VORTEX
-      fi
-
-#      bool '  FDDI driver support' CONFIG_FDDI
-#      if [ "$CONFIG_FDDI" = "y" ]; then
-#      fi
-
-      if [ "$CONFIG_ATM" = "y" ]; then
-	 source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-# This one must be before the filesystem configs. -DaveM
-mainmenu_option next_comment
-comment 'Unix98 PTY support'
-bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-   int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-fi
-endmenu
-
-source drivers/input/Config.in
-
-source fs/Config.in
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-mainmenu_option next_comment
-comment 'Watchdog'
-
-tristate 'Software watchdog' CONFIG_SOFT_WATCHDOG
-endmenu
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Debug memory allocations' CONFIG_DEBUG_SLAB
-bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
-bool 'Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
--- a/arch/sparc/kernel/pcic.c	Wed Oct 30 16:44:29 2002
+++ b/arch/sparc/kernel/pcic.c	Wed Oct 30 16:44:29 2002
@@ -1031,6 +1031,6 @@
 	}
 }
 
-#endif
-
 subsys_initcall(pcic_init);
+
+#endif
diff -Nru a/arch/sparc/kernel/sclow.S b/arch/sparc/kernel/sclow.S
--- a/arch/sparc/kernel/sclow.S	Wed Oct 30 16:44:33 2002
+++ b/arch/sparc/kernel/sclow.S	Wed Oct 30 16:44:33 2002
@@ -8,6 +8,7 @@
 
 #include <asm/cprefix.h>
 #include <asm/ptrace.h>
+#include <asm/asm_offsets.h>
 #include <asm/errno.h>
 #include <asm/winmacro.h>
 #include <asm/thread_info.h>
diff -Nru a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S
--- a/arch/sparc/mm/hypersparc.S	Wed Oct 30 16:44:28 2002
+++ b/arch/sparc/mm/hypersparc.S	Wed Oct 30 16:44:28 2002
@@ -6,6 +6,7 @@
 
 #include <asm/ptrace.h>
 #include <asm/psr.h>
+#include <asm/asm_offsets.h>
 #include <asm/asi.h>
 #include <asm/page.h>
 #include <asm/pgtsrmmu.h>
diff -Nru a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
--- a/arch/sparc/mm/tsunami.S	Wed Oct 30 16:44:32 2002
+++ b/arch/sparc/mm/tsunami.S	Wed Oct 30 16:44:32 2002
@@ -6,6 +6,7 @@
 
 #include <linux/config.h>
 #include <asm/ptrace.h>
+#include <asm/asm_offsets.h>
 #include <asm/psr.h>
 #include <asm/asi.h>
 #include <asm/page.h>
diff -Nru a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S
--- a/arch/sparc/mm/viking.S	Wed Oct 30 16:44:19 2002
+++ b/arch/sparc/mm/viking.S	Wed Oct 30 16:44:19 2002
@@ -9,6 +9,7 @@
 #include <linux/config.h>
 #include <asm/ptrace.h>
 #include <asm/psr.h>
+#include <asm/asm_offsets.h>
 #include <asm/asi.h>
 #include <asm/mxcc.h>
 #include <asm/page.h>
diff -Nru a/arch/sparc/vmlinux.lds.S b/arch/sparc/vmlinux.lds.S
--- a/arch/sparc/vmlinux.lds.S	Wed Oct 30 16:44:20 2002
+++ b/arch/sparc/vmlinux.lds.S	Wed Oct 30 16:44:20 2002
@@ -89,5 +89,5 @@
   .debug_pubnames 0 : { *(.debug_pubnames) }
   .debug_sfnames  0 : { *(.debug_sfnames) }
   .line           0 : { *(.line) }
-  /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
+  /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
 }
diff -Nru a/arch/sparc64/Config.help b/arch/sparc64/Config.help
--- a/arch/sparc64/Config.help	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1251 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_HUGETLB_PAGE
-  This enables support for huge pages.  User space applications
-  can make use of this support with the sys_alloc_hugepages and
-  sys_free_hugepages system calls.  If your applications are
-  huge page aware, then say Y here.
-
-  Otherwise, say N.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  This allows applications to run more reliably even when the system is
-  under load.
-
-  Say Y here if you are building a kernel for a desktop, embedded
-  or real-time system.  Say N if you are unsure.
-
-CONFIG_SPARC64
-  SPARC is a family of RISC microprocessors designed and marketed by
-  Sun Microsystems, incorporated.  This port covers the newer 64-bit
-  UltraSPARC.  The UltraLinux project maintains both the SPARC32 and
-  SPARC64 ports; its web page is available at
-  <http://www.ultralinux.org/>.
-
-CONFIG_BLK_DEV_FD
-  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
-  Thinkpad users, is contained in <file:Documentation/floppy.txt>.
-  That file also contains the location of the Floppy driver FAQ as
-  well as location of the fdutils package used to configure additional
-  parameters of the driver at run time.
-
-  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 floppy.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_BLK_DEV_RAM
-  Saying Y here will allow you to use a portion of your RAM memory as
-  a block device, so that you can make file systems on it, read and
-  write to it and do all the other things that you can do with normal
-  block devices (such as hard drives). It is usually used to load and
-  store a copy of a minimal root file system off of a floppy into RAM
-  during the initial install of Linux.
-
-  Note that the kernel command line option "ramdisk=XX" is now
-  obsolete. For details, read <file:Documentation/ramdisk.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M and read <file:Documentation/modules.txt>. The module will be
-  called rd.o.
-
-  Most normal users won't need the RAM disk functionality, and can
-  thus say N here.
-
-CONFIG_BLK_DEV_RAM_SIZE
-  The default value is 4096. Only change this if you know what are
-  you doing. If you are using IBM S/390, then set this to 8192.
-
-CONFIG_BLK_DEV_INITRD
-  The initial RAM disk is a RAM disk that is loaded by the boot loader
-  (loadlin or lilo) and that is mounted as root before the normal boot
-  procedure. It is typically used to load modules needed to mount the
-  "real" root file system, etc. See <file:Documentation/initrd.txt>
-  for details.
-
-CONFIG_BLK_DEV_LOOP
-  Saying Y here will allow you to use a regular file as a block
-  device; you can then create a file system on that block device and
-  mount it just as you would mount other block devices such as hard
-  drive partitions, CD-ROM drives or floppy drives. The loop devices
-  are block special device files with major number 7 and typically
-  called /dev/loop0, /dev/loop1 etc.
-
-  This is useful if you want to check an ISO 9660 file system before
-  burning the CD, or if you want to use floppy images without first
-  writing them to floppy. Furthermore, some Linux distributions avoid
-  the need for a dedicated Linux partition by keeping their complete
-  root file system inside a DOS FAT file using this loop device
-  driver.
-
-  The loop device driver can also be used to "hide" a file system in a
-  disk partition, floppy, or regular file, either using encryption
-  (scrambling the data) or steganography (hiding the data in the low
-  bits of, say, a sound file). This is also safe if the file resides
-  on a remote file server. If you want to do this, you will first have
-  to acquire and install a kernel patch from
-  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
-  say Y to this option.
-
-  Note that alternative ways to use encrypted file systems are
-  provided by the cfs package, which can be gotten from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
-  package, available at <http://tcfs.dia.unisa.it/>. You do not need
-  to say Y here if you want to use one of these. However, using cfs
-  requires saying Y to "NFS file system support" below while using
-  tcfs requires applying a kernel patch. An alternative steganography
-  solution is provided by StegFS, also available from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
-
-  To use the loop device, you need the losetup utility and a recent
-  version of the mount program, both contained in the util-linux
-  package. The location and current version number of util-linux is
-  contained in the file <file:Documentation/Changes>.
-
-  Note that this loop device has nothing to do with the loopback
-  device used for network connections from the machine to itself.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called loop.o.
-
-  Most users will answer N here.
-
-CONFIG_BLK_DEV_NBD
-  Saying Y here will allow your computer to be a client for network
-  block devices, i.e. it will be able to use block devices exported by
-  servers (mount file systems on them etc.). Communication between
-  client and server works over TCP/IP networking, but to the client
-  program this is hidden: it looks like a regular local file access to
-  a block device special file such as /dev/nd0.
-
-  Network block devices also allows you to run a block-device in
-  userland (making server and client physically the same computer,
-  communicating using the loopback network device).
-
-  Read <file:Documentation/nbd.txt> for more information, especially
-  about where to find the server code, which runs in user space and
-  does not need special kernel support.
-
-  Note that this has nothing to do with the network file systems NFS
-  or Coda; you can say N here even if you intend to use NFS or Coda.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called nbd.o.
-
-  If unsure, say N.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_ISAPNP
-  Say Y here if you would like support for ISA Plug and Play devices.
-  Some information is in <file:Documentation/isapnp.txt>.
-
-  This support is also available as a module called isapnp.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_SOLARIS_EMUL
-  This is experimental code which will enable you to run (many)
-  Solaris binaries on your SPARC Linux machine.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called solaris.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ENVCTRL
-  Kernel support for temperature and fan monitoring on Sun SME
-  machines.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called envctrl.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_BLK_DEV_SD
-  If you want to use a SCSI hard disk or the SCSI or parallel port
-  version of the IOMEGA ZIP drive under Linux, say Y and read the
-  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
-  CD-ROMs.
-
-  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 sd_mod.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  Do not compile this driver as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI disk. In this case, do not compile the driver
-  for your SCSI host adapter (below) as a module either.
-
-CONFIG_SD_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted.  In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional disks that can be loaded after the
-  first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_CHR_DEV_ST
-  If you want to use a SCSI tape drive under Linux, say Y and read the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and
-  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
-  SCSI CD-ROMs.
-
-  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 st.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_CHR_DEV_OSST
-  The OnStream SC-x0 SCSI tape drives can not be driven by the
-  standard st driver, but instead need this special osst driver and
-  use the  /dev/osstX char device nodes (major 206).  Via usb-storage
-  and ide-scsi, you may be able to drive the USB-x0 and DI-x0 drives
-  as well.  Note that there is also a second generation of OnStream
-  tape drives (ADR-x0) that supports the standard SCSI-2 commands for
-  tapes (QIC-157) and can be driven by the standard driver st.
-  For more information, you may have a look at the SCSI-HOWTO
-  <http://www.linuxdoc.org/docs.html#howto>  and
-  <file:drivers/scsi/README.osst>  in the kernel source.
-  More info on the OnStream driver may be found on
-  <http://linux1.onstream.nl/test/>
-  Please also have a look at the standard st docu, as most of it
-  applies to osst as well.
-
-  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 osst.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_BLK_DEV_SR
-  If you want to use a SCSI CD-ROM under Linux, say Y and read the
-  SCSI-HOWTO and the CD-ROM-HOWTO at
-  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
-  or M to "ISO 9660 CD-ROM file system support" later.
-
-  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 sr_mod.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_SR_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted. In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional CD-ROMs that can be loaded after
-  the first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_BLK_DEV_SR_VENDOR
-  This enables the usage of vendor specific SCSI commands. This is
-  required to support multisession CDs with old NEC/TOSHIBA cdrom
-  drives (and HP Writers). If you have such a drive and get the first
-  session only, try saying Y here; everybody else says N.
-
-CONFIG_CHR_DEV_SG
-  If you want to use SCSI scanners, synthesizers or CD-writers or just
-  about anything having "SCSI" in its name other than hard disks,
-  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
-  directly, so you need some additional software which knows how to
-  talk to these devices using the SCSI protocol:
-
-  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
-  writer software look at Cdrtools
-  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
-  and for burning a "disk at once": CDRDAO
-  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
-  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
-  For other devices, it's possible that you'll have to write the
-  driver software yourself. Please read the file
-  <file:Documentation/scsi-generic.txt> for more information.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
-  say N.
-
-CONFIG_SCSI_MULTI_LUN
-  If you have a SCSI device that supports more than one LUN (Logical
-  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-  can say Y here to force the SCSI driver to probe for multiple LUNs.
-  A SCSI device with multiple LUNs acts logically like multiple SCSI
-  devices. The vast majority of SCSI devices have only one LUN, and
-  so most people can say N here and should in fact do so, because it
-  is safer.
-
-CONFIG_SCSI_CONSTANTS
-  The error messages regarding your SCSI hardware will be easier to
-  understand if you say Y here; it will enlarge your kernel by about
-  12 KB. If in doubt, say Y.
-
-CONFIG_SCSI_LOGGING
-  This turns on a logging facility that can be used to debug a number
-  of SCSI related problems.
-
-  If you say Y here, no logging output will appear by default, but you
-  can enable logging by saying Y to "/proc file system support" and
-  "Sysctl support" below and executing the command
-
-     echo "scsi log token [level]" > /proc/scsi/scsi
-
-  at boot time after the /proc file system has been mounted.
-
-  There are a number of things that can be used for 'token' (you can
-  find them in the source: <file:drivers/scsi/scsi.c>), and this
-  allows you to select the types of information you want, and the
-  level allows you to select the level of verbosity.
-
-  If you say N here, it may be harder to track down some types of SCSI
-  problems. If you say Y here your kernel will be somewhat larger, but
-  there should be no noticeable performance impact as long as you have
-  logging turned off.
-
-CONFIG_SCSI_AIC7XXX_OLD
-  WARNING This driver is an older aic7xxx driver and is no longer
-  under active development.  Adaptec, Inc. is writing a new driver to
-  take the place of this one, and it is recommended that whenever
-  possible, people should use the new Adaptec written driver instead
-  of this one.  This driver will eventually be phased out entirely.
-
-  This is support for the various aic7xxx based Adaptec SCSI
-  controllers. These include the 274x EISA cards; 284x VLB cards;
-  2902, 2910, 293x, 294x, 394x, 3985 and several other PCI and
-  motherboard based SCSI controllers from Adaptec. It does not support
-  the AAA-13x RAID controllers from Adaptec, nor will it likely ever
-  support them. It does not support the 2920 cards from Adaptec that
-  use the Future Domain SCSI controller chip. For those cards, you
-  need the "Future Domain 16xx SCSI support" driver.
-
-  In general, if the controller is based on an Adaptec SCSI controller
-  chip from the aic777x series or the aic78xx series, this driver
-  should work. The only exception is the 7810 which is specifically
-  not supported (that's the RAID controller chip on the AAA-13x
-  cards).
-
-  Note that the AHA2920 SCSI host adapter is *not* supported by this
-  driver; choose "Future Domain 16xx SCSI support" instead if you have
-  one of those.
-
-  Information on the configuration options for this controller can be
-  found by checking the help file for each of the available
-  configuration options. You should read
-  <file:drivers/scsi/aic7xxx_old/README.aic7xxx> at a minimum before
-  contacting the maintainer with any questions.  The SCSI-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>, can also
-  be of great help.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called aic7xxx_old.o.
-
-CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT
-  This option causes the aic7xxx driver to attempt to use Tagged
-  Command Queueing (TCQ) on all devices that claim to support it.
-
-  TCQ is a feature of SCSI-2 which improves performance: the host
-  adapter can send several SCSI commands to a device's queue even if
-  previous commands haven't finished yet.  Because the device is
-  intelligent, it can optimize its operations (like head positioning)
-  based on its own request queue.  Not all devices implement this
-  correctly.
-
-  If you say Y here, you can still turn off TCQ on troublesome devices
-  with the use of the tag_info boot parameter.  See the file
-  <file:drivers/scsi/README.aic7xxx> for more information on that and
-  other aic7xxx setup commands.  If this option is turned off, you may
-  still enable TCQ on known good devices by use of the tag_info boot
-  parameter.
-
-  If you are unsure about your devices then it is safest to say N
-  here.
-
-  However, TCQ can increase performance on some hard drives by as much
-  as 50% or more, so it is recommended that if you say N here, you
-  should at least read the <file:drivers/scsi/README.aic7xxx> file so
-  you will know how to enable this option manually should your drives
-  prove to be safe in regards to TCQ.
-
-  Conversely, certain drives are known to lock up or cause bus resets
-  when TCQ is enabled on them.  If you have a Western Digital
-  Enterprise SCSI drive for instance, then don't even bother to enable
-  TCQ on it as the drive will become unreliable, and it will actually
-  reduce performance.
-
-CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE
-  Specify the number of commands you would like to allocate per SCSI
-  device when Tagged Command Queueing (TCQ) is enabled on that device.
-
-  Reasonable figures are in the range of 8 to 24 commands per device,
-  but depending on hardware could be increased or decreased from that
-  figure. If the number is too high for any particular device, the
-  driver will automatically compensate usually after only 10 minutes
-  of uptime. It will not hinder performance if some of your devices
-  eventually have their command depth reduced, but is a waste of
-  memory if all of your devices end up reducing this number down to a
-  more reasonable figure.
-
-  NOTE: Certain very broken drives are known to lock up when given
-  more commands than they like to deal with. Quantum Fireball drives
-  are the most common in this category. For the Quantum Fireball
-  drives it is suggested to use no more than 8 commands per device.
-
-  Default: 8
-
-CONFIG_AIC7XXX_OLD_PROC_STATS
-  This option tells the driver to keep track of how many commands have
-  been sent to each particular device and report that information to
-  the user via the /proc/scsi/aic7xxx/n file, where n is the number of
-  the aic7xxx controller you want the information on. This adds a
-  small amount of overhead to each and every SCSI command the aic7xxx
-  driver handles, so if you aren't really interested in this
-  information, it is best to leave it disabled. This will only work if
-  you also say Y to "/proc file system support", below.
-
-  If unsure, say N.
-
-CONFIG_SCSI_SYM53C8XX_2
-  This driver supports the whole NCR53C8XX/SYM53C8XX family of 
-  PCI-SCSI controllers. It also supports the subset of LSI53C10XX 
-  Ultra-160 controllers that are based on the SYM53C8XX SCRIPTS 
-  language. It does not support LSI53C10XX Ultra-320 PCI-X SCSI 
-  controllers.
-
-  If your system has problems using this new major version of the
-  SYM53C8XX driver, you may switch back to driver version 1.
-
-  Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
-  information.
-
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
-  This option only applies to PCI-SCSI chip that are PCI DAC capable 
-  (875A, 895A, 896, 1010-33, 1010-66, 1000).
-
-  When set to 0, only PCI 32 bit DMA addressing (SAC) will be performed.
-  When set to 1, 40 bit DMA addressing (with upper 24 bits of address 
-  set to zero) is supported. The addressable range is here 1 TB.
-  When set to 2, full 64 bits of address for DMA are supported, but only
-  16 segments of 4 GB can be addressed. The addressable range is so 
-  limited to 64 GB.
-
-  The safest value is 0 (32 bit DMA addressing) that is guessed to still 
-  fit most of real machines.
-
-  The preferred value 1 (40 bit DMA addressing) should make happy 
-  properly engineered PCI DAC capable host bridges. You may configure
-  this option for Intel platforms with more than 4 GB of memory.
-
-  The still experimental value 2 (64 bit DMA addressing with 16 x 4GB 
-  segments limitation) can be used on systems that require PCI address 
-  bits past bit 39 to be set for the addressing of memory using PCI 
-  DAC cycles.
-
-CONFIG_SCSI_SYM53C8XX_IOMAPPED
-  If you say Y here, the driver will preferently use normal IO rather than 
-  memory mapped IO.
-
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS
-  This option allows you to specify the maximum number of commands
-  that can be queued to any device, when tagged command queuing is
-  possible. The driver supports up to 256 queued commands per device.
-  This value is used as a compiled-in hard limit.
-
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS
-  This is the default value of the command queue depth the driver will 
-  announce to the generic SCSI layer for devices that support tagged 
-  command queueing. This value can be changed from the boot command line.
-  This is a soft limit that cannot exceed CONFIG_SCSI_SYM53C8XX_MAX_TAGS.
-
-CONFIG_SCSI_NCR53C8XX
-  This is the BSD ncr driver adapted to Linux for the NCR53C8XX family
-  of PCI-SCSI controllers.  This driver supports parity checking,
-  tagged command queuing and fast synchronous data transfers up to 80
-  MB/s with wide FAST-40 LVD devices and controllers.
-
-  Recent versions of the 53C8XX chips are better supported by the
-  option "SYM53C8XX SCSI support", below.
-
-  Note: there is yet another driver for the 53c8xx family of
-  controllers ("NCR53c7,8xx SCSI support" above).  If you want to use
-  them both, you need to say M to both and build them as modules, but
-  only one may be active at a time.  If you have a 53c8xx board, you
-  probably do not want to use the "NCR53c7,8xx SCSI support".
-
-  Please read <file:drivers/scsi/README.ncr53c8xx> for more
-  information.
-
-CONFIG_SCSI_SYM53C8XX
-  This driver supports all the features of recent 53C8XX chips (used
-  in PCI SCSI controllers), notably the hardware phase mismatch
-  feature of the SYM53C896.
-
-  Older versions of the 53C8XX chips are not supported by this
-  driver.  If your system uses either a 810 rev. < 16, a 815, or a 825
-  rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
-  driver ("NCR53C8XX SCSI support" above) or configure both the
-  NCR53C8XX and this SYM53C8XX drivers either as module or linked to
-  the kernel image.
-
-  When both drivers are linked into the kernel, the SYM53C8XX driver
-  is called first at initialization and you can use the 'excl=ioaddr'
-  driver boot option to exclude attachment of adapters by the
-  SYM53C8XX driver.  For example, entering
-  'sym53c8xx=excl:0xb400,excl=0xc000' at the lilo prompt prevents
-  adapters at io address 0xb400 and 0xc000 from being attached by the
-  SYM53C8XX driver, thus allowing the NCR53C8XX driver to attach them.
-  The 'excl' option is also supported by the NCR53C8XX driver.
-
-  Please read <file:drivers/scsi/README.ncr53c8xx> for more
-  information.
-
-CONFIG_SCSI_NCR53C8XX_SYNC
-  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
-  rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers
-  are respectively the maximum data transfer rates in mega-transfers
-  per second for each class.  For example, a FAST-20 Wide 16 device is
-  able to transfer data at 20 million 16 bit packets per second for a
-  total rate of 40 MB/s.
-
-  You may specify 0 if you want to only use asynchronous data
-  transfers. This is the safest and slowest option. Otherwise, specify
-  a value between 5 and 80, depending on the capability of your SCSI
-  controller.  The higher the number, the faster the data transfer.
-  Note that 80 should normally be ok since the driver decreases the
-  value automatically according to the controller's capabilities.
-
-  Your answer to this question is ignored for controllers with NVRAM,
-  since the driver will get this information from the user set-up.  It
-  also can be overridden using a boot setup option, as follows
-  (example): 'ncr53c8xx=sync:12' will allow the driver to negotiate
-  for FAST-20 synchronous data transfer (20 mega-transfers per
-  second).
-
-  The normal answer therefore is not to go with the default but to
-  select the maximum value 80 allowing the driver to use the maximum
-  value supported by each controller. If this causes problems with
-  your SCSI devices, you should come back and decrease the value.
-
-  There is no safe option other than using good cabling, right
-  terminations and SCSI conformant devices.
-
-CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
-  This option is only provided for safety if you suspect some SCSI
-  device of yours to not support properly the target-disconnect
-  feature. In that case, you would say Y here. In general however, to
-  not allow targets to disconnect is not reasonable if there is more
-  than 1 device on a SCSI bus. The normal answer therefore is N.
-
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
-  "Tagged command queuing" is a feature of SCSI-2 which improves
-  performance: the host adapter can send several SCSI commands to a
-  device's queue even if previous commands haven't finished yet.
-  Because the device is intelligent, it can optimize its operations
-  (like head positioning) based on its own request queue. Some SCSI
-  devices don't implement this properly; if you want to disable this
-  feature, enter 0 or 1 here (it doesn't matter which).
-
-  The default value is 8 and should be supported by most hard disks.
-  This value can be overridden from the boot command line using the
-  'tags' option as follows (example):
-  'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to
-  4, set queue depth to 16 for target 2 and target 3 on controller 0
-  and set queue depth to 10 for target 0 / lun 2 on controller 1.
-
-  The normal answer therefore is to go with the default 8 and to use
-  a boot command line option for devices that need to use a different
-  command queue depth.
-
-  There is no safe option other than using good SCSI devices.
-
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS
-  This option allows you to specify the maximum number of commands
-  that can be queued to any device, when tagged command queuing is
-  possible. The default value is 32. Minimum is 2, maximum is 64.
-  Modern hard disks are able to support 64 tags and even more, but
-  do not seem to be faster when more than 32 tags are being used.
-
-  So, the normal answer here is to go with the default value 32 unless
-  you are using very large hard disks with large cache (>= 1 MB) that
-  are able to take advantage of more than 32 tagged commands.
-
-  There is no safe option and the default answer is recommended.
-
-CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
-  This option allows you to enable some features depending on GPIO
-  wiring. These General Purpose Input/Output pins can be used for
-  vendor specific features or implementation of the standard SYMBIOS
-  features. Genuine SYMBIOS controllers use GPIO0 in output for
-  controller LED and GPIO3 bit as a flag indicating
-  singled-ended/differential interface. The Tekram DC-390U/F boards
-  uses a different GPIO wiring.
-
-  Your answer to this question is ignored if all your controllers have
-  NVRAM, since the driver is able to detect the board type from the
-  NVRAM format.
-
-  If all the controllers in your system are genuine SYMBIOS boards or
-  use BIOS and drivers from SYMBIOS, you would want to say Y here,
-  otherwise N. N is the safe answer.
-
-CONFIG_SCSI_NCR53C8XX_PROFILE
-  This option allows you to enable profiling information gathering.
-  These statistics are not very accurate due to the low frequency
-  of the kernel clock (100 Hz on i386) and have performance impact
-  on systems that use very fast devices.
-
-  The normal answer therefore is N.
-
-CONFIG_SCSI_NCR53C8XX_PQS_PDS
-  Say Y here if you have a special SCSI adapter produced by NCR
-  corporation called a PCI Quad SCSI or PCI Dual SCSI. You do not need
-  this if you do not have one of these adapters. However, since this
-  device is detected as a specific PCI device, this option is quite
-  safe.
-
-  The common answer here is N, but answering Y is safe.
-
-CONFIG_SCSI_QLOGIC_ISP
-  This driver works for all QLogic PCI SCSI host adapters (IQ-PCI,
-  IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card.  (This latter
-  card is supported by the "AM53/79C974 PCI SCSI" driver.)
-
-  If you say Y here, make sure to choose "BIOS" at the question "PCI
-  access mode".
-
-  Please read the file <file:drivers/scsi/README.qlogicisp>.  You
-  should also read the SCSI-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 qlogicisp.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGIC_FC
-  This is a driver for the QLogic ISP2100 SCSI-FCP host adapter.
-
-  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 qlogicfc.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_VT
-  If you say Y here, you will get support for terminal devices with
-  display and keyboard devices. These are called "virtual" because you
-  can run several virtual terminals (also called virtual consoles) on
-  one physical terminal. This is rather useful, for example one
-  virtual terminal can collect system messages and warnings, another
-  one can be used for a text-mode user session, and a third could run
-  an X session, all in parallel. Switching between virtual terminals
-  is done with certain key combinations, usually Alt-<function key>.
-
-  The setterm command ("man setterm") can be used to change the
-  properties (such as colors or beeping) of a virtual terminal. The
-  man page console_codes(4) ("man console_codes") contains the special
-  character sequences that can be used to change those properties
-  directly. The fonts used on virtual terminals can be changed with
-  the setfont ("man setfont") command and the key bindings are defined
-  with the loadkeys ("man loadkeys") command.
-
-  You need at least one virtual terminal device in order to make use
-  of your keyboard and monitor. Therefore, only people configuring an
-  embedded system would want to say N here in order to save some
-  memory; the only way to log into such a system is then via a serial
-  or network connection.
-
-  If unsure, say Y, or else you won't be able to do much with your new
-  shiny Linux system :-)
-
-CONFIG_VT_CONSOLE
-  The system console is the device which receives all kernel messages
-  and warnings and which allows logins in single user mode. If you
-  answer Y here, a virtual terminal (the device used to interact with
-  a physical terminal) can be used as system console. This is the most
-  common mode of operations, so you should say Y here unless you want
-  the kernel messages be output only to a serial port (in which case
-  you should say Y to "Console on serial port", below).
-
-  If you do say Y here, by default the currently visible virtual
-  terminal (/dev/tty0) will be used as system console. You can change
-  that with a kernel command line option such as "console=tty3" which
-  would use the third virtual terminal as system console. (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.)
-
-  If unsure, say Y.
-
-CONFIG_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_PRINTER
-  If you intend to attach a printer to the parallel port of your Linux
-  box (as opposed to using a serial printer; if the connector at the
-  printer has 9 or 25 holes ["female"], then it's serial), say Y.
-  Also read the Printing-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  It is possible to share one parallel port among several devices
-  (e.g. printer and ZIP drive) and it is safe to compile the
-  corresponding drivers into the kernel.  If you want to compile this
-  driver as a module however ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt> and
-  <file:Documentation/parport.txt>.  The module will be called lp.o.
-
-  If you have several parallel ports, you can specify which ports to
-  use with the "lp" kernel command line option.  (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.)  The syntax of the
-  "lp" command line option can be found in <file:drivers/char/lp.c>.
-
-  If you have more than 8 printers, you need to increase the LP_NO
-  macro in lp.c and the PARPORT_MAX macro in parport.h.
-
-CONFIG_BBC_I2C
-  The BBC devices on the UltraSPARC III have two I2C controllers.  The
-  first I2C controller connects mainly to configuration PROMs (NVRAM,
-  CPU configuration, DIMM types, etc.).  The second I2C controller
-  connects to environmental control devices such as fans and
-  temperature sensors.  The second controller also connects to the
-  smartcard reader, if present.  Say Y to enable support for these.
-
-CONFIG_DRM
-  Kernel-level support for the Direct Rendering Infrastructure (DRI)
-  introduced in XFree86 4.0. If you say Y here, you need to select
-  the module that's right for your graphics card from the list below.
-  These modules provide support for synchronization, security, and
-  DMA transfers. Please see <http://dri.sourceforge.net/> for more
-  details.  You should also select and configure AGP
-  (/dev/agpgart) support.
-
-CONFIG_DRM_TDFX
-  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
-  graphics card.  If M is selected, the module will be called tdfx.o.
-
-CONFIG_DRM_R128
-  Choose this option if you have an ATI Rage 128 graphics card.  If M
-  is selected, the module will be called r128.o.  AGP support for
-  this card is strongly suggested (unless you have a PCI version).
-
-CONFIG_DRM_FFB
-  Choose this option if you have one of Sun's Creator3D-based graphics
-  and frame buffer cards.  Product page at
-  <http://www.sun.com/desktop/products/Graphics/creator3d.html>.
-
-CONFIG_SOFT_WATCHDOG
-  A software monitoring watchdog. This will fail to reboot your system
-  from some situations that the hardware watchdog will recover
-  from. Equally it's a lot cheaper to install.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called
-   softdog.o.
-
-CONFIG_RTC
-  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
-  into your computer.
-
-  Every PC has such a clock built in. It can be used to generate
-  signals from as low as 1Hz up to 8192Hz, and can also be used
-  as a 24 hour alarm. It reports status information via the file
-  /proc/driver/rtc and its behaviour is set by various ioctls on
-  /dev/rtc.
-
-  If you run Linux on a multiprocessor machine and said Y to
-  "Symmetric Multi Processing" above, you should say Y here to read
-  and set the RTC in an SMP compatible fashion.
-
-  If you think you have a use for such a device (such as periodic data
-  sampling), then say Y here, and read <file:Documentation/rtc.txt>
-  for details.
-
-  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 is called rtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_SCSI_SUNESP
-  This is the driver for the Sun ESP SCSI host adapter. The ESP
-  chipset is present in most SPARC SBUS-based computers.
-
-  This support is also available as a module called esp.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGICPTI
-  This driver supports SBUS SCSI controllers from PTI or QLogic. These
-  controllers are known under Solaris as qpti and in the openprom as
-  PTI,ptisp or QLGC,isp. Note that PCI QLogic SCSI controllers are
-  driven by a different driver.
-
-  This support is also available as a module called qlogicpti.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_PROM_CONSOLE
-  Say Y to build a console driver for Sun machines that uses the
-  terminal emulation built into their console PROMS.
-
-CONFIG_SUN_OPENPROMFS
-  If you say Y, the OpenPROM device tree will be available as a
-  virtual file system, which you can mount to /proc/openprom by "mount
-  -t openpromfs none /proc/openprom".
-
-  If you want to compile the /proc/openprom support as a module ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called openpromfs.o.  If unsure, say M.
-
-CONFIG_SPARC32_COMPAT
-  This allows you to run 32-bit binaries on your Ultra.
-  Everybody wants this; say Y.
-
-CONFIG_BINFMT_ELF32
-  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
-  Everybody wants this; say Y.
-
-CONFIG_BINFMT_AOUT32
-  This allows you to run 32-bit a.out format binaries on your Ultra.
-  If you want to run SunOS binaries (see SunOS binary emulation below)
-  or other a.out binaries, say Y. If unsure, say N.
-
-CONFIG_SUNOS_EMUL
-  This allows you to run most SunOS binaries.  If you want to do this,
-  say Y here and place appropriate files in /usr/gnemul/sunos. See
-  <http://www.ultralinux.org/faq.html> for more information.  If you
-  want to run SunOS binaries on an Ultra you must also say Y to
-  "Kernel support for 32-bit a.out binaries" above.
-
-CONFIG_VIDEO_DEV
-  Support for audio/video capture and overlay devices and FM radio
-  cards. The exact capabilities of each device vary. User tools for
-  this are available from
-  <ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
-
-  If you are interested in writing a driver for such an audio/video
-  device or user software interacting with such a driver, please read
-  the file <file:Documentation/video4linux/API.html>.
-
-  This driver is also available as a module called videodev.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_VIDEO_BT848
-  Support for BT848 based frame grabber/overlay boards. This includes
-  the Miro, Hauppauge and STB boards. Please read the material in
-  <file:Documentation/video4linux/bttv> for more information.
-
-  If you say Y or M here, you need to say Y or M to "I2C support" and
-  "I2C bit-banging interfaces" in the character device section.
-
-  This driver is available as a module called bttv.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_DISPLAY7SEG
-  This is the driver for the 7-segment display and LED present on
-  Sun Microsystems CompactPCI models CP1400 and CP1500.
-
-  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 display7seg.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  If you do not have a CompactPCI model CP1400 or CP1500, or
-  another UltraSPARC-IIi-cEngine boardset with a 7-segment display,
-  you should say N to this option.
-
-CONFIG_WATCHDOG_RIO
-  Say Y here to support the hardware watchdog capability on Sun RIO
-  machines.  The watchdog timeout period is normally one minute but
-  can be changed with a boot-time parameter.
-
-CONFIG_WATCHDOG_CP1XXX
-  This is the driver for the hardware watchdog timers present on
-  Sun Microsystems CompactPCI models CP1400 and CP1500.
-
-  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 cpwatchdog.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  If you do not have a CompactPCI model CP1400 or CP1500, or
-  another UltraSPARC-IIi-cEngine boardset with hardware watchdog,
-  you should say N to this option.
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  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
-  memory.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_DEBUG_BUGVERBOSE
-  Say Y here to make BUG() panics output the file name and line number
-  of the BUG call as well as the EIP and oops trace.  This aids
-  debugging but costs about 70-100K of memory.
-
diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/sparc64/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1703 @@
+# $Id: config.in,v 1.158 2002/01/24 22:14:44 davem Exp $
+# For a description of the syntax of this configuration file,
+# see the Configure script.
+#
+
+mainmenu "Linux/UltraSPARC Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "General setup"
+
+config BBC_I2C
+	tristate "UltraSPARC-III bootbus i2c controller driver"
+	help
+	  The BBC devices on the UltraSPARC III have two I2C controllers.  The
+	  first I2C controller connects mainly to configuration PROMs (NVRAM,
+	  CPU configuration, DIMM types, etc.).  The second I2C controller
+	  connects to environmental control devices such as fans and
+	  temperature sensors.  The second controller also connects to the
+	  smartcard reader, if present.  Say Y to enable support for these.
+
+config VT
+	bool
+	default y
+	---help---
+	  If you say Y here, you will get support for terminal devices with
+	  display and keyboard devices. These are called "virtual" because you
+	  can run several virtual terminals (also called virtual consoles) on
+	  one physical terminal. This is rather useful, for example one
+	  virtual terminal can collect system messages and warnings, another
+	  one can be used for a text-mode user session, and a third could run
+	  an X session, all in parallel. Switching between virtual terminals
+	  is done with certain key combinations, usually Alt-<function key>.
+
+	  The setterm command ("man setterm") can be used to change the
+	  properties (such as colors or beeping) of a virtual terminal. The
+	  man page console_codes(4) ("man console_codes") contains the special
+	  character sequences that can be used to change those properties
+	  directly. The fonts used on virtual terminals can be changed with
+	  the setfont ("man setfont") command and the key bindings are defined
+	  with the loadkeys ("man loadkeys") command.
+
+	  You need at least one virtual terminal device in order to make use
+	  of your keyboard and monitor. Therefore, only people configuring an
+	  embedded system would want to say N here in order to save some
+	  memory; the only way to log into such a system is then via a serial
+	  or network connection.
+
+	  If unsure, say Y, or else you won't be able to do much with your new
+	  shiny Linux system :-)
+
+config VT_CONSOLE
+	bool
+	default y
+	---help---
+	  The system console is the device which receives all kernel messages
+	  and warnings and which allows logins in single user mode. If you
+	  answer Y here, a virtual terminal (the device used to interact with
+	  a physical terminal) can be used as system console. This is the most
+	  common mode of operations, so you should say Y here unless you want
+	  the kernel messages be output only to a serial port (in which case
+	  you should say Y to "Console on serial port", below).
+
+	  If you do say Y here, by default the currently visible virtual
+	  terminal (/dev/tty0) will be used as system console. You can change
+	  that with a kernel command line option such as "console=tty3" which
+	  would use the third virtual terminal as system console. (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.)
+
+	  If unsure, say Y.
+
+config HW_CONSOLE
+	bool
+	default y
+
+config HUGETLB_PAGE
+	bool "SPARC64 Huge TLB Page Support"
+	help
+	  This enables support for huge pages.  User space applications
+	  can make use of this support with the sys_alloc_hugepages and
+	  sys_free_hugepages system calls.  If your applications are
+	  huge page aware, then say Y here.
+
+	  Otherwise, say N.
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config PREEMPT
+	bool "Preemptible Kernel"
+	help
+	  This option reduces the latency of the kernel when reacting to
+	  real-time or interactive events by allowing a low priority process to
+	  be preempted even if it is in kernel mode executing a system call.
+	  This allows applications to run more reliably even when the system is
+	  under load.
+
+	  Say Y here if you are building a kernel for a desktop, embedded
+	  or real-time system.  Say N if you are unsure.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-64)"
+	depends on SMP
+	default "64"
+
+# Identify this as a Sparc64 build
+config SPARC64
+	bool
+	default y
+	help
+	  SPARC is a family of RISC microprocessors designed and marketed by
+	  Sun Microsystems, incorporated.  This port covers the newer 64-bit
+	  UltraSPARC.  The UltraLinux project maintains both the SPARC32 and
+	  SPARC64 ports; its web page is available at
+	  <http://www.ultralinux.org/>.
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+# Global things across all Sun machines.
+config HAVE_DEC_LOCK
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+	default y
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config ISAPNP
+	bool
+	help
+	  Say Y here if you would like support for ISA Plug and Play devices.
+	  Some information is in <file:Documentation/isapnp.txt>.
+
+	  This support is also available as a module called isapnp.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config EISA
+	bool
+	---help---
+	  The Extended Industry Standard Architecture (EISA) bus was
+	  developed as an open alternative to the IBM MicroChannel bus.
+
+	  The EISA bus provided some of the features of the IBM MicroChannel
+	  bus while maintaining backward compatibility with cards made for
+	  the older ISA bus.  The EISA bus saw limited use between 1988 and
+	  1995 when it was made obsolete by the PCI bus.
+
+	  Say Y here if you are building a kernel for an EISA-based machine.
+
+	  Otherwise, say N.
+
+config MCA
+	bool
+	help
+	  MicroChannel Architecture is found in some IBM PS/2 machines and
+	  laptops.  It is a bus system similar to PCI or ISA. See
+	  <file:Documentation/mca.txt> (and especially the web page given
+	  there) before attempting to build an MCA bus kernel.
+
+config PCMCIA
+	tristate
+	---help---
+	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
+	  computer.  These are credit-card size devices such as network cards,
+	  modems or hard drives often used with laptops computers.  There are
+	  actually two varieties of these cards: the older 16 bit PCMCIA cards
+	  and the newer 32 bit CardBus cards.  If you want to use CardBus
+	  cards, you need to say Y here and also to "CardBus support" below.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  Please also read the PCMCIA-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).
+	  When compiled this way, there will be modules called pcmcia_core.o
+	  and ds.o.  If you want to compile it as a module, say M here and
+	  read <file:Documentation/modules.txt>.
+
+config SBUS
+	bool
+	default y
+
+config SBUSCHAR
+	bool
+	default y
+
+config SUN_AUXIO
+	bool
+	default y
+
+config SUN_IO
+	bool
+	default y
+
+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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config RTC
+	tristate
+	depends on PCI
+	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
+	  into your computer.
+
+	  Every PC has such a clock built in. It can be used to generate
+	  signals from as low as 1Hz up to 8192Hz, and can also be used
+	  as a 24 hour alarm. It reports status information via the file
+	  /proc/driver/rtc and its behaviour is set by various ioctls on
+	  /dev/rtc.
+
+	  If you run Linux on a multiprocessor machine and said Y to
+	  "Symmetric Multi Processing" above, you should say Y here to read
+	  and set the RTC in an SMP compatible fashion.
+
+	  If you think you have a use for such a device (such as periodic data
+	  sampling), then say Y here, and read <file:Documentation/rtc.txt>
+	  for details.
+
+	  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 is called rtc.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+source "drivers/pci/Kconfig"
+
+config SUN_OPENPROMFS
+	tristate "Openprom tree appears in /proc/openprom"
+	help
+	  If you say Y, the OpenPROM device tree will be available as a
+	  virtual file system, which you can mount to /proc/openprom by "mount
+	  -t openpromfs none /proc/openprom".
+
+	  If you want to compile the /proc/openprom support as a module ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called openpromfs.o.  If unsure, say M.
+
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+config SPARC32_COMPAT
+	bool "Kernel support for Linux/Sparc 32bit binary compatibility"
+	help
+	  This allows you to run 32-bit binaries on your Ultra.
+	  Everybody wants this; say Y.
+
+config BINFMT_ELF32
+	tristate "Kernel support for 32-bit ELF binaries"
+	depends on SPARC32_COMPAT
+	help
+	  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
+	  Everybody wants this; say Y.
+
+config BINFMT_AOUT32
+	bool "Kernel support for 32-bit (ie. SunOS) a.out binaries"
+	depends on SPARC32_COMPAT
+	help
+	  This allows you to run 32-bit a.out format binaries on your Ultra.
+	  If you want to run SunOS binaries (see SunOS binary emulation below)
+	  or other a.out binaries, say Y. If unsure, say N.
+
+config BINFMT_ELF
+	tristate "Kernel support for 64-bit ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config SUNOS_EMUL
+	bool "SunOS binary emulation"
+	help
+	  This allows you to run most SunOS binaries.  If you want to do this,
+	  say Y here and place appropriate files in /usr/gnemul/sunos. See
+	  <http://www.ultralinux.org/faq.html> for more information.  If you
+	  want to run SunOS binaries on an Ultra you must also say Y to
+	  "Kernel support for 32-bit a.out binaries" above.
+
+config SOLARIS_EMUL
+	tristate "Solaris binary emulation (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  This is experimental code which will enable you to run (many)
+	  Solaris binaries on your SPARC Linux machine.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called solaris.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+source "drivers/parport/Kconfig"
+
+config PRINTER
+	tristate "Parallel printer support"
+	depends on PARPORT
+	---help---
+	  If you intend to attach a printer to the parallel port of your Linux
+	  box (as opposed to using a serial printer; if the connector at the
+	  printer has 9 or 25 holes ["female"], then it's serial), say Y.
+	  Also read the Printing-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  It is possible to share one parallel port among several devices
+	  (e.g. printer and ZIP drive) and it is safe to compile the
+	  corresponding drivers into the kernel.  If you want to compile this
+	  driver as a module however ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt> and
+	  <file:Documentation/parport.txt>.  The module will be called lp.o.
+
+	  If you have several parallel ports, you can specify which ports to
+	  use with the "lp" kernel command line option.  (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.)  The syntax of the
+	  "lp" command line option can be found in <file:drivers/char/lp.c>.
+
+	  If you have more than 8 printers, you need to increase the LP_NO
+	  macro in lp.c and the PARPORT_MAX macro in parport.h.
+
+config ENVCTRL
+	tristate "SUNW, envctrl support"
+	depends on PCI
+	help
+	  Kernel support for temperature and fan monitoring on Sun SME
+	  machines.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called envctrl.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config DISPLAY7SEG
+	tristate "7-Segment Display support"
+	depends on PCI
+	---help---
+	  This is the driver for the 7-segment display and LED present on
+	  Sun Microsystems CompactPCI models CP1400 and CP1500.
+
+	  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 display7seg.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you do not have a CompactPCI model CP1400 or CP1500, or
+	  another UltraSPARC-IIi-cEngine boardset with a 7-segment display,
+	  you should say N to this option.
+
+config WATCHDOG_CP1XXX
+	tristate "CP1XXX Hardware Watchdog support"
+	depends on PCI
+	---help---
+	  This is the driver for the hardware watchdog timers present on
+	  Sun Microsystems CompactPCI models CP1400 and CP1500.
+
+	  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 cpwatchdog.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you do not have a CompactPCI model CP1400 or CP1500, or
+	  another UltraSPARC-IIi-cEngine boardset with hardware watchdog,
+	  you should say N to this option.
+
+config WATCHDOG_RIO
+	tristate "RIO Hardware Watchdog support"
+	depends on PCI
+	help
+	  Say Y here to support the hardware watchdog capability on Sun RIO
+	  machines.  The watchdog timeout period is normally one minute but
+	  can be changed with a boot-time parameter.
+
+endmenu
+
+
+menu "Console drivers"
+
+config PROM_CONSOLE
+	bool "PROM console"
+	help
+	  Say Y to build a console driver for Sun machines that uses the
+	  terminal emulation built into their console PROMS.
+
+source "drivers/video/Kconfig"
+
+endmenu
+
+source "drivers/serial/Kconfig"
+
+source "drivers/sbus/char/Kconfig"
+
+source "drivers/mtd/Kconfig"
+
+
+menu "Block devices"
+
+config BLK_DEV_FD
+	bool "Normal floppy disk support"
+	---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
+	  Thinkpad users, is contained in <file:Documentation/floppy.txt>.
+	  That file also contains the location of the Floppy driver FAQ as
+	  well as location of the fdutils package used to configure additional
+	  parameters of the driver at run time.
+
+	  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 floppy.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config BLK_DEV_LOOP
+	tristate "Loopback device support"
+	---help---
+	  Saying Y here will allow you to use a regular file as a block
+	  device; you can then create a file system on that block device and
+	  mount it just as you would mount other block devices such as hard
+	  drive partitions, CD-ROM drives or floppy drives. The loop devices
+	  are block special device files with major number 7 and typically
+	  called /dev/loop0, /dev/loop1 etc.
+
+	  This is useful if you want to check an ISO 9660 file system before
+	  burning the CD, or if you want to use floppy images without first
+	  writing them to floppy. Furthermore, some Linux distributions avoid
+	  the need for a dedicated Linux partition by keeping their complete
+	  root file system inside a DOS FAT file using this loop device
+	  driver.
+
+	  The loop device driver can also be used to "hide" a file system in a
+	  disk partition, floppy, or regular file, either using encryption
+	  (scrambling the data) or steganography (hiding the data in the low
+	  bits of, say, a sound file). This is also safe if the file resides
+	  on a remote file server. If you want to do this, you will first have
+	  to acquire and install a kernel patch from
+	  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
+	  say Y to this option.
+
+	  Note that alternative ways to use encrypted file systems are
+	  provided by the cfs package, which can be gotten from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
+	  package, available at <http://tcfs.dia.unisa.it/>. You do not need
+	  to say Y here if you want to use one of these. However, using cfs
+	  requires saying Y to "NFS file system support" below while using
+	  tcfs requires applying a kernel patch. An alternative steganography
+	  solution is provided by StegFS, also available from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
+
+	  To use the loop device, you need the losetup utility and a recent
+	  version of the mount program, both contained in the util-linux
+	  package. The location and current version number of util-linux is
+	  contained in the file <file:Documentation/Changes>.
+
+	  Note that this loop device has nothing to do with the loopback
+	  device used for network connections from the machine to itself.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called loop.o.
+
+	  Most users will answer N here.
+
+config BLK_DEV_NBD
+	tristate "Network block device support"
+	depends on NET
+	---help---
+	  Saying Y here will allow your computer to be a client for network
+	  block devices, i.e. it will be able to use block devices exported by
+	  servers (mount file systems on them etc.). Communication between
+	  client and server works over TCP/IP networking, but to the client
+	  program this is hidden: it looks like a regular local file access to
+	  a block device special file such as /dev/nd0.
+
+	  Network block devices also allows you to run a block-device in
+	  userland (making server and client physically the same computer,
+	  communicating using the loopback network device).
+
+	  Read <file:Documentation/nbd.txt> for more information, especially
+	  about where to find the server code, which runs in user space and
+	  does not need special kernel support.
+
+	  Note that this has nothing to do with the network file systems NFS
+	  or Coda; you can say N here even if you intend to use NFS or Coda.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called nbd.o.
+
+	  If unsure, say N.
+
+source "drivers/md/Kconfig"
+
+config BLK_DEV_RAM
+	tristate "RAM disk support"
+	---help---
+	  Saying Y here will allow you to use a portion of your RAM memory as
+	  a block device, so that you can make file systems on it, read and
+	  write to it and do all the other things that you can do with normal
+	  block devices (such as hard drives). It is usually used to load and
+	  store a copy of a minimal root file system off of a floppy into RAM
+	  during the initial install of Linux.
+
+	  Note that the kernel command line option "ramdisk=XX" is now
+	  obsolete. For details, read <file:Documentation/ramdisk.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M and read <file:Documentation/modules.txt>. The module will be
+	  called rd.o.
+
+	  Most normal users won't need the RAM disk functionality, and can
+	  thus say N here.
+
+config BLK_DEV_RAM_SIZE
+	int "Default RAM disk size"
+	depends on BLK_DEV_RAM
+	default "4096"
+	help
+	  The default value is 4096. Only change this if you know what are
+	  you doing. If you are using IBM S/390, then set this to 8192.
+
+config BLK_DEV_INITRD
+	bool "Initial RAM disk (initrd) support"
+	depends on BLK_DEV_RAM=y
+	help
+	  The initial RAM disk is a RAM disk that is loaded by the boot loader
+	  (loadlin or lilo) and that is mounted as root before the normal boot
+	  procedure. It is typically used to load modules needed to mount the
+	  "real" root file system, etc. See <file:Documentation/initrd.txt>
+	  for details.
+
+endmenu
+
+
+menu "ATA/ATAPI/MFM/RLL device support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL device support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+comment "SCSI support type (disk, tape, CDrom)"
+	depends on SCSI
+
+config BLK_DEV_SD
+	tristate "SCSI disk support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI hard disk or the SCSI or parallel port
+	  version of the IOMEGA ZIP drive under Linux, say Y and read the
+	  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
+	  CD-ROMs.
+
+	  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 sd_mod.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  Do not compile this driver as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI disk. In this case, do not compile the driver
+	  for your SCSI host adapter (below) as a module either.
+
+config SD_EXTRA_DEVS
+	int "Maximum number of SCSI disks that can be loaded as modules"
+	depends on BLK_DEV_SD
+	default "40"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted.  In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional disks that can be loaded after the
+	  first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_ST
+	tristate "SCSI tape support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI tape drive under Linux, say Y and read the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and
+	  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
+	  SCSI CD-ROMs.
+
+	  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 st.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config CHR_DEV_OSST
+	tristate "SCSI OnStream SC-x0 tape support"
+	depends on SCSI
+	---help---
+	  The OnStream SC-x0 SCSI tape drives can not be driven by the
+	  standard st driver, but instead need this special osst driver and
+	  use the  /dev/osstX char device nodes (major 206).  Via usb-storage
+	  and ide-scsi, you may be able to drive the USB-x0 and DI-x0 drives
+	  as well.  Note that there is also a second generation of OnStream
+	  tape drives (ADR-x0) that supports the standard SCSI-2 commands for
+	  tapes (QIC-157) and can be driven by the standard driver st.
+	  For more information, you may have a look at the SCSI-HOWTO
+	  <http://www.linuxdoc.org/docs.html#howto>  and
+	  <file:drivers/scsi/README.osst>  in the kernel source.
+	  More info on the OnStream driver may be found on
+	  <http://linux1.onstream.nl/test/>
+	  Please also have a look at the standard st docu, as most of it
+	  applies to osst as well.
+
+	  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 osst.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR
+	tristate "SCSI CDROM support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI CD-ROM under Linux, say Y and read the
+	  SCSI-HOWTO and the CD-ROM-HOWTO at
+	  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
+	  or M to "ISO 9660 CD-ROM file system support" later.
+
+	  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 sr_mod.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR_VENDOR
+	bool "Enable vendor-specific extensions (for SCSI CDROM)"
+	depends on BLK_DEV_SR
+	help
+	  This enables the usage of vendor specific SCSI commands. This is
+	  required to support multisession CDs with old NEC/TOSHIBA cdrom
+	  drives (and HP Writers). If you have such a drive and get the first
+	  session only, try saying Y here; everybody else says N.
+
+config SR_EXTRA_DEVS
+	int "Maximum number of CDROM devices that can be loaded as modules"
+	depends on BLK_DEV_SR
+	default "2"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted. In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional CD-ROMs that can be loaded after
+	  the first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_SG
+	tristate "SCSI generic support"
+	depends on SCSI
+	---help---
+	  If you want to use SCSI scanners, synthesizers or CD-writers or just
+	  about anything having "SCSI" in its name other than hard disks,
+	  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
+	  directly, so you need some additional software which knows how to
+	  talk to these devices using the SCSI protocol:
+
+	  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
+	  writer software look at Cdrtools
+	  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
+	  and for burning a "disk at once": CDRDAO
+	  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
+	  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
+	  For other devices, it's possible that you'll have to write the
+	  driver software yourself. Please read the file
+	  <file:Documentation/scsi-generic.txt> for more information.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
+	  say N.
+
+comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+	depends on SCSI
+
+config SCSI_MULTI_LUN
+	bool "Probe all LUNs on each SCSI device"
+	depends on SCSI
+	help
+	  If you have a SCSI device that supports more than one LUN (Logical
+	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
+	  can say Y here to force the SCSI driver to probe for multiple LUNs.
+	  A SCSI device with multiple LUNs acts logically like multiple SCSI
+	  devices. The vast majority of SCSI devices have only one LUN, and
+	  so most people can say N here and should in fact do so, because it
+	  is safer.
+
+config SCSI_CONSTANTS
+	bool "Verbose SCSI error reporting (kernel size +=12K)"
+	depends on SCSI
+	help
+	  The error messages regarding your SCSI hardware will be easier to
+	  understand if you say Y here; it will enlarge your kernel by about
+	  12 KB. If in doubt, say Y.
+
+config SCSI_LOGGING
+	bool "SCSI logging facility"
+	depends on SCSI
+	---help---
+	  This turns on a logging facility that can be used to debug a number
+	  of SCSI related problems.
+
+	  If you say Y here, no logging output will appear by default, but you
+	  can enable logging by saying Y to "/proc file system support" and
+	  "Sysctl support" below and executing the command
+
+	  echo "scsi log token [level]" > /proc/scsi/scsi
+
+	  at boot time after the /proc file system has been mounted.
+
+	  There are a number of things that can be used for 'token' (you can
+	  find them in the source: <file:drivers/scsi/scsi.c>), and this
+	  allows you to select the types of information you want, and the
+	  level allows you to select the level of verbosity.
+
+	  If you say N here, it may be harder to track down some types of SCSI
+	  problems. If you say Y here your kernel will be somewhat larger, but
+	  there should be no noticeable performance impact as long as you have
+	  logging turned off.
+
+
+menu "SCSI low-level drivers"
+	depends on SCSI!=n
+
+config SCSI_SUNESP
+	tristate "Sparc ESP Scsi Driver"
+	depends on SCSI
+	help
+	  This is the driver for the Sun ESP SCSI host adapter. The ESP
+	  chipset is present in most SPARC SBUS-based computers.
+
+	  This support is also available as a module called esp.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGICPTI
+	tristate "PTI Qlogic, ISP Driver"
+	depends on SCSI
+	help
+	  This driver supports SBUS SCSI controllers from PTI or QLogic. These
+	  controllers are known under Solaris as qpti and in the openprom as
+	  PTI,ptisp or QLGC,isp. Note that PCI QLogic SCSI controllers are
+	  driven by a different driver.
+
+	  This support is also available as a module called qlogicpti.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+
+choice
+	prompt "Adaptec AIC7xxx support"
+	optional
+	depends on SCSI && PCI
+
+source "drivers/scsi/aic7xxx/Kconfig"
+
+config SCSI_AIC7XXX_OLD
+	tristate "Old driver"
+	---help---
+	  WARNING This driver is an older aic7xxx driver and is no longer
+	  under active development.  Adaptec, Inc. is writing a new driver to
+	  take the place of this one, and it is recommended that whenever
+	  possible, people should use the new Adaptec written driver instead
+	  of this one.  This driver will eventually be phased out entirely.
+
+	  This is support for the various aic7xxx based Adaptec SCSI
+	  controllers. These include the 274x EISA cards; 284x VLB cards;
+	  2902, 2910, 293x, 294x, 394x, 3985 and several other PCI and
+	  motherboard based SCSI controllers from Adaptec. It does not support
+	  the AAA-13x RAID controllers from Adaptec, nor will it likely ever
+	  support them. It does not support the 2920 cards from Adaptec that
+	  use the Future Domain SCSI controller chip. For those cards, you
+	  need the "Future Domain 16xx SCSI support" driver.
+
+	  In general, if the controller is based on an Adaptec SCSI controller
+	  chip from the aic777x series or the aic78xx series, this driver
+	  should work. The only exception is the 7810 which is specifically
+	  not supported (that's the RAID controller chip on the AAA-13x
+	  cards).
+
+	  Note that the AHA2920 SCSI host adapter is *not* supported by this
+	  driver; choose "Future Domain 16xx SCSI support" instead if you have
+	  one of those.
+
+	  Information on the configuration options for this controller can be
+	  found by checking the help file for each of the available
+	  configuration options. You should read
+	  <file:drivers/scsi/aic7xxx_old/README.aic7xxx> at a minimum before
+	  contacting the maintainer with any questions.  The SCSI-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>, can also
+	  be of great help.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called aic7xxx_old.o.
+
+config AIC7XXX_OLD_TCQ_ON_BY_DEFAULT
+	bool "Enable Tagged Command Queueing (TCQ) by default"
+	depends on SCSI_AIC7XXX_OLD
+	---help---
+	  This option causes the aic7xxx driver to attempt to use Tagged
+	  Command Queueing (TCQ) on all devices that claim to support it.
+
+	  TCQ is a feature of SCSI-2 which improves performance: the host
+	  adapter can send several SCSI commands to a device's queue even if
+	  previous commands haven't finished yet.  Because the device is
+	  intelligent, it can optimize its operations (like head positioning)
+	  based on its own request queue.  Not all devices implement this
+	  correctly.
+
+	  If you say Y here, you can still turn off TCQ on troublesome devices
+	  with the use of the tag_info boot parameter.  See the file
+	  <file:drivers/scsi/README.aic7xxx> for more information on that and
+	  other aic7xxx setup commands.  If this option is turned off, you may
+	  still enable TCQ on known good devices by use of the tag_info boot
+	  parameter.
+
+	  If you are unsure about your devices then it is safest to say N
+	  here.
+
+	  However, TCQ can increase performance on some hard drives by as much
+	  as 50% or more, so it is recommended that if you say N here, you
+	  should at least read the <file:drivers/scsi/README.aic7xxx> file so
+	  you will know how to enable this option manually should your drives
+	  prove to be safe in regards to TCQ.
+
+	  Conversely, certain drives are known to lock up or cause bus resets
+	  when TCQ is enabled on them.  If you have a Western Digital
+	  Enterprise SCSI drive for instance, then don't even bother to enable
+	  TCQ on it as the drive will become unreliable, and it will actually
+	  reduce performance.
+
+config AIC7XXX_OLD_CMDS_PER_DEVICE
+	int "Maximum number of TCQ commands per device"
+	depends on SCSI_AIC7XXX_OLD
+	default "8"
+	---help---
+	  Specify the number of commands you would like to allocate per SCSI
+	  device when Tagged Command Queueing (TCQ) is enabled on that device.
+
+	  Reasonable figures are in the range of 8 to 24 commands per device,
+	  but depending on hardware could be increased or decreased from that
+	  figure. If the number is too high for any particular device, the
+	  driver will automatically compensate usually after only 10 minutes
+	  of uptime. It will not hinder performance if some of your devices
+	  eventually have their command depth reduced, but is a waste of
+	  memory if all of your devices end up reducing this number down to a
+	  more reasonable figure.
+
+	  NOTE: Certain very broken drives are known to lock up when given
+	  more commands than they like to deal with. Quantum Fireball drives
+	  are the most common in this category. For the Quantum Fireball
+	  drives it is suggested to use no more than 8 commands per device.
+
+	  Default: 8
+
+config AIC7XXX_OLD_PROC_STATS
+	bool "Collect statistics to report in /proc"
+	depends on SCSI_AIC7XXX_OLD
+	---help---
+	  This option tells the driver to keep track of how many commands have
+	  been sent to each particular device and report that information to
+	  the user via the /proc/scsi/aic7xxx/n file, where n is the number of
+	  the aic7xxx controller you want the information on. This adds a
+	  small amount of overhead to each and every SCSI command the aic7xxx
+	  driver handles, so if you aren't really interested in this
+	  information, it is best to leave it disabled. This will only work if
+	  you also say Y to "/proc file system support", below.
+
+	  If unsure, say N.
+
+endchoice
+
+config SCSI_SYM53C8XX_2
+	tristate "SYM53C8XX Version 2 SCSI support"
+	depends on PCI && SCSI
+	---help---
+	  This driver supports the whole NCR53C8XX/SYM53C8XX family of 
+	  PCI-SCSI controllers. It also supports the subset of LSI53C10XX 
+	  Ultra-160 controllers that are based on the SYM53C8XX SCRIPTS 
+	  language. It does not support LSI53C10XX Ultra-320 PCI-X SCSI 
+	  controllers.
+
+	  If your system has problems using this new major version of the
+	  SYM53C8XX driver, you may switch back to driver version 1.
+
+	  Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
+	  information.
+
+config SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
+	int "DMA addressing mode"
+	depends on SCSI_SYM53C8XX_2
+	default "1"
+	---help---
+	  This option only applies to PCI-SCSI chip that are PCI DAC capable 
+	  (875A, 895A, 896, 1010-33, 1010-66, 1000).
+
+	  When set to 0, only PCI 32 bit DMA addressing (SAC) will be performed.
+	  When set to 1, 40 bit DMA addressing (with upper 24 bits of address 
+	  set to zero) is supported. The addressable range is here 1 TB.
+	  When set to 2, full 64 bits of address for DMA are supported, but only
+	  16 segments of 4 GB can be addressed. The addressable range is so 
+	  limited to 64 GB.
+
+	  The safest value is 0 (32 bit DMA addressing) that is guessed to still 
+	  fit most of real machines.
+
+	  The preferred value 1 (40 bit DMA addressing) should make happy 
+	  properly engineered PCI DAC capable host bridges. You may configure
+	  this option for Intel platforms with more than 4 GB of memory.
+
+	  The still experimental value 2 (64 bit DMA addressing with 16 x 4GB 
+	  segments limitation) can be used on systems that require PCI address 
+	  bits past bit 39 to be set for the addressing of memory using PCI 
+	  DAC cycles.
+
+config SCSI_SYM53C8XX_DEFAULT_TAGS
+	int "default tagged command queue depth"
+	depends on SCSI_SYM53C8XX_2
+	default "16"
+	help
+	  This is the default value of the command queue depth the driver will 
+	  announce to the generic SCSI layer for devices that support tagged 
+	  command queueing. This value can be changed from the boot command line.
+	  This is a soft limit that cannot exceed CONFIG_SCSI_SYM53C8XX_MAX_TAGS.
+
+config SCSI_SYM53C8XX_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on SCSI_SYM53C8XX_2
+	default "64"
+	help
+	  This option allows you to specify the maximum number of commands
+	  that can be queued to any device, when tagged command queuing is
+	  possible. The driver supports up to 256 queued commands per device.
+	  This value is used as a compiled-in hard limit.
+
+config SCSI_SYM53C8XX_IOMAPPED
+	bool "use normal IO"
+	depends on SCSI_SYM53C8XX_2
+	help
+	  If you say Y here, the driver will preferently use normal IO rather than 
+	  memory mapped IO.
+
+config SCSI_NCR53C8XX
+	tristate "NCR53C8XX SCSI support"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && SCSI
+	---help---
+	  This is the BSD ncr driver adapted to Linux for the NCR53C8XX family
+	  of PCI-SCSI controllers.  This driver supports parity checking,
+	  tagged command queuing and fast synchronous data transfers up to 80
+	  MB/s with wide FAST-40 LVD devices and controllers.
+
+	  Recent versions of the 53C8XX chips are better supported by the
+	  option "SYM53C8XX SCSI support", below.
+
+	  Note: there is yet another driver for the 53c8xx family of
+	  controllers ("NCR53c7,8xx SCSI support" above).  If you want to use
+	  them both, you need to say M to both and build them as modules, but
+	  only one may be active at a time.  If you have a 53c8xx board, you
+	  probably do not want to use the "NCR53c7,8xx SCSI support".
+
+	  Please read <file:drivers/scsi/README.ncr53c8xx> for more
+	  information.
+
+config SCSI_SYM53C8XX
+	tristate "SYM53C8XX SCSI support"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && SCSI
+	---help---
+	  This driver supports all the features of recent 53C8XX chips (used
+	  in PCI SCSI controllers), notably the hardware phase mismatch
+	  feature of the SYM53C896.
+
+	  Older versions of the 53C8XX chips are not supported by this
+	  driver.  If your system uses either a 810 rev. < 16, a 815, or a 825
+	  rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
+	  driver ("NCR53C8XX SCSI support" above) or configure both the
+	  NCR53C8XX and this SYM53C8XX drivers either as module or linked to
+	  the kernel image.
+
+	  When both drivers are linked into the kernel, the SYM53C8XX driver
+	  is called first at initialization and you can use the 'excl=ioaddr'
+	  driver boot option to exclude attachment of adapters by the
+	  SYM53C8XX driver.  For example, entering
+	  'sym53c8xx=excl:0xb400,excl=0xc000' at the lilo prompt prevents
+	  adapters at io address 0xb400 and 0xc000 from being attached by the
+	  SYM53C8XX driver, thus allowing the NCR53C8XX driver to attach them.
+	  The 'excl' option is also supported by the NCR53C8XX driver.
+
+	  Please read <file:drivers/scsi/README.ncr53c8xx> for more
+	  information.
+
+config SCSI_NCR53C8XX_DEFAULT_TAGS
+	int "default tagged command queue depth"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	default "8"
+	---help---
+	  "Tagged command queuing" is a feature of SCSI-2 which improves
+	  performance: the host adapter can send several SCSI commands to a
+	  device's queue even if previous commands haven't finished yet.
+	  Because the device is intelligent, it can optimize its operations
+	  (like head positioning) based on its own request queue. Some SCSI
+	  devices don't implement this properly; if you want to disable this
+	  feature, enter 0 or 1 here (it doesn't matter which).
+
+	  The default value is 8 and should be supported by most hard disks.
+	  This value can be overridden from the boot command line using the
+	  'tags' option as follows (example):
+	  'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to
+	  4, set queue depth to 16 for target 2 and target 3 on controller 0
+	  and set queue depth to 10 for target 0 / lun 2 on controller 1.
+
+	  The normal answer therefore is to go with the default 8 and to use
+	  a boot command line option for devices that need to use a different
+	  command queue depth.
+
+	  There is no safe option other than using good SCSI devices.
+
+config SCSI_NCR53C8XX_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	default "32"
+	---help---
+	  This option allows you to specify the maximum number of commands
+	  that can be queued to any device, when tagged command queuing is
+	  possible. The default value is 32. Minimum is 2, maximum is 64.
+	  Modern hard disks are able to support 64 tags and even more, but
+	  do not seem to be faster when more than 32 tags are being used.
+
+	  So, the normal answer here is to go with the default value 32 unless
+	  you are using very large hard disks with large cache (>= 1 MB) that
+	  are able to take advantage of more than 32 tagged commands.
+
+	  There is no safe option and the default answer is recommended.
+
+config SCSI_NCR53C8XX_SYNC
+	int "synchronous transfers frequency in MHz"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	default "10"
+	---help---
+	  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
+	  rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers
+	  are respectively the maximum data transfer rates in mega-transfers
+	  per second for each class.  For example, a FAST-20 Wide 16 device is
+	  able to transfer data at 20 million 16 bit packets per second for a
+	  total rate of 40 MB/s.
+
+	  You may specify 0 if you want to only use asynchronous data
+	  transfers. This is the safest and slowest option. Otherwise, specify
+	  a value between 5 and 80, depending on the capability of your SCSI
+	  controller.  The higher the number, the faster the data transfer.
+	  Note that 80 should normally be ok since the driver decreases the
+	  value automatically according to the controller's capabilities.
+
+	  Your answer to this question is ignored for controllers with NVRAM,
+	  since the driver will get this information from the user set-up.  It
+	  also can be overridden using a boot setup option, as follows
+	  (example): 'ncr53c8xx=sync:12' will allow the driver to negotiate
+	  for FAST-20 synchronous data transfer (20 mega-transfers per
+	  second).
+
+	  The normal answer therefore is not to go with the default but to
+	  select the maximum value 80 allowing the driver to use the maximum
+	  value supported by each controller. If this causes problems with
+	  your SCSI devices, you should come back and decrease the value.
+
+	  There is no safe option other than using good cabling, right
+	  terminations and SCSI conformant devices.
+
+config SCSI_NCR53C8XX_PROFILE
+	bool "enable profiling"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	help
+	  This option allows you to enable profiling information gathering.
+	  These statistics are not very accurate due to the low frequency
+	  of the kernel clock (100 Hz on i386) and have performance impact
+	  on systems that use very fast devices.
+
+	  The normal answer therefore is N.
+
+config SCSI_NCR53C8XX_PQS_PDS
+	bool "include support for the NCR PQS/PDS SCSI card"
+	depends on (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && SCSI_SYM53C8XX
+	help
+	  Say Y here if you have a special SCSI adapter produced by NCR
+	  corporation called a PCI Quad SCSI or PCI Dual SCSI. You do not need
+	  this if you do not have one of these adapters. However, since this
+	  device is detected as a specific PCI device, this option is quite
+	  safe.
+
+	  The common answer here is N, but answering Y is safe.
+
+config SCSI_NCR53C8XX_NO_DISCONNECT
+	bool "not allow targets to disconnect"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && SCSI_NCR53C8XX_DEFAULT_TAGS=0
+	help
+	  This option is only provided for safety if you suspect some SCSI
+	  device of yours to not support properly the target-disconnect
+	  feature. In that case, you would say Y here. In general however, to
+	  not allow targets to disconnect is not reasonable if there is more
+	  than 1 device on a SCSI bus. The normal answer therefore is N.
+
+config SCSI_NCR53C8XX_SYMBIOS_COMPAT
+	bool "assume boards are SYMBIOS compatible (EXPERIMENTAL)"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && EXPERIMENTAL
+	---help---
+	  This option allows you to enable some features depending on GPIO
+	  wiring. These General Purpose Input/Output pins can be used for
+	  vendor specific features or implementation of the standard SYMBIOS
+	  features. Genuine SYMBIOS controllers use GPIO0 in output for
+	  controller LED and GPIO3 bit as a flag indicating
+	  singled-ended/differential interface. The Tekram DC-390U/F boards
+	  uses a different GPIO wiring.
+
+	  Your answer to this question is ignored if all your controllers have
+	  NVRAM, since the driver is able to detect the board type from the
+	  NVRAM format.
+
+	  If all the controllers in your system are genuine SYMBIOS boards or
+	  use BIOS and drivers from SYMBIOS, you would want to say Y here,
+	  otherwise N. N is the safe answer.
+
+config SCSI_QLOGIC_ISP
+	tristate "Qlogic ISP SCSI support"
+	depends on PCI && SCSI
+	---help---
+	  This driver works for all QLogic PCI SCSI host adapters (IQ-PCI,
+	  IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card.  (This latter
+	  card is supported by the "AM53/79C974 PCI SCSI" driver.)
+
+	  If you say Y here, make sure to choose "BIOS" at the question "PCI
+	  access mode".
+
+	  Please read the file <file:drivers/scsi/README.qlogicisp>.  You
+	  should also read the SCSI-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 qlogicisp.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGIC_FC
+	tristate "Qlogic ISP FC SCSI support"
+	depends on PCI && SCSI
+	help
+	  This is a driver for the QLogic ISP2100 SCSI-FCP host adapter.
+
+	  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 qlogicfc.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGIC_FC_FIRMWARE
+	bool
+	depends on SCSI_QLOGIC_FC
+	default y
+
+endmenu
+
+endmenu
+
+source "drivers/fc4/Kconfig"
+
+if PCI
+source "drivers/message/fusion/Kconfig"
+endif
+
+source "drivers/ieee1394/Kconfig"
+
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+source "drivers/atm/Kconfig"
+
+endmenu
+
+source "net/ax25/Kconfig"
+
+# This one must be before the filesystem configs. -DaveM
+
+menu "Unix 98 PTY support"
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+	---help---
+	  A pseudo terminal (PTY) is a software device consisting of two
+	  halves: a master and a slave. The slave device behaves identical to
+	  a physical terminal; the master device is used by a process to
+	  read data from and write data to the slave, thereby emulating a
+	  terminal. Typical programs for the master side are telnet servers
+	  and xterms.
+
+	  Linux has traditionally used the BSD-like names /dev/ptyxx for
+	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
+	  has a number of problems. The GNU C library glibc 2.1 and later,
+	  however, supports the Unix98 naming standard: in order to acquire a
+	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
+	  terminal is then made available to the process and the pseudo
+	  terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The entries in /dev/pts/ are created on the fly by a virtual
+	  file system; therefore, if you say Y here you should say Y to
+	  "/dev/pts file system for Unix98 PTYs" as well.
+
+	  If you want to say Y here, you need to have the C library glibc 2.1
+	  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
+	  Read the instructions in <file:Documentation/Changes> pertaining to
+	  pseudo terminals. It's safe to say N.
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+	help
+	  The maximum number of Unix98 PTYs that can be used at any one time.
+	  The default is 256, and should be enough for desktop systems. Server
+	  machines which support incoming telnet/rlogin/ssh connections and/or
+	  serve several X terminals may want to increase this: every incoming
+	  connection and every xterm uses up one PTY.
+
+	  When not in use, each additional set of 256 PTYs occupy
+	  approximately 8 KB of kernel memory on 32-bit architectures.
+
+endmenu
+
+
+menu "Video For Linux"
+
+config VIDEO_DEV
+	tristate "Video For Linux"
+	---help---
+	  Support for audio/video capture and overlay devices and FM radio
+	  cards. The exact capabilities of each device vary. User tools for
+	  this are available from
+	  <ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
+
+	  If you are interested in writing a driver for such an audio/video
+	  device or user software interacting with such a driver, please read
+	  the file <file:Documentation/video4linux/API.html>.
+
+	  This driver is also available as a module called videodev.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config VIDEO_BT848
+	tristate "BT848 Video For Linux"
+	depends on PCI && VIDEO_DEV
+	---help---
+	  Support for BT848 based frame grabber/overlay boards. This includes
+	  the Miro, Hauppauge and STB boards. Please read the material in
+	  <file:Documentation/video4linux/bttv> for more information.
+
+	  If you say Y or M here, you need to say Y or M to "I2C support" and
+	  "I2C bit-banging interfaces" in the character device section.
+
+	  This driver is available as a module called bttv.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+endmenu
+
+
+menu "XFree86 DRI support"
+
+config DRM
+	bool "Direct Rendering Manager (XFree86 DRI support)"
+	help
+	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
+	  introduced in XFree86 4.0. If you say Y here, you need to select
+	  the module that's right for your graphics card from the list below.
+	  These modules provide support for synchronization, security, and
+	  DMA transfers. Please see <http://dri.sourceforge.net/> for more
+	  details.  You should also select and configure AGP
+	  (/dev/agpgart) support.
+
+config DRM_FFB
+	tristate "Creator/Creator3D"
+	depends on DRM
+	help
+	  Choose this option if you have one of Sun's Creator3D-based graphics
+	  and frame buffer cards.  Product page at
+	  <http://www.sun.com/desktop/products/Graphics/creator3d.html>.
+
+config DRM_TDFX
+	tristate "3dfx Banshee/Voodoo3+"
+	depends on DRM
+	help
+	  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
+	  graphics card.  If M is selected, the module will be called tdfx.o.
+
+config DRM_R128
+	tristate "ATI Rage 128"
+	depends on DRM
+	help
+	  Choose this option if you have an ATI Rage 128 graphics card.  If M
+	  is selected, the module will be called r128.o.  AGP support for
+	  this card is strongly suggested (unless you have a PCI version).
+
+endmenu
+
+source "drivers/input/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "Watchdog"
+
+config SOFT_WATCHDOG
+	tristate "Software watchdog"
+	help
+	  A software monitoring watchdog. This will fail to reboot your system
+	  from some situations that the hardware watchdog will recover
+	  from. Equally it's a lot cheaper to install.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called
+	  softdog.o.
+
+endmenu
+
+
+menu "Kernel hacking"
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	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
+	  memory.
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and build SMP to catch missing spinlock initialization
+	  and certain other kinds of spinlock errors commonly made.  This is
+	  best used in conjunction with the NMI watchdog so that spinlock
+	  deadlocks are also debuggable.
+
+config DEBUG_BUGVERBOSE
+	bool "Verbose BUG() reporting (adds 70K)"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to make BUG() panics output the file name and line number
+	  of the BUG call as well as the EIP and oops trace.  This aids
+	  debugging but costs about 70-100K of memory.
+
+config DEBUG_DCFLUSH
+	bool "D-cache flush debugging"
+	depends on DEBUG_KERNEL
+
+config STACK_DEBUG
+	bool "Stack Overflow Detection Support"
+
+config MCOUNT
+	bool
+	depends on STACK_DEBUG
+	default y
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/sparc64/config.in b/arch/sparc64/config.in
--- a/arch/sparc64/config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,298 +0,0 @@
-# $Id: config.in,v 1.158 2002/01/24 22:14:44 davem Exp $
-# For a description of the syntax of this configuration file,
-# see the Configure script.
-#
-mainmenu_name "Linux/UltraSPARC Kernel Configuration"
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'General setup'
-
-tristate 'UltraSPARC-III bootbus i2c controller driver' CONFIG_BBC_I2C
-
-define_bool CONFIG_VT y
-define_bool CONFIG_VT_CONSOLE y
-define_bool CONFIG_HW_CONSOLE y
-
-bool 'SPARC64 Huge TLB Page Support' CONFIG_HUGETLB_PAGE
-
-bool 'Symmetric multi-processing support' CONFIG_SMP
-bool 'Preemptible Kernel' CONFIG_PREEMPT
-
-if [ "$CONFIG_SMP" = "y" ]; then
-   int  'Maximum number of CPUs (2-64)' CONFIG_NR_CPUS 64
-fi
-
-# Identify this as a Sparc64 build
-define_bool CONFIG_SPARC64 y
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-# Global things across all Sun machines.
-define_bool CONFIG_HAVE_DEC_LOCK y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
-define_bool CONFIG_GENERIC_ISA_DMA y
-define_bool CONFIG_ISA n
-define_bool CONFIG_ISAPNP n
-define_bool CONFIG_EISA n
-define_bool CONFIG_MCA n
-define_bool CONFIG_PCMCIA n
-define_bool CONFIG_SBUS y
-define_bool CONFIG_SBUSCHAR y
-define_bool CONFIG_SUN_AUXIO y
-define_bool CONFIG_SUN_IO y
-bool 'PCI support' CONFIG_PCI
-if [ "$CONFIG_PCI" = "y" ] ; then
-   define_bool CONFIG_RTC y
-fi
-source drivers/pci/Config.in
-
-tristate 'Openprom tree appears in /proc/openprom' CONFIG_SUN_OPENPROMFS
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-bool 'Kernel support for Linux/Sparc 32bit binary compatibility' CONFIG_SPARC32_COMPAT
-if [ "$CONFIG_SPARC32_COMPAT" != "n" ]; then
-   tristate '  Kernel support for 32-bit ELF binaries' CONFIG_BINFMT_ELF32
-   bool '  Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32
-fi
-tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   tristate 'Solaris binary emulation (EXPERIMENTAL)' CONFIG_SOLARIS_EMUL
-fi
-source drivers/parport/Config.in
-dep_tristate '  Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
-if [ "$CONFIG_PCI" = "y" ]; then
-   tristate 'SUNW, envctrl support' CONFIG_ENVCTRL
-   tristate '7-Segment Display support' CONFIG_DISPLAY7SEG
-   tristate 'CP1XXX Hardware Watchdog support' CONFIG_WATCHDOG_CP1XXX
-   tristate 'RIO Hardware Watchdog support' CONFIG_WATCHDOG_RIO
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'Console drivers'
-bool 'PROM console' CONFIG_PROM_CONSOLE
-source drivers/video/Config.in
-endmenu
-
-source drivers/serial/Config.in
-source drivers/sbus/char/Config.in
-source drivers/mtd/Config.in
-mainmenu_option next_comment
-comment 'Block devices'
-
-bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD
-
-tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
-dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-
-source drivers/md/Config.in
-
-tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
-	int '   Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
-fi
-dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
-
-endmenu
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL device support'
-
-tristate 'ATA/ATAPI/MFM/RLL device support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   comment 'SCSI support type (disk, tape, CDrom)'
-
-   dep_tristate '  SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
-
-   if [ "$CONFIG_BLK_DEV_SD" != "n" ]; then
-      int  'Maximum number of SCSI disks that can be loaded as modules' CONFIG_SD_EXTRA_DEVS 40
-   fi
-
-   dep_tristate '  SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
-
-   dep_tristate '  SCSI OnStream SC-x0 tape support' CONFIG_CHR_DEV_OSST $CONFIG_SCSI
-
-   dep_tristate '  SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
-
-   if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-      bool '    Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
-      int  'Maximum number of CDROM devices that can be loaded as modules' CONFIG_SR_EXTRA_DEVS 2
-   fi
-
-   dep_tristate '  SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
-
-   comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
-
-   bool '  Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
-
-   bool '  Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
-   bool '  SCSI logging facility' CONFIG_SCSI_LOGGING
-
-   mainmenu_option next_comment
-   comment 'SCSI low-level drivers'
-
-   dep_tristate 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
-   dep_tristate 'PTI Qlogic, ISP Driver' CONFIG_SCSI_QLOGICPTI $CONFIG_SCSI
-
-   if [ "$CONFIG_PCI" != "n" ]; then
-      source drivers/scsi/aic7xxx/Config.in
-      if [ "$CONFIG_SCSI_AIC7XXX" != "y" ]; then
-         dep_tristate 'Old Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX_OLD $CONFIG_SCSI
-         if [ "$CONFIG_SCSI_AIC7XXX_OLD" != "n" ]; then
-            bool '  Enable Tagged Command Queueing (TCQ) by default' CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT
-            int  '  Maximum number of TCQ commands per device' CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE 8
-            bool '  Collect statistics to report in /proc' CONFIG_AIC7XXX_OLD_PROC_STATS
-         fi
-      fi
-      dep_tristate 'SYM53C8XX Version 2 SCSI support' CONFIG_SCSI_SYM53C8XX_2 $CONFIG_SCSI
-      if [ "$CONFIG_SCSI_SYM53C8XX_2" != "n" ]; then
-         int  '  DMA addressing mode' CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE 1
-         int  '  default tagged command queue depth' CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS 16
-         int  '  maximum number of queued commands' CONFIG_SCSI_SYM53C8XX_MAX_TAGS 64
-         bool '  use normal IO' CONFIG_SCSI_SYM53C8XX_IOMAPPED
-      fi
-      if [ "$CONFIG_SCSI_SYM53C8XX_2" != "y" ]; then
-         dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
-         dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
-         if [ "$CONFIG_SCSI_NCR53C8XX" != "n" -o "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
-            int 'default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
-            int 'maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
-            int 'synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 10
-            bool '  enable profiling' CONFIG_SCSI_NCR53C8XX_PROFILE
-            if [ "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
-	       bool '  include support for the NCR PQS/PDS SCSI card' CONFIG_SCSI_NCR53C8XX_PQS_PDS
-            fi
-            if [ "$CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS" = "0" ]; then
-               bool '  not allow targets to disconnect' CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
-            fi
-            if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-               bool '  assume boards are SYMBIOS compatible (EXPERIMENTAL)' CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
-            fi
-         fi
-      fi
-      dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI
-      dep_tristate 'Qlogic ISP FC SCSI support' CONFIG_SCSI_QLOGIC_FC $CONFIG_SCSI
-      if [ "$CONFIG_SCSI_QLOGIC_FC" != "n" ]; then
-         define_bool CONFIG_SCSI_QLOGIC_FC_FIRMWARE y
-      fi
-   fi
-
-   endmenu
-fi
-endmenu
-
-source drivers/fc4/Config.in
-
-if [ "$CONFIG_PCI" = "y" ]; then
-   source drivers/message/fusion/Config.in
-fi
-
-source drivers/ieee1394/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-      if [ "$CONFIG_ATM" = "y" ]; then
-	source drivers/atm/Config.in
-      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-# This one must be before the filesystem configs. -DaveM
-mainmenu_option next_comment
-comment 'Unix 98 PTY support'
-bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-   int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'Video For Linux'
-tristate 'Video For Linux' CONFIG_VIDEO_DEV
-if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
-   if [ "$CONFIG_PCI" != "n" ]; then
-      dep_tristate '  BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
-   fi
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'XFree86 DRI support'
-bool 'Direct Rendering Manager (XFree86 DRI support)' CONFIG_DRM
-dep_tristate '  Creator/Creator3D' CONFIG_DRM_FFB $CONFIG_DRM
-dep_tristate '  3dfx Banshee/Voodoo3+' CONFIG_DRM_TDFX $CONFIG_DRM
-dep_tristate '  ATI Rage 128' CONFIG_DRM_R128 $CONFIG_DRM
-endmenu
-
-source drivers/input/Config.in
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-mainmenu_option next_comment
-comment 'Watchdog'
-
-tristate 'Software watchdog' CONFIG_SOFT_WATCHDOG
-endmenu
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
-   bool '  D-cache flush debugging' CONFIG_DEBUG_DCFLUSH
-fi
-bool 'Stack Overflow Detection Support' CONFIG_STACK_DEBUG
-if [ "$CONFIG_STACK_DEBUG" = "y" ] ; then
-   define_bool CONFIG_MCOUNT y
-fi
-
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig
--- a/arch/sparc64/defconfig	Wed Oct 30 16:44:27 2002
+++ b/arch/sparc64/defconfig	Wed Oct 30 16:44:27 2002
@@ -143,7 +143,6 @@
 # Non-8250 serial port support
 #
 CONFIG_SERIAL_SUNCORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_SUNZILOG=y
 CONFIG_SERIAL_SUNSU=y
 # CONFIG_SERIAL_SUNSAB is not set
@@ -183,6 +182,7 @@
 # CONFIG_MD_RAID5 is not set
 # CONFIG_MD_MULTIPATH is not set
 # CONFIG_BLK_DEV_LVM is not set
+CONFIG_BLK_DEV_DM=m
 # CONFIG_BLK_DEV_RAM is not set
 # CONFIG_BLK_DEV_INITRD is not set
 
@@ -330,6 +330,7 @@
 #
 CONFIG_FUSION=m
 # CONFIG_FUSION_BOOT is not set
+CONFIG_FUSION_MAX_SGE=40
 CONFIG_FUSION_ISENSE=m
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_LAN=m
@@ -684,6 +685,8 @@
 # CONFIG_ADFS_FS_RW is not set
 CONFIG_AFFS_FS=m
 # CONFIG_HFS_FS is not set
+CONFIG_BEFS_FS=m
+# CONFIG_BEFS_DEBUG is not set
 CONFIG_BFS_FS=m
 CONFIG_EXT3_FS=m
 CONFIG_JBD=m
@@ -734,16 +737,19 @@
 #
 CONFIG_CODA_FS=m
 # CONFIG_INTERMEZZO_FS is not set
-CONFIG_NFS_FS=y
+CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
 # CONFIG_ROOT_NFS is not set
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
 CONFIG_NFSD_TCP=y
-CONFIG_SUNRPC=y
-CONFIG_LOCKD=y
+CONFIG_SUNRPC=m
+CONFIG_LOCKD=m
 CONFIG_LOCKD_V4=y
 CONFIG_EXPORTFS=m
+CONFIG_CIFS=m
 # CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_NCPFS_PACKET_SIGNING is not set
@@ -754,6 +760,7 @@
 # CONFIG_NCPFS_SMALLDOS is not set
 # CONFIG_NCPFS_NLS is not set
 # CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_AFS_FS is not set
 # CONFIG_ZISOFS_FS is not set
 
 #
diff -Nru a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c
--- a/arch/sparc64/kernel/ioctl32.c	Wed Oct 30 16:44:33 2002
+++ b/arch/sparc64/kernel/ioctl32.c	Wed Oct 30 16:44:33 2002
@@ -868,10 +868,39 @@
 	err = sys_ioctl(fd, HDIO_GETGEO, (unsigned long)&geo);
 	set_fs (old_fs);
 	if (!err) {
-		err = copy_to_user ((struct hd_geometry32 *)arg, &geo, 4);
-		err |= __put_user (geo.start, &(((struct hd_geometry32 *)arg)->start));
+		if (copy_to_user ((struct hd_geometry32 *)arg, &geo, 4) ||
+		    __put_user (geo.start, &(((struct hd_geometry32 *)arg)->start)))
+			err = -EFAULT;
 	}
-	return err ? -EFAULT : 0;
+	return err;
+}
+
+struct hd_big_geometry32 {
+	unsigned char heads;
+	unsigned char sectors;
+	unsigned int cylinders;
+	u32 start;
+};
+                        
+static int hdio_getgeo_big(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	mm_segment_t old_fs = get_fs();
+	struct hd_big_geometry geo;
+	int err;
+	
+	set_fs (KERNEL_DS);
+	err = sys_ioctl(fd, cmd, (unsigned long)&geo);
+	set_fs (old_fs);
+	if (!err) {
+		struct hd_big_geometry32 *up = (struct hd_big_geometry32 *) arg;
+
+		if (put_user(geo.heads, &up->heads) ||
+		    __put_user(geo.sectors, &up->sectors) ||
+		    __put_user(geo.cylinders, &up->cylinders) ||
+		    __put_user(((u32) geo.start), &up->start))
+			err = -EFAULT;
+	}
+	return err;
 }
 
 struct  fbcmap32 {
@@ -5030,6 +5059,7 @@
 HANDLE_IOCTL(SIOCRTMSG, ret_einval)
 HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp)
 HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo)
+HANDLE_IOCTL(HDIO_GETGEO_BIG_RAW, hdio_getgeo_big)
 HANDLE_IOCTL(BLKGETSIZE, w_long)
 HANDLE_IOCTL(0x1260, broken_blkgetsize)
 HANDLE_IOCTL(BLKSECTGET, w_long)
diff -Nru a/arch/sparc64/prom/Makefile b/arch/sparc64/prom/Makefile
--- a/arch/sparc64/prom/Makefile	Wed Oct 30 16:44:26 2002
+++ b/arch/sparc64/prom/Makefile	Wed Oct 30 16:44:26 2002
@@ -10,6 +10,3 @@
 	   tree.o console.o printf.o p1275.o map.o
 
 include $(TOPDIR)/Rules.make
-
-%.o: %.c
-	$(CC) $(subst -pg,,$(CFLAGS)) -c $<
diff -Nru a/arch/sparc64/vmlinux.lds.S b/arch/sparc64/vmlinux.lds.S
--- a/arch/sparc64/vmlinux.lds.S	Wed Oct 30 16:44:32 2002
+++ b/arch/sparc64/vmlinux.lds.S	Wed Oct 30 16:44:32 2002
@@ -89,5 +89,5 @@
   .debug_pubnames 0 : { *(.debug_pubnames) }
   .debug_sfnames  0 : { *(.debug_sfnames) }
   .line           0 : { *(.line) }
-  /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
+  /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
 }
diff -Nru a/arch/um/Kconfig b/arch/um/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/um/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,165 @@
+config USERMODE
+	bool
+	default y
+
+
+mainmenu "Linux/Usermode Kernel Configuration"
+
+config ISA
+	bool
+
+config SBUS
+	bool
+
+config PCI
+	bool
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+
+menu "Code maturity level options"
+
+config EXPERIMENTAL
+	bool "Prompt for development and/or incomplete code/drivers"
+
+endmenu
+
+
+menu "General Setup"
+
+config NET
+	bool "Networking support"
+
+config SYSVIPC
+	bool "System V IPC"
+
+config BSD_PROCESS_ACCT
+	bool "BSD Process Accounting"
+
+config SYSCTL
+	bool "Sysctl support"
+
+config BINFMT_AOUT
+	tristate "Kernel support for a.out binaries"
+
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+
+config HOSTFS
+	tristate "Host filesystem"
+
+config MCONSOLE
+	bool "Management console"
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on MCONSOLE
+
+config HOST_2G_2G
+	bool "2G/2G host address space split"
+
+config UML_SMP
+	bool "Symmetric multi-processing support"
+
+config SMP
+	bool
+	default UML_SMP
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+
+config NEST_LEVEL
+	int "Nesting level"
+	default "0"
+
+config KERNEL_HALF_GIGS
+	int "Kernel address space size (in .5G units)"
+	default "1"
+
+config HIGHMEM
+	bool "Highmem support"
+
+endmenu
+
+
+menu "Loadable module support"
+
+config MODULES
+	bool "Enable loadable module support"
+
+# MODVERSIONS does not yet work in this architecture
+#   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
+config KMOD
+	bool "Kernel module loader"
+	depends on MODULES
+
+endmenu
+
+source "arch/um/Kconfig_char"
+
+source "arch/um/Kconfig_block"
+
+config NETDEVICES
+	bool
+	default NET
+
+source "arch/um/Kconfig_net"
+
+source "net/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "SCSI support"
+
+config SCSI
+	tristate "SCSI support"
+
+# This gives us free_dma, which scsi.c wants.
+config GENERIC_ISA_DMA
+	bool
+	depends on SCSI
+	default y
+
+source "arch/um/Kconfig_scsi"
+
+endmenu
+
+source "drivers/md/Kconfig"
+
+source "drivers/mtd/Kconfig"
+
+
+menu "Kernel hacking"
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+
+config DEBUGSYM
+	bool "Enable kernel debugging symbols"
+
+config PT_PROXY
+	bool "Enable ptrace proxy"
+	depends on XTERM_CHAN && DEBUGSYM
+
+config GPROF
+	bool "Enable gprof support"
+	depends on DEBUGSYM
+
+config GCOV
+	bool "Enable gcov support"
+	depends on DEBUGSYM
+
+endmenu
+
diff -Nru a/arch/um/Kconfig_block b/arch/um/Kconfig_block
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/um/Kconfig_block	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,34 @@
+
+menu "Block Devices"
+
+config BLK_DEV_UBD
+	bool "Virtual block device"
+
+config BLK_DEV_UBD_SYNC
+	bool "Always do synchronous disk IO for UBD"
+	depends on BLK_DEV_UBD
+
+config BLK_DEV_LOOP
+	tristate "Loopback device support"
+
+config BLK_DEV_NBD
+	tristate "Network block device support"
+	depends on NET
+
+config BLK_DEV_RAM
+	tristate "RAM disk support"
+
+config BLK_DEV_RAM_SIZE
+	int "Default RAM disk size"
+	depends on BLK_DEV_RAM
+	default "4096"
+
+config BLK_DEV_INITRD
+	bool "Initial RAM disk (initrd) support"
+	depends on BLK_DEV_RAM=y
+
+config MMAPPER
+	tristate "Example IO memory driver"
+
+endmenu
+
diff -Nru a/arch/um/Kconfig_char b/arch/um/Kconfig_char
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/um/Kconfig_char	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,79 @@
+
+menu "Character Devices"
+
+config STDIO_CONSOLE
+	bool
+	default y
+
+config SSL
+	bool "Virtual serial line"
+
+config FD_CHAN
+	bool "file descriptor channel support"
+
+config NULL_CHAN
+	bool "null channel support"
+
+config PORT_CHAN
+	bool "port channel support"
+
+config PTY_CHAN
+	bool "pty channel support"
+
+config TTY_CHAN
+	bool "tty channel support"
+
+config XTERM_CHAN
+	bool "xterm channel support"
+
+config CON_ZERO_CHAN
+	string "Default main console channel initialization"
+	default "fd:0,fd:1"
+
+config CON_CHAN
+	string "Default console channel initialization"
+	default "xterm"
+
+config SSL_CHAN
+	string "Default serial line channel initialization"
+	default "pty"
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+
+config WATCHDOG
+	bool "Watchdog Timer Support"
+
+config WATCHDOG_NOWAYOUT
+	bool "Disable watchdog shutdown on close"
+	depends on WATCHDOG
+
+config SOFT_WATCHDOG
+	tristate "Software Watchdog"
+	depends on WATCHDOG
+
+config UML_WATCHDOG
+	tristate "UML watchdog"
+	depends on WATCHDOG
+
+config UML_SOUND
+	tristate "Sound support"
+
+config SOUND
+	tristate
+	default UML_SOUND
+
+config HOSTAUDIO
+	tristate
+	default UML_SOUND
+
+config TTY_LOG
+	bool "Enable tty logging"
+
+endmenu
+
diff -Nru a/arch/um/Kconfig_net b/arch/um/Kconfig_net
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/um/Kconfig_net	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,101 @@
+
+menu "Network Devices"
+	depends on NET
+
+# UML virtual driver
+config UML_NET
+	bool "Virtual network device"
+
+config UML_NET_ETHERTAP
+	bool "Ethertap transport"
+	depends on UML_NET
+
+config UML_NET_TUNTAP
+	bool "TUN/TAP transport"
+	depends on UML_NET
+
+config UML_NET_SLIP
+	bool "SLIP transport"
+	depends on UML_NET
+
+config UML_NET_DAEMON
+	bool "Daemon transport"
+	depends on UML_NET
+
+config UML_NET_MCAST
+	bool "Multicast transport"
+	depends on UML_NET
+
+config UML_NET_PCAP
+	bool "pcap transport"
+	depends on UML_NET
+
+# Below are hardware-independent drivers mirrored from
+# drivers/net/Config.in. It would be nice if Linux
+# had HW independent drivers separated from the other
+# but it does not. Until then each non-ISA/PCI arch
+# needs to provide it's own menu of network drivers
+config DUMMY
+	tristate "Dummy net driver support"
+
+config BONDING
+	tristate "Bonding driver support"
+
+config EQUALIZER
+	tristate "EQL (serial line load balancing) support"
+
+config TUN
+	tristate "Universal TUN/TAP device driver support"
+
+config ETHERTAP
+	tristate "Ethertap network tap (OBSOLETE)"
+	depends on EXPERIMENTAL && NETLINK
+
+config PPP
+	tristate "PPP (point-to-point protocol) support"
+
+config PPP_MULTILINK
+	bool "PPP multilink support (EXPERIMENTAL)"
+	depends on PPP && EXPERIMENTAL
+
+config PPP_FILTER
+	bool "PPP filtering"
+	depends on PPP && FILTER
+
+config PPP_ASYNC
+	tristate "PPP support for async serial ports"
+	depends on PPP
+
+config PPP_SYNC_TTY
+	tristate "PPP support for sync tty ports"
+	depends on PPP
+
+config PPP_DEFLATE
+	tristate "PPP Deflate compression"
+	depends on PPP
+
+config PPP_BSDCOMP
+	tristate "PPP BSD-Compress compression"
+	depends on PPP
+
+config PPPOE
+	tristate "PPP over Ethernet (EXPERIMENTAL)"
+	depends on PPP && EXPERIMENTAL
+
+config SLIP
+	tristate "SLIP (serial line) support"
+
+config SLIP_COMPRESSED
+	bool "CSLIP compressed headers"
+	depends on SLIP=y
+
+config SLIP_SMART
+	bool "Keepalive and linefill"
+	depends on SLIP=y
+
+config SLIP_MODE_SLIP6
+	bool "Six bit SLIP encapsulation"
+	depends on SLIP=y
+
+endmenu
+
diff -Nru a/arch/um/Kconfig_scsi b/arch/um/Kconfig_scsi
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/um/Kconfig_scsi	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,58 @@
+comment "SCSI support type (disk, tape, CD-ROM)"
+	depends on SCSI
+
+config BLK_DEV_SD
+	tristate "SCSI disk support"
+	depends on SCSI
+
+config SD_EXTRA_DEVS
+	int "Maximum number of SCSI disks that can be loaded as modules"
+	depends on BLK_DEV_SD
+	default "40"
+
+config CHR_DEV_ST
+	tristate "SCSI tape support"
+	depends on SCSI
+
+config BLK_DEV_SR
+	tristate "SCSI CD-ROM support"
+	depends on SCSI
+
+config BLK_DEV_SR_VENDOR
+	bool "Enable vendor-specific extensions (for SCSI CDROM)"
+	depends on BLK_DEV_SR
+
+config SR_EXTRA_DEVS
+	int "Maximum number of CDROM devices that can be loaded as modules"
+	depends on BLK_DEV_SR
+	default "2"
+
+config CHR_DEV_SG
+	tristate "SCSI generic support"
+	depends on SCSI
+
+comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+	depends on SCSI
+
+#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+config SCSI_DEBUG_QUEUES
+	bool "Enable extra checks in new queueing code"
+	depends on SCSI
+
+#fi
+config SCSI_MULTI_LUN
+	bool "Probe all LUNs on each SCSI device"
+	depends on SCSI
+
+config SCSI_CONSTANTS
+	bool "Verbose SCSI error reporting (kernel size +=12K)"
+	depends on SCSI
+
+config SCSI_LOGGING
+	bool "SCSI logging facility"
+	depends on SCSI
+
+config SCSI_DEBUG
+	tristate "SCSI debugging host simulator (EXPERIMENTAL)"
+	depends on SCSI
+
diff -Nru a/arch/um/config.in b/arch/um/config.in
--- a/arch/um/config.in	Wed Oct 30 16:44:35 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,93 +0,0 @@
-define_bool CONFIG_USERMODE y
-
-mainmenu_name "Linux/Usermode Kernel Configuration"
-
-define_bool CONFIG_ISA n
-define_bool CONFIG_SBUS n
-define_bool CONFIG_PCI n
-
-define_bool CONFIG_UID16 y
-
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-
-mainmenu_option next_comment
-comment 'Code maturity level options'
-bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
-endmenu
-
-mainmenu_option next_comment
-comment 'General Setup'
-bool 'Networking support' CONFIG_NET
-bool 'System V IPC' CONFIG_SYSVIPC
-bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
-bool 'Sysctl support' CONFIG_SYSCTL
-tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-tristate 'Host filesystem' CONFIG_HOSTFS
-bool 'Management console' CONFIG_MCONSOLE
-dep_bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ $CONFIG_MCONSOLE
-bool '2G/2G host address space split' CONFIG_HOST_2G_2G
-
-bool 'Symmetric multi-processing support' CONFIG_UML_SMP
-define_bool CONFIG_SMP $CONFIG_UML_SMP
-if [ "$CONFIG_SMP" = "y" ]; then
-  int  'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
-fi
-
-int 'Nesting level' CONFIG_NEST_LEVEL 0
-int 'Kernel address space size (in .5G units)' CONFIG_KERNEL_HALF_GIGS 1
-bool 'Highmem support' CONFIG_HIGHMEM
-endmenu
-
-mainmenu_option next_comment
-comment 'Loadable module support'
-bool 'Enable loadable module support' CONFIG_MODULES
-if [ "$CONFIG_MODULES" = "y" ]; then
-# MODVERSIONS does not yet work in this architecture
-#   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
-    bool '  Kernel module loader' CONFIG_KMOD
-fi
-endmenu
-
-source arch/um/config_char.in
-
-source arch/um/config_block.in
-
-define_bool CONFIG_NETDEVICES $CONFIG_NET
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source arch/um/config_net.in
-   source net/Config.in
-fi
-
-source fs/Config.in
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   # This gives us free_dma, which scsi.c wants.
-   define_bool CONFIG_GENERIC_ISA_DMA y
-   source arch/um/config_scsi.in
-fi
-endmenu
-
-source drivers/md/Config.in
-
-source drivers/mtd/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-bool 'Debug memory allocations' CONFIG_DEBUG_SLAB
-bool 'Enable kernel debugging symbols' CONFIG_DEBUGSYM
-if [ "$CONFIG_XTERM_CHAN" = "y" ]; then
-   dep_bool 'Enable ptrace proxy' CONFIG_PT_PROXY $CONFIG_DEBUGSYM
-else 
-   define_bool CONFIG_PT_PROXY n
-fi
-dep_bool 'Enable gprof support' CONFIG_GPROF $CONFIG_DEBUGSYM
-dep_bool 'Enable gcov support' CONFIG_GCOV $CONFIG_DEBUGSYM
-endmenu
diff -Nru a/arch/x86_64/Config.help b/arch/x86_64/Config.help
--- a/arch/x86_64/Config.help	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,528 +0,0 @@
-CONFIG_SMP
-  This enables support for systems with more than one CPU. If you have
-  a system with only one CPU, like most personal computers, say N. If
-  you have a system with more than one CPU, say Y.
-
-  If you say N here, the kernel will run on single and multiprocessor
-  machines, but will use only one CPU of a multiprocessor machine. If
-  you say Y here, the kernel will run on many, but not all,
-  singleprocessor machines. On a singleprocessor machine, the kernel
-  will run faster if you say N here.
-
-  Note that if you say Y here and choose architecture "586" or
-  "Pentium" under "Processor family", the kernel will not work on 486
-  architectures. Similarly, multiprocessor kernels for the "PPro"
-  architecture may not work on all Pentium based boards.
-
-  People using multiprocessor machines who say Y here should also say
-  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
-  Management" code will be disabled if you say Y here.
-
-  See also the <file:Documentation/smp.tex>,
-  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
-  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you don't know what to do here, say N.
-
-CONFIG_X86
-  This is Linux's home port.  Linux was originally native to the Intel
-  386, and runs on all the later x86 processors including the Intel
-  486, 586, Pentiums, and various instruction-set-compatible chips by
-  AMD, Cyrix, and others.
-
-CONFIG_X86_64
-  Port to the x86-64 architecture. x86-64 is an 64bit extension to the
-  classical 32bit x86 architecture. For details see http://www.x86-64.org
-
-CONFIG_X86_UP_IOAPIC
-  An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
-  SMP-capable replacement for PC-style interrupt controllers. Most
-  SMP systems and a small number of uniprocessor systems have one.
-  If you have a single-CPU system with an IO-APIC, you can say Y here
-  to use it. If you say Y here even though your machine doesn't have
-  an IO-APIC, then the kernel will still run with no slowdown at all.
-
-  If you have a system with several CPUs, you do not need to say Y
-  here: the IO-APIC will be used automatically.
-
-CONFIG_X86_UP_APIC
-  A local APIC (Advanced Programmable Interrupt Controller) is an
-  integrated interrupt controller in the CPU. If you have a single-CPU
-  system which has a processor with a local APIC, you can say Y here to
-  enable and use it. If you say Y here even though your machine doesn't
-  have a local APIC, then the kernel will still run with no slowdown at
-  all. The local APIC supports CPU-generated self-interrupts (timer,
-  performance counters), and the NMI watchdog which detects hard lockups.
-
-  If you have a system with several CPUs, you do not need to say Y
-  here: the local APIC will be used automatically.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PCI
-  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.linuxdoc.org/docs.html#howto>, contains valuable
-  information about which PCI hardware does work under Linux and which
-  doesn't.
-
-CONFIG_HOTPLUG_PCI
-  Say Y here if you have a motherboard with a PCI Hotplug controller.
-  This allows you to add and remove PCI cards while the machine is
-  powered up and running.  The file system pcihpfs must be mounted
-  in order to interact with any PCI Hotplug controllers.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called pci_hotplug.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  When in doubt, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_MK8
-  Support for AMD Clawhammer/Sledgehammer CPUs. Only choice for x86-64
-  currently so you should chose this if you want a x86-64 kernel. In fact
-  you will have no other choice than to chose this.
-
-CONFIG_VGA_CONSOLE
-  Saying Y here will allow you to use Linux in text mode through a
-  display that complies with the generic VGA standard. Virtually
-  everyone wants that.
-
-  The program SVGATextMode can be used to utilize SVGA video cards to
-  their full potential in text mode. Download it from
-  <ftp://ibiblio.org/pub/Linux/utils/console/>.
-
-  Say Y.
-
-CONFIG_VIDEO_SELECT
-  This enables support for text mode selection on kernel startup. If
-  you want to take advantage of some high-resolution text mode your
-  card's BIOS offers, but the traditional Linux utilities like
-  SVGATextMode don't, you can say Y here and set the mode using the
-  "vga=" option from your boot loader (lilo or loadlin) or set
-  "vga=ask" which brings up a video mode menu on kernel startup. (Try
-  "man bootparam" or see the documentation of your boot loader about
-  how to pass options to the kernel.)
-
-  Read the file <file:Documentation/svga.txt> for more information
-  about the Video mode selection support. If unsure, say N.
-
-CONFIG_MDA_CONSOLE
-  Say Y here if you have an old MDA or monochrome Hercules graphics
-  adapter in your system acting as a second head ( = video card). You
-  will then be able to use two monitors with your Linux system. Do not
-  say Y here if your MDA card is the primary card in your system; the
-  normal VGA driver will handle it.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called mdacon.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  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 scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_CD_NO_IDESCSI
-  If you have a CD-ROM drive that is neither SCSI nor IDE/ATAPI, say Y
-  here, otherwise N. Read the CD-ROM-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about these CD-ROM drives. If you are unsure what you
-  have, say Y and find out whether you have one of the following
-  drives.
-
-  For each of these drivers, a file Documentation/cdrom/{driver_name}
-  exists. Especially in cases where you do not know exactly which kind
-  of drive you have you should read there. Most of these drivers use a
-  file drivers/cdrom/{driver_name}.h where you can define your
-  interface parameters and switch some internal goodies.
-
-  All these CD-ROM drivers are also usable as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile them as module, say M instead of Y and
-  read <file:Documentation/modules.txt>.
-
-  If you want to use any of these CD-ROM drivers, you also have to
-  answer Y or M to "ISO 9660 CD-ROM file system support" below (this
-  answer will get "defaulted" for you if you enable any of the Linux
-  CD-ROM drivers).
-
-CONFIG_MTRR
-  On Intel P6 family processors (Pentium Pro, Pentium II and later)
-  the Memory Type Range Registers (MTRRs) may be used to control
-  processor access to memory ranges. This is most useful if you have
-  a video (VGA) card on a PCI or AGP bus. Enabling write-combining
-  allows bus write transfers to be combined into a larger transfer
-  before bursting over the PCI/AGP bus. This can increase performance
-  of image write operations 2.5 times or more. Saying Y here creates a
-  /proc/mtrr file which may be used to manipulate your processor's
-  MTRRs. Typically the X server should use this.
-
-  This code has a reasonably generic interface so that similar
-  control registers on other processors can be easily supported
-  as well:
-
-  Saying Y here also fixes a problem with buggy SMP BIOSes which only
-  set the MTRRs for the boot CPU and not for the secondary CPUs. This
-  can lead to all sorts of problems, so it's good to say Y here.
-
-  Just say Y here, all x86-64 machines support MTRRs.
-
-  See <file:Documentation/mtrr.txt> for more information.
-
-CONFIG_PM
-  "Power Management" means that parts of your computer are shut
-  off or put into a power conserving "sleep" mode if they are not
-  being used.  There are two competing standards for doing this: APM
-  and ACPI.  If you want to use either one, say Y here and then also
-  to the requisite support below.
-
-  Power Management is most important for battery powered laptop
-  computers; if you have a laptop, check out the Linux Laptop home
-  page on the WWW at
-  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
-  Battery Powered Linux mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that, even if you say N here, Linux on the x86 architecture
-  will issue the hlt instruction if nothing is to be done, thereby
-  sending the processor to sleep and saving power.
-
-CONFIG_ACPI
-  Advanced Configuration and Power Interface (ACPI) support for 
-  Linux requires an ACPI compliant platform (hardware/firmware),
-  and assumes the presence of OS-directed configuration and power
-  management (OSPM) software. 
-
-  Linux ACPI provides a robust functional replacement for several 
-  legacy configuration and power management intefaces, including 
-  the Plug-and-Play BIOS specification (PnP BIOS), the 
-  MultiProcessor Specification (MPS), and the Advanced Power 
-  Management (APM) specification.  If both ACPI and APM support 
-  are configured, whichever is loaded first shall be used.
-  
-  The ACPI SourceForge project contains the latest source code, 
-  documentation, tools, mailing list subscription, and other 
-  information.  This project is available at:
-    <http://sourceforge.net/projects/acpi>
-
-  Linux support for ACPI is based on Intel Corporation's ACPI
-  Component Architecture (ACPI CA).  For more information see:
-    <http://developer.intel.com/technology/iapc/acpi>
-
-  ACPI is an open industry specification co-developed by Compaq, 
-  Intel, Microsoft, Phoenix, and Toshiba.  The specification is 
-  available at:
-    <http://www.acpi.info>
-
-CONFIG_X86_MSR
-  This device gives privileged processes access to the x86
-  Model-Specific Registers (MSRs).  It is a character device with
-  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
-  MSR accesses are directed to a specific CPU on multi-processor
-  systems.
-
-CONFIG_X86_CPUID
-  This device gives processes access to the x86 CPUID instruction to
-  be executed on a specific processor.  It is a character device
-  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
-  /dev/cpu/31/cpuid.
-
-CONFIG_NR_CPUS
-  This allows you to specify the maximum number of CPUs which this
-  kernel will support.  The maximum supported value is 32 and the
-  minimum value which makes sense is 2.
-
-  This is purely to save memory - each supported CPU adds
-  approximately eight kilobytes to the kernel image.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  This allows applications to run more reliably even when the system is
-  under load. On contrary it may also break your drivers and add
-  priority inheritance problems to your system. Don't select it if 
-  you rely on a stable system or have slightly obscure hardware.
-  It's also not very well tested on x86-64 currently.
-  You have been warned.
-
-  Say Y here if you are feeling brave and building a kernel for a 
-  desktop, embedded or real-time system.  Say N if you are unsure. 
-
-CONFIG_MAGIC_SYSRQ
-  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 <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  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
-  memory.
-
-CONFIG_DEBUG_IOVIRT
-  Say Y here to get warned whenever an attempt is made to do I/O on
-  obviously invalid addresses such as those generated when ioremap()
-  calls are forgotten.  Memory mapped I/O will go through an extra
-  check to catch access to unmapped ISA addresses, an access method
-  that can still be used by old drivers that are being ported from
-  2.0/2.2.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_CHECKING
-  Enables some internal consistency checks for kernel debugging.
-  You should normally say N.
-
-CONFIG_EARLY_PRINTK
-  Write kernel log output directly into the VGA buffer. This is useful
-  for kernel debugging when your machine crashes very early before
-  the console code is initialized. For normal operation it is not
-  recommended because it looks ugly and doesn't cooperate with 
-  klogd/syslogd or the X server.You should normally N here, unless
-  you want to debug such a crash.
-  
-CONFIG_KALLSYMS
-  Say Y here to let the kernel print out symbolic crash information and
-  symbolic stack backtraces. This increases the size of the kernel
-  somewhat, as all symbols have to be loaded into the kernel image.
-
-CONFIG_INIT_DEBUG
-  Fill __init and __initdata at the end of boot. This is only for debugging.
-
-CONFIG_IA32_EMULATION
-  Include code to run 32bit programs under an 64bit kernel. You should likely
-  turn this on, unless you're 100% sure that you don't have any 32bit programs
-  left.
-
-CONFIG_GART_IOMMU
-  Support the K8 IOMMU. Needed to run systems with more than 4GB of memory
-  properly with 32bit devices. You should probably turn this on.
-  The iommu can be turned off at runtime with the iommu=off parameter.
-
-CONFIG_DUMMY_IOMMU
-  Don't use IOMMU code. This will cause problems when you have more than 4GB 
-  of memory and any 32bit devices. Don't turn on unless you know what you
-  are doing.
-
diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/arch/x86_64/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,749 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+# Note: ISA is disabled and will hopefully never be enabled.
+# If you managed to buy an ISA x86-64 box you'll have to fix all the
+# ISA drivers you need yourself. 
+#
+
+mainmenu "Linux Kernel Configuration"
+
+config X86_64
+	bool
+	default y
+	help
+	  Port to the x86-64 architecture. x86-64 is an 64bit extension to the
+	  classical 32bit x86 architecture. For details see http://www.x86-64.org
+
+config X86
+	bool
+	default y
+	help
+	  This is Linux's home port.  Linux was originally native to the Intel
+	  386, and runs on all the later x86 processors including the Intel
+	  486, 586, Pentiums, and various instruction-set-compatible chips by
+	  AMD, Cyrix, and others.
+
+config ISA
+	bool
+	help
+	  Find out whether you have ISA slots on your motherboard.  ISA 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 PCI, EISA, MicroChannel
+	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
+	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
+
+config SBUS
+	bool
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config X86_CMPXCHG
+	bool
+	default y
+
+config EARLY_PRINTK
+	bool
+	default y
+	help
+	  Write kernel log output directly into the VGA buffer. This is useful
+	  for kernel debugging when your machine crashes very early before
+	  the console code is initialized. For normal operation it is not
+	  recommended because it looks ugly and doesn't cooperate with 
+	  klogd/syslogd or the X server.You should normally N here, unless
+	  you want to debug such a crash.
+	  
+
+config GENERIC_ISA_DMA
+	bool
+	default y
+
+source "init/Kconfig"
+
+
+menu "Processor type and features"
+
+choice
+	prompt "Processor family"
+	default MK8
+
+config MK8
+	bool "AMD-Hammer"
+	help
+	  Support for AMD Clawhammer/Sledgehammer CPUs. Only choice for x86-64
+	  currently so you should chose this if you want a x86-64 kernel. In fact
+	  you will have no other choice than to chose this.
+
+config GENERIC_CPU
+	bool "Generic-x86-64"
+
+endchoice
+
+#
+# Define implied options from the CPU selection here
+#
+config X86_L1_CACHE_BYTES
+	int
+	default "64"
+
+config X86_L1_CACHE_SHIFT
+	int
+	default "6"
+
+config X86_TSC
+	bool
+	default y
+
+config X86_GOOD_APIC
+	bool
+	default y
+
+config X86_MSR
+	tristate "/dev/cpu/*/msr - Model-specific register support"
+	help
+	  This device gives privileged processes access to the x86
+	  Model-Specific Registers (MSRs).  It is a character device with
+	  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
+	  MSR accesses are directed to a specific CPU on multi-processor
+	  systems.
+
+config X86_CPUID
+	tristate "/dev/cpu/*/cpuid - CPU information support"
+	help
+	  This device gives processes access to the x86 CPUID instruction to
+	  be executed on a specific processor.  It is a character device
+	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
+	  /dev/cpu/31/cpuid.
+
+config MATH_EMULATION
+	bool
+
+config MCA
+	bool
+
+config EISA
+	bool
+
+config X86_IO_APIC
+	bool
+	default y
+
+config X86_LOCAL_APIC
+	bool
+	default y
+
+config MTRR
+	bool "MTRR (Memory Type Range Register) support"
+	---help---
+	  On Intel P6 family processors (Pentium Pro, Pentium II and later)
+	  the Memory Type Range Registers (MTRRs) may be used to control
+	  processor access to memory ranges. This is most useful if you have
+	  a video (VGA) card on a PCI or AGP bus. Enabling write-combining
+	  allows bus write transfers to be combined into a larger transfer
+	  before bursting over the PCI/AGP bus. This can increase performance
+	  of image write operations 2.5 times or more. Saying Y here creates a
+	  /proc/mtrr file which may be used to manipulate your processor's
+	  MTRRs. Typically the X server should use this.
+
+	  This code has a reasonably generic interface so that similar
+	  control registers on other processors can be easily supported
+	  as well:
+
+	  Saying Y here also fixes a problem with buggy SMP BIOSes which only
+	  set the MTRRs for the boot CPU and not for the secondary CPUs. This
+	  can lead to all sorts of problems, so it's good to say Y here.
+
+	  Just say Y here, all x86-64 machines support MTRRs.
+
+	  See <file:Documentation/mtrr.txt> for more information.
+
+config SMP
+	bool "Symmetric multi-processing support"
+	---help---
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all,
+	  singleprocessor machines. On a singleprocessor machine, the kernel
+	  will run faster if you say N here.
+
+	  Note that if you say Y here and choose architecture "586" or
+	  "Pentium" under "Processor family", the kernel will not work on 486
+	  architectures. Similarly, multiprocessor kernels for the "PPro"
+	  architecture may not work on all Pentium based boards.
+
+	  People using multiprocessor machines who say Y here should also say
+	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
+	  Management" code will be disabled if you say Y here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config PREEMPT
+	bool "Preemptible Kernel"
+	depends on !SMP
+	---help---
+	  This option reduces the latency of the kernel when reacting to
+	  real-time or interactive events by allowing a low priority process to
+	  be preempted even if it is in kernel mode executing a system call.
+	  This allows applications to run more reliably even when the system is
+	  under load. On contrary it may also break your drivers and add
+	  priority inheritance problems to your system. Don't select it if 
+	  you rely on a stable system or have slightly obscure hardware.
+	  It's also not very well tested on x86-64 currently.
+	  You have been warned.
+
+	  Say Y here if you are feeling brave and building a kernel for a 
+	  desktop, embedded or real-time system.  Say N if you are unsure. 
+
+config HAVE_DEC_LOCK
+	bool
+	depends on SMP
+	default y
+
+# actually 64 maximum, but you need to fix the APIC code first
+# to use clustered mode or whatever your big iron needs
+config NR_CPUS
+	int "Maximum number of CPUs (2-8)"
+	depends on SMP
+	default "8"
+	help
+	  This allows you to specify the maximum number of CPUs which this
+	  kernel will support.  The maximum supported value is 32 and the
+	  minimum value which makes sense is 2.
+
+	  This is purely to save memory - each supported CPU adds
+	  approximately eight kilobytes to the kernel image.
+
+config GART_IOMMU
+	bool "IOMMU support"
+	help
+	  Support the K8 IOMMU. Needed to run systems with more than 4GB of memory
+	  properly with 32bit devices. You should probably turn this on.
+	  The iommu can be turned off at runtime with the iommu=off parameter.
+
+config DUMMY_IOMMU
+	bool
+	depends on !GART_IOMMU
+	default y
+	help
+	  Don't use IOMMU code. This will cause problems when you have more than 4GB 
+	  of memory and any 32bit devices. Don't turn on unless you know what you
+	  are doing.
+
+config X86_MCE
+	bool
+	default y
+
+endmenu
+
+
+menu "Power management options"
+
+config PM
+	bool "Power Management support"
+	---help---
+	  "Power Management" means that parts of your computer are shut
+	  off or put into a power conserving "sleep" mode if they are not
+	  being used.  There are two competing standards for doing this: APM
+	  and ACPI.  If you want to use either one, say Y here and then also
+	  to the requisite support below.
+
+	  Power Management is most important for battery powered laptop
+	  computers; if you have a laptop, check out the Linux Laptop home
+	  page on the WWW at
+	  <http://www.cs.utexas.edu/users/kharker/linux-laptop/> and the
+	  Battery Powered Linux mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that, even if you say N here, Linux on the x86 architecture
+	  will issue the hlt instruction if nothing is to be done, thereby
+	  sending the processor to sleep and saving power.
+
+source "drivers/acpi/Kconfig"
+
+endmenu
+
+
+menu "Bus options (PCI etc.)"
+
+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.linuxdoc.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+# x86-64 doesn't support PCI BIOS access from long mode so always go direct. 
+config PCI_DIRECT
+	bool
+	depends on PCI
+	default y
+
+source "drivers/pci/Kconfig"
+
+config HOTPLUG
+	bool "Support for hot-pluggable devices"
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/hotplug/Kconfig"
+
+endmenu
+
+
+menu "Executable file formats / Emulations"
+
+config KCORE_ELF
+	bool
+	depends on PROC_FS
+	default y
+	---help---
+	  If you enabled support for /proc file system then the file
+	  /proc/kcore will contain the kernel core image. This can be used
+	  in gdb:
+
+	  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
+
+	  You have two choices here: ELF and A.OUT. Selecting ELF will make
+	  /proc/kcore appear in ELF core format as defined by the Executable
+	  and Linking Format specification. Selecting A.OUT will choose the
+	  old "a.out" format which may be necessary for some old versions
+	  of binutils or on some architectures.
+
+	  This is especially useful if you have compiled the kernel with the
+	  "-g" option to preserve debugging information. It is mainly used
+	  for examining kernel data structures on the live kernel so if you
+	  don't understand what this means or are not a kernel hacker, just
+	  leave it at its default value ELF.
+
+#tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
+config BINFMT_ELF
+	tristate "Kernel support for ELF binaries"
+	---help---
+	  ELF (Executable and Linkable Format) is a format for libraries and
+	  executables used across different architectures and operating
+	  systems. Saying Y here will enable your kernel to run ELF binaries
+	  and enlarge it by about 13 KB. ELF support under Linux has now all
+	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
+	  because it is portable (this does *not* mean that you will be able
+	  to run executables from different architectures or operating systems
+	  however) and makes building run-time libraries very easy. Many new
+	  executables are distributed solely in ELF format. You definitely
+	  want to say Y here.
+
+	  Information about ELF is contained in the ELF HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you find that after upgrading from Linux kernel 1.2 and saying Y
+	  here, you still can't run any ELF binaries (they just crash), then
+	  you'll have to install the newest ELF runtime libraries, including
+	  ld.so (check the file <file:Documentation/Changes> for location and
+	  latest version).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called binfmt_elf.o. Saying M or N here is dangerous because
+	  some crucial programs on your system might be in ELF format.
+
+config BINFMT_MISC
+	tristate "Kernel support for MISC binaries"
+	---help---
+	  If you say Y here, it will be possible to plug wrapper-driven binary
+	  formats into the kernel. You will like this especially when you use
+	  programs that need an interpreter to run like Java, Python or
+	  Emacs-Lisp. It's also useful if you often run DOS executables under
+	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
+	  registered such a binary class with the kernel, you can start one of
+	  those programs simply by typing in its name at a shell prompt; Linux
+	  will automatically feed it to the correct interpreter.
+
+	  You can do other nice things, too. Read the file
+	  <file:Documentation/binfmt_misc.txt> to learn how to use this
+	  feature, and <file:Documentation/java.txt> for information about how
+	  to include Java support.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this part of the kernel.
+
+	  You may say M here for module support and later load the module when
+	  you have use for it; the module is called binfmt_misc.o. If you
+	  don't know what to answer at this point, say Y.
+
+config IA32_EMULATION
+	bool "IA32 Emulation"
+	help
+	  Include code to run 32bit programs under an 64bit kernel. You should likely
+	  turn this on, unless you're 100% sure that you don't have any 32bit programs
+	  left.
+
+endmenu
+
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/block/Kconfig"
+
+
+menu "ATA/ATAPI/MFM/RLL support"
+
+config IDE
+	tristate "ATA/ATAPI/MFM/RLL device support"
+	---help---
+	  If you say Y here, your kernel will be able to manage low cost mass
+	  storage units such as ATA/(E)IDE and ATAPI units. The most common
+	  cases are IDE hard drives and ATAPI CD-ROM drives.
+
+	  If your system is pure SCSI and doesn't use these interfaces, you
+	  can say N here.
+
+	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
+	  for mass storage units such as hard disks. It was designed by
+	  Western Digital and Compaq Computer in 1984. It was then named
+	  ST506. Quite a number of disks use the IDE interface.
+
+	  AT Attachment (ATA) is the superset of the IDE specifications.
+	  ST506 was also called ATA-1.
+
+	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
+	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
+	  the LBA standard), more disks (4 instead of 2) and for other mass
+	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
+	  ATA-4 and provides faster (and more CPU friendly) transfer modes
+	  than previous PIO (Programmed processor Input/Output) from previous
+	  ATA/IDE standards by means of fast DMA controllers.
+
+	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
+	  CD-ROM drives, similar in many respects to the SCSI protocol.
+
+	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
+	  designed in order to prevent data corruption and disk crash by
+	  detecting pre hardware failure conditions (heat, access time, and
+	  the like...). Disks built since June 1995 may follow this standard.
+	  The kernel itself don't manage this; however there are quite a
+	  number of user programs such as smart that can query the status of
+	  SMART parameters disk.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called ide.o.
+
+	  For further information, please read <file:Documentation/ide.txt>.
+
+	  If unsure, say Y.
+
+source "drivers/ide/Kconfig"
+
+endmenu
+
+
+menu "SCSI device support"
+
+config SCSI
+	tristate "SCSI device support"
+	---help---
+	  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
+	  any other SCSI device under Linux, say Y and make sure that you know
+	  the name of your SCSI host adapter (the card inside your computer
+	  that "speaks" the SCSI protocol, also called SCSI controller),
+	  because you will be asked for it.
+
+	  You also need to say Y here if you want support for the parallel
+	  port version of the 100 MB IOMEGA ZIP drive.
+
+	  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 scsi_mod.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  However, do not compile this as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI device.
+
+source "drivers/scsi/Kconfig"
+
+endmenu
+
+source "drivers/md/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+source "drivers/message/fusion/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+#Currently not 64bit safe
+#source drivers/message/i2o/Config.in
+source "net/Kconfig"
+
+
+menu "Network device support"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+source "drivers/net/Kconfig"
+
+# ATM seems to be largely 64bit unsafe and also unmaintained - disable it for now.
+#      if [ "$CONFIG_ATM" = "y" ]; then
+#         source drivers/atm/Config.in
+#      fi
+endmenu
+
+source "net/ax25/Kconfig"
+
+source "net/irda/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+# no support for non IDE/SCSI cdroms as they were all ISA only
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+source "drivers/misc/Kconfig"
+
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+
+menu "Console drivers"
+	depends on VT
+
+config VGA_CONSOLE
+	bool "VGA text console"
+	help
+	  Saying Y here will allow you to use Linux in text mode through a
+	  display that complies with the generic VGA standard. Virtually
+	  everyone wants that.
+
+	  The program SVGATextMode can be used to utilize SVGA video cards to
+	  their full potential in text mode. Download it from
+	  <ftp://ibiblio.org/pub/Linux/utils/console/>.
+
+	  Say Y.
+
+config VIDEO_SELECT
+	bool "Video mode selection support"
+	---help---
+	  This enables support for text mode selection on kernel startup. If
+	  you want to take advantage of some high-resolution text mode your
+	  card's BIOS offers, but the traditional Linux utilities like
+	  SVGATextMode don't, you can say Y here and set the mode using the
+	  "vga=" option from your boot loader (lilo or loadlin) or set
+	  "vga=ask" which brings up a video mode menu on kernel startup. (Try
+	  "man bootparam" or see the documentation of your boot loader about
+	  how to pass options to the kernel.)
+
+	  Read the file <file:Documentation/svga.txt> for more information
+	  about the Video mode selection support. If unsure, say N.
+
+if EXPERIMENTAL
+
+config MDA_CONSOLE
+	tristate "MDA text console (dual-headed) (EXPERIMENTAL)"
+	---help---
+	  Say Y here if you have an old MDA or monochrome Hercules graphics
+	  adapter in your system acting as a second head ( = video card). You
+	  will then be able to use two monitors with your Linux system. Do not
+	  say Y here if your MDA card is the primary card in your system; the
+	  normal VGA driver will handle it.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called mdacon.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+source "drivers/video/Kconfig"
+
+endif
+
+endmenu
+
+
+menu "Sound"
+
+config SOUND
+	tristate "Sound card support"
+	---help---
+	  If you have a sound card in your computer, i.e. if it can say more
+	  than an occasional beep, say Y.  Be sure to have all the information
+	  about your sound card and its configuration down (I/O port,
+	  interrupt and DMA channel), because you will be asked for it.
+
+	  You want to read the Sound-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. General information about
+	  the modular sound system is contained in the files
+	  <file:Documentation/sound/Introduction>.  The file
+	  <file:Documentation/sound/README.OSS> contains some slightly
+	  outdated but still useful information as well.
+
+	  If you have a PnP sound card and you want to configure it at boot
+	  time using the ISA PnP tools (read
+	  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
+	  compile the sound card support as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  and load that module after the PnP configuration is finished.  To do
+	  this, say M here and read <file:Documentation/modules.txt> as well
+	  as <file:Documentation/sound/README.modules>; the module will be
+	  called soundcore.o.
+
+	  I'm told that even without a sound card, you can make your computer
+	  say more than an occasional beep, by programming the PC speaker.
+	  Kernel patches and supporting utilities to do that are in the pcsp
+	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
+
+source "sound/Kconfig"
+
+endmenu
+
+source "drivers/usb/Kconfig"
+
+source "net/bluetooth/Kconfig"
+
+
+menu "Kernel hacking"
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	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
+	  memory.
+
+#   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	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 <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.
+
+config DEBUG_SPINLOCK
+	bool "Spinlock debugging"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here and build SMP to catch missing spinlock initialization
+	  and certain other kinds of spinlock errors commonly made.  This is
+	  best used in conjunction with the NMI watchdog so that spinlock
+	  deadlocks are also debuggable.
+
+config CHECKING
+	bool "Additional run-time checks"
+	depends on DEBUG_KERNEL
+	help
+	  Enables some internal consistency checks for kernel debugging.
+	  You should normally say N.
+
+config INIT_DEBUG
+	bool "Debug __init statements"
+	depends on DEBUG_KERNEL
+	help
+	  Fill __init and __initdata at the end of boot. This is only for debugging.
+
+config KALLSYMS
+	bool "Load all symbols for debugging/kksymoops"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to let the kernel print out symbolic crash information and
+	  symbolic stack backtraces. This increases the size of the kernel
+	  somewhat, as all symbols have to be loaded into the kernel image.
+
+endmenu
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
diff -Nru a/arch/x86_64/Makefile b/arch/x86_64/Makefile
--- a/arch/x86_64/Makefile	Wed Oct 30 16:44:32 2002
+++ b/arch/x86_64/Makefile	Wed Oct 30 16:44:32 2002
@@ -40,8 +40,10 @@
 CFLAGS += -mno-red-zone
 CFLAGS += -mcmodel=kernel
 CFLAGS += -pipe
-# this makes reading assembly source easier
+# this makes reading assembly source easier, but produces worse code
+# disable for production kernel
 CFLAGS += -fno-reorder-blocks	
+# should lower this a lot and see how much .text is saves	
 CFLAGS += -finline-limit=2000
 #CFLAGS += -g
 
diff -Nru a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
--- a/arch/x86_64/boot/Makefile	Wed Oct 30 16:44:27 2002
+++ b/arch/x86_64/boot/Makefile	Wed Oct 30 16:44:27 2002
@@ -46,7 +46,7 @@
 $(obj)/bzImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
 $(obj)/bzImage: BUILDFLAGS   := -b
 
-quiet_cmd_image = BUILD   $(echo_target)
+quiet_cmd_image = BUILD   $@
 cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
 	    $(obj)/vmlinux.bin $(ROOT_DEV) > $@
 
diff -Nru a/arch/x86_64/config.in b/arch/x86_64/config.in
--- a/arch/x86_64/config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,240 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-# Note: ISA is disabled and will hopefully never be enabled.
-# If you managed to buy an ISA x86-64 box you'll have to fix all the
-# ISA drivers you need yourself. 
-#
-
-mainmenu_name "Linux Kernel Configuration"
-
-define_bool CONFIG_X86_64 y
-
-define_bool CONFIG_X86 y
-define_bool CONFIG_ISA n
-define_bool CONFIG_SBUS n
-
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_X86_CMPXCHG y
-
-define_bool CONFIG_EARLY_PRINTK y
-define_bool CONFIG_GENERIC_ISA_DMA y
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'Processor type and features'
-choice 'Processor family' \
-	"AMD-Hammer			CONFIG_MK8 \
-	 Generic-x86-64			CONFIG_GENERIC_CPU" AMD-Hammer
-	
-#
-# Define implied options from the CPU selection here
-#
-define_int CONFIG_X86_L1_CACHE_BYTES 64
-define_int CONFIG_X86_L1_CACHE_SHIFT 6
-define_bool CONFIG_X86_TSC y
-define_bool CONFIG_X86_GOOD_APIC y
-
-tristate '/dev/cpu/*/msr - Model-specific register support' CONFIG_X86_MSR
-tristate '/dev/cpu/*/cpuid - CPU information support' CONFIG_X86_CPUID
-
-define_bool CONFIG_MATH_EMULATION n
-define_bool CONFIG_MCA n
-define_bool CONFIG_EISA n
-define_bool CONFIG_X86_IO_APIC y
-define_bool CONFIG_X86_LOCAL_APIC y
-
-bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR
-bool 'Symmetric multi-processing support' CONFIG_SMP
-if [ "$CONFIG_SMP" = "n" ]; then
-   bool 'Preemptible Kernel' CONFIG_PREEMPT
-fi
-if [ "$CONFIG_SMP" = "y" ]; then
-    define_bool CONFIG_HAVE_DEC_LOCK y
-    # actually 64 maximum, but you need to fix the APIC code first
-    # to use clustered mode or whatever your big iron needs
-    int  'Maximum number of CPUs (2-8)' CONFIG_NR_CPUS 8
-fi
-
-bool 'IOMMU support' CONFIG_GART_IOMMU
-if [ "$CONFIG_GART_IOMMU" != "y" ]; then
-   define_bool CONFIG_DUMMY_IOMMU y
-fi
-
-define_bool CONFIG_X86_MCE y
-
-endmenu
-
-mainmenu_option next_comment
-
-comment 'Power management options'
-
-bool 'Power Management support' CONFIG_PM
-
-source drivers/acpi/Config.in
-
-endmenu
-
-mainmenu_option next_comment
-
-comment 'Bus options (PCI etc.)'
-
-bool 'PCI support' CONFIG_PCI
-if [ "$CONFIG_PCI" = "y" ]; then
-# x86-64 doesn't support PCI BIOS access from long mode so always go direct. 
-   define_bool CONFIG_PCI_DIRECT y 
-fi
-
-source drivers/pci/Config.in
-
-bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
-
-if [ "$CONFIG_HOTPLUG" = "y" ] ; then
-   source drivers/pcmcia/Config.in
-   source drivers/hotplug/Config.in
-else
-   define_bool CONFIG_PCMCIA n
-fi
-
-endmenu
-
-mainmenu_option next_comment
-
-comment 'Executable file formats / Emulations'
-
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   define_bool CONFIG_KCORE_ELF y
-fi
-#tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-
-bool 'IA32 Emulation' CONFIG_IA32_EMULATION
-
-
-
-endmenu
-
-source drivers/mtd/Config.in
-
-source drivers/parport/Config.in
-
-source drivers/block/Config.in
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL device support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI device support'
-
-tristate 'SCSI device support' CONFIG_SCSI
-
-if [ "$CONFIG_SCSI" != "n" ]; then
-   source drivers/scsi/Config.in
-fi
-endmenu
-
-source drivers/md/Config.in
-
-source drivers/telephony/Config.in
-
-source drivers/message/fusion/Config.in
-
-source drivers/ieee1394/Config.in
-
-#Currently not 64bit safe
-#source drivers/message/i2o/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-# ATM seems to be largely 64bit unsafe and also unmaintained - disable it for now.
-#      if [ "$CONFIG_ATM" = "y" ]; then
-#         source drivers/atm/Config.in
-#      fi
-   fi
-   endmenu
-fi
-
-source net/ax25/Config.in
-
-source net/irda/Config.in
-
-source drivers/isdn/Config.in
-
-# no support for non IDE/SCSI cdroms as they were all ISA only
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-source drivers/char/Config.in
-
-source drivers/misc/Config.in
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   bool 'VGA text console' CONFIG_VGA_CONSOLE
-   bool 'Video mode selection support' CONFIG_VIDEO_SELECT
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
-      source drivers/video/Config.in
-   fi
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-source drivers/usb/Config.in
-
-source net/bluetooth/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
-   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
-#   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
-   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   bool '  Additional run-time checks' CONFIG_CHECKING
-   bool '  Debug __init statements' CONFIG_INIT_DEBUG
-   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
-   bool '  Load all symbols for debugging/kksymoops' CONFIG_KALLSYMS
-fi
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
--- a/arch/x86_64/kernel/Makefile	Wed Oct 30 16:44:30 2002
+++ b/arch/x86_64/kernel/Makefile	Wed Oct 30 16:44:30 2002
@@ -4,7 +4,7 @@
 
 EXTRA_TARGETS 	:= head.o head64.o init_task.o
 
-export-objs     := mtrr.o x8664_ksyms.o pci-gart.o
+export-objs     := mtrr.o x8664_ksyms.o pci-gart.o pci-dma.o
 
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
diff -Nru a/arch/x86_64/kernel/acpi.c b/arch/x86_64/kernel/acpi.c
--- a/arch/x86_64/kernel/acpi.c	Wed Oct 30 16:44:23 2002
+++ b/arch/x86_64/kernel/acpi.c	Wed Oct 30 16:44:23 2002
@@ -43,6 +43,7 @@
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/io_apic.h>
+#include <asm/proto.h>
 
 extern int acpi_disabled;
 
@@ -57,15 +58,6 @@
 
 enum acpi_irq_model_id		acpi_irq_model;
 
-
-/*
- * Use reserved fixmap pages for physical-to-virtual mappings of ACPI tables.
- * Note that the same range is used for each table, so tables that need to
- * persist should be memcpy'd.
- */
-
-extern unsigned long end_pfn; 
-
 /* rely on all ACPI tables being in the direct mapping */
 char *
 __acpi_map_table (
@@ -75,7 +67,7 @@
 	if (!phys_addr || !size)
 		return NULL;
 
-	if (phys_addr < (end_pfn << PAGE_SHIFT)) 
+	if (phys_addr < (end_pfn_map << PAGE_SHIFT)) 
 		return __va(phys_addr); 
 
 	printk("acpi mapping beyond end_pfn: %lx > %lx\n", phys_addr, end_pfn<<PAGE_SHIFT);
diff -Nru a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
--- a/arch/x86_64/kernel/apic.c	Wed Oct 30 16:44:24 2002
+++ b/arch/x86_64/kernel/apic.c	Wed Oct 30 16:44:24 2002
@@ -668,7 +668,7 @@
 		apic_phys = mp_lapic_addr;
 
 	set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
-	Dprintk("mapped APIC to %08lx (%08lx)\n", APIC_BASE, apic_phys);
+	Dprintk("mapped APIC to %16lx (%16lx)\n", APIC_BASE, apic_phys);
 
 	/*
 	 * Fetch the APIC ID of the BSP in case we have a
@@ -690,7 +690,7 @@
 				ioapic_phys = __pa(ioapic_phys);
 			}
 			set_fixmap_nocache(idx, ioapic_phys);
-			Dprintk("mapped IOAPIC to %08lx (%08lx)\n",
+			Dprintk("mapped IOAPIC to %016lx (%016lx)\n",
 					__fix_to_virt(idx), ioapic_phys);
 			idx++;
 		}
diff -Nru a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
--- a/arch/x86_64/kernel/e820.c	Wed Oct 30 16:44:26 2002
+++ b/arch/x86_64/kernel/e820.c	Wed Oct 30 16:44:26 2002
@@ -22,6 +22,18 @@
 extern unsigned long table_start, table_end;
 extern char _end[];
 
+/* 
+ * end_pfn only includes RAM, while end_pfn_map includes all e820 entries.
+ * The direct mapping extends to end_pfn_map, so that we can directly access
+ * ACPI and other tables without having to play with fixmaps.
+ */ 
+unsigned long end_pfn_map; 
+
+/* 
+ * Last pfn which the user wants to use.
+ */
+unsigned long end_user_pfn = MAXMEM>>PAGE_SHIFT;  
+
 extern struct resource code_resource, data_resource, vram_resource;
 
 /* Check for some hardcoded bad areas that early boot is not allowed to touch */ 
@@ -137,21 +149,32 @@
 {
 	int i;
 	end_pfn = 0;
+	
 	for (i = 0; i < e820.nr_map; i++) {
 		struct e820entry *ei = &e820.map[i]; 
 		unsigned long start, end;
 
-		/* count all types of areas for now to map ACPI easily */
 		start = round_up(ei->addr, PAGE_SIZE); 
 		end = round_down(ei->addr + ei->size, PAGE_SIZE); 
 		if (start >= end)
 			continue;
+		if (ei->type == E820_RAM) { 
 		if (end > end_pfn<<PAGE_SHIFT)
 			end_pfn = end>>PAGE_SHIFT;
+		} else { 
+			if (end > end_pfn_map<<PAGE_SHIFT) 
+				end_pfn_map = end>>PAGE_SHIFT;
+		} 
 	}
 
-	if (end_pfn > MAXMEM >> PAGE_SHIFT)
-		end_pfn = MAXMEM >> PAGE_SHIFT;
+	if (end_pfn > end_pfn_map) 
+		end_pfn_map = end_pfn;
+	if (end_pfn_map > MAXMEM>>PAGE_SHIFT)
+		end_pfn_map = MAXMEM>>PAGE_SHIFT;
+	if (end_pfn > end_user_pfn)
+		end_pfn = end_user_pfn;
+	if (end_pfn > end_pfn_map) 
+		end_pfn = end_pfn_map; 
 }
 
 /* 
@@ -482,46 +505,23 @@
 	e820_print_map(who);
 }
 
-static int usermem __initdata; 
-
-void __init parse_memopt(char *p) 
+void __init parse_memopt(char *p, char **from) 
 { 
-	if (!strncmp(p,"exactmap",8)) { 
-		e820.nr_map = 0;
-		usermem = 1; 
-	} else { 
-	       	/* If the user specifies memory size, we
-		 * blow away any automatically generated
-		 * size
-		 */
-		unsigned long long start_at, mem_size;
-		
-		if (usermem == 0) {
-			/* first time in: zap the whitelist
-			 * and reinitialize it with the
-			 * standard low-memory region.
+	/*
+	 * mem=XXX[kKmM] limits kernel memory to XXX+1MB
+	 *
+	 * It would be more logical to count from 0 instead of from
+	 * HIGH_MEMORY, but we keep that for now for i386 compatibility. 
+	 *	
+	 * No support for custom mapping like i386.  The reason is
+	 * that we need to read the e820 map anyways to handle the
+	 * ACPI mappings in the direct map.  Also on x86-64 there
+	 * should be always a good e820 map. This is only an upper
+	 * limit, you cannot force usage of memory not in e820.
+	 *
+	 * -AK
 			 */
-			e820.nr_map = 0;
-			usermem = 1;
-			add_memory_region(0, LOWMEMSIZE(), E820_RAM);
-		}
-		mem_size = memparse(p, &p);
-		if (*p == '@')
-			start_at = memparse(p+1, &p);
-		else {
-			start_at = HIGH_MEMORY;
-			mem_size -= HIGH_MEMORY;
-			usermem=0;
-		}
-		add_memory_region(start_at, mem_size, E820_RAM);
-	}
-		
+	end_user_pfn = memparse(p, from) + HIGH_MEMORY;
+	end_user_pfn >>= PAGE_SHIFT;	
 } 
 
-void __init print_user_map(void)
-{ 
-	if (usermem) {
-		printk(KERN_INFO "user-defined physical RAM map:\n");
-		e820_print_map("user");
-	}
-}
diff -Nru a/arch/x86_64/kernel/ioport.c b/arch/x86_64/kernel/ioport.c
--- a/arch/x86_64/kernel/ioport.c	Wed Oct 30 16:44:26 2002
+++ b/arch/x86_64/kernel/ioport.c	Wed Oct 30 16:44:26 2002
@@ -64,7 +64,6 @@
 	if (turn_on && !capable(CAP_SYS_RAWIO))
 		return -EPERM;
 
-	tss  = init_tss + get_cpu();
 	if (!t->io_bitmap_ptr) { 
 		t->io_bitmap_ptr = kmalloc((IO_BITMAP_SIZE+1)*4, GFP_KERNEL);
 		if (!t->io_bitmap_ptr) { 
@@ -72,8 +71,11 @@
 			goto out;
 		}
 		memset(t->io_bitmap_ptr,0xff,(IO_BITMAP_SIZE+1)*4);
+		tss  = init_tss + get_cpu();
 		tss->io_map_base = IO_BITMAP_OFFSET;
+		put_cpu(); 
 	}
+	tss = init_tss + get_cpu();
 
 	/*
 	 * do it in the per-thread copy and in the TSS ...
diff -Nru a/arch/x86_64/kernel/mtrr.c b/arch/x86_64/kernel/mtrr.c
--- a/arch/x86_64/kernel/mtrr.c	Wed Oct 30 16:44:27 2002
+++ b/arch/x86_64/kernel/mtrr.c	Wed Oct 30 16:44:27 2002
@@ -28,6 +28,7 @@
 	v2.02  July 2002  Dave Jones <davej@suse.de>
 	  Fix gentry inconsistencies between kernel/userspace.
 	  More casts to clean up warnings.
+	Andi Kleen - rework initialization.
 */
 
 #include <linux/types.h>
@@ -609,17 +610,6 @@
 		return -EINVAL;
 	}
 
-#if defined(__x86_64__) && defined(CONFIG_AGP) 
-/*	{
-	agp_kern_info info; 
-	if (type != MTRR_TYPE_UNCACHABLE && agp_copy_info(&info) >= 0 && 
-	    base<<PAGE_SHIFT >= info.aper_base && 
-            (base<<PAGE_SHIFT)+(size<<PAGE_SHIFT) >= 
-			info.aper_base+info.aper_size*1024*1024)
-		printk(KERN_INFO "%s[%d] setting conflicting mtrr into agp aperture\n",current->comm,current->pid); 
-	}*/
-#endif
-
 	/*  Check upper bits of base and last are equal and lower bits are 0
 	   for base and 1 for last  */
 	last = base + size - 1;
@@ -646,7 +636,7 @@
 	}
 
 	if (base & (size_or_mask>>PAGE_SHIFT)) {
-		printk (KERN_WARNING "mtrr: base(%Lx) exceeds the MTRR width(%Lx)\n",
+		printk (KERN_WARNING "mtrr: base(%lx) exceeds the MTRR width(%lx)\n",
 				(unsigned long) base,
 				(unsigned long) (size_or_mask>>PAGE_SHIFT));
 		return -EINVAL;
@@ -1226,12 +1216,13 @@
 EXPORT_SYMBOL (mtrr_add);
 EXPORT_SYMBOL (mtrr_del);
 
-
 static void __init mtrr_setup (void)
 {
-	printk ("mtrr: v%s)\n", MTRR_VERSION);
+	/* If you want to use other vendors please port over the modular
+	   framework from i386 first. */
+	if (!cpu_has_mtrr || boot_cpu_data.x86_vendor != X86_VENDOR_AMD) 
+		return; 
 
-	if (cpu_has_mtrr) { 
 		 /* Query the width (in bits) of the physical
 		   addressable memory on the Hammer family. */
 		if ((cpuid_eax (0x80000000) >= 0x80000008)) {
@@ -1244,8 +1235,6 @@
 			 */
 			size_and_mask = (~size_or_mask) & 0x000ffffffffff000L;
 	}
-		printk ("mtrr: detected mtrr type: x86-64\n");
-    }
 }
 
 #ifdef CONFIG_SMP
@@ -1253,48 +1242,42 @@
 static volatile u32 smp_changes_mask __initdata = 0;
 static struct mtrr_state smp_mtrr_state __initdata = { 0, 0 };
 
-void __init mtrr_init_boot_cpu (void)
+#endif	/*  CONFIG_SMP  */
+
+void mtrr_init_cpu(int cpu)
 {
+#ifndef CONFIG_SMP
+	if (cpu == 0) 
+		mtrr_setup();
+#else
+	if (cpu == 0) { 
 	mtrr_setup();
 	get_mtrr_state (&smp_mtrr_state);
-}
-
-
-void __init mtrr_init_secondary_cpu (void)
-{
+	} else { 
 	u64 mask;
 	int count;
 	struct set_mtrr_context ctxt;
 
-	/* Note that this is not ideal, since the cache is only flushed/disabled
-	   for this CPU while the MTRRs are changed, but changing this requires
-	   more invasive changes to the way the kernel boots  */
+		/* Note that this is not ideal, since the cache is
+		   only flushed/disabled for this CPU while the MTRRs
+		   are changed, but changing this requires more
+		   invasive changes to the way the kernel boots  */
 	set_mtrr_prepare (&ctxt);
 	mask = set_mtrr_state (&smp_mtrr_state, &ctxt);
 	set_mtrr_done (&ctxt);
 
 	/*  Use the atomic bitops to update the global mask  */
-	for (count = 0; count < sizeof mask * 8; ++count) {
-		if (mask & 0x01)
+		for (count = 0; count < (sizeof mask) * 8; ++count) {
+			if (mask & 1)
 			set_bit (count, &smp_changes_mask);
 		mask >>= 1;
 	}
+	} 
+#endif
 }
 
-#endif	/*  CONFIG_SMP  */
-
-
-int __init mtrr_init (void)
+static int __init mtrr_init (void)
 {
-#ifdef CONFIG_SMP
-	/* mtrr_setup() should already have been called from mtrr_init_boot_cpu() */
-
-	finalize_mtrr_state (&smp_mtrr_state);
-	mtrr_state_warn (smp_changes_mask);
-#else
-	mtrr_setup();
-#endif
-
 #ifdef CONFIG_PROC_FS
 	proc_root_mtrr = create_proc_entry ("mtrr", S_IWUSR | S_IRUGO, &proc_root);
 	if (proc_root_mtrr) {
@@ -1308,5 +1291,13 @@
 				&mtrr_fops, NULL);
 #endif
 	init_table ();
+
+#ifdef CONFIG_SMP
+	finalize_mtrr_state (&smp_mtrr_state);
+	mtrr_state_warn (smp_changes_mask);
+#endif
+
 	return 0;
 }
+
+__initcall(mtrr_init);
diff -Nru a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
--- a/arch/x86_64/kernel/nmi.c	Wed Oct 30 16:44:28 2002
+++ b/arch/x86_64/kernel/nmi.c	Wed Oct 30 16:44:28 2002
@@ -25,6 +25,8 @@
 #include <asm/mpspec.h>
 #include <asm/nmi.h>
 
+extern void default_do_nmi(struct pt_regs *);
+
 unsigned int nmi_watchdog = NMI_LOCAL_APIC;
 static unsigned int nmi_hz = HZ;
 unsigned int nmi_perfctr_msr;	/* the MSR to reset in NMI handler */
diff -Nru a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
--- a/arch/x86_64/kernel/pci-dma.c	Wed Oct 30 16:44:33 2002
+++ b/arch/x86_64/kernel/pci-dma.c	Wed Oct 30 16:44:33 2002
@@ -6,6 +6,7 @@
 #include <linux/mm.h>
 #include <linux/string.h>
 #include <linux/pci.h>
+#include <linux/module.h>
 #include <asm/io.h>
 
 dma_addr_t bad_dma_address = -1UL; 
@@ -32,27 +33,24 @@
 
 	BUG_ON(direction == PCI_DMA_NONE);
  
- 	/*
- 	 *
- 	 */
  	for (i = 0; i < nents; i++ ) {
 		struct scatterlist *s = &sg[i];
- 		if (s->page) { 
+
+		BUG_ON(!s->page); 
+
 			s->dma_address = pci_map_page(hwdev, s->page, s->offset, 
 						      s->length, direction); 
-		} else
-			BUG(); 
-
-		if (unlikely(s->dma_address == bad_dma_address))
-			goto error; 
-	}
-	return nents;
 
- error: 
+		if (unlikely(s->dma_address == bad_dma_address)) {
 	pci_unmap_sg(hwdev, sg, i, direction); 
 	return 0; 
+		}
+	}
+	return nents;
 }
 
+EXPORT_SYMBOL(pci_map_sg);
+
 /* Unmap a set of streaming mode DMA translations.
  * Again, cpu read rules concerning calls here are the same as for
  * pci_unmap_single() above.
@@ -68,3 +66,5 @@
 		pci_unmap_single(dev, s->dma_address, s->length, dir); 
 	} 
 }
+
+EXPORT_SYMBOL(pci_unmap_sg);
diff -Nru a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
--- a/arch/x86_64/kernel/pci-gart.c	Wed Oct 30 16:44:28 2002
+++ b/arch/x86_64/kernel/pci-gart.c	Wed Oct 30 16:44:28 2002
@@ -62,7 +62,7 @@
 #define GPTE_VALID    1
 #define GPTE_COHERENT 2
 #define GPTE_ENCODE(x,flag) (((x) & 0xfffffff0) | ((x) >> 28) | GPTE_VALID | (flag))
-#define GPTE_DECODE(x) (((x) & 0xfffff000) | (((x) & 0xff0) << 28))
+#define GPTE_DECODE(x) (((x) & 0xfffff000) | (((u64)(x) & 0xff0) << 28))
 
 #define for_all_nb(dev) \
 	pci_for_each_dev(dev) \
@@ -524,7 +524,7 @@
    leak  turn on simple iommu leak tracing (only when CONFIG_IOMMU_LEAK is on)
    memaper[=order] allocate an own aperture over RAM with size 32MB^order.  
 */
-__init int iommu_setup(char *opt) 
+__init int iommu_setup(char *opt, char **end) 
 { 
     int arg;
     char *p = opt;
@@ -551,10 +551,11 @@
 	    if (isdigit(*p) && get_option(&p, &arg)) 
 		    iommu_size = arg;
 	    do {
-		    if (*p == ' ' || *p == 0) 
+		    if (*p == ' ' || *p == 0) { 
+			    *end = p; 
 			    return 0; 
+		    }
 	    } while (*p++ != ','); 
     }
-    return 1;
 } 
 
diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
--- a/arch/x86_64/kernel/setup.c	Wed Oct 30 16:44:19 2002
+++ b/arch/x86_64/kernel/setup.c	Wed Oct 30 16:44:19 2002
@@ -37,6 +37,7 @@
 #include <linux/console.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/pci.h>
 #include <asm/mtrr.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -196,11 +197,11 @@
 			acpi_disabled = 1;
 
 		if (!memcmp(from, "mem=", 4))
-			parse_memopt(from+4); 
+			parse_memopt(from+4, &from); 
 
 #ifdef CONFIG_GART_IOMMU 
 		if (!memcmp(from,"iommu=",6)) { 
-			iommu_setup(from+6); 
+			iommu_setup(from+6, &from); 
 		}
 #endif
 
@@ -214,7 +215,6 @@
 	}
 	*to = '\0';
 	*cmdline_p = command_line;
-	print_user_map(); 
 }
 
 #ifndef CONFIG_DISCONTIGMEM
diff -Nru a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
--- a/arch/x86_64/kernel/setup64.c	Wed Oct 30 16:44:26 2002
+++ b/arch/x86_64/kernel/setup64.c	Wed Oct 30 16:44:26 2002
@@ -21,6 +21,7 @@
 #include <asm/smp.h>
 #include <asm/i387.h>
 #include <asm/percpu.h>
+#include <asm/mtrr.h>
 
 char x86_boot_params[2048] __initdata = {0,};
 
diff -Nru a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c
--- a/arch/x86_64/kernel/signal.c	Wed Oct 30 16:44:24 2002
+++ b/arch/x86_64/kernel/signal.c	Wed Oct 30 16:44:24 2002
@@ -238,7 +238,7 @@
 
 	/* This is the X/Open sanctioned signal stack switching.  */
 	if (ka->sa.sa_flags & SA_ONSTACK) {
-		if (! sas_ss_flags(rsp) == 0)
+		if (sas_ss_flags(rsp) == 0)
 			rsp = current->sas_ss_sp + current->sas_ss_size;
 	}
 
diff -Nru a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
--- a/arch/x86_64/kernel/smpboot.c	Wed Oct 30 16:44:36 2002
+++ b/arch/x86_64/kernel/smpboot.c	Wed Oct 30 16:44:36 2002
@@ -327,7 +327,7 @@
 	/*
 	 * Must be done before calibration delay is computed
 	 */
-	mtrr_init_secondary_cpu ();
+	mtrr_init_cpu (cpuid);
 #endif
 	/*
 	 * Get our bogomips.
@@ -784,10 +784,6 @@
 {
 	int apicid, cpu;
 
-#ifdef CONFIG_MTRR
-	/*  Must be done before other processors booted  */
-	mtrr_init_boot_cpu ();
-#endif
 	/*
 	 * Initialize the logical to physical CPU number mapping
 	 * and the per-CPU profiling counter/multiplier
diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
--- a/arch/x86_64/kernel/traps.c	Wed Oct 30 16:44:17 2002
+++ b/arch/x86_64/kernel/traps.c	Wed Oct 30 16:44:17 2002
@@ -173,7 +173,7 @@
 	int i;
 
 	printk("\nCall Trace:");
-	i = 0; 
+	i = 12; 
 	
 	estack_end = in_exception_stack(cpu, (unsigned long)stack); 
 	if (estack_end) { 
diff -Nru a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c
--- a/arch/x86_64/kernel/x8664_ksyms.c	Wed Oct 30 16:44:24 2002
+++ b/arch/x86_64/kernel/x8664_ksyms.c	Wed Oct 30 16:44:24 2002
@@ -28,6 +28,7 @@
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/kdebug.h>
+#include <asm/unistd.h>
 
 extern spinlock_t rtc_lock;
 
@@ -145,6 +146,7 @@
 #undef strcmp 
 #undef bcopy
 #undef strcpy 
+#undef strcat
 
 extern void * memset(void *,int,__kernel_size_t);
 extern size_t strlen(const char *);
@@ -153,6 +155,10 @@
 extern char * strcpy(char * dest,const char *src);
 extern int strcmp(const char * cs,const char * ct);
 extern void *memchr(const void *s, int c, size_t n);
+extern void * memcpy(void *,const void *,__kernel_size_t);
+extern void * __memcpy(void *,const void *,__kernel_size_t);
+extern char * strcat(char *, const char *);
+
 EXPORT_SYMBOL_NOVERS(memset);
 EXPORT_SYMBOL_NOVERS(strlen);
 EXPORT_SYMBOL_NOVERS(memmove);
@@ -168,6 +174,15 @@
 EXPORT_SYMBOL_NOVERS(strnlen);
 EXPORT_SYMBOL_NOVERS(memscan);
 EXPORT_SYMBOL_NOVERS(bcopy);
+EXPORT_SYMBOL_NOVERS(memcpy);
+EXPORT_SYMBOL_NOVERS(__memcpy);
+
+/* syscall export needed for misdesigned sound drivers. */
+extern ssize_t sys_read(unsigned int fd, char * buf, size_t count);
+extern off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin);
+EXPORT_SYMBOL(sys_read);
+EXPORT_SYMBOL(sys_lseek);
+EXPORT_SYMBOL(sys_open);
 
 EXPORT_SYMBOL(empty_zero_page);
 
diff -Nru a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c	Wed Oct 30 16:44:24 2002
+++ b/arch/x86_64/mm/init.c	Wed Oct 30 16:44:24 2002
@@ -36,6 +36,7 @@
 #include <asm/apic.h>
 #include <asm/tlb.h>
 #include <asm/mmu_context.h>
+#include <asm/proto.h>
 
 unsigned long start_pfn, end_pfn;
 
@@ -171,7 +172,7 @@
 	unsigned long pfn = start_pfn++, paddr; 
 	void *adr;
 
-	if (pfn >= end_pfn) 
+	if (pfn >= end_pfn_map) 
 		panic("alloc_low_page: ran out of memory"); 
 	for (i = 0; temp_mappings[i].allocated; i++) {
 		if (!temp_mappings[i].pmd) 
@@ -239,7 +240,7 @@
 	unsigned long end;
 	unsigned long next; 
 
-	end = PAGE_OFFSET + (end_pfn * PAGE_SIZE); 
+	end = PAGE_OFFSET + (end_pfn_map * PAGE_SIZE); 
 	for (adr = PAGE_OFFSET; adr < end; adr = next) { 
 		int map;
 		unsigned long pgd_phys; 
diff -Nru a/arch/x86_64/pci/acpi.c b/arch/x86_64/pci/acpi.c
--- a/arch/x86_64/pci/acpi.c	Wed Oct 30 16:44:37 2002
+++ b/arch/x86_64/pci/acpi.c	Wed Oct 30 16:44:37 2002
@@ -17,6 +17,8 @@
 		} else
 			printk(KERN_WARNING "PCI: Invalid ACPI-PCI IRQ routing table\n");
 
+		/* still scan manually in case ACPI forgot some bus */
+		pcibios_fixup_peer_bridges(); 
 	}
 
 	return 0;
diff -Nru a/arch/x86_64/pci/common.c b/arch/x86_64/pci/common.c
--- a/arch/x86_64/pci/common.c	Wed Oct 30 16:44:24 2002
+++ b/arch/x86_64/pci/common.c	Wed Oct 30 16:44:24 2002
@@ -22,7 +22,7 @@
 
 unsigned int pci_probe = PCI_PROBE_CONF1 | PCI_PROBE_CONF2;
 
-int pcibios_last_bus = 0xfe; /* XXX */
+int pcibios_last_bus = 0xff; /* XXX */
 struct pci_bus *pci_root_bus = NULL;
 struct pci_ops *pci_root_ops = NULL;
 
diff -Nru a/arch/x86_64/pci/irq.c b/arch/x86_64/pci/irq.c
--- a/arch/x86_64/pci/irq.c	Wed Oct 30 16:44:29 2002
+++ b/arch/x86_64/pci/irq.c	Wed Oct 30 16:44:29 2002
@@ -296,7 +296,6 @@
 	return 1;
 }
 
-#if 0 /* kept as reference */
 /* Support for AMD756 PCI IRQ Routing
  * Jhon H. Caicedo <jhcaiced@osso.org.co>
  * Jun/21/2001 0.2.0 Release, fixed to use "nybble" functions... (jhcaiced)
@@ -304,8 +303,6 @@
  * The AMD756 pirq rules are nibble-based
  * offset 0x56 0-3 PIRQA  4-7  PIRQB
  * offset 0x57 0-3 PIRQC  4-7  PIRQD
- *
- * AMD8111 is similar NIY.
  */
 static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
 {
@@ -315,14 +312,14 @@
 	{
 		irq = read_config_nybble(router, 0x56, pirq - 1);
 	}
-	printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d get irq : %2d\n",
+	printk(KERN_INFO "AMD: dev %04x:%04x, router pirq : %d get irq : %2d\n",
 		dev->vendor, dev->device, pirq, irq);
 	return irq;
 }
 
 static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
 {
-	printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d SET irq : %2d\n", 
+	printk(KERN_INFO "AMD: dev %04x:%04x, router pirq : %d SET irq : %2d\n", 
 		dev->vendor, dev->device, pirq, irq);
 	if (pirq <= 4)
 	{
@@ -330,13 +327,25 @@
 	}
 	return 1;
 }
-#endif
 
 static struct irq_router pirq_routers[] = {
+#if 0 /* all these do not exist on Hammer currently, but keep one example
+	 for each. All these vendors have announced K8 chipsets, so we'll
+	 eventually need a router for them. Luckily they tend to use the
+	 same ones, so with luck just enabling the existing ones will work
+	 when you know the final PCI ids.  */ 
+
+	{ "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, pirq_ali_get, pirq_ali_set },
+
 	{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, pirq_via_get, pirq_via_set },
-	{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, pirq_via_get, pirq_via_set },
-	{ "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, pirq_via_get, pirq_via_set },
+
 	{ "SIS", PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, pirq_sis_get, pirq_sis_set },
+
+#endif
+
+	{ "AMD756 VIPER", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B,
+		pirq_amd756_get, pirq_amd756_set },
+
 	{ "default", 0, 0, NULL, NULL }
 };
 
@@ -348,14 +357,6 @@
 	struct irq_routing_table *rt = pirq_table;
 	struct irq_router *r;
 
-#ifdef CONFIG_PCI_BIOS
-	if (!rt->signature) {
-		printk(KERN_INFO "PCI: Using BIOS for IRQ routing\n");
-		pirq_router = &pirq_bios_router;
-		return;
-	}
-#endif
-
 	DBG("PCI: Attempting to find IRQ router for %04x:%04x\n",
 	    rt->rtr_vendor, rt->rtr_device);
 
@@ -528,38 +529,7 @@
 	return 1;
 }
 
-static int __init pcibios_irq_init(void)
-{
-	DBG("PCI: IRQ init\n");
-
-	if (pcibios_enable_irq)
-		return 0;
-
-	pirq_table = pirq_find_routing_table();
-
-	if (pirq_table) {
-		pirq_peer_trick();
-		pirq_find_router();
-		if (pirq_table->exclusive_irqs) {
-			int i;
-			for (i=0; i<16; i++)
-				if (!(pirq_table->exclusive_irqs & (1 << i)))
-					pirq_penalty[i] += 100;
-		}
-		/* If we're using the I/O APIC, avoid using the PCI IRQ routing table */
-		if (io_apic_assign_pci_irqs)
-			pirq_table = NULL;
-	}
-
-	pcibios_enable_irq = pirq_enable_irq;
-
-	pcibios_fixup_irqs();
-	return 0;
-}
-
-subsys_initcall(pcibios_irq_init);
-
-void __init pcibios_fixup_irqs(void)
+static void __init pcibios_fixup_irqs(void)
 {
 	struct pci_dev *dev;
 	u8 pin;
@@ -625,6 +595,38 @@
 	}
 }
 
+static int __init pcibios_irq_init(void)
+{
+	DBG("PCI: IRQ init\n");
+
+	if (pcibios_enable_irq)
+		return 0;
+
+	pirq_table = pirq_find_routing_table();
+
+	if (pirq_table) {
+		pirq_peer_trick();
+		pirq_find_router();
+		if (pirq_table->exclusive_irqs) {
+			int i;
+			for (i=0; i<16; i++)
+				if (!(pirq_table->exclusive_irqs & (1 << i)))
+					pirq_penalty[i] += 100;
+		}
+		/* If we're using the I/O APIC, avoid using the PCI IRQ routing table */
+		if (io_apic_assign_pci_irqs)
+			pirq_table = NULL;
+	}
+
+	pcibios_enable_irq = pirq_enable_irq;
+
+	pcibios_fixup_irqs();
+	return 0;
+}
+
+subsys_initcall(pcibios_irq_init);
+
+
 void pcibios_penalize_isa_irq(int irq)
 {
 	/*
@@ -640,12 +642,8 @@
 	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
 	if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
 		char *msg;
-		if (io_apic_assign_pci_irqs)
-			msg = " Probably buggy MP table.";
-		else
-			msg = "";
-		printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
-		       'A' + pin - 1, dev->slot_name, msg);
+		printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.\n",
+		       'A' + pin - 1, dev->slot_name);
 	}
 
 	return 0;
diff -Nru a/arch/x86_64/pci/legacy.c b/arch/x86_64/pci/legacy.c
--- a/arch/x86_64/pci/legacy.c	Wed Oct 30 16:44:17 2002
+++ b/arch/x86_64/pci/legacy.c	Wed Oct 30 16:44:17 2002
@@ -9,14 +9,14 @@
  * Discover remaining PCI buses in case there are peer host bridges.
  * We use the number of last PCI bus provided by the PCI BIOS.
  */
-static void __devinit pcibios_fixup_peer_bridges(void)
+void __devinit pcibios_fixup_peer_bridges(void)
 {
 	int n;
 	struct pci_bus bus;
 	struct pci_dev dev;
 	u16 l;
 
-	if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff)
+	if (pcibios_last_bus <= 0 || pcibios_last_bus > 0xff)
 		return;
 	DBG("PCI: Peer bridge fixup\n");
 	for (n=0; n <= pcibios_last_bus; n++) {
diff -Nru a/arch/x86_64/pci/pci.h b/arch/x86_64/pci/pci.h
--- a/arch/x86_64/pci/pci.h	Wed Oct 30 16:44:27 2002
+++ b/arch/x86_64/pci/pci.h	Wed Oct 30 16:44:27 2002
@@ -71,3 +71,6 @@
 int pirq_enable_irq(struct pci_dev *dev);
 
 extern int (*pcibios_enable_irq)(struct pci_dev *dev);
+
+/* legacy.c */
+extern void pcibios_fixup_peer_bridges(void);
diff -Nru a/arch/x86_64/vmlinux.lds.S b/arch/x86_64/vmlinux.lds.S
--- a/arch/x86_64/vmlinux.lds.S	Wed Oct 30 16:44:19 2002
+++ b/arch/x86_64/vmlinux.lds.S	Wed Oct 30 16:44:19 2002
@@ -81,11 +81,11 @@
 
   . = ALIGN(4096);		/* Init code and data */
   __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
+  .init.text : { *(.init.text) }
+  .init.data : { *(.init.data) }
   . = ALIGN(16);
   __setup_start = .;
-  .setup.init : { *(.setup.init) }
+  .init.setup : { *(.init.setup) }
   __setup_end = .;
   __initcall_start = .;
   .initcall.init : {
@@ -109,8 +109,10 @@
 
   /* Sections to be discarded */
   /DISCARD/ : {
-	*(.data.exit)
+	*(.exit.data)
+	*(.exit.text)
 	*(.exitcall.exit)
+	*(.eh_frame)
 	}
 
   /* DWARF 2 */
diff -Nru a/crypto/Kconfig b/crypto/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,44 @@
+#
+# Cryptographic API Configuration
+#
+
+menu "Cryptographic options"
+
+config CRYPTO
+	bool "Cryptographic API"
+	help
+	  This option provides the core Cryptographic API.
+
+config CRYPTO_MD4
+	tristate "MD4 digest algorithm"
+	depends on CRYPTO
+	help
+	  MD4 message digest algorithm (RFC1320), including HMAC (RFC2104).
+	  
+
+config CRYPTO_MD5
+	tristate "MD5 digest algorithm"
+	depends on CRYPTO
+	help
+	  MD5 message digest algorithm (RFC1321), including HMAC (RFC2104, RFC2403).
+
+config CRYPTO_SHA1
+	tristate "SHA-1 digest algorithm"
+	depends on CRYPTO
+	help
+	  SHA-1 secure hash standard (FIPS 180-1), including HMAC (RFC2104, RFC2404).
+
+config CRYPTO_DES
+	tristate "DES and Triple DES EDE cipher algorithms"
+	depends on CRYPTO
+	help
+	  DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
+
+config CRYPTO_TEST
+	tristate "Testing module"
+	depends on CRYPTO
+	help
+	  Quick & dirty crypto test module.
+
+endmenu
+
diff -Nru a/crypto/Makefile b/crypto/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/Makefile	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,17 @@
+#
+# Cryptographic API
+#
+
+export-objs := api.o
+
+obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o
+obj-$(CONFIG_KMOD) += autoload.o
+
+obj-$(CONFIG_CRYPTO_MD4) += md4.o
+obj-$(CONFIG_CRYPTO_MD5) += md5.o
+obj-$(CONFIG_CRYPTO_SHA1) += sha1.o
+obj-$(CONFIG_CRYPTO_DES) += des.o
+
+obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
+
+include $(TOPDIR)/Rules.make
diff -Nru a/crypto/api.c b/crypto/api.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/api.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,298 @@
+/*
+ * Scatterlist Cryptographic API.
+ *
+ * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ * Copyright (c) 2002 David S. Miller (davem@redhat.com)
+ *
+ * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
+ * and Nettle, by Niels Möller.
+ *
+ * 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/crypto.h>
+#include <linux/rwsem.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include "internal.h"
+
+static LIST_HEAD(crypto_alg_list);
+static DECLARE_RWSEM(crypto_alg_sem);
+
+static inline int crypto_alg_get(struct crypto_alg *alg)
+{
+	return try_inc_mod_count(alg->cra_module);
+}
+
+static inline void crypto_alg_put(struct crypto_alg *alg)
+{
+	if (alg->cra_module)
+		__MOD_DEC_USE_COUNT(alg->cra_module);
+}
+
+struct crypto_alg *crypto_alg_lookup(const char *name)
+{
+	struct crypto_alg *q, *alg = NULL;
+	
+	down_read(&crypto_alg_sem);
+	
+	list_for_each_entry(q, &crypto_alg_list, cra_list) {
+		if (!(strcmp(q->cra_name, name))) {
+			if (crypto_alg_get(q))
+				alg = q;
+			break;
+		}
+	}
+	
+	up_read(&crypto_alg_sem);
+	return alg;
+}
+
+static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags)
+{
+	tfm->crt_flags = 0;
+	
+	switch (crypto_tfm_alg_type(tfm)) {
+	case CRYPTO_ALG_TYPE_CIPHER:
+		return crypto_init_cipher_flags(tfm, flags);
+		
+	case CRYPTO_ALG_TYPE_DIGEST:
+		return crypto_init_digest_flags(tfm, flags);
+		
+	case CRYPTO_ALG_TYPE_COMP:
+		return crypto_init_compress_flags(tfm, flags);
+	
+	default:
+		BUG();
+	}
+	
+	return -EINVAL;
+}
+
+static void crypto_init_ops(struct crypto_tfm *tfm)
+{
+	switch (crypto_tfm_alg_type(tfm)) {
+	case CRYPTO_ALG_TYPE_CIPHER:
+		crypto_init_cipher_ops(tfm);
+		break;
+		
+	case CRYPTO_ALG_TYPE_DIGEST:
+		crypto_init_digest_ops(tfm);
+		break;
+		
+	case CRYPTO_ALG_TYPE_COMP:
+		crypto_init_compress_ops(tfm);
+		break;
+	
+	default:
+		BUG();
+		
+	}
+}
+
+struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
+{
+	struct crypto_tfm *tfm = NULL;
+	struct crypto_alg *alg;
+
+	alg = crypto_alg_lookup(name);
+#ifdef CONFIG_KMOD
+	if (alg == NULL) {
+		crypto_alg_autoload(name);
+		alg = crypto_alg_lookup(name);
+	}
+#endif
+	if (alg == NULL)
+		goto out;
+	
+	tfm = kmalloc(sizeof(*tfm), GFP_KERNEL);
+	if (tfm == NULL)
+		goto out_put;
+
+	if (alg->cra_ctxsize) {
+		tfm->crt_ctx = kmalloc(alg->cra_ctxsize, GFP_KERNEL);
+		if (tfm->crt_ctx == NULL)
+			goto out_free_tfm;
+	}
+
+	tfm->__crt_alg = alg;
+	
+	if (crypto_init_flags(tfm, flags))
+		goto out_free_ctx;
+		
+	crypto_init_ops(tfm);
+	
+	goto out;
+
+out_free_ctx:
+	if (tfm->__crt_alg->cra_ctxsize)
+		kfree(tfm->crt_ctx);
+out_free_tfm:
+	kfree(tfm);
+	tfm = NULL;
+out_put:
+	crypto_alg_put(alg);
+out:
+	return tfm;
+}
+
+void crypto_free_tfm(struct crypto_tfm *tfm)
+{
+	if (tfm->__crt_alg->cra_ctxsize)
+		kfree(tfm->crt_ctx);
+		
+	if (crypto_tfm_alg_type(tfm) == CRYPTO_ALG_TYPE_CIPHER)
+		if (tfm->crt_cipher.cit_iv)
+			kfree(tfm->crt_cipher.cit_iv);
+	
+	crypto_alg_put(tfm->__crt_alg);
+	kfree(tfm);
+}
+
+static inline int crypto_alg_blocksize_check(struct crypto_alg *alg)
+{
+	return ((alg->cra_flags & CRYPTO_ALG_TYPE_MASK)
+			== CRYPTO_ALG_TYPE_CIPHER &&
+	         alg->cra_blocksize > CRYPTO_MAX_CIPHER_BLOCK_SIZE);
+}
+
+int crypto_register_alg(struct crypto_alg *alg)
+{
+	int ret = 0;
+	struct crypto_alg *q;
+	
+	down_write(&crypto_alg_sem);
+	
+	list_for_each_entry(q, &crypto_alg_list, cra_list) {
+		if (!(strcmp(q->cra_name, alg->cra_name))) {
+			ret = -EEXIST;
+			goto out;
+		}
+	}
+	
+	if (crypto_alg_blocksize_check(alg)) {
+		printk(KERN_WARNING "%s: blocksize %u exceeds max. "
+		       "size %u\n", __FUNCTION__, alg->cra_blocksize,
+		       CRYPTO_MAX_CIPHER_BLOCK_SIZE);
+		ret = -EINVAL;
+	}
+	else
+		list_add_tail(&alg->cra_list, &crypto_alg_list);
+out:	
+	up_write(&crypto_alg_sem);
+	return ret;
+}
+
+int crypto_unregister_alg(struct crypto_alg *alg)
+{
+	int ret = -ENOENT;
+	struct crypto_alg *q;
+	
+	BUG_ON(!alg->cra_module);
+	
+	down_write(&crypto_alg_sem);
+	list_for_each_entry(q, &crypto_alg_list, cra_list) {
+		if (alg == q) {
+			list_del(&alg->cra_list);
+			ret = 0;
+			goto out;
+		}
+	}
+out:	
+	up_write(&crypto_alg_sem);
+	return ret;
+}
+
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+	struct list_head *v;
+	loff_t n = *pos;
+
+	down_read(&crypto_alg_sem);
+	list_for_each(v, &crypto_alg_list)
+		if (!n--)
+			return list_entry(v, struct crypto_alg, cra_list);
+	return NULL;
+}
+
+static void *c_next(struct seq_file *m, void *p, loff_t *pos)
+{
+	struct list_head *v = p;
+	
+	(*pos)++;
+	v = v->next;
+	return (v == &crypto_alg_list) ?
+		NULL : list_entry(v, struct crypto_alg, cra_list);
+}
+
+static void c_stop(struct seq_file *m, void *p)
+{
+	up_read(&crypto_alg_sem);
+}
+
+static int c_show(struct seq_file *m, void *p)
+{
+	struct crypto_alg *alg = (struct crypto_alg *)p;
+	
+	seq_printf(m, "name       : %s\n", alg->cra_name);
+	seq_printf(m, "module     : %s\n", alg->cra_module ?
+					alg->cra_module->name : "[static]");
+	seq_printf(m, "blocksize  : %u\n", alg->cra_blocksize);
+	
+	switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
+	case CRYPTO_ALG_TYPE_CIPHER:
+		seq_printf(m, "keysize    : %u\n", alg->cra_cipher.cia_keysize);
+		seq_printf(m, "ivsize     : %u\n", alg->cra_cipher.cia_ivsize);
+		break;
+		
+	case CRYPTO_ALG_TYPE_DIGEST:
+		seq_printf(m, "digestsize : %u\n",
+		           alg->cra_digest.dia_digestsize);
+		break;
+	}
+
+	seq_putc(m, '\n');
+	return 0;
+}
+
+static struct seq_operations crypto_seq_ops = {
+	.start		= c_start,
+	.next		= c_next,
+	.stop		= c_stop,
+	.show		= c_show
+};
+
+static int crypto_info_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &crypto_seq_ops);
+}
+        
+struct file_operations proc_crypto_ops = {
+	.open		= crypto_info_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release
+};
+
+static int __init init_crypto(void)
+{
+	struct proc_dir_entry *proc;
+	
+	printk(KERN_INFO "Initializing Cryptographic API\n");
+	proc = create_proc_entry("crypto", 0, NULL);
+	if (proc)
+		proc->proc_fops = &proc_crypto_ops;
+		
+	return 0;
+}
+
+__initcall(init_crypto);
+
+EXPORT_SYMBOL_GPL(crypto_register_alg);
+EXPORT_SYMBOL_GPL(crypto_unregister_alg);
+EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
+EXPORT_SYMBOL_GPL(crypto_free_tfm);
diff -Nru a/crypto/autoload.c b/crypto/autoload.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/autoload.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,27 @@
+/*
+ * Cryptographic API.
+ *
+ * Algorithm autoloader.
+ *
+ * Copyright (c) 2002 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/kernel.h>
+#include <linux/crypto.h>
+#include <linux/string.h>
+#include <linux/kmod.h>
+#include "internal.h"
+
+/*
+ * A far more intelligent version of this is planned.  For now, just
+ * try an exact match on the name of the algorithm.
+ */
+void crypto_alg_autoload(const char *name)
+{
+	request_module(name);
+}
diff -Nru a/crypto/cipher.c b/crypto/cipher.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/cipher.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,280 @@
+/*
+ * Cryptographic API.
+ *
+ * Cipher operations.
+ *
+ * Copyright (c) 2002 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/kernel.h>
+#include <linux/crypto.h>
+#include <linux/errno.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <linux/highmem.h>
+#include <asm/scatterlist.h>
+#include "internal.h"
+
+typedef void (cryptfn_t)(void *, u8 *, const u8 *);
+typedef void (procfn_t)(struct crypto_tfm *, u8 *, cryptfn_t, int enc);
+
+static inline void xor_64(u8 *a, const u8 *b)
+{
+	((u32 *)a)[0] ^= ((u32 *)b)[0];
+	((u32 *)a)[1] ^= ((u32 *)b)[1];
+}
+
+static inline unsigned int sglen(struct scatterlist *sg, unsigned int nsg)
+{
+	unsigned int i, n;
+	
+	for (i = 0, n = 0; i < nsg; i++)
+		n += sg[i].length;
+			
+	return n;
+}
+
+/*
+ * Do not call this unless the total length of all of the fragments 
+ * has been verified as multiple of the block size.
+ */
+static unsigned int copy_chunks(struct crypto_tfm *tfm, u8 *buf,
+                                struct scatterlist *sg, unsigned int sgidx,
+                                unsigned int rlen, unsigned int *last, int in)
+{
+	unsigned int i, copied, coff, j, aligned;
+	unsigned int bsize = crypto_tfm_alg_blocksize(tfm);
+
+	for (i = sgidx, j = copied = 0, aligned = 0 ; copied < bsize; i++) {
+		unsigned int len = sg[i].length;
+		unsigned int clen;
+		char *p;
+
+		if (copied) {
+			coff = 0;
+			clen = min(len,  bsize - copied);
+			
+			if (len == bsize - copied)
+				aligned = 1;	/* last + right aligned */
+				
+		} else {
+			coff = len - rlen;
+			clen = rlen;
+		}
+
+		p = crypto_kmap(sg[i].page) + sg[i].offset + coff;
+		
+		if (in)
+			memcpy(&buf[copied], p, clen);
+		else
+			memcpy(p, &buf[copied], clen);
+		
+		crypto_kunmap(p);
+		*last = aligned ? 0 : clen;
+		copied += clen;
+	}
+	
+	return i - sgidx - 2 + aligned;
+}
+
+static inline unsigned int gather_chunks(struct crypto_tfm *tfm, u8 *buf,
+                                         struct scatterlist *sg,
+                                         unsigned int sgidx, unsigned int rlen,
+                                         unsigned int *last)
+{
+	return copy_chunks(tfm, buf, sg, sgidx, rlen, last, 1);
+}
+
+static inline unsigned int scatter_chunks(struct crypto_tfm *tfm, u8 *buf,
+                                          struct scatterlist *sg,
+                                          unsigned int sgidx, unsigned int rlen,
+                                          unsigned int *last)
+{
+	return copy_chunks(tfm, buf, sg, sgidx, rlen, last, 0);
+}
+
+/* 
+ * Generic encrypt/decrypt wrapper for ciphers.
+ *
+ * If we find a a remnant at the end of a frag, we have to encrypt or
+ * decrypt across possibly multiple page boundaries via a temporary
+ * block, then continue processing with a chunk offset until the end
+ * of a frag is block aligned.
+ *
+ * The code is further complicated by having to remap a page after
+ * processing a block then yielding.  The data will be offset from the
+ * start of page at the scatterlist offset, the chunking offset (coff)
+ * and the block offset (boff).
+ */
+static int crypt(struct crypto_tfm *tfm, struct scatterlist *sg,
+                 unsigned int nsg, cryptfn_t crfn, procfn_t prfn, int enc)
+{
+	unsigned int i, coff;
+	unsigned int bsize = crypto_tfm_alg_blocksize(tfm);
+	u8 tmp[CRYPTO_MAX_CIPHER_BLOCK_SIZE];
+
+	if (sglen(sg, nsg) % bsize) {
+		tfm->crt_flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN;
+		return -EINVAL;
+	}
+
+	for (i = 0, coff = 0; i < nsg; i++) {
+		unsigned int n = 0, boff = 0;
+		unsigned int len = sg[i].length - coff;
+		char *p = crypto_kmap(sg[i].page) + sg[i].offset + coff;
+
+		while (len) {
+			if (len < bsize) {
+				crypto_kunmap(p);
+				n = gather_chunks(tfm, tmp, sg, i, len, &coff);
+				prfn(tfm, tmp, crfn, enc);
+				scatter_chunks(tfm, tmp, sg, i, len, &coff);
+				crypto_yield(tfm);
+				goto unmapped;
+			} else {
+				prfn(tfm, p, crfn, enc);
+				crypto_kunmap(p);
+				crypto_yield(tfm);
+				
+				/* remap and point to recalculated offset */
+				boff += bsize;
+				p = crypto_kmap(sg[i].page)
+				    + sg[i].offset + coff + boff;
+				
+				len -= bsize;
+				
+				/* End of frag with no remnant? */
+				if (coff && len == 0)
+					coff = 0;
+			}
+		}
+		crypto_kunmap(p);	
+unmapped:
+		i += n;
+
+	}
+	return 0;
+}
+
+static void cbc_process(struct crypto_tfm *tfm,
+                        u8 *block, cryptfn_t fn, int enc)
+{
+	if (enc) {
+		xor_64(tfm->crt_cipher.cit_iv, block);
+		fn(tfm->crt_ctx, block, tfm->crt_cipher.cit_iv);
+		memcpy(tfm->crt_cipher.cit_iv, block,
+		       crypto_tfm_alg_blocksize(tfm));
+	} else {
+		u8 buf[CRYPTO_MAX_CIPHER_BLOCK_SIZE];
+		
+		fn(tfm->crt_ctx, buf, block);
+		xor_64(buf, tfm->crt_cipher.cit_iv);
+		memcpy(tfm->crt_cipher.cit_iv, block,
+		       crypto_tfm_alg_blocksize(tfm));
+		memcpy(block, buf, crypto_tfm_alg_blocksize(tfm));
+	}
+}
+
+static void ecb_process(struct crypto_tfm *tfm, u8 *block,
+                        cryptfn_t fn, int enc)
+{
+	fn(tfm->crt_ctx, block, block);
+}
+
+static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
+{
+	return tfm->__crt_alg->cra_cipher.cia_setkey(tfm->crt_ctx, key,
+	                                             keylen, &tfm->crt_flags);
+}
+
+static int ecb_encrypt(struct crypto_tfm *tfm,
+                       struct scatterlist *sg, unsigned int nsg)
+{
+	return crypt(tfm, sg, nsg,
+	             tfm->__crt_alg->cra_cipher.cia_encrypt, ecb_process, 1);
+}
+
+static int ecb_decrypt(struct crypto_tfm *tfm,
+                       struct scatterlist *sg, unsigned int nsg)
+{
+	return crypt(tfm, sg, nsg,
+	             tfm->__crt_alg->cra_cipher.cia_decrypt, ecb_process, 1);
+}
+
+static int cbc_encrypt(struct crypto_tfm *tfm,
+                       struct scatterlist *sg, unsigned int nsg)
+{
+	return crypt(tfm, sg, nsg,
+	             tfm->__crt_alg->cra_cipher.cia_encrypt, cbc_process, 1);
+}
+
+static int cbc_decrypt(struct crypto_tfm *tfm,
+                       struct scatterlist *sg, unsigned int nsg)
+{
+	return crypt(tfm, sg, nsg,
+	             tfm->__crt_alg->cra_cipher.cia_decrypt, cbc_process, 0);
+}
+
+static int nocrypt(struct crypto_tfm *tfm,
+                   struct scatterlist *sg, unsigned int nsg)
+{
+	return -ENOSYS;
+}
+
+int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags)
+{
+	struct crypto_alg *alg = tfm->__crt_alg;
+	u32 mode = flags & CRYPTO_TFM_MODE_MASK;
+	
+	tfm->crt_cipher.cit_mode = mode ? mode : CRYPTO_TFM_MODE_ECB;
+	
+	if (alg->cra_cipher.cia_ivsize && mode != CRYPTO_TFM_MODE_ECB) {
+		tfm->crt_cipher.cit_iv =
+			kmalloc(alg->cra_cipher.cia_ivsize, GFP_KERNEL);
+		if (tfm->crt_cipher.cit_iv == NULL)
+			return -ENOMEM;
+	} else
+		tfm->crt_cipher.cit_iv = NULL;
+
+	if (flags & CRYPTO_TFM_REQ_WEAK_KEY)
+		tfm->crt_flags = CRYPTO_TFM_REQ_WEAK_KEY;
+	
+	return 0;
+}
+
+void crypto_init_cipher_ops(struct crypto_tfm *tfm)
+{
+	struct cipher_tfm *ops = &tfm->crt_cipher;
+
+	ops->cit_setkey = setkey;
+
+	switch (tfm->crt_cipher.cit_mode) {
+	case CRYPTO_TFM_MODE_ECB:
+		ops->cit_encrypt = ecb_encrypt;
+		ops->cit_decrypt = ecb_decrypt;
+		break;
+		
+	case CRYPTO_TFM_MODE_CBC:
+		ops->cit_encrypt = cbc_encrypt;
+		ops->cit_decrypt = cbc_decrypt;
+		break;
+		
+	case CRYPTO_TFM_MODE_CFB:
+		ops->cit_encrypt = nocrypt;
+		ops->cit_decrypt = nocrypt;
+		break;
+	
+	case CRYPTO_TFM_MODE_CTR:
+		ops->cit_encrypt = nocrypt;
+		ops->cit_decrypt = nocrypt;
+		break;
+
+	default:
+		BUG();
+	}
+}
diff -Nru a/crypto/compress.c b/crypto/compress.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/compress.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,42 @@
+/*
+ * Cryptographic API.
+ *
+ * Compression operations.
+ *
+ * Copyright (c) 2002 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/types.h>
+#include <linux/crypto.h>
+#include <linux/errno.h>
+#include <asm/scatterlist.h>
+#include <linux/string.h>
+#include "internal.h"
+
+/*
+ * This code currently implements blazingly fast and
+ * lossless Quadruple ROT13 compression.
+ */
+static void crypto_compress(struct crypto_tfm *tfm)
+{ }
+
+static void crypto_decompress(struct crypto_tfm *tfm)
+{ }
+
+int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags)
+{
+	return crypto_cipher_flags(flags) ? -EINVAL : 0;
+}
+
+void crypto_init_compress_ops(struct crypto_tfm *tfm)
+{
+	struct compress_tfm *ops = &tfm->crt_compress;
+	
+	ops->cot_compress = crypto_compress;
+	ops->cot_decompress = crypto_decompress;
+}
diff -Nru a/crypto/des.c b/crypto/des.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/des.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,1308 @@
+/* 
+ * Cryptographic API.
+ *
+ * DES & Triple DES EDE Cipher Algorithms.
+ *
+ * Originally released as descore by Dana L. How <how@isl.stanford.edu>.
+ * Modified by Raimar Falke <rf13@inf.tu-dresden.de> for the Linux-Kernel.
+ * Derived from Cryptoapi and Nettle implementations, adapted for in-place
+ * scatterlist interface.  Changed LGPL to GPL per section 3 of the LGPL.
+ *
+ * Copyright (c) 1992 Dana L. How.
+ * Copyright (c) Raimar Falke <rf13@inf.tu-dresden.de> 
+ * Copyright (c) Gisle Sælensminde <gisle@ii.uib.no>
+ * Copyright (C) 2001 Niels Möller.
+ * Copyright (c) 2002 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/init.h>
+#include <linux/module.h>
+#include <linux/mm.h>
+#include <asm/scatterlist.h>
+#include <linux/crypto.h>
+
+#define DES_KEY_SIZE		8
+#define DES_EXPKEY_WORDS	32
+#define DES_BLOCK_SIZE		8
+
+#define DES3_EDE_KEY_SIZE	(3 * DES_KEY_SIZE)
+#define DES3_EDE_EXPKEY_WORDS	(3 * DES_EXPKEY_WORDS)
+#define DES3_EDE_BLOCK_SIZE	DES_BLOCK_SIZE
+
+#define ROR(d,c,o)	((d) = (d) >> (c) | (d) << (o))
+
+struct des_ctx {
+	u8 iv[DES_BLOCK_SIZE];
+	u32 expkey[DES_EXPKEY_WORDS];
+};
+
+struct des3_ede_ctx {
+	u8 iv[DES_BLOCK_SIZE];
+	u32 expkey[DES3_EDE_EXPKEY_WORDS];
+};
+
+const static u32 des_keymap[] = {
+	0x02080008, 0x02082000, 0x00002008, 0x00000000,
+	0x02002000, 0x00080008, 0x02080000, 0x02082008,
+	0x00000008, 0x02000000, 0x00082000, 0x00002008,
+	0x00082008, 0x02002008, 0x02000008, 0x02080000,
+	0x00002000, 0x00082008, 0x00080008, 0x02002000,
+	0x02082008, 0x02000008, 0x00000000, 0x00082000,
+	0x02000000, 0x00080000, 0x02002008, 0x02080008,
+	0x00080000, 0x00002000, 0x02082000, 0x00000008,
+	0x00080000, 0x00002000, 0x02000008, 0x02082008,
+	0x00002008, 0x02000000, 0x00000000, 0x00082000,
+	0x02080008, 0x02002008, 0x02002000, 0x00080008,
+	0x02082000, 0x00000008, 0x00080008, 0x02002000,
+	0x02082008, 0x00080000, 0x02080000, 0x02000008,
+	0x00082000, 0x00002008, 0x02002008, 0x02080000,
+	0x00000008, 0x02082000, 0x00082008, 0x00000000,
+	0x02000000, 0x02080008, 0x00002000, 0x00082008,
+
+	0x08000004, 0x00020004, 0x00000000, 0x08020200,
+	0x00020004, 0x00000200, 0x08000204, 0x00020000,
+	0x00000204, 0x08020204, 0x00020200, 0x08000000,
+	0x08000200, 0x08000004, 0x08020000, 0x00020204,
+	0x00020000, 0x08000204, 0x08020004, 0x00000000,
+	0x00000200, 0x00000004, 0x08020200, 0x08020004,
+	0x08020204, 0x08020000, 0x08000000, 0x00000204,
+	0x00000004, 0x00020200, 0x00020204, 0x08000200,
+	0x00000204, 0x08000000, 0x08000200, 0x00020204,
+	0x08020200, 0x00020004, 0x00000000, 0x08000200,
+	0x08000000, 0x00000200, 0x08020004, 0x00020000,
+	0x00020004, 0x08020204, 0x00020200, 0x00000004,
+	0x08020204, 0x00020200, 0x00020000, 0x08000204,
+	0x08000004, 0x08020000, 0x00020204, 0x00000000,
+	0x00000200, 0x08000004, 0x08000204, 0x08020200,
+	0x08020000, 0x00000204, 0x00000004, 0x08020004,
+
+	0x80040100, 0x01000100, 0x80000000, 0x81040100,
+	0x00000000, 0x01040000, 0x81000100, 0x80040000,
+	0x01040100, 0x81000000, 0x01000000, 0x80000100,
+	0x81000000, 0x80040100, 0x00040000, 0x01000000,
+	0x81040000, 0x00040100, 0x00000100, 0x80000000,
+	0x00040100, 0x81000100, 0x01040000, 0x00000100,
+	0x80000100, 0x00000000, 0x80040000, 0x01040100,
+	0x01000100, 0x81040000, 0x81040100, 0x00040000,
+	0x81040000, 0x80000100, 0x00040000, 0x81000000,
+	0x00040100, 0x01000100, 0x80000000, 0x01040000,
+	0x81000100, 0x00000000, 0x00000100, 0x80040000,
+	0x00000000, 0x81040000, 0x01040100, 0x00000100,
+	0x01000000, 0x81040100, 0x80040100, 0x00040000,
+	0x81040100, 0x80000000, 0x01000100, 0x80040100,
+	0x80040000, 0x00040100, 0x01040000, 0x81000100,
+	0x80000100, 0x01000000, 0x81000000, 0x01040100,
+
+	0x04010801, 0x00000000, 0x00010800, 0x04010000,
+	0x04000001, 0x00000801, 0x04000800, 0x00010800,
+	0x00000800, 0x04010001, 0x00000001, 0x04000800,
+	0x00010001, 0x04010800, 0x04010000, 0x00000001,
+	0x00010000, 0x04000801, 0x04010001, 0x00000800,
+	0x00010801, 0x04000000, 0x00000000, 0x00010001,
+	0x04000801, 0x00010801, 0x04010800, 0x04000001,
+	0x04000000, 0x00010000, 0x00000801, 0x04010801,
+	0x00010001, 0x04010800, 0x04000800, 0x00010801,
+	0x04010801, 0x00010001, 0x04000001, 0x00000000,
+	0x04000000, 0x00000801, 0x00010000, 0x04010001,
+	0x00000800, 0x04000000, 0x00010801, 0x04000801,
+	0x04010800, 0x00000800, 0x00000000, 0x04000001,
+	0x00000001, 0x04010801, 0x00010800, 0x04010000,
+	0x04010001, 0x00010000, 0x00000801, 0x04000800,
+	0x04000801, 0x00000001, 0x04010000, 0x00010800,
+
+	0x00000400, 0x00000020, 0x00100020, 0x40100000,
+	0x40100420, 0x40000400, 0x00000420, 0x00000000,
+	0x00100000, 0x40100020, 0x40000020, 0x00100400,
+	0x40000000, 0x00100420, 0x00100400, 0x40000020,
+	0x40100020, 0x00000400, 0x40000400, 0x40100420,
+	0x00000000, 0x00100020, 0x40100000, 0x00000420,
+	0x40100400, 0x40000420, 0x00100420, 0x40000000,
+	0x40000420, 0x40100400, 0x00000020, 0x00100000,
+	0x40000420, 0x00100400, 0x40100400, 0x40000020,
+	0x00000400, 0x00000020, 0x00100000, 0x40100400,
+	0x40100020, 0x40000420, 0x00000420, 0x00000000,
+	0x00000020, 0x40100000, 0x40000000, 0x00100020,
+	0x00000000, 0x40100020, 0x00100020, 0x00000420,
+	0x40000020, 0x00000400, 0x40100420, 0x00100000,
+	0x00100420, 0x40000000, 0x40000400, 0x40100420,
+	0x40100000, 0x00100420, 0x00100400, 0x40000400,
+
+	0x00800000, 0x00001000, 0x00000040, 0x00801042,
+	0x00801002, 0x00800040, 0x00001042, 0x00801000,
+	0x00001000, 0x00000002, 0x00800002, 0x00001040,
+	0x00800042, 0x00801002, 0x00801040, 0x00000000,
+	0x00001040, 0x00800000, 0x00001002, 0x00000042,
+	0x00800040, 0x00001042, 0x00000000, 0x00800002,
+	0x00000002, 0x00800042, 0x00801042, 0x00001002,
+	0x00801000, 0x00000040, 0x00000042, 0x00801040,
+	0x00801040, 0x00800042, 0x00001002, 0x00801000,
+	0x00001000, 0x00000002, 0x00800002, 0x00800040,
+	0x00800000, 0x00001040, 0x00801042, 0x00000000,
+	0x00001042, 0x00800000, 0x00000040, 0x00001002,
+	0x00800042, 0x00000040, 0x00000000, 0x00801042,
+	0x00801002, 0x00801040, 0x00000042, 0x00001000,
+	0x00001040, 0x00801002, 0x00800040, 0x00000042,
+	0x00000002, 0x00001042, 0x00801000, 0x00800002,
+
+	0x10400000, 0x00404010, 0x00000010, 0x10400010,
+	0x10004000, 0x00400000, 0x10400010, 0x00004010,
+	0x00400010, 0x00004000, 0x00404000, 0x10000000,
+	0x10404010, 0x10000010, 0x10000000, 0x10404000,
+	0x00000000, 0x10004000, 0x00404010, 0x00000010,
+	0x10000010, 0x10404010, 0x00004000, 0x10400000,
+	0x10404000, 0x00400010, 0x10004010, 0x00404000,
+	0x00004010, 0x00000000, 0x00400000, 0x10004010,
+	0x00404010, 0x00000010, 0x10000000, 0x00004000,
+	0x10000010, 0x10004000, 0x00404000, 0x10400010,
+	0x00000000, 0x00404010, 0x00004010, 0x10404000,
+	0x10004000, 0x00400000, 0x10404010, 0x10000000,
+	0x10004010, 0x10400000, 0x00400000, 0x10404010,
+	0x00004000, 0x00400010, 0x10400010, 0x00004010,
+	0x00400010, 0x00000000, 0x10404000, 0x10000010,
+	0x10400000, 0x10004010, 0x00000010, 0x00404000,
+
+	0x00208080, 0x00008000, 0x20200000, 0x20208080,
+	0x00200000, 0x20008080, 0x20008000, 0x20200000,
+	0x20008080, 0x00208080, 0x00208000, 0x20000080,
+	0x20200080, 0x00200000, 0x00000000, 0x20008000,
+	0x00008000, 0x20000000, 0x00200080, 0x00008080,
+	0x20208080, 0x00208000, 0x20000080, 0x00200080,
+	0x20000000, 0x00000080, 0x00008080, 0x20208000,
+	0x00000080, 0x20200080, 0x20208000, 0x00000000,
+	0x00000000, 0x20208080, 0x00200080, 0x20008000,
+	0x00208080, 0x00008000, 0x20000080, 0x00200080,
+	0x20208000, 0x00000080, 0x00008080, 0x20200000,
+	0x20008080, 0x20000000, 0x20200000, 0x00208000,
+	0x20208080, 0x00008080, 0x00208000, 0x20200080,
+	0x00200000, 0x20000080, 0x20008000, 0x00000000,
+	0x00008000, 0x00200000, 0x20200080, 0x00208080,
+	0x20000000, 0x20208000, 0x00000080, 0x20008080,
+};
+
+const static u8 rotors[] = {
+	34, 13,  5, 46, 47, 18, 32, 41, 11, 53, 33, 20,
+	14, 36, 30, 24, 49,  2, 15, 37, 42, 50,  0, 21,
+	38, 48,  6, 26, 39,  4, 52, 25, 12, 27, 31, 40,
+	1, 17, 28, 29, 23, 51, 35,  7,  3, 22,  9, 43,
+
+	41, 20, 12, 53, 54, 25, 39, 48, 18, 31, 40, 27,
+	21, 43, 37,  0,  1,  9, 22, 44, 49,  2,  7, 28,
+	45, 55, 13, 33, 46, 11,  6, 32, 19, 34, 38, 47,
+	8, 24, 35, 36, 30,  3, 42, 14, 10, 29, 16, 50,
+
+	55, 34, 26, 38, 11, 39, 53,  5, 32, 45, 54, 41,
+	35,  2, 51, 14, 15, 23, 36,  3,  8, 16, 21, 42,
+	6, 12, 27, 47, 31, 25, 20, 46, 33, 48, 52,  4,
+	22,  7, 49, 50, 44, 17,  1, 28, 24, 43, 30,  9,
+
+	12, 48, 40, 52, 25, 53, 38, 19, 46,  6, 11, 55,
+	49, 16, 10, 28, 29, 37, 50, 17, 22, 30, 35,  1,
+	20, 26, 41,  4, 45, 39, 34, 31, 47,  5, 13, 18,
+	36, 21,  8,  9,  3,  0, 15, 42,  7,  2, 44, 23,
+
+	26,  5, 54, 13, 39, 38, 52, 33, 31, 20, 25, 12,
+	8, 30, 24, 42, 43, 51,  9,  0, 36, 44, 49, 15,
+	34, 40, 55, 18,  6, 53, 48, 45,  4, 19, 27, 32,
+	50, 35, 22, 23, 17, 14, 29,  1, 21, 16,  3, 37,
+
+	40, 19, 11, 27, 53, 52, 13, 47, 45, 34, 39, 26,
+	22, 44,  7,  1,  2, 10, 23, 14, 50,  3,  8, 29,
+	48, 54, 12, 32, 20, 38,  5,  6, 18, 33, 41, 46,
+	9, 49, 36, 37,  0, 28, 43, 15, 35, 30, 17, 51,
+
+	54, 33, 25, 41, 38, 13, 27,  4,  6, 48, 53, 40,
+	36,  3, 21, 15, 16, 24, 37, 28,  9, 17, 22, 43,
+	5, 11, 26, 46, 34, 52, 19, 20, 32, 47, 55, 31,
+	23,  8, 50, 51, 14, 42,  2, 29, 49, 44,  0, 10,
+
+	11, 47, 39, 55, 52, 27, 41, 18, 20,  5, 38, 54,
+	50, 17, 35, 29, 30,  7, 51, 42, 23,  0, 36,  2,
+	19, 25, 40, 31, 48, 13, 33, 34, 46,  4, 12, 45,
+	37, 22,  9, 10, 28,  1, 16, 43,  8,  3, 14, 24,
+
+	18, 54, 46,  5,  6, 34, 48, 25, 27, 12, 45,  4,
+	2, 24, 42, 36, 37, 14,  3, 49, 30,  7, 43,  9,
+	26, 32, 47, 38, 55, 20, 40, 41, 53, 11, 19, 52,
+	44, 29, 16, 17, 35,  8, 23, 50, 15, 10, 21,  0,
+
+	32, 11, 31, 19, 20, 48,  5, 39, 41, 26,  6, 18,
+	16,  7,  1, 50, 51, 28, 17,  8, 44, 21,  2, 23,
+	40, 46,  4, 52, 12, 34, 54, 55, 38, 25, 33, 13,
+	3, 43, 30,  0, 49, 22, 37,  9, 29, 24, 35, 14,
+
+	46, 25, 45, 33, 34,  5, 19, 53, 55, 40, 20, 32,
+	30, 21, 15,  9, 10, 42,  0, 22,  3, 35, 16, 37,
+	54, 31, 18, 13, 26, 48, 11, 12, 52, 39, 47, 27,
+	17,  2, 44, 14,  8, 36, 51, 23, 43,  7, 49, 28,
+
+	31, 39,  6, 47, 48, 19, 33, 38, 12, 54, 34, 46,
+	44, 35, 29, 23, 24,  1, 14, 36, 17, 49, 30, 51,
+	11, 45, 32, 27, 40,  5, 25, 26, 13, 53,  4, 41,
+	0, 16,  3, 28, 22, 50, 10, 37,  2, 21,  8, 42,
+
+	45, 53, 20,  4,  5, 33, 47, 52, 26, 11, 48, 31,
+	3, 49, 43, 37,  7, 15, 28, 50,  0,  8, 44, 10,
+	25,  6, 46, 41, 54, 19, 39, 40, 27, 38, 18, 55,
+	14, 30, 17, 42, 36,  9, 24, 51, 16, 35, 22,  1,
+
+	6, 38, 34, 18, 19, 47,  4, 13, 40, 25,  5, 45,
+	17,  8,  2, 51, 21, 29, 42,  9, 14, 22,  3, 24,
+	39, 20, 31, 55, 11, 33, 53, 54, 41, 52, 32, 12,
+	28, 44,  0,  1, 50, 23,  7, 10, 30, 49, 36, 15,
+
+	20, 52, 48, 32, 33,  4, 18, 27, 54, 39, 19,  6,
+	0, 22, 16, 10, 35, 43,  1, 23, 28, 36, 17,  7,
+	53, 34, 45, 12, 25, 47, 38, 11, 55, 13, 46, 26,
+	42,  3, 14, 15,  9, 37, 21, 24, 44,  8, 50, 29,
+
+	27,  6, 55, 39, 40, 11, 25, 34,  4, 46, 26, 13,
+	7, 29, 23, 17, 42, 50,  8, 30, 35, 43, 24, 14,
+	31, 41, 52, 19, 32, 54, 45, 18,  5, 20, 53, 33,
+	49, 10, 21, 22, 16, 44, 28,  0, 51, 15,  2, 36,
+};
+
+const static u8 parity[] = {
+	8,1,0,8,0,8,8,0,0,8,8,0,8,0,2,8,0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,3,
+	0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,8,0,0,8,0,8,8,0,0,8,8,0,8,0,0,8,
+	0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,8,0,0,8,0,8,8,0,0,8,8,0,8,0,0,8,
+	8,0,0,8,0,8,8,0,0,8,8,0,8,0,0,8,0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,
+	0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,8,0,0,8,0,8,8,0,0,8,8,0,8,0,0,8,
+	8,0,0,8,0,8,8,0,0,8,8,0,8,0,0,8,0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,
+	8,0,0,8,0,8,8,0,0,8,8,0,8,0,0,8,0,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,
+	4,8,8,0,8,0,0,8,8,0,0,8,0,8,8,0,8,5,0,8,0,8,8,0,0,8,8,0,8,0,6,8,
+};
+
+
+static void des_small_fips_encrypt(u32 *expkey, u8 *dst, const u8 *src)
+{
+	u32 x, y, z;
+	
+	x  = src[7];
+	x <<= 8;
+	x |= src[6];
+	x <<= 8;
+	x |= src[5];
+	x <<= 8;
+	x |= src[4];
+	y  = src[3];
+	y <<= 8;
+	y |= src[2];
+	y <<= 8;
+	y |= src[1];
+	y <<= 8;
+	y |= src[0];
+	z  = ((x >> 004) ^ y) & 0x0F0F0F0FL;
+	x ^= z << 004;
+	y ^= z;
+	z  = ((y >> 020) ^ x) & 0x0000FFFFL;
+	y ^= z << 020;
+	x ^= z;
+	z  = ((x >> 002) ^ y) & 0x33333333L;
+	x ^= z << 002;
+	y ^= z;
+	z  = ((y >> 010) ^ x) & 0x00FF00FFL;
+	y ^= z << 010;
+	x ^= z;
+	x  = x >> 1 | x << 31;
+	z  = (x ^ y) & 0x55555555L;
+	y ^= z;
+	x ^= z;
+	y  = y >> 1 | y << 31;
+	z  = expkey[0];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[1];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[2];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[3];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[4];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[5];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[6];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[7];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[8];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[9];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[10];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[11];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[12];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[13];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[14];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[15];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[16];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[17];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[18];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[19];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[20];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[21];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[22];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[23];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[24];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[25];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[26];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[27];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[28];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[29];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[30];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[31];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	x  = x << 1 | x >> 31;
+	z  = (x ^ y) & 0x55555555L;
+	y ^= z;
+	x ^= z;
+	y  = y << 1 | y >> 31;
+	z  = ((x >> 010) ^ y) & 0x00FF00FFL;
+	x ^= z << 010;
+	y ^= z;
+	z  = ((y >> 002) ^ x) & 0x33333333L;
+	y ^= z << 002;
+	x ^= z;
+	z  = ((x >> 020) ^ y) & 0x0000FFFFL;
+	x ^= z << 020;
+	y ^= z;
+	z  = ((y >> 004) ^ x) & 0x0F0F0F0FL;
+	y ^= z << 004;
+	x ^= z;
+	dst[0] = x;
+	x >>= 8;
+	dst[1] = x;
+	x >>= 8;
+	dst[2] = x;
+	x >>= 8;
+	dst[3] = x;
+	dst[4] = y;
+	y >>= 8;
+	dst[5] = y;
+	y >>= 8;
+	dst[6] = y;
+	y >>= 8;
+	dst[7] = y;
+}
+
+static void des_small_fips_decrypt(u32 *expkey, u8 *dst, const u8 *src)
+{
+	u32 x, y, z;
+	
+	x  = src[7];
+	x <<= 8;
+	x |= src[6];
+	x <<= 8;
+	x |= src[5];
+	x <<= 8;
+	x |= src[4];
+	y  = src[3];
+	y <<= 8;
+	y |= src[2];
+	y <<= 8;
+	y |= src[1];
+	y <<= 8;
+	y |= src[0];
+	z  = ((x >> 004) ^ y) & 0x0F0F0F0FL;
+	x ^= z << 004;
+	y ^= z;
+	z  = ((y >> 020) ^ x) & 0x0000FFFFL;
+	y ^= z << 020;
+	x ^= z;
+	z  = ((x >> 002) ^ y) & 0x33333333L;
+	x ^= z << 002;
+	y ^= z;
+	z  = ((y >> 010) ^ x) & 0x00FF00FFL;
+	y ^= z << 010;
+	x ^= z;
+	x  = x >> 1 | x << 31;
+	z  = (x ^ y) & 0x55555555L;
+	y ^= z;
+	x ^= z;
+	y  = y >> 1 | y << 31;
+	z  = expkey[31];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[30];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[29];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[28];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[27];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[26];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[25];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[24];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[23];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[22];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[21];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[20];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[19];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[18];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[17];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[16];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[15];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[14];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[13];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[12];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[11];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[10];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[9];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[8];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[7];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[6];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[5];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[4];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[3];
+	z ^= y;
+	z  = z << 4 | z >> 28;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[2];
+	z ^= y;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	x ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	z  = expkey[1];
+	z ^= x;
+	z  = z << 4 | z >> 28;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 448) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 384) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 320) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 256) + (0xFC & z));
+	z  = expkey[0];
+	z ^= x;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 192) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 128) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) (des_keymap + 64) + (0xFC & z));
+	z >>= 8;
+	y ^= * (u32 *) ((u8 *) des_keymap + (0xFC & z));
+	x  = x << 1 | x >> 31;
+	z  = (x ^ y) & 0x55555555L;
+	y ^= z;
+	x ^= z;
+	y  = y << 1 | y >> 31;
+	z  = ((x >> 010) ^ y) & 0x00FF00FFL;
+	x ^= z << 010;
+	y ^= z;
+	z  = ((y >> 002) ^ x) & 0x33333333L;
+	y ^= z << 002;
+	x ^= z;
+	z  = ((x >> 020) ^ y) & 0x0000FFFFL;
+	x ^= z << 020;
+	y ^= z;
+	z  = ((y >> 004) ^ x) & 0x0F0F0F0FL;
+	y ^= z << 004;
+	x ^= z;
+	dst[0] = x;
+	x >>= 8;
+	dst[1] = x;
+	x >>= 8;
+	dst[2] = x;
+	x >>= 8;
+	dst[3] = x;
+	dst[4] = y;
+	y >>= 8;
+	dst[5] = y;
+	y >>= 8;
+	dst[6] = y;
+	y >>= 8;
+	dst[7] = y;
+}
+
+/*
+ * RFC2451: Weak key checks SHOULD be performed.
+ */
+static int setkey(u32 *expkey, const u8 *key, unsigned int keylen, u32 *flags)
+{
+	const u8 *k;
+	u8 *b0, *b1;
+	u32 n, w;
+	u8 bits0[56], bits1[56];
+
+	if (keylen != DES_KEY_SIZE) {
+		*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
+		return -EINVAL;
+	}
+
+	n  = parity[key[0]]; n <<= 4;
+	n |= parity[key[1]]; n <<= 4;
+	n |= parity[key[2]]; n <<= 4;
+	n |= parity[key[3]]; n <<= 4;
+	n |= parity[key[4]]; n <<= 4;
+	n |= parity[key[5]]; n <<= 4;
+	n |= parity[key[6]]; n <<= 4;
+	n |= parity[key[7]];
+	w = 0x88888888L;
+	
+	if ((*flags & CRYPTO_TFM_REQ_WEAK_KEY)
+	    && !((n - (w >> 3)) & w)) {  /* 1 in 10^10 keys passes this test */
+		if (n < 0x41415151) {
+			if (n < 0x31312121) {
+				if (n < 0x14141515) {
+					/* 01 01 01 01 01 01 01 01 */
+					if (n == 0x11111111) goto weak;
+					/* 01 1F 01 1F 01 0E 01 0E */
+					if (n == 0x13131212) goto weak;
+				} else {
+					/* 01 E0 01 E0 01 F1 01 F1 */
+					if (n == 0x14141515) goto weak;
+					/* 01 FE 01 FE 01 FE 01 FE */
+					if (n == 0x16161616) goto weak;
+				}
+			} else {
+				if (n < 0x34342525) {
+					/* 1F 01 1F 01 0E 01 0E 01 */
+					if (n == 0x31312121) goto weak;
+					/* 1F 1F 1F 1F 0E 0E 0E 0E (?) */
+					if (n == 0x33332222) goto weak;
+				} else {
+					/* 1F E0 1F E0 0E F1 0E F1 */
+					if (n == 0x34342525) goto weak;
+					/* 1F FE 1F FE 0E FE 0E FE */
+					if (n == 0x36362626) goto weak;
+				}
+			}
+		} else {
+			if (n < 0x61616161) {
+				if (n < 0x44445555) {
+					/* E0 01 E0 01 F1 01 F1 01 */
+					if (n == 0x41415151) goto weak;
+					/* E0 1F E0 1F F1 0E F1 0E */
+					if (n == 0x43435252) goto weak;
+				} else {
+					/* E0 E0 E0 E0 F1 F1 F1 F1 (?) */
+					if (n == 0x44445555) goto weak;
+					/* E0 FE E0 FE F1 FE F1 FE */
+					if (n == 0x46465656) goto weak;
+				}
+			} else {
+				if (n < 0x64646565) {
+					/* FE 01 FE 01 FE 01 FE 01 */
+					if (n == 0x61616161) goto weak;
+					/* FE 1F FE 1F FE 0E FE 0E */
+					if (n == 0x63636262) goto weak;
+				} else {
+					/* FE E0 FE E0 FE F1 FE F1 */
+					if (n == 0x64646565) goto weak;
+					/* FE FE FE FE FE FE FE FE */
+					if (n == 0x66666666) goto weak;
+				}
+			}
+		}
+	
+		goto not_weak;
+weak:
+		*flags |= CRYPTO_TFM_RES_WEAK_KEY;
+		return -EINVAL;
+	}
+
+not_weak:
+
+	/* explode the bits */
+	n = 56;
+	b0 = bits0;
+	b1 = bits1;
+	
+	do {
+		w = (256 | *key++) << 2;
+		do {
+			--n;
+			b1[n] = 8 & w;
+			w >>= 1;
+			b0[n] = 4 & w;
+		} while ( w >= 16 );
+	} while ( n );
+	
+	/* put the bits in the correct places */
+	n = 16;
+	k = rotors;
+	
+	do {
+		w   = (b1[k[ 0   ]] | b0[k[ 1   ]]) << 4;
+		w  |= (b1[k[ 2   ]] | b0[k[ 3   ]]) << 2;
+		w  |=  b1[k[ 4   ]] | b0[k[ 5   ]];
+		w <<= 8;
+		w  |= (b1[k[ 6   ]] | b0[k[ 7   ]]) << 4;
+		w  |= (b1[k[ 8   ]] | b0[k[ 9   ]]) << 2;
+		w  |=  b1[k[10   ]] | b0[k[11   ]];
+		w <<= 8;
+		w  |= (b1[k[12   ]] | b0[k[13   ]]) << 4;
+		w  |= (b1[k[14   ]] | b0[k[15   ]]) << 2;
+		w  |=  b1[k[16   ]] | b0[k[17   ]];
+		w <<= 8;
+		w  |= (b1[k[18   ]] | b0[k[19   ]]) << 4;
+		w  |= (b1[k[20   ]] | b0[k[21   ]]) << 2;
+		w  |=  b1[k[22   ]] | b0[k[23   ]];
+		expkey[0] = w;
+		
+		w   = (b1[k[ 0+24]] | b0[k[ 1+24]]) << 4;
+		w  |= (b1[k[ 2+24]] | b0[k[ 3+24]]) << 2;
+		w  |=  b1[k[ 4+24]] | b0[k[ 5+24]];
+		w <<= 8;
+		w  |= (b1[k[ 6+24]] | b0[k[ 7+24]]) << 4;
+		w  |= (b1[k[ 8+24]] | b0[k[ 9+24]]) << 2;
+		w  |=  b1[k[10+24]] | b0[k[11+24]];
+		w <<= 8;
+		w  |= (b1[k[12+24]] | b0[k[13+24]]) << 4;
+		w  |= (b1[k[14+24]] | b0[k[15+24]]) << 2;
+		w  |=  b1[k[16+24]] | b0[k[17+24]];
+		w <<= 8;
+		w  |= (b1[k[18+24]] | b0[k[19+24]]) << 4;
+		w  |= (b1[k[20+24]] | b0[k[21+24]]) << 2;
+		w  |=  b1[k[22+24]] | b0[k[23+24]];
+		
+		ROR(w, 4, 28);      /* could be eliminated */
+		expkey[1] = w;
+
+		k += 48;
+		expkey += 2;
+	} while (--n);
+
+	return 0;
+}
+
+static int des_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags)
+{
+	return setkey(((struct des_ctx *)ctx)->expkey, key, keylen, flags);
+}
+
+static void des_encrypt(void *ctx, u8 *dst, const u8 *src)
+{
+	des_small_fips_encrypt(((struct des_ctx *)ctx)->expkey, dst, src);
+}
+
+static void des_decrypt(void *ctx, u8 *dst, const u8 *src)
+{
+	des_small_fips_decrypt(((struct des_ctx *)ctx)->expkey, dst, src);
+}
+
+/* 
+ * RFC2451:
+ *
+ *   For DES-EDE3, there is no known need to reject weak or
+ *   complementation keys.  Any weakness is obviated by the use of
+ *   multiple keys.
+ *
+ *   However, if the first two or last two independent 64-bit keys are
+ *   equal (k1 == k2 or k2 == k3), then the DES3 operation is simply the
+ *   same as DES.  Implementers MUST reject keys that exhibit this
+ *   property.
+ *
+ */
+static int des3_ede_setkey(void *ctx, const u8 *key,
+                           unsigned int keylen, u32 *flags)
+{
+	unsigned int i, off;
+	struct des3_ede_ctx *dctx = ctx;
+
+	if (keylen != DES3_EDE_KEY_SIZE) {
+		*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
+		return -EINVAL;
+	}
+
+	if (!(memcmp(key, &key[DES_KEY_SIZE], DES_KEY_SIZE) && 
+	    memcmp(&key[DES_KEY_SIZE], &key[DES_KEY_SIZE * 2],
+	    					DES_KEY_SIZE))) {
+
+		*flags |= CRYPTO_TFM_RES_BAD_KEY_SCHED;
+		return -EINVAL;
+	}
+	
+	for (i = 0, off = 0; i < 3; i++, off += DES_EXPKEY_WORDS,
+							key += DES_KEY_SIZE) {
+		int ret = setkey(&dctx->expkey[off], key, DES_KEY_SIZE, flags);
+		if (ret < 0)
+			return ret;
+	}	
+	return 0;
+}
+
+static void des3_ede_encrypt(void *ctx, u8 *dst, const u8 *src)
+{
+	struct des3_ede_ctx *dctx = ctx;
+	
+	des_small_fips_encrypt(dctx->expkey, dst, src);
+	des_small_fips_decrypt(&dctx->expkey[DES_EXPKEY_WORDS], dst, dst);
+	des_small_fips_encrypt(&dctx->expkey[DES_EXPKEY_WORDS * 2], dst, dst);
+}
+
+static void des3_ede_decrypt(void *ctx, u8 *dst, const u8 *src)
+{
+	struct des3_ede_ctx *dctx = ctx;
+
+	des_small_fips_decrypt(&dctx->expkey[DES_EXPKEY_WORDS * 2], dst, src);
+	des_small_fips_encrypt(&dctx->expkey[DES_EXPKEY_WORDS], dst, dst);
+	des_small_fips_decrypt(dctx->expkey, dst, dst);
+}
+
+static struct crypto_alg des_alg = {
+	.cra_name	=	"des",
+	.cra_flags	=	CRYPTO_ALG_TYPE_CIPHER,
+	.cra_blocksize	=	DES_BLOCK_SIZE,
+	.cra_ctxsize	=	sizeof(struct des_ctx),
+	.cra_module	=	THIS_MODULE,
+	.cra_list	=	LIST_HEAD_INIT(des_alg.cra_list),
+	.cra_u		=	{ .cipher = {
+	.cia_keysize	=	DES_KEY_SIZE,
+	.cia_ivsize	=	DES_BLOCK_SIZE,
+	.cia_setkey   	= 	des_setkey,
+	.cia_encrypt 	=	des_encrypt,
+	.cia_decrypt  	=	des_decrypt } }
+};
+
+static struct crypto_alg des3_ede_alg = {
+	.cra_name	=	"des3_ede",
+	.cra_flags	=	CRYPTO_ALG_TYPE_CIPHER,
+	.cra_blocksize	=	DES3_EDE_BLOCK_SIZE,
+	.cra_ctxsize	=	sizeof(struct des3_ede_ctx),
+	.cra_module	=	THIS_MODULE,
+	.cra_list	=	LIST_HEAD_INIT(des3_ede_alg.cra_list),
+	.cra_u		=	{ .cipher = {
+	.cia_keysize	=	DES3_EDE_KEY_SIZE,
+	.cia_ivsize	=	DES3_EDE_BLOCK_SIZE,
+	.cia_setkey   	= 	des3_ede_setkey,
+	.cia_encrypt 	=	des3_ede_encrypt,
+	.cia_decrypt  	=	des3_ede_decrypt } }
+};
+
+static int __init init(void)
+{
+	int ret = 0;
+	
+	ret = crypto_register_alg(&des_alg);
+	if (ret < 0)
+		goto out;
+
+	ret = crypto_register_alg(&des3_ede_alg);
+	if (ret < 0) {
+		crypto_unregister_alg(&des_alg);
+		goto out;
+	}
+out:	
+	return ret;
+}
+
+static void __exit fini(void)
+{
+	crypto_unregister_alg(&des3_ede_alg);
+	crypto_unregister_alg(&des_alg);
+}
+
+module_init(init);
+module_exit(fini);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("DES & Triple DES EDE Cipher Algorithms");
diff -Nru a/crypto/digest.c b/crypto/digest.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/digest.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,128 @@
+/*
+ * Cryptographic API.
+ *
+ * Digest operations.
+ *
+ * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ *
+ * The HMAC implementation is derived from USAGI.
+ * Copyright (c) 2002 Kazunori Miyazawa <miyazawa@linux-ipv6.org> / USAGI
+ *
+ * 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/crypto.h>
+#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <asm/scatterlist.h>
+#include "internal.h"
+
+static void init(struct crypto_tfm *tfm)
+{
+	tfm->__crt_alg->cra_digest.dia_init(tfm->crt_ctx);
+}
+
+static void update(struct crypto_tfm *tfm,
+                   struct scatterlist *sg, unsigned int nsg)
+{
+	unsigned int i;
+	
+	for (i = 0; i < nsg; i++) {
+		char *p = crypto_kmap(sg[i].page) + sg[i].offset;
+		tfm->__crt_alg->cra_digest.dia_update(tfm->crt_ctx,
+		                                      p, sg[i].length);
+		crypto_kunmap(p);
+		crypto_yield(tfm);
+	}
+}
+
+static void final(struct crypto_tfm *tfm, u8 *out)
+{
+	tfm->__crt_alg->cra_digest.dia_final(tfm->crt_ctx, out);
+}
+
+static void digest(struct crypto_tfm *tfm,
+                   struct scatterlist *sg, unsigned int nsg, u8 *out)
+{
+	unsigned int i;
+
+	tfm->crt_digest.dit_init(tfm);
+		
+	for (i = 0; i < nsg; i++) {
+		char *p = crypto_kmap(sg[i].page) + sg[i].offset;
+		tfm->__crt_alg->cra_digest.dia_update(tfm->crt_ctx,
+		                                      p, sg[i].length);
+		crypto_kunmap(p);
+		crypto_yield(tfm);
+	}
+	crypto_digest_final(tfm, out);
+}
+
+static void hmac(struct crypto_tfm *tfm, u8 *key, unsigned int keylen,
+                 struct scatterlist *sg, unsigned int nsg, u8 *out)
+{
+	unsigned int i;
+	struct scatterlist tmp;
+	char ipad[crypto_tfm_alg_blocksize(tfm) + 1];
+	char opad[crypto_tfm_alg_blocksize(tfm) + 1];
+
+	if (keylen > crypto_tfm_alg_blocksize(tfm)) {
+		tmp.page = virt_to_page(key);
+		tmp.offset = ((long)key & ~PAGE_MASK);
+		tmp.length = keylen;
+		crypto_digest_digest(tfm, &tmp, 1, key);
+		keylen = crypto_tfm_alg_digestsize(tfm);
+	}
+
+	memset(ipad, 0, sizeof(ipad));
+	memset(opad, 0, sizeof(opad));
+	memcpy(ipad, key, keylen);
+	memcpy(opad, key, keylen);
+
+	for (i = 0; i < crypto_tfm_alg_blocksize(tfm); i++) {
+		ipad[i] ^= 0x36;
+		opad[i] ^= 0x5c;
+	}
+
+	tmp.page = virt_to_page(ipad);
+	tmp.offset = ((long)ipad & ~PAGE_MASK);
+	tmp.length = crypto_tfm_alg_blocksize(tfm);
+
+	crypto_digest_init(tfm);
+	crypto_digest_update(tfm, &tmp, 1);
+	crypto_digest_update(tfm, sg, nsg);
+	crypto_digest_final(tfm, out);
+
+	tmp.page = virt_to_page(opad);
+	tmp.offset = ((long)opad & ~PAGE_MASK);
+	tmp.length = crypto_tfm_alg_blocksize(tfm);
+
+	crypto_digest_init(tfm);
+	crypto_digest_update(tfm, &tmp, 1);
+	
+	tmp.page = virt_to_page(out);
+	tmp.offset = ((long)out & ~PAGE_MASK);
+	tmp.length = crypto_tfm_alg_digestsize(tfm);
+	
+	crypto_digest_update(tfm, &tmp, 1);
+	crypto_digest_final(tfm, out);
+}
+
+int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags)
+{
+	return crypto_cipher_flags(flags) ? -EINVAL : 0;
+}
+
+void crypto_init_digest_ops(struct crypto_tfm *tfm)
+{
+	struct digest_tfm *ops = &tfm->crt_digest;
+	
+	ops->dit_init   = init;
+	ops->dit_update = update;
+	ops->dit_final  = final;
+	ops->dit_digest = digest;
+	ops->dit_hmac   = hmac;
+}
diff -Nru a/crypto/internal.h b/crypto/internal.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/internal.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,56 @@
+/*
+ * Cryptographic API.
+ *
+ * Copyright (c) 2002 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.
+ *
+ */
+#ifndef _CRYPTO_INTERNAL_H
+#define _CRYPTO_INTERNAL_H
+
+#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <asm/hardirq.h>
+#include <asm/softirq.h>
+
+static inline void *crypto_kmap(struct page *page)
+{
+	return kmap_atomic(page, in_softirq() ?
+	                   KM_CRYPTO_SOFTIRQ : KM_CRYPTO_USER);
+}
+
+static inline void crypto_kunmap(void *vaddr)
+{
+	kunmap_atomic(vaddr, in_softirq() ?
+		      KM_CRYPTO_SOFTIRQ : KM_CRYPTO_USER);
+}
+
+static inline void crypto_yield(struct crypto_tfm *tfm)
+{
+	if (!in_softirq())
+		cond_resched();
+}
+
+static inline int crypto_cipher_flags(u32 flags)
+{
+	return flags & (CRYPTO_TFM_MODE_MASK|CRYPTO_TFM_REQ_WEAK_KEY);
+}
+
+#ifdef CONFIG_KMOD
+void crypto_alg_autoload(const char *name);
+#endif
+
+int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags);
+int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags);
+int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags);
+
+void crypto_init_digest_ops(struct crypto_tfm *tfm);
+void crypto_init_cipher_ops(struct crypto_tfm *tfm);
+void crypto_init_compress_ops(struct crypto_tfm *tfm);
+
+#endif	/* _CRYPTO_INTERNAL_H */
+
diff -Nru a/crypto/md4.c b/crypto/md4.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/md4.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,250 @@
+/* 
+ * Cryptographic API.
+ *
+ * MD4 Message Digest Algorithm (RFC1320).
+ *
+ * Implementation derived from Andrew Tridgell and Steve French's
+ * CIFS MD4 implementation, and the cryptoapi implementation
+ * originally based on the public domain implementation written
+ * by Colin Plumb in 1993.
+ *
+ * Copyright (c) Andrew Tridgell 1997-1998.
+ * Modified by Steve French (sfrench@us.ibm.com) 2002
+ * Copyright (c) Cryptoapi developers.
+ * Copyright (c) 2002 David S. Miller (davem@redhat.com)
+ * Copyright (c) 2002 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/init.h>
+#include <linux/crypto.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <asm/byteorder.h>
+
+#define MD4_DIGEST_SIZE		16
+#define MD4_HMAC_BLOCK_SIZE	64
+#define MD4_BLOCK_WORDS		16
+#define MD4_HASH_WORDS		4
+
+struct md4_ctx {
+	u32 hash[MD4_HASH_WORDS];
+	u32 block[MD4_BLOCK_WORDS];
+	u64 byte_count;
+};
+
+static inline u32 lshift(u32 x, unsigned int s)
+{
+	x &= 0xFFFFFFFF;
+	return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s));
+}
+
+static inline u32 F(u32 x, u32 y, u32 z)
+{
+	return (x & y) | ((~x) & z);
+}
+
+static inline u32 G(u32 x, u32 y, u32 z)
+{
+	return (x & y) | (x & z) | (y & z);
+}
+
+static inline u32 H(u32 x, u32 y, u32 z)
+{
+	return x ^ y ^ z;
+}
+                        
+#define ROUND1(a,b,c,d,k,s) (a = lshift(a + F(b,c,d) + k, s))
+#define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (u32)0x5A827999,s))
+#define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (u32)0x6ED9EBA1,s))
+
+/* XXX: this stuff can be optimized */
+static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
+{
+	while (words--) {
+		__le32_to_cpus(buf);
+		buf++;
+	}
+}
+
+static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
+{
+	while (words--) {
+		__cpu_to_le32s(buf);
+		buf++;
+	}
+}
+
+static void md4_transform(u32 *hash, u32 const *in)
+{
+	u32 a, b, c, d;
+
+	a = hash[0];
+	b = hash[1];
+	c = hash[2];
+	d = hash[3];
+
+	ROUND1(a, b, c, d, in[0], 3);
+	ROUND1(d, a, b, c, in[1], 7);
+	ROUND1(c, d, a, b, in[2], 11);
+	ROUND1(b, c, d, a, in[3], 19);
+	ROUND1(a, b, c, d, in[4], 3);
+	ROUND1(d, a, b, c, in[5], 7);
+	ROUND1(c, d, a, b, in[6], 11);
+	ROUND1(b, c, d, a, in[7], 19);
+	ROUND1(a, b, c, d, in[8], 3);
+	ROUND1(d, a, b, c, in[9], 7);
+	ROUND1(c, d, a, b, in[10], 11);
+	ROUND1(b, c, d, a, in[11], 19);
+	ROUND1(a, b, c, d, in[12], 3);
+	ROUND1(d, a, b, c, in[13], 7);
+	ROUND1(c, d, a, b, in[14], 11);
+	ROUND1(b, c, d, a, in[15], 19);
+
+	ROUND2(a, b, c, d,in[ 0], 3);
+	ROUND2(d, a, b, c, in[4], 5);
+	ROUND2(c, d, a, b, in[8], 9);
+	ROUND2(b, c, d, a, in[12], 13);
+	ROUND2(a, b, c, d, in[1], 3);
+	ROUND2(d, a, b, c, in[5], 5);
+	ROUND2(c, d, a, b, in[9], 9);
+	ROUND2(b, c, d, a, in[13], 13);
+	ROUND2(a, b, c, d, in[2], 3);
+	ROUND2(d, a, b, c, in[6], 5);
+	ROUND2(c, d, a, b, in[10], 9);
+	ROUND2(b, c, d, a, in[14], 13);
+	ROUND2(a, b, c, d, in[3], 3);
+	ROUND2(d, a, b, c, in[7], 5);
+	ROUND2(c, d, a, b, in[11], 9);
+	ROUND2(b, c, d, a, in[15], 13);
+
+	ROUND3(a, b, c, d,in[ 0], 3);
+	ROUND3(d, a, b, c, in[8], 9);
+	ROUND3(c, d, a, b, in[4], 11);
+	ROUND3(b, c, d, a, in[12], 15);
+	ROUND3(a, b, c, d, in[2], 3);
+	ROUND3(d, a, b, c, in[10], 9);
+	ROUND3(c, d, a, b, in[6], 11);
+	ROUND3(b, c, d, a, in[14], 15);
+	ROUND3(a, b, c, d, in[1], 3);
+	ROUND3(d, a, b, c, in[9], 9);
+	ROUND3(c, d, a, b, in[5], 11);
+	ROUND3(b, c, d, a, in[13], 15);
+	ROUND3(a, b, c, d, in[3], 3);
+	ROUND3(d, a, b, c, in[11], 9);
+	ROUND3(c, d, a, b, in[7], 11);
+	ROUND3(b, c, d, a, in[15], 15);
+
+	hash[0] += a;
+	hash[1] += b;
+	hash[2] += c;
+	hash[3] += d;
+}
+
+static inline void md4_transform_helper(struct md4_ctx *ctx)
+{
+	le32_to_cpu_array(ctx->block, sizeof(ctx->block) / sizeof(u32));
+	md4_transform(ctx->hash, ctx->block);
+}
+
+static void md4_init(void *ctx)
+{
+	struct md4_ctx *mctx = ctx;
+
+	mctx->hash[0] = 0x67452301;
+	mctx->hash[1] = 0xefcdab89;
+	mctx->hash[2] = 0x98badcfe;
+	mctx->hash[3] = 0x10325476;
+	mctx->byte_count = 0;
+}
+
+static void md4_update(void *ctx, const u8 *data, unsigned int len)
+{
+	struct md4_ctx *mctx = ctx;
+	const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
+
+	mctx->byte_count += len;
+
+	if (avail > len) {
+		memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
+		       data, len);
+		return;
+	}
+
+	memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
+	       data, avail);
+
+	md4_transform_helper(mctx);
+	data += avail;
+	len -= avail;
+
+	while (len >= sizeof(mctx->block)) {
+		memcpy(mctx->block, data, sizeof(mctx->block));
+		md4_transform_helper(mctx);
+		data += sizeof(mctx->block);
+		len -= sizeof(mctx->block);
+	}
+
+	memcpy(mctx->block, data, len);
+}
+
+static void md4_final(void *ctx, u8 *out)
+{
+	struct md4_ctx *mctx = ctx;
+	const unsigned int offset = mctx->byte_count & 0x3f;
+	char *p = (char *)mctx->block + offset;
+	int padding = 56 - (offset + 1);
+
+	*p++ = 0x80;
+	if (padding < 0) {
+		memset(p, 0x00, padding + sizeof (u64));
+		md4_transform_helper(mctx);
+		p = (char *)mctx->block;
+		padding = 56;
+	}
+
+	memset(p, 0, padding);
+	mctx->block[14] = mctx->byte_count << 3;
+	mctx->block[15] = mctx->byte_count >> 29;
+	le32_to_cpu_array(mctx->block, (sizeof(mctx->block) -
+	                  sizeof(u64)) / sizeof(u32));
+	md4_transform(mctx->hash, mctx->block);
+	cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(u32));
+	memcpy(out, mctx->hash, sizeof(mctx->hash));
+	memset(mctx, 0, sizeof(mctx));
+}
+
+static struct crypto_alg alg = {
+	.cra_name	=	"md4",
+	.cra_flags	=	CRYPTO_ALG_TYPE_DIGEST,
+	.cra_blocksize	=	MD4_HMAC_BLOCK_SIZE,
+	.cra_ctxsize	=	sizeof(struct md4_ctx),
+	.cra_module	=	THIS_MODULE,
+	.cra_list       =       LIST_HEAD_INIT(alg.cra_list),	
+	.cra_u		=	{ .digest = {
+	.dia_digestsize	=	MD4_DIGEST_SIZE,
+	.dia_init   	= 	md4_init,
+	.dia_update 	=	md4_update,
+	.dia_final  	=	md4_final } }
+};
+
+static int __init init(void)
+{
+	return crypto_register_alg(&alg);
+}
+
+static void __exit fini(void)
+{
+	crypto_unregister_alg(&alg);
+}
+
+module_init(init);
+module_exit(fini);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("MD4 Message Digest Algorithm");
+
diff -Nru a/crypto/md5.c b/crypto/md5.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/md5.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,244 @@
+/* 
+ * Cryptographic API.
+ *
+ * MD5 Message Digest Algorithm (RFC1321).
+ *
+ * Derived from cryptoapi implementation, originally based on the
+ * public domain implementation written by Colin Plumb in 1993.
+ *
+ * Copyright (c) Cryptoapi developers.
+ * Copyright (c) 2002 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/init.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/crypto.h>
+#include <asm/byteorder.h>
+
+#define MD5_DIGEST_SIZE		16
+#define MD5_HMAC_BLOCK_SIZE	64
+#define MD5_BLOCK_WORDS		16
+#define MD5_HASH_WORDS		4
+
+#define F1(x, y, z)	(z ^ (x & (y ^ z)))
+#define F2(x, y, z)	F1(z, x, y)
+#define F3(x, y, z)	(x ^ y ^ z)
+#define F4(x, y, z)	(y ^ (x | ~z))
+
+#define MD5STEP(f, w, x, y, z, in, s) \
+	(w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x)
+
+struct md5_ctx {
+	u32 hash[MD5_HASH_WORDS];
+	u32 block[MD5_BLOCK_WORDS];
+	u64 byte_count;
+};
+
+static void md5_transform(u32 *hash, u32 const *in)
+{
+	u32 a, b, c, d;
+
+	a = hash[0];
+	b = hash[1];
+	c = hash[2];
+	d = hash[3];
+
+	MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
+	MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
+	MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
+	MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
+	MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
+	MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
+	MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
+	MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
+	MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
+	MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
+	MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+	MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+	MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
+	MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
+	MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
+	MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
+
+	MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
+	MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
+	MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+	MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
+	MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
+	MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
+	MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+	MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
+	MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
+	MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
+	MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
+	MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
+	MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
+	MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
+	MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
+	MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+	MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
+	MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
+	MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+	MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+	MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
+	MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
+	MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
+	MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+	MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
+	MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
+	MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
+	MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
+	MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
+	MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+	MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+	MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
+
+	MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
+	MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
+	MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+	MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
+	MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
+	MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
+	MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+	MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
+	MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
+	MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+	MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
+	MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+	MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
+	MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+	MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
+	MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
+
+	hash[0] += a;
+	hash[1] += b;
+	hash[2] += c;
+	hash[3] += d;
+}
+
+/* XXX: this stuff can be optimized */
+static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
+{
+	while (words--) {
+		__le32_to_cpus(buf);
+		buf++;
+	}
+}
+
+static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
+{
+	while (words--) {
+		__cpu_to_le32s(buf);
+		buf++;
+	}
+}
+
+static inline void md5_transform_helper(struct md5_ctx *ctx)
+{
+	le32_to_cpu_array(ctx->block, sizeof(ctx->block) / sizeof(u32));
+	md5_transform(ctx->hash, ctx->block);
+}
+
+static void md5_init(void *ctx)
+{
+	struct md5_ctx *mctx = ctx;
+
+	mctx->hash[0] = 0x67452301;
+	mctx->hash[1] = 0xefcdab89;
+	mctx->hash[2] = 0x98badcfe;
+	mctx->hash[3] = 0x10325476;
+	mctx->byte_count = 0;
+}
+
+static void md5_update(void *ctx, const u8 *data, unsigned int len)
+{
+	struct md5_ctx *mctx = ctx;
+	const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
+
+	mctx->byte_count += len;
+
+	if (avail > len) {
+		memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
+		       data, len);
+		return;
+	}
+
+	memcpy((char *)mctx->block + (sizeof(mctx->block) - avail),
+	       data, avail);
+
+	md5_transform_helper(mctx);
+	data += avail;
+	len -= avail;
+
+	while (len >= sizeof(mctx->block)) {
+		memcpy(mctx->block, data, sizeof(mctx->block));
+		md5_transform_helper(mctx);
+		data += sizeof(mctx->block);
+		len -= sizeof(mctx->block);
+	}
+
+	memcpy(mctx->block, data, len);
+}
+
+static void md5_final(void *ctx, u8 *out)
+{
+	struct md5_ctx *mctx = ctx;
+	const unsigned int offset = mctx->byte_count & 0x3f;
+	char *p = (char *)mctx->block + offset;
+	int padding = 56 - (offset + 1);
+
+	*p++ = 0x80;
+	if (padding < 0) {
+		memset(p, 0x00, padding + sizeof (u64));
+		md5_transform_helper(mctx);
+		p = (char *)mctx->block;
+		padding = 56;
+	}
+
+	memset(p, 0, padding);
+	mctx->block[14] = mctx->byte_count << 3;
+	mctx->block[15] = mctx->byte_count >> 29;
+	le32_to_cpu_array(mctx->block, (sizeof(mctx->block) -
+	                  sizeof(u64)) / sizeof(u32));
+	md5_transform(mctx->hash, mctx->block);
+	cpu_to_le32_array(mctx->hash, sizeof(mctx->hash) / sizeof(u32));
+	memcpy(out, mctx->hash, sizeof(mctx->hash));
+	memset(mctx, 0, sizeof(mctx));
+}
+
+static struct crypto_alg alg = {
+	.cra_name	=	"md5",
+	.cra_flags	=	CRYPTO_ALG_TYPE_DIGEST,
+	.cra_blocksize	=	MD5_HMAC_BLOCK_SIZE,
+	.cra_ctxsize	=	sizeof(struct md5_ctx),
+	.cra_module	=	THIS_MODULE,
+	.cra_list	=	LIST_HEAD_INIT(alg.cra_list),
+	.cra_u		=	{ .digest = {
+	.dia_digestsize	=	MD5_DIGEST_SIZE,
+	.dia_init   	= 	md5_init,
+	.dia_update 	=	md5_update,
+	.dia_final  	=	md5_final } }
+};
+
+static int __init init(void)
+{
+	return crypto_register_alg(&alg);
+}
+
+static void __exit fini(void)
+{
+	crypto_unregister_alg(&alg);
+}
+
+module_init(init);
+module_exit(fini);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("MD5 Message Digest Algorithm");
diff -Nru a/crypto/sha1.c b/crypto/sha1.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/sha1.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,208 @@
+/*
+ * Cryptographic API.
+ *
+ * SHA1 Secure Hash Algorithm.
+ *
+ * Derived from cryptoapi implementation, adapted for in-place
+ * scatterlist interface.  Originally based on the public domain
+ * implementation written by Steve Raid.
+ *
+ * Copyright (c) Alan Smithee.
+ * Copyright (c) McDonald <andrew@mcdonald.org.uk>
+ * Copyright (c) Jean-Francois Dive <jef@linuxbe.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.
+ *
+ */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/mm.h>
+#include <linux/crypto.h>
+#include <asm/scatterlist.h>
+#include <asm/byteorder.h>
+
+#define SHA1_DIGEST_SIZE	20
+#define SHA1_HMAC_BLOCK_SIZE	64
+
+static inline u32 rol(u32 value, u32 bits)
+{
+	return (((value) << (bits)) | ((value) >> (32 - (bits))));
+}
+
+/* blk0() and blk() perform the initial expand. */
+/* I got the idea of expanding during the round function from SSLeay */
+# define blk0(i) block32[i]
+
+#define blk(i) (block32[i&15] = rol(block32[(i+13)&15]^block32[(i+8)&15] \
+    ^block32[(i+2)&15]^block32[i&15],1))
+
+/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5); \
+                        w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5); \
+                        w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5); \
+                        w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+struct sha1_ctx {
+        u64 count;
+        u32 state[5];
+        u8 buffer[64];
+};
+
+/* Hash a single 512-bit block. This is the core of the algorithm. */
+static void sha1_transform(u32 *state, const u8 *in)
+{
+	u32 a, b, c, d, e;
+	u32 block32[16];
+
+	/* convert/copy data to workspace */
+	for (a = 0; a < sizeof(block32)/sizeof(u32); a++)
+	  block32[a] = be32_to_cpu (((const u32 *)in)[a]);
+
+	/* Copy context->state[] to working vars */
+	a = state[0];
+	b = state[1];
+	c = state[2];
+	d = state[3];
+	e = state[4];
+
+	/* 4 rounds of 20 operations each. Loop unrolled. */
+	R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+	R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+	R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+	R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+	R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+	R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+	R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+	R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+	R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+	R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+	R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+	R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+	R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+	R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+	R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+	R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+	R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+	R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+	R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+	R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+	/* Add the working vars back into context.state[] */
+	state[0] += a;
+	state[1] += b;
+	state[2] += c;
+	state[3] += d;
+	state[4] += e;
+	/* Wipe variables */
+	a = b = c = d = e = 0;
+	memset (block32, 0x00, sizeof block32);
+}
+
+static void sha1_init(void *ctx)
+{
+	struct sha1_ctx *sctx = ctx;
+	const static struct sha1_ctx initstate = {
+	  0,
+	  { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 },
+	  { 0, }
+	};
+
+	*sctx = initstate;
+}
+
+static void sha1_update(void *ctx, const u8 *data, unsigned int len)
+{
+	struct sha1_ctx *sctx = ctx;
+	unsigned int i, j;
+
+	j = (sctx->count >> 3) & 0x3f;
+	sctx->count += len << 3;
+
+	if ((j + len) > 63) {
+		memcpy(&sctx->buffer[j], data, (i = 64-j));
+		sha1_transform(sctx->state, sctx->buffer);
+		for ( ; i + 63 < len; i += 64) {
+			sha1_transform(sctx->state, &data[i]);
+		}
+		j = 0;
+	}
+	else i = 0;
+	memcpy(&sctx->buffer[j], &data[i], len - i);
+}
+
+
+/* Add padding and return the message digest. */
+static void sha1_final(void* ctx, u8 *out)
+{
+	struct sha1_ctx *sctx = ctx;
+	u32 i, j, index, padlen;
+	u64 t;
+	u8 bits[8] = { 0, };
+	const static u8 padding[64] = { 0x80, };
+
+	t = sctx->count;
+	bits[7] = 0xff & t; t>>=8;
+	bits[6] = 0xff & t; t>>=8;
+	bits[5] = 0xff & t; t>>=8;
+	bits[4] = 0xff & t; t>>=8;
+	bits[3] = 0xff & t; t>>=8;
+	bits[2] = 0xff & t; t>>=8;
+	bits[1] = 0xff & t; t>>=8;
+	bits[0] = 0xff & t;
+
+	/* Pad out to 56 mod 64 */
+	index = (sctx->count >> 3) & 0x3f;
+	padlen = (index < 56) ? (56 - index) : ((64+56) - index);
+	sha1_update(sctx, padding, padlen);
+
+	/* Append length */
+	sha1_update(sctx, bits, sizeof bits); 
+
+	/* Store state in digest */
+	for (i = j = 0; i < 5; i++, j += 4) {
+		u32 t2 = sctx->state[i];
+		out[j+3] = t2 & 0xff; t2>>=8;
+		out[j+2] = t2 & 0xff; t2>>=8;
+		out[j+1] = t2 & 0xff; t2>>=8;
+		out[j  ] = t2 & 0xff;
+	}
+
+	/* Wipe context */
+	memset(sctx, 0, sizeof *sctx);
+}
+
+static struct crypto_alg alg = {
+	.cra_name	=	"sha1",
+	.cra_flags	=	CRYPTO_ALG_TYPE_DIGEST,
+	.cra_blocksize	=	SHA1_HMAC_BLOCK_SIZE,
+	.cra_ctxsize	=	sizeof(struct sha1_ctx),
+	.cra_module	=	THIS_MODULE,
+	.cra_list       =       LIST_HEAD_INIT(alg.cra_list),
+	.cra_u		=	{ .digest = {
+	.dia_digestsize	=	SHA1_DIGEST_SIZE,
+	.dia_init   	= 	sha1_init,
+	.dia_update 	=	sha1_update,
+	.dia_final  	=	sha1_final } }
+};
+
+static int __init init(void)
+{
+	return crypto_register_alg(&alg);
+}
+
+static void __exit fini(void)
+{
+	crypto_unregister_alg(&alg);
+}
+
+module_init(init);
+module_exit(fini);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm");
diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/tcrypt.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1368 @@
+/* 
+ * Quick & dirty crypto testing module.
+ *
+ * This will only exist until we have a better testing mechanism
+ * (e.g. a char device).
+ *
+ * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.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.
+ *
+ */
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <asm/scatterlist.h>
+#include <linux/string.h>
+#include <linux/crypto.h>
+#include <linux/highmem.h>
+#include "tcrypt.h"
+
+/*
+ * Need to kmalloc() memory for testing kmap().
+ */
+#define TVMEMSIZE	4096
+#define XBUFSIZE	32768
+
+/*
+ * Indexes into the xbuf to simulate cross-page access.
+ */
+#define IDX1		37
+#define IDX2		32400
+#define IDX3		1
+#define IDX4		8193
+#define IDX5		22222
+#define IDX6		17101
+#define IDX7		27333
+#define IDX8		3000
+
+static int mode = 0;
+static char *xbuf;
+static char *tvmem;
+
+static void
+hexdump(unsigned char *buf, unsigned int len)
+{
+	while (len--)
+		printk("%02x", *buf++);
+
+	printk("\n");
+}
+
+static void
+test_md5(void)
+{
+	char *p;
+	unsigned int i;
+	struct scatterlist sg[2];
+	char result[128];
+	struct crypto_tfm *tfm;
+	struct md5_testvec *md5_tv;
+	struct hmac_md5_testvec *hmac_md5_tv;
+	unsigned int tsize;
+
+	printk("\ntesting md5\n");
+
+	tsize = sizeof (md5_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, md5_tv_template, tsize);
+	md5_tv = (void *) tvmem;
+
+	tfm = crypto_alloc_tfm("md5", 0);
+	if (tfm == NULL) {
+		printk("failed to load transform for md5\n");
+		return;
+	}
+
+	for (i = 0; i < MD5_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+		memset(result, 0, sizeof (result));
+
+		p = md5_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = strlen(md5_tv[i].plaintext);
+
+		crypto_digest_init(tfm);
+		crypto_digest_update(tfm, sg, 1);
+		crypto_digest_final(tfm, result);
+
+		hexdump(result, crypto_tfm_alg_digestsize(tfm));
+		printk("%s\n",
+		       memcmp(result, md5_tv[i].digest,
+			      crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+		       "pass");
+	}
+
+	printk("\ntesting md5 across pages\n");
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+	memcpy(&xbuf[IDX1], "abcdefghijklm", 13);
+	memcpy(&xbuf[IDX2], "nopqrstuvwxyz", 13);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 13;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 13;
+
+	memset(result, 0, sizeof (result));
+	crypto_digest_digest(tfm, sg, 2, result);
+	hexdump(result, crypto_tfm_alg_digestsize(tfm));
+
+	printk("%s\n",
+	       memcmp(result, md5_tv[4].digest,
+		      crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
+
+	printk("\ntesting hmac_md5\n");
+
+	tsize = sizeof (hmac_md5_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, hmac_md5_tv_template, tsize);
+	hmac_md5_tv = (void *) tvmem;
+
+	for (i = 0; i < HMAC_MD5_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+		memset(result, 0, sizeof (result));
+
+		p = hmac_md5_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = strlen(hmac_md5_tv[i].plaintext);
+
+		crypto_digest_hmac(tfm, hmac_md5_tv[i].key,
+				   strlen(hmac_md5_tv[i].key), sg, 1, result);
+
+		hexdump(result, crypto_tfm_alg_digestsize(tfm));
+		printk("%s\n",
+		       memcmp(result, hmac_md5_tv[i].digest,
+			      crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+		       "pass");
+	}
+
+	printk("\ntesting hmac_md5 across pages\n");
+
+	memset(xbuf, 0, sizeof (xbuf));
+
+	memcpy(&xbuf[IDX1], "what do ya want ", 16);
+	memcpy(&xbuf[IDX2], "for nothing?", 12);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 16;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 12;
+
+	memset(result, 0, sizeof (result));
+	crypto_digest_hmac(tfm, hmac_md5_tv[1].key, strlen(hmac_md5_tv[1].key),
+			   sg, 2, result);
+	hexdump(result, crypto_tfm_alg_digestsize(tfm));
+
+	printk("%s\n",
+	       memcmp(result, hmac_md5_tv[1].digest,
+		      crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
+
+	crypto_free_tfm(tfm);
+}
+
+static void
+test_md4(void)
+{
+	char *p;
+	unsigned int i;
+	struct scatterlist sg[1];
+	char result[128];
+	struct crypto_tfm *tfm;
+	struct md4_testvec *md4_tv;
+	unsigned int tsize;
+
+	printk("\ntesting md4\n");
+
+	tsize = sizeof (md4_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, md4_tv_template, tsize);
+	md4_tv = (void *) tvmem;
+
+	tfm = crypto_alloc_tfm("md4", 0);
+	if (tfm == NULL) {
+		printk("failed to load transform for md4\n");
+		return;
+	}
+
+	for (i = 0; i < MD4_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+		memset(result, 0, sizeof (result));
+
+		p = md4_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = strlen(md4_tv[i].plaintext);
+
+		crypto_digest_digest(tfm, sg, 1, result);
+
+		hexdump(result, crypto_tfm_alg_digestsize(tfm));
+		printk("%s\n",
+		       memcmp(result, md4_tv[i].digest,
+			      crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+		       "pass");
+	}
+
+	crypto_free_tfm(tfm);
+}
+
+static void
+test_sha1(void)
+{
+	char *p;
+	unsigned int i;
+	struct crypto_tfm *tfm;
+	struct sha1_testvec *sha1_tv;
+	struct hmac_sha1_testvec *hmac_sha1_tv;
+	struct scatterlist sg[2];
+	unsigned int tsize;
+	char result[SHA1_DIGEST_SIZE];
+
+	printk("\ntesting sha1\n");
+
+	tsize = sizeof (sha1_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, sha1_tv_template, tsize);
+	sha1_tv = (void *) tvmem;
+
+	tfm = crypto_alloc_tfm("sha1", 0);
+	if (tfm == NULL) {
+		printk("failed to load transform for sha1\n");
+		return;
+	}
+
+	for (i = 0; i < SHA1_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+		memset(result, 0, sizeof (result));
+
+		p = sha1_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = strlen(sha1_tv[i].plaintext);
+
+		crypto_digest_init(tfm);
+		crypto_digest_update(tfm, sg, 1);
+		crypto_digest_final(tfm, result);
+
+		hexdump(result, crypto_tfm_alg_digestsize(tfm));
+		printk("%s\n",
+		       memcmp(result, sha1_tv[i].digest,
+			      crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+		       "pass");
+	}
+
+	printk("\ntesting sha1 across pages\n");
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+	memcpy(&xbuf[IDX1], "abcdbcdecdefdefgefghfghighij", 28);
+	memcpy(&xbuf[IDX2], "hijkijkljklmklmnlmnomnopnopq", 28);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 28;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 28;
+
+	memset(result, 0, sizeof (result));
+	crypto_digest_digest(tfm, sg, 2, result);
+	hexdump(result, crypto_tfm_alg_digestsize(tfm));
+	printk("%s\n",
+	       memcmp(result, sha1_tv[1].digest,
+		      crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
+
+	printk("\ntesting hmac_sha1\n");
+
+	tsize = sizeof (hmac_sha1_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, hmac_sha1_tv_template, tsize);
+	hmac_sha1_tv = (void *) tvmem;
+
+	for (i = 0; i < HMAC_SHA1_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+		memset(result, 0, sizeof (result));
+
+		p = hmac_sha1_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = strlen(hmac_sha1_tv[i].plaintext);
+
+		crypto_digest_hmac(tfm, hmac_sha1_tv[i].key,
+				   strlen(hmac_sha1_tv[i].key), sg, 1, result);
+
+		hexdump(result, sizeof (result));
+		printk("%s\n",
+		       memcmp(result, hmac_sha1_tv[i].digest,
+			      crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+		       "pass");
+	}
+
+	printk("\ntesting hmac_sha1 across pages\n");
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	memcpy(&xbuf[IDX1], "what do ya want ", 16);
+	memcpy(&xbuf[IDX2], "for nothing?", 12);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 16;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 12;
+
+	memset(result, 0, sizeof (result));
+	crypto_digest_hmac(tfm, hmac_sha1_tv[1].key,
+			   strlen(hmac_sha1_tv[1].key), sg, 2, result);
+	hexdump(result, crypto_tfm_alg_digestsize(tfm));
+
+	printk("%s\n",
+	       memcmp(result, hmac_sha1_tv[1].digest,
+		      crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
+	crypto_free_tfm(tfm);
+}
+
+void
+test_des(void)
+{
+	unsigned int ret, i, len;
+	unsigned int tsize;
+	char *p, *q;
+	struct crypto_tfm *tfm;
+	char *key;
+	char res[8];
+	struct des_tv *des_tv;
+	struct scatterlist sg[8];
+
+	printk("\ntesting des encryption\n");
+
+	tsize = sizeof (des_enc_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, des_enc_tv_template, tsize);
+	des_tv = (void *) tvmem;
+
+	tfm = crypto_alloc_tfm("des", 0);
+	if (tfm == NULL) {
+		printk("failed to load transform for des (default ecb)\n");
+		return;
+	}
+
+	for (i = 0; i < DES_ENC_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+
+		key = des_tv[i].key;
+		tfm->crt_flags |= CRYPTO_TFM_REQ_WEAK_KEY;
+
+		ret = crypto_cipher_setkey(tfm, key, 8);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+
+			if (!des_tv[i].fail)
+				goto out;
+		}
+
+		len = des_tv[i].len;
+
+		p = des_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = len;
+		ret = crypto_cipher_encrypt(tfm, sg, 1);
+		if (ret) {
+			printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, len);
+
+		printk("%s\n",
+		       memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
+
+	}
+
+	printk("\ntesting des ecb encryption across pages\n");
+
+	i = 5;
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	hexdump(key, 8);
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+	memcpy(&xbuf[IDX1], des_tv[i].plaintext, 8);
+	memcpy(&xbuf[IDX2], des_tv[i].plaintext + 8, 8);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 8;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 8;
+
+	ret = crypto_cipher_encrypt(tfm, sg, 2);
+	if (ret) {
+		printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 8);
+	printk("%s\n", memcmp(q, des_tv[i].result, 8) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 8);
+	printk("%s\n", memcmp(q, des_tv[i].result + 8, 8) ? "fail" : "pass");
+
+	printk("\ntesting des ecb encryption chunking scenario A\n");
+
+	/*
+	 * Scenario A:
+	 * 
+	 *  F1       F2      F3
+	 *  [8 + 6]  [2 + 8] [8]
+	 *       ^^^^^^   ^
+	 *       a    b   c
+	 *
+	 * Chunking should begin at a, then end with b, and
+	 * continue encrypting at an offset of 2 until c.
+	 *
+	 */
+	i = 7;
+
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	/* Frag 1: 8 + 6 */
+	memcpy(&xbuf[IDX3], des_tv[i].plaintext, 14);
+
+	/* Frag 2: 2 + 8 */
+	memcpy(&xbuf[IDX4], des_tv[i].plaintext + 14, 10);
+
+	/* Frag 3: 8 */
+	memcpy(&xbuf[IDX5], des_tv[i].plaintext + 24, 8);
+
+	p = &xbuf[IDX3];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 14;
+
+	p = &xbuf[IDX4];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 10;
+
+	p = &xbuf[IDX5];
+	sg[2].page = virt_to_page(p);
+	sg[2].offset = ((long) p & ~PAGE_MASK);
+	sg[2].length = 8;
+
+	ret = crypto_cipher_encrypt(tfm, sg, 3);
+
+	if (ret) {
+		printk("decrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 14);
+	printk("%s\n", memcmp(q, des_tv[i].result, 14) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 10);
+	printk("%s\n", memcmp(q, des_tv[i].result + 14, 10) ? "fail" : "pass");
+
+	printk("page 3\n");
+	q = kmap(sg[2].page) + sg[2].offset;
+	hexdump(q, 8);
+	printk("%s\n", memcmp(q, des_tv[i].result + 24, 8) ? "fail" : "pass");
+
+	printk("\ntesting des ecb encryption chunking scenario B\n");
+
+	/*
+	 * Scenario B:
+	 * 
+	 *  F1  F2  F3  F4
+	 *  [2] [1] [3] [2 + 8 + 8]
+	 */
+	i = 7;
+
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	/* Frag 1: 2 */
+	memcpy(&xbuf[IDX3], des_tv[i].plaintext, 2);
+
+	/* Frag 2: 1 */
+	memcpy(&xbuf[IDX4], des_tv[i].plaintext + 2, 1);
+
+	/* Frag 3: 3 */
+	memcpy(&xbuf[IDX5], des_tv[i].plaintext + 3, 3);
+
+	/* Frag 4: 2 + 8 + 8 */
+	memcpy(&xbuf[IDX6], des_tv[i].plaintext + 6, 18);
+
+	p = &xbuf[IDX3];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 2;
+
+	p = &xbuf[IDX4];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 1;
+
+	p = &xbuf[IDX5];
+	sg[2].page = virt_to_page(p);
+	sg[2].offset = ((long) p & ~PAGE_MASK);
+	sg[2].length = 3;
+
+	p = &xbuf[IDX6];
+	sg[3].page = virt_to_page(p);
+	sg[3].offset = ((long) p & ~PAGE_MASK);
+	sg[3].length = 18;
+
+	ret = crypto_cipher_encrypt(tfm, sg, 4);
+
+	if (ret) {
+		printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 2);
+	printk("%s\n", memcmp(q, des_tv[i].result, 2) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 1);
+	printk("%s\n", memcmp(q, des_tv[i].result + 2, 1) ? "fail" : "pass");
+
+	printk("page 3\n");
+	q = kmap(sg[2].page) + sg[2].offset;
+	hexdump(q, 3);
+	printk("%s\n", memcmp(q, des_tv[i].result + 3, 3) ? "fail" : "pass");
+
+	printk("page 4\n");
+	q = kmap(sg[3].page) + sg[3].offset;
+	hexdump(q, 18);
+	printk("%s\n", memcmp(q, des_tv[i].result + 6, 18) ? "fail" : "pass");
+
+	printk("\ntesting des ecb encryption chunking scenario C\n");
+
+	/*
+	 * Scenario B:
+	 * 
+	 *  F1  F2  F3  F4  F5
+	 *  [2] [2] [2] [2] [8]
+	 */
+	i = 7;
+
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	/* Frag 1: 2 */
+	memcpy(&xbuf[IDX3], des_tv[i].plaintext, 2);
+
+	/* Frag 2: 2 */
+	memcpy(&xbuf[IDX4], des_tv[i].plaintext + 2, 2);
+
+	/* Frag 3: 2 */
+	memcpy(&xbuf[IDX5], des_tv[i].plaintext + 4, 2);
+
+	/* Frag 4: 2 */
+	memcpy(&xbuf[IDX6], des_tv[i].plaintext + 6, 2);
+
+	/* Frag 5: 8 */
+	memcpy(&xbuf[IDX7], des_tv[i].plaintext + 8, 8);
+
+	p = &xbuf[IDX3];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 2;
+
+	p = &xbuf[IDX4];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 2;
+
+	p = &xbuf[IDX5];
+	sg[2].page = virt_to_page(p);
+	sg[2].offset = ((long) p & ~PAGE_MASK);
+	sg[2].length = 2;
+
+	p = &xbuf[IDX6];
+	sg[3].page = virt_to_page(p);
+	sg[3].offset = ((long) p & ~PAGE_MASK);
+	sg[3].length = 2;
+
+	p = &xbuf[IDX7];
+	sg[4].page = virt_to_page(p);
+	sg[4].offset = ((long) p & ~PAGE_MASK);
+	sg[4].length = 8;
+
+	ret = crypto_cipher_encrypt(tfm, sg, 5);
+
+	if (ret) {
+		printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 2);
+	printk("%s\n", memcmp(q, des_tv[i].result, 2) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 2);
+	printk("%s\n", memcmp(q, des_tv[i].result + 2, 2) ? "fail" : "pass");
+
+	printk("page 3\n");
+	q = kmap(sg[2].page) + sg[2].offset;
+	hexdump(q, 2);
+	printk("%s\n", memcmp(q, des_tv[i].result + 4, 2) ? "fail" : "pass");
+
+	printk("page 4\n");
+	q = kmap(sg[3].page) + sg[3].offset;
+	hexdump(q, 2);
+	printk("%s\n", memcmp(q, des_tv[i].result + 6, 2) ? "fail" : "pass");
+
+	printk("page 5\n");
+	q = kmap(sg[4].page) + sg[4].offset;
+	hexdump(q, 8);
+	printk("%s\n", memcmp(q, des_tv[i].result + 8, 8) ? "fail" : "pass");
+
+	printk("\ntesting des ecb encryption chunking scenario D (atomic)\n");
+
+	/*
+	 * Scenario D, torture test, one byte per frag.
+	 */
+	i = 7;
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	xbuf[IDX1] = des_tv[i].plaintext[0];
+	xbuf[IDX2] = des_tv[i].plaintext[1];
+	xbuf[IDX3] = des_tv[i].plaintext[2];
+	xbuf[IDX4] = des_tv[i].plaintext[3];
+	xbuf[IDX5] = des_tv[i].plaintext[4];
+	xbuf[IDX6] = des_tv[i].plaintext[5];
+	xbuf[IDX7] = des_tv[i].plaintext[6];
+	xbuf[IDX8] = des_tv[i].plaintext[7];
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 1;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 1;
+
+	p = &xbuf[IDX3];
+	sg[2].page = virt_to_page(p);
+	sg[2].offset = ((long) p & ~PAGE_MASK);
+	sg[2].length = 1;
+
+	p = &xbuf[IDX4];
+	sg[3].page = virt_to_page(p);
+	sg[3].offset = ((long) p & ~PAGE_MASK);
+	sg[3].length = 1;
+
+	p = &xbuf[IDX5];
+	sg[4].page = virt_to_page(p);
+	sg[4].offset = ((long) p & ~PAGE_MASK);
+	sg[4].length = 1;
+
+	p = &xbuf[IDX6];
+	sg[5].page = virt_to_page(p);
+	sg[5].offset = ((long) p & ~PAGE_MASK);
+	sg[5].length = 1;
+
+	p = &xbuf[IDX7];
+	sg[6].page = virt_to_page(p);
+	sg[6].offset = ((long) p & ~PAGE_MASK);
+	sg[6].length = 1;
+
+	p = &xbuf[IDX8];
+	sg[7].page = virt_to_page(p);
+	sg[7].offset = ((long) p & ~PAGE_MASK);
+	sg[7].length = 1;
+
+	ret = crypto_cipher_encrypt(tfm, sg, 8);
+	if (ret) {
+		printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	for (i = 0; i < 8; i++)
+		res[i] = *(char *) (kmap(sg[i].page) + sg[i].offset);
+
+	hexdump(res, 8);
+	printk("%s\n", memcmp(res, des_tv[7].result, 8) ? "fail" : "pass");
+
+	printk("\ntesting des decryption\n");
+
+	tsize = sizeof (des_dec_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+	memcpy(tvmem, des_dec_tv_template, tsize);
+	des_tv = (void *) tvmem;
+
+	for (i = 0; i < DES_DEC_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+
+		key = des_tv[i].key;
+
+		tfm->crt_flags = 0;
+		ret = crypto_cipher_setkey(tfm, key, 8);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		len = des_tv[i].len;
+
+		p = des_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = len;
+
+		ret = crypto_cipher_decrypt(tfm, sg, 1);
+		if (ret) {
+			printk("des_decrypt() failed flags=%x\n",
+			       tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, len);
+
+		printk("%s\n",
+		       memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
+
+	}
+
+	printk("\ntesting des ecb decryption across pages\n");
+
+	i = 6;
+
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+	memcpy(&xbuf[IDX1], des_tv[i].plaintext, 8);
+	memcpy(&xbuf[IDX2], des_tv[i].plaintext + 8, 8);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 8;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 8;
+
+	ret = crypto_cipher_decrypt(tfm, sg, 2);
+	if (ret) {
+		printk("decrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 8);
+	printk("%s\n", memcmp(q, des_tv[i].result, 8) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 8);
+	printk("%s\n", memcmp(q, des_tv[i].result + 8, 8) ? "fail" : "pass");
+
+	/*
+	 * Scenario E:
+	 * 
+	 *  F1   F2      F3
+	 *  [3]  [5 + 7] [1]
+	 *
+	 */
+	printk("\ntesting des ecb decryption chunking scenario E\n");
+	i = 2;
+
+	key = des_tv[i].key;
+	tfm->crt_flags = 0;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	memcpy(&xbuf[IDX1], des_tv[i].plaintext, 3);
+	memcpy(&xbuf[IDX2], des_tv[i].plaintext + 3, 12);
+	memcpy(&xbuf[IDX3], des_tv[i].plaintext + 15, 1);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 3;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 12;
+
+	p = &xbuf[IDX3];
+	sg[2].page = virt_to_page(p);
+	sg[2].offset = ((long) p & ~PAGE_MASK);
+	sg[2].length = 1;
+
+	ret = crypto_cipher_decrypt(tfm, sg, 3);
+
+	if (ret) {
+		printk("decrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 3);
+	printk("%s\n", memcmp(q, des_tv[i].result, 3) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 12);
+	printk("%s\n", memcmp(q, des_tv[i].result + 3, 12) ? "fail" : "pass");
+
+	printk("page 3\n");
+	q = kmap(sg[2].page) + sg[2].offset;
+	hexdump(q, 1);
+	printk("%s\n", memcmp(q, des_tv[i].result + 15, 1) ? "fail" : "pass");
+
+	crypto_free_tfm(tfm);
+
+	tfm = crypto_alloc_tfm("des", CRYPTO_TFM_MODE_CBC);
+	if (tfm == NULL) {
+		printk("failed to load transform for des cbc\n");
+		return;
+	}
+
+	printk("\ntesting des cbc encryption (atomic)\n");
+
+	tsize = sizeof (des_cbc_enc_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+	memcpy(tvmem, des_cbc_enc_tv_template, tsize);
+	des_tv = (void *) tvmem;
+
+	crypto_cipher_set_iv(tfm, des_tv[i].iv, crypto_tfm_alg_ivsize(tfm));
+	crypto_cipher_get_iv(tfm, res, crypto_tfm_alg_ivsize(tfm));
+	
+	if (memcmp(res, des_tv[i].iv, sizeof(res))) {
+		printk("crypto_cipher_[set|get]_iv() failed\n");
+		goto out;
+	}
+	
+	for (i = 0; i < DES_CBC_ENC_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+
+		key = des_tv[i].key;
+
+		ret = crypto_cipher_setkey(tfm, key, 8);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		len = des_tv[i].len;
+		p = des_tv[i].plaintext;
+
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = len;
+
+		crypto_cipher_set_iv(tfm, des_tv[i].iv,
+				     crypto_tfm_alg_ivsize(tfm));
+
+		ret = crypto_cipher_encrypt(tfm, sg, 1);
+		if (ret) {
+			printk("des_cbc_encrypt() failed flags=%x\n",
+			       tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, len);
+
+		printk("%s\n",
+		       memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
+	}
+
+	crypto_free_tfm(tfm);
+
+	/*
+	 * Scenario F:
+	 * 
+	 *  F1       F2      
+	 *  [8 + 5]  [3 + 8]
+	 *
+	 */
+	printk("\ntesting des cbc encryption chunking scenario F\n");
+	i = 4;
+
+	tfm = crypto_alloc_tfm("des", CRYPTO_TFM_MODE_CBC);
+	if (tfm == NULL) {
+		printk("failed to load transform for CRYPTO_ALG_DES_CCB\n");
+		return;
+	}
+
+	tfm->crt_flags = 0;
+	key = des_tv[i].key;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+
+	memcpy(&xbuf[IDX1], des_tv[i].plaintext, 13);
+	memcpy(&xbuf[IDX2], des_tv[i].plaintext + 13, 11);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 13;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 11;
+
+	crypto_cipher_set_iv(tfm, des_tv[i].iv, crypto_tfm_alg_ivsize(tfm));
+
+	ret = crypto_cipher_encrypt(tfm, sg, 2);
+	if (ret) {
+		printk("des_cbc_decrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 13);
+	printk("%s\n", memcmp(q, des_tv[i].result, 13) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 11);
+	printk("%s\n", memcmp(q, des_tv[i].result + 13, 11) ? "fail" : "pass");
+
+	tsize = sizeof (des_cbc_dec_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+	memcpy(tvmem, des_cbc_dec_tv_template, tsize);
+	des_tv = (void *) tvmem;
+
+	printk("\ntesting des cbc decryption\n");
+
+	for (i = 0; i < DES_CBC_DEC_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+
+		tfm->crt_flags = 0;
+		key = des_tv[i].key;
+
+		ret = crypto_cipher_setkey(tfm, key, 8);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		len = des_tv[i].len;
+		p = des_tv[i].plaintext;
+
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = len;
+
+		crypto_cipher_set_iv(tfm, des_tv[i].iv,
+				      crypto_tfm_alg_blocksize(tfm));
+
+		ret = crypto_cipher_decrypt(tfm, sg, 1);
+		if (ret) {
+			printk("des_cbc_decrypt() failed flags=%x\n",
+			       tfm->crt_flags);
+			goto out;
+		}
+
+		hexdump(tfm->crt_cipher.cit_iv, 8);
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, len);
+
+		printk("%s\n",
+		       memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
+	}
+
+	/*
+	 * Scenario G:
+	 * 
+	 *  F1   F2      
+	 *  [4]  [4]
+	 *
+	 */
+	printk("\ntesting des cbc decryption chunking scenario G\n");
+	i = 3;
+
+	tfm->crt_flags = 0;
+	key = des_tv[i].key;
+
+	ret = crypto_cipher_setkey(tfm, key, 8);
+	if (ret) {
+		printk("setkey() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	/* setup the dummy buffer first */
+	memset(xbuf, 0, sizeof (xbuf));
+	memcpy(&xbuf[IDX1], des_tv[i].plaintext, 4);
+	memcpy(&xbuf[IDX2], des_tv[i].plaintext + 4, 4);
+
+	p = &xbuf[IDX1];
+	sg[0].page = virt_to_page(p);
+	sg[0].offset = ((long) p & ~PAGE_MASK);
+	sg[0].length = 4;
+
+	p = &xbuf[IDX2];
+	sg[1].page = virt_to_page(p);
+	sg[1].offset = ((long) p & ~PAGE_MASK);
+	sg[1].length = 4;
+
+	crypto_cipher_set_iv(tfm, des_tv[i].iv, crypto_tfm_alg_ivsize(tfm));
+
+	ret = crypto_cipher_decrypt(tfm, sg, 2);
+	if (ret) {
+		printk("des_cbc_decrypt() failed flags=%x\n", tfm->crt_flags);
+		goto out;
+	}
+
+	printk("page 1\n");
+	q = kmap(sg[0].page) + sg[0].offset;
+	hexdump(q, 4);
+	printk("%s\n", memcmp(q, des_tv[i].result, 4) ? "fail" : "pass");
+
+	printk("page 2\n");
+	q = kmap(sg[1].page) + sg[1].offset;
+	hexdump(q, 4);
+	printk("%s\n", memcmp(q, des_tv[i].result + 4, 4) ? "fail" : "pass");
+
+      out:
+	crypto_free_tfm(tfm);
+}
+
+void
+test_des3_ede(void)
+{
+	unsigned int ret, i, len;
+	unsigned int tsize;
+	char *p, *q;
+	struct crypto_tfm *tfm;
+	char *key;
+	/*char res[8]; */
+	struct des_tv *des_tv;
+	struct scatterlist sg[8];
+
+	printk("\ntesting des3 ede encryption\n");
+
+	tsize = sizeof (des3_ede_enc_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, des3_ede_enc_tv_template, tsize);
+	des_tv = (void *) tvmem;
+
+	tfm = crypto_alloc_tfm("des3_ede", CRYPTO_TFM_MODE_ECB);
+	if (tfm == NULL) {
+		printk("failed to load transform for 3des ecb\n");
+		return;
+	}
+
+	for (i = 0; i < DES3_EDE_ENC_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+
+		key = des_tv[i].key;
+		ret = crypto_cipher_setkey(tfm, key, 24);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+
+			if (!des_tv[i].fail)
+				goto out;
+		}
+
+		len = des_tv[i].len;
+
+		p = des_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = len;
+		ret = crypto_cipher_encrypt(tfm, sg, 1);
+		if (ret) {
+			printk("encrypt() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, len);
+
+		printk("%s\n",
+		       memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
+	}
+
+	printk("\ntesting des3 ede decryption\n");
+
+	tsize = sizeof (des3_ede_dec_tv_template);
+	if (tsize > TVMEMSIZE) {
+		printk("template (%u) too big for tvmem (%u)\n", tsize,
+		       TVMEMSIZE);
+		return;
+	}
+
+	memcpy(tvmem, des3_ede_dec_tv_template, tsize);
+	des_tv = (void *) tvmem;
+
+	for (i = 0; i < DES3_EDE_DEC_TEST_VECTORS; i++) {
+		printk("test %u:\n", i + 1);
+
+		key = des_tv[i].key;
+		ret = crypto_cipher_setkey(tfm, key, 24);
+		if (ret) {
+			printk("setkey() failed flags=%x\n", tfm->crt_flags);
+
+			if (!des_tv[i].fail)
+				goto out;
+		}
+
+		len = des_tv[i].len;
+
+		p = des_tv[i].plaintext;
+		sg[0].page = virt_to_page(p);
+		sg[0].offset = ((long) p & ~PAGE_MASK);
+		sg[0].length = len;
+		ret = crypto_cipher_decrypt(tfm, sg, 1);
+		if (ret) {
+			printk("decrypt() failed flags=%x\n", tfm->crt_flags);
+			goto out;
+		}
+
+		q = kmap(sg[0].page) + sg[0].offset;
+		hexdump(q, len);
+
+		printk("%s\n",
+		       memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
+	}
+
+      out:
+	crypto_free_tfm(tfm);
+}
+
+static void
+do_test(void)
+{
+	switch (mode) {
+
+	case 0:
+		test_md5();
+		test_sha1();
+		test_des();
+		test_des3_ede();
+		test_md4();
+		break;
+
+	case 1:
+		test_md5();
+		break;
+
+	case 2:
+		test_sha1();
+		break;
+
+	case 3:
+		test_des();
+		break;
+
+	case 4:
+		test_des3_ede();
+		break;
+
+	case 5:
+		test_md4();
+		break;
+
+	default:
+		/* useful for debugging */
+		printk("not testing anything\n");
+		break;
+	}
+}
+
+static int __init
+init(void)
+{
+	tvmem = kmalloc(TVMEMSIZE, GFP_KERNEL);
+	if (tvmem == NULL)
+		return -ENOMEM;
+
+	xbuf = kmalloc(XBUFSIZE, GFP_KERNEL);
+	if (xbuf == NULL) {
+		kfree(tvmem);
+		return -ENOMEM;
+	}
+
+	do_test();
+
+	kfree(xbuf);
+	kfree(tvmem);
+	return 0;
+}
+
+module_init(init);
+
+MODULE_PARM(mode, "i");
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Quick & dirty crypto testing module");
+MODULE_AUTHOR("James Morris <jmorris@intercode.com.au>");
diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/crypto/tcrypt.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,746 @@
+/* 
+ * Quick & dirty crypto testing module.
+ *
+ * This will only exist until we have a better testing mechanism
+ * (e.g. a char device).
+ *
+ * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.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 _CRYPTO_TCRYPT_H
+#define _CRYPTO_TCRYPT_H
+
+#define MD5_DIGEST_SIZE		16
+#define MD4_DIGEST_SIZE		16
+#define SHA1_DIGEST_SIZE	20
+
+/*
+ * MD4 test vectors from RFC1320
+ */
+#define MD4_TEST_VECTORS	7
+
+struct md4_testvec {
+	char plaintext[128];
+	char digest[MD4_DIGEST_SIZE];
+} md4_tv_template[] = {
+	{ "",
+		{ 0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31,
+		  0xb7, 0x3c, 0x59, 0xd7, 0xe0, 0xc0, 0x89, 0xc0 }
+	},
+	
+	{ "a",
+		{ 0xbd, 0xe5, 0x2c, 0xb3, 0x1d, 0xe3, 0x3e, 0x46,
+		  0x24, 0x5e, 0x05, 0xfb, 0xdb, 0xd6, 0xfb, 0x24 }
+	},
+
+	{ "abc",
+		{ 0xa4, 0x48, 0x01, 0x7a, 0xaf, 0x21, 0xd8, 0x52,
+		  0x5f, 0xc1, 0x0a, 0xe8, 0x7a, 0xa6, 0x72, 0x9d }
+	},
+	
+	{ "message digest",
+		{ 0xd9, 0x13, 0x0a, 0x81, 0x64, 0x54, 0x9f, 0xe8,
+		  0x18, 0x87, 0x48, 0x06, 0xe1, 0xc7, 0x01, 0x4b }
+	},
+	
+	{ "abcdefghijklmnopqrstuvwxyz",
+		{ 0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd,
+		  0xee, 0xa8, 0xed, 0x63, 0xdf, 0x41, 0x2d, 0xa9 }
+	},
+		
+	{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+		{ 0x04, 0x3f, 0x85, 0x82, 0xf2, 0x41, 0xdb, 0x35,
+		  0x1c, 0xe6, 0x27, 0xe1, 0x53, 0xe7, 0xf0, 0xe4 }
+	},
+	
+	{ "123456789012345678901234567890123456789012345678901234567890123"
+	  "45678901234567890",
+		{ 0xe3, 0x3b, 0x4d, 0xdc, 0x9c, 0x38, 0xf2, 0x19,
+		  0x9c, 0x3e, 0x7b, 0x16, 0x4f, 0xcc, 0x05, 0x36 }
+	},
+};
+
+/*
+ * MD5 test vectors from RFC1321
+ */
+#define MD5_TEST_VECTORS	7
+
+struct md5_testvec {
+	char plaintext[128];
+	char digest[MD5_DIGEST_SIZE];
+} md5_tv_template[] = {
+	{ "",
+		{ 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
+		  0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } },
+	        	
+	{ "a",
+		{ 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8,
+		  0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } },
+		  
+	{ "abc",
+		{ 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
+		  0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } }, 
+		  
+	{ "message digest",
+		{ 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d,
+		  0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } },
+		  
+	{ "abcdefghijklmnopqrstuvwxyz",
+		{ 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00,
+		  0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } },
+		  
+	{ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+		{ 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5,
+		  0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } },
+		  
+	{ "12345678901234567890123456789012345678901234567890123456789012"
+	  "345678901234567890",
+		{ 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55,
+		  0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } }
+};
+
+/*
+ * HMAC-MD5 test vectors from RFC2202
+ * (These need to be fixed to not use strlen).
+ */
+#define HMAC_MD5_TEST_VECTORS	7
+
+struct hmac_md5_testvec {
+	char key[128];
+	char plaintext[128];
+	char digest[MD5_DIGEST_SIZE];
+};
+
+struct hmac_md5_testvec hmac_md5_tv_template[] =
+{
+	
+	{
+		{ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+		  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x00},
+		  
+		"Hi There",
+		
+		{ 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
+		  0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d }
+	},
+	    
+	{
+		{ 'J', 'e', 'f', 'e', 0 },
+		
+		"what do ya want for nothing?",
+		
+		{ 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
+		  0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 }
+	},
+	
+	{
+		{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00 },
+		  
+		{ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0x00 },
+		  
+		{ 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
+		  0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6 }
+	},
+	
+	{
+		{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+		  0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 
+		  0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x00 },
+		  
+		{ 
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0x00 },
+		  
+		{ 0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea,
+		  0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79 }
+	},
+	
+	{
+		{ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
+		  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00 },
+		  
+		"Test With Truncation",
+		
+		{ 0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00,
+		  0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c }
+	},
+	
+	{
+		{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0x00 },
+		  
+		"Test Using Larger Than Block-Size Key - Hash Key First",
+		
+		{ 0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f,
+		  0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd }
+	},
+	
+	{
+		{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0x00 },
+		
+		"Test Using Larger Than Block-Size Key and Larger Than One "
+		"Block-Size Data",
+		
+		{ 0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee,
+		  0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e }
+	}
+};
+
+	
+/*
+ * HMAC-SHA1 test vectors from RFC2202
+ */
+
+#define HMAC_SHA1_TEST_VECTORS	7
+
+struct hmac_sha1_testvec {
+	char key[128];
+	char plaintext[128];
+	char digest[SHA1_DIGEST_SIZE];
+} hmac_sha1_tv_template[] = {
+	
+	{
+		{ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+		  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+		  0x00},
+		  
+		"Hi There",
+
+		{ 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
+                  0xe2, 0x8b, 0xc0, 0xb6, 0xfb ,0x37, 0x8c, 0x8e, 0xf1,
+                  0x46, 0xbe, 0x00 }
+	},
+	    
+	{
+		{ 'J', 'e', 'f', 'e', 0 },
+		
+		"what do ya want for nothing?",
+
+		{ 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2, 0xd2, 0x74, 
+		  0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c, 0x25, 0x9a, 0x7c, 0x79 }
+
+	},
+	
+	{
+		{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0x00},
+
+		  
+		{ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+		  0x00 },
+		  
+		{ 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd, 0x91, 0xa3, 
+		  0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f, 0x63, 0xf1, 0x75, 0xd3 }
+
+	},
+	
+	{
+		{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+		  0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 
+		  0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x00 },
+		  
+		{ 
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+		  0x00 },
+		  
+		{ 0x4c, 0x90, 0x07, 0xf4, 0x02, 0x62, 0x50, 0xc6, 0xbc, 0x84, 
+		  0x14, 0xf9, 0xbf, 0x50, 0xc8, 0x6c, 0x2d, 0x72, 0x35, 0xda }
+
+	},
+	
+	{
+		{ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
+		  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
+		  0x00 },
+		  
+		"Test With Truncation",
+		
+		{ 0x4c, 0x1a, 0x03, 0x42, 0x4b, 0x55, 0xe0, 0x7f, 0xe7, 0xf2, 
+  		  0x7b, 0xe1, 0xd5, 0x8b, 0xb9, 0x32, 0x4a, 0x9a, 0x5a, 0x04 }
+
+	},
+	
+	{
+		{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0x00 },
+		  
+		"Test Using Larger Than Block-Size Key - Hash Key First",
+		
+		{ 0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72, 0xd0, 0x0e, 0x95, 0x70, 
+  		  0x56, 0x37, 0xce, 0x8a, 0x3b, 0x55, 0xed, 0x40, 0x21, 0x12 }
+
+	},
+	
+	{
+		{ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+		  0x00 },
+		
+		"Test Using Larger Than Block-Size Key and Larger Than One "
+		"Block-Size Data",
+		
+		{ 0xe8, 0xe9, 0x9d, 0x0f, 0x45, 0x23, 0x7d, 0x78, 0x6d, 0x6b, 
+		  0xba, 0xa7, 0x96, 0x5c, 0x78, 0x08, 0xbb, 0xff, 0x1a, 0x91 }
+	}
+};
+
+
+/*
+ * SHA1 test vectors  from from FIPS PUB 180-1
+ */
+#define SHA1_TEST_VECTORS	2
+
+struct sha1_testvec {
+	char plaintext[128];
+	char digest[SHA1_DIGEST_SIZE];
+} sha1_tv_template[] = {
+	{ "abc",
+	  { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E, 
+	    0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C ,0x9C, 0xD0, 0xD8, 0x9D }
+	},
+	        	
+	{ "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+
+	  { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E ,0xBA, 0xAE,
+	    0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 }
+	}
+};
+
+/*
+ * DES test vectors (also need to test for weak keys etc).
+ */
+#define DES_ENC_TEST_VECTORS		5
+#define DES_DEC_TEST_VECTORS		2
+#define DES_CBC_ENC_TEST_VECTORS	4
+#define DES_CBC_DEC_TEST_VECTORS	3
+#define DES3_EDE_ENC_TEST_VECTORS	3
+#define DES3_EDE_DEC_TEST_VECTORS	3
+
+struct des_tv {
+	unsigned int len;
+	int fail;
+	char key[24];
+	char iv[8];
+	char plaintext[128];
+	char result[128];
+};
+
+struct des_tv des_enc_tv_template[] = {
+
+	/* From Applied Cryptography */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0 },
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }
+	},
+	
+	/* Same key, different plaintext block */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0 },
+		{ 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+		{ 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }
+	},
+	
+	/* Sbox test from NBS */
+	{
+		8, 0,
+		
+		{ 0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57 },
+		{ 0 },
+		{ 0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42 },
+		{ 0x69, 0x0F, 0x5B, 0x0D, 0x9A, 0x26, 0x93, 0x9B }
+	},
+	
+	/* Three blocks */
+	{
+		24, 0,
+		
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		
+		{ 0 },
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+		  0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
+		  0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef },
+
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+		  0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
+		  0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90 },		  
+	},
+	
+	/* Weak key */
+	{
+		8, 1,
+		
+		{ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
+		{ 0 },
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }
+	},
+	
+	/* Two blocks -- for testing encryption across pages */
+	{
+		16, 0,
+		
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		
+		{ 0 },
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+		  0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+		  0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }
+	},
+
+	/* Two blocks -- for testing decryption across pages */
+	{
+		16, 0,
+		
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		
+		{ 0 },
+		
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+		  0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+		  
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+		  0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+	},
+	
+	/* Four blocks -- for testing encryption with chunking */
+	{
+		24, 0,
+		
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		
+		{ 0 },
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+		  0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
+		  0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef,
+		  0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+		  0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
+		  0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90,
+		  0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+	},
+	
+};
+
+struct des_tv des_dec_tv_template[] = {
+
+	/* From Applied Cryptography */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0 },
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d },
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+	},
+	
+	/* Sbox test from NBS */
+	{
+		8, 0,
+
+		{ 0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57 },
+		{ 0 },
+		{ 0x69, 0x0F, 0x5B, 0x0D, 0x9A, 0x26, 0x93, 0x9B },
+		{ 0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42 }
+	},
+	
+	/* Two blocks, for chunking test */
+	{
+		16, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0 },
+		
+		{ 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+		  0x69, 0x0F, 0x5B, 0x0D, 0x9A, 0x26, 0x93, 0x9B },
+		  
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+		  0xa3, 0x99, 0x7b, 0xca, 0xaf, 0x69, 0xa0, 0xf5 }
+	},
+
+};
+
+struct des_tv des_cbc_enc_tv_template[] = {
+	/* From OpenSSL */
+	{
+		24, 0,
+		
+		{0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
+		{0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},
+		
+		{ 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 
+		  0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 
+		  0x68, 0x65, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 
+		  0x66, 0x6F, 0x72, 0x20, 0x00, 0x31, 0x00, 0x00 },
+		  
+		{ 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, 
+		  0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, 
+		  0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68, 
+		  0x1d, 0x26, 0x93, 0x97, 0xf7, 0xfe, 0x62, 0xb4 }
+	},
+
+	/* FIPS Pub 81 */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef },
+		{ 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 },
+		{ 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+		
+	},
+	
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+		{ 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 },
+		{ 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+	},
+	
+	{	
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+		{ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+		{ 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 },
+	},
+	
+	/* Copy of openssl vector for chunk testing */
+	
+	/* From OpenSSL */
+	{
+		24, 0,
+		
+		{0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
+		{0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},
+		
+		{ 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 
+		  0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 
+		  0x68, 0x65, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 
+		  0x66, 0x6F, 0x72, 0x20, 0x00, 0x31, 0x00, 0x00 },
+		  
+		{ 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, 
+		  0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, 
+		  0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68, 
+		  0x1d, 0x26, 0x93, 0x97, 0xf7, 0xfe, 0x62, 0xb4 }
+	},
+
+	
+};
+
+struct des_tv des_cbc_dec_tv_template[] = {
+
+	/* FIPS Pub 81 */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef },
+		{ 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+		{ 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 },
+	},
+	
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+		{ 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+		{ 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, 
+	},
+	
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+		{ 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, 
+		{ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+	},
+	
+	/* Copy of above, for chunk testing */
+	
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+		{ 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+		{ 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, 
+		{ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+	},
+};
+
+/*
+ * We really need some more test vectors, especially for DES3 CBC.
+ */
+struct des_tv des3_ede_enc_tv_template[] = {
+
+	/* These are from openssl */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+		  0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+		  0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
+		  
+		{ 0 },
+		
+		{ 0x73, 0x6F, 0x6D, 0x65, 0x64, 0x61, 0x74, 0x61  },
+		
+		{ 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 },
+	},
+	
+	{
+		8, 0,
+		
+		{ 0x03,0x52,0x02,0x07,0x67,0x20,0x82,0x17,
+		  0x86,0x02,0x87,0x66,0x59,0x08,0x21,0x98,
+		  0x64,0x05,0x6A,0xBD,0xFE,0xA9,0x34,0x57  },
+		 
+		{ 0 },
+		
+		{ 0x73,0x71,0x75,0x69,0x67,0x67,0x6C,0x65  },
+		
+		{ 0xc0,0x7d,0x2a,0x0f,0xa5,0x66,0xfa,0x30  }
+	},
+	
+
+	{
+		8, 0,
+		
+		{ 0x10,0x46,0x10,0x34,0x89,0x98,0x80,0x20,
+		  0x91,0x07,0xD0,0x15,0x89,0x19,0x01,0x01,
+		  0x19,0x07,0x92,0x10,0x98,0x1A,0x01,0x01  },
+		  
+		{ 0 },
+			  
+		{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00  },
+		
+		{ 0xe1,0xef,0x62,0xc3,0x32,0xfe,0x82,0x5b  }	
+	},
+};
+
+struct des_tv des3_ede_dec_tv_template[] = {
+
+	/* These are from openssl */
+	{
+		8, 0,
+		
+		{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
+		  0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+		  0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
+		  
+		{ 0 },
+		
+		
+		{ 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 },
+		
+		{ 0x73, 0x6F, 0x6D, 0x65, 0x64, 0x61, 0x74, 0x61  },
+	},
+	
+	{
+		8, 0,
+		
+		{ 0x03,0x52,0x02,0x07,0x67,0x20,0x82,0x17,
+		  0x86,0x02,0x87,0x66,0x59,0x08,0x21,0x98,
+		  0x64,0x05,0x6A,0xBD,0xFE,0xA9,0x34,0x57  },
+		 
+		{ 0 },
+		
+		{ 0xc0,0x7d,0x2a,0x0f,0xa5,0x66,0xfa,0x30  },
+		
+		{ 0x73,0x71,0x75,0x69,0x67,0x67,0x6C,0x65  },
+		
+	},
+	
+
+	{
+		8, 0,
+		
+		{ 0x10,0x46,0x10,0x34,0x89,0x98,0x80,0x20,
+		  0x91,0x07,0xD0,0x15,0x89,0x19,0x01,0x01,
+		  0x19,0x07,0x92,0x10,0x98,0x1A,0x01,0x01  },
+		  
+		{ 0 },
+			  
+		{ 0xe1,0xef,0x62,0xc3,0x32,0xfe,0x82,0x5b  },
+		
+		{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00  },
+	},
+};
+	
+#endif	/* _CRYPTO_TCRYPT_H */
+
diff -Nru a/drivers/acorn/block/Config.help b/drivers/acorn/block/Config.help
--- a/drivers/acorn/block/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-CONFIG_BLK_DEV_MFM
-  Support the MFM hard drives on the Acorn Archimedes both
-  on-board the A4x0 motherboards and via the Acorn MFM podules.
-  Drives up to 64MB are supported. If you haven't got one of these
-  machines or drives just say N.
-
-CONFIG_BLK_DEV_FD1772
-  Support the floppy drive on the Acorn Archimedes (A300, A4x0, A540,
-  R140 and R260) series of computers; it supports only 720K floppies
-  at the moment. If you don't have one of these machines just answer
-  N.
-
-CONFIG_BLK_DEV_MFM_AUTODETECT
-  If you answer Y, the MFM code will attempt to automatically detect
-  the cylinders/heads/sectors count on your hard drive. WARNING: This
-  sometimes doesn't work and it also does some dodgy stuff which
-  potentially might damage your drive.
-
diff -Nru a/drivers/acorn/block/Config.in b/drivers/acorn/block/Config.in
--- a/drivers/acorn/block/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,15 +0,0 @@
-#
-# Block device driver configuration
-#
-mainmenu_option next_comment
-comment 'Acorn-specific block devices'
-
-if [ "$CONFIG_ARCH_ARC" = "y" -o "$CONFIG_ARCH_A5K" = "y" ]; then
-   tristate 'Old Archimedes floppy (1772) support' CONFIG_BLK_DEV_FD1772
-   tristate 'MFM harddisk support' CONFIG_BLK_DEV_MFM
-   if [ "$CONFIG_BLK_DEV_MFM" != "n" ]; then
-      bool '  Autodetect hard drive geometry' CONFIG_BLK_DEV_MFM_AUTODETECT
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/acorn/block/Kconfig b/drivers/acorn/block/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/acorn/block/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,36 @@
+#
+# Block device driver configuration
+#
+
+menu "Acorn-specific block devices"
+	depends on ARCH_ACORN
+
+config BLK_DEV_FD1772
+	tristate "Old Archimedes floppy (1772) support"
+	depends on ARCH_ARC || ARCH_A5K
+	help
+	  Support the floppy drive on the Acorn Archimedes (A300, A4x0, A540,
+	  R140 and R260) series of computers; it supports only 720K floppies
+	  at the moment. If you don't have one of these machines just answer
+	  N.
+
+config BLK_DEV_MFM
+	tristate "MFM harddisk support"
+	depends on ARCH_ARC || ARCH_A5K
+	help
+	  Support the MFM hard drives on the Acorn Archimedes both
+	  on-board the A4x0 motherboards and via the Acorn MFM podules.
+	  Drives up to 64MB are supported. If you haven't got one of these
+	  machines or drives just say N.
+
+config BLK_DEV_MFM_AUTODETECT
+	bool "Autodetect hard drive geometry"
+	depends on BLK_DEV_MFM
+	help
+	  If you answer Y, the MFM code will attempt to automatically detect
+	  the cylinders/heads/sectors count on your hard drive. WARNING: This
+	  sometimes doesn't work and it also does some dodgy stuff which
+	  potentially might damage your drive.
+
+endmenu
+
diff -Nru a/drivers/acorn/block/fd1772.c b/drivers/acorn/block/fd1772.c
--- a/drivers/acorn/block/fd1772.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acorn/block/fd1772.c	Wed Oct 30 16:44:27 2002
@@ -152,11 +152,6 @@
 #include <asm/uaccess.h>
 
 
-#define MAJOR_NR FLOPPY_MAJOR
-#define FLOPPY_DMA 0
-#define DEVICE_NAME "floppy"
-#define DEVICE_NR(device) ( (minor(device) & 3) | ((minor(device) & 0x80 ) >> 5 ))
-#define QUEUE (&floppy_queue)
 #include <linux/blk.h>
 
 /* Note: FD_MAX_UNITS could be redefined to 2 for the Atari (with
@@ -182,6 +177,12 @@
 
 static struct request_queue floppy_queue;
 
+#define MAJOR_NR FLOPPY_MAJOR
+#define FLOPPY_DMA 0
+#define DEVICE_NAME "floppy"
+#define QUEUE (&floppy_queue)
+#define CURRENT elv_next_request(&floppy_queue)
+
 /* Disk types: DD */
 static struct archy_disk_type {
 	const char *name;
@@ -1208,8 +1209,8 @@
 	int device, drive, type;
 	struct archy_floppy_struct *floppy;
 
-	DPRINT(("redo_fd_request: CURRENT=%08lx CURRENT->rq_dev=%04x CURRENT->sector=%ld\n",
-		(unsigned long) CURRENT, CURRENT ? CURRENT->rq_dev : 0,
+	DPRINT(("redo_fd_request: CURRENT=%p dev=%s CURRENT->sector=%ld\n",
+		CURRENT, CURRENT ? CURRENT->rq_disk->disk_name : "",
 		!blk_queue_empty(QUEUE) ? CURRENT->sector : 0));
 
 repeat:
@@ -1217,13 +1218,6 @@
 	if (blk_queue_empty(QUEUE))
 		goto the_end;
 
-	if (major(CURRENT->rq_dev) != MAJOR_NR)
-		panic(DEVICE_NAME ": request list destroyed");
-
-	if (CURRENT->bh) {
-		if (!buffer_locked(CURRENT->bh))
-			panic(DEVICE_NAME ": block not locked");
-	}
 	device = minor(CURRENT->rq_dev);
 	drive = device & 3;
 	type = device >> 2;
@@ -1534,6 +1528,7 @@
 	int drive = *part & 3;
 	if ((*part >> 2) > NUM_DISK_TYPES || drive >= FD_MAX_UNITS)
 		return NULL;
+	*part = 0;
 	return get_disk(disks[drive]);
 }
 
diff -Nru a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c
--- a/drivers/acorn/block/mfmhd.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/acorn/block/mfmhd.c	Wed Oct 30 16:44:25 2002
@@ -105,16 +105,12 @@
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/timer.h>
-#include <linux/tqueue.h>
 #include <linux/mm.h>
 #include <linux/errno.h>
 #include <linux/genhd.h>
 #include <linux/major.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-
-#define MAJOR_NR	MFM_ACORN_MAJOR
-#define QUEUE (&mfm_queue)
 #include <linux/blk.h>
 #include <linux/blkpg.h>
 
@@ -130,6 +126,10 @@
 static void (*do_mfm)(void) = NULL;
 static struct request_queue mfm_queue;
 static spinlock_t mfm_lock = SPIN_LOCK_UNLOCKED;
+
+#define MAJOR_NR	MFM_ACORN_MAJOR
+#define QUEUE (&mfm_queue)
+#define CURRENT elv_next_request(&mfm_queue)
 /*
  * This sort of stuff should be in a header file shared with ide.c, hd.c, xd.c etc
  */
diff -Nru a/drivers/acorn/net/Config.help b/drivers/acorn/net/Config.help
--- a/drivers/acorn/net/Config.help	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-CONFIG_ARM_ETHER1
-  If you have an Acorn system with one of these (AKA25) network cards,
-  you should say Y to this option if you wish to use it with Linux.
-
-CONFIG_ARM_ETHER3
-  If you have an Acorn system with one of these network cards, you
-  should say Y to this option if you wish to use it with Linux.
-
-CONFIG_ARM_ETHERH
-  If you have an Acorn system with one of these network cards, you
-  should say Y to this option if you wish to use it with Linux.
-
diff -Nru a/drivers/acorn/net/Config.in b/drivers/acorn/net/Config.in
--- a/drivers/acorn/net/Config.in	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# Acorn Network device configuration
-#  These are for Acorn's Expansion card network interfaces
-#
-tristate '  Acorn Ether1 support' CONFIG_ARM_ETHER1
-tristate '  Acorn/ANT Ether3 support' CONFIG_ARM_ETHER3
-tristate '  I-cubed EtherH/ANT EtherM support' CONFIG_ARM_ETHERH
diff -Nru a/drivers/acorn/net/Kconfig b/drivers/acorn/net/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/acorn/net/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,25 @@
+#
+# Acorn Network device configuration
+#  These are for Acorn's Expansion card network interfaces
+#
+config ARM_ETHER1
+	tristate "Acorn Ether1 support"
+	depends on NET_ETHERNET && ARM && ARCH_ACORN
+	help
+	  If you have an Acorn system with one of these (AKA25) network cards,
+	  you should say Y to this option if you wish to use it with Linux.
+
+config ARM_ETHER3
+	tristate "Acorn/ANT Ether3 support"
+	depends on NET_ETHERNET && ARM && ARCH_ACORN
+	help
+	  If you have an Acorn system with one of these network cards, you
+	  should say Y to this option if you wish to use it with Linux.
+
+config ARM_ETHERH
+	tristate "I-cubed EtherH/ANT EtherM support"
+	depends on NET_ETHERNET && ARM && ARCH_ACORN
+	help
+	  If you have an Acorn system with one of these network cards, you
+	  should say Y to this option if you wish to use it with Linux.
+
diff -Nru a/drivers/acorn/scsi/Config.help b/drivers/acorn/scsi/Config.help
--- a/drivers/acorn/scsi/Config.help	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,53 +0,0 @@
-CONFIG_SCSI_ACORNSCSI_3
-  This enables support for the Acorn SCSI card (aka30). If you have an
-  Acorn system with one of these, say Y. If unsure, say N.
-
-CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-  Say Y here to enable tagged queuing support on the Acorn SCSI card.
-
-  This is a feature of SCSI-2 which improves performance: the host
-  adapter can send several SCSI commands to a device's queue even if
-  previous commands haven't finished yet. Some SCSI devices don't
-  implement this properly, so the safe answer is N.
-
-CONFIG_SCSI_ACORNSCSI_SYNC
-  Say Y here to enable synchronous transfer negotiation with all
-  targets on the Acorn SCSI card.
-
-  In general, this improves performance; however some SCSI devices
-  don't implement it properly, so the safe answer is N.
-
-CONFIG_SCSI_ARXESCSI
-  Around 1991, Arxe Systems Limited released a high density floppy
-  disc interface for the Acorn Archimedes range, to allow the use of
-  HD discs from the then new A5000 on earlier models. This interface
-  was either sold on its own or with an integral SCSI controller.
-  Technical details on this NCR53c94-based device are available at
-  <http://www.cryton.demon.co.uk/acornbits/scsi_arxe.html>
-  Say Y here to compile in support for the SCSI controller.
-
-CONFIG_SCSI_OAK1
-  This enables support for the Oak SCSI card. If you have an Acorn
-  system with one of these, say Y. If unsure, say N.
-
-CONFIG_SCSI_CUMANA_1
-  This enables support for the Cumana SCSI I card. If you have an
-  Acorn system with one of these, say Y. If unsure, say N.
-
-CONFIG_SCSI_CUMANA_2
-  This enables support for the Cumana SCSI II card. If you have an
-  Acorn system with one of these, say Y. If unsure, say N.
-
-CONFIG_SCSI_ECOSCSI
-  This enables support for the EcoSCSI card -- a small card that sits
-  in the Econet socket. If you have an Acorn system with one of these,
-  say Y. If unsure, say N.
-
-CONFIG_SCSI_EESOXSCSI
-  This enables support for the EESOX SCSI card. If you have an Acorn
-  system with one of these, say Y, otherwise say N.
-
-CONFIG_SCSI_POWERTECSCSI
-  This enables support for the Powertec SCSI card on Acorn systems. If
-  you have one of these, say Y. If unsure, say N.
-
diff -Nru a/drivers/acorn/scsi/Config.in b/drivers/acorn/scsi/Config.in
--- a/drivers/acorn/scsi/Config.in	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,23 +0,0 @@
-#
-# SCSI driver configuration for Acorn
-#
-dep_tristate 'Acorn SCSI card (aka30) support' CONFIG_SCSI_ACORNSCSI_3 $CONFIG_SCSI
-if [ "$CONFIG_SCSI_ACORNSCSI_3" != "n" ]; then
-   bool '  Support SCSI 2 Tagged queueing' CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE
-   bool '  Support SCSI 2 Synchronous Transfers' CONFIG_SCSI_ACORNSCSI_SYNC
-fi
-dep_tristate 'ARXE SCSI support' CONFIG_SCSI_ARXESCSI $CONFIG_SCSI
-dep_tristate 'CumanaSCSI II support' CONFIG_SCSI_CUMANA_2 $CONFIG_SCSI
-dep_tristate 'EESOX support' CONFIG_SCSI_EESOXSCSI $CONFIG_SCSI
-dep_tristate 'PowerTec support' CONFIG_SCSI_POWERTECSCSI $CONFIG_SCSI
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   comment 'The following drivers are not fully supported'
-
-   dep_tristate 'CumanaSCSI I support (EXPERIMENTAL)' CONFIG_SCSI_CUMANA_1 $CONFIG_SCSI
-   if [ "$CONFIG_ARCH_ARC" = "y" -o "$CONFIG_ARCH_A5K" = "y" ]; then
-      dep_tristate 'EcoScsi support (EXPERIMENTAL)' CONFIG_SCSI_ECOSCSI $CONFIG_SCSI
-   fi
-   dep_tristate 'Oak SCSI support (EXPERIMENTAL)' CONFIG_SCSI_OAK1 $CONFIG_SCSI
-fi
-
diff -Nru a/drivers/acorn/scsi/Kconfig b/drivers/acorn/scsi/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/acorn/scsi/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,89 @@
+#
+# SCSI driver configuration for Acorn
+#
+config SCSI_ACORNSCSI_3
+	tristate "Acorn SCSI card (aka30) support"
+	depends on ARCH_ACORN && SCSI
+	help
+	  This enables support for the Acorn SCSI card (aka30). If you have an
+	  Acorn system with one of these, say Y. If unsure, say N.
+
+config SCSI_ACORNSCSI_TAGGED_QUEUE
+	bool "Support SCSI 2 Tagged queueing"
+	depends on SCSI_ACORNSCSI_3
+	help
+	  Say Y here to enable tagged queuing support on the Acorn SCSI card.
+
+	  This is a feature of SCSI-2 which improves performance: the host
+	  adapter can send several SCSI commands to a device's queue even if
+	  previous commands haven't finished yet. Some SCSI devices don't
+	  implement this properly, so the safe answer is N.
+
+config SCSI_ACORNSCSI_SYNC
+	bool "Support SCSI 2 Synchronous Transfers"
+	depends on SCSI_ACORNSCSI_3
+	help
+	  Say Y here to enable synchronous transfer negotiation with all
+	  targets on the Acorn SCSI card.
+
+	  In general, this improves performance; however some SCSI devices
+	  don't implement it properly, so the safe answer is N.
+
+config SCSI_ARXESCSI
+	tristate "ARXE SCSI support"
+	depends on ARCH_ACORN && SCSI
+	help
+	  Around 1991, Arxe Systems Limited released a high density floppy
+	  disc interface for the Acorn Archimedes range, to allow the use of
+	  HD discs from the then new A5000 on earlier models. This interface
+	  was either sold on its own or with an integral SCSI controller.
+	  Technical details on this NCR53c94-based device are available at
+	  <http://www.cryton.demon.co.uk/acornbits/scsi_arxe.html>
+	  Say Y here to compile in support for the SCSI controller.
+
+config SCSI_CUMANA_2
+	tristate "CumanaSCSI II support"
+	depends on ARCH_ACORN && SCSI
+	help
+	  This enables support for the Cumana SCSI II card. If you have an
+	  Acorn system with one of these, say Y. If unsure, say N.
+
+config SCSI_EESOXSCSI
+	tristate "EESOX support"
+	depends on ARCH_ACORN && SCSI
+	help
+	  This enables support for the EESOX SCSI card. If you have an Acorn
+	  system with one of these, say Y, otherwise say N.
+
+config SCSI_POWERTECSCSI
+	tristate "PowerTec support"
+	depends on ARCH_ACORN && SCSI
+	help
+	  This enables support for the Powertec SCSI card on Acorn systems. If
+	  you have one of these, say Y. If unsure, say N.
+
+comment "The following drivers are not fully supported"
+	depends on ARCH_ACORN && EXPERIMENTAL
+
+config SCSI_CUMANA_1
+	tristate "CumanaSCSI I support (EXPERIMENTAL)"
+	depends on ARCH_ACORN && EXPERIMENTAL && SCSI
+	help
+	  This enables support for the Cumana SCSI I card. If you have an
+	  Acorn system with one of these, say Y. If unsure, say N.
+
+config SCSI_ECOSCSI
+	tristate "EcoScsi support (EXPERIMENTAL)"
+	depends on ARCH_ACORN && EXPERIMENTAL && (ARCH_ARC || ARCH_A5K) && SCSI
+	help
+	  This enables support for the EcoSCSI card -- a small card that sits
+	  in the Econet socket. If you have an Acorn system with one of these,
+	  say Y. If unsure, say N.
+
+config SCSI_OAK1
+	tristate "Oak SCSI support (EXPERIMENTAL)"
+	depends on ARCH_ACORN && EXPERIMENTAL && SCSI
+	help
+	  This enables support for the Oak SCSI card. If you have an Acorn
+	  system with one of these, say Y. If unsure, say N.
+
diff -Nru a/drivers/acorn/scsi/acornscsi.c b/drivers/acorn/scsi/acornscsi.c
--- a/drivers/acorn/scsi/acornscsi.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acorn/scsi/acornscsi.c	Wed Oct 30 16:44:28 2002
@@ -3132,7 +3132,6 @@
 	.queuecommand		= acornscsi_queuecmd,
 	.abort			= acornscsi_abort,
 	.reset			= acornscsi_reset,
-	.bios_param		= scsicam_bios_param,
 	.can_queue		= 16,
 	.this_id		= 7,
 	.sg_tablesize		= SG_ALL,
diff -Nru a/drivers/acorn/scsi/arxescsi.c b/drivers/acorn/scsi/arxescsi.c
--- a/drivers/acorn/scsi/arxescsi.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acorn/scsi/arxescsi.c	Wed Oct 30 16:44:28 2002
@@ -35,7 +35,6 @@
 #include <asm/irq.h>
 #include <asm/ecard.h>
 
-#include "../../scsi/sd.h"
 #include "../../scsi/hosts.h"
 #include "arxescsi.h"
 #include "fas216.h"
diff -Nru a/drivers/acorn/scsi/arxescsi.h b/drivers/acorn/scsi/arxescsi.h
--- a/drivers/acorn/scsi/arxescsi.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/acorn/scsi/arxescsi.h	Wed Oct 30 16:44:17 2002
@@ -49,7 +49,6 @@
 detect:				arxescsi_detect,	\
 release:			arxescsi_release,	\
 info:				arxescsi_info,		\
-bios_param:			scsicam_bios_param,	\
 can_queue:			CAN_QUEUE,		\
 this_id:			SCSI_ID,		\
 sg_tablesize:			SG_ALL,			\
diff -Nru a/drivers/acorn/scsi/cumana_1.c b/drivers/acorn/scsi/cumana_1.c
--- a/drivers/acorn/scsi/cumana_1.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/acorn/scsi/cumana_1.c	Wed Oct 30 16:44:21 2002
@@ -403,7 +403,6 @@
 	.eh_device_reset_handler= NCR5380_device_reset,
 	.eh_bus_reset_handler	= NCR5380_bus_reset,
 	.eh_host_reset_handler	= NCR5380_host_reset,
-	.bios_param		= scsicam_bios_param,
 	.can_queue		= 16,
 	.this_id		= 7,
 	.sg_tablesize		= SG_ALL,
diff -Nru a/drivers/acorn/scsi/cumana_2.c b/drivers/acorn/scsi/cumana_2.c
--- a/drivers/acorn/scsi/cumana_2.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/acorn/scsi/cumana_2.c	Wed Oct 30 16:44:30 2002
@@ -35,7 +35,6 @@
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 
-#include "../../scsi/sd.h"
 #include "../../scsi/hosts.h"
 #include "fas216.h"
 #include "scsi.h"
@@ -559,7 +558,6 @@
 	.detect				= cumanascsi_2_detect,
 	.release			= cumanascsi_2_release,
 	.info				= cumanascsi_2_info,
-	.bios_param			= scsicam_bios_param,
 	.can_queue			= 1,
 	.this_id			= 7,
 	.sg_tablesize			= SG_ALL,
diff -Nru a/drivers/acorn/scsi/eesox.c b/drivers/acorn/scsi/eesox.c
--- a/drivers/acorn/scsi/eesox.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/acorn/scsi/eesox.c	Wed Oct 30 16:44:35 2002
@@ -41,7 +41,6 @@
 #include <asm/ecard.h>
 #include <asm/pgtable.h>
 
-#include "../../scsi/sd.h"
 #include "../../scsi/hosts.h"
 #include "fas216.h"
 #include "scsi.h"
@@ -556,7 +555,6 @@
 	.detect				= eesoxscsi_detect,
 	.release			= eesoxscsi_release,
 	.info				= eesoxscsi_info,
-	.bios_param			= scsicam_bios_param,
 	.can_queue			= 1,
 	.this_id			= 7,
 	.sg_tablesize			= SG_ALL,
diff -Nru a/drivers/acorn/scsi/powertec.c b/drivers/acorn/scsi/powertec.c
--- a/drivers/acorn/scsi/powertec.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acorn/scsi/powertec.c	Wed Oct 30 16:44:29 2002
@@ -38,7 +38,6 @@
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 
-#include "../../scsi/sd.h"
 #include "../../scsi/hosts.h"
 #include "fas216.h"
 #include "scsi.h"
@@ -456,7 +455,6 @@
 	.detect				= powertecscsi_detect,
 	.release			= powertecscsi_release,
 	.info				= powertecscsi_info,
-	.bios_param			= scsicam_bios_param,
 	.can_queue			= 1,
 	.this_id			= 7,
 	.sg_tablesize			= SG_ALL,
diff -Nru a/drivers/acpi/Config.help b/drivers/acpi/Config.help
--- a/drivers/acpi/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,132 +0,0 @@
-CONFIG_ACPI
-  Advanced Configuration and Power Interface (ACPI) support for 
-  Linux requires an ACPI compliant platform (hardware/firmware),
-  and assumes the presence of OS-directed configuration and power
-  management (OSPM) software.  This option will enlarge your 
-  kernel by about 70K.
-
-  Linux ACPI provides a robust functional replacement for several 
-  legacy configuration and power management intefaces, including 
-  the Plug-and-Play BIOS specification (PnP BIOS), the 
-  MultiProcessor Specification (MPS), and the Advanced Power 
-  Management (APM) specification.  If both ACPI and APM support 
-  are configured, whichever is loaded first shall be used.
-  
-  Add "acpi=off" to the kernel command line to disable this feature.
-  (Try "man bootparam" or see the documentation of your boot loader 
-  about how to pass options to the kernel at boot time.)
-
-  ----------
-
-  The ACPI SourceForge project contains the latest source code, 
-  documentation, tools, mailing list subscription, and other 
-  information.  This project is available at:
-    <http://sourceforge.net/projects/acpi>
-
-  Linux support for ACPI is based on Intel Corporation's ACPI
-  Component Architecture (ACPI CA).  For more information see:
-    <http://developer.intel.com/technology/iapc/acpi>
-
-  ACPI is an open industry specification co-developed by Compaq, 
-  Intel, Microsoft, Phoenix, and Toshiba.  The specification is 
-  available at:
-    <http://www.acpi.info>
-
-CONFIG_ACPI_HT_ONLY
-  This option enables limited ACPI support -- just enough to 
-  enumerate processors from the ACPI Multiple APIC Description 
-  Table (MADT).  Note that ACPI supports both logical (e.g. Hyper-
-  Threading) and physical processors, where the MultiProcessor 
-  Specification (MPS) table only supports physical processors.
-
-  Full ACPI support (CONFIG_ACPI) is preferred.  Use this option 
-  only if you wish to limit ACPI's role to processor enumeration.
-
-  There is no command-line option to disable this, but the kernel
-  will fall back to the MPS table if the MADT is not present.
-
-CONFIG_ACPI_AC
-  This driver adds support for the AC Adapter object, which indicates
-  whether a system is on AC, or not.  Typically, only mobile systems 
-  have this object, since desktops are always on AC.
-
-CONFIG_ACPI_BATTERY
-  This driver adds support for battery information through
-  /proc/acpi/battery. If you have a mobile system with a battery, 
-  say Y.
-
-CONFIG_ACPI_BUTTON
-  This driver registers for events based on buttons, such as the
-  power, sleep, and lid switch.  In the future, a daemon will read
-  /proc/acpi/event and perform user-defined actions such as shutting
-  down the system.  Until then, you can cat it, and see output when
-  a button is pressed.
-
-CONFIG_ACPI_EC
-  This driver is required on some systems for the proper operation of
-  the battery and thermal drivers.  If you are compiling for a 
-  mobile system, say Y.
-
-CONFIG_ACPI_PROCESSOR
-  This driver installs ACPI as the idle handler for Linux, and uses
-  ACPI C2 and C3 processor states to save power, on systems that
-  support it.
-
-CONFIG_ACPI_THERMAL
-  This driver adds support for ACPI thermal zones.  Most mobile and
-  some desktop systems support ACPI thermal zones.  It is HIGHLY
-  recommended that this option be enabled, as your processor(s)
-  may be damaged without it.
-
-CONFIG_ACPI_FAN
-  This driver adds support for ACPI fan devices, allowing user-mode 
-  applications to perform basic fan control (on, off, status).
-
-CONFIG_ACPI_SYSTEM
-  This driver will enable your system to shut down using ACPI, and
-  dump your ACPI DSDT table using /proc/acpi/dsdt.
-
-CONFIG_ACPI_SLEEP
-  This option adds support for ACPI suspend states. 
-
-  With this option, you will be able to put the system "to sleep". 
-  Sleep states are low power states for the system and devices. All
-  of the system operating state is saved to either memory or disk
-  (depending on the state), to allow the system to resume operation
-  quickly at your request.
-
-  Although this option sounds really nifty, barely any of the device
-  drivers have been converted to the new driver model and hence few
-  have proper power management support. 
-
-  This option is not recommended for anyone except those doing driver
-  power management development.
-
-
-CONFIG_ACPI_DEBUG
-  The ACPI driver can optionally report errors with a great deal
-  of verbosity. Saying Y enables these statements. This will increase
-  your kernel size by around 50K.
-
-CONFIG_ACPI_TOSHIBA
-  This driver adds support for access to certain system settings
-  on "legacy free" Toshiba laptops.  These laptops can be recognized by
-  their lack of a BIOS setup menu and APM support.
-
-  On these machines, all system configuration is handled through the
-  ACPI.  This driver is required for access to controls not covered
-  by the general ACPI drivers, such as LCD brightness, video output,
-  etc.
-
-  This driver differs from the non-ACPI Toshiba laptop driver (located
-  under "Processor type and features") in several aspects.
-  Configuration is accessed by reading and writing text files in the
-  /proc tree instead of by program interface to /dev.  Furthermore, no
-  power management functions are exposed, as those are handled by the
-  general ACPI drivers.
-
-  More information about this driver is available at
-  <http://memebeam.org/toys/ToshibaAcpiDriver>.
-
-  If you have a legacy free Toshiba laptop (such as the Libretto L1
-  series), say Y.
diff -Nru a/drivers/acpi/Config.in b/drivers/acpi/Config.in
--- a/drivers/acpi/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,81 +0,0 @@
-#
-# ACPI Configuration
-#
-
-mainmenu_option next_comment
-comment 'ACPI Support'
-
-if [ "$CONFIG_X86" = "y" ]; then
-   bool 'ACPI Support' CONFIG_ACPI
-   if [ "$CONFIG_ACPI" = "y" ]; then
-      if [ "$CONFIG_X86_LOCAL_APIC" = "y" ]; then
-         bool         'CPU Enumeration Only' CONFIG_ACPI_HT_ONLY
-      fi
-
-      define_bool CONFIG_ACPI_BOOT y
-
-      if [ "$CONFIG_ACPI_HT_ONLY" != "y" ]; then
-	 bool     '  Sleep States' CONFIG_ACPI_SLEEP
-         tristate '  AC Adapter' CONFIG_ACPI_AC
-         tristate '  Battery' CONFIG_ACPI_BATTERY
-         tristate '  Button' CONFIG_ACPI_BUTTON
-         tristate '  Fan' CONFIG_ACPI_FAN
-         tristate '  Processor'	CONFIG_ACPI_PROCESSOR
-         dep_tristate '  Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR
-         if [ "$CONFIG_NUMA" = "y" ]; then
-            dep_bool '  NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA
-         fi
-         tristate '  Toshiba Laptop Extras' CONFIG_ACPI_TOSHIBA
-         bool '  Debug Statements' CONFIG_ACPI_DEBUG
-
-         define_bool CONFIG_ACPI_BOOT y
-         define_bool CONFIG_ACPI_BUS y
-         define_bool CONFIG_ACPI_INTERPRETER y
-         define_bool CONFIG_ACPI_EC y
-         define_bool CONFIG_ACPI_POWER y
-         define_bool CONFIG_ACPI_PCI $CONFIG_PCI
-         define_bool CONFIG_ACPI_SLEEP $CONFIG_SOFTWARE_SUSPEND
-         define_bool CONFIG_ACPI_SYSTEM	y
-      fi
-   fi
-fi
-
-if [ "$CONFIG_IA64" = "y" ]; then
-   if [ "$CONFIG_IA64_SGI_SN" = "y" ]; then
-      define_bool CONFIG_ACPI y
-      define_bool CONFIG_ACPI_EFI y
-      define_bool CONFIG_ACPI_BOOT y
-      define_bool CONFIG_ACPI_BUS n
-      define_bool CONFIG_ACPI_INTERPRETER n
-      define_bool CONFIG_ACPI_PCI n
-      define_bool CONFIG_ACPI_POWER n
-      define_bool CONFIG_ACPI_SYSTEM n
-      define_bool CONFIG_ACPI_SLEEP n
-      define_bool CONFIG_ACPI_BUTTON n
-      define_bool CONFIG_ACPI_FAN n
-      define_bool CONFIG_ACPI_PROCESSOR n
-      define_bool CONFIG_ACPI_THERMAL n
-      define_bool CONFIG_ACPI_NUMA y
-   fi
-
-   if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
-      tristate     '  Button' CONFIG_ACPI_BUTTON
-      tristate     '  Fan' CONFIG_ACPI_FAN
-      tristate     '  Processor' CONFIG_ACPI_PROCESSOR
-      dep_tristate '  Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR
-      if [ "$CONFIG_NUMA" = "y" ]; then
-         dep_bool '  NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA
-      fi
-      bool '  Debug Statements' CONFIG_ACPI_DEBUG
-      define_bool CONFIG_ACPI_PCI $CONFIG_PCI
-      define_bool CONFIG_ACPI y
-      define_bool CONFIG_ACPI_EFI y
-      define_bool CONFIG_ACPI_BOOT y
-      define_bool CONFIG_ACPI_BUS y
-      define_bool CONFIG_ACPI_INTERPRETER y
-      define_bool CONFIG_ACPI_POWER y
-      define_bool CONFIG_ACPI_SYSTEM y
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/acpi/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,218 @@
+#
+# ACPI Configuration
+#
+
+menu "ACPI Support"
+
+config ACPI
+	bool "ACPI Support" if X86
+	default y if IA64 && (!IA64_HP_SIM || IA64_SGI_SN)
+	---help---
+	  Advanced Configuration and Power Interface (ACPI) support for 
+	  Linux requires an ACPI compliant platform (hardware/firmware),
+	  and assumes the presence of OS-directed configuration and power
+	  management (OSPM) software.  This option will enlarge your 
+	  kernel by about 70K.
+
+	  Linux ACPI provides a robust functional replacement for several 
+	  legacy configuration and power management intefaces, including 
+	  the Plug-and-Play BIOS specification (PnP BIOS), the 
+	  MultiProcessor Specification (MPS), and the Advanced Power 
+	  Management (APM) specification.  If both ACPI and APM support 
+	  are configured, whichever is loaded first shall be used.
+
+	  The ACPI SourceForge project contains the latest source code, 
+	  documentation, tools, mailing list subscription, and other 
+	  information.  This project is available at:
+	  <http://sourceforge.net/projects/acpi>
+
+	  Linux support for ACPI is based on Intel Corporation's ACPI
+	  Component Architecture (ACPI CA).  For more information see:
+	  <http://developer.intel.com/technology/iapc/acpi>
+
+	  ACPI is an open industry specification co-developed by Compaq, 
+	  Intel, Microsoft, Phoenix, and Toshiba.  The specification is 
+	  available at:
+	  <http://www.acpi.info>
+
+config ACPI_HT_ONLY
+	bool "CPU Enumeration Only"
+	depends on X86 && ACPI && X86_LOCAL_APIC
+	---help---
+	  This option enables limited ACPI support -- just enough to 
+	  enumerate processors from the ACPI Multiple APIC Description 
+	  Table (MADT).  Note that ACPI supports both logical (e.g. Hyper-
+	  Threading) and physical processors, where the MultiProcessor 
+	  Specification (MPS) table only supports physical processors.
+
+	  Full ACPI support (CONFIG_ACPI) is preferred.  Use this option 
+	  only if you wish to limit ACPI's role to processor enumeration.
+
+	  There is no command-line option to disable this, but the kernel
+	  will fall back to the MPS table if the MADT is not present.
+
+config ACPI_BOOT
+	bool
+	depends on IA64 && (!IA64_HP_SIM || IA64_SGI_SN) || X86 && ACPI && !ACPI_HT_ONLY || X86 && ACPI
+	default y
+
+config ACPI_SLEEP
+	bool "Sleep States"
+	depends on X86 && ACPI && !ACPI_HT_ONLY
+	default SOFTWARE_SUSPEND
+	---help---
+	  This option adds support for ACPI suspend states. 
+
+	  With this option, you will be able to put the system "to sleep". 
+	  Sleep states are low power states for the system and devices. All
+	  of the system operating state is saved to either memory or disk
+	  (depending on the state), to allow the system to resume operation
+	  quickly at your request.
+
+	  Although this option sounds really nifty, barely any of the device
+	  drivers have been converted to the new driver model and hence few
+	  have proper power management support. 
+
+	  This option is not recommended for anyone except those doing driver
+	  power management development.
+
+config ACPI_AC
+	tristate "AC Adapter"
+	depends on X86 && ACPI && !ACPI_HT_ONLY
+	help
+	  This driver adds support for the AC Adapter object, which indicates
+	  whether a system is on AC, or not.  Typically, only mobile systems 
+	  have this object, since desktops are always on AC.
+
+config ACPI_BATTERY
+	tristate "Battery"
+	depends on X86 && ACPI && !ACPI_HT_ONLY
+	help
+	  This driver adds support for battery information through
+	  /proc/acpi/battery. If you have a mobile system with a battery, 
+	  say Y.
+
+config ACPI_BUTTON
+	tristate "Button"
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	help
+	  This driver registers for events based on buttons, such as the
+	  power, sleep, and lid switch.  In the future, a daemon will read
+	  /proc/acpi/event and perform user-defined actions such as shutting
+	  down the system.  Until then, you can cat it, and see output when
+	  a button is pressed.
+
+config ACPI_FAN
+	tristate "Fan"
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	help
+	  This driver adds support for ACPI fan devices, allowing user-mode 
+	  applications to perform basic fan control (on, off, status).
+
+config ACPI_PROCESSOR
+	tristate "Processor"
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	help
+	  This driver installs ACPI as the idle handler for Linux, and uses
+	  ACPI C2 and C3 processor states to save power, on systems that
+	  support it.
+
+config ACPI_PROCESSOR_PERF
+	bool "Processor Performance States"
+	depends on X86 && ACPI && !ACPI_HT_ONLY && ACPI_PROCESSOR && CPU_FREQ
+	help
+	  This driver adds support for CPU frequency scaling, if this is supported
+	  by the hardware and the BIOS. If you are compiling for a mobile system,
+	  say Y.
+
+config ACPI_THERMAL
+	tristate "Thermal Zone"
+	depends on ACPI_PROCESSOR
+	help
+	  This driver adds support for ACPI thermal zones.  Most mobile and
+	  some desktop systems support ACPI thermal zones.  It is HIGHLY
+	  recommended that this option be enabled, as your processor(s)
+	  may be damaged without it.
+
+config ACPI_NUMA
+	bool "NUMA support" if NUMA && (IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY)
+	default y if IA64 && IA64_SGI_SN
+
+config ACPI_TOSHIBA
+	tristate "Toshiba Laptop Extras"
+	depends on X86 && ACPI && !ACPI_HT_ONLY
+	---help---
+	  This driver adds support for access to certain system settings
+	  on "legacy free" Toshiba laptops.  These laptops can be recognized by
+	  their lack of a BIOS setup menu and APM support.
+
+	  On these machines, all system configuration is handled through the
+	  ACPI.  This driver is required for access to controls not covered
+	  by the general ACPI drivers, such as LCD brightness, video output,
+	  etc.
+
+	  This driver differs from the non-ACPI Toshiba laptop driver (located
+	  under "Processor type and features") in several aspects.
+	  Configuration is accessed by reading and writing text files in the
+	  /proc tree instead of by program interface to /dev.  Furthermore, no
+	  power management functions are exposed, as those are handled by the
+	  general ACPI drivers.
+
+	  More information about this driver is available at
+	  <http://memebeam.org/toys/ToshibaAcpiDriver>.
+
+	  If you have a legacy free Toshiba laptop (such as the Libretto L1
+	  series), say Y.
+
+config ACPI_DEBUG
+	bool "Debug Statements"
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	help
+	  The ACPI driver can optionally report errors with a great deal
+	  of verbosity. Saying Y enables these statements. This will increase
+	  your kernel size by around 50K.
+
+config ACPI_BUS
+	bool
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	default y
+
+config ACPI_INTERPRETER
+	bool
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	default y
+
+config ACPI_EC
+	bool
+	depends on X86 && ACPI && !ACPI_HT_ONLY
+	default y
+	help
+	  This driver is required on some systems for the proper operation of
+	  the battery and thermal drivers.  If you are compiling for a 
+	  mobile system, say Y.
+
+config ACPI_POWER
+	bool
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	default y
+
+config ACPI_PCI
+	bool
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	default PCI
+
+config ACPI_SYSTEM
+	bool
+	depends on IA64 && !IA64_HP_SIM || X86 && ACPI && !ACPI_HT_ONLY
+	default y
+	help
+	  This driver will enable your system to shut down using ACPI, and
+	  dump your ACPI DSDT table using /proc/acpi/dsdt.
+
+config ACPI_EFI
+	bool
+	depends on IA64 && (!IA64_HP_SIM || IA64_SGI_SN)
+	default y
+
+endmenu
+
diff -Nru a/drivers/acpi/acpi_ksyms.c b/drivers/acpi/acpi_ksyms.c
--- a/drivers/acpi/acpi_ksyms.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/acpi_ksyms.c	Wed Oct 30 16:44:27 2002
@@ -86,6 +86,7 @@
 EXPORT_SYMBOL(acpi_set_register);
 EXPORT_SYMBOL(acpi_enter_sleep_state);
 EXPORT_SYMBOL(acpi_get_system_info);
+EXPORT_SYMBOL(acpi_get_devices);
 
 /* ACPI OS Services Layer (acpi_osl.c) */
 
@@ -100,6 +101,8 @@
 EXPORT_SYMBOL(acpi_os_delete_semaphore);
 EXPORT_SYMBOL(acpi_os_wait_semaphore);
 
+EXPORT_SYMBOL(acpi_os_read_pci_configuration);
+
 /* ACPI Utilities (acpi_utils.c) */
 
 EXPORT_SYMBOL(acpi_extract_package);
@@ -126,3 +129,15 @@
 EXPORT_SYMBOL(acpi_bus_unregister_driver);
 
 #endif /*CONFIG_ACPI_BUS*/
+
+
+/* ACPI PCI Driver (pci_irq.c) */
+
+#ifdef CONFIG_ACPI_PCI
+
+#include <linux/pci.h>
+extern int acpi_pci_irq_enable(struct pci_dev *dev);
+EXPORT_SYMBOL(acpi_pci_irq_enable);
+extern int acpi_pci_irq_lookup (int segment, int bus, int device, int pin);
+EXPORT_SYMBOL(acpi_pci_irq_lookup);
+#endif /*CONFIG_ACPI_PCI */
diff -Nru a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
--- a/drivers/acpi/blacklist.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/acpi/blacklist.c	Wed Oct 30 16:44:19 2002
@@ -78,9 +78,7 @@
 	{"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal, "Does not use _REG to protect EC OpRegions", 1},
 	/* IBM 600E - _ADR should return 7, but it returns 1 */
 	{"IBM   ", "TP600E  ", 0x00000105, ACPI_DSDT, less_than_or_equal, "Incorrect _ADR", 1},
-	{"VIA694", "AWRDACPI", 0, ACPI_DSDT, all_versions, "Bogus table", 1},
 	{"ASUS\0\0", "P2B-S   ", 0, ACPI_DSDT, all_versions, "Bogus PCI routing", 1},
-	{"COMPAQ", "DSDT", 0, ACPI_DSDT, all_versions, "Bogus PCI routing", 1},
 
 	{""}
 };
diff -Nru a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c
--- a/drivers/acpi/dispatcher/dsfield.c	Wed Oct 30 16:44:22 2002
+++ b/drivers/acpi/dispatcher/dsfield.c	Wed Oct 30 16:44:22 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dsfield - Dispatcher field routines
- *              $Revision: 68 $
+ *              $Revision: 69 $
  *
  *****************************************************************************/
 
@@ -103,7 +103,7 @@
 	 * Enter the Name_string into the namespace
 	 */
 	status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string,
-			 INTERNAL_TYPE_DEF_ANY, ACPI_IMODE_LOAD_PASS1,
+			 ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1,
 			 flags, walk_state, &(node));
 	if (ACPI_FAILURE (status)) {
 		ACPI_REPORT_NSERROR (arg->common.value.string, status);
@@ -343,7 +343,7 @@
 
 	/* Each remaining arg is a Named Field */
 
-	info.field_type = INTERNAL_TYPE_REGION_FIELD;
+	info.field_type = ACPI_TYPE_LOCAL_REGION_FIELD;
 	info.region_node = region_node;
 
 	status = acpi_ds_get_field_names (&info, walk_state, arg->common.next);
@@ -384,17 +384,17 @@
 	switch (walk_state->opcode) {
 	case AML_FIELD_OP:
 		arg = acpi_ps_get_arg (op, 2);
-		type = INTERNAL_TYPE_REGION_FIELD;
+		type = ACPI_TYPE_LOCAL_REGION_FIELD;
 		break;
 
 	case AML_BANK_FIELD_OP:
 		arg = acpi_ps_get_arg (op, 4);
-		type = INTERNAL_TYPE_BANK_FIELD;
+		type = ACPI_TYPE_LOCAL_BANK_FIELD;
 		break;
 
 	case AML_INDEX_FIELD_OP:
 		arg = acpi_ps_get_arg (op, 3);
-		type = INTERNAL_TYPE_INDEX_FIELD;
+		type = ACPI_TYPE_LOCAL_INDEX_FIELD;
 		break;
 
 	default:
@@ -477,11 +477,11 @@
 		}
 	}
 
-	/* Second arg is the Bank Register (must already exist) */
+	/* Second arg is the Bank Register (Field) (must already exist) */
 
 	arg = arg->common.next;
 	status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string,
-			  INTERNAL_TYPE_BANK_FIELD_DEFN, ACPI_IMODE_EXECUTE,
+			  ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
 			  ACPI_NS_SEARCH_PARENT, walk_state, &info.register_node);
 	if (ACPI_FAILURE (status)) {
 		ACPI_REPORT_NSERROR (arg->common.value.string, status);
@@ -500,7 +500,7 @@
 
 	/* Each remaining arg is a Named Field */
 
-	info.field_type = INTERNAL_TYPE_BANK_FIELD;
+	info.field_type = ACPI_TYPE_LOCAL_BANK_FIELD;
 	info.region_node = region_node;
 
 	status = acpi_ds_get_field_names (&info, walk_state, arg->common.next);
@@ -552,7 +552,7 @@
 
 	arg = arg->common.next;
 	status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string,
-			  INTERNAL_TYPE_INDEX_FIELD_DEFN, ACPI_IMODE_EXECUTE,
+			  ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
 			  ACPI_NS_SEARCH_PARENT, walk_state, &info.data_register_node);
 	if (ACPI_FAILURE (status)) {
 		ACPI_REPORT_NSERROR (arg->common.value.string, status);
@@ -566,7 +566,7 @@
 
 	/* Each remaining arg is a Named Field */
 
-	info.field_type = INTERNAL_TYPE_INDEX_FIELD;
+	info.field_type = ACPI_TYPE_LOCAL_INDEX_FIELD;
 	info.region_node = region_node;
 
 	status = acpi_ds_get_field_names (&info, walk_state, arg->common.next);
diff -Nru a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c
--- a/drivers/acpi/dispatcher/dsmthdat.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/dispatcher/dsmthdat.c	Wed Oct 30 16:44:27 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dsmthdat - control method arguments and local variables
- *              $Revision: 63 $
+ *              $Revision: 64 $
  *
  ******************************************************************************/
 
@@ -603,7 +603,7 @@
 			 * If we have a valid reference object that came from Ref_of(), do the
 			 * indirect store
 			 */
-			if ((current_obj_desc->common.type == INTERNAL_TYPE_REFERENCE) &&
+			if ((current_obj_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) &&
 				(current_obj_desc->reference.opcode == AML_REF_OF_OP)) {
 				ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
 					"Arg (%p) is an Obj_ref(Node), storing in node %p\n",
diff -Nru a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
--- a/drivers/acpi/dispatcher/dsobject.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/acpi/dispatcher/dsobject.c	Wed Oct 30 16:44:19 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dsobject - Dispatcher object management routines
- *              $Revision: 108 $
+ *              $Revision: 110 $
  *
  *****************************************************************************/
 
@@ -707,7 +707,7 @@
 	case ACPI_TYPE_STRING:
 
 		obj_desc->string.pointer = op->common.value.string;
-		obj_desc->string.length = ACPI_STRLEN (op->common.value.string);
+		obj_desc->string.length = (u32) ACPI_STRLEN (op->common.value.string);
 
 		/*
 		 * The string is contained in the ACPI table, don't ever try
@@ -721,7 +721,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		switch (op_info->type) {
 		case AML_TYPE_LOCAL_VARIABLE:
diff -Nru a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c
--- a/drivers/acpi/dispatcher/dsopcode.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/acpi/dispatcher/dsopcode.c	Wed Oct 30 16:44:32 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: dsopcode - Dispatcher Op Region support and handling of
  *                         "control" opcodes
- *              $Revision: 82 $
+ *              $Revision: 83 $
  *
  *****************************************************************************/
 
@@ -1021,7 +1021,7 @@
 			 * Allow references created by the Index operator to return unchanged.
 			 */
 			if ((ACPI_GET_DESCRIPTOR_TYPE (walk_state->results->results.obj_desc[0]) == ACPI_DESC_TYPE_OPERAND) &&
-				(ACPI_GET_OBJECT_TYPE (walk_state->results->results.obj_desc [0]) == INTERNAL_TYPE_REFERENCE) &&
+				(ACPI_GET_OBJECT_TYPE (walk_state->results->results.obj_desc [0]) == ACPI_TYPE_LOCAL_REFERENCE) &&
 				((walk_state->results->results.obj_desc [0])->reference.opcode != AML_INDEX_OP)) {
 				status = acpi_ex_resolve_to_value (&walk_state->results->results.obj_desc [0], walk_state);
 				if (ACPI_FAILURE (status)) {
diff -Nru a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
--- a/drivers/acpi/dispatcher/dsutils.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/dispatcher/dsutils.c	Wed Oct 30 16:44:28 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dsutils - Dispatcher utilities
- *              $Revision: 95 $
+ *              $Revision: 96 $
  *
  ******************************************************************************/
 
@@ -431,7 +431,7 @@
 		/* Get the object type of the argument */
 
 		op_info = acpi_ps_get_opcode_info (opcode);
-		if (op_info->object_type == INTERNAL_TYPE_INVALID) {
+		if (op_info->object_type == ACPI_TYPE_INVALID) {
 			return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
 		}
 
diff -Nru a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
--- a/drivers/acpi/dispatcher/dswload.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/acpi/dispatcher/dswload.c	Wed Oct 30 16:44:20 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dswload - Dispatcher namespace load callbacks
- *              $Revision: 75 $
+ *              $Revision: 78 $
  *
  *****************************************************************************/
 
@@ -151,49 +151,27 @@
 	ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
 		"State=%p Op=%p [%s] ", walk_state, op, acpi_ut_get_type_name (object_type)));
 
-	/*
-	 * Setup the search flags.
-	 *
-	 * Since we are entering a name into the namespace, we do not want to
-	 *    enable the search-to-root upsearch.
-	 *
-	 * There are only two conditions where it is acceptable that the name
-	 *    already exists:
-	 *    1) the Scope() operator can reopen a scoping object that was
-	 *       previously defined (Scope, Method, Device, etc.)
-	 *    2) Whenever we are parsing a deferred opcode (Op_region, Buffer,
-	 *       Buffer_field, or Package), the name of the object is already
-	 *       in the namespace.
-	 */
-	flags = ACPI_NS_NO_UPSEARCH;
-	if ((walk_state->opcode != AML_SCOPE_OP) &&
-		(!(walk_state->parse_flags & ACPI_PARSE_DEFERRED_OP))) {
-		flags |= ACPI_NS_ERROR_IF_FOUND;
-		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Cannot already exist\n"));
-	}
-	else {
-		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Both Find or Create allowed\n"));
-	}
+	switch (walk_state->opcode) {
+	case AML_SCOPE_OP:
 
-	/*
-	 * Enter the named type into the internal namespace.  We enter the name
-	 * as we go downward in the parse tree.  Any necessary subobjects that involve
-	 * arguments to the opcode must be created as we go back up the parse tree later.
-	 */
-	status = acpi_ns_lookup (walk_state->scope_info, path, object_type,
-			  ACPI_IMODE_LOAD_PASS1, flags, walk_state, &(node));
-	if (ACPI_FAILURE (status)) {
-		ACPI_REPORT_NSERROR (path, status);
-		return (status);
-	}
+		/*
+		 * The target name of the Scope() operator must exist at this point so
+		 * that we can actually open the scope to enter new names underneath it.
+		 * Allow search-to-root for single namesegs.
+		 */
+		status = acpi_ns_lookup (walk_state->scope_info, path, object_type,
+				  ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, walk_state, &(node));
+		if (ACPI_FAILURE (status)) {
+			ACPI_REPORT_NSERROR (path, status);
+			return (status);
+		}
 
-	/*
-	 * For the scope op, we must check to make sure that the target is
-	 * one of the opcodes that actually opens a scope
-	 */
-	if (walk_state->opcode == AML_SCOPE_OP) {
+		/*
+		 * Check to make sure that the target is
+		 * one of the opcodes that actually opens a scope
+		 */
 		switch (node->type) {
-		case ACPI_TYPE_ANY:         /* Scope nodes are untyped (ANY) */
+		case ACPI_TYPE_LOCAL_SCOPE:         /* Scope  */
 		case ACPI_TYPE_DEVICE:
 		case ACPI_TYPE_POWER:
 		case ACPI_TYPE_PROCESSOR:
@@ -223,7 +201,7 @@
 			walk_state->scope_info->common.value = ACPI_TYPE_ANY;
 			break;
 
-	   default:
+		default:
 
 			/* All other types are an error */
 
@@ -232,8 +210,53 @@
 
 			return (AE_AML_OPERAND_TYPE);
 		}
+		break;
+
+
+	default:
+
+		/*
+		 * For all other named opcodes, we will enter the name into the namespace.
+		 *
+		 * Setup the search flags.
+		 * Since we are entering a name into the namespace, we do not want to
+		 * enable the search-to-root upsearch.
+		 *
+		 * There are only two conditions where it is acceptable that the name
+		 * already exists:
+		 *    1) the Scope() operator can reopen a scoping object that was
+		 *       previously defined (Scope, Method, Device, etc.)
+		 *    2) Whenever we are parsing a deferred opcode (Op_region, Buffer,
+		 *       Buffer_field, or Package), the name of the object is already
+		 *       in the namespace.
+		 */
+		flags = ACPI_NS_NO_UPSEARCH;
+		if ((walk_state->opcode != AML_SCOPE_OP) &&
+			(!(walk_state->parse_flags & ACPI_PARSE_DEFERRED_OP))) {
+			flags |= ACPI_NS_ERROR_IF_FOUND;
+			ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Cannot already exist\n"));
+		}
+		else {
+			ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Both Find or Create allowed\n"));
+		}
+
+		/*
+		 * Enter the named type into the internal namespace.  We enter the name
+		 * as we go downward in the parse tree.  Any necessary subobjects that involve
+		 * arguments to the opcode must be created as we go back up the parse tree later.
+		 */
+		status = acpi_ns_lookup (walk_state->scope_info, path, object_type,
+				  ACPI_IMODE_LOAD_PASS1, flags, walk_state, &(node));
+		if (ACPI_FAILURE (status)) {
+			ACPI_REPORT_NSERROR (path, status);
+			return (status);
+		}
+		break;
 	}
 
+
+	/* Common exit */
+
 	if (!op) {
 		/* Create a new op */
 
@@ -419,59 +442,43 @@
 		"State=%p Op=%p Type=%X\n", walk_state, op, object_type));
 
 
-	if (walk_state->opcode == AML_FIELD_OP         ||
-		walk_state->opcode == AML_BANK_FIELD_OP    ||
-		walk_state->opcode == AML_INDEX_FIELD_OP) {
+	switch (walk_state->opcode) {
+	case AML_FIELD_OP:
+	case AML_BANK_FIELD_OP:
+	case AML_INDEX_FIELD_OP:
+
 		node = NULL;
 		status = AE_OK;
-	}
-	else if (walk_state->opcode == AML_INT_NAMEPATH_OP) {
+		break;
+
+	case AML_INT_NAMEPATH_OP:
+
 		/*
 		 * The Name_path is an object reference to an existing object. Don't enter the
 		 * name into the namespace, but look it up for use later
 		 */
 		status = acpi_ns_lookup (walk_state->scope_info, buffer_ptr, object_type,
 				  ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, walk_state, &(node));
-	}
-	else {
-		/* All other opcodes */
-
-		if (op && op->common.node) {
-			/* This op/node was previously entered into the namespace */
-
-			node = op->common.node;
-
-			if (acpi_ns_opens_scope (object_type)) {
-				status = acpi_ds_scope_stack_push (node, object_type, walk_state);
-				if (ACPI_FAILURE (status)) {
-					return_ACPI_STATUS (status);
-				}
+		break;
 
-			}
-			return_ACPI_STATUS (AE_OK);
-		}
+	case AML_SCOPE_OP:
 
 		/*
-		 * Enter the named type into the internal namespace.  We enter the name
-		 * as we go downward in the parse tree.  Any necessary subobjects that involve
-		 * arguments to the opcode must be created as we go back up the parse tree later.
+		 * The Path is an object reference to an existing object.  Don't enter the
+		 * name into the namespace, but look it up for use later
 		 */
 		status = acpi_ns_lookup (walk_state->scope_info, buffer_ptr, object_type,
-				  ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, walk_state, &(node));
-	}
-
-	if (ACPI_FAILURE (status)) {
-		ACPI_REPORT_NSERROR (buffer_ptr, status);
-		return_ACPI_STATUS (status);
-	}
-
-	/*
-	 * For the scope op, we must check to make sure that the target is
-	 * one of the opcodes that actually opens a scope
-	 */
-	if (walk_state->opcode == AML_SCOPE_OP) {
+				  ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, walk_state, &(node));
+		if (ACPI_FAILURE (status)) {
+			ACPI_REPORT_NSERROR (buffer_ptr, status);
+			return_ACPI_STATUS (status);
+		}
+		/*
+		 * We must check to make sure that the target is
+		 * one of the opcodes that actually opens a scope
+		 */
 		switch (node->type) {
-		case ACPI_TYPE_ANY:         /* Scope nodes are untyped (ANY) */
+		case ACPI_TYPE_LOCAL_SCOPE:         /* Scope */
 		case ACPI_TYPE_DEVICE:
 		case ACPI_TYPE_POWER:
 		case ACPI_TYPE_PROCESSOR:
@@ -499,7 +506,7 @@
 			walk_state->scope_info->common.value = ACPI_TYPE_ANY;
 			break;
 
-	   default:
+		default:
 
 			/* All other types are an error */
 
@@ -508,7 +515,42 @@
 
 			return (AE_AML_OPERAND_TYPE);
 		}
+		break;
+
+	default:
+
+		/* All other opcodes */
+
+		if (op && op->common.node) {
+			/* This op/node was previously entered into the namespace */
+
+			node = op->common.node;
+
+			if (acpi_ns_opens_scope (object_type)) {
+				status = acpi_ds_scope_stack_push (node, object_type, walk_state);
+				if (ACPI_FAILURE (status)) {
+					return_ACPI_STATUS (status);
+				}
+
+			}
+			return_ACPI_STATUS (AE_OK);
+		}
+
+		/*
+		 * Enter the named type into the internal namespace.  We enter the name
+		 * as we go downward in the parse tree.  Any necessary subobjects that involve
+		 * arguments to the opcode must be created as we go back up the parse tree later.
+		 */
+		status = acpi_ns_lookup (walk_state->scope_info, buffer_ptr, object_type,
+				  ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, walk_state, &(node));
+		break;
 	}
+
+	if (ACPI_FAILURE (status)) {
+		ACPI_REPORT_NSERROR (buffer_ptr, status);
+		return_ACPI_STATUS (status);
+	}
+
 
 	if (!op) {
 		/* Create a new op */
diff -Nru a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c
--- a/drivers/acpi/dispatcher/dswscope.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/acpi/dispatcher/dswscope.c	Wed Oct 30 16:44:35 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dswscope - Scope stack manipulation
- *              $Revision: 53 $
+ *              $Revision: 56 $
  *
  *****************************************************************************/
 
@@ -25,7 +25,6 @@
 
 
 #include "acpi.h"
-#include "acinterp.h"
 #include "acdispat.h"
 
 
@@ -88,6 +87,7 @@
 	acpi_walk_state         *walk_state)
 {
 	acpi_generic_state      *scope_info;
+	acpi_generic_state      *old_scope_info;
 
 
 	ACPI_FUNCTION_TRACE ("Ds_scope_stack_push");
@@ -102,7 +102,7 @@
 
 	/* Make sure object type is valid */
 
-	if (!acpi_ex_validate_object_type (type)) {
+	if (!acpi_ut_valid_object_type (type)) {
 		ACPI_REPORT_WARNING (("Ds_scope_stack_push: type code out of range\n"));
 	}
 
@@ -120,6 +120,28 @@
 	scope_info->scope.node      = node;
 	scope_info->common.value    = (u16) type;
 
+	walk_state->scope_depth++;
+
+	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+		"[%.2d] Pushed scope ", (u32) walk_state->scope_depth));
+
+	old_scope_info = walk_state->scope_info;
+	if (old_scope_info) {
+		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
+			"[%4.4s] (%10s)",
+			old_scope_info->scope.node->name.ascii,
+			acpi_ut_get_type_name (old_scope_info->common.value)));
+	}
+	else {
+		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
+			"[\\___] (%10s)", "ROOT"));
+	}
+
+	ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
+		", New scope -> [%4.4s] (%s)\n",
+		scope_info->scope.node->name.ascii,
+		acpi_ut_get_type_name (scope_info->common.value)));
+
 	/* Push new scope object onto stack */
 
 	acpi_ut_push_generic_state (&walk_state->scope_info, scope_info);
@@ -150,6 +172,7 @@
 	acpi_walk_state         *walk_state)
 {
 	acpi_generic_state      *scope_info;
+	acpi_generic_state      *new_scope_info;
 
 
 	ACPI_FUNCTION_TRACE ("Ds_scope_stack_pop");
@@ -163,8 +186,25 @@
 		return_ACPI_STATUS (AE_STACK_UNDERFLOW);
 	}
 
+	walk_state->scope_depth--;
+
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
-		"Popped object type (%s)\n", acpi_ut_get_type_name (scope_info->common.value)));
+		"[%.2d] Popped scope [%4.4s] (%10s), New scope -> ",
+		(u32) walk_state->scope_depth,
+		scope_info->scope.node->name.ascii,
+		acpi_ut_get_type_name (scope_info->common.value)));
+
+	new_scope_info = walk_state->scope_info;
+	if (new_scope_info) {
+		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
+			"[%4.4s] (%s)\n",
+			new_scope_info->scope.node->name.ascii,
+			acpi_ut_get_type_name (new_scope_info->common.value)));
+	}
+	else {
+		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC,
+			"[\\___] (ROOT)\n"));
+	}
 
 	acpi_ut_delete_generic_state (scope_info);
 
diff -Nru a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
--- a/drivers/acpi/dispatcher/dswstate.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/acpi/dispatcher/dswstate.c	Wed Oct 30 16:44:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dswstate - Dispatcher parse tree walk management routines
- *              $Revision: 68 $
+ *              $Revision: 69 $
  *
  *****************************************************************************/
 
@@ -174,7 +174,7 @@
 	acpi_operand_object     **object,
 	acpi_walk_state         *walk_state)
 {
-	u32                     index;
+	NATIVE_UINT             index;
 	acpi_generic_state      *state;
 
 
@@ -205,7 +205,7 @@
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] Index=%X State=%p Num=%X\n",
 				*object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL",
-				index -1, walk_state, state->results.num_results));
+				(u32) index -1, walk_state, state->results.num_results));
 
 			return (AE_OK);
 		}
diff -Nru a/drivers/acpi/ec.c b/drivers/acpi/ec.c
--- a/drivers/acpi/ec.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/ec.c	Wed Oct 30 16:44:29 2002
@@ -80,6 +80,7 @@
 
 struct acpi_ec {
 	acpi_handle		handle;
+	unsigned long		uid;
 	unsigned long		gpe_bit;
 	acpi_generic_address	status_addr;
 	acpi_generic_address	command_addr;
@@ -90,9 +91,6 @@
 
 /* If we find an EC via the ECDT, we need to keep a ptr to its context */
 static struct acpi_ec	*ec_ecdt;
-/* compare this against UIDs in properly enumerated ECs to determine if we
-   have a dupe */
-static unsigned long		ecdt_uid = 0xFFFFFFFF;
 
 /* --------------------------------------------------------------------------
                              Transaction Management
@@ -297,80 +295,65 @@
 	u8			data;
 };
 
-
 static void
 acpi_ec_gpe_query (
-	void			*data)
+	void			*ec_cxt)
 {
-	struct acpi_ec_query_data *query_data = NULL;
+	struct acpi_ec		*ec = (struct acpi_ec *) ec_cxt;
+	u32			value = 0;
+	unsigned long		flags = 0;
 	static char		object_name[5] = {'_','Q','0','0','\0'};
 	const char		hex[] = {'0','1','2','3','4','5','6','7',
 				         '8','9','A','B','C','D','E','F'};
 
 	ACPI_FUNCTION_TRACE("acpi_ec_gpe_query");
 
-	if (!data)
-		return;
+	if (!ec_cxt)
+		goto end;	
 
-	query_data = (struct acpi_ec_query_data *) data;
+	spin_lock_irqsave(&ec->lock, flags);
+	acpi_hw_low_level_read(8, &value, &ec->command_addr, 0);
+	spin_unlock_irqrestore(&ec->lock, flags);
 
-	object_name[2] = hex[((query_data->data >> 4) & 0x0F)];
-	object_name[3] = hex[(query_data->data & 0x0F)];
+	/* TBD: Implement asynch events!
+	 * NOTE: All we care about are EC-SCI's.  Other EC events are
+	 * handled via polling (yuck!).  This is because some systems
+	 * treat EC-SCIs as level (versus EDGE!) triggered, preventing
+	 *  a purely interrupt-driven approach (grumble, grumble).
+	 */
+	if (!(value & ACPI_EC_FLAG_SCI))
+		goto end;
 
-	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluating %s\n", object_name));
+	if (acpi_ec_query(ec, &value))
+		goto end;
+	
+	object_name[2] = hex[((value >> 4) & 0x0F)];
+	object_name[3] = hex[(value & 0x0F)];
 
-	acpi_evaluate_object(query_data->handle, object_name, NULL, NULL);
+	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluating %s\n", object_name));
 
-	kfree(query_data);
+	acpi_evaluate_object(ec->handle, object_name, NULL, NULL);
 
-	return;
+end:
+	acpi_enable_event(ec->gpe_bit, ACPI_EVENT_GPE, 0);
 }
 
-
 static void
 acpi_ec_gpe_handler (
 	void			*data)
 {
 	acpi_status		status = AE_OK;
 	struct acpi_ec		*ec = (struct acpi_ec *) data;
-	u32			value = 0;
-	unsigned long		flags = 0;
-	struct acpi_ec_query_data *query_data = NULL;
 
 	if (!ec)
 		return;
 
-	spin_lock_irqsave(&ec->lock, flags);
-	acpi_hw_low_level_read(8, &value, &ec->command_addr, 0);
-	spin_unlock_irqrestore(&ec->lock, flags);
-
-	/* TBD: Implement asynch events!
-	 * NOTE: All we care about are EC-SCI's.  Other EC events are
-	 *       handled via polling (yuck!).  This is because some systems
-	 *       treat EC-SCIs as level (versus EDGE!) triggered, preventing
-	 *       a purely interrupt-driven approach (grumble, grumble).
-	 */
-	if (!(value & ACPI_EC_FLAG_SCI))
-		return;
-
-	if (acpi_ec_query(ec, &value))
-		return;
-
-	query_data = kmalloc(sizeof(struct acpi_ec_query_data), GFP_ATOMIC);
-	if (!query_data)
-		return;
-	query_data->handle = ec->handle;
-	query_data->data = value;
+	acpi_disable_event(ec->gpe_bit, ACPI_EVENT_GPE, 0);
 
 	status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
-		acpi_ec_gpe_query, query_data);
-	if (ACPI_FAILURE(status))
-		kfree(query_data);
-
-	return;
+		acpi_ec_gpe_query, ec);
 }
 
-
 /* --------------------------------------------------------------------------
                              Address Space Management
    -------------------------------------------------------------------------- */
@@ -559,6 +542,7 @@
 	memset(ec, 0, sizeof(struct acpi_ec));
 
 	ec->handle = device->handle;
+	ec->uid = -1;
 	ec->lock = SPIN_LOCK_UNLOCKED;
 	sprintf(acpi_device_name(device), "%s", ACPI_EC_DEVICE_NAME);
 	sprintf(acpi_device_class(device), "%s", ACPI_EC_CLASS);
@@ -567,10 +551,10 @@
 	/* Use the global lock for all EC transactions? */
 	acpi_evaluate_integer(ec->handle, "_GLK", NULL, &ec->global_lock);
 
-	/* If our UID matches ecdt_uid, we already found this EC via the
-	   ECDT. Abort. */
+	/* If our UID matches the UID for the ECDT-enumerated EC,
+	   we already found this EC, so abort. */
 	acpi_evaluate_integer(ec->handle, "_UID", NULL, &uid);
-	if (ecdt_uid == uid) {
+	if (ec_ecdt && ec_ecdt->uid == uid) {
 		result = -ENODEV;
 		goto end;
 	}
@@ -758,7 +742,12 @@
 		ec_ecdt->lock = SPIN_LOCK_UNLOCKED;
 		/* use the GL just to be safe */
 		ec_ecdt->global_lock = TRUE;
-		ecdt_uid = ecdt_ptr->uid;
+		ec_ecdt->uid = ecdt_ptr->uid;
+
+		status = acpi_get_handle(NULL, ecdt_ptr->ec_id, &ec_ecdt->handle);
+		if (ACPI_FAILURE(status)) {
+			goto error;
+		}
 
 		/*
 		 * Install GPE handler
@@ -783,7 +772,9 @@
 	return 0;
 
 error:
+	printk(KERN_ERR PREFIX "Could not use ECDT\n");
 	kfree(ec_ecdt);
+	ec_ecdt = NULL;
 
 	return -ENODEV;
 }
@@ -835,3 +826,4 @@
 
 	return_VOID;
 }
+
diff -Nru a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c
--- a/drivers/acpi/events/evevent.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/acpi/events/evevent.c	Wed Oct 30 16:44:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evevent - Fixed and General Purpose Even handling and dispatch
- *              $Revision: 92 $
+ *              $Revision: 95 $
  *
  *****************************************************************************/
 
@@ -343,40 +343,58 @@
 	acpi_gbl_gpe_block_info[0].block_base_number = 0;
 	acpi_gbl_gpe_block_info[1].block_base_number = acpi_gbl_FADT->gpe1_base;
 
+	/* Warn and exit if there are no GPE registers */
+
 	acpi_gbl_gpe_register_count = acpi_gbl_gpe_block_info[0].register_count +
 			 acpi_gbl_gpe_block_info[1].register_count;
 	if (!acpi_gbl_gpe_register_count) {
-		ACPI_REPORT_WARNING (("Zero GPEs are defined in the FADT\n"));
+		ACPI_REPORT_WARNING (("There are no GPE blocks defined in the FADT\n"));
 		return_ACPI_STATUS (AE_OK);
 	}
 
-	/* Determine the maximum GPE number for this machine */
+	/*
+	 * Determine the maximum GPE number for this machine.
+	 * Note: both GPE0 and GPE1 are optional, and either can exist without
+	 * the other
+	 */
+	if (acpi_gbl_gpe_block_info[0].register_count) {
+		/* GPE block 0 exists */
 
-	acpi_gbl_gpe_number_max = ACPI_MUL_8 (acpi_gbl_gpe_block_info[0].register_count) - 1;
+		acpi_gbl_gpe_number_max = ACPI_MUL_8 (acpi_gbl_gpe_block_info[0].register_count) - 1;
+	}
 
 	if (acpi_gbl_gpe_block_info[1].register_count) {
-		/* Check for GPE0/GPE1 overlap */
+		/* GPE block 1 exists */
 
-		if (acpi_gbl_gpe_number_max >= acpi_gbl_FADT->gpe1_base) {
-			ACPI_REPORT_ERROR (("GPE0 block overlaps the GPE1 block\n"));
+		/* Check for GPE0/GPE1 overlap (if both banks exist) */
+
+		if ((acpi_gbl_gpe_block_info[0].register_count) &&
+			(acpi_gbl_gpe_number_max >= acpi_gbl_FADT->gpe1_base)) {
+			ACPI_REPORT_ERROR ((
+				"GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d)\n",
+				acpi_gbl_gpe_number_max, acpi_gbl_FADT->gpe1_base,
+				acpi_gbl_FADT->gpe1_base + (ACPI_MUL_8 (acpi_gbl_gpe_block_info[1].register_count) - 1)));
 			return_ACPI_STATUS (AE_BAD_VALUE);
 		}
 
-		/* GPE0 and GPE1 do not have to be contiguous in the GPE number space */
-
-		acpi_gbl_gpe_number_max = acpi_gbl_FADT->gpe1_base + (ACPI_MUL_8 (acpi_gbl_gpe_block_info[1].register_count) - 1);
+		/*
+		 * GPE0 and GPE1 do not have to be contiguous in the GPE number space,
+		 * But, GPE0 always starts at zero.
+		 */
+		acpi_gbl_gpe_number_max = acpi_gbl_FADT->gpe1_base +
+				 (ACPI_MUL_8 (acpi_gbl_gpe_block_info[1].register_count) - 1);
 	}
 
 	/* Check for Max GPE number out-of-range */
 
 	if (acpi_gbl_gpe_number_max > ACPI_GPE_MAX) {
-		ACPI_REPORT_ERROR (("Maximum GPE number from FADT is too large: 0x%X\n", acpi_gbl_gpe_number_max));
+		ACPI_REPORT_ERROR (("Maximum GPE number from FADT is too large: 0x%X\n",
+			acpi_gbl_gpe_number_max));
 		return_ACPI_STATUS (AE_BAD_VALUE);
 	}
 
-	/*
-	 * Allocate the GPE number-to-index translation table
-	 */
+	/* Allocate the GPE number-to-index translation table */
+
 	acpi_gbl_gpe_number_to_index = ACPI_MEM_CALLOCATE (
 			   sizeof (ACPI_GPE_INDEX_INFO) *
 			   ((ACPI_SIZE) acpi_gbl_gpe_number_max + 1));
@@ -391,9 +409,8 @@
 	ACPI_MEMSET (acpi_gbl_gpe_number_to_index, (int) ACPI_GPE_INVALID,
 			sizeof (ACPI_GPE_INDEX_INFO) * ((ACPI_SIZE) acpi_gbl_gpe_number_max + 1));
 
-	/*
-	 * Allocate the GPE register information block
-	 */
+	/* Allocate the GPE register information block */
+
 	acpi_gbl_gpe_register_info = ACPI_MEM_CALLOCATE (
 			  (ACPI_SIZE) acpi_gbl_gpe_register_count *
 			  sizeof (ACPI_GPE_REGISTER_INFO));
@@ -465,7 +482,6 @@
 			 * are cleared by writing a '1', while enable registers are cleared
 			 * by writing a '0'.
 			 */
-
 			status = acpi_hw_low_level_write (8, 0x00, &gpe_register_info->enable_address, 0);
 			if (ACPI_FAILURE (status)) {
 				return_ACPI_STATUS (status);
@@ -479,16 +495,18 @@
 			gpe_register++;
 		}
 
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d: %X registers at %8.8X%8.8X\n",
-			(s32) gpe_block, acpi_gbl_gpe_block_info[0].register_count,
-			ACPI_HIDWORD (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address)),
-			ACPI_LODWORD (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address))));
-
-		ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d Range GPE #%2.2X to GPE #%2.2X\n",
-			(s32) gpe_block,
-			acpi_gbl_gpe_block_info[gpe_block].block_base_number,
-			acpi_gbl_gpe_block_info[gpe_block].block_base_number +
-				((acpi_gbl_gpe_block_info[gpe_block].register_count * 8) -1)));
+		if (i) {
+			ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d: %X registers at %8.8X%8.8X\n",
+				(s32) gpe_block, acpi_gbl_gpe_block_info[0].register_count,
+				ACPI_HIDWORD (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address)),
+				ACPI_LODWORD (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address))));
+
+			ACPI_REPORT_INFO (("GPE Block%d defined as GPE%d to GPE%d\n",
+				(s32) gpe_block,
+				acpi_gbl_gpe_block_info[gpe_block].block_base_number,
+				acpi_gbl_gpe_block_info[gpe_block].block_base_number +
+					((acpi_gbl_gpe_block_info[gpe_block].register_count * 8) -1)));
+		}
 	}
 
 	return_ACPI_STATUS (AE_OK);
@@ -794,7 +812,7 @@
 		 */
 		status = acpi_ns_evaluate_by_handle (gpe_info.method_handle, NULL, NULL);
 		if (ACPI_FAILURE (status)) {
-			ACPI_REPORT_ERROR (("%s while evaluated GPE%X method\n",
+			ACPI_REPORT_ERROR (("%s while evaluating GPE%X method\n",
 				acpi_format_exception (status), gpe_number));
 		}
 	}
@@ -846,7 +864,7 @@
 
 	gpe_number_index = acpi_ev_get_gpe_number_index (gpe_number);
 	if (gpe_number_index == ACPI_GPE_INVALID) {
-		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid event, GPE[%X].\n", gpe_number));
+		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "GPE[%X] is not a valid event\n", gpe_number));
 		return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
 	}
 
diff -Nru a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
--- a/drivers/acpi/events/evxface.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/events/evxface.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evxface - External interfaces for ACPI events
- *              $Revision: 130 $
+ *              $Revision: 131 $
  *
  *****************************************************************************/
 
@@ -294,7 +294,7 @@
 
 		/* Install the handler */
 
-		notify_obj = acpi_ut_create_internal_object (INTERNAL_TYPE_NOTIFY);
+		notify_obj = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_NOTIFY);
 		if (!notify_obj) {
 			status = AE_NO_MEMORY;
 			goto unlock_and_exit;
diff -Nru a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c
--- a/drivers/acpi/events/evxfregn.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/acpi/events/evxfregn.c	Wed Oct 30 16:44:24 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
  *                         Address Spaces.
- *              $Revision: 50 $
+ *              $Revision: 51 $
  *
  *****************************************************************************/
 
@@ -220,7 +220,7 @@
 	 * So, we just allocate the object for the handler and link it
 	 * into the list.
 	 */
-	handler_obj = acpi_ut_create_internal_object (INTERNAL_TYPE_ADDRESS_HANDLER);
+	handler_obj = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_ADDRESS_HANDLER);
 	if (!handler_obj) {
 		status = AE_NO_MEMORY;
 		goto unlock_and_exit;
diff -Nru a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
--- a/drivers/acpi/executer/exconfig.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/executer/exconfig.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
- *              $Revision: 67 $
+ *              $Revision: 69 $
  *
  *****************************************************************************/
 
@@ -67,7 +67,7 @@
 
 	/* Create an object to be the table handle */
 
-	obj_desc = acpi_ut_create_internal_object (INTERNAL_TYPE_REFERENCE);
+	obj_desc = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_REFERENCE);
 	if (!obj_desc) {
 		return_ACPI_STATUS (AE_NO_MEMORY);
 	}
@@ -77,7 +77,6 @@
 	table_info.pointer     = table;
 	table_info.length      = (ACPI_SIZE) table->length;
 	table_info.allocation  = ACPI_MEM_ALLOCATED;
-	table_info.base_pointer = table;
 
 	status = acpi_tb_install_table (&table_info);
 	if (ACPI_FAILURE (status)) {
@@ -316,9 +315,9 @@
 
 
 	case ACPI_TYPE_BUFFER_FIELD:
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Load from Field %p %s\n",
 			obj_desc, acpi_ut_get_object_type_name (obj_desc)));
@@ -417,7 +416,7 @@
 	 */
 	if ((!ddb_handle) ||
 		(ACPI_GET_DESCRIPTOR_TYPE (ddb_handle) != ACPI_DESC_TYPE_OPERAND) ||
-		(ACPI_GET_OBJECT_TYPE (ddb_handle) != INTERNAL_TYPE_REFERENCE)) {
+		(ACPI_GET_OBJECT_TYPE (ddb_handle) != ACPI_TYPE_LOCAL_REFERENCE)) {
 		return_ACPI_STATUS (AE_BAD_PARAMETER);
 	}
 
diff -Nru a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
--- a/drivers/acpi/executer/exconvrt.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/acpi/executer/exconvrt.c	Wed Oct 30 16:44:19 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exconvrt - Object conversion routines
- *              $Revision: 39 $
+ *              $Revision: 41 $
  *
  *****************************************************************************/
 
@@ -510,7 +510,7 @@
 
 		new_buf [index-1] = 0;
 		ret_desc->buffer.pointer = new_buf;
-		ret_desc->string.length = ACPI_STRLEN ((char *) new_buf);
+		ret_desc->string.length = (u32) ACPI_STRLEN ((char *) new_buf);
 
 		/* Return the new buffer descriptor */
 
@@ -587,7 +587,7 @@
 	case ARGI_INTEGER_REF:      /* Handles Increment, Decrement cases */
 
 		switch (destination_type) {
-		case INTERNAL_TYPE_REGION_FIELD:
+		case ACPI_TYPE_LOCAL_REGION_FIELD:
 			/*
 			 * Named field can always handle conversions
 			 */
@@ -612,8 +612,8 @@
 		switch (destination_type) {
 		case ACPI_TYPE_INTEGER:
 		case ACPI_TYPE_BUFFER_FIELD:
-		case INTERNAL_TYPE_BANK_FIELD:
-		case INTERNAL_TYPE_INDEX_FIELD:
+		case ACPI_TYPE_LOCAL_BANK_FIELD:
+		case ACPI_TYPE_LOCAL_INDEX_FIELD:
 			/*
 			 * These types require an Integer operand.  We can convert
 			 * a Buffer or a String to an Integer if necessary.
diff -Nru a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
--- a/drivers/acpi/executer/excreate.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/acpi/executer/excreate.c	Wed Oct 30 16:44:34 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: excreate - Named object creation
- *              $Revision: 94 $
+ *              $Revision: 97 $
  *
  *****************************************************************************/
 
@@ -55,7 +55,7 @@
 {
 	acpi_namespace_node     *target_node;
 	acpi_namespace_node     *alias_node;
-	acpi_status             status;
+	acpi_status             status = AE_OK;
 
 
 	ACPI_FUNCTION_TRACE ("Ex_create_alias");
@@ -66,7 +66,7 @@
 	alias_node = (acpi_namespace_node *) walk_state->operands[0];
 	target_node = (acpi_namespace_node *) walk_state->operands[1];
 
-	if (target_node->type == INTERNAL_TYPE_ALIAS) {
+	if (target_node->type == ACPI_TYPE_LOCAL_ALIAS) {
 		/*
 		 * Dereference an existing alias so that we don't create a chain
 		 * of aliases.  With this code, we guarantee that an alias is
@@ -95,8 +95,8 @@
 		 * NS node, not the object itself.  This is because for these
 		 * types, the object can change dynamically via a Store.
 		 */
-		alias_node->type = INTERNAL_TYPE_ALIAS;
-		alias_node->object = (acpi_operand_object *) target_node;
+		alias_node->type = ACPI_TYPE_LOCAL_ALIAS;
+		alias_node->object = ACPI_CAST_PTR (acpi_operand_object, target_node);
 		break;
 
 	default:
@@ -117,7 +117,7 @@
 
 	/* Since both operands are Nodes, we don't need to delete them */
 
-	return_ACPI_STATUS (AE_OK);
+	return_ACPI_STATUS (status);
 }
 
 
@@ -221,9 +221,10 @@
 	/* Init object and attach to NS node */
 
 	obj_desc->mutex.sync_level = (u8) walk_state->operands[1]->integer.value;
+	obj_desc->mutex.node = (acpi_namespace_node *) walk_state->operands[0];
 
-	status = acpi_ns_attach_object ((acpi_namespace_node *) walk_state->operands[0],
-			  obj_desc, ACPI_TYPE_MUTEX);
+	status = acpi_ns_attach_object (obj_desc->mutex.node,
+			 obj_desc, ACPI_TYPE_MUTEX);
 
 
 cleanup:
diff -Nru a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
--- a/drivers/acpi/executer/exdump.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/acpi/executer/exdump.c	Wed Oct 30 16:44:21 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exdump - Interpreter debug output routines
- *              $Revision: 160 $
+ *              $Revision: 162 $
  *
  *****************************************************************************/
 
@@ -58,7 +58,6 @@
 {
 	u8                      *buf = NULL;
 	u32                     length;
-	u32                     i;
 	acpi_operand_object     **element;
 	u16                     element_index;
 
@@ -97,7 +96,7 @@
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc));
 
 	switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		switch (obj_desc->reference.opcode) {
 		case AML_DEBUG_OP:
@@ -217,22 +216,6 @@
 		break;
 
 
-	case INTERNAL_TYPE_IF:
-
-		acpi_os_printf ("If [Integer] %8.8X%8.8X\n",
-				 ACPI_HIDWORD (obj_desc->integer.value),
-				 ACPI_LODWORD (obj_desc->integer.value));
-		break;
-
-
-	case INTERNAL_TYPE_WHILE:
-
-		acpi_os_printf ("While [Integer] %8.8X%8.8X\n",
-				 ACPI_HIDWORD (obj_desc->integer.value),
-				 ACPI_LODWORD (obj_desc->integer.value));
-		break;
-
-
 	case ACPI_TYPE_PACKAGE:
 
 		acpi_os_printf ("Package count %X @ %p\n",
@@ -279,24 +262,20 @@
 
 	case ACPI_TYPE_STRING:
 
-		acpi_os_printf ("String length %X @ %p \"",
+		acpi_os_printf ("String length %X @ %p ",
 				 obj_desc->string.length, obj_desc->string.pointer);
-
-		for (i = 0; i < obj_desc->string.length; i++) {
-			acpi_os_printf ("%c",
-					 obj_desc->string.pointer[i]);
-		}
-		acpi_os_printf ("\"\n");
+		acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX);
+		acpi_os_printf ("\n");
 		break;
 
 
-	case INTERNAL_TYPE_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
 
 		acpi_os_printf ("Bank_field\n");
 		break;
 
 
-	case INTERNAL_TYPE_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
 
 		acpi_os_printf (
 			"Region_field: Bits=%X Acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n",
@@ -308,7 +287,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		acpi_os_printf ("Index_field\n");
 		break;
@@ -321,16 +300,13 @@
 			obj_desc->buffer_field.bit_length, obj_desc->buffer_field.base_byte_offset,
 			obj_desc->buffer_field.start_field_bit_offset);
 
-		if (!obj_desc->buffer_field.buffer_obj)
-		{
+		if (!obj_desc->buffer_field.buffer_obj) {
 			ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n"));
 		}
-		else if (ACPI_GET_OBJECT_TYPE (obj_desc->buffer_field.buffer_obj) != ACPI_TYPE_BUFFER)
-		{
+		else if (ACPI_GET_OBJECT_TYPE (obj_desc->buffer_field.buffer_obj) != ACPI_TYPE_BUFFER) {
 			acpi_os_printf ("*not a Buffer* \n");
 		}
-		else
-		{
+		else {
 			ACPI_DUMP_STACK_ENTRY (obj_desc->buffer_field.buffer_obj);
 		}
 
@@ -423,13 +399,11 @@
 	ACPI_FUNCTION_NAME ("Ex_dump_operands");
 
 
-	if (!ident)
-	{
+	if (!ident) {
 		ident = "?";
 	}
 
-	if (!note)
-	{
+	if (!note) {
 		note = "?";
 	}
 
@@ -437,15 +411,13 @@
 		"************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
 		ident, num_levels));
 
-	if (num_levels == 0)
-	{
+	if (num_levels == 0) {
 		num_levels = 1;
 	}
 
 	/* Dump the operand stack starting at the top */
 
-	for (i = 0; num_levels > 0; i--, num_levels--)
-	{
+	for (i = 0; num_levels > 0; i--, num_levels--) {
 		obj_desc = &operands[i];
 		acpi_ex_dump_operand (*obj_desc);
 	}
@@ -529,10 +501,8 @@
 	ACPI_FUNCTION_ENTRY ();
 
 
-	if (!flags)
-	{
-		if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer)))
-		{
+	if (!flags) {
+		if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
 			return;
 		}
 	}
@@ -571,24 +541,20 @@
 	ACPI_FUNCTION_TRACE ("Ex_dump_object_descriptor");
 
 
-	if (!flags)
-	{
-		if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer)))
-		{
+	if (!flags) {
+		if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
 			return_VOID;
 		}
 	}
 
-	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED)
-	{
+	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
 		acpi_ex_dump_node ((acpi_namespace_node *) obj_desc, flags);
 		acpi_os_printf ("\nAttached Object (%p):\n", ((acpi_namespace_node *) obj_desc)->object);
 		acpi_ex_dump_object_descriptor (((acpi_namespace_node *) obj_desc)->object, flags);
 		return;
 	}
 
-	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND)
-	{
+	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
 		acpi_os_printf ("Ex_dump_object_descriptor: %p is not a valid ACPI object\n", obj_desc);
 		return_VOID;
 	}
@@ -601,8 +567,7 @@
 
 	/* Object-specific Fields */
 
-	switch (ACPI_GET_OBJECT_TYPE (obj_desc))
-	{
+	switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
 	case ACPI_TYPE_INTEGER:
 
 		acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value",
@@ -614,7 +579,10 @@
 	case ACPI_TYPE_STRING:
 
 		acpi_ex_out_integer ("Length",       obj_desc->string.length);
-		acpi_ex_out_pointer ("Pointer",      obj_desc->string.pointer);
+
+		acpi_os_printf ("%20s : %p ", "Pointer", obj_desc->string.pointer);
+		acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX);
+		acpi_os_printf ("\n");
 		break;
 
 
@@ -633,14 +601,11 @@
 
 		/* Dump the package contents */
 
-		if (obj_desc->package.count > 0)
-		{
+		if (obj_desc->package.count > 0) {
 			acpi_os_printf ("\nPackage Contents:\n");
-			for (i = 0; i < obj_desc->package.count; i++)
-			{
+			for (i = 0; i < obj_desc->package.count; i++) {
 				acpi_os_printf ("[%.3d] %p", i, obj_desc->package.elements[i]);
-				if (obj_desc->package.elements[i])
-				{
+				if (obj_desc->package.elements[i]) {
 					acpi_os_printf (" %s", acpi_ut_get_object_type_name (obj_desc->package.elements[i]));
 				}
 				acpi_os_printf ("\n");
@@ -723,9 +688,9 @@
 
 
 	case ACPI_TYPE_BUFFER_FIELD:
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		acpi_ex_out_integer ("Field_flags",  obj_desc->common_field.field_flags);
 		acpi_ex_out_integer ("Access_byte_width", obj_desc->common_field.access_byte_width);
@@ -737,23 +702,22 @@
 		acpi_ex_out_integer ("End_buf_valid_bits", obj_desc->common_field.end_buffer_valid_bits);
 		acpi_ex_out_pointer ("Parent_node",  obj_desc->common_field.node);
 
-		switch (ACPI_GET_OBJECT_TYPE (obj_desc))
-		{
+		switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
 		case ACPI_TYPE_BUFFER_FIELD:
 			acpi_ex_out_pointer ("Buffer_obj",   obj_desc->buffer_field.buffer_obj);
 			break;
 
-		case INTERNAL_TYPE_REGION_FIELD:
+		case ACPI_TYPE_LOCAL_REGION_FIELD:
 			acpi_ex_out_pointer ("Region_obj",   obj_desc->field.region_obj);
 			break;
 
-		case INTERNAL_TYPE_BANK_FIELD:
+		case ACPI_TYPE_LOCAL_BANK_FIELD:
 			acpi_ex_out_integer ("Value",        obj_desc->bank_field.value);
 			acpi_ex_out_pointer ("Region_obj",   obj_desc->bank_field.region_obj);
 			acpi_ex_out_pointer ("Bank_obj",     obj_desc->bank_field.bank_obj);
 			break;
 
-		case INTERNAL_TYPE_INDEX_FIELD:
+		case ACPI_TYPE_LOCAL_INDEX_FIELD:
 			acpi_ex_out_integer ("Value",        obj_desc->index_field.value);
 			acpi_ex_out_pointer ("Index",        obj_desc->index_field.index_obj);
 			acpi_ex_out_pointer ("Data",         obj_desc->index_field.data_obj);
@@ -766,7 +730,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		acpi_ex_out_integer ("Target_type",  obj_desc->reference.target_type);
 		acpi_ex_out_string ("Opcode",        (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name);
@@ -777,7 +741,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_ADDRESS_HANDLER:
+	case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
 
 		acpi_ex_out_integer ("Space_id",     obj_desc->addr_handler.space_id);
 		acpi_ex_out_pointer ("Next",         obj_desc->addr_handler.next);
@@ -787,24 +751,16 @@
 		break;
 
 
-	case INTERNAL_TYPE_NOTIFY:
+	case ACPI_TYPE_LOCAL_NOTIFY:
 
 		acpi_ex_out_pointer ("Node",         obj_desc->notify_handler.node);
 		acpi_ex_out_pointer ("Context",      obj_desc->notify_handler.context);
 		break;
 
 
-	case INTERNAL_TYPE_ALIAS:
-	case INTERNAL_TYPE_FIELD_DEFN:
-	case INTERNAL_TYPE_BANK_FIELD_DEFN:
-	case INTERNAL_TYPE_INDEX_FIELD_DEFN:
-	case INTERNAL_TYPE_IF:
-	case INTERNAL_TYPE_ELSE:
-	case INTERNAL_TYPE_WHILE:
-	case INTERNAL_TYPE_SCOPE:
-	case INTERNAL_TYPE_DEF_ANY:
-	case INTERNAL_TYPE_EXTRA:
-	case INTERNAL_TYPE_DATA:
+	case ACPI_TYPE_LOCAL_ALIAS:
+	case ACPI_TYPE_LOCAL_EXTRA:
+	case ACPI_TYPE_LOCAL_DATA:
 	default:
 
 		acpi_os_printf ("Ex_dump_object_descriptor: Display not implemented for object type %s\n",
diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
--- a/drivers/acpi/executer/exfldio.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/executer/exfldio.c	Wed Oct 30 16:44:27 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exfldio - Aml Field I/O
- *              $Revision: 88 $
+ *              $Revision: 89 $
  *
  *****************************************************************************/
 
@@ -338,7 +338,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
 
 		/* Ensure that the Bank_value is not beyond the capacity of the register */
 
@@ -366,7 +366,7 @@
 		/*lint -fallthrough */
 
 
-	case INTERNAL_TYPE_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
 		/*
 		 * For simple Region_fields, we just directly access the owning
 		 * Operation Region.
@@ -381,7 +381,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 
 		/* Ensure that the Index_value is not beyond the capacity of the register */
diff -Nru a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
--- a/drivers/acpi/executer/exmisc.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/acpi/executer/exmisc.c	Wed Oct 30 16:44:32 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
- *              $Revision: 109 $
+ *              $Revision: 110 $
  *
  *****************************************************************************/
 
@@ -67,7 +67,7 @@
 	switch (ACPI_GET_DESCRIPTOR_TYPE (obj_desc)) {
 	case ACPI_DESC_TYPE_OPERAND:
 
-		if (ACPI_GET_OBJECT_TYPE (obj_desc) != INTERNAL_TYPE_REFERENCE) {
+		if (ACPI_GET_OBJECT_TYPE (obj_desc) != ACPI_TYPE_LOCAL_REFERENCE) {
 			return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
 		}
 
@@ -111,7 +111,7 @@
 
 	/* Create a new reference object */
 
-	reference_obj = acpi_ut_create_internal_object (INTERNAL_TYPE_REFERENCE);
+	reference_obj = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_REFERENCE);
 	if (!reference_obj) {
 		return_ACPI_STATUS (AE_NO_MEMORY);
 	}
diff -Nru a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
--- a/drivers/acpi/executer/exmutex.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/acpi/executer/exmutex.c	Wed Oct 30 16:44:31 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exmutex - ASL Mutex Acquire/Release functions
- *              $Revision: 13 $
+ *              $Revision: 16 $
  *
  *****************************************************************************/
 
@@ -132,22 +132,35 @@
 
 	ACPI_FUNCTION_TRACE_PTR ("Ex_acquire_mutex", obj_desc);
 
+
 	if (!obj_desc) {
 		return_ACPI_STATUS (AE_BAD_PARAMETER);
 	}
 
+	/* Sanity check -- we must have a valid thread ID */
+
+	if (!walk_state->thread) {
+		ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], null thread info\n",
+				obj_desc->mutex.node->name.ascii));
+		return_ACPI_STATUS (AE_AML_INTERNAL);
+	}
+
 	/*
 	 * Current Sync must be less than or equal to the sync level of the
 	 * mutex.  This mechanism provides some deadlock prevention
 	 */
 	if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) {
+		ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], incorrect Sync_level\n",
+				obj_desc->mutex.node->name.ascii));
 		return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
 	}
 
 	/*
 	 * Support for multiple acquires by the owning thread
 	 */
-	if (obj_desc->mutex.owner_thread == walk_state->thread) {
+
+	if ((obj_desc->mutex.owner_thread) &&
+		(obj_desc->mutex.owner_thread->thread_id == walk_state->thread->thread_id)) {
 		/*
 		 * The mutex is already owned by this thread,
 		 * just increment the acquisition depth
@@ -210,12 +223,27 @@
 	/* The mutex must have been previously acquired in order to release it */
 
 	if (!obj_desc->mutex.owner_thread) {
+		ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], not acquired\n",
+				obj_desc->mutex.node->name.ascii));
 		return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
 	}
 
+	/* Sanity check -- we must have a valid thread ID */
+
+	if (!walk_state->thread) {
+		ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], null thread info\n",
+				obj_desc->mutex.node->name.ascii));
+		return_ACPI_STATUS (AE_AML_INTERNAL);
+	}
+
 	/* The Mutex is owned, but this thread must be the owner */
 
-	if (obj_desc->mutex.owner_thread != walk_state->thread) {
+	if (obj_desc->mutex.owner_thread->thread_id != walk_state->thread->thread_id) {
+		ACPI_REPORT_ERROR ((
+			"Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
+			walk_state->thread->thread_id,
+			obj_desc->mutex.node->name.ascii,
+			obj_desc->mutex.owner_thread->thread_id));
 		return_ACPI_STATUS (AE_AML_NOT_OWNER);
 	}
 
@@ -224,6 +252,8 @@
 	 * equal to the current sync level
 	 */
 	if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) {
+		ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], incorrect Sync_level\n",
+				obj_desc->mutex.node->name.ascii));
 		return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
 	}
 
diff -Nru a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c
--- a/drivers/acpi/executer/exnames.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/executer/exnames.c	Wed Oct 30 16:44:27 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exnames - interpreter/scanner name load/execute
- *              $Revision: 91 $
+ *              $Revision: 92 $
  *
  *****************************************************************************/
 
@@ -247,9 +247,9 @@
 	ACPI_FUNCTION_TRACE_PTR ("Ex_get_name_string", aml_address);
 
 
-	if (INTERNAL_TYPE_REGION_FIELD == data_type  ||
-		INTERNAL_TYPE_BANK_FIELD == data_type    ||
-		INTERNAL_TYPE_INDEX_FIELD == data_type) {
+	if (ACPI_TYPE_LOCAL_REGION_FIELD == data_type  ||
+		ACPI_TYPE_LOCAL_BANK_FIELD == data_type    ||
+		ACPI_TYPE_LOCAL_INDEX_FIELD == data_type) {
 		/* Disallow prefixes for types associated with Field_unit names */
 
 		name_string = acpi_ex_allocate_name_string (0, 1);
diff -Nru a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
--- a/drivers/acpi/executer/exoparg1.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/acpi/executer/exoparg1.c	Wed Oct 30 16:44:33 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exoparg1 - AML execution - opcodes with 1 argument
- *              $Revision: 143 $
+ *              $Revision: 144 $
  *
  *****************************************************************************/
 
@@ -642,7 +642,7 @@
 
 		if (ACPI_GET_DESCRIPTOR_TYPE (operand[0]) != ACPI_DESC_TYPE_NAMED) {
 			switch (ACPI_GET_OBJECT_TYPE (operand[0])) {
-			case INTERNAL_TYPE_REFERENCE:
+			case ACPI_TYPE_LOCAL_REFERENCE:
 				/*
 				 * This is a Deref_of (Local_x | Arg_x)
 				 *
diff -Nru a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
--- a/drivers/acpi/executer/exoparg2.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/executer/exoparg2.c	Wed Oct 30 16:44:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exoparg2 - AML execution - opcodes with 2 arguments
- *              $Revision: 111 $
+ *              $Revision: 113 $
  *
  *****************************************************************************/
 
@@ -242,11 +242,11 @@
 acpi_ex_opcode_2A_1T_1R (
 	acpi_walk_state         *walk_state)
 {
-	acpi_operand_object     **operand   = &walk_state->operands[0];
+	acpi_operand_object     **operand = &walk_state->operands[0];
 	acpi_operand_object     *return_desc = NULL;
 	acpi_operand_object     *temp_desc = NULL;
 	u32                     index;
-	acpi_status             status      = AE_OK;
+	acpi_status             status = AE_OK;
 	ACPI_SIZE               length;
 
 
@@ -379,7 +379,7 @@
 
 		/* Set the string length */
 
-		return_desc->string.length = length;
+		return_desc->string.length = (u32) length;
 		break;
 
 
@@ -393,7 +393,7 @@
 
 		/* Create the internal return object */
 
-		return_desc = acpi_ut_create_internal_object (INTERNAL_TYPE_REFERENCE);
+		return_desc = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_REFERENCE);
 		if (!return_desc) {
 			status = AE_NO_MEMORY;
 			goto cleanup;
diff -Nru a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
--- a/drivers/acpi/executer/exprep.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/acpi/executer/exprep.c	Wed Oct 30 16:44:24 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
- *              $Revision: 119 $
+ *              $Revision: 120 $
  *
  *****************************************************************************/
 
@@ -313,7 +313,7 @@
 
 	/* Parameter validation */
 
-	if (info->field_type != INTERNAL_TYPE_INDEX_FIELD) {
+	if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) {
 		if (!info->region_node) {
 			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null Region_node\n"));
 			return_ACPI_STATUS (AE_AML_NO_OPERAND);
@@ -349,7 +349,7 @@
 	/* Initialize areas of the object that are specific to the field type */
 
 	switch (info->field_type) {
-	case INTERNAL_TYPE_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
 
 		obj_desc->field.region_obj   = acpi_ns_get_attached_object (info->region_node);
 
@@ -364,7 +364,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
 
 		obj_desc->bank_field.value   = info->bank_value;
 		obj_desc->bank_field.region_obj = acpi_ns_get_attached_object (info->region_node);
@@ -385,7 +385,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		obj_desc->index_field.index_obj = acpi_ns_get_attached_object (info->register_node);
 		obj_desc->index_field.data_obj = acpi_ns_get_attached_object (info->data_register_node);
diff -Nru a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c
--- a/drivers/acpi/executer/exresnte.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/acpi/executer/exresnte.c	Wed Oct 30 16:44:26 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exresnte - AML Interpreter object resolution
- *              $Revision: 59 $
+ *              $Revision: 60 $
  *
  *****************************************************************************/
 
@@ -88,7 +88,7 @@
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Entry=%p Source_desc=%p Type=%X\n",
 		 node, source_desc, entry_type));
 
-	if (entry_type == INTERNAL_TYPE_ALIAS) {
+	if (entry_type == ACPI_TYPE_LOCAL_ALIAS) {
 		/* There is always exactly one level of indirection */
 
 		node       = (acpi_namespace_node *) node->object;
@@ -185,9 +185,9 @@
 
 
 	case ACPI_TYPE_BUFFER_FIELD:
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Field_read Node=%p Source_desc=%p Type=%X\n",
 			node, source_desc, entry_type));
@@ -223,7 +223,7 @@
 		return_ACPI_STATUS (AE_AML_OPERAND_TYPE);  /* Cannot be AE_TYPE */
 
 
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		/* No named references are allowed here */
 
diff -Nru a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c
--- a/drivers/acpi/executer/exresolv.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/executer/exresolv.c	Wed Oct 30 16:44:27 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exresolv - AML Interpreter object resolution
- *              $Revision: 116 $
+ *              $Revision: 117 $
  *
  *****************************************************************************/
 
@@ -132,7 +132,7 @@
 	/* This is an acpi_operand_object  */
 
 	switch (ACPI_GET_OBJECT_TYPE (stack_desc)) {
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		opcode = stack_desc->reference.opcode;
 
@@ -262,9 +262,9 @@
 	 * These cases may never happen here, but just in case..
 	 */
 	case ACPI_TYPE_BUFFER_FIELD:
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Field_read Source_desc=%p Type=%X\n",
 			stack_desc, ACPI_GET_OBJECT_TYPE (stack_desc)));
@@ -309,7 +309,7 @@
 	acpi_object_type        type;
 
 
-	ACPI_FUNCTION_TRACE ("Ex_get_object_type");
+	ACPI_FUNCTION_TRACE ("Acpi_ex_resolve_multiple");
 
 
 	/*
@@ -318,7 +318,7 @@
 	 * of the Object_type and Size_of operators). This means traversing
 	 * the list of possibly many nested references.
 	 */
-	while (ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_REFERENCE) {
+	while (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_REFERENCE) {
 		switch (obj_desc->reference.opcode) {
 		case AML_REF_OF_OP:
 
@@ -427,11 +427,18 @@
 	/* Convert internal types to external types */
 
 	switch (type) {
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		type = ACPI_TYPE_FIELD_UNIT;
+		break;
+
+	case ACPI_TYPE_LOCAL_SCOPE:
+
+		/* Per ACPI Specification, Scope is untyped */
+
+		type = ACPI_TYPE_ANY;
 		break;
 
 	default:
diff -Nru a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c
--- a/drivers/acpi/executer/exresop.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/acpi/executer/exresop.c	Wed Oct 30 16:44:33 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exresop - AML Interpreter operand/object resolution
- *              $Revision: 58 $
+ *              $Revision: 59 $
  *
  *****************************************************************************/
 
@@ -64,7 +64,7 @@
 		return (AE_OK);
 	}
 
-	if (type_needed == INTERNAL_TYPE_REFERENCE) {
+	if (type_needed == ACPI_TYPE_LOCAL_REFERENCE) {
 		/*
 		 * Allow the AML "Constant" opcodes (Zero, One, etc.) to be reference
 		 * objects and thus allow them to be targets.  (As per the ACPI
@@ -183,14 +183,14 @@
 
 			/* Check for bad acpi_object_type */
 
-			if (!acpi_ex_validate_object_type (object_type)) {
+			if (!acpi_ut_valid_object_type (object_type)) {
 				ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Bad operand object type [%X]\n",
 					object_type));
 
 				return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
 			}
 
-			if (object_type == (u8) INTERNAL_TYPE_REFERENCE) {
+			if (object_type == (u8) ACPI_TYPE_LOCAL_REFERENCE) {
 				/*
 				 * Decode the Reference
 				 */
@@ -267,13 +267,13 @@
 		case ARGI_FIXED_TARGET:         /* No implicit conversion before store to target */
 		case ARGI_SIMPLE_TARGET:        /* Name, Local, or Arg - no implicit conversion  */
 
-			/* Need an operand of type INTERNAL_TYPE_REFERENCE */
+			/* Need an operand of type ACPI_TYPE_LOCAL_REFERENCE */
 
 			if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) /* Node (name) ptr OK as-is */ {
 				goto next_operand;
 			}
 
-			status = acpi_ex_check_object_type (INTERNAL_TYPE_REFERENCE,
+			status = acpi_ex_check_object_type (ACPI_TYPE_LOCAL_REFERENCE,
 					  object_type, obj_desc);
 			if (ACPI_FAILURE (status)) {
 				return_ACPI_STATUS (status);
@@ -300,7 +300,7 @@
 			 * -- All others must be resolved below.
 			 */
 			if ((opcode == AML_STORE_OP) &&
-				(ACPI_GET_OBJECT_TYPE (*stack_ptr) == INTERNAL_TYPE_REFERENCE) &&
+				(ACPI_GET_OBJECT_TYPE (*stack_ptr) == ACPI_TYPE_LOCAL_REFERENCE) &&
 				((*stack_ptr)->reference.opcode == AML_INDEX_OP)) {
 				goto next_operand;
 			}
@@ -353,13 +353,6 @@
 			type_needed = ACPI_TYPE_REGION;
 			break;
 
-		case ARGI_IF:   /* If */
-
-			/* Need an operand of type INTERNAL_TYPE_IF */
-
-			type_needed = INTERNAL_TYPE_IF;
-			break;
-
 		case ARGI_PACKAGE:   /* Package */
 
 			/* Need an operand of type ACPI_TYPE_PACKAGE */
@@ -502,7 +495,7 @@
 			case ACPI_TYPE_PACKAGE:
 			case ACPI_TYPE_STRING:
 			case ACPI_TYPE_BUFFER:
-			case INTERNAL_TYPE_REFERENCE:
+			case ACPI_TYPE_LOCAL_REFERENCE:
 
 				/* Valid operand */
 				break;
diff -Nru a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
--- a/drivers/acpi/executer/exstore.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/executer/exstore.c	Wed Oct 30 16:44:28 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exstore - AML Interpreter object store support
- *              $Revision: 172 $
+ *              $Revision: 173 $
  *
  *****************************************************************************/
 
@@ -92,7 +92,7 @@
 	/* Destination object must be a Reference or a Constant object */
 
 	switch (ACPI_GET_OBJECT_TYPE (dest_desc)) {
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 		break;
 
 	case ACPI_TYPE_INTEGER:
@@ -428,9 +428,9 @@
 	 */
 	switch (target_type) {
 	case ACPI_TYPE_BUFFER_FIELD:
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 		/*
 		 * For fields, copy the source data to the target field.
diff -Nru a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c
--- a/drivers/acpi/executer/exstoren.c	Wed Oct 30 16:44:22 2002
+++ b/drivers/acpi/executer/exstoren.c	Wed Oct 30 16:44:22 2002
@@ -3,7 +3,7 @@
  *
  * Module Name: exstoren - AML Interpreter object store support,
  *                        Store to Node (namespace object)
- *              $Revision: 51 $
+ *              $Revision: 52 $
  *
  *****************************************************************************/
 
@@ -67,9 +67,9 @@
 	 */
 	switch (target_type) {
 	case ACPI_TYPE_BUFFER_FIELD:
-	case INTERNAL_TYPE_REGION_FIELD:
-	case INTERNAL_TYPE_BANK_FIELD:
-	case INTERNAL_TYPE_INDEX_FIELD:
+	case ACPI_TYPE_LOCAL_REGION_FIELD:
+	case ACPI_TYPE_LOCAL_BANK_FIELD:
+	case ACPI_TYPE_LOCAL_INDEX_FIELD:
 		/*
 		 * These cases all require only Integers or values that
 		 * can be converted to Integers (Strings or Buffers)
@@ -84,7 +84,7 @@
 		 * are all essentially the same.  This case handles the
 		 * "interchangeable" types Integer, String, and Buffer.
 		 */
-		if (ACPI_GET_OBJECT_TYPE (source_desc) == INTERNAL_TYPE_REFERENCE) {
+		if (ACPI_GET_OBJECT_TYPE (source_desc) == ACPI_TYPE_LOCAL_REFERENCE) {
 			/* Resolve a reference object first */
 
 			status = acpi_ex_resolve_to_value (source_desc_ptr, walk_state);
@@ -111,7 +111,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_ALIAS:
+	case ACPI_TYPE_LOCAL_ALIAS:
 
 		/*
 		 * Aliases are resolved by Acpi_ex_prep_operands
diff -Nru a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c
--- a/drivers/acpi/executer/exstorob.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/acpi/executer/exstorob.c	Wed Oct 30 16:44:34 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exstorob - AML Interpreter object store support, store to object
- *              $Revision: 45 $
+ *              $Revision: 46 $
  *
  *****************************************************************************/
 
@@ -144,7 +144,7 @@
 		 * String will fit in existing buffer.
 		 * Clear old string and copy in the new one
 		 */
-		ACPI_MEMSET (target_desc->string.pointer, 0, target_desc->string.length + 1);
+		ACPI_MEMSET (target_desc->string.pointer, 0, (ACPI_SIZE) target_desc->string.length + 1);
 		ACPI_MEMCPY (target_desc->string.pointer, buffer, length);
 	}
 	else {
diff -Nru a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
--- a/drivers/acpi/executer/exutils.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/acpi/executer/exutils.c	Wed Oct 30 16:44:24 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exutils - interpreter/scanner utilities
- *              $Revision: 103 $
+ *              $Revision: 105 $
  *
  *****************************************************************************/
 
@@ -50,32 +50,6 @@
 	 ACPI_MODULE_NAME    ("exutils")
 
 
-/*******************************************************************************
- *
- * FUNCTION:    Acpi_ex_validate_object_type
- *
- * PARAMETERS:  Type            Object type to validate
- *
- * DESCRIPTION: Determine if a type is a valid ACPI object type
- *
- ******************************************************************************/
-
-u8
-acpi_ex_validate_object_type (
-	acpi_object_type        type)
-{
-
-	ACPI_FUNCTION_ENTRY ();
-
-
-	if ((type > ACPI_TYPE_MAX && type < INTERNAL_TYPE_BEGIN) ||
-		(type > INTERNAL_TYPE_MAX)) {
-		return (FALSE);
-	}
-
-	return (TRUE);
-}
-
 #ifndef ACPI_NO_METHOD_EXECUTION
 
 /*******************************************************************************
@@ -336,7 +310,7 @@
 
 	eisa_id = acpi_ut_dword_byte_swap (numeric_id);
 
-	out_string[0] = (char) ('@' + ((eisa_id >> 26) & 0x1f));
+	out_string[0] = (char) ('@' + (((unsigned long) eisa_id >> 26) & 0x1f));
 	out_string[1] = (char) ('@' + ((eisa_id >> 21) & 0x1f));
 	out_string[2] = (char) ('@' + ((eisa_id >> 16) & 0x1f));
 	out_string[3] = acpi_ut_hex_to_ascii_char ((acpi_integer) eisa_id, 12);
diff -Nru a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
--- a/drivers/acpi/hardware/hwsleep.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/acpi/hardware/hwsleep.c	Wed Oct 30 16:44:21 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
- *              $Revision: 46 $
+ *              $Revision: 47 $
  *
  *****************************************************************************/
 
@@ -308,6 +308,11 @@
 		/* Spin until we wake */
 
 	} while (!in_value);
+
+	status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK);
+	if (ACPI_FAILURE (status)) {
+		return_ACPI_STATUS (status);
+	}
 
 	return_ACPI_STATUS (AE_OK);
 }
diff -Nru a/drivers/acpi/include/acconfig.h b/drivers/acpi/include/acconfig.h
--- a/drivers/acpi/include/acconfig.h	Wed Oct 30 16:44:25 2002
+++ b/drivers/acpi/include/acconfig.h	Wed Oct 30 16:44:25 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acconfig.h - Global configuration constants
- *       $Revision: 112 $
+ *       $Revision: 114 $
  *
  *****************************************************************************/
 
@@ -54,7 +54,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20021002
+#define ACPI_CA_VERSION                 0x20021022
 
 /* Version of ACPI supported */
 
diff -Nru a/drivers/acpi/include/acdisasm.h b/drivers/acpi/include/acdisasm.h
--- a/drivers/acpi/include/acdisasm.h	Wed Oct 30 16:44:32 2002
+++ b/drivers/acpi/include/acdisasm.h	Wed Oct 30 16:44:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acdisasm.h - AML disassembler
- *       $Revision: 3 $
+ *       $Revision: 4 $
  *
  *****************************************************************************/
 
@@ -106,10 +106,6 @@
 u32
 acpi_dm_dump_name (
 	char                    *name);
-
-void
-acpi_dm_string (
-	char                    *string);
 
 void
 acpi_dm_unicode (
diff -Nru a/drivers/acpi/include/acglobal.h b/drivers/acpi/include/acglobal.h
--- a/drivers/acpi/include/acglobal.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/acpi/include/acglobal.h	Wed Oct 30 16:44:17 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acglobal.h - Declarations for global variables
- *       $Revision: 131 $
+ *       $Revision: 132 $
  *
  *****************************************************************************/
 
@@ -152,7 +152,7 @@
  *
  ****************************************************************************/
 
-#define NUM_NS_TYPES                    INTERNAL_TYPE_INVALID+1
+#define NUM_NS_TYPES                    ACPI_TYPE_INVALID+1
 
 #if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
 #define NUM_PREDEFINED_NAMES            10
@@ -279,8 +279,8 @@
 /*
  * Statistic globals
  */
-ACPI_EXTERN u16                         acpi_gbl_obj_type_count[INTERNAL_TYPE_NODE_MAX+1];
-ACPI_EXTERN u16                         acpi_gbl_node_type_count[INTERNAL_TYPE_NODE_MAX+1];
+ACPI_EXTERN u16                         acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16                         acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
 ACPI_EXTERN u16                         acpi_gbl_obj_type_count_misc;
 ACPI_EXTERN u16                         acpi_gbl_node_type_count_misc;
 ACPI_EXTERN u32                         acpi_gbl_num_nodes;
diff -Nru a/drivers/acpi/include/acinterp.h b/drivers/acpi/include/acinterp.h
--- a/drivers/acpi/include/acinterp.h	Wed Oct 30 16:44:33 2002
+++ b/drivers/acpi/include/acinterp.h	Wed Oct 30 16:44:33 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acinterp.h - Interpreter subcomponent prototypes and defines
- *       $Revision: 139 $
+ *       $Revision: 140 $
  *
  *****************************************************************************/
 
@@ -611,10 +611,6 @@
 void
 acpi_ex_truncate_for32bit_table (
 	acpi_operand_object     *obj_desc);
-
-u8
-acpi_ex_validate_object_type (
-	acpi_object_type        type);
 
 u8
 acpi_ex_acquire_global_lock (
diff -Nru a/drivers/acpi/include/aclocal.h b/drivers/acpi/include/aclocal.h
--- a/drivers/acpi/include/aclocal.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/include/aclocal.h	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: aclocal.h - Internal data types used across the ACPI subsystem
- *       $Revision: 176 $
+ *       $Revision: 178 $
  *
  *****************************************************************************/
 
@@ -212,7 +212,6 @@
 	struct acpi_table_desc  *next;
 	struct acpi_table_desc  *installed_desc;
 	acpi_table_header       *pointer;
-	void                    *base_pointer;
 	u8                      *aml_start;
 	u64                     physical_address;
 	u32                     aml_length;
@@ -655,6 +654,7 @@
 	char                        *filename;
 	char                        *external_name;
 	char                        *namepath;
+	char                        name_seg[4];
 	u32                         extra_value;
 	u32                         column;
 	u32                         line_number;
diff -Nru a/drivers/acpi/include/acnamesp.h b/drivers/acpi/include/acnamesp.h
--- a/drivers/acpi/include/acnamesp.h	Wed Oct 30 16:44:22 2002
+++ b/drivers/acpi/include/acnamesp.h	Wed Oct 30 16:44:22 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acnamesp.h - Namespace subcomponent prototypes and defines
- *       $Revision: 127 $
+ *       $Revision: 129 $
  *
  *****************************************************************************/
 
@@ -178,6 +178,10 @@
 acpi_ns_delete_children (
 	acpi_namespace_node     *parent);
 
+int
+acpi_ns_compare_names (
+	char                    *name1,
+	char                    *name2);
 
 /*
  * Namespace modification - nsmodify
@@ -281,17 +285,13 @@
 
 
 /*
- * Parent/Child/Peer utility functions - nsfamily
+ * Parent/Child/Peer utility functions
  */
 
 acpi_name
 acpi_ns_find_parent_name (
 	acpi_namespace_node     *node_to_search);
 
-u8
-acpi_ns_exist_downstream_sibling (
-	acpi_namespace_node     *this_node);
-
 
 /*
  * Name and Scope manipulation - nsnames
@@ -397,8 +397,8 @@
 void
 acpi_ns_install_node (
 	acpi_walk_state         *walk_state,
-	acpi_namespace_node     *parent_node,   /* Parent */
-	acpi_namespace_node     *node,      /* New Child*/
+	acpi_namespace_node     *parent_node,
+	acpi_namespace_node     *node,
 	acpi_object_type        type);
 
 
diff -Nru a/drivers/acpi/include/acobject.h b/drivers/acpi/include/acobject.h
--- a/drivers/acpi/include/acobject.h	Wed Oct 30 16:44:22 2002
+++ b/drivers/acpi/include/acobject.h	Wed Oct 30 16:44:22 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Name: acobject.h - Definition of acpi_operand_object  (Internal object only)
- *       $Revision: 113 $
+ *       $Revision: 114 $
  *
  *****************************************************************************/
 
@@ -199,6 +199,7 @@
 	void                        *semaphore;
 	union acpi_operand_obj      *prev;              /* Link for list of acquired mutexes */
 	union acpi_operand_obj      *next;              /* Link for list of acquired mutexes */
+	acpi_namespace_node         *node;              /* containing object */
 
 } ACPI_OBJECT_MUTEX;
 
diff -Nru a/drivers/acpi/include/acstruct.h b/drivers/acpi/include/acstruct.h
--- a/drivers/acpi/include/acstruct.h	Wed Oct 30 16:44:21 2002
+++ b/drivers/acpi/include/acstruct.h	Wed Oct 30 16:44:21 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acstruct.h - Internal structs
- *       $Revision: 19 $
+ *       $Revision: 20 $
  *
  *****************************************************************************/
 
@@ -59,6 +59,8 @@
 	u8                      return_used;
 	u8                      walk_type;
 	u16                     opcode;                             /* Current AML opcode */
+	u8                      scope_depth;
+	u8                      reserved1;
 	u32                     arg_count;                          /* push for fixed or var args */
 	u32                     aml_offset;
 	u32                     arg_types;
diff -Nru a/drivers/acpi/include/actypes.h b/drivers/acpi/include/actypes.h
--- a/drivers/acpi/include/actypes.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/include/actypes.h	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actypes.h - Common data types for the entire ACPI subsystem
- *       $Revision: 239 $
+ *       $Revision: 240 $
  *
  *****************************************************************************/
 
@@ -42,7 +42,7 @@
 
 
 /*
- * Data types - Fixed across all compilation models
+ * Data types - Fixed across all compilation models (16/32/64)
  *
  * BOOLEAN      Logical Boolean.
  * INT8         8-bit  (1 byte) signed value
@@ -91,6 +91,7 @@
 
 
 #elif ACPI_MACHINE_WIDTH == 16
+
 /*
  * 16-bit type definitions
  */
@@ -133,6 +134,7 @@
 
 
 #elif ACPI_MACHINE_WIDTH == 32
+
 /*
  * 32-bit type definitions (default)
  */
@@ -168,7 +170,6 @@
 /*
  * Miscellaneous common types
  */
-
 typedef UINT32                          UINT32_BIT;
 typedef NATIVE_UINT                     ACPI_PTRDIFF;
 typedef char                            NATIVE_CHAR;
@@ -226,7 +227,6 @@
 /*
  * Useful defines
  */
-
 #ifdef FALSE
 #undef FALSE
 #endif
@@ -245,7 +245,6 @@
 /*
  * Local datatypes
  */
-
 typedef u32                             acpi_status;    /* All ACPI Exceptions */
 typedef u32                             acpi_name;      /* 4-byte ACPI name */
 typedef char*                           acpi_string;    /* Null terminated ASCII string */
@@ -314,7 +313,6 @@
 /*
  * Constants with special meanings
  */
-
 #define ACPI_ROOT_OBJECT                (acpi_handle) ACPI_PTR_ADD (char, NULL, ACPI_MAX_PTR)
 
 
@@ -386,7 +384,6 @@
 /*
  *  Table types.  These values are passed to the table related APIs
  */
-
 typedef u32                             acpi_table_type;
 
 #define ACPI_TABLE_RSDP                 (acpi_table_type) 0
@@ -401,15 +398,14 @@
 
 
 /*
- * Types associated with names.  The first group of
- * values correspond to the definition of the ACPI
- * Object_type operator (See the ACPI Spec). Therefore,
+ * Types associated with ACPI names and objects.  The first group of
+ * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
+ * of the ACPI Object_type() operator (See the ACPI Spec). Therefore,
  * only add to the first group if the spec changes.
  *
- * Types must be kept in sync with the Acpi_ns_properties
- * and Acpi_ns_type_names arrays
+ * Types must be kept in sync with the global Acpi_ns_properties
+ * and Acpi_ns_type_names arrays.
  */
-
 typedef u32                             acpi_object_type;
 
 #define ACPI_TYPE_ANY                   0x00
@@ -430,52 +426,45 @@
 #define ACPI_TYPE_DDB_HANDLE            0x0F
 #define ACPI_TYPE_DEBUG_OBJECT          0x10
 
-#define ACPI_TYPE_MAX                   0x10
+#define ACPI_TYPE_EXTERNAL_MAX          0x10
+
+/*
+ * These are object types that do not map directly to the ACPI
+ * Object_type() operator. They are used for various internal purposes only.
+ * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
+ * internal types must move upwards. (There is code that depends on these
+ * values being contiguous with the external types above.)
+ */
+#define ACPI_TYPE_LOCAL_REGION_FIELD    0x11
+#define ACPI_TYPE_LOCAL_BANK_FIELD      0x12
+#define ACPI_TYPE_LOCAL_INDEX_FIELD     0x13
+#define ACPI_TYPE_LOCAL_REFERENCE       0x14  /* Arg#, Local#, Name, Debug, Ref_of, Index */
+#define ACPI_TYPE_LOCAL_ALIAS           0x15
+#define ACPI_TYPE_LOCAL_NOTIFY          0x16
+#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x17
+#define ACPI_TYPE_LOCAL_RESOURCE        0x18
+#define ACPI_TYPE_LOCAL_RESOURCE_FIELD  0x19
+#define ACPI_TYPE_LOCAL_SCOPE           0x1A  /* 1 Name, multiple Object_list Nodes */
+
+#define ACPI_TYPE_NS_NODE_MAX           0x1A  /* Last typecode used within a NS Node */
 
 /*
- * This section contains object types that do not relate to the ACPI Object_type operator.
- * They are used for various internal purposes only.  If new predefined ACPI_TYPEs are
- * added (via the ACPI specification), these internal types must move upwards.
- * Also, values exceeding the largest official ACPI Object_type must not overlap with
- * defined AML opcodes.
- */
-#define INTERNAL_TYPE_BEGIN             0x11
-
-#define INTERNAL_TYPE_REGION_FIELD      0x11
-#define INTERNAL_TYPE_BANK_FIELD        0x12
-#define INTERNAL_TYPE_INDEX_FIELD       0x13
-#define INTERNAL_TYPE_REFERENCE         0x14  /* Arg#, Local#, Name, Debug; used only in descriptors */
-#define INTERNAL_TYPE_ALIAS             0x15
-#define INTERNAL_TYPE_NOTIFY            0x16
-#define INTERNAL_TYPE_ADDRESS_HANDLER   0x17
-#define INTERNAL_TYPE_RESOURCE          0x18
-#define INTERNAL_TYPE_RESOURCE_FIELD    0x19
-
-
-#define INTERNAL_TYPE_NODE_MAX          0x19
-
-/* These are pseudo-types because there are never any namespace nodes with these types */
-
-#define INTERNAL_TYPE_FIELD_DEFN        0x1A  /* Name, Byte_const, multiple Field_element */
-#define INTERNAL_TYPE_BANK_FIELD_DEFN   0x1B  /* 2 Name,DWord_const,Byte_const,multi Field_element */
-#define INTERNAL_TYPE_INDEX_FIELD_DEFN  0x1C  /* 2 Name, Byte_const, multiple Field_element */
-#define INTERNAL_TYPE_IF                0x1D
-#define INTERNAL_TYPE_ELSE              0x1E
-#define INTERNAL_TYPE_WHILE             0x1F
-#define INTERNAL_TYPE_SCOPE             0x20  /* Name, multiple Node */
-#define INTERNAL_TYPE_DEF_ANY           0x21  /* type is Any, suppress search of enclosing scopes */
-#define INTERNAL_TYPE_EXTRA             0x22
-#define INTERNAL_TYPE_DATA              0x23
+ * These are special object types that never appear in
+ * a Namespace node, only in an acpi_operand_object
+ */
+#define ACPI_TYPE_LOCAL_EXTRA           0x1B
+#define ACPI_TYPE_LOCAL_DATA            0x1C
 
-#define INTERNAL_TYPE_MAX               0x23
+#define ACPI_TYPE_LOCAL_MAX             0x1C
 
-#define INTERNAL_TYPE_INVALID           0x24
+/* All types above here are invalid */
+
+#define ACPI_TYPE_INVALID               0x1D
 #define ACPI_TYPE_NOT_FOUND             0xFF
 
 
 /*
- * Bitmapped ACPI types
- * Used internally only
+ * Bitmapped ACPI types.  Used internally only
  */
 #define ACPI_BTYPE_ANY                  0x00000000
 #define ACPI_BTYPE_INTEGER              0x00000001
@@ -515,7 +504,6 @@
 /*
  * Acpi_event Types: Fixed & General Purpose
  */
-
 typedef u32                             acpi_event_type;
 
 #define ACPI_EVENT_FIXED                0
@@ -524,7 +512,6 @@
 /*
  * Fixed events
  */
-
 #define ACPI_EVENT_PMTIMER              0
 #define ACPI_EVENT_GLOBAL               1
 #define ACPI_EVENT_POWER_BUTTON         2
@@ -543,9 +530,7 @@
 /*
  * GPEs
  */
-
 #define ACPI_EVENT_WAKE_ENABLE          0x1
-
 #define ACPI_EVENT_WAKE_DISABLE         0x1
 
 
@@ -578,7 +563,7 @@
 #define ACPI_DEVICE_NOTIFY              1
 #define ACPI_MAX_NOTIFY_HANDLER_TYPE    1
 
-#define ACPI_MAX_SYS_NOTIFY                  0x7f
+#define ACPI_MAX_SYS_NOTIFY             0x7f
 
 
 /* Address Space (Operation Region) Types */
@@ -626,10 +611,10 @@
 #define ACPI_BITREG_MAX                         0x13
 #define ACPI_NUM_BITREG                         ACPI_BITREG_MAX + 1
 
+
 /*
  * External ACPI object definition
  */
-
 typedef union acpi_obj
 {
 	acpi_object_type            type;   /* See definition of Acpi_ns_type for values */
@@ -688,7 +673,6 @@
 /*
  * List of objects, used as a parameter list for control method evaluation
  */
-
 typedef struct acpi_obj_list
 {
 	u32                         count;
@@ -700,7 +684,6 @@
 /*
  * Miscellaneous common Data Structures used by the interfaces
  */
-
 #define ACPI_NO_BUFFER              0
 #define ACPI_ALLOCATE_BUFFER        (ACPI_SIZE) (-1)
 #define ACPI_ALLOCATE_LOCAL_BUFFER  (ACPI_SIZE) (-2)
@@ -716,7 +699,6 @@
 /*
  * Name_type for Acpi_get_name
  */
-
 #define ACPI_FULL_PATHNAME              0
 #define ACPI_SINGLE_NAME                1
 #define ACPI_NAME_TYPE_MAX              1
@@ -725,7 +707,6 @@
 /*
  * Structure and flags for Acpi_get_system_info
  */
-
 #define ACPI_SYS_MODE_UNKNOWN           0x0000
 #define ACPI_SYS_MODE_ACPI              0x0001
 #define ACPI_SYS_MODE_LEGACY            0x0002
@@ -745,7 +726,6 @@
 /*
  * System info returned by Acpi_get_system_info()
  */
-
 typedef struct _acpi_sys_info
 {
 	u32                         acpi_ca_version;
@@ -764,7 +744,6 @@
 /*
  * Various handlers and callback procedures
  */
-
 typedef
 u32 (*acpi_event_handler) (
 	void                        *context);
@@ -1001,7 +980,7 @@
 
 /*
  * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
- *  needed because it has no fields
+ * needed because it has no fields
  */
 
 typedef struct
diff -Nru a/drivers/acpi/include/acutils.h b/drivers/acpi/include/acutils.h
--- a/drivers/acpi/include/acutils.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/acpi/include/acutils.h	Wed Oct 30 16:44:17 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- *       $Revision: 146 $
+ *       $Revision: 147 $
  *
  *****************************************************************************/
 
@@ -636,6 +636,11 @@
 /*
  * utmisc
  */
+
+void
+acpi_ut_print_string (
+	char                    *string,
+	u8                      max_length);
 
 acpi_status
 acpi_ut_divide (
diff -Nru a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
--- a/drivers/acpi/namespace/nsaccess.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/acpi/namespace/nsaccess.c	Wed Oct 30 16:44:34 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- *              $Revision: 161 $
+ *              $Revision: 165 $
  *
  ******************************************************************************/
 
@@ -142,7 +142,7 @@
 				/*
 				 * Build an object around the static string
 				 */
-				obj_desc->string.length = ACPI_STRLEN (init_val->val);
+				obj_desc->string.length = (u32) ACPI_STRLEN (init_val->val);
 				obj_desc->string.pointer = init_val->val;
 				obj_desc->common.flags |= AOPOBJ_STATIC_POINTER;
 				break;
@@ -150,6 +150,7 @@
 
 			case ACPI_TYPE_MUTEX:
 
+				obj_desc->mutex.node = new_node;
 				obj_desc->mutex.sync_level =
 						 (u16) ACPI_STRTOUL (init_val->val, NULL, 10);
 
@@ -246,6 +247,7 @@
 	acpi_namespace_node     *current_node = NULL;
 	acpi_namespace_node     *this_node = NULL;
 	u32                     num_segments;
+	u32                     num_carats;
 	acpi_name               simple_name;
 	acpi_object_type        type_to_check_for;
 	acpi_object_type        this_search_type;
@@ -299,26 +301,9 @@
 		}
 	}
 
-	/*
-	 * This check is explicitly split to relax the Type_to_check_for
-	 * conditions for Bank_field_defn. Originally, both Bank_field_defn and
-	 * Def_field_defn caused Type_to_check_for to be set to ACPI_TYPE_REGION,
-	 * but the Bank_field_defn may also check for a Field definition as well
-	 * as an Operation_region.
-	 */
-	if (INTERNAL_TYPE_FIELD_DEFN == type) {
-		/* Def_field_defn defines fields in a Region */
+	/* Save type   TBD: may be no longer necessary */
 
-		type_to_check_for = ACPI_TYPE_REGION;
-	}
-	else if (INTERNAL_TYPE_BANK_FIELD_DEFN == type) {
-		/* Bank_field_defn defines data fields in a Field Object */
-
-		type_to_check_for = ACPI_TYPE_ANY;
-	}
-	else {
-		type_to_check_for = type;
-	}
+	type_to_check_for = type;
 
 	/*
 	 * Begin examination of the actual pathname
@@ -364,14 +349,15 @@
 			/* Pathname is relative to current scope, start there */
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
-				"Searching relative to prefix scope [%p]\n",
-				prefix_node));
+				"Searching relative to prefix scope [%4.4s] (%p)\n",
+				prefix_node->name.ascii, prefix_node));
 
 			/*
 			 * Handle multiple Parent Prefixes (carat) by just getting
 			 * the parent node for each prefix instance.
 			 */
 			this_node = prefix_node;
+			num_carats = 0;
 			while (*path == (u8) AML_PARENT_PREFIX) {
 				/* Name is fully qualified, no search rules apply */
 
@@ -384,6 +370,7 @@
 
 				/* Backup to the parent node */
 
+				num_carats++;
 				this_node = acpi_ns_get_parent_node (this_node);
 				if (!this_node) {
 					/* Current scope has no parent scope */
@@ -396,7 +383,8 @@
 
 			if (search_parent_flag == ACPI_NS_NO_UPSEARCH) {
 				ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
-					"Path is absolute with one or more carats\n"));
+					"Search scope is [%4.4s], path has %d carat(s)\n",
+					this_node->name.ascii, num_carats));
 			}
 		}
 
@@ -420,6 +408,7 @@
 			 * have the correct target node and there are no name segments.
 			 */
 			num_segments = 0;
+			type = this_node->type;
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
 				"Prefix-only Pathname (Zero name segments), Flags=%X\n", flags));
@@ -525,6 +514,7 @@
 					current_node));
 			}
 
+			*return_node = this_node;
 			return_ACPI_STATUS (status);
 		}
 
@@ -535,27 +525,24 @@
 		 *    2) And we are looking for a specific type
 		 *       (Not checking for TYPE_ANY)
 		 *    3) Which is not an alias
-		 *    4) Which is not a local type (TYPE_DEF_ANY)
-		 *    5) Which is not a local type (TYPE_SCOPE)
-		 *    6) Which is not a local type (TYPE_INDEX_FIELD_DEFN)
-		 *    7) And the type of target object is known (not TYPE_ANY)
-		 *    8) And target object does not match what we are looking for
+		 *    4) Which is not a local type (TYPE_SCOPE)
+		 *    5) And the type of target object is known (not TYPE_ANY)
+		 *    6) And target object does not match what we are looking for
 		 *
 		 * Then we have a type mismatch.  Just warn and ignore it.
 		 */
 		if ((num_segments       == 0)                               &&
 			(type_to_check_for  != ACPI_TYPE_ANY)                   &&
-			(type_to_check_for  != INTERNAL_TYPE_ALIAS)             &&
-			(type_to_check_for  != INTERNAL_TYPE_DEF_ANY)           &&
-			(type_to_check_for  != INTERNAL_TYPE_SCOPE)             &&
-			(type_to_check_for  != INTERNAL_TYPE_INDEX_FIELD_DEFN)  &&
+			(type_to_check_for  != ACPI_TYPE_LOCAL_ALIAS)           &&
+			(type_to_check_for  != ACPI_TYPE_LOCAL_SCOPE)           &&
 			(this_node->type    != ACPI_TYPE_ANY)                   &&
 			(this_node->type    != type_to_check_for)) {
 			/* Complain about a type mismatch */
 
 			ACPI_REPORT_WARNING (
-				("Ns_lookup: %4.4s, type %X, checking for type %X\n",
-				(char *) &simple_name, this_node->type, type_to_check_for));
+				("Ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)\n",
+				(char *) &simple_name, acpi_ut_get_type_name (this_node->type),
+				acpi_ut_get_type_name (type_to_check_for)));
 		}
 
 		/*
@@ -581,15 +568,11 @@
 		 * If entry is a type which opens a scope, push the new scope on the
 		 * scope stack.
 		 */
-		if (acpi_ns_opens_scope (type_to_check_for)) {
+		if (acpi_ns_opens_scope (type)) {
 			status = acpi_ds_scope_stack_push (this_node, type, walk_state);
 			if (ACPI_FAILURE (status)) {
 				return_ACPI_STATUS (status);
 			}
-
-			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
-				"Setting current scope to [%4.4s] (%p)\n",
-				this_node->name.ascii, this_node));
 		}
 	}
 
diff -Nru a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c
--- a/drivers/acpi/namespace/nsalloc.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/namespace/nsalloc.c	Wed Oct 30 16:44:28 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsalloc - Namespace allocation and deletion utilities
- *              $Revision: 74 $
+ *              $Revision: 75 $
  *
  ******************************************************************************/
 
@@ -127,6 +127,55 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    Acpi_ns_compare_names
+ *
+ * PARAMETERS:  Name1           - First name to compare
+ *              Name2           - Second name to compare
+ *
+ * RETURN:      value from strncmp
+ *
+ * DESCRIPTION: Compare two ACPI names.  Names that are prefixed with an
+ *              underscore are forced to be alphabetically first.
+ *
+ ******************************************************************************/
+
+int
+acpi_ns_compare_names (
+	char                    *name1,
+	char                    *name2)
+{
+	char                    reversed_name1[ACPI_NAME_SIZE];
+	char                    reversed_name2[ACPI_NAME_SIZE];
+	u32                     i;
+	u32                     j;
+
+
+	/*
+	 * Replace all instances of "underscore" with a value that is smaller so
+	 * that all names that are prefixed with underscore(s) are alphabetically
+	 * first.
+	 *
+	 * Reverse the name bytewise so we can just do a 32-bit compare instead
+	 * of a strncmp.
+	 */
+	for (i = 0, j= (ACPI_NAME_SIZE - 1); i < ACPI_NAME_SIZE; i++, j--) {
+		reversed_name1[j] = name1[i];
+		if (name1[i] == '_') {
+			reversed_name1[j] = '*';
+		}
+
+		reversed_name2[j] = name2[i];
+		if (name2[i] == '_') {
+			reversed_name2[j] = '*';
+		}
+	}
+
+	return (*(s32 *) reversed_name1 - *(s32 *) reversed_name2);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    Acpi_ns_install_node
  *
  * PARAMETERS:  Walk_state      - Current state of the walk
@@ -139,8 +188,10 @@
  * DESCRIPTION: Initialize a new namespace node and install it amongst
  *              its peers.
  *
- *              Note: Current namespace lookup is linear search, so the nodes
- *              are not linked in any particular order.
+ *              Note: Current namespace lookup is linear search.  However, the
+ *              nodes are linked in alphabetical order to 1) put all reserved
+ *              names (start with underscore) first, and to 2) make a readable
+ *              namespace dump.
  *
  ******************************************************************************/
 
@@ -153,6 +204,7 @@
 {
 	u16                     owner_id = TABLE_ID_DSDT;
 	acpi_namespace_node     *child_node;
+	acpi_namespace_node     *previous_child_node;
 
 
 	ACPI_FUNCTION_TRACE ("Ns_install_node");
@@ -172,66 +224,68 @@
 	child_node = parent_node->child;
 	if (!child_node) {
 		parent_node->child = node;
+		node->flags |= ANOBJ_END_OF_PEER_LIST;
+		node->peer = parent_node;
 	}
 	else {
-		while (!(child_node->flags & ANOBJ_END_OF_PEER_LIST)) {
-			child_node = child_node->peer;
-		}
+		/*
+		 * Walk the list whilst searching for the the correct
+		 * alphabetic placement.
+		 */
+		previous_child_node = NULL;
+		while (acpi_ns_compare_names (child_node->name.ascii, node->name.ascii) < 0) {
+			if (child_node->flags & ANOBJ_END_OF_PEER_LIST) {
+				/* Last peer;  Clear end-of-list flag */
 
-		child_node->peer = node;
+				child_node->flags &= ~ANOBJ_END_OF_PEER_LIST;
 
-		/* Clear end-of-list flag */
+				/* This node is the new peer to the child node */
 
-		child_node->flags &= ~ANOBJ_END_OF_PEER_LIST;
-	}
+				child_node->peer = node;
 
-	/* Init the new entry */
+				/* This node is the new end-of-list */
 
-	node->owner_id  = owner_id;
-	node->flags     |= ANOBJ_END_OF_PEER_LIST;
-	node->peer      = parent_node;
+				node->flags |= ANOBJ_END_OF_PEER_LIST;
+				node->peer = parent_node;
+				break;
+			}
 
+			/* Get next peer */
 
-	/*
-	 * If adding a name with unknown type, or having to
-	 * add the region in order to define fields in it, we
-	 * have a forward reference.
-	 */
-	if ((ACPI_TYPE_ANY == type) ||
-		(INTERNAL_TYPE_FIELD_DEFN == type) ||
-		(INTERNAL_TYPE_BANK_FIELD_DEFN == type)) {
-		/*
-		 * We don't want to abort here, however!
-		 * We will fill in the actual type when the
-		 * real definition is found later.
-		 */
-		ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] is a forward reference\n",
-			node->name.ascii));
-	}
+			previous_child_node = child_node;
+			child_node = child_node->peer;
+		}
 
-	/*
-	 * The Def_field_defn and Bank_field_defn cases are actually
-	 * looking up the Region in which the field will be defined
-	 */
-	if ((INTERNAL_TYPE_FIELD_DEFN == type) ||
-		(INTERNAL_TYPE_BANK_FIELD_DEFN == type)) {
-		type = ACPI_TYPE_REGION;
-	}
+		/* Did the node get inserted at the end-of-list? */
 
-	/*
-	 * Scope, Def_any, and Index_field_defn are bogus "types" which do
-	 * not actually have anything to do with the type of the name
-	 * being looked up.  Save any other value of Type as the type of
-	 * the entry.
-	 */
-	if ((type != INTERNAL_TYPE_SCOPE) &&
-		(type != INTERNAL_TYPE_DEF_ANY) &&
-		(type != INTERNAL_TYPE_INDEX_FIELD_DEFN)) {
-		node->type = (u8) type;
+		if (!(node->flags & ANOBJ_END_OF_PEER_LIST)) {
+			/*
+			 * Loop above terminated without reaching the end-of-list.
+			 * Insert the new node at the current location
+			 */
+			if (previous_child_node) {
+				/* Insert node alphabetically */
+
+				node->peer = child_node;
+				previous_child_node->peer = node;
+			}
+			else {
+				/* Insert node alphabetically at start of list */
+
+				node->peer = child_node;
+				parent_node->child = node;
+			}
+		}
 	}
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s added to %p at %p\n",
-		node->name.ascii, parent_node, node));
+	/* Init the new entry */
+
+	node->owner_id = owner_id;
+	node->type = (u8) type;
+
+	ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s (%s) added to %4.4s (%s) %p at %p\n",
+		node->name.ascii, acpi_ut_get_type_name (node->type),
+		parent_node->name.ascii, acpi_ut_get_type_name (parent_node->type), parent_node, node));
 
 	/*
 	 * Increment the reference count(s) of all parents up to
diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
--- a/drivers/acpi/namespace/nsdump.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/acpi/namespace/nsdump.c	Wed Oct 30 16:44:33 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: nsdump - table dumping routines for debug
- *              $Revision: 141 $
+ *              $Revision: 145 $
  *
  *****************************************************************************/
 
@@ -150,22 +150,14 @@
 	acpi_object_type        obj_type;
 	acpi_object_type        type;
 	u32                     bytes_to_dump;
-	u32                     downstream_sibling_mask = 0;
-	u32                     level_tmp;
-	u32                     which_bit;
-	u32                     i;
 	u32                     dbg_level;
+	u32                     i;
 
 
 	ACPI_FUNCTION_NAME ("Ns_dump_one_object");
 
 
-	this_node = acpi_ns_map_handle_to_node (obj_handle);
-
-	level_tmp   = level;
-	type        = this_node->type;
-	which_bit   = 1;
-
+	/* Is output enabled? */
 
 	if (!(acpi_dbg_level & info->debug_level)) {
 		return (AE_OK);
@@ -176,6 +168,9 @@
 		return (AE_OK);
 	}
 
+	this_node = acpi_ns_map_handle_to_node (obj_handle);
+	type = this_node->type;
+
 	/* Check if the owner matches */
 
 	if ((info->owner_id != ACPI_UINT32_MAX) &&
@@ -185,45 +180,12 @@
 
 	/* Indent the object according to the level */
 
-	while (level_tmp--) {
-		/* Print appropriate characters to form tree structure */
-
-		if (level_tmp) {
-			if (downstream_sibling_mask & which_bit) {
-				acpi_os_printf ("|");
-			}
-			else {
-				acpi_os_printf (" ");
-			}
-
-			which_bit <<= 1;
-		}
-		else {
-			if (acpi_ns_exist_downstream_sibling (this_node + 1)) {
-				downstream_sibling_mask |= ((u32) 1 << (level - 1));
-				acpi_os_printf ("+");
-			}
-			else {
-				downstream_sibling_mask &= ACPI_UINT32_MAX ^ ((u32) 1 << (level - 1));
-				acpi_os_printf ("+");
-			}
-
-			if (this_node->child == NULL) {
-				acpi_os_printf ("-");
-			}
-			else if (acpi_ns_exist_downstream_sibling (this_node->child)) {
-				acpi_os_printf ("+");
-			}
-			else {
-				acpi_os_printf ("-");
-			}
-		}
-	}
+	acpi_os_printf ("%2d%*s", level - 1, level * 2, " ");
 
-	/* Check the integrity of our data */
+	/* Check the node type and name */
 
-	if (type > INTERNAL_TYPE_MAX) {
-		type = INTERNAL_TYPE_DEF_ANY;  /* prints as *ERROR* */
+	if (type > ACPI_TYPE_LOCAL_MAX) {
+		ACPI_REPORT_WARNING (("Invalid ACPI Type %08X\n", type));
 	}
 
 	if (!acpi_ut_valid_acpi_name (this_node->name.integer)) {
@@ -233,7 +195,7 @@
 	/*
 	 * Now we can print out the pertinent information
 	 */
-	acpi_os_printf (" %4.4s %-12s %p",
+	acpi_os_printf ("%4.4s %-12s %p ",
 			this_node->name.ascii, acpi_ut_get_type_name (type), this_node);
 
 	dbg_level = acpi_dbg_level;
@@ -254,7 +216,7 @@
 		switch (type) {
 		case ACPI_TYPE_PROCESSOR:
 
-			acpi_os_printf (" ID %X Len %.4X Addr %p\n",
+			acpi_os_printf ("ID %X Len %.4X Addr %p\n",
 					 obj_desc->processor.proc_id,
 					 obj_desc->processor.length,
 					 (char *) obj_desc->processor.address);
@@ -263,13 +225,13 @@
 
 		case ACPI_TYPE_DEVICE:
 
-			acpi_os_printf (" Notification object: %p", obj_desc);
+			acpi_os_printf ("Notify object: %p", obj_desc);
 			break;
 
 
 		case ACPI_TYPE_METHOD:
 
-			acpi_os_printf (" Args %X Len %.4X Aml %p\n",
+			acpi_os_printf ("Args %X Len %.4X Aml %p\n",
 					 (u32) obj_desc->method.param_count,
 					 obj_desc->method.aml_length,
 					 obj_desc->method.aml_start);
@@ -278,7 +240,7 @@
 
 		case ACPI_TYPE_INTEGER:
 
-			acpi_os_printf (" = %8.8X%8.8X\n",
+			acpi_os_printf ("= %8.8X%8.8X\n",
 					 ACPI_HIDWORD (obj_desc->integer.value),
 					 ACPI_LODWORD (obj_desc->integer.value));
 			break;
@@ -287,11 +249,11 @@
 		case ACPI_TYPE_PACKAGE:
 
 			if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
-				acpi_os_printf (" Elements %.2X\n",
+				acpi_os_printf ("Elements %.2X\n",
 						 obj_desc->package.count);
 			}
 			else {
-				acpi_os_printf (" [Length not yet evaluated]\n");
+				acpi_os_printf ("[Length not yet evaluated]\n");
 			}
 			break;
 
@@ -299,7 +261,7 @@
 		case ACPI_TYPE_BUFFER:
 
 			if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
-				acpi_os_printf (" Len %.2X",
+				acpi_os_printf ("Len %.2X",
 						 obj_desc->buffer.length);
 
 				/* Dump some of the buffer */
@@ -313,28 +275,22 @@
 				acpi_os_printf ("\n");
 			}
 			else {
-				acpi_os_printf (" [Length not yet evaluated]\n");
+				acpi_os_printf ("[Length not yet evaluated]\n");
 			}
 			break;
 
 
 		case ACPI_TYPE_STRING:
 
-			acpi_os_printf (" Len %.2X", obj_desc->string.length);
-
-			if (obj_desc->string.length > 0) {
-				acpi_os_printf (" = \"%.32s\"", obj_desc->string.pointer);
-				if (obj_desc->string.length > 32) {
-					acpi_os_printf ("...");
-				}
-			}
+			acpi_os_printf ("Len %.2X ", obj_desc->string.length);
+			acpi_ut_print_string (obj_desc->string.pointer, 32);
 			acpi_os_printf ("\n");
 			break;
 
 
 		case ACPI_TYPE_REGION:
 
-			acpi_os_printf (" [%s]", acpi_ut_get_region_name (obj_desc->region.space_id));
+			acpi_os_printf ("[%s]", acpi_ut_get_region_name (obj_desc->region.space_id));
 			if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
 				acpi_os_printf (" Addr %8.8X%8.8X Len %.4X\n",
 						 ACPI_HIDWORD (obj_desc->region.address),
@@ -347,9 +303,9 @@
 			break;
 
 
-		case INTERNAL_TYPE_REFERENCE:
+		case ACPI_TYPE_LOCAL_REFERENCE:
 
-			acpi_os_printf (" [%s]\n",
+			acpi_os_printf ("[%s]\n",
 					acpi_ps_get_opcode_name (obj_desc->reference.opcode));
 			break;
 
@@ -358,43 +314,43 @@
 
 			if (obj_desc->buffer_field.buffer_obj &&
 				obj_desc->buffer_field.buffer_obj->buffer.node) {
-				acpi_os_printf (" Buf [%4.4s]",
+				acpi_os_printf ("Buf [%4.4s]",
 						obj_desc->buffer_field.buffer_obj->buffer.node->name.ascii);
 			}
 			break;
 
 
-		case INTERNAL_TYPE_REGION_FIELD:
+		case ACPI_TYPE_LOCAL_REGION_FIELD:
 
-			acpi_os_printf (" Rgn [%4.4s]",
+			acpi_os_printf ("Rgn [%4.4s]",
 					obj_desc->common_field.region_obj->region.node->name.ascii);
 			break;
 
 
-		case INTERNAL_TYPE_BANK_FIELD:
+		case ACPI_TYPE_LOCAL_BANK_FIELD:
 
-			acpi_os_printf (" Rgn [%4.4s] Bnk [%4.4s]",
+			acpi_os_printf ("Rgn [%4.4s] Bnk [%4.4s]",
 					obj_desc->common_field.region_obj->region.node->name.ascii,
 					obj_desc->bank_field.bank_obj->common_field.node->name.ascii);
 			break;
 
 
-		case INTERNAL_TYPE_INDEX_FIELD:
+		case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
-			acpi_os_printf (" Idx [%4.4s] Dat [%4.4s]",
+			acpi_os_printf ("Idx [%4.4s] Dat [%4.4s]",
 					obj_desc->index_field.index_obj->common_field.node->name.ascii,
 					obj_desc->index_field.data_obj->common_field.node->name.ascii);
 			break;
 
 
-		case INTERNAL_TYPE_ALIAS:
+		case ACPI_TYPE_LOCAL_ALIAS:
 
-			acpi_os_printf (" Target %4.4s (%p)\n", ((acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
+			acpi_os_printf ("Target %4.4s (%p)\n", ((acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
 			break;
 
 		default:
 
-			acpi_os_printf (" Object %p\n", obj_desc);
+			acpi_os_printf ("Object %p\n", obj_desc);
 			break;
 		}
 
@@ -402,9 +358,10 @@
 
 		switch (type) {
 		case ACPI_TYPE_BUFFER_FIELD:
-		case INTERNAL_TYPE_REGION_FIELD:
-		case INTERNAL_TYPE_BANK_FIELD:
-		case INTERNAL_TYPE_INDEX_FIELD:
+		case ACPI_TYPE_LOCAL_REGION_FIELD:
+		case ACPI_TYPE_LOCAL_BANK_FIELD:
+		case ACPI_TYPE_LOCAL_INDEX_FIELD:
+
 			acpi_os_printf (" Off %.2X Len %.2X Acc %.2hd\n",
 					(obj_desc->common_field.base_byte_offset * 8)
 						+ obj_desc->common_field.start_field_bit_offset,
@@ -420,9 +377,7 @@
 
 	case ACPI_DISPLAY_OBJECTS:
 
-		acpi_os_printf ("%p O:%p",
-				this_node, obj_desc);
-
+		acpi_os_printf ("O:%p", obj_desc);
 		if (!obj_desc) {
 			/* No attached object, we are done */
 
@@ -490,7 +445,7 @@
 	/* Dump attached objects */
 
 	while (obj_desc) {
-		obj_type = INTERNAL_TYPE_INVALID;
+		obj_type = ACPI_TYPE_INVALID;
 		acpi_os_printf ("      Attached Object %p: ", obj_desc);
 
 		/* Decode the type of attached object and dump the contents */
@@ -507,7 +462,7 @@
 
 			obj_type = ACPI_GET_OBJECT_TYPE (obj_desc);
 
-			if (obj_type > INTERNAL_TYPE_MAX) {
+			if (obj_type > ACPI_TYPE_LOCAL_MAX) {
 				acpi_os_printf ("(Ptr to ACPI Object type %X [UNKNOWN])\n", obj_type);
 				bytes_to_dump = 32;
 			}
@@ -558,15 +513,15 @@
 			obj_desc = (void *) obj_desc->method.aml_start;
 			break;
 
-		case INTERNAL_TYPE_REGION_FIELD:
+		case ACPI_TYPE_LOCAL_REGION_FIELD:
 			obj_desc = (void *) obj_desc->field.region_obj;
 			break;
 
-		case INTERNAL_TYPE_BANK_FIELD:
+		case ACPI_TYPE_LOCAL_BANK_FIELD:
 			obj_desc = (void *) obj_desc->bank_field.region_obj;
 			break;
 
-		case INTERNAL_TYPE_INDEX_FIELD:
+		case ACPI_TYPE_LOCAL_INDEX_FIELD:
 			obj_desc = (void *) obj_desc->index_field.index_obj;
 			break;
 
@@ -574,7 +529,7 @@
 			goto cleanup;
 		}
 
-		obj_type = INTERNAL_TYPE_INVALID;  /* Terminate loop after next pass */
+		obj_type = ACPI_TYPE_INVALID;  /* Terminate loop after next pass */
 	}
 
 cleanup:
diff -Nru a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c
--- a/drivers/acpi/namespace/nsobject.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/namespace/nsobject.c	Wed Oct 30 16:44:27 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsobject - Utilities for objects attached to namespace
  *                         table entries
- *              $Revision: 83 $
+ *              $Revision: 84 $
  *
  ******************************************************************************/
 
@@ -127,14 +127,9 @@
 	else {
 		obj_desc = (acpi_operand_object *) object;
 
-		/* If a valid type (non-ANY) was given, just use it */
+		/* Use the given type */
 
-		if (ACPI_TYPE_ANY != type) {
-			object_type = type;
-		}
-		else {
-			object_type = INTERNAL_TYPE_DEF_ANY;
-		}
+		object_type = type;
 	}
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Installing %p into Node %p [%4.4s]\n",
@@ -201,7 +196,7 @@
 	obj_desc = node->object;
 
 	if (!obj_desc ||
-		(ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_DATA)) {
+		(ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA)) {
 		return_VOID;
 	}
 
@@ -211,7 +206,7 @@
 	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_OPERAND) {
 		node->object = obj_desc->common.next_object;
 		if (node->object &&
-		   (ACPI_GET_OBJECT_TYPE (node->object) != INTERNAL_TYPE_DATA)) {
+		   (ACPI_GET_OBJECT_TYPE (node->object) != ACPI_TYPE_LOCAL_DATA)) {
 			node->object = node->object->common.next_object;
 		}
 	}
@@ -256,7 +251,7 @@
 	if (!node->object ||
 			((ACPI_GET_DESCRIPTOR_TYPE (node->object) != ACPI_DESC_TYPE_OPERAND) &&
 			 (ACPI_GET_DESCRIPTOR_TYPE (node->object) != ACPI_DESC_TYPE_NAMED))  ||
-		(ACPI_GET_OBJECT_TYPE (node->object) == INTERNAL_TYPE_DATA)) {
+		(ACPI_GET_OBJECT_TYPE (node->object) == ACPI_TYPE_LOCAL_DATA)) {
 		return_PTR (NULL);
 	}
 
@@ -282,10 +277,10 @@
 	ACPI_FUNCTION_TRACE_PTR ("Ns_get_secondary_object", obj_desc);
 
 
-	if ((!obj_desc)                                             ||
-		(ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_DATA) ||
-		(!obj_desc->common.next_object)                         ||
-		(ACPI_GET_OBJECT_TYPE (obj_desc->common.next_object) == INTERNAL_TYPE_DATA)) {
+	if ((!obj_desc)                                               ||
+		(ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA) ||
+		(!obj_desc->common.next_object)                           ||
+		(ACPI_GET_OBJECT_TYPE (obj_desc->common.next_object) == ACPI_TYPE_LOCAL_DATA)) {
 		return_PTR (NULL);
 	}
 
@@ -320,7 +315,7 @@
 	prev_obj_desc = NULL;
 	obj_desc = node->object;
 	while (obj_desc) {
-		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_DATA) &&
+		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA) &&
 			(obj_desc->data.handler == handler)) {
 			return (AE_ALREADY_EXISTS);
 		}
@@ -332,7 +327,7 @@
 
 	/* Create an internal object for the data */
 
-	data_desc = acpi_ut_create_internal_object (INTERNAL_TYPE_DATA);
+	data_desc = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_DATA);
 	if (!data_desc) {
 		return (AE_NO_MEMORY);
 	}
@@ -378,7 +373,7 @@
 	prev_obj_desc = NULL;
 	obj_desc = node->object;
 	while (obj_desc) {
-		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_DATA) &&
+		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA) &&
 			(obj_desc->data.handler == handler)) {
 			if (prev_obj_desc) {
 				prev_obj_desc->common.next_object = obj_desc->common.next_object;
@@ -422,7 +417,7 @@
 
 	obj_desc = node->object;
 	while (obj_desc) {
-		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_DATA) &&
+		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA) &&
 			(obj_desc->data.handler == handler)) {
 			*data = obj_desc->data.pointer;
 			return (AE_OK);
diff -Nru a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c
--- a/drivers/acpi/namespace/nssearch.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/acpi/namespace/nssearch.c	Wed Oct 30 16:44:34 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nssearch - Namespace search
- *              $Revision: 89 $
+ *              $Revision: 92 $
  *
  ******************************************************************************/
 
@@ -37,14 +37,15 @@
  * FUNCTION:    Acpi_ns_search_node
  *
  * PARAMETERS:  *Target_name        - Ascii ACPI name to search for
- *              *Node               - Starting table where search will begin
+ *              *Node               - Starting node where search will begin
  *              Type                - Object type to match
  *              **Return_node       - Where the matched Named obj is returned
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Search a single namespace table.  Performs a simple search,
- *              does not add entries or search parents.
+ * DESCRIPTION: Search a single level of the namespace.  Performs a
+ *              simple search of the specified level, and does not add
+ *              entries or search parents.
  *
  *
  *      Named object lists are built (and subsequently dumped) in the
@@ -77,7 +78,7 @@
 
 		scope_name = acpi_ns_get_external_pathname (node);
 		if (scope_name) {
-			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s [%p] For %4.4s (type %s)\n",
+			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s [%p] For %4.4s (%s)\n",
 				scope_name, node, (char *) &target_name, acpi_ut_get_type_name (type)));
 
 			ACPI_MEM_FREE (scope_name);
@@ -86,8 +87,8 @@
 #endif
 
 	/*
-	 * Search for name in this table, which is to say that we must search
-	 * for the name among the children of this object
+	 * Search for name at this namespace level, which is to say that we
+	 * must search for the name among the children of this object
 	 */
 	next_node = node->child;
 	while (next_node) {
@@ -95,30 +96,8 @@
 
 		if (next_node->name.integer == target_name) {
 			/*
-			 * Found matching entry.  Capture the type if appropriate, before
-			 * returning the entry.
-			 *
-			 * The Def_field_defn and Bank_field_defn cases are actually looking up
-			 * the Region in which the field will be defined
+			 * Found matching entry.
 			 */
-			if ((INTERNAL_TYPE_FIELD_DEFN == type) ||
-				(INTERNAL_TYPE_BANK_FIELD_DEFN == type)) {
-				type = ACPI_TYPE_REGION;
-			}
-
-			/*
-			 * Scope, Def_any, and Index_field_defn are bogus "types" which do not
-			 * actually have anything to do with the type of the name being
-			 * looked up.  For any other value of Type, if the type stored in
-			 * the entry is Any (i.e. unknown), save the actual type.
-			 */
-			if (type != INTERNAL_TYPE_SCOPE &&
-				type != INTERNAL_TYPE_DEF_ANY &&
-				type != INTERNAL_TYPE_INDEX_FIELD_DEFN &&
-				next_node->type == ACPI_TYPE_ANY) {
-				next_node->type = (u8) type;
-			}
-
 			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
 				"Name %4.4s Type [%s] found at %p\n",
 				(char *) &target_name, acpi_ut_get_type_name (next_node->type), next_node));
@@ -142,7 +121,7 @@
 		next_node = next_node->peer;
 	}
 
-	/* Searched entire table, not found */
+	/* Searched entire namespace level, not found */
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Name %4.4s Type [%s] not found at %p\n",
 		(char *) &target_name, acpi_ut_get_type_name (type), next_node));
@@ -156,14 +135,14 @@
  * FUNCTION:    Acpi_ns_search_parent_tree
  *
  * PARAMETERS:  *Target_name        - Ascii ACPI name to search for
- *              *Node               - Starting table where search will begin
+ *              *Node               - Starting node where search will begin
  *              Type                - Object type to match
  *              **Return_node       - Where the matched Named Obj is returned
  *
  * RETURN:      Status
  *
  * DESCRIPTION: Called when a name has not been found in the current namespace
- *              table.  Before adding it or giving up, ACPI scope rules require
+ *              level.  Before adding it or giving up, ACPI scope rules require
  *              searching enclosing scopes in cases identified by Acpi_ns_local().
  *
  *              "A name is located by finding the matching name in the current
@@ -193,22 +172,19 @@
 	parent_node = acpi_ns_get_parent_node (node);
 
 	/*
-	 * If there is no parent (at the root) or type is "local", we won't be
-	 * searching the parent tree.
+	 * If there is no parent (i.e., we are at the root) or
+	 * type is "local", we won't be searching the parent tree.
 	 */
-	if ((acpi_ns_local (type)) ||
-		(!parent_node)) {
-		if (!parent_node) {
-			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] has no parent\n",
-				(char *) &target_name));
-		}
-
-		if (acpi_ns_local (type)) {
-			ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
-				"[%4.4s] type [%s] must be local to this scope (no parent search)\n",
-				(char *) &target_name, acpi_ut_get_type_name (type)));
-		}
+	if (!parent_node) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] has no parent\n",
+			(char *) &target_name));
+		 return_ACPI_STATUS (AE_NOT_FOUND);
+	}
 
+	if (acpi_ns_local (type)) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+			"[%4.4s] type [%s] must be local to this scope (no parent search)\n",
+			(char *) &target_name, acpi_ut_get_type_name (type)));
 		return_ACPI_STATUS (AE_NOT_FOUND);
 	}
 
@@ -251,8 +227,8 @@
  *
  * PARAMETERS:  Target_name         - Ascii ACPI name to search for (4 chars)
  *              Walk_state          - Current state of the walk
- *              *Node               - Starting table where search will begin
- *              Interpreter_mode    - Add names only in MODE_Load_pass_x.
+ *              *Node               - Starting node where search will begin
+ *              Interpreter_mode    - Add names only in ACPI_MODE_LOAD_PASS_x.
  *                                    Otherwise,search only.
  *              Type                - Object type to match
  *              Flags               - Flags describing the search restrictions
@@ -260,12 +236,12 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Search for a name segment in a single name table,
+ * DESCRIPTION: Search for a name segment in a single namespace level,
  *              optionally adding it if it is not found.  If the passed
  *              Type is not Any and the type previously stored in the
  *              entry was Any (i.e. unknown), update the stored type.
  *
- *              In IMODE_EXECUTE, search only.
+ *              In ACPI_IMODE_EXECUTE, search only.
  *              In other modes, search and add if not found.
  *
  ******************************************************************************/
@@ -300,14 +276,12 @@
 	/* Name must consist of printable characters */
 
 	if (!acpi_ut_valid_acpi_name (target_name)) {
-		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "*** Bad character in name: %08x *** \n",
+		ACPI_REPORT_ERROR (("Ns_search_and_enter: Bad character in ACPI Name: %X\n",
 			target_name));
-
-		ACPI_REPORT_ERROR (("Ns_search_and_enter: Bad character in ACPI Name\n"));
 		return_ACPI_STATUS (AE_BAD_CHARACTER);
 	}
 
-	/* Try to find the name in the table specified by the caller */
+	/* Try to find the name in the namespace level specified by the caller */
 
 	*return_node = ACPI_ENTRY_NOT_FOUND;
 	status = acpi_ns_search_node (target_name, node, type, return_node);
@@ -340,7 +314,7 @@
 	if ((interpreter_mode != ACPI_IMODE_LOAD_PASS1) &&
 		(flags & ACPI_NS_SEARCH_PARENT)) {
 		/*
-		 * Not found in table - search parent tree according
+		 * Not found at this level - search parent tree according
 		 * to ACPI specification
 		 */
 		status = acpi_ns_search_parent_tree (target_name, node,
diff -Nru a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c
--- a/drivers/acpi/namespace/nsutils.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/namespace/nsutils.c	Wed Oct 30 16:44:28 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
  *                        parents and siblings and Scope manipulation
- *              $Revision: 113 $
+ *              $Revision: 115 $
  *
  *****************************************************************************/
 
@@ -747,7 +747,7 @@
 acpi_ns_opens_scope (
 	acpi_object_type        type)
 {
-	ACPI_FUNCTION_TRACE_U32 ("Ns_opens_scope", type);
+	ACPI_FUNCTION_TRACE_STR ("Ns_opens_scope", acpi_ut_get_type_name (type));
 
 
 	if (!acpi_ut_valid_object_type (type)) {
@@ -883,43 +883,6 @@
 
 	return_VALUE (ACPI_UNKNOWN_NAME);
 }
-
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
-
-/*******************************************************************************
- *
- * FUNCTION:    Acpi_ns_exist_downstream_sibling
- *
- * PARAMETERS:  *Node          - pointer to first Node to examine
- *
- * RETURN:      TRUE if sibling is found, FALSE otherwise
- *
- * DESCRIPTION: Searches remainder of scope being processed to determine
- *              whether there is a downstream sibling to the current
- *              object.  This function is used to determine what type of
- *              line drawing character to use when displaying namespace
- *              trees.
- *
- ******************************************************************************/
-
-u8
-acpi_ns_exist_downstream_sibling (
-	acpi_namespace_node     *node)
-{
-
-	if (!node) {
-		return (FALSE);
-	}
-
-	if (node->name.integer) {
-		return (TRUE);
-	}
-
-	return (FALSE);
-}
-
-#endif /* ACPI_DEBUG_OUTPUT */
 
 
 /*******************************************************************************
diff -Nru a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
--- a/drivers/acpi/namespace/nsxfeval.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/acpi/namespace/nsxfeval.c	Wed Oct 30 16:44:35 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsxfeval - Public interfaces to the ACPI subsystem
  *                         ACPI Object evaluation interfaces
- *              $Revision: 2 $
+ *              $Revision: 3 $
  *
  ******************************************************************************/
 
@@ -373,8 +373,8 @@
 
 	/* Parameter validation */
 
-	if ((type > ACPI_TYPE_MAX)  ||
-		(!max_depth)            ||
+	if ((type > ACPI_TYPE_EXTERNAL_MAX) ||
+		(!max_depth)                    ||
 		(!user_function)) {
 		return_ACPI_STATUS (AE_BAD_PARAMETER);
 	}
diff -Nru a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c
--- a/drivers/acpi/namespace/nsxfobj.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/acpi/namespace/nsxfobj.c	Wed Oct 30 16:44:17 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsxfobj - Public interfaces to the ACPI subsystem
  *                         ACPI Object oriented interfaces
- *              $Revision: 113 $
+ *              $Revision: 114 $
  *
  ******************************************************************************/
 
@@ -188,7 +188,7 @@
 
 	/* Parameter validation */
 
-	if (type > ACPI_TYPE_MAX) {
+	if (type > ACPI_TYPE_EXTERNAL_MAX) {
 		return (AE_BAD_PARAMETER);
 	}
 
diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
--- a/drivers/acpi/parser/psopcode.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/acpi/parser/psopcode.c	Wed Oct 30 16:44:24 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: psopcode - Parser/Interpreter opcode information table
- *              $Revision: 72 $
+ *              $Revision: 73 $
  *
  *****************************************************************************/
 
@@ -451,144 +451,144 @@
 const acpi_opcode_info    acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
 {
 /*! [Begin] no source code translation */
-/* Index           Name                 Parser Args               Interpreter Args                ObjectType                Class                      Type                  Flags */
+/* Index           Name                 Parser Args               Interpreter Args                ObjectType                    Class                      Type                  Flags */
 
-/* 00 */ ACPI_OP ("Zero",               ARGP_ZERO_OP,              ARGI_ZERO_OP,               ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        AML_CONSTANT),
-/* 01 */ ACPI_OP ("One",                ARGP_ONE_OP,               ARGI_ONE_OP,                ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        AML_CONSTANT),
-/* 02 */ ACPI_OP ("Alias",              ARGP_ALIAS_OP,             ARGI_ALIAS_OP,              INTERNAL_TYPE_ALIAS,     AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 03 */ ACPI_OP ("Name",               ARGP_NAME_OP,              ARGI_NAME_OP,               ACPI_TYPE_ANY,           AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_COMPLEX,   AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 04 */ ACPI_OP ("ByteConst",          ARGP_BYTE_OP,              ARGI_BYTE_OP,               ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
-/* 05 */ ACPI_OP ("WordConst",          ARGP_WORD_OP,              ARGI_WORD_OP,               ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
-/* 06 */ ACPI_OP ("DwordConst",         ARGP_DWORD_OP,             ARGI_DWORD_OP,              ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
-/* 07 */ ACPI_OP ("String",             ARGP_STRING_OP,            ARGI_STRING_OP,             ACPI_TYPE_STRING,        AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
-/* 08 */ ACPI_OP ("Scope",              ARGP_SCOPE_OP,             ARGI_SCOPE_OP,              INTERNAL_TYPE_SCOPE,     AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 09 */ ACPI_OP ("Buffer",             ARGP_BUFFER_OP,            ARGI_BUFFER_OP,             ACPI_TYPE_BUFFER,        AML_CLASS_CREATE,          AML_TYPE_CREATE_OBJECT,   AML_HAS_ARGS | AML_DEFER | AML_CONSTANT),
-/* 0A */ ACPI_OP ("Package",            ARGP_PACKAGE_OP,           ARGI_PACKAGE_OP,            ACPI_TYPE_PACKAGE,       AML_CLASS_CREATE,          AML_TYPE_CREATE_OBJECT,   AML_HAS_ARGS | AML_DEFER | AML_CONSTANT),
-/* 0B */ ACPI_OP ("Method",             ARGP_METHOD_OP,            ARGI_METHOD_OP,             ACPI_TYPE_METHOD,        AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_COMPLEX,   AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
-/* 0C */ ACPI_OP ("Local0",             ARGP_LOCAL0,               ARGI_LOCAL0,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 0D */ ACPI_OP ("Local1",             ARGP_LOCAL1,               ARGI_LOCAL1,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 0E */ ACPI_OP ("Local2",             ARGP_LOCAL2,               ARGI_LOCAL2,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 0F */ ACPI_OP ("Local3",             ARGP_LOCAL3,               ARGI_LOCAL3,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 10 */ ACPI_OP ("Local4",             ARGP_LOCAL4,               ARGI_LOCAL4,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 11 */ ACPI_OP ("Local5",             ARGP_LOCAL5,               ARGI_LOCAL5,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 12 */ ACPI_OP ("Local6",             ARGP_LOCAL6,               ARGI_LOCAL6,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 13 */ ACPI_OP ("Local7",             ARGP_LOCAL7,               ARGI_LOCAL7,                INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
-/* 14 */ ACPI_OP ("Arg0",               ARGP_ARG0,                 ARGI_ARG0,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 15 */ ACPI_OP ("Arg1",               ARGP_ARG1,                 ARGI_ARG1,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 16 */ ACPI_OP ("Arg2",               ARGP_ARG2,                 ARGI_ARG2,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 17 */ ACPI_OP ("Arg3",               ARGP_ARG3,                 ARGI_ARG3,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 18 */ ACPI_OP ("Arg4",               ARGP_ARG4,                 ARGI_ARG4,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 19 */ ACPI_OP ("Arg5",               ARGP_ARG5,                 ARGI_ARG5,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 1A */ ACPI_OP ("Arg6",               ARGP_ARG6,                 ARGI_ARG6,                  INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
-/* 1B */ ACPI_OP ("Store",              ARGP_STORE_OP,             ARGI_STORE_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R),
-/* 1C */ ACPI_OP ("RefOf",              ARGP_REF_OF_OP,            ARGI_REF_OF_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
-/* 1D */ ACPI_OP ("Add",                ARGP_ADD_OP,               ARGI_ADD_OP,                ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 1E */ ACPI_OP ("Concatenate",        ARGP_CONCAT_OP,            ARGI_CONCAT_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
-/* 1F */ ACPI_OP ("Subtract",           ARGP_SUBTRACT_OP,          ARGI_SUBTRACT_OP,           ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 20 */ ACPI_OP ("Increment",          ARGP_INCREMENT_OP,         ARGI_INCREMENT_OP,          ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
-/* 21 */ ACPI_OP ("Decrement",          ARGP_DECREMENT_OP,         ARGI_DECREMENT_OP,          ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
-/* 22 */ ACPI_OP ("Multiply",           ARGP_MULTIPLY_OP,          ARGI_MULTIPLY_OP,           ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 23 */ ACPI_OP ("Divide",             ARGP_DIVIDE_OP,            ARGI_DIVIDE_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_2T_1R,   AML_FLAGS_EXEC_2A_2T_1R | AML_CONSTANT),
-/* 24 */ ACPI_OP ("ShiftLeft",          ARGP_SHIFT_LEFT_OP,        ARGI_SHIFT_LEFT_OP,         ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 25 */ ACPI_OP ("ShiftRight",         ARGP_SHIFT_RIGHT_OP,       ARGI_SHIFT_RIGHT_OP,        ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 26 */ ACPI_OP ("And",                ARGP_BIT_AND_OP,           ARGI_BIT_AND_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 27 */ ACPI_OP ("NAnd",               ARGP_BIT_NAND_OP,          ARGI_BIT_NAND_OP,           ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 28 */ ACPI_OP ("Or",                 ARGP_BIT_OR_OP,            ARGI_BIT_OR_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 29 */ ACPI_OP ("NOr",                ARGP_BIT_NOR_OP,           ARGI_BIT_NOR_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 2A */ ACPI_OP ("XOr",                ARGP_BIT_XOR_OP,           ARGI_BIT_XOR_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
-/* 2B */ ACPI_OP ("Not",                ARGP_BIT_NOT_OP,           ARGI_BIT_NOT_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 2C */ ACPI_OP ("FindSetLeftBit",     ARGP_FIND_SET_LEFT_BIT_OP, ARGI_FIND_SET_LEFT_BIT_OP,  ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 2D */ ACPI_OP ("FindSetRightBit",    ARGP_FIND_SET_RIGHT_BIT_OP,ARGI_FIND_SET_RIGHT_BIT_OP, ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 2E */ ACPI_OP ("DerefOf",            ARGP_DEREF_OF_OP,          ARGI_DEREF_OF_OP,           ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
-/* 2F */ ACPI_OP ("Notify",             ARGP_NOTIFY_OP,            ARGI_NOTIFY_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_0R,   AML_FLAGS_EXEC_2A_0T_0R),
-/* 30 */ ACPI_OP ("SizeOf",             ARGP_SIZE_OF_OP,           ARGI_SIZE_OF_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
-/* 31 */ ACPI_OP ("Index",              ARGP_INDEX_OP,             ARGI_INDEX_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
-/* 32 */ ACPI_OP ("Match",              ARGP_MATCH_OP,             ARGI_MATCH_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_6A_0T_1R,   AML_FLAGS_EXEC_6A_0T_1R | AML_CONSTANT),
-/* 33 */ ACPI_OP ("CreateDWordField",   ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD,  AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
-/* 34 */ ACPI_OP ("CreateWordField",    ARGP_CREATE_WORD_FIELD_OP, ARGI_CREATE_WORD_FIELD_OP,  ACPI_TYPE_BUFFER_FIELD,  AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
-/* 35 */ ACPI_OP ("CreateByteField",    ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP,  ACPI_TYPE_BUFFER_FIELD,  AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
-/* 36 */ ACPI_OP ("CreateBitField",     ARGP_CREATE_BIT_FIELD_OP,  ARGI_CREATE_BIT_FIELD_OP,   ACPI_TYPE_BUFFER_FIELD,  AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
-/* 37 */ ACPI_OP ("ObjectType",         ARGP_TYPE_OP,              ARGI_TYPE_OP,               ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
-/* 38 */ ACPI_OP ("LAnd",               ARGP_LAND_OP,              ARGI_LAND_OP,               ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
-/* 39 */ ACPI_OP ("LOr",                ARGP_LOR_OP,               ARGI_LOR_OP,                ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
-/* 3A */ ACPI_OP ("LNot",               ARGP_LNOT_OP,              ARGI_LNOT_OP,               ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
-/* 3B */ ACPI_OP ("LEqual",             ARGP_LEQUAL_OP,            ARGI_LEQUAL_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
-/* 3C */ ACPI_OP ("LGreater",           ARGP_LGREATER_OP,          ARGI_LGREATER_OP,           ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
-/* 3D */ ACPI_OP ("LLess",              ARGP_LLESS_OP,             ARGI_LLESS_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
-/* 3E */ ACPI_OP ("If",                 ARGP_IF_OP,                ARGI_IF_OP,                 ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
-/* 3F */ ACPI_OP ("Else",               ARGP_ELSE_OP,              ARGI_ELSE_OP,               ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
-/* 40 */ ACPI_OP ("While",              ARGP_WHILE_OP,             ARGI_WHILE_OP,              ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
-/* 41 */ ACPI_OP ("Noop",               ARGP_NOOP_OP,              ARGI_NOOP_OP,               ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
-/* 42 */ ACPI_OP ("Return",             ARGP_RETURN_OP,            ARGI_RETURN_OP,             ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
-/* 43 */ ACPI_OP ("Break",              ARGP_BREAK_OP,             ARGI_BREAK_OP,              ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
-/* 44 */ ACPI_OP ("BreakPoint",         ARGP_BREAK_POINT_OP,       ARGI_BREAK_POINT_OP,        ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
-/* 45 */ ACPI_OP ("Ones",               ARGP_ONES_OP,              ARGI_ONES_OP,               ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        AML_CONSTANT),
+/* 00 */ ACPI_OP ("Zero",               ARGP_ZERO_OP,              ARGI_ZERO_OP,               ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        AML_CONSTANT),
+/* 01 */ ACPI_OP ("One",                ARGP_ONE_OP,               ARGI_ONE_OP,                ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        AML_CONSTANT),
+/* 02 */ ACPI_OP ("Alias",              ARGP_ALIAS_OP,             ARGI_ALIAS_OP,              ACPI_TYPE_LOCAL_ALIAS,       AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 03 */ ACPI_OP ("Name",               ARGP_NAME_OP,              ARGI_NAME_OP,               ACPI_TYPE_ANY,               AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_COMPLEX,   AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 04 */ ACPI_OP ("ByteConst",          ARGP_BYTE_OP,              ARGI_BYTE_OP,               ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
+/* 05 */ ACPI_OP ("WordConst",          ARGP_WORD_OP,              ARGI_WORD_OP,               ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
+/* 06 */ ACPI_OP ("DwordConst",         ARGP_DWORD_OP,             ARGI_DWORD_OP,              ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
+/* 07 */ ACPI_OP ("String",             ARGP_STRING_OP,            ARGI_STRING_OP,             ACPI_TYPE_STRING,            AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
+/* 08 */ ACPI_OP ("Scope",              ARGP_SCOPE_OP,             ARGI_SCOPE_OP,              ACPI_TYPE_LOCAL_SCOPE,       AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 09 */ ACPI_OP ("Buffer",             ARGP_BUFFER_OP,            ARGI_BUFFER_OP,             ACPI_TYPE_BUFFER,            AML_CLASS_CREATE,          AML_TYPE_CREATE_OBJECT,   AML_HAS_ARGS | AML_DEFER | AML_CONSTANT),
+/* 0A */ ACPI_OP ("Package",            ARGP_PACKAGE_OP,           ARGI_PACKAGE_OP,            ACPI_TYPE_PACKAGE,           AML_CLASS_CREATE,          AML_TYPE_CREATE_OBJECT,   AML_HAS_ARGS | AML_DEFER | AML_CONSTANT),
+/* 0B */ ACPI_OP ("Method",             ARGP_METHOD_OP,            ARGI_METHOD_OP,             ACPI_TYPE_METHOD,            AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_COMPLEX,   AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
+/* 0C */ ACPI_OP ("Local0",             ARGP_LOCAL0,               ARGI_LOCAL0,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 0D */ ACPI_OP ("Local1",             ARGP_LOCAL1,               ARGI_LOCAL1,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 0E */ ACPI_OP ("Local2",             ARGP_LOCAL2,               ARGI_LOCAL2,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 0F */ ACPI_OP ("Local3",             ARGP_LOCAL3,               ARGI_LOCAL3,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 10 */ ACPI_OP ("Local4",             ARGP_LOCAL4,               ARGI_LOCAL4,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 11 */ ACPI_OP ("Local5",             ARGP_LOCAL5,               ARGI_LOCAL5,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 12 */ ACPI_OP ("Local6",             ARGP_LOCAL6,               ARGI_LOCAL6,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 13 */ ACPI_OP ("Local7",             ARGP_LOCAL7,               ARGI_LOCAL7,                ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LOCAL_VARIABLE,  0),
+/* 14 */ ACPI_OP ("Arg0",               ARGP_ARG0,                 ARGI_ARG0,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 15 */ ACPI_OP ("Arg1",               ARGP_ARG1,                 ARGI_ARG1,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 16 */ ACPI_OP ("Arg2",               ARGP_ARG2,                 ARGI_ARG2,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 17 */ ACPI_OP ("Arg3",               ARGP_ARG3,                 ARGI_ARG3,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 18 */ ACPI_OP ("Arg4",               ARGP_ARG4,                 ARGI_ARG4,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 19 */ ACPI_OP ("Arg5",               ARGP_ARG5,                 ARGI_ARG5,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 1A */ ACPI_OP ("Arg6",               ARGP_ARG6,                 ARGI_ARG6,                  ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_METHOD_ARGUMENT, 0),
+/* 1B */ ACPI_OP ("Store",              ARGP_STORE_OP,             ARGI_STORE_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R),
+/* 1C */ ACPI_OP ("RefOf",              ARGP_REF_OF_OP,            ARGI_REF_OF_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
+/* 1D */ ACPI_OP ("Add",                ARGP_ADD_OP,               ARGI_ADD_OP,                ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 1E */ ACPI_OP ("Concatenate",        ARGP_CONCAT_OP,            ARGI_CONCAT_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
+/* 1F */ ACPI_OP ("Subtract",           ARGP_SUBTRACT_OP,          ARGI_SUBTRACT_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 20 */ ACPI_OP ("Increment",          ARGP_INCREMENT_OP,         ARGI_INCREMENT_OP,          ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
+/* 21 */ ACPI_OP ("Decrement",          ARGP_DECREMENT_OP,         ARGI_DECREMENT_OP,          ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
+/* 22 */ ACPI_OP ("Multiply",           ARGP_MULTIPLY_OP,          ARGI_MULTIPLY_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 23 */ ACPI_OP ("Divide",             ARGP_DIVIDE_OP,            ARGI_DIVIDE_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_2T_1R,   AML_FLAGS_EXEC_2A_2T_1R | AML_CONSTANT),
+/* 24 */ ACPI_OP ("ShiftLeft",          ARGP_SHIFT_LEFT_OP,        ARGI_SHIFT_LEFT_OP,         ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 25 */ ACPI_OP ("ShiftRight",         ARGP_SHIFT_RIGHT_OP,       ARGI_SHIFT_RIGHT_OP,        ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 26 */ ACPI_OP ("And",                ARGP_BIT_AND_OP,           ARGI_BIT_AND_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 27 */ ACPI_OP ("NAnd",               ARGP_BIT_NAND_OP,          ARGI_BIT_NAND_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 28 */ ACPI_OP ("Or",                 ARGP_BIT_OR_OP,            ARGI_BIT_OR_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 29 */ ACPI_OP ("NOr",                ARGP_BIT_NOR_OP,           ARGI_BIT_NOR_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 2A */ ACPI_OP ("XOr",                ARGP_BIT_XOR_OP,           ARGI_BIT_XOR_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT),
+/* 2B */ ACPI_OP ("Not",                ARGP_BIT_NOT_OP,           ARGI_BIT_NOT_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 2C */ ACPI_OP ("FindSetLeftBit",     ARGP_FIND_SET_LEFT_BIT_OP, ARGI_FIND_SET_LEFT_BIT_OP,  ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 2D */ ACPI_OP ("FindSetRightBit",    ARGP_FIND_SET_RIGHT_BIT_OP,ARGI_FIND_SET_RIGHT_BIT_OP, ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 2E */ ACPI_OP ("DerefOf",            ARGP_DEREF_OF_OP,          ARGI_DEREF_OF_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
+/* 2F */ ACPI_OP ("Notify",             ARGP_NOTIFY_OP,            ARGI_NOTIFY_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_0R,   AML_FLAGS_EXEC_2A_0T_0R),
+/* 30 */ ACPI_OP ("SizeOf",             ARGP_SIZE_OF_OP,           ARGI_SIZE_OF_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
+/* 31 */ ACPI_OP ("Index",              ARGP_INDEX_OP,             ARGI_INDEX_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
+/* 32 */ ACPI_OP ("Match",              ARGP_MATCH_OP,             ARGI_MATCH_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_6A_0T_1R,   AML_FLAGS_EXEC_6A_0T_1R | AML_CONSTANT),
+/* 33 */ ACPI_OP ("CreateDWordField",   ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
+/* 34 */ ACPI_OP ("CreateWordField",    ARGP_CREATE_WORD_FIELD_OP, ARGI_CREATE_WORD_FIELD_OP,  ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
+/* 35 */ ACPI_OP ("CreateByteField",    ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP,  ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
+/* 36 */ ACPI_OP ("CreateBitField",     ARGP_CREATE_BIT_FIELD_OP,  ARGI_CREATE_BIT_FIELD_OP,   ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
+/* 37 */ ACPI_OP ("ObjectType",         ARGP_TYPE_OP,              ARGI_TYPE_OP,               ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R),
+/* 38 */ ACPI_OP ("LAnd",               ARGP_LAND_OP,              ARGI_LAND_OP,               ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
+/* 39 */ ACPI_OP ("LOr",                ARGP_LOR_OP,               ARGI_LOR_OP,                ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
+/* 3A */ ACPI_OP ("LNot",               ARGP_LNOT_OP,              ARGI_LNOT_OP,               ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_1R,   AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT),
+/* 3B */ ACPI_OP ("LEqual",             ARGP_LEQUAL_OP,            ARGI_LEQUAL_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
+/* 3C */ ACPI_OP ("LGreater",           ARGP_LGREATER_OP,          ARGI_LGREATER_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
+/* 3D */ ACPI_OP ("LLess",              ARGP_LLESS_OP,             ARGI_LLESS_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT),
+/* 3E */ ACPI_OP ("If",                 ARGP_IF_OP,                ARGI_IF_OP,                 ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
+/* 3F */ ACPI_OP ("Else",               ARGP_ELSE_OP,              ARGI_ELSE_OP,               ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
+/* 40 */ ACPI_OP ("While",              ARGP_WHILE_OP,             ARGI_WHILE_OP,              ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
+/* 41 */ ACPI_OP ("Noop",               ARGP_NOOP_OP,              ARGI_NOOP_OP,               ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
+/* 42 */ ACPI_OP ("Return",             ARGP_RETURN_OP,            ARGI_RETURN_OP,             ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         AML_HAS_ARGS),
+/* 43 */ ACPI_OP ("Break",              ARGP_BREAK_OP,             ARGI_BREAK_OP,              ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
+/* 44 */ ACPI_OP ("BreakPoint",         ARGP_BREAK_POINT_OP,       ARGI_BREAK_POINT_OP,        ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
+/* 45 */ ACPI_OP ("Ones",               ARGP_ONES_OP,              ARGI_ONES_OP,               ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        AML_CONSTANT),
 
 /* Prefixed opcodes (Two-byte opcodes with a prefix op) */
 
-/* 46 */ ACPI_OP ("Mutex",              ARGP_MUTEX_OP,             ARGI_MUTEX_OP,              ACPI_TYPE_MUTEX,         AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 47 */ ACPI_OP ("Event",              ARGP_EVENT_OP,             ARGI_EVENT_OP,              ACPI_TYPE_EVENT,         AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
-/* 48 */ ACPI_OP ("CondRefOf",          ARGP_COND_REF_OF_OP,       ARGI_COND_REF_OF_OP,        ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R),
-/* 49 */ ACPI_OP ("CreateField",        ARGP_CREATE_FIELD_OP,      ARGI_CREATE_FIELD_OP,       ACPI_TYPE_BUFFER_FIELD,  AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_FIELD | AML_CREATE),
-/* 4A */ ACPI_OP ("Load",               ARGP_LOAD_OP,              ARGI_LOAD_OP,               ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_0R,   AML_FLAGS_EXEC_1A_1T_0R),
-/* 4B */ ACPI_OP ("Stall",              ARGP_STALL_OP,             ARGI_STALL_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
-/* 4C */ ACPI_OP ("Sleep",              ARGP_SLEEP_OP,             ARGI_SLEEP_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
-/* 4D */ ACPI_OP ("Acquire",            ARGP_ACQUIRE_OP,           ARGI_ACQUIRE_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R),
-/* 4E */ ACPI_OP ("Signal",             ARGP_SIGNAL_OP,            ARGI_SIGNAL_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
-/* 4F */ ACPI_OP ("Wait",               ARGP_WAIT_OP,              ARGI_WAIT_OP,               ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R),
-/* 50 */ ACPI_OP ("Reset",              ARGP_RESET_OP,             ARGI_RESET_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
-/* 51 */ ACPI_OP ("Release",            ARGP_RELEASE_OP,           ARGI_RELEASE_OP,            ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
-/* 52 */ ACPI_OP ("FromBCD",            ARGP_FROM_BCD_OP,          ARGI_FROM_BCD_OP,           ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 53 */ ACPI_OP ("ToBCD",              ARGP_TO_BCD_OP,            ARGI_TO_BCD_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 54 */ ACPI_OP ("Unload",             ARGP_UNLOAD_OP,            ARGI_UNLOAD_OP,             ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
-/* 55 */ ACPI_OP ("Revision",           ARGP_REVISION_OP,          ARGI_REVISION_OP,           ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        0),
-/* 56 */ ACPI_OP ("Debug",              ARGP_DEBUG_OP,             ARGI_DEBUG_OP,              INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        0),
-/* 57 */ ACPI_OP ("Fatal",              ARGP_FATAL_OP,             ARGI_FATAL_OP,              ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_3A_0T_0R,   AML_FLAGS_EXEC_3A_0T_0R),
-/* 58 */ ACPI_OP ("OperationRegion",    ARGP_REGION_OP,            ARGI_REGION_OP,             ACPI_TYPE_REGION,        AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_COMPLEX,   AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
-/* 59 */ ACPI_OP ("Field",              ARGP_FIELD_OP,             ARGI_FIELD_OP,              INTERNAL_TYPE_FIELD_DEFN,AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_FIELD,     AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
-/* 5A */ ACPI_OP ("Device",             ARGP_DEVICE_OP,            ARGI_DEVICE_OP,             ACPI_TYPE_DEVICE,        AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 5B */ ACPI_OP ("Processor",          ARGP_PROCESSOR_OP,         ARGI_PROCESSOR_OP,          ACPI_TYPE_PROCESSOR,     AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 5C */ ACPI_OP ("PowerResource",      ARGP_POWER_RES_OP,         ARGI_POWER_RES_OP,          ACPI_TYPE_POWER,         AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 5D */ ACPI_OP ("ThermalZone",        ARGP_THERMAL_ZONE_OP,      ARGI_THERMAL_ZONE_OP,       ACPI_TYPE_THERMAL,       AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 5E */ ACPI_OP ("IndexField",         ARGP_INDEX_FIELD_OP,       ARGI_INDEX_FIELD_OP,        INTERNAL_TYPE_INDEX_FIELD_DEFN,AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD,  AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
-/* 5F */ ACPI_OP ("BankField",          ARGP_BANK_FIELD_OP,        ARGI_BANK_FIELD_OP,         INTERNAL_TYPE_BANK_FIELD_DEFN,AML_CLASS_NAMED_OBJECT,  AML_TYPE_NAMED_FIELD,  AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
+/* 46 */ ACPI_OP ("Mutex",              ARGP_MUTEX_OP,             ARGI_MUTEX_OP,              ACPI_TYPE_MUTEX,             AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 47 */ ACPI_OP ("Event",              ARGP_EVENT_OP,             ARGI_EVENT_OP,              ACPI_TYPE_EVENT,             AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
+/* 48 */ ACPI_OP ("CondRefOf",          ARGP_COND_REF_OF_OP,       ARGI_COND_REF_OF_OP,        ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R),
+/* 49 */ ACPI_OP ("CreateField",        ARGP_CREATE_FIELD_OP,      ARGI_CREATE_FIELD_OP,       ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_FIELD | AML_CREATE),
+/* 4A */ ACPI_OP ("Load",               ARGP_LOAD_OP,              ARGI_LOAD_OP,               ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_0R,   AML_FLAGS_EXEC_1A_1T_0R),
+/* 4B */ ACPI_OP ("Stall",              ARGP_STALL_OP,             ARGI_STALL_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
+/* 4C */ ACPI_OP ("Sleep",              ARGP_SLEEP_OP,             ARGI_SLEEP_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
+/* 4D */ ACPI_OP ("Acquire",            ARGP_ACQUIRE_OP,           ARGI_ACQUIRE_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R),
+/* 4E */ ACPI_OP ("Signal",             ARGP_SIGNAL_OP,            ARGI_SIGNAL_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
+/* 4F */ ACPI_OP ("Wait",               ARGP_WAIT_OP,              ARGI_WAIT_OP,               ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_0T_1R,   AML_FLAGS_EXEC_2A_0T_1R),
+/* 50 */ ACPI_OP ("Reset",              ARGP_RESET_OP,             ARGI_RESET_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
+/* 51 */ ACPI_OP ("Release",            ARGP_RELEASE_OP,           ARGI_RELEASE_OP,            ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
+/* 52 */ ACPI_OP ("FromBCD",            ARGP_FROM_BCD_OP,          ARGI_FROM_BCD_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 53 */ ACPI_OP ("ToBCD",              ARGP_TO_BCD_OP,            ARGI_TO_BCD_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 54 */ ACPI_OP ("Unload",             ARGP_UNLOAD_OP,            ARGI_UNLOAD_OP,             ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_0T_0R,   AML_FLAGS_EXEC_1A_0T_0R),
+/* 55 */ ACPI_OP ("Revision",           ARGP_REVISION_OP,          ARGI_REVISION_OP,           ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        0),
+/* 56 */ ACPI_OP ("Debug",              ARGP_DEBUG_OP,             ARGI_DEBUG_OP,              ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_CONSTANT,        0),
+/* 57 */ ACPI_OP ("Fatal",              ARGP_FATAL_OP,             ARGI_FATAL_OP,              ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_3A_0T_0R,   AML_FLAGS_EXEC_3A_0T_0R),
+/* 58 */ ACPI_OP ("OperationRegion",    ARGP_REGION_OP,            ARGI_REGION_OP,             ACPI_TYPE_REGION,            AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_COMPLEX,   AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
+/* 59 */ ACPI_OP ("Field",              ARGP_FIELD_OP,             ARGI_FIELD_OP,              ACPI_TYPE_ANY,               AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_FIELD,     AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
+/* 5A */ ACPI_OP ("Device",             ARGP_DEVICE_OP,            ARGI_DEVICE_OP,             ACPI_TYPE_DEVICE,            AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 5B */ ACPI_OP ("Processor",          ARGP_PROCESSOR_OP,         ARGI_PROCESSOR_OP,          ACPI_TYPE_PROCESSOR,         AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 5C */ ACPI_OP ("PowerResource",      ARGP_POWER_RES_OP,         ARGI_POWER_RES_OP,          ACPI_TYPE_POWER,             AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 5D */ ACPI_OP ("ThermalZone",        ARGP_THERMAL_ZONE_OP,      ARGI_THERMAL_ZONE_OP,       ACPI_TYPE_THERMAL,           AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 5E */ ACPI_OP ("IndexField",         ARGP_INDEX_FIELD_OP,       ARGI_INDEX_FIELD_OP,        ACPI_TYPE_ANY,               AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_FIELD,     AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
+/* 5F */ ACPI_OP ("BankField",          ARGP_BANK_FIELD_OP,        ARGI_BANK_FIELD_OP,         ACPI_TYPE_ANY,               AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_FIELD,     AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
 
 /* Internal opcodes that map to invalid AML opcodes */
 
-/* 60 */ ACPI_OP ("LNotEqual",          ARGP_LNOTEQUAL_OP,         ARGI_LNOTEQUAL_OP,          ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS | AML_CONSTANT),
-/* 61 */ ACPI_OP ("LLessEqual",         ARGP_LLESSEQUAL_OP,        ARGI_LLESSEQUAL_OP,         ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS | AML_CONSTANT),
-/* 62 */ ACPI_OP ("LGreaterEqual",      ARGP_LGREATEREQUAL_OP,     ARGI_LGREATEREQUAL_OP,      ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS | AML_CONSTANT),
-/* 63 */ ACPI_OP ("-NamePath-",         ARGP_NAMEPATH_OP,          ARGI_NAMEPATH_OP,           INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_NSOBJECT | AML_NSNODE ),
-/* 64 */ ACPI_OP ("-MethodCall-",       ARGP_METHODCALL_OP,        ARGI_METHODCALL_OP,         ACPI_TYPE_METHOD,        AML_CLASS_METHOD_CALL,     AML_TYPE_METHOD_CALL,     AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE),
-/* 65 */ ACPI_OP ("-ByteList-",         ARGP_BYTELIST_OP,          ARGI_BYTELIST_OP,           ACPI_TYPE_ANY,           AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         0),
-/* 66 */ ACPI_OP ("-ReservedField-",    ARGP_RESERVEDFIELD_OP,     ARGI_RESERVEDFIELD_OP,      ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
-/* 67 */ ACPI_OP ("-NamedField-",       ARGP_NAMEDFIELD_OP,        ARGI_NAMEDFIELD_OP,         ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
-/* 68 */ ACPI_OP ("-AccessField-",      ARGP_ACCESSFIELD_OP,       ARGI_ACCESSFIELD_OP,        ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
-/* 69 */ ACPI_OP ("-StaticString",      ARGP_STATICSTRING_OP,      ARGI_STATICSTRING_OP,       ACPI_TYPE_ANY,           AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
-/* 6A */ ACPI_OP ("-Return Value-",     ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_ANY,           AML_CLASS_RETURN_VALUE,    AML_TYPE_RETURN,          AML_HAS_ARGS | AML_HAS_RETVAL),
-/* 6B */ ACPI_OP ("-UNKNOWN_OP-",       ARG_NONE,                  ARG_NONE,                   INTERNAL_TYPE_INVALID,   AML_CLASS_UNKNOWN,         AML_TYPE_BOGUS,           AML_HAS_ARGS),
-/* 6C */ ACPI_OP ("-ASCII_ONLY-",       ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_ANY,           AML_CLASS_ASCII,           AML_TYPE_BOGUS,           AML_HAS_ARGS),
-/* 6D */ ACPI_OP ("-PREFIX_ONLY-",      ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_ANY,           AML_CLASS_PREFIX,          AML_TYPE_BOGUS,           AML_HAS_ARGS),
+/* 60 */ ACPI_OP ("LNotEqual",          ARGP_LNOTEQUAL_OP,         ARGI_LNOTEQUAL_OP,          ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS | AML_CONSTANT),
+/* 61 */ ACPI_OP ("LLessEqual",         ARGP_LLESSEQUAL_OP,        ARGI_LLESSEQUAL_OP,         ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS | AML_CONSTANT),
+/* 62 */ ACPI_OP ("LGreaterEqual",      ARGP_LGREATEREQUAL_OP,     ARGI_LGREATEREQUAL_OP,      ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS | AML_CONSTANT),
+/* 63 */ ACPI_OP ("-NamePath-",         ARGP_NAMEPATH_OP,          ARGI_NAMEPATH_OP,           ACPI_TYPE_LOCAL_REFERENCE,   AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_NSOBJECT | AML_NSNODE ),
+/* 64 */ ACPI_OP ("-MethodCall-",       ARGP_METHODCALL_OP,        ARGI_METHODCALL_OP,         ACPI_TYPE_METHOD,            AML_CLASS_METHOD_CALL,     AML_TYPE_METHOD_CALL,     AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE),
+/* 65 */ ACPI_OP ("-ByteList-",         ARGP_BYTELIST_OP,          ARGI_BYTELIST_OP,           ACPI_TYPE_ANY,               AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         0),
+/* 66 */ ACPI_OP ("-ReservedField-",    ARGP_RESERVEDFIELD_OP,     ARGI_RESERVEDFIELD_OP,      ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
+/* 67 */ ACPI_OP ("-NamedField-",       ARGP_NAMEDFIELD_OP,        ARGI_NAMEDFIELD_OP,         ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
+/* 68 */ ACPI_OP ("-AccessField-",      ARGP_ACCESSFIELD_OP,       ARGI_ACCESSFIELD_OP,        ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
+/* 69 */ ACPI_OP ("-StaticString",      ARGP_STATICSTRING_OP,      ARGI_STATICSTRING_OP,       ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
+/* 6A */ ACPI_OP ("-Return Value-",     ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_ANY,               AML_CLASS_RETURN_VALUE,    AML_TYPE_RETURN,          AML_HAS_ARGS | AML_HAS_RETVAL),
+/* 6B */ ACPI_OP ("-UNKNOWN_OP-",       ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_INVALID,           AML_CLASS_UNKNOWN,         AML_TYPE_BOGUS,           AML_HAS_ARGS),
+/* 6C */ ACPI_OP ("-ASCII_ONLY-",       ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_ANY,               AML_CLASS_ASCII,           AML_TYPE_BOGUS,           AML_HAS_ARGS),
+/* 6D */ ACPI_OP ("-PREFIX_ONLY-",      ARG_NONE,                  ARG_NONE,                   ACPI_TYPE_ANY,               AML_CLASS_PREFIX,          AML_TYPE_BOGUS,           AML_HAS_ARGS),
 
 
 /* ACPI 2.0 opcodes */
 
-/* 6E */ ACPI_OP ("QwordConst",         ARGP_QWORD_OP,             ARGI_QWORD_OP,              ACPI_TYPE_INTEGER,       AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
-/* 6F */ ACPI_OP ("Package /*Var*/",    ARGP_VAR_PACKAGE_OP,       ARGI_VAR_PACKAGE_OP,        ACPI_TYPE_PACKAGE,       AML_CLASS_CREATE,          AML_TYPE_CREATE_OBJECT,   AML_HAS_ARGS | AML_DEFER),
-/* 70 */ ACPI_OP ("ConcatenateResTemplate", ARGP_CONCAT_RES_OP,    ARGI_CONCAT_RES_OP,         ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
-/* 71 */ ACPI_OP ("Mod",                ARGP_MOD_OP,               ARGI_MOD_OP,                ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
-/* 72 */ ACPI_OP ("CreateQWordField",   ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD,  AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
-/* 73 */ ACPI_OP ("ToBuffer",           ARGP_TO_BUFFER_OP,         ARGI_TO_BUFFER_OP,          ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 74 */ ACPI_OP ("ToDecimalString",    ARGP_TO_DEC_STR_OP,        ARGI_TO_DEC_STR_OP,         ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 75 */ ACPI_OP ("ToHexString",        ARGP_TO_HEX_STR_OP,        ARGI_TO_HEX_STR_OP,         ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 76 */ ACPI_OP ("ToInteger",          ARGP_TO_INTEGER_OP,        ARGI_TO_INTEGER_OP,         ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
-/* 77 */ ACPI_OP ("ToString",           ARGP_TO_STRING_OP,         ARGI_TO_STRING_OP,          ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
-/* 78 */ ACPI_OP ("CopyObject",         ARGP_COPY_OP,              ARGI_COPY_OP,               ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R),
-/* 79 */ ACPI_OP ("Mid",                ARGP_MID_OP,               ARGI_MID_OP,                ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_3A_1T_1R,   AML_FLAGS_EXEC_3A_1T_1R | AML_CONSTANT),
-/* 7A */ ACPI_OP ("Continue",           ARGP_CONTINUE_OP,          ARGI_CONTINUE_OP,           ACPI_TYPE_ANY,           AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
-/* 7B */ ACPI_OP ("LoadTable",          ARGP_LOAD_TABLE_OP,        ARGI_LOAD_TABLE_OP,         ACPI_TYPE_ANY,           AML_CLASS_EXECUTE,         AML_TYPE_EXEC_6A_0T_1R,   AML_FLAGS_EXEC_6A_0T_1R),
-/* 7C */ ACPI_OP ("DataTableRegion",    ARGP_DATA_REGION_OP,       ARGI_DATA_REGION_OP,        ACPI_TYPE_REGION,        AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
-/* 7D */ ACPI_OP ("[EvalSubTree]",      ARGP_SCOPE_OP,             ARGI_SCOPE_OP,              INTERNAL_TYPE_SCOPE,     AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE)
+/* 6E */ ACPI_OP ("QwordConst",         ARGP_QWORD_OP,             ARGI_QWORD_OP,              ACPI_TYPE_INTEGER,           AML_CLASS_ARGUMENT,        AML_TYPE_LITERAL,         AML_CONSTANT),
+/* 6F */ ACPI_OP ("Package /*Var*/",    ARGP_VAR_PACKAGE_OP,       ARGI_VAR_PACKAGE_OP,        ACPI_TYPE_PACKAGE,           AML_CLASS_CREATE,          AML_TYPE_CREATE_OBJECT,   AML_HAS_ARGS | AML_DEFER),
+/* 70 */ ACPI_OP ("ConcatenateResTemplate", ARGP_CONCAT_RES_OP,    ARGI_CONCAT_RES_OP,         ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
+/* 71 */ ACPI_OP ("Mod",                ARGP_MOD_OP,               ARGI_MOD_OP,                ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
+/* 72 */ ACPI_OP ("CreateQWordField",   ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD,      AML_CLASS_CREATE,          AML_TYPE_CREATE_FIELD,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
+/* 73 */ ACPI_OP ("ToBuffer",           ARGP_TO_BUFFER_OP,         ARGI_TO_BUFFER_OP,          ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 74 */ ACPI_OP ("ToDecimalString",    ARGP_TO_DEC_STR_OP,        ARGI_TO_DEC_STR_OP,         ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 75 */ ACPI_OP ("ToHexString",        ARGP_TO_HEX_STR_OP,        ARGI_TO_HEX_STR_OP,         ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 76 */ ACPI_OP ("ToInteger",          ARGP_TO_INTEGER_OP,        ARGI_TO_INTEGER_OP,         ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT),
+/* 77 */ ACPI_OP ("ToString",           ARGP_TO_STRING_OP,         ARGI_TO_STRING_OP,          ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_2A_1T_1R,   AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
+/* 78 */ ACPI_OP ("CopyObject",         ARGP_COPY_OP,              ARGI_COPY_OP,               ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_1A_1T_1R,   AML_FLAGS_EXEC_1A_1T_1R),
+/* 79 */ ACPI_OP ("Mid",                ARGP_MID_OP,               ARGI_MID_OP,                ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_3A_1T_1R,   AML_FLAGS_EXEC_3A_1T_1R | AML_CONSTANT),
+/* 7A */ ACPI_OP ("Continue",           ARGP_CONTINUE_OP,          ARGI_CONTINUE_OP,           ACPI_TYPE_ANY,               AML_CLASS_CONTROL,         AML_TYPE_CONTROL,         0),
+/* 7B */ ACPI_OP ("LoadTable",          ARGP_LOAD_TABLE_OP,        ARGI_LOAD_TABLE_OP,         ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,         AML_TYPE_EXEC_6A_0T_1R,   AML_FLAGS_EXEC_6A_0T_1R),
+/* 7C */ ACPI_OP ("DataTableRegion",    ARGP_DATA_REGION_OP,       ARGI_DATA_REGION_OP,        ACPI_TYPE_REGION,            AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_SIMPLE,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 7D */ ACPI_OP ("[EvalSubTree]",      ARGP_SCOPE_OP,             ARGI_SCOPE_OP,              ACPI_TYPE_ANY,               AML_CLASS_NAMED_OBJECT,    AML_TYPE_NAMED_NO_OBJ,    AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE)
 
 /*! [End] no source code translation !*/
 };
diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
--- a/drivers/acpi/pci_irq.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/pci_irq.c	Wed Oct 30 16:44:28 2002
@@ -229,7 +229,7 @@
                           PCI Interrupt Routing Support
    -------------------------------------------------------------------------- */
 
-static int
+int
 acpi_pci_irq_lookup (
 	int			segment,
 	int			bus,
@@ -285,8 +285,9 @@
 	 * Attempt to derive an IRQ for this device from a parent bridge's
 	 * PCI interrupt routing entry (a.k.a. the "bridge swizzle").
 	 */
-	while (!irq && (bridge = bridge->bus->self)) {
+	while (!irq && bridge->bus->self) {
 		pin = (pin + PCI_SLOT(bridge->devfn)) % 4;
+		bridge = bridge->bus->self;
 		irq = acpi_pci_irq_lookup(0, bridge->bus->number, PCI_SLOT(bridge->devfn), pin);
 	}
 
diff -Nru a/drivers/acpi/power.c b/drivers/acpi/power.c
--- a/drivers/acpi/power.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/power.c	Wed Oct 30 16:44:28 2002
@@ -217,7 +217,7 @@
 
 
 static int
-acpi_power_off (
+acpi_power_off_device (
 	acpi_handle		handle)
 {
 	int			result = 0;
@@ -225,7 +225,7 @@
 	struct acpi_device	*device = NULL;
 	struct acpi_power_resource *resource = NULL;
 
-	ACPI_FUNCTION_TRACE("acpi_power_off");
+	ACPI_FUNCTION_TRACE("acpi_power_off_device");
 
 	result = acpi_power_get_context(handle, &resource);
 	if (result)
@@ -358,7 +358,7 @@
 	 * Then we dereference all power resources used in the current list.
 	 */
 	for (i=0; i<cl->count; i++) {
-		result = acpi_power_off(cl->handles[i]);
+		result = acpi_power_off_device(cl->handles[i]);
 		if (result)
 			goto end;
 	}
diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c
--- a/drivers/acpi/processor.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/acpi/processor.c	Wed Oct 30 16:44:30 2002
@@ -43,6 +43,10 @@
 #include "acpi_bus.h"
 #include "acpi_drivers.h"
 
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
+#include <linux/cpufreq.h>
+#endif
+
 #define ACPI_PROCESSOR_COMPONENT	0x01000000
 #define ACPI_PROCESSOR_CLASS		"processor"
 #define ACPI_PROCESSOR_DRIVER_NAME	"ACPI Processor Driver"
@@ -224,6 +228,11 @@
 static struct acpi_processor_errata errata;
 static void (*pm_idle_save)(void) = NULL;
 
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
+static unsigned int cpufreq_usage_count = 0;
+static struct cpufreq_driver *acpi_cpufreq_driver;
+#endif
+
 
 /* --------------------------------------------------------------------------
                                 Errata Handling
@@ -830,7 +839,7 @@
 /* --------------------------------------------------------------------------
                               Performance Management
    -------------------------------------------------------------------------- */
-
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
 static int 
 acpi_processor_get_platform_limit (
 	struct acpi_processor*	pr)
@@ -1037,6 +1046,7 @@
 	u16			port = 0;
 	u8			value = 0;
 	int			i = 0;
+	struct cpufreq_freqs    cpufreq_freqs;
 
 	ACPI_FUNCTION_TRACE("acpi_processor_set_performance");
 
@@ -1068,6 +1078,14 @@
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Transitioning from P%d to P%d\n",
 		pr->performance.state, state));
 
+	/* cpufreq frequency struct */
+	cpufreq_freqs.cpu = pr->id;
+	cpufreq_freqs.old = pr->performance.states[pr->performance.state].core_frequency;
+	cpufreq_freqs.new = pr->performance.states[state].core_frequency;
+
+	/* notify cpufreq */
+	cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE);
+
 	/*
 	 * First we write the target state's 'control' value to the
 	 * control_register.
@@ -1101,7 +1119,15 @@
 		udelay(10);
 	}
 
+	/* notify cpufreq */
+	cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
+
 	if (value != pr->performance.states[state].status) {
+		unsigned int tmp = cpufreq_freqs.new;
+		cpufreq_freqs.new = cpufreq_freqs.old;
+		cpufreq_freqs.old = tmp;
+		cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE);
+		cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE);
 		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Transition failed\n"));
 		return_VALUE(-ENODEV);
 	}
@@ -1155,6 +1181,23 @@
 
 	return_VALUE(0);
 }
+#else
+
+
+static int
+acpi_processor_get_performance_info (
+	struct acpi_processor	*pr)
+{
+	ACPI_FUNCTION_TRACE("acpi_processor_get_performance_info_dummy");
+	if (!pr)
+		return_VALUE(-EINVAL);
+	pr->flags.performance = 0;
+	return_VALUE(0);
+}
+#endif
+
+
+
 
 
 /* --------------------------------------------------------------------------
@@ -1400,17 +1443,24 @@
 	if (!pr->flags.limit)
 		return_VALUE(-ENODEV);
 
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
 	if (pr->flags.performance) {
 		px = pr->performance.platform_limit;
 		if (pr->limit.user.px > px)
 			px = pr->limit.user.px;
 		if (pr->limit.thermal.px > px)
 			px = pr->limit.thermal.px;
-
-		result = acpi_processor_set_performance(pr, px);
+		{
+			struct cpufreq_policy policy;
+			policy.cpu = pr->id;
+			cpufreq_get_policy(&policy, pr->id);
+			policy.max = pr->performance.states[px].core_frequency * 1000;
+			result = cpufreq_set_policy(&policy);
+		}
 		if (result)
 			goto end;
 	}
+#endif
 
 	if (pr->flags.throttling) {
 		if (pr->limit.user.tx > tx)
@@ -1481,9 +1531,6 @@
 	px = pr->limit.thermal.px;
 	tx = pr->limit.thermal.tx;
 
-	px = pr->limit.thermal.px;
-	tx = pr->limit.thermal.tx;
-
 	switch (type) {
 
 	case ACPI_PROCESSOR_LIMIT_NONE:
@@ -1562,6 +1609,271 @@
 	return_VALUE(0);
 }
 
+/* --------------------------------------------------------------------------
+                               cpufreq interface
+   -------------------------------------------------------------------------- */
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
+static void
+acpi_cpufreq_setpolicy (
+	struct cpufreq_policy   *policy)
+{
+	unsigned int cpu = 0;
+	unsigned int i = 0;
+	struct acpi_processor *pr = NULL;
+	unsigned int next_state = 0;
+	unsigned int result = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_setpolicy");
+
+	if (!policy)
+		return_VOID;
+
+	/* get a present, initialized CPU */
+	if (policy->cpu == CPUFREQ_ALL_CPUS)
+	{
+		for (i=0; i<NR_CPUS; i++) {
+			if (processors[i] != NULL) {
+				cpu = i;
+				pr = processors[cpu];
+				break;
+			}
+		}
+	}
+	else
+	{
+		cpu = policy->cpu;
+		pr = processors[cpu];
+		if (!pr)
+			return_VOID;
+	}
+
+	/* select appropriate P-State */
+	if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
+	{
+		for (i=(pr->performance.state_count - 1); i>= pr->limit.state.px; i--)
+		{
+			unsigned int state_freq = pr->performance.states[i].core_frequency * 1000;
+			if ((policy->min <= state_freq) &&
+			    (policy->max >= state_freq)) 
+			{
+				next_state = i;
+				break;
+			}
+		}
+	} else {
+		for (i=pr->limit.state.px; i < pr->performance.state_count; i++)
+		{
+			unsigned int state_freq = pr->performance.states[i].core_frequency * 1000;
+			if ((policy->min <= state_freq) &&
+			    (policy->max >= state_freq)) 
+			{
+				next_state = i;
+				break;
+			}
+		}
+	}
+
+	/* set one or all CPUs to the new state */
+	if (policy->cpu == CPUFREQ_ALL_CPUS) {
+		for (i=0; i<NR_CPUS; i++)
+		{
+			pr = processors[cpu];
+			if (!pr || !cpu_online(cpu))
+				continue;
+			result = acpi_processor_set_performance (pr, next_state);
+		}
+	} else {
+		result = acpi_processor_set_performance (pr, next_state);
+	}
+
+	return_VOID;
+}
+
+
+static void
+acpi_cpufreq_verify (
+	struct cpufreq_policy   *policy)
+{
+	unsigned int cpu = 0;
+	unsigned int i = 0;
+	struct acpi_processor *pr = NULL;
+	unsigned int number_states = 0;
+	unsigned int next_larger_state = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_verify");
+
+	if (!policy)
+		return_VOID;
+
+	/* get a present, initialized CPU */
+	if (policy->cpu == CPUFREQ_ALL_CPUS)
+	{
+		for (i=0; i<NR_CPUS; i++) {
+			if (processors[i] != NULL) {
+				cpu = i;
+				pr = processors[cpu];
+				break;
+			}
+		}
+	}
+	else
+	{
+		cpu = policy->cpu;
+		pr = processors[cpu];
+		if (!pr)
+			return_VOID;
+	}
+
+	/* first check if min and max are within valid limits */
+	cpufreq_verify_within_limits(
+		policy, 
+		pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000,
+		pr->performance.states[pr->limit.state.px].core_frequency * 1000);
+
+	/* now check if at least one value is within this limit */
+	for (i=pr->limit.state.px; i < pr->performance.state_count; i++)
+	{
+		unsigned int state_freq = pr->performance.states[i].core_frequency * 1000;
+		if ((policy->min <= state_freq) &&
+		    (policy->max >= state_freq))
+			number_states++;
+		if (state_freq > policy->max)
+			next_larger_state = i;
+	}
+
+	if (number_states)
+		return_VOID;
+
+	/* round up now */
+	policy->max = pr->performance.states[next_larger_state].core_frequency * 1000;
+
+	return_VOID;
+}
+
+static int
+acpi_cpufreq_init (
+	struct acpi_processor   *pr)
+{
+	int                     result = 0;
+	int                     i = 0;
+	int                     current_state = 0;
+	struct cpufreq_driver   *driver;
+
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_init");
+
+	if (cpufreq_usage_count) {
+		if (pr->flags.performance == 1)
+			cpufreq_usage_count++;
+		return_VALUE(0);
+	}
+
+	/* test if it works */
+	current_state = pr->performance.state;
+
+	if (current_state == pr->limit.state.px) {
+		result = acpi_processor_set_performance(pr, (pr->performance.state_count - 1));
+		if (result) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Disabled P-States due to failure while switching.\n"));
+			pr->flags.performance = 0;
+			return_VALUE(-ENODEV);
+		}
+	}
+
+	result = acpi_processor_set_performance(pr, pr->limit.state.px);
+	if (result) {
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Disabled P-States due to failure while switching.\n"));
+		pr->flags.performance = 0;
+		return_VALUE(-ENODEV);
+	}
+	
+	if (current_state != 0) {
+		result = acpi_processor_set_performance(pr, current_state);
+		if (result) {
+			ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Disabled P-States due to failure while switching.\n"));
+			pr->flags.performance = 0;
+			return_VALUE(-ENODEV);
+		}
+	}
+
+	/* initialization of main "cpufreq" code*/
+	driver = kmalloc(sizeof(struct cpufreq_driver) + 
+			 NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL);
+	if (!driver)
+		return_VALUE(-ENOMEM);
+
+	driver->policy = (struct cpufreq_policy *) (driver + 1);
+
+#ifdef CONFIG_CPU_FREQ_24_API
+	driver->cpu_min_freq    = pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000;
+	for (i=0;i<NR_CPUS;i++)
+		driver->cpu_cur_freq[0] = pr->performance.states[current_state].core_frequency * 1000;
+#endif
+
+	driver->verify      = &acpi_cpufreq_verify;
+	driver->setpolicy   = &acpi_cpufreq_setpolicy;
+
+	for (i=0;i<NR_CPUS;i++) {
+		driver->policy[i].cpu    = pr->id;
+		driver->policy[i].min    = pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000;
+		driver->policy[i].max    = pr->performance.states[pr->limit.state.px].core_frequency * 1000;
+		driver->policy[i].max_cpu_freq = pr->performance.states[0].core_frequency * 1000;
+		driver->policy[i].policy = ( pr->performance.states[current_state].core_frequency * 1000 == driver->policy[i].max) ? 
+			CPUFREQ_POLICY_PERFORMANCE : CPUFREQ_POLICY_POWERSAVE;
+	}
+
+	acpi_cpufreq_driver = driver;
+	result = cpufreq_register(driver);
+	if (result) {
+		kfree(driver);
+		acpi_cpufreq_driver = NULL;
+		return_VALUE(result);
+	}
+
+	cpufreq_usage_count++;
+
+	return_VALUE(0);
+}
+
+static int
+acpi_cpufreq_exit (
+	struct acpi_processor   *pr)
+{
+	int                     result = 0;
+
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_exit");
+
+	if (!pr)
+		return_VALUE(-EINVAL);
+
+	if (pr->flags.performance)
+		cpufreq_usage_count--;
+
+	if (!cpufreq_usage_count) {
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO, 
+			"Removing cpufreq driver\n"));
+		result = cpufreq_unregister();
+	}
+
+	return_VALUE(result);
+}
+#else
+static int
+acpi_cpufreq_init (
+	struct acpi_processor   *pr)
+{
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_init_dummy");
+	return_VALUE(0);
+}
+
+
+static int
+acpi_cpufreq_exit (
+	struct acpi_processor   *pr)
+{
+	ACPI_FUNCTION_TRACE("acpi_cpufreq_exit_dummy");
+	return_VALUE(0);
+}
+#endif
 
 /* --------------------------------------------------------------------------
                               FS Interface (/proc)
@@ -1688,7 +2000,7 @@
 	return_VALUE(len);
 }
 
-
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
 static int
 acpi_processor_read_performance (
 	char			*page,
@@ -1739,7 +2051,6 @@
 	return_VALUE(len);
 }
 
-
 static int
 acpi_processor_write_performance (
         struct file		*file,
@@ -1750,6 +2061,8 @@
 	int			result = 0;
 	struct acpi_processor	*pr = (struct acpi_processor *) data;
 	char			state_string[12] = {'\0'};
+	unsigned int            new_state = 0;
+	struct cpufreq_policy   policy;
 
 	ACPI_FUNCTION_TRACE("acpi_processor_write_performance");
 
@@ -1760,14 +2073,20 @@
 		return_VALUE(-EFAULT);
 	
 	state_string[count] = '\0';
+	new_state = simple_strtoul(state_string, NULL, 0);
 
-	result = acpi_processor_set_performance(pr, 
-		simple_strtoul(state_string, NULL, 0));
+	cpufreq_get_policy(&policy, pr->id);
+
+	policy.cpu = pr->id;
+	policy.max = pr->performance.states[new_state].core_frequency * 1000;
+
+	result = cpufreq_set_policy(&policy);
 	if (result)
 		return_VALUE(result);
 
 	return_VALUE(count);
 }
+#endif
 
 
 static int
@@ -2005,6 +2324,7 @@
 		entry->data = acpi_driver_data(device);
 	}
 
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
 	/* 'performance' [R/W] */
 	entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
 		S_IFREG|S_IRUGO|S_IWUSR, acpi_device_dir(device));
@@ -2017,6 +2337,7 @@
 		entry->write_proc = acpi_processor_write_performance;
 		entry->data = acpi_driver_data(device);
 	}
+#endif
 
 	/* 'throttling' [R/W] */
 	entry = create_proc_entry(ACPI_PROCESSOR_FILE_THROTTLING,
@@ -2139,6 +2460,7 @@
 
 	acpi_processor_get_power_info(pr);
 	acpi_processor_get_performance_info(pr);
+	acpi_cpufreq_init(pr);
 	acpi_processor_get_throttling_info(pr);
 	acpi_processor_get_limit_info(pr);
 
@@ -2166,9 +2488,15 @@
 
 	switch (event) {
 	case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
+#ifdef CONFIG_ACPI_PROCESSOR_PERF
 		result = acpi_processor_get_platform_limit(pr);
 		if (!result)
 			acpi_processor_apply_limit(pr);
+#else
+		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 
+			"Please use kernel with Processor Performance States support included!\n"));
+		result = 0;
+#endif
 
 		acpi_bus_generate_event(device, event, 
 			pr->performance.platform_limit);
@@ -2288,6 +2616,7 @@
 		return_VALUE(-ENODEV);
 	}
 
+	acpi_cpufreq_exit(pr);
 	acpi_processor_remove_fs(device);
 
 	processors[pr->id] = NULL;
diff -Nru a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c
--- a/drivers/acpi/resources/rscalc.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/resources/rscalc.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: rscalc - Calculate stream and list lengths
- *              $Revision: 43 $
+ *              $Revision: 44 $
  *
  ******************************************************************************/
 
@@ -771,7 +771,7 @@
 
 		for (table_index = 0; table_index < 4 && !name_found; table_index++) {
 			if ((ACPI_TYPE_STRING == ACPI_GET_OBJECT_TYPE (*sub_object_list)) ||
-				((INTERNAL_TYPE_REFERENCE == ACPI_GET_OBJECT_TYPE (*sub_object_list)) &&
+				((ACPI_TYPE_LOCAL_REFERENCE == ACPI_GET_OBJECT_TYPE (*sub_object_list)) &&
 					((*sub_object_list)->reference.opcode == AML_INT_NAMEPATH_OP))) {
 				name_found = TRUE;
 			}
diff -Nru a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c
--- a/drivers/acpi/resources/rscreate.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/resources/rscreate.c	Wed Oct 30 16:44:27 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: rscreate - Create resource lists/tables
- *              $Revision: 58 $
+ *              $Revision: 61 $
  *
  ******************************************************************************/
 
@@ -66,7 +66,8 @@
 	ACPI_FUNCTION_TRACE ("Rs_create_resource_list");
 
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Byte_stream_buffer = %p\n", byte_stream_buffer));
+	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Byte_stream_buffer = %p\n",
+		byte_stream_buffer));
 
 	/*
 	 * Params already validated, so we don't re-validate here
@@ -135,13 +136,13 @@
 	acpi_buffer             *output_buffer)
 {
 	u8                      *buffer;
-	acpi_operand_object     **top_object_list = NULL;
-	acpi_operand_object     **sub_object_list = NULL;
-	acpi_operand_object     *package_element = NULL;
+	acpi_operand_object     **top_object_list;
+	acpi_operand_object     **sub_object_list;
+	acpi_operand_object     *obj_desc;
 	ACPI_SIZE               buffer_size_needed = 0;
-	u32                     number_of_elements = 0;
-	u32                     index = 0;
-	acpi_pci_routing_table  *user_prt = NULL;
+	u32                     number_of_elements;
+	u32                     index;
+	acpi_pci_routing_table  *user_prt;
 	acpi_namespace_node     *node;
 	acpi_status             status;
 	acpi_buffer             path_buffer;
@@ -161,7 +162,8 @@
 		return_ACPI_STATUS (status);
 	}
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Buffer_size_needed = %X\n", (u32) buffer_size_needed));
+	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Buffer_size_needed = %X\n",
+		(u32) buffer_size_needed));
 
 	/* Validate/Allocate/Clear caller buffer */
 
@@ -171,7 +173,8 @@
 	}
 
 	/*
-	 * Loop through the ACPI_INTERNAL_OBJECTS - Each object should contain an
+	 * Loop through the ACPI_INTERNAL_OBJECTS - Each object
+	 * should be a package that in turn contains an
 	 * acpi_integer Address, a u8 Pin, a Name and a u8 Source_index.
 	 */
 	top_object_list  = package_object->package.elements;
@@ -194,81 +197,98 @@
 		 * The minus four is to subtract the size of the u8 Source[4] member
 		 * because it is added below.
 		 */
-		user_prt->length = (sizeof (acpi_pci_routing_table) -4);
+		user_prt->length = (sizeof (acpi_pci_routing_table) - 4);
 
 		/*
-		 * Dereference the sub-package
+		 * Each element of the top-level package must also be a package
 		 */
-		package_element = *top_object_list;
+		if (ACPI_GET_OBJECT_TYPE (*top_object_list) != ACPI_TYPE_PACKAGE) {
+			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+				"(PRT[%X]) Need sub-package, found %s\n",
+				index, acpi_ut_get_object_type_name (*top_object_list)));
+			return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+		}
+
+		/* Each sub-package must be of length 4 */
+
+		if ((*top_object_list)->package.count != 4) {
+			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+				"(PRT[%X]) Need package of length 4, found length %d\n",
+				index, (*top_object_list)->package.count));
+			return_ACPI_STATUS (AE_AML_PACKAGE_LIMIT);
+		}
 
 		/*
+		 * Dereference the sub-package.
 		 * The Sub_object_list will now point to an array of the four IRQ
-		 * elements: Address, Pin, Source and Source_index
+		 * elements: [Address, Pin, Source, Source_index]
 		 */
-		sub_object_list = package_element->package.elements;
+		sub_object_list = (*top_object_list)->package.elements;
 
 		/*
-		 * 1) First subobject:  Dereference the Address
+		 * 1) First subobject: Dereference the PRT.Address
 		 */
-		if (ACPI_GET_OBJECT_TYPE (*sub_object_list) == ACPI_TYPE_INTEGER) {
-			user_prt->address = (*sub_object_list)->integer.value;
+		obj_desc = sub_object_list[0];
+		if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
+			user_prt->address = obj_desc->integer.value;
 		}
 		else {
-			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
-				acpi_ut_get_object_type_name (*sub_object_list)));
+			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+				"(PRT[%X].Address) Need Integer, found %s\n",
+				index, acpi_ut_get_object_type_name (obj_desc)));
 			return_ACPI_STATUS (AE_BAD_DATA);
 		}
 
 		/*
-		 * 2) Second subobject: Dereference the Pin
+		 * 2) Second subobject: Dereference the PRT.Pin
 		 */
-		sub_object_list++;
-
-		if (ACPI_GET_OBJECT_TYPE (*sub_object_list) == ACPI_TYPE_INTEGER) {
-			user_prt->pin = (u32) (*sub_object_list)->integer.value;
+		obj_desc = sub_object_list[1];
+		if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
+			user_prt->pin = (u32) obj_desc->integer.value;
 		}
 		else {
-			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
-				acpi_ut_get_object_type_name (*sub_object_list)));
+			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+				"(PRT[%X].Pin) Need Integer, found %s\n",
+				index, acpi_ut_get_object_type_name (obj_desc)));
 			return_ACPI_STATUS (AE_BAD_DATA);
 		}
 
 		/*
-		 * 3) Third subobject: Dereference the Source Name
+		 * 3) Third subobject: Dereference the PRT.Source_name
 		 */
-		sub_object_list++;
-
-		switch (ACPI_GET_OBJECT_TYPE (*sub_object_list)) {
-		case INTERNAL_TYPE_REFERENCE:
-
-			if ((*sub_object_list)->reference.opcode != AML_INT_NAMEPATH_OP) {
-				ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need name, found reference op %X\n",
-					(*sub_object_list)->reference.opcode));
+		obj_desc = sub_object_list[2];
+		switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
+		case ACPI_TYPE_LOCAL_REFERENCE:
+
+			if (obj_desc->reference.opcode != AML_INT_NAMEPATH_OP) {
+				ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+					"(PRT[%X].Source) Need name, found reference op %X\n",
+					index, obj_desc->reference.opcode));
 				return_ACPI_STATUS (AE_BAD_DATA);
 			}
 
-			node = (*sub_object_list)->reference.node;
+			node = obj_desc->reference.node;
 
 			/* Use *remaining* length of the buffer as max for pathname */
 
 			path_buffer.length = output_buffer->length -
-					   (u32) ((u8 *) user_prt->source - (u8 *) output_buffer->pointer);
+					   (u32) ((u8 *) user_prt->source -
+					   (u8 *) output_buffer->pointer);
 			path_buffer.pointer = user_prt->source;
 
 			status = acpi_ns_handle_to_pathname ((acpi_handle) node, &path_buffer);
 
-			user_prt->length += ACPI_STRLEN (user_prt->source) + 1; /* include null terminator */
+			user_prt->length += (u32) ACPI_STRLEN (user_prt->source) + 1; /* include null terminator */
 			break;
 
 
 		case ACPI_TYPE_STRING:
 
-			ACPI_STRCPY (user_prt->source,
-				  (*sub_object_list)->string.pointer);
+			ACPI_STRCPY (user_prt->source, obj_desc->string.pointer);
 
 			/* Add to the Length field the length of the string */
 
-			user_prt->length += (*sub_object_list)->string.length;
+			user_prt->length += obj_desc->string.length;
 			break;
 
 
@@ -285,8 +305,9 @@
 
 		default:
 
-		   ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
-				acpi_ut_get_object_type_name (*sub_object_list)));
+		   ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+			   "(PRT[%X].Source) Need Ref/String/Integer, found %s\n",
+				index, acpi_ut_get_object_type_name (obj_desc)));
 		   return_ACPI_STATUS (AE_BAD_DATA);
 		}
 
@@ -295,20 +316,20 @@
 		user_prt->length = ACPI_ROUND_UP_TO_64_bITS (user_prt->length);
 
 		/*
-		 * 4) Fourth subobject: Dereference the Source Index
+		 * 4) Fourth subobject: Dereference the PRT.Source_index
 		 */
-		sub_object_list++;
-
-		if (ACPI_GET_OBJECT_TYPE (*sub_object_list) == ACPI_TYPE_INTEGER) {
-			user_prt->source_index = (u32) (*sub_object_list)->integer.value;
+		obj_desc = sub_object_list[3];
+		if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
+			user_prt->source_index = (u32) obj_desc->integer.value;
 		}
 		else {
-			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n",
-				acpi_ut_get_object_type_name (*sub_object_list)));
+			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+				"(PRT[%X].Source_index) Need Integer, found %s\n",
+				index, acpi_ut_get_object_type_name (obj_desc)));
 			return_ACPI_STATUS (AE_BAD_DATA);
 		}
 
-		/* Point to the next acpi_operand_object */
+		/* Point to the next acpi_operand_object in the top level package */
 
 		top_object_list++;
 	}
@@ -349,7 +370,8 @@
 	ACPI_FUNCTION_TRACE ("Rs_create_byte_stream");
 
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Linked_list_buffer = %p\n", linked_list_buffer));
+	ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Linked_list_buffer = %p\n",
+		linked_list_buffer));
 
 	/*
 	 * Params already validated, so we don't re-validate here
diff -Nru a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
--- a/drivers/acpi/tables/tbconvrt.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/tables/tbconvrt.c	Wed Oct 30 16:44:27 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbconvrt - ACPI Table conversion utilities
- *              $Revision: 43 $
+ *              $Revision: 44 $
  *
  *****************************************************************************/
 
@@ -137,7 +137,6 @@
 	/* Point the table descriptor to the new table */
 
 	table_info->pointer     = (acpi_table_header *) new_table;
-	table_info->base_pointer = (acpi_table_header *) new_table;
 	table_info->length      = table_size;
 	table_info->allocation  = ACPI_MEM_ALLOCATED;
 
@@ -385,7 +384,6 @@
 	/* Install the new table */
 
 	table_desc->pointer     = (acpi_table_header *) acpi_gbl_FADT;
-	table_desc->base_pointer = acpi_gbl_FADT;
 	table_desc->allocation  = ACPI_MEM_ALLOCATED;
 	table_desc->length      = sizeof (fadt_descriptor_rev2);
 
diff -Nru a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c
--- a/drivers/acpi/tables/tbget.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/tables/tbget.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbget - ACPI Table get* routines
- *              $Revision: 80 $
+ *              $Revision: 81 $
  *
  *****************************************************************************/
 
@@ -386,7 +386,6 @@
 	table_info->pointer     = full_table;
 	table_info->length      = (ACPI_SIZE) header->length;
 	table_info->allocation  = allocation;
-	table_info->base_pointer = full_table;
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
 		"Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n",
diff -Nru a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
--- a/drivers/acpi/tables/tbgetall.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/acpi/tables/tbgetall.c	Wed Oct 30 16:44:25 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbgetall - Get all required ACPI tables
- *              $Revision: 2 $
+ *              $Revision: 3 $
  *
  *****************************************************************************/
 
@@ -218,7 +218,13 @@
 		 * Get the tables needed by this subsystem (FADT and any SSDTs).
 		 * NOTE: All other tables are completely ignored at this time.
 		 */
-		acpi_tb_get_primary_table (&address, &table_info);
+		status = acpi_tb_get_primary_table (&address, &table_info);
+		if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) {
+			ACPI_REPORT_WARNING (("%s, while getting table at %8.8X%8.8X\n",
+				acpi_format_exception (status),
+				ACPI_HIDWORD (address.pointer.value),
+				ACPI_LODWORD (address.pointer.value)));
+		}
 	}
 
 	/* We must have a FADT to continue */
diff -Nru a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
--- a/drivers/acpi/tables/tbinstal.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/acpi/tables/tbinstal.c	Wed Oct 30 16:44:26 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbinstal - ACPI table installation and removal
- *              $Revision: 63 $
+ *              $Revision: 64 $
  *
  *****************************************************************************/
 
@@ -286,7 +286,6 @@
 
 	table_desc->type                = table_info->type;
 	table_desc->pointer             = table_info->pointer;
-	table_desc->base_pointer        = table_info->base_pointer;
 	table_desc->length              = table_info->length;
 	table_desc->allocation          = table_info->allocation;
 	table_desc->aml_start           = (u8 *) (table_desc->pointer + 1),
@@ -480,12 +479,12 @@
 
 		case ACPI_MEM_ALLOCATED:
 
-			ACPI_MEM_FREE (table_desc->base_pointer);
+			ACPI_MEM_FREE (table_desc->pointer);
 			break;
 
 		case ACPI_MEM_MAPPED:
 
-			acpi_os_unmap_memory (table_desc->base_pointer, table_desc->length);
+			acpi_os_unmap_memory (table_desc->pointer, table_desc->length);
 			break;
 
 		default:
diff -Nru a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
--- a/drivers/acpi/tables/tbrsdt.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/tables/tbrsdt.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbrsdt - ACPI RSDT table utilities
- *              $Revision: 3 $
+ *              $Revision: 4 $
  *
  *****************************************************************************/
 
@@ -108,7 +108,6 @@
 	table_info.pointer     = ACPI_CAST_PTR (acpi_table_header, rsdp);
 	table_info.length      = sizeof (RSDP_DESCRIPTOR);
 	table_info.allocation  = ACPI_MEM_MAPPED;
-	table_info.base_pointer = rsdp;
 
 	/* Save the table pointers and allocation info */
 
diff -Nru a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
--- a/drivers/acpi/utilities/utcopy.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/acpi/utilities/utcopy.c	Wed Oct 30 16:44:27 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utcopy - Internal to external object translation utilities
- *              $Revision: 104 $
+ *              $Revision: 105 $
  *
  *****************************************************************************/
 
@@ -113,7 +113,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		/*
 		 * This is an object reference.  Attempt to dereference it.
diff -Nru a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
--- a/drivers/acpi/utilities/utdelete.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/acpi/utilities/utdelete.c	Wed Oct 30 16:44:28 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: utdelete - object deletion and reference count utilities
- *              $Revision: 91 $
+ *              $Revision: 92 $
  *
  ******************************************************************************/
 
@@ -417,7 +417,7 @@
 			break;
 
 
-		case INTERNAL_TYPE_ADDRESS_HANDLER:
+		case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
 
 			/* Must walk list of address handlers */
 
@@ -462,7 +462,7 @@
 			break;
 
 
-		case INTERNAL_TYPE_REGION_FIELD:
+		case ACPI_TYPE_LOCAL_REGION_FIELD:
 
 			status = acpi_ut_create_update_state_and_push (
 					 object->field.region_obj, action, &state_list);
@@ -472,7 +472,7 @@
 		   break;
 
 
-		case INTERNAL_TYPE_BANK_FIELD:
+		case ACPI_TYPE_LOCAL_BANK_FIELD:
 
 			status = acpi_ut_create_update_state_and_push (
 					 object->bank_field.bank_obj, action, &state_list);
@@ -488,7 +488,7 @@
 			break;
 
 
-		case INTERNAL_TYPE_INDEX_FIELD:
+		case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
 			status = acpi_ut_create_update_state_and_push (
 					 object->index_field.index_obj, action, &state_list);
@@ -505,7 +505,7 @@
 
 
 		case ACPI_TYPE_REGION:
-		case INTERNAL_TYPE_REFERENCE:
+		case ACPI_TYPE_LOCAL_REFERENCE:
 		default:
 
 			/* No subobjects */
diff -Nru a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
--- a/drivers/acpi/utilities/utglobal.c	Wed Oct 30 16:44:22 2002
+++ b/drivers/acpi/utilities/utglobal.c	Wed Oct 30 16:44:22 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utglobal - Global variables for the ACPI subsystem
- *              $Revision: 171 $
+ *              $Revision: 172 $
  *
  *****************************************************************************/
 
@@ -176,11 +176,11 @@
  */
 
 const acpi_predefined_names     acpi_gbl_pre_defined_names[] =
-{ {"_GPE",    INTERNAL_TYPE_SCOPE,        NULL},
-	{"_PR_",    INTERNAL_TYPE_SCOPE,        NULL},
+{ {"_GPE",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
+	{"_PR_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
 	{"_SB_",    ACPI_TYPE_DEVICE,           NULL},
-	{"_SI_",    INTERNAL_TYPE_SCOPE,        NULL},
-	{"_TZ_",    INTERNAL_TYPE_SCOPE,        NULL},
+	{"_SI_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
+	{"_TZ_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
 	{"_REV",    ACPI_TYPE_INTEGER,          "2"},
 	{"_OS_",    ACPI_TYPE_STRING,           ACPI_OS_NAME},
 	{"_GL_",    ACPI_TYPE_MUTEX,            "0"},
@@ -225,17 +225,10 @@
 	ACPI_NS_NORMAL,                     /* 23 Address Handler  */
 	ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 24 Resource Desc    */
 	ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 25 Resource Field   */
-	ACPI_NS_NORMAL,                     /* 26 Def_field_defn   */
-	ACPI_NS_NORMAL,                     /* 27 Bank_field_defn  */
-	ACPI_NS_NORMAL,                     /* 28 Index_field_defn */
-	ACPI_NS_NORMAL,                     /* 29 If               */
-	ACPI_NS_NORMAL,                     /* 30 Else             */
-	ACPI_NS_NORMAL,                     /* 31 While            */
-	ACPI_NS_NEWSCOPE,                   /* 32 Scope            */
-	ACPI_NS_LOCAL,                      /* 33 Def_any          */
-	ACPI_NS_NORMAL,                     /* 34 Extra            */
-	ACPI_NS_NORMAL,                     /* 35 Data             */
-	ACPI_NS_NORMAL                      /* 36 Invalid          */
+	ACPI_NS_NEWSCOPE,                   /* 26 Scope            */
+	ACPI_NS_NORMAL,                     /* 27 Extra            */
+	ACPI_NS_NORMAL,                     /* 28 Data             */
+	ACPI_NS_NORMAL                      /* 29 Invalid          */
 };
 
 
@@ -481,17 +474,10 @@
 	/* 23 */ "Addr_handler",
 	/* 24 */ "Resource_desc",
 	/* 25 */ "Resource_fld",
-	/* 26 */ "Region_fld_dfn",
-	/* 27 */ "Bank_fld_dfn",
-	/* 28 */ "Index_fld_dfn",
-	/* 29 */ "If",
-	/* 30 */ "Else",
-	/* 31 */ "While",
-	/* 32 */ "Scope",
-	/* 33 */ "Def_any",
-	/* 34 */ "Extra",
-	/* 35 */ "Data",
-	/* 36 */ "Invalid"
+	/* 26 */ "Scope",
+	/* 27 */ "Extra",
+	/* 28 */ "Data",
+	/* 39 */ "Invalid"
 };
 
 
@@ -500,7 +486,7 @@
 	acpi_object_type        type)
 {
 
-	if (type > INTERNAL_TYPE_INVALID)
+	if (type > ACPI_TYPE_INVALID)
 	{
 		return ((NATIVE_CHAR *) acpi_gbl_bad_type);
 	}
@@ -563,7 +549,7 @@
  *
  * FUNCTION:    Acpi_ut_valid_object_type
  *
- * PARAMETERS:  None.
+ * PARAMETERS:  Type            - Object type to be validated
  *
  * RETURN:      TRUE if valid object type
  *
@@ -576,13 +562,11 @@
 	acpi_object_type        type)
 {
 
-	if (type > ACPI_TYPE_MAX)
+	if (type > ACPI_TYPE_LOCAL_MAX)
 	{
-		if ((type < INTERNAL_TYPE_BEGIN) ||
-			(type > INTERNAL_TYPE_MAX))
-		{
-			return (FALSE);
-		}
+		/* Note: Assumes all TYPEs are contiguous (external/local) */
+
+		return (FALSE);
 	}
 
 	return (TRUE);
@@ -767,7 +751,7 @@
 
 	acpi_gbl_root_node_struct.name.integer = ACPI_ROOT_NAME;
 	acpi_gbl_root_node_struct.descriptor = ACPI_DESC_TYPE_NAMED;
-	acpi_gbl_root_node_struct.type      = ACPI_TYPE_ANY;
+	acpi_gbl_root_node_struct.type      = ACPI_TYPE_DEVICE;
 	acpi_gbl_root_node_struct.child     = NULL;
 	acpi_gbl_root_node_struct.peer      = NULL;
 	acpi_gbl_root_node_struct.object    = NULL;
diff -Nru a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
--- a/drivers/acpi/utilities/utmisc.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/acpi/utilities/utmisc.c	Wed Oct 30 16:44:20 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: utmisc - common utility procedures
- *              $Revision: 84 $
+ *              $Revision: 85 $
  *
  ******************************************************************************/
 
@@ -30,6 +30,98 @@
 
 #define _COMPONENT          ACPI_UTILITIES
 	 ACPI_MODULE_NAME    ("utmisc")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    Acpi_ut_print_string
+ *
+ * PARAMETERS:  String          - Null terminated ASCII string
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Dump an ASCII string with support for ACPI-defined escape
+ *              sequences.
+ *
+ ******************************************************************************/
+
+void
+acpi_ut_print_string (
+	char                    *string,
+	u8                      max_length)
+{
+	u32                     i;
+
+
+	if (!string) {
+		acpi_os_printf ("<\"NULL STRING PTR\">");
+		return;
+	}
+
+	acpi_os_printf ("\"");
+	for (i = 0; string[i] && (i < max_length); i++) {
+		/* Escape sequences */
+
+		switch (string[i]) {
+		case 0x07:
+			acpi_os_printf ("\\a");      /* BELL */
+			break;
+
+		case 0x08:
+			acpi_os_printf ("\\b");     /* BACKSPACE */
+			break;
+
+		case 0x0C:
+			acpi_os_printf ("\\f");     /* FORMFEED */
+			break;
+
+		case 0x0A:
+			acpi_os_printf ("\\n");     /* LINEFEED */
+			break;
+
+		case 0x0D:
+			acpi_os_printf ("\\r");     /* CARRIAGE RETURN*/
+			break;
+
+		case 0x09:
+			acpi_os_printf ("\\t");     /* HORIZONTAL TAB */
+			break;
+
+		case 0x0B:
+			acpi_os_printf ("\\v");     /* VERTICAL TAB */
+			break;
+
+		case '\'':                      /* Single Quote */
+		case '\"':                      /* Double Quote */
+		case '\\':                      /* Backslash */
+			acpi_os_printf ("\\%c", (int) string[i]);
+			break;
+
+		default:
+
+			/* Check for printable character or hex escape */
+
+			if (ACPI_IS_PRINT (string[i]))
+			{
+				/* This is a normal character */
+
+				acpi_os_printf ("%c", (int) string[i]);
+			}
+			else
+			{
+				/* All others will be Hex escapes */
+
+				acpi_os_printf ("\\x%2.2X", (s32) string[i]);
+			}
+			break;
+		}
+	}
+	acpi_os_printf ("\"");
+
+	if (i == max_length && string[i]) {
+		acpi_os_printf ("...");
+	}
+}
 
 
 /*******************************************************************************
diff -Nru a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
--- a/drivers/acpi/utilities/utobject.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/acpi/utilities/utobject.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utobject - ACPI object create/delete/size/cache routines
- *              $Revision: 76 $
+ *              $Revision: 77 $
  *
  *****************************************************************************/
 
@@ -87,7 +87,7 @@
 			return_PTR (NULL);
 		}
 
-		second_object->common.type = INTERNAL_TYPE_EXTRA;
+		second_object->common.type = ACPI_TYPE_LOCAL_EXTRA;
 		second_object->common.reference_count = 1;
 
 		/* Link the second object to the first */
@@ -352,7 +352,7 @@
 		break;
 
 
-	case INTERNAL_TYPE_REFERENCE:
+	case ACPI_TYPE_LOCAL_REFERENCE:
 
 		switch (internal_object->reference.opcode) {
 		case AML_INT_NAMEPATH_OP:
diff -Nru a/drivers/atm/Config.help b/drivers/atm/Config.help
--- a/drivers/atm/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,296 +0,0 @@
-CONFIG_ATM_TCP
-  ATM over TCP driver. Useful mainly for development and for
-  experiments. If unsure, say N.
-
-CONFIG_ATM_ENI
-  Driver for the Efficient Networks ENI155p series and SMC ATM
-  Power155 155 Mbps ATM adapters. Both, the versions with 512KB and
-  2MB on-board RAM (Efficient calls them "C" and "S", respectively),
-  and the FPGA and the ASIC Tonga versions of the board are supported.
-  The driver works with MMF (-MF or ...F) and UTP-5 (-U5 or ...D)
-  adapters.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called eni.o.
-
-CONFIG_ATM_ENI_DEBUG
-  Extended debugging records various events and displays that list
-  when an inconsistency is detected. This mechanism is faster than
-  generally using printks, but still has some impact on performance.
-  Note that extended debugging may create certain race conditions
-  itself. Enable this ONLY if you suspect problems with the driver.
-
-CONFIG_ATM_ENI_TUNE_BURST
-  In order to obtain good throughput, the ENI NIC can transfer
-  multiple words of data per PCI bus access cycle. Such a multi-word
-  transfer is called a burst.
-
-  The default settings for the burst sizes are suitable for most PCI
-  chipsets. However, in some cases, large bursts may overrun buffers
-  in the PCI chipset and cause data corruption. In such cases, large
-  bursts must be disabled and only (slower) small bursts can be used.
-  The burst sizes can be set independently in the send (TX) and
-  receive (RX) direction.
-
-  Note that enabling many different burst sizes in the same direction
-  may increase the cost of setting up a transfer such that the
-  resulting throughput is lower than when using only the largest
-  available burst size.
-
-  Also, sometimes larger bursts lead to lower throughput, e.g. on an
-  Intel 440FX board, a drop from 135 Mbps to 103 Mbps was observed
-  when going from 8W to 16W bursts.
-
-CONFIG_ATM_ENI_BURST_TX_16W
-  Burst sixteen words at once in the send direction. This may work
-  with recent PCI chipsets, but is known to fail with older chipsets.
-
-CONFIG_ATM_ENI_BURST_TX_8W
-  Burst eight words at once in the send direction. This is the default
-  setting.
-
-CONFIG_ATM_ENI_BURST_TX_4W
-  Burst four words at once in the send direction. You may want to try
-  this if you have disabled 8W bursts. Enabling 4W if 8W is also set
-  may or may not improve throughput.
-
-CONFIG_ATM_ENI_BURST_TX_2W
-  Burst two words at once in the send direction. You may want to try
-  this if you have disabled 4W and 8W bursts. Enabling 2W if 4W or 8W
-  are also set may or may not improve throughput.
-
-CONFIG_ATM_ENI_BURST_RX_16W
-  Burst sixteen words at once in the receive direction. This may work
-  with recent PCI chipsets, but is known to fail with older chipsets.
-
-CONFIG_ATM_ENI_BURST_RX_8W
-  Burst eight words at once in the receive direction. This may work
-  with recent PCI chipsets, but is known to fail with older chipsets,
-  such as the Intel Neptune series.
-
-CONFIG_ATM_ENI_BURST_RX_4W
-  Burst four words at once in the receive direction. This is the
-  default setting. Enabling 4W if 8W is also set may or may not
-  improve throughput.
-
-CONFIG_ATM_ENI_BURST_RX_2W
-  Burst two words at once in the receive direction. You may want to
-  try this if you have disabled 4W and 8W bursts. Enabling 2W if 4W or
-  8W are also set may or may not improve throughput.
-
-CONFIG_ATM_ZATM
-  Driver for the ZeitNet ZN1221 (MMF) and ZN1225 (UTP-5) 155 Mbps ATM
-  adapters.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called zatm.o.
-
-CONFIG_ATM_ZATM_DEBUG
-  Extended debugging records various events and displays that list
-  when an inconsistency is detected. This mechanism is faster than
-  generally using printks, but still has some impact on performance.
-  Note that extended debugging may create certain race conditions
-  itself. Enable this ONLY if you suspect problems with the driver.
-
-CONFIG_ATM_FIRESTREAM
-  Driver for the Fujitsu FireStream 155 (MB86697) and
-  FireStream 50 (MB86695) ATM PCI chips.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  firestream.o.
-
-CONFIG_ATM_ZATM_EXACT_TS
-  The uPD98401 SAR chip supports a high-resolution timer (approx. 30
-  MHz) that is used for very accurate reception timestamps. Because
-  that timer overflows after 140 seconds, and also to avoid timer
-  drift, time measurements need to be periodically synchronized with
-  the normal system time. Enabling this feature will add some general
-  overhead for timer synchronization and also per-packet overhead for
-  time conversion.
-
-CONFIG_ATM_NICSTAR
-  The NICStAR chipset family is used in a large number of ATM NICs for
-  25 and for 155 Mbps, including IDT cards and the Fore ForeRunnerLE
-  series. Say Y if you have one of those.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called
-  nicstar.o.
-
-CONFIG_ATM_NICSTAR_USE_SUNI
-  Support for the S-UNI and compatible PHYsical layer chips. These are
-  found in most 155Mbps NICStAR based ATM cards, namely in the
-  ForeRunner LE155 cards. This driver provides detection of cable~
-  removal and reinsertion and provides some statistics. This driver
-  doesn't have removal capability when compiled as a module, so if you
-  need that capability don't include S-UNI support (it's not needed to
-  make the card work).
-
-CONFIG_ATM_NICSTAR_USE_IDT77105
-  Support for the PHYsical layer chip in ForeRunner LE25 cards. In
-  addition to cable removal/reinsertion detection, this driver allows
-  you to control the loopback mode of the chip via a dedicated IOCTL.
-  This driver is required for proper handling of temporary carrier
-  loss, so if you have a 25Mbps NICStAR based ATM card you must say Y.
-
-CONFIG_ATM_IDT77252
-  Driver for the IDT 77252 ATM PCI chips.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called idt77252.o
-
-CONFIG_ATM_IDT77252_DEBUG
-  Somewhat useful debugging messages are available. The choice of
-  messages is controlled by a bitmap.  This may be specified as a
-  module argument.  See the file <file:drivers/atm/idt77252.h> for
-  the meanings of the bits in the mask.
-
-  When active, these messages can have a significant impact on the
-  speed of the driver, and the size of your syslog files! When
-  inactive, they will have only a modest impact on performance.
-
-CONFIG_ATM_IDT77252_RCV_ALL
-  Enable receiving of all cells on the ATM link, that do not match
-  an open connection in the raw cell queue of the driver.  Useful
-  for debugging or special applications only, so the safe answer is N.
-
-CONFIG_ATM_AMBASSADOR
-  This is a driver for ATMizer based ATM card produced by Madge
-  Networks Ltd. Say Y (or M to compile as a module named ambassador.o)
-  here if you have one of these cards.
-
-CONFIG_ATM_AMBASSADOR_DEBUG
-  Somewhat useful debugging messages are available. The choice of
-  messages is controlled by a bitmap.  This may be specified as a
-  module argument (kernel command line argument as well?), changed
-  dynamically using an ioctl (not yet) or changed by sending the
-  string "Dxxxx" to VCI 1023 (where x is a hex digit).  See the file
-  <file:drivers/atm/ambassador.h> for the meanings of the bits in the
-  mask.
-
-  When active, these messages can have a significant impact on the
-  speed of the driver, and the size of your syslog files! When
-  inactive, they will have only a modest impact on performance.
-
-CONFIG_ATM_HORIZON
-  This is a driver for the Horizon chipset ATM adapter cards once
-  produced by Madge Networks Ltd. Say Y (or M to compile as a module
-  named horizon.o) here if you have one of these cards.
-
-CONFIG_ATM_HORIZON_DEBUG
-  Somewhat useful debugging messages are available. The choice of
-  messages is controlled by a bitmap.  This may be specified as a
-  module argument (kernel command line argument as well?), changed
-  dynamically using an ioctl (not yet) or changed by sending the
-  string "Dxxxx" to VCI 1023 (where x is a hex digit).  See the file
-  <file:drivers/atm/horizon.h> for the meanings of the bits in the
-  mask.
-
-  When active, these messages can have a significant impact on the
-  speed of the driver, and the size of your syslog files! When
-  inactive, they will have only a modest impact on performance.
-
-CONFIG_ATM_IA
-  This is a driver for the Interphase (i)ChipSAR adapter cards
-  which include a variety of variants in term of the size of the
-  control memory (128K-1KVC, 512K-4KVC), the size of the packet
-  memory (128K, 512K, 1M), and the PHY type (Single/Multi mode OC3,
-  UTP155, UTP25, DS3 and E3). Go to:
-  	<http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM>
-  for more info about the cards. Say Y (or M to compile as a module
-  named iphase.o) here if you have one of these cards.
-
-  See the file <file:Documentation/networking/iphase.txt> for further
-  details.
-
-CONFIG_ATM_IA_DEBUG
-  Somewhat useful debugging messages are available. The choice of
-  messages is controlled by a bitmap. This may be specified as a
-  module argument (kernel command line argument as well?), changed
-  dynamically using an ioctl (Get the debug utility, iadbg, from
-  <ftp://ftp.iphase.com/pub/atm/pci/>).
-
-  See the file <file:drivers/atm/iphase.h> for the meanings of the
-  bits in the mask.
-
-  When active, these messages can have a significant impact on the
-  speed of the driver, and the size of your syslog files! When
-  inactive, they will have only a modest impact on performance.
-
-CONFIG_ATM_FORE200E_MAYBE
-  This is a driver for the FORE Systems 200E-series ATM adapter
-  cards. It simultaneously supports PCA-200E and SBA-200E models
-  on PCI and SBUS hosts. Say Y (or M to compile as a module
-  named fore_200e.o) here if you have one of these ATM adapters.
-
-  Note that the driver will actually be compiled only if you
-  additionally enable the support for PCA-200E and/or SBA-200E
-  cards.
-
-  See the file <file:Documentation/networking/fore200e.txt> for
-  further details.
-
-CONFIG_ATM_FORE200E_PCA
-  Say Y here if you want your PCA-200E cards to be probed.
-
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW
-  Use the default PCA-200E firmware data shipped with the driver.
-
-  Normal users do not have to deal with the firmware stuff, so
-  they should say Y here.
-
-CONFIG_ATM_FORE200E_PCA_FW
-  This defines the pathname of an alternative PCA-200E binary
-  firmware image supplied by the user. This pathname may be
-  absolute or relative to the drivers/atm directory.
-
-  The driver comes with an adequate firmware image, so normal users do
-  not have to supply an alternative one. They just say Y to "Use
-  default PCA-200E firmware" instead.
-
-CONFIG_ATM_FORE200E_SBA
-  Say Y here if you want your SBA-200E cards to be probed.
-
-CONFIG_ATM_FORE200E_SBA_DEFAULT_FW
-  Use the default SBA-200E firmware data shipped with the driver.
-
-  Normal users do not have to deal with the firmware stuff, so
-  they should say Y here.
-
-CONFIG_ATM_FORE200E_SBA_FW
-  This defines the pathname of an alternative SBA-200E binary
-  firmware image supplied by the user. This pathname may be
-  absolute or relative to the drivers/atm directory.
-
-  The driver comes with an adequate firmware image, so normal users do
-  not have to supply an alternative one. They just say Y to "Use
-  default SBA-200E firmware", above.
-
-CONFIG_ATM_FORE200E_TX_RETRY
-  Specifies the number of times the driver attempts to transmit
-  a message before giving up, if the transmit queue of the ATM card
-  is transiently saturated.
-
-  Saturation of the transmit queue may occur only under extreme
-  conditions, e.g. when a fast host continuously submits very small
-  frames (<64 bytes) or raw AAL0 cells (48 bytes) to the ATM adapter.
-
-  Note that under common conditions, it is unlikely that you encounter
-  a saturation of the transmit queue, so the retry mechanism never
-  comes into play.
-
-CONFIG_ATM_FORE200E_DEBUG
-  Specifies the level of debugging messages issued by the driver.
-  The verbosity of the driver increases with the value of this
-  parameter.
-
-  When active, these messages can have a significant impact on
-  the performances of the driver, and the size of your syslog files!
-  Keep the debugging level to 0 during normal operations.
-
diff -Nru a/drivers/atm/Config.in b/drivers/atm/Config.in
--- a/drivers/atm/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,95 +0,0 @@
-#
-# ATM device configuration
-#
-mainmenu_option next_comment
-comment 'ATM drivers'
-if [ "$CONFIG_INET" = "y" ]; then
-   tristate 'ATM over TCP' CONFIG_ATM_TCP
-fi
-if [ "$CONFIG_PCI" = "y" ]; then
-   tristate 'Efficient Networks Speedstream 3010' CONFIG_ATM_LANAI
-   tristate 'Efficient Networks ENI155P' CONFIG_ATM_ENI
-   if [ "$CONFIG_ATM_ENI" != "n" ]; then
-      bool '  Enable extended debugging' CONFIG_ATM_ENI_DEBUG
-      bool '  Fine-tune burst settings' CONFIG_ATM_ENI_TUNE_BURST
-      if [ "$CONFIG_ATM_ENI_TUNE_BURST" = "y" ]; then
-	 bool '    Enable 16W TX bursts (discouraged)' CONFIG_ATM_ENI_BURST_TX_16W
-	 bool '    Enable 8W TX bursts (recommended)' CONFIG_ATM_ENI_BURST_TX_8W
-	 bool '    Enable 4W TX bursts (optional)' CONFIG_ATM_ENI_BURST_TX_4W
-	 bool '    Enable 2W TX bursts (optional)' CONFIG_ATM_ENI_BURST_TX_2W
-	 bool '    Enable 16W RX bursts (discouraged)' CONFIG_ATM_ENI_BURST_RX_16W
-	 bool '    Enable 8W RX bursts (discouraged)' CONFIG_ATM_ENI_BURST_RX_8W
-	 bool '    Enable 4W RX bursts (recommended)' CONFIG_ATM_ENI_BURST_RX_4W
-	 bool '    Enable 2W RX bursts (optional)' CONFIG_ATM_ENI_BURST_RX_2W
-      fi
-   fi
-   tristate 'Fujitsu FireStream (FS50/FS155) ' CONFIG_ATM_FIRESTREAM
-   tristate 'ZeitNet ZN1221/ZN1225' CONFIG_ATM_ZATM
-   if [ "$CONFIG_ATM_ZATM" != "n" ]; then
-      bool '  Enable extended debugging' CONFIG_ATM_ZATM_DEBUG
-      if [ "$CONFIG_X86" = "y" ]; then
-	bool '  Enable usec resolution timestamps' CONFIG_ATM_ZATM_EXACT_TS
-      fi
-   fi
-#   bool 'Rolfs TI TNETA1570' CONFIG_ATM_TNETA1570 y
-#   if [ "$CONFIG_ATM_TNETA1570" = "y" ]; then
-#      bool '  Enable extended debugging' CONFIG_ATM_TNETA1570_DEBUG n
-#   fi
-   tristate 'IDT 77201 (NICStAR) (ForeRunnerLE)' CONFIG_ATM_NICSTAR
-   if [ "$CONFIG_ATM_NICSTAR" != "n" ]; then
-      bool '  Use suni PHY driver (155Mbps)' CONFIG_ATM_NICSTAR_USE_SUNI
-      bool '  Use IDT77015 PHY driver (25Mbps)' CONFIG_ATM_NICSTAR_USE_IDT77105
-   fi
-   tristate 'IDT 77252 (NICStAR II)' CONFIG_ATM_IDT77252
-   if [ "$CONFIG_ATM_IDT77252" != "n" ]; then
-      bool '  Enable debugging messages' CONFIG_ATM_IDT77252_DEBUG
-      bool '  Receive ALL cells in raw queue' CONFIG_ATM_IDT77252_RCV_ALL
-      define_bool CONFIG_ATM_IDT77252_USE_SUNI y
-   fi
-   tristate 'Madge Ambassador (Collage PCI 155 Server)' CONFIG_ATM_AMBASSADOR
-   if [ "$CONFIG_ATM_AMBASSADOR" != "n" ]; then
-      bool '  Enable debugging messages' CONFIG_ATM_AMBASSADOR_DEBUG
-   fi
-   tristate 'Madge Horizon [Ultra] (Collage PCI 25 and Collage PCI 155 Client)' CONFIG_ATM_HORIZON
-   if [ "$CONFIG_ATM_HORIZON" != "n" ]; then
-      bool '  Enable debugging messages' CONFIG_ATM_HORIZON_DEBUG
-   fi
-    tristate 'Interphase ATM PCI x575/x525/x531' CONFIG_ATM_IA
-    if [ "$CONFIG_ATM_IA" != "n" ]; then
-      bool '  Enable debugging messages' CONFIG_ATM_IA_DEBUG
-    fi
-fi
-if [ "$CONFIG_PCI" = "y" -o "$CONFIG_SBUS" = "y" ]; then
-  tristate 'FORE Systems 200E-series' CONFIG_ATM_FORE200E_MAYBE
-  if [ "$CONFIG_ATM_FORE200E_MAYBE" != "n" ]; then
-    if [ "$CONFIG_PCI" = "y" ]; then
-      bool '  PCA-200E support' CONFIG_ATM_FORE200E_PCA
-      if [ "$CONFIG_ATM_FORE200E_PCA" = "y" ]; then
-	bool '   Use default PCA-200E firmware (normally enabled)' CONFIG_ATM_FORE200E_PCA_DEFAULT_FW
-        if [ "$CONFIG_ATM_FORE200E_PCA_DEFAULT_FW" = "n" ]; then
-          string '   Pathname of user-supplied binary firmware' CONFIG_ATM_FORE200E_PCA_FW ""
-        fi
-      fi
-    fi
-    if [ "$CONFIG_SBUS" = "y" ]; then
-      bool '  SBA-200E support' CONFIG_ATM_FORE200E_SBA
-      if [ "$CONFIG_ATM_FORE200E_SBA" = "y" ]; then
-        bool '   Use default SBA-200E firmware (normally enabled)' CONFIG_ATM_FORE200E_SBA_DEFAULT_FW
-        if [ "$CONFIG_ATM_FORE200E_SBA_DEFAULT_FW" = "n" ]; then
-          string '   Pathname of user-supplied binary firmware' CONFIG_ATM_FORE200E_SBA_FW ""
-        fi
-      fi
-    fi
-  fi
-  if [ "$CONFIG_ATM_FORE200E_PCA" = "y" -o "$CONFIG_ATM_FORE200E_SBA" = "y" ]; \
-    then
-    int  '  Maximum number of tx retries' CONFIG_ATM_FORE200E_TX_RETRY 16
-    int  '  Debugging level (0-3)' CONFIG_ATM_FORE200E_DEBUG 0
-    if [ "$CONFIG_ATM_FORE200E_MAYBE" = "y" ]; then
-      define_tristate CONFIG_ATM_FORE200E y
-    else
-      define_tristate CONFIG_ATM_FORE200E m
-    fi
-  fi
-fi
-endmenu
diff -Nru a/drivers/atm/Kconfig b/drivers/atm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/atm/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,439 @@
+#
+# ATM device configuration
+#
+
+menu "ATM drivers"
+	depends on NETDEVICES && ATM
+
+config ATM_TCP
+	tristate "ATM over TCP"
+	depends on INET
+	help
+	  ATM over TCP driver. Useful mainly for development and for
+	  experiments. If unsure, say N.
+
+config ATM_LANAI
+	tristate "Efficient Networks Speedstream 3010"
+	depends on PCI
+
+config ATM_ENI
+	tristate "Efficient Networks ENI155P"
+	depends on PCI
+	---help---
+	  Driver for the Efficient Networks ENI155p series and SMC ATM
+	  Power155 155 Mbps ATM adapters. Both, the versions with 512KB and
+	  2MB on-board RAM (Efficient calls them "C" and "S", respectively),
+	  and the FPGA and the ASIC Tonga versions of the board are supported.
+	  The driver works with MMF (-MF or ...F) and UTP-5 (-U5 or ...D)
+	  adapters.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called eni.o.
+
+config ATM_ENI_DEBUG
+	bool "Enable extended debugging"
+	depends on ATM_ENI
+	help
+	  Extended debugging records various events and displays that list
+	  when an inconsistency is detected. This mechanism is faster than
+	  generally using printks, but still has some impact on performance.
+	  Note that extended debugging may create certain race conditions
+	  itself. Enable this ONLY if you suspect problems with the driver.
+
+config ATM_ENI_TUNE_BURST
+	bool "Fine-tune burst settings"
+	depends on ATM_ENI
+	---help---
+	  In order to obtain good throughput, the ENI NIC can transfer
+	  multiple words of data per PCI bus access cycle. Such a multi-word
+	  transfer is called a burst.
+
+	  The default settings for the burst sizes are suitable for most PCI
+	  chipsets. However, in some cases, large bursts may overrun buffers
+	  in the PCI chipset and cause data corruption. In such cases, large
+	  bursts must be disabled and only (slower) small bursts can be used.
+	  The burst sizes can be set independently in the send (TX) and
+	  receive (RX) direction.
+
+	  Note that enabling many different burst sizes in the same direction
+	  may increase the cost of setting up a transfer such that the
+	  resulting throughput is lower than when using only the largest
+	  available burst size.
+
+	  Also, sometimes larger bursts lead to lower throughput, e.g. on an
+	  Intel 440FX board, a drop from 135 Mbps to 103 Mbps was observed
+	  when going from 8W to 16W bursts.
+
+config ATM_ENI_BURST_TX_16W
+	bool "Enable 16W TX bursts (discouraged)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst sixteen words at once in the send direction. This may work
+	  with recent PCI chipsets, but is known to fail with older chipsets.
+
+config ATM_ENI_BURST_TX_8W
+	bool "Enable 8W TX bursts (recommended)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst eight words at once in the send direction. This is the default
+	  setting.
+
+config ATM_ENI_BURST_TX_4W
+	bool "Enable 4W TX bursts (optional)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst four words at once in the send direction. You may want to try
+	  this if you have disabled 8W bursts. Enabling 4W if 8W is also set
+	  may or may not improve throughput.
+
+config ATM_ENI_BURST_TX_2W
+	bool "Enable 2W TX bursts (optional)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst two words at once in the send direction. You may want to try
+	  this if you have disabled 4W and 8W bursts. Enabling 2W if 4W or 8W
+	  are also set may or may not improve throughput.
+
+config ATM_ENI_BURST_RX_16W
+	bool "Enable 16W RX bursts (discouraged)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst sixteen words at once in the receive direction. This may work
+	  with recent PCI chipsets, but is known to fail with older chipsets.
+
+config ATM_ENI_BURST_RX_8W
+	bool "Enable 8W RX bursts (discouraged)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst eight words at once in the receive direction. This may work
+	  with recent PCI chipsets, but is known to fail with older chipsets,
+	  such as the Intel Neptune series.
+
+config ATM_ENI_BURST_RX_4W
+	bool "Enable 4W RX bursts (recommended)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst four words at once in the receive direction. This is the
+	  default setting. Enabling 4W if 8W is also set may or may not
+	  improve throughput.
+
+config ATM_ENI_BURST_RX_2W
+	bool "Enable 2W RX bursts (optional)"
+	depends on ATM_ENI_TUNE_BURST
+	help
+	  Burst two words at once in the receive direction. You may want to
+	  try this if you have disabled 4W and 8W bursts. Enabling 2W if 4W or
+	  8W are also set may or may not improve throughput.
+
+config ATM_FIRESTREAM
+	tristate "Fujitsu FireStream (FS50/FS155) "
+	depends on PCI
+	help
+	  Driver for the Fujitsu FireStream 155 (MB86697) and
+	  FireStream 50 (MB86695) ATM PCI chips.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  firestream.o.
+
+config ATM_ZATM
+	tristate "ZeitNet ZN1221/ZN1225"
+	depends on PCI
+	help
+	  Driver for the ZeitNet ZN1221 (MMF) and ZN1225 (UTP-5) 155 Mbps ATM
+	  adapters.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called zatm.o.
+
+config ATM_ZATM_DEBUG
+	bool "Enable extended debugging"
+	depends on ATM_ZATM
+	help
+	  Extended debugging records various events and displays that list
+	  when an inconsistency is detected. This mechanism is faster than
+	  generally using printks, but still has some impact on performance.
+	  Note that extended debugging may create certain race conditions
+	  itself. Enable this ONLY if you suspect problems with the driver.
+
+config ATM_ZATM_EXACT_TS
+	bool "Enable usec resolution timestamps"
+	depends on ATM_ZATM && X86
+	help
+	  The uPD98401 SAR chip supports a high-resolution timer (approx. 30
+	  MHz) that is used for very accurate reception timestamps. Because
+	  that timer overflows after 140 seconds, and also to avoid timer
+	  drift, time measurements need to be periodically synchronized with
+	  the normal system time. Enabling this feature will add some general
+	  overhead for timer synchronization and also per-packet overhead for
+	  time conversion.
+
+#   bool 'Rolfs TI TNETA1570' CONFIG_ATM_TNETA1570 y
+#   if [ "$CONFIG_ATM_TNETA1570" = "y" ]; then
+#      bool '  Enable extended debugging' CONFIG_ATM_TNETA1570_DEBUG n
+#   fi
+config ATM_NICSTAR
+	tristate "IDT 77201 (NICStAR) (ForeRunnerLE)"
+	depends on PCI
+	help
+	  The NICStAR chipset family is used in a large number of ATM NICs for
+	  25 and for 155 Mbps, including IDT cards and the Fore ForeRunnerLE
+	  series. Say Y if you have one of those.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called
+	  nicstar.o.
+
+config ATM_NICSTAR_USE_SUNI
+	bool "Use suni PHY driver (155Mbps)"
+	depends on ATM_NICSTAR
+	help
+	  Support for the S-UNI and compatible PHYsical layer chips. These are
+	  found in most 155Mbps NICStAR based ATM cards, namely in the
+	  ForeRunner LE155 cards. This driver provides detection of cable~
+	  removal and reinsertion and provides some statistics. This driver
+	  doesn't have removal capability when compiled as a module, so if you
+	  need that capability don't include S-UNI support (it's not needed to
+	  make the card work).
+
+config ATM_NICSTAR_USE_IDT77105
+	bool "Use IDT77015 PHY driver (25Mbps)"
+	depends on ATM_NICSTAR
+	help
+	  Support for the PHYsical layer chip in ForeRunner LE25 cards. In
+	  addition to cable removal/reinsertion detection, this driver allows
+	  you to control the loopback mode of the chip via a dedicated IOCTL.
+	  This driver is required for proper handling of temporary carrier
+	  loss, so if you have a 25Mbps NICStAR based ATM card you must say Y.
+
+config ATM_IDT77252
+	tristate "IDT 77252 (NICStAR II)"
+	depends on PCI
+	help
+	  Driver for the IDT 77252 ATM PCI chips.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called idt77252.o
+
+config ATM_IDT77252_DEBUG
+	bool "Enable debugging messages"
+	depends on ATM_IDT77252
+	help
+	  Somewhat useful debugging messages are available. The choice of
+	  messages is controlled by a bitmap.  This may be specified as a
+	  module argument.  See the file <file:drivers/atm/idt77252.h> for
+	  the meanings of the bits in the mask.
+
+	  When active, these messages can have a significant impact on the
+	  speed of the driver, and the size of your syslog files! When
+	  inactive, they will have only a modest impact on performance.
+
+config ATM_IDT77252_RCV_ALL
+	bool "Receive ALL cells in raw queue"
+	depends on ATM_IDT77252
+	help
+	  Enable receiving of all cells on the ATM link, that do not match
+	  an open connection in the raw cell queue of the driver.  Useful
+	  for debugging or special applications only, so the safe answer is N.
+
+config ATM_IDT77252_USE_SUNI
+	bool
+	depends on ATM_IDT77252
+	default y
+
+config ATM_AMBASSADOR
+	tristate "Madge Ambassador (Collage PCI 155 Server)"
+	depends on PCI
+	help
+	  This is a driver for ATMizer based ATM card produced by Madge
+	  Networks Ltd. Say Y (or M to compile as a module named ambassador.o)
+	  here if you have one of these cards.
+
+config ATM_AMBASSADOR_DEBUG
+	bool "Enable debugging messages"
+	depends on ATM_AMBASSADOR
+	---help---
+	  Somewhat useful debugging messages are available. The choice of
+	  messages is controlled by a bitmap.  This may be specified as a
+	  module argument (kernel command line argument as well?), changed
+	  dynamically using an ioctl (not yet) or changed by sending the
+	  string "Dxxxx" to VCI 1023 (where x is a hex digit).  See the file
+	  <file:drivers/atm/ambassador.h> for the meanings of the bits in the
+	  mask.
+
+	  When active, these messages can have a significant impact on the
+	  speed of the driver, and the size of your syslog files! When
+	  inactive, they will have only a modest impact on performance.
+
+config ATM_HORIZON
+	tristate "Madge Horizon [Ultra] (Collage PCI 25 and Collage PCI 155 Client)"
+	depends on PCI
+	help
+	  This is a driver for the Horizon chipset ATM adapter cards once
+	  produced by Madge Networks Ltd. Say Y (or M to compile as a module
+	  named horizon.o) here if you have one of these cards.
+
+config ATM_HORIZON_DEBUG
+	bool "Enable debugging messages"
+	depends on ATM_HORIZON
+	---help---
+	  Somewhat useful debugging messages are available. The choice of
+	  messages is controlled by a bitmap.  This may be specified as a
+	  module argument (kernel command line argument as well?), changed
+	  dynamically using an ioctl (not yet) or changed by sending the
+	  string "Dxxxx" to VCI 1023 (where x is a hex digit).  See the file
+	  <file:drivers/atm/horizon.h> for the meanings of the bits in the
+	  mask.
+
+	  When active, these messages can have a significant impact on the
+	  speed of the driver, and the size of your syslog files! When
+	  inactive, they will have only a modest impact on performance.
+
+config ATM_IA
+	tristate "Interphase ATM PCI x575/x525/x531"
+	depends on PCI
+	---help---
+	  This is a driver for the Interphase (i)ChipSAR adapter cards
+	  which include a variety of variants in term of the size of the
+	  control memory (128K-1KVC, 512K-4KVC), the size of the packet
+	  memory (128K, 512K, 1M), and the PHY type (Single/Multi mode OC3,
+	  UTP155, UTP25, DS3 and E3). Go to:
+	  	<http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM>
+	  for more info about the cards. Say Y (or M to compile as a module
+	  named iphase.o) here if you have one of these cards.
+
+	  See the file <file:Documentation/networking/iphase.txt> for further
+	  details.
+
+config ATM_IA_DEBUG
+	bool "Enable debugging messages"
+	depends on ATM_IA
+	---help---
+	  Somewhat useful debugging messages are available. The choice of
+	  messages is controlled by a bitmap. This may be specified as a
+	  module argument (kernel command line argument as well?), changed
+	  dynamically using an ioctl (Get the debug utility, iadbg, from
+	  <ftp://ftp.iphase.com/pub/atm/pci/>).
+
+	  See the file <file:drivers/atm/iphase.h> for the meanings of the
+	  bits in the mask.
+
+	  When active, these messages can have a significant impact on the
+	  speed of the driver, and the size of your syslog files! When
+	  inactive, they will have only a modest impact on performance.
+
+config ATM_FORE200E_MAYBE
+	tristate "FORE Systems 200E-series"
+	depends on PCI || SBUS
+	---help---
+	  This is a driver for the FORE Systems 200E-series ATM adapter
+	  cards. It simultaneously supports PCA-200E and SBA-200E models
+	  on PCI and SBUS hosts. Say Y (or M to compile as a module
+	  named fore_200e.o) here if you have one of these ATM adapters.
+
+	  Note that the driver will actually be compiled only if you
+	  additionally enable the support for PCA-200E and/or SBA-200E
+	  cards.
+
+	  See the file <file:Documentation/networking/fore200e.txt> for
+	  further details.
+
+config ATM_FORE200E_PCA
+	bool "PCA-200E support"
+	depends on ATM_FORE200E_MAYBE && PCI
+	help
+	  Say Y here if you want your PCA-200E cards to be probed.
+
+config ATM_FORE200E_PCA_DEFAULT_FW
+	bool "Use default PCA-200E firmware (normally enabled)"
+	depends on ATM_FORE200E_PCA
+	help
+	  Use the default PCA-200E firmware data shipped with the driver.
+
+	  Normal users do not have to deal with the firmware stuff, so
+	  they should say Y here.
+
+config ATM_FORE200E_PCA_FW
+	string "Pathname of user-supplied binary firmware"
+	depends on ATM_FORE200E_PCA && !ATM_FORE200E_PCA_DEFAULT_FW
+	default ""
+	help
+	  This defines the pathname of an alternative PCA-200E binary
+	  firmware image supplied by the user. This pathname may be
+	  absolute or relative to the drivers/atm directory.
+
+	  The driver comes with an adequate firmware image, so normal users do
+	  not have to supply an alternative one. They just say Y to "Use
+	  default PCA-200E firmware" instead.
+
+config ATM_FORE200E_SBA
+	bool "SBA-200E support"
+	depends on ATM_FORE200E_MAYBE && SBUS
+	help
+	  Say Y here if you want your SBA-200E cards to be probed.
+
+config ATM_FORE200E_SBA_DEFAULT_FW
+	bool "Use default SBA-200E firmware (normally enabled)"
+	depends on ATM_FORE200E_SBA
+	help
+	  Use the default SBA-200E firmware data shipped with the driver.
+
+	  Normal users do not have to deal with the firmware stuff, so
+	  they should say Y here.
+
+config ATM_FORE200E_SBA_FW
+	string "Pathname of user-supplied binary firmware"
+	depends on ATM_FORE200E_SBA && !ATM_FORE200E_SBA_DEFAULT_FW
+	default ""
+	help
+	  This defines the pathname of an alternative SBA-200E binary
+	  firmware image supplied by the user. This pathname may be
+	  absolute or relative to the drivers/atm directory.
+
+	  The driver comes with an adequate firmware image, so normal users do
+	  not have to supply an alternative one. They just say Y to "Use
+	  default SBA-200E firmware", above.
+
+config ATM_FORE200E_TX_RETRY
+	int "Maximum number of tx retries"
+	depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
+	default "16"
+	---help---
+	  Specifies the number of times the driver attempts to transmit
+	  a message before giving up, if the transmit queue of the ATM card
+	  is transiently saturated.
+
+	  Saturation of the transmit queue may occur only under extreme
+	  conditions, e.g. when a fast host continuously submits very small
+	  frames (<64 bytes) or raw AAL0 cells (48 bytes) to the ATM adapter.
+
+	  Note that under common conditions, it is unlikely that you encounter
+	  a saturation of the transmit queue, so the retry mechanism never
+	  comes into play.
+
+config ATM_FORE200E_DEBUG
+	int "Debugging level (0-3)"
+	depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
+	default "0"
+	help
+	  Specifies the level of debugging messages issued by the driver.
+	  The verbosity of the driver increases with the value of this
+	  parameter.
+
+	  When active, these messages can have a significant impact on
+	  the performances of the driver, and the size of your syslog files!
+	  Keep the debugging level to 0 during normal operations.
+
+config ATM_FORE200E
+	tristate
+	depends on (PCI || SBUS) && (ATM_FORE200E_PCA || ATM_FORE200E_SBA)
+	default m if ATM_FORE200E_MAYBE!=y
+	default y if ATM_FORE200E_MAYBE=y
+
+endmenu
+
diff -Nru a/drivers/atm/Makefile b/drivers/atm/Makefile
--- a/drivers/atm/Makefile	Wed Oct 30 16:44:19 2002
+++ b/drivers/atm/Makefile	Wed Oct 30 16:44:19 2002
@@ -40,7 +40,7 @@
   fore_200e-objs		+= fore200e_pca_fw.o
   # guess the target endianess to choose the right PCA-200E firmware image
   ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
-    CONFIG_ATM_FORE200E_PCA_FW = $(shell if test -n "`$(CC) -E -dM $(src)/../../include/asm/byteorder.h | grep ' __LITTLE_ENDIAN '`"; then echo pca200e.bin; else echo pca200e_ecd.bin2; fi)
+    CONFIG_ATM_FORE200E_PCA_FW = $(shell if test -n "`$(CC) -E -dM $(src)/../../include/asm/byteorder.h | grep ' __LITTLE_ENDIAN '`"; then echo $(obj)/pca200e.bin; else echo $(obj)/pca200e_ecd.bin2; fi)
   endif
 endif
 
diff -Nru a/drivers/atm/firestream.c b/drivers/atm/firestream.c
--- a/drivers/atm/firestream.c	Wed Oct 30 16:44:23 2002
+++ b/drivers/atm/firestream.c	Wed Oct 30 16:44:23 2002
@@ -760,6 +760,7 @@
 		default:
 			/* Here we get the tx purge inhibit command ... */
 			/* Action, I believe, is "don't do anything". -- REW */
+			;
 		}
     
 		write_fs (dev, Q_RP(q->offset), Q_INCWRAP);
diff -Nru a/drivers/atm/iphase.c b/drivers/atm/iphase.c
--- a/drivers/atm/iphase.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/atm/iphase.c	Wed Oct 30 16:44:34 2002
@@ -118,7 +118,7 @@
 }
 
 static int ia_enque_rtn_q (IARTN_Q *que, struct desc_tbl_t data) {
-   IARTN_Q *entry = kmalloc(sizeof(*entry), GFP_KERNEL);
+   IARTN_Q *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
    if (!entry) return -1;
    entry->data = data;
    entry->next = NULL;
@@ -202,8 +202,7 @@
         ltimeout = dev->desc_tbl[i].iavcc->ltimeout; 
         delta = jiffies - dev->desc_tbl[i].timestamp;
         if (delta >= ltimeout) {
-           IF_ABR(printk("RECOVER run!! desc_tbl %d = %d  delta = %ld, 
-               time = %ld\n", i,dev->desc_tbl[i].timestamp, delta, jiffies);)
+           IF_ABR(printk("RECOVER run!! desc_tbl %d = %d  delta = %ld, time = %ld\n", i,dev->desc_tbl[i].timestamp, delta, jiffies);)
            if (dev->ffL.tcq_rd == dev->ffL.tcq_st) 
               dev->ffL.tcq_rd =  dev->ffL.tcq_ed;
            else 
@@ -624,6 +623,7 @@
    struct ia_vcc *iavcc;
    static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb);
    num_desc = ia_avail_descs(iadev);
+
    while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) {
       if (!(vcc = ATM_SKB(skb)->vcc)) {
          dev_kfree_skb_any(skb);
@@ -643,6 +643,7 @@
    }
    return 0;
 }
+
 void ia_tx_poll (IADEV *iadev) {
    struct atm_vcc *vcc = NULL;
    struct sk_buff *skb = NULL, *skb1 = NULL;
@@ -1086,6 +1087,7 @@
 	int len;  
 	struct sk_buff *skb;  
 	u_int buf_addr, dma_addr;  
+
 	iadev = INPH_IA_DEV(dev);  
 	if (iadev->rfL.pcq_rd == (readw(iadev->reass_reg+PCQ_WR_PTR)&0xffff)) 
 	{  
@@ -1171,7 +1173,8 @@
 
 	/* Build the DLE structure */  
 	wr_ptr = iadev->rx_dle_q.write;  
-	wr_ptr->sys_pkt_addr = virt_to_bus(skb->data);	  
+	wr_ptr->sys_pkt_addr = pci_map_single(iadev->pci, skb->data,
+		len, PCI_DMA_FROMDEVICE);
 	wr_ptr->local_pkt_addr = buf_addr;  
 	wr_ptr->bytes = len;	/* We don't know this do we ?? */  
 	wr_ptr->mode = DMA_INT_ENABLE;  
@@ -1290,6 +1293,9 @@
           struct cpcs_trailer *trailer;
           u_short length;
           struct ia_vcc *ia_vcc;
+
+	  pci_unmap_single(iadev->pci, iadev->rx_dle_q.write->sys_pkt_addr,
+	  	len, PCI_DMA_FROMDEVICE);
           /* no VCC related housekeeping done as yet. lets see */  
           vcc = ATM_SKB(skb)->vcc;
 	  if (!vcc) {
@@ -1401,7 +1407,7 @@
 	IADEV *iadev;  
 	struct rx_buf_desc *buf_desc_ptr;  
 	unsigned long rx_pkt_start = 0;  
-	u32 *odle_addr, *dle_addr;  
+	void *dle_addr;  
 	struct abr_vc_table  *abr_vc_table; 
 	u16 *vc_table;  
 	u16 *reass_table;  
@@ -1412,25 +1418,14 @@
   
 	iadev = INPH_IA_DEV(dev);  
   //    spin_lock_init(&iadev->rx_lock); 
-	/* I need to initialize the DLEs somewhere. Lets see what I   
-		need to do for this, hmmm...  
-		- allocate memory for 256 DLEs. make sure that it starts  
-		on a 4k byte address boundary. Program the start address   
-		in Receive List address register.  ..... to do for TX also  
-	   To make sure that it is a 4k byte boundary - allocate 8k and find   
-		4k byte boundary within.  
-		( (addr + (4k-1)) & ~(4k-1) )  
-	*/   
   
-	/* allocate 8k bytes */  
-	odle_addr = kmalloc(2*sizeof(struct dle)*DLE_ENTRIES, GFP_KERNEL);  
-	if (!odle_addr)  
-	{  
-		printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");  
-		return -ENOMEM;
-	}  
-	/* find 4k byte boundary within the 8k allocated */  
-	dle_addr = (u32*)( ((u32)odle_addr+(4096-1)) & ~(4096-1) );  
+	/* Allocate 4k bytes - more aligned than needed (4k boundary) */
+	dle_addr = pci_alloc_consistent(iadev->pci, DLE_TOTAL_SIZE,
+					&iadev->rx_dle_dma);  
+	if (!dle_addr)  {  
+		printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
+		goto err_out;
+	}
 	iadev->rx_dle_q.start = (struct dle*)dle_addr;  
 	iadev->rx_dle_q.read = iadev->rx_dle_q.start;  
 	iadev->rx_dle_q.write = iadev->rx_dle_q.start;  
@@ -1439,7 +1434,8 @@
 	DLE that can be used. */  
   
 	/* write the upper 20 bits of the start address to rx list address register */  
-	writel(virt_to_bus(dle_addr) & 0xfffff000, iadev->dma+IPHASE5575_RX_LIST_ADDR);  
+	writel(iadev->rx_dle_dma & 0xfffff000,
+	       iadev->dma + IPHASE5575_RX_LIST_ADDR);  
 	IF_INIT(printk("Tx Dle list addr: 0x%08x value: 0x%0x\n", 
                       (u32)(iadev->dma+IPHASE5575_TX_LIST_ADDR), 
                       *(u32*)(iadev->dma+IPHASE5575_TX_LIST_ADDR));  
@@ -1613,8 +1609,7 @@
 	{  
 		printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
 		dev->number);  
-		kfree(odle_addr);
-		return -ENOMEM;  
+		goto err_free_dle;
 	}  
 	memset(iadev->rx_open, 0, 4*iadev->num_vc);  
         iadev->rxing = 1;
@@ -1622,6 +1617,12 @@
 	/* Mode Register */  
 	writew(R_ONLINE, iadev->reass_reg+MODE_REG);  
 	return 0;  
+
+err_free_dle:
+	pci_free_consistent(iadev->pci, DLE_TOTAL_SIZE, iadev->rx_dle_q.start,
+			    iadev->rx_dle_dma);  
+err_out:
+	return -ENOMEM;
 }  
   
 
@@ -1686,6 +1687,12 @@
             /* free the DMAed skb */ 
             skb = skb_dequeue(&iadev->tx_dma_q); 
             if (!skb) break;
+
+	    /* Revenge of the 2 dle (skb + trailer) used in ia_pkt_tx() */
+	    if (!((dle - iadev->tx_dle_q.start)%(2*sizeof(struct dle)))) {
+		pci_unmap_single(iadev->pci, dle->sys_pkt_addr, skb->len,
+				 PCI_DMA_TODEVICE);
+	    }
             vcc = ATM_SKB(skb)->vcc;
             if (!vcc) {
                   printk("tx_dle_intr: vcc is null\n");
@@ -1878,7 +1885,7 @@
 	IADEV *iadev;  
 	struct tx_buf_desc *buf_desc_ptr;
 	unsigned int tx_pkt_start;  
-	u32 *dle_addr;  
+	void *dle_addr;  
 	int i;  
 	u_short tcq_st_adr;  
 	u_short *tcq_start;  
@@ -1894,24 +1901,22 @@
  
 	IF_INIT(printk("Tx MASK REG: 0x%0x\n", 
                                 readw(iadev->seg_reg+SEG_MASK_REG));)  
-	/*---------- Initializing Transmit DLEs ----------*/  
-	/* allocating 8k memory for transmit DLEs */  
-	dle_addr = kmalloc(2*sizeof(struct dle)*DLE_ENTRIES, GFP_KERNEL);  
-	if (!dle_addr)  
-	{  
-		printk(KERN_ERR DEV_LABEL "can't allocate TX DLEs\n");  
-		return -ENOMEM;
-	}  
-  
-	/* find 4k byte boundary within the 8k allocated */  
-	dle_addr = (u32*)(((u32)dle_addr+(4096-1)) & ~(4096-1));  
+
+	/* Allocate 4k (boundary aligned) bytes */
+	dle_addr = pci_alloc_consistent(iadev->pci, DLE_TOTAL_SIZE,
+					&iadev->tx_dle_dma);  
+	if (!dle_addr)  {
+		printk(KERN_ERR DEV_LABEL "can't allocate DLEs\n");
+		goto err_out;
+	}
 	iadev->tx_dle_q.start = (struct dle*)dle_addr;  
 	iadev->tx_dle_q.read = iadev->tx_dle_q.start;  
 	iadev->tx_dle_q.write = iadev->tx_dle_q.start;  
 	iadev->tx_dle_q.end = (struct dle*)((u32)dle_addr+sizeof(struct dle)*DLE_ENTRIES);  
 
 	/* write the upper 20 bits of the start address to tx list address register */  
-	writel(virt_to_bus(dle_addr) & 0xfffff000, iadev->dma+IPHASE5575_TX_LIST_ADDR);  
+	writel(iadev->tx_dle_dma & 0xfffff000,
+	       iadev->dma + IPHASE5575_TX_LIST_ADDR);  
 	writew(0xffff, iadev->seg_reg+SEG_MASK_REG);  
 	writew(0, iadev->seg_reg+MODE_REG_0);  
 	writew(RESET_SEG, iadev->seg_reg+SEG_COMMAND_REG);  
@@ -1955,26 +1960,29 @@
 		buf_desc_ptr++;		  
 		tx_pkt_start += iadev->tx_buf_sz;  
 	}  
-        iadev->tx_buf = kmalloc(iadev->num_tx_desc*sizeof(caddr_t), GFP_KERNEL);
+        iadev->tx_buf = kmalloc(iadev->num_tx_desc*sizeof(struct cpcs_trailer_desc), GFP_KERNEL);
         if (!iadev->tx_buf) {
             printk(KERN_ERR DEV_LABEL " couldn't get mem\n");
-            return -EAGAIN;
+	    goto err_free_dle;
         }
        	for (i= 0; i< iadev->num_tx_desc; i++)
        	{
+	    struct cpcs_trailer *cpcs;
  
-       	    iadev->tx_buf[i] = kmalloc(sizeof(struct cpcs_trailer),
-                                                           GFP_KERNEL|GFP_DMA);
-            if(!iadev->tx_buf[i]) {                
+       	    cpcs = kmalloc(sizeof(*cpcs), GFP_KERNEL|GFP_DMA);
+            if(!cpcs) {                
 		printk(KERN_ERR DEV_LABEL " couldn't get freepage\n"); 
-         	return -EAGAIN;
+		goto err_free_tx_bufs;
             }
+	    iadev->tx_buf[i].cpcs = cpcs;
+	    iadev->tx_buf[i].dma_addr = pci_map_single(iadev->pci,
+		cpcs, sizeof(*cpcs), PCI_DMA_TODEVICE);
         }
         iadev->desc_tbl = kmalloc(iadev->num_tx_desc *
                                    sizeof(struct desc_tbl_t), GFP_KERNEL);
 	if (!iadev->desc_tbl) {
 		printk(KERN_ERR DEV_LABEL " couldn't get mem\n");
-		return -EAGAIN;
+		goto err_free_all_tx_bufs;
 	}
   
 	/* Communication Queues base address */  
@@ -2103,7 +2111,7 @@
         iadev->testTable = kmalloc(sizeof(long)*iadev->num_vc, GFP_KERNEL); 
         if (!iadev->testTable) {
            printk("Get freepage  failed\n");
-           return -EAGAIN; 
+	   goto err_free_desc_tbl;
         }
 	for(i=0; i<iadev->num_vc; i++)  
 	{  
@@ -2112,7 +2120,7 @@
                 iadev->testTable[i] = kmalloc(sizeof(struct testTable_t),
 						GFP_KERNEL);
 		if (!iadev->testTable[i])
-			return -ENOMEM;
+			goto err_free_test_tables;
               	iadev->testTable[i]->lastTime = 0;
  		iadev->testTable[i]->fract = 0;
                 iadev->testTable[i]->vc_status = VC_UBR;
@@ -2163,7 +2171,30 @@
         iadev->tx_pkt_cnt = 0;
         iadev->rate_limit = iadev->LineRate / 3;
   
-	return 0;  
+	return 0;
+
+err_free_test_tables:
+	while (--i >= 0)
+		kfree(iadev->testTable[i]);
+	kfree(iadev->testTable);
+err_free_desc_tbl:
+	kfree(iadev->desc_tbl);
+err_free_all_tx_bufs:
+	i = iadev->num_tx_desc;
+err_free_tx_bufs:
+	while (--i >= 0) {
+		struct cpcs_trailer_desc *desc = iadev->tx_buf + i;
+
+		pci_unmap_single(iadev->pci, desc->dma_addr,
+			sizeof(*desc->cpcs), PCI_DMA_TODEVICE);
+		kfree(desc->cpcs);
+	}
+	kfree(iadev->tx_buf);
+err_free_dle:
+	pci_free_consistent(iadev->pci, DLE_TOTAL_SIZE, iadev->tx_dle_q.start,
+			    iadev->tx_dle_dma);  
+err_out:
+	return -ENOMEM;
 }   
    
 static void ia_int(int irq, void *dev_id, struct pt_regs *regs)  
@@ -2421,10 +2452,37 @@
 	return readl(INPH_IA_DEV(dev)->phy+addr);  
 }  
 
+static void ia_free_tx(IADEV *iadev)
+{
+	int i;
+
+	kfree(iadev->desc_tbl);
+	for (i = 0; i < iadev->num_vc; i++)
+		kfree(iadev->testTable[i]);
+	kfree(iadev->testTable);
+	for (i = 0; i < iadev->num_tx_desc; i++) {
+		struct cpcs_trailer_desc *desc = iadev->tx_buf + i;
+
+		pci_unmap_single(iadev->pci, desc->dma_addr,
+			sizeof(*desc->cpcs), PCI_DMA_TODEVICE);
+		kfree(desc->cpcs);
+	}
+	kfree(iadev->tx_buf);
+	pci_free_consistent(iadev->pci, DLE_TOTAL_SIZE, iadev->tx_dle_q.start,
+			    iadev->tx_dle_dma);  
+}
+
+static void ia_free_rx(IADEV *iadev)
+{
+	kfree(iadev->rx_open);
+	pci_free_consistent(iadev->pci, DLE_TOTAL_SIZE, iadev->rx_dle_q.start,
+			  iadev->rx_dle_dma);  
+}
+
 static int __init ia_start(struct atm_dev *dev)
 {  
 	IADEV *iadev;  
-	int error = 1;  
+	int error;  
 	unsigned char phy;  
 	u32 ctrl_reg;  
 	IF_EVENT(printk(">ia_start\n");)  
@@ -2432,7 +2490,8 @@
         if (request_irq(iadev->irq, &ia_int, SA_SHIRQ, DEV_LABEL, dev)) {  
                 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",  
                     dev->number, iadev->irq);  
-                return -EAGAIN;  
+		error = -EAGAIN;
+		goto err_out;
         }  
         /* @@@ should release IRQ on error */  
 	/* enabling memory + master */  
@@ -2442,8 +2501,8 @@
 	{  
                 printk(KERN_ERR DEV_LABEL "(itf %d): can't enable memory+"  
                     "master (0x%x)\n",dev->number, error);  
-                free_irq(iadev->irq, dev); 
-                return -EIO;  
+		error = -EIO;  
+		goto err_free_irq;
         }  
 	udelay(10);  
   
@@ -2477,15 +2536,11 @@
     
         ia_hw_type(iadev); 
 	error = tx_init(dev);  
-	if (error) {
-           free_irq(iadev->irq, dev);  
-           return error;
-        }  
+	if (error)
+		goto err_free_irq;
 	error = rx_init(dev);  
-	if (error) {
-          free_irq(iadev->irq, dev); 
-          return error;  
-        }
+	if (error)
+		goto err_free_tx;
   
 	ctrl_reg = readl(iadev->reg+IPHASE5575_BUS_CONTROL_REG);  
        	writel(ctrl_reg | CTRL_FE_RST, iadev->reg+IPHASE5575_BUS_CONTROL_REG);   
@@ -2498,35 +2553,38 @@
 	else  
 		printk("IA: utopia,rev.%0x\n",phy);) 
 
-        if (iadev->phy_type &  FE_25MBIT_PHY) {
+	if (iadev->phy_type &  FE_25MBIT_PHY)
            ia_mb25_init(iadev);
-           return 0;
-        }
-        if (iadev->phy_type & (FE_DS3_PHY | FE_E3_PHY)) {
+	else if (iadev->phy_type & (FE_DS3_PHY | FE_E3_PHY))
            ia_suni_pm7345_init(iadev);
-           return 0;
-        }
-
-	error = suni_init(dev);  
-	if (error) {
-          free_irq(iadev->irq, dev); 
-          return error;  
-        }
-
-        /* Enable interrupt on loss of signal SUNI_RSOP_CIE 0x10
-           SUNI_RSOP_CIE_LOSE - 0x04
-        */
-        ia_phy_put(dev, ia_phy_get(dev,0x10) | 0x04, 0x10);         
-#if 0
-	error = dev->phy->start(dev);  
-	if (error) {
-          free_irq(iadev->irq, dev);
-          return error;
-        }   
+	else {
+		error = suni_init(dev);
+		if (error)
+			goto err_free_rx;
+		/* 
+		 * Enable interrupt on loss of signal
+		 * SUNI_RSOP_CIE - 0x10
+		 * SUNI_RSOP_CIE_LOSE - 0x04
+		 */
+		ia_phy_put(dev, ia_phy_get(dev, 0x10) | 0x04, 0x10);
+#ifndef MODULE
+		error = dev->phy->start(dev);
+		if (error)
+			goto err_free_rx;
 #endif
-        /* Get iadev->carrier_detect status */
-        IaFrontEndIntr(iadev);
-	return 0;  
+		/* Get iadev->carrier_detect status */
+		IaFrontEndIntr(iadev);
+	}
+	return 0;
+
+err_free_rx:
+	ia_free_rx(iadev);
+err_free_tx:
+	ia_free_tx(iadev);
+err_free_irq:
+	free_irq(iadev->irq, dev);  
+err_out:
+	return error;
 }  
   
 static void ia_close(struct atm_vcc *vcc)  
@@ -2835,10 +2893,10 @@
         struct tx_buf_desc *buf_desc_ptr;
         int desc;
         int comp_code;
-        unsigned int addr;
         int total_len, pad, last;
         struct cpcs_trailer *trailer;
         struct ia_vcc *iavcc;
+
         iadev = INPH_IA_DEV(vcc->dev);  
         iavcc = INPH_IA_VCC(vcc);
         if (!iavcc->txing) {
@@ -2923,13 +2981,9 @@
 	IF_TX(printk("ia packet len:%d padding:%d\n", total_len, pad);)  
  
 	/* Put the packet in a tx buffer */   
-	if (!iadev->tx_buf[desc-1])  
-		printk("couldn't get free page\n");  
-
+	trailer = iadev->tx_buf[desc-1].cpcs;
         IF_TX(printk("Sent: skb = 0x%x skb->data: 0x%x len: %d, desc: %d\n",
                   (u32)skb, (u32)skb->data, skb->len, desc);)
-        addr = virt_to_bus(skb->data);
-	trailer = (struct cpcs_trailer*)iadev->tx_buf[desc-1];  
 	trailer->control = 0; 
         /*big endian*/ 
 	trailer->length = ((skb->len & 0xff) << 8) | ((skb->len & 0xff00) >> 8);
@@ -2945,6 +2999,7 @@
 	buf_desc_ptr = (struct tx_buf_desc *)(iadev->seg_ram+TX_DESC_BASE);  
 	buf_desc_ptr += desc;	/* points to the corresponding entry */  
 	buf_desc_ptr->desc_mode = AAL5 | EOM_EN | APP_CRC32 | CMPL_INT;   
+	/* Huh ? p.115 of users guide describes this as a read-only register */
         writew(TRANSMIT_DONE, iadev->seg_reg+SEG_INTR_STATUS_REG);
 	buf_desc_ptr->vc_index = vcc->vci;
 	buf_desc_ptr->bytes = total_len;  
@@ -2955,7 +3010,8 @@
 	/* Build the DLE structure */  
 	wr_ptr = iadev->tx_dle_q.write;  
 	memset((caddr_t)wr_ptr, 0, sizeof(*wr_ptr));  
-	wr_ptr->sys_pkt_addr = addr;  
+	wr_ptr->sys_pkt_addr = pci_map_single(iadev->pci, skb->data,
+		skb->len, PCI_DMA_TODEVICE);
 	wr_ptr->local_pkt_addr = (buf_desc_ptr->buf_start_hi << 16) | 
                                                   buf_desc_ptr->buf_start_lo;  
 	/* wr_ptr->bytes = swap(total_len);	didn't seem to affect ?? */  
@@ -2973,7 +3029,7 @@
 		wr_ptr = iadev->tx_dle_q.start;  
         
         /* Build trailer dle */
-        wr_ptr->sys_pkt_addr = virt_to_bus(iadev->tx_buf[desc-1]);
+        wr_ptr->sys_pkt_addr = iadev->tx_buf[desc-1].dma_addr;
         wr_ptr->local_pkt_addr = ((buf_desc_ptr->buf_start_hi << 16) | 
           buf_desc_ptr->buf_start_lo) + total_len - sizeof(struct cpcs_trailer);
 
@@ -3124,128 +3180,130 @@
 	.owner		= THIS_MODULE,
 };  
 	  
-  
-static int __init ia_detect(void)
+static int __devinit ia_init_one(struct pci_dev *pdev,
+				 const struct pci_device_id *ent)
 {  
 	struct atm_dev *dev;  
 	IADEV *iadev;  
         unsigned long flags;
-        int index = 0;  
-	struct pci_dev *prev_dev;       
-	if (!pci_present()) {  
-		printk(KERN_ERR DEV_LABEL " driver but no PCI BIOS ?\n");  
-		return 0;  
-	}  
+	int ret;
+
 	iadev = kmalloc(sizeof(*iadev), GFP_KERNEL); 
-	if (!iadev) return -ENOMEM;  
-        memset((char*)iadev, 0, sizeof(*iadev));
-	prev_dev = NULL;  
-	while((iadev->pci = pci_find_device(PCI_VENDOR_ID_IPHASE,  
-		PCI_DEVICE_ID_IPHASE_5575,  prev_dev))) {  
-		IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
-                     iadev->pci->bus->number, PCI_SLOT(iadev->pci->devfn), 
-                                                 PCI_FUNC(iadev->pci->devfn));)  
-		if (pci_enable_device(iadev->pci)) break;
-		dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL);
-		if (!dev) break;  
-		IF_INIT(printk(DEV_LABEL "registered at (itf :%d)\n", 
-                                                             dev->number);)  
-		INPH_IA_DEV(dev) = iadev; 
-                // TODO: multi_board using ia_boards logic in cleanup_module
-		ia_dev[index] = iadev;
-		_ia_dev[index] = dev;
-                IF_INIT(printk("dev_id = 0x%x iadev->LineRate = %d \n", 
-                                        (u32)dev, iadev->LineRate);)
-                iadev_count++;
-                spin_lock_init(&iadev->misc_lock);
-                spin_lock_irqsave(&iadev->misc_lock, flags); 
-		if (ia_init(dev) || ia_start(dev)) {  
-			atm_dev_deregister(dev);  
-                        IF_INIT(printk("IA register failed!\n");)
-                        ia_dev[index] = NULL;
-                        _ia_dev[index] = NULL;
-                        iadev_count--;
-                        spin_unlock_irqrestore(&iadev->misc_lock, flags); 
-			return -EINVAL;  
-		}  
-                spin_unlock_irqrestore(&iadev->misc_lock, flags);
-                IF_EVENT(printk("iadev_count = %d\n", iadev_count);)
-		prev_dev = iadev->pci;  
-		iadev->next_board = ia_boards;  
-		ia_boards = dev;  
-		iadev = kmalloc(sizeof(*iadev), GFP_KERNEL);  
-		if (!iadev) break;   
-                memset((char*)iadev, 0, sizeof(*iadev)); 
-		index++;  
-                dev = NULL;
-	}  
-	return index;  
-}  
-  
+	if (!iadev) {
+		ret = -ENOMEM;
+		goto err_out;
+	}
+	memset(iadev, 0, sizeof(*iadev));
+	iadev->pci = pdev;
+
+	IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
+		pdev->bus->number, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));)
+	if (pci_enable_device(pdev)) {
+		ret = -ENODEV;
+		goto err_out_free_iadev;
+	}
+	dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL);
+	if (!dev) {
+		ret = -ENOMEM;
+		goto err_out_disable_dev;
+	}
+	INPH_IA_DEV(dev) = iadev; 
+	IF_INIT(printk(DEV_LABEL "registered at (itf :%d)\n", dev->number);)
+	IF_INIT(printk("dev_id = 0x%x iadev->LineRate = %d \n", (u32)dev,
+		iadev->LineRate);)
+
+	ia_dev[iadev_count] = iadev;
+	_ia_dev[iadev_count] = dev;
+	iadev_count++;
+	spin_lock_init(&iadev->misc_lock);
+	/* First fixes first. I don't want to think about this now. */
+	spin_lock_irqsave(&iadev->misc_lock, flags); 
+	if (ia_init(dev) || ia_start(dev)) {  
+		IF_INIT(printk("IA register failed!\n");)
+		iadev_count--;
+		ia_dev[iadev_count] = NULL;
+		_ia_dev[iadev_count] = NULL;
+		spin_unlock_irqrestore(&iadev->misc_lock, flags); 
+		ret = -EINVAL;
+		goto err_out_deregister_dev;
+	}
+	spin_unlock_irqrestore(&iadev->misc_lock, flags); 
+	IF_EVENT(printk("iadev_count = %d\n", iadev_count);)
+
+	iadev->next_board = ia_boards;  
+	ia_boards = dev;  
+
+	pci_set_drvdata(pdev, dev);
+
+	return 0;
+
+err_out_deregister_dev:
+	atm_dev_deregister(dev);  
+err_out_disable_dev:
+	pci_disable_device(pdev);
+err_out_free_iadev:
+	kfree(iadev);
+err_out:
+	return ret;
+}
+
+static void __devexit ia_remove_one(struct pci_dev *pdev)
+{
+	struct atm_dev *dev = pci_get_drvdata(pdev);
+	IADEV *iadev = INPH_IA_DEV(dev);
+
+	ia_phy_put(dev, ia_phy_get(dev,0x10) & ~(0x4), 0x10); 
+	udelay(1);
+
+	/* De-register device */  
+      	free_irq(iadev->irq, dev);
+	iadev_count--;
+	ia_dev[iadev_count] = NULL;
+	_ia_dev[iadev_count] = NULL;
+	atm_dev_deregister(dev);
+	IF_EVENT(printk("iav deregistered at (itf:%d)\n", dev->number);)
+
+      	iounmap((void *) iadev->base);  
+	pci_disable_device(pdev);
+
+	ia_free_rx(iadev);
+	ia_free_tx(iadev);
+
+      	kfree(iadev);
+}
+
+static struct pci_device_id ia_pci_tbl[] __devinitdata = {
+	{ PCI_VENDOR_ID_IPHASE, 0x0008, PCI_ANY_ID, PCI_ANY_ID, },
+	{ PCI_VENDOR_ID_IPHASE, 0x0009, PCI_ANY_ID, PCI_ANY_ID, },
+	{ 0,}
+};
+MODULE_DEVICE_TABLE(pci, ia_pci_tbl);
+
+static struct pci_driver ia_driver = {
+	.name =         DEV_LABEL,
+	.id_table =     ia_pci_tbl,
+	.probe =        ia_init_one,
+	.remove =       ia_remove_one,
+};
+
 static int __init ia_module_init(void)
-{  
-	IF_EVENT(printk(">ia init_module\n");)  
-	if (!ia_detect()) {  
+{
+	int ret;
+
+	ret = pci_module_init(&ia_driver);
+	if (ret >= 0) {
+		ia_timer.expires = jiffies + 3*HZ;
+		add_timer(&ia_timer); 
+	} else
 		printk(KERN_ERR DEV_LABEL ": no adapter found\n");  
-		return -ENXIO;  
-	}  
-   	ia_timer.expires = jiffies + 3*HZ;
-   	add_timer(&ia_timer); 
-   
-	return 0;  
-}  
-  
-  
+	return ret;
+}
+
 static void __exit ia_module_exit(void)
-{  
-	struct atm_dev *dev;  
-	IADEV *iadev;  
-	unsigned short command;  
-        int i, j= 0;
- 
-	IF_EVENT(printk(">ia cleanup_module\n");)  
-	if (MOD_IN_USE)  
-		printk("ia: module in use\n");  
+{
+	pci_unregister_driver(&ia_driver);
+
         del_timer(&ia_timer);
-	while(ia_dev[j])  
-	{  
-		dev = ia_boards;  
-		iadev = INPH_IA_DEV(dev);  
-		ia_boards = iadev->next_board;  
-                
-        	/* disable interrupt of lost signal */
-        	ia_phy_put(dev, ia_phy_get(dev,0x10) & ~(0x4), 0x10); 
-        	udelay(1);
-
-      		/* De-register device */  
-      		atm_dev_deregister(dev);  
-		IF_EVENT(printk("iav deregistered at (itf:%d)\n", dev->number);)
-		for (i= 0; i< iadev->num_tx_desc; i++)
-                        kfree(iadev->tx_buf[i]);
-                kfree(iadev->tx_buf);
-      		/* Disable memory mapping and busmastering */  
-		if (pci_read_config_word(iadev->pci,  
-					     PCI_COMMAND, &command) != 0)  
-      		{  
-         		printk("ia: can't read PCI_COMMAND.\n");  
-      		}  
-      		command &= ~(PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);  
-      		if (pci_write_config_word(iadev->pci,  
-					      PCI_COMMAND, command) != 0)  
-      		{  
-         		printk("ia: can't write PCI_COMMAND.\n");  
-      		}  
-      		free_irq(iadev->irq, dev);  
-      		iounmap((void *) iadev->base);  
-      		kfree(iadev);  
-                j++;
-	}  
-	/* and voila whatever we tried seems to work. I don't know if it will  
-		fix suni errors though. Really doubt that. */  
-        for (i = 0; i<8; i++) {
-               ia_dev[i] =  NULL;
-              _ia_dev[i] = NULL;
-        }
 }
 
 module_init(ia_module_init);
diff -Nru a/drivers/atm/iphase.h b/drivers/atm/iphase.h
--- a/drivers/atm/iphase.h	Wed Oct 30 16:44:25 2002
+++ b/drivers/atm/iphase.h	Wed Oct 30 16:44:25 2002
@@ -200,7 +200,13 @@
 	u_short length;  
 	u_int	crc32;  
 };  
-  
+
+struct cpcs_trailer_desc
+{
+	struct cpcs_trailer *cpcs;
+	dma_addr_t dma_addr;
+};
+
 struct ia_vcc 
 { 
 	int rxing;	 
@@ -272,6 +278,7 @@
 #define DLE_ENTRIES 256  
 #define DMA_INT_ENABLE 0x0002	/* use for both Tx and Rx */  
 #define TX_DLE_PSI 0x0001  
+#define DLE_TOTAL_SIZE (sizeof(struct dle)*DLE_ENTRIES)
   
 /* Descriptor List Entries (DLE) */  
 struct dle 
@@ -1017,7 +1024,7 @@
         struct wait_queue     *close_wait;
         struct wait_queue     *timeout_wait;
 #endif
-	caddr_t *tx_buf;  
+	struct cpcs_trailer_desc *tx_buf;
         u16 num_tx_desc, tx_buf_sz, rate_limit;
         u32 tx_cell_cnt, tx_pkt_cnt;
         u32 MAIN_VC_TABLE_ADDR, EXT_VC_TABLE_ADDR, ABR_SCHED_TABLE_ADDR;
@@ -1063,7 +1070,9 @@
         struct desc_tbl_t *desc_tbl;
         u_short host_tcq_wr;
         struct testTable_t **testTable;
-} IADEV;  
+	dma_addr_t tx_dle_dma;
+	dma_addr_t rx_dle_dma;
+} IADEV;
   
   
 #define INPH_IA_DEV(d) ((IADEV *) (d)->dev_data)  
diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c
--- a/drivers/atm/lanai.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/atm/lanai.c	Wed Oct 30 16:44:26 2002
@@ -2108,8 +2108,7 @@
 	}
 	result = pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &w);
 	if (result != PCIBIOS_SUCCESSFUL) {
-		printk(KERN_ERR DEV_LABEL "(itf %d): can't read ""
-		    PCI_SUBSYSTEM_ID: %d\n", lanai->number, result);
+		printk(KERN_ERR DEV_LABEL "(itf %d): can't read PCI_SUBSYSTEM_ID: %d\n", lanai->number, result);
 		return -EINVAL;
 	}
 	if ((result = check_board_id_and_rev("PCI", w, NULL)) != 0)
diff -Nru a/drivers/atm/zatm.c b/drivers/atm/zatm.c
--- a/drivers/atm/zatm.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/atm/zatm.c	Wed Oct 30 16:44:26 2002
@@ -1260,13 +1260,13 @@
 		/* don't handle RD */
 		if (reason & uPD98401_INT_SPE)
 			printk(KERN_ALERT DEV_LABEL "(itf %d): system parity "
-			    "error at 0x%08x\n",dev->number,zin(ADDR));
+			    "error at 0x%08lx\n",dev->number,zin(ADDR));
 		if (reason & uPD98401_INT_CPE)
 			printk(KERN_ALERT DEV_LABEL "(itf %d): control memory "
-			    "parity error at 0x%08x\n",dev->number,zin(ADDR));
+			    "parity error at 0x%08lx\n",dev->number,zin(ADDR));
 		if (reason & uPD98401_INT_SBE) {
 			printk(KERN_ALERT DEV_LABEL "(itf %d): system bus "
-			    "error at 0x%08x\n",dev->number,zin(ADDR));
+			    "error at 0x%08lx\n",dev->number,zin(ADDR));
 			event_dump();
 		}
 		/* don't handle IND */
@@ -1448,7 +1448,7 @@
 	}
 	while (t0 > t1 || t1 > t2); /* loop if wrapping ... */
 	zatm_dev->khz = t2-2*t1+t0;
-	printk(KERN_NOTICE DEV_LABEL "(itf %d): uPD98401 %d.%d at %d.%03d "
+	printk(KERN_NOTICE DEV_LABEL "(itf %d): uPD98401 %ld.%ld at %d.%03d "
 	    "MHz\n",dev->number,
 	    (zin(VER) & uPD98401_MAJOR) >> uPD98401_MAJOR_SHIFT,
             zin(VER) & uPD98401_MINOR,zatm_dev->khz/1000,zatm_dev->khz % 1000);
diff -Nru a/drivers/base/base.h b/drivers/base/base.h
--- a/drivers/base/base.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/base/base.h	Wed Oct 30 16:44:27 2002
@@ -54,8 +54,13 @@
 
 #ifdef CONFIG_HOTPLUG
 extern int dev_hotplug(struct device *dev, const char *action);
+extern int class_hotplug(struct device *dev, const char *action);
 #else
 static inline int dev_hotplug(struct device *dev, const char *action)
+{
+	return 0;
+}
+static int class_hotplug(struct device *dev, const char *action)
 {
 	return 0;
 }
diff -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/base/class.c	Wed Oct 30 16:44:35 2002
@@ -84,7 +84,8 @@
 				interface_add(cls,dev);
 			}
 
-			/* notify userspace (call /sbin/hotplug) here */
+			/* notify userspace (call /sbin/hotplug) */
+			class_hotplug (dev, "add");
 
 			up_write(&cls->rwsem);
 			if (error)
@@ -106,6 +107,10 @@
 				 cls->name,dev->name);
 			interface_remove(cls,dev);
 			unenum_device(cls,dev);
+
+			/* notify userspace (call /sbin/hotplug) */
+			class_hotplug (dev, "remove");
+
 			if (cls->remove_device)
 				cls->remove_device(dev);
 			up_write(&cls->rwsem);
diff -Nru a/drivers/base/hotplug.c b/drivers/base/hotplug.c
--- a/drivers/base/hotplug.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/base/hotplug.c	Wed Oct 30 16:44:17 2002
@@ -22,15 +22,21 @@
 
 /*
  * hotplugging invokes what /proc/sys/kernel/hotplug says (normally
- * /sbin/hotplug) when devices get added or removed.
+ * /sbin/hotplug) when devices or classes get added or removed.
  *
  * This invokes a user mode policy agent, typically helping to load driver
  * or other modules, configure the device, and more.  Drivers can provide
  * a MODULE_DEVICE_TABLE to help with module loading subtasks.
+ *
+ * See the documentation at http://linux-hotplug.sf.net for more info.
+ * 
  */
+
 #define BUFFER_SIZE	1024	/* should be enough memory for the env */
 #define NUM_ENVP	32	/* number of env pointers */
-int dev_hotplug (struct device *dev, const char *action)
+
+static int do_hotplug (struct device *dev, char *argv1, const char *action,
+			int (* hotplug) (struct device *, char **, int, char *, int))
 {
 	char *argv [3], **envp, *buffer, *scratch;
 	char *dev_path;
@@ -39,11 +45,6 @@
 	int dev_length;
 
 	pr_debug ("%s\n", __FUNCTION__);
-	if (!dev)
-		return -ENODEV;
-
-	if (!dev->bus)
-		return -ENODEV;
 
 	if (!hotplug_path [0])
 		return -ENODEV;
@@ -82,9 +83,8 @@
 	strcpy (dev_path, "root");
 	fill_devpath (dev, dev_path, dev_length);
 
-	/* only one standardized param to hotplug command: the bus name */
 	argv [0] = hotplug_path;
-	argv [1] = dev->bus->name;
+	argv [1] = argv1;
 	argv [2] = 0;
 
 	/* minimal command environment */
@@ -99,11 +99,10 @@
 	envp [i++] = scratch;
 	scratch += sprintf (scratch, "DEVPATH=%s", dev_path) + 1;
 	
-	if (dev->bus->hotplug) {
+	if (hotplug) {
 		/* have the bus specific function add its stuff */
-		retval = dev->bus->hotplug (dev, &envp[i], NUM_ENVP - i,
-					    scratch,
-					    BUFFER_SIZE - (scratch - buffer));
+		retval = hotplug (dev, &envp[i], NUM_ENVP - i, scratch,
+				  BUFFER_SIZE - (scratch - buffer));
 		if (retval) {
 			pr_debug ("%s - hotplug() returned %d\n",
 				  __FUNCTION__, retval);
@@ -123,4 +122,43 @@
 	kfree (buffer);
 	kfree (envp);
 	return retval;
+}
+
+
+/*
+ * dev_hotplug - called when any device is added or removed from a bus
+ */
+int dev_hotplug (struct device *dev, const char *action)
+{
+	pr_debug ("%s\n", __FUNCTION__);
+	if (!dev)
+		return -ENODEV;
+
+	if (!dev->bus)
+		return -ENODEV;
+
+	return do_hotplug (dev, dev->bus->name, action, dev->bus->hotplug);
+}
+
+
+/*
+ * class_hotplug - called when a class is added or removed from a device
+ */
+int class_hotplug (struct device *dev, const char *action)
+{
+	struct device_class * cls;
+
+	pr_debug ("%s\n", __FUNCTION__);
+
+	if (!dev)
+		return -ENODEV;
+
+	if (!dev->bus)
+		return -ENODEV;
+
+	cls = get_devclass(dev->driver->devclass);
+	if (!cls)
+		return -ENODEV;
+
+	return do_hotplug (dev, cls->name, action, cls->hotplug);
 }
diff -Nru a/drivers/block/Config.help b/drivers/block/Config.help
--- a/drivers/block/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,264 +0,0 @@
-CONFIG_BLK_DEV_FD
-  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
-  Thinkpad users, is contained in <file:Documentation/floppy.txt>.
-  That file also contains the location of the Floppy driver FAQ as
-  well as location of the fdutils package used to configure additional
-  parameters of the driver at run time.
-
-  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 floppy.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_BLK_DEV_RAM
-  Saying Y here will allow you to use a portion of your RAM memory as
-  a block device, so that you can make file systems on it, read and
-  write to it and do all the other things that you can do with normal
-  block devices (such as hard drives). It is usually used to load and
-  store a copy of a minimal root file system off of a floppy into RAM
-  during the initial install of Linux.
-
-  Note that the kernel command line option "ramdisk=XX" is now
-  obsolete. For details, read <file:Documentation/ramdisk.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M and read <file:Documentation/modules.txt>. The module will be
-  called rd.o.
-
-  Most normal users won't need the RAM disk functionality, and can
-  thus say N here.
-
-CONFIG_BLK_DEV_RAM_SIZE
-  The default value is 4096. Only change this if you know what are
-  you doing. If you are using IBM S/390, then set this to 8192.
-
-CONFIG_BLK_DEV_INITRD
-  The initial RAM disk is a RAM disk that is loaded by the boot loader
-  (loadlin or lilo) and that is mounted as root before the normal boot
-  procedure. It is typically used to load modules needed to mount the
-  "real" root file system, etc. See <file:Documentation/initrd.txt>
-  for details.
-
-CONFIG_BLK_DEV_LOOP
-  Saying Y here will allow you to use a regular file as a block
-  device; you can then create a file system on that block device and
-  mount it just as you would mount other block devices such as hard
-  drive partitions, CD-ROM drives or floppy drives. The loop devices
-  are block special device files with major number 7 and typically
-  called /dev/loop0, /dev/loop1 etc.
-
-  This is useful if you want to check an ISO 9660 file system before
-  burning the CD, or if you want to use floppy images without first
-  writing them to floppy. Furthermore, some Linux distributions avoid
-  the need for a dedicated Linux partition by keeping their complete
-  root file system inside a DOS FAT file using this loop device
-  driver.
-
-  The loop device driver can also be used to "hide" a file system in a
-  disk partition, floppy, or regular file, either using encryption
-  (scrambling the data) or steganography (hiding the data in the low
-  bits of, say, a sound file). This is also safe if the file resides
-  on a remote file server. If you want to do this, you will first have
-  to acquire and install a kernel patch from
-  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
-  say Y to this option.
-
-  Note that alternative ways to use encrypted file systems are
-  provided by the cfs package, which can be gotten from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
-  package, available at <http://tcfs.dia.unisa.it/>. You do not need
-  to say Y here if you want to use one of these. However, using cfs
-  requires saying Y to "NFS file system support" below while using
-  tcfs requires applying a kernel patch. An alternative steganography
-  solution is provided by StegFS, also available from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
-
-  To use the loop device, you need the losetup utility and a recent
-  version of the mount program, both contained in the util-linux
-  package. The location and current version number of util-linux is
-  contained in the file <file:Documentation/Changes>.
-
-  Note that this loop device has nothing to do with the loopback
-  device used for network connections from the machine to itself.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called loop.o.
-
-  Most users will answer N here.
-
-Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)
-CONFIG_BLK_DEV_UMEM
-  Saying Y here will include support for the MM5415 family of
-  battery backed (Non-volatile) RAM cards.
-  http://www.umem.com/
-
-  The cards appear as block devices that can be partitioned into
-  as many as 15 partitions.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read Documentation/modules.txt. The module will be
-  called umem.o.
-
-  The umem driver has not yet been allocated a MAJOR number, so
-  one is chosen dynamically.  Use "devfs" or look in /proc/devices
-  for the device number
-
-CONFIG_BLK_DEV_NBD
-  Saying Y here will allow your computer to be a client for network
-  block devices, i.e. it will be able to use block devices exported by
-  servers (mount file systems on them etc.). Communication between
-  client and server works over TCP/IP networking, but to the client
-  program this is hidden: it looks like a regular local file access to
-  a block device special file such as /dev/nd0.
-
-  Network block devices also allows you to run a block-device in
-  userland (making server and client physically the same computer,
-  communicating using the loopback network device).
-
-  Read <file:Documentation/nbd.txt> for more information, especially
-  about where to find the server code, which runs in user space and
-  does not need special kernel support.
-
-  Note that this has nothing to do with the network file systems NFS
-  or Coda; you can say N here even if you intend to use NFS or Coda.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called nbd.o.
-
-  If unsure, say N.
-
-CONFIG_BLK_DEV_XD
-  Very old 8 bit hard disk controllers used in the IBM XT computer
-  will be supported if you say Y here.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called xd.o.
-
-  It's pretty unlikely that you have one of these: say N.
-
-CONFIG_BLK_DEV_PS2
-  Say Y here if you have a PS/2 machine with a MCA bus and an ESDI
-  hard disk.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ps2esdi.o.
-
-CONFIG_BLK_DEV_DAC960
-  This driver adds support for the Mylex DAC960, AcceleRAID, and
-  eXtremeRAID PCI RAID controllers.  See the file
-  <file:Documentation/README.DAC960> for further information about
-  this driver.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called DAC960.o.
-
-CONFIG_PARIDE
-  There are many external CD-ROM and disk devices that connect through
-  your computer's parallel port. Most of them are actually IDE devices
-  using a parallel port IDE adapter. This option enables the PARIDE
-  subsystem which contains drivers for many of these external drives.
-  Read <file:Documentation/paride.txt> for more information.
-
-  If you have said Y to the "Parallel-port support" configuration
-  option, you may share a single port between your printer and other
-  parallel port devices. Answer Y to build PARIDE support into your
-  kernel, or M if you would like to build it as a loadable module. If
-  your parallel port support is in a loadable module, you must build
-  PARIDE as a module. If you built PARIDE support into your kernel,
-  you may still build the individual protocol modules and high-level
-  drivers as loadable modules. If you build this support as a module,
-  it will be called paride.o.
-
-  To use the PARIDE support, you must say Y or M here and also to at
-  least one high-level driver (e.g. "Parallel port IDE disks",
-  "Parallel port ATAPI CD-ROMs", "Parallel port ATAPI disks" etc.) and
-  to at least one protocol driver (e.g. "ATEN EH-100 protocol",
-  "MicroSolutions backpack protocol", "DataStor Commuter protocol"
-  etc.).
-
-CONFIG_BLK_CPQ_CISS_DA
-  This is the driver for Compaq Smart Array 5xxx controllers.
-  Everyone using these boards should say Y here.
-  See <file:Documentation/cciss.txt> for the current list of
-  boards supported by this driver, and for further information
-  on the use of this driver.
-
-CONFIG_CISS_SCSI_TAPE
-  When enabled (Y), this option allows SCSI tape drives and SCSI medium
-  changers (tape robots) to be accessed via a Compaq 5xxx array 
-  controller.  (See Documentation/cciss.txt for more details.)
-
-  "SCSI support" and "SCSI tape support" must also be enabled for this 
-  option to work.
-
-  When this option is disabled (N), the SCSI portion of the driver 
-  is not compiled.
-
-CONFIG_BLK_DEV_SWIM_IOP
-  Say Y here to support the SWIM (Super Woz Integrated Machine) IOP
-  floppy controller on the Macintosh IIfx and Quadra 900/950.
-
-CONFIG_AMIGA_Z2RAM
-  This enables support for using Chip RAM and Zorro II RAM as a
-  ramdisk or as a swap partition. Say Y if you want to include this
-  driver in the kernel. 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 is called z2ram.o. If you want
-  to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_ATARI_ACSI
-  This enables support for the Atari ACSI interface. The driver
-  supports hard disks and CD-ROMs, which have 512-byte sectors, or can
-  be switched to that mode. Due to the ACSI command format, only disks
-  up to 1 GB are supported. Special support for certain ACSI to SCSI
-  adapters, which could relax that, isn't included yet. The ACSI
-  driver is also the basis for certain other drivers for devices
-  attached to the ACSI bus: Atari SLM laser printer, BioNet-100
-  Ethernet, and PAMsNet Ethernet. If you want to use one of these
-  devices, you need ACSI support, too.
-
-  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 acsi.o.
-
-CONFIG_ACSI_MULTI_LUN
-  If you have a ACSI device that supports more than one LUN (Logical
-  Unit Number), e.g. a CD jukebox, you should say Y here so that all
-  will be found by the ACSI driver. An ACSI device with multiple LUNs
-  acts logically like multiple ACSI devices. The vast majority of ACSI
-  devices have only one LUN, and so most people can say N here and
-  should in fact do so, because it is safer.
-
-CONFIG_ATARI_SLM
-  If you have an Atari SLM laser printer, say Y to include support for
-  it in the kernel. Otherwise, say N. 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
-  acsi_slm.o. Be warned: the driver needs much ST-RAM and can cause
-  problems due to that fact!
-
-CONFIG_BLK_CPQ_DA
-  This is the driver for Compaq Smart Array controllers.  Everyone
-  using these boards should say Y here.  See the file
-  <file:Documentation/cpqarray.txt> for the current list of boards
-  supported by this driver, and for further information on the use of
-  this driver.
-
-CONFIG_LBD
-  Say Y here if you want to attach large (bigger than 2TB) discs to
-  your machine, or if you want to have a raid or loopback device
-  bigger than 2TB.  Otherwise say N.
diff -Nru a/drivers/block/Config.in b/drivers/block/Config.in
--- a/drivers/block/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,54 +0,0 @@
-#
-# Block device driver configuration
-#
-mainmenu_option next_comment
-comment 'Block devices'
-
-tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   tristate 'Amiga floppy support' CONFIG_AMIGA_FLOPPY
-fi
-if [ "$CONFIG_ATARI" = "y" ]; then
-   tristate 'Atari floppy support' CONFIG_ATARI_FLOPPY
-fi
-if [ "$CONFIG_MAC" = "y" ]; then
-   dep_bool 'Macintosh IIfx/Quadra 900/Quadra 950 floppy support (EXPERIMENTAL)' CONFIG_BLK_DEV_SWIM_IOP $CONFIG_EXPERIMENTAL
-fi
-if [ "$CONFIG_MCA" = "y" ]; then
-   tristate 'PS/2 ESDI hard disk support' CONFIG_BLK_DEV_PS2
-fi
-if [ "$CONFIG_ZORRO" = "y" ]; then
-   tristate 'Amiga Zorro II ramdisk support' CONFIG_AMIGA_Z2RAM
-fi
-if [ "$CONFIG_ATARI" = "y" ]; then
-   tristate 'Atari ACSI support' CONFIG_ATARI_ACSI
-   if [ "$CONFIG_ATARI_ACSI" != "n" ]; then
-      comment 'Some devices (e.g. CD jukebox) support multiple LUNs'
-      bool '  Probe all LUNs on each ACSI device' CONFIG_ACSI_MULTI_LUN
-      tristate '  Atari SLM laser printer support' CONFIG_ATARI_SLM
-   fi
-fi
-dep_tristate 'XT hard disk support' CONFIG_BLK_DEV_XD $CONFIG_ISA
-dep_tristate 'Parallel port IDE device support' CONFIG_PARIDE $CONFIG_PARPORT
-if [ "$CONFIG_PARIDE" = "y" -o "$CONFIG_PARIDE" = "m" ]; then
-   source drivers/block/paride/Config.in
-fi
-dep_tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA $CONFIG_PCI
-dep_tristate 'Compaq Smart Array 5xxx support' CONFIG_BLK_CPQ_CISS_DA $CONFIG_PCI 
-dep_mbool '       SCSI tape drive support for Smart Array 5xxx' CONFIG_CISS_SCSI_TAPE $CONFIG_BLK_CPQ_CISS_DA $CONFIG_SCSI
-dep_tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960 $CONFIG_PCI
-dep_tristate 'Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)' CONFIG_BLK_DEV_UMEM $CONFIG_PCI $CONFIG_EXPERIMENTAL
-
-tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
-dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-
-tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
-   int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
-fi
-dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
-
-if [ "$CONFIG_X86" = "y" ]; then
-   bool 'Support for Large Block Devices' CONFIG_LBD
-fi
-endmenu
diff -Nru a/drivers/block/DAC960.c b/drivers/block/DAC960.c
--- a/drivers/block/DAC960.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/block/DAC960.c	Wed Oct 30 16:44:31 2002
@@ -3014,7 +3014,7 @@
 	      complete(Command->Completion);
 	      Command->Completion = NULL;
 	    }
-	  add_blkdev_randomness(DAC960_MAJOR + Controller->ControllerNumber);
+	  add_disk_randomness(Controller->disks[Command->LogicalDriveNumber]);
 	}
       else if ((CommandStatus == DAC960_V1_IrrecoverableDataError ||
 		CommandStatus == DAC960_V1_BadDataEncountered) &&
@@ -4120,7 +4120,7 @@
 	      complete(Command->Completion);
 	      Command->Completion = NULL;
 	    }
-	  add_blkdev_randomness(DAC960_MAJOR + Controller->ControllerNumber);
+	  add_disk_randomness(Controller->disks[Command->LogicalDriveNumber]);
 	}
       else if (Command->V2.RequestSense.SenseKey
 	       == DAC960_SenseKey_MediumError &&
diff -Nru a/drivers/block/Kconfig b/drivers/block/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/block/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,343 @@
+#
+# Block device driver configuration
+#
+
+menu "Block devices"
+
+config BLK_DEV_FD
+	tristate "Normal floppy disk support"
+	---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
+	  Thinkpad users, is contained in <file:Documentation/floppy.txt>.
+	  That file also contains the location of the Floppy driver FAQ as
+	  well as location of the fdutils package used to configure additional
+	  parameters of the driver at run time.
+
+	  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 floppy.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config AMIGA_FLOPPY
+	tristate "Amiga floppy support"
+	depends on AMIGA
+
+config ATARI_FLOPPY
+	tristate "Atari floppy support"
+	depends on ATARI
+
+config BLK_DEV_SWIM_IOP
+	bool "Macintosh IIfx/Quadra 900/Quadra 950 floppy support (EXPERIMENTAL)"
+	depends on MAC && EXPERIMENTAL
+	help
+	  Say Y here to support the SWIM (Super Woz Integrated Machine) IOP
+	  floppy controller on the Macintosh IIfx and Quadra 900/950.
+
+config BLK_DEV_PS2
+	tristate "PS/2 ESDI hard disk support"
+	depends on MCA
+	help
+	  Say Y here if you have a PS/2 machine with a MCA bus and an ESDI
+	  hard disk.
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ps2esdi.o.
+
+config AMIGA_Z2RAM
+	tristate "Amiga Zorro II ramdisk support"
+	depends on ZORRO
+	help
+	  This enables support for using Chip RAM and Zorro II RAM as a
+	  ramdisk or as a swap partition. Say Y if you want to include this
+	  driver in the kernel. 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 is called z2ram.o. If you want
+	  to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config ATARI_ACSI
+	tristate "Atari ACSI support"
+	depends on ATARI
+	---help---
+	  This enables support for the Atari ACSI interface. The driver
+	  supports hard disks and CD-ROMs, which have 512-byte sectors, or can
+	  be switched to that mode. Due to the ACSI command format, only disks
+	  up to 1 GB are supported. Special support for certain ACSI to SCSI
+	  adapters, which could relax that, isn't included yet. The ACSI
+	  driver is also the basis for certain other drivers for devices
+	  attached to the ACSI bus: Atari SLM laser printer, BioNet-100
+	  Ethernet, and PAMsNet Ethernet. If you want to use one of these
+	  devices, you need ACSI support, too.
+
+	  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 acsi.o.
+
+comment "Some devices (e.g. CD jukebox) support multiple LUNs"
+	depends on ATARI && ATARI_ACSI
+
+config ACSI_MULTI_LUN
+	bool "Probe all LUNs on each ACSI device"
+	depends on ATARI_ACSI
+	help
+	  If you have a ACSI device that supports more than one LUN (Logical
+	  Unit Number), e.g. a CD jukebox, you should say Y here so that all
+	  will be found by the ACSI driver. An ACSI device with multiple LUNs
+	  acts logically like multiple ACSI devices. The vast majority of ACSI
+	  devices have only one LUN, and so most people can say N here and
+	  should in fact do so, because it is safer.
+
+config ATARI_SLM
+	tristate "Atari SLM laser printer support"
+	depends on ATARI && ATARI_ACSI!=n
+	help
+	  If you have an Atari SLM laser printer, say Y to include support for
+	  it in the kernel. Otherwise, say N. 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
+	  acsi_slm.o. Be warned: the driver needs much ST-RAM and can cause
+	  problems due to that fact!
+
+config BLK_DEV_XD
+	tristate "XT hard disk support"
+	depends on ISA
+	help
+	  Very old 8 bit hard disk controllers used in the IBM XT computer
+	  will be supported if you say Y here.
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called xd.o.
+
+	  It's pretty unlikely that you have one of these: say N.
+
+config PARIDE
+	tristate "Parallel port IDE device support"
+	depends on PARPORT
+	---help---
+	  There are many external CD-ROM and disk devices that connect through
+	  your computer's parallel port. Most of them are actually IDE devices
+	  using a parallel port IDE adapter. This option enables the PARIDE
+	  subsystem which contains drivers for many of these external drives.
+	  Read <file:Documentation/paride.txt> for more information.
+
+	  If you have said Y to the "Parallel-port support" configuration
+	  option, you may share a single port between your printer and other
+	  parallel port devices. Answer Y to build PARIDE support into your
+	  kernel, or M if you would like to build it as a loadable module. If
+	  your parallel port support is in a loadable module, you must build
+	  PARIDE as a module. If you built PARIDE support into your kernel,
+	  you may still build the individual protocol modules and high-level
+	  drivers as loadable modules. If you build this support as a module,
+	  it will be called paride.o.
+
+	  To use the PARIDE support, you must say Y or M here and also to at
+	  least one high-level driver (e.g. "Parallel port IDE disks",
+	  "Parallel port ATAPI CD-ROMs", "Parallel port ATAPI disks" etc.) and
+	  to at least one protocol driver (e.g. "ATEN EH-100 protocol",
+	  "MicroSolutions backpack protocol", "DataStor Commuter protocol"
+	  etc.).
+
+source "drivers/block/paride/Kconfig"
+
+config BLK_CPQ_DA
+	tristate "Compaq SMART2 support"
+	depends on PCI
+	help
+	  This is the driver for Compaq Smart Array controllers.  Everyone
+	  using these boards should say Y here.  See the file
+	  <file:Documentation/cpqarray.txt> for the current list of boards
+	  supported by this driver, and for further information on the use of
+	  this driver.
+
+config BLK_CPQ_CISS_DA
+	tristate "Compaq Smart Array 5xxx support"
+	depends on PCI
+	help
+	  This is the driver for Compaq Smart Array 5xxx controllers.
+	  Everyone using these boards should say Y here.
+	  See <file:Documentation/cciss.txt> for the current list of
+	  boards supported by this driver, and for further information
+	  on the use of this driver.
+
+config CISS_SCSI_TAPE
+	bool "SCSI tape drive support for Smart Array 5xxx"
+	depends on BLK_CPQ_CISS_DA && SCSI
+	help
+	  When enabled (Y), this option allows SCSI tape drives and SCSI medium
+	  changers (tape robots) to be accessed via a Compaq 5xxx array 
+	  controller.  (See Documentation/cciss.txt for more details.)
+
+	  "SCSI support" and "SCSI tape support" must also be enabled for this 
+	  option to work.
+
+	  When this option is disabled (N), the SCSI portion of the driver 
+	  is not compiled.
+
+config BLK_DEV_DAC960
+	tristate "Mylex DAC960/DAC1100 PCI RAID Controller support"
+	depends on PCI
+	help
+	  This driver adds support for the Mylex DAC960, AcceleRAID, and
+	  eXtremeRAID PCI RAID controllers.  See the file
+	  <file:Documentation/README.DAC960> for further information about
+	  this driver.
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called DAC960.o.
+
+config BLK_DEV_UMEM
+	tristate "Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)"
+	depends on PCI && EXPERIMENTAL
+	---help---
+	  Saying Y here will include support for the MM5415 family of
+	  battery backed (Non-volatile) RAM cards.
+	  http://www.umem.com/
+
+	  The cards appear as block devices that can be partitioned into
+	  as many as 15 partitions.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read Documentation/modules.txt. The module will be
+	  called umem.o.
+
+	  The umem driver has not yet been allocated a MAJOR number, so
+	  one is chosen dynamically.  Use "devfs" or look in /proc/devices
+	  for the device number
+
+config BLK_DEV_LOOP
+	tristate "Loopback device support"
+	---help---
+	  Saying Y here will allow you to use a regular file as a block
+	  device; you can then create a file system on that block device and
+	  mount it just as you would mount other block devices such as hard
+	  drive partitions, CD-ROM drives or floppy drives. The loop devices
+	  are block special device files with major number 7 and typically
+	  called /dev/loop0, /dev/loop1 etc.
+
+	  This is useful if you want to check an ISO 9660 file system before
+	  burning the CD, or if you want to use floppy images without first
+	  writing them to floppy. Furthermore, some Linux distributions avoid
+	  the need for a dedicated Linux partition by keeping their complete
+	  root file system inside a DOS FAT file using this loop device
+	  driver.
+
+	  The loop device driver can also be used to "hide" a file system in a
+	  disk partition, floppy, or regular file, either using encryption
+	  (scrambling the data) or steganography (hiding the data in the low
+	  bits of, say, a sound file). This is also safe if the file resides
+	  on a remote file server. If you want to do this, you will first have
+	  to acquire and install a kernel patch from
+	  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
+	  say Y to this option.
+
+	  Note that alternative ways to use encrypted file systems are
+	  provided by the cfs package, which can be gotten from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
+	  package, available at <http://tcfs.dia.unisa.it/>. You do not need
+	  to say Y here if you want to use one of these. However, using cfs
+	  requires saying Y to "NFS file system support" below while using
+	  tcfs requires applying a kernel patch. An alternative steganography
+	  solution is provided by StegFS, also available from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
+
+	  To use the loop device, you need the losetup utility and a recent
+	  version of the mount program, both contained in the util-linux
+	  package. The location and current version number of util-linux is
+	  contained in the file <file:Documentation/Changes>.
+
+	  Note that this loop device has nothing to do with the loopback
+	  device used for network connections from the machine to itself.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called loop.o.
+
+	  Most users will answer N here.
+
+config BLK_DEV_NBD
+	tristate "Network block device support"
+	depends on NET
+	---help---
+	  Saying Y here will allow your computer to be a client for network
+	  block devices, i.e. it will be able to use block devices exported by
+	  servers (mount file systems on them etc.). Communication between
+	  client and server works over TCP/IP networking, but to the client
+	  program this is hidden: it looks like a regular local file access to
+	  a block device special file such as /dev/nd0.
+
+	  Network block devices also allows you to run a block-device in
+	  userland (making server and client physically the same computer,
+	  communicating using the loopback network device).
+
+	  Read <file:Documentation/nbd.txt> for more information, especially
+	  about where to find the server code, which runs in user space and
+	  does not need special kernel support.
+
+	  Note that this has nothing to do with the network file systems NFS
+	  or Coda; you can say N here even if you intend to use NFS or Coda.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called nbd.o.
+
+	  If unsure, say N.
+
+config BLK_DEV_RAM
+	tristate "RAM disk support"
+	---help---
+	  Saying Y here will allow you to use a portion of your RAM memory as
+	  a block device, so that you can make file systems on it, read and
+	  write to it and do all the other things that you can do with normal
+	  block devices (such as hard drives). It is usually used to load and
+	  store a copy of a minimal root file system off of a floppy into RAM
+	  during the initial install of Linux.
+
+	  Note that the kernel command line option "ramdisk=XX" is now
+	  obsolete. For details, read <file:Documentation/ramdisk.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M and read <file:Documentation/modules.txt>. The module will be
+	  called rd.o.
+
+	  Most normal users won't need the RAM disk functionality, and can
+	  thus say N here.
+
+config BLK_DEV_RAM_SIZE
+	int "Default RAM disk size"
+	depends on BLK_DEV_RAM
+	default "4096"
+	help
+	  The default value is 4096. Only change this if you know what are
+	  you doing. If you are using IBM S/390, then set this to 8192.
+
+config BLK_DEV_INITRD
+	bool "Initial RAM disk (initrd) support"
+	depends on BLK_DEV_RAM=y
+	help
+	  The initial RAM disk is a RAM disk that is loaded by the boot loader
+	  (loadlin or lilo) and that is mounted as root before the normal boot
+	  procedure. It is typically used to load modules needed to mount the
+	  "real" root file system, etc. See <file:Documentation/initrd.txt>
+	  for details.
+
+config LBD
+	bool "Support for Large Block Devices"
+	depends on X86
+	help
+	  Say Y here if you want to attach large (bigger than 2TB) discs to
+	  your machine, or if you want to have a raid or loopback device
+	  bigger than 2TB.  Otherwise say N.
+
+endmenu
+
diff -Nru a/drivers/block/acsi.c b/drivers/block/acsi.c
--- a/drivers/block/acsi.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/block/acsi.c	Wed Oct 30 16:44:35 2002
@@ -58,7 +58,6 @@
 #include <linux/delay.h>
 #include <linux/mm.h>
 #include <linux/major.h>
-#define QUEUE (&acsi_queue)
 #include <linux/blk.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
@@ -81,6 +80,8 @@
 
 static void (*do_acsi)(void) = NULL;
 static struct request_queue acsi_queue;
+#define QUEUE (&acsi_queue)
+#define CURRENT elv_next_request(&acsi_queue)
 
 #define DEBUG
 #undef DEBUG_DETECT
diff -Nru a/drivers/block/amiflop.c b/drivers/block/amiflop.c
--- a/drivers/block/amiflop.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/block/amiflop.c	Wed Oct 30 16:44:28 2002
@@ -78,10 +78,6 @@
 #include <asm/amigahw.h>
 #include <asm/amigaints.h>
 #include <asm/irq.h>
-
-#define MAJOR_NR FLOPPY_MAJOR
-#define DEVICE_NAME "floppy"
-#define QUEUE (&floppy_queue)
 #include <linux/blk.h>
 
 #undef DEBUG /* print _LOTS_ of infos */
@@ -125,6 +121,11 @@
 
 static struct request_queue floppy_queue;
 
+#define MAJOR_NR FLOPPY_MAJOR
+#define DEVICE_NAME "floppy"
+#define QUEUE (&floppy_queue)
+#define CURRENT elv_next_request(&floppy_queue)
+
 /*
  *  Macros
  */
@@ -1764,6 +1765,7 @@
 	int drive = *part & 3;
 	if (unit[drive].type->code == FD_NODRIVE)
 		return NULL;
+	*part = 0;
 	return get_disk(unit[drive].gendisk);
 }
 
diff -Nru a/drivers/block/ataflop.c b/drivers/block/ataflop.c
--- a/drivers/block/ataflop.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/block/ataflop.c	Wed Oct 30 16:44:24 2002
@@ -91,10 +91,6 @@
 #include <asm/atariints.h>
 #include <asm/atari_stdma.h>
 #include <asm/atari_stram.h>
-
-#define MAJOR_NR FLOPPY_MAJOR
-#define DEVICE_NAME "floppy"
-#define QUEUE (&floppy_queue)
 #include <linux/blk.h>
 #include <linux/blkpg.h>
 
@@ -104,6 +100,11 @@
 
 static struct request_queue floppy_queue;
 
+#define MAJOR_NR FLOPPY_MAJOR
+#define DEVICE_NAME "floppy"
+#define QUEUE (&floppy_queue)
+#define CURRENT elv_next_request(&floppy_queue)
+
 /* Disk types: DD, HD, ED */
 static struct atari_disk_type {
 	const char	*name;
@@ -1439,8 +1440,8 @@
 {
 	int device, drive, type;
   
-	DPRINT(("redo_fd_request: CURRENT=%08lx CURRENT->dev=%04x CURRENT->sector=%ld\n",
-		(unsigned long)CURRENT, !blk_queue_empty(QUEUE) ? CURRENT->rq_dev : 0,
+	DPRINT(("redo_fd_request: CURRENT=%p dev=%s CURRENT->sector=%ld\n",
+		CURRENT, !blk_queue_empty(QUEUE) ? CURRENT->rq_disk->disk_name : "",
 		!blk_queue_empty(QUEUE) ? CURRENT->sector : 0 ));
 
 	IsFormatting = 0;
@@ -1450,9 +1451,6 @@
 	if (blk_queue_empty(QUEUE))
 		goto the_end;
 
-	if (major(CURRENT->rq_dev) != MAJOR_NR)
-		panic(DEVICE_NAME ": request list destroyed");
-
 	device = minor(CURRENT->rq_dev);
 	drive = device & 3;
 	type = device >> 2;
@@ -1921,6 +1919,7 @@
 	int type  = *part >> 2;
 	if (drive >= FD_MAX_UNITS || type > NUM_DISK_MINORS)
 		return NULL;
+	*part = 0;
 	return get_disk(unit[drive].disk);
 }
 
diff -Nru a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
--- a/drivers/block/cciss_scsi.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/block/cciss_scsi.c	Wed Oct 30 16:44:26 2002
@@ -1489,7 +1489,6 @@
 	driver_template[ctlr].queuecommand = cciss_scsi_queue_command;
 	driver_template[ctlr].eh_abort_handler = NULL;
 	driver_template[ctlr].eh_device_reset_handler = NULL;
-	driver_template[ctlr].bios_param = scsicam_bios_param;
 	driver_template[ctlr].can_queue = SCSI_CCISS_CAN_QUEUE;
 	driver_template[ctlr].this_id = 7;
 	driver_template[ctlr].sg_tablesize = MAXSGENTRIES;
diff -Nru a/drivers/block/cciss_scsi.h b/drivers/block/cciss_scsi.h
--- a/drivers/block/cciss_scsi.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/block/cciss_scsi.h	Wed Oct 30 16:44:28 2002
@@ -48,7 +48,6 @@
 	release:        	cciss_scsi_release,		\
 	proc_info:           	cciss_scsi_proc_info,		\
 	queuecommand:   	cciss_scsi_queue_command,	\
-	bios_param:     	scsicam_bios_param,		\
 	can_queue:      	SCSI_CCISS_CAN_QUEUE,		\
 	this_id:        	7,				\
 	sg_tablesize:   	MAXSGENTRIES, 			\
diff -Nru a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
--- a/drivers/block/cpqarray.c	Wed Oct 30 16:44:23 2002
+++ b/drivers/block/cpqarray.c	Wed Oct 30 16:44:23 2002
@@ -799,23 +799,13 @@
 	if (creq->nr_phys_segments > SG_MAX)
 		BUG();
 
-	if (h->ctlr != major(creq->rq_dev)-MAJOR_NR || h->ctlr > nr_ctlr)
-	{
-		printk(KERN_WARNING "doreq cmd for %d, %x at %p\n",
-				h->ctlr, minor(creq->rq_dev), creq);
-		blkdev_dequeue_request(creq);
-		complete_buffers(creq->bio, 0);
-		end_that_request_last(creq);
-		goto startio;
-	}
-
 	if ((c = cmd_alloc(h,1)) == NULL)
 		goto startio;
 
 	blkdev_dequeue_request(creq);
 
 	c->ctlr = h->ctlr;
-	c->hdr.unit = minor(creq->rq_dev) >> NWD_SHIFT;
+	c->hdr.unit = (drv_info_t *)(creq->rq_disk->private_data) - h->drv;
 	c->hdr.size = sizeof(rblk_t) >> 2;
 	c->size += sizeof(rblk_t);
 
diff -Nru a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c
--- a/drivers/block/deadline-iosched.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/block/deadline-iosched.c	Wed Oct 30 16:44:31 2002
@@ -118,6 +118,7 @@
 
 	while ((entry = next) != hash_list) {
 		next = entry->next;
+		
 		drq = list_entry_hash(entry);
 
 		BUG_ON(!drq->hash_valid_count);
diff -Nru a/drivers/block/elevator.c b/drivers/block/elevator.c
--- a/drivers/block/elevator.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/block/elevator.c	Wed Oct 30 16:44:31 2002
@@ -272,13 +272,27 @@
 		e->elevator_merge_req_fn(q, rq, next);
 }
 
-/*
- * add_request and next_request are required to be supported, naturally
- */
-void __elv_add_request(request_queue_t *q, struct request *rq,
-			  struct list_head *insert_here)
+void __elv_add_request(request_queue_t *q, struct request *rq, int at_end,
+		       int plug)
 {
-	q->elevator.elevator_add_req_fn(q, rq, insert_here);
+	struct list_head *insert = &q->queue_head;
+
+	if (at_end)
+		insert = insert->prev;
+	if (plug)
+		blk_plug_device(q);
+
+	q->elevator.elevator_add_req_fn(q, rq, insert);
+}
+
+void elv_add_request(request_queue_t *q, struct request *rq, int at_end,
+		     int plug)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(q->queue_lock, flags);
+	__elv_add_request(q, rq, at_end, plug);
+	spin_unlock_irqrestore(q->queue_lock, flags);
 }
 
 static inline struct request *__elv_next_request(request_queue_t *q)
@@ -289,8 +303,14 @@
 struct request *elv_next_request(request_queue_t *q)
 {
 	struct request *rq;
+	int ret;
 
 	while ((rq = __elv_next_request(q))) {
+		/*
+		 * just mark as started even if we don't start it, a request
+		 * that has been delayed should not be passed by new incoming
+		 * requests
+		 */
 		rq->flags |= REQ_STARTED;
 
 		if (&rq->queuelist == q->last_merge)
@@ -299,20 +319,22 @@
 		if ((rq->flags & REQ_DONTPREP) || !q->prep_rq_fn)
 			break;
 
-		/*
-		 * all ok, break and return it
-		 */
-		if (!q->prep_rq_fn(q, rq))
+		ret = q->prep_rq_fn(q, rq);
+		if (ret == BLKPREP_OK) {
 			break;
-
-		/*
-		 * prep said no-go, kill it
-		 */
-		blkdev_dequeue_request(rq);
-		if (end_that_request_first(rq, 0, rq->nr_sectors))
-			BUG();
-
-		end_that_request_last(rq);
+		} else if (ret == BLKPREP_DEFER) {
+			rq = NULL;
+			break;
+		} else if (ret == BLKPREP_KILL) {
+			blkdev_dequeue_request(rq);
+			rq->flags |= REQ_QUIET;
+			while (end_that_request_first(rq, 0, rq->nr_sectors))
+				;
+			end_that_request_last(rq);
+		} else {
+			printk("%s: bad return=%d\n", __FUNCTION__, ret);
+			break;
+		}
 	}
 
 	return rq;
@@ -322,6 +344,16 @@
 {
 	elevator_t *e = &q->elevator;
 
+	/*
+	 * the main clearing point for q->last_merge is on retrieval of
+	 * request by driver (it calls elv_next_request()), but it _can_
+	 * also happen here if a request is added to the queue but later
+	 * deleted without ever being given to driver (merged with another
+	 * request).
+	 */
+	if (&rq->queuelist == q->last_merge)
+		q->last_merge = NULL;
+
 	if (e->elevator_remove_req_fn)
 		e->elevator_remove_req_fn(q, rq);
 }
@@ -357,6 +389,7 @@
 
 EXPORT_SYMBOL(elevator_noop);
 
+EXPORT_SYMBOL(elv_add_request);
 EXPORT_SYMBOL(__elv_add_request);
 EXPORT_SYMBOL(elv_next_request);
 EXPORT_SYMBOL(elv_remove_request);
diff -Nru a/drivers/block/floppy.c b/drivers/block/floppy.c
--- a/drivers/block/floppy.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/block/floppy.c	Wed Oct 30 16:44:24 2002
@@ -2297,7 +2297,7 @@
 {
 	if (end_that_request_first(req, uptodate, current_count_sectors))
 		return;
-	add_blkdev_randomness(MAJOR_NR);
+	add_disk_randomness(req->rq_disk);
 	floppy_off((int)req->rq_disk->private_data);
 	blkdev_dequeue_request(req);
 	end_that_request_last(req);
@@ -4210,6 +4210,7 @@
 	    !(allowed_drive_mask & (1 << drive)) ||
 	    fdc_state[FDC(drive)].version == FDC_NONE)
 		return NULL;
+	*part = 0;
 	return get_disk(disks[drive]);
 }
 
diff -Nru a/drivers/block/genhd.c b/drivers/block/genhd.c
--- a/drivers/block/genhd.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/block/genhd.c	Wed Oct 30 16:44:28 2002
@@ -40,7 +40,7 @@
 	unsigned long range;
 	struct module *owner;
 	struct gendisk *(*get)(dev_t dev, int *part, void *data);
-	void (*lock)(dev_t, void *);
+	int (*lock)(dev_t, void *);
 	void *data;
 } *probes[MAX_BLKDEV];
 
@@ -52,7 +52,7 @@
 
 void blk_register_region(dev_t dev, unsigned long range, struct module *module,
 		    struct gendisk *(*probe)(dev_t, int *, void *),
-		    void (*lock)(dev_t, void *), void *data)
+		    int (*lock)(dev_t, void *), void *data)
 {
 	int index = dev_to_index(dev);
 	struct blk_probe *p = kmalloc(sizeof(struct blk_probe), GFP_KERNEL);
@@ -92,15 +92,15 @@
 
 static struct gendisk *exact_match(dev_t dev, int *part, void *data)
 {
-	struct gendisk *p = data;
-	*part = MINOR(dev) - p->first_minor;
-	return p;
+	return data;
 }
 
-static void exact_lock(dev_t dev, void *data)
+static int exact_lock(dev_t dev, void *data)
 {
 	struct gendisk *p = data;
-	get_disk(p);
+	if (!get_disk(p))
+		return -1;
+	return 0;
 }
 
 /**
@@ -167,8 +167,11 @@
 		probe = p->get;
 		best = p->range;
 		*part = dev - p->dev;
-		if (p->lock)
-			p->lock(dev, data);
+		if (p->lock && p->lock(dev, data) < 0) {
+			if (owner)
+				__MOD_DEC_USE_COUNT(owner);
+			continue;
+		}
 		read_unlock(&gendisk_lock);
 		disk = probe(dev, part, data);
 		/* Currently ->owner protects _only_ ->probe() itself. */
@@ -289,6 +292,7 @@
 static void disk_release(struct device *dev)
 {
 	struct gendisk *disk = dev->driver_data;
+	kfree(disk->random);
 	kfree(disk->part);
 	kfree(disk);
 }
@@ -316,11 +320,18 @@
 		disk->disk_dev.driver_data = disk;
 		device_initialize(&disk->disk_dev);
 	}
+	rand_initialize_disk(disk);
 	return disk;
 }
 
 struct gendisk *get_disk(struct gendisk *disk)
 {
+	struct module *owner;
+	if (!disk->fops)
+		return NULL;
+	owner = disk->fops->owner;
+	if (owner && !try_inc_mod_count(owner))
+		return NULL;
 	atomic_inc(&disk->disk_dev.refcount);
 	return disk;
 }
@@ -334,3 +345,40 @@
 EXPORT_SYMBOL(alloc_disk);
 EXPORT_SYMBOL(get_disk);
 EXPORT_SYMBOL(put_disk);
+
+void set_device_ro(struct block_device *bdev, int flag)
+{
+	struct gendisk *disk = bdev->bd_disk;
+	if (bdev->bd_contains != bdev) {
+		int part = bdev->bd_dev - MKDEV(disk->major, disk->first_minor);
+		struct hd_struct *p = &disk->part[part-1];
+		p->policy = flag;
+	} else
+		disk->policy = flag;
+}
+
+void set_disk_ro(struct gendisk *disk, int flag)
+{
+	int i;
+	disk->policy = flag;
+	for (i = 0; i < disk->minors - 1; i++)
+		disk->part[i].policy = flag;
+}
+
+int bdev_read_only(struct block_device *bdev)
+{
+	struct gendisk *disk;
+	if (!bdev)
+		return 0;
+	disk = bdev->bd_disk;
+	if (bdev->bd_contains != bdev) {
+		int part = bdev->bd_dev - MKDEV(disk->major, disk->first_minor);
+		struct hd_struct *p = &disk->part[part-1];
+		return p->policy;
+	} else
+		return disk->policy;
+}
+
+EXPORT_SYMBOL(bdev_read_only);
+EXPORT_SYMBOL(set_device_ro);
+EXPORT_SYMBOL(set_disk_ro);
diff -Nru a/drivers/block/ioctl.c b/drivers/block/ioctl.c
--- a/drivers/block/ioctl.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/block/ioctl.c	Wed Oct 30 16:44:19 2002
@@ -122,6 +122,7 @@
 			unsigned long arg)
 {
 	struct block_device *bdev = inode->i_bdev;
+	struct gendisk *disk = bdev->bd_disk;
 	struct backing_dev_info *bdi;
 	int holder;
 	int ret, n;
@@ -146,7 +147,7 @@
 	case BLKSSZGET: /* get block device hardware sector size */
 		return put_int(arg, bdev_hardsect_size(bdev));
 	case BLKSECTGET:
-		return put_ushort(arg, bdev->bd_queue->max_sectors);
+		return put_ushort(arg, bdev_get_queue(bdev)->max_sectors);
 	case BLKRASET:
 	case BLKFRASET:
 		if(!capable(CAP_SYS_ADMIN))
@@ -184,8 +185,8 @@
 	case BLKFLSBUF:
 		if (!capable(CAP_SYS_ADMIN))
 			return -EACCES;
-		if (bdev->bd_op->ioctl) {
-			ret = bdev->bd_op->ioctl(inode, file, cmd, arg);
+		if (disk->fops->ioctl) {
+			ret = disk->fops->ioctl(inode, file, cmd, arg);
 			if (ret != -EINVAL)
 				return ret;
 		}
@@ -193,8 +194,8 @@
 		invalidate_bdev(bdev, 0);
 		return 0;
 	case BLKROSET:
-		if (bdev->bd_op->ioctl) {
-			ret = bdev->bd_op->ioctl(inode, file, cmd, arg);
+		if (disk->fops->ioctl) {
+			ret = disk->fops->ioctl(inode, file, cmd, arg);
 			if (ret != -EINVAL)
 				return ret;
 		}
@@ -202,11 +203,11 @@
 			return -EACCES;
 		if (get_user(n, (int *)(arg)))
 			return -EFAULT;
-		set_device_ro(to_kdev_t(bdev->bd_dev), n);
+		set_device_ro(bdev, n);
 		return 0;
 	default:
-		if (bdev->bd_op->ioctl) {
-			ret = bdev->bd_op->ioctl(inode, file, cmd, arg);
+		if (disk->fops->ioctl) {
+			ret = disk->fops->ioctl(inode, file, cmd, arg);
 			if (ret != -EINVAL)
 				return ret;
 		}
diff -Nru a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
--- a/drivers/block/ll_rw_blk.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/block/ll_rw_blk.c	Wed Oct 30 16:44:21 2002
@@ -39,12 +39,6 @@
 static LIST_HEAD(blk_plug_list);
 static spinlock_t blk_plug_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 
-/* blk_dev_struct is:
- *	request_queue
- *	*queue
- */
-struct blk_dev_struct blk_dev[MAX_BLKDEV]; /* initialized by blk_dev_init() */
-
 /*
  * Number of requests per queue.  This many for reads and for writes (twice
  * this number, total).
@@ -139,22 +133,6 @@
 }
 
 /**
- * bdev_get_queue: - return the queue that matches the given device
- * @bdev:    device
- *
- * Description:
- *     Given a specific device, return the queue that will hold I/O
- *     for it. This is either a &struct blk_dev_struct lookup and a
- *     call to the ->queue() function defined, or the default queue
- *     stored in the same location.
- *
- **/
-inline request_queue_t *bdev_get_queue(struct block_device *bdev)
-{
-	return bdev->bd_queue;
-}
-
-/**
  * blk_get_backing_dev_info - get the address of a queue's backing_dev_info
  * @dev:	device
  *
@@ -242,6 +220,7 @@
 	q->backing_dev_info.state = 0;
 	blk_queue_max_sectors(q, MAX_SECTORS);
 	blk_queue_hardsect_size(q, 512);
+	blk_queue_dma_alignment(q, 511);
 
 	/*
 	 * by default assume old behaviour and bounce for any highmem page
@@ -408,6 +387,21 @@
 	q->seg_boundary_mask = mask;
 }
 
+/**
+ * blk_queue_dma_alignment - set dma length and memory alignment
+ * @q:  the request queue for the device
+ * @dma_mask:  alignment mask
+ *
+ * description:
+ *    set required memory and length aligment for direct dma transactions.
+ *    this is used when buiding direct io requests for the queue.
+ *
+ **/
+void blk_queue_dma_alignment(request_queue_t *q, int mask)
+{
+	q->dma_alignment = mask;
+}
+
 void blk_queue_assign_lock(request_queue_t *q, spinlock_t *lock)
 {
 	spin_lock_init(lock);
@@ -549,7 +543,7 @@
 		return;
 	}
 
-	list_del(&rq->queuelist);
+	list_del_init(&rq->queuelist);
 	rq->flags &= ~REQ_QUEUED;
 	rq->tag = -1;
 
@@ -633,13 +627,13 @@
 
 		if (rq->tag == -1) {
 			printk("bad tag found on list\n");
-			list_del(&rq->queuelist);
+			list_del_init(&rq->queuelist);
 			rq->flags &= ~REQ_QUEUED;
 		} else
 			blk_queue_end_tag(q, rq);
 
 		rq->flags &= ~REQ_STARTED;
-		elv_add_request(q, rq, 0);
+		__elv_add_request(q, rq, 0, 0);
 	}
 }
 
@@ -655,14 +649,19 @@
 	"REQ_PC",
 	"REQ_BLOCK_PC",
 	"REQ_SENSE",
+	"REQ_FAILED",
+	"REQ_QUIET",
 	"REQ_SPECIAL"
+	"REQ_DRIVE_CMD",
+	"REQ_DRIVE_TASK",
+	"REQ_DRIVE_TASKFILE",
 };
 
 void blk_dump_rq_flags(struct request *rq, char *msg)
 {
 	int bit;
 
-	printk("%s: dev %02x:%02x: ", msg, major(rq->rq_dev), minor(rq->rq_dev));
+	printk("%s: dev %02x:%02x: flags = ", msg, major(rq->rq_dev), minor(rq->rq_dev));
 	bit = 0;
 	do {
 		if (rq->flags & (1 << bit))
@@ -670,10 +669,17 @@
 		bit++;
 	} while (bit < __REQ_NR_BITS);
 
-	printk("sector %llu, nr/cnr %lu/%u\n", (unsigned long long)rq->sector,
+	printk("\nsector %llu, nr/cnr %lu/%u\n", (unsigned long long)rq->sector,
 						       rq->nr_sectors,
 						       rq->current_nr_sectors);
-	printk("bio %p, biotail %p\n", rq->bio, rq->biotail);
+	printk("bio %p, biotail %p, buffer %p, data %p, len %u\n", rq->bio, rq->biotail, rq->buffer, rq->data, rq->data_len);
+
+	if (rq->flags & (REQ_BLOCK_PC | REQ_PC)) {
+		printk("cdb: ");
+		for (bit = 0; bit < sizeof(rq->cmd); bit++)
+			printk("%02x ", rq->cmd[bit]);
+		printk("\n");
+	}
 }
 
 void blk_recount_segments(request_queue_t *q, struct bio *bio)
@@ -1104,7 +1110,7 @@
 
 	while (!list_empty(head)) {
 		rq = list_entry(head->next, struct request, queuelist);
-		list_del(&rq->queuelist);
+		list_del_init(&rq->queuelist);
 		kmem_cache_free(request_cachep, rq);
 		i++;
 	}
@@ -1264,13 +1270,20 @@
 
 	if (!list_empty(&rl->free)) {
 		rq = blkdev_free_rq(&rl->free);
-		list_del(&rq->queuelist);
+		list_del_init(&rq->queuelist);
+		rq->ref_count = 1;
 		rl->count--;
 		if (rl->count < queue_congestion_on_threshold())
 			set_queue_congested(q, rw);
 		rq->flags = 0;
 		rq->rq_status = RQ_ACTIVE;
+		rq->errors = 0;
 		rq->special = NULL;
+		rq->buffer = NULL;
+		rq->data = NULL;
+		rq->sense = NULL;
+		rq->waiting = NULL;
+		rq->bio = rq->biotail = NULL;
 		rq->q = q;
 		rq->rl = rl;
 	}
@@ -1386,39 +1399,11 @@
 	if (blk_rq_tagged(rq))
 		blk_queue_end_tag(q, rq);
 
-	_elv_add_request(q, rq, !at_head, 0);
+	__elv_add_request(q, rq, !at_head, 0);
 	q->request_fn(q);
 	spin_unlock_irqrestore(q->queue_lock, flags);
 }
 
-/* RO fail safe mechanism */
-
-static long ro_bits[MAX_BLKDEV][8];
-
-int bdev_read_only(struct block_device *bdev)
-{
-	int minor,major;
-
-	if (!bdev)
-		return 0;
-	major = MAJOR(bdev->bd_dev);
-	minor = MINOR(bdev->bd_dev);
-	if (major < 0 || major >= MAX_BLKDEV)
-		return 0;
-	return ro_bits[major][minor >> 5] & (1 << (minor & 31));
-}
-
-void set_device_ro(kdev_t dev,int flag)
-{
-	int minor,major;
-
-	major = major(dev);
-	minor = minor(dev);
-	if (major < 0 || major >= MAX_BLKDEV) return;
-	if (flag) ro_bits[major][minor >> 5] |= 1 << (minor & 31);
-	else ro_bits[major][minor >> 5] &= ~(1 << (minor & 31));
-}
-
 void drive_stat_acct(struct request *rq, int nr_sectors, int new_io)
 {
 	unsigned int major = major(rq->rq_dev);
@@ -1429,11 +1414,17 @@
 		return;
 
 	if (rw == READ) {
-		rq->rq_disk->rio += new_io;
-		rq->rq_disk->reads += nr_sectors;
+		rq->rq_disk->read_sectors += nr_sectors;
+		if (!new_io)
+			rq->rq_disk->read_merges++;
 	} else if (rw == WRITE) {
-		rq->rq_disk->wio += new_io;
-		rq->rq_disk->writes += nr_sectors;
+		rq->rq_disk->write_sectors += nr_sectors;
+		if (!new_io)
+			rq->rq_disk->write_merges++;
+	}
+	if (new_io) {
+		disk_round_stats(rq->rq_disk);
+		rq->rq_disk->in_flight++;
 	}
 
 	index = rq->rq_disk->first_minor >> rq->rq_disk->minor_shift;
@@ -1466,26 +1457,49 @@
 	 * elevator indicated where it wants this request to be
 	 * inserted at elevator_merge time
 	 */
-	__elv_add_request(q, req, insert_here);
+	__elv_add_request_pos(q, req, insert_here);
 }
-
+ 
 /*
- * Must be called with queue lock held and interrupts disabled
+ * disk_round_stats()	- Round off the performance stats on a struct
+ * disk_stats.
+ *
+ * The average IO queue length and utilisation statistics are maintained
+ * by observing the current state of the queue length and the amount of
+ * time it has been in this state for.
+ *
+ * Normally, that accounting is done on IO completion, but that can result
+ * in more than a second's worth of IO being accounted for within any one
+ * second, leading to >100% utilisation.  To deal with that, we call this
+ * function to do a round-off before returning the results when reading
+ * /proc/diskstats.  This accounts immediately for all queue usage up to
+ * the current jiffies and restarts the counters again.
  */
-void blk_put_request(struct request *req)
+void disk_round_stats(struct gendisk *disk)
+{
+	unsigned long now = jiffies;
+
+	disk->time_in_queue += disk->in_flight * (now - disk->stamp);
+	disk->stamp = now;
+
+	if (disk->in_flight)
+		disk->io_ticks += (now - disk->stamp_idle);
+	disk->stamp_idle = now;
+}
+
+void __blk_put_request(request_queue_t *q, struct request *req)
 {
 	struct request_list *rl = req->rl;
-	request_queue_t *q = req->q;
+
+	if (unlikely(--req->ref_count))
+		return;
+	if (unlikely(!q))
+		return;
 
 	req->rq_status = RQ_INACTIVE;
 	req->q = NULL;
 	req->rl = NULL;
 
-	if (q) {
-		if (q->last_merge == &req->queuelist)
-			q->last_merge = NULL;
-	}
-
 	/*
 	 * Request may not have originated from ll_rw_blk. if not,
 	 * it didn't come out of our reserved rq pools
@@ -1493,6 +1507,8 @@
 	if (rl) {
 		int rw = 0;
 
+		BUG_ON(!list_empty(&req->queuelist));
+
 		list_add(&req->queuelist, &rl->free);
 
 		if (rl == &q->rq[WRITE])
@@ -1510,6 +1526,23 @@
 	}
 }
 
+void blk_put_request(struct request *req)
+{
+	request_queue_t *q = req->q;
+	
+	/*
+	 * if req->q isn't set, this request didnt originate from the
+	 * block layer, so it's safe to just disregard it
+	 */
+	if (q) {
+		unsigned long flags;
+
+		spin_lock_irqsave(q->queue_lock, flags);
+		__blk_put_request(q, req);
+		spin_unlock_irqrestore(q->queue_lock, flags);
+	}
+}
+
 /**
  * blk_congestion_wait - wait for a queue to become uncongested
  * @rw: READ or WRITE
@@ -1567,8 +1600,13 @@
 
 		elv_merge_requests(q, req, next);
 
+		if (req->rq_disk) {
+			disk_round_stats(req->rq_disk);
+			req->rq_disk->in_flight--;
+		}
+
 		blkdev_dequeue_request(next);
-		blk_put_request(next);
+		__blk_put_request(q, next);
 	}
 }
 
@@ -1758,10 +1796,11 @@
 	req->bio = req->biotail = bio;
 	req->rq_dev = to_kdev_t(bio->bi_bdev->bd_dev);
 	req->rq_disk = bio->bi_bdev->bd_disk;
+	req->start_time = jiffies;
 	add_request(q, req, insert_here);
 out:
 	if (freereq)
-		blk_put_request(freereq);
+		__blk_put_request(q, freereq);
 	spin_unlock_irq(q->queue_lock);
 	return 0;
 
@@ -1777,12 +1816,24 @@
 static inline void blk_partition_remap(struct bio *bio)
 {
 	struct block_device *bdev = bio->bi_bdev;
+	struct gendisk *disk = bdev->bd_disk;
+	struct hd_struct *p;
 	if (bdev == bdev->bd_contains)
 		return;
 
+	p = &disk->part[bdev->bd_dev-MKDEV(disk->major,disk->first_minor)-1];
+	switch (bio->bi_rw) {
+	case READ:
+		p->read_sectors += bio_sectors(bio);
+		p->reads++;
+		break;
+	case WRITE:
+		p->write_sectors += bio_sectors(bio);
+		p->writes++;
+		break;
+	}
 	bio->bi_sector += bdev->bd_offset;
 	bio->bi_bdev = bdev->bd_contains;
-	/* lots of checks are possible */
 }
 
 /**
@@ -1891,7 +1942,6 @@
 {
 	int count = bio_sectors(bio);
 
-	BUG_ON(!bio->bi_end_io);
 	BIO_BUG_ON(!bio->bi_size);
 	BIO_BUG_ON(!bio->bi_io_vec);
 	bio->bi_rw = rw;
@@ -1908,6 +1958,9 @@
 	struct bio *bio;
 	int nr_phys_segs, nr_hw_segs;
 
+	if (!rq->bio)
+		return;
+
 	rq->buffer = bio_data(rq->bio);
 
 	nr_phys_segs = nr_hw_segs = 0;
@@ -1925,7 +1978,7 @@
 
 inline void blk_recalc_rq_sectors(struct request *rq, int nsect)
 {
-	if (rq->bio) {
+	if (blk_fs_request(rq)) {
 		rq->hard_sector += nsect;
 		rq->nr_sectors = rq->hard_nr_sectors -= nsect;
 		rq->sector = rq->hard_sector;
@@ -1944,27 +1997,19 @@
 	}
 }
 
-/**
- * end_that_request_first - end I/O on one buffer.
- * @req:      the request being processed
- * @uptodate: 0 for I/O error
- * @nr_sectors: number of sectors to end I/O on
- *
- * Description:
- *     Ends I/O on a number of sectors attached to @req, and sets it up
- *     for the next range of segments (if any) in the cluster.
- *
- * Return:
- *     0 - we are done with this request, call end_that_request_last()
- *     1 - still buffers pending for this request
- **/
-
-int end_that_request_first(struct request *req, int uptodate, int nr_sectors)
+static int __end_that_request_first(struct request *req, int uptodate,
+				    int nr_bytes)
 {
-	int total_nsect = 0, error = 0;
+	int total_bytes, bio_nbytes, error = 0, next_idx = 0;
 	struct bio *bio;
 
-	req->errors = 0;
+	/*
+	 * for a REQ_BLOCK_PC request, we want to carry any eventual
+	 * sense key with us all the way through
+	 */
+	if (!blk_pc_request(req))
+		req->errors = 0;
+
 	if (!uptodate) {
 		error = -EIO;
 		if (!(req->flags & REQ_QUIET))
@@ -1973,56 +2018,56 @@
 				(unsigned long long)req->sector);
 	}
 
+	total_bytes = bio_nbytes = 0;
 	while ((bio = req->bio)) {
-		int new_bio = 0, nsect;
+		int nbytes;
 
-		if (unlikely(bio->bi_idx >= bio->bi_vcnt)) {
-			printk("%s: bio idx %d >= vcnt %d\n", __FUNCTION__,
+		if (nr_bytes >= bio->bi_size) {
+			req->bio = bio->bi_next;
+			nbytes = bio->bi_size;
+			bio_endio(bio, nbytes, error);
+			next_idx = 0;
+			bio_nbytes = 0;
+		} else {
+			int idx = bio->bi_idx + next_idx;
+
+			if (unlikely(bio->bi_idx >= bio->bi_vcnt)) {
+				blk_dump_rq_flags(req, "__end_that");
+				printk("%s: bio idx %d >= vcnt %d\n",
+						__FUNCTION__,
 						bio->bi_idx, bio->bi_vcnt);
-			break;
-		}
+				break;
+			}
 
-		BIO_BUG_ON(bio_iovec(bio)->bv_len > bio->bi_size);
+			nbytes = bio_iovec_idx(bio, idx)->bv_len;
+			BIO_BUG_ON(nbytes > bio->bi_size);
 
-		/*
-		 * not a complete bvec done
-		 */
-		nsect = bio_iovec(bio)->bv_len >> 9;
-		if (unlikely(nsect > nr_sectors)) {
-			int partial = nr_sectors << 9;
-
-			bio_iovec(bio)->bv_offset += partial;
-			bio_iovec(bio)->bv_len -= partial;
-			bio_endio(bio, partial, error);
-			total_nsect += nr_sectors;
-			break;
-		}
+			/*
+			 * not a complete bvec done
+			 */
+			if (unlikely(nbytes > nr_bytes)) {
+				bio_iovec(bio)->bv_offset += nr_bytes;
+				bio_iovec(bio)->bv_len -= nr_bytes;
+				bio_nbytes += nr_bytes;
+				total_bytes += nr_bytes;
+				break;
+			}
 
-		/*
-		 * we are ending the last part of the bio, advance req pointer
-		 */
-		if ((nsect << 9) >= bio->bi_size) {
-			req->bio = bio->bi_next;
-			new_bio = 1;
+			/*
+			 * advance to the next vector
+			 */
+			next_idx++;
+			bio_nbytes += nbytes;
 		}
 
-		bio_endio(bio, nsect << 9, error);
-
-		total_nsect += nsect;
-		nr_sectors -= nsect;
-
-		/*
-		 * if we didn't advance the req->bio pointer, advance bi_idx
-		 * to indicate we are now on the next bio_vec
-		 */
-		if (!new_bio)
-			bio->bi_idx++;
+		total_bytes += nbytes;
+		nr_bytes -= nbytes;
 
 		if ((bio = req->bio)) {
 			/*
 			 * end more in this run, or just return 'not-done'
 			 */
-			if (unlikely(nr_sectors <= 0))
+			if (unlikely(nr_bytes <= 0))
 				break;
 		}
 	}
@@ -2036,17 +2081,80 @@
 	/*
 	 * if the request wasn't completed, update state
 	 */
-	blk_recalc_rq_sectors(req, total_nsect);
+	if (bio_nbytes) {
+		bio_endio(bio, bio_nbytes, error);
+		req->bio->bi_idx += next_idx;
+	}
+
+	blk_recalc_rq_sectors(req, total_bytes >> 9);
 	blk_recalc_rq_segments(req);
 	return 1;
 }
 
+/**
+ * end_that_request_first - end I/O on a request
+ * @req:      the request being processed
+ * @uptodate: 0 for I/O error
+ * @nr_sectors: number of sectors to end I/O on
+ *
+ * Description:
+ *     Ends I/O on a number of sectors attached to @req, and sets it up
+ *     for the next range of segments (if any) in the cluster.
+ *
+ * Return:
+ *     0 - we are done with this request, call end_that_request_last()
+ *     1 - still buffers pending for this request
+ **/
+int end_that_request_first(struct request *req, int uptodate, int nr_sectors)
+{
+	return __end_that_request_first(req, uptodate, nr_sectors << 9);
+}
+
+/**
+ * end_that_request_chunk - end I/O on a request
+ * @req:      the request being processed
+ * @uptodate: 0 for I/O error
+ * @nr_bytes: number of bytes to complete
+ *
+ * Description:
+ *     Ends I/O on a number of bytes attached to @req, and sets it up
+ *     for the next range of segments (if any). Like end_that_request_first(),
+ *     but deals with bytes instead of sectors.
+ *
+ * Return:
+ *     0 - we are done with this request, call end_that_request_last()
+ *     1 - still buffers pending for this request
+ **/
+int end_that_request_chunk(struct request *req, int uptodate, int nr_bytes)
+{
+	return __end_that_request_first(req, uptodate, nr_bytes);
+}
+
+/*
+ * queue lock must be held
+ */
 void end_that_request_last(struct request *req)
 {
+	struct gendisk *disk = req->rq_disk;
 	if (req->waiting)
 		complete(req->waiting);
 
-	blk_put_request(req);
+	if (disk) {
+		unsigned long duration = jiffies - req->start_time;
+		switch (rq_data_dir(req)) {
+		    case WRITE:
+			disk->writes++;
+			disk->write_ticks += duration;
+			break;
+		    case READ:
+			disk->reads++;
+			disk->read_ticks += duration;
+			break;
+		}
+		disk_round_stats(disk);
+		disk->in_flight--;
+	}
+	__blk_put_request(req->q, req);
 }
 
 int __init blk_dev_init(void)
@@ -2092,9 +2200,9 @@
 };
 
 EXPORT_SYMBOL(end_that_request_first);
+EXPORT_SYMBOL(end_that_request_chunk);
 EXPORT_SYMBOL(end_that_request_last);
 EXPORT_SYMBOL(blk_init_queue);
-EXPORT_SYMBOL(bdev_get_queue);
 EXPORT_SYMBOL(blk_cleanup_queue);
 EXPORT_SYMBOL(blk_queue_make_request);
 EXPORT_SYMBOL(blk_queue_bounce_limit);
@@ -2112,6 +2220,7 @@
 EXPORT_SYMBOL(blk_queue_max_segment_size);
 EXPORT_SYMBOL(blk_queue_hardsect_size);
 EXPORT_SYMBOL(blk_queue_segment_boundary);
+EXPORT_SYMBOL(blk_queue_dma_alignment);
 EXPORT_SYMBOL(blk_rq_map_sg);
 EXPORT_SYMBOL(blk_nohighio);
 EXPORT_SYMBOL(blk_dump_rq_flags);
diff -Nru a/drivers/block/loop.c b/drivers/block/loop.c
--- a/drivers/block/loop.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/block/loop.c	Wed Oct 30 16:44:29 2002
@@ -338,15 +338,10 @@
 	return ret;
 }
 
-static inline int loop_get_bs(struct loop_device *lo)
-{
-	return block_size(lo->lo_device);
-}
-
 static inline unsigned long loop_get_iv(struct loop_device *lo,
 					unsigned long sector)
 {
-	int bs = loop_get_bs(lo);
+	int bs = lo->lo_blocksize;
 	unsigned long offset, IV;
 
 	IV = sector / (bs >> 9) + lo->lo_offset / bs;
@@ -366,9 +361,9 @@
 
 	do {
 		if (bio_rw(bio) == WRITE)
-			ret = lo_send(lo, bio, loop_get_bs(lo), pos);
+			ret = lo_send(lo, bio, lo->lo_blocksize, pos);
 		else
-			ret = lo_receive(lo, bio, loop_get_bs(lo), pos);
+			ret = lo_receive(lo, bio, lo->lo_blocksize, pos);
 
 	} while (++bio->bi_idx < bio->bi_vcnt);
 
@@ -442,7 +437,7 @@
 	if (bio->bi_size)
 		return 1;
 
-	if (!err || bio_rw(bio) == WRITE) {
+	if (err || bio_rw(bio) == WRITE) {
 		bio_endio(rbh, rbh->bi_size, err);
 		if (atomic_dec_and_test(&lo->lo_pending))
 			up(&lo->lo_bh_mutex);
@@ -650,8 +645,8 @@
 {
 	struct file	*file;
 	struct inode	*inode;
-	kdev_t		dev = to_kdev_t(bdev->bd_dev);
-	struct block_device *lo_device;
+	struct block_device *lo_device = NULL;
+	unsigned lo_blocksize;
 	int		lo_flags = 0;
 	int		error;
 
@@ -678,6 +673,9 @@
 			error = -EBUSY;
 			goto out;
 		}
+		lo_blocksize = block_size(lo_device);
+		if (bdev_read_only(lo_device))
+			lo_flags |= LO_FLAGS_READ_ONLY;
 	} else if (S_ISREG(inode->i_mode)) {
 		struct address_space_operations *aops = inode->i_mapping->a_ops;
 		/*
@@ -690,7 +688,7 @@
 		if (!aops->prepare_write || !aops->commit_write)
 			lo_flags |= LO_FLAGS_READ_ONLY;
 
-		lo_device = inode->i_sb->s_bdev;
+		lo_blocksize = inode->i_blksize;
 		lo_flags |= LO_FLAGS_DO_BMAP;
 		error = 0;
 	} else
@@ -698,12 +696,12 @@
 
 	get_file(file);
 
-	if (IS_RDONLY (inode) || bdev_read_only(lo_device)
-	    || !(lo_file->f_mode & FMODE_WRITE))
+	if (!(lo_file->f_mode & FMODE_WRITE))
 		lo_flags |= LO_FLAGS_READ_ONLY;
 
-	set_device_ro(dev, (lo_flags & LO_FLAGS_READ_ONLY) != 0);
+	set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0);
 
+	lo->lo_blocksize = lo_blocksize;
 	lo->lo_device = lo_device;
 	lo->lo_flags = lo_flags;
 	lo->lo_backing_file = file;
@@ -717,7 +715,7 @@
 	lo->old_gfp_mask = inode->i_mapping->gfp_mask;
 	inode->i_mapping->gfp_mask = GFP_NOIO;
 
-	set_blocksize(bdev, block_size(lo_device));
+	set_blocksize(bdev, lo_blocksize);
 
 	lo->lo_bio = lo->lo_biotail = NULL;
 
@@ -900,7 +898,7 @@
 	info.lo_number = lo->lo_number;
 	info.lo_device = stat.dev;
 	info.lo_inode = stat.ino;
-	info.lo_rdevice = lo->lo_device->bd_dev;
+	info.lo_rdevice = lo->lo_device ? stat.rdev : stat.dev;
 	info.lo_offset = lo->lo_offset;
 	info.lo_flags = lo->lo_flags;
 	strncpy(info.lo_name, lo->lo_name, LO_NAME_SIZE);
diff -Nru a/drivers/block/paride/Config.help b/drivers/block/paride/Config.help
--- a/drivers/block/paride/Config.help	Wed Oct 30 16:44:22 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,223 +0,0 @@
-CONFIG_PARIDE_PD
-  This option enables the high-level driver for IDE-type disk devices
-  connected through a parallel port. If you chose to build PARIDE
-  support into your kernel, you may answer Y here to build in the
-  parallel port IDE driver, otherwise you should answer M to build
-  it as a loadable module. The module will be called pd.o. You
-  must also have at least one parallel port protocol driver in your
-  system. Among the devices supported by this driver are the SyQuest
-  EZ-135, EZ-230 and SparQ drives, the Avatar Shark and the backpack
-  hard drives from MicroSolutions.
-
-CONFIG_PARIDE_PCD
-  This option enables the high-level driver for ATAPI CD-ROM devices
-  connected through a parallel port. If you chose to build PARIDE
-  support into your kernel, you may answer Y here to build in the
-  parallel port ATAPI CD-ROM driver, otherwise you should answer M to
-  build it as a loadable module. The module will be called pcd.o. You
-  must also have at least one parallel port protocol driver in your
-  system. Among the devices supported by this driver are the
-  MicroSolutions backpack CD-ROM drives and the Freecom Power CD. If
-  you have such a CD-ROM drive, you should also say Y or M to "ISO
-  9660 CD-ROM file system support" below, because that's the file
-  system used on CD-ROMs.
-
-CONFIG_PARIDE_PF
-  This option enables the high-level driver for ATAPI disk devices
-  connected through a parallel port. If you chose to build PARIDE
-  support into your kernel, you may answer Y here to build in the
-  parallel port ATAPI disk driver, otherwise you should answer M
-  to build it as a loadable module. The module will be called pf.o.
-  You must also have at least one parallel port protocol driver in
-  your system. Among the devices supported by this driver are the
-  MicroSolutions backpack PD/CD drive and the Imation Superdisk
-  LS-120 drive.
-
-CONFIG_PARIDE_PT
-  This option enables the high-level driver for ATAPI tape devices
-  connected through a parallel port. If you chose to build PARIDE
-  support into your kernel, you may answer Y here to build in the
-  parallel port ATAPI disk driver, otherwise you should answer M
-  to build it as a loadable module. The module will be called pt.o.
-  You must also have at least one parallel port protocol driver in
-  your system. Among the devices supported by this driver is the
-  parallel port version of the HP 5GB drive.
-
-CONFIG_PARIDE_PG
-  This option enables a special high-level driver for generic ATAPI
-  devices connected through a parallel port. The driver allows user
-  programs, such as cdrtools, to send ATAPI commands directly to a
-  device.
-
-  If you chose to build PARIDE support into your kernel, you may
-  answer Y here to build in the parallel port generic ATAPI driver,
-  otherwise you should answer M to build it as a loadable module. The
-  module will be called pg.o.
-
-  You must also have at least one parallel port protocol driver in
-  your system.
-
-  This driver implements an API loosely related to the generic SCSI
-  driver. See <file:include/linux/pg.h>. for details.
-
-  You can obtain the most recent version of cdrtools from
-  <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/>. Versions 1.6.1a3 and
-  later fully support this driver.
-
-CONFIG_PARIDE_ATEN
-  This option enables support for the ATEN EH-100 parallel port IDE
-  protocol. This protocol is used in some inexpensive low performance
-  parallel port kits made in Hong Kong. If you chose to build PARIDE
-  support into your kernel, you may answer Y here to build in the
-  protocol driver, otherwise you should answer M to build it as a
-  loadable module. The module will be called aten.o. You must also
-  have a high-level driver for the type of device that you want to
-  support.
-
-CONFIG_PARIDE_BPCK
-  This option enables support for the Micro Solutions BACKPACK
-  parallel port Series 5 IDE protocol.  (Most BACKPACK drives made
-  before 1999 were Series 5) Series 5 drives will NOT always have the
-  Series noted on the bottom of the drive. Series 6 drivers will.
-
-  In other words, if your BACKPACK drive dosen't say "Series 6" on the
-  bottom, enable this option.
-
-  If you chose to build PARIDE support into your kernel, you may
-  answer Y here to build in the protocol driver, otherwise you should
-  answer M to build it as a loadable module.  The module will be
-  called bpck.o.  You must also have a high-level driver for the type
-  of device that you want to support.
-
-CONFIG_PARIDE_BPCK6
-  This option enables support for the Micro Solutions BACKPACK
-  parallel port Series 6 IDE protocol.  (Most BACKPACK drives made
-  after 1999 were Series 6) Series 6 drives will have the Series noted
-  on the bottom of the drive.  Series 5 drivers don't always have it
-  noted.
-
-  In other words, if your BACKPACK drive says "Series 6" on the
-  bottom, enable this option.
-
-  If you chose to build PARIDE support into your kernel, you may
-  answer Y here to build in the protocol driver, otherwise you should
-  answer M to build it as a loadable module.  The module will be
-  called bpck6.o.  You must also have a high-level driver for the type
-  of device that you want to support.
-
-CONFIG_PARIDE_COMM
-  This option enables support for the Commuter parallel port IDE
-  protocol from DataStor. If you chose to build PARIDE support
-  into your kernel, you may answer Y here to build in the protocol
-  driver, otherwise you should answer M to build it as a loadable
-  module. The module will be called comm.o. You must also have
-  a high-level driver for the type of device that you want to support.
-
-CONFIG_PARIDE_DSTR
-  This option enables support for the EP-2000 parallel port IDE
-  protocol from DataStor. If you chose to build PARIDE support
-  into your kernel, you may answer Y here to build in the protocol
-  driver, otherwise you should answer M to build it as a loadable
-  module. The module will be called dstr.o. You must also have
-  a high-level driver for the type of device that you want to support.
-
-CONFIG_PARIDE_EPAT
-  This option enables support for the EPAT parallel port IDE protocol.
-  EPAT is a parallel port IDE adapter manufactured by Shuttle
-  Technology and widely used in devices from major vendors such as
-  Hewlett-Packard, SyQuest, Imation and Avatar. If you chose to build
-  PARIDE support into your kernel, you may answer Y here to build in
-  the protocol driver, otherwise you should answer M to build it as a
-  loadable module. The module will be called epat.o. You must also
-  have a high-level driver for the type of device that you want to
-  support.
-
-CONFIG_PARIDE_EPATC8
-  This option enables support for the newer Shuttle EP1284 (aka c7 and
-  c8) chip. You need this if you are using any recent Imation SuperDisk
-  (LS-120) drive.
-
-CONFIG_PARIDE_EPIA
-  This option enables support for the (obsolete) EPIA parallel port
-  IDE protocol from Shuttle Technology. This adapter can still be
-  found in some no-name kits. If you chose to build PARIDE support
-  into your kernel, you may answer Y here to build in the protocol
-  driver, otherwise you should answer M to build it as a loadable
-  module. The module will be called epia.o. You must also have a
-  high-level driver for the type of device that you want to support.
-
-CONFIG_PARIDE_FIT2
-  This option enables support for the TD-2000 parallel port IDE
-  protocol from Fidelity International Technology. This is a simple
-  (low speed) adapter that is used in some portable hard drives. If
-  you chose to build PARIDE support into your kernel, you may answer Y
-  here to build in the protocol driver, otherwise you should answer M
-  to build it as a loadable module. The module will be called ktti.o.
-  You must also have a high-level driver for the type of device that
-  you want to support.
-
-CONFIG_PARIDE_FIT3
-  This option enables support for the TD-3000 parallel port IDE
-  protocol from Fidelity International Technology. This protocol is
-  used in newer models of their portable disk, CD-ROM and PD/CD
-  devices. If you chose to build PARIDE support into your kernel, you
-  may answer Y here to build in the protocol driver, otherwise you
-  should answer M to build it as a loadable module. The module will be
-  called fit3.o. You must also have a high-level driver for the type
-  of device that you want to support.
-
-CONFIG_PARIDE_FRIQ
-  This option enables support for version 2 of the Freecom IQ parallel
-  port IDE adapter.  This adapter is used by the Maxell Superdisk
-  drive.  If you chose to build PARIDE support into your kernel, you
-  may answer Y here to build in the protocol driver, otherwise you
-  should answer M to build it as a loadable module. The module will be
-  called friq.o. You must also have a high-level driver for the type
-  of device that you want to support.
-
-CONFIG_PARIDE_FRPW
-  This option enables support for the Freecom power parallel port IDE
-  protocol. If you chose to build PARIDE support into your kernel, you
-  may answer Y here to build in the protocol driver, otherwise you
-  should answer M to build it as a loadable module. The module will be
-  called frpw.o. You must also have a high-level driver for the type
-  of device that you want to support.
-
-CONFIG_PARIDE_KBIC
-  This option enables support for the KBIC-951A and KBIC-971A parallel
-  port IDE protocols from KingByte Information Corp. KingByte's
-  adapters appear in many no-name portable disk and CD-ROM products,
-  especially in Europe. If you chose to build PARIDE support into your
-  kernel, you may answer Y here to build in the protocol driver,
-  otherwise you should answer M to build it as a loadable module. The
-  module will be called kbic.o. You must also have a high-level driver
-  for the type of device that you want to support.
-
-CONFIG_PARIDE_KTTI
-  This option enables support for the "PHd" parallel port IDE protocol
-  from KT Technology. This is a simple (low speed) adapter that is
-  used in some 2.5" portable hard drives. If you chose to build PARIDE
-  support into your kernel, you may answer Y here to build in the
-  protocol driver, otherwise you should answer M to build it as a
-  loadable module. The module will be called ktti.o. You must also
-  have a high-level driver for the type of device that you want to
-  support.
-
-CONFIG_PARIDE_ON20
-  This option enables support for the (obsolete) 90c20 parallel port
-  IDE protocol from OnSpec (often marketed under the ValuStore brand
-  name). If you chose to build PARIDE support into your kernel, you
-  may answer Y here to build in the protocol driver, otherwise you
-  should answer M to build it as a loadable module. The module will
-  be called on20.o. You must also have a high-level driver for the
-  type of device that you want to support.
-
-CONFIG_PARIDE_ON26
-  This option enables support for the 90c26 parallel port IDE protocol
-  from OnSpec Electronics (often marketed under the ValuStore brand
-  name). If you chose to build PARIDE support into your kernel, you
-  may answer Y here to build in the protocol driver, otherwise you
-  should answer M to build it as a loadable module. The module will be
-  called on26.o. You must also have a high-level driver for the type
-  of device that you want to support.
-
diff -Nru a/drivers/block/paride/Config.in b/drivers/block/paride/Config.in
--- a/drivers/block/paride/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,43 +0,0 @@
-#
-# PARIDE configuration
-#
-
-# PARIDE doesn't need PARPORT, but if PARPORT is configured as a module,
-# PARIDE must also be a module.  The bogus CONFIG_PARIDE_PARPORT option
-# controls the choices given to the user ...
- 
-if [ "$CONFIG_PARPORT" = "y" -o "$CONFIG_PARPORT" = "n" ]; then
-   define_tristate CONFIG_PARIDE_PARPORT y
-else
-   define_tristate CONFIG_PARIDE_PARPORT m
-fi
-
-comment 'Parallel IDE high-level drivers'
-dep_tristate '  Parallel port IDE disks' CONFIG_PARIDE_PD $CONFIG_PARIDE
-dep_tristate '  Parallel port ATAPI CD-ROMs' CONFIG_PARIDE_PCD $CONFIG_PARIDE
-dep_tristate '  Parallel port ATAPI disks' CONFIG_PARIDE_PF $CONFIG_PARIDE
-dep_tristate '  Parallel port ATAPI tapes' CONFIG_PARIDE_PT $CONFIG_PARIDE
-dep_tristate '  Parallel port generic ATAPI devices' CONFIG_PARIDE_PG $CONFIG_PARIDE
-comment 'Parallel IDE protocol modules'
-dep_tristate '    ATEN EH-100 protocol' CONFIG_PARIDE_ATEN $CONFIG_PARIDE
-dep_tristate '    MicroSolutions backpack (Series 5) protocol' CONFIG_PARIDE_BPCK $CONFIG_PARIDE
-dep_tristate '    MicroSolutions backpack (Series 6) protocol' CONFIG_PARIDE_BPCK6 $CONFIG_PARIDE
-dep_tristate '    DataStor Commuter protocol' CONFIG_PARIDE_COMM $CONFIG_PARIDE
-dep_tristate '    DataStor EP-2000 protocol' CONFIG_PARIDE_DSTR $CONFIG_PARIDE
-dep_tristate '    FIT TD-2000 protocol' CONFIG_PARIDE_FIT2 $CONFIG_PARIDE
-dep_tristate '    FIT TD-3000 protocol' CONFIG_PARIDE_FIT3 $CONFIG_PARIDE
-dep_tristate '    Shuttle EPAT/EPEZ protocol' CONFIG_PARIDE_EPAT $CONFIG_PARIDE
-if [ "$CONFIG_PARIDE_EPAT" != "n" ]; then
-  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-    bool '     Support c7/c8 chips (EXPERIMENTAL)' CONFIG_PARIDE_EPATC8
-  fi
-fi
-
-dep_tristate '    Shuttle EPIA protocol' CONFIG_PARIDE_EPIA $CONFIG_PARIDE
-dep_tristate '    Freecom IQ ASIC-2 protocol' CONFIG_PARIDE_FRIQ $CONFIG_PARIDE
-dep_tristate '    FreeCom power protocol' CONFIG_PARIDE_FRPW $CONFIG_PARIDE
-dep_tristate '    KingByte KBIC-951A/971A protocols' CONFIG_PARIDE_KBIC $CONFIG_PARIDE
-dep_tristate '    KT PHd protocol' CONFIG_PARIDE_KTTI $CONFIG_PARIDE
-dep_tristate '    OnSpec 90c20 protocol' CONFIG_PARIDE_ON20 $CONFIG_PARIDE
-dep_tristate '    OnSpec 90c26 protocol' CONFIG_PARIDE_ON26 $CONFIG_PARIDE
-#
diff -Nru a/drivers/block/paride/Kconfig b/drivers/block/paride/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/block/paride/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,305 @@
+#
+# PARIDE configuration
+#
+# PARIDE doesn't need PARPORT, but if PARPORT is configured as a module,
+# PARIDE must also be a module.  The bogus CONFIG_PARIDE_PARPORT option
+# controls the choices given to the user ...
+config PARIDE_PARPORT
+	tristate
+	depends on PARIDE!=n
+	default m if PARPORT=m
+	default y if PARPORT!=m
+
+comment "Parallel IDE high-level drivers"
+	depends on PARIDE
+
+config PARIDE_PD
+	tristate "Parallel port IDE disks"
+	depends on PARIDE
+	help
+	  This option enables the high-level driver for IDE-type disk devices
+	  connected through a parallel port. If you chose to build PARIDE
+	  support into your kernel, you may answer Y here to build in the
+	  parallel port IDE driver, otherwise you should answer M to build
+	  it as a loadable module. The module will be called pd.o. You
+	  must also have at least one parallel port protocol driver in your
+	  system. Among the devices supported by this driver are the SyQuest
+	  EZ-135, EZ-230 and SparQ drives, the Avatar Shark and the backpack
+	  hard drives from MicroSolutions.
+
+config PARIDE_PCD
+	tristate "Parallel port ATAPI CD-ROMs"
+	depends on PARIDE
+	---help---
+	  This option enables the high-level driver for ATAPI CD-ROM devices
+	  connected through a parallel port. If you chose to build PARIDE
+	  support into your kernel, you may answer Y here to build in the
+	  parallel port ATAPI CD-ROM driver, otherwise you should answer M to
+	  build it as a loadable module. The module will be called pcd.o. You
+	  must also have at least one parallel port protocol driver in your
+	  system. Among the devices supported by this driver are the
+	  MicroSolutions backpack CD-ROM drives and the Freecom Power CD. If
+	  you have such a CD-ROM drive, you should also say Y or M to "ISO
+	  9660 CD-ROM file system support" below, because that's the file
+	  system used on CD-ROMs.
+
+config PARIDE_PF
+	tristate "Parallel port ATAPI disks"
+	depends on PARIDE
+	help
+	  This option enables the high-level driver for ATAPI disk devices
+	  connected through a parallel port. If you chose to build PARIDE
+	  support into your kernel, you may answer Y here to build in the
+	  parallel port ATAPI disk driver, otherwise you should answer M
+	  to build it as a loadable module. The module will be called pf.o.
+	  You must also have at least one parallel port protocol driver in
+	  your system. Among the devices supported by this driver are the
+	  MicroSolutions backpack PD/CD drive and the Imation Superdisk
+	  LS-120 drive.
+
+config PARIDE_PT
+	tristate "Parallel port ATAPI tapes"
+	depends on PARIDE
+	help
+	  This option enables the high-level driver for ATAPI tape devices
+	  connected through a parallel port. If you chose to build PARIDE
+	  support into your kernel, you may answer Y here to build in the
+	  parallel port ATAPI disk driver, otherwise you should answer M
+	  to build it as a loadable module. The module will be called pt.o.
+	  You must also have at least one parallel port protocol driver in
+	  your system. Among the devices supported by this driver is the
+	  parallel port version of the HP 5GB drive.
+
+config PARIDE_PG
+	tristate "Parallel port generic ATAPI devices"
+	depends on PARIDE
+	---help---
+	  This option enables a special high-level driver for generic ATAPI
+	  devices connected through a parallel port. The driver allows user
+	  programs, such as cdrtools, to send ATAPI commands directly to a
+	  device.
+
+	  If you chose to build PARIDE support into your kernel, you may
+	  answer Y here to build in the parallel port generic ATAPI driver,
+	  otherwise you should answer M to build it as a loadable module. The
+	  module will be called pg.o.
+
+	  You must also have at least one parallel port protocol driver in
+	  your system.
+
+	  This driver implements an API loosely related to the generic SCSI
+	  driver. See <file:include/linux/pg.h>. for details.
+
+	  You can obtain the most recent version of cdrtools from
+	  <ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/>. Versions 1.6.1a3 and
+	  later fully support this driver.
+
+comment "Parallel IDE protocol modules"
+	depends on PARIDE
+
+config PARIDE_ATEN
+	tristate "ATEN EH-100 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the ATEN EH-100 parallel port IDE
+	  protocol. This protocol is used in some inexpensive low performance
+	  parallel port kits made in Hong Kong. If you chose to build PARIDE
+	  support into your kernel, you may answer Y here to build in the
+	  protocol driver, otherwise you should answer M to build it as a
+	  loadable module. The module will be called aten.o. You must also
+	  have a high-level driver for the type of device that you want to
+	  support.
+
+config PARIDE_BPCK
+	tristate "MicroSolutions backpack (Series 5) protocol"
+	depends on PARIDE
+	---help---
+	  This option enables support for the Micro Solutions BACKPACK
+	  parallel port Series 5 IDE protocol.  (Most BACKPACK drives made
+	  before 1999 were Series 5) Series 5 drives will NOT always have the
+	  Series noted on the bottom of the drive. Series 6 drivers will.
+
+	  In other words, if your BACKPACK drive dosen't say "Series 6" on the
+	  bottom, enable this option.
+
+	  If you chose to build PARIDE support into your kernel, you may
+	  answer Y here to build in the protocol driver, otherwise you should
+	  answer M to build it as a loadable module.  The module will be
+	  called bpck.o.  You must also have a high-level driver for the type
+	  of device that you want to support.
+
+config PARIDE_BPCK6
+	tristate "MicroSolutions backpack (Series 6) protocol"
+	depends on PARIDE
+	---help---
+	  This option enables support for the Micro Solutions BACKPACK
+	  parallel port Series 6 IDE protocol.  (Most BACKPACK drives made
+	  after 1999 were Series 6) Series 6 drives will have the Series noted
+	  on the bottom of the drive.  Series 5 drivers don't always have it
+	  noted.
+
+	  In other words, if your BACKPACK drive says "Series 6" on the
+	  bottom, enable this option.
+
+	  If you chose to build PARIDE support into your kernel, you may
+	  answer Y here to build in the protocol driver, otherwise you should
+	  answer M to build it as a loadable module.  The module will be
+	  called bpck6.o.  You must also have a high-level driver for the type
+	  of device that you want to support.
+
+config PARIDE_COMM
+	tristate "DataStor Commuter protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the Commuter parallel port IDE
+	  protocol from DataStor. If you chose to build PARIDE support
+	  into your kernel, you may answer Y here to build in the protocol
+	  driver, otherwise you should answer M to build it as a loadable
+	  module. The module will be called comm.o. You must also have
+	  a high-level driver for the type of device that you want to support.
+
+config PARIDE_DSTR
+	tristate "DataStor EP-2000 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the EP-2000 parallel port IDE
+	  protocol from DataStor. If you chose to build PARIDE support
+	  into your kernel, you may answer Y here to build in the protocol
+	  driver, otherwise you should answer M to build it as a loadable
+	  module. The module will be called dstr.o. You must also have
+	  a high-level driver for the type of device that you want to support.
+
+config PARIDE_FIT2
+	tristate "FIT TD-2000 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the TD-2000 parallel port IDE
+	  protocol from Fidelity International Technology. This is a simple
+	  (low speed) adapter that is used in some portable hard drives. If
+	  you chose to build PARIDE support into your kernel, you may answer Y
+	  here to build in the protocol driver, otherwise you should answer M
+	  to build it as a loadable module. The module will be called ktti.o.
+	  You must also have a high-level driver for the type of device that
+	  you want to support.
+
+config PARIDE_FIT3
+	tristate "FIT TD-3000 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the TD-3000 parallel port IDE
+	  protocol from Fidelity International Technology. This protocol is
+	  used in newer models of their portable disk, CD-ROM and PD/CD
+	  devices. If you chose to build PARIDE support into your kernel, you
+	  may answer Y here to build in the protocol driver, otherwise you
+	  should answer M to build it as a loadable module. The module will be
+	  called fit3.o. You must also have a high-level driver for the type
+	  of device that you want to support.
+
+config PARIDE_EPAT
+	tristate "Shuttle EPAT/EPEZ protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the EPAT parallel port IDE protocol.
+	  EPAT is a parallel port IDE adapter manufactured by Shuttle
+	  Technology and widely used in devices from major vendors such as
+	  Hewlett-Packard, SyQuest, Imation and Avatar. If you chose to build
+	  PARIDE support into your kernel, you may answer Y here to build in
+	  the protocol driver, otherwise you should answer M to build it as a
+	  loadable module. The module will be called epat.o. You must also
+	  have a high-level driver for the type of device that you want to
+	  support.
+
+config PARIDE_EPATC8
+	bool "Support c7/c8 chips (EXPERIMENTAL)"
+	depends on PARIDE_EPAT && EXPERIMENTAL
+	help
+	  This option enables support for the newer Shuttle EP1284 (aka c7 and
+	  c8) chip. You need this if you are using any recent Imation SuperDisk
+	  (LS-120) drive.
+
+config PARIDE_EPIA
+	tristate "Shuttle EPIA protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the (obsolete) EPIA parallel port
+	  IDE protocol from Shuttle Technology. This adapter can still be
+	  found in some no-name kits. If you chose to build PARIDE support
+	  into your kernel, you may answer Y here to build in the protocol
+	  driver, otherwise you should answer M to build it as a loadable
+	  module. The module will be called epia.o. You must also have a
+	  high-level driver for the type of device that you want to support.
+
+config PARIDE_FRIQ
+	tristate "Freecom IQ ASIC-2 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for version 2 of the Freecom IQ parallel
+	  port IDE adapter.  This adapter is used by the Maxell Superdisk
+	  drive.  If you chose to build PARIDE support into your kernel, you
+	  may answer Y here to build in the protocol driver, otherwise you
+	  should answer M to build it as a loadable module. The module will be
+	  called friq.o. You must also have a high-level driver for the type
+	  of device that you want to support.
+
+config PARIDE_FRPW
+	tristate "FreeCom power protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the Freecom power parallel port IDE
+	  protocol. If you chose to build PARIDE support into your kernel, you
+	  may answer Y here to build in the protocol driver, otherwise you
+	  should answer M to build it as a loadable module. The module will be
+	  called frpw.o. You must also have a high-level driver for the type
+	  of device that you want to support.
+
+config PARIDE_KBIC
+	tristate "KingByte KBIC-951A/971A protocols"
+	depends on PARIDE
+	help
+	  This option enables support for the KBIC-951A and KBIC-971A parallel
+	  port IDE protocols from KingByte Information Corp. KingByte's
+	  adapters appear in many no-name portable disk and CD-ROM products,
+	  especially in Europe. If you chose to build PARIDE support into your
+	  kernel, you may answer Y here to build in the protocol driver,
+	  otherwise you should answer M to build it as a loadable module. The
+	  module will be called kbic.o. You must also have a high-level driver
+	  for the type of device that you want to support.
+
+config PARIDE_KTTI
+	tristate "KT PHd protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the "PHd" parallel port IDE protocol
+	  from KT Technology. This is a simple (low speed) adapter that is
+	  used in some 2.5" portable hard drives. If you chose to build PARIDE
+	  support into your kernel, you may answer Y here to build in the
+	  protocol driver, otherwise you should answer M to build it as a
+	  loadable module. The module will be called ktti.o. You must also
+	  have a high-level driver for the type of device that you want to
+	  support.
+
+config PARIDE_ON20
+	tristate "OnSpec 90c20 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the (obsolete) 90c20 parallel port
+	  IDE protocol from OnSpec (often marketed under the ValuStore brand
+	  name). If you chose to build PARIDE support into your kernel, you
+	  may answer Y here to build in the protocol driver, otherwise you
+	  should answer M to build it as a loadable module. The module will
+	  be called on20.o. You must also have a high-level driver for the
+	  type of device that you want to support.
+
+config PARIDE_ON26
+	tristate "OnSpec 90c26 protocol"
+	depends on PARIDE
+	help
+	  This option enables support for the 90c26 parallel port IDE protocol
+	  from OnSpec Electronics (often marketed under the ValuStore brand
+	  name). If you chose to build PARIDE support into your kernel, you
+	  may answer Y here to build in the protocol driver, otherwise you
+	  should answer M to build it as a loadable module. The module will be
+	  called on26.o. You must also have a high-level driver for the type
+	  of device that you want to support.
+
+#
diff -Nru a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
--- a/drivers/block/ps2esdi.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/block/ps2esdi.c	Wed Oct 30 16:44:17 2002
@@ -116,6 +116,8 @@
 	unsigned int head, sect, cyl, wpcom, lzone, ctl;
 };
 static spinlock_t ps2esdi_lock = SPIN_LOCK_UNLOCKED;
+static struct request_queue ps2esdi_queue;
+static struct request *current_req;
 
 #if 0
 #if 0				/* try both - I don't know which one is better... UB */
@@ -156,8 +158,7 @@
 		return -1;
 	}
 	/* set up some global information - indicating device specific info */
-	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_ps2esdi_request,
-			&ps2esdi_lock);
+	blk_init_queue(&ps2esdi_queue, do_ps2esdi_request, &ps2esdi_lock);
 
 	/* some minor housekeeping - setup the global gendisk structure */
 	error = ps2esdi_geninit();
@@ -165,7 +166,7 @@
 		printk(KERN_WARNING "PS2ESDI: error initialising"
 			" device, releasing resources\n");
 		unregister_blkdev(MAJOR_NR, "ed");
-		blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+		blk_cleanup_queue(&ps2esdi_queue);
 		return error;
 	}
 	return 0;
@@ -214,7 +215,7 @@
 	free_dma(dma_arb_level);
 	free_irq(PS2ESDI_IRQ, &ps2esdi_gendisk);
 	unregister_blkdev(MAJOR_NR, "ed");
-	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+	blk_cleanup_queue(&ps2esdi_queue);
 	for (i = 0; i < ps2esdi_drives; i++) {
 		del_gendisk(ps2esdi_gendisk[i]);
 		put_disk(ps2esdi_gendisk[i]);
@@ -413,7 +414,7 @@
 		error = -EBUSY;
 		goto err_out3;
 	}
-	blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 128);
+	blk_queue_max_sectors(&ps2esdi_queue, 128);
 
 	error = -ENOMEM;
 	for (i = 0; i < ps2esdi_drives; i++) {
@@ -431,6 +432,8 @@
 		struct gendisk *disk = ps2esdi_gendisk[i];
 		set_capacity(disk, ps2esdi_info[i].head * ps2esdi_info[i].sect *
 				ps2esdi_info[i].cyl);
+		disk->queue = &ps2esdi_queue;
+		disk->private_data = &ps2esdi_info[i];
 		add_disk(disk);
 	}
 	return 0;
@@ -477,65 +480,52 @@
 /* strategy routine that handles most of the IO requests */
 static void do_ps2esdi_request(request_queue_t * q)
 {
-	u_int block, count;
-	int unit;
+	struct request *req;
 	/* since, this routine is called with interrupts cleared - they 
 	   must be before it finishes  */
 
-#if 0
-	printk("%s:got request. device : %d minor : %d command : %d  sector : %ld count : %ld, buffer: %p\n",
-	       DEVICE_NAME,
-	       DEVICE_NR(CURRENT->rq_dev), minor(CURRENT->rq_dev),
-	       CURRENT->cmd, CURRENT->sector,
-	       CURRENT->current_nr_sectors, CURRENT->buffer);
-#endif
-
 	/* standard procedure to ensure that requests are really on the
 	   list + sanity checks.                     */
-	if (blk_queue_empty(QUEUE))
+	if (blk_queue_empty(q))
 		return;
 
-	unit = DEVICE_NR(CURRENT->rq_dev);
-	if (isa_virt_to_bus(CURRENT->buffer + CURRENT->current_nr_sectors * 512) > 16 * MB) {
-		printk("%s: DMA above 16MB not supported\n", DEVICE_NAME);
-		end_request(CURRENT, FAIL);
-	}			/* check for above 16Mb dmas */
-	else if ((unit < ps2esdi_drives) &&
-	    (CURRENT->sector + CURRENT->current_nr_sectors <=
-	     get_capacity(ps2esdi_gendisk[unit])) &&
-	    	CURRENT->flags & REQ_CMD) {
+	req = elv_next_request(q);
+
 #if 0
-		printk("%s:got request. device : %d minor : %d command : %d  sector : %ld count : %ld\n",
-		       DEVICE_NAME,
-		       unit, minor(CURRENT->rq_dev),
-		       CURRENT->cmd, CURRENT->sector,
-		       CURRENT->current_nr_sectors);
+	printk("%s:got request. device : %s command : %d  sector : %ld count : %ld, buffer: %p\n",
+	       DEVICE_NAME,
+	       req->rq_disk->disk_name,
+	       req->cmd, req->sector,
+	       req->current_nr_sectors, req->buffer);
 #endif
 
-		block = CURRENT->sector;
-		count = CURRENT->current_nr_sectors;
-
-		switch (rq_data_dir(CURRENT)) {
-		case READ:
-			ps2esdi_readwrite(READ, unit, block, count);
-			break;
-		case WRITE:
-			ps2esdi_readwrite(WRITE, unit, block, count);
-			break;
-		default:
-			printk("%s: Unknown command\n", DEVICE_NAME);
-			end_request(CURRENT, FAIL);
-			break;
-		}		/* handle different commands */
+	/* check for above 16Mb dmas */
+	if (isa_virt_to_bus(req->buffer + req->current_nr_sectors * 512) > 16 * MB) {
+		printk("%s: DMA above 16MB not supported\n", DEVICE_NAME);
+		end_request(req, FAIL);
+		return;
 	}
-	/* is request is valid */ 
-	else {
+
+	if (req->sector+req->current_nr_sectors > get_capacity(req->rq_disk)) {
 		printk("Grrr. error. ps2esdi_drives: %d, %lu %llu\n",
-		    ps2esdi_drives, CURRENT->sector,
-		    (unsigned long long)get_capacity(ps2esdi_gendisk[unit]));
-		end_request(CURRENT, FAIL);
+		    ps2esdi_drives, req->sector,
+		    (unsigned long long)get_capacity(req->rq_disk));
+		end_request(req, FAIL);
+		return;
 	}
 
+	switch (rq_data_dir(req)) {
+	case READ:
+		ps2esdi_readwrite(READ, req);
+		break;
+	case WRITE:
+		ps2esdi_readwrite(WRITE, req);
+		break;
+	default:
+		printk("%s: Unknown command\n", req->rq_disk->disk_name);
+		end_request(req, FAIL);
+		break;
+	}		/* handle different commands */
 }				/* main strategy routine */
 
 /* resets the ESDI adapter */
@@ -572,17 +562,20 @@
 }				/* reset the controller */
 
 /* called by the strategy routine to handle read and write requests */
-static void ps2esdi_readwrite(int cmd, u_char drive, u_int block, u_int count)
+static void ps2esdi_readwrite(int cmd, struct request *req)
 {
-
+	struct ps2esdi_i_struct *p = req->rq_disk->private_data;
+	unsigned block = req->sector;
+	unsigned count = req->current_nr_sectors;
+	int drive = DEVICE_NR(req->rq_dev);
 	u_short track, head, cylinder, sector;
 	u_short cmd_blk[TYPE_1_CMD_BLK_LENGTH];
 
 	/* do some relevant arithmatic */
-	track = block / ps2esdi_info[drive].sect;
-	head = track % ps2esdi_info[drive].head;
-	cylinder = track / ps2esdi_info[drive].head;
-	sector = block % ps2esdi_info[drive].sect;
+	track = block / p->sect;
+	head = track % p->head;
+	cylinder = track / p->head;
+	sector = block % p->sect;
 
 #if 0
 	printk("%s: cyl=%d head=%d sect=%d\n", DEVICE_NAME, cylinder, head, sector);
@@ -591,16 +584,16 @@
 	ps2esdi_fill_cmd_block
 	    (cmd_blk,
 	     (cmd == READ) ? CMD_READ : CMD_WRITE,
-	     cylinder, head, sector,
-	     CURRENT->current_nr_sectors, drive);
+	     cylinder, head, sector, count, drive);
 
 	/* send the command block to the controller */
+	current_req = req;
 	spin_unlock_irq(&ps2esdi_lock);
 	if (ps2esdi_out_cmd_blk(cmd_blk)) {
 		spin_lock_irq(&ps2esdi_lock);
 		printk("%s: Controller failed\n", DEVICE_NAME);
-		if ((++CURRENT->errors) >= MAX_RETRIES)
-			end_request(CURRENT, FAIL);
+		if ((++req->errors) >= MAX_RETRIES)
+			end_request(req, FAIL);
 	}
 	/* check for failure to put out the command block */ 
 	else {
@@ -680,11 +673,7 @@
 /* prepare for dma - do all the necessary setup */
 static void ps2esdi_prep_dma(char *buffer, u_short length, u_char dma_xmode)
 {
-	unsigned long flags;
-#if 0
-	printk("ps2esdi: b_wait: %p\n", &CURRENT->bh->b_wait);
-#endif
-	flags = claim_dma_lock();
+	unsigned long flags = claim_dma_lock();
 
 	mca_disable_dma(dma_arb_level);
 
@@ -873,8 +862,9 @@
 
 	switch (int_ret_code & 0x0f) {
 	case INT_TRANSFER_REQ:
-		ps2esdi_prep_dma(CURRENT->buffer, CURRENT->current_nr_sectors,
-		    (rq_data_dir(CURRENT) == READ)
+		ps2esdi_prep_dma(current_req->buffer,
+				 current_req->current_nr_sectors,
+		    (rq_data_dir(current_req) == READ)
 		    ? MCA_DMA_MODE_16 | MCA_DMA_MODE_WRITE | MCA_DMA_MODE_XFER
 		    : MCA_DMA_MODE_16 | MCA_DMA_MODE_READ);
 		outb(CTRL_ENABLE_DMA | CTRL_ENABLE_INTR, ESDI_CONTROL);
@@ -894,7 +884,7 @@
 			printk("%s: timeout reading status word\n", DEVICE_NAME);
 			outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
 			outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-			if ((++CURRENT->errors) >= MAX_RETRIES)
+			if ((++current_req->errors) >= MAX_RETRIES)
 				ending = FAIL;
 			else
 				ending = -1;
@@ -907,9 +897,6 @@
 			LITE_OFF;
 			outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
 			outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-#if 0
-			printk("ps2esdi: cmd_complete b_wait: %p\n", &CURRENT->bh->b_wait);
-#endif
 			ending = SUCCES;
 			break;
 		default:
@@ -938,7 +925,7 @@
 		dump_cmd_complete_status(int_ret_code);
 		outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
 		outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
-		if ((++CURRENT->errors) >= MAX_RETRIES)
+		if ((++current_req->errors) >= MAX_RETRIES)
 			ending = FAIL;
 		else
 			ending = -1;
@@ -976,8 +963,9 @@
 	}
 	if(ending != -1) {
 		spin_lock_irqsave(&ps2esdi_lock, flags);
-		end_request(CURRENT, ending);
-		do_ps2esdi_request(BLK_DEFAULT_QUEUE(MAJOR_NR));
+		end_request(current_req, ending);
+		current_req = NULL;
+		do_ps2esdi_request(&ps2esdi_queue);
 		spin_unlock_irqrestore(&ps2esdi_lock, flags);
 	}
 }				/* handle interrupts */
@@ -1074,16 +1062,17 @@
 static int ps2esdi_ioctl(struct inode *inode,
 			 struct file *file, u_int cmd, u_long arg)
 {
+	struct ps2esdi_i_struct *p = inode->i_bdev->bd_disk->private_data;
 	struct ps2esdi_geometry *geometry = (struct ps2esdi_geometry *) arg;
-	int dev = DEVICE_NR(inode->i_rdev), err;
+	int err;
 
 	if (cmd != HDIO_GETGEO)
 		return -EINVAL;
 	if ((err = verify_area(VERIFY_WRITE, geometry, sizeof(*geometry))))
 		return (err);
-	put_user(ps2esdi_info[dev].head, (char *) &geometry->heads);
-	put_user(ps2esdi_info[dev].sect, (char *) &geometry->sectors);
-	put_user(ps2esdi_info[dev].cyl, (short *) &geometry->cylinders);
+	put_user(p->head, (char *) &geometry->heads);
+	put_user(p->sect, (char *) &geometry->sectors);
+	put_user(p->cyl, (short *) &geometry->cylinders);
 	put_user(get_start_sect(inode->i_bdev), (long *) &geometry->start);
 	return 0;
 }
diff -Nru a/drivers/block/rd.c b/drivers/block/rd.c
--- a/drivers/block/rd.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/block/rd.c	Wed Oct 30 16:44:29 2002
@@ -77,7 +77,6 @@
 /* Various static variables go here.  Most are used only in the RAM disk code.
  */
 
-static unsigned long rd_length[NUM_RAMDISKS];	/* Size of RAM disks in bytes   */
 static struct gendisk *rd_disks[NUM_RAMDISKS];
 static devfs_handle_t devfs_handle;
 static struct block_device *rd_bdev[NUM_RAMDISKS];/* Protected device data */
@@ -147,21 +146,14 @@
 	commit_write: ramdisk_commit_write,
 };
 
-static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec,
-				  sector_t sector, int minor)
+static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector,
+				struct address_space *mapping)
 {
-	struct address_space * mapping;
-	unsigned long index;
-	unsigned int vec_offset;
-	int offset, size, err;
-
-	err = 0;
-	mapping = rd_bdev[minor]->bd_inode->i_mapping;
-
-	index = sector >> (PAGE_CACHE_SHIFT - 9);
-	offset = (sector << 9) & ~PAGE_CACHE_MASK;
-	size = vec->bv_len;
-	vec_offset = vec->bv_offset;
+	unsigned long index = sector >> (PAGE_CACHE_SHIFT - 9);
+	unsigned int vec_offset = vec->bv_offset;
+	int offset = (sector << 9) & ~PAGE_CACHE_MASK;
+	int size = vec->bv_len;
+	int err = 0;
 
 	do {
 		int count;
@@ -197,12 +189,10 @@
 		index++;
 
 		if (rw == READ) {
-			src = kmap(page);
-			src += offset;
+			src = kmap(page) + offset;
 			dst = kmap(vec->bv_page) + vec_offset;
 		} else {
-			dst = kmap(page);
-			dst += offset;
+			dst = kmap(page) + offset;
 			src = kmap(vec->bv_page) + vec_offset;
 		}
 		offset = 0;
@@ -227,22 +217,6 @@
 	return err;
 }
 
-static int rd_blkdev_bio_IO(struct bio *bio, unsigned int minor)
-{
-	struct bio_vec *bvec;
-	sector_t sector;
-	int ret = 0, i, rw;
-
-	sector = bio->bi_sector;
-	rw = bio_data_dir(bio);
-	bio_for_each_segment(bvec, bio, i) {
-		ret |= rd_blkdev_pagecache_IO(rw, bvec, sector, minor);
-		sector += bvec->bv_len >> 9;
-	}
-
-	return ret;
-}
-
 /*
  *  Basically, my strategy here is to set up a buffer-head which can't be
  *  deleted, and make that my Ramdisk.  If the request is outside of the
@@ -251,37 +225,33 @@
  * 19-JAN-1998  Richard Gooch <rgooch@atnf.csiro.au>  Added devfs support
  *
  */
-static int rd_make_request(request_queue_t * q, struct bio *sbh)
+static int rd_make_request(request_queue_t * q, struct bio *bio)
 {
-	unsigned int minor;
-	unsigned long offset, len;
-	int rw = sbh->bi_rw;
-
-	minor = minor(to_kdev_t(sbh->bi_bdev->bd_dev));
-
-	if (minor >= NUM_RAMDISKS)
-		goto fail;
-
-	offset = sbh->bi_sector << 9;
-	len = sbh->bi_size;
+	struct block_device *bdev = bio->bi_bdev;
+	struct address_space * mapping = bdev->bd_inode->i_mapping;
+	sector_t sector = bio->bi_sector;
+	unsigned long len = bio->bi_size >> 9;
+	int rw = bio_data_dir(bio);
+	struct bio_vec *bvec;
+	int ret = 0, i;
 
-	if ((offset + len) > rd_length[minor])
+	if (sector + len > get_capacity(bdev->bd_disk))
 		goto fail;
 
 	if (rw==READA)
 		rw=READ;
-	if ((rw != READ) && (rw != WRITE)) {
-		printk(KERN_INFO "RAMDISK: bad command: %d\n", rw);
-		goto fail;
-	}
 
-	if (rd_blkdev_bio_IO(sbh, minor))
+	bio_for_each_segment(bvec, bio, i) {
+		ret |= rd_blkdev_pagecache_IO(rw, bvec, sector, mapping);
+		sector += bvec->bv_len >> 9;
+	}
+	if (ret)
 		goto fail;
 
-	bio_endio(sbh, sbh->bi_size, 0);
+	bio_endio(bio, bio->bi_size, 0);
 	return 0;
- fail:
-	bio_io_error(sbh, sbh->bi_size);
+fail:
+	bio_io_error(bio, bio->bi_size);
 	return 0;
 } 
 
@@ -373,21 +343,17 @@
 	}
 #endif
 
-	if (unit >= NUM_RAMDISKS)
-		return -ENXIO;
-
 	/*
 	 * Immunize device against invalidate_buffers() and prune_icache().
 	 */
 	if (rd_bdev[unit] == NULL) {
-		rd_bdev[unit] = bdget(kdev_t_to_nr(inode->i_rdev));
-		rd_bdev[unit]->bd_openers++;
-		rd_bdev[unit]->bd_block_size = rd_blocksize;
-		rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops;
-		rd_bdev[unit]->bd_inode->i_mapping->backing_dev_info = &rd_backing_dev_info;
-		rd_bdev[unit]->bd_inode->i_size = rd_length[unit];
-		rd_bdev[unit]->bd_queue = &blk_dev[MAJOR_NR].request_queue;
-		rd_bdev[unit]->bd_disk = get_disk(rd_disks[unit]);
+		struct block_device *bdev = inode->i_bdev;
+		rd_bdev[unit] = bdev;
+		bdev->bd_openers++;
+		bdev->bd_block_size = rd_blocksize;
+		bdev->bd_inode->i_size = get_capacity(rd_disks[unit])<<9;
+		inode->i_mapping->a_ops = &ramdisk_aops;
+		inode->i_mapping->backing_dev_info = &rd_backing_dev_info;
 	}
 
 	return 0;
@@ -422,6 +388,7 @@
 	unregister_blkdev( MAJOR_NR, "ramdisk" );
 }
 
+static struct request_queue rd_queue;
 /* This is the registration and initialization section of the RAM disk driver */
 static int __init rd_init (void)
 {
@@ -456,16 +423,16 @@
 		goto out;
 	}
 
-	blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), &rd_make_request);
+	blk_queue_make_request(&rd_queue, &rd_make_request);
 
 	for (i = 0; i < NUM_RAMDISKS; i++) {
 		struct gendisk *disk = rd_disks[i];
 		/* rd_size is given in kB */
-		rd_length[i] = rd_size << 10;
 		disk->major = MAJOR_NR;
 		disk->first_minor = i;
 		disk->fops = &rd_bd_op;
-		sprintf(disk->disk_name, "rd%d", i);
+		disk->queue = &rd_queue;
+		sprintf(disk->disk_name, "ram%d", i);
 		set_capacity(disk, rd_size * 2);
 	}
 	devfs_handle = devfs_mk_dir (NULL, "rd", NULL);
diff -Nru a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c
--- a/drivers/block/scsi_ioctl.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/block/scsi_ioctl.c	Wed Oct 30 16:44:35 2002
@@ -29,25 +29,43 @@
 #include <linux/completion.h>
 #include <linux/cdrom.h>
 #include <linux/slab.h>
+#include <linux/bio.h>
 
+#include "../scsi/scsi.h"
 #include <scsi/scsi.h>
+#include <scsi/scsi_ioctl.h>
 
 #include <asm/uaccess.h>
 
-int blk_do_rq(request_queue_t *q, struct request *rq)
+/* Command group 3 is reserved and should never be used.  */
+const unsigned char scsi_command_size[8] =
+{
+	6, 10, 10, 12,
+	16, 12, 10, 10
+};
+
+#define BLK_DEFAULT_TIMEOUT	(60 * HZ)
+
+int blk_do_rq(request_queue_t *q, struct block_device *bdev, struct request *rq)
 {
 	DECLARE_COMPLETION(wait);
 	int err = 0;
 
+	rq->rq_dev = to_kdev_t(bdev->bd_dev);
+	rq->rq_disk = bdev->bd_disk;
+
+	/*
+	 * we need an extra reference to the request, so we can look at
+	 * it after io completion
+	 */
+	rq->ref_count++;
+
 	rq->flags |= REQ_NOMERGE;
 	rq->waiting = &wait;
-	elv_add_request(q, rq, 1);
+	elv_add_request(q, rq, 1, 1);
 	generic_unplug_device(q);
 	wait_for_completion(&wait);
 
-	/*
-	 * for now, never retry anything
-	 */
 	if (rq->errors)
 		err = -EIO;
 
@@ -74,42 +92,52 @@
 
 static int sg_get_timeout(request_queue_t *q)
 {
-	return HZ;
+	return q->sg_timeout;
 }
 
 static int sg_set_timeout(request_queue_t *q, int *p)
 {
-	int timeout;
-	int error = get_user(timeout, p);
-	return error;
-}
+	int timeout, err = get_user(timeout, p);
+
+	if (!err)
+		q->sg_timeout = timeout;
 
-static int reserved_size = 0;
+	return err;
+}
 
 static int sg_get_reserved_size(request_queue_t *q, int *p)
 {
-	return put_user(reserved_size, p);
+	return put_user(q->sg_reserved_size, p);
 }
 
 static int sg_set_reserved_size(request_queue_t *q, int *p)
 {
-	int size;
-	int error = get_user(size, p);
-	if (!error)
-		reserved_size = size;
-	return error;
+	int size, err = get_user(size, p);
+
+	if (!err)
+		q->sg_reserved_size = size;
+
+	return err;
 }
 
+/*
+ * will always return that we are ATAPI even for a real SCSI drive, I'm not
+ * so sure this is worth doing anything about (why would you care??)
+ */
 static int sg_emulated_host(request_queue_t *q, int *p)
 {
 	return put_user(1, p);
 }
 
-static int sg_io(request_queue_t *q, struct sg_io_hdr *uptr)
+static int sg_io(request_queue_t *q, struct block_device *bdev,
+		 struct sg_io_hdr *uptr)
 {
-	int err;
+	unsigned long uaddr, start_time;
+	int err, reading, writing, nr_sectors;
 	struct sg_io_hdr hdr;
 	struct request *rq;
+	struct bio *bio;
+	char sense[24];
 	void *buffer;
 
 	if (!access_ok(VERIFY_WRITE, uptr, sizeof(*uptr)))
@@ -117,47 +145,260 @@
 	if (copy_from_user(&hdr, uptr, sizeof(*uptr)))
 		return -EFAULT;
 
-	if ( hdr.cmd_len > sizeof(rq->cmd) )
+	if (hdr.interface_id != 'S')
+		return -EINVAL;
+	if (hdr.cmd_len > sizeof(rq->cmd))
+		return -EINVAL;
+	if (!access_ok(VERIFY_READ, hdr.cmdp, hdr.cmd_len))
+		return -EFAULT;
+
+	if (hdr.dxfer_len > 65536)
 		return -EINVAL;
 
+	/*
+	 * we'll do that later
+	 */
+	if (hdr.iovec_count)
+		return -EOPNOTSUPP;
+
+	nr_sectors = 0;
+	reading = writing = 0;
 	buffer = NULL;
+	bio = NULL;
 	if (hdr.dxfer_len) {
 		unsigned int bytes = (hdr.dxfer_len + 511) & ~511;
 
 		switch (hdr.dxfer_direction) {
 		default:
 			return -EINVAL;
+		case SG_DXFER_TO_FROM_DEV:
+			reading = 1;
+			/* fall through */
 		case SG_DXFER_TO_DEV:
+			writing = 1;
+			break;
 		case SG_DXFER_FROM_DEV:
-		case SG_DXFER_TO_FROM_DEV:
+			reading = 1;
 			break;
 		}
-		buffer = kmalloc(bytes, GFP_USER);
-		if (!buffer)
-			return -ENOMEM;
-		if (hdr.dxfer_direction == SG_DXFER_TO_DEV ||
-		    hdr.dxfer_direction == SG_DXFER_TO_FROM_DEV)
-			copy_from_user(buffer, hdr.dxferp, hdr.dxfer_len);
+
+		uaddr = (unsigned long) hdr.dxferp;
+		if (writing && !access_ok(VERIFY_WRITE, uaddr, bytes))
+			return -EFAULT;
+		else if (reading && !access_ok(VERIFY_READ, uaddr, bytes))
+			return -EFAULT;
+
+		/*
+		 * first try to map it into a bio. reading from device will
+		 * be a write to vm.
+		 */
+		bio = bio_map_user(bdev, uaddr, hdr.dxfer_len, reading);
+		if (bio) {
+			if (writing)
+				bio->bi_rw |= (1 << BIO_RW);
+
+			nr_sectors = (bio->bi_size + 511) >> 9;
+
+			if (bio->bi_size < hdr.dxfer_len) {
+				bio_endio(bio, bio->bi_size, 0);
+				bio_unmap_user(bio, 0);
+				bio = NULL;
+			}
+		}
+
+		/*
+		 * if bio setup failed, fall back to slow approach
+		 */
+		if (!bio) {
+			buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER);
+			if (!buffer)
+				return -ENOMEM;
+
+			nr_sectors = bytes >> 9;
+			if (writing)
+				copy_from_user(buffer,hdr.dxferp,hdr.dxfer_len);
+			else
+				memset(buffer, 0, hdr.dxfer_len);
+		}
 	}
 
 	rq = blk_get_request(q, WRITE, __GFP_WAIT);
-	rq->timeout = 60*HZ;
-	rq->data = buffer;
-	rq->data_len = hdr.dxfer_len;
-	rq->flags = REQ_BLOCK_PC;
-	memset(rq->cmd, 0, sizeof(rq->cmd));
+
+	/*
+	 * fill in request structure
+	 */
 	copy_from_user(rq->cmd, hdr.cmdp, hdr.cmd_len);
-	err = blk_do_rq(q, rq);
+	if (sizeof(rq->cmd) != hdr.cmd_len)
+		memset(rq->cmd + hdr.cmd_len, 0, sizeof(rq->cmd) - hdr.cmd_len);
+
+	memset(sense, 0, sizeof(sense));
+	rq->sense = sense;
+	rq->sense_len = 0;
+
+	rq->flags |= REQ_BLOCK_PC;
+	if (writing)
+		rq->flags |= REQ_RW;
+
+	rq->hard_nr_sectors = rq->nr_sectors = nr_sectors;
+	rq->hard_cur_sectors = rq->current_nr_sectors = nr_sectors;
+
+	if (bio) {
+		/*
+		 * subtle -- if bio_map_user() ended up bouncing a bio, it
+		 * would normally disappear when its bi_end_io is run.
+		 * however, we need it for the unmap, so grab an extra
+		 * reference to it
+		 */
+		bio_get(bio);
+
+		rq->nr_phys_segments = bio_phys_segments(q, bio);
+		rq->nr_hw_segments = bio_hw_segments(q, bio);
+		rq->current_nr_sectors = bio_cur_sectors(bio);
+		rq->hard_cur_sectors = rq->current_nr_sectors;
+		rq->buffer = bio_data(bio);
+	}
+
+	rq->data_len = hdr.dxfer_len;
+	rq->data = buffer;
+
+	rq->timeout = hdr.timeout;
+	if (!rq->timeout)
+		rq->timeout = q->sg_timeout;
+	if (!rq->timeout)
+		rq->timeout = BLK_DEFAULT_TIMEOUT;
+
+	rq->bio = rq->biotail = bio;
+
+	start_time = jiffies;
+
+	/*
+	 * return -EIO if we didn't transfer all data, caller can look at
+	 * residual count to find out how much did succeed
+	 */
+	err = blk_do_rq(q, bdev, rq);
+	if (rq->data_len > 0)
+		err = -EIO;
+	
+	if (bio) {
+		bio_unmap_user(bio, reading);
+		bio_put(bio);
+	}
+
+	hdr.status = rq->errors;
+	hdr.resid = rq->data_len;
+	hdr.duration = (jiffies - start_time) * (1000 / HZ);
+
+	if (rq->sense_len && hdr.sbp) {
+		if (!copy_to_user(hdr.sbp,rq->sense, rq->sense_len))
+			hdr.sb_len_wr = rq->sense_len;
+	}
 
 	blk_put_request(rq);
 
 	copy_to_user(uptr, &hdr, sizeof(*uptr));
+
 	if (buffer) {
-		if (hdr.dxfer_direction == SG_DXFER_FROM_DEV ||
-		    hdr.dxfer_direction == SG_DXFER_TO_FROM_DEV)
+		if (reading)
 			copy_to_user(hdr.dxferp, buffer, hdr.dxfer_len);
+
 		kfree(buffer);
 	}
+
+	return err;
+}
+
+#define FORMAT_UNIT_TIMEOUT		(2 * 60 * 60 * HZ)
+#define START_STOP_TIMEOUT		(60 * HZ)
+#define MOVE_MEDIUM_TIMEOUT		(5 * 60 * HZ)
+#define READ_ELEMENT_STATUS_TIMEOUT	(5 * 60 * HZ)
+#define READ_DEFECT_DATA_TIMEOUT	(60 * HZ )
+
+static int sg_scsi_ioctl(request_queue_t *q, struct block_device *bdev,
+			 Scsi_Ioctl_Command *sic)
+{
+	struct request *rq;
+	int err, in_len, out_len, bytes, opcode, cmdlen;
+	char *buffer = NULL, sense[24];
+
+	/*
+	 * get in an out lengths, verify they don't exceed a page worth of data
+	 */
+	if (get_user(in_len, &sic->inlen))
+		return -EFAULT;
+	if (get_user(out_len, &sic->outlen))
+		return -EFAULT;
+	if (in_len > PAGE_SIZE || out_len > PAGE_SIZE)
+		return -EINVAL;
+	if (get_user(opcode, sic->data))
+		return -EFAULT;
+
+	bytes = max(in_len, out_len);
+	if (bytes) {
+		buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER);
+		if (!buffer)
+			return -ENOMEM;
+
+		memset(buffer, 0, bytes);
+	}
+
+	rq = blk_get_request(q, WRITE, __GFP_WAIT);
+
+	cmdlen = COMMAND_SIZE(opcode);
+
+	/*
+	 * get command and data to send to device, if any
+	 */
+	err = -EFAULT;
+	if (copy_from_user(rq->cmd, sic->data, cmdlen))
+		goto error;
+
+	if (copy_from_user(buffer, sic->data + cmdlen, in_len))
+		goto error;
+
+	switch (opcode) {
+		case FORMAT_UNIT:
+			rq->timeout = FORMAT_UNIT_TIMEOUT;
+			break;
+		case START_STOP:
+			rq->timeout = START_STOP_TIMEOUT;
+			break;
+		case MOVE_MEDIUM:
+			rq->timeout = MOVE_MEDIUM_TIMEOUT;
+			break;
+		case READ_ELEMENT_STATUS:
+			rq->timeout = READ_ELEMENT_STATUS_TIMEOUT;
+			break;
+		case READ_DEFECT_DATA:
+			rq->timeout = READ_DEFECT_DATA_TIMEOUT;
+			break;
+		default:
+			rq->timeout = BLK_DEFAULT_TIMEOUT;
+			break;
+	}
+
+	memset(sense, 0, sizeof(sense));
+	rq->sense = sense;
+	rq->sense_len = 0;
+
+	rq->data = buffer;
+	rq->data_len = bytes;
+	rq->flags |= REQ_BLOCK_PC;
+	if (in_len)
+		rq->flags |= REQ_RW;
+
+	err = blk_do_rq(q, bdev, rq);
+	if (err) {
+		if (rq->sense_len)
+			if (copy_to_user(sic->data, rq->sense, rq->sense_len))
+				err = -EFAULT;
+	} else {
+		if (copy_to_user(sic->data, buffer, out_len))
+			err = -EFAULT;
+	}
+	
+error:
+	kfree(buffer);
+	blk_put_request(rq);
 	return err;
 }
 
@@ -172,6 +413,9 @@
 		return -ENXIO;
 
 	switch (cmd) {
+		/*
+		 * new sgv3 interface
+		 */
 		case SG_GET_VERSION_NUM:
 			return sg_get_version((int *) arg);
 		case SCSI_IOCTL_GET_IDLUN:
@@ -189,7 +433,25 @@
 		case SG_EMULATED_HOST:
 			return sg_emulated_host(q, (int *) arg);
 		case SG_IO:
-			return sg_io(q, (struct sg_io_hdr *) arg);
+			err = bd_claim(bdev, current);
+			if (err)
+				break;
+			err = sg_io(q, bdev, (struct sg_io_hdr *) arg);
+			bd_release(bdev);
+			break;
+		/*
+		 * old junk scsi send command ioctl
+		 */
+		case SCSI_IOCTL_SEND_COMMAND:
+			if (!arg)
+				return -EINVAL;
+
+			err = bd_claim(bdev, current);
+			if (err)
+				break;
+			err = sg_scsi_ioctl(q, bdev, (Scsi_Ioctl_Command *)arg);
+			bd_release(bdev);
+			break;
 		case CDROMCLOSETRAY:
 			close = 1;
 		case CDROMEJECT:
@@ -197,11 +459,11 @@
 			rq->flags = REQ_BLOCK_PC;
 			rq->data = NULL;
 			rq->data_len = 0;
-			rq->timeout = 60*HZ;
+			rq->timeout = BLK_DEFAULT_TIMEOUT;
 			memset(rq->cmd, 0, sizeof(rq->cmd));
 			rq->cmd[0] = GPCMD_START_STOP_UNIT;
 			rq->cmd[4] = 0x02 + (close != 0);
-			err = blk_do_rq(q, rq);
+			err = blk_do_rq(q, bdev, rq);
 			blk_put_request(rq);
 			break;
 		default:
@@ -213,3 +475,4 @@
 }
 
 EXPORT_SYMBOL(scsi_cmd_ioctl);
+EXPORT_SYMBOL(scsi_command_size);
diff -Nru a/drivers/block/swim3.c b/drivers/block/swim3.c
--- a/drivers/block/swim3.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/block/swim3.c	Wed Oct 30 16:44:27 2002
@@ -34,12 +34,12 @@
 
 #define MAJOR_NR	FLOPPY_MAJOR
 #define DEVICE_NAME "floppy"
-#define QUEUE (&swim3_queue)
 #include <linux/blk.h>
 #include <linux/devfs_fs_kernel.h>
 
 static struct request_queue swim3_queue;
 static struct gendisk *disks[2];
+static struct request *fd_req;
 
 #define MAX_FLOPPIES	2
 
@@ -315,45 +315,43 @@
 		wake_up(&fs->wait);
 		return;
 	}
-	while (!blk_queue_empty(QUEUE) && fs->state == idle) {
-		if (major(CURRENT->rq_dev) != MAJOR_NR)
-			panic(DEVICE_NAME ": request list destroyed");
-//		if (CURRENT->bh && !buffer_locked(CURRENT->bh))
-//			panic(DEVICE_NAME ": block not locked");
+	while (!blk_queue_empty(&swim3_queue) && fs->state == idle) {
+		struct request *req = elv_next_request(&swim3_queue);
 #if 0
-		printk("do_fd_req: dev=%x cmd=%d sec=%ld nr_sec=%ld buf=%p\n",
-		       kdev_t_to_nr(CURRENT->rq_dev), CURRENT->cmd,
-		       CURRENT->sector, CURRENT->nr_sectors, CURRENT->buffer);
+		printk("do_fd_req: dev=%s cmd=%d sec=%ld nr_sec=%ld buf=%p\n",
+		       req->rq_disk->disk_name, req->cmd,
+		       req->sector, req->nr_sectors, req->buffer);
 		printk("           rq_status=%d errors=%d current_nr_sectors=%ld\n",
-		       CURRENT->rq_status, CURRENT->errors, CURRENT->current_nr_sectors);
+		       req->rq_status, req->errors, req->current_nr_sectors);
 #endif
 
-		if (CURRENT->sector < 0 || CURRENT->sector >= fs->total_secs) {
-			end_request(CURRENT, 0);
+		if (req->sector < 0 || req->sector >= fs->total_secs) {
+			end_request(req, 0);
 			continue;
 		}
-		if (CURRENT->current_nr_sectors == 0) {
-			end_request(CURRENT, 1);
+		if (req->current_nr_sectors == 0) {
+			end_request(req, 1);
 			continue;
 		}
 		if (fs->ejected) {
-			end_request(CURRENT, 0);
+			end_request(req, 0);
 			continue;
 		}
 
-		if (rq_data_dir(CURRENT) == WRITE) {
+		if (rq_data_dir(req) == WRITE) {
 			if (fs->write_prot < 0)
 				fs->write_prot = swim3_readbit(fs, WRITE_PROT);
 			if (fs->write_prot) {
-				end_request(CURRENT, 0);
+				end_request(req, 0);
 				continue;
 			}
 		}
 
-		fs->req_cyl = CURRENT->sector / fs->secpercyl;
-		x = CURRENT->sector % fs->secpercyl;
+		fs->req_cyl = req->sector / fs->secpercyl;
+		x = req->sector % fs->secpercyl;
 		fs->head = x / fs->secpertrack;
 		fs->req_sector = x % fs->secpertrack + 1;
+		fd_req = req;
 		fs->state = do_transfer;
 		fs->retries = 0;
 
@@ -425,16 +423,16 @@
 	struct dbdma_cmd *cp = fs->dma_cmd;
 	struct dbdma_regs *dr = fs->dma;
 
-	if (CURRENT->current_nr_sectors <= 0) {
+	if (fd_req->current_nr_sectors <= 0) {
 		printk(KERN_ERR "swim3: transfer 0 sectors?\n");
 		return;
 	}
-	if (rq_data_dir(CURRENT) == WRITE)
+	if (rq_data_dir(fd_req) == WRITE)
 		n = 1;
 	else {
 		n = fs->secpertrack - fs->req_sector + 1;
-		if (n > CURRENT->current_nr_sectors)
-			n = CURRENT->current_nr_sectors;
+		if (n > fd_req->current_nr_sectors)
+			n = fd_req->current_nr_sectors;
 	}
 	fs->scount = n;
 	swim3_select(fs, fs->head? READ_DATA_1: READ_DATA_0);
@@ -442,21 +440,21 @@
 	out_8(&sw->nsect, n);
 	out_8(&sw->gap3, 0);
 	st_le32(&dr->cmdptr, virt_to_bus(cp));
-	if (rq_data_dir(CURRENT) == WRITE) {
+	if (rq_data_dir(fd_req) == WRITE) {
 		/* Set up 3 dma commands: write preamble, data, postamble */
 		init_dma(cp, OUTPUT_MORE, write_preamble, sizeof(write_preamble));
 		++cp;
-		init_dma(cp, OUTPUT_MORE, CURRENT->buffer, 512);
+		init_dma(cp, OUTPUT_MORE, fd_req->buffer, 512);
 		++cp;
 		init_dma(cp, OUTPUT_LAST, write_postamble, sizeof(write_postamble));
 	} else {
-		init_dma(cp, INPUT_LAST, CURRENT->buffer, n * 512);
+		init_dma(cp, INPUT_LAST, fd_req->buffer, n * 512);
 	}
 	++cp;
 	out_le16(&cp->command, DBDMA_STOP);
 	out_le32(&dr->control, (RUN << 16) | RUN);
 	out_8(&sw->control_bis,
-	      (rq_data_dir(CURRENT) == WRITE? WRITE_SECTORS: 0) | DO_ACTION);
+	      (rq_data_dir(fd_req) == WRITE? WRITE_SECTORS: 0) | DO_ACTION);
 	/* enable intr when transfer complete */
 	out_8(&sw->intr_enable, ERROR_INTR | TRANSFER_DONE);
 	set_timeout(fs, 2*HZ, xfer_timeout);	/* enable timeout */
@@ -516,7 +514,7 @@
 		case do_transfer:
 			if (fs->cur_cyl != fs->req_cyl) {
 				if (fs->retries > 5) {
-					end_request(CURRENT, 0);
+					end_request(fd_req, 0);
 					fs->state = idle;
 					return;
 				}
@@ -548,7 +546,7 @@
 	out_8(&sw->intr_enable, 0);
 	fs->cur_cyl = -1;
 	if (fs->retries > 5) {
-		end_request(CURRENT, 0);
+		end_request(fd_req, 0);
 		fs->state = idle;
 		start_request(fs);
 	} else {
@@ -577,7 +575,7 @@
 		return;
 	}
 	printk(KERN_ERR "swim3: seek timeout\n");
-	end_request(CURRENT, 0);
+	end_request(fd_req, 0);
 	fs->state = idle;
 	start_request(fs);
 }
@@ -595,17 +593,17 @@
 	out_8(&sw->intr_enable, 0);
 	out_8(&sw->control_bic, WRITE_SECTORS | DO_ACTION);
 	out_8(&sw->select, RELAX);
-	if (rq_data_dir(CURRENT) == WRITE)
+	if (rq_data_dir(fd_req) == WRITE)
 		++cp;
 	if (ld_le16(&cp->xfer_status) != 0)
 		s = fs->scount - ((ld_le16(&cp->res_count) + 511) >> 9);
 	else
 		s = 0;
-	CURRENT->sector += s;
-	CURRENT->current_nr_sectors -= s;
+	fd_req->sector += s;
+	fd_req->current_nr_sectors -= s;
 	printk(KERN_ERR "swim3: timeout %sing sector %ld\n",
-	       (rq_data_dir(CURRENT)==WRITE? "writ": "read"), CURRENT->sector);
-	end_request(CURRENT, 0);
+	       (rq_data_dir(fd_req)==WRITE? "writ": "read"), fd_req->sector);
+	end_request(fd_req, 0);
 	fs->state = idle;
 	start_request(fs);
 }
@@ -626,7 +624,7 @@
 #endif
 	if ((intr & ERROR_INTR) && fs->state != do_transfer)
 		printk(KERN_ERR "swim3_interrupt, state=%d, dir=%lx, intr=%x, err=%x\n",
-		       fs->state, rq_data_dir(CURRENT), intr, err);
+		       fs->state, rq_data_dir(fd_req), intr, err);
 	switch (fs->state) {
 	case locating:
 		if (intr & SEEN_SECTOR) {
@@ -639,7 +637,7 @@
 				printk(KERN_ERR "swim3: seen sector but cyl=ff?\n");
 				fs->cur_cyl = -1;
 				if (fs->retries > 5) {
-					end_request(CURRENT, 0);
+					end_request(fd_req, 0);
 					fs->state = idle;
 					start_request(fs);
 				} else {
@@ -691,16 +689,16 @@
 		out_8(&sw->select, RELAX);
 		del_timer(&fs->timeout);
 		fs->timeout_pending = 0;
-		if (rq_data_dir(CURRENT) == WRITE)
+		if (rq_data_dir(fd_req) == WRITE)
 			++cp;
 		stat = ld_le16(&cp->xfer_status);
 		resid = ld_le16(&cp->res_count);
 		if (intr & ERROR_INTR) {
 			n = fs->scount - 1 - resid / 512;
 			if (n > 0) {
-				CURRENT->sector += n;
-				CURRENT->current_nr_sectors -= n;
-				CURRENT->buffer += n * 512;
+				fd_req->sector += n;
+				fd_req->current_nr_sectors -= n;
+				fd_req->buffer += n * 512;
 				fs->req_sector += n;
 			}
 			if (fs->retries < 5) {
@@ -708,9 +706,9 @@
 				act(fs);
 			} else {
 				printk("swim3: error %sing block %ld (err=%x)\n",
-				       rq_data_dir(CURRENT) == WRITE? "writ": "read",
-				       CURRENT->sector, err);
-				end_request(CURRENT, 0);
+				       rq_data_dir(fd_req) == WRITE? "writ": "read",
+				       fd_req->sector, err);
+				end_request(fd_req, 0);
 				fs->state = idle;
 			}
 		} else {
@@ -718,17 +716,17 @@
 				/* musta been an error */
 				printk(KERN_ERR "swim3: fd dma: stat=%x resid=%d\n", stat, resid);
 				printk(KERN_ERR "  state=%d, dir=%lx, intr=%x, err=%x\n",
-				       fs->state, rq_data_dir(CURRENT), intr, err);
-				end_request(CURRENT, 0);
+				       fs->state, rq_data_dir(fd_req), intr, err);
+				end_request(fd_req, 0);
 				fs->state = idle;
 				start_request(fs);
 				break;
 			}
-			CURRENT->sector += fs->scount;
-			CURRENT->current_nr_sectors -= fs->scount;
-			CURRENT->buffer += fs->scount * 512;
-			if (CURRENT->current_nr_sectors <= 0) {
-				end_request(CURRENT, 1);
+			fd_req->sector += fs->scount;
+			fd_req->current_nr_sectors -= fs->scount;
+			fd_req->buffer += fs->scount * 512;
+			if (fd_req->current_nr_sectors <= 0) {
+				end_request(fd_req, 1);
 				fs->state = idle;
 			} else {
 				fs->req_sector += fs->scount;
diff -Nru a/drivers/block/swim_iop.c b/drivers/block/swim_iop.c
--- a/drivers/block/swim_iop.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/block/swim_iop.c	Wed Oct 30 16:44:17 2002
@@ -24,12 +24,6 @@
  * be sent.
  */
 
-/* This has to be defined before some of the #includes below */
-
-#define MAJOR_NR  FLOPPY_MAJOR
-#define DEVICE_NAME "floppy"
-#define QUEUE (&swim_queue)
-
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -84,6 +78,11 @@
 static struct floppy_state floppy_states[MAX_FLOPPIES];
 static spinlock_t swim_iop_lock = SPIN_LOCK_UNLOCKED;
 
+#define MAJOR_NR  FLOPPY_MAJOR
+#define DEVICE_NAME "floppy"
+#define QUEUE (&swim_queue)
+#define CURRENT elv_next_request(&swim_queue)
+
 static char *drive_names[7] = {
 	"not installed",	/* DRV_NONE    */
 	"unknown (1)",		/* DRV_UNKNOWN */
@@ -524,13 +523,11 @@
 		return;
 	}
 	while (!blk_queue_empty(QUEUE) && fs->state == idle) {
-		if (MAJOR(CURRENT->rq_dev) != MAJOR_NR)
-			panic(DEVICE_NAME ": request list destroyed");
 		if (CURRENT->bh && !buffer_locked(CURRENT->bh))
 			panic(DEVICE_NAME ": block not locked");
 #if 0
-		printk("do_fd_req: dev=%x cmd=%d sec=%ld nr_sec=%ld buf=%p\n",
-		       kdev_t_to_nr(CURRENT->rq_dev), CURRENT->cmd,
+		printk("do_fd_req: dev=%s cmd=%d sec=%ld nr_sec=%ld buf=%p\n",
+		       CURRENT->rq_disk->disk_name, CURRENT->cmd,
 		       CURRENT->sector, CURRENT->nr_sectors, CURRENT->buffer);
 		printk("           rq_status=%d errors=%d current_nr_sectors=%ld\n",
 		       CURRENT->rq_status, CURRENT->errors, CURRENT->current_nr_sectors);
diff -Nru a/drivers/block/umem.c b/drivers/block/umem.c
--- a/drivers/block/umem.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/block/umem.c	Wed Oct 30 16:44:35 2002
@@ -548,12 +548,7 @@
 
 		return_bio = bio->bi_next;
 		bio->bi_next = NULL;
-		/* should use bio_endio(), however already cleared
-		 * BIO_UPTODATE. so set bio->bi_size = 0 manually to indicate
-		 * completely done
-		 */
-		bio->bi_size = 0;
-		bio->bi_end_io(bio, bytes, 0);
+		bio_endio(bio, bio->bi_size, 0);
 	}
 }
 
@@ -1041,7 +1036,7 @@
 
         spin_lock_init(&card->lock);
 
-	dev->driver_data = card;
+	pci_set_drvdata(dev, card);
 
 	if (pci_write_cmd != 0x0F) 	/* If not Memory Write & Invalidate */
 		pci_write_cmd = 0x07;	/* then Memory Write command */
@@ -1100,7 +1095,7 @@
 */
 static void mm_pci_remove(struct pci_dev *dev)
 {
-	struct cardinfo *card = dev->driver_data;
+	struct cardinfo *card = pci_get_drvdata(dev);
 
 	tasklet_kill(&card->tasklet);
 	iounmap(card->csr_remap);
diff -Nru a/drivers/block/xd.c b/drivers/block/xd.c
--- a/drivers/block/xd.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/block/xd.c	Wed Oct 30 16:44:32 2002
@@ -52,7 +52,6 @@
 #include <asm/dma.h>
 
 #define MAJOR_NR XT_DISK_MAJOR
-#define DEVICE_NR(device) (minor(device) >> 6)
 #include <linux/blk.h>
 #include <linux/blkpg.h>
 
@@ -129,8 +128,8 @@
 static struct gendisk *xd_gendisk[2];
 
 static struct block_device_operations xd_fops = {
-	owner:		THIS_MODULE,
-	ioctl:		xd_ioctl,
+	.owner	= THIS_MODULE,
+	.ioctl	= xd_ioctl,
 };
 static DECLARE_WAIT_QUEUE_HEAD(xd_wait_int);
 static u_char xd_drives, xd_irq = 5, xd_dma = 3, xd_maxsectors;
@@ -144,6 +143,8 @@
 static volatile u_char xd_error;
 static int nodma = XD_DONT_USE_DMA;
 
+static struct request_queue xd_queue;
+
 static devfs_handle_t devfs_handle = NULL;
 
 /* xd_init: register the block device number and set up pointer tables */
@@ -177,7 +178,7 @@
 		goto out1;
 	}
 	devfs_handle = devfs_mk_dir (NULL, "xd", NULL);
-	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_xd_request, &xd_lock);
+	blk_init_queue(&xd_queue, do_xd_request, &xd_lock);
 	if (xd_detect(&controller,&address)) {
 
 		printk("Detected a%s controller (type %d) at address %06x\n",
@@ -193,11 +194,6 @@
 		
 		printk("Detected %d hard drive%s (using IRQ%d & DMA%d)\n",
 			xd_drives,xd_drives == 1 ? "" : "s",xd_irq,xd_dma);
-		for (i = 0; i < xd_drives; i++)
-			printk(" xd%c: CHS=%d/%d/%d\n",'a'+i,
-				xd_info[i].cylinders,xd_info[i].heads,
-				xd_info[i].sectors);
-
 	}
 
 	err = -ENODEV;
@@ -205,13 +201,20 @@
 		goto out3;
 
 	for (i = 0; i < xd_drives; i++) {
+		XD_INFO *p = &xd_info[i];
 		struct gendisk *disk = alloc_disk(64);
 		if (!disk)
 			goto Enomem;
+		p->unit = i;
 		disk->major = MAJOR_NR;
 		disk->first_minor = i<<6;
 		sprintf(disk->disk_name, "xd%c", i+'a');
 		disk->fops = &xd_fops;
+		disk->private_data = p;
+		disk->queue = &xd_queue;
+		set_capacity(disk, p->heads * p->cylinders * p->sectors);
+		printk(" %s: CHS=%d/%d/%d\n", disk->disk_name,
+			p->cylinders, p->heads, p->sectors);
 		xd_gendisk[i] = disk;
 	}
 
@@ -227,14 +230,10 @@
 	}
 
 	/* xd_maxsectors depends on controller - so set after detection */
-	blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), xd_maxsectors);
+	blk_queue_max_sectors(&xd_queue, xd_maxsectors);
 
-	for (i = 0; i < xd_drives; i++) {
-		struct gendisk *disk = xd_gendisk[i];
-		set_capacity(disk, xd_info[i].heads * xd_info[i].cylinders *
-				xd_info[i].sectors);
-		add_disk(disk);
-	}
+	for (i = 0; i < xd_drives; i++)
+		add_disk(xd_gendisk[i]);
 
 	return 0;
 
@@ -246,7 +245,7 @@
 out3:
 	release_region(xd_iobase,4);
 out2:
-	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+	blk_cleanup_queue(&xd_queue);
 	unregister_blkdev(MAJOR_NR, "xd");
 out1:
 	if (xd_dma_buffer)
@@ -286,55 +285,50 @@
 /* do_xd_request: handle an incoming request */
 static void do_xd_request (request_queue_t * q)
 {
-	u_int block,count,retry;
-	int code;
-
 	if (xdc_busy)
 		return;
 
-	while (1) {
-		int unit;
-		code = 0;
-		/* do some checking on the request structure */
-		if (blk_queue_empty(QUEUE))
-			return;
-
-		unit = DEVICE_NR(CURRENT->rq_dev);
-		if (unit < xd_drives
-		    && (CURRENT->flags & REQ_CMD)
-		    && CURRENT->sector + CURRENT->nr_sectors
-		         <= get_capacity(xd_gendisk[unit])) {
-			block = CURRENT->sector;
-			count = CURRENT->nr_sectors;
-
-			switch (rq_data_dir(CURRENT)) {
-				case READ:
-				case WRITE:
-					for (retry = 0; (retry < XD_RETRIES) && !code; retry++)
-						code = xd_readwrite(rq_data_dir(CURRENT),unit,
-							CURRENT->buffer,block,count);
-					break;
-				default:
-					printk("do_xd_request: unknown request\n");
-					break;
-			}
-		}
-		end_request(CURRENT, code);	/* wrap up, 0 = fail, 1 = success */
+	while (!blk_queue_empty(q)) {
+		struct request *req = elv_next_request(q);
+		unsigned block = req->sector;
+		unsigned count = req->nr_sectors;
+		int rw = rq_data_dir(req);
+		XD_INFO *disk = req->rq_disk->private_data;
+		int res = 0;
+		int retry;
+
+		if (!(req->flags & REQ_CMD)) {
+			end_request(req, 0);
+			continue;
+		}
+		if (block + count > get_capacity(req->rq_disk)) {
+			end_request(req, 0);
+			continue;
+		}
+		if (rw != READ && rw != WRITE) {
+			printk("do_xd_request: unknown request\n");
+			end_request(req, 0);
+			continue;
+		}
+		for (retry = 0; (retry < XD_RETRIES) && !res; retry++)
+			res = xd_readwrite(rw, disk, req->buffer, block, count);
+		end_request(req, res);	/* wrap up, 0 = fail, 1 = success */
 	}
 }
 
 /* xd_ioctl: handle device ioctl's */
 static int xd_ioctl (struct inode *inode,struct file *file,u_int cmd,u_long arg)
 {
-	int dev = DEVICE_NR(inode->i_rdev);
+	XD_INFO *p = inode->i_bdev->bd_disk->private_data;
+
 	switch (cmd) {
 		case HDIO_GETGEO:
 		{
 			struct hd_geometry g;
 			struct hd_geometry *geometry = (struct hd_geometry *) arg;
-			g.heads = xd_info[dev].heads;
-			g.sectors = xd_info[dev].sectors;
-			g.cylinders = xd_info[dev].cylinders;
+			g.heads = p->heads;
+			g.sectors = p->sectors;
+			g.cylinders = p->cylinders;
 			g.start = get_start_sect(inode->i_bdev);
 			return copy_to_user(geometry, &g, sizeof g) ? -EFAULT : 0;
 		}
@@ -364,8 +358,9 @@
 }
 
 /* xd_readwrite: handle a read/write request */
-static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count)
+static int xd_readwrite (u_char operation,XD_INFO *p,char *buffer,u_int block,u_int count)
 {
+	int drive = p->unit;
 	u_char cmdblk[6],sense[4];
 	u_short track,cylinder;
 	u_char head,sector,control,mode = PIO_MODE,temp;
@@ -378,16 +373,16 @@
 
 	spin_unlock_irq(&xd_lock);
 
-	control = xd_info[drive].control;
+	control = p->control;
 	if (!xd_dma_buffer)
 		xd_dma_buffer = (char *)xd_dma_mem_alloc(xd_maxsectors * 0x200);
 	while (count) {
 		temp = count < xd_maxsectors ? count : xd_maxsectors;
 
-		track = block / xd_info[drive].sectors;
-		head = track % xd_info[drive].heads;
-		cylinder = track / xd_info[drive].heads;
-		sector = block % xd_info[drive].sectors;
+		track = block / p->sectors;
+		head = track % p->heads;
+		cylinder = track / p->heads;
+		sector = block % p->sectors;
 
 #ifdef DEBUG_READWRITE
 		printk("xd_readwrite: drive = %d, head = %d, cylinder = %d, sector = %d, count = %d\n",drive,head,cylinder,sector,temp);
@@ -1057,7 +1052,7 @@
 		del_gendisk(xd_gendisk[i]);
 		put_disk(xd_gendisk[i]);
 	}
-	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+	blk_cleanup_queue(&xd_queue);
 	release_region(xd_iobase,4);
 	devfs_unregister (devfs_handle);
 	if (xd_drives) {
diff -Nru a/drivers/block/xd.h b/drivers/block/xd.h
--- a/drivers/block/xd.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/block/xd.h	Wed Oct 30 16:44:26 2002
@@ -84,16 +84,9 @@
 	u_short cylinders;
 	u_char sectors;
 	u_char control;
+	int unit;
 } XD_INFO;
 
-/* this structure is returned to the HDIO_GETGEO ioctl */
-typedef struct {
-	__u8 heads;
-	__u8 sectors;
-	__u8 cylinders;
-	__u32 start;
-} XD_GEOMETRY;
-
 /* this structure defines a ROM BIOS signature */
 typedef struct {
 	unsigned int offset;
@@ -109,10 +102,9 @@
 static u_char xd_detect (u_char *controller, unsigned int *address);
 static u_char xd_initdrives (void (*init_drive)(u_char drive));
 
-static int xd_open (struct inode *inode,struct file *file);
 static void do_xd_request (request_queue_t * q);
 static int xd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg);
-static int xd_readwrite (u_char operation,u_char drive,char *buffer,u_int block,u_int count);
+static int xd_readwrite (u_char operation,XD_INFO *disk,char *buffer,u_int block,u_int count);
 static void xd_recalibrate (u_char drive);
 
 static void xd_interrupt_handler (int irq, void *dev_id, struct pt_regs *regs);
diff -Nru a/drivers/block/z2ram.c b/drivers/block/z2ram.c
--- a/drivers/block/z2ram.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/block/z2ram.c	Wed Oct 30 16:44:29 2002
@@ -73,55 +73,36 @@
 static struct block_device_operations z2_fops;
 static struct gendisk *z2ram_gendisk;
 
-static void
-do_z2_request( request_queue_t * q )
+static void do_z2_request(request_queue_t *q)
 {
-    u_long start, len, addr, size;
-
-    while ( TRUE )
-    {
-	if (blk_queue_empty(QUEUE))
-		return;
+	u_long start, len, addr, size;
 
-	start = CURRENT->sector << 9;
-	len  = CURRENT->current_nr_sectors << 9;
-
-	if ( ( start + len ) > z2ram_size )
-	{
-	    printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n",
-		CURRENT->sector,
-		CURRENT->current_nr_sectors);
-	    end_request(CURRENT, FALSE);
-	    continue;
-	}
-
-	if ( ( rq_data_dir(CURRENT) != READ ) && ( rq_data_dir(CURRENT) != WRITE ) )
-	{
-	    printk( KERN_ERR DEVICE_NAME ": bad command: %ld\n", rq_data_dir(CURRENT) );
-	    end_request(CURRENT, FALSE);
-	    continue;
-	}
-
-	while ( len ) 
-	{
-	    addr = start & Z2RAM_CHUNKMASK;
-	    size = Z2RAM_CHUNKSIZE - addr;
-	    if ( len < size )
-		size = len;
-
-	    addr += z2ram_map[ start >> Z2RAM_CHUNKSHIFT ];
-
-	    if ( rq_data_dir(CURRENT) == READ )
-		memcpy( CURRENT->buffer, (char *)addr, size );
-	    else
-		memcpy( (char *)addr, CURRENT->buffer, size );
-
-	    start += size;
-	    len -= size;
+	while (!blk_queue_empty(q)) {
+		struct request *req = elv_next_request(q);
+		unsigned long start = req->sector << 9;
+		unsigned long len  = req->current_nr_sectors << 9;
+
+		if (start + len > z2ram_size) {
+			printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n",
+				req->sector, req->current_nr_sectors);
+			end_request(req, 0);
+			continue;
+		}
+		while (len) {
+			unsigned long addr = start & Z2RAM_CHUNKMASK;
+			unsigned long size = Z2RAM_CHUNKSIZE - addr;
+			if (len < size)
+				size = len;
+			addr += z2ram_map[ start >> Z2RAM_CHUNKSHIFT ];
+			if (rq_data_dir(req) == READ)
+				memcpy(req->buffer, (char *)addr, size);
+			else
+				memcpy((char *)addr, req->buffer, size);
+			start += size;
+			len -= size;
+		}
+		end_request(req, 1);
 	}
-
-	end_request(CURRENT, TRUE);
-    }
 }
 
 static void
@@ -351,6 +332,8 @@
 	return get_disk(z2ram_gendisk);
 }
 
+static struct request_queue z2_queue;
+
 int __init 
 z2_init( void )
 {
@@ -374,7 +357,8 @@
     z2ram_gendisk->fops = &z2_fops;
     sprintf(z2ram_gendisk->disk_name, "z2ram");
 
-    blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_z2_request, &z2ram_lock);
+    blk_init_queue(&z2_queue, do_z2_request, &z2ram_lock);
+    z2ram_gendisk->queue = &z2_queue;
     add_disk(z2ram_gendisk);
     blk_register_region(MKDEV(MAJOR_NR, 0), Z2MINOR_COUNT, THIS_MODULE,
 				z2_find, NULL, NULL);
@@ -410,7 +394,7 @@
 
     del_gendisk(z2ram_gendisk);
     put_disk(z2ram_gendisk);
-    blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+    blk_cleanup_queue(&z2_queue);
 
     if ( current_device != -1 )
     {
diff -Nru a/drivers/bluetooth/Config.help b/drivers/bluetooth/Config.help
--- a/drivers/bluetooth/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,88 +0,0 @@
-HCI UART driver
-CONFIG_BT_HCIUART
-  Bluetooth HCI UART driver.
-  This driver is required if you want to use Bluetooth devices with
-  serial port interface. You will also need this driver if you have 
-  UART based Bluetooth PCMCIA and CF devices like Xircom Credit Card 
-  adapter and BrainBoxes Bluetooth PC Card.
-
-  Say Y here to compile support for Bluetooth UART devices into the
-  kernel or say M to compile it as module (hci_uart.o).
-
-HCI UART (H4) protocol support 
-CONFIG_BT_HCIUART_H4
-  UART (H4) is serial protocol for communication between Bluetooth 
-  device and host. This protocol is required for most Bluetooth devices 
-  with UART interface, including PCMCIA and CF cards. 
-
-  Say Y here to compile support for HCI UART (H4) protocol.
-
-HCI BCSP protocol support 
-CONFIG_BT_HCIUART_BCSP
-  BCSP (BlueCore Serial Protocol) is serial protocol for communication 
-  between Bluetooth device and host. This protocol is required for non
-  USB Bluetooth devices based on CSR BlueCore chip, including PCMCIA and 
-  CF cards.
-
-  Say Y here to compile support for HCI BCSP protocol.
-
-HCI USB driver
-CONFIG_BT_HCIUSB
-  Bluetooth HCI USB driver.
-  This driver is required if you want to use Bluetooth devices with
-  USB interface.
-
-  Say Y here to compile support for Bluetooth USB devices into the
-  kernel or say M to compile it as module (hci_usb.o).
-
-HCI USB zero packet support
-CONFIG_BT_USB_ZERO_PACKET
-  Support for USB zero packets. 
-  This option is provided only as a work around for buggy Bluetooth USB 
-  devices. Do _not_ enable it unless you know for sure that your device 
-  requires zero packets.
-  Most people should say N here.
-
-HCI VHCI Virtual HCI device driver
-CONFIG_BT_HCIVHCI
-  Bluetooth Virtual HCI device driver.
-  This driver is required if you want to use HCI Emulation software.
-
-  Say Y here to compile support for virtual HCI devices into the
-  kernel or say M to compile it as module (hci_vhci.o).
-
-HCI DTL1 (PC Card) device driver
-CONFIG_BT_HCIDTL1
-  Bluetooth HCI DTL1 (PC Card) driver.
-  This driver provides support for Bluetooth PCMCIA devices with
-  Nokia DTL1 interface:
-     Nokia Bluetooth Card
-     Socket Bluetooth CF Card
-
-  Say Y here to compile support for HCI DTL1 devices into the
-  kernel or say M to compile it as module (dtl1_cs.o).
-
-HCI BT3C (PC Card) device driver
-CONFIG_BT_HCIBT3C
-  Bluetooth HCI BT3C (PC Card) driver.
-  This driver provides support for Bluetooth PCMCIA devices with
-  3Com BT3C interface:
-     3Com Bluetooth Card (3CRWB6096)
-     HP Bluetooth Card
-
-  The HCI BT3C driver uses external firmware loader program provided in
-  the BlueFW package. For more information, see <http://bluez.sf.net>.
-
-  Say Y here to compile support for HCI BT3C devices into the
-  kernel or say M to compile it as module (bt3c_cs.o).
-
-HCI BlueCard (PC Card) device driver
-CONFIG_BT_HCIBLUECARD
-  Bluetooth HCI BlueCard (PC Card) driver.
-  This driver provides support for Bluetooth PCMCIA devices with
-  Anycom BlueCard interface:
-     Anycom Bluetooth PC Card
-     Anycom Bluetooth CF Card
-
-  Say Y here to compile support for HCI BlueCard devices into the
-  kernel or say M to compile it as module (bluecard_cs.o).
diff -Nru a/drivers/bluetooth/Config.in b/drivers/bluetooth/Config.in
--- a/drivers/bluetooth/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,23 +0,0 @@
-mainmenu_option next_comment
-comment 'Bluetooth device drivers'
-
-dep_tristate 'HCI USB driver' CONFIG_BT_HCIUSB $CONFIG_BT $CONFIG_USB
-if [ "$CONFIG_BT_HCIUSB" != "n" ]; then
-   bool '  USB zero packet support'  CONFIG_BT_USB_ZERO_PACKET
-fi
-
-dep_tristate 'HCI UART driver' CONFIG_BT_HCIUART $CONFIG_BT
-if [ "$CONFIG_BT_HCIUART" != "n" ]; then
-   bool '  UART (H4) protocol support' CONFIG_BT_HCIUART_H4
-   bool '  BCSP protocol support' CONFIG_BT_HCIUART_BCSP
-fi
-
-dep_tristate 'HCI DTL1 (PC Card) driver' CONFIG_BT_HCIDTL1 $CONFIG_PCMCIA $CONFIG_BT
-
-dep_tristate 'HCI BT3C (PC Card) driver' CONFIG_BT_HCIBT3C $CONFIG_PCMCIA $CONFIG_BT
-
-dep_tristate 'HCI BlueCard (PC Card) driver' CONFIG_BT_HCIBLUECARD $CONFIG_PCMCIA $CONFIG_BT
-
-dep_tristate 'HCI VHCI (Virtual HCI device) driver' CONFIG_BT_HCIVHCI $CONFIG_BT
-
-endmenu
diff -Nru a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/bluetooth/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,113 @@
+
+menu "Bluetooth device drivers"
+	depends on BT!=n
+
+config BT_HCIUSB
+	tristate "HCI USB driver"
+	depends on BT && USB
+	help
+	  Bluetooth HCI USB driver.
+	  This driver is required if you want to use Bluetooth devices with
+	  USB interface.
+
+	  Say Y here to compile support for Bluetooth USB devices into the
+	  kernel or say M to compile it as module (hci_usb.o).
+
+config BT_USB_ZERO_PACKET
+	bool "USB zero packet support"
+	depends on BT_HCIUSB
+	help
+	  Support for USB zero packets. 
+	  This option is provided only as a work around for buggy Bluetooth USB 
+	  devices. Do _not_ enable it unless you know for sure that your device 
+	  requires zero packets.
+	  Most people should say N here.
+
+config BT_HCIUART
+	tristate "HCI UART driver"
+	depends on BT
+	help
+	  Bluetooth HCI UART driver.
+	  This driver is required if you want to use Bluetooth devices with
+	  serial port interface. You will also need this driver if you have 
+	  UART based Bluetooth PCMCIA and CF devices like Xircom Credit Card 
+	  adapter and BrainBoxes Bluetooth PC Card.
+
+	  Say Y here to compile support for Bluetooth UART devices into the
+	  kernel or say M to compile it as module (hci_uart.o).
+
+config BT_HCIUART_H4
+	bool "UART (H4) protocol support"
+	depends on BT_HCIUART
+	help
+	  UART (H4) is serial protocol for communication between Bluetooth 
+	  device and host. This protocol is required for most Bluetooth devices 
+	  with UART interface, including PCMCIA and CF cards. 
+
+	  Say Y here to compile support for HCI UART (H4) protocol.
+
+config BT_HCIUART_BCSP
+	bool "BCSP protocol support"
+	depends on BT_HCIUART
+	help
+	  BCSP (BlueCore Serial Protocol) is serial protocol for communication 
+	  between Bluetooth device and host. This protocol is required for non
+	  USB Bluetooth devices based on CSR BlueCore chip, including PCMCIA and 
+	  CF cards.
+
+	  Say Y here to compile support for HCI BCSP protocol.
+
+config BT_HCIDTL1
+	tristate "HCI DTL1 (PC Card) driver"
+	depends on PCMCIA && BT
+	help
+	  Bluetooth HCI DTL1 (PC Card) driver.
+	  This driver provides support for Bluetooth PCMCIA devices with
+	  Nokia DTL1 interface:
+	  Nokia Bluetooth Card
+	  Socket Bluetooth CF Card
+
+	  Say Y here to compile support for HCI DTL1 devices into the
+	  kernel or say M to compile it as module (dtl1_cs.o).
+
+config BT_HCIBT3C
+	tristate "HCI BT3C (PC Card) driver"
+	depends on PCMCIA && BT
+	---help---
+	  Bluetooth HCI BT3C (PC Card) driver.
+	  This driver provides support for Bluetooth PCMCIA devices with
+	  3Com BT3C interface:
+	  3Com Bluetooth Card (3CRWB6096)
+	  HP Bluetooth Card
+
+	  The HCI BT3C driver uses external firmware loader program provided in
+	  the BlueFW package. For more information, see <http://bluez.sf.net>.
+
+	  Say Y here to compile support for HCI BT3C devices into the
+	  kernel or say M to compile it as module (bt3c_cs.o).
+
+config BT_HCIBLUECARD
+	tristate "HCI BlueCard (PC Card) driver"
+	depends on PCMCIA && BT
+	help
+	  Bluetooth HCI BlueCard (PC Card) driver.
+	  This driver provides support for Bluetooth PCMCIA devices with
+	  Anycom BlueCard interface:
+	  Anycom Bluetooth PC Card
+	  Anycom Bluetooth CF Card
+
+	  Say Y here to compile support for HCI BlueCard devices into the
+	  kernel or say M to compile it as module (bluecard_cs.o).
+
+config BT_HCIVHCI
+	tristate "HCI VHCI (Virtual HCI device) driver"
+	depends on BT
+	help
+	  Bluetooth Virtual HCI device driver.
+	  This driver is required if you want to use HCI Emulation software.
+
+	  Say Y here to compile support for virtual HCI devices into the
+	  kernel or say M to compile it as module (hci_vhci.o).
+
+endmenu
+
diff -Nru a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
--- a/drivers/bluetooth/bluecard_cs.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/bluetooth/bluecard_cs.c	Wed Oct 30 16:44:28 2002
@@ -456,27 +456,27 @@
 			if (info->rx_count == 0) {
 
 				int dlen;
-				hci_event_hdr *eh;
-				hci_acl_hdr *ah;
-				hci_sco_hdr *sh;
+				struct hci_event_hdr *eh;
+				struct hci_acl_hdr *ah;
+				struct hci_sco_hdr *sh;
 
 				switch (info->rx_state) {
 
 				case RECV_WAIT_EVENT_HEADER:
-					eh = (hci_event_hdr *)(info->rx_skb->data);
+					eh = (struct hci_event_hdr *)(info->rx_skb->data);
 					info->rx_state = RECV_WAIT_DATA;
 					info->rx_count = eh->plen;
 					break;
 
 				case RECV_WAIT_ACL_HEADER:
-					ah = (hci_acl_hdr *)(info->rx_skb->data);
+					ah = (struct hci_acl_hdr *)(info->rx_skb->data);
 					dlen = __le16_to_cpu(ah->dlen);
 					info->rx_state = RECV_WAIT_DATA;
 					info->rx_count = dlen;
 					break;
 
 				case RECV_WAIT_SCO_HEADER:
-					sh = (hci_sco_hdr *)(info->rx_skb->data);
+					sh = (struct hci_sco_hdr *)(info->rx_skb->data);
 					info->rx_state = RECV_WAIT_DATA;
 					info->rx_count = sh->dlen;
 					break;
diff -Nru a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
--- a/drivers/bluetooth/bt3c_cs.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/bluetooth/bt3c_cs.c	Wed Oct 30 16:44:35 2002
@@ -318,27 +318,27 @@
 			if (info->rx_count == 0) {
 
 				int dlen;
-				hci_event_hdr *eh;
-				hci_acl_hdr *ah;
-				hci_sco_hdr *sh;
+				struct hci_event_hdr *eh;
+				struct hci_acl_hdr *ah;
+				struct hci_sco_hdr *sh;
 
 				switch (info->rx_state) {
 
 				case RECV_WAIT_EVENT_HEADER:
-					eh = (hci_event_hdr *)(info->rx_skb->data);
+					eh = (struct hci_event_hdr *)(info->rx_skb->data);
 					info->rx_state = RECV_WAIT_DATA;
 					info->rx_count = eh->plen;
 					break;
 
 				case RECV_WAIT_ACL_HEADER:
-					ah = (hci_acl_hdr *)(info->rx_skb->data);
+					ah = (struct hci_acl_hdr *)(info->rx_skb->data);
 					dlen = __le16_to_cpu(ah->dlen);
 					info->rx_state = RECV_WAIT_DATA;
 					info->rx_count = dlen;
 					break;
 
 				case RECV_WAIT_SCO_HEADER:
-					sh = (hci_sco_hdr *)(info->rx_skb->data);
+					sh = (struct hci_sco_hdr *)(info->rx_skb->data);
 					info->rx_state = RECV_WAIT_DATA;
 					info->rx_count = sh->dlen;
 					break;
diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/bluetooth/hci_usb.c	Wed Oct 30 16:44:33 2002
@@ -67,8 +67,8 @@
 #endif
 
 #ifndef CONFIG_BT_USB_ZERO_PACKET
-#undef  USB_ZERO_PACKET
-#define USB_ZERO_PACKET 0
+#undef  URB_ZERO_PACKET
+#define URB_ZERO_PACKET 0
 #endif
 
 static struct usb_driver hci_usb_driver; 
@@ -131,7 +131,7 @@
 	
         pipe = usb_rcvintpipe(husb->udev, husb->intr_ep);
         size = usb_maxpacket(husb->udev, pipe, usb_pipeout(pipe));
-	FILL_INT_URB(urb, husb->udev, pipe, buf, size, 
+	usb_fill_int_urb(urb, husb->udev, pipe, buf, size, 
 			hci_usb_interrupt, husb, husb->intr_interval);
 	
 	return usb_submit_urb(urb, GFP_KERNEL);
@@ -182,7 +182,7 @@
 
         pipe = usb_rcvbulkpipe(husb->udev, husb->bulk_in_ep);
 
-        FILL_BULK_URB(urb, husb->udev, pipe, skb->data, size, hci_usb_rx_complete, skb);
+        usb_fill_bulk_urb(urb, husb->udev, pipe, skb->data, size, hci_usb_rx_complete, skb);
 
 	skb_queue_tail(&husb->pending_q, skb);
 	err = usb_submit_urb(urb, GFP_ATOMIC);
@@ -299,7 +299,7 @@
 	cr->wValue   = 0;
 	cr->wLength  = __cpu_to_le16(skb->len);
 
-	FILL_CONTROL_URB(urb, husb->udev, pipe, (void *) cr,
+	usb_fill_control_urb(urb, husb->udev, pipe, (void *) cr,
 			skb->data, skb->len, hci_usb_tx_complete, skb);
 
 	BT_DBG("%s urb %p len %d", husb->hdev.name, urb, skb->len);
@@ -328,9 +328,9 @@
 
 	pipe = usb_sndbulkpipe(husb->udev, husb->bulk_out_ep);
         
-	FILL_BULK_URB(urb, husb->udev, pipe, skb->data, skb->len,
+	usb_fill_bulk_urb(urb, husb->udev, pipe, skb->data, skb->len,
 	              hci_usb_tx_complete, skb);
-	urb->transfer_flags = USB_ZERO_PACKET;
+	urb->transfer_flags = URB_ZERO_PACKET;
 
 	BT_DBG("%s urb %p len %d", husb->hdev.name, urb, skb->len);
 
@@ -438,16 +438,34 @@
 	__u8 *data = urb->transfer_buffer;
 	int count = urb->actual_length;
 	int len = HCI_EVENT_HDR_SIZE;
+	int status;
 
 	BT_DBG("%s urb %p count %d", husb->hdev.name, urb, count);
 
 	if (!test_bit(HCI_RUNNING, &husb->hdev.flags))
 		return;
 
-	if (urb->status || !count) {
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		BT_DBG("%s urb shutting down with status: %d",
+				husb->hdev.name, urb->status);
+		return;
+	default:
+		BT_ERR("%s nonzero urb status received: %d",
+				husb->hdev.name, urb->status);
+		goto exit;
+	}
+
+	if (!count) {
 		BT_DBG("%s intr status %d, count %d", 
 				husb->hdev.name, urb->status, count);
-		return;
+		goto exit;
 	}
 
 	read_lock(&husb->completion_lock);
@@ -499,12 +517,18 @@
 
 done:
 	read_unlock(&husb->completion_lock);
-	return;
+	goto exit;
 
 bad_len:
 	BT_ERR("%s bad frame len %d expected %d", husb->hdev.name, count, len);
 	husb->hdev.stat.err_rx++;
 	read_unlock(&husb->completion_lock);
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		BT_ERR ("%s usb_submit_urb failed with result %d",
+				husb->hdev.name, status);
 }
 
 static void hci_usb_tx_complete(struct urb *urb)
@@ -605,13 +629,13 @@
 int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
 	struct usb_device *udev = interface_to_usbdev(intf);	
-	struct usb_endpoint_descriptor *bulk_out_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *isoc_out_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *bulk_in_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *isoc_in_ep[HCI_MAX_IFACE_NUM];
-	struct usb_endpoint_descriptor *intr_in_ep[HCI_MAX_IFACE_NUM];
-	struct usb_interface_descriptor *uif;
-	struct usb_endpoint_descriptor *ep;
+	struct usb_host_endpoint *bulk_out_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *isoc_out_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *bulk_in_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *isoc_in_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_endpoint *intr_in_ep[HCI_MAX_IFACE_NUM];
+	struct usb_host_interface *uif;
+	struct usb_host_endpoint *ep;
 	struct usb_interface *iface, *isoc_iface;
 	struct hci_usb *husb;
 	struct hci_dev *hdev;
@@ -624,7 +648,7 @@
 		return -EIO;
 
 	/* Check number of endpoints */
-	if (intf->altsetting[0].bNumEndpoints < 3)
+	if (intf->altsetting[0].desc.bNumEndpoints < 3)
 		return -EIO;
 
 	memset(bulk_out_ep, 0, sizeof(bulk_out_ep));
@@ -639,37 +663,37 @@
 	
 	/* Find endpoints that we need */
 
-	ifn = min_t(unsigned int, udev->actconfig->bNumInterfaces, HCI_MAX_IFACE_NUM);
+	ifn = min_t(unsigned int, udev->actconfig->desc.bNumInterfaces, HCI_MAX_IFACE_NUM);
 	for (i = 0; i < ifn; i++) {
 		iface = &udev->actconfig->interface[i];
 		for (a = 0; a < iface->num_altsetting; a++) {
 			uif = &iface->altsetting[a];
-			for (e = 0; e < uif->bNumEndpoints; e++) {
+			for (e = 0; e < uif->desc.bNumEndpoints; e++) {
 				ep = &uif->endpoint[e];
 
-				switch (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
+				switch (ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
 				case USB_ENDPOINT_XFER_INT:
-					if (ep->bEndpointAddress & USB_DIR_IN)
+					if (ep->desc.bEndpointAddress & USB_DIR_IN)
 						intr_in_ep[i] = ep;
 					break;
 
 				case USB_ENDPOINT_XFER_BULK:
-					if (ep->bEndpointAddress & USB_DIR_IN)
+					if (ep->desc.bEndpointAddress & USB_DIR_IN)
 						bulk_in_ep[i]  = ep;
 					else
 						bulk_out_ep[i] = ep;
 					break;
 
 				case USB_ENDPOINT_XFER_ISOC:
-					if (ep->wMaxPacketSize < size)
+					if (ep->desc.wMaxPacketSize < size)
 						break;
-					size = ep->wMaxPacketSize;
+					size = ep->desc.wMaxPacketSize;
 
 					isoc_iface = iface;
 					isoc_alts  = a;
 					isoc_ifnum = i;
 
-					if (ep->bEndpointAddress & USB_DIR_IN)
+					if (ep->desc.bEndpointAddress & USB_DIR_IN)
 						isoc_in_ep[i]  = ep;
 					else
 						isoc_out_ep[i] = ep;
@@ -697,11 +721,11 @@
 	memset(husb, 0, sizeof(struct hci_usb));
 
 	husb->udev = udev;
-	husb->bulk_out_ep = bulk_out_ep[0]->bEndpointAddress;
-	husb->bulk_in_ep  = bulk_in_ep[0]->bEndpointAddress;
+	husb->bulk_out_ep = bulk_out_ep[0]->desc.bEndpointAddress;
+	husb->bulk_in_ep  = bulk_in_ep[0]->desc.bEndpointAddress;
 
-	husb->intr_ep = intr_in_ep[0]->bEndpointAddress;
-	husb->intr_interval = intr_in_ep[0]->bInterval;
+	husb->intr_ep = intr_in_ep[0]->desc.bEndpointAddress;
+	husb->intr_interval = intr_in_ep[0]->desc.bInterval;
 
 	if (isoc_iface) {
 		if (usb_set_interface(udev, isoc_ifnum, isoc_alts)) {
@@ -711,8 +735,8 @@
 		usb_driver_claim_interface(&hci_usb_driver, isoc_iface, husb);
 		husb->isoc_iface  = isoc_iface;
 
-		husb->isoc_in_ep  = isoc_in_ep[1]->bEndpointAddress;
-		husb->isoc_out_ep = isoc_in_ep[1]->bEndpointAddress;
+		husb->isoc_in_ep  = isoc_in_ep[1]->desc.bEndpointAddress;
+		husb->isoc_out_ep = isoc_in_ep[1]->desc.bEndpointAddress;
 	}
 
 	husb->completion_lock = RW_LOCK_UNLOCKED;
diff -Nru a/drivers/cdrom/Config.help b/drivers/cdrom/Config.help
--- a/drivers/cdrom/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,206 +0,0 @@
-CONFIG_CDU31A
-  These CD-ROM drives have a spring-pop-out caddyless drawer, and a
-  rectangular green LED centered beneath it.  NOTE: these CD-ROM
-  drives will not be auto detected by the kernel at boot time; you
-  have to provide the interface address as an option to the kernel at
-  boot time as described in <file:Documentation/cdrom/cdu31a> or fill
-  in your parameters into <file:drivers/cdrom/cdu31a.c>.  Try "man
-  bootparam" or see the documentation of your boot loader (lilo or
-  loadlin) about how to pass options to the kernel.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 cdu31a.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MCD
-  This is the older of the two drivers for the older Mitsumi models
-  LU-005, FX-001 and FX-001D. This is not the right driver for the
-  FX-001DE and the triple or quad speed models (all these are
-  IDE/ATAPI models). Please also the file
-  <file:Documentation/cdrom/mcd>.
-
-  With the old LU-005 model, the whole drive chassis slides out for cd
-  insertion. The FX-xxx models use a motorized tray type mechanism.
-  Note that this driver does not support XA or MultiSession CDs
-  (PhotoCDs). There is a new driver (next question) which can do
-  this. If you want that one, say N here.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 mcd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MCD_IRQ
-  This allows you to specify the default value of the IRQ used by the
-  driver. This setting can be overridden by passing the "mcd="
-  parameter to the kernel at boot time (or at module load time if you
-  said M to "Standard Mitsumi CD-ROM support").
-
-CONFIG_MCD_BASE
-  This allows you to specify the default value of the I/O base address
-  used by the driver. This setting can be overridden by passing the
-  "mcd=" parameter to the kernel at boot time (or at module load time
-  if you said M to "Standard Mitsumi CD-ROM support").
-
-CONFIG_MCDX
-  Use this driver if you want to be able to read XA or MultiSession
-  CDs (PhotoCDs) as well as ordinary CDs with your Mitsumi LU-005,
-  FX-001 or FX-001D CD-ROM drive. In addition, this driver uses much
-  less kernel memory than the old one, if that is a concern. This
-  driver is able to support more than one drive, but each drive needs
-  a separate interface card. Please read the file
-  <file:Documentation/cdrom/mcdx>.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 mcdx.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SBPCD
-  This driver supports most of the drives which use the Panasonic or
-  Sound Blaster interface.  Please read the file
-  <file:Documentation/cdrom/sbpcd>.
-
-  The Matsushita CR-521, CR-522, CR-523, CR-562, CR-563 drives
-  (sometimes labeled "Creative"), the Creative Labs CD200, the
-  Longshine LCS-7260, the "IBM External ISA CD-ROM" (in fact a CR-56x
-  model), the TEAC CD-55A fall under this category.  Some other
-  "electrically compatible" drives (Vertos, Genoa, some Funai models)
-  are currently not supported; for the Sanyo H94A drive currently a
-  separate driver (asked later) is responsible.  Most drives have a
-  uniquely shaped faceplate, with a caddyless motorized drawer, but
-  without external brand markings.  The older CR-52x drives have a
-  caddy and manual loading/eject, but still no external markings.  The
-  driver is able to do an extended auto-probing for interface
-  addresses and drive types; this can help to find facts in cases you
-  are not sure, but can consume some time during the boot process if
-  none of the supported drives gets found.  Once your drive got found,
-  you should enter the reported parameters into
-  <file:drivers/cdrom/sbpcd.h> and set "DISTRIBUTION 0" there.
-
-  This driver can support up to four CD-ROM controller cards, and each
-  card can support up to four CD-ROM drives; if you say Y here, you
-  will be asked how many controller cards you have.  If compiled as a
-  module, only one controller card (but with up to four drives) is
-  usable.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 sbpcd.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_AZTCD
-  This is your driver if you have an Aztech CDA268-01A, Orchid
-  CD-3110, Okano or Wearnes CDD110, Conrad TXC, or CyCD-ROM CR520 or
-  CR540 CD-ROM drive.  This driver -- just like all these CD-ROM
-  drivers -- is NOT for CD-ROM drives with IDE/ATAPI interfaces, such
-  as Aztech CDA269-031SE. Please read the file
-  <file:Documentation/cdrom/aztcd>.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 aztcd.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_CDU535
-  This is the driver for the older Sony CDU-535 and CDU-531 CD-ROM
-  drives. Please read the file <file:Documentation/cdrom/sonycd535>.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 sonycd535.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GSCD
-  If this is your CD-ROM drive, say Y here.  As described in the file
-  <file:Documentation/cdrom/gscd>, you might have to change a setting
-  in the file <file:drivers/cdrom/gscd.h> before compiling the
-  kernel.  Please read the file <file:Documentation/cdrom/gscd>.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 gscd.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_CM206
-  If you have a Philips/LMS CD-ROM drive cm206 in combination with a
-  cm260 host adapter card, say Y here. Please also read the file
-  <file:Documentation/cdrom/cm206>.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 cm206.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_OPTCD
-  This is the driver for the 'DOLPHIN' drive with a 34-pin Sony
-  compatible interface. It also works with the Lasermate CR328A. If
-  you have one of those, say Y. This driver does not work for the
-  Optics Storage 8001 drive; use the IDE-ATAPI CD-ROM driver for that
-  one. Please read the file <file:Documentation/cdrom/optcd>.
-
-  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
-  file system support" below, because that's the file system used on
-  CD-ROMs.
-
-  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 optcd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SJCD
-  If this is your CD-ROM drive, say Y here and read the file
-  <file:Documentation/cdrom/sjcd>. You should then also say Y or M to
-  "ISO 9660 CD-ROM file system support" below, because that's the
-  file system used on CD-ROMs.
-
-  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 sjcd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ISP16_CDI
-  These are sound cards with built-in cdrom interfaces using the OPTi
-  82C928 or 82C929 chips. Say Y here to have them detected and
-  possibly configured at boot time. In addition, You'll have to say Y
-  to a driver for the particular cdrom drive you have attached to the
-  card. Read <file:Documentation/cdrom/isp16> for details.
-
-  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 isp16.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/cdrom/Config.in b/drivers/cdrom/Config.in
--- a/drivers/cdrom/Config.in	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-#
-# CDROM driver configuration
-#
-tristate '  Aztech/Orchid/Okano/Wearnes/TXC/CyDROM  CDROM support' CONFIG_AZTCD
-tristate '  Goldstar R420 CDROM support' CONFIG_GSCD
-tristate '  Matsushita/Panasonic/Creative, Longshine, TEAC CDROM support' CONFIG_SBPCD
-tristate '  Mitsumi (standard) [no XA/Multisession] CDROM support' CONFIG_MCD
-if [ "$CONFIG_MCD" != "n" ]; then
-   int 'MCD IRQ' CONFIG_MCD_IRQ 11
-   hex 'MCD I/O base' CONFIG_MCD_BASE 300
-fi
-tristate '  Mitsumi [XA/MultiSession] CDROM support' CONFIG_MCDX
-tristate '  Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD
-tristate '  Philips/LMS CM206 CDROM support' CONFIG_CM206
-tristate '  Sanyo CDR-H94A CDROM support' CONFIG_SJCD
-tristate '  ISP16/MAD16/Mozart soft configurable cdrom interface support' CONFIG_ISP16_CDI
-tristate '  Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A
-tristate '  Sony CDU535 CDROM support' CONFIG_CDU535
diff -Nru a/drivers/cdrom/Kconfig b/drivers/cdrom/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/cdrom/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,250 @@
+#
+# CDROM driver configuration
+#
+config AZTCD
+	tristate "Aztech/Orchid/Okano/Wearnes/TXC/CyDROM  CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  This is your driver if you have an Aztech CDA268-01A, Orchid
+	  CD-3110, Okano or Wearnes CDD110, Conrad TXC, or CyCD-ROM CR520 or
+	  CR540 CD-ROM drive.  This driver -- just like all these CD-ROM
+	  drivers -- is NOT for CD-ROM drives with IDE/ATAPI interfaces, such
+	  as Aztech CDA269-031SE. Please read the file
+	  <file:Documentation/cdrom/aztcd>.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 aztcd.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config GSCD
+	tristate "Goldstar R420 CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  If this is your CD-ROM drive, say Y here.  As described in the file
+	  <file:Documentation/cdrom/gscd>, you might have to change a setting
+	  in the file <file:drivers/cdrom/gscd.h> before compiling the
+	  kernel.  Please read the file <file:Documentation/cdrom/gscd>.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 gscd.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SBPCD
+	tristate "Matsushita/Panasonic/Creative, Longshine, TEAC CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  This driver supports most of the drives which use the Panasonic or
+	  Sound Blaster interface.  Please read the file
+	  <file:Documentation/cdrom/sbpcd>.
+
+	  The Matsushita CR-521, CR-522, CR-523, CR-562, CR-563 drives
+	  (sometimes labeled "Creative"), the Creative Labs CD200, the
+	  Longshine LCS-7260, the "IBM External ISA CD-ROM" (in fact a CR-56x
+	  model), the TEAC CD-55A fall under this category.  Some other
+	  "electrically compatible" drives (Vertos, Genoa, some Funai models)
+	  are currently not supported; for the Sanyo H94A drive currently a
+	  separate driver (asked later) is responsible.  Most drives have a
+	  uniquely shaped faceplate, with a caddyless motorized drawer, but
+	  without external brand markings.  The older CR-52x drives have a
+	  caddy and manual loading/eject, but still no external markings.  The
+	  driver is able to do an extended auto-probing for interface
+	  addresses and drive types; this can help to find facts in cases you
+	  are not sure, but can consume some time during the boot process if
+	  none of the supported drives gets found.  Once your drive got found,
+	  you should enter the reported parameters into
+	  <file:drivers/cdrom/sbpcd.h> and set "DISTRIBUTION 0" there.
+
+	  This driver can support up to four CD-ROM controller cards, and each
+	  card can support up to four CD-ROM drives; if you say Y here, you
+	  will be asked how many controller cards you have.  If compiled as a
+	  module, only one controller card (but with up to four drives) is
+	  usable.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 sbpcd.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config MCD
+	tristate "Mitsumi (standard) [no XA/Multisession] CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  This is the older of the two drivers for the older Mitsumi models
+	  LU-005, FX-001 and FX-001D. This is not the right driver for the
+	  FX-001DE and the triple or quad speed models (all these are
+	  IDE/ATAPI models). Please also the file
+	  <file:Documentation/cdrom/mcd>.
+
+	  With the old LU-005 model, the whole drive chassis slides out for cd
+	  insertion. The FX-xxx models use a motorized tray type mechanism.
+	  Note that this driver does not support XA or MultiSession CDs
+	  (PhotoCDs). There is a new driver (next question) which can do
+	  this. If you want that one, say N here.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 mcd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config MCD_IRQ
+	int "MCD IRQ"
+	depends on MCD
+	default "11"
+	help
+	  This allows you to specify the default value of the IRQ used by the
+	  driver. This setting can be overridden by passing the "mcd="
+	  parameter to the kernel at boot time (or at module load time if you
+	  said M to "Standard Mitsumi CD-ROM support").
+
+config MCD_BASE
+	hex "MCD I/O base"
+	depends on MCD
+	default "300"
+	help
+	  This allows you to specify the default value of the I/O base address
+	  used by the driver. This setting can be overridden by passing the
+	  "mcd=" parameter to the kernel at boot time (or at module load time
+	  if you said M to "Standard Mitsumi CD-ROM support").
+
+config MCDX
+	tristate "Mitsumi [XA/MultiSession] CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  Use this driver if you want to be able to read XA or MultiSession
+	  CDs (PhotoCDs) as well as ordinary CDs with your Mitsumi LU-005,
+	  FX-001 or FX-001D CD-ROM drive. In addition, this driver uses much
+	  less kernel memory than the old one, if that is a concern. This
+	  driver is able to support more than one drive, but each drive needs
+	  a separate interface card. Please read the file
+	  <file:Documentation/cdrom/mcdx>.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 mcdx.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config OPTCD
+	tristate "Optics Storage DOLPHIN 8000AT CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  This is the driver for the 'DOLPHIN' drive with a 34-pin Sony
+	  compatible interface. It also works with the Lasermate CR328A. If
+	  you have one of those, say Y. This driver does not work for the
+	  Optics Storage 8001 drive; use the IDE-ATAPI CD-ROM driver for that
+	  one. Please read the file <file:Documentation/cdrom/optcd>.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 optcd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config CM206
+	tristate "Philips/LMS CM206 CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  If you have a Philips/LMS CD-ROM drive cm206 in combination with a
+	  cm260 host adapter card, say Y here. Please also read the file
+	  <file:Documentation/cdrom/cm206>.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 cm206.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SJCD
+	tristate "Sanyo CDR-H94A CDROM support"
+	depends on CD_NO_IDESCSI
+	help
+	  If this is your CD-ROM drive, say Y here and read the file
+	  <file:Documentation/cdrom/sjcd>. You should then also say Y or M to
+	  "ISO 9660 CD-ROM file system support" below, because that's the
+	  file system used on CD-ROMs.
+
+	  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 sjcd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config ISP16_CDI
+	tristate "ISP16/MAD16/Mozart soft configurable cdrom interface support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  These are sound cards with built-in cdrom interfaces using the OPTi
+	  82C928 or 82C929 chips. Say Y here to have them detected and
+	  possibly configured at boot time. In addition, You'll have to say Y
+	  to a driver for the particular cdrom drive you have attached to the
+	  card. Read <file:Documentation/cdrom/isp16> for details.
+
+	  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 isp16.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config CDU31A
+	tristate "Sony CDU31A/CDU33A CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  These CD-ROM drives have a spring-pop-out caddyless drawer, and a
+	  rectangular green LED centered beneath it.  NOTE: these CD-ROM
+	  drives will not be auto detected by the kernel at boot time; you
+	  have to provide the interface address as an option to the kernel at
+	  boot time as described in <file:Documentation/cdrom/cdu31a> or fill
+	  in your parameters into <file:drivers/cdrom/cdu31a.c>.  Try "man
+	  bootparam" or see the documentation of your boot loader (lilo or
+	  loadlin) about how to pass options to the kernel.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 cdu31a.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config CDU535
+	tristate "Sony CDU535 CDROM support"
+	depends on CD_NO_IDESCSI
+	---help---
+	  This is the driver for the older Sony CDU-535 and CDU-531 CD-ROM
+	  drives. Please read the file <file:Documentation/cdrom/sonycd535>.
+
+	  If you say Y here, you should also say Y or M to "ISO 9660 CD-ROM
+	  file system support" below, because that's the file system used on
+	  CD-ROMs.
+
+	  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 sonycd535.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/cdrom/aztcd.c b/drivers/cdrom/aztcd.c
--- a/drivers/cdrom/aztcd.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/cdrom/aztcd.c	Wed Oct 30 16:44:33 2002
@@ -166,9 +166,6 @@
 */
 
 #include <linux/version.h>
-
-#define MAJOR_NR AZTECH_CDROM_MAJOR
-#define QUEUE (&azt_queue)
 #include <linux/blk.h>
 #include "aztcd.h"
 
@@ -196,6 +193,10 @@
   Defines
   ###########################################################################
 */
+
+#define MAJOR_NR AZTECH_CDROM_MAJOR
+#define QUEUE (&azt_queue)
+#define CURRENT elv_next_request(&azt_queue)
 #define SET_TIMER(func, jifs)   delay_timer.expires = jiffies + (jifs); \
                                 delay_timer.function = (void *) (func); \
                                 add_timer(&delay_timer);
diff -Nru a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c
--- a/drivers/cdrom/cm206.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/cdrom/cm206.c	Wed Oct 30 16:44:33 2002
@@ -1497,7 +1497,7 @@
 		goto out_disk;
 	disk->major = MAJOR_NR;
 	disk->first_minor = 0;
-	sprintf(disk->disk_name, "cm206");
+	sprintf(disk->disk_name, "cm206cd");
 	disk->fops = &cm206_bdops;
 	disk->flags = GENHD_FL_CD;
 	cm206_gendisk = disk;
diff -Nru a/drivers/cdrom/gscd.c b/drivers/cdrom/gscd.c
--- a/drivers/cdrom/gscd.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/cdrom/gscd.c	Wed Oct 30 16:44:19 2002
@@ -268,7 +268,7 @@
 		goto out;
 
 	if (req->cmd != READ) {
-		printk("GSCD: bad cmd %d\n", req->cmd);
+		printk("GSCD: bad cmd %d\n", rq_data_dir(req));
 		end_request(req, 0);
 		goto repeat;
 	}
diff -Nru a/drivers/cdrom/mcd.c b/drivers/cdrom/mcd.c
--- a/drivers/cdrom/mcd.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/cdrom/mcd.c	Wed Oct 30 16:44:29 2002
@@ -100,9 +100,6 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-
-#define MAJOR_NR MITSUMI_CDROM_MAJOR
-#define QUEUE (&mcd_queue)
 #include <linux/blk.h>
 
 #define mcd_port mcd		/* for compatible parameter passing with "insmod" */
@@ -117,6 +114,10 @@
 /* Is the drive connected properly and responding?? */
 static int mcdPresent;
 static struct request_queue mcd_queue;
+
+#define MAJOR_NR MITSUMI_CDROM_MAJOR
+#define QUEUE (&mcd_queue)
+#define CURRENT elv_next_request(&mcd_queue)
 
 #define QUICK_LOOP_DELAY udelay(45)	/* use udelay */
 #define QUICK_LOOP_COUNT 20
diff -Nru a/drivers/cdrom/optcd.c b/drivers/cdrom/optcd.c
--- a/drivers/cdrom/optcd.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/cdrom/optcd.c	Wed Oct 30 16:44:26 2002
@@ -74,15 +74,16 @@
 #include <linux/devfs_fs_kernel.h>
 
 #include <asm/io.h>
-
-#define MAJOR_NR OPTICS_CDROM_MAJOR
-#define QUEUE (&opt_queue)
 #include <linux/blk.h>
 
 #include <linux/cdrom.h>
 #include "optcd.h"
 
 #include <asm/uaccess.h>
+
+#define MAJOR_NR OPTICS_CDROM_MAJOR
+#define QUEUE (&opt_queue)
+#define CURRENT elv_next_request(&opt_queue)
 
 
 /* Debug support */
diff -Nru a/drivers/cdrom/sjcd.c b/drivers/cdrom/sjcd.c
--- a/drivers/cdrom/sjcd.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/cdrom/sjcd.c	Wed Oct 30 16:44:29 2002
@@ -75,14 +75,15 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-
-#define MAJOR_NR SANYO_CDROM_MAJOR
-#define QUEUE (&sjcd_queue)
 #include <linux/blk.h>
 #include "sjcd.h"
 
 static int sjcd_present = 0;
 static struct request_queue sjcd_queue;
+
+#define MAJOR_NR SANYO_CDROM_MAJOR
+#define QUEUE (&sjcd_queue)
+#define CURRENT elv_next_request(&sjcd_queue)
 
 #define SJCD_BUF_SIZ 32		/* cdr-h94a has internal 64K buffer */
 
diff -Nru a/drivers/char/Config.help b/drivers/char/Config.help
--- a/drivers/char/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,969 +0,0 @@
-CONFIG_QTRONIX_KEYBOARD
-  Images of Qtronix keyboards are at
-  <http://www.qtronix.com/keyboard.html>.
-
-CONFIG_SERIAL_NONSTANDARD
-  Say Y here if you have any non-standard serial boards -- boards
-  which aren't supported using the standard "dumb" serial driver.
-  This includes intelligent serial boards such as Cyclades,
-  Digiboards, etc. These are usually used for systems that need many
-  serial ports because they serve many terminals or dial-in
-  connections.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about non-standard serial boards.
-
-  Most people can say N here.
-
-CONFIG_MWAVE
-  The ACP modem (Mwave) for Linux is a WinModem. It is composed of a
-  kernel driver and a user level application. Together these components
-  support direct attachment to public switched telephone networks (PSTNs)
-  and support selected world wide countries.
-
-  This version of the ACP Modem driver supports the IBM Thinkpad 600E,
-  600, and 770 that include on board ACP modem hardware.
-
-  The modem also supports the standard communications port interface
-  (ttySx) and is compatible with the Hayes AT Command Set.
-
-  The user level application needed to use this driver can be found at
-  the IBM Linux Technology Center (LTC) web site:
-  <http://www.ibm.com/linux/ltc/>.
-
-  If you own one of the above IBM Thinkpads which has the Mwave chipset
-  in it, say Y.
-
-  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 mwave.o. If you want to compile it as
-  a module, say M here and read Documentation/modules.txt.
-
-CONFIG_I810_TCO
-  Hardware driver for the TCO timer built into the Intel i810 and i815
-  chipset family.  The TCO (Total Cost of Ownership) timer is a
-  watchdog timer that will reboot the machine after its second
-  expiration. The expiration time can be configured by commandline
-  argument "i810_margin=<n>" where <n> is the counter initial value.
-  It is decremented every 0.6 secs, the default is 50 which gives a
-  timeout of 30 seconds and one minute until reset.
-
-  On some motherboards the driver may fail to reset the chipset's
-  NO_REBOOT flag which prevents the watchdog from rebooting the
-  machine. If this is the case you will get a kernel message like
-  "i810tco init: failed to reset NO_REBOOT flag".
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called
-  i810-tco.o.
-
-CONFIG_VT
-  If you say Y here, you will get support for terminal devices with
-  display and keyboard devices. These are called "virtual" because you
-  can run several virtual terminals (also called virtual consoles) on
-  one physical terminal. This is rather useful, for example one
-  virtual terminal can collect system messages and warnings, another
-  one can be used for a text-mode user session, and a third could run
-  an X session, all in parallel. Switching between virtual terminals
-  is done with certain key combinations, usually Alt-<function key>.
-
-  The setterm command ("man setterm") can be used to change the
-  properties (such as colors or beeping) of a virtual terminal. The
-  man page console_codes(4) ("man console_codes") contains the special
-  character sequences that can be used to change those properties
-  directly. The fonts used on virtual terminals can be changed with
-  the setfont ("man setfont") command and the key bindings are defined
-  with the loadkeys ("man loadkeys") command.
-
-  You need at least one virtual terminal device in order to make use
-  of your keyboard and monitor. Therefore, only people configuring an
-  embedded system would want to say N here in order to save some
-  memory; the only way to log into such a system is then via a serial
-  or network connection.
-
-  If unsure, say Y, or else you won't be able to do much with your new
-  shiny Linux system :-)
-
-CONFIG_VT_CONSOLE
-  The system console is the device which receives all kernel messages
-  and warnings and which allows logins in single user mode. If you
-  answer Y here, a virtual terminal (the device used to interact with
-  a physical terminal) can be used as system console. This is the most
-  common mode of operations, so you should say Y here unless you want
-  the kernel messages be output only to a serial port (in which case
-  you should say Y to "Console on serial port", below).
-
-  If you do say Y here, by default the currently visible virtual
-  terminal (/dev/tty0) will be used as system console. You can change
-  that with a kernel command line option such as "console=tty3" which
-  would use the third virtual terminal as system console. (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.)
-
-  If unsure, say Y.
-
-CONFIG_ROCKETPORT
-  This is a driver for the Comtrol Rocketport cards which provide
-  multiple serial ports. You would need something like this to connect
-  more than two modems to your Linux box, for instance in order to
-  become a dial-in server.
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  rocket.o.
-
-CONFIG_DIGIEPCA
-  This is a driver for Digi International's Xx, Xeve, and Xem series
-  of cards which provide multiple serial ports. You would need
-  something like this to connect more than two modems to your Linux
-  box, for instance in order to become a dial-in server. This driver
-  supports the original PC (ISA) boards as well as PCI, and EISA. If
-  you have a card like this, say Y here and read the file
-  <file:Documentation/digiepca.txt>.
-
-  NOTE: There is another, separate driver for the Digiboard PC boards:
-  "Digiboard PC/Xx Support" below. You should (and can) only select
-  one of the two drivers.
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called epca.o.
-
-CONFIG_DIGI
-  This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards
-  that give you many serial ports. You would need something like this
-  to connect more than two modems to your Linux box, for instance in
-  order to become a dial-in server. If you have a card like that, say
-  Y here and read the file <file:Documentation/digiboard.txt>.
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called pcxx.o.
-
-CONFIG_RISCOM8
-  This is a driver for the SDL Communications RISCom/8 multiport card,
-  which gives you many serial ports. You would need something like
-  this to connect more than two modems to your Linux box, for instance
-  in order to become a dial-in server. If you have a card like that,
-  say Y here and read the file <file:Documentation/riscom8.txt>.
-
-  Also it's possible to say M here and compile this driver as kernel
-  loadable module; the module will be called riscom8.o.
-
-CONFIG_COMPUTONE
-  This driver supports the entire family of Intelliport II/Plus
-  controllers with the exception of the MicroChannel controllers and
-  products previous to the Intelliport II. These are multiport cards,
-  which give you many serial ports. You would need something like this
-  to connect more than two modems to your Linux box, for instance in
-  order to become a dial-in server. If you have a card like that, say
-  Y here and read <file:Documentation/computone.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. You will get
-  two modules called ip2.o and ip2main.o.
-
-CONFIG_SPECIALIX
-  This is a driver for the Specialix IO8+ multiport card (both the
-  ISA and the PCI version) which gives you many serial ports. You
-  would need something like this to connect more than two modems to
-  your Linux box, for instance in order to become a dial-in server.
-
-  If you have a card like that, say Y here and read the file
-  <file:Documentation/specialix.txt>. Also it's possible to say M here
-  and compile this driver as kernel loadable module which will be
-  called specialix.o.
-
-CONFIG_SPECIALIX_RTSCTS
-  The Specialix IO8+ card can only support either RTS or DTR. If you
-  say N here, the driver will use the pin as "DTR" when the tty is in
-  software handshake mode.  If you say Y here or hardware handshake is
-  on, it will always be RTS.  Read the file
-  <file:Documentation/specialix.txt> for more information.
-
-CONFIG_RIO
-  This is a driver for the Specialix RIO, a smart serial card which
-  drives an outboard box that can support up to 128 ports.  Product
-  information is at <http://www.sphinxcst.co.uk/perle/multi.htm>.
-  There are both ISA and PCI versions.
-
-CONFIG_RIO_OLDPCI
-  Older RIO PCI cards need some initialization-time configuration to
-  determine the IRQ and some control addresses.  If you have a RIO and
-  this doesn't seem to work, try setting this to Y.
-
-CONFIG_CYCLADES
-  This is a driver for a card that gives you many serial ports. You
-  would need something like this to connect more than two modems to
-  your Linux box, for instance in order to become a dial-in server.
-  For information about the Cyclades-Z card, read
-  <file:drivers/char/README.cycladesZ>.
-
-  As of 1.3.9x kernels, this driver's minor numbers start at 0 instead
-  of 32.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called cyclades.o.
-
-  If you haven't heard about it, it's safe to say N.
-
-CONFIG_CYZ_INTR
-  The Cyclades-Z family of multiport cards allows 2 (two) driver op
-  modes: polling and interrupt. In polling mode, the driver will check
-  the status of the Cyclades-Z ports every certain amount of time
-  (which is called polling cycle and is configurable). In interrupt
-  mode, it will use an interrupt line (IRQ) in order to check the
-  status of the Cyclades-Z ports. The default op mode is polling. If
-  unsure, say N.
-
-CONFIG_STALDRV
-  Stallion cards give you many serial ports.  You would need something
-  like this to connect more than two modems to your Linux box, for
-  instance in order to become a dial-in server.  If you say Y here,
-  you will be asked for your specific card model in the next
-  questions.  Make sure to read <file:Documentation/stallion.txt> in
-  this case.  If you have never heard about all this, it's safe to
-  say N.
-
-CONFIG_STALLION
-  If you have an EasyIO or EasyConnection 8/32 multiport Stallion
-  card, then this is for you; say Y.  Make sure to read
-  <file:Documentation/stallion.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called stallion.o.
-
-CONFIG_ISTALLION
-  If you have an EasyConnection 8/64, ONboard, Brumby or Stallion
-  serial multiport card, say Y here. Make sure to read
-  <file:Documentation/stallion.txt>.
-
-  To compile it as a module ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt>. The module will be called
-  istallion.o.
-
-CONFIG_SERIAL_TX3912
-  The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core;
-  see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>.
-  Say Y here to enable kernel support for the on-board serial port.
-
-CONFIG_SERIAL_TX3912_CONSOLE
-  The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core;
-  see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>.
-  Say Y here to direct console I/O to the on-board serial port.
-
-CONFIG_AU1000_SERIAL_CONSOLE
-  If you have an Alchemy AU1000 processor (MIPS based) and you want
-  to use a console on a serial port, say Y.  Otherwise, say N.
-
-CONFIG_AU1000_UART
-  If you have an Alchemy AU1000 processor (MIPS based) and you want
-  to use serial ports, say Y.  Otherwise, say N.
-
-CONFIG_SYNCLINK
-  Provides support for the SyncLink ISA and PCI multiprotocol serial
-  adapters. These adapters support asynchronous and HDLC bit
-  synchronous communication up to 10Mbps (PCI adapter).
-
-  This driver can only be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called synclink.o.  If you want to do that, say M
-  here.
-
-CONFIG_SYNCLINKMP
-  Enable support for the SyncLink Multiport (2 or 4 ports)
-  serial adapter, running asynchronous and HDLC communications up
-  to 2.048Mbps. Each ports is independently selectable for
-  RS-232, V.35, RS-449, RS-530, and X.21
-
-  This driver may be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called synclinkmp.o.  If you want to do that, say M
-  here.
-
-CONFIG_N_HDLC
-  Allows synchronous HDLC communications with tty device drivers that
-  support synchronous HDLC such as the Microgate SyncLink adapter.
-
-  This driver can only be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called n_hdlc.o. If you want to do that, say M
-  here.
-
-CONFIG_SX
-  This is a driver for the SX and SI multiport serial cards.
-  Please read the file <file:Documentation/sx.txt> for details.
-
-  This driver can only be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called sx.o. If you want to do that, say M here.
-
-CONFIG_ESPSERIAL
-  This is a driver which supports Hayes ESP serial ports.  Both single
-  port cards and multiport cards are supported.  Make sure to read
-  <file:Documentation/hayes-esp.txt>.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>.  The module will be
-  called esp.o.  If unsure, say N.
-
-CONFIG_MOXA_INTELLIO
-  Say Y here if you have a Moxa Intellio multiport serial card.
-
-  This driver can also be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called moxa.o. If you want to do that, say M
-  here.
-
-CONFIG_MOXA_SMARTIO
-  Say Y here if you have a Moxa SmartIO multiport serial card.
-
-  This driver can also be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called mxser.o. If you want to do that, say M
-  here.
-
-CONFIG_ISI
-  This is a driver for the Multi-Tech cards which provide several
-  serial ports.  The driver is experimental and can currently only be
-  built as a module ( = code which can be inserted in and removed from
-  the running kernel whenever you want).  Please read
-  <file:Documentation/modules.txt>.  The module will be called
-  isicom.o.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_PRINTER
-  If you intend to attach a printer to the parallel port of your Linux
-  box (as opposed to using a serial printer; if the connector at the
-  printer has 9 or 25 holes ["female"], then it's serial), say Y.
-  Also read the Printing-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  It is possible to share one parallel port among several devices
-  (e.g. printer and ZIP drive) and it is safe to compile the
-  corresponding drivers into the kernel.  If you want to compile this
-  driver as a module however ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt> and
-  <file:Documentation/parport.txt>.  The module will be called lp.o.
-
-  If you have several parallel ports, you can specify which ports to
-  use with the "lp" kernel command line option.  (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.)  The syntax of the
-  "lp" command line option can be found in <file:drivers/char/lp.c>.
-
-  If you have more than 8 printers, you need to increase the LP_NO
-  macro in lp.c and the PARPORT_MAX macro in parport.h.
-
-CONFIG_LP_CONSOLE
-  If you want kernel messages to be printed out as they occur, you
-  can have a console on the printer. This option adds support for
-  doing that; to actually get it to happen you need to pass the
-  option "console=lp0" to the kernel at boot time.
-
-  If the printer is out of paper (or off, or unplugged, or too
-  busy..) the kernel will stall until the printer is ready again.
-  By defining CONSOLE_LP_STRICT to 0 (at your own risk) you
-  can make the kernel continue when this happens,
-  but it'll lose the kernel messages.
-
-  If unsure, say N.
-
-CONFIG_PPDEV
-  Saying Y to this adds support for /dev/parport device nodes.  This
-  is needed for programs that want portable access to the parallel
-  port, for instance deviceid (which displays Plug-and-Play device
-  IDs).
-
-  This is the parallel port equivalent of SCSI generic support (sg).
-  It is safe to say N to this -- it is not needed for normal printing
-  or parallel port CD-ROM/disk support.
-
-  This support is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  ppdev.o.
-
-  If unsure, say N.
-
-CONFIG_BUSMOUSE
-  Say Y here if your machine has a bus mouse as opposed to a serial
-  mouse. Most people have a regular serial MouseSystem or
-  Microsoft mouse (made by Logitech) that plugs into a COM port
-  (rectangular with 9 or 25 pins). These people say N here. 
-
-  If you have a laptop, you either have to check the documentation or
-  experiment a bit to find out whether the trackball is a serial mouse
-  or not; it's best to say Y here for you.
-
-  This is the generic bus mouse driver code. If you have a bus mouse,
-  you will have to say Y here and also to the specific driver for your
-  mouse below.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called busmouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_QIC02_TAPE
-  If you have a non-SCSI tape drive like that, say Y. Or, if you want
-  to compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  tpqic02.o.
-
-CONFIG_QIC02_DYNCONF
-  You can either configure this driver once and for all by editing a
-  header file (<file:include/linux/tpqic02.h>), in which case you
-  should say N, or you can fetch a program via anonymous FTP which is
-  able to configure this driver during runtime.  The program to do
-  this is called 'qic02conf' and it is part of the
-  tpqic02-support-X.Y.tar.gz support package.
-
-  If you want to use the qic02conf program, say Y.
-
-CONFIG_FTAPE
-  If you have a tape drive that is connected to your floppy
-  controller, say Y here.
-
-  Some tape drives (like the Seagate "Tape Store 3200" or the Iomega
-  "Ditto 3200" or the Exabyte "Eagle TR-3") come with a "high speed"
-  controller of their own. These drives (and their companion
-  controllers) are also supported if you say Y here.
-
-  If you have a special controller (such as the CMS FC-10, FC-20,
-  Mountain Mach-II, or any controller that is based on the Intel 82078
-  FDC like the high speed controllers by Seagate and Exabyte and
-  Iomega's "Ditto Dash") you must configure it by selecting the
-  appropriate entries from the "Floppy tape controllers" sub-menu
-  below and possibly modify the default values for the IRQ and DMA
-  channel and the IO base in ftape's configuration menu.
-
-  If you want to use your floppy tape drive on a PCI-bus based system,
-  please read the file <file:drivers/char/ftape/README.PCI>.
-
-  The ftape kernel driver is also available as a runtime loadable
-  module ( = code which can be inserted in and removed from the
-  running kernel whenever you want). If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>. The
-  module will be called ftape.o.
-
-  Note that the Ftape-HOWTO is out of date (sorry) and documents the
-  older version 2.08 of this software but still contains useful
-  information.  There is a web page with more recent documentation at
-  <http://www.instmath.rwth-aachen.de/~heine/ftape/>.  This page
-  always contains the latest release of the ftape driver and useful
-  information (backup software, ftape related patches and
-  documentation, FAQ).  Note that the file system interface has
-  changed quite a bit compared to previous versions of ftape.  Please
-  read <file:Documentation/ftape.txt>.
-
-CONFIG_DTLK
-  This driver is for the DoubleTalk PC, a speech synthesizer
-  manufactured by RC Systems (<http://www.rcsys.com/>).  It is also
-  called the `internal DoubleTalk'.  If you want to compile this as a
-  module ( = code which can be inserted in and removed from the
-  running kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>. The module will be called dtlk.o.
-
-CONFIG_R3964
-  This driver allows synchronous communication with devices using the
-  Siemens R3964 packet protocol. Unless you are dealing with special
-  hardware like PLCs, you are unlikely to need this.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  n_r3964.o.
-
-  If unsure, say N.
-
-CONFIG_APPLICOM
-  This driver provides the kernel-side support for the intelligent
-  fieldbus cards made by Applicom International. More information
-  about these cards can be found on the WWW at the address
-  <http://www.applicom-int.com/>, or by email from David Woodhouse
-  <dwmw2@infradead.org>.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  applicom.o.
-
-  If unsure, say N.
-
-CONFIG_SONYPI
-  This driver enables access to the Sony Programmable I/O Control
-  Device which can be found in many (all ?) Sony Vaio laptops.
-
-  If you have one of those laptops, read
-  <file:Documentation/sonypi.txt>, and say Y or M here.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called sonypi.o.
-
-CONFIG_INTEL_RNG
-  This driver provides kernel-side support for the Random Number
-  Generator hardware found on Intel i8xx-based motherboards.
-
-  Both a character driver, used to read() entropy data, and a timer
-  function which automatically adds entropy directly into the
-  kernel pool, are exported by this driver.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  i810_rng.o.
-
-  If unsure, say N.
-
-CONFIG_AMD_RNG
-  This driver provides kernel-side support for the Random Number
-  Generator hardware found on AMD 76x based motherboards.
-
-  Both a character driver, used to read() entropy data, and a timer
-  function which automatically adds entropy directly into the
-  kernel pool, are exported by this driver.
-
-  To compile this driver as a module ( = code which can be inserted in
-  and removed from the running kernel whenever you want), say M here
-  and read <file:Documentation/modules.txt>. The module will be called
-  amd768_rng.o.
-
-  If unsure, say N.
-
-CONFIG_WATCHDOG
-  If you say Y here (and to one of the following options) and create a
-  character special file /dev/watchdog with major number 10 and minor
-  number 130 using mknod ("man mknod"), you will get a watchdog, i.e.:
-  subsequently opening the file and then failing to write to it for
-  longer than 1 minute will result in rebooting the machine. This
-  could be useful for a networked machine that needs to come back
-  online as fast as possible after a lock-up. There's both a watchdog
-  implementation entirely in software (which can sometimes fail to
-  reboot the machine) and a driver for hardware watchdog boards, which
-  are more robust and can also keep track of the temperature inside
-  your computer. For details, read <file:Documentation/watchdog.txt>
-  in the kernel source.
-
-  The watchdog is usually used together with the watchdog daemon
-  which is available from
-  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
-  also monitor NFS connections and can reboot the machine when the process
-  table is full.
-
-  If unsure, say N.
-
-CONFIG_WATCHDOG_NOWAYOUT
-  The default watchdog behaviour (which you get if you say N here) is
-  to stop the timer if the process managing it closes the file
-  /dev/watchdog. It's always remotely possible that this process might
-  get killed. If you say Y here, the watchdog cannot be stopped once
-  it has been started.
-
-CONFIG_WDT
-  If you have a WDT500P or WDT501P watchdog board, say Y here,
-  otherwise N. It is not possible to probe for this board, which means
-  that you have to inform the kernel about the IO port and IRQ using
-  the "wdt=" kernel option (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).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called wdt.o.
-
-CONFIG_WDTPCI
-  If you have a PCI WDT500/501 watchdog board, say Y here, otherwise
-  N.  It is not possible to probe for this board, which means that you
-  have to inform the kernel about the IO port and IRQ using the "wdt="
-  kernel option (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).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called wdt_pci.o.
-
-CONFIG_WDT_501
-  Saying Y here and creating a character special file /dev/temperature
-  with major number 10 and minor number 131 ("man mknod") will give
-  you a thermometer inside your computer: reading from
-  /dev/temperature yields one byte, the temperature in degrees
-  Fahrenheit. This works only if you have a WDT501P watchdog board
-  installed.
-
-CONFIG_WDT_501_FAN
-  Enable the Fan Tachometer on the WDT501. Only do this if you have a
-  fan tachometer actually set up.
-
-CONFIG_SOFT_WATCHDOG
-  A software monitoring watchdog. This will fail to reboot your system
-  from some situations that the hardware watchdog will recover
-  from. Equally it's a lot cheaper to install.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called
-   softdog.o.
-
-CONFIG_PCWATCHDOG
-  This is the driver for the Berkshire Products PC Watchdog card.
-  This card simply watches your kernel to make sure it doesn't freeze,
-  and if it does, it reboots your computer after a certain amount of
-  time. This driver is like the WDT501 driver but for different
-  hardware. Please read <file:Documentation/pcwd-watchdog.txt>. The PC
-  watchdog cards can be ordered from <http://www.berkprod.com/>.
-
-  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 is called pcwd.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-  Most people will say N.
-
-CONFIG_ACQUIRE_WDT
-  This is the driver for the hardware watchdog on the PSC-6x86 Single
-  Board Computer produced by Acquire Inc (and others).  This watchdog
-  simply watches your kernel to make sure it doesn't freeze, and if
-  it does, it reboots your computer after a certain amount of time.
-
-  This driver is like the WDT501 driver but for different hardware.
-  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 is called pscwdt.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  Most
-  people will say N.
-
-CONFIG_ADVANTECH_WDT
-  If you are configuring a Linux kernel for the Advantech single-board
-  computer, say `Y' here to support its built-in watchdog timer
-  feature.  See the help for CONFIG_WATCHDOG for discussion.
-
-CONFIG_W83877F_WDT
-  This is the driver for the hardware watchdog on the W83877F chipset
-  as used in EMACS PC-104 motherboards (and likely others).  This
-  watchdog simply watches your kernel to make sure it doesn't freeze,
-  and if it does, it reboots your computer after a certain amount of
-  time.
-
-  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 is called mixcomwd.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  Most
-  people will say N.
-
-CONFIG_EUROTECH_WDT
-  Enable support for the watchdog timer on the Eurotech CPU-1220 and
-  CPU-1410 cards.  These are PC/104 SBCs. Spec sheets and product
-  information are at <http://www.eurotech.it/>.
-
-CONFIG_IB700_WDT
-  This is the driver for the hardware watchdog on the IB700 Single
-  Board Computer produced by TMC Technology (www.tmc-uk.com). This watchdog
-  simply watches your kernel to make sure it doesn't freeze, and if
-  it does, it reboots your computer after a certain amount of time.
-
-  This driver is like the WDT501 driver but for slightly different hardware.
-
-  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 is called ib700wdt.o. If you want to compile it as a
-  module, say M here and read Documentation/modules.txt. Most people
-  will say N.
-
-CONFIG_MIXCOMWD
-  This is a driver for the Mixcom hardware watchdog cards.  This
-  watchdog simply watches your kernel to make sure it doesn't freeze,
-  and if it does, it reboots your computer after a certain amount of
-  time.
-
-  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 is called mixcomwd.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  Most
-  people will say N.
-
-CONFIG_SCx200_WDT
-  Enable the built-in watchdog timer support on the National 
-  Semiconductor SCx200 processors.
-
-  If compiled as a module, it will be called scx200_watchdog.o.
-
-CONFIG_MACHZ_WDT
-  If you are using a ZF Micro MachZ processor, say Y here, otherwise
-  N.  This is the driver for the watchdog timer builtin on that
-  processor using ZF-Logic interface.  This watchdog simply watches
-  your kernel to make sure it doesn't freeze, and if it does, it
-  reboots your computer after a certain amount of time.
-
-  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 is called machzwd.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_60XX_WDT
- This driver can be used with the watchdog timer found on some
- single board computers, namely the 6010 PII based computer.
- It may well work with other cards.  It reads port 0x443 to enable
- and re-set the watchdog timer, and reads port 0x45 to disable
- the watchdog.  If you have a card that behave in similar ways,
- you can probably make this driver work with your card as well.
-
- You can compile this driver directly into the kernel, or use
- it as a module.  The module will be called sbc60xxwdt.o.
-
-CONFIG_RTC
-  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
-  into your computer.
-
-  Every PC has such a clock built in. It can be used to generate
-  signals from as low as 1Hz up to 8192Hz, and can also be used
-  as a 24 hour alarm. It reports status information via the file
-  /proc/driver/rtc and its behaviour is set by various ioctls on
-  /dev/rtc.
-
-  If you run Linux on a multiprocessor machine and said Y to
-  "Symmetric Multi Processing" above, you should say Y here to read
-  and set the RTC in an SMP compatible fashion.
-
-  If you think you have a use for such a device (such as periodic data
-  sampling), then say Y here, and read <file:Documentation/rtc.txt>
-  for details.
-
-  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 is called rtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-Generic Real Time Clock Support
-CONFIG_GEN_RTC
-  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
-  into your computer.
-
-  It reports status information via the file /proc/driver/rtc and its
-  behaviour is set by various ioctls on /dev/rtc. If you enable the
-  "extended RTC operation" below it will also provide an emulation
-  for RTC_UIE which is required by some programs and may improve
-  precision in some cases.
-
-  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 is called genrtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>. To load the
-  module automaticaly add 'alias char-major-10-135 genrtc' to your
-  /etc/modules.conf
-
-Extended RTC operation
-CONFIG_GEN_RTC_X
-  Provides an emulation for RTC_UIE which is required by some programs
-  and may improve precision of the generic RTC support in some cases.
-
-CONFIG_H8
-  The Hitachi H8/337 is a microcontroller used to deal with the power
-  and thermal environment. If you say Y here, you will be able to
-  communicate with it via a character special device.
-
-  If unsure, say N.
-
-CONFIG_NVRAM
-  If you say Y here and create a character special file /dev/nvram
-  with major number 10 and minor number 144 using mknod ("man mknod"),
-  you get read and write access to the extra bytes of non-volatile
-  memory in the real time clock (RTC), which is contained in every PC
-  and most Ataris.  The actual number of bytes varies, depending on the
-  nvram in the system, but is usually 114 (128-14 for the RTC).
-
-  This memory is conventionally called "CMOS RAM" on PCs and "NVRAM"
-  on Ataris. /dev/nvram may be used to view settings there, or to
-  change them (with some utility). It could also be used to frequently
-  save a few bits of very important data that may not be lost over
-  power-off and for which writing to disk is too insecure. Note
-  however that most NVRAM space in a PC belongs to the BIOS and you
-  should NEVER idly tamper with it. See Ralf Brown's interrupt list
-  for a guide to the use of CMOS bytes by your BIOS.
-
-  On Atari machines, /dev/nvram is always configured and does not need
-  to be selected.
-
-  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 nvram.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_NWBUTTON
-  If you say Y here and create a character device node /dev/nwbutton
-  with major and minor numbers 10 and 158 ("man mknod"), then every
-  time the orange button is pressed a number of times, the number of
-  times the button was pressed will be written to that device.
-
-  This is most useful for applications, as yet unwritten, which
-  perform actions based on how many times the button is pressed in a
-  row.
-
-  Do not hold the button down for too long, as the driver does not
-  alter the behaviour of the hardware reset circuitry attached to the
-  button; it will still execute a hard reset if the button is held
-  down for longer than approximately five seconds.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  nwbutton.o.
-
-  Most people will answer Y to this question and "Reboot Using Button"
-  below to be able to initiate a system shutdown from the button.
-
-CONFIG_NWBUTTON_REBOOT
-  If you say Y here, then you will be able to initiate a system
-  shutdown and reboot by pressing the orange button a number of times.
-  The number of presses to initiate the shutdown is two by default,
-  but this can be altered by modifying the value of NUM_PRESSES_REBOOT
-  in nwbutton.h and recompiling the driver or, if you compile the
-  driver as a module, you can specify the number of presses at load
-  time with "insmod button reboot_count=<something>".
-
-CONFIG_A2232
-  This option supports the 2232 7-port serial card shipped with the
-  Amiga 2000 and other Zorro-bus machines, dating from 1989.  At
-  a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
-  each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
-  ports were connected with 8 pin DIN connectors on the card bracket,
-  for which 8 pin to DB25 adapters were supplied. The card also had
-  jumpers internally to toggle various pinning configurations.
-
-  This driver can be built as a module; but then "generic_serial.o"
-  will also be built as a module. This has to be loaded before
-  "ser_a2232.o". If you want to do this, answer M here and read
-  "<file:Documentation/modules.txt>".
-
-CONFIG_DS1620
-  Say Y here to include support for the thermal management hardware
-  found in the NetWinder. This driver allows the user to control the
-  temperature set points and to read the current temperature.
-
-  It is also possible to say M here to build it as a module (ds1620.o)
-  It is recommended to be used on a NetWinder, but it is not a
-  necessity.
-
-CONFIG_NWFLASH
-  If you say Y here and create a character device /dev/flash with
-  major 10 and minor 160 you can manipulate the flash ROM containing
-  the NetWinder firmware. Be careful as accidentally overwriting the
-  flash contents can render your computer unbootable. On no account
-  allow random users access to this device. :-)
-
-  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 nwflash.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you're not sure, say N.
-
-CONFIG_21285_WATCHDOG
-  The Intel Footbridge chip contains a builtin watchdog circuit. Say Y
-  here if you wish to use this. Alternatively say M to compile the
-  driver as a module, which will be called wdt285.o.
-
-  This driver does not work on all machines. In particular, early CATS
-  boards have hardware problems that will cause the machine to simply
-  lock up if the watchdog fires.
-
-  "If in doubt, leave it out" - say N.
-
-CONFIG_977_WATCHDOG
-  Say Y here to include support for the WB977 watchdog included in
-  NetWinder machines. Alternatively say M to compile the driver as
-  a module, which will be called wdt977.o.
-
-  Not sure? It's safe to say N.
-
-CONFIG_HVC_CONSOLE
-  pSeries machines when partitioned support a hypervisor virtual
-  console. This driver allows each pSeries partition to have a console
-  which is accessed via the HMC.
-
-CONFIG_RAW_DRIVER
-  The raw driver permits block devices to be bound to /dev/raw/rawN. 
-  Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. 
-  See the raw(8) manpage for more details.
-
-CONFIG_SCx200_GPIO
-  Give userspace access to the GPIO pins on the National
-  Semiconductor SCx200 processors.
-
-  If compiled as a module, it will be called scx200_gpio.o.
-
-Texas Instruments parallel link cable support
-CONFIG_TIPAR
-  If you own a Texas Instruments graphing calculator and use a
-  parallel link cable, then you might be interested in this driver.
-
-  If you enable this driver, you will be able to communicate with
-  your calculator through a set of device nodes under /dev. The
-  main advantage of this driver is that you don't have to be root
-  to use this precise link cable (depending on the permissions on
-  the device nodes, though).
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called tipar.o. If you want to compile it as a
-  module, say M here and read Documentation/modules.txt.
-
-  If you don't know what a parallel link cable is or what a Texas
-  Instruments graphing calculator is, then you probably don't need this
-  driver.
-
-  If unsure, say N.
\ No newline at end of file
diff -Nru a/drivers/char/Config.in b/drivers/char/Config.in
--- a/drivers/char/Config.in	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,202 +0,0 @@
-#
-# Character device configuration
-#
-mainmenu_option next_comment
-comment 'Character devices'
-
-bool 'Virtual terminal' CONFIG_VT
-if [ "$CONFIG_VT" = "y" ]; then
-   bool '  Support for console on virtual terminal' CONFIG_VT_CONSOLE
-fi
-if [ "$CONFIG_VT" = "y" -a "$CONFIG_S390" != "y" -a "$CONFIG_UM" != "y" ]; then
-   define_bool CONFIG_HW_CONSOLE y
-fi
-bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
-if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
-   tristate '  Computone IntelliPort Plus serial support' CONFIG_COMPUTONE
-   tristate '  Comtrol Rocketport support' CONFIG_ROCKETPORT
-   tristate '  Cyclades async mux support' CONFIG_CYCLADES
-   if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_CYCLADES" != "n" ]; then
-      bool '    Cyclades-Z interrupt mode operation (EXPERIMENTAL)' CONFIG_CYZ_INTR
-   fi
-   tristate '  Digiboard Intelligent Async Support' CONFIG_DIGIEPCA
-   if [ "$CONFIG_DIGIEPCA" = "n" ]; then
-      tristate '  Digiboard PC/Xx Support' CONFIG_DIGI
-   fi
-   dep_tristate '  Hayes ESP serial port support' CONFIG_ESPSERIAL $CONFIG_ISA
-   tristate '  Moxa Intellio support' CONFIG_MOXA_INTELLIO
-   tristate '  Moxa SmartIO support' CONFIG_MOXA_SMARTIO
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '  Multi-Tech multiport card support (EXPERIMENTAL)' CONFIG_ISI m
-   fi
-   tristate '  Microgate SyncLink card support' CONFIG_SYNCLINK
-   tristate '  SyncLink Multiport support' CONFIG_SYNCLINKMP
-   tristate '  HDLC line discipline support' CONFIG_N_HDLC
-   tristate '  SDL RISCom/8 card support' CONFIG_RISCOM8
-   tristate '  Specialix IO8+ card support' CONFIG_SPECIALIX
-   if [ "$CONFIG_SPECIALIX" != "n" ]; then
-      bool '  Specialix DTR/RTS pin is RTS' CONFIG_SPECIALIX_RTSCTS
-   fi 
-   tristate '  Specialix SX (and SI) card support' CONFIG_SX
-   tristate '  Specialix RIO system support' CONFIG_RIO
-   if [ "$CONFIG_RIO" != "n" ]; then
-     bool '    Support really old RIO/PCI cards' CONFIG_RIO_OLDPCI
-   fi
-   bool '  Stallion multiport serial support' CONFIG_STALDRV
-   if [ "$CONFIG_STALDRV" = "y" ]; then
-     tristate '    Stallion EasyIO or EC8/32 support' CONFIG_STALLION
-     tristate '    Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION
-   fi
-   if [ "$CONFIG_MIPS" = "y" ]; then
-     bool '  TMPTX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
-     dep_bool '     Console on TMPTX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
-     bool '  Enable Au1000 UART Support' CONFIG_AU1000_UART
-     if [ "$CONFIG_AU1000_UART" = "y" ]; then
-         bool '        Enable Au1000 serial console' CONFIG_AU1000_SERIAL_CONSOLE
-     fi
-   fi
-fi
-if [ "$CONFIG_IT8712" = "y" ]; then
-   bool 'Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
-   if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
-     define_bool CONFIG_IT8172_CIR y
-   fi
-   bool 'Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
-   bool 'Enable Smart Card Reader 1 Support ' CONFIG_IT8172_SCR1
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_ZORRO" = "y" ]; then
-   tristate 'Commodore A2232 serial support (EXPERIMENTAL)' CONFIG_A2232
-fi
-
-source drivers/serial/Config.in
-
-bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-   int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-fi
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
-   if [ "$CONFIG_PRINTER" != "n" ]; then
-      bool '  Support for console on line printer' CONFIG_LP_CONSOLE
-   fi
-   dep_tristate 'Support for user-space parallel port device drivers' CONFIG_PPDEV $CONFIG_PARPORT
-   dep_tristate 'Texas Instruments parallel link cable support' CONFIG_TIPAR $CONFIG_PARPORT
-fi
-if [ "$CONFIG_PPC_PSERIES" = "y" ]; then
-   bool 'pSeries Hypervisor Virtual Console support' CONFIG_HVC_CONSOLE
-fi
-
-source drivers/i2c/Config.in
-
-mainmenu_option next_comment
-comment 'Mice'
-   tristate 'Bus Mouse Support' CONFIG_BUSMOUSE
-endmenu
-
-tristate 'QIC-02 tape support' CONFIG_QIC02_TAPE
-if [ "$CONFIG_QIC02_TAPE" != "n" ]; then
-   bool '  Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF
-   if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then
-      comment '  Edit configuration parameters in ./include/linux/tpqic02.h!'
-   else
-      comment '  Setting runtime QIC-02 configuration is done with qic02conf'
-      comment '  from the tpqic02-support package.  It is available at'
-      comment '  metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/'
-   fi
-fi
-
-mainmenu_option next_comment
-comment 'Watchdog Cards'
-bool 'Watchdog Timer Support'	CONFIG_WATCHDOG
-if [ "$CONFIG_WATCHDOG" != "n" ]; then
-   bool '  Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT
-   tristate '  Software watchdog' CONFIG_SOFT_WATCHDOG
-   tristate '  WDT Watchdog timer' CONFIG_WDT
-   tristate '  WDT PCI Watchdog timer' CONFIG_WDTPCI
-   if [ "$CONFIG_WDT" != "n" ]; then
-      bool '    WDT501 features' CONFIG_WDT_501
-      if [ "$CONFIG_WDT_501" = "y" ]; then
-         bool '      Fan Tachometer' CONFIG_WDT_501_FAN
-      fi
-   fi
-   tristate '  Berkshire Products PC Watchdog' CONFIG_PCWATCHDOG
-   tristate '  Acquire SBC Watchdog Timer' CONFIG_ACQUIRE_WDT
-   tristate '  Advantech SBC Watchdog Timer' CONFIG_ADVANTECH_WDT
-   if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
-      tristate '  DC21285 watchdog' CONFIG_21285_WATCHDOG
-      if [ "$CONFIG_ARCH_NETWINDER" = "y" ]; then
-         tristate '  NetWinder WB83C977 watchdog' CONFIG_977_WATCHDOG
-      fi
-   fi
-   tristate '  Eurotech CPU-1220/1410 Watchdog Timer' CONFIG_EUROTECH_WDT
-   tristate '  IB700 SBC Watchdog Timer' CONFIG_IB700_WDT
-   tristate '  Intel i810 TCO timer / Watchdog' CONFIG_I810_TCO
-   tristate '  Mixcom Watchdog' CONFIG_MIXCOMWD 
-   tristate '  NatSemi SCx200 Watchdog' CONFIG_SCx200_WDT
-   tristate '  SBC-60XX Watchdog Timer' CONFIG_60XX_WDT
-   tristate '  W83877F (EMACS) Watchdog Timer' CONFIG_W83877F_WDT
-   tristate '  ZF MachZ Watchdog' CONFIG_MACHZ_WDT
-fi
-endmenu
-
-if [ "$CONFIG_ARCH_NETWINDER" = "y" ]; then
-   tristate 'NetWinder thermometer support' CONFIG_DS1620
-   tristate 'NetWinder Button' CONFIG_NWBUTTON
-   if [ "$CONFIG_NWBUTTON" != "n" ]; then
-      bool '  Reboot Using Button' CONFIG_NWBUTTON_REBOOT
-   fi
-   tristate 'NetWinder flash support' CONFIG_NWFLASH
-fi
-
-if [ "$CONFIG_X86" = "y" -o "$CONFIG_IA64" = "y" ]; then
-   dep_tristate 'Intel i8x0 Random Number Generator support' CONFIG_INTEL_RNG $CONFIG_PCI
-fi
-if [ "$CONFIG_X86" = "y" ]; then
-   dep_tristate 'AMD 768 Random Number Generator support' CONFIG_AMD_RNG $CONFIG_PCI
-fi
-tristate '/dev/nvram support' CONFIG_NVRAM
-tristate 'Enhanced Real Time Clock Support' CONFIG_RTC
-if [ "$CONFIG_RTC" != "y" ]; then
-   tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC      
-   if [ "$CONFIG_GEN_RTC" != "n" ]; then
-      bool '   Extended RTC operation' CONFIG_GEN_RTC_X
-   fi
-fi
-if [ "$CONFIG_IA64" = "y" ]; then
-   bool 'EFI Real Time Clock Services' CONFIG_EFI_RTC
-fi
-if [ "$CONFIG_OBSOLETE" = "y" -a "$CONFIG_ALPHA_BOOK1" = "y" ]; then
-   bool 'Tadpole ANA H8 Support (OBSOLETE)'  CONFIG_H8
-fi
-
-tristate 'Double Talk PC internal speech card support' CONFIG_DTLK
-tristate 'Siemens R3964 line discipline' CONFIG_R3964
-tristate 'Applicom intelligent fieldbus card support' CONFIG_APPLICOM
-if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_X86" = "y" ]; then
-   dep_tristate 'Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)' CONFIG_SONYPI $CONFIG_PCI
-fi
-
-mainmenu_option next_comment
-comment 'Ftape, the floppy tape device driver'
-tristate 'Ftape (QIC-80/Travan) support' CONFIG_FTAPE
-if [ "$CONFIG_FTAPE" != "n" ]; then
-   source drivers/char/ftape/Config.in
-fi
-endmenu
-
-source drivers/char/agp/Config.in
-source drivers/char/drm/Config.in
-
-if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
-   source drivers/char/pcmcia/Config.in
-fi
-
-if [ "$CONFIG_X86" = "y" ]; then
-   tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
-fi
-
-dep_tristate 'NatSemi SCx200 GPIO Support' CONFIG_SCx200_GPIO $CONFIG_SCx200
-
-tristate '  RAW driver (/dev/raw/rawN)' CONFIG_RAW_DRIVER
-
-endmenu
diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1274 @@
+#
+# Character device configuration
+#
+
+menu "Character devices"
+
+config VT
+	bool "Virtual terminal"
+	---help---
+	  If you say Y here, you will get support for terminal devices with
+	  display and keyboard devices. These are called "virtual" because you
+	  can run several virtual terminals (also called virtual consoles) on
+	  one physical terminal. This is rather useful, for example one
+	  virtual terminal can collect system messages and warnings, another
+	  one can be used for a text-mode user session, and a third could run
+	  an X session, all in parallel. Switching between virtual terminals
+	  is done with certain key combinations, usually Alt-<function key>.
+
+	  The setterm command ("man setterm") can be used to change the
+	  properties (such as colors or beeping) of a virtual terminal. The
+	  man page console_codes(4) ("man console_codes") contains the special
+	  character sequences that can be used to change those properties
+	  directly. The fonts used on virtual terminals can be changed with
+	  the setfont ("man setfont") command and the key bindings are defined
+	  with the loadkeys ("man loadkeys") command.
+
+	  You need at least one virtual terminal device in order to make use
+	  of your keyboard and monitor. Therefore, only people configuring an
+	  embedded system would want to say N here in order to save some
+	  memory; the only way to log into such a system is then via a serial
+	  or network connection.
+
+	  If unsure, say Y, or else you won't be able to do much with your new
+	  shiny Linux system :-)
+
+config VT_CONSOLE
+	bool "Support for console on virtual terminal"
+	depends on VT
+	---help---
+	  The system console is the device which receives all kernel messages
+	  and warnings and which allows logins in single user mode. If you
+	  answer Y here, a virtual terminal (the device used to interact with
+	  a physical terminal) can be used as system console. This is the most
+	  common mode of operations, so you should say Y here unless you want
+	  the kernel messages be output only to a serial port (in which case
+	  you should say Y to "Console on serial port", below).
+
+	  If you do say Y here, by default the currently visible virtual
+	  terminal (/dev/tty0) will be used as system console. You can change
+	  that with a kernel command line option such as "console=tty3" which
+	  would use the third virtual terminal as system console. (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.)
+
+	  If unsure, say Y.
+
+config HW_CONSOLE
+	bool
+	depends on VT && !S390 && !UM
+	default y
+
+config SERIAL_NONSTANDARD
+	bool "Non-standard serial port support"
+	---help---
+	  Say Y here if you have any non-standard serial boards -- boards
+	  which aren't supported using the standard "dumb" serial driver.
+	  This includes intelligent serial boards such as Cyclades,
+	  Digiboards, etc. These are usually used for systems that need many
+	  serial ports because they serve many terminals or dial-in
+	  connections.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about non-standard serial boards.
+
+	  Most people can say N here.
+
+config COMPUTONE
+	tristate "Computone IntelliPort Plus serial support"
+	depends on SERIAL_NONSTANDARD
+	---help---
+	  This driver supports the entire family of Intelliport II/Plus
+	  controllers with the exception of the MicroChannel controllers and
+	  products previous to the Intelliport II. These are multiport cards,
+	  which give you many serial ports. You would need something like this
+	  to connect more than two modems to your Linux box, for instance in
+	  order to become a dial-in server. If you have a card like that, say
+	  Y here and read <file:Documentation/computone.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. You will get
+	  two modules called ip2.o and ip2main.o.
+
+config ROCKETPORT
+	tristate "Comtrol Rocketport support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  This is a driver for the Comtrol Rocketport cards which provide
+	  multiple serial ports. You would need something like this to connect
+	  more than two modems to your Linux box, for instance in order to
+	  become a dial-in server.
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  rocket.o.
+
+config CYCLADES
+	tristate "Cyclades async mux support"
+	depends on SERIAL_NONSTANDARD
+	---help---
+	  This is a driver for a card that gives you many serial ports. You
+	  would need something like this to connect more than two modems to
+	  your Linux box, for instance in order to become a dial-in server.
+	  For information about the Cyclades-Z card, read
+	  <file:drivers/char/README.cycladesZ>.
+
+	  As of 1.3.9x kernels, this driver's minor numbers start at 0 instead
+	  of 32.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called cyclades.o.
+
+	  If you haven't heard about it, it's safe to say N.
+
+config CYZ_INTR
+	bool "Cyclades-Z interrupt mode operation (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && CYCLADES
+	help
+	  The Cyclades-Z family of multiport cards allows 2 (two) driver op
+	  modes: polling and interrupt. In polling mode, the driver will check
+	  the status of the Cyclades-Z ports every certain amount of time
+	  (which is called polling cycle and is configurable). In interrupt
+	  mode, it will use an interrupt line (IRQ) in order to check the
+	  status of the Cyclades-Z ports. The default op mode is polling. If
+	  unsure, say N.
+
+config DIGIEPCA
+	tristate "Digiboard Intelligent Async Support"
+	depends on SERIAL_NONSTANDARD
+	---help---
+	  This is a driver for Digi International's Xx, Xeve, and Xem series
+	  of cards which provide multiple serial ports. You would need
+	  something like this to connect more than two modems to your Linux
+	  box, for instance in order to become a dial-in server. This driver
+	  supports the original PC (ISA) boards as well as PCI, and EISA. If
+	  you have a card like this, say Y here and read the file
+	  <file:Documentation/digiepca.txt>.
+
+	  NOTE: There is another, separate driver for the Digiboard PC boards:
+	  "Digiboard PC/Xx Support" below. You should (and can) only select
+	  one of the two drivers.
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called epca.o.
+
+config DIGI
+	tristate "Digiboard PC/Xx Support"
+	depends on SERIAL_NONSTANDARD && DIGIEPCA=n
+	help
+	  This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards
+	  that give you many serial ports. You would need something like this
+	  to connect more than two modems to your Linux box, for instance in
+	  order to become a dial-in server. If you have a card like that, say
+	  Y here and read the file <file:Documentation/digiboard.txt>.
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called pcxx.o.
+
+config ESPSERIAL
+	tristate "Hayes ESP serial port support"
+	depends on SERIAL_NONSTANDARD && ISA
+	help
+	  This is a driver which supports Hayes ESP serial ports.  Both single
+	  port cards and multiport cards are supported.  Make sure to read
+	  <file:Documentation/hayes-esp.txt>.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>.  The module will be
+	  called esp.o.  If unsure, say N.
+
+config MOXA_INTELLIO
+	tristate "Moxa Intellio support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  Say Y here if you have a Moxa Intellio multiport serial card.
+
+	  This driver can also be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called moxa.o. If you want to do that, say M
+	  here.
+
+config MOXA_SMARTIO
+	tristate "Moxa SmartIO support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  Say Y here if you have a Moxa SmartIO multiport serial card.
+
+	  This driver can also be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called mxser.o. If you want to do that, say M
+	  here.
+
+config ISI
+	tristate "Multi-Tech multiport card support (EXPERIMENTAL)"
+	depends on SERIAL_NONSTANDARD && EXPERIMENTAL && m
+	help
+	  This is a driver for the Multi-Tech cards which provide several
+	  serial ports.  The driver is experimental and can currently only be
+	  built as a module ( = code which can be inserted in and removed from
+	  the running kernel whenever you want).  Please read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  isicom.o.
+
+config SYNCLINK
+	tristate "Microgate SyncLink card support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  Provides support for the SyncLink ISA and PCI multiprotocol serial
+	  adapters. These adapters support asynchronous and HDLC bit
+	  synchronous communication up to 10Mbps (PCI adapter).
+
+	  This driver can only be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called synclink.o.  If you want to do that, say M
+	  here.
+
+config SYNCLINKMP
+	tristate "SyncLink Multiport support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  Enable support for the SyncLink Multiport (2 or 4 ports)
+	  serial adapter, running asynchronous and HDLC communications up
+	  to 2.048Mbps. Each ports is independently selectable for
+	  RS-232, V.35, RS-449, RS-530, and X.21
+
+	  This driver may be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called synclinkmp.o.  If you want to do that, say M
+	  here.
+
+config N_HDLC
+	tristate "HDLC line discipline support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  Allows synchronous HDLC communications with tty device drivers that
+	  support synchronous HDLC such as the Microgate SyncLink adapter.
+
+	  This driver can only be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called n_hdlc.o. If you want to do that, say M
+	  here.
+
+config RISCOM8
+	tristate "SDL RISCom/8 card support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  This is a driver for the SDL Communications RISCom/8 multiport card,
+	  which gives you many serial ports. You would need something like
+	  this to connect more than two modems to your Linux box, for instance
+	  in order to become a dial-in server. If you have a card like that,
+	  say Y here and read the file <file:Documentation/riscom8.txt>.
+
+	  Also it's possible to say M here and compile this driver as kernel
+	  loadable module; the module will be called riscom8.o.
+
+config SPECIALIX
+	tristate "Specialix IO8+ card support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  This is a driver for the Specialix IO8+ multiport card (both the
+	  ISA and the PCI version) which gives you many serial ports. You
+	  would need something like this to connect more than two modems to
+	  your Linux box, for instance in order to become a dial-in server.
+
+	  If you have a card like that, say Y here and read the file
+	  <file:Documentation/specialix.txt>. Also it's possible to say M here
+	  and compile this driver as kernel loadable module which will be
+	  called specialix.o.
+
+config SPECIALIX_RTSCTS
+	bool "Specialix DTR/RTS pin is RTS"
+	depends on SPECIALIX
+	help
+	  The Specialix IO8+ card can only support either RTS or DTR. If you
+	  say N here, the driver will use the pin as "DTR" when the tty is in
+	  software handshake mode.  If you say Y here or hardware handshake is
+	  on, it will always be RTS.  Read the file
+	  <file:Documentation/specialix.txt> for more information.
+
+config SX
+	tristate "Specialix SX (and SI) card support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  This is a driver for the SX and SI multiport serial cards.
+	  Please read the file <file:Documentation/sx.txt> for details.
+
+	  This driver can only be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called sx.o. If you want to do that, say M here.
+
+config RIO
+	tristate "Specialix RIO system support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  This is a driver for the Specialix RIO, a smart serial card which
+	  drives an outboard box that can support up to 128 ports.  Product
+	  information is at <http://www.sphinxcst.co.uk/perle/multi.htm>.
+	  There are both ISA and PCI versions.
+
+config RIO_OLDPCI
+	bool "Support really old RIO/PCI cards"
+	depends on RIO
+	help
+	  Older RIO PCI cards need some initialization-time configuration to
+	  determine the IRQ and some control addresses.  If you have a RIO and
+	  this doesn't seem to work, try setting this to Y.
+
+config STALDRV
+	bool "Stallion multiport serial support"
+	depends on SERIAL_NONSTANDARD
+	help
+	  Stallion cards give you many serial ports.  You would need something
+	  like this to connect more than two modems to your Linux box, for
+	  instance in order to become a dial-in server.  If you say Y here,
+	  you will be asked for your specific card model in the next
+	  questions.  Make sure to read <file:Documentation/stallion.txt> in
+	  this case.  If you have never heard about all this, it's safe to
+	  say N.
+
+config STALLION
+	tristate "Stallion EasyIO or EC8/32 support"
+	depends on STALDRV
+	help
+	  If you have an EasyIO or EasyConnection 8/32 multiport Stallion
+	  card, then this is for you; say Y.  Make sure to read
+	  <file:Documentation/stallion.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called stallion.o.
+
+config ISTALLION
+	tristate "Stallion EC8/64, ONboard, Brumby support"
+	depends on STALDRV
+	help
+	  If you have an EasyConnection 8/64, ONboard, Brumby or Stallion
+	  serial multiport card, say Y here. Make sure to read
+	  <file:Documentation/stallion.txt>.
+
+	  To compile it as a module ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt>. The module will be called
+	  istallion.o.
+
+config SERIAL_TX3912
+	bool "TMPTX3912/PR31700 serial port support"
+	depends on SERIAL_NONSTANDARD && MIPS
+	help
+	  The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core;
+	  see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>.
+	  Say Y here to enable kernel support for the on-board serial port.
+
+config SERIAL_TX3912_CONSOLE
+	bool "Console on TMPTX3912/PR31700 serial port"
+	depends on SERIAL_TX3912
+	help
+	  The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core;
+	  see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>.
+	  Say Y here to direct console I/O to the on-board serial port.
+
+config AU1000_UART
+	bool "Enable Au1000 UART Support"
+	depends on SERIAL_NONSTANDARD && MIPS
+	help
+	  If you have an Alchemy AU1000 processor (MIPS based) and you want
+	  to use serial ports, say Y.  Otherwise, say N.
+
+config AU1000_SERIAL_CONSOLE
+	bool "Enable Au1000 serial console"
+	depends on AU1000_UART
+	help
+	  If you have an Alchemy AU1000 processor (MIPS based) and you want
+	  to use a console on a serial port, say Y.  Otherwise, say N.
+
+config QTRONIX_KEYBOARD
+	bool "Enable Qtronix 990P Keyboard Support"
+	depends on IT8712
+	help
+	  Images of Qtronix keyboards are at
+	  <http://www.qtronix.com/keyboard.html>.
+
+config IT8172_CIR
+	bool
+	depends on QTRONIX_KEYBOARD
+	default y
+
+config IT8172_SCR0
+	bool "Enable Smart Card Reader 0 Support "
+	depends on IT8712
+	help
+	  Say Y here to support smart-card reader 0 (SCR0) on the Integrated
+	  Technology Express, Inc. ITE8172 SBC.  Vendor page at
+	  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
+	  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
+
+config IT8172_SCR1
+	bool "Enable Smart Card Reader 1 Support "
+	depends on IT8712
+	help
+	  Say Y here to support smart-card reader 1 (SCR1) on the Integrated
+	  Technology Express, Inc. ITE8172 SBC.  Vendor page at
+	  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
+	  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
+
+config A2232
+	tristate "Commodore A2232 serial support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && ZORRO
+	---help---
+	  This option supports the 2232 7-port serial card shipped with the
+	  Amiga 2000 and other Zorro-bus machines, dating from 1989.  At
+	  a max of 19,200 bps, the ports are served by a 6551 ACIA UART chip
+	  each, plus a 8520 CIA, and a master 6502 CPU and buffer as well. The
+	  ports were connected with 8 pin DIN connectors on the card bracket,
+	  for which 8 pin to DB25 adapters were supplied. The card also had
+	  jumpers internally to toggle various pinning configurations.
+
+	  This driver can be built as a module; but then "generic_serial.o"
+	  will also be built as a module. This has to be loaded before
+	  "ser_a2232.o". If you want to do this, answer M here and read
+	  "<file:Documentation/modules.txt>".
+
+source "drivers/serial/Kconfig"
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+	---help---
+	  A pseudo terminal (PTY) is a software device consisting of two
+	  halves: a master and a slave. The slave device behaves identical to
+	  a physical terminal; the master device is used by a process to
+	  read data from and write data to the slave, thereby emulating a
+	  terminal. Typical programs for the master side are telnet servers
+	  and xterms.
+
+	  Linux has traditionally used the BSD-like names /dev/ptyxx for
+	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
+	  has a number of problems. The GNU C library glibc 2.1 and later,
+	  however, supports the Unix98 naming standard: in order to acquire a
+	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
+	  terminal is then made available to the process and the pseudo
+	  terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The entries in /dev/pts/ are created on the fly by a virtual
+	  file system; therefore, if you say Y here you should say Y to
+	  "/dev/pts file system for Unix98 PTYs" as well.
+
+	  If you want to say Y here, you need to have the C library glibc 2.1
+	  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
+	  Read the instructions in <file:Documentation/Changes> pertaining to
+	  pseudo terminals. It's safe to say N.
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+	help
+	  The maximum number of Unix98 PTYs that can be used at any one time.
+	  The default is 256, and should be enough for desktop systems. Server
+	  machines which support incoming telnet/rlogin/ssh connections and/or
+	  serve several X terminals may want to increase this: every incoming
+	  connection and every xterm uses up one PTY.
+
+	  When not in use, each additional set of 256 PTYs occupy
+	  approximately 8 KB of kernel memory on 32-bit architectures.
+
+config PRINTER
+	tristate "Parallel printer support"
+	depends on PARPORT
+	---help---
+	  If you intend to attach a printer to the parallel port of your Linux
+	  box (as opposed to using a serial printer; if the connector at the
+	  printer has 9 or 25 holes ["female"], then it's serial), say Y.
+	  Also read the Printing-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  It is possible to share one parallel port among several devices
+	  (e.g. printer and ZIP drive) and it is safe to compile the
+	  corresponding drivers into the kernel.  If you want to compile this
+	  driver as a module however ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt> and
+	  <file:Documentation/parport.txt>.  The module will be called lp.o.
+
+	  If you have several parallel ports, you can specify which ports to
+	  use with the "lp" kernel command line option.  (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.)  The syntax of the
+	  "lp" command line option can be found in <file:drivers/char/lp.c>.
+
+	  If you have more than 8 printers, you need to increase the LP_NO
+	  macro in lp.c and the PARPORT_MAX macro in parport.h.
+
+config LP_CONSOLE
+	bool "Support for console on line printer"
+	depends on PRINTER
+	---help---
+	  If you want kernel messages to be printed out as they occur, you
+	  can have a console on the printer. This option adds support for
+	  doing that; to actually get it to happen you need to pass the
+	  option "console=lp0" to the kernel at boot time.
+
+	  If the printer is out of paper (or off, or unplugged, or too
+	  busy..) the kernel will stall until the printer is ready again.
+	  By defining CONSOLE_LP_STRICT to 0 (at your own risk) you
+	  can make the kernel continue when this happens,
+	  but it'll lose the kernel messages.
+
+	  If unsure, say N.
+
+config PPDEV
+	tristate "Support for user-space parallel port device drivers"
+	depends on PARPORT
+	---help---
+	  Saying Y to this adds support for /dev/parport device nodes.  This
+	  is needed for programs that want portable access to the parallel
+	  port, for instance deviceid (which displays Plug-and-Play device
+	  IDs).
+
+	  This is the parallel port equivalent of SCSI generic support (sg).
+	  It is safe to say N to this -- it is not needed for normal printing
+	  or parallel port CD-ROM/disk support.
+
+	  This support is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  ppdev.o.
+
+	  If unsure, say N.
+
+config TIPAR
+	tristate "Texas Instruments parallel link cable support"
+	depends on PARPORT
+	---help---
+	  If you own a Texas Instruments graphing calculator and use a
+	  parallel link cable, then you might be interested in this driver.
+
+	  If you enable this driver, you will be able to communicate with
+	  your calculator through a set of device nodes under /dev. The
+	  main advantage of this driver is that you don't have to be root
+	  to use this precise link cable (depending on the permissions on
+	  the device nodes, though).
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called tipar.o. If you want to compile it as a
+	  module, say M here and read Documentation/modules.txt.
+
+	  If you don't know what a parallel link cable is or what a Texas
+	  Instruments graphing calculator is, then you probably don't need this
+	  driver.
+
+	  If unsure, say N.
+
+config HVC_CONSOLE
+	bool "pSeries Hypervisor Virtual Console support"
+	depends on PPC_PSERIES
+	help
+	  pSeries machines when partitioned support a hypervisor virtual
+	  console. This driver allows each pSeries partition to have a console
+	  which is accessed via the HMC.
+
+source "drivers/i2c/Kconfig"
+
+
+menu "Mice"
+
+config BUSMOUSE
+	tristate "Bus Mouse Support"
+	---help---
+	  Say Y here if your machine has a bus mouse as opposed to a serial
+	  mouse. Most people have a regular serial MouseSystem or
+	  Microsoft mouse (made by Logitech) that plugs into a COM port
+	  (rectangular with 9 or 25 pins). These people say N here. 
+
+	  If you have a laptop, you either have to check the documentation or
+	  experiment a bit to find out whether the trackball is a serial mouse
+	  or not; it's best to say Y here for you.
+
+	  This is the generic bus mouse driver code. If you have a bus mouse,
+	  you will have to say Y here and also to the specific driver for your
+	  mouse below.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called busmouse.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+endmenu
+
+config QIC02_TAPE
+	tristate "QIC-02 tape support"
+	help
+	  If you have a non-SCSI tape drive like that, say Y. Or, if you want
+	  to compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  tpqic02.o.
+
+config QIC02_DYNCONF
+	bool "Do you want runtime configuration for QIC-02"
+	depends on QIC02_TAPE
+	help
+	  You can either configure this driver once and for all by editing a
+	  header file (<file:include/linux/tpqic02.h>), in which case you
+	  should say N, or you can fetch a program via anonymous FTP which is
+	  able to configure this driver during runtime.  The program to do
+	  this is called 'qic02conf' and it is part of the
+	  tpqic02-support-X.Y.tar.gz support package.
+
+	  If you want to use the qic02conf program, say Y.
+
+comment "Edit configuration parameters in ./include/linux/tpqic02.h!"
+	depends on QIC02_TAPE && !QIC02_DYNCONF
+
+comment "Setting runtime QIC-02 configuration is done with qic02conf"
+	depends on QIC02_TAPE && QIC02_DYNCONF
+
+comment "from the tpqic02-support package.  It is available at"
+	depends on QIC02_TAPE && QIC02_DYNCONF
+
+comment "metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/"
+	depends on QIC02_TAPE && QIC02_DYNCONF
+
+
+menu "Watchdog Cards"
+
+config WATCHDOG
+	bool "Watchdog Timer Support"
+	---help---
+	  If you say Y here (and to one of the following options) and create a
+	  character special file /dev/watchdog with major number 10 and minor
+	  number 130 using mknod ("man mknod"), you will get a watchdog, i.e.:
+	  subsequently opening the file and then failing to write to it for
+	  longer than 1 minute will result in rebooting the machine. This
+	  could be useful for a networked machine that needs to come back
+	  online as fast as possible after a lock-up. There's both a watchdog
+	  implementation entirely in software (which can sometimes fail to
+	  reboot the machine) and a driver for hardware watchdog boards, which
+	  are more robust and can also keep track of the temperature inside
+	  your computer. For details, read <file:Documentation/watchdog.txt>
+	  in the kernel source.
+
+	  The watchdog is usually used together with the watchdog daemon
+	  which is available from
+	  <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can
+	  also monitor NFS connections and can reboot the machine when the process
+	  table is full.
+
+	  If unsure, say N.
+
+config WATCHDOG_NOWAYOUT
+	bool "Disable watchdog shutdown on close"
+	depends on WATCHDOG
+	help
+	  The default watchdog behaviour (which you get if you say N here) is
+	  to stop the timer if the process managing it closes the file
+	  /dev/watchdog. It's always remotely possible that this process might
+	  get killed. If you say Y here, the watchdog cannot be stopped once
+	  it has been started.
+
+config SOFT_WATCHDOG
+	tristate "Software watchdog"
+	depends on WATCHDOG
+	help
+	  A software monitoring watchdog. This will fail to reboot your system
+	  from some situations that the hardware watchdog will recover
+	  from. Equally it's a lot cheaper to install.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called
+	  softdog.o.
+
+config WDT
+	tristate "WDT Watchdog timer"
+	depends on WATCHDOG
+	---help---
+	  If you have a WDT500P or WDT501P watchdog board, say Y here,
+	  otherwise N. It is not possible to probe for this board, which means
+	  that you have to inform the kernel about the IO port and IRQ using
+	  the "wdt=" kernel option (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).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called wdt.o.
+
+config WDTPCI
+	tristate "WDT PCI Watchdog timer"
+	depends on WATCHDOG
+	---help---
+	  If you have a PCI WDT500/501 watchdog board, say Y here, otherwise
+	  N.  It is not possible to probe for this board, which means that you
+	  have to inform the kernel about the IO port and IRQ using the "wdt="
+	  kernel option (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).
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called wdt_pci.o.
+
+config WDT_501
+	bool "WDT501 features"
+	depends on WDT
+	help
+	  Saying Y here and creating a character special file /dev/temperature
+	  with major number 10 and minor number 131 ("man mknod") will give
+	  you a thermometer inside your computer: reading from
+	  /dev/temperature yields one byte, the temperature in degrees
+	  Fahrenheit. This works only if you have a WDT501P watchdog board
+	  installed.
+
+config WDT_501_FAN
+	bool "Fan Tachometer"
+	depends on WDT_501
+	help
+	  Enable the Fan Tachometer on the WDT501. Only do this if you have a
+	  fan tachometer actually set up.
+
+config PCWATCHDOG
+	tristate "Berkshire Products PC Watchdog"
+	depends on WATCHDOG
+	---help---
+	  This is the driver for the Berkshire Products PC Watchdog card.
+	  This card simply watches your kernel to make sure it doesn't freeze,
+	  and if it does, it reboots your computer after a certain amount of
+	  time. This driver is like the WDT501 driver but for different
+	  hardware. Please read <file:Documentation/pcwd-watchdog.txt>. The PC
+	  watchdog cards can be ordered from <http://www.berkprod.com/>.
+
+	  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 is called pcwd.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  Most people will say N.
+
+config ACQUIRE_WDT
+	tristate "Acquire SBC Watchdog Timer"
+	depends on WATCHDOG
+	---help---
+	  This is the driver for the hardware watchdog on the PSC-6x86 Single
+	  Board Computer produced by Acquire Inc (and others).  This watchdog
+	  simply watches your kernel to make sure it doesn't freeze, and if
+	  it does, it reboots your computer after a certain amount of time.
+
+	  This driver is like the WDT501 driver but for different hardware.
+	  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 is called pscwdt.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  Most
+	  people will say N.
+
+config ADVANTECH_WDT
+	tristate "Advantech SBC Watchdog Timer"
+	depends on WATCHDOG
+	help
+	  If you are configuring a Linux kernel for the Advantech single-board
+	  computer, say `Y' here to support its built-in watchdog timer
+	  feature.  See the help for CONFIG_WATCHDOG for discussion.
+
+config 21285_WATCHDOG
+	tristate "DC21285 watchdog"
+	depends on WATCHDOG && FOOTBRIDGE
+	help
+	  The Intel Footbridge chip contains a builtin watchdog circuit. Say Y
+	  here if you wish to use this. Alternatively say M to compile the
+	  driver as a module, which will be called wdt285.o.
+
+	  This driver does not work on all machines. In particular, early CATS
+	  boards have hardware problems that will cause the machine to simply
+	  lock up if the watchdog fires.
+
+	  "If in doubt, leave it out" - say N.
+
+config 977_WATCHDOG
+	tristate "NetWinder WB83C977 watchdog"
+	depends on WATCHDOG && FOOTBRIDGE && ARCH_NETWINDER
+	help
+	  Say Y here to include support for the WB977 watchdog included in
+	  NetWinder machines. Alternatively say M to compile the driver as
+	  a module, which will be called wdt977.o.
+
+	  Not sure? It's safe to say N.
+
+config EUROTECH_WDT
+	tristate "Eurotech CPU-1220/1410 Watchdog Timer"
+	depends on WATCHDOG
+	help
+	  Enable support for the watchdog timer on the Eurotech CPU-1220 and
+	  CPU-1410 cards.  These are PC/104 SBCs. Spec sheets and product
+	  information are at <http://www.eurotech.it/>.
+
+config IB700_WDT
+	tristate "IB700 SBC Watchdog Timer"
+	depends on WATCHDOG
+	---help---
+	  This is the driver for the hardware watchdog on the IB700 Single
+	  Board Computer produced by TMC Technology (www.tmc-uk.com). This watchdog
+	  simply watches your kernel to make sure it doesn't freeze, and if
+	  it does, it reboots your computer after a certain amount of time.
+
+	  This driver is like the WDT501 driver but for slightly different hardware.
+
+	  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 is called ib700wdt.o. If you want to compile it as a
+	  module, say M here and read Documentation/modules.txt. Most people
+	  will say N.
+
+config I810_TCO
+	tristate "Intel i810 TCO timer / Watchdog"
+	depends on WATCHDOG
+	---help---
+	  Hardware driver for the TCO timer built into the Intel i810 and i815
+	  chipset family.  The TCO (Total Cost of Ownership) timer is a
+	  watchdog timer that will reboot the machine after its second
+	  expiration. The expiration time can be configured by commandline
+	  argument "i810_margin=<n>" where <n> is the counter initial value.
+	  It is decremented every 0.6 secs, the default is 50 which gives a
+	  timeout of 30 seconds and one minute until reset.
+
+	  On some motherboards the driver may fail to reset the chipset's
+	  NO_REBOOT flag which prevents the watchdog from rebooting the
+	  machine. If this is the case you will get a kernel message like
+	  "i810tco init: failed to reset NO_REBOOT flag".
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  i810-tco.o.
+
+config MIXCOMWD
+	tristate "Mixcom Watchdog"
+	depends on WATCHDOG
+	---help---
+	  This is a driver for the Mixcom hardware watchdog cards.  This
+	  watchdog simply watches your kernel to make sure it doesn't freeze,
+	  and if it does, it reboots your computer after a certain amount of
+	  time.
+
+	  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 is called mixcomwd.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  Most
+	  people will say N.
+
+config SCx200_WDT
+	tristate "NatSemi SCx200 Watchdog"
+	depends on WATCHDOG
+	help
+	  Enable the built-in watchdog timer support on the National 
+	  Semiconductor SCx200 processors.
+
+	  If compiled as a module, it will be called scx200_watchdog.o.
+
+config 60XX_WDT
+	tristate "SBC-60XX Watchdog Timer"
+	depends on WATCHDOG
+	help
+	  This driver can be used with the watchdog timer found on some
+	  single board computers, namely the 6010 PII based computer.
+	  It may well work with other cards.  It reads port 0x443 to enable
+	  and re-set the watchdog timer, and reads port 0x45 to disable
+	  the watchdog.  If you have a card that behave in similar ways,
+	  you can probably make this driver work with your card as well.
+
+	  You can compile this driver directly into the kernel, or use
+	  it as a module.  The module will be called sbc60xxwdt.o.
+
+config W83877F_WDT
+	tristate "W83877F (EMACS) Watchdog Timer"
+	depends on WATCHDOG
+	---help---
+	  This is the driver for the hardware watchdog on the W83877F chipset
+	  as used in EMACS PC-104 motherboards (and likely others).  This
+	  watchdog simply watches your kernel to make sure it doesn't freeze,
+	  and if it does, it reboots your computer after a certain amount of
+	  time.
+
+	  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 is called mixcomwd.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  Most
+	  people will say N.
+
+config MACHZ_WDT
+	tristate "ZF MachZ Watchdog"
+	depends on WATCHDOG
+	---help---
+	  If you are using a ZF Micro MachZ processor, say Y here, otherwise
+	  N.  This is the driver for the watchdog timer builtin on that
+	  processor using ZF-Logic interface.  This watchdog simply watches
+	  your kernel to make sure it doesn't freeze, and if it does, it
+	  reboots your computer after a certain amount of time.
+
+	  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 is called machzwd.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+endmenu
+
+config DS1620
+	tristate "NetWinder thermometer support"
+	depends on ARCH_NETWINDER
+	help
+	  Say Y here to include support for the thermal management hardware
+	  found in the NetWinder. This driver allows the user to control the
+	  temperature set points and to read the current temperature.
+
+	  It is also possible to say M here to build it as a module (ds1620.o)
+	  It is recommended to be used on a NetWinder, but it is not a
+	  necessity.
+
+config NWBUTTON
+	tristate "NetWinder Button"
+	depends on ARCH_NETWINDER
+	---help---
+	  If you say Y here and create a character device node /dev/nwbutton
+	  with major and minor numbers 10 and 158 ("man mknod"), then every
+	  time the orange button is pressed a number of times, the number of
+	  times the button was pressed will be written to that device.
+
+	  This is most useful for applications, as yet unwritten, which
+	  perform actions based on how many times the button is pressed in a
+	  row.
+
+	  Do not hold the button down for too long, as the driver does not
+	  alter the behaviour of the hardware reset circuitry attached to the
+	  button; it will still execute a hard reset if the button is held
+	  down for longer than approximately five seconds.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  nwbutton.o.
+
+	  Most people will answer Y to this question and "Reboot Using Button"
+	  below to be able to initiate a system shutdown from the button.
+
+config NWBUTTON_REBOOT
+	bool "Reboot Using Button"
+	depends on NWBUTTON
+	help
+	  If you say Y here, then you will be able to initiate a system
+	  shutdown and reboot by pressing the orange button a number of times.
+	  The number of presses to initiate the shutdown is two by default,
+	  but this can be altered by modifying the value of NUM_PRESSES_REBOOT
+	  in nwbutton.h and recompiling the driver or, if you compile the
+	  driver as a module, you can specify the number of presses at load
+	  time with "insmod button reboot_count=<something>".
+
+config NWFLASH
+	tristate "NetWinder flash support"
+	depends on ARCH_NETWINDER
+	---help---
+	  If you say Y here and create a character device /dev/flash with
+	  major 10 and minor 160 you can manipulate the flash ROM containing
+	  the NetWinder firmware. Be careful as accidentally overwriting the
+	  flash contents can render your computer unbootable. On no account
+	  allow random users access to this device. :-)
+
+	  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 nwflash.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you're not sure, say N.
+
+config INTEL_RNG
+	tristate "Intel i8x0 Random Number Generator support"
+	depends on (X86 || IA64) && PCI
+	---help---
+	  This driver provides kernel-side support for the Random Number
+	  Generator hardware found on Intel i8xx-based motherboards.
+
+	  Both a character driver, used to read() entropy data, and a timer
+	  function which automatically adds entropy directly into the
+	  kernel pool, are exported by this driver.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  i810_rng.o.
+
+	  If unsure, say N.
+
+config AMD_RNG
+	tristate "AMD 768 Random Number Generator support"
+	depends on X86 && PCI
+	---help---
+	  This driver provides kernel-side support for the Random Number
+	  Generator hardware found on AMD 76x based motherboards.
+
+	  Both a character driver, used to read() entropy data, and a timer
+	  function which automatically adds entropy directly into the
+	  kernel pool, are exported by this driver.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  amd768_rng.o.
+
+	  If unsure, say N.
+
+config NVRAM
+	tristate "/dev/nvram support"
+	---help---
+	  If you say Y here and create a character special file /dev/nvram
+	  with major number 10 and minor number 144 using mknod ("man mknod"),
+	  you get read and write access to the extra bytes of non-volatile
+	  memory in the real time clock (RTC), which is contained in every PC
+	  and most Ataris.  The actual number of bytes varies, depending on the
+	  nvram in the system, but is usually 114 (128-14 for the RTC).
+
+	  This memory is conventionally called "CMOS RAM" on PCs and "NVRAM"
+	  on Ataris. /dev/nvram may be used to view settings there, or to
+	  change them (with some utility). It could also be used to frequently
+	  save a few bits of very important data that may not be lost over
+	  power-off and for which writing to disk is too insecure. Note
+	  however that most NVRAM space in a PC belongs to the BIOS and you
+	  should NEVER idly tamper with it. See Ralf Brown's interrupt list
+	  for a guide to the use of CMOS bytes by your BIOS.
+
+	  On Atari machines, /dev/nvram is always configured and does not need
+	  to be selected.
+
+	  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 nvram.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config RTC
+	tristate "Enhanced Real Time Clock Support"
+	---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
+	  into your computer.
+
+	  Every PC has such a clock built in. It can be used to generate
+	  signals from as low as 1Hz up to 8192Hz, and can also be used
+	  as a 24 hour alarm. It reports status information via the file
+	  /proc/driver/rtc and its behaviour is set by various ioctls on
+	  /dev/rtc.
+
+	  If you run Linux on a multiprocessor machine and said Y to
+	  "Symmetric Multi Processing" above, you should say Y here to read
+	  and set the RTC in an SMP compatible fashion.
+
+	  If you think you have a use for such a device (such as periodic data
+	  sampling), then say Y here, and read <file:Documentation/rtc.txt>
+	  for details.
+
+	  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 is called rtc.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+config GEN_RTC
+	tristate "Generic /dev/rtc emulation"
+	depends on RTC!=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
+	  into your computer.
+
+	  It reports status information via the file /proc/driver/rtc and its
+	  behaviour is set by various ioctls on /dev/rtc. If you enable the
+	  "extended RTC operation" below it will also provide an emulation
+	  for RTC_UIE which is required by some programs and may improve
+	  precision in some cases.
+
+	  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 is called genrtc.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>. To load the
+	  module automaticaly add 'alias char-major-10-135 genrtc' to your
+	  /etc/modules.conf
+
+config GEN_RTC_X
+	bool "Extended RTC operation"
+	depends on GEN_RTC
+	help
+	  Provides an emulation for RTC_UIE which is required by some programs
+	  and may improve precision of the generic RTC support in some cases.
+
+config EFI_RTC
+	bool "EFI Real Time Clock Services"
+	depends on IA64
+
+config H8
+	bool "Tadpole ANA H8 Support (OBSOLETE)"
+	depends on OBSOLETE && ALPHA_BOOK1
+	help
+	  The Hitachi H8/337 is a microcontroller used to deal with the power
+	  and thermal environment. If you say Y here, you will be able to
+	  communicate with it via a character special device.
+
+	  If unsure, say N.
+
+config DTLK
+	tristate "Double Talk PC internal speech card support"
+	help
+	  This driver is for the DoubleTalk PC, a speech synthesizer
+	  manufactured by RC Systems (<http://www.rcsys.com/>).  It is also
+	  called the `internal DoubleTalk'.  If you want to compile this as a
+	  module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>. The module will be called dtlk.o.
+
+config R3964
+	tristate "Siemens R3964 line discipline"
+	---help---
+	  This driver allows synchronous communication with devices using the
+	  Siemens R3964 packet protocol. Unless you are dealing with special
+	  hardware like PLCs, you are unlikely to need this.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  n_r3964.o.
+
+	  If unsure, say N.
+
+config APPLICOM
+	tristate "Applicom intelligent fieldbus card support"
+	---help---
+	  This driver provides the kernel-side support for the intelligent
+	  fieldbus cards made by Applicom International. More information
+	  about these cards can be found on the WWW at the address
+	  <http://www.applicom-int.com/>, or by email from David Woodhouse
+	  <dwmw2@infradead.org>.
+
+	  To compile this driver as a module ( = code which can be inserted in
+	  and removed from the running kernel whenever you want), say M here
+	  and read <file:Documentation/modules.txt>. The module will be called
+	  applicom.o.
+
+	  If unsure, say N.
+
+config SONYPI
+	tristate "Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && X86 && PCI
+	---help---
+	  This driver enables access to the Sony Programmable I/O Control
+	  Device which can be found in many (all ?) Sony Vaio laptops.
+
+	  If you have one of those laptops, read
+	  <file:Documentation/sonypi.txt>, and say Y or M here.
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called sonypi.o.
+
+
+menu "Ftape, the floppy tape device driver"
+
+config FTAPE
+	tristate "Ftape (QIC-80/Travan) support"
+	---help---
+	  If you have a tape drive that is connected to your floppy
+	  controller, say Y here.
+
+	  Some tape drives (like the Seagate "Tape Store 3200" or the Iomega
+	  "Ditto 3200" or the Exabyte "Eagle TR-3") come with a "high speed"
+	  controller of their own. These drives (and their companion
+	  controllers) are also supported if you say Y here.
+
+	  If you have a special controller (such as the CMS FC-10, FC-20,
+	  Mountain Mach-II, or any controller that is based on the Intel 82078
+	  FDC like the high speed controllers by Seagate and Exabyte and
+	  Iomega's "Ditto Dash") you must configure it by selecting the
+	  appropriate entries from the "Floppy tape controllers" sub-menu
+	  below and possibly modify the default values for the IRQ and DMA
+	  channel and the IO base in ftape's configuration menu.
+
+	  If you want to use your floppy tape drive on a PCI-bus based system,
+	  please read the file <file:drivers/char/ftape/README.PCI>.
+
+	  The ftape kernel driver is also available as a runtime loadable
+	  module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want). If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>. The
+	  module will be called ftape.o.
+
+	  Note that the Ftape-HOWTO is out of date (sorry) and documents the
+	  older version 2.08 of this software but still contains useful
+	  information.  There is a web page with more recent documentation at
+	  <http://www.instmath.rwth-aachen.de/~heine/ftape/>.  This page
+	  always contains the latest release of the ftape driver and useful
+	  information (backup software, ftape related patches and
+	  documentation, FAQ).  Note that the file system interface has
+	  changed quite a bit compared to previous versions of ftape.  Please
+	  read <file:Documentation/ftape.txt>.
+
+source "drivers/char/ftape/Kconfig"
+
+endmenu
+
+source "drivers/char/agp/Kconfig"
+
+source "drivers/char/drm/Kconfig"
+
+source "drivers/char/pcmcia/Kconfig"
+
+config MWAVE
+	tristate "ACP Modem (Mwave) support"
+	depends on X86
+	---help---
+	  The ACP modem (Mwave) for Linux is a WinModem. It is composed of a
+	  kernel driver and a user level application. Together these components
+	  support direct attachment to public switched telephone networks (PSTNs)
+	  and support selected world wide countries.
+
+	  This version of the ACP Modem driver supports the IBM Thinkpad 600E,
+	  600, and 770 that include on board ACP modem hardware.
+
+	  The modem also supports the standard communications port interface
+	  (ttySx) and is compatible with the Hayes AT Command Set.
+
+	  The user level application needed to use this driver can be found at
+	  the IBM Linux Technology Center (LTC) web site:
+	  <http://www.ibm.com/linux/ltc/>.
+
+	  If you own one of the above IBM Thinkpads which has the Mwave chipset
+	  in it, say Y.
+
+	  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 mwave.o. If you want to compile it as
+	  a module, say M here and read Documentation/modules.txt.
+
+config SCx200_GPIO
+	tristate "NatSemi SCx200 GPIO Support"
+	depends on SCx200
+	help
+	  Give userspace access to the GPIO pins on the National
+	  Semiconductor SCx200 processors.
+
+	  If compiled as a module, it will be called scx200_gpio.o.
+
+config RAW_DRIVER
+	tristate "RAW driver (/dev/raw/rawN)"
+	help
+	  The raw driver permits block devices to be bound to /dev/raw/rawN. 
+	  Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. 
+	  See the raw(8) manpage for more details.
+
+endmenu
+
diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile
--- a/drivers/char/Makefile	Wed Oct 30 16:44:34 2002
+++ b/drivers/char/Makefile	Wed Oct 30 16:44:34 2002
@@ -7,14 +7,14 @@
 #
 FONTMAPFILE = cp437.uni
 
-obj-y	 += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o
+obj-y	 += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o eventpoll.o
 
 # All of the (potential) objects that export symbols.
 # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
 
 export-objs     :=	busmouse.o vt.o generic_serial.o ip2main.o \
 			ite_gpio.o keyboard.o misc.o nvram.o random.o rtc.o \
-			selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o
+			selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o eventpoll.o
 
 obj-$(CONFIG_VT) += vt_ioctl.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o
 obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o
@@ -110,7 +110,7 @@
 include $(TOPDIR)/Rules.make
 
 $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE)
-	$(call do_cmd,CONMK  $(echo_target),$(objtree)/scripts/conmakehash $< > $@)
+	$(call do_cmd,CONMK  $@,$(objtree)/scripts/conmakehash $< > $@)
 
 $(obj)/defkeymap.o:  $(obj)/defkeymap.c
 
diff -Nru a/drivers/char/agp/Config.help b/drivers/char/agp/Config.help
--- a/drivers/char/agp/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,88 +0,0 @@
-CONFIG_AGP
-  AGP (Accelerated Graphics Port) is a bus system mainly used to
-  connect graphics cards to the rest of the system.
-
-  If you have an AGP system and you say Y here, it will be possible to
-  use the AGP features of your 3D rendering video card. This code acts
-  as a sort of "AGP driver" for the motherboard's chipset.
-
-  If you need more texture memory than you can get with the AGP GART
-  (theoretically up to 256 MB, but in practice usually 64 or 128 MB
-  due to kernel allocation issues), you could use PCI accesses
-  and have up to a couple gigs of texture space.
-
-  Note that this is the only means to have XFree4/GLX use
-  write-combining with MTRR support on the AGP bus. Without it, OpenGL
-  direct rendering will be a lot slower but still faster than PIO.
-
-  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
-  use GLX or DRI.  If unsure, say N.
-
-  This driver is available as a module.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.  The
-  module will be called agpgart.o.
-
-CONFIG_AGP_INTEL
-  This option gives you AGP support for the GLX component of the
-  XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850 and 860 chipsets.
-
-  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
-  use GLX or DRI.  If unsure, say N.
-
-CONFIG_AGP_I810
-  This option gives you AGP support for the Xserver on the Intel 810
-  815 and 830m chipset boards for their on-board integrated graphics. This
-  is required to do any useful video modes with these boards.
-
-CONFIG_AGP_I460
-  This option gives you AGP GART support for the Intel 460GX chipset
-  for IA64 processors.
-
-CONFIG_AGP_VIA
-  This option gives you AGP support for the GLX component of the
-  XFree86 4.x on VIA MPV3/Apollo Pro chipsets.
-
-  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
-  use GLX or DRI.  If unsure, say N.
-
-CONFIG_AGP_AMD
-  This option gives you AGP support for the GLX component of the
-  XFree86 4.x on AMD Irongate, 761, and 762 chipsets.
-
-  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
-  use GLX or DRI.  If unsure, say N.
-
-CONFIG_AGP_SIS
-  This option gives you AGP support for the GLX component of the "soon
-  to be released" XFree86 4.x on Silicon Integrated Systems [SiS]
-  chipsets.
-
-  Note that 5591/5592 AGP chipsets are NOT supported.
-
-  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
-  use GLX or DRI.  If unsure, say N.
-
-CONFIG_AGP_SWORKS
-  Say Y here to support the Serverworks AGP card.  See 
-  <http://www.serverworks.com/> for product descriptions and images.
-
-CONFIG_AGP_ALI
-  This option gives you AGP support for the GLX component of the
-  XFree86 4.x on the following ALi chipsets.  The supported chipsets
-  include M1541, M1621, M1631, M1632, M1641,M1647,and M1651.
-  For the ALi-chipset question, ALi suggests you refer to
-  <http://www.ali.com.tw/eng/support/index.shtml>.
-
-  The M1541 chipset can do AGP 1x and 2x, but note that there is an
-  acknowledged incompatibility with Matrox G200 cards. Due to
-  timing issues, this chipset cannot do AGP 2x with the G200.
-  This is a hardware limitation. AGP 1x seems to be fine, though.
-
-  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
-  use GLX or DRI.  If unsure, say N.
-
-CONFIG_AGP_HP_ZX1
-  This option gives you AGP GART support for the HP ZX1 chipset
-  for IA64 processors.
-
-
diff -Nru a/drivers/char/agp/Config.in b/drivers/char/agp/Config.in
--- a/drivers/char/agp/Config.in	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,22 +0,0 @@
-
-if [ "$CONFIG_GART_IOMMU" = "y" ]; then
-   dep_bool '/dev/agpgart (AGP Support)' CONFIG_AGP $CONFIG_DRM_AGP
-else
-   dep_tristate '/dev/agpgart (AGP Support)' CONFIG_AGP $CONFIG_DRM_AGP
-fi
-if [ "$CONFIG_AGP" != "n" ]; then
-   bool '  Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support' CONFIG_AGP_INTEL
-   bool '  Intel I810/I815/I830M (on-board) support' CONFIG_AGP_I810
-   bool '  VIA chipset support' CONFIG_AGP_VIA
-   bool '  AMD Irongate, 761, and 762 support' CONFIG_AGP_AMD
-   bool '  Generic SiS support' CONFIG_AGP_SIS
-   bool '  ALI chipset support' CONFIG_AGP_ALI
-   bool '  Serverworks LE/HE support' CONFIG_AGP_SWORKS
-   if [ "$CONFIG_GART_IOMMU" != "y" ]; then
-     bool '  AMD 8151 support' CONFIG_AGP_AMD_8151 
-   fi
-   if [ "$CONFIG_IA64" = "y" ]; then
-     bool '  Intel 460GX support' CONFIG_AGP_I460
-     bool '  HP ZX1 AGP support' CONFIG_AGP_HP_ZX1
-   fi
-fi
diff -Nru a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/agp/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,125 @@
+config AGP
+	tristate "/dev/agpgart (AGP Support)" if !GART_IOMMU
+	default AGP_GART if GART_IOMMU
+	---help---
+	  AGP (Accelerated Graphics Port) is a bus system mainly used to
+	  connect graphics cards to the rest of the system.
+
+	  If you have an AGP system and you say Y here, it will be possible to
+	  use the AGP features of your 3D rendering video card. This code acts
+	  as a sort of "AGP driver" for the motherboard's chipset.
+
+	  If you need more texture memory than you can get with the AGP GART
+	  (theoretically up to 256 MB, but in practice usually 64 or 128 MB
+	  due to kernel allocation issues), you could use PCI accesses
+	  and have up to a couple gigs of texture space.
+
+	  Note that this is the only means to have XFree4/GLX use
+	  write-combining with MTRR support on the AGP bus. Without it, OpenGL
+	  direct rendering will be a lot slower but still faster than PIO.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
+	  This driver is available as a module.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called agpgart.o.
+
+config AGP_GART
+	bool "/dev/agpgart (AGP Support)"
+	depends on GART_IOMMU
+
+config AGP_INTEL
+	bool "Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support"
+	depends on AGP
+	help
+	  This option gives you AGP support for the GLX component of the
+	  XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850 and 860 chipsets.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
+config AGP_I810
+	bool "Intel I810/I815/I830M (on-board) support"
+	depends on AGP
+	help
+	  This option gives you AGP support for the Xserver on the Intel 810
+	  815 and 830m chipset boards for their on-board integrated graphics. This
+	  is required to do any useful video modes with these boards.
+
+config AGP_VIA
+	bool "VIA chipset support"
+	depends on AGP
+	help
+	  This option gives you AGP support for the GLX component of the
+	  XFree86 4.x on VIA MPV3/Apollo Pro chipsets.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
+config AGP_AMD
+	bool "AMD Irongate, 761, and 762 support"
+	depends on AGP
+	help
+	  This option gives you AGP support for the GLX component of the
+	  XFree86 4.x on AMD Irongate, 761, and 762 chipsets.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
+config AGP_SIS
+	bool "Generic SiS support"
+	depends on AGP
+	help
+	  This option gives you AGP support for the GLX component of the "soon
+	  to be released" XFree86 4.x on Silicon Integrated Systems [SiS]
+	  chipsets.
+
+	  Note that 5591/5592 AGP chipsets are NOT supported.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
+config AGP_ALI
+	bool "ALI chipset support"
+	depends on AGP
+	---help---
+	  This option gives you AGP support for the GLX component of the
+	  XFree86 4.x on the following ALi chipsets.  The supported chipsets
+	  include M1541, M1621, M1631, M1632, M1641,M1647,and M1651.
+	  For the ALi-chipset question, ALi suggests you refer to
+	  <http://www.ali.com.tw/eng/support/index.shtml>.
+
+	  The M1541 chipset can do AGP 1x and 2x, but note that there is an
+	  acknowledged incompatibility with Matrox G200 cards. Due to
+	  timing issues, this chipset cannot do AGP 2x with the G200.
+	  This is a hardware limitation. AGP 1x seems to be fine, though.
+
+	  You should say Y here if you use XFree86 3.3.6 or 4.x and want to
+	  use GLX or DRI.  If unsure, say N.
+
+config AGP_SWORKS
+	bool "Serverworks LE/HE support"
+	depends on AGP
+	help
+	  Say Y here to support the Serverworks AGP card.  See 
+	  <http://www.serverworks.com/> for product descriptions and images.
+
+config AGP_AMD_8151
+	bool "AMD 8151 support"
+	depends on AGP && !GART_IOMMU
+
+config AGP_I460
+	bool "Intel 460GX support"
+	depends on AGP && IA64
+	help
+	  This option gives you AGP GART support for the Intel 460GX chipset
+	  for IA64 processors.
+
+config AGP_HP_ZX1
+	bool "HP ZX1 AGP support"
+	depends on AGP && IA64
+	help
+	  This option gives you AGP GART support for the HP ZX1 chipset
+	  for IA64 processors.
+
diff -Nru a/drivers/char/amd768_rng.c b/drivers/char/amd768_rng.c
--- a/drivers/char/amd768_rng.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/char/amd768_rng.c	Wed Oct 30 16:44:27 2002
@@ -5,7 +5,7 @@
  	derived from
  
 	Hardware driver for Intel i810 Random Number Generator (RNG)
-	Copyright 2000,2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+	Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
 
 	Please read Documentation/i810_rng.txt for details on use.
diff -Nru a/drivers/char/drm/Config.help b/drivers/char/drm/Config.help
--- a/drivers/char/drm/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-CONFIG_DRM
-  Kernel-level support for the Direct Rendering Infrastructure (DRI)
-  introduced in XFree86 4.0. If you say Y here, you need to select
-  the module that's right for your graphics card from the list below.
-  These modules provide support for synchronization, security, and
-  DMA transfers. Please see <http://dri.sourceforge.net/> for more
-  details.  You should also select and configure AGP
-  (/dev/agpgart) support.
-
-CONFIG_DRM_TDFX
-  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
-  graphics card.  If M is selected, the module will be called tdfx.o.
-
-CONFIG_DRM_GAMMA
-  Choose this option if you have a 3dlabs GMX 2000 graphics card.
-  If M is selected, the module will be called gamma.o.
-
-CONFIG_DRM_R128
-  Choose this option if you have an ATI Rage 128 graphics card.  If M
-  is selected, the module will be called r128.o.  AGP support for
-  this card is strongly suggested (unless you have a PCI version).
-
-CONFIG_DRM_RADEON
-  Choose this option if you have an ATI Radeon graphics card.  There
-  are both PCI and AGP versions.  You don't need to choose this to
-  run the Radeon in plain VGA mode.  There is a product page at
-  <http://www.ati.com/na/pages/products/pc/radeon32/index.html>.
-  If M is selected, the module will be called radeon.o.
-
-CONFIG_DRM_I810
-  Choose this option if you have an Intel I810 graphics card.  If M is
-  selected, the module will be called i810.o.  AGP support is required
-  for this driver to work.
-
-CONFIG_DRM_MGA
-  Choose this option if you have a Matrox G200, G400 or G450 graphics
-  card.  If M is selected, the module will be called mga.o.  AGP
-  support is required for this driver to work.
-
diff -Nru a/drivers/char/drm/Config.in b/drivers/char/drm/Config.in
--- a/drivers/char/drm/Config.in	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,17 +0,0 @@
-#
-# Drm device configuration
-#
-# This driver provides support for the
-# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
-#
-
-bool 'Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)' CONFIG_DRM
-if [ "$CONFIG_DRM" != "n" ]; then
-    tristate '  3dfx Banshee/Voodoo3+' CONFIG_DRM_TDFX
-#    tristate '  3dlabs GMX 2000' CONFIG_DRM_GAMMA
-    tristate '  ATI Rage 128' CONFIG_DRM_R128
-    dep_tristate '  ATI Radeon' CONFIG_DRM_RADEON $CONFIG_AGP
-    dep_tristate '  Intel I810' CONFIG_DRM_I810 $CONFIG_AGP
-    dep_tristate '  Intel 830M' CONFIG_DRM_I830 $CONFIG_AGP
-    dep_tristate '  Matrox g200/g400' CONFIG_DRM_MGA $CONFIG_AGP
-fi
diff -Nru a/drivers/char/drm/Kconfig b/drivers/char/drm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/drm/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,63 @@
+#
+# Drm device configuration
+#
+# This driver provides support for the
+# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
+#
+config DRM
+	bool "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
+	help
+	  Kernel-level support for the Direct Rendering Infrastructure (DRI)
+	  introduced in XFree86 4.0. If you say Y here, you need to select
+	  the module that's right for your graphics card from the list below.
+	  These modules provide support for synchronization, security, and
+	  DMA transfers. Please see <http://dri.sourceforge.net/> for more
+	  details.  You should also select and configure AGP
+	  (/dev/agpgart) support.
+
+config DRM_TDFX
+	tristate "3dfx Banshee/Voodoo3+"
+	depends on DRM
+	help
+	  Choose this option if you have a 3dfx Banshee or Voodoo3 (or later),
+	  graphics card.  If M is selected, the module will be called tdfx.o.
+
+#    tristate '  3dlabs GMX 2000' CONFIG_DRM_GAMMA
+config DRM_R128
+	tristate "ATI Rage 128"
+	depends on DRM
+	help
+	  Choose this option if you have an ATI Rage 128 graphics card.  If M
+	  is selected, the module will be called r128.o.  AGP support for
+	  this card is strongly suggested (unless you have a PCI version).
+
+config DRM_RADEON
+	tristate "ATI Radeon"
+	depends on DRM && AGP
+	help
+	  Choose this option if you have an ATI Radeon graphics card.  There
+	  are both PCI and AGP versions.  You don't need to choose this to
+	  run the Radeon in plain VGA mode.  There is a product page at
+	  <http://www.ati.com/na/pages/products/pc/radeon32/index.html>.
+	  If M is selected, the module will be called radeon.o.
+
+config DRM_I810
+	tristate "Intel I810"
+	depends on DRM && AGP
+	help
+	  Choose this option if you have an Intel I810 graphics card.  If M is
+	  selected, the module will be called i810.o.  AGP support is required
+	  for this driver to work.
+
+config DRM_I830
+	tristate "Intel 830M"
+	depends on DRM && AGP
+
+config DRM_MGA
+	tristate "Matrox g200/g400"
+	depends on DRM && AGP
+	help
+	  Choose this option if you have a Matrox G200, G400 or G450 graphics
+	  card.  If M is selected, the module will be called mga.o.  AGP
+	  support is required for this driver to work.
+
diff -Nru a/drivers/char/dz.c b/drivers/char/dz.c
--- a/drivers/char/dz.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/char/dz.c	Wed Oct 30 16:44:20 2002
@@ -34,7 +34,6 @@
 #include <linux/mm.h>
 #include <linux/major.h>
 #include <linux/param.h>
-#include <linux/tqueue.h>
 #include <linux/interrupt.h>
 #include <linux/serial.h>
 #include <linux/serialP.h>
diff -Nru a/drivers/char/eventpoll.c b/drivers/char/eventpoll.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/eventpoll.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1438 @@
+/*
+ *  drivers/char/eventpoll.c ( Efficent event polling implementation )
+ *  Copyright (C) 2001,...,2002  Davide Libenzi
+ *
+ *  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.
+ *
+ *  Davide Libenzi <davidel@xmailserver.org>
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/mm.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include <linux/poll.h>
+#include <linux/miscdevice.h>
+#include <linux/random.h>
+#include <linux/smp_lock.h>
+#include <linux/wrapper.h>
+#include <linux/string.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+#include <linux/fcblist.h>
+#include <linux/rwsem.h>
+#include <asm/bitops.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/mman.h>
+#include <asm/atomic.h>
+#include <linux/eventpoll.h>
+
+
+
+#define EVENTPOLLFS_MAGIC 0x03111965 /* My birthday should work for this :) */
+
+#define DEBUG_EPOLL 0
+
+#if DEBUG_EPOLL > 0
+#define DPRINTK(x) printk x
+#define DNPRINTK(n, x) do { if ((n) <= DEBUG_EPOLL) printk x; } while (0)
+#else /* #if DEBUG_EPOLL > 0 */
+#define DPRINTK(x) (void) 0
+#define DNPRINTK(n, x) (void) 0
+#endif /* #if DEBUG_EPOLL > 0 */
+
+#define DEBUG_DPI 0
+
+#if DEBUG_DPI != 0
+#define DPI_SLAB_DEBUG (SLAB_DEBUG_FREE | SLAB_RED_ZONE /* | SLAB_POISON */)
+#else /* #if DEBUG_DPI != 0 */
+#define DPI_SLAB_DEBUG 0
+#endif /* #if DEBUG_DPI != 0 */
+
+#define INITIAL_HASH_BITS 7
+#define MAX_HASH_BITS 18
+#define RESIZE_LENGTH 2
+
+#define DPI_MEM_ALLOC()	(struct epitem *) kmem_cache_alloc(dpi_cache, SLAB_KERNEL)
+#define DPI_MEM_FREE(p) kmem_cache_free(dpi_cache, p)
+#define IS_FILE_EPOLL(f) ((f)->f_op == &eventpoll_fops)
+
+
+/*
+ * Type used for versioning events snapshots inside the double buffer.
+ */
+typedef unsigned long long event_version_t;
+
+/*
+ * This structure is stored inside the "private_data" member of the file
+ * structure and rapresent the main data sructure for the eventpoll
+ * interface.
+ */
+struct eventpoll {
+	/*
+	 * Protect the evenpoll interface from sys_epoll_ctl(2), ioctl(EP_POLL)
+	 * and ->write() concurrency. It basically serialize the add/remove/edit
+	 * of items in the interest set.
+	 */
+	struct rw_semaphore acsem;
+
+	/*
+	 * Protect the this structure access. When the "acsem" is acquired
+	 * togheter with this one, "acsem" should be acquired first. Or,
+	 * "lock" nests inside "acsem".
+	 */
+	rwlock_t lock;
+
+	/* Wait queue used by sys_epoll_wait() and ioctl(EP_POLL) */
+	wait_queue_head_t wq;
+
+	/* Wait queue used by file->poll() */
+	wait_queue_head_t poll_wait;
+
+	/* This is the hash used to store the "struct epitem" elements */
+	struct list_head *hash;
+
+	unsigned int hbits;
+	unsigned int hmask;
+	atomic_t hents;
+	atomic_t resize;
+
+	/* Number of pages currently allocated in each side of the double buffer */
+	int numpages;
+
+	/*
+	 * Current page set pointer, switched from "pages0" and "pages1" each time
+	 * ep_poll() returns events to the caller.
+	 */
+	char **pages;
+
+	/* Each one of these contains the pages allocated for each side of
+	 * the double buffer.
+	 */
+	char *pages0[MAX_EVENTPOLL_PAGES];
+	char *pages1[MAX_EVENTPOLL_PAGES];
+
+	/*
+	 * Variable containing the vma base address where the double buffer
+	 * pages are mapped onto.
+	 */
+	unsigned long vmabase;
+
+	/*
+	 * Certain functions cannot be called if the double buffer pages are
+	 * not allocated and if the memory mapping is not in place. This tells
+	 * us that everything is setup to fully use the interface.
+	 */
+	atomic_t mmapped;
+
+	/* Number of events currently available inside the current snapshot */
+	int eventcnt;
+
+	/*
+	 * Variable storing the current "version" of the snapshot. It is used
+	 * to validate the validity of the current slot pointed by the "index"
+	 * member of a "struct epitem".
+	 */
+	event_version_t ver;
+};
+
+/*
+ * Each file descriptor added to the eventpoll interface will
+ * 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;
+
+	/* 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 pollfd pfd;
+
+	/*
+	 * The index inside the current double buffer that stores the active
+	 * event slot for this item ( file ).
+	 */
+	int index;
+
+	/*
+	 * The version that is used to validate if the current slot is still
+	 * valid or if it refers to an old snapshot. It is matches togheter
+	 * with the one inside the eventpoll structure.
+	 */
+	event_version_t ver;
+};
+
+
+
+
+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_init(struct eventpoll *ep);
+static void ep_free(struct eventpoll *ep);
+static struct epitem *ep_find_nl(struct eventpoll *ep, int fd);
+static struct epitem *ep_find(struct eventpoll *ep, int fd);
+static int ep_hashresize(struct eventpoll *ep, unsigned long *kflags);
+static int ep_insert(struct eventpoll *ep, struct pollfd *pfd);
+static int ep_remove(struct eventpoll *ep, struct epitem *dpi);
+static void notify_proc(struct file *file, void *data, unsigned long *local,
+			long *event);
+static int open_eventpoll(struct inode *inode, struct file *file);
+static int close_eventpoll(struct inode *inode, struct file *file);
+static unsigned int poll_eventpoll(struct file *file, poll_table *wait);
+static int write_eventpoll(struct file *file, const char *buffer, size_t count,
+			   loff_t *ppos);
+static int ep_poll(struct eventpoll *ep, struct evpoll *dvp);
+static int ep_do_alloc_pages(struct eventpoll *ep, int numpages);
+static int ioctl_eventpoll(struct inode *inode, struct file *file,
+			   unsigned int cmd, unsigned long arg);
+static void eventpoll_mm_open(struct vm_area_struct * vma);
+static void eventpoll_mm_close(struct vm_area_struct * vma);
+static int mmap_eventpoll(struct file *file, struct vm_area_struct *vma);
+static int eventpollfs_delete_dentry(struct dentry *dentry);
+static struct inode *get_eventpoll_inode(void);
+static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type,
+					      int flags, char *dev_name, void *data);
+
+
+
+/* Slab cache used to allocate "struct epitem" */
+static kmem_cache_t *dpi_cache;
+
+/* Virtual fs used to allocate inodes for eventpoll files */
+static struct vfsmount *eventpoll_mnt;
+
+/* File callbacks that implement the eventpoll file behaviour */
+static struct file_operations eventpoll_fops = {
+	.write		= write_eventpoll,
+	.ioctl		= ioctl_eventpoll,
+	.mmap		= mmap_eventpoll,
+	.open		= open_eventpoll,
+	.release	= close_eventpoll,
+	.poll		= poll_eventpoll
+};
+
+/* Memory mapping callbacks for the eventpoll file */
+static struct vm_operations_struct eventpoll_mmap_ops = {
+	.open		= eventpoll_mm_open,
+	.close		= eventpoll_mm_close,
+};
+
+/*
+ * The "struct miscdevice" is used to register the eventpoll device
+ * to make it suitable to be openend from a /dev file.
+ */
+static struct miscdevice eventpoll_miscdev = {
+	EVENTPOLL_MINOR, "eventpoll", &eventpoll_fops
+};
+
+/*
+ * This is used to register the virtual file system from where
+ * eventpoll inodes are allocated.
+ */
+static struct file_system_type eventpoll_fs_type = {
+	.name		= "eventpollfs",
+	.get_sb		= eventpollfs_get_sb,
+	.kill_sb	= kill_anon_super,
+};
+
+/* Very basic directory entry operations for the eventpoll virtual file system */
+static struct dentry_operations eventpollfs_dentry_operations = {
+	.d_delete	= eventpollfs_delete_dentry,
+};
+
+
+
+/*
+ * It opens an eventpoll file descriptor by allocating space for "maxfds"
+ * file descriptors. It is the kernel part of the userspace epoll_create(2).
+ */
+asmlinkage int sys_epoll_create(int maxfds)
+{
+	int error = -EINVAL, fd;
+	unsigned long addr;
+	struct inode *inode;
+	struct file *file;
+	struct eventpoll *ep;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d)\n",
+		     current, maxfds));
+
+	/*
+	 * It is not possible to store more than MAX_FDS_IN_EVENTPOLL file
+	 * descriptors inside the eventpoll interface.
+	 */
+	if (maxfds > MAX_FDS_IN_EVENTPOLL)
+		goto eexit_1;
+
+	/*
+	 * Creates all the items needed to setup an eventpoll file. That is,
+	 * a file structure, and inode and a free file descriptor.
+	 */
+	error = ep_getfd(&fd, &inode, &file);
+	if (error)
+		goto eexit_1;
+
+	/*
+	 * Calls the code to initialize the eventpoll file. This code is
+	 * the same as the "open" file operation callback because inside
+	 * ep_getfd() we did what the kernel usually does before invoking
+	 * corresponding file "open" callback.
+	 */
+	error = open_eventpoll(inode, file);
+	if (error)
+		goto eexit_2;
+
+	/* The "private_data" member is setup by open_eventpoll() */
+	ep = file->private_data;
+
+	/* Alloc pages for the event double buffer */
+	error = ep_do_alloc_pages(ep, EP_FDS_PAGES(maxfds + 1));
+	if (error)
+		goto eexit_2;
+
+	/*
+	 * Create a user space mapping of the event double buffer to
+	 * avoid kernel to user space memory copy when returning events
+	 * to the caller.
+	 */
+	down_write(&current->mm->mmap_sem);
+	addr = do_mmap_pgoff(file, 0, EP_MAP_SIZE(maxfds + 1), PROT_READ,
+			     MAP_PRIVATE, 0);
+	up_write(&current->mm->mmap_sem);
+	error = PTR_ERR((void *) addr);
+	if (IS_ERR((void *) addr))
+		goto eexit_2;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
+		     current, maxfds, fd));
+
+	return fd;
+
+eexit_2:
+	sys_close(fd);
+eexit_1:
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n",
+		     current, maxfds, error));
+	return error;
+}
+
+
+/*
+ * The following function implement the controller interface for the eventpoll
+ * file that enable the insertion/removal/change of file descriptors inside
+ * the interest set. It rapresents the kernel part of the user spcae epoll_ctl(2).
+ */
+asmlinkage int sys_epoll_ctl(int epfd, int op, int fd, unsigned int events)
+{
+	int error = -EBADF;
+	struct file *file;
+	struct eventpoll *ep;
+	struct epitem *dpi;
+	struct pollfd pfd;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %u)\n",
+		     current, epfd, op, fd, events));
+
+	file = fget(epfd);
+	if (!file)
+		goto eexit_1;
+
+	/*
+	 * We have to check that the file structure underneath the file descriptor
+	 * the user passed to us _is_ an eventpoll file.
+	 */
+	error = -EINVAL;
+	if (!IS_FILE_EPOLL(file))
+		goto eexit_2;
+
+	/*
+	 * At this point it is safe to assume that the "private_data" contains
+	 * our own data structure.
+	 */
+	ep = file->private_data;
+
+	down_write(&ep->acsem);
+
+	pfd.fd = fd;
+	pfd.events = events | POLLERR | POLLHUP;
+	pfd.revents = 0;
+
+	dpi = ep_find(ep, fd);
+
+	error = -EINVAL;
+	switch (op) {
+	case EP_CTL_ADD:
+		if (!dpi)
+			error = ep_insert(ep, &pfd);
+		else
+			error = -EEXIST;
+		break;
+	case EP_CTL_DEL:
+		if (dpi)
+			error = ep_remove(ep, dpi);
+		else
+			error = -ENOENT;
+		break;
+	case EP_CTL_MOD:
+		if (dpi) {
+			dpi->pfd.events = events;
+			error = 0;
+		} else
+			error = -ENOENT;
+		break;
+	}
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %u) = %d\n",
+		     current, epfd, op, fd, events, error));
+
+	up_write(&ep->acsem);
+
+eexit_2:
+	fput(file);
+eexit_1:
+	return error;
+}
+
+
+/*
+ * Implement the event wait interface for the eventpoll file. It is the kernel
+ * part of the user space epoll_wait(2).
+ */
+asmlinkage int sys_epoll_wait(int epfd, struct pollfd const **events, int timeout)
+{
+	int error = -EBADF;
+	void *eaddr;
+	struct file *file;
+	struct eventpoll *ep;
+	struct evpoll dvp;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_wait(%d, %p, %d)\n",
+		     current, epfd, events, timeout));
+
+	file = fget(epfd);
+	if (!file)
+		goto eexit_1;
+
+	/*
+	 * We have to check that the file structure underneath the file descriptor
+	 * the user passed to us _is_ an eventpoll file.
+	 */
+	error = -EINVAL;
+	if (!IS_FILE_EPOLL(file))
+		goto eexit_2;
+
+	/*
+	 * At this point it is safe to assume that the "private_data" contains
+	 * our own data structure.
+	 */
+	ep = file->private_data;
+
+	/*
+	 * It is possible that the user created an eventpoll file by open()ing
+	 * the corresponding /dev/ file and he did not perform the correct
+	 * initialization required by the old /dev/epoll interface. This test
+	 * protect us from this scenario.
+	 */
+	error = -EINVAL;
+	if (!atomic_read(&ep->mmapped))
+		goto eexit_2;
+
+	dvp.ep_timeout = timeout;
+	error = ep_poll(ep, &dvp);
+	if (error > 0) {
+		eaddr = (void *) (ep->vmabase + dvp.ep_resoff);
+		if (copy_to_user(events, &eaddr, sizeof(struct pollfd *)))
+			error = -EFAULT;
+	}
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_wait(%d, %p, %d) = %d\n",
+		     current, epfd, events, timeout, error));
+
+eexit_2:
+	fput(file);
+eexit_1:
+	return error;
+}
+
+
+/*
+ * Creates the file descriptor to be used by the epoll interface.
+ */
+static int ep_getfd(int *efd, struct inode **einode, struct file **efile)
+{
+	struct qstr this;
+	char name[32];
+	struct dentry *dentry;
+	struct inode *inode;
+	struct file *file;
+	int error, fd;
+
+	/* Get an ready to use file */
+	error = -ENFILE;
+	file = get_empty_filp();
+	if (!file)
+		goto eexit_1;
+
+	/* Allocates an inode from the eventpoll file system */
+	inode = get_eventpoll_inode();
+	error = PTR_ERR(inode);
+	if (IS_ERR(inode))
+		goto eexit_2;
+
+	/* Allocates a free descriptor to plug the file onto */
+	error = get_unused_fd();
+	if (error < 0)
+		goto eexit_3;
+	fd = error;
+
+	/*
+	 * Link the inode to a directory entry by creating a unique name
+	 * using the inode number.
+	 */
+	error = -ENOMEM;
+	sprintf(name, "[%lu]", inode->i_ino);
+	this.name = name;
+	this.len = strlen(name);
+	this.hash = inode->i_ino;
+	dentry = d_alloc(eventpoll_mnt->mnt_sb->s_root, &this);
+	if (!dentry)
+		goto eexit_4;
+	dentry->d_op = &eventpollfs_dentry_operations;
+	d_add(dentry, inode);
+	file->f_vfsmnt = mntget(eventpoll_mnt);
+	file->f_dentry = dget(dentry);
+
+	/*
+	 * Initialize the file as read/write because it could be used
+	 * with write() to add/remove/change interest sets.
+	 */
+	file->f_pos = 0;
+	file->f_flags = O_RDWR;
+	file->f_op = &eventpoll_fops;
+	file->f_mode = FMODE_READ | FMODE_WRITE;
+	file->f_version = 0;
+	file->private_data = NULL;
+
+	/* Install the new setup file into the allocated fd. */
+	fd_install(fd, file);
+
+	*efd = fd;
+	*einode = inode;
+	*efile = file;
+	return 0;
+
+eexit_4:
+	put_unused_fd(fd);
+eexit_3:
+	iput(inode);
+eexit_2:
+	put_filp(file);
+eexit_1:
+	return error;
+}
+
+
+static int ep_alloc_pages(char **pages, int numpages)
+{
+	int ii;
+
+	for (ii = 0; ii < numpages; ii++) {
+		pages[ii] = (char *) __get_free_pages(GFP_KERNEL, 0);
+		if (!pages[ii]) {
+			for (--ii; ii >= 0; ii--) {
+				ClearPageReserved(virt_to_page(pages[ii]));
+				free_pages((unsigned long) pages[ii], 0);
+			}
+			return -ENOMEM;
+		}
+		SetPageReserved(virt_to_page(pages[ii]));
+	}
+	return 0;
+}
+
+
+static int ep_free_pages(char **pages, int numpages)
+{
+	int ii;
+
+	for (ii = 0; ii < numpages; ii++) {
+		ClearPageReserved(virt_to_page(pages[ii]));
+		free_pages((unsigned long) pages[ii], 0);
+	}
+	return 0;
+}
+
+
+static int ep_init(struct eventpoll *ep)
+{
+	int ii, hentries;
+
+	init_rwsem(&ep->acsem);
+	rwlock_init(&ep->lock);
+	init_waitqueue_head(&ep->wq);
+	init_waitqueue_head(&ep->poll_wait);
+	ep->hbits = INITIAL_HASH_BITS;
+	ep->hmask = (1 << ep->hbits) - 1;
+	atomic_set(&ep->hents, 0);
+	atomic_set(&ep->resize, 0);
+	atomic_set(&ep->mmapped, 0);
+	ep->numpages = 0;
+	ep->vmabase = 0;
+	ep->pages = ep->pages0;
+	ep->eventcnt = 0;
+	ep->ver = 1;
+
+	hentries = ep->hmask + 1;
+	if (!(ep->hash = (struct list_head *) vmalloc(hentries * sizeof(struct list_head))))
+		return -ENOMEM;
+
+	for (ii = 0; ii < hentries; ii++)
+		INIT_LIST_HEAD(&ep->hash[ii]);
+
+	return 0;
+}
+
+
+static void ep_free(struct eventpoll *ep)
+{
+	int ii;
+	struct list_head *lsthead;
+
+	/*
+	 * Walks through the whole hash by unregistering file callbacks and
+	 * freeing each "struct epitem".
+	 */
+	for (ii = 0; ii <= ep->hmask; ii++) {
+		lsthead = &ep->hash[ii];
+		while (!list_empty(lsthead)) {
+			struct epitem *dpi = list_entry(lsthead->next, struct epitem, llink);
+
+			file_notify_delcb(dpi->file, notify_proc);
+			list_del(lsthead->next);
+			DPI_MEM_FREE(dpi);
+		}
+	}
+	/*
+	 * At this point we can free the hash and the pages used for the event
+	 * double buffer. The ep_free() function is called from the "close"
+	 * file operations callback, and this garanties us that the pages are
+	 * already unmapped.
+	 */
+	vfree(ep->hash);
+	if (ep->numpages > 0) {
+		ep_free_pages(ep->pages0, ep->numpages);
+		ep_free_pages(ep->pages1, ep->numpages);
+	}
+}
+
+
+/*
+ * No lock version of ep_find(), used when the code had to acquire the lock
+ * before calling the function.
+ */
+static struct epitem *ep_find_nl(struct eventpoll *ep, int fd)
+{
+	struct epitem *dpi = NULL;
+	struct list_head *lsthead, *lnk;
+
+	lsthead = &ep->hash[fd & ep->hmask];
+	list_for_each(lnk, lsthead) {
+		dpi = list_entry(lnk, struct epitem, llink);
+
+		if (dpi->pfd.fd == fd) break;
+		dpi = NULL;
+	}
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_find(%d) -> %p\n",
+		     current, fd, dpi));
+
+	return dpi;
+}
+
+
+static struct epitem *ep_find(struct eventpoll *ep, int fd)
+{
+	struct epitem *dpi;
+	unsigned long flags;
+
+	read_lock_irqsave(&ep->lock, flags);
+
+	dpi = ep_find_nl(ep, fd);
+
+	read_unlock_irqrestore(&ep->lock, flags);
+
+	return dpi;
+}
+
+
+static int ep_hashresize(struct eventpoll *ep, unsigned long *kflags)
+{
+	struct list_head *hash, *oldhash;
+	unsigned int hbits = ep->hbits + 1;
+	unsigned int hmask = (1 << hbits) - 1;
+	int ii, res, hentries = hmask + 1;
+	unsigned long flags = *kflags;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_hashresize(%p) bits=%u\n",
+		     current, ep, hbits));
+
+	write_unlock_irqrestore(&ep->lock, flags);
+
+	res = -ENOMEM;
+	if (!(hash = (struct list_head *) vmalloc(hentries * sizeof(struct list_head)))) {
+		write_lock_irqsave(&ep->lock, flags);
+		goto eexit_1;
+	}
+
+	for (ii = 0; ii < hentries; ii++)
+		INIT_LIST_HEAD(&hash[ii]);
+
+	write_lock_irqsave(&ep->lock, flags);
+
+	oldhash = ep->hash;
+	for (ii = 0; ii <= ep->hmask; ii++) {
+		struct list_head *oldhead = &oldhash[ii], *lnk;
+
+		while (!list_empty(oldhead)) {
+			struct epitem *dpi = list_entry(lnk = oldhead->next, struct epitem, llink);
+
+			list_del(lnk);
+			list_add(lnk, &hash[dpi->pfd.fd & hmask]);
+		}
+	}
+
+	ep->hash = hash;
+	ep->hbits = hbits;
+	ep->hmask = hmask;
+
+	write_unlock_irqrestore(&ep->lock, flags);
+	vfree(oldhash);
+	write_lock_irqsave(&ep->lock, flags);
+
+	res = 0;
+eexit_1:
+	*kflags = flags;
+	atomic_dec(&ep->resize);
+	return res;
+}
+
+
+static int ep_insert(struct eventpoll *ep, struct pollfd *pfd)
+{
+	int error;
+	struct epitem *dpi;
+	struct file *file;
+	unsigned long flags;
+
+	if (atomic_read(&ep->hents) >= (ep->numpages * POLLFD_X_PAGE))
+		return -E2BIG;
+
+	file = fget(pfd->fd);
+	if (!file)
+		return -EBADF;
+
+	error = -ENOMEM;
+	if (!(dpi = DPI_MEM_ALLOC()))
+		goto eexit_1;
+
+	INIT_LIST_HEAD(&dpi->llink);
+	dpi->ep = ep;
+	dpi->file = file;
+	dpi->pfd = *pfd;
+	dpi->index = -1;
+	dpi->ver = ep->ver - 1;
+
+	write_lock_irqsave(&ep->lock, flags);
+
+	list_add(&dpi->llink, &ep->hash[pfd->fd & ep->hmask]);
+	atomic_inc(&ep->hents);
+
+	if (!atomic_read(&ep->resize) &&
+	    (atomic_read(&ep->hents) >> ep->hbits) > RESIZE_LENGTH &&
+	    ep->hbits < MAX_HASH_BITS) {
+		atomic_inc(&ep->resize);
+		ep_hashresize(ep, &flags);
+	}
+
+	write_unlock_irqrestore(&ep->lock, flags);
+
+	file_notify_addcb(file, notify_proc, dpi);
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_insert(%p, %d)\n",
+		     current, ep, pfd->fd));
+
+	error = 0;
+eexit_1:
+	fput(file);
+
+	return error;
+}
+
+
+/*
+ * Removes a "struct epitem" from the eventpoll hash and deallocates
+ * all the associated resources.
+ */
+static int ep_remove(struct eventpoll *ep, struct epitem *dpi)
+{
+	unsigned long flags;
+	struct pollfd *pfd, *lpfd;
+	struct epitem *ldpi;
+
+	/* First, removes the callback from the file callback list */
+	file_notify_delcb(dpi->file, notify_proc);
+
+	write_lock_irqsave(&ep->lock, flags);
+
+	list_del(&dpi->llink);
+	atomic_dec(&ep->hents);
+
+	/*
+	 * This is to remove stale events. We don't want that the removed file
+	 * has a pending event that might be associated with a file inserted
+	 * at a later time inside the eventpoll interface. this code checks
+	 * if the currently removed file has a valid pending event and, if it does,
+	 * manages things to remove it and decrement the currently available
+	 * event count.
+	 */
+	if (dpi->index >= 0 && dpi->ver == ep->ver && dpi->index < ep->eventcnt) {
+		pfd = (struct pollfd *) (ep->pages[EVENT_PAGE_INDEX(dpi->index)] +
+					 EVENT_PAGE_OFFSET(dpi->index));
+		if (pfd->fd == dpi->pfd.fd && dpi->index < --ep->eventcnt) {
+			lpfd = (struct pollfd *) (ep->pages[EVENT_PAGE_INDEX(ep->eventcnt)] +
+						  EVENT_PAGE_OFFSET(ep->eventcnt));
+			*pfd = *lpfd;
+
+			if ((ldpi = ep_find_nl(ep, pfd->fd))) ldpi->index = dpi->index;
+		}
+	}
+
+	write_unlock_irqrestore(&ep->lock, flags);
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_remove(%p, %d)\n",
+		     current, ep, dpi->pfd.fd));
+
+	/* At this point it is safe to free the eventpoll item */
+	DPI_MEM_FREE(dpi);
+
+	return 0;
+}
+
+
+/*
+ * This is the event notify callback that is called from fs/fcblist.c because
+ * of the registration ( file_notify_addcb() ) done in ep_insert().
+ */
+static void notify_proc(struct file *file, void *data, unsigned long *local,
+			long *event)
+{
+	struct epitem *dpi = data;
+	struct eventpoll *ep = dpi->ep;
+	struct pollfd *pfd;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: notify(%p, %p, %ld, %ld) ep=%p\n",
+		     current, file, data, event[0], event[1], ep));
+
+	/*
+	 * We don't need to disable IRQs here because the callback dispatch
+	 * routine inside fs/fcblist.c already call us with disabled IRQ.
+	 */
+	write_lock(&ep->lock);
+
+	/* We're not expecting any of those events. Jump out soon ... */
+	if (!(dpi->pfd.events & event[1]))
+		goto out;
+
+	/*
+	 * This logic determins if an active even slot is available for the
+	 * currently signaled file, or if we have to make space for a new one
+	 * and increment the number of ready file descriptors ( ep->eventcnt ).
+	 */
+	if (dpi->index < 0 || dpi->ver != ep->ver) {
+		if (ep->eventcnt >= (ep->numpages * POLLFD_X_PAGE))
+			goto out;
+		dpi->index = ep->eventcnt++;
+		dpi->ver = ep->ver;
+		pfd = (struct pollfd *) (ep->pages[EVENT_PAGE_INDEX(dpi->index)] +
+					 EVENT_PAGE_OFFSET(dpi->index));
+		*pfd = dpi->pfd;
+	} else {
+		pfd = (struct pollfd *) (ep->pages[EVENT_PAGE_INDEX(dpi->index)] +
+					 EVENT_PAGE_OFFSET(dpi->index));
+		if (pfd->fd != dpi->pfd.fd) {
+			if (ep->eventcnt >= (ep->numpages * POLLFD_X_PAGE))
+				goto out;
+			dpi->index = ep->eventcnt++;
+			pfd = (struct pollfd *) (ep->pages[EVENT_PAGE_INDEX(dpi->index)] +
+						 EVENT_PAGE_OFFSET(dpi->index));
+			*pfd = dpi->pfd;
+		}
+	}
+
+	/*
+	 * Merge event bits into the corresponding event slot inside the
+	 * double buffer.
+	 */
+	pfd->revents |= (pfd->events & event[1]);
+
+	/*
+	 * Wake up ( if active ) both the eventpoll wait list and the ->poll()
+	 * wait list.
+	 */
+	if (waitqueue_active(&ep->wq))
+		wake_up(&ep->wq);
+	if (waitqueue_active(&ep->poll_wait))
+		wake_up(&ep->poll_wait);
+out:
+	write_unlock(&ep->lock);
+}
+
+
+static int open_eventpoll(struct inode *inode, struct file *file)
+{
+	int res;
+	struct eventpoll *ep;
+
+	if (!(ep = kmalloc(sizeof(struct eventpoll), GFP_KERNEL)))
+		return -ENOMEM;
+
+	memset(ep, 0, sizeof(*ep));
+	if ((res = ep_init(ep))) {
+		kfree(ep);
+		return res;
+	}
+
+	file->private_data = ep;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: open() ep=%p\n", current, ep));
+	return 0;
+}
+
+
+static int close_eventpoll(struct inode *inode, struct file *file)
+{
+	struct eventpoll *ep = file->private_data;
+
+	if (ep) {
+		ep_free(ep);
+		kfree(ep);
+	}
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: close() ep=%p\n", current, ep));
+	return 0;
+}
+
+
+static unsigned int poll_eventpoll(struct file *file, poll_table *wait)
+{
+	struct eventpoll *ep = file->private_data;
+
+	poll_wait(file, &ep->poll_wait, wait);
+	if (ep->eventcnt)
+		return POLLIN | POLLRDNORM;
+
+	return 0;
+}
+
+
+static int write_eventpoll(struct file *file, const char *buffer, size_t count,
+			   loff_t *ppos)
+{
+	int rcount;
+	struct eventpoll *ep = file->private_data;
+	struct epitem *dpi;
+	struct pollfd pfd;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: write(%p, %d)\n", current, ep, count));
+
+	/* The size of the write must be a multiple of sizeof(struct pollfd) */
+	rcount = -EINVAL;
+	if (count % sizeof(struct pollfd))
+		goto eexit_1;
+
+	/*
+	 * And we have also to verify that that area is correctly accessible
+	 * for the user.
+	 */
+	if ((rcount = verify_area(VERIFY_READ, buffer, count)))
+		goto eexit_1;
+
+	down_write(&ep->acsem);
+
+	rcount = 0;
+
+	while (count > 0) {
+		if (__copy_from_user(&pfd, buffer, sizeof(pfd))) {
+			rcount = -EFAULT;
+			goto eexit_2;
+		}
+
+		dpi = ep_find(ep, pfd.fd);
+
+		if (pfd.fd >= current->files->max_fds || !current->files->fd[pfd.fd])
+			pfd.events = POLLREMOVE;
+		if (pfd.events & POLLREMOVE) {
+			if (dpi) {
+				ep_remove(ep, dpi);
+				rcount += sizeof(pfd);
+			}
+		}
+		else if (dpi) {
+			dpi->pfd.events = pfd.events;
+			rcount += sizeof(pfd);
+		} else {
+			pfd.revents = 0;
+			if (!ep_insert(ep, &pfd))
+				rcount += sizeof(pfd);
+		}
+
+		buffer += sizeof(pfd);
+		count -= sizeof(pfd);
+	}
+
+eexit_2:
+	up_write(&ep->acsem);
+eexit_1:
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: write(%p, %d) = %d\n",
+		     current, ep, count, rcount));
+
+	return rcount;
+}
+
+
+static int ep_poll(struct eventpoll *ep, struct evpoll *dvp)
+{
+	int res = 0;
+	long timeout;
+	unsigned long flags;
+	wait_queue_t wait;
+
+	/*
+	 * We don't want ep_poll() to be called if the correct sequence
+	 * of operations are performed to initialize it. This won't happen
+	 * for the system call interface but it could happen using the
+	 * old /dev/epoll interface, that is maintained for compatibility.
+	 */
+	if (!atomic_read(&ep->mmapped))
+		return -EINVAL;
+
+	write_lock_irqsave(&ep->lock, flags);
+
+	res = 0;
+	if (!ep->eventcnt) {
+		/*
+		 * We don't have any available event to return to the caller.
+		 * We need to sleep here, and we will be wake up by
+		 * notify_proc() when events will become available.
+		 */
+		init_waitqueue_entry(&wait, current);
+		add_wait_queue(&ep->wq, &wait);
+
+		/*
+		 * Calculate the timeout by checking for the "infinite" value ( -1 )
+		 * and the overflow condition ( > MAX_SCHEDULE_TIMEOUT / HZ ). The
+		 * passed timeout is in milliseconds, that why (t * HZ) / 1000.
+		 */
+		timeout = dvp->ep_timeout == -1 || dvp->ep_timeout > MAX_SCHEDULE_TIMEOUT / HZ ?
+			MAX_SCHEDULE_TIMEOUT: (dvp->ep_timeout * HZ) / 1000;
+
+		for (;;) {
+			/*
+			 * We don't want to sleep if the notify_proc() sends us
+			 * a wakeup in between. That's why we set the task state
+			 * to TASK_INTERRUPTIBLE before doing the checks.
+			 */
+			set_current_state(TASK_INTERRUPTIBLE);
+			if (ep->eventcnt || !timeout)
+				break;
+			if (signal_pending(current)) {
+				res = -EINTR;
+				break;
+			}
+
+			write_unlock_irqrestore(&ep->lock, flags);
+			timeout = schedule_timeout(timeout);
+			write_lock_irqsave(&ep->lock, flags);
+		}
+		remove_wait_queue(&ep->wq, &wait);
+
+		set_current_state(TASK_RUNNING);
+	}
+
+	/*
+	 * If we've been wake up because of events became available, we need to:
+	 *
+	 * 1) null the number of available ready file descriptors
+	 * 2) increment the version of the current ( next ) snapshot
+	 * 3) swap the double buffer to return the current one to the caller
+	 * 4) set the current ( for the user, previous for the interface ) offset
+	 */
+	if (!res && ep->eventcnt) {
+		res = ep->eventcnt;
+		ep->eventcnt = 0;
+		++ep->ver;
+		if (ep->pages == ep->pages0) {
+			ep->pages = ep->pages1;
+			dvp->ep_resoff = 0;
+		} else {
+			ep->pages = ep->pages0;
+			dvp->ep_resoff = ep->numpages * PAGE_SIZE;
+		}
+	}
+
+	write_unlock_irqrestore(&ep->lock, flags);
+
+	return res;
+}
+
+
+static int ep_do_alloc_pages(struct eventpoll *ep, int numpages)
+{
+	int res, pgalloc, pgcpy;
+	unsigned long flags;
+	char **pages, **pages0, **pages1;
+
+	if (atomic_read(&ep->mmapped))
+		return -EBUSY;
+	if (numpages > MAX_EVENTPOLL_PAGES)
+		return -EINVAL;
+
+	pgalloc = numpages - ep->numpages;
+	if ((pages = (char **) vmalloc(2 * (pgalloc + 1) * sizeof(char *))) == NULL)
+		return -ENOMEM;
+	pages0 = &pages[0];
+	pages1 = &pages[pgalloc + 1];
+
+	if ((res = ep_alloc_pages(pages0, pgalloc)))
+		goto eexit_1;
+
+	if ((res = ep_alloc_pages(pages1, pgalloc))) {
+		ep_free_pages(pages0, pgalloc);
+		goto eexit_1;
+	}
+
+	write_lock_irqsave(&ep->lock, flags);
+	pgcpy = (ep->numpages + pgalloc) > numpages ? numpages - ep->numpages: pgalloc;
+	if (pgcpy > 0) {
+		memcpy(&ep->pages0[ep->numpages], pages0, pgcpy * sizeof(char *));
+		memcpy(&ep->pages1[ep->numpages], pages1, pgcpy * sizeof(char *));
+		ep->numpages += pgcpy;
+	}
+	write_unlock_irqrestore(&ep->lock, flags);
+
+	if (pgcpy < pgalloc) {
+		if (pgcpy < 0)
+			pgcpy = 0;
+		ep_free_pages(&pages0[pgcpy], pgalloc - pgcpy);
+		ep_free_pages(&pages1[pgcpy], pgalloc - pgcpy);
+	}
+
+eexit_1:
+	vfree(pages);
+	return res;
+}
+
+
+static int ioctl_eventpoll(struct inode *inode, struct file *file,
+			   unsigned int cmd, unsigned long arg)
+{
+	int res;
+	struct eventpoll *ep = file->private_data;
+	struct epitem *dpi;
+	unsigned long flags;
+	struct pollfd pfd;
+	struct evpoll dvp;
+
+	switch (cmd) {
+	case EP_ALLOC:
+		res = ep_do_alloc_pages(ep, EP_FDS_PAGES(arg));
+
+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ioctl(%p, EP_ALLOC, %lu) == %d\n",
+			     current, ep, arg, res));
+		return res;
+
+	case EP_FREE:
+		if (atomic_read(&ep->mmapped))
+			return -EBUSY;
+
+		res = -EINVAL;
+		write_lock_irqsave(&ep->lock, flags);
+		if (ep->numpages > 0) {
+			ep_free_pages(ep->pages0, ep->numpages);
+			ep_free_pages(ep->pages1, ep->numpages);
+			ep->numpages = 0;
+			ep->pages = ep->pages0;
+			res = 0;
+		}
+		write_unlock_irqrestore(&ep->lock, flags);
+
+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ioctl(%p, EP_FREE) == %d\n",
+			     current, ep, res));
+		return res;
+
+	case EP_POLL:
+		if (copy_from_user(&dvp, (void *) arg, sizeof(struct evpoll)))
+			return -EFAULT;
+
+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ioctl(%p, EP_POLL, %d)\n",
+			     current, ep, dvp.ep_timeout));
+
+		res = ep_poll(ep, &dvp);
+
+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ioctl(%p, EP_POLL, %d) == %d\n",
+			     current, ep, dvp.ep_timeout, res));
+
+		if (res > 0 && copy_to_user((void *) arg, &dvp, sizeof(struct evpoll)))
+			res = -EFAULT;
+
+		return res;
+
+	case EP_ISPOLLED:
+		if (copy_from_user(&pfd, (void *) arg, sizeof(struct pollfd)))
+			return 0;
+
+		read_lock_irqsave(&ep->lock, flags);
+
+		res = 0;
+		if (!(dpi = ep_find_nl(ep, pfd.fd)))
+			goto is_not_polled;
+
+		pfd = dpi->pfd;
+		res = 1;
+
+	is_not_polled:
+		read_unlock_irqrestore(&ep->lock, flags);
+
+		if (res)
+			copy_to_user((void *) arg, &pfd, sizeof(struct pollfd));
+
+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ioctl(%p, EP_ISPOLLED, %d) == %d\n",
+			     current, ep, pfd.fd, res));
+		return res;
+	}
+
+	return -EINVAL;
+}
+
+
+static void eventpoll_mm_open(struct vm_area_struct * vma)
+{
+	struct file *file = vma->vm_file;
+	struct eventpoll *ep = file->private_data;
+
+	if (ep) atomic_inc(&ep->mmapped);
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: mm_open(%p)\n", current, ep));
+}
+
+
+static void eventpoll_mm_close(struct vm_area_struct * vma)
+{
+	struct file *file = vma->vm_file;
+	struct eventpoll *ep = file->private_data;
+
+	if (ep && atomic_dec_and_test(&ep->mmapped))
+		ep->vmabase = 0;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: mm_close(%p)\n", current, ep));
+}
+
+
+static int mmap_eventpoll(struct file *file, struct vm_area_struct *vma)
+{
+	struct eventpoll *ep = file->private_data;
+	unsigned long start;
+	int ii, res, numpages;
+	size_t mapsize;
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: mmap(%p, %lx, %lx)\n",
+		     current, ep, vma->vm_start, vma->vm_pgoff << PAGE_SHIFT));
+
+	/*
+	 * We need the eventpoll file to be RW but we don't want it to be
+	 * mapped RW. This test perform the test and reject RW mmaping.
+	 */
+	if (vma->vm_flags & VM_WRITE)
+		return -EACCES;
+
+	if ((vma->vm_pgoff << PAGE_SHIFT) != 0)
+		return -EINVAL;
+
+	/*
+	 * We need to verify that the mapped area covers all the allocated
+	 * double buffer.
+	 */
+	mapsize = PAGE_ALIGN(vma->vm_end - vma->vm_start);
+	numpages = mapsize >> PAGE_SHIFT;
+
+	res = -EINVAL;
+	if (numpages != (2 * ep->numpages))
+		goto eexit_1;
+
+	/*
+	 * Map the double buffer starting from "vma->vm_start" up to
+	 * "vma->vm_start + ep->numpages * PAGE_SIZE".
+	 */
+	start = vma->vm_start;
+	for (ii = 0; ii < ep->numpages; ii++) {
+		if ((res = remap_page_range(vma, start, __pa(ep->pages0[ii]),
+					    PAGE_SIZE, vma->vm_page_prot)))
+			goto eexit_1;
+		start += PAGE_SIZE;
+	}
+	for (ii = 0; ii < ep->numpages; ii++) {
+		if ((res = remap_page_range(vma, start, __pa(ep->pages1[ii]),
+					    PAGE_SIZE, vma->vm_page_prot)))
+			goto eexit_1;
+		start += PAGE_SIZE;
+	}
+	vma->vm_ops = &eventpoll_mmap_ops;
+
+	/* Saves the base mapping address for later use in sys_epoll_wait(2) */
+	ep->vmabase = vma->vm_start;
+
+	/*
+	 * Ok, mapping has been done. We can open the door to functions that
+	 * requires the mapping to be in place.
+	 */
+	atomic_set(&ep->mmapped, 1);
+
+	res = 0;
+eexit_1:
+
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: mmap(%p, %lx, %lx) == %d\n",
+		     current, ep, vma->vm_start, vma->vm_pgoff << PAGE_SHIFT, res));
+	return res;
+}
+
+
+static int eventpollfs_delete_dentry(struct dentry *dentry)
+{
+
+	return 1;
+}
+
+
+static struct inode *get_eventpoll_inode(void)
+{
+	int error = -ENOMEM;
+	struct inode *inode = new_inode(eventpoll_mnt->mnt_sb);
+
+	if (!inode)
+		goto eexit_1;
+
+	inode->i_fop = &eventpoll_fops;
+
+	/*
+	 * Mark the inode dirty from the very beginning,
+	 * that way it will never be moved to the dirty
+	 * list because "mark_inode_dirty()" will think
+	 * that it already _is_ on the dirty list.
+	 */
+	inode->i_state = I_DIRTY;
+	inode->i_mode = 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 = PAGE_SIZE;
+	return inode;
+
+eexit_1:
+	return ERR_PTR(error);
+}
+
+
+static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type,
+					      int flags, char *dev_name, void *data)
+{
+
+	return get_sb_pseudo(fs_type, "eventpoll:", NULL, EVENTPOLLFS_MAGIC);
+}
+
+
+static int __init eventpoll_init(void)
+{
+	int error;
+
+	/* Allocates slab cache used to allocate "struct epitem" items */
+	error = -ENOMEM;
+	dpi_cache = kmem_cache_create("eventpoll",
+				      sizeof(struct epitem),
+				      __alignof__(struct epitem),
+				      DPI_SLAB_DEBUG, NULL, NULL);
+	if (!dpi_cache)
+		goto eexit_1;
+
+	/*
+	 * Register the virtual file system that will be the source of inodes
+	 * for the eventpoll files
+	 */
+	error = register_filesystem(&eventpoll_fs_type);
+	if (error)
+		goto eexit_2;
+
+	/* Mount the above commented virtual file system */
+	eventpoll_mnt = kern_mount(&eventpoll_fs_type);
+	error = PTR_ERR(eventpoll_mnt);
+	if (IS_ERR(eventpoll_mnt))
+		goto eexit_3;
+
+	/*
+	 * This is to maintain compatibility with the old /dev/epoll interface.
+	 * We need to register a misc device so that the caller can open(2) it
+	 * through a file inside /dev.
+	 */
+	error = misc_register(&eventpoll_miscdev);
+	if (error)
+		goto eexit_4;
+
+	printk(KERN_INFO "[%p] eventpoll: driver installed.\n", current);
+
+	return error;
+
+eexit_4:
+	mntput(eventpoll_mnt);
+eexit_3:
+	unregister_filesystem(&eventpoll_fs_type);
+eexit_2:
+	kmem_cache_destroy(dpi_cache);
+eexit_1:
+
+	return error;
+}
+
+
+static void __exit eventpoll_exit(void)
+{
+	/* Undo all operations done inside eventpoll_init() */
+	unregister_filesystem(&eventpoll_fs_type);
+	mntput(eventpoll_mnt);
+	misc_deregister(&eventpoll_miscdev);
+	kmem_cache_destroy(dpi_cache);
+}
+
+module_init(eventpoll_init);
+module_exit(eventpoll_exit);
+
+MODULE_LICENSE("GPL");
+
diff -Nru a/drivers/char/ftape/Config.help b/drivers/char/ftape/Config.help
--- a/drivers/char/ftape/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,255 +0,0 @@
-CONFIG_ZFTAPE
-  Normally, you want to say Y or M. DON'T say N here or you
-  WON'T BE ABLE TO USE YOUR FLOPPY TAPE DRIVE.
-
-  The ftape module itself no longer contains the routines necessary
-  to interface with the kernel VFS layer (i.e. to actually write data
-  to and read data from the tape drive).  Instead the file system
-  interface (i.e. the hardware independent part of the driver) has
-  been moved to a separate module.
-
-  If you say M zftape will be compiled as a runtime loadable
-  module ( = code which can be inserted in and removed from the
-  running kernel whenever you want).  In this case you should read
-  <file:Documentation/modules.txt>.  The module will be called
-  zftape.o.
-
-  Regardless of whether you say Y or M here, an additional runtime
-  loadable module called `zft-compressor.o' which contains code to
-  support user transparent on-the-fly compression based on Ross
-  William's lzrw3 algorithm will be produced.  If you have enabled the
-  kernel module loader (i.e. have said Y to "Kernel module loader
-  support", above) then `zft-compressor.o' will be loaded
-  automatically by zftape when needed.
-
-  Despite its name, zftape does NOT use compression by default.  The
-  file <file:Documentation/ftape.txt> contains a short description of
-  the most important changes in the file system interface compared to
-  previous versions of ftape.  The ftape home page
-  <http://www.instmath.rwth-aachen.de/~heine/ftape/> contains
-  further information.
-
-  IMPORTANT NOTE: zftape can read archives created by previous
-  versions of ftape and provide file mark support (i.e. fast skipping
-  between tape archives) but previous version of ftape will lack file
-  mark support when reading archives produced by zftape.
-
-CONFIG_ZFT_DFLT_BLK_SZ
-  If unsure leave this at its default value, i.e. 10240. Note that
-  you specify only the default block size here. The block size can be
-  changed at run time using the MTSETBLK tape operation with the
-  MTIOCTOP ioctl (i.e. with "mt -f /dev/qft0 setblk #BLKSZ" from the
-  shell command line).
-
-  The probably most striking difference between zftape and previous
-  versions of ftape is the fact that all data must be written or read
-  in multiples of a fixed block size. The block size defaults to
-  10240 which is what GNU tar uses. The values for the block size
-  should be either 1 or multiples of 1024 up to a maximum value of
-  63488 (i.e. 62 K). If you specify `1' then zftape's builtin
-  compression will be disabled.
-
-  Reasonable values are `10240' (GNU tar's default block size),
-  `5120' (afio's default block size), `32768' (default block size some
-  backup programs assume for SCSI tape drives) or `1' (no restriction
-  on block size, but disables builtin compression).
-
-CONFIG_FT_NR_BUFFERS
-  Please leave this at `3' unless you REALLY know what you are doing.
-  It is not necessary to change this value. Values below 3 make the
-  proper use of ftape impossible, values greater than 3 are a waste of
-  memory. You can change the amount of DMA memory used by ftape at
-  runtime with "mt -f /dev/qft0 setdrvbuffer #NUMBUFFERS". Each buffer
-  wastes 32 KB of memory. Please note that this memory cannot be
-  swapped out.
-
-CONFIG_FT_PROC_FS
-  Optional. Saying Y will result in creation of a directory
-  `/proc/ftape' under the /proc file system. The files can be viewed
-  with your favorite pager (i.e. use "more /proc/ftape/history" or
-  "less /proc/ftape/history" or simply "cat /proc/ftape/history"). The
-  file will contain some status information about the inserted
-  cartridge, the kernel driver, your tape drive, the floppy disk
-  controller and the error history for the most recent use of the
-  kernel driver. Saying Y will enlarge the size of the ftape driver
-  by approximately 2 KB.
-
-  WARNING: When compiling ftape as a module (i.e. saying M to "Floppy
-  tape drive") it is dangerous to use ftape's /proc file system
-  interface. Accessing `/proc/ftape' while the module is unloaded will
-  result in a kernel Oops. This cannot be fixed from inside ftape.
-
-CONFIG_FT_NORMAL_DEBUG
-  This option controls the amount of debugging output the ftape driver
-  is ABLE to produce; it does not increase or diminish the debugging
-  level itself. If unsure, leave this at its default setting,
-  i.e. choose "Normal".
-
-  Ftape can print lots of debugging messages to the system console
-  resp. kernel log files. Reducing the amount of possible debugging
-  output reduces the size of the kernel module by some KB, so it might
-  be a good idea to use "None" for emergency boot floppies.
-
-  If you want to save memory then the following strategy is
-  recommended: leave this option at its default setting "Normal" until
-  you know that the driver works as expected, afterwards reconfigure
-  the kernel, this time specifying "Reduced" or "None" and recompile
-  and install the kernel as usual. Note that choosing "Excessive"
-  debugging output does not increase the amount of debugging output
-  printed to the console but only makes it possible to produce
-  "Excessive" debugging output.
-
-  Please read <file:Documentation/ftape.txt> for a short description
-  how to control the amount of debugging output.
-
-CONFIG_FT_FULL_DEBUG
-  Extremely verbose output for driver debugging purposes.
-
-CONFIG_FT_NO_TRACE
-  Reduced tape driver debugging output.
-
-CONFIG_FT_NO_TRACE_AT_ALL
-  Suppress all debugging output from the tape drive.
-
-CONFIG_FT_STD_FDC
-  Only change this setting if you have a special controller. If you
-  didn't plug any add-on card into your computer system but just
-  plugged the floppy tape cable into the already existing floppy drive
-  controller then you don't want to change the default setting,
-  i.e. choose "Standard".
-
-  Choose "MACH-2" if you have a Mountain Mach-2 controller.
-  Choose "FC-10/FC-20" if you have a Colorado FC-10 or FC-20
-  controller.
-  Choose "Alt/82078" if you have another controller that is located at
-  an IO base address different from the standard floppy drive
-  controller's base address of `0x3f0', or uses an IRQ (interrupt)
-  channel different from `6', or a DMA channel different from
-  `2'. This is necessary for any controller card that is based on
-  Intel's 82078 FDC such as Seagate's, Exabyte's and Iomega's "high
-  speed" controllers.
-
-  If you choose something other than "Standard" then please make
-  sure that the settings for the IO base address and the IRQ and DMA
-  channel in the configuration menus below are correct. Use the manual
-  of your tape drive to determine the correct settings!
-
-  If you are already successfully using your tape drive with another
-  operating system then you definitely should use the same settings
-  for the IO base, the IRQ and DMA channel that have proven to work
-  with that other OS.
-
-  Note that this menu lets you specify only the default setting for
-  the hardware setup. The hardware configuration can be changed at
-  boot time (when ftape is compiled into the kernel, i.e. if you
-  have said Y to "Floppy tape drive") or module load time (i.e. if you
-  have said M to "Floppy tape drive").
-
-  Please read also the file <file:Documentation/ftape.txt> which
-  contains a short description of the parameters that can be set at
-  boot or load time. If you want to use your floppy tape drive on a
-  PCI-bus based system, please read the file
-  <file:drivers/char/ftape/README.PCI>.
-
-CONFIG_FT_FDC_BASE
-  You don't need to specify a value if the following default
-  settings for the base IO address are correct:
-  <<< MACH-2     : 0x1E0 >>>
-  <<< FC-10/FC-20: 0x180 >>>
-  <<< Secondary  : 0x370 >>>
-  Secondary refers to a secondary FDC controller like the "high speed"
-  controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash.
-  Please make sure that the setting for the IO base address
-  specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR
-  CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already
-  successfully using the tape drive with another operating system then
-  you definitely should use the same settings for the IO base that has
-  proven to work with that other OS.
-
-  Note that this menu lets you specify only the default setting for
-  the IO base. The hardware configuration can be changed at boot time
-  (when ftape is compiled into the kernel, i.e. if you specified Y to
-  "Floppy tape drive") or module load time (i.e. if you have said M to
-  "Floppy tape drive").
-
-  Please read also the file <file:Documentation/ftape.txt> which
-  contains a short description of the parameters that can be set at
-  boot or load time.
-
-CONFIG_FT_FDC_IRQ
-  You don't need to specify a value if the following default
-  settings for the interrupt channel are correct:
-  <<< MACH-2     : 6 >>>
-  <<< FC-10/FC-20: 9 >>>
-  <<< Secondary  : 6 >>>
-  Secondary refers to secondary a FDC controller like the "high speed"
-  controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash.
-  Please make sure that the setting for the IO base address
-  specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR
-  CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already
-  successfully using the tape drive with another operating system then
-  you definitely should use the same settings for the IO base that has
-  proven to work with that other OS.
-
-  Note that this menu lets you specify only the default setting for
-  the IRQ channel. The hardware configuration can be changed at boot
-  time (when ftape is compiled into the kernel, i.e. if you said Y to
-  "Floppy tape drive") or module load time (i.e. if you said M to
-  "Floppy tape drive").
-
-  Please read also the file <file:Documentation/ftape.txt> which
-  contains a short description of the parameters that can be set at
-  boot or load time.
-
-CONFIG_FT_FDC_DMA
-  You don't need to specify a value if the following default
-  settings for the DMA channel are correct:
-  <<< MACH-2     : 2 >>>
-  <<< FC-10/FC-20: 3 >>>
-  <<< Secondary  : 2 >>>
-  Secondary refers to a secondary FDC controller like the "high speed"
-  controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash.
-  Please make sure that the setting for the IO base address
-  specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR
-  CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already
-  successfully using the tape drive with another operating system then
-  you definitely should use the same settings for the IO base that has
-  proven to work with that other OS.
-
-  Note that this menu lets you specify only the default setting for
-  the DMA channel. The hardware configuration can be changed at boot
-  time (when ftape is compiled into the kernel, i.e. if you said Y to
-  "Floppy tape drive") or module load time (i.e. if you said M to
-  "Floppy tape drive").
-
-  Please read also the file <file:Documentation/ftape.txt> which
-  contains a short description of the parameters that can be set at
-  boot or load time.
-
-CONFIG_FT_FDC_THR
-  Set the FIFO threshold of the FDC. If this is higher the DMA
-  controller may serve the FDC after a higher latency time. If this is
-  lower, fewer DMA transfers occur leading to less bus contention.
-  You may try to tune this if ftape annoys you with "reduced data
-  rate because of excessive overrun errors" messages. However, this
-  doesn't seem to have too much effect.
-
-  If unsure, don't touch the initial value, i.e. leave it at "8".
-
-CONFIG_FT_FDC_MAX_RATE
-  With some motherboard/FDC combinations ftape will not be able to
-  run your FDC/tape drive combination at the highest available
-  speed. If this is the case you'll encounter "reduced data rate
-  because of excessive overrun errors" messages and lots of retries
-  before ftape finally decides to reduce the data rate.
-
-  In this case it might be desirable to tell ftape beforehand that
-  it need not try to run the tape drive at the highest available
-  speed. If unsure, leave this disabled, i.e. leave it at 2000
-  bits/sec.
-
-CONFIG_FT_ALPHA_CLOCK
-  On some DEC Alpha machines the CPU clock frequency cannot be
-  determined automatically, so you need to specify it here ONLY if
-  running a DEC Alpha, otherwise this setting has no effect.
-
diff -Nru a/drivers/char/ftape/Config.in b/drivers/char/ftape/Config.in
--- a/drivers/char/ftape/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,42 +0,0 @@
-#
-# Ftape configuration
-#
-dep_tristate '  Zftape, the VFS interface' CONFIG_ZFTAPE $CONFIG_FTAPE
-if [ "$CONFIG_ZFTAPE" != "n" ]; then
-   int '  Default block size' CONFIG_ZFT_DFLT_BLK_SZ 10240
-   comment '  The compressor will be built as a module only!'
-   define_tristate CONFIG_ZFT_COMPRESSOR m
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   int '  Number of ftape buffers (EXPERIMENTAL)' CONFIG_FT_NR_BUFFERS 3
-fi
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   bool '  Enable procfs status report (+2kb)' CONFIG_FT_PROC_FS
-fi
-choice 'Debugging output'			\
-	"Normal		CONFIG_FT_NORMAL_DEBUG	\
-	 Excessive	CONFIG_FT_FULL_DEBUG	\
-	 Reduced	CONFIG_FT_NO_TRACE	\
-	 None		CONFIG_FT_NO_TRACE_AT_ALL" Normal
-comment 'Hardware configuration'
-choice 'Floppy tape controllers'				\
-	"Standard			CONFIG_FT_STD_FDC	\
-	 MACH-2				CONFIG_FT_MACH2		\
-	 FC-10/FC-20			CONFIG_FT_PROBE_FC10	\
-	 Alt/82078			CONFIG_FT_ALT_FDC" Standard
-if [ "$CONFIG_FT_STD_FDC" != "y" ]; then
-   comment '   Consult the manuals of your tape drive for the correct settings!'
-   hex '  IO base of the floppy disk controller' CONFIG_FT_FDC_BASE 0
-   int '  IRQ channel of the floppy disk controller' CONFIG_FT_FDC_IRQ 0
-   int '  DMA channel of the floppy disk controller' CONFIG_FT_FDC_DMA 0
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   int '  Default FIFO threshold (EXPERIMENTAL)' CONFIG_FT_FDC_THR 8
-   int '  Maximal data rate to use (EXPERIMENTAL)' CONFIG_FT_FDC_MAX_RATE 2000
-fi
-
-if [ "$CONFIG_ALPHA" = "y" ]; then
-   int '  CPU clock frequency of your DEC Alpha' CONFIG_FT_ALPHA_CLOCK 0
-else
-   define_int CONFIG_FT_ALPHA_CLOCK 0
-fi
diff -Nru a/drivers/char/ftape/Kconfig b/drivers/char/ftape/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/ftape/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,343 @@
+#
+# Ftape configuration
+#
+config ZFTAPE
+	tristate "Zftape, the VFS interface"
+	depends on FTAPE
+	---help---
+	  Normally, you want to say Y or M. DON'T say N here or you
+	  WON'T BE ABLE TO USE YOUR FLOPPY TAPE DRIVE.
+
+	  The ftape module itself no longer contains the routines necessary
+	  to interface with the kernel VFS layer (i.e. to actually write data
+	  to and read data from the tape drive).  Instead the file system
+	  interface (i.e. the hardware independent part of the driver) has
+	  been moved to a separate module.
+
+	  If you say M zftape will be compiled as a runtime loadable
+	  module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want).  In this case you should read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  zftape.o.
+
+	  Regardless of whether you say Y or M here, an additional runtime
+	  loadable module called `zft-compressor.o' which contains code to
+	  support user transparent on-the-fly compression based on Ross
+	  William's lzrw3 algorithm will be produced.  If you have enabled the
+	  kernel module loader (i.e. have said Y to "Kernel module loader
+	  support", above) then `zft-compressor.o' will be loaded
+	  automatically by zftape when needed.
+
+	  Despite its name, zftape does NOT use compression by default.  The
+	  file <file:Documentation/ftape.txt> contains a short description of
+	  the most important changes in the file system interface compared to
+	  previous versions of ftape.  The ftape home page
+	  <http://www.instmath.rwth-aachen.de/~heine/ftape/> contains
+	  further information.
+
+	  IMPORTANT NOTE: zftape can read archives created by previous
+	  versions of ftape and provide file mark support (i.e. fast skipping
+	  between tape archives) but previous version of ftape will lack file
+	  mark support when reading archives produced by zftape.
+
+config ZFT_DFLT_BLK_SZ
+	int "Default block size"
+	depends on ZFTAPE
+	default "10240"
+	---help---
+	  If unsure leave this at its default value, i.e. 10240. Note that
+	  you specify only the default block size here. The block size can be
+	  changed at run time using the MTSETBLK tape operation with the
+	  MTIOCTOP ioctl (i.e. with "mt -f /dev/qft0 setblk #BLKSZ" from the
+	  shell command line).
+
+	  The probably most striking difference between zftape and previous
+	  versions of ftape is the fact that all data must be written or read
+	  in multiples of a fixed block size. The block size defaults to
+	  10240 which is what GNU tar uses. The values for the block size
+	  should be either 1 or multiples of 1024 up to a maximum value of
+	  63488 (i.e. 62 K). If you specify `1' then zftape's builtin
+	  compression will be disabled.
+
+	  Reasonable values are `10240' (GNU tar's default block size),
+	  `5120' (afio's default block size), `32768' (default block size some
+	  backup programs assume for SCSI tape drives) or `1' (no restriction
+	  on block size, but disables builtin compression).
+
+comment "The compressor will be built as a module only!"
+	depends on FTAPE && ZFTAPE
+
+config ZFT_COMPRESSOR
+	tristate
+	depends on FTAPE!=n && ZFTAPE!=n
+	default m
+
+config FT_NR_BUFFERS
+	int "Number of ftape buffers (EXPERIMENTAL)"
+	depends on FTAPE && EXPERIMENTAL
+	default "3"
+	help
+	  Please leave this at `3' unless you REALLY know what you are doing.
+	  It is not necessary to change this value. Values below 3 make the
+	  proper use of ftape impossible, values greater than 3 are a waste of
+	  memory. You can change the amount of DMA memory used by ftape at
+	  runtime with "mt -f /dev/qft0 setdrvbuffer #NUMBUFFERS". Each buffer
+	  wastes 32 KB of memory. Please note that this memory cannot be
+	  swapped out.
+
+config FT_PROC_FS
+	bool "Enable procfs status report (+2kb)"
+	depends on FTAPE && PROC_FS
+	---help---
+	  Optional. Saying Y will result in creation of a directory
+	  `/proc/ftape' under the /proc file system. The files can be viewed
+	  with your favorite pager (i.e. use "more /proc/ftape/history" or
+	  "less /proc/ftape/history" or simply "cat /proc/ftape/history"). The
+	  file will contain some status information about the inserted
+	  cartridge, the kernel driver, your tape drive, the floppy disk
+	  controller and the error history for the most recent use of the
+	  kernel driver. Saying Y will enlarge the size of the ftape driver
+	  by approximately 2 KB.
+
+	  WARNING: When compiling ftape as a module (i.e. saying M to "Floppy
+	  tape drive") it is dangerous to use ftape's /proc file system
+	  interface. Accessing `/proc/ftape' while the module is unloaded will
+	  result in a kernel Oops. This cannot be fixed from inside ftape.
+
+choice
+	prompt "Debugging output"
+	depends on FTAPE
+	default FT_NORMAL_DEBUG
+
+config FT_NORMAL_DEBUG
+	bool "Normal"
+	---help---
+	  This option controls the amount of debugging output the ftape driver
+	  is ABLE to produce; it does not increase or diminish the debugging
+	  level itself. If unsure, leave this at its default setting,
+	  i.e. choose "Normal".
+
+	  Ftape can print lots of debugging messages to the system console
+	  resp. kernel log files. Reducing the amount of possible debugging
+	  output reduces the size of the kernel module by some KB, so it might
+	  be a good idea to use "None" for emergency boot floppies.
+
+	  If you want to save memory then the following strategy is
+	  recommended: leave this option at its default setting "Normal" until
+	  you know that the driver works as expected, afterwards reconfigure
+	  the kernel, this time specifying "Reduced" or "None" and recompile
+	  and install the kernel as usual. Note that choosing "Excessive"
+	  debugging output does not increase the amount of debugging output
+	  printed to the console but only makes it possible to produce
+	  "Excessive" debugging output.
+
+	  Please read <file:Documentation/ftape.txt> for a short description
+	  how to control the amount of debugging output.
+
+config FT_FULL_DEBUG
+	bool "Excessive"
+	help
+	  Extremely verbose output for driver debugging purposes.
+
+config FT_NO_TRACE
+	bool "Reduced"
+	help
+	  Reduced tape driver debugging output.
+
+config FT_NO_TRACE_AT_ALL
+	bool "None"
+	help
+	  Suppress all debugging output from the tape drive.
+
+endchoice
+
+comment "Hardware configuration"
+	depends on FTAPE
+
+choice
+	prompt "Floppy tape controllers"
+	depends on FTAPE
+	default FT_STD_FDC
+
+config FT_STD_FDC
+	bool "Standard"
+	---help---
+	  Only change this setting if you have a special controller. If you
+	  didn't plug any add-on card into your computer system but just
+	  plugged the floppy tape cable into the already existing floppy drive
+	  controller then you don't want to change the default setting,
+	  i.e. choose "Standard".
+
+	  Choose "MACH-2" if you have a Mountain Mach-2 controller.
+	  Choose "FC-10/FC-20" if you have a Colorado FC-10 or FC-20
+	  controller.
+	  Choose "Alt/82078" if you have another controller that is located at
+	  an IO base address different from the standard floppy drive
+	  controller's base address of `0x3f0', or uses an IRQ (interrupt)
+	  channel different from `6', or a DMA channel different from
+	  `2'. This is necessary for any controller card that is based on
+	  Intel's 82078 FDC such as Seagate's, Exabyte's and Iomega's "high
+	  speed" controllers.
+
+	  If you choose something other than "Standard" then please make
+	  sure that the settings for the IO base address and the IRQ and DMA
+	  channel in the configuration menus below are correct. Use the manual
+	  of your tape drive to determine the correct settings!
+
+	  If you are already successfully using your tape drive with another
+	  operating system then you definitely should use the same settings
+	  for the IO base, the IRQ and DMA channel that have proven to work
+	  with that other OS.
+
+	  Note that this menu lets you specify only the default setting for
+	  the hardware setup. The hardware configuration can be changed at
+	  boot time (when ftape is compiled into the kernel, i.e. if you
+	  have said Y to "Floppy tape drive") or module load time (i.e. if you
+	  have said M to "Floppy tape drive").
+
+	  Please read also the file <file:Documentation/ftape.txt> which
+	  contains a short description of the parameters that can be set at
+	  boot or load time. If you want to use your floppy tape drive on a
+	  PCI-bus based system, please read the file
+	  <file:drivers/char/ftape/README.PCI>.
+
+config FT_MACH2
+	bool "MACH-2"
+
+config FT_PROBE_FC10
+	bool "FC-10/FC-20"
+
+config FT_ALT_FDC
+	bool "Alt/82078"
+
+endchoice
+
+comment "Consult the manuals of your tape drive for the correct settings!"
+	depends on FTAPE && !FT_STD_FDC
+
+config FT_FDC_BASE
+	hex "IO base of the floppy disk controller"
+	depends on FTAPE && !FT_STD_FDC
+	default "0"
+	---help---
+	  You don't need to specify a value if the following default
+	  settings for the base IO address are correct:
+	  <<< MACH-2     : 0x1E0 >>>
+	  <<< FC-10/FC-20: 0x180 >>>
+	  <<< Secondary  : 0x370 >>>
+	  Secondary refers to a secondary FDC controller like the "high speed"
+	  controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash.
+	  Please make sure that the setting for the IO base address
+	  specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR
+	  CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already
+	  successfully using the tape drive with another operating system then
+	  you definitely should use the same settings for the IO base that has
+	  proven to work with that other OS.
+
+	  Note that this menu lets you specify only the default setting for
+	  the IO base. The hardware configuration can be changed at boot time
+	  (when ftape is compiled into the kernel, i.e. if you specified Y to
+	  "Floppy tape drive") or module load time (i.e. if you have said M to
+	  "Floppy tape drive").
+
+	  Please read also the file <file:Documentation/ftape.txt> which
+	  contains a short description of the parameters that can be set at
+	  boot or load time.
+
+config FT_FDC_IRQ
+	int "IRQ channel of the floppy disk controller"
+	depends on FTAPE && !FT_STD_FDC
+	default "0"
+	---help---
+	  You don't need to specify a value if the following default
+	  settings for the interrupt channel are correct:
+	  <<< MACH-2     : 6 >>>
+	  <<< FC-10/FC-20: 9 >>>
+	  <<< Secondary  : 6 >>>
+	  Secondary refers to secondary a FDC controller like the "high speed"
+	  controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash.
+	  Please make sure that the setting for the IO base address
+	  specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR
+	  CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already
+	  successfully using the tape drive with another operating system then
+	  you definitely should use the same settings for the IO base that has
+	  proven to work with that other OS.
+
+	  Note that this menu lets you specify only the default setting for
+	  the IRQ channel. The hardware configuration can be changed at boot
+	  time (when ftape is compiled into the kernel, i.e. if you said Y to
+	  "Floppy tape drive") or module load time (i.e. if you said M to
+	  "Floppy tape drive").
+
+	  Please read also the file <file:Documentation/ftape.txt> which
+	  contains a short description of the parameters that can be set at
+	  boot or load time.
+
+config FT_FDC_DMA
+	int "DMA channel of the floppy disk controller"
+	depends on FTAPE && !FT_STD_FDC
+	default "0"
+	---help---
+	  You don't need to specify a value if the following default
+	  settings for the DMA channel are correct:
+	  <<< MACH-2     : 2 >>>
+	  <<< FC-10/FC-20: 3 >>>
+	  <<< Secondary  : 2 >>>
+	  Secondary refers to a secondary FDC controller like the "high speed"
+	  controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash.
+	  Please make sure that the setting for the IO base address
+	  specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR
+	  CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already
+	  successfully using the tape drive with another operating system then
+	  you definitely should use the same settings for the IO base that has
+	  proven to work with that other OS.
+
+	  Note that this menu lets you specify only the default setting for
+	  the DMA channel. The hardware configuration can be changed at boot
+	  time (when ftape is compiled into the kernel, i.e. if you said Y to
+	  "Floppy tape drive") or module load time (i.e. if you said M to
+	  "Floppy tape drive").
+
+	  Please read also the file <file:Documentation/ftape.txt> which
+	  contains a short description of the parameters that can be set at
+	  boot or load time.
+
+config FT_FDC_THR
+	int "Default FIFO threshold (EXPERIMENTAL)"
+	depends on FTAPE && EXPERIMENTAL
+	default "8"
+	help
+	  Set the FIFO threshold of the FDC. If this is higher the DMA
+	  controller may serve the FDC after a higher latency time. If this is
+	  lower, fewer DMA transfers occur leading to less bus contention.
+	  You may try to tune this if ftape annoys you with "reduced data
+	  rate because of excessive overrun errors" messages. However, this
+	  doesn't seem to have too much effect.
+
+	  If unsure, don't touch the initial value, i.e. leave it at "8".
+
+config FT_FDC_MAX_RATE
+	int "Maximal data rate to use (EXPERIMENTAL)"
+	depends on FTAPE && EXPERIMENTAL
+	default "2000"
+	---help---
+	  With some motherboard/FDC combinations ftape will not be able to
+	  run your FDC/tape drive combination at the highest available
+	  speed. If this is the case you'll encounter "reduced data rate
+	  because of excessive overrun errors" messages and lots of retries
+	  before ftape finally decides to reduce the data rate.
+
+	  In this case it might be desirable to tell ftape beforehand that
+	  it need not try to run the tape drive at the highest available
+	  speed. If unsure, leave this disabled, i.e. leave it at 2000
+	  bits/sec.
+
+config FT_ALPHA_CLOCK
+	int "CPU clock frequency of your DEC Alpha" if ALPHA
+	depends on FTAPE
+	default "0"
+	help
+	  On some DEC Alpha machines the CPU clock frequency cannot be
+	  determined automatically, so you need to specify it here ONLY if
+	  running a DEC Alpha, otherwise this setting has no effect.
+
diff -Nru a/drivers/char/i810-tco.c b/drivers/char/i810-tco.c
--- a/drivers/char/i810-tco.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/char/i810-tco.c	Wed Oct 30 16:44:19 2002
@@ -244,9 +244,9 @@
 	int options, retval = -EINVAL;
 
 	static struct watchdog_info ident = {
-		options:		WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
-		firmware_version:	0,
-		identity:		"i810 TCO timer",
+		.options =		WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
+		.firmware_version =	0,
+		.identity =		"i810 TCO timer",
 	};
 	switch (cmd) {
 		default:
@@ -371,17 +371,17 @@
 }
 
 static struct file_operations i810tco_fops = {
-	owner:		THIS_MODULE,
-	write:		i810tco_write,
-	ioctl:		i810tco_ioctl,
-	open:		i810tco_open,
-	release:	i810tco_release,
+	.owner =	THIS_MODULE,
+	.write =	i810tco_write,
+	.ioctl =	i810tco_ioctl,
+	.open =		i810tco_open,
+	.release =	i810tco_release,
 };
 
 static struct miscdevice i810tco_miscdev = {
-	minor:		WATCHDOG_MINOR,
-	name:		"watchdog",
-	fops:		&i810tco_fops,
+	.minor =	WATCHDOG_MINOR,
+	.name =		"watchdog",
+	.fops =		&i810tco_fops,
 };
 
 static int __init watchdog_init (void)
diff -Nru a/drivers/char/i810_rng.c b/drivers/char/i810_rng.c
--- a/drivers/char/i810_rng.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/char/i810_rng.c	Wed Oct 30 16:44:28 2002
@@ -1,7 +1,7 @@
 /*
 
 	Hardware driver for Intel i810 Random Number Generator (RNG)
-	Copyright 2000,2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+	Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
 
 	Driver Web site:  http://sourceforge.net/projects/gkernel/
diff -Nru a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c
--- a/drivers/char/ip2/i2lib.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/char/ip2/i2lib.c	Wed Oct 30 16:44:35 2002
@@ -84,8 +84,8 @@
 static void serviceOutgoingFifo(i2eBordStrPtr);
 
 // Functions defined in ip2.c as part of interrupt handling
-static void do_input(i2ChanStrPtr);
-static void do_status(i2ChanStrPtr);
+static void do_input(void *);
+static void do_status(void *);
 
 //***************
 //* Debug  Data *
@@ -333,10 +333,8 @@
 		pCh->ClosingWaitTime  = 30*HZ;
 
 		// Initialize task queue objects
-		pCh->tqueue_input.routine = (void(*)(void*)) do_input;
-		pCh->tqueue_input.data = pCh;
-		pCh->tqueue_status.routine = (void(*)(void*)) do_status;
-		pCh->tqueue_status.data = pCh;
+		INIT_WORK(&pCh->tqueue_input, do_input, pCh);
+		INIT_WORK(&pCh->tqueue_status, do_status, pCh);
 
 #ifdef IP2DEBUG_TRACE
 		pCh->trace = ip2trace;
diff -Nru a/drivers/char/ip2main.c b/drivers/char/ip2main.c
--- a/drivers/char/ip2main.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/char/ip2main.c	Wed Oct 30 16:44:36 2002
@@ -281,8 +281,8 @@
 static void ip2_interrupt(int irq, void *dev_id, struct pt_regs * regs);
 static void ip2_poll(unsigned long arg);
 static inline void service_all_boards(void);
-static inline void do_input(i2ChanStrPtr pCh);
-static inline void do_status(i2ChanStrPtr pCh);
+static void do_input(void *p);
+static void do_status(void *p);
 
 static void ip2_wait_until_sent(PTTY,int);
 
@@ -1422,9 +1422,9 @@
 	ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
 }
 
-static inline void 
-do_input( i2ChanStrPtr pCh )
+static void do_input(void *p)
 {
+	i2ChanStrPtr pCh = p;
 	unsigned long flags;
 
 	ip2trace(CHANN, ITRC_INPUT, 21, 0 );
@@ -1445,8 +1445,7 @@
 }
 
 // code duplicated from n_tty (ldisc)
-static inline void 
-isig(int sig, struct tty_struct *tty, int flush)
+static inline void  isig(int sig, struct tty_struct *tty, int flush)
 {
 	if (tty->pgrp > 0)
 		kill_pg(tty->pgrp, sig, 1);
@@ -1457,9 +1456,9 @@
 	}
 }
 
-static inline void
-do_status( i2ChanStrPtr pCh )
+static void do_status(void *p)
 {
+	i2ChanStrPtr pCh = p;
 	int status;
 
 	status =  i2GetStatus( pCh, (I2_BRK|I2_PAR|I2_FRA|I2_OVR) );
diff -Nru a/drivers/char/istallion.c b/drivers/char/istallion.c
--- a/drivers/char/istallion.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/char/istallion.c	Wed Oct 30 16:44:29 2002
@@ -3371,8 +3371,7 @@
 		portp->baud_base = STL_BAUDBASE;
 		portp->close_delay = STL_CLOSEDELAY;
 		portp->closing_wait = 30 * HZ;
-		portp->tqhangup.routine = stli_dohangup;
-		portp->tqhangup.data = portp;
+		INIT_WORK(&portp->tqhangup, stli_dohangup, portp);
 		init_waitqueue_head(&portp->open_wait);
 		init_waitqueue_head(&portp->close_wait);
 		init_waitqueue_head(&portp->raw_wait);
diff -Nru a/drivers/char/pcmcia/Config.help b/drivers/char/pcmcia/Config.help
--- a/drivers/char/pcmcia/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-CONFIG_PCMCIA_SERIAL_CS
-  Say Y here to enable support for 16-bit PCMCIA serial devices,
-  including serial port cards, modems, and the modem functions of
-  multi-function Ethernet/modem cards. (PCMCIA- or PC-cards are
-  credit-card size devices often used with laptops.)
-
-  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 serial_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_SYNCLINK_CS
-  Enable support for the SyncLink PC Card serial adapter, running
-  asynchronous and HDLC communications up to 512Kbps. The port is
-  selectable for RS-232, V.35, RS-449, RS-530, and X.21
-
-  This driver may be built as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called synclinkmp.o.  If you want to do that, say M
-  here.
diff -Nru a/drivers/char/pcmcia/Config.in b/drivers/char/pcmcia/Config.in
--- a/drivers/char/pcmcia/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,11 +0,0 @@
-#
-# PCMCIA character device configuration
-#
-
-mainmenu_option next_comment
-comment 'PCMCIA character devices'
-
-dep_tristate 'SyncLink PC Card support' CONFIG_SYNCLINK_CS $CONFIG_PCMCIA
-
-endmenu
-
diff -Nru a/drivers/char/pcmcia/Kconfig b/drivers/char/pcmcia/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/char/pcmcia/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,22 @@
+#
+# PCMCIA character device configuration
+#
+
+menu "PCMCIA character devices"
+	depends on HOTPLUG && PCMCIA!=n
+
+config SYNCLINK_CS
+	tristate "SyncLink PC Card support"
+	depends on PCMCIA
+	help
+	  Enable support for the SyncLink PC Card serial adapter, running
+	  asynchronous and HDLC communications up to 512Kbps. The port is
+	  selectable for RS-232, V.35, RS-449, RS-530, and X.21
+
+	  This driver may be built as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called synclinkmp.o.  If you want to do that, say M
+	  here.
+
+endmenu
+
diff -Nru a/drivers/char/random.c b/drivers/char/random.c
--- a/drivers/char/random.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/char/random.c	Wed Oct 30 16:44:20 2002
@@ -253,6 +253,7 @@
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/workqueue.h>
+#include <linux/genhd.h>
 
 #include <asm/processor.h>
 #include <asm/uaccess.h>
@@ -718,7 +719,6 @@
 static struct timer_rand_state mouse_timer_state;
 static struct timer_rand_state extract_timer_state;
 static struct timer_rand_state *irq_timer_state[NR_IRQS];
-static struct timer_rand_state *blkdev_timer_state[MAX_BLKDEV];
 
 /*
  * This function adds entropy to the entropy "pool" by using timing
@@ -812,18 +812,12 @@
 	add_timer_randomness(irq_timer_state[irq], 0x100+irq);
 }
 
-void add_blkdev_randomness(int major)
+void add_disk_randomness(struct gendisk *disk)
 {
-	if (major >= MAX_BLKDEV)
+	if (!disk || !disk->random)
 		return;
-
-	if (blkdev_timer_state[major] == 0) {
-		rand_initialize_blkdev(major, GFP_ATOMIC);
-		if (blkdev_timer_state[major] == 0)
-			return;
-	}
-		
-	add_timer_randomness(blkdev_timer_state[major], 0x200+major);
+	/* first major is 1, so we get >= 0x200 here */
+	add_timer_randomness(disk->random, 0x100+MKDEV(disk->major, disk->first_minor));
 }
 
 /******************************************************************
@@ -1447,8 +1441,6 @@
 #endif
 	for (i = 0; i < NR_IRQS; i++)
 		irq_timer_state[i] = NULL;
-	for (i = 0; i < MAX_BLKDEV; i++)
-		blkdev_timer_state[i] = NULL;
 	memset(&keyboard_timer_state, 0, sizeof(struct timer_rand_state));
 	memset(&mouse_timer_state, 0, sizeof(struct timer_rand_state));
 	memset(&extract_timer_state, 0, sizeof(struct timer_rand_state));
@@ -1472,26 +1464,22 @@
 		irq_timer_state[irq] = state;
 	}
 }
-
-void rand_initialize_blkdev(int major, int mode)
+ 
+void rand_initialize_disk(struct gendisk *disk)
 {
 	struct timer_rand_state *state;
 	
-	if (major >= MAX_BLKDEV || blkdev_timer_state[major])
-		return;
-
 	/*
 	 * If kmalloc returns null, we just won't use that entropy
 	 * source.
 	 */
-	state = kmalloc(sizeof(struct timer_rand_state), mode);
+	state = kmalloc(sizeof(struct timer_rand_state), GFP_KERNEL);
 	if (state) {
 		memset(state, 0, sizeof(struct timer_rand_state));
-		blkdev_timer_state[major] = state;
+		disk->random = state;
 	}
 }
 
-
 static ssize_t
 random_read(struct file * file, char * buf, size_t nbytes, loff_t *ppos)
 {
@@ -2309,7 +2297,7 @@
 EXPORT_SYMBOL(add_keyboard_randomness);
 EXPORT_SYMBOL(add_mouse_randomness);
 EXPORT_SYMBOL(add_interrupt_randomness);
-EXPORT_SYMBOL(add_blkdev_randomness);
+EXPORT_SYMBOL(add_disk_randomness);
 EXPORT_SYMBOL(batch_entropy_store);
 EXPORT_SYMBOL(generate_random_uuid);
 
diff -Nru a/drivers/char/raw.c b/drivers/char/raw.c
--- a/drivers/char/raw.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/char/raw.c	Wed Oct 30 16:44:29 2002
@@ -68,6 +68,7 @@
 			}
 		}
 	}
+	filp->private_data = bdev;
 	up(&raw_mutex);
 	return err;
 }
@@ -92,22 +93,9 @@
 raw_ioctl(struct inode *inode, struct file *filp,
 		  unsigned int command, unsigned long arg)
 {
-	const int minor = minor(inode->i_rdev);
-	int err;
-	struct block_device *bdev;
-
-	err = -ENODEV;
-	if (minor < 1 && minor > 255)
-		goto out;
+	struct block_device *bdev = filp->private_data;
 
-	bdev = raw_devices[minor].binding;
-	err = -EINVAL;
-	if (bdev == NULL)
-		goto out;
-	if (bdev->bd_inode && bdev->bd_op && bdev->bd_op->ioctl)
-		err = bdev->bd_op->ioctl(bdev->bd_inode, NULL, command, arg);
-out:
-	return err;
+	return blkdev_ioctl(bdev->bd_inode, NULL, command, arg);
 }
 
 /*
diff -Nru a/drivers/char/sonypi.c b/drivers/char/sonypi.c
--- a/drivers/char/sonypi.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/char/sonypi.c	Wed Oct 30 16:44:30 2002
@@ -1,4 +1,4 @@
-/* 
+/*
  * Sony Programmable I/O Control Device driver for VAIO
  *
  * Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
@@ -542,7 +542,7 @@
 	down(&sonypi_device.lock);
 	switch (cmd) {
 	case SONYPI_IOCGBRT:
-		val8 = sonypi_ecrget(0x96);
+		val8 = sonypi_ecrget(SONYPI_LCD_LIGHT);
 		if (copy_to_user((u8 *)arg, &val8, sizeof(val8))) {
 			ret = -EFAULT;
 			goto out;
@@ -553,38 +553,38 @@
 			ret = -EFAULT;
 			goto out;
 		}
-		sonypi_ecrset(0x96, val8);
+		sonypi_ecrset(SONYPI_LCD_LIGHT, val8);
 		break;
 	case SONYPI_IOCGBAT1CAP:
-		val16 = sonypi_ecrget16(0xb2);
+		val16 = sonypi_ecrget16(SONYPI_BAT1_FULL);
 		if (copy_to_user((u16 *)arg, &val16, sizeof(val16))) {
 			ret = -EFAULT;
 			goto out;
 		}
 		break;
 	case SONYPI_IOCGBAT1REM:
-		val16 = sonypi_ecrget16(0xa2);
+		val16 = sonypi_ecrget16(SONYPI_BAT1_LEFT);
 		if (copy_to_user((u16 *)arg, &val16, sizeof(val16))) {
 			ret = -EFAULT;
 			goto out;
 		}
 		break;
 	case SONYPI_IOCGBAT2CAP:
-		val16 = sonypi_ecrget16(0xba);
+		val16 = sonypi_ecrget16(SONYPI_BAT2_FULL);
 		if (copy_to_user((u16 *)arg, &val16, sizeof(val16))) {
 			ret = -EFAULT;
 			goto out;
 		}
 		break;
 	case SONYPI_IOCGBAT2REM:
-		val16 = sonypi_ecrget16(0xaa);
+		val16 = sonypi_ecrget16(SONYPI_BAT2_LEFT);
 		if (copy_to_user((u16 *)arg, &val16, sizeof(val16))) {
 			ret = -EFAULT;
 			goto out;
 		}
 		break;
 	case SONYPI_IOCGBATFLAGS:
-		val8 = sonypi_ecrget(0x81) & 0x07;
+		val8 = sonypi_ecrget(SONYPI_BAT_FLAGS) & 0x07;
 		if (copy_to_user((u8 *)arg, &val8, sizeof(val8))) {
 			ret = -EFAULT;
 			goto out;
diff -Nru a/drivers/char/sonypi.h b/drivers/char/sonypi.h
--- a/drivers/char/sonypi.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/char/sonypi.h	Wed Oct 30 16:44:29 2002
@@ -35,7 +35,7 @@
 #ifdef __KERNEL__
 
 #define SONYPI_DRIVER_MAJORVERSION	 1
-#define SONYPI_DRIVER_MINORVERSION	13
+#define SONYPI_DRIVER_MINORVERSION	14
 
 #include <linux/types.h>
 #include <linux/pci.h>
@@ -54,6 +54,20 @@
 #define SONYPI_SHIB			0x9d
 #define SONYPI_TYPE2_REGION_SIZE	0x20
 
+/* battery / brightness addresses */
+#define SONYPI_BAT_FLAGS	0x81
+#define SONYPI_LCD_LIGHT	0x96
+#define SONYPI_BAT1_PCTRM	0xa0
+#define SONYPI_BAT1_LEFT	0xa2
+#define SONYPI_BAT1_MAXRT	0xa4
+#define SONYPI_BAT2_PCTRM	0xa8
+#define SONYPI_BAT2_LEFT	0xaa
+#define SONYPI_BAT2_MAXRT	0xac
+#define SONYPI_BAT1_MAXTK	0xb0
+#define SONYPI_BAT1_FULL	0xb2
+#define SONYPI_BAT2_MAXTK	0xb8
+#define SONYPI_BAT2_FULL	0xba
+
 /* ioports used for brightness and type2 events */
 #define SONYPI_DATA_IOPORT	0x62
 #define SONYPI_CST_IOPORT	0x66
@@ -156,6 +170,14 @@
 	{ 0x01, SONYPI_EVENT_JOGDIAL_DOWN },
 	{ 0x5f, SONYPI_EVENT_JOGDIAL_UP_PRESSED },
 	{ 0x41, SONYPI_EVENT_JOGDIAL_DOWN_PRESSED },
+	{ 0x1e, SONYPI_EVENT_JOGDIAL_FAST_UP },
+	{ 0x02, SONYPI_EVENT_JOGDIAL_FAST_DOWN },
+	{ 0x5e, SONYPI_EVENT_JOGDIAL_FAST_UP_PRESSED },
+	{ 0x42, SONYPI_EVENT_JOGDIAL_FAST_DOWN_PRESSED },
+	{ 0x1d, SONYPI_EVENT_JOGDIAL_VFAST_UP },
+	{ 0x03, SONYPI_EVENT_JOGDIAL_VFAST_DOWN },
+	{ 0x5d, SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED },
+	{ 0x43, SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED },
 	{ 0x40, SONYPI_EVENT_JOGDIAL_PRESSED },
 	{ 0x00, SONYPI_EVENT_JOGDIAL_RELEASED },
 	{ 0x00, 0x00 }
@@ -192,6 +214,7 @@
 	{ 0x33, SONYPI_EVENT_FNKEY_F },
 	{ 0x34, SONYPI_EVENT_FNKEY_S },
 	{ 0x35, SONYPI_EVENT_FNKEY_B },
+	{ 0x36, SONYPI_EVENT_FNKEY_ONLY },
 	{ 0x00, 0x00 }
 };
 
@@ -214,6 +237,7 @@
 /* The set of possible back button events */
 static struct sonypi_event sonypi_backev[] = {
 	{ 0x20, SONYPI_EVENT_BACK_PRESSED },
+	{ 0x3b, SONYPI_EVENT_HELP_PRESSED },
 	{ 0x00, 0x00 }
 };
 
@@ -258,7 +282,7 @@
 	while (--n && (command)) \
 		udelay(1); \
 	if (!n && (verbose || !quiet)) \
-		printk(KERN_WARNING "sonypi command failed at %s : %s(line %d)\n", __FILE__, __FUNCTION__, __LINE__); \
+		printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __FUNCTION__, __LINE__); \
 }
 
 #endif /* __KERNEL__ */
diff -Nru a/drivers/char/specialix.c b/drivers/char/specialix.c
--- a/drivers/char/specialix.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/char/specialix.c	Wed Oct 30 16:44:33 2002
@@ -90,7 +90,6 @@
 #include <linux/fcntl.h>
 #include <linux/major.h>
 #include <linux/delay.h>
-#include <linux/tqueue.h>
 #include <linux/version.h>
 #include <linux/pci.h>
 
diff -Nru a/drivers/char/stallion.c b/drivers/char/stallion.c
--- a/drivers/char/stallion.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/char/stallion.c	Wed Oct 30 16:44:25 2002
@@ -2343,8 +2343,7 @@
 		portp->closing_wait = 30 * HZ;
 		portp->normaltermios = stl_deftermios;
 		portp->callouttermios = stl_deftermios;
-		portp->tqueue.routine = stl_offintr;
-		portp->tqueue.data = portp;
+		INIT_WORK(&portp->tqueue, stl_offintr, portp);
 		init_waitqueue_head(&portp->open_wait);
 		init_waitqueue_head(&portp->close_wait);
 		portp->stats.brd = portp->brdnr;
@@ -4128,7 +4127,7 @@
 	    (test_bit(ASYI_TXLOW, &portp->istate) == 0))) {
 		set_bit(ASYI_TXLOW, &portp->istate);
 		MOD_INC_USE_COUNT;
-		if (schedule_task(&portp->tqueue) == 0)
+		if (schedule_work(&portp->tqueue) == 0)
 			MOD_DEC_USE_COUNT;
 	}
 
diff -Nru a/drivers/char/tpqic02.c b/drivers/char/tpqic02.c
--- a/drivers/char/tpqic02.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/char/tpqic02.c	Wed Oct 30 16:44:28 2002
@@ -116,26 +116,28 @@
  * card+drive info if runtime configuration has been selected.
  */
 
-static struct mtconfiginfo qic02_tape_dynconf =	/* user settable */
-{ 0, 0, BOGUS_IRQ, 0, 0, TPQD_DEFAULT_FLAGS, };
+static struct mtconfiginfo qic02_tape_dynconf =	 {
+	/* user settable */
+	0, 0, BOGUS_IRQ, 0, 0, TPQD_DEFAULT_FLAGS, 
+};
 static struct qic02_ccb qic02_tape_ccb;	/* private stuff */
 
 #else
 
-unsigned long qic02_tape_debug = TPQD_DEFAULT_FLAGS;
+static unsigned long qic02_tape_debug = TPQD_DEFAULT_FLAGS;
 
 # if ((QIC02_TAPE_IFC!=WANGTEK) && (QIC02_TAPE_IFC!=ARCHIVE) && (QIC02_TAPE_IFC!=MOUNTAIN))
 #  error No valid interface card specified
 # endif
 #endif				/* CONFIG_QIC02_DYNCONF */
 
-static volatile int ctlbits;	/* control reg bits for tape interface */
+static int ctlbits;	/* control reg bits for tape interface */
 
 static wait_queue_head_t qic02_tape_transfer;	/* sync rw with interrupts */
 
-static volatile struct mtget ioctl_status;	/* current generic status */
+static struct mtget ioctl_status;	/* current generic status */
 
-static volatile struct tpstatus tperror;	/* last drive status */
+static struct tpstatus tperror;	/* last drive status */
 
 static char rcs_revision[] = "$Revision: 1.10 $";
 static char rcs_date[] = "$Date: 1997/01/26 07:13:20 $";
@@ -145,32 +147,34 @@
  * Some variables need `volatile' because they may be modified
  * by an interrupt.
  */
-static volatile flag status_dead = YES;	/* device is legally dead until proven alive */
+static flag status_dead = YES;	/* device is legally dead until proven alive */
 static flag status_zombie = YES;	/* it's `zombie' until irq/dma allocated */
 
-static volatile flag status_bytes_wr = NO;	/* write FM at close or not */
-static volatile flag status_bytes_rd = NO;	/* (rd|wr) used for rewinding */
+static flag status_bytes_wr = NO;	/* write FM at close or not */
+static flag status_bytes_rd = NO;	/* (rd|wr) used for rewinding */
 
 static volatile unsigned long status_cmd_pending;	/* cmd in progress */
-static volatile flag status_expect_int = NO;	/* ready for interrupts */
-static volatile flag status_timer_on = NO;	/* using time-out */
-static volatile int status_error;	/* int handler may detect error */
-static volatile flag status_eof_detected = NO;	/* end of file */
-static volatile flag status_eom_detected = NO;	/* end of recorded media */
-static volatile flag status_eot_detected = NO;	/* end of tape */
-static volatile flag doing_read = NO;
-static volatile flag doing_write = NO;
+static flag status_expect_int = NO;	/* ready for interrupts */
+static flag status_timer_on = NO;	/* using time-out */
+static int status_error;	/* int handler may detect error */
+static flag status_eof_detected = NO;	/* end of file */
+static flag status_eom_detected = NO;	/* end of recorded media */
+static flag status_eot_detected = NO;	/* end of tape */
+static flag doing_read = NO;
+static flag doing_write = NO;
 
-static volatile unsigned long dma_bytes_todo;
-static volatile unsigned long dma_bytes_done;
+static unsigned long dma_bytes_todo;
+static unsigned long dma_bytes_done;
 static volatile unsigned dma_mode;	/* !=0 also means DMA in use */
 static flag need_rewind = YES;
 
 static kdev_t current_tape_dev;
 static int extra_blocks_left = BLOCKS_BEYOND_EW;
-
 static struct timer_list tp_timer;
 
+static unsigned long tape_open;		/* Guard open one only */
+static DECLARE_MUTEX(tape_op);		/* Serialize tape operations */
+
 /* return_*_eof:
  *	NO:	not at EOF,
  *	YES:	tell app EOF was reached (return 0).
@@ -183,6 +187,7 @@
  *	move on to the next file.
  *
  */
+ 
 static flag return_read_eof = NO;	/* set to signal app EOF was reached */
 static flag return_write_eof = NO;
 static flag reported_read_eof = NO;	/* set when we've done that */
@@ -248,70 +253,34 @@
 	const char *msg;
 	/* EXC_nr attribute should match with tpqic02.h */
 } exception_list[] = {
-	{
-	0, 0, "Unknown exception status code", /* extra: 0 */ },
-	{
-	~(0), TP_ST0 | TP_CNI | TP_USL | TP_WRP,
-		    "Drive not online" /* 1 */ },
-	    /* Drive presence goes before cartridge presence. */
-	{
-		~(TP_WRP | TP_USL), TP_ST0 | TP_CNI,
+	{ 0, 0, "Unknown exception status code", /* extra: 0 */ },
+	{ ~(0), TP_ST0 | TP_CNI | TP_USL | TP_WRP, "Drive not online" /* 1 */ }, /* Drive presence goes before cartridge presence. */
+	{ ~(TP_WRP | TP_USL), TP_ST0 | TP_CNI,
 		    /* My Wangtek 5150EQ sometimes reports a status code
 		     * of 0x00e0, which is not a valid exception code, but
 		     * I think it should be recognized as "NO CARTRIDGE".
 		     */
-	"Cartridge not in place" /* 2 */ },
-	{
-	(unsigned short) ~(TP_ST1 | TP_BOM), (TP_ST0 | TP_WRP),
-		    "Write protected cartridge" /* 3 */ },
-	{
-	(unsigned short) ~(TP_ST1 | TP_EOR), (TP_ST0 | TP_EOM),
-		    "End of media" /* 4 */ },
-	{
-	~TP_WRP, TP_ST0 | TP_UDA | TP_ST1 | TP_BOM,
-		    "Read or Write abort. Rewind tape." /* 5 */ },
-	{
-	~TP_WRP, TP_ST0 | TP_UDA,
-		    "Read error. Bad block transferred." /* 6 */ },
-	{
-	~TP_WRP, TP_ST0 | TP_UDA | TP_BNL,
-		    "Read error. Filler block transferred." /* 7 */ },
-	{
-	~TP_WRP, TP_ST0 | TP_UDA | TP_BNL | TP_ST1 | TP_NDT,
-		    "Read error. No data detected." /* 8 */ },
-	{
-	~TP_WRP,
-		    TP_ST0 | TP_EOM | TP_UDA | TP_BNL | TP_ST1 |
-		    TP_NDT, "Read error. No data detected. EOM." /* 9 */ },
-	{
-	~(TP_WRP | TP_MBD | TP_PAR | TP_EOR),
-		    TP_ST0 | TP_UDA | TP_BNL | TP_ST1 | TP_NDT |
-		    TP_BOM,
-		    "Read error. No data detected. BOM." /* 10 */ },
-	{
-		~(TP_WRP | TP_EOM), TP_ST0 | TP_FIL,
+			"Cartridge not in place" /* 2 */ },
+	{ (unsigned short) ~(TP_ST1 | TP_BOM), (TP_ST0 | TP_WRP), "Write protected cartridge" /* 3 */ },
+	{ (unsigned short) ~(TP_ST1 | TP_EOR), (TP_ST0 | TP_EOM), "End of media" /* 4 */ },
+	{ ~TP_WRP, TP_ST0 | TP_UDA | TP_ST1 | TP_BOM, "Read or Write abort. Rewind tape." /* 5 */ },
+	{ ~TP_WRP, TP_ST0 | TP_UDA, "Read error. Bad block transferred." /* 6 */ },
+	{ ~TP_WRP, TP_ST0 | TP_UDA | TP_BNL, "Read error. Filler block transferred." /* 7 */ },
+	{ ~TP_WRP, TP_ST0 | TP_UDA | TP_BNL | TP_ST1 | TP_NDT, "Read error. No data detected." /* 8 */ },
+	{ ~TP_WRP, TP_ST0 | TP_EOM | TP_UDA | TP_BNL | TP_ST1 | TP_NDT, "Read error. No data detected. EOM." /* 9 */ },
+	{ ~(TP_WRP | TP_MBD | TP_PAR | TP_EOR), TP_ST0 | TP_UDA | TP_BNL | TP_ST1 | TP_NDT | TP_BOM, "Read error. No data detected. BOM." /* 10 */ },
+	{ ~(TP_WRP | TP_EOM), TP_ST0 | TP_FIL,
 		    /* Status 0x0089 (EOM & FM) is viewed as an FM,
 		     * because it can only happen during a read.
 		     * EOM is checked separately for an FM condition.
 		     */
-	"File mark detected" /* 11 */ },
-	{
-	~(TP_ST0 | TP_CNI | TP_USL | TP_WRP | TP_BOM),
-		    TP_ST1 | TP_ILL, "Illegal command" /* 12 */ },
-	{
-	~(TP_ST0 | TP_CNI | TP_USL | TP_WRP | TP_BOM),
-		    TP_ST1 | TP_POR, "Reset occurred" /* 13 */ },
-	{
-		~TP_WRP, TP_ST0 | TP_FIL | TP_MBD,	/* NOTE: ST1 not set! */
-	"Marginal block detected" /* 14 */ },
-	{
-		~(TP_ST0 | TP_WRP | TP_EOM | TP_UDA | TP_BNL | TP_FIL |
-		  TP_NDT), TP_ST1 | TP_EOR,
-		/********** Is the extra TP_NDT really needed Eddy? **********/
-	"End of recorded media" /* extra: 15 */ },
+			"File mark detected" /* 11 */ },
+	{ ~(TP_ST0 | TP_CNI | TP_USL | TP_WRP | TP_BOM), TP_ST1 | TP_ILL, "Illegal command" /* 12 */ },
+	{ ~(TP_ST0 | TP_CNI | TP_USL | TP_WRP | TP_BOM), TP_ST1 | TP_POR, "Reset occurred" /* 13 */ },
+	{ ~TP_WRP, TP_ST0 | TP_FIL | TP_MBD,	/* NOTE: ST1 not set! */ "Marginal block detected" /* 14 */ },
+	{ ~(TP_ST0 | TP_WRP | TP_EOM | TP_UDA | TP_BNL | TP_FIL |  TP_NDT), TP_ST1 | TP_EOR,	/********** Is the extra TP_NDT really needed Eddy? **********/ "End of recorded media" /* extra: 15 */ },
 	    /* 15 is returned when SEEKEOD completes successfully */
-	{
-	~(TP_WRP | TP_ST0), TP_ST1 | TP_BOM, "Beginning of media" /* extra: 16 */ }
+	{ ~(TP_WRP | TP_ST0), TP_ST1 | TP_BOM, "Beginning of media" /* extra: 16 */ }
 };
 
 #define NR_OF_EXC	(sizeof(exception_list)/sizeof(struct exception_list_type))
@@ -333,24 +302,12 @@
 }				/* tpqputs */
 
 
-/* Perform byte order swapping for a 16-bit word.
- *
- * [FIXME] This should probably be in include/asm/
- * ([FIXME] i486 can do this faster)
- */
-static inline void byte_swap_w(volatile unsigned short *w)
-{
-	int t = *w;
-	*w = (t >> 8) | ((t & 0xff) << 8);
-}
-
-
-
 /* Init control register bits on interface card.
  * For Archive, interrupts must be enabled explicitly.
  * Wangtek interface card requires ONLINE to be set, Archive SC402/SC499R
  * cards keep it active all the time.
  */
+
 static void ifc_init(void)
 {
 	if (QIC02_TAPE_IFC == WANGTEK) {	/* || (QIC02_TAPE_IFC == EVEREX) */
@@ -374,10 +331,8 @@
 		tpqputs(TPQD_ALWAYS, "Oops -- report_qic_exception");
 		n = 0;
 	}
-	if (TPQDBG(SENSE_TEXT) || n == 0) {
-		printk(TPQIC02_NAME ": sense: %s\n",
-		       exception_list[n].msg);
-	}
+	if (TPQDBG(SENSE_TEXT) || n == 0)
+		printk(TPQIC02_NAME ": sense: %s\n", exception_list[n].msg);
 }				/* report_qic_exception */
 
 
@@ -395,9 +350,7 @@
 			return i;
 		}
 	}
-	printk(TPQIC02_NAME
-	       ": decode_qic_exception_nr: exception(%x) not recognized\n",
-	       s);
+	printk(TPQIC02_NAME ": decode_qic_exception_nr: exception(%x) not recognized\n", s);
 	return 0;
 }				/* decode_qic_exception_nr */
 
@@ -477,15 +430,13 @@
 	/* KLUDGE FOR G++ BUG */
 	{
 		int stat = inb_p(QIC02_STAT_PORT);
-		status_dead =
-		    ((stat & QIC02_STAT_RESETMASK) != QIC02_STAT_RESETVAL);
+		status_dead = ((stat & QIC02_STAT_RESETMASK) != QIC02_STAT_RESETVAL);
 	}
 	/* if successful, inb(STAT) returned RESETVAL */
-	if (status_dead == YES) {
+	if (status_dead == YES)
 		printk(TPQIC02_NAME ": reset failed!\n");
-	} else if (verbose) {
+	else if (verbose)
 		printk(TPQIC02_NAME ": reset successful\n");
-	}
 
 	return (status_dead == YES) ? TE_DEAD : TE_OK;
 }				/* tape_reset */
@@ -528,11 +479,10 @@
 	 * it could be *much* longer!
 	 */
 	while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) && (--i > 0))
-		/*skip */ ;
+		udelay(1);
 	/* wait for ready */
 	if (i == 0) {
-		tpqputs(TPQD_ALWAYS,
-			"timed out waiting for ready in notify_cmd");
+		tpqputs(TPQD_ALWAYS, "timed out waiting for ready in notify_cmd");
 		status_dead = YES;
 		return TE_TIM;
 	}
@@ -541,7 +491,7 @@
 	i = TAPE_NOTIFY_TIMEOUT;
 	/* according to the specs this one should never time-out */
 	while (((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) == 0) && (--i > 0))
-		/*skip */ ;
+		udelay(1);
 	/* wait for not ready */
 	if (i == 0) {
 		tpqputs(TPQD_ALWAYS, "timed out waiting for !ready in notify_cmd");
@@ -568,7 +518,7 @@
 	 */
 	spin_t = 50;
 	while (((stat = inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK) && (--spin_t > 0))
-		/*SKIP*/;
+		udelay(1);
 	if ((stat & QIC02_STAT_READY) == 0)
 		return TE_OK;	/* covers 99.99% of all calls */
 
@@ -580,9 +530,11 @@
 	spin_t += jiffies;
 
 	/* FIXME...*/
-	while (((stat = inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK) 
-		&& time_before(jiffies, spin_t))
-		schedule();	/* don't waste all the CPU time */
+	while (((stat = inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK)  && time_before(jiffies, spin_t))
+	{
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(1);	/* don't waste all the CPU time */
+	}
 	if ((stat & QIC02_STAT_READY) == 0)
 		return TE_OK;
 
@@ -611,8 +563,7 @@
 	}
 
 	if ((stat & QIC02_STAT_EXCEPTION) == 0) {
-		tpqputs(TPQD_ALWAYS,
-			"exception detected after waiting_for_ready");
+		tpqputs(TPQD_ALWAYS, "exception detected after waiting_for_ready");
 		return TE_EX;
 	} else {
 		return TE_OK;
@@ -627,7 +578,6 @@
 	int i, stat;
 
 	for (i = 0; i < size; i++) {
-
 		stat = wait_for_ready(TIM_S);
 		if (stat != TE_OK)
 			return stat;
@@ -700,9 +650,12 @@
 	 * de-schedule immediately, we waste a lot of time because a
 	 * task switch is much longer than we usually have to wait here.
 	 */
-	n = 1000;		/* 500 is not enough on a 486/33 */
+	n = 700;
 	while ((n > 0) && ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK))
+	{
+		udelay(1);
 		n--;		/* wait for ready or exception or timeout */
+	}
 	if (n == 0) {
 		/* n (above) should be chosen such that on your machine
 		 * you rarely ever see the message below, and it should
@@ -711,7 +664,10 @@
 	 	/* FIXME */
 		tpqputs(TPQD_ALWAYS, "waiting looong in rdstatus() -- drive dead?");
 		while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_MASK) == QIC02_STAT_MASK)
-			schedule();
+		{
+			set_current_state(TASK_UNINTERRUPTIBLE);
+			schedule_timeout(1);
+		}
 		tpqputs(TPQD_ALWAYS, "finished waiting in rdstatus()");
 	}
 
@@ -737,12 +693,12 @@
 		*q = inb_p(QIC02_DATA_PORT);	/* read status byte */
 
 		if (TP_DIAGS(current_tape_dev))
-			printk("[%1d]=0x%x  ", q - stp,
-			       (unsigned) (*q) & 0xff);
+			printk("[%1d]=0x%x  ", q - stp, (unsigned) (*q) & 0xff);
 
 		outb_p(ctlbits | QIC02_CTL_REQUEST, QIC02_CTL_PORT);	/* set request */
 
-		while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) == 0);	/* wait for not ready */
+		while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) == 0)
+			cpu_relax();	/* wait for not ready */
 
 		udelay(22);	/* delay >20 usec */
 
@@ -754,7 +710,7 @@
 	 * My drive doesn't seem to need it here yet, but others do?
 	 */
 	while (inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY)
-		/*skip */ ;
+		cpu_relax();
 	/* wait for ready */
 
 	if (TP_DIAGS(current_tape_dev))
@@ -772,13 +728,8 @@
 static int get_status(volatile struct tpstatus *stp)
 {
 	int stat = rdstatus((char *) stp, TPSTATSIZE, QCMD_RD_STAT);
-#if defined(__i386__) || defined (__x86_64__)
-	byte_swap_w(&(stp->dec));
-	byte_swap_w(&(stp->urc));
-#else
-#warning Undefined architecture
-	/* should probably swap status bytes #definition */
-#endif
+	stp->dec = be16_to_cpu(stp->dec);
+	stp->urc = be16_to_cpu(stp->urc);
 	return stat;
 }				/* get_status */
 
@@ -823,8 +774,7 @@
 	static void finish_rw(int cmd);
 
 	if (TPQDBG(SENSE_TEXT))
-		printk(TPQIC02_NAME ": tp_sense(ignore=0x%x) enter\n",
-		       ignore);
+		printk(TPQIC02_NAME ": tp_sense(ignore=0x%x) enter\n", ignore);
 
 	/* sense() is not allowed during a read or write cycle */
 	if (doing_write == YES)
@@ -842,11 +792,8 @@
 	if (err & (TP_ST0 | TP_ST1))
 		printk(TPQIC02_NAME ": tp_sense: status: %x, error count: %d, underruns: %d\n",
 		       tperror.exs, tperror.dec, tperror.urc);
-	else if ((tperror.dec != 0) || (tperror.urc != 0)
-		 || TPQDBG(SENSE_CNTS))
-		printk(TPQIC02_NAME
-		       ": tp_sense: no hard errors, soft error count: %d, underruns: %d\n",
-		       tperror.dec, tperror.urc);
+	else if ((tperror.dec != 0) || (tperror.urc != 0) || TPQDBG(SENSE_CNTS))
+		printk(TPQIC02_NAME ": tp_sense: no hard errors, soft error count: %d, underruns: %d\n", tperror.dec, tperror.urc);
 
 	/* Set generic status. HP-UX defines these, but some extra would 
 	 * be useful. Problem is to remain compatible. [Do we want to be
@@ -909,9 +856,7 @@
 
 	stat = inb(QIC02_STAT_PORT) & QIC02_STAT_MASK;
 	if (TPQDBG(REWIND))
-		printk(TPQIC02_NAME
-		       ": Waiting for (re-)wind to finish: stat=0x%x\n",
-		       stat);
+		printk(TPQIC02_NAME ": Waiting for (re-)wind to finish: stat=0x%x\n", stat);
 
 	stat = wait_for_ready(timeout);
 
@@ -946,13 +891,13 @@
 		stat = TE_OK;
 	}
 	if (stat != TE_OK) {
-		printk(TPQIC02_NAME ": ll_do_qic_cmd(%x, %ld) failed\n",
-		       cmd, (long) timeout);
+		printk(TPQIC02_NAME ": ll_do_qic_cmd(%x, %ld) failed\n", cmd, (long) timeout);
 		return -EIO;
 	}
 #if OBSOLETE
 	/* wait for ready since it may not be active immediately after reading status */
-	while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) != 0);
+	while ((inb_p(QIC02_STAT_PORT) & QIC02_STAT_READY) != 0)
+		cpu_relax();
 #endif
 
 	stat = send_qic02_cmd(cmd, timeout, 0);	/* (checks for exceptions) */
@@ -982,21 +927,16 @@
 	/* sense() will set eof/eom as required */
 	if (stat == TE_EX) {
 		if (tp_sense(TP_WRP | TP_BOM | TP_EOM | TP_FIL) != TE_OK) {
-			printk(TPQIC02_NAME
-			       ": Exception persist in ll_do_qic_cmd[1](%x, %ld)",
-			       cmd, (long) timeout);
+			printk(TPQIC02_NAME ": Exception persist in ll_do_qic_cmd[1](%x, %ld)", cmd, (long) timeout);
 			status_dead = YES;
 			return -ENXIO;
 			/* if rdstatus fails too, we're in trouble */
 		}
 	} else if (stat != TE_OK) {
-		printk(TPQIC02_NAME
-		       ": ll_do_qic_cmd: send_qic02_cmd failed, stat = 0x%x\n",
-		       stat);
+		printk(TPQIC02_NAME ": ll_do_qic_cmd: send_qic02_cmd failed, stat = 0x%x\n", stat);
 		return -EIO;	/*** -EIO is probably not always appropriate */
 	}
 
-
 	if (timeout == TIM_R)
 		stat = wait_for_rewind(timeout);
 	else
@@ -1007,18 +947,14 @@
 			      TP_EOR | TP_NDT | TP_UDA | TP_BNL | TP_WRP |
 			      TP_BOM | TP_EOM | TP_FIL : TP_WRP | TP_BOM |
 			      TP_EOM | TP_FIL)) != TE_OK) {
-			printk(TPQIC02_NAME
-			       ": Exception persist in ll_do_qic_cmd[2](%x, %ld)\n",
-			       cmd, (long) timeout);
+			printk(TPQIC02_NAME ": Exception persist in ll_do_qic_cmd[2](%x, %ld)\n", cmd, (long) timeout);
 			if (cmd != QCMD_RD_FM)
 				status_dead = YES;
 			return -ENXIO;
 			/* if rdstatus fails too, we're in trouble */
 		}
 	} else if (stat != TE_OK) {
-		printk(TPQIC02_NAME
-		       ": ll_do_qic_cmd %x: wait failed, stat == 0x%x\n",
-		       cmd, stat);
+		printk(TPQIC02_NAME ": ll_do_qic_cmd %x: wait failed, stat == 0x%x\n", cmd, stat);
 		return -EIO;
 	}
 	return 0;
@@ -1052,30 +988,30 @@
 
 static void terminate_read(int cmd)
 {
-	if (doing_read == YES) {
-		doing_read = NO;
-		if (cmd != QCMD_RD_FM) {
-			/* if the command is a RFM, there is no need to do this
-			 * because a RFM will legally terminate the read-cycle.
-			 */
-			tpqputs(TPQD_ALWAYS, "terminating pending read-cycle");
+	if (doing_read != YES)
+		return;
+		
+	doing_read = NO;
+	
+	if (cmd == QCMD_RD_FM)
+		return;
+		
+	/* if the command is a RFM, there is no need to do this
+	 * because a RFM will legally terminate the read-cycle.
+	 */
+	tpqputs(TPQD_ALWAYS, "terminating pending read-cycle");
 
-			/* I'm not too sure about this part  -- hhb */
-			if (QIC02_TAPE_IFC == MOUNTAIN) {
-				/* Mountain reference says can terminate by de-asserting online */
-				ctlbits &= ~MTN_QIC02_CTL_ONLINE;
-			}
-
-			if (tp_sense(TP_FIL | TP_EOM | TP_WRP) != TE_OK) {
-				tpqputs(TPQD_ALWAYS,
-					"finish_rw[read1]: ignore the 2 lines above");
-				if (is_exception()) {
-					if (tp_sense
-					    (TP_ILL | TP_FIL | TP_EOM |
-					     TP_WRP) != TE_OK)
-						tpqputs(TPQD_ALWAYS,"finish_rw[read2]: read cycle error");
-				}
-			}
+	/* I'm not too sure about this part  -- hhb */
+	if (QIC02_TAPE_IFC == MOUNTAIN) {
+		/* Mountain reference says can terminate by de-asserting online */
+		ctlbits &= ~MTN_QIC02_CTL_ONLINE;
+	}
+
+	if (tp_sense(TP_FIL | TP_EOM | TP_WRP) != TE_OK) {
+		tpqputs(TPQD_ALWAYS, "finish_rw[read1]: ignore the 2 lines above");
+		if (is_exception()) {
+			if (tp_sense(TP_ILL | TP_FIL | TP_EOM | TP_WRP) != TE_OK)
+				tpqputs(TPQD_ALWAYS,"finish_rw[read2]: read cycle error");
 		}
 	}
 }				/* terminate_read */
@@ -1085,23 +1021,23 @@
 {
 	int stat;
 
-	if (doing_write == YES) {
-		doing_write = NO;
-		/* Finish writing by appending a FileMark at the end. */
-		if (cmd != QCMD_WRT_FM) {
-			/* finish off write cycle */
-			stat = ll_do_qic_cmd(QCMD_WRT_FM, TIM_M);
-			if (stat != TE_OK)
-				tpqputs(TPQD_ALWAYS,
-					"Couldn't finish write cycle properly");
-			(void) tp_sense(0);
-		}
-		/* If there is an EOF token waiting to be returned to
-		 * the (writing) application, discard it now.
-		 * We could be at EOT, so don't reset return_write_eof.
-		 */
-		reported_write_eof = YES;
+	if (doing_write != YES)
+		return;
+
+	doing_write = NO;
+	/* Finish writing by appending a FileMark at the end. */
+	if (cmd != QCMD_WRT_FM) {
+		/* finish off write cycle */
+		stat = ll_do_qic_cmd(QCMD_WRT_FM, TIM_M);
+		if (stat != TE_OK)
+			tpqputs(TPQD_ALWAYS, "Couldn't finish write cycle properly");
+		(void) tp_sense(0);
 	}
+	/* If there is an EOF token waiting to be returned to
+	 * the (writing) application, discard it now.
+	 * We could be at EOT, so don't reset return_write_eof.
+	 */
+	reported_write_eof = YES;
 }				/* terminate_write */
 
 
@@ -1109,8 +1045,7 @@
 static void finish_rw(int cmd)
 {
 	if (wait_for_ready(TIM_S) != TE_OK) {
-		tpqputs(TPQD_ALWAYS,
-			"error: drive not ready in finish_rw() !");
+		tpqputs(TPQD_ALWAYS, "error: drive not ready in finish_rw() !");
 		return;
 	}
 	terminate_read(cmd);
@@ -1172,8 +1107,7 @@
 
 	case MTBSF:
 		if (TP_HAVE_BSF) {
-			tpqputs(TPQD_IOCTLS,
-				"MTBSF backward searching filemark -- optional command");
+			tpqputs(TPQD_IOCTLS, "MTBSF backward searching filemark -- optional command");
 			if ((mode_access == WRITE) && status_bytes_wr)
 				return -EACCES;
 			stat = do_qic_cmd(QCMD_RD_FM_BCK, TIM_F);
@@ -1243,7 +1177,7 @@
 
 	case MTNOP:
 		tpqputs(TPQD_IOCTLS, "MTNOP setting status only");
-			/********** should do `read position' for drives that support it **********/
+		/********** should do `read position' for drives that support it **********/
 		return (tp_sense(-1) == TE_OK) ? 0 : -EIO;	/**** check return codes ****/
 
 	case MTRETEN:
@@ -1377,12 +1311,7 @@
 /* dma_transfer(): This routine is called for every 512 bytes to be read
  * from/written to the tape controller. Speed is important here!
  * (There must be enough time left for the hd controller!)
- * When other devices use DMA they must ensure they use un-interruptible
- * double byte accesses to the DMA controller. Floppy.c is ok.
- * Must have interrupts disabled when this function is invoked,
- * otherwise, the double-byte transfers to the DMA controller will not
- * be atomic. That could lead to nasty problems when they are interrupted
- * by other DMA interrupt-routines.
+ * The dma lock protects the DMA controller
  *
  * This routine merely does the least possible to keep
  * the transfers going:
@@ -1407,8 +1336,7 @@
 	flags = claim_dma_lock();
 	clear_dma_ff(QIC02_TAPE_DMA);
 	set_dma_mode(QIC02_TAPE_DMA, dma_mode);
-	set_dma_addr(QIC02_TAPE_DMA,
-		     isa_virt_to_bus(buffaddr) + dma_bytes_done);
+	set_dma_addr(QIC02_TAPE_DMA, isa_virt_to_bus(buffaddr) + dma_bytes_done);
 	set_dma_count(QIC02_TAPE_DMA, TAPE_BLKSIZE);
 
 	/* start tape DMA controller */
@@ -1452,13 +1380,12 @@
 /* assume 'bytes_todo'>0 */
 {
 	int stat;
-	unsigned long flags;
 
 	tpqputs(TPQD_DEBUG, "start_dma() enter");
 	TPQDEB( {printk(TPQIC02_NAME ": doing_read==%d, doing_write==%d\n",
 		      doing_read, doing_write);})
 
-	    dma_bytes_done = 0;
+	dma_bytes_done = 0;
 	dma_bytes_todo = bytes_todo;
 	status_error = NO;
 	/* dma_mode!=0 indicates that the dma controller is in use */
@@ -1484,17 +1411,14 @@
 		/* TP_CNI should now be handled in open(). -Hennus */
 #endif
 
-		stat =
-		    tp_sense(((mode ==
-			       WRITE) ? 0 : TP_WRP) | TP_BOM | TP_FIL);
+		stat = tp_sense(((mode == WRITE) ? 0 : TP_WRP) | TP_BOM | TP_FIL);
 		if (stat != TE_OK)
 			return stat;
 
 #if OBSOLETE
 		/************* not needed iff rd_status() would wait for ready!!!!!! **********/
 		if (wait_for_ready(TIM_S) != TE_OK) {	/*** not sure this is needed ***/
-			tpqputs(TPQD_ALWAYS,
-				"wait_for_ready failed in start_dma");
+			tpqputs(TPQD_ALWAYS, "wait_for_ready failed in start_dma");
 			return -EIO;
 		}
 #endif
@@ -1507,11 +1431,9 @@
 		/* Tell the controller the data direction */
 
 		/* r/w, timeout medium, check exceptions, sets status_cmd_pending. */
-		stat = send_qic02_cmd((mode == WRITE) 
-					? QCMD_WRT_DATA : QCMD_RD_DATA, TIM_M, 0);
+		stat = send_qic02_cmd((mode == WRITE) ? QCMD_WRT_DATA : QCMD_RD_DATA, TIM_M, 0);
 		if (stat != TE_OK) {
-			printk(TPQIC02_NAME ": start_dma: init %s failed\n",
-			       (mode == WRITE) ? "write" : "read");
+			printk(TPQIC02_NAME ": start_dma: init %s failed\n", (mode == WRITE) ? "write" : "read");
 			(void) tp_sense(0);
 			return stat;
 		}
@@ -1529,10 +1451,8 @@
 			doing_write = YES;
 			break;
 		default:
-			printk(TPQIC02_NAME
-			       ": requested unknown mode %d\n", mode);
-			panic(TPQIC02_NAME
-			      ": invalid mode in start_dma()");
+			printk(TPQIC02_NAME ": requested unknown mode %d\n", mode);
+			panic(TPQIC02_NAME ": invalid mode in start_dma()");
 		}
 
 	} else if (is_exception()) {
@@ -1541,8 +1461,7 @@
 		 *
 		 * ******** this also affects EOF/EOT handling! ************
 		 */
-		tpqputs(TPQD_ALWAYS,
-			"detected exception in start_dma() while transfer in progress");
+		tpqputs(TPQD_ALWAYS, "detected exception in start_dma() while transfer in progress");
 		status_error = YES;
 		return TE_END;
 	}
@@ -1557,10 +1476,7 @@
 
 	/* initiate first data block read from/write to the tape controller */
 
-	save_flags(flags);
-	cli();
 	dma_transfer();
-	restore_flags(flags);
 
 	TPQPUTS("start_dma() end");
 	return TE_OK;
@@ -1594,7 +1510,6 @@
 	else if (QIC02_TAPE_IFC == ARCHIVE)
 		outb_p(0, AR_RESET_DMA_PORT);
 	else {			/* QIC02_TAPE_IFC == MOUNTAIN */
-
 		/* Clear control bits, de-select ONLINE during tp_sense */
 		ctlbits &= ~MTN_QIC02_CTL_ONLINE;
 	}
@@ -1605,7 +1520,6 @@
 		stat = tp_sense((dma_mode == READ) ? TP_WRP : 0);
 		/* no return here -- got to clean up first! */
 	} else {		/* if (QIC02_TAPE_IFC == MOUNTAIN) */
-
 		outb_p(ctlbits, QIC02_CTL_PORT);
 	}
 
@@ -1718,8 +1632,7 @@
 			 *      - something went wrong
 			 * So don't continue with the next block.
 			 */
-			tpqputs(TPQD_ALWAYS,
-				"isr: exception on tape controller");
+			tpqputs(TPQD_ALWAYS, "isr: exception on tape controller");
 			printk("      status %02x\n", stat);
 			status_error = TE_EX;
 
@@ -1740,16 +1653,14 @@
 		 */
 		if (QIC02_TAPE_IFC == WANGTEK)	/* I think this is a drive-dependency, not IFC -- hhb */
 			if (stat & QIC02_STAT_READY) {	/* not ready */
-				tpqputs(TPQD_ALWAYS,
-					"isr: ? Tape controller not ready");
+				tpqputs(TPQD_ALWAYS, "isr: ? Tape controller not ready");
 				r = 1;
 			}
 
 		flags = claim_dma_lock();
 
 		if ((i = get_dma_residue(QIC02_TAPE_DMA)) != 0) {
-			printk(TPQIC02_NAME ": dma_residue == %x !!!\n",
-			       i);
+			printk(TPQIC02_NAME ": dma_residue == %x !!!\n", i);
 			r = 1;	/* big trouble, but can't do much about it... */
 		}
 
@@ -1774,8 +1685,7 @@
 			dma_transfer();
 		}
 	} else {
-		printk(TPQIC02_NAME ": Unexpected interrupt, stat == %x\n",
-		       inb(QIC02_STAT_PORT));
+		printk(TPQIC02_NAME ": Unexpected interrupt, stat == %x\n", inb(QIC02_STAT_PORT));
 	}
 }				/* qic02_tape_interrupt */
 
@@ -1812,10 +1722,8 @@
  * request would return the EOF flag for the previous file.
  */
 
-static ssize_t qic02_tape_read(struct file *filp, char *buf, size_t count,
-			       loff_t * ppos)
+static ssize_t qic02_tape_read(struct file *filp, char *buf, size_t count, loff_t * ppos)
 {
-	int err;
 	kdev_t dev = filp->f_dentry->d_inode->i_rdev;
 	unsigned short flags = filp->f_flags;
 	unsigned long bytes_todo, bytes_done, total_bytes_done = 0;
@@ -1827,11 +1735,8 @@
 	}
 
 	if (TP_DIAGS(current_tape_dev))
-		/* can't print a ``long long'' (for filp->f_pos), so chop it */
-		printk(TPQIC02_NAME
-		       ": request READ, minor=%x, buf=%p, count=%lx"
-		       ", pos=%lx, flags=%x\n", minor(dev), buf,
-		       (long) count, (unsigned long) filp->f_pos, flags);
+		printk(TPQIC02_NAME ": request READ, minor=%x, buf=%p, count=%lx, pos=%Lx, flags=%x\n", minor(dev), buf,
+		       (long) count, filp->f_pos, flags);
 
 	if (count % TAPE_BLKSIZE) {	/* Only allow mod 512 bytes at a time. */
 		tpqputs(TPQD_BLKSZ, "Wrong block size");
@@ -1858,10 +1763,7 @@
 		/* Must ensure that user program sees exactly one EOF token (==0) */
 		if (return_read_eof == YES) {
 			if (TPQDBG(DEBUG)) {
-				printk
-				    ("read: return_read_eof==%d, reported_read_eof==%d, total_bytes_done==%lu\n",
-				     return_read_eof, reported_read_eof,
-				     total_bytes_done);
+				printk("read: return_read_eof==%d, reported_read_eof==%d, total_bytes_done==%lu\n", return_read_eof, reported_read_eof, total_bytes_done);
 			}
 
 			if (reported_read_eof == NO) {
@@ -1897,7 +1799,6 @@
 			}
 		}
 
-	/*****************************/
 		if (bytes_todo == 0) {
 			return total_bytes_done;
 		}
@@ -1905,9 +1806,7 @@
 		if (bytes_todo > 0) {
 			/* start reading data */
 			if (is_exception()) {
-/****************************************/
-				tpqputs(TPQD_DMAX,
-					"is_exception() before start_dma()!");
+				tpqputs(TPQD_DMAX, "is_exception() before start_dma()!");
 			}
 
 /******************************************************************
@@ -1919,12 +1818,11 @@
 			stat = start_dma(READ, bytes_todo);
 			if (stat == TE_OK) {
 				/* Wait for transfer to complete, interrupt should wake us */
-				while (dma_mode != 0) {
-					sleep_on(&qic02_tape_transfer);
-				}
-				if (status_error) {
+				
+				wait_event(qic02_tape_transfer, dma_mode != 0);
+
+				if (status_error)
 					return_read_eof = YES;
-				}
 
 			} else if (stat != TE_END) {
 				/* should do sense() on error here */
@@ -1938,8 +1836,7 @@
 			}
 			end_dma(&bytes_done);
 			if (bytes_done > bytes_todo) {
-				tpqputs(TPQD_ALWAYS,
-					"read: Oops, read more bytes than requested");
+				tpqputs(TPQD_ALWAYS, "read: Oops, read more bytes than requested");
 				return -EIO;
 			}
 			/* copy buffer to user-space in one go */
@@ -1949,15 +1846,12 @@
 			}
 #if 1
 			/* Checks Ton's patch below */
-			if ((return_read_eof == NO)
-			    && (status_eof_detected == YES)) {
-				printk(TPQIC02_NAME
-				       ": read(): return_read_eof=%d, status_eof_detected=YES. return_read_eof:=YES\n",
+			if ((return_read_eof == NO)  && (status_eof_detected == YES)) {
+				printk(TPQIC02_NAME ": read(): return_read_eof=%d, status_eof_detected=YES. return_read_eof:=YES\n",
 				       return_read_eof);
 			}
 #endif
-			if ((bytes_todo != bytes_done)
-			    || (status_eof_detected == YES)) {
+			if ((bytes_todo != bytes_done) || (status_eof_detected == YES)) {
 				/* EOF or EOM detected. return EOF next time. */
 				return_read_eof = YES;
 			}
@@ -2006,10 +1900,8 @@
  * tape device again. The driver will detect an exception status in (No Cartridge)
  * and force a rewind. After that tar may continue writing.
  */
-static ssize_t qic02_tape_write(struct file *filp, const char *buf,
-				size_t count, loff_t * ppos)
+static ssize_t qic02_tape_write(struct file *filp, const char *buf, size_t count, loff_t * ppos)
 {
-	int err;
 	kdev_t dev = filp->f_dentry->d_inode->i_rdev;
 	unsigned short flags = filp->f_flags;
 	unsigned long bytes_todo, bytes_done, total_bytes_done = 0;
@@ -2020,11 +1912,8 @@
 	}
 
 	if (TP_DIAGS(current_tape_dev)) {
-		/* can't print a ``long long'' (for filp->f_pos), so chop it */
-		printk(TPQIC02_NAME ": request WRITE, minor=%x, buf=%p"
-		       ", count=%lx, pos=%lx, flags=%x\n",
-		       minor(dev), buf,
-		       (long) count, (unsigned long) filp->f_pos, flags);
+		printk(TPQIC02_NAME ": request WRITE, minor=%x, buf=%p, count=%lx, pos=%Lx, flags=%x\n",
+		       minor(dev), buf, (long) count, filp->f_pos, flags);
 	}
 
 	if (count % TAPE_BLKSIZE) {	/* only allow mod 512 bytes at a time */
@@ -2063,8 +1952,7 @@
 
 			if (reported_write_eof == NO) {
 				if (bytes_todo > 0) {
-					tpqputs(TPQD_ALWAYS,
-						"partial write");
+					tpqputs(TPQD_ALWAYS, "partial write");
 					/* partial write signals EOF to user program */
 				}
 				reported_write_eof = YES;
@@ -2091,22 +1979,18 @@
  ***** fail and write() will return ENXIO error
  *****/
 			if (start_dma(WRITE, bytes_todo) != TE_OK) {
-				tpqputs(TPQD_ALWAYS,
-					"write: start_dma() failed");
+				tpqputs(TPQD_ALWAYS, "write: start_dma() failed");
 				/* should do sense() on error here */
 				return -ENXIO;
 				/*********** FIXTHIS **************/
 			}
 
 			/* Wait for write to complete, interrupt should wake us. */
-			while ((status_error == 0) && (dma_mode != 0)) {
-				sleep_on(&qic02_tape_transfer);
-			}
+			wait_event(qic02_tape_transfer, (status_error == 0 && dma_mode != 0));
 
 			end_dma(&bytes_done);
 			if (bytes_done > bytes_todo) {
-				tpqputs(TPQD_ALWAYS,
-					"write: Oops, wrote more bytes than requested");
+				tpqputs(TPQD_ALWAYS, "write: Oops, wrote more bytes than requested");
 				return -EIO;
 			}
 			/* If the dma-transfer was aborted because of an exception,
@@ -2123,13 +2007,11 @@
 			 */
 			if (status_error) {
 				if (status_eom_detected == YES) {
-					tpqputs(TPQD_ALWAYS,
-						"write: EW detected");
+					tpqputs(TPQD_ALWAYS, "write: EW detected");
 					return_write_eof = YES;
 				} else {
 					/* probably EXC_RWA */
-					tpqputs(TPQD_ALWAYS,
-						"write: dma: error in writing");
+					tpqputs(TPQD_ALWAYS, "write: dma: error in writing");
 					return -EIO;
 				}
 			}
@@ -2193,8 +2075,7 @@
 
 
 	if (TP_DIAGS(dev)) {
-		printk("qic02_tape_open: dev=%s, flags=%x     ",
-		       kdevname(dev), flags);
+		printk("qic02_tape_open: dev=%s, flags=%x     ", kdevname(dev), flags);
 	}
 
 	if (minor(dev) == 255) {	/* special case for resetting */
@@ -2210,11 +2091,9 @@
 		return 0;
 	}
 
-	/* Only one at a time from here on... */
-	if (file_count(filp) > 1) {	/* filp->f_count==1 for the first open() */
+	if(test_and_set_bit(0, &tape_open))
 		return -EBUSY;
-	}
-
+		
 	if (status_zombie == YES) {
 		/* no irq/dma/port stuff allocated yet, no reset done
 		 * yet, so return until MTSETCONFIG has been done.
@@ -2256,13 +2135,13 @@
 	if (s == TE_OK) {
 		/* Try to clear cartridge-changed status for Archive-2150L */
 		if ((tperror.exs & TP_ST0) && (tperror.exs & TP_CNI)) {
-			s = tp_sense(TP_WRP | TP_EOM | TP_BOM | TP_CNI |
-				     TP_EOR);
+			s = tp_sense(TP_WRP | TP_EOM | TP_BOM | TP_CNI | TP_EOR);
 		}
 	}
 
 	if (s != TE_OK) {
 		tpqputs(TPQD_ALWAYS, "open: sense() failed");
+		clear_bit(0, &tape_open);
 		return -EIO;
 	}
 
@@ -2272,6 +2151,7 @@
 	 */
 	if ((tperror.exs & TP_ST0) && (tperror.exs & TP_CNI)) {
 		tpqputs(TPQD_ALWAYS, "No tape present.");
+		clear_bit(0, &tape_open);
 		return -EIO;
 	}
 
@@ -2280,15 +2160,13 @@
 	 */
 
 	/* not allowed to do QCMD_DENS_* unless tape is rewound */
-	if ((TP_DENS(dev) != 0)
-	    && (TP_DENS(current_tape_dev) != TP_DENS(dev))) {
+	if ((TP_DENS(dev) != 0) && (TP_DENS(current_tape_dev) != TP_DENS(dev))) {
 		/* force rewind if minor bits have changed,
 		 * i.e. user wants to use tape in different format.
 		 * [assuming single drive operation]
 		 */
 		if (TP_HAVE_DENS) {
-			tpqputs(TPQD_REWIND,
-				"Density minor bits have changed. Forcing rewind.");
+			tpqputs(TPQD_REWIND, "Density minor bits have changed. Forcing rewind.");
 			need_rewind = YES;
 		}
 	} else {
@@ -2318,8 +2196,7 @@
 		} else {
 			status_dead = NO;
 			if (tp_sense(~(TP_ST1 | TP_ILL)) != TE_OK) {
-				tpqputs(TPQD_ALWAYS,
-					"open: tp_sense() failed\n");
+				tpqputs(TPQD_ALWAYS, "open: tp_sense() failed\n");
 				status_dead = YES;	/* try reset next time */
 				return -EIO;
 			}
@@ -2343,12 +2220,10 @@
 		dens = TP_DENS(dev);
 	}
 
-	if (dens < sizeof(format_names) / sizeof(char *)) {
-		printk(TPQIC02_NAME ": format: %s%s\n",
-		       (dens != 0) ? "QIC-" : "", format_names[dens]);
-	} else {
+	if (dens < sizeof(format_names) / sizeof(char *))
+		printk(TPQIC02_NAME ": format: %s%s\n", (dens != 0) ? "QIC-" : "", format_names[dens]);
+	else
 		tpqputs(TPQD_REWIND, "Wait for retensioning...");
-	}
 
 	switch (TP_DENS(dev)) {
 	case 0:		/* Minor 0 is for drives without set-density support */
@@ -2406,12 +2281,12 @@
 		/* Rewind only if minor number requires it AND 
 		 * read/writes have been done. ************* IS THIS CORRECT??????????
 		 */
-		if ((TP_REWCLOSE(dev))
-		    && (status_bytes_rd | status_bytes_wr)) {
+		if ((TP_REWCLOSE(dev)) && (status_bytes_rd | status_bytes_wr)) {
 			tpqputs(TPQD_REWIND, "release: Doing rewind...");
 			(void) do_qic_cmd(QCMD_REWIND, TIM_R);
 		}
 	}
+	clear_bit(0, &tape_open);
 	return 0;
 }				/* qic02_tape_release */
 
@@ -2512,47 +2387,32 @@
 
 
 /* ioctl allows user programs to rewind the tape and stuff like that */
-static int qic02_tape_ioctl(struct inode *inode, struct file *filp,
-			    unsigned int iocmd, unsigned long ioarg)
+static int qic02_tape_ioctl(struct inode *inode, struct file *filp, unsigned int iocmd, unsigned long ioarg)
 {
 	int error;
-	int dev_maj = major(inode->i_rdev);
 	int c;
 	struct mtop operation;
 	unsigned char blk_addr[6];
 	struct mtpos ioctl_tell;
 
 
-	if (TP_DIAGS(current_tape_dev)) {
-		printk(TPQIC02_NAME ": ioctl(%4x, %4x, %4lx)\n", dev_maj,
-		       iocmd, ioarg);
-	}
+	if (TP_DIAGS(current_tape_dev))
+		printk(TPQIC02_NAME ": ioctl(%4x, %4lx)\n", iocmd, ioarg);
 
-	if (!inode || !ioarg) {
+	if (!inode)
 		return -EINVAL;
-	}
 
 	/* check iocmd first */
 
-	if (dev_maj != QIC02_TAPE_MAJOR) {
-		printk(TPQIC02_NAME ": Oops! Wrong device?\n");
-		/* A panic() would be appropriate here */
-		return -ENODEV;
-	}
-
 	c = _IOC_NR(iocmd);
 
 #ifdef CONFIG_QIC02_DYNCONF
 	if (c == _IOC_NR(MTIOCGETCONFIG)) {
 		CHECK_IOC_SIZE(mtconfiginfo);
 
-		if (copy_to_user
-		    ((char *) ioarg, (char *) &qic02_tape_dynconf,
-		     sizeof(qic02_tape_dynconf))) {
+		if (copy_to_user((char *) ioarg, (char *) &qic02_tape_dynconf, sizeof(qic02_tape_dynconf)))
 			return -EFAULT;
-		}
 		return 0;
-
 	} else if (c == _IOC_NR(MTIOCSETCONFIG)) {
 		/* One should always do a MTIOCGETCONFIG first, then update
 		 * user-settings, then write back with MTIOCSETCONFIG.
@@ -2562,24 +2422,19 @@
 
 		CHECK_IOC_SIZE(mtconfiginfo);
 
-		if (!capable(CAP_SYS_ADMIN)) {
+		if (!capable(CAP_SYS_RAWIO))
 			return -EPERM;
-		}
 
-		if ((doing_read != NO) || (doing_write != NO)) {
+		if (doing_read != NO || doing_write != NO)
 			return -EBUSY;
-		}
 
-		if (status_zombie == NO) {
+		if (status_zombie == NO)
 			qic02_release_resources();	/* and go zombie */
-		}
 
 		/* copy struct from user space to kernel space */
-		if (copy_from_user
-		    ((char *) &qic02_tape_dynconf, (char *) ioarg,
-		     sizeof(qic02_tape_dynconf))) {
+		if (copy_from_user((char *) &qic02_tape_dynconf, (char *) ioarg, sizeof(qic02_tape_dynconf)))
 			return -EFAULT;
-		}
+		
 		return update_ifc_masks(qic02_tape_dynconf.ifc_type);
 	}
 	if (status_zombie == YES) {
@@ -2591,11 +2446,8 @@
 		CHECK_IOC_SIZE(mtop);
 
 		/* copy mtop struct from user space to kernel space */
-		if (copy_from_user
-		    ((char *) &operation, (char *) ioarg,
-		     sizeof(operation))) {
+		if (copy_from_user((char *) &operation, (char *) ioarg, sizeof(operation)))
 			return -EFAULT;
-		}
 
 		/* ---note: mt_count is signed, negative seeks must be
 		 * ---      translated to seeks in opposite direction!
@@ -2605,42 +2457,32 @@
 		 * ---      tape at the beginning of the current file.
 		 */
 
-		if (TP_DIAGS(current_tape_dev)) {
-			printk("OP op=%4x, count=%4x\n", operation.mt_op,
-			       operation.mt_count);
-		}
+		if (TP_DIAGS(current_tape_dev))
+			printk("OP op=%4x, count=%4x\n", operation.mt_op, operation.mt_count);
 
-		if (operation.mt_count < 0) {
-			tpqputs(TPQD_ALWAYS,
-				"Warning: negative mt_count ignored");
-		}
+		if (operation.mt_count < 0)
+			tpqputs(TPQD_ALWAYS, "Warning: negative mt_count ignored");
 
 		ioctl_status.mt_resid = operation.mt_count;
 		if (operation.mt_op == MTSEEK) {
-			if (!TP_HAVE_SEEK) {
+			if (!TP_HAVE_SEEK)
 				return -ENOTTY;
-			}
 
-			seek_addr_buf[0] =
-			    (operation.mt_count >> 16) & 0xff;
-			seek_addr_buf[1] =
-			    (operation.mt_count >> 8) & 0xff;
+			seek_addr_buf[0] = (operation.mt_count >> 16) & 0xff;
+			seek_addr_buf[1] = (operation.mt_count >> 8) & 0xff;
 			seek_addr_buf[2] = (operation.mt_count) & 0xff;
-			if (operation.mt_count >> 24) {
+			if (operation.mt_count >> 24)
 				return -EINVAL;
-			}
-			if ((error = do_ioctl_cmd(operation.mt_op)) != 0) {
+			
+			if ((error = do_ioctl_cmd(operation.mt_op)) != 0)
 				return error;
-			}
 
 			ioctl_status.mt_resid = 0;
 		} else {
 			while (operation.mt_count > 0) {
 				operation.mt_count--;
-				if ((error =
-				     do_ioctl_cmd(operation.mt_op)) != 0) {
+				if ((error = do_ioctl_cmd(operation.mt_op)) != 0)
 					return error;
-				}
 
 				ioctl_status.mt_resid = operation.mt_count;
 			}
@@ -2648,9 +2490,8 @@
 		return 0;
 
 	} else if (c == _IOC_NR(MTIOCGET)) {
-		if (TP_DIAGS(current_tape_dev)) {
+		if (TP_DIAGS(current_tape_dev))
 			printk("GET ");
-		}
 
 		CHECK_IOC_SIZE(mtget);
 
@@ -2660,55 +2501,75 @@
 		 */
 
 		/* copy results to user space */
-		if (copy_to_user
-		    ((char *) ioarg, (char *) &ioctl_status,
-		     sizeof(ioctl_status))) {
+		if (copy_to_user((char *) ioarg, (char *) &ioctl_status, sizeof(ioctl_status)))
 			return -EFAULT;
-		}
 		return 0;
 	} else if (TP_HAVE_TELL && (c == _IOC_NR(MTIOCPOS))) {
-		if (TP_DIAGS(current_tape_dev)) {
+		if (TP_DIAGS(current_tape_dev))
 			printk("POS ");
-		}
 
 		CHECK_IOC_SIZE(mtpos);
 
 		tpqputs(TPQD_IOCTLS, "MTTELL reading block address");
-		if ((doing_read == YES) || (doing_write == YES)) {
+		if (doing_read == YES || doing_write == YES)
 			finish_rw(AR_QCMDV_TELL_BLK);
-		}
 
-		c = rdstatus((char *) blk_addr, sizeof(blk_addr),
-			     AR_QCMDV_TELL_BLK);
-		if (c != TE_OK) {
+		c = rdstatus((char *) blk_addr, sizeof(blk_addr), AR_QCMDV_TELL_BLK);
+		if (c != TE_OK)
 			return -EIO;
-		}
 
-		ioctl_tell.mt_blkno =
-		    (blk_addr[3] << 16) | (blk_addr[4] << 8) | blk_addr[5];
+		ioctl_tell.mt_blkno = (blk_addr[3] << 16) | (blk_addr[4] << 8) | blk_addr[5];
 
 		/* copy results to user space */
-		if (copy_to_user
-		    ((char *) ioarg, (char *) &ioctl_tell,
-		     sizeof(ioctl_tell))) {
+		if (copy_to_user((char *) ioarg, (char *) &ioctl_tell, sizeof(ioctl_tell)))
 			return -EFAULT;
-		}
 		return 0;
 
-	} else {
+	} else
 		return -ENOTTY;	/* Other cmds not supported. */
-	}
 }				/* qic02_tape_ioctl */
 
 
+static ssize_t qic02_do_tape_read(struct file *filp, char *buf, size_t count, loff_t * ppos)
+{
+	int err;
+	
+	down(&tape_op);	
+	err = qic02_tape_read(filp, buf, count, ppos);
+	up(&tape_op);
+	
+	return err;
+}
+
+static ssize_t qic02_do_tape_write(struct file *filp, const char *buf, size_t count, loff_t * ppos)
+{
+	int err;
+
+	down(&tape_op);	
+	err = qic02_tape_write(filp, buf, count, ppos);
+	up(&tape_op);
+	
+	return err;
+}
+
+static int qic02_do_tape_ioctl(struct inode *inode, struct file *filp, unsigned int iocmd, unsigned long ioarg)
+{
+	int err;
+	
+	down(&tape_op);	
+	err = qic02_tape_ioctl(inode, filp,  iocmd, ioarg);
+	up(&tape_op);
+	
+	return err;
+}
 
 /* These are (most) of the interface functions: */
 static struct file_operations qic02_tape_fops = {
 	owner:THIS_MODULE,
 	llseek:no_llseek,
-	read:qic02_tape_read,
-	write:qic02_tape_write,
-	ioctl:qic02_tape_ioctl,
+	read:qic02_do_tape_read,
+	write:qic02_do_tape_write,
+	ioctl:qic02_do_tape_ioctl,
 	open:qic02_tape_open,
 	release:qic02_tape_release,
 };
@@ -2719,10 +2580,8 @@
 	free_irq(QIC02_TAPE_IRQ, NULL);
 	free_dma(QIC02_TAPE_DMA);
 	release_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
-	if (buffaddr) {
-		free_pages((unsigned long) buffaddr,
-			   get_order(TPQBUF_SIZE));
-	}
+	if (buffaddr)
+		free_pages((unsigned long) buffaddr, get_order(TPQBUF_SIZE));
 	buffaddr = 0;		/* Better to cause a panic than overwite someone else */
 	status_zombie = YES;
 }				/* qic02_release_resources */
@@ -2733,49 +2592,35 @@
 	/* First perform some checks. If one of them fails,
 	 * the tape driver will not be registered to the system.
 	 */
-	if (QIC02_TAPE_IRQ > 16) {
-		tpqputs(TPQD_ALWAYS, "Bogus interrupt number.");
-		return -ENXIO;
-	}
 
 	/* for DYNCONF, allocating IO, DMA and IRQ should not be done until 
 	 * the config parameters have been set using MTSETCONFIG.
 	 */
 
 	/* Grab the IO region. */
-	if (!request_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE,
-			   TPQIC02_NAME)) {
-		printk(TPQIC02_NAME
-		       ": IO space at 0x%x [%d ports] already reserved\n",
+	if (!request_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE, TPQIC02_NAME)) {
+		printk(TPQIC02_NAME ": IO space at 0x%x [%d ports] already reserved\n",
 		       QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
 		return -ENXIO;
 	}
 
 	/* get IRQ */
-	if (request_irq
-	    (QIC02_TAPE_IRQ, qic02_tape_interrupt, SA_INTERRUPT, "QIC-02",
-	     NULL)) {
-		printk(TPQIC02_NAME
-		       ": can't allocate IRQ%d for QIC-02 tape\n",
-		       QIC02_TAPE_IRQ);
+	if (request_irq(QIC02_TAPE_IRQ, qic02_tape_interrupt, SA_INTERRUPT, "QIC-02", NULL)) {
+		printk(TPQIC02_NAME ": can't allocate IRQ%d for QIC-02 tape\n", QIC02_TAPE_IRQ);
 		release_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
 		return -EBUSY;
 	}
 
 	/* After IRQ, allocate DMA channel */
 	if (request_dma(QIC02_TAPE_DMA, "QIC-02")) {
-		printk(TPQIC02_NAME
-		       ": can't allocate DMA%d for QIC-02 tape\n",
-		       QIC02_TAPE_DMA);
+		printk(TPQIC02_NAME ": can't allocate DMA%d for QIC-02 tape\n", QIC02_TAPE_DMA);
 		free_irq(QIC02_TAPE_IRQ, NULL);
 		release_region(QIC02_TAPE_PORT, QIC02_TAPE_PORT_RANGE);
 		return -EBUSY;
 	}
 
 	/* Setup the page-address for the dma transfer. */
-	buffaddr =
-	    (void *) __get_dma_pages(GFP_KERNEL, get_order(TPQBUF_SIZE));
-
+	buffaddr = (void *) __get_dma_pages(GFP_KERNEL, get_order(TPQBUF_SIZE));
 	if (!buffaddr) {
 		qic02_release_resources();
 		return -EBUSY;	/* Not ideal, EAGAIN perhaps? */
@@ -2783,8 +2628,7 @@
 
 	memset(buffaddr, 0, TPQBUF_SIZE);
 
-	printk(TPQIC02_NAME
-	       ": Settings: IRQ %d, DMA %d, IO 0x%x, IFC %s\n",
+	printk(TPQIC02_NAME ": Settings: IRQ %d, DMA %d, IO 0x%x, IFC %s\n",
 	       QIC02_TAPE_IRQ, QIC02_TAPE_DMA, ((QIC02_TAPE_IFC == ARCHIVE)
 						|| (QIC02_TAPE_IFC ==
 						    MOUNTAIN)) ?
@@ -2794,11 +2638,9 @@
 					   ARCHIVE) ? "Archive" :
 					  "Wangtek"));
 
-	if (tape_reset(0) != TE_OK
-	    || tp_sense(TP_WRP | TP_POR | TP_CNI) != TE_OK) {
+	if (tape_reset(0) != TE_OK || tp_sense(TP_WRP | TP_POR | TP_CNI) != TE_OK) {
 		/* No drive detected, so vanish */
-		tpqputs(TPQD_ALWAYS,
-			"No drive detected -- releasing IO/IRQ/DMA.");
+		tpqputs(TPQD_ALWAYS, "No drive detected -- releasing IO/IRQ/DMA.");
 		status_dead = YES;
 		qic02_release_resources();
 		return -EIO;
@@ -2812,13 +2654,11 @@
 int __init qic02_tape_init(void)
 {
 	if (TPSTATSIZE != 6) {
-		printk(TPQIC02_NAME
-		       ": internal error: tpstatus struct incorrect!\n");
+		printk(TPQIC02_NAME ": internal error: tpstatus struct incorrect!\n");
 		return -ENODEV;
 	}
 	if ((TPQBUF_SIZE < 512) || (TPQBUF_SIZE >= 0x10000)) {
-		printk(TPQIC02_NAME
-		       ": internal error: DMA buffer size out of range\n");
+		printk(TPQIC02_NAME ": internal error: DMA buffer size out of range\n");
 		return -ENODEV;
 	}
 
@@ -2837,19 +2677,16 @@
 #  error
 # endif
 	       rcs_revision, rcs_date);
-	if (qic02_get_resources()) {
+	if (qic02_get_resources())
 		return -ENODEV;
-	}
 #else
-	printk(TPQIC02_NAME ": Runtime config, %s, %s\n",
-	       rcs_revision, rcs_date);
+	printk(TPQIC02_NAME ": Runtime config, %s, %s\n", rcs_revision, rcs_date);
 #endif
 	printk(TPQIC02_NAME ": DMA buffers: %u blocks\n", NR_BLK_BUF);
 	/* If we got this far, install driver functions */
-	if (register_chrdev
-	    (QIC02_TAPE_MAJOR, TPQIC02_NAME, &qic02_tape_fops)) {
-		printk(TPQIC02_NAME ": Unable to get chrdev major %d\n",
-		       QIC02_TAPE_MAJOR);
+	if (register_chrdev(QIC02_TAPE_MAJOR, TPQIC02_NAME, &qic02_tape_fops)) 
+	{
+		printk(TPQIC02_NAME ": Unable to get chrdev major %d\n", QIC02_TAPE_MAJOR);
 #ifndef CONFIG_QIC02_DYNCONF
 		qic02_release_resources();
 #endif
@@ -2894,11 +2731,9 @@
 	tp_timer.function = qic02_tape_times_out;
 
 #ifndef CONFIG_QIC02_DYNCONF
-	if (tape_reset(0) != TE_OK
-	    || tp_sense(TP_WRP | TP_POR | TP_CNI) != TE_OK) {
+	if (tape_reset(0) != TE_OK || tp_sense(TP_WRP | TP_POR | TP_CNI) != TE_OK) {
 		/* No drive detected, so vanish */
-		tpqputs(TPQD_ALWAYS,
-			"No drive detected -- driver going on vacation...");
+		tpqputs(TPQD_ALWAYS, "No drive detected -- driver going on vacation...");
 		qic02_release_resources();
 		status_dead = YES;
 		return -ENODEV;
@@ -2927,10 +2762,10 @@
 
 void cleanup_module(void)
 {
-	if (status_zombie == NO) {
-		qic02_release_resources();
-	}
 	unregister_chrdev(QIC02_TAPE_MAJOR, TPQIC02_NAME);
+	if (status_zombie == NO)
+		qic02_release_resources();
+		
 	devfs_find_and_unregister(NULL, "ntpqic11", QIC02_TAPE_MAJOR, 2,
 				  DEVFS_SPECIAL_CHR, 0);
 	devfs_find_and_unregister(NULL, "tpqic11", QIC02_TAPE_MAJOR, 3,
diff -Nru a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c
--- a/drivers/char/vme_scc.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/char/vme_scc.c	Wed Oct 30 16:44:17 2002
@@ -29,7 +29,6 @@
 #include <linux/fcntl.h>
 #include <linux/major.h>
 #include <linux/delay.h>
-#include <linux/tqueue.h>
 #include <linux/version.h>
 #include <linux/slab.h>
 #include <linux/miscdevice.h>
diff -Nru a/drivers/fc4/Config.help b/drivers/fc4/Config.help
--- a/drivers/fc4/Config.help	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,57 +0,0 @@
-CONFIG_FC4
-  Fibre Channel is a high speed serial protocol mainly used to
-  connect large storage devices to the computer; it is compatible with
-  and intended to replace SCSI.
-
-  This is an experimental support for storage arrays connected to your
-  computer using optical fibre cables and the "X3.269-199X Fibre
-  Channel Protocol for SCSI" specification. If you want to use this,
-  you need to say Y here and to "SCSI support" as well as to the
-  drivers for the storage array itself and for the interface adapter
-  such as SOC or SOC+. This subsystem could even serve for IP
-  networking, with some code extensions.
-
-  If unsure, say N.
-
-CONFIG_FC4_SOC
-  Serial Optical Channel is an interface card with one or two Fibre
-  Optic ports, each of which can be connected to a disk array. Note
-  that if you have older firmware in the card, you'll need the
-  microcode from the Solaris driver to make it work.
-
-  This support is also available as a module called soc.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_FC4_SOCAL
-  Serial Optical Channel Plus is an interface card with up to two
-  Fibre Optic ports. This card supports FC Arbitrated Loop (usually
-  A5000 or internal FC disks in E[3-6]000 machines through the
-  Interface Board). You'll probably need the microcode from the
-  Solaris driver to make it work.
-
-  This support is also available as a module called socal.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_PLUTO
-  If you never bought a disk array made by Sun, go with N.
-
-  This support is also available as a module called pluto.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_FCAL
-  This driver drives FC-AL disks connected through a Fibre Channel
-  card using the drivers/fc4 layer (currently only SOCAL). The most
-  common is either A5000 array or internal disks in E[3-6]000
-  machines.
-
-  This support is also available as a module called fcal.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>. If unsure, say N.
-
diff -Nru a/drivers/fc4/Config.in b/drivers/fc4/Config.in
--- a/drivers/fc4/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-#
-# FC4 device configuration
-#
-mainmenu_option next_comment
-comment 'Fibre Channel support'
-
-tristate 'Fibre Channel and FC4 SCSI support' CONFIG_FC4
-if [ ! "$CONFIG_FC4" = "n" ]; then
-   comment 'FC4 drivers'
-   if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-      tristate 'Sun SOC/Sbus' CONFIG_FC4_SOC
-      tristate 'Sun SOC+ (aka SOCAL)' CONFIG_FC4_SOCAL
-   fi
-   comment 'FC4 targets'
-   dep_tristate 'SparcSTORAGE Array 100 and 200 series' CONFIG_SCSI_PLUTO $CONFIG_SCSI
-   if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-      dep_tristate 'Sun Enterprise Network Array (A5000 and EX500)' CONFIG_SCSI_FCAL $CONFIG_SCSI
-   else
-      dep_tristate 'Generic FC-AL disk driver' CONFIG_SCSI_FCAL $CONFIG_SCSI
-   fi
-else
-   define_tristate CONFIG_FC4_SOC n
-   define_tristate CONFIG_FC4_SOCAL n
-   define_tristate CONFIG_SCSI_PLUTO n
-   define_tristate CONFIG_SCSI_FCAL n
-fi
-endmenu
diff -Nru a/drivers/fc4/Kconfig b/drivers/fc4/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/fc4/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,89 @@
+#
+# FC4 device configuration
+#
+
+menu "Fibre Channel support"
+
+config FC4
+	tristate "Fibre Channel and FC4 SCSI support"
+	---help---
+	  Fibre Channel is a high speed serial protocol mainly used to
+	  connect large storage devices to the computer; it is compatible with
+	  and intended to replace SCSI.
+
+	  This is an experimental support for storage arrays connected to your
+	  computer using optical fibre cables and the "X3.269-199X Fibre
+	  Channel Protocol for SCSI" specification. If you want to use this,
+	  you need to say Y here and to "SCSI support" as well as to the
+	  drivers for the storage array itself and for the interface adapter
+	  such as SOC or SOC+. This subsystem could even serve for IP
+	  networking, with some code extensions.
+
+	  If unsure, say N.
+
+comment "FC4 drivers"
+	depends on FC4
+
+config FC4_SOC
+	tristate "Sun SOC/Sbus"
+	depends on FC4!=n && (SPARC32 || SPARC64)
+	help
+	  Serial Optical Channel is an interface card with one or two Fibre
+	  Optic ports, each of which can be connected to a disk array. Note
+	  that if you have older firmware in the card, you'll need the
+	  microcode from the Solaris driver to make it work.
+
+	  This support is also available as a module called soc.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config FC4_SOCAL
+	tristate "Sun SOC+ (aka SOCAL)"
+	depends on FC4!=n && (SPARC32 || SPARC64)
+	---help---
+	  Serial Optical Channel Plus is an interface card with up to two
+	  Fibre Optic ports. This card supports FC Arbitrated Loop (usually
+	  A5000 or internal FC disks in E[3-6]000 machines through the
+	  Interface Board). You'll probably need the microcode from the
+	  Solaris driver to make it work.
+
+	  This support is also available as a module called socal.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+comment "FC4 targets"
+	depends on FC4
+
+config SCSI_PLUTO
+	tristate "SparcSTORAGE Array 100 and 200 series"
+	depends on FC4!=n && SCSI
+	help
+	  If you never bought a disk array made by Sun, go with N.
+
+	  This support is also available as a module called pluto.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SCSI_FCAL
+	tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC64
+	depends on FC4!=n && SCSI
+	help
+	  This driver drives FC-AL disks connected through a Fibre Channel
+	  card using the drivers/fc4 layer (currently only SOCAL). The most
+	  common is either A5000 array or internal disks in E[3-6]000
+	  machines.
+
+	  This support is also available as a module called fcal.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>. If unsure, say N.
+
+config SCSI_FCAL
+	prompt "Generic FC-AL disk driver"
+	depends on FC4!=n && SCSI && !SPARC32 && !SPARC64
+
+endmenu
+
diff -Nru a/drivers/fc4/fc.c b/drivers/fc4/fc.c
--- a/drivers/fc4/fc.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/fc4/fc.c	Wed Oct 30 16:44:29 2002
@@ -885,12 +885,6 @@
 	}
 }
 
-int fcp_old_abort(Scsi_Cmnd *SCpnt)
-{
-	printk("FC: Abort not implemented\n");
-	return 1;
-}
-
 int fcp_scsi_abort(Scsi_Cmnd *SCpnt)
 {
 	/* Internal bookkeeping only. Lose 1 cmd_slots slot. */
diff -Nru a/drivers/fc4/fc_syms.c b/drivers/fc4/fc_syms.c
--- a/drivers/fc4/fc_syms.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/fc4/fc_syms.c	Wed Oct 30 16:44:26 2002
@@ -26,7 +26,6 @@
 
 /* SCSI stuff */
 EXPORT_SYMBOL(fcp_scsi_queuecommand);
-EXPORT_SYMBOL(fcp_old_abort);
 EXPORT_SYMBOL(fcp_scsi_abort);
 EXPORT_SYMBOL(fcp_scsi_dev_reset);
 EXPORT_SYMBOL(fcp_scsi_bus_reset);
diff -Nru a/drivers/fc4/fcp_impl.h b/drivers/fc4/fcp_impl.h
--- a/drivers/fc4/fcp_impl.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/fc4/fcp_impl.h	Wed Oct 30 16:44:28 2002
@@ -157,7 +157,6 @@
 		if (fc->state == FC_STATE_ONLINE)
 
 int fcp_scsi_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
-int fcp_old_abort(Scsi_Cmnd *);
 int fcp_scsi_abort(Scsi_Cmnd *);
 int fcp_scsi_dev_reset(Scsi_Cmnd *);
 int fcp_scsi_bus_reset(Scsi_Cmnd *);
diff -Nru a/drivers/hotplug/Config.help b/drivers/hotplug/Config.help
--- a/drivers/hotplug/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,42 +0,0 @@
-CONFIG_HOTPLUG_PCI
-  Say Y here if you have a motherboard with a PCI Hotplug controller.
-  This allows you to add and remove PCI cards while the machine is
-  powered up and running.  The file system pcihpfs must be mounted
-  in order to interact with any PCI Hotplug controllers.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called pci_hotplug.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  When in doubt, say N.
-
-CONFIG_HOTPLUG_PCI_COMPAQ
-  Say Y here if you have a motherboard with a Compaq PCI Hotplug
-  controller.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cpqphp.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  When in doubt, say N.
-
-CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM
-  Say Y here if you have a Compaq server that has a PCI Hotplug
-  controller.  This will allow the PCI Hotplug driver to store the PCI
-  system configuration options in NVRAM.
-
-  When in doubt, say N.
-
-CONFIG_HOTPLUG_PCI_IBM
-  Say Y here if you have a motherboard with a IBM PCI Hotplug
-  controller.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cpqphp.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  When in doubt, say N.
-
diff -Nru a/drivers/hotplug/Config.in b/drivers/hotplug/Config.in
--- a/drivers/hotplug/Config.in	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,15 +0,0 @@
-#
-# PCI Hotplug support
-#
-mainmenu_option next_comment
-comment 'PCI Hotplug Support'
-
-dep_tristate 'Support for PCI Hotplug (EXPERIMENTAL)' CONFIG_HOTPLUG_PCI $CONFIG_PCI $CONFIG_EXPERIMENTAL 
-
-dep_tristate '  Compaq PCI Hotplug driver' CONFIG_HOTPLUG_PCI_COMPAQ $CONFIG_HOTPLUG_PCI $CONFIG_X86
-dep_mbool '    Save configuration into NVRAM on Compaq servers' CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM $CONFIG_HOTPLUG_PCI_COMPAQ
-if [ "$CONFIG_X86_IO_APIC" = "y" ]; then
-   dep_tristate '  IBM PCI Hotplug driver' CONFIG_HOTPLUG_PCI_IBM $CONFIG_HOTPLUG_PCI $CONFIG_X86_IO_APIC $CONFIG_X86
-fi
-
-endmenu
diff -Nru a/drivers/hotplug/Kconfig b/drivers/hotplug/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/hotplug/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,77 @@
+#
+# PCI Hotplug support
+#
+
+menu "PCI Hotplug Support"
+	depends on HOTPLUG
+
+config HOTPLUG_PCI
+	tristate "Support for PCI Hotplug (EXPERIMENTAL)"
+	depends on PCI && EXPERIMENTAL
+	---help---
+	  Say Y here if you have a motherboard with a PCI Hotplug controller.
+	  This allows you to add and remove PCI cards while the machine is
+	  powered up and running.  The file system pcihpfs must be mounted
+	  in order to interact with any PCI Hotplug controllers.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called pci_hotplug.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  When in doubt, say N.
+
+config HOTPLUG_PCI_COMPAQ
+	tristate "Compaq PCI Hotplug driver"
+	depends on HOTPLUG_PCI && X86
+	help
+	  Say Y here if you have a motherboard with a Compaq PCI Hotplug
+	  controller.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called cpqphp.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  When in doubt, say N.
+
+config HOTPLUG_PCI_COMPAQ_NVRAM
+	bool "Save configuration into NVRAM on Compaq servers"
+	depends on HOTPLUG_PCI_COMPAQ
+	help
+	  Say Y here if you have a Compaq server that has a PCI Hotplug
+	  controller.  This will allow the PCI Hotplug driver to store the PCI
+	  system configuration options in NVRAM.
+
+	  When in doubt, say N.
+
+config HOTPLUG_PCI_IBM
+	tristate "IBM PCI Hotplug driver"
+	depends on HOTPLUG_PCI && X86_IO_APIC && X86
+	help
+	  Say Y here if you have a motherboard with a IBM PCI Hotplug
+	  controller.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called cpqphp.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  When in doubt, say N.
+
+config HOTPLUG_PCI_ACPI
+	tristate "ACPI PCI Hotplug driver"
+	depends on ACPI && HOTPLUG_PCI
+	help
+	  Say Y here if you have a system that supports PCI Hotplug using
+	  ACPI.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called acpiphp.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  When in doubt, say N.
+
+endmenu
+
diff -Nru a/drivers/hotplug/Makefile b/drivers/hotplug/Makefile
--- a/drivers/hotplug/Makefile	Wed Oct 30 16:44:30 2002
+++ b/drivers/hotplug/Makefile	Wed Oct 30 16:44:30 2002
@@ -7,6 +7,7 @@
 obj-$(CONFIG_HOTPLUG_PCI)		+= pci_hotplug.o
 obj-$(CONFIG_HOTPLUG_PCI_COMPAQ)	+= cpqphp.o
 obj-$(CONFIG_HOTPLUG_PCI_IBM)		+= ibmphp.o
+obj-$(CONFIG_HOTPLUG_PCI_ACPI)		+= acpiphp.o
 
 pci_hotplug-objs	:=	pci_hotplug_core.o	\
 				pci_hotplug_util.o
@@ -21,6 +22,18 @@
 				ibmphp_pci.o	\
 				ibmphp_res.o	\
 				ibmphp_hpc.o
+
+acpiphp-objs		:=	acpiphp_core.o	\
+				acpiphp_glue.o	\
+				acpiphp_pci.o	\
+				acpiphp_res.o
+
+ifdef CONFIG_HOTPLUG_PCI_ACPI
+  EXTRA_CFLAGS  += -D_LINUX -I$(TOPDIR)/drivers/acpi
+  ifdef CONFIG_ACPI_DEBUG
+    EXTRA_CFLAGS += -DACPI_DEBUG_OUTPUT
+  endif
+endif
 
 ifeq ($(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM),y)
 	cpqphp-objs += cpqphp_nvram.o
diff -Nru a/drivers/hotplug/acpiphp.h b/drivers/hotplug/acpiphp.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/hotplug/acpiphp.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,263 @@
+/*
+ * ACPI PCI Hot Plug Controller Driver
+ *
+ * Copyright (c) 1995,2001 Compaq Computer Corporation
+ * Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com)
+ * Copyright (c) 2001 IBM Corp.
+ * Copyright (c) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
+ * Copyright (c) 2002 Takayoshi Kochi (t-kouchi@cq.jp.nec.com)
+ * Copyright (c) 2002 NEC Corporation
+ *
+ * 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.
+ *
+ * Send feedback to <gregkh@us.ibm.com>,
+ *		    <h-aono@ap.jp.nec.com>,
+ *		    <t-kouchi@cq.jp.nec.com>
+ *
+ */
+
+#ifndef _ACPIPHP_H
+#define _ACPIPHP_H
+
+#include "include/acpi.h"
+#include "pci_hotplug.h"
+#include "acpi_bus.h"
+
+#define dbg(format, arg...)					\
+	do {							\
+		if (acpiphp_debug)				\
+			printk (KERN_DEBUG "%s: " format "\n",	\
+				MY_NAME , ## arg); 		\
+	} while (0)
+#define err(format, arg...) printk (KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
+#define info(format, arg...) printk (KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
+#define warn(format, arg...) printk (KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
+
+#define SLOT_MAGIC	0x67267322
+/* name size which is used for entries in pcihpfs */
+#define SLOT_NAME_SIZE	32		/* ACPI{_SUN}-{BUS}:{DEV} */
+
+struct acpiphp_bridge;
+struct acpiphp_slot;
+struct pci_resource;
+
+/*
+ * struct slot - slot information for each *physical* slot
+ */
+struct slot {
+	u32 magic;
+	u8 number;
+	struct hotplug_slot	*hotplug_slot;
+	struct list_head	slot_list;
+
+	struct acpiphp_slot	*acpi_slot;
+};
+
+/*
+ * struct pci_resource - describes pci resource (mem, pfmem, io, bus)
+ */
+struct pci_resource {
+	struct pci_resource * next;
+	u64 base;
+	u32 length;
+};
+
+/**
+ * struct hpp_param - ACPI 2.0 _HPP Hot Plug Parameters
+ * @cache_line_size in DWORD
+ * @latency_timer in PCI clock
+ * @enable_SERR 0 or 1
+ * @enable_PERR 0 or 1
+ */
+struct hpp_param {
+	u8 cache_line_size;
+	u8 latency_timer;
+	u8 enable_SERR;
+	u8 enable_PERR;
+};
+
+
+/**
+ * struct acpiphp_bridge - PCI bridge information
+ *
+ * for each bridge device in ACPI namespace
+ */
+struct acpiphp_bridge {
+	struct list_head list;
+	acpi_handle handle;
+	struct acpiphp_slot *slots;
+	int type;
+	int nr_slots;
+
+	u8 seg;
+	u8 bus;
+	u8 sub;
+
+	u32 flags;
+
+	/* This bus (host bridge) or Secondary bus (PCI-to-PCI bridge) */
+	struct pci_bus *pci_bus;
+
+	/* PCI-to-PCI bridge device */
+	struct pci_dev *pci_dev;
+
+	/* ACPI 2.0 _HPP parameters */
+	struct hpp_param hpp;
+
+	spinlock_t res_lock;
+
+	/* available resources on this bus */
+	struct pci_resource *mem_head;
+	struct pci_resource *p_mem_head;
+	struct pci_resource *io_head;
+	struct pci_resource *bus_head;
+};
+
+
+/**
+ * struct acpiphp_slot - PCI slot information
+ *
+ * PCI slot information for each *physical* PCI slot
+ */
+struct acpiphp_slot {
+	struct acpiphp_slot *next;
+	struct acpiphp_bridge *bridge;	/* parent */
+	struct list_head funcs;		/* one slot may have different
+					   objects (i.e. for each function) */
+	struct semaphore crit_sect;
+
+	u32		id;		/* slot id (serial #) for hotplug core */
+	u8		device;		/* pci device# */
+
+	u32		sun;		/* ACPI _SUN (slot unique number) */
+	u32		slotno;		/* slot number relative to bridge */
+	u32		flags;		/* see below */
+};
+
+
+/**
+ * struct acpiphp_func - PCI function information
+ *
+ * PCI function information for each object in ACPI namespace
+ * typically 8 objects per slot (i.e. for each PCI function)
+ */
+struct acpiphp_func {
+	struct acpiphp_slot *slot;	/* parent */
+
+	struct list_head sibling;
+	struct pci_dev *pci_dev;
+
+	acpi_handle	handle;
+
+	u8		function;	/* pci function# */
+	u32		flags;		/* see below */
+
+	/* resources used for this function */
+	struct pci_resource *mem_head;
+	struct pci_resource *p_mem_head;
+	struct pci_resource *io_head;
+	struct pci_resource *bus_head;
+};
+
+
+/* PCI bus bridge HID */
+#define ACPI_PCI_HOST_HID		"PNP0A03"
+
+/* PCI BRIDGE type */
+#define BRIDGE_TYPE_HOST		0
+#define BRIDGE_TYPE_P2P			1
+
+/* ACPI _STA method value (ignore bit 4; battery present) */
+#define ACPI_STA_PRESENT		(0x00000001)
+#define ACPI_STA_ENABLED		(0x00000002)
+#define ACPI_STA_SHOW_IN_UI		(0x00000004)
+#define ACPI_STA_FUNCTIONING		(0x00000008)
+#define ACPI_STA_ALL			(0x0000000f)
+
+/* bridge flags */
+#define BRIDGE_HAS_STA		(0x00000001)
+#define BRIDGE_HAS_EJ0		(0x00000002)
+#define BRIDGE_HAS_HPP		(0x00000004)
+#define BRIDGE_HAS_PS0		(0x00000010)
+#define BRIDGE_HAS_PS1		(0x00000020)
+#define BRIDGE_HAS_PS2		(0x00000040)
+#define BRIDGE_HAS_PS3		(0x00000080)
+
+/* slot flags */
+
+#define SLOT_POWEREDON		(0x00000001)
+#define SLOT_ENABLED		(0x00000002)
+#define SLOT_MULTIFUNCTION	(x000000004)
+
+/* function flags */
+
+#define FUNC_HAS_STA		(0x00000001)
+#define FUNC_HAS_EJ0		(0x00000002)
+#define FUNC_HAS_PS0		(0x00000010)
+#define FUNC_HAS_PS1		(0x00000020)
+#define FUNC_HAS_PS2		(0x00000040)
+#define FUNC_HAS_PS3		(0x00000080)
+
+/* not yet */
+#define SLOT_SUPPORT_66MHZ	(0x00010000)
+#define SLOT_SUPPORT_100MHZ	(0x00020000)
+#define SLOT_SUPPORT_133MHZ	(0x00040000)
+#define SLOT_SUPPORT_PCIX	(0x00080000)
+
+/* function prototypes */
+
+/* acpiphp_glue.c */
+extern int acpiphp_glue_init (void);
+extern void acpiphp_glue_exit (void);
+extern int acpiphp_get_num_slots (void);
+extern struct acpiphp_slot *get_slot_from_id (int id);
+typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
+extern int acpiphp_for_each_slot (acpiphp_callback fn, void *data);
+
+extern int acpiphp_check_bridge (struct acpiphp_bridge *bridge);
+extern int acpiphp_enable_slot (struct acpiphp_slot *slot);
+extern int acpiphp_disable_slot (struct acpiphp_slot *slot);
+extern u8 acpiphp_get_power_status (struct acpiphp_slot *slot);
+extern u8 acpiphp_get_attention_status (struct acpiphp_slot *slot);
+extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot);
+extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
+
+/* acpiphp_pci.c */
+extern struct pci_dev *acpiphp_allocate_pcidev (struct pci_bus *pbus, int dev, int fn);
+extern int acpiphp_configure_slot (struct acpiphp_slot *slot);
+extern int acpiphp_configure_function (struct acpiphp_func *func);
+extern int acpiphp_unconfigure_function (struct acpiphp_func *func);
+extern int acpiphp_detect_pci_resource (struct acpiphp_bridge *bridge);
+extern int acpiphp_init_func_resource (struct acpiphp_func *func);
+
+/* acpiphp_res.c */
+extern struct pci_resource *acpiphp_get_io_resource (struct pci_resource **head, u32 size);
+extern struct pci_resource *acpiphp_get_max_resource (struct pci_resource **head, u32 size);
+extern struct pci_resource *acpiphp_get_resource (struct pci_resource **head, u32 size);
+extern struct pci_resource *acpiphp_get_resource_with_base (struct pci_resource **head, u64 base, u32 size);
+extern int acpiphp_resource_sort_and_combine (struct pci_resource **head);
+extern struct pci_resource *acpiphp_make_resource (u64 base, u32 length);
+extern void acpiphp_move_resource (struct pci_resource **from, struct pci_resource **to);
+extern void acpiphp_free_resource (struct pci_resource **res);
+extern void acpiphp_dump_resource (struct acpiphp_bridge *bridge); /* debug */
+extern void acpiphp_dump_func_resource (struct acpiphp_func *func); /* debug */
+
+/* variables */
+extern int acpiphp_debug;
+
+#endif /* _ACPIPHP_H */
diff -Nru a/drivers/hotplug/acpiphp_core.c b/drivers/hotplug/acpiphp_core.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/hotplug/acpiphp_core.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,502 @@
+/*
+ * ACPI PCI Hot Plug Controller Driver
+ *
+ * Copyright (c) 1995,2001 Compaq Computer Corporation
+ * Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com)
+ * Copyright (c) 2001 IBM Corp.
+ * Copyright (c) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
+ * Copyright (c) 2002 Takayoshi Kochi (t-kouchi@cq.jp.nec.com)
+ * Copyright (c) 2002 NEC Corporation
+ *
+ * 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.
+ *
+ * Send feedback to <gregkh@us.ibm.com>,
+ *                  <h-aono@ap.jp.nec.com>,
+ *		    <t-kouchi@cq.jp.nec.com>
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include "pci_hotplug.h"
+#include "acpiphp.h"
+
+static LIST_HEAD(slot_list);
+
+#if !defined(CONFIG_HOTPLUG_PCI_ACPI_MODULE)
+	#define MY_NAME	"acpiphp"
+#else
+	#define MY_NAME	THIS_MODULE->name
+#endif
+
+int acpiphp_debug;
+
+/* local variables */
+static int num_slots;
+
+#define DRIVER_VERSION	"0.4"
+#define DRIVER_AUTHOR	"Greg Kroah-Hartman <gregkh@us.ibm.com>, Takayoshi Kochi <t-kouchi@cq.jp.nec.com>"
+#define DRIVER_DESC	"ACPI Hot Plug PCI Controller Driver"
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE("GPL");
+MODULE_PARM(acpiphp_debug, "i");
+MODULE_PARM_DESC(acpiphp_debug, "Debugging mode enabled or not");
+
+static int enable_slot		(struct hotplug_slot *slot);
+static int disable_slot		(struct hotplug_slot *slot);
+static int set_attention_status (struct hotplug_slot *slot, u8 value);
+static int hardware_test	(struct hotplug_slot *slot, u32 value);
+static int get_power_status	(struct hotplug_slot *slot, u8 *value);
+static int get_attention_status	(struct hotplug_slot *slot, u8 *value);
+static int get_latch_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 get_cur_bus_speed	(struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value);
+
+static struct hotplug_slot_ops acpi_hotplug_slot_ops = {
+	.owner			= THIS_MODULE,
+	.enable_slot		= enable_slot,
+	.disable_slot		= disable_slot,
+	.set_attention_status	= set_attention_status,
+	.hardware_test		= hardware_test,
+	.get_power_status	= get_power_status,
+	.get_attention_status	= get_attention_status,
+	.get_latch_status	= get_latch_status,
+	.get_adapter_status	= get_adapter_status,
+	.get_max_bus_speed	= get_max_bus_speed,
+	.get_cur_bus_speed	= get_cur_bus_speed,
+};
+
+
+/* Inline functions to check the sanity of a pointer that is passed to us */
+static inline int slot_paranoia_check (struct slot *slot, const char *function)
+{
+	if (!slot) {
+		dbg("%s - slot == NULL", function);
+		return -1;
+	}
+	if (slot->magic != SLOT_MAGIC) {
+		dbg("%s - bad magic number for slot", function);
+		return -1;
+	}
+	if (!slot->hotplug_slot) {
+		dbg("%s - slot->hotplug_slot == NULL!", function);
+		return -1;
+	}
+	return 0;
+}
+
+
+static inline struct slot *get_slot (struct hotplug_slot *hotplug_slot, const char *function)
+{ 
+	struct slot *slot;
+
+	if (!hotplug_slot) {
+		dbg("%s - hotplug_slot == NULL", function);
+		return NULL;
+	}
+
+	slot = (struct slot *)hotplug_slot->private;
+	if (slot_paranoia_check (slot, function))
+                return NULL;
+	return slot;
+}
+
+
+/**
+ * enable_slot - power on and enable a slot
+ * @hotplug_slot: slot to enable
+ *
+ * Actual tasks are done in acpiphp_enable_slot()
+ *
+ */
+static int enable_slot (struct hotplug_slot *hotplug_slot)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	int retval = 0;
+	
+	if (slot == NULL)
+		return -ENODEV;
+
+	dbg ("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	/* enable the specified slot */
+	retval = acpiphp_enable_slot (slot->acpi_slot);
+
+	return retval;
+}
+
+
+/**
+ * disable_slot - disable and power off a slot
+ * @hotplug_slot: slot to disable
+ *
+ * Actual tasks are done in acpiphp_disable_slot()
+ *
+ */
+static int disable_slot (struct hotplug_slot *hotplug_slot)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	int retval = 0;
+
+	if (slot == NULL)
+		return -ENODEV;
+	
+	dbg ("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	/* disable the specified slot */
+	retval = acpiphp_disable_slot (slot->acpi_slot);
+
+	return retval;
+}
+
+
+/**
+ * set_attention_status - set attention LED
+ *
+ * TBD:
+ * ACPI doesn't have known method to manipulate
+ * attention status LED.
+ *
+ */
+static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
+{
+	int retval = 0;
+	
+	dbg ("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	switch (status) {
+		case 0:
+			/* FIXME turn light off */
+			hotplug_slot->info->attention_status = 0;
+			break;
+
+		case 1:
+		default:
+			/* FIXME turn light on */
+			hotplug_slot->info->attention_status = 1;
+			break;
+	}
+
+	return retval;
+}
+
+
+/**
+ * hardware_test - hardware test
+ *
+ * We have nothing to do for now...
+ *
+ */
+static int hardware_test (struct hotplug_slot *hotplug_slot, u32 value)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	int retval = 0;
+	
+	if (slot == NULL)
+		return -ENODEV;
+	
+	dbg ("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	err ("No hardware tests are defined for this driver");
+	retval = -ENODEV;
+
+	return retval;
+}
+
+
+/**
+ * get_power_status - get power status of a slot
+ * @hotplug_slot: slot to get status
+ * @value: pointer to store status
+ *
+ * Some platforms may not implement _STA method properly.
+ * In that case, the value returned may not be reliable.
+ *
+ */
+static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	int retval = 0;
+	
+	if (slot == NULL)
+		return -ENODEV;
+	
+	dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	*value = acpiphp_get_power_status (slot->acpi_slot);
+
+	return retval;
+}
+
+
+/**
+ * get_attention_status - get attention LED status
+ *
+ * TBD:
+ * ACPI doesn't provide any formal means to access attention LED status.
+ *
+ */
+static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
+{
+	int retval = 0;
+	
+	dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	*value = hotplug_slot->info->attention_status;
+
+	return retval;
+}
+
+
+/**
+ * get_latch_status - get latch status of a slot
+ * @hotplug_slot: slot to get status
+ * @value: pointer to store status
+ *
+ * ACPI doesn't provide any formal means to access latch status.
+ * Instead, we fake latch status from _STA
+ *
+ */
+static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	int retval = 0;
+	
+	if (slot == NULL)
+		return -ENODEV;
+	
+	dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	*value = acpiphp_get_latch_status (slot->acpi_slot);
+
+	return retval;
+}
+
+
+/**
+ * get_adapter_status - get adapter status of a slot
+ * @hotplug_slot: slot to get status
+ * @value: pointer to store status
+ *
+ * ACPI doesn't provide any formal means to access adapter status.
+ * Instead, we fake adapter status from _STA
+ *
+ */
+static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	int retval = 0;
+	
+	if (slot == NULL)
+		return -ENODEV;
+	
+	dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name);
+
+	*value = acpiphp_get_adapter_status (slot->acpi_slot);
+
+	return retval;
+}
+
+
+/* return dummy value because ACPI doesn't provide any method... */
+static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	
+	if (slot == NULL)
+		return -ENODEV;
+	
+	*value = PCI_SPEED_UNKNOWN;
+
+	return 0;
+}
+
+
+/* return dummy value because ACPI doesn't provide any method... */
+static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
+{
+	struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
+	
+	if (slot == NULL)
+		return -ENODEV;
+	
+	*value = PCI_SPEED_UNKNOWN;
+
+	return 0;
+}
+
+
+static int init_acpi (void)
+{
+	int retval;
+
+	/* initialize internal data structure etc. */
+	retval = acpiphp_glue_init();
+
+	/* read initial number of slots */
+	if (!retval) {
+		num_slots = acpiphp_get_num_slots();
+		if (num_slots == 0)
+			retval = -ENODEV;
+	}
+
+	return retval;
+}
+
+
+/**
+ * make_slot_name - make a slot name that appears in pcihpfs
+ * @slot: slot to name
+ *
+ */
+static void make_slot_name (struct slot *slot)
+{
+	snprintf (slot->hotplug_slot->name, SLOT_NAME_SIZE, "ACPI%d-%02x:%02x",
+		  slot->acpi_slot->sun,
+		  slot->acpi_slot->bridge->bus,
+		  slot->acpi_slot->device);
+}
+
+/**
+ * init_slots - initialize 'struct slot' structures for each slot
+ *
+ */
+static int init_slots (void)
+{
+	struct slot *slot;
+	int retval = 0;
+	int i;
+
+	for (i = 0; i < num_slots; ++i) {
+		slot = kmalloc (sizeof (struct slot), GFP_KERNEL);
+		if (!slot)
+			return -ENOMEM;
+		memset(slot, 0, sizeof(struct slot));
+
+		slot->hotplug_slot = kmalloc (sizeof (struct hotplug_slot), GFP_KERNEL);
+		if (!slot->hotplug_slot) {
+			kfree (slot);
+			return -ENOMEM;
+		}
+		memset(slot->hotplug_slot, 0, sizeof (struct hotplug_slot));
+
+		slot->hotplug_slot->info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL);
+		if (!slot->hotplug_slot->info) {
+			kfree (slot->hotplug_slot);
+			kfree (slot);
+			return -ENOMEM;
+		}
+		memset(slot->hotplug_slot->info, 0, sizeof (struct hotplug_slot_info));
+
+		slot->hotplug_slot->name = kmalloc (SLOT_NAME_SIZE, GFP_KERNEL);
+		if (!slot->hotplug_slot->name) {
+			kfree (slot->hotplug_slot->info);
+			kfree (slot->hotplug_slot);
+			kfree (slot);
+			return -ENOMEM;
+		}
+
+		slot->magic = SLOT_MAGIC;
+		slot->number = i;
+
+		slot->hotplug_slot->private = slot;
+		slot->hotplug_slot->ops = &acpi_hotplug_slot_ops;
+
+		slot->acpi_slot = get_slot_from_id (i);
+		slot->hotplug_slot->info->power_status = acpiphp_get_power_status(slot->acpi_slot);
+		slot->hotplug_slot->info->attention_status = acpiphp_get_attention_status(slot->acpi_slot);
+		slot->hotplug_slot->info->latch_status = acpiphp_get_latch_status(slot->acpi_slot);
+		slot->hotplug_slot->info->adapter_status = acpiphp_get_adapter_status(slot->acpi_slot);
+
+		make_slot_name (slot);
+
+		retval = pci_hp_register (slot->hotplug_slot);
+		if (retval) {
+			err ("pci_hp_register failed with error %d", retval);
+			kfree (slot->hotplug_slot->info);
+			kfree (slot->hotplug_slot->name);
+			kfree (slot->hotplug_slot);
+			kfree (slot);
+			return retval;
+		}
+
+		/* add slot to our internal list */
+		list_add (&slot->slot_list, &slot_list);
+		info("Slot [%s] registered", slot->hotplug_slot->name);
+	}
+
+	return retval;
+}
+
+
+static void cleanup_slots (void)
+{
+	struct list_head *tmp, *n;
+	struct slot *slot;
+
+	list_for_each_safe (tmp, n, &slot_list) {
+		slot = list_entry (tmp, struct slot, slot_list);
+		list_del (&slot->slot_list);
+		pci_hp_deregister (slot->hotplug_slot);
+		kfree (slot->hotplug_slot->info);
+		kfree (slot->hotplug_slot->name);
+		kfree (slot->hotplug_slot);
+		kfree (slot);
+	}
+
+	return;
+}
+
+
+static int __init acpiphp_init(void)
+{
+	int retval;
+
+	info (DRIVER_DESC " version: " DRIVER_VERSION);
+
+	/* read all the ACPI info from the system */
+	retval = init_acpi();
+	if (retval)
+		return retval;
+
+	retval = init_slots();
+	if (retval)
+		return retval;
+
+	return 0;
+}
+
+
+static void __exit acpiphp_exit(void)
+{
+	cleanup_slots();
+	/* deallocate internal data structures etc. */
+	acpiphp_glue_exit();
+}
+
+module_init(acpiphp_init);
+module_exit(acpiphp_exit);
diff -Nru a/drivers/hotplug/acpiphp_glue.c b/drivers/hotplug/acpiphp_glue.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/hotplug/acpiphp_glue.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1463 @@
+/*
+ * ACPI PCI HotPlug glue functions to ACPI CA subsystem
+ *
+ * Copyright (c) 2002 Takayoshi Kochi (t-kouchi@cq.jp.nec.com)
+ * Copyright (c) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
+ * Copyright (c) 2002 NEC Corporation
+ *
+ * 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.
+ *
+ * Send feedback to <t-kouchi@cq.jp.nec.com>
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+#include <asm/semaphore.h>
+
+#include "pci_hotplug.h"
+#include "acpiphp.h"
+
+static LIST_HEAD(bridge_list);
+
+#define MY_NAME "acpiphp_glue"
+
+static void handle_hotplug_event_bridge (acpi_handle, u32, void *);
+static void handle_hotplug_event_func (acpi_handle, u32, void *);
+
+/*
+ * initialization & terminatation routines
+ */
+
+/**
+ * is_ejectable - determine if a slot is ejectable
+ * @handle: handle to acpi namespace
+ *
+ * Ejectable slot should satisfy at least these conditions:
+ *
+ *  1. has _ADR method
+ *  2. has _EJ0 method
+ *
+ * optionally
+ *
+ *  1. has _STA method
+ *  2. has _PS0 method
+ *  3. has _PS3 method
+ *  4. ..
+ *
+ */
+static int is_ejectable (acpi_handle handle)
+{
+	acpi_status status;
+	acpi_handle tmp;
+
+	status = acpi_get_handle(handle, "_ADR", &tmp);
+	if (ACPI_FAILURE(status)) {
+		return 0;
+	}
+
+	status = acpi_get_handle(handle, "_EJ0", &tmp);
+	if (ACPI_FAILURE(status)) {
+		return 0;
+	}
+
+	return 1;
+}
+
+
+/* callback routine to check the existence of ejectable slots */
+static acpi_status
+is_ejectable_slot (acpi_handle handle, u32 lvl,	void *context, void **rv)
+{
+	int *count = (int *)context;
+
+	if (is_ejectable(handle)) {
+		(*count)++;
+		/* only one ejectable slot is enough */
+		return AE_CTRL_TERMINATE;
+	} else {
+		return AE_OK;
+	}
+}
+
+
+/* callback routine to register each ACPI PCI slot object */
+static acpi_status
+register_slot (acpi_handle handle, u32 lvl, void *context, void **rv)
+{
+	struct acpiphp_bridge *bridge = (struct acpiphp_bridge *)context;
+	struct acpiphp_slot *slot;
+	struct acpiphp_func *newfunc;
+	acpi_handle tmp;
+	acpi_status status = AE_OK;
+	unsigned long adr, sun;
+	int device, function;
+	static int num_slots = 0;	/* XXX if we support I/O node hotplug... */
+
+	status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
+
+	if (ACPI_FAILURE(status))
+		return AE_OK;
+
+	status = acpi_get_handle(handle, "_EJ0", &tmp);
+
+	if (ACPI_FAILURE(status))
+		return AE_OK;
+
+	device = (adr >> 16) & 0xffff;
+	function = adr & 0xffff;
+
+	newfunc = kmalloc(sizeof(struct acpiphp_func), GFP_KERNEL);
+	if (!newfunc)
+		return AE_NO_MEMORY;
+	memset(newfunc, 0, sizeof(struct acpiphp_func));
+
+	INIT_LIST_HEAD(&newfunc->sibling);
+	newfunc->handle = handle;
+	newfunc->function = function;
+	newfunc->flags = FUNC_HAS_EJ0;
+
+	if (ACPI_SUCCESS(acpi_get_handle(handle, "_STA", &tmp)))
+		newfunc->flags |= FUNC_HAS_STA;
+
+	if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS0", &tmp)))
+		newfunc->flags |= FUNC_HAS_PS0;
+
+	if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS3", &tmp)))
+		newfunc->flags |= FUNC_HAS_PS3;
+
+	status = acpi_evaluate_integer(handle, "_SUN", NULL, &sun);
+	if (ACPI_FAILURE(status))
+		sun = -1;
+
+	/* search for objects that share the same slot */
+	for (slot = bridge->slots; slot; slot = slot->next)
+		if (slot->device == device) {
+			if (slot->sun != sun)
+				warn("sibling found, but _SUN doesn't match!");
+			break;
+		}
+
+	if (!slot) {
+		slot = kmalloc(sizeof(struct acpiphp_slot), GFP_KERNEL);
+		if (!slot) {
+			kfree(newfunc);
+			return AE_NO_MEMORY;
+		}
+
+		memset(slot, 0, sizeof(struct acpiphp_slot));
+		slot->bridge = bridge;
+		slot->id = num_slots++;
+		slot->device = device;
+		slot->sun = sun;
+		INIT_LIST_HEAD(&slot->funcs);
+		init_MUTEX(&slot->crit_sect);
+
+		slot->next = bridge->slots;
+		bridge->slots = slot;
+
+		bridge->nr_slots++;
+
+		dbg("found ACPI PCI Hotplug slot at PCI %02x:%02x Slot:0x%x",
+		    slot->bridge->bus, slot->device, slot->sun);
+	}
+
+	newfunc->slot = slot;
+	list_add_tail(&newfunc->sibling, &slot->funcs);
+
+	/* associate corresponding pci_dev */
+	newfunc->pci_dev = pci_find_slot(bridge->bus,
+					 PCI_DEVFN(device, function));
+	if (newfunc->pci_dev) {
+		if (acpiphp_init_func_resource(newfunc) < 0) {
+			kfree(newfunc);
+			return AE_ERROR;
+		}
+		slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON);
+	}
+
+	/* install notify handler */
+	status = acpi_install_notify_handler(handle,
+					     ACPI_SYSTEM_NOTIFY,
+					     handle_hotplug_event_func,
+					     newfunc);
+
+	if (ACPI_FAILURE(status)) {
+		err("failed to register interrupt notify handler");
+		return status;
+	}
+
+	return AE_OK;
+}
+
+
+/* see if it's worth looking at this bridge */
+static int detect_ejectable_slots (acpi_handle *bridge_handle)
+{
+	acpi_status status;
+	int count;
+
+	count = 0;
+
+	/* only check slots defined directly below bridge object */
+	status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1,
+				     is_ejectable_slot, (void *)&count, NULL);
+
+	return count;
+}
+
+
+/* decode ACPI _CRS data and convert into our internal resource list
+ * TBD: _TRA, etc.
+ */
+static void
+decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
+{
+	acpi_resource_address16 *address16_data;
+	acpi_resource_address32 *address32_data;
+	acpi_resource_address64 *address64_data;
+	struct pci_resource *res;
+
+	u32 resource_type, producer_consumer, address_length;
+	u64 min_address_range, max_address_range;
+	u16 cache_attribute = 0;
+
+	int done = 0, found;
+
+	/* shut up gcc */
+	resource_type = producer_consumer = address_length = 0;
+	min_address_range = max_address_range = 0;
+
+	while (!done) {
+		found = 0;
+
+		switch (resource->id) {
+		case ACPI_RSTYPE_ADDRESS16:
+			address16_data = (acpi_resource_address16 *)&resource->data;
+			resource_type = address16_data->resource_type;
+			producer_consumer = address16_data->producer_consumer;
+			min_address_range = address16_data->min_address_range;
+			max_address_range = address16_data->max_address_range;
+			address_length = address16_data->address_length;
+			if (resource_type == ACPI_MEMORY_RANGE)
+				cache_attribute = address16_data->attribute.memory.cache_attribute;
+			found = 1;
+			break;
+
+		case ACPI_RSTYPE_ADDRESS32:
+			address32_data = (acpi_resource_address32 *)&resource->data;
+			resource_type = address32_data->resource_type;
+			producer_consumer = address32_data->producer_consumer;
+			min_address_range = address32_data->min_address_range;
+			max_address_range = address32_data->max_address_range;
+			address_length = address32_data->address_length;
+			if (resource_type == ACPI_MEMORY_RANGE)
+				cache_attribute = address32_data->attribute.memory.cache_attribute;
+			found = 1;
+			break;
+
+		case ACPI_RSTYPE_ADDRESS64:
+			address64_data = (acpi_resource_address64 *)&resource->data;
+			resource_type = address64_data->resource_type;
+			producer_consumer = address64_data->producer_consumer;
+			min_address_range = address64_data->min_address_range;
+			max_address_range = address64_data->max_address_range;
+			address_length = address64_data->address_length;
+			if (resource_type == ACPI_MEMORY_RANGE)
+				cache_attribute = address64_data->attribute.memory.cache_attribute;
+			found = 1;
+			break;
+
+		case ACPI_RSTYPE_END_TAG:
+			done = 1;
+			break;
+
+		default:
+			/* ignore */
+			break;
+		}
+
+		resource = (acpi_resource *)((char*)resource + resource->length);
+
+		if (found && producer_consumer == ACPI_PRODUCER && address_length > 0) {
+			switch (resource_type) {
+			case ACPI_MEMORY_RANGE:
+				if (cache_attribute == ACPI_PREFETCHABLE_MEMORY) {
+					dbg("resource type: prefetchable memory 0x%x - 0x%x", (u32)min_address_range, (u32)max_address_range);
+					res = acpiphp_make_resource(min_address_range,
+							    address_length);
+					if (!res) {
+						err("out of memory");
+						return;
+					}
+					res->next = bridge->p_mem_head;
+					bridge->p_mem_head = res;
+				} else {
+					dbg("resource type: memory 0x%x - 0x%x", (u32)min_address_range, (u32)max_address_range);
+					res = acpiphp_make_resource(min_address_range,
+							    address_length);
+					if (!res) {
+						err("out of memory");
+						return;
+					}
+					res->next = bridge->mem_head;
+					bridge->mem_head = res;
+				}
+				break;
+			case ACPI_IO_RANGE:
+				dbg("resource type: io 0x%x - 0x%x", (u32)min_address_range, (u32)max_address_range);
+				res = acpiphp_make_resource(min_address_range,
+						    address_length);
+				if (!res) {
+					err("out of memory");
+					return;
+				}
+				res->next = bridge->io_head;
+				bridge->io_head = res;
+				break;
+			case ACPI_BUS_NUMBER_RANGE:
+				dbg("resource type: bus number %d - %d", (u32)min_address_range, (u32)max_address_range);
+				res = acpiphp_make_resource(min_address_range,
+						    address_length);
+				if (!res) {
+					err("out of memory");
+					return;
+				}
+				res->next = bridge->bus_head;
+				bridge->bus_head = res;
+				break;
+			default:
+				/* invalid type */
+				break;
+			}
+		}
+	}
+
+	acpiphp_resource_sort_and_combine(&bridge->io_head);
+	acpiphp_resource_sort_and_combine(&bridge->mem_head);
+	acpiphp_resource_sort_and_combine(&bridge->p_mem_head);
+	acpiphp_resource_sort_and_combine(&bridge->bus_head);
+#if 1
+	info("ACPI _CRS resource:");
+	acpiphp_dump_resource(bridge);
+#endif
+}
+
+
+/* find pci_bus structure associated to specific bus number */
+static struct pci_bus *find_pci_bus(const struct list_head *list, int bus)
+{
+	const struct list_head *l;
+
+	list_for_each(l, list) {
+		struct pci_bus *b = pci_bus_b(l);
+		if (b->number == bus)
+			return b;
+
+		if (!list_empty(&b->children)) {
+			/* XXX recursive call */
+			b = find_pci_bus(&b->children, bus);
+
+			if (b)
+				return b;
+		}
+	}
+
+	return NULL;
+}
+
+
+/* decode ACPI 2.0 _HPP hot plug parameters */
+static void decode_hpp(struct acpiphp_bridge *bridge)
+{
+	acpi_status status;
+	acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+			       .pointer = NULL};
+	acpi_object *package;
+	int i;
+
+	/* default numbers */
+	bridge->hpp.cache_line_size = 0x10;
+	bridge->hpp.latency_timer = 0x40;
+	bridge->hpp.enable_SERR = 0;
+	bridge->hpp.enable_PERR = 0;
+
+	status = acpi_evaluate_object(bridge->handle, "_HPP", NULL, &buffer);
+
+	if (ACPI_FAILURE(status)) {
+		dbg("_HPP evaluation failed");
+		return;
+	}
+
+	package = (acpi_object *) buffer.pointer;
+
+	if (!package || package->type != ACPI_TYPE_PACKAGE ||
+	    package->package.count != 4 || !package->package.elements) {
+		err("invalid _HPP object; ignoring");
+		goto err_exit;
+	}
+
+	for (i = 0; i < 4; i++) {
+		if (package->package.elements[i].type != ACPI_TYPE_INTEGER) {
+			err("invalid _HPP parameter type; ignoring");
+			goto err_exit;
+		}
+	}
+
+	bridge->hpp.cache_line_size = package->package.elements[0].integer.value;
+	bridge->hpp.latency_timer = package->package.elements[1].integer.value;
+	bridge->hpp.enable_SERR = package->package.elements[2].integer.value;
+	bridge->hpp.enable_PERR = package->package.elements[3].integer.value;
+
+	dbg("_HPP parameter = (%02x, %02x, %02x, %02x)",
+	    bridge->hpp.cache_line_size,
+	    bridge->hpp.latency_timer,
+	    bridge->hpp.enable_SERR,
+	    bridge->hpp.enable_PERR);
+
+	bridge->flags |= BRIDGE_HAS_HPP;
+
+ err_exit:
+	kfree(buffer.pointer);
+}
+
+
+/* initialize miscellaneous stuff for both root and PCI-to-PCI bridge */
+static void init_bridge_misc (struct acpiphp_bridge *bridge)
+{
+	acpi_status status;
+
+	/* decode ACPI 2.0 _HPP (hot plug parameters) */
+	decode_hpp(bridge);
+
+	/* subtract all resources already allocated */
+	acpiphp_detect_pci_resource(bridge);
+
+	/* register all slot objects under this bridge */
+	status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge->handle, (u32)1,
+				     register_slot, bridge, NULL);
+
+	/* install notify handler */
+	status = acpi_install_notify_handler(bridge->handle,
+					     ACPI_SYSTEM_NOTIFY,
+					     handle_hotplug_event_bridge,
+					     bridge);
+
+	if (ACPI_FAILURE(status)) {
+		err("failed to register interrupt notify handler");
+	}
+
+	list_add(&bridge->list, &bridge_list);
+
+#if 1
+	dbg("Bridge resource:");
+	acpiphp_dump_resource(bridge);
+#endif
+}
+
+
+/* allocate and initialize host bridge data structure */
+static void add_host_bridge (acpi_handle *handle, int seg, int bus)
+{
+	acpi_status status;
+	acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+			       .pointer = NULL};
+
+	struct acpiphp_bridge *bridge;
+
+	bridge = kmalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL);
+	if (bridge == NULL)
+		return;
+
+	memset(bridge, 0, sizeof(struct acpiphp_bridge));
+
+	bridge->type = BRIDGE_TYPE_HOST;
+	bridge->handle = handle;
+	bridge->seg = seg;
+	bridge->bus = bus;
+
+	bridge->pci_bus = find_pci_bus(&pci_root_buses, bus);
+
+	bridge->res_lock = SPIN_LOCK_UNLOCKED;
+
+	/* to be overridden when we decode _CRS	*/
+	bridge->sub = bridge->bus;
+
+	/* decode resources */
+
+	status = acpi_get_current_resources(handle, &buffer);
+
+	if (ACPI_FAILURE(status)) {
+		err("failed to decode bridge resources");
+		kfree(bridge);
+		return;
+	}
+
+	decode_acpi_resource(buffer.pointer, bridge);
+	kfree(buffer.pointer);
+
+	if (bridge->bus_head) {
+		bridge->bus = bridge->bus_head->base;
+		bridge->sub = bridge->bus_head->base + bridge->bus_head->length - 1;
+	}
+
+	init_bridge_misc(bridge);
+}
+
+
+/* allocate and initialize PCI-to-PCI bridge data structure */
+static void add_p2p_bridge (acpi_handle *handle, int seg, int bus, int dev, int fn)
+{
+	struct acpiphp_bridge *bridge;
+	u8 tmp8;
+	u16 tmp16;
+	u64 base64, limit64;
+	u32 base, limit, base32u, limit32u;
+
+	bridge = kmalloc(sizeof(struct acpiphp_bridge), GFP_KERNEL);
+	if (bridge == NULL) {
+		err("out of memory");
+		return;
+	}
+
+	memset(bridge, 0, sizeof(struct acpiphp_bridge));
+
+	bridge->type = BRIDGE_TYPE_P2P;
+	bridge->handle = handle;
+	bridge->seg = seg;
+
+	bridge->pci_dev = pci_find_slot(bus, PCI_DEVFN(dev, fn));
+	if (!bridge->pci_dev) {
+		err("Can't get pci_dev");
+		kfree(bridge);
+		return;
+	}
+
+	bridge->pci_bus = bridge->pci_dev->subordinate;
+	if (!bridge->pci_bus) {
+		err("This is not a PCI-to-PCI bridge!");
+		kfree(bridge);
+		return;
+	}
+
+	bridge->res_lock = SPIN_LOCK_UNLOCKED;
+
+	bridge->bus = bridge->pci_bus->number;
+	bridge->sub = bridge->pci_bus->subordinate;
+
+	/*
+	 * decode resources under this P2P bridge
+	 */
+
+	/* I/O resources */
+	pci_read_config_byte(bridge->pci_dev, PCI_IO_BASE, &tmp8);
+	base = tmp8;
+	pci_read_config_byte(bridge->pci_dev, PCI_IO_LIMIT, &tmp8);
+	limit = tmp8;
+
+	switch (base & PCI_IO_RANGE_TYPE_MASK) {
+	case PCI_IO_RANGE_TYPE_16:
+		base = (base << 8) & 0xf000;
+		limit = ((limit << 8) & 0xf000) + 0xfff;
+		bridge->io_head = acpiphp_make_resource((u64)base, limit - base + 1);
+		if (!bridge->io_head) {
+			err("out of memory");
+			return;
+		}
+		dbg("16bit I/O range: %04x-%04x",
+		    (u32)bridge->io_head->base,
+		    (u32)(bridge->io_head->base + bridge->io_head->length - 1));
+		break;
+	case PCI_IO_RANGE_TYPE_32:
+		pci_read_config_word(bridge->pci_dev, PCI_IO_BASE_UPPER16, &tmp16);
+		base = ((u32)tmp16 << 16) | ((base << 8) & 0xf000);
+		pci_read_config_word(bridge->pci_dev, PCI_IO_LIMIT_UPPER16, &tmp16);
+		limit = (((u32)tmp16 << 16) | ((limit << 8) & 0xf000)) + 0xfff;
+		bridge->io_head = acpiphp_make_resource((u64)base, limit - base + 1);
+		if (!bridge->io_head) {
+			err("out of memory");
+			return;
+		}
+		dbg("32bit I/O range: %08x-%08x",
+		    (u32)bridge->io_head->base,
+		    (u32)(bridge->io_head->base + bridge->io_head->length - 1));
+		break;
+	case 0x0f:
+		dbg("I/O space unsupported");
+		break;
+	default:
+		warn("Unknown I/O range type");
+	}
+
+	/* Memory resources (mandatory for P2P bridge) */
+	pci_read_config_word(bridge->pci_dev, PCI_MEMORY_BASE, &tmp16);
+	base = (tmp16 & 0xfff0) << 16;
+	pci_read_config_word(bridge->pci_dev, PCI_MEMORY_LIMIT, &tmp16);
+	limit = ((tmp16 & 0xfff0) << 16) | 0xfffff;
+	bridge->mem_head = acpiphp_make_resource((u64)base, limit - base + 1);
+	if (!bridge->mem_head) {
+		err("out of memory");
+		return;
+	}
+	dbg("32bit Memory range: %08x-%08x",
+	    (u32)bridge->mem_head->base,
+	    (u32)(bridge->mem_head->base + bridge->mem_head->length-1));
+
+	/* Prefetchable Memory resources (optional) */
+	pci_read_config_word(bridge->pci_dev, PCI_PREF_MEMORY_BASE, &tmp16);
+	base = tmp16;
+	pci_read_config_word(bridge->pci_dev, PCI_PREF_MEMORY_LIMIT, &tmp16);
+	limit = tmp16;
+
+	switch (base & PCI_MEMORY_RANGE_TYPE_MASK) {
+	case PCI_PREF_RANGE_TYPE_32:
+		base = (base & 0xfff0) << 16;
+		limit = ((limit & 0xfff0) << 16) | 0xfffff;
+		bridge->p_mem_head = acpiphp_make_resource((u64)base, limit - base + 1);
+		if (!bridge->p_mem_head) {
+			err("out of memory");
+			return;
+		}
+		dbg("32bit Prefetchable memory range: %08x-%08x",
+		    (u32)bridge->p_mem_head->base,
+		    (u32)(bridge->p_mem_head->base + bridge->p_mem_head->length - 1));
+		break;
+	case PCI_PREF_RANGE_TYPE_64:
+		pci_read_config_dword(bridge->pci_dev, PCI_PREF_BASE_UPPER32, &base32u);
+		pci_read_config_dword(bridge->pci_dev, PCI_PREF_LIMIT_UPPER32, &limit32u);
+		base64 = ((u64)base32u << 32) | ((base & 0xfff0) << 16);
+		limit64 = (((u64)limit32u << 32) | ((limit & 0xfff0) << 16)) + 0xfffff;
+
+		bridge->p_mem_head = acpiphp_make_resource(base64, limit64 - base64 + 1);
+		if (!bridge->p_mem_head) {
+			err("out of memory");
+			return;
+		}
+		dbg("64bit Prefetchable memory range: %08x%08x-%08x%08x",
+		    (u32)(bridge->p_mem_head->base >> 32),
+		    (u32)(bridge->p_mem_head->base & 0xffffffff),
+		    (u32)((bridge->p_mem_head->base + bridge->p_mem_head->length - 1) >> 32),
+		    (u32)((bridge->p_mem_head->base + bridge->p_mem_head->length - 1) & 0xffffffff));
+		break;
+	case 0x0f:
+		break;
+	default:
+		warn("Unknown prefetchale memory type");
+	}
+
+	init_bridge_misc(bridge);
+}
+
+
+/* callback routine to find P2P bridges */
+static acpi_status
+find_p2p_bridge (acpi_handle handle, u32 lvl, void *context, void **rv)
+{
+	acpi_status status;
+	acpi_handle dummy_handle;
+	unsigned long *segbus = context;
+	unsigned long tmp;
+	int seg, bus, device, function;
+	struct pci_dev *dev;
+
+	/* get PCI address */
+	seg = (*segbus >> 8) & 0xff;
+	bus = *segbus & 0xff;
+
+	status = acpi_get_handle(handle, "_ADR", &dummy_handle);
+	if (ACPI_FAILURE(status))
+		return AE_OK;		/* continue */
+
+	status = acpi_evaluate_integer(handle, "_ADR", NULL, &tmp);
+	if (ACPI_FAILURE(status)) {
+		dbg("%s: _ADR evaluation failure", __FUNCTION__);
+		return AE_OK;
+	}
+
+	device = (tmp >> 16) & 0xffff;
+	function = tmp & 0xffff;
+
+	dev = pci_find_slot(bus, PCI_DEVFN(device, function));
+
+	if (!dev)
+		return AE_OK;
+
+	if (!dev->subordinate)
+		return AE_OK;
+
+	/* check if this bridge has ejectable slots */
+	if (detect_ejectable_slots(handle) > 0) {
+		dbg("found PCI-to-PCI bridge at PCI %02x:%02x.%d", bus, device, function);
+		add_p2p_bridge(handle, seg, bus, device, function);
+	}
+
+	return AE_OK;
+}
+
+
+/* find hot-pluggable slots, and then find P2P bridge */
+static int add_bridges (acpi_handle *handle)
+{
+	acpi_status status;
+	unsigned long tmp;
+	int seg, bus;
+	acpi_handle dummy_handle;
+
+	/* if the bridge doesn't have _STA, we assume it is always there */
+	status = acpi_get_handle(handle, "_STA", &dummy_handle);
+	if (ACPI_SUCCESS(status)) {
+		status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
+		if (ACPI_FAILURE(status)) {
+			dbg("%s: _STA evaluation failure", __FUNCTION__);
+			return 0;
+		}
+		if ((tmp & ACPI_STA_FUNCTIONING) == 0)
+			/* don't register this object */
+			return 0;
+	}
+
+	/* get PCI segment number */
+	status = acpi_evaluate_integer(handle, "_SEG", NULL, &tmp);
+
+	seg = ACPI_SUCCESS(status) ? tmp : 0;
+
+	/* get PCI bus number */
+	status = acpi_evaluate_integer(handle, "_BBN", NULL, &tmp);
+
+	if (ACPI_SUCCESS(status)) {
+		bus = tmp;
+	} else {
+		warn("can't get bus number, assuming 0");
+		bus = 0;
+	}
+
+	/* check if this bridge has ejectable slots */
+	if (detect_ejectable_slots(handle) > 0) {
+		dbg("found PCI host-bus bridge with hot-pluggable slots");
+		add_host_bridge(handle, seg, bus);
+		return 0;
+	}
+
+	tmp = seg << 8 | bus;
+
+	/* search P2P bridges under this host bridge */
+	status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1,
+				     find_p2p_bridge, &tmp, NULL);
+
+	if (ACPI_FAILURE(status))
+		warn("find_p2p_bridge faied (error code = 0x%x)",status);
+
+	return 0;
+}
+
+
+/* callback routine to enumerate all the bridges in ACPI namespace */
+static acpi_status
+find_host_bridge (acpi_handle handle, u32 lvl, void *context, void **rv)
+{
+	acpi_status status;
+	acpi_device_info info;
+	char objname[5];
+	acpi_buffer buffer = { .length = sizeof(objname),
+			       .pointer = objname };
+
+	status = acpi_get_object_info(handle, &info);
+	if (ACPI_FAILURE(status)) {
+		dbg("%s: failed to get bridge information", __FUNCTION__);
+		return AE_OK;		/* continue */
+	}
+
+	info.hardware_id[sizeof(info.hardware_id)-1] = '\0';
+
+	/* TBD use acpi_get_devices() API */
+	if (info.current_status &&
+	    (info.valid & ACPI_VALID_HID) &&
+	    strcmp(info.hardware_id, ACPI_PCI_HOST_HID) == 0) {
+		acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer);
+		dbg("checking PCI-hotplug capable bridges under [%s]", objname);
+		add_bridges(handle);
+	}
+	return AE_OK;
+}
+
+
+static int power_on_slot (struct acpiphp_slot *slot)
+{
+	acpi_status status;
+	struct acpiphp_func *func;
+	struct list_head *l;
+	int retval = 0;
+
+	/* is this already enabled? */
+	if (slot->flags & SLOT_POWEREDON)
+		goto err_exit;
+
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+
+		if (func->flags & FUNC_HAS_PS0) {
+			dbg("%s: executing _PS0 on %02x:%02x.%d", __FUNCTION__,
+			    slot->bridge->bus, slot->device, func->function);
+			status = acpi_evaluate_object(func->handle, "_PS0", NULL, NULL);
+			if (ACPI_FAILURE(status)) {
+				warn("%s: _PS0 failed", __FUNCTION__);
+				retval = -1;
+				goto err_exit;
+			}
+		}
+	}
+
+	/* TBD: evaluate _STA to check if the slot is enabled */
+
+	slot->flags |= SLOT_POWEREDON;
+
+ err_exit:
+	return retval;
+}
+
+
+static int power_off_slot (struct acpiphp_slot *slot)
+{
+	acpi_status status;
+	struct acpiphp_func *func;
+	struct list_head *l;
+	acpi_object_list arg_list;
+	acpi_object arg;
+
+	int retval = 0;
+
+	/* is this already enabled? */
+	if ((slot->flags & SLOT_POWEREDON) == 0)
+		goto err_exit;
+
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+
+		if (func->flags & FUNC_HAS_PS3) {
+			dbg("%s: executing _PS3 on %02x:%02x.%d", __FUNCTION__,
+			    slot->bridge->bus, slot->device, func->function);
+			status = acpi_evaluate_object(func->handle, "_PS3", NULL, NULL);
+			if (ACPI_FAILURE(status)) {
+				warn("%s: _PS3 failed", __FUNCTION__);
+				retval = -1;
+				goto err_exit;
+			}
+		}
+	}
+
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+
+		if (func->flags & FUNC_HAS_EJ0) {
+			dbg("%s: executing _EJ0 on %02x:%02x.%d", __FUNCTION__,
+			    slot->bridge->bus, slot->device, func->function);
+
+			/* _EJ0 method take one argument */
+			arg_list.count = 1;
+			arg_list.pointer = &arg;
+			arg.type = ACPI_TYPE_INTEGER;
+			arg.integer.value = 1;
+
+			status = acpi_evaluate_object(func->handle, "_EJ0", &arg_list, NULL);
+			if (ACPI_FAILURE(status)) {
+				warn("%s: _EJ0 failed", __FUNCTION__);
+				retval = -1;
+				goto err_exit;
+			}
+		}
+	}
+
+	/* TBD: evaluate _STA to check if the slot is disabled */
+
+	slot->flags &= (~SLOT_POWEREDON);
+
+ err_exit:
+	return retval;
+}
+
+
+/**
+ * enable_device - enable, configure a slot
+ * @slot: slot to be enabled
+ *
+ * This function should be called per *physical slot*,
+ * not per each slot object in ACPI namespace.
+ *
+ */
+static int enable_device (struct acpiphp_slot *slot)
+{
+	u8 bus;
+	struct pci_dev dev0, *dev;
+	struct pci_bus *child;
+	struct list_head *l;
+	struct acpiphp_func *func;
+	int retval = 0;
+
+	if (slot->flags & SLOT_ENABLED)
+		goto err_exit;
+
+	/* sanity check: dev should be NULL when hot-plugged in */
+	dev = pci_find_slot(slot->bridge->bus, PCI_DEVFN(slot->device, 0));
+	if (dev) {
+		/* This case shouldn't happen */
+		err("pci_dev structure already exists.");
+		retval = -1;
+		goto err_exit;
+	}
+
+	/* allocate resources to device */
+	retval = acpiphp_configure_slot(slot);
+	if (retval)
+		goto err_exit;
+
+	memset(&dev0, 0, sizeof (struct pci_dev));
+
+	dev0.bus = slot->bridge->pci_bus;
+	dev0.devfn = PCI_DEVFN(slot->device, 0);
+	dev0.sysdata = dev0.bus->sysdata;
+	dev0.dev.parent = dev0.bus->dev;
+	dev0.dev.bus = &pci_bus_type;
+
+	/* returned `dev' is the *first function* only! */
+	dev = pci_scan_slot (&dev0);
+
+	if (!dev) {
+		err("No new device found");
+		retval = -1;
+		goto err_exit;
+	}
+
+	if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+		pci_read_config_byte(dev, PCI_SECONDARY_BUS, &bus);
+		child = (struct pci_bus*) pci_add_new_bus(dev->bus, dev, bus);
+		pci_do_scan_bus(child);
+	}
+
+	/* associate pci_dev to our representation */
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+
+		func->pci_dev = pci_find_slot(slot->bridge->bus,
+					      PCI_DEVFN(slot->device,
+							func->function));
+		if (!func->pci_dev)
+			continue;
+
+		/* configure device */
+		retval = acpiphp_configure_function(func);
+		if (retval)
+			goto err_exit;
+	}
+
+	slot->flags |= SLOT_ENABLED;
+
+#if 1
+	dbg("Available resources:");
+	acpiphp_dump_resource(slot->bridge);
+#endif
+
+ err_exit:
+	return retval;
+}
+
+
+/**
+ * disable_device - disable a slot
+ */
+static int disable_device (struct acpiphp_slot *slot)
+{
+	int retval = 0;
+	struct acpiphp_func *func;
+	struct list_head *l;
+
+	/* is this slot already disabled? */
+	if (!(slot->flags & SLOT_ENABLED))
+		goto err_exit;
+
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+
+		if (func->pci_dev) {
+			if (acpiphp_unconfigure_function(func) == 0) {
+				func->pci_dev = NULL;
+			} else {
+				err("failed to unconfigure device");
+				retval = -1;
+				goto err_exit;
+			}
+		}
+	}
+
+	slot->flags &= (~SLOT_ENABLED);
+
+ err_exit:
+	return retval;
+}
+
+
+/**
+ * get_slot_status - get ACPI slot status
+ *
+ * if a slot has _STA for each function and if any one of them
+ * returned non-zero status, return it
+ *
+ * if a slot doesn't have _STA and if any one of its functions'
+ * configuration space is configured, return 0x0f as a _STA
+ *
+ * otherwise return 0
+ */
+static unsigned int get_slot_status (struct acpiphp_slot *slot)
+{
+	acpi_status status;
+	unsigned long sta = 0;
+	u32 dvid;
+	struct list_head *l;
+	struct acpiphp_func *func;
+
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+
+		if (func->flags & FUNC_HAS_STA) {
+			status = acpi_evaluate_integer(func->handle, "_STA", NULL, &sta);
+			if (ACPI_SUCCESS(status) && sta)
+				break;
+		} else {
+			pci_bus_read_config_dword(slot->bridge->pci_bus,
+						  PCI_DEVFN(slot->device,
+							    func->function),
+						  PCI_VENDOR_ID, &dvid);
+			if (dvid != 0xffffffff) {
+				sta = ACPI_STA_ALL;
+				break;
+			}
+		}
+	}
+
+	return (unsigned int)sta;
+}
+
+
+/*
+ * ACPI event handlers
+ */
+
+/**
+ * handle_hotplug_event_bridge - handle ACPI event on bridges
+ *
+ * @handle: Notify()'ed acpi_handle 
+ * @type: Notify code
+ * @context: pointer to acpiphp_bridge structure
+ *
+ * handles ACPI event notification on {host,p2p} bridges
+ *
+ */
+static void handle_hotplug_event_bridge (acpi_handle handle, u32 type, void *context)
+{
+	struct acpiphp_bridge *bridge;
+	char objname[64];
+	acpi_buffer buffer = { .length = sizeof(objname),
+			       .pointer = objname };
+
+	bridge = (struct acpiphp_bridge *)context;
+
+	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+
+	switch (type) {
+	case ACPI_NOTIFY_BUS_CHECK:
+		/* bus re-enumerate */
+		dbg("%s: Bus check notify on %s", __FUNCTION__, objname);
+		acpiphp_check_bridge(bridge);
+		break;
+
+	case ACPI_NOTIFY_DEVICE_CHECK:
+		/* device check */
+		dbg("%s: Device check notify on %s", __FUNCTION__, objname);
+		acpiphp_check_bridge(bridge);
+		break;
+
+	case ACPI_NOTIFY_DEVICE_WAKE:
+		/* wake event */
+		dbg("%s: Device wake notify on %s", __FUNCTION__, objname);
+		break;
+
+	case ACPI_NOTIFY_EJECT_REQUEST:
+		/* request device eject */
+		dbg("%s: Device eject notify on %s", __FUNCTION__, objname);
+		break;
+
+	default:
+		warn("notify_handler: unknown event type 0x%x for %s", type, objname);
+		break;
+	}
+}
+
+
+/**
+ * handle_hotplug_event_func - handle ACPI event on functions (i.e. slots)
+ *
+ * @handle: Notify()'ed acpi_handle 
+ * @type: Notify code
+ * @context: pointer to acpiphp_func structure
+ *
+ * handles ACPI event notification on slots
+ *
+ */
+static void handle_hotplug_event_func (acpi_handle handle, u32 type, void *context)
+{
+	struct acpiphp_func *func;
+	char objname[64];
+	acpi_buffer buffer = { .length = sizeof(objname),
+			       .pointer = objname };
+
+	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+
+	func = (struct acpiphp_func *)context;
+
+	switch (type) {
+	case ACPI_NOTIFY_BUS_CHECK:
+		/* bus re-enumerate */
+		dbg("%s: Bus check notify on %s", __FUNCTION__, objname);
+		acpiphp_enable_slot(func->slot);
+		break;
+
+	case ACPI_NOTIFY_DEVICE_CHECK:
+		/* device check : re-enumerate from parent bus */
+		dbg("%s: Device check notify on %s", __FUNCTION__, objname);
+		acpiphp_check_bridge(func->slot->bridge);
+		break;
+
+	case ACPI_NOTIFY_DEVICE_WAKE:
+		/* wake event */
+		dbg("%s: Device wake notify on %s", __FUNCTION__, objname);
+		break;
+
+	case ACPI_NOTIFY_EJECT_REQUEST:
+		/* request device eject */
+		dbg("%s: Device eject notify on %s", __FUNCTION__, objname);
+		acpiphp_disable_slot(func->slot);
+		break;
+
+	default:
+		warn("notify_handler: unknown event type 0x%x for %s", type, objname);
+		break;
+	}
+}
+
+
+/**
+ * acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures
+ *
+ */
+int acpiphp_glue_init (void)
+{
+	acpi_status status;
+
+	if (list_empty(&pci_root_buses))
+		return -1;
+
+	status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+				     ACPI_UINT32_MAX, find_host_bridge,
+				     NULL, NULL);
+
+	if (ACPI_FAILURE(status)) {
+		err("%s: acpi_walk_namespace() failed", __FUNCTION__);
+		return -1;
+	}
+
+	return 0;
+}
+
+
+/**
+ * acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures
+ *
+ * This function frees all data allocated in acpiphp_glue_init()
+ */
+void acpiphp_glue_exit (void)
+{
+	struct list_head *l1, *l2, *n1, *n2;
+	struct acpiphp_bridge *bridge;
+	struct acpiphp_slot *slot, *next;
+	struct acpiphp_func *func;
+	acpi_status status;
+
+	list_for_each_safe(l1, n1, &bridge_list) {
+		bridge = (struct acpiphp_bridge *)l1;
+		slot = bridge->slots;
+		while (slot) {
+			next = slot->next;
+			list_for_each_safe(l2, n2, &slot->funcs) {
+				func = list_entry(l2, struct acpiphp_func, sibling);
+				acpiphp_free_resource(&func->io_head);
+				acpiphp_free_resource(&func->mem_head);
+				acpiphp_free_resource(&func->p_mem_head);
+				acpiphp_free_resource(&func->bus_head);
+				status = acpi_remove_notify_handler(func->handle,
+								    ACPI_SYSTEM_NOTIFY,
+								    handle_hotplug_event_func);
+				if (ACPI_FAILURE(status))
+					err("failed to remove notify handler");
+				kfree(func);
+			}
+			kfree(slot);
+			slot = next;
+		}
+		status = acpi_remove_notify_handler(bridge->handle, ACPI_SYSTEM_NOTIFY,
+						    handle_hotplug_event_bridge);
+		if (ACPI_FAILURE(status))
+			err("failed to remove notify handler");
+
+		acpiphp_free_resource(&bridge->io_head);
+		acpiphp_free_resource(&bridge->mem_head);
+		acpiphp_free_resource(&bridge->p_mem_head);
+		acpiphp_free_resource(&bridge->bus_head);
+
+		kfree(bridge);
+	}
+}
+
+
+/**
+ * acpiphp_get_num_slots - count number of slots in a system
+ */
+int acpiphp_get_num_slots (void)
+{
+	struct list_head *node;
+	struct acpiphp_bridge *bridge;
+	int num_slots;
+
+	num_slots = 0;
+
+	list_for_each(node, &bridge_list) {
+		bridge = (struct acpiphp_bridge *)node;
+		dbg("Bus%d %dslot(s)", bridge->bus, bridge->nr_slots);
+		num_slots += bridge->nr_slots;
+	}
+
+	dbg("Total %dslots", num_slots);
+	return num_slots;
+}
+
+
+/**
+ * acpiphp_for_each_slot - call function for each slot
+ * @fn: callback function
+ * @data: context to be passed to callback function
+ *
+ */
+int acpiphp_for_each_slot(acpiphp_callback fn, void *data)
+{
+	struct list_head *node;
+	struct acpiphp_bridge *bridge;
+	struct acpiphp_slot *slot;
+	int retval = 0;
+
+	list_for_each(node, &bridge_list) {
+		bridge = (struct acpiphp_bridge *)node;
+		for (slot = bridge->slots; slot; slot = slot->next) {
+			retval = fn(slot, data);
+			if (!retval)
+				goto err_exit;
+		}
+	}
+
+ err_exit:
+	return retval;
+}
+
+
+/* search matching slot from id  */
+struct acpiphp_slot *get_slot_from_id (int id)
+{
+	struct list_head *node;
+	struct acpiphp_bridge *bridge;
+	struct acpiphp_slot *slot;
+
+	list_for_each(node, &bridge_list) {
+		bridge = (struct acpiphp_bridge *)node;
+		for (slot = bridge->slots; slot; slot = slot->next)
+			if (slot->id == id)
+				return slot;
+	}
+
+	/* should never happen! */
+	err("%s: no object for id %d",__FUNCTION__, id);
+	return 0;
+}
+
+
+/**
+ * acpiphp_enable_slot - power on slot
+ */
+int acpiphp_enable_slot (struct acpiphp_slot *slot)
+{
+	int retval;
+
+	down(&slot->crit_sect);
+
+	/* wake up all functions */
+	retval = power_on_slot(slot);
+	if (retval)
+		goto err_exit;
+
+	if (get_slot_status(slot) == ACPI_STA_ALL)
+		/* configure all functions */
+		retval = enable_device(slot);
+
+ err_exit:
+	up(&slot->crit_sect);
+	return retval;
+}
+
+
+/**
+ * acpiphp_disable_slot - power off slot
+ */
+int acpiphp_disable_slot (struct acpiphp_slot *slot)
+{
+	int retval = 0;
+
+	down(&slot->crit_sect);
+
+	/* unconfigure all functions */
+	retval = disable_device(slot);
+	if (retval)
+		goto err_exit;
+
+	/* power off all functions */
+	retval = power_off_slot(slot);
+	if (retval)
+		goto err_exit;
+
+	acpiphp_resource_sort_and_combine(&slot->bridge->io_head);
+	acpiphp_resource_sort_and_combine(&slot->bridge->mem_head);
+	acpiphp_resource_sort_and_combine(&slot->bridge->p_mem_head);
+	acpiphp_resource_sort_and_combine(&slot->bridge->bus_head);
+	dbg("Available resources:");
+	acpiphp_dump_resource(slot->bridge);
+
+ err_exit:
+	up(&slot->crit_sect);
+	return retval;
+}
+
+
+/**
+ * acpiphp_check_bridge - re-enumerate devices
+ */
+int acpiphp_check_bridge (struct acpiphp_bridge *bridge)
+{
+	struct acpiphp_slot *slot;
+	unsigned int sta;
+	int retval = 0;
+	int enabled, disabled;
+
+	enabled = disabled = 0;
+
+	for (slot = bridge->slots; slot; slot = slot->next) {
+		sta = get_slot_status(slot);
+		if (slot->flags & SLOT_ENABLED) {
+			/* if enabled but not present, disable */
+			if (sta != ACPI_STA_ALL) {
+				retval = acpiphp_disable_slot(slot);
+				if (retval) {
+					err("Error occured in enabling");
+					up(&slot->crit_sect);
+					goto err_exit;
+				}
+				enabled++;
+			}
+		} else {
+			/* if disabled but present, enable */
+			if (sta == ACPI_STA_ALL) {
+				retval = acpiphp_enable_slot(slot);
+				if (retval) {
+					err("Error occured in enabling");
+					up(&slot->crit_sect);
+					goto err_exit;
+				}
+				disabled++;
+			}
+		}
+	}
+
+	dbg("%s: %d enabled, %d disabled", __FUNCTION__, enabled, disabled);
+
+ err_exit:
+	return retval;
+}
+
+
+/*
+ * slot enabled:  1
+ * slot disabled: 0
+ */
+u8 acpiphp_get_power_status (struct acpiphp_slot *slot)
+{
+	unsigned int sta;
+
+	sta = get_slot_status(slot);
+
+	return (sta & ACPI_STA_ENABLED) ? 1 : 0;
+}
+
+
+/*
+ * attention LED ON: 1
+ *              OFF: 0
+ *
+ * TBD
+ * no direct attention led status information via ACPI
+ *
+ */
+u8 acpiphp_get_attention_status (struct acpiphp_slot *slot)
+{
+	return 0;
+}
+
+
+/*
+ * latch closed:  1
+ * latch   open:  0
+ */
+u8 acpiphp_get_latch_status (struct acpiphp_slot *slot)
+{
+	unsigned int sta;
+
+	sta = get_slot_status(slot);
+
+	return (sta & ACPI_STA_SHOW_IN_UI) ? 1 : 0;
+}
+
+
+/*
+ * adapter presence : 1
+ *          absence : 0
+ */
+u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot)
+{
+	unsigned int sta;
+
+	sta = get_slot_status(slot);
+
+	return (sta == 0) ? 0 : 1;
+}
diff -Nru a/drivers/hotplug/acpiphp_pci.c b/drivers/hotplug/acpiphp_pci.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/hotplug/acpiphp_pci.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,692 @@
+/*
+ * ACPI PCI HotPlug PCI configuration space management
+ *
+ * Copyright (c) 1995,2001 Compaq Computer Corporation
+ * Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com)
+ * Copyright (c) 2001,2002 IBM Corp.
+ * Copyright (c) 2002 Takayoshi Kochi (t-kouchi@cq.jp.nec.com)
+ * Copyright (c) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
+ * Copyright (c) 2002 NEC Corporation
+ *
+ * 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.
+ *
+ * Send feedback to <t-kouchi@cq.jp.nec.com>
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+#include <linux/acpi.h>
+#include "pci_hotplug.h"
+#include "acpiphp.h"
+
+#define MY_NAME "acpiphp_pci"
+
+
+/* allocate mem/pmem/io resource to a new function */
+static int init_config_space (struct acpiphp_func *func)
+{
+	u32 bar, len;
+	u32 address[] = {
+		PCI_BASE_ADDRESS_0,
+		PCI_BASE_ADDRESS_1,
+		PCI_BASE_ADDRESS_2,
+		PCI_BASE_ADDRESS_3,
+		PCI_BASE_ADDRESS_4,
+		PCI_BASE_ADDRESS_5,
+		0
+	};
+	int count;
+	struct acpiphp_bridge *bridge;
+	struct pci_resource *res;
+	struct pci_bus *pbus;
+	int bus, device, function;
+	unsigned int devfn;
+	u16 tmp;
+
+	bridge = func->slot->bridge;
+	pbus = bridge->pci_bus;
+	bus = bridge->bus;
+	device = func->slot->device;
+	function = func->function;
+	devfn = PCI_DEVFN(device, function);
+
+	for (count = 0; address[count]; count++) {	/* for 6 BARs */
+		pci_bus_write_config_dword(pbus, devfn,
+					   address[count], 0xFFFFFFFF);
+		pci_bus_read_config_dword(pbus, devfn, address[count], &bar);
+
+		if (!bar)	/* This BAR is not implemented */
+			continue;
+
+		dbg("Device %02x.%02x BAR %d wants %x", device, function, count, bar);
+
+		if (bar & PCI_BASE_ADDRESS_SPACE_IO) {
+			/* This is IO */
+
+			len = bar & 0xFFFFFFFC;
+			len = ~len + 1;
+
+			dbg ("len in IO %x, BAR %d", len, count);
+
+			spin_lock(&bridge->res_lock);
+			res = acpiphp_get_io_resource(&bridge->io_head, len);
+			spin_unlock(&bridge->res_lock);
+
+			if (!res) {
+				err("cannot allocate requested io for %02x:%02x.%d len %x\n",
+				    bus, device, function, len);
+				return -1;
+			}
+			pci_bus_write_config_dword(pbus, devfn,
+						   address[count],
+						   (u32)res->base);
+			res->next = func->io_head;
+			func->io_head = res;
+
+		} else {
+			/* This is Memory */
+			if (bar & PCI_BASE_ADDRESS_MEM_PREFETCH) {
+				/* pfmem */
+
+				len = bar & 0xFFFFFFF0;
+				len = ~len + 1;
+
+				dbg("len in PFMEM %x, BAR %d", len, count);
+
+				spin_lock(&bridge->res_lock);
+				res = acpiphp_get_resource(&bridge->p_mem_head, len);
+				spin_unlock(&bridge->res_lock);
+
+				if (!res) {
+					err("cannot allocate requested pfmem for %02x:%02x.%d len %x\n",
+					    bus, device, function, len);
+					return -1;
+				}
+
+				pci_bus_write_config_dword(pbus, devfn,
+							   address[count],
+							   (u32)res->base);
+
+				if (bar & PCI_BASE_ADDRESS_MEM_TYPE_64) {	/* takes up another dword */
+					dbg ("inside the pfmem 64 case, count %d", count);
+					count += 1;
+					pci_bus_write_config_dword(pbus, devfn,
+								   address[count],
+								   (u32)(res->base >> 32));
+				}
+
+				res->next = func->p_mem_head;
+				func->p_mem_head = res;
+
+			} else {
+				/* regular memory */
+
+				len = bar & 0xFFFFFFF0;
+				len = ~len + 1;
+
+				dbg("len in MEM %x, BAR %d", len, count);
+
+				spin_lock(&bridge->res_lock);
+				res = acpiphp_get_resource(&bridge->mem_head, len);
+				spin_unlock(&bridge->res_lock);
+
+				if (!res) {
+					err("cannot allocate requested pfmem for %02x:%02x.%d len %x\n",
+					    bus, device, function, len);
+					return -1;
+				}
+
+				pci_bus_write_config_dword(pbus, devfn,
+							   address[count],
+							   (u32)res->base);
+
+				if (bar & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+					/* takes up another dword */
+					dbg ("inside mem 64 case, reg. mem, count %d", count);
+					count += 1;
+					pci_bus_write_config_dword(pbus, devfn,
+								   address[count],
+								   (u32)(res->base >> 32));
+				}
+
+				res->next = func->mem_head;
+				func->mem_head = res;
+
+			}
+		}
+	}
+
+	/* disable expansion rom */
+	pci_bus_write_config_dword(pbus, devfn, PCI_ROM_ADDRESS, 0x00000000);
+
+	/* set PCI parameters from _HPP */
+	pci_bus_write_config_byte(pbus, devfn, PCI_CACHE_LINE_SIZE,
+				  bridge->hpp.cache_line_size);
+	pci_bus_write_config_byte(pbus, devfn, PCI_LATENCY_TIMER,
+				  bridge->hpp.latency_timer);
+
+	pci_bus_read_config_word(pbus, devfn, PCI_COMMAND, &tmp);
+	if (bridge->hpp.enable_SERR)
+		tmp |= PCI_COMMAND_SERR;
+	if (bridge->hpp.enable_PERR)
+		tmp |= PCI_COMMAND_PARITY;
+	pci_bus_write_config_word(pbus, devfn, PCI_COMMAND, tmp);
+
+	return 0;
+}
+
+
+/* enable pci_dev */
+static int configure_pci_dev (struct pci_dev_wrapped *wrapped_dev, struct pci_bus_wrapped *wrapped_bus)
+{
+	struct acpiphp_func *func;
+	struct acpiphp_bridge *bridge;
+	struct pci_dev *dev;
+
+	func = (struct acpiphp_func *)wrapped_dev->data;
+	bridge = (struct acpiphp_bridge *)wrapped_bus->data;
+	dev = wrapped_dev->dev;
+
+	/* TBD: support PCI-to-PCI bridge case */
+	if (!func || !bridge)
+		return 0;
+
+	//pci_proc_attach_device(dev);
+	//pci_announce_device_to_drivers(dev);
+	info("Device %s configured", dev->slot_name);
+
+	return 0;
+}
+
+
+static int is_pci_dev_in_use (struct pci_dev* dev) 
+{
+	/* 
+	 * dev->driver will be set if the device is in use by a new-style 
+	 * driver -- otherwise, check the device's regions to see if any
+	 * driver has claimed them
+	 */
+
+	int i, inuse=0;
+
+	if (dev->driver) return 1; //assume driver feels responsible
+
+	for (i = 0; !dev->driver && !inuse && (i < 6); i++) {
+		if (!pci_resource_start(dev, i))
+			continue;
+
+		if (pci_resource_flags(dev, i) & IORESOURCE_IO)
+			inuse = check_region(pci_resource_start(dev, i),
+					     pci_resource_len(dev, i));
+		else if (pci_resource_flags(dev, i) & IORESOURCE_MEM)
+			inuse = check_mem_region(pci_resource_start(dev, i),
+						 pci_resource_len(dev, i));
+	}
+
+	return inuse;
+}
+
+
+static int pci_hp_remove_device (struct pci_dev *dev)
+{
+	if (is_pci_dev_in_use(dev)) {
+		err("***Cannot safely power down device -- "
+		       "it appears to be in use***\n");
+		return -EBUSY;
+	}
+	pci_remove_device(dev);
+	return 0;
+}
+
+
+/* remove device driver */
+static int unconfigure_pci_dev_driver (struct pci_dev_wrapped *wrapped_dev, struct pci_bus_wrapped *wrapped_bus)
+{
+	struct pci_dev *dev = wrapped_dev->dev;
+
+	dbg("attempting removal of driver for device %s", dev->slot_name);
+
+	/* Now, remove the Linux Driver Representation */
+	if (dev->driver) {
+		if (dev->driver->remove) {
+			dev->driver->remove(dev);
+			dbg("driver was properly removed");
+		}
+		dev->driver = NULL;
+	}
+
+	return is_pci_dev_in_use(dev);
+}
+
+
+/* remove pci_dev itself from system */
+static int unconfigure_pci_dev (struct pci_dev_wrapped *wrapped_dev, struct pci_bus_wrapped *wrapped_bus)
+{
+	struct pci_dev *dev = wrapped_dev->dev;
+
+	/* Now, remove the Linux Representation */
+	if (dev) {
+		if (pci_hp_remove_device(dev) == 0) {
+			info("Device %s removed", dev->slot_name);
+			kfree(dev); /* Now, remove */
+		} else {
+			return -1; /* problems while freeing, abort visitation */
+		}
+	}
+
+	return 0;
+}
+
+
+/* remove pci_bus itself from system */
+static int unconfigure_pci_bus (struct pci_bus_wrapped *wrapped_bus, struct pci_dev_wrapped *wrapped_dev)
+{
+	struct pci_bus *bus = wrapped_bus->bus;
+
+#ifdef CONFIG_PROC_FS
+	/* Now, remove the Linux Representation */
+	if (bus->procdir) {
+		pci_proc_detach_bus(bus);
+	}
+#endif
+	/* the cleanup code should live in the kernel ... */
+	bus->self->subordinate = NULL;
+	/* unlink from parent bus */
+	list_del(&bus->node);
+
+	/* Now, remove */
+	if (bus)
+		kfree(bus);
+
+	return 0;
+}
+
+
+/* detect_used_resource - subtract resource under dev from bridge */
+static int detect_used_resource (struct acpiphp_bridge *bridge, struct pci_dev *dev)
+{
+	u32 bar, len;
+	u64 base;
+	u32 address[] = {
+		PCI_BASE_ADDRESS_0,
+		PCI_BASE_ADDRESS_1,
+		PCI_BASE_ADDRESS_2,
+		PCI_BASE_ADDRESS_3,
+		PCI_BASE_ADDRESS_4,
+		PCI_BASE_ADDRESS_5,
+		0
+	};
+	int count;
+	struct pci_resource *res;
+
+	dbg("Device %s", dev->slot_name);
+
+	for (count = 0; address[count]; count++) {	/* for 6 BARs */
+		pci_read_config_dword(dev, address[count], &bar);
+
+		if (!bar)	/* This BAR is not implemented */
+			continue;
+
+		pci_write_config_dword(dev, address[count], 0xFFFFFFFF);
+		pci_read_config_dword(dev, address[count], &len);
+
+		if (len & PCI_BASE_ADDRESS_SPACE_IO) {
+			/* This is IO */
+			base = bar & 0xFFFFFFFC;
+			len &= 0xFFFFFFFC;
+			len = ~len + 1;
+
+			dbg("BAR[%d] %08x - %08x (IO)", count, (u32)base, (u32)base + len - 1);
+
+			spin_lock(&bridge->res_lock);
+			res = acpiphp_get_resource_with_base(&bridge->io_head, base, len);
+			spin_unlock(&bridge->res_lock);
+			if (res)
+				kfree(res);
+		} else {
+			/* This is Memory */
+			base = bar & 0xFFFFFFF0;
+			if (len & PCI_BASE_ADDRESS_MEM_PREFETCH) {
+				/* pfmem */
+
+				len &= 0xFFFFFFF0;
+				len = ~len + 1;
+
+				if (len & PCI_BASE_ADDRESS_MEM_TYPE_64) {	/* takes up another dword */
+					dbg ("prefetch mem 64");
+					count += 1;
+				}
+				dbg("BAR[%d] %08x - %08x (PMEM)", count, (u32)base, (u32)base + len - 1);
+				spin_lock(&bridge->res_lock);
+				res = acpiphp_get_resource_with_base(&bridge->p_mem_head, base, len);
+				spin_unlock(&bridge->res_lock);
+				if (res)
+					kfree(res);
+			} else {
+				/* regular memory */
+
+				len &= 0xFFFFFFF0;
+				len = ~len + 1;
+
+				if (len & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+					/* takes up another dword */
+					dbg ("mem 64");
+					count += 1;
+				}
+				dbg("BAR[%d] %08x - %08x (MEM)", count, (u32)base, (u32)base + len - 1);
+				spin_lock(&bridge->res_lock);
+				res = acpiphp_get_resource_with_base(&bridge->mem_head, base, len);
+				spin_unlock(&bridge->res_lock);
+				if (res)
+					kfree(res);
+			}
+		}
+
+		pci_write_config_dword(dev, address[count], bar);
+	}
+
+	return 0;
+}
+
+
+/* detect_pci_resource_bus - subtract resource under pci_bus */
+static void detect_used_resource_bus(struct acpiphp_bridge *bridge, struct pci_bus *bus)
+{
+	struct list_head *l;
+	struct pci_dev *dev;
+
+	list_for_each(l, &bus->devices) {
+		dev = pci_dev_b(l);
+		detect_used_resource(bridge, dev);
+		/* XXX recursive call */
+		if (dev->subordinate)
+			detect_used_resource_bus(bridge, dev->subordinate);
+	}
+}
+
+
+/**
+ * acpiphp_detect_pci_resource - detect resources under bridge
+ * @bridge: detect all resources already used under this bridge
+ *
+ * collect all resources already allocated for all devices under a bridge.
+ */
+int acpiphp_detect_pci_resource (struct acpiphp_bridge *bridge)
+{
+	detect_used_resource_bus(bridge, bridge->pci_bus);
+
+	return 0;
+}
+
+
+/**
+ * acpiphp_init_slot_resource - gather resource usage information of a slot
+ * @slot: ACPI slot object to be checked, should have valid pci_dev member
+ *
+ * TBD: PCI-to-PCI bridge case
+ *      use pci_dev->resource[]
+ */
+int acpiphp_init_func_resource (struct acpiphp_func *func)
+{
+	u64 base;
+	u32 bar, len;
+	u32 address[] = {
+		PCI_BASE_ADDRESS_0,
+		PCI_BASE_ADDRESS_1,
+		PCI_BASE_ADDRESS_2,
+		PCI_BASE_ADDRESS_3,
+		PCI_BASE_ADDRESS_4,
+		PCI_BASE_ADDRESS_5,
+		0
+	};
+	int count;
+	struct pci_resource *res;
+	struct pci_dev *dev;
+
+	dev = func->pci_dev;
+	dbg("Hot-pluggable device %s", dev->slot_name);
+
+	for (count = 0; address[count]; count++) {	/* for 6 BARs */
+		pci_read_config_dword (dev, address[count], &bar);
+
+		if (!bar)	/* This BAR is not implemented */
+			continue;
+
+		pci_write_config_dword (dev, address[count], 0xFFFFFFFF);
+		pci_read_config_dword (dev, address[count], &len);
+
+		if (len & PCI_BASE_ADDRESS_SPACE_IO) {
+			/* This is IO */
+			base = bar & 0xFFFFFFFC;
+			len &= 0xFFFFFFFC;
+			len = ~len + 1;
+
+			dbg("BAR[%d] %08x - %08x (IO)", count, (u32)base, (u32)base + len - 1);
+
+			res = acpiphp_make_resource(base, len);
+			if (!res)
+				goto no_memory;
+
+			res->next = func->io_head;
+			func->io_head = res;
+
+		} else {
+			/* This is Memory */
+			base = bar & 0xFFFFFFF0;
+			if (len & PCI_BASE_ADDRESS_MEM_PREFETCH) {
+				/* pfmem */
+
+				len &= 0xFFFFFFF0;
+				len = ~len + 1;
+
+				if (len & PCI_BASE_ADDRESS_MEM_TYPE_64) {	/* takes up another dword */
+					dbg ("prefetch mem 64");
+					count += 1;
+				}
+				dbg("BAR[%d] %08x - %08x (PMEM)", count, (u32)base, (u32)base + len - 1);
+				res = acpiphp_make_resource(base, len);
+				if (!res)
+					goto no_memory;
+
+				res->next = func->p_mem_head;
+				func->p_mem_head = res;
+
+			} else {
+				/* regular memory */
+
+				len &= 0xFFFFFFF0;
+				len = ~len + 1;
+
+				if (len & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+					/* takes up another dword */
+					dbg ("mem 64");
+					count += 1;
+				}
+				dbg("BAR[%d] %08x - %08x (MEM)", count, (u32)base, (u32)base + len - 1);
+				res = acpiphp_make_resource(base, len);
+				if (!res)
+					goto no_memory;
+
+				res->next = func->mem_head;
+				func->mem_head = res;
+
+			}
+		}
+
+		pci_write_config_dword (dev, address[count], bar);
+	}
+#if 1
+	acpiphp_dump_func_resource(func);
+#endif
+
+	return 0;
+
+ no_memory:
+	err("out of memory");
+	acpiphp_free_resource(&func->io_head);
+	acpiphp_free_resource(&func->mem_head);
+	acpiphp_free_resource(&func->p_mem_head);
+
+	return -1;
+}
+
+
+/**
+ * acpiphp_configure_slot - allocate PCI resources
+ * @slot: slot to be configured
+ *
+ * initializes a PCI functions on a device inserted
+ * into the slot
+ *
+ */
+int acpiphp_configure_slot (struct acpiphp_slot *slot)
+{
+	struct acpiphp_func *func;
+	struct list_head *l;
+	u8 hdr;
+	u32 dvid;
+	int retval = 0;
+	int is_multi = 0;
+
+	pci_bus_read_config_byte(slot->bridge->pci_bus,
+				 PCI_DEVFN(slot->device, 0),
+				 PCI_HEADER_TYPE, &hdr);
+
+	if (hdr & 0x80)
+		is_multi = 1;
+
+	list_for_each(l, &slot->funcs) {
+		func = list_entry(l, struct acpiphp_func, sibling);
+		if (is_multi || func->function == 0) {
+			pci_bus_read_config_dword(slot->bridge->pci_bus,
+						  PCI_DEVFN(slot->device,
+							    func->function),
+						  PCI_VENDOR_ID, &dvid);
+			if (dvid != 0xffffffff) {
+				retval = init_config_space(func);
+
+				if (retval)
+					break;
+			}
+		}
+	}
+
+	return retval;
+}
+
+
+/* for pci_visit_dev() */
+static struct pci_visit configure_functions = {
+	.post_visit_pci_dev =	configure_pci_dev
+};
+
+static struct pci_visit unconfigure_functions_phase1 = {
+	.post_visit_pci_dev =	unconfigure_pci_dev_driver
+};
+
+static struct pci_visit unconfigure_functions_phase2 = {
+	.post_visit_pci_bus =	unconfigure_pci_bus,
+	.post_visit_pci_dev =	unconfigure_pci_dev
+};
+
+
+/**
+ * acpiphp_configure_function - configure PCI function
+ * @func: function to be configured
+ *
+ * initializes a PCI functions on a device inserted
+ * into the slot
+ *
+ */
+int acpiphp_configure_function (struct acpiphp_func *func)
+{
+	int retval = 0;
+	struct pci_dev_wrapped wrapped_dev;
+	struct pci_bus_wrapped wrapped_bus;
+	struct acpiphp_bridge *bridge;
+
+	/* if pci_dev is NULL, ignore it */
+	if (!func->pci_dev)
+		goto err_exit;
+
+	bridge = func->slot->bridge;
+
+	memset(&wrapped_dev, 0, sizeof(struct pci_dev_wrapped));
+	memset(&wrapped_bus, 0, sizeof(struct pci_bus_wrapped));
+	wrapped_dev.dev = func->pci_dev;
+	wrapped_dev.data = func;
+	wrapped_bus.bus = bridge->pci_bus;
+	wrapped_bus.data = bridge;
+
+	retval = pci_visit_dev(&configure_functions, &wrapped_dev, &wrapped_bus);
+	if (retval)
+		goto err_exit;
+
+ err_exit:
+	return retval;
+}
+
+
+/**
+ * acpiphp_unconfigure_function - unconfigure PCI function
+ * @func: function to be unconfigured
+ *
+ */
+int acpiphp_unconfigure_function (struct acpiphp_func *func)
+{
+	struct acpiphp_bridge *bridge;
+	struct pci_dev_wrapped wrapped_dev;
+	struct pci_bus_wrapped wrapped_bus;
+	int retval = 0;
+
+	/* if pci_dev is NULL, ignore it */
+	if (!func->pci_dev)
+		goto err_exit;
+
+	memset(&wrapped_dev, 0, sizeof(struct pci_dev_wrapped));
+	memset(&wrapped_bus, 0, sizeof(struct pci_bus_wrapped));
+	wrapped_dev.dev = func->pci_dev;
+	//wrapped_dev.data = func;
+	wrapped_bus.bus = func->slot->bridge->pci_bus;
+	//wrapped_bus.data = func->slot->bridge;
+
+	retval = pci_visit_dev(&unconfigure_functions_phase1, &wrapped_dev, &wrapped_bus);
+	if (retval)
+		goto err_exit;
+
+	retval = pci_visit_dev(&unconfigure_functions_phase2, &wrapped_dev, &wrapped_bus);
+	if (retval)
+		goto err_exit;
+
+	/* free all resources */
+	bridge = func->slot->bridge;
+
+	spin_lock(&bridge->res_lock);
+	acpiphp_move_resource(&func->io_head, &bridge->io_head);
+	acpiphp_move_resource(&func->mem_head, &bridge->mem_head);
+	acpiphp_move_resource(&func->p_mem_head, &bridge->p_mem_head);
+	acpiphp_move_resource(&func->bus_head, &bridge->bus_head);
+	spin_unlock(&bridge->res_lock);
+
+ err_exit:
+	return retval;
+}
diff -Nru a/drivers/hotplug/acpiphp_res.c b/drivers/hotplug/acpiphp_res.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/hotplug/acpiphp_res.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,699 @@
+/*
+ * ACPI PCI HotPlug Utility functions
+ *
+ * Copyright (c) 1995,2001 Compaq Computer Corporation
+ * Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com)
+ * Copyright (c) 2001 IBM Corp.
+ * Copyright (c) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
+ * Copyright (c) 2002 Takayoshi Kochi (t-kouchi@cq.jp.nec.com)
+ * Copyright (c) 2002 NEC Corporation
+ *
+ * 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.
+ *
+ * Send feedback to <gregkh@us.ibm.com>,<h-aono@ap.jp.nec.com>
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/proc_fs.h>
+#include <linux/sysctl.h>
+#include <linux/pci.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/init.h>
+
+#include <linux/string.h>
+#include <linux/mm.h>
+#include <linux/errno.h>
+#include <linux/ioport.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+#include <linux/timer.h>
+
+#include <linux/ioctl.h>
+#include <linux/fcntl.h>
+
+#include <linux/list.h>
+
+#include "pci_hotplug.h"
+#include "acpiphp.h"
+
+#define MY_NAME "acpiphp_res"
+
+
+/*
+ * sort_by_size - sort nodes by their length, smallest first
+ */
+static int sort_by_size(struct pci_resource **head)
+{
+	struct pci_resource *current_res;
+	struct pci_resource *next_res;
+	int out_of_order = 1;
+
+	if (!(*head))
+		return 1;
+
+	if (!((*head)->next))
+		return 0;
+
+	while (out_of_order) {
+		out_of_order = 0;
+
+		/* Special case for swapping list head */
+		if (((*head)->next) &&
+		    ((*head)->length > (*head)->next->length)) {
+			out_of_order++;
+			current_res = *head;
+			*head = (*head)->next;
+			current_res->next = (*head)->next;
+			(*head)->next = current_res;
+		}
+
+		current_res = *head;
+
+		while (current_res->next && current_res->next->next) {
+			if (current_res->next->length > current_res->next->next->length) {
+				out_of_order++;
+				next_res = current_res->next;
+				current_res->next = current_res->next->next;
+				current_res = current_res->next;
+				next_res->next = current_res->next;
+				current_res->next = next_res;
+			} else
+				current_res = current_res->next;
+		}
+	}  /* End of out_of_order loop */
+
+	return 0;
+}
+
+
+/*
+ * sort_by_max_size - sort nodes by their length, largest first
+ */
+static int sort_by_max_size(struct pci_resource **head)
+{
+	struct pci_resource *current_res;
+	struct pci_resource *next_res;
+	int out_of_order = 1;
+
+	if (!(*head))
+		return 1;
+
+	if (!((*head)->next))
+		return 0;
+
+	while (out_of_order) {
+		out_of_order = 0;
+
+		/* Special case for swapping list head */
+		if (((*head)->next) &&
+		    ((*head)->length < (*head)->next->length)) {
+			out_of_order++;
+			current_res = *head;
+			*head = (*head)->next;
+			current_res->next = (*head)->next;
+			(*head)->next = current_res;
+		}
+
+		current_res = *head;
+
+		while (current_res->next && current_res->next->next) {
+			if (current_res->next->length < current_res->next->next->length) {
+				out_of_order++;
+				next_res = current_res->next;
+				current_res->next = current_res->next->next;
+				current_res = current_res->next;
+				next_res->next = current_res->next;
+				current_res->next = next_res;
+			} else
+				current_res = current_res->next;
+		}
+	}  /* End of out_of_order loop */
+
+	return 0;
+}
+
+/**
+ * get_io_resource - get resource for I/O ports
+ *
+ * this function sorts the resource list by size and then
+ * returns the first node of "size" length that is not in the
+ * ISA aliasing window.  If it finds a node larger than "size"
+ * it will split it up.
+ *
+ * size must be a power of two.
+ *
+ * difference from get_resource is handling of ISA aliasing space.
+ *
+ */
+struct pci_resource *acpiphp_get_io_resource (struct pci_resource **head, u32 size)
+{
+	struct pci_resource *prevnode;
+	struct pci_resource *node;
+	struct pci_resource *split_node;
+	u64 temp_qword;
+
+	if (!(*head))
+		return NULL;
+
+	if (acpiphp_resource_sort_and_combine(head))
+		return NULL;
+
+	if (sort_by_size(head))
+		return NULL;
+
+	for (node = *head; node; node = node->next) {
+		if (node->length < size)
+			continue;
+
+		if (node->base & (size - 1)) {
+			/* this one isn't base aligned properly
+			   so we'll make a new entry and split it up */
+			temp_qword = (node->base | (size-1)) + 1;
+
+			/* Short circuit if adjusted size is too small */
+			if ((node->length - (temp_qword - node->base)) < size)
+				continue;
+
+			split_node = acpiphp_make_resource(node->base, temp_qword - node->base);
+
+			if (!split_node)
+				return NULL;
+
+			node->base = temp_qword;
+			node->length -= split_node->length;
+
+			/* Put it in the list */
+			split_node->next = node->next;
+			node->next = split_node;
+		} /* End of non-aligned base */
+
+		/* Don't need to check if too small since we already did */
+		if (node->length > size) {
+			/* this one is longer than we need
+			   so we'll make a new entry and split it up */
+			split_node = acpiphp_make_resource(node->base + size, node->length - size);
+
+			if (!split_node)
+				return NULL;
+
+			node->length = size;
+
+			/* Put it in the list */
+			split_node->next = node->next;
+			node->next = split_node;
+		}  /* End of too big on top end */
+
+		/* For IO make sure it's not in the ISA aliasing space */
+		if (node->base & 0x300L)
+			continue;
+
+		/* If we got here, then it is the right size
+		   Now take it out of the list */
+		if (*head == node) {
+			*head = node->next;
+		} else {
+			prevnode = *head;
+			while (prevnode->next != node)
+				prevnode = prevnode->next;
+
+			prevnode->next = node->next;
+		}
+		node->next = NULL;
+		/* Stop looping */
+		break;
+	}
+
+	return node;
+}
+
+
+/**
+ * get_max_resource - get the largest resource
+ *
+ * Gets the largest node that is at least "size" big from the
+ * list pointed to by head.  It aligns the node on top and bottom
+ * to "size" alignment before returning it.
+ */
+struct pci_resource *acpiphp_get_max_resource (struct pci_resource **head, u32 size)
+{
+	struct pci_resource *max;
+	struct pci_resource *temp;
+	struct pci_resource *split_node;
+	u64 temp_qword;
+
+	if (!(*head))
+		return NULL;
+
+	if (acpiphp_resource_sort_and_combine(head))
+		return NULL;
+
+	if (sort_by_max_size(head))
+		return NULL;
+
+	for (max = *head;max; max = max->next) {
+
+		/* If not big enough we could probably just bail, 
+		   instead we'll continue to the next. */
+		if (max->length < size)
+			continue;
+
+		if (max->base & (size - 1)) {
+			/* this one isn't base aligned properly
+			   so we'll make a new entry and split it up */
+			temp_qword = (max->base | (size-1)) + 1;
+
+			/* Short circuit if adjusted size is too small */
+			if ((max->length - (temp_qword - max->base)) < size)
+				continue;
+
+			split_node = acpiphp_make_resource(max->base, temp_qword - max->base);
+
+			if (!split_node)
+				return NULL;
+
+			max->base = temp_qword;
+			max->length -= split_node->length;
+
+			/* Put it next in the list */
+			split_node->next = max->next;
+			max->next = split_node;
+		}
+
+		if ((max->base + max->length) & (size - 1)) {
+			/* this one isn't end aligned properly at the top
+			   so we'll make a new entry and split it up */
+			temp_qword = ((max->base + max->length) & ~(size - 1));
+
+			split_node = acpiphp_make_resource(temp_qword,
+							   max->length + max->base - temp_qword);
+
+			if (!split_node)
+				return NULL;
+
+			max->length -= split_node->length;
+
+			/* Put it in the list */
+			split_node->next = max->next;
+			max->next = split_node;
+		}
+
+		/* Make sure it didn't shrink too much when we aligned it */
+		if (max->length < size)
+			continue;
+
+		/* Now take it out of the list */
+		temp = (struct pci_resource*) *head;
+		if (temp == max) {
+			*head = max->next;
+		} else {
+			while (temp && temp->next != max) {
+				temp = temp->next;
+			}
+
+			temp->next = max->next;
+		}
+
+		max->next = NULL;
+		return max;
+	}
+
+	/* If we get here, we couldn't find one */
+	return NULL;
+}
+
+
+/**
+ * get_resource - get resource (mem, pfmem)
+ *
+ * this function sorts the resource list by size and then
+ * returns the first node of "size" length.  If it finds a node
+ * larger than "size" it will split it up.
+ *
+ * size must be a power of two.
+ *
+ */
+struct pci_resource *acpiphp_get_resource (struct pci_resource **head, u32 size)
+{
+	struct pci_resource *prevnode;
+	struct pci_resource *node;
+	struct pci_resource *split_node;
+	u64 temp_qword;
+
+	if (!(*head))
+		return NULL;
+
+	if (acpiphp_resource_sort_and_combine(head))
+		return NULL;
+
+	if (sort_by_size(head))
+		return NULL;
+
+	for (node = *head; node; node = node->next) {
+		dbg("%s: req_size =%x node=%p, base=%x, length=%x",
+		    __FUNCTION__, size, node, (u32)node->base, node->length);
+		if (node->length < size)
+			continue;
+
+		if (node->base & (size - 1)) {
+			dbg("%s: not aligned", __FUNCTION__);
+			/* this one isn't base aligned properly
+			   so we'll make a new entry and split it up */
+			temp_qword = (node->base | (size-1)) + 1;
+
+			/* Short circuit if adjusted size is too small */
+			if ((node->length - (temp_qword - node->base)) < size)
+				continue;
+
+			split_node = acpiphp_make_resource(node->base, temp_qword - node->base);
+
+			if (!split_node)
+				return NULL;
+
+			node->base = temp_qword;
+			node->length -= split_node->length;
+
+			/* Put it in the list */
+			split_node->next = node->next;
+			node->next = split_node;
+		} /* End of non-aligned base */
+
+		/* Don't need to check if too small since we already did */
+		if (node->length > size) {
+			dbg("%s: too big", __FUNCTION__);
+			/* this one is longer than we need
+			   so we'll make a new entry and split it up */
+			split_node = acpiphp_make_resource(node->base + size, node->length - size);
+
+			if (!split_node)
+				return NULL;
+
+			node->length = size;
+
+			/* Put it in the list */
+			split_node->next = node->next;
+			node->next = split_node;
+		}  /* End of too big on top end */
+
+		dbg("%s: got one!!!", __FUNCTION__);
+		/* If we got here, then it is the right size
+		   Now take it out of the list */
+		if (*head == node) {
+			*head = node->next;
+		} else {
+			prevnode = *head;
+			while (prevnode->next != node)
+				prevnode = prevnode->next;
+
+			prevnode->next = node->next;
+		}
+		node->next = NULL;
+		/* Stop looping */
+		break;
+	}
+	return node;
+}
+
+/**
+ * get_resource_with_base - get resource with specific base address
+ *
+ * this function 
+ * returns the first node of "size" length located at specified base address.
+ * If it finds a node larger than "size" it will split it up.
+ *
+ * size must be a power of two.
+ *
+ */
+struct pci_resource *acpiphp_get_resource_with_base (struct pci_resource **head, u64 base, u32 size)
+{
+	struct pci_resource *prevnode;
+	struct pci_resource *node;
+	struct pci_resource *split_node;
+	u64 temp_qword;
+
+	if (!(*head))
+		return NULL;
+
+	if (acpiphp_resource_sort_and_combine(head))
+		return NULL;
+
+	for (node = *head; node; node = node->next) {
+		dbg(": 1st req_base=%x req_size =%x node=%p, base=%x, length=%x",
+		    (u32)base, size, node, (u32)node->base, node->length);
+		if (node->base > base)
+			continue;
+
+		if ((node->base + node->length) < (base + size))
+			continue;
+
+		if (node->base < base) {
+			dbg(": split 1");
+			/* this one isn't base aligned properly
+			   so we'll make a new entry and split it up */
+			temp_qword = base;
+
+			/* Short circuit if adjusted size is too small */
+			if ((node->length - (temp_qword - node->base)) < size)
+				continue;
+
+			split_node = acpiphp_make_resource(node->base, temp_qword - node->base);
+
+			if (!split_node)
+				return NULL;
+
+			node->base = temp_qword;
+			node->length -= split_node->length;
+
+			/* Put it in the list */
+			split_node->next = node->next;
+			node->next = split_node;
+		}
+
+		dbg(": 2nd req_base=%x req_size =%x node=%p, base=%x, length=%x",
+		    (u32)base, size, node, (u32)node->base, node->length);
+
+		/* Don't need to check if too small since we already did */
+		if (node->length > size) {
+			dbg(": split 2");
+			/* this one is longer than we need
+			   so we'll make a new entry and split it up */
+			split_node = acpiphp_make_resource(node->base + size, node->length - size);
+
+			if (!split_node)
+				return NULL;
+
+			node->length = size;
+
+			/* Put it in the list */
+			split_node->next = node->next;
+			node->next = split_node;
+		}  /* End of too big on top end */
+
+		dbg(": got one!!!");
+		/* If we got here, then it is the right size
+		   Now take it out of the list */
+		if (*head == node) {
+			*head = node->next;
+		} else {
+			prevnode = *head;
+			while (prevnode->next != node)
+				prevnode = prevnode->next;
+
+			prevnode->next = node->next;
+		}
+		node->next = NULL;
+		/* Stop looping */
+		break;
+	}
+	return node;
+}
+
+
+/**
+ * acpiphp_resource_sort_and_combine
+ *
+ * Sorts all of the nodes in the list in ascending order by
+ * their base addresses.  Also does garbage collection by
+ * combining adjacent nodes.
+ *
+ * returns 0 if success
+ */
+int acpiphp_resource_sort_and_combine (struct pci_resource **head)
+{
+	struct pci_resource *node1;
+	struct pci_resource *node2;
+	int out_of_order = 1;
+
+	if (!(*head))
+		return 1;
+
+	dbg("*head->next = %p",(*head)->next);
+
+	if (!(*head)->next)
+		return 0;	/* only one item on the list, already sorted! */
+
+	dbg("*head->base = 0x%x",(u32)(*head)->base);
+	dbg("*head->next->base = 0x%x", (u32)(*head)->next->base);
+	while (out_of_order) {
+		out_of_order = 0;
+
+		/* Special case for swapping list head */
+		if (((*head)->next) &&
+		    ((*head)->base > (*head)->next->base)) {
+			node1 = *head;
+			(*head) = (*head)->next;
+			node1->next = (*head)->next;
+			(*head)->next = node1;
+			out_of_order++;
+		}
+
+		node1 = (*head);
+
+		while (node1->next && node1->next->next) {
+			if (node1->next->base > node1->next->next->base) {
+				out_of_order++;
+				node2 = node1->next;
+				node1->next = node1->next->next;
+				node1 = node1->next;
+				node2->next = node1->next;
+				node1->next = node2;
+			} else
+				node1 = node1->next;
+		}
+	}  /* End of out_of_order loop */
+
+	node1 = *head;
+
+	while (node1 && node1->next) {
+		if ((node1->base + node1->length) == node1->next->base) {
+			/* Combine */
+			dbg("8..");
+			node1->length += node1->next->length;
+			node2 = node1->next;
+			node1->next = node1->next->next;
+			kfree(node2);
+		} else
+			node1 = node1->next;
+	}
+
+	return 0;
+}
+
+
+/**
+ * acpiphp_make_resource - make resource structure
+ * @base: base address of a resource
+ * @length: length of a resource
+ */
+struct pci_resource *acpiphp_make_resource (u64 base, u32 length)
+{
+	struct pci_resource *res;
+
+	res = kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
+	if (res) {
+		memset(res, 0, sizeof(struct pci_resource));
+		res->base = base;
+		res->length = length;
+	}
+
+	return res;
+}
+
+
+/**
+ * acpiphp_move_resource - move linked resources from one to another
+ * @from: head of linked resource list
+ * @to: head of linked resource list
+ */
+void acpiphp_move_resource (struct pci_resource **from, struct pci_resource **to)
+{
+	struct pci_resource *tmp;
+
+	while (*from) {
+		tmp = (*from)->next;
+		(*from)->next = *to;
+		*to = *from;
+		*from = tmp;
+	}
+
+	/* *from = NULL is guaranteed */
+}
+
+
+/**
+ * acpiphp_free_resource - free all linked resources
+ * @res: head of linked resource list
+ */
+void acpiphp_free_resource (struct pci_resource **res)
+{
+	struct pci_resource *tmp;
+
+	while (*res) {
+		tmp = (*res)->next;
+		kfree(*res);
+		*res = tmp;
+	}
+
+	/* *res = NULL is guaranteed */
+}
+
+
+/* debug support functions;  will go away sometime :) */
+static void dump_resource(struct pci_resource *head)
+{
+	struct pci_resource *p;
+	int cnt;
+
+	p = head;
+	cnt = 0;
+
+	while (p) {
+		dbg("[%02d] %08x - %08x",
+		    cnt++, (u32)p->base, (u32)p->base + p->length - 1);
+		p = p->next;
+	}
+}
+
+void acpiphp_dump_resource(struct acpiphp_bridge *bridge)
+{
+	dbg("I/O resource:");
+	dump_resource(bridge->io_head);
+	dbg("MEM resource:");
+	dump_resource(bridge->mem_head);
+	dbg("PMEM resource:");
+	dump_resource(bridge->p_mem_head);
+	dbg("BUS resource:");
+	dump_resource(bridge->bus_head);
+}
+
+void acpiphp_dump_func_resource(struct acpiphp_func *func)
+{
+	dbg("I/O resource:");
+	dump_resource(func->io_head);
+	dbg("MEM resource:");
+	dump_resource(func->mem_head);
+	dbg("PMEM resource:");
+	dump_resource(func->p_mem_head);
+	dbg("BUS resource:");
+	dump_resource(func->bus_head);
+}
diff -Nru a/drivers/hotplug/cpqphp_core.c b/drivers/hotplug/cpqphp_core.c
--- a/drivers/hotplug/cpqphp_core.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/hotplug/cpqphp_core.c	Wed Oct 30 16:44:17 2002
@@ -1110,6 +1110,9 @@
 	/*
 	 * Get IO, memory, and IRQ resources for new devices
 	 */
+	// The next line is required for cpqhp_find_available_resources
+	ctrl->interrupt = pdev->irq;
+
 	rc = cpqhp_find_available_resources(ctrl, cpqhp_rom_start);
 	ctrl->add_support = !rc;
 	if (rc) {
@@ -1138,7 +1141,6 @@
 	writel(0xFFFFFFFFL, ctrl->hpc_reg + INT_MASK);
 
 	/* set up the interrupt */
-	ctrl->interrupt = pdev->irq;
 	dbg("HPC interrupt = %d \n", ctrl->interrupt);
 	if (request_irq(ctrl->interrupt,
 			(void (*)(int, void *, struct pt_regs *)) &cpqhp_ctrl_intr,
diff -Nru a/drivers/hotplug/cpqphp_pci.c b/drivers/hotplug/cpqphp_pci.c
--- a/drivers/hotplug/cpqphp_pci.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/hotplug/cpqphp_pci.c	Wed Oct 30 16:44:34 2002
@@ -360,8 +360,8 @@
 	    __FUNCTION__, dev_num, bus_num, int_pin, irq_num);
 	rc = pcibios_set_irq_routing(&fakedev, int_pin - 0x0a, irq_num);
 	dbg("%s: rc %d\n", __FUNCTION__, rc);
-	if (rc)
-		return rc;
+	if (!rc)
+		return !rc;
 
 	// set the Edge Level Control Register (ELCR)
 	temp_word = inb(0x4d0);
diff -Nru a/drivers/hotplug/ibmphp_core.c b/drivers/hotplug/ibmphp_core.c
--- a/drivers/hotplug/ibmphp_core.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/hotplug/ibmphp_core.c	Wed Oct 30 16:44:36 2002
@@ -686,9 +686,10 @@
 int ibmphp_update_slot_info (struct slot *slot_cur)
 {
 	struct hotplug_slot_info *info;
-	char buffer[10];
+	char buffer[30];
 	int rc;
-//	u8 bus_speed;
+	u8 bus_speed;
+	u8 mode;
 
 	info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL);
 	if (!info) {
@@ -696,7 +697,7 @@
 		return -ENOMEM;
 	}
         
-	snprintf (buffer, 10, "%d", slot_cur->number);
+	strncpy (buffer, slot_cur->hotplug_slot->name, 30);
 	info->power_status = SLOT_PWRGD (slot_cur->status);
 	info->attention_status = SLOT_ATTN (slot_cur->status, slot_cur->ext_status);
 	info->latch_status = SLOT_LATCH (slot_cur->status);
@@ -707,21 +708,33 @@
                 info->adapter_status = 1;
 //		get_max_adapter_speed_1 (slot_cur->hotplug_slot, &info->max_adapter_speed_status, 0);
 	}
-	/* !!!!!!!!!TO DO: THIS NEEDS TO CHANGE!!!!!!!!!!!!! */
-/*	bus_speed = slot_cur->bus_on->current_speed;
-	bus_speed &= 0x0f;
-                        
-	if (slot_cur->bus_on->current_bus_mode == BUS_MODE_PCIX)
-		bus_speed |= 0x80;
-	else if (slot_cur->bus_on->current_bus_mode == BUS_MODE_PCI)
-		bus_speed |= 0x40;
-	else
-		bus_speed |= 0x20;
 
-	info->cur_bus_speed_status = bus_speed;
-	info->max_bus_speed_status = slot_cur->hotplug_slot->info->max_bus_speed_status;
+	bus_speed = slot_cur->bus_on->current_speed;
+	mode = slot_cur->bus_on->current_bus_mode;
+
+	switch (bus_speed) {
+	case BUS_SPEED_33:
+		break;
+	case BUS_SPEED_66:
+		if (mode == BUS_MODE_PCIX) 
+			bus_speed += 0x01;
+		else if (mode == BUS_MODE_PCI)
+			;
+		else
+			bus_speed = PCI_SPEED_UNKNOWN;
+		break;
+	case BUS_SPEED_100:
+	case BUS_SPEED_133:
+		bus_speed += 0x01;
+		break;
+	default:
+		bus_speed = PCI_SPEED_UNKNOWN;
+	}
+
+	info->cur_bus_speed = bus_speed;
+	info->max_bus_speed = slot_cur->hotplug_slot->info->max_bus_speed;
 	// To do: bus_names 
-*/	
+	
 	rc = pci_hp_change_slot_info (buffer, info);
 	kfree (info);
 	return rc;
@@ -989,7 +1002,7 @@
 	struct pci_dev *dev;
 	u16 l;
 
-	if (!find_bus (busno) || !(ibmphp_find_same_bus_num (busno)))
+	if (find_bus (busno) || !(ibmphp_find_same_bus_num (busno)))
 		return 1;
 
 	bus = kmalloc (sizeof (*bus), GFP_KERNEL);
diff -Nru a/drivers/i2c/Config.help b/drivers/i2c/Config.help
--- a/drivers/i2c/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,123 +0,0 @@
-CONFIG_I2C
-  I2C (pronounce: I-square-C) is a slow serial bus protocol used in
-  many micro controller applications and developed by Philips.  SMBus,
-  or System Management Bus is a subset of the I2C protocol.  More
-  information is contained in the directory <file:Documentation/i2c/>,
-  especially in the file called "summary" there.
-
-  Both I2C and SMBus are supported here. You will need this for
-  hardware sensors support, and also for Video For Linux support.
-  Specifically, if you want to use a BT848 based frame grabber/overlay
-  boards under Linux, say Y here and also to "I2C bit-banging
-  interfaces", below.
-
-  If you want I2C support, you should say Y here and also to the
-  specific driver for your bus adapter(s) below.  If you say Y to
-  "/proc file system" below, you will then get a /proc interface which
-  is documented in <file:Documentation/i2c/proc-interface>.
-
-  This I2C support is also available as a module.  If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-core.o.
-
-CONFIG_I2C_ALGOBIT
-  This allows you to use a range of I2C adapters called bit-banging
-  adapters.  Say Y if you own an I2C adapter belonging to this class
-  and then say Y to the specific driver for you adapter below.
-
-  This support is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-algo-bit.o.
-
-CONFIG_I2C_PHILIPSPAR
-  This supports parallel-port I2C adapters made by Philips.  Say Y if
-  you own such an adapter.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-philips-par.o.
-
-  Note that if you want support for different parallel port devices,
-  life will be much easier if you compile them all as modules.
-
-CONFIG_I2C_ELV
-  This supports parallel-port I2C adapters called ELV.  Say Y if you
-  own such an adapter.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-elv.o.
-
-CONFIG_I2C_VELLEMAN
-  This supports the Velleman K9000 parallel-port I2C adapter.  Say Y
-  if you own such an adapter.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-velleman.o.
-
-CONFIG_I2C_ALGOPCF
-  This allows you to use a range of I2C adapters called PCF adapters.
-  Say Y if you own an I2C adapter belonging to this class and then say
-  Y to the specific driver for you adapter below.
-
-  This support is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-algo-pcf.o.
-
-CONFIG_I2C_ELEKTOR
-  This supports the PCF8584 ISA bus I2C adapter.  Say Y if you own
-  such an adapter.
-
-  This driver is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-elektor.o.
-
-CONFIG_I2C_CHARDEV
-  Say Y here to use i2c-* device files, usually found in the /dev
-  directory on your system.  They make it possible to have user-space
-  programs use the I2C bus.  Information on how to do this is
-  contained in the file <file:Documentation/i2c/dev-interface>.
-
-  This code is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called i2c-dev.o.
-
-CONFIG_SCx200_I2C
-  Enable the use of two GPIO pins of a SCx200 processor as an I2C bus.
-
-  If you don't know what to do here, say N.
-
-  If compiled as a module, it will be called scx200_i2c.o.
-
-CONFIG_SCx200_I2C_SCL
-  Enter the GPIO pin number used for the SCL signal.  This value can
-  also be specified with a module parameter.
-
-CONFIG_SCx200_I2C_SDA
-  Enter the GPIO pin number used for the SSA signal.  This value can
-  also be specified with a module parameter.
-
-CONFIG_SCx200_ACB
-  Enable the use of the ACCESS.bus controllers of a SCx200 processor.
-
-  If you don't know what to do here, say N.
-
-  If compiled as a module, it will be called scx200_acb.o.
-
-CONFIG_I2C_PROC
-  This provides support for i2c device entries in the /proc filesystem.
-  The entries will be found in /proc/sys/dev/sensors.
-
-  This code is also available as a module. If you want to compile
-  it as a module, say M here and read <file:Documentation/modules.txt>.
-  The module will be called i2c-proc.o.
-
diff -Nru a/drivers/i2c/Config.in b/drivers/i2c/Config.in
--- a/drivers/i2c/Config.in	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,55 +0,0 @@
-#
-# Character device configuration
-#
-mainmenu_option next_comment
-comment 'I2C support'
-
-tristate 'I2C support' CONFIG_I2C
-
-if [ "$CONFIG_I2C" != "n" ]; then
-
-   dep_tristate 'I2C bit-banging interfaces'  CONFIG_I2C_ALGOBIT $CONFIG_I2C
-   if [ "$CONFIG_I2C_ALGOBIT" != "n" ]; then
-      dep_tristate '  Philips style parallel port adapter' CONFIG_I2C_PHILIPSPAR $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT
-      dep_tristate '  ELV adapter' CONFIG_I2C_ELV $CONFIG_I2C_ALGOBIT
-      dep_tristate '  Velleman K9000 adapter' CONFIG_I2C_VELLEMAN $CONFIG_I2C_ALGOBIT
-      dep_tristate '  NatSemi SCx200 I2C using GPIO pins' CONFIG_SCx200_I2C $CONFIG_SCx200 $CONFIG_I2C_ALGOBIT
-      if [ "$CONFIG_SCx200_I2C" != "n" ]; then
-         int  '    GPIO pin used for SCL' CONFIG_SCx200_I2C_SCL 12
-         int  '    GPIO pin used for SDA' CONFIG_SCx200_I2C_SDA 13
-      fi
-      dep_tristate '  NatSemi SCx200 ACCESS.bus' CONFIG_SCx200_ACB $CONFIG_I2C
-   fi
-
-   dep_tristate 'I2C PCF 8584 interfaces' CONFIG_I2C_ALGOPCF $CONFIG_I2C
-   if [ "$CONFIG_I2C_ALGOPCF" != "n" ]; then
-      dep_tristate '  Elektor ISA card' CONFIG_I2C_ELEKTOR $CONFIG_I2C_ALGOPCF
-   fi
-
-   if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
-      dep_tristate 'ITE I2C Algorithm' CONFIG_ITE_I2C_ALGO $CONFIG_I2C
-      if [ "$CONFIG_ITE_I2C_ALGO" != "n" ]; then
-         dep_tristate '  ITE I2C Adapter' CONFIG_ITE_I2C_ADAP $CONFIG_ITE_I2C_ALGO
-      fi
-   fi
-   if [ "$CONFIG_8xx" = "y" ]; then
-      dep_tristate 'MPC8xx CPM I2C interface' CONFIG_I2C_ALGO8XX $CONFIG_I2C
-      if [ "$CONFIG_RPXLITE" = "y" -o "$CONFIG_RPXCLASSIC" = "y" ]; then
-         dep_tristate '  Embedded Planet RPX Lite/Classic suppoort' CONFIG_I2C_RPXLITE $CONFIG_I2C_ALGO8XX
-      fi
-   fi
-   if [ "$CONFIG_IBM_OCP" = "y" ]; then
-      dep_tristate 'IBM on-chip I2C Algorithm' CONFIG_I2C_IBM_OCP_ALGO $CONFIG_I2C
-      if [ "$CONFIG_I2C_IBM_OCP_ALGO" != "n" ]; then
-         dep_tristate '  IBM on-chip I2C Adapter' CONFIG_I2C_IBM_OCP_ADAP $CONFIG_I2C_IBM_OCP_ALGO
-      fi
-   fi
-
-# This is needed for automatic patch generation: sensors code starts here
-# This is needed for automatic patch generation: sensors code ends here
-
-   dep_tristate 'I2C device interface' CONFIG_I2C_CHARDEV $CONFIG_I2C
-   dep_tristate 'I2C /proc interface (required for hardware sensors)' CONFIG_I2C_PROC $CONFIG_I2C $CONFIG_SYSCTL
-
-fi
-endmenu
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/i2c/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,197 @@
+#
+# Character device configuration
+#
+
+menu "I2C support"
+
+config I2C
+	tristate "I2C support"
+	---help---
+	  I2C (pronounce: I-square-C) is a slow serial bus protocol used in
+	  many micro controller applications and developed by Philips.  SMBus,
+	  or System Management Bus is a subset of the I2C protocol.  More
+	  information is contained in the directory <file:Documentation/i2c/>,
+	  especially in the file called "summary" there.
+
+	  Both I2C and SMBus are supported here. You will need this for
+	  hardware sensors support, and also for Video For Linux support.
+	  Specifically, if you want to use a BT848 based frame grabber/overlay
+	  boards under Linux, say Y here and also to "I2C bit-banging
+	  interfaces", below.
+
+	  If you want I2C support, you should say Y here and also to the
+	  specific driver for your bus adapter(s) below.  If you say Y to
+	  "/proc file system" below, you will then get a /proc interface which
+	  is documented in <file:Documentation/i2c/proc-interface>.
+
+	  This I2C support is also available as a module.  If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-core.o.
+
+config I2C_ALGOBIT
+	tristate "I2C bit-banging interfaces"
+	depends on I2C
+	help
+	  This allows you to use a range of I2C adapters called bit-banging
+	  adapters.  Say Y if you own an I2C adapter belonging to this class
+	  and then say Y to the specific driver for you adapter below.
+
+	  This support is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-algo-bit.o.
+
+config I2C_PHILIPSPAR
+	tristate "Philips style parallel port adapter"
+	depends on I2C_ALGOBIT && PARPORT
+	---help---
+	  This supports parallel-port I2C adapters made by Philips.  Say Y if
+	  you own such an adapter.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-philips-par.o.
+
+	  Note that if you want support for different parallel port devices,
+	  life will be much easier if you compile them all as modules.
+
+config I2C_ELV
+	tristate "ELV adapter"
+	depends on I2C_ALGOBIT
+	help
+	  This supports parallel-port I2C adapters called ELV.  Say Y if you
+	  own such an adapter.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-elv.o.
+
+config I2C_VELLEMAN
+	tristate "Velleman K9000 adapter"
+	depends on I2C_ALGOBIT
+	help
+	  This supports the Velleman K9000 parallel-port I2C adapter.  Say Y
+	  if you own such an adapter.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-velleman.o.
+
+config SCx200_I2C
+	tristate "NatSemi SCx200 I2C using GPIO pins"
+	depends on SCx200 && I2C_ALGOBIT
+	help
+	  Enable the use of two GPIO pins of a SCx200 processor as an I2C bus.
+
+	  If you don't know what to do here, say N.
+
+	  If compiled as a module, it will be called scx200_i2c.o.
+
+config SCx200_I2C_SCL
+	int "GPIO pin used for SCL"
+	depends on SCx200_I2C
+	default "12"
+	help
+	  Enter the GPIO pin number used for the SCL signal.  This value can
+	  also be specified with a module parameter.
+
+config SCx200_I2C_SDA
+	int "GPIO pin used for SDA"
+	depends on SCx200_I2C
+	default "13"
+	help
+	  Enter the GPIO pin number used for the SSA signal.  This value can
+	  also be specified with a module parameter.
+
+config SCx200_ACB
+	tristate "NatSemi SCx200 ACCESS.bus"
+	depends on I2C_ALGOBIT!=n && I2C
+	help
+	  Enable the use of the ACCESS.bus controllers of a SCx200 processor.
+
+	  If you don't know what to do here, say N.
+
+	  If compiled as a module, it will be called scx200_acb.o.
+
+config I2C_ALGOPCF
+	tristate "I2C PCF 8584 interfaces"
+	depends on I2C
+	help
+	  This allows you to use a range of I2C adapters called PCF adapters.
+	  Say Y if you own an I2C adapter belonging to this class and then say
+	  Y to the specific driver for you adapter below.
+
+	  This support is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-algo-pcf.o.
+
+config I2C_ELEKTOR
+	tristate "Elektor ISA card"
+	depends on I2C_ALGOPCF
+	help
+	  This supports the PCF8584 ISA bus I2C adapter.  Say Y if you own
+	  such an adapter.
+
+	  This driver is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-elektor.o.
+
+config ITE_I2C_ALGO
+	tristate "ITE I2C Algorithm"
+	depends on MIPS_ITE8172 && I2C
+
+config ITE_I2C_ADAP
+	tristate "ITE I2C Adapter"
+	depends on ITE_I2C_ALGO
+
+config I2C_ALGO8XX
+	tristate "MPC8xx CPM I2C interface"
+	depends on 8xx && I2C
+
+config I2C_RPXLITE
+	tristate "Embedded Planet RPX Lite/Classic suppoort"
+	depends on (RPXLITE || RPXCLASSIC) && I2C_ALGO8XX
+
+config I2C_IBM_OCP_ALGO
+	tristate "IBM on-chip I2C Algorithm"
+	depends on IBM_OCP && I2C
+
+config I2C_IBM_OCP_ADAP
+	tristate "IBM on-chip I2C Adapter"
+	depends on I2C_IBM_OCP_ALGO
+
+# This is needed for automatic patch generation: sensors code starts here
+# This is needed for automatic patch generation: sensors code ends here
+config I2C_CHARDEV
+	tristate "I2C device interface"
+	depends on I2C
+	help
+	  Say Y here to use i2c-* device files, usually found in the /dev
+	  directory on your system.  They make it possible to have user-space
+	  programs use the I2C bus.  Information on how to do this is
+	  contained in the file <file:Documentation/i2c/dev-interface>.
+
+	  This code is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called i2c-dev.o.
+
+config I2C_PROC
+	tristate "I2C /proc interface (required for hardware sensors)"
+	depends on I2C && SYSCTL
+	help
+	  This provides support for i2c device entries in the /proc filesystem.
+	  The entries will be found in /proc/sys/dev/sensors.
+
+	  This code is also available as a module. If you want to compile
+	  it as a module, say M here and read <file:Documentation/modules.txt>.
+	  The module will be called i2c-proc.o.
+
+endmenu
+
diff -Nru a/drivers/ide/Config.help b/drivers/ide/Config.help
--- a/drivers/ide/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,808 +0,0 @@
-CONFIG_BLK_DEV_IDE
-  If you say Y here, you will use the full-featured IDE driver to
-  control up to ten ATA/IDE interfaces, each being able to serve a
-  "master" and a "slave" device, for a total of up to twenty ATA/IDE
-  disk/cdrom/tape/floppy drives.
-
-  Useful information about large (>540 MB) IDE disks, multiple
-  interfaces, what to do if ATA/IDE devices are not automatically
-  detected, sound card ATA/IDE ports, module support, and other
-  topics, is contained in <file:Documentation/ide.txt>. For detailed
-  information about hard drives, consult the Disk-HOWTO and the
-  Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  To fine-tune ATA/IDE drive/interface parameters for improved
-  performance, look for the hdparm package at
-  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/ide.txt>. The module will be called ide-mod.o.
-  Do not compile this driver as a module if your root file system (the
-  one containing the directory /) is located on an IDE device.
-
-  If you have one or more IDE drives, say Y or M here. If your system
-  has no IDE drives, or if memory requirements are really tight, you
-  could say N here, and select the "Old hard disk driver" below
-  instead to save about 13 KB of memory in the kernel.
-
-CONFIG_BLK_DEV_HD_ONLY
-  There are two drivers for MFM/RLL/IDE hard disks. Most people use
-  the newer enhanced driver, but this old one is still around for two
-  reasons. Some older systems have strange timing problems and seem to
-  work only with the old driver (which itself does not work with some
-  newer systems). The other reason is that the old driver is smaller,
-  since it lacks the enhanced functionality of the new one. This makes
-  it a good choice for systems with very tight memory restrictions, or
-  for systems with only older MFM/RLL/ESDI drives. Choosing the old
-  driver can save 13 KB or so of kernel memory.
-
-  If you are unsure, then just choose the Enhanced IDE/MFM/RLL driver
-  instead of this one. For more detailed information, read the
-  Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_BLK_DEV_HD_IDE
-  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.
-
-  Normally, just say N here; you will then use the new driver for all
-  4 interfaces.
-
-CONFIG_BLK_DEV_IDEDISK
-  This will include enhanced support for MFM/RLL/IDE hard disks.  If
-  you have a MFM/RLL/IDE disk, and there is no special reason to use
-  the old hard disk driver instead, say Y.  If you have an SCSI-only
-  system, you can say N here.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ide-disk.o.  Do not compile this driver as a module
-  if your root file system (the one containing the directory /) is
-  located on the IDE disk. If unsure, say Y.
-
-CONFIG_IDEDISK_MULTI_MODE
-  If you get this error, try to say Y here:
-
-  hda: set_multmode: status=0x51 { DriveReady SeekComplete Error }
-  hda: set_multmode: error=0x04 { DriveStatusError }
-
-  If in doubt, say N.
-
-CONFIG_BLK_DEV_IDECS
-  Support for outboard IDE disks, tape drives, and CD-ROM drives
-  connected through a  PCMCIA card.
-
-CONFIG_ATAPI
-  If you wish to enable basic support for devices attached to the system 
-  through the ATA interface, and which are using using the ATAPI protocol
-  (CD-ROM, CD-RW, DVD, DVD-RW, LS120, ZIP, ...), say Y.
-  
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called atapi.o.
-  
-CONFIG_BLK_DEV_IDECD
-  If you have a CD-ROM drive using the ATAPI protocol, say Y. ATAPI is
-  a newer protocol used by IDE CD-ROM and TAPE drives, similar to the
-  SCSI protocol. Most new CD-ROM drives use ATAPI, including the
-  NEC-260, Mitsumi FX400, Sony 55E, and just about all non-SCSI
-  double(2X) or better speed drives.
-
-  If you say Y here, the CD-ROM drive will be identified at boot time
-  along with other IDE devices, as "hdb" or "hdc", or something
-  similar (check the boot messages with dmesg). If this is your only
-  CD-ROM drive, you can say N to all other CD-ROM options, but be sure
-  to say Y or M to "ISO 9660 CD-ROM file system support".
-
-  Note that older versions of LILO (LInux LOader) cannot properly deal
-  with IDE/ATAPI CD-ROMs, so install LILO 16 or higher, available from
-  <ftp://brun.dyndns.org/pub/linux/lilo/>.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ide-cd.o.
-
-CONFIG_BLK_DEV_IDETAPE
-  If you have an IDE tape drive using the ATAPI protocol, say Y.
-  ATAPI is a newer protocol used by IDE tape and CD-ROM drives,
-  similar to the SCSI protocol.  If you have an SCSI tape drive
-  however, you can say N here.
-
-  You should also say Y if you have an OnStream DI-30 tape drive; this
-  will not work with the SCSI protocol, until there is support for the
-  SC-30 and SC-50 versions.
-
-  If you say Y here, the tape drive will be identified at boot time
-  along with other IDE devices, as "hdb" or "hdc", or something
-  similar, and will be mapped to a character device such as "ht0"
-  (check the boot messages with dmesg).  Be sure to consult the
-  <file:drivers/ide/ide-tape.c> and <file:Documentation/ide.txt> files
-  for usage information.
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ide-tape.o.
-
-CONFIG_BLK_DEV_IDEFLOPPY
-  If you have an IDE floppy drive which uses the ATAPI protocol,
-  answer Y.  ATAPI is a newer protocol used by IDE CD-ROM/tape/floppy
-  drives, similar to the SCSI protocol.
-
-  The LS-120 and the IDE/ATAPI Iomega ZIP drive are also supported by
-  this driver. For information about jumper settings and the question
-  of when a ZIP drive uses a partition table, see
-  <http://www.win.tue.nl/~aeb/linux/zip/zip-1.html>.
-  (ATAPI PD-CD/CDR drives are not supported by this driver; support
-  for PD-CD/CDR drives is available if you answer Y to
-  "SCSI emulation support", below).
-
-  If you say Y here, the FLOPPY drive will be identified along with
-  other IDE devices, as "hdb" or "hdc", or something similar (check
-  the boot messages with dmesg).
-
-  If you want to compile the driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ide-floppy.o.
-
-CONFIG_BLK_DEV_IDESCSI
-  This will provide SCSI host adapter emulation for IDE ATAPI devices,
-  and will allow you to use a SCSI device driver instead of a native
-  ATAPI driver.
-
-  This is useful if you have an ATAPI device for which no native
-  driver has been written (for example, an ATAPI PD-CD or CDR drive);
-  you can then use this emulation together with an appropriate SCSI
-  device driver. In order to do this, say Y here and to "SCSI support"
-  and "SCSI generic support", below. You must then provide the kernel
-  command line "hdx=ide-scsi" (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) for devices if you want the
-  native EIDE sub-drivers to skip over the native support, so that
-  this SCSI emulation can be used instead. This is required for use of
-  CD-RW's.
-
-  Note that this option does NOT allow you to attach SCSI devices to a
-  box that doesn't have a SCSI host adapter installed.
-
-  If both this SCSI emulation and native ATAPI support are compiled
-  into the kernel, the native support will be used.
-
-CONFIG_BLK_DEV_ISAPNP
-  If you have an ISA EIDE card that is PnP (Plug and Play) and
-  requires setup first before scanning for devices, say Y here.
-
-  If unsure, say N.
-
-CONFIG_BLK_DEV_CMD640
-  The CMD-Technologies CMD640 IDE chip is used on many common 486 and
-  Pentium motherboards, usually in combination with a "Neptune" or
-  "SiS" chipset. Unfortunately, it has a number of rather nasty
-  design flaws that can cause severe data corruption under many common
-  conditions. Say Y here to include code which tries to automatically
-  detect and correct the problems under Linux. This option also
-  enables access to the secondary IDE ports in some CMD640 based
-  systems.
-
-  This driver will work automatically in PCI based systems (most new
-  systems have PCI slots). But if your system uses VESA local bus
-  (VLB) instead of PCI, you must also supply a kernel boot parameter
-  to enable the CMD640 bugfix/support: "ide0=cmd640_vlb". (Try "man
-  bootparam" or see the documentation of your boot loader about how to
-  pass options to the kernel.)
-
-  The CMD640 chip is also used on add-in cards by Acculogic, and on
-  the "CSA-6400E PCI to IDE controller" that some people have. For
-  details, read <file:Documentation/ide.txt>.
-
-CONFIG_BLK_DEV_CMD640_ENHANCED
-  This option includes support for setting/autotuning PIO modes and
-  prefetch on CMD640 IDE interfaces.  For details, read
-  <file:Documentation/ide.txt>. If you have a CMD640 IDE interface
-  and your BIOS does not already do this for you, then say Y here.
-  Otherwise say N.
-
-CONFIG_BLK_DEV_RZ1000
-  The PC-Technologies RZ1000 IDE chip is used on many common 486 and
-  Pentium motherboards, usually along with the "Neptune" chipset.
-  Unfortunately, it has a rather nasty design flaw that can cause
-  severe data corruption under many conditions. Say Y here to include
-  code which automatically detects and corrects the problem under
-  Linux. This may slow disk throughput by a few percent, but at least
-  things will operate 100% reliably.
-
-CONFIG_IDEPCI_SHARE_IRQ
-  Some ATA/IDE chipsets have hardware support which allows for
-  sharing a single IRQ with other cards. To enable support for
-  this in the ATA/IDE driver, say Y here.
-
-  It is safe to say Y to this question, in most cases.
-  If unsure, say N.
-
-CONFIG_BLK_DEV_IDEDMA_PCI
-  If your PCI system uses IDE drive(s) (as opposed to SCSI, say) and
-  is capable of bus-master DMA operation (most Pentium PCI systems),
-  you will want to say Y here to reduce CPU overhead. You can then use
-  the "hdparm" utility to enable DMA for drives for which it was not
-  enabled automatically. By default, DMA is not enabled automatically
-  for these drives, but you can change that by saying Y to the
-  following question "Use DMA by default when available". You can get
-  the latest version of the hdparm utility from
-  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
-
-  Read the comments at the beginning of <file:drivers/ide/ide-dma.c>
-  and the file <file:Documentation/ide.txt> for more information.
-
-  It is safe to say Y to this question.
-
-CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
-  If you say Y here, the model and firmware revision of your drive
-  will be compared against a blacklist of buggy drives that claim to
-  be (U)DMA capable but aren't. This is a blanket on/off test with no
-  speed limit options.
-
-  If in doubt, say N.
-
-CONFIG_BLK_DEV_IDE_TCQ
-  Support for tagged command queueing on ATA disk drives. This enables
-  the IDE layer to have multiple in-flight requests on hardware that
-  supports it. For now this includes the IBM Deskstar series drives,
-  such as the 22GXP, 75GXP, 40GV, 60GXP, and 120GXP (ie any Deskstar made
-  in the last couple of years), and at least some of the Western
-  Digital drives in the Expert series (by nature of really being IBM
-  drives).
-
-  If you have such a drive, say Y here.
-
-CONFIG_BLK_DEV_IDE_TCQ_DEPTH
-  Maximum size of commands to enable per-drive. Any value between 1
-  and 32 is valid, with 32 being the maxium that the hardware supports.
-
-  You probably just want the default of 32 here. If you enter an invalid
-  number, the default value will be used.
-
-CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
-  Enable tagged command queueing unconditionally on drives that report
-  support for it. Regardless of the chosen value here, tagging can be
-  controlled at run time:
-
-  echo "using_tcq:32" > /proc/ide/hdX/settings
-
-  where any value between 1-32 selects chosen queue depth and enables
-  TCQ, and 0 disables it. hdparm version 4.7 an above also support
-  TCQ manipulations.
-
-  Generally say Y here.
-
-CONFIG_BLK_DEV_OFFBOARD
-  Normally, IDE controllers built into the motherboard (on-board
-  controllers) are assigned to ide0 and ide1 while those on add-in PCI
-  cards (off-board controllers) are relegated to ide2 and ide3.
-  Answering Y here will allow you to reverse the situation, with
-  off-board controllers on ide0/1 and on-board controllers on ide2/3.
-  This can improve the usability of some boot managers such as lilo
-  when booting from a drive on an off-board controller.
-
-  If you say Y here, and you actually want to reverse the device scan
-  order as explained above, you also need to issue the kernel command
-  line option "ide=reverse". (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.)
-
-  Note that, if you do this, the order of the hd* devices will be
-  rearranged which may require modification of fstab and other files.
-
-  If in doubt, say N.
-
-CONFIG_IDEDMA_PCI_AUTO
-  Prior to kernel version 2.1.112, Linux used to automatically use
-  DMA for IDE drives and chipsets which support it. Due to concerns
-  about a couple of cases where buggy hardware may have caused damage,
-  the default is now to NOT use DMA automatically. To revert to the
-  previous behaviour, say Y to this question.
-
-  If you suspect your hardware is at all flakey, say N here.
-  Do NOT email the IDE kernel people regarding this issue!
-
-  It is normally safe to answer Y to this question unless your
-  motherboard uses a VIA VP2 chipset, in which case you should say N.
-
-CONFIG_IDEDMA_IVB
-  There are unclear terms in ATA-4 and ATA-5 standards how certain
-  hardware (an 80c ribbon) should be detected. Different interpretations
-  of the standards have been released in hardware. This causes problems:
-  for example, a host with Ultra Mode 4 (or higher) will not run
-  in that mode with an 80c ribbon.
-
-  If you are experiencing compatibility or performance problems, you
-  MAY try to answering Y here. However, it does not necessarily solve
-  any of your problems, it could even cause more of them.
-
-  It is normally safe to answer Y; however, the default is N.
-
-CONFIG_BLK_DEV_AEC62XX
-  This driver adds explicit support for Acard AEC62xx (Artop ATP8xx)
-  IDE controllers. This allows the kernel to change PIO, DMA and UDMA
-  speeds and to configure the chip to optimum performance.
-
-CONFIG_AEC6280_BURST
-  Use burst mode for DMA transfers. This helps to achieve higher
-  transfer rates, but causes more load on the PCI bus.
-
-  If unsure, say N.
-
-CONFIG_BLK_DEV_ALI15X3
-  This driver ensures (U)DMA support for ALI 1533, 1543 and 1543C
-  onboard chipsets.  It also tests for Simplex mode and enables
-  normal dual channel support.
-
-  If you say Y here, you also need to say Y to "Use DMA by default
-  when available", above.  Please read the comments at the top of
-  <file:drivers/ide/alim15x3.c>.
-
-  If unsure, say N.
-
-CONFIG_WDC_ALI15X3
-  This allows for UltraDMA support for WDC drives that ignore CRC
-  checking. You are a fool for enabling this option, but there have
-  been requests. DO NOT COMPLAIN IF YOUR DRIVE HAS FS CORRUPTION, IF
-  YOU ENABLE THIS! No one will listen, just laugh for ignoring this
-  SERIOUS WARNING.
-
-  Using this option can allow WDC drives to run at ATA-4/5 transfer
-  rates with only an ATA-2 support structure.
-
-  SAY N!
-
-CONFIG_BLK_DEV_AMD74XX
-  This driver adds explicit support for AMD-7xx and AMD-8111 chips
-  and also for the nVidia nForce chip.  This allows the kernel to
-  change PIO, DMA and UDMA speeds and to configure the chip to
-  optimum performance.
-
-CONFIG_BLK_DEV_CMD64X
-  Say Y here if you have an IDE controller which uses any of these
-  chipsets: CMD643, CMD646, or CMD648.
-
-CONFIG_BLK_DEV_CY82C693
-  This driver adds detection and support for the CY82C693 chipset
-  used on Digital's PC-Alpha 164SX boards.
-
-  If you say Y here, you need to say Y to "Use DMA by default
-  when available" as well.
-
-CONFIG_BLK_DEV_CS5530
-  Include support for UDMA on the Cyrix MediaGX 5530 chipset. This
-  will automatically be detected and configured if found.
-
-  It is safe to say Y to this question.
-
-  People with SCSI-only systems should say N here. If unsure, say Y.
-
-CONFIG_BLK_DEV_HPT34X
-  This driver adds up to 4 more EIDE devices sharing a single
-  interrupt. The HPT343 chipset in its current form is a non-bootable
-  controller; the HPT345/HPT363 chipset is a bootable (needs BIOS FIX)
-  PCI UDMA controllers. This driver requires dynamic tuning of the
-  chipset during the ide-probe at boot time. It is reported to support
-  DVD II drives, by the manufacturer.
-
-CONFIG_HPT34X_AUTODMA
-  This is a dangerous thing to attempt currently! Please read the
-  comments at the top of <file:drivers/ide/hpt34x.c>.  If you say Y
-  here, then say Y to "Use DMA by default when available" as well.
-
-  If unsure, say N.
-
-CONFIG_BLK_DEV_HPT366
-  HPT366 is an Ultra DMA chipset for ATA-66.
-  HPT368 is an Ultra DMA chipset for ATA-66 RAID Based.
-  HPT370 is an Ultra DMA chipset for ATA-100.
-  HPT372 is an Ultra DMA chipset for ATA-100.
-  HPT374 is an Ultra DMA chipset for ATA-100.
-
-  This driver adds up to 4 more EIDE devices sharing a single
-  interrupt.
-
-  The HPT366 chipset in its current form is bootable. One solution
-  for this problem are special LILO commands for redirecting the
-  reference to device 0x80. The other solution is to say Y to "Boot
-  off-board chipsets first support" (CONFIG_BLK_DEV_OFFBOARD) unless
-  your mother board has the chipset natively mounted. Regardless one
-  should use the fore mentioned option and call at LILO or include
-  "ide=reverse" in LILO's append-line.
-
-  This driver requires dynamic tuning of the chipset during the
-  ide-probe at boot. It is reported to support DVD II drives, by the
-  manufacturer.
-
-CONFIG_BLK_DEV_NS87415
-  This driver adds detection and support for the NS87415 chip
-  (used in SPARC64, among others).
-
-  Please read the comments at the top of <file:drivers/ide/ns87415.c>.
-
-CONFIG_BLK_DEV_OPTI621
-  This is a driver for the OPTi 82C621 EIDE controller.
-  Please read the comments at the top of <file:drivers/ide/opti621.c>.
-
-CONFIG_BLK_DEV_SVWKS
-  This driver adds PIO/(U)DMA support for the ServerWorks OSB4/CSB5
-  chipsets.
-
-CONFIG_BLK_DEV_PIIX
-  This driver adds explicit support for Intel PIIX and ICH chips
-  and also for the Efar Victory66 (slc90e66) chip.  This allows
-  the kernel to change PIO, DMA and UDMA speeds and to configure
-  the chip to optimum performance.
-
-CONFIG_BLK_DEV_PDC202XX
-  Promise Ultra33 or PDC20246
-  Promise Ultra66 or PDC20262
-  Promise Ultra100 or PDC20265/PDC20267/PDC20268
-
-  This driver adds up to 4 more EIDE devices sharing a single
-  interrupt. This add-on card is a bootable PCI UDMA controller. Since
-  multiple cards can be installed and there are BIOS ROM problems that
-  happen if the BIOS revisions of all installed cards (three-max) do
-  not match, the driver attempts to do dynamic tuning of the chipset
-  at boot-time for max-speed.  Ultra33 BIOS 1.25 or newer is required
-  for more than one card. This card may require that you say Y to
-  "Special UDMA Feature".
-
-  If you say Y here, you need to say Y to "Use DMA by default when
-  available" as well.
-
-  Please read the comments at the top of
-  <file:drivers/ide/pdc202xx.c>.
-
-  If unsure, say N.
-
-CONFIG_PDC202XX_BURST
-  This option causes the pdc202xx driver to enable UDMA modes on the
-  PDC202xx even when the PDC202xx BIOS has not done so.
-
-  It was originally designed for the PDC20246/Ultra33, whose BIOS will
-  only setup UDMA on the first two PDC20246 cards.  It has also been
-  used succesfully on a PDC20265/Ultra100, allowing use of UDMA modes
-  when the PDC20265 BIOS has been disabled (for faster boot up).
-
-  Please read the comments at the top of
-  <file:drivers/ide/pdc202xx.c>.
-
-  If unsure, say N.
-
-CONFIG_PDC202XX_FORCE
-  For FastTrak enable overriding BIOS.
-
-CONFIG_BLK_DEV_SIS5513
-  This driver ensures (U)DMA support for SIS5513 chipset family based
-  mainboards.
-
-  The following chipsets are supported:
-  ATA16:  SiS5511, SiS5513
-  ATA33:  SiS5591, SiS5597, SiS5598, SiS5600
-  ATA66:  SiS530, SiS540, SiS620, SiS630, SiS640
-  ATA100: SiS635, SiS645, SiS650, SiS730, SiS735, SiS740,
-          SiS745, SiS750
- 
-  If you say Y here, you need to say Y to "Use DMA by default when
-  available" as well.
-
-  Please read the comments at the top of <file:drivers/ide/sis5513.c>.
-
-CONFIG_BLK_DEV_SL82C105
-  If you have a Winbond SL82c105 IDE controller, say Y here to enable
-  special configuration for this chip. This is common on various CHRP
-  motherboards, but could be used elsewhere. If in doubt, say Y.
-
-CONFIG_BLK_DEV_TRM290
-  This driver adds support for bus master DMA transfers
-  using the Tekram TRM290 PCI IDE chip. Volunteers are
-  needed for further tweaking and development.
-  Please read the comments at the top of <file:drivers/ide/trm290.c>.
-
-CONFIG_BLK_DEV_VIA82CXXX
-  This driver adds explicit support for VIA BusMastering IDE chips.
-  This allows the kernel to change PIO, DMA and UDMA speeds and to
-  configure the chip to optimum performance.
-
-CONFIG_BLK_DEV_IDE_RAPIDE
-  Say Y here if you want to support the Yellowstone RapIDE controller
-  manufactured for use with Acorn computers.
-
-CONFIG_IDE_CHIPSETS
-  Say Y here if you want to include enhanced support for various IDE
-  interface chipsets used on motherboards and add-on cards. You can
-  then pick your particular IDE chip from among the following options.
-  This enhanced support may be necessary for Linux to be able to
-  access the 3rd/4th drives in some systems. It may also enable
-  setting of higher speed I/O rates to improve system performance with
-  these chipsets. Most of these also require special kernel boot
-  parameters to actually turn on the support at runtime; you can find
-  a list of these in the file <file:Documentation/ide.txt>.
-
-  People with SCSI-only systems can say N here.
-
-CONFIG_BLK_DEV_ALI14XX
-  This driver is enabled at runtime using the "ide0=ali14xx" kernel
-  boot parameter.  It enables support for the secondary IDE interface
-  of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster
-  I/O speeds to be set as well.  See the files
-  <file:Documentation/ide.txt> and <file:drivers/ide/ali14xx.c> for
-  more info.
-
-CONFIG_BLK_DEV_DTC2278
-  This driver is enabled at runtime using the "ide0=dtc2278" kernel
-  boot parameter. It enables support for the secondary IDE interface
-  of the DTC-2278 card, and permits faster I/O speeds to be set as
-  well. See the <file:Documentation/ide.txt> and
-  <file:drivers/ide/dtc2278.c> files for more info.
-
-CONFIG_BLK_DEV_HT6560B
-  This driver is enabled at runtime using the "ide0=ht6560b" kernel
-  boot parameter. It enables support for the secondary IDE interface
-  of the Holtek card, and permits faster I/O speeds to be set as well.
-  See the <file:Documentation/ide.txt> and
-  <file:drivers/ide/ht6560b.c> files for more info.
-
-CONFIG_BLK_DEV_PDC4030
-  This driver provides support for the secondary IDE interface and
-  cache of the original Promise IDE chipsets, e.g. DC4030 and DC5030.
-  It is nothing to do with the later range of Promise UDMA chipsets -
-  see the PDC_202XX support for these. CD-ROM and TAPE devices are not
-  supported (and probably never will be since I don't think the cards
-  support them). This driver is enabled at runtime using the "ide0=dc4030"
-  or "ide1=dc4030" kernel boot parameter. See the
-  <file:drivers/ide/pdc4030.c> file for more info.
-
-CONFIG_BLK_DEV_QD65XX
-  This driver is enabled at runtime using the "ide0=qd65xx" kernel
-  boot parameter.  It permits faster I/O speeds to be set.  See the
-  <file:Documentation/ide.txt> and <file:drivers/ide/qd65xx.c> for
-  more info.
-
-CONFIG_BLK_DEV_UMC8672
-  This driver is enabled at runtime using the "ide0=umc8672" kernel
-  boot parameter. It enables support for the secondary IDE interface
-  of the UMC-8672, and permits faster I/O speeds to be set as well.
-  See the files <file:Documentation/ide.txt> and
-  <file:drivers/ide/umc8672.c> for more info.
-
-CONFIG_BLK_DEV_GAYLE
-  This is the IDE driver for the builtin IDE interface on some Amiga
-  models. It supports both the `A1200 style' (used in A600 and A1200)
-  and `A4000 style' (used in A4000 and A4000T) of the Gayle IDE
-  interface. Say Y if you have such an Amiga model and want to use IDE
-  devices (hard disks, CD-ROM drives, etc.) that are connected to the
-  builtin IDE interface.
-
-CONFIG_BLK_DEV_FALCON_IDE
-  This is the IDE driver for the builtin IDE interface on the Atari
-  Falcon. Say Y if you have a Falcon and want to use IDE devices (hard
-  disks, CD-ROM drives, etc.) that are connected to the builtin IDE
-  interface.
-
-CONFIG_BLK_DEV_BUDDHA
-  This is the IDE driver for the IDE interfaces on the Buddha, 
-  Catweasel and X-Surf expansion boards.  It supports up to two interfaces 
-  on the Buddha, three on the Catweasel and two on the X-Surf.
-
-  Say Y if you have a Buddha or Catweasel expansion board and want to
-  use IDE devices (hard disks, CD-ROM drives, etc.) that are connected
-  to one of its IDE interfaces.
-
-CONFIG_BLK_DEV_IDEDOUBLER
-  This driver provides support for the so-called `IDE doublers' (made
-  by various manufacturers, e.g. Eyetech) that can be connected to the
-  builtin IDE interface of some Amiga models. Using such an IDE
-  doubler, you can connect up to four instead of two IDE devices on
-  the Amiga's builtin IDE interface.
-
-  Note that the normal Amiga Gayle IDE driver may not work correctly
-  if you have an IDE doubler and don't enable this driver!
-
-  Say Y if you have an IDE doubler.  The driver is enabled at kernel
-  runtime using the "ide=doubler" kernel boot parameter.
-
-CONFIG_BLK_DEV_IDE_PMAC
-  This driver provides support for the built-in IDE controller on
-  most of the recent Apple Power Macintoshes and PowerBooks.
-  If unsure, say Y.
-
-CONFIG_BLK_DEV_IDEDMA_PMAC
-  This option allows the driver for the built-in IDE controller on
-  Power Macintoshes and PowerBooks to use DMA (direct memory access)
-  to transfer data to and from memory.  Saying Y is safe and improves
-  performance.
-
-CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO
-  This option allows the driver for the built-in IDE controller on
-  Power Macintoshes and PowerBooks to use DMA automatically, without
-  it having to be explicitly enabled.  This option is provided because
-  of concerns about a couple of cases where using DMA on buggy PC
-  hardware may have caused damage.  Saying Y should be safe on all
-  Apple machines.
-
-CONFIG_BLK_DEV_MAC_IDE
-  This is the IDE driver for the builtin IDE interface on some m68k
-  Macintosh models. It supports both the `Quadra style' (used in
-  Quadra/ Centris 630 and Performa 588 models) and `Powerbook style'
-  (used in the Powerbook 150 and 190 models) IDE interface.
-
-  Say Y if you have such an Macintosh model and want to use IDE
-  devices (hard disks, CD-ROM drives, etc.) that are connected to the
-  builtin IDE interface.
-
-CONFIG_BLK_DEV_Q40IDE
-  Enable the on-board IDE controller in the Q40/Q60.  This should
-  normally be on; disable it only if you are running a custom hard
-  drive subsystem through an expansion card.
-
-CONFIG_BLK_DEV_IDE_ICSIDE
-  On Acorn systems, say Y here if you wish to use the ICS IDE
-  interface card.  This is not required for ICS partition support.
-  If you are unsure, say N to this.
-
-CONFIG_BLK_DEV_IDEDMA_ICS
-  Say Y here if you want to add DMA (Direct Memory Access) support to
-  the ICS IDE driver.
-
-CONFIG_IDEDMA_ICS_AUTO
-  Prior to kernel version 2.1.112, Linux used to automatically use
-  DMA for IDE drives and chipsets which support it. Due to concerns
-  about a couple of cases where buggy hardware may have caused damage,
-  the default is now to NOT use DMA automatically. To revert to the
-  previous behaviour, say Y to this question.
-
-  If you suspect your hardware is at all flakey, say N here.
-  Do NOT email the IDE kernel people regarding this issue!
-
-CONFIG_BLK_DEV_ATARAID
-  Say Y or M if you have an IDE Raid controller and want linux
-  to use its softwareraid feature.  You must also select an
-  appropriate for your board low-level driver below.
-
-  Note, that Linux does not use the Raid implemetation in BIOS, and
-  the main purpose for this feature is to retain compatibility and
-  data integrity with other OS-es, using the same disk array. Linux
-  has its own Raid drivers, which you should use if you need better
-  performance.
-
-CONFIG_BLK_DEV_ATARAID_PDC
-  Say Y or M if you have a Promise Fasttrak (tm) Raid controller
-  and want linux to use the softwareraid feature of this card.
-  This driver uses /dev/ataraid/dXpY (X and Y numbers) as device
-  names.
-
-  If you choose to compile this as a module, the module will be called
-  pdcraid.o.
-
-CONFIG_BLK_DEV_ATARAID_HPT
-  Say Y or M if you have a Highpoint HPT 370 Raid controller
-  and want linux to use the softwareraid feature of this card.
-  This driver uses /dev/ataraid/dXpY (X and Y numbers) as device
-  names.
-
-  If you choose to compile this as a module, the module will be called
-  hptraid.o.
-
-CONFIG_BLK_DEV_MPC8xx_IDE
-  This option provides support for IDE on Motorola MPC8xx Systems.
-  Please see 'Type of MPC8xx IDE interface' for details.
-
-  If unsure, say N.
-
-CONFIG_IDE_8xx_PCCARD
-  Select how the IDE devices are connected to the MPC8xx system:
-
-  8xx_PCCARD uses the 8xx internal PCMCIA interface in combination
-             with a PC Card (e.g. ARGOSY portable Hard Disk Adapter),
-             ATA PC Card HDDs or ATA PC Flash Cards (example: TQM8xxL
-             systems)
-
-  8xx_DIRECT is used for directly connected IDE devices using the 8xx
-             internal PCMCIA interface (example: IVMS8 systems)
-
-  EXT_DIRECT is used for IDE devices directly connected to the 8xx
-             bus using some glue logic, but _not_ the 8xx internal
-             PCMCIA interface (example: IDIF860 systems)
-
-CONFIG_IDEDISK_STROKE
-  Should you have a system w/ an AWARD Bios and your drives are larger
-  than 32GB and it will not boot, one is required to perform a few OEM
-  operations first.  The option is called "STROKE" because it allows
-  one to "soft clip" the drive to work around a barrier limit.  For
-  Maxtor drives it is called "jumpon.exe".  Please search Maxtor's
-  web-site for "JUMPON.EXE".  IBM has a similar tool at:
-  <http://www.storage.ibm.com/hdd/support/download.htm>.
-
-  If you are unsure, say N here.
-
-CONFIG_IDEDMA_ONLYDISK
-  This is used if you know your ATAPI Devices are going to fail DMA
-  Transfers.
-
-  Generally say N here.
-
-CONFIG_BLK_DEV_IDE_TCQ
-  Support for tagged command queueing on ATA disk drives. This enables
-  the IDE layer to have multiple in-flight requests on hardware that
-  supports it. For now this includes the IBM Deskstar series drives,
-  such as the 22GXP, 75GXP, 40GV, 60GXP, 120GXP, and 180GXP (ie any
-  Deskstar made in the last couple of years), and at least some of
-  the Western Digital drives in the Expert series (by nature of really
-  being IBM drives).
-
-  However, please, note that there are host chip controllers which will
-  not cooperate properly if TCQ is enabled. This may cause serious
-  data loss!
-
-  Since enabling TCQ doesn't appear to have any noticeable performance
-  impact on Linux: [feel free to correct me if you wish too please]
-  
-  Generally say N here.
-
-CONFIG_BLK_DEV_IDE_TCQ_DEPTH
-  Maximum size of commands to enable per-drive. Any value between 1
-  and 32 is valid, with 32 being the maxium that the hardware supports.
-
-  You probably just want the default of 32 here. If you enter an invalid
-  number, the default value will be used.
-
-CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
-  Enabled tagged command queueing unconditionally on drives that report
-  support for it. Regardless of the chosen value here, tagging can be
-  controlled at run time:
-
-  echo "using_tcq:32" > /proc/ide/hdX/settings
-
-  where any value between 1-32 selects chosen queue depth and enables
-  TCQ, and 0 disables it. hdparm version 4.7 an above also support
-  TCQ manipulations.
-
-  Generally say Y here.
-
-CONFIG_BLK_DEV_IT8172
-  Say Y here to support the on-board IDE controller on the Integrated
-  Technology Express, Inc. ITE8172 SBC.  Vendor page at
-  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
-  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
-
-CONFIG_IT8172_TUNING
-  Say Y here to support tuning the ITE8172's IDE interface.  This makes
-  it possible to set DMA channel or PIO opration and the transfer rate.
-
-CONFIG_IT8172_REVC
-  Say Y here to support the older, Revision C version of the Integrated
-  Technology Express, Inc. ITE8172 SBC.  Vendor page at
-  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
-  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
-
-CONFIG_IT8172_SCR0
-  Say Y here to support smart-card reader 0 (SCR0) on the Integrated
-  Technology Express, Inc. ITE8172 SBC.  Vendor page at
-  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
-  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
-
-CONFIG_IT8172_SCR1
-  Say Y here to support smart-card reader 1 (SCR1) on the Integrated
-  Technology Express, Inc. ITE8172 SBC.  Vendor page at
-  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
-  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
-
diff -Nru a/drivers/ide/Config.in b/drivers/ide/Config.in
--- a/drivers/ide/Config.in	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,222 +0,0 @@
-#
-# IDE ATA ATAPI Block device driver configuration
-#
-# Andre Hedrick <andre@linux-ide.org>
-#
-mainmenu_option next_comment
-comment 'IDE, ATA and ATAPI Block devices'
-
-dep_tristate 'Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support' CONFIG_BLK_DEV_IDE $CONFIG_IDE
-comment 'Please see Documentation/ide.txt for help/info on IDE drives'
-if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
-   dep_bool '  Use old disk-only driver on primary interface' CONFIG_BLK_DEV_HD_IDE $CONFIG_X86
-   define_bool CONFIG_BLK_DEV_HD $CONFIG_BLK_DEV_HD_IDE
-
-   dep_tristate '  Include IDE/ATA-2 DISK support' CONFIG_BLK_DEV_IDEDISK $CONFIG_BLK_DEV_IDE
-   dep_mbool '    Use multi-mode by default' CONFIG_IDEDISK_MULTI_MODE $CONFIG_BLK_DEV_IDEDISK
-   dep_mbool '    Auto-Geometry Resizing support' CONFIG_IDEDISK_STROKE $CONFIG_BLK_DEV_IDEDISK
-
-   dep_tristate '  PCMCIA IDE support' CONFIG_BLK_DEV_IDECS $CONFIG_BLK_DEV_IDE $CONFIG_PCMCIA
-   dep_tristate '  Include IDE/ATAPI CDROM support' CONFIG_BLK_DEV_IDECD $CONFIG_BLK_DEV_IDE
-   #dep_tristate '  Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE
-   dep_tristate '  Include IDE/ATAPI FLOPPY support' CONFIG_BLK_DEV_IDEFLOPPY $CONFIG_BLK_DEV_IDE
-   dep_tristate '  SCSI emulation support' CONFIG_BLK_DEV_IDESCSI $CONFIG_BLK_DEV_IDE $CONFIG_SCSI
-
-   bool '  IDE Taskfile Access' CONFIG_IDE_TASK_IOCTL
-   #bool '  IDE Taskfile IO' CONFIG_IDE_TASKFILE_IO
-
-   comment 'IDE chipset support/bugfixes'
-   if [ "$CONFIG_BLK_DEV_IDE" != "n" ]; then
-      dep_bool '  CMD640 chipset bugfix/support' CONFIG_BLK_DEV_CMD640 $CONFIG_X86
-      dep_bool '    CMD640 enhanced support' CONFIG_BLK_DEV_CMD640_ENHANCED $CONFIG_BLK_DEV_CMD640
-      dep_bool '  ISA-PNP EIDE support' CONFIG_BLK_DEV_ISAPNP $CONFIG_ISAPNP
-      if [ "$CONFIG_PCI" = "y" ]; then
-	 bool '  PCI IDE chipset support' CONFIG_BLK_DEV_IDEPCI
-	 if [ "$CONFIG_BLK_DEV_IDEPCI" = "y" ]; then
-	    dep_bool '    Generic PCI IDE Chipset Support' CONFIG_BLK_DEV_GENERIC $CONFIG_BLK_DEV_IDEPCI
-	    bool '    Sharing PCI IDE interrupts support' CONFIG_IDEPCI_SHARE_IRQ
-	    bool '    Generic PCI bus-master DMA support' CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_bool '    ATA tagged command queueing (EXPERIMENTAL)' CONFIG_BLK_DEV_IDE_TCQ $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL
-	    dep_bool '      TCQ on by default' CONFIG_BLK_DEV_IDE_TCQ_DEFAULT $CONFIG_BLK_DEV_IDE_TCQ
-	    if [ "$CONFIG_BLK_DEV_IDE_TCQ" != "n" ]; then
-		int '      Default queue depth' CONFIG_BLK_DEV_IDE_TCQ_DEPTH 8
-	    fi
-	    bool '    Boot off-board chipsets first support' CONFIG_BLK_DEV_OFFBOARD
-	    dep_bool '      Force enable legacy 2.0.X HOSTS to use DMA' CONFIG_BLK_DEV_IDEDMA_FORCED $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_bool '      Use PCI DMA by default when available' CONFIG_IDEDMA_PCI_AUTO $CONFIG_BLK_DEV_IDEDMA_PCI
-            dep_bool '    Enable DMA only for disks ' CONFIG_IDEDMA_ONLYDISK $CONFIG_IDEDMA_PCI_AUTO
-	    define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_bool '      ATA Work(s) In Progress (EXPERIMENTAL)' CONFIG_IDEDMA_PCI_WIP $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_EXPERIMENTAL
-	    dep_bool '      Good-Bad DMA Model-Firmware (WIP)' CONFIG_IDEDMA_NEW_DRIVE_LISTINGS $CONFIG_IDEDMA_PCI_WIP
-            define_bool CONFIG_BLK_DEV_ADMA $CONFIG_BLK_DEV_IDEDMA_PCI
-
-	    dep_tristate '    AEC62XX chipset support' CONFIG_BLK_DEV_AEC62XX $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    ALI M15x3 chipset support' CONFIG_BLK_DEV_ALI15X3 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_mbool    '      ALI M15x3 WDC support (DANGEROUS)' CONFIG_WDC_ALI15X3 $CONFIG_BLK_DEV_ALI15X3
-	    dep_tristate '    AMD Viper support' CONFIG_BLK_DEV_AMD74XX $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_mbool    '      AMD Viper ATA-66 Override' CONFIG_AMD74XX_OVERRIDE $CONFIG_BLK_DEV_AMD74XX
-	    dep_tristate '    CMD64{3|6|8|9} chipset support' CONFIG_BLK_DEV_CMD64X $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    CY82C693 chipset support' CONFIG_BLK_DEV_CY82C693 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    Cyrix CS5530 MediaGX chipset support' CONFIG_BLK_DEV_CS5530 $CONFIG_BLK_DEV_IDEDMA_PCI
-  	    dep_tristate '    HPT34X chipset support' CONFIG_BLK_DEV_HPT34X $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_mbool    '      HPT34X AUTODMA support (WIP)' CONFIG_HPT34X_AUTODMA $CONFIG_BLK_DEV_HPT34X $CONFIG_IDEDMA_PCI_WIP
-	    dep_tristate '    HPT366/368/370 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    Intel PIIXn chipsets support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
-	    if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then
-	       dep_mbool '    IT8172 IDE support' CONFIG_BLK_DEV_IT8172 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    fi
-	    dep_tristate '    nVidia NFORCE support' CONFIG_BLK_DEV_NFORCE $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    NS87415 chipset support' CONFIG_BLK_DEV_NS87415 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    OPTi 82C621 chipset enhanced support (EXPERIMENTAL)' CONFIG_BLK_DEV_OPTI621 $CONFIG_EXPERIMENTAL
-	    dep_tristate '    PROMISE PDC202{46|62|65|67} support' CONFIG_BLK_DEV_PDC202XX_OLD $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_bool     '      Special UDMA Feature' CONFIG_PDC202XX_BURST $CONFIG_BLK_DEV_PDC202XX_OLD $CONFI_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    PROMISE PDC202{68|69|70|71|75|76|77} support' CONFIG_BLK_DEV_PDC202XX_NEW $CONFIG_BLK_DEV_IDEDMA_PCI
-		# FIXME - probably wants to be one for old and for new
-	    dep_bool     '      Special FastTrak Feature' CONFIG_PDC202XX_FORCE $CONFIG_BLK_DEV_PDC202XX_NEW
-	    dep_tristate '    RZ1000 chipset bugfix/support' CONFIG_BLK_DEV_RZ1000 $CONFIG_X86
-	    dep_tristate '    ServerWorks OSB4/CSB5/CSB6 chipsets support' CONFIG_BLK_DEV_SVWKS $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    Silicon Image chipset support' CONFIG_BLK_DEV_SIIMAGE $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    SiS5513 chipset support' CONFIG_BLK_DEV_SIS5513 $CONFIG_BLK_DEV_IDEDMA_PCI $CONFIG_X86
-	    dep_tristate '    SLC90E66 chipset support' CONFIG_BLK_DEV_SLC90E66 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    Tekram TRM290 chipset support' CONFIG_BLK_DEV_TRM290 $CONFIG_BLK_DEV_IDEDMA_PCI
-	    dep_tristate '    VIA82CXXX chipset support' CONFIG_BLK_DEV_VIA82CXXX $CONFIG_BLK_DEV_IDEDMA_PCI
-	    if [ "$CONFIG_PPC" = "y" -o "$CONFIG_ARM" = "y" ]; then
-	       dep_tristate '    Winbond SL82c105 support' CONFIG_BLK_DEV_SL82C105 $CONFIG_BLK_DEV_IDEPCI
-	    fi
-         fi
-      fi
-      if [ "$CONFIG_ALL_PPC" = "y" ]; then
-	 bool '    Builtin PowerMac IDE support' CONFIG_BLK_DEV_IDE_PMAC
-	 dep_bool '      PowerMac IDE DMA support' CONFIG_BLK_DEV_IDEDMA_PMAC $CONFIG_BLK_DEV_IDE_PMAC
-	 dep_bool '        Use DMA by default' CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO $CONFIG_BLK_DEV_IDEDMA_PMAC
-	 if [ "$CONFIG_BLK_DEV_IDE_PMAC" = "y" ]; then
-	   define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_PMAC
-	 fi
-	 if [ "$CONFIG_BLK_DEV_IDEDMA_PMAC" = "y" ]; then
-	   define_bool CONFIG_BLK_DEV_IDEPCI $CONFIG_BLK_DEV_IDEDMA_PMAC
-	 fi
-      fi
-      if [ "$CONFIG_SIBYTE_SWARM" = "y" ]; then
-	 bool '  SWARM onboard IDE support' CONFIG_BLK_DEV_IDE_SWARM
-      fi
-      if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-	 dep_bool '    ICS IDE interface support' CONFIG_BLK_DEV_IDE_ICSIDE $CONFIG_ARCH_ACORN
-	 dep_bool '      ICS DMA support' CONFIG_BLK_DEV_IDEDMA_ICS $CONFIG_BLK_DEV_IDE_ICSIDE
-	 dep_bool '        Use ICS DMA by default' CONFIG_IDEDMA_ICS_AUTO $CONFIG_BLK_DEV_IDEDMA_ICS
-	 define_bool CONFIG_BLK_DEV_IDEDMA $CONFIG_BLK_DEV_IDEDMA_ICS
-	 dep_bool '    RapIDE interface support' CONFIG_BLK_DEV_IDE_RAPIDE $CONFIG_ARCH_ACORN
-      fi
-      if [ "$CONFIG_AMIGA" = "y" ]; then
-	 dep_bool '  Amiga Gayle IDE interface support' CONFIG_BLK_DEV_GAYLE $CONFIG_AMIGA
-	 dep_mbool '    Amiga IDE Doubler support (EXPERIMENTAL)' CONFIG_BLK_DEV_IDEDOUBLER $CONFIG_BLK_DEV_GAYLE $CONFIG_EXPERIMENTAL
-      fi
-      if [ "$CONFIG_ZORRO" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	 dep_mbool '  Buddha/Catweasel/X-Surf IDE interface support (EXPERIMENTAL)' CONFIG_BLK_DEV_BUDDHA $CONFIG_ZORRO $CONFIG_EXPERIMENTAL
-      fi
-      if [ "$CONFIG_ATARI" = "y" ]; then
-	 dep_bool '  Falcon IDE interface support' CONFIG_BLK_DEV_FALCON_IDE $CONFIG_ATARI
-      fi
-      if [ "$CONFIG_MAC" = "y" ]; then
-	 dep_bool '  Macintosh Quadra/Powerbook IDE interface support' CONFIG_BLK_DEV_MAC_IDE $CONFIG_MAC
-      fi
-      if [ "$CONFIG_Q40" = "y" ]; then
-	 dep_bool '  Q40/Q60 IDE interface support' CONFIG_BLK_DEV_Q40IDE $CONFIG_Q40
-      fi
-      if [ "$CONFIG_8xx" = "y" ]; then
-         dep_bool '  MPC8xx IDE support' CONFIG_BLK_DEV_MPC8xx_IDE $CONFIG_8xx
-      fi
-
-      if [ "$CONFIG_BLK_DEV_MPC8xx_IDE" = "y" ]; then
-         choice 'Type of MPC8xx IDE interface'		\
-		"8xx_PCCARD	CONFIG_IDE_8xx_PCCARD	\
-		 8xx_DIRECT	CONFIG_IDE_8xx_DIRECT	\
-		 EXT_DIRECT	CONFIG_IDE_EXT_DIRECT"	8xx_PCCARD
-      fi
-
-      # no isa -> no vlb
-      dep_bool '  Other IDE chipset support' CONFIG_IDE_CHIPSETS $CONFIG_ISA
-      if [ "$CONFIG_IDE_CHIPSETS" = "y" ]; then
-	 comment 'Note: most of these also require special kernel boot parameters'
-	 bool '    Generic 4 drives/port support' CONFIG_BLK_DEV_4DRIVES
-	 dep_tristate '    ALI M14xx support' CONFIG_BLK_DEV_ALI14XX $CONFIG_BLK_DEV_IDE
-	 dep_tristate '    DTC-2278 support' CONFIG_BLK_DEV_DTC2278 $CONFIG_BLK_DEV_IDE
-	 dep_tristate '    Holtek HT6560B support' CONFIG_BLK_DEV_HT6560B $CONFIG_BLK_DEV_IDE
-	 dep_tristate '    PROMISE DC4030 support (EXPERIMENTAL)' CONFIG_BLK_DEV_PDC4030 $CONFIG_BLK_DEV_IDEDISK $CONFIG_EXPERIMENTAL
-	 dep_tristate '    QDI QD65xx support' CONFIG_BLK_DEV_QD65XX $CONFIG_BLK_DEV_IDE
-	 dep_tristate '    UMC-8672 support' CONFIG_BLK_DEV_UMC8672 $CONFIG_BLK_DEV_IDE
-      fi
-   fi
-else
-   bool 'Old hard disk (MFM/RLL/IDE) driver' CONFIG_BLK_DEV_HD_ONLY
-   define_bool CONFIG_BLK_DEV_HD $CONFIG_BLK_DEV_HD_ONLY
-fi
-
-if [ "$CONFIG_IDEDMA_PCI_AUTO" = "y" -o \
-     "$CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO" = "y" -o \
-     "$CONFIG_IDEDMA_ICS_AUTO" = "y" ]; then
-   define_bool CONFIG_IDEDMA_AUTO y
-else
-   define_bool CONFIG_IDEDMA_AUTO n
-fi
-
-if [ "$CONFIG_BLK_DEV_IDEDMA_PCI" = "y" -o \
-     "$CONFIG_BLK_DEV_IDEDMA_PMAC" = "y" -o \
-     "$CONFIG_BLK_DEV_IDEDMA_ICS" = "y" ]; then
-   bool '  IGNORE word93 Validation BITS' CONFIG_IDEDMA_IVB
-fi
-
-if [ "$CONFIG_BLK_DEV_TIVO" = "y" ]; then
-  define_bool CONFIG_DMA_NONPCI y
-else
-  define_bool CONFIG_DMA_NONPCI n
-fi
-
-if [ "$CONFIG_BLK_DEV_IDEDMA_PCI" = "y" ]; then
-   if [ "$CONFIG_BLK_DEV_PDC202XX_OLD" != "n" -o \
-        "$CONFIG_BLK_DEV_PDC202XX_NEW" != "n" ]; then
-      define_bool CONFIG_BLK_DEV_PDC202XX y
-   fi
-fi
-
-##if [ "$CONFIG_IDE_TASKFILE_IO" = "y" ]; then
-##  dep_mbool CONFIG_BLK_DEV_TF_DISK $CONFIG_BLK_DEV_IDEDISK
-##else
-##  dep_mbool CONFIG_BLK_DEV_NTF_DISK $CONFIG_BLK_DEV_IDEDISK
-##fi
-
-if [ "$CONFIG_BLK_DEV_4DRIVES" = "y" -o \
-     "$CONFIG_BLK_DEV_ALI14XX" != "n" -o \
-     "$CONFIG_BLK_DEV_DTC2278" != "n" -o \
-     "$CONFIG_BLK_DEV_HT6560B" != "n" -o \
-     "$CONFIG_BLK_DEV_PDC4030" != "n" -o \
-     "$CONFIG_BLK_DEV_QD65XX" != "n" -o \
-     "$CONFIG_BLK_DEV_UMC8672" != "n" -o \
-     "$CONFIG_BLK_DEV_AEC62XX" = "y" -o \
-     "$CONFIG_BLK_DEV_ALI15X3" = "y" -o \
-     "$CONFIG_BLK_DEV_AMD74XX" = "y" -o \
-     "$CONFIG_BLK_DEV_CMD640" = "y" -o \
-     "$CONFIG_BLK_DEV_CMD64X" = "y" -o \
-     "$CONFIG_BLK_DEV_CS5530" = "y" -o \
-     "$CONFIG_BLK_DEV_CY82C693" = "y" -o \
-     "$CONFIG_BLK_DEV_HPT34X" = "y" -o \
-     "$CONFIG_BLK_DEV_HPT366" = "y" -o \
-     "$CONFIG_BLK_DEV_IDE_PMAC" = "y" -o \
-     "$CONFIG_BLK_DEV_IT8172" = "y" -o \
-     "$CONFIG_BLK_DEV_MPC8xx_IDE" = "y" -o \
-     "$CONFIG_BLK_DEV_NFORCE" = "y" -o \
-     "$CONFIG_BLK_DEV_OPTI621" = "y" -o \
-     "$CONFIG_BLK_DEV_SVWKS" = "y" -o \
-     "$CONFIG_BLK_DEV_PDC202XX" = "y" -o \
-     "$CONFIG_BLK_DEV_PIIX" = "y" -o \
-     "$CONFIG_BLK_DEV_SVWKS" = "y" -o \
-     "$CONFIG_BLK_DEV_SIIMAGE" = "y" -o \
-     "$CONFIG_BLK_DEV_SIS5513" = "y" -o \
-     "$CONFIG_BLK_DEV_SL82C105" = "y" -o \
-     "$CONFIG_BLK_DEV_SLC90E66" = "y" -o \
-     "$CONFIG_BLK_DEV_VIA82CXXX" = "y" ]; then
-   define_bool CONFIG_BLK_DEV_IDE_MODES y
-else
-   define_bool CONFIG_BLK_DEV_IDE_MODES n
-fi
-
-endmenu
diff -Nru a/drivers/ide/Kconfig b/drivers/ide/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ide/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,1012 @@
+#
+# IDE ATA ATAPI Block device driver configuration
+#
+# Andre Hedrick <andre@linux-ide.org>
+#
+
+menu "IDE, ATA and ATAPI Block devices"
+	depends on IDE!=n
+
+config BLK_DEV_IDE
+	tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support"
+	depends on IDE
+	---help---
+	  If you say Y here, you will use the full-featured IDE driver to
+	  control up to ten ATA/IDE interfaces, each being able to serve a
+	  "master" and a "slave" device, for a total of up to twenty ATA/IDE
+	  disk/cdrom/tape/floppy drives.
+
+	  Useful information about large (>540 MB) IDE disks, multiple
+	  interfaces, what to do if ATA/IDE devices are not automatically
+	  detected, sound card ATA/IDE ports, module support, and other
+	  topics, is contained in <file:Documentation/ide.txt>. For detailed
+	  information about hard drives, consult the Disk-HOWTO and the
+	  Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  To fine-tune ATA/IDE drive/interface parameters for improved
+	  performance, look for the hdparm package at
+	  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/ide.txt>. The module will be called ide-mod.o.
+	  Do not compile this driver as a module if your root file system (the
+	  one containing the directory /) is located on an IDE device.
+
+	  If you have one or more IDE drives, say Y or M here. If your system
+	  has no IDE drives, or if memory requirements are really tight, you
+	  could say N here, and select the "Old hard disk driver" below
+	  instead to save about 13 KB of memory in the kernel.
+
+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 BLK_DEV_IDE && X86
+	---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.
+
+	  Normally, just say N here; you will then use the new driver for all
+	  4 interfaces.
+
+config BLK_DEV_HD
+	bool
+	default BLK_DEV_HD_ONLY if BLK_DEV_IDE=n
+	default BLK_DEV_HD_IDE if BLK_DEV_IDE
+
+config BLK_DEV_IDEDISK
+	tristate "Include IDE/ATA-2 DISK support"
+	depends on BLK_DEV_IDE
+	---help---
+	  This will include enhanced support for MFM/RLL/IDE hard disks.  If
+	  you have a MFM/RLL/IDE disk, and there is no special reason to use
+	  the old hard disk driver instead, say Y.  If you have an SCSI-only
+	  system, you can say N here.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ide-disk.o.  Do not compile this driver as a module
+	  if your root file system (the one containing the directory /) is
+	  located on the IDE disk. If unsure, say Y.
+
+config IDEDISK_MULTI_MODE
+	bool "Use multi-mode by default"
+	depends on BLK_DEV_IDEDISK
+	help
+	  If you get this error, try to say Y here:
+
+	  hda: set_multmode: status=0x51 { DriveReady SeekComplete Error }
+	  hda: set_multmode: error=0x04 { DriveStatusError }
+
+	  If in doubt, say N.
+
+config IDEDISK_STROKE
+	bool "Auto-Geometry Resizing support"
+	depends on BLK_DEV_IDEDISK
+	help
+	  Should you have a system w/ an AWARD Bios and your drives are larger
+	  than 32GB and it will not boot, one is required to perform a few OEM
+	  operations first.  The option is called "STROKE" because it allows
+	  one to "soft clip" the drive to work around a barrier limit.  For
+	  Maxtor drives it is called "jumpon.exe".  Please search Maxtor's
+	  web-site for "JUMPON.EXE".  IBM has a similar tool at:
+	  <http://www.storage.ibm.com/hdd/support/download.htm>.
+
+	  If you are unsure, say N here.
+
+config BLK_DEV_IDECS
+	tristate "PCMCIA IDE support"
+	depends on BLK_DEV_IDE && PCMCIA
+	help
+	  Support for outboard IDE disks, tape drives, and CD-ROM drives
+	  connected through a  PCMCIA card.
+
+config BLK_DEV_IDECD
+	tristate "Include IDE/ATAPI CDROM support"
+	depends on BLK_DEV_IDE
+	---help---
+	  If you have a CD-ROM drive using the ATAPI protocol, say Y. ATAPI is
+	  a newer protocol used by IDE CD-ROM and TAPE drives, similar to the
+	  SCSI protocol. Most new CD-ROM drives use ATAPI, including the
+	  NEC-260, Mitsumi FX400, Sony 55E, and just about all non-SCSI
+	  double(2X) or better speed drives.
+
+	  If you say Y here, the CD-ROM drive will be identified at boot time
+	  along with other IDE devices, as "hdb" or "hdc", or something
+	  similar (check the boot messages with dmesg). If this is your only
+	  CD-ROM drive, you can say N to all other CD-ROM options, but be sure
+	  to say Y or M to "ISO 9660 CD-ROM file system support".
+
+	  Note that older versions of LILO (LInux LOader) cannot properly deal
+	  with IDE/ATAPI CD-ROMs, so install LILO 16 or higher, available from
+	  <ftp://brun.dyndns.org/pub/linux/lilo/>.
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ide-cd.o.
+
+#dep_tristate '  Include IDE/ATAPI TAPE support' CONFIG_BLK_DEV_IDETAPE $CONFIG_BLK_DEV_IDE
+config BLK_DEV_IDEFLOPPY
+	tristate "Include IDE/ATAPI FLOPPY support"
+	depends on BLK_DEV_IDE
+	---help---
+	  If you have an IDE floppy drive which uses the ATAPI protocol,
+	  answer Y.  ATAPI is a newer protocol used by IDE CD-ROM/tape/floppy
+	  drives, similar to the SCSI protocol.
+
+	  The LS-120 and the IDE/ATAPI Iomega ZIP drive are also supported by
+	  this driver. For information about jumper settings and the question
+	  of when a ZIP drive uses a partition table, see
+	  <http://www.win.tue.nl/~aeb/linux/zip/zip-1.html>.
+	  (ATAPI PD-CD/CDR drives are not supported by this driver; support
+	  for PD-CD/CDR drives is available if you answer Y to
+	  "SCSI emulation support", below).
+
+	  If you say Y here, the FLOPPY drive will be identified along with
+	  other IDE devices, as "hdb" or "hdc", or something similar (check
+	  the boot messages with dmesg).
+
+	  If you want to compile the driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ide-floppy.o.
+
+config BLK_DEV_IDESCSI
+	tristate "SCSI emulation support"
+	depends on BLK_DEV_IDE && SCSI
+	---help---
+	  This will provide SCSI host adapter emulation for IDE ATAPI devices,
+	  and will allow you to use a SCSI device driver instead of a native
+	  ATAPI driver.
+
+	  This is useful if you have an ATAPI device for which no native
+	  driver has been written (for example, an ATAPI PD-CD or CDR drive);
+	  you can then use this emulation together with an appropriate SCSI
+	  device driver. In order to do this, say Y here and to "SCSI support"
+	  and "SCSI generic support", below. You must then provide the kernel
+	  command line "hdx=ide-scsi" (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) for devices if you want the
+	  native EIDE sub-drivers to skip over the native support, so that
+	  this SCSI emulation can be used instead. This is required for use of
+	  CD-RW's.
+
+	  Note that this option does NOT allow you to attach SCSI devices to a
+	  box that doesn't have a SCSI host adapter installed.
+
+	  If both this SCSI emulation and native ATAPI support are compiled
+	  into the kernel, the native support will be used.
+
+config IDE_TASK_IOCTL
+	bool "IDE Taskfile Access"
+	depends on BLK_DEV_IDE
+
+#bool '  IDE Taskfile IO' CONFIG_IDE_TASKFILE_IO
+comment "IDE chipset support/bugfixes"
+	depends on BLK_DEV_IDE
+
+config BLK_DEV_CMD640
+	bool "CMD640 chipset bugfix/support"
+	depends on BLK_DEV_IDE && X86
+	---help---
+	  The CMD-Technologies CMD640 IDE chip is used on many common 486 and
+	  Pentium motherboards, usually in combination with a "Neptune" or
+	  "SiS" chipset. Unfortunately, it has a number of rather nasty
+	  design flaws that can cause severe data corruption under many common
+	  conditions. Say Y here to include code which tries to automatically
+	  detect and correct the problems under Linux. This option also
+	  enables access to the secondary IDE ports in some CMD640 based
+	  systems.
+
+	  This driver will work automatically in PCI based systems (most new
+	  systems have PCI slots). But if your system uses VESA local bus
+	  (VLB) instead of PCI, you must also supply a kernel boot parameter
+	  to enable the CMD640 bugfix/support: "ide0=cmd640_vlb". (Try "man
+	  bootparam" or see the documentation of your boot loader about how to
+	  pass options to the kernel.)
+
+	  The CMD640 chip is also used on add-in cards by Acculogic, and on
+	  the "CSA-6400E PCI to IDE controller" that some people have. For
+	  details, read <file:Documentation/ide.txt>.
+
+config BLK_DEV_CMD640_ENHANCED
+	bool "CMD640 enhanced support"
+	depends on BLK_DEV_CMD640
+	help
+	  This option includes support for setting/autotuning PIO modes and
+	  prefetch on CMD640 IDE interfaces.  For details, read
+	  <file:Documentation/ide.txt>. If you have a CMD640 IDE interface
+	  and your BIOS does not already do this for you, then say Y here.
+	  Otherwise say N.
+
+config BLK_DEV_ISAPNP
+	bool "ISA-PNP EIDE support"
+	depends on BLK_DEV_IDE && ISAPNP
+	help
+	  If you have an ISA EIDE card that is PnP (Plug and Play) and
+	  requires setup first before scanning for devices, say Y here.
+
+	  If unsure, say N.
+
+config BLK_DEV_IDEPCI
+	bool "PCI IDE chipset support" if PCI
+	depends on BLK_DEV_IDE
+	default BLK_DEV_IDEDMA_PMAC if ALL_PPC && BLK_DEV_IDEDMA_PMAC
+
+config BLK_DEV_GENERIC
+	bool "Generic PCI IDE Chipset Support"
+	depends on PCI && BLK_DEV_IDEPCI
+
+config IDEPCI_SHARE_IRQ
+	bool "Sharing PCI IDE interrupts support"
+	depends on PCI && BLK_DEV_IDEPCI
+	help
+	  Some ATA/IDE chipsets have hardware support which allows for
+	  sharing a single IRQ with other cards. To enable support for
+	  this in the ATA/IDE driver, say Y here.
+
+	  It is safe to say Y to this question, in most cases.
+	  If unsure, say N.
+
+config BLK_DEV_IDEDMA_PCI
+	bool "Generic PCI bus-master DMA support"
+	depends on PCI && BLK_DEV_IDEPCI
+	---help---
+	  If your PCI system uses IDE drive(s) (as opposed to SCSI, say) and
+	  is capable of bus-master DMA operation (most Pentium PCI systems),
+	  you will want to say Y here to reduce CPU overhead. You can then use
+	  the "hdparm" utility to enable DMA for drives for which it was not
+	  enabled automatically. By default, DMA is not enabled automatically
+	  for these drives, but you can change that by saying Y to the
+	  following question "Use DMA by default when available". You can get
+	  the latest version of the hdparm utility from
+	  <ftp://ibiblio.org/pub/Linux/system/hardware/>.
+
+	  Read the comments at the beginning of <file:drivers/ide/ide-dma.c>
+	  and the file <file:Documentation/ide.txt> for more information.
+
+	  It is safe to say Y to this question.
+
+config BLK_DEV_IDE_TCQ
+	bool "ATA tagged command queueing (EXPERIMENTAL)"
+	depends on BLK_DEV_IDEDMA_PCI && EXPERIMENTAL
+	help
+	  Support for tagged command queueing on ATA disk drives. This enables
+	  the IDE layer to have multiple in-flight requests on hardware that
+	  supports it. For now this includes the IBM Deskstar series drives,
+	  such as the 22GXP, 75GXP, 40GV, 60GXP, and 120GXP (ie any Deskstar made
+	  in the last couple of years), and at least some of the Western
+	  Digital drives in the Expert series (by nature of really being IBM
+	  drives).
+
+	  If you have such a drive, say Y here.
+
+config BLK_DEV_IDE_TCQ_DEFAULT
+	bool "TCQ on by default"
+	depends on BLK_DEV_IDE_TCQ
+	---help---
+	  Enable tagged command queueing unconditionally on drives that report
+	  support for it. Regardless of the chosen value here, tagging can be
+	  controlled at run time:
+
+	  echo "using_tcq:32" > /proc/ide/hdX/settings
+
+	  where any value between 1-32 selects chosen queue depth and enables
+	  TCQ, and 0 disables it. hdparm version 4.7 an above also support
+	  TCQ manipulations.
+
+	  Generally say Y here.
+
+config BLK_DEV_IDE_TCQ_DEPTH
+	int "Default queue depth"
+	depends on BLK_DEV_IDE_TCQ
+	default "8"
+	help
+	  Maximum size of commands to enable per-drive. Any value between 1
+	  and 32 is valid, with 32 being the maxium that the hardware supports.
+
+	  You probably just want the default of 32 here. If you enter an invalid
+	  number, the default value will be used.
+
+config BLK_DEV_OFFBOARD
+	bool "Boot off-board chipsets first support"
+	depends on PCI && BLK_DEV_IDEPCI
+	---help---
+	  Normally, IDE controllers built into the motherboard (on-board
+	  controllers) are assigned to ide0 and ide1 while those on add-in PCI
+	  cards (off-board controllers) are relegated to ide2 and ide3.
+	  Answering Y here will allow you to reverse the situation, with
+	  off-board controllers on ide0/1 and on-board controllers on ide2/3.
+	  This can improve the usability of some boot managers such as lilo
+	  when booting from a drive on an off-board controller.
+
+	  If you say Y here, and you actually want to reverse the device scan
+	  order as explained above, you also need to issue the kernel command
+	  line option "ide=reverse". (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.)
+
+	  Note that, if you do this, the order of the hd* devices will be
+	  rearranged which may require modification of fstab and other files.
+
+	  If in doubt, say N.
+
+config BLK_DEV_IDEDMA_FORCED
+	bool "Force enable legacy 2.0.X HOSTS to use DMA"
+	depends on BLK_DEV_IDEDMA_PCI
+
+config IDEDMA_PCI_AUTO
+	bool "Use PCI DMA by default when available"
+	depends on BLK_DEV_IDEDMA_PCI
+	---help---
+	  Prior to kernel version 2.1.112, Linux used to automatically use
+	  DMA for IDE drives and chipsets which support it. Due to concerns
+	  about a couple of cases where buggy hardware may have caused damage,
+	  the default is now to NOT use DMA automatically. To revert to the
+	  previous behaviour, say Y to this question.
+
+	  If you suspect your hardware is at all flakey, say N here.
+	  Do NOT email the IDE kernel people regarding this issue!
+
+	  It is normally safe to answer Y to this question unless your
+	  motherboard uses a VIA VP2 chipset, in which case you should say N.
+
+config IDEDMA_ONLYDISK
+	bool "Enable DMA only for disks "
+	depends on IDEDMA_PCI_AUTO
+	help
+	  This is used if you know your ATAPI Devices are going to fail DMA
+	  Transfers.
+
+	  Generally say N here.
+
+config BLK_DEV_IDEDMA
+	bool
+	depends on BLK_DEV_IDE
+	default BLK_DEV_IDEDMA_ICS if ARM
+	default BLK_DEV_IDEDMA_PMAC if ALL_PPC && BLK_DEV_IDE_PMAC
+	default BLK_DEV_IDEDMA_PCI if PCI && BLK_DEV_IDEPCI
+
+config IDEDMA_PCI_WIP
+	bool "ATA Work(s) In Progress (EXPERIMENTAL)"
+	depends on BLK_DEV_IDEDMA_PCI && EXPERIMENTAL
+
+config IDEDMA_NEW_DRIVE_LISTINGS
+	bool "Good-Bad DMA Model-Firmware (WIP)"
+	depends on IDEDMA_PCI_WIP
+	help
+	  If you say Y here, the model and firmware revision of your drive
+	  will be compared against a blacklist of buggy drives that claim to
+	  be (U)DMA capable but aren't. This is a blanket on/off test with no
+	  speed limit options.
+
+	  If in doubt, say N.
+
+config BLK_DEV_ADMA
+	bool
+	depends on PCI && BLK_DEV_IDEPCI
+	default BLK_DEV_IDEDMA_PCI
+
+config BLK_DEV_AEC62XX
+	tristate "AEC62XX chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds explicit support for Acard AEC62xx (Artop ATP8xx)
+	  IDE controllers. This allows the kernel to change PIO, DMA and UDMA
+	  speeds and to configure the chip to optimum performance.
+
+config BLK_DEV_ALI15X3
+	tristate "ALI M15x3 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver ensures (U)DMA support for ALI 1533, 1543 and 1543C
+	  onboard chipsets.  It also tests for Simplex mode and enables
+	  normal dual channel support.
+
+	  If you say Y here, you also need to say Y to "Use DMA by default
+	  when available", above.  Please read the comments at the top of
+	  <file:drivers/ide/alim15x3.c>.
+
+	  If unsure, say N.
+
+config WDC_ALI15X3
+	bool "ALI M15x3 WDC support (DANGEROUS)"
+	depends on BLK_DEV_ALI15X3
+	---help---
+	  This allows for UltraDMA support for WDC drives that ignore CRC
+	  checking. You are a fool for enabling this option, but there have
+	  been requests. DO NOT COMPLAIN IF YOUR DRIVE HAS FS CORRUPTION, IF
+	  YOU ENABLE THIS! No one will listen, just laugh for ignoring this
+	  SERIOUS WARNING.
+
+	  Using this option can allow WDC drives to run at ATA-4/5 transfer
+	  rates with only an ATA-2 support structure.
+
+	  SAY N!
+
+config BLK_DEV_AMD74XX
+	tristate "AMD Viper support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds explicit support for AMD-7xx and AMD-8111 chips
+	  and also for the nVidia nForce chip.  This allows the kernel to
+	  change PIO, DMA and UDMA speeds and to configure the chip to
+	  optimum performance.
+
+config AMD74XX_OVERRIDE
+	bool "AMD Viper ATA-66 Override"
+	depends on BLK_DEV_AMD74XX
+
+config BLK_DEV_CMD64X
+	tristate "CMD64{3|6|8|9} chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  Say Y here if you have an IDE controller which uses any of these
+	  chipsets: CMD643, CMD646, or CMD648.
+
+config BLK_DEV_CY82C693
+	tristate "CY82C693 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds detection and support for the CY82C693 chipset
+	  used on Digital's PC-Alpha 164SX boards.
+
+	  If you say Y here, you need to say Y to "Use DMA by default
+	  when available" as well.
+
+config BLK_DEV_CS5530
+	tristate "Cyrix CS5530 MediaGX chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  Include support for UDMA on the Cyrix MediaGX 5530 chipset. This
+	  will automatically be detected and configured if found.
+
+	  It is safe to say Y to this question.
+
+	  People with SCSI-only systems should say N here. If unsure, say Y.
+
+config BLK_DEV_HPT34X
+	tristate "HPT34X chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds up to 4 more EIDE devices sharing a single
+	  interrupt. The HPT343 chipset in its current form is a non-bootable
+	  controller; the HPT345/HPT363 chipset is a bootable (needs BIOS FIX)
+	  PCI UDMA controllers. This driver requires dynamic tuning of the
+	  chipset during the ide-probe at boot time. It is reported to support
+	  DVD II drives, by the manufacturer.
+
+config HPT34X_AUTODMA
+	bool "HPT34X AUTODMA support (WIP)"
+	depends on BLK_DEV_HPT34X && IDEDMA_PCI_WIP
+	help
+	  This is a dangerous thing to attempt currently! Please read the
+	  comments at the top of <file:drivers/ide/hpt34x.c>.  If you say Y
+	  here, then say Y to "Use DMA by default when available" as well.
+
+	  If unsure, say N.
+
+config BLK_DEV_HPT366
+	tristate "HPT366/368/370 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	---help---
+	  HPT366 is an Ultra DMA chipset for ATA-66.
+	  HPT368 is an Ultra DMA chipset for ATA-66 RAID Based.
+	  HPT370 is an Ultra DMA chipset for ATA-100.
+	  HPT372 is an Ultra DMA chipset for ATA-100.
+	  HPT374 is an Ultra DMA chipset for ATA-100.
+
+	  This driver adds up to 4 more EIDE devices sharing a single
+	  interrupt.
+
+	  The HPT366 chipset in its current form is bootable. One solution
+	  for this problem are special LILO commands for redirecting the
+	  reference to device 0x80. The other solution is to say Y to "Boot
+	  off-board chipsets first support" (CONFIG_BLK_DEV_OFFBOARD) unless
+	  your mother board has the chipset natively mounted. Regardless one
+	  should use the fore mentioned option and call at LILO or include
+	  "ide=reverse" in LILO's append-line.
+
+	  This driver requires dynamic tuning of the chipset during the
+	  ide-probe at boot. It is reported to support DVD II drives, by the
+	  manufacturer.
+
+config BLK_DEV_PIIX
+	tristate "Intel PIIXn chipsets support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds explicit support for Intel PIIX and ICH chips
+	  and also for the Efar Victory66 (slc90e66) chip.  This allows
+	  the kernel to change PIO, DMA and UDMA speeds and to configure
+	  the chip to optimum performance.
+
+config BLK_DEV_IT8172
+	bool "IT8172 IDE support"
+	depends on (MIPS_ITE8172 || MIPS_IVR) && BLK_DEV_IDEDMA_PCI
+	help
+	  Say Y here to support the on-board IDE controller on the Integrated
+	  Technology Express, Inc. ITE8172 SBC.  Vendor page at
+	  <http://www.ite.com.tw/ia/brief_it8172bsp.htm>; picture of the
+	  board at <http://www.mvista.com/allies/semiconductor/ite.html>.
+
+config BLK_DEV_NFORCE
+	tristate "nVidia NFORCE support"
+	depends on BLK_DEV_IDEDMA_PCI
+
+config BLK_DEV_NS87415
+	tristate "NS87415 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds detection and support for the NS87415 chip
+	  (used in SPARC64, among others).
+
+	  Please read the comments at the top of <file:drivers/ide/ns87415.c>.
+
+config BLK_DEV_OPTI621
+	tristate "OPTi 82C621 chipset enhanced support (EXPERIMENTAL)"
+	depends on PCI && BLK_DEV_IDEPCI && EXPERIMENTAL
+	help
+	  This is a driver for the OPTi 82C621 EIDE controller.
+	  Please read the comments at the top of <file:drivers/ide/opti621.c>.
+
+config BLK_DEV_PDC202XX_OLD
+	tristate "PROMISE PDC202{46|62|65|67} support"
+	depends on BLK_DEV_IDEDMA_PCI
+
+config PDC202XX_BURST
+	bool "Special UDMA Feature"
+	depends on BLK_DEV_PDC202XX_OLD=y && CONFI_BLK_DEV_IDEDMA_PCI
+	---help---
+	  This option causes the pdc202xx driver to enable UDMA modes on the
+	  PDC202xx even when the PDC202xx BIOS has not done so.
+
+	  It was originally designed for the PDC20246/Ultra33, whose BIOS will
+	  only setup UDMA on the first two PDC20246 cards.  It has also been
+	  used succesfully on a PDC20265/Ultra100, allowing use of UDMA modes
+	  when the PDC20265 BIOS has been disabled (for faster boot up).
+
+	  Please read the comments at the top of
+	  <file:drivers/ide/pdc202xx.c>.
+
+	  If unsure, say N.
+
+config BLK_DEV_PDC202XX_NEW
+	tristate "PROMISE PDC202{68|69|70|71|75|76|77} support"
+	depends on BLK_DEV_IDEDMA_PCI
+
+# FIXME - probably wants to be one for old and for new
+config PDC202XX_FORCE
+	bool "Special FastTrak Feature"
+	depends on BLK_DEV_PDC202XX_NEW=y
+	help
+	  For FastTrak enable overriding BIOS.
+
+config BLK_DEV_RZ1000
+	tristate "RZ1000 chipset bugfix/support"
+	depends on PCI && BLK_DEV_IDEPCI && X86
+	help
+	  The PC-Technologies RZ1000 IDE chip is used on many common 486 and
+	  Pentium motherboards, usually along with the "Neptune" chipset.
+	  Unfortunately, it has a rather nasty design flaw that can cause
+	  severe data corruption under many conditions. Say Y here to include
+	  code which automatically detects and corrects the problem under
+	  Linux. This may slow disk throughput by a few percent, but at least
+	  things will operate 100% reliably.
+
+config BLK_DEV_SVWKS
+	tristate "ServerWorks OSB4/CSB5/CSB6 chipsets support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds PIO/(U)DMA support for the ServerWorks OSB4/CSB5
+	  chipsets.
+
+config BLK_DEV_SIIMAGE
+	tristate "Silicon Image chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+
+config BLK_DEV_SIS5513
+	tristate "SiS5513 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI && X86
+	---help---
+	  This driver ensures (U)DMA support for SIS5513 chipset family based
+	  mainboards.
+
+	  The following chipsets are supported:
+	  ATA16:  SiS5511, SiS5513
+	  ATA33:  SiS5591, SiS5597, SiS5598, SiS5600
+	  ATA66:  SiS530, SiS540, SiS620, SiS630, SiS640
+	  ATA100: SiS635, SiS645, SiS650, SiS730, SiS735, SiS740,
+	  SiS745, SiS750
+
+	  If you say Y here, you need to say Y to "Use DMA by default when
+	  available" as well.
+
+	  Please read the comments at the top of <file:drivers/ide/sis5513.c>.
+
+config BLK_DEV_SLC90E66
+	tristate "SLC90E66 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+
+config BLK_DEV_TRM290
+	tristate "Tekram TRM290 chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds support for bus master DMA transfers
+	  using the Tekram TRM290 PCI IDE chip. Volunteers are
+	  needed for further tweaking and development.
+	  Please read the comments at the top of <file:drivers/ide/trm290.c>.
+
+config BLK_DEV_VIA82CXXX
+	tristate "VIA82CXXX chipset support"
+	depends on BLK_DEV_IDEDMA_PCI
+	help
+	  This driver adds explicit support for VIA BusMastering IDE chips.
+	  This allows the kernel to change PIO, DMA and UDMA speeds and to
+	  configure the chip to optimum performance.
+
+config BLK_DEV_SL82C105
+	tristate "Winbond SL82c105 support"
+	depends on PCI && (PPC || ARM) && BLK_DEV_IDEPCI
+	help
+	  If you have a Winbond SL82c105 IDE controller, say Y here to enable
+	  special configuration for this chip. This is common on various CHRP
+	  motherboards, but could be used elsewhere. If in doubt, say Y.
+
+config BLK_DEV_IDE_PMAC
+	bool "Builtin PowerMac IDE support"
+	depends on BLK_DEV_IDE && ALL_PPC
+	help
+	  This driver provides support for the built-in IDE controller on
+	  most of the recent Apple Power Macintoshes and PowerBooks.
+	  If unsure, say Y.
+
+config BLK_DEV_IDEDMA_PMAC
+	bool "PowerMac IDE DMA support"
+	depends on BLK_DEV_IDE_PMAC
+	help
+	  This option allows the driver for the built-in IDE controller on
+	  Power Macintoshes and PowerBooks to use DMA (direct memory access)
+	  to transfer data to and from memory.  Saying Y is safe and improves
+	  performance.
+
+config BLK_DEV_IDEDMA_PMAC_AUTO
+	bool "Use DMA by default"
+	depends on BLK_DEV_IDEDMA_PMAC
+	help
+	  This option allows the driver for the built-in IDE controller on
+	  Power Macintoshes and PowerBooks to use DMA automatically, without
+	  it having to be explicitly enabled.  This option is provided because
+	  of concerns about a couple of cases where using DMA on buggy PC
+	  hardware may have caused damage.  Saying Y should be safe on all
+	  Apple machines.
+
+config BLK_DEV_IDE_SWARM
+	bool "SWARM onboard IDE support"
+	depends on BLK_DEV_IDE && SIBYTE_SWARM
+
+config BLK_DEV_IDE_ICSIDE
+	tristate "ICS IDE interface support"
+	depends on BLK_DEV_IDE!=n && ARM && ARCH_ACORN
+	help
+	  On Acorn systems, say Y here if you wish to use the ICS IDE
+	  interface card.  This is not required for ICS partition support.
+	  If you are unsure, say N to this.
+
+config BLK_DEV_IDEDMA_ICS
+	bool "ICS DMA support"
+	depends on BLK_DEV_IDE_ICSIDE
+	help
+	  Say Y here if you want to add DMA (Direct Memory Access) support to
+	  the ICS IDE driver.
+
+config IDEDMA_ICS_AUTO
+	bool "Use ICS DMA by default"
+	depends on BLK_DEV_IDEDMA_ICS
+	help
+	  Prior to kernel version 2.1.112, Linux used to automatically use
+	  DMA for IDE drives and chipsets which support it. Due to concerns
+	  about a couple of cases where buggy hardware may have caused damage,
+	  the default is now to NOT use DMA automatically. To revert to the
+	  previous behaviour, say Y to this question.
+
+	  If you suspect your hardware is at all flakey, say N here.
+	  Do NOT email the IDE kernel people regarding this issue!
+
+config BLK_DEV_IDE_RAPIDE
+	tristate "RapIDE interface support"
+	depends on BLK_DEV_IDE!=n && ARM && ARCH_ACORN
+	help
+	  Say Y here if you want to support the Yellowstone RapIDE controller
+	  manufactured for use with Acorn computers.
+
+config BLK_DEV_GAYLE
+	bool "Amiga Gayle IDE interface support"
+	depends on BLK_DEV_IDE && AMIGA
+	help
+	  This is the IDE driver for the builtin IDE interface on some Amiga
+	  models. It supports both the `A1200 style' (used in A600 and A1200)
+	  and `A4000 style' (used in A4000 and A4000T) of the Gayle IDE
+	  interface. Say Y if you have such an Amiga model and want to use IDE
+	  devices (hard disks, CD-ROM drives, etc.) that are connected to the
+	  builtin IDE interface.
+
+config BLK_DEV_IDEDOUBLER
+	bool "Amiga IDE Doubler support (EXPERIMENTAL)"
+	depends on BLK_DEV_GAYLE && EXPERIMENTAL
+	---help---
+	  This driver provides support for the so-called `IDE doublers' (made
+	  by various manufacturers, e.g. Eyetech) that can be connected to the
+	  builtin IDE interface of some Amiga models. Using such an IDE
+	  doubler, you can connect up to four instead of two IDE devices on
+	  the Amiga's builtin IDE interface.
+
+	  Note that the normal Amiga Gayle IDE driver may not work correctly
+	  if you have an IDE doubler and don't enable this driver!
+
+	  Say Y if you have an IDE doubler.  The driver is enabled at kernel
+	  runtime using the "ide=doubler" kernel boot parameter.
+
+config BLK_DEV_BUDDHA
+	bool "Buddha/Catweasel/X-Surf IDE interface support (EXPERIMENTAL)"
+	depends on BLK_DEV_IDE && ZORRO && EXPERIMENTAL
+	help
+	  This is the IDE driver for the IDE interfaces on the Buddha, 
+	  Catweasel and X-Surf expansion boards.  It supports up to two interfaces 
+	  on the Buddha, three on the Catweasel and two on the X-Surf.
+
+	  Say Y if you have a Buddha or Catweasel expansion board and want to
+	  use IDE devices (hard disks, CD-ROM drives, etc.) that are connected
+	  to one of its IDE interfaces.
+
+config BLK_DEV_FALCON_IDE
+	bool "Falcon IDE interface support"
+	depends on BLK_DEV_IDE && ATARI
+	help
+	  This is the IDE driver for the builtin IDE interface on the Atari
+	  Falcon. Say Y if you have a Falcon and want to use IDE devices (hard
+	  disks, CD-ROM drives, etc.) that are connected to the builtin IDE
+	  interface.
+
+config BLK_DEV_MAC_IDE
+	bool "Macintosh Quadra/Powerbook IDE interface support"
+	depends on BLK_DEV_IDE && MAC
+	help
+	  This is the IDE driver for the builtin IDE interface on some m68k
+	  Macintosh models. It supports both the `Quadra style' (used in
+	  Quadra/ Centris 630 and Performa 588 models) and `Powerbook style'
+	  (used in the Powerbook 150 and 190 models) IDE interface.
+
+	  Say Y if you have such an Macintosh model and want to use IDE
+	  devices (hard disks, CD-ROM drives, etc.) that are connected to the
+	  builtin IDE interface.
+
+config BLK_DEV_Q40IDE
+	bool "Q40/Q60 IDE interface support"
+	depends on BLK_DEV_IDE && Q40
+	help
+	  Enable the on-board IDE controller in the Q40/Q60.  This should
+	  normally be on; disable it only if you are running a custom hard
+	  drive subsystem through an expansion card.
+
+config BLK_DEV_MPC8xx_IDE
+	bool "MPC8xx IDE support"
+	depends on BLK_DEV_IDE && 8xx
+	help
+	  This option provides support for IDE on Motorola MPC8xx Systems.
+	  Please see 'Type of MPC8xx IDE interface' for details.
+
+	  If unsure, say N.
+
+choice
+	prompt "Type of MPC8xx IDE interface"
+	depends on BLK_DEV_MPC8xx_IDE
+	default IDE_8xx_PCCARD
+
+config IDE_8xx_PCCARD
+	bool "8xx_PCCARD"
+	---help---
+	  Select how the IDE devices are connected to the MPC8xx system:
+
+	  8xx_PCCARD uses the 8xx internal PCMCIA interface in combination
+	  with a PC Card (e.g. ARGOSY portable Hard Disk Adapter),
+	  ATA PC Card HDDs or ATA PC Flash Cards (example: TQM8xxL
+	  systems)
+
+	  8xx_DIRECT is used for directly connected IDE devices using the 8xx
+	  internal PCMCIA interface (example: IVMS8 systems)
+
+	  EXT_DIRECT is used for IDE devices directly connected to the 8xx
+	  bus using some glue logic, but _not_ the 8xx internal
+	  PCMCIA interface (example: IDIF860 systems)
+
+config IDE_8xx_DIRECT
+	bool "8xx_DIRECT"
+
+config IDE_EXT_DIRECT
+	bool "EXT_DIRECT"
+
+endchoice
+
+# no isa -> no vlb
+config IDE_CHIPSETS
+	bool "Other IDE chipset support"
+	depends on BLK_DEV_IDE && ISA
+	---help---
+	  Say Y here if you want to include enhanced support for various IDE
+	  interface chipsets used on motherboards and add-on cards. You can
+	  then pick your particular IDE chip from among the following options.
+	  This enhanced support may be necessary for Linux to be able to
+	  access the 3rd/4th drives in some systems. It may also enable
+	  setting of higher speed I/O rates to improve system performance with
+	  these chipsets. Most of these also require special kernel boot
+	  parameters to actually turn on the support at runtime; you can find
+	  a list of these in the file <file:Documentation/ide.txt>.
+
+	  People with SCSI-only systems can say N here.
+
+comment "Note: most of these also require special kernel boot parameters"
+	depends on BLK_DEV_IDE && IDE_CHIPSETS
+
+config BLK_DEV_4DRIVES
+	bool "Generic 4 drives/port support"
+	depends on IDE_CHIPSETS
+
+config BLK_DEV_ALI14XX
+	tristate "ALI M14xx support"
+	depends on IDE_CHIPSETS && BLK_DEV_IDE
+	help
+	  This driver is enabled at runtime using the "ide0=ali14xx" kernel
+	  boot parameter.  It enables support for the secondary IDE interface
+	  of the ALI M1439/1443/1445/1487/1489 chipsets, and permits faster
+	  I/O speeds to be set as well.  See the files
+	  <file:Documentation/ide.txt> and <file:drivers/ide/ali14xx.c> for
+	  more info.
+
+config BLK_DEV_DTC2278
+	tristate "DTC-2278 support"
+	depends on IDE_CHIPSETS && BLK_DEV_IDE
+	help
+	  This driver is enabled at runtime using the "ide0=dtc2278" kernel
+	  boot parameter. It enables support for the secondary IDE interface
+	  of the DTC-2278 card, and permits faster I/O speeds to be set as
+	  well. See the <file:Documentation/ide.txt> and
+	  <file:drivers/ide/dtc2278.c> files for more info.
+
+config BLK_DEV_HT6560B
+	tristate "Holtek HT6560B support"
+	depends on IDE_CHIPSETS && BLK_DEV_IDE
+	help
+	  This driver is enabled at runtime using the "ide0=ht6560b" kernel
+	  boot parameter. It enables support for the secondary IDE interface
+	  of the Holtek card, and permits faster I/O speeds to be set as well.
+	  See the <file:Documentation/ide.txt> and
+	  <file:drivers/ide/ht6560b.c> files for more info.
+
+config BLK_DEV_PDC4030
+	tristate "PROMISE DC4030 support (EXPERIMENTAL)"
+	depends on IDE_CHIPSETS && BLK_DEV_IDEDISK && EXPERIMENTAL
+	help
+	  This driver provides support for the secondary IDE interface and
+	  cache of the original Promise IDE chipsets, e.g. DC4030 and DC5030.
+	  It is nothing to do with the later range of Promise UDMA chipsets -
+	  see the PDC_202XX support for these. CD-ROM and TAPE devices are not
+	  supported (and probably never will be since I don't think the cards
+	  support them). This driver is enabled at runtime using the "ide0=dc4030"
+	  or "ide1=dc4030" kernel boot parameter. See the
+	  <file:drivers/ide/pdc4030.c> file for more info.
+
+config BLK_DEV_QD65XX
+	tristate "QDI QD65xx support"
+	depends on IDE_CHIPSETS && BLK_DEV_IDE
+	help
+	  This driver is enabled at runtime using the "ide0=qd65xx" kernel
+	  boot parameter.  It permits faster I/O speeds to be set.  See the
+	  <file:Documentation/ide.txt> and <file:drivers/ide/qd65xx.c> for
+	  more info.
+
+config BLK_DEV_UMC8672
+	tristate "UMC-8672 support"
+	depends on IDE_CHIPSETS && BLK_DEV_IDE
+	help
+	  This driver is enabled at runtime using the "ide0=umc8672" kernel
+	  boot parameter. It enables support for the secondary IDE interface
+	  of the UMC-8672, and permits faster I/O speeds to be set as well.
+	  See the files <file:Documentation/ide.txt> and
+	  <file:drivers/ide/umc8672.c> for more info.
+
+config BLK_DEV_HD_ONLY
+	bool "Old hard disk (MFM/RLL/IDE) driver"
+	depends on BLK_DEV_IDE=n
+	---help---
+	  There are two drivers for MFM/RLL/IDE hard disks. Most people use
+	  the newer enhanced driver, but this old one is still around for two
+	  reasons. Some older systems have strange timing problems and seem to
+	  work only with the old driver (which itself does not work with some
+	  newer systems). The other reason is that the old driver is smaller,
+	  since it lacks the enhanced functionality of the new one. This makes
+	  it a good choice for systems with very tight memory restrictions, or
+	  for systems with only older MFM/RLL/ESDI drives. Choosing the old
+	  driver can save 13 KB or so of kernel memory.
+
+	  If you are unsure, then just choose the Enhanced IDE/MFM/RLL driver
+	  instead of this one. For more detailed information, read the
+	  Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config IDEDMA_AUTO
+	bool
+	depends on IDEDMA_PCI_AUTO || BLK_DEV_IDEDMA_PMAC_AUTO || IDEDMA_ICS_AUTO
+	default y
+
+config IDEDMA_IVB
+	bool "IGNORE word93 Validation BITS"
+	depends on BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS
+	---help---
+	  There are unclear terms in ATA-4 and ATA-5 standards how certain
+	  hardware (an 80c ribbon) should be detected. Different interpretations
+	  of the standards have been released in hardware. This causes problems:
+	  for example, a host with Ultra Mode 4 (or higher) will not run
+	  in that mode with an 80c ribbon.
+
+	  If you are experiencing compatibility or performance problems, you
+	  MAY try to answering Y here. However, it does not necessarily solve
+	  any of your problems, it could even cause more of them.
+
+	  It is normally safe to answer Y; however, the default is N.
+
+config DMA_NONPCI
+	bool
+	depends on BLK_DEV_TIVO
+	default y
+
+config BLK_DEV_PDC202XX
+	bool
+	depends on BLK_DEV_IDEDMA_PCI && (BLK_DEV_PDC202XX_OLD || BLK_DEV_PDC202XX_NEW)
+	default y
+	---help---
+	  Promise Ultra33 or PDC20246
+	  Promise Ultra66 or PDC20262
+	  Promise Ultra100 or PDC20265/PDC20267/PDC20268
+
+	  This driver adds up to 4 more EIDE devices sharing a single
+	  interrupt. This add-on card is a bootable PCI UDMA controller. Since
+	  multiple cards can be installed and there are BIOS ROM problems that
+	  happen if the BIOS revisions of all installed cards (three-max) do
+	  not match, the driver attempts to do dynamic tuning of the chipset
+	  at boot-time for max-speed.  Ultra33 BIOS 1.25 or newer is required
+	  for more than one card. This card may require that you say Y to
+	  "Special UDMA Feature".
+
+	  If you say Y here, you need to say Y to "Use DMA by default when
+	  available" as well.
+
+	  Please read the comments at the top of
+	  <file:drivers/ide/pdc202xx.c>.
+
+	  If unsure, say N.
+
+##if [ "$CONFIG_IDE_TASKFILE_IO" = "y" ]; then
+##  dep_mbool CONFIG_BLK_DEV_TF_DISK $CONFIG_BLK_DEV_IDEDISK
+##else
+##  dep_mbool CONFIG_BLK_DEV_NTF_DISK $CONFIG_BLK_DEV_IDEDISK
+##fi
+config BLK_DEV_IDE_MODES
+	bool
+	depends on BLK_DEV_4DRIVES || BLK_DEV_ALI14XX || BLK_DEV_DTC2278 || BLK_DEV_HT6560B || BLK_DEV_PDC4030 || BLK_DEV_QD65XX || BLK_DEV_UMC8672 || BLK_DEV_AEC62XX=y || BLK_DEV_ALI15X3=y || BLK_DEV_AMD74XX=y || BLK_DEV_CMD640 || BLK_DEV_CMD64X=y || BLK_DEV_CS5530=y || BLK_DEV_CY82C693=y || BLK_DEV_HPT34X=y || BLK_DEV_HPT366=y || BLK_DEV_IDE_PMAC || BLK_DEV_IT8172 || BLK_DEV_MPC8xx_IDE || BLK_DEV_NFORCE=y || BLK_DEV_OPTI621=y || BLK_DEV_PDC202XX || BLK_DEV_PIIX=y || BLK_DEV_SVWKS=y || BLK_DEV_SIIMAGE=y || BLK_DEV_SIS5513=y || BLK_DEV_SL82C105=y || BLK_DEV_SLC90E66=y || BLK_DEV_VIA82CXXX=y
+	default y
+
+endmenu
+
diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
--- a/drivers/ide/arm/icside.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/ide/arm/icside.c	Wed Oct 30 16:44:28 2002
@@ -1,7 +1,7 @@
 /*
  * linux/drivers/ide/icside.c
  *
- * Copyright (c) 1996,1997 Russell King.
+ * Copyright (c) 1996-2002 Russell King.
  *
  * Changelog:
  *  08-Jun-1996	RMK	Created
@@ -20,25 +20,13 @@
 #include <linux/hdreg.h>
 #include <linux/ide.h>
 #include <linux/pci.h>
+#include <linux/device.h>
 #include <linux/init.h>
 
 #include <asm/dma.h>
 #include <asm/ecard.h>
 #include <asm/io.h>
 
-#include "ide-noise.h"
-
-/*
- * FIXME: We want to drop the the MACRO CRAP!
- *
- * ec->iops->in{b/w/l}
- * ec->iops->in{b/w/l}_p
- * ec->iops->out{b/w/l}
- * ec->iops->out{b/w/l}_p
- *
- * the new core supports clean MMIO calls and other goodies
- */
-
 /*
  * Maximum number of interfaces per card
  */
@@ -86,10 +74,10 @@
 	ICS_ARCIN_V6_IDESTEPPING
 };
 
-static const card_ids icside_cids[] = {
-	{ MANU_ICS,  PROD_ICS_IDE  },
-	{ MANU_ICS2, PROD_ICS2_IDE },
-	{ 0xffff, 0xffff }
+struct icside_state {
+	unsigned int channel;
+	unsigned int enabled;
+	unsigned int irq_port;
 };
 
 typedef enum {
@@ -133,10 +121,21 @@
  */
 static void icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr)
 {
-	unsigned int ide_base_port = (unsigned int)ec->irq_data;
+	struct icside_state *state = ec->irq_data;
+	unsigned int base = state->irq_port;
+
+	state->enabled = 1;
 
-	outb(0, ide_base_port + ICS_ARCIN_V6_INTROFFSET_1);
-	outb(0, ide_base_port + ICS_ARCIN_V6_INTROFFSET_2);
+	switch (state->channel) {
+	case 0:
+		outb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
+		inb(base + ICS_ARCIN_V6_INTROFFSET_2);
+		break;
+	case 1:
+		outb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
+		inb(base + ICS_ARCIN_V6_INTROFFSET_1);
+		break;
+	}
 }
 
 /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr)
@@ -144,10 +143,12 @@
  */
 static void icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr)
 {
-	unsigned int ide_base_port = (unsigned int)ec->irq_data;
+	struct icside_state *state = ec->irq_data;
+
+	state->enabled = 0;
 
-	inb(ide_base_port + ICS_ARCIN_V6_INTROFFSET_1);
-	inb(ide_base_port + ICS_ARCIN_V6_INTROFFSET_2);
+	inb (state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+	inb (state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
 }
 
 /* Prototype: icside_irqprobe(struct expansion_card *ec)
@@ -155,10 +156,10 @@
  */
 static int icside_irqpending_arcin_v6(struct expansion_card *ec)
 {
-	unsigned int ide_base_port = (unsigned int)ec->irq_data;
+	struct icside_state *state = ec->irq_data;
 
-	return inb(ide_base_port + ICS_ARCIN_V6_INTRSTAT_1) & 1 ||
-	       inb(ide_base_port + ICS_ARCIN_V6_INTRSTAT_2) & 1;
+	return inb(state->irq_port + ICS_ARCIN_V6_INTRSTAT_1) & 1 ||
+	       inb(state->irq_port + ICS_ARCIN_V6_INTRSTAT_2) & 1;
 }
 
 static const expansioncard_ops_t icside_ops_arcin_v6 = {
@@ -221,6 +222,39 @@
 	return iftype;
 }
 
+/*
+ * Handle routing of interrupts.  This is called before
+ * we write the command to the drive.
+ */
+static void icside_maskproc(ide_drive_t *drive, int mask)
+{
+	ide_hwif_t *hwif = HWIF(drive);
+	struct icside_state *state = hwif->hw.priv;
+	unsigned long flags;
+
+	local_irq_save(flags);
+
+	state->channel = hwif->channel;
+
+	if (state->enabled && !mask) {
+		switch (hwif->channel) {
+		case 0:
+			outb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+			inb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
+			break;
+		case 1:
+			outb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
+			inb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+			break;
+		}
+	} else {
+		inb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
+		inb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+	}
+
+	local_irq_restore(flags);
+}
+
 #ifdef CONFIG_BLK_DEV_IDEDMA_ICS
 /*
  * SG-DMA support.
@@ -234,125 +268,119 @@
 #define NR_ENTRIES 256
 #define TABLE_SIZE (NR_ENTRIES * 8)
 
-static int ide_build_sglist(ide_hwif_t *hwif, struct request *rq)
+static void ide_build_sglist(ide_drive_t *drive, struct request *rq)
 {
-	struct buffer_head *bh;
+	ide_hwif_t *hwif = drive->hwif;
 	struct scatterlist *sg = hwif->sg_table;
-	int nents = 0;
+	int nents;
 
-	if (rq->cmd == READ)
-		hwif->sg_dma_direction = PCI_DMA_FROMDEVICE;
-	else
-		hwif->sg_dma_direction = PCI_DMA_TODEVICE;
-	bh = rq->bh;
-	do {
-		unsigned char *virt_addr = bh->b_data;
-		unsigned int size = bh->b_size;
-
-		while ((bh = bh->b_reqnext) != NULL) {
-			if ((virt_addr + size) != (unsigned char *)bh->b_data)
-				break;
-			size += bh->b_size;
-		}
-		memset(&sg[nents], 0, sizeof(*sg));
-		sg[nents].address = virt_addr;
-		sg[nents].length = size;
-		nents++;
-	} while (bh != NULL);
+	BUG_ON(hwif->sg_dma_active);
 
-	return pci_map_sg(NULL, sg, nents, hwif->sg_dma_direction);
-}
+	if (rq->flags & REQ_DRIVE_TASKFILE) {
+		ide_task_t *args = rq->special;
 
-static int
-icside_build_dmatable(ide_drive_t *drive, int reading)
-{
-	return HWIF(drive)->sg_nents = ide_build_sglist(HWIF(drive), HWGROUP(drive)->rq);
-}
+		if (args->command_type == IDE_DRIVE_TASK_RAW_WRITE)
+			hwif->sg_dma_direction = PCI_DMA_TODEVICE;
+		else
+			hwif->sg_dma_direction = PCI_DMA_FROMDEVICE;
 
-/* Teardown mappings after DMA has completed.  */
-static void icside_destroy_dmatable(ide_drive_t *drive)
-{
-	struct scatterlist *sg = HWIF(drive)->sg_table;
-	int nents = HWIF(drive)->sg_nents;
+		memset(sg, 0, sizeof(*sg));
+		sg->page   = virt_to_page(rq->buffer);
+		sg->offset = ((unsigned long)rq->buffer) & ~PAGE_MASK;
+		sg->length = rq->nr_sectors * SECTOR_SIZE;
+		nents = 1;
+	} else {
+		nents = blk_rq_map_sg(&drive->queue, rq, sg);
+
+		if (rq_data_dir(rq) == READ)
+			hwif->sg_dma_direction = PCI_DMA_FROMDEVICE;
+		else
+			hwif->sg_dma_direction = PCI_DMA_TODEVICE;
+	}
+
+	nents = pci_map_sg(NULL, sg, nents, hwif->sg_dma_direction);
 
-	pci_unmap_sg(NULL, sg, nents, HWIF(drive)->sg_dma_direction);
+	hwif->sg_nents = nents;
 }
 
-static int
-icside_config_if(ide_drive_t *drive, int xfer_mode)
+
+/*
+ * Configure the IOMD to give the appropriate timings for the transfer
+ * mode being requested.  We take the advice of the ATA standards, and
+ * calculate the cycle time based on the transfer mode, and the EIDE
+ * MW DMA specs that the drive provides in the IDENTIFY command.
+ *
+ * We have the following IOMD DMA modes to choose from:
+ *
+ *	Type	Active		Recovery	Cycle
+ *	A	250 (250)	312 (550)	562 (800)
+ *	B	187		250		437
+ *	C	125 (125)	125 (375)	250 (500)
+ *	D	62		125		187
+ *
+ * (figures in brackets are actual measured timings)
+ *
+ * However, we also need to take care of the read/write active and
+ * recovery timings:
+ *
+ *			Read	Write
+ *  	Mode	Active	-- Recovery --	Cycle	IOMD type
+ *	MW0	215	50	215	480	A
+ *	MW1	80	50	50	150	C
+ *	MW2	70	25	25	120	C
+ */
+static int icside_set_speed(ide_drive_t *drive, u8 xfer_mode)
 {
-	int func = ide_dma_off;
+	int on = 0, cycle_time = 0, use_dma_info = 0;
+
+	/*
+	 * Limit the transfer speed to MW_DMA_2.
+	 */
+	if (xfer_mode > XFER_MW_DMA_2)
+		xfer_mode = XFER_MW_DMA_2;
 
 	switch (xfer_mode) {
 	case XFER_MW_DMA_2:
-		/*
-		 * The cycle time is limited to 250ns by the r/w
-		 * pulse width (90ns), however we should still
-		 * have a maximum burst transfer rate of 8MB/s.
-		 */
-		drive->drive_data = 250;
+		cycle_time = 250;
+		use_dma_info = 1;
 		break;
 
 	case XFER_MW_DMA_1:
-		drive->drive_data = 250;
+		cycle_time = 250;
+		use_dma_info = 1;
 		break;
 
 	case XFER_MW_DMA_0:
-		drive->drive_data = 480;
+		cycle_time = 480;
 		break;
 
-	default:
-		drive->drive_data = 0;
+	case XFER_SW_DMA_2:
+	case XFER_SW_DMA_1:
+	case XFER_SW_DMA_0:
+		cycle_time = 480;
 		break;
 	}
 
-	if (!drive->init_speed)
-		drive->init_speed = (u8) xfer_mode;
+	/*
+	 * If we're going to be doing MW_DMA_1 or MW_DMA_2, we should
+	 * take care to note the values in the ID...
+	 */
+	if (use_dma_info && drive->id->eide_dma_time > cycle_time)
+		cycle_time = drive->id->eide_dma_time;
 
-	if (drive->drive_data &&
-	    ide_config_drive_speed(drive, (u8) xfer_mode) == 0)
-		func = ide_dma_on;
+	drive->drive_data = cycle_time;
+
+	if (cycle_time && ide_config_drive_speed(drive, xfer_mode) == 0)
+		on = 1;
 	else
 		drive->drive_data = 480;
 
 	printk("%s: %s selected (peak %dMB/s)\n", drive->name,
 		ide_xfer_verbose(xfer_mode), 2000 / drive->drive_data);
 
-	drive->current_speed = (u8) xfer_mode;
-
-	return func;
-}
-
-static int
-icside_set_speed(ide_drive_t *drive, u8 speed)
-{
-	return icside_config_if(drive, speed);
-}
-
-/*
- * dma_intr() is the handler for disk read/write DMA interrupts
- */
-static ide_startstop_t icside_dmaintr(ide_drive_t *drive)
-{
-	u8 dma_stat	= HWIF(drive)->ide_dma_end(drive);
-	/* get drive status */
-	u8 stat		= HWIF(drive)->INB(IDE_STATUS_REG);
-	int i;
+	drive->current_speed = xfer_mode;
 
-	if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
-		if (!dma_stat) {
-			struct request *rq = HWGROUP(drive)->rq;
-			rq = HWGROUP(drive)->rq;
-			for (i = rq->nr_sectors; i > 0;) {
-				i -= rq->current_nr_sectors;
-				DRIVER(drive)->end_request(drive, 1);
-			}
-			return ide_stopped;
-		}
-		printk("%s: dma_intr: bad DMA status (dma_stat=%x)\n", 
-		       drive->name, dma_stat);
-	}
-	return DRIVER(drive)->error(drive, "dma_intr", stat);
+	return on;
 }
 
 /*
@@ -361,16 +389,16 @@
  * This should be defined in one place only.
  */
 struct drive_list_entry {
-	char * id_model;
-	char * id_firmware;
+	const char * id_model;
+	const char * id_firmware;
 };
 
-static struct drive_list_entry drive_whitelist [] = {
+static const struct drive_list_entry drive_whitelist [] = {
 	{ "Micropolis 2112A",			"ALL"		},
 	{ "CONNER CTMA 4000",			"ALL"		},
 	{ "CONNER CTT8000-A",			"ALL"		},
 	{ "ST34342A",				"ALL"		},
-	{ NULL,					0		}
+	{ NULL,					NULL		}
 };
 
 static struct drive_list_entry drive_blacklist [] = {
@@ -407,10 +435,11 @@
 	{ "PLEXTOR CD-R PX-W8432T",		"ALL"		},
 	{ "ATAPI CD-ROM DRIVE 40X MAXIMUM",	"ALL"		},
 	{ "_NEC DV5800A",			"ALL"		},
-	{ NULL,					0		}
+	{ NULL,					NULL		}
 };
 
-static int in_drive_list(struct hd_driveid *id, struct drive_list_entry * drive_table)
+static int
+in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table)
 {
 	for ( ; drive_table->id_model ; drive_table++)
 		if ((!strcmp(drive_table->id_model, id->model)) &&
@@ -420,41 +449,52 @@
 	return 0;
 }
 
-/*
- *  For both Blacklisted and Whitelisted drives.
- *  This is setup to be called as an extern for future support
- *  to other special driver code.
- */
-int check_drive_good_lists (ide_drive_t *drive)
+static int icside_dma_host_off(ide_drive_t *drive)
 {
-	struct hd_driveid *id = drive->id;
-	return in_drive_list(id, drive_whitelist);
+	return 0;
 }
 
-int check_drive_bad_lists (ide_drive_t *drive)
+static int icside_dma_off_quietly(ide_drive_t *drive)
 {
-	struct hd_driveid *id = drive->id;
-	int blacklist = in_drive_list(id, drive_blacklist);
-	if (blacklist)
-		printk("%s: Disabling DMA for %s\n", drive->name, id->model);
-	return(blacklist);
+	drive->using_dma = 0;
+	return icside_dma_host_off(drive);
+}
+
+static int icside_dma_off(ide_drive_t *drive)
+{
+	printk("%s: DMA disabled\n", drive->name);
+	return icside_dma_off_quietly(drive);
+}
+
+static int icside_dma_host_on(ide_drive_t *drive)
+{
+	return 0;
+}
+
+static int icside_dma_on(ide_drive_t *drive)
+{
+	drive->using_dma = 1;
+	return icside_dma_host_on(drive);
 }
 
-int icside_dma_check(ide_drive_t *drive)
+static int icside_dma_check(ide_drive_t *drive)
 {
 	struct hd_driveid *id = drive->id;
 	ide_hwif_t *hwif = HWIF(drive);
-	int autodma = hwif->autodma;
 	int xfer_mode = XFER_PIO_2;
+	int on;
 
-	if (!id || !(id->capability & 1) || !autodma)
-		return hwif->ide_dma_off_quietly(drive);
+	if (!id || !(id->capability & 1) || !hwif->autodma)
+		goto out;
 
 	/*
 	 * Consult the list of known "bad" drives
 	 */
-	if (check_drive_bad_lists(drive))
-		return hwif->ide_dma_off(drive);
+	if (in_drive_list(id, drive_blacklist)) {
+		printk("%s: Disabling DMA for %s (blacklisted)\n",
+			drive->name, id->model);
+		goto out;
+	}
 
 	/*
 	 * Enable DMA on any drive that has multiword DMA
@@ -473,192 +513,249 @@
 	/*
 	 * Consult the list of known "good" drives
 	 */
-	if (check_drive_good_lists(drive)) {
+	if (in_drive_list(id, drive_whitelist)) {
 		if (id->eide_dma_time > 150)
 			goto out;
 		xfer_mode = XFER_MW_DMA_1;
 	}
 
 out:
-	if (icside_config_if(drive, xfer_mode))
-		return hwif->ide_dma_on(drive);
-	return hwif->ide_dma_off(drive);
-}
+	on = icside_set_speed(drive, xfer_mode);
 
-int icside_dma_verbose(ide_drive_t *drive)
-{
-	printk(", DMA");
-	return 1;
+	if (on)
+		return icside_dma_on(drive);
+	else
+		return icside_dma_off_quietly(drive);
 }
 
-int icside_dma_test_irq(ide_drive_t *drive)
+static int icside_dma_end(ide_drive_t *drive)
 {
 	ide_hwif_t *hwif = HWIF(drive);
-	return inb((unsigned long)hwif->hw.priv) & 1;
-}
 
-int icside_dma_host_off(ide_drive_t *drive)
-{
-	return 0;
-}
+	drive->waiting_for_dma = 0;
 
-int icside_dma_off_quietly(ide_drive_t *drive)
-{
-	drive->using_dma = 0;
-	return icside_dma_host_off(drive);
-}
+	disable_dma(hwif->hw.dma);
 
-int icside_dma_off(ide_drive_t *drive)
-{
-	printk("%s: DMA disabled\n", drive->name);
-	return icside_dma_off_quietly(drive);
-}
+	/* Teardown mappings after DMA has completed. */
+	pci_unmap_sg(NULL, hwif->sg_table, hwif->sg_nents,
+		     hwif->sg_dma_direction);
 
-int icside_dma_host_on(ide_drive_t *drive)
-{
-	return 0;
-}
+	hwif->sg_dma_active = 0;
 
-int icside_dma_on(ide_drive_t *drive)
-{
-	drive->using_dma = 1;
-	return icside_dma_host_on(drive);
+	return get_dma_residue(hwif->hw.dma) != 0;
 }
 
-int icside_dma_begin(ide_drive_t *drive)
+static int icside_dma_begin(ide_drive_t *drive)
 {
 	ide_hwif_t *hwif = HWIF(drive);
 
+	/* We can not enable DMA on both channels simultaneously. */
+	BUG_ON(dma_channel_active(hwif->hw.dma));
 	enable_dma(hwif->hw.dma);
 	return 0;
 }
 
-int icside_dma_end(ide_drive_t *drive)
+static int icside_dma_count(ide_drive_t *drive)
 {
-	ide_hwif_t *hwif = HWIF(drive);
- 
-	drive->waiting_for_dma = 0;
-	disable_dma(hwif->hw.dma);
-	icside_destroy_dmatable(drive);
-	return get_dma_residue(hwif->hw.dma) != 0;
+	return icside_dma_begin(drive);
 }
 
-int icside_dma_count (ide_drive_t *drive)
+/*
+ * dma_intr() is the handler for disk read/write DMA interrupts
+ */
+static ide_startstop_t icside_dmaintr(ide_drive_t *drive)
 {
-        return icside_dma_begin(drive);
+	unsigned int stat;
+	int dma_stat;
+
+	dma_stat = icside_dma_end(drive);
+	stat = HWIF(drive)->INB(IDE_STATUS_REG);
+	if (OK_STAT(stat, DRIVE_READY, drive->bad_wstat | DRQ_STAT)) {
+		if (!dma_stat) {
+			struct request *rq = HWGROUP(drive)->rq;
+			int i;
+
+			for (i = rq->nr_sectors; i > 0; ) {
+				i -= rq->current_nr_sectors;
+				DRIVER(drive)->end_request(drive, 1, rq->nr_sectors);
+			}
+
+			return ide_stopped;
+		}
+		printk(KERN_ERR "%s: bad DMA status (dma_stat=%x)\n",
+		       drive->name, dma_stat);
+	}
+
+	return DRIVER(drive)->error(drive, __FUNCTION__, stat);
 }
 
-int icside_dma_read(ide_drive_t *drive)
+static int
+icside_dma_common(ide_drive_t *drive, struct request *rq,
+		  unsigned int dma_mode)
 {
-	ide_hwif_t *hwif	= HWIF(drive);
-//	ide_task_t *args	= HWGROUP(drive)->rq->special;
-	int count		= 0;
-	u8 lba48		= (drive->addressing == 1) ? 1 : 0;
-	task_ioreg_t command	= WIN_NOP;
+	ide_hwif_t *hwif = HWIF(drive);
 
-	count = icside_build_dmatable(drive, 1);
-	if (!count)
-		return 1;
-	disable_dma(hwif->hw.dma);
+	/*
+	 * We can not enable DMA on both channels.
+	 */
+	BUG_ON(hwif->sg_dma_active);
+	BUG_ON(dma_channel_active(hwif->hw.dma));
+
+	ide_build_sglist(drive, rq);
 
-	/* Route the DMA signals to
-	 * to the correct interface.
+	/*
+	 * Ensure that we have the right interrupt routed.
+	 */
+	icside_maskproc(drive, 0);
+
+	/*
+	 * Route the DMA signals to the correct interface.
 	 */
-	HWIF(drive)->OUTB(hwif->select_data, hwif->config_data);
+	outb(hwif->select_data, hwif->config_data);
 
-	/* Select the correct timing
-	 * for this drive
+	/*
+	 * Select the correct timing for this drive.
 	 */
 	set_dma_speed(hwif->hw.dma, drive->drive_data);
 
-	set_dma_sg(hwif->hw.dma, HWIF(drive)->sg_table, count);
-	set_dma_mode(hwif->hw.dma, DMA_MODE_READ);
+	/*
+	 * Tell the DMA engine about the SG table and
+	 * data direction.
+	 */
+	set_dma_sg(hwif->hw.dma, hwif->sg_table, hwif->sg_nents);
+	set_dma_mode(hwif->hw.dma, dma_mode);
+
+	return 0;
+}
+
+static int icside_dma_read(ide_drive_t *drive)
+{
+	struct request *rq = HWGROUP(drive)->rq;
+	task_ioreg_t cmd = WIN_NOP;
+
+	if (icside_dma_common(drive, rq, DMA_MODE_READ))
+		return 1;
 
 	drive->waiting_for_dma = 1;
+
 	if (drive->media != ide_disk)
 		return 0;
 
-	if (HWGROUP(drive)->handler != NULL)	/* paranoia check */
-		BUG();
-	ide_set_handler(drive, &icside_dmaintr, WAIT_CMD, NULL);
+	BUG_ON(HWGROUP(drive)->handler != NULL);
+
+	ide_set_handler(drive, icside_dmaintr, 2*WAIT_CMD, NULL);
+
 	/*
 	 * FIX ME to use only ACB ide_task_t args Struct
 	 */
 #if 0
 	{
-		ide_task_t *args = HWGROUP(drive)->rq->special;
+		ide_task_t *args = rq->special;
 		command = args->tfRegister[IDE_COMMAND_OFFSET];
 	}
 #else
-	command = (lba48) ? WIN_READDMA_EXT : WIN_READDMA;
-		if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) {
-		ide_task_t *args = HWGROUP(drive)->rq->special;
-		command = args->tfRegister[IDE_COMMAND_OFFSET];
+	if (rq->flags & REQ_DRIVE_TASKFILE) {
+		ide_task_t *args = rq->special;
+		cmd = args->tfRegister[IDE_COMMAND_OFFSET];
+	} else if (drive->addressing == 1) {
+		cmd = WIN_READDMA_EXT;
+	} else {
+		cmd = WIN_READDMA;
 	}
 #endif
 	/* issue cmd to drive */
-	HWIF(drive)->OUTB(command, IDE_COMMAND_REG);
+	HWIF(drive)->OUTB(cmd, IDE_COMMAND_REG);
 
-	return icside_dma_count(drive);
+	return icside_dma_begin(drive);
 }
 
 int icside_dma_write(ide_drive_t *drive)
 {
-	ide_hwif_t *hwif	= HWIF(drive);
-//	ide_task_t *args	= HWGROUP(drive)->rq->special;
-	int count		= 0;
-	u8 lba48		= (drive->addressing == 1) ? 1 : 0;
-	task_ioreg_t command	= WIN_NOP;
+	struct request *rq = HWGROUP(drive)->rq;
+	task_ioreg_t cmd = WIN_NOP;
 
-	count = icside_build_dmatable(drive, 0);
-	if (!count)
+	if (icside_dma_common(drive, rq, DMA_MODE_WRITE))
 		return 1;
-	disable_dma(hwif->hw.dma);
-
-	/* Route the DMA signals to
-	 * to the correct interface.
-	 */
-	HWIF(drive)->OUTB(hwif->select_data, hwif->config_data);
-
-	/* Select the correct timing
-	 * for this drive
-	 */
-	set_dma_speed(hwif->hw.dma, drive->drive_data);
-
-	set_dma_sg(hwif->hw.dma, HWIF(drive)->sg_table, count);
-	set_dma_mode(hwif->hw.dma, DMA_MODE_WRITE);
 
 	drive->waiting_for_dma = 1;
+
 	if (drive->media != ide_disk)
 		return 0;
 
-	if (HWGROUP(drive)->handler != NULL)
-		BUG();
-	ide_set_handler(drive, &icside_dmaintr, WAIT_CMD, NULL);
+	BUG_ON(HWGROUP(drive)->handler != NULL);
+
+	ide_set_handler(drive, icside_dmaintr, 2*WAIT_CMD, NULL);
+
 	/*
 	 * FIX ME to use only ACB ide_task_t args Struct
 	 */
 #if 0
 	{
-		ide_task_t *args = HWGROUP(drive)->rq->special;
+		ide_task_t *args = rq->special;
 		command = args->tfRegister[IDE_COMMAND_OFFSET];
 	}
 #else
-	command = (lba48) ? WIN_WRITEDMA_EXT : WIN_WRITEDMA;
-	if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE) {
-		ide_task_t *args = HWGROUP(drive)->rq->special;
-		command = args->tfRegister[IDE_COMMAND_OFFSET];
+	if (rq->flags & REQ_DRIVE_TASKFILE) {
+		ide_task_t *args = rq->special;
+		cmd = args->tfRegister[IDE_COMMAND_OFFSET];
+	} else if (drive->addressing == 1) {
+		cmd = WIN_WRITEDMA_EXT;
+	} else {
+		cmd = WIN_WRITEDMA;
 	}
 #endif
 	/* issue cmd to drive */
-	HWIF(drive)->OUTB(command, IDE_COMMAND_REG);
+	HWIF(drive)->OUTB(cmd, IDE_COMMAND_REG);
 
-	return icside_dma_count(drive);
+	return icside_dma_begin(drive);
 }
 
-static int
-icside_setup_dma(ide_hwif_t *hwif, int autodma)
+static int icside_dma_test_irq(ide_drive_t *drive)
+{
+	ide_hwif_t *hwif = HWIF(drive);
+	struct icside_state *state = hwif->hw.priv;
+
+	return inb(state->irq_port +
+		   (hwif->channel ?
+			ICS_ARCIN_V6_INTRSTAT_2 :
+			ICS_ARCIN_V6_INTRSTAT_1)) & 1;
+}
+
+static int icside_dma_verbose(ide_drive_t *drive)
+{
+	printk(", %s (peak %dMB/s)",
+		ide_xfer_verbose(drive->current_speed),
+		2000 / drive->drive_data);
+	return 1;
+}
+
+static int icside_dma_timeout(ide_drive_t *drive)
 {
+	printk(KERN_ERR "%s: DMA timeout occured: ", drive->name);
+
+	if (icside_dma_test_irq(drive))
+		return 0;
+
+	ide_dump_status(drive, "DMA timeout",
+		HWIF(drive)->INB(IDE_STATUS_REG));
+
+	return icside_dma_end(drive);
+}
+
+static int icside_dma_lostirq(ide_drive_t *drive)
+{
+	printk(KERN_ERR "%s: IRQ lost\n", drive->name);
+	return 1;
+}
+
+static int icside_setup_dma(ide_hwif_t *hwif)
+{
+	int autodma = 0;
+
+#ifdef CONFIG_IDEDMA_ICS_AUTO
+	autodma = 1;
+#endif
+
 	printk("    %s: SG-DMA", hwif->name);
 
 	hwif->sg_table = kmalloc(sizeof(struct scatterlist) * NR_ENTRIES,
@@ -666,40 +763,50 @@
 	if (!hwif->sg_table)
 		goto failed;
 
-	hwif->dmatable_cpu = NULL;
-	hwif->dmatable_dma = 0;
-	hwif->speedproc = icside_set_speed;
-	hwif->autodma = autodma;
+	hwif->dmatable_cpu	= NULL;
+	hwif->dmatable_dma	= 0;
+	hwif->speedproc		= icside_set_speed;
+	hwif->autodma		= autodma;
 
-	hwif->ide_dma_check = icside_dma_check;
-	hwif->ide_dma_host_off = icside_dma_host_off;
+	hwif->ide_dma_check	= icside_dma_check;
+	hwif->ide_dma_host_off	= icside_dma_host_off;
 	hwif->ide_dma_off_quietly = icside_dma_off_quietly;
-	hwif->ide_dma_off = icside_dma_off;
-	hwif->ide_dma_host_on = icside_dma_host_on;
-	hwif->ide_dma_on = icside_dma_on;
-	hwif->ide_dma_read = icside_dma_read;
-	hwif->ide_dma_write = icside_dma_write;
-	hwif->ide_dma_count = icside_dma_count;
-	hwif->ide_dma_begin = icside_dma_begin;
-	hwif->ide_dma_end = icside_dma_end;
-	hwif->ide_dma_verbose = icside_dma_verbose;
-	hwif->ide_dma_bad_drive = check_drive_bad_lists;
-	hwif->ide_dma_good_drive = check_drive_good_lists;
-	hwif->ide_dma_test_irq = icside_dma_test_irq;
+	hwif->ide_dma_off	= icside_dma_off;
+	hwif->ide_dma_host_on	= icside_dma_host_on;
+	hwif->ide_dma_on	= icside_dma_on;
+	hwif->ide_dma_read	= icside_dma_read;
+	hwif->ide_dma_write	= icside_dma_write;
+	hwif->ide_dma_count	= icside_dma_count;
+	hwif->ide_dma_begin	= icside_dma_begin;
+	hwif->ide_dma_end	= icside_dma_end;
+	hwif->ide_dma_test_irq	= icside_dma_test_irq;
+	hwif->ide_dma_verbose	= icside_dma_verbose;
+	hwif->ide_dma_timeout	= icside_dma_timeout;
+	hwif->ide_dma_lostirq	= icside_dma_lostirq;
 
-	printk(" capable%s\n", autodma ?
-		", auto-enable" : "");
+	hwif->drives[0].autodma = autodma;
+	hwif->drives[1].autodma = autodma;
+
+	printk(" capable%s\n", autodma ? ", auto-enable" : "");
 
 	return 1;
 
 failed:
-	printk(" -- ERROR, unable to allocate DMA table\n");
+	printk(" disabled, unable to allocate DMA table\n");
 	return 0;
 }
+
+int ide_release_dma(ide_hwif_t *hwif)
+{
+	if (hwif->sg_table) {
+		kfree(hwif->sg_table);
+		hwif->sg_table = NULL;
+	}
+	return 1;
+}
 #endif
 
-static ide_hwif_t *
-icside_find_hwif(unsigned long dataport)
+static ide_hwif_t *icside_find_hwif(unsigned long dataport)
 {
 	ide_hwif_t *hwif;
 	int index;
@@ -716,7 +823,7 @@
 			goto found;
 	}
 
-	return NULL;
+	hwif = NULL;
 found:
 	return hwif;
 }
@@ -750,7 +857,7 @@
 	return hwif;
 }
 
-static int __init icside_register_v5(struct expansion_card *ec, int autodma)
+static int __init icside_register_v5(struct expansion_card *ec)
 {
 	unsigned long slot_port;
 	ide_hwif_t *hwif;
@@ -769,14 +876,15 @@
 
 	hwif = icside_setup(slot_port, &icside_cardinfo_v5, ec->irq);
 
-	return hwif ? 0 : -1;
+	return hwif ? 0 : -ENODEV;
 }
 
-static int __init icside_register_v6(struct expansion_card *ec, int autodma)
+static int __init icside_register_v6(struct expansion_card *ec)
 {
 	unsigned long slot_port, port;
+	struct icside_state *state;
 	ide_hwif_t *hwif, *mate;
-	int sel = 0;
+	unsigned int sel = 0;
 
 	slot_port = ecard_address(ec, ECARD_IOC, ECARD_FAST);
 	port      = ecard_address(ec, ECARD_EASI, ECARD_FAST);
@@ -788,88 +896,128 @@
 
 	outb(sel, slot_port);
 
-	ec->irq_data = (void *)port;
-	ec->ops      = (expansioncard_ops_t *)&icside_ops_arcin_v6;
-
 	/*
 	 * Be on the safe side - disable interrupts
 	 */
 	inb(port + ICS_ARCIN_V6_INTROFFSET_1);
 	inb(port + ICS_ARCIN_V6_INTROFFSET_2);
 
+	/*
+	 * Find and register the interfaces.
+	 */
 	hwif = icside_setup(port, &icside_cardinfo_v6_1, ec->irq);
 	mate = icside_setup(port, &icside_cardinfo_v6_2, ec->irq);
 
+	if (!hwif || !mate)
+		return -ENODEV;
+
+	state = kmalloc(sizeof(struct icside_state), GFP_KERNEL);
+	if (!state)
+		return -ENOMEM;
+
+	state->channel    = 0;
+	state->enabled    = 0;
+	state->irq_port   = port;
+
+	ec->irq_data      = state;
+	ec->ops           = (expansioncard_ops_t *)&icside_ops_arcin_v6;
+
+	hwif->maskproc    = icside_maskproc;
+	hwif->channel     = 0;
+	hwif->hw.priv     = state;
+	hwif->mate        = mate;
+	hwif->serialized  = 1;
+	hwif->config_data = slot_port;
+	hwif->select_data = sel;
+	hwif->hw.dma      = ec->dma;
+
+	mate->maskproc    = icside_maskproc;
+	mate->channel     = 1;
+	mate->hw.priv     = state;
+	mate->mate        = hwif;
+	mate->serialized  = 1;
+	mate->config_data = slot_port;
+	mate->select_data = sel | 1;
+	mate->hw.dma      = ec->dma;
+
 #ifdef CONFIG_BLK_DEV_IDEDMA_ICS
-	if (ec->dma != NO_DMA) {
-		if (request_dma(ec->dma, hwif->name))
-			goto no_dma;
-
-		if (hwif) {
-			hwif->config_data = slot_port;
-			hwif->select_data = sel;
-			hwif->hw.dma  = ec->dma;
-			hwif->hw.priv = (void *)
-					(port + ICS_ARCIN_V6_INTRSTAT_1);
-			hwif->channel = 0;
-			icside_setup_dma(hwif, autodma);
-			hwif->drives[0].autodma = autodma;
-			hwif->drives[1].autodma = autodma;
-		}
-		if (mate) {
-			mate->config_data = slot_port;
-			mate->select_data = sel | 1;
-			mate->hw.dma  = ec->dma;
-			mate->hw.priv = (void *)
-					(port + ICS_ARCIN_V6_INTRSTAT_2);
-			mate->channel = 1;
-			icside_setup_dma(mate, autodma);
-			mate->drives[0].autodma = autodma;
-			mate->drives[1].autodma = autodma;
-		}
+	if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) {
+		icside_setup_dma(hwif);
+		icside_setup_dma(mate);
 	}
-no_dma:
 #endif
-	return hwif || mate ? 0 : -1;
+	return 0;
 }
 
-int __init icside_init(void)
+static int __devinit
+icside_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
-	int autodma = 0;
+	int result;
 
-#ifdef CONFIG_IDEDMA_ICS_AUTO
-	autodma = 1;
-#endif
+	ecard_claim(ec);
 
-	ecard_startfind ();
+	switch (icside_identifyif(ec)) {
+	case ics_if_arcin_v5:
+		result = icside_register_v5(ec);
+		break;
 
-	do {
-		struct expansion_card *ec;
-		int result;
+	case ics_if_arcin_v6:
+		result = icside_register_v6(ec);
+		break;
 
-		ec = ecard_find(0, icside_cids);
-		if (ec == NULL)
-			break;
+	default:
+		result = -ENODEV;
+		break;
+	}
 
-		ecard_claim(ec);
+	if (result)
+		ecard_release(ec);
+	/*
+	 * this locks the driver in-core - remove this
+	 * comment and the two lines below when we can
+	 * safely remove interfaces.
+	 */
+	else
+		MOD_INC_USE_COUNT;
 
-		switch (icside_identifyif(ec)) {
-		case ics_if_arcin_v5:
-			result = icside_register_v5(ec, autodma);
-			break;
+	return result;
+}
 
-		case ics_if_arcin_v6:
-			result = icside_register_v6(ec, autodma);
-			break;
+static void __devexit
+icside_remove(struct expansion_card *ec)
+{
+	/* need to do more */
+	ecard_release(ec);
+}
 
-		default:
-			result = -1;
-			break;
-		}
+static const struct ecard_id icside_ids[] = {
+	{ MANU_ICS,  PROD_ICS_IDE  },
+	{ MANU_ICS2, PROD_ICS2_IDE },
+	{ 0xffff, 0xffff }
+};
 
-		if (result)
-			ecard_release(ec);
-	} while (1);
+static struct ecard_driver icside_driver = {
+	.probe		= icside_probe,
+	.remove		= __devexit_p(icside_remove),
+	.id_table	= icside_ids,
+	.drv = {
+		.name	= "icside",
+	},
+};
 
-	return 0;
+static int __init icside_init(void)
+{
+	return ecard_register_driver(&icside_driver);
 }
+
+static void __exit icside_exit(void)
+{
+	ecard_remove_driver(&icside_driver);
+}
+
+MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ICS IDE driver");
+
+module_init(icside_init);
+module_exit(icside_exit);
diff -Nru a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c
--- a/drivers/ide/arm/rapide.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/ide/arm/rapide.c	Wed Oct 30 16:44:32 2002
@@ -1,11 +1,7 @@
 /*
  * linux/drivers/ide/rapide.c
  *
- * Copyright (c) 1996-1998 Russell King.
- *
- * Changelog:
- *  08-06-1996	RMK	Created
- *  13-04-1998	RMK	Added manufacturer and product IDs
+ * Copyright (c) 1996-2002 Russell King.
  */
 
 #include <linux/module.h>
@@ -17,20 +13,14 @@
 
 #include <asm/ecard.h>
 
-static card_ids __init rapide_cids[] = {
-	{ MANU_YELLOWSTONE, PROD_YELLOWSTONE_RAPIDE32 },
-	{ 0xffff, 0xffff }
-};
-
-static struct expansion_card *ec[MAX_ECARDS];
-static int result[MAX_ECARDS];
-
-static inline int rapide_register(struct expansion_card *ec)
+static int __devinit
+rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
 	unsigned long port = ecard_address (ec, ECARD_MEMC, 0);
 	hw_regs_t hw;
+	int i, ret;
 
-	int i;
+	ecard_claim(ec);
 
 	memset(&hw, 0, sizeof(hw));
 
@@ -41,54 +31,53 @@
 	hw.io_ports[IDE_CONTROL_OFFSET] = port + 0x206;
 	hw.irq = ec->irq;
 
-	return ide_register_hw(&hw, NULL);
-}
+	ret = ide_register_hw(&hw, NULL);
 
-int __init rapide_init(void)
-{
-	int i;
-
-	for (i = 0; i < MAX_ECARDS; i++)
-		ec[i] = NULL;
-
-	ecard_startfind();
+	if (ret)
+		ecard_release(ec);
+	/*
+	 * this locks the driver in-core - remove this
+	 * comment and the two lines below when we can
+	 * safely remove interfaces.
+	 */
+	else
+		MOD_INC_USE_COUNT;
 
-	for (i = 0; ; i++) {
-		if ((ec[i] = ecard_find(0, rapide_cids)) == NULL)
-			break;
+	return ret;
+}
 
-		ecard_claim(ec[i]);
-		result[i] = rapide_register(ec[i]);
-	}
-	for (i = 0; i < MAX_ECARDS; i++)
-		if (ec[i] && result[i] < 0) {
-			ecard_release(ec[i]);
-			ec[i] = NULL;
-	}
-	return 0;
+static void __devexit rapide_remove(struct expansion_card *ec)
+{
+	/* need to do more */
+	ecard_release(ec);
 }
 
-#ifdef MODULE
-MODULE_LICENSE("GPL");
+static struct ecard_id rapide_ids[] = {
+	{ MANU_YELLOWSTONE, PROD_YELLOWSTONE_RAPIDE32 },
+	{ 0xffff, 0xffff }
+};
 
-int init_module (void)
+static struct ecard_driver rapide_driver = {
+	.probe		= rapide_probe,
+	.remove		= __devexit_p(rapide_remove),
+	.id_table	= rapide_ids,
+	.drv = {
+		.name	= "rapide",
+	},
+};
+
+static int __init rapide_init(void)
 {
-	return rapide_init();
+	return ecard_register_driver(&rapide_driver);
 }
 
-void cleanup_module (void)
+static void __exit rapide_exit(void)
 {
-	int i;
-
-	for (i = 0; i < MAX_ECARDS; i++)
-		if (ec[i]) {
-			unsigned long port;
-			port = ecard_address(ec[i], ECARD_MEMC, 0);
-
-			ide_unregister_port(port, ec[i]->irq, 16);
-			ecard_release(ec[i]);
-			ec[i] = NULL;
-		}
+	ecard_remove_driver(&rapide_driver);
 }
-#endif
 
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Yellowstone RAPIDE driver");
+
+module_init(rapide_init);
+module_exit(rapide_exit);
diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/ide/ide-cd.c	Wed Oct 30 16:44:28 2002
@@ -608,7 +608,7 @@
 	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
 		return ide_stopped;
 	/* retry only "normal" I/O: */
-	if ((rq->flags & REQ_DRIVE_CMD) || (rq->flags & REQ_DRIVE_TASK)) {
+	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK)) {
 		rq->errors = 1;
 		ide_end_drive_cmd(drive, stat, err);
 		return ide_stopped;
@@ -638,12 +638,16 @@
 static void cdrom_end_request (ide_drive_t *drive, int uptodate)
 {
 	struct request *rq = HWGROUP(drive)->rq;
+	int nsectors = rq->hard_cur_sectors;
 
 	if ((rq->flags & REQ_SENSE) && uptodate) {
-		/* For REQ_SENSE, "rq->buffer" points to the original failed request */
-		struct request *failed = (struct request *) rq->buffer; 
+		/*
+		 * For REQ_SENSE, "rq->buffer" points to the original failed
+		 * request
+		 */
+		struct request *failed = (struct request *) rq->buffer;
 		struct cdrom_info *info = drive->driver_data;
-		void * sense = &info->sense_data;
+		void *sense = &info->sense_data;
 		
 		if (failed && failed->sense)
 			sense = failed->sense;
@@ -651,28 +655,27 @@
 		cdrom_analyze_sense_data(drive, failed, sense);
 	}
 
-	if (blk_fs_request(rq) && !rq->current_nr_sectors)
+	if (!rq->current_nr_sectors && blk_fs_request(rq))
 		uptodate = 1;
+	if (!nsectors)
+		nsectors = 1;
 
-	ide_end_request(drive, uptodate, rq->hard_cur_sectors);
+	ide_end_request(drive, uptodate, nsectors);
 }
 
-/* Handle differences between SCSI and ATAPI packet commands */
-static int pre_transform_command(struct request *);
-static void post_transform_command(struct request *);
-
 /* Returns 0 if the request should be continued.
    Returns 1 if the request was ended. */
-static int cdrom_decode_status (ide_startstop_t *startstop, ide_drive_t *drive,
-				int good_stat, int *stat_ret)
+static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
 {
 	struct request *rq = HWGROUP(drive)->rq;
 	int stat, err, sense_key;
 	
 	/* Check for errors. */
-	*stat_ret = stat = HWIF(drive)->INB(IDE_STATUS_REG);
+	stat = HWIF(drive)->INB(IDE_STATUS_REG);
+	if (stat_ret)
+		*stat_ret = stat;
 
-	if (OK_STAT (stat, good_stat, BAD_R_STAT))
+	if (OK_STAT(stat, good_stat, BAD_R_STAT))
 		return 0;
 
 	/* Get the IDE error register. */
@@ -681,7 +684,6 @@
 
 	if (rq == NULL) {
 		printk("%s: missing rq in cdrom_decode_status\n", drive->name);
-		*startstop = ide_stopped;
 		return 1;
 	}
 
@@ -692,16 +694,19 @@
 
 		rq->flags |= REQ_FAILED;
 		cdrom_end_request(drive, 0);
-		*startstop = DRIVER(drive)->error(drive, "request sense failure", stat);
+		DRIVER(drive)->error(drive, "request sense failure", stat);
 		return 1;
 
 	} else if (rq->flags & (REQ_PC | REQ_BLOCK_PC)) {
 		/* All other functions, except for READ. */
 		struct completion *wait = NULL;
 
-		/* Fix up any SCSI command differences.. */
-		if (rq->flags & REQ_BLOCK_PC)
-			post_transform_command(rq);
+		/*
+		 * if we have an error, pass back CHECK_CONDITION as the
+		 * scsi status byte
+		 */
+		if ((rq->flags & REQ_BLOCK_PC) && !rq->errors)
+			rq->errors = CHECK_CONDITION;
 
 		/* Check for tray open. */
 		if (sense_key == NOT_READY) {
@@ -763,7 +768,7 @@
 		} else if ((err & ~ABRT_ERR) != 0) {
 			/* Go to the default handler
 			   for other errors. */
-			*startstop = DRIVER(drive)->error(drive, "cdrom_decode_status", stat);
+			DRIVER(drive)->error(drive, "cdrom_decode_status",stat);
 			return 1;
 		} else if (sense_key == MEDIUM_ERROR) {
 			/* No point in re-trying a zillion times on a bad 
@@ -779,11 +784,12 @@
 		   queue a request sense command. */
 		if ((stat & ERR_STAT) != 0)
 			cdrom_queue_request_sense(drive, NULL, NULL, NULL);
-	} else
-		blk_dump_rq_flags(rq, "ide-cd bad flags");
+	} else {
+		blk_dump_rq_flags(rq, "ide-cd: bad rq");
+		cdrom_end_request(drive, 0);
+	}
 
 	/* Retry, or handle the next request. */
-	*startstop = ide_stopped;
 	return 1;
 }
 
@@ -848,7 +854,7 @@
 	HWIF(drive)->OUTB(xferlen >> 8  , IDE_BCOUNTH_REG);
 	if (IDE_CONTROL_REG)
 		HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
- 
+
 	if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) {
 		if (HWGROUP(drive)->handler != NULL)
 			BUG();
@@ -876,20 +882,16 @@
 					  struct request *rq,
 					  ide_handler_t *handler)
 {
-	unsigned char *cmd_buf	= rq->cmd;
-	int cmd_len		= sizeof(rq->cmd);
-	unsigned int timeout	= rq->timeout;
 	struct cdrom_info *info = drive->driver_data;
 	ide_startstop_t startstop;
 
 	if (CDROM_CONFIG_FLAGS(drive)->drq_interrupt) {
 		/* Here we should have been called after receiving an interrupt
 		   from the device.  DRQ should how be set. */
-		int stat_dum;
 
 		/* Check for errors. */
-		if (cdrom_decode_status(&startstop, drive, DRQ_STAT, &stat_dum))
-			return startstop;
+		if (cdrom_decode_status(drive, DRQ_STAT, NULL))
+			return ide_stopped;
 	} else {
 		/* Otherwise, we must wait for DRQ to get set. */
 		if (ide_wait_stat(&startstop, drive, DRQ_STAT,
@@ -901,10 +903,10 @@
 		BUG();
 
 	/* Arm the interrupt handler. */
-	ide_set_handler(drive, handler, timeout, cdrom_timer_expiry);
+	ide_set_handler(drive, handler, rq->timeout, cdrom_timer_expiry);
 
 	/* Send the command to the device. */
-	HWIF(drive)->atapi_output_bytes(drive, cmd_buf, cmd_len);
+	HWIF(drive)->atapi_output_bytes(drive, rq->cmd, sizeof(rq->cmd));
 
 	/* Start the DMA if need be */
 	if (info->dma)
@@ -970,14 +972,12 @@
 static inline
 int cdrom_read_check_ireason (ide_drive_t *drive, int len, int ireason)
 {
-	ireason &= 3;
-	if (ireason == 2) return 0;
-
-	if (ireason == 0) {
+	if (ireason == 2)
+		return 0;
+	else if (ireason == 0) {
 		/* Whoops... The drive is expecting to receive data from us! */
-		printk ("%s: cdrom_read_intr: "
-			"Drive wants to transfer data the wrong way!\n",
-			drive->name);
+		printk("%s: read_intr: Drive wants to transfer data the "
+						"wrong way!\n", drive->name);
 
 		/* Throw some data at the drive so it doesn't hang
 		   and quit this request. */
@@ -994,8 +994,8 @@
 		return 0;
 	} else {
 		/* Drive wants a command packet, or invalid ireason... */
-		printk ("%s: cdrom_read_intr: bad interrupt reason %d\n",
-			drive->name, ireason);
+		printk("%s: read_intr: bad interrupt reason %x\n", drive->name,
+								ireason);
 	}
 
 	cdrom_end_request(drive, 0);
@@ -1012,20 +1012,21 @@
 	struct cdrom_info *info = drive->driver_data;
 	u8 lowcyl = 0, highcyl = 0;
 	int dma = info->dma, dma_error = 0;
-	ide_startstop_t startstop;
 
 	struct request *rq = HWGROUP(drive)->rq;
 
-	/* Check for errors. */
+	/*
+	 * handle dma case
+	 */
 	if (dma) {
 		info->dma = 0;
 		if ((dma_error = HWIF(drive)->ide_dma_end(drive)))
 			HWIF(drive)->ide_dma_off(drive);
 	}
 
-	if (cdrom_decode_status (&startstop, drive, 0, &stat))
-		return startstop;
- 
+	if (cdrom_decode_status(drive, 0, &stat))
+		return ide_stopped;
+
 	if (dma) {
 		if (!dma_error) {
 			ide_end_request(drive, 1, rq->nr_sectors);
@@ -1035,7 +1036,7 @@
 	}
 
 	/* Read the interrupt reason and the transfer length. */
-	ireason = HWIF(drive)->INB(IDE_IREASON_REG);
+	ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3;
 	lowcyl  = HWIF(drive)->INB(IDE_BCOUNTL_REG);
 	highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG);
 
@@ -1080,7 +1081,7 @@
 
 	/* First, figure out if we need to bit-bucket
 	   any of the leading sectors. */
-	nskip = MIN((int)(rq->current_nr_sectors - bio_sectors(rq->bio)), sectors_to_transfer);
+	nskip = MIN((int)(rq->current_nr_sectors - bio_cur_sectors(rq->bio)), sectors_to_transfer);
 
 	while (nskip > 0) {
 		/* We need to throw away a sector. */
@@ -1180,7 +1181,7 @@
 	   represent the number of sectors to skip at the start of a transfer
 	   will fail.  I think that this will never happen, but let's be
 	   paranoid and check. */
-	if (rq->current_nr_sectors < bio_sectors(rq->bio) &&
+	if (rq->current_nr_sectors < bio_cur_sectors(rq->bio) &&
 	    (rq->sector % SECTORS_PER_FRAME) != 0) {
 		printk("%s: cdrom_read_from_buffer: buffer botch (%ld)\n",
 			drive->name, (long)rq->sector);
@@ -1218,7 +1219,7 @@
 	nskip = (sector % SECTORS_PER_FRAME);
 	if (nskip > 0) {
 		/* Sanity check... */
-		if (rq->current_nr_sectors != bio_sectors(rq->bio) &&
+		if (rq->current_nr_sectors != bio_cur_sectors(rq->bio) &&
 			(rq->sector % CD_FRAMESIZE != 0)) {
 			printk ("%s: cdrom_start_read_continuation: buffer botch (%u)\n",
 				drive->name, rq->current_nr_sectors);
@@ -1257,10 +1258,9 @@
 	struct cdrom_info *info = drive->driver_data;
 	int stat;
 	static int retry = 10;
-	ide_startstop_t startstop;
 
-	if (cdrom_decode_status (&startstop, drive, 0, &stat))
-		return startstop;
+	if (cdrom_decode_status(drive, 0, &stat))
+		return ide_stopped;
 	CDROM_CONFIG_FLAGS(drive)->seeking = 1;
 
 	if (retry && time_after(jiffies, info->start_seek + IDECD_SEEK_TIMER)) {
@@ -1318,7 +1318,7 @@
 		rq->nr_sectors += n;
 		rq->sector -= n;
 	}
-	rq->hard_cur_sectors = rq->current_nr_sectors = bio_sectors(rq->bio);
+	rq->hard_cur_sectors = rq->current_nr_sectors = bio_cur_sectors(rq->bio);
 	rq->hard_nr_sectors = rq->nr_sectors;
 	rq->hard_sector = rq->sector;
 	rq->q->prep_rq_fn(rq->q, rq);
@@ -1353,6 +1353,7 @@
 		info->dma = 0;
 
 	info->cmd = READ;
+
 	/* Start sending the read request to the drive. */
 	return cdrom_start_packet_command(drive, 32768, cdrom_start_read_continuation);
 }
@@ -1361,21 +1362,17 @@
  * Execute all other packet commands.
  */
 
-/* Forward declarations. */
-static int cdrom_lockdoor(ide_drive_t *drive, int lockflag,
-			  struct request_sense *sense);
-
 /* Interrupt routine for packet command completion. */
 static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
 {
-	int ireason, len, stat, thislen;
+	int ireason, len, thislen;
 	struct request *rq = HWGROUP(drive)->rq;
-	ide_startstop_t startstop;
 	u8 lowcyl = 0, highcyl = 0;
+	int stat;
 
 	/* Check for errors. */
-	if (cdrom_decode_status(&startstop, drive, 0, &stat))
-		return startstop;
+	if (cdrom_decode_status(drive, 0, &stat))
+		return ide_stopped;
 
 	/* Read the interrupt reason and the transfer length. */
 	ireason = HWIF(drive)->INB(IDE_IREASON_REG);
@@ -1420,8 +1417,10 @@
 
 	/* The drive wants to be written to. */
 	if ((ireason & 3) == 0) {
-		if (!rq->data)
+		if (!rq->data) {
+			blk_dump_rq_flags(rq, "cdrom_pc_intr, write");
 			goto confused;
+		}
 		/* Transfer the data. */
 		HWIF(drive)->atapi_output_bytes(drive, rq->data, thislen);
 
@@ -1440,8 +1439,10 @@
 
 	/* Same drill for reading. */
 	else if ((ireason & 3) == 2) {
-		if (!rq->data)
+		if (!rq->data) {
+			blk_dump_rq_flags(rq, "cdrom_pc_intr, write");
 			goto confused;
+		}
 		/* Transfer the data. */
 		HWIF(drive)->atapi_input_bytes(drive, rq->data, thislen);
 
@@ -1456,6 +1457,8 @@
 		/* Keep count of how much data we've moved. */
 		rq->data += thislen;
 		rq->data_len -= thislen;
+		if (rq->cmd[0] == GPCMD_REQUEST_SENSE)
+			rq->sense_len++;
 	} else {
 confused:
 		printk ("%s: cdrom_pc_intr: The drive "
@@ -1472,7 +1475,6 @@
 	return ide_started;
 }
 
-
 static ide_startstop_t cdrom_do_pc_continuation (ide_drive_t *drive)
 {
 	struct request *rq = HWGROUP(drive)->rq;
@@ -1570,39 +1572,202 @@
 {
 	/* Two notes about IDE interrupt reason here - 0 means that
 	 * the drive wants to receive data from us, 2 means that
-	 * the drive is expecting data from us.
+	 * the drive is expecting to transfer data to us.
 	 */
-	ireason &= 3;
-
-	if (ireason == 2) {
+	if (ireason == 0)
+		return 0;
+	else if (ireason == 2) {
 		/* Whoops... The drive wants to send data. */
-		printk("%s: cdrom_write_intr: wrong transfer direction!\n",
-			drive->name);
+		printk("%s: write_intr: wrong transfer direction!\n",
+							drive->name);
 
-		/* Throw some data at the drive so it doesn't hang
-		   and quit this request. */
 		while (len > 0) {
 			int dum = 0;
-			HWIF(drive)->atapi_output_bytes(drive, &dum, sizeof(dum));
+			HWIF(drive)->atapi_input_bytes(drive, &dum, sizeof(dum));
 			len -= sizeof(dum);
 		}
 	} else {
 		/* Drive wants a command packet, or invalid ireason... */
-		printk("%s: cdrom_write_intr: bad interrupt reason %d\n",
-			drive->name, ireason);
+		printk("%s: write_intr: bad interrupt reason %x\n",
+							drive->name, ireason);
 	}
 
 	cdrom_end_request(drive, 0);
 	return 1;
 }
 
+static void post_transform_command(struct request *req)
+{
+	char *ibuf = req->buffer;
+	u8 *c = req->cmd;
+
+	if (!blk_pc_request(req))
+		return;
+
+	/*
+	 * set ansi-revision and response data as atapi
+	 */
+	if (c[0] == GPCMD_INQUIRY) {
+		ibuf[2] |= 2;
+		ibuf[3] = (ibuf[3] & 0xf0) | 2;
+	}
+}
+
+typedef void (xfer_func_t)(ide_drive_t *, void *, u32);
+
+/*
+ * best way to deal with dma that is not sector aligned right now... note
+ * that in this path we are not using ->data or ->buffer at all. this irs
+ * can replace cdrom_pc_intr, cdrom_read_intr, and cdrom_write_intr in the
+ * future.
+ */
+static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
+{
+	struct cdrom_info *info = drive->driver_data;
+	struct request *rq = HWGROUP(drive)->rq;
+	int dma_error, dma, stat, ireason, len, thislen;
+	u8 lowcyl, highcyl;
+	xfer_func_t *xferfunc;
+	unsigned long flags;
+
+	/* Check for errors. */
+	dma_error = 0;
+	dma = info->dma;
+	if (dma) {
+		info->dma = 0;
+		if ((dma_error = HWIF(drive)->ide_dma_end(drive))) {
+			printk("ide-cd: dma error\n");
+			HWIF(drive)->ide_dma_off(drive);
+		}
+	}
+
+	if (cdrom_decode_status(drive, 0, &stat)) {
+		end_that_request_chunk(rq, 1, rq->data_len);
+		return ide_stopped;
+	}
+
+	/*
+	 * using dma, transfer is complete now
+	 */
+	if (dma) {
+		if (dma_error)
+			return DRIVER(drive)->error(drive, "dma error", stat);
+
+		end_that_request_chunk(rq, 1, rq->data_len);
+		rq->data_len = 0;
+		goto end_request;
+	}
+
+	/*
+	 * ok we fall to pio :/
+	 */
+	ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3;
+	lowcyl  = HWIF(drive)->INB(IDE_BCOUNTL_REG);
+	highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG);
+
+	len = lowcyl + (256 * highcyl);
+	thislen = rq->data_len;
+	if (thislen > len)
+		thislen = len;
+
+	/*
+	 * If DRQ is clear, the command has completed.
+	 */
+	if ((stat & DRQ_STAT) == 0) {
+		if (rq->data_len)
+			printk("%s: %u residual after xfer\n", __FUNCTION__, rq->data_len);
+		goto end_request;
+	}
+
+	/*
+	 * check which way to transfer data
+	 */
+	if (rq_data_dir(rq) == WRITE) {
+		/*
+		 * write to drive
+		 */
+		if (cdrom_write_check_ireason(drive, len, ireason))
+			return ide_stopped;
+
+		xferfunc = HWIF(drive)->atapi_output_bytes;
+	} else  {
+		/*
+		 * read from drive
+		 */
+		if (cdrom_read_check_ireason(drive, len, ireason))
+			return ide_stopped;
+
+		xferfunc = HWIF(drive)->atapi_input_bytes;
+	}
+
+	/*
+	 * transfer data
+	 */
+	while (thislen > 0) {
+		int blen = blen = rq->data_len;
+		char *ptr = rq->data;
+
+		/*
+		 * bio backed?
+		 */
+		if (rq->bio) {
+			ptr = bio_data(rq->bio);
+			blen = bio_iovec(rq->bio)->bv_len;
+		}
+
+		if (blen > thislen)
+			blen = thislen;
+
+		xferfunc(drive, ptr, blen);
+
+		thislen -= blen;
+		len -= blen;
+		rq->data_len -= blen;
+
+		if (rq->bio)
+			end_that_request_chunk(rq, 1, blen);
+		else
+			rq->data += blen;
+	}
+
+	/*
+	 * pad, if necessary
+	 */
+	if (len) {
+		printk("%s: padding %u bytes\n", drive->name, len);
+
+		while (len) {
+			int pad = 0;
+
+			xferfunc(drive, &pad, sizeof(pad));
+			len -= sizeof(pad);
+		}
+	}
+
+	if (HWGROUP(drive)->handler != NULL)
+		BUG();
+
+	ide_set_handler(drive, cdrom_newpc_intr, rq->timeout, NULL);
+	return ide_started;
+
+end_request:
+	if (!rq->data_len)
+		post_transform_command(rq);
+
+	spin_lock_irqsave(&ide_lock, flags);
+	blkdev_dequeue_request(rq);
+	end_that_request_last(rq);
+	HWGROUP(drive)->rq = NULL;
+	spin_unlock_irqrestore(&ide_lock, flags);
+	return ide_stopped;
+}
+
 static ide_startstop_t cdrom_write_intr(ide_drive_t *drive)
 {
 	int stat, ireason, len, sectors_to_transfer, uptodate;
 	struct cdrom_info *info = drive->driver_data;
 	int dma_error = 0, dma = info->dma;
 	u8 lowcyl = 0, highcyl = 0;
-	ide_startstop_t startstop;
 
 	struct request *rq = HWGROUP(drive)->rq;
 
@@ -1615,11 +1780,11 @@
 		}
 	}
 
-	if (cdrom_decode_status(&startstop, drive, 0, &stat)) {
+	if (cdrom_decode_status(drive, 0, &stat)) {
 		printk("ide-cd: write_intr decode_status bad\n");
-		return startstop;
+		return ide_stopped;
 	}
- 
+
 	/*
 	 * using dma, transfer is complete now
 	 */
@@ -1654,9 +1819,8 @@
 	}
 
 	/* Check that the drive is expecting to do the same thing we are. */
-	if (ireason & 3)
-		if (cdrom_write_check_ireason(drive, len, ireason))
-			return ide_stopped;
+	if (cdrom_write_check_ireason(drive, len, ireason))
+		return ide_stopped;
 
 	sectors_to_transfer = len / SECTOR_SIZE;
 
@@ -1704,10 +1868,6 @@
 static ide_startstop_t cdrom_start_write_cont(ide_drive_t *drive)
 {
 	struct request *rq = HWGROUP(drive)->rq;
-	unsigned nframes, frame;
-
-	nframes = rq->nr_sectors >> 2;
-	frame = rq->sector >> 2;
 
 #if 0	/* the immediate bit */
 	rq->cmd[1] = 1 << 3;
@@ -1748,56 +1908,40 @@
 	return cdrom_start_packet_command(drive, 32768, cdrom_start_write_cont);
 }
 
-/*
- * Most of the SCSI commands are supported directly by ATAPI devices.
- * This transform handles the few exceptions.
- */
-static int pre_transform_command(struct request *req)
+static ide_startstop_t cdrom_do_newpc_cont(ide_drive_t *drive)
 {
-	u8 *c = req->cmd;
-	/* Transform 6-byte read/write commands to the 10-byte version. */
-	if (c[0] == READ_6 || c[0] == WRITE_6) {
-		c[8] = c[4];
-		c[5] = c[3];
-		c[4] = c[2];
-		c[3] = c[1] & 0x1f;
-		c[2] = 0;
-		c[1] &= 0xe0;
-		c[0] += (READ_10 - READ_6);
-		return 0;
-	}
-
-	/* These also need fixup, not done yet */
-	if (c[0] == MODE_SENSE || c[0] == MODE_SELECT)
-		return -EINVAL;
+	struct request *rq = HWGROUP(drive)->rq;
 
-	return 0;
-}
+	if (!rq->timeout)
+		rq->timeout = WAIT_CMD;
 
-static void post_transform_command(struct request *req)
-{
+	return cdrom_transfer_packet_command(drive, rq, cdrom_newpc_intr);
 }
 
 static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
 {
-	ide_startstop_t startstop;
-	struct cdrom_info *info;
-
-	if (pre_transform_command(rq) < 0) {
-		cdrom_end_request(drive, 0);
-		return ide_stopped;
-	}
+	struct cdrom_info *info = drive->driver_data;
 
 	rq->flags |= REQ_QUIET;
 
-	info = drive->driver_data;
 	info->dma = 0;
 	info->cmd = 0;
 
-	/* Start sending the command to the drive. */
-	startstop = cdrom_start_packet_command(drive, rq->data_len, cdrom_do_pc_continuation);
+	/*
+	 * sg request
+	 */
+	if (rq->bio) {
+		if (rq->data_len & 3) {
+			printk("%s: block pc not aligned, len=%d\n", drive->name, rq->data_len);
+			cdrom_end_request(drive, 0);
+			return ide_stopped;
+		}
+		info->dma = drive->using_dma;
+		info->cmd = rq_data_dir(rq);
+	}
 
-	return startstop;
+	/* Start sending the command to the drive. */
+	return cdrom_start_packet_command(drive, rq->data_len, cdrom_do_newpc_cont);
 }
 
 /****************************************************************************
@@ -2314,7 +2458,7 @@
 	req.sense = cgc->sense;
 	cgc->stat = cdrom_queue_packet_command(drive, &req);
 	if (!cgc->stat)
-		cgc->buflen -= req.data_len;
+		cgc->buflen = req.data_len;
 	return cgc->stat;
 }
 
@@ -2451,7 +2595,7 @@
 	int ret;
 
 	cdrom_prepare_request(&req);
-	req.flags = REQ_SPECIAL;
+	req.flags = REQ_SPECIAL | REQ_QUIET;
 	ret = ide_do_drive_cmd(drive, &req, ide_wait);
 
 	/*
@@ -2828,15 +2972,12 @@
 /*
  * standard prep_rq_fn that builds 10 byte cmds
  */
-static int ll_10byte_cmd_build(request_queue_t *q, struct request *rq)
+static int ide_cdrom_prep_fs(request_queue_t *q, struct request *rq)
 {
 	int hard_sect = queue_hardsect_size(q);
 	long block = (long)rq->hard_sector / (hard_sect >> 9);
 	unsigned long blocks = rq->hard_nr_sectors / (hard_sect >> 9);
 
-	if (!(rq->flags & REQ_CMD))
-		return 0;
-
 	BUG_ON(sizeof(rq->hard_sector) > 4 && (rq->hard_sector >> 32));
 
 	if (rq->hard_nr_sectors != rq->nr_sectors) {
@@ -2863,6 +3004,50 @@
 	 */
 	rq->cmd[7] = (blocks >> 8) & 0xff;
 	rq->cmd[8] = blocks & 0xff;
+	return BLKPREP_OK;
+}
+
+/*
+ * Most of the SCSI commands are supported directly by ATAPI devices.
+ * This transform handles the few exceptions.
+ */
+static int ide_cdrom_prep_pc(struct request *rq)
+{
+	u8 *c = rq->cmd;
+
+	/*
+	 * Transform 6-byte read/write commands to the 10-byte version
+	 */
+	if (c[0] == READ_6 || c[0] == WRITE_6) {
+		c[8] = c[4];
+		c[5] = c[3];
+		c[4] = c[2];
+		c[3] = c[1] & 0x1f;
+		c[2] = 0;
+		c[1] &= 0xe0;
+		c[0] += (READ_10 - READ_6);
+		return BLKPREP_OK;
+	}
+
+	/*
+	 * it's silly to pretend we understand 6-byte sense commands, just
+	 * reject with ILLEGAL_REQUEST and the caller should take the
+	 * appropriate action
+	 */
+	if (c[0] == MODE_SENSE || c[0] == MODE_SELECT) {
+		rq->errors = ILLEGAL_REQUEST;
+		return BLKPREP_KILL;
+	}
+	
+	return BLKPREP_OK;
+}
+
+static int ide_cdrom_prep_fn(request_queue_t *q, struct request *rq)
+{
+	if (rq->flags & REQ_CMD)
+		return ide_cdrom_prep_fs(q, rq);
+	else if (rq->flags & REQ_BLOCK_PC)
+		return ide_cdrom_prep_pc(rq);
 
 	return 0;
 }
@@ -2877,10 +3062,11 @@
 	/*
 	 * default to read-only always and fix latter at the bottom
 	 */
-	set_device_ro(mk_kdev(drive->disk->major, drive->disk->first_minor), 1);
+	set_disk_ro(drive->disk, 1);
 	blk_queue_hardsect_size(&drive->queue, CD_FRAMESIZE);
 
-	blk_queue_prep_rq(&drive->queue, ll_10byte_cmd_build);
+	blk_queue_prep_rq(&drive->queue, ide_cdrom_prep_fn);
+	blk_queue_dma_alignment(&drive->queue, 3);
 
 	drive->special.all	= 0;
 	drive->ready_stat	= 0;
@@ -2999,7 +3185,7 @@
 	nslots = ide_cdrom_probe_capabilities (drive);
 
 	if (CDROM_CONFIG_FLAGS(drive)->dvd_ram)
-		set_device_ro(mk_kdev(drive->disk->major, drive->disk->first_minor), 0);
+		set_disk_ro(drive->disk, 0);
 
 #if 0
 	drive->dsc_overlap = (HWIF(drive)->no_dsc) ? 0 : 1;
@@ -3019,56 +3205,6 @@
 	return 0;
 }
 
-/* Forwarding functions to generic routines. */
-static
-int ide_cdrom_ioctl (ide_drive_t *drive,
-		     struct inode *inode, struct file *file,
-		     unsigned int cmd, unsigned long arg)
-{
-	struct cdrom_info *info = drive->driver_data;
-
-	return cdrom_ioctl(&info->devinfo, inode, cmd, arg);
-}
-
-static
-int ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive)
-{
-	struct cdrom_info *info = drive->driver_data;
-	int rc = -ENOMEM;
-
-	MOD_INC_USE_COUNT;
-	if (!info->buffer)
-		info->buffer = (char *) kmalloc(SECTOR_BUFFER_SIZE, GFP_KERNEL);
-        if (!info->buffer || (rc = cdrom_open(&info->devinfo, ip, fp))) {
-		drive->usage--;
-		MOD_DEC_USE_COUNT;
-	}
-	return rc;
-}
-
-static
-void ide_cdrom_release (struct inode *inode, struct file *file,
-			ide_drive_t *drive)
-{
-	struct cdrom_info *info = drive->driver_data;
-	cdrom_release (&info->devinfo, file);
-	MOD_DEC_USE_COUNT;
-}
-
-static
-int ide_cdrom_check_media_change (ide_drive_t *drive)
-{
-	struct cdrom_info *info = drive->driver_data;
-	return cdrom_media_changed(&info->devinfo);
-}
-
-static
-void ide_cdrom_revalidate (ide_drive_t *drive)
-{
-	struct request_sense sense;
-	cdrom_read_toc(drive, &sense);
-}
-
 static
 unsigned long ide_cdrom_capacity (ide_drive_t *drive)
 {
@@ -3103,6 +3239,7 @@
 	kfree(info);
 	drive->driver_data = NULL;
 	del_gendisk(g);
+	g->fops = ide_fops;
 	return 0;
 }
 
@@ -3121,29 +3258,75 @@
 #endif
 	.supports_dsc_overlap	= 1,
 	.cleanup		= ide_cdrom_cleanup,
-	.standby		= NULL,
-	.suspend		= NULL,
-	.resume			= NULL,
-	.flushcache		= NULL,
 	.do_request		= ide_do_rw_cdrom,
-	.end_request		= NULL,
 	.sense			= ide_cdrom_dump_status,
 	.error			= ide_cdrom_error,
-	.ioctl			= ide_cdrom_ioctl,
-	.open			= ide_cdrom_open,
-	.release		= ide_cdrom_release,
-	.media_change		= ide_cdrom_check_media_change,
-	.revalidate		= ide_cdrom_revalidate,
-	.pre_reset		= NULL,
 	.capacity		= ide_cdrom_capacity,
-	.special		= NULL,
-	.proc			= NULL,
 	.attach			= ide_cdrom_attach,
-	.ata_prebuilder		= NULL,
-	.atapi_prebuilder	= NULL,
 	.drives			= LIST_HEAD_INIT(ide_cdrom_driver.drives),
 };
 
+static int idecd_open(struct inode * inode, struct file * file)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	struct cdrom_info *info = drive->driver_data;
+	int rc = -ENOMEM;
+	drive->usage++;
+
+	if (!info->buffer)
+		info->buffer = (char *) kmalloc(SECTOR_BUFFER_SIZE, GFP_KERNEL);
+        if (!info->buffer || (rc = cdrom_open(&info->devinfo, inode, file)))
+		drive->usage--;
+	return rc;
+}
+
+static int idecd_release(struct inode * inode, struct file * file)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	struct cdrom_info *info = drive->driver_data;
+
+	cdrom_release (&info->devinfo, file);
+	drive->usage--;
+	return 0;
+}
+
+static int idecd_ioctl (struct inode *inode, struct file *file,
+			unsigned int cmd, unsigned long arg)
+{
+	struct block_device *bdev = inode->i_bdev;
+	ide_drive_t *drive = bdev->bd_disk->private_data;
+	int err = generic_ide_ioctl(bdev, cmd, arg);
+	if (err == -EINVAL) {
+		struct cdrom_info *info = drive->driver_data;
+		err = cdrom_ioctl(&info->devinfo, inode, cmd, arg);
+	}
+	return err;
+}
+
+static int idecd_media_changed(struct gendisk *disk)
+{
+	ide_drive_t *drive = disk->private_data;
+	struct cdrom_info *info = drive->driver_data;
+	return cdrom_media_changed(&info->devinfo);
+}
+
+static int idecd_revalidate_disk(struct gendisk *disk)
+{
+	ide_drive_t *drive = disk->private_data;
+	struct request_sense sense;
+	cdrom_read_toc(drive, &sense);
+	return  0;
+}
+
+static struct block_device_operations idecd_ops = {
+	.owner		= THIS_MODULE,
+	.open		= idecd_open,
+	.release	= idecd_release,
+	.ioctl		= idecd_ioctl,
+	.media_changed	= idecd_media_changed,
+	.revalidate_disk= idecd_revalidate_disk
+};
+
 /* options */
 char *ignore = NULL;
 
@@ -3211,6 +3394,7 @@
 	DRIVER(drive)->busy--;
 
 	cdrom_read_toc(drive, &sense);
+	g->fops = &idecd_ops;
 	add_disk(g);
 	return 0;
 failed:
diff -Nru a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
--- a/drivers/ide/ide-disk.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/ide/ide-disk.c	Wed Oct 30 16:44:27 2002
@@ -788,57 +788,8 @@
 
 #endif /* CONFIG_IDE_TASKFILE_IO */
 
-static int idedisk_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	MOD_INC_USE_COUNT;
-	if (drive->removable && drive->usage == 1) {
-		ide_task_t args;
-		memset(&args, 0, sizeof(ide_task_t));
-		args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORLOCK;
-		args.command_type = ide_cmd_type_parser(&args);
-		check_disk_change(inode->i_bdev);
-		/*
-		 * Ignore the return code from door_lock,
-		 * since the open() has already succeeded,
-		 * and the door_lock is irrelevant at this point.
-		 */
-		if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL))
-			drive->doorlocking = 0;
-	}
-	return 0;
-}
-
 static int do_idedisk_flushcache(ide_drive_t *drive);
 
-static void idedisk_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	if (drive->removable && !drive->usage) {
-		ide_task_t args;
-		memset(&args, 0, sizeof(ide_task_t));
-		args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORUNLOCK;
-		args.command_type = ide_cmd_type_parser(&args);
-		invalidate_bdev(inode->i_bdev, 0);
-		if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL))
-			drive->doorlocking = 0;
-	}
-	if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache)
-		if (do_idedisk_flushcache(drive))
-			printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
-				drive->name);
-	MOD_DEC_USE_COUNT;
-}
-
-static int idedisk_media_change (ide_drive_t *drive)
-{
-	/* if removable, always assume it was changed */
-	return drive->removable;
-}
-
-static void idedisk_revalidate (ide_drive_t *drive)
-{
-	ide_revalidate_drive(drive);
-}
-
 static u8 idedisk_dump_status (ide_drive_t *drive, const char *msg, u8 stat)
 {
 	ide_hwif_t *hwif = HWIF(drive);
@@ -1610,78 +1561,6 @@
 #endif
 }
 
-static int idedisk_suspend(struct device *dev, u32 state, u32 level)
-{
-	ide_drive_t *drive = dev->driver_data;
-
-	printk("Suspending device %p\n", dev->driver_data);
-
-	/* I hope that every freeze operation from the upper levels have
-	 * already been done...
-	 */
-
-	if (level != SUSPEND_SAVE_STATE)
-		return 0;
-	BUG_ON(in_interrupt());
-
-	printk("Waiting for commands to finish\n");
-
-	/* wait until all commands are finished */
-	/* FIXME: waiting for spinlocks should be done instead. */
-	if (!(HWGROUP(drive)))
-		printk("No hwgroup?\n");
-	while (HWGROUP(drive)->handler)
-		yield();
-
-	/* set the drive to standby */
-	printk(KERN_INFO "suspending: %s ", drive->name);
-	if (drive->driver) {
-		if (drive->driver->standby)
-			drive->driver->standby(drive);
-	}
-	drive->blocked = 1;
-
-	while (HWGROUP(drive)->handler)
-		yield();
-
-	return 0;
-}
-
-static int idedisk_resume(struct device *dev, u32 level)
-{
-	ide_drive_t *drive = dev->driver_data;
-
-	if (level != RESUME_RESTORE_STATE)
-		return 0;
-	if (!drive->blocked)
-		panic("ide: Resume but not suspended?\n");
-
-	drive->blocked = 0;
-	return 0;
-}
-
-
-/* This is just a hook for the overall driver tree.
- */
-
-static int idedisk_ioctl (ide_drive_t *drive, struct inode *inode,
-	struct file *file, unsigned int cmd, unsigned long arg)
-{
-#if 0
-HDIO_GET_ADDRESS
-HDIO_SET_ADDRESS
-HDIO_GET_WCACHE
-HDIO_SET_WCACHE
-HDIO_GET_ACOUSTIC
-HDIO_SET_ACOUSTIC
-HDIO_GET_MULTCOUNT
-HDIO_SET_MULTCOUNT
-HDIO_GET_NOWERR
-HDIO_SET_NOWERR
-#endif
-	return -EINVAL;
-}
-
 static void idedisk_setup (ide_drive_t *drive)
 {
 	struct hd_driveid *id = drive->id;
@@ -1799,6 +1678,7 @@
 	if (ide_unregister_subdriver(drive))
 		return 1;
 	del_gendisk(g);
+	g->fops = ide_fops;
 	return 0;
 }
 
@@ -1821,24 +1701,87 @@
 	.resume			= do_idedisk_resume,
 	.flushcache		= do_idedisk_flushcache,
 	.do_request		= do_rw_disk,
-	.end_request		= NULL,
 	.sense			= idedisk_dump_status,
 	.error			= idedisk_error,
-	.ioctl			= idedisk_ioctl,
-	.open			= idedisk_open,
-	.release		= idedisk_release,
-	.media_change		= idedisk_media_change,
-	.revalidate		= idedisk_revalidate,
 	.pre_reset		= idedisk_pre_reset,
 	.capacity		= idedisk_capacity,
 	.special		= idedisk_special,
 	.proc			= idedisk_proc,
 	.attach			= idedisk_attach,
-	.ata_prebuilder		= NULL,
-	.atapi_prebuilder	= NULL,
 	.drives			= LIST_HEAD_INIT(idedisk_driver.drives),
 };
 
+static int idedisk_open(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	drive->usage++;
+	if (drive->removable && drive->usage == 1) {
+		ide_task_t args;
+		memset(&args, 0, sizeof(ide_task_t));
+		args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORLOCK;
+		args.command_type = ide_cmd_type_parser(&args);
+		check_disk_change(inode->i_bdev);
+		/*
+		 * Ignore the return code from door_lock,
+		 * since the open() has already succeeded,
+		 * and the door_lock is irrelevant at this point.
+		 */
+		if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL))
+			drive->doorlocking = 0;
+	}
+	return 0;
+}
+
+static int idedisk_release(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	if (drive->removable && drive->usage == 1) {
+		ide_task_t args;
+		memset(&args, 0, sizeof(ide_task_t));
+		args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORUNLOCK;
+		args.command_type = ide_cmd_type_parser(&args);
+		invalidate_bdev(inode->i_bdev, 0);
+		if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL))
+			drive->doorlocking = 0;
+	}
+	if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache)
+		if (do_idedisk_flushcache(drive))
+			printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
+				drive->name);
+	drive->usage--;
+	return 0;
+}
+
+static int idedisk_ioctl(struct inode *inode, struct file *file,
+			unsigned int cmd, unsigned long arg)
+{
+	struct block_device *bdev = inode->i_bdev;
+	return generic_ide_ioctl(bdev, cmd, arg);
+}
+
+static int idedisk_media_changed(struct gendisk *disk)
+{
+	ide_drive_t *drive = disk->private_data;
+	/* if removable, always assume it was changed */
+	return drive->removable;
+}
+
+static int idedisk_revalidate_disk(struct gendisk *disk)
+{
+	ide_drive_t *drive = disk->private_data;
+	set_capacity(disk, current_capacity(drive));
+	return 0;
+}
+
+static struct block_device_operations idedisk_ops = {
+	.owner		= THIS_MODULE,
+	.open		= idedisk_open,
+	.release	= idedisk_release,
+	.ioctl		= idedisk_ioctl,
+	.media_changed	= idedisk_media_changed,
+	.revalidate_disk= idedisk_revalidate_disk
+};
+
 MODULE_DESCRIPTION("ATA DISK Driver");
 
 static int idedisk_attach(ide_drive_t *drive)
@@ -1878,6 +1821,7 @@
 	g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
 	g->flags |= GENHD_FL_DEVFS;
 	set_capacity(g, current_capacity(drive));
+	g->fops = &idedisk_ops;
 	add_disk(g);
 	return 0;
 failed:
diff -Nru a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
--- a/drivers/ide/ide-floppy.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/ide/ide-floppy.c	Wed Oct 30 16:44:28 2002
@@ -1238,6 +1238,21 @@
 	set_bit(PC_DMA_RECOMMENDED, &pc->flags);
 }
 
+static int
+idefloppy_blockpc_cmd(idefloppy_floppy_t *floppy, idefloppy_pc_t *pc, struct request *rq)
+{
+	/*
+	 * just support eject for now, it would not be hard to make the
+	 * REQ_BLOCK_PC support fully-featured
+	 */
+	if (rq->cmd[0] != IDEFLOPPY_START_STOP_CMD)
+		return 1;
+
+	idefloppy_init_pc(pc);
+	memcpy(pc->c, rq->cmd, sizeof(pc->c));
+	return 0;
+}
+
 /*
  *	idefloppy_do_request is our request handling function.	
  */
@@ -1280,6 +1295,12 @@
 		idefloppy_create_rw_cmd(floppy, pc, rq, block);
 	} else if (rq->flags & REQ_SPECIAL) {
 		pc = (idefloppy_pc_t *) rq->buffer;
+	} else if (rq->flags & REQ_BLOCK_PC) {
+		pc = idefloppy_next_pc_storage(drive);
+		if (idefloppy_blockpc_cmd(floppy, pc, rq)) {
+			idefloppy_do_end_request(drive, 0, 0);
+			return ide_stopped;
+		}
 	} else {
 		blk_dump_rq_flags(rq,
 			"ide-floppy: unsupported command in queue");
@@ -1490,10 +1511,7 @@
 **
 */
 
-static int idefloppy_get_format_capacities (ide_drive_t *drive,
-					    struct inode *inode,
-					    struct file *file,
-					    int *arg)	/* Cheater */
+static int idefloppy_get_format_capacities(ide_drive_t *drive, int *arg)
 {
         idefloppy_pc_t pc;
 	idefloppy_capacity_header_t *header;
@@ -1569,10 +1587,7 @@
 **        0x01 - verify media after format.
 */
 
-static int idefloppy_begin_format(ide_drive_t *drive,
-				  struct inode *inode,
-				  struct file *file,
-				  int *arg)
+static int idefloppy_begin_format(ide_drive_t *drive, int *arg)
 {
 	int blocks;
 	int length;
@@ -1605,10 +1620,7 @@
 ** the dsc bit, and return either 0 or 65536.
 */
 
-static int idefloppy_get_format_progress(ide_drive_t *drive,
-					 struct inode *inode,
-					 struct file *file,
-					 int *arg)
+static int idefloppy_get_format_progress(ide_drive_t *drive, int *arg)
 {
 	idefloppy_floppy_t *floppy = drive->driver_data;
 	idefloppy_pc_t pc;
@@ -1644,181 +1656,6 @@
 }
 
 /*
- *	Our special ide-floppy ioctl's.
- *
- *	Currently there aren't any ioctl's.
- */
-static int idefloppy_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
-				 unsigned int cmd, unsigned long arg)
-{
-	idefloppy_pc_t pc;
-	idefloppy_floppy_t *floppy = drive->driver_data;
-	int prevent = (arg) ? 1 : 0;
-
-	switch (cmd) {
-	case CDROMEJECT:
-		prevent = 0;
-		/* fall through */
-	case CDROM_LOCKDOOR:
-		if (drive->usage > 1)
-			return -EBUSY;
-
-		/* The IOMEGA Clik! Drive doesn't support this command - no room for an eject mechanism */
-                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {
-			idefloppy_create_prevent_cmd(&pc, prevent);
-			(void) idefloppy_queue_pc_tail(drive, &pc);
-		}
-		if (cmd == CDROMEJECT) {
-			idefloppy_create_start_stop_cmd(&pc, 2);
-			(void) idefloppy_queue_pc_tail(drive, &pc);
-		}
-		return 0;
-	case IDEFLOPPY_IOCTL_FORMAT_SUPPORTED:
-		return (0);
-	case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY:
-		return (idefloppy_get_format_capacities(drive, inode, file,
-							(int *)arg));
-	case IDEFLOPPY_IOCTL_FORMAT_START:
-
-		if (!(file->f_mode & 2))
-			return (-EPERM);
-
-		{
-			idefloppy_floppy_t *floppy = drive->driver_data;
-
-			if (drive->usage > 1) {
-				/* Don't format if someone is using the disk */
-
-				clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS,
-					  &floppy->flags);
-				return -EBUSY;
-			} else {
-				int rc;
-
-				set_bit(IDEFLOPPY_FORMAT_IN_PROGRESS,
-					&floppy->flags);
-
-				rc=idefloppy_begin_format(drive, inode,
-							      file,
-							      (int *)arg);
-
-				if (rc)
-					clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS,
-						  &floppy->flags);
-				return (rc);
-
-			/*
-			** Note, the bit will be cleared when the device is
-			** closed.  This is the cleanest way to handle the
-			** situation where the drive does not support
-			** format progress reporting.
-			*/
-			}
-		}
-	case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:
-		return (idefloppy_get_format_progress(drive, inode, file,
-						      (int *)arg));
-	}
- 	return -EINVAL;
-}
-
-/*
- *	Our open/release functions
- */
-static int idefloppy_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	idefloppy_floppy_t *floppy = drive->driver_data;
-	idefloppy_pc_t pc;
-	
-#if IDEFLOPPY_DEBUG_LOG
-	printk(KERN_INFO "Reached idefloppy_open\n");
-#endif /* IDEFLOPPY_DEBUG_LOG */
-
-	MOD_INC_USE_COUNT;
-	if (drive->usage == 1) {
-		clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
-		/* Just in case */
-
-		idefloppy_create_test_unit_ready_cmd(&pc);
-		if (idefloppy_queue_pc_tail(drive, &pc)) {
-			idefloppy_create_start_stop_cmd(&pc, 1);
-			(void) idefloppy_queue_pc_tail(drive, &pc);
-		}
-
-		if (idefloppy_get_capacity (drive)
-		   && (filp->f_flags & O_NDELAY) == 0
-		    /*
-		    ** Allow O_NDELAY to open a drive without a disk, or with
-		    ** an unreadable disk, so that we can get the format
-		    ** capacity of the drive or begin the format - Sam
-		    */
-		    ) {
-			drive->usage--;
-			MOD_DEC_USE_COUNT;
-			return -EIO;
-		}
-
-		if (floppy->wp && (filp->f_mode & 2)) {
-			drive->usage--;
-			MOD_DEC_USE_COUNT;
-			return -EROFS;
-		}		
-		set_bit(IDEFLOPPY_MEDIA_CHANGED, &floppy->flags);
-		/* IOMEGA Clik! drives do not support lock/unlock commands */
-                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {
-			idefloppy_create_prevent_cmd(&pc, 1);
-			(void) idefloppy_queue_pc_tail(drive, &pc);
-		}
-		check_disk_change(inode->i_bdev);
-	} else if (test_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags)) {
-		drive->usage--;
-		MOD_DEC_USE_COUNT;
-		return -EBUSY;
-	}
-	return 0;
-}
-
-static void idefloppy_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	idefloppy_pc_t pc;
-	
-#if IDEFLOPPY_DEBUG_LOG
-	printk (KERN_INFO "Reached idefloppy_release\n");
-#endif /* IDEFLOPPY_DEBUG_LOG */
-
-	if (!drive->usage) {
-		idefloppy_floppy_t *floppy = drive->driver_data;
-
-		/* IOMEGA Clik! drives do not support lock/unlock commands */
-                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {
-			idefloppy_create_prevent_cmd(&pc, 0);
-			(void) idefloppy_queue_pc_tail(drive, &pc);
-		}
-
-		clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
-	}
-	MOD_DEC_USE_COUNT;
-}
-
-/*
- *	Check media change. Use a simple algorithm for now.
- */
-static int idefloppy_media_change (ide_drive_t *drive)
-{
-	idefloppy_floppy_t *floppy = drive->driver_data;
-	
-	return test_and_clear_bit(IDEFLOPPY_MEDIA_CHANGED, &floppy->flags);
-}
-
-/*
- *	Revalidate the new media. Should set blk_size[]
- */
-static void idefloppy_revalidate (ide_drive_t *drive)
-{
-	ide_revalidate_drive(drive);
-}
-
-/*
  *	Return the current floppy capacity to ide.c.
  */
 static unsigned long idefloppy_capacity (ide_drive_t *drive)
@@ -2021,6 +1858,7 @@
 	drive->driver_data = NULL;
 	kfree(floppy);
 	del_gendisk(g);
+	g->fops = ide_fops;
 	return 0;
 }
 
@@ -2055,29 +1893,179 @@
 #endif
 	.supports_dsc_overlap	= 0,
 	.cleanup		= idefloppy_cleanup,
-	.standby		= NULL,
-	.suspend		= NULL,
-	.resume			= NULL,
-	.flushcache		= NULL,
 	.do_request		= idefloppy_do_request,
 	.end_request		= idefloppy_do_end_request,
-	.sense			= NULL,
-	.error			= NULL,
-	.ioctl			= idefloppy_ioctl,
-	.open			= idefloppy_open,
-	.release		= idefloppy_release,
-	.media_change		= idefloppy_media_change,
-	.revalidate		= idefloppy_revalidate,
-	.pre_reset		= NULL,
 	.capacity		= idefloppy_capacity,
-	.special		= NULL,
 	.proc			= idefloppy_proc,
 	.attach			= idefloppy_attach,
-	.ata_prebuilder		= NULL,
-	.atapi_prebuilder	= NULL,
 	.drives			= LIST_HEAD_INIT(idefloppy_driver.drives),
 };
 
+static int idefloppy_open(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	idefloppy_floppy_t *floppy = drive->driver_data;
+	idefloppy_pc_t pc;
+
+	drive->usage++;
+	
+#if IDEFLOPPY_DEBUG_LOG
+	printk(KERN_INFO "Reached idefloppy_open\n");
+#endif /* IDEFLOPPY_DEBUG_LOG */
+
+	if (drive->usage == 1) {
+		clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
+		/* Just in case */
+
+		idefloppy_create_test_unit_ready_cmd(&pc);
+		if (idefloppy_queue_pc_tail(drive, &pc)) {
+			idefloppy_create_start_stop_cmd(&pc, 1);
+			(void) idefloppy_queue_pc_tail(drive, &pc);
+		}
+
+		if (idefloppy_get_capacity (drive)
+		   && (filp->f_flags & O_NDELAY) == 0
+		    /*
+		    ** Allow O_NDELAY to open a drive without a disk, or with
+		    ** an unreadable disk, so that we can get the format
+		    ** capacity of the drive or begin the format - Sam
+		    */
+		    ) {
+			drive->usage--;
+			return -EIO;
+		}
+
+		if (floppy->wp && (filp->f_mode & 2)) {
+			drive->usage--;
+			return -EROFS;
+		}		
+		set_bit(IDEFLOPPY_MEDIA_CHANGED, &floppy->flags);
+		/* IOMEGA Clik! drives do not support lock/unlock commands */
+                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {
+			idefloppy_create_prevent_cmd(&pc, 1);
+			(void) idefloppy_queue_pc_tail(drive, &pc);
+		}
+		check_disk_change(inode->i_bdev);
+	} else if (test_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags)) {
+		drive->usage--;
+		return -EBUSY;
+	}
+	return 0;
+}
+
+static int idefloppy_release(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	idefloppy_pc_t pc;
+	
+#if IDEFLOPPY_DEBUG_LOG
+	printk (KERN_INFO "Reached idefloppy_release\n");
+#endif /* IDEFLOPPY_DEBUG_LOG */
+
+	if (drive->usage == 1) {
+		idefloppy_floppy_t *floppy = drive->driver_data;
+
+		/* IOMEGA Clik! drives do not support lock/unlock commands */
+                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {
+			idefloppy_create_prevent_cmd(&pc, 0);
+			(void) idefloppy_queue_pc_tail(drive, &pc);
+		}
+
+		clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
+	}
+	drive->usage--;
+	return 0;
+}
+
+static int idefloppy_ioctl(struct inode *inode, struct file *file,
+			unsigned int cmd, unsigned long arg)
+{
+	struct block_device *bdev = inode->i_bdev;
+	ide_drive_t *drive = bdev->bd_disk->private_data;
+	idefloppy_floppy_t *floppy = drive->driver_data;
+	int err = generic_ide_ioctl(bdev, cmd, arg);
+	int prevent = (arg) ? 1 : 0;
+	idefloppy_pc_t pc;
+	if (err != -EINVAL)
+		return err;
+
+	switch (cmd) {
+	case CDROMEJECT:
+		prevent = 0;
+		/* fall through */
+	case CDROM_LOCKDOOR:
+		if (drive->usage > 1)
+			return -EBUSY;
+
+		/* The IOMEGA Clik! Drive doesn't support this command - no room for an eject mechanism */
+                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {
+			idefloppy_create_prevent_cmd(&pc, prevent);
+			(void) idefloppy_queue_pc_tail(drive, &pc);
+		}
+		if (cmd == CDROMEJECT) {
+			idefloppy_create_start_stop_cmd(&pc, 2);
+			(void) idefloppy_queue_pc_tail(drive, &pc);
+		}
+		return 0;
+	case IDEFLOPPY_IOCTL_FORMAT_SUPPORTED:
+		return 0;
+	case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY:
+		return idefloppy_get_format_capacities(drive, (int *)arg);
+	case IDEFLOPPY_IOCTL_FORMAT_START:
+
+		if (!(file->f_mode & 2))
+			return -EPERM;
+
+		if (drive->usage > 1) {
+			/* Don't format if someone is using the disk */
+
+			clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS,
+				  &floppy->flags);
+			return -EBUSY;
+		}
+
+		set_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
+
+		err = idefloppy_begin_format(drive, (int *)arg);
+		if (err)
+			clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);
+		return err;
+		/*
+		** Note, the bit will be cleared when the device is
+		** closed.  This is the cleanest way to handle the
+		** situation where the drive does not support
+		** format progress reporting.
+		*/
+	case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:
+		return idefloppy_get_format_progress(drive, (int *)arg);
+	}
+ 	return -EINVAL;
+}
+
+static int idefloppy_media_changed(struct gendisk *disk)
+{
+	ide_drive_t *drive = disk->private_data;
+	idefloppy_floppy_t *floppy = drive->driver_data;
+	
+	return test_and_clear_bit(IDEFLOPPY_MEDIA_CHANGED, &floppy->flags);
+}
+
+static int idefloppy_revalidate_disk(struct gendisk *disk)
+{
+	ide_drive_t *drive = disk->private_data;
+	set_capacity(disk, current_capacity(drive));
+	return 0;
+}
+
+static struct block_device_operations idefloppy_ops = {
+	.owner		= THIS_MODULE,
+	.open		= idefloppy_open,
+	.release	= idefloppy_release,
+	.ioctl		= idefloppy_ioctl,
+	.media_changed	= idefloppy_media_changed,
+	.revalidate_disk= idefloppy_revalidate_disk
+};
+
 static int idefloppy_attach (ide_drive_t *drive)
 {
 	idefloppy_floppy_t *floppy;
@@ -2114,6 +2102,7 @@
 	g->de = drive->de;
 	g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
 	g->flags |= GENHD_FL_DEVFS;
+	g->fops = &idefloppy_ops;
 	add_disk(g);
 	return 0;
 failed:
diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
--- a/drivers/ide/ide-probe.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/ide/ide-probe.c	Wed Oct 30 16:44:29 2002
@@ -166,6 +166,7 @@
 						printk("cdrom or floppy?, assuming ");
 					if (drive->media != ide_cdrom) {
 						printk ("FLOPPY");
+						drive->removable = 1;
 						break;
 					}
 				}
@@ -972,22 +973,19 @@
 
 EXPORT_SYMBOL(init_irq);
 
-static void ata_lock(dev_t dev, void *data)
+static int ata_lock(dev_t dev, void *data)
 {
-	ide_hwif_t *hwif = data;
-	int unit = MINOR(dev) >> PARTN_BITS;
-	get_disk(hwif->drives[unit].disk);
+	/* FIXME: we want to pin hwif down */
+	return 0;
 }
 
 struct gendisk *ata_probe(dev_t dev, int *part, void *data)
 {
 	ide_hwif_t *hwif = data;
-	int unit = MINOR(dev) >> PARTN_BITS;
+	int unit = *part >> PARTN_BITS;
 	ide_drive_t *drive = &hwif->drives[unit];
-	if (!drive->present) {
-		put_disk(drive->disk);
+	if (!drive->present)
 		return NULL;
-	}
 	if (!drive->driver) {
 		if (drive->media == ide_disk)
 			(void) request_module("ide-disk");
@@ -1000,34 +998,23 @@
 		if (drive->media == ide_floppy)
 			(void) request_module("ide-floppy");
 	}
-	if (!drive->driver) {
-		put_disk(drive->disk);
+	if (!drive->driver)
 		return NULL;
-	}
-	return drive->disk;
+	*part &= (1 << PARTN_BITS) - 1;
+	return get_disk(drive->disk);
 }
 
-/*
- * init_gendisk() (as opposed to ide_geninit) is called for each major device,
- * after probing for drives, to allocate partition tables and other data
- * structures needed for the routines in genhd.c.  ide_geninit() gets called
- * somewhat later, during the partition check.
- */
-static void init_gendisk (ide_hwif_t *hwif)
+static int alloc_disks(ide_hwif_t *hwif)
 {
-	unsigned int unit, units;
-	extern devfs_handle_t ide_devfs_handle;
+	unsigned int unit;
 	struct gendisk *disks[MAX_DRIVES];
 
-	units = MAX_DRIVES;
-
 	for (unit = 0; unit < MAX_DRIVES; unit++) {
 		disks[unit] = alloc_disk(1 << PARTN_BITS);
 		if (!disks[unit])
-			goto err_kmalloc_gd;
+			goto Enomem;
 	}
-
-	for (unit = 0; unit < units; ++unit) {
+	for (unit = 0; unit < MAX_DRIVES; ++unit) {
 		ide_drive_t *drive = &hwif->drives[unit];
 		struct gendisk *disk = disks[unit];
 		disk->major  = hwif->major;
@@ -1038,48 +1025,57 @@
 		disk->queue = &drive->queue;
 		drive->disk = disk;
 	}
+	return 0;
+Enomem:
+	printk(KERN_WARNING "(ide::init_gendisk) Out of memory\n");
+	while (unit--)
+		put_disk(disks[unit]);
+	return -ENOMEM;
+}
 
-	for (unit = 0; unit < units; ++unit) {
-		char name[64];
-		ide_add_generic_settings(hwif->drives + unit);
-		sprintf (name, "host%d/bus%d/target%d/lun%d",
-			(hwif->channel && hwif->mate) ?
-			hwif->mate->index : hwif->index,
-			hwif->channel, unit, hwif->drives[unit].lun);
-		if (hwif->drives[unit].present)
-			hwif->drives[unit].de = devfs_mk_dir(ide_devfs_handle, name, NULL);
-	}
-	
-	for (unit = 0; unit < units; ++unit) {
-		ide_drive_t * drive = &hwif->drives[unit];
+/*
+ * init_gendisk() (as opposed to ide_geninit) is called for each major device,
+ * after probing for drives, to allocate partition tables and other data
+ * structures needed for the routines in genhd.c.  ide_geninit() gets called
+ * somewhat later, during the partition check.
+ */
+static void init_gendisk (ide_hwif_t *hwif)
+{
+	unsigned int unit;
+	extern devfs_handle_t ide_devfs_handle;
 
+	for (unit = 0; unit < MAX_DRIVES; ++unit) {
+		ide_drive_t * drive = &hwif->drives[unit];
+		char name[64];
+		ide_add_generic_settings(drive);
 		snprintf(drive->gendev.bus_id,BUS_ID_SIZE,"%u.%u",
 			 hwif->index,unit);
 		snprintf(drive->gendev.name,DEVICE_NAME_SIZE,
 			 "%s","IDE Drive");
 		drive->gendev.parent = &hwif->gendev;
 		drive->gendev.bus = &ide_bus_type;
-		if (drive->present)
+		sprintf (name, "host%d/bus%d/target%d/lun%d",
+			(hwif->channel && hwif->mate) ?
+			hwif->mate->index : hwif->index,
+			hwif->channel, unit, drive->lun);
+		if (drive->present) {
 			device_register(&drive->gendev);
+			drive->de = devfs_mk_dir(ide_devfs_handle, name, NULL);
+		}
 	}
-
-	blk_register_region(MKDEV(hwif->major, 0), units << PARTN_BITS,
+	blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS,
 			THIS_MODULE, ata_probe, ata_lock, hwif);
-
-	return;
-
-err_kmalloc_gd:
-	printk(KERN_WARNING "(ide::init_gendisk) Out of memory\n");
-	while (unit--)
-		put_disk(disks[unit]);
 }
 
 EXPORT_SYMBOL(init_gendisk);
 
 int hwif_init (ide_hwif_t *hwif)
 {
+	int old_irq, unit;
+
 	if (!hwif->present)
 		return 0;
+
 	if (!hwif->irq) {
 		if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET])))
 		{
@@ -1101,33 +1097,47 @@
 	if (register_blkdev (hwif->major, hwif->name, ide_fops)) {
 		printk("%s: UNABLE TO GET MAJOR NUMBER %d\n",
 			hwif->name, hwif->major);
-		return (hwif->present = 0);
+		return 0;
 	}
+
+	if (alloc_disks(hwif) < 0)
+		goto out;
 	
+	if (init_irq(hwif) == 0)
+		goto done;
+
+	old_irq = hwif->irq;
+	/*
+	 *	It failed to initialise. Find the default IRQ for 
+	 *	this port and try that.
+	 */
+	if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]))) {
+		printk("%s: Disabled unable to get IRQ %d.\n",
+			hwif->name, old_irq);
+		goto out_disks;
+	}
 	if (init_irq(hwif)) {
-		int i = hwif->irq;
-		/*
-		 *	It failed to initialise. Find the default IRQ for 
-		 *	this port and try that.
-		 */
-		if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]))) {
-			printk("%s: Disabled unable to get IRQ %d.\n",
-				hwif->name, i);
-			(void) unregister_blkdev(hwif->major, hwif->name);
-			return (hwif->present = 0);
-		}
-		if (init_irq(hwif)) {
-			printk("%s: probed IRQ %d and default IRQ %d failed.\n",
-				hwif->name, i, hwif->irq);
-			(void) unregister_blkdev(hwif->major, hwif->name);
-			return (hwif->present = 0);
-		}
-		printk("%s: probed IRQ %d failed, using default.\n",
-			hwif->name, hwif->irq);
+		printk("%s: probed IRQ %d and default IRQ %d failed.\n",
+			hwif->name, old_irq, hwif->irq);
+		goto out_disks;
 	}
+	printk("%s: probed IRQ %d failed, using default.\n",
+		hwif->name, hwif->irq);
+
+done:
 	init_gendisk(hwif);
 	hwif->present = 1;	/* success */
 	return 1;
+
+out_disks:
+	for (unit = 0; unit < MAX_DRIVES; unit++) {
+		struct gendisk *disk = hwif->drives[unit].disk;
+		hwif->drives[unit].disk = NULL;
+		put_disk(disk);
+	}
+out:
+	unregister_blkdev(hwif->major, hwif->name);
+	return 0;
 }
 
 EXPORT_SYMBOL(hwif_init);
diff -Nru a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
--- a/drivers/ide/ide-tape.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/ide/ide-tape.c	Wed Oct 30 16:44:27 2002
@@ -4221,7 +4221,7 @@
  *	mtio.h compatible commands should be issued to the character device
  *	interface.
  */
-static int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 {
 	idetape_tape_t *tape = drive->driver_data;
 	idetape_config_t config;
@@ -4250,28 +4250,6 @@
 }
 
 /*
- *	The block device interface should not be used for data transfers.
- *	However, we still allow opening it so that we can issue general
- *	ide driver configuration ioctl's, such as the interrupt unmask feature.
- */
-static int idetape_blkdev_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	MOD_INC_USE_COUNT;
-#if ONSTREAM_DEBUG
-        printk(KERN_INFO "ide-tape: MOD_INC_USE_COUNT in idetape_blkdev_open\n");
-#endif
-	return 0;
-}
-
-static void idetape_blkdev_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	MOD_DEC_USE_COUNT;
-#if ONSTREAM_DEBUG
-        printk(KERN_INFO "ide-tape: MOD_DEC_USE_COUNT in idetape_blkdev_release\n");
-#endif
-}
-
-/*
  *	idetape_pre_reset is called before an ATAPI/ATA software reset.
  */
 static void idetape_pre_reset (ide_drive_t *drive)
@@ -5337,7 +5315,7 @@
 		default:
 			if (tape->chrdev_direction == idetape_direction_read)
 				idetape_discard_read_pipeline(drive, 1);
-			return (idetape_blkdev_ioctl(drive,inode,file,cmd,arg));
+			return idetape_blkdev_ioctl(drive, cmd, arg);
 	}
 }
 
@@ -5461,7 +5439,6 @@
 
 	if (test_and_set_bit(IDETAPE_BUSY, &tape->flags))
 		return -EBUSY;
-	MOD_INC_USE_COUNT;
 	if (!tape->onstream) {	
 		idetape_read_position(drive);
 		if (!test_bit(IDETAPE_ADDRESS_VALID, &tape->flags))
@@ -5479,15 +5456,12 @@
 	if (idetape_wait_ready(drive, 60 * HZ)) {
 		clear_bit(IDETAPE_BUSY, &tape->flags);
 		printk(KERN_ERR "ide-tape: %s: drive not ready\n", tape->name);
-		MOD_DEC_USE_COUNT;
 		return -EBUSY;
 	}
 	idetape_read_position(drive);
-	MOD_DEC_USE_COUNT;
 	clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags);
 
 	if (tape->chrdev_direction == idetape_direction_none) {
-		MOD_INC_USE_COUNT;
 		if (idetape_create_prevent_cmd(drive, &pc, 1)) {
 			if (!idetape_queue_pc_tail(drive, &pc)) {
 				if (tape->door_locked != DOOR_EXPLICITLY_LOCKED)
@@ -5562,7 +5536,6 @@
 				if (!idetape_queue_pc_tail(drive, &pc))
 					tape->door_locked = DOOR_UNLOCKED;
 		}
-		MOD_DEC_USE_COUNT;
 	}
 	clear_bit(IDETAPE_BUSY, &tape->flags);
 	unlock_kernel();
@@ -6150,6 +6123,7 @@
 	devfs_unregister(tape->de_r);
 	devfs_unregister(tape->de_n);
 	kfree (tape);
+	drive->disk->fops = ide_fops;
 	return 0;
 }
 
@@ -6196,26 +6170,11 @@
 #endif
 	.supports_dsc_overlap 	= 1,
 	.cleanup		= idetape_cleanup,
-	.standby		= NULL,
-	.suspend		= NULL,
-	.resume			= NULL,
-	.flushcache		= NULL,
 	.do_request		= idetape_do_request,
 	.end_request		= idetape_end_request,
-	.sense			= NULL,
-	.error			= NULL,
-	.ioctl			= idetape_blkdev_ioctl,
-	.open			= idetape_blkdev_open,
-	.release		= idetape_blkdev_release,
-	.media_change		= NULL,
-	.revalidate		= NULL,
 	.pre_reset		= idetape_pre_reset,
-	.capacity		= NULL,
-	.special		= NULL,
 	.proc			= idetape_proc,
 	.attach			= idetape_attach,
-	.ata_prebuilder		= NULL,
-	.atapi_prebuilder	= NULL,
 	.drives			= LIST_HEAD_INIT(idetape_driver.drives),
 };
 
@@ -6231,6 +6190,38 @@
 	.release	= idetape_chrdev_release,
 };
 
+static int idetape_open(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	drive->usage++;
+	return 0;
+}
+
+static int idetape_release(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	drive->usage--;
+	return 0;
+}
+
+static int idetape_ioctl(struct inode *inode, struct file *file,
+			unsigned int cmd, unsigned long arg)
+{
+	struct block_device *bdev = inode->i_bdev;
+	ide_drive_t *drive = bdev->bd_disk->private_data;
+	int err = generic_ide_ioctl(bdev, cmd, arg);
+	if (err == -EINVAL)
+		err = idetape_blkdev_ioctl(drive, cmd, arg);
+	return err;
+}
+
+static struct block_device_operations idetape_block_ops = {
+	.owner		= THIS_MODULE,
+	.open		= idetape_open,
+	.release	= idetape_release,
+	.ioctl		= idetape_ioctl,
+};
+
 static int idetape_attach (ide_drive_t *drive)
 {
 	idetape_tape_t *tape;
@@ -6279,6 +6270,7 @@
 			    S_IFCHR | S_IRUGO | S_IWUGO,
 			    &idetape_fops, NULL);
 	devfs_register_tape(tape->de_r);
+	drive->disk->fops = &idetape_block_ops;
 	return 0;
 failed:
 	return 1;
diff -Nru a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
--- a/drivers/ide/ide-taskfile.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/ide/ide-taskfile.c	Wed Oct 30 16:44:17 2002
@@ -1315,7 +1315,6 @@
 	struct request *rq;
 	unsigned long flags;
 	ide_hwgroup_t *hwgroup = HWGROUP(drive);
-	unsigned int major = HWIF(drive)->major;
 	struct list_head *queue_head = &drive->queue.queue_head;
 	DECLARE_COMPLETION(wait);
 
@@ -1357,7 +1356,8 @@
 	rq->special = args;
 	rq->errors = 0;
 	rq->rq_status = RQ_ACTIVE;
-	rq->rq_dev = MKDEV(major,(drive->select.b.unit)<<PARTN_BITS);
+	rq->rq_dev = mk_kdev(disk->major, disk->first_minor);
+	rq->rq_disk = drive->disk;
 	rq->waiting = &wait;
 
 	spin_lock_irqsave(&ide_lock, flags);
@@ -1404,7 +1404,7 @@
 ide_startstop_t flagged_pre_task_mulout_intr(ide_drive_t *, struct request *);
 ide_startstop_t flagged_task_mulout_intr(ide_drive_t *);
 
-int ide_taskfile_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 {
 	ide_task_request_t	*req_task;
 	ide_task_t		args;
@@ -1626,7 +1626,7 @@
 /*
  * FIXME : this needs to map into at taskfile. <andre@linux-ide.org>
  */
-int ide_cmd_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 {
 #if 1
 	int err = 0;
@@ -1764,7 +1764,7 @@
 /*
  * FIXME : this needs to map into at taskfile. <andre@linux-ide.org>
  */
-int ide_task_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+int ide_task_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 {
 	int err = 0;
 	u8 args[7], *argbuf = args;
@@ -2185,7 +2185,7 @@
 
 #ifdef CONFIG_PKT_TASK_IOCTL
 
-int pkt_taskfile_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+int pkt_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 {
 #if 0
 	switch(req_task->data_phase) {
diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/ide/ide.c	Wed Oct 30 16:44:26 2002
@@ -406,7 +406,7 @@
 	}
 
 	if (!end_that_request_first(rq, uptodate, nr_sectors)) {
-		add_blkdev_randomness(major(rq->rq_dev));
+		add_disk_randomness(rq->rq_disk);
 		if (!blk_rq_tagged(rq))
 			blkdev_dequeue_request(rq);
 		else
@@ -878,13 +878,12 @@
 {
 	ide_startstop_t startstop;
 	unsigned long block;
-	ide_hwif_t *hwif = HWIF(drive);
 
 	BUG_ON(!(rq->flags & REQ_STARTED));
 
 #ifdef DEBUG
 	printk("%s: start_request: current=0x%08lx\n",
-		hwif->name, (unsigned long) rq);
+		HWIF(drive)->name, (unsigned long) rq);
 #endif
 
 	/* bail early if we've exceeded max_failures */
@@ -910,7 +909,7 @@
 		block = 1;  /* redirect MBR access to EZ-Drive partn table */
 
 #if (DISK_RECOVERY_TIME > 0)
-	while ((read_timer() - hwif->last_time) < DISK_RECOVERY_TIME);
+	while ((read_timer() - HWIF(drive)->last_time) < DISK_RECOVERY_TIME);
 #endif
 
 	SELECT_DRIVE(drive);
@@ -1128,9 +1127,15 @@
 			break;
 		}
 
+		/*
+		 * we know that the queue isn't empty, but this can happen
+		 * if the q->prep_rq_fn() decides to kill a request
+		 */
 		rq = elv_next_request(&drive->queue);
-		if (!rq)
+		if (!rq) {
+			hwgroup->busy = !!ata_pending_commands(drive);
 			break;
+		}
 
 		if (!rq->bio && ata_pending_commands(drive))
 			break;
@@ -1515,10 +1520,8 @@
 {
 	unsigned long flags;
 	ide_hwgroup_t *hwgroup = HWGROUP(drive);
-	unsigned int major = HWIF(drive)->major;
-	request_queue_t *q = &drive->queue;
-	struct list_head *queue_head = &q->queue_head;
 	DECLARE_COMPLETION(wait);
+	int insert_end = 1, err;
 
 #ifdef CONFIG_BLK_DEV_PDC4030
 	if (HWIF(drive)->chipset == ide_pdc4030 && rq->buffer != NULL)
@@ -1527,69 +1530,41 @@
 	rq->errors = 0;
 	rq->rq_status = RQ_ACTIVE;
 
+	rq->rq_dev = mk_kdev(drive->disk->major, drive->disk->first_minor);
+	rq->rq_disk = drive->disk;
+
 	/*
-	 * Aiee. This is ugly, but it gets called before "drive->disk"
-	 * has been initialized. Al will fix it, I'm sure.
+	 * we need to hold an extra reference to request for safe inspection
+	 * after completion
 	 */
-	if (drive->disk)
-		rq->rq_dev = mk_kdev(drive->disk->major, drive->disk->first_minor);
-	else {
-		printk("IDE init is ugly:");
-		dump_stack();
-		rq->rq_dev = mk_kdev(HWIF(drive)->major, (drive->select.b.unit) << PARTN_BITS);
+	if (action == ide_wait) {
+		rq->ref_count++;
+		rq->waiting = &wait;
 	}
 
-	rq->rq_disk = drive->disk;
-	if (action == ide_wait)
-		rq->waiting = &wait;
 	spin_lock_irqsave(&ide_lock, flags);
-	if (blk_queue_empty(q) || action == ide_preempt) {
-		if (action == ide_preempt)
-			hwgroup->rq = NULL;
-	} else {
-		if (action == ide_wait || action == ide_end) {
-			queue_head = queue_head->prev;
-		} else
-			queue_head = queue_head->next;
+	if (action == ide_preempt) {
+		hwgroup->rq = NULL;
+		insert_end = 0;
 	}
-	q->elevator.elevator_add_req_fn(q, rq, queue_head);
+	__elv_add_request(&drive->queue, rq, insert_end, 0);
 	ide_do_request(hwgroup, 0);
 	spin_unlock_irqrestore(&ide_lock, flags);
+
+	err = 0;
 	if (action == ide_wait) {
-		/* wait for it to be serviced */
 		wait_for_completion(&wait);
-		/* return -EIO if errors */
-		return rq->errors ? -EIO : 0;
+		if (rq->errors)
+			err = -EIO;
+
+		blk_put_request(rq);
 	}
-	return 0;
 
+	return err;
 }
 
 EXPORT_SYMBOL(ide_do_drive_cmd);
 
-void ide_revalidate_drive (ide_drive_t *drive)
-{
-	set_capacity(drive->disk, current_capacity(drive));
-}
-
-EXPORT_SYMBOL(ide_revalidate_drive);
-
-/*
- * This routine is called to flush all partitions and partition tables
- * for a changed disk, and then re-read the new partition table.
- * If we are revalidating a disk because of a media change, then we
- * enter with usage == 0.  If we are using an ioctl, we automatically have
- * usage == 1 (we need an open channel to use an ioctl :-), so this
- * is our limit.
- */
-static int ide_revalidate_disk(struct gendisk *disk)
-{
-	ide_drive_t *drive = disk->private_data;
-	if (DRIVER(drive)->revalidate)
-		DRIVER(drive)->revalidate(drive);
-	return  0;
-}
-
 void ide_probe_module (void)
 {
 	if (!ide_probe) {
@@ -1605,21 +1580,7 @@
 
 static int ide_open (struct inode * inode, struct file * filp)
 {
-	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
-	drive->usage++;
-	return DRIVER(drive)->open(inode, filp, drive);
-}
-
-/*
- * Releasing a block device means we sync() it, so that it can safely
- * be forgotten about...
- */
-static int ide_release (struct inode * inode, struct file * file)
-{
-	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
-	DRIVER(drive)->release(inode, file, drive);
-	drive->usage--;
-	return 0;
+	return -ENXIO;
 }
 
 static LIST_HEAD(ata_unused);
@@ -1810,12 +1771,12 @@
 	 * Remove us from the kernel's knowledge
 	 */
 	blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
-	unregister_blkdev(hwif->major, hwif->name);
 	for (i = 0; i < MAX_DRIVES; i++) {
 		struct gendisk *disk = hwif->drives[i].disk;
 		hwif->drives[i].disk = NULL;
 		put_disk(disk);
 	}
+	unregister_blkdev(hwif->major, hwif->name);
 	old_hwif			= *hwif;
 	init_hwif_data(index);	/* restore hwif data to pristine status */
 	hwif->hwgroup			= old_hwif.hwgroup;
@@ -2402,10 +2363,10 @@
 
 EXPORT_SYMBOL(ata_attach);
 
-static int ide_ioctl (struct inode *inode, struct file *file,
-			unsigned int cmd, unsigned long arg)
+int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
+			unsigned long arg)
 {
-	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	ide_drive_t *drive = bdev->bd_disk->private_data;
 	ide_settings_t *setting;
 	int err = 0;
 
@@ -2414,7 +2375,7 @@
 			err = ide_read_setting(drive, setting);
 			return err >= 0 ? put_user(err, (long *) arg) : err;
 		} else {
-			if (inode->i_bdev != inode->i_bdev->bd_contains)
+			if (bdev != bdev->bd_contains)
 				return -EINVAL;
 			return ide_write_setting(drive, setting, arg);
 		}
@@ -2429,7 +2390,7 @@
 			if (put_user(drive->bios_head, (u8 *) &loc->heads)) return -EFAULT;
 			if (put_user(drive->bios_sect, (u8 *) &loc->sectors)) return -EFAULT;
 			if (put_user(bios_cyl, (u16 *) &loc->cylinders)) return -EFAULT;
-			if (put_user((unsigned)get_start_sect(inode->i_bdev),
+			if (put_user((unsigned)get_start_sect(bdev),
 				(unsigned long *) &loc->start)) return -EFAULT;
 			return 0;
 		}
@@ -2441,14 +2402,14 @@
 			if (put_user(drive->head, (u8 *) &loc->heads)) return -EFAULT;
 			if (put_user(drive->sect, (u8 *) &loc->sectors)) return -EFAULT;
 			if (put_user(drive->cyl, (unsigned int *) &loc->cylinders)) return -EFAULT;
-			if (put_user((unsigned)get_start_sect(inode->i_bdev),
+			if (put_user((unsigned)get_start_sect(bdev),
 				(unsigned long *) &loc->start)) return -EFAULT;
 			return 0;
 		}
 
 		case HDIO_OBSOLETE_IDENTITY:
 		case HDIO_GET_IDENTITY:
-			if (inode->i_bdev != inode->i_bdev->bd_contains)
+			if (bdev != bdev->bd_contains)
 				return -EINVAL;
 			if (drive->id == NULL)
 				return -ENOMSG;
@@ -2470,12 +2431,12 @@
 				return -EACCES;
 			switch(drive->media) {
 				case ide_disk:
-					return ide_taskfile_ioctl(drive, inode, file, cmd, arg);
+					return ide_taskfile_ioctl(drive, cmd, arg);
 #ifdef CONFIG_PKT_TASK_IOCTL
 				case ide_cdrom:
 				case ide_tape:
 				case ide_floppy:
-					return pkt_taskfile_ioctl(drive, inode, file, cmd, arg);
+					return pkt_taskfile_ioctl(drive, cmd, arg);
 #endif /* CONFIG_PKT_TASK_IOCTL */
 				default:
 					return -ENOMSG;
@@ -2485,12 +2446,12 @@
 		case HDIO_DRIVE_CMD:
 			if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
 				return -EACCES;
-			return ide_cmd_ioctl(drive, inode, file, cmd, arg);
+			return ide_cmd_ioctl(drive, cmd, arg);
 
 		case HDIO_DRIVE_TASK:
 			if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
 				return -EACCES;
-			return ide_task_ioctl(drive, inode, file, cmd, arg);
+			return ide_task_ioctl(drive, cmd, arg);
 
 		case HDIO_SCAN_HWIF:
 		{
@@ -2547,15 +2508,14 @@
  *				} 
  *				HWIF(drive)->multiproc(drive);
  */
-				return file->f_op->ioctl(inode, file,
-								BLKRRPART, 0);
+				return ioctl_by_bdev(bdev, BLKRRPART, 0);
 			}
 			return 0;
 		}
 
 		case CDROMEJECT:
 		case CDROMCLOSETRAY:
-			return scsi_cmd_ioctl(inode->i_bdev, cmd, arg);
+			return scsi_cmd_ioctl(bdev, cmd, arg);
 
 		case HDIO_GET_BUSSTATE:
 			if (!capable(CAP_SYS_ADMIN))
@@ -2572,19 +2532,11 @@
 			return 0;
 
 		default:
-			if (drive->driver != NULL)
-				return DRIVER(drive)->ioctl(drive, inode, file, cmd, arg);
-			return -EPERM;
+			return -EINVAL;
 	}
 }
 
-static int ide_check_media_change(struct gendisk *disk)
-{
-	ide_drive_t *drive = disk->private_data;
-	if (drive->driver != NULL)
-		return DRIVER(drive)->media_change(drive);
-	return 0;
-}
+EXPORT_SYMBOL(generic_ide_ioctl);
 
 /*
  * stridx() returns the offset of c within s,
@@ -3159,11 +3111,6 @@
 #endif
 }
 
-static int default_cleanup (ide_drive_t *drive)
-{
-	return ide_unregister_subdriver(drive);
-}
-
 static int default_standby (ide_drive_t *drive)
 {
 	return 0;
@@ -3205,27 +3152,6 @@
 	return ide_error(drive, msg, stat);
 }
 
-static int default_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file,
-			  unsigned int cmd, unsigned long arg)
-{
-	return -EINVAL;
-}
-
-static int default_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	drive->usage--;
-	return -EIO;
-}
-
-static void default_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-}
-
-static int default_check_media_change (ide_drive_t *drive)
-{
-	return 1;
-}
-
 static void default_pre_reset (ide_drive_t *drive)
 {
 }
@@ -3256,7 +3182,6 @@
 {
 	ide_driver_t *d = drive->driver;
 
-	if (d->cleanup == NULL)		d->cleanup = default_cleanup;
 	if (d->standby == NULL)		d->standby = default_standby;
 	if (d->suspend == NULL)		d->suspend = default_suspend;
 	if (d->resume == NULL)		d->resume = default_resume;
@@ -3265,10 +3190,6 @@
 	if (d->end_request == NULL)	d->end_request = default_end_request;
 	if (d->sense == NULL)		d->sense = default_sense;
 	if (d->error == NULL)		d->error = default_error;
-	if (d->ioctl == NULL)		d->ioctl = default_ioctl;
-	if (d->open == NULL)		d->open = default_open;
-	if (d->release == NULL)		d->release = default_release;
-	if (d->media_change == NULL)	d->media_change = default_check_media_change;
 	if (d->pre_reset == NULL)	d->pre_reset = default_pre_reset;
 	if (d->capacity == NULL)	d->capacity = default_capacity;
 	if (d->special == NULL)		d->special = default_special;
@@ -3369,7 +3290,7 @@
 		list_del_init(&drive->list);
 		ata_attach(drive);
 	}
-	driver->gen_driver.name = driver->name;
+	driver->gen_driver.name = (char *) driver->name;
 	driver->gen_driver.bus = &ide_bus_type;
 	driver->gen_driver.remove = ide_drive_remove;
 	return driver_register(&driver->gen_driver);
@@ -3406,10 +3327,6 @@
 struct block_device_operations ide_fops[] = {{
 	.owner		= THIS_MODULE,
 	.open		= ide_open,
-	.release	= ide_release,
-	.ioctl		= ide_ioctl,
-	.media_changed	= ide_check_media_change,
-	.revalidate_disk= ide_revalidate_disk
 }};
 
 EXPORT_SYMBOL(ide_fops);
diff -Nru a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
--- a/drivers/ide/legacy/hd.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/ide/legacy/hd.c	Wed Oct 30 16:44:17 2002
@@ -45,9 +45,6 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-
-#define MAJOR_NR HD_MAJOR
-#define DEVICE_NR(device) (minor(device)>>6)
 #include <linux/blk.h>
 
 #ifdef __arm__
@@ -98,6 +95,11 @@
 #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 MAJOR_NR HD_MAJOR
+#define QUEUE (&hd_queue)
+#define CURRENT elv_next_request(&hd_queue)
 
 #define TIMEOUT_VALUE	(6*HZ)
 #define	HD_DELAY	0
@@ -113,19 +115,17 @@
 static void recal_intr(void);
 static void bad_rw_intr(void);
 
-static char recalibrate[MAX_HD];
-static char special_op[MAX_HD];
-
 static int reset;
 static int hd_error;
 
-#define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0)
-
 /*
  *  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
@@ -193,11 +193,12 @@
 
 static void dump_status (const char *msg, unsigned int stat)
 {
-	char devc;
+	char *name = "hd?";
+	if (!blk_queue_empty(QUEUE))
+		name = CURRENT->rq_disk->disk_name;
 
-	devc = !blk_queue_empty(QUEUE) ? 'a' + DEVICE_NR(CURRENT->rq_dev) : '?';
 #ifdef VERBOSE_ERRORS
-	printk("hd%c: %s: status=0x%02x { ", devc, msg, stat & 0xff);
+	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 ");
@@ -211,7 +212,7 @@
 		hd_error = 0;
 	} else {
 		hd_error = inb(HD_ERROR);
-		printk("hd%c: %s: error=0x%02x { ", devc, msg, hd_error & 0xff);
+		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 ");
@@ -228,12 +229,12 @@
 		printk("\n");
 	}
 #else
-	printk("hd%c: %s: status=0x%02x.\n", devc, msg, stat & 0xff);
+	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("hd%c: %s: error=0x%02x.\n", devc, msg, hd_error & 0xff);
+		printk("%s: %s: error=0x%02x.\n", name, msg, hd_error & 0xff);
 	}
 #endif
 }
@@ -288,9 +289,14 @@
 	return 0;
 }
 
-static void hd_out(unsigned int drive,unsigned int nsect,unsigned int sect,
-		unsigned int head,unsigned int cyl,unsigned int cmd,
-		void (*intr_addr)(void))
+		
+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;
 
@@ -300,19 +306,19 @@
 #endif
 	if (reset)
 		return;
-	if (!controller_ready(drive, head)) {
+	if (!controller_ready(disk->unit, head)) {
 		reset = 1;
 		return;
 	}
 	SET_HANDLER(intr_addr);
-	outb_p(hd_info[drive].ctl,HD_CMD);
+	outb_p(disk->ctl,HD_CMD);
 	port=HD_DATA;
-	outb_p(hd_info[drive].wpcom>>2,++port);
+	outb_p(disk->wpcom>>2,++port);
 	outb_p(nsect,++port);
 	outb_p(sect,++port);
 	outb_p(cyl,++port);
 	outb_p(cyl>>8,++port);
-	outb_p(0xA0|(drive<<4)|head,++port);
+	outb_p(0xA0|(disk->unit<<4)|head,++port);
 	outb_p(cmd,++port);
 }
 
@@ -361,9 +367,10 @@
 			goto repeat;
 	}
 	if (++i < NR_HD) {
-		special_op[i] = recalibrate[i] = 1;
-		hd_out(i,hd_info[i].sect,hd_info[i].sect,hd_info[i].head-1,
-			hd_info[i].cyl,WIN_SPECIFY,&reset_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
@@ -396,19 +403,18 @@
  */
 static void bad_rw_intr(void)
 {
-	int dev;
-
-	if (blk_queue_empty(QUEUE))
-		return;
-	dev = DEVICE_NR(CURRENT->rq_dev);
-	if (++CURRENT->errors >= MAX_ERRORS || (hd_error & BBD_ERR)) {
-		end_request(CURRENT, 0);
-		special_op[dev] = recalibrate[dev] = 1;
-	} else if (CURRENT->errors % RESET_FREQ == 0)
-		reset = 1;
-	else if ((hd_error & TRK0_ERR) || CURRENT->errors % RECAL_FREQ == 0)
-		special_op[dev] = recalibrate[dev] = 1;
-	/* Otherwise just retry */
+	if (!blk_queue_empty(QUEUE)) {
+		struct request *req = CURRENT;
+		struct hd_i_struct *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)
@@ -424,6 +430,7 @@
 
 static void read_intr(void)
 {
+	struct request *req;
 	int i, retries = 100000;
 
 	do {
@@ -440,19 +447,20 @@
 	hd_request();
 	return;
 ok_to_read:
-	insw(HD_DATA,CURRENT->buffer,256);
-	CURRENT->sector++;
-	CURRENT->buffer += 512;
-	CURRENT->errors = 0;
-	i = --CURRENT->nr_sectors;
-	--CURRENT->current_nr_sectors;
+	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("hd%c: read: sector %ld, remaining = %ld, buffer=0x%08lx\n",
-		dev+'a', CURRENT->sector, CURRENT->nr_sectors,
-		(unsigned long) CURRENT->buffer+512));
+	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 (CURRENT->current_nr_sectors <= 0)
-		end_request(CURRENT, 1);
+	if (req->current_nr_sectors <= 0)
+		end_request(req, 1);
 	if (i > 0) {
 		SET_HANDLER(&read_intr);
 		return;
@@ -468,6 +476,7 @@
 
 static void write_intr(void)
 {
+	struct request *req = CURRENT;
 	int i;
 	int retries = 100000;
 
@@ -477,7 +486,7 @@
 			continue;
 		if (!OK_STATUS(i))
 			break;
-		if ((CURRENT->nr_sectors <= 1) || (i & DRQ_STAT))
+		if ((req->nr_sectors <= 1) || (i & DRQ_STAT))
 			goto ok_to_write;
 	} while (--retries > 0);
 	dump_status("write_intr", i);
@@ -485,15 +494,15 @@
 	hd_request();
 	return;
 ok_to_write:
-	CURRENT->sector++;
-	i = --CURRENT->nr_sectors;
-	--CURRENT->current_nr_sectors;
-	CURRENT->buffer += 512;
-	if (!i || (CURRENT->bio && !SUBSECTOR(i)))
-		end_request(CURRENT, 1);
+	req->sector++;
+	i = --req->nr_sectors;
+	--req->current_nr_sectors;
+	req->buffer += 512;
+	if (!i || (req->bio && req->current_nr_sectors <= 0))
+		end_request(req, 1);
 	if (i > 0) {
 		SET_HANDLER(&write_intr);
-		outsw(HD_DATA,CURRENT->buffer,256);
+		outsw(HD_DATA,req->buffer,256);
 		local_irq_enable();
 	} else {
 #if (HD_DELAY > 0)
@@ -519,7 +528,7 @@
  */
 static void hd_times_out(unsigned long dummy)
 {
-	unsigned int dev;
+	char *name;
 
 	do_hd = NULL;
 
@@ -529,11 +538,11 @@
 	disable_irq(HD_IRQ);
 	local_irq_enable();
 	reset = 1;
-	dev = DEVICE_NR(CURRENT->rq_dev);
-	printk("hd%c: timeout\n", dev+'a');
+	name = CURRENT->rq_disk->disk_name;
+	printk("%s: timeout\n", name);
 	if (++CURRENT->errors >= MAX_ERRORS) {
 #ifdef DEBUG
-		printk("hd%c: too many errors\n", dev+'a');
+		printk("%s: too many errors\n", name);
 #endif
 		end_request(CURRENT, 0);
 	}
@@ -542,18 +551,18 @@
 	enable_irq(HD_IRQ);
 }
 
-int do_special_op (unsigned int dev)
+int do_special_op(struct hd_i_struct *disk, struct request *req)
 {
-	if (recalibrate[dev]) {
-		recalibrate[dev] = 0;
-		hd_out(dev,hd_info[dev].sect,0,0,0,WIN_RESTORE,&recal_intr);
+	if (disk->recalibrate) {
+		disk->recalibrate = 0;
+		hd_out(disk,disk->sect,0,0,0,WIN_RESTORE,&recal_intr);
 		return reset;
 	}
-	if (hd_info[dev].head > 16) {
-		printk ("hd%c: cannot handle device with more than 16 heads - giving up\n", dev+'a');
-		end_request(CURRENT, 0);
+	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);
 	}
-	special_op[dev] = 0;
+	disk->special_op = 0;
 	return 1;
 }
 
@@ -569,7 +578,9 @@
  */
 static void hd_request(void)
 {
-	unsigned int dev, block, nsect, sec, track, head, cyl;
+	unsigned int block, nsect, sec, track, head, cyl;
+	struct hd_i_struct *disk;
+	struct request *req;
 
 	if (do_hd)
 		return;
@@ -581,62 +592,58 @@
 		do_hd = NULL;
 		return;
 	}
+	req = CURRENT;
 
 	if (reset) {
 		local_irq_disable();
 		reset_hd();
 		return;
 	}
-	dev = DEVICE_NR(CURRENT->rq_dev);
-	block = CURRENT->sector;
-	nsect = CURRENT->nr_sectors;
-	if (dev >= NR_HD) {
-		printk("hd: bad disk number: %d\n", dev);
-		end_request(CURRENT, 0);
-		goto repeat;
-	}
-	if (block >= get_capacity(hd_gendisk[dev]) ||
-	    ((block+nsect) > get_capacity(hd_gendisk[dev]))) {
+	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",
-			hd_gendisk[dev]->disk_name, block, nsect);
-		end_request(CURRENT, 0);
+			req->rq_disk->disk_name, block, nsect);
+		end_request(req, 0);
 		goto repeat;
 	}
 
-	if (special_op[dev]) {
-		if (do_special_op(dev))
+	if (disk->special_op) {
+		if (do_special_op(disk, req))
 			goto repeat;
 		return;
 	}
-	sec   = block % hd_info[dev].sect + 1;
-	track = block / hd_info[dev].sect;
-	head  = track % hd_info[dev].head;
-	cyl   = track / hd_info[dev].head;
+	sec   = block % disk->sect + 1;
+	track = block / disk->sect;
+	head  = track % disk->head;
+	cyl   = track / disk->head;
 #ifdef DEBUG
-	printk("hd%c: %sing: CHS=%d/%d/%d, sectors=%d, buffer=0x%08lx\n",
-		dev+'a', (CURRENT->cmd == READ)?"read":"writ",
-		cyl, head, sec, nsect, (unsigned long) CURRENT->buffer);
+	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(CURRENT->flags & REQ_CMD) {
-		switch (rq_data_dir(CURRENT)) {
+	if (req->flags & REQ_CMD) {
+		switch (rq_data_dir(req)) {
 		case READ:
-			hd_out(dev,nsect,sec,head,cyl,WIN_READ,&read_intr);
+			hd_out(disk,nsect,sec,head,cyl,WIN_READ,&read_intr);
 			if (reset)
 				goto repeat;
 			break;
 		case WRITE:
-			hd_out(dev,nsect,sec,head,cyl,WIN_WRITE,&write_intr);
+			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,CURRENT->buffer,256);
+			outsw(HD_DATA,req->buffer,256);
 			break;
 		default:
 			printk("unknown hd-command\n");
-			end_request(CURRENT, 0);
+			end_request(req, 0);
 			break;
 		}
 	}
@@ -652,29 +659,19 @@
 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;
-	int dev;
+	struct hd_geometry g; 
 
-	if ((!inode) || kdev_none(inode->i_rdev))
+	if (cmd != HDIO_GETGEO)
 		return -EINVAL;
-	dev = DEVICE_NR(inode->i_rdev);
-	if (dev >= NR_HD)
+	if (!loc)
 		return -EINVAL;
-	switch (cmd) {
-		case HDIO_GETGEO:
-		{
-			struct hd_geometry g; 
-			if (!loc)  return -EINVAL;
-			g.heads = hd_info[dev].head;
-			g.sectors = hd_info[dev].sect;
-			g.cylinders = hd_info[dev].cyl;
-			g.start = get_start_sect(inode->i_bdev);
-			return copy_to_user(loc, &g, sizeof g) ? -EFAULT : 0; 
-		}
-
-		default:
-			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; 
 }
 
 /*
@@ -715,11 +712,11 @@
 		printk("hd: unable to get major %d for hard disk\n",MAJOR_NR);
 		return -1;
 	}
-	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_hd_request, &hd_lock);
-	blk_queue_max_sectors(BLK_DEFAULT_QUEUE(MAJOR_NR), 255);
+	blk_init_queue(&hd_queue, do_hd_request, &hd_lock);
+	blk_queue_max_sectors(&hd_queue, 255);
 	init_timer(&device_timer);
 	device_timer.function = hd_times_out;
-	blk_queue_hardsect_size(QUEUE, 512);
+	blk_queue_hardsect_size(&hd_queue, 512);
 
 #ifdef __i386__
 	if (!NR_HD) {
@@ -792,22 +789,21 @@
 
 	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 = MAJOR_NR;
 		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;
-	}
-	for (drive=0 ; drive < NR_HD ; drive++) {
-		sector_t size = hd_info[drive].head *
-			hd_info[drive].sect * hd_info[drive].cyl;
-		set_capacity(hd_gendisk[drive], size);
-		printk ("%s: %ldMB, CHS=%d/%d/%d\n",
-			hd_gendisk[drive]->disk_name,
-			size / 2048, hd_info[drive].cyl,
-			hd_info[drive].head, hd_info[drive].sect);
+		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)) {
@@ -824,11 +820,10 @@
 		goto out3;
 	}
 
-	for(drive=0; drive < NR_HD; drive++) {
-		struct hd_i_struct *p = hd_info + drive;
-		set_capacity(hd_gendisk[drive], p->head * p->sect * p->cyl);
+	/* Let them fly */
+	for(drive=0; drive < NR_HD; drive++)
 		add_disk(hd_gendisk[drive]);
-	}
+
 	return 0;
 
 out3:
@@ -842,7 +837,7 @@
 out:
 	del_timer(&device_timer);
 	unregister_blkdev(MAJOR_NR,"hd");
-	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+	blk_cleanup_queue(&hd_queue);
 	return -1;
 Enomem:
 	while (drive--)
diff -Nru a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
--- a/drivers/ide/pci/hpt366.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/ide/pci/hpt366.c	Wed Oct 30 16:44:29 2002
@@ -316,7 +316,7 @@
 #endif
 
 	reg2 = pci_bus_clock_list(speed,
-		(struct chipset_bus_clock_list_entry *) dev->driver_data);
+		(struct chipset_bus_clock_list_entry *) pci_get_drvdata(dev));
 	/*
 	 * Disable on-chip PIO FIFO/buffer
 	 *  (to avoid problems handling I/O errors later)
@@ -369,7 +369,7 @@
 
 	list_conf = pci_bus_clock_list(speed, 
 				       (struct chipset_bus_clock_list_entry *)
-				       dev->driver_data);
+				       pci_get_drvdata(dev));
 
 	pci_read_config_dword(dev, drive_pci, &drive_conf);
 	list_conf = (list_conf & ~conf_mask) | (drive_conf & conf_mask);
@@ -401,7 +401,7 @@
 					
 	list_conf = pci_bus_clock_list(speed,
 			(struct chipset_bus_clock_list_entry *)
-					dev->driver_data);
+					pci_get_drvdata(dev));
 	pci_read_config_dword(dev, drive_pci, &drive_conf);
 	list_conf = (list_conf & ~conf_mask) | (drive_conf & conf_mask);
 	if (speed < XFER_MW_DMA_0)
@@ -841,7 +841,7 @@
 	 * don't like to use the PLL because it will cause glitches
 	 * on PRST/SRST when the HPT state engine gets reset.
 	 */
-	if (dev->driver_data) 
+	if (pci_get_drvdata(dev)) 
 		goto init_hpt37X_done;
 	
 	/*
@@ -923,7 +923,7 @@
 			break;
 	}
 
-	if (!dev->driver_data)
+	if (!pci_get_drvdata(dev))
 	{
 		printk(KERN_ERR "hpt366: unknown bus timing.\n");
 		return -EOPNOTSUPP;
diff -Nru a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
--- a/drivers/ide/pci/siimage.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/ide/pci/siimage.c	Wed Oct 30 16:44:27 2002
@@ -30,8 +30,8 @@
 static char * print_siimage_get_info (char *buf, struct pci_dev *dev, int index)
 {
 	char *p		= buf;
-	u8 mmio		= (dev->driver_data != NULL) ? 1 : 0;
-	u32 bmdma	= (mmio) ? ((u32) dev->driver_data) :
+	u8 mmio		= (pci_get_drvdata(dev) != NULL) ? 1 : 0;
+	u32 bmdma	= (mmio) ? ((u32) pci_get_drvdata(dev)) :
 				    (pci_resource_start(dev, 4));
 
 	p += sprintf(p, "\nController: %d\n", index);
@@ -769,14 +769,14 @@
 	if ((dev->device == PCI_DEVICE_ID_SII_3112) && (!(class_rev)))
 		hwif->rqsize = 16;
 
-	if (dev->driver_data == NULL)
+	if (pci_get_drvdata(dev) == NULL)
 		return;
 	init_mmio_iops_siimage(hwif);
 }
 
 static unsigned int __init ata66_siimage (ide_hwif_t *hwif)
 {
-	if (hwif->pci_dev->driver_data == NULL) {
+	if (pci_get_drvdata(hwif->pci_dev) == NULL) {
 		u8 ata66 = 0;
 		pci_read_config_byte(hwif->pci_dev, SELREG(0), &ata66);
 		return (ata66 & 0x01) ? 1 : 0;
diff -Nru a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
--- a/drivers/ide/pci/sis5513.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/ide/pci/sis5513.c	Wed Oct 30 16:44:28 2002
@@ -10,7 +10,7 @@
  *
  * SiS Taiwan		: for direct support and hardware.
  * Daniela Engert	: for initial ATA100 advices and numerous others.
- * John Fremlin, Manfred Spraul :
+ * John Fremlin, Manfred Spraul, Dave Morgan :
  *			  for checking code correctness, providing patches.
  *
  *
@@ -244,6 +244,14 @@
 /*
  * Printing configuration
  */
+/* Used for chipset type printing at boot time */
+static char* chipset_capability[] = {
+	"ATA", "ATA 16",
+	"ATA 33", "ATA 66",
+	"ATA 100", "ATA 100",
+	"ATA 133", "ATA 133"
+};
+
 #if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS)
 #include <linux/stat.h>
 #include <linux/proc_fs.h>
@@ -284,13 +292,6 @@
 	"11 CLK", "12 CLK",
 	"13 CLK", "14 CLK",
 	"15 CLK", "16 CLK"
-};
-
-static char* chipset_capability[] = {
-	"ATA", "ATA 16",
-	"ATA 33", "ATA 66",
-	"ATA 100", "ATA 100",
-	"ATA 133", "ATA 133"
 };
 
 /* Generic add master or slave info function */
diff -Nru a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
--- a/drivers/ide/ppc/pmac.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/ide/ppc/pmac.c	Wed Oct 30 16:44:21 2002
@@ -1579,11 +1579,8 @@
 	 * Problem: This can schedule. I moved the block device
 	 * wakeup almost late by priority because of that.
 	 */
-	if (DRIVER(drive) && DRIVER(drive)->media_change)
-		DRIVER(drive)->media_change(drive);
-
-	/* We kick the VFS too (see fix in ide.c revalidate) */
-	check_disk_change(MKDEV(HWIF(drive)->major, (drive->select.b.unit) << PARTN_BITS));
+	if (DRIVER(drive))
+		check_disk_change(MKDEV(drive->disk->major, drive->disk->first_minor));
 	
 #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
 	/* We re-enable DMA on the drive if it was active. */
diff -Nru a/drivers/ieee1394/Config.help b/drivers/ieee1394/Config.help
--- a/drivers/ieee1394/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,126 +0,0 @@
-CONFIG_IEEE1394
-  IEEE 1394 describes a high performance serial bus, which is also
-  known as FireWire(tm) or i.Link(tm) and is used for connecting all
-  sorts of devices (most notably digital video cameras) to your
-  computer.
-
-  If you have FireWire hardware and want to use it, say Y here.  This
-  is the core support only, you will also need to select a driver for
-  your IEEE 1394 adapter.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ieee1394.o.
-
-CONFIG_IEEE1394_PCILYNX
-  Say Y here if you have an IEEE-1394 controller with the Texas
-  Instruments PCILynx chip.  Note: this driver is written for revision
-  2 of this chip and may not work with revision 0.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called pcilynx.o.
-
-CONFIG_IEEE1394_PCILYNX_LOCALRAM
-  This option makes the PCILynx driver use local RAM available on some
-  PCILynx setups for Packet Control Lists. Local RAM is random access
-  memory which resides on the PCILynx board as opposed to on your
-  computer's motherboard. Local RAM may speed up command processing
-  because no PCI transfers are necessary during use of the Packet
-  Control Lists.
-
-  Note that there are no known PCILynx systems providing local RAM
-  except for the evaluation boards by Texas Instruments and that the
-  PCILynx does not reliably report missing RAM. This means that it is
-  dangerous to say Y here if you are not absolutely sure that your
-  board provides 64KB of local RAM.
-
-  If unsure, say N.
-
-CONFIG_IEEE1394_PCILYNX_PORTS
-  This option enables driver code to access the RAM, ROM and AUX ports
-  of the PCILynx through character devices in /dev.  If you don't know
-  what this is about then you won't need it.
-
-  If unsure, say N.
-
-CONFIG_IEEE1394_OHCI1394
-  Enable this driver if you have an IEEE 1394 controller based on the
-  OHCI-1394 specification. The current driver is only tested with OHCI
-  chipsets made by Texas Instruments and NEC. Most third-party vendors
-  use one of these chipsets.  It should work with any OHCI-1394
-  compliant card, however.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ohci1394.o.
-
-CONFIG_IEEE1394_VIDEO1394
-  This option enables video device usage for OHCI-1394 cards.  Enable
-  this option only if you have an IEEE 1394 video device connected to
-  an OHCI-1394 card.
-
-CONFIG_IEEE1394_DV1394
-  This driver allows you to transmit and receive DV (digital video)
-  streams on an OHCI-1394 card using a simple frame-oriented
-  interface.
-
-  The user-space API for dv1394 is documented in dv1394.h.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called dv1394.o.
-
-CONFIG_IEEE1394_SBP2
-  This option enables you to use SBP-2 devices connected to your IEEE
-  1394 bus.  SBP-2 devices include harddrives and DVD devices.
-
-CONFIG_IEEE1394_RAWIO
-  Say Y here if you want support for the raw device. This is generally
-  a good idea, so you should say Y here. The raw device enables
-  direct communication of user programs with the IEEE 1394 bus and
-  thus with the attached peripherals.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called raw1394.o.
-
-CONFIG_IEEE1394_ETH1394
-  Extremely Experimental! This driver is a Linux specific way to use your
-  IEEE1394 Host as an Ethernet type device. This is _NOT_ IP1394.
-
-CONFIG_IEEE1394_AMDTP
-  This option enables the Audio & Music Data Transmission Protocol
-  (IEC61883-6) driver, which implements audio transmission over
-  IEEE1394.
-
-  The userspace interface is documented in amdtp.h.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called amdtp.o.
-
-CONFIG_IEEE1394_CMP
-  This option enables the Connection Management Procedures
-  (IEC61883-1) driver, which implements input and output plugs.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called amdtp.o.
-
-CONFIG_IEEE1394_VERBOSEDEBUG
-  If you say Y here, you will get very verbose debugging logs from the
-  subsystem which includes a dump of the header of every sent and
-  received packet.  This can amount to a high amount of data collected
-  in a very short time which is usually also saved to disk by the
-  system logging daemons.
-
-  Say Y if you really want or need the debugging output, everyone else
-  says N.
diff -Nru a/drivers/ieee1394/Config.in b/drivers/ieee1394/Config.in
--- a/drivers/ieee1394/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,45 +0,0 @@
-# -*- shell-script -*-
-
-if [ "$CONFIG_PCI" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
-    mainmenu_option next_comment
-    comment 'IEEE 1394 (FireWire) support (EXPERIMENTAL)'
-
-    dep_tristate 'IEEE 1394 (FireWire) support (EXPERIMENTAL)' CONFIG_IEEE1394 $CONFIG_PCI
-
-    if [ "$CONFIG_IEEE1394" != "n" ]; then
-
-	comment "Device Drivers"
-
-	if [ "$CONFIG_I2C" = "n" -o "$CONFIG_I2C_ALGOBIT" = "n" ]; then
-	    comment '  Texas Instruments PCILynx requires I2C bit-banging'
-	else
-	    dep_tristate '  Texas Instruments PCILynx support' CONFIG_IEEE1394_PCILYNX $CONFIG_IEEE1394 $CONFIG_I2C $CONFIG_I2C_ALGOBIT
-	fi
-
-	# Non-maintained pcilynx options
-	# if [ "$CONFIG_IEEE1394_PCILYNX" != "n" ]; then
-	#     bool '    Use PCILynx local RAM' CONFIG_IEEE1394_PCILYNX_LOCALRAM
-	#     bool '    Support for non-IEEE1394 local ports' CONFIG_IEEE1394_PCILYNX_PORTS
-	# fi
-
-	dep_tristate '  OHCI-1394 support' CONFIG_IEEE1394_OHCI1394 $CONFIG_IEEE1394
-
-	comment "Protocol Drivers"
-	dep_tristate '  OHCI-1394 Video support' CONFIG_IEEE1394_VIDEO1394 $CONFIG_IEEE1394_OHCI1394
-	dep_tristate '  SBP-2 support (Harddisks etc.)' CONFIG_IEEE1394_SBP2 $CONFIG_SCSI $CONFIG_IEEE1394
-	if [ "$CONFIG_IEEE1394_SBP2" != "n" ]; then
-	    bool '    Enable Phys DMA support for SBP2 (Debug)' CONFIG_IEEE1394_SBP2_PHYS_DMA
-	fi
-	dep_tristate '  Ethernet over 1394' CONFIG_IEEE1394_ETH1394 $CONFIG_IEEE1394
-	dep_tristate '  OHCI-DV I/O support' CONFIG_IEEE1394_DV1394 $CONFIG_IEEE1394_OHCI1394
-	dep_tristate '  Raw IEEE1394 I/O support' CONFIG_IEEE1394_RAWIO $CONFIG_IEEE1394
-	dep_tristate '  IEC61883-1 Plug support' CONFIG_IEEE1394_CMP $CONFIG_IEEE1394
-
-	if [ "$CONFIG_IEEE1394_CMP" != "n" ]; then
-	    dep_tristate '    IEC61883-6 (Audio transmission) support' CONFIG_IEEE1394_AMDTP $CONFIG_IEEE1394_OHCI1394 $CONFIG_IEEE1394_CMP
-	fi
-
-	bool 'Excessive debugging output' CONFIG_IEEE1394_VERBOSEDEBUG
-    fi
-    endmenu
-fi
diff -Nru a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,161 @@
+# -*- shell-script -*-
+
+menu "IEEE 1394 (FireWire) support (EXPERIMENTAL)"
+	depends on PCI && EXPERIMENTAL
+
+config IEEE1394
+	tristate "IEEE 1394 (FireWire) support (EXPERIMENTAL)"
+	---help---
+	  IEEE 1394 describes a high performance serial bus, which is also
+	  known as FireWire(tm) or i.Link(tm) and is used for connecting all
+	  sorts of devices (most notably digital video cameras) to your
+	  computer.
+
+	  If you have FireWire hardware and want to use it, say Y here.  This
+	  is the core support only, you will also need to select a driver for
+	  your IEEE 1394 adapter.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ieee1394.o.
+
+comment "Device Drivers"
+	depends on IEEE1394
+
+comment "Texas Instruments PCILynx requires I2C bit-banging"
+	depends on IEEE1394 && (I2C=n || I2C_ALGOBIT=n)
+
+config IEEE1394_PCILYNX
+	tristate "Texas Instruments PCILynx support"
+	depends on IEEE1394 && I2C_ALGOBIT
+	help
+	  Say Y here if you have an IEEE-1394 controller with the Texas
+	  Instruments PCILynx chip.  Note: this driver is written for revision
+	  2 of this chip and may not work with revision 0.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called pcilynx.o.
+
+# Non-maintained pcilynx options
+# if [ "$CONFIG_IEEE1394_PCILYNX" != "n" ]; then
+#     bool '    Use PCILynx local RAM' CONFIG_IEEE1394_PCILYNX_LOCALRAM
+#     bool '    Support for non-IEEE1394 local ports' CONFIG_IEEE1394_PCILYNX_PORTS
+# fi
+config IEEE1394_OHCI1394
+	tristate "OHCI-1394 support"
+	depends on IEEE1394
+	---help---
+	  Enable this driver if you have an IEEE 1394 controller based on the
+	  OHCI-1394 specification. The current driver is only tested with OHCI
+	  chipsets made by Texas Instruments and NEC. Most third-party vendors
+	  use one of these chipsets.  It should work with any OHCI-1394
+	  compliant card, however.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ohci1394.o.
+
+comment "Protocol Drivers"
+	depends on IEEE1394
+
+config IEEE1394_VIDEO1394
+	tristate "OHCI-1394 Video support"
+	depends on IEEE1394_OHCI1394
+	help
+	  This option enables video device usage for OHCI-1394 cards.  Enable
+	  this option only if you have an IEEE 1394 video device connected to
+	  an OHCI-1394 card.
+
+config IEEE1394_SBP2
+	tristate "SBP-2 support (Harddisks etc.)"
+	depends on SCSI && IEEE1394
+	help
+	  This option enables you to use SBP-2 devices connected to your IEEE
+	  1394 bus.  SBP-2 devices include harddrives and DVD devices.
+
+config IEEE1394_SBP2_PHYS_DMA
+	bool "Enable Phys DMA support for SBP2 (Debug)"
+	depends on IEEE1394_SBP2
+
+config IEEE1394_ETH1394
+	tristate "Ethernet over 1394"
+	depends on IEEE1394
+	help
+	  Extremely Experimental! This driver is a Linux specific way to use your
+	  IEEE1394 Host as an Ethernet type device. This is _NOT_ IP1394.
+
+config IEEE1394_DV1394
+	tristate "OHCI-DV I/O support"
+	depends on IEEE1394_OHCI1394
+	---help---
+	  This driver allows you to transmit and receive DV (digital video)
+	  streams on an OHCI-1394 card using a simple frame-oriented
+	  interface.
+
+	  The user-space API for dv1394 is documented in dv1394.h.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called dv1394.o.
+
+config IEEE1394_RAWIO
+	tristate "Raw IEEE1394 I/O support"
+	depends on IEEE1394
+	help
+	  Say Y here if you want support for the raw device. This is generally
+	  a good idea, so you should say Y here. The raw device enables
+	  direct communication of user programs with the IEEE 1394 bus and
+	  thus with the attached peripherals.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called raw1394.o.
+
+config IEEE1394_CMP
+	tristate "IEC61883-1 Plug support"
+	depends on IEEE1394
+	help
+	  This option enables the Connection Management Procedures
+	  (IEC61883-1) driver, which implements input and output plugs.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called amdtp.o.
+
+config IEEE1394_AMDTP
+	tristate "IEC61883-6 (Audio transmission) support"
+	depends on IEEE1394_OHCI1394 && IEEE1394_CMP
+	---help---
+	  This option enables the Audio & Music Data Transmission Protocol
+	  (IEC61883-6) driver, which implements audio transmission over
+	  IEEE1394.
+
+	  The userspace interface is documented in amdtp.h.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called amdtp.o.
+
+config IEEE1394_VERBOSEDEBUG
+	bool "Excessive debugging output"
+	depends on IEEE1394
+	help
+	  If you say Y here, you will get very verbose debugging logs from the
+	  subsystem which includes a dump of the header of every sent and
+	  received packet.  This can amount to a high amount of data collected
+	  in a very short time which is usually also saved to disk by the
+	  system logging daemons.
+
+	  Say Y if you really want or need the debugging output, everyone else
+	  says N.
+
+endmenu
+
diff -Nru a/drivers/ieee1394/ieee1394_types.h b/drivers/ieee1394/ieee1394_types.h
--- a/drivers/ieee1394/ieee1394_types.h	Wed Oct 30 16:44:30 2002
+++ b/drivers/ieee1394/ieee1394_types.h	Wed Oct 30 16:44:30 2002
@@ -7,6 +7,7 @@
 #include <linux/version.h>
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/string.h>
 #include <asm/byteorder.h>
 
 
diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
--- a/drivers/ieee1394/sbp2.c	Wed Oct 30 16:44:22 2002
+++ b/drivers/ieee1394/sbp2.c	Wed Oct 30 16:44:23 2002
@@ -333,11 +333,9 @@
 #ifdef CONFIG_KBUILD_2_5
 #include <scsi.h>
 #include <hosts.h>
-#include <sd.h>
 #else
 #include "../scsi/scsi.h"
 #include "../scsi/hosts.h"
-#include "../scsi/sd.h"
 #endif
 
 #include "ieee1394.h"
@@ -1512,7 +1510,7 @@
  * physical dma in hardware). Mostly just here for debugging...
  */
 static int sbp2_handle_physdma_write(struct hpsb_host *host, int nodeid, int destid, quadlet_t *data,
-                                     u64 addr, unsigned int length)
+                                     u64 addr, unsigned int length, u16 flags)
 {
 
         /*
@@ -1528,7 +1526,7 @@
  * physical dma in hardware). Mostly just here for debugging...
  */
 static int sbp2_handle_physdma_read(struct hpsb_host *host, int nodeid, quadlet_t *data,
-                                    u64 addr, unsigned int length)
+                                    u64 addr, unsigned int length, u16 flags)
 {
 
         /*
@@ -3139,24 +3137,27 @@
 /*
  * Called by scsi stack to get bios parameters (used by fdisk, and at boot).
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28)
-static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,44)
+static int sbp2scsi_biosparam (struct scsi_device *sdev,
+		struct block_device *dev, sector_t capacy, int geom[]) 
+{
 #else
-static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]) 
-#endif
+static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) 
 {
+	sector_t capacy = disk->capacity;
+#endif
 	int heads, sectors, cylinders;
 
 	SBP2_DEBUG("Request for bios parameters");
 
 	heads = 64;
 	sectors = 32;
-	cylinders = (int)disk->capacity / (heads * sectors);
+	cylinders = (int)capacity / (heads * sectors);
 
 	if (cylinders > 1024) {
 		heads = 255;
 		sectors = 63;
-		cylinders = (int)disk->capacity / (heads * sectors);
+		cylinders = (int)capacity / (heads * sectors);
 	}
 
 	geom[0] = heads;
diff -Nru a/drivers/input/Config.help b/drivers/input/Config.help
--- a/drivers/input/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,90 +0,0 @@
-CONFIG_INPUT
-  Say Y here if you have any input device (mouse, keyboard, tablet,
-  joystick, steering wheel ...) connected to your system and want
-  it to be available to applications. This includes standard PS/2
-  keyboard and mouse.
-
-  Say N here if you have a headless (no monitor, no keyboard) system.
-
-  More information is available: <file:Documentation/input/input.txt>
-
-  If unsure, say Y.
-
-  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 input.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_MOUSEDEV
-  Say Y here if you want your mouse to be accessible as char devices
-  13:32+ - /dev/input/mouseX and 13:63 - /dev/input/mice as an
-  emulated IntelliMouse Explorer PS/2 mouse. That way, all user space
-  programs (includung SVGAlib, GPM and X) will be able to use your
-  mouse.
-
-  If unsure, say Y.
-
-  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 mousedev.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_MOUSEDEV_SCREEN_X
-  If you're using a digitizer, or a graphic tablet, and want to use
-  it as a mouse then the mousedev driver needs to know the X window
-  screen resolution you are using to correctly scale the data. If
-  you're not using a digitizer, this value is ignored.
-
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y
-  If you're using a digitizer, or a graphic tablet, and want to use
-  it as a mouse then the mousedev driver needs to know the X window
-  screen resolution you are using to correctly scale the data. If
-  you're not using a digitizer, this value is ignored.
-
-CONFIG_INPUT_JOYDEV
-  Say Y here if you want your joystick or gamepad to be
-  accessible as char device 13:0+ - /dev/input/jsX device.
-
-  If unsure, say Y.
-
-  More information is available: <file:Documentation/input/joystick.txt>
-
-  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 joydev.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_TSDEV
-  Say Y here if you have an application that only can understand the
-  Compaq touchscreen protocol for absolute pointer data. This is
-  useful namely for embedded configurations.
-
-  If unsure, say N.
-
-  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 tsdev.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_EVDEV
-  Say Y here if you want your input device events be accessible
-  under char device 13:64+ - /dev/input/eventX in a generic way.
-
-  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 evdev.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_EVBUG
-  Say Y here if you have a problem with the input subsystem and
-  want all events (keypresses, mouse movements), to be output to
-  the system log. While this is useful for debugging, it's also
-  a security threat - your keypresses include your passwords, of
-  course.
-
-  If unsure, say N.
-
-  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 joydev.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/input/Config.in b/drivers/input/Config.in
--- a/drivers/input/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,40 +0,0 @@
-#
-# Input device configuration
-#
-
-mainmenu_option next_comment
-comment 'Input device support'
-
-define_tristate CONFIG_INPUT y
-
-comment 'Userland interfaces'
-dep_tristate '  Mouse interface' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT
-dep_mbool '    Provide legacy /dev/psaux device' CONFIG_INPUT_MOUSEDEV_PSAUX $CONFIG_INPUT_MOUSEDEV
-if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
-   int '   Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
-   int '   Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768
-fi
-dep_tristate '  Joystick interface' CONFIG_INPUT_JOYDEV $CONFIG_INPUT
-dep_tristate '  Touchscreen interface' CONFIG_INPUT_TSDEV $CONFIG_INPUT
-if [ "$CONFIG_INPUT_TSDEV" != "n" ]; then
-   int '   Horizontal screen resolution' CONFIG_INPUT_TSDEV_SCREEN_X 240
-   int '   Vertical screen resolution' CONFIG_INPUT_TSDEV_SCREEN_Y 320 
-fi
-dep_tristate '  Event interface' CONFIG_INPUT_EVDEV $CONFIG_INPUT
-dep_tristate '  Event debugging' CONFIG_INPUT_EVBUG $CONFIG_INPUT
-
-
-comment 'Input I/O drivers'
-source drivers/input/gameport/Config.in
-source drivers/input/serio/Config.in
-
-comment 'Input Device Drivers'
-if [ "$CONFIG_INPUT" != "n" ]; then
-   source drivers/input/keyboard/Config.in
-   source drivers/input/mouse/Config.in
-   source drivers/input/joystick/Config.in
-   source drivers/input/touchscreen/Config.in
-   source drivers/input/misc/Config.in
-fi
-
-endmenu
diff -Nru a/drivers/input/Kconfig b/drivers/input/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,159 @@
+#
+# Input device configuration
+#
+
+menu "Input device support"
+
+config INPUT
+	tristate
+	default y
+	---help---
+	  Say Y here if you have any input device (mouse, keyboard, tablet,
+	  joystick, steering wheel ...) connected to your system and want
+	  it to be available to applications. This includes standard PS/2
+	  keyboard and mouse.
+
+	  Say N here if you have a headless (no monitor, no keyboard) system.
+
+	  More information is available: <file:Documentation/input/input.txt>
+
+	  If unsure, say Y.
+
+	  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 input.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+comment "Userland interfaces"
+
+config INPUT_MOUSEDEV
+	tristate "Mouse interface"
+	depends on INPUT
+	---help---
+	  Say Y here if you want your mouse to be accessible as char devices
+	  13:32+ - /dev/input/mouseX and 13:63 - /dev/input/mice as an
+	  emulated IntelliMouse Explorer PS/2 mouse. That way, all user space
+	  programs (includung SVGAlib, GPM and X) will be able to use your
+	  mouse.
+
+	  If unsure, say Y.
+
+	  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 mousedev.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_MOUSEDEV_PSAUX
+	bool "Provide legacy /dev/psaux device"
+	depends on INPUT_MOUSEDEV
+
+config INPUT_MOUSEDEV_SCREEN_X
+	int "Horizontal screen resolution"
+	depends on INPUT_MOUSEDEV
+	default "1024"
+	help
+	  If you're using a digitizer, or a graphic tablet, and want to use
+	  it as a mouse then the mousedev driver needs to know the X window
+	  screen resolution you are using to correctly scale the data. If
+	  you're not using a digitizer, this value is ignored.
+
+config INPUT_MOUSEDEV_SCREEN_Y
+	int "Vertical screen resolution"
+	depends on INPUT_MOUSEDEV
+	default "768"
+	help
+	  If you're using a digitizer, or a graphic tablet, and want to use
+	  it as a mouse then the mousedev driver needs to know the X window
+	  screen resolution you are using to correctly scale the data. If
+	  you're not using a digitizer, this value is ignored.
+
+config INPUT_JOYDEV
+	tristate "Joystick interface"
+	depends on INPUT
+	---help---
+	  Say Y here if you want your joystick or gamepad to be
+	  accessible as char device 13:0+ - /dev/input/jsX device.
+
+	  If unsure, say Y.
+
+	  More information is available: <file:Documentation/input/joystick.txt>
+
+	  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 joydev.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_TSDEV
+	tristate "Touchscreen interface"
+	depends on INPUT
+	---help---
+	  Say Y here if you have an application that only can understand the
+	  Compaq touchscreen protocol for absolute pointer data. This is
+	  useful namely for embedded configurations.
+
+	  If unsure, say N.
+
+	  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 tsdev.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_TSDEV_SCREEN_X
+	int "Horizontal screen resolution"
+	depends on INPUT_TSDEV
+	default "240"
+
+config INPUT_TSDEV_SCREEN_Y
+	int "Vertical screen resolution"
+	depends on INPUT_TSDEV
+	default "320"
+
+config INPUT_EVDEV
+	tristate "Event interface"
+	depends on INPUT
+	help
+	  Say Y here if you want your input device events be accessible
+	  under char device 13:64+ - /dev/input/eventX in a generic way.
+
+	  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 evdev.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_EVBUG
+	tristate "Event debugging"
+	depends on INPUT
+	---help---
+	  Say Y here if you have a problem with the input subsystem and
+	  want all events (keypresses, mouse movements), to be output to
+	  the system log. While this is useful for debugging, it's also
+	  a security threat - your keypresses include your passwords, of
+	  course.
+
+	  If unsure, say N.
+
+	  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 joydev.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+comment "Input I/O drivers"
+
+source "drivers/input/gameport/Kconfig"
+
+source "drivers/input/serio/Kconfig"
+
+comment "Input Device Drivers"
+
+source "drivers/input/keyboard/Kconfig"
+
+source "drivers/input/mouse/Kconfig"
+
+source "drivers/input/joystick/Kconfig"
+
+source "drivers/input/touchscreen/Kconfig"
+
+source "drivers/input/misc/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/input/gameport/Config.help b/drivers/input/gameport/Config.help
--- a/drivers/input/gameport/Config.help	Wed Oct 30 16:44:25 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,62 +0,0 @@
-CONFIG_GAMEPORT
-  Gameport support is for the standard 15-pin PC gameport. If you
-  have a joystick, gamepad, gameport card, a soundcard with a gameport
-  or anything else that uses the gameport, say Y or M here and also to
-  at least one of the hardware specific drivers.
-
-  For Ensoniq AudioPCI (ES1370), AudioPCI 97 (ES1371), ESS Solo1,
-  S3 SonicVibes, Trident 4DWave, SiS7018, and ALi 5451 gameport
-  support is provided by the sound drivers, so you won't need any
-  from the below listed modules. You still need to say Y here.
-
-  If unsure, say Y.
-
-  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 gameport.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GAMEPORT_NS558
-  Say Y here if you have an ISA or PnP gameport.
-
-  If unsure, say Y.
-
-  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 ns558.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GAMEPORT_L4
-  Say Y here if you have a PDPI Lightning 4 gamecard.
-
-  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 lightning.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GAMEPORT_EMU10K1
-  Say Y here if you have a SoundBlaster Live! or SoundBlaster
-  Audigy card and want to use its gameport.
-
-  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 emu10k1-gp.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GAMEPORT_VORTEX
-  Say Y here if you have an Aureal Vortex 1 or 2  card and want
-  to use its gameport.
-
-  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 vortex.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GAMEPORT_CS461X
-  Say Y here if you have a Cirrus CS461x aka "Crystal SoundFusion"
-  PCI audio accelerator and want to use its gameport.
-
-  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 cs461x.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/input/gameport/Config.in b/drivers/input/gameport/Config.in
--- a/drivers/input/gameport/Config.in	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,19 +0,0 @@
-#
-# Gameport configuration
-#
-
-tristate 'Gameport support' CONFIG_GAMEPORT
-
-if [ "$CONFIG_GAMEPORT" = "m" ]; then
-	define_tristate CONFIG_SOUND_GAMEPORT m
-fi
-if [ "$CONFIG_GAMEPORT" != "m" ]; then
-	define_tristate CONFIG_SOUND_GAMEPORT y
-fi
-
-dep_tristate '  Classic ISA and PnP gameport support' CONFIG_GAMEPORT_NS558 $CONFIG_GAMEPORT
-dep_tristate '  PDPI Lightning 4 gamecard support' CONFIG_GAMEPORT_L4 $CONFIG_GAMEPORT
-dep_tristate '  SB Live and Audigy gameport support' CONFIG_GAMEPORT_EMU10K1 $CONFIG_GAMEPORT
-dep_tristate '  Aureal Vortex, Vortex 2 gameport support' CONFIG_GAMEPORT_VORTEX $CONFIG_GAMEPORT
-dep_tristate '  ForteMedia FM801 gameport support' CONFIG_GAMEPORT_FM801 $CONFIG_GAMEPORT
-dep_tristate '  Crystal SoundFusion gameport support' CONFIG_GAMEPORT_CS461x $CONFIG_GAMEPORT
diff -Nru a/drivers/input/gameport/Kconfig b/drivers/input/gameport/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/gameport/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,84 @@
+#
+# Gameport configuration
+#
+config GAMEPORT
+	tristate "Gameport support"
+	---help---
+	  Gameport support is for the standard 15-pin PC gameport. If you
+	  have a joystick, gamepad, gameport card, a soundcard with a gameport
+	  or anything else that uses the gameport, say Y or M here and also to
+	  at least one of the hardware specific drivers.
+
+	  For Ensoniq AudioPCI (ES1370), AudioPCI 97 (ES1371), ESS Solo1,
+	  S3 SonicVibes, Trident 4DWave, SiS7018, and ALi 5451 gameport
+	  support is provided by the sound drivers, so you won't need any
+	  from the below listed modules. You still need to say Y here.
+
+	  If unsure, say Y.
+
+	  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 gameport.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SOUND_GAMEPORT
+	tristate
+	default y if GAMEPORT!=m
+	default m if GAMEPORT=m
+
+config GAMEPORT_NS558
+	tristate "Classic ISA and PnP gameport support"
+	depends on GAMEPORT
+	help
+	  Say Y here if you have an ISA or PnP gameport.
+
+	  If unsure, say Y.
+
+	  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 ns558.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config GAMEPORT_L4
+	tristate "PDPI Lightning 4 gamecard support"
+	depends on GAMEPORT
+	help
+	  Say Y here if you have a PDPI Lightning 4 gamecard.
+
+	  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 lightning.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config GAMEPORT_EMU10K1
+	tristate "SB Live and Audigy gameport support"
+	depends on GAMEPORT
+	help
+	  Say Y here if you have a SoundBlaster Live! or SoundBlaster
+	  Audigy card and want to use its gameport.
+
+	  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 emu10k1-gp.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config GAMEPORT_VORTEX
+	tristate "Aureal Vortex, Vortex 2 gameport support"
+	depends on GAMEPORT
+	help
+	  Say Y here if you have an Aureal Vortex 1 or 2  card and want
+	  to use its gameport.
+
+	  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 vortex.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config GAMEPORT_FM801
+	tristate "ForteMedia FM801 gameport support"
+	depends on GAMEPORT
+
+config GAMEPORT_CS461x
+	tristate "Crystal SoundFusion gameport support"
+	depends on GAMEPORT
+
diff -Nru a/drivers/input/joystick/Config.help b/drivers/input/joystick/Config.help
--- a/drivers/input/joystick/Config.help	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,223 +0,0 @@
-CONFIG_INPUT_JOYSTICK
-  If you have a joystick, 6dof controller, gamepad, steering wheel,
-  weapon control system or something like that you can say Y here
-  and the list of supported devices will be displayed. This option
-  doesn't affect the kernel.
-
-  Please read the file <file:Documentation/input/joystick.txt> which
-  contains more information.
-
-CONFIG_JOYSTICK_ANALOG
-  Say Y here if you have a joystick that connects to the PC
-  gameport. In addition to the usual PC analog joystick, this driver
-  supports many extensions, including joysticks with throttle control,
-  with rudders, additional hats and buttons compatible with CH
-  Flightstick Pro, ThrustMaster FCS, 6 and 8 button gamepads, or
-  Saitek Cyborg joysticks. 
-
-  Please read the file <file:Documentation/input/joystick.txt> which
-  contains more information.
-
-  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 analog.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_A3D
-  Say Y here if you have an FPGaming or MadCatz controller using the
-  A3D protocol over the PC gameport. 
-
-  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 a3d.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_ADI
-  Say Y here if you have a Logitech controller using the ADI
-  protocol over the PC gameport. 
-
-  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 adi.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_COBRA
-  Say Y here if you have a Creative Labs Blaster Cobra gamepad.
-
-  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 cobra.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_GF2K
-  Say Y here if you have a Genius Flight2000 or MaxFighter digitally
-  communicating joystick or gamepad.
-
-  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 gf2k.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_GRIP
-  Say Y here if you have a Gravis controller using the GrIP protocol
-  over the PC gameport. 
-
-  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 grip.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_GRIP_MP
-  Say Y here if you have the original Gravis GrIP MultiPort, a hub
-  that connects to the gameport and you connect gamepads to it.
-
-  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 grip_mp.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_GUILLEMOT
-  Say Y here if you have a Guillemot joystick using a digital
-  protocol over the PC gameport. 
-
-  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 guillemot.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_INTERACT
-  Say Y here if you have an InterAct gameport or joystick
-  communicating digitally over the gameport.
-
-  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 interact.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_SIDEWINDER
-  Say Y here if you have a Microsoft controller using the Digital
-  Overdrive protocol over PC gameport.
-
-  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 sidewinder.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_TMDC
-  Say Y here if you have a ThrustMaster controller using the
-  DirectConnect (BSP) protocol over the PC gameport. 
-
-  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 tmdc.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_WARRIOR
-  Say Y here if you have a Logitech WingMan Warrior joystick connected
-  to your computer's serial port. 
-
-  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 warrior.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_MAGELLAN
-  Say Y here if you have a Magellan or Space Mouse 6DOF controller
-  connected to your computer's serial port.
-
-  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 magellan.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_SPACEORB
-  Say Y here if you have a SpaceOrb 360 or SpaceBall Avenger 6DOF
-  controller connected to your computer's serial port.
-
-  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 spaceorb.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_SPACEBALL
-  Say Y here if you have a SpaceTec SpaceBall 2003/3003/4000 FLX
-  controller connected to your computer's serial port. For the
-  SpaceBall 4000 USB model, use the USB HID driver.
-
-  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 spaceball.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_STINGER
-  Say Y here if you have a Gravis Stinger connected to one of your
-  serial ports.
-
-  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 stinger.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_TWIDDLER
-  Say Y here if you have a Handykey Twiddler connected to your
-  computer's serial port and want to use it as a joystick.
-
-  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 twidjoy.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_DB9
-  Say Y here if you have a Sega Master System gamepad, Sega Genesis
-  gamepad, Sega Saturn gamepad, or a Multisystem -- Atari, Amiga,
-  Commodore, Amstrad CPC joystick connected to your parallel port.
-  For more information on how to use the driver please read
-  <file:Documentation/input/joystick-parport.txt>.
-
-  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 db9.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_GAMECON
-  Say Y here if you have a Nintendo Entertainment System gamepad,
-  Super Nintendo Entertainment System gamepad, Nintendo 64 gamepad,
-  Sony PlayStation gamepad or a Multisystem -- Atari, Amiga,
-  Commodore, Amstrad CPC joystick connected to your parallel port.
-  For more information on how to use the driver please read
-  <file:Documentation/input/joystick-parport.txt>.
-
-  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 gamecon.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_TURBOGRAFX
-  Say Y here if you have the TurboGraFX interface by Steffen Schwenke,
-  and want to use it with Multisystem -- Atari, Amiga, Commodore,
-  Amstrad CPC joystick. For more information on how to use the driver
-  please read <file:Documentation/input/joystick-parport.txt>.
-
-  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 turbografx.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_AMIGA
-  Say Y here if you have an Amiga with a digital joystick connected
-  to it.
-
-  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 amijoy.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_JOYDUMP
-  Say Y here if you want to dump data from your joystick into the system
-  log for debugging purposes. Say N if you are making a production
-  configuration or aren't sure. 
-
-  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 joydump.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/input/joystick/Config.in b/drivers/input/joystick/Config.in
--- a/drivers/input/joystick/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,34 +0,0 @@
-#
-# Joystick driver configuration
-#
-
-bool 'Joysticks' CONFIG_INPUT_JOYSTICK
-
-dep_tristate '  Classic PC analog joysticks and gamepads' CONFIG_JOYSTICK_ANALOG $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Assasin 3D and MadCatz Panther devices' CONFIG_JOYSTICK_A3D $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Logitech ADI digital joysticks and gamepads' CONFIG_JOYSTICK_ADI $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Creative Labs Blaster Cobra gamepad' CONFIG_JOYSTICK_COBRA $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Genius Flight2000 Digital joysticks and gamepads' CONFIG_JOYSTICK_GF2K $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Gravis GrIP joysticks and gamepads' CONFIG_JOYSTICK_GRIP $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Gravis GrIP MultiPort' CONFIG_JOYSTICK_GRIP_MP $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Guillemot joysticks and gamepads' CONFIG_JOYSTICK_GUILLEMOT $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  InterAct digital joysticks and gamepads' CONFIG_JOYSTICK_INTERACT $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  Microsoft SideWinder digital joysticks and gamepads' CONFIG_JOYSTICK_SIDEWINDER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-dep_tristate '  ThrustMaster DirectConnect joysticks and gamepads' CONFIG_JOYSTICK_TMDC $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT
-source drivers/input/joystick/iforce/Config.in
-dep_tristate '  Logitech WingMan Warrior joystick' CONFIG_JOYSTICK_WARRIOR $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
-dep_tristate '  LogiCad3d Magellan/SpaceMouse 6dof controllers' CONFIG_JOYSTICK_MAGELLAN $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
-dep_tristate '  SpaceTec SpaceOrb/Avenger 6dof controllers' CONFIG_JOYSTICK_SPACEORB $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
-dep_tristate '  SpaceTec SpaceBall 6dof controllers' CONFIG_JOYSTICK_SPACEBALL $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
-dep_tristate '  Gravis Stinger gamepad' CONFIG_JOYSTICK_STINGER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
-dep_tristate '  Twiddler as a joystick' CONFIG_JOYSTICK_TWIDDLER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO
-
-dep_tristate '  Multisystem, Sega Genesis, Saturn joysticks and gamepads' CONFIG_JOYSTICK_DB9 $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT
-dep_tristate '  Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_JOYSTICK_GAMECON $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT
-dep_tristate '  Multisystem joysticks via TurboGraFX device' CONFIG_JOYSTICK_TURBOGRAFX $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT
-
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   dep_tristate '  Amiga joysticks' CONFIG_JOYSTICK_AMIGA $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK
-fi
-
-dep_tristate '  Gameport data dumper' CONFIG_INPUT_JOYDUMP $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK
diff -Nru a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/joystick/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,298 @@
+#
+# Joystick driver configuration
+#
+config INPUT_JOYSTICK
+	bool "Joysticks"
+	depends on INPUT
+	help
+	  If you have a joystick, 6dof controller, gamepad, steering wheel,
+	  weapon control system or something like that you can say Y here
+	  and the list of supported devices will be displayed. This option
+	  doesn't affect the kernel.
+
+	  Please read the file <file:Documentation/input/joystick.txt> which
+	  contains more information.
+
+config JOYSTICK_ANALOG
+	tristate "Classic PC analog joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	---help---
+	  Say Y here if you have a joystick that connects to the PC
+	  gameport. In addition to the usual PC analog joystick, this driver
+	  supports many extensions, including joysticks with throttle control,
+	  with rudders, additional hats and buttons compatible with CH
+	  Flightstick Pro, ThrustMaster FCS, 6 and 8 button gamepads, or
+	  Saitek Cyborg joysticks. 
+
+	  Please read the file <file:Documentation/input/joystick.txt> which
+	  contains more information.
+
+	  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 analog.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_A3D
+	tristate "Assasin 3D and MadCatz Panther devices"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have an FPGaming or MadCatz controller using the
+	  A3D protocol over the PC gameport. 
+
+	  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 a3d.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_ADI
+	tristate "Logitech ADI digital joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a Logitech controller using the ADI
+	  protocol over the PC gameport. 
+
+	  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 adi.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_COBRA
+	tristate "Creative Labs Blaster Cobra gamepad"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a Creative Labs Blaster Cobra gamepad.
+
+	  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 cobra.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_GF2K
+	tristate "Genius Flight2000 Digital joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a Genius Flight2000 or MaxFighter digitally
+	  communicating joystick or gamepad.
+
+	  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 gf2k.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_GRIP
+	tristate "Gravis GrIP joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a Gravis controller using the GrIP protocol
+	  over the PC gameport. 
+
+	  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 grip.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_GRIP_MP
+	tristate "Gravis GrIP MultiPort"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have the original Gravis GrIP MultiPort, a hub
+	  that connects to the gameport and you connect gamepads to it.
+
+	  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 grip_mp.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_GUILLEMOT
+	tristate "Guillemot joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a Guillemot joystick using a digital
+	  protocol over the PC gameport. 
+
+	  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 guillemot.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_INTERACT
+	tristate "InterAct digital joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have an InterAct gameport or joystick
+	  communicating digitally over the gameport.
+
+	  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 interact.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_SIDEWINDER
+	tristate "Microsoft SideWinder digital joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a Microsoft controller using the Digital
+	  Overdrive protocol over PC gameport.
+
+	  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 sidewinder.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_TMDC
+	tristate "ThrustMaster DirectConnect joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && GAMEPORT
+	help
+	  Say Y here if you have a ThrustMaster controller using the
+	  DirectConnect (BSP) protocol over the PC gameport. 
+
+	  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 tmdc.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+source "drivers/input/joystick/iforce/Kconfig"
+
+config JOYSTICK_WARRIOR
+	tristate "Logitech WingMan Warrior joystick"
+	depends on INPUT && INPUT_JOYSTICK && SERIO
+	help
+	  Say Y here if you have a Logitech WingMan Warrior joystick connected
+	  to your computer's serial port. 
+
+	  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 warrior.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_MAGELLAN
+	tristate "LogiCad3d Magellan/SpaceMouse 6dof controllers"
+	depends on INPUT && INPUT_JOYSTICK && SERIO
+	help
+	  Say Y here if you have a Magellan or Space Mouse 6DOF controller
+	  connected to your computer's serial port.
+
+	  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 magellan.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_SPACEORB
+	tristate "SpaceTec SpaceOrb/Avenger 6dof controllers"
+	depends on INPUT && INPUT_JOYSTICK && SERIO
+	help
+	  Say Y here if you have a SpaceOrb 360 or SpaceBall Avenger 6DOF
+	  controller connected to your computer's serial port.
+
+	  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 spaceorb.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_SPACEBALL
+	tristate "SpaceTec SpaceBall 6dof controllers"
+	depends on INPUT && INPUT_JOYSTICK && SERIO
+	help
+	  Say Y here if you have a SpaceTec SpaceBall 2003/3003/4000 FLX
+	  controller connected to your computer's serial port. For the
+	  SpaceBall 4000 USB model, use the USB HID driver.
+
+	  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 spaceball.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_STINGER
+	tristate "Gravis Stinger gamepad"
+	depends on INPUT && INPUT_JOYSTICK && SERIO
+	help
+	  Say Y here if you have a Gravis Stinger connected to one of your
+	  serial ports.
+
+	  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 stinger.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_TWIDDLER
+	tristate "Twiddler as a joystick"
+	depends on INPUT && INPUT_JOYSTICK && SERIO
+	help
+	  Say Y here if you have a Handykey Twiddler connected to your
+	  computer's serial port and want to use it as a joystick.
+
+	  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 twidjoy.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_DB9
+	tristate "Multisystem, Sega Genesis, Saturn joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && PARPORT
+	---help---
+	  Say Y here if you have a Sega Master System gamepad, Sega Genesis
+	  gamepad, Sega Saturn gamepad, or a Multisystem -- Atari, Amiga,
+	  Commodore, Amstrad CPC joystick connected to your parallel port.
+	  For more information on how to use the driver please read
+	  <file:Documentation/input/joystick-parport.txt>.
+
+	  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 db9.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_GAMECON
+	tristate "Multisystem, NES, SNES, N64, PSX joysticks and gamepads"
+	depends on INPUT && INPUT_JOYSTICK && PARPORT
+	---help---
+	  Say Y here if you have a Nintendo Entertainment System gamepad,
+	  Super Nintendo Entertainment System gamepad, Nintendo 64 gamepad,
+	  Sony PlayStation gamepad or a Multisystem -- Atari, Amiga,
+	  Commodore, Amstrad CPC joystick connected to your parallel port.
+	  For more information on how to use the driver please read
+	  <file:Documentation/input/joystick-parport.txt>.
+
+	  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 gamecon.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_TURBOGRAFX
+	tristate "Multisystem joysticks via TurboGraFX device"
+	depends on INPUT && INPUT_JOYSTICK && PARPORT
+	help
+	  Say Y here if you have the TurboGraFX interface by Steffen Schwenke,
+	  and want to use it with Multisystem -- Atari, Amiga, Commodore,
+	  Amstrad CPC joystick. For more information on how to use the driver
+	  please read <file:Documentation/input/joystick-parport.txt>.
+
+	  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 turbografx.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_AMIGA
+	tristate "Amiga joysticks"
+	depends on AMIGA && INPUT && INPUT_JOYSTICK
+	help
+	  Say Y here if you have an Amiga with a digital joystick connected
+	  to it.
+
+	  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 amijoy.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_JOYDUMP
+	tristate "Gameport data dumper"
+	depends on INPUT && INPUT_JOYSTICK
+	help
+	  Say Y here if you want to dump data from your joystick into the system
+	  log for debugging purposes. Say N if you are making a production
+	  configuration or aren't sure. 
+
+	  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 joydump.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/input/joystick/iforce/Config.help b/drivers/input/joystick/iforce/Config.help
--- a/drivers/input/joystick/iforce/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-CONFIG_JOYSTICK_IFORCE
-  Say Y here if you have an I-Force joystick or steering wheel
-
-  You also must choose at least one of the two options below.
-
-  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 iforce.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_JOYSTICK_IFORCE_USB
-  Say Y here if you have an I-Force joystick or steering wheel
-  connected to your USB port. 
-
-CONFIG_JOYSTICK_IFORCE_232
-  Say Y here if you have an I-Force joystick or steering wheel
-  connected to your serial (COM) port.
-
-  You will need an additional utility called inputattach, see
-  Documentation/input/joystick.txt and ff.txt.
-
diff -Nru a/drivers/input/joystick/iforce/Config.in b/drivers/input/joystick/iforce/Config.in
--- a/drivers/input/joystick/iforce/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,14 +0,0 @@
-#
-# I-Force driver configuration
-#
-
-dep_tristate '  I-Force devices' CONFIG_JOYSTICK_IFORCE $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK
-
-if [ "$CONFIG_JOYSTICK_IFORCE" = "m" -o "$CONFIG_JOYSTICK_IFORCE" = "y" ]; then
-	if [ "$CONFIG_JOYSTICK_IFORCE" = "m" -o "$CONFIG_USB" = "y" ]; then
-		dep_mbool '    I-Force USB joysticks and wheels' CONFIG_JOYSTICK_IFORCE_USB $CONFIG_USB
-	fi
-	if [ "$CONFIG_JOYSTICK_IFORCE" = "m" -o "$CONFIG_SERIO" = "y" ]; then
-		dep_mbool '    I-Force Serial joysticks and wheels' CONFIG_JOYSTICK_IFORCE_232 $CONFIG_SERIO
-	fi
-fi
diff -Nru a/drivers/input/joystick/iforce/Kconfig b/drivers/input/joystick/iforce/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/joystick/iforce/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,33 @@
+#
+# I-Force driver configuration
+#
+config JOYSTICK_IFORCE
+	tristate "I-Force devices"
+	depends on INPUT && INPUT_JOYSTICK
+	help
+	  Say Y here if you have an I-Force joystick or steering wheel
+
+	  You also must choose at least one of the two options below.
+
+	  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 iforce.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config JOYSTICK_IFORCE_USB
+	bool "I-Force USB joysticks and wheels"
+	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || USB=y) && USB
+	help
+	  Say Y here if you have an I-Force joystick or steering wheel
+	  connected to your USB port. 
+
+config JOYSTICK_IFORCE_232
+	bool "I-Force Serial joysticks and wheels"
+	depends on JOYSTICK_IFORCE && (JOYSTICK_IFORCE=m || SERIO=y) && SERIO
+	help
+	  Say Y here if you have an I-Force joystick or steering wheel
+	  connected to your serial (COM) port.
+
+	  You will need an additional utility called inputattach, see
+	  Documentation/input/joystick.txt and ff.txt.
+
diff -Nru a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c
--- a/drivers/input/joystick/iforce/iforce-usb.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/input/joystick/iforce/iforce-usb.c	Wed Oct 30 16:44:32 2002
@@ -77,9 +77,32 @@
 static void iforce_usb_irq(struct urb *urb)
 {
 	struct iforce *iforce = urb->context;
-	if (urb->status) return;
+	int status;
+
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d",
+		    __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - urb has status of: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
+
 	iforce_process_packet(iforce,
 		(iforce->data[0] << 8) | (urb->actual_length - 1), iforce->data + 1);
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 static void iforce_usb_out(struct urb *urb)
diff -Nru a/drivers/input/keyboard/Config.help b/drivers/input/keyboard/Config.help
--- a/drivers/input/keyboard/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,66 +0,0 @@
-CONFIG_INPUT_KEYBOARD
-  Say Y here, and a list of supported keyboards will be displayed.
-  This option doesn't affect the kernel.
-
-  If unsure, say Y.
-
-CONFIG_KEYBOARD_ATKBD
-  Say Y here if you want to use the standard AT keyboard. Usually
-  you'll need this, unless you have a different type keyboard (USB,
-  ADB or other). This also works for AT keyboards connected over
-  a PS/2 to serial converter.
-
-  If unsure, say Y.
-
-  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 atkbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_KEYBOARD_SUNKBD
-  Say Y here if you want to use a Sun Type 4 or Type 5 keyboard,
-  connected either to the Sun keyboard connector or to an serial
-  (RS-232) port via a simple adapter.
-
-  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 sunkbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_KEYBOARD_XTKBD
-  Say Y here if you want to use the old IBM PC/XT keyboard (or
-  compatible) on your system. This is only possible with a
-  parallel port keyboard adapter, you cannot connect it to the
-  keyboard port on a PC that runs Linux. 
-
-  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 xtkbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_KEYBOARD_NEWTON
-  Say Y here if you have a Newton keyboard on a serial port.
-
-  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 maple_keyb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_KEYBOARD_MAPLE  
-  Say Y here if you have a DreamCast console running Linux and have
-  a keyboard attached to its Maple bus.
-
-  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 maple_keyb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_KEYBOARD_AMIGA
-  Say Y here if you are running Linux on any AMIGA and have a keyboard
-  attached.	
-
-  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 amikbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/input/keyboard/Config.in b/drivers/input/keyboard/Config.in
--- a/drivers/input/keyboard/Config.in	Wed Oct 30 16:44:35 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-#
-# Input core configuration
-#
-
-bool 'Keyboards' CONFIG_INPUT_KEYBOARD
-
-dep_tristate '  AT keyboard support' CONFIG_KEYBOARD_ATKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
-dep_tristate '  Sun Type 4 and Type 5 keyboard support' CONFIG_KEYBOARD_SUNKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
-dep_tristate '  XT Keyboard support' CONFIG_KEYBOARD_XTKBD $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
-dep_tristate '  Newton keyboard' CONFIG_KEYBOARD_NEWTON $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_SERIO
-
-if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
-   dep_tristate '  Maple bus keyboard support' CONFIG_KEYBOARD_MAPLE $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD $CONFIG_MAPLE
-fi
-
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   dep_tristate '  Amiga keyboard' CONFIG_KEYBOARD_AMIGA $CONFIG_INPUT $CONFIG_INPUT_KEYBOARD
-fi
diff -Nru a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/keyboard/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,90 @@
+#
+# Input core configuration
+#
+config INPUT_KEYBOARD
+	bool "Keyboards"
+	depends on INPUT
+	help
+	  Say Y here, and a list of supported keyboards will be displayed.
+	  This option doesn't affect the kernel.
+
+	  If unsure, say Y.
+
+config KEYBOARD_ATKBD
+	tristate "AT keyboard support"
+	depends on INPUT && INPUT_KEYBOARD && SERIO
+	---help---
+	  Say Y here if you want to use the standard AT keyboard. Usually
+	  you'll need this, unless you have a different type keyboard (USB,
+	  ADB or other). This also works for AT keyboards connected over
+	  a PS/2 to serial converter.
+
+	  If unsure, say Y.
+
+	  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 atkbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config KEYBOARD_SUNKBD
+	tristate "Sun Type 4 and Type 5 keyboard support"
+	depends on INPUT && INPUT_KEYBOARD && SERIO
+	help
+	  Say Y here if you want to use a Sun Type 4 or Type 5 keyboard,
+	  connected either to the Sun keyboard connector or to an serial
+	  (RS-232) port via a simple adapter.
+
+	  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 sunkbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config KEYBOARD_XTKBD
+	tristate "XT Keyboard support"
+	depends on INPUT && INPUT_KEYBOARD && SERIO
+	help
+	  Say Y here if you want to use the old IBM PC/XT keyboard (or
+	  compatible) on your system. This is only possible with a
+	  parallel port keyboard adapter, you cannot connect it to the
+	  keyboard port on a PC that runs Linux. 
+
+	  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 xtkbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config KEYBOARD_NEWTON
+	tristate "Newton keyboard"
+	depends on INPUT && INPUT_KEYBOARD && SERIO
+	help
+	  Say Y here if you have a Newton keyboard on a serial port.
+
+	  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 maple_keyb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config KEYBOARD_MAPLE
+	tristate "Maple bus keyboard support"
+	depends on SH_DREAMCAST && INPUT && INPUT_KEYBOARD && MAPLE
+	help
+	  Say Y here if you have a DreamCast console running Linux and have
+	  a keyboard attached to its Maple bus.
+
+	  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 maple_keyb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config KEYBOARD_AMIGA
+	tristate "Amiga keyboard"
+	depends on AMIGA && INPUT && INPUT_KEYBOARD
+	help
+	  Say Y here if you are running Linux on any AMIGA and have a keyboard
+	  attached.	
+
+	  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 amikbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/input/misc/Config.help b/drivers/input/misc/Config.help
--- a/drivers/input/misc/Config.help	Wed Oct 30 16:44:35 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-CONFIG_INPUT_MISC
-
-  Say Y here, and a list of miscellaneous input drivers will be displayed.
-  Everything that didn't fit into the other categories is here. This option
-  doesn't affect the kernel.
-
-  If unsure, say Y.
-
-CONFIG_INPUT_PCSPKR
-  Say Y here if you want the standard PC Speaker to be used for
-  bells and whistles.
-
-  If unsure, say Y.
-
-  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 pcspkr.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_INPUT_SPARCSPKR
-  Say Y here if you want the standard Speaker on Sparc PCI systems
-  to be used for bells and whistles.
-
-  If unsure, say Y.
-
-  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 pcspkr.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-
-CONFIG_INPUT_UINPUT
-  Say Y here if you want to support user level drivers for input
-  subsystem accessible under char device 10:223 - /dev/input/uinput.
-
-  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 uinput.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.	    
diff -Nru a/drivers/input/misc/Config.in b/drivers/input/misc/Config.in
--- a/drivers/input/misc/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,14 +0,0 @@
-#
-# Input misc drivers configuration
-#
-
-bool 'Misc' CONFIG_INPUT_MISC
-
-dep_tristate '  PC Speaker support' CONFIG_INPUT_PCSPKR $CONFIG_INPUT $CONFIG_INPUT_MISC
-if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-   dep_tristate '  SPARC Speaker support' CONFIG_INPUT_SPARCSPKR $CONFIG_INPUT $CONFIG_INPUT_MISC
-fi
-if [ "$CONFIG_M68K" = "y" ]; then
-dep_tristate '  M68k Beeper support' CONFIG_INPUT_M68K_BEEP $CONFIG_INPUT $CONFIG_INPUT_MISC
-fi
-dep_tristate '  User level driver support' CONFIG_INPUT_UINPUT $CONFIG_INPUT $CONFIG_INPUT_MISC
diff -Nru a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/misc/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,58 @@
+#
+# Input misc drivers configuration
+#
+config INPUT_MISC
+	bool "Misc"
+	depends on INPUT
+	help
+
+	  Say Y here, and a list of miscellaneous input drivers will be displayed.
+	  Everything that didn't fit into the other categories is here. This option
+	  doesn't affect the kernel.
+
+	  If unsure, say Y.
+
+config INPUT_PCSPKR
+	tristate "PC Speaker support"
+	depends on INPUT && INPUT_MISC
+	help
+	  Say Y here if you want the standard PC Speaker to be used for
+	  bells and whistles.
+
+	  If unsure, say Y.
+
+	  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 pcspkr.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_SPARCSPKR
+	tristate "SPARC Speaker support"
+	depends on (SPARC32 || SPARC64) && INPUT && INPUT_MISC
+	help
+	  Say Y here if you want the standard Speaker on Sparc PCI systems
+	  to be used for bells and whistles.
+
+	  If unsure, say Y.
+
+	  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 pcspkr.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config INPUT_M68K_BEEP
+	tristate "M68k Beeper support"
+	depends on M68K && INPUT && INPUT_MISC
+
+config INPUT_UINPUT
+	tristate "User level driver support"
+	depends on INPUT && INPUT_MISC
+	help
+	  Say Y here if you want to support user level drivers for input
+	  subsystem accessible under char device 10:223 - /dev/input/uinput.
+
+	  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 uinput.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.	    
+
diff -Nru a/drivers/input/mouse/Config.help b/drivers/input/mouse/Config.help
--- a/drivers/input/mouse/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,87 +0,0 @@
-CONFIG_INPUT_MOUSE
-  Say Y here, and a list of supported mice will be displayed.
-  This option doesn't affect the kernel.
-
-  If unsure, say Y.
-
-CONFIG_MOUSE_PS2
-  Say Y here if you have a PS/2 mouse connected to your system. This
-  includes the standard 2 or 3-button PS/2 mouse, as well as PS/2
-  mice with wheels and extra buttons, Microsoft, Logitech or Genius
-  compatible.
-
-  If unsure, say Y.
-
-  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 psmouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MOUSE_SERIAL
-  Say Y here if you have a serial (RS-232, COM port) mouse connected
-  to your system. This includes Sun, MouseSystems, Microsoft,
-  Logitech and all other compatible serial mice.
-
-  If unsure, say N.
-
-  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 sermouse.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MOUSE_INPORT
-  Say Y here if you have an InPort, Microsoft or ATI XL busmouse.
-  They are rather rare these days.
-
-  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 inport.o. If you want to compile it as a
-  module, say M here and read <file.:Documentation/modules.txt>.
-
-CONFIG_MOUSE_ATIXL
-  Say Y here if your mouse is of the ATI XL variety.
-
-CONFIG_MOUSE_LOGIBM
-  Say Y here if you have a Logitech busmouse.
-  They are rather rare these days.
-
-  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 logibm.o. If you want to compile it as a
-  module, say M here and read <file.:Documentation/modules.txt>.
-
-CONFIG_MOUSE_PC110PAD
-  Say Y if you have the IBM PC-110 micro-notebook and want its
-  touchpad supported.
-
-  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 pc110pad.o. If you want to compile it as a
-  module, say M here and read <file.:Documentation/modules.txt>.
-
-CONFIG_MOUSE_MAPLE
-  Say Y if you have a DreamCast console and a mouse attached to
-  its Maple bus.
-
-  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 maplemouse.o. If you want to compile it as a
-  module, say M here and read <file.:Documentation/modules.txt>.
-
-CONFIG_MOUSE_AMIGA
-  Say Y here if you have an Amiga and want its native mouse
-  supported by the kernel.
-
-  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 amimouse.o. If you want to compile it as a
-  module, say M here and read <file.:Documentation/modules.txt>.
-
-CONFIG_MOUSE_ACORN
-  Say Y here if you have the Acorn RiscPC computer and want its
-  native mouse supported.
-
-  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 rpcmouse.o. If you want to compile it as a
-  module, say M here and read <file.:Documentation/modules.txt>.
diff -Nru a/drivers/input/mouse/Config.in b/drivers/input/mouse/Config.in
--- a/drivers/input/mouse/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,24 +0,0 @@
-#
-# Mouse driver configuration
-#
-
-bool 'Mice' CONFIG_INPUT_MOUSE
-
-dep_tristate '  PS/2 mouse' CONFIG_MOUSE_PS2 $CONFIG_INPUT $CONFIG_INPUT_MOUSE $CONFIG_SERIO
-dep_tristate '  Serial mouse' CONFIG_MOUSE_SERIAL $CONFIG_INPUT $CONFIG_INPUT_MOUSE $CONFIG_SERIO
-
-dep_tristate '  InPort/MS/ATIXL busmouse' CONFIG_MOUSE_INPORT $CONFIG_INPUT $CONFIG_INPUT_MOUSE $CONFIG_ISA
-if [ "$CONFIG_MOUSE_INPORT" != "n" ]; then
-   bool '  ATI XL variant' CONFIG_MOUSE_ATIXL
-fi
-dep_tristate '  Logitech busmouse' CONFIG_MOUSE_LOGIBM $CONFIG_INPUT $CONFIG_INPUT_MOUSE $CONFIG_ISA
-dep_tristate '  IBM PC110 touchpad' CONFIG_MOUSE_PC110PAD $CONFIG_INPUT $CONFIG_INPUT_MOUSE $CONFIG_ISA
-if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
-  dep_tristate '  Maple bus mouse' CONFIG_MOUSE_MAPLE $CONFIG_INPUT $CONFIG_INPUT_MOUSE $CONFIG_MAPLE
-fi
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   dep_tristate '  Amiga mouse' CONFIG_MOUSE_AMIGA $CONFIG_INPUT $CONFIG_INPUT_MOUSE
-fi
-if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-   dep_tristate '  Acorn RiscPC mouse' CONFIG_MOUSE_ACORN $CONFIG_INPUT $CONFIG_INPUT_MOUSE
-fi
diff -Nru a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/mouse/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,121 @@
+#
+# Mouse driver configuration
+#
+config INPUT_MOUSE
+	bool "Mice"
+	depends on INPUT
+	help
+	  Say Y here, and a list of supported mice will be displayed.
+	  This option doesn't affect the kernel.
+
+	  If unsure, say Y.
+
+config MOUSE_PS2
+	tristate "PS/2 mouse"
+	depends on INPUT && INPUT_MOUSE && SERIO
+	---help---
+	  Say Y here if you have a PS/2 mouse connected to your system. This
+	  includes the standard 2 or 3-button PS/2 mouse, as well as PS/2
+	  mice with wheels and extra buttons, Microsoft, Logitech or Genius
+	  compatible.
+
+	  If unsure, say Y.
+
+	  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 psmouse.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config MOUSE_SERIAL
+	tristate "Serial mouse"
+	depends on INPUT && INPUT_MOUSE && SERIO
+	---help---
+	  Say Y here if you have a serial (RS-232, COM port) mouse connected
+	  to your system. This includes Sun, MouseSystems, Microsoft,
+	  Logitech and all other compatible serial mice.
+
+	  If unsure, say N.
+
+	  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 sermouse.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config MOUSE_INPORT
+	tristate "InPort/MS/ATIXL busmouse"
+	depends on INPUT && INPUT_MOUSE && ISA
+	help
+	  Say Y here if you have an InPort, Microsoft or ATI XL busmouse.
+	  They are rather rare these days.
+
+	  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 inport.o. If you want to compile it as a
+	  module, say M here and read <file.:Documentation/modules.txt>.
+
+config MOUSE_ATIXL
+	bool "ATI XL variant"
+	depends on MOUSE_INPORT
+	help
+	  Say Y here if your mouse is of the ATI XL variety.
+
+config MOUSE_LOGIBM
+	tristate "Logitech busmouse"
+	depends on INPUT && INPUT_MOUSE && ISA
+	help
+	  Say Y here if you have a Logitech busmouse.
+	  They are rather rare these days.
+
+	  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 logibm.o. If you want to compile it as a
+	  module, say M here and read <file.:Documentation/modules.txt>.
+
+config MOUSE_PC110PAD
+	tristate "IBM PC110 touchpad"
+	depends on INPUT && INPUT_MOUSE && ISA
+	help
+	  Say Y if you have the IBM PC-110 micro-notebook and want its
+	  touchpad supported.
+
+	  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 pc110pad.o. If you want to compile it as a
+	  module, say M here and read <file.:Documentation/modules.txt>.
+
+config MOUSE_MAPLE
+	tristate "Maple bus mouse"
+	depends on SH_DREAMCAST && INPUT && INPUT_MOUSE && MAPLE
+	help
+	  Say Y if you have a DreamCast console and a mouse attached to
+	  its Maple bus.
+
+	  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 maplemouse.o. If you want to compile it as a
+	  module, say M here and read <file.:Documentation/modules.txt>.
+
+config MOUSE_AMIGA
+	tristate "Amiga mouse"
+	depends on AMIGA && INPUT && INPUT_MOUSE
+	help
+	  Say Y here if you have an Amiga and want its native mouse
+	  supported by the kernel.
+
+	  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 amimouse.o. If you want to compile it as a
+	  module, say M here and read <file.:Documentation/modules.txt>.
+
+config MOUSE_ACORN
+	tristate "Acorn RiscPC mouse"
+	depends on ARCH_ACORN && INPUT && INPUT_MOUSE
+	help
+	  Say Y here if you have the Acorn RiscPC computer and want its
+	  native mouse supported.
+
+	  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 rpcmouse.o. If you want to compile it as a
+	  module, say M here and read <file.:Documentation/modules.txt>.
+
diff -Nru a/drivers/input/serio/Config.help b/drivers/input/serio/Config.help
--- a/drivers/input/serio/Config.help	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,73 +0,0 @@
-CONFIG_SERIO
-  Say Yes here if you have any input device that uses serial I/O to
-  communicate with the system. This includes the 
-		* standard AT keyboard and PS/2 mouse *
-  as well as serial mice, Sun keyboards, some joysticks and 6dof
-  devices and more.
-
-  If unsure, say Y.
-
-  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 serio.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIO_I8042
-  i8042 is the chip over which the standard AT keyboard and PS/2
-  mouse are connected to the computer. If you use these devices,
-  you'll need to say Y here.
-
-  If unsure, say Y.
-
-  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 i8042.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIO_SERPORT
-  Say Y here if you plan to use an input device (mouse, joystick,
-  tablet, 6dof) that communicates over the RS232 serial (COM) port.
- 
-  More information is available: <file:Documentation/input/input.txt>
-
-  If unsure, say Y.
-
-  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 serport.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIO_CT82C710
-  Say Y here if you have a Texas Instruments TravelMate notebook
-  equipped with the ct82c710 chip and want to use a mouse connected
-  to the "QuickPort".
-
-  If unsure, say N.
-
-  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 ct82c710.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIO_PARKBD
-  Say Y here if you built a simple parallel port adapter to attach
-  an additional AT keyboard, XT keyboard or PS/2 mouse.
-
-  More information is available: <file:Documentation/input/input.txt>
-
-  If unsure, say N.
-
-  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 parkbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SERIO_ACORN
-  Say Y here if you have the Acorn RiscPC and want to use an AT
-  keyboard connected to its keyboard controller.
-
-  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 rpckbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/input/serio/Config.in b/drivers/input/serio/Config.in
--- a/drivers/input/serio/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,23 +0,0 @@
-#
-# Input core configuration
-#
-
-tristate 'Serial i/o support' CONFIG_SERIO
-
-dep_tristate '  i8042 PC Keyboard controller' CONFIG_SERIO_I8042 $CONFIG_SERIO
-dep_tristate '  Serial port line discipline' CONFIG_SERIO_SERPORT $CONFIG_SERIO 
-dep_tristate '  ct82c710 Aux port controller' CONFIG_SERIO_CT82C710 $CONFIG_SERIO
-if [ "$CONFIG_Q40" = "y" ]; then
-   dep_tristate '  Q40 keyboard controller' CONFIG_SERIO_Q40KBD $CONFIG_SERIO
-fi
-dep_tristate '  Parallel port keyboard adapter' CONFIG_SERIO_PARKBD $CONFIG_SERIO $CONFIG_PARPORT
-
-if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-   dep_tristate '  Acorn RiscPC keyboard controller' CONFIG_SERIO_ACORN $CONFIG_SERIO
-fi
-if [ "$CONFIG_ARCH_INTEGRATOR" = "y" ]; then
-   dep_tristate '  AMBA KMI keyboard controller' CONFIG_SERIO_AMBAKMI $CONFIG_SERIO
-fi
-if [ "$CONFIG_SA1111" = "y" ]; then
-   dep_tristate '  Intel SA1111 keyboard controller' CONFIG_SERIO_SA1111 $CONFIG_SERIO
-fi
diff -Nru a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/serio/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,105 @@
+#
+# Input core configuration
+#
+config SERIO
+	tristate "Serial i/o support"
+	---help---
+	  Say Yes here if you have any input device that uses serial I/O to
+	  communicate with the system. This includes the 
+	  		* standard AT keyboard and PS/2 mouse *
+	  as well as serial mice, Sun keyboards, some joysticks and 6dof
+	  devices and more.
+
+	  If unsure, say Y.
+
+	  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 serio.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIO_I8042
+	tristate "i8042 PC Keyboard controller"
+	depends on SERIO
+	---help---
+	  i8042 is the chip over which the standard AT keyboard and PS/2
+	  mouse are connected to the computer. If you use these devices,
+	  you'll need to say Y here.
+
+	  If unsure, say Y.
+
+	  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 i8042.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIO_SERPORT
+	tristate "Serial port line discipline"
+	depends on SERIO
+	---help---
+	  Say Y here if you plan to use an input device (mouse, joystick,
+	  tablet, 6dof) that communicates over the RS232 serial (COM) port.
+
+	  More information is available: <file:Documentation/input/input.txt>
+
+	  If unsure, say Y.
+
+	  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 serport.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIO_CT82C710
+	tristate "ct82c710 Aux port controller"
+	depends on SERIO
+	---help---
+	  Say Y here if you have a Texas Instruments TravelMate notebook
+	  equipped with the ct82c710 chip and want to use a mouse connected
+	  to the "QuickPort".
+
+	  If unsure, say N.
+
+	  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 ct82c710.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIO_Q40KBD
+	tristate "Q40 keyboard controller"
+	depends on Q40 && SERIO
+
+config SERIO_PARKBD
+	tristate "Parallel port keyboard adapter"
+	depends on SERIO && PARPORT
+	---help---
+	  Say Y here if you built a simple parallel port adapter to attach
+	  an additional AT keyboard, XT keyboard or PS/2 mouse.
+
+	  More information is available: <file:Documentation/input/input.txt>
+
+	  If unsure, say N.
+
+	  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 parkbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIO_ACORN
+	tristate "Acorn RiscPC keyboard controller"
+	depends on ARCH_ACORN && SERIO
+	help
+	  Say Y here if you have the Acorn RiscPC and want to use an AT
+	  keyboard connected to its keyboard controller.
+
+	  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 rpckbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SERIO_AMBAKMI
+	tristate "AMBA KMI keyboard controller"
+	depends on ARCH_INTEGRATOR && SERIO
+
+config SERIO_SA1111
+	tristate "Intel SA1111 keyboard controller"
+	depends on SA1111 && SERIO
+
diff -Nru a/drivers/input/touchscreen/Config.help b/drivers/input/touchscreen/Config.help
--- a/drivers/input/touchscreen/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,26 +0,0 @@
-CONFIG_INPUT_TOUCHSCREEN
-  Say Y here, and a list of supported touchscreens will be displayed.
-  This option doesn't affect the kernel.
-
-  If unsure, say Y.
-
-CONFIG_TOUCHSCREEN_GUNZE
-  Say Y here if you have the Gunze AHL-51 touchscreen connected to
-  your system.
-
-  If unsure, say N.
-
-  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 gunze.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_TOUCHSCREEN_BITSY
-  Say Y here if you have the h3600 (Bitsy) touchscreen.
-
-  If unsure, say N.
-
-  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 gunze.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/input/touchscreen/Config.in b/drivers/input/touchscreen/Config.in
--- a/drivers/input/touchscreen/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-#
-# Mouse driver configuration
-#
-
-bool 'Touchscreens' CONFIG_INPUT_TOUCHSCREEN
-
-if [ "$CONFIG_SA1100_BITSY" = "y" ]; then
-   dep_tristate '  Compaq iPAQ H3600 (Bitsy) touchscreen input driver' CONFIG_TOUCHSCREEN_BITSY $CONFIG_INPUT $CONFIG_INPUT_TOUCHSCREEN $CONFIG_SERIO
-fi
-dep_tristate '  Gunze AHL-51S touchscreen' CONFIG_TOUCHSCREEN_GUNZE $CONFIG_INPUT $CONFIG_INPUT_TOUCHSCREEN $CONFIG_SERIO
diff -Nru a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/input/touchscreen/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,39 @@
+#
+# Mouse driver configuration
+#
+config INPUT_TOUCHSCREEN
+	bool "Touchscreens"
+	depends on INPUT
+	help
+	  Say Y here, and a list of supported touchscreens will be displayed.
+	  This option doesn't affect the kernel.
+
+	  If unsure, say Y.
+
+config TOUCHSCREEN_BITSY
+	tristate "Compaq iPAQ H3600 (Bitsy) touchscreen input driver"
+	depends on SA1100_BITSY && INPUT && INPUT_TOUCHSCREEN && SERIO
+	help
+	  Say Y here if you have the h3600 (Bitsy) touchscreen.
+
+	  If unsure, say N.
+
+	  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 gunze.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config TOUCHSCREEN_GUNZE
+	tristate "Gunze AHL-51S touchscreen"
+	depends on INPUT && INPUT_TOUCHSCREEN && SERIO
+	help
+	  Say Y here if you have the Gunze AHL-51 touchscreen connected to
+	  your system.
+
+	  If unsure, say N.
+
+	  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 gunze.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/isdn/Config.help b/drivers/isdn/Config.help
--- a/drivers/isdn/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,13 +0,0 @@
-CONFIG_ISDN_BOOL
-  ISDN ("Integrated Services Digital Networks", called RNIS in France)
-  is a special type of fully digital telephone service; it's mostly
-  used to connect to your Internet service provider (with SLIP or
-  PPP).  The main advantage is that the speed is higher than ordinary
-  modem/telephone connections, and that you can have voice
-  conversations while downloading stuff.  It only works if your
-  computer is equipped with an ISDN card and both you and your service
-  provider purchased an ISDN line from the phone company.  For
-  details, read <http://alumni.caltech.edu/~dank/isdn/> on the WWW.
-
-  Select this option if you want your kernel to support ISDN.
-
diff -Nru a/drivers/isdn/Config.in b/drivers/isdn/Config.in
--- a/drivers/isdn/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,31 +0,0 @@
-#
-# ISDN device configuration
-#
-
-mainmenu_option next_comment
-comment 'ISDN subsystem'
-if [ "$CONFIG_NET" != "n" ]; then
-   bool 'ISDN support' CONFIG_ISDN_BOOL
-
-   if [ "$CONFIG_ISDN_BOOL" = "y" ]; then
-      mainmenu_option next_comment
-      comment 'Old ISDN4Linux'
-
-      tristate 'Old ISDN4Linux (obsolete)' CONFIG_ISDN
-      if [ "$CONFIG_ISDN" != "n" ]; then
-         source drivers/isdn/i4l/Config.in
-      fi
-      endmenu
-
-      comment 'CAPI subsystem'
-
-      tristate 'CAPI2.0 support' CONFIG_ISDN_CAPI
-      if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
-         source drivers/isdn/capi/Config.in
-      fi
-
-      source drivers/isdn/hardware/Config.in
-   fi
-fi
-endmenu
-
diff -Nru a/drivers/isdn/Kconfig b/drivers/isdn/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,65 @@
+#
+# ISDN device configuration
+#
+
+menu "ISDN subsystem"
+
+config ISDN_BOOL
+	bool "ISDN support"
+	depends on NET
+	---help---
+	  ISDN ("Integrated Services Digital Networks", called RNIS in France)
+	  is a special type of fully digital telephone service; it's mostly
+	  used to connect to your Internet service provider (with SLIP or
+	  PPP).  The main advantage is that the speed is higher than ordinary
+	  modem/telephone connections, and that you can have voice
+	  conversations while downloading stuff.  It only works if your
+	  computer is equipped with an ISDN card and both you and your service
+	  provider purchased an ISDN line from the phone company.  For
+	  details, read <http://alumni.caltech.edu/~dank/isdn/> on the WWW.
+
+	  Select this option if you want your kernel to support ISDN.
+
+
+menu "Old ISDN4Linux"
+	depends on NET && ISDN_BOOL
+
+config ISDN
+	tristate "Old ISDN4Linux (obsolete)"
+	---help---
+	  This driver allows you to use an ISDN-card for networking
+	  connections and as dialin/out device.  The isdn-tty's have a built
+	  in AT-compatible modem emulator.  Network devices support autodial,
+	  channel-bundling, callback and caller-authentication without having
+	  a daemon running.  A reduced T.70 protocol is supported with tty's
+	  suitable for German BTX.  On D-Channel, the protocols EDSS1
+	  (Euro-ISDN) and 1TR6 (German style) are supported.  See
+	  <file:Documentation/isdn/README> for more information.
+
+	  ISDN support in the linux kernel is moving towards a new API,
+	  called CAPI (Common ISDN Application Programming Interface).
+	  Therefore the old ISDN4Linux layer is becoming obsolete. It is 
+	  still usable, though, if you select this option.
+
+source "drivers/isdn/i4l/Kconfig"
+
+endmenu
+
+comment "CAPI subsystem"
+	depends on NET && ISDN_BOOL
+
+config ISDN_CAPI
+	tristate "CAPI2.0 support"
+	depends on ISDN_BOOL
+	help
+	  This provides the CAPI (Common ISDN Application Programming
+	  Interface, a standard making it easy for programs to access ISDN
+	  hardware, see <http://www.capi.org/>.  This is needed for AVM's set
+	  of active ISDN controllers like B1, T1, M1.
+
+source "drivers/isdn/capi/Kconfig"
+
+source "drivers/isdn/hardware/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/isdn/Makefile b/drivers/isdn/Makefile
--- a/drivers/isdn/Makefile	Wed Oct 30 16:44:34 2002
+++ b/drivers/isdn/Makefile	Wed Oct 30 16:44:34 2002
@@ -15,7 +15,3 @@
 obj-$(CONFIG_ISDN_DRV_EICON)		+= eicon/
 obj-$(CONFIG_HYSDN)			+= hysdn/
 obj-$(CONFIG_ISDN_DRV_TPAM)		+= tpam/
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/act2000/Config.help b/drivers/isdn/act2000/Config.help
--- a/drivers/isdn/act2000/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-CONFIG_ISDN_DRV_ACT2000
-  Say Y here if you have an IBM Active 2000 ISDN card. In order to use
-  this card, additional firmware is necessary, which has to be loaded
-  into the card using a utility which is part of the latest
-  isdn4k-utils package. Please read the file
-  <file:Documentation/isdn/README.act2000> for more information.
-
diff -Nru a/drivers/isdn/act2000/Config.in b/drivers/isdn/act2000/Config.in
--- a/drivers/isdn/act2000/Config.in	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,6 +0,0 @@
-#
-# Config.in for IBM Active 2000 ISDN driver
-#
-
-dep_tristate       'IBM Active 2000 support' CONFIG_ISDN_DRV_ACT2000 $CONFIG_ISDN $CONFIG_ISA
-
diff -Nru a/drivers/isdn/act2000/Kconfig b/drivers/isdn/act2000/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/act2000/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,13 @@
+#
+# Config.in for IBM Active 2000 ISDN driver
+#
+config ISDN_DRV_ACT2000
+	tristate "IBM Active 2000 support"
+	depends on ISDN && ISA
+	help
+	  Say Y here if you have an IBM Active 2000 ISDN card. In order to use
+	  this card, additional firmware is necessary, which has to be loaded
+	  into the card using a utility which is part of the latest
+	  isdn4k-utils package. Please read the file
+	  <file:Documentation/isdn/README.act2000> for more information.
+
diff -Nru a/drivers/isdn/act2000/Makefile b/drivers/isdn/act2000/Makefile
--- a/drivers/isdn/act2000/Makefile	Wed Oct 30 16:44:30 2002
+++ b/drivers/isdn/act2000/Makefile	Wed Oct 30 16:44:30 2002
@@ -7,5 +7,3 @@
 # Multipart objects.
 
 act2000-objs	:= module.o capi.o act2000_isa.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/capi/Config.help b/drivers/isdn/capi/Config.help
--- a/drivers/isdn/capi/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,31 +0,0 @@
-CONFIG_ISDN_CAPI
-  This provides the CAPI (Common ISDN Application Programming
-  Interface, a standard making it easy for programs to access ISDN
-  hardware, see <http://www.capi.org/>.  This is needed for AVM's set
-  of active ISDN controllers like B1, T1, M1.
-
-CONFIG_ISDN_CAPI_CAPI20
-  This option will provide the CAPI 2.0 interface to userspace
-  applications via /dev/capi20. Applications should use the
-  standardized libcapi20 to access this functionality.  You should say
-  Y/M here.
-
-CONFIG_ISDN_CAPI_MIDDLEWARE
-  This option will enhance the capabilities of the /dev/capi20
-  interface.  It will provide a means of moving a data connection,
-  established via the usual /dev/capi20 interface to a special tty
-  device.  If you want to use pppd with pppdcapiplugin to dial up to
-  your ISP, say Y here.
-
-CONFIG_ISDN_CAPI_CAPIFS
-  This option provides a special file system, similar to /dev/pts with
-  device nodes for the special ttys established by using the
-  middleware extension above. If you want to use pppd with
-  pppdcapiplugin to dial up to your ISP, say Y here.
-
-CONFIG_ISDN_CAPI_CAPIDRV
-  This option provides the glue code to hook up CAPI driven cards to
-  the legacy isdn4linux link layer.  If you have a card which is
-  supported by a CAPI driver, but still want to use old features like
-  ippp interfaces or ttyI emulation, say Y/M here.
-
diff -Nru a/drivers/isdn/capi/Config.in b/drivers/isdn/capi/Config.in
--- a/drivers/isdn/capi/Config.in	Wed Oct 30 16:44:25 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,16 +0,0 @@
-#
-# Config.in for the CAPI subsystem
-#
-
-bool            '  Verbose reason code reporting (kernel size +=7K)' CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
-dep_bool        '  CAPI2.0 Middleware support (EXPERIMENTAL)' CONFIG_ISDN_CAPI_MIDDLEWARE $CONFIG_EXPERIMENTAL
-dep_tristate    '  CAPI2.0 /dev/capi support' CONFIG_ISDN_CAPI_CAPI20 $CONFIG_ISDN_CAPI
-if [ "$CONFIG_ISDN_CAPI_MIDDLEWARE" = "y" ]; then
-   dep_mbool    '    CAPI2.0 filesystem support' CONFIG_ISDN_CAPI_CAPIFS_BOOL $CONFIG_ISDN_CAPI_CAPI20
-   if [ "$CONFIG_ISDN_CAPI_CAPIFS_BOOL" = "y" ]; then
-      define_tristate CONFIG_ISDN_CAPI_CAPIFS $CONFIG_ISDN_CAPI_CAPI20
-   else
-      define_tristate CONFIG_ISDN_CAPI_CAPIFS n
-   fi
-fi
-dep_tristate    '  CAPI2.0 capidrv interface support' CONFIG_ISDN_CAPI_CAPIDRV $CONFIG_ISDN_CAPI $CONFIG_ISDN
diff -Nru a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/capi/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,53 @@
+#
+# Config.in for the CAPI subsystem
+#
+config ISDN_DRV_AVMB1_VERBOSE_REASON
+	bool "Verbose reason code reporting (kernel size +=7K)"
+	depends on ISDN_CAPI
+	help
+	  If you say Y here, the AVM B1 driver will give verbose reasons for
+	  disconnecting. This will increase the size of the kernel by 7 KB. If
+	  unsure, say Y.
+
+config ISDN_CAPI_MIDDLEWARE
+	bool "CAPI2.0 Middleware support (EXPERIMENTAL)"
+	depends on ISDN_CAPI && EXPERIMENTAL
+	help
+	  This option will enhance the capabilities of the /dev/capi20
+	  interface.  It will provide a means of moving a data connection,
+	  established via the usual /dev/capi20 interface to a special tty
+	  device.  If you want to use pppd with pppdcapiplugin to dial up to
+	  your ISP, say Y here.
+
+config ISDN_CAPI_CAPI20
+	tristate "CAPI2.0 /dev/capi support"
+	depends on ISDN_CAPI
+	help
+	  This option will provide the CAPI 2.0 interface to userspace
+	  applications via /dev/capi20. Applications should use the
+	  standardized libcapi20 to access this functionality.  You should say
+	  Y/M here.
+
+config ISDN_CAPI_CAPIFS_BOOL
+	bool "CAPI2.0 filesystem support"
+	depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
+
+config ISDN_CAPI_CAPIFS
+	tristate
+	depends on ISDN_CAPI_CAPIFS_BOOL
+	default ISDN_CAPI_CAPI20
+	help
+	  This option provides a special file system, similar to /dev/pts with
+	  device nodes for the special ttys established by using the
+	  middleware extension above. If you want to use pppd with
+	  pppdcapiplugin to dial up to your ISP, say Y here.
+
+config ISDN_CAPI_CAPIDRV
+	tristate "CAPI2.0 capidrv interface support"
+	depends on ISDN_CAPI && ISDN
+	help
+	  This option provides the glue code to hook up CAPI driven cards to
+	  the legacy isdn4linux link layer.  If you have a card which is
+	  supported by a CAPI driver, but still want to use old features like
+	  ippp interfaces or ttyI emulation, say Y/M here.
+
diff -Nru a/drivers/isdn/capi/Makefile b/drivers/isdn/capi/Makefile
--- a/drivers/isdn/capi/Makefile	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/capi/Makefile	Wed Oct 30 16:44:28 2002
@@ -18,7 +18,3 @@
 kernelcapi-y				:= kcapi.o capiutil.o capilib.o
 kernelcapi-$(CONFIG_PROC_FS)		+= kcapi_proc.o
 kernelcapi-objs				:= $(kernelcapi-y)
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/divert/Makefile b/drivers/isdn/divert/Makefile
--- a/drivers/isdn/divert/Makefile	Wed Oct 30 16:44:30 2002
+++ b/drivers/isdn/divert/Makefile	Wed Oct 30 16:44:30 2002
@@ -7,10 +7,3 @@
 # Multipart objects.
 
 dss1_divert-objs	:= isdn_divert.o divert_procfs.o divert_init.o
-
-include $(TOPDIR)/Rules.make
-
-
-
-
-
diff -Nru a/drivers/isdn/eicon/Config.help b/drivers/isdn/eicon/Config.help
--- a/drivers/isdn/eicon/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,30 +0,0 @@
-CONFIG_ISDN_DRV_EICON
-  Say Y here if you have an Eicon active ISDN card. In order to use
-  this card, additional firmware is necessary, which has to be loaded
-  into the card using the eiconctrl utility which is part of the
-  latest isdn4k-utils package. Please read the file
-  <file:Documentation/isdn/README.eicon> for more information.
-
-CONFIG_ISDN_DRV_EICON_OLD
-  Say Y here to use your Eicon active ISDN card with ISDN4Linux
-  isdn module.
-
-CONFIG_ISDN_DRV_EICON_PCI
-  Say Y here if you have an Eicon Diva Server (BRI/PRI/4BRI) ISDN
-  card.  Please read <file:Documentation/isdn/README.eicon> for more
-  information.
-
-CONFIG_ISDN_DRV_EICON_ISA
-  Say Y here if you have an old-type Eicon active ISDN card. In order
-  to use this card, additional firmware is necessary, which has to be
-  loaded into the card using the eiconctrl utility which is part of
-  the latest isdn4k-utils package. Please read the file
-  <file:Documentation/isdn/README.eicon> for more information.
-
-CONFIG_ISDN_DRV_EICON_DIVAS
-  Enable this option if you want the eicon driver as standalone
-  version with no interface to the ISDN4Linux isdn module. If you
-  say Y here, the eicon module only supports the Diva Server PCI
-  cards and will provide its own IDI interface. You should say N
-  here.
-
diff -Nru a/drivers/isdn/eicon/Config.in b/drivers/isdn/eicon/Config.in
--- a/drivers/isdn/eicon/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,20 +0,0 @@
-#
-# Config.in for Eicon active ISDN support
-#
-
-bool               'Eicon active card support' CONFIG_ISDN_DRV_EICON
-if [ "$CONFIG_ISDN_DRV_EICON" != "n" ]; then
-
-   if [ "$CONFIG_ISDN_DRV_EICON_OLD" != "y" ]; then
-      dep_tristate '  Build Eicon driver type standalone' CONFIG_ISDN_DRV_EICON_DIVAS $CONFIG_ISDN $CONFIG_PCI
-   fi
-   if [ "$CONFIG_ISDN_DRV_EICON_DIVAS" != "y" ]; then
-      dep_tristate '  Legacy Eicon driver' CONFIG_ISDN_DRV_EICON_OLD $CONFIG_ISDN
-      if [ "$CONFIG_ISDN_DRV_EICON_OLD" != "n" ]; then
-         dep_bool  '    Eicon PCI DIVA Server BRI/PRI/4BRI support' CONFIG_ISDN_DRV_EICON_PCI $CONFIG_PCI
-         bool      '    Eicon S,SX,SCOM,Quadro,S2M support' CONFIG_ISDN_DRV_EICON_ISA
-      fi
-
-   fi
-fi
-
diff -Nru a/drivers/isdn/eicon/Kconfig b/drivers/isdn/eicon/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/eicon/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,53 @@
+#
+# Config.in for Eicon active ISDN support
+#
+config ISDN_DRV_EICON
+	bool "Eicon active card support"
+	help
+	  Say Y here if you have an Eicon active ISDN card. In order to use
+	  this card, additional firmware is necessary, which has to be loaded
+	  into the card using the eiconctrl utility which is part of the
+	  latest isdn4k-utils package. Please read the file
+	  <file:Documentation/isdn/README.eicon> for more information.
+
+choice
+	prompt "Eicon active card support"
+	optional
+	depends on ISDN_DRV_EICON && ISDN
+
+config ISDN_DRV_EICON_DIVAS
+	tristate "Eicon driver"
+	depends on PCI
+	help
+	  Enable this option if you want the eicon driver as standalone
+	  version with no interface to the ISDN4Linux isdn module. If you
+	  say Y here, the eicon module only supports the Diva Server PCI
+	  cards and will provide its own IDI interface. You should say N
+	  here.
+
+config ISDN_DRV_EICON_OLD
+	tristate "Legacy driver"
+	help
+	  Say Y here to use your Eicon active ISDN card with ISDN4Linux
+	  isdn module.
+
+config ISDN_DRV_EICON_PCI
+	bool "Eicon PCI DIVA Server BRI/PRI/4BRI support"
+	depends on ISDN_DRV_EICON_OLD && PCI
+	help
+	  Say Y here if you have an Eicon Diva Server (BRI/PRI/4BRI) ISDN
+	  card.  Please read <file:Documentation/isdn/README.eicon> for more
+	  information.
+
+config ISDN_DRV_EICON_ISA
+	bool "Eicon S,SX,SCOM,Quadro,S2M support"
+	depends on ISDN_DRV_EICON_OLD
+	help
+	  Say Y here if you have an old-type Eicon active ISDN card. In order
+	  to use this card, additional firmware is necessary, which has to be
+	  loaded into the card using the eiconctrl utility which is part of
+	  the latest isdn4k-utils package. Please read the file
+	  <file:Documentation/isdn/README.eicon> for more information.
+
+endchoice
+
diff -Nru a/drivers/isdn/eicon/Makefile b/drivers/isdn/eicon/Makefile
--- a/drivers/isdn/eicon/Makefile	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/eicon/Makefile	Wed Oct 30 16:44:27 2002
@@ -23,5 +23,3 @@
 		   linsys.o linio.o
 
 eicon-objs 	+= $(eicon-objs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/hardware/Config.in b/drivers/isdn/hardware/Config.in
--- a/drivers/isdn/hardware/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,28 +0,0 @@
-#
-# ISDN hardware drivers
-#
-
-if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
-  comment 'CAPI hardware drivers'
-  source drivers/isdn/hardware/avm/Config.in
-  source drivers/isdn/hardware/eicon/Config.in
-fi
-
-if [ "$CONFIG_ISDN" != "n" ]; then
-  comment 'ISDN4Linux hardware drivers'
-
-  source drivers/isdn/hisax/Config.in
-
-  mainmenu_option next_comment
-  comment 'Active cards'
-
-  source drivers/isdn/icn/Config.in
-  source drivers/isdn/pcbit/Config.in
-  source drivers/isdn/sc/Config.in
-  source drivers/isdn/act2000/Config.in
-  source drivers/isdn/eicon/Config.in
-  source drivers/isdn/tpam/Config.in
-  source drivers/isdn/hysdn/Config.in
-  endmenu
-fi
-
diff -Nru a/drivers/isdn/hardware/Kconfig b/drivers/isdn/hardware/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/hardware/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,35 @@
+#
+# ISDN hardware drivers
+#
+comment "CAPI hardware drivers"
+	depends on NET && ISDN_BOOL && ISDN_CAPI
+
+source "drivers/isdn/hardware/avm/Kconfig"
+
+source "drivers/isdn/hardware/eicon/Kconfig"
+
+comment "ISDN4Linux hardware drivers"
+	depends on NET && ISDN_BOOL && ISDN
+
+source "drivers/isdn/hisax/Kconfig"
+
+
+menu "Active cards"
+	depends on NET && ISDN_BOOL && ISDN!=n
+
+source "drivers/isdn/icn/Kconfig"
+
+source "drivers/isdn/pcbit/Kconfig"
+
+source "drivers/isdn/sc/Kconfig"
+
+source "drivers/isdn/act2000/Kconfig"
+
+source "drivers/isdn/eicon/Kconfig"
+
+source "drivers/isdn/tpam/Kconfig"
+
+source "drivers/isdn/hysdn/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/isdn/hardware/Makefile b/drivers/isdn/hardware/Makefile
--- a/drivers/isdn/hardware/Makefile	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hardware/Makefile	Wed Oct 30 16:44:27 2002
@@ -4,7 +4,3 @@
 
 obj-$(CONFIG_CAPI_AVM)		+= avm/
 obj-$(CONFIG_CAPI_EICON)	+= eicon/
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/hardware/avm/Config.help b/drivers/isdn/hardware/avm/Config.help
--- a/drivers/isdn/hardware/avm/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,36 +0,0 @@
-CONFIG_CAPI_AVM
-  Enable support for AVM active ISDN cards.
-
-CONFIG_ISDN_DRV_AVMB1_B1ISA
-  Enable support for the ISA version of the AVM B1 card.
-
-CONFIG_ISDN_DRV_AVMB1_B1PCI
-  Enable support for the PCI version of the AVM B1 card.
-
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4
-  Enable support for the V4 version of AVM B1 PCI card.
-
-CONFIG_ISDN_DRV_AVMB1_T1ISA
-  Enable support for the AVM T1 T1B card.
-  Note: This is a PRI card and handle 30 B-channels.
-
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
-  Enable support for the PCMCIA version of the AVM B1 card.
-
-CONFIG_ISDN_DRV_AVMB1_AVM_CS
-  Enable the PCMCIA client driver for the AVM B1/M1/M2
-  PCMCIA cards.
-
-CONFIG_ISDN_DRV_AVMB1_T1PCI
-  Enable support for the AVM T1 T1B card.
-  Note: This is a PRI card and handle 30 B-channels.
-
-CONFIG_ISDN_DRV_AVMB1_C4
-  Enable support for the AVM C4/C2 PCI cards.
-  These cards handle 4/2 BRI ISDN lines (8/4 channels).
-
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
-  If you say Y here, the AVM B1 driver will give verbose reasons for
-  disconnecting. This will increase the size of the kernel by 7 KB. If
-  unsure, say Y.
-
diff -Nru a/drivers/isdn/hardware/avm/Config.in b/drivers/isdn/hardware/avm/Config.in
--- a/drivers/isdn/hardware/avm/Config.in	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-#
-# ISDN AVM drivers
-#
-
-mainmenu_option next_comment
-comment 'Active AVM cards'
-
-bool 'Support AVM cards' CONFIG_CAPI_AVM
-
-if [ "$CONFIG_CAPI_AVM" != "n" ]; then
-   dep_tristate '  AVM B1 ISA support' CONFIG_ISDN_DRV_AVMB1_B1ISA               $CONFIG_ISDN_CAPI $CONFIG_SA
-
-   dep_tristate '  AVM B1 PCI support'            CONFIG_ISDN_DRV_AVMB1_B1PCI    $CONFIG_ISDN_CAPI $CONFIG_PCI
-   dep_mbool    '    AVM B1 PCI V4 support'       CONFIG_ISDN_DRV_AVMB1_B1PCIV4  $CONFIG_ISDN_DRV_AVMB1_B1PCI
-
-   dep_tristate '  AVM T1/T1-B ISA support'       CONFIG_ISDN_DRV_AVMB1_T1ISA    $CONFIG_ISDN_CAPI $CONFIG_ISA
-
-   dep_tristate '  AVM B1/M1/M2 PCMCIA support'   CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_ISDN_CAPI
-
-   dep_tristate '  AVM B1/M1/M2 PCMCIA cs module' CONFIG_ISDN_DRV_AVMB1_AVM_CS   $CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_PCMCIA
-
-   dep_tristate '  AVM T1/T1-B PCI support'       CONFIG_ISDN_DRV_AVMB1_T1PCI    $CONFIG_ISDN_CAPI $CONFIG_PCI
-
-   dep_tristate '  AVM C4/C2 support'             CONFIG_ISDN_DRV_AVMB1_C4       $CONFIG_ISDN_CAPI $CONFIG_PCI
-fi
-
-endmenu
diff -Nru a/drivers/isdn/hardware/avm/Kconfig b/drivers/isdn/hardware/avm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/hardware/avm/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,66 @@
+#
+# ISDN AVM drivers
+#
+
+menu "Active AVM cards"
+	depends on NET && ISDN_BOOL && ISDN_CAPI!=n
+
+config CAPI_AVM
+	bool "Support AVM cards"
+	help
+	  Enable support for AVM active ISDN cards.
+
+config ISDN_DRV_AVMB1_B1ISA
+	tristate "AVM B1 ISA support"
+	depends on CAPI_AVM && ISDN_CAPI && SA
+	help
+	  Enable support for the ISA version of the AVM B1 card.
+
+config ISDN_DRV_AVMB1_B1PCI
+	tristate "AVM B1 PCI support"
+	depends on CAPI_AVM && ISDN_CAPI && PCI
+	help
+	  Enable support for the PCI version of the AVM B1 card.
+
+config ISDN_DRV_AVMB1_B1PCIV4
+	bool "AVM B1 PCI V4 support"
+	depends on ISDN_DRV_AVMB1_B1PCI
+	help
+	  Enable support for the V4 version of AVM B1 PCI card.
+
+config ISDN_DRV_AVMB1_T1ISA
+	tristate "AVM T1/T1-B ISA support"
+	depends on CAPI_AVM && ISDN_CAPI && ISA
+	help
+	  Enable support for the AVM T1 T1B card.
+	  Note: This is a PRI card and handle 30 B-channels.
+
+config ISDN_DRV_AVMB1_B1PCMCIA
+	tristate "AVM B1/M1/M2 PCMCIA support"
+	depends on CAPI_AVM && ISDN_CAPI
+	help
+	  Enable support for the PCMCIA version of the AVM B1 card.
+
+config ISDN_DRV_AVMB1_AVM_CS
+	tristate "AVM B1/M1/M2 PCMCIA cs module"
+	depends on ISDN_DRV_AVMB1_B1PCMCIA && PCMCIA
+	help
+	  Enable the PCMCIA client driver for the AVM B1/M1/M2
+	  PCMCIA cards.
+
+config ISDN_DRV_AVMB1_T1PCI
+	tristate "AVM T1/T1-B PCI support"
+	depends on CAPI_AVM && ISDN_CAPI && PCI
+	help
+	  Enable support for the AVM T1 T1B card.
+	  Note: This is a PRI card and handle 30 B-channels.
+
+config ISDN_DRV_AVMB1_C4
+	tristate "AVM C4/C2 support"
+	depends on CAPI_AVM && ISDN_CAPI && PCI
+	help
+	  Enable support for the AVM C4/C2 PCI cards.
+	  These cards handle 4/2 BRI ISDN lines (8/4 channels).
+
+endmenu
+
diff -Nru a/drivers/isdn/hardware/avm/Makefile b/drivers/isdn/hardware/avm/Makefile
--- a/drivers/isdn/hardware/avm/Makefile	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hardware/avm/Makefile	Wed Oct 30 16:44:28 2002
@@ -13,7 +13,3 @@
 obj-$(CONFIG_ISDN_DRV_AVMB1_T1ISA)	+= t1isa.o b1.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_T1PCI)	+= t1pci.o b1.o b1dma.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_C4)		+= c4.o b1.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/hardware/eicon/Config.help b/drivers/isdn/hardware/eicon/Config.help
--- a/drivers/isdn/hardware/eicon/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,31 +0,0 @@
-CONFIG_CAPI_EICON
-  Enable support for Eicon Networks active ISDN cards.
-
-CONFIG_ISDN_DIVAS
-  Say Y here if you have an Eicon Networks DIVA Server PCI ISDN card.
-  In order to use this card, additional firmware is necessary, which
-  has to be downloaded into the card using the divactrl utility.
-
-CONFIG_ISDN_DIVAS_BRIPCI
-  Enable support for DIVA Server BRI-PCI.
-
-CONFIG_ISDN_DIVAS_4BRIPCI
-  Enable support for DIVA Server 4BRI-PCI.
-
-CONFIG_ISDN_DIVAS_PRIPCI
-  Enable support for DIVA Server PRI-PCI.
-
-CONFIG_ISDN_DIVAS_MAINT
-  Enable Divas Maintainance driver.
-
-CONFIG_ISDN_DIVAS_USERIDI
-  Enable support for user-mode IDI interface.
-
-CONFIG_ISDN_DIVAS_DIVACAPI
-  You need this to provide the CAPI interface
-  for DIVA Server cards.
-
-CONFIG_ISDN_DIVAS_DIVA2I4L
-  If you want to use the old isdn4linux module, you need
-  this enabled.
-
diff -Nru a/drivers/isdn/hardware/eicon/Config.in b/drivers/isdn/hardware/eicon/Config.in
--- a/drivers/isdn/hardware/eicon/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,20 +0,0 @@
-#
-# ISDN DIVAS Eicon driver
-#
-
-mainmenu_option next_comment
-comment 'Active Eicon DIVA Server cards'
-
-bool 'Support Eicon cards' CONFIG_CAPI_EICON
-
-if [ "$CONFIG_CAPI_EICON" != "n" ]; then
- dep_tristate 'Support Eicon DIVA Server cards' CONFIG_ISDN_DIVAS $CONFIG_PROC_FS $CONFIG_PCI m
- dep_mbool     '   DIVA Server BRI/PCI support' CONFIG_ISDN_DIVAS_BRIPCI $CONFIG_ISDN_DIVAS
- dep_mbool     '   DIVA Server 4BRI/PCI support' CONFIG_ISDN_DIVAS_4BRIPCI $CONFIG_ISDN_DIVAS
- dep_mbool     '   DIVA Server PRI/PCI support' CONFIG_ISDN_DIVAS_PRIPCI $CONFIG_ISDN_DIVAS
- dep_tristate '  DIVA CAPI2.0 interface support' CONFIG_ISDN_DIVAS_DIVACAPI $CONFIG_ISDN_DIVAS $CONFIG_ISDN_CAPI
- dep_tristate '  DIVA Maint driver support' CONFIG_ISDN_DIVAS_MAINT $CONFIG_ISDN_DIVAS
- dep_tristate '  DIVA User-IDI interface support' CONFIG_ISDN_DIVAS_USERIDI $CONFIG_ISDN_DIVAS
-fi
-
-endmenu
diff -Nru a/drivers/isdn/hardware/eicon/Kconfig b/drivers/isdn/hardware/eicon/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/hardware/eicon/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,59 @@
+#
+# ISDN DIVAS Eicon driver
+#
+
+menu "Active Eicon DIVA Server cards"
+	depends on NET && ISDN_BOOL && ISDN_CAPI!=n
+
+config CAPI_EICON
+	bool "Support Eicon cards"
+	help
+	  Enable support for Eicon Networks active ISDN cards.
+
+config ISDN_DIVAS
+	tristate "Support Eicon DIVA Server cards"
+	depends on CAPI_EICON && PROC_FS && PCI && m
+	help
+	  Say Y here if you have an Eicon Networks DIVA Server PCI ISDN card.
+	  In order to use this card, additional firmware is necessary, which
+	  has to be downloaded into the card using the divactrl utility.
+
+config ISDN_DIVAS_BRIPCI
+	bool "DIVA Server BRI/PCI support"
+	depends on ISDN_DIVAS
+	help
+	  Enable support for DIVA Server BRI-PCI.
+
+config ISDN_DIVAS_4BRIPCI
+	bool "DIVA Server 4BRI/PCI support"
+	depends on ISDN_DIVAS
+	help
+	  Enable support for DIVA Server 4BRI-PCI.
+
+config ISDN_DIVAS_PRIPCI
+	bool "DIVA Server PRI/PCI support"
+	depends on ISDN_DIVAS
+	help
+	  Enable support for DIVA Server PRI-PCI.
+
+config ISDN_DIVAS_DIVACAPI
+	tristate "DIVA CAPI2.0 interface support"
+	depends on ISDN_DIVAS && ISDN_CAPI
+	help
+	  You need this to provide the CAPI interface
+	  for DIVA Server cards.
+
+config ISDN_DIVAS_MAINT
+	tristate "DIVA Maint driver support"
+	depends on ISDN_DIVAS
+	help
+	  Enable Divas Maintainance driver.
+
+config ISDN_DIVAS_USERIDI
+	tristate "DIVA User-IDI interface support"
+	depends on ISDN_DIVAS
+	help
+	  Enable support for user-mode IDI interface.
+
+endmenu
+
diff -Nru a/drivers/isdn/hardware/eicon/Makefile b/drivers/isdn/hardware/eicon/Makefile
--- a/drivers/isdn/hardware/eicon/Makefile	Wed Oct 30 16:44:32 2002
+++ b/drivers/isdn/hardware/eicon/Makefile	Wed Oct 30 16:44:32 2002
@@ -26,6 +26,3 @@
 obj-$(CONFIG_ISDN_DIVAS_MAINT)         += diva_mnt.o
 obj-$(CONFIG_ISDN_DIVAS_USERIDI)       += diva_idi.o
 obj-$(CONFIG_ISDN_DIVAS_DIVACAPI)      += divacapi.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
--- a/drivers/isdn/hardware/eicon/capifunc.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hardware/eicon/capifunc.c	Wed Oct 30 16:44:27 2002
@@ -173,7 +173,7 @@
     }
 		diva_os_leave_spin_lock (&ll_lock, &old_irql, "find free id");
     return(num);
-next_id:
+next_id:;
   }
 	diva_os_leave_spin_lock (&ll_lock, &old_irql, "find free id");
   return(999);
diff -Nru a/drivers/isdn/hisax/Config.help b/drivers/isdn/hisax/Config.help
--- a/drivers/isdn/hisax/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,271 +0,0 @@
-CONFIG_ISDN_DRV_HISAX
-  This is a driver supporting the Siemens chipset on various
-  ISDN-cards (like AVM A1, Elsa ISDN cards, Teles S0-16.0, Teles
-  S0-16.3, Teles S0-8, Teles/Creatix PnP, ITK micro ix1 and many
-  compatibles).
-
-  HiSax is just the name of this driver, not the name of any hardware.
-
-  If you have a card with such a chipset, you should say Y here and
-  also to the configuration option of the driver for your particular
-  card, below.
-
-CONFIG_HISAX_EURO
-  Say Y or N according to the D-channel protocol which your local
-  telephone service company provides.
-
-  The call control protocol E-DSS1 is used in most European countries.
-  If unsure, say Y.
-
-CONFIG_DE_AOC
-  If you want that the HiSax hardware driver sends messages to the
-  upper level of the isdn code on each AOCD (Advice Of Charge, During
-  the call -- transmission of the fee information during a call) and
-  on each AOCE (Advice Of Charge, at the End of the call --
-  transmission of fee information at the end of the call), say Y here.
-  This works only in Germany.
-
-CONFIG_HISAX_NO_SENDCOMPLETE
-  If you have trouble with some ugly exchanges or you live in
-  Australia select this option.
-
-CONFIG_HISAX_NO_LLC
-  If you have trouble with some ugly exchanges try to select this
-  option.
-
-CONFIG_HISAX_NO_KEYPAD
-  If you like to send special dial strings including * or # without
-  using the keypad protocol, select this option.
-
-CONFIG_HISAX_1TR6
-  Say Y or N according to the D-channel protocol which your local
-  telephone service company provides.
-
-  1TR6 is an old call control protocol which was used in Germany
-  before E-DSS1 was established. Nowadays, all new lines in Germany
-  use E-DSS1.
-
-CONFIG_HISAX_NI1
-  Enable this if you like to use ISDN in US on a NI1 basic rate
-  interface.
-
-CONFIG_HISAX_MAX_CARDS
-  This option allows you to specify the maximum number of cards which
-  the HiSax driver will be able to handle.  
-
-CONFIG_HISAX_16_0
-  This enables HiSax support for the Teles ISDN-cards S0-16.0, S0-8
-  and many compatibles.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port/shmem settings.
-
-CONFIG_HISAX_16_3
-  This enables HiSax support for the Teles ISDN-cards S0-16.3 the
-  Teles/Creatix PnP and the Teles PCMCIA.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_TELESPCI
-  This enables HiSax support for the Teles PCI.
-  See <file:Documentation/isdn/README.HiSax> on how to configure it.
-
-CONFIG_HISAX_S0BOX
-  This enables HiSax support for the Teles/Creatix parallel port
-  S0BOX.  See <file:Documentation/isdn/README.HiSax> on how to
-  configure it.
-
-CONFIG_HISAX_AVM_A1
-  This enables HiSax support for the AVM A1 (aka "Fritz").
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_FRITZPCI
-  This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI".
-  See <file:Documentation/isdn/README.HiSax> on how to configure it.
-
-CONFIG_HISAX_AVM_A1_PCMCIA
-  This enables HiSax support for the AVM A1 "Fritz!PCMCIA").
-  See <file:Documentation/isdn/README.HiSax> on how to configure it.
-
-CONFIG_HISAX_ELSA
-  This enables HiSax support for the Elsa Mircolink ISA cards, for the
-  Elsa Quickstep series cards and Elsa PCMCIA.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_IX1MICROR2
-  This enables HiSax support for the ITK ix1-micro Revision 2 card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_DIEHLDIVA
-  This enables HiSax support for the Eicon.Diehl Diva none PRO
-  versions passive ISDN cards.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_ASUSCOM
-  This enables HiSax support for the AsusCom and their OEM versions
-  passive ISDN ISA cards.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_TELEINT
-  This enables HiSax support for the TELEINT SA1 semiactiv ISDN card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_HFCS
-  This enables HiSax support for the HFC-S 2BDS0 based cards, like
-  teles 16.3c.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_SEDLBAUER
-  This enables HiSax support for the Sedlbauer passive ISDN cards.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using the different cards, a different D-channel protocol, or
-  non-standard IRQ/port settings.
-
-CONFIG_HISAX_SPORTSTER
-  This enables HiSax support for the USR Sportster internal TA card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_MIC
-  This enables HiSax support for the ITH MIC card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_NETJET
-  This enables HiSax support for the NetJet from Traverse
-  Technologies.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_NETJET_U
-  This enables HiSax support for the Netspider U interface ISDN card
-  from Traverse Technologies.
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_NICCY
-  This enables HiSax support for the Dr. Neuhaus Niccy PnP or PCI.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_ISURF
-  This enables HiSax support for the Siemens I-Talk/I-Surf card with
-  ISAR chip.
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_HSTSAPHIR
-  This enables HiSax support for the HST Saphir card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_BKM_A4T
-  This enables HiSax support for the Telekom A4T card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_SCT_QUADRO
-  This enables HiSax support for the Scitel Quadro card.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_GAZEL
-  This enables HiSax support for the Gazel cards.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_HFC_PCI
-  This enables HiSax support for the HFC-S PCI 2BDS0 based cards.
-
-  For more informations see under
-  <file:Documentation/isdn/README.hfc-pci>.
-
-CONFIG_HISAX_W6692
-  This enables HiSax support for Winbond W6692 based PCI ISDN cards.
-
-  See <file:Documentation/isdn/README.HiSax> on how to configure it
-  using a different D-channel protocol, or non-standard IRQ/port
-  settings.
-
-CONFIG_HISAX_HFC_SX
-  This enables HiSax support for the HFC-S+, HFC-SP and HFC-PCMCIA
-  cards. This code is not finished yet.
-
-CONFIG_HISAX_AMD7930
-  This enables HiSax support for the AMD7930 chips on some SPARCs.
-  This code is not finished yet.
-
-CONFIG_HISAX_DEBUG
-  This enables debugging code in the new-style HiSax drivers, i.e.
-  the ST5481 USB driver currently. 
-  If in doubt, say yes.
-
-CONFIG_HISAX_ELSA_CS
-  This enables the PCMCIA client driver for the Elsa PCMCIA MicroLink
-  card.
-
-CONFIG_HISAX_SEDLBAUER_CS
-  This enables the PCMCIA client driver for the Sedlbauer Speed Star
-  and Speed Star II cards.
-
-CONFIG_HISAX_AVM_A1_CS
-  This enables the PCMCIA client driver for the AVM A1 / Fritz!Card
-  PCMCIA cards.
-
-CONFIG_HISAX_ST5481
-  This enables the driver for ST5481 based USB ISDN adapters,
-  e.g. the BeWan Gazel 128 USB
-
-CONFIG_HISAX_FRITZ_PCIPNP
-  This enables the driver for the AVM Fritz!Card PCI, Fritz!Card PCI v2 
-  and Fritz!Card PnP.
-  (the latter also needs you to select "ISA Plug and Play support"
-  from the menu "Plug and Play configuration")
-
-CONFIG_HISAX_FRITZ_CLASSIC
-  This enables the driver for the AVM Fritz!Card classic, formerly
-  known as AVM A1.
-
diff -Nru a/drivers/isdn/hisax/Config.in b/drivers/isdn/hisax/Config.in
--- a/drivers/isdn/hisax/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,62 +0,0 @@
-mainmenu_option next_comment
-comment 'Passive cards'
-dep_tristate 'HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN
-if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
-   comment '  D-channel protocol features'
-   bool '  HiSax Support for EURO/DSS1' CONFIG_HISAX_EURO
-   if [ "$CONFIG_HISAX_EURO" != "n" ]; then
-      bool '    Support for german chargeinfo' CONFIG_DE_AOC
-      bool '    Disable sending complete' CONFIG_HISAX_NO_SENDCOMPLETE
-      bool '    Disable sending low layer compatibility' CONFIG_HISAX_NO_LLC
-      bool '    Disable keypad protocol option' CONFIG_HISAX_NO_KEYPAD
-   fi
-   bool '  HiSax Support for german 1TR6' CONFIG_HISAX_1TR6
-   bool '  HiSax Support for US NI1' CONFIG_HISAX_NI1
-   int  '  Maximum number of cards supported by HiSax' CONFIG_HISAX_MAX_CARDS 8
-   comment '  HiSax supported cards'
-   dep_bool '  Teles 16.0/8.0' CONFIG_HISAX_16_0 $CONFIG_ISA
-   bool '  Teles 16.3 or PNP or PCMCIA' CONFIG_HISAX_16_3
-   bool '  Teles PCI' CONFIG_HISAX_TELESPCI 
-   bool '  Teles S0Box' CONFIG_HISAX_S0BOX 
-   dep_bool '  AVM A1 (Fritz)' CONFIG_HISAX_AVM_A1 $CONFIG_ISA
-   bool '  AVM PnP/PCI (Fritz!PnP/PCI)' CONFIG_HISAX_FRITZPCI
-   bool '  AVM A1 PCMCIA (Fritz)' CONFIG_HISAX_AVM_A1_PCMCIA
-   bool '  Elsa cards' CONFIG_HISAX_ELSA
-   dep_bool '  ITK ix1-micro Revision 2' CONFIG_HISAX_IX1MICROR2 $CONFIG_ISA
-   bool '  Eicon.Diehl Diva cards' CONFIG_HISAX_DIEHLDIVA
-   dep_bool '  ASUSCOM ISA cards' CONFIG_HISAX_ASUSCOM $CONFIG_ISA
-   dep_bool '  TELEINT cards' CONFIG_HISAX_TELEINT $CONFIG_ISA
-   dep_bool '  HFC-S based cards' CONFIG_HISAX_HFCS $CONFIG_ISA
-   bool '  Sedlbauer cards' CONFIG_HISAX_SEDLBAUER
-   dep_bool '  USR Sportster internal TA' CONFIG_HISAX_SPORTSTER $CONFIG_ISA
-   dep_bool '  MIC card' CONFIG_HISAX_MIC $CONFIG_ISA
-   bool '  NETjet card' CONFIG_HISAX_NETJET
-   bool '  NETspider U card' CONFIG_HISAX_NETJET_U
-   bool '  Niccy PnP/PCI card' CONFIG_HISAX_NICCY
-   dep_bool '  Siemens I-Surf card' CONFIG_HISAX_ISURF $CONFIG_ISA
-   dep_bool '  HST Saphir card' CONFIG_HISAX_HSTSAPHIR $CONFIG_ISA
-   bool '  Telekom A4T card' CONFIG_HISAX_BKM_A4T 
-   bool '  Scitel Quadro card' CONFIG_HISAX_SCT_QUADRO
-   bool '  Gazel cards' CONFIG_HISAX_GAZEL
-   bool '  HFC PCI-Bus cards' CONFIG_HISAX_HFC_PCI
-   bool '  Winbond W6692 based cards' CONFIG_HISAX_W6692
-   bool '  HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
-   if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
-#      bool '  TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
-      bool '  Formula-n enter:now PCI card (EXPERIMENTAL)' CONFIG_HISAX_ENTERNOW_PCI
-      if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-	 bool '  Am7930 (EXPERIMENTAL)' CONFIG_HISAX_AMD7930
-      fi
-   fi
-   bool '  HiSax debugging' CONFIG_HISAX_DEBUG
-
-   dep_tristate 'Sedlbauer PCMCIA cards'                              CONFIG_HISAX_SEDLBAUER_CS  $CONFIG_ISDN_DRV_HISAX $CONFIG_PCMCIA
-   dep_tristate 'ELSA PCMCIA MicroLink cards'                         CONFIG_HISAX_ELSA_CS       $CONFIG_ISDN_DRV_HISAX $CONFIG_PCMCIA
-   dep_tristate 'AVM A1 PCMCIA cards'                                 CONFIG_HISAX_AVM_A1_CS     $CONFIG_ISDN_DRV_HISAX $CONFIG_PCMCIA
-   dep_tristate 'ST5481 USB ISDN modem (EXPERIMENTAL)'                CONFIG_HISAX_ST5481        $CONFIG_ISDN_DRV_HISAX $CONFIG_USB $CONFIG_EXPERIMENTAL
-   dep_tristate 'AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)' CONFIG_HISAX_FRITZ_PCIPNP  $CONFIG_ISDN_DRV_HISAX $CONFIG_EXPERIMENTAL
-   dep_tristate 'AVM Fritz!Card classic support (EXPERIMENTAL)'       CONFIG_HISAX_FRITZ_CLASSIC $CONFIG_ISDN_DRV_HISAX  $CONFIG_EXPERIMENTAL
-   dep_tristate 'HFC PCI support (EXPERIMENTAL)'                      CONFIG_HISAX_HFCPCI        $CONFIG_ISDN_DRV_HISAX $CONFIG_EXPERIMENTAL
-fi
-endmenu
-
diff -Nru a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/hisax/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,425 @@
+
+menu "Passive cards"
+	depends on NET && ISDN_BOOL && ISDN!=n
+
+config ISDN_DRV_HISAX
+	tristate "HiSax SiemensChipSet driver support"
+	depends on ISDN
+	---help---
+	  This is a driver supporting the Siemens chipset on various
+	  ISDN-cards (like AVM A1, Elsa ISDN cards, Teles S0-16.0, Teles
+	  S0-16.3, Teles S0-8, Teles/Creatix PnP, ITK micro ix1 and many
+	  compatibles).
+
+	  HiSax is just the name of this driver, not the name of any hardware.
+
+	  If you have a card with such a chipset, you should say Y here and
+	  also to the configuration option of the driver for your particular
+	  card, below.
+
+comment "D-channel protocol features"
+	depends on ISDN_DRV_HISAX
+
+config HISAX_EURO
+	bool "HiSax Support for EURO/DSS1"
+	depends on ISDN_DRV_HISAX
+	help
+	  Say Y or N according to the D-channel protocol which your local
+	  telephone service company provides.
+
+	  The call control protocol E-DSS1 is used in most European countries.
+	  If unsure, say Y.
+
+config DE_AOC
+	bool "Support for german chargeinfo"
+	depends on HISAX_EURO
+	help
+	  If you want that the HiSax hardware driver sends messages to the
+	  upper level of the isdn code on each AOCD (Advice Of Charge, During
+	  the call -- transmission of the fee information during a call) and
+	  on each AOCE (Advice Of Charge, at the End of the call --
+	  transmission of fee information at the end of the call), say Y here.
+	  This works only in Germany.
+
+config HISAX_NO_SENDCOMPLETE
+	bool "Disable sending complete"
+	depends on HISAX_EURO
+	help
+	  If you have trouble with some ugly exchanges or you live in
+	  Australia select this option.
+
+config HISAX_NO_LLC
+	bool "Disable sending low layer compatibility"
+	depends on HISAX_EURO
+	help
+	  If you have trouble with some ugly exchanges try to select this
+	  option.
+
+config HISAX_NO_KEYPAD
+	bool "Disable keypad protocol option"
+	depends on HISAX_EURO
+	help
+	  If you like to send special dial strings including * or # without
+	  using the keypad protocol, select this option.
+
+config HISAX_1TR6
+	bool "HiSax Support for german 1TR6"
+	depends on ISDN_DRV_HISAX
+	help
+	  Say Y or N according to the D-channel protocol which your local
+	  telephone service company provides.
+
+	  1TR6 is an old call control protocol which was used in Germany
+	  before E-DSS1 was established. Nowadays, all new lines in Germany
+	  use E-DSS1.
+
+config HISAX_NI1
+	bool "HiSax Support for US NI1"
+	depends on ISDN_DRV_HISAX
+	help
+	  Enable this if you like to use ISDN in US on a NI1 basic rate
+	  interface.
+
+config HISAX_MAX_CARDS
+	int "Maximum number of cards supported by HiSax"
+	depends on ISDN_DRV_HISAX
+	default "8"
+	help
+	  This option allows you to specify the maximum number of cards which
+	  the HiSax driver will be able to handle.  
+
+comment "HiSax supported cards"
+	depends on ISDN_DRV_HISAX
+
+config HISAX_16_0
+	bool "Teles 16.0/8.0"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the Teles ISDN-cards S0-16.0, S0-8
+	  and many compatibles.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port/shmem settings.
+
+config HISAX_16_3
+	bool "Teles 16.3 or PNP or PCMCIA"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Teles ISDN-cards S0-16.3 the
+	  Teles/Creatix PnP and the Teles PCMCIA.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_TELESPCI
+	bool "Teles PCI"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Teles PCI.
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it.
+
+config HISAX_S0BOX
+	bool "Teles S0Box"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Teles/Creatix parallel port
+	  S0BOX.  See <file:Documentation/isdn/README.HiSax> on how to
+	  configure it.
+
+config HISAX_AVM_A1
+	bool "AVM A1 (Fritz)"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the AVM A1 (aka "Fritz").
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_FRITZPCI
+	bool "AVM PnP/PCI (Fritz!PnP/PCI)"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI".
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it.
+
+config HISAX_AVM_A1_PCMCIA
+	bool "AVM A1 PCMCIA (Fritz)"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the AVM A1 "Fritz!PCMCIA").
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it.
+
+config HISAX_ELSA
+	bool "Elsa cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Elsa Mircolink ISA cards, for the
+	  Elsa Quickstep series cards and Elsa PCMCIA.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_IX1MICROR2
+	bool "ITK ix1-micro Revision 2"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the ITK ix1-micro Revision 2 card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_DIEHLDIVA
+	bool "Eicon.Diehl Diva cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Eicon.Diehl Diva none PRO
+	  versions passive ISDN cards.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_ASUSCOM
+	bool "ASUSCOM ISA cards"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the AsusCom and their OEM versions
+	  passive ISDN ISA cards.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_TELEINT
+	bool "TELEINT cards"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the TELEINT SA1 semiactiv ISDN card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_HFCS
+	bool "HFC-S based cards"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the HFC-S 2BDS0 based cards, like
+	  teles 16.3c.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_SEDLBAUER
+	bool "Sedlbauer cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Sedlbauer passive ISDN cards.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using the different cards, a different D-channel protocol, or
+	  non-standard IRQ/port settings.
+
+config HISAX_SPORTSTER
+	bool "USR Sportster internal TA"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the USR Sportster internal TA card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_MIC
+	bool "MIC card"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the ITH MIC card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_NETJET
+	bool "NETjet card"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the NetJet from Traverse
+	  Technologies.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_NETJET_U
+	bool "NETspider U card"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Netspider U interface ISDN card
+	  from Traverse Technologies.
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_NICCY
+	bool "Niccy PnP/PCI card"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Dr. Neuhaus Niccy PnP or PCI.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_ISURF
+	bool "Siemens I-Surf card"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the Siemens I-Talk/I-Surf card with
+	  ISAR chip.
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_HSTSAPHIR
+	bool "HST Saphir card"
+	depends on ISDN_DRV_HISAX && ISA
+	help
+	  This enables HiSax support for the HST Saphir card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_BKM_A4T
+	bool "Telekom A4T card"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Telekom A4T card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_SCT_QUADRO
+	bool "Scitel Quadro card"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Scitel Quadro card.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_GAZEL
+	bool "Gazel cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the Gazel cards.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_HFC_PCI
+	bool "HFC PCI-Bus cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the HFC-S PCI 2BDS0 based cards.
+
+	  For more informations see under
+	  <file:Documentation/isdn/README.hfc-pci>.
+
+config HISAX_W6692
+	bool "Winbond W6692 based cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for Winbond W6692 based PCI ISDN cards.
+
+	  See <file:Documentation/isdn/README.HiSax> on how to configure it
+	  using a different D-channel protocol, or non-standard IRQ/port
+	  settings.
+
+config HISAX_HFC_SX
+	bool "HFC-S+, HFC-SP, HFC-PCMCIA cards"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables HiSax support for the HFC-S+, HFC-SP and HFC-PCMCIA
+	  cards. This code is not finished yet.
+
+#      bool '  TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
+config HISAX_ENTERNOW_PCI
+	bool "Formula-n enter:now PCI card (EXPERIMENTAL)"
+	depends on ISDN_DRV_HISAX && EXPERIMENTAL
+
+config HISAX_AMD7930
+	bool "Am7930 (EXPERIMENTAL)"
+	depends on ISDN_DRV_HISAX && EXPERIMENTAL && (SPARC32 || SPARC64)
+	help
+	  This enables HiSax support for the AMD7930 chips on some SPARCs.
+	  This code is not finished yet.
+
+config HISAX_DEBUG
+	bool "HiSax debugging"
+	depends on ISDN_DRV_HISAX
+	help
+	  This enables debugging code in the new-style HiSax drivers, i.e.
+	  the ST5481 USB driver currently. 
+	  If in doubt, say yes.
+
+config HISAX_SEDLBAUER_CS
+	tristate "Sedlbauer PCMCIA cards"
+	depends on ISDN_DRV_HISAX && PCMCIA
+	help
+	  This enables the PCMCIA client driver for the Sedlbauer Speed Star
+	  and Speed Star II cards.
+
+config HISAX_ELSA_CS
+	tristate "ELSA PCMCIA MicroLink cards"
+	depends on ISDN_DRV_HISAX && PCMCIA
+	help
+	  This enables the PCMCIA client driver for the Elsa PCMCIA MicroLink
+	  card.
+
+config HISAX_AVM_A1_CS
+	tristate "AVM A1 PCMCIA cards"
+	depends on ISDN_DRV_HISAX && PCMCIA
+	help
+	  This enables the PCMCIA client driver for the AVM A1 / Fritz!Card
+	  PCMCIA cards.
+
+config HISAX_ST5481
+	tristate "ST5481 USB ISDN modem (EXPERIMENTAL)"
+	depends on ISDN_DRV_HISAX && USB && EXPERIMENTAL
+	help
+	  This enables the driver for ST5481 based USB ISDN adapters,
+	  e.g. the BeWan Gazel 128 USB
+
+config HISAX_FRITZ_PCIPNP
+	tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)"
+	depends on ISDN_DRV_HISAX && EXPERIMENTAL
+	help
+	  This enables the driver for the AVM Fritz!Card PCI, Fritz!Card PCI v2 
+	  and Fritz!Card PnP.
+	  (the latter also needs you to select "ISA Plug and Play support"
+	  from the menu "Plug and Play configuration")
+
+config HISAX_FRITZ_CLASSIC
+	tristate "AVM Fritz!Card classic support (EXPERIMENTAL)"
+	depends on ISDN_DRV_HISAX && EXPERIMENTAL
+	help
+	  This enables the driver for the AVM Fritz!Card classic, formerly
+	  known as AVM A1.
+
+config HISAX_HFCPCI
+	tristate "HFC PCI support (EXPERIMENTAL)"
+	depends on ISDN_DRV_HISAX && EXPERIMENTAL
+
+endmenu
+
diff -Nru a/drivers/isdn/hisax/Makefile b/drivers/isdn/hisax/Makefile
--- a/drivers/isdn/hisax/Makefile	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/Makefile	Wed Oct 30 16:44:27 2002
@@ -65,5 +65,3 @@
 
 CERT := $(shell cd $(src); md5sum -c md5sums.asc > /dev/null 2> /dev/null ;echo $$?)
 CFLAGS_cert.o := -DCERTIFICATION=$(CERT)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/hisax/amd7930.c b/drivers/isdn/hisax/amd7930.c
--- a/drivers/isdn/hisax/amd7930.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/amd7930.c	Wed Oct 30 16:44:27 2002
@@ -106,8 +106,9 @@
 static void Bchan_fill_fifo(struct BCState *, struct sk_buff *);
 
 static void
-Bchan_xmt_bh(struct BCState *bcs)
+Bchan_xmt_bh(void *data)
 {
+	struct BCState *bcs = data;
 	struct sk_buff *skb;
 
 	if (bcs->hw.amd7930.tx_skb != NULL) {
@@ -120,14 +121,14 @@
 	} else {
 		clear_bit(BC_FLG_BUSY, &bcs->Flag);
 		bcs->event |= 1 << B_XMTBUFREADY;
-		schedule_work(&bcs->tqueue);
+		schedule_work(&bcs->work);
 	}
 }
 
 static void
 Bchan_xmit_callback(struct BCState *bcs)
 {
-	schedule_work(&bcs->hw.amd7930.tq_xmt);
+	schedule_work(&bcs->hw.amd7930.xmt_work);
 }
 
 /* B channel transmission: two modes (three, if you count L1_MODE_NULL)
@@ -259,12 +260,13 @@
 			      (void *) &Bchan_recv_callback, (void *) bcs);
 	}
 
-	schedule_work(&hw->tq_rcv);
+	schedule_work(&hw->rcv_work);
 }
 
 static void
-Bchan_rcv_bh(struct BCState *bcs)
+Bchan_rcv_bh(void *data)
 {
+	struct BCState *bcs = data;
 	struct IsdnCardState *cs = bcs->cs;
 	struct amd7930_hw *hw = &bcs->hw.amd7930;
 	struct sk_buff *skb;
@@ -305,7 +307,7 @@
 						skb_queue_tail(&bcs->rqueue, hw->rv_skb);
 						hw->rv_skb = skb;
 						bcs->event |= 1 << B_RCVBUFREADY;
-						schedule_work(&bcs->tqueue);
+						schedule_work(&bcs->work);
 					}
 				} else if (len > 0) {
 					/* Small packet received */
@@ -316,7 +318,7 @@
 						memcpy(skb_put(skb, len), hw->rv_skb->tail, len);
 						skb_queue_tail(&bcs->rqueue, skb);
 						bcs->event |= 1 << B_RCVBUFREADY;
-						schedule_work(&bcs->tqueue);
+						schedule_work(&bcs->work);
 					}
 				} else {
 					/* Reception Error */
@@ -332,7 +334,7 @@
 				       RCV_BUFSIZE/RCV_BUFBLKS);
 				skb_queue_tail(&bcs->rqueue, skb);
 				bcs->event |= 1 << B_RCVBUFREADY;
-				schedule_work(&bcs->tqueue);
+				schedule_work(&bcs->work);
 			}
 		}
 
@@ -416,12 +418,8 @@
 		return;
 	}
 
-	bcs->hw.amd7930.tq_rcv.sync = 0;
-	INIT_WORK(&bcs->hw.amd7930.tq_rcv, (void (*)(void *)) &Bchan_rcv_bh,
-			(void *) bcs);
-
-	INIT_WORK(&bcs->hw.amd7930.tq_xmt, (void (*)(void *)) &Bchan_xmt_bh,
-			(void *) bcs);
+	INIT_WORK(&bcs->hw.amd7930.rcv_work, &Bchan_rcv_bh, bcs);
+	INIT_WORK(&bcs->hw.amd7930.xmt_work, &Bchan_xmt_bh, bcs);
 }
 
 static void
diff -Nru a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
--- a/drivers/isdn/hisax/amd7930_fn.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/hisax/amd7930_fn.c	Wed Oct 30 16:44:29 2002
@@ -232,9 +232,9 @@
 
 
 static void
-Amd7930_bh(struct IsdnCardState *cs)
+Amd7930_bh(void *data)
 {
-
+	struct IsdnCardState *cs = data;
         struct PStack *stptr;
 
 	if (!cs)
@@ -277,7 +277,7 @@
         }
 
         test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 static void
@@ -790,7 +790,7 @@
         cs->dc.amd7930.old_state = 0;
         cs->dc.amd7930.lmr1 = 0x40;
         cs->dc.amd7930.ph_command = Amd7930_ph_command;
-	INIT_WORK(&cs->tqueue, (void *) (void *) Amd7930_bh, NULL);
+	INIT_WORK(&cs->work, Amd7930_bh, cs);
 	cs->setstack_d = setstack_Amd7930;
 	cs->DC_Close = DC_Close_Amd7930;
 	cs->dbusytimer.function = (void *) dbusy_timer_handler;
diff -Nru a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c
--- a/drivers/isdn/hisax/asuscom.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/isdn/hisax/asuscom.c	Wed Oct 30 16:44:36 2002
@@ -24,6 +24,7 @@
 
 const char *Asuscom_revision = "$Revision: 1.11.6.3 $";
 
+static spinlock_t asuscom_lock = SPIN_LOCK_UNLOCKED;
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
@@ -46,13 +47,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&asuscom_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&asuscom_lock, flags);
 	return (ret);
 }
 
@@ -69,13 +69,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&asuscom_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&asuscom_lock, flags);
 }
 
 static inline void
@@ -263,14 +262,10 @@
 static void
 reset_asuscom(struct IsdnCardState *cs)
 {
-	long flags;
-
 	if (cs->subtyp == ASUS_IPAC)
 		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_POTA2, 0x20);
 	else
 		byteout(cs->hw.asus.adr, ASUS_RESET);	/* Reset On */
-	save_flags(flags);
-	sti();
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
 	if (cs->subtyp == ASUS_IPAC)
@@ -286,7 +281,6 @@
 		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_MASK, 0xc0);
 		writereg(cs->hw.asus.adr, cs->hw.asus.isac, IPAC_PCFG, 0x12);
 	}
-	restore_flags(flags);
 }
 
 static int
diff -Nru a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c
--- a/drivers/isdn/hisax/avm_a1.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/isdn/hisax/avm_a1.c	Wed Oct 30 16:44:21 2002
@@ -179,7 +179,6 @@
 {
 	u_char val;
 	struct IsdnCardState *cs = card->cs;
-	long flags;
 	char tmp[64];
 
 	strcpy(tmp, avm_revision);
@@ -254,9 +253,7 @@
 		release_ioregs(cs, 0x1f);
 		return (0);
 	}
-	save_flags(flags);
 	byteout(cs->hw.avm.cfg_reg, 0x0);
-	sti();
 	HZDELAY(HZ / 5 + 1);
 	byteout(cs->hw.avm.cfg_reg, 0x1);
 	HZDELAY(HZ / 5 + 1);
@@ -269,7 +266,6 @@
 	HZDELAY(HZ / 5 + 1);
 	byteout(cs->hw.avm.cfg_reg, 0x0);
 	HZDELAY(HZ / 5 + 1);
-	restore_flags(flags);
 
 	val = bytein(cs->hw.avm.cfg_reg);
 	printk(KERN_INFO "AVM A1: Byte at %x is %x\n",
diff -Nru a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
--- a/drivers/isdn/hisax/avm_a1p.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hisax/avm_a1p.c	Wed Oct 30 16:44:28 2002
@@ -57,116 +57,109 @@
 #define bytein(addr) inb(addr)
 
 static const char *avm_revision = "$Revision: 2.7.6.2 $";
+static spinlock_t avm_a1p_lock = SPIN_LOCK_UNLOCKED;
 
 static inline u_char
 ReadISAC(struct IsdnCardState *cs, u_char offset)
 {
-	long flags;
+	unsigned long flags;
         u_char ret;
 
         offset -= 0x20;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
         byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_REG_OFFSET+offset);
 	ret = bytein(cs->hw.avm.cfg_reg+DATAREG_OFFSET);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 	return ret;
 }
 
 static inline void
 WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
 {
-	long flags;
+	unsigned long flags;
 
         offset -= 0x20;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
         byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_REG_OFFSET+offset);
 	byteout(cs->hw.avm.cfg_reg+DATAREG_OFFSET, value);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 static inline void
 ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
 	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_FIFO_OFFSET);
 	insb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 static inline void
 WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
 	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,ISAC_FIFO_OFFSET);
 	outsb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 static inline u_char
 ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset)
 {
 	u_char ret;
-	long flags;
+	unsigned long flags;
 
         offset -= 0x20;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
 	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
 			HSCX_REG_OFFSET+hscx*HSCX_CH_DIFF+offset);
 	ret = bytein(cs->hw.avm.cfg_reg+DATAREG_OFFSET);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 	return ret;
 }
 
 static inline void
 WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value)
 {
-	long flags;
+	unsigned long flags;
 
         offset -= 0x20;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
 	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
 			HSCX_REG_OFFSET+hscx*HSCX_CH_DIFF+offset);
 	byteout(cs->hw.avm.cfg_reg+DATAREG_OFFSET, value);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 static inline void
 ReadHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
 	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
 			HSCX_FIFO_OFFSET+hscx*HSCX_CH_DIFF);
 	insb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 static inline void
 WriteHSCXfifo(struct IsdnCardState *cs, int hscx, u_char * data, int size)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_a1p_lock, flags);
 	byteout(cs->hw.avm.cfg_reg+ADDRREG_OFFSET,
 			HSCX_FIFO_OFFSET+hscx*HSCX_CH_DIFF);
 	outsb(cs->hw.avm.cfg_reg+DATAREG_OFFSET, data, size);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_a1p_lock, flags);
 }
 
 /*
@@ -253,7 +246,6 @@
 {
 	u_char model, vers;
 	struct IsdnCardState *cs = card->cs;
-	long flags;
 	char tmp[64];
 
 
@@ -267,9 +259,7 @@
 	cs->irq = card->para[0];
 
 
-	save_flags(flags);
 	outb(cs->hw.avm.cfg_reg+ASL1_OFFSET, ASL1_W_ENABLE_S0);
-        sti();
 
 	byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,0x00);
 	HZDELAY(HZ / 5 + 1);
@@ -278,8 +268,6 @@
 	byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET,0x00);
 
 	byteout(cs->hw.avm.cfg_reg+ASL0_OFFSET, ASL0_W_TDISABLE|ASL0_W_TRESET);
-
-	restore_flags(flags);
 
 	model = bytein(cs->hw.avm.cfg_reg+MODREG_OFFSET);
 	vers = bytein(cs->hw.avm.cfg_reg+VERREG_OFFSET);
diff -Nru a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
--- a/drivers/isdn/hisax/avm_pci.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/avm_pci.c	Wed Oct 30 16:44:27 2002
@@ -23,6 +23,7 @@
 
 extern const char *CardType[];
 static const char *avm_pci_rev = "$Revision: 1.22.6.6 $";
+static spinlock_t avm_pci_lock = SPIN_LOCK_UNLOCKED;
 
 #define  AVM_FRITZ_PCI		1
 #define  AVM_FRITZ_PNP		2
@@ -80,13 +81,12 @@
 {
 	register u_char idx = (offset > 0x2f) ? AVM_ISAC_REG_HIGH : AVM_ISAC_REG_LOW;
 	register u_char val;
-	register long flags;
+	register unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
 	val = inb(cs->hw.avm.isac + (offset & 0xf));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 	return (val);
 }
 
@@ -94,13 +94,12 @@
 WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value)
 {
 	register u_char idx = (offset > 0x2f) ? AVM_ISAC_REG_HIGH : AVM_ISAC_REG_LOW;
-	register long flags;
+	register unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
 	outb(value, cs->hw.avm.isac + (offset & 0xf));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
 static void
@@ -122,13 +121,12 @@
 {
 	register u_int idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
 	register u_int val;
-	register long flags;
+	register unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	outl(idx, cs->hw.avm.cfg_reg + 4);
 	val = inl(cs->hw.avm.isac + offset);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 	return (val);
 }
 
@@ -136,13 +134,12 @@
 WriteHDLCPCI(struct IsdnCardState *cs, int chan, u_char offset, u_int value)
 {
 	register u_int idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
-	register long flags;
+	register unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	outl(idx, cs->hw.avm.cfg_reg + 4);
 	outl(value, cs->hw.avm.isac + offset);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
 static inline u_char
@@ -150,13 +147,12 @@
 {
 	register u_char idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
 	register u_char val;
-	register long flags;
+	register unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
 	val = inb(cs->hw.avm.isac + offset);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 	return (val);
 }
 
@@ -164,13 +160,12 @@
 WriteHDLCPnP(struct IsdnCardState *cs, int chan, u_char offset, u_char value)
 {
 	register u_char idx = chan ? AVM_HDLC_2 : AVM_HDLC_1;
-	register long flags;
+	register unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	outb(idx, cs->hw.avm.cfg_reg + 4);
 	outb(value, cs->hw.avm.isac + offset);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
 static u_char
@@ -200,7 +195,7 @@
 hdlc_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 void
@@ -390,11 +385,10 @@
 static void
 fill_hdlc(struct BCState *bcs)
 {
-	long flags;
-	save_flags(flags);
-	cli();
+	unsigned long flags;
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	hdlc_fill_fifo(bcs);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
 static inline void
@@ -493,8 +487,7 @@
 	long  flags;
 	struct BCState *bcs;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&avm_pci_lock, flags);
 	if (cs->subtyp == AVM_FRITZ_PCI) {
 		stat = ReadHDLCPCI(cs, 0, HDLC_STATUS);
 	} else {
@@ -523,27 +516,26 @@
 		} else
 			HDLC_irq(bcs, stat);
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&avm_pci_lock, flags);
 }
 
 void
 hdlc_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&avm_pci_lock, flags);
 			if (st->l1.bcs->tx_skb) {
 				skb_queue_tail(&st->l1.bcs->squeue, skb);
-				restore_flags(flags);
+				spin_unlock_irqrestore(&avm_pci_lock, flags);
 			} else {
 				st->l1.bcs->tx_skb = skb;
 				test_and_set_bit(BC_FLG_BUSY, &st->l1.bcs->Flag);
 				st->l1.bcs->hw.hdlc.count = 0;
-				restore_flags(flags);
+				spin_unlock_irqrestore(&avm_pci_lock, flags);
 				st->l1.bcs->cs->BC_Send_Data(st->l1.bcs);
 			}
 			break;
@@ -716,11 +708,7 @@
 static void
 reset_avmpcipnp(struct IsdnCardState *cs)
 {
-	long flags;
-
 	printk(KERN_INFO "AVM PCI/PnP: reset\n");
-	save_flags(flags);
-	sti();
 	outb(AVM_STATUS0_RESET | AVM_STATUS0_DIS_TIMER, cs->hw.avm.cfg_reg + 2);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
diff -Nru a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c
--- a/drivers/isdn/hisax/bkm_a4t.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/bkm_a4t.c	Wed Oct 30 16:44:27 2002
@@ -21,6 +21,7 @@
 #include "bkm_ax.h"
 
 extern const char *CardType[];
+static spinlock_t bkm_a4t_lock = SPIN_LOCK_UNLOCKED;
 
 const char *bkm_a4t_revision = "$Revision: 1.13.6.6 $";
 
@@ -29,16 +30,15 @@
 readreg(unsigned int ale, unsigned long adr, u_char off)
 {
 	register u_int ret;
-	long flags;
+	unsigned long flags;
 	unsigned int *po = (unsigned int *) adr;	/* Postoffice */
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&bkm_a4t_lock, flags);
 	*po = (GCS_2 | PO_WRITE | off);
 	__WAITI20__(po);
 	*po = (ale | PO_READ);
 	__WAITI20__(po);
 	ret = *po;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&bkm_a4t_lock, flags);
 	return ((unsigned char) ret);
 }
 
@@ -56,15 +56,14 @@
 static inline void
 writereg(unsigned int ale, unsigned long adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 	unsigned int *po = (unsigned int *) adr;	/* Postoffice */
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&bkm_a4t_lock, flags);
 	*po = (GCS_2 | PO_WRITE | off);
 	__WAITI20__(po);
 	*po = (ale | PO_WRITE | data);
 	__WAITI20__(po);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&bkm_a4t_lock, flags);
 }
 
 
@@ -197,12 +196,8 @@
 static void
 reset_bkm(struct IsdnCardState *cs)
 {
-	long flags;
-
 	if (cs->typ == ISDN_CTYPE_BKM_A4T) {
 		I20_REGISTER_FILE *pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base);
-		save_flags(flags);
-		sti();
 		/* Issue the I20 soft reset     */
 		pI20_Regs->i20SysControl = 0xFF;	/* all in */
 		set_current_state(TASK_UNINTERRUPTIBLE);
@@ -229,7 +224,6 @@
 						g_A4T_ISAR_RES);
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout((10 * HZ) / 1000);
-		restore_flags(flags);
 	}
 }
 
diff -Nru a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c
--- a/drivers/isdn/hisax/bkm_a8.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/isdn/hisax/bkm_a8.c	Wed Oct 30 16:44:32 2002
@@ -25,7 +25,7 @@
 #define	ATTEMPT_PCI_REMAPPING	/* Required for PLX rev 1 */
 
 extern const char *CardType[];
-
+static spinlock_t bkm_a8_lock = SPIN_LOCK_UNLOCKED;
 const char sct_quadro_revision[] = "$Revision: 1.14.6.7 $";
 
 static const char *sct_quadro_subtypes[] =
@@ -45,12 +45,11 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
-	save_flags(flags);
-	cli();
+	unsigned long flags;
+	spin_lock_irqsave(&bkm_a8_lock, flags);
 	wordout(ale, off);
 	ret = wordin(adr) & 0xFF;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&bkm_a8_lock, flags);
 	return (ret);
 }
 
@@ -68,12 +67,11 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
-	save_flags(flags);
-	cli();
+	unsigned long flags;
+	spin_lock_irqsave(&bkm_a8_lock, flags);
 	wordout(ale, off);
 	wordout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&bkm_a8_lock, flags);
 }
 
 static inline void
@@ -223,19 +221,14 @@
 static void
 reset_bkm(struct IsdnCardState *cs)
 {
-	long flags;
-
 	if (cs->subtyp == SCT_1) {
 		wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) & ~4));
-		save_flags(flags);
-		sti();
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout((10 * HZ) / 1000);
 		/* Remove the soft reset */
 		wordout(cs->hw.ax.plx_adr + 0x50, (wordin(cs->hw.ax.plx_adr + 0x50) | 4));
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout((10 * HZ) / 1000);
-		restore_flags(flags);
 	}
 }
 
diff -Nru a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c
--- a/drivers/isdn/hisax/callc.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hisax/callc.c	Wed Oct 30 16:44:28 2002
@@ -37,6 +37,7 @@
 
 static struct Fsm callcfsm;
 static int chancount;
+static spinlock_t callc_lock = SPIN_LOCK_UNLOCKED;
 
 /* experimental REJECT after ALERTING for CALLBACK to beat the 4s delay */
 #define ALERT_REJECT 0
@@ -1803,8 +1804,7 @@
 			return 0;
 		} else if (chanp->debug & 0x800)
 			link_debug(chanp, 1, "writebuf %d/%d/%d", len, chanp->bcs->tx_cnt,MAX_DATA_MEM);
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&callc_lock, flags);
 		nskb = skb_clone(skb, GFP_ATOMIC);
 		if (nskb) {
 			nskb->truesize = nskb->len;
@@ -1819,7 +1819,7 @@
 			dev_kfree_skb(skb);
 		} else
 			len = 0;
-		restore_flags(flags);
+		spin_unlock_irqrestore(&callc_lock, flags);
 	}
 	return (len);
 }
diff -Nru a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
--- a/drivers/isdn/hisax/config.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/isdn/hisax/config.c	Wed Oct 30 16:44:32 2002
@@ -99,6 +99,7 @@
 };
 
 void HiSax_closecard(int cardnr);
+static spinlock_t hisax_config_lock = SPIN_LOCK_UNLOCKED;
 
 #ifdef CONFIG_HISAX_ELSA
 #define DEFAULT_CARD ISDN_CTYPE_ELSA
@@ -708,14 +709,13 @@
 {
 	/* if head == NULL the fmt contains the full info */
 
-	long flags;
+	unsigned long flags;
 	int count, i;
 	u_char *p;
 	isdn_ctrl ic;
 	int len;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&hisax_config_lock, flags);
 	p = tmpbuf;
 	if (head) {
 		p += jiftime(p, jiffies);
@@ -732,13 +732,13 @@
 	if (!cs) {
 		printk(KERN_WARNING "HiSax: No CardStatus for message %s",
 		       p);
-		restore_flags(flags);
+		spin_unlock_irqrestore(&hisax_config_lock, flags);
 		return;
 	}
 	if (len > HISAX_STATUS_BUFSIZE) {
 		printk(KERN_WARNING "HiSax: status overflow %d/%d\n",
 		       len, HISAX_STATUS_BUFSIZE);
-		restore_flags(flags);
+		spin_unlock_irqrestore(&hisax_config_lock, flags);
 		return;
 	}
 	count = len;
@@ -767,7 +767,7 @@
 		count++;
 	}
 #endif
-	restore_flags(flags);
+	spin_unlock_irqrestore(&hisax_config_lock, flags);
 	if (count) {
 		ic.command = ISDN_STAT_STAVAIL;
 		ic.driver = cs->myid;
@@ -787,16 +787,12 @@
 
 int ll_run(struct IsdnCardState *cs, int addfeatures)
 {
-	long flags;
 	isdn_ctrl ic;
 
-	save_flags(flags);
-	cli();
 	ic.driver = cs->myid;
 	ic.command = ISDN_STAT_RUN;
 	cs->iif.features |= addfeatures;
 	cs->iif.statcallb(&ic);
-	restore_flags(flags);
 	return 0;
 }
 
@@ -857,28 +853,23 @@
 static int __devinit init_card(struct IsdnCardState *cs)
 {
 	int irq_cnt, cnt = 3;
-	long flags;
 
 	if (!cs->irq)
 		return cs->cardmsg(cs, CARD_INIT, NULL);
-	save_flags(flags);
-	cli();
+
 	irq_cnt = kstat_irqs(cs->irq);
 	printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ],
 	       cs->irq, irq_cnt);
 	if (request_irq(cs->irq, cs->irq_func, cs->irq_flags, "HiSax", cs)) {
 		printk(KERN_WARNING "HiSax: couldn't get interrupt %d\n",
 		       cs->irq);
-		restore_flags(flags);
 		return 1;
 	}
 	while (cnt) {
 		cs->cardmsg(cs, CARD_INIT, NULL);
-		sti();
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		/* Timeout 10ms */
 		schedule_timeout((10 * HZ) / 1000);
-		restore_flags(flags);
 		printk(KERN_INFO "%s: IRQ %d count %d\n",
 		       CardType[cs->typ], cs->irq, kstat_irqs(cs->irq));
 		if (kstat_irqs(cs->irq) == irq_cnt) {
@@ -897,19 +888,15 @@
 			return 0;
 		}
 	}
-	restore_flags(flags);
 	return 3;
 }
 
 static int __devinit checkcard(int cardnr, char *id, int *busy_flag)
 {
-	long flags;
 	int ret = 0;
 	struct IsdnCard *card = cards + cardnr;
 	struct IsdnCardState *cs;
 
-	save_flags(flags);
-	cli();
 	cs = kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC);
 	if (!cs) {
 		printk(KERN_WARNING
@@ -1173,7 +1160,6 @@
 	cs->tx_skb = NULL;
 	cs->tx_cnt = 0;
 	cs->event = 0;
-	cs->tqueue.data = cs;
 
 	skb_queue_head_init(&cs->rq);
 	skb_queue_head_init(&cs->sq);
@@ -1216,7 +1202,6 @@
 	kfree(cs);
 	card->cs = NULL;
  out:
-	restore_flags(flags);
 	return ret;
 }
 
@@ -1542,10 +1527,7 @@
 static void __exit HiSax_exit(void)
 {
 	int cardnr = nrcards - 1;
-	long flags;
 
-	save_flags(flags);
-	cli();
 	while (cardnr >= 0)
 		HiSax_closecard(cardnr--);
 	Isdnl1Free();
@@ -1553,7 +1535,6 @@
 	Isdnl2Free();
 	Isdnl3Free();
 	CallcFree();
-	restore_flags(flags);
 	printk(KERN_INFO "HiSax module removed\n");
 }
 
@@ -1756,7 +1737,7 @@
 static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg);
 static int hisax_bc_setstack(struct PStack *st, struct BCState *bcs);
 static void hisax_bc_close(struct BCState *bcs);
-static void hisax_bh(struct IsdnCardState *cs);
+static void hisax_bh(void *data);
 static void EChannel_proc_rcv(struct hisax_d_if *d_if);
 
 int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[],
@@ -1788,7 +1769,7 @@
 	hisax_d_if->cs = cs;
 	cs->hw.hisax_d_if = hisax_d_if;
 	cs->cardmsg = hisax_cardmsg;
-	INIT_WORK(&cs->tqueue, (void *) (void *) hisax_bh, NULL);
+	INIT_WORK(&cs->work, hisax_bh, cs);
 	cs->channel[0].d_st->l1.l2l1 = hisax_d_l2l1;
 	for (i = 0; i < 2; i++) {
 		cs->bcs[i].BC_SetStack = hisax_bc_setstack;
@@ -1817,11 +1798,12 @@
 static void hisax_sched_event(struct IsdnCardState *cs, int event)
 {
 	cs->event |= 1 << event;
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
-static void hisax_bh(struct IsdnCardState *cs)
+static void hisax_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	struct PStack *st;
 	int pr;
 
@@ -1843,7 +1825,7 @@
 static void hisax_b_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 static inline void D_L2L1(struct hisax_d_if *d_if, int pr, void *arg)
diff -Nru a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
--- a/drivers/isdn/hisax/diva.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/isdn/hisax/diva.c	Wed Oct 30 16:44:34 2002
@@ -29,6 +29,7 @@
 extern const char *CardType[];
 
 const char *Diva_revision = "$Revision: 1.25.6.5 $";
+static spinlock_t diva_lock = SPIN_LOCK_UNLOCKED;
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -85,13 +86,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&diva_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&diva_lock, flags);
 	return (ret);
 }
 
@@ -108,13 +108,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&diva_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&diva_lock, flags);
 }
 
 static inline void
@@ -408,13 +407,12 @@
 static inline void
 MemWriteHSCXCMDR(struct IsdnCardState *cs, int hscx, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&diva_lock, flags);
 	MemwaitforCEC(cs, hscx);
 	MemWriteHSCX(cs, hscx, HSCX_CMDR, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&diva_lock, flags);
 }
 
 static void
@@ -422,7 +420,7 @@
 {
 	u_char *ptr;
 	struct IsdnCardState *cs = bcs->cs;
-	long flags;
+	unsigned long flags;
 	int cnt;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
@@ -435,8 +433,7 @@
 		bcs->hw.hscx.rcvidx = 0;
 		return;
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&diva_lock, flags);
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	cnt = count;
 	while (cnt--)
@@ -444,7 +441,7 @@
 	MemWriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80);
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	bcs->hw.hscx.rcvidx += count;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&diva_lock, flags);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -462,7 +459,7 @@
 	int more, count, cnt;
 	int fifo_size = test_bit(HW_IPAC, &cs->HW_Flags)? 64: 32;
 	u_char *ptr,*p;
-	long flags;
+	unsigned long flags;
 
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
@@ -481,8 +478,7 @@
 		count = bcs->tx_skb->len;
 	cnt = count;
 	MemwaitforXFW(cs, bcs->hw.hscx.hscx);
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&diva_lock, flags);
 	p = ptr = bcs->tx_skb->data;
 	skb_pull(bcs->tx_skb, count);
 	bcs->tx_cnt -= count;
@@ -491,7 +487,7 @@
 		memwritereg(cs->hw.diva.cfg_reg, bcs->hw.hscx.hscx ? 0x40 : 0,
 			*p++);
 	MemWriteHSCXCMDR(cs, bcs->hw.hscx.hscx, more ? 0x8 : 0xa);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&diva_lock, flags);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -753,10 +749,6 @@
 static void
 reset_diva(struct IsdnCardState *cs)
 {
-	long flags;
-
-	save_flags(flags);
-	sti();
 	if (cs->subtyp == DIVA_IPAC_ISA) {
 		writereg(cs->hw.diva.isac_adr, cs->hw.diva.isac, IPAC_POTA2, 0x20);
 		set_current_state(TASK_UNINTERRUPTIBLE);
@@ -803,7 +795,6 @@
 		}
 		byteout(cs->hw.diva.ctrl, cs->hw.diva.ctrl_reg);
 	}
-	restore_flags(flags);
 }
 
 #define DIVA_ASSIGN 1
diff -Nru a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
--- a/drivers/isdn/hisax/elsa.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/hisax/elsa.c	Wed Oct 30 16:44:24 2002
@@ -32,6 +32,7 @@
 #include <linux/serial_reg.h>
 
 extern const char *CardType[];
+static spinlock_t elsa_lock = SPIN_LOCK_UNLOCKED;
 
 const char *Elsa_revision = "$Revision: 2.26.6.6 $";
 const char *Elsa_Types[] =
@@ -145,13 +146,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&elsa_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_lock, flags);
 	return (ret);
 }
 
@@ -168,13 +168,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&elsa_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_lock, flags);
 }
 
 static inline void
@@ -253,26 +252,24 @@
 readitac(struct IsdnCardState *cs, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&elsa_lock, flags);
 	byteout(cs->hw.elsa.ale, off);
 	ret = bytein(cs->hw.elsa.itac);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_lock, flags);
 	return (ret);
 }
 
 static inline void
 writeitac(struct IsdnCardState *cs, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&elsa_lock, flags);
 	byteout(cs->hw.elsa.ale, off);
 	byteout(cs->hw.elsa.itac, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_lock, flags);
 }
 
 static inline int
@@ -486,8 +483,6 @@
 static void
 reset_elsa(struct IsdnCardState *cs)
 {
-	long flags;
-
 	if (cs->hw.elsa.timer) {
 		/* Wait 1 Timer */
 		byteout(cs->hw.elsa.timer, 0);
@@ -507,8 +502,6 @@
 			byteout(cs->hw.elsa.trig, 0xff);
 	}
 	if ((cs->subtyp == ELSA_QS1000PCI) || (cs->subtyp == ELSA_QS3000PCI) || (cs->subtyp == ELSA_PCMCIA_IPAC)) {
-		save_flags(flags);
-		sti();
 		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_POTA2, 0x20);
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
@@ -516,7 +509,6 @@
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_MASK, 0xc0);
 		schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
-		restore_flags(flags);
 		if (cs->subtyp != ELSA_PCMCIA_IPAC) {
 			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_ACFG, 0x0);
 			writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, IPAC_AOE, 0x3c);
@@ -677,7 +669,6 @@
 Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 {
 	int ret = 0;
-	long flags;
 
 	switch (mt) {
 		case CARD_RESET:
@@ -706,16 +697,13 @@
 			} else if (cs->subtyp == ELSA_QS3000PCI) {
 				ret = 0;
 			} else {
-				save_flags(flags);
 				cs->hw.elsa.counter = 0;
-				sti();
 				cs->hw.elsa.ctrl_reg |= ELSA_ENA_TIMER_INT;
 				cs->hw.elsa.status |= ELSA_TIMER_AKTIV;
 				byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
 				byteout(cs->hw.elsa.timer, 0);
 				set_current_state(TASK_UNINTERRUPTIBLE);
 				schedule_timeout((110*HZ)/1000);
-				restore_flags(flags);
 				cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT;
 				byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
 				cs->hw.elsa.status &= ~ELSA_TIMER_AKTIV;
@@ -798,7 +786,6 @@
 {
 	int i, in1, in2, p16_1 = 0, p16_2 = 0, p8_1 = 0, p8_2 = 0, pc_1 = 0,
 	 pc_2 = 0, pfp_1 = 0, pfp_2 = 0;
-	long flags;
 
 	/* In case of the elsa pcmcia card, this region is in use,
 	   reserved for us by the card manager. So we do not check it
@@ -809,8 +796,6 @@
 		       adr);
 		return (0);
 	}
-	save_flags(flags);
-	cli();
 	for (i = 0; i < 16; i++) {
 		in1 = inb(adr + ELSA_CONFIG);	/* 'toggelt' bei */
 		in2 = inb(adr + ELSA_CONFIG);	/* jedem Zugriff */
@@ -823,7 +808,6 @@
 		pfp_1 += 0x40 & in1;
 		pfp_2 += 0x40 & in2;
 	}
-	restore_flags(flags);
 	printk(KERN_INFO "Elsa: Probing IO 0x%x", adr);
 	if (65 == ++p16_1 * ++p16_2) {
 		printk(" PCC-16/PCF found\n");
@@ -878,7 +862,6 @@
 int __devinit
 setup_elsa(struct IsdnCard *card)
 {
-	long flags;
 	int bytecnt;
 	u_char val, pci_rev;
 	struct IsdnCardState *cs = card->cs;
@@ -1170,10 +1153,7 @@
 				return (0);
 			}
 		}
-		save_flags(flags);
-		sti();
 		HZDELAY(1);	/* wait >=10 ms */
-		restore_flags(flags);
 		if (TimerRun(cs)) {
 			printk(KERN_WARNING "Elsa: timer do not run down\n");
 			release_io_elsa(cs);
diff -Nru a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
--- a/drivers/isdn/hisax/elsa_ser.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/elsa_ser.c	Wed Oct 30 16:44:27 2002
@@ -30,6 +30,7 @@
 const char *ModemIn[] = {"RBR","IER","IIR","LCR","MCR","LSR","MSR","SCR"};
 const char *ModemOut[] = {"THR","IER","FCR","LCR","MCR","LSR","MSR","SCR"};
 #endif
+static spinlock_t elsa_ser_lock = SPIN_LOCK_UNLOCKED;
 
 static char *MInit_1 = "AT&F&C1E0&D2\r\0";
 static char *MInit_2 = "ATL2M1S64=13\r\0";
@@ -134,14 +135,13 @@
 	serial_outp(cs, UART_IER, cs->hw.elsa.IER);
 
 	debugl1(cs,"modem quot=0x%x", quot);
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&elsa_ser_lock, flags);
 	serial_outp(cs, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
 	serial_outp(cs, UART_DLL, quot & 0xff);		/* LS of divisor */
 	serial_outp(cs, UART_DLM, quot >> 8);		/* MS of divisor */
 	serial_outp(cs, UART_LCR, cval);		/* reset DLAB */
 	serial_inp(cs, UART_RX);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 }
 
 static int mstartup(struct IsdnCardState *cs)
@@ -150,7 +150,7 @@
 	int	retval=0;
 
 
-	save_flags(flags); cli();
+	spin_lock_irqsave(&elsa_ser_lock, flags);
 
 	/*
 	 * Clear the FIFO buffers and disable them
@@ -207,7 +207,7 @@
 	change_speed(cs, BASE_BAUD);
 	cs->hw.elsa.MFlag = 1;
 errout:
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 	return retval;
 }
 
@@ -224,7 +224,7 @@
 	printk(KERN_DEBUG"Shutting down serial ....");
 #endif
 	
-	save_flags(flags); cli(); /* Disable interrupts */
+	spin_lock_irqsave(&elsa_ser_lock, flags);  /* Disable interrupts */
 
 	/*
 	 * clear delta_msr_wait queue to avoid mem leaks: we may free the irq
@@ -245,7 +245,7 @@
 	serial_outp(cs, UART_FCR, (UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT));
 	serial_inp(cs, UART_RX);    /* read data port to reset things */
 	
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 #ifdef SERIAL_DEBUG_OPEN
 	printk(" done\n");
 #endif
@@ -256,14 +256,13 @@
 	int ret=0;
 	struct IsdnCardState *cs = bcs->cs;
 	int count, len, fp;
-	long flags;
+	unsigned long flags;
 	
 	if (!bcs->tx_skb)
 		return 0;
 	if (bcs->tx_skb->len <= 0)
 		return 0;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&elsa_ser_lock, flags);
 	len = bcs->tx_skb->len;
 	if (len > MAX_MODEM_BUF - cs->hw.elsa.transcnt)
 		len = MAX_MODEM_BUF - cs->hw.elsa.transcnt;
@@ -289,7 +288,7 @@
 			cs->hw.elsa.IER |= UART_IER_THRI;
 		serial_outp(cs, UART_IER, cs->hw.elsa.IER);
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 	return(ret);
 }
 
@@ -460,14 +459,13 @@
 modem_write_cmd(struct IsdnCardState *cs, u_char *buf, int len) {
 	int count, fp;
 	u_char *msg = buf;
-	long flags;
+	unsigned long flags;
 	
 	if (!len)
 		return;
-	save_flags(flags);
-	cli();		
+	spin_lock_irqsave(&elsa_ser_lock, flags);
 	if (len > (MAX_MODEM_BUF - cs->hw.elsa.transcnt)) {
-		restore_flags(flags);
+		spin_unlock_irqrestore(&elsa_ser_lock, flags);
 		return;
 	}
 	fp = cs->hw.elsa.transcnt + cs->hw.elsa.transp;
@@ -488,17 +486,16 @@
 		cs->hw.elsa.IER |= UART_IER_THRI;
 		serial_outp(cs, UART_IER, cs->hw.elsa.IER);
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 }
 
 void
 modem_set_init(struct IsdnCardState *cs) {
-	long flags;
+	unsigned long flags;
 	int timeout;
 
 #define RCV_DELAY 20000	
-	save_flags(flags);
-	sti();
+	spin_lock_irqsave(&elsa_ser_lock, flags);
 	modem_write_cmd(cs, MInit_1, strlen(MInit_1));
 	timeout = 1000;
 	while(timeout-- && cs->hw.elsa.transcnt)
@@ -541,17 +538,16 @@
 		udelay(1000);
 	debugl1(cs, "msi tout=%d", timeout);
 	udelay(RCV_DELAY);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 }
 
 void
 modem_set_dial(struct IsdnCardState *cs, int outgoing) {
-	long flags;
+	unsigned long flags;
 	int timeout;
 #define RCV_DELAY 20000	
 
-	save_flags(flags);
-	sti();
+	spin_lock_irqsave(&elsa_ser_lock, flags);
 	modem_write_cmd(cs, MInit_speed28800, strlen(MInit_speed28800));
 	timeout = 1000;
 	while(timeout-- && cs->hw.elsa.transcnt)
@@ -567,26 +563,25 @@
 		udelay(1000);
 	debugl1(cs, "msi tout=%d", timeout);
 	udelay(RCV_DELAY);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&elsa_ser_lock, flags);
 }
 
 void
 modem_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	if (pr == (PH_DATA | REQUEST)) {
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&elsa_ser_lock, flags);
 		if (st->l1.bcs->tx_skb) {
 			skb_queue_tail(&st->l1.bcs->squeue, skb);
-			restore_flags(flags);
+			spin_unlock_irqrestore(&elsa_ser_lock, flags);
 		} else {
 			st->l1.bcs->tx_skb = skb;
 			test_and_set_bit(BC_FLG_BUSY, &st->l1.bcs->Flag);
 			st->l1.bcs->hw.hscx.count = 0;
-			restore_flags(flags);
+			spin_unlock_irqrestore(&elsa_ser_lock, flags);
 			write_modem(st->l1.bcs);
 		}
 	} else if (pr == (PH_ACTIVATE | REQUEST)) {
diff -Nru a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c
--- a/drivers/isdn/hisax/enternow_pci.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/isdn/hisax/enternow_pci.c	Wed Oct 30 16:44:31 2002
@@ -75,7 +75,7 @@
 
 
 const char *enternow_pci_rev = "$Revision: 1.1.2.1 $";
-
+static spinlock_t enternow_pci_lock = SPIN_LOCK_UNLOCKED;
 
 /* *************************** I/O-Interface functions ************************************* */
 
@@ -137,13 +137,9 @@
 static void
 reset_enpci(struct IsdnCardState *cs)
 {
-	long flags;
-
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "enter:now PCI: reset");
 
-	save_flags(flags);
-	sti();
 	/* Reset on, (also for AMD) */
 	cs->hw.njet.ctrl_reg = 0x07;
 	OutByte(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
@@ -156,13 +152,11 @@
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	/* 80ms delay */
 	schedule_timeout((80*HZ)/1000);
-	restore_flags(flags);
 	cs->hw.njet.auxd = 0;  // LED-status
 	cs->hw.njet.dmactrl = 0;
 	OutByte(cs->hw.njet.base + NETJET_AUXCTRL, ~TJ_AMD_IRQ);
 	OutByte(cs->hw.njet.base + NETJET_IRQMASK1, TJ_AMD_IRQ);
 	OutByte(cs->hw.njet.auxa, cs->hw.njet.auxd); // LED off
-
 }
 
 
@@ -237,7 +231,7 @@
 {
 	struct IsdnCardState *cs = dev_id;
 	BYTE sval, ir;
-	long flags;
+	unsigned long flags;
 
 
 	if (!cs) {
@@ -257,8 +251,7 @@
 	/* DMA-Interrupt: B-channel-stuff */
 	/* set bits in sval to indicate which page is free */
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&enternow_pci_lock, flags);
 	/* set bits in sval to indicate which page is free */
 	if (inl(cs->hw.njet.base + NETJET_DMA_WRITE_ADR) <
 		inl(cs->hw.njet.base + NETJET_DMA_WRITE_IRQ))
@@ -275,11 +268,11 @@
 	if (sval != cs->hw.njet.last_is0) /* we have a DMA interrupt */
 	{
 		if (test_and_set_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags)) {
-			restore_flags(flags);
+			spin_unlock_irqrestore(&enternow_pci_lock, flags);
 			return;
 		}
 		cs->hw.njet.irqstat0 = sval;
-		restore_flags(flags);
+		spin_unlock_irqrestore(&enternow_pci_lock, flags);
 		if ((cs->hw.njet.irqstat0 & NETJET_IRQM0_READ) !=
 			(cs->hw.njet.last_is0 & NETJET_IRQM0_READ))
 			/* we have a read dma int */
@@ -290,7 +283,7 @@
 			write_tiger(cs);
 		test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags);
 	} else
-		restore_flags(flags);
+		spin_unlock_irqrestore(&enternow_pci_lock, flags);
 }
 
 
@@ -303,7 +296,7 @@
 	int bytecnt;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
-	long flags;
+	unsigned long flags;
 
 #if CONFIG_PCI
 #ifdef __BIG_ENDIAN
diff -Nru a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c
--- a/drivers/isdn/hisax/gazel.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/hisax/gazel.c	Wed Oct 30 16:44:29 2002
@@ -22,6 +22,7 @@
 
 extern const char *CardType[];
 const char *gazel_revision = "$Revision: 2.11.6.7 $";
+static spinlock_t gazel_lock = SPIN_LOCK_UNLOCKED;
 
 #define R647      1
 #define R685      2
@@ -72,26 +73,24 @@
 readreg_ipac(unsigned int adr, u_short off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&gazel_lock, flags);
 	byteout(adr, off);
 	ret = bytein(adr + 4);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&gazel_lock, flags);
 	return ret;
 }
 
 static inline void
 writereg_ipac(unsigned int adr, u_short off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&gazel_lock, flags);
 	byteout(adr, off);
 	byteout(adr + 4, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&gazel_lock, flags);
 }
 
 
@@ -357,18 +356,14 @@
 static int
 reset_gazel(struct IsdnCardState *cs)
 {
-	long flags;
 	unsigned long plxcntrl, addr = cs->hw.gazel.cfg_reg;
 
 	switch (cs->subtyp) {
 		case R647:
-			save_flags(flags);
-			cli();
 			writereg(addr, 0, 0);
 			HZDELAY(10);
 			writereg(addr, 0, 1);
 			HZDELAY(2);
-			restore_flags(flags);
 			break;
 		case R685:
 			plxcntrl = inl(addr + PLX_CNTRL);
diff -Nru a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c
--- a/drivers/isdn/hisax/hfc_2bds0.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/isdn/hisax/hfc_2bds0.c	Wed Oct 30 16:44:19 2002
@@ -202,7 +202,7 @@
 hfc_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 static struct sk_buff
@@ -608,8 +608,9 @@
 }
 
 static void
-hfcd_bh(struct IsdnCardState *cs)
+hfcd_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 /*	struct PStack *stptr;
 */
 	if (!cs)
@@ -645,7 +646,7 @@
 sched_event_D(struct IsdnCardState *cs, int event)
 {
 	test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 static
@@ -1127,7 +1128,7 @@
 	cs->dbusytimer.function = (void *) hfc_dbusy_timer;
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
-	INIT_WORK(&cs->tqueue, (void *) (void *) hfcd_bh, NULL);
+	INIT_WORK(&cs->work, hfcd_bh, cs);
 	if (!cs->hw.hfcD.send)
 		cs->hw.hfcD.send = init_send_hfcd(16);
 	if (!cs->bcs[0].hw.hfc.send)
diff -Nru a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c
--- a/drivers/isdn/hisax/hfc_2bs0.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/isdn/hisax/hfc_2bs0.c	Wed Oct 30 16:44:20 2002
@@ -86,7 +86,7 @@
 hfc_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 static void
diff -Nru a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
--- a/drivers/isdn/hisax/hfc_pci.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/hfc_pci.c	Wed Oct 30 16:44:27 2002
@@ -194,7 +194,7 @@
 sched_event_D_pci(struct IsdnCardState *cs, int event)
 {
 	test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 /*********************************/
@@ -204,7 +204,7 @@
 hfcpci_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 /************************************************/
@@ -1535,8 +1535,9 @@
 /* handle L1 state changes */
 /***************************/
 static void
-hfcpci_bh(struct IsdnCardState *cs)
+hfcpci_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	unsigned long flags;
 /*      struct PStack *stptr;
  */
@@ -1622,7 +1623,7 @@
 	cs->dbusytimer.function = (void *) hfcpci_dbusy_timer;
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
-	INIT_WORK(&cs->tqueue, (void *) (void *) hfcpci_bh, NULL);
+	INIT_WORK(&cs->work, hfcpci_bh, cs);
 	cs->BC_Send_Data = &hfcpci_send_data;
 	cs->bcs[0].BC_SetStack = setstack_2b;
 	cs->bcs[1].BC_SetStack = setstack_2b;
diff -Nru a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
--- a/drivers/isdn/hisax/hfc_sx.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/isdn/hisax/hfc_sx.c	Wed Oct 30 16:44:20 2002
@@ -464,7 +464,7 @@
 sched_event_D_sx(struct IsdnCardState *cs, int event)
 {
 	test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 /*********************************/
@@ -474,7 +474,7 @@
 hfcsx_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 /************************************************/
@@ -1323,8 +1323,9 @@
 /* handle L1 state changes */
 /***************************/
 static void
-hfcsx_bh(struct IsdnCardState *cs)
+hfcsx_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	unsigned long flags;
 /*      struct PStack *stptr;
  */
@@ -1410,7 +1411,7 @@
 	cs->dbusytimer.function = (void *) hfcsx_dbusy_timer;
 	cs->dbusytimer.data = (long) cs;
 	init_timer(&cs->dbusytimer);
-	INIT_WORK(&cs->tqueue, (void *) (void *) hfcsx_bh, NULL);
+	INIT_WORK(&cs->work, hfcsx_bh, cs);
 	cs->BC_Send_Data = &hfcsx_send_data;
 	cs->bcs[0].BC_SetStack = setstack_2b;
 	cs->bcs[1].BC_SetStack = setstack_2b;
diff -Nru a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c
--- a/drivers/isdn/hisax/hfcscard.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/isdn/hisax/hfcscard.c	Wed Oct 30 16:44:34 2002
@@ -64,15 +64,11 @@
 static void
 reset_hfcs(struct IsdnCardState *cs)
 {
-	long flags;
-
 	printk(KERN_INFO "HFCS: resetting card\n");
 	cs->hw.hfcD.cirm = HFCD_RESET;
 	if (cs->typ == ISDN_CTYPE_TELES3C)
 		cs->hw.hfcD.cirm |= HFCD_MEM8K;
 	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CIRM, cs->hw.hfcD.cirm);	/* Reset On */
-	save_flags(flags);
-	sti();
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((30*HZ)/1000);
 	cs->hw.hfcD.cirm = 0;
@@ -103,14 +99,11 @@
 	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m); /* HFC Master */
 	cs->hw.hfcD.sctrl = 0;
 	cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_SCTRL, cs->hw.hfcD.sctrl);
-	restore_flags(flags);
 }
 
 static int
 hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 {
-	long flags;
-
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "HFCS: card_msg %x", mt);
 	switch (mt) {
@@ -124,14 +117,11 @@
 			cs->hw.hfcD.timer.expires = jiffies + 75;
 			add_timer(&cs->hw.hfcD.timer);
 			init2bds0(cs);
-			save_flags(flags);
-			sti();
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((80*HZ)/1000);
 			cs->hw.hfcD.ctmt |= HFCD_TIM800;
 			cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcD.ctmt); 
 			cs->BC_Write_Reg(cs, HFCD_DATA, HFCD_MST_MODE, cs->hw.hfcD.mst_m);
-			restore_flags(flags);
 			return(0);
 		case CARD_TEST:
 			return(0);
diff -Nru a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
--- a/drivers/isdn/hisax/hisax.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/hisax/hisax.h	Wed Oct 30 16:44:29 2002
@@ -453,8 +453,8 @@
 	int rv_buff_out;
 	struct sk_buff *rv_skb;
 	struct hdlc_state *hdlc_state;
-	struct work_struct tq_rcv;
-	struct work_struct tq_xmt;
+	struct work_struct rcv_work;
+	struct work_struct xmt_work;
 };
 
 #define BC_FLG_INIT	1
@@ -495,7 +495,7 @@
 	u_char *blog;
 	u_char *conmsg;
 	struct timer_list transbusy;
-	struct work_struct tqueue;
+	struct work_struct work;
 	unsigned long event;
 	int  (*BC_SetStack) (struct PStack *, struct BCState *);
 	void (*BC_Close) (struct BCState *);
@@ -954,7 +954,7 @@
 	struct sk_buff *tx_skb;
 	int tx_cnt;
 	long event;
-	struct work_struct tqueue;
+	struct work_struct work;
 	struct timer_list dbusytimer;
 #ifdef ERROR_STATISTIC
 	int err_crc;
diff -Nru a/drivers/isdn/hisax/hscx.c b/drivers/isdn/hisax/hscx.c
--- a/drivers/isdn/hisax/hscx.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/isdn/hisax/hscx.c	Wed Oct 30 16:44:19 2002
@@ -95,7 +95,7 @@
 hscx_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 void
diff -Nru a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c
--- a/drivers/isdn/hisax/icc.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/isdn/hisax/icc.c	Wed Oct 30 16:44:19 2002
@@ -23,6 +23,7 @@
 
 #define DBUSY_TIMER_VALUE 80
 #define ARCOFI_USE 0
+static spinlock_t icc_lock = SPIN_LOCK_UNLOCKED;
 
 static char *ICCVer[] __initdata =
 {"2070 A1/A3", "2070 B1", "2070 B2/B3", "2070 V2.4"};
@@ -77,8 +78,9 @@
 }
 
 static void
-icc_bh(struct IsdnCardState *cs)
+icc_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	struct PStack *stptr;
 	
 	if (!cs)
@@ -112,7 +114,7 @@
 icc_empty_fifo(struct IsdnCardState *cs, int count)
 {
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "icc_empty_fifo");
@@ -127,11 +129,10 @@
 	}
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&icc_lock, flags);
 	cs->readisacfifo(cs, ptr, count);
 	cs->writeisac(cs, ICC_CMDR, 0x80);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&icc_lock, flags);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -146,7 +147,7 @@
 {
 	int count, more;
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "icc_fill_fifo");
@@ -163,8 +164,7 @@
 		more = !0;
 		count = 32;
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&icc_lock, flags);
 	ptr = cs->tx_skb->data;
 	skb_pull(cs->tx_skb, count);
 	cs->tx_cnt += count;
@@ -177,7 +177,7 @@
 	init_timer(&cs->dbusytimer);
 	cs->dbusytimer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000);
 	add_timer(&cs->dbusytimer);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&icc_lock, flags);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -191,7 +191,7 @@
 icc_sched_event(struct IsdnCardState *cs, int event)
 {
 	test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 void
@@ -200,7 +200,7 @@
 	u_char exval, v1;
 	struct sk_buff *skb;
 	unsigned int count;
-	long flags;
+	unsigned long flags;
 
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ICC interrupt %x", val);
@@ -227,8 +227,7 @@
 			if (count == 0)
 				count = 32;
 			icc_empty_fifo(cs, count);
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&icc_lock, flags);
 			if ((count = cs->rcvidx) > 0) {
 				cs->rcvidx = 0;
 				if (!(skb = alloc_skb(count, GFP_ATOMIC)))
@@ -238,7 +237,7 @@
 					skb_queue_tail(&cs->rq, skb);
 				}
 			}
-			restore_flags(flags);
+			spin_unlock_irqrestore(&icc_lock, flags);
 		}
 		cs->rcvidx = 0;
 		icc_sched_event(cs, D_RCVBUFREADY);
@@ -624,7 +623,7 @@
 void __init
 initicc(struct IsdnCardState *cs)
 {
-	INIT_WORK(&cs->tqueue, (void *) (void *) icc_bh, NULL);
+	INIT_WORK(&cs->work, icc_bh, cs);
 	cs->setstack_d = setstack_icc;
 	cs->DC_Close = DC_Close_icc;
 	cs->dc.icc.mon_tx = NULL;
diff -Nru a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
--- a/drivers/isdn/hisax/ipacx.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hisax/ipacx.c	Wed Oct 30 16:44:28 2002
@@ -23,7 +23,7 @@
 #define MAX_DFRAME_LEN_L1 300
 #define B_FIFO_SIZE       64
 #define D_FIFO_SIZE       32
-
+static spinlock_t ipacx_lock = SPIN_LOCK_UNLOCKED;
 
 // ipacx interrupt mask values    
 #define _MASK_IMASK     0x2E  // global mask
@@ -38,7 +38,7 @@
 static void dch_l2l1(struct PStack *st, int pr, void *arg);
 static void dbusy_timer_handler(struct IsdnCardState *cs);
 static void ipacx_new_ph(struct IsdnCardState *cs);
-static void dch_bh(struct IsdnCardState *cs);
+static void dch_bh(void *data);
 static void dch_sched_event(struct IsdnCardState *cs, int event);
 static void dch_empty_fifo(struct IsdnCardState *cs, int count);
 static void dch_fill_fifo(struct IsdnCardState *cs);
@@ -272,8 +272,9 @@
 // bottom half handler for D channel
 //----------------------------------------------------------
 static void
-dch_bh(struct IsdnCardState *cs)
+dch_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	struct PStack *st;
 	
 	if (!cs) return;
@@ -305,7 +306,7 @@
 dch_sched_event(struct IsdnCardState *cs, int event)
 {
 	set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 //----------------------------------------------------------
@@ -314,7 +315,7 @@
 static void 
 dch_empty_fifo(struct IsdnCardState *cs, int count)
 {
-	long flags;
+	unsigned long flags;
 	u_char *ptr;
 
 	if ((cs->debug &L1_DEB_ISAC) && !(cs->debug &L1_DEB_ISAC_FIFO))
@@ -332,11 +333,10 @@
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
   
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&ipacx_lock, flags);
 	cs->readisacfifo(cs, ptr, count);
 	cs->writeisac(cs, IPACX_CMDRD, 0x80); // RMC
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ipacx_lock, flags);
   
 	if (cs->debug &L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
@@ -353,7 +353,7 @@
 static void 
 dch_fill_fifo(struct IsdnCardState *cs)
 {
-	long flags;
+	unsigned long flags;
 	int count;
 	u_char cmd, *ptr;
 
@@ -371,8 +371,7 @@
 		cmd   = 0x0A; // XTF | XME
 	}
   
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&ipacx_lock, flags);
 	ptr = cs->tx_skb->data;
 	skb_pull(cs->tx_skb, count);
 	cs->tx_cnt += count;
@@ -387,7 +386,7 @@
 	init_timer(&cs->dbusytimer);
 	cs->dbusytimer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000);
 	add_timer(&cs->dbusytimer);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ipacx_lock, flags);
   
 	if (cs->debug &L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
@@ -406,7 +405,7 @@
 {
 	struct sk_buff *skb;
 	u_char istad, rstad;
-	long flags;
+	unsigned long flags;
 	int count;
 
 	istad = cs->readisac(cs, IPACX_ISTAD);
@@ -430,8 +429,7 @@
 			count &= D_FIFO_SIZE-1;
 			if (count == 0) count = D_FIFO_SIZE;
 			dch_empty_fifo(cs, count);
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&ipacx_lock, flags);
 			if ((count = cs->rcvidx) > 0) {
 	      cs->rcvidx = 0;
 				if (!(skb = dev_alloc_skb(count)))
@@ -441,7 +439,7 @@
 					skb_queue_tail(&cs->rq, skb);
 				}
 			}
-			restore_flags(flags);
+			spin_unlock_irqrestore(&ipacx_lock, flags);
     }
 	  cs->rcvidx = 0;
 		dch_sched_event(cs, D_RCVBUFREADY);
@@ -510,7 +508,7 @@
 {
 	printk(KERN_INFO "HiSax: IPACX ISDN driver v0.1.0\n");
 
-	INIT_WORK(&cs->tqueue, (void *)(void *) dch_bh, cs);
+	INIT_WORK(&cs->work, dch_bh, cs);
 	cs->setstack_d      = dch_setstack;
   
 	cs->dbusytimer.function = (void *) dbusy_timer_handler;
@@ -535,20 +533,19 @@
 bch_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&ipacx_lock, flags);
 			if (st->l1.bcs->tx_skb) {
 				skb_queue_tail(&st->l1.bcs->squeue, skb);
-				restore_flags(flags);
+				spin_unlock_irqrestore(&ipacx_lock, flags);
 			} else {
 				st->l1.bcs->tx_skb = skb;
 				set_bit(BC_FLG_BUSY, &st->l1.bcs->Flag);
 				st->l1.bcs->hw.hscx.count = 0;
-				restore_flags(flags);
+				spin_unlock_irqrestore(&ipacx_lock, flags);
         bch_fill_fifo(st->l1.bcs);
 			}
 			break;
@@ -593,7 +590,7 @@
 bch_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 //----------------------------------------------------------
@@ -604,7 +601,7 @@
 {
 	u_char *ptr, hscx;
 	struct IsdnCardState *cs;
-	long flags;
+	unsigned long flags;
 	int cnt;
 
 	cs = bcs->cs;
@@ -622,8 +619,7 @@
 	}
   
   // Read data uninterruptible
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&ipacx_lock, flags);
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	cnt = count;
 	while (cnt--) *ptr++ = cs->BC_Read_Reg(cs, hscx, IPACX_RFIFOB); 
@@ -631,7 +627,7 @@
   
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	bcs->hw.hscx.rcvidx += count;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ipacx_lock, flags);
   
 	if (cs->debug &L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
@@ -651,7 +647,7 @@
 	struct IsdnCardState *cs;
 	int more, count, cnt;
 	u_char *ptr, *p, hscx;
-	long flags;
+	unsigned long flags;
 
 	cs = bcs->cs;
 	if ((cs->debug &L1_DEB_HSCX) && !(cs->debug &L1_DEB_HSCX_FIFO))
@@ -670,15 +666,14 @@
 	}  
 	cnt = count;
     
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&ipacx_lock, flags);
 	p = ptr = bcs->tx_skb->data;
 	skb_pull(bcs->tx_skb, count);
 	bcs->tx_cnt -= count;
 	bcs->hw.hscx.count += count;
 	while (cnt--) cs->BC_Write_Reg(cs, hscx, IPACX_XFIFOB, *p++); 
 	cs->BC_Write_Reg(cs, hscx, IPACX_CMDRB, (more ? 0x08 : 0x0a));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ipacx_lock, flags);
   
 	if (cs->debug &L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
diff -Nru a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
--- a/drivers/isdn/hisax/isac.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/hisax/isac.c	Wed Oct 30 16:44:24 2002
@@ -22,6 +22,7 @@
 
 #define DBUSY_TIMER_VALUE 80
 #define ARCOFI_USE 1
+static spinlock_t isac_lock = SPIN_LOCK_UNLOCKED;
 
 static char *ISACVer[] __devinitdata =
 {"2086/2186 V1.1", "2085 B1", "2085 B2",
@@ -81,8 +82,9 @@
 }
 
 static void
-isac_bh(struct IsdnCardState *cs)
+isac_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	struct PStack *stptr;
 	
 	if (!cs)
@@ -116,7 +118,7 @@
 isac_empty_fifo(struct IsdnCardState *cs, int count)
 {
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "isac_empty_fifo");
@@ -131,11 +133,10 @@
 	}
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isac_lock, flags);
 	cs->readisacfifo(cs, ptr, count);
 	cs->writeisac(cs, ISAC_CMDR, 0x80);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isac_lock, flags);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -150,7 +151,7 @@
 {
 	int count, more;
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "isac_fill_fifo");
@@ -167,8 +168,7 @@
 		more = !0;
 		count = 32;
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isac_lock, flags);
 	ptr = cs->tx_skb->data;
 	skb_pull(cs->tx_skb, count);
 	cs->tx_cnt += count;
@@ -181,7 +181,7 @@
 	init_timer(&cs->dbusytimer);
 	cs->dbusytimer.expires = jiffies + ((DBUSY_TIMER_VALUE * HZ)/1000);
 	add_timer(&cs->dbusytimer);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isac_lock, flags);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -195,7 +195,7 @@
 isac_sched_event(struct IsdnCardState *cs, int event)
 {
 	test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 void
@@ -204,7 +204,7 @@
 	u_char exval, v1;
 	struct sk_buff *skb;
 	unsigned int count;
-	long flags;
+	unsigned long flags;
 
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "ISAC interrupt %x", val);
@@ -231,8 +231,7 @@
 			if (count == 0)
 				count = 32;
 			isac_empty_fifo(cs, count);
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&isac_lock, flags);
 			if ((count = cs->rcvidx) > 0) {
 				cs->rcvidx = 0;
 				if (!(skb = alloc_skb(count, GFP_ATOMIC)))
@@ -242,7 +241,7 @@
 					skb_queue_tail(&cs->rq, skb);
 				}
 			}
-			restore_flags(flags);
+			spin_unlock_irqrestore(&isac_lock, flags);
 		}
 		cs->rcvidx = 0;
 		isac_sched_event(cs, D_RCVBUFREADY);
@@ -626,7 +625,7 @@
 void __devinit
 initisac(struct IsdnCardState *cs)
 {
-	INIT_WORK(&cs->tqueue, (void *) (void *) isac_bh, NULL);
+	INIT_WORK(&cs->work, isac_bh, cs);
 	cs->setstack_d = setstack_isac;
 	cs->DC_Close = DC_Close_isac;
 	cs->dc.isac.mon_tx = NULL;
diff -Nru a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
--- a/drivers/isdn/hisax/isar.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/isar.c	Wed Oct 30 16:44:27 2002
@@ -28,7 +28,7 @@
 void isar_setup(struct IsdnCardState *cs);
 static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para);
 static inline void ll_deliver_faxstat(struct BCState *bcs, u_char status);
-
+static spinlock_t isar_lock = SPIN_LOCK_UNLOCKED;
 static inline int
 waitforHIA(struct IsdnCardState *cs, int timeout)
 {
@@ -47,7 +47,7 @@
 sendmsg(struct IsdnCardState *cs, u_char his, u_char creg, u_char len,
 	u_char *msg)
 {
-	long flags;
+	unsigned long flags;
 	int i;
 	
 	if (!waitforHIA(cs, 4000))
@@ -56,8 +56,7 @@
 	if (cs->debug & L1_DEB_HSCX)
 		debugl1(cs, "sendmsg(%02x,%02x,%d)", his, creg, len);
 #endif
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isar_lock, flags);
 	cs->BC_Write_Reg(cs, 0, ISAR_CTRL_H, creg);
 	cs->BC_Write_Reg(cs, 0, ISAR_CTRL_L, len);
 	cs->BC_Write_Reg(cs, 0, ISAR_WADR, 0);
@@ -81,7 +80,7 @@
 #endif
 	}
 	cs->BC_Write_Reg(cs, 1, ISAR_HIS, his);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isar_lock, flags);
 	waitforHIA(cs, 10000);
 	return(1);
 }
@@ -134,7 +133,7 @@
 	u_char *msg, int maxdelay)
 {
 	int timeout = 0;
-	long flags;
+	unsigned long flags;
 	struct isar_reg *ir = cs->bcs[0].hw.isar.reg;
 	
 	
@@ -145,12 +144,11 @@
 		printk(KERN_WARNING"isar recmsg IRQSTA timeout\n");
 		return(0);
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isar_lock, flags);
 	get_irq_infos(cs, ir);
 	rcv_mbox(cs, ir, msg);
 	*len = ir->clsb;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isar_lock, flags);
 	return(1);
 }
 
@@ -192,7 +190,7 @@
 	u_short sadr, left, *sp;
 	u_char *p = buf;
 	u_char *msg, *tmpmsg, *mp, tmp[64];
-	long flags;
+	unsigned long flags;
 	struct isar_reg *ireg = cs->bcs[0].hw.isar.reg;
 	
 	struct {u_short sadr;
@@ -346,8 +344,7 @@
 	/* NORMAL mode entered */
 	/* Enable IRQs of ISAR */
 	cs->BC_Write_Reg(cs, 0, ISAR_IRQBIT, ISAR_IRQSTA);
-	save_flags(flags);
-	sti();
+	spin_lock_irqsave(&isar_lock, flags);
 	cnt = 1000; /* max 1s */
 	while ((!ireg->bstat) && cnt) {
 		udelay(1000);
@@ -415,7 +412,7 @@
 	isar_setup(cs);
 	ret = 0;
 reterrflg:
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isar_lock, flags);
 reterror:
 	cs->debug = debug;
 	if (ret)
@@ -432,8 +429,10 @@
 #define B_LL_OK		10
 
 static void
-isar_bh(struct BCState *bcs)
+isar_bh(void *data)
 {
+	struct BCState *bcs = data;
+
 	BChannel_bh(bcs);
 	if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event))
 		ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR);
@@ -447,7 +446,7 @@
 isar_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 static inline void
@@ -669,7 +668,7 @@
 	int count;
 	u_char msb;
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "isar_fill_fifo");
@@ -687,8 +686,7 @@
 		count = bcs->tx_skb->len;
 		msb = HDLC_FED;
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isar_lock, flags);
 	ptr = bcs->tx_skb->data;
 	if (!bcs->hw.isar.txcnt) {
 		msb |= HDLC_FST;
@@ -739,7 +737,7 @@
 			printk(KERN_ERR"isar_fill_fifo mode(%x) error\n", bcs->mode);
 			break;
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isar_lock, flags);
 }
 
 inline
@@ -1163,12 +1161,11 @@
 void
 isar_int_main(struct IsdnCardState *cs)
 {
-	long flags;
+	unsigned long flags;
 	struct isar_reg *ireg = cs->bcs[0].hw.isar.reg;
 	struct BCState *bcs;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isar_lock, flags);
 	get_irq_infos(cs, ireg);
 	switch (ireg->iis & ISAR_IIS_MSCMSD) {
 		case ISAR_IIS_RDATA:
@@ -1254,7 +1251,7 @@
 					ireg->iis, ireg->cmsb, ireg->clsb);
 			break;
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isar_lock, flags);
 }
 
 static void
@@ -1560,7 +1557,7 @@
 		cs->bcs[i].mode = 0;
 		cs->bcs[i].hw.isar.dpath = i + 1;
 		modeisar(&cs->bcs[i], 0, 0);
-		INIT_WORK(&cs->bcs[i].tqueue, (void *) (void *) isar_bh, NULL);
+		INIT_WORK(&cs->bcs[i].work, isar_bh, &cs->bcs[i]);
 	}
 }
 
@@ -1568,22 +1565,21 @@
 isar_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&isar_lock, flags);
 			if (st->l1.bcs->tx_skb) {
 				skb_queue_tail(&st->l1.bcs->squeue, skb);
-				restore_flags(flags);
+				spin_unlock_irqrestore(&isar_lock, flags);
 			} else {
 				st->l1.bcs->tx_skb = skb;
 				test_and_set_bit(BC_FLG_BUSY, &st->l1.bcs->Flag);
 				if (st->l1.bcs->cs->debug & L1_DEB_HSCX)
 					debugl1(st->l1.bcs->cs, "DRQ set BC_FLG_BUSY");
 				st->l1.bcs->hw.isar.txcnt = 0;
-				restore_flags(flags);
+				spin_unlock_irqrestore(&isar_lock, flags);
 				st->l1.bcs->cs->BC_Send_Data(st->l1.bcs);
 			}
 			break;
diff -Nru a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c
--- a/drivers/isdn/hisax/isdnl1.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/isdn/hisax/isdnl1.c	Wed Oct 30 16:44:26 2002
@@ -299,10 +299,10 @@
 }
 
 void
-BChannel_bh(struct BCState *bcs)
+BChannel_bh(void *data)
 {
-	if (!bcs)
-		return;
+	struct BCState *bcs = data;
+
 	if (test_and_clear_bit(B_RCVBUFREADY, &bcs->event))
 		BChannel_proc_rcv(bcs);
 	if (test_and_clear_bit(B_XMTBUFREADY, &bcs->event))
@@ -345,7 +345,7 @@
 
 	bcs->cs = cs;
 	bcs->channel = bc;
-	INIT_WORK(&bcs->tqueue, (void *) (void *) BChannel_bh, bcs);
+	INIT_WORK(&bcs->work, BChannel_bh, bcs);
 	bcs->BC_SetStack = NULL;
 	bcs->BC_Close = NULL;
 	bcs->Flag = 0;
diff -Nru a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
--- a/drivers/isdn/hisax/isdnl2.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/hisax/isdnl2.c	Wed Oct 30 16:44:24 2002
@@ -20,7 +20,7 @@
 #include "isdnl2.h"
 
 const char *l2_revision = "$Revision: 2.25.6.4 $";
-
+static spinlock_t isdnl2_lock = SPIN_LOCK_UNLOCKED;
 static void l2m_debug(struct FsmInst *fi, char *fmt, ...);
 
 static struct Fsm l2fsm;
@@ -1256,7 +1256,7 @@
 	u_char header[MAX_HEADER_LEN];
 	int i;
 	int unsigned p1;
-	long flags;
+	unsigned long flags;
 
 	if (!cansend(st))
 		return;
@@ -1265,8 +1265,7 @@
 	if (!skb)
 		return;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&isdnl2_lock, flags);
 	if(test_bit(FLG_MOD128, &l2->flag))
 		p1 = (l2->vs - l2->va) % 128;
 	else
@@ -1289,7 +1288,7 @@
 		header[i++] = (l2->vr << 5) | (l2->vs << 1);
 		l2->vs = (l2->vs + 1) % 8;
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&isdnl2_lock, flags);
 
 	p1 = skb->data - skb->head;
 	if (p1 >= i)
diff -Nru a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
--- a/drivers/isdn/hisax/isurf.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/hisax/isurf.c	Wed Oct 30 16:44:29 2002
@@ -134,19 +134,14 @@
 static void
 reset_isurf(struct IsdnCardState *cs, u_char chips)
 {
-	long flags;
-
 	printk(KERN_INFO "ISurf: resetting card\n");
 
 	byteout(cs->hw.isurf.reset, chips); /* Reset On */
-	save_flags(flags);
-	sti();
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
 	byteout(cs->hw.isurf.reset, ISURF_ISAR_EA); /* Reset Off */
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
-	restore_flags(flags);
 }
 
 static int
diff -Nru a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c
--- a/drivers/isdn/hisax/ix1_micro.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/isdn/hisax/ix1_micro.c	Wed Oct 30 16:44:34 2002
@@ -26,6 +26,7 @@
 
 extern const char *CardType[];
 const char *ix1_revision = "$Revision: 2.10.6.2 $";
+static spinlock_t ix1_micro_lock = SPIN_LOCK_UNLOCKED;
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -43,13 +44,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&ix1_micro_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ix1_micro_lock, flags);
 	return (ret);
 }
 
@@ -66,13 +66,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&ix1_micro_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&ix1_micro_lock, flags);
 }
 
 static inline void
@@ -184,19 +183,15 @@
 static void
 ix1_reset(struct IsdnCardState *cs)
 {
-	long flags;
 	int cnt;
 
 	/* reset isac */
-	save_flags(flags);
 	cnt = 3 * (HZ / 10) + 1;
-	sti();
 	while (cnt--) {
 		byteout(cs->hw.ix1.cfg_reg + SPECIAL_PORT_OFFSET, 1);
 		HZDELAY(1);	/* wait >=10 ms */
 	}
 	byteout(cs->hw.ix1.cfg_reg + SPECIAL_PORT_OFFSET, 0);
-	restore_flags(flags);
 }
 
 static int
diff -Nru a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c
--- a/drivers/isdn/hisax/jade.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/jade.c	Wed Oct 30 16:44:27 2002
@@ -18,6 +18,7 @@
 #include "isdnl1.h"
 #include <linux/interrupt.h>
 
+static spinlock_t jade_lock = SPIN_LOCK_UNLOCKED;
 
 int __init
 JadeVersion(struct IsdnCardState *cs, char *s)
@@ -50,10 +51,9 @@
 jade_write_indirect(struct IsdnCardState *cs, u_char reg, u_char value)
 {
     int to = 50;
-    long flags;
+    unsigned long flags;
     u_char ret;
-    save_flags(flags);
-    cli();
+    spin_lock_irqsave(&jade_lock, flags);
     /* Write the data */
     cs->BC_Write_Reg(cs, -1, COMM_JADE+1, value);
     /* Say JADE we wanna write indirect reg 'reg' */
@@ -68,12 +68,12 @@
 	    /* Got acknowledge */
 	    break;
 	if (!to) {
-	    restore_flags(flags);
+	    spin_unlock_irqrestore(&jade_lock, flags);
     	    printk(KERN_INFO "Can not see ready bit from JADE DSP (reg=0x%X, value=0x%X)\n", reg, value);
 	    return;
 	}
     }
-    restore_flags(flags);
+    spin_unlock_irqrestore(&jade_lock, flags);
 }
 
 
@@ -138,27 +138,26 @@
 jade_sched_event(struct BCState *bcs, int event)
 {
     bcs->event |= 1 << event;
-    schedule_work(&bcs->tqueue);
+    schedule_work(&bcs->work);
 }
 
 static void
 jade_l2l1(struct PStack *st, int pr, void *arg)
 {
     struct sk_buff *skb = arg;
-    long flags;
+    unsigned long flags;
 
     switch (pr) {
 	case (PH_DATA | REQUEST):
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&jade_lock, flags);
 		if (st->l1.bcs->tx_skb) {
 			skb_queue_tail(&st->l1.bcs->squeue, skb);
-			restore_flags(flags);
+			spin_unlock_irqrestore(&jade_lock, flags);
 		} else {
 			st->l1.bcs->tx_skb = skb;
 			test_and_set_bit(BC_FLG_BUSY, &st->l1.bcs->Flag);
 			st->l1.bcs->hw.hscx.count = 0;
-			restore_flags(flags);
+			spin_unlock_irqrestore(&jade_lock, flags);
 			st->l1.bcs->cs->BC_Send_Data(st->l1.bcs);
 		}
 		break;
diff -Nru a/drivers/isdn/hisax/jade_irq.c b/drivers/isdn/hisax/jade_irq.c
--- a/drivers/isdn/hisax/jade_irq.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/isdn/hisax/jade_irq.c	Wed Oct 30 16:44:20 2002
@@ -9,6 +9,7 @@
  * of the GNU General Public License, incorporated herein by reference.
  *
  */
+static spinlock_t jade_irq_lock = SPIN_LOCK_UNLOCKED;
 
 static inline void
 waitforCEC(struct IsdnCardState *cs, int jade, int reg)
@@ -33,13 +34,12 @@
 static inline void
 WriteJADECMDR(struct IsdnCardState *cs, int jade, int reg, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&jade_irq_lock, flags);
 	waitforCEC(cs, jade, reg);
 	WRITEJADE(cs, jade, reg, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&jade_irq_lock, flags);
 }
 
 
@@ -49,7 +49,7 @@
 {
 	u_char *ptr;
 	struct IsdnCardState *cs = bcs->cs;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "jade_empty_fifo");
@@ -63,11 +63,10 @@
 	}
 	ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx;
 	bcs->hw.hscx.rcvidx += count;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&jade_irq_lock, flags);
 	READJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count);
 	WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_RCMD, jadeRCMD_RMC);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&jade_irq_lock, flags);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -85,7 +84,7 @@
 	int more, count;
 	int fifo_size = 32;
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "jade_fill_fifo");
@@ -103,15 +102,14 @@
 		count = bcs->tx_skb->len;
 
 	waitforXFW(cs, bcs->hw.hscx.hscx);
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&jade_irq_lock, flags);
 	ptr = bcs->tx_skb->data;
 	skb_pull(bcs->tx_skb, count);
 	bcs->tx_cnt -= count;
 	bcs->hw.hscx.count += count;
 	WRITEJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count);
 	WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_XCMD, more ? jadeXCMD_XF : (jadeXCMD_XF|jadeXCMD_XME));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&jade_irq_lock, flags);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
diff -Nru a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c
--- a/drivers/isdn/hisax/l3dss1.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/l3dss1.c	Wed Oct 30 16:44:27 2002
@@ -27,6 +27,7 @@
 
 extern char *HiSax_getrev(const char *revision);
 const char *dss1_revision = "$Revision: 2.30.6.2 $";
+static spinlock_t l3dss1_lock = SPIN_LOCK_UNLOCKED;
 
 #define EXT_BEARER_CAPS 1
 
@@ -53,8 +54,7 @@
   
 	i = 32; /* maximum search depth */
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&l3dss1_lock, flags);
 
 	retval = p->prot.dss1.last_invoke_id + 1; /* try new id */
 	while ((i) && (p->prot.dss1.invoke_used[retval >> 3] == 0xFF)) {
@@ -68,7 +68,7 @@
 		retval = 0;
 	p->prot.dss1.last_invoke_id = retval;
 	p->prot.dss1.invoke_used[retval >> 3] |= (1 << (retval & 7));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&l3dss1_lock, flags);
 
 	return(retval);  
 } /* new_invoke_id */
@@ -81,10 +81,9 @@
 
   if (!id) return; /* 0 = invalid value */
 
-  save_flags(flags);
-  cli();
+  spin_lock_irqsave(&l3dss1_lock, flags);
   p->prot.dss1.invoke_used[id >> 3] &= ~(1 << (id & 7));
-  restore_flags(flags);
+  spin_unlock_irqrestore(&l3dss1_lock, flags);
 } /* free_invoke_id */  
 
 
diff -Nru a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c
--- a/drivers/isdn/hisax/l3ni1.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/isdn/hisax/l3ni1.c	Wed Oct 30 16:44:25 2002
@@ -25,6 +25,7 @@
 
 extern char *HiSax_getrev(const char *revision);
 const char *ni1_revision = "$Revision: 2.5.6.3 $";
+static spinlock_t l3ni1_lock = SPIN_LOCK_UNLOCKED;
 
 #define EXT_BEARER_CAPS 1
 
@@ -51,8 +52,7 @@
   
 	i = 32; /* maximum search depth */
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&l3ni1_lock, flags);
 
 	retval = p->prot.ni1.last_invoke_id + 1; /* try new id */
 	while ((i) && (p->prot.ni1.invoke_used[retval >> 3] == 0xFF)) {
@@ -66,7 +66,7 @@
 		retval = 0;
 	p->prot.ni1.last_invoke_id = retval;
 	p->prot.ni1.invoke_used[retval >> 3] |= (1 << (retval & 7));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&l3ni1_lock, flags);
 
 	return(retval);  
 } /* new_invoke_id */
@@ -79,10 +79,9 @@
 
   if (!id) return; /* 0 = invalid value */
 
-  save_flags(flags);
-  cli();
+  spin_lock_irqsave(&l3ni1_lock, flags);
   p->prot.ni1.invoke_used[id >> 3] &= ~(1 << (id & 7));
-  restore_flags(flags);
+  spin_unlock_irqrestore(&l3ni1_lock, flags);
 } /* free_invoke_id */  
 
 
diff -Nru a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c
--- a/drivers/isdn/hisax/mic.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/isdn/hisax/mic.c	Wed Oct 30 16:44:31 2002
@@ -19,6 +19,7 @@
 extern const char *CardType[];
 
 const char *mic_revision = "$Revision: 1.10.6.2 $";
+static spinlock_t mic_lock = SPIN_LOCK_UNLOCKED;
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -34,13 +35,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&mic_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&mic_lock, flags);
 
 	return (ret);
 }
@@ -58,13 +58,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&mic_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&mic_lock, flags);
 }
 
 static inline void
diff -Nru a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
--- a/drivers/isdn/hisax/netjet.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/hisax/netjet.c	Wed Oct 30 16:44:24 2002
@@ -26,37 +26,36 @@
 #include "netjet.h"
 
 const char *NETjet_revision = "$Revision: 1.24.6.6 $";
+static spinlock_t netjet_lock = SPIN_LOCK_UNLOCKED;
 
 /* Interface functions */
 
 u_char
 NETjet_ReadIC(struct IsdnCardState *cs, u_char offset)
 {
-	long flags;
+	unsigned long flags;
 	u_char ret;
 	
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&netjet_lock, flags);
 	cs->hw.njet.auxd &= 0xfc;
 	cs->hw.njet.auxd |= (offset>>4) & 3;
 	byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
 	ret = bytein(cs->hw.njet.isac + ((offset & 0xf)<<2));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&netjet_lock, flags);
 	return(ret);
 }
 
 void
 NETjet_WriteIC(struct IsdnCardState *cs, u_char offset, u_char value)
 {
-	long flags;
+	unsigned long flags;
 	
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&netjet_lock, flags);
 	cs->hw.njet.auxd &= 0xfc;
 	cs->hw.njet.auxd |= (offset>>4) & 3;
 	byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
 	byteout(cs->hw.njet.isac + ((offset & 0xf)<<2), value);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&netjet_lock, flags);
 }
 
 void
@@ -434,7 +433,7 @@
 		skb_queue_tail(&bcs->rqueue, skb);
 	}
 	bcs->event |= 1 << B_RCVBUFREADY;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 	
 	if (bcs->cs->debug & L1_DEB_RECEIVE_FRAME)
 		printframe(bcs->cs, bcs->hw.tiger.rcvbuf, count, "rec");
@@ -790,7 +789,7 @@
 							cnt - s_cnt);
 				}
 				bcs->event |= 1 << B_XMTBUFREADY;
-				schedule_work(&bcs->tqueue);
+				schedule_work(&bcs->work);
 			}
 		}
 	} else if (test_and_clear_bit(BC_FLG_NOFRAME, &bcs->Flag)) {
@@ -839,19 +838,18 @@
 tiger_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&netjet_lock, flags);
 			if (st->l1.bcs->tx_skb) {
 				skb_queue_tail(&st->l1.bcs->squeue, skb);
-				restore_flags(flags);
+				spin_unlock_irqrestore(&netjet_lock, flags);
 			} else {
 				st->l1.bcs->tx_skb = skb;
 				st->l1.bcs->cs->BC_Send_Data(st->l1.bcs);
-				restore_flags(flags);
+				spin_unlock_irqrestore(&netjet_lock, flags);
 			}
 			break;
 		case (PH_PULL | INDICATION):
@@ -859,11 +857,10 @@
 				printk(KERN_WARNING "tiger_l2l1: this shouldn't happen\n");
 				break;
 			}
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&netjet_lock, flags);
 			st->l1.bcs->tx_skb = skb;
 			st->l1.bcs->cs->BC_Send_Data(st->l1.bcs);
-			restore_flags(flags);
+			spin_unlock_irqrestore(&netjet_lock, flags);
 			break;
 		case (PH_PULL | REQUEST):
 			if (!st->l1.bcs->tx_skb) {
diff -Nru a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
--- a/drivers/isdn/hisax/niccy.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/niccy.c	Wed Oct 30 16:44:27 2002
@@ -25,6 +25,7 @@
 
 extern const char *CardType[];
 const char *niccy_revision = "$Revision: 1.15.6.6 $";
+static spinlock_t niccy_lock = SPIN_LOCK_UNLOCKED;
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -50,13 +51,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&niccy_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&niccy_lock, flags);
 	return (ret);
 }
 
@@ -73,13 +73,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&niccy_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&niccy_lock, flags);
 }
 
 static inline void
diff -Nru a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c
--- a/drivers/isdn/hisax/nj_s.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/isdn/hisax/nj_s.c	Wed Oct 30 16:44:26 2002
@@ -16,6 +16,7 @@
 #include "netjet.h"
 
 const char *NETjet_S_revision = "$Revision: 2.7.6.6 $";
+static spinlock_t nj_s_lock = SPIN_LOCK_UNLOCKED;
 
 static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
 {
@@ -31,7 +32,7 @@
 {
 	struct IsdnCardState *cs = dev_id;
 	u_char val, sval;
-	long flags;
+	unsigned long flags;
 
 	if (!cs) {
 		printk(KERN_WARNING "NETjet-S: Spurious interrupt!\n");
@@ -48,8 +49,7 @@
 			NETjet_WriteIC(cs, ISAC_MASK, 0x0);
 		}
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&nj_s_lock, flags);
 	/* start new code 13/07/00 GE */
 	/* set bits in sval to indicate which page is free */
 	if (inl(cs->hw.njet.base + NETJET_DMA_WRITE_ADR) <
@@ -67,11 +67,11 @@
 	if (sval != cs->hw.njet.last_is0) /* we have a DMA interrupt */
 	{
 		if (test_and_set_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags)) {
-			restore_flags(flags);
+			spin_unlock_irqrestore(&nj_s_lock, flags);
 			return;
 		}
 		cs->hw.njet.irqstat0 = sval;
-		restore_flags(flags);
+		spin_unlock_irqrestore(&nj_s_lock, flags);
 		if ((cs->hw.njet.irqstat0 & NETJET_IRQM0_READ) != 
 			(cs->hw.njet.last_is0 & NETJET_IRQM0_READ))
 			/* we have a read dma int */
@@ -83,7 +83,7 @@
 		/* end new code 13/07/00 GE */
 		test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags);
 	} else
-		restore_flags(flags);
+		spin_unlock_irqrestore(&nj_s_lock, flags);
 
 /*	if (!testcnt--) {
 		cs->hw.njet.dmactrl = 0;
@@ -149,7 +149,7 @@
 	int bytecnt;
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
-	long flags;
+	unsigned long flags;
 
 #ifdef __BIG_ENDIAN
 #error "not running on big endian machines now"
diff -Nru a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c
--- a/drivers/isdn/hisax/nj_u.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/isdn/hisax/nj_u.c	Wed Oct 30 16:44:26 2002
@@ -16,6 +16,7 @@
 #include "netjet.h"
 
 const char *NETjet_U_revision = "$Revision: 2.8.6.6 $";
+static spinlock_t nj_u_lock = SPIN_LOCK_UNLOCKED;
 
 static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
 {
@@ -31,7 +32,7 @@
 {
 	struct IsdnCardState *cs = dev_id;
 	u_char val, sval;
-	long flags;
+	unsigned long flags;
 
 	if (!cs) {
 		printk(KERN_WARNING "NETspider-U: Spurious interrupt!\n");
@@ -48,8 +49,7 @@
 			NETjet_WriteIC(cs, ICC_MASK, 0x0);
 		}
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&nj_u_lock, flags);
 	/* start new code 13/07/00 GE */
 	/* set bits in sval to indicate which page is free */
 	if (inl(cs->hw.njet.base + NETJET_DMA_WRITE_ADR) <
@@ -67,11 +67,11 @@
 	if (sval != cs->hw.njet.last_is0) /* we have a DMA interrupt */
 	{
 		if (test_and_set_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags)) {
-			restore_flags(flags);
+			spin_unlock_irqrestore(&nj_u_lock, flags);
 			return;
 		}
 		cs->hw.njet.irqstat0 = sval;
-		restore_flags(flags);
+		spin_unlock_irqrestore(&nj_u_lock, flags);
 		if ((cs->hw.njet.irqstat0 & NETJET_IRQM0_READ) != 
 			(cs->hw.njet.last_is0 & NETJET_IRQM0_READ))
 			/* we have a read dma int */
@@ -83,7 +83,7 @@
 		/* end new code 13/07/00 GE */
 		test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags);
 	} else
-		restore_flags(flags);
+		spin_unlock_irqrestore(&nj_u_lock, flags);
 
 /*	if (!testcnt--) {
 		cs->hw.njet.dmactrl = 0;
@@ -196,7 +196,6 @@
 
 		save_flags(flags);
 		sti();
-
 		cs->hw.njet.ctrl_reg = 0xff;  /* Reset On */
 		byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
 
diff -Nru a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c
--- a/drivers/isdn/hisax/s0box.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/isdn/hisax/s0box.c	Wed Oct 30 16:44:21 2002
@@ -18,13 +18,13 @@
 
 extern const char *CardType[];
 const char *s0box_revision = "$Revision: 2.4.6.2 $";
+static spinlock_t s0box_lock = SPIN_LOCK_UNLOCKED;
 
 static inline void
 writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&s0box_lock, flags);
 	outb_p(0x1c,padr+2);
 	outb_p(0x14,padr+2);
 	outb_p((addr+off)&0x7f,padr);
@@ -33,7 +33,7 @@
 	outb_p(0x17,padr+2);
 	outb_p(0x14,padr+2);
 	outb_p(0x1c,padr+2);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&s0box_lock, flags);
 }
 
 static u_char nibtab[] = { 1, 9, 5, 0xd, 3, 0xb, 7, 0xf,
@@ -45,8 +45,7 @@
 	register u_char n1, n2;
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&s0box_lock, flags);
 	outb_p(0x1c,padr+2);
 	outb_p(0x14,padr+2);
 	outb_p((addr+off)|0x80,padr);
@@ -57,7 +56,7 @@
 	n2 = (inb_p(padr+1) >> 3) & 0x17;
 	outb_p(0x14,padr+2);
 	outb_p(0x1c,padr+2);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&s0box_lock, flags);
 	return nibtab[n1] | (nibtab[n2] << 4);
 }
 
diff -Nru a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c
--- a/drivers/isdn/hisax/saphir.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/isdn/hisax/saphir.c	Wed Oct 30 16:44:17 2002
@@ -20,6 +20,7 @@
 
 extern const char *CardType[];
 static char *saphir_rev = "$Revision: 1.8.6.2 $";
+static spinlock_t saphir_lock = SPIN_LOCK_UNLOCKED;
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -35,13 +36,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&saphir_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&saphir_lock, flags);
 	return (ret);
 }
 
@@ -58,13 +58,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&saphir_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&saphir_lock, flags);
 }
 
 static inline void
@@ -182,14 +181,9 @@
 void
 release_io_saphir(struct IsdnCardState *cs)
 {
-	long flags;
-	
-	save_flags(flags);
-	cli();
 	byteout(cs->hw.saphir.cfg_reg + IRQ_REG, 0xff);
-	del_timer(&cs->hw.saphir.timer);
+	del_timer_sync(&cs->hw.saphir.timer);
 	cs->hw.saphir.timer.function = NULL;
-	restore_flags(flags);
 	if (cs->hw.saphir.cfg_reg)
 		release_region(cs->hw.saphir.cfg_reg, 6);
 }
@@ -197,7 +191,6 @@
 static int
 saphir_reset(struct IsdnCardState *cs)
 {
-	long flags;
 	u_char irq_val;
 
 	switch(cs->irq) {
@@ -220,15 +213,12 @@
 			return (1);
 	}
 	byteout(cs->hw.saphir.cfg_reg + IRQ_REG, irq_val);
-	save_flags(flags);
-	sti();
 	byteout(cs->hw.saphir.cfg_reg + RESET_REG, 1);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((30*HZ)/1000);	/* Timeout 30ms */
 	byteout(cs->hw.saphir.cfg_reg + RESET_REG, 0);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((30*HZ)/1000);	/* Timeout 30ms */
-	restore_flags(flags);
 	byteout(cs->hw.saphir.cfg_reg + IRQ_REG, irq_val);
 	byteout(cs->hw.saphir.cfg_reg + SPARE_REG, 0x02);
 	return (0);
diff -Nru a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
--- a/drivers/isdn/hisax/sedlbauer.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hisax/sedlbauer.c	Wed Oct 30 16:44:28 2002
@@ -50,6 +50,7 @@
 #include <linux/isapnp.h>
 
 extern const char *CardType[];
+static spinlock_t sedlbauer_lock = SPIN_LOCK_UNLOCKED; 
 
 const char *Sedlbauer_revision = "$Revision: 1.25.6.6 $";
 
@@ -121,13 +122,12 @@
 readreg(unsigned int ale, unsigned int adr, u_char off)
 {
 	register u_char ret;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&sedlbauer_lock, flags);
 	byteout(ale, off);
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&sedlbauer_lock, flags);
 	return (ret);
 }
 
@@ -144,13 +144,12 @@
 static inline void
 writereg(unsigned int ale, unsigned int adr, u_char off, u_char data)
 {
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&sedlbauer_lock, flags);
 	byteout(ale, off);
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&sedlbauer_lock, flags);
 }
 
 static inline void
@@ -422,16 +421,12 @@
 static void
 reset_sedlbauer(struct IsdnCardState *cs)
 {
-	long flags;
-
 	printk(KERN_INFO "Sedlbauer: resetting card\n");
 
 	if (!((cs->hw.sedl.bus == SEDL_BUS_PCMCIA) &&
 	   (cs->hw.sedl.chip == SEDL_CHIP_ISAC_HSCX))) {
 		if (cs->hw.sedl.chip == SEDL_CHIP_IPAC) {
 			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_POTA2, 0x20);
-			save_flags(flags);
-			sti();
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((10*HZ)/1000);
 			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_POTA2, 0x0);
@@ -442,28 +437,21 @@
 			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_AOE, 0x0);
 			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xc0);
 			writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_PCFG, 0x12);
-			restore_flags(flags);
 		} else if ((cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) &&
 			(cs->hw.sedl.bus == SEDL_BUS_PCI)) {
 			byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
-			save_flags(flags);
-			sti();
 			current->state = TASK_UNINTERRUPTIBLE;
 			schedule_timeout((20*HZ)/1000);
 			byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
 			current->state = TASK_UNINTERRUPTIBLE;
 			schedule_timeout((20*HZ)/1000);
-			restore_flags(flags);
 		} else {		
 			byteout(cs->hw.sedl.reset_on, SEDL_RESET);	/* Reset On */
-			save_flags(flags);
-			sti();
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((10*HZ)/1000);
 			byteout(cs->hw.sedl.reset_off, 0);	/* Reset Off */
 			set_current_state(TASK_UNINTERRUPTIBLE);
 			schedule_timeout((10*HZ)/1000);
-			restore_flags(flags);
 		}
 	}
 }
@@ -552,7 +540,6 @@
 	struct IsdnCardState *cs = card->cs;
 	char tmp[64];
 	u16 sub_vendor_id, sub_id;
-	long flags;
 
 	strcpy(tmp, Sedlbauer_revision);
 	printk(KERN_INFO "HiSax: Sedlbauer driver Rev. %s\n", HiSax_getrev(tmp));
@@ -685,12 +672,9 @@
 		byteout(cs->hw.sedl.cfg_reg+ 2, 0xdd);
 		byteout(cs->hw.sedl.cfg_reg+ 5, 0x02);
 		byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
-		save_flags(flags);
-		sti();
 		current->state = TASK_UNINTERRUPTIBLE;
 		schedule_timeout((10*HZ)/1000);
 		byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
-		restore_flags(flags);
 #else
 		printk(KERN_WARNING "Sedlbauer: NO_PCI_BIOS\n");
 		return (0);
diff -Nru a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c
--- a/drivers/isdn/hisax/sportster.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/hisax/sportster.c	Wed Oct 30 16:44:24 2002
@@ -147,19 +147,14 @@
 void
 reset_sportster(struct IsdnCardState *cs)
 {
-	long flags;
-
 	cs->hw.spt.res_irq |= SPORTSTER_RESET; /* Reset On */
 	byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq);
-	save_flags(flags);
-	sti();
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
 	cs->hw.spt.res_irq &= ~SPORTSTER_RESET; /* Reset Off */
 	byteout(cs->hw.spt.cfg_reg + SPORTSTER_RES_IRQ, cs->hw.spt.res_irq);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
-	restore_flags(flags);
 }
 
 static int
diff -Nru a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
--- a/drivers/isdn/hisax/st5481_b.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/hisax/st5481_b.c	Wed Oct 30 16:44:27 2002
@@ -253,8 +253,8 @@
 static int __devinit st5481_setup_b_out(struct st5481_bcs *bcs)
 {
 	struct usb_device *dev = bcs->adapter->usb_dev;
-	struct usb_interface_descriptor *altsetting;
-	struct usb_endpoint_descriptor *endpoint;
+	struct usb_host_interface *altsetting;
+	struct usb_host_endpoint *endpoint;
   	struct st5481_b_out *b_out = &bcs->b_out;
 
 	DBG(4,"");
@@ -265,11 +265,11 @@
 	endpoint = &altsetting->endpoint[EP_B1_OUT - 1 + bcs->channel * 2];
 
 	DBG(4,"endpoint address=%02x,packet size=%d",
-	    endpoint->bEndpointAddress,endpoint->wMaxPacketSize);
+	    endpoint->desc.bEndpointAddress,endpoint->desc.wMaxPacketSize);
 
 	// Allocate memory for 8000bytes/sec + extra bytes if underrun
 	return st5481_setup_isocpipes(b_out->urb, dev, 
-				      usb_sndisocpipe(dev, endpoint->bEndpointAddress),
+				      usb_sndisocpipe(dev, endpoint->desc.bEndpointAddress),
 				      NUM_ISO_PACKETS_B, SIZE_ISO_PACKETS_B_OUT,
 				      NUM_ISO_PACKETS_B * SIZE_ISO_PACKETS_B_OUT + B_FLOW_ADJUST,
 				      usb_b_out_complete, bcs);
diff -Nru a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
--- a/drivers/isdn/hisax/st5481_d.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hisax/st5481_d.c	Wed Oct 30 16:44:28 2002
@@ -358,7 +358,7 @@
 
 	if (usb_submit_urb(urb, GFP_KERNEL) < 0) {
 		// There is another URB queued up
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		SUBMIT_URB(urb, GFP_KERNEL);
 	}	
 }
@@ -447,7 +447,7 @@
 
 	// Prepare the URB
 	urb->dev = adapter->usb_dev;
-	urb->transfer_flags = USB_ISO_ASAP;
+	urb->transfer_flags = URB_ISO_ASAP;
 
 	DBG_ISO_PACKET(0x20,urb);
 	SUBMIT_URB(urb, GFP_KERNEL);
@@ -652,8 +652,8 @@
 static int __devinit st5481_setup_d_out(struct st5481_adapter *adapter)
 {
 	struct usb_device *dev = adapter->usb_dev;
-	struct usb_interface_descriptor *altsetting;
-	struct usb_endpoint_descriptor *endpoint;
+	struct usb_host_interface *altsetting;
+	struct usb_host_endpoint *endpoint;
 	struct st5481_d_out *d_out = &adapter->d_out;
 
 	DBG(2,"");
@@ -664,10 +664,10 @@
 	endpoint = &altsetting->endpoint[EP_D_OUT-1];
 
 	DBG(2,"endpoint address=%02x,packet size=%d",
-	    endpoint->bEndpointAddress,endpoint->wMaxPacketSize);
+	    endpoint->desc.bEndpointAddress,endpoint->desc.wMaxPacketSize);
 
 	return st5481_setup_isocpipes(d_out->urb, dev, 
-				      usb_sndisocpipe(dev, endpoint->bEndpointAddress),
+				      usb_sndisocpipe(dev, endpoint->desc.bEndpointAddress),
 				      NUM_ISO_PACKETS_D, SIZE_ISO_PACKETS_D_OUT,
 				      NUM_ISO_PACKETS_D * SIZE_ISO_PACKETS_D_OUT,
 				      usb_d_out_complete, adapter);
diff -Nru a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c
--- a/drivers/isdn/hisax/st5481_usb.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/hisax/st5481_usb.c	Wed Oct 30 16:44:29 2002
@@ -182,21 +182,28 @@
 	u_char irqbyte;
 	struct st5481_adapter *adapter = urb->context;
 	int j;
+	int status;
 
-	if (urb->status < 0) {
-		if (urb->status != -ENOENT) {
-			WARN("urb status %d",urb->status);
-			urb->actual_length = 0;
-		} else {
-			DBG(1,"urb killed");
-			return; // Give up
-		}
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		DBG(1, "urb shutting down with status: %d", urb->status);
+		return;
+	default:
+		WARN("nonzero urb status received: %d", urb->status);
+		goto exit;
 	}
+
 	
 	DBG_PACKET(1, data, INT_PKT_SIZE);
 		
 	if (urb->actual_length == 0) {
-		return;
+		goto exit;
 	}
 
 	irqbyte = data[MPINT];
@@ -221,6 +228,11 @@
 		adapter->bcs[j].b_out.flow_event |= data[FFINT_B1 + j];
 
 	urb->actual_length = 0;
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		WARN("usb_submit_urb failed with result %d", status);
 }
 
 /* ======================================================================
@@ -232,15 +244,15 @@
 	struct usb_device *dev = adapter->usb_dev;
 	struct st5481_ctrl *ctrl = &adapter->ctrl;
 	struct st5481_intr *intr = &adapter->intr;
-	struct usb_interface_descriptor *altsetting;
-	struct usb_endpoint_descriptor *endpoint;
+	struct usb_host_interface *altsetting;
+	struct usb_host_endpoint *endpoint;
 	int status;
 	struct urb *urb;
 	u_char *buf;
 	
 	DBG(1,"");
 	
-	if ((status = usb_set_configuration (dev,dev->config[0].bConfigurationValue)) < 0) {
+	if ((status = usb_set_configuration (dev,dev->config[0].desc.bConfigurationValue)) < 0) {
 		WARN("set_configuration failed,status=%d",status);
 		return status;
 	}
@@ -249,14 +261,14 @@
 	altsetting = &(dev->config->interface[0].altsetting[3]);	
 
 	// Check if the config is sane
-	if ( altsetting->bNumEndpoints != 7 ) {
-		WARN("expecting 7 got %d endpoints!", altsetting->bNumEndpoints);
+	if ( altsetting->desc.bNumEndpoints != 7 ) {
+		WARN("expecting 7 got %d endpoints!", altsetting->desc.bNumEndpoints);
 		return -EINVAL;
 	}
 
 	// The descriptor is wrong for some early samples of the ST5481 chip
-	altsetting->endpoint[3].wMaxPacketSize = 32;
-	altsetting->endpoint[4].wMaxPacketSize = 32;
+	altsetting->endpoint[3].desc.wMaxPacketSize = 32;
+	altsetting->endpoint[4].desc.wMaxPacketSize = 32;
 
 	// Use alternative setting 3 on interface 0 to have 2B+D
 	if ((status = usb_set_interface (dev, 0, 3)) < 0) {
@@ -272,7 +284,7 @@
 	ctrl->urb = urb;
 	
 	// Fill the control URB
-	FILL_CONTROL_URB (urb, dev, 
+	usb_fill_control_urb (urb, dev, 
 			  usb_sndctrlpipe(dev, 0),
 			  NULL, NULL, 0, usb_ctrl_complete, adapter);
 
@@ -294,11 +306,11 @@
 	endpoint = &altsetting->endpoint[EP_INT-1];
 				
 	// Fill the interrupt URB
-	FILL_INT_URB(urb, dev,
-		     usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+	usb_fill_int_urb(urb, dev,
+		     usb_rcvintpipe(dev, endpoint->desc.bEndpointAddress),
 		     buf, INT_PKT_SIZE,
 		     usb_int_complete, adapter,
-		     endpoint->bInterval);
+		     endpoint->desc.bInterval);
 		
 	return 0;
 }
@@ -397,7 +409,7 @@
 	urb->actual_length = 0;
 	urb->complete=complete;
 	urb->context=context;
-	urb->transfer_flags=USB_ISO_ASAP;
+	urb->transfer_flags=URB_ISO_ASAP;
 	for (k = 0; k < num_packets; k++) {
 		urb->iso_frame_desc[k].offset = packet_size * k;
 		urb->iso_frame_desc[k].length = packet_size;
diff -Nru a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c
--- a/drivers/isdn/hisax/teleint.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/isdn/hisax/teleint.c	Wed Oct 30 16:44:36 2002
@@ -19,6 +19,7 @@
 extern const char *CardType[];
 
 const char *TeleInt_revision = "$Revision: 1.14.6.2 $";
+static spinlock_t teleint_lock = SPIN_LOCK_UNLOCKED;
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
@@ -28,21 +29,20 @@
 {
 	register u_char ret;
 	int max_delay = 2000;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&teleint_lock, flags);
 	byteout(ale, off);
 	ret = HFC_BUSY & bytein(ale);
 	while (ret && --max_delay)
 		ret = HFC_BUSY & bytein(ale);
 	if (!max_delay) {
 		printk(KERN_WARNING "TeleInt Busy not inactive\n");
-		restore_flags(flags);
+		spin_unlock_irqrestore(&teleint_lock, flags);
 		return (0);
 	}
 	ret = bytein(adr);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&teleint_lock, flags);
 	return (ret);
 }
 
@@ -72,21 +72,20 @@
 {
 	register u_char ret;
 	int max_delay = 2000;
-	long flags;
+	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&teleint_lock, flags);
 	byteout(ale, off);
 	ret = HFC_BUSY & bytein(ale);
 	while (ret && --max_delay)
 		ret = HFC_BUSY & bytein(ale);
 	if (!max_delay) {
 		printk(KERN_WARNING "TeleInt Busy not inactive\n");
-		restore_flags(flags);
+		spin_unlock_irqrestore(&teleint_lock, flags);
 		return;
 	}
 	byteout(adr, data);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&teleint_lock, flags);
 }
 
 static inline void
@@ -220,20 +219,15 @@
 static void
 reset_TeleInt(struct IsdnCardState *cs)
 {
-	long flags;
-
 	printk(KERN_INFO "TeleInt: resetting card\n");
 	cs->hw.hfc.cirm |= HFC_RESET;
 	byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.cirm);	/* Reset On */
-	save_flags(flags);
-	sti();
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((30*HZ)/1000);
 	cs->hw.hfc.cirm &= ~HFC_RESET;
 	byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.cirm);	/* Reset Off */
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	schedule_timeout((10*HZ)/1000);
-	restore_flags(flags);
 }
 
 static int
diff -Nru a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c
--- a/drivers/isdn/hisax/teles0.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/hisax/teles0.c	Wed Oct 30 16:44:28 2002
@@ -196,10 +196,7 @@
 reset_teles0(struct IsdnCardState *cs)
 {
 	u_char cfval;
-	long flags;
 
-	save_flags(flags);
-	sti();
 	if (cs->hw.teles0.cfg_reg) {
 		switch (cs->irq) {
 			case 2:
@@ -240,7 +237,6 @@
 	HZDELAY(HZ / 5 + 1);
 	writeb(1, cs->hw.teles0.membase + 0x80); mb();
 	HZDELAY(HZ / 5 + 1);
-	restore_flags(flags);
 	return(0);
 }
 
diff -Nru a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c
--- a/drivers/isdn/hisax/teles3.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/isdn/hisax/teles3.c	Wed Oct 30 16:44:35 2002
@@ -174,7 +174,6 @@
 static int
 reset_teles3(struct IsdnCardState *cs)
 {
-	long flags;
 	u_char irqcfg;
 
 	if (cs->typ != ISDN_CTYPE_TELESPCMCIA) {
@@ -208,28 +207,21 @@
 				default:
 					return(1);
 			}
-			save_flags(flags);
 			byteout(cs->hw.teles3.cfg_reg + 4, irqcfg);
-			sti();
 			HZDELAY(HZ / 10 + 1);
 			byteout(cs->hw.teles3.cfg_reg + 4, irqcfg | 1);
 			HZDELAY(HZ / 10 + 1);
-			restore_flags(flags);
 		} else if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) {
-			save_flags(flags);
 			byteout(cs->hw.teles3.cfg_reg, 0xff);
 			HZDELAY(2);
 			byteout(cs->hw.teles3.cfg_reg, 0x00);
 			HZDELAY(2);
-			restore_flags(flags);
 		} else {
 			/* Reset off for 16.3 PnP , thanks to Georg Acher */
-			save_flags(flags);
 			byteout(cs->hw.teles3.isac + 0x3c, 0);
 			HZDELAY(2);
 			byteout(cs->hw.teles3.isac + 0x3c, 1);
 			HZDELAY(2);
-			restore_flags(flags);
 		}
 	}
 	return(0);
diff -Nru a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
--- a/drivers/isdn/hisax/w6692.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/isdn/hisax/w6692.c	Wed Oct 30 16:44:33 2002
@@ -43,6 +43,8 @@
 
 const char *w6692_revision = "$Revision: 1.12.6.6 $";
 
+static spinlock_t w6692_lock = SPIN_LOCK_UNLOCKED;
+
 #define DBUSY_TIMER_VALUE 80
 
 static char *W6692Ver[] __initdata =
@@ -102,8 +104,9 @@
 }
 
 static void
-W6692_bh(struct IsdnCardState *cs)
+W6692_bh(void *data)
 {
+	struct IsdnCardState *cs = data;
 	struct PStack *stptr;
 
 	if (!cs)
@@ -135,21 +138,21 @@
 W6692_sched_event(struct IsdnCardState *cs, int event)
 {
 	test_and_set_bit(event, &cs->event);
-	schedule_work(&cs->tqueue);
+	schedule_work(&cs->work);
 }
 
 static void
 W6692B_sched_event(struct BCState *bcs, int event)
 {
 	bcs->event |= 1 << event;
-	schedule_work(&bcs->tqueue);
+	schedule_work(&bcs->work);
 }
 
 static void
 W6692_empty_fifo(struct IsdnCardState *cs, int count)
 {
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "W6692_empty_fifo");
@@ -164,11 +167,10 @@
 	}
 	ptr = cs->rcvbuf + cs->rcvidx;
 	cs->rcvidx += count;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&w6692_lock, flags);
 	cs->readW6692fifo(cs, ptr, count);
 	cs->writeW6692(cs, W_D_CMDR, W_D_CMDR_RACK);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&w6692_lock, flags);
 	if (cs->debug & L1_DEB_ISAC_FIFO) {
 		char *t = cs->dlog;
 
@@ -183,7 +185,7 @@
 {
 	int count, more;
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_ISAC) && !(cs->debug & L1_DEB_ISAC_FIFO))
 		debugl1(cs, "W6692_fill_fifo");
@@ -200,14 +202,13 @@
 		more = !0;
 		count = W_D_FIFO_THRESH;
 	}
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&w6692_lock, flags);
 	ptr = cs->tx_skb->data;
 	skb_pull(cs->tx_skb, count);
 	cs->tx_cnt += count;
 	cs->writeW6692fifo(cs, ptr, count);
 	cs->writeW6692(cs, W_D_CMDR, more ? W_D_CMDR_XMS : (W_D_CMDR_XMS | W_D_CMDR_XME));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&w6692_lock , flags);
 	if (test_and_set_bit(FLG_DBUSY_TIMER, &cs->HW_Flags)) {
 		debugl1(cs, "W6692_fill_fifo dbusytimer running");
 		del_timer(&cs->dbusytimer);
@@ -229,7 +230,7 @@
 {
 	u_char *ptr;
 	struct IsdnCardState *cs = bcs->cs;
-	long flags;
+	unsigned long flags;
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
 		debugl1(cs, "W6692B_empty_fifo");
@@ -243,11 +244,10 @@
 	}
 	ptr = bcs->hw.w6692.rcvbuf + bcs->hw.w6692.rcvidx;
 	bcs->hw.w6692.rcvidx += count;
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&w6692_lock, flags);
 	READW6692BFIFO(cs, bcs->channel, ptr, count);
 	cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&w6692_lock , flags);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -264,7 +264,7 @@
 	struct IsdnCardState *cs = bcs->cs;
 	int more, count;
 	u_char *ptr;
-	long flags;
+	unsigned long flags;
 
 
 	if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
@@ -282,15 +282,14 @@
 	} else
 		count = bcs->tx_skb->len;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&w6692_lock, flags);
 	ptr = bcs->tx_skb->data;
 	skb_pull(bcs->tx_skb, count);
 	bcs->tx_cnt -= count;
 	bcs->hw.w6692.count += count;
 	WRITEW6692BFIFO(cs, bcs->channel, ptr, count);
 	cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACT | W_B_CMDR_XMS | (more ? 0 : W_B_CMDR_XME));
-	restore_flags(flags);
+	spin_unlock_irqrestore(&w6692_lock , flags);
 	if (cs->debug & L1_DEB_HSCX_FIFO) {
 		char *t = bcs->blog;
 
@@ -411,7 +410,7 @@
 	u_char val, exval, v1;
 	struct sk_buff *skb;
 	unsigned int count;
-	long flags;
+	unsigned long flags;
 	int icnt = 5;
 
 	if (!cs) {
@@ -442,8 +441,7 @@
 			if (count == 0)
 				count = W_D_FIFO_THRESH;
 			W6692_empty_fifo(cs, count);
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&w6692_lock, flags);
 			if ((count = cs->rcvidx) > 0) {
 				cs->rcvidx = 0;
 				if (!(skb = alloc_skb(count, GFP_ATOMIC)))
@@ -453,7 +451,7 @@
 					skb_queue_tail(&cs->rq, skb);
 				}
 			}
-			restore_flags(flags);
+			spin_unlock_irqrestore(&w6692_lock , flags);
 		}
 		cs->rcvidx = 0;
 		W6692_sched_event(cs, D_RCVBUFREADY);
@@ -745,20 +743,19 @@
 W6692_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
-			save_flags(flags);
-			cli();
+			spin_lock_irqsave(&w6692_lock, flags);
 			if (st->l1.bcs->tx_skb) {
 				skb_queue_tail(&st->l1.bcs->squeue, skb);
-				restore_flags(flags);
+				spin_unlock_irqrestore(&w6692_lock , flags);
 			} else {
 				st->l1.bcs->tx_skb = skb;
 				test_and_set_bit(BC_FLG_BUSY, &st->l1.bcs->Flag);
 				st->l1.bcs->hw.w6692.count = 0;
-				restore_flags(flags);
+				spin_unlock_irqrestore(&w6692_lock , flags);
 				st->l1.bcs->cs->BC_Send_Data(st->l1.bcs);
 			}
 			break;
@@ -887,7 +884,7 @@
 void __init initW6692(struct IsdnCardState *cs, int part)
 {
 	if (part & 1) {
-		INIT_WORK(&cs->tqueue, (void *) (void *) W6692_bh, NULL);
+		INIT_WORK(&cs->work, W6692_bh, cs);
 		cs->setstack_d = setstack_W6692;
 		cs->DC_Close = DC_Close_W6692;
 		cs->dbusytimer.function = (void *) dbusy_timer_handler;
diff -Nru a/drivers/isdn/hysdn/Config.help b/drivers/isdn/hysdn/Config.help
--- a/drivers/isdn/hysdn/Config.help	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,9 +0,0 @@
-CONFIG_HYSDN
-  Say Y here if you have one of Hypercope's active PCI ISDN cards
-  Champ, Ergo and Metro. You will then get a module called hysdn.o.
-  Please read the file <file:Documentation/isdn/README.hysdn> for more
-  information.
-
-CONFIG_HYSDN_CAPI
-  Say Y here if you like to use Hypercope's CAPI 2.0 interface.
-
diff -Nru a/drivers/isdn/hysdn/Config.in b/drivers/isdn/hysdn/Config.in
--- a/drivers/isdn/hysdn/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,6 +0,0 @@
-#
-# Config.in for HYSDN ISDN driver
-#
-
-dep_tristate '  Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)' CONFIG_HYSDN m $CONFIG_PROC_FS
-dep_mbool    '    HYSDN CAPI 2.0 support' CONFIG_HYSDN_CAPI $CONFIG_HYSDN $CONFIG_ISDN_CAPI
diff -Nru a/drivers/isdn/hysdn/Kconfig b/drivers/isdn/hysdn/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/hysdn/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,18 @@
+#
+# Config.in for HYSDN ISDN driver
+#
+config HYSDN
+	tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)"
+	depends on m && PROC_FS
+	help
+	  Say Y here if you have one of Hypercope's active PCI ISDN cards
+	  Champ, Ergo and Metro. You will then get a module called hysdn.o.
+	  Please read the file <file:Documentation/isdn/README.hysdn> for more
+	  information.
+
+config HYSDN_CAPI
+	bool "HYSDN CAPI 2.0 support"
+	depends on HYSDN && ISDN_CAPI
+	help
+	  Say Y here if you like to use Hypercope's CAPI 2.0 interface.
+
diff -Nru a/drivers/isdn/hysdn/Makefile b/drivers/isdn/hysdn/Makefile
--- a/drivers/isdn/hysdn/Makefile	Wed Oct 30 16:44:36 2002
+++ b/drivers/isdn/hysdn/Makefile	Wed Oct 30 16:44:36 2002
@@ -14,5 +14,3 @@
 hysdn-objs-$(CONFIG_HYSDN_CAPI) += hycapi.o
 
 hysdn-objs 	+= $(hysdn-objs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/i4l/Config.help b/drivers/isdn/i4l/Config.help
--- a/drivers/isdn/i4l/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,88 +0,0 @@
-CONFIG_ISDN
-  This driver allows you to use an ISDN-card for networking
-  connections and as dialin/out device.  The isdn-tty's have a built
-  in AT-compatible modem emulator.  Network devices support autodial,
-  channel-bundling, callback and caller-authentication without having
-  a daemon running.  A reduced T.70 protocol is supported with tty's
-  suitable for German BTX.  On D-Channel, the protocols EDSS1
-  (Euro-ISDN) and 1TR6 (German style) are supported.  See
-  <file:Documentation/isdn/README> for more information.
-
-  ISDN support in the linux kernel is moving towards a new API,
-  called CAPI (Common ISDN Application Programming Interface).
-  Therefore the old ISDN4Linux layer is becoming obsolete. It is 
-  still usable, though, if you select this option.
-
-CONFIG_ISDN_PPP
-  Over digital connections such as ISDN, there is no need to
-  synchronize sender and recipient's clocks with start and stop bits
-  as is done over analog telephone lines. Instead, one can use
-  "synchronous PPP". Saying Y here will include this protocol. This
-  protocol is used by Cisco and Sun for example. So you want to say Y
-  here if the other end of your ISDN connection supports it. You will
-  need a special version of pppd (called ipppd) for using this
-  feature. See <file:Documentation/isdn/README.syncppp> and
-  <file:Documentation/isdn/syncPPP.FAQ> for more information.
-
-CONFIG_ISDN_MPP
-  With synchronous PPP enabled, it is possible to increase throughput
-  by bundling several ISDN-connections, using this protocol. See
-  <file:Documentation/isdn/README.syncppp> for more information.
-
-CONFIG_ISDN_PPP_VJ
-  This enables Van Jacobson header compression for synchronous PPP.
-  Say Y if the other end of the connection supports it.
-
-CONFIG_ISDN_PPP_BSDCOMP
-  Support for the BSD-Compress compression method for PPP, which uses
-  the LZW compression method to compress each PPP packet before it is
-  sent over the wire. The machine at the other end of the PPP link
-  (usually your ISP) has to support the BSD-Compress compression
-  method as well for this to be useful. Even if they don't support it,
-  it is safe to say Y here.
-
-CONFIG_ISDN_AUDIO
-  If you say Y here, the modem-emulator will support a subset of the
-  EIA Class 8 Voice commands. Using a getty with voice-support
-  (mgetty+sendfax by gert@greenie.muc.de with an extension, available
-  with the ISDN utility package for example), you will be able to use
-  your Linux box as an ISDN-answering machine. Of course, this must be
-  supported by the lowlevel driver also. Currently, the HiSax driver
-  is the only voice-supporting driver. See
-  <file:Documentation/isdn/README.audio> for more information.
-
-CONFIG_ISDN_X25
-  This feature provides the X.25 protocol over ISDN connections.
-  See <file:Documentation/isdn/README.x25> for more information
-  if you are thinking about using this.
-
-CONFIG_ISDN_DIVERSION
-  This option allows you to use some supplementary diversion
-  services in conjunction with the HiSax driver on an EURO/DSS1
-  line.
-
-  Supported options are CD (call deflection), CFU (Call forward
-  unconditional), CFB (Call forward when busy) and CFNR (call forward
-  not reachable). Additionally the actual CFU, CFB and CFNR state may
-  be interrogated.
-
-  The use of CFU, CFB, CFNR and interrogation may be limited to some
-  countries. The keypad protocol is still not implemented. CD should
-  work in all countries if the service has been subscribed to.
-
-  Please read the file <file:Documentation/isdn/README.diversion>.
-
-CONFIG_ISDN_TTY_FAX
-  If you say Y here, the modem-emulator will support a subset of the
-  Fax Class 1 and 2 commands. Using a getty with fax-support
-  (mgetty+sendfax, hylafax), you will be able to use your Linux box as
-  an ISDN-fax-machine. This must be supported by the lowlevel driver
-  also. See <file:Documentation/isdn/README.fax> for more information.
-
-CONFIG_ISDN_DRV_LOOP
-  This driver provides a virtual ISDN card. Its primary purpose is
-  testing of linklevel features or configuration without getting
-  charged by your service-provider for lots of phone calls.
-  You need will need the loopctrl utility from the latest isdn4k-utils
-  package to set up this driver.
-
diff -Nru a/drivers/isdn/i4l/Config.in b/drivers/isdn/i4l/Config.in
--- a/drivers/isdn/i4l/Config.in	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,26 +0,0 @@
-#
-# Old ISDN4Linux config
-#
-
-if [ "$CONFIG_INET" != "n" ]; then
-   bool '  Support synchronous PPP' CONFIG_ISDN_PPP
-   if [ "$CONFIG_ISDN_PPP" != "n" ]; then
-      bool         '    Use VJ-compression with synchronous PPP' CONFIG_ISDN_PPP_VJ
-      bool         '    Support generic MP (RFC 1717)' CONFIG_ISDN_MPP
-      dep_tristate '    Support BSD compression' CONFIG_ISDN_PPP_BSDCOMP $CONFIG_ISDN
-   fi
-fi
-bool '  Support audio via ISDN' CONFIG_ISDN_AUDIO
-if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
-   bool '    Support AT-Fax Class 1 and 2 commands' CONFIG_ISDN_TTY_FAX
-fi
-if [ "$CONFIG_X25" != "n" ]; then
-   bool '  X.25 PLP on top of ISDN' CONFIG_ISDN_X25
-fi
-
-mainmenu_option next_comment
-comment 'ISDN feature submodules'
-   dep_tristate 'isdnloop support' CONFIG_ISDN_DRV_LOOP $CONFIG_ISDN
-   dep_tristate 'Support isdn diversion services' CONFIG_ISDN_DIVERSION $CONFIG_ISDN
-endmenu
-
diff -Nru a/drivers/isdn/i4l/Kconfig b/drivers/isdn/i4l/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/i4l/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,109 @@
+#
+# Old ISDN4Linux config
+#
+config ISDN_PPP
+	bool "Support synchronous PPP"
+	depends on ISDN && INET
+	help
+	  Over digital connections such as ISDN, there is no need to
+	  synchronize sender and recipient's clocks with start and stop bits
+	  as is done over analog telephone lines. Instead, one can use
+	  "synchronous PPP". Saying Y here will include this protocol. This
+	  protocol is used by Cisco and Sun for example. So you want to say Y
+	  here if the other end of your ISDN connection supports it. You will
+	  need a special version of pppd (called ipppd) for using this
+	  feature. See <file:Documentation/isdn/README.syncppp> and
+	  <file:Documentation/isdn/syncPPP.FAQ> for more information.
+
+config ISDN_PPP_VJ
+	bool "Use VJ-compression with synchronous PPP"
+	depends on ISDN_PPP
+	help
+	  This enables Van Jacobson header compression for synchronous PPP.
+	  Say Y if the other end of the connection supports it.
+
+config ISDN_MPP
+	bool "Support generic MP (RFC 1717)"
+	depends on ISDN_PPP
+	help
+	  With synchronous PPP enabled, it is possible to increase throughput
+	  by bundling several ISDN-connections, using this protocol. See
+	  <file:Documentation/isdn/README.syncppp> for more information.
+
+config ISDN_PPP_BSDCOMP
+	tristate "Support BSD compression"
+	depends on ISDN_PPP && ISDN
+	help
+	  Support for the BSD-Compress compression method for PPP, which uses
+	  the LZW compression method to compress each PPP packet before it is
+	  sent over the wire. The machine at the other end of the PPP link
+	  (usually your ISP) has to support the BSD-Compress compression
+	  method as well for this to be useful. Even if they don't support it,
+	  it is safe to say Y here.
+
+config ISDN_AUDIO
+	bool "Support audio via ISDN"
+	depends on ISDN
+	help
+	  If you say Y here, the modem-emulator will support a subset of the
+	  EIA Class 8 Voice commands. Using a getty with voice-support
+	  (mgetty+sendfax by gert@greenie.muc.de with an extension, available
+	  with the ISDN utility package for example), you will be able to use
+	  your Linux box as an ISDN-answering machine. Of course, this must be
+	  supported by the lowlevel driver also. Currently, the HiSax driver
+	  is the only voice-supporting driver. See
+	  <file:Documentation/isdn/README.audio> for more information.
+
+config ISDN_TTY_FAX
+	bool "Support AT-Fax Class 1 and 2 commands"
+	depends on ISDN_AUDIO
+	help
+	  If you say Y here, the modem-emulator will support a subset of the
+	  Fax Class 1 and 2 commands. Using a getty with fax-support
+	  (mgetty+sendfax, hylafax), you will be able to use your Linux box as
+	  an ISDN-fax-machine. This must be supported by the lowlevel driver
+	  also. See <file:Documentation/isdn/README.fax> for more information.
+
+config ISDN_X25
+	bool "X.25 PLP on top of ISDN"
+	depends on ISDN && X25
+	help
+	  This feature provides the X.25 protocol over ISDN connections.
+	  See <file:Documentation/isdn/README.x25> for more information
+	  if you are thinking about using this.
+
+
+menu "ISDN feature submodules"
+	depends on ISDN!=n
+
+config ISDN_DRV_LOOP
+	tristate "isdnloop support"
+	depends on ISDN
+	help
+	  This driver provides a virtual ISDN card. Its primary purpose is
+	  testing of linklevel features or configuration without getting
+	  charged by your service-provider for lots of phone calls.
+	  You need will need the loopctrl utility from the latest isdn4k-utils
+	  package to set up this driver.
+
+config ISDN_DIVERSION
+	tristate "Support isdn diversion services"
+	depends on ISDN
+	---help---
+	  This option allows you to use some supplementary diversion
+	  services in conjunction with the HiSax driver on an EURO/DSS1
+	  line.
+
+	  Supported options are CD (call deflection), CFU (Call forward
+	  unconditional), CFB (Call forward when busy) and CFNR (call forward
+	  not reachable). Additionally the actual CFU, CFB and CFNR state may
+	  be interrogated.
+
+	  The use of CFU, CFB, CFNR and interrogation may be limited to some
+	  countries. The keypad protocol is still not implemented. CD should
+	  work in all countries if the service has been subscribed to.
+
+	  Please read the file <file:Documentation/isdn/README.diversion>.
+
+endmenu
+
diff -Nru a/drivers/isdn/i4l/Makefile b/drivers/isdn/i4l/Makefile
--- a/drivers/isdn/i4l/Makefile	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/i4l/Makefile	Wed Oct 30 16:44:27 2002
@@ -11,19 +11,20 @@
 
 # Multipart objects.
 
-isdn-objs				:= isdn_net.o isdn_net_lib.o \
+isdn-objs				:= isdn_net_lib.o \
 					   isdn_fsm.o \
-					   isdn_ciscohdlck.o \
 					   isdn_tty.o isdn_v110.o \
 					   isdn_common.o \
 
 # Optional parts of multipart objects.
 
+isdn-objs-$(CONFIG_ISDN_NET_SIMPLE)	+= isdn_net.o
+isdn-objs-$(CONFIG_ISDN_NET_CISCO)	+= isdn_ciscohdlck.o
 isdn-objs-$(CONFIG_ISDN_PPP)		+= isdn_ppp.o isdn_ppp_ccp.o
+isdn-objs-$(CONFIG_ISDN_PPP_VJ)		+= isdn_ppp_vj.o
+isdn-objs-$(CONFIG_ISDN_MPP)		+= isdn_ppp_mp.o
 isdn-objs-$(CONFIG_ISDN_X25)		+= isdn_concap.o isdn_x25iface.o
 isdn-objs-$(CONFIG_ISDN_AUDIO)		+= isdn_audio.o
 isdn-objs-$(CONFIG_ISDN_TTY_FAX)	+= isdn_ttyfax.o
 
 isdn-objs				+= $(isdn-objs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/i4l/isdn_audio.c b/drivers/isdn/i4l/isdn_audio.c
--- a/drivers/isdn/i4l/isdn_audio.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/isdn/i4l/isdn_audio.c	Wed Oct 30 16:44:17 2002
@@ -1,21 +1,20 @@
-/* $Id: isdn_audio.c,v 1.21.6.3 2002/08/13 09:45:33 keil Exp $
- *
- * Linux ISDN subsystem, audio conversion and compression (linklevel).
+/* Linux ISDN subsystem, audio conversion and compression
  *
  * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
- * DTMF code (c) 1996 by Christian Mock (cm@tahina.priv.at)
- * Silence detection (c) 1998 by Armin Schindler (mac@gismo.telekom.de)
+ *           1996      by Christian Mock (cm@tahina.priv.at)
+ *           1998      by Armin Schindler (mac@gismo.telekom.de)
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
  *
+ * DTMF code         by Christian Mock
+ * Silence detection by Armin Schindler
  */
 
 #include <linux/isdn.h>
 #include "isdn_audio.h"
 #include "isdn_common.h"
-
-char *isdn_audio_revision = "$Revision: 1.21.6.3 $";
+#include "isdn_tty.h"
 
 /*
  * Misc. lookup-tables.
@@ -507,7 +506,7 @@
 		    ((sk2 * sk2) >> AMP_BITS);
 	}
 	skb_queue_tail(&info->dtmf_queue, skb);
-	isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 1);
+	mod_timer(&info->read_timer, jiffies + 4);
 }
 
 void
@@ -518,8 +517,6 @@
 	dtmf_state *s;
 	int silence;
 	int i;
-	int di;
-	int ch;
 	unsigned long flags;
 	int grp[2];
 	char what;
@@ -564,15 +561,11 @@
 			ISDN_AUDIO_SKB_LOCK(skb) = 0;
 			save_flags(flags);
 			cli();
-			di = isdn_slot_driver(info->isdn_slot);
-			ch = isdn_slot_channel(info->isdn_slot);
-			__skb_queue_tail(&dev->drv[di]->rpqueue[ch], skb);
-			dev->drv[di]->rcvcount[ch] += 2;
+			isdn_tty_queue_tail(info, skb, 2);
 			restore_flags(flags);
 			/* Schedule dequeuing */
 			if ((dev->modempoll) && (info->rcvsched))
-				isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 1);
-			wake_up_interruptible(&dev->drv[di]->rcv_waitq[ch]);
+				mod_timer(&info->read_timer, jiffies + 4);
 		} else
 			kfree_skb(skb);
 		s->last = what;
@@ -661,8 +654,6 @@
 {
 	struct sk_buff *skb;
 	unsigned long flags;
-	int di;
-	int ch;
 	char *p;
 
 	skb = dev_alloc_skb(2);
@@ -685,15 +676,11 @@
 	ISDN_AUDIO_SKB_LOCK(skb) = 0;
 	save_flags(flags);
 	cli();
-	di = isdn_slot_driver(info->isdn_slot);
-	ch = isdn_slot_channel(info->isdn_slot);
-	__skb_queue_tail(&dev->drv[di]->rpqueue[ch], skb);
-	dev->drv[di]->rcvcount[ch] += 2;
+	isdn_tty_queue_tail(info, skb, 2);
 	restore_flags(flags);
 	/* Schedule dequeuing */
 	if ((dev->modempoll) && (info->rcvsched))
-		isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 1);
-	wake_up_interruptible(&dev->drv[di]->rcv_waitq[ch]);
+		mod_timer(&info->read_timer, jiffies + 4);
 }
 
 void
diff -Nru a/drivers/isdn/i4l/isdn_audio.h b/drivers/isdn/i4l/isdn_audio.h
--- a/drivers/isdn/i4l/isdn_audio.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/i4l/isdn_audio.h	Wed Oct 30 16:44:24 2002
@@ -1,6 +1,4 @@
-/* $Id: isdn_audio.h,v 1.9.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * Linux ISDN subsystem, audio conversion and compression (linklevel).
+/* Linux ISDN subsystem, audio conversion and compression
  *
  * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
  *
diff -Nru a/drivers/isdn/i4l/isdn_ciscohdlck.c b/drivers/isdn/i4l/isdn_ciscohdlck.c
--- a/drivers/isdn/i4l/isdn_ciscohdlck.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/isdn/i4l/isdn_ciscohdlck.c	Wed Oct 30 16:44:17 2002
@@ -1,5 +1,4 @@
-/*
- * Linux ISDN subsystem, CISCO HDLC network interfaces
+/* Linux ISDN subsystem, CISCO HDLC network interfaces
  *
  * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
  *           1995,96    by Thinking Objects Software GmbH Wuerzburg
@@ -14,7 +13,7 @@
  */
 
 #include "isdn_common.h"
-#include "isdn_net.h"
+#include "isdn_net_lib.h"
 #include "isdn_ciscohdlck.h"
 
 #include <linux/if_arp.h>
@@ -56,6 +55,7 @@
 isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	isdn_net_local *mlp = dev->priv;
+	struct inl_cisco *cisco = mlp->inl_priv;
 	unsigned long len = 0;
 	int period;
 	char debserint;
@@ -67,13 +67,13 @@
 	switch (cmd) {
 		/* get/set keepalive period */
 		case SIOCGKEEPPERIOD:
-			len = sizeof(mlp->cisco_keepalive_period);
+			len = sizeof(cisco->keepalive_period);
 			if (copy_to_user((char *)ifr->ifr_ifru.ifru_data,
-					 (char *)&mlp->cisco_keepalive_period, len))
+					 (char *)&cisco->keepalive_period, len))
 				rc = -EFAULT;
 			break;
 		case SIOCSKEEPPERIOD:
-			len = sizeof(mlp->cisco_keepalive_period);
+			len = sizeof(cisco->keepalive_period);
 			if (copy_from_user((char *)&period,
 					   (char *)ifr->ifr_ifru.ifru_data, len)) {
 				rc = -EFAULT;
@@ -83,21 +83,21 @@
 				rc = -EINVAL;
 				break;
 			}
-			mod_timer(&mlp->cisco_timer, jiffies + period * HZ);
+			mod_timer(&cisco->timer, jiffies + period * HZ);
 			printk(KERN_INFO "%s: Keepalive period set "
 			       "to %d seconds.\n", dev->name, period);
-			mlp->cisco_keepalive_period = period;
+			cisco->keepalive_period = period;
 			break;
 
 		/* get/set debugging */
 		case SIOCGDEBSERINT:
-			len = sizeof(mlp->cisco_debserint);
+			len = sizeof(cisco->debserint);
 			if (copy_to_user((char *)ifr->ifr_ifru.ifru_data,
-					 (char *)&mlp->cisco_debserint, len))
+					 (char *)&cisco->debserint, len))
 				rc = -EFAULT;
 			break;
 		case SIOCSDEBSERINT:
-			len = sizeof(mlp->cisco_debserint);
+			len = sizeof(cisco->debserint);
 			if (copy_from_user((char *)&debserint,
 					   (char *)ifr->ifr_ifru.ifru_data, len)) {
 				rc = -EFAULT;
@@ -107,7 +107,7 @@
 				rc = -EINVAL;
 				break;
 			}
-			mlp->cisco_debserint = debserint;
+			cisco->debserint = debserint;
 			break;
 
 		default:
@@ -122,10 +122,11 @@
 isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data)
 {
 	isdn_net_local *mlp = (isdn_net_local *) data;
-	isdn_net_dev *idev;
+ 	isdn_net_dev *idev;
+	struct inl_cisco *cisco = mlp->inl_priv;
 	struct sk_buff *skb;
 	unsigned char *p;
-	unsigned long last_cisco_myseq = mlp->cisco_myseq;
+	unsigned long last_cisco_myseq = cisco->myseq;
 	int myseq_diff = 0;
 
 	if (list_empty(&mlp->online)) {
@@ -133,33 +134,33 @@
 		return;
 	}
 	idev = list_entry(mlp->online.next, isdn_net_dev, online);
-	mlp->cisco_myseq++;
+	cisco->myseq++;
 
-	myseq_diff = (mlp->cisco_myseq - mlp->cisco_mineseen);
-	if (mlp->cisco_line_state && (myseq_diff >= 3 || myseq_diff <= -3)) {
+	myseq_diff = cisco->myseq - cisco->mineseen;
+	if (cisco->line_state && (myseq_diff >= 3 || myseq_diff <= -3)) {
 		/* line up -> down */
-		mlp->cisco_line_state = 0;
+		cisco->line_state = 0;
 		printk (KERN_WARNING
 				"UPDOWN: Line protocol on Interface %s,"
 				" changed state to down\n", idev->name);
 		/* should stop routing higher-level data accross */
-	} else if (!mlp->cisco_line_state &&
+	} else if (!cisco->line_state &&
 		myseq_diff >= 0 && myseq_diff <= 2) {
 		/* line down -> up */
-		mlp->cisco_line_state = 1;
+		cisco->line_state = 1;
 		printk (KERN_WARNING
 				"UPDOWN: Line protocol on Interface %s,"
 				" changed state to up\n", idev->name);
 		/* restart routing higher-level data accross */
 	}
 
-	if (mlp->cisco_debserint)
+	if (cisco->debserint)
 		printk (KERN_DEBUG "%s: HDLC "
-			"myseq %lu, mineseen %lu%c, yourseen %lu, %s\n",
-			idev->name, last_cisco_myseq, mlp->cisco_mineseen,
-			(last_cisco_myseq == mlp->cisco_mineseen) ? '*' : 040,
-			mlp->cisco_yourseq,
-			(mlp->cisco_line_state) ? "line up" : "line down");
+			"myseq %u, mineseen %u%c, yourseen %u, %s\n",
+			idev->name, cisco->myseq, cisco->mineseen,
+			(last_cisco_myseq == cisco->mineseen) ? '*' : 040,
+			cisco->yourseq,
+			(cisco->line_state) ? "line up" : "line down");
 
 	skb = isdn_net_ciscohdlck_alloc_skb(idev, 4 + 14);
 	if (!skb)
@@ -174,13 +175,13 @@
 
 	/* slarp keepalive */
 	p += put_u32(p, CISCO_SLARP_KEEPALIVE);
-	p += put_u32(p, mlp->cisco_myseq);
-	p += put_u32(p, mlp->cisco_yourseq);
+	p += put_u32(p, cisco->myseq);
+	p += put_u32(p, cisco->yourseq);
 	p += put_u16(p, 0xffff); // reliablity, always 0xffff
 
 	isdn_net_write_super(idev, skb);
 
-	mod_timer(&mlp->cisco_timer, jiffies + mlp->cisco_keepalive_period * HZ);
+	mod_timer(&cisco->timer, jiffies + cisco->keepalive_period * HZ);
 }
 
 static void
@@ -220,24 +221,25 @@
 isdn_ciscohdlck_connected(isdn_net_dev *idev)
 {
 	isdn_net_local *lp = idev->mlp;
+	struct inl_cisco *cisco = lp->inl_priv;
 
-	lp->cisco_myseq = 0;
-	lp->cisco_mineseen = 0;
-	lp->cisco_yourseq = 0;
-	lp->cisco_keepalive_period = ISDN_TIMER_KEEPINT;
-	lp->cisco_last_slarp_in = 0;
-	lp->cisco_line_state = 0;
-	lp->cisco_debserint = 0;
+	cisco->myseq = 0;
+	cisco->mineseen = 0;
+	cisco->yourseq = 0;
+	cisco->keepalive_period = 10;
+	cisco->last_slarp_in = 0;
+	cisco->line_state = 0;
+	cisco->debserint = 0;
 
 	if (lp->p_encap == ISDN_NET_ENCAP_CISCOHDLCK) {
 		/* send slarp request because interface/seq.no.s reset */
 		isdn_net_ciscohdlck_slarp_send_request(lp);
 
-		init_timer(&lp->cisco_timer);
-		lp->cisco_timer.data = (unsigned long) lp;
-		lp->cisco_timer.function = isdn_net_ciscohdlck_slarp_send_keepalive;
-		lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ;
-		add_timer(&lp->cisco_timer);
+		init_timer(&cisco->timer);
+		cisco->timer.data = (unsigned long) lp;
+		cisco->timer.function = isdn_net_ciscohdlck_slarp_send_keepalive;
+		cisco->timer.expires = jiffies + cisco->keepalive_period * HZ;
+		add_timer(&cisco->timer);
 	}
 	netif_wake_queue(&lp->dev);
 }
@@ -246,9 +248,10 @@
 isdn_ciscohdlck_disconnected(isdn_net_dev *idev)
 {
 	isdn_net_local *lp = idev->mlp;
+	struct inl_cisco *cisco = lp->inl_priv;
 
 	if (lp->p_encap == ISDN_NET_ENCAP_CISCOHDLCK) {
-		del_timer(&lp->cisco_timer);
+		del_timer(&cisco->timer);
 	}
 }
 
@@ -296,6 +299,7 @@
 isdn_net_ciscohdlck_slarp_in(isdn_net_dev *idev, struct sk_buff *skb)
 {
 	isdn_net_local *mlp = idev->mlp;
+	struct inl_cisco *cisco = mlp->inl_priv;
 	unsigned char *p;
 	int period;
 	u32 code;
@@ -312,7 +316,7 @@
 	
 	switch (code) {
 	case CISCO_SLARP_REQUEST:
-		mlp->cisco_yourseq = 0;
+		cisco->yourseq = 0;
 		isdn_net_ciscohdlck_slarp_send_reply(idev);
 		break;
 	case CISCO_SLARP_REPLY:
@@ -339,21 +343,20 @@
 				 HIPQUAD(addr), HIPQUAD(mask));
 		break;
 	case CISCO_SLARP_KEEPALIVE:
-		period = (int)((jiffies - mlp->cisco_last_slarp_in
-				+ HZ/2 - 1) / HZ);
-		if (mlp->cisco_debserint &&
-				(period != mlp->cisco_keepalive_period) &&
-				mlp->cisco_last_slarp_in) {
+		period = (jiffies - cisco->last_slarp_in + HZ/2 - 1) / HZ;
+		if (cisco->debserint &&
+				(period != cisco->keepalive_period) &&
+				cisco->last_slarp_in) {
 			printk(KERN_DEBUG "%s: Keepalive period mismatch - "
 				"is %d but should be %d.\n",
-				idev->name, period, mlp->cisco_keepalive_period);
+				idev->name, period, cisco->keepalive_period);
 		}
-		mlp->cisco_last_slarp_in = jiffies;
+		cisco->last_slarp_in = jiffies;
 		p += get_u32(p, &my_seq);
 		p += get_u32(p, &your_seq);
 		p += get_u16(p, &unused);
-		mlp->cisco_yourseq = my_seq;
-		mlp->cisco_mineseen = your_seq;
+		cisco->yourseq = my_seq;
+		cisco->mineseen = your_seq;
 		break;
 	}
 }
@@ -362,6 +365,7 @@
 isdn_ciscohdlck_receive(isdn_net_local *lp, isdn_net_dev *idev,
 			struct sk_buff *skb)
 {
+	struct inl_cisco *cisco = lp->inl_priv;
 	unsigned char *p;
  	u8 addr;
  	u8 ctrl;
@@ -388,7 +392,7 @@
 		isdn_net_ciscohdlck_slarp_in(idev, skb);
 		goto out_free;
 	case CISCO_TYPE_CDP:
-		if (lp->cisco_debserint)
+		if (cisco->debserint)
 			printk(KERN_DEBUG "%s: Received CDP packet. use "
 				"\"no cdp enable\" on cisco.\n", idev->name);
 		goto out_free;
@@ -418,7 +422,23 @@
 	return 4;
 }
 
-struct isdn_netif_ops ciscohdlck_ops = {
+static int
+isdn_ciscohdlck_open(isdn_net_local *lp)
+{
+	lp->inl_priv = kmalloc(sizeof(struct inl_cisco), GFP_KERNEL);
+	if (!lp->inl_priv)
+		return -ENOMEM;
+
+	return 0;
+}
+
+static void
+isdn_ciscohdlck_close(isdn_net_local *lp)
+{
+	kfree(lp->inl_priv);
+}
+
+struct isdn_netif_ops isdn_ciscohdlck_ops = {
 	.hard_start_xmit     = isdn_net_start_xmit,
 	.hard_header         = isdn_ciscohdlck_header,
 	.do_ioctl            = isdn_ciscohdlck_dev_ioctl,
@@ -427,4 +447,6 @@
 	.receive             = isdn_ciscohdlck_receive,
 	.connected           = isdn_ciscohdlck_connected,
 	.disconnected        = isdn_ciscohdlck_disconnected,
+	.open                = isdn_ciscohdlck_open,
+	.close               = isdn_ciscohdlck_close,
 };
diff -Nru a/drivers/isdn/i4l/isdn_ciscohdlck.h b/drivers/isdn/i4l/isdn_ciscohdlck.h
--- a/drivers/isdn/i4l/isdn_ciscohdlck.h	Wed Oct 30 16:44:34 2002
+++ b/drivers/isdn/i4l/isdn_ciscohdlck.h	Wed Oct 30 16:44:34 2002
@@ -1,5 +1,4 @@
-/*
- * Linux ISDN subsystem, CISCO HDLC network interfaces
+/* Linux ISDN subsystem, CISCO HDLC network interfaces
  *
  * Copyright 1999-2002  by Kai Germaschewski <kai@germaschewski.name>
  *           2001       by Bjoern A. Zeeb <i4l@zabbadoz.net>
@@ -11,6 +10,17 @@
 #ifndef ISDN_CISCOHDLCK_H
 #define ISDN_CISCOHDLCK_H
 
-extern struct isdn_netif_ops ciscohdlck_ops;
+extern struct isdn_netif_ops isdn_ciscohdlck_ops;
+
+struct inl_cisco {
+	u32 myseq;             /* local keepalive seq. for Cisco */
+	u32 mineseen;          /* returned keepalive seq. from remote */
+	u32 yourseq;           /* remote keepalive seq. for Cisco  */
+	int keepalive_period;  /* keepalive period */
+	int last_slarp_in;     /* jiffie of last recvd keepalive pkt */
+	char line_state;       /* state of line */
+	char debserint;	       /* debugging flags */
+	struct timer_list timer;
+};
 
 #endif
diff -Nru a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
--- a/drivers/isdn/i4l/isdn_common.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/i4l/isdn_common.c	Wed Oct 30 16:44:27 2002
@@ -1,6 +1,4 @@
-/* $Id: isdn_common.c,v 1.114.6.16 2001/11/06 20:58:28 kai Exp $
- *
- * Linux ISDN subsystem, common used functions (linklevel).
+/* Linux ISDN subsystem, common used functions
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    Thinking Objects Software GmbH Wuerzburg
@@ -8,7 +6,6 @@
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #include <linux/config.h>
@@ -21,14 +18,14 @@
 #include <linux/smp_lock.h>
 #include <linux/ctype.h>
 #include "isdn_common.h"
-#include "isdn_tty.h"
+#include "isdn_net_lib.h"
 #include "isdn_net.h"
+#include "isdn_tty.h"
 #include "isdn_ppp.h"
 #ifdef CONFIG_ISDN_AUDIO
 #include "isdn_audio.h"
 #endif
 #include <linux/isdn_divertif.h>
-#include "isdn_v110.h"
 #include <linux/devfs_fs_kernel.h>
 
 MODULE_DESCRIPTION("ISDN4Linux: link layer");
@@ -37,94 +34,982 @@
 
 isdn_dev *dev;
 
-struct isdn_slot {
-	int               di;                  /* driver index               */
-	int               ch;                  /* channel index (per driver) */
-	int               usage;               /* how is it used             */
-	char              num[ISDN_MSNLEN];    /* the current phone number   */
-	unsigned long     ibytes;              /* Statistics incoming bytes  */
-	unsigned long     obytes;              /* Statistics outgoing bytes  */
-	struct isdn_v110  iv110;               /* For V.110                  */
-	int               m_idx;               /* Index for mdm....          */
-	isdn_net_dev      *idev;               /* pointer to isdn_net_dev    */
+static void isdn_lock_driver(struct isdn_driver *drv);
+static void isdn_unlock_driver(struct isdn_driver *drv);
+
+static void isdn_register_devfs(int);
+static void isdn_unregister_devfs(int);
+
+/* ====================================================================== */
+
+static struct isdn_slot slots[ISDN_MAX_CHANNELS]; 
+
+static struct fsm slot_fsm;
+static void slot_debug(struct fsm_inst *fi, char *fmt, ...);
+
+static char *slot_st_str[] = {
+	"ST_SLOT_NULL",
+	"ST_SLOT_BOUND",
+	"ST_SLOT_IN",
+	"ST_SLOT_WAIT_DCONN",
+	"ST_SLOT_DCONN",
+	"ST_SLOT_WAIT_BCONN",
+	"ST_SLOT_ACTIVE",
+	"ST_SLOT_WAIT_BHUP",
+	"ST_SLOT_WAIT_DHUP",
 };
 
-static struct isdn_slot slot[ISDN_MAX_CHANNELS]; 
+static char *ev_str[] = {
+	"EV_DRV_REGISTER",
+	"EV_STAT_RUN",
+	"EV_STAT_STOP",
+	"EV_STAT_UNLOAD",
+	"EV_STAT_STAVAIL",
+	"EV_STAT_ADDCH",
+	"EV_STAT_ICALL",
+	"EV_STAT_DCONN",
+	"EV_STAT_BCONN",
+	"EV_STAT_BHUP",
+	"EV_STAT_DHUP",
+	"EV_STAT_BSENT",
+	"EV_STAT_CINF",
+	"EV_STAT_CAUSE",
+	"EV_STAT_DISPLAY",
+	"EV_STAT_FAXIND",
+	"EV_STAT_AUDIO",
+	"EV_CMD_CLREAZ",
+	"EV_CMD_SETEAZ",
+	"EV_CMD_SETL2",
+	"EV_CMD_SETL3",
+	"EV_CMD_DIAL",
+	"EV_CMD_ACCEPTD",
+	"EV_CMD_ACCEPTB",
+	"EV_CMD_HANGUP",
+	"EV_DATA_REQ",
+	"EV_DATA_IND",
+	"EV_SLOT_BIND",
+	"EV_SLOT_UNBIND",
+};
 
-static char *isdn_revision = "$Revision: 1.114.6.16 $";
+static int __slot_command(struct isdn_slot *slot, isdn_ctrl *cmd);
 
-extern char *isdn_net_revision;
-extern char *isdn_tty_revision;
-#ifdef CONFIG_ISDN_PPP
-extern char *isdn_ppp_revision;
-#else
-static char *isdn_ppp_revision = ": none $";
-#endif
-#ifdef CONFIG_ISDN_AUDIO
-extern char *isdn_audio_revision;
-#else
-static char *isdn_audio_revision = ": none $";
-#endif
-extern char *isdn_v110_revision;
+static void isdn_v110_setl2(struct isdn_slot *slot, isdn_ctrl *cmd);
+static void __isdn_v110_open(struct isdn_slot *slot);
+static void __isdn_v110_close(struct isdn_slot *slot);
+static void __isdn_v110_bsent(struct isdn_slot *slot, int pr, isdn_ctrl *cmd);
+static int  isdn_v110_data_ind(struct isdn_slot *slot, struct sk_buff *skb);
+static int  isdn_v110_data_req(struct isdn_slot *slot, struct sk_buff *skb);
 
-#if defined(CONFIG_ISDN_DIVERSION) || defined(CONFIG_ISDN_DIVERSION_MODULE)
-static isdn_divert_if *divert_if; /* = NULL */
-#else
-#define divert_if ((isdn_divert_if *) NULL)
-#endif
+static inline int
+do_event_cb(struct isdn_slot *slot, int pr, void *arg)
+{
+	if (slot->event_cb)
+		return slot->event_cb(slot, pr, arg);
 
+	return -ENXIO;
+}
 
-static void set_global_features(void);
-static void isdn_register_devfs(int);
-static void isdn_unregister_devfs(int);
-static int isdn_wildmat(char *s, char *p);
-static int isdn_command(isdn_ctrl *cmd);
+static int
+slot_bind(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	
+	isdn_lock_driver(slot->drv);
+	fsm_change_state(fi, ST_SLOT_BOUND);
 
-void
-isdn_lock_drivers(void)
+	return 0;
+}
+
+/* just pass through command */
+static int
+slot_command(struct fsm_inst *fi, int pr, void *arg)
 {
-	int i;
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *c = arg;
 
-	for (i = 0; i < dev->drivers; i++) {
-		isdn_ctrl cmd;
+	return __slot_command(slot, c);
+}
 
-		cmd.driver = i;
-		cmd.arg = 0;
-		cmd.command = ISDN_CMD_LOCK;
-		isdn_command(&cmd);
-		dev->drv[i]->locks++;
+/* just pass through status */
+static int
+slot_stat(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+
+	do_event_cb(slot, pr, arg);
+	return 0;
+}
+
+/* just pass through command */
+static int
+slot_setl2(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *c = arg;
+
+	isdn_v110_setl2(slot, c);
+
+	return __slot_command(slot, c);
+}
+
+static int
+slot_dial(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *ctrl = arg;
+	int retval;
+
+	retval = __slot_command(slot, ctrl);
+	if (retval >= 0)
+		fsm_change_state(fi, ST_SLOT_WAIT_DCONN);
+
+	return retval;
+}
+
+static int
+slot_acceptd(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *ctrl = arg;
+	int retval;
+
+	retval = __slot_command(slot, ctrl);
+	if (retval >= 0)
+		fsm_change_state(fi, ST_SLOT_WAIT_DCONN);
+
+	return retval;
+}
+
+static int
+slot_acceptb(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *ctrl = arg;
+	int retval;
+
+	retval = __slot_command(slot, ctrl);
+	if (retval >= 0)
+		fsm_change_state(fi, ST_SLOT_WAIT_BCONN);
+
+	return retval;
+}
+
+static int
+slot_actv_hangup(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *ctrl = arg;
+	int retval;
+
+	retval = __slot_command(slot, ctrl);
+	if (retval >= 0) {
+		fsm_change_state(fi, ST_SLOT_WAIT_BHUP);
 	}
+	return retval;
 }
 
-void
-isdn_MOD_INC_USE_COUNT(void)
+static int
+slot_dconn(struct fsm_inst *fi, int pr, void *arg)
 {
-	MOD_INC_USE_COUNT;
-	isdn_lock_drivers();
+	struct isdn_slot *slot = fi->userdata;
+
+	fsm_change_state(fi, ST_SLOT_DCONN);
+	do_event_cb(slot, pr, arg);
+	return 0;
 }
 
-void
-isdn_unlock_drivers(void)
+static int
+slot_bconn(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+
+	fsm_change_state(fi, ST_SLOT_ACTIVE);
+	__isdn_v110_open(slot);
+
+	isdn_info_update();
+
+	do_event_cb(slot, pr, arg);
+	return 0;
+}
+
+static int
+slot_bhup(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+
+	__isdn_v110_close(slot);
+	fsm_change_state(fi, ST_SLOT_WAIT_DHUP);
+
+	do_event_cb(slot, pr, arg);
+	return 0;
+}
+
+static int
+slot_dhup(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+
+	fsm_change_state(fi, ST_SLOT_BOUND);
+
+	do_event_cb(slot, pr, arg);
+	return 0;
+}
+
+static int
+slot_data_req(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	struct sk_buff *skb = arg;
+
+	return isdn_v110_data_req(slot, skb);
+}
+
+static int
+slot_data_ind(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	struct sk_buff *skb = arg;
+
+	/* Update statistics */
+	slot->ibytes += skb->len;
+
+	return isdn_v110_data_ind(slot, skb);
+}
+
+static int
+slot_bsent(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *ctrl = arg;
+
+	__isdn_v110_bsent(slot, pr, ctrl);
+	return 0;
+}
+
+static int
+slot_icall(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl *ctrl = arg;
+	int retval;
+
+	isdn_lock_driver(slot->drv);
+	fsm_change_state(fi, ST_SLOT_IN);
+	slot_debug(fi, "ICALL: %s\n", ctrl->parm.num);
+	if (dev->global_flags & ISDN_GLOBAL_STOPPED)
+		return 0;
+	
+	strcpy(slot->num, ctrl->parm.setup.phone);
+	/* Try to find a network-interface which will accept incoming call */
+	retval = isdn_net_find_icall(slot, &ctrl->parm.setup);
+
+	/* already taken by net now? */
+	if (fi->state != ST_SLOT_IN)
+		goto out;
+
+	retval = isdn_tty_find_icall(slot, &ctrl->parm.setup);
+ out:
+	return 0;
+}
+
+/* should become broadcast later */
+static int
+slot_in_dhup(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+
+	isdn_unlock_driver(slot->drv);
+	fsm_change_state(fi, ST_SLOT_NULL);
+	do_event_cb(slot, pr, arg);
+	return 0;
+}
+
+static int
+slot_unbind(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_slot *slot = fi->userdata;
+	isdn_ctrl cmd;
+
+	isdn_unlock_driver(slot->drv);
+	fsm_change_state(fi, ST_SLOT_NULL);
+	strcpy(slot->num, "???");
+	cmd.parm.num[0] = '\0';
+	isdn_slot_command(slot, ISDN_CMD_SETEAZ, &cmd);
+	slot->ibytes = 0;
+	slot->obytes = 0;
+	slot->usage = ISDN_USAGE_NONE;
+	isdn_info_update();
+	return 0;
+}
+
+static struct fsm_node slot_fn_tbl[] = {
+	{ ST_SLOT_NULL,          EV_SLOT_BIND,   slot_bind        },
+	{ ST_SLOT_NULL,          EV_STAT_ICALL,  slot_icall       },
+
+	{ ST_SLOT_BOUND,         EV_CMD_CLREAZ,  slot_command     },
+	{ ST_SLOT_BOUND,         EV_CMD_SETEAZ,  slot_command     },
+	{ ST_SLOT_BOUND,         EV_CMD_SETL2,   slot_setl2       },
+	{ ST_SLOT_BOUND,         EV_CMD_SETL3,   slot_command     },
+	{ ST_SLOT_BOUND,         EV_CMD_DIAL,    slot_dial        },
+	{ ST_SLOT_BOUND,         EV_SLOT_UNBIND, slot_unbind      },
+
+	{ ST_SLOT_IN,            EV_CMD_SETL2,   slot_setl2       },
+	{ ST_SLOT_IN,            EV_CMD_SETL3,   slot_command     },
+	{ ST_SLOT_IN,            EV_CMD_ACCEPTD, slot_acceptd     },
+	{ ST_SLOT_IN,            EV_STAT_DHUP,   slot_in_dhup     },
+
+	{ ST_SLOT_WAIT_DCONN,    EV_STAT_DCONN,  slot_dconn       },
+	{ ST_SLOT_WAIT_DCONN,    EV_STAT_DHUP,   slot_dhup        },
+
+	{ ST_SLOT_DCONN,         EV_CMD_ACCEPTB, slot_acceptb     },
+	{ ST_SLOT_DCONN,         EV_STAT_BCONN,  slot_bconn       },
+
+	{ ST_SLOT_WAIT_BCONN,    EV_STAT_BCONN,  slot_bconn       },
+
+	{ ST_SLOT_ACTIVE,        EV_DATA_REQ,    slot_data_req    },
+	{ ST_SLOT_ACTIVE,        EV_DATA_IND,    slot_data_ind    },
+	{ ST_SLOT_ACTIVE,        EV_CMD_HANGUP,  slot_actv_hangup },
+	{ ST_SLOT_ACTIVE,        EV_STAT_BSENT,  slot_bsent       },
+	{ ST_SLOT_ACTIVE,        EV_STAT_BHUP,   slot_bhup        },
+	{ ST_SLOT_ACTIVE,        EV_STAT_FAXIND, slot_stat        },
+	{ ST_SLOT_ACTIVE,        EV_STAT_AUDIO,  slot_stat        },
+
+	{ ST_SLOT_WAIT_BHUP,     EV_STAT_BHUP,   slot_bhup        },
+
+	{ ST_SLOT_WAIT_DHUP,     EV_STAT_DHUP,   slot_dhup        },
+};
+
+static struct fsm slot_fsm = {
+	.st_cnt = ARRAY_SIZE(slot_st_str),
+	.st_str = slot_st_str,
+	.ev_cnt = ARRAY_SIZE(ev_str),
+	.ev_str = ev_str,
+	.fn_cnt = ARRAY_SIZE(slot_fn_tbl),
+	.fn_tbl = slot_fn_tbl,
+};
+
+static void slot_debug(struct fsm_inst *fi, char *fmt, ...)
+{
+	va_list args;
+	struct isdn_slot *slot = fi->userdata;
+	char buf[128];
+	char *p = buf;
+
+	va_start(args, fmt);
+	p += sprintf(p, "slot %d(%d:%d): ", slot-slots, slot->di, slot->ch);
+	p += vsprintf(p, fmt, args);
+	va_end(args);
+	printk(KERN_DEBUG "%s\n", buf);
+}
+
+/* ====================================================================== */
+
+static spinlock_t stat_lock = SPIN_LOCK_UNLOCKED;
+
+static struct fsm drv_fsm;
+
+enum {
+	ST_DRV_NULL,
+	ST_DRV_LOADED,
+	ST_DRV_RUNNING,
+};
+
+static char *drv_st_str[] = {
+	"ST_DRV_NULL",
+	"ST_DRV_LOADED",
+	"ST_DRV_RUNNING",
+};
+
+#define DRV_FLAG_REJBUS  1
+
+/* Description of hardware-level-driver */
+struct isdn_driver {
+	int                 di;
+	char                id[20];
+	atomic_t            refcnt;
+	unsigned long       flags;            /* Misc driver Flags           */
+	unsigned long       features;
+	int                 locks;            /* Number of locks             */
+	int                 channels;         /* Number of channels          */
+	wait_queue_head_t   st_waitq;         /* Wait-Queue for status-reads */
+	int                 maxbufsize;       /* Maximum Buffersize supported*/
+	int                 stavail;          /* Chars avail on Status-device*/
+	isdn_if            *interface;        /* Interface to driver         */
+	char                msn2eaz[10][ISDN_MSNLEN];  /*  MSN->EAZ          */
+	struct fsm_inst     fi;
+} driver;
+
+static int __drv_command(struct isdn_driver *drv, isdn_ctrl *cmd);
+
+static spinlock_t drivers_lock = SPIN_LOCK_UNLOCKED;
+static struct isdn_driver *drivers[ISDN_MAX_DRIVERS];
+
+static int
+isdn_writebuf_skb(struct isdn_slot *slot, struct sk_buff *skb)
+{
+	struct sk_buff *skb2;
+	struct isdn_driver *drv = slot->drv;
+	int hl = drv->interface->hl_hdrlen;
+	int retval;
+
+	if (skb_headroom(skb) >= hl) {
+		retval = drv->interface->writebuf_skb(slot->di, slot->ch, 1, skb);
+		goto out;
+	}
+	skb2 = skb_realloc_headroom(skb, hl);
+	if (!skb2) {
+		retval = -ENOMEM;
+		goto out;
+	}
+	retval = drv->interface->writebuf_skb(slot->di, slot->ch, 1, skb2);
+	if (retval < 0)
+		kfree_skb(skb2);
+	else
+		kfree_skb(skb);
+
+ out:
+	if (retval > 0)
+		slots->obytes += retval;
+
+	return retval;
+}
+
+int
+__isdn_drv_lookup(char *drvid)
+{
+	int drvidx;
+
+	for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) {
+		if (!drivers[drvidx])
+			continue;
+
+		if (strcmp(drivers[drvidx]->id, drvid) == 0)
+			return drvidx;
+	}
+	return -1;
+}
+
+int
+isdn_drv_lookup(char *drvid)
+{
+	unsigned long flags;
+	int drvidx;
+
+	spin_lock_irqsave(&drivers_lock, flags);
+	drvidx = __isdn_drv_lookup(drvid);
+	spin_unlock_irqrestore(&drivers_lock, flags);
+	return drvidx;
+}
+
+static void
+drv_destroy(struct isdn_driver *drv)
+{
+	kfree(drv);
+}
+
+static inline struct isdn_driver *
+get_drv(struct isdn_driver *drv)
+{
+	printk("get_drv %d: %d -> %d\n", drv->di, atomic_read(&drv->refcnt), 
+	       atomic_read(&drv->refcnt) + 1); 
+	atomic_inc(&drv->refcnt);
+	return drv;
+}
+
+static inline void
+put_drv(struct isdn_driver *drv)
+{
+	printk("put_drv %d: %d -> %d\n", drv->di, atomic_read(&drv->refcnt),
+	       atomic_read(&drv->refcnt) - 1); 
+	if (atomic_dec_and_test(&drv->refcnt)) {
+		drv_destroy(drv);
+	}
+}
+
+static struct isdn_driver *
+get_drv_by_nr(int di)
+{
+	unsigned long flags;
+	struct isdn_driver *drv;
+	
+	if (di < 0)
+		return NULL;
+
+	spin_lock_irqsave(&drivers_lock, flags);
+	drv = drivers[di];
+	if (drv)
+		get_drv(drv);
+	spin_unlock_irqrestore(&drivers_lock, flags);
+	return drv;
+}
+
+char *
+isdn_drv_drvid(int di)
+{
+	if (!drivers[di]) {
+		isdn_BUG();
+		return "";
+	}
+	return drivers[di]->id;
+}
+
+/* 
+ * Helper keeping track of the features the drivers support
+ */
+static void
+set_global_features(void)
+{
+	unsigned long flags;
+	int drvidx;
+
+	dev->global_features = 0;
+	spin_lock_irqsave(&drivers_lock, flags);
+	for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) {
+		if (!drivers[drvidx])
+			continue;
+		if (drivers[drvidx]->fi.state != ST_DRV_RUNNING)
+			continue;
+		dev->global_features |= drivers[drvidx]->features;
+	}
+	spin_unlock_irqrestore(&drivers_lock, flags);
+}
+
+/*
+ * driver state machine
+ */
+static int  isdn_add_channels(struct isdn_driver *, int, int, int);
+static void isdn_receive_skb_callback(int di, int ch, struct sk_buff *skb);
+static int  isdn_status_callback(isdn_ctrl * c);
+static int  isdn_dc2minor(int di, int ch);
+
+static void isdn_v110_add_features(struct isdn_driver *drv);
+
+static int
+drv_register(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_driver *drv = fi->userdata;
+	isdn_if *iif = arg;
+	
+	fsm_change_state(fi, ST_DRV_LOADED);
+	drv->maxbufsize = iif->maxbufsize;
+	drv->interface = iif;
+	iif->channels = drv->di;
+	iif->rcvcallb_skb = isdn_receive_skb_callback;
+	iif->statcallb = isdn_status_callback;
+
+	isdn_info_update();
+}
+
+static int
+drv_stat_run(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_driver *drv = fi->userdata;
+	fsm_change_state(fi, ST_DRV_RUNNING);
+
+	drv->features = drv->interface->features;
+	isdn_v110_add_features(drv);
+	set_global_features();
+}
+
+static int
+drv_stat_stop(struct fsm_inst *fi, int pr, void *arg)
+{
+	fsm_change_state(fi, ST_DRV_LOADED);
+	set_global_features();
+}
+
+static int
+drv_stat_unload(struct fsm_inst *fi, int pr, void *arg)
 {
+	struct isdn_driver *drv = fi->userdata;
+	unsigned long flags;
 	int i;
 
-	for (i = 0; i < dev->drivers; i++)
-		if (dev->drv[i]->locks > 0) {
-			isdn_ctrl cmd;
-
-			cmd.driver = i;
-			cmd.arg = 0;
-			cmd.command = ISDN_CMD_UNLOCK;
-			isdn_command(&cmd);
-			dev->drv[i]->locks--;
+	spin_lock_irqsave(&drivers_lock, flags);
+	drivers[drv->di] = NULL;
+	spin_unlock_irqrestore(&drivers_lock, flags);
+	put_drv(drv);
+
+	while (drv->locks > 0) {
+		isdn_ctrl cmd;
+		cmd.driver = drv->di;
+		cmd.arg = 0;
+		cmd.command = ISDN_CMD_UNLOCK;
+		__drv_command(drv, &cmd);
+		drv->locks--;
+	}
+	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
+		if (slots[i].di == drv->di) {
+ 			slots[i].di = -1;
+ 			slots[i].drv = NULL;
+			slots[i].ch = -1;
+			slots[i].usage &= ~ISDN_USAGE_DISABLED;
+			isdn_unregister_devfs(i);
 		}
+	}
+	dev->channels -= drv->channels;
+
+	isdn_info_update();
+	return 0;
 }
 
-void
-isdn_MOD_DEC_USE_COUNT(void)
+static int
+drv_stat_addch(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_driver *drv = fi->userdata;
+	isdn_ctrl *c = arg;
+
+	isdn_add_channels(drv, c->driver, c->arg, 1);
+	isdn_info_update();
+}
+
+static int
+drv_stat_stavail(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_driver *drv = fi->userdata;
+	unsigned long flags;
+	isdn_ctrl *c = arg;
+	
+	spin_lock_irqsave(&stat_lock, flags);
+	drv->stavail += c->arg;
+	spin_unlock_irqrestore(&stat_lock, flags);
+	wake_up_interruptible(&drv->st_waitq);
+}
+
+static int
+drv_to_slot(struct fsm_inst *fi, int pr, void *arg)
+{
+	struct isdn_driver *drv = fi->userdata;
+	isdn_ctrl *c = arg;
+	int sl = isdn_dc2minor(drv->di, c->arg & 0xff);
+
+	if (sl < 0) {
+		isdn_BUG();
+		return 1;
+	}
+	return fsm_event(&slots[sl].fi, pr, arg);
+}
+
+static struct fsm_node drv_fn_tbl[] = {
+	{ ST_DRV_NULL,    EV_DRV_REGISTER, drv_register     },
+
+	{ ST_DRV_LOADED,  EV_STAT_RUN,     drv_stat_run     },
+	{ ST_DRV_LOADED,  EV_STAT_STAVAIL, drv_stat_stavail },
+	{ ST_DRV_LOADED,  EV_STAT_ADDCH,   drv_stat_addch   },
+	{ ST_DRV_LOADED,  EV_STAT_UNLOAD,  drv_stat_unload  },
+
+	{ ST_DRV_RUNNING, EV_STAT_STOP,    drv_stat_stop    },
+	{ ST_DRV_RUNNING, EV_STAT_STAVAIL, drv_stat_stavail },
+	{ ST_DRV_RUNNING, EV_STAT_ICALL,   drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_DCONN,   drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_BCONN,   drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_BHUP,    drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_DHUP,    drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_BSENT,   drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_CINF,    drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_CAUSE,   drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_DISPLAY, drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_FAXIND,  drv_to_slot      },
+	{ ST_DRV_RUNNING, EV_STAT_AUDIO,   drv_to_slot      },
+};
+
+static struct fsm drv_fsm = {
+	.st_cnt = ARRAY_SIZE(drv_st_str),
+	.st_str = drv_st_str,
+	.ev_cnt = ARRAY_SIZE(ev_str),
+	.ev_str = ev_str,
+	.fn_cnt = ARRAY_SIZE(drv_fn_tbl),
+	.fn_tbl = drv_fn_tbl,
+};
+
+static void drv_debug(struct fsm_inst *fi, char *fmt, ...)
+{
+	va_list args;
+	struct isdn_driver *drv = fi->userdata;
+	char buf[128];
+	char *p = buf;
+
+	va_start(args, fmt);
+	p += sprintf(p, "%s: ", drv->id);
+	p += vsprintf(p, fmt, args);
+	va_end(args);
+	printk(KERN_DEBUG "%s\n", buf);
+}
+
+/* ====================================================================== */
+/* callbacks from hardware driver                                         */
+/* ====================================================================== */
+
+/* Receive a packet from B-Channel. */
+static void
+isdn_receive_skb_callback(int di, int ch, struct sk_buff *skb)
+{
+	struct isdn_driver *drv;
+	int sl;
+
+	drv = get_drv_by_nr(di);
+	if (!drv) {
+		/* hardware driver is buggy - driver isn't registered */
+		isdn_BUG();
+		goto out;
+	}
+	/* we short-cut here instead of going through the driver fsm */
+	if (drv->fi.state != ST_DRV_RUNNING) {
+		/* hardware driver is buggy - driver isn't running */
+		isdn_BUG();
+		goto out;
+	}
+	sl = isdn_dc2minor(di, ch);
+	if (sl < 0) {
+		isdn_BUG();
+		goto out;
+	}
+	if (fsm_event(&slots[sl].fi, EV_DATA_IND, skb))
+		dev_kfree_skb(skb);
+ out:
+	put_drv(drv);
+}
+
+/* Receive status indications */
+static int
+isdn_status_callback(isdn_ctrl *c)
+{
+	struct isdn_driver *drv;
+	int rc;
+
+	drv = get_drv_by_nr(c->driver);
+	if (!drv) {
+		/* hardware driver is buggy - driver isn't registered */
+		isdn_BUG();
+		return 1;
+	}
+	
+	switch (c->command) {
+		case ISDN_STAT_STAVAIL:
+			rc = fsm_event(&drv->fi, EV_STAT_STAVAIL, c);
+			break;
+		case ISDN_STAT_RUN:
+			rc = fsm_event(&drv->fi, EV_STAT_RUN, c);
+			break;
+		case ISDN_STAT_STOP:
+			rc = fsm_event(&drv->fi, EV_STAT_STOP, c);
+			break;
+		case ISDN_STAT_UNLOAD:
+			rc = fsm_event(&drv->fi, EV_STAT_UNLOAD, c);
+			break;
+		case ISDN_STAT_ADDCH:
+			rc = fsm_event(&drv->fi, EV_STAT_ADDCH, c);
+			break;
+		case ISDN_STAT_ICALL:
+			rc = fsm_event(&drv->fi, EV_STAT_ICALL, c);
+			break;
+		case ISDN_STAT_DCONN:
+			rc = fsm_event(&drv->fi, EV_STAT_DCONN, c);
+			break;
+		case ISDN_STAT_BCONN:
+			rc = fsm_event(&drv->fi, EV_STAT_BCONN, c);
+			break;
+		case ISDN_STAT_BHUP:
+			rc = fsm_event(&drv->fi, EV_STAT_BHUP, c);
+			break;
+		case ISDN_STAT_DHUP:
+			rc = fsm_event(&drv->fi, EV_STAT_DHUP, c);
+			break;
+		case ISDN_STAT_BSENT:
+			rc = fsm_event(&drv->fi, EV_STAT_BSENT, c);
+			break;
+		case ISDN_STAT_CINF:
+			rc = fsm_event(&drv->fi, EV_STAT_CINF, c);
+			break;
+		case ISDN_STAT_CAUSE:
+			rc = fsm_event(&drv->fi, EV_STAT_CAUSE, c);
+			break;
+		case ISDN_STAT_DISPLAY:
+			rc = fsm_event(&drv->fi, EV_STAT_DISPLAY, c);
+			break;
+		case ISDN_STAT_FAXIND:
+			rc = fsm_event(&drv->fi, EV_STAT_FAXIND, c);
+			break;
+		case ISDN_STAT_AUDIO:
+			rc = fsm_event(&drv->fi, EV_STAT_AUDIO, c);
+			break;
+#if 0
+		case ISDN_STAT_ICALL:
+			/* Find any ttyI, waiting for D-channel setup */
+			if (isdn_tty_stat_callback(i, c)) {
+				cmd.driver = di;
+				cmd.arg = c->arg;
+				cmd.command = ISDN_CMD_ACCEPTB;
+				isdn_command(&cmd);
+				break;
+			}
+			break;
+			switch (r) {
+				case 0:
+                                         if (divert_if)
+						 if ((retval = divert_if->stat_callback(c))) 
+							 return(retval); /* processed */
+					if ((!retval) && (drivers[di]->flags & DRV_FLAG_REJBUS)) {
+						/* No tty responding */
+						cmd.driver = di;
+						cmd.arg = c->arg;
+						cmd.command = ISDN_CMD_HANGUP;
+						isdn_command(&cmd);
+						retval = 2;
+					}
+					break;
+				case 1: /* incoming call accepted by net interface */
+
+				case 2:	/* For calling back, first reject incoming call ... */
+				case 3:	/* Interface found, but down, reject call actively  */
+					retval = 2;
+					printk(KERN_INFO "isdn: Rejecting Call\n");
+					cmd.driver = di;
+					cmd.arg = c->arg;
+					cmd.command = ISDN_CMD_HANGUP;
+					isdn_command(&cmd);
+					if (r == 3)
+						break;
+					/* Fall through */
+				case 4:
+					/* ... then start callback. */
+					break;
+				case 5:
+					/* Number would eventually match, if longer */
+					retval = 3;
+					break;
+			}
+			dbg_statcallb("ICALL: ret=%d\n", retval);
+			return retval;
+			break;
+		case ISDN_STAT_DHUP:
+                        if (divert_if)
+				divert_if->stat_callback(c); 
+			break;
+		case ISDN_STAT_BCONN:
+			break;
+		case ISDN_STAT_BHUP:
+			break;
+#endif
+#if 0 // FIXME
+		case ISDN_STAT_DISCH:
+			save_flags(flags);
+			cli();
+			for (i = 0; i < ISDN_MAX_CHANNELS; i++)
+				if ((slots[i].di == di) &&
+				    (slots[i].ch == c->arg)) {
+					if (c->parm.num[0])
+						slots[i].usage &= ~ISDN_USAGE_DISABLED;
+					else if (USG_NONE(isdn_slot_usage(i)))
+						slots[i].usage |= ISDN_USAGE_DISABLED;
+					else 
+						retval = -1;
+					break;
+				}
+			restore_flags(flags);
+			break;
+		case CAPI_PUT_MESSAGE:
+			return(isdn_capi_rec_hl_msg(&c->parm.cmsg));
+	        case ISDN_STAT_PROT:
+	        case ISDN_STAT_REDIR:
+                        if (divert_if)
+				return(divert_if->stat_callback(c));
+#endif
+		default:
+			rc = 1;
+	}
+	put_drv(drv);
+	return rc;
+}
+
+/* ====================================================================== */
+
+/*
+ * Register a new ISDN interface
+ */
+int
+register_isdn(isdn_if *iif)
 {
-	MOD_DEC_USE_COUNT;
-	isdn_unlock_drivers();
+	struct isdn_driver *drv;
+	unsigned long flags;
+	int drvidx;
+
+	drv = kmalloc(sizeof(*drv), GFP_KERNEL);
+	if (!drv) {
+		printk(KERN_WARNING "register_isdn: out of mem\n");
+		goto fail;
+	}
+	memset(drv, 0, sizeof(*drv));
+
+	atomic_set(&drv->refcnt, 0);
+	drv->fi.fsm = &drv_fsm;
+	drv->fi.state = ST_DRV_NULL;
+	drv->fi.debug = 1;
+	drv->fi.userdata = drv;
+	drv->fi.printdebug = drv_debug;
+
+	spin_lock_irqsave(&drivers_lock, flags);
+	for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++)
+		if (!drivers[drvidx])
+			break;
+
+	if (drvidx == ISDN_MAX_DRIVERS)
+		goto fail_unlock;
+
+	if (!strlen(iif->id))
+		sprintf(iif->id, "line%d", drvidx);
+
+	if (__isdn_drv_lookup(iif->id) >= 0)
+		goto fail_unlock;
+
+	strcpy(drv->id, iif->id);
+	if (isdn_add_channels(drv, drvidx, iif->channels, 0))
+		goto fail_unlock;
+
+	drv->di = drvidx;
+	drivers[drvidx] = get_drv(drv);
+	spin_unlock_irqrestore(&drivers_lock, flags);
+
+	fsm_event(&drv->fi, EV_DRV_REGISTER, iif);
+	return 1;
+	
+ fail_unlock:
+	spin_unlock_irqrestore(&drivers_lock, flags);
+	kfree(drv);
+ fail:
+	return 0;
+}
+
+/* ====================================================================== */
+
+#if defined(CONFIG_ISDN_DIVERSION) || defined(CONFIG_ISDN_DIVERSION_MODULE)
+static isdn_divert_if *divert_if; /* = NULL */
+#else
+#define divert_if ((isdn_divert_if *) NULL)
+#endif
+
+static int isdn_wildmat(char *s, char *p);
+
+static void
+isdn_lock_driver(struct isdn_driver *drv)
+{
+	isdn_ctrl cmd;
+
+	cmd.driver = drv->di;
+	cmd.arg = 0;
+	cmd.command = ISDN_CMD_LOCK;
+	__drv_command(drv, &cmd);
+}
+
+static void
+isdn_unlock_driver(struct isdn_driver *drv)
+{
+	isdn_ctrl cmd;
+
+	cmd.driver = drv->di;
+	cmd.arg = 0;
+	cmd.command = ISDN_CMD_UNLOCK;
+	__drv_command(drv, &cmd);
 }
 
 #if defined(ISDN_DEBUG_NET_DUMP) || defined(ISDN_DEBUG_MODEM_DUMP)
@@ -235,177 +1120,54 @@
 	return isdn_wildmat( TmpMsn1, TmpMsn2 );
 }
 
-int
+static int
 isdn_dc2minor(int di, int ch)
 {
 	int i;
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++)
-		if (slot[i].ch == ch && slot[i].di == di)
+		if (slots[i].ch == ch && slots[i].di == di)
 			return i;
 	return -1;
 }
 
-static int isdn_timer_cnt2 = 0;
-static int isdn_timer_cnt3 = 0;
-
-static void
-isdn_timer_funct(ulong dummy)
-{
-	int tf = dev->tflags;
-	if (tf & ISDN_TIMER_FAST) {
-		if (tf & ISDN_TIMER_MODEMREAD)
-			isdn_tty_readmodem();
-		if (tf & ISDN_TIMER_MODEMPLUS)
-			isdn_tty_modem_escape();
-		if (tf & ISDN_TIMER_MODEMXMIT)
-			isdn_tty_modem_xmit();
-	}
-	if (tf & ISDN_TIMER_SLOW) {
-		if (++isdn_timer_cnt2 >= ISDN_TIMER_1SEC) {
-			isdn_timer_cnt2 = 0;
-			if (++isdn_timer_cnt3 >= ISDN_TIMER_RINGING) {
-				isdn_timer_cnt3 = 0;
-				if (tf & ISDN_TIMER_MODEMRING)
-					isdn_tty_modem_ring();
-			}
-			if (tf & ISDN_TIMER_CARRIER)
-				isdn_tty_carrier_timeout();
-		}
-	}
-	if (tf) 
-	{
-		unsigned long flags;
-
-		save_flags(flags);
-		cli();
-		mod_timer(&dev->timer, jiffies+ISDN_TIMER_RES);
-		restore_flags(flags);
-	}
-}
-
-void
-isdn_timer_ctrl(int tf, int onoff)
-{
-	unsigned long flags;
-	int old_tflags;
-
-	save_flags(flags);
-	cli();
-	if ((tf & ISDN_TIMER_SLOW) && (!(dev->tflags & ISDN_TIMER_SLOW))) {
-		/* If the slow-timer wasn't activated until now */
-		isdn_timer_cnt2 = 0;
-	}
-	old_tflags = dev->tflags;
-	if (onoff)
-		dev->tflags |= tf;
-	else
-		dev->tflags &= ~tf;
-	if (dev->tflags && !old_tflags)
-		mod_timer(&dev->timer, jiffies+ISDN_TIMER_RES);
-	restore_flags(flags);
-}
-
-/*
- * Receive a packet from B-Channel. (Called from low-level-module)
- */
-static void
-isdn_receive_skb_callback(int di, int channel, struct sk_buff *skb)
-{
-	int i;
-
-	if ((i = isdn_dc2minor(di, channel)) == -1) {
-		dev_kfree_skb(skb);
-		return;
-	}
-	/* Update statistics */
-	slot[i].ibytes += skb->len;
-	
-	/* First, try to deliver data to network-device */
-	if (isdn_net_rcv_skb(i, skb))
-		return;
-
-	/* V.110 handling
-	 * makes sense for async streams only, so it is
-	 * called after possible net-device delivery.
-	 */
-	if (slot[i].iv110.v110) {
-		atomic_inc(&slot[i].iv110.v110use);
-		skb = isdn_v110_decode(slot[i].iv110.v110, skb);
-		atomic_dec(&slot[i].iv110.v110use);
-		if (!skb)
-			return;
-	}
-
-	/* No network-device found, deliver to tty or raw-channel */
-	if (skb->len) {
-		if (isdn_tty_rcv_skb(i, di, channel, skb))
-			return;
-		wake_up_interruptible(&dev->drv[di]->rcv_waitq[channel]);
-	} else
-		dev_kfree_skb(skb);
-}
-
-/*
- * Intercept command from Linklevel to Lowlevel.
- * If layer 2 protocol is V.110 and this is not supported by current
- * lowlevel-driver, use driver's transparent mode and handle V.110 in
- * linklevel instead.
- */
 static int
-isdn_command(isdn_ctrl *cmd)
+__drv_command(struct isdn_driver *drv, isdn_ctrl *c)
 {
-	int idx = isdn_dc2minor(cmd->driver, cmd->arg & 255);
-
-	if (cmd->driver == -1) {
-		printk(KERN_WARNING "isdn_command command(%x) driver -1\n", cmd->command);
-		return(1);
-	}
-	if (cmd->command == ISDN_CMD_SETL2) {
-		unsigned long l2prot = (cmd->arg >> 8) & 255;
-		unsigned long features = (dev->drv[cmd->driver]->interface->features
-						>> ISDN_FEATURE_L2_SHIFT) &
-						ISDN_FEATURE_L2_MASK;
-		unsigned long l2_feature = (1 << l2prot);
-
-		switch (l2prot) {
-			case ISDN_PROTO_L2_V11096:
-			case ISDN_PROTO_L2_V11019:
-			case ISDN_PROTO_L2_V11038:
-			/* If V.110 requested, but not supported by
-			 * HL-driver, set emulator-flag and change
-			 * Layer-2 to transparent
-			 */
-				if (!(features & l2_feature)) {
-					slot[idx].iv110.v110emu = l2prot;
-					cmd->arg = (cmd->arg & 255) |
-						(ISDN_PROTO_L2_TRANS << 8);
-				} else
-					slot[idx].iv110.v110emu = 0;
-		}
-	}
 #ifdef ISDN_DEBUG_COMMAND
-	switch (cmd->command) {
+	switch (c->command) {
+	case ISDN_CMD_LOCK: 
+		printk(KERN_DEBUG "ISDN_CMD_LOCK %d/%ld\n", c->driver, c->arg & 0xff); break;
+	case ISDN_CMD_UNLOCK: 
+		printk(KERN_DEBUG "ISDN_CMD_UNLOCK %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_SETL2: 
-		printk(KERN_DEBUG "ISDN_CMD_SETL2 %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_SETL2 %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_SETL3: 
-		printk(KERN_DEBUG "ISDN_CMD_SETL3 %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_SETL3 %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_DIAL: 
-		printk(KERN_DEBUG "ISDN_CMD_DIAL %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_DIAL %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_ACCEPTD: 
-		printk(KERN_DEBUG "ISDN_CMD_ACCEPTD %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_ACCEPTD %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_ACCEPTB: 
-		printk(KERN_DEBUG "ISDN_CMD_ACCEPTB %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_ACCEPTB %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_HANGUP: 
-		printk(KERN_DEBUG "ISDN_CMD_HANGUP %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_HANGUP %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_CLREAZ: 
-		printk(KERN_DEBUG "ISDN_CMD_CLREAZ %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_CLREAZ %d/%ld\n", c->driver, c->arg & 0xff); break;
 	case ISDN_CMD_SETEAZ: 
-		printk(KERN_DEBUG "ISDN_CMD_SETEAZ %d\n", idx); break;
+		printk(KERN_DEBUG "ISDN_CMD_SETEAZ %d/%ld\n", c->driver, c->arg & 0xff); break;
 	default:
-		printk(KERN_DEBUG "%s: cmd = %d\n", __FUNCTION__, cmd->command);
+		printk(KERN_DEBUG "%s: cmd = %d\n", __FUNCTION__, c->command);
 	}
 #endif
-	return dev->drv[cmd->driver]->interface->command(cmd);
+	return drv->interface->command(c);
+}
+
+static int
+__slot_command(struct isdn_slot *slot, isdn_ctrl *cmd)
+{
+	struct isdn_driver *drv = slot->drv;
+
+	return __drv_command(drv, cmd);
 }
 
 /*
@@ -431,283 +1193,6 @@
 	}
 }
 
-static int
-isdn_status_callback(isdn_ctrl * c)
-{
-	int di;
-	ulong flags;
-	int i;
-	int r;
-	int retval = 0;
-	isdn_ctrl cmd;
-	struct list_head *l;
-
-	di = c->driver;
-	i = isdn_dc2minor(di, c->arg);
-	switch (c->command) {
-		case ISDN_STAT_BSENT:
-			if (i < 0)
-				return -1;
-			if (isdn_net_stat_callback(i, c))
-				return 0;
-			if (isdn_v110_stat_callback(&slot[i].iv110, c))
-				return 0;
-			if (isdn_tty_stat_callback(i, c))
-				return 0;
-			wake_up_interruptible(&dev->drv[di]->snd_waitq[c->arg]);
-			break;
-		case ISDN_STAT_STAVAIL:
-			save_flags(flags);
-			cli();
-			dev->drv[di]->stavail += c->arg;
-			restore_flags(flags);
-			wake_up_interruptible(&dev->drv[di]->st_waitq);
-			break;
-		case ISDN_STAT_RUN:
-			dev->drv[di]->flags |= DRV_FLAG_RUNNING;
-			for (i = 0; i < ISDN_MAX_CHANNELS; i++)
-				if (slot[i].di == di)
-					isdn_slot_all_eaz(i);
-			set_global_features();
-			break;
-		case ISDN_STAT_STOP:
-			dev->drv[di]->flags &= ~DRV_FLAG_RUNNING;
-			break;
-		case ISDN_STAT_ICALL:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("ICALL: %d (%d,%ld) %s\n", i, di, c->arg, c->parm.num);
-			if (dev->global_flags & ISDN_GLOBAL_STOPPED)
-				return 0;
-
-			/* Try to find a network-interface which will accept incoming call */
-			r = isdn_net_find_icall(di, c->arg, i, &c->parm.setup);
-			switch (r) {
-				case 0:
-					/* No network-device replies.
-					 * Try ttyI's.
-					 * These return 0 on no match, 1 on match and
-					 * 3 on eventually match, if CID is longer.
-					 */
-                                        if (c->command == ISDN_STAT_ICALL)
-						if ((retval = isdn_tty_find_icall(di, c->arg, &c->parm.setup))) return(retval);
-                                         if (divert_if)
-						 if ((retval = divert_if->stat_callback(c))) 
-							 return(retval); /* processed */
-					if ((!retval) && (dev->drv[di]->flags & DRV_FLAG_REJBUS)) {
-						/* No tty responding */
-						cmd.driver = di;
-						cmd.arg = c->arg;
-						cmd.command = ISDN_CMD_HANGUP;
-						isdn_command(&cmd);
-						retval = 2;
-					}
-					break;
-				case 1: /* incoming call accepted by net interface */
-					list_for_each(l, &isdn_net_devs) {
-						isdn_net_dev *p = list_entry(l, isdn_net_dev, global_list);
-						if (p->isdn_slot == i) {
-							strcpy(cmd.parm.setup.eazmsn, p->mlp->msn);
-							isdn_slot_set_usage(i, (isdn_slot_usage(i) & ISDN_USAGE_EXCLUSIVE) | ISDN_USAGE_NET);
-							strcpy(isdn_slot_num(i), c->parm.setup.phone);
-
-							isdn_slot_command(i, ISDN_CMD_ACCEPTD, &cmd);
-							retval = 1;
-							break;
-						}
-					}
-					break;
-
-				case 2:	/* For calling back, first reject incoming call ... */
-				case 3:	/* Interface found, but down, reject call actively  */
-					retval = 2;
-					printk(KERN_INFO "isdn: Rejecting Call\n");
-					cmd.driver = di;
-					cmd.arg = c->arg;
-					cmd.command = ISDN_CMD_HANGUP;
-					isdn_command(&cmd);
-					if (r == 3)
-						break;
-					/* Fall through */
-				case 4:
-					/* ... then start callback. */
-					break;
-				case 5:
-					/* Number would eventually match, if longer */
-					retval = 3;
-					break;
-			}
-			dbg_statcallb("ICALL: ret=%d\n", retval);
-			return retval;
-			break;
-		case ISDN_STAT_CINF:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("CINF: %d %s\n", i, c->parm.num);
-			if (strcmp(c->parm.num, "0"))
-				isdn_net_stat_callback(i, c);
-			isdn_tty_stat_callback(i, c);
-			break;
-		case ISDN_STAT_CAUSE:
-			dbg_statcallb("CAUSE: %d %s\n", i, c->parm.num);
-			printk(KERN_INFO "isdn: %s,ch%ld cause: %s\n",
-			       dev->drvid[di], c->arg, c->parm.num);
-			isdn_tty_stat_callback(i, c);
-                        if (divert_if)
-				divert_if->stat_callback(c); 
-			break;
-		case ISDN_STAT_DISPLAY:
-			dbg_statcallb("DISPLAY: %d %s\n", i, c->parm.display);
-			isdn_tty_stat_callback(i, c);
-                        if (divert_if)
-				divert_if->stat_callback(c); 
-			break;
-		case ISDN_STAT_DCONN:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("DCONN: %d\n", i);
-			/* Find any net-device, waiting for D-channel setup */
-			if (isdn_net_stat_callback(i, c))
-				break;
-			isdn_v110_stat_callback(&slot[i].iv110, c);
-			/* Find any ttyI, waiting for D-channel setup */
-			if (isdn_tty_stat_callback(i, c)) {
-				cmd.driver = di;
-				cmd.arg = c->arg;
-				cmd.command = ISDN_CMD_ACCEPTB;
-				isdn_command(&cmd);
-				break;
-			}
-			break;
-		case ISDN_STAT_DHUP:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("DHUP: %d\n", i);
-			dev->drv[di]->online &= ~(1 << (c->arg));
-			isdn_info_update();
-			/* Signal hangup to network-devices */
-			if (isdn_net_stat_callback(i, c))
-				break;
-			isdn_v110_stat_callback(&slot[i].iv110, c);
-			if (isdn_tty_stat_callback(i, c))
-				break;
-                        if (divert_if)
-				divert_if->stat_callback(c); 
-			break;
-		case ISDN_STAT_BCONN:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("BCONN: %ld\n", c->arg);
-			/* Signal B-channel-connect to network-devices */
-			dev->drv[di]->online |= (1 << (c->arg));
-			isdn_info_update();
-			if (isdn_net_stat_callback(i, c))
-				break;
-			isdn_v110_stat_callback(&slot[i].iv110, c);
-			if (isdn_tty_stat_callback(i, c))
-				break;
-			break;
-		case ISDN_STAT_BHUP:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("BHUP: %d\n", i);
-			dev->drv[di]->online &= ~(1 << (c->arg));
-			isdn_info_update();
-			/* Signal hangup to network-devices */
-			if (isdn_net_stat_callback(i, c))
-				break;
-			isdn_v110_stat_callback(&slot[i].iv110, c);
-			if (isdn_tty_stat_callback(i, c))
-				break;
-			break;
-		case ISDN_STAT_NODCH:
-			if (i < 0)
-				return -1;
-			dbg_statcallb("NODCH: %ld\n", c->arg);
-			if (isdn_net_stat_callback(i, c))
-				break;
-			if (isdn_tty_stat_callback(i, c))
-				break;
-			break;
-		case ISDN_STAT_ADDCH:
-			if (isdn_add_channels(dev->drv[di], di, c->arg, 1))
-				return -1;
-			isdn_info_update();
-			break;
-		case ISDN_STAT_DISCH:
-			save_flags(flags);
-			cli();
-			for (i = 0; i < ISDN_MAX_CHANNELS; i++)
-				if ((slot[i].di == di) &&
-				    (slot[i].ch == c->arg)) {
-					if (c->parm.num[0])
-						isdn_slot_set_usage(i, isdn_slot_usage(i) & ~ISDN_USAGE_DISABLED);
-					else if (USG_NONE(isdn_slot_usage(i)))
-						isdn_slot_set_usage(i, isdn_slot_usage(i) | ISDN_USAGE_DISABLED);
-					else 
-						retval = -1;
-					break;
-				}
-			restore_flags(flags);
-			break;
-		case ISDN_STAT_UNLOAD:
-			while (dev->drv[di]->locks > 0) {
-				isdn_ctrl cmd;
-				cmd.driver = di;
-				cmd.arg = 0;
-				cmd.command = ISDN_CMD_UNLOCK;
-				isdn_command(&cmd);
-				dev->drv[di]->locks--;
-			}
-			save_flags(flags);
-			cli();
-			isdn_tty_stat_callback(i, c);
-			for (i = 0; i < ISDN_MAX_CHANNELS; i++)
-				if (slot[i].di == di) {
-					slot[i].di = -1;
-					slot[i].ch = -1;
-					slot[i].usage &= ~ISDN_USAGE_DISABLED;
-					isdn_unregister_devfs(i);
-				}
-			dev->drivers--;
-			dev->channels -= dev->drv[di]->channels;
-			kfree(dev->drv[di]->rcverr);
-			kfree(dev->drv[di]->rcvcount);
-			for (i = 0; i < dev->drv[di]->channels; i++)
-				skb_queue_purge(&dev->drv[di]->rpqueue[i]);
-			kfree(dev->drv[di]->rpqueue);
-			kfree(dev->drv[di]->rcv_waitq);
-			kfree(dev->drv[di]);
-			dev->drv[di] = NULL;
-			dev->drvid[di][0] = '\0';
-			isdn_info_update();
-			set_global_features();
-			restore_flags(flags);
-			return 0;
-		case ISDN_STAT_L1ERR:
-			break;
-		case CAPI_PUT_MESSAGE:
-			return(isdn_capi_rec_hl_msg(&c->parm.cmsg));
-#ifdef CONFIG_ISDN_TTY_FAX
-		case ISDN_STAT_FAXIND:
-			isdn_tty_stat_callback(i, c);
-			break;
-#endif
-#ifdef CONFIG_ISDN_AUDIO
-		case ISDN_STAT_AUDIO:
-			isdn_tty_stat_callback(i, c);
-			break;
-#endif
-	        case ISDN_STAT_PROT:
-	        case ISDN_STAT_REDIR:
-                        if (divert_if)
-				return(divert_if->stat_callback(c));
-		default:
-			return -1;
-	}
-	return 0;
-}
-
 /*
  * Get integer from char-pointer, set pointer to end of number
  */
@@ -721,120 +1206,16 @@
 	return v;
 }
 
-#define DLE 0x10
-
-/*
- * isdn_slot_readbchan() tries to get data from the read-queue.
- * It MUST be called with interrupts off.
- */
-int
-isdn_slot_readbchan(int sl, u_char * buf, u_char * fp, int len)
-{
-	int count;
-	int count_pull;
-	int count_put;
-	int dflag;
-	int di = isdn_slot_driver(sl);
-	int ch = isdn_slot_channel(sl);
-	struct sk_buff *skb;
-	u_char *cp;
-
-	if (!dev->drv[di])
-		return 0;
-	if (skb_queue_empty(&dev->drv[di]->rpqueue[ch]))
-		return 0;
-
-	if (len > dev->drv[di]->rcvcount[ch])
-		len = dev->drv[di]->rcvcount[ch];
-	cp = buf;
-	count = 0;
-	while (len) {
-		if (!(skb = skb_peek(&dev->drv[di]->rpqueue[ch])))
-			break;
-#ifdef CONFIG_ISDN_AUDIO
-		if (ISDN_AUDIO_SKB_LOCK(skb))
-			break;
-		ISDN_AUDIO_SKB_LOCK(skb) = 1;
-		if ((ISDN_AUDIO_SKB_DLECOUNT(skb)) || (dev->drv[di]->DLEflag & (1 << ch))) {
-			char *p = skb->data;
-			unsigned long DLEmask = (1 << ch);
-
-			dflag = 0;
-			count_pull = count_put = 0;
-			while ((count_pull < skb->len) && (len > 0)) {
-				len--;
-				if (dev->drv[di]->DLEflag & DLEmask) {
-					*cp++ = DLE;
-					dev->drv[di]->DLEflag &= ~DLEmask;
-				} else {
-					*cp++ = *p;
-					if (*p == DLE) {
-						dev->drv[di]->DLEflag |= DLEmask;
-						(ISDN_AUDIO_SKB_DLECOUNT(skb))--;
-					}
-					p++;
-					count_pull++;
-				}
-				count_put++;
-			}
-			if (count_pull >= skb->len)
-				dflag = 1;
-		} else {
-#endif
-			/* No DLE's in buff, so simply copy it */
-			dflag = 1;
-			if ((count_pull = skb->len) > len) {
-				count_pull = len;
-				dflag = 0;
-			}
-			count_put = count_pull;
-			memcpy(cp, skb->data, count_put);
-			cp += count_put;
-			len -= count_put;
-#ifdef CONFIG_ISDN_AUDIO
-		}
-#endif
-		count += count_put;
-		if (fp) {
-			memset(fp, 0, count_put);
-			fp += count_put;
-		}
-		if (dflag) {
-			/* We got all the data in this buff.
-			 * Now we can dequeue it.
-			 */
-			if (fp)
-				*(fp - 1) = 0xff;
-#ifdef CONFIG_ISDN_AUDIO
-			ISDN_AUDIO_SKB_LOCK(skb) = 0;
-#endif
-			skb = skb_dequeue(&dev->drv[di]->rpqueue[ch]);
-			dev_kfree_skb(skb);
-		} else {
-			/* Not yet emptied this buff, so it
-			 * must stay in the queue, for further calls
-			 * but we pull off the data we got until now.
-			 */
-			skb_pull(skb, count_pull);
-#ifdef CONFIG_ISDN_AUDIO
-			ISDN_AUDIO_SKB_LOCK(skb) = 0;
-#endif
-		}
-		dev->drv[di]->rcvcount[ch] -= count_put;
-	}
-	return count;
-}
-
 static __inline int
 isdn_minor2drv(int minor)
 {
-	return slot[minor].di;
+	return slots[minor].di;
 }
 
 static __inline int
 isdn_minor2chan(int minor)
 {
-	return slot[minor].ch;
+	return slots[minor].ch;
 }
 
 static char *
@@ -847,32 +1228,32 @@
 	sprintf(istatbuf, "idmap:\t");
 	p = istatbuf + strlen(istatbuf);
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		sprintf(p, "%s ", (slot[i].di < 0) ? "-" : dev->drvid[slot[i].di]);
+		sprintf(p, "%s ", (slots[i].di < 0) ? "-" : isdn_drv_drvid(slots[i].di));
 		p = istatbuf + strlen(istatbuf);
 	}
 	sprintf(p, "\nchmap:\t");
 	p = istatbuf + strlen(istatbuf);
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		sprintf(p, "%d ", slot[i].ch);
+		sprintf(p, "%d ", slots[i].ch);
 		p = istatbuf + strlen(istatbuf);
 	}
 	sprintf(p, "\ndrmap:\t");
 	p = istatbuf + strlen(istatbuf);
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		sprintf(p, "%d ", slot[i].di);
+		sprintf(p, "%d ", slots[i].di);
 		p = istatbuf + strlen(istatbuf);
 	}
 	sprintf(p, "\nusage:\t");
 	p = istatbuf + strlen(istatbuf);
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		sprintf(p, "%d ", slot[i].usage);
+		sprintf(p, "%d ", slots[i].usage);
 		p = istatbuf + strlen(istatbuf);
 	}
 	sprintf(p, "\nflags:\t");
 	p = istatbuf + strlen(istatbuf);
 	for (i = 0; i < ISDN_MAX_DRIVERS; i++) {
-		if (dev->drv[i]) {
-			sprintf(p, "%ld ", dev->drv[i]->online);
+		if (drivers[i]) {
+			sprintf(p, "0 ");
 			p = istatbuf + strlen(istatbuf);
 		} else {
 			sprintf(p, "? ");
@@ -882,7 +1263,7 @@
 	sprintf(p, "\nphone:\t");
 	p = istatbuf + strlen(istatbuf);
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		sprintf(p, "%s ", isdn_slot_num(i));
+		sprintf(p, "%s ", slots[i].num);
 		p = istatbuf + strlen(istatbuf);
 	}
 	sprintf(p, "\n");
@@ -1026,8 +1407,8 @@
 					       sizeof(ulong) * ISDN_MAX_CHANNELS * 2)))
 				return ret;
 			for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-				put_user(slot[i].ibytes, p++);
-				put_user(slot[i].obytes, p++);
+				put_user(slots[i].ibytes, p++);
+				put_user(slots[i].obytes, p++);
 			}
 			return 0;
 		} else
@@ -1057,132 +1438,128 @@
  */
 
 static int
-isdn_ctrl_open(struct inode *ino, struct file *filep)
+isdn_ctrl_open(struct inode *ino, struct file *file)
 {
-	uint minor = minor(ino->i_rdev);
-	int drvidx;
+	unsigned int minor = minor(ino->i_rdev);
+	int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
+	struct isdn_driver *drv;
 
-	drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
-	if (drvidx < 0)
+	drv = get_drv_by_nr(drvidx);
+	if (!drv)
 		return -ENODEV;
 
-	isdn_lock_drivers();
+	isdn_lock_driver(drv);
+
+	file->private_data = drv;
 	return 0;
 }
 
 static int
-isdn_ctrl_release(struct inode *ino, struct file *filep)
+isdn_ctrl_release(struct inode *ino, struct file *file)
 {
-	lock_kernel();
+	struct isdn_driver *drv = file->private_data;
 
 	if (dev->profd == current)
 		dev->profd = NULL;
 
-	isdn_unlock_drivers();
+	isdn_unlock_driver(drv);
+	put_drv(drv);
 
-	unlock_kernel();
 	return 0;
 }
 
 static ssize_t
 isdn_ctrl_read(struct file *file, char *buf, size_t count, loff_t * off)
 {
-	uint minor = minor(file->f_dentry->d_inode->i_rdev);
-	ulong flags;
+	struct isdn_driver *drv = file->private_data;
+	unsigned int minor = minor(file->f_dentry->d_inode->i_rdev);
+	DECLARE_WAITQUEUE(wait, current);
+	unsigned long flags;
 	int len = 0;
-	int drvidx;
-	int retval;
+
 
 	if (off != &file->f_pos)
 		return -ESPIPE;
 
-	lock_kernel();
-
-	drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
-	if (drvidx < 0) {
-		retval = -ENODEV;
-		goto out;
+	if (!drv->interface->readstat) {
+		isdn_BUG();
+		return 0;
 	}
-	if (!dev->drv[drvidx]->stavail) {
+ 	add_wait_queue(&drv->st_waitq, &wait);
+	for (;;) {
+		spin_lock_irqsave(&stat_lock, flags);
+		len = drv->stavail;
+		spin_unlock_irqrestore(&stat_lock, flags);
+		if (len > 0)
+			break;
+		if (signal_pending(current)) {
+			len = -ERESTARTSYS;
+			break;
+		}
 		if (file->f_flags & O_NONBLOCK) {
-			retval = -EAGAIN;
-			goto out;
+			len = -EAGAIN;
+			break;
 		}
-		interruptible_sleep_on(&(dev->drv[drvidx]->st_waitq));
+		schedule();
 	}
-	if (dev->drv[drvidx]->interface->readstat) {
-		if (count > dev->drv[drvidx]->stavail)
-			count = dev->drv[drvidx]->stavail;
-		len = dev->drv[drvidx]->interface->
-			readstat(buf, count, 1, drvidx,
-				 isdn_minor2chan(minor));
+	__set_current_state(TASK_RUNNING);
+	remove_wait_queue(&drv->st_waitq, &wait);
+	
+	if (len < 0)
+		return len;
+	
+	if (count > len)
+		count = len;
+		
+	len = drv->interface->readstat(buf, count, 1, drv->di,
+				       isdn_minor2chan(minor));
+
+	spin_lock_irqsave(&stat_lock, flags);
+	if (len) {
+		drv->stavail -= len;
 	} else {
-		len = 0;
+		isdn_BUG();
+		drv->stavail = 0;
 	}
-	save_flags(flags);
-	cli();
-	if (len)
-		dev->drv[drvidx]->stavail -= len;
-	else
-		dev->drv[drvidx]->stavail = 0;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&stat_lock, flags);
+
 	*off += len;
-	retval = len;
-	
- out:
-	unlock_kernel();
-	return retval;
+	return len;
 }
 
 static ssize_t
 isdn_ctrl_write(struct file *file, const char *buf, size_t count, loff_t *off)
 {
-	uint minor = minor(file->f_dentry->d_inode->i_rdev);
-	int drvidx;
+	struct isdn_driver *drv = file->private_data;
+	unsigned int minor = minor(file->f_dentry->d_inode->i_rdev);
 	int retval;
 
 	if (off != &file->f_pos)
 		return -ESPIPE;
 
-	lock_kernel();
-
-	drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
-	if (drvidx < 0) {
-		retval = -ENODEV;
-		goto out;
-	}
-	if (!dev->drv[drvidx]->interface->writecmd) {
+	if (!drv->interface->writecmd) {
 		retval = -EINVAL;
 		goto out;
 	}
-	retval = dev->drv[drvidx]->interface->
-		writecmd(buf, count, 1, drvidx, isdn_minor2chan(minor - ISDN_MINOR_CTRL));
+	retval = drv->interface->
+		writecmd(buf, count, 1, drv->di, 
+			 isdn_minor2chan(minor - ISDN_MINOR_CTRL));
 
  out:
-	unlock_kernel();
 	return retval;
 }
 
 static unsigned int
 isdn_ctrl_poll(struct file *file, poll_table *wait)
 {
+	struct isdn_driver *drv = file->private_data;
 	unsigned int mask = 0;
-	unsigned int minor = minor(file->f_dentry->d_inode->i_rdev);
-	int drvidx;
-
-	drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL);
-	if (drvidx < 0)
-		/* driver deregistered while file open */
-		return POLLHUP;
-
-	lock_kernel();
 
-	poll_wait(file, &(dev->drv[drvidx]->st_waitq), wait);
+	poll_wait(file, &drv->st_waitq, wait);
 	mask = POLLOUT | POLLWRNORM;
-	if (dev->drv[drvidx]->stavail)
+	if (drv->stavail)
 		mask |= POLLIN | POLLRDNORM;
 
-	unlock_kernel();
 	return mask;
 }
 
@@ -1240,7 +1617,6 @@
 	case IIOCSETBRJ:
 		drvidx = -1;
 		if (arg) {
-			int i;
 			char *p;
 			if (copy_from_user((char *) &iocts, (char *) arg,
 					   sizeof(isdn_ioctl_struct)))
@@ -1248,20 +1624,15 @@
 			if (strlen(iocts.drvid)) {
 				if ((p = strchr(iocts.drvid, ',')))
 					*p = 0;
-				drvidx = -1;
-				for (i = 0; i < ISDN_MAX_DRIVERS; i++)
-					if (!(strcmp(dev->drvid[i], iocts.drvid))) {
-						drvidx = i;
-						break;
-					}
+				drvidx = isdn_drv_lookup(iocts.drvid);
 			}
 		}
 		if (drvidx == -1)
 			return -ENODEV;
 		if (iocts.arg)
-			dev->drv[drvidx]->flags |= DRV_FLAG_REJBUS;
+			drivers[drvidx]->flags |= DRV_FLAG_REJBUS;
 		else
-			dev->drv[drvidx]->flags &= ~DRV_FLAG_REJBUS;
+			drivers[drvidx]->flags &= ~DRV_FLAG_REJBUS;
 		return 0;
 	case IIOCSIGPRF:
 		dev->profd = current;
@@ -1279,14 +1650,14 @@
 				return ret;
 
 			for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-				if (copy_to_user(p, dev->mdm.info[i].emu.profile,
+				if (copy_to_user(p, isdn_mdm.info[i].emu.profile,
 						 ISDN_MODEM_NUMREG))
 					return -EFAULT;
 				p += ISDN_MODEM_NUMREG;
-				if (copy_to_user(p, dev->mdm.info[i].emu.pmsn, ISDN_MSNLEN))
+				if (copy_to_user(p, isdn_mdm.info[i].emu.pmsn, ISDN_MSNLEN))
 					return -EFAULT;
 				p += ISDN_MSNLEN;
-				if (copy_to_user(p, dev->mdm.info[i].emu.plmsn, ISDN_LMSNLEN))
+				if (copy_to_user(p, isdn_mdm.info[i].emu.plmsn, ISDN_LMSNLEN))
 					return -EFAULT;
 				p += ISDN_LMSNLEN;
 			}
@@ -1306,14 +1677,14 @@
 				return ret;
 
 			for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-				if (copy_from_user(dev->mdm.info[i].emu.profile, p,
+				if (copy_from_user(isdn_mdm.info[i].emu.profile, p,
 						   ISDN_MODEM_NUMREG))
 					return -EFAULT;
 				p += ISDN_MODEM_NUMREG;
-				if (copy_from_user(dev->mdm.info[i].emu.plmsn, p, ISDN_LMSNLEN))
+				if (copy_from_user(isdn_mdm.info[i].emu.plmsn, p, ISDN_LMSNLEN))
 					return -EFAULT;
 				p += ISDN_LMSNLEN;
-				if (copy_from_user(dev->mdm.info[i].emu.pmsn, p, ISDN_MSNLEN))
+				if (copy_from_user(isdn_mdm.info[i].emu.pmsn, p, ISDN_MSNLEN))
 					return -EFAULT;
 				p += ISDN_MSNLEN;
 			}
@@ -1330,15 +1701,7 @@
 					   (char *) arg,
 					   sizeof(isdn_ioctl_struct)))
 				return -EFAULT;
-			if (strlen(iocts.drvid)) {
-				drvidx = -1;
-				for (i = 0; i < ISDN_MAX_DRIVERS; i++)
-					if (!(strcmp(dev->drvid[i], iocts.drvid))) {
-						drvidx = i;
-						break;
-					}
-			} else
-				drvidx = 0;
+			drvidx = isdn_drv_lookup(iocts.drvid);
 			if (drvidx == -1)
 				return -ENODEV;
 			if (cmd == IIOCSETMAP) {
@@ -1359,7 +1722,7 @@
 							/* Fall through */
 						case ',':
 							bname[j] = '\0';
-							strcpy(dev->drv[drvidx]->msn2eaz[i], bname);
+							strcpy(drivers[drvidx]->msn2eaz[i], bname);
 							j = ISDN_MSNLEN;
 							break;
 						default:
@@ -1375,8 +1738,8 @@
 				p = (char *) iocts.arg;
 				for (i = 0; i < 10; i++) {
 					sprintf(bname, "%s%s",
-						strlen(dev->drv[drvidx]->msn2eaz[i]) ?
-						dev->drv[drvidx]->msn2eaz[i] : "_",
+						strlen(drivers[drvidx]->msn2eaz[i]) ?
+						drivers[drvidx]->msn2eaz[i] : "_",
 						(i < 9) ? "," : "\0");
 					if (copy_to_user(p, bname, strlen(bname) + 1))
 						return -EFAULT;
@@ -1400,21 +1763,9 @@
 		else
 			return -EINVAL;
 		if (arg) {
-			int i;
-			char *p;
 			if (copy_from_user((char *) &iocts, (char *) arg, sizeof(isdn_ioctl_struct)))
 				return -EFAULT;
-			if (strlen(iocts.drvid)) {
-				if ((p = strchr(iocts.drvid, ',')))
-					*p = 0;
-				drvidx = -1;
-				for (i = 0; i < ISDN_MAX_DRIVERS; i++)
-					if (!(strcmp(dev->drvid[i], iocts.drvid))) {
-						drvidx = i;
-						break;
-					}
-			} else
-				drvidx = 0;
+			drvidx = isdn_drv_lookup(iocts.drvid);
 			if (drvidx == -1)
 				return -ENODEV;
 			if ((ret = verify_area(VERIFY_WRITE, (void *) arg,
@@ -1424,7 +1775,7 @@
 			c.command = ISDN_CMD_IOCTL;
 			c.arg = cmd;
 			memcpy(c.parm.num, (char *) &iocts.arg, sizeof(ulong));
-			ret = isdn_command(&c);
+			ret = __drv_command(drivers[drvidx], &c);
 			memcpy((char *) &iocts.arg, c.parm.num, sizeof(ulong));
 			if (copy_to_user((char *) arg, &iocts, sizeof(isdn_ioctl_struct)))
 				return -EFAULT;
@@ -1498,7 +1849,7 @@
 char *
 isdn_map_eaz2msn(char *msn, int di)
 {
-	driver *this = dev->drv[di];
+	struct isdn_driver *this = drivers[di];
 	int i;
 
 	if (strlen(msn) == 1) {
@@ -1514,167 +1865,78 @@
  * Find an unused ISDN-channel, whose feature-flags match the
  * given L2- and L3-protocols.
  */
-#define L2V (~(ISDN_FEATURE_L2_V11096|ISDN_FEATURE_L2_V11019|ISDN_FEATURE_L2_V11038))
-
-int
+struct isdn_slot *
 isdn_get_free_slot(int usage, int l2_proto, int l3_proto,
 		   int pre_dev, int pre_chan, char *msn)
 {
+	struct isdn_slot *slot;
 	int i;
-	ulong flags;
-	ulong features;
-	ulong vfeatures;
+	unsigned long flags;
+	unsigned long features;
 
 	save_flags(flags);
 	cli();
 	features = ((1 << l2_proto) | (0x10000 << l3_proto));
-	vfeatures = (((1 << l2_proto) | (0x10000 << l3_proto)) &
-		     ~(ISDN_FEATURE_L2_V11096|ISDN_FEATURE_L2_V11019|ISDN_FEATURE_L2_V11038));
-	/* If Layer-2 protocol is V.110, accept drivers with
-	 * transparent feature even if these don't support V.110
-	 * because we can emulate this in linklevel.
-	 */
-	for (i = 0; i < ISDN_MAX_CHANNELS; i++)
-		if (USG_NONE(slot[i].usage) &&
-		    (slot[i].di != -1)) {
-			int d = slot[i].di;
-			if (!strcmp(isdn_map_eaz2msn(msn, d), "-"))
-				continue;
-			if (slot[i].usage & ISDN_USAGE_DISABLED)
-			        continue; /* usage not allowed */
-			if (!dev->drv[d]->flags & DRV_FLAG_RUNNING)
-				continue;
-			if (((dev->drv[d]->interface->features & features) == features) ||
-			    (((dev->drv[d]->interface->features & vfeatures) == vfeatures) &&
-			     (dev->drv[d]->interface->features & ISDN_FEATURE_L2_TRANS))) {
-				if (pre_dev < 0 || pre_chan < 0 ||
-				    (pre_dev == d && pre_chan == slot[i].ch)) {
-					isdn_slot_set_usage(i, usage);
-					restore_flags(flags);
-					return i;
-				}
-			}
+
+	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
+		slot = &slots[i];
+
+		if (!slot->drv || slot->drv->fi.state != ST_DRV_RUNNING)
+			continue;
+		
+		if (!USG_NONE(slots[i].usage))
+			continue;
+		
+		if (slots[i].usage & ISDN_USAGE_DISABLED)
+			continue;
+
+		if (slots[i].di == -1)
+			continue;
+
+		if (strcmp(isdn_map_eaz2msn(msn, slot->di), "-") == 0)
+			continue;
+
+		if (!(drivers[slot->di]->features & features) == features)
+			continue;
+
+		if (pre_dev < 0 || pre_chan < 0 ||
+		    (pre_dev == slot->di && pre_chan == slot->ch)) {
+			slot->usage = usage;
+			isdn_info_update();
+			fsm_event(&slot->fi, EV_SLOT_BIND, NULL);
+			return slot;
 		}
+	}
 	restore_flags(flags);
-	return -1;
+	return NULL;
 }
 
 /*
  * Set state of ISDN-channel to 'unused'
  */
 void
-isdn_free_channel(int di, int ch, int usage)
+isdn_slot_free(struct isdn_slot *slot)
 {
-	int sl;
-
-	sl = isdn_dc2minor(di, ch);
-	isdn_slot_free(sl);
-}
-
-void
-isdn_slot_free(int sl)
-{
-	unsigned long flags;
-
-	save_flags(flags);
-	cli();
-	strcpy(isdn_slot_num(sl), "???");
-	slot[sl].ibytes = 0;
-	slot[sl].obytes = 0;
-// 20.10.99 JIM, try to reinitialize v110 !
-	slot[sl].iv110.v110emu = 0;
-	atomic_set(&slot[sl].iv110.v110use, 0);
-	isdn_v110_close(slot[sl].iv110.v110);
-	slot[sl].iv110.v110 = NULL;
-// 20.10.99 JIM, try to reinitialize v110 !
-	isdn_slot_set_usage(sl, ISDN_USAGE_NONE);
-	skb_queue_purge(&dev->drv[isdn_slot_driver(sl)]->rpqueue[isdn_slot_channel(sl)]);
-	restore_flags(flags);
+	fsm_event(&slot->fi, EV_SLOT_UNBIND, NULL);
 }
 
 /*
  * Return: length of data on success, -ERRcode on failure.
  */
 int
-isdn_slot_write(int sl, struct sk_buff *skb)
+isdn_slot_write(struct isdn_slot *slot, struct sk_buff *skb)
 {
-	int ret;
-	struct sk_buff *nskb = NULL;
-	int v110_ret = skb->len;
-	int di = isdn_slot_driver(sl);
-	int ch = isdn_slot_channel(sl);
-
-	BUG_ON(sl < 0);
-
-	if (slot[sl].iv110.v110) {
-		atomic_inc(&slot[sl].iv110.v110use);
-		nskb = isdn_v110_encode(slot[sl].iv110.v110, skb);
-		atomic_dec(&slot[sl].iv110.v110use);
-		if (!nskb)
-			return 0;
-		v110_ret = *((int *)nskb->data);
-		skb_pull(nskb, sizeof(int));
-		if (!nskb->len) {
-			dev_kfree_skb(nskb);
-			return v110_ret;
-		}
-		/* V.110 must always be acknowledged */
-		ret = dev->drv[di]->interface->writebuf_skb(di, ch, 1, nskb);
-	} else {
-		int hl = isdn_slot_hdrlen(sl);
-
-		if( skb_headroom(skb) < hl ){
-			/* 
-			 * This should only occur when new HL driver with
-			 * increased hl_hdrlen was loaded after netdevice
-			 * was created and connected to the new driver.
-			 *
-			 * The V.110 branch (re-allocates on its own) does
-			 * not need this
-			 */
-			struct sk_buff * skb_tmp;
-
-			skb_tmp = skb_realloc_headroom(skb, hl);
-			printk(KERN_DEBUG "isdn_writebuf_skb_stub: reallocating headroom%s\n", skb_tmp ? "" : " failed");
-			if (!skb_tmp) return -ENOMEM; /* 0 better? */
-			ret = dev->drv[di]->interface->writebuf_skb(di, ch, 1, skb_tmp);
-			if( ret > 0 ){
-				dev_kfree_skb(skb);
-			} else {
-				dev_kfree_skb(skb_tmp);
-			}
-		} else {
-			ret = dev->drv[di]->interface->writebuf_skb(di, ch, 1, skb);
-		}
-	}
-	if (ret > 0) {
-		slot[sl].obytes += ret;
-		if (slot[sl].iv110.v110) {
-			atomic_inc(&slot[sl].iv110.v110use);
-			slot[sl].iv110.v110->skbuser++;
-			atomic_dec(&slot[sl].iv110.v110use);
-			/* For V.110 return unencoded data length */
-			ret = v110_ret;
-			/* if the complete frame was send we free the skb;
-			   if not upper function will requeue the skb */ 
-			if (ret == skb->len)
-				dev_kfree_skb(skb);
-		}
-	} else
-		if (slot[sl].iv110.v110)
-			dev_kfree_skb(nskb);
-	return ret;
+	return fsm_event(&slot->fi, EV_DATA_REQ, skb);
 }
 
-int
-isdn_add_channels(driver *d, int drvidx, int n, int adding)
+static int
+isdn_add_channels(struct isdn_driver *d, int drvidx, int n, int adding)
 {
 	int j, k, m;
 	ulong flags;
 
 	init_waitqueue_head(&d->st_waitq);
-	if (d->flags & DRV_FLAG_RUNNING)
-		return -1;
+
        	if (n < 1) return 0;
 
 	m = (adding) ? d->channels + n : n;
@@ -1684,70 +1946,20 @@
 		       ISDN_MAX_CHANNELS);
 		return -1;
 	}
-
-	if ((adding) && (d->rcverr))
-		kfree(d->rcverr);
-	if (!(d->rcverr = kmalloc(sizeof(int) * m, GFP_KERNEL))) {
-		printk(KERN_WARNING "register_isdn: Could not alloc rcverr\n");
-		return -1;
-	}
-	memset((char *) d->rcverr, 0, sizeof(int) * m);
-
-	if ((adding) && (d->rcvcount))
-		kfree(d->rcvcount);
-	if (!(d->rcvcount = kmalloc(sizeof(int) * m, GFP_KERNEL))) {
-		printk(KERN_WARNING "register_isdn: Could not alloc rcvcount\n");
-		if (!adding) kfree(d->rcverr);
-		return -1;
-	}
-	memset((char *) d->rcvcount, 0, sizeof(int) * m);
-
-	if ((adding) && (d->rpqueue)) {
-		for (j = 0; j < d->channels; j++)
-			skb_queue_purge(&d->rpqueue[j]);
-		kfree(d->rpqueue);
-	}
-	if (!(d->rpqueue = kmalloc(sizeof(struct sk_buff_head) * m, GFP_KERNEL))) {
-		printk(KERN_WARNING "register_isdn: Could not alloc rpqueue\n");
-		if (!adding) {
-			kfree(d->rcvcount);
-			kfree(d->rcverr);
-		}
-		return -1; 
-	}
-	for (j = 0; j < m; j++) {
-		skb_queue_head_init(&d->rpqueue[j]);
-	}
-
-	if ((adding) && (d->rcv_waitq))
-		kfree(d->rcv_waitq);
-	d->rcv_waitq = kmalloc(sizeof(wait_queue_head_t) * 2 * m, GFP_KERNEL);
-	if (!d->rcv_waitq) {
-		printk(KERN_WARNING "register_isdn: Could not alloc rcv_waitq\n");
-		if (!adding) {
-			kfree(d->rpqueue);
-			kfree(d->rcvcount);
-			kfree(d->rcverr);
-		}
-		return -1;
-	}
-	d->snd_waitq = d->rcv_waitq + m;
-	for (j = 0; j < m; j++) {
-		init_waitqueue_head(&d->rcv_waitq[j]);
-		init_waitqueue_head(&d->snd_waitq[j]);
-	}
-
 	dev->channels += n;
 	save_flags(flags);
 	cli();
-	for (j = d->channels; j < m; j++)
-		for (k = 0; k < ISDN_MAX_CHANNELS; k++)
-			if (slot[k].ch < 0) {
-				slot[k].ch = j;
-				slot[k].di = drvidx;
+	for (j = d->channels; j < m; j++) {
+		for (k = 0; k < ISDN_MAX_CHANNELS; k++) {
+			if (slots[k].ch < 0) {
+				slots[k].ch = j;
+				slots[k].di = drvidx;
+				slots[k].drv = d;
 				isdn_register_devfs(k);
 				break;
 			}
+		}
+	}
 	restore_flags(flags);
 	d->channels = m;
 	return 0;
@@ -1757,20 +1969,6 @@
  * Low-level-driver registration
  */
 
-static void
-set_global_features(void)
-{
-	int drvidx;
-
-	dev->global_features = 0;
-	for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) {
-		if (!dev->drv[drvidx])
-			continue;
-		if (dev->drv[drvidx]->interface)
-			dev->global_features |= dev->drv[drvidx]->interface->features;
-	}
-}
-
 #if defined(CONFIG_ISDN_DIVERSION) || defined(CONFIG_ISDN_DIVERSION_MODULE)
 
 static char *map_drvname(int di)
@@ -1830,105 +2028,34 @@
 #endif
 
 int
-register_isdn(isdn_if * i)
+isdn_slot_maxbufsize(struct isdn_slot *slot)
 {
-	driver *d;
-	int j;
-	ulong flags;
-	int drvidx;
-
-	if (dev->drivers >= ISDN_MAX_DRIVERS) {
-		printk(KERN_WARNING "register_isdn: Max. %d drivers supported\n",
-		       ISDN_MAX_DRIVERS);
-		return 0;
-	}
-	if (!i->writebuf_skb) {
-		printk(KERN_WARNING "register_isdn: No write routine given.\n");
-		return 0;
-	}
-	if (!(d = kmalloc(sizeof(driver), GFP_KERNEL))) {
-		printk(KERN_WARNING "register_isdn: Could not alloc driver-struct\n");
-		return 0;
-	}
-	memset((char *) d, 0, sizeof(driver));
-
-	d->maxbufsize = i->maxbufsize;
-	d->pktcount = 0;
-	d->stavail = 0;
-	d->flags = DRV_FLAG_LOADED;
-	d->online = 0;
-	d->interface = i;
-	d->channels = 0;
-	for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++)
-		if (!dev->drv[drvidx])
-			break;
-	if (isdn_add_channels(d, drvidx, i->channels, 0)) {
-		kfree(d);
-		return 0;
-	}
-	i->channels = drvidx;
-	i->rcvcallb_skb = isdn_receive_skb_callback;
-	i->statcallb = isdn_status_callback;
-	if (!strlen(i->id))
-		sprintf(i->id, "line%d", drvidx);
-	save_flags(flags);
-	cli();
-	for (j = 0; j < drvidx; j++)
-		if (!strcmp(i->id, dev->drvid[j]))
-			sprintf(i->id, "line%d", drvidx);
-	dev->drv[drvidx] = d;
-	strcpy(dev->drvid[drvidx], i->id);
-	isdn_info_update();
-	dev->drivers++;
-	set_global_features();
-	restore_flags(flags);
-	return 1;
+	return slot->drv->maxbufsize;
 }
 
 int
-isdn_slot_driver(int sl)
+isdn_slot_hdrlen(struct isdn_slot *slot)
 {
-	BUG_ON(sl < 0);
-
-	return slot[sl].di;
-}
-
-int
-isdn_slot_channel(int sl)
-{
-	BUG_ON(sl < 0);
-
-	return slot[sl].ch;
-}
-
-int
-isdn_slot_hdrlen(int sl)
-{
-	int di = isdn_slot_driver(sl);
-	
-	return dev->drv[di]->interface->hl_hdrlen;
+	return slot->drv->interface->hl_hdrlen;
 }
 
 char *
-isdn_slot_map_eaz2msn(int sl, char *msn)
+isdn_slot_map_eaz2msn(struct isdn_slot *slot, char *msn)
 {
-	int di = isdn_slot_driver(sl);
-
-	return isdn_map_eaz2msn(msn, di);
+	return isdn_map_eaz2msn(msn, slot->di);
 }
 
 int
-isdn_slot_command(int sl, int cmd, isdn_ctrl *ctrl)
+isdn_slot_command(struct isdn_slot *slot, int cmd, isdn_ctrl *ctrl)
 {
-
 	ctrl->command = cmd;
-	ctrl->driver = isdn_slot_driver(sl);
+	ctrl->driver = slot->di;
 
 	switch (cmd) {
 	case ISDN_CMD_SETL2:
 	case ISDN_CMD_SETL3:
 	case ISDN_CMD_PROT_IO:
-		ctrl->arg &= ~0xff; ctrl->arg |= isdn_slot_channel(sl);
+		ctrl->arg &= ~0xff; ctrl->arg |= slot->ch;
 		break;
 	case ISDN_CMD_DIAL:
 		if (dev->global_flags & ISDN_GLOBAL_STOPPED)
@@ -1936,19 +2063,37 @@
 
 		/* fall through */
 	default:
-		ctrl->arg = isdn_slot_channel(sl);
+		ctrl->arg = slot->ch;
 		break;
 	}
-
-	return isdn_command(ctrl);
+	switch (cmd) {
+	case ISDN_CMD_CLREAZ:
+		return fsm_event(&slot->fi, EV_CMD_CLREAZ, ctrl);
+	case ISDN_CMD_SETEAZ:
+		return fsm_event(&slot->fi, EV_CMD_SETEAZ, ctrl);
+	case ISDN_CMD_SETL2:
+		return fsm_event(&slot->fi, EV_CMD_SETL2, ctrl);
+	case ISDN_CMD_SETL3:
+		return fsm_event(&slot->fi, EV_CMD_SETL3, ctrl);
+	case ISDN_CMD_DIAL:
+		return fsm_event(&slot->fi, EV_CMD_DIAL, ctrl);
+	case ISDN_CMD_ACCEPTD:
+		return fsm_event(&slot->fi, EV_CMD_ACCEPTD, ctrl);
+	case ISDN_CMD_ACCEPTB:
+		return fsm_event(&slot->fi, EV_CMD_ACCEPTB, ctrl);
+	case ISDN_CMD_HANGUP:
+		return fsm_event(&slot->fi, EV_CMD_HANGUP, ctrl);
+	}
+	HERE;
+	return -1;
 }
 
 int
-isdn_slot_dial(int sl, struct dial_info *dial)
+isdn_slot_dial(struct isdn_slot *slot, struct dial_info *dial)
 {
 	isdn_ctrl cmd;
 	int retval;
-	char *msn = isdn_slot_map_eaz2msn(sl, dial->msn);
+	char *msn = isdn_slot_map_eaz2msn(slot, dial->msn);
 
 	/* check for DOV */
 	if (dial->si1 == 7 && tolower(dial->phone[0]) == 'v') { /* DOV call */
@@ -1956,24 +2101,25 @@
 		dial->phone++; /* skip v/V */
 	}
 
-	strcpy(isdn_slot_num(sl), dial->phone);
-	isdn_slot_set_usage(sl, isdn_slot_usage(sl) | ISDN_USAGE_OUTGOING);
+	strcpy(slot->num, dial->phone);
+	slot->usage |= ISDN_USAGE_OUTGOING;
+	isdn_info_update();
 
-	retval = isdn_slot_command(sl, ISDN_CMD_CLREAZ, &cmd);
+	retval = isdn_slot_command(slot, ISDN_CMD_CLREAZ, &cmd);
 	if (retval)
 		return retval;
 
 	strcpy(cmd.parm.num, msn);
-	retval = isdn_slot_command(sl, ISDN_CMD_SETEAZ, &cmd);
+	retval = isdn_slot_command(slot, ISDN_CMD_SETEAZ, &cmd);
 
 	cmd.arg = dial->l2_proto << 8;
 	cmd.parm.fax = dial->fax;
-	retval = isdn_slot_command(sl, ISDN_CMD_SETL2, &cmd);
+	retval = isdn_slot_command(slot, ISDN_CMD_SETL2, &cmd);
 	if (retval)
 		return retval;
 
 	cmd.arg = dial->l3_proto << 8;
-	retval = isdn_slot_command(sl, ISDN_CMD_SETL3, &cmd);
+	retval = isdn_slot_command(slot, ISDN_CMD_SETL3, &cmd);
 	if (retval)
 		return retval;
 
@@ -1982,78 +2128,12 @@
 	strcpy(cmd.parm.setup.eazmsn, msn);
 	strcpy(cmd.parm.setup.phone, dial->phone);
 
-	printk(KERN_INFO "ISDN: slot %d: Dialing %s -> %s (SI %d/%d) (B %d/%d)\n",
-	       sl, cmd.parm.setup.eazmsn, cmd.parm.setup.phone,
+	printk(KERN_INFO "ISDN: Dialing %s -> %s (SI %d/%d) (B %d/%d)\n",
+	       cmd.parm.setup.eazmsn, cmd.parm.setup.phone,
 	       cmd.parm.setup.si1, cmd.parm.setup.si2,
 	       dial->l2_proto, dial->l3_proto);
 
-	return isdn_slot_command(sl, ISDN_CMD_DIAL, &cmd);
-}
-
-void
-isdn_slot_all_eaz(int sl)
-{
-	isdn_ctrl cmd;
-
-	cmd.parm.num[0] = '\0';
-	isdn_slot_command(sl, ISDN_CMD_SETEAZ, &cmd);
-}
-
-int
-isdn_slot_usage(int sl)
-{
-	BUG_ON(sl < 0);
-
-	return slot[sl].usage;
-}
-
-void
-isdn_slot_set_usage(int sl, int usage)
-{
-	BUG_ON(sl < 0);
-
-	slot[sl].usage = usage;
-	isdn_info_update();
-}
-
-int
-isdn_slot_m_idx(int sl)
-{
-	BUG_ON(sl < 0);
-
-	return slot[sl].m_idx;
-}
-
-void
-isdn_slot_set_m_idx(int sl, int midx)
-{
-	BUG_ON(sl < 0);
-
-	slot[sl].m_idx = midx;
-}
-
-char *
-isdn_slot_num(int sl)
-{
-	BUG_ON(sl < 0);
-
-	return slot[sl].num;
-}
-
-void
-isdn_slot_set_idev(int sl, isdn_net_dev *idev)
-{
-	BUG_ON(sl < 0);
-
-	slot[sl].idev = idev;
-}
-
-isdn_net_dev *
-isdn_slot_idev(int sl)
-{
-	BUG_ON(sl < 0);
-
-	return slot[sl].idev;
+	return isdn_slot_command(slot, ISDN_CMD_DIAL, &cmd);
 }
 
 int
@@ -2063,9 +2143,9 @@
 	int max = 0;
 	
 	for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) {
-		if (dev->drv[drvidx] && 
-		    max < dev->drv[drvidx]->interface->hl_hdrlen) {
-			max = dev->drv[drvidx]->interface->hl_hdrlen;
+		if (drivers[drvidx] && 
+		    max < drivers[drvidx]->interface->hl_hdrlen) {
+			max = drivers[drvidx]->interface->hl_hdrlen;
 		}
 	}
 	return max;
@@ -2077,21 +2157,6 @@
  *****************************************************************************
  */
 
-static char *
-isdn_getrev(const char *revision)
-{
-	char *rev;
-	char *p;
-
-	if ((p = strchr(revision, ':'))) {
-		rev = p + 2;
-		p = strchr(rev, '$');
-		*--p = 0;
-	} else
-		rev = "???";
-	return rev;
-}
-
 #ifdef CONFIG_DEVFS_FS
 
 static devfs_handle_t devfs_handle;
@@ -2179,25 +2244,32 @@
 {
 	int i;
 	int retval;
-	char tmprev[50];
+
+	retval = fsm_new(&slot_fsm);
+	if (retval)
+		goto err;
+
+	retval = fsm_new(&drv_fsm);
+	if (retval)
+		goto err_slot_fsm;
 
 	dev = vmalloc(sizeof(*dev));
 	if (!dev) {
 		retval = -ENOMEM;
-		goto err;
+		goto err_drv_fsm;
 	}
 	memset(dev, 0, sizeof(*dev));
-	init_timer(&dev->timer);
-	dev->timer.function = isdn_timer_funct;
 	init_MUTEX(&dev->sem);
 	init_waitqueue_head(&dev->info_waitq);
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		slot[i].di = -1;
-		slot[i].ch = -1;
-		slot[i].m_idx = -1;
-		strcpy(isdn_slot_num(i), "???");
-		init_waitqueue_head(&dev->mdm.info[i].open_wait);
-		init_waitqueue_head(&dev->mdm.info[i].close_wait);
+		slots[i].di = -1;
+		slots[i].ch = -1;
+		strcpy(slots[i].num, "???");
+		slots[i].fi.fsm = &slot_fsm;
+		slots[i].fi.state = ST_SLOT_NULL;
+		slots[i].fi.debug = 1;
+		slots[i].fi.userdata = slots + i;
+		slots[i].fi.printdebug = slot_debug;
 	}
 	retval = register_chrdev(ISDN_MAJOR, "isdn", &isdn_fops);
 	if (retval) {
@@ -2218,26 +2290,9 @@
 	}
 #endif                          /* CONFIG_ISDN_PPP */
 
-	strcpy(tmprev, isdn_revision);
-	printk(KERN_NOTICE "ISDN subsystem Rev: %s/", isdn_getrev(tmprev));
-	strcpy(tmprev, isdn_tty_revision);
-	printk("%s/", isdn_getrev(tmprev));
-	strcpy(tmprev, isdn_net_revision);
-	printk("%s/", isdn_getrev(tmprev));
-	strcpy(tmprev, isdn_ppp_revision);
-	printk("%s/", isdn_getrev(tmprev));
-	strcpy(tmprev, isdn_audio_revision);
-	printk("%s/", isdn_getrev(tmprev));
-	strcpy(tmprev, isdn_v110_revision);
-	printk("%s", isdn_getrev(tmprev));
-
-#ifdef MODULE
-	printk(" loaded\n");
-#else
-	printk("\n");
-#endif
+	isdn_net_lib_init();
+	printk(KERN_NOTICE "ISDN subsystem initialized\n");
 	isdn_info_update();
-	isdn_net_init();
 	return 0;
 
  err_tty_modem:
@@ -2247,6 +2302,10 @@
 	unregister_chrdev(ISDN_MAJOR, "isdn");
  err_vfree:
 	vfree(dev);
+ err_drv_fsm:
+	fsm_free(&drv_fsm);
+ err_slot_fsm:
+	fsm_free(&slot_fsm);
  err:
 	return retval;
 }
@@ -2256,25 +2315,144 @@
  */
 static void __exit isdn_exit(void)
 {
-	unsigned long flags;
-
 #ifdef CONFIG_ISDN_PPP
 	isdn_ppp_cleanup();
 #endif
-	save_flags(flags);
-	cli();
-	isdn_net_exit();
+	isdn_net_lib_exit();
 
 	isdn_tty_exit();
-	if (unregister_chrdev(ISDN_MAJOR, "isdn"))
-		BUG();
-
+	unregister_chrdev(ISDN_MAJOR, "isdn");
 	isdn_cleanup_devfs();
-	del_timer(&dev->timer);
-	restore_flags(flags);
-	/* call vfree with interrupts enabled, else it will hang */
 	vfree(dev);
+	fsm_free(&drv_fsm);
+	fsm_free(&slot_fsm);
 }
 
 module_init(isdn_init);
 module_exit(isdn_exit);
+
+static void
+isdn_v110_add_features(struct isdn_driver *drv)
+{
+	unsigned long features = drv->features >> ISDN_FEATURE_L2_SHIFT;
+
+	if (features & ISDN_FEATURE_L2_TRANS)
+		drv->features |= (ISDN_FEATURE_L2_V11096|
+				  ISDN_FEATURE_L2_V11019|
+				  ISDN_FEATURE_L2_V11038) << 
+			ISDN_FEATURE_L2_SHIFT;
+}
+
+static void
+__isdn_v110_open(struct isdn_slot *slot)
+{
+	if (!slot->iv110.v110emu)
+		return;
+
+	isdn_v110_open(slot, &slot->iv110);
+}
+
+static void
+__isdn_v110_close(struct isdn_slot *slot)
+{
+	if (!slot->iv110.v110emu)
+		return;
+
+	isdn_v110_close(slot, &slot->iv110);
+}
+
+static void
+__isdn_v110_bsent(struct isdn_slot *slot, int pr, isdn_ctrl *c)
+{
+	if (!slot->iv110.v110emu) {
+		do_event_cb(slot, pr, c);
+		return;
+	}
+	isdn_v110_bsent(slot, &slot->iv110);
+}
+
+/*
+ * Intercept command from Linklevel to Lowlevel.
+ * If layer 2 protocol is V.110 and this is not supported by current
+ * lowlevel-driver, use driver's transparent mode and handle V.110 in
+ * linklevel instead.
+ */
+static void
+isdn_v110_setl2(struct isdn_slot *slot, isdn_ctrl *cmd)
+{
+	struct isdn_driver *drv = slot->drv;
+
+	unsigned long l2prot = (cmd->arg >> 8) & 255;
+	unsigned long l2_feature = 1 << l2prot;
+	unsigned long features = drv->interface->features >> 
+		ISDN_FEATURE_L2_SHIFT;
+	
+	switch (l2prot) {
+	case ISDN_PROTO_L2_V11096:
+	case ISDN_PROTO_L2_V11019:
+	case ISDN_PROTO_L2_V11038:
+		/* If V.110 requested, but not supported by
+		 * HL-driver, set emulator-flag and change
+		 * Layer-2 to transparent
+		 */
+		if (!(features & l2_feature)) {
+			slot->iv110.v110emu = l2prot;
+			cmd->arg = (cmd->arg & 255) |
+				(ISDN_PROTO_L2_TRANS << 8);
+		} else
+			slot->iv110.v110emu = 0;
+	}
+}
+
+static int
+isdn_v110_data_ind(struct isdn_slot *slot, struct sk_buff *skb)
+{
+	if (!slot->iv110.v110emu)
+		goto recv;
+		
+	skb = isdn_v110_decode(slot->iv110.v110, skb);
+	if (!skb)
+		return 0;
+
+recv:
+	if (slot->event_cb)
+		slot->event_cb(slot, EV_DATA_IND, skb);
+	return 0;
+}
+
+static int
+isdn_v110_data_req(struct isdn_slot *slot, struct sk_buff *skb)
+{
+	int retval, v110_ret;
+	struct sk_buff *nskb = NULL;
+
+	if (!slot->iv110.v110emu)
+		return isdn_writebuf_skb(slot, skb);
+
+	atomic_inc(&slot->iv110.v110use);
+	nskb = isdn_v110_encode(slot->iv110.v110, skb);
+	atomic_dec(&slot->iv110.v110use);
+	if (!nskb)
+		return -ENOMEM;
+
+	v110_ret = *(int *)nskb->data;
+	skb_pull(nskb, sizeof(int));
+	if (!nskb->len) {
+		dev_kfree_skb(nskb);
+		return v110_ret;
+	}
+	
+	retval = isdn_writebuf_skb(slot, nskb);
+	if (retval <= 0) {
+		dev_kfree_skb(nskb);
+		return retval;
+	}
+	dev_kfree_skb(skb);
+
+	atomic_inc(&slot->iv110.v110use);
+	slot->iv110.v110->skbuser++;
+	atomic_dec(&slot->iv110.v110use);
+
+	/* For V.110 return unencoded data length */
+	return v110_ret;
+}
diff -Nru a/drivers/isdn/i4l/isdn_common.h b/drivers/isdn/i4l/isdn_common.h
--- a/drivers/isdn/i4l/isdn_common.h	Wed Oct 30 16:44:22 2002
+++ b/drivers/isdn/i4l/isdn_common.h	Wed Oct 30 16:44:22 2002
@@ -1,7 +1,4 @@
-/* $Id: isdn_common.h,v 1.21.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * header for Linux ISDN subsystem
- * common used functions and debugging-switches (linklevel).
+/* Linux ISDN subsystem, common used functions and debugging-switches
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
@@ -13,6 +10,7 @@
  */
 
 #include <linux/isdn.h>
+#include "isdn_v110.h"
 
 #undef  ISDN_DEBUG_MODEM_OPEN
 #undef  ISDN_DEBUG_MODEM_IOCTL
@@ -22,7 +20,7 @@
 #undef  ISDN_DEBUG_MODEM_DUMP
 #undef  ISDN_DEBUG_MODEM_VOICE
 #undef  ISDN_DEBUG_AT
-#define  ISDN_DEBUG_NET_DUMP
+#undef  ISDN_DEBUG_NET_DUMP
 #define  ISDN_DEBUG_NET_DIAL
 #define  ISDN_DEBUG_NET_ICALL
 #define  ISDN_DEBUG_STATCALLB
@@ -59,20 +57,30 @@
 extern void isdn_MOD_DEC_USE_COUNT(void);
 extern void isdn_lock_drivers(void);
 extern void isdn_unlock_drivers(void);
-extern void isdn_free_channel(int di, int ch, int usage);
-extern int isdn_dc2minor(int di, int ch);
 extern void isdn_info_update(void);
 extern char *isdn_map_eaz2msn(char *msn, int di);
-extern void isdn_timer_ctrl(int tf, int onoff);
 extern int isdn_getnum(char **);
 extern int isdn_msncmp( const char *,  const char *);
-extern int isdn_add_channels(driver *, int, int, int);
 #if defined(ISDN_DEBUG_NET_DUMP) || defined(ISDN_DEBUG_MODEM_DUMP)
 extern void isdn_dumppkt(char *, u_char *, int, int);
 #else
 static inline void isdn_dumppkt(char *s, u_char *d, int l, int m) { }
 #endif
 
+struct isdn_slot {
+	int               di;                  /* driver index               */
+	struct isdn_driver *drv;               /* driver                     */
+	int               ch;                  /* channel index (per driver) */
+	int               usage;               /* how is it used             */
+	char              num[ISDN_MSNLEN];    /* the current phone number   */
+	unsigned long     ibytes;              /* Statistics incoming bytes  */
+	unsigned long     obytes;              /* Statistics outgoing bytes  */
+	struct isdn_v110  iv110;               /* For V.110                  */
+	void             *priv;                /* pointer to isdn_net_dev    */
+	int             (*event_cb)(struct isdn_slot *, int pr, void *arg);
+	struct fsm_inst   fi;
+};
+
 struct dial_info {
 	int            l2_proto;
 	int            l3_proto;
@@ -83,22 +91,59 @@
 	unsigned char *phone;
 };
 
-extern int   isdn_get_free_slot(int, int, int, int, int, char *);
-extern void  isdn_slot_free(int slot);
-extern void  isdn_slot_all_eaz(int slot);
-extern int   isdn_slot_command(int slot, int cmd, isdn_ctrl *);
-extern int   isdn_slot_dial(int slot, struct dial_info *dial);
-extern char *isdn_slot_map_eaz2msn(int slot, char *msn);
-extern int   isdn_slot_write(int slot, struct sk_buff *);
-extern int   isdn_slot_readbchan(int slot, u_char *, u_char *, int);
-extern int   isdn_slot_hdrlen(int slot);
-extern int   isdn_slot_driver(int slot);
-extern int   isdn_slot_channel(int slot);
-extern int   isdn_slot_usage(int slot);
-extern void  isdn_slot_set_usage(int slot, int usage);
-extern char *isdn_slot_num(int slot);
-extern int   isdn_slot_m_idx(int slot);
-extern void  isdn_slot_set_m_idx(int slot, int midx);
-extern void  isdn_slot_set_idev(int sl, isdn_net_dev *);
-extern isdn_net_dev *isdn_slot_idev(int sl);
-extern int   isdn_hard_header_len(void);
+struct isdn_slot *isdn_get_free_slot(int, int, int, int, int, char *);
+void  isdn_slot_free(struct isdn_slot *);
+int   isdn_slot_command(struct isdn_slot *, int cmd, isdn_ctrl *);
+int   isdn_slot_dial(struct isdn_slot *, struct dial_info *dial);
+char *isdn_slot_map_eaz2msn(struct isdn_slot *, char *msn);
+int   isdn_slot_write(struct isdn_slot *, struct sk_buff *);
+int   isdn_slot_hdrlen(struct isdn_slot *);
+int   isdn_slot_maxbufsize(struct isdn_slot *);
+int   isdn_hard_header_len(void);
+
+int   isdn_drv_lookup(char *drvid);
+char *isdn_drv_drvid(int di);
+
+enum {
+	ST_SLOT_NULL,
+	ST_SLOT_BOUND,
+	ST_SLOT_IN,
+	ST_SLOT_WAIT_DCONN,
+	ST_SLOT_DCONN,
+	ST_SLOT_WAIT_BCONN,
+	ST_SLOT_ACTIVE,
+	ST_SLOT_WAIT_BHUP,
+	ST_SLOT_WAIT_DHUP,
+};
+
+enum {
+	EV_DRV_REGISTER,
+	EV_STAT_RUN,
+	EV_STAT_STOP,
+	EV_STAT_UNLOAD,
+	EV_STAT_STAVAIL,
+	EV_STAT_ADDCH,
+	EV_STAT_ICALL,
+	EV_STAT_DCONN,
+	EV_STAT_BCONN,
+	EV_STAT_BHUP,
+	EV_STAT_DHUP,
+	EV_STAT_BSENT,
+	EV_STAT_CINF,
+	EV_STAT_CAUSE,
+	EV_STAT_DISPLAY,
+	EV_STAT_FAXIND,
+	EV_STAT_AUDIO,
+	EV_CMD_CLREAZ,
+	EV_CMD_SETEAZ,
+	EV_CMD_SETL2,
+	EV_CMD_SETL3,
+	EV_CMD_DIAL,
+	EV_CMD_ACCEPTD,
+	EV_CMD_ACCEPTB,
+	EV_CMD_HANGUP,
+	EV_DATA_REQ,
+	EV_DATA_IND,
+	EV_SLOT_BIND,
+	EV_SLOT_UNBIND,
+};
diff -Nru a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c
--- a/drivers/isdn/i4l/isdn_concap.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/isdn/i4l/isdn_concap.c	Wed Oct 30 16:44:32 2002
@@ -1,16 +1,12 @@
-/* $Id: isdn_concap.c,v 1.8.6.1 2001/09/23 22:24:31 kai Exp $
- * 
- * Linux ISDN subsystem, protocol encapsulation
+/* Linux ISDN subsystem, protocol encapsulation
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 /* Stuff to support the concap_proto by isdn4linux. isdn4linux - specific
  * stuff goes here. Stuff that depends only on the concap protocol goes to
  * another -- protocol specific -- source file.
- *
  */
 
 
@@ -115,8 +111,8 @@
 isdn_x25_open(isdn_net_local *lp)
 {
 	struct net_device * dev = & lp -> netdev -> dev;
-	struct concap_proto * cprot = lp -> netdev -> cprot;
-	struct concap_proto * dops = lp -> dops;
+	struct concap_proto * cprot = lp -> netdev -> ind_priv;
+	struct concap_proto * dops = lp -> inl_priv;
 	unsigned long flags;
 
 	save_flags(flags);
@@ -130,7 +126,7 @@
 static void
 isdn_x25_close(isdn_net_local *lp)
 {
-	struct concap_proto * cprot = lp -> netdev -> cprot;
+	struct concap_proto * cprot = lp -> netdev -> ind_priv;
 
 	if( cprot && cprot -> pops ) cprot -> pops -> close( cprot );
 }
@@ -138,7 +134,7 @@
 static void
 isdn_x25_connected(isdn_net_local *lp)
 {
-	struct concap_proto *cprot = lp -> netdev -> cprot;
+	struct concap_proto *cprot = lp -> netdev -> ind_priv;
 	struct concap_proto_ops *pops = cprot ? cprot -> pops : 0;
 
 	/* try if there are generic concap receiver routines */
@@ -152,7 +148,7 @@
 static void
 isdn_x25_disconnected(isdn_net_local *lp)
 {
-	struct concap_proto *cprot = lp -> netdev -> cprot;
+	struct concap_proto *cprot = lp -> netdev -> ind_priv;
 	struct concap_proto_ops *pops = cprot ? cprot -> pops : 0;
 
 	/* try if there are generic encap protocol
@@ -177,7 +173,7 @@
    when a dl_establish request is received from the upper layer.
 */
 	isdn_net_local *lp = (isdn_net_local *) dev->priv;
-	struct concap_proto * cprot = lp -> netdev -> cprot;
+	struct concap_proto * cprot = lp -> netdev -> ind_priv;
 	int ret = cprot -> pops -> encap_and_xmit ( cprot , skb);
 
 	if (ret)
@@ -190,7 +186,7 @@
 isdn_x25_receive(isdn_net_dev *p, isdn_net_local *olp, struct sk_buff *skb)
 {
 	isdn_net_local *lp = &p->local;
-	struct concap_proto *cprot = lp -> netdev -> cprot;
+	struct concap_proto *cprot = lp -> netdev -> ind_priv;
 
 	/* try if there are generic sync_device receiver routines */
 	if(cprot) 
@@ -211,7 +207,7 @@
 	/* ... ,  prepare for configuration of new one ... */
 	switch ( lp->p_encap ){
 	case ISDN_NET_ENCAP_X25IFACE:
-		lp -> dops = &isdn_concap_reliable_dl_dops;
+		lp -> inl_priv = &isdn_concap_reliable_dl_dops;
 	}
 	/* ... and allocate new one ... */
 	p -> cprot = isdn_concap_new( cfg -> p_encap );
@@ -237,7 +233,7 @@
 	if( cprot && cprot -> pops )
 		cprot -> pops -> proto_del ( cprot );
 	p -> cprot = NULL;
-	lp -> dops = NULL;
+	lp -> inl_priv = NULL;
 	restore_flags(flags);
 }
 
diff -Nru a/drivers/isdn/i4l/isdn_concap.h b/drivers/isdn/i4l/isdn_concap.h
--- a/drivers/isdn/i4l/isdn_concap.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/i4l/isdn_concap.h	Wed Oct 30 16:44:29 2002
@@ -1,10 +1,7 @@
-/* $Id: isdn_concap.h,v 1.3.6.1 2001/09/23 22:24:31 kai Exp $
- *
- * Linux ISDN subsystem, protocol encapsulation
+/* Linux ISDN subsystem, protocol encapsulation
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 extern struct concap_device_ops isdn_concap_reliable_dl_dops;
diff -Nru a/drivers/isdn/i4l/isdn_fsm.c b/drivers/isdn/i4l/isdn_fsm.c
--- a/drivers/isdn/i4l/isdn_fsm.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/isdn/i4l/isdn_fsm.c	Wed Oct 30 16:44:34 2002
@@ -1,17 +1,14 @@
-/* $Id: fsm.c,v 1.14.6.4 2001/09/23 22:24:47 kai Exp $
- *
- * Finite state machine
+/* Linux ISDN subsystem, finite state machine
  *
  * Author       Karsten Keil
- * Copyright    by Karsten Keil      <keil@isdn4linux.de>
- *              by Kai Germaschewski <kai.germaschewski@gmx.de>
+ * Copyright              by Karsten Keil      <keil@isdn4linux.de>
+ *              2001-2002 by Kai Germaschewski <kai@germaschewski.name>
  * 
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
- *
  */
 
 #include <linux/kernel.h>
@@ -19,7 +16,7 @@
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/string.h>
-#include "isdn_fsm.h"
+#include <linux/isdn/fsm.h>
 
 int
 fsm_new(struct fsm *fsm)
diff -Nru a/drivers/isdn/i4l/isdn_fsm.h b/drivers/isdn/i4l/isdn_fsm.h
--- a/drivers/isdn/i4l/isdn_fsm.h	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,61 +0,0 @@
-/* $Id: fsm.h,v 1.3.2.2 2001/09/23 22:24:47 kai Exp $
- *
- * Finite state machine
- *
- * Author       Karsten Keil
- * Copyright    by Karsten Keil      <keil@isdn4linux.de>
- *              by Kai Germaschewski <kai.germaschewski@gmx.de>
- * 
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#ifndef __ISDN_FSM_H__
-#define __ISDN_FSM_H__
-
-#include <linux/kernel.h>
-#include <linux/timer.h>
-
-struct fsm_inst;
-
-typedef int (*fsm_fn)(struct fsm_inst *, int, void *);
-
-struct fsm {
-	fsm_fn *jumpmatrix;
-	int st_cnt, ev_cnt, fn_cnt;
-	char **st_str, **ev_str;
-	struct fsm_node *fn_tbl;
-};
-
-struct fsm_inst {
-	struct fsm *fsm;
-	int state;
-	int debug;
-	void *userdata;
-	int userint;
-	void (*printdebug) (struct fsm_inst *, char *, ...);
-};
-
-struct fsm_node {
-	int st, ev;
-	fsm_fn fn;
-};
-
-struct fsm_timer {
-	struct fsm_inst *fi;
-	struct timer_list tl;
-	int ev;
-	void *arg;
-};
-
-int  fsm_new(struct fsm *fsm);
-void fsm_free(struct fsm *fsm);
-int  fsm_event(struct fsm_inst *fi, int event, void *arg);
-void fsm_change_state(struct fsm_inst *fi, int newstate);
-void fsm_init_timer(struct fsm_inst *fi, struct fsm_timer *ft);
-int  fsm_add_timer(struct fsm_timer *ft, int timeout, int event);
-void fsm_mod_timer(struct fsm_timer *ft, int timeout, int event);
-void fsm_del_timer(struct fsm_timer *ft);
-
-#endif
diff -Nru a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
--- a/drivers/isdn/i4l/isdn_net.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/isdn/i4l/isdn_net.c	Wed Oct 30 16:44:36 2002
@@ -1,6 +1,4 @@
-/* $Id: isdn_net.c,v 1.140.6.11 2001/11/06 20:58:28 kai Exp $
- *
- * Linux ISDN subsystem, network interfaces and related functions (linklevel).
+/* Linux ISDN subsystem, network interfaces and related functions (linklevel).
  *
  * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
  *           1995,96    by Thinking Objects Software GmbH Wuerzburg
@@ -9,31 +7,14 @@
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
- * Data Over Voice (DOV) support added - Guy Ellis 23-Mar-02 
- *                                       guy@traverse.com.au
- * Outgoing calls - looks for a 'V' in first char of dialed number
- * Incoming calls - checks first character of eaz as follows:
- *   Numeric - accept DATA only - original functionality
- *   'V'     - accept VOICE (DOV) only
- *   'B'     - accept BOTH DATA and DOV types
- *
  */
 
-#include <linux/config.h>
 #include <linux/isdn.h>
-#include <net/arp.h>
-#include <net/dst.h>
-#include <net/pkt_sched.h>
 #include <linux/inetdevice.h>
+#include <net/arp.h>
 #include "isdn_common.h"
+#include "isdn_net_lib.h"
 #include "isdn_net.h"
-#include "isdn_ppp.h"
-#include <linux/concap.h>
-#include "isdn_concap.h"
-#include "isdn_ciscohdlck.h"
-
-char *isdn_net_revision = "$Revision: 1.140.6.11 $";
 
 // ISDN_NET_ENCAP_IPTYP
 // ethernet type field
@@ -52,13 +33,14 @@
 isdn_iptyp_receive(isdn_net_local *lp, isdn_net_dev *idev, 
 		   struct sk_buff *skb)
 {
-	idev->huptimer = 0;
-	get_u16(skb->data, &skb->protocol);
+	u16 protocol;
+
+	get_u16(skb->data, &protocol);
 	skb_pull(skb, 2);
-	netif_rx(skb);
+	isdn_netif_rx(idev, skb, protocol);
 }
 
-static struct isdn_netif_ops iptyp_ops = {
+struct isdn_netif_ops isdn_iptyp_ops = {
 	.hard_start_xmit     = isdn_net_start_xmit,
 	.hard_header         = isdn_iptyp_header,
 	.flags               = IFF_NOARP | IFF_POINTOPOINT,
@@ -84,13 +66,11 @@
 isdn_uihdlc_receive(isdn_net_local *lp, isdn_net_dev *idev, 
 		    struct sk_buff *skb)
 {
-	idev->huptimer = 0;
 	skb_pull(skb, 2);
-	skb->protocol = htons(ETH_P_IP);
-	netif_rx(skb);
+	isdn_netif_rx(idev, skb, htons(ETH_P_IP));
 }
 
-static struct isdn_netif_ops uihdlc_ops = {
+struct isdn_netif_ops isdn_uihdlc_ops = {
 	.hard_start_xmit     = isdn_net_start_xmit,
 	.hard_header         = isdn_uihdlc_header,
 	.flags               = IFF_NOARP | IFF_POINTOPOINT,
@@ -112,7 +92,7 @@
 	netif_rx(skb);
 }
 
-static struct isdn_netif_ops rawip_ops = {
+struct isdn_netif_ops isdn_rawip_ops = {
 	.hard_start_xmit     = isdn_net_start_xmit,
 	.flags               = IFF_NOARP | IFF_POINTOPOINT,
 	.type                = ARPHRD_PPP,
@@ -127,9 +107,7 @@
 isdn_ether_receive(isdn_net_local *lp, isdn_net_dev *idev, 
 		   struct sk_buff *skb)
 {
-	idev->huptimer = 0;
-	skb->protocol = eth_type_trans(skb, skb->dev);
-	netif_rx(skb);
+	isdn_netif_rx(idev, skb, eth_type_trans(skb, &lp->dev));
 }
 
 static int
@@ -164,38 +142,9 @@
 	return 0;
 }
 
-static struct isdn_netif_ops ether_ops = {
+struct isdn_netif_ops isdn_ether_ops = {
 	.hard_start_xmit     = isdn_net_start_xmit,
-	.hard_header         = eth_header,
 	.receive             = isdn_ether_receive,
 	.init                = isdn_ether_init,
 	.open                = isdn_ether_open,
 };
-
-// ======================================================================
-
-void
-isdn_net_init(void)
-{
-	isdn_net_lib_init();
-
-	register_isdn_netif(ISDN_NET_ENCAP_ETHER,      &ether_ops);
-	register_isdn_netif(ISDN_NET_ENCAP_RAWIP,      &rawip_ops);
-	register_isdn_netif(ISDN_NET_ENCAP_IPTYP,      &iptyp_ops);
-	register_isdn_netif(ISDN_NET_ENCAP_UIHDLC,     &uihdlc_ops);
-	register_isdn_netif(ISDN_NET_ENCAP_CISCOHDLC,  &ciscohdlck_ops);
-	register_isdn_netif(ISDN_NET_ENCAP_CISCOHDLCK, &ciscohdlck_ops);
-#ifdef CONFIG_ISDN_X25
-	register_isdn_netif(ISDN_NET_ENCAP_X25IFACE,   &isdn_x25_ops);
-#endif
-#ifdef CONFIG_ISDN_PPP
-	register_isdn_netif(ISDN_NET_ENCAP_SYNCPPP,    &isdn_ppp_ops);
-#endif
-}
-
-void
-isdn_net_exit(void)
-{
-	isdn_net_lib_exit();
-}
-
diff -Nru a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h
--- a/drivers/isdn/i4l/isdn_net.h	Wed Oct 30 16:44:32 2002
+++ b/drivers/isdn/i4l/isdn_net.h	Wed Oct 30 16:44:32 2002
@@ -1,83 +1,15 @@
-/* $Id: isdn_net.h,v 1.19.6.4 2001/09/28 08:05:29 kai Exp $
- *
- * header for Linux ISDN subsystem, network related functions (linklevel).
+/* Linux ISDN subsystem, network related functions
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
- * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
- * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1995,96    by Thinking Objects Software GmbH Wuerzburg
+ *           1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
  *
  * 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/netdevice.h>
-#include <linux/isdn.h>
-
-void isdn_net_init(void);
-void isdn_net_exit(void);
-void isdn_net_lib_init(void);
-void isdn_net_lib_exit(void);
-void isdn_net_hangup_all(void);
-int  isdn_net_ioctl(struct inode *, struct file *, uint, ulong);
-
-int  register_isdn_netif(int encap, struct isdn_netif_ops *ops);
-int  isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev);
-void isdn_net_online(isdn_net_dev *idev);
-void isdn_net_offline(isdn_net_dev *idev);
-
-int  isdn_net_stat_callback(int, isdn_ctrl *);
-int  isdn_net_find_icall(int, int, int, setup_parm *);
-int  isdn_net_rcv_skb(int, struct sk_buff *);
-
-int  isdn_net_hangup(isdn_net_dev *);
-int  isdn_net_dial_req(isdn_net_dev *);
-void isdn_net_writebuf_skb(isdn_net_dev *, struct sk_buff *skb);
-void isdn_net_write_super(isdn_net_dev *, struct sk_buff *skb);
-int  isdn_net_autodial(struct sk_buff *skb, struct net_device *ndev);
-isdn_net_dev *isdn_net_get_xmit_dev(isdn_net_local *mlp);
-
-static inline int
-put_u8(unsigned char *p, u8 x)
-{
-	*p = x;
-	return 1;
-}
-
-static inline int
-put_u16(unsigned char *p, u16 x)
-{
-	*((u16 *)p) = htons(x);
-	return 2;
-}
-
-static inline int
-put_u32(unsigned char *p, u32 x)
-{
-	*((u32 *)p) = htonl(x);
-	return 4;
-}
-
-static inline int
-get_u8(unsigned char *p, u8 *x)
-{
-	*x = *p;
-	return 1;
-}
-
-static inline int
-get_u16(unsigned char *p, u16 *x)
-{
-	*x = ntohs(*((u16 *)p));
-	return 2;
-}
-
-static inline int
-get_u32(unsigned char *p, u32 *x)
-{
-	*x = ntohl(*((u32 *)p));
-	return 4;
-}
-
-
+extern struct isdn_netif_ops isdn_iptyp_ops;
+extern struct isdn_netif_ops isdn_uihdlc_ops;
+extern struct isdn_netif_ops isdn_rawip_ops;
+extern struct isdn_netif_ops isdn_ether_ops;
diff -Nru a/drivers/isdn/i4l/isdn_net_lib.c b/drivers/isdn/i4l/isdn_net_lib.c
--- a/drivers/isdn/i4l/isdn_net_lib.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/isdn/i4l/isdn_net_lib.c	Wed Oct 30 16:44:19 2002
@@ -1,5 +1,4 @@
-/*
- * Linux ISDN subsystem, Network interface configuration
+/* Linux ISDN subsystem, network interface support code
  *
  * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
  *           1995,96    by Thinking Objects Software GmbH Wuerzburg
@@ -10,6 +9,17 @@
  * of the GNU General Public License, incorporated herein by reference.
  */
 
+/*
+ * Data Over Voice (DOV) support added - Guy Ellis 23-Mar-02 
+ *                                       guy@traverse.com.au
+ * Outgoing calls - looks for a 'V' in first char of dialed number
+ * Incoming calls - checks first character of eaz as follows:
+ *   Numeric - accept DATA only - original functionality
+ *   'V'     - accept VOICE (DOV) only
+ *   'B'     - accept BOTH DATA and DOV types
+ *
+ */
+
 /* Locking works as follows: 
  *
  * The configuration of isdn_net_devs works via ioctl on
@@ -44,9 +54,10 @@
 #include <linux/capability.h>
 #include <linux/rtnetlink.h>
 #include "isdn_common.h"
+#include "isdn_net_lib.h"
 #include "isdn_net.h"
 #include "isdn_ppp.h"
-#include "isdn_fsm.h"
+#include "isdn_ciscohdlck.h"
 
 #define ISDN_NET_TX_TIMEOUT (20*HZ) 
 
@@ -117,21 +128,21 @@
 };
 
 enum {
-	EV_TIMER_INCOMING,
-	EV_TIMER_DIAL,
-	EV_TIMER_DIAL_WAIT,
-	EV_TIMER_CB_OUT,
-	EV_TIMER_CB_IN,
-	EV_TIMER_HUP,
-	EV_STAT_DCONN,
-	EV_STAT_BCONN,
-	EV_STAT_DHUP,
-	EV_STAT_BHUP,
-	EV_STAT_CINF,
-	EV_STAT_BSENT,
-	EV_DO_DIAL,
-	EV_DO_CALLBACK,
-	EV_DO_ACCEPT,
+	EV_NET_TIMER_INCOMING,
+	EV_NET_TIMER_DIAL,
+	EV_NET_TIMER_DIAL_WAIT,
+	EV_NET_TIMER_CB_OUT,
+	EV_NET_TIMER_CB_IN,
+	EV_NET_TIMER_HUP,
+	EV_NET_STAT_DCONN,
+	EV_NET_STAT_BCONN,
+	EV_NET_STAT_DHUP,
+	EV_NET_STAT_BHUP,
+	EV_NET_STAT_CINF,
+	EV_NET_STAT_BSENT,
+	EV_NET_DO_DIAL,
+	EV_NET_DO_CALLBACK,
+	EV_NET_DO_ACCEPT,
 };
 
 static char *isdn_net_ev_str[] = {
@@ -141,15 +152,15 @@
 	"EV_NET_TIMER_CB_OUT",
 	"EV_NET_TIMER_CB_IN",
 	"EV_NET_TIMER_HUP",
-	"EV_STAT_DCONN",
-	"EV_STAT_BCONN",
-	"EV_STAT_DHUP",
-	"EV_STAT_BHUP",
-	"EV_STAT_CINF",
-	"EV_STAT_BSENT",
-	"EV_DO_DIAL",
-	"EV_DO_CALLBACK",
-	"EV_DO_ACCEPT",
+	"EV_NET_STAT_DCONN",
+	"EV_NET_STAT_BCONN",
+	"EV_NET_STAT_DHUP",
+	"EV_NET_STAT_BHUP",
+	"EV_NET_STAT_CINF",
+	"EV_NET_STAT_BSENT",
+	"EV_NET_DO_DIAL",
+	"EV_NET_DO_CALLBACK",
+	"EV_NET_DO_ACCEPT",
 };
 
 /* Definitions for hupflags: */
@@ -253,7 +264,7 @@
 isdn_net_bind(isdn_net_dev *idev, isdn_net_ioctl_cfg *cfg)
 {
 	isdn_net_local *mlp = idev->mlp;
-	int i, retval;
+	int retval;
 	int drvidx = -1;
 	int chidx = -1;
 	char drvid[25];
@@ -276,35 +287,28 @@
 		/* The channel-number is appended to the driver-Id with a comma */
 		*c = 0;
 		chidx = simple_strtol(c + 1, NULL, 10);
-
-		for (i = 0; i < ISDN_MAX_DRIVERS; i++) {
-			/* Lookup driver-Id in array */
-			if (!strcmp(dev->drvid[i], drvid)) {
-				drvidx = i;
-				break;
-			}
-		}
+		drvidx = isdn_drv_lookup(drvid);
 		if (drvidx == -1 || chidx == -1) {
 			/* Either driver-Id or channel-number invalid */
 			retval = -ENODEV;
 			goto out;
 		}
 	}
-	if (cfg->exclusive == (idev->exclusive >= 0) &&
+	if (cfg->exclusive == !!idev->exclusive &&
 	    drvidx == idev->pre_device && chidx == idev->pre_channel) {
 		/* no change */
 		retval = 0;
 		goto out;
 	}
-	if (idev->exclusive >= 0) {
+	if (idev->exclusive) {
 		isdn_slot_free(idev->exclusive);
-		idev->exclusive = -1;
+		idev->exclusive = NULL;
 	}
 	if (cfg->exclusive) {
 		/* If binding is exclusive, try to grab the channel */
 		idev->exclusive = isdn_get_free_slot(ISDN_USAGE_NET | ISDN_USAGE_EXCLUSIVE, 
 						     mlp->l2_proto, mlp->l3_proto, drvidx, chidx, cfg->eaz);
-		if (idev->exclusive < 0) {
+		if (!idev->exclusive) {
 			/* Grab failed, because desired channel is in use */
 			retval = -EBUSY;
 			goto out;
@@ -364,12 +368,11 @@
 	tasklet_init(&idev->tlet, isdn_net_tasklet, (unsigned long) idev);
 	skb_queue_head_init(&idev->super_tx_queue);
 
-	idev->isdn_slot = -1;
+	idev->isdn_slot = NULL;
 	idev->pre_device = -1;
 	idev->pre_channel = -1;
-	idev->exclusive = -1;
+	idev->exclusive = NULL;
 
-	idev->ipppd = NULL;
 	idev->pppbind = -1;
 
 	init_timer(&idev->dial_timer);
@@ -405,7 +408,7 @@
 		mlp->hupflags = ISDN_INHUP;
 		mlp->onhtime = 10;
 		mlp->dialmax = 1;
-		mlp->flags = ISDN_NET_CBHUP | ISDN_NET_DM_MANUAL;
+		mlp->flags = ISDN_NET_CBHUP | ISDN_NET_DM_MANUAL | ISDN_NET_SECURE;
 		mlp->cbdelay = 5 * HZ;	   /* Wait 5 secs before call-back  */
 		mlp->dialtimeout = 60 * HZ;/* Wait 1 min for connection     */
 		mlp->dialwait = 5 * HZ;    /* Wait 5 sec. after failed dial */
@@ -459,11 +462,12 @@
 
 	rtnl_lock();
 
-	if (netif_running(&mlp->dev))
-		return -EBUSY;
-
+	if (netif_running(&mlp->dev)) {
+		retval = -EBUSY;
+		goto out;
+	}
 	retval = isdn_net_addif(p, mlp);
-	
+ out:	
 	rtnl_unlock();
 	return retval;
 }
@@ -535,8 +539,7 @@
 {
 	isdn_net_dev *idev = isdn_net_findif(cfg->name);
 	isdn_net_local *mlp;
-	ulong features;
-	int i, retval;
+	int retval;
 
 	if (!idev)
 		return -ENODEV;
@@ -549,19 +552,6 @@
 		retval = -EBUSY;
 		goto out;
 	}
-	/* See if any registered driver supports the features we want */
-	features = ((1 << cfg->l2_proto) << ISDN_FEATURE_L2_SHIFT) |
-		   ((1 << cfg->l3_proto) << ISDN_FEATURE_L3_SHIFT);
-	for (i = 0; i < ISDN_MAX_DRIVERS; i++)
-		if (dev->drv[i] &&
-		    (dev->drv[i]->interface->features & features) == features)
-				break;
-
-	if (i == ISDN_MAX_DRIVERS) {
-		printk(KERN_WARNING "isdn_net: No driver with selected features\n");
-		retval = -ENODEV;
-		goto out;
-	}
 
 	retval = isdn_net_set_encap(mlp, cfg->p_encap);
 	if (retval)
@@ -653,9 +643,9 @@
 	mlp = idev->mlp;
 
 	strcpy(cfg->eaz, mlp->msn);
-	cfg->exclusive = idev->exclusive >= 0;
+	cfg->exclusive = !!idev->exclusive;
 	if (idev->pre_device >= 0) {
-		sprintf(cfg->drvid, "%s,%d", dev->drvid[idev->pre_device],
+		sprintf(cfg->drvid, "%s,%d", isdn_drv_drvid(idev->pre_device),
 			idev->pre_channel);
 	} else {
 		cfg->drvid[0] = '\0';
@@ -814,6 +804,29 @@
 	return isdn_net_dial(idev);
 }
 
+static int
+__isdn_net_dial_slave(isdn_net_local *mlp)
+{
+	isdn_net_dev *idev;
+
+	list_for_each_entry(idev, &mlp->slaves, slaves) {
+		if (isdn_net_dial(idev) == 0)
+			return 0;
+	}
+	return -EBUSY;
+}
+
+static int
+isdn_net_dial_slave(char *name)
+{
+	isdn_net_dev *idev = isdn_net_findif(name);
+
+	if (!idev)
+		return -ENODEV;
+
+	return __isdn_net_dial_slave(idev->mlp);
+}
+
 /*
  * Force a hangup of a network-interface.
  */
@@ -840,25 +853,18 @@
 isdn_net_getpeer(isdn_net_ioctl_phone *phone, isdn_net_ioctl_phone *peer)
 {
 	isdn_net_dev *idev = isdn_net_findif(phone->name);
-	int idx;
+	struct isdn_slot *slot;
 
 	if (!idev)
 		return -ENODEV;
-	/* FIXME
-	 * Theoretical race: while this executes, the remote number might
-	 * become invalid (hang up) or change (new connection), resulting
-         * in (partially) wrong number copied to user. This race
-	 * currently ignored.
-	 */
-	idx = idev->isdn_slot;
-	if (idx < 0)
-		return -ENOTCONN;
-	/* for pre-bound channels, we need this extra check */
-	if (strncmp(isdn_slot_num(idx), "???", 3) == 0 )
+
+	if (idev->fi.state != ST_ACTIVE)
 		return -ENOTCONN;
 
-	strncpy(phone->phone, isdn_slot_num(idx), ISDN_MSNLEN);
-	phone->outgoing = USG_OUTGOING(isdn_slot_usage(idx));
+	slot = idev->isdn_slot;
+
+	strncpy(phone->phone, slot->num, ISDN_MSNLEN);
+	phone->outgoing = USG_OUTGOING(slot->usage);
 
 	if (copy_to_user(peer, phone, sizeof(*peer)))
 		return -EFAULT;
@@ -972,22 +978,20 @@
 		}
 		retval = isdn_net_getpeer(&phone, (isdn_net_ioctl_phone *) arg);
 		break;
-#ifdef CONFIG_ISDN_PPP
 	case IIOCNETALN: /* Add link */
 		if (copy_from_user(name, (char *) arg, sizeof(name))) {
 			retval = -EFAULT;
 			break;
 		}
-		retval = isdn_ppp_dial_slave(name);
+		retval = isdn_net_dial_slave(name);
 		break;
 	case IIOCNETDLN: /* Delete link */
 		if (copy_from_user(name, (char *) arg, sizeof(name))) {
 			retval = -EFAULT;
 			break;
 		}
-		retval = isdn_ppp_hangup_slave(name);
+		retval = isdn_net_force_hangup(name);
 		break;
-#endif
 	default:
 		retval = -ENOTTY;
 	}
@@ -1191,14 +1195,15 @@
 	if (mlp->ops->unbind)
 		mlp->ops->unbind(idev);
 
-	isdn_slot_set_idev(idev->isdn_slot, NULL);
+	idev->isdn_slot->priv = NULL;
+	idev->isdn_slot->event_cb = NULL;
 
 	skb_queue_purge(&idev->super_tx_queue);
 
 	if (idev->isdn_slot != idev->exclusive)
 		isdn_slot_free(idev->isdn_slot);
 
-	idev->isdn_slot = -1;
+	idev->isdn_slot = NULL;
 
 	if (idev->fi.state != ST_NULL) {
 		lp_put(mlp);
@@ -1206,24 +1211,29 @@
 	}
 }
 
+static int isdn_net_event_callback(struct isdn_slot *slot, int pr, void *arg);
+
 /*
  * Assign an ISDN-channel to a net-interface
  */
 static int
-isdn_net_bind_channel(isdn_net_dev *idev, int slot)
+isdn_net_bind_channel(isdn_net_dev *idev, struct isdn_slot *slot)
 {
 	isdn_net_local *mlp = idev->mlp;
 	int retval = 0;
 
-	idev->isdn_slot = slot;
-	isdn_slot_set_idev(idev->isdn_slot, idev);
-
 	if (mlp->ops->bind)
 		retval = mlp->ops->bind(idev);
 
 	if (retval < 0)
-		isdn_net_unbind_channel(idev);
+		goto out;
+
+	idev->isdn_slot = slot;
+	slot->priv = idev;
+	slot->event_cb = isdn_net_event_callback;
+	slot->usage |= ISDN_USAGE_NET;
 
+ out:
 	return retval;
 }
 
@@ -1233,7 +1243,7 @@
 	int retval;
 
 	lp_get(idev->mlp);
-	retval = fsm_event(&idev->fi, EV_DO_DIAL, NULL);
+	retval = fsm_event(&idev->fi, EV_NET_DO_DIAL, NULL);
 	if (retval == -ESRCH) /* event not handled in this state */
 		retval = -EBUSY;
 
@@ -1348,29 +1358,13 @@
 	return 0;
 }
 
-
-static void
-isdn_net_dial_slave(isdn_net_local *mlp)
-{
-	isdn_net_dev *idev;
-
-	if (ISDN_NET_DIALMODE(*mlp) != ISDN_NET_DM_AUTO)
-		return;
-
-	list_for_each_entry(idev, &mlp->slaves, slaves) {
-		if (fsm_event(&idev->fi, EV_DO_DIAL, NULL) != -ESRCH) {
-			break;
-		}
-	}
-}
-
 static int
 accept_icall(struct fsm_inst *fi, int pr, void *arg)
 {
 	isdn_net_dev *idev = fi->userdata;
 	isdn_net_local *mlp = idev->mlp;
 	isdn_ctrl cmd;
-	int slot = (int) arg;
+	struct isdn_slot *slot = arg;
 
 	isdn_net_bind_channel(idev, slot);
 	
@@ -1383,9 +1377,10 @@
 	isdn_slot_command(idev->isdn_slot, ISDN_CMD_SETL2, &cmd);
 	cmd.arg = mlp->l3_proto << 8;
 	isdn_slot_command(idev->isdn_slot, ISDN_CMD_SETL3, &cmd);
+	isdn_slot_command(idev->isdn_slot, ISDN_CMD_ACCEPTD, &cmd);
 	
 	idev->dial_timer.expires = jiffies + mlp->dialtimeout;
-	idev->dial_event = EV_TIMER_INCOMING;
+	idev->dial_event = EV_NET_TIMER_INCOMING;
 	add_timer(&idev->dial_timer);
 	fsm_change_state(&idev->fi, ST_IN_WAIT_DCONN);
 	return 0;
@@ -1400,7 +1395,7 @@
 	printk(KERN_DEBUG "%s: start callback\n", idev->name);
 
 	idev->dial_timer.expires = jiffies + mlp->cbdelay;
-	idev->dial_event = EV_TIMER_CB_IN;
+	idev->dial_event = EV_NET_TIMER_CB_IN;
 	add_timer(&idev->dial_timer);
 	fsm_change_state(&idev->fi, ST_WAIT_BEFORE_CB);
 
@@ -1408,12 +1403,11 @@
 }
 
 static int
-isdn_net_dev_icall(isdn_net_dev *idev, int di, int ch, int si1,
-		   char *eaz, char *nr)
+isdn_net_dev_icall(isdn_net_dev *idev, struct isdn_slot *slot,
+		   int si1, char *eaz, char *nr)
 {
 	isdn_net_local *mlp = idev->mlp;
 	struct isdn_net_phone *ph;
-	int slot = isdn_dc2minor(di, ch);
 	char *my_eaz;
 	
 	/* check acceptable call types for DOV */
@@ -1431,9 +1425,6 @@
 		if (*my_eaz == 'b' || *my_eaz == 'B')
 			my_eaz++; /* skip to allow a match */
 	}
-	if (!USG_NONE(isdn_slot_usage(slot)))  // FIXME?
-		return 0;
-
 	/* check called number */
 	switch (isdn_msncmp(eaz, my_eaz)) {
 	case 1: /* no match */
@@ -1443,11 +1434,11 @@
 	}
 
 	dbg_net_icall("%s: pdev=%d di=%d pch=%d ch = %d\n", idev->name,
-		      idev->pre_device, di, idev->pre_channel, ch);
+		      idev->pre_device, slot->di, idev->pre_channel, slot->ch);
 	
 	/* check if exclusive */
-	if ((isdn_slot_usage(slot) & ISDN_USAGE_EXCLUSIVE) &&
-	    (idev->pre_channel != ch || idev->pre_device != di)) {
+	if ((slot->usage & ISDN_USAGE_EXCLUSIVE) &&
+	    (idev->pre_channel != slot->ch || idev->pre_device != slot->di)) {
 		dbg_net_icall("%s: excl check failed\n", idev->name);
 		return 0;
 	}
@@ -1471,7 +1462,7 @@
 	lp_get(mlp);
 	/* check callback */
 	if (mlp->flags & ISDN_NET_CALLBACK) {
-		if (fsm_event(&idev->fi, EV_DO_CALLBACK, NULL)) {
+		if (fsm_event(&idev->fi, EV_NET_DO_CALLBACK, NULL)) {
 			lp_put(mlp);
 			return 0;
 		}
@@ -1481,7 +1472,7 @@
 	printk(KERN_INFO "%s: call from %s -> %s accepted\n",
 	       idev->name, nr, eaz);
 
-	if (fsm_event(&idev->fi, EV_DO_ACCEPT, (void *) slot)) {
+	if (fsm_event(&idev->fi, EV_NET_DO_ACCEPT, slot)) {
 		lp_put(mlp);
 		return 0;
 	}
@@ -1505,7 +1496,7 @@
  *                   would eventually match if CID was longer.
  */
 int
-isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
+isdn_net_find_icall(struct isdn_slot *slot, setup_parm *setup)
 {
 	isdn_net_local *lp;
 	isdn_net_dev *idev;
@@ -1545,8 +1536,8 @@
                 return 0;
         }
 
-	dbg_net_icall("n_fi: di=%d ch=%d idx=%d usg=%d\n", di, ch, idx,
-		      isdn_slot_usage(idx));
+	dbg_net_icall("n_fi: di=%d ch=%d usg=%#x\n", slot->di, slot->ch,
+		      slot->usage);
 
 	retval = 0;
 	spin_lock_irqsave(&running_devs_lock, flags);
@@ -1555,7 +1546,7 @@
 		spin_unlock_irqrestore(&running_devs_lock, flags);
 
 		list_for_each_entry(idev, &lp->slaves, slaves) {
-			retval = isdn_net_dev_icall(idev, di, ch, si1, eaz, nr);
+			retval = isdn_net_dev_icall(idev, slot, si1, eaz, nr);
 			if (retval > 0)
 				break;
 		}
@@ -1604,7 +1595,7 @@
 {
 	isdn_net_dev *idev = fi->userdata;
 	isdn_net_local *mlp = idev->mlp;
-	int slot;
+	struct isdn_slot *slot;
 
 	if (ISDN_NET_DIALMODE(*mlp) == ISDN_NET_DM_OFF)
 		return -EPERM;
@@ -1612,13 +1603,13 @@
 	if (list_empty(&mlp->phone[1])) /* no number to dial ? */
 		return -EINVAL;
 
-	if (idev->exclusive >= 0)
+	if (idev->exclusive)
 		slot = idev->exclusive;
 	else
 		slot = isdn_get_free_slot(ISDN_USAGE_NET, mlp->l2_proto,
 					  mlp->l3_proto, idev->pre_device, 
 					  idev->pre_channel, mlp->msn);
-	if (slot < 0)
+	if (!slot)
 		return -EAGAIN;
 
 	if (isdn_net_bind_channel(idev, slot) < 0) {
@@ -1663,10 +1654,10 @@
 	/* For outgoing callback, use cbdelay instead of dialtimeout */
 	if (mlp->cbdelay && (mlp->flags & ISDN_NET_CBOUT)) {
 		idev->dial_timer.expires = jiffies + mlp->cbdelay;
-		idev->dial_event = EV_TIMER_CB_OUT;
+		idev->dial_event = EV_NET_TIMER_CB_OUT;
 	} else {
 		idev->dial_timer.expires = jiffies + mlp->dialtimeout;
-		idev->dial_event = EV_TIMER_DIAL;
+		idev->dial_event = EV_NET_TIMER_DIAL;
 	}
 	fsm_change_state(&idev->fi, ST_OUT_WAIT_DCONN);
 	add_timer(&idev->dial_timer);
@@ -1699,7 +1690,7 @@
 		isdn_net_hangup(idev);
 		return 0;
 	}
-	idev->dial_event = EV_TIMER_DIAL_WAIT;
+	idev->dial_event = EV_NET_TIMER_DIAL_WAIT;
 	mod_timer(&idev->dial_timer, jiffies + mlp->dialwait);
 	return 0;
 }
@@ -1710,7 +1701,6 @@
 	isdn_net_dev *idev = fi->userdata;
 
 	del_timer(&idev->dial_timer);
-	isdn_slot_all_eaz(idev->isdn_slot);
 	printk(KERN_INFO "%s: connection failed\n", idev->name);
 	isdn_net_unbind_channel(idev);
 	return 0;
@@ -1748,7 +1738,7 @@
 
 	if (mlp->onhtime) {
 		idev->huptimer = 0;
-		idev->dial_event = EV_TIMER_HUP;
+		idev->dial_event = EV_NET_TIMER_HUP;
 		mod_timer(&idev->dial_timer, jiffies + HZ);
 	} else {
 		del_timer(&idev->dial_timer);
@@ -1794,7 +1784,6 @@
 	isdn_net_dev *idev = fi->userdata;
 
 	printk(KERN_INFO "%s: Chargesum is %d\n", idev->name, idev->charge);
-	isdn_slot_all_eaz(idev->isdn_slot);
 	isdn_net_unbind_channel(idev);
 	return 0;
 }
@@ -1862,39 +1851,45 @@
 	del_timer(&idev->dial_timer);
 
 	printk(KERN_INFO "%s: local hangup\n", idev->name);
-	isdn_slot_command(idev->isdn_slot, ISDN_CMD_HANGUP, &cmd);
+	// FIXME via state machine
+	if (idev->isdn_slot)
+		isdn_slot_command(idev->isdn_slot, ISDN_CMD_HANGUP, &cmd);
 	return 1;
 }
 
+static int isdn_net_rcv_skb(struct isdn_slot *slot, struct sk_buff *skb);
+
 /*
  * Handle status-messages from ISDN-interfacecard.
  * This function is called from within the main-status-dispatcher
  * isdn_status_callback, which itself is called from the low-level driver.
- * Return: 1 = event handled, 0 = not handled
  */
-int
-isdn_net_stat_callback(int idx, isdn_ctrl *c)
+static int
+isdn_net_event_callback(struct isdn_slot *slot, int pr, void *arg)
 {
-	isdn_net_dev *idev = isdn_slot_idev(idx);
+	isdn_net_dev *idev = slot->priv;
 
 	if (!idev) {
+		isdn_BUG();
 		return 0;
 	}
-	switch (c->command) {
-	case ISDN_STAT_DCONN:
-		return fsm_event(&idev->fi, EV_STAT_DCONN, c);
-	case ISDN_STAT_BCONN:
-		return fsm_event(&idev->fi, EV_STAT_BCONN, c);
-	case ISDN_STAT_BHUP:
-		return fsm_event(&idev->fi, EV_STAT_BHUP, c);
-	case ISDN_STAT_DHUP:
-		return fsm_event(&idev->fi, EV_STAT_DHUP, c);
-	case ISDN_STAT_CINF:
-		return fsm_event(&idev->fi, EV_STAT_CINF, c);
-	case ISDN_STAT_BSENT:
-		return fsm_event(&idev->fi, EV_STAT_BSENT, c);
+	switch (pr) {
+	case EV_DATA_IND:
+		return isdn_net_rcv_skb(slot, arg);
+	case EV_STAT_DCONN:
+		return fsm_event(&idev->fi, EV_NET_STAT_DCONN, arg);
+	case EV_STAT_BCONN:
+		return fsm_event(&idev->fi, EV_NET_STAT_BCONN, arg);
+	case EV_STAT_BHUP:
+		return fsm_event(&idev->fi, EV_NET_STAT_BHUP, arg);
+	case EV_STAT_DHUP:
+		return fsm_event(&idev->fi, EV_NET_STAT_DHUP, arg);
+	case EV_STAT_CINF:
+		return fsm_event(&idev->fi, EV_NET_STAT_CINF, arg);
+	case EV_STAT_BSENT:
+		return fsm_event(&idev->fi, EV_NET_STAT_BSENT, arg);
 	default:
-		printk("unknown stat %d\n", c->command);
+		printk("unknown pr %d\n", pr);
 		return 0;
 	}
 }
@@ -1925,37 +1920,37 @@
 }
 
 static struct fsm_node isdn_net_fn_tbl[] = {
-	{ ST_NULL,           EV_DO_DIAL,         do_dial       },
-	{ ST_NULL,           EV_DO_ACCEPT,       accept_icall  },
-	{ ST_NULL,           EV_DO_CALLBACK,     do_callback   },
+	{ ST_NULL,           EV_NET_DO_DIAL,         do_dial       },
+	{ ST_NULL,           EV_NET_DO_ACCEPT,       accept_icall  },
+	{ ST_NULL,           EV_NET_DO_CALLBACK,     do_callback   },
 
-	{ ST_OUT_WAIT_DCONN, EV_TIMER_DIAL,      dial_timeout  },
-	{ ST_OUT_WAIT_DCONN, EV_STAT_DCONN,      out_dconn     },
-	{ ST_OUT_WAIT_DCONN, EV_STAT_DHUP,       connect_fail  },
-	{ ST_OUT_WAIT_DCONN, EV_TIMER_CB_OUT,    hang_up       },
+	{ ST_OUT_WAIT_DCONN, EV_NET_TIMER_DIAL,      dial_timeout  },
+	{ ST_OUT_WAIT_DCONN, EV_NET_STAT_DCONN,      out_dconn     },
+	{ ST_OUT_WAIT_DCONN, EV_NET_STAT_DHUP,       connect_fail  },
+	{ ST_OUT_WAIT_DCONN, EV_NET_TIMER_CB_OUT,    hang_up       },
 
-	{ ST_OUT_WAIT_BCONN, EV_TIMER_DIAL,      dial_timeout  },
-	{ ST_OUT_WAIT_BCONN, EV_STAT_BCONN,      bconn         },
-	{ ST_OUT_WAIT_BCONN, EV_STAT_DHUP,       connect_fail  },
+	{ ST_OUT_WAIT_BCONN, EV_NET_TIMER_DIAL,      dial_timeout  },
+	{ ST_OUT_WAIT_BCONN, EV_NET_STAT_BCONN,      bconn         },
+	{ ST_OUT_WAIT_BCONN, EV_NET_STAT_DHUP,       connect_fail  },
 
-	{ ST_IN_WAIT_DCONN,  EV_TIMER_INCOMING,  hang_up       },
-	{ ST_IN_WAIT_DCONN,  EV_STAT_DCONN,      in_dconn      },
-	{ ST_IN_WAIT_DCONN,  EV_STAT_DHUP,       connect_fail  },
+	{ ST_IN_WAIT_DCONN,  EV_NET_TIMER_INCOMING,  hang_up       },
+	{ ST_IN_WAIT_DCONN,  EV_NET_STAT_DCONN,      in_dconn      },
+	{ ST_IN_WAIT_DCONN,  EV_NET_STAT_DHUP,       connect_fail  },
 
-	{ ST_IN_WAIT_BCONN,  EV_TIMER_INCOMING,  hang_up       },
-	{ ST_IN_WAIT_BCONN,  EV_STAT_BCONN,      bconn         },
-	{ ST_IN_WAIT_BCONN,  EV_STAT_DHUP,       connect_fail  },
+	{ ST_IN_WAIT_BCONN,  EV_NET_TIMER_INCOMING,  hang_up       },
+	{ ST_IN_WAIT_BCONN,  EV_NET_STAT_BCONN,      bconn         },
+	{ ST_IN_WAIT_BCONN,  EV_NET_STAT_DHUP,       connect_fail  },
 
-	{ ST_ACTIVE,         EV_TIMER_HUP,       check_hup     },
-	{ ST_ACTIVE,         EV_STAT_BHUP,       bhup          },
-	{ ST_ACTIVE,         EV_STAT_CINF,       got_cinf      },
-	{ ST_ACTIVE,         EV_STAT_BSENT,      got_bsent     },
+	{ ST_ACTIVE,         EV_NET_TIMER_HUP,       check_hup     },
+	{ ST_ACTIVE,         EV_NET_STAT_BHUP,       bhup          },
+	{ ST_ACTIVE,         EV_NET_STAT_CINF,       got_cinf      },
+	{ ST_ACTIVE,         EV_NET_STAT_BSENT,      got_bsent     },
 
-	{ ST_WAIT_DHUP,      EV_STAT_DHUP,       dhup          },
+	{ ST_WAIT_DHUP,      EV_NET_STAT_DHUP,       dhup          },
 
-	{ ST_WAIT_BEFORE_CB, EV_TIMER_CB_IN,     do_dial       },
+	{ ST_WAIT_BEFORE_CB, EV_NET_TIMER_CB_IN,     do_dial       },
 
-	{ ST_OUT_DIAL_WAIT,  EV_TIMER_DIAL_WAIT, dialout_next  },
+	{ ST_OUT_DIAL_WAIT,  EV_NET_TIMER_DIAL_WAIT, dialout_next  },
 };
 
 static struct fsm isdn_net_fsm = {
@@ -2224,7 +2219,8 @@
 		} else {
 			/* subsequent overload: if slavedelay exceeded, start dialing */
 			if (time_after(jiffies, idev->sqfull_stamp + mlp->slavedelay)) {
-				isdn_net_dial_slave(mlp);
+				if (ISDN_NET_DIALMODE(*mlp) == ISDN_NET_DM_AUTO)
+					__isdn_net_dial_slave(mlp);
 			}
 		}
 	} else {
@@ -2267,10 +2263,10 @@
  * interface. If found, deliver packet to receiver-function and return 1,
  * else return 0.
  */
-int
-isdn_net_rcv_skb(int idx, struct sk_buff *skb)
+static int
+isdn_net_rcv_skb(struct isdn_slot *slot, struct sk_buff *skb)
 {
-	isdn_net_dev *idev = isdn_slot_idev(idx);
+	isdn_net_dev *idev = slot->priv;
 	isdn_net_local *mlp;
 
 	if (!idev) {
@@ -2297,6 +2293,20 @@
 	return 1;
 }
 
+/*
+ * After handling connection-type specific stuff, the receiver function
+ * can use this function to pass the skb on to the network layer.
+ */
+void
+isdn_netif_rx(isdn_net_dev *idev, struct sk_buff *skb, u16 protocol)
+{
+	idev->huptimer = 0;
+
+	skb->protocol = protocol;
+	skb->dev = &idev->mlp->dev;
+	netif_rx(skb);
+}
+
 /* ====================================================================== */
 /* init / exit                                                            */
 /* ====================================================================== */
@@ -2305,12 +2315,27 @@
 isdn_net_lib_init(void)
 {
 	fsm_new(&isdn_net_fsm);
+
+#ifdef CONFIG_ISDN_NET_SIMPLE
+	register_isdn_netif(ISDN_NET_ENCAP_ETHER,      &isdn_ether_ops);
+	register_isdn_netif(ISDN_NET_ENCAP_RAWIP,      &isdn_rawip_ops);
+	register_isdn_netif(ISDN_NET_ENCAP_IPTYP,      &isdn_iptyp_ops);
+	register_isdn_netif(ISDN_NET_ENCAP_UIHDLC,     &isdn_uihdlc_ops);
+#endif
+#ifdef CONFIG_ISDN_NET_CISCO
+	register_isdn_netif(ISDN_NET_ENCAP_CISCOHDLC,  &isdn_ciscohdlck_ops);
+	register_isdn_netif(ISDN_NET_ENCAP_CISCOHDLCK, &isdn_ciscohdlck_ops);
+#endif
+#ifdef CONFIG_ISDN_X25
+	register_isdn_netif(ISDN_NET_ENCAP_X25IFACE,   &isdn_x25_ops);
+#endif
+#ifdef CONFIG_ISDN_PPP
+	register_isdn_netif(ISDN_NET_ENCAP_SYNCPPP,    &isdn_ppp_ops);
+#endif
 }
 
 void
 isdn_net_lib_exit(void)
 {
-	isdn_net_cleanup();
-
 	fsm_free(&isdn_net_fsm);
 }
diff -Nru a/drivers/isdn/i4l/isdn_net_lib.h b/drivers/isdn/i4l/isdn_net_lib.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/i4l/isdn_net_lib.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,224 @@
+/* Linux ISDN subsystem, network interface support code
+ *
+ * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
+ *           1995,96    by Thinking Objects Software GmbH Wuerzburg
+ *           1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#ifndef __ISDN_NET_LIB_H__
+#define __ISDN_NET_LIB_H__
+
+#include <linux/isdn.h>
+
+typedef struct isdn_net_local_s isdn_net_local;
+typedef struct isdn_net_dev_s isdn_net_dev;
+
+struct isdn_netif_ops {
+	int			(*hard_start_xmit) (struct sk_buff *skb,
+						    struct net_device *dev);
+	int			(*hard_header) (struct sk_buff *skb,
+						struct net_device *dev,
+						unsigned short type,
+						void *daddr,
+						void *saddr,
+						unsigned len);
+	int			(*do_ioctl)(struct net_device *dev,
+					    struct ifreq *ifr, int cmd);
+
+	unsigned short		flags;	/* interface flags (a la BSD)	*/
+	unsigned short		type;	/* interface hardware type	*/
+	unsigned char		addr_len;/* hardware address length	*/
+	void                    (*receive)(struct isdn_net_local_s *,
+					   struct isdn_net_dev_s *,
+					   struct sk_buff *);
+	void                    (*connected)(struct isdn_net_dev_s *);
+	void                    (*disconnected)(struct isdn_net_dev_s *);
+	int                     (*bind)(struct isdn_net_dev_s *);
+	void                    (*unbind)(struct isdn_net_dev_s *);
+	int                     (*init)(struct isdn_net_local_s *);
+	void                    (*cleanup)(struct isdn_net_local_s *);
+	int                     (*open)(struct isdn_net_local_s *);
+	void                    (*close)(struct isdn_net_local_s *);
+};
+
+/* our interface to isdn_common.c */
+void isdn_net_lib_init(void);
+void isdn_net_lib_exit(void);
+void isdn_net_hangup_all(void);
+int  isdn_net_ioctl(struct inode *, struct file *, uint, ulong);
+int  isdn_net_find_icall(struct isdn_slot *slot, setup_parm *setup);
+
+/* provided for interface types to use */
+void isdn_net_writebuf_skb(isdn_net_dev *, struct sk_buff *skb);
+void isdn_net_write_super(isdn_net_dev *, struct sk_buff *skb);
+void isdn_net_online(isdn_net_dev *idev);
+void isdn_net_offline(isdn_net_dev *idev);
+int  isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev);
+void isdn_netif_rx(isdn_net_dev *idev, struct sk_buff *skb, u16 protocol);
+isdn_net_dev *isdn_net_get_xmit_dev(isdn_net_local *mlp);
+int  isdn_net_hangup(isdn_net_dev *);
+int  isdn_net_autodial(struct sk_buff *skb, struct net_device *ndev);
+int  isdn_net_dial_req(isdn_net_dev *);
+int  register_isdn_netif(int encap, struct isdn_netif_ops *ops);
+
+/* ====================================================================== */
+
+/* Feature- and status-flags for a net-interface */
+#define ISDN_NET_SECURE     0x02       /* Accept calls from phonelist only  */
+#define ISDN_NET_CALLBACK   0x04       /* activate callback                 */
+#define ISDN_NET_CBHUP      0x08       /* hangup before callback            */
+#define ISDN_NET_CBOUT      0x10       /* remote machine does callback      */
+
+#define ISDN_NET_MAGIC      0x49344C02 /* for paranoia-checking             */
+
+/* Phone-list-element */
+struct isdn_net_phone {
+	struct list_head list;
+	char num[ISDN_MSNLEN];
+};
+
+/* per network interface data (dev->priv) */
+
+struct isdn_net_local_s {
+  ulong                  magic;
+  struct net_device      dev;          /* interface to upper levels        */
+  struct net_device_stats stats;       /* Ethernet Statistics              */
+  struct isdn_netif_ops *ops;
+  void                  *inl_priv;     /* interface types can put their
+					  private data here                */
+  int                    flags;        /* Connection-flags                 */
+  int                    dialmax;      /* Max. Number of Dial-retries      */
+  int	        	 dialtimeout;  /* How long shall we try on dialing */
+  int			 dialwait;     /* wait after failed attempt        */
+
+  int                    cbdelay;      /* Delay before Callback starts     */
+  char                   msn[ISDN_MSNLEN]; /* MSNs/EAZs for this interface */
+
+  u_char                 cbhup;        /* Flag: Reject Call before Callback*/
+  int                    hupflags;     /* Flags for charge-unit-hangup:    */
+  int                    onhtime;      /* Time to keep link up             */
+
+  u_char                 p_encap;      /* Packet encapsulation             */
+  u_char                 l2_proto;     /* Layer-2-protocol                 */
+  u_char                 l3_proto;     /* Layer-3-protocol                 */
+
+  ulong                  slavedelay;   /* Dynamic bundling delaytime       */
+  int                    triggercps;   /* BogoCPS needed for trigger slave */
+  struct list_head       phone[2];     /* List of remote-phonenumbers      */
+				       /* phone[0] = Incoming Numbers      */
+				       /* phone[1] = Outgoing Numbers      */
+
+  struct list_head       slaves;       /* list of all bundled channels    
+					  protected by serializing config
+					  ioctls / no change allowed when
+					  interface is running             */
+  struct list_head       online;       /* list of all bundled channels 
+					  which can be used for actual
+					  data (IP) transfer              
+					  protected by xmit_lock           */
+
+  spinlock_t             xmit_lock;    /* used to protect the xmit path of 
+					  a net_device, including all
+					  associated channels's frame_cnt  */
+  struct list_head       running_devs; /* member of global running_devs    */
+  atomic_t               refcnt;       /* references held by ISDN code     */
+
+};
+
+
+/* per ISDN channel (ISDN interface) data */
+
+struct isdn_net_dev_s {
+  struct isdn_slot      *isdn_slot;    /* Index to isdn device/channel     */
+  struct isdn_slot      *exclusive;    /* NULL if non excl                 */
+  int                    pre_device;   /* Preselected isdn-device          */
+  int                    pre_channel;  /* Preselected isdn-channel         */
+
+  struct timer_list      dial_timer;   /* dial events timer                */
+  struct fsm_inst        fi;           /* call control state machine       */
+  int                    dial_event;   /* event in case of timer expiry    */
+  int                    dial;         /* # of phone number just dialed    */
+  int                    outgoing;     /* Flag: outgoing call              */
+  int                    dialretry;    /* Counter for Dialout-retries      */
+
+  int                    cps;          /* current speed of this interface  */
+  int                    transcount;   /* byte-counter for cps-calculation */
+  int                    last_jiffies; /* when transcount was reset        */
+  int                    sqfull;       /* Flag: netdev-queue overloaded    */
+  ulong                  sqfull_stamp; /* Start-Time of overload           */
+
+  int                    huptimer;     /* Timeout-counter for auto-hangup  */
+  int                    charge;       /* Counter for charging units       */
+  int                    charge_state; /* ChargeInfo state machine         */
+  unsigned long          chargetime;   /* Timer for Charging info          */
+  int                    chargeint;    /* Interval between charge-infos    */
+
+  int                    pppbind;      /* ippp device for bindings         */
+
+  struct sk_buff_head    super_tx_queue; /* List of supervisory frames to  */
+	                               /* be transmitted asap              */
+  int                    frame_cnt;    /* number of frames currently       */
+                        	       /* queued in HL driver              */
+  struct tasklet_struct  tlet;
+
+  isdn_net_local        *mlp;          /* Ptr to master device for all devs*/
+
+  struct list_head       slaves;       /* member of local->slaves          */
+  struct list_head       online;       /* member of local->online          */
+
+  char                   name[10];     /* Name of device                   */
+  struct list_head       global_list;  /* global list of all isdn_net_devs */
+  void                  *ind_priv;     /* interface types can put their
+					  private data here                */
+};
+
+/* ====================================================================== */
+
+static inline int
+put_u8(unsigned char *p, u8 x)
+{
+	*p = x;
+	return 1;
+}
+
+static inline int
+put_u16(unsigned char *p, u16 x)
+{
+	*((u16 *)p) = htons(x);
+	return 2;
+}
+
+static inline int
+put_u32(unsigned char *p, u32 x)
+{
+	*((u32 *)p) = htonl(x);
+	return 4;
+}
+
+static inline int
+get_u8(unsigned char *p, u8 *x)
+{
+	*x = *p;
+	return 1;
+}
+
+static inline int
+get_u16(unsigned char *p, u16 *x)
+{
+	*x = ntohs(*((u16 *)p));
+	return 2;
+}
+
+static inline int
+get_u32(unsigned char *p, u32 *x)
+{
+	*x = ntohl(*((u32 *)p));
+	return 4;
+}
+
+
+#endif
diff -Nru a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
--- a/drivers/isdn/i4l/isdn_ppp.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/i4l/isdn_ppp.c	Wed Oct 30 16:44:29 2002
@@ -1,12 +1,10 @@
-/* $Id: isdn_ppp.c,v 1.85.6.9 2001/11/06 20:58:28 kai Exp $
+/* Linux ISDN subsystem, functions for synchronous PPP (linklevel).
  *
- * Linux ISDN subsystem, functions for synchronous PPP (linklevel).
- *
- * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #include <linux/module.h>
@@ -17,12 +15,15 @@
 #include <linux/if_arp.h>
 
 #include "isdn_common.h"
+#include "isdn_net_lib.h"
 #include "isdn_ppp.h"
 #include "isdn_ppp_ccp.h"
-#include "isdn_net.h"
+#include "isdn_ppp_vj.h"
+#include "isdn_ppp_mp.h"
 
-static struct sk_buff *
-isdn_ppp_dev_alloc_skb(void *priv, int len, int gfp_mask);
+/* ====================================================================== */
+
+#define IPPP_MAX_RQ_LEN 8 /* max #frames queued for ipppd to read */
 
 static int
 isdn_ppp_set_compressor(isdn_net_dev *idev, struct isdn_ppp_comp_data *);
@@ -42,7 +43,7 @@
  * idev->ipppd is safe without further locking.
  */
 
-#define IPPPD_DEBUG
+#undef IPPPD_DEBUG
 
 #ifdef IPPPD_DEBUG
 #define ipppd_debug(i, fmt, arg...) \
@@ -211,6 +212,8 @@
 ipppd_write(struct file *file, const char *buf, size_t count, loff_t *off)
 {
 	isdn_net_dev *idev;
+	struct inl_ppp *inl_ppp;
+	struct ind_ppp *ind_ppp;
 	struct ipppd *ipppd;
 	struct sk_buff *skb;
 	char *p;
@@ -234,6 +237,8 @@
 		retval = -ENODEV;
 		goto out;
 	}
+	ind_ppp = idev->ind_priv;
+	inl_ppp = idev->mlp->inl_priv;
 	/* Daemon needs to send at least full header, AC + proto */
 	if (count < 4) {
 		retval = -EMSGSIZE;
@@ -258,10 +263,10 @@
 	/* Keeps CCP/compression states in sync */
 	switch (proto) {
 	case PPP_CCP:
-		ippp_ccp_send_ccp(idev->mlp->ccp, skb);
+		ippp_ccp_send_ccp(inl_ppp->ccp, skb);
 		break;
 	case PPP_CCPFRAG:
-		ippp_ccp_send_ccp(idev->ccp, skb);
+		ippp_ccp_send_ccp(ind_ppp->ccp, skb);
 		break;
 	}
 	/* FIXME: Somewhere we need protection against the
@@ -302,8 +307,6 @@
 	if (!skb_queue_empty(&is->rq) || is->flags & IPPPD_FL_WAKEUP) {
 		is->flags &= ~IPPPD_FL_WAKEUP;
 		mask |= POLLIN | POLLRDNORM;
-		set_current_state(TASK_INTERRUPTIBLE); // FIXME
-		schedule_timeout(HZ);
 	}
 
  out:
@@ -335,6 +338,8 @@
 	    unsigned long arg)
 {
 	isdn_net_dev *idev;
+	struct ind_ppp *ind_ppp = NULL;
+	struct inl_ppp *inl_ppp = NULL;
 	unsigned long val;
 	int r;
 	struct ipppd *is;
@@ -342,28 +347,16 @@
 	unsigned int cfg;
 
 	is = file->private_data;
-	idev = is->idev;
 
 	ipppd_debug(is, "cmd %#x", cmd);
 
+	// FIXME that needs locking?
+	idev = is->idev;
+	if (idev) {
+		ind_ppp = idev->ind_priv;
+		inl_ppp = idev->mlp->inl_priv;
+	}
 	switch (cmd) {
-	case PPPIOCBUNDLE:
-#ifdef CONFIG_ISDN_MPP
-		if (is->state != IPPPD_ST_CONNECTED) {
-			r = -EINVAL;
-			break;
-		}
-		r = get_arg(arg, &val, sizeof(val));
-		if (r)
-			break;
-
-		printk(KERN_DEBUG "iPPP-bundle: minor: %d, slave unit: %d, master unit: %d\n",
-		       is->minor, is->unit, val);
-		r = isdn_ppp_bundle(is, val);
-#else
-		r = -EINVAL;
-#endif
-		break;
 	case PPPIOCGUNIT:	/* get ppp/isdn unit number */
 		r = set_arg(arg, &is->unit, sizeof(is->unit));
 		break;
@@ -376,8 +369,8 @@
 			break;
 		is->debug = val;
 		if (idev) {
-			idev->debug = val;
-			idev->mlp->debug = val;
+			ind_ppp->debug = val;
+			inl_ppp->debug = val;
 		}
 		break;
 	case PPPIOCGCOMPRESSORS:
@@ -401,33 +394,40 @@
 	}
 
 	switch (cmd) {
+	case PPPIOCBUNDLE:
+		r = get_arg(arg, &val, sizeof(val));
+		if (r)
+			break;
+
+		r = ippp_mp_bundle(idev, val);
+		break;
 	case PPPIOCGIFNAME:
 		r = set_arg(arg, idev->name, strlen(idev->name)+1);
 		break;
 	case PPPIOCGMPFLAGS:	/* get configuration flags */
-		r = set_arg(arg, &idev->mlp->mpppcfg, sizeof(idev->mlp->mpppcfg));
+		r = set_arg(arg, &inl_ppp->mp_cfg, sizeof(inl_ppp->mp_cfg));
 		break;
 	case PPPIOCSMPFLAGS:	/* set configuration flags */
 		r = get_arg(arg, &val, sizeof(val));
 		if (r)
 			break;
-		idev->mlp->mpppcfg = val;
+		inl_ppp->mp_cfg = val;
 		break;
 	case PPPIOCGFLAGS:	/* get configuration flags */
-		cfg = idev->pppcfg | ippp_ccp_get_flags(idev->ccp);
+		cfg = ind_ppp->pppcfg | ippp_ccp_get_flags(ind_ppp->ccp);
 		r = set_arg(arg, &cfg, sizeof(cfg));
 		break;
 	case PPPIOCSFLAGS:	/* set configuration flags */
 		r = get_arg(arg, &val, sizeof(val));
 		if (r)
 			break;
-		if ((val & SC_ENABLE_IP) && !(idev->pppcfg & SC_ENABLE_IP)) {
-			idev->pppcfg = val;
+		if ((val & SC_ENABLE_IP) && !(ind_ppp->pppcfg & SC_ENABLE_IP)) {
+			ind_ppp->pppcfg = val;
 			/* OK .. we are ready to send buffers */
 			isdn_net_online(idev);
 			break;
 		}
-		idev->pppcfg = val;
+		ind_ppp->pppcfg = val;
 		break;
 	case PPPIOCGIDLE:	/* get idle time information */
 	{
@@ -440,32 +440,18 @@
 		r = get_arg(arg, &val, sizeof(val));
 		if (r)
 			break;
-		r = ippp_ccp_set_mru(idev->ccp, val);
+		r = ippp_ccp_set_mru(ind_ppp->ccp, val);
 		break;
 	case PPPIOCSMPMRU:
 		break;
 	case PPPIOCSMPMTU:
 		break;
-#ifdef CONFIG_ISDN_PPP_VJ
 	case PPPIOCSMAXCID:	/* set the maximum compression slot id */
-	{
-		struct slcompress *sltmp;
 		r = get_arg(arg, &val, sizeof(val));
 		if (r)
 			break;
-		val++;
-		sltmp = slhc_init(16, val);
-		if (!sltmp) {
-			r = -ENOMEM;
-			break;
-		}
-		if (idev->mlp->slcomp)
-			slhc_free(idev->mlp->slcomp);
-		idev->mlp->slcomp = sltmp;
-		r = 0;
+		r = ippp_vj_set_maxcid(idev, val);
 		break;
-	}
-#endif
 	case PPPIOCSCOMPRESSOR:
 		r = get_arg(arg, &data, sizeof(data));
 		if (r)
@@ -563,42 +549,24 @@
 }
 
 /* ====================================================================== */
+/* interface to isdn_net_lib                                            */
+/* ====================================================================== */
 
-/* Prototypes */
-static void isdn_ppp_push_higher(isdn_net_local *lp, isdn_net_dev *idev,
-				 struct sk_buff *skb, int proto);
-static int isdn_ppp_if_get_unit(char *namebuf);
 
-static void
-isdn_ppp_dev_push_header(void *priv, struct sk_buff *skb, u16 proto);
+/* Prototypes */
+static int
+isdn_ppp_if_get_unit(char *namebuf);
 
 static void
-isdn_ppp_dev_xmit(void *priv, struct sk_buff *skb);
+isdn_ppp_dev_xmit(void *priv, struct sk_buff *skb, u16 proto);
 
 static struct sk_buff *
 isdn_ppp_lp_alloc_skb(void *priv, int len, int gfp_mask);
 
-static void
-isdn_ppp_lp_push_header(void *priv, struct sk_buff *skb, u16 proto);
-
 /* New CCP stuff */
 static void
 isdn_ppp_dev_kick_up(void *priv);
 
-#ifdef CONFIG_ISDN_MPP
-static ippp_bundle * isdn_ppp_bundle_arr = NULL;
- 
-static int isdn_ppp_mp_bundle_array_init(void);
-static int isdn_ppp_mp_init(isdn_net_local *lp, ippp_bundle *add_to);
-static void isdn_ppp_mp_receive(isdn_net_local *lp, isdn_net_dev *idev, 
-				struct sk_buff *skb);
-static void isdn_ppp_mp_cleanup(isdn_net_local *lp );
-
-static int isdn_ppp_bundle(struct ipppd *, int unit);
-#endif	/* CONFIG_ISDN_MPP */
-  
-char *isdn_ppp_revision = "$Revision: 1.85.6.9 $";
-
 /*
  * frame log (debug)
  */
@@ -620,23 +588,30 @@
 	}
 }
 
-
-static void
-isdn_ppp_push_header(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
+void
+ippp_push_proto(struct ind_ppp *ind_ppp, struct sk_buff *skb, u16 proto)
 {
-	unsigned char *p;
-
-	if (skb_headroom(skb) < 4) {
+	if (skb_headroom(skb) < 2) {
 		isdn_BUG();
 		return;
 	}
-
-	if ((idev->pppcfg & SC_COMP_PROT) && proto <= 0xff)
+	if ((ind_ppp->pppcfg & SC_COMP_PROT) && proto <= 0xff)
 		put_u8(skb_push(skb, 1), proto);
 	else
 		put_u16(skb_push(skb, 2), proto);
 
-	if (idev->pppcfg & SC_COMP_AC)
+}
+
+static void
+ippp_push_ac(struct ind_ppp *ind_ppp, struct sk_buff *skb)
+{
+	unsigned char *p;
+
+	if (skb_headroom(skb) < 2) {
+		isdn_BUG();
+		return;
+	}
+	if (ind_ppp->pppcfg & SC_COMP_AC)
 		return;
 
 	p = skb_push(skb, 2);	
@@ -652,13 +627,13 @@
 static void
 isdn_ppp_unbind(isdn_net_dev *idev)
 {
-	struct ipppd *is = idev->ipppd;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct ipppd *is = ind_ppp->ipppd;
 	
 	if (!is) {
 		isdn_BUG();
 		return;
 	}
-
 	ipppd_debug(is, "");
 
 	if (is->state != IPPPD_ST_ASSIGNED)
@@ -667,12 +642,15 @@
 	is->state = IPPPD_ST_OPEN;
 
 	/* is->idev will be invalid shortly */
-	ippp_ccp_free(idev->ccp);
+	ippp_ccp_free(ind_ppp->ccp);
 
 	is->idev = NULL;
 	/* lose the reference we took on isdn_ppp_bind */
 	ipppd_put(is); 
-	idev->ipppd = NULL;
+	ind_ppp->ipppd = NULL;
+
+	kfree(ind_ppp);
+	idev->ind_priv = NULL;
 
 	return;
 }
@@ -683,15 +661,19 @@
 int
 isdn_ppp_bind(isdn_net_dev *idev)
 {
+	struct ind_ppp *ind_ppp;
 	int unit = 0;
 	unsigned long flags;
 	int retval = 0;
 	struct ipppd *ipppd;
 
-	if (idev->ipppd) {
+	if (idev->ind_priv) {
 		isdn_BUG();
-		return 0;
+		return -EIO;
 	}
+	ind_ppp = kmalloc(sizeof(struct ind_ppp), GFP_KERNEL);
+	if (!ind_ppp)
+		return -ENOMEM;
 
 	spin_lock_irqsave(&ipppds_lock, flags);
 	if (idev->pppbind < 0) {  /* device bound to ippp device ? */
@@ -743,39 +725,40 @@
 	ipppd->state = IPPPD_ST_ASSIGNED;
 	ipppd->idev = idev;
 	/* we hold a reference until isdn_ppp_unbind() */
-	idev->ipppd = ipppd_get(ipppd);
+	ipppd_get(ipppd);
 	spin_unlock_irqrestore(&ipppds_lock, flags);
 
-	idev->pppcfg = 0;         /* config flags */
-	/* seq no last seen, maybe set to bundle min, when joining? */
-	idev->pppseq = -1;
-
-	idev->ccp = ippp_ccp_alloc();
-	if (!idev->ccp) {
+	idev->ind_priv = ind_ppp;
+	ind_ppp->pppcfg = 0;         /* config flags */
+	ind_ppp->ipppd = ipppd;
+	ind_ppp->ccp = ippp_ccp_alloc();
+	if (!ind_ppp->ccp) {
 		retval = -ENOMEM;
 		goto out;
 	}
-	idev->ccp->proto       = PPP_COMPFRAG;
-	idev->ccp->priv        = idev;
-	idev->ccp->alloc_skb   = isdn_ppp_dev_alloc_skb;
-	idev->ccp->push_header = isdn_ppp_dev_push_header;
-	idev->ccp->xmit        = isdn_ppp_dev_xmit;
-	idev->ccp->kick_up     = isdn_ppp_dev_kick_up;
-
-#ifdef CONFIG_ISDN_MPP
-	retval = isdn_ppp_mp_init(lp, NULL);
-#endif /* CONFIG_ISDN_MPP */
- out:
-	if (retval) {
-		idev->ipppd->state = IPPPD_ST_OPEN;
-		ipppd_put(idev->ipppd);
-		idev->ipppd = NULL;
-	}
+	ind_ppp->ccp->proto       = PPP_COMPFRAG;
+	ind_ppp->ccp->priv        = idev;
+	ind_ppp->ccp->alloc_skb   = isdn_ppp_dev_alloc_skb;
+	ind_ppp->ccp->xmit        = isdn_ppp_dev_xmit;
+	ind_ppp->ccp->kick_up     = isdn_ppp_dev_kick_up;
 
+	retval = ippp_mp_bind(idev);
+	if (retval)
+		goto out;
+	
+	return 0;
+
+ out:
+	ipppd->state = IPPPD_ST_OPEN;
+	ipppd_put(ipppd);
+	ind_ppp->ipppd = NULL;
+	kfree(ind_ppp);
+	idev->ind_priv = NULL;
 	return retval;
 
  err:
 	spin_unlock_irqrestore(&ipppds_lock, flags);
+	kfree(ind_ppp);
 	return retval;
 }
 
@@ -787,7 +770,8 @@
 static void
 isdn_ppp_connected(isdn_net_dev *idev)
 {
-	struct ipppd *ipppd = idev->ipppd;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct ipppd *ipppd = ind_ppp->ipppd;
 
 	ipppd_debug(ipppd, "");
 
@@ -799,11 +783,12 @@
 static void
 isdn_ppp_disconnected(isdn_net_dev *idev)
 {
-	struct ipppd *ipppd = idev->ipppd;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct ipppd *ipppd = ind_ppp->ipppd;
 
 	ipppd_debug(ipppd, "");
 
-	if (idev->pppcfg & SC_ENABLE_IP)
+	if (ind_ppp->pppcfg & SC_ENABLE_IP)
 		isdn_net_offline(idev);
 
 	if (ipppd->state != IPPPD_ST_CONNECTED)
@@ -813,15 +798,7 @@
 	ipppd->flags |= IPPPD_FL_HUP;
 	wake_up(&ipppd->wq);
 
-#ifdef CONFIG_ISDN_MPP
-	spin_lock(&idev->pb->lock);
-	if (lp->netdev->pb->ref_ct == 1)	/* last link in queue? */
-		isdn_ppp_mp_cleanup(lp);
-
-	lp->netdev->pb->ref_ct--;
-	spin_unlock(&lp->netdev->pb->lock);
-#endif /* CONFIG_ISDN_MPP */
-
+	ippp_mp_disconnected(idev);
 }
 
 /*
@@ -831,50 +808,41 @@
 int
 isdn_ppp_init(void)
 {
-#ifdef CONFIG_ISDN_MPP
-	if( isdn_ppp_mp_bundle_array_init() < 0 )
-		return -ENOMEM;
-#endif /* CONFIG_ISDN_MPP */
-
 	return 0;
 }
 
 void
 isdn_ppp_cleanup(void)
 {
-#ifdef CONFIG_ISDN_MPP
-	if (isdn_ppp_bundle_arr)
-		kfree(isdn_ppp_bundle_arr);
-#endif /* CONFIG_ISDN_MPP */
-
 }
 
 /*
  * check for address/control field and skip if allowed
  * retval != 0 -> discard packet silently
  */
-static int isdn_ppp_skip_ac(isdn_net_dev *idev, struct sk_buff *skb) 
+static int
+isdn_ppp_skip_ac(struct ind_ppp *ind_ppp, struct sk_buff *skb) 
 {
 	u8 val;
 
 	if (skb->len < 1)
-		return -1;
+		return -EINVAL;
 
 	get_u8(skb->data, &val);
 	if (val != PPP_ALLSTATIONS) {
 		/* if AC compression was not negotiated, but no AC present,
 		   discard packet */
-		if (idev->pppcfg & SC_REJ_COMP_AC)
-			return -1;
+		if (ind_ppp->pppcfg & SC_REJ_COMP_AC)
+			return -EINVAL;
 
 		return 0;
 	}
 	if (skb->len < 2)
-		return -1;
+		return -EINVAL;
 
 	get_u8(skb->data + 1, &val);
 	if (val != PPP_UI)
-		return -1;
+		return -EINVAL;
 
 	/* skip address/control (AC) field */
 	skb_pull(skb, 2);
@@ -885,38 +853,38 @@
  * get the PPP protocol header and pull skb
  * retval < 0 -> discard packet silently
  */
-int isdn_ppp_strip_proto(struct sk_buff *skb) 
+int
+isdn_ppp_strip_proto(struct sk_buff *skb, u16 *proto) 
 {
-	u16 proto;
 	u8 val;
 
 	if (skb->len < 1)
-		return -1;
+		return -EINVAL;
 
 	get_u8(skb->data, &val);
 	if (val & 0x1) {
 		/* protocol field is compressed */
-		proto = val;
+		*proto = val;
 		skb_pull(skb, 1);
 	} else {
 		if (skb->len < 2)
 			return -1;
-		get_u16(skb->data, &proto);
+		get_u16(skb->data, proto);
 		skb_pull(skb, 2);
 	}
-	return proto;
+	return 0;
 }
 
 /*
  * handler for incoming packets on a syncPPP interface
  */
-static void isdn_ppp_receive(isdn_net_local *lp, isdn_net_dev *idev, 
-			     struct sk_buff *skb)
+static void
+isdn_ppp_receive(isdn_net_local *lp, isdn_net_dev *idev, struct sk_buff *skb)
 {
-	struct ipppd *is;
-	int proto;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct ipppd *is = ind_ppp->ipppd;
+	u16 proto;
 
-	is = idev->ipppd;
 	if (!is) 
 		goto err;
 
@@ -926,117 +894,64 @@
 		isdn_ppp_frame_log("receive", skb->data, skb->len, 32,is->unit,-1);
 	}
 
- 	if (isdn_ppp_skip_ac(idev, skb) < 0)
+ 	if (isdn_ppp_skip_ac(ind_ppp, skb) < 0)
 		goto err;
 
-  	proto = isdn_ppp_strip_proto(skb);
- 	if (proto < 0)
+  	if (isdn_ppp_strip_proto(skb, &proto))
 		goto err;
 
-	/* Don't reset huptimer on LCP packets. */
-	if (proto != PPP_LCP)
-		idev->huptimer = 0;
-  
-#ifdef CONFIG_ISDN_MPP
- 	if (is->compflags & SC_LINK_DECOMP_ON) {
- 		skb = isdn_ppp_decompress(skb, is, NULL, &proto);
- 		if (!skb) // decompression error
-			goto put;
- 	}
-	
- 	if (!(is->mpppcfg & SC_REJ_MP_PROT)) { // we agreed to receive MPPP
-  		if (proto == PPP_MP) {
-  			isdn_ppp_mp_receive(lp, idev, skb);
-			goto put;
- 		}
- 	} 
- 	isdn_ppp_push_higher(lp, idev, skb, proto);
- put:
-#else
- 	isdn_ppp_push_higher(lp, idev, skb, proto);
-#endif
+	ippp_mp_receive(idev, skb, proto);
 	return;
 
  err:
+	lp->stats.rx_dropped++;
 	kfree_skb(skb);
 }
 
 /*
- * we receive a reassembled frame, MPPP has been taken care of before.
  * address/control and protocol have been stripped from the skb
- * note: net_dev has to be master net_dev
  */
-static void
-isdn_ppp_push_higher(isdn_net_local *lp, isdn_net_dev *idev,
-		     struct sk_buff *skb, int proto)
+void
+ippp_receive(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
 {
-	struct net_device *dev = &lp->dev;
- 	struct ipppd *is = idev->ipppd;
+	isdn_net_local *lp = idev->mlp;
+	struct inl_ppp *inl_ppp = lp->inl_priv;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+ 	struct ipppd *is = ind_ppp->ipppd;
 
 	if (is->debug & 0x10) {
 		printk(KERN_DEBUG "push, skb %d %04x\n", (int) skb->len, proto);
-		isdn_ppp_frame_log("rpush", skb->data, skb->len, 32,is->unit, -1);
+		isdn_ppp_frame_log("rpush", skb->data, skb->len, 256, is->unit, -1);
 	}
-	skb = ippp_ccp_decompress(lp->ccp, skb, &proto);
-	if (!skb) // decompression error
-		goto out;
+	/* all packets need to be passed through the compressor */
+	skb = ippp_ccp_decompress(inl_ppp->ccp, skb, &proto);
+	if (!skb) /* decompression error */
+		goto error;
 
 	switch (proto) {
 		case PPP_IPX:  /* untested */
 			if (is->debug & 0x20)
 				printk(KERN_DEBUG "isdn_ppp: IPX\n");
-			skb->protocol = htons(ETH_P_IPX);
+			isdn_netif_rx(idev, skb, htons(ETH_P_IPX));
 			break;
 		case PPP_IP:
 			if (is->debug & 0x20)
 				printk(KERN_DEBUG "isdn_ppp: IP\n");
-			skb->protocol = htons(ETH_P_IP);
+			isdn_netif_rx(idev, skb, htons(ETH_P_IP));
 			break;
 		case PPP_COMP:
 		case PPP_COMPFRAG:
 			printk(KERN_INFO "isdn_ppp: unexpected compressed frame dropped\n");
 			goto drop;
-#ifdef CONFIG_ISDN_PPP_VJ
 		case PPP_VJC_UNCOMP:
-			if (is->debug & 0x20)
-				printk(KERN_DEBUG "isdn_ppp: VJC_UNCOMP\n");
-			if (slhc_remember(lp->slcomp, skb->data, skb->len) <= 0) {
-				printk(KERN_WARNING "isdn_ppp: received illegal VJC_UNCOMP frame!\n");
-				goto drop;
-			}
-			skb->protocol = htons(ETH_P_IP);
-			break;
 		case PPP_VJC_COMP:
-			if (is->debug & 0x20)
-				printk(KERN_DEBUG "isdn_ppp: VJC_COMP\n");
-			{
-				struct sk_buff *skb_old = skb;
-				int pkt_len;
-				skb = dev_alloc_skb(skb_old->len + 128);
-
-				if (!skb) {
-					printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name);
-					skb = skb_old;
-					goto drop;
-				}
-				skb_put(skb, skb_old->len + 128);
-				memcpy(skb->data, skb_old->data, skb_old->len);
-				pkt_len = slhc_uncompress(lp->slcomp,
-						skb->data, skb_old->len);
-				kfree_skb(skb_old);
-				if (pkt_len < 0)
-					goto drop;
-
-				skb_trim(skb, pkt_len);
-				skb->protocol = htons(ETH_P_IP);
-			}
+			ippp_vj_decompress(idev, skb, proto);
 			break;
-#endif
 		case PPP_CCPFRAG:
-			ippp_ccp_receive_ccp(idev->ccp, skb);
+			ippp_ccp_receive_ccp(ind_ppp->ccp, skb);
 			goto ccp;
 		case PPP_CCP:
-			ippp_ccp_receive_ccp(lp->ccp, skb);
+			ippp_ccp_receive_ccp(inl_ppp->ccp, skb);
 	ccp:
 			/* Dont pop up ResetReq/Ack stuff to the daemon any
 			   longer - the job is done already */
@@ -1049,20 +964,16 @@
 			ipppd_queue_read(is, proto, skb->data, skb->len);
 			goto free;
 	}
-
- 	/* Reset hangup-timer */
- 	idev->huptimer = 0;
-
-	skb->dev = dev;
-	netif_rx(skb);
-	/* net_dev->local->stats.rx_packets++; done in isdn_net.c */
- out:
 	return;
 
  drop:
 	lp->stats.rx_dropped++;
  free:
 	kfree_skb(skb);
+	return;
+
+ error:
+	lp->stats.rx_dropped++;
 }
 
 /*
@@ -1077,8 +988,10 @@
 isdn_ppp_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	isdn_net_local *mlp = ndev->priv;
+	struct inl_ppp *inl_ppp = mlp->inl_priv;
+	struct ind_ppp *ind_ppp;
 	isdn_net_dev *idev = list_entry(mlp->online.next, isdn_net_dev, online);
-	unsigned int proto = PPP_IP;     /* 0x21 */
+	u16 proto = PPP_IP;     /* 0x21 */
 	struct ipppd *ipppd;
 
 	ndev->trans_start = jiffies;
@@ -1094,10 +1007,9 @@
 			proto = PPP_IPX;	/* untested */
 			break;
 		default:
-			printk(KERN_ERR "isdn_ppp: skipped unsupported protocol: %#x.\n", 
+			printk(KERN_INFO "isdn_ppp: skipped unsupported protocol: %#x.\n", 
 			       skb->protocol);
-			dev_kfree_skb(skb);
-			goto out;
+			goto drop;
 	}
 
 	idev = isdn_net_get_xmit_dev(mlp);
@@ -1105,126 +1017,33 @@
 		printk(KERN_INFO "%s: IP frame delayed.\n", ndev->name);
 		goto stop;
 	}
-	if (!(idev->pppcfg & SC_ENABLE_IP)) {	/* PPP connected ? */
+	ind_ppp = idev->ind_priv;
+	if (!(ind_ppp->pppcfg & SC_ENABLE_IP)) {	/* PPP connected ? */
 		isdn_BUG();
 		goto stop;
 	}
-	ipppd = idev->ipppd;
+	ipppd = ind_ppp->ipppd;
 	idev->huptimer = 0;
 
-	/*
-	 * after this line .. requeueing in the device queue is no longer allowed!!!
-	 */
-
-	if (ipppd->debug & 0x4)
-		printk(KERN_DEBUG "xmit skb, len %d\n", (int) skb->len);
         if (ipppd->debug & 0x40)
-                isdn_ppp_frame_log("xmit0", skb->data, skb->len, 32, ipppd->unit, -1);
-
-#ifdef CONFIG_ISDN_PPP_VJ
-	if (proto == PPP_IP && idev->pppcfg & SC_COMP_TCP) {	/* ipts here? probably yes, but check this again */
-		struct sk_buff *new_skb;
-	        unsigned short hl;
-		/*
-		 * we need to reserve enought space in front of
-		 * sk_buff. old call to dev_alloc_skb only reserved
-		 * 16 bytes, now we are looking what the driver want.
-		 */
-		hl = isdn_slot_hdrlen(idev->isdn_slot) + IPPP_MAX_HEADER;;
-		/* 
-		 * Note: hl might still be insufficient because the method
-		 * above does not account for a possibible MPPP slave channel
-		 * which had larger HL header space requirements than the
-		 * master.
-		 */
-		new_skb = alloc_skb(hl+skb->len, GFP_ATOMIC);
-		if (new_skb) {
-			u_char *buf;
-			int pktlen;
-
-			skb_reserve(new_skb, hl);
-			new_skb->dev = skb->dev;
-			skb_put(new_skb, skb->len);
-			buf = skb->data;
-
-			pktlen = slhc_compress(mlp->slcomp, skb->data, skb->len, new_skb->data,
-				 &buf, !(idev->pppcfg & SC_NO_TCP_CCID));
-
-			if (buf != skb->data) {	
-				if (new_skb->data != buf)
-					printk(KERN_ERR "isdn_ppp: FATAL error after slhc_compress!!\n");
-				dev_kfree_skb(skb);
-				skb = new_skb;
-			} else {
-				dev_kfree_skb(new_skb);
-			}
-
-			skb_trim(skb, pktlen);
-			if (skb->data[0] & SL_TYPE_COMPRESSED_TCP) {	/* cslip? style -> PPP */
-				proto = PPP_VJC_COMP;
-				skb->data[0] ^= SL_TYPE_COMPRESSED_TCP;
-			} else {
-				if (skb->data[0] >= SL_TYPE_UNCOMPRESSED_TCP)
-					proto = PPP_VJC_UNCOMP;
-				skb->data[0] = (skb->data[0] & 0x0f) | 0x40;
-			}
-		}
-	}
-#endif
-
-	/*
-	 * normal (single link) or bundle compression
-	 */
-	skb = ippp_ccp_compress(mlp->ccp, skb, &proto);
-
-	if (ipppd->debug & 0x24)
-		printk(KERN_DEBUG "xmit2 skb, len %d, proto %04x\n", (int) skb->len, proto);
+                isdn_ppp_frame_log("xmit0", skb->data, skb->len, 256, ipppd->unit, -1);
 
-#ifdef CONFIG_ISDN_MPP
-	if (ipt->mpppcfg & SC_MP_PROT) {
-		/* we get mp_seqno from static isdn_net_local */
-		long mp_seqno = ipts->mp_seqno;
-		ipts->mp_seqno++;
-		if (ipt->mpppcfg & SC_OUT_SHORT_SEQ) {
-			unsigned char *data = isdn_ppp_skb_push(&skb, 3);
-			if(!data)
-				goto unlock;
-			mp_seqno &= 0xfff;
-			data[0] = MP_BEGIN_FRAG | MP_END_FRAG | ((mp_seqno >> 8) & 0xf);	/* (B)egin & (E)ndbit .. */
-			data[1] = mp_seqno & 0xff;
-			data[2] = proto;	/* PID compression */
-		} else {
-			unsigned char *data = isdn_ppp_skb_push(&skb, 5);
-			if(!data)
-				goto unlock;
-			data[0] = MP_BEGIN_FRAG | MP_END_FRAG;	/* (B)egin & (E)ndbit .. */
-			data[1] = (mp_seqno >> 16) & 0xff;	/* sequence number: 24bit */
-			data[2] = (mp_seqno >> 8) & 0xff;
-			data[3] = (mp_seqno >> 0) & 0xff;
-			data[4] = proto;	/* PID compression */
-		}
-		proto = PPP_MP; /* MP Protocol, 0x003d */
-	}
-#endif
+	/* after this line,requeueing is no longer allowed! */
+	skb = ippp_vj_compress(idev, skb, &proto);
 
-#if 0
-	/*
-	 * 'link in bundle' compression  ...
-	 */
-	if (ipt->compflags & SC_LINK_COMP_ON)
-		skb = isdn_ppp_compress(skb,&proto,ipt,ipts,1);
-#endif
+	/* normal (single link) or bundle compression */
+	skb = ippp_ccp_compress(inl_ppp->ccp, skb, &proto);
 
-	isdn_ppp_push_header(idev, skb, proto);
+	if (ipppd->debug & 0x40)
+                isdn_ppp_frame_log("xmit1", skb->data, skb->len, 32, ipppd->unit, -1);
 
-	if (ipppd->debug & 0x40) {
-		printk(KERN_DEBUG "skb xmit: len: %d\n", (int) skb->len);
-		isdn_ppp_frame_log("xmit", skb->data, skb->len, 32, ipppd->unit, -1);
-	}
-	
-	isdn_net_writebuf_skb(idev, skb);
+	ippp_push_proto(ind_ppp, skb, proto);
+	ippp_mp_xmit(idev, skb, proto);
+	return 0;
 
- out:
+ drop:
+	kfree_skb(skb);
+	mlp->stats.tx_dropped++;
 	return 0;
 
  stop:
@@ -1232,483 +1051,21 @@
 	return 1;
 }
 
-#ifdef CONFIG_ISDN_MPP
-
-/* this is _not_ rfc1990 header, but something we convert both short and long
- * headers to for convinience's sake:
- * 	byte 0 is flags as in rfc1990
- *	bytes 1...4 is 24-bit seqence number converted to host byte order 
- */
-#define MP_HEADER_LEN	5
-
-#define MP_LONGSEQ_MASK		0x00ffffff
-#define MP_SHORTSEQ_MASK	0x00000fff
-#define MP_LONGSEQ_MAX		MP_LONGSEQ_MASK
-#define MP_SHORTSEQ_MAX		MP_SHORTSEQ_MASK
-#define MP_LONGSEQ_MAXBIT	((MP_LONGSEQ_MASK+1)>>1)
-#define MP_SHORTSEQ_MAXBIT	((MP_SHORTSEQ_MASK+1)>>1)
-
-/* sequence-wrap safe comparisions (for long sequence)*/ 
-#define MP_LT(a,b)	((a-b)&MP_LONGSEQ_MAXBIT)
-#define MP_LE(a,b) 	!((b-a)&MP_LONGSEQ_MAXBIT)
-#define MP_GT(a,b) 	((b-a)&MP_LONGSEQ_MAXBIT)
-#define MP_GE(a,b)	!((a-b)&MP_LONGSEQ_MAXBIT)
-
-#define MP_SEQ(f)	((*(u32*)(f->data+1)))
-#define MP_FLAGS(f)	(f->data[0])
-
-static int isdn_ppp_mp_bundle_array_init(void)
-{
-	int i;
-	int sz = ISDN_MAX_CHANNELS*sizeof(ippp_bundle);
-	if( (isdn_ppp_bundle_arr = (ippp_bundle*)kmalloc(sz, 
-							GFP_KERNEL)) == NULL )
-		return -ENOMEM;
-	memset(isdn_ppp_bundle_arr, 0, sz);
-	for( i = 0; i < ISDN_MAX_CHANNELS; i++ )
-		spin_lock_init(&isdn_ppp_bundle_arr[i].lock);
-	return 0;
-}
-
-static ippp_bundle * isdn_ppp_mp_bundle_alloc(void)
-{
-	int i;
-	for( i = 0; i < ISDN_MAX_CHANNELS; i++ )
-		if (isdn_ppp_bundle_arr[i].ref_ct <= 0)
-			return (isdn_ppp_bundle_arr + i);
-	return NULL;
-}
-
-static int isdn_ppp_mp_init( isdn_net_local * lp, ippp_bundle * add_to )
+void
+ippp_xmit(isdn_net_dev *idev, struct sk_buff *skb)
 {
-	isdn_net_dev *idev = lp->netdev;
-	struct ipppd * is;
-
-	if (idev->ppp_slot < 0) {
-		printk(KERN_ERR "%s: >ppp_slot(%d) out of range\n",
-		       __FUNCTION__ , idev->ppp_slot);
-		return -EINVAL;
-	}
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct ipppd *ipppd = ind_ppp->ipppd;
 
-	is = ippp_table[idev->ppp_slot];
-	if (add_to) {
-		if( lp->netdev->pb )
-			lp->netdev->pb->ref_ct--;
-		lp->netdev->pb = add_to;
-	} else {		/* first link in a bundle */
-		is->mp_seqno = 0;
-		if ((lp->netdev->pb = isdn_ppp_mp_bundle_alloc()) == NULL)
-			return -ENOMEM;
-
-		lp->netdev->pb->frags = NULL;
-		lp->netdev->pb->frames = 0;
-		lp->netdev->pb->seq = LONG_MAX;
-	}
-	lp->netdev->pb->ref_ct++;
-	
-	is->pppseq = 0;
-	return 0;
-}
-
-static u32 isdn_ppp_mp_get_seq( int short_seq, 
-					struct sk_buff * skb, u32 last_seq );
-static struct sk_buff * isdn_ppp_mp_discard( ippp_bundle * mp,
-			struct sk_buff * from, struct sk_buff * to );
-static void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp,
-				struct sk_buff * from, struct sk_buff * to );
-static void isdn_ppp_mp_free_skb( ippp_bundle * mp, struct sk_buff * skb );
-static void isdn_ppp_mp_print_recv_pkt( int slot, struct sk_buff * skb );
-
-static void isdn_ppp_mp_receive(isdn_net_local *lp, isdn_net_dev *dev, 
-				struct sk_buff *skb)
-{
-	isdn_net_dev *idev = lp->netdev;
-	struct ipppd *is;
-	isdn_net_dev *qdev;
-	ippp_bundle * mp;
-	isdn_mppp_stats * stats;
-	struct sk_buff * newfrag, * frag, * start, *nextf;
-	u32 newseq, minseq, thisseq;
-	unsigned long flags;
-	int slot;
+	ippp_push_ac(ind_ppp, skb);
 
-	spin_lock_irqsave(&lp->netdev->pb->lock, flags);
-    	mp = lp->netdev->pb;
-        stats = &mp->stats;
-	slot = idev->ppp_slot;
-	if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
-		printk(KERN_ERR "%s: ppp_slot(%d)\n",
-		       __FUNCTION__, slot);
-		stats->frame_drops++;
-		dev_kfree_skb(skb);
-		spin_unlock_irqrestore(&mp->lock, flags);
-		return;
-	}
-	is = ippp_table[slot];
-    	if( ++mp->frames > stats->max_queue_len )
-		stats->max_queue_len = mp->frames;
-	
-	if (is->debug & 0x8)
-		isdn_ppp_mp_print_recv_pkt(slot, skb);
-
-	newseq = isdn_ppp_mp_get_seq(is->mpppcfg & SC_IN_SHORT_SEQ, 
-						skb, is->pppseq);
-
-
-	/* if this packet seq # is less than last already processed one,
-	 * toss it right away, but check for sequence start case first 
-	 */
-	if( mp->seq > MP_LONGSEQ_MAX && (newseq & MP_LONGSEQ_MAXBIT) ) {
-		mp->seq = newseq;	/* the first packet: required for
-					 * rfc1990 non-compliant clients --
-					 * prevents constant packet toss */
-	} else if( MP_LT(newseq, mp->seq) ) {
-		stats->frame_drops++;
-		isdn_ppp_mp_free_skb(mp, skb);
-		spin_unlock_irqrestore(&mp->lock, flags);
-		return;
-	}
-	
-	/* find the minimum received sequence number over all links */
-	is->pppseq = minseq = newseq;
-	list_for_each_entry(qdev, &lp->online, online) {
-		slot = qdev->ppp_slot;
-		if (slot < 0 || slot > ISDN_MAX_CHANNELS) {
-			printk(KERN_ERR "%s: lpq->ppp_slot(%d)\n",
-			       __FUNCTION__ ,slot);
-		} else {
-			u32 lls = ippp_table[slot]->pppseq;
-			if (MP_LT(lls, minseq))
-				minseq = lls;
-		}
-	}
-	if (MP_LT(minseq, mp->seq))
-		minseq = mp->seq;	/* can't go beyond already processed
-					 * packets */
-	newfrag = skb;
-
-  	/* if this new fragment is before the first one, then enqueue it now. */
-  	if ((frag = mp->frags) == NULL || MP_LT(newseq, MP_SEQ(frag))) {
-		newfrag->next = frag;
-    		mp->frags = frag = newfrag;
-    		newfrag = NULL;
-  	}
-
-  	start = MP_FLAGS(frag) & MP_BEGIN_FRAG &&
-				MP_SEQ(frag) == mp->seq ? frag : NULL;
-
-	/* 
-	 * main fragment traversing loop
-	 *
-	 * try to accomplish several tasks:
-	 * - insert new fragment into the proper sequence slot (once that's done
-	 *   newfrag will be set to NULL)
-	 * - reassemble any complete fragment sequence (non-null 'start'
-	 *   indicates there is a continguous sequence present)
-	 * - discard any incomplete sequences that are below minseq -- due
-	 *   to the fact that sender always increment sequence number, if there
-	 *   is an incomplete sequence below minseq, no new fragments would
-	 *   come to complete such sequence and it should be discarded
-	 *
-	 * loop completes when we accomplished the following tasks:
-	 * - new fragment is inserted in the proper sequence ('newfrag' is 
-	 *   set to NULL)
-	 * - we hit a gap in the sequence, so no reassembly/processing is 
-	 *   possible ('start' would be set to NULL)
-	 *
-	 * algorightm for this code is derived from code in the book
-	 * 'PPP Design And Debugging' by James Carlson (Addison-Wesley)
-	 */
-  	while (start != NULL || newfrag != NULL) {
-
-    		thisseq = MP_SEQ(frag);
-    		nextf = frag->next;
-
-    		/* drop any duplicate fragments */
-    		if (newfrag != NULL && thisseq == newseq) {
-      			isdn_ppp_mp_free_skb(mp, newfrag);
-      			newfrag = NULL;
-    		}
-
-    		/* insert new fragment before next element if possible. */
-    		if (newfrag != NULL && (nextf == NULL || 
-						MP_LT(newseq, MP_SEQ(nextf)))) {
-      			newfrag->next = nextf;
-      			frag->next = nextf = newfrag;
-      			newfrag = NULL;
-    		}
-
-    		if (start != NULL) {
-	    		/* check for misplaced start */
-      			if (start != frag && (MP_FLAGS(frag) & MP_BEGIN_FRAG)) {
-				printk(KERN_WARNING"isdn_mppp(seq %d): new "
-				      "BEGIN flag with no prior END", thisseq);
-				stats->seqerrs++;
-				stats->frame_drops++;
-				start = isdn_ppp_mp_discard(mp, start,frag);
-				nextf = frag->next;
-      			}
-    		} else if (MP_LE(thisseq, minseq)) {		
-      			if (MP_FLAGS(frag) & MP_BEGIN_FRAG)
-				start = frag;
-      			else {
-				if (MP_FLAGS(frag) & MP_END_FRAG)
-	  				stats->frame_drops++;
-				if( mp->frags == frag )
-					mp->frags = nextf;	
-				isdn_ppp_mp_free_skb(mp, frag);
-				frag = nextf;
-				continue;
-      			}
-		}
-		
-		/* if start is non-null and we have end fragment, then
-		 * we have full reassembly sequence -- reassemble 
-		 * and process packet now
-		 */
-    		if (start != NULL && (MP_FLAGS(frag) & MP_END_FRAG)) {
-      			minseq = mp->seq = (thisseq+1) & MP_LONGSEQ_MASK;
-      			/* Reassemble the packet then dispatch it */
-			isdn_ppp_mp_reassembly(lp->netdev, lp, start, nextf);
-      
-      			start = NULL;
-      			frag = NULL;
-
-      			mp->frags = nextf;
-    		}
-
-		/* check if need to update start pointer: if we just
-		 * reassembled the packet and sequence is contiguous
-		 * then next fragment should be the start of new reassembly
-		 * if sequence is contiguous, but we haven't reassembled yet,
-		 * keep going.
-		 * if sequence is not contiguous, either clear everyting
-		 * below low watermark and set start to the next frag or
-		 * clear start ptr.
-		 */ 
-    		if (nextf != NULL && 
-		    ((thisseq+1) & MP_LONGSEQ_MASK) == MP_SEQ(nextf)) {
-      			/* if we just reassembled and the next one is here, 
-			 * then start another reassembly. */
-
-      			if (frag == NULL) {
-				if (MP_FLAGS(nextf) & MP_BEGIN_FRAG)
-	  				start = nextf;
-				else
-				{
-	  				printk(KERN_WARNING"isdn_mppp(seq %d):"
-						" END flag with no following "
-						"BEGIN", thisseq);
-					stats->seqerrs++;
-				}
-			}
-
-    		} else {
-			if ( nextf != NULL && frag != NULL &&
-						MP_LT(thisseq, minseq)) {
-				/* we've got a break in the sequence
-				 * and we not at the end yet
-				 * and we did not just reassembled
-				 *(if we did, there wouldn't be anything before)
-				 * and we below the low watermark 
-			 	 * discard all the frames below low watermark 
-				 * and start over */
-				stats->frame_drops++;
-				mp->frags = isdn_ppp_mp_discard(mp,start,nextf);
-			}
-			/* break in the sequence, no reassembly */
-      			start = NULL;
-    		}
-	  			
-    		frag = nextf;
-  	}	/* while -- main loop */
-	
-  	if (mp->frags == NULL)
-    		mp->frags = frag;
-		
-	/* rather straighforward way to deal with (not very) possible 
-	 * queue overflow */
-	if (mp->frames > MP_MAX_QUEUE_LEN) {
-		stats->overflows++;
-		while (mp->frames > MP_MAX_QUEUE_LEN) {
-			frag = mp->frags->next;
-			isdn_ppp_mp_free_skb(mp, mp->frags);
-			mp->frags = frag;
-		}
-	}
-	spin_unlock_irqrestore(&mp->lock, flags);
-}
-
-static void isdn_ppp_mp_cleanup( isdn_net_local * lp )
-{
-	struct sk_buff * frag = lp->netdev->pb->frags;
-	struct sk_buff * nextfrag;
-    	while( frag ) {
-		nextfrag = frag->next;
-		isdn_ppp_mp_free_skb(lp->netdev->pb, frag);
-		frag = nextfrag;
-	}
-	lp->netdev->pb->frags = NULL;
-}
-
-static u32 isdn_ppp_mp_get_seq( int short_seq, 
-					struct sk_buff * skb, u32 last_seq )
-{
-	u32 seq;
-	int flags = skb->data[0] & (MP_BEGIN_FRAG | MP_END_FRAG);
-   
-   	if( !short_seq )
-	{
-		seq = ntohl(*(u32*)skb->data) & MP_LONGSEQ_MASK;
-		skb_push(skb,1);
+	if (ipppd->debug & 0x40) {
+		isdn_ppp_frame_log("xmit3", skb->data, skb->len, 32, ipppd->unit, -1);
 	}
-	else
-	{
-		/* convert 12-bit short seq number to 24-bit long one 
-	 	*/
-		seq = ntohs(*(u16*)skb->data) & MP_SHORTSEQ_MASK;
 	
-		/* check for seqence wrap */
-		if( !(seq &  MP_SHORTSEQ_MAXBIT) && 
-		     (last_seq &  MP_SHORTSEQ_MAXBIT) && 
-		     (unsigned long)last_seq <= MP_LONGSEQ_MAX )
-			seq |= (last_seq + MP_SHORTSEQ_MAX+1) & 
-					(~MP_SHORTSEQ_MASK & MP_LONGSEQ_MASK);
-		else
-			seq |= last_seq & (~MP_SHORTSEQ_MASK & MP_LONGSEQ_MASK);
-		
-		skb_push(skb, 3);	/* put converted seqence back in skb */
-	}
-	*(u32*)(skb->data+1) = seq; 	/* put seqence back in _host_ byte
-					 * order */
-	skb->data[0] = flags;	        /* restore flags */
-	return seq;
-}
-
-struct sk_buff * isdn_ppp_mp_discard( ippp_bundle * mp,
-			struct sk_buff * from, struct sk_buff * to )
-{
-	if( from )
-		while (from != to) {
-	  		struct sk_buff * next = from->next;
-			isdn_ppp_mp_free_skb(mp, from);
-	  		from = next;
-		}
-	return from;
-}
-
-void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp,
-				struct sk_buff * from, struct sk_buff * to )
-{
-	isdn_net_dev *idev = lp->netdev;
-	ippp_bundle * mp = net_dev->pb;
-	int proto;
-	struct sk_buff * skb;
-	unsigned int tot_len;
-
-	if (idev->ppp_slot < 0 || idev->ppp_slot > ISDN_MAX_CHANNELS) {
-		printk(KERN_ERR "%s: ppp_slot(%d) out of range\n",
-		       __FUNCTION__ , idev->ppp_slot);
-		return;
-	}
-	if( MP_FLAGS(from) == (MP_BEGIN_FRAG | MP_END_FRAG) ) {
-		if( ippp_table[idev->ppp_slot]->debug & 0x40 )
-			printk(KERN_DEBUG "isdn_mppp: reassembly: frame %d, "
-					"len %d\n", MP_SEQ(from), from->len );
-		skb = from;
-		skb_pull(skb, MP_HEADER_LEN);
-		mp->frames--;	
-	} else {
-		struct sk_buff * frag;
-		int n;
-
-		for(tot_len=n=0, frag=from; frag != to; frag=frag->next, n++)
-			tot_len += frag->len - MP_HEADER_LEN;
-
-		if( ippp_table[idev->ppp_slot]->debug & 0x40 )
-			printk(KERN_DEBUG"isdn_mppp: reassembling frames %d "
-				"to %d, len %d\n", MP_SEQ(from), 
-				(MP_SEQ(from)+n-1) & MP_LONGSEQ_MASK, tot_len );
-		if( (skb = dev_alloc_skb(tot_len)) == NULL ) {
-			printk(KERN_ERR "isdn_mppp: cannot allocate sk buff "
-					"of size %d\n", tot_len);
-			isdn_ppp_mp_discard(mp, from, to);
-			return;
-		}
-
-		while( from != to ) {
-			unsigned int len = from->len - MP_HEADER_LEN;
-
-			memcpy(skb_put(skb,len), from->data+MP_HEADER_LEN, len);
-			frag = from->next;
-			isdn_ppp_mp_free_skb(mp, from);
-			from = frag; 
-		}
-	}
-   	proto = isdn_ppp_strip_proto(skb);
-	isdn_ppp_push_higher(lp, idev, skb, proto);
-}
-
-static void isdn_ppp_mp_free_skb(ippp_bundle * mp, struct sk_buff * skb)
-{
-	dev_kfree_skb(skb);
-	mp->frames--;
-}
-
-static void isdn_ppp_mp_print_recv_pkt( int slot, struct sk_buff * skb )
-{
-	printk(KERN_DEBUG "mp_recv: %d/%d -> %02x %02x %02x %02x %02x %02x\n", 
-		slot, (int) skb->len, 
-		(int) skb->data[0], (int) skb->data[1], (int) skb->data[2],
-		(int) skb->data[3], (int) skb->data[4], (int) skb->data[5]);
+	isdn_net_writebuf_skb(idev, skb);
 }
 
-static int
-isdn_ppp_bundle(struct ipppd *is, int unit)
-{
-	char ifn[IFNAMSIZ + 1];
-	isdn_net_dev *p;
-	isdn_net_dev *idev, *nidev;
-	int rc;
-	unsigned long flags;
-
-	sprintf(ifn, "ippp%d", unit);
-	p = isdn_net_findif(ifn);
-	if (!p) {
-		printk(KERN_ERR "ippp_bundle: cannot find %s\n", ifn);
-		return -EINVAL;
-	}
-
-    	spin_lock_irqsave(&p->pb->lock, flags);
-
-	nidev = is->idev;
-	idev = list_entry(p->mlp->online.next, isdn_net_dev, online);
-	if( nidev->ppp_slot < 0 || nidev->ppp_slot >= ISDN_MAX_CHANNELS ||
-	    idev ->ppp_slot < 0 || idev ->ppp_slot >= ISDN_MAX_CHANNELS ) {
-		printk(KERN_ERR "ippp_bundle: binding to invalid slot %d\n",
-			nidev->ppp_slot < 0 || nidev->ppp_slot >= ISDN_MAX_CHANNELS ? 
-			nidev->ppp_slot : idev->ppp_slot );
-		rc = -EINVAL;
-		goto out;
- 	}
-
-	isdn_net_add_to_bundle(p->mlp, nidev);
-
-	ippp_table[nidev->ppp_slot]->unit = ippp_table[idev->ppp_slot]->unit;
-
-	/* maybe also SC_CCP stuff */
-	ippp_table[nidev->ppp_slot]->pppcfg |= ippp_table[idev->ppp_slot]->pppcfg &
-		(SC_ENABLE_IP | SC_NO_TCP_CCID | SC_REJ_COMP_TCP);
-	ippp_table[nidev->ppp_slot]->mpppcfg |= ippp_table[idev->ppp_slot]->mpppcfg &
-		(SC_MP_PROT | SC_REJ_MP_PROT | SC_OUT_SHORT_SEQ | SC_IN_SHORT_SEQ);
-	rc = isdn_ppp_mp_init(nidev->mlp, p->pb);
-out:
-	spin_unlock_irqrestore(&p->pb->lock, flags);
-	return rc;
-}
-  
-#endif /* CONFIG_ISDN_MPP */
-  
 /*
  * network device ioctl handlers
  */
@@ -1718,6 +1075,7 @@
 {
 	struct ppp_stats *res, t;
 	isdn_net_local *lp = (isdn_net_local *) dev->priv;
+	struct inl_ppp *inl_ppp = lp->inl_priv;
 	struct slcompress *slcomp;
 	int err;
 
@@ -1738,7 +1096,7 @@
 		t.p.ppp_obytes = lp->stats.tx_bytes;
 		t.p.ppp_oerrors = lp->stats.tx_errors;
 #ifdef CONFIG_ISDN_PPP_VJ
-		slcomp = lp->slcomp;
+		slcomp = inl_ppp->slcomp;
 		if (slcomp) {
 			t.vj.vjs_packets = slcomp->sls_o_compressed + slcomp->sls_o_uncompressed;
 			t.vj.vjs_compressed = slcomp->sls_o_compressed;
@@ -1810,61 +1168,6 @@
 	return unit;
 }
 
-
-int
-isdn_ppp_dial_slave(char *name)
-{
-#ifdef CONFIG_ISDN_MPP
-	isdn_net_dev *idev;
-	isdn_net_dev *sdev;
-
-	idev = isdn_net_findif(name);
-	if (!idev)
-		return 1;
-
-	if (!isdn_net_bound(idev))
-		return 5;
-
-	sdev = idev->slave;
-	while (sdev) {
-		if (!isdn_net_bound(sdev))
-			break;
-		sdev = sdev->slave;
-	}
-	if (!sdev)
-		return 2;
-
-	isdn_net_dial_req(sdev);
-	return 0;
-#else
-	return -1;
-#endif
-}
-
-int
-isdn_ppp_hangup_slave(char *name)
-{
-#ifdef CONFIG_ISDN_MPP
-	isdn_net_dev *idev, *sdev;
-
-	idev = isdn_net_findif(name);
-	if (!idev)
-		return 1;
-
-	if (!isdn_net_bound(idev))
-		return 5;
-
-	sdev = idev->slave;
-	if (!sdev || !isdn_net_bound(sdev))
-		return 2;
-
-	isdn_net_hangup(sdev);
-	return 0;
-#else
-	return -1;
-#endif
-}
-
 /*
  * PPP compression stuff
  */
@@ -1876,21 +1179,24 @@
 static void isdn_ppp_dev_kick_up(void *priv)
 {
 	isdn_net_dev *idev = priv;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
 
-	ipppd_queue_read(idev->ipppd, PPP_COMPFRAG, NULL, 0);
+	ipppd_queue_read(ind_ppp->ipppd, PPP_COMPFRAG, NULL, 0);
 }
 
 static void isdn_ppp_lp_kick_up(void *priv)
 {
 	isdn_net_local *lp = priv;
 	isdn_net_dev *idev;
+	struct ind_ppp *ind_ppp;
 
 	if (list_empty(&lp->online)) {
 		isdn_BUG();
 		return;
 	}
 	idev = list_entry(lp->online.next, isdn_net_dev, online);
-	ipppd_queue_read(idev->ipppd, PPP_COMP, NULL, 0);
+	ind_ppp = idev->ind_priv;
+	ipppd_queue_read(ind_ppp->ipppd, PPP_COMP, NULL, 0);
 }
 
 /* Send a CCP Reset-Request or Reset-Ack directly from the kernel. */
@@ -1909,7 +1215,7 @@
 	return skb;
 }
 
-static struct sk_buff *
+struct sk_buff *
 isdn_ppp_dev_alloc_skb(void *priv, int len, int gfp_mask)
 {
 	isdn_net_dev *idev = priv;
@@ -1932,46 +1238,31 @@
 }
 
 static void
-isdn_ppp_dev_push_header(void *priv, struct sk_buff *skb, u16 proto)
-{
-	isdn_net_dev *idev = priv;
-
-	isdn_ppp_push_header(idev, skb, proto);
-}
-
-static void
-isdn_ppp_lp_push_header(void *priv, struct sk_buff *skb, u16 proto)
-{
-	isdn_net_local *lp = priv;
-	isdn_net_dev *idev;
-
-	if (list_empty(&lp->online)) {
-		isdn_BUG();
-		return;
-	}
-	idev = list_entry(lp->online.next, isdn_net_dev, online);
-	isdn_ppp_push_header(idev, skb, proto);
-}
-
-static void
-isdn_ppp_dev_xmit(void *priv, struct sk_buff *skb)
+isdn_ppp_dev_xmit(void *priv, struct sk_buff *skb, u16 proto)
 {
 	isdn_net_dev *idev = priv;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
 
+	ippp_push_proto(ind_ppp, skb, proto);
+	ippp_push_ac(ind_ppp, skb);
 	isdn_net_write_super(idev, skb);
 }
 
 static void
-isdn_ppp_lp_xmit(void *priv, struct sk_buff *skb)
+isdn_ppp_lp_xmit(void *priv, struct sk_buff *skb, u16 proto)
 {
 	isdn_net_local *lp = priv;
 	isdn_net_dev *idev;
+	struct ind_ppp *ind_ppp;
 
 	if (list_empty(&lp->online)) {
 		isdn_BUG();
 		return;
 	}
 	idev = list_entry(lp->online.next, isdn_net_dev, online);
+	ind_ppp = idev->ind_priv;
+	ippp_push_proto(ind_ppp, skb, proto);
+	ippp_push_ac(ind_ppp, skb);
 	isdn_net_write_super(idev, skb);
 }
 
@@ -1979,13 +1270,15 @@
 isdn_ppp_set_compressor(isdn_net_dev *idev, struct isdn_ppp_comp_data *data)
 {
 	struct ippp_ccp *ccp;
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
 
 	if (data->flags & IPPP_COMP_FLAG_LINK)
-		ccp = idev->ccp;
+		ccp = ind_ppp->ccp;
 	else
-		ccp = idev->mlp->ccp;
+		ccp = inl_ppp->ccp;
 
-	return ippp_ccp_set_compressor(ccp, idev->ipppd->unit, data);
+	return ippp_ccp_set_compressor(ccp, ind_ppp->ipppd->unit, data);
 }
 
 // ISDN_NET_ENCAP_SYNCPPP
@@ -1994,34 +1287,48 @@
 static int
 isdn_ppp_open(isdn_net_local *lp)
 {
-	lp->mpppcfg = 0;        /* mppp configuration */
-	lp->mp_seqno = 0;       /* MP sequence number */
+	struct inl_ppp *inl_ppp;
 
-#ifdef CONFIG_ISDN_PPP_VJ
-	lp->slcomp = slhc_init(16, 16);
-#endif
-	lp->ccp = ippp_ccp_alloc();
-	if (!lp->ccp)
+	inl_ppp = kmalloc(sizeof(*inl_ppp), GFP_KERNEL);
+	if (!inl_ppp)
 		return -ENOMEM;
-	lp->ccp->proto       = PPP_COMP;
-	lp->ccp->priv        = lp;
-	lp->ccp->alloc_skb   = isdn_ppp_lp_alloc_skb;
-	lp->ccp->push_header = isdn_ppp_lp_push_header;
-	lp->ccp->xmit        = isdn_ppp_lp_xmit;
-	lp->ccp->kick_up     = isdn_ppp_lp_kick_up;
 
+	lp->inl_priv = inl_ppp;
+
+	inl_ppp->slcomp = ippp_vj_alloc();
+	if (!inl_ppp->slcomp)
+		goto err;
+
+	inl_ppp->ccp = ippp_ccp_alloc();
+	if (!inl_ppp->ccp)
+		goto err_vj;
+
+	inl_ppp->ccp->proto       = PPP_COMP;
+	inl_ppp->ccp->priv        = lp;
+	inl_ppp->ccp->alloc_skb   = isdn_ppp_lp_alloc_skb;
+	inl_ppp->ccp->xmit        = isdn_ppp_lp_xmit;
+	inl_ppp->ccp->kick_up     = isdn_ppp_lp_kick_up;
+	
 	return 0;
+
+ err_vj:
+	ippp_vj_free(inl_ppp->slcomp);
+ err:
+	kfree(inl_ppp);
+	lp->inl_priv = NULL;
+	return -ENOMEM;
 }
 
 static void
 isdn_ppp_close(isdn_net_local *lp)
 {
-#ifdef CONFIG_ISDN_PPP_VJ
-	slhc_free(lp->slcomp);
-	lp->slcomp = NULL;
-#endif
-	ippp_ccp_free(lp->ccp);
-	lp->ccp = NULL;
+	struct inl_ppp *inl_ppp = lp->inl_priv;
+	
+	ippp_ccp_free(inl_ppp->ccp);
+	ippp_vj_free(inl_ppp->slcomp);
+
+	kfree(inl_ppp);
+	lp->inl_priv = NULL;
 }
 
 struct isdn_netif_ops isdn_ppp_ops = {
@@ -2037,3 +1344,4 @@
 	.open                = isdn_ppp_open,
 	.close               = isdn_ppp_close,
 };
+
diff -Nru a/drivers/isdn/i4l/isdn_ppp.h b/drivers/isdn/i4l/isdn_ppp.h
--- a/drivers/isdn/i4l/isdn_ppp.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/i4l/isdn_ppp.h	Wed Oct 30 16:44:27 2002
@@ -1,16 +1,13 @@
-/* $Id: isdn_ppp.h,v 1.17.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, functions for synchronous PPP (linklevel).
+/* Linux ISDN subsystem, functions for synchronous PPP (linklevel).
  *
  * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
-#include <linux/ppp_defs.h>     /* for PPP_PROTOCOL */
-#include <linux/isdn_ppp.h>	/* for isdn_ppp info */
+#include "isdn_net_lib.h"
 
 extern struct file_operations isdn_ppp_fops;
 extern struct isdn_netif_ops isdn_ppp_ops;
@@ -20,10 +17,41 @@
 int isdn_ppp_dial_slave(char *);
 int isdn_ppp_hangup_slave(char *);
 
+struct inl_ppp {
+	unsigned long debug;
+	struct slcompress *slcomp;
+	struct ippp_ccp *ccp;         /* CCP for this channel */
+	unsigned int mp_cfg;
+	struct sk_buff_head mp_frags; /* fragments list */
+	u32 mp_rxseq;                 /* last processed packet seq # */
+	u32 mp_txseq;                 /* current tx seq # */
+};
+
+struct ind_ppp {
+	struct ipppd *ipppd;          /* /dev/ipppX which controls us */
+	unsigned int pppcfg;
+	unsigned long debug;
+	struct ippp_ccp *ccp;         /* CCP for this channel (multilink) */
+	u32 mp_rxseq;                 /* last seq no seen on this channel */
+};
+
 void
 isdn_ppp_frame_log(char *info, char *data, int len, int maxlen, 
 		   int unit, int slot);
+
 int
-isdn_ppp_strip_proto(struct sk_buff *skb);
+isdn_ppp_strip_proto(struct sk_buff *skb, u16 *proto);
+
+void
+ippp_push_proto(struct ind_ppp *ind_ppp, struct sk_buff *skb, u16 proto);
+
+void
+ippp_xmit(isdn_net_dev *idev, struct sk_buff *skb);
+
+void
+ippp_receive(isdn_net_dev *idev, struct sk_buff *skb, u16 proto);
+
+struct sk_buff *
+isdn_ppp_dev_alloc_skb(void *priv, int len, int gfp_mask);
 
 #define IPPP_MAX_HEADER 10
diff -Nru a/drivers/isdn/i4l/isdn_ppp_ccp.c b/drivers/isdn/i4l/isdn_ppp_ccp.c
--- a/drivers/isdn/i4l/isdn_ppp_ccp.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/i4l/isdn_ppp_ccp.c	Wed Oct 30 16:44:27 2002
@@ -1,10 +1,50 @@
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
+ *           1995,96    by Thinking Objects Software GmbH Wuerzburg
+ *           1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
 
 #include "isdn_ppp_ccp.h"
 #include "isdn_common.h"
-#include "isdn_net.h"
+#include "isdn_net_lib.h"
 #include "isdn_ppp.h"
 #include <linux/ppp-comp.h>
 
+/* ====================================================================== */                                                                       
+enum ippp_ccp_reset_states {
+	CCPResetIdle,
+	CCPResetSentReq,
+	CCPResetRcvdReq,
+	CCPResetSentAck,
+	CCPResetRcvdAck
+};
+
+struct ippp_ccp_reset_state {
+	enum ippp_ccp_reset_states state;/* State of this transaction */
+	struct ippp_ccp *ccp;            /* Backlink */
+	unsigned char id;		 /* id index */
+	unsigned char ta:1;		 /* The timer is active (flag) */
+	unsigned char expra:1;		 /* We expect a ResetAck at all */
+	int dlen;			 /* Databytes stored in data */
+	struct timer_list timer;	 /* For timeouts/retries */
+	/* This is a hack but seems sufficient for the moment. We do not want
+	   to have this be yet another allocation for some bytes, it is more
+	   memory management overhead than the whole mess is worth. */
+	unsigned char data[IPPP_RESET_MAXDATABYTES];
+};
+
+/* The data structure keeping track of the currently outstanding CCP Reset
+   transactions. */
+struct ippp_ccp_reset {
+	struct ippp_ccp_reset_state *rs[256];	/* One per possible id */
+	unsigned char lastid;			/* Last id allocated */
+};
+
 /* In-kernel handling of CCP Reset-Request and Reset-Ack is necessary,
    but absolutely nontrivial. The most abstruse problem we are facing is
    that the generation, reception and all the handling of timeouts and
@@ -62,7 +102,6 @@
 	u16 proto = ccp->proto == PPP_COMP ? PPP_CCP : PPP_CCPFRAG;
 
 	skb = ccp->alloc_skb(ccp->priv, 4 + len, GFP_ATOMIC);
-	ccp->push_header(ccp->priv, skb, proto);
 
 	p = skb_put(skb, 4);
 	p += put_u8 (p, code);
@@ -74,7 +113,7 @@
 
 	isdn_ppp_frame_log("ccp-xmit", skb->data, skb->len, 32, -1, -1);
 
-	ccp->xmit(ccp->priv, skb);
+	ccp->xmit(ccp->priv, skb, proto);
 }
 
 /* The timer callback function which is called when a ResetReq has timed out,
@@ -250,7 +289,7 @@
  * and a new skb otherwise
  */
 struct sk_buff *
-ippp_ccp_compress(struct ippp_ccp *ccp, struct sk_buff *skb_in, int *proto)
+ippp_ccp_compress(struct ippp_ccp *ccp, struct sk_buff *skb_in, u16 *proto)
 {
 	struct sk_buff *skb;
 
@@ -260,7 +299,7 @@
 		return skb_in;
 	}
 	/* we do not compress control protocols */
-	if (*proto < 0 || *proto > 0x3fff) {
+	if (*proto > 0x3fff) {
 		return skb_in;
 	}
 	if (!ccp->compressor || !ccp->comp_stat) {
@@ -294,7 +333,7 @@
  */
 
 struct sk_buff *
-ippp_ccp_decompress(struct ippp_ccp *ccp, struct sk_buff *skb_in, int *proto)
+ippp_ccp_decompress(struct ippp_ccp *ccp, struct sk_buff *skb_in, u16 *proto)
 {
 	struct sk_buff *skb;
 	struct isdn_ppp_resetparams rsparm;
@@ -344,8 +383,7 @@
 		kfree_skb(skb);
 		return NULL;
 	}
-	*proto = isdn_ppp_strip_proto(skb);
-	if (*proto < 0) {
+	if (isdn_ppp_strip_proto(skb, proto)) {
 		kfree_skb(skb);
 		return NULL;
 	}
diff -Nru a/drivers/isdn/i4l/isdn_ppp_ccp.h b/drivers/isdn/i4l/isdn_ppp_ccp.h
--- a/drivers/isdn/i4l/isdn_ppp_ccp.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/isdn/i4l/isdn_ppp_ccp.h	Wed Oct 30 16:44:24 2002
@@ -1,3 +1,13 @@
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
+ *           1995,96    by Thinking Objects Software GmbH Wuerzburg
+ *           1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * 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/isdn_ppp.h>
@@ -16,7 +26,7 @@
 */
 
 struct ippp_ccp {
-	int proto;
+	u16                         proto;
 	struct isdn_ppp_compressor *compressor;
 	struct isdn_ppp_compressor *decompressor;
 	void                       *comp_stat;
@@ -26,9 +36,8 @@
 	int                         mru;
 	int                         debug;
 	void                       *priv;
-	void            (*xmit)(void *priv, struct sk_buff *skb);
+	void            (*xmit)(void *priv, struct sk_buff *skb, u16 proto);
 	void            (*kick_up)(void *priv);
-	void            (*push_header)(void *priv, struct sk_buff *skb, u16);
 	struct sk_buff *(*alloc_skb)(void *priv, int len, int gfp_mask);
 };
 
@@ -45,10 +54,10 @@
 ippp_ccp_get_flags(struct ippp_ccp *ccp);
 
 struct sk_buff *
-ippp_ccp_compress(struct ippp_ccp *ccp, struct sk_buff *skb, int *proto);
+ippp_ccp_compress(struct ippp_ccp *ccp, struct sk_buff *skb, u16 *proto);
 
 struct sk_buff *
-ippp_ccp_decompress(struct ippp_ccp *ccp, struct sk_buff *skb, int *proto);
+ippp_ccp_decompress(struct ippp_ccp *ccp, struct sk_buff *skb, u16 *proto);
 
 void
 ippp_ccp_send_ccp(struct ippp_ccp *ccp, struct sk_buff *skb);
diff -Nru a/drivers/isdn/i4l/isdn_ppp_mp.c b/drivers/isdn/i4l/isdn_ppp_mp.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/i4l/isdn_ppp_mp.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,352 @@
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
+ *           1995,96    by Thinking Objects Software GmbH Wuerzburg
+ *           1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#include "isdn_ppp_mp.h"
+#include "isdn_ppp_ccp.h"
+#include "isdn_common.h"
+#include "isdn_net_lib.h"
+#include "isdn_ppp.h"
+
+/* ====================================================================== */
+
+#define MP_END_FRAG             0x40
+#define MP_BEGIN_FRAG           0x80
+
+#define MP_MAX_QUEUE_LEN	16
+
+/* ====================================================================== */
+
+int
+ippp_mp_bind(isdn_net_dev *idev)
+{
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+
+	/* seq no last seen, maybe set to bundle min, when joining? */
+	ind_ppp->mp_rxseq = 0;
+
+	if (!list_empty(&idev->mlp->online))
+		return 0;
+
+	/* first channel for this link, do some setup */
+
+	inl_ppp->mp_cfg   = 0;        /* MPPP configuration */
+	inl_ppp->mp_txseq = 0;        /* MPPP tx sequence number */
+	inl_ppp->mp_rxseq = (u32) -1;
+	skb_queue_head_init(&inl_ppp->mp_frags);
+
+	return 0;
+}
+
+int
+ippp_mp_bundle(isdn_net_dev *idev, int unit)
+{
+	isdn_net_local *lp = idev->mlp;
+	char ifn[IFNAMSIZ + 1];
+	isdn_net_dev *n_idev;
+	struct ind_ppp *ind_ppp;
+
+	printk(KERN_DEBUG "%s: %s: slave unit: %d\n",
+	       __FUNCTION__, idev->name, unit);
+
+	sprintf(ifn, "ippp%d", unit);
+	list_for_each_entry(n_idev, &lp->slaves, slaves) {
+		if (strcmp(n_idev->name, ifn) == 0)
+			goto found;
+	}
+	
+	printk(KERN_INFO "%s: cannot find %s\n", __FUNCTION__, ifn);
+	return -ENODEV;
+
+ found:
+	ind_ppp = n_idev->ind_priv;
+	if (!ind_ppp->ipppd) {
+		printk(KERN_INFO "%s: no ipppd?\n", __FUNCTION__);
+		return -ENXIO;
+	}
+	ind_ppp->pppcfg |= SC_ENABLE_IP;
+	isdn_net_online(n_idev);
+
+	return 0;
+}
+  
+void
+ippp_mp_disconnected(isdn_net_dev *idev)
+{
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+
+	if (!list_empty(&idev->mlp->online))
+		return;
+
+	/* we're the last link going down */
+	skb_queue_purge(&inl_ppp->mp_frags);
+}
+
+void
+ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
+{
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+	unsigned char *p;
+	long txseq;
+
+	if (!(inl_ppp->mp_cfg & SC_MP_PROT)) {
+		return ippp_xmit(idev, skb);
+	}
+
+	/* we could do something smarter than just sending
+	 * the complete packet as fragment... */
+
+	txseq = inl_ppp->mp_txseq++;
+	
+	if (inl_ppp->mp_cfg & SC_OUT_SHORT_SEQ) {
+		/* sequence number: 12bit */
+		p = skb_push(skb, 2);
+		p[0] = MP_BEGIN_FRAG | MP_END_FRAG | ((txseq >> 8) & 0xf);
+		p[1] = txseq & 0xff;
+	} else {
+		/* sequence number: 24bit */
+		p = skb_push(skb, 4);
+		p[0] = MP_BEGIN_FRAG | MP_END_FRAG;
+		p[1] = (txseq >> 16) & 0xff;
+		p[2] = (txseq >>  8) & 0xff;
+		p[3] = (txseq >>  0) & 0xff;
+	}
+	proto = PPP_MP;
+	skb = ippp_ccp_compress(ind_ppp->ccp, skb, &proto);
+	ippp_push_proto(ind_ppp, skb, proto);
+	ippp_xmit(idev, skb);
+}
+
+static void mp_receive(isdn_net_dev *idev, struct sk_buff *skb);
+
+void
+ippp_mp_receive(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
+{
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+
+ 	if (inl_ppp->mp_cfg & SC_REJ_MP_PROT)
+		goto out;
+
+	skb = ippp_ccp_decompress(ind_ppp->ccp, skb, &proto);
+	if (!skb)
+		goto drop;
+
+	if (proto == PPP_MP)
+		return mp_receive(idev, skb);
+
+ out:
+	return ippp_receive(idev, skb, proto);
+
+ drop:
+	idev->mlp->stats.rx_errors++;
+	kfree_skb(skb);
+}
+
+#define MP_LONGSEQ_MASK		0x00ffffff
+#define MP_SHORTSEQ_MASK	0x00000fff
+#define MP_LONGSEQ_MAX		MP_LONGSEQ_MASK
+#define MP_SHORTSEQ_MAX		MP_SHORTSEQ_MASK
+#define MP_LONGSEQ_MAXBIT	((MP_LONGSEQ_MASK+1)>>1)
+#define MP_SHORTSEQ_MAXBIT	((MP_SHORTSEQ_MASK+1)>>1)
+
+/* sequence-wrap safe comparisions (for long sequence)*/ 
+#define MP_LT(a,b)	((a-b)&MP_LONGSEQ_MAXBIT)
+#define MP_LE(a,b) 	!((b-a)&MP_LONGSEQ_MAXBIT)
+#define MP_GT(a,b) 	((b-a)&MP_LONGSEQ_MAXBIT)
+#define MP_GE(a,b)	!((a-b)&MP_LONGSEQ_MAXBIT)
+
+#define MP_SEQUENCE(skb) (skb)->priority
+#define MP_FLAGS(skb)    (skb)->cb[0]
+
+static u32
+get_seq(struct sk_buff *skb, u32 last_seq, int short_seq)
+{
+	u32 seq;
+	u16 shseq;
+	u8  flags;
+	int delta;
+   
+	get_u8(skb->data, &flags);
+   	if (short_seq) {
+		/* convert 12-bit short seq number to 24-bit long one */
+		get_u16(skb->data, &shseq);
+		delta = (shseq & MP_SHORTSEQ_MASK) - 
+			(last_seq & MP_SHORTSEQ_MASK);
+		/* check for seqence wrap */
+		if (delta < 0)
+			delta += MP_SHORTSEQ_MAX + 1;
+
+		seq = last_seq + delta;
+		skb_pull(skb, 2);
+	} else {
+		get_u32(skb->data, &seq);
+		skb_pull(skb, 4);
+	}
+	seq &= MP_LONGSEQ_MASK;
+	MP_SEQUENCE(skb) = seq;
+	MP_FLAGS(skb) = flags;
+	return seq;
+}
+
+static int
+mp_insert_frag(struct sk_buff_head *frags, struct sk_buff *skb)
+{
+	struct sk_buff *p;
+
+	/* If our queue of not yet reassembled fragments grows too
+	   large, throw away the oldest fragment */
+	if (skb_queue_len(frags) > MP_MAX_QUEUE_LEN)
+		kfree_skb(skb_dequeue(frags));
+	
+	for (p = frags->next; p != (struct sk_buff *) frags; p = p->next) {
+		if (MP_LE(MP_SEQUENCE(skb), MP_SEQUENCE(p)))
+			break;
+	}
+	/* duplicate ? */
+	if (MP_SEQUENCE(skb) == MP_SEQUENCE(p))
+		return -EBUSY;
+
+	__skb_insert(skb, p->prev, p, frags);
+	return 0;
+}
+
+struct sk_buff *
+mp_complete_seq(isdn_net_local *lp, struct sk_buff *b, struct sk_buff *e)
+{
+	struct sk_buff *p, *n, *skb;
+	int len = 0;
+
+	if (b->next == e) {
+		/* sequence with only one frag */
+		skb_unlink(b);
+		return b;
+	}
+	for (p = b, n = p->next; p != e; p = n, n = p->next ) {
+		len += p->len;
+	}
+	// FIXME check against mrru?
+	skb = dev_alloc_skb(len);
+	if (!skb)
+		lp->stats.rx_errors++;
+
+	for (p = b, n = p->next; p != e; p = n, n = p->next ) {
+		if (skb)
+			memcpy(skb_put(skb, p->len), p->data, p->len);
+		
+		skb_unlink(p);
+		kfree_skb(p);
+	}
+	return skb;
+}
+
+struct sk_buff *
+mp_reassemble(isdn_net_local *lp)
+{
+	struct inl_ppp *inl_ppp = lp->inl_priv;
+	struct sk_buff_head *frags = &inl_ppp->mp_frags;
+	struct sk_buff *p, *n, *pp, *start;
+	u32 min_seq = inl_ppp->mp_rxseq;
+	u32 next_seq = 0;
+
+ again:
+	start = NULL;
+	for (p = frags->next, n = p->next; p != (struct sk_buff *) frags; p = n, n = p->next ) {
+		if (!start) {
+			if (MP_FLAGS(p) & MP_BEGIN_FRAG) {
+				start = p;
+				next_seq = MP_SEQUENCE(p);
+			} else {
+				/* start frag is missing */
+				goto frag_missing;
+			}
+		}
+		/* we've seen the first fragment of this series */
+		if (MP_SEQUENCE(p) != next_seq) {
+			/* previous frag is missing */
+			goto frag_missing;
+		}
+		if (MP_FLAGS(p) & MP_END_FRAG) {
+			/* we got a full sequence */
+			return mp_complete_seq(lp, start, p->next);
+		}
+		next_seq = MP_SEQUENCE(p) + 1;
+	}
+	return NULL;
+	
+ frag_missing:
+	if (MP_SEQUENCE(p) - 1 > min_seq)
+		/* may come later */
+		return NULL;
+
+	/* for all fragments up to p */
+	p = p->next;
+	for (pp = frags->next, n = pp->next; pp != p; pp = n, n = pp->next ) {
+		skb_unlink(pp);
+		kfree_skb(pp);
+		lp->stats.rx_errors++;
+	}
+	goto again;
+
+}
+
+static void
+mp_receive(isdn_net_dev *idev, struct sk_buff *skb)
+{
+	isdn_net_local *lp = idev->mlp;
+	struct inl_ppp *inl_ppp = lp->inl_priv;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	isdn_net_dev *qdev;
+	struct sk_buff_head *frags = &inl_ppp->mp_frags;
+	u32 seq;
+	u16 proto;
+
+	if (skb->len < (inl_ppp->mp_cfg & SC_IN_SHORT_SEQ ? 2 : 4))
+		goto drop;
+
+	seq = get_seq(skb, ind_ppp->mp_rxseq, inl_ppp->mp_cfg & SC_IN_SHORT_SEQ);
+	ind_ppp->mp_rxseq = seq;
+
+	if (inl_ppp->mp_rxseq == (u32) -1) { 
+		/* first packet */
+		inl_ppp->mp_rxseq = seq;
+	}
+	if (MP_LT(seq, inl_ppp->mp_rxseq)) {
+		goto drop;
+	}
+	/* Find the minimum sequence number received over all channels.
+	 * No fragments with numbers lower than this will arrive later. */
+	inl_ppp->mp_rxseq = seq;
+	list_for_each_entry(qdev, &lp->online, online) {
+		struct ind_ppp *ind_ppp = qdev->ind_priv;
+		if (MP_LT(ind_ppp->mp_rxseq, inl_ppp->mp_rxseq))
+			inl_ppp->mp_rxseq = ind_ppp->mp_rxseq;
+	}
+
+	/* Insert the skb into the list of received fragments, ordered by
+	 * sequence number */
+	if (mp_insert_frag(frags, skb))
+		goto drop;
+
+	while ((skb = mp_reassemble(lp))) {
+		if (isdn_ppp_strip_proto(skb, &proto)) {
+			kfree_skb(skb);
+			continue;
+		}
+		ippp_receive(idev, skb, proto);
+	}
+	return;
+	
+ drop:
+	lp->stats.rx_errors++;
+	kfree_skb(skb);
+}
diff -Nru a/drivers/isdn/i4l/isdn_ppp_mp.h b/drivers/isdn/i4l/isdn_ppp_mp.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/i4l/isdn_ppp_mp.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,58 @@
+/* Linux ISDN subsystem, PPP CCP support
+ *
+ * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
+ *           1995,96    by Thinking Objects Software GmbH Wuerzburg
+ *           1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#ifndef __ISDN_PPP_MP_H__
+#define __ISDN_PPP_MP_H__
+
+#include "isdn_net_lib.h"
+
+#ifdef CONFIG_ISDN_MPP
+
+int  ippp_mp_bind(isdn_net_dev *idev);
+void ippp_mp_disconnected(isdn_net_dev *idev);
+int  ippp_mp_bundle(isdn_net_dev *idev, int val);
+void ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb, u16 proto);
+void ippp_mp_receive(isdn_net_dev *idev, struct sk_buff *skb, u16 proto);
+
+#else
+
+static inline int
+ippp_mp_bind(isdn_net_dev *idev)
+{
+	return 0;
+}
+
+static void
+ippp_mp_disconnected(isdn_net_dev *idev)
+{
+}
+
+static inline int
+ippp_mp_bundle(isdn_net_dev *idev, int val)
+{
+	return -EINVAL;
+}
+
+static inline void
+ippp_mp_xmit(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
+{
+	ippp_xmit(idev, skb, proto);
+}
+
+static inline void 
+ippp_mp_receive(isdn_net_dev *idev, struct sk_buff *skb, u16 proto)
+{
+	ippp_receive(idev, skb, proto);
+}
+
+#endif
+
+#endif
diff -Nru a/drivers/isdn/i4l/isdn_ppp_vj.c b/drivers/isdn/i4l/isdn_ppp_vj.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/i4l/isdn_ppp_vj.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,128 @@
+/* Linux ISDN subsystem, PPP VJ header compression
+ *
+ * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#include "isdn_ppp_vj.h"
+#include "isdn_common.h"
+#include "isdn_net_lib.h"
+#include "isdn_ppp.h"
+
+struct slcompress *
+ippp_vj_alloc(void)
+{
+	return slhc_init(16, 16);
+}
+
+void
+ippp_vj_free(struct slcompress *slcomp)
+{
+	slhc_free(slcomp);
+}
+
+int
+ippp_vj_set_maxcid(isdn_net_dev *idev, int val)
+{
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+	struct slcompress *sltmp;
+
+	sltmp = slhc_init(16, val + 1);
+	if (!sltmp)
+		return -ENOMEM;
+
+	if (inl_ppp->slcomp)
+		slhc_free(inl_ppp->slcomp);
+
+	inl_ppp->slcomp = sltmp;
+	return 0;
+}
+
+void
+ippp_vj_decompress(isdn_net_dev *idev, struct sk_buff *skb_old, u16 proto)
+{
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+	struct slcompress *slcomp = inl_ppp->slcomp;
+	struct sk_buff *skb;
+	int len;
+
+	switch (proto) {
+	case PPP_VJC_UNCOMP:
+		if (slhc_remember(slcomp, skb_old->data, skb_old->len) <= 0)
+			goto drop;
+		
+		skb = skb_old;
+		break;
+	case PPP_VJC_COMP:
+		skb = dev_alloc_skb(skb_old->len + 128);
+		if (!skb)
+			goto drop;
+
+		memcpy(skb->data, skb_old->data, skb_old->len);
+		len = slhc_uncompress(slcomp, skb->data, skb_old->len);
+		if (len < 0)
+			goto drop_both;
+
+		skb_put(skb, len);
+		kfree_skb(skb_old);
+		break;
+	default:
+		isdn_BUG();
+		goto drop;
+	}
+	isdn_netif_rx(idev, skb, htons(ETH_P_IP));
+	return;
+
+ drop_both:
+	kfree_skb(skb);
+ drop:
+	kfree_skb(skb_old);
+	idev->mlp->stats.rx_dropped++;
+}
+
+struct sk_buff *
+ippp_vj_compress(isdn_net_dev *idev, struct sk_buff *skb_old, u16 *proto)
+{
+	struct inl_ppp *inl_ppp = idev->mlp->inl_priv;
+	struct ind_ppp *ind_ppp = idev->ind_priv;
+	struct slcompress *slcomp = inl_ppp->slcomp;
+	struct sk_buff *skb;
+	unsigned char *buf;
+	int len;
+
+	if (!(ind_ppp->pppcfg & SC_COMP_TCP) || *proto != PPP_IP)
+		return skb_old;
+
+	skb = isdn_ppp_dev_alloc_skb(idev, skb_old->len, GFP_ATOMIC);
+	if (!skb)
+		return skb_old;
+
+	skb_put(skb, skb_old->len);
+	buf = skb_old->data;
+	// FIXME flag should be per bundle
+	len = slhc_compress(slcomp, skb_old->data, skb_old->len, skb->data,
+			    &buf, !(ind_ppp->pppcfg & SC_NO_TCP_CCID)); 
+
+	if (buf == skb_old->data) {
+		kfree_skb(skb);
+		skb = skb_old;
+	} else {
+		kfree_skb(skb_old);
+	}
+	skb_trim(skb, len);
+			
+	/* cslip style -> PPP */
+	if ((skb->data[0] & SL_TYPE_COMPRESSED_TCP) == SL_TYPE_COMPRESSED_TCP) {
+		skb->data[0] &= ~SL_TYPE_COMPRESSED_TCP;
+		*proto = PPP_VJC_COMP;
+	} else if ((skb->data[0] & SL_TYPE_UNCOMPRESSED_TCP) == SL_TYPE_UNCOMPRESSED_TCP) {
+		skb->data[0] &= ~SL_TYPE_UNCOMPRESSED_TCP;
+		skb->data[0] |= SL_TYPE_IP;
+		*proto = PPP_VJC_UNCOMP;
+	}
+	return skb;
+}
+
diff -Nru a/drivers/isdn/i4l/isdn_ppp_vj.h b/drivers/isdn/i4l/isdn_ppp_vj.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/i4l/isdn_ppp_vj.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,61 @@
+/* Linux ISDN subsystem, PPP VJ header compression
+ *
+ * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ *           1999-2002  by Kai Germaschewski <kai@germaschewski.name>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#ifndef __ISDN_PPP_VJ_H__
+#define __ISDN_PPP_VJ_H__
+
+#include "isdn_net_lib.h"
+
+#ifdef CONFIG_ISDN_PPP_VJ
+
+
+struct slcompress *
+ippp_vj_alloc(void);
+
+void
+ippp_vj_free(struct slcompress *slcomp);
+
+int
+ippp_vj_set_maxcid(isdn_net_dev *idev, int val);
+
+void
+ippp_vj_decompress(isdn_net_dev *idev, struct sk_buff *skb_old, u16 proto);
+
+struct sk_buff *
+ippp_vj_compress(isdn_net_dev *idev, struct sk_buff *skb_old, u16 *proto);
+
+
+#else
+
+
+static inline struct slcompress *
+ippp_vj_alloc(void)
+{ return (struct slcompress *) !NULL; }
+
+static inline void
+ippp_vj_free(struct slcompress *slcomp) 
+{ }
+
+static inline int
+ippp_vj_set_maxcid(isdn_net_dev *idev, int val)
+{ return -EINVAL; }
+
+static inline struct sk_buff *
+ippp_vj_decompress(struct slcompress *slcomp, struct sk_buff *skb_old, 
+		   u16 proto)
+{ return skb_old; }
+
+static inline struct sk_buff *
+ippp_vj_compress(isdn_net_dev *idev, struct sk_buff *skb_old, u16 *proto)
+{ return skb_old; }
+
+
+#endif
+
+#endif
diff -Nru a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
--- a/drivers/isdn/i4l/isdn_tty.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/isdn/i4l/isdn_tty.c	Wed Oct 30 16:44:30 2002
@@ -1,17 +1,20 @@
-/* $Id: isdn_tty.c,v 1.94.6.9 2001/11/06 20:58:29 kai Exp $
- *
- * Linux ISDN subsystem, tty functions and AT-command emulator (linklevel).
+/* Linux ISDN subsystem, tty functions and AT-command emulator
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
-#undef ISDN_TTY_STAT_DEBUG
 
-#include <linux/config.h>
+#define ISDN_TTY_STAT_DEBUG
+#define ISDN_DEBUG_MODEM_HUP
+#define ISDN_DEBUG_MODEM_VOICE
+#define ISDN_DEBUG_MODEM_OPEN
+#define ISDN_DEBUG_MODEM_IOCTL
+#define ISDN_DEBUG_MODEM_ICALL
+
+#include <linux/module.h>
 #include <linux/isdn.h>
 #include "isdn_common.h"
 #include "isdn_tty.h"
@@ -21,21 +24,40 @@
 #define VBUFX (VBUF/16)
 #endif
 
+#define RING_TIMEOUT     (5*HZ)  /* repeat RING every 5 secs */
 #define FIX_FILE_TRANSFER
 #define	DUMMY_HAYES_AT
 
 /* Prototypes */
 
+static void isdn_tty_modem_xmit(struct modem_info *info);
 static int isdn_tty_edit_at(const char *, int, modem_info *, int);
-static void isdn_tty_check_esc(const u_char *, u_char, int, int *, int *, int);
+static void isdn_tty_escape_timer(unsigned long data);
+static void isdn_tty_ring_timer(unsigned long data);
+static void isdn_tty_connect_timer(unsigned long data);
+static void isdn_tty_check_esc(struct modem_info *info, 
+			       const unsigned char *p, int count);
 static void isdn_tty_modem_reset_regs(modem_info *, int);
 static void isdn_tty_cmd_ATA(modem_info *);
 static void isdn_tty_flush_buffer(struct tty_struct *);
 static void isdn_tty_modem_result(int, modem_info *);
+static int isdn_tty_stat_callback(struct isdn_slot *slot, isdn_ctrl *c);
+static int isdn_tty_rcv_skb(struct isdn_slot *slot, struct sk_buff *skb);
 #ifdef CONFIG_ISDN_AUDIO
 static int isdn_tty_countDLE(unsigned char *, int);
 #endif
 
+static int
+isdn_tty_event_callback(struct isdn_slot *slot, int pr, void *arg)
+{
+	switch (pr) {
+	case EV_DATA_IND:
+		return isdn_tty_rcv_skb(slot, arg);
+	default:
+		return isdn_tty_stat_callback(slot, arg);
+	}
+}
+
 /* Leave this unchanged unless you know what you do! */
 #define MODEM_PARANOIA_CHECK
 #define MODEM_DO_RESTART
@@ -48,14 +70,13 @@
 static char *isdn_ttyname_cui = "cui";
 #endif
 
+struct isdn_modem isdn_mdm;
+
 static int bit2si[8] =
 {1, 5, 7, 7, 7, 7, 7, 7};
 static int si2bit[8] =
 {4, 1, 4, 4, 4, 4, 4, 4};
 
-char *isdn_tty_revision = "$Revision: 1.94.6.9 $";
-
-
 /* isdn_tty_try_read() is called from within isdn_tty_rcv_skb()
  * to stuff incoming data directly into a tty's flip-buffer. This
  * is done to speed up tty-receiving if the receive-queue is empty.
@@ -111,82 +132,166 @@
 	return 0;
 }
 
+/*
+ * isdn_slot_readbchan() tries to get data from the read-queue.
+ * It MUST be called with interrupts off.
+ */
+static int
+isdn_tty_readbchan(struct modem_info *info, u_char * buf, u_char * fp, int len)
+{
+	int count;
+	int count_pull;
+	int count_put;
+	int dflag;
+	struct sk_buff *skb;
+	u_char *cp;
+
+	if (skb_queue_empty(&info->rpqueue))
+		return 0;
+
+	if (len > info->rcvcount)
+		len = info->rcvcount;
+	cp = buf;
+	count = 0;
+	while (len) {
+		if (!(skb = skb_peek(&info->rpqueue)))
+			break;
+#ifdef CONFIG_ISDN_AUDIO
+		if (ISDN_AUDIO_SKB_LOCK(skb))
+			break;
+		ISDN_AUDIO_SKB_LOCK(skb) = 1;
+		if (ISDN_AUDIO_SKB_DLECOUNT(skb) || info->DLEflag) {
+			char *p = skb->data;
+
+			dflag = 0;
+			count_pull = count_put = 0;
+			while ((count_pull < skb->len) && (len > 0)) {
+				len--;
+				if (info->DLEflag) {
+					*cp++ = DLE;
+					info->DLEflag = 0;
+				} else {
+					*cp++ = *p;
+					if (*p == DLE) {
+						info->DLEflag = 1;
+						(ISDN_AUDIO_SKB_DLECOUNT(skb))--;
+					}
+					p++;
+					count_pull++;
+				}
+				count_put++;
+			}
+			if (count_pull >= skb->len)
+				dflag = 1;
+		} else {
+#endif
+			/* No DLE's in buff, so simply copy it */
+			dflag = 1;
+			if ((count_pull = skb->len) > len) {
+				count_pull = len;
+				dflag = 0;
+			}
+			count_put = count_pull;
+			memcpy(cp, skb->data, count_put);
+			cp += count_put;
+			len -= count_put;
+#ifdef CONFIG_ISDN_AUDIO
+		}
+#endif
+		count += count_put;
+		if (fp) {
+			memset(fp, 0, count_put);
+			fp += count_put;
+		}
+		if (dflag) {
+			/* We got all the data in this buff.
+			 * Now we can dequeue it.
+			 */
+			if (fp)
+				*(fp - 1) = 0xff;
+#ifdef CONFIG_ISDN_AUDIO
+			ISDN_AUDIO_SKB_LOCK(skb) = 0;
+#endif
+			skb = skb_dequeue(&info->rpqueue);
+			dev_kfree_skb(skb);
+		} else {
+			/* Not yet emptied this buff, so it
+			 * must stay in the queue, for further calls
+			 * but we pull off the data we got until now.
+			 */
+			skb_pull(skb, count_pull);
+#ifdef CONFIG_ISDN_AUDIO
+			ISDN_AUDIO_SKB_LOCK(skb) = 0;
+#endif
+		}
+		info->rcvcount -= count_put;
+	}
+	return count;
+}
+
 /* isdn_tty_readmodem() is called periodically from within timer-interrupt.
  * It tries getting received data from the receive queue an stuff it into
  * the tty's flip-buffer.
  */
-void
-isdn_tty_readmodem(void)
+static void
+isdn_tty_readmodem(unsigned long data)
 {
-	int resched = 0;
-	int midx;
-	int i;
+	struct modem_info *info = (struct modem_info *) data;
 	int c;
 	int r;
 	ulong flags;
 	struct tty_struct *tty;
-	modem_info *info;
 
-	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		if ((midx = isdn_slot_m_idx(i)) >= 0) {
-			info = &dev->mdm.info[midx];
-			if (info->online) {
-				r = 0;
-#ifdef CONFIG_ISDN_AUDIO
-				isdn_audio_eval_dtmf(info);
-				if ((info->vonline & 1) && (info->emu.vpar[1]))
-					isdn_audio_eval_silence(info);
-#endif
-				if ((tty = info->tty)) {
-					if (info->mcr & UART_MCR_RTS) {
-						c = TTY_FLIPBUF_SIZE - tty->flip.count;
-						if (c > 0) {
-							save_flags(flags);
-							cli();
-							r = isdn_slot_readbchan(info->isdn_slot,
-									   tty->flip.char_buf_ptr,
-									   tty->flip.flag_buf_ptr, c);
-							/* CISCO AsyncPPP Hack */
-							if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP))
-								memset(tty->flip.flag_buf_ptr, 0, r);
-							tty->flip.count += r;
-							tty->flip.flag_buf_ptr += r;
-							tty->flip.char_buf_ptr += r;
-							if (r)
-								schedule_delayed_work(&tty->flip.work, 1);
-							restore_flags(flags);
-						}
-					} else
-						r = 1;
-				} else
-					r = 1;
-				if (r) {
-					info->rcvsched = 0;
-					resched = 1;
-				} else
-					info->rcvsched = 1;
+	if (!info->online)
+		return;
+
+	r = 0;
+#ifdef CONFIG_ISDN_AUDIO
+	isdn_audio_eval_dtmf(info);
+	if ((info->vonline & 1) && (info->emu.vpar[1]))
+		isdn_audio_eval_silence(info);
+#endif
+	if ((tty = info->tty)) {
+		if (info->mcr & UART_MCR_RTS) {
+			c = TTY_FLIPBUF_SIZE - tty->flip.count;
+			if (c > 0) {
+				save_flags(flags);
+				cli();
+				r = isdn_tty_readbchan(info,
+						       tty->flip.char_buf_ptr,
+						       tty->flip.flag_buf_ptr, c);
+				/* CISCO AsyncPPP Hack */
+				if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP))
+					memset(tty->flip.flag_buf_ptr, 0, r);
+				tty->flip.count += r;
+				tty->flip.flag_buf_ptr += r;
+				tty->flip.char_buf_ptr += r;
+				if (r)
+					schedule_delayed_work(&tty->flip.work, 1);
+				restore_flags(flags);
 			}
-		}
-	}
-	if (!resched)
-		isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 0);
+		} else
+			r = 1;
+	} else
+		r = 1;
+
+	if (r) {
+		info->rcvsched = 0;
+		mod_timer(&info->read_timer, jiffies + 4);
+	} else
+		info->rcvsched = 1;
 }
 
-int
-isdn_tty_rcv_skb(int i, int di, int channel, struct sk_buff *skb)
+static int
+isdn_tty_rcv_skb(struct isdn_slot *slot, struct sk_buff *skb)
 {
 	ulong flags;
-	int midx;
 #ifdef CONFIG_ISDN_AUDIO
 	int ifmt;
 #endif
 	modem_info *info;
 
-	if ((midx = isdn_slot_m_idx(i)) < 0) {
-		/* if midx is invalid, packet is not for tty */
-		return 0;
-	}
-	info = &dev->mdm.info[midx];
+	info = slot->priv;
 #ifdef CONFIG_ISDN_AUDIO
 	ifmt = 1;
 	
@@ -269,7 +374,7 @@
 	/* Try to deliver directly via tty-flip-buf if queue is empty */
 	save_flags(flags);
 	cli();
-	if (skb_queue_empty(&dev->drv[di]->rpqueue[channel]))
+	if (skb_queue_empty(&info->rpqueue))
 		if (isdn_tty_try_read(info, skb)) {
 			restore_flags(flags);
 			return 1;
@@ -277,17 +382,15 @@
 	/* Direct deliver failed or queue wasn't empty.
 	 * Queue up for later dequeueing via timer-irq.
 	 */
-	__skb_queue_tail(&dev->drv[di]->rpqueue[channel], skb);
-	dev->drv[di]->rcvcount[channel] +=
-		(skb->len
+	isdn_tty_queue_tail(info, skb, skb->len
 #ifdef CONFIG_ISDN_AUDIO
 		 + ISDN_AUDIO_SKB_DLECOUNT(skb)
 #endif
-			);
+			    );
 	restore_flags(flags);
 	/* Schedule dequeuing */
-	if ((dev->modempoll) && (info->rcvsched))
-		isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 1);
+	if (dev->modempoll && info->rcvsched)
+		mod_timer(&info->read_timer, jiffies + 4);
 	return 1;
 }
 
@@ -627,7 +730,7 @@
 	int si = 7;
 	int l2 = m->mdmreg[REG_L2PROT];
 	ulong flags;
-	int i;
+	struct isdn_slot *slot;
 	int j;
 
 	for (j = 7; j >= 0; j--)
@@ -650,8 +753,8 @@
 	m->mdmreg[REG_SI1I] = si2bit[si];
 	save_flags(flags);
 	cli();
-	i = isdn_get_free_slot(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
-	if (i < 0) {
+	slot = isdn_get_free_slot(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
+	if (!slot) {
 		restore_flags(flags);
 		isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
 	} else {
@@ -663,8 +766,11 @@
 			.msn      = m->msn,
 			.phone    = n,
 		};
-		info->isdn_slot = i;
-		isdn_slot_set_m_idx(i, info->line);
+
+		info->isdn_slot = slot;
+		slot->usage |= ISDN_USAGE_MODEM;
+		slot->priv = info;
+		slot->event_cb = isdn_tty_event_callback;
 		info->last_dir = 1;
 		info->last_l2 = l2;
 		strcpy(info->last_num, n);
@@ -676,9 +782,8 @@
 		}
 #endif
 		info->dialing = 1;
-		info->emu.carrierwait = 0;
 		isdn_slot_dial(info->isdn_slot, &dial);
-		isdn_timer_ctrl(ISDN_TIMER_CARRIER, 1);
+		mod_timer(&info->connect_timer, jiffies + info->emu.mdmreg[REG_WAITC] * HZ); 
 	}
 }
 
@@ -690,13 +795,13 @@
 isdn_tty_modem_hup(modem_info * info, int local)
 {
 	isdn_ctrl cmd;
-	int slot;
+	struct isdn_slot *slot;
 
 	if (!info)
 		return;
 
 	slot = info->isdn_slot;
-	if (slot < 0)
+	if (!slot)
 		return;
 
 #ifdef ISDN_DEBUG_MODEM_HUP
@@ -743,11 +848,12 @@
 	if (local)
 		isdn_slot_command(slot, ISDN_CMD_HANGUP, &cmd);
 
-	isdn_slot_all_eaz(slot);
 	info->emu.mdmreg[REG_RINGCNT] = 0;
+	skb_queue_purge(&info->rpqueue);
+	slot->priv = NULL;
+	slot->event_cb = NULL;
 	isdn_slot_free(slot);
-	isdn_slot_set_m_idx(slot, -1);
-	info->isdn_slot = -1;
+	info->isdn_slot = NULL;
 }
 
 /*
@@ -781,7 +887,6 @@
 		cmd.parm.cmsg.Length = l+18;
 		cmd.parm.cmsg.Command = CAPI_FACILITY;
 		cmd.parm.cmsg.Subcommand = CAPI_REQ;
-		cmd.parm.cmsg.adr.Controller = isdn_slot_driver(info->isdn_slot) + 1;
 		cmd.parm.cmsg.para[0] = 3; /* 16 bit 0x0003 suplementary service */
 		cmd.parm.cmsg.para[1] = 0;
 		cmd.parm.cmsg.para[2] = l + 3;
@@ -808,7 +913,7 @@
 	int l2 = m->mdmreg[REG_L2PROT];
 	isdn_ctrl cmd;
 	ulong flags;
-	int i;
+	struct isdn_slot *slot;
 	int j;
 	int l;
 
@@ -833,14 +938,15 @@
 	m->mdmreg[REG_SI1I] = si2bit[si];
 	save_flags(flags);
 	cli();
-	i = isdn_get_free_slot(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
-	if (i < 0) {
+	slot = isdn_get_free_slot(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
+	if (!slot) {
 		restore_flags(flags);
 		isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
 	} else {
-		info->isdn_slot = i;
-		isdn_slot_set_m_idx(i, info->line);
-		isdn_slot_set_usage(i, isdn_slot_usage(i) | ISDN_USAGE_OUTGOING);
+		info->isdn_slot = slot;
+		slot->usage |= ISDN_USAGE_MODEM;
+		slot->priv = info;
+		slot->event_cb = isdn_tty_event_callback;
 		info->last_dir = 1;
 //		strcpy(info->last_num, n);
 		restore_flags(flags);
@@ -852,7 +958,6 @@
 		cmd.parm.cmsg.Length = l+18;
 		cmd.parm.cmsg.Command = CAPI_FACILITY;
 		cmd.parm.cmsg.Subcommand = CAPI_REQ;
-		cmd.parm.cmsg.adr.Controller = isdn_slot_driver(info->isdn_slot) + 1;
 		cmd.parm.cmsg.para[0] = 3; /* 16 bit 0x0003 suplementary service */
 		cmd.parm.cmsg.para[1] = 0;
 		cmd.parm.cmsg.para[2] = l+3;
@@ -864,7 +969,7 @@
 //		strcpy(dev->num[i], n);
 		isdn_info_update();
 		isdn_slot_command(info->isdn_slot, CAPI_PUT_MESSAGE, &cmd);
-		isdn_timer_ctrl(ISDN_TIMER_CARRIER, 1);
+		mod_timer(&info->connect_timer, jiffies + info->emu.mdmreg[REG_WAITC] * HZ); 
 	}
 }
 
@@ -880,7 +985,7 @@
 	int l2 = m->mdmreg[REG_L2PROT];
 	isdn_ctrl cmd;
 	ulong flags;
-	int i;
+	struct isdn_slot *slot;
 	int j;
 	int l;
 
@@ -909,14 +1014,15 @@
 	m->mdmreg[REG_SI1I] = si2bit[si];
 	save_flags(flags);
 	cli();
-	i = isdn_get_free_slot(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
-	if (i < 0) {
+	slot = isdn_get_free_slot(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
+	if (!slot) {
 		restore_flags(flags);
 		isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
 	} else {
-		info->isdn_slot = i;
-		isdn_slot_set_m_idx(i, info->line);
-		isdn_slot_set_usage(i, isdn_slot_usage(i) | ISDN_USAGE_OUTGOING);
+		info->isdn_slot = slot;
+		slot->usage |= ISDN_USAGE_MODEM;
+		slot->priv = info;
+		slot->event_cb = isdn_tty_event_callback;
 		info->last_dir = 1;
 		restore_flags(flags);
 		info->last_l2 = l2;
@@ -927,7 +1033,6 @@
 		cmd.parm.cmsg.Length = l+14;
 		cmd.parm.cmsg.Command = CAPI_MANUFACTURER;
 		cmd.parm.cmsg.Subcommand = CAPI_REQ;
-		cmd.parm.cmsg.adr.Controller = isdn_slot_driver(info->isdn_slot) + 1;
 		cmd.parm.cmsg.para[0] = l+1;
 		strncpy(&cmd.parm.cmsg.para[1], msg, l);
 		cmd.parm.cmsg.para[l+1] = 0xd;
@@ -1028,7 +1133,6 @@
 		return 0;
 	save_flags(flags);
 	cli();
-	isdn_MOD_INC_USE_COUNT();
 #ifdef ISDN_DEBUG_MODEM_OPEN
 	printk(KERN_DEBUG "starting up ttyi%d ...\n", info->line);
 #endif
@@ -1066,7 +1170,6 @@
 #endif
 	save_flags(flags);
 	cli();                  /* Disable interrupts */
-	isdn_MOD_DEC_USE_COUNT();
 	info->msr &= ~UART_MSR_RI;
 	if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) {
 		info->mcr &= ~(UART_MCR_DTR | UART_MCR_RTS);
@@ -1099,7 +1202,6 @@
 {
 	int c;
 	int total = 0;
-	int di;
 	modem_info *info = (modem_info *) tty->driver_data;
 	atemu *m = &info->emu;
 
@@ -1113,9 +1215,8 @@
 		c = count;
 		if (c > info->xmit_size - info->xmit_count)
 			c = info->xmit_size - info->xmit_count;
-		di = isdn_slot_driver(info->isdn_slot);
-		if (di >= 0 && c > dev->drv[di]->maxbufsize)
-			c = dev->drv[di]->maxbufsize;
+		if (info->isdn_slot && c > isdn_slot_maxbufsize(info->isdn_slot))
+			c = isdn_slot_maxbufsize(info->isdn_slot);
 		if (c <= 0)
 			break;
 		if ((info->online > 1)
@@ -1123,13 +1224,6 @@
 		    || (info->vonline & 3)
 #endif
 			) {
-#ifdef CONFIG_ISDN_AUDIO
-			if (!info->vonline)
-#endif
-				isdn_tty_check_esc(buf, m->mdmreg[REG_ESC], c,
-						   &(m->pluscount),
-						   &(m->lastplus),
-						   from_user);
 			if (from_user) {
 				if (copy_from_user(&(info->xmit_buf[info->xmit_count]), buf, c)) {
 					total = -EFAULT;
@@ -1138,6 +1232,10 @@
 			} else
 				memcpy(&(info->xmit_buf[info->xmit_count]), buf, c);
 #ifdef CONFIG_ISDN_AUDIO
+			if (!info->vonline)
+#endif
+				isdn_tty_check_esc(info, &info->xmit_buf[info->xmit_count], c);
+#ifdef CONFIG_ISDN_AUDIO
 			if (info->vonline) {
 				int cc = isdn_tty_handleDLEdown(info, m, c);
 				if (info->vonline & 2) {
@@ -1206,11 +1304,7 @@
 	}
 	atomic_dec(&info->xmit_lock);
 	if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue))) {
-		if (m->mdmreg[REG_DXMT] & BIT_DXMT) {
-			isdn_tty_senddown(info);
-			isdn_tty_tint(info);
-		}
-		isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1);
+		isdn_tty_modem_xmit(info);
 	}
 out:
 	if (from_user)
@@ -1278,7 +1372,7 @@
 	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_flush_chars"))
 		return;
 	if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue)))
-		isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1);
+		isdn_tty_modem_xmit(info);
 }
 
 /*
@@ -1666,13 +1760,16 @@
 isdn_tty_open(struct tty_struct *tty, struct file *filp)
 {
 	modem_info *info;
-	int retval,
-	 line;
+	int retval, line;
+
+	/* FIXME. This is not unload-race free AFAICS */
+
+	MOD_INC_USE_COUNT;
 
 	line = minor(tty->device) - tty->driver.minor_start;
 	if (line < 0 || line > ISDN_MAX_CHANNELS)
 		return -ENODEV;
-	info = &dev->mdm.info[line];
+	info = &isdn_mdm.info[line];
 	if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_open"))
 		return -ENODEV;
 #ifdef ISDN_DEBUG_MODEM_OPEN
@@ -1726,7 +1823,8 @@
 	ulong timeout;
 
 	if (!info || isdn_tty_paranoia_check(info, tty->device, "isdn_tty_close"))
-		return;
+		goto out;
+
 	save_flags(flags);
 	cli();
 	if (tty_hung_up_p(filp)) {
@@ -1734,7 +1832,7 @@
 #ifdef ISDN_DEBUG_MODEM_OPEN
 		printk(KERN_DEBUG "isdn_tty_close return after tty_hung_up_p\n");
 #endif
-		return;
+		goto out;
 	}
 	if ((tty->count == 1) && (info->count != 1)) {
 		/*
@@ -1758,7 +1856,7 @@
 #ifdef ISDN_DEBUG_MODEM_OPEN
 		printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n");
 #endif
-		return;
+		goto out;
 	}
 	info->flags |= ISDN_ASYNC_CLOSING;
 	/*
@@ -1813,6 +1911,8 @@
 #ifdef ISDN_DEBUG_MODEM_OPEN
 	printk(KERN_DEBUG "isdn_tty_close normal exit\n");
 #endif
+ out:
+	MOD_DEC_USE_COUNT;
 }
 
 /*
@@ -1942,11 +2042,11 @@
 int
 isdn_tty_init(void)
 {
-	modem *m;
+	struct isdn_modem *m;
 	int i, retval;
 	modem_info *info;
 
-	m = &dev->mdm;
+	m = &isdn_mdm;
 	memset(&m->tty_modem, 0, sizeof(struct tty_driver));
 	m->tty_modem.magic = TTY_DRIVER_MAGIC;
 	m->tty_modem.name = isdn_ttyname_ttyI;
@@ -2025,7 +2125,22 @@
 		info->normal_termios = m->tty_modem.init_termios;
 		init_waitqueue_head(&info->open_wait);
 		init_waitqueue_head(&info->close_wait);
-		info->isdn_slot = -1;
+		info->isdn_slot = NULL;
+		init_timer(&info->escape_timer);
+		info->escape_timer.data = (unsigned long) info;
+		info->escape_timer.function = isdn_tty_escape_timer;
+		init_timer(&info->ring_timer);
+		info->ring_timer.data = (unsigned long) info;
+		info->ring_timer.function = isdn_tty_ring_timer;
+		init_timer(&info->connect_timer);
+		info->connect_timer.data = (unsigned long) info;
+		info->connect_timer.function = isdn_tty_connect_timer;
+		init_timer(&info->read_timer);
+		info->read_timer.data = (unsigned long) info;
+		info->read_timer.function = isdn_tty_readmodem;
+		init_waitqueue_head(&info->open_wait);
+		init_waitqueue_head(&info->close_wait);
+		skb_queue_head_init(&info->rpqueue);
 		info->xmit_size = ISDN_SERIAL_XMIT_SIZE;
 		skb_queue_head_init(&info->xmit_queue);
 #ifdef CONFIG_ISDN_AUDIO
@@ -2052,9 +2167,9 @@
 #endif
 		kfree(info->xmit_buf - 4);
 	}
-	tty_unregister_driver(&dev->mdm.cua_modem);
+	tty_unregister_driver(&isdn_mdm.cua_modem);
  err_unregister_tty:
-	tty_unregister_driver(&dev->mdm.tty_modem);
+	tty_unregister_driver(&isdn_mdm.tty_modem);
  err:
 	return retval;
 }
@@ -2062,20 +2177,20 @@
 void
 isdn_tty_exit(void)
 {
-	modem *m = &dev->mdm;
 	modem_info *info;
 	int i;
 
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		info = &m->info[i];
+		info = &isdn_mdm.info[i];
 		isdn_tty_cleanup_xmit(info);
+		skb_queue_purge(&info->rpqueue);
 #ifdef CONFIG_ISDN_TTY_FAX
 		kfree(info->fax);
 #endif
 		kfree(info->xmit_buf - 4);
 	}
-	tty_unregister_driver(&dev->mdm.cua_modem);
-	tty_unregister_driver(&dev->mdm.tty_modem);
+	tty_unregister_driver(&isdn_mdm.cua_modem);
+	tty_unregister_driver(&isdn_mdm.tty_modem);
 }
 
 /*
@@ -2141,12 +2256,11 @@
  *      CID is longer.
  */
 int
-isdn_tty_find_icall(int di, int ch, setup_parm *setup)
+isdn_tty_find_icall(struct isdn_slot *slot, setup_parm *setup)
 {
 	char *eaz;
 	int i;
 	int wret;
-	int idx;
 	int si1;
 	int si2;
 	char *nr;
@@ -2171,16 +2285,15 @@
 	save_flags(flags);
 	cli();
 	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		modem_info *info = &dev->mdm.info[i];
+		modem_info *info = &isdn_mdm.info[i];
 
                 if (info->count == 0)
                     continue;
 		if ((info->emu.mdmreg[REG_SI1] & si2bit[si1]) &&  /* SI1 is matching */
 		    (info->emu.mdmreg[REG_SI2] == si2))	{         /* SI2 is matching */
-			idx = isdn_dc2minor(di, ch);
 #ifdef ISDN_DEBUG_MODEM_ICALL
 			printk(KERN_DEBUG "m_fi: match1 wret=%d\n", wret);
-			printk(KERN_DEBUG "m_fi: idx=%d flags=%08lx drv=%d ch=%d usg=%d\n", idx,
+			printk(KERN_DEBUG "m_fi: sl=%d flags=%08lx drv=%d ch=%d usg=%d\n", sl,
 			       info->flags, info->isdn_driver, info->isdn_channel,
 			       dev->usage[idx]);
 #endif
@@ -2188,27 +2301,27 @@
 #ifndef FIX_FILE_TRANSFER
 				(info->flags & ISDN_ASYNC_NORMAL_ACTIVE) &&
 #endif
-				(info->isdn_slot == -1) &&
-				(USG_NONE(isdn_slot_usage(idx)))) {
+				(!info->isdn_slot)) {
 				int matchret;
 
-				if ((matchret = isdn_tty_match_icall(eaz, &info->emu, di)) > wret)
+				if ((matchret = isdn_tty_match_icall(eaz, &info->emu, slot->di)) > wret)
 					wret = matchret;
 				if (!matchret) {                  /* EAZ is matching */
-					info->isdn_slot = idx;
-					isdn_slot_set_m_idx(idx, info->line);
-					strcpy(isdn_slot_num(idx), nr);
+					info->isdn_slot = slot;
+					slot->usage |= isdn_calc_usage(si1, info->emu.mdmreg[REG_L2PROT]);
+					slot->priv = info;
+					slot->event_cb = isdn_tty_event_callback;
+					strcpy(slot->num, nr);
 					strcpy(info->emu.cpn, eaz);
 					info->emu.mdmreg[REG_SI1I] = si2bit[si1];
 					info->emu.mdmreg[REG_PLAN] = setup->plan;
 					info->emu.mdmreg[REG_SCREEN] = setup->screen;
-					isdn_slot_set_usage(idx, (isdn_slot_usage(idx) & ISDN_USAGE_EXCLUSIVE) | isdn_calc_usage(si1, info->emu.mdmreg[REG_L2PROT]));
 					restore_flags(flags);
 					printk(KERN_INFO "isdn_tty: call from %s, -> RING on ttyI%d\n", nr,
 					       info->line);
 					info->msr |= UART_MSR_RI;
 					isdn_tty_modem_result(RESULT_RING, info);
-					isdn_timer_ctrl(ISDN_TIMER_MODEMRING, 1);
+					mod_timer(&info->ring_timer, jiffies + RING_TIMEOUT);
 					return 1;
 				}
 			}
@@ -2216,24 +2329,22 @@
 	}
 	restore_flags(flags);
 	printk(KERN_INFO "isdn_tty: call from %s -> %s %s\n", nr, eaz,
-	       ((dev->drv[di]->flags & DRV_FLAG_REJBUS) && (wret != 2))? "rejected" : "ignored");
+	       (wret != 2)? "rejected" : "ignored");
 	return (wret == 2)?3:0;
 }
 
 #define TTY_IS_ACTIVE(info) \
 	(info->flags & (ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE))
 
-int
-isdn_tty_stat_callback(int i, isdn_ctrl *c)
+static int
+isdn_tty_stat_callback(struct isdn_slot *slot, isdn_ctrl *c)
 {
-	int mi;
+	isdn_ctrl cmd;
 	modem_info *info;
 	char *e;
 
-	if (i < 0)
-		return 0;
-	if ((mi = isdn_slot_m_idx(i)) >= 0) {
-		info = &dev->mdm.info[mi];
+	info = slot->priv;
+	if (1) {
 		switch (c->command) {
                         case ISDN_STAT_CINF:
                                 printk(KERN_DEBUG "CHARGEINFO on ttyI%d: %ld %s\n", info->line, c->arg, c->parm.num);
@@ -2246,15 +2357,12 @@
 #ifdef ISDN_TTY_STAT_DEBUG
 				printk(KERN_DEBUG "tty_STAT_BSENT ttyI%d\n", info->line);
 #endif
-				if ((info->isdn_slot == isdn_dc2minor(c->driver, c->arg))) {
-					info->msr |= UART_MSR_CTS;
-					if (info->send_outstanding)
-						if (!(--info->send_outstanding))
-							info->lsr |= UART_LSR_TEMT;
-					isdn_tty_tint(info);
-					return 1;
-				}
-				break;
+				info->msr |= UART_MSR_CTS;
+				if (info->send_outstanding)
+					if (!(--info->send_outstanding))
+						info->lsr |= UART_LSR_TEMT;
+				isdn_tty_tint(info);
+				return 1;
 			case ISDN_STAT_CAUSE:
 #ifdef ISDN_TTY_STAT_DEBUG
 				printk(KERN_DEBUG "tty_STAT_CAUSE ttyI%d\n", info->line);
@@ -2281,6 +2389,7 @@
 #endif
 				if (TTY_IS_ACTIVE(info)) {
 					if (info->dialing == 1) {
+						isdn_slot_command(info->isdn_slot, ISDN_CMD_ACCEPTB, &cmd);
 						info->dialing = 2;
 						return 1;
 					}
@@ -2330,14 +2439,14 @@
 						info->last_dir = 0;
 					info->dialing = 0;
 					info->rcvsched = 1;
-					if (USG_MODEM(isdn_slot_usage(i))) {
+					if (USG_MODEM(slot->usage)) {
 						if (info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) {
 							strcpy(info->emu.connmsg, c->parm.num);
 							isdn_tty_modem_result(RESULT_CONNECT, info);
 						} else
 							isdn_tty_modem_result(RESULT_CONNECT64000, info);
 					}
-					if (USG_VOICE(isdn_slot_usage(i)))
+					if (USG_VOICE(slot->usage))
 						isdn_tty_modem_result(RESULT_VCON, info);
 					return 1;
 				}
@@ -2354,34 +2463,6 @@
 					return 1;
 				}
 				break;
-			case ISDN_STAT_NODCH:
-#ifdef ISDN_TTY_STAT_DEBUG
-				printk(KERN_DEBUG "tty_STAT_NODCH ttyI%d\n", info->line);
-#endif
-				if (TTY_IS_ACTIVE(info)) {
-					if (info->dialing) {
-						info->dialing = 0;
-						info->last_l2 = -1;
-						info->last_si = 0;
-						sprintf(info->last_cause, "0000");
-						isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
-					}
-					isdn_tty_modem_hup(info, 0);
-					return 1;
-				}
-				break;
-			case ISDN_STAT_UNLOAD:
-#ifdef ISDN_TTY_STAT_DEBUG
-				printk(KERN_DEBUG "tty_STAT_UNLOAD ttyI%d\n", info->line);
-#endif
-				for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-					info = &dev->mdm.info[i];
-					if (isdn_slot_driver(info->isdn_slot) == c->driver) {
-						if (info->online)
-							isdn_tty_modem_hup(info, 1);
-					}
-				}
-				return 1;
 #ifdef CONFIG_ISDN_TTY_FAX
 			case ISDN_STAT_FAXIND:
 				if (TTY_IS_ACTIVE(info)) {
@@ -2428,7 +2509,6 @@
 	ulong flags;
 	struct sk_buff *skb = 0;
 	char *sp = 0;
-	int di,ch;
 
 	if (!msg) {
 		printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n");
@@ -2444,9 +2524,8 @@
 
 	/* use queue instead of direct flip, if online and */
 	/* data is in queue or flip buffer is full */
-	di = isdn_slot_driver(info->isdn_slot); ch = isdn_slot_channel(info->isdn_slot);
 	if ((info->online) && (((tty->flip.count + strlen(msg)) >= TTY_FLIPBUF_SIZE) ||
-	    (!skb_queue_empty(&dev->drv[di]->rpqueue[ch])))) {
+	    (!skb_queue_empty(&info->rpqueue)))) {
 		skb = alloc_skb(strlen(msg)
 #ifdef CONFIG_ISDN_AUDIO
 			+ sizeof(isdn_audio_skb)
@@ -2489,13 +2568,11 @@
 		}
 	}
 	if (skb) {
-		__skb_queue_tail(&dev->drv[di]->rpqueue[ch], skb);
-		dev->drv[di]->rcvcount[ch] += skb->len;
+		isdn_tty_queue_tail(info, skb, skb->len);
 		restore_flags(flags);
 		/* Schedule dequeuing */
-		if ((dev->modempoll) && (info->rcvsched))
-			isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 1);
-
+		if (dev->modempoll && info->rcvsched)
+			mod_timer(&info->read_timer, jiffies + 4);
 	} else {
 		restore_flags(flags);
 		schedule_delayed_work(&tty->flip.work, 1);
@@ -2508,7 +2585,7 @@
 static void
 isdn_tty_on_hook(modem_info * info)
 {
-	if (info->isdn_slot >= 0) {
+	if (info->isdn_slot) {
 #ifdef ISDN_DEBUG_MODEM_HUP
 		printk(KERN_DEBUG "Mhup in isdn_tty_on_hook\n");
 #endif
@@ -2525,55 +2602,56 @@
 #define PLUSWAIT1 (HZ/2)        /* 0.5 sec. */
 #define PLUSWAIT2 (HZ*3/2)      /* 1.5 sec */
 
+static void
+isdn_tty_escape_timer(unsigned long data)
+{
+	struct modem_info *info = (struct modem_info *) data;
+
+	if (!info->online)
+		return;
+	
+	info->emu.pluscount = 0;
+	info->online = 0;
+	isdn_tty_modem_result(RESULT_OK, info);
+}
+
 /*
  * Check Buffer for Modem-escape-sequence, activate timer-callback to
  * isdn_tty_modem_escape() if sequence found.
- *
- * Parameters:
- *   p          pointer to databuffer
- *   plus       escape-character
- *   count      length of buffer
- *   pluscount  count of valid escape-characters so far
- *   lastplus   timestamp of last character
  */
-static void
-isdn_tty_check_esc(const u_char * p, u_char plus, int count, int *pluscount,
-		   int *lastplus, int from_user)
+static void isdn_tty_check_esc(struct modem_info *info, 
+			       const unsigned char *p, int count)
 {
-	char cbuf[3];
+	unsigned char plus = info->emu.mdmreg[REG_ESC];
 
 	if (plus > 127)
 		return;
+
 	if (count > 3) {
 		p += count - 3;
 		count = 3;
-		*pluscount = 0;
+		info->emu.pluscount = 0;
+		info->emu.lastplus = jiffies;
 	}
-	if (from_user) {
-		if (copy_from_user(cbuf, p, count))
-			return;
-		p = cbuf;
-	}
-	while (count > 0) {
-		if (*(p++) == plus) {
-			if ((*pluscount)++) {
-				/* Time since last '+' > 0.5 sec. ? */
-				if (time_after(jiffies, *lastplus + PLUSWAIT1))
-					*pluscount = 1;
-			} else {
-				/* Time since last non-'+' < 1.5 sec. ? */
-				if (time_before(jiffies, *lastplus + PLUSWAIT2))
-					*pluscount = 0;
-			}
-			if ((*pluscount == 3) && (count == 1))
-				isdn_timer_ctrl(ISDN_TIMER_MODEMPLUS, 1);
-			if (*pluscount > 3)
-				*pluscount = 1;
-		} else
-			*pluscount = 0;
-		*lastplus = jiffies;
-		count--;
+	for (; count > 0; info->emu.lastplus = jiffies, count--) {
+		if (*(p++) != plus) {
+			info->emu.pluscount = 0;
+			continue;
+		}
+		if (info->emu.pluscount == 0) {
+			if (time_after(jiffies, info->emu.lastplus + PLUSWAIT2))
+				info->emu.pluscount = 1;
+		} else {
+			if (time_after(jiffies, info->emu.lastplus + PLUSWAIT1))
+				info->emu.pluscount = 1;
+			else
+				info->emu.pluscount++;
+		}
 	}
+	if (info->emu.pluscount == 3)
+		mod_timer(&info->escape_timer, jiffies + PLUSWAIT2);
+	else
+		del_timer(&info->escape_timer);
 }
 
 /*
@@ -2668,7 +2746,7 @@
 			    /* print CID, _before_ _every_ ring */
 			    if (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE)) {
 				    isdn_tty_at_cout("\r\nCALLER NUMBER: ", info);
-				    isdn_tty_at_cout(isdn_slot_num(info->isdn_slot), info);
+				    isdn_tty_at_cout(info->isdn_slot->num, info);
 				    if (m->mdmreg[REG_CDN] & BIT_CDN) {
 					    isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
 					    isdn_tty_at_cout(info->emu.cpn, info);
@@ -2697,7 +2775,7 @@
 					    (m->mdmreg[REG_RINGCNT] == 1)) {
 						isdn_tty_at_cout("\r\n", info);
 						isdn_tty_at_cout("CALLER NUMBER: ", info);
-						isdn_tty_at_cout(isdn_slot_num(info->isdn_slot), info);
+						isdn_tty_at_cout(info->isdn_slot->num, info);
 						if (m->mdmreg[REG_CDN] & BIT_CDN) {
 							isdn_tty_at_cout("\r\nCALLED NUMBER: ", info);
 							isdn_tty_at_cout(info->emu.cpn, info);
@@ -3209,7 +3287,7 @@
 	if (info->msr & UART_MSR_RI) {
 		/* Accept incoming call */
 		info->last_dir = 0;
-		strcpy(info->last_num, isdn_slot_num(info->isdn_slot));
+		strcpy(info->last_num, info->isdn_slot->num);
 		m->mdmreg[REG_RINGCNT] = 0;
 		info->msr &= ~UART_MSR_RI;
 		l2 = m->mdmreg[REG_L2PROT];
@@ -3235,9 +3313,8 @@
 #endif
 		isdn_slot_command(info->isdn_slot, ISDN_CMD_SETL3, &cmd);
 		info->dialing = 16;
-		info->emu.carrierwait = 0;
 		isdn_slot_command(info->isdn_slot, ISDN_CMD_ACCEPTD, &cmd);
-		isdn_timer_ctrl(ISDN_TIMER_CARRIER, 1);
+		mod_timer(&info->connect_timer, jiffies + info->emu.mdmreg[REG_WAITC] * HZ); 
 	} else
 		isdn_tty_modem_result(RESULT_NO_ANSWER, info);
 }
@@ -3907,99 +3984,34 @@
 	return total;
 }
 
-/*
- * Switch all modem-channels who are online and got a valid
- * escape-sequence 1.5 seconds ago, to command-mode.
- * This function is called every second via timer-interrupt from within
- * timer-dispatcher isdn_timer_function()
- */
-void
-isdn_tty_modem_escape(void)
+static void
+isdn_tty_ring_timer(unsigned long data)
 {
-	int ton = 0;
-	int i;
-	int midx;
+	struct modem_info *info = (struct modem_info *) data;
 
-	for (i = 0; i < ISDN_MAX_CHANNELS; i++)
-		if (USG_MODEM(isdn_slot_usage(i)))
-			if ((midx = isdn_slot_m_idx(i)) >= 0) {
-				modem_info *info = &dev->mdm.info[midx];
-				if (info->online) {
-					ton = 1;
-					if ((info->emu.pluscount == 3) &&
-					    time_after(jiffies , info->emu.lastplus + PLUSWAIT2)) {
-						info->emu.pluscount = 0;
-						info->online = 0;
-						isdn_tty_modem_result(RESULT_OK, info);
-					}
-				}
-			}
-	isdn_timer_ctrl(ISDN_TIMER_MODEMPLUS, ton);
-}
-
-/*
- * Put a RING-message to all modem-channels who have the RI-bit set.
- * This function is called every second via timer-interrupt from within
- * timer-dispatcher isdn_timer_function()
- */
-void
-isdn_tty_modem_ring(void)
-{
-	int ton = 0;
-	int i;
+	if (!(info->msr & UART_MSR_RI))
+		return;
 
-	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		modem_info *info = &dev->mdm.info[i];
-		if (info->msr & UART_MSR_RI) {
-			ton = 1;
-			isdn_tty_modem_result(RESULT_RING, info);
-		}
-	}
-	isdn_timer_ctrl(ISDN_TIMER_MODEMRING, ton);
+	isdn_tty_modem_result(RESULT_RING, info);
+	mod_timer(&info->ring_timer, jiffies + RING_TIMEOUT);
 }
-
-/*
- * For all online tty's, try sending data to
- * the lower levels.
- */
-void
-isdn_tty_modem_xmit(void)
+	
+static void
+isdn_tty_modem_xmit(struct modem_info *info)
 {
-	int ton = 1;
-	int i;
-
-	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		modem_info *info = &dev->mdm.info[i];
-		if (info->online) {
-			ton = 1;
-			isdn_tty_senddown(info);
-			isdn_tty_tint(info);
-		}
-	}
-	isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, ton);
+	isdn_tty_senddown(info);
+	isdn_tty_tint(info);
 }
 
-/*
- * Check all channels if we have a 'no carrier' timeout.
- * Timeout value is set by Register S7.
- */
-void
-isdn_tty_carrier_timeout(void)
+static void
+isdn_tty_connect_timer(unsigned long data)
 {
-	int ton = 0;
-	int i;
+	struct modem_info *info = (struct modem_info *) data;
 
-	for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
-		modem_info *info = &dev->mdm.info[i];
-		if (info->dialing) {
-			if (info->emu.carrierwait++ > info->emu.mdmreg[REG_WAITC]) {
-				info->dialing = 0;
-				isdn_tty_modem_result(RESULT_NO_CARRIER, info);
-				isdn_tty_modem_hup(info, 1);
-			}
-			else
-				ton = 1;
-		}
+	if (info->dialing) {
+		info->dialing = 0;
+		isdn_tty_modem_result(RESULT_NO_CARRIER, info);
+		isdn_tty_modem_hup(info, 1);
 	}
-	isdn_timer_ctrl(ISDN_TIMER_CARRIER, ton);
 }
+
diff -Nru a/drivers/isdn/i4l/isdn_tty.h b/drivers/isdn/i4l/isdn_tty.h
--- a/drivers/isdn/i4l/isdn_tty.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/isdn/i4l/isdn_tty.h	Wed Oct 30 16:44:29 2002
@@ -1,13 +1,10 @@
-/* $Id: isdn_tty.h,v 1.22.6.2 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, tty related functions (linklevel).
+/* Linux ISDN subsystem, tty related functions
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #include <linux/config.h>
@@ -101,16 +98,9 @@
 	((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
 	 (info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS2))
 
-extern void isdn_tty_modem_escape(void);
-extern void isdn_tty_modem_ring(void);
-extern void isdn_tty_carrier_timeout(void);
-extern void isdn_tty_modem_xmit(void);
 extern int isdn_tty_init(void);
-extern void isdn_tty_readmodem(void);
-extern int isdn_tty_find_icall(int, int, setup_parm *);
+extern int isdn_tty_find_icall(struct isdn_slot *slot, setup_parm *setup);
 extern void isdn_tty_cleanup_xmit(modem_info *);
-extern int isdn_tty_stat_callback(int, isdn_ctrl *);
-extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);
 extern int isdn_tty_capi_facility(capi_msg *cm); 
 extern void isdn_tty_at_cout(char *, modem_info *);
 extern void isdn_tty_modem_hup(modem_info *, int);
@@ -122,3 +112,22 @@
 
 extern int isdn_tty_init(void);
 extern void isdn_tty_exit(void);
+
+struct isdn_modem {
+  int                refcount;			   /* Number of opens        */
+  struct tty_driver  tty_modem;			   /* tty-device             */
+  struct tty_driver  cua_modem;			   /* cua-device             */
+  struct tty_struct  *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */
+  struct termios     *modem_termios[ISDN_MAX_CHANNELS];
+  struct termios     *modem_termios_locked[ISDN_MAX_CHANNELS];
+  modem_info         info[ISDN_MAX_CHANNELS];	   /* Private data           */
+};
+
+extern struct isdn_modem isdn_mdm;
+
+static inline void
+isdn_tty_queue_tail(modem_info *info, struct sk_buff *skb, int len)
+{
+	__skb_queue_tail(&info->rpqueue, skb);
+	info->rcvcount += len;
+}
diff -Nru a/drivers/isdn/i4l/isdn_ttyfax.c b/drivers/isdn/i4l/isdn_ttyfax.c
--- a/drivers/isdn/i4l/isdn_ttyfax.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/isdn/i4l/isdn_ttyfax.c	Wed Oct 30 16:44:19 2002
@@ -1,6 +1,4 @@
-/* $Id: isdn_ttyfax.c,v 1.7.6.2 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, tty_fax AT-command emulator (linklevel).
+/* Linux ISDN subsystem, tty_fax AT-command emulator
  *
  * Copyright 1999    by Armin Schindler (mac@melware.de)
  * Copyright 1999    by Ralf Spachmann (mel@melware.de)
@@ -8,7 +6,6 @@
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #undef ISDN_TTY_FAX_STAT_DEBUG
@@ -19,26 +16,8 @@
 #include "isdn_tty.h"
 #include "isdn_ttyfax.h"
 
-
-static char *isdn_tty_fax_revision = "$Revision: 1.7.6.2 $";
-
 #define PARSE_ERROR1 { isdn_tty_fax_modem_result(1, info); return 1; }
 
-static char *
-isdn_getrev(const char *revision)
-{
-	char *rev;
-	char *p;
-
-	if ((p = strchr(revision, ':'))) {
-		rev = p + 2;
-		p = strchr(rev, '$');
-		*--p = 0;
-	} else
-		rev = "???";
-	return rev;
-}
-
 /*
  * Fax Class 2 Modem results
  *
@@ -74,7 +53,7 @@
 		case 2:	/* +FCON */
 			/* Append CPN, if enabled */
 			if ((m->mdmreg[REG_CPNFCON] & BIT_CPNFCON) &&
-				(!(isdn_slot_usage(info->isdn_slot) & ISDN_USAGE_OUTGOING))) {
+				(!(info->isdn_slot->usage & ISDN_USAGE_OUTGOING))) {
 				sprintf(rs, "/%s", m->cpn);
 				isdn_tty_at_cout(rs, info);
 			}
@@ -322,7 +301,8 @@
 	static char *cmd[] =
 	{"AE", "TS", "RS", "TM", "RM", "TH", "RH"};
 	isdn_ctrl c;
-	int par, i;
+	int par;
+	struct isdn_slot *slot;
 	long flags;
 
 	for (c.parm.aux.cmd = 0; c.parm.aux.cmd < 7; c.parm.aux.cmd++)
@@ -364,7 +344,7 @@
 	printk(KERN_DEBUG "isdn_tty_cmd_FCLASS1 %d/%d/%d)\n",
 	       c.parm.aux.cmd, c.parm.aux.subcmd, c.parm.aux.para[0]);
 #endif
-	if (info->isdn_slot < 0) {
+	if (!info->isdn_slot) {
 		save_flags(flags);
 		cli();
 		if ((c.parm.aux.subcmd == AT_EQ_VALUE) ||
@@ -373,18 +353,16 @@
 			PARSE_ERROR1;
 		}
 		/* get a temporary connection to the first free fax driver */
-		i = isdn_get_free_slot(ISDN_USAGE_FAX, ISDN_PROTO_L2_FAX,
+		slot = isdn_get_free_slot(ISDN_USAGE_FAX, ISDN_PROTO_L2_FAX,
 				       ISDN_PROTO_L3_FCLASS1, -1, -1, "00");
-		if (i < 0) {
+		if (!slot) {
 			restore_flags(flags);
 			PARSE_ERROR1;
 		}
-		info->isdn_slot = i;
-		isdn_slot_set_m_idx(i, info->line);
-		isdn_slot_command(info->isdn_slot, ISDN_CMD_FAXCMD, &c);
-		isdn_slot_free(info->isdn_slot);
-		isdn_slot_set_m_idx(i, -1);
-		info->isdn_slot = -1;
+		info->isdn_slot = slot;
+		isdn_slot_command(slot, ISDN_CMD_FAXCMD, &c);
+		isdn_slot_free(slot);
+		info->isdn_slot = NULL;
 		restore_flags(flags);
 	} else {
 		isdn_slot_command(info->isdn_slot, ISDN_CMD_FAXCMD, &c);
@@ -1065,8 +1043,7 @@
 #ifdef ISDN_TTY_FAX_STAT_DEBUG
 		printk(KERN_DEBUG "isdn_tty: FREV?\n");
 #endif
-		strcpy(rss, isdn_tty_fax_revision);
-		sprintf(rs, "\r\nRev: %s", isdn_getrev(rss));
+		sprintf(rs, "\r\nRev: 1.0");
 		isdn_tty_at_cout(rs, info);
 		return 0;
 	}
diff -Nru a/drivers/isdn/i4l/isdn_ttyfax.h b/drivers/isdn/i4l/isdn_ttyfax.h
--- a/drivers/isdn/i4l/isdn_ttyfax.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/i4l/isdn_ttyfax.h	Wed Oct 30 16:44:27 2002
@@ -1,6 +1,4 @@
-/* $Id: isdn_ttyfax.h,v 1.2.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, tty_fax related functions (linklevel).
+/* Linux ISDN subsystem, tty_fax related functions
  *
  * Copyright 1999   by Armin Schindler (mac@melware.de)
  * Copyright 1999   by Ralf Spachmann (mel@melware.de)
@@ -8,7 +6,6 @@
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 
diff -Nru a/drivers/isdn/i4l/isdn_v110.c b/drivers/isdn/i4l/isdn_v110.c
--- a/drivers/isdn/i4l/isdn_v110.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/isdn/i4l/isdn_v110.c	Wed Oct 30 16:44:28 2002
@@ -1,12 +1,9 @@
-/* $Id: isdn_v110.c,v 1.5.6.4 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, V.110 related functions (linklevel).
+/* Linux ISDN subsystem, V.110
  *
  * Copyright by Thomas Pfeiffer (pfeiffer@pds.de)
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #include <linux/string.h>
@@ -16,11 +13,10 @@
 
 #include <linux/isdn.h>
 #include "isdn_v110.h"
+#include "isdn_common.h"
 
 #undef ISDN_V110_DEBUG
 
-char *isdn_v110_revision = "$Revision: 1.5.6.4 $";
-
 #define V110_38400 255
 #define V110_19200  15
 #define V110_9600    3
@@ -86,7 +82,7 @@
  * structures and returns a pointer to these.
  */
 static isdn_v110_stream *
-isdn_v110_open(unsigned char key, int hdrlen, int maxsize)
+do_isdn_v110_open(unsigned char key, int hdrlen, int maxsize)
 {
 	int i;
 	isdn_v110_stream *v;
@@ -131,8 +127,8 @@
 }
 
 /* isdn_v110_close frees private V.110 data structures */
-void
-isdn_v110_close(isdn_v110_stream * v)
+static void
+do_isdn_v110_close(isdn_v110_stream * v)
 {
 	if (v == NULL)
 		return;
@@ -514,99 +510,94 @@
 	return nskb;
 }
 
+
+void
+isdn_v110_open(struct isdn_slot *slot, struct isdn_v110 *iv110)
+{	
+	isdn_v110_stream *v;
+	int hdrlen = isdn_slot_hdrlen(slot);
+	int maxsize = isdn_slot_maxbufsize(slot);
+
+	atomic_inc(&iv110->v110use);
+	switch (iv110->v110emu) {
+	case ISDN_PROTO_L2_V11096:
+		iv110->v110 = do_isdn_v110_open(V110_9600, hdrlen, maxsize);
+		break;
+	case ISDN_PROTO_L2_V11019:
+		iv110->v110 = do_isdn_v110_open(V110_19200, hdrlen, maxsize);
+		break;
+	case ISDN_PROTO_L2_V11038:
+		iv110->v110 = do_isdn_v110_open(V110_38400, hdrlen, maxsize);
+		break;
+	}
+	if ((v = iv110->v110)) {
+		while (v->SyncInit) {
+			struct sk_buff *skb = isdn_v110_sync(v);
+			if (isdn_slot_write(slot, skb) <= 0) {
+				dev_kfree_skb(skb);
+				/* Unable to send, try later */
+				break;
+			}
+			v->SyncInit--;
+			v->skbidle++;
+		}
+	} else
+		printk(KERN_WARNING "isdn_v110: Couldn't open stream\n");
+	atomic_dec(&iv110->v110use);
+}
+
+void
+isdn_v110_close(struct isdn_slot *slot, struct isdn_v110 *iv110)
+{
+	while (1) {
+		atomic_inc(&iv110->v110use);
+		if (atomic_dec_and_test(&iv110->v110use)) {
+			do_isdn_v110_close(iv110->v110);
+			iv110->v110 = NULL;
+			break;
+		}
+	}
+}
+
 int
-isdn_v110_stat_callback(struct isdn_v110 *iv110, isdn_ctrl *c)
+isdn_v110_bsent(struct isdn_slot *slot, struct isdn_v110 *iv110)
 {
-	isdn_v110_stream *v = NULL;
-	int i;
-	int ret;
+	isdn_v110_stream *v = iv110->v110;
+	int i, ret;
 
-	switch (c->command) {
-		case ISDN_STAT_BSENT:
-                        /* Keep the send-queue of the driver filled
-			 * with frames:
-			 * If number of outstanding frames < 3,
-			 * send down an Idle-Frame (or an Sync-Frame, if
-			 * v->SyncInit != 0). 
-			 */
-			if (!(v = iv110->v110))
-				return 0;
-			atomic_inc(&iv110->v110use);
-			if (v->skbidle > 0) {
-				v->skbidle--;
-				ret = 1;
+	/* Keep the send-queue of the driver filled
+	 * with frames:
+	 * If number of outstanding frames < 3,
+	 * send down an Idle-Frame (or an Sync-Frame, if
+	 * v->SyncInit != 0). 
+	 */
+	atomic_inc(&iv110->v110use);
+	if (v->skbidle > 0) {
+		v->skbidle--;
+		ret = 1;
+	} else {
+		if (v->skbuser > 0)
+			v->skbuser--;
+		ret = 0;
+	}
+	for (i = v->skbuser + v->skbidle; i < 2; i++) {
+		struct sk_buff *skb;
+		if (v->SyncInit > 0)
+			skb = isdn_v110_sync(v);
+		else
+			skb = isdn_v110_idle(v);
+		if (skb) {
+			if (isdn_slot_write(slot, skb) <= 0) {
+				dev_kfree_skb(skb);
+				break;
 			} else {
-				if (v->skbuser > 0)
-					v->skbuser--;
-				ret = 0;
-			}
-			for (i = v->skbuser + v->skbidle; i < 2; i++) {
-				struct sk_buff *skb;
-				if (v->SyncInit > 0)
-					skb = isdn_v110_sync(v);
-				else
-					skb = isdn_v110_idle(v);
-				if (skb) {
-					if (dev->drv[c->driver]->interface->writebuf_skb(c->driver, c->arg, 1, skb) <= 0) {
-						dev_kfree_skb(skb);
-						break;
-					} else {
-						if (v->SyncInit)
-							v->SyncInit--;
-						v->skbidle++;
-					}
-				} else
-					break;
-			}
-			atomic_dec(&iv110->v110use);
-			return ret;
-		case ISDN_STAT_DHUP:
-		case ISDN_STAT_BHUP:
-			while (1) {
-				atomic_inc(&iv110->v110use);
-				if (atomic_dec_and_test(&iv110->v110use)) {
-					isdn_v110_close(iv110->v110);
-					iv110->v110 = NULL;
-					break;
-				}
-				sti();
+				if (v->SyncInit)
+					v->SyncInit--;
+				v->skbidle++;
 			}
+		} else
 			break;
-		case ISDN_STAT_BCONN:
-			if (iv110->v110emu && (iv110->v110 == NULL)) {
-				int hdrlen = dev->drv[c->driver]->interface->hl_hdrlen;
-				int maxsize = dev->drv[c->driver]->interface->maxbufsize;
-				atomic_inc(&iv110->v110use);
-				switch (iv110->v110emu) {
-					case ISDN_PROTO_L2_V11096:
-						iv110->v110 = isdn_v110_open(V110_9600, hdrlen, maxsize);
-						break;
-					case ISDN_PROTO_L2_V11019:
-						iv110->v110 = isdn_v110_open(V110_19200, hdrlen, maxsize);
-						break;
-					case ISDN_PROTO_L2_V11038:
-						iv110->v110 = isdn_v110_open(V110_38400, hdrlen, maxsize);
-						break;
-					default:;
-				}
-				if ((v = iv110->v110)) {
-					while (v->SyncInit) {
-						struct sk_buff *skb = isdn_v110_sync(v);
-						if (dev->drv[c->driver]->interface->writebuf_skb(c->driver, c->arg, 1, skb) <= 0) {
-							dev_kfree_skb(skb);
-							/* Unable to send, try later */
-							break;
-						}
-						v->SyncInit--;
-						v->skbidle++;
-					}
-				} else
-					printk(KERN_WARNING "isdn_v110: Couldn't open stream\n");
-				atomic_dec(&iv110->v110use);
-			}
-			break;
-		default:
-			return 0;
 	}
-	return 0;
+	atomic_dec(&iv110->v110use);
+	return ret;
 }
diff -Nru a/drivers/isdn/i4l/isdn_v110.h b/drivers/isdn/i4l/isdn_v110.h
--- a/drivers/isdn/i4l/isdn_v110.h	Wed Oct 30 16:44:30 2002
+++ b/drivers/isdn/i4l/isdn_v110.h	Wed Oct 30 16:44:30 2002
@@ -1,12 +1,9 @@
-/* $Id: isdn_v110.h,v 1.4.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, V.110 related functions (linklevel).
+/* Linux ISDN subsystem, V.110 related functions
  *
  * Copyright by Thomas Pfeiffer (pfeiffer@pds.de)
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #ifndef ISDN_V110_H
@@ -29,7 +26,10 @@
  */
 extern struct sk_buff *isdn_v110_decode(isdn_v110_stream *, struct sk_buff *);
 
-extern int isdn_v110_stat_callback(struct isdn_v110 *v110, isdn_ctrl *);
-extern void isdn_v110_close(isdn_v110_stream * v);
+extern void isdn_v110_open(struct isdn_slot *slot, struct isdn_v110 *iv110);
+
+extern void isdn_v110_close(struct isdn_slot *slot, struct isdn_v110 *iv110);
+
+extern int  isdn_v110_bsent(struct isdn_slot *slot, struct isdn_v110 *iv110);
 
 #endif
diff -Nru a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c
--- a/drivers/isdn/i4l/isdn_x25iface.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/i4l/isdn_x25iface.c	Wed Oct 30 16:44:27 2002
@@ -1,10 +1,10 @@
-/* $Id: isdn_x25iface.c,v 1.9.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * Linux ISDN subsystem, X.25 related functions
+/* * Linux ISDN subsystem, X.25 related functions
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
+ */
+
+/*
  * stuff needed to support the Linux X.25 PLP code on top of devices that
  * can provide a lab_b service using the concap_proto mechanism.
  * This module supports a network interface wich provides lapb_sematics
@@ -17,7 +17,6 @@
  *
  */
 
-/* #include <linux/isdn.h> */
 #include <linux/netdevice.h>
 #include <linux/concap.h>
 #include <linux/wanrouter.h>
diff -Nru a/drivers/isdn/i4l/isdn_x25iface.h b/drivers/isdn/i4l/isdn_x25iface.h
--- a/drivers/isdn/i4l/isdn_x25iface.h	Wed Oct 30 16:44:25 2002
+++ b/drivers/isdn/i4l/isdn_x25iface.h	Wed Oct 30 16:44:25 2002
@@ -1,17 +1,16 @@
-/* $Id: isdn_x25iface.h,v 1.3.6.1 2001/09/23 22:24:32 kai Exp $
- *
- * header for Linux ISDN subsystem, x.25 related functions
+/* Linux ISDN subsystem, x.25 related functions
  *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
- *
  */
 
 #ifndef _LINUX_ISDN_X25IFACE_H
 #define _LINUX_ISDN_X25IFACE_H
 
 #define ISDN_X25IFACE_MAGIC 0x1e75a2b9
-/* #define DEBUG_ISDN_X25 if you want isdn_x25 debugging messages */
+
+#undef DEBUG_ISDN_X25
+
 #ifdef DEBUG_ISDN_X25
 #   define IX25DEBUG(fmt,args...) printk(KERN_DEBUG fmt , ## args)
 #else
@@ -25,8 +24,6 @@
 
 extern struct concap_proto_ops * isdn_x25iface_concap_proto_ops_pt;
 extern struct concap_proto     * isdn_x25iface_proto_new(void);
-
-
 
 #endif
 
diff -Nru a/drivers/isdn/icn/Config.help b/drivers/isdn/icn/Config.help
--- a/drivers/isdn/icn/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-CONFIG_ISDN_DRV_ICN
-  This enables support for two kinds of ISDN-cards made by a German
-  company called ICN.  2B is the standard version for a single ISDN
-  line with two B-channels, 4B supports two ISDN lines.  For running
-  this card, additional firmware is necessary, which has to be
-  downloaded into the card using a utility which is distributed
-  separately.  See <file:Documentation/isdn/README> and
-  <file:Documentation/isdn/README.icn> for more
-  information.
-
diff -Nru a/drivers/isdn/icn/Config.in b/drivers/isdn/icn/Config.in
--- a/drivers/isdn/icn/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,5 +0,0 @@
-#
-# Config.in for ICN ISDN driver
-#
-
-dep_tristate       'ICN 2B and 4B support' CONFIG_ISDN_DRV_ICN $CONFIG_ISDN $CONFIG_ISA
diff -Nru a/drivers/isdn/icn/Kconfig b/drivers/isdn/icn/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/icn/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,16 @@
+#
+# Config.in for ICN ISDN driver
+#
+config ISDN_DRV_ICN
+	tristate "ICN 2B and 4B support"
+	depends on ISDN && ISA
+	help
+	  This enables support for two kinds of ISDN-cards made by a German
+	  company called ICN.  2B is the standard version for a single ISDN
+	  line with two B-channels, 4B supports two ISDN lines.  For running
+	  this card, additional firmware is necessary, which has to be
+	  downloaded into the card using a utility which is distributed
+	  separately.  See <file:Documentation/isdn/README> and
+	  <file:Documentation/isdn/README.icn> for more
+	  information.
+
diff -Nru a/drivers/isdn/icn/Makefile b/drivers/isdn/icn/Makefile
--- a/drivers/isdn/icn/Makefile	Wed Oct 30 16:44:27 2002
+++ b/drivers/isdn/icn/Makefile	Wed Oct 30 16:44:27 2002
@@ -3,5 +3,3 @@
 # Each configuration option enables a list of files.
 
 obj-$(CONFIG_ISDN_DRV_ICN)	+= icn.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
--- a/drivers/isdn/icn/icn.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/isdn/icn/icn.c	Wed Oct 30 16:44:36 2002
@@ -424,7 +424,6 @@
 	{"AOC",            ISDN_STAT_CINF,  6},	/* Charge-info, DSS1-type     */
 	{"CAU",            ISDN_STAT_CAUSE, 7},	/* Cause code                 */
 	{"TEI OK",         ISDN_STAT_RUN,   0},	/* Card connected to wallplug */
-	{"NO D-CHAN",      ISDN_STAT_NODCH, 0},	/* No D-channel available     */
 	{"E_L1: ACT FAIL", ISDN_STAT_BHUP,  8},	/* Layer-1 activation failed  */
 	{"E_L2: DATA LIN", ISDN_STAT_BHUP,  8},	/* Layer-2 data link lost     */
 	{"E_L1: ACTIVATION FAILED",
diff -Nru a/drivers/isdn/isdnloop/Makefile b/drivers/isdn/isdnloop/Makefile
--- a/drivers/isdn/isdnloop/Makefile	Wed Oct 30 16:44:17 2002
+++ b/drivers/isdn/isdnloop/Makefile	Wed Oct 30 16:44:17 2002
@@ -5,6 +5,3 @@
 # Each configuration option enables a list of files.
 
 obj-$(CONFIG_ISDN_DRV_LOOP)	+= isdnloop.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
--- a/drivers/isdn/isdnloop/isdnloop.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/isdn/isdnloop/isdnloop.c	Wed Oct 30 16:44:17 2002
@@ -71,9 +71,6 @@
 				printk(KERN_WARNING "isdnloop: no rcard, skb dropped\n");
 				dev_kfree_skb(skb);
 
-				cmd.command = ISDN_STAT_L1ERR;
-				cmd.parm.errcode = ISDN_STAT_L1ERR_SEND;
-				card->interface.statcallb(&cmd); 
 			};
 			cmd.command = ISDN_STAT_BSENT;
 			cmd.parm.length = len;
@@ -166,7 +163,6 @@
 	{"AOC",            ISDN_STAT_CINF,  6}, /* Charge-info, DSS1-type     */
 	{"CAU",            ISDN_STAT_CAUSE, 7}, /* Cause code                 */
 	{"TEI OK",         ISDN_STAT_RUN,   0}, /* Card connected to wallplug */
-	{"NO D-CHAN",      ISDN_STAT_NODCH, 0}, /* No D-channel available     */
 	{"E_L1: ACT FAIL", ISDN_STAT_BHUP,  8}, /* Layer-1 activation failed  */
 	{"E_L2: DATA LIN", ISDN_STAT_BHUP,  8}, /* Layer-2 data link lost     */
 	{"E_L1: ACTIVATION FAILED",
@@ -1337,6 +1333,9 @@
 							break;
 #endif
 						case ISDN_PROTO_L2_HDLC:
+							sprintf(cbuf, "%02d;BTRA\n", (int) (a & 255) + 1);
+							break;
+						case ISDN_PROTO_L2_TRANS:
 							sprintf(cbuf, "%02d;BTRA\n", (int) (a & 255) + 1);
 							break;
 						default:
diff -Nru a/drivers/isdn/pcbit/Config.help b/drivers/isdn/pcbit/Config.help
--- a/drivers/isdn/pcbit/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-CONFIG_ISDN_DRV_PCBIT
-  This enables support for the PCBIT ISDN-card.  This card is
-  manufactured in Portugal by Octal.  For running this card,
-  additional firmware is necessary, which has to be downloaded into
-  the card using a utility which is distributed separately.  See
-  <file:Documentation/isdn/README> and
-  <file:Documentation/isdn/README.pcbit> for more information.
-
diff -Nru a/drivers/isdn/pcbit/Config.in b/drivers/isdn/pcbit/Config.in
--- a/drivers/isdn/pcbit/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,5 +0,0 @@
-#
-# Config.in for PCBIT ISDN driver
-#
-
-dep_tristate       'PCBIT-D support' CONFIG_ISDN_DRV_PCBIT $CONFIG_ISDN $CONFIG_ISA
diff -Nru a/drivers/isdn/pcbit/Kconfig b/drivers/isdn/pcbit/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/pcbit/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,14 @@
+#
+# Config.in for PCBIT ISDN driver
+#
+config ISDN_DRV_PCBIT
+	tristate "PCBIT-D support"
+	depends on ISDN && ISA
+	help
+	  This enables support for the PCBIT ISDN-card.  This card is
+	  manufactured in Portugal by Octal.  For running this card,
+	  additional firmware is necessary, which has to be downloaded into
+	  the card using a utility which is distributed separately.  See
+	  <file:Documentation/isdn/README> and
+	  <file:Documentation/isdn/README.pcbit> for more information.
+
diff -Nru a/drivers/isdn/pcbit/Makefile b/drivers/isdn/pcbit/Makefile
--- a/drivers/isdn/pcbit/Makefile	Wed Oct 30 16:44:33 2002
+++ b/drivers/isdn/pcbit/Makefile	Wed Oct 30 16:44:33 2002
@@ -7,5 +7,3 @@
 # Multipart objects.
 
 pcbit-objs	:= module.o edss1.o drv.o layer2.o capi.o callbacks.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/sc/Config.help b/drivers/isdn/sc/Config.help
--- a/drivers/isdn/sc/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-CONFIG_ISDN_DRV_SC
-  This enables support for the Spellcaster BRI ISDN boards.  This
-  driver currently builds only in a modularized version ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want, details in <file:Documentation/modules.txt>); the module will
-  be called sc.o.  See <file:Documentation/isdn/README.sc> and
-  <http://www.spellcast.com/> for more information.
-
diff -Nru a/drivers/isdn/sc/Config.in b/drivers/isdn/sc/Config.in
--- a/drivers/isdn/sc/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,5 +0,0 @@
-#
-# Config.in for Spellcaster ISDN driver
-#
-
-dep_tristate       'Spellcaster support' CONFIG_ISDN_DRV_SC $CONFIG_ISDN $CONFIG_ISA
diff -Nru a/drivers/isdn/sc/Kconfig b/drivers/isdn/sc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/sc/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,14 @@
+#
+# Config.in for Spellcaster ISDN driver
+#
+config ISDN_DRV_SC
+	tristate "Spellcaster support"
+	depends on ISDN && ISA
+	help
+	  This enables support for the Spellcaster BRI ISDN boards.  This
+	  driver currently builds only in a modularized version ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want, details in <file:Documentation/modules.txt>); the module will
+	  be called sc.o.  See <file:Documentation/isdn/README.sc> and
+	  <http://www.spellcast.com/> for more information.
+
diff -Nru a/drivers/isdn/sc/Makefile b/drivers/isdn/sc/Makefile
--- a/drivers/isdn/sc/Makefile	Wed Oct 30 16:44:26 2002
+++ b/drivers/isdn/sc/Makefile	Wed Oct 30 16:44:26 2002
@@ -8,5 +8,3 @@
 
 sc-objs		:= shmem.o init.o debug.o packet.o command.o event.o \
 		   ioctl.o interrupt.o message.o timer.o	
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/isdn/tpam/Config.help b/drivers/isdn/tpam/Config.help
--- a/drivers/isdn/tpam/Config.help	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-CONFIG_ISDN_DRV_TPAM
-  This enables support for the Auvertech TurboPAM ISDN-card.
-  For running this card, additional firmware is necessary, which has
-  to be downloaded into the card using a utility which is distributed
-  separately from the Auvertech's web site: <http://www.auvertech.fr/>.
-
-  Please redirect all support questions to support@auvertech.fr.
-
diff -Nru a/drivers/isdn/tpam/Config.in b/drivers/isdn/tpam/Config.in
--- a/drivers/isdn/tpam/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# Config.in for Auvertech TurboPAM ISDN driver
-#
-
-if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
-   dep_tristate    'Auvertech TurboPAM support (EXPERIMENTAL)' CONFIG_ISDN_DRV_TPAM $CONFIG_ISDN $CONFIG_PCI
-fi
diff -Nru a/drivers/isdn/tpam/Kconfig b/drivers/isdn/tpam/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/isdn/tpam/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,14 @@
+#
+# Config.in for Auvertech TurboPAM ISDN driver
+#
+config ISDN_DRV_TPAM
+	tristate "Auvertech TurboPAM support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && ISDN && PCI
+	help
+	  This enables support for the Auvertech TurboPAM ISDN-card.
+	  For running this card, additional firmware is necessary, which has
+	  to be downloaded into the card using a utility which is distributed
+	  separately from the Auvertech's web site: <http://www.auvertech.fr/>.
+
+	  Please redirect all support questions to support@auvertech.fr.
+
diff -Nru a/drivers/isdn/tpam/Makefile b/drivers/isdn/tpam/Makefile
--- a/drivers/isdn/tpam/Makefile	Wed Oct 30 16:44:19 2002
+++ b/drivers/isdn/tpam/Makefile	Wed Oct 30 16:44:19 2002
@@ -8,5 +8,3 @@
 
 tpam-objs	:= tpam_main.o tpam_nco.o tpam_memory.o tpam_commands.o \
 		   tpam_queues.o tpam_hdlc.o tpam_crcpc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
--- a/drivers/macintosh/adb.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/macintosh/adb.c	Wed Oct 30 16:44:36 2002
@@ -35,7 +35,6 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/completion.h>
-#include <linux/tqueue.h>
 #include <asm/uaccess.h>
 #ifdef CONFIG_PPC
 #include <asm/prom.h>
diff -Nru a/drivers/md/Config.help b/drivers/md/Config.help
--- a/drivers/md/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,124 +0,0 @@
-CONFIG_BLK_DEV_LVM
-  This driver lets you combine several hard disks, hard disk
-  partitions, multiple devices or even loop devices (for evaluation
-  purposes) into a volume group.  Imagine a volume group as a kind of
-  virtual disk. Logical volumes, which can be thought of as virtual
-  partitions, can be created in the volume group.  You can resize
-  volume groups and logical volumes after creation time, corresponding
-  to new capacity needs.  Logical volumes are accessed as block
-  devices named /dev/VolumeGroupName/LogicalVolumeName.
-
-  For details see <file:Documentation/LVM-HOWTO>.  You will need
-  supporting user space software; location is in
-  <file:Documentation/Changes>.
-
-  If you want to compile this support as a module ( = code which can
-  be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called lvm-mod.o.
-
-CONFIG_MD
-  Support multiple physical spindles through a single logical device.
-  Required for RAID and logical volume management (LVM).
-
-CONFIG_BLK_DEV_MD
-  This driver lets you combine several hard disk partitions into one
-  logical block device. This can be used to simply append one
-  partition to another one or to combine several redundant hard disks
-  into a RAID1/4/5 device so as to provide protection against hard
-  disk failures. This is called "Software RAID" since the combining of
-  the partitions is done by the kernel. "Hardware RAID" means that the
-  combining is done by a dedicated controller; if you have such a
-  controller, you do not need to say Y here.
-
-  More information about Software RAID on Linux is contained in the
-  Software RAID mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. There you will also learn
-  where to get the supporting user space utilities raidtools.
-
-  If unsure, say N.
-
-CONFIG_MD_LINEAR
-  If you say Y here, then your multiple devices driver will be able to
-  use the so-called linear mode, i.e. it will combine the hard disk
-  partitions by simply appending one to the other.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called linear.o.
-
-  If unsure, say Y.
-
-CONFIG_MD_RAID0
-  If you say Y here, then your multiple devices driver will be able to
-  use the so-called raid0 mode, i.e. it will combine the hard disk
-  partitions into one logical device in such a fashion as to fill them
-  up evenly, one chunk here and one chunk there. This will increase
-  the throughput rate if the partitions reside on distinct disks.
-
-  Information about Software RAID on Linux is contained in the
-  Software-RAID mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. There you will also
-  learn where to get the supporting user space utilities raidtools.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called raid0.o.
-
-  If unsure, say Y.
-
-CONFIG_MD_RAID1
-  A RAID-1 set consists of several disk drives which are exact copies
-  of each other.  In the event of a mirror failure, the RAID driver
-  will continue to use the operational mirrors in the set, providing
-  an error free MD (multiple device) to the higher levels of the
-  kernel.  In a set with N drives, the available space is the capacity
-  of a single drive, and the set protects against a failure of (N - 1)
-  drives.
-
-  Information about Software RAID on Linux is contained in the
-  Software-RAID mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  There you will also
-  learn where to get the supporting user space utilities raidtools.
-
-  If you want to use such a RAID-1 set, say Y. This code is also
-  available as a module called raid1.o ( = code which can be inserted
-  in and removed from the running kernel whenever you want).  If you
-  want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-CONFIG_MD_RAID5
-  A RAID-5 set of N drives with a capacity of C MB per drive provides
-  the capacity of C * (N - 1) MB, and protects against a failure
-  of a single drive. For a given sector (row) number, (N - 1) drives
-  contain data sectors, and one drive contains the parity protection.
-  For a RAID-4 set, the parity blocks are present on a single drive,
-  while a RAID-5 set distributes the parity across the drives in one
-  of the available parity distribution methods.
-
-  Information about Software RAID on Linux is contained in the
-  Software-RAID mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. There you will also
-  learn where to get the supporting user space utilities raidtools.
-
-  If you want to use such a RAID-4/RAID-5 set, say Y. This code is
-  also available as a module called raid5.o ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-CONFIG_MD_MULTIPATH
-  Multipath-IO is the ability of certain devices to address the same
-  physical disk over multiple 'IO paths'. The code ensures that such
-  paths can be defined and handled at runtime, and ensures that a
-  transparent failover to the backup path(s) happens if a IO errors
-  arrives on the primary path.
-
-  If unsure, say N.
-
diff -Nru a/drivers/md/Config.in b/drivers/md/Config.in
--- a/drivers/md/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-#
-# Block device driver configuration
-#
-mainmenu_option next_comment
-comment 'Multi-device support (RAID and LVM)'
-
-bool 'Multiple devices driver support (RAID and LVM)' CONFIG_MD
-
-dep_tristate ' RAID support' CONFIG_BLK_DEV_MD $CONFIG_MD
-dep_tristate '  Linear (append) mode' CONFIG_MD_LINEAR $CONFIG_BLK_DEV_MD
-dep_tristate '  RAID-0 (striping) mode' CONFIG_MD_RAID0 $CONFIG_BLK_DEV_MD
-dep_tristate '  RAID-1 (mirroring) mode' CONFIG_MD_RAID1 $CONFIG_BLK_DEV_MD
-dep_tristate '  RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
-dep_tristate '  Multipath I/O support' CONFIG_MD_MULTIPATH $CONFIG_BLK_DEV_MD
-
-dep_tristate ' Logical volume manager (LVM) support' CONFIG_BLK_DEV_LVM $CONFIG_MD
-
-endmenu
diff -Nru a/drivers/md/Kconfig b/drivers/md/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,149 @@
+#
+# Block device driver configuration
+#
+
+menu "Multi-device support (RAID and LVM)"
+
+config MD
+	bool "Multiple devices driver support (RAID and LVM)"
+	help
+	  Support multiple physical spindles through a single logical device.
+	  Required for RAID and logical volume management.
+
+config BLK_DEV_MD
+	tristate "RAID support"
+	depends on MD
+	---help---
+	  This driver lets you combine several hard disk partitions into one
+	  logical block device. This can be used to simply append one
+	  partition to another one or to combine several redundant hard disks
+	  into a RAID1/4/5 device so as to provide protection against hard
+	  disk failures. This is called "Software RAID" since the combining of
+	  the partitions is done by the kernel. "Hardware RAID" means that the
+	  combining is done by a dedicated controller; if you have such a
+	  controller, you do not need to say Y here.
+
+	  More information about Software RAID on Linux is contained in the
+	  Software RAID mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. There you will also learn
+	  where to get the supporting user space utilities raidtools.
+
+	  If unsure, say N.
+
+config MD_LINEAR
+	tristate "Linear (append) mode"
+	depends on BLK_DEV_MD
+	---help---
+	  If you say Y here, then your multiple devices driver will be able to
+	  use the so-called linear mode, i.e. it will combine the hard disk
+	  partitions by simply appending one to the other.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called linear.o.
+
+	  If unsure, say Y.
+
+config MD_RAID0
+	tristate "RAID-0 (striping) mode"
+	depends on BLK_DEV_MD
+	---help---
+	  If you say Y here, then your multiple devices driver will be able to
+	  use the so-called raid0 mode, i.e. it will combine the hard disk
+	  partitions into one logical device in such a fashion as to fill them
+	  up evenly, one chunk here and one chunk there. This will increase
+	  the throughput rate if the partitions reside on distinct disks.
+
+	  Information about Software RAID on Linux is contained in the
+	  Software-RAID mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. There you will also
+	  learn where to get the supporting user space utilities raidtools.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called raid0.o.
+
+	  If unsure, say Y.
+
+config MD_RAID1
+	tristate "RAID-1 (mirroring) mode"
+	depends on BLK_DEV_MD
+	---help---
+	  A RAID-1 set consists of several disk drives which are exact copies
+	  of each other.  In the event of a mirror failure, the RAID driver
+	  will continue to use the operational mirrors in the set, providing
+	  an error free MD (multiple device) to the higher levels of the
+	  kernel.  In a set with N drives, the available space is the capacity
+	  of a single drive, and the set protects against a failure of (N - 1)
+	  drives.
+
+	  Information about Software RAID on Linux is contained in the
+	  Software-RAID mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  There you will also
+	  learn where to get the supporting user space utilities raidtools.
+
+	  If you want to use such a RAID-1 set, say Y. This code is also
+	  available as a module called raid1.o ( = code which can be inserted
+	  in and removed from the running kernel whenever you want).  If you
+	  want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config MD_RAID5
+	tristate "RAID-4/RAID-5 mode"
+	depends on BLK_DEV_MD
+	---help---
+	  A RAID-5 set of N drives with a capacity of C MB per drive provides
+	  the capacity of C * (N - 1) MB, and protects against a failure
+	  of a single drive. For a given sector (row) number, (N - 1) drives
+	  contain data sectors, and one drive contains the parity protection.
+	  For a RAID-4 set, the parity blocks are present on a single drive,
+	  while a RAID-5 set distributes the parity across the drives in one
+	  of the available parity distribution methods.
+
+	  Information about Software RAID on Linux is contained in the
+	  Software-RAID mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. There you will also
+	  learn where to get the supporting user space utilities raidtools.
+
+	  If you want to use such a RAID-4/RAID-5 set, say Y. This code is
+	  also available as a module called raid5.o ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config MD_MULTIPATH
+	tristate "Multipath I/O support"
+	depends on BLK_DEV_MD
+	help
+	  Multipath-IO is the ability of certain devices to address the same
+	  physical disk over multiple 'IO paths'. The code ensures that such
+	  paths can be defined and handled at runtime, and ensures that a
+	  transparent failover to the backup path(s) happens if a IO errors
+	  arrives on the primary path.
+
+	  If unsure, say N.
+
+config BLK_DEV_DM
+	tristate "Device mapper support"
+	depends on MD
+	---help---
+	  Device-mapper is a low level volume manager.  It works by allowing
+	  people to specify mappings for ranges of logical sectors.  Various
+	  mapping types are available, in addition people may write their own
+	  modules containing custom mappings if they wish.
+
+	  Higher level volume managers such as LVM2 use this driver.
+
+	  If you want to compile this as a module, say M here and read 
+	  <file:Documentation/modules.txt>.  The module will be called dm-mod.o.
+
+	  If unsure, say N.
+
+endmenu
+
diff -Nru a/drivers/md/Makefile b/drivers/md/Makefile
--- a/drivers/md/Makefile	Wed Oct 30 16:44:17 2002
+++ b/drivers/md/Makefile	Wed Oct 30 16:44:17 2002
@@ -2,8 +2,9 @@
 # Makefile for the kernel software RAID and LVM drivers.
 #
 
-export-objs	:= md.o xor.o
-lvm-mod-objs	:= lvm.o lvm-snap.o lvm-fs.o
+export-objs	:= md.o xor.o dm-table.o dm-target.o
+dm-mod-objs	:= dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
+		   dm-ioctl.o
 
 # Note: link order is important.  All raid personalities
 # and xor.o must come before md.o, as they each initialise 
@@ -16,7 +17,7 @@
 obj-$(CONFIG_MD_RAID5)		+= raid5.o xor.o
 obj-$(CONFIG_MD_MULTIPATH)	+= multipath.o
 obj-$(CONFIG_BLK_DEV_MD)	+= md.o
-obj-$(CONFIG_BLK_DEV_LVM)	+= lvm-mod.o
+obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm-ioctl.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1129 @@
+/*
+ * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+#include <linux/compatmac.h>
+#include <linux/miscdevice.h>
+#include <linux/dm-ioctl.h>
+#include <linux/init.h>
+#include <linux/wait.h>
+#include <linux/blk.h>
+#include <linux/slab.h>
+
+#define DM_DRIVER_EMAIL "dm@uk.sistina.com"
+
+/*-----------------------------------------------------------------
+ * The ioctl interface needs to be able to look up devices by
+ * name or uuid.
+ *---------------------------------------------------------------*/
+struct hash_cell {
+	struct list_head name_list;
+	struct list_head uuid_list;
+
+	char *name;
+	char *uuid;
+	struct mapped_device *md;
+
+	/* I hate devfs */
+	devfs_handle_t devfs_entry;
+};
+
+#define NUM_BUCKETS 64
+#define MASK_BUCKETS (NUM_BUCKETS - 1)
+static struct list_head _name_buckets[NUM_BUCKETS];
+static struct list_head _uuid_buckets[NUM_BUCKETS];
+
+static devfs_handle_t _dev_dir;
+void dm_hash_remove_all(void);
+
+/*
+ * Guards access to all three tables.
+ */
+static DECLARE_RWSEM(_hash_lock);
+
+static void init_buckets(struct list_head *buckets)
+{
+	unsigned int i;
+
+	for (i = 0; i < NUM_BUCKETS; i++)
+		INIT_LIST_HEAD(buckets + i);
+}
+
+int dm_hash_init(void)
+{
+	init_buckets(_name_buckets);
+	init_buckets(_uuid_buckets);
+	_dev_dir = devfs_mk_dir(0, DM_DIR, NULL);
+	return 0;
+}
+
+void dm_hash_exit(void)
+{
+	dm_hash_remove_all();
+	devfs_unregister(_dev_dir);
+}
+
+/*-----------------------------------------------------------------
+ * Hash function:
+ * We're not really concerned with the str hash function being
+ * fast since it's only used by the ioctl interface.
+ *---------------------------------------------------------------*/
+static unsigned int hash_str(const char *str)
+{
+	const unsigned int hash_mult = 2654435387U;
+	unsigned int h = 0;
+
+	while (*str)
+		h = (h + (unsigned int) *str++) * hash_mult;
+
+	return h & MASK_BUCKETS;
+}
+
+/*-----------------------------------------------------------------
+ * Code for looking up a device by name
+ *---------------------------------------------------------------*/
+static struct hash_cell *__get_name_cell(const char *str)
+{
+	struct list_head *tmp;
+	struct hash_cell *hc;
+	unsigned int h = hash_str(str);
+
+	list_for_each (tmp, _name_buckets + h) {
+		hc = list_entry(tmp, struct hash_cell, name_list);
+		if (!strcmp(hc->name, str))
+			return hc;
+	}
+
+	return NULL;
+}
+
+static struct hash_cell *__get_uuid_cell(const char *str)
+{
+	struct list_head *tmp;
+	struct hash_cell *hc;
+	unsigned int h = hash_str(str);
+
+	list_for_each (tmp, _uuid_buckets + h) {
+		hc = list_entry(tmp, struct hash_cell, uuid_list);
+		if (!strcmp(hc->uuid, str))
+			return hc;
+	}
+
+	return NULL;
+}
+
+/*-----------------------------------------------------------------
+ * Inserting, removing and renaming a device.
+ *---------------------------------------------------------------*/
+static inline char *kstrdup(const char *str)
+{
+	char *r = kmalloc(strlen(str) + 1, GFP_KERNEL);
+	if (r)
+		strcpy(r, str);
+	return r;
+}
+
+static struct hash_cell *alloc_cell(const char *name, const char *uuid,
+				    struct mapped_device *md)
+{
+	struct hash_cell *hc;
+
+	hc = kmalloc(sizeof(*hc), GFP_KERNEL);
+	if (!hc)
+		return NULL;
+
+	hc->name = kstrdup(name);
+	if (!hc->name) {
+		kfree(hc);
+		return NULL;
+	}
+
+	if (!uuid)
+		hc->uuid = NULL;
+
+	else {
+		hc->uuid = kstrdup(uuid);
+		if (!hc->uuid) {
+			kfree(hc->name);
+			kfree(hc);
+			return NULL;
+		}
+	}
+
+	INIT_LIST_HEAD(&hc->name_list);
+	INIT_LIST_HEAD(&hc->uuid_list);
+	hc->md = md;
+	return hc;
+}
+
+static void free_cell(struct hash_cell *hc)
+{
+	if (hc) {
+		kfree(hc->name);
+		kfree(hc->uuid);
+		kfree(hc);
+	}
+}
+
+/*
+ * devfs stuff.
+ */
+static int register_with_devfs(struct hash_cell *hc)
+{
+	kdev_t dev = dm_kdev(hc->md);
+	hc->devfs_entry =
+	    devfs_register(_dev_dir, hc->name, DEVFS_FL_CURRENT_OWNER,
+			   major(dev), minor(dev),
+			   S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP,
+			   &dm_blk_dops, NULL);
+
+	return 0;
+}
+
+static int unregister_with_devfs(struct hash_cell *hc)
+{
+	devfs_unregister(hc->devfs_entry);
+	return 0;
+}
+
+/*
+ * The kdev_t and uuid of a device can never change once it is
+ * initially inserted.
+ */
+int dm_hash_insert(const char *name, const char *uuid, struct mapped_device *md)
+{
+	struct hash_cell *cell;
+
+	/*
+	 * Allocate the new cells.
+	 */
+	cell = alloc_cell(name, uuid, md);
+	if (!cell)
+		return -ENOMEM;
+
+	/*
+	 * Insert the cell into all three hash tables.
+	 */
+	down_write(&_hash_lock);
+	if (__get_name_cell(name))
+		goto bad;
+
+	list_add(&cell->name_list, _name_buckets + hash_str(name));
+
+	if (uuid) {
+		if (__get_uuid_cell(uuid)) {
+			list_del(&cell->name_list);
+			goto bad;
+		}
+		list_add(&cell->uuid_list, _uuid_buckets + hash_str(uuid));
+	}
+	register_with_devfs(cell);
+	dm_get(md);
+	up_write(&_hash_lock);
+
+	return 0;
+
+ bad:
+	up_write(&_hash_lock);
+	free_cell(cell);
+	return -EBUSY;
+}
+
+void __hash_remove(struct hash_cell *hc)
+{
+	/* remove from the dev hash */
+	list_del(&hc->uuid_list);
+	list_del(&hc->name_list);
+	unregister_with_devfs(hc);
+	dm_put(hc->md);
+}
+
+void dm_hash_remove_all(void)
+{
+	int i;
+	struct hash_cell *hc;
+	struct list_head *tmp, *n;
+
+	down_write(&_hash_lock);
+	for (i = 0; i < NUM_BUCKETS; i++) {
+		list_for_each_safe (tmp, n, _name_buckets + i) {
+			hc = list_entry(tmp, struct hash_cell, name_list);
+			__hash_remove(hc);
+		}
+	}
+	up_write(&_hash_lock);
+}
+
+int dm_hash_rename(const char *old, const char *new)
+{
+	char *new_name, *old_name;
+	struct hash_cell *hc;
+
+	/*
+	 * duplicate new.
+	 */
+	new_name = kstrdup(new);
+	if (!new_name)
+		return -ENOMEM;
+
+	down_write(&_hash_lock);
+
+	/*
+	 * Is new free ?
+	 */
+	hc = __get_name_cell(new);
+	if (hc) {
+		DMWARN("asked to rename to an already existing name %s -> %s",
+		       old, new);
+		up_write(&_hash_lock);
+		return -EBUSY;
+	}
+
+	/*
+	 * Is there such a device as 'old' ?
+	 */
+	hc = __get_name_cell(old);
+	if (!hc) {
+		DMWARN("asked to rename a non existent device %s -> %s",
+		       old, new);
+		up_write(&_hash_lock);
+		return -ENXIO;
+	}
+
+	/*
+	 * rename and move the name cell.
+	 */
+	list_del(&hc->name_list);
+	old_name = hc->name;
+	hc->name = new_name;
+	list_add(&hc->name_list, _name_buckets + hash_str(new_name));
+
+	/* rename the device node in devfs */
+	unregister_with_devfs(hc);
+	register_with_devfs(hc);
+
+	up_write(&_hash_lock);
+	kfree(old_name);
+	return 0;
+}
+
+
+/*-----------------------------------------------------------------
+ * Implementation of the ioctl commands
+ *---------------------------------------------------------------*/
+
+/*
+ * All the ioctl commands get dispatched to functions with this
+ * prototype.
+ */
+typedef int (*ioctl_fn)(struct dm_ioctl *param, struct dm_ioctl *user);
+
+/*
+ * Check a string doesn't overrun the chunk of
+ * memory we copied from userland.
+ */
+static int valid_str(char *str, void *begin, void *end)
+{
+	while (((void *) str >= begin) && ((void *) str < end))
+		if (!*str++)
+			return 0;
+
+	return -EINVAL;
+}
+
+static int next_target(struct dm_target_spec *last, uint32_t next,
+		       void *begin, void *end,
+		       struct dm_target_spec **spec, char **params)
+{
+	*spec = (struct dm_target_spec *)
+	    ((unsigned char *) last + next);
+	*params = (char *) (*spec + 1);
+
+	if (*spec < (last + 1) || ((void *) *spec > end))
+		return -EINVAL;
+
+	return valid_str(*params, begin, end);
+}
+
+static int populate_table(struct dm_table *table, struct dm_ioctl *args)
+{
+	int i = 0, r, first = 1;
+	struct dm_target_spec *spec;
+	char *params;
+	void *begin, *end;
+
+	if (!args->target_count) {
+		DMWARN("populate_table: no targets specified");
+		return -EINVAL;
+	}
+
+	begin = (void *) args;
+	end = begin + args->data_size;
+
+	for (i = 0; i < args->target_count; i++) {
+
+		if (first)
+			r = next_target((struct dm_target_spec *) args,
+					args->data_start,
+					begin, end, &spec, &params);
+		else
+			r = next_target(spec, spec->next, begin, end,
+					&spec, &params);
+
+		if (r) {
+			DMWARN("unable to find target");
+			return -EINVAL;
+		}
+
+		r = dm_table_add_target(table, spec->target_type,
+					spec->sector_start, spec->length,
+					params);
+		if (r) {
+			DMWARN("internal error adding target to table");
+			return -EINVAL;
+		}
+
+		first = 0;
+	}
+
+	return dm_table_complete(table);
+}
+
+/*
+ * Round up the ptr to the next 'align' boundary.  Obviously
+ * 'align' must be a power of 2.
+ */
+static inline void *align_ptr(void *ptr, unsigned int align)
+{
+	align--;
+	return (void *) (((unsigned long) (ptr + align)) & ~align);
+}
+
+/*
+ * Copies a dm_ioctl and an optional additional payload to
+ * userland.
+ */
+static int results_to_user(struct dm_ioctl *user, struct dm_ioctl *param,
+			   void *data, uint32_t len)
+{
+	int r;
+	void *ptr = NULL;
+
+	if (data) {
+		ptr = align_ptr(user + 1, sizeof(unsigned long));
+		param->data_start = ptr - (void *) user;
+	}
+
+	/*
+	 * The version number has already been filled in, so we
+	 * just copy later fields.
+	 */
+	r = copy_to_user(&user->data_size, &param->data_size,
+			 sizeof(*param) - sizeof(param->version));
+	if (r)
+		return -EFAULT;
+
+	if (data) {
+		if (param->data_start + len > param->data_size)
+			return -ENOSPC;
+
+		if (copy_to_user(ptr, data, len))
+			r = -EFAULT;
+	}
+
+	return r;
+}
+
+/*
+ * Fills in a dm_ioctl structure, ready for sending back to
+ * userland.
+ */
+static int __info(struct mapped_device *md, struct dm_ioctl *param)
+{
+	struct dm_table *table;
+	struct block_device *bdev;
+
+	param->flags = DM_EXISTS_FLAG;
+	if (dm_suspended(md))
+		param->flags |= DM_SUSPEND_FLAG;
+
+	param->dev = kdev_t_to_nr(dm_kdev(md));
+	bdev = bdget(param->dev);
+	if (!bdev)
+		return -ENXIO;
+
+	if (bdev_read_only(bdev))
+		param->flags |= DM_READONLY_FLAG;
+
+	param->open_count = bdev->bd_openers;
+	bdput(bdev);
+
+	table = dm_get_table(md);
+	param->target_count = dm_table_get_num_targets(table);
+	dm_table_put(table);
+
+	return 0;
+}
+
+/*
+ * Always use UUID for lookups if it's present, otherwise use name.
+ */
+static inline struct mapped_device *find_device(struct dm_ioctl *param)
+{
+	struct hash_cell *hc;
+	struct mapped_device *md = NULL;
+
+	down_read(&_hash_lock);
+	hc = *param->uuid ? __get_uuid_cell(param->uuid) :
+		__get_name_cell(param->name);
+	if (hc) {
+		md = hc->md;
+
+		/*
+		 * Sneakily write in both the name and the uuid
+		 * while we have the cell.
+		 */
+		strncpy(param->name, hc->name, sizeof(param->name));
+		if (hc->uuid)
+			strncpy(param->uuid, hc->uuid, sizeof(param->uuid) - 1);
+		else
+			param->uuid[0] = '\0';
+
+		dm_get(md);
+	}
+	up_read(&_hash_lock);
+
+	return md;
+}
+
+#define ALIGNMENT sizeof(int)
+static void *_align(void *ptr, unsigned int a)
+{
+	register unsigned long align = --a;
+
+	return (void *) (((unsigned long) ptr + align) & ~align);
+}
+
+/*
+ * Copies device info back to user space, used by
+ * the create and info ioctls.
+ */
+static int info(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	struct mapped_device *md;
+
+	param->flags = 0;
+
+	md = find_device(param);
+	if (!md)
+		/*
+		 * Device not found - returns cleared exists flag.
+		 */
+		goto out;
+
+	__info(md, param);
+	dm_put(md);
+
+      out:
+	return results_to_user(user, param, NULL, 0);
+}
+
+static inline int get_mode(struct dm_ioctl *param)
+{
+	int mode = FMODE_READ | FMODE_WRITE;
+
+	if (param->flags & DM_READONLY_FLAG)
+		mode = FMODE_READ;
+
+	return mode;
+}
+
+static int check_name(const char *name)
+{
+	if (strchr(name, '/')) {
+		DMWARN("invalid device name");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static int create(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	int r;
+	struct dm_table *t;
+	struct mapped_device *md;
+	int minor;
+
+	r = check_name(param->name);
+	if (r)
+		return r;
+
+	r = dm_table_create(&t, get_mode(param));
+	if (r)
+		return r;
+
+	r = populate_table(t, param);
+	if (r) {
+		dm_table_put(t);
+		return r;
+	}
+
+	minor = (param->flags & DM_PERSISTENT_DEV_FLAG) ?
+		minor(to_kdev_t(param->dev)) : -1;
+
+	r = dm_create(minor, t, &md);
+	if (r) {
+		dm_table_put(t);
+		return r;
+	}
+	dm_table_put(t);	/* md will have grabbed its own reference */
+
+	set_device_ro(dm_kdev(md), (param->flags & DM_READONLY_FLAG));
+	r = dm_hash_insert(param->name, *param->uuid ? param->uuid : NULL, md);
+	dm_put(md);
+
+	return r ? r : info(param, user);
+}
+
+/*
+ * Build up the status struct for each target
+ */
+static int __status(struct mapped_device *md, struct dm_ioctl *param,
+		    char *outbuf, int *len)
+{
+	int i, num_targets;
+	struct dm_target_spec *spec;
+	char *outptr;
+	status_type_t type;
+	struct dm_table *table = dm_get_table(md);
+
+	if (param->flags & DM_STATUS_TABLE_FLAG)
+		type = STATUSTYPE_TABLE;
+	else
+		type = STATUSTYPE_INFO;
+
+	outptr = outbuf;
+
+	/* Get all the target info */
+	num_targets = dm_table_get_num_targets(table);
+	for (i = 0; i < num_targets; i++) {
+		struct dm_target *ti = dm_table_get_target(table, i);
+
+		if (outptr - outbuf +
+		    sizeof(struct dm_target_spec) > param->data_size) {
+			dm_table_put(table);
+			return -ENOMEM;
+		}
+
+		spec = (struct dm_target_spec *) outptr;
+
+		spec->status = 0;
+		spec->sector_start = ti->begin;
+		spec->length = ti->len;
+		strncpy(spec->target_type, ti->type->name,
+			sizeof(spec->target_type));
+
+		outptr += sizeof(struct dm_target_spec);
+
+		/* Get the status/table string from the target driver */
+		if (ti->type->status)
+			ti->type->status(ti, type, outptr,
+					 outbuf + param->data_size - outptr);
+		else
+			outptr[0] = '\0';
+
+		outptr += strlen(outptr) + 1;
+		_align(outptr, ALIGNMENT);
+		spec->next = outptr - outbuf;
+	}
+
+	param->target_count = num_targets;
+	*len = outptr - outbuf;
+	dm_table_put(table);
+
+	return 0;
+}
+
+/*
+ * Return the status of a device as a text string for each
+ * target.
+ */
+static int get_status(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	struct mapped_device *md;
+	int len = 0;
+	int ret;
+	char *outbuf = NULL;
+
+	md = find_device(param);
+	if (!md)
+		/*
+		 * Device not found - returns cleared exists flag.
+		 */
+		goto out;
+
+	/* We haven't a clue how long the resultant data will be so
+	   just allocate as much as userland has allowed us and make sure
+	   we don't overun it */
+	outbuf = kmalloc(param->data_size, GFP_KERNEL);
+	if (!outbuf)
+		goto out;
+	/*
+	 * Get the status of all targets
+	 */
+	__status(md, param, outbuf, &len);
+
+	/*
+	 * Setup the basic dm_ioctl structure.
+	 */
+	__info(md, param);
+
+      out:
+	if (md)
+		dm_put(md);
+
+	ret = results_to_user(user, param, outbuf, len);
+
+	if (outbuf)
+		kfree(outbuf);
+
+	return ret;
+}
+
+/*
+ * Wait for a device to report an event
+ */
+static int wait_device_event(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	struct mapped_device *md;
+	struct dm_table *table;
+	DECLARE_WAITQUEUE(wq, current);
+
+	md = find_device(param);
+	if (!md)
+		/*
+		 * Device not found - returns cleared exists flag.
+		 */
+		goto out;
+
+	/*
+	 * Setup the basic dm_ioctl structure.
+	 */
+	__info(md, param);
+
+	/*
+	 * Wait for a notification event
+	 */
+	set_current_state(TASK_INTERRUPTIBLE);
+	table = dm_get_table(md);
+	dm_table_add_wait_queue(table, &wq);
+	dm_table_put(table);
+	dm_put(md);
+
+	yield();
+	set_current_state(TASK_RUNNING);
+
+      out:
+	return results_to_user(user, param, NULL, 0);
+}
+
+/*
+ * Retrieves a list of devices used by a particular dm device.
+ */
+static int dep(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	int count, r;
+	struct mapped_device *md;
+	struct list_head *tmp;
+	size_t len = 0;
+	struct dm_target_deps *deps = NULL;
+	struct dm_table *table;
+
+	md = find_device(param);
+	if (!md)
+		goto out;
+	table = dm_get_table(md);
+
+	/*
+	 * Setup the basic dm_ioctl structure.
+	 */
+	__info(md, param);
+
+	/*
+	 * Count the devices.
+	 */
+	count = 0;
+	list_for_each(tmp, dm_table_get_devices(table))
+	    count++;
+
+	/*
+	 * Allocate a kernel space version of the dm_target_status
+	 * struct.
+	 */
+	if (array_too_big(sizeof(*deps), sizeof(*deps->dev), count)) {
+		dm_table_put(table);
+		dm_put(md);
+		return -ENOMEM;
+	}
+
+	len = sizeof(*deps) + (sizeof(*deps->dev) * count);
+	deps = kmalloc(len, GFP_KERNEL);
+	if (!deps) {
+		dm_table_put(table);
+		dm_put(md);
+		return -ENOMEM;
+	}
+
+	/*
+	 * Fill in the devices.
+	 */
+	deps->count = count;
+	count = 0;
+	list_for_each(tmp, dm_table_get_devices(table)) {
+		struct dm_dev *dd = list_entry(tmp, struct dm_dev, list);
+		deps->dev[count++] = dd->bdev->bd_dev;
+	}
+	dm_table_put(table);
+	dm_put(md);
+
+      out:
+	r = results_to_user(user, param, deps, len);
+
+	kfree(deps);
+	return r;
+}
+
+static int remove(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	struct hash_cell *hc;
+
+	down_write(&_hash_lock);
+	hc = *param->uuid ? __get_uuid_cell(param->uuid) :
+		__get_name_cell(param->name);
+	if (!hc) {
+		DMWARN("device doesn't appear to be in the dev hash table.");
+		up_write(&_hash_lock);
+		return -EINVAL;
+	}
+
+	__hash_remove(hc);
+	up_write(&_hash_lock);
+	return 0;
+}
+
+static int remove_all(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	dm_hash_remove_all();
+	return 0;
+}
+
+static int suspend(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	int r;
+	struct mapped_device *md;
+
+	md = find_device(param);
+	if (!md)
+		return -ENXIO;
+
+	if (param->flags & DM_SUSPEND_FLAG)
+		r = dm_suspend(md);
+	else
+		r = dm_resume(md);
+
+	dm_put(md);
+	return r;
+}
+
+static int reload(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	int r;
+	struct mapped_device *md;
+	struct dm_table *t;
+
+	r = dm_table_create(&t, get_mode(param));
+	if (r)
+		return r;
+
+	r = populate_table(t, param);
+	if (r) {
+		dm_table_put(t);
+		return r;
+	}
+
+	md = find_device(param);
+	if (!md) {
+		dm_table_put(t);
+		return -ENXIO;
+	}
+
+	r = dm_swap_table(md, t);
+	if (r) {
+		dm_put(md);
+		dm_table_put(t);
+		return r;
+	}
+
+	set_device_ro(dm_kdev(md), (param->flags & DM_READONLY_FLAG));
+	dm_put(md);
+
+	r = info(param, user);
+	return r;
+}
+
+static int rename(struct dm_ioctl *param, struct dm_ioctl *user)
+{
+	int r;
+	char *new_name = (char *) param + param->data_start;
+
+	if (valid_str(new_name, (void *) param,
+		      (void *) param + param->data_size)) {
+		DMWARN("Invalid new logical volume name supplied.");
+		return -EINVAL;
+	}
+
+	r = check_name(new_name);
+	if (r)
+		return r;
+
+	return dm_hash_rename(param->name, new_name);
+}
+
+
+/*-----------------------------------------------------------------
+ * Implementation of open/close/ioctl on the special char
+ * device.
+ *---------------------------------------------------------------*/
+static ioctl_fn lookup_ioctl(unsigned int cmd)
+{
+	static struct {
+		int cmd;
+		ioctl_fn fn;
+	} _ioctls[] = {
+		{DM_VERSION_CMD, NULL},	/* version is dealt with elsewhere */
+		{DM_REMOVE_ALL_CMD, remove_all},
+		{DM_DEV_CREATE_CMD, create},
+		{DM_DEV_REMOVE_CMD, remove},
+		{DM_DEV_RELOAD_CMD, reload},
+		{DM_DEV_RENAME_CMD, rename},
+		{DM_DEV_SUSPEND_CMD, suspend},
+		{DM_DEV_DEPS_CMD, dep},
+		{DM_DEV_STATUS_CMD, info},
+		{DM_TARGET_STATUS_CMD, get_status},
+		{DM_TARGET_WAIT_CMD, wait_device_event},
+	};
+
+	return (cmd >= ARRAY_SIZE(_ioctls)) ? NULL : _ioctls[cmd].fn;
+}
+
+/*
+ * As well as checking the version compatibility this always
+ * copies the kernel interface version out.
+ */
+static int check_version(int cmd, struct dm_ioctl *user)
+{
+	uint32_t version[3];
+	int r = 0;
+
+	if (copy_from_user(version, user->version, sizeof(version)))
+		return -EFAULT;
+
+	if ((DM_VERSION_MAJOR != version[0]) ||
+	    (DM_VERSION_MINOR < version[1])) {
+		DMWARN("ioctl interface mismatch: "
+		       "kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)",
+		       DM_VERSION_MAJOR, DM_VERSION_MINOR,
+		       DM_VERSION_PATCHLEVEL,
+		       version[0], version[1], version[2], cmd);
+		r = -EINVAL;
+	}
+
+	/*
+	 * Fill in the kernel version.
+	 */
+	version[0] = DM_VERSION_MAJOR;
+	version[1] = DM_VERSION_MINOR;
+	version[2] = DM_VERSION_PATCHLEVEL;
+	if (copy_to_user(user->version, version, sizeof(version)))
+		return -EFAULT;
+
+	return r;
+}
+
+static void free_params(struct dm_ioctl *param)
+{
+	vfree(param);
+}
+
+static int copy_params(struct dm_ioctl *user, struct dm_ioctl **param)
+{
+	struct dm_ioctl tmp, *dmi;
+
+	if (copy_from_user(&tmp, user, sizeof(tmp)))
+		return -EFAULT;
+
+	if (tmp.data_size < sizeof(tmp))
+		return -EINVAL;
+
+	dmi = (struct dm_ioctl *) vmalloc(tmp.data_size);
+	if (!dmi)
+		return -ENOMEM;
+
+	if (copy_from_user(dmi, user, tmp.data_size)) {
+		vfree(dmi);
+		return -EFAULT;
+	}
+
+	*param = dmi;
+	return 0;
+}
+
+static int validate_params(uint cmd, struct dm_ioctl *param)
+{
+	/* Unless creating, either name of uuid but not both */
+	if (cmd != DM_DEV_CREATE_CMD) {
+		if ((!*param->uuid && !*param->name) ||
+		    (*param->uuid && *param->name)) {
+			DMWARN("one of name or uuid must be supplied");
+			return -EINVAL;
+		}
+	}
+
+	/* Ensure strings are terminated */
+	param->name[DM_NAME_LEN - 1] = '\0';
+	param->uuid[DM_UUID_LEN - 1] = '\0';
+
+	return 0;
+}
+
+static int ctl_ioctl(struct inode *inode, struct file *file,
+		     uint command, ulong u)
+{
+	int r = 0, cmd;
+	struct dm_ioctl *param;
+	struct dm_ioctl *user = (struct dm_ioctl *) u;
+	ioctl_fn fn = NULL;
+
+	/* only root can play with this */
+	if (!capable(CAP_SYS_ADMIN))
+		return -EACCES;
+
+	if (_IOC_TYPE(command) != DM_IOCTL)
+		return -ENOTTY;
+
+	cmd = _IOC_NR(command);
+
+	/*
+	 * Check the interface version passed in.  This also
+	 * writes out the kernels interface version.
+	 */
+	r = check_version(cmd, user);
+	if (r)
+		return r;
+
+	/*
+	 * Nothing more to do for the version command.
+	 */
+	if (cmd == DM_VERSION_CMD)
+		return 0;
+
+	fn = lookup_ioctl(cmd);
+	if (!fn) {
+		DMWARN("dm_ctl_ioctl: unknown command 0x%x", command);
+		return -ENOTTY;
+	}
+
+	/*
+	 * Copy the parameters into kernel space.
+	 */
+	r = copy_params(user, &param);
+	if (r)
+		return r;
+
+	r = validate_params(cmd, param);
+	if (r) {
+		free_params(param);
+		return r;
+	}
+
+	r = fn(param, user);
+	free_params(param);
+	return r;
+}
+
+static struct file_operations _ctl_fops = {
+	.ioctl	 = ctl_ioctl,
+	.owner	 = THIS_MODULE,
+};
+
+static devfs_handle_t _ctl_handle;
+
+static struct miscdevice _dm_misc = {
+	.minor = MISC_DYNAMIC_MINOR,
+	.name  = DM_NAME,
+	.fops  = &_ctl_fops
+};
+
+/*
+ * Create misc character device and link to DM_DIR/control.
+ */
+int __init dm_interface_init(void)
+{
+	int r;
+	char rname[64];
+
+	r = dm_hash_init();
+	if (r)
+		return r;
+
+	r = misc_register(&_dm_misc);
+	if (r) {
+		DMERR("misc_register failed for control device");
+		dm_hash_exit();
+		return r;
+	}
+
+	r = devfs_generate_path(_dm_misc.devfs_handle, rname + 3,
+				sizeof rname - 3);
+	if (r == -ENOSYS)
+		return 0;	/* devfs not present */
+
+	if (r < 0) {
+		DMERR("devfs_generate_path failed for control device");
+		goto failed;
+	}
+
+	strncpy(rname + r, "../", 3);
+	r = devfs_mk_symlink(NULL, DM_DIR "/control",
+			     DEVFS_FL_DEFAULT, rname + r, &_ctl_handle, NULL);
+	if (r) {
+		DMERR("devfs_mk_symlink failed for control device");
+		goto failed;
+	}
+	devfs_auto_unregister(_dm_misc.devfs_handle, _ctl_handle);
+
+	DMINFO("%d.%d.%d%s initialised: %s", DM_VERSION_MAJOR,
+	       DM_VERSION_MINOR, DM_VERSION_PATCHLEVEL, DM_VERSION_EXTRA,
+	       DM_DRIVER_EMAIL);
+	return 0;
+
+      failed:
+	dm_hash_exit();
+	misc_deregister(&_dm_misc);
+	return r;
+}
+
+void dm_interface_exit(void)
+{
+	dm_hash_exit();
+
+	if (misc_deregister(&_dm_misc) < 0)
+		DMERR("misc_deregister failed for control device");
+}
diff -Nru a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm-linear.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/bio.h>
+#include <linux/slab.h>
+
+/*
+ * Linear: maps a linear range of a device.
+ */
+struct linear_c {
+	struct dm_dev *dev;
+	sector_t start;
+};
+
+/*
+ * Construct a linear mapping: <dev_path> <offset>
+ */
+static int linear_ctr(struct dm_target *ti, int argc, char **argv)
+{
+	struct linear_c *lc;
+
+	if (argc != 2) {
+		ti->error = "dm-linear: Not enough arguments";
+		return -EINVAL;
+	}
+
+	lc = kmalloc(sizeof(*lc), GFP_KERNEL);
+	if (lc == NULL) {
+		ti->error = "dm-linear: Cannot allocate linear context";
+		return -ENOMEM;
+	}
+
+	if (sscanf(argv[1], SECTOR_FORMAT, &lc->start) != 1) {
+		ti->error = "dm-linear: Invalid device sector";
+		goto bad;
+	}
+
+	if (dm_get_device(ti, argv[0], ti->begin, ti->len,
+			  dm_table_get_mode(ti->table), &lc->dev)) {
+		ti->error = "dm-linear: Device lookup failed";
+		goto bad;
+	}
+
+	ti->private = lc;
+	return 0;
+
+      bad:
+	kfree(lc);
+	return -EINVAL;
+}
+
+static void linear_dtr(struct dm_target *ti)
+{
+	struct linear_c *lc = (struct linear_c *) ti->private;
+
+	dm_put_device(ti, lc->dev);
+	kfree(lc);
+}
+
+static int linear_map(struct dm_target *ti, struct bio *bio)
+{
+	struct linear_c *lc = (struct linear_c *) ti->private;
+
+	bio->bi_bdev = lc->dev->bdev;
+	bio->bi_sector = lc->start + (bio->bi_sector - ti->begin);
+
+	return 1;
+}
+
+static int linear_status(struct dm_target *ti, status_type_t type,
+			 char *result, int maxlen)
+{
+	struct linear_c *lc = (struct linear_c *) ti->private;
+
+	switch (type) {
+	case STATUSTYPE_INFO:
+		result[0] = '\0';
+		break;
+
+	case STATUSTYPE_TABLE:
+		snprintf(result, maxlen, "%s " SECTOR_FORMAT,
+			 kdevname(to_kdev_t(lc->dev->bdev->bd_dev)), lc->start);
+		break;
+	}
+	return 0;
+}
+
+static struct target_type linear_target = {
+	.name   = "linear",
+	.module = THIS_MODULE,
+	.ctr    = linear_ctr,
+	.dtr    = linear_dtr,
+	.map    = linear_map,
+	.status = linear_status,
+};
+
+int __init dm_linear_init(void)
+{
+	int r = dm_register_target(&linear_target);
+
+	if (r < 0)
+		DMERR("linear: register failed %d", r);
+
+	return r;
+}
+
+void dm_linear_exit(void)
+{
+	int r = dm_unregister_target(&linear_target);
+
+	if (r < 0)
+		DMERR("linear: unregister failed %d", r);
+}
diff -Nru a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm-stripe.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,258 @@
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <linux/bio.h>
+#include <linux/slab.h>
+
+struct stripe {
+	struct dm_dev *dev;
+	sector_t physical_start;
+};
+
+struct stripe_c {
+	uint32_t stripes;
+
+	/* The size of this target / num. stripes */
+	uint32_t stripe_width;
+
+	/* stripe chunk size */
+	uint32_t chunk_shift;
+	sector_t chunk_mask;
+
+	struct stripe stripe[0];
+};
+
+static inline struct stripe_c *alloc_context(int stripes)
+{
+	size_t len;
+
+	if (array_too_big(sizeof(struct stripe_c), sizeof(struct stripe),
+			  stripes))
+		return NULL;
+
+	len = sizeof(struct stripe_c) + (sizeof(struct stripe) * stripes);
+
+	return kmalloc(len, GFP_KERNEL);
+}
+
+/*
+ * Parse a single <dev> <sector> pair
+ */
+static int get_stripe(struct dm_target *ti, struct stripe_c *sc,
+		      int stripe, char **argv)
+{
+	sector_t start;
+
+	if (sscanf(argv[1], SECTOR_FORMAT, &start) != 1)
+		return -EINVAL;
+
+	if (dm_get_device(ti, argv[0], start, sc->stripe_width,
+			  dm_table_get_mode(ti->table),
+			  &sc->stripe[stripe].dev))
+		return -ENXIO;
+
+	sc->stripe[stripe].physical_start = start;
+	return 0;
+}
+
+/*
+ * FIXME: Nasty function, only present because we can't link
+ * against __moddi3 and __divdi3.
+ *
+ * returns a == b * n
+ */
+static int multiple(sector_t a, sector_t b, sector_t *n)
+{
+	sector_t acc, prev, i;
+
+	*n = 0;
+	while (a >= b) {
+		for (acc = b, prev = 0, i = 1;
+		     acc <= a;
+		     prev = acc, acc <<= 1, i <<= 1)
+			;
+
+		a -= prev;
+		*n += i >> 1;
+	}
+
+	return a == 0;
+}
+
+/*
+ * Construct a striped mapping.
+ * <number of stripes> <chunk size (2^^n)> [<dev_path> <offset>]+
+ */
+static int stripe_ctr(struct dm_target *ti, int argc, char **argv)
+{
+	struct stripe_c *sc;
+	sector_t width;
+	uint32_t stripes;
+	uint32_t chunk_size;
+	char *end;
+	int r, i;
+
+	if (argc < 2) {
+		ti->error = "dm-stripe: Not enough arguments";
+		return -EINVAL;
+	}
+
+	stripes = simple_strtoul(argv[0], &end, 10);
+	if (*end) {
+		ti->error = "dm-stripe: Invalid stripe count";
+		return -EINVAL;
+	}
+
+	chunk_size = simple_strtoul(argv[1], &end, 10);
+	if (*end) {
+		ti->error = "dm-stripe: Invalid chunk_size";
+		return -EINVAL;
+	}
+
+	if (!multiple(ti->len, stripes, &width)) {
+		ti->error = "dm-stripe: Target length not divisable by "
+		    "number of stripes";
+		return -EINVAL;
+	}
+
+	sc = alloc_context(stripes);
+	if (!sc) {
+		ti->error = "dm-stripe: Memory allocation for striped context "
+		    "failed";
+		return -ENOMEM;
+	}
+
+	sc->stripes = stripes;
+	sc->stripe_width = width;
+	ti->split_io = chunk_size;
+
+	/*
+	 * chunk_size is a power of two
+	 */
+	if (!chunk_size || (chunk_size & (chunk_size - 1))) {
+		ti->error = "dm-stripe: Invalid chunk size";
+		kfree(sc);
+		return -EINVAL;
+	}
+
+	sc->chunk_mask = ((sector_t) chunk_size) - 1;
+	for (sc->chunk_shift = 0; chunk_size; sc->chunk_shift++)
+		chunk_size >>= 1;
+	sc->chunk_shift--;
+
+	/*
+	 * Get the stripe destinations.
+	 */
+	for (i = 0; i < stripes; i++) {
+		if (argc < 2) {
+			ti->error = "dm-stripe: Not enough destinations "
+				"specified";
+			kfree(sc);
+			return -EINVAL;
+		}
+
+		argv += 2;
+
+		r = get_stripe(ti, sc, i, argv);
+		if (r < 0) {
+			ti->error = "dm-stripe: Couldn't parse stripe "
+				"destination";
+			while (i--)
+				dm_put_device(ti, sc->stripe[i].dev);
+			kfree(sc);
+			return r;
+		}
+	}
+
+	ti->private = sc;
+	return 0;
+}
+
+static void stripe_dtr(struct dm_target *ti)
+{
+	unsigned int i;
+	struct stripe_c *sc = (struct stripe_c *) ti->private;
+
+	for (i = 0; i < sc->stripes; i++)
+		dm_put_device(ti, sc->stripe[i].dev);
+
+	kfree(sc);
+}
+
+static int stripe_map(struct dm_target *ti, struct bio *bio)
+{
+	struct stripe_c *sc = (struct stripe_c *) ti->private;
+
+	sector_t offset = bio->bi_sector - ti->begin;
+	uint32_t chunk = (uint32_t) (offset >> sc->chunk_shift);
+	uint32_t stripe = chunk % sc->stripes;	/* 32bit modulus */
+	chunk = chunk / sc->stripes;
+
+	bio->bi_bdev = sc->stripe[stripe].dev->bdev;
+	bio->bi_sector = sc->stripe[stripe].physical_start +
+	    (chunk << sc->chunk_shift) + (offset & sc->chunk_mask);
+	return 1;
+}
+
+static int stripe_status(struct dm_target *ti,
+			 status_type_t type, char *result, int maxlen)
+{
+	struct stripe_c *sc = (struct stripe_c *) ti->private;
+	int offset;
+	int i;
+
+	switch (type) {
+	case STATUSTYPE_INFO:
+		result[0] = '\0';
+		break;
+
+	case STATUSTYPE_TABLE:
+		offset = snprintf(result, maxlen, "%d " SECTOR_FORMAT,
+				  sc->stripes, sc->chunk_mask + 1);
+		for (i = 0; i < sc->stripes; i++) {
+			offset +=
+			    snprintf(result + offset, maxlen - offset,
+				     " %s " SECTOR_FORMAT,
+		       kdevname(to_kdev_t(sc->stripe[i].dev->bdev->bd_dev)),
+				     sc->stripe[i].physical_start);
+		}
+		break;
+	}
+	return 0;
+}
+
+static struct target_type stripe_target = {
+	.name   = "striped",
+	.module = THIS_MODULE,
+	.ctr    = stripe_ctr,
+	.dtr    = stripe_dtr,
+	.map    = stripe_map,
+	.status = stripe_status,
+};
+
+int __init dm_stripe_init(void)
+{
+	int r;
+
+	r = dm_register_target(&stripe_target);
+	if (r < 0)
+		DMWARN("striped target registration failed");
+
+	return r;
+}
+
+void dm_stripe_exit(void)
+{
+	if (dm_unregister_target(&stripe_target))
+		DMWARN("striped target unregistration failed");
+
+	return;
+}
diff -Nru a/drivers/md/dm-table.c b/drivers/md/dm-table.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm-table.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,736 @@
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+#include <linux/blkdev.h>
+#include <linux/namei.h>
+#include <linux/ctype.h>
+#include <linux/slab.h>
+#include <asm/atomic.h>
+
+#define MAX_DEPTH 16
+#define NODE_SIZE L1_CACHE_BYTES
+#define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t))
+#define CHILDREN_PER_NODE (KEYS_PER_NODE + 1)
+
+struct dm_table {
+	atomic_t holders;
+
+	/* btree table */
+	int depth;
+	int counts[MAX_DEPTH];	/* in nodes */
+	sector_t *index[MAX_DEPTH];
+
+	int num_targets;
+	int num_allocated;
+	sector_t *highs;
+	struct dm_target *targets;
+
+	/*
+	 * Indicates the rw permissions for the new logical
+	 * device.  This should be a combination of FMODE_READ
+	 * and FMODE_WRITE.
+	 */
+	int mode;
+
+	/* a list of devices used by this table */
+	struct list_head devices;
+
+	/*
+	 * These are optimistic limits taken from all the
+	 * targets, some targets will need smaller limits.
+	 */
+	struct io_restrictions limits;
+
+	/*
+	 * A waitqueue for processes waiting for something
+	 * interesting to happen to this table.
+	 */
+	wait_queue_head_t eventq;
+};
+
+/*
+ * Ceiling(n / size)
+ */
+static inline unsigned long div_up(unsigned long n, unsigned long size)
+{
+	return dm_round_up(n, size) / size;
+}
+
+/*
+ * Similar to ceiling(log_size(n))
+ */
+static unsigned int int_log(unsigned long n, unsigned long base)
+{
+	int result = 0;
+
+	while (n > 1) {
+		n = div_up(n, base);
+		result++;
+	}
+
+	return result;
+}
+
+#define __HIGH(l, r) if (*(l) < (r)) *(l) = (r)
+#define __LOW(l, r) if (*(l) < (r)) *(l) = (r)
+
+/*
+ * Combine two io_restrictions, always taking the lower value.
+ */
+
+static void combine_restrictions_low(struct io_restrictions *lhs,
+				     struct io_restrictions *rhs)
+{
+	__LOW(&lhs->max_sectors, rhs->max_sectors);
+	__LOW(&lhs->max_phys_segments, rhs->max_phys_segments);
+	__LOW(&lhs->max_hw_segments, rhs->max_hw_segments);
+	__HIGH(&lhs->hardsect_size, rhs->hardsect_size);
+	__LOW(&lhs->max_segment_size, rhs->max_segment_size);
+	__LOW(&lhs->seg_boundary_mask, rhs->seg_boundary_mask);
+}
+
+/*
+ * Calculate the index of the child node of the n'th node k'th key.
+ */
+static inline int get_child(int n, int k)
+{
+	return (n * CHILDREN_PER_NODE) + k;
+}
+
+/*
+ * Return the n'th node of level l from table t.
+ */
+static inline sector_t *get_node(struct dm_table *t, int l, int n)
+{
+	return t->index[l] + (n * KEYS_PER_NODE);
+}
+
+/*
+ * Return the highest key that you could lookup from the n'th
+ * node on level l of the btree.
+ */
+static sector_t high(struct dm_table *t, int l, int n)
+{
+	for (; l < t->depth - 1; l++)
+		n = get_child(n, CHILDREN_PER_NODE - 1);
+
+	if (n >= t->counts[l])
+		return (sector_t) - 1;
+
+	return get_node(t, l, n)[KEYS_PER_NODE - 1];
+}
+
+/*
+ * Fills in a level of the btree based on the highs of the level
+ * below it.
+ */
+static int setup_btree_index(int l, struct dm_table *t)
+{
+	int n, k;
+	sector_t *node;
+
+	for (n = 0; n < t->counts[l]; n++) {
+		node = get_node(t, l, n);
+
+		for (k = 0; k < KEYS_PER_NODE; k++)
+			node[k] = high(t, l + 1, get_child(n, k));
+	}
+
+	return 0;
+}
+
+/*
+ * highs, and targets are managed as dynamic arrays during a
+ * table load.
+ */
+static int alloc_targets(struct dm_table *t, int num)
+{
+	sector_t *n_highs;
+	struct dm_target *n_targets;
+	int n = t->num_targets;
+
+	/*
+	 * Allocate both the target array and offset array at once.
+	 */
+	n_highs = (sector_t *) vcalloc(sizeof(struct dm_target) +
+				       sizeof(sector_t),
+				       num);
+	if (!n_highs)
+		return -ENOMEM;
+
+	n_targets = (struct dm_target *) (n_highs + num);
+
+	if (n) {
+		memcpy(n_highs, t->highs, sizeof(*n_highs) * n);
+		memcpy(n_targets, t->targets, sizeof(*n_targets) * n);
+	}
+
+	memset(n_highs + n, -1, sizeof(*n_highs) * (num - n));
+	vfree(t->highs);
+
+	t->num_allocated = num;
+	t->highs = n_highs;
+	t->targets = n_targets;
+
+	return 0;
+}
+
+int dm_table_create(struct dm_table **result, int mode)
+{
+	struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
+
+	if (!t)
+		return -ENOMEM;
+
+	memset(t, 0, sizeof(*t));
+	INIT_LIST_HEAD(&t->devices);
+	atomic_set(&t->holders, 1);
+
+	/* allocate a single nodes worth of targets to begin with */
+	if (alloc_targets(t, KEYS_PER_NODE)) {
+		kfree(t);
+		t = NULL;
+		return -ENOMEM;
+	}
+
+	init_waitqueue_head(&t->eventq);
+	t->mode = mode;
+	*result = t;
+	return 0;
+}
+
+static void free_devices(struct list_head *devices)
+{
+	struct list_head *tmp, *next;
+
+	for (tmp = devices->next; tmp != devices; tmp = next) {
+		struct dm_dev *dd = list_entry(tmp, struct dm_dev, list);
+		next = tmp->next;
+		kfree(dd);
+	}
+}
+
+void table_destroy(struct dm_table *t)
+{
+	int i;
+
+	DMWARN("destroying table");
+
+	/* destroying the table counts as an event */
+	dm_table_event(t);
+
+	/* free the indexes (see dm_table_complete) */
+	if (t->depth >= 2)
+		vfree(t->index[t->depth - 2]);
+
+	/* free the targets */
+	for (i = 0; i < t->num_targets; i++) {
+		struct dm_target *tgt = &t->targets[i];
+
+		dm_put_target_type(t->targets[i].type);
+
+		if (tgt->type->dtr)
+			tgt->type->dtr(tgt);
+	}
+
+	vfree(t->highs);
+
+	/* free the device list */
+	if (t->devices.next != &t->devices) {
+		DMWARN("devices still present during destroy: "
+		       "dm_table_remove_device calls missing");
+
+		free_devices(&t->devices);
+	}
+
+	kfree(t);
+}
+
+void dm_table_get(struct dm_table *t)
+{
+	atomic_inc(&t->holders);
+}
+
+void dm_table_put(struct dm_table *t)
+{
+	if (atomic_dec_and_test(&t->holders))
+		table_destroy(t);
+}
+
+/*
+ * Checks to see if we need to extend highs or targets.
+ */
+static inline int check_space(struct dm_table *t)
+{
+	if (t->num_targets >= t->num_allocated)
+		return alloc_targets(t, t->num_allocated * 2);
+
+	return 0;
+}
+
+/*
+ * Convert a device path to a dev_t.
+ */
+static int lookup_device(const char *path, dev_t *dev)
+{
+	int r;
+	struct nameidata nd;
+	struct inode *inode;
+
+	if ((r = path_lookup(path, LOOKUP_FOLLOW, &nd)))
+		return r;
+
+	inode = nd.dentry->d_inode;
+	if (!inode) {
+		r = -ENOENT;
+		goto out;
+	}
+
+	if (!S_ISBLK(inode->i_mode)) {
+		r = -EINVAL;
+		goto out;
+	}
+
+	*dev = kdev_t_to_nr(inode->i_rdev);
+
+ out:
+	path_release(&nd);
+	return r;
+}
+
+/*
+ * See if we've already got a device in the list.
+ */
+static struct dm_dev *find_device(struct list_head *l, dev_t dev)
+{
+	struct list_head *tmp;
+
+	list_for_each(tmp, l) {
+		struct dm_dev *dd = list_entry(tmp, struct dm_dev, list);
+		if (dd->bdev->bd_dev == dev)
+			return dd;
+	}
+
+	return NULL;
+}
+
+/*
+ * Open a device so we can use it as a map destination.
+ */
+static int open_dev(struct dm_dev *d, dev_t dev)
+{
+	static char *_claim_ptr = "I belong to device-mapper";
+
+	int r;
+
+	if (d->bdev)
+		BUG();
+
+	d->bdev = bdget(dev);
+	if (!d->bdev)
+		return -ENOMEM;
+
+	r = blkdev_get(d->bdev, d->mode, 0, BDEV_RAW);
+	if (!r)
+		return r;
+
+	r = bd_claim(d->bdev, _claim_ptr);
+	if (r) {
+		blkdev_put(d->bdev, BDEV_RAW);
+		d->bdev = NULL;
+	}
+
+	return r;
+}
+
+/*
+ * Close a device that we've been using.
+ */
+static void close_dev(struct dm_dev *d)
+{
+	if (!d->bdev)
+		return;
+
+	bd_release(d->bdev);
+	blkdev_put(d->bdev, BDEV_RAW);
+	d->bdev = NULL;
+}
+
+/*
+ * If possible (ie. blk_size[major] is set), this checks an area
+ * of a destination device is valid.
+ */
+static int check_device_area(struct dm_dev *dd, sector_t start, sector_t len)
+{
+	sector_t dev_size;
+	dev_size = dd->bdev->bd_inode->i_size;
+	return ((start < dev_size) && (len <= (dev_size - start)));
+}
+
+/*
+ * This upgrades the mode on an already open dm_dev.  Being
+ * careful to leave things as they were if we fail to reopen the
+ * device.
+ */
+static int upgrade_mode(struct dm_dev *dd, int new_mode)
+{
+	int r;
+	struct dm_dev dd_copy;
+	dev_t dev = dd->bdev->bd_dev;
+
+	memcpy(&dd_copy, dd, sizeof(dd_copy));
+
+	dd->mode |= new_mode;
+	dd->bdev = NULL;
+	r = open_dev(dd, dev);
+	if (!r)
+		close_dev(&dd_copy);
+	else
+		memcpy(dd, &dd_copy, sizeof(dd_copy));
+
+	return r;
+}
+
+/*
+ * Add a device to the list, or just increment the usage count if
+ * it's already present.
+ */
+static int __table_get_device(struct dm_table *t, struct dm_target *ti,
+			      const char *path, sector_t start, sector_t len,
+			      int mode, struct dm_dev **result)
+{
+	int r;
+	dev_t dev;
+	struct dm_dev *dd;
+	int major, minor;
+
+	if (!t)
+		BUG();
+
+	if (sscanf(path, "%x:%x", &major, &minor) == 2) {
+		/* Extract the major/minor numbers */
+		dev = MKDEV(major, minor);
+	} else {
+		/* convert the path to a device */
+		if ((r = lookup_device(path, &dev)))
+			return r;
+	}
+
+	dd = find_device(&t->devices, dev);
+	if (!dd) {
+		dd = kmalloc(sizeof(*dd), GFP_KERNEL);
+		if (!dd)
+			return -ENOMEM;
+
+		dd->mode = mode;
+		dd->bdev = NULL;
+
+		if ((r = open_dev(dd, dev))) {
+			kfree(dd);
+			return r;
+		}
+
+		atomic_set(&dd->count, 0);
+		list_add(&dd->list, &t->devices);
+
+	} else if (dd->mode != (mode | dd->mode)) {
+		r = upgrade_mode(dd, mode);
+		if (r)
+			return r;
+	}
+	atomic_inc(&dd->count);
+
+	if (!check_device_area(dd, start, len)) {
+		DMWARN("device %s too small for target", path);
+		dm_put_device(ti, dd);
+		return -EINVAL;
+	}
+
+	*result = dd;
+
+	return 0;
+}
+
+
+int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
+		  sector_t len, int mode, struct dm_dev **result)
+{
+	int r = __table_get_device(ti->table, ti, path,
+				   start, len, mode, result);
+	if (!r) {
+		request_queue_t *q = bdev_get_queue((*result)->bdev);
+		struct io_restrictions *rs = &ti->limits;
+
+		/* combine the device limits low */
+		__LOW(&rs->max_sectors, q->max_sectors);
+		__LOW(&rs->max_phys_segments, q->max_phys_segments);
+		__LOW(&rs->max_hw_segments, q->max_hw_segments);
+		__HIGH(&rs->hardsect_size, q->hardsect_size);
+		__LOW(&rs->max_segment_size, q->max_segment_size);
+		__LOW(&rs->seg_boundary_mask, q->seg_boundary_mask);
+	}
+
+	return r;
+}
+
+/*
+ * Decrement a devices use count and remove it if neccessary.
+ */
+void dm_put_device(struct dm_target *ti, struct dm_dev *dd)
+{
+	if (atomic_dec_and_test(&dd->count)) {
+		close_dev(dd);
+		list_del(&dd->list);
+		kfree(dd);
+	}
+}
+
+/*
+ * Checks to see if the target joins onto the end of the table.
+ */
+static int adjoin(struct dm_table *table, struct dm_target *ti)
+{
+	struct dm_target *prev;
+
+	if (!table->num_targets)
+		return !ti->begin;
+
+	prev = &table->targets[table->num_targets - 1];
+	return (ti->begin == (prev->begin + prev->len));
+}
+
+/*
+ * Destructively splits up the argument list to pass to ctr.
+ */
+static int split_args(int max, int *argc, char **argv, char *input)
+{
+	char *start, *end = input, *out;
+	*argc = 0;
+
+	while (1) {
+		start = end;
+
+		/* Skip whitespace */
+		while (*start && isspace(*start))
+			start++;
+
+		if (!*start)
+			break;	/* success, we hit the end */
+
+		/* 'out' is used to remove any back-quotes */
+		end = out = start;
+		while (*end) {
+			/* Everything apart from '\0' can be quoted */
+			if (*end == '\\' && *(end + 1)) {
+				*out++ = *(end + 1);
+				end += 2;
+				continue;
+			}
+
+			if (isspace(*end))
+				break;	/* end of token */
+
+			*out++ = *end++;
+		}
+
+		/* have we already filled the array ? */
+		if ((*argc + 1) > max)
+			return -EINVAL;
+
+		/* we know this is whitespace */
+		if (*end)
+			end++;
+
+		/* terminate the string and put it in the array */
+		*out = '\0';
+		argv[*argc] = start;
+		(*argc)++;
+	}
+
+	return 0;
+}
+
+int dm_table_add_target(struct dm_table *t, const char *type,
+			sector_t start, sector_t len, char *params)
+{
+	int r, argc;
+	char *argv[32];
+	struct target_type *tt;
+	struct dm_target *tgt;
+
+	if ((r = check_space(t)))
+		return r;
+
+	tgt = t->targets + t->num_targets;
+	memset(tgt, 0, sizeof(*tgt));
+
+	tt = dm_get_target_type(type);
+	if (!tt) {
+		tgt->error = "unknown target type";
+		return -EINVAL;
+	}
+
+	tgt->table = t;
+	tgt->type = tt;
+	tgt->begin = start;
+	tgt->len = len;
+	tgt->error = "Unknown error";
+
+	/*
+	 * Does this target adjoin the previous one ?
+	 */
+	if (!adjoin(t, tgt)) {
+		DMERR("Gap in table");
+		dm_put_target_type(tt);
+		return -EINVAL;
+	}
+
+	r = split_args(ARRAY_SIZE(argv), &argc, argv, params);
+	if (r) {
+		tgt->error = "couldn't split parameters";
+		dm_put_target_type(tt);
+		return r;
+	}
+
+	r = tt->ctr(tgt, argc, argv);
+	if (r) {
+		dm_put_target_type(tt);
+		return r;
+	}
+
+	t->highs[t->num_targets++] = tgt->begin + tgt->len - 1;
+
+	/* FIXME: the plan is to combine high here and then have
+	 * the merge fn apply the target level restrictions. */
+	combine_restrictions_low(&t->limits, &tgt->limits);
+	return 0;
+}
+
+static int setup_indexes(struct dm_table *t)
+{
+	int i, total = 0;
+	sector_t *indexes;
+
+	/* allocate the space for *all* the indexes */
+	for (i = t->depth - 2; i >= 0; i--) {
+		t->counts[i] = div_up(t->counts[i + 1], CHILDREN_PER_NODE);
+		total += t->counts[i];
+	}
+
+	indexes = (sector_t *) vcalloc(total, (unsigned long) NODE_SIZE);
+	if (!indexes)
+		return -ENOMEM;
+
+	/* set up internal nodes, bottom-up */
+	for (i = t->depth - 2, total = 0; i >= 0; i--) {
+		t->index[i] = indexes;
+		indexes += (KEYS_PER_NODE * t->counts[i]);
+		setup_btree_index(i, t);
+	}
+
+	return 0;
+}
+
+/*
+ * Builds the btree to index the map.
+ */
+int dm_table_complete(struct dm_table *t)
+{
+	int leaf_nodes, r = 0;
+
+	/* how many indexes will the btree have ? */
+	leaf_nodes = div_up(t->num_targets, KEYS_PER_NODE);
+	t->depth = 1 + int_log(leaf_nodes, CHILDREN_PER_NODE);
+
+	/* leaf layer has already been set up */
+	t->counts[t->depth - 1] = leaf_nodes;
+	t->index[t->depth - 1] = t->highs;
+
+	if (t->depth >= 2)
+		r = setup_indexes(t);
+
+	return r;
+}
+
+void dm_table_event(struct dm_table *t)
+{
+	wake_up_interruptible(&t->eventq);
+}
+
+sector_t dm_table_get_size(struct dm_table *t)
+{
+	return t->num_targets ? (t->highs[t->num_targets - 1] + 1) : 0;
+}
+
+struct dm_target *dm_table_get_target(struct dm_table *t, int index)
+{
+	if (index > t->num_targets)
+		return NULL;
+
+	return t->targets + index;
+}
+
+/*
+ * Search the btree for the correct target.
+ */
+struct dm_target *dm_table_find_target(struct dm_table *t, sector_t sector)
+{
+	int l, n = 0, k = 0;
+	sector_t *node;
+
+	for (l = 0; l < t->depth; l++) {
+		n = get_child(n, k);
+		node = get_node(t, l, n);
+
+		for (k = 0; k < KEYS_PER_NODE; k++)
+			if (node[k] >= sector)
+				break;
+	}
+
+	return &t->targets[(KEYS_PER_NODE * n) + k];
+}
+
+void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q)
+{
+	/*
+	 * Make sure we obey the optimistic sub devices
+	 * restrictions.
+	 */
+	q->max_sectors = t->limits.max_sectors;
+	q->max_phys_segments = t->limits.max_phys_segments;
+	q->max_hw_segments = t->limits.max_hw_segments;
+	q->hardsect_size = t->limits.hardsect_size;
+	q->max_segment_size = t->limits.max_segment_size;
+	q->seg_boundary_mask = t->limits.seg_boundary_mask;
+}
+
+unsigned int dm_table_get_num_targets(struct dm_table *t)
+{
+	return t->num_targets;
+}
+
+struct list_head *dm_table_get_devices(struct dm_table *t)
+{
+	return &t->devices;
+}
+
+int dm_table_get_mode(struct dm_table *t)
+{
+	return t->mode;
+}
+
+void dm_table_add_wait_queue(struct dm_table *t, wait_queue_t *wq)
+{
+	add_wait_queue(&t->eventq, wq);
+}
+
+EXPORT_SYMBOL(dm_get_device);
+EXPORT_SYMBOL(dm_put_device);
+EXPORT_SYMBOL(dm_table_event);
diff -Nru a/drivers/md/dm-target.c b/drivers/md/dm-target.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm-target.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/module.h>
+#include <linux/kmod.h>
+#include <linux/bio.h>
+#include <linux/slab.h>
+
+struct tt_internal {
+	struct target_type tt;
+
+	struct list_head list;
+	long use;
+};
+
+static LIST_HEAD(_targets);
+static rwlock_t _lock = RW_LOCK_UNLOCKED;
+
+#define DM_MOD_NAME_SIZE 32
+
+static inline struct tt_internal *__find_target_type(const char *name)
+{
+	struct list_head *tih;
+	struct tt_internal *ti;
+
+	list_for_each(tih, &_targets) {
+		ti = list_entry(tih, struct tt_internal, list);
+
+		if (!strcmp(name, ti->tt.name))
+			return ti;
+	}
+
+	return NULL;
+}
+
+static struct tt_internal *get_target_type(const char *name)
+{
+	struct tt_internal *ti;
+
+	read_lock(&_lock);
+	ti = __find_target_type(name);
+
+	if (ti) {
+		if (ti->use == 0 && ti->tt.module)
+			__MOD_INC_USE_COUNT(ti->tt.module);
+		ti->use++;
+	}
+	read_unlock(&_lock);
+
+	return ti;
+}
+
+static void load_module(const char *name)
+{
+	char module_name[DM_MOD_NAME_SIZE] = "dm-";
+
+	/* Length check for strcat() below */
+	if (strlen(name) > (DM_MOD_NAME_SIZE - 4))
+		return;
+
+	strcat(module_name, name);
+	request_module(module_name);
+
+	return;
+}
+
+struct target_type *dm_get_target_type(const char *name)
+{
+	struct tt_internal *ti = get_target_type(name);
+
+	if (!ti) {
+		load_module(name);
+		ti = get_target_type(name);
+	}
+
+	return ti ? &ti->tt : NULL;
+}
+
+void dm_put_target_type(struct target_type *t)
+{
+	struct tt_internal *ti = (struct tt_internal *) t;
+
+	read_lock(&_lock);
+	if (--ti->use == 0 && ti->tt.module)
+		__MOD_DEC_USE_COUNT(ti->tt.module);
+
+	if (ti->use < 0)
+		BUG();
+	read_unlock(&_lock);
+
+	return;
+}
+
+static struct tt_internal *alloc_target(struct target_type *t)
+{
+	struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL);
+
+	if (ti) {
+		memset(ti, 0, sizeof(*ti));
+		ti->tt = *t;
+	}
+
+	return ti;
+}
+
+int dm_register_target(struct target_type *t)
+{
+	int rv = 0;
+	struct tt_internal *ti = alloc_target(t);
+
+	if (!ti)
+		return -ENOMEM;
+
+	write_lock(&_lock);
+	if (__find_target_type(t->name))
+		rv = -EEXIST;
+	else
+		list_add(&ti->list, &_targets);
+
+	write_unlock(&_lock);
+	return rv;
+}
+
+int dm_unregister_target(struct target_type *t)
+{
+	struct tt_internal *ti;
+
+	write_lock(&_lock);
+	if (!(ti = __find_target_type(t->name))) {
+		write_unlock(&_lock);
+		return -EINVAL;
+	}
+
+	if (ti->use) {
+		write_unlock(&_lock);
+		return -ETXTBSY;
+	}
+
+	list_del(&ti->list);
+	kfree(ti);
+
+	write_unlock(&_lock);
+	return 0;
+}
+
+/*
+ * io-err: always fails an io, useful for bringing
+ * up LVs that have holes in them.
+ */
+static int io_err_ctr(struct dm_target *ti, int argc, char **args)
+{
+	return 0;
+}
+
+static void io_err_dtr(struct dm_target *ti)
+{
+	/* empty */
+	return;
+}
+
+static int io_err_map(struct dm_target *ti, struct bio *bio)
+{
+	bio_io_error(bio, 0);
+	return 0;
+}
+
+static struct target_type error_target = {
+	.name = "error",
+	.ctr  = io_err_ctr,
+	.dtr  = io_err_dtr,
+	.map  = io_err_map,
+};
+
+int dm_target_init(void)
+{
+	return dm_register_target(&error_target);
+}
+
+void dm_target_exit(void)
+{
+	if (dm_unregister_target(&error_target))
+		DMWARN("error target unregistration failed");
+}
+
+EXPORT_SYMBOL(dm_register_target);
+EXPORT_SYMBOL(dm_unregister_target);
diff -Nru a/drivers/md/dm.c b/drivers/md/dm.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,796 @@
+/*
+ * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
+ *
+ * This file is released under the GPL.
+ */
+
+#include "dm.h"
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/blk.h>
+#include <linux/blkpg.h>
+#include <linux/bio.h>
+#include <linux/mempool.h>
+#include <linux/slab.h>
+
+static const char *_name = DM_NAME;
+#define MAX_DEVICES 256
+#define SECTOR_SHIFT 9
+
+static int major = 0;
+static int _major = 0;
+
+struct dm_io {
+	struct mapped_device *md;
+	int error;
+	struct bio *bio;
+	atomic_t io_count;
+};
+
+struct deferred_io {
+	struct bio *bio;
+	struct deferred_io *next;
+};
+
+/*
+ * Bits for the md->flags field.
+ */
+#define DMF_BLOCK_IO 0
+#define DMF_SUSPENDED 1
+
+struct mapped_device {
+	struct rw_semaphore lock;
+
+	kdev_t kdev;
+	atomic_t holders;
+
+	unsigned long flags;
+
+	request_queue_t queue;
+	struct gendisk *disk;
+
+	/*
+	 * A list of ios that arrived while we were suspended.
+	 */
+	atomic_t pending;
+	wait_queue_head_t wait;
+	struct deferred_io *deferred;
+
+	/*
+	 * The current mapping.
+	 */
+	struct dm_table *map;
+};
+
+#define MIN_IOS 256
+static kmem_cache_t *_io_cache;
+static mempool_t *_io_pool;
+
+static __init int local_init(void)
+{
+	int r;
+
+	/* allocate a slab for the dm_ios */
+	_io_cache = kmem_cache_create("dm io",
+				      sizeof(struct dm_io), 0, 0, NULL, NULL);
+	if (!_io_cache)
+		return -ENOMEM;
+
+	_io_pool = mempool_create(MIN_IOS, mempool_alloc_slab,
+				  mempool_free_slab, _io_cache);
+	if (!_io_pool) {
+		kmem_cache_destroy(_io_cache);
+		return -ENOMEM;
+	}
+
+	_major = major;
+	r = register_blkdev(_major, _name, &dm_blk_dops);
+	if (r < 0) {
+		DMERR("register_blkdev failed");
+		mempool_destroy(_io_pool);
+		kmem_cache_destroy(_io_cache);
+		return r;
+	}
+
+	if (!_major)
+		_major = r;
+
+	return 0;
+}
+
+static void local_exit(void)
+{
+	mempool_destroy(_io_pool);
+	kmem_cache_destroy(_io_cache);
+
+	if (unregister_blkdev(_major, _name) < 0)
+		DMERR("devfs_unregister_blkdev failed");
+
+	_major = 0;
+
+	DMINFO("cleaned up");
+}
+
+/*
+ * We have a lot of init/exit functions, so it seems easier to
+ * store them in an array.  The disposable macro 'xx'
+ * expands a prefix into a pair of function names.
+ */
+static struct {
+	int (*init) (void);
+	void (*exit) (void);
+
+} _inits[] = {
+#define xx(n) {n ## _init, n ## _exit},
+	xx(local)
+	xx(dm_target)
+	xx(dm_linear)
+	xx(dm_stripe)
+	xx(dm_interface)
+#undef xx
+};
+
+static int __init dm_init(void)
+{
+	const int count = ARRAY_SIZE(_inits);
+
+	int r, i;
+
+	for (i = 0; i < count; i++) {
+		r = _inits[i].init();
+		if (r)
+			goto bad;
+	}
+
+	return 0;
+
+      bad:
+	while (i--)
+		_inits[i].exit();
+
+	return r;
+}
+
+static void __exit dm_exit(void)
+{
+	int i = ARRAY_SIZE(_inits);
+
+	while (i--)
+		_inits[i].exit();
+}
+
+/*
+ * Block device functions
+ */
+static int dm_blk_open(struct inode *inode, struct file *file)
+{
+	struct mapped_device *md;
+
+	md = inode->i_bdev->bd_disk->private_data;
+	dm_get(md);
+	return 0;
+}
+
+static int dm_blk_close(struct inode *inode, struct file *file)
+{
+	struct mapped_device *md;
+
+	md = inode->i_bdev->bd_disk->private_data;
+	dm_put(md);
+	return 0;
+}
+
+static inline struct dm_io *alloc_io(void)
+{
+	return mempool_alloc(_io_pool, GFP_NOIO);
+}
+
+static inline void free_io(struct dm_io *io)
+{
+	mempool_free(io, _io_pool);
+}
+
+static inline struct deferred_io *alloc_deferred(void)
+{
+	return kmalloc(sizeof(struct deferred_io), GFP_NOIO);
+}
+
+static inline void free_deferred(struct deferred_io *di)
+{
+	kfree(di);
+}
+
+/*
+ * Add the bio to the list of deferred io.
+ */
+static int queue_io(struct mapped_device *md, struct bio *bio)
+{
+	struct deferred_io *di;
+
+	di = alloc_deferred();
+	if (!di)
+		return -ENOMEM;
+
+	down_write(&md->lock);
+
+	if (!test_bit(DMF_SUSPENDED, &md->flags)) {
+		up_write(&md->lock);
+		free_deferred(di);
+		return 1;
+	}
+
+	di->bio = bio;
+	di->next = md->deferred;
+	md->deferred = di;
+
+	up_write(&md->lock);
+	return 0;		/* deferred successfully */
+}
+
+/*-----------------------------------------------------------------
+ * CRUD START:
+ *   A more elegant soln is in the works that uses the queue
+ *   merge fn, unfortunately there are a couple of changes to
+ *   the block layer that I want to make for this.  So in the
+ *   interests of getting something for people to use I give
+ *   you this clearly demarcated crap.
+ *---------------------------------------------------------------*/
+
+/*
+ * Decrements the number of outstanding ios that a bio has been
+ * cloned into, completing the original io if necc.
+ */
+static inline void dec_pending(struct dm_io *io, int error)
+{
+	static spinlock_t _uptodate_lock = SPIN_LOCK_UNLOCKED;
+	unsigned long flags;
+
+	spin_lock_irqsave(&_uptodate_lock, flags);
+	if (error)
+		io->error = error;
+	spin_unlock_irqrestore(&_uptodate_lock, flags);
+
+	if (atomic_dec_and_test(&io->io_count)) {
+		if (atomic_dec_and_test(&io->md->pending))
+			/* nudge anyone waiting on suspend queue */
+			wake_up(&io->md->wait);
+
+		bio_endio(io->bio, io->error ? 0 : io->bio->bi_size, io->error);
+		free_io(io);
+	}
+}
+
+static int clone_endio(struct bio *bio, unsigned int done, int error)
+{
+	struct dm_io *io = bio->bi_private;
+
+	/*
+	 * Only call dec_pending if the clone has completely
+	 * finished.  If a partial io errors I'm assuming it won't
+	 * be requeued.  FIXME: check this.
+	 */
+	if (error || !bio->bi_size) {
+		dec_pending(io, error);
+		bio_put(bio);
+	}
+
+	return 0;
+}
+
+
+static sector_t max_io_len(struct mapped_device *md,
+			   sector_t sector, struct dm_target *ti)
+{
+	sector_t len = ti->len;
+
+	/* FIXME: obey io_restrictions ! */
+
+	/*
+	 * Does the target need to split even further ?
+	 */
+	if (ti->split_io) {
+		sector_t boundary;
+		sector_t offset = sector - ti->begin;
+		boundary = dm_round_up(offset + 1, ti->split_io) - offset;
+
+		if (len > boundary)
+			len = boundary;
+	}
+
+	return len;
+}
+
+static void __map_bio(struct dm_target *ti, struct bio *clone)
+{
+	struct dm_io *io = clone->bi_private;
+	int r;
+
+	/*
+	 * Sanity checks.
+	 */
+	if (!clone->bi_size)
+		BUG();
+
+	/*
+	 * Map the clone.  If r == 0 we don't need to do
+	 * anything, the target has assumed ownership of
+	 * this io.
+	 */
+	atomic_inc(&io->md->pending);
+	atomic_inc(&io->io_count);
+	r = ti->type->map(ti, clone);
+	if (r > 0)
+		/* the bio has been remapped so dispatch it */
+		generic_make_request(clone);
+
+	else if (r < 0)
+		/* error the io and bail out */
+		dec_pending(io, -EIO);
+}
+
+struct clone_info {
+	struct mapped_device *md;
+	struct bio *bio;
+	struct dm_io *io;
+	sector_t sector;
+	sector_t sector_count;
+	unsigned short idx;
+};
+
+/*
+ * Issues a little bio that just does the back end of a split page.
+ */
+static void __split_page(struct clone_info *ci, unsigned int len)
+{
+	struct dm_target *ti = dm_table_find_target(ci->md->map, ci->sector);
+	struct bio *clone, *bio = ci->bio;
+	struct bio_vec *bv = bio->bi_io_vec + (bio->bi_vcnt - 1);
+
+	DMWARN("splitting page");
+
+	if (len > ci->sector_count)
+		len = ci->sector_count;
+
+	clone = bio_alloc(GFP_NOIO, 1);
+	memcpy(clone->bi_io_vec, bv, sizeof(*bv));
+
+	clone->bi_sector = ci->sector;
+	clone->bi_bdev = bio->bi_bdev;
+	clone->bi_flags = bio->bi_flags | (1 << BIO_SEG_VALID);
+	clone->bi_rw = bio->bi_rw;
+	clone->bi_size = len << SECTOR_SHIFT;
+	clone->bi_end_io = clone_endio;
+	clone->bi_private = ci->io;
+
+	ci->sector += len;
+	ci->sector_count -= len;
+
+	__map_bio(ti, clone);
+}
+
+static void __clone_and_map(struct clone_info *ci)
+{
+	struct bio *clone, *bio = ci->bio;
+	struct dm_target *ti = dm_table_find_target(ci->md->map, ci->sector);
+	sector_t len = max_io_len(ci->md, bio->bi_sector, ti);
+
+	/* shorter than current target ? */
+	if (ci->sector_count < len)
+		len = ci->sector_count;
+
+	/* create the clone */
+	clone = bio_clone(ci->bio, GFP_NOIO);
+	clone->bi_sector = ci->sector;
+	clone->bi_idx = ci->idx;
+	clone->bi_size = len << SECTOR_SHIFT;
+	clone->bi_end_io = clone_endio;
+	clone->bi_private = ci->io;
+
+	/* adjust the remaining io */
+	ci->sector += len;
+	ci->sector_count -= len;
+	__map_bio(ti, clone);
+
+	/*
+	 * If we are not performing all remaining io in this
+	 * clone then we need to calculate ci->idx for the next
+	 * time round.
+	 */
+	if (ci->sector_count) {
+		while (len) {
+			struct bio_vec *bv = clone->bi_io_vec + ci->idx;
+			sector_t bv_len = bv->bv_len >> SECTOR_SHIFT;
+			if (bv_len <= len)
+				len -= bv_len;
+
+			else {
+				__split_page(ci, bv_len - len);
+				len = 0;
+			}
+			ci->idx++;
+		}
+	}
+}
+
+/*
+ * Split the bio into several clones.
+ */
+static void __split_bio(struct mapped_device *md, struct bio *bio)
+{
+	struct clone_info ci;
+
+	ci.md = md;
+	ci.bio = bio;
+	ci.io = alloc_io();
+	ci.io->error = 0;
+	atomic_set(&ci.io->io_count, 1);
+	ci.io->bio = bio;
+	ci.io->md = md;
+	ci.sector = bio->bi_sector;
+	ci.sector_count = bio_sectors(bio);
+	ci.idx = 0;
+
+	while (ci.sector_count)
+		__clone_and_map(&ci);
+
+	/* drop the extra reference count */
+	dec_pending(ci.io, 0);
+}
+/*-----------------------------------------------------------------
+ * CRUD END
+ *---------------------------------------------------------------*/
+
+
+/*
+ * The request function that just remaps the bio built up by
+ * dm_merge_bvec.
+ */
+static int dm_request(request_queue_t *q, struct bio *bio)
+{
+	int r;
+	struct mapped_device *md = q->queuedata;
+
+	down_read(&md->lock);
+
+	/*
+	 * If we're suspended we have to queue
+	 * this io for later.
+	 */
+	while (test_bit(DMF_BLOCK_IO, &md->flags)) {
+		up_read(&md->lock);
+
+		if (bio_rw(bio) == READA) {
+			bio_io_error(bio, 0);
+			return 0;
+		}
+
+		r = queue_io(md, bio);
+		if (r < 0) {
+			bio_io_error(bio, 0);
+			return 0;
+
+		} else if (r == 0)
+			return 0;	/* deferred successfully */
+
+		/*
+		 * We're in a while loop, because someone could suspend
+		 * before we get to the following read lock.
+		 */
+		down_read(&md->lock);
+	}
+
+	__split_bio(md, bio);
+	up_read(&md->lock);
+	return 0;
+}
+
+/*
+ * See if the device with a specific minor # is free.
+ */
+static int specific_dev(int minor, struct mapped_device *md)
+{
+	struct gendisk *disk;
+	int part;
+
+	if (minor >= MAX_DEVICES) {
+		DMWARN("request for a mapped_device beyond MAX_DEVICES (%d)",
+		       MAX_DEVICES);
+		return -EINVAL;
+	}
+
+	disk = get_gendisk(MKDEV(_major, minor), &part);
+	if (disk) {
+		put_disk(disk);
+		return -EBUSY;
+	}
+
+	return minor;
+}
+
+static int any_old_dev(struct mapped_device *md)
+{
+	int i;
+
+	for (i = 0; i < MAX_DEVICES; i++)
+		if (specific_dev(i, md) >= 0) {
+			DMWARN("allocating minor = %d", i);
+			return i;
+		}
+
+	return -EBUSY;
+}
+
+/*
+ * Allocate and initialise a blank device with a given minor.
+ */
+static struct mapped_device *alloc_dev(int minor)
+{
+	struct mapped_device *md = kmalloc(sizeof(*md), GFP_KERNEL);
+
+	if (!md) {
+		DMWARN("unable to allocate device, out of memory.");
+		return NULL;
+	}
+
+	/* get a minor number for the dev */
+	minor = (minor < 0) ? any_old_dev(md) : specific_dev(minor, md);
+	if (minor < 0) {
+		kfree(md);
+		return NULL;
+	}
+
+	memset(md, 0, sizeof(*md));
+	init_rwsem(&md->lock);
+	md->kdev = mk_kdev(_major, minor);
+	atomic_set(&md->holders, 1);
+
+	md->queue.queuedata = md;
+	blk_queue_make_request(&md->queue, dm_request);
+
+	md->disk = alloc_disk(1);
+	if (!md->disk) {
+		kfree(md);
+		return NULL;
+	}
+
+	md->disk->major = _major;
+	md->disk->first_minor = minor;
+	md->disk->fops = &dm_blk_dops;
+	md->disk->queue = &md->queue;
+	md->disk->private_data = md;
+	sprintf(md->disk->disk_name, "dm-%d", minor);
+	add_disk(md->disk);
+
+	atomic_set(&md->pending, 0);
+	init_waitqueue_head(&md->wait);
+	return md;
+}
+
+static void free_dev(struct mapped_device *md)
+{
+	del_gendisk(md->disk);
+	put_disk(md->disk);
+	kfree(md);
+}
+
+/*
+ * Bind a table to the device.
+ */
+static int __bind(struct mapped_device *md, struct dm_table *t)
+{
+	request_queue_t *q = &md->queue;
+	sector_t size;
+	md->map = t;
+
+	size = dm_table_get_size(t);
+	set_capacity(md->disk, size);
+	if (size == 0)
+		return 0;
+
+	dm_table_get(t);
+	dm_table_set_restrictions(t, q);
+	return 0;
+}
+
+static void __unbind(struct mapped_device *md)
+{
+	dm_table_put(md->map);
+	md->map = NULL;
+	set_capacity(md->disk, 0);
+}
+
+/*
+ * Constructor for a new device.
+ */
+int dm_create(int minor, struct dm_table *table, struct mapped_device **result)
+{
+	int r;
+	struct mapped_device *md;
+
+	md = alloc_dev(minor);
+	if (!md)
+		return -ENXIO;
+
+	r = __bind(md, table);
+	if (r) {
+		free_dev(md);
+		return r;
+	}
+
+	*result = md;
+	return 0;
+}
+
+void dm_get(struct mapped_device *md)
+{
+	atomic_inc(&md->holders);
+}
+
+void dm_put(struct mapped_device *md)
+{
+	if (atomic_dec_and_test(&md->holders)) {
+		DMWARN("destroying md");
+		__unbind(md);
+		free_dev(md);
+	}
+}
+
+/*
+ * Requeue the deferred bios by calling generic_make_request.
+ */
+static void flush_deferred_io(struct deferred_io *c)
+{
+	struct deferred_io *n;
+
+	while (c) {
+		n = c->next;
+		generic_make_request(c->bio);
+		free_deferred(c);
+		c = n;
+	}
+}
+
+/*
+ * Swap in a new table (destroying old one).
+ */
+int dm_swap_table(struct mapped_device *md, struct dm_table *table)
+{
+	int r;
+
+	down_write(&md->lock);
+
+	/* device must be suspended */
+	if (!test_bit(DMF_SUSPENDED, &md->flags)) {
+		up_write(&md->lock);
+		return -EPERM;
+	}
+
+	__unbind(md);
+	r = __bind(md, table);
+	if (r)
+		return r;
+
+	up_write(&md->lock);
+	return 0;
+}
+
+/*
+ * We need to be able to change a mapping table under a mounted
+ * filesystem.  For example we might want to move some data in
+ * the background.  Before the table can be swapped with
+ * dm_bind_table, dm_suspend must be called to flush any in
+ * flight bios and ensure that any further io gets deferred.
+ */
+int dm_suspend(struct mapped_device *md)
+{
+	DECLARE_WAITQUEUE(wait, current);
+
+	down_write(&md->lock);
+
+	/*
+	 * First we set the BLOCK_IO flag so no more ios will be
+	 * mapped.
+	 */
+	if (test_bit(DMF_BLOCK_IO, &md->flags)) {
+		up_write(&md->lock);
+		return -EINVAL;
+	}
+
+	set_bit(DMF_BLOCK_IO, &md->flags);
+	up_write(&md->lock);
+
+	/*
+	 * Then we wait for the already mapped ios to
+	 * complete.
+	 */
+	down_read(&md->lock);
+
+	add_wait_queue(&md->wait, &wait);
+	while (1) {
+		set_current_state(TASK_INTERRUPTIBLE);
+
+		if (!atomic_read(&md->pending))
+			break;
+
+		yield();
+	}
+
+	current->state = TASK_RUNNING;
+	remove_wait_queue(&md->wait, &wait);
+	up_read(&md->lock);
+
+	/* set_bit is atomic */
+	set_bit(DMF_SUSPENDED, &md->flags);
+
+	return 0;
+}
+
+int dm_resume(struct mapped_device *md)
+{
+	struct deferred_io *def;
+
+	down_write(&md->lock);
+	if (!test_bit(DMF_SUSPENDED, &md->flags) ||
+	    !dm_table_get_size(md->map)) {
+		up_write(&md->lock);
+		return -EINVAL;
+	}
+
+	clear_bit(DMF_SUSPENDED, &md->flags);
+	clear_bit(DMF_BLOCK_IO, &md->flags);
+	def = md->deferred;
+	md->deferred = NULL;
+	up_write(&md->lock);
+
+	flush_deferred_io(def);
+	blk_run_queues();
+
+	return 0;
+}
+
+kdev_t dm_kdev(struct mapped_device *md)
+{
+	kdev_t dev;
+
+	down_read(&md->lock);
+	dev = md->kdev;
+	up_read(&md->lock);
+
+	return dev;
+}
+
+struct dm_table *dm_get_table(struct mapped_device *md)
+{
+	struct dm_table *t;
+
+	down_read(&md->lock);
+	t = md->map;
+	dm_table_get(t);
+	up_read(&md->lock);
+
+	return t;
+}
+
+int dm_suspended(struct mapped_device *md)
+{
+	return test_bit(DMF_SUSPENDED, &md->flags);
+}
+
+struct block_device_operations dm_blk_dops = {
+	.open = dm_blk_open,
+	.release = dm_blk_close,
+	.owner = THIS_MODULE
+};
+
+/*
+ * module hooks
+ */
+module_init(dm_init);
+module_exit(dm_exit);
+
+MODULE_PARM(major, "i");
+MODULE_PARM_DESC(major, "The major number of the device mapper");
+MODULE_DESCRIPTION(DM_NAME " driver");
+MODULE_AUTHOR("Joe Thornber <thornber@sistina.com>");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/md/dm.h b/drivers/md/dm.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/md/dm.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,148 @@
+/*
+ * Internal header file for device mapper
+ *
+ * Copyright (C) 2001, 2002 Sistina Software
+ *
+ * This file is released under the LGPL.
+ */
+
+#ifndef DM_INTERNAL_H
+#define DM_INTERNAL_H
+
+#include <linux/fs.h>
+#include <linux/device-mapper.h>
+#include <linux/list.h>
+#include <linux/blkdev.h>
+
+#define DM_NAME "device-mapper"
+#define DMWARN(f, x...) printk(KERN_WARNING DM_NAME ": " f "\n" , ## x)
+#define DMERR(f, x...) printk(KERN_ERR DM_NAME ": " f "\n" , ## x)
+#define DMINFO(f, x...) printk(KERN_INFO DM_NAME ": " f "\n" , ## x)
+
+/*
+ * FIXME: I think this should be with the definition of sector_t
+ * in types.h.
+ */
+#ifdef CONFIG_LBD
+#define SECTOR_FORMAT "%Lu"
+#else
+#define SECTOR_FORMAT "%lu"
+#endif
+
+extern struct block_device_operations dm_blk_dops;
+
+/*
+ * List of devices that a metadevice uses and should open/close.
+ */
+struct dm_dev {
+	struct list_head list;
+
+	atomic_t count;
+	int mode;
+	struct block_device *bdev;
+};
+
+struct dm_table;
+struct mapped_device;
+
+/*-----------------------------------------------------------------
+ * Functions for manipulating a struct mapped_device.
+ * Drop the reference with dm_put when you finish with the object.
+ *---------------------------------------------------------------*/
+int dm_create(int minor, struct dm_table *table, struct mapped_device **md);
+
+/*
+ * Reference counting for md.
+ */
+void dm_get(struct mapped_device *md);
+void dm_put(struct mapped_device *md);
+
+/*
+ * A device can still be used while suspended, but I/O is deferred.
+ */
+int dm_suspend(struct mapped_device *md);
+int dm_resume(struct mapped_device *md);
+
+/*
+ * The device must be suspended before calling this method.
+ */
+int dm_swap_table(struct mapped_device *md, struct dm_table *t);
+
+/*
+ * Drop a reference on the table when you've finished with the
+ * result.
+ */
+struct dm_table *dm_get_table(struct mapped_device *md);
+
+/*
+ * Info functions.
+ */
+kdev_t dm_kdev(struct mapped_device *md);
+int dm_suspended(struct mapped_device *md);
+
+/*-----------------------------------------------------------------
+ * Functions for manipulating a table.  Tables are also reference
+ * counted.
+ *---------------------------------------------------------------*/
+int dm_table_create(struct dm_table **result, int mode);
+
+void dm_table_get(struct dm_table *t);
+void dm_table_put(struct dm_table *t);
+
+int dm_table_add_target(struct dm_table *t, const char *type,
+			sector_t start,	sector_t len, char *params);
+int dm_table_complete(struct dm_table *t);
+void dm_table_event(struct dm_table *t);
+sector_t dm_table_get_size(struct dm_table *t);
+struct dm_target *dm_table_get_target(struct dm_table *t, int index);
+struct dm_target *dm_table_find_target(struct dm_table *t, sector_t sector);
+void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q);
+unsigned int dm_table_get_num_targets(struct dm_table *t);
+struct list_head *dm_table_get_devices(struct dm_table *t);
+int dm_table_get_mode(struct dm_table *t);
+void dm_table_add_wait_queue(struct dm_table *t, wait_queue_t *wq);
+
+/*-----------------------------------------------------------------
+ * A registry of target types.
+ *---------------------------------------------------------------*/
+int dm_target_init(void);
+void dm_target_exit(void);
+struct target_type *dm_get_target_type(const char *name);
+void dm_put_target_type(struct target_type *t);
+
+
+/*-----------------------------------------------------------------
+ * Useful inlines.
+ *---------------------------------------------------------------*/
+static inline int array_too_big(unsigned long fixed, unsigned long obj,
+				unsigned long num)
+{
+	return (num > (ULONG_MAX - fixed) / obj);
+}
+
+/*
+ * ceiling(n / size) * size
+ */
+static inline unsigned long dm_round_up(unsigned long n, unsigned long size)
+{
+	unsigned long r = n % size;
+	return n + (r ? (size - r) : 0);
+}
+
+/*
+ * The device-mapper can be driven through one of two interfaces;
+ * ioctl or filesystem, depending which patch you have applied.
+ */
+int dm_interface_init(void);
+void dm_interface_exit(void);
+
+/*
+ * Targets for linear and striped mappings
+ */
+int dm_linear_init(void);
+void dm_linear_exit(void);
+
+int dm_stripe_init(void);
+void dm_stripe_exit(void);
+
+#endif
diff -Nru a/drivers/md/linear.c b/drivers/md/linear.c
--- a/drivers/md/linear.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/md/linear.c	Wed Oct 30 16:44:27 2002
@@ -52,19 +52,21 @@
  *	@bio: the buffer head that's been built up so far
  *	@biovec: the request that could be merged to it.
  *
- *	Return 1 if the merge is not permitted (because the
- *	result would cross a device boundary), 0 otherwise.
+ *	Return amount of bytes we can take at this offset
  */
 static int linear_mergeable_bvec(request_queue_t *q, struct bio *bio, struct bio_vec *biovec)
 {
 	mddev_t *mddev = q->queuedata;
-	dev_info_t *dev0, *dev1;
+	dev_info_t *dev0;
+	int maxsectors, bio_sectors = (bio->bi_size + biovec->bv_len) >> 9;
 
 	dev0 = which_dev(mddev, bio->bi_sector);
-	dev1 = which_dev(mddev, bio->bi_sector +
-			        ((bio->bi_size + biovec->bv_len - 1) >> 9));
+	maxsectors = (dev0->size << 1) - (bio->bi_sector - (dev0->offset<<1));
 
-	return dev0 != dev1;
+	if (bio_sectors <= maxsectors)
+		return biovec->bv_len;
+
+	return (maxsectors << 9) - bio->bi_size;
 }
 
 static int linear_run (mddev_t *mddev)
diff -Nru a/drivers/md/lvm-fs.c b/drivers/md/lvm-fs.c
--- a/drivers/md/lvm-fs.c	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,623 +0,0 @@
-/*
- * kernel/lvm-fs.c
- *
- * Copyright (C) 2001 Sistina Software
- *
- * January,February 2001
- *
- * LVM driver 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.
- *
- * LVM driver 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 GNU CC; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/*
- * Changelog
- *
- *    11/01/2001 - First version (Joe Thornber)
- *    21/03/2001 - added display of stripes and stripe size (HM)
- *    04/10/2001 - corrected devfs_register() call in lvm_init_fs()
- *    11/04/2001 - don't devfs_register("lvm") as user-space always does it
- *    10/05/2001 - show more of PV name in /proc/lvm/global
- *    16/12/2001 - fix devfs unregister order and prevent duplicate unreg (REG)
- *
- */
-
-#include <linux/config.h>
-#include <linux/version.h>
-#include <linux/module.h>
-
-#include <linux/kernel.h>
-#include <linux/vmalloc.h>
-#include <linux/smp_lock.h>
-
-#include <linux/devfs_fs_kernel.h>
-#include <linux/proc_fs.h>
-#include <linux/init.h>
-#include <linux/lvm.h>
-
-#include "lvm-internal.h"
-
-
-static int _proc_read_vg(char *page, char **start, off_t off,
-			 int count, int *eof, void *data);
-static int _proc_read_lv(char *page, char **start, off_t off,
-			 int count, int *eof, void *data);
-static int _proc_read_pv(char *page, char **start, off_t off,
-			 int count, int *eof, void *data);
-static int _proc_read_global(char *page, char **start, off_t off,
-			     int count, int *eof, void *data);
-
-static int _vg_info(vg_t *vg_ptr, char *buf);
-static int _lv_info(vg_t *vg_ptr, lv_t *lv_ptr, char *buf);
-static int _pv_info(pv_t *pv_ptr, char *buf);
-
-static void _show_uuid(const char *src, char *b, char *e);
-
-static devfs_handle_t lvm_devfs_handle;
-static devfs_handle_t vg_devfs_handle[MAX_VG];
-static devfs_handle_t ch_devfs_handle[MAX_VG];
-static devfs_handle_t lv_devfs_handle[MAX_LV];
-
-static struct proc_dir_entry *lvm_proc_dir = NULL;
-static struct proc_dir_entry *lvm_proc_vg_subdir = NULL;
-
-/* inline functions */
-
-/* public interface */
-void __init lvm_init_fs() {
-	struct proc_dir_entry *pde;
-
-	/*  Must create device node. Think about "devfs=only" situation  */
-	lvm_devfs_handle = devfs_register(
-		0 , "lvm", 0, LVM_CHAR_MAJOR, 0,
-		S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
-		&lvm_chr_fops, NULL);
-
-	lvm_proc_dir = create_proc_entry(LVM_DIR, S_IFDIR, &proc_root);
-	if (lvm_proc_dir) {
-		lvm_proc_vg_subdir = create_proc_entry(LVM_VG_SUBDIR, S_IFDIR,
-						       lvm_proc_dir);
-		pde = create_proc_entry(LVM_GLOBAL, S_IFREG, lvm_proc_dir);
-		if ( pde != NULL) pde->read_proc = _proc_read_global;
-	}
-}
-
-void lvm_fin_fs() {
-	devfs_unregister (lvm_devfs_handle);
-
-	remove_proc_entry(LVM_GLOBAL, lvm_proc_dir);
-	remove_proc_entry(LVM_VG_SUBDIR, lvm_proc_dir);
-	remove_proc_entry(LVM_DIR, &proc_root);
-}
-
-void lvm_fs_create_vg(vg_t *vg_ptr) {
-	struct proc_dir_entry *pde;
-
-	vg_devfs_handle[vg_ptr->vg_number] =
-		devfs_mk_dir(0, vg_ptr->vg_name, NULL);
-
-	ch_devfs_handle[vg_ptr->vg_number] = devfs_register(
-		vg_devfs_handle[vg_ptr->vg_number] , "group",
-		DEVFS_FL_DEFAULT, LVM_CHAR_MAJOR, vg_ptr->vg_number,
-		S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
-		&lvm_chr_fops, NULL);
-
-	vg_ptr->vg_dir_pde = create_proc_entry(vg_ptr->vg_name, S_IFDIR,
-					       lvm_proc_vg_subdir);
-
-	if((pde = create_proc_entry("group", S_IFREG, vg_ptr->vg_dir_pde))) {
-		pde->read_proc = _proc_read_vg;
-		pde->data = vg_ptr;
-	}
-
-	vg_ptr->lv_subdir_pde =
-		create_proc_entry(LVM_LV_SUBDIR, S_IFDIR, vg_ptr->vg_dir_pde);
-
-	vg_ptr->pv_subdir_pde =
-		create_proc_entry(LVM_PV_SUBDIR, S_IFDIR, vg_ptr->vg_dir_pde);
-}
-
-void lvm_fs_remove_vg(vg_t *vg_ptr) {
-	int i;
-
-	devfs_unregister(ch_devfs_handle[vg_ptr->vg_number]);
-	ch_devfs_handle[vg_ptr->vg_number] = NULL;
-
-	/* remove lv's */
-	for(i = 0; i < vg_ptr->lv_max; i++)
-		if(vg_ptr->lv[i]) lvm_fs_remove_lv(vg_ptr, vg_ptr->lv[i]);
-
-	/* remove pv's */
-	for(i = 0; i < vg_ptr->pv_max; i++)
-		if(vg_ptr->pv[i]) lvm_fs_remove_pv(vg_ptr, vg_ptr->pv[i]);
-
-	/* must not remove directory before leaf nodes */
-	devfs_unregister(vg_devfs_handle[vg_ptr->vg_number]);
-	vg_devfs_handle[vg_ptr->vg_number] = NULL;
-
-	if(vg_ptr->vg_dir_pde) {
-		remove_proc_entry(LVM_LV_SUBDIR, vg_ptr->vg_dir_pde);
-		vg_ptr->lv_subdir_pde = NULL;
-
-		remove_proc_entry(LVM_PV_SUBDIR, vg_ptr->vg_dir_pde);
-		vg_ptr->pv_subdir_pde = NULL;
-
-		remove_proc_entry("group", vg_ptr->vg_dir_pde);
-		vg_ptr->vg_dir_pde = NULL;
-
-		remove_proc_entry(vg_ptr->vg_name, lvm_proc_vg_subdir);
-	}
-}
-
-
-static inline const char *_basename(const char *str) {
-	const char *name = strrchr(str, '/');
-	name = name ? name + 1 : str;
-	return name;
-}
-
-devfs_handle_t lvm_fs_create_lv(vg_t *vg_ptr, lv_t *lv) {
-	struct proc_dir_entry *pde;
-	const char *name = _basename(lv->u.lv_name);
-
-	lv_devfs_handle[minor(lv->u.lv_dev)] = devfs_register(
-		vg_devfs_handle[vg_ptr->vg_number], name,
-		DEVFS_FL_DEFAULT, LVM_BLK_MAJOR, minor(lv->u.lv_dev),
-		S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP,
-		&lvm_blk_dops, NULL);
-
-	if(vg_ptr->lv_subdir_pde &&
-	   (pde = create_proc_entry(name, S_IFREG, vg_ptr->lv_subdir_pde))) {
-		pde->read_proc = _proc_read_lv;
-		pde->data = lv;
-	}
-	return lv_devfs_handle[minor(lv->u.lv_dev)];
-}
-
-void lvm_fs_remove_lv(vg_t *vg_ptr, lv_t *lv) {
-	devfs_unregister(lv_devfs_handle[minor(lv->u.lv_dev)]);
-	lv_devfs_handle[minor(lv->u.lv_dev)] = NULL;
-
-	if(vg_ptr->lv_subdir_pde) {
-		const char *name = _basename(lv->u.lv_name);
-		remove_proc_entry(name, vg_ptr->lv_subdir_pde);
-	}
-}
-
-
-static inline void _make_pv_name(const char *src, char *b, char *e) {
-	int offset = strlen(LVM_DIR_PREFIX);
-	if(strncmp(src, LVM_DIR_PREFIX, offset))
-		offset = 0;
-
-	e--;
-	src += offset;
-	while(*src && (b != e)) {
-		*b++ = (*src == '/') ? '_' : *src;
-		src++;
-	}
-	*b = '\0';
-}
-
-void lvm_fs_create_pv(vg_t *vg_ptr, pv_t *pv) {
-	struct proc_dir_entry *pde;
-	char name[NAME_LEN];
-
-	if(!vg_ptr->pv_subdir_pde)
-		return;
-
-	_make_pv_name(pv->pv_name, name, name + sizeof(name));
-	if((pde = create_proc_entry(name, S_IFREG, vg_ptr->pv_subdir_pde))) {
-		pde->read_proc = _proc_read_pv;
-		pde->data = pv;
-	}
-}
-
-void lvm_fs_remove_pv(vg_t *vg_ptr, pv_t *pv) {
-	char name[NAME_LEN];
-
-	if(!vg_ptr->pv_subdir_pde)
-		return;
-
-	_make_pv_name(pv->pv_name, name, name + sizeof(name));
-	remove_proc_entry(name, vg_ptr->pv_subdir_pde);
-}
-
-
-static int _proc_read_vg(char *page, char **start, off_t off,
-			  int count, int *eof, void *data) {
-	int sz = 0;
-	vg_t *vg_ptr = data;
-	char uuid[NAME_LEN];
-
-	sz += sprintf(page + sz, "name:         %s\n", vg_ptr->vg_name);
-	sz += sprintf(page + sz, "size:         %u\n",
-		      vg_ptr->pe_total * vg_ptr->pe_size / 2);
-	sz += sprintf(page + sz, "access:       %u\n", vg_ptr->vg_access);
-	sz += sprintf(page + sz, "status:       %u\n", vg_ptr->vg_status);
-	sz += sprintf(page + sz, "number:       %u\n", vg_ptr->vg_number);
-	sz += sprintf(page + sz, "LV max:       %u\n", vg_ptr->lv_max);
-	sz += sprintf(page + sz, "LV current:   %u\n", vg_ptr->lv_cur);
-	sz += sprintf(page + sz, "LV open:      %u\n", vg_ptr->lv_open);
-	sz += sprintf(page + sz, "PV max:       %u\n", vg_ptr->pv_max);
-	sz += sprintf(page + sz, "PV current:   %u\n", vg_ptr->pv_cur);
-	sz += sprintf(page + sz, "PV active:    %u\n", vg_ptr->pv_act);
-	sz += sprintf(page + sz, "PE size:      %u\n", vg_ptr->pe_size / 2);
-	sz += sprintf(page + sz, "PE total:     %u\n", vg_ptr->pe_total);
-	sz += sprintf(page + sz, "PE allocated: %u\n", vg_ptr->pe_allocated);
-
-	_show_uuid(vg_ptr->vg_uuid, uuid, uuid + sizeof(uuid));
-	sz += sprintf(page + sz, "uuid:         %s\n", uuid);
-
-	return sz;
-}
-
-static int _proc_read_lv(char *page, char **start, off_t off,
-			  int count, int *eof, void *data) {
-	int sz = 0;
-	lv_t *lv = data;
-
-	sz += sprintf(page + sz, "name:         %s\n", lv->u.lv_name);
-	sz += sprintf(page + sz, "size:         %u\n", lv->u.lv_size);
-	sz += sprintf(page + sz, "access:       %u\n", lv->u.lv_access);
-	sz += sprintf(page + sz, "status:       %u\n", lv->u.lv_status);
-	sz += sprintf(page + sz, "number:       %u\n", lv->u.lv_number);
-	sz += sprintf(page + sz, "open:         %u\n", lv->u.lv_open);
-	sz += sprintf(page + sz, "allocation:   %u\n", lv->u.lv_allocation);
-       if(lv->u.lv_stripes > 1) {
-               sz += sprintf(page + sz, "stripes:      %u\n",
-                             lv->u.lv_stripes);
-               sz += sprintf(page + sz, "stripesize:   %u\n",
-                             lv->u.lv_stripesize);
-       }
-	sz += sprintf(page + sz, "device:       %02u:%02u\n",
-		      major(lv->u.lv_dev), minor(lv->u.lv_dev));
-
-	return sz;
-}
-
-static int _proc_read_pv(char *page, char **start, off_t off,
-			 int count, int *eof, void *data) {
-	int sz = 0;
-	pv_t *pv = data;
-	char uuid[NAME_LEN];
-
-	sz += sprintf(page + sz, "name:         %s\n", pv->pv_name);
-	sz += sprintf(page + sz, "size:         %u\n", pv->pv_size);
-	sz += sprintf(page + sz, "status:       %u\n", pv->pv_status);
-	sz += sprintf(page + sz, "number:       %u\n", pv->pv_number);
-	sz += sprintf(page + sz, "allocatable:  %u\n", pv->pv_allocatable);
-	sz += sprintf(page + sz, "LV current:   %u\n", pv->lv_cur);
-	sz += sprintf(page + sz, "PE size:      %u\n", pv->pe_size / 2);
-	sz += sprintf(page + sz, "PE total:     %u\n", pv->pe_total);
-	sz += sprintf(page + sz, "PE allocated: %u\n", pv->pe_allocated);
-	sz += sprintf(page + sz, "device:       %02u:%02u\n",
-                      major(pv->pv_dev), minor(pv->pv_dev));
-
-	_show_uuid(pv->pv_uuid, uuid, uuid + sizeof(uuid));
-	sz += sprintf(page + sz, "uuid:         %s\n", uuid);
-
-	return sz;
-}
-
-static int _proc_read_global(char *page, char **start, off_t pos, int count,
-			     int *eof, void *data) {
-
-#define  LVM_PROC_BUF   ( i == 0 ? dummy_buf : &buf[sz])
-
-	int c, i, l, p, v, vg_counter, pv_counter, lv_counter, lv_open_counter,
-		lv_open_total, pe_t_bytes, hash_table_bytes, lv_block_exception_t_bytes, seconds;
-	static off_t sz;
-	off_t sz_last;
-	static char *buf = NULL;
-	static char dummy_buf[160];	/* sized for 2 lines */
-	vg_t *vg_ptr;
-	lv_t *lv_ptr;
-	pv_t *pv_ptr;
-
-
-#ifdef DEBUG_LVM_PROC_GET_INFO
-	printk(KERN_DEBUG
-	       "%s - lvm_proc_get_global_info CALLED  pos: %lu  count: %d\n",
-	       lvm_name, pos, count);
-#endif
-
-	if(pos != 0 && buf != NULL)
-		goto out;
-
-	sz_last = vg_counter = pv_counter = lv_counter = lv_open_counter = \
-		lv_open_total = pe_t_bytes = hash_table_bytes = \
-		lv_block_exception_t_bytes = 0;
-
-	/* get some statistics */
-	for (v = 0; v < ABS_MAX_VG; v++) {
-		if ((vg_ptr = vg[v]) != NULL) {
-			vg_counter++;
-			pv_counter += vg_ptr->pv_cur;
-			lv_counter += vg_ptr->lv_cur;
-			if (vg_ptr->lv_cur > 0) {
-				for (l = 0; l < vg[v]->lv_max; l++) {
-					if ((lv_ptr = vg_ptr->lv[l]) != NULL) {
-						pe_t_bytes += lv_ptr->u.lv_allocated_le;
-						hash_table_bytes += lv_ptr->lv_snapshot_hash_table_size;
-						if (lv_ptr->u.lv_block_exception != NULL)
-							lv_block_exception_t_bytes += lv_ptr->u.lv_remap_end;
-						if (lv_ptr->u.lv_open > 0) {
-							lv_open_counter++;
-							lv_open_total += lv_ptr->u.lv_open;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	pe_t_bytes *= sizeof(pe_t);
-	lv_block_exception_t_bytes *= sizeof(lv_block_exception_t);
-
-	if (buf != NULL) {
-		P_KFREE("%s -- vfree %d\n", lvm_name, __LINE__);
-		lock_kernel();
-		vfree(buf);
-		unlock_kernel();
-		buf = NULL;
-	}
-	/* 2 times: first to get size to allocate buffer,
-	   2nd to fill the malloced buffer */
-	for (i = 0; i < 2; i++) {
-		sz = 0;
-		sz += sprintf(LVM_PROC_BUF,
-			      "LVM "
-#ifdef MODULE
-			      "module"
-#else
-			      "driver"
-#endif
-			      " %s\n\n"
-			      "Total:  %d VG%s  %d PV%s  %d LV%s ",
-			      lvm_version,
-			      vg_counter, vg_counter == 1 ? "" : "s",
-			      pv_counter, pv_counter == 1 ? "" : "s",
-			      lv_counter, lv_counter == 1 ? "" : "s");
-		sz += sprintf(LVM_PROC_BUF,
-			      "(%d LV%s open",
-			      lv_open_counter,
-			      lv_open_counter == 1 ? "" : "s");
-		if (lv_open_total > 0)
-			sz += sprintf(LVM_PROC_BUF,
-				      " %d times)\n",
-				      lv_open_total);
-		else
-			sz += sprintf(LVM_PROC_BUF, ")");
-		sz += sprintf(LVM_PROC_BUF,
-			      "\nGlobal: %lu bytes malloced   IOP version: %d   ",
-			      vg_counter * sizeof(vg_t) +
-			      pv_counter * sizeof(pv_t) +
-			      lv_counter * sizeof(lv_t) +
-			      pe_t_bytes + hash_table_bytes + lv_block_exception_t_bytes + sz_last,
-			      lvm_iop_version);
-
-		seconds = CURRENT_TIME - loadtime;
-		if (seconds < 0)
-			loadtime = CURRENT_TIME + seconds;
-		if (seconds / 86400 > 0) {
-			sz += sprintf(LVM_PROC_BUF, "%d day%s ",
-				      seconds / 86400,
-				      seconds / 86400 == 0 ||
-				      seconds / 86400 > 1 ? "s" : "");
-		}
-		sz += sprintf(LVM_PROC_BUF, "%d:%02d:%02d active\n",
-			      (seconds % 86400) / 3600,
-			      (seconds % 3600) / 60,
-			      seconds % 60);
-
-		if (vg_counter > 0) {
-			for (v = 0; v < ABS_MAX_VG; v++) {
-				/* volume group */
-				if ((vg_ptr = vg[v]) != NULL) {
-					sz += _vg_info(vg_ptr, LVM_PROC_BUF);
-
-					/* physical volumes */
-					sz += sprintf(LVM_PROC_BUF,
-						      "\n  PV%s ",
-						      vg_ptr->pv_cur == 1 ? ": " : "s:");
-					c = 0;
-					for (p = 0; p < vg_ptr->pv_max; p++) {
-						if ((pv_ptr = vg_ptr->pv[p]) != NULL) {
-							sz += _pv_info(pv_ptr, LVM_PROC_BUF);
-
-							c++;
-							if (c < vg_ptr->pv_cur)
-								sz += sprintf(LVM_PROC_BUF,
-									      "\n       ");
-						}
-					}
-
-					/* logical volumes */
-					sz += sprintf(LVM_PROC_BUF,
-						      "\n    LV%s ",
-						      vg_ptr->lv_cur == 1 ? ": " : "s:");
-					c = 0;
-					for (l = 0; l < vg_ptr->lv_max; l++) {
-						if ((lv_ptr = vg_ptr->lv[l]) != NULL) {
-							sz += _lv_info(vg_ptr, lv_ptr, LVM_PROC_BUF);
-							c++;
-							if (c < vg_ptr->lv_cur)
-								sz += sprintf(LVM_PROC_BUF,
-									      "\n         ");
-						}
-					}
-					if (vg_ptr->lv_cur == 0) sz += sprintf(LVM_PROC_BUF, "none");
-					sz += sprintf(LVM_PROC_BUF, "\n");
-				}
-			}
-		}
-		if (buf == NULL) {
-			lock_kernel();
-			buf = vmalloc(sz);
-			unlock_kernel();
-			if (buf == NULL) {
-				sz = 0;
-				return sprintf(page, "%s - vmalloc error at line %d\n",
-					       lvm_name, __LINE__);
-			}
-		}
-		sz_last = sz;
-	}
-
- out:
-	if (pos > sz - 1) {
-		lock_kernel();
-		vfree(buf);
-		unlock_kernel();
-		buf = NULL;
-		return 0;
-	}
-	*start = &buf[pos];
-	if (sz - pos < count)
-		return sz - pos;
-	else
-		return count;
-
-#undef LVM_PROC_BUF
-}
-
-/*
- * provide VG info for proc filesystem use (global)
- */
-static int _vg_info(vg_t *vg_ptr, char *buf) {
-	int sz = 0;
-	char inactive_flag = ' ';
-
-	if (!(vg_ptr->vg_status & VG_ACTIVE)) inactive_flag = 'I';
-	sz = sprintf(buf,
-		     "\nVG: %c%s  [%d PV, %d LV/%d open] "
-		     " PE Size: %d KB\n"
-		     "  Usage [KB/PE]: %d /%d total  "
-		     "%d /%d used  %d /%d free",
-		     inactive_flag,
-		     vg_ptr->vg_name,
-		     vg_ptr->pv_cur,
-		     vg_ptr->lv_cur,
-		     vg_ptr->lv_open,
-	     	     vg_ptr->pe_size >> 1,
-		     vg_ptr->pe_size * vg_ptr->pe_total >> 1,
-		     vg_ptr->pe_total,
-		     vg_ptr->pe_allocated * vg_ptr->pe_size >> 1,
-	     	     vg_ptr->pe_allocated,
-		     (vg_ptr->pe_total - vg_ptr->pe_allocated) *
-	     	     vg_ptr->pe_size >> 1,
-		     vg_ptr->pe_total - vg_ptr->pe_allocated);
-	return sz;
-}
-
-
-/*
- * provide LV info for proc filesystem use (global)
- */
-static int _lv_info(vg_t *vg_ptr, lv_t *lv_ptr, char *buf) {
-	int sz = 0;
-	char inactive_flag = 'A', allocation_flag = ' ',
-		stripes_flag = ' ', rw_flag = ' ', *basename;
-
-	if (!(lv_ptr->u.lv_status & LV_ACTIVE))
-		inactive_flag = 'I';
-	rw_flag = 'R';
-	if (lv_ptr->u.lv_access & LV_WRITE)
-		rw_flag = 'W';
-	allocation_flag = 'D';
-	if (lv_ptr->u.lv_allocation & LV_CONTIGUOUS)
-		allocation_flag = 'C';
-	stripes_flag = 'L';
-	if (lv_ptr->u.lv_stripes > 1)
-		stripes_flag = 'S';
-	sz += sprintf(buf+sz,
-		      "[%c%c%c%c",
-		      inactive_flag,
-	 rw_flag,
-		      allocation_flag,
-		      stripes_flag);
-	if (lv_ptr->u.lv_stripes > 1)
-		sz += sprintf(buf+sz, "%-2d",
-			      lv_ptr->u.lv_stripes);
-	else
-		sz += sprintf(buf+sz, "  ");
-
-	/* FIXME: use _basename */
-	basename = strrchr(lv_ptr->u.lv_name, '/');
-	if ( basename == 0) basename = lv_ptr->u.lv_name;
-	else                basename++;
-	sz += sprintf(buf+sz, "] %-25s", basename);
-	if (strlen(basename) > 25)
-		sz += sprintf(buf+sz,
-			      "\n                              ");
-	sz += sprintf(buf+sz, "%9d /%-6d   ",
-		      lv_ptr->u.lv_size >> 1,
-		      lv_ptr->u.lv_size / vg_ptr->pe_size);
-
-	if (lv_ptr->u.lv_open == 0)
-		sz += sprintf(buf+sz, "close");
-	else
-		sz += sprintf(buf+sz, "%dx open",
-			      lv_ptr->u.lv_open);
-
-	return sz;
-}
-
-
-/*
- * provide PV info for proc filesystem use (global)
- */
-static int _pv_info(pv_t *pv, char *buf) {
-	int sz = 0;
-	char inactive_flag = 'A', allocation_flag = ' ';
-	char *pv_name = NULL;
-
-	if (!(pv->pv_status & PV_ACTIVE))
-		inactive_flag = 'I';
-	allocation_flag = 'A';
-	if (!(pv->pv_allocatable & PV_ALLOCATABLE))
-		allocation_flag = 'N';
-	pv_name = strchr(pv->pv_name+1,'/');
-	if ( pv_name == 0) pv_name = pv->pv_name;
-	else               pv_name++;
-	sz = sprintf(buf,
-		     "[%c%c] %-21s %8d /%-6d  "
-		     "%8d /%-6d  %8d /%-6d",
-		     inactive_flag,
-		     allocation_flag,
-		     pv_name,
-		     pv->pe_total * pv->pe_size >> 1,
-		     pv->pe_total,
-		     pv->pe_allocated * pv->pe_size >> 1,
-		     pv->pe_allocated,
-		     (pv->pe_total - pv->pe_allocated) *
-		     pv->pe_size >> 1,
-		     pv->pe_total - pv->pe_allocated);
-	return sz;
-}
-
-static void _show_uuid(const char *src, char *b, char *e) {
-	int i;
-
-	e--;
-	for(i = 0; *src && (b != e); i++) {
-		if(i && !(i & 0x3))
-			*b++ = '-';
-		*b++ = *src++;
-	}
-	*b = '\0';
-}
-MODULE_LICENSE("GPL");
diff -Nru a/drivers/md/lvm-internal.h b/drivers/md/lvm-internal.h
--- a/drivers/md/lvm-internal.h	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,101 +0,0 @@
-/*
- * kernel/lvm-internal.h
- *
- * Copyright (C) 2001 Sistina Software
- *
- *
- * LVM driver 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.
- *
- * LVM driver 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 GNU CC; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/*
- * Changelog
- *
- *    05/01/2001:Joe Thornber - Factored this file out of lvm.c
- *
- */
-
-#ifndef LVM_INTERNAL_H
-#define LVM_INTERNAL_H
-
-#include <linux/lvm.h>
-
-#define _LVM_INTERNAL_H_VERSION "LVM "LVM_RELEASE_NAME" ("LVM_RELEASE_DATE")"
-
-/* global variables, defined in lvm.c */
-extern char *lvm_version;
-extern ushort lvm_iop_version;
-extern int loadtime;
-extern const char *const lvm_name;
-
-
-extern vg_t *vg[];
-extern struct file_operations lvm_chr_fops;
-
-extern struct block_device_operations lvm_blk_dops;
-
-
-/* debug macros */
-#ifdef DEBUG_IOCTL
-#define P_IOCTL(fmt, args...) printk(KERN_DEBUG "lvm ioctl: " fmt, ## args)
-#else
-#define P_IOCTL(fmt, args...)
-#endif
-
-#ifdef DEBUG_MAP
-#define P_MAP(fmt, args...) printk(KERN_DEBUG "lvm map: " fmt, ## args)
-#else
-#define P_MAP(fmt, args...)
-#endif
-
-#ifdef DEBUG_KFREE
-#define P_KFREE(fmt, args...) printk(KERN_DEBUG "lvm kfree: " fmt, ## args)
-#else
-#define P_KFREE(fmt, args...)
-#endif
-
-#ifdef DEBUG_DEVICE
-#define P_DEV(fmt, args...) printk(KERN_DEBUG "lvm device: " fmt, ## args)
-#else
-#define P_DEV(fmt, args...)
-#endif
-
-
-/* lvm-snap.c */
-int lvm_get_blksize(kdev_t);
-int lvm_snapshot_alloc(lv_t *);
-int lvm_snapshot_fill_COW_page(vg_t *, lv_t *);
-int lvm_snapshot_COW(kdev_t, ulong, ulong, ulong, vg_t *vg, lv_t *);
-int lvm_snapshot_remap_block(kdev_t *, ulong *, ulong, lv_t *);
-void lvm_snapshot_release(lv_t *);
-int lvm_write_COW_table_block(vg_t *, lv_t *);
-void lvm_hash_link(lv_block_exception_t *, kdev_t, ulong, lv_t *);
-int lvm_snapshot_alloc_hash_table(lv_t *);
-void lvm_drop_snapshot(vg_t *vg, lv_t *, const char *);
-
-
-/* lvm_fs.c */
-void lvm_init_fs(void);
-void lvm_fin_fs(void);
-
-void lvm_fs_create_vg(vg_t *vg_ptr);
-void lvm_fs_remove_vg(vg_t *vg_ptr);
-devfs_handle_t lvm_fs_create_lv(vg_t *vg_ptr, lv_t *lv);
-void lvm_fs_remove_lv(vg_t *vg_ptr, lv_t *lv);
-void lvm_fs_create_pv(vg_t *vg_ptr, pv_t *pv);
-void lvm_fs_remove_pv(vg_t *vg_ptr, pv_t *pv);
-
-#endif
diff -Nru a/drivers/md/lvm-snap.c b/drivers/md/lvm-snap.c
--- a/drivers/md/lvm-snap.c	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,700 +0,0 @@
-/*
- * kernel/lvm-snap.c
- *
- * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
- *                    Heinz Mauelshagen, Sistina Software (persistent snapshots)
- *
- * LVM snapshot driver 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.
- * 
- * LVM snapshot driver 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 GNU CC; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA. 
- *
- */
-
-/*
- * Changelog
- *
- *    05/07/2000 - implemented persistent snapshot support
- *    23/11/2000 - used cpu_to_le64 rather than my own macro
- *    25/01/2001 - Put SetPageLocked back in
- *    01/02/2001 - A dropped snapshot is now set as inactive
- *    12/03/2001 - lvm_pv_get_number changes:
- *                 o made it static
- *                 o renamed it to _pv_get_number
- *                 o pv number is returned in new uint * arg
- *                 o -1 returned on error
- *                 lvm_snapshot_fill_COW_table has a return value too.
- *    25/02/2002 - s/LockPage/SetPageLocked/ - akpm@zip.com.au
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/vmalloc.h>
-#include <linux/blkdev.h>
-#include <linux/smp_lock.h>
-#include <linux/types.h>
-#include <linux/iobuf.h>
-#include <linux/lvm.h>
-
-
-#include "lvm-internal.h"
-
-static char *lvm_snap_version __attribute__ ((unused)) =
-   "LVM "LVM_RELEASE_NAME" snapshot code ("LVM_RELEASE_DATE")\n";
-
-
-extern const char *const lvm_name;
-extern int lvm_blocksizes[];
-
-void lvm_snapshot_release(lv_t *);
-static int _write_COW_table_block(vg_t *vg, lv_t *lv, int idx,
-                                 const char **reason);
-static void _disable_snapshot(vg_t *vg, lv_t *lv);
-
-
-static int _pv_get_number(vg_t * vg, kdev_t rdev, uint *pvn) {
-	uint p;
-	for(p = 0; p < vg->pv_max; p++) {
-		if(vg->pv[p] == NULL)
-			continue;
-
-		if(kdev_same(vg->pv[p]->pv_dev, rdev))
-			break;
-
-	}
-
- 	if(p >= vg->pv_max) {
-		/* bad news, the snapshot COW table is probably corrupt */
-		printk(KERN_ERR
-		       "%s -- _pv_get_number failed for rdev = %u\n",
-		       lvm_name, kdev_t_to_nr(rdev));
-		return -1;
-	}
-
-	*pvn = vg->pv[p]->pv_number;
-	return 0;
-}
-
-#define hashfn(dev,block,mask,chunk_size) \
-	((HASHDEV(dev)^((block)/(chunk_size))) & (mask))
-
-static inline lv_block_exception_t *
-lvm_find_exception_table(kdev_t org_dev, unsigned long org_start, lv_t * lv)
-{
-	struct list_head * hash_table = lv->lv_snapshot_hash_table, * next;
-	unsigned long mask = lv->lv_snapshot_hash_mask;
-	int chunk_size = lv->u.lv_chunk_size;
-	lv_block_exception_t * ret;
-	int i = 0;
-
-	hash_table = &hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
-	ret = NULL;
-	for (next = hash_table->next; next != hash_table; next = next->next)
-	{
-		lv_block_exception_t * exception;
-
-		exception = list_entry(next, lv_block_exception_t, hash);
-		if (exception->rsector_org == org_start &&
-		    kdev_same(exception->rdev_org, org_dev))
-		{
-			if (i)
-			{
-				/* fun, isn't it? :) */
-				list_del(next);
-				list_add(next, hash_table);
-			}
-			ret = exception;
-			break;
-		}
-		i++;
-	}
-	return ret;
-}
-
-inline void lvm_hash_link(lv_block_exception_t * exception,
-			  kdev_t org_dev, unsigned long org_start,
-			  lv_t * lv)
-{
-	struct list_head * hash_table = lv->lv_snapshot_hash_table;
-	unsigned long mask = lv->lv_snapshot_hash_mask;
-	int chunk_size = lv->u.lv_chunk_size;
-
-	hash_table = &hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
-	list_add(&exception->hash, hash_table);
-}
-
-int lvm_snapshot_remap_block(kdev_t * org_dev, unsigned long * org_sector,
-			     unsigned long pe_start, lv_t * lv)
-{
-	int ret;
-	unsigned long pe_off, pe_adjustment, __org_start;
-	kdev_t __org_dev;
-	int chunk_size = lv->u.lv_chunk_size;
-	lv_block_exception_t * exception;
-
-	pe_off = pe_start % chunk_size;
-	pe_adjustment = (*org_sector-pe_off) % chunk_size;
-	__org_start = *org_sector - pe_adjustment;
-	__org_dev = *org_dev;
-	ret = 0;
-	exception = lvm_find_exception_table(__org_dev, __org_start, lv);
-	if (exception)
-	{
-		*org_dev = exception->rdev_new;
-		*org_sector = exception->rsector_new + pe_adjustment;
-		ret = 1;
-	}
-	return ret;
-}
-
-void lvm_drop_snapshot(vg_t *vg, lv_t *lv_snap, const char *reason)
-{
-	kdev_t last_dev;
-	int i;
-
-	/* no exception storage space available for this snapshot
-	   or error on this snapshot --> release it */
-	invalidate_buffers(lv_snap->u.lv_dev);
-
-       /* wipe the snapshot since it's inconsistent now */
-       _disable_snapshot(vg, lv_snap);
-
-	last_dev = NODEV;
-	for (i = 0; i < lv_snap->u.lv_remap_ptr; i++) {
-		if ( !kdev_same(lv_snap->u.lv_block_exception[i].rdev_new,
-				last_dev)) {
-			last_dev = lv_snap->u.lv_block_exception[i].rdev_new;
-			invalidate_buffers(last_dev);
-		}
-	}
-
-	lvm_snapshot_release(lv_snap);
-	lv_snap->u.lv_status &= ~LV_ACTIVE;
-
-	printk(KERN_INFO
-	       "%s -- giving up to snapshot %s on %s: %s\n",
-	       lvm_name, lv_snap->u.lv_snapshot_org->u.lv_name, lv_snap->u.lv_name,
-	       reason);
-}
-
-static inline int lvm_snapshot_prepare_blocks(unsigned long *blocks,
-					      unsigned long start,
-					      int nr_sectors,
-					      int blocksize)
-{
-	int i, sectors_per_block, nr_blocks;
-
-	sectors_per_block = blocksize / SECTOR_SIZE;
-
-	if(start & (sectors_per_block - 1))
-		return 0;
-
-	nr_blocks = nr_sectors / sectors_per_block;
-	start /= sectors_per_block;
-
-	for (i = 0; i < nr_blocks; i++)
-		blocks[i] = start++;
-
-	return 1;
-}
-
-#ifdef DEBUG_SNAPSHOT
-static inline void invalidate_snap_cache(unsigned long start, unsigned long nr,
-					 kdev_t dev)
-{
-	struct buffer_head * bh;
-	int sectors_per_block, i, blksize, minor;
-
-	minor = minor(dev);
-	blksize = lvm_blocksizes[minor];
-	sectors_per_block = blksize >> 9;
-	nr /= sectors_per_block;
-	start /= sectors_per_block;
-
-	for (i = 0; i < nr; i++)
-	{
-		bh = find_get_block(dev, start++, blksize);
-		if (bh)
-			bforget(bh);
-	}
-}
-#endif
-
-
-int lvm_snapshot_fill_COW_page(vg_t * vg, lv_t * lv_snap)
-{
-       uint pvn;
-       int id = 0, is = lv_snap->u.lv_remap_ptr;
-       ulong blksize_snap;
-       lv_COW_table_disk_t * lv_COW_table = (lv_COW_table_disk_t *)
-               page_address(lv_snap->lv_COW_table_iobuf->maplist[0]);
-
-       if (is == 0)
-               return 0;
-
-	is--;
-        blksize_snap =
-               block_size(lv_snap->u.lv_block_exception[is].rdev_new);
-        is -= is % (blksize_snap / sizeof(lv_COW_table_disk_t));
-
-	memset(lv_COW_table, 0, blksize_snap);
-	for ( ; is < lv_snap->u.lv_remap_ptr; is++, id++) {
-		/* store new COW_table entry */
-               lv_block_exception_t *be = lv_snap->u.lv_block_exception + is;
-               if(_pv_get_number(vg, be->rdev_org, &pvn))
-                       goto bad;
-
-               lv_COW_table[id].pv_org_number = cpu_to_le64(pvn);
-               lv_COW_table[id].pv_org_rsector = cpu_to_le64(be->rsector_org);
-               if(_pv_get_number(vg, be->rdev_new, &pvn))
-                       goto bad;
-
-               lv_COW_table[id].pv_snap_number = cpu_to_le64(pvn);
-               lv_COW_table[id].pv_snap_rsector =
-                       cpu_to_le64(be->rsector_new);
-	}
-
-       return 0;
-
- bad:
-       printk(KERN_ERR "%s -- lvm_snapshot_fill_COW_page failed", lvm_name);
-       return -1;
-}
-
-
-/*
- * writes a COW exception table sector to disk (HM)
- */
-
-int lvm_write_COW_table_block(vg_t * vg, lv_t *lv_snap)
-{
-	int r;
-	const char *err;
-	if((r = _write_COW_table_block(vg, lv_snap,
-				       lv_snap->u.lv_remap_ptr - 1, &err)))
-		lvm_drop_snapshot(vg, lv_snap, err);
-	return r;
-}
-
-/*
- * copy on write handler for one snapshot logical volume
- *
- * read the original blocks and store it/them on the new one(s).
- * if there is no exception storage space free any longer --> release snapshot.
- *
- * this routine gets called for each _first_ write to a physical chunk.
- */
-int lvm_snapshot_COW(kdev_t org_phys_dev,
-		     unsigned long org_phys_sector,
-		     unsigned long org_pe_start,
-		     unsigned long org_virt_sector,
-		     vg_t *vg, lv_t* lv_snap)
-{
-	const char * reason;
-	kdev_t snap_phys_dev;
-	struct block_device *org_bdev, *snap_bdev;
-	unsigned long org_start, snap_start, virt_start, pe_off;
-	int idx = lv_snap->u.lv_remap_ptr, chunk_size = lv_snap->u.lv_chunk_size;
-	struct kiobuf * iobuf;
-	int blksize_snap, blksize_org, min_blksize, max_blksize;
-	int max_sectors, nr_sectors;
-
-	/* check if we are out of snapshot space */
-	if (idx >= lv_snap->u.lv_remap_end)
-		goto fail_out_of_space;
-
-	/* calculate physical boundaries of source chunk */
-	pe_off = org_pe_start % chunk_size;
-	org_start = org_phys_sector - ((org_phys_sector-pe_off) % chunk_size);
-	virt_start = org_virt_sector - (org_phys_sector - org_start);
-
-	/* calculate physical boundaries of destination chunk */
-	snap_phys_dev = lv_snap->u.lv_block_exception[idx].rdev_new;
-	snap_start = lv_snap->u.lv_block_exception[idx].rsector_new;
-
-	org_bdev = bdget(kdev_t_to_nr(org_phys_dev));
-	if (!org_bdev)
-		goto fail_enomem;
-	snap_bdev = bdget(kdev_t_to_nr(snap_phys_dev));
-	if (!snap_bdev) {
-		bdput(org_bdev);
-		goto fail_enomem;
-	}
-
-#ifdef DEBUG_SNAPSHOT
-	printk(KERN_INFO
-	       "%s -- COW: "
-	       "org %s faulting %lu start %lu, snap %s start %lu, "
-	       "size %d, pe_start %lu pe_off %lu, virt_sec %lu\n",
-	       lvm_name,
-	       kdevname(org_phys_dev), org_phys_sector, org_start,
-	       kdevname(snap_phys_dev), snap_start,
-	       chunk_size,
-	       org_pe_start, pe_off,
-	       org_virt_sector);
-#endif
-
-	iobuf = lv_snap->lv_iobuf;
-
-	blksize_org = block_size(org_phys_dev);
-	blksize_snap = block_size(snap_phys_dev);
-	max_blksize = max(blksize_org, blksize_snap);
-	min_blksize = min(blksize_org, blksize_snap);
-	max_sectors = LVM_MAX_SECTORS * (min_blksize>>9);
-
-	if (chunk_size % (max_blksize>>9))
-		goto fail_blksize;
-
-	while (chunk_size)
-	{
-		nr_sectors = min(chunk_size, max_sectors);
-		chunk_size -= nr_sectors;
-
-		iobuf->length = nr_sectors << 9;
-
-		if(!lvm_snapshot_prepare_blocks(lv_snap->blocks, org_start,
-						nr_sectors, blksize_org))
-			goto fail_prepare;
-
-		if (brw_kiovec(READ, 1, &iobuf, org_bdev,
-			       lv_snap->blocks, blksize_org) != (nr_sectors<<9))
-			goto fail_raw_read;
-
-		if(!lvm_snapshot_prepare_blocks(lv_snap->blocks, snap_start,
-						nr_sectors, blksize_snap))
-			goto fail_prepare;
-
-		if (brw_kiovec(WRITE, 1, &iobuf, snap_bdev,
-			       lv_snap->blocks, blksize_snap) !=(nr_sectors<<9))
-			goto fail_raw_write;
-	}
-
-#ifdef DEBUG_SNAPSHOT
-	/* invalidate the logical snapshot buffer cache */
-	invalidate_snap_cache(virt_start, lv_snap->u.lv_chunk_size,
-			      lv_snap->u.lv_dev);
-#endif
-
-	/* the original chunk is now stored on the snapshot volume
-	   so update the execption table */
-	lv_snap->u.lv_block_exception[idx].rdev_org = org_phys_dev;
-	lv_snap->u.lv_block_exception[idx].rsector_org = org_start;
-
-	lvm_hash_link(lv_snap->u.lv_block_exception + idx,
-		      org_phys_dev, org_start, lv_snap);
-	lv_snap->u.lv_remap_ptr = idx + 1;
-	if (lv_snap->lv_snapshot_use_rate > 0) {
-		if (lv_snap->u.lv_remap_ptr * 100 / lv_snap->u.lv_remap_end >= lv_snap->lv_snapshot_use_rate)
-			wake_up_interruptible(&lv_snap->lv_snapshot_wait);
-	}
-	bdput(snap_bdev);
-	bdput(org_bdev);
-	return 0;
-
-	/* slow path */
- out:
-	bdput(snap_bdev);
-	bdput(org_bdev);
- out1:
-	lvm_drop_snapshot(vg, lv_snap, reason);
-	return 1;
-
- fail_out_of_space:
-	reason = "out of space";
-	goto out1;
- fail_raw_read:
-	reason = "read error";
-	goto out;
- fail_raw_write:
-	reason = "write error";
-	goto out;
- fail_blksize:
-	reason = "blocksize error";
- fail_enomem:
-	reason = "out of memory";
-	goto out1;
-
- fail_prepare:
-	reason = "couldn't prepare kiovec blocks "
-		"(start probably isn't block aligned)";
-	goto out;
-}
-
-int lvm_snapshot_alloc_iobuf_pages(struct kiobuf * iobuf, int sectors)
-{
-	int bytes, nr_pages, err, i;
-
-	bytes = sectors * SECTOR_SIZE;
-	nr_pages = (bytes + ~PAGE_MASK) >> PAGE_SHIFT;
-	err = expand_kiobuf(iobuf, nr_pages);
-	if (err) goto out;
-
-	err = -ENOMEM;
-	iobuf->locked = 1;
-	iobuf->nr_pages = 0;
-	for (i = 0; i < nr_pages; i++)
-	{
-		struct page * page;
-
-		page = alloc_page(GFP_KERNEL);
-		if (!page)
-			goto out;
-
-		iobuf->maplist[i] = page;
-		SetPageLocked(page);
-		iobuf->nr_pages++;
-	}
-	iobuf->offset = 0;
-
-	err = 0;
- out:
-	return err;
-}
-
-static int calc_max_buckets(void)
-{
-	unsigned long mem;
-
-	mem = num_physpages << PAGE_SHIFT;
-	mem /= 100;
-	mem *= 2;
-	mem /= sizeof(struct list_head);
-
-	return mem;
-}
-
-int lvm_snapshot_alloc_hash_table(lv_t * lv)
-{
-	int err;
-	unsigned long buckets, max_buckets, size;
-	struct list_head * hash;
-
-	buckets = lv->u.lv_remap_end;
-	max_buckets = calc_max_buckets();
-	buckets = min(buckets, max_buckets);
-	while (buckets & (buckets-1))
-		buckets &= (buckets-1);
-
-	size = buckets * sizeof(struct list_head);
-
-	err = -ENOMEM;
-	hash = vmalloc(size);
-	lv->lv_snapshot_hash_table = hash;
-
-	if (!hash)
-		goto out;
-	lv->lv_snapshot_hash_table_size = size;
-
-	lv->lv_snapshot_hash_mask = buckets-1;
-	while (buckets--)
-		INIT_LIST_HEAD(hash+buckets);
-	err = 0;
-out:
-	return err;
-}
-
-int lvm_snapshot_alloc(lv_t * lv_snap)
-{
-	int ret, max_sectors;
-
-	/* allocate kiovec to do chunk io */
-	ret = alloc_kiovec(1, &lv_snap->lv_iobuf);
-	if (ret) goto out;
-
-	max_sectors = LVM_MAX_SECTORS << (PAGE_SHIFT-9);
-
-	ret = lvm_snapshot_alloc_iobuf_pages(lv_snap->lv_iobuf, max_sectors);
-	if (ret) goto out_free_kiovec;
-
-	/* allocate kiovec to do exception table io */
-	ret = alloc_kiovec(1, &lv_snap->lv_COW_table_iobuf);
-	if (ret) goto out_free_kiovec;
-
-	ret = lvm_snapshot_alloc_iobuf_pages(lv_snap->lv_COW_table_iobuf,
-                                            PAGE_SIZE/SECTOR_SIZE);
-	if (ret) goto out_free_both_kiovecs;
-
-	ret = lvm_snapshot_alloc_hash_table(lv_snap);
-	if (ret) goto out_free_both_kiovecs;
-
-
-out:
-	return ret;
-
-out_free_both_kiovecs:
-	unmap_kiobuf(lv_snap->lv_COW_table_iobuf);
-	free_kiovec(1, &lv_snap->lv_COW_table_iobuf);
-	lv_snap->lv_COW_table_iobuf = NULL;
-
-out_free_kiovec:
-	unmap_kiobuf(lv_snap->lv_iobuf);
-	free_kiovec(1, &lv_snap->lv_iobuf);
-	lv_snap->lv_iobuf = NULL;
-	if (lv_snap->lv_snapshot_hash_table != NULL)
-		vfree(lv_snap->lv_snapshot_hash_table);
-	lv_snap->lv_snapshot_hash_table = NULL;
-	goto out;
-}
-
-void lvm_snapshot_release(lv_t * lv)
-{
-	if (lv->u.lv_block_exception)
-	{
-		vfree(lv->u.lv_block_exception);
-		lv->u.lv_block_exception = NULL;
-	}
-	if (lv->lv_snapshot_hash_table)
-	{
-		vfree(lv->lv_snapshot_hash_table);
-		lv->lv_snapshot_hash_table = NULL;
-		lv->lv_snapshot_hash_table_size = 0;
-	}
-	if (lv->lv_iobuf)
-	{
-	        kiobuf_wait_for_io(lv->lv_iobuf);
-		unmap_kiobuf(lv->lv_iobuf);
-		free_kiovec(1, &lv->lv_iobuf);
-		lv->lv_iobuf = NULL;
-	}
-	if (lv->lv_COW_table_iobuf)
-	{
-               kiobuf_wait_for_io(lv->lv_COW_table_iobuf);
-               unmap_kiobuf(lv->lv_COW_table_iobuf);
-               free_kiovec(1, &lv->lv_COW_table_iobuf);
-               lv->lv_COW_table_iobuf = NULL;
-	}
-}
-
-
-static int _write_COW_table_block(vg_t *vg, lv_t *lv_snap,
-				  int idx, const char **reason) {
-	int blksize_snap;
-	int end_of_table;
-	int idx_COW_table;
-	uint pvn;
-	ulong snap_pe_start, COW_table_sector_offset,
-		COW_entries_per_pe, COW_chunks_per_pe, COW_entries_per_block;
-	ulong blocks[1];
-	kdev_t snap_phys_dev;
-	struct block_device *bdev;
-	lv_block_exception_t *be;
-	struct kiobuf * COW_table_iobuf = lv_snap->lv_COW_table_iobuf;
-	lv_COW_table_disk_t * lv_COW_table =
-	   ( lv_COW_table_disk_t *) page_address(lv_snap->lv_COW_table_iobuf->maplist[0]);
-
-	COW_chunks_per_pe = LVM_GET_COW_TABLE_CHUNKS_PER_PE(vg, lv_snap);
-	COW_entries_per_pe = LVM_GET_COW_TABLE_ENTRIES_PER_PE(vg, lv_snap);
-
-	/* get physical addresse of destination chunk */
-	snap_phys_dev = lv_snap->u.lv_block_exception[idx].rdev_new;
-	snap_pe_start = lv_snap->u.lv_block_exception[idx - (idx % COW_entries_per_pe)].rsector_new - lv_snap->u.lv_chunk_size;
-
-	bdev = bdget(kdev_t_to_nr(snap_phys_dev));
-
-	blksize_snap = block_size(snap_phys_dev);
-
-        COW_entries_per_block = blksize_snap / sizeof(lv_COW_table_disk_t);
-        idx_COW_table = idx % COW_entries_per_pe % COW_entries_per_block;
-
-	if ( idx_COW_table == 0) memset(lv_COW_table, 0, blksize_snap);
-
-       /* sector offset into the on disk COW table */
-	COW_table_sector_offset = (idx % COW_entries_per_pe) / (SECTOR_SIZE / sizeof(lv_COW_table_disk_t));
-
-        /* COW table block to write next */
-	blocks[0] = (snap_pe_start + COW_table_sector_offset) >> (blksize_snap >> 10);
-
-	/* store new COW_table entry */
-       be = lv_snap->u.lv_block_exception + idx;
-       if(_pv_get_number(vg, be->rdev_org, &pvn))
-               goto fail_pv_get_number;
-
-       lv_COW_table[idx_COW_table].pv_org_number = cpu_to_le64(pvn);
-       lv_COW_table[idx_COW_table].pv_org_rsector =
-               cpu_to_le64(be->rsector_org);
-       if(_pv_get_number(vg, snap_phys_dev, &pvn))
-               goto fail_pv_get_number;
-
-       lv_COW_table[idx_COW_table].pv_snap_number = cpu_to_le64(pvn);
-       lv_COW_table[idx_COW_table].pv_snap_rsector =
-               cpu_to_le64(be->rsector_new);
-
-	COW_table_iobuf->length = blksize_snap;
-
-	if (brw_kiovec(WRITE, 1, &COW_table_iobuf, bdev,
-		       blocks, blksize_snap) != blksize_snap)
-		goto fail_raw_write;
-
-       /* initialization of next COW exception table block with zeroes */
-	end_of_table = idx % COW_entries_per_pe == COW_entries_per_pe - 1;
-	if (idx_COW_table % COW_entries_per_block == COW_entries_per_block - 1 || end_of_table)
-	{
-		/* don't go beyond the end */
-               if (idx + 1 >= lv_snap->u.lv_remap_end) goto out;
-
-		memset(lv_COW_table, 0, blksize_snap);
-
-		if (end_of_table)
-		{
-			idx++;
-			snap_phys_dev = lv_snap->u.lv_block_exception[idx].rdev_new;
-			snap_pe_start = lv_snap->u.lv_block_exception[idx - (idx % COW_entries_per_pe)].rsector_new - lv_snap->u.lv_chunk_size;
-			bdput(bdev);
-			bdev = bdget(kdev_t_to_nr(snap_phys_dev));
-			blksize_snap = block_size(snap_phys_dev);
-			blocks[0] = snap_pe_start >> (blksize_snap >> 10);
-		} else blocks[0]++;
-
-               if (brw_kiovec(WRITE, 1, &COW_table_iobuf, bdev,
-                                 blocks, blksize_snap) !=
-                    blksize_snap)
-			goto fail_raw_write;
-	}
-
- out:
-	bdput(bdev);
-	return 0;
-
- fail_raw_write:
-	*reason = "write error";
-	bdput(bdev);
-	return 1;
-
- fail_pv_get_number:
-	*reason = "_pv_get_number failed";
-	bdput(bdev);
-	return 1;
-}
-
-/*
- * FIXME_1.2
- * This function is a bit of a hack; we need to ensure that the
- * snapshot is never made active again, because it will surely be
- * corrupt.  At the moment we do not have access to the LVM metadata
- * from within the kernel.  So we set the first exception to point to
- * sector 1 (which will always be within the metadata, and as such
- * invalid).  User land tools will check for this when they are asked
- * to activate the snapshot and prevent this from happening.
- */
-
-static void _disable_snapshot(vg_t *vg, lv_t *lv) {
-	const char *err;
-	lv->u.lv_block_exception[0].rsector_org = LVM_SNAPSHOT_DROPPED_SECTOR;
-	if(_write_COW_table_block(vg, lv, 0, &err) < 0) {
-		printk(KERN_ERR "%s -- couldn't disable snapshot: %s\n",
-		       lvm_name, err);
-	}
-}
-
-MODULE_LICENSE("GPL");
diff -Nru a/drivers/md/lvm.c b/drivers/md/lvm.c
--- a/drivers/md/lvm.c	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,2740 +0,0 @@
-#error Broken until maintainers will sanitize kdev_t handling
-/*
- * kernel/lvm.c
- *
- * Copyright (C) 1997 - 2000  Heinz Mauelshagen, Sistina Software
- *
- * February-November 1997
- * April-May,July-August,November 1998
- * January-March,May,July,September,October 1999
- * January,February,July,September-November 2000
- * January 2001
- *
- *
- * LVM driver 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.
- *
- * LVM driver 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 GNU CC; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-/*
- * Changelog
- *
- *    09/11/1997 - added chr ioctls VG_STATUS_GET_COUNT
- *                 and VG_STATUS_GET_NAMELIST
- *    18/01/1998 - change lvm_chr_open/close lock handling
- *    30/04/1998 - changed LV_STATUS ioctl to LV_STATUS_BYNAME and
- *               - added   LV_STATUS_BYINDEX ioctl
- *               - used lvm_status_byname_req_t and
- *                      lvm_status_byindex_req_t vars
- *    04/05/1998 - added multiple device support
- *    08/05/1998 - added support to set/clear extendable flag in volume group
- *    09/05/1998 - changed output of lvm_proc_get_global_info() because of
- *                 support for free (eg. longer) logical volume names
- *    12/05/1998 - added spin_locks (thanks to Pascal van Dam
- *                 <pascal@ramoth.xs4all.nl>)
- *    25/05/1998 - fixed handling of locked PEs in lvm_map() and lvm_chr_ioctl()
- *    26/05/1998 - reactivated verify_area by access_ok
- *    07/06/1998 - used vmalloc/vfree instead of kmalloc/kfree to go
- *                 beyond 128/256 KB max allocation limit per call
- *               - #ifdef blocked spin_lock calls to avoid compile errors
- *                 with 2.0.x
- *    11/06/1998 - another enhancement to spinlock code in lvm_chr_open()
- *                 and use of LVM_VERSION_CODE instead of my own macros
- *                 (thanks to  Michael Marxmeier <mike@msede.com>)
- *    07/07/1998 - added statistics in lvm_map()
- *    08/07/1998 - saved statistics in lvm_do_lv_extend_reduce()
- *    25/07/1998 - used __initfunc macro
- *    02/08/1998 - changes for official char/block major numbers
- *    07/08/1998 - avoided init_module() and cleanup_module() to be static
- *    30/08/1998 - changed VG lv_open counter from sum of LV lv_open counters
- *                 to sum of LVs open (no matter how often each is)
- *    01/09/1998 - fixed lvm_gendisk.part[] index error
- *    07/09/1998 - added copying of lv_current_pe-array
- *                 in LV_STATUS_BYINDEX ioctl
- *    17/11/1998 - added KERN_* levels to printk
- *    13/01/1999 - fixed LV index bug in lvm_do_lv_create() which hit lvrename
- *    07/02/1999 - fixed spinlock handling bug in case of LVM_RESET
- *                 by moving spinlock code from lvm_chr_open()
- *                 to lvm_chr_ioctl()
- *               - added LVM_LOCK_LVM ioctl to lvm_chr_ioctl()
- *               - allowed LVM_RESET and retrieval commands to go ahead;
- *                 only other update ioctls are blocked now
- *               - fixed pv->pe to NULL for pv_status
- *               - using lv_req structure in lvm_chr_ioctl() now
- *               - fixed NULL ptr reference bug in lvm_do_lv_extend_reduce()
- *                 caused by uncontiguous PV array in lvm_chr_ioctl(VG_REDUCE)
- *    09/02/1999 - changed BLKRASET and BLKRAGET in lvm_chr_ioctl() to
- *                 handle lgoical volume private read ahead sector
- *               - implemented LV read_ahead handling with lvm_blk_read()
- *                 and lvm_blk_write()
- *    10/02/1999 - implemented 2.[12].* support function lvm_hd_name()
- *                 to be used in drivers/block/genhd.c by disk_name()
- *    12/02/1999 - fixed index bug in lvm_blk_ioctl(), HDIO_GETGEO
- *               - enhanced gendisk insert/remove handling
- *    16/02/1999 - changed to dynamic block minor number allocation to
- *                 have as much as 99 volume groups with 256 logical volumes
- *                 as the grand total; this allows having 1 volume group with
- *                 up to 256 logical volumes in it
- *    21/02/1999 - added LV open count information to proc filesystem
- *               - substituted redundant LVM_RESET code by calls
- *                 to lvm_do_vg_remove()
- *    22/02/1999 - used schedule_timeout() to be more responsive
- *                 in case of lvm_do_vg_remove() with lots of logical volumes
- *    19/03/1999 - fixed NULL pointer bug in module_init/lvm_init
- *    17/05/1999 - used DECLARE_WAIT_QUEUE_HEAD macro (>2.3.0)
- *               - enhanced lvm_hd_name support
- *    03/07/1999 - avoided use of KERNEL_VERSION macro based ifdefs and
- *                 memcpy_tofs/memcpy_fromfs macro redefinitions
- *    06/07/1999 - corrected reads/writes statistic counter copy in case
- *                 of striped logical volume
- *    28/07/1999 - implemented snapshot logical volumes
- *                 - lvm_chr_ioctl
- *                   - LV_STATUS_BYINDEX
- *                   - LV_STATUS_BYNAME
- *                 - lvm_do_lv_create
- *                 - lvm_do_lv_remove
- *                 - lvm_map
- *                 - new lvm_snapshot_remap_block
- *                 - new lvm_snapshot_remap_new_block
- *    08/10/1999 - implemented support for multiple snapshots per
- *                 original logical volume
- *    12/10/1999 - support for 2.3.19
- *    11/11/1999 - support for 2.3.28
- *    21/11/1999 - changed lvm_map() interface to buffer_head based
- *    19/12/1999 - support for 2.3.33
- *    01/01/2000 - changed locking concept in lvm_map(),
- *                 lvm_do_vg_create() and lvm_do_lv_remove()
- *    15/01/2000 - fixed PV_FLUSH bug in lvm_chr_ioctl()
- *    24/01/2000 - ported to 2.3.40 including Alan Cox's pointer changes etc.
- *    29/01/2000 - used kmalloc/kfree again for all small structures
- *    20/01/2000 - cleaned up lvm_chr_ioctl by moving code
- *                 to seperated functions
- *               - avoided "/dev/" in proc filesystem output
- *               - avoided inline strings functions lvm_strlen etc.
- *    14/02/2000 - support for 2.3.43
- *               - integrated Andrea Arcagneli's snapshot code
- *    25/06/2000 - james (chip) , IKKHAYD! roffl
- *    26/06/2000 - enhanced lv_extend_reduce for snapshot logical volume support
- *    06/09/2000 - added devfs support
- *    07/09/2000 - changed IOP version to 9
- *               - started to add new char ioctl LV_STATUS_BYDEV_T to support
- *                 getting an lv_t based on the dev_t of the Logical Volume
- *    14/09/2000 - enhanced lvm_do_lv_create to upcall VFS functions
- *                 to sync and lock, activate snapshot and unlock the FS
- *                 (to support journaled filesystems)
- *    18/09/2000 - hardsector size support
- *    27/09/2000 - implemented lvm_do_lv_rename() and lvm_do_vg_rename()
- *    30/10/2000 - added Andi Kleen's LV_BMAP ioctl to support LILO
- *    01/11/2000 - added memory information on hash tables to
- *                 lvm_proc_get_global_info()
- *    02/11/2000 - implemented /proc/lvm/ hierarchy
- *    22/11/2000 - changed lvm_do_create_proc_entry_of_pv () to work
- *                 with devfs
- *    26/11/2000 - corrected #ifdef locations for PROC_FS
- *    28/11/2000 - fixed lvm_do_vg_extend() NULL pointer BUG
- *               - fixed lvm_do_create_proc_entry_of_pv() buffer tampering BUG
- *    08/01/2001 - Removed conditional compiles related to PROC_FS,
- *                 procfs is always supported now. (JT)
- *    12/01/2001 - avoided flushing logical volume in case of shrinking
- *                 because of unnecessary overhead in case of heavy updates
- *    25/01/2001 - Allow RO open of an inactive LV so it can be reactivated.
- *    31/01/2001 - If you try and BMAP a snapshot you now get an -EPERM
- *    01/02/2001 - factored __remap_snapshot out of lvm_map
- *    12/02/2001 - move devfs code to create VG before LVs
- *    14/02/2001 - tidied device defines for blk.h
- *               - tidied debug statements
- *               - more lvm_map tidying
- *    14/02/2001 - bug: vg[] member not set back to NULL if activation fails
- *    28/02/2001 - introduced the P_DEV macro and changed some internel
- *                 functions to be static [AD]
- *    28/02/2001 - factored lvm_get_snapshot_use_rate out of blk_ioctl [AD]
- *               - fixed user address accessing bug in lvm_do_lv_create()
- *                 where the check for an existing LV takes place right at
- *                 the beginning
- *    01/03/2001 - Add VG_CREATE_OLD for IOP 10 compatibility
- *    02/03/2001 - Don't destroy usermode pointers in lv_t structures duing LV_
- *                 STATUS_BYxxx and remove redundant lv_t variables from same.
- *    05/03/2001 - restore copying pe_t array in lvm_do_lv_status_byname. For
- *                 lvdisplay -v (PC)
- *               - restore copying pe_t array in lvm_do_lv_status_byindex (HM)
- *               - added copying pe_t array in lvm_do_lv_status_bydev (HM)
- *               - enhanced lvm_do_lv_status_by{name,index,dev} to be capable
- *                 to copy the lv_block_exception_t array to userspace (HM)
- *    08/03/2001 - factored lvm_do_pv_flush out of lvm_chr_ioctl [HM]
- *    09/03/2001 - Added _lock_open_count to ensure we only drop the lock
- *                 when the locking process closes.
- *    05/04/2001 - lvm_map bugs: don't use b_blocknr/b_dev in lvm_map, it
- *		   destroys stacking devices. call b_end_io on failed maps.
- *		   (Jens Axboe)
- *               - Defer writes to an extent that is being moved [JT + AD]
- *    28/05/2001 - implemented missing BLKSSZGET ioctl [AD]
- *    28/12/2001 - buffer_head -> bio
- *                 removed huge allocation of a lv_t on stack
- *                 (Anders Gustafsson)
- *    07/01/2002 - fixed sizeof(lv_t) differences in user/kernel-space
- *                 removed another huge allocation of a lv_t on stack
- *                 (Anders Gustafsson)
- *
- */
-
-
-#define MAJOR_NR LVM_BLK_MAJOR
-#define DEVICE_OFF(device)
-#define LOCAL_END_REQUEST
-
-/* lvm_do_lv_create calls fsync_dev_lockfs()/unlockfs() */
-/* #define	LVM_VFS_ENHANCEMENT */
-
-#include <linux/config.h>
-
-#include <linux/module.h>
-
-#include <linux/kernel.h>
-#include <linux/vmalloc.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-
-#include <linux/hdreg.h>
-#include <linux/stat.h>
-#include <linux/fs.h>
-#include <linux/bio.h>
-#include <linux/proc_fs.h>
-#include <linux/blkdev.h>
-#include <linux/genhd.h>
-#include <linux/smp_lock.h>
-#include <asm/ioctl.h>
-#include <asm/uaccess.h>
-
-#ifdef CONFIG_KERNELD
-#include <linux/kerneld.h>
-#endif
-
-#include <linux/blk.h>
-#include <linux/blkpg.h>
-
-#include <linux/errno.h>
-#include <linux/lvm.h>
-
-#include "lvm-internal.h"
-
-#ifndef WRITEA
-#  define WRITEA WRITE
-#endif
-
-
-/*
- * External function prototypes
- */
-static int lvm_make_request_fn(request_queue_t*, struct bio *);
-
-static int lvm_blk_ioctl(struct inode *, struct file *, uint, ulong);
-static int lvm_blk_open(struct inode *, struct file *);
-
-static int lvm_blk_close(struct inode *, struct file *);
-static int lvm_get_snapshot_use_rate(lv_t *lv_ptr, void *arg);
-static int lvm_user_bmap(struct inode *, struct lv_bmap *);
-
-static int lvm_chr_open(struct inode *, struct file *);
-static int lvm_chr_close(struct inode *, struct file *);
-static int lvm_chr_ioctl(struct inode *, struct file *, uint, ulong);
-
-
-/* End external function prototypes */
-
-
-/*
- * Internal function prototypes
- */
-static void lvm_cleanup(void);
-static void lvm_init_vars(void);
-
-#ifdef LVM_HD_NAME
-extern void (*lvm_hd_name_ptr) (char *, int);
-#endif
-static int lvm_map(struct bio *);
-static int lvm_do_lock_lvm(void);
-static int lvm_do_le_remap(vg_t *, void *);
-
-static int lvm_do_pv_create(pv_t *, vg_t *, ulong);
-static int lvm_do_pv_remove(vg_t *, ulong);
-static int lvm_do_lv_create(int, char *, userlv_t *);
-static int lvm_do_lv_extend_reduce(int, char *, userlv_t *);
-static int lvm_do_lv_remove(int, char *, int);
-static int lvm_do_lv_rename(vg_t *, lv_req_t *, userlv_t *);
-static int lvm_do_lv_status_byname(vg_t *r, void *);
-static int lvm_do_lv_status_byindex(vg_t *, void *);
-static int lvm_do_lv_status_bydev(vg_t *, void *);
-
-static int lvm_do_pe_lock_unlock(vg_t *r, void *);
-
-static int lvm_do_pv_change(vg_t*, void*);
-static int lvm_do_pv_status(vg_t *, void *);
-static int lvm_do_pv_flush(void *);
-
-static int lvm_do_vg_create(void *, int minor);
-static int lvm_do_vg_extend(vg_t *, void *);
-static int lvm_do_vg_reduce(vg_t *, void *);
-static int lvm_do_vg_rename(vg_t *, void *);
-static int lvm_do_vg_remove(int);
-static void lvm_geninit(struct gendisk *);
-static void __update_hardsectsize(lv_t *lv);
-
-
-static void _queue_io(struct bio *bh, int rw);
-static struct bio *_dequeue_io(void);
-static void _flush_io(struct bio *bh);
-
-static int _open_pv(pv_t *pv);
-static void _close_pv(pv_t *pv);
-
-static unsigned long _sectors_to_k(unsigned long sect);
-
-#ifdef LVM_HD_NAME
-void lvm_hd_name(char *, int);
-#endif
-/* END Internal function prototypes */
-
-
-/* variables */
-char *lvm_version = "LVM version "LVM_RELEASE_NAME"("LVM_RELEASE_DATE")";
-ushort lvm_iop_version = LVM_DRIVER_IOP_VERSION;
-int loadtime = 0;
-const char *const lvm_name = LVM_NAME;
-
-
-/* volume group descriptor area pointers */
-vg_t *vg[ABS_MAX_VG];
-
-/* map from block minor number to VG and LV numbers */
-typedef struct {
-	int vg_number;
-	int lv_number;
-} vg_lv_map_t;
-static vg_lv_map_t vg_lv_map[ABS_MAX_LV];
-
-
-/* Request structures (lvm_chr_ioctl()) */
-static pv_change_req_t pv_change_req;
-static pv_status_req_t pv_status_req;
-volatile static pe_lock_req_t pe_lock_req;
-static le_remap_req_t le_remap_req;
-static lv_req_t lv_req;
-
-#ifdef LVM_TOTAL_RESET
-static int lvm_reset_spindown = 0;
-#endif
-
-static char pv_name[NAME_LEN];
-/* static char rootvg[NAME_LEN] = { 0, }; */
-static int lock = 0;
-static int _lock_open_count = 0;
-static uint vg_count = 0;
-static long lvm_chr_open_count = 0;
-static DECLARE_WAIT_QUEUE_HEAD(lvm_wait);
-
-static spinlock_t lvm_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t lvm_snapshot_lock = SPIN_LOCK_UNLOCKED;
-
-static struct bio *_pe_requests;
-static DECLARE_RWSEM(_pe_lock);
-
-
-struct file_operations lvm_chr_fops = {
-	open:		lvm_chr_open,
-	release:	lvm_chr_close,
-	ioctl:		lvm_chr_ioctl,
-};
-
-/* block device operations structure needed for 2.3.38? and above */
-struct block_device_operations lvm_blk_dops =
-{
-	owner:		THIS_MODULE,
-	open: 		lvm_blk_open,
-	release:	lvm_blk_close,
-	ioctl:		lvm_blk_ioctl,
-};
-
-
-/* gendisk structures */
-static struct hd_struct lvm_hd_struct[MAX_LV];
-static int lvm_blocksizes[MAX_LV];
-static int lvm_size[MAX_LV];
-
-static struct gendisk lvm_gendisk =
-{
-	major:		MAJOR_NR,
-	major_name:	LVM_NAME,
-	minor_shift:	0,
-	part:		lvm_hd_struct,
-	sizes:		lvm_size,
-	nr_real:	MAX_LV,
-};
-
-/*
- * Driver initialization...
- */
-int lvm_init(void)
-{
-	if (register_chrdev(LVM_CHAR_MAJOR,
-				  lvm_name, &lvm_chr_fops) < 0) {
-		printk(KERN_ERR "%s -- register_chrdev failed\n",
-		       lvm_name);
-		return -EIO;
-	}
-
-	if (register_blkdev(MAJOR_NR, lvm_name, &lvm_blk_dops) < 0) {
-		printk("%s -- register_blkdev failed\n", lvm_name);
-		if (unregister_chrdev(LVM_CHAR_MAJOR, lvm_name) < 0)
-			printk(KERN_ERR
-			       "%s -- unregister_chrdev failed\n",
-			       lvm_name);
-		return -EIO;
-	}
-
-	lvm_init_fs();
-	lvm_init_vars();
-	lvm_geninit(&lvm_gendisk);
-
-	add_gendisk(&lvm_gendisk);
-
-#ifdef LVM_HD_NAME
-	/* reference from drivers/block/genhd.c */
-	lvm_hd_name_ptr = lvm_hd_name;
-#endif
-
-	blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), lvm_make_request_fn);
-
-
-	/* initialise the pe lock */
-	pe_lock_req.lock = UNLOCK_PE;
-
-	/* optional read root VGDA */
-/*
-   if ( *rootvg != 0) vg_read_with_pv_and_lv ( rootvg, &vg);
-*/
-
-#ifdef MODULE
-	printk(KERN_INFO "%s module loaded\n", lvm_version);
-#else
-	printk(KERN_INFO "%s\n", lvm_version);
-#endif
-
-	return 0;
-} /* lvm_init() */
-
-
-/*
- * cleanup...
- */
-static void lvm_cleanup(void)
-{
-	if (unregister_chrdev(LVM_CHAR_MAJOR, lvm_name) < 0)
-		printk(KERN_ERR "%s -- unregister_chrdev failed\n",
-		       lvm_name);
-	if (unregister_blkdev(MAJOR_NR, lvm_name) < 0)
-		printk(KERN_ERR "%s -- unregister_blkdev failed\n",
-		       lvm_name);
-
-	del_gendisk(&lvm_gendisk);
-
-	blk_clear(MAJOR_NR);
-
-#ifdef LVM_HD_NAME
-	/* reference from linux/drivers/block/genhd.c */
-	lvm_hd_name_ptr = NULL;
-#endif
-
-	/* unregister with procfs and devfs */
-	lvm_fin_fs();
-
-#ifdef MODULE
-	printk(KERN_INFO "%s -- Module successfully deactivated\n", lvm_name);
-#endif
-
-	return;
-}	/* lvm_cleanup() */
-
-/*
- * support function to initialize lvm variables
- */
-static void __init lvm_init_vars(void)
-{
-	int v;
-
-	loadtime = CURRENT_TIME;
-
-	lvm_lock = lvm_snapshot_lock = SPIN_LOCK_UNLOCKED;
-
-	pe_lock_req.lock = UNLOCK_PE;
-	pe_lock_req.data.lv_dev = NODEV;
-	pe_lock_req.data.pv_dev = NODEV;
-	pe_lock_req.data.pv_offset = 0;
-
-	/* Initialize VG pointers */
-	for (v = 0; v < ABS_MAX_VG; v++) vg[v] = NULL;
-
-	/* Initialize LV -> VG association */
-	for (v = 0; v < ABS_MAX_LV; v++) {
-		/* index ABS_MAX_VG never used for real VG */
-		vg_lv_map[v].vg_number = ABS_MAX_VG;
-		vg_lv_map[v].lv_number = -1;
-	}
-
-	return;
-} /* lvm_init_vars() */
-
-
-/********************************************************************
- *
- * Character device functions
- *
- ********************************************************************/
-
-#define MODE_TO_STR(mode) (mode) & FMODE_READ ? "READ" : "", \
-			  (mode) & FMODE_WRITE ? "WRITE" : ""
-
-/*
- * character device open routine
- */
-static int lvm_chr_open(struct inode *inode, struct file *file)
-{
-	unsigned int minor = minor(inode->i_rdev);
-
-	P_DEV("chr_open MINOR: %d  VG#: %d  mode: %s%s  lock: %d\n",
-	      minor, VG_CHR(minor), MODE_TO_STR(file->f_mode), lock);
-
-	/* super user validation */
-	if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-
-	/* Group special file open */
-	if (VG_CHR(minor) > MAX_VG) return -ENXIO;
-
-       spin_lock(&lvm_lock);
-       if(lock == current->pid)
-               _lock_open_count++;
-       spin_unlock(&lvm_lock);
-
-	lvm_chr_open_count++;
-
-	MOD_INC_USE_COUNT;
-
-	return 0;
-} /* lvm_chr_open() */
-
-
-/*
- * character device i/o-control routine
- *
- * Only one changing process can do changing ioctl at one time,
- * others will block.
- *
- */
-static int lvm_chr_ioctl(struct inode *inode, struct file *file,
-		  uint command, ulong a)
-{
-	int minor = minor(inode->i_rdev);
-	uint extendable, l, v;
-	void *arg = (void *) a;
-	userlv_t ulv;
-	vg_t* vg_ptr = vg[VG_CHR(minor)];
-
-	/* otherwise cc will complain about unused variables */
-	(void) lvm_lock;
-
-	P_IOCTL("chr MINOR: %d  command: 0x%X  arg: %p  VG#: %d  mode: %s%s\n",
-		minor, command, arg, VG_CHR(minor), MODE_TO_STR(file->f_mode));
-
-#ifdef LVM_TOTAL_RESET
-	if (lvm_reset_spindown > 0) return -EACCES;
-#endif
-
-	/* Main command switch */
-	switch (command) {
-	case LVM_LOCK_LVM:
-		/* lock the LVM */
-		return lvm_do_lock_lvm();
-
-	case LVM_GET_IOP_VERSION:
-		/* check lvm version to ensure driver/tools+lib
-		   interoperability */
-		if (copy_to_user(arg, &lvm_iop_version, sizeof(ushort)) != 0)
-			return -EFAULT;
-		return 0;
-
-#ifdef LVM_TOTAL_RESET
-	case LVM_RESET:
-		/* lock reset function */
-		lvm_reset_spindown = 1;
-		for (v = 0; v < ABS_MAX_VG; v++) {
-			if (vg[v] != NULL) lvm_do_vg_remove(v);
-		}
-
-#ifdef MODULE
-		while (GET_USE_COUNT(&__this_module) < 1)
-			MOD_INC_USE_COUNT;
-		while (GET_USE_COUNT(&__this_module) > 1)
-			MOD_DEC_USE_COUNT;
-#endif /* MODULE */
-		lock = 0;	/* release lock */
-		wake_up_interruptible(&lvm_wait);
-		return 0;
-#endif /* LVM_TOTAL_RESET */
-
-
-	case LE_REMAP:
-		/* remap a logical extent (after moving the physical extent) */
-		return lvm_do_le_remap(vg_ptr,arg);
-
-	case PE_LOCK_UNLOCK:
-		/* lock/unlock i/o to a physical extent to move it to another
-		   physical volume (move's done in user space's pvmove) */
-		return lvm_do_pe_lock_unlock(vg_ptr,arg);
-
-	case VG_CREATE_OLD:
-		/* create a VGDA */
-		return lvm_do_vg_create(arg, minor);
-
-       case VG_CREATE:
-               /* create a VGDA, assume VG number is filled in */
-		return lvm_do_vg_create(arg, -1);
-
-	case VG_EXTEND:
-		/* extend a volume group */
-		return lvm_do_vg_extend(vg_ptr, arg);
-
-	case VG_REDUCE:
-		/* reduce a volume group */
-		return lvm_do_vg_reduce(vg_ptr, arg);
-
-	case VG_RENAME:
-		/* rename a volume group */
-		return lvm_do_vg_rename(vg_ptr, arg);
-
-	case VG_REMOVE:
-		/* remove an inactive VGDA */
-		return lvm_do_vg_remove(minor);
-
-
-	case VG_SET_EXTENDABLE:
-		/* set/clear extendability flag of volume group */
-		if (vg_ptr == NULL) return -ENXIO;
-		if (copy_from_user(&extendable, arg, sizeof(extendable)) != 0)
-			return -EFAULT;
-
-		if (extendable == VG_EXTENDABLE ||
-		    extendable == ~VG_EXTENDABLE) {
-			if (extendable == VG_EXTENDABLE)
-				vg_ptr->vg_status |= VG_EXTENDABLE;
-			else
-				vg_ptr->vg_status &= ~VG_EXTENDABLE;
-		} else return -EINVAL;
-		return 0;
-
-
-	case VG_STATUS:
-		/* get volume group data (only the vg_t struct) */
-		if (vg_ptr == NULL) return -ENXIO;
-		if (copy_to_user(arg, vg_ptr, sizeof(vg_t)) != 0)
-			return -EFAULT;
-		return 0;
-
-
-	case VG_STATUS_GET_COUNT:
-		/* get volume group count */
-		if (copy_to_user(arg, &vg_count, sizeof(vg_count)) != 0)
-			return -EFAULT;
-		return 0;
-
-
-	case VG_STATUS_GET_NAMELIST:
-		/* get volume group names */
-		for (l = v = 0; v < ABS_MAX_VG; v++) {
-			if (vg[v] != NULL) {
-				if (copy_to_user(arg + l * NAME_LEN,
-						 vg[v]->vg_name,
-						 NAME_LEN) != 0)
-					return -EFAULT;
-				l++;
-			}
-		}
-		return 0;
-
-
-	case LV_CREATE:
-	case LV_EXTEND:
-	case LV_REDUCE:
-	case LV_REMOVE:
-	case LV_RENAME:
-		/* create, extend, reduce, remove or rename a logical volume */
-		if (vg_ptr == NULL) return -ENXIO;
-		if (copy_from_user(&lv_req, arg, sizeof(lv_req)) != 0)
-			return -EFAULT;
-
-		if (command != LV_REMOVE) {
-			if (copy_from_user(&ulv, lv_req.lv, sizeof(userlv_t)) != 0)
-				return -EFAULT;
-		}
-		switch (command) {
-		case LV_CREATE:
-			return lvm_do_lv_create(minor, lv_req.lv_name, &ulv);
-
-		case LV_EXTEND:
-		case LV_REDUCE:
-			return lvm_do_lv_extend_reduce(minor, lv_req.lv_name, &ulv);
-		case LV_REMOVE:
-			return lvm_do_lv_remove(minor, lv_req.lv_name, -1);
-
-		case LV_RENAME:
-			return lvm_do_lv_rename(vg_ptr, &lv_req, &ulv);
-		}
-
-
-
-
-	case LV_STATUS_BYNAME:
-		/* get status of a logical volume by name */
-		return lvm_do_lv_status_byname(vg_ptr, arg);
-
-
-	case LV_STATUS_BYINDEX:
-		/* get status of a logical volume by index */
-		return lvm_do_lv_status_byindex(vg_ptr, arg);
-
-
-	case LV_STATUS_BYDEV:
-		/* get status of a logical volume by device */
-		return lvm_do_lv_status_bydev(vg_ptr, arg);
-
-
-	case PV_CHANGE:
-		/* change a physical volume */
-		return lvm_do_pv_change(vg_ptr,arg);
-
-
-	case PV_STATUS:
-		/* get physical volume data (pv_t structure only) */
-		return lvm_do_pv_status(vg_ptr,arg);
-
-
-	case PV_FLUSH:
-		/* physical volume buffer flush/invalidate */
-               return lvm_do_pv_flush(arg);
-
-
-	default:
-		printk(KERN_WARNING
-		       "%s -- lvm_chr_ioctl: unknown command 0x%x\n",
-		       lvm_name, command);
-		return -EINVAL;
-	}
-
-	return 0;
-} /* lvm_chr_ioctl */
-
-
-/*
- * character device close routine
- */
-static int lvm_chr_close(struct inode *inode, struct file *file)
-{
-	P_DEV("chr_close MINOR: %d  VG#: %d\n",
-	      minor(inode->i_rdev), VG_CHR(minor(inode->i_rdev)));
-
-#ifdef LVM_TOTAL_RESET
-	if (lvm_reset_spindown > 0) {
-		lvm_reset_spindown = 0;
-		lvm_chr_open_count = 0;
-	}
-#endif
-
-	if (lvm_chr_open_count > 0) lvm_chr_open_count--;
-
-       spin_lock(&lvm_lock);
-       if(lock == current->pid) {
-               if(!_lock_open_count) {
-			P_DEV("chr_close: unlocking LVM for pid %d\n", lock);
-                       lock = 0;
-                       wake_up_interruptible(&lvm_wait);
-               } else
-                       _lock_open_count--;
-	}
-       spin_unlock(&lvm_lock);
-
-	MOD_DEC_USE_COUNT;
-
-	return 0;
-} /* lvm_chr_close() */
-
-
-
-/********************************************************************
- *
- * Block device functions
- *
- ********************************************************************/
-
-/*
- * block device open routine
- */
-static int lvm_blk_open(struct inode *inode, struct file *file)
-{
-	int minor = minor(inode->i_rdev);
-	lv_t *lv_ptr;
-	vg_t *vg_ptr = vg[VG_BLK(minor)];
-
-	P_DEV("blk_open MINOR: %d  VG#: %d  LV#: %d  mode: %s%s\n",
-	      minor, VG_BLK(minor), LV_BLK(minor), MODE_TO_STR(file->f_mode));
-
-#ifdef LVM_TOTAL_RESET
-	if (lvm_reset_spindown > 0)
-		return -EPERM;
-#endif
-
-	if (vg_ptr != NULL &&
-	    (vg_ptr->vg_status & VG_ACTIVE) &&
-	    (lv_ptr = vg_ptr->lv[LV_BLK(minor)]) != NULL &&
-	    LV_BLK(minor) >= 0 &&
-	    LV_BLK(minor) < vg_ptr->lv_max) {
-
-		/* Check parallel LV spindown (LV remove) */
-		if (lv_ptr->u.lv_status & LV_SPINDOWN) return -EPERM;
-
-		/* Check inactive LV and open for read/write */
-		/* We need to be able to "read" an inactive LV
-		   to re-activate it again */
-		if ((file->f_mode & FMODE_WRITE) &&
-		    (!(lv_ptr->u.lv_status & LV_ACTIVE)))
-		    return -EPERM;
-
-		if (!(lv_ptr->u.lv_access & LV_WRITE) &&
-		    (file->f_mode & FMODE_WRITE))
-			return -EACCES;
-
-
-                /* be sure to increment VG counter */
-		if (lv_ptr->u.lv_open == 0) vg_ptr->lv_open++;
-		lv_ptr->u.lv_open++;
-
-		MOD_INC_USE_COUNT;
-
-		P_DEV("blk_open OK, LV size %d\n", lv_ptr->u.lv_size);
-
-		return 0;
-	}
-	return -ENXIO;
-} /* lvm_blk_open() */
-
-
-/*
- * block device i/o-control routine
- */
-static int lvm_blk_ioctl(struct inode *inode, struct file *file,
-			 uint command, ulong a)
-{
-	int minor = minor(inode->i_rdev);
-	vg_t *vg_ptr = vg[VG_BLK(minor)];
-	lv_t *lv_ptr = vg_ptr->lv[LV_BLK(minor)];
-	void *arg = (void *) a;
-	struct hd_geometry *hd = (struct hd_geometry *) a;
-
-	P_IOCTL("blk MINOR: %d  command: 0x%X  arg: %p  VG#: %d  LV#: %d  "
-		"mode: %s%s\n", minor, command, arg, VG_BLK(minor),
-		LV_BLK(minor), MODE_TO_STR(file->f_mode));
-
-	switch (command) {
-	case BLKSSZGET:
-		/* get block device sector size as needed e.g. by fdisk */
-		return put_user(bdev_hardsect_size(inode->i_bdev), (int *) arg);
-
-	case BLKGETSIZE:
-		/* return device size */
-		P_IOCTL("BLKGETSIZE: %u\n", lv_ptr->u.lv_size);
-		if (put_user(lv_ptr->u.lv_size, (unsigned long *)arg))
-			return -EFAULT;
-		break;
-
-	case BLKGETSIZE64:
-		if (put_user((u64)lv_ptr->u.lv_size << 9, (u64 *)arg))
-			return -EFAULT;
-		break;
-
-	case HDIO_GETGEO:
-		/* get disk geometry */
-		P_IOCTL("%s -- lvm_blk_ioctl -- HDIO_GETGEO\n", lvm_name);
-		if (hd == NULL)
-			return -EINVAL;
-		{
-			unsigned char heads = 64;
-			unsigned char sectors = 32;
-			long start = 0;
-			short cylinders = lv_ptr->u.lv_size / heads / sectors;
-
-			if (copy_to_user((char *) &hd->heads, &heads,
-					 sizeof(heads)) != 0 ||
-			    copy_to_user((char *) &hd->sectors, &sectors,
-					 sizeof(sectors)) != 0 ||
-			    copy_to_user((short *) &hd->cylinders,
-				   &cylinders, sizeof(cylinders)) != 0 ||
-			    copy_to_user((long *) &hd->start, &start,
-					 sizeof(start)) != 0)
-				return -EFAULT;
-
-			P_IOCTL("%s -- lvm_blk_ioctl -- cylinders: %d\n",
-				lvm_name, cylinders);
-		}
-		break;
-
-
-	case LV_SET_ACCESS:
-		/* set access flags of a logical volume */
-		if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-		lv_ptr->u.lv_access = (ulong) arg;
-		if ( lv_ptr->u.lv_access & LV_WRITE)
-			set_device_ro(lv_ptr->u.lv_dev, 0);
-		else
-			set_device_ro(lv_ptr->u.lv_dev, 1);
-		break;
-
-
-	case LV_SET_STATUS:
-		/* set status flags of a logical volume */
-		if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-		if (!((ulong) arg & LV_ACTIVE) && lv_ptr->u.lv_open > 1)
-			return -EPERM;
-		lv_ptr->u.lv_status = (ulong) arg;
-		break;
-
-	case LV_BMAP:
-                /* turn logical block into (dev_t, block).  non privileged. */
-                /* don't bmap a snapshot, since the mapping can change */
-		if(lv_ptr->u.lv_access & LV_SNAPSHOT)
-			return -EPERM;
-
-		return lvm_user_bmap(inode, (struct lv_bmap *) arg);
-
-	case LV_SET_ALLOCATION:
-		/* set allocation flags of a logical volume */
-		if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-		lv_ptr->u.lv_allocation = (ulong) arg;
-		break;
-
-	case LV_SNAPSHOT_USE_RATE:
-		return lvm_get_snapshot_use_rate(lv_ptr, arg);
-
-	default:
-		printk(KERN_WARNING
-		       "%s -- lvm_blk_ioctl: unknown command 0x%x\n",
-		       lvm_name, command);
-		return -EINVAL;
-	}
-
-	return 0;
-} /* lvm_blk_ioctl() */
-
-
-/*
- * block device close routine
- */
-static int lvm_blk_close(struct inode *inode, struct file *file)
-{
-	int minor = minor(inode->i_rdev);
-	vg_t *vg_ptr = vg[VG_BLK(minor)];
-	lv_t *lv_ptr = vg_ptr->lv[LV_BLK(minor)];
-
-	P_DEV("blk_close MINOR: %d  VG#: %d  LV#: %d\n",
-	      minor, VG_BLK(minor), LV_BLK(minor));
-
-	if (lv_ptr->u.lv_open == 1) vg_ptr->lv_open--;
-	lv_ptr->u.lv_open--;
-
-	MOD_DEC_USE_COUNT;
-
-	return 0;
-} /* lvm_blk_close() */
-
-static int lvm_get_snapshot_use_rate(lv_t *lv, void *arg)
-{
-	lv_snapshot_use_rate_req_t lv_rate_req;
-
-	if (!(lv->u.lv_access & LV_SNAPSHOT))
-		return -EPERM;
-
-	if (copy_from_user(&lv_rate_req, arg, sizeof(lv_rate_req)))
-		return -EFAULT;
-
-	if (lv_rate_req.rate < 0 || lv_rate_req.rate > 100)
-		return -EINVAL;
-
-	switch (lv_rate_req.block) {
-	case 0:
-		lv->lv_snapshot_use_rate = lv_rate_req.rate;
-		if (lv->u.lv_remap_ptr * 100 / lv->u.lv_remap_end <
-		    lv->lv_snapshot_use_rate)
-			interruptible_sleep_on(&lv->lv_snapshot_wait);
-		break;
-
-	case O_NONBLOCK:
-		break;
-
-	default:
-		return -EINVAL;
-	}
-	lv_rate_req.rate = lv->u.lv_remap_ptr * 100 / lv->u.lv_remap_end;
-
-	return copy_to_user(arg, &lv_rate_req,
-			    sizeof(lv_rate_req)) ? -EFAULT : 0;
-}
-
-static int lvm_user_bmap(struct inode *inode, struct lv_bmap *user_result)
-{
-	struct bio bio;
-	unsigned long block;
-	int err;
-
-	if (get_user(block, &user_result->lv_block))
-		return -EFAULT;
-
-	memset(&bio,0,sizeof(bio));
-	bio.bi_dev = inode->i_rdev;
-	bio.bi_size = block_size(bio.bi_dev); /* NEEDED by bio_sectors */
- 	bio.bi_sector = block * bio_sectors(&bio);
-	bio.bi_rw = READ;
-	if ((err=lvm_map(&bio)) < 0)  {
-		printk("lvm map failed: %d\n", err);
-		return -EINVAL;
-	}
-
-	return put_user(kdev_t_to_nr(bio.bi_dev), &user_result->lv_dev) ||
-	       put_user(bio.bi_sector/bio_sectors(&bio), &user_result->lv_block) ?
-	       -EFAULT : 0;
-}
-
-
-/*
- * block device support function for /usr/src/linux/drivers/block/ll_rw_blk.c
- * (see init_module/lvm_init)
- */
-static void __remap_snapshot(kdev_t rdev, ulong rsector,
-			     ulong pe_start, lv_t *lv, vg_t *vg) {
-
-	/* copy a chunk from the origin to a snapshot device */
-	down_write(&lv->lv_lock);
-
-	/* we must redo lvm_snapshot_remap_block in order to avoid a
-	   race condition in the gap where no lock was held */
-	if (!lvm_snapshot_remap_block(&rdev, &rsector, pe_start, lv) &&
-	    !lvm_snapshot_COW(rdev, rsector, pe_start, rsector, vg, lv))
-		lvm_write_COW_table_block(vg, lv);
-
-	up_write(&lv->lv_lock);
-}
-
-static inline void _remap_snapshot(kdev_t rdev, ulong rsector,
-				   ulong pe_start, lv_t *lv, vg_t *vg) {
-	int r;
-
-	/* check to see if this chunk is already in the snapshot */
-	down_read(&lv->lv_lock);
-	r = lvm_snapshot_remap_block(&rdev, &rsector, pe_start, lv);
-	up_read(&lv->lv_lock);
-
-	if (!r)
-		/* we haven't yet copied this block to the snapshot */
-		__remap_snapshot(rdev, rsector, pe_start, lv, vg);
-}
-
-
-/*
- * extents destined for a pe that is on the move should be deferred
- */
-static inline int _should_defer(kdev_t pv, ulong sector, uint32_t pe_size) {
-	return ((pe_lock_req.lock == LOCK_PE) &&
-		kdev_same(pv, pe_lock_req.data.pv_dev) &&
-		(sector >= pe_lock_req.data.pv_offset) &&
-		(sector < (pe_lock_req.data.pv_offset + pe_size)));
-}
-
-static inline int _defer_extent(struct bio *bh, int rw,
-				kdev_t pv, ulong sector, uint32_t pe_size)
-{
-	if (pe_lock_req.lock == LOCK_PE) {
-		down_read(&_pe_lock);
-		if (_should_defer(pv, sector, pe_size)) {
-			up_read(&_pe_lock);
-			down_write(&_pe_lock);
-			if (_should_defer(pv, sector, pe_size))
-				_queue_io(bh, rw);
-			up_write(&_pe_lock);
-			return 1;
-		}
-		up_read(&_pe_lock);
-	}
-	return 0;
-}
-
-static int lvm_map(struct bio *bi)
-{
-	int minor = minor(bi->bi_dev);
-	ulong index;
-	ulong pe_start;
-	ulong size = bio_sectors(bi);
-	ulong rsector_org = bi->bi_sector;
-	ulong rsector_map;
-	kdev_t rdev_map;
-	vg_t *vg_this = vg[VG_BLK(minor)];
-	lv_t *lv = vg_this->lv[LV_BLK(minor)];
-	int rw = bio_rw(bi);
-
-	down_read(&lv->lv_lock);
-	if (!(lv->u.lv_status & LV_ACTIVE)) {
-		printk(KERN_ALERT
-		       "%s - lvm_map: ll_rw_blk for inactive LV %s\n",
-		       lvm_name, lv->u.lv_name);
-		goto bad;
-	}
-
-	if ((rw == WRITE || rw == WRITEA) &&
-	    !(lv->u.lv_access & LV_WRITE)) {
-		printk(KERN_CRIT
-		       "%s - lvm_map: ll_rw_blk write for readonly LV %s\n",
-		       lvm_name, lv->u.lv_name);
-		goto bad;
-	}
-
-	P_MAP("%s - lvm_map minor: %d  *rdev: %s  *rsector: %lu  size:%lu\n",
-	      lvm_name, minor,
-	      kdevname(bi->bi_dev),
-	      rsector_org, size);
-
-	if (rsector_org + size > lv->u.lv_size) {
-		printk(KERN_ALERT
-		       "%s - lvm_map access beyond end of device; *rsector: "
-                       "%lu or size: %lu wrong for minor: %2d\n",
-                       lvm_name, rsector_org, size, minor);
-		goto bad;
-	}
-
-
-	if (lv->u.lv_stripes < 2) { /* linear mapping */
-		/* get the index */
-		index = rsector_org / vg_this->pe_size;
-		pe_start = lv->u.lv_current_pe[index].pe;
-		rsector_map = lv->u.lv_current_pe[index].pe +
-			(rsector_org % vg_this->pe_size);
-		rdev_map = lv->u.lv_current_pe[index].dev;
-
-		P_MAP("u.lv_current_pe[%ld].pe: %d  rdev: %s  rsector:%ld\n",
-		      index, lv->u.lv_current_pe[index].pe,
-		      kdevname(rdev_map), rsector_map);
-
-	} else {		/* striped mapping */
-		ulong stripe_index;
-		ulong stripe_length;
-
-		stripe_length = vg_this->pe_size * lv->u.lv_stripes;
-		stripe_index = (rsector_org % stripe_length) /
-			lv->u.lv_stripesize;
-		index = rsector_org / stripe_length +
-			(stripe_index % lv->u.lv_stripes) *
-			(lv->u.lv_allocated_le / lv->u.lv_stripes);
-		pe_start = lv->u.lv_current_pe[index].pe;
-		rsector_map = lv->u.lv_current_pe[index].pe +
-			(rsector_org % stripe_length) -
-			(stripe_index % lv->u.lv_stripes) * lv->u.lv_stripesize -
-			stripe_index / lv->u.lv_stripes *
-			(lv->u.lv_stripes - 1) * lv->u.lv_stripesize;
-		rdev_map = lv->u.lv_current_pe[index].dev;
-
-		P_MAP("u.lv_current_pe[%ld].pe: %d  rdev: %s  rsector:%ld\n"
-		      "stripe_length: %ld  stripe_index: %ld\n",
-		      index, lv->u.lv_current_pe[index].pe, kdevname(rdev_map),
-		      rsector_map, stripe_length, stripe_index);
-	}
-
-	/*
-	 * Queue writes to physical extents on the move until move completes.
-	 * Don't get _pe_lock until there is a reasonable expectation that
-	 * we need to queue this request, because this is in the fast path.
-	 */
-	if (rw == WRITE || rw == WRITEA) {
-		if(_defer_extent(bi, rw, rdev_map,
-				 rsector_map, vg_this->pe_size)) {
-
-			up_read(&lv->lv_lock);
-			return 0;
-		}
-
-		lv->u.lv_current_pe[index].writes++;	/* statistic */
-	} else
-		lv->u.lv_current_pe[index].reads++;	/* statistic */
-
-	/* snapshot volume exception handling on physical device address base */
-	if (!(lv->u.lv_access & (LV_SNAPSHOT|LV_SNAPSHOT_ORG)))
-		goto out;
-
-	if (lv->u.lv_access & LV_SNAPSHOT) { /* remap snapshot */
-		if (lv->u.lv_block_exception)
-			lvm_snapshot_remap_block(&rdev_map, &rsector_map,
-						 pe_start, lv);
-		else
-			goto bad;
-
-	} else if (rw == WRITE || rw == WRITEA) { /* snapshot origin */
-		lv_t *snap;
-
-		/* start with first snapshot and loop through all of
-		   them */
-		for (snap = lv->u.lv_snapshot_next; snap;
-		     snap = snap->u.lv_snapshot_next) {
-			/* Check for inactive snapshot */
-			if (!(snap->u.lv_status & LV_ACTIVE))
-				continue;
-
-			/* Serializes the COW with the accesses to the
-			   snapshot device */
-			_remap_snapshot(rdev_map, rsector_map,
-					 pe_start, snap, vg_this);
-		}
- 	}
-
- out:
-	bi->bi_dev = rdev_map;
-	bi->bi_sector = rsector_map;
-	up_read(&lv->lv_lock);
-	return 1;
-
- bad:
-	bio_io_error(bi);
-	up_read(&lv->lv_lock);
-	return -1;
-} /* lvm_map() */
-
-
-/*
- * internal support functions
- */
-
-#ifdef LVM_HD_NAME
-/*
- * generate "hard disk" name
- */
-void lvm_hd_name(char *buf, int minor)
-{
-	int len = 0;
-	lv_t *lv_ptr;
-
-	if (vg[VG_BLK(minor)] == NULL ||
-	    (lv_ptr = vg[VG_BLK(minor)]->lv[LV_BLK(minor)]) == NULL)
-		return;
-	len = strlen(lv_ptr->u.lv_name) - 5;
-	memcpy(buf, &lv_ptr->u.lv_name[5], len);
-	buf[len] = 0;
-	return;
-}
-#endif
-
-
-/*
- * make request function
- */
-static int lvm_make_request_fn(request_queue_t *q, struct bio *bio)
-{
-	return (lvm_map(bio) <= 0) ? 0 : 1;
-}
-
-
-/********************************************************************
- *
- * Character device support functions
- *
- ********************************************************************/
-/*
- * character device support function logical volume manager lock
- */
-static int lvm_do_lock_lvm(void)
-{
-lock_try_again:
-	spin_lock(&lvm_lock);
-	if (lock != 0 && lock != current->pid) {
-		P_DEV("lvm_do_lock_lvm: locked by pid %d ...\n", lock);
-		spin_unlock(&lvm_lock);
-		interruptible_sleep_on(&lvm_wait);
-		if (signal_pending(current))
-			return -EINTR;
-#ifdef LVM_TOTAL_RESET
-		if (lvm_reset_spindown > 0)
-			return -EACCES;
-#endif
-		goto lock_try_again;
-	}
-	lock = current->pid;
-	P_DEV("lvm_do_lock_lvm: locking LVM for pid %d\n", lock);
-	spin_unlock(&lvm_lock);
-	return 0;
-} /* lvm_do_lock_lvm */
-
-
-/*
- * character device support function lock/unlock physical extend
- */
-static int lvm_do_pe_lock_unlock(vg_t *vg_ptr, void *arg)
-{
-	pe_lock_req_t new_lock;
-	struct bio *bh;
-	uint p;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&new_lock, arg, sizeof(new_lock)) != 0)
-		return -EFAULT;
-
-	switch (new_lock.lock) {
-	case LOCK_PE:
-		for (p = 0; p < vg_ptr->pv_max; p++) {
-			if (vg_ptr->pv[p] != NULL &&
-			    kdev_same(new_lock.data.pv_dev,
-				      vg_ptr->pv[p]->pv_dev))
-				break;
-		}
-		if (p == vg_ptr->pv_max) return -ENXIO;
-
-		/*
-		 * this sync releaves memory pressure to lessen the
-		 * likelyhood of pvmove being paged out - resulting in
-		 * deadlock.
-		 *
-		 * This method of doing a pvmove is broken
-		 */
-		fsync_dev(pe_lock_req.data.lv_dev);
-
-		down_write(&_pe_lock);
-		if (pe_lock_req.lock == LOCK_PE) {
-			up_write(&_pe_lock);
-			return -EBUSY;
-		}
-
-		/* Should we do to_kdev_t() on the pv_dev and u.lv_dev??? */
-		pe_lock_req.lock = LOCK_PE;
-		pe_lock_req.data.lv_dev = new_lock.data.lv_dev;
-		pe_lock_req.data.pv_dev = new_lock.data.pv_dev;
-		pe_lock_req.data.pv_offset = new_lock.data.pv_offset;
-		up_write(&_pe_lock);
-
-		/* some requests may have got through since the fsync */
-		fsync_dev(pe_lock_req.data.pv_dev);
-		break;
-
-	case UNLOCK_PE:
-		down_write(&_pe_lock);
-		pe_lock_req.lock = UNLOCK_PE;
-		pe_lock_req.data.lv_dev = NODEV;
-		pe_lock_req.data.pv_dev = NODEV;
-		pe_lock_req.data.pv_offset = 0;
-		bh = _dequeue_io();
-		up_write(&_pe_lock);
-
-		/* handle all deferred io for this PE */
-		_flush_io(bh);
-		break;
-
-	default:
-		return -EINVAL;
-	}
-	return 0;
-}
-
-
-/*
- * character device support function logical extend remap
- */
-static int lvm_do_le_remap(vg_t *vg_ptr, void *arg)
-{
-	uint l, le;
-	lv_t *lv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&le_remap_req, arg,
-			   sizeof(le_remap_req_t)) != 0)
-		return -EFAULT;
-
-	for (l = 0; l < vg_ptr->lv_max; l++) {
-		lv_ptr = vg_ptr->lv[l];
-		if (lv_ptr != NULL &&
-		    strcmp(lv_ptr->u.lv_name,
-			       le_remap_req.lv_name) == 0) {
-			for (le = 0; le < lv_ptr->u.lv_allocated_le; le++) {
-			  if (kdev_same(lv_ptr->u.lv_current_pe[le].dev,
-					le_remap_req.old_dev) &&
-				    lv_ptr->u.lv_current_pe[le].pe ==
-				    le_remap_req.old_pe) {
-					lv_ptr->u.lv_current_pe[le].dev =
-					    le_remap_req.new_dev;
-					lv_ptr->u.lv_current_pe[le].pe =
-					    le_remap_req.new_pe;
-
-					__update_hardsectsize(lv_ptr);
-					return 0;
-				}
-			}
-			return -EINVAL;
-		}
-	}
-	return -ENXIO;
-} /* lvm_do_le_remap() */
-
-
-/*
- * character device support function VGDA create
- */
-static int lvm_do_vg_create(void *arg, int minor)
-{
-	int ret = 0;
-	ulong l, ls = 0, p, size;
-	vg_t *vg_ptr;
-	lv_t **snap_lv_ptr;
-	lv_t *tmplv;
-
-	if ((vg_ptr = kmalloc(sizeof(vg_t),GFP_KERNEL)) == NULL) {
-		printk(KERN_CRIT
-		       "%s -- VG_CREATE: kmalloc error VG at line %d\n",
-		       lvm_name, __LINE__);
-		return -ENOMEM;
-	}
-
-	/* get the volume group structure */
-	if (copy_from_user(vg_ptr, arg, sizeof(vg_t)) != 0) {
-		P_IOCTL("lvm_do_vg_create ERROR: copy VG ptr %p (%d bytes)\n",
-			arg, sizeof(vg_t));
-		kfree(vg_ptr);
-		return -EFAULT;
-	}
-
-
-
-        /* VG_CREATE now uses minor number in VG structure */
-        if (minor == -1) minor = vg_ptr->vg_number;
-
-	/* Validate it */
-        if (vg[VG_CHR(minor)] != NULL) {
-		P_IOCTL("lvm_do_vg_create ERROR: VG %d in use\n", minor);
-		kfree(vg_ptr);
-  	     	return -EPERM;
-	}
-
-	/* we are not that active so far... */
-	vg_ptr->vg_status &= ~VG_ACTIVE;
-	vg_ptr->pe_allocated = 0;
-
-	if (vg_ptr->pv_max > ABS_MAX_PV) {
-		printk(KERN_WARNING
-		       "%s -- Can't activate VG: ABS_MAX_PV too small\n",
-		       lvm_name);
-		kfree(vg_ptr);
-		return -EPERM;
-	}
-
-	if (vg_ptr->lv_max > ABS_MAX_LV) {
-		printk(KERN_WARNING
-		"%s -- Can't activate VG: ABS_MAX_LV too small for %u\n",
-		       lvm_name, vg_ptr->lv_max);
-		kfree(vg_ptr);
-		return -EPERM;
-	}
-
-	/* create devfs and procfs entries */
-	lvm_fs_create_vg(vg_ptr);
-
-	vg[VG_CHR(minor)] = vg_ptr;
-
-	/* get the physical volume structures */
-	vg_ptr->pv_act = vg_ptr->pv_cur = 0;
-	for (p = 0; p < vg_ptr->pv_max; p++) {
-		pv_t *pvp;
-		/* user space address */
-		if ((pvp = vg_ptr->pv[p]) != NULL) {
-			ret = lvm_do_pv_create(pvp, vg_ptr, p);
-			if ( ret != 0) {
-				lvm_do_vg_remove(minor);
-				return ret;
-			}
-		}
-	}
-
-	size = vg_ptr->lv_max * sizeof(lv_t *);
-	if ((snap_lv_ptr = vmalloc ( size)) == NULL) {
-		printk(KERN_CRIT
-		       "%s -- VG_CREATE: vmalloc error snapshot LVs at line %d\n",
-		       lvm_name, __LINE__);
-		lvm_do_vg_remove(minor);
-		return -EFAULT;
-	}
-	memset(snap_lv_ptr, 0, size);
-
-	if ((tmplv = kmalloc(sizeof(lv_t),GFP_KERNEL)) == NULL) {
-		printk(KERN_CRIT
-		       "%s -- VG_CREATE: kmalloc error LV at line %d\n",
-		       lvm_name, __LINE__);
-		vfree(snap_lv_ptr);
-		return -ENOMEM;
-	}
-
-	/* get the logical volume structures */
-	vg_ptr->lv_cur = 0;
-	for (l = 0; l < vg_ptr->lv_max; l++) {
-		lv_t *lvp;
-		
-		/* user space address */
-		if ((lvp = vg_ptr->lv[l]) != NULL) {
-			if (copy_from_user(tmplv, lvp, sizeof(userlv_t)) != 0) {
-				P_IOCTL("ERROR: copying LV ptr %p (%d bytes)\n",
-					lvp, sizeof(lv_t));
-				lvm_do_vg_remove(minor);
-				vfree(snap_lv_ptr);
-				kfree(tmplv);
-				return -EFAULT;
-			}
-			if ( tmplv->u.lv_access & LV_SNAPSHOT) {
-				snap_lv_ptr[ls] = lvp;
-				vg_ptr->lv[l] = NULL;
-				ls++;
-				continue;
-			}
-			vg_ptr->lv[l] = NULL;
-			/* only create original logical volumes for now */
-			if (lvm_do_lv_create(minor, tmplv->u.lv_name, &tmplv->u) != 0) {
-				lvm_do_vg_remove(minor);
-				vfree(snap_lv_ptr);
-				kfree(tmplv);
-				return -EFAULT;
-			}
-		}
-	}
-
-	/* Second path to correct snapshot logical volumes which are not
-	   in place during first path above */
-	for (l = 0; l < ls; l++) {
-		lv_t *lvp = snap_lv_ptr[l];
-		if (copy_from_user(tmplv, lvp, sizeof(userlv_t)) != 0) {
-			lvm_do_vg_remove(minor);
-			vfree(snap_lv_ptr);
-			kfree(tmplv);
-			return -EFAULT;
-		}
-		if (lvm_do_lv_create(minor, tmplv->u.lv_name, &tmplv->u) != 0) {
-			lvm_do_vg_remove(minor);
-			vfree(snap_lv_ptr);
-			kfree(tmplv);
-			return -EFAULT;
-		}
-	}
-
-	vfree(snap_lv_ptr);
-	kfree(tmplv);
-	vg_count++;
-
-
-	MOD_INC_USE_COUNT;
-
-	/* let's go active */
-	vg_ptr->vg_status |= VG_ACTIVE;
-
-	return 0;
-} /* lvm_do_vg_create() */
-
-
-/*
- * character device support function VGDA extend
- */
-static int lvm_do_vg_extend(vg_t *vg_ptr, void *arg)
-{
-	int ret = 0;
-	uint p;
-	pv_t *pv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (vg_ptr->pv_cur < vg_ptr->pv_max) {
-		for (p = 0; p < vg_ptr->pv_max; p++) {
-			if ( ( pv_ptr = vg_ptr->pv[p]) == NULL) {
-				ret = lvm_do_pv_create(arg, vg_ptr, p);
-				if ( ret != 0) return ret;
-				pv_ptr = vg_ptr->pv[p];
-				vg_ptr->pe_total += pv_ptr->pe_total;
-				return 0;
-			}
-		}
-	}
-	return -EPERM;
-} /* lvm_do_vg_extend() */
-
-
-/*
- * character device support function VGDA reduce
- */
-static int lvm_do_vg_reduce(vg_t *vg_ptr, void *arg) {
-	uint p;
-	pv_t *pv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(pv_name, arg, sizeof(pv_name)) != 0)
-		return -EFAULT;
-
-	for (p = 0; p < vg_ptr->pv_max; p++) {
-		pv_ptr = vg_ptr->pv[p];
-		if (pv_ptr != NULL &&
-		    strcmp(pv_ptr->pv_name,
-			       pv_name) == 0) {
-			if (pv_ptr->lv_cur > 0) return -EPERM;
-			lvm_do_pv_remove(vg_ptr, p);
-			/* Make PV pointer array contiguous */
-			for (; p < vg_ptr->pv_max - 1; p++)
-				vg_ptr->pv[p] = vg_ptr->pv[p + 1];
-			vg_ptr->pv[p + 1] = NULL;
-			return 0;
-		}
-	}
-	return -ENXIO;
-} /* lvm_do_vg_reduce */
-
-
-/*
- * character device support function VG rename
- */
-static int lvm_do_vg_rename(vg_t *vg_ptr, void *arg)
-{
-	int l = 0, p = 0, len = 0;
-	char vg_name[NAME_LEN] = { 0,};
-	char lv_name[NAME_LEN] = { 0,};
-	char *ptr = NULL;
-	lv_t *lv_ptr = NULL;
-	pv_t *pv_ptr = NULL;
-
-	if (vg_ptr == NULL) return -ENXIO;
-
-	if (copy_from_user(vg_name, arg, sizeof(vg_name)) != 0)
-		return -EFAULT;
-
-	lvm_fs_remove_vg(vg_ptr);
-
-	strncpy ( vg_ptr->vg_name, vg_name, sizeof ( vg_name)-1);
-	for ( l = 0; l < vg_ptr->lv_max; l++)
-	{
-		if ((lv_ptr = vg_ptr->lv[l]) == NULL) continue;
-		strncpy(lv_ptr->u.vg_name, vg_name, sizeof ( vg_name));
-		ptr = strrchr(lv_ptr->u.lv_name, '/');
-		if (ptr == NULL) ptr = lv_ptr->u.lv_name;
-		strncpy(lv_name, ptr, sizeof ( lv_name));
-		len = sizeof(LVM_DIR_PREFIX);
-		strcpy(lv_ptr->u.lv_name, LVM_DIR_PREFIX);
-		strncat(lv_ptr->u.lv_name, vg_name, NAME_LEN - len);
-		len += strlen ( vg_name);
-		strncat(lv_ptr->u.lv_name, lv_name, NAME_LEN - len);
-	}
-	for ( p = 0; p < vg_ptr->pv_max; p++)
-	{
-		if ( (pv_ptr = vg_ptr->pv[p]) == NULL) continue;
-		strncpy(pv_ptr->vg_name, vg_name, NAME_LEN);
-	}
-
-	lvm_fs_create_vg(vg_ptr);
-
-	return 0;
-} /* lvm_do_vg_rename */
-
-
-/*
- * character device support function VGDA remove
- */
-static int lvm_do_vg_remove(int minor)
-{
-	int i;
-	vg_t *vg_ptr = vg[VG_CHR(minor)];
-	pv_t *pv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-
-#ifdef LVM_TOTAL_RESET
-	if (vg_ptr->lv_open > 0 && lvm_reset_spindown == 0)
-#else
-	if (vg_ptr->lv_open > 0)
-#endif
-		return -EPERM;
-
-	/* let's go inactive */
-	vg_ptr->vg_status &= ~VG_ACTIVE;
-
-	/* remove from procfs and devfs */
-	lvm_fs_remove_vg(vg_ptr);
-
-	/* free LVs */
-	/* first free snapshot logical volumes */
-	for (i = 0; i < vg_ptr->lv_max; i++) {
-		if (vg_ptr->lv[i] != NULL &&
-		    vg_ptr->lv[i]->u.lv_access & LV_SNAPSHOT) {
-			lvm_do_lv_remove(minor, NULL, i);
-			current->state = TASK_UNINTERRUPTIBLE;
-			schedule_timeout(1);
-		}
-	}
-	/* then free the rest of the LVs */
-	for (i = 0; i < vg_ptr->lv_max; i++) {
-		if (vg_ptr->lv[i] != NULL) {
-			lvm_do_lv_remove(minor, NULL, i);
-			current->state = TASK_UNINTERRUPTIBLE;
-			schedule_timeout(1);
-		}
-	}
-
-	/* free PVs */
-	for (i = 0; i < vg_ptr->pv_max; i++) {
-		if ((pv_ptr = vg_ptr->pv[i]) != NULL) {
-			P_KFREE("%s -- kfree %d\n", lvm_name, __LINE__);
-			lvm_do_pv_remove(vg_ptr, i);
-		}
-	}
-
-	P_KFREE("%s -- kfree %d\n", lvm_name, __LINE__);
-	kfree(vg_ptr);
-	vg[VG_CHR(minor)] = NULL;
-
-	vg_count--;
-
-	MOD_DEC_USE_COUNT;
-
-	return 0;
-} /* lvm_do_vg_remove() */
-
-
-/*
- * character device support function physical volume create
- */
-static int lvm_do_pv_create(pv_t *pvp, vg_t *vg_ptr, ulong p) {
-	pv_t *pv;
-	int err;
-
-	pv = kmalloc(sizeof(pv_t),GFP_KERNEL);
-	if (pv == NULL) {
-		printk(KERN_CRIT
-		       "%s -- PV_CREATE: kmalloc error PV at line %d\n",
-		       lvm_name, __LINE__);
-		return -ENOMEM;
-	}
-
-	memset(pv, 0, sizeof(*pv));
-
-	if (copy_from_user(pv, pvp, sizeof(pv_t)) != 0) {
-		P_IOCTL("lvm_do_pv_create ERROR: copy PV ptr %p (%d bytes)\n",
-			pvp, sizeof(pv_t));
-		kfree(pv);
-		return -EFAULT;
-	}
-
-	if ((err = _open_pv(pv))) {
-		kfree(pv);
-		return err;
-	}
-
-	/* We don't need the PE list
-	   in kernel space as with LVs pe_t list (see below) */
-	pv->pe = NULL;
-	pv->pe_allocated = 0;
-	pv->pv_status = PV_ACTIVE;
-	vg_ptr->pv_act++;
-	vg_ptr->pv_cur++;
-	lvm_fs_create_pv(vg_ptr, pv);
-
-	vg_ptr->pv[p] = pv;
-	return 0;
-} /* lvm_do_pv_create() */
-
-
-/*
- * character device support function physical volume remove
- */
-static int lvm_do_pv_remove(vg_t *vg_ptr, ulong p) {
-	pv_t *pv = vg_ptr->pv[p];
-
-	lvm_fs_remove_pv(vg_ptr, pv);
-
-	vg_ptr->pe_total -= pv->pe_total;
-	vg_ptr->pv_cur--;
-	vg_ptr->pv_act--;
-
-	_close_pv(pv);
-	kfree(pv);
-
-	vg_ptr->pv[p] = NULL;
-
-	return 0;
-}
-
-
-static void __update_hardsectsize(lv_t *lv) {
-	int le, e;
-	int max_hardsectsize = 0, hardsectsize;
-
-	for (le = 0; le < lv->u.lv_allocated_le; le++) {
-		hardsectsize = get_hardsect_size(lv->u.lv_current_pe[le].dev);
-		if (hardsectsize == 0)
-			hardsectsize = 512;
-		if (hardsectsize > max_hardsectsize)
-			max_hardsectsize = hardsectsize;
-	}
-
-	/* only perform this operation on active snapshots */
-	if ((lv->u.lv_access & LV_SNAPSHOT) &&
-	    (lv->u.lv_status & LV_ACTIVE)) {
-		for (e = 0; e < lv->u.lv_remap_end; e++) {
-			hardsectsize = get_hardsect_size( lv->u.lv_block_exception[e].rdev_new);
-			if (hardsectsize == 0)
-				hardsectsize = 512;
-			if (hardsectsize > max_hardsectsize)
-				max_hardsectsize = hardsectsize;
-		}
-	}
-}
-
-/*
- * character device support function logical volume create
- */
-static int lvm_do_lv_create(int minor, char *lv_name, userlv_t *ulv)
-{
-	int e, ret, l, le, l_new, p, size, activate = 1;
-	ulong lv_status_save;
-	lv_block_exception_t *lvbe = ulv->lv_block_exception;
-	vg_t *vg_ptr = vg[VG_CHR(minor)];
-	lv_t *lv_ptr = NULL;
-	pe_t *pep;
-
-	if (!(pep = ulv->lv_current_pe))
-		return -EINVAL;
-
-	if (_sectors_to_k(ulv->lv_chunk_size) > LVM_SNAPSHOT_MAX_CHUNK)
-		return -EINVAL;
-
-	for (l = 0; l < vg_ptr->lv_cur; l++) {
-		if (vg_ptr->lv[l] != NULL &&
-		    strcmp(vg_ptr->lv[l]->u.lv_name, lv_name) == 0)
-			return -EEXIST;
-	}
-
-	/* in case of lv_remove(), lv_create() pair */
-	l_new = -1;
-	if (vg_ptr->lv[ulv->lv_number] == NULL)
-		l_new = ulv->lv_number;
-	else {
-		for (l = 0; l < vg_ptr->lv_max; l++) {
-			if (vg_ptr->lv[l] == NULL)
-				if (l_new == -1) l_new = l;
-		}
-	}
-	if (l_new == -1) return -EPERM;
-	else             l = l_new;
-
-	if ((lv_ptr = kmalloc(sizeof(lv_t),GFP_KERNEL)) == NULL) {;
-		printk(KERN_CRIT "%s -- LV_CREATE: kmalloc error LV at line %d\n",
-		       lvm_name, __LINE__);
-		return -ENOMEM;
-	}
-	/* copy preloaded LV */
-	memcpy((char *) lv_ptr, (char *) ulv, sizeof(userlv_t));
-
-	lv_status_save = lv_ptr->u.lv_status;
-	lv_ptr->u.lv_status &= ~LV_ACTIVE;
-	lv_ptr->u.lv_snapshot_org = NULL;
-	lv_ptr->u.lv_snapshot_prev = NULL;
-	lv_ptr->u.lv_snapshot_next = NULL;
-	lv_ptr->u.lv_block_exception = NULL;
-	lv_ptr->lv_iobuf = NULL;
-	lv_ptr->lv_COW_table_iobuf = NULL;
-	lv_ptr->lv_snapshot_hash_table = NULL;
-	lv_ptr->lv_snapshot_hash_table_size = 0;
-	lv_ptr->lv_snapshot_hash_mask = 0;
-	init_rwsem(&lv_ptr->lv_lock);
-
-	lv_ptr->lv_snapshot_use_rate = 0;
-
-	vg_ptr->lv[l] = lv_ptr;
-
-	/* get the PE structures from user space if this
-	   is not a snapshot logical volume */
-	if (!(lv_ptr->u.lv_access & LV_SNAPSHOT)) {
-		size = lv_ptr->u.lv_allocated_le * sizeof(pe_t);
-
-		if ((lv_ptr->u.lv_current_pe = vmalloc(size)) == NULL) {
-			printk(KERN_CRIT
-			       "%s -- LV_CREATE: vmalloc error LV_CURRENT_PE of %d Byte "
-			       "at line %d\n",
-			       lvm_name, size, __LINE__);
-			P_KFREE("%s -- kfree %d\n", lvm_name, __LINE__);
-			kfree(lv_ptr);
-			vg_ptr->lv[l] = NULL;
-			return -ENOMEM;
-		}
-		if (copy_from_user(lv_ptr->u.lv_current_pe, pep, size)) {
-			P_IOCTL("ERROR: copying PE ptr %p (%d bytes)\n",
-				pep, sizeof(size));
-			vfree(lv_ptr->u.lv_current_pe);
-			kfree(lv_ptr);
-			vg_ptr->lv[l] = NULL;
-			return -EFAULT;
-		}
-		/* correct the PE count in PVs */
-		for (le = 0; le < lv_ptr->u.lv_allocated_le; le++) {
-			vg_ptr->pe_allocated++;
-			for (p = 0; p < vg_ptr->pv_cur; p++) {
-				if (kdev_same(vg_ptr->pv[p]->pv_dev,
-					      lv_ptr->u.lv_current_pe[le].dev))
-					vg_ptr->pv[p]->pe_allocated++;
-			}
-		}
-	} else {
-		/* Get snapshot exception data and block list */
-		if (lvbe != NULL) {
-			lv_ptr->u.lv_snapshot_org =
-			    vg_ptr->lv[LV_BLK(lv_ptr->u.lv_snapshot_minor)];
-			if (lv_ptr->u.lv_snapshot_org != NULL) {
-				size = lv_ptr->u.lv_remap_end * sizeof(lv_block_exception_t);
-
-				if(!size) {
-					printk(KERN_WARNING
-					       "%s -- zero length exception table requested\n",
-					       lvm_name);
-					kfree(lv_ptr);
-					return -EINVAL;
-				}
-
-				if ((lv_ptr->u.lv_block_exception = vmalloc(size)) == NULL) {
-					printk(KERN_CRIT
-					       "%s -- lvm_do_lv_create: vmalloc error LV_BLOCK_EXCEPTION "
-					       "of %d byte at line %d\n",
-					       lvm_name, size, __LINE__);
-					P_KFREE("%s -- kfree %d\n", lvm_name,
-						__LINE__);
-					kfree(lv_ptr);
-					vg_ptr->lv[l] = NULL;
-					return -ENOMEM;
-				}
-				if (copy_from_user(lv_ptr->u.lv_block_exception, lvbe, size)) {
-					vfree(lv_ptr->u.lv_block_exception);
-					kfree(lv_ptr);
-					vg_ptr->lv[l] = NULL;
-					return -EFAULT;
-				}
-
-				if(lv_ptr->u.lv_block_exception[0].rsector_org ==
-				   LVM_SNAPSHOT_DROPPED_SECTOR)
-				{
-					printk(KERN_WARNING
-    "%s -- lvm_do_lv_create: snapshot has been dropped and will not be activated\n",
-					       lvm_name);
-					activate = 0;
-				}
-
-
-				/* point to the original logical volume */
-				lv_ptr = lv_ptr->u.lv_snapshot_org;
-
-				lv_ptr->u.lv_snapshot_minor = 0;
-				lv_ptr->u.lv_snapshot_org = lv_ptr;
-				/* our new one now back points to the previous last in the chain
-				   which can be the original logical volume */
-				lv_ptr = vg_ptr->lv[l];
-				/* now lv_ptr points to our new last snapshot logical volume */
-				lv_ptr->u.lv_current_pe = lv_ptr->u.lv_snapshot_org->u.lv_current_pe;
-				lv_ptr->lv_allocated_snapshot_le = lv_ptr->u.lv_allocated_le;
-				lv_ptr->u.lv_allocated_le = lv_ptr->u.lv_snapshot_org->u.lv_allocated_le;
-				lv_ptr->u.lv_current_le = lv_ptr->u.lv_snapshot_org->u.lv_current_le;
-				lv_ptr->u.lv_size = lv_ptr->u.lv_snapshot_org->u.lv_size;
-				lv_ptr->u.lv_stripes = lv_ptr->u.lv_snapshot_org->u.lv_stripes;
-				lv_ptr->u.lv_stripesize = lv_ptr->u.lv_snapshot_org->u.lv_stripesize;
-
-				/* Update the VG PE(s) used by snapshot reserve space. */
-				vg_ptr->pe_allocated += lv_ptr->lv_allocated_snapshot_le;
-
-				if ((ret = lvm_snapshot_alloc(lv_ptr)) != 0)
-				{
-					vfree(lv_ptr->u.lv_block_exception);
-					kfree(lv_ptr);
-					vg_ptr->lv[l] = NULL;
-					return ret;
-				}
-				for ( e = 0; e < lv_ptr->u.lv_remap_ptr; e++)
-					lvm_hash_link (lv_ptr->u.lv_block_exception + e,
-						       lv_ptr->u.lv_block_exception[e].rdev_org,
-						       lv_ptr->u.lv_block_exception[e].rsector_org, lv_ptr);
-				/* need to fill the COW exception table data
-				   into the page for disk i/o */
-                               if(lvm_snapshot_fill_COW_page(vg_ptr, lv_ptr)) {
-                                       kfree(lv_ptr);
-                                       vg_ptr->lv[l] = NULL;
-                                       return -EINVAL;
-                               }
-				init_waitqueue_head(&lv_ptr->lv_snapshot_wait);
-			} else {
-				kfree(lv_ptr);
-				vg_ptr->lv[l] = NULL;
-				return -EFAULT;
-			}
-		} else {
-			kfree(vg_ptr->lv[l]);
-			vg_ptr->lv[l] = NULL;
-			return -EINVAL;
-		}
-	} /* if ( vg[VG_CHR(minor)]->lv[l]->u.lv_access & LV_SNAPSHOT) */
-
-	lv_ptr = vg_ptr->lv[l];
-	lvm_gendisk.part[minor(lv_ptr->u.lv_dev)].start_sect = 0;
-	lvm_gendisk.part[minor(lv_ptr->u.lv_dev)].nr_sects = lv_ptr->u.lv_size;
-	lvm_size[minor(lv_ptr->u.lv_dev)] = lv_ptr->u.lv_size >> 1;
-	vg_lv_map[minor(lv_ptr->u.lv_dev)].vg_number = vg_ptr->vg_number;
-	vg_lv_map[minor(lv_ptr->u.lv_dev)].lv_number = lv_ptr->u.lv_number;
-	vg_ptr->lv_cur++;
-	lv_ptr->u.lv_status = lv_status_save;
-
-	__update_hardsectsize(lv_ptr);
-
-	/* optionally add our new snapshot LV */
-	if (lv_ptr->u.lv_access & LV_SNAPSHOT) {
-		lv_t *org = lv_ptr->u.lv_snapshot_org, *last;
-
-		/* sync the original logical volume */
-		fsync_dev(org->u.lv_dev);
-#ifdef	LVM_VFS_ENHANCEMENT
-		/* VFS function call to sync and lock the filesystem */
-		fsync_dev_lockfs(org->u.lv_dev);
-#endif
-
-		down_write(&org->lv_lock);
-		org->u.lv_access |= LV_SNAPSHOT_ORG;
-		lv_ptr->u.lv_access &= ~LV_SNAPSHOT_ORG; /* this can only hide an userspace bug */
-
-		/* Link in the list of snapshot volumes */
-		for (last = org; last->u.lv_snapshot_next; last = last->u.lv_snapshot_next);
-		lv_ptr->u.lv_snapshot_prev = last;
-		last->u.lv_snapshot_next = lv_ptr;
-		up_write(&org->lv_lock);
-	}
-
-	/* activate the logical volume */
-	if(activate)
-		lv_ptr->u.lv_status |= LV_ACTIVE;
-	else
-		lv_ptr->u.lv_status &= ~LV_ACTIVE;
-
-	if ( lv_ptr->u.lv_access & LV_WRITE)
-		set_device_ro(lv_ptr->u.lv_dev, 0);
-	else
-		set_device_ro(lv_ptr->u.lv_dev, 1);
-
-#ifdef	LVM_VFS_ENHANCEMENT
-/* VFS function call to unlock the filesystem */
-	if (lv_ptr->u.lv_access & LV_SNAPSHOT)
-		unlockfs(lv_ptr->u.lv_snapshot_org->u.lv_dev);
-#endif
-
-	lv_ptr->vg = vg_ptr;
-
-	lvm_gendisk.part[minor(lv_ptr->u.lv_dev)].de =
-		lvm_fs_create_lv(vg_ptr, lv_ptr);
-
-	return 0;
-} /* lvm_do_lv_create() */
-
-
-/*
- * character device support function logical volume remove
- */
-static int lvm_do_lv_remove(int minor, char *lv_name, int l)
-{
-	uint le, p;
-	vg_t *vg_ptr = vg[VG_CHR(minor)];
-	lv_t *lv_ptr;
-
-	if (l == -1) {
-		for (l = 0; l < vg_ptr->lv_max; l++) {
-			if (vg_ptr->lv[l] != NULL &&
-			    strcmp(vg_ptr->lv[l]->u.lv_name, lv_name) == 0) {
-				break;
-			}
-		}
-	}
-	if (l == vg_ptr->lv_max) return -ENXIO;
-
-	lv_ptr = vg_ptr->lv[l];
-#ifdef LVM_TOTAL_RESET
-	if (lv_ptr->u.lv_open > 0 && lvm_reset_spindown == 0)
-#else
-	if (lv_ptr->u.lv_open > 0)
-#endif
-		return -EBUSY;
-
-	/* check for deletion of snapshot source while
-	   snapshot volume still exists */
-	if ((lv_ptr->u.lv_access & LV_SNAPSHOT_ORG) &&
-	    lv_ptr->u.lv_snapshot_next != NULL)
-		return -EPERM;
-
-	lvm_fs_remove_lv(vg_ptr, lv_ptr);
-
-	if (lv_ptr->u.lv_access & LV_SNAPSHOT) {
-		/*
-		 * Atomically make the the snapshot invisible
-		 * to the original lv before playing with it.
-		 */
-		lv_t * org = lv_ptr->u.lv_snapshot_org;
-		down_write(&org->lv_lock);
-
-		/* remove this snapshot logical volume from the chain */
-		lv_ptr->u.lv_snapshot_prev->u.lv_snapshot_next = lv_ptr->u.lv_snapshot_next;
-		if (lv_ptr->u.lv_snapshot_next != NULL) {
-			lv_ptr->u.lv_snapshot_next->u.lv_snapshot_prev =
-			    lv_ptr->u.lv_snapshot_prev;
-		}
-
-		/* no more snapshots? */
-		if (!org->u.lv_snapshot_next) {
-			org->u.lv_access &= ~LV_SNAPSHOT_ORG;
-		}
-		up_write(&org->lv_lock);
-
-		lvm_snapshot_release(lv_ptr);
-
-		/* Update the VG PE(s) used by snapshot reserve space. */
-		vg_ptr->pe_allocated -= lv_ptr->lv_allocated_snapshot_le;
-	}
-
-	lv_ptr->u.lv_status |= LV_SPINDOWN;
-
-	/* sync the buffers */
-	fsync_dev(lv_ptr->u.lv_dev);
-
-	lv_ptr->u.lv_status &= ~LV_ACTIVE;
-
-	/* invalidate the buffers */
-	invalidate_buffers(lv_ptr->u.lv_dev);
-
-	/* reset generic hd */
-	lvm_gendisk.part[minor(lv_ptr->u.lv_dev)].start_sect = -1;
-	lvm_gendisk.part[minor(lv_ptr->u.lv_dev)].nr_sects = 0;
-	lvm_gendisk.part[minor(lv_ptr->u.lv_dev)].de = 0;
-	lvm_size[minor(lv_ptr->u.lv_dev)] = 0;
-
-	/* reset VG/LV mapping */
-	vg_lv_map[minor(lv_ptr->u.lv_dev)].vg_number = ABS_MAX_VG;
-	vg_lv_map[minor(lv_ptr->u.lv_dev)].lv_number = -1;
-
-	/* correct the PE count in PVs if this is not a snapshot
-           logical volume */
-	if (!(lv_ptr->u.lv_access & LV_SNAPSHOT)) {
-		/* only if this is no snapshot logical volume because
-		   we share the u.lv_current_pe[] structs with the
-		   original logical volume */
-		for (le = 0; le < lv_ptr->u.lv_allocated_le; le++) {
-			vg_ptr->pe_allocated--;
-			for (p = 0; p < vg_ptr->pv_cur; p++) {
-				if (kdev_same(vg_ptr->pv[p]->pv_dev,
-					      lv_ptr->u.lv_current_pe[le].dev))
-					vg_ptr->pv[p]->pe_allocated--;
-			}
-		}
-		vfree(lv_ptr->u.lv_current_pe);
-	}
-
-	P_KFREE("%s -- kfree %d\n", lvm_name, __LINE__);
-	kfree(lv_ptr);
-	vg_ptr->lv[l] = NULL;
-	vg_ptr->lv_cur--;
-	return 0;
-} /* lvm_do_lv_remove() */
-
-
-/*
- * logical volume extend / reduce
- */
-static int __extend_reduce_snapshot(vg_t *vg_ptr, lv_t *old_lv, lv_t *new_lv) {
-        ulong size;
-        lv_block_exception_t *lvbe;
-
-        if (!new_lv->u.lv_block_exception)
-                return -ENXIO;
-
-        size = new_lv->u.lv_remap_end * sizeof(lv_block_exception_t);
-        if ((lvbe = vmalloc(size)) == NULL) {
-                printk(KERN_CRIT
-                       "%s -- lvm_do_lv_extend_reduce: vmalloc "
-                       "error LV_BLOCK_EXCEPTION of %lu Byte at line %d\n",
-                       lvm_name, size, __LINE__);
-                return -ENOMEM;
-        }
-
-        if ((new_lv->u.lv_remap_end > old_lv->u.lv_remap_end) &&
-            (copy_from_user(lvbe, new_lv->u.lv_block_exception, size))) {
-                vfree(lvbe);
-                return -EFAULT;
-        }
-        new_lv->u.lv_block_exception = lvbe;
-
-        if (lvm_snapshot_alloc_hash_table(new_lv)) {
-                vfree(new_lv->u.lv_block_exception);
-                return -ENOMEM;
-        }
-
-        return 0;
-}
-
-static int __extend_reduce(vg_t *vg_ptr, lv_t *old_lv, lv_t *new_lv) {
-        ulong size, l, p, end;
-        pe_t *pe;
-
-        /* allocate space for new pe structures */
-        size = new_lv->u.lv_current_le * sizeof(pe_t);
-        if ((pe = vmalloc(size)) == NULL) {
-                printk(KERN_CRIT
-                       "%s -- lvm_do_lv_extend_reduce: "
-                       "vmalloc error LV_CURRENT_PE of %lu Byte at line %d\n",
-                       lvm_name, size, __LINE__);
-                return -ENOMEM;
-        }
-
-        /* get the PE structures from user space */
-        if (copy_from_user(pe, new_lv->u.lv_current_pe, size)) {
-                if(old_lv->u.lv_access & LV_SNAPSHOT)
-                        vfree(new_lv->lv_snapshot_hash_table);
-                vfree(pe);
-                return -EFAULT;
-        }
-
-        new_lv->u.lv_current_pe = pe;
-
-        /* reduce allocation counters on PV(s) */
-        for (l = 0; l < old_lv->u.lv_allocated_le; l++) {
-                vg_ptr->pe_allocated--;
-                for (p = 0; p < vg_ptr->pv_cur; p++) {
-			if (kdev_same(vg_ptr->pv[p]->pv_dev,
-				      old_lv->u.lv_current_pe[l].dev)) {
-                                vg_ptr->pv[p]->pe_allocated--;
-                                break;
-                        }
-                }
-        }
-
-        /* extend the PE count in PVs */
-        for (l = 0; l < new_lv->u.lv_allocated_le; l++) {
-                vg_ptr->pe_allocated++;
-                for (p = 0; p < vg_ptr->pv_cur; p++) {
-			if (kdev_same(vg_ptr->pv[p]->pv_dev,
-				      new_lv->u.lv_current_pe[l].dev)) {
-                                vg_ptr->pv[p]->pe_allocated++;
-                                break;
-                        }
-                }
-        }
-
-        /* save availiable i/o statistic data */
-        if (old_lv->u.lv_stripes < 2) {   /* linear logical volume */
-                end = min(old_lv->u.lv_current_le, new_lv->u.lv_current_le);
-                for (l = 0; l < end; l++) {
-                        new_lv->u.lv_current_pe[l].reads +=
-                                old_lv->u.lv_current_pe[l].reads;
-
-                        new_lv->u.lv_current_pe[l].writes +=
-                                old_lv->u.lv_current_pe[l].writes;
-                }
-
-        } else {                /* striped logical volume */
-                uint i, j, source, dest, end, old_stripe_size, new_stripe_size;
-
-                old_stripe_size = old_lv->u.lv_allocated_le / old_lv->u.lv_stripes;
-                new_stripe_size = new_lv->u.lv_allocated_le / new_lv->u.lv_stripes;
-                end = min(old_stripe_size, new_stripe_size);
-
-                for (i = source = dest = 0;
-                     i < new_lv->u.lv_stripes; i++) {
-                        for (j = 0; j < end; j++) {
-                                new_lv->u.lv_current_pe[dest + j].reads +=
-                                    old_lv->u.lv_current_pe[source + j].reads;
-                                new_lv->u.lv_current_pe[dest + j].writes +=
-                                    old_lv->u.lv_current_pe[source + j].writes;
-                        }
-                        source += old_stripe_size;
-                        dest += new_stripe_size;
-                }
-        }
-
-        return 0;
-}
-
-static int lvm_do_lv_extend_reduce(int minor, char *lv_name, userlv_t *ulv)
-{
-        int r;
-        ulong l, e, size;
-        vg_t *vg_ptr = vg[VG_CHR(minor)];
-        lv_t *old_lv;
-	lv_t *new_lv;
-        pe_t *pe;
-
-	if((new_lv = kmalloc(sizeof(lv_t),GFP_KERNEL)) == NULL){
-		printk(KERN_CRIT 
-		       "%s -- LV_EXTEND/REDUCE: kmallor error LV at line %d\n",
-		       lvm_name,__LINE__);
-		return -ENOMEM;
-	}
-	memset(new_lv,0,sizeof(lv_t));
-	memcpy(&new_lv->u,ulv,sizeof(userlv_t));
-
-        if ((pe = new_lv->u.lv_current_pe) == NULL)
-                return -EINVAL;
-
-        for (l = 0; l < vg_ptr->lv_max; l++)
-                if (vg_ptr->lv[l] && !strcmp(vg_ptr->lv[l]->u.lv_name, lv_name))
-                        break;
-
-        if (l == vg_ptr->lv_max)
-                return -ENXIO;
-
-        old_lv = vg_ptr->lv[l];
-
-	if (old_lv->u.lv_access & LV_SNAPSHOT) {
-		/* only perform this operation on active snapshots */
-		if (old_lv->u.lv_status & LV_ACTIVE)
-                r = __extend_reduce_snapshot(vg_ptr, old_lv, new_lv);
-        else
-			r = -EPERM;
-
-	} else
-                r = __extend_reduce(vg_ptr, old_lv, new_lv);
-
-        if(r)
-                return r;
-
-        /* copy relevent fields */
-	down_write(&old_lv->lv_lock);
-
-        if(new_lv->u.lv_access & LV_SNAPSHOT) {
-                size = (new_lv->u.lv_remap_end > old_lv->u.lv_remap_end) ?
-                        old_lv->u.lv_remap_ptr : new_lv->u.lv_remap_end;
-                size *= sizeof(lv_block_exception_t);
-                memcpy(new_lv->u.lv_block_exception,
-                       old_lv->u.lv_block_exception, size);
-
-                old_lv->u.lv_remap_end = new_lv->u.lv_remap_end;
-                old_lv->u.lv_block_exception = new_lv->u.lv_block_exception;
-                old_lv->lv_snapshot_hash_table =
-                        new_lv->lv_snapshot_hash_table;
-                old_lv->lv_snapshot_hash_table_size =
-                        new_lv->lv_snapshot_hash_table_size;
-                old_lv->lv_snapshot_hash_mask =
-                        new_lv->lv_snapshot_hash_mask;
-
-                for (e = 0; e < new_lv->u.lv_remap_ptr; e++)
-                        lvm_hash_link(new_lv->u.lv_block_exception + e,
-                                      new_lv->u.lv_block_exception[e].rdev_org,
-                                    new_lv->u.lv_block_exception[e].rsector_org,
-                                      new_lv);
-
-        } else {
-
-                vfree(old_lv->u.lv_current_pe);
-                vfree(old_lv->lv_snapshot_hash_table);
-
-                old_lv->u.lv_size = new_lv->u.lv_size;
-                old_lv->u.lv_allocated_le = new_lv->u.lv_allocated_le;
-                old_lv->u.lv_current_le = new_lv->u.lv_current_le;
-                old_lv->u.lv_current_pe = new_lv->u.lv_current_pe;
-                lvm_gendisk.part[minor(old_lv->u.lv_dev)].nr_sects =
-                        old_lv->u.lv_size;
-                lvm_size[minor(old_lv->u.lv_dev)] = old_lv->u.lv_size >> 1;
-
-                if (old_lv->u.lv_access & LV_SNAPSHOT_ORG) {
-                        lv_t *snap;
-                        for(snap = old_lv->u.lv_snapshot_next; snap;
-                            snap = snap->u.lv_snapshot_next) {
-				down_write(&snap->lv_lock);
-                                snap->u.lv_current_pe = old_lv->u.lv_current_pe;
-                                snap->u.lv_allocated_le =
-                                        old_lv->u.lv_allocated_le;
-                                snap->u.lv_current_le = old_lv->u.lv_current_le;
-                                snap->u.lv_size = old_lv->u.lv_size;
-
-                                lvm_gendisk.part[minor(snap->u.lv_dev)].nr_sects
-                                        = old_lv->u.lv_size;
-                                lvm_size[minor(snap->u.lv_dev)] =
-                                        old_lv->u.lv_size >> 1;
-                                __update_hardsectsize(snap);
-				up_write(&snap->lv_lock);
-                        }
-                }
-        }
-
-        __update_hardsectsize(old_lv);
-	up_write(&old_lv->lv_lock);
-
-        return 0;
-} /* lvm_do_lv_extend_reduce() */
-
-
-/*
- * character device support function logical volume status by name
- */
-static int lvm_do_lv_status_byname(vg_t *vg_ptr, void *arg)
-{
-	uint l;
-	lv_status_byname_req_t lv_status_byname_req;
-	void *saved_ptr1;
-	void *saved_ptr2;
-	lv_t *lv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&lv_status_byname_req, arg,
-			   sizeof(lv_status_byname_req_t)) != 0)
-		return -EFAULT;
-
-	if (lv_status_byname_req.lv == NULL) return -EINVAL;
-
-	for (l = 0; l < vg_ptr->lv_max; l++) {
-		if ((lv_ptr = vg_ptr->lv[l]) != NULL &&
-		    strcmp(lv_ptr->u.lv_name,
-			   lv_status_byname_req.lv_name) == 0) {
-		        /* Save usermode pointers */
-		        if (copy_from_user(&saved_ptr1, &lv_status_byname_req.lv->u.lv_current_pe, sizeof(void*)) != 0)
-				return -EFAULT;
-			if (copy_from_user(&saved_ptr2, &lv_status_byname_req.lv->u.lv_block_exception, sizeof(void*)) != 0)
-			        return -EFAULT;
-		        if (copy_to_user(lv_status_byname_req.lv,
-					 lv_ptr,
-					 sizeof(userlv_t)) != 0)
-				return -EFAULT;
-
-			if (saved_ptr1 != NULL) {
-				if (copy_to_user(saved_ptr1,
-						 lv_ptr->u.lv_current_pe,
-						 lv_ptr->u.lv_allocated_le *
-				       		 sizeof(pe_t)) != 0)
-					return -EFAULT;
-			}
-			/* Restore usermode pointers */
-			if (copy_to_user(&lv_status_byname_req.lv->u.lv_current_pe, &saved_ptr1, sizeof(void*)) != 0)
-			        return -EFAULT;
-			return 0;
-		}
-	}
-	return -ENXIO;
-} /* lvm_do_lv_status_byname() */
-
-
-/*
- * character device support function logical volume status by index
- */
-static int lvm_do_lv_status_byindex(vg_t *vg_ptr,void *arg)
-{
-	lv_status_byindex_req_t lv_status_byindex_req;
-	void *saved_ptr1;
-	void *saved_ptr2;
-	lv_t *lv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&lv_status_byindex_req, arg,
-			   sizeof(lv_status_byindex_req)) != 0)
-		return -EFAULT;
-
-	if (lv_status_byindex_req.lv == NULL)
-		return -EINVAL;
-	if (lv_status_byindex_req.lv_index <0 ||
-		lv_status_byindex_req.lv_index >= MAX_LV)
-		return -EINVAL;
-	if ( ( lv_ptr = vg_ptr->lv[lv_status_byindex_req.lv_index]) == NULL)
-		return -ENXIO;
-
-	/* Save usermode pointers */
-	if (copy_from_user(&saved_ptr1, &lv_status_byindex_req.lv->u.lv_current_pe, sizeof(void*)) != 0)
-	        return -EFAULT;
-	if (copy_from_user(&saved_ptr2, &lv_status_byindex_req.lv->u.lv_block_exception, sizeof(void*)) != 0)
-	        return -EFAULT;
-
-	if (copy_to_user(lv_status_byindex_req.lv, lv_ptr, sizeof(userlv_t)) != 0)
-		return -EFAULT;
-	if (saved_ptr1 != NULL) {
-		if (copy_to_user(saved_ptr1,
-				 lv_ptr->u.lv_current_pe,
-				 lv_ptr->u.lv_allocated_le *
-		       		 sizeof(pe_t)) != 0)
-			return -EFAULT;
-	}
-
-	/* Restore usermode pointers */
-	if (copy_to_user(&lv_status_byindex_req.lv->u.lv_current_pe, &saved_ptr1, sizeof(void *)) != 0)
-	        return -EFAULT;
-
-	return 0;
-} /* lvm_do_lv_status_byindex() */
-
-
-/*
- * character device support function logical volume status by device number
- */
-static int lvm_do_lv_status_bydev(vg_t * vg_ptr, void * arg) {
-	int l;
-	lv_status_bydev_req_t lv_status_bydev_req;
-	void *saved_ptr1;
-	void *saved_ptr2;
-	lv_t *lv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&lv_status_bydev_req, arg,
-			   sizeof(lv_status_bydev_req)) != 0)
-		return -EFAULT;
-
-	for ( l = 0; l < vg_ptr->lv_max; l++) {
-		if ( vg_ptr->lv[l] == NULL) continue;
-		if ( kdev_same(vg_ptr->lv[l]->u.lv_dev,
-			       to_kdev_t(lv_status_bydev_req.dev)))
-			break;
-	}
-
-	if ( l == vg_ptr->lv_max) return -ENXIO;
-	lv_ptr = vg_ptr->lv[l];
-
-	/* Save usermode pointers */
-	if (copy_from_user(&saved_ptr1, &lv_status_bydev_req.lv->u.lv_current_pe, sizeof(void*)) != 0)
-	        return -EFAULT;
-	if (copy_from_user(&saved_ptr2, &lv_status_bydev_req.lv->u.lv_block_exception, sizeof(void*)) != 0)
-	        return -EFAULT;
-
-	if (copy_to_user(lv_status_bydev_req.lv, lv_ptr, sizeof(lv_t)) != 0)
-		return -EFAULT;
-	if (saved_ptr1 != NULL) {
-		if (copy_to_user(saved_ptr1,
-				 lv_ptr->u.lv_current_pe,
-				 lv_ptr->u.lv_allocated_le *
-		       		 sizeof(pe_t)) != 0)
-			return -EFAULT;
-	}
-	/* Restore usermode pointers */
-	if (copy_to_user(&lv_status_bydev_req.lv->u.lv_current_pe, &saved_ptr1, sizeof(void *)) != 0)
-	        return -EFAULT;
-
-	return 0;
-} /* lvm_do_lv_status_bydev() */
-
-
-/*
- * character device support function rename a logical volume
- */
-static int lvm_do_lv_rename(vg_t *vg_ptr, lv_req_t *lv_req, userlv_t *ulv)
-{
-	int l = 0;
-	int ret = 0;
-	lv_t *lv_ptr = NULL;
-
-	for (l = 0; l < vg_ptr->lv_max; l++)
-	{
-		if ( (lv_ptr = vg_ptr->lv[l]) == NULL) continue;
-		if (kdev_same(lv_ptr->u.lv_dev, ulv->lv_dev))
-		{
-			lvm_fs_remove_lv(vg_ptr, lv_ptr);
-			strncpy(lv_ptr->u.lv_name,
-				lv_req->lv_name,
-				NAME_LEN);
-			lvm_fs_create_lv(vg_ptr, lv_ptr);
-			break;
-		}
-	}
-	if (l == vg_ptr->lv_max) ret = -ENODEV;
-
-	return ret;
-} /* lvm_do_lv_rename */
-
-
-/*
- * character device support function physical volume change
- */
-static int lvm_do_pv_change(vg_t *vg_ptr, void *arg)
-{
-	uint p;
-	pv_t *pv_ptr;
-	struct block_device *bd;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&pv_change_req, arg,
-			   sizeof(pv_change_req)) != 0)
-		return -EFAULT;
-
-	for (p = 0; p < vg_ptr->pv_max; p++) {
-		pv_ptr = vg_ptr->pv[p];
-		if (pv_ptr != NULL &&
-		    strcmp(pv_ptr->pv_name,
-			       pv_change_req.pv_name) == 0) {
-
-			bd = pv_ptr->bd;
-			if (copy_from_user(pv_ptr,
-					   pv_change_req.pv,
-					   sizeof(pv_t)) != 0)
-				return -EFAULT;
-			pv_ptr->bd = bd;
-
-			/* We don't need the PE list
-			   in kernel space as with LVs pe_t list */
-			pv_ptr->pe = NULL;
-			return 0;
-		}
-	}
-	return -ENXIO;
-} /* lvm_do_pv_change() */
-
-/*
- * character device support function get physical volume status
- */
-static int lvm_do_pv_status(vg_t *vg_ptr, void *arg)
-{
-	uint p;
-	pv_t *pv_ptr;
-
-	if (vg_ptr == NULL) return -ENXIO;
-	if (copy_from_user(&pv_status_req, arg,
-			   sizeof(pv_status_req)) != 0)
-		return -EFAULT;
-
-	for (p = 0; p < vg_ptr->pv_max; p++) {
-		pv_ptr = vg_ptr->pv[p];
-		if (pv_ptr != NULL &&
-		    strcmp(pv_ptr->pv_name,
-			       pv_status_req.pv_name) == 0) {
-			if (copy_to_user(pv_status_req.pv,
-					 pv_ptr,
-				         sizeof(pv_t)) != 0)
-				return -EFAULT;
-			return 0;
-		}
-	}
-	return -ENXIO;
-} /* lvm_do_pv_status() */
-
-/*
- * character device support function flush and invalidate all buffers of a PV
- */
-static int lvm_do_pv_flush(void *arg)
-{
-       pv_flush_req_t pv_flush_req;
-
-       if (copy_from_user(&pv_flush_req, arg,
-                          sizeof(pv_flush_req)) != 0)
-               return -EFAULT;
-
-       fsync_dev(pv_flush_req.pv_dev);
-       invalidate_buffers(pv_flush_req.pv_dev);
-
-       return 0;
-}
-
-/*
- * support function initialize gendisk variables
- */
-static void __init lvm_geninit(struct gendisk *lvm_gdisk)
-{
-	int i = 0;
-
-#ifdef DEBUG_GENDISK
-	printk(KERN_DEBUG "%s -- lvm_gendisk\n", lvm_name);
-#endif
-
-	for (i = 0; i < MAX_LV; i++) {
-		lvm_gendisk.part[i].start_sect = -1;	/* avoid partition check */
-		lvm_size[i] = lvm_gendisk.part[i].nr_sects = 0;
-		lvm_blocksizes[i] = BLOCK_SIZE;
-	}
-
-	blk_size[MAJOR_NR] = lvm_size;
-	blksize_size[MAJOR_NR] = lvm_blocksizes;
-
-	return;
-} /* lvm_gen_init() */
-
-
-
-/* Must have down_write(_pe_lock) when we enqueue buffers */
-static void _queue_io(struct bio *bh, int rw) {
-	if (bh->bi_next) BUG();
-	bh->bi_next = _pe_requests;
-	_pe_requests = bh;
-}
-
-/* Must have down_write(_pe_lock) when we dequeue buffers */
-static struct bio *_dequeue_io(void)
-{
-	struct bio *bh = _pe_requests;
-	_pe_requests = NULL;
-	return bh;
-}
-
-/*
- * We do not need to hold _pe_lock to flush buffers.  bh should be taken from
- * _pe_requests under down_write(_pe_lock), and then _pe_requests can be set
- * NULL and we drop _pe_lock.  Any new buffers defered at this time will be
- * added to a new list, and the old buffers can have their I/O restarted
- * asynchronously.
- *
- * If, for some reason, the same PE is locked again before all of these writes
- * have finished, then these buffers will just be re-queued (i.e. no danger).
- */
-static void _flush_io(struct bio *bh)
-{
-	while (bh) {
-		struct bio *next = bh->bi_next;
-		bh->bi_next = NULL;
-		/* resubmit this buffer head */
-		bh->bi_rw = WRITE; /* needed? */
-		generic_make_request(bh);
-		bh = next;
-	}
-}
-
-/*
- * we must open the pv's before we use them
- */
-static int _open_pv(pv_t *pv) {
-	int err;
-	struct block_device *bd;
-
-	if (!(bd = bdget(kdev_t_to_nr(pv->pv_dev))))
-		return -ENOMEM;
-
-	err = blkdev_get(bd, FMODE_READ|FMODE_WRITE, 0, BDEV_FILE);
-	if (err)
-		return err;
-
-	pv->bd = bd;
-	return 0;
-}
-
-static void _close_pv(pv_t *pv) {
-	if (pv) {
-		struct block_device *bdev = pv->bd;
-		pv->bd = NULL;
-		if (bdev)
-			blkdev_put(bdev, BDEV_FILE);
-	}
-}
-
-static unsigned long _sectors_to_k(unsigned long sect)
-{
-	if(SECTOR_SIZE > 1024) {
-		return sect * (SECTOR_SIZE / 1024);
-	}
-
-	return sect / (1024 / SECTOR_SIZE);
-}
-
-module_init(lvm_init);
-module_exit(lvm_cleanup);
-MODULE_LICENSE("GPL");
diff -Nru a/drivers/md/md.c b/drivers/md/md.c
--- a/drivers/md/md.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/md/md.c	Wed Oct 30 16:44:26 2002
@@ -307,8 +307,6 @@
 		printk(OUT_OF_MEM);
 		return -EINVAL;
 	}
-	rdev->sb = (mdp_super_t *) page_address(rdev->sb_page);
-	clear_page(rdev->sb);
 
 	return 0;
 }
@@ -317,7 +315,7 @@
 {
 	if (rdev->sb_page) {
 		page_cache_release(rdev->sb_page);
-		rdev->sb = NULL;
+		rdev->sb_loaded = 0;
 		rdev->sb_page = NULL;
 		rdev->sb_offset = 0;
 		rdev->size = 0;
@@ -365,10 +363,12 @@
 {
 	sector_t sb_offset;
 
-	if (!rdev->sb) {
+	if (!rdev->sb_page) {
 		MD_BUG();
 		return -EINVAL;
 	}
+	if (rdev->sb_loaded)
+		return 0;
 
 	/*
 	 * Calculate the position of the superblock,
@@ -381,8 +381,7 @@
 
 	if (!sync_page_io(rdev->bdev, sb_offset<<1, MD_SB_BYTES, rdev->sb_page, READ))
 		goto fail;
-
-	printk(KERN_INFO " [events: %08lx]\n", (unsigned long)rdev->sb->events_lo);
+	rdev->sb_loaded = 1;
 	return 0;
 
 fail:
@@ -390,6 +389,56 @@
 	return -EINVAL;
 }
 
+static int uuid_equal(mdp_super_t *sb1, mdp_super_t *sb2)
+{
+	if (	(sb1->set_uuid0 == sb2->set_uuid0) &&
+		(sb1->set_uuid1 == sb2->set_uuid1) &&
+		(sb1->set_uuid2 == sb2->set_uuid2) &&
+		(sb1->set_uuid3 == sb2->set_uuid3))
+
+		return 1;
+
+	return 0;
+}
+
+
+static int sb_equal(mdp_super_t *sb1, mdp_super_t *sb2)
+{
+	int ret;
+	mdp_super_t *tmp1, *tmp2;
+
+	tmp1 = kmalloc(sizeof(*tmp1),GFP_KERNEL);
+	tmp2 = kmalloc(sizeof(*tmp2),GFP_KERNEL);
+
+	if (!tmp1 || !tmp2) {
+		ret = 0;
+		printk(KERN_INFO "md.c: sb1 is not equal to sb2!\n");
+		goto abort;
+	}
+
+	*tmp1 = *sb1;
+	*tmp2 = *sb2;
+
+	/*
+	 * nr_disks is not constant
+	 */
+	tmp1->nr_disks = 0;
+	tmp2->nr_disks = 0;
+
+	if (memcmp(tmp1, tmp2, MD_SB_GENERIC_CONSTANT_WORDS * 4))
+		ret = 0;
+	else
+		ret = 1;
+
+abort:
+	if (tmp1)
+		kfree(tmp1);
+	if (tmp2)
+		kfree(tmp2);
+
+	return ret;
+}
+
 static unsigned int calc_sb_csum(mdp_super_t * sb)
 {
 	unsigned int disk_csum, csum;
@@ -402,39 +451,284 @@
 }
 
 /*
- * Check one RAID superblock for generic plausibility
+ * Handle superblock details.
+ * We want to be able to handle multiple superblock formats
+ * so we have a common interface to them all, and an array of
+ * different handlers.
+ * We rely on user-space to write the initial superblock, and support
+ * reading and updating of superblocks.
+ * Interface methods are:
+ *   int load_super(mdk_rdev_t *dev, mdk_rdev_t *refdev)
+ *      loads and validates a superblock on dev.
+ *      if refdev != NULL, compare superblocks on both devices
+ *    Return:
+ *      0 - dev has a superblock that is compatible with refdev
+ *      1 - dev has a superblock that is compatible and newer than refdev
+ *          so dev should be used as the refdev in future
+ *     -EINVAL superblock incompatible or invalid
+ *     -othererror e.g. -EIO
+ *
+ *   int validate_super(mddev_t *mddev, mdk_rdev_t *dev)
+ *      Verify that dev is acceptable into mddev.
+ *       The first time, mddev->raid_disks will be 0, and data from
+ *       dev should be merged in.  Subsequent calls check that dev
+ *       is new enough.  Return 0 or -EINVAL
+ *
+ *   void sync_super(mddev_t *mddev, mdk_rdev_t *dev)
+ *     Update the superblock for rdev with data in mddev
+ *     This does not write to disc.
+ *
  */
 
-static int check_disk_sb(mdk_rdev_t * rdev)
+struct super_type  {
+	char 		*name;
+	struct module	*owner;
+	int		(*load_super)(mdk_rdev_t *rdev, mdk_rdev_t *refdev);
+	int		(*validate_super)(mddev_t *mddev, mdk_rdev_t *rdev);
+	void		(*sync_super)(mddev_t *mddev, mdk_rdev_t *rdev);
+};
+
+/*
+ * load_super for 0.90.0 
+ */
+static int super_90_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev)
 {
 	mdp_super_t *sb;
-	int ret = -EINVAL;
+	int ret;
 
-	sb = rdev->sb;
-	if (!sb) {
-		MD_BUG();
-		goto abort;
-	}
+	ret = read_disk_sb(rdev);
+	if (ret) return ret;
+
+	ret = -EINVAL;
+
+	sb = (mdp_super_t*)page_address(rdev->sb_page);
 
 	if (sb->md_magic != MD_SB_MAGIC) {
 		printk(BAD_MAGIC, bdev_partition_name(rdev->bdev));
 		goto abort;
 	}
 
+	if (sb->major_version != 0 ||
+	    sb->minor_version != 90) {
+		printk(KERN_WARNING "Bad version number %d.%d on %s\n",
+		       sb->major_version, sb->minor_version,
+		       bdev_partition_name(rdev->bdev));
+		goto abort;
+	}
+
 	if (sb->md_minor >= MAX_MD_DEVS) {
 		printk(BAD_MINOR, bdev_partition_name(rdev->bdev), sb->md_minor);
 		goto abort;
 	}
+	if (sb->raid_disks <= 0)
+		goto abort;
 
 	if (calc_sb_csum(sb) != sb->sb_csum) {
 		printk(BAD_CSUM, bdev_partition_name(rdev->bdev));
 		goto abort;
 	}
-	ret = 0;
-abort:
+
+	rdev->preferred_minor = sb->md_minor;
+
+	if (refdev == 0)
+		ret = 1;
+	else {
+		__u64 ev1, ev2;
+		mdp_super_t *refsb = (mdp_super_t*)page_address(refdev->sb_page);
+		if (!uuid_equal(refsb, sb)) {
+			printk(KERN_WARNING "md: %s has different UUID to %s\n",
+			       bdev_partition_name(rdev->bdev),
+			       bdev_partition_name(refdev->bdev));
+			goto abort;
+		}
+		if (!sb_equal(refsb, sb)) {
+			printk(KERN_WARNING "md: %s has same UUID but different superblock to %s\n",
+			       bdev_partition_name(rdev->bdev),
+			       bdev_partition_name(refdev->bdev));
+			goto abort;
+		}
+		ev1 = md_event(sb);
+		ev2 = md_event(refsb);
+		if (ev1 > ev2)
+			ret = 1;
+		else 
+			ret = 0;
+	}
+
+
+ abort:
 	return ret;
 }
 
+/*
+ * validate_super for 0.90.0
+ */
+static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
+{
+	mdp_disk_t *desc;
+	mdp_super_t *sb = (mdp_super_t *)page_address(rdev->sb_page);
+
+	if (mddev->raid_disks == 0) {
+		mddev->major_version = sb->major_version;
+		mddev->minor_version = sb->minor_version;
+		mddev->patch_version = sb->patch_version;
+		mddev->persistent = ! sb->not_persistent;
+		mddev->chunk_size = sb->chunk_size;
+		mddev->ctime = sb->ctime;
+		mddev->utime = sb->utime;
+		mddev->level = sb->level;
+		mddev->layout = sb->layout;
+		mddev->raid_disks = sb->raid_disks;
+		mddev->state = sb->state;
+		mddev->size = sb->size;
+		mddev->events = md_event(sb);
+	
+		memcpy(mddev->uuid+0, &sb->set_uuid0, 4);
+		memcpy(mddev->uuid+4, &sb->set_uuid1, 4);
+		memcpy(mddev->uuid+8, &sb->set_uuid2, 4);
+		memcpy(mddev->uuid+12,&sb->set_uuid3, 4);
+
+		mddev->max_disks = MD_SB_DISKS;
+	} else {
+		__u64 ev1;
+		ev1 = md_event(sb);
+		++ev1;
+		if (ev1 < mddev->events) 
+			return -EINVAL;
+	}
+	if (mddev->level != LEVEL_MULTIPATH) {
+		rdev->desc_nr = sb->this_disk.number;
+		rdev->raid_disk = -1;
+		rdev->in_sync = rdev->faulty = 0;
+		desc = sb->disks + rdev->desc_nr;
+
+		if (desc->state & (1<<MD_DISK_FAULTY))
+			rdev->faulty = 1;
+		else if (desc->state & (1<<MD_DISK_SYNC) &&
+			 desc->raid_disk < mddev->raid_disks) {
+			rdev->in_sync = 1;
+			rdev->raid_disk = desc->raid_disk;
+		}
+	}
+	return 0;
+}
+
+/*
+ * sync_super for 0.90.0
+ */
+static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
+{
+	mdp_super_t *sb;
+	struct list_head *tmp;
+	mdk_rdev_t *rdev2;
+	int next_spare = mddev->raid_disks;
+
+	/* make rdev->sb match mddev data..
+	 *
+	 * 1/ zero out disks
+	 * 2/ Add info for each disk, keeping track of highest desc_nr
+	 * 3/ any empty disks < highest become removed
+	 *
+	 * disks[0] gets initialised to REMOVED because
+	 * we cannot be sure from other fields if it has
+	 * been initialised or not.
+	 */
+	int highest = 0;
+	int i;
+	int active=0, working=0,failed=0,spare=0,nr_disks=0;
+
+	sb = (mdp_super_t*)page_address(rdev->sb_page);
+
+	memset(sb, 0, sizeof(*sb));
+
+	sb->md_magic = MD_SB_MAGIC;
+	sb->major_version = mddev->major_version;
+	sb->minor_version = mddev->minor_version;
+	sb->patch_version = mddev->patch_version;
+	sb->gvalid_words  = 0; /* ignored */
+	memcpy(&sb->set_uuid0, mddev->uuid+0, 4);
+	memcpy(&sb->set_uuid1, mddev->uuid+4, 4);
+	memcpy(&sb->set_uuid2, mddev->uuid+8, 4);
+	memcpy(&sb->set_uuid3, mddev->uuid+12,4);
+
+	sb->ctime = mddev->ctime;
+	sb->level = mddev->level;
+	sb->size  = mddev->size;
+	sb->raid_disks = mddev->raid_disks;
+	sb->md_minor = mddev->__minor;
+	sb->not_persistent = !mddev->persistent;
+	sb->utime = mddev->utime;
+	sb->state = mddev->state;
+	sb->events_hi = (mddev->events>>32);
+	sb->events_lo = (u32)mddev->events;
+
+	sb->layout = mddev->layout;
+	sb->chunk_size = mddev->chunk_size;
+
+	sb->disks[0].state = (1<<MD_DISK_REMOVED);
+	ITERATE_RDEV(mddev,rdev2,tmp) {
+		mdp_disk_t *d;
+		if (rdev2->raid_disk >= 0)
+			rdev2->desc_nr = rdev2->raid_disk;
+		else
+			rdev2->desc_nr = next_spare++;
+		d = &sb->disks[rdev2->desc_nr];
+		nr_disks++;
+		d->number = rdev2->desc_nr;
+		d->major = MAJOR(rdev2->bdev->bd_dev);
+		d->minor = MINOR(rdev2->bdev->bd_dev);
+		if (rdev2->raid_disk >= 0)
+			d->raid_disk = rdev2->raid_disk;
+		else
+			d->raid_disk = rdev2->desc_nr; /* compatability */
+		if (rdev2->faulty) {
+			d->state = (1<<MD_DISK_FAULTY);
+			failed++;
+		} else if (rdev2->in_sync) {
+			d->state = (1<<MD_DISK_ACTIVE);
+			d->state |= (1<<MD_DISK_SYNC);
+			active++;
+			working++;
+		} else {
+			d->state = 0;
+			spare++;
+			working++;
+		}
+		if (rdev2->desc_nr > highest)
+			highest = rdev2->desc_nr;
+	}
+	
+	/* now set the "removed" bit on any non-trailing holes */
+	for (i=0; i<highest; i++) {
+		mdp_disk_t *d = &sb->disks[i];
+		if (d->state == 0 && d->number == 0) {
+			d->number = i;
+			d->raid_disk = i;
+			d->state = (1<<MD_DISK_REMOVED);
+		}
+	}
+	sb->nr_disks = nr_disks;
+	sb->active_disks = active;
+	sb->working_disks = working;
+	sb->failed_disks = failed;
+	sb->spare_disks = spare;
+
+	sb->this_disk = sb->disks[rdev->desc_nr];
+	sb->sb_csum = calc_sb_csum(sb);
+}
+
+struct super_type super_types[] = {
+	[0] = {
+		.name	= "0.90.0",
+		.owner	= THIS_MODULE,
+		.load_super	= super_90_load,
+		.validate_super	= super_90_validate,
+		.sync_super	= super_90_sync,
+	},
+};
+
+
+	
 static mdk_rdev_t * match_dev_unit(mddev_t *mddev, mdk_rdev_t *dev)
 {
 	struct list_head *tmp;
@@ -618,9 +912,9 @@
 	printk(KERN_INFO "md: rdev %s, SZ:%08llu F:%d S:%d DN:%d ",
 		bdev_partition_name(rdev->bdev),
 		(unsigned long long)rdev->size, rdev->faulty, rdev->in_sync, rdev->desc_nr);
-	if (rdev->sb) {
+	if (rdev->sb_loaded) {
 		printk(KERN_INFO "md: rdev superblock:\n");
-		print_sb(rdev->sb);
+		print_sb((mdp_super_t*)page_address(rdev->sb_page));
 	} else
 		printk(KERN_INFO "md: no rdev superblock!\n");
 }
@@ -648,61 +942,13 @@
 	printk("\n");
 }
 
-static int sb_equal(mdp_super_t *sb1, mdp_super_t *sb2)
-{
-	int ret;
-	mdp_super_t *tmp1, *tmp2;
-
-	tmp1 = kmalloc(sizeof(*tmp1),GFP_KERNEL);
-	tmp2 = kmalloc(sizeof(*tmp2),GFP_KERNEL);
-
-	if (!tmp1 || !tmp2) {
-		ret = 0;
-		printk(KERN_INFO "md.c: sb1 is not equal to sb2!\n");
-		goto abort;
-	}
-
-	*tmp1 = *sb1;
-	*tmp2 = *sb2;
-
-	/*
-	 * nr_disks is not constant
-	 */
-	tmp1->nr_disks = 0;
-	tmp2->nr_disks = 0;
-
-	if (memcmp(tmp1, tmp2, MD_SB_GENERIC_CONSTANT_WORDS * 4))
-		ret = 0;
-	else
-		ret = 1;
-
-abort:
-	if (tmp1)
-		kfree(tmp1);
-	if (tmp2)
-		kfree(tmp2);
-
-	return ret;
-}
-
-static int uuid_equal(mdk_rdev_t *rdev1, mdk_rdev_t *rdev2)
-{
-	if (	(rdev1->sb->set_uuid0 == rdev2->sb->set_uuid0) &&
-		(rdev1->sb->set_uuid1 == rdev2->sb->set_uuid1) &&
-		(rdev1->sb->set_uuid2 == rdev2->sb->set_uuid2) &&
-		(rdev1->sb->set_uuid3 == rdev2->sb->set_uuid3))
-
-		return 1;
-
-	return 0;
-}
 
 static int write_disk_sb(mdk_rdev_t * rdev)
 {
 	sector_t sb_offset;
 	sector_t size;
 
-	if (!rdev->sb) {
+	if (!rdev->sb_loaded) {
 		MD_BUG();
 		return 1;
 	}
@@ -710,10 +956,6 @@
 		MD_BUG();
 		return 1;
 	}
-	if (rdev->sb->md_magic != MD_SB_MAGIC) {
-		MD_BUG();
-		return 1;
-	}
 
 	sb_offset = calc_dev_sboffset(rdev->bdev);
 	if (rdev->sb_offset != sb_offset) {
@@ -751,116 +993,10 @@
 static void sync_sbs(mddev_t * mddev)
 {
 	mdk_rdev_t *rdev;
-	mdp_super_t *sb;
 	struct list_head *tmp;
-	int next_spare = mddev->raid_disks;
-
-	/* make all rdev->sb match mddev data..
-	 * we setup the data in the first rdev and copy it
-	 * to the others.
-	 *
-	 * 1/ zero out disks
-	 * 2/ Add info for each disk, keeping track of highest desc_nr
-	 * 3/ any empty disks < highest become removed
-	 *
-	 * disks[0] gets initialised to REMOVED because
-	 * we cannot be sure from other fields if it has
-	 * been initialised or not.
-	 */
-	int highest = 0;
-	int i;
-	int active=0, working=0,failed=0,spare=0,nr_disks=0;
-
-	if (list_empty(&mddev->disks)) {
-		MD_BUG();
-		return;
-	}
-	rdev = list_entry(mddev->disks.next, mdk_rdev_t, same_set);
-	sb = rdev->sb;
-
-	memset(sb, 0, sizeof(*sb));
-
-	sb->md_magic = MD_SB_MAGIC;
-	sb->major_version = mddev->major_version;
-	sb->minor_version = mddev->minor_version;
-	sb->patch_version = mddev->patch_version;
-	sb->gvalid_words  = 0; /* ignored */
-	memcpy(&sb->set_uuid0, mddev->uuid+0, 4);
-	memcpy(&sb->set_uuid1, mddev->uuid+4, 4);
-	memcpy(&sb->set_uuid2, mddev->uuid+8, 4);
-	memcpy(&sb->set_uuid3, mddev->uuid+12,4);
-
-	sb->ctime = mddev->ctime;
-	sb->level = mddev->level;
-	sb->size  = mddev->size;
-	sb->raid_disks = mddev->raid_disks;
-	sb->md_minor = mddev->__minor;
-	sb->not_persistent = !mddev->persistent;
-	sb->utime = mddev->utime;
-	sb->state = mddev->state;
-	sb->events_hi = (mddev->events>>32);
-	sb->events_lo = (u32)mddev->events;
 
-	sb->layout = mddev->layout;
-	sb->chunk_size = mddev->chunk_size;
-
-	sb->disks[0].state = (1<<MD_DISK_REMOVED);
-	ITERATE_RDEV(mddev,rdev,tmp) {
-		mdp_disk_t *d;
-		if (rdev->raid_disk >= 0)
-			rdev->desc_nr = rdev->raid_disk;
-		else
-			rdev->desc_nr = next_spare++;
-		d = &sb->disks[rdev->desc_nr];
-		nr_disks++;
-		d->number = rdev->desc_nr;
-		d->major = MAJOR(rdev->bdev->bd_dev);
-		d->minor = MINOR(rdev->bdev->bd_dev);
-		if (rdev->raid_disk >= 0)
-			d->raid_disk = rdev->raid_disk;
-		else
-			d->raid_disk = rdev->desc_nr; /* compatability */
-		if (rdev->faulty) {
-			d->state = (1<<MD_DISK_FAULTY);
-			failed++;
-		} else if (rdev->in_sync) {
-			d->state = (1<<MD_DISK_ACTIVE);
-			d->state |= (1<<MD_DISK_SYNC);
-			active++;
-			working++;
-		} else {
-			d->state = 0;
-			spare++;
-			working++;
-		}
-		if (rdev->desc_nr > highest)
-			highest = rdev->desc_nr;
-	}
-	
-	/* now set the "removed" bit on any non-trailing holes */
-	for (i=0; i<highest; i++) {
-		mdp_disk_t *d = &sb->disks[i];
-		if (d->state == 0 && d->number == 0) {
-			d->number = i;
-			d->raid_disk = i;
-			d->state = (1<<MD_DISK_REMOVED);
-		}
-	}
-	sb->nr_disks = nr_disks;
-	sb->active_disks = active;
-	sb->working_disks = working;
-	sb->failed_disks = failed;
-	sb->spare_disks = spare;
-
-	ITERATE_RDEV(mddev,rdev,tmp) {
-		mdp_super_t *this_sb;
-		
-		this_sb = rdev->sb;
-		if (this_sb != sb)
-			*this_sb = *sb;
-		this_sb->this_disk = this_sb->disks[rdev->desc_nr];
-		this_sb->sb_csum = calc_sb_csum(this_sb);
-	}
+	ITERATE_RDEV(mddev,rdev,tmp)
+		super_90_sync(mddev, rdev);
 }
 
 static void md_update_sb(mddev_t * mddev)
@@ -903,8 +1039,6 @@
 
 		printk("%s ", bdev_partition_name(rdev->bdev));
 		if (!rdev->faulty) {
-			printk("[events: %08lx]",
-				(unsigned long)rdev->sb->events_lo);
 			err += write_disk_sb(rdev);
 		} else
 			printk(")\n");
@@ -968,13 +1102,14 @@
 	}
 
 	if (on_disk) {
-		if ((err = read_disk_sb(rdev))) {
-			printk(KERN_WARNING "md: could not read %s's sb, not importing!\n",
+		err = super_90_load(rdev, NULL);
+		if (err == -EINVAL) {
+			printk(KERN_WARNING "md: %s has invalid sb, not importing!\n",
 			       bdev_partition_name(rdev->bdev));
 			goto abort_free;
 		}
-		if ((err = check_disk_sb(rdev))) {
-			printk(KERN_WARNING "md: %s has invalid sb, not importing!\n",
+		if (err < 0) {
+			printk(KERN_WARNING "md: could not read %s's sb, not importing!\n",
 			       bdev_partition_name(rdev->bdev));
 			goto abort_free;
 		}
@@ -984,7 +1119,7 @@
 	return rdev;
 
 abort_free:
-	if (rdev->sb) {
+	if (rdev->sb_page) {
 		if (rdev->bdev)
 			unlock_rdev(rdev);
 		free_disk_sb(rdev);
@@ -1014,155 +1149,39 @@
 
 static int analyze_sbs(mddev_t * mddev)
 {
-	int out_of_date = 0, i;
+	int i;
 	struct list_head *tmp;
 	mdk_rdev_t *rdev, *freshest;
-	mdp_super_t *sb;
-
-	/*
-	 * Verify the RAID superblock on each real device
-	 */
-	ITERATE_RDEV(mddev,rdev,tmp) {
-		if (rdev->faulty) {
-			MD_BUG();
-			goto abort;
-		}
-		if (!rdev->sb) {
-			MD_BUG();
-			goto abort;
-		}
-		if (check_disk_sb(rdev))
-			goto abort;
-	}
 
-	/*
-	 * The superblock constant part has to be the same
-	 * for all disks in the array.
-	 */
-	sb = NULL;
-
-	ITERATE_RDEV(mddev,rdev,tmp) {
-		if (!sb) {
-			sb = rdev->sb;
-			continue;
-		}
-		if (!sb_equal(sb, rdev->sb)) {
+	freshest = NULL;
+	ITERATE_RDEV(mddev,rdev,tmp)
+		switch (super_90_load(rdev, freshest)) {
+		case 1:
+			freshest = rdev;
+			break;
+		case 0:
+			break;
+		default:
 			printk(INCONSISTENT, bdev_partition_name(rdev->bdev));
 			kick_rdev_from_array(rdev);
-			continue;
 		}
-	}
 
-	/*
-	 * OK, we have all disks and the array is ready to run. Let's
-	 * find the freshest superblock, that one will be the superblock
-	 * that represents the whole array.
-	 */
-	freshest = NULL;
 
-	ITERATE_RDEV(mddev,rdev,tmp) {
-		__u64 ev1, ev2;
-		/*
-		 * if the checksum is invalid, use the superblock
-		 * only as a last resort. (decrease it's age by
-		 * one event)
-		 */
-		if (calc_sb_csum(rdev->sb) != rdev->sb->sb_csum) {
-			if (rdev->sb->events_lo || rdev->sb->events_hi)
-				if (!(rdev->sb->events_lo--))
-					rdev->sb->events_hi--;
-		}
+	super_90_validate(mddev, freshest);
 
-		printk(KERN_INFO "md: %s's event counter: %08lx\n",
-		       bdev_partition_name(rdev->bdev),
-			(unsigned long)rdev->sb->events_lo);
-		if (!freshest) {
-			freshest = rdev;
-			continue;
-		}
-		/*
-		 * Find the newest superblock version
-		 */
-		ev1 = md_event(rdev->sb);
-		ev2 = md_event(freshest->sb);
-		if (ev1 != ev2) {
-			out_of_date = 1;
-			if (ev1 > ev2)
-				freshest = rdev;
-		}
-	}
-	if (out_of_date) {
-		printk(OUT_OF_DATE);
-		printk(KERN_INFO "md: freshest: %s\n", bdev_partition_name(freshest->bdev));
-	}
-
-	sb = freshest->sb;
-
-	mddev->major_version = sb->major_version;
-	mddev->minor_version = sb->minor_version;
-	mddev->patch_version = sb->patch_version;
-	mddev->persistent = ! sb->not_persistent;
-	mddev->chunk_size = sb->chunk_size;
-	mddev->ctime = sb->ctime;
-	mddev->utime = sb->utime;
-	mddev->level = sb->level;
-	mddev->layout = sb->layout;
-	mddev->raid_disks = sb->raid_disks;
-	mddev->state = sb->state;
-	mddev->size = sb->size;
-	mddev->events = md_event(sb);
-	
-	memcpy(mddev->uuid+0, &sb->set_uuid0, 4);
-	memcpy(mddev->uuid+4, &sb->set_uuid1, 4);
-	memcpy(mddev->uuid+8, &sb->set_uuid2, 4);
-	memcpy(mddev->uuid+12,&sb->set_uuid3, 4);
-
-	/*
-	 * at this point we have picked the 'best' superblock
-	 * from all available superblocks.
-	 * now we validate this superblock and kick out possibly
-	 * failed disks.
-	 */
-	ITERATE_RDEV(mddev,rdev,tmp) {
-		/*
-		 * Kick all non-fresh devices
-		 */
-		__u64 ev1;
-		ev1 = md_event(rdev->sb);
-		++ev1;
-		if (ev1 < mddev->events) {
-			printk(KERN_WARNING "md: kicking non-fresh %s from array!\n",
-						bdev_partition_name(rdev->bdev));
-			kick_rdev_from_array(rdev);
-			continue;
-		}
-	}
-
-	/* set rdev->desc_nr for each device.
-	 * for MULTIPATH, we just us sequential number as
-	 * nothing else is meaningful
-	 */
 	i = 0;
 	ITERATE_RDEV(mddev,rdev,tmp) {
+		if (rdev != freshest)
+			if (super_90_validate(mddev, rdev)) {
+				printk(KERN_WARNING "md: kicking non-fresh %s from array!\n",
+				       bdev_partition_name(rdev->bdev));
+				kick_rdev_from_array(rdev);
+				continue;
+			}
 		if (mddev->level == LEVEL_MULTIPATH) {
 			rdev->desc_nr = i++;
 			rdev->raid_disk = rdev->desc_nr;
 			rdev->in_sync = 1;
-		} else {
-			mdp_disk_t *desc;
-			rdev->desc_nr = rdev->sb->this_disk.number;
-			desc = sb->disks + rdev->desc_nr;
-			rdev->raid_disk = -1;
-			rdev->in_sync = rdev->faulty = 0;
-
-			if (desc->state & (1<<MD_DISK_FAULTY)) {
-				rdev->faulty = 1;
-				kick_rdev_from_array(rdev);
-			} else if (desc->state & (1<<MD_DISK_SYNC) &&
-				   desc->raid_disk < mddev->raid_disks) {
-				rdev->in_sync = 1;
-				rdev->raid_disk = desc->raid_disk;
-			}
 		}
 	}
 
@@ -1467,6 +1486,7 @@
 
 static int restart_array(mddev_t *mddev)
 {
+	struct gendisk *disk = disks[mdidx(mddev)];
 	int err;
 
 	/*
@@ -1482,7 +1502,7 @@
 			goto out;
 
 		mddev->ro = 0;
-		set_device_ro(mddev_to_kdev(mddev), 0);
+		set_disk_ro(disk, 0);
 
 		printk(KERN_INFO
 			"md: md%d switched to read-write mode.\n", mdidx(mddev));
@@ -1509,7 +1529,7 @@
 static int do_md_stop(mddev_t * mddev, int ro)
 {
 	int err = 0;
-	kdev_t dev = mddev_to_kdev(mddev);
+	struct gendisk *disk = disks[mdidx(mddev)];
 
 	if (atomic_read(&mddev->active)>1) {
 		printk(STILL_IN_USE, mdidx(mddev));
@@ -1525,7 +1545,7 @@
 			mddev->sync_thread = NULL;
 		}
 
-		invalidate_device(dev, 1);
+		invalidate_device(mk_kdev(disk->major, disk->first_minor), 1);
 
 		if (ro) {
 			err  = -ENXIO;
@@ -1534,11 +1554,11 @@
 			mddev->ro = 1;
 		} else {
 			if (mddev->ro)
-				set_device_ro(dev, 0);
+				set_disk_ro(disk, 0);
 			if (mddev->pers->stop(mddev)) {
 				err = -EBUSY;
 				if (mddev->ro)
-					set_device_ro(dev, 1);
+					set_disk_ro(disk, 1);
 				goto out;
 			}
 			if (mddev->ro)
@@ -1556,7 +1576,7 @@
 			md_update_sb(mddev);
 		}
 		if (ro)
-			set_device_ro(dev, 1);
+			set_disk_ro(disk, 1);
 	}
 	/*
 	 * Free resources if final stop
@@ -1578,20 +1598,6 @@
 	return err;
 }
 
-/*
- * We have to safely support old arrays too.
- */
-int detect_old_array(mdp_super_t *sb)
-{
-	if (sb->major_version > 0)
-		return 0;
-	if (sb->minor_version >= 90)
-		return 0;
-
-	return -EINVAL;
-}
-
-
 static void autorun_array(mddev_t *mddev)
 {
 	mdk_rdev_t *rdev;
@@ -1647,25 +1653,18 @@
 
 		printk(KERN_INFO "md: considering %s ...\n", bdev_partition_name(rdev0->bdev));
 		INIT_LIST_HEAD(&candidates);
-		ITERATE_RDEV_PENDING(rdev,tmp) {
-			if (uuid_equal(rdev0, rdev)) {
-				if (!sb_equal(rdev0->sb, rdev->sb)) {
-					printk(KERN_WARNING
-					       "md: %s has same UUID as %s, but superblocks differ ...\n",
-					       bdev_partition_name(rdev->bdev), bdev_partition_name(rdev0->bdev));
-					continue;
-				}
+		ITERATE_RDEV_PENDING(rdev,tmp)
+			if (super_90_load(rdev, rdev0) >= 0) {
 				printk(KERN_INFO "md:  adding %s ...\n", bdev_partition_name(rdev->bdev));
 				list_move(&rdev->same_set, &candidates);
 			}
-		}
 		/*
 		 * now we have a set of devices, with all of them having
 		 * mostly sane superblocks. It's time to allocate the
 		 * mddev.
 		 */
 
-		mddev = mddev_find(rdev0->sb->md_minor);
+		mddev = mddev_find(rdev0->preferred_minor);
 		if (!mddev) {
 			printk(KERN_ERR "md: cannot allocate memory for md drive.\n");
 			break;
@@ -1747,15 +1746,6 @@
 	}
 	list_add(&start_rdev->same_set, &pending_raid_disks);
 
-	sb = start_rdev->sb;
-
-	err = detect_old_array(sb);
-	if (err) {
-		printk(KERN_WARNING "md: array version is too old to be autostarted ,"
-		       "use raidtools 0.90 mkraid --upgrade to upgrade the array "
-		       "without data loss!\n");
-		goto abort;
-	}
 
 	for (i = 0; i < MD_SB_DISKS; i++) {
 		mdp_disk_t *desc;
@@ -1874,8 +1864,6 @@
 		return -EFAULT;
 
 	nr = info.number;
-	if (nr >= MD_SB_DISKS)
-		return -EINVAL;
 
 	rdev = find_rdev_nr(mddev, nr);
 	if (rdev) {
@@ -1917,18 +1905,13 @@
 		if (!list_empty(&mddev->disks)) {
 			mdk_rdev_t *rdev0 = list_entry(mddev->disks.next,
 							mdk_rdev_t, same_set);
-			if (!uuid_equal(rdev0, rdev)) {
+			int err = super_90_load(rdev, NULL);
+			if (err < 0) {
 				printk(KERN_WARNING "md: %s has different UUID to %s\n",
 				       bdev_partition_name(rdev->bdev), bdev_partition_name(rdev0->bdev));
 				export_rdev(rdev);
 				return -EINVAL;
 			}
-			if (!sb_equal(rdev0->sb, rdev->sb)) {
-				printk(KERN_WARNING "md: %s has same UUID but different superblock to %s\n",
-				       bdev_partition_name(rdev->bdev), bdev_partition_name(rdev0->bdev));
-				export_rdev(rdev);
-				return -EINVAL;
-			}
 		}
 		bind_rdev_to_array(rdev, mddev);
 		return 0;
@@ -2079,11 +2062,11 @@
 	rdev->size = size;
 	rdev->sb_offset = calc_dev_sboffset(rdev->bdev);
 
-	for (i = mddev->raid_disks; i < MD_SB_DISKS; i++)
+	for (i = mddev->raid_disks; i < mddev->max_disks; i++)
 		if (find_rdev_nr(mddev,i)==NULL)
 			break;
 
-	if (i == MD_SB_DISKS) {
+	if (i == mddev->max_disks) {
 		printk(KERN_WARNING "md%d: can not hot-add to full array!\n",
 		       mdidx(mddev));
 		err = -EBUSY;
@@ -2767,7 +2750,7 @@
 	idle = 1;
 	ITERATE_RDEV(mddev,rdev,tmp) {
 		struct gendisk *disk = rdev->bdev->bd_disk;
-		curr_events = disk->reads + disk->writes - disk->sync_io;
+		curr_events = disk->read_sectors + disk->write_sectors - disk->sync_io;
 		if ((curr_events - rdev->last_events) > 32) {
 			rdev->last_events = curr_events;
 			idle = 0;
@@ -3286,13 +3269,13 @@
 	return 1;
 }
 
-extern kdev_t name_to_kdev_t(char *line) __init;
+extern dev_t name_to_dev_t(char *line) __init;
 void __init md_setup_drive(void)
 {
 	int minor, i;
-	kdev_t dev;
+	dev_t dev;
 	mddev_t*mddev;
-	kdev_t devices[MD_SB_DISKS+1];
+	dev_t devices[MD_SB_DISKS+1];
 
 	for (minor = 0; minor < MAX_MD_DEVS; minor++) {
 		int err = 0;
@@ -3311,16 +3294,17 @@
 			if (p)
 				*p++ = 0;
 
-			dev = name_to_kdev_t(devname);
-			handle = devfs_get_handle(NULL, devname, major(dev), minor(dev),
-						  DEVFS_SPECIAL_BLK, 1);
+			dev = name_to_dev_t(devname);
+			handle = devfs_get_handle(NULL, devname,
+						MAJOR(dev), MINOR(dev),
+						DEVFS_SPECIAL_BLK, 1);
 			if (handle != 0) {
 				unsigned major, minor;
 				devfs_get_maj_min(handle, &major, &minor);
-				dev = mk_kdev(major, minor);
+				dev = MKDEV(major, minor);
 				devfs_put(handle);
 			}
-			if (kdev_none(dev)) {
+			if (!dev) {
 				printk(KERN_WARNING "md: Unknown device name: %s\n", devname);
 				break;
 			}
@@ -3330,7 +3314,7 @@
 
 			devname = p;
 		}
-		devices[i] = to_kdev_t(0);
+		devices[i] = 0;
 
 		if (!md_setup_args.device_set[minor])
 			continue;
@@ -3374,13 +3358,13 @@
 			err = set_array_info(mddev, &ainfo);
 			for (i = 0; !err && i <= MD_SB_DISKS; i++) {
 				dev = devices[i];
-				if (kdev_none(dev))
+				if (!dev)
 					break;
 				dinfo.number = i;
 				dinfo.raid_disk = i;
 				dinfo.state = (1<<MD_DISK_ACTIVE)|(1<<MD_DISK_SYNC);
-				dinfo.major = major(dev);
-				dinfo.minor = minor(dev);
+				dinfo.major = MAJOR(dev);
+				dinfo.minor = MINOR(dev);
 				mddev->raid_disks++;
 				err = add_new_disk (mddev, &dinfo);
 			}
@@ -3388,10 +3372,10 @@
 			/* persistent */
 			for (i = 0; i <= MD_SB_DISKS; i++) {
 				dev = devices[i];
-				if (kdev_none(dev))
+				if (!dev)
 					break;
-				dinfo.major = major(dev);
-				dinfo.minor = minor(dev);
+				dinfo.major = MAJOR(dev);
+				dinfo.minor = MINOR(dev);
 				add_new_disk (mddev, &dinfo);
 			}
 		}
diff -Nru a/drivers/md/multipath.c b/drivers/md/multipath.c
--- a/drivers/md/multipath.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/md/multipath.c	Wed Oct 30 16:44:28 2002
@@ -59,7 +59,7 @@
 static int multipath_map (mddev_t *mddev, mdk_rdev_t **rdevp)
 {
 	multipath_conf_t *conf = mddev_to_conf(mddev);
-	int i, disks = MD_SB_DISKS;
+	int i, disks = mddev->max_disks;
 
 	/*
 	 * Later we do read balancing on the read side 
@@ -147,7 +147,7 @@
 {
 	int disk;
 
-	for (disk = 0; disk < MD_SB_DISKS; disk++) {
+	for (disk = 0; disk < conf->mddev->max_disks; disk++) {
 		mdk_rdev_t *rdev = conf->multipaths[disk].rdev;
 		if (rdev && rdev->in_sync)
 			return disk;
@@ -259,7 +259,7 @@
 	printk(" --- wd:%d rd:%d\n", conf->working_disks,
 			 conf->raid_disks);
 
-	for (i = 0; i < MD_SB_DISKS; i++) {
+	for (i = 0; i < conf->mddev->max_disks; i++) {
 		tmp = conf->multipaths + i;
 		if (tmp->rdev)
 			printk(" disk%d, o:%d, dev:%s\n",
diff -Nru a/drivers/md/raid0.c b/drivers/md/raid0.c
--- a/drivers/md/raid0.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/md/raid0.c	Wed Oct 30 16:44:29 2002
@@ -168,8 +168,7 @@
  *	@bio: the buffer head that's been built up so far
  *	@biovec: the request that could be merged to it.
  *
- *	Return 1 if the merge is not permitted (because the
- *	result would cross a chunk boundary), 0 otherwise.
+ *	Return amount of bytes we can accept at this offset
  */
 static int raid0_mergeable_bvec(request_queue_t *q, struct bio *bio, struct bio_vec *biovec)
 {
@@ -182,7 +181,7 @@
 	block = bio->bi_sector >> 1;
 	bio_sz = (bio->bi_size + biovec->bv_len) >> 10;
 
-	return chunk_size < ((block & (chunk_size - 1)) + bio_sz);
+	return (chunk_size - ((block & (chunk_size - 1)) + bio_sz)) << 10;
 }
 
 static int raid0_run (mddev_t *mddev)
diff -Nru a/drivers/media/Config.help b/drivers/media/Config.help
--- a/drivers/media/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,15 +0,0 @@
-CONFIG_VIDEO_DEV
-  Support for audio/video capture and overlay devices and FM radio
-  cards. The exact capabilities of each device vary. User tools for
-  this are available from
-  <ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
-
-  If you are interested in writing a driver for such an audio/video
-  device or user software interacting with such a driver, please read
-  the file <file:Documentation/video4linux/API.html>.
-
-  This driver is also available as a module called videodev.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/media/Config.in b/drivers/media/Config.in
--- a/drivers/media/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,13 +0,0 @@
-#
-# Multimedia device configuration
-#
-mainmenu_option next_comment
-comment 'Multimedia devices'
-
-tristate 'Video For Linux' CONFIG_VIDEO_DEV
-if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
-   source drivers/media/video/Config.in
-   source drivers/media/radio/Config.in
-fi
-
-endmenu
diff -Nru a/drivers/media/Kconfig b/drivers/media/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,31 @@
+#
+# Multimedia device configuration
+#
+
+menu "Multimedia devices"
+
+config VIDEO_DEV
+	tristate "Video For Linux"
+	---help---
+	  Support for audio/video capture and overlay devices and FM radio
+	  cards. The exact capabilities of each device vary. User tools for
+	  this are available from
+	  <ftp://ftp.uk.linux.org/pub/linux/video4linux/>.
+
+	  If you are interested in writing a driver for such an audio/video
+	  device or user software interacting with such a driver, please read
+	  the file <file:Documentation/video4linux/API.html>.
+
+	  This driver is also available as a module called videodev.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+source "drivers/media/video/Kconfig"
+
+source "drivers/media/radio/Kconfig"
+
+source "drivers/media/dvb/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/media/Makefile b/drivers/media/Makefile
--- a/drivers/media/Makefile	Wed Oct 30 16:44:33 2002
+++ b/drivers/media/Makefile	Wed Oct 30 16:44:33 2002
@@ -2,6 +2,6 @@
 # Makefile for the kernel multimedia device drivers.
 #
 
-obj-y        := video/ radio/
+obj-y        := video/ radio/ dvb/
 
 include $(TOPDIR)/Rules.make
diff -Nru a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,41 @@
+#
+# Multimedia device configuration
+#
+
+menu "Digital Video Broadcasting Devices"
+	depends on VIDEO_DEV!=n
+
+config DVB
+	bool "DVB For Linux"
+	---help---
+	  Support Digital Video Broadcasting hardware.  Enable this if you 
+	  own a DVB adapter and want to use it or if you compile Linux for 
+	  a digital SetTopBox.
+
+	  API specs and user tools and are available for example from 
+	  <http://www.linuxtv.org/>. 
+
+	  Please report problems regarding this driver to the LinuxDVB 
+	  mailing list.
+
+	  You might want add the following lines to your /etc/modules.conf:
+	  	
+	  	alias char-major-250 dvb
+	  	alias dvb dvb-ttpci
+	  	below dvb-ttpci alps_bsru6 alps_bsrv2 \
+	  			grundig_29504-401 grundig_29504-491 \
+	  			ves1820
+
+	  If unsure say N.
+
+source "drivers/media/dvb/dvb-core/Kconfig"
+
+source "drivers/media/dvb/frontends/Kconfig"
+
+comment "Supported DVB Adapters"
+	depends on DVB
+
+source "drivers/media/dvb/av7110/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/media/dvb/Makefile b/drivers/media/dvb/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/Makefile	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,7 @@
+#
+# Makefile for the kernel multimedia device drivers.
+#
+
+obj-y        := dvb-core/ frontends/ av7110/
+
+include $(TOPDIR)/Rules.make
diff -Nru a/drivers/media/dvb/av7110/Kconfig b/drivers/media/dvb/av7110/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,26 @@
+config DVB_AV7110
+	tristate "SAA7146 based AV7110 and Nova/budget cards"
+	depends on VIDEO_DEV && DVB_CORE
+	help
+	  Support for SAA7146 and AV7110 based DVB cards as produced 
+	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.
+
+	  Simple cards like so called Budget- or Nova-PCI cards are 
+	  supported as well as fullfeatured cards with onboard MPEG2 
+	  decoder.
+
+	  Say Y if you own such a card and want to use it.
+
+config DVB_AV7110_OSD
+	bool "AV7110 OSD support"
+	depends on DVB_AV7110
+	help
+	  The AV7110 firmware provides some code to generate an OnScreenDisplay
+	  on the video output. This is kind of nonstandard and not guaranteed to
+	  be maintained.
+
+	  Anyway, some popular DVB software like VDR uses this OSD to render
+	  its menus, so say Y if you want to use this software.
+
+	  All other people say N.
+
diff -Nru a/drivers/media/dvb/av7110/Makefile b/drivers/media/dvb/av7110/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/Makefile	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,10 @@
+#
+# Makefile for the kernel AV7110 DVB device driver
+#
+
+dvb-ttpci-objs := saa7146_core.o saa7146_v4l.o av7110.o av7110_ir.o
+
+obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
+
+include $(TOPDIR)/Rules.make 
+
diff -Nru a/drivers/media/dvb/av7110/av7110.c b/drivers/media/dvb/av7110/av7110.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/av7110.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,4830 @@
+/*
+ * av7110.c: driver for the SAA7146 based AV110 cards (like the Fujitsu-Siemens DVB)
+ *           and Nova/Budget DVB cards 
+ *
+ * Copyright (C) 1999-2002 Ralph  Metzler 
+ *                       & Marcus Metzler for convergence integrated media GmbH
+ *
+ * originally based on code by:
+ * Copyright (C) 1998,1999 Christian Theiss <mistert@rz.fh-augsburg.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.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ * 
+ *
+ * the project's page is at http://www.linuxtv.org/dvb/
+ */
+
+#define NEW_CI 1
+
+#define __KERNEL_SYSCALLS__
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kmod.h>
+#include <linux/delay.h>
+#include <linux/fs.h>
+#include <linux/timer.h>
+#include <linux/unistd.h>
+#include <linux/byteorder/swabb.h>
+#include <linux/poll.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <stdarg.h>
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+#include <linux/fcntl.h>
+#include <linux/interrupt.h>
+#include <linux/ptrace.h>
+#include <linux/ioport.h>
+#include <linux/in.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/pci.h>
+#include <asm/system.h>
+#include <asm/bitops.h>
+#include <asm/io.h>
+#include <asm/dma.h>
+#include <asm/semaphore.h>
+#include <linux/init.h>
+#include <linux/vmalloc.h>
+
+#include <linux/netdevice.h>
+#include <linux/inetdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+
+#include <linux/dvb/frontend.h>
+
+#include "../dvb-core/dvb_i2c.h"
+#include "../dvb-core/dvb_frontend.h"
+#include "av7110.h"
+
+#include "saa7146_core.h"
+#include "saa7146_v4l.h"
+#include "saa7146_defs.h"
+
+
+static int AV_StartPlay(av7110_t *av7110, int av);
+static void restart_feeds(av7110_t *av7110);
+static int bootarm(av7110_t *av7110);
+static inline int i2c_writereg(av7110_t *av7110, u8 id, u8 reg, u8 val);
+static inline u8 i2c_readreg(av7110_t *av7110, u8 id, u8 reg);
+static int  outcom(av7110_t *av7110, int type, int com, int num, ...);
+static void SetMode(av7110_t *av7110, int mode);
+
+void pes_to_ts(u8 const *buf, long int length, u16 pid, p2t_t *p);
+void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter, dvb_demux_feed_t *feed);
+
+static u32 vidmem	= 0;
+static u32 vidlow	= 0;
+
+static int av7110_debug = 0;
+#define dprintk	if (av7110_debug) printk
+
+static int vidmode=CVBS_RGB_OUT;
+static int init_vpid;
+static int init_apid;
+static int pids_off;
+static int adac=DVB_ADAC_TI;
+
+#define saacomm(x,y) av7110->saa->command(av7110->saa->i2c_bus, (x), (y))
+
+
+/****************************************************************************
+ * General helper functions
+ ****************************************************************************/
+
+static inline void ddelay(int i) 
+{
+        current->state=TASK_INTERRUPTIBLE;
+        schedule_timeout((HZ*i)/100);
+}
+
+
+/****************************************************************************
+ * GPIO and DEBI functions
+ ****************************************************************************/
+
+#define saaread(adr)            saa7146_read(saamem,(adr))
+#define saawrite(dat,adr) 	saa7146_write(saamem,(adr),(dat))
+
+inline static void 
+setgpio(av7110_t *av7110, int port, u32 data)
+{
+        void *saamem=av7110->saa_mem;
+        u32 val;
+
+        val=saaread(GPIO_CTRL);
+        val&=~(0xff << (8*(port)));
+        val|=(data)<<(8*(port));
+        saawrite(val, GPIO_CTRL);
+}
+
+/* This DEBI code is based on the Stradis driver 
+   by Nathan Laredo <laredo@gnu.org> */
+
+static
+int wait_for_debi_done(av7110_t *av7110)
+{
+        void *saamem=av7110->saa_mem;
+	int start;
+
+	/* wait for registers to be programmed */
+	start = jiffies;
+	while (1) {
+                if (saaread(MC2) & 2)
+                        break;
+		if (jiffies-start > HZ/20) {
+			printk ("%s: timed out while waiting for registers "
+				"getting programmed\n", __FUNCTION__);
+			return -ETIMEDOUT;
+		}
+	}
+
+	/* wait for transfer to complete */
+	start = jiffies;
+	while (1) {
+		if (!(saaread(PSR) & SPCI_DEBI_S))
+			break;
+		saaread(MC2);
+		if (jiffies-start > HZ/4) {
+			printk ("%s: timed out while waiting for transfer "
+				"completion\n", __FUNCTION__);
+			return -ETIMEDOUT;
+		}
+	}
+
+	return 0;
+}
+
+static int debiwrite(av7110_t *av7110, u32 config, 
+                     int addr, u32 val, int count)
+{
+        void *saamem=av7110->saa_mem;
+	u32 cmd;
+
+	if (count <= 0 || count > 32764)
+		return -1;
+	if (wait_for_debi_done(av7110) < 0)
+		return -1;
+	saawrite(config, DEBI_CONFIG);
+	if (count <= 4)		/* immediate transfer */
+		saawrite(val, DEBI_AD);
+	else			/* block transfer */
+		saawrite(av7110->debi_bus, DEBI_AD);
+	saawrite((cmd = (count << 17) | (addr & 0xffff)), DEBI_COMMAND);
+	saawrite((2 << 16) | 2, MC2);
+	return 0;
+}
+
+static u32 debiread(av7110_t *av7110, u32 config, int addr, int count)
+{
+        void *saamem=av7110->saa_mem;
+	u32 result = 0;
+
+	if (count > 32764 || count <= 0)
+		return 0;
+	if (wait_for_debi_done(av7110) < 0)
+		return 0;
+	saawrite(av7110->debi_bus, DEBI_AD);
+	saawrite((count << 17) | 0x10000 | (addr & 0xffff),
+		 DEBI_COMMAND);
+
+	saawrite(config, DEBI_CONFIG);
+	saawrite((2 << 16) | 2, MC2);
+	if (count > 4)	
+		return count;
+	wait_for_debi_done(av7110);
+	result = saaread(DEBI_AD);
+        result &= (0xffffffffUL >> ((4-count)*8));
+	return result;
+}
+
+/* DEBI during interrupt */
+
+static inline void 
+iwdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count)
+{
+        if (count>4 && val)
+                memcpy(av7110->debi_virt, (char *) val, count);
+        debiwrite(av7110, config, addr, val, count);
+}
+
+static inline u32 
+irdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count)
+{
+        u32 res;
+
+        res=debiread(av7110, config, addr, count);
+        if (count<=4) 
+                memcpy(av7110->debi_virt, (char *) &res, count);
+        return res;
+}
+
+/* DEBI outside interrupts, only for count<=4! */
+
+static inline void 
+wdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count)
+{
+        unsigned long flags;
+
+        spin_lock_irqsave(&av7110->debilock, flags);
+        debiwrite(av7110, config, addr, val, count);
+        spin_unlock_irqrestore(&av7110->debilock, flags);
+}
+
+static inline u32 
+rdebi(av7110_t *av7110, u32 config, int addr, u32 val, int count)
+{
+        unsigned long flags;
+        u32 res;
+
+        spin_lock_irqsave(&av7110->debilock, flags);
+        res=debiread(av7110, config, addr, count);
+        spin_unlock_irqrestore(&av7110->debilock, flags);
+        return res;
+}
+
+
+static inline char 
+chtrans(char c)
+{
+        if (c<32 || c>126)
+                c=0x20;
+        return c;
+}
+
+
+/* handle mailbox registers of the dual ported RAM */
+
+static inline void 
+ARM_ResetMailBox(av7110_t *av7110)
+{
+        unsigned long flags;
+
+        spin_lock_irqsave(&av7110->debilock, flags);
+        debiread(av7110, DEBINOSWAP, IRQ_RX, 2);
+        //printk("dvb: IRQ_RX=%d\n", debiread(av7110, DEBINOSWAP, IRQ_RX, 2));
+        debiwrite(av7110, DEBINOSWAP, IRQ_RX, 0, 2);
+        spin_unlock_irqrestore(&av7110->debilock, flags);
+}
+
+static inline void 
+ARM_ClearMailBox(av7110_t *av7110)
+{
+        iwdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2);
+}
+
+static inline void 
+ARM_ClearIrq(av7110_t *av7110)
+{
+	irdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2);
+}
+
+static void 
+reset_arm(av7110_t *av7110)
+{
+        setgpio(av7110, RESET_LINE, GPIO_OUTLO);
+
+        /* Disable DEBI and GPIO irq */
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) & ~(MASK_19 | MASK_03));
+        saa7146_write(av7110->saa_mem, ISR, (MASK_19 | MASK_03));
+
+        mdelay(800);
+        setgpio(av7110, RESET_LINE, GPIO_OUTHI);
+        mdelay(800);
+
+        ARM_ResetMailBox(av7110); 
+
+        saa7146_write(av7110->saa_mem, ISR, (MASK_19 | MASK_03));
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) | MASK_03 );
+
+        av7110->arm_ready=1;
+        printk("av7110: ARM RESET\n");
+}
+
+static void 
+recover_arm(av7110_t *av7110)
+{
+        if (current->files)
+                bootarm(av7110);
+        else {
+                printk("OOPS, no current->files\n");
+                reset_arm(av7110);
+        }
+        ddelay(10); 
+        restart_feeds(av7110);
+}
+
+static void 
+arm_error(av7110_t *av7110)
+{
+        av7110->arm_errors++;
+        av7110->arm_ready=0;
+        recover_arm(av7110);
+}
+
+static int arm_thread(void *data)
+{
+	av7110_t *av7110 = data;
+        u16 newloops;
+    
+	lock_kernel();
+#if 0
+	daemonize();
+#else
+        exit_mm(current);
+        current->session=current->pgrp=1;
+#endif
+	sigfillset(&current->blocked);
+	strcpy(current->comm, "arm_mon");
+	av7110->arm_thread = current;
+	unlock_kernel();
+
+	while (!av7110->arm_rmmod && !signal_pending(current)) {
+                interruptible_sleep_on_timeout(&av7110->arm_wait, 5*HZ);
+
+                if (!av7110->arm_ready)
+                        continue;
+
+                if (down_interruptible(&av7110->dcomlock))
+                        break;
+
+                newloops=rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2);
+                up(&av7110->dcomlock);
+
+                if (newloops==av7110->arm_loops) {
+                        printk("av7110%d: ARM crashed!\n",
+				av7110->saa->dvb_adapter->num);
+
+			arm_error(av7110);
+
+                        if (down_interruptible(&av7110->dcomlock))
+                                break;
+
+                        newloops=rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2)-1;
+                        up(&av7110->dcomlock);
+                }
+                av7110->arm_loops=newloops;
+	}
+
+	av7110->arm_thread = NULL;
+	return 0;
+}
+
+
+static int
+record_cb(pes2ts_t *p2t, u8 *buf, size_t len)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) p2t->priv;
+
+        if (!(dvbdmxfeed->ts_type & TS_PACKET)) 
+                return 0;
+	if (buf[3]==0xe0)        // video PES do not have a length in TS
+                buf[4]=buf[5]=0;
+        if (dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY) 
+                return dvbdmxfeed->cb.ts(buf, len, 0, 0, 
+                                         &dvbdmxfeed->feed.ts, DMX_OK); 
+        else
+                return pes2ts(p2t, buf, len);
+}
+
+static int 
+pes2ts_cb(void *priv, unsigned char *data)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) priv;
+        
+        dvbdmxfeed->cb.ts(data, 188, 0, 0,
+                          &dvbdmxfeed->feed.ts,
+                          DMX_OK); 
+        return 0;
+}
+
+static int 
+AV_StartRecord(av7110_t *av7110, int av,
+               dvb_demux_feed_t *dvbdmxfeed)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+  
+        if (av7110->playing||(av7110->rec_mode&av))
+                return -EBUSY;
+        outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+        dvbdmx->recording=1;
+        av7110->rec_mode|=av;
+
+        switch (av7110->rec_mode) {
+        case RP_AUDIO:
+                pes2ts_init(&av7110->p2t[0], dvbdmx->pesfilter[0]->pid,
+                            pes2ts_cb, (void *)dvbdmx->pesfilter[0]);
+                outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);
+                break;
+        case RP_VIDEO:
+                pes2ts_init(&av7110->p2t[1], dvbdmx->pesfilter[1]->pid,
+                            pes2ts_cb, (void *)dvbdmx->pesfilter[1]);
+                outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);
+                break;
+        case RP_AV:
+                pes2ts_init(&av7110->p2t[0], dvbdmx->pesfilter[0]->pid,
+                            pes2ts_cb, (void *)dvbdmx->pesfilter[0]);
+                pes2ts_init(&av7110->p2t[1], dvbdmx->pesfilter[1]->pid,
+                            pes2ts_cb, (void *)dvbdmx->pesfilter[1]);
+                outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0);
+                break;
+        }
+        return 0;
+}
+
+static int 
+AV_StartPlay(av7110_t *av7110, int av)
+{
+        if (av7110->rec_mode)
+                return -EBUSY;
+        if (av7110->playing&av)
+                return -EBUSY;
+
+        outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+
+        if (av7110->playing == RP_NONE) {
+                reset_ipack(&av7110->ipack[0]);
+                reset_ipack(&av7110->ipack[1]);
+        }
+
+        av7110->playing|=av;
+        switch (av7110->playing) {
+        case RP_AUDIO:
+                outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);
+                break;
+        case RP_VIDEO:
+                outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);
+                av7110->sinfo=0;
+                break;
+        case RP_AV:
+                av7110->sinfo=0;
+                outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, AV_PES, 0);
+                break;
+        }
+        return av7110->playing;
+}
+
+static void 
+AV_Stop(av7110_t *av7110, int av)
+{
+        if (!(av7110->playing&av) && !(av7110->rec_mode&av))
+                return;
+
+        outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+        if (av7110->playing) {
+                av7110->playing&=~av;
+                switch (av7110->playing) {
+                case RP_AUDIO:
+                        outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);
+                        break;
+                case RP_VIDEO:
+                        outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);
+                        break;
+                case RP_NONE:
+                        SetMode(av7110, av7110->vidmode);
+                        break;
+                }
+        } else {
+                av7110->rec_mode&=~av;
+                switch (av7110->rec_mode) {
+                case RP_AUDIO:
+                        outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);
+                        break;
+                case RP_VIDEO:
+                        outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);
+                        break;
+                case RP_NONE:
+                        break;
+                }
+        }
+}
+
+/****************************************************************************
+ * Buffer handling
+ ****************************************************************************/
+
+static inline void 
+ring_buffer_flush(ring_buffer_t *rbuf)
+{
+        spin_lock_irq(&rbuf->lock);
+        rbuf->pwrite=rbuf->pread;
+        spin_unlock_irq(&rbuf->lock);
+        wake_up(&rbuf->queue);
+}
+
+static inline void 
+ring_buffer_init(ring_buffer_t *rbuf, u8 *data, int len)
+{
+        rbuf->pread=rbuf->pwrite=0;
+        rbuf->data=data;
+        rbuf->size=len;
+        init_waitqueue_head(&rbuf->queue);
+        spin_lock_init(&(rbuf->lock));
+        rbuf->lock=SPIN_LOCK_UNLOCKED;
+        sema_init(&(rbuf->sema), 1);
+}
+
+static inline 
+int ring_buffer_empty(ring_buffer_t *rbuf)
+{
+        return (rbuf->pread==rbuf->pwrite);
+}
+
+static inline 
+int ring_buffer_free(ring_buffer_t *rbuf)
+{
+        int free;
+  
+        free=rbuf->pread - rbuf->pwrite;
+        if (free<=0)
+                free+=rbuf->size;
+        return free;
+}
+
+static inline 
+int ring_buffer_avail(ring_buffer_t *rbuf)
+{
+        int avail;
+  
+        avail=rbuf->pwrite - rbuf->pread;
+        if (avail<0)
+                avail+=rbuf->size;
+        return avail;
+}
+
+#if 0
+static void
+ring_buffer_block(ring_buffer_t *rbuf, unsigned long count)
+{
+        if (ring_buffer_free(rbuf)>=count)
+                return;
+        while (!wait_event_interruptible(rbuf->queue,
+                                         (ring_buffer_free(rbuf)>=count)));
+}
+#endif
+
+static long 
+ring_buffer_write(ring_buffer_t *rbuf, 
+              const char *buf, unsigned long count, 
+              int nonblock, int usermem)
+{
+        unsigned long todo = count;
+        int free, split;
+    
+        while (todo > 0) {
+                if (ring_buffer_free(rbuf)<=2048) {
+                        if (nonblock)
+                                return count-todo;
+                        if (wait_event_interruptible(rbuf->queue,
+                                                     (ring_buffer_free(rbuf)>2048)))
+                        	return count-todo;
+                }   
+                dprintk ("function: %s pread=%08x pwrite=%08x\n", __FUNCTION__,
+                        rbuf->pread, rbuf->pwrite);
+                //mdelay(2);
+                free = rbuf->pread - rbuf->pwrite;
+                split=rbuf->size;
+                if (free<=0) {
+                        free+=rbuf->size;
+                        split-=rbuf->pwrite;
+                }
+                if (free > todo)
+                        free = todo;
+                        
+                if (split < free) {
+                        if (!usermem) 
+                                memcpy(rbuf->data+rbuf->pwrite, buf, split);
+                        else
+                                if (copy_from_user(rbuf->data+rbuf->pwrite,
+                                                   buf, split)) 
+                                        return -EFAULT;
+                        buf += split;
+                        todo -= split;
+                        free -= split;
+                        rbuf->pwrite = 0;
+                }
+                if (!usermem) 
+                        memcpy(rbuf->data+rbuf->pwrite, buf, free);
+                else
+                        if (copy_from_user(rbuf->data+rbuf->pwrite, buf, free)) 
+                                return -EFAULT;
+                rbuf->pwrite = (rbuf->pwrite + free)%rbuf->size;
+                todo -= free;
+                buf += free;
+        }
+
+	return count-todo;
+}
+
+#if 0
+static void
+ring_buffer_put(ring_buffer_t *db, u8 *buf, int len)
+{
+        int split, fsize;
+
+        fsize=db->pread - db->pwrite;
+        if (fsize <= 0) {
+                fsize+=db->size;
+                split=db->size-db->pwrite;
+        } else 
+                split=0;
+        if (len>=fsize) {
+                dprintk("buffer overflow\n");
+                return;
+        }
+        if (split>=len)
+                split=0;
+        if (split) {
+                memcpy(db->data + db->pwrite, buf, split);
+                len-=split;
+                db->pwrite=0;
+        }
+        memcpy(db->data + db->pwrite, split + buf, len);
+        db->pwrite=(db->pwrite+len)%db->size;
+}
+#endif
+
+
+/****************************************************************************
+ * TT budget / WinTV Nova
+ ****************************************************************************/
+
+static int 
+TTBStop(av7110_t *av7110)
+{
+        if (--av7110->feeding)
+                return av7110->feeding;
+        saa7146_write(av7110->saa_mem, MC1, MASK_20); // DMA3 off
+        saa7146_write(av7110->saa_mem, MC1, MASK_28); // RPS0 off
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) & ~MASK_10 );
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER)& ~MASK_07);
+        return 0;
+}
+
+#define TS_WIDTH  (4*188)
+#define TS_HEIGHT (1024/4)
+static int
+TTBStart(av7110_t *av7110)
+{
+        struct saa7146 *saa=av7110->saa;
+
+        //printk ("function : %s\n", __FUNCTION__);
+        if (av7110->feeding) 
+                return ++av7110->feeding;
+
+      	saa7146_write(saa->mem, MC1, MASK_20); // DMA3 off
+
+        memset(saa->grabbing, 0x00, TS_HEIGHT*TS_WIDTH);
+
+        saa7146_write(saa->mem, PCI_BT_V1, 0x001c0000);
+
+        av7110->tsf=0;
+        av7110->ttbp=0;
+        saa7146_write(saa->mem, DD1_INIT, 0x02000680);
+        saa7146_write(saa->mem, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+        saa7146_write(saa->mem, BRS_CTRL, 0x60000000);	
+      	saa7146_write(saa->mem, MC2, (MASK_08 | MASK_24));
+        mdelay(10);
+
+        saa7146_write(saa->mem, BASE_ODD3, 0);
+        saa7146_write(saa->mem, BASE_EVEN3, TS_WIDTH*TS_HEIGHT/2);
+        saa7146_write(saa->mem, PROT_ADDR3, TS_WIDTH*TS_HEIGHT);	
+        saa7146_write(saa->mem, BASE_PAGE3, virt_to_bus(saa->page_table[0])|ME1|0xb0);
+        saa7146_write(saa->mem, PITCH3, TS_WIDTH);	
+
+        saa7146_write(saa->mem, NUM_LINE_BYTE3, ((TS_HEIGHT/2)<<16)|TS_WIDTH);
+      	saa7146_write(saa->mem, MC2, (MASK_04 | MASK_20));
+
+        // VPE
+        saa7146_write(saa->mem, IER, saa7146_read(saa->mem, IER)|MASK_10);
+
+     	saa7146_write(saa->mem, MC1, (MASK_04 | MASK_20)); // DMA3 on
+
+        // FIDB
+        saa7146_write(saa->mem, IER, saa7146_read(saa->mem, IER)|MASK_07);
+
+        return ++av7110->feeding;
+}
+
+/**
+ *  Hack! we save the last av7110 ptr. This should be ok, since
+ *  you rarely will use more then one IR control. 
+ *
+ *  If we want to support multiple controls we would have to do much more...
+ */
+void av7110_setup_irc_config (av7110_t *av7110, u32 ir_config)
+{
+	static av7110_t *last;
+
+	if (!av7110)
+		av7110 = last;
+	else
+		last = av7110;
+
+	outcom(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
+}
+
+static void (*irc_handler)(u32);
+
+void av7110_register_irc_handler(void (*func)(u32)) 
+{
+        //dprintk("registering %08x\n",func);
+        irc_handler = func;
+}
+
+void av7110_unregister_irc_handler(void (*func)(u32)) 
+{
+        //dprintk("unregistering %08x\n",func);
+        irc_handler = NULL;
+}
+
+void run_handlers(unsigned long ircom) 
+{
+        if (irc_handler != NULL)
+                (*irc_handler)((u32) ircom);
+}
+
+DECLARE_TASKLET(irtask,run_handlers,0);
+
+void IR_handle(av7110_t *av7110, u32 ircom)
+{
+        dprintk("av7110: ircommand = %08x\n", ircom);
+        irtask.data = (unsigned long) ircom;
+        tasklet_schedule(&irtask);
+}
+
+/****************************************************************************
+ * IRQ handling
+ ****************************************************************************/
+
+void CI_handle(av7110_t *av7110, u8 *data, u16 len) 
+{
+        //CI_out(av7110, data, len);
+
+        if (len<3)
+                return;
+        switch (data[0]) {
+        case CI_MSG_CI_INFO:
+                if (data[2]!=1 && data[2]!=2)
+                        break;
+                switch (data[1]) {
+                case 0:
+                        av7110->ci_slot[data[2]-1].flags=0;
+                        break;
+                case 1:
+                        av7110->ci_slot[data[2]-1].flags|=CA_CI_MODULE_PRESENT;
+                        break;
+                case 2:
+                        av7110->ci_slot[data[2]-1].flags|=CA_CI_MODULE_READY;
+                        break;
+                }
+                break;
+        case CI_SWITCH_PRG_REPLY:
+                //av7110->ci_stat=data[1];
+                break;
+        default:
+                break;
+        }
+
+}
+
+static inline int
+DvbDmxFilterCallback(u8 * buffer1, size_t buffer1_len,
+                     u8 * buffer2, size_t buffer2_len,
+                     dvb_demux_filter_t *dvbdmxfilter,
+                     dmx_success_t success,
+                     av7110_t *av7110)
+{
+        if (!dvbdmxfilter->feed->demux->dmx.frontend)
+                return 0;
+        if (dvbdmxfilter->feed->demux->dmx.frontend->source==DMX_MEMORY_FE)
+                return 0;
+        
+        switch(dvbdmxfilter->type) {
+        case DMX_TYPE_SEC:
+                if ((((buffer1[1]<<8)|buffer1[2])&0xfff)+3!=buffer1_len)
+                        return 0;
+                if (dvbdmxfilter->doneq) {
+                        dmx_section_filter_t *filter=&dvbdmxfilter->filter;
+                        int i;
+                        u8 xor, neq=0;
+                        
+                        for (i=0; i<DVB_DEMUX_MASK_MAX; i++) {
+                                xor=filter->filter_value[i]^buffer1[i];
+                                neq|=dvbdmxfilter->maskandnotmode[i]&xor;
+                        }
+                        if (!neq)
+                                return 0;
+                }
+                return dvbdmxfilter->feed->cb.sec(buffer1, buffer1_len,
+						  buffer2, buffer2_len,
+						  &dvbdmxfilter->filter,
+						  DMX_OK); 
+        case DMX_TYPE_TS:
+                if (!(dvbdmxfilter->feed->ts_type & TS_PACKET)) 
+                        return 0;
+                if (dvbdmxfilter->feed->ts_type & TS_PAYLOAD_ONLY) 
+                        return dvbdmxfilter->feed->cb.ts(buffer1, buffer1_len,
+                                                         buffer2, buffer2_len,
+                                                         &dvbdmxfilter->feed->feed.ts,
+                                                         DMX_OK); 
+                else
+                        pes_to_ts(buffer1, buffer1_len, 
+                                  dvbdmxfilter->feed->pid, 
+                                  &av7110->p2t_filter[dvbdmxfilter->index]);
+	default:
+	        return 0;
+        }
+}
+
+
+u8 pshead[0x26] = {
+        0x00, 0x00, 0x01, 0xba, 0x5f, 0xff, 0xfe, 0xe6, 
+        0xc4, 0x01, 0x01, 0x89, 0xc3, 0xf8, 0x00, 0x00,
+        0x01, 0xbb, 0x00, 0x12, 0x80, 0xc4, 0xe1, 0x00,
+        0xe1, 0xff, 0xb9, 0xe0, 0xe8, 0xb8, 0xc0, 0x20,
+        0xbd, 0xe0, 0x44, 0xbf, 0xe0, 0x02,
+};								
+
+
+static void vpeirq (unsigned long data)
+{
+        //printk("vpeirq %08x\n", saa7146_read(av7110->saa_mem, PCI_VDP3));
+}
+
+#if 0
+static void fidbirq(struct saa7146* saa, void *data)
+{
+        av7110_t *av7110=(av7110_t *) data;
+        u8 *mem;
+  
+        mem=(av7110->tsf ? TS_HEIGHT*TS_WIDTH/2 :0)+(u8 *)av7110->saa->grabbing;
+        
+        // FIXME: think of something better without busy waiting
+        if (av7110->tsf) 
+                while (saa7146_read(av7110->saa_mem, PCI_VDP3)>0x20000);
+        else
+                while (saa7146_read(av7110->saa_mem, PCI_VDP3)<0x17800);
+
+        av7110->tsf^=1;
+        saa7146_write(av7110->saa_mem, DD1_INIT, 0x02000600|(av7110->tsf ? 0x40:0x80));
+        saa7146_write(av7110->saa_mem, MC2, 
+                      (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+        // FIXME: use bottom half or tasklet
+        if (av7110->feeding && mem[0]==0x47)
+                DvbDmxSWFilterPackets(&av7110->demux, mem, 512);
+}
+#else
+static
+void fidbirq (unsigned long data)
+{
+	struct av7110_s *av7110 = (struct av7110_s*) data;
+        u8 *mem=(u8 *)(av7110->saa->grabbing);
+        int num;
+        u32 dmapos;
+
+        dmapos=saa7146_read(av7110->saa_mem, PCI_VDP3);
+        dmapos-=(dmapos%188);
+
+        if (av7110->tsf) {
+                mem+=av7110->ttbp;
+                if (dmapos<0x20000) {
+                        num=1024-av7110->ttbp/188;
+                        av7110->ttbp=0;
+                } else {
+                        num=(dmapos - av7110->ttbp)/188;
+                        av7110->ttbp=dmapos;
+                }
+        } else {
+                if (av7110->ttbp>1000*188 && av7110->ttbp<1024*188) {
+                        if (av7110->feeding)
+                                DvbDmxSWFilterPackets(&av7110->demux, 
+                                                      mem+av7110->ttbp,
+                                                      1024- av7110->ttbp / 188);
+                }
+                num=dmapos/188;
+                av7110->ttbp=dmapos;
+        }
+
+        av7110->tsf^=1;
+        saa7146_write(av7110->saa_mem, DD1_INIT, 0x02000600|(av7110->tsf ? 0x40:0x80));
+        saa7146_write(av7110->saa_mem, MC2, 
+                      (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+        // FIXME: use bottom half or tasklet
+        if (av7110->feeding && mem[0]==0x47)
+                DvbDmxSWFilterPackets(&av7110->demux, mem, num);
+}
+#endif
+
+//#define DEBUG_TIMING
+inline static void 
+print_time(char *s)
+{
+#ifdef DEBUG_TIMING
+        struct timeval tv;
+        do_gettimeofday(&tv);
+        printk("%s: %d.%d\n", s, (int)tv.tv_sec, (int)tv.tv_usec);
+#endif
+}
+
+static void 
+ci_get_data(ring_buffer_t *cibuf, u8 *data, int len)
+{
+        int free, split=0, pread=cibuf->pread;
+        
+        free=pread-cibuf->pwrite;
+        if (free<=0)  
+                free+=cibuf->size;
+        if (free<=len+2) 
+                return;
+        cibuf->data[cibuf->pwrite]=(len>>8);   
+        cibuf->data[(cibuf->pwrite+1)%cibuf->size]=(len&0xff); 
+        cibuf->pwrite=(cibuf->pwrite+2)%cibuf->size;
+
+        if (pread<=cibuf->pwrite)
+                split=cibuf->size-cibuf->pwrite;
+        if (split && split<len) {
+                memcpy(cibuf->data + cibuf->pwrite, data, split);
+                memcpy(cibuf->data, data+split, len-split);
+        } else 
+                memcpy(cibuf->data + cibuf->pwrite, data, len);
+        cibuf->pwrite=(cibuf->pwrite+len)%cibuf->size;
+        
+        wake_up_interruptible(&cibuf->queue);
+}
+
+static
+void debiirq (unsigned long data)
+{
+	struct av7110_s *av7110 = (struct av7110_s*) data;
+        int type=av7110->debitype;
+        int handle=(type>>8)&0x1f;
+        
+        print_time("debi");
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) & ~MASK_19 );
+        saa7146_write(av7110->saa_mem, ISR, MASK_19 );
+
+        if (type==-1) {
+                printk("DEBI irq oops\n");
+                ARM_ClearMailBox(av7110);
+                ARM_ClearIrq(av7110);
+                return;
+        }
+        av7110->debitype=-1;
+
+        switch (type&0xff) {
+
+        case DATA_TS_RECORD:
+                DvbDmxSWFilterPackets(&av7110->demux, 
+                                      (const u8 *)av7110->debi_virt, 
+                                      av7110->debilen/188);
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                break;
+
+        case DATA_PES_RECORD:
+                if (av7110->demux.recording) 
+                        record_cb(&av7110->p2t[handle], 
+                                  (u8 *)av7110->debi_virt,
+                                  av7110->debilen);
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_IPMPE:
+        case DATA_FSECTION:
+        case DATA_PIPING:
+                if (av7110->handle2filter[handle]) 
+                        DvbDmxFilterCallback((u8 *)av7110->debi_virt, 
+                                             av7110->debilen, 0, 0, 
+                                             av7110->handle2filter[handle], 
+                                             DMX_OK, av7110); 
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_CI_GET:
+        {
+                u8 *data=av7110->debi_virt;
+
+                if ((data[0]<2) && data[2]==0xff) {
+                        int flags=0;
+                        if (data[5]>0) 
+                                flags|=CA_CI_MODULE_PRESENT;
+                        if (data[5]>5) 
+                                flags|=CA_CI_MODULE_READY;
+                        av7110->ci_slot[data[0]].flags=flags;
+                } else
+                        ci_get_data(&av7110->ci_rbuffer, 
+                                    av7110->debi_virt, 
+                                    av7110->debilen);
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                return;
+        }
+
+        case DATA_COMMON_INTERFACE:
+                CI_handle(av7110, (u8 *)av7110->debi_virt, av7110->debilen);
+#if 0
+        {
+                int i;
+
+                printk("av7110%d: ", av7110->num);
+                printk("%02x ", *(u8 *)av7110->debi_virt);
+                printk("%02x ", *(1+(u8 *)av7110->debi_virt));
+                for (i=2; i<av7110->debilen; i++)
+                  printk("%02x ", (*(i+(unsigned char *)av7110->debi_virt)));
+                for (i=2; i<av7110->debilen; i++)
+                  printk("%c", chtrans(*(i+(unsigned char *)av7110->debi_virt)));
+
+                printk("\n");
+        }
+#endif
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_DEBUG_MESSAGE:
+                ((s8*)av7110->debi_virt)[Reserved_SIZE-1]=0;
+                printk("%s\n", (s8 *)av7110->debi_virt);
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_CI_PUT:
+        case DATA_MPEG_PLAY:
+        case DATA_BMP_LOAD:
+                spin_lock(&av7110->debilock);
+                iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+                ARM_ClearMailBox(av7110);
+                spin_unlock(&av7110->debilock);
+                return;
+        default:
+                break;
+        }
+        spin_lock(&av7110->debilock);
+        ARM_ClearMailBox(av7110);
+        spin_unlock(&av7110->debilock);
+}
+
+static int
+pes_play(void *dest, ring_buffer_t *buf, int dlen)
+{
+        int len, split=0;
+        u32 sync;
+        u16 blen;
+
+        dprintk ("function : %s\n", __FUNCTION__);
+        if (!dlen) {
+                wake_up(&buf->queue);
+                return -1;
+        }
+        while (1) {
+                if ((len=ring_buffer_avail(buf)) < 6)
+                        return -1;
+                sync=(buf->data[buf->pread])<<24;
+                sync|=(buf->data[(buf->pread+1)%buf->size]<<16);
+                sync|=(buf->data[(buf->pread+2)%buf->size]<<8);
+                sync|=buf->data[(buf->pread+3)%buf->size];
+                
+                if (((sync&~0x1f)==0x000001e0) ||
+                    ((sync&~0x1f)==0x000001c0) ||
+                    (sync==0x000001bd))
+                        break;
+                printk("resync\n");
+                buf->pread=(buf->pread+1)%buf->size;
+        }
+        blen=(buf->data[(buf->pread+4)%buf->size]<<8);
+        blen|=buf->data[(buf->pread+5)%buf->size];
+        blen+=6;
+        if (len<blen || blen > dlen) {
+                printk("buffer empty\n");
+                wake_up(&buf->queue);
+                return -1;
+        }
+/*        if (blen>2048) {
+                buf->pread=(buf->pread+blen)%buf->size;
+                printk("packet too large\n");
+                return -1;
+        }
+*/
+        len=blen;
+        if (buf->pread + len > buf->size)
+                split=buf->size-buf->pread;
+        if (split>0) {
+                memcpy(dest, buf->data+buf->pread, split);
+                buf->pread=0;
+                len-=split;
+        }
+        memcpy(split + dest, 
+               buf->data + buf->pread, len);
+        buf->pread = (buf->pread +len)%buf->size;
+        
+        dprintk ("function: %s pread=%08x pwrite=%08x\n", __FUNCTION__,
+                buf->pread, buf->pwrite);
+        wake_up(&buf->queue);
+        return blen;
+}
+
+static
+void gpioirq (unsigned long data)
+{
+	struct av7110_s *av7110 = (struct av7110_s*) data;
+        u32 rxbuf, txbuf;
+        int len;
+        
+        //printk("GPIO0 irq\n");        
+
+        if (av7110->debitype !=-1)
+                printk("GPIO0 irq oops\n");
+       
+        spin_lock(&av7110->debilock);
+
+	ARM_ClearIrq(av7110);
+
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) & ~MASK_19 );
+        saa7146_write(av7110->saa_mem, ISR, MASK_19 );
+
+        av7110->debitype = irdebi(av7110, DEBINOSWAP, IRQ_STATE, 0, 2);
+        av7110->debilen  = irdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
+        av7110->debibuf  = 0;
+        rxbuf=irdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+        txbuf=irdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+        len=(av7110->debilen+3)&(~3);
+
+        dprintk("GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen);
+        print_time("gpio");
+
+        dprintk("GPIO0 irq %02x\n", av7110->debitype&0xff);        
+        switch (av7110->debitype&0xff) {
+
+        case DATA_TS_PLAY:
+        case DATA_PES_PLAY:
+                break;
+
+        case DATA_CI_PUT:
+        {
+                int avail, split=0, pwrite;
+                ring_buffer_t *cibuf=&av7110->ci_wbuffer;
+
+                pwrite=cibuf->pwrite;
+                avail=pwrite-cibuf->pread;
+                if (avail<0) 
+                        avail+=cibuf->size;
+                if (avail<=2) {
+                        iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+                        break;
+                } 
+                len=(cibuf->data[cibuf->pread]<<8);
+                len|=cibuf->data[(cibuf->pread+1)%cibuf->size];
+                if (avail<len+2) {
+                        iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+                        break;
+                } 
+                cibuf->pread=(cibuf->pread+2)%cibuf->size;
+                
+                if (pwrite<cibuf->pread)
+                        split=cibuf->size-cibuf->pread;
+                if (split && split<len) {
+                        int todo=len-split;
+                        memcpy(av7110->debi_virt, cibuf->data+cibuf->pread, split);
+                        memcpy(av7110->debi_virt+split, cibuf->data, todo);
+                } else
+                        memcpy(av7110->debi_virt, cibuf->data+cibuf->pread, len);
+                cibuf->pread=(cibuf->pread+len)%cibuf->size;
+                wake_up(&cibuf->queue);
+                iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2);
+                iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2);
+                wait_for_debi_done(av7110);
+                saa7146_write(av7110->saa_mem, IER, 
+                              saa7146_read(av7110->saa_mem, IER) | MASK_19 );
+                if (len<5) len=5; /* we want a real DEBI DMA */
+                iwdebi(av7110, DEBISWAB, DPRAM_BASE+txbuf, 0, (len+3)&~3);
+                spin_unlock(&av7110->debilock);
+                return;
+        }
+
+        case DATA_MPEG_PLAY:
+                if (!av7110->playing) {
+                        iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+                        break;
+                }
+                len=0;
+                if (av7110->debitype&0x100) {
+                        spin_lock(&av7110->aout.lock);
+                        len=pes_play(av7110->debi_virt, &av7110->aout, 2048);
+                        spin_unlock(&av7110->aout.lock);
+                }
+                if (len<=0 && (av7110->debitype&0x200)
+                        &&av7110->videostate.play_state!=VIDEO_FREEZED) {
+                        spin_lock(&av7110->avout.lock);
+                        len=pes_play(av7110->debi_virt, &av7110->avout, 2048);
+                        spin_unlock(&av7110->avout.lock);
+                }
+                if (len<=0) {
+                        iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+                        break;
+                } 
+                dprintk("GPIO0 PES_PLAY len=%04x\n", len);        
+                iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2);
+                iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2);
+                wait_for_debi_done(av7110);
+                saa7146_write(av7110->saa_mem, IER, 
+                              saa7146_read(av7110->saa_mem, IER) | MASK_19 );
+
+                iwdebi(av7110, DEBISWAB, DPRAM_BASE+txbuf, 0, (len+3)&~3);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_BMP_LOAD:
+                len=av7110->debilen;
+                if (!len) {
+                        av7110->bmp_state=BMP_LOADED;
+                        iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2);
+                        iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
+                        wake_up(&av7110->bmpq);
+                        break;
+                }
+                if (len>av7110->bmplen)
+                        len=av7110->bmplen;
+                if (len>2*1024)
+                        len=2*1024;
+                iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2);
+                iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2);
+                memcpy(av7110->debi_virt, av7110->bmpbuf+av7110->bmpp, len);
+                av7110->bmpp+=len;
+                av7110->bmplen-=len;
+                wait_for_debi_done(av7110);
+                saa7146_write(av7110->saa_mem, IER, 
+                              saa7146_read(av7110->saa_mem, IER) | MASK_19 );
+                if (len<5) len=5; /* we want a real DEBI DMA */
+                iwdebi(av7110, DEBISWAB, DPRAM_BASE+txbuf, 0, (len+3)&~3);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_CI_GET:
+        case DATA_COMMON_INTERFACE:
+        case DATA_FSECTION:
+        case DATA_IPMPE:
+        case DATA_PIPING:
+                if (!len || len>4*1024) {
+                        iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                        break;
+                }                  /* yes, fall through */
+        case DATA_TS_RECORD:
+        case DATA_PES_RECORD:
+                saa7146_write(av7110->saa_mem, IER, 
+                              saa7146_read(av7110->saa_mem, IER) | MASK_19);
+                irdebi(av7110, DEBISWAB, DPRAM_BASE+rxbuf, 0, len);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_DEBUG_MESSAGE:
+                if (!len || len>0xff) {
+                        iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                        break;
+                }
+                saa7146_write(av7110->saa_mem, IER, 
+                              saa7146_read(av7110->saa_mem, IER) | MASK_19);
+                irdebi(av7110, DEBISWAB, Reserved, 0, len);
+                spin_unlock(&av7110->debilock);
+                return;
+
+        case DATA_IRCOMMAND: 
+                IR_handle(av7110, 
+                          swahw32(irdebi(av7110, DEBINOSWAP, Reserved, 0, 4)));
+                iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
+                break;
+
+        default:
+                printk("gpioirq unknown type=%d len=%d\n", 
+                       av7110->debitype, av7110->debilen);
+                break;
+        }      
+        ARM_ClearMailBox(av7110);
+        av7110->debitype=-1;
+        spin_unlock(&av7110->debilock);
+        dprintk("GPIO0 irq exit 0\n");        
+}
+
+
+/****************************************************************************
+ * DEBI command polling 
+ ****************************************************************************/
+
+
+static int OutCommand(av7110_t *av7110, u16* buf, int length)
+{
+        int i;
+        u32	start;
+
+        if (!av7110->arm_ready)
+                return -1;
+
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 ) )
+        {
+                ddelay(1);
+                if ((jiffies - start) > ARM_WAIT_FREE) {
+                        printk("outcommand error 1\n");
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+
+#ifndef _NOHANDSHAKE
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 ) ) 
+        {
+                ddelay(1);
+                if ((jiffies - start) > ARM_WAIT_SHAKE) {
+                        printk("outcommand error 2\n");
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+#endif
+
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2) & OSDQFull )
+        {
+                ddelay(1);
+                if ((jiffies - start) > ARM_WAIT_OSD)
+                {
+                        printk("outcommand error 3\n");
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+        for (i=2; i<length; i++)
+                wdebi(av7110, DEBINOSWAP, COMMAND + 2*i, (u32) buf[i], 2);
+
+        if (length)
+                wdebi(av7110, DEBINOSWAP, COMMAND + 2, (u32) buf[1], 2);
+        else
+                wdebi(av7110, DEBINOSWAP, COMMAND + 2, 0, 2);
+
+        wdebi(av7110, DEBINOSWAP, COMMAND, (u32) buf[0], 2);
+
+        return 0;
+}
+
+inline static int 
+SOutCommand(av7110_t *av7110, u16* buf, int length)
+{
+        int ret;
+        
+        if (!av7110->arm_ready)
+                return -1;
+
+        if (down_interruptible(&av7110->dcomlock))
+		return -ERESTARTSYS;
+
+        ret=OutCommand(av7110, buf, length);
+        up(&av7110->dcomlock);
+        return ret;
+}
+
+
+static int outcom(av7110_t *av7110, int type, int com, int num, ...)
+{
+	va_list args;
+        u16 buf[num+2];
+        int i;
+
+        buf[0]=(( type << 8 ) | com);
+        buf[1]=num;
+
+        if (num) {
+                va_start(args, num);
+                for (i=0; i<num; i++)
+                        buf[i+2]=va_arg(args, u32);
+                va_end(args);
+        }
+
+        return SOutCommand(av7110, buf, num+2);
+}
+
+int SendCICommand(av7110_t *av7110, u8 subcom, u8 *Params, u8 ParamLen)
+{
+        int i;
+        u16 CommandBuffer[18] = { ((COMTYPE_COMMON_IF << 8) + subcom),
+                                  16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+        
+	for(i=0; (i<ParamLen)&&(i<32); i++)	
+	{
+		if(i%2 == 0)
+			CommandBuffer[(i/2)+2] = (u16)(Params[i]) << 8;
+		else
+			CommandBuffer[(i/2)+2] |= Params[i];
+	}
+
+        return SOutCommand(av7110, CommandBuffer, 18);
+}
+
+
+static int CommandRequest(av7110_t *av7110, u16 *Buff, int length, u16 *buf, int n)
+{
+	int err;
+        s16 i;
+        u32 start;
+       
+        if (!av7110->arm_ready)
+                return -1;
+
+        if (down_interruptible(&av7110->dcomlock))
+		return -ERESTARTSYS;
+
+        if ((err = OutCommand(av7110, Buff, length)) < 0) {
+		up(&av7110->dcomlock);
+		return err;
+	}
+        
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) ) 
+        {
+#ifdef _NOHANDSHAKE
+                ddelay(1);
+#endif
+                if ((jiffies - start) > ARM_WAIT_FREE) {
+                        printk("commandrequest error 1\n");
+                        up(&av7110->dcomlock);
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+        
+#ifndef _NOHANDSHAKE
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 ) ) {
+                ddelay(1);
+                if ((jiffies - start) > ARM_WAIT_SHAKE) {
+                        printk("commandrequest error 2\n");
+                        up(&av7110->dcomlock);
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+#endif
+
+        for (i=0; i<n; i++)
+                buf[i] = rdebi(av7110, DEBINOSWAP, COM_BUFF + 2*i, 0, 2);
+        
+	up(&av7110->dcomlock);
+        return 0;
+}
+
+
+static inline int 
+RequestParameter(av7110_t *av7110, u16 tag, u16* Buff, s16 length)
+{
+        return CommandRequest(av7110, &tag, 0, Buff, length);
+}
+
+
+/****************************************************************************
+ * Firmware commands 
+ ****************************************************************************/
+
+
+inline static int 
+SendDAC(av7110_t *av7110, u8 addr, u8 data)
+{
+        return outcom(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data);
+}
+
+static int
+SetVolume(av7110_t *av7110, int volleft, int volright)
+{
+        int err;
+        
+        switch (av7110->adac_type) {
+        case DVB_ADAC_TI:
+                volleft=(volleft*256)/946;
+                volright=(volright*256)/946;
+                if (volleft > 0x45)
+                        volleft=0x45;
+                if (volright > 0x45)
+                        volright=0x45;
+                err=SendDAC(av7110, 3, 0x80 + volleft);
+                if (err)
+                        return err;
+                return SendDAC(av7110, 4, volright);
+                
+        case DVB_ADAC_CRYSTAL:
+                volleft=127-volleft/2;
+                volright=127-volright/2;
+                i2c_writereg(av7110, 0x20, 0x03, volleft);
+                i2c_writereg(av7110, 0x20, 0x04, volright);
+                return 0;
+        }
+        return 0;
+}
+
+#ifdef CONFIG_DVB_AV7110_OSD
+
+inline static int ResetBlend(av7110_t *av7110, u8 windownr)
+{
+        return outcom(av7110, COMTYPE_OSD, SetNonBlend, 1, windownr);
+}
+
+inline static int SetColorBlend(av7110_t *av7110, u8 windownr)
+{
+        return outcom(av7110, COMTYPE_OSD, SetCBlend, 1, windownr); 
+}
+
+inline static int SetWindowBlend(av7110_t *av7110, u8 windownr, u8 blending)
+{
+        return outcom(av7110, COMTYPE_OSD, SetWBlend, 2, windownr, blending); 
+}
+
+inline static int SetBlend_(av7110_t *av7110, u8 windownr,
+                     OSDPALTYPE colordepth, u16 index, u8 blending)
+{
+        return outcom(av7110, COMTYPE_OSD, SetBlend, 4,
+                      windownr, colordepth, index, blending);
+} 
+
+inline static int SetColor_(av7110_t *av7110, u8 windownr,
+                     OSDPALTYPE colordepth, u16 index, u16 colorhi, u16 colorlo)
+{
+        return outcom(av7110, COMTYPE_OSD, SetColor, 5,
+                      windownr, colordepth, index, colorhi, colorlo);
+} 
+
+inline static int BringToTop(av7110_t *av7110, u8 windownr)
+{
+        return outcom(av7110, COMTYPE_OSD, WTop, 1, windownr);
+} 
+
+inline static int SetFont(av7110_t *av7110, u8 windownr, u8 fontsize,
+                   u16 colorfg, u16 colorbg)
+{
+        return outcom(av7110, COMTYPE_OSD, Set_Font, 4,
+                      windownr, fontsize, colorfg, colorbg);
+} 
+
+static int FlushText(av7110_t *av7110)
+{
+        u32 start;
+
+        if (down_interruptible(&av7110->dcomlock))
+		return -ERESTARTSYS;
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2 ) ) {
+                ddelay(1); 
+                if ((jiffies - start) > ARM_WAIT_OSD) {
+                        printk("outtext error\n");
+                        up(&av7110->dcomlock);
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+        up(&av7110->dcomlock);
+        return 0;
+}
+
+static int WriteText(av7110_t *av7110, u8 win, u16 x, u16 y, u8* buf)
+{
+        int i, ret;
+        u32 start;
+        int length=strlen(buf)+1;
+        u16 cbuf[5] = { (COMTYPE_OSD<<8) + DText, 3, win, x, y };
+        
+        if (down_interruptible(&av7110->dcomlock))
+		return -ERESTARTSYS;
+
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2 ) ) {
+                ddelay(1);
+                if ((jiffies - start) > ARM_WAIT_OSD) {
+                        printk("outtext error\n");
+                        up(&av7110->dcomlock);
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+#ifndef _NOHANDSHAKE
+        start = jiffies;
+        while ( rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 ) ) {
+                ddelay(1);
+                if ((jiffies - start) > ARM_WAIT_SHAKE) {
+                        printk("outtext error\n");
+                        up(&av7110->dcomlock);
+                        //arm_error(av7110);
+                        return -1;
+                }
+        }
+#endif
+        for (i=0; i<length/2; i++)
+                wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i*2, 
+                      swab16(*(u16 *)(buf+2*i)), 2);
+        if (length&1)
+                wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i*2, 0, 2);
+        ret=OutCommand(av7110, cbuf, 5);
+        up(&av7110->dcomlock);
+        return ret;
+}
+
+inline static int DrawLine(av7110_t *av7110, u8 windownr, 
+                    u16 x, u16 y, u16 dx, u16 dy, u16 color)
+{
+        return outcom(av7110, COMTYPE_OSD, DLine, 6,
+                      windownr, x, y, dx, dy, color);
+} 
+
+inline static int DrawBlock(av7110_t *av7110, u8 windownr, 
+                    u16 x, u16 y, u16 dx, u16 dy, u16 color)
+{
+        return outcom(av7110, COMTYPE_OSD, DBox, 6,
+                      windownr, x, y, dx, dy, color);
+} 
+
+inline static int HideWindow(av7110_t *av7110, u8 windownr)
+{
+        return outcom(av7110, COMTYPE_OSD, WHide, 1, windownr);
+} 
+
+inline static int MoveWindowRel(av7110_t *av7110, u8 windownr, u16 x, u16 y)
+{
+        return outcom(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y);
+} 
+
+inline static int MoveWindowAbs(av7110_t *av7110, u8 windownr, u16 x, u16 y)
+{
+        return outcom(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y);
+} 
+
+inline static int DestroyOSDWindow(av7110_t *av7110, u8 windownr)
+{
+        return outcom(av7110, COMTYPE_OSD, WDestroy, 1, windownr);
+} 
+
+#if 0
+static void DestroyOSDWindows(av7110_t *av7110)
+{
+        int i;
+
+        for (i=1; i<7; i++)
+                outcom(av7110, COMTYPE_OSD, WDestroy, 1, i);
+} 
+#endif
+
+static inline int 
+CreateOSDWindow(av7110_t *av7110, u8 windownr,
+                           DISPTYPE disptype, u16 width, u16 height)
+{
+        return outcom(av7110, COMTYPE_OSD, WCreate, 4,
+                      windownr, disptype, width, height);
+} 
+
+
+static OSDPALTYPE bpp2pal[8]={Pal1Bit, Pal2Bit, 0, Pal4Bit, 0, 0, 0, Pal8Bit}; 
+static DISPTYPE   bpp2bit[8]={BITMAP1, BITMAP2, 0, BITMAP4, 0, 0, 0, BITMAP8}; 
+
+static inline int 
+LoadBitmap(av7110_t *av7110, u16 format, u16 dx, u16 dy, int inc, u8* data)
+{
+        int bpp;
+        int i;
+        int d, delta; 
+        u8 c;
+        DECLARE_WAITQUEUE(wait, current);
+        
+        if (av7110->bmp_state==BMP_LOADING) {
+                add_wait_queue(&av7110->bmpq, &wait);
+                while (1) {
+                        set_current_state(TASK_INTERRUPTIBLE);
+                        if (av7110->bmp_state!=BMP_LOADING
+                            || signal_pending(current))
+                                break;
+                        schedule();
+                }
+                current->state=TASK_RUNNING;
+                remove_wait_queue(&av7110->bmpq, &wait);
+        }
+        if (av7110->bmp_state==BMP_LOADING)
+                return -1;
+        av7110->bmp_state=BMP_LOADING;
+        if      (format==BITMAP8) { bpp=8; delta = 1; } 
+        else if (format==BITMAP4) { bpp=4; delta = 2; }
+        else if (format==BITMAP2) { bpp=2; delta = 4; }
+        else if (format==BITMAP1) { bpp=1; delta = 8; }
+        else {
+                av7110->bmp_state=BMP_NONE;
+                return -1;
+        }
+        av7110->bmplen= ((dx*dy*bpp+7)&~7)/8; 
+        av7110->bmpp=0;
+        if (av7110->bmplen>32768) {
+                av7110->bmp_state=BMP_NONE;
+                return -1;
+        }
+        for (i=0; i<dy; i++) {
+                if (copy_from_user(av7110->bmpbuf+1024+i*dx, data+i*inc, dx)) { 
+                        av7110->bmp_state=BMP_NONE;
+                        return -1;
+                }
+        }
+        if (format != BITMAP8) {
+                for (i=0; i<dx*dy/delta; i++) {
+                        c = ((u8 *)av7110->bmpbuf)[1024+i*delta+delta-1];
+                        for (d=delta-2; d>=0; d--) {
+                                c |= (((u8 *)av7110->bmpbuf)[1024+i*delta+d] 
+                                      << ((delta-d-1)*bpp));
+                                ((u8 *)av7110->bmpbuf)[1024+i] = c;
+                        }
+                }
+        }
+        av7110->bmplen+=1024;
+        return outcom(av7110, COMTYPE_OSD, LoadBmp, 3, format, dx, dy);
+} 
+
+static int 
+BlitBitmap(av7110_t *av7110, u16 win, u16 x, u16 y, u16 trans)
+{
+        DECLARE_WAITQUEUE(wait, current);
+        
+        if (av7110->bmp_state==BMP_NONE)
+                return -1;
+        if (av7110->bmp_state==BMP_LOADING) {
+                add_wait_queue(&av7110->bmpq, &wait);
+                while (1) {
+                        set_current_state(TASK_INTERRUPTIBLE);
+                        if (av7110->bmp_state!=BMP_LOADING
+                            || signal_pending(current))
+                                break;
+                        schedule();
+                }
+                current->state=TASK_RUNNING;
+                remove_wait_queue(&av7110->bmpq, &wait);
+        }
+        if (av7110->bmp_state==BMP_LOADED)
+                return outcom(av7110, COMTYPE_OSD, BlitBmp, 4, win, x, y, trans);
+        return -1;
+} 
+
+static inline int 
+ReleaseBitmap(av7110_t *av7110)
+{
+        if (av7110->bmp_state!=BMP_LOADED)
+                return -1;
+        av7110->bmp_state=BMP_NONE;
+        return outcom(av7110, COMTYPE_OSD, ReleaseBmp, 0);
+} 
+
+static u32 RGB2YUV(u16 R, u16 G, u16 B)
+{
+        u16 y, u, v;
+        u16 Y, Cr, Cb;
+
+        y = R * 77 + G * 150 + B * 29;  // Luma=0.299R+0.587G+0.114B 0..65535
+        u = 2048+B * 8 -(y>>5);    // Cr 0..4095
+        v = 2048+R * 8 -(y>>5);    // Cb 0..4095
+
+        Y=y/256;
+        Cb=u/16;
+        Cr=v/16;
+
+        return Cr|(Cb<<16)|(Y<<8);
+}
+
+static void
+OSDSetColor(av7110_t *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend)
+{
+        u16 ch, cl;
+        u32 yuv;
+
+        yuv=blend ? RGB2YUV(r,g,b) : 0;
+        cl=(yuv&0xffff);
+        ch=((yuv>>16)&0xffff);
+        SetColor_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]],
+                  color, ch, cl);
+        SetBlend_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]],
+                  color, ((blend>>4)&0x0f));
+}
+
+static int
+OSDSetBlock(av7110_t *av7110, int x0, int y0, int x1, int y1, int inc, u8 *data)
+{
+        uint w, h, bpp, bpl, size, lpb, bnum, brest;
+        int i;
+
+        w=x1-x0+1; h=y1-y0+1;
+        if (inc<=0)
+                inc=w; 
+        if (w<=0 || w>720 || h<=0 || h>576) 
+                return -1;
+        bpp=av7110->osdbpp[av7110->osdwin]+1; 
+        bpl=((w*bpp+7)&~7)/8; 
+        size=h*bpl;
+        lpb=(32*1024)/bpl; 
+        bnum=size/(lpb*bpl);
+        brest=size-bnum*lpb*bpl;
+
+        for (i=0; i<bnum; i++) {
+                LoadBitmap(av7110, bpp2bit[av7110->osdbpp[av7110->osdwin]], w, lpb, inc, data); 
+                BlitBitmap(av7110, av7110->osdwin, x0, y0+i*lpb, 0);
+                data+=lpb*inc; 
+        }
+        if (brest) {
+                LoadBitmap(av7110, bpp2bit[av7110->osdbpp[av7110->osdwin]], w, brest/bpl, inc, data); 
+                BlitBitmap(av7110, av7110->osdwin, x0, y0+bnum*lpb, 0);
+        }
+        ReleaseBitmap(av7110);
+        return 0;
+}
+
+static int 
+OSD_DrawCommand(av7110_t *av7110, osd_cmd_t *dc)
+{
+        switch (dc->cmd) {
+        case OSD_Close:
+                DestroyOSDWindow(av7110, av7110->osdwin);
+                return 0;
+        case OSD_Open:
+                av7110->osdbpp[av7110->osdwin]=(dc->color-1)&7;
+                CreateOSDWindow(av7110, av7110->osdwin, bpp2bit[av7110->osdbpp[av7110->osdwin]],
+                                dc->x1-dc->x0+1, dc->y1-dc->y0+1);
+                if (!dc->data) {
+                        MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0);
+                        SetColorBlend(av7110, av7110->osdwin);
+                }
+                return 0;
+        case OSD_Show:
+                MoveWindowRel(av7110, av7110->osdwin, 0, 0);
+                return 0;
+        case OSD_Hide:
+                HideWindow(av7110, av7110->osdwin);
+                return 0;
+        case OSD_Clear:
+                DrawBlock(av7110, av7110->osdwin, 0, 0, 720, 576, 0);
+                return 0;
+        case OSD_Fill:
+                DrawBlock(av7110, av7110->osdwin, 0, 0, 720, 576, dc->color);
+                return 0;
+        case OSD_SetColor:
+                OSDSetColor(av7110, dc->color, dc->x0, dc->y0, dc->x1, dc->y1); 
+                return 0;
+        case OSD_SetPalette:
+        {      
+                int i, len=dc->x0-dc->color+1;
+                u8 *colors=(u8 *)dc->data;
+
+                for (i=0; i<len; i++)
+                        OSDSetColor(av7110, dc->color+i,
+                                    colors[i*4]  , colors[i*4+1],
+                                    colors[i*4+2], colors[i*4+3]);
+                return 0;
+        }
+        case OSD_SetTrans: 
+                return 0;
+        case OSD_SetPixel:
+                DrawLine(av7110, av7110->osdwin,
+                         dc->x0, dc->y0, 0, 0,
+                         dc->color);
+                return 0;
+        case OSD_GetPixel: 
+                return 0;
+
+        case OSD_SetRow:   
+                dc->y1=dc->y0;
+        case OSD_SetBlock:
+                OSDSetBlock(av7110, dc->x0, dc->y0, dc->x1, dc->y1, dc->color, dc->data);
+                return 0;
+
+        case OSD_FillRow:
+                DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0,
+                          dc->x1-dc->x0+1, dc->y1,
+                          dc->color);
+                return 0;
+        case OSD_FillBlock:
+                DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0,
+                          dc->x1-dc->x0+1, dc->y1-dc->y0+1,
+                          dc->color);
+                return 0;
+        case OSD_Line:
+                DrawLine(av7110, av7110->osdwin,
+                         dc->x0, dc->y0, dc->x1-dc->x0, dc->y1-dc->y0,
+                         dc->color);
+                return 0;
+        case OSD_Query: 
+                return 0;
+        case OSD_Test:
+                return 0;
+        case OSD_Text:
+        {
+                char textbuf[240];
+                
+                if (strncpy_from_user(textbuf, dc->data, 240)<0)
+                        return -EFAULT;
+                textbuf[239]=0;
+                if (dc->x1>3) 
+                        dc->x1=3;
+                SetFont(av7110, av7110->osdwin, dc->x1,
+                        (u16) (dc->color&0xffff), (u16) (dc->color>>16));
+                FlushText(av7110);
+                WriteText(av7110, av7110->osdwin, dc->x0, dc->y0, textbuf);
+                return 0;
+        }
+        case OSD_SetWindow:
+                if (dc->x0<1 || dc->x0>7)
+                        return -EINVAL;
+                av7110->osdwin=dc->x0;
+                return 0;
+        case OSD_MoveWindow:
+                MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0);
+                SetColorBlend(av7110, av7110->osdwin);
+                return 0;
+        default:
+                return -EINVAL;
+        }
+}
+#endif /* CONFIG_DVB_AV7110_OSD */
+
+
+/* get version of the firmware ROM, RTSL, video ucode and ARM application  */
+
+static void 
+firmversion(av7110_t *av7110)
+{
+        u16 buf[20];
+
+        u16 tag = ((COMTYPE_REQUEST << 8) + ReqVersion);
+        
+        RequestParameter(av7110, tag, buf, 16);
+        
+        av7110->arm_fw=(buf[0] << 16) + buf[1];
+        av7110->arm_rtsl=(buf[2] << 16) + buf[3];
+        av7110->arm_vid=(buf[4] << 16) + buf[5];
+        av7110->arm_app=(buf[6] << 16) + buf[7];
+        av7110->avtype=(buf[8] << 16) + buf[9];
+
+        printk ("av7110 (%d): AV711%d - firm %08x, rtsl %08x, vid %08x, app %08x\n", 
+		av7110->saa->dvb_adapter->num, av7110->avtype, av7110->arm_fw, 
+                av7110->arm_rtsl, av7110->arm_vid, av7110->arm_app);
+
+        return;
+}
+
+static int 
+waitdebi(av7110_t *av7110, int adr, int state)
+{
+        int k;
+        
+        for (k=0; k<100; k++, udelay(500)) {
+                if (irdebi(av7110, DEBINOSWAP, adr, 0, 2) == state) 
+                        return 0;
+        }
+        return -1;
+}
+
+
+static int 
+load_dram(av7110_t *av7110, u32 *data, int len)
+{
+        int i;
+        int blocks, rest;
+        u32 base, bootblock=BOOT_BLOCK;
+        
+        blocks=len/BOOT_MAX_SIZE;
+        rest=len % BOOT_MAX_SIZE;
+        base=DRAM_START_CODE;
+        
+        for (i=0; i<blocks; i++) {
+                if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0)
+                        return -1;
+                dprintk("Writing DRAM block %d\n",i);
+                iwdebi(av7110, DEBISWAB, bootblock,
+                       i*(BOOT_MAX_SIZE)+(u32)data,
+                       BOOT_MAX_SIZE);
+                bootblock^=0x1400;
+                iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4);
+                iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, BOOT_MAX_SIZE, 2);
+                iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
+                base+=BOOT_MAX_SIZE;
+        }
+        
+        if (rest > 0) {
+                if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0)
+                        return -1;
+                if (rest>4)
+                        iwdebi(av7110, DEBISWAB, bootblock, i*(BOOT_MAX_SIZE)+(u32)data, rest);
+                else
+                        iwdebi(av7110, DEBISWAB, bootblock, i*(BOOT_MAX_SIZE)-4+(u32)data, rest+4);
+                
+                iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4);
+                iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, rest, 2);
+                iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
+        }
+        if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0)
+                return -1;
+        iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, 0, 2);
+        iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
+        if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BOOT_COMPLETE) < 0)
+                return -1;
+        return 0;
+}
+
+
+static u8 
+bootcode[] = {
+        0xea, 0x00, 0x00, 0x0e, 0xe1, 0xb0, 0xf0, 0x0e, /* 0x0000 */
+        0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x04,
+        0xe2, 0x5e, 0xf0, 0x08, 0xe2, 0x5e, 0xf0, 0x04,
+        0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x04,
+        0x2c, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c,
+        0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x34,
+        0x00, 0x00, 0x00, 0x00, 0xa5, 0xa5, 0x5a, 0x5a,
+        0x00, 0x1f, 0x15, 0x55, 0x00, 0x00, 0x00, 0x09,
+        0xe5, 0x9f, 0xd0, 0x5c, 0xe5, 0x9f, 0x40, 0x54, /* 0x0040 */
+        0xe3, 0xa0, 0x00, 0x00, 0xe5, 0x84, 0x00, 0x00,
+        0xe5, 0x84, 0x00, 0x04, 0xe1, 0xd4, 0x10, 0xb0,
+        0xe3, 0x51, 0x00, 0x00, 0x0a, 0xff, 0xff, 0xfc,
+        0xe1, 0xa0, 0x10, 0x0d, 0xe5, 0x94, 0x30, 0x04,
+        0xe1, 0xd4, 0x20, 0xb2, 0xe2, 0x82, 0x20, 0x3f,
+        0xe1, 0xb0, 0x23, 0x22, 0x03, 0xa0, 0x00, 0x02,
+        0xe1, 0xc4, 0x00, 0xb0, 0x0a, 0xff, 0xff, 0xf4,
+        0xe8, 0xb1, 0x1f, 0xe0, 0xe8, 0xa3, 0x1f, 0xe0, /* 0x0080 */
+        0xe8, 0xb1, 0x1f, 0xe0, 0xe8, 0xa3, 0x1f, 0xe0,
+        0xe2, 0x52, 0x20, 0x01, 0x1a, 0xff, 0xff, 0xf9,
+        0xe2, 0x2d, 0xdb, 0x05, 0xea, 0xff, 0xff, 0xec,
+        0x2c, 0x00, 0x03, 0xf8, 0x2c, 0x00, 0x04, 0x00,
+};
+
+#include "av7110_firm.h"
+
+static int 
+bootarm(av7110_t *av7110)
+{
+        u32 ret;
+        int i;
+
+        setgpio(av7110, RESET_LINE, GPIO_OUTLO);
+
+        /* Disable DEBI and GPIO irq */
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) & 
+                      ~(MASK_19 | MASK_03));
+        saa7146_write(av7110->saa_mem, ISR, (MASK_19 | MASK_03));
+
+        /* enable DEBI */
+        saa7146_write(av7110->saa_mem, MC1, 0x08800880);
+        saa7146_write(av7110->saa_mem, DD1_STREAM_B, 0x00000000);
+        saa7146_write(av7110->saa_mem, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+        
+        /* test DEBI */
+        iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4);
+        if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4))!=0x10325476) {
+                printk("dvb: debi test in bootarm() failed: "
+                       "%08x != %08x\n", ret, 0x10325476);;
+                return -1;
+        }
+        for (i=0; i<8192; i+=4) 
+                iwdebi(av7110, DEBISWAP, DPRAM_BASE+i, 0x00, 4);
+        dprintk("bootarm: debi test OK\n");;
+
+        /* boot */
+        dprintk("bootarm: load boot code\n");
+
+        setgpio(av7110, ARM_IRQ_LINE, GPIO_IRQLO);
+        //setgpio(av7110, DEBI_DONE_LINE, GPIO_INPUT);
+        //setgpio(av7110, 3, GPIO_INPUT);
+
+        iwdebi(av7110, DEBISWAB, DPRAM_BASE, (u32) bootcode, sizeof(bootcode));
+        iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
+        
+        wait_for_debi_done(av7110);
+        setgpio(av7110, RESET_LINE, GPIO_OUTHI);
+        current->state=TASK_INTERRUPTIBLE;
+        schedule_timeout(HZ);
+        
+        dprintk("bootarm: load dram code\n");
+
+	if (load_dram(av7110, (u32 *)Root, sizeof(Root))<0)
+		return -1;
+
+	setgpio(av7110, RESET_LINE, GPIO_OUTLO);
+        mdelay(1);
+        
+        dprintk("bootarm: load dpram code\n");
+
+	iwdebi(av7110, DEBISWAB, DPRAM_BASE, (u32) Dpram, sizeof(Dpram));
+
+	wait_for_debi_done(av7110);
+
+        setgpio(av7110, RESET_LINE, GPIO_OUTHI);
+        mdelay(800);
+
+        //ARM_ClearIrq(av7110); 
+        ARM_ResetMailBox(av7110); 
+        saa7146_write(av7110->saa_mem, ISR, (MASK_19 | MASK_03));
+        saa7146_write(av7110->saa_mem, IER, 
+                      saa7146_read(av7110->saa_mem, IER) | MASK_03 );
+
+        av7110->arm_errors=0;
+        av7110->arm_ready=1;
+        return 0;
+}
+
+static inline int
+SetPIDs(av7110_t *av7110, u16 vpid, u16 apid, u16 ttpid, 
+        u16 subpid, u16 pcrpid)
+{
+	if (vpid == 0x1fff || apid == 0x1fff ||
+	    ttpid == 0x1fff || subpid == 0x1fff || pcrpid == 0x1fff)
+		vpid = apid = ttpid = subpid = pcrpid = 0;
+
+        return outcom(av7110, COMTYPE_PIDFILTER, MultiPID, 5, 
+                      pcrpid, vpid, apid, ttpid, subpid);
+}
+
+static void
+ChangePIDs(av7110_t *av7110, u16 vpid, u16 apid, u16 ttpid, 
+        u16 subpid, u16 pcrpid)
+{
+        if (down_interruptible(&av7110->pid_mutex))
+		return;
+
+        if (!(vpid&0x8000))  av7110->pids[DMX_PES_VIDEO]=vpid;
+        if (!(apid&0x8000))  av7110->pids[DMX_PES_AUDIO]=apid;
+        if (!(ttpid&0x8000)) av7110->pids[DMX_PES_TELETEXT]=ttpid;
+        if (!(pcrpid&0x8000)) av7110->pids[DMX_PES_PCR]=pcrpid;
+
+        av7110->pids[DMX_PES_SUBTITLE]=0;
+
+        if (av7110->fe_synced) 
+                SetPIDs(av7110, vpid, apid, ttpid, subpid, pcrpid);
+
+        up(&av7110->pid_mutex);
+}
+
+
+static void 
+SetMode(av7110_t *av7110, int mode)
+{
+        outcom(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode);
+        
+        if (!av7110->playing) {
+                ChangePIDs(av7110, av7110->pids[DMX_PES_VIDEO], 
+                           av7110->pids[DMX_PES_AUDIO], 
+                           av7110->pids[DMX_PES_TELETEXT],  
+                           0, av7110->pids[DMX_PES_PCR]);
+                outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
+        }
+}
+
+inline static void 
+TestMode(av7110_t *av7110, int mode)
+{
+        outcom(av7110, COMTYPE_ENCODER, SetTestMode, 1, mode);
+}
+
+inline static void 
+VidMode(av7110_t *av7110, int mode)
+{
+        outcom(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode);
+}
+           
+
+static int inline
+vidcom(av7110_t *av7110, u32 com, u32 arg)
+{
+        return outcom(av7110, 0x80, 0x02, 4, 
+                      (com>>16), (com&0xffff), 
+                      (arg>>16), (arg&0xffff));
+}
+
+static int inline
+audcom(av7110_t *av7110, u32 com)
+{
+        return outcom(av7110, 0x80, 0x03, 4, 
+                      (com>>16), (com&0xffff));
+}
+
+inline static void 
+Set22K(av7110_t *av7110, int state)
+{
+        if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS)
+                outcom(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0);
+        if (av7110->saa->card_type==DVB_CARD_TT_BUDGET)
+                setgpio(av7110, 3, (state ? GPIO_OUTHI : GPIO_OUTLO));
+}
+
+
+/* Diseqc functions only for TT Budget card */
+/* taken from the Skyvision DVB driver by 
+   Ralph Metzler <rjkm@metzlerbros.de> */
+
+
+inline static void 
+DiseqcSendBit(av7110_t *av7110, int data)
+{
+        setgpio(av7110, 3, GPIO_OUTHI);
+        udelay(data ? 500 : 1000);
+        setgpio(av7110, 3, GPIO_OUTLO);
+        udelay(data ? 1000 : 500);
+}
+
+static void 
+DiseqcSendByte(av7110_t *av7110, int data)
+{
+        int i, par=1, d;
+
+        for (i=7; i>=0; i--) 
+        {
+                d=(data>>i)&1;
+                par^=d;
+                DiseqcSendBit(av7110, d);
+        }
+        DiseqcSendBit(av7110, par);
+}
+
+inline static int
+SendDiSEqCMsg(av7110_t *av7110, int len, u8 *msg, int burst)
+{
+        int i;
+
+        switch (av7110->saa->card_type) {
+        case DVB_CARD_TT_SIEMENS:
+        {
+                u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) + SendDiSEqC),
+                                16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+                
+                if (len>10)
+                        len=10;
+                buf[1] = len+2;
+                buf[2] = len;
+                
+                if (burst!=-1)
+                  buf[3]=burst ? 0x01 : 0x00;
+
+                else
+                  buf[3]=0xffff;
+                
+                for (i=0; i<len; i++)
+                  buf[i+4]=msg[i];
+                
+                SOutCommand(av7110, buf, 18);
+                break;
+        }
+
+        case DVB_CARD_TT_BUDGET:
+                setgpio(av7110, 3, GPIO_OUTLO);
+                
+                mdelay(16);
+                
+                for (i=0; i<len; i++)
+                        DiseqcSendByte(av7110, msg[i]);
+
+                mdelay(16);
+                
+                if (burst!=-1) {
+                        if (burst) 
+                                DiseqcSendByte(av7110, 0xff);
+                        else {
+                                setgpio(av7110, 3, GPIO_OUTHI);
+                                udelay(12500);
+                                setgpio(av7110, 3, GPIO_OUTLO);
+                        }
+                        
+                        ddelay(2);
+                }
+
+                break;
+
+        default:
+                return -1;
+        }
+        return 0;
+}
+
+/****************************************************************************
+ * I2C client commands
+ ****************************************************************************/
+
+static inline int
+i2c_writereg(av7110_t *av7110, u8 id, u8 reg, u8 val)
+{
+        u8 msg[2]={ reg, val }; 
+        struct dvb_i2c_bus *i2c = av7110->saa->i2c_bus;
+        struct i2c_msg msgs;
+
+        msgs.flags=0;
+        msgs.addr=id/2;
+        msgs.len=2;
+        msgs.buf=msg;
+        return i2c->xfer (i2c, &msgs, 1);
+}
+
+static inline int
+msp_writereg(av7110_t *av7110, u8 dev, u16 reg, u16 val)
+{
+        u8 msg[5]={ dev, reg>>8, reg&0xff, val>>8 , val&0xff }; 
+        struct dvb_i2c_bus *i2c = av7110->saa->i2c_bus;
+        struct i2c_msg msgs;
+
+        msgs.flags=0;
+        msgs.addr=0x40;
+        msgs.len=5;
+        msgs.buf=msg;
+        return i2c->xfer(i2c, &msgs, 1);
+}
+
+static inline u8
+i2c_readreg(av7110_t *av7110, u8 id, u8 reg)
+{
+        struct dvb_i2c_bus *i2c = av7110->saa->i2c_bus;
+        u8 mm1[] = {0x00};
+        u8 mm2[] = {0x00};
+        struct i2c_msg msgs[2];
+
+        msgs[0].flags=0;
+        msgs[1].flags=I2C_M_RD;
+        msgs[0].addr=msgs[1].addr=id/2;
+        mm1[0]=reg;
+        msgs[0].len=1; msgs[1].len=1;
+        msgs[0].buf=mm1; msgs[1].buf=mm2;
+        i2c->xfer(i2c, msgs, 2);
+
+        return mm2[0];
+}
+
+
+/****************************************************************************
+ * I/O buffer management and control
+ ****************************************************************************/
+
+static int sw2mode[16] = {
+        VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO_MODE_NTSC, VIDEO_MODE_PAL,
+        VIDEO_MODE_NTSC, VIDEO_MODE_NTSC, VIDEO_MODE_PAL, VIDEO_MODE_NTSC,
+        VIDEO_MODE_PAL, VIDEO_MODE_PAL, VIDEO_MODE_PAL, VIDEO_MODE_PAL,
+        VIDEO_MODE_PAL, VIDEO_MODE_PAL, VIDEO_MODE_PAL, VIDEO_MODE_PAL,
+};
+
+static void
+get_video_format(av7110_t *av7110, u8 *buf, int count)
+{
+        int i;
+	int hsize,vsize;
+        int sw;
+        u8 *p;
+
+        if (av7110->sinfo)
+                return;
+        for (i=7; i<count-10; i++) {
+                p=buf+i;
+                if (p[0] || p[1] || p[2]!=0x01 || p[3]!=0xb3)
+                        continue;
+                p+=4;
+                hsize = ((p[1] &0xF0) >> 4) | (p[0] << 4);
+                vsize = ((p[1] &0x0F) << 8) | (p[2]);
+                sw = (p[3]&0x0F);
+                SetMode(av7110, sw2mode[sw]);
+                dprintk("dvb: playback %dx%d fr=%d\n", hsize, vsize, sw);
+                av7110->sinfo=1;
+                break;
+        }
+}
+
+static void
+play_video_cb(u8 *buf, int count, void *priv)
+{
+        av7110_t *av7110=(av7110_t *) priv;
+
+        if ((buf[3]&0xe0)==0xe0) {
+                get_video_format(av7110, buf, count);
+                ring_buffer_write(&av7110->avout, buf, count, 0, 0);
+        } else
+                ring_buffer_write(&av7110->aout, buf, count, 0, 0);
+}
+
+static void
+play_audio_cb(u8 *buf, int count, void *priv)
+{
+        av7110_t *av7110=(av7110_t *) priv;
+        
+        ring_buffer_write(&av7110->aout, buf, count, 0, 0);
+}
+
+#define FREE_COND (ring_buffer_free(&av7110->avout)>=20*1024 && ring_buffer_free(&av7110->aout)>=20*1024)
+
+static ssize_t 
+dvb_play(av7110_t *av7110, const u8 *buf,
+         unsigned long count, int nonblock, int type, int umem)
+{
+        unsigned long todo = count, n;
+
+        if (!av7110->kbuf[type])
+                return -ENOBUFS;
+
+	if (nonblock && !FREE_COND)
+                return -EWOULDBLOCK;
+                
+        while (todo>0) {
+                if (!FREE_COND) {
+                        if (nonblock)
+                                return count-todo;
+                        if (wait_event_interruptible(av7110->avout.queue,
+                                                     FREE_COND))
+                        	return count-todo;
+                } 
+		n=todo;
+                if (n>IPACKS*2)
+                        n=IPACKS*2;
+                if (umem) {
+                        if (copy_from_user(av7110->kbuf[type], buf, n)) 
+                                return -EFAULT;
+                        instant_repack(av7110->kbuf[type], n, &av7110->ipack[type]);
+                } else
+                        instant_repack((u8 *)buf, n, &av7110->ipack[type]);
+                todo -= n;
+                buf += n;
+        }
+	return count-todo;
+}
+
+static ssize_t 
+dvb_aplay(av7110_t *av7110, const u8 *buf,
+         unsigned long count, int nonblock, int type)
+{
+        unsigned long todo = count, n;
+
+        if (!av7110->kbuf[type])
+                return -ENOBUFS;
+        if (nonblock && ring_buffer_free(&av7110->aout)<20*1024)
+                return -EWOULDBLOCK;
+                
+        while (todo>0) {
+                if (ring_buffer_free(&av7110->aout)<20*1024) {
+                        if (nonblock)
+                                return count-todo;
+                        if (wait_event_interruptible(av7110->aout.queue,
+                                                     (ring_buffer_free(&av7110->aout)>=
+                                                      20*1024)))
+                        	return count-todo;
+                } 
+		n=todo;
+                if (n>IPACKS*2)
+                        n=IPACKS*2;
+                if (copy_from_user(av7110->kbuf[type], buf, n)) 
+                        return -EFAULT;
+                instant_repack(av7110->kbuf[type], n, &av7110->ipack[type]);
+//                        memcpy(dvb->kbuf[type], buf, n); 
+                todo -= n;
+                buf += n;
+        }
+	return count-todo;
+}
+
+void init_p2t(p2t_t *p, dvb_demux_feed_t *feed)
+{
+	memset(p->pes,0,TS_SIZE);
+	p->counter = 0;
+	p->pos = 0;
+	p->frags = 0;
+	if (feed) p->feed = feed;
+}
+
+void clear_p2t(p2t_t *p)
+{
+	memset(p->pes,0,TS_SIZE);
+//	p->counter = 0;
+	p->pos = 0;
+	p->frags = 0;
+}
+
+
+long int find_pes_header(u8 const *buf, long int length, int *frags)
+{
+	int c = 0;
+	int found = 0;
+
+	*frags = 0;
+
+	while (c < length-3 && !found) {
+		if (buf[c] == 0x00 && buf[c+1] == 0x00 && 
+		    buf[c+2] == 0x01) {
+			switch ( buf[c+3] ) {
+				
+			case PROG_STREAM_MAP:
+			case PRIVATE_STREAM2:
+			case PROG_STREAM_DIR:
+			case ECM_STREAM     :
+			case EMM_STREAM     :
+			case PADDING_STREAM :
+			case DSM_CC_STREAM  :
+			case ISO13522_STREAM:
+			case PRIVATE_STREAM1:
+			case AUDIO_STREAM_S ... AUDIO_STREAM_E:
+			case VIDEO_STREAM_S ... VIDEO_STREAM_E:
+				found = 1;
+				break;
+				
+			default:
+				c++;
+				break;
+			}	
+		} else c++;
+	}
+	if (c == length-3 && !found){
+		if (buf[length-1] == 0x00) *frags = 1;
+		if (buf[length-2] == 0x00 &&
+		    buf[length-1] == 0x00) *frags = 2;
+		if (buf[length-3] == 0x00 &&
+		    buf[length-2] == 0x00 &&
+		    buf[length-1] == 0x01) *frags = 3;
+		return -1;
+	}
+
+	return c;
+}
+
+void pes_to_ts( u8 const *buf, long int length, u16 pid, p2t_t *p)
+{
+	int c,c2,l,add;
+	int check,rest;
+
+	c = 0;
+	c2 = 0;
+	if (p->frags){
+		check = 0;
+		switch(p->frags){
+		case 1:
+			if ( buf[c] == 0x00 && buf[c+1] == 0x01 ){
+				check = 1;
+				c += 2;
+			}
+			break;
+		case 2:
+			if ( buf[c] == 0x01 ){
+				check = 1;
+				c++;
+			}
+			break;
+		case 3:
+			check = 1;
+		}
+		if(check){
+			switch ( buf[c] ) {
+				
+			case PROG_STREAM_MAP:
+			case PRIVATE_STREAM2:
+			case PROG_STREAM_DIR:
+			case ECM_STREAM     :
+			case EMM_STREAM     :
+			case PADDING_STREAM :
+			case DSM_CC_STREAM  :
+			case ISO13522_STREAM:
+			case PRIVATE_STREAM1:
+			case AUDIO_STREAM_S ... AUDIO_STREAM_E:
+			case VIDEO_STREAM_S ... VIDEO_STREAM_E:
+				p->pes[0] = 0x00;
+				p->pes[1] = 0x00;
+				p->pes[2] = 0x01;
+				p->pes[3] = buf[c];
+				p->pos=4;
+				memcpy(p->pes+p->pos,buf+c,(TS_SIZE-4)-p->pos);
+				c += (TS_SIZE-4)-p->pos;
+				p_to_t(p->pes,(TS_SIZE-4),pid,&p->counter,
+				       p->feed);
+				clear_p2t(p);
+				break;
+				
+			default:
+				c=0;
+				break;
+			}
+		}
+		p->frags = 0;
+	}
+		
+	if (p->pos){
+		c2 = find_pes_header(buf+c,length-c,&p->frags);
+		if (c2 >= 0 && c2 < (TS_SIZE-4)-p->pos){
+			l = c2+c;
+		} else l = (TS_SIZE-4)-p->pos;
+		memcpy(p->pes+p->pos,buf,l);
+		c += l;
+		p->pos += l;
+		p_to_t(p->pes,p->pos,pid,&p->counter, p->feed);
+		clear_p2t(p);
+	}
+			
+	add = 0;
+	while (c < length){
+		c2 = find_pes_header(buf+c+add,length-c-add,&p->frags);
+		if (c2 >= 0) {
+			c2 += c+add;
+			if (c2 > c){
+				p_to_t(buf+c,c2-c,pid,&p->counter,
+				       p->feed);
+				c = c2;
+				clear_p2t(p);
+				add = 0;
+			} else add = 1;
+		} else {
+			l = length-c;
+			rest = l % (TS_SIZE-4);
+			l -= rest;
+			p_to_t(buf+c,l,pid,&p->counter,
+			       p->feed);
+			memcpy(p->pes,buf+c+l,rest);
+			p->pos = rest;
+			c = length;
+		}
+	}
+}
+
+
+int write_ts_header2(u16 pid, u8 *counter, int pes_start, u8 *buf, u8 length)
+{
+	int i;
+	int c = 0;
+	int fill;
+	u8 tshead[4] = { 0x47, 0x00, 0x00, 0x10}; 
+        
+
+	fill = (TS_SIZE-4)-length;
+        if (pes_start) tshead[1] = 0x40;
+	if (fill) tshead[3] = 0x30;
+        tshead[1] |= (u8)((pid & 0x1F00) >> 8);
+        tshead[2] |= (u8)(pid & 0x00FF);
+        tshead[3] |= ((*counter)++ & 0x0F) ;
+        memcpy(buf,tshead,4);
+	c+=4;
+
+
+	if (fill){
+		buf[4] = fill-1;
+		c++;
+		if (fill >1){
+			buf[5] = 0x00;
+			c++;
+		}
+		for ( i = 6; i < fill+4; i++){
+			buf[i] = 0xFF;
+			c++;
+		}
+	}
+
+        return c;
+}
+
+
+void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter, 
+            dvb_demux_feed_t *feed)
+{
+  
+	int l, pes_start;
+	u8 obuf[TS_SIZE];
+	long int c = 0;
+
+	pes_start = 0;
+	if ( length > 3 && 
+             buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0x01 )
+		switch (buf[3]){
+			case PROG_STREAM_MAP:
+			case PRIVATE_STREAM2:
+			case PROG_STREAM_DIR:
+			case ECM_STREAM     :
+			case EMM_STREAM     :
+			case PADDING_STREAM :
+			case DSM_CC_STREAM  :
+			case ISO13522_STREAM:
+			case PRIVATE_STREAM1:
+			case AUDIO_STREAM_S ... AUDIO_STREAM_E:
+			case VIDEO_STREAM_S ... VIDEO_STREAM_E:
+				pes_start = 1;
+				break;
+				
+			default:
+				break;
+		}			
+
+	while ( c < length ){
+		memset(obuf,0,TS_SIZE);
+		if (length - c >= (TS_SIZE-4)){
+			l = write_ts_header2(pid, counter, pes_start
+					     , obuf, (TS_SIZE-4));
+			memcpy(obuf+l, buf+c, TS_SIZE-l);
+			c += TS_SIZE-l;
+		} else { 
+			l = write_ts_header2(pid, counter, pes_start
+					     , obuf, length-c);
+			memcpy(obuf+l, buf+c, TS_SIZE-l);
+			c = length;
+		}
+                feed->cb.ts(obuf, 188, 0, 0, &feed->feed.ts, DMX_OK); 
+		pes_start = 0;
+	}
+}
+
+
+/****************************************************************************
+ * V4L SECTION
+ ****************************************************************************/
+
+static int dvb_do_ioctl (struct inode *inode, struct file *file,
+			 unsigned int cmd, void *arg)
+{
+	struct video_device *dev = video_devdata (file);
+	av7110_t *av7110 = dev->priv;
+
+	switch (cmd) {
+        case VIDIOCGCAP:
+        {
+                struct video_capability *b = arg;
+                
+                dprintk(KERN_ERR "dvb: VIDIOCGCAP called\n");
+
+                strcpy(b->name, &dev->name[0]);
+			
+                b->type 	= av7110->video.type;
+						
+                b->channels	= 1;	
+                b->audios	= 2;
+                b->maxwidth	= 768;
+                b->maxheight	= 576;
+                b->minwidth	= 32;
+                b->minheight	= 32;
+
+		return 0;
+        }
+
+	case VIDIOCGCHAN:
+        {
+		static const
+		struct video_channel dvb_chan = { 0, "DVB", 1, 3, 1, 1 };
+                struct video_channel *v = arg;
+                
+                dprintk(KERN_ERR "dvb: VIDIOCGCHAN called\n");
+                
+                memcpy(v, &dvb_chan, sizeof(struct video_channel));
+                
+                return 0;
+                
+        }
+
+	case VIDIOCSCHAN:
+        {
+                struct video_channel *v = arg;
+
+		dprintk(KERN_ERR "dvb: VIDIOCSCHAN called\n");
+
+		if (v->channel>0)
+			return -EINVAL;
+
+		if (v->norm > 1)
+			return -EOPNOTSUPP;
+
+                av7110->vidmode = v->norm;
+                SetMode(av7110, v->norm);
+                av7110->saa->mode = v->norm;
+		return 0;
+        }
+
+	case VIDIOCGTUNER:
+        {
+                struct video_tuner *v = arg;
+                
+                dprintk(KERN_ERR "dvb: VIDIOCGTUNER called\n");
+                
+                /* only channel 0 has a tuner */	
+                if(!v->tuner)
+                        return -EINVAL;
+                
+                /* fill the structure */
+                strcpy(v->name, "DVB");
+                v->rangelow  = 0x00000000;
+                v->rangehigh = 0xffffffff;
+                
+                v->flags= VIDEO_TUNER_PAL | VIDEO_TUNER_NTSC;
+                v->mode = av7110->vidmode;
+		
+                /* fixme: fill in signal strength here */
+                v->signal = 0xffff;
+                
+                return 0;
+        }
+
+        case VIDIOCSTUNER:
+        {
+                struct video_tuner *v = arg;
+                
+                dprintk(KERN_ERR "dvb: VIDIOCSTUNER called\n");
+                
+                /* only channel 0 has a tuner */
+                if (!v->tuner)
+                        return -EINVAL;
+                
+                /* check if format is supported */
+                if(v->mode != VIDEO_MODE_PAL && v->mode != VIDEO_MODE_NTSC
+                    /* && v->mode != VIDEO_MODE_SECAM */ )
+                       return -EOPNOTSUPP;
+                
+                av7110->vidmode = v->mode;
+                SetMode(av7110, v->mode);
+                
+                return 0;
+        }
+
+        case VIDIOCGPICT:
+        {
+                struct video_picture *p = arg;
+                
+                dprintk(KERN_ERR "dvb: VIDIOCGPICT called\n");
+
+		saacomm(SAA7146_V4L_GPICT, p);
+                
+                dprintk("dvb: VIDIOCGPICT called: b:%d c:%d s:%d d:%d p:%d\n",
+			p->brightness, p->contrast, p->colour,
+			p->depth, p->palette);
+                
+                return 0;
+        }
+
+        case VIDIOCSPICT:
+        {
+                struct video_picture *p = arg;
+                
+                dprintk("dvb: VIDIOCSPICT called: b:%d c:%d s:%d d:%d p:%d\n",
+			p->brightness, p->contrast, p->colour,
+			p->depth, p->palette);
+
+		switch (p->palette) {
+		case VIDEO_PALETTE_RGB555:
+		case VIDEO_PALETTE_RGB565:
+		case VIDEO_PALETTE_RGB24:
+		case VIDEO_PALETTE_RGB32:
+		case VIDEO_PALETTE_UYVY:
+		case VIDEO_PALETTE_YUV422P:
+		case VIDEO_PALETTE_YUV420P:
+		case VIDEO_PALETTE_YUV411P:
+			break;
+		default:
+			return -EINVAL;
+		}
+
+                saacomm(SAA7146_V4L_SPICT, p);
+                
+                return 0;
+                
+        }
+
+        case VIDIOCSWIN:
+        {
+                struct video_window *w = arg;
+
+                dprintk("dvb: VIDIOCSWIN called: "
+			"clips: %d, x:%d, y:%d, h:%d, w:%d\n",
+			w->clipcount, w->x, w->y, w->height, w->width);
+                
+                saacomm(SAA7146_V4L_SWIN, w);
+                
+                return 0;
+        }
+
+        case VIDIOCGWIN:
+        {
+                dprintk(KERN_ERR "dvb: VIDIOCGWIN called\n");
+                return 0;
+        }
+
+        case VIDIOCCAPTURE:
+        {
+                int *v = arg;
+                
+                dprintk("dvb: VIDIOCCAPTURE called, mode:%d (0=disable)\n", *v);
+                
+                saacomm(SAA7146_V4L_CCAPTURE, v);
+
+                return 0;
+        }
+
+        case VIDIOCGFBUF:
+        {
+                struct video_buffer *b = arg;
+                
+                dprintk(KERN_ERR "dvb: VIDIOCGFBUF called\n");
+                
+                saacomm(SAA7146_V4L_GFBUF, b);
+                
+                return 0;
+                
+        }
+
+        case VIDIOCSFBUF:
+        {
+                struct video_buffer *b = arg;
+                u32 vid = (vidmem << 16) | vidlow;
+
+                /* see if vidmem-override is requested */
+                if (vidmem) {
+                        printk ("dvb: video-memory-override. (0x%08x)\n", vid);
+                        b->base = (void*) vid;
+                }
+                
+                saacomm(SAA7146_V4L_SFBUF, b);
+                
+                dprintk(KERN_ERR "dvb: VIDIOCSFBUF called\n");
+                
+                return 0;		
+        }
+
+	/* Video key event - to dev 255 is to all - 
+	 * cuts capture on all DMA windows with this key (0xFFFFFFFF == all)
+	 */
+	case VIDIOCKEY:
+        {
+                dprintk(KERN_ERR "dvb: VIDIOCKEY called\n");
+                return 0;
+        }
+
+	case VIDIOCGAUDIO:
+        {
+                struct video_audio *v = arg;
+                
+                v->flags = VIDEO_AUDIO_MUTABLE;
+                /* let's auto-detect */
+                return 0;
+        }
+
+	case VIDIOCSAUDIO:
+        {
+        	//struct video_audio *v;
+                return 0;
+        }
+
+        case VIDIOCSYNC:
+        {
+                int i = 0;
+		int *frame = (int*) arg;
+                
+                dprintk ("dvb: VIDIOCSYNC called - frame: %d\n", *frame);
+                
+                /* simply pass the requested frame-number to the corresponding
+                   saa7146-function ... */
+                i = saacomm(SAA7146_V4L_CSYNC, frame);
+
+		dprintk ("dvb: VIDIOCSYNC done - frame: %d\n", *frame);
+                
+                return i;
+        }
+
+        case VIDIOCMCAPTURE:
+        {
+                struct video_mmap *vm = arg;
+                int i = 0;
+
+                dprintk(KERN_ERR "dvb: VIDIOCMCAPTURE called: fr:%d,"
+                        "fmt:%d, w:%d, h:%d\n",
+                        vm->frame, vm->format, vm->width, vm->height);
+
+		switch (vm->format) {
+		case VIDEO_PALETTE_YUV422P:
+		case VIDEO_PALETTE_YUV420P:
+		case VIDEO_PALETTE_YUV411P:
+			return -EINVAL;
+		}
+
+                /* simply pass the structure for the requested frame-number
+                   to the corresponding saa7146-function ... */
+                i = saacomm(SAA7146_V4L_CMCAPTURE, vm);
+                
+                return i;
+        }
+
+        case VIDIOCGMBUF:
+        {
+                struct video_mbuf *mbuf = arg;
+                dprintk(KERN_ERR "dvb: VIDIOCGMBUF called\n");
+                saacomm(SAA7146_V4L_GMBUF, mbuf);
+                return 0;
+                
+        }
+
+        case VIDIOCGUNIT:
+        {
+                /*struct video_unit vu;*/
+                dprintk(KERN_ERR "dvb: VIDIOCGUNIT called\n");
+                return 0;
+        }
+		
+        case VIDIOCGCAPTURE:
+        {
+                dprintk(KERN_ERR "dvb: VIDIOCGCAPTURE called\n");
+                return 0;
+        }
+        case VIDIOCSCAPTURE:
+        {
+                dprintk(KERN_ERR "dvb: VIDIOCSCAPTURE called\n");
+                return 0;
+        }
+
+        default:
+                return -ENOIOCTLCMD;
+	}
+
+	return 0;
+}
+
+
+static int dvb_ioctl (struct inode *inode, struct file *file,
+		      unsigned int cmd, unsigned long arg)
+{
+	return video_usercopy(inode, file, cmd, arg, dvb_do_ioctl);
+}
+
+
+static int dvb_mmap(struct file* file, struct vm_area_struct *vma)
+{
+	struct video_device *dev = video_devdata (file);
+	av7110_t *av7110 = dev->priv;
+
+	dprintk(KERN_ERR "av7110: dvb_mmap called, adr:%08lx, size:0x%08lx\n",
+		vma->vm_start, vma->vm_end - vma->vm_start);
+
+	if (saacomm(SAA7146_DO_MMAP, vma)) {
+		printk(KERN_ERR "av7110: dvb_mmap failed!\n");
+		return -1;
+	}
+
+	return 0;
+}
+
+
+static unsigned int dvb_audio_poll(struct file *file, poll_table *wait)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        unsigned int mask=0;
+
+        if (av7110->playing) {
+                if (ring_buffer_free(&av7110->aout)>20*1024)
+                        return (POLLOUT | POLLWRNORM);
+
+                poll_wait(file, &av7110->aout.queue, wait);
+          
+                if (ring_buffer_free(&av7110->aout)>20*1024)
+                        mask |= (POLLOUT | POLLWRNORM);
+        } else /* if not playing: may play if asked for */
+                mask = (POLLOUT | POLLWRNORM);
+                
+        return mask;
+}
+
+
+static struct file_operations dvb_fops = {
+	ioctl:         dvb_ioctl,
+	mmap:          dvb_mmap,
+	llseek:        no_llseek    
+};
+
+
+/* template for video_device-structure */
+static struct video_device dvb_template = {
+	owner:		THIS_MODULE,
+	name:	        "DVB Board",
+	type:	        VID_TYPE_TUNER		|
+        	        VID_TYPE_CAPTURE	|
+	                VID_TYPE_OVERLAY	|
+        	        VID_TYPE_CLIPPING	|
+                	VID_TYPE_FRAMERAM	|
+	                VID_TYPE_SCALES,
+	hardware:       VID_HARDWARE_SAA7146,
+	fops:		&dvb_fops
+};
+
+
+static int vid_register(av7110_t *av7110)
+{
+        memcpy( &av7110->video, &dvb_template, sizeof(struct video_device));
+
+	av7110->video.priv = av7110;
+
+        if (video_register_device(&av7110->video, VFL_TYPE_GRABBER, -1)) {
+                printk(KERN_ERR "dvb: can't register videodevice\n");
+                return -1;
+        }
+
+        return 0;
+}
+
+static inline int vid_unregister(av7110_t *av7110)
+{
+        if (av7110->video.minor != -1)
+                video_unregister_device(&av7110->video);
+
+	return 0;
+}
+
+/****************************************************************************
+ * END OF V4L SECTION
+ ****************************************************************************/
+
+
+/****************************************************************************
+ * DVB API SECTION
+ ****************************************************************************/
+
+
+/******************************************************************************
+ * hardware filter functions
+ ******************************************************************************/
+
+static int 
+StartHWFilter(dvb_demux_filter_t *dvbdmxfilter)
+{
+        dvb_demux_feed_t *dvbdmxfeed=dvbdmxfilter->feed;
+        av7110_t *av7110=(av7110_t *) dvbdmxfeed->demux->priv;
+        u16 buf[20];
+        int ret, i;
+        u16 handle;
+//        u16 mode=0x0320;
+        u16 mode=0xb96a;
+        
+        if (dvbdmxfilter->type==DMX_TYPE_SEC) {
+                buf[4]=(dvbdmxfilter->filter.filter_value[0]<<8)|
+                        dvbdmxfilter->maskandmode[0];
+                for (i=3; i<18; i++)
+                        buf[i+4-2]=(dvbdmxfilter->filter.filter_value[i]<<8)|
+                                dvbdmxfilter->maskandmode[i];
+                mode=4;
+        } else
+        if ((dvbdmxfeed->ts_type & TS_PACKET) &&
+            !(dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY)) 
+                init_p2t(&av7110->p2t_filter[dvbdmxfilter->index], dvbdmxfeed);
+
+        buf[0] = (COMTYPE_PID_FILTER << 8) + AddPIDFilter; 
+        buf[1] = 16;	
+        buf[2] = dvbdmxfeed->pid;
+        buf[3] = mode;
+
+        ret=CommandRequest(av7110, buf, 20, &handle, 1);          
+        if (ret<0)
+                return ret;
+
+        av7110->handle2filter[handle]=dvbdmxfilter;
+        dvbdmxfilter->hw_handle=handle;
+
+        return ret;
+}
+
+static int 
+StopHWFilter(dvb_demux_filter_t *dvbdmxfilter)
+{
+        av7110_t *av7110=(av7110_t *) dvbdmxfilter->feed->demux->priv;
+        u16 buf[3];
+        u16 answ[2];
+        int ret;
+        u16 handle;
+                
+        handle=dvbdmxfilter->hw_handle;
+        if (handle>32) {
+                dprintk("dvb: StopHWFilter tried to stop invalid filter %d.\n",
+                       handle);
+                dprintk("dvb: filter type = %d\n",  dvbdmxfilter->type);
+                return 0;
+        }
+
+        av7110->handle2filter[handle]=NULL;
+
+        buf[0] = (COMTYPE_PID_FILTER << 8) + DelPIDFilter; 
+        buf[1] = 1;	
+        buf[2] = handle;
+        ret=CommandRequest(av7110, buf, 3, answ, 2);          
+
+        if (answ[1] != handle) {
+                dprintk("dvb: filter %d shutdown error :%d\n", handle, answ[1]);
+                ret=-1;
+        }
+        return ret;
+}
+
+
+static int 
+dvb_write_to_decoder(dvb_demux_feed_t *dvbdmxfeed, u8 *buf, size_t count)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+        av7110_t *av7110=(av7110_t *) dvbdmx->priv;
+        ipack *ipack=&av7110->ipack[dvbdmxfeed->pes_type];
+
+        switch (dvbdmxfeed->pes_type) {
+        case 0:
+                if (av7110->audiostate.stream_source==AUDIO_SOURCE_MEMORY) {
+                        return -EINVAL;
+                }
+                break;
+        case 1:
+                if (av7110->videostate.stream_source==VIDEO_SOURCE_MEMORY) {
+                        return -EINVAL;
+                }
+                break;
+        default:
+                return -1;
+        }
+
+        if (!(buf[3]&0x10)) { // no payload?
+                return -1;
+        }
+        if (buf[1]&0x40)
+                send_ipack_rest(ipack);
+
+        if (buf[3]&0x20) {  // adaptation field?
+                count-=buf[4]+1;
+                buf+=buf[4]+1;
+                if (!count) {
+                        return 0;
+                }
+        }
+        
+        instant_repack(buf+4, count-4, &av7110->ipack[dvbdmxfeed->pes_type]);
+        return 0;
+}
+
+static void
+dvb_feed_start_pid(dvb_demux_feed_t *dvbdmxfeed)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+        av7110_t *av7110=(av7110_t *) dvbdmx->priv;
+        u16 *pid=dvbdmx->pids, npids[5];
+        int i;
+        
+        npids[0]=npids[1]=npids[2]=npids[3]=0xffff;
+        npids[4]=0xffff;
+        i=dvbdmxfeed->pes_type;
+        npids[i]=(pid[i]&0x8000) ? 0 : pid[i];
+        if ((i==2) && npids[i] && (dvbdmxfeed->ts_type & TS_PACKET)) {
+                npids[i]=0;
+                ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]);
+                StartHWFilter(dvbdmxfeed->filter); 
+                return;
+        }
+        if (dvbdmxfeed->pes_type<=2)
+                ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]);
+
+        if (dvbdmxfeed->pes_type<2 && npids[0])
+                if (av7110->fe_synced) 
+                        outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
+
+        if ((dvbdmxfeed->ts_type & TS_PACKET)) { 
+                if (dvbdmxfeed->pes_type == 0 && 
+                    !(dvbdmx->pids[0]&0x8000))
+                        AV_StartRecord(av7110, RP_AUDIO, 
+                                       dvbdmxfeed);
+                if (dvbdmxfeed->pes_type == 1 && 
+                    !(dvbdmx->pids[1]&0x8000))
+                        AV_StartRecord(av7110, RP_VIDEO, 
+                                       dvbdmxfeed);
+        }
+}
+
+static void
+dvb_feed_stop_pid(dvb_demux_feed_t *dvbdmxfeed)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+        av7110_t *av7110=(av7110_t *) dvbdmx->priv;
+        u16 *pid=dvbdmx->pids, npids[5];
+        int i;
+        
+        if (dvbdmxfeed->pes_type<=1) {
+                AV_Stop(av7110, dvbdmxfeed->pes_type ? 
+                        RP_VIDEO : RP_AUDIO);
+                if (!av7110->rec_mode)
+                        dvbdmx->recording=0;
+                if (!av7110->playing)
+                        dvbdmx->playing=0;
+        }
+        npids[0]=npids[1]=npids[2]=npids[3]=0xffff;
+        npids[4]=0xffff;
+        i=dvbdmxfeed->pes_type;
+        switch (i) {
+        case 2: //teletext
+                if (dvbdmxfeed->ts_type & TS_PACKET)
+                        StopHWFilter(dvbdmxfeed->filter); 
+                npids[2]=0;
+                break;
+        case 0:
+        case 1:
+        case 4:
+                if (!pids_off) 
+                        return;
+                npids[i]=(pid[i]&0x8000) ? 0 : pid[i];
+                break;
+        }
+        ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]);
+}
+
+static int 
+dvb_start_feed(dvb_demux_feed_t *dvbdmxfeed)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+        av7110_t *av7110=(av7110_t *) dvbdmx->priv;
+
+        if (!dvbdmx->dmx.frontend)
+                return -EINVAL;
+
+        if (av7110->saa->card_type>=DVB_CARD_TT_BUDGET)
+                return TTBStart(av7110); 
+
+        if (dvbdmxfeed->pid>0x1fff) 
+                return -1;
+
+        if (dvbdmxfeed->type == DMX_TYPE_TS) {
+	        if ((dvbdmxfeed->ts_type & TS_DECODER) 
+		    && (dvbdmxfeed->pes_type<DMX_TS_PES_OTHER)) {
+
+		        switch (dvbdmx->dmx.frontend->source) {
+			case DMX_MEMORY_FE: 
+			        if (dvbdmxfeed->ts_type & TS_DECODER)
+				       if (dvbdmxfeed->pes_type<2 && 
+                                           !(dvbdmx->pids[0]&0x8000) &&
+					   !(dvbdmx->pids[1]&0x8000)) {
+                                               ring_buffer_flush(&av7110->avout);
+                                               ring_buffer_flush(&av7110->aout);
+                                               AV_StartPlay(av7110,RP_AV);
+                                               dvbdmx->playing=1;
+					}
+				break;
+			default:
+                                dvb_feed_start_pid(dvbdmxfeed);
+				break;
+			}
+		} else
+		        if ((dvbdmxfeed->ts_type & TS_PACKET) &&
+                            (dvbdmx->dmx.frontend->source!=DMX_MEMORY_FE))
+                                StartHWFilter(dvbdmxfeed->filter); 
+        }
+        
+        if (dvbdmxfeed->type == DMX_TYPE_SEC) {
+                int i;
+
+	        for (i=0; i<dvbdmx->filternum; i++) {
+		        if (dvbdmx->filter[i].state!=DMX_STATE_READY)
+			        continue;
+			if (dvbdmx->filter[i].type!=DMX_TYPE_SEC)
+			        continue;
+			if (dvbdmx->filter[i].filter.parent!=&dvbdmxfeed->feed.sec)
+			        continue;
+			dvbdmx->filter[i].state=DMX_STATE_GO;
+                        if (dvbdmx->dmx.frontend->source!=DMX_MEMORY_FE)
+                                StartHWFilter(&dvbdmx->filter[i]); 
+                }
+	}
+        return 0;
+}
+
+
+static int 
+dvb_stop_feed(dvb_demux_feed_t *dvbdmxfeed)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+        av7110_t *av7110=(av7110_t *) dvbdmx->priv;
+
+        if (av7110->saa->card_type>=DVB_CARD_TT_BUDGET) 
+                return TTBStop(av7110); 
+
+        if (dvbdmxfeed->type == DMX_TYPE_TS) {
+                if (dvbdmxfeed->ts_type & TS_DECODER) {
+                        if (dvbdmxfeed->pes_type>=DMX_TS_PES_OTHER ||
+                            !dvbdmx->pesfilter[dvbdmxfeed->pes_type]) 
+                                return -EINVAL;
+                        dvbdmx->pids[dvbdmxfeed->pes_type]|=0x8000;
+                        dvbdmx->pesfilter[dvbdmxfeed->pes_type]=0;
+                }
+                if (dvbdmxfeed->ts_type & TS_DECODER &&
+		    (dvbdmxfeed->pes_type<DMX_TS_PES_OTHER)) {
+                        dvb_feed_stop_pid(dvbdmxfeed);
+                } else 
+                        if ((dvbdmxfeed->ts_type & TS_PACKET) &&
+                            (dvbdmx->dmx.frontend->source!=DMX_MEMORY_FE))
+                                StopHWFilter(dvbdmxfeed->filter); 
+        }
+        
+        if (dvbdmxfeed->type == DMX_TYPE_SEC) {
+                int i;
+
+	        for (i=0; i<dvbdmx->filternum; i++)
+		        if (dvbdmx->filter[i].state==DMX_STATE_GO && 
+			    dvbdmx->filter[i].filter.parent==&dvbdmxfeed->feed.sec) {
+			        dvbdmx->filter[i].state=DMX_STATE_READY;
+                                if (dvbdmx->dmx.frontend->source!=DMX_MEMORY_FE)
+                                        StopHWFilter(&dvbdmx->filter[i]); 
+                }
+	}
+        return 0;
+}
+
+
+static void 
+restart_feeds(av7110_t *av7110)
+{
+        dvb_demux_t *dvbdmx=&av7110->demux;
+        dvb_demux_feed_t *feed;
+        int mode;
+        int i;
+
+        mode=av7110->playing;
+        av7110->playing=0;
+        av7110->rec_mode=0;
+
+        for (i=0; i<dvbdmx->filternum; i++) {
+                feed=&dvbdmx->feed[i];
+                if (feed->state==DMX_STATE_GO)
+                        dvb_start_feed(feed);
+        }
+
+        if (mode)
+                AV_StartPlay(av7110, mode);
+}
+
+/******************************************************************************
+ * SEC device file operations
+ ******************************************************************************/
+
+static
+int av7110_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
+{
+	av7110_t *av7110 = fe->before_after_data;
+
+	switch (cmd) {
+	case FE_SET_TONE:
+		switch ((fe_sec_tone_mode_t) arg) {
+		case SEC_TONE_ON:
+			Set22K (av7110, 1);
+			break;
+		case SEC_TONE_OFF:
+			Set22K (av7110, 0);
+			break;
+		default:
+			return -EINVAL;
+		};
+		break;
+
+	case FE_DISEQC_SEND_MASTER_CMD:
+	{
+		struct dvb_diseqc_master_cmd *cmd = arg;
+
+		SendDiSEqCMsg (av7110, cmd->msg_len, cmd->msg, 0);
+		break;
+	}
+
+	case FE_DISEQC_SEND_BURST:
+		SendDiSEqCMsg (av7110, 0, NULL, (int) arg);
+		break;
+
+	default:
+		return -EOPNOTSUPP;
+	};
+
+	return 0;
+}
+
+/******************************************************************************
+ * CI link layer file ops (FIXME: move this to separate module later)
+ ******************************************************************************/
+
+int ci_ll_init(ring_buffer_t *cirbuf, ring_buffer_t *ciwbuf, int size)
+{
+        ring_buffer_init(cirbuf, vmalloc(size), size);
+        ring_buffer_init(ciwbuf, vmalloc(size), size);
+        return 0;
+}
+
+void ci_ll_flush(ring_buffer_t *cirbuf, ring_buffer_t *ciwbuf)
+{
+        ring_buffer_flush(cirbuf);
+        ring_buffer_flush(ciwbuf);
+}
+
+void ci_ll_release(ring_buffer_t *cirbuf, ring_buffer_t *ciwbuf)
+{
+        vfree(cirbuf->data);
+        cirbuf->data=0;
+        vfree(ciwbuf->data);
+        ciwbuf->data=0;
+}
+
+
+int ci_ll_reset(ring_buffer_t *cibuf, struct file *file, 
+                int slots, ca_slot_info_t *slot)
+{
+	int i;
+
+        if (ring_buffer_free(cibuf)<8)
+                return -EBUSY;
+	for (i=0; i<2; i++) 
+		if (slots&(1<<i)) {
+                        cibuf->data[cibuf->pwrite]=0x00;   
+                        cibuf->data[(cibuf->pwrite+1)%cibuf->size]=0x06;
+                        cibuf->data[(cibuf->pwrite+2)%cibuf->size]=i;
+                        cibuf->data[(cibuf->pwrite+3)%cibuf->size]=0x00;
+                        cibuf->data[(cibuf->pwrite+4)%cibuf->size]=0xff;
+                        cibuf->data[(cibuf->pwrite+5)%cibuf->size]=0x02;
+                        cibuf->data[(cibuf->pwrite+6)%cibuf->size]=0x00;
+                        cibuf->data[(cibuf->pwrite+7)%cibuf->size]=0x00;
+                        cibuf->pwrite=(cibuf->pwrite+8)%cibuf->size;
+                        slot[i].flags=0;
+                }
+        return 0;
+}
+
+static ssize_t 
+ci_ll_write(ring_buffer_t *cibuf, struct file *file, const char *buf, size_t count, loff_t *ppos)
+{
+	int free, split;
+        int32_t pread;
+        int non_blocking=file->f_flags&O_NONBLOCK;
+	
+        if (count>2048)
+                return -EINVAL;
+	pread=cibuf->pread; 
+	free=pread-cibuf->pwrite;
+	if (free<=0) 
+                free+=cibuf->size;
+	if (count+2>=free) { 
+                if (non_blocking)
+                        return -EWOULDBLOCK;
+                if (wait_event_interruptible(cibuf->queue,
+                                             (ring_buffer_free(cibuf)>count+2)))
+                        return 0;
+        }
+        cibuf->data[cibuf->pwrite]=(count>>8);   
+	cibuf->data[(cibuf->pwrite+1)%cibuf->size]=(count&0xff); 
+        cibuf->pwrite=(cibuf->pwrite+2)%cibuf->size;
+
+	if (pread>cibuf->pwrite)
+		split=0;
+	else
+		split=cibuf->size-cibuf->pwrite;
+        if (split && split<count) {
+                if (copy_from_user(cibuf->data + cibuf->pwrite, buf, split))
+                        return -EFAULT;
+		if (copy_from_user(cibuf->data, buf+split, count-split))
+                        return -EFAULT;
+        } else 
+		if (copy_from_user(cibuf->data + cibuf->pwrite, buf, count))
+                        return -EFAULT;
+        cibuf->pwrite=(cibuf->pwrite+count)%cibuf->size;
+	return count;
+}
+
+static ssize_t 
+ci_ll_read(ring_buffer_t *cibuf, struct file *file, char *buf, size_t count, loff_t *ppos)
+{
+        int split=0, avail, pwrite;
+        int non_blocking=file->f_flags&O_NONBLOCK;
+	
+	if (!cibuf->data || !count)
+	        return 0;
+	if (non_blocking && (ring_buffer_empty(cibuf)))
+	        return -EWOULDBLOCK;
+	if (wait_event_interruptible(cibuf->queue,
+				     !ring_buffer_empty(cibuf)))
+		return 0;
+        pwrite=cibuf->pwrite;
+	avail=pwrite - cibuf->pread;
+	if (avail<0) 
+                avail+=cibuf->size;
+	if (avail<4) 
+                return 0;
+	count=(cibuf->data[cibuf->pread]<<8);  
+	count|=cibuf->data[(cibuf->pread+1)%cibuf->size];
+	if (avail<count+2) 
+                return -EINVAL;
+        cibuf->pread=(cibuf->pread+2)%cibuf->size;	
+
+        if (pwrite<cibuf->pread)
+                split=cibuf->size-cibuf->pread;
+	if (split && split<count) {
+		if (copy_to_user(buf, cibuf->data+cibuf->pread, split))
+			return -EFAULT;
+		if (copy_to_user(buf+split, cibuf->data, count-split))
+			return -EFAULT;
+	} else 
+		if (copy_to_user(buf, cibuf->data+cibuf->pread, count))
+			return -EFAULT;
+	cibuf->pread=(cibuf->pread + count)%cibuf->size;
+	return count;
+}
+
+static int 
+dvb_ca_open(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        int err=dvb_generic_open(inode, file);
+
+        if (err<0)
+                return err;
+        ci_ll_flush(&av7110->ci_rbuffer, &av7110->ci_wbuffer);
+        return 0;
+}
+
+static unsigned 
+int dvb_ca_poll(struct file *file, poll_table *wait)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+
+        unsigned int mask=0;
+
+        ring_buffer_t *rbuf=&av7110->ci_rbuffer;
+        ring_buffer_t *wbuf=&av7110->ci_wbuffer;
+
+        if (!ring_buffer_empty(rbuf))
+                mask|=POLLIN;
+        if (ring_buffer_avail(wbuf)>1024)
+                mask|=POLLOUT;
+        if (mask)
+                return mask;
+        
+        poll_wait(file, &rbuf->queue, wait);
+        
+        if (!ring_buffer_empty(rbuf))
+                mask|=POLLIN;
+        if (ring_buffer_avail(wbuf)>1024)
+                mask|=POLLOUT;
+        
+        return mask;
+}
+
+static int 
+dvb_ca_ioctl(struct inode *inode, struct file *file, 
+             unsigned int cmd, void *parg)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        unsigned long arg=(unsigned long) parg;
+
+        switch (cmd) {
+        case CA_RESET:
+#ifdef NEW_CI
+                
+                return ci_ll_reset(&av7110->ci_wbuffer, file, arg, &av7110->ci_slot[0]);
+#endif                        
+                break;
+                
+        case CA_GET_CAP:
+        {
+                ca_cap_t cap;
+                
+                cap.slot_num=2;
+#ifdef NEW_CI
+                cap.slot_type=CA_CI_LINK;
+#else
+                cap.slot_type=CA_CI;
+#endif
+                cap.descr_num=16;
+                cap.descr_type=CA_ECD;
+                memcpy(parg, &cap, sizeof(cap));
+        }
+        break;
+
+        case CA_GET_SLOT_INFO:
+        {
+                ca_slot_info_t *info=(ca_slot_info_t *)parg;
+
+                if (info->num>1)
+                        return -EINVAL;
+#ifdef NEW_CI
+                av7110->ci_slot[info->num].type = CA_CI_LINK;
+#else
+                av7110->ci_slot[info->num].type = CA_CI;
+#endif
+                memcpy(info, &av7110->ci_slot[info->num], sizeof(ca_slot_info_t));
+        }
+        break;
+
+        case CA_GET_MSG:
+                break;
+
+        case CA_SEND_MSG:
+                break;
+                
+        case CA_GET_DESCR_INFO:
+        {
+                ca_descr_info_t info;
+
+                info.num=16;
+                info.type=CA_ECD;
+                memcpy (parg, &info, sizeof (info));
+        }
+        break;
+
+        case CA_SET_DESCR:
+        {
+                ca_descr_t *descr=(ca_descr_t*) parg;
+                
+                if (descr->index>=16)
+                        return -EINVAL;
+                if (descr->parity>1)
+                        return -EINVAL;
+                outcom(av7110, COMTYPE_PIDFILTER, SetDescr, 5, 
+                       (descr->index<<8)|descr->parity,
+                       (descr->cw[0]<<8)|descr->cw[1],
+                       (descr->cw[2]<<8)|descr->cw[3],
+                       (descr->cw[4]<<8)|descr->cw[5],
+                       (descr->cw[6]<<8)|descr->cw[7]);
+        }
+        break;
+
+        default:
+                return -EINVAL;
+        }
+        return 0;
+}
+
+static ssize_t 
+dvb_ca_write(struct file *file, const char *buf, 
+             size_t count, loff_t *ppos)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        
+        return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos);
+}
+
+static ssize_t 
+dvb_ca_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+
+        return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos);
+
+}
+
+
+
+/******************************************************************************
+ * DVB device file operations
+ ******************************************************************************/
+
+static unsigned int dvb_video_poll(struct file *file, poll_table *wait)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        unsigned int mask=0;
+
+        if (av7110->playing) {
+                if (FREE_COND)
+                        return (POLLOUT | POLLWRNORM);
+
+                poll_wait(file, &av7110->avout.queue, wait);
+          
+                if (FREE_COND)
+                        mask |= (POLLOUT | POLLWRNORM);
+        } else /* if not playing: may play if asked for */
+                mask = (POLLOUT | POLLWRNORM);
+                
+        return mask;
+}
+
+static ssize_t 
+dvb_video_write(struct file *file, const char *buf, 
+                size_t count, loff_t *ppos)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+
+        if (av7110->videostate.stream_source!=VIDEO_SOURCE_MEMORY) 
+                return -EPERM;
+
+	return dvb_play(av7110, buf, count, file->f_flags&O_NONBLOCK, 1, 1);
+}
+
+static ssize_t 
+dvb_audio_write(struct file *file, const char *buf, 
+                size_t count, loff_t *ppos)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+
+        if (av7110->audiostate.stream_source!=AUDIO_SOURCE_MEMORY) {
+                printk(KERN_ERR "not audio source memory\n");
+                return -EPERM;
+        }
+        return dvb_aplay(av7110, buf, count, file->f_flags&O_NONBLOCK, 0);
+}
+
+u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 };
+
+#define MIN_IFRAME 400000
+
+static void 
+play_iframe(av7110_t *av7110, u8 *buf, unsigned int len, int nonblock)
+{
+        int i, n=1;
+       
+        if (!(av7110->playing&RP_VIDEO)) {
+                AV_StartPlay(av7110, RP_VIDEO);
+                n=MIN_IFRAME/len+1;
+        }
+
+	dvb_play(av7110, iframe_header, sizeof(iframe_header), 0, 1, 0);
+
+	for (i=0; i<n; i++) 
+                dvb_play(av7110, buf, len, 0, 1, 1);
+
+	send_ipack_rest(&av7110->ipack[1]);
+}
+
+
+static int 
+dvb_video_ioctl(struct inode *inode, struct file *file,
+            unsigned int cmd, void *parg)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        unsigned long arg=(unsigned long) parg;
+        int ret=0;
+        
+        if (((file->f_flags&O_ACCMODE)==O_RDONLY) &&
+            (cmd!=VIDEO_GET_STATUS))
+                return -EPERM;
+        
+        switch (cmd) {
+        case VIDEO_STOP:
+                av7110->videostate.play_state=VIDEO_STOPPED;
+                if (av7110->videostate.stream_source==VIDEO_SOURCE_MEMORY)
+                        AV_Stop(av7110, RP_VIDEO);
+                else
+                        vidcom(av7110, 0x000e, 
+                               av7110->videostate.video_blank ? 0 : 1);
+                av7110->trickmode=TRICK_NONE;
+                break; 
+                
+        case VIDEO_PLAY:
+                av7110->trickmode=TRICK_NONE;
+                if (av7110->videostate.play_state==VIDEO_FREEZED) {
+                        av7110->videostate.play_state=VIDEO_PLAYING;
+                        vidcom(av7110, 0x000d, 0);
+                } 
+                
+                if (av7110->videostate.stream_source==VIDEO_SOURCE_MEMORY) {
+                        if (av7110->playing==RP_AV) {
+                                outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+                                av7110->playing&=~RP_VIDEO;
+                        }
+                        AV_StartPlay(av7110,RP_VIDEO);
+                        vidcom(av7110, 0x000d, 0);
+                } else {
+                        //AV_Stop(av7110, RP_VIDEO);
+                        vidcom(av7110, 0x000d, 0);
+                }
+                av7110->videostate.play_state=VIDEO_PLAYING;
+                break;
+                
+        case VIDEO_FREEZE:
+                av7110->videostate.play_state=VIDEO_FREEZED;
+                if (av7110->playing&RP_VIDEO) 
+                        outcom(av7110, COMTYPE_REC_PLAY, __Pause, 0);
+                else
+                        vidcom(av7110, 0x0102, 1);
+                av7110->trickmode=TRICK_FREEZE;
+                break;
+                
+        case VIDEO_CONTINUE:
+                if (av7110->playing&RP_VIDEO) 
+                        outcom(av7110, COMTYPE_REC_PLAY, __Continue, 0);
+                vidcom(av7110, 0x000d, 0);
+                av7110->videostate.play_state=VIDEO_PLAYING;
+                av7110->trickmode=TRICK_NONE;
+                break;
+                
+        case VIDEO_SELECT_SOURCE:
+                av7110->videostate.stream_source=(video_stream_source_t) arg;
+                break;
+                
+        case VIDEO_SET_BLANK:
+                av7110->videostate.video_blank=(int) arg;
+		break;
+                
+        case VIDEO_GET_STATUS:
+                memcpy(parg, &av7110->videostate, sizeof(struct video_status));
+                break;
+                
+        case VIDEO_GET_EVENT:
+                //FIXME: write firmware support for this
+                ret=-EOPNOTSUPP;
+                
+        case VIDEO_SET_DISPLAY_FORMAT:
+        {
+                video_displayformat_t format=(video_displayformat_t) arg;
+                u16 val=0;
+                
+                switch(format) {
+                case VIDEO_PAN_SCAN:
+                        val=VID_PAN_SCAN_PREF;
+                        break;
+                        
+                case VIDEO_LETTER_BOX:
+                        val=VID_VC_AND_PS_PREF;
+                        break;
+                        
+                case VIDEO_CENTER_CUT_OUT:
+                        val=VID_CENTRE_CUT_PREF;
+                        break;
+                        
+                default:
+                        ret=-EINVAL;
+                        break;
+                }
+                if (ret<0)
+                        break;
+                av7110->videostate.video_format=format;
+                ret=outcom(av7110, COMTYPE_ENCODER, SetPanScanType, 
+                           1, (u16) val);
+                break;
+        }
+        
+        case VIDEO_SET_FORMAT:
+                if (arg>1) {
+                        ret=-EINVAL;
+                        break;
+                }
+                av7110->display_ar=arg;
+                ret=outcom(av7110, COMTYPE_ENCODER, SetMonitorType, 
+                           1, (u16) arg);
+                break;
+                
+        case VIDEO_STILLPICTURE:
+        { 
+                struct video_still_picture *pic=
+                        (struct video_still_picture *) parg;
+                ring_buffer_flush(&av7110->avout);
+                play_iframe(av7110, pic->iFrame, pic->size, 
+                            file->f_flags&O_NONBLOCK);
+                break;
+        }
+        
+        case VIDEO_FAST_FORWARD:
+                //note: arg is ignored by firmware
+                if (av7110->playing&RP_VIDEO) 
+                        outcom(av7110, COMTYPE_REC_PLAY, 
+                               __Scan_I, 2, AV_PES, 0);
+                else 
+                        vidcom(av7110, 0x16, arg); 
+                av7110->trickmode=TRICK_FAST;
+                av7110->videostate.play_state=VIDEO_PLAYING;
+                break;
+                
+        case VIDEO_SLOWMOTION:
+                if (av7110->playing&RP_VIDEO) {
+                        outcom(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0);
+                        vidcom(av7110, 0x22, arg);
+                } else {
+                        vidcom(av7110, 0x0d, 0);
+                        vidcom(av7110, 0x0e, 0);
+                        vidcom(av7110, 0x22, arg);
+                }
+                av7110->trickmode=TRICK_SLOW;
+                av7110->videostate.play_state=VIDEO_PLAYING;
+                break;
+                
+        case VIDEO_GET_CAPABILITIES:
+                *(int *)parg=VIDEO_CAP_MPEG1|
+                        VIDEO_CAP_MPEG2|
+                        VIDEO_CAP_SYS|
+                        VIDEO_CAP_PROG;
+                break;
+        
+        case VIDEO_CLEAR_BUFFER:
+                ring_buffer_flush(&av7110->avout);
+                reset_ipack(&av7110->ipack[1]);
+                
+                if (av7110->playing==RP_AV) {
+                        outcom(av7110, COMTYPE_REC_PLAY, 
+                               __Play, 2, AV_PES, 0);
+                        if (av7110->trickmode==TRICK_FAST)
+                                outcom(av7110, COMTYPE_REC_PLAY, 
+                                       __Scan_I, 2, AV_PES, 0);
+                        if (av7110->trickmode==TRICK_SLOW) {
+                                outcom(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0);
+                                vidcom(av7110, 0x22, arg);
+                        }
+                        if (av7110->trickmode==TRICK_FREEZE)
+                                vidcom(av7110, 0x000e, 1);
+                }
+                break;
+                
+        case VIDEO_SET_STREAMTYPE:
+                
+                break;
+                
+        default:
+                ret=-ENOIOCTLCMD;
+                break;
+        }
+        return ret;
+}
+
+static int 
+dvb_audio_ioctl(struct inode *inode, struct file *file,
+            unsigned int cmd, void *parg)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        unsigned long arg=(unsigned long) parg;
+        int ret=0;
+
+        if (((file->f_flags&O_ACCMODE)==O_RDONLY) &&
+            (cmd!=AUDIO_GET_STATUS))
+                return -EPERM;
+        
+        switch (cmd) {
+        case AUDIO_STOP:
+                if (av7110->audiostate.stream_source==AUDIO_SOURCE_MEMORY)
+                        AV_Stop(av7110, RP_AUDIO);
+                else
+                        audcom(av7110, 1);
+                av7110->audiostate.play_state=AUDIO_STOPPED;
+                break;
+                
+        case AUDIO_PLAY:
+                if (av7110->audiostate.stream_source==AUDIO_SOURCE_MEMORY)
+                        AV_StartPlay(av7110, RP_AUDIO);
+                audcom(av7110, 2);
+                av7110->audiostate.play_state=AUDIO_PLAYING;
+                break;
+                
+        case AUDIO_PAUSE:
+                audcom(av7110, 1);
+                av7110->audiostate.play_state=AUDIO_PAUSED;
+                break;
+                
+        case AUDIO_CONTINUE:
+                if (av7110->audiostate.play_state==AUDIO_PAUSED) {
+                        av7110->audiostate.play_state=AUDIO_PLAYING;
+                        audcom(av7110, 0x12);
+                } 
+                break;
+                
+        case AUDIO_SELECT_SOURCE:
+                av7110->audiostate.stream_source=(audio_stream_source_t) arg;
+                break;
+                
+        case AUDIO_SET_MUTE:
+        {
+                audcom(av7110, arg ? 1 : 2);
+                av7110->audiostate.mute_state=(int) arg;
+                break;
+        }
+        
+        case AUDIO_SET_AV_SYNC:
+                av7110->audiostate.AV_sync_state=(int) arg;
+                audcom(av7110, arg ? 0x0f : 0x0e);
+                break;
+                
+        case AUDIO_SET_BYPASS_MODE:
+                ret=-EINVAL;
+                break;
+                
+        case AUDIO_CHANNEL_SELECT:
+                av7110->audiostate.channel_select=(audio_channel_select_t) arg;
+                
+                switch(av7110->audiostate.channel_select) {
+                case AUDIO_STEREO:
+                        audcom(av7110, 0x80);
+                        break;
+                        
+                case AUDIO_MONO_LEFT:
+                        audcom(av7110, 0x100);
+                        break;
+                        
+                case AUDIO_MONO_RIGHT:
+                        audcom(av7110, 0x200);
+                        break;
+                        
+                default:
+                        ret=-EINVAL;
+                        break;
+                }
+                break;
+                
+        case AUDIO_GET_STATUS:
+                memcpy(parg, &av7110->audiostate, sizeof(struct audio_status));
+                break;
+                
+        case AUDIO_GET_CAPABILITIES:
+                *(int *)parg=AUDIO_CAP_LPCM|
+                        AUDIO_CAP_MP1|
+                        AUDIO_CAP_MP2;
+                break;
+
+        case AUDIO_CLEAR_BUFFER:
+                ring_buffer_flush(&av7110->aout);
+                reset_ipack(&av7110->ipack[0]);
+                if (av7110->playing==RP_AV)
+                        outcom(av7110, COMTYPE_REC_PLAY, 
+                               __Play, 2, AV_PES, 0);
+                break;
+        case AUDIO_SET_ID:
+                
+                break;
+        case AUDIO_SET_MIXER:
+        {
+                struct audio_mixer *amix=(struct audio_mixer *)parg;
+
+                SetVolume(av7110, amix->volume_left, amix->volume_right);
+                break;
+        }
+        case AUDIO_SET_STREAMTYPE:
+                break;
+        default:
+                ret=-ENOIOCTLCMD;
+                break;
+        }
+        return ret;
+}
+
+static int 
+dvb_osd_ioctl(struct inode *inode, struct file *file,
+            unsigned int cmd, void *parg)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+
+#ifdef CONFIG_DVB_AV7110_OSD
+        if (cmd==OSD_SEND_CMD)
+                return OSD_DrawCommand(av7110, (osd_cmd_t *)parg);
+#endif
+        return -EINVAL;
+}
+
+static int dvb_video_open(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        int err;
+
+        if ((err=dvb_generic_open(inode, file))<0)
+                return err;
+        ring_buffer_flush(&av7110->aout);
+        ring_buffer_flush(&av7110->avout);
+        av7110->video_blank=1;
+        av7110->audiostate.AV_sync_state=1;
+        av7110->videostate.stream_source=VIDEO_SOURCE_DEMUX;
+        return 0;
+}
+
+static int dvb_video_release(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+
+        AV_Stop(av7110, RP_VIDEO);
+        return dvb_generic_release(inode, file);
+}
+
+static int dvb_audio_open(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        int err=dvb_generic_open(inode, file);
+
+        if (err<0)
+                return err;
+        ring_buffer_flush(&av7110->aout);
+        av7110->audiostate.stream_source=AUDIO_SOURCE_DEMUX;
+        return 0;
+}
+
+static int dvb_audio_release(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+        av7110_t *av7110=(av7110_t *) dvbdev->priv;
+        
+        AV_Stop(av7110, RP_AUDIO);
+        return dvb_generic_release(inode, file);
+}
+
+
+
+/******************************************************************************
+ * driver registration 
+ ******************************************************************************/
+
+static struct file_operations dvb_video_fops = {
+	owner:		THIS_MODULE,
+        read:		0,
+	write:		dvb_video_write,
+	ioctl:		dvb_generic_ioctl,
+	open:		dvb_video_open,
+	release:	dvb_video_release,
+	poll:		dvb_video_poll,
+};
+
+static dvb_device_t dvbdev_video = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_video_fops,
+        kernel_ioctl: dvb_video_ioctl,
+};
+
+static struct file_operations dvb_audio_fops = {
+	owner:		THIS_MODULE,
+        read:		0,
+	write:		dvb_audio_write,
+	ioctl:		dvb_generic_ioctl,
+	open:		dvb_audio_open,
+	release:	dvb_audio_release,
+	poll:		dvb_audio_poll,
+};
+
+static dvb_device_t dvbdev_audio = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_audio_fops,
+        kernel_ioctl: dvb_audio_ioctl,
+};
+
+static struct file_operations dvb_ca_fops = {
+	owner:		THIS_MODULE,
+        read:		dvb_ca_read,
+	write:		dvb_ca_write,
+	ioctl:		dvb_generic_ioctl,
+	open:		dvb_ca_open,
+	release:	dvb_generic_release,
+	poll:		dvb_ca_poll,
+};
+
+static dvb_device_t dvbdev_ca = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_ca_fops,
+        kernel_ioctl: dvb_ca_ioctl,
+};
+
+static struct file_operations dvb_osd_fops = {
+	owner:		THIS_MODULE,
+        read:		0,
+	write:		0,
+	ioctl:		dvb_generic_ioctl,
+	open:		dvb_generic_open,
+	release:	dvb_generic_release,
+	poll:		0,
+};
+
+static dvb_device_t dvbdev_osd = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_osd_fops,
+        kernel_ioctl: dvb_osd_ioctl,
+};
+
+
+static
+void av7110_before_after_tune (fe_status_t s, void *data)
+{
+	struct av7110_s *av7110 = data;
+
+        av7110->fe_synced = (s & FE_HAS_LOCK) ? 1 : 0;
+
+        if (av7110->playing)
+                return;
+
+        if (down_interruptible(&av7110->pid_mutex))
+                return;
+
+	if (av7110->fe_synced) {
+                SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO], 
+                        av7110->pids[DMX_PES_AUDIO], 
+                        av7110->pids[DMX_PES_TELETEXT], 0, 
+                        av7110->pids[DMX_PES_PCR]);
+        	outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
+	} else 
+		SetPIDs(av7110, 0, 0, 0, 0, 0);
+
+        up(&av7110->pid_mutex);
+}
+
+
+static int 
+dvb_register(av7110_t *av7110)
+{
+        int ret, i;
+        dmx_frontend_t *dvbfront=&av7110->hw_frontend;
+        dvb_demux_t *dvbdemux=&av7110->demux;
+
+        if (av7110->registered)
+                return -1;
+
+        av7110->registered=1;
+
+	av7110->dvb_adapter = av7110->saa->dvb_adapter;
+
+	if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) 
+                dvb_add_frontend_notifier (av7110->dvb_adapter,
+                                           av7110_before_after_tune, av7110);
+	/**
+	 *   init DiSEqC stuff
+	 */
+	if (av7110->saa->card_type==DVB_CARD_TT_BUDGET ||
+            av7110->saa->card_type==DVB_CARD_TT_SIEMENS) 
+		dvb_add_frontend_ioctls (av7110->dvb_adapter,
+					 av7110_diseqc_ioctl, NULL, av7110);
+
+	av7110->audiostate.AV_sync_state=0;
+	av7110->audiostate.mute_state=0;
+	av7110->audiostate.play_state=AUDIO_STOPPED;
+	av7110->audiostate.stream_source=AUDIO_SOURCE_DEMUX;
+	av7110->audiostate.channel_select=AUDIO_STEREO;
+	av7110->audiostate.bypass_mode=0;
+
+	av7110->videostate.video_blank=0;
+	av7110->videostate.play_state=VIDEO_STOPPED;
+	av7110->videostate.stream_source=VIDEO_SOURCE_DEMUX;
+	av7110->videostate.video_format=VIDEO_FORMAT_4_3;
+	av7110->videostate.display_format=VIDEO_CENTER_CUT_OUT;
+        av7110->display_ar=VIDEO_FORMAT_4_3;
+
+        memcpy(av7110->demux_id, "demux0_0", 9);
+        av7110->demux_id[7]=av7110->saa->dvb_adapter->num+0x30;
+        dvbdemux->priv=(void *) av7110;
+
+        if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) {
+                for (i=0; i<32; i++)
+                        av7110->handle2filter[i]=NULL;
+
+                dvbdemux->filternum=32;
+                dvbdemux->feednum=32;
+                dvbdemux->start_feed=dvb_start_feed;
+                dvbdemux->stop_feed=dvb_stop_feed;
+                dvbdemux->write_to_decoder=dvb_write_to_decoder;
+                
+                dvbdemux->dmx.vendor="TI";
+                dvbdemux->dmx.model="AV7110";
+                dvbdemux->dmx.id=av7110->demux_id;
+                dvbdemux->dmx.capabilities=(DMX_TS_FILTERING|
+                                             DMX_SECTION_FILTERING|
+                                             DMX_MEMORY_BASED_FILTERING);
+
+                DvbDmxInit(&av7110->demux);
+
+
+                dvbfront->id="hw_frontend";
+                dvbfront->vendor="VLSI";
+                dvbfront->model="DVB Frontend";
+                dvbfront->source=DMX_FRONTEND_0;
+
+                av7110->dmxdev.filternum=32;
+                av7110->dmxdev.demux=&dvbdemux->dmx;
+                av7110->dmxdev.capabilities=0;
+
+                DmxDevInit(&av7110->dmxdev, av7110->dvb_adapter);
+        }
+
+        if (av7110->saa->card_type>=DVB_CARD_TT_BUDGET) {
+                dvbdemux->filternum=256;
+                dvbdemux->feednum=256;
+                dvbdemux->start_feed=dvb_start_feed;
+                dvbdemux->stop_feed=dvb_stop_feed;
+                dvbdemux->write_to_decoder=0;
+
+                dvbdemux->dmx.vendor="CIM";
+                dvbdemux->dmx.model="sw";
+                dvbdemux->dmx.id=av7110->demux_id;
+                dvbdemux->dmx.capabilities=(DMX_TS_FILTERING|
+                                             DMX_SECTION_FILTERING|
+                                             DMX_MEMORY_BASED_FILTERING);
+
+                DvbDmxInit(&av7110->demux);
+
+                dvbfront->id="hw_frontend";
+                dvbfront->vendor="VLSI";
+                dvbfront->model="DVB Frontend";
+                dvbfront->source=DMX_FRONTEND_0;
+
+                av7110->dmxdev.filternum=256;
+                av7110->dmxdev.demux=&dvbdemux->dmx;
+                av7110->dmxdev.capabilities=0;
+
+                DmxDevInit(&av7110->dmxdev, av7110->dvb_adapter);
+        }
+
+        ret=dvbdemux->dmx.add_frontend(&dvbdemux->dmx, 
+                                        &av7110->hw_frontend);
+        if (ret<0)
+                return ret;
+        
+        av7110->mem_frontend.id="mem_frontend";
+        av7110->mem_frontend.vendor="memory";
+        av7110->mem_frontend.model="sw";
+        av7110->mem_frontend.source=DMX_MEMORY_FE;
+        ret=dvbdemux->dmx.add_frontend(&dvbdemux->dmx, 
+                                        &av7110->mem_frontend);
+        if (ret<0)
+                return ret;
+        
+        ret=dvbdemux->dmx.connect_frontend(&dvbdemux->dmx, 
+                                            &av7110->hw_frontend);
+        if (ret<0)
+                return ret;
+
+        if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) {
+                dvb_register_device(av7110->dvb_adapter, &av7110->video_dev,
+                                    &dvbdev_video, av7110, DVB_DEVICE_VIDEO);
+                dvb_register_device(av7110->dvb_adapter, &av7110->audio_dev,
+                                    &dvbdev_audio, av7110, DVB_DEVICE_AUDIO);
+                dvb_register_device(av7110->dvb_adapter, &av7110->osd_dev,
+                                    &dvbdev_osd, av7110, DVB_DEVICE_OSD);
+                dvb_register_device(av7110->dvb_adapter, &av7110->ca_dev,  
+                                    &dvbdev_ca, av7110, DVB_DEVICE_CA);
+                vid_register(av7110);
+#ifdef USE_DVB_DSP
+                dvb->dsp_dev = dvb_register_dsp(dvb_audio_open, 
+                                                dvb_audio_release, 
+                                                dvb_audio_ioctl, 
+                                                dvb_audio_write, 
+                                                av7110->audio_dev);
+#endif
+        }
+        
+        av7110->dvb_net.card_num=av7110->saa->dvb_adapter->num;
+        dvb_net_init(av7110->dvb_adapter, &av7110->dvb_net, &dvbdemux->dmx);
+
+	return 0;
+}
+
+
+static void 
+dvb_unregister(av7110_t *av7110)
+{
+        dvb_demux_t *dvbdemux=&av7110->demux;
+
+        if (!av7110->registered)
+                return;
+
+	dvb_net_release(&av7110->dvb_net);
+
+	dvbdemux->dmx.close(&dvbdemux->dmx);
+        dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->hw_frontend);
+        dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->mem_frontend);
+
+        DmxDevRelease(&av7110->dmxdev);
+        DvbDmxRelease(&av7110->demux);
+
+	if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) 
+                dvb_remove_frontend_notifier (av7110->dvb_adapter,
+                                              av7110_before_after_tune);
+
+	dvb_remove_frontend_ioctls (av7110->dvb_adapter,
+				    av7110_diseqc_ioctl, NULL);
+
+        if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) {
+                vid_unregister(av7110);
+                dvb_unregister_device(av7110->audio_dev);
+                dvb_unregister_device(av7110->video_dev);
+                dvb_unregister_device(av7110->osd_dev);
+                dvb_unregister_device(av7110->ca_dev);
+#ifdef USE_DVB_DSP
+                dvb_unregister_dsp(av7110->dsp_dev);
+#endif
+        }
+}
+
+/****************************************************************************
+ * INITIALIZATION
+ ****************************************************************************/
+
+static
+int av7110_attach (struct saa7146 *saa, void **av7110_ptr)
+{
+	struct av7110_s *av7110;
+
+	if (!(av7110 = kmalloc (sizeof (struct av7110_s), GFP_KERNEL))) {
+		printk ("%s: out of memory!\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+
+	*av7110_ptr = av7110;
+
+        memset(av7110, 0, sizeof(av7110_t));
+
+	tasklet_init (&av7110->debi_tasklet, debiirq, (unsigned long) av7110);
+	tasklet_init (&av7110->gpio_tasklet, gpioirq, (unsigned long) av7110);
+	tasklet_init (&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110);
+	tasklet_init (&av7110->fidb_tasklet, fidbirq, (unsigned long) av7110);
+
+        sema_init(&av7110->pid_mutex, 1);
+
+        /* locks for data transfers from/to AV7110 */
+        spin_lock_init (&av7110->debilock);
+        sema_init(&av7110->dcomlock, 1);
+        av7110->debilock=SPIN_LOCK_UNLOCKED;
+        av7110->debitype=-1;
+
+	av7110->saa=(struct saa7146 *) saa;
+        av7110->saa_mem=av7110->saa->mem;
+
+        /* default ADAC type */
+        av7110->adac_type = adac;
+
+        /* default OSD window */
+        av7110->osdwin=1;
+
+        /* ARM "watchdog" */
+	init_waitqueue_head(&av7110->arm_wait);
+        av7110->arm_thread=0;
+     
+        av7110->vidmode=VIDEO_MODE_PAL;
+
+        init_ipack(&av7110->ipack[0], IPACKS, play_audio_cb);
+        av7110->ipack[0].data=(void *) av7110;
+        init_ipack(&av7110->ipack[1], IPACKS, play_video_cb);
+        av7110->ipack[1].data=(void *) av7110;
+        
+
+        /* allocate and init buffers */
+
+        av7110->debi_virt=pci_alloc_consistent(av7110->saa->device, 8192,
+					       &av7110->debi_bus);
+        if (!av7110->debi_virt) 
+                return -1;
+
+        av7110->iobuf=vmalloc(AVOUTLEN+AOUTLEN+BMPLEN+4*IPACKS);
+        if (!av7110->iobuf) 
+                return -1;
+
+        ring_buffer_init(&av7110->avout, av7110->iobuf, AVOUTLEN);
+        ring_buffer_init(&av7110->aout, av7110->iobuf+AVOUTLEN, AOUTLEN);
+
+        /* init BMP buffer */
+        av7110->bmpbuf=av7110->iobuf+AVOUTLEN+AOUTLEN;
+        init_waitqueue_head(&av7110->bmpq);
+        
+        av7110->kbuf[0]=(u8 *)(av7110->iobuf+AVOUTLEN+AOUTLEN+BMPLEN);
+        av7110->kbuf[1]=av7110->kbuf[0]+2*IPACKS;
+
+        /* CI link layer buffers */
+        ci_ll_init(&av7110->ci_rbuffer, &av7110->ci_wbuffer, 8192);
+
+        /* handle different card types */
+
+        /* load firmware into AV7110 cards */
+        if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) {
+                bootarm(av7110);
+                firmversion(av7110);
+                if ((av7110->arm_app&0xffff)<0x2502) {
+                        printk("av7110: Warning, firmware version is too old. System might be unstable!!!\n");
+                }
+                kernel_thread(arm_thread, (void *) av7110, 0);
+        } else {
+                saa7146_write(av7110->saa_mem, DD1_INIT, 0x02000600);
+                saa7146_write(av7110->saa_mem, MC2, 
+                              (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+                setgpio(av7110, 2, GPIO_OUTHI); /* frontend power on */
+        }
+
+	SetVolume(av7110, 0xff, 0xff);
+
+        if (av7110->saa->card_type==DVB_CARD_TT_SIEMENS) {
+                VidMode(av7110, vidmode);
+
+	        /* remaining inits according to card and frontend type */
+
+                if (i2c_writereg(av7110, 0x20, 0x00, 0x00)==1) {
+                        dprintk("av7110%d: Crystal audio DAC detected\n",
+				av7110->saa->dvb_adapter->num);
+                        av7110->adac_type = DVB_ADAC_CRYSTAL;
+                        i2c_writereg(av7110, 0x20, 0x01, 0xd2);
+                        i2c_writereg(av7110, 0x20, 0x02, 0x49);
+                        i2c_writereg(av7110, 0x20, 0x03, 0x00);
+                        i2c_writereg(av7110, 0x20, 0x04, 0x00);
+                }
+                
+		/**
+		 * some special handling for the Siemens DVB-C card...
+		 */
+		if (av7110->saa->device->subsystem_vendor == 0x110a) {
+                        if (i2c_writereg(av7110, 0x80, 0x0, 0x80)==1) {
+                                i2c_writereg(av7110, 0x80, 0x0, 0);
+                                printk("av7110: DVB-C analog module detected, "
+                                       "initializing MSP3400\n");
+                                ddelay(10);
+                                msp_writereg(av7110, 0x12, 0x0013, 0x0c00);
+                                msp_writereg(av7110, 0x12, 0x0000, 0x7f00); // loudspeaker + headphone
+                                msp_writereg(av7110, 0x12, 0x0008, 0x0220); // loudspeaker source
+                                msp_writereg(av7110, 0x12, 0x0004, 0x7f00); // loudspeaker volume
+                                msp_writereg(av7110, 0x12, 0x000a, 0x0220); // SCART 1 source
+                                msp_writereg(av7110, 0x12, 0x0007, 0x7f00); // SCART 1 volume
+                                msp_writereg(av7110, 0x12, 0x000d, 0x4800); // prescale SCART
+                        }
+
+                        // switch DVB SCART on
+                        outcom(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
+                        outcom(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1);
+                        
+                        //setgpio(av7110, 1, GPIO_OUTHI); // RGB on, SCART pin 16
+                        //setgpio(av7110, 3, GPIO_OUTLO); // SCARTpin 8
+                        av7110->adac_type = DVB_ADAC_NONE;
+                }
+        }
+
+	if (init_vpid != 0 || init_apid != 0)
+		ChangePIDs(av7110, init_vpid, init_apid, 0, 0, 0);
+
+	av7110_setup_irc_config (av7110, 0);
+        dvb_register(av7110);
+
+        return 0;
+}
+
+
+static
+int av7110_detach (struct saa7146 *saa, void** av7110_ptr)
+{
+	struct av7110_s *av7110 = *av7110_ptr;
+
+	av7110->arm_rmmod=1;
+	wake_up_interruptible(&av7110->arm_wait);
+
+	while (av7110->arm_thread)
+		ddelay(1);
+
+	dvb_unregister(av7110);
+
+	saa7146_write (av7110->saa_mem, IER, 
+		     saa7146_read(av7110->saa_mem, IER) & ~(MASK_19 | MASK_03));
+	
+	saa7146_write(av7110->saa_mem, ISR,(MASK_19 | MASK_03));
+
+	ci_ll_release(&av7110->ci_rbuffer, &av7110->ci_wbuffer);
+	free_ipack(&av7110->ipack[0]);
+	free_ipack(&av7110->ipack[1]);
+	vfree(av7110->iobuf);
+	pci_free_consistent(av7110->saa->device, 8192, av7110->debi_virt,
+			    av7110->debi_bus);
+
+	kfree (av7110);
+	*av7110_ptr = NULL;
+
+	return 0;
+}
+
+
+static
+void av7110_irq(struct saa7146 *saa, u32 isr, void *data) 
+{
+	struct av7110_s *av7110 = (struct av7110_s*) data;
+
+	if (isr & MASK_19)
+		tasklet_schedule (&av7110->debi_tasklet);
+
+	if (isr & MASK_03)
+		tasklet_schedule (&av7110->gpio_tasklet);
+
+	if (isr & MASK_10)
+		tasklet_schedule (&av7110->vpe_tasklet);
+
+	if (isr & MASK_07)
+		tasklet_schedule (&av7110->fidb_tasklet);
+}
+
+
+static
+int av7110_command(struct saa7146 *saa, void *p, unsigned int cmd, void *arg)
+{
+        switch(cmd) {
+        case SAA7146_SUSPEND:
+                printk("dvb_suspend()\n");
+                break;
+        case SAA7146_RESUME:
+                printk("dvb_resume()\n");
+                break;
+        default:
+                return -ENOIOCTLCMD;
+        }
+        return 0;
+}
+
+
+static
+void av7110_inc_use(struct saa7146* adap)
+{
+	MOD_INC_USE_COUNT;
+}
+
+
+static
+void av7110_dec_use(struct saa7146* adap)
+{
+	MOD_DEC_USE_COUNT;
+}
+
+
+static struct saa7146_extension av7110_extension = {
+	"dvb extension\0",
+	MASK_07|MASK_10|MASK_19|MASK_03|MASK_27,
+	av7110_irq,
+	av7110_command,
+	av7110_attach,
+	av7110_detach,
+	av7110_inc_use,
+	av7110_dec_use
+};	
+
+
+int __init av7110_init(void) 
+{
+	int result = 0;
+
+	if ((result = saa7146_add_extension(&av7110_extension))) {
+		printk("%s: saa7146_add_extension() failed!\n",
+			__FUNCTION__);
+		return result;
+	}
+
+        return result;
+}
+
+
+void __exit av7110_exit(void)
+{
+	if (saa7146_del_extension(&av7110_extension)) 
+                printk(KERN_ERR "dvb: extension deregistration failed.\n");
+}
+
+//MODULE_DESCRIPTION("driver for the SAA7146 based AV110 PCI DVB cards by "
+//		   "Siemens, Technotrend, Hauppauge");
+//MODULE_AUTHOR("Ralph Metzler, Marcus Metzler, others");
+//MODULE_LICENSE("GPL");
+
+MODULE_PARM(av7110_debug,"i");
+MODULE_PARM(vidmem,"l");
+MODULE_PARM(vidlow,"l");
+MODULE_PARM(vidmode,"i");
+MODULE_PARM(init_vpid,"i");
+MODULE_PARM(init_apid,"i");
+MODULE_PARM(pids_off,"i");
+MODULE_PARM(adac,"i");
+
+/*
+ * Local variables:
+ * c-indent-level: 8
+ * c-brace-imaginary-offset: 0
+ * c-brace-offset: -8
+ * c-argdecl-indent: 8
+ * c-label-offset: -8
+ * c-continued-statement-offset: 8
+ * c-continued-brace-offset: 0
+ * indent-tabs-mode: nil
+ * tab-width: 8
+ * End:
+ */
+
diff -Nru a/drivers/media/dvb/av7110/av7110.h b/drivers/media/dvb/av7110/av7110.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/av7110.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,743 @@
+#ifndef _AV7110_H_
+#define _AV7110_H_
+
+#define DVB_FIRM_PATH "/lib/DVB/"
+
+#include <linux/interrupt.h>
+#include <linux/videodev.h>
+#include <linux/socket.h>
+#include <linux/netdevice.h>
+
+#ifdef CONFIG_DEVFS_FS
+#include <linux/devfs_fs_kernel.h>
+#endif
+
+/* DEBI transfer mode defs */
+
+#define DEBINOSWAP 0x000e0000
+#define DEBISWAB   0x001e0000
+#define DEBISWAP   0x002e0000
+
+#define ARM_WAIT_FREE  (HZ)
+#define ARM_WAIT_SHAKE (HZ/5)
+#define ARM_WAIT_OSD (HZ)
+
+#if LINUX_VERSION_CODE < 0x020300
+#define net_device device
+#define DECLARE_MUTEX(foo)         struct semaphore foo = MUTEX
+#define DECLARE_MUTEX_LOCKED(foo)  struct semaphore foo = MUTEX_LOCKED
+#define WAIT_QUEUE                 struct wait_queue*
+#define init_waitqueue_head(wq)    *(wq) = NULL;
+#define DECLARE_WAITQUEUE(wait, current) struct wait_queue wait = { current, NULL }
+#define set_current_state(state_value)                  \
+        do { current->state = state_value; } while (0)
+#define list_for_each(pos, head) \
+        for (pos = (head)->next; pos != (head); pos = pos->next)
+
+#else
+
+#define WAIT_QUEUE                 wait_queue_head_t
+
+#endif
+
+#include <linux/dvb/video.h>
+#include <linux/dvb/audio.h>
+#include <linux/dvb/dmx.h>
+#include <linux/dvb/ca.h>
+#include <linux/dvb/osd.h>
+#include <linux/dvb/net.h>
+
+#include "../dvb-core/dvbdev.h"
+#include "../dvb-core/demux.h"
+#include "../dvb-core/dvb_demux.h"
+#include "../dvb-core/dmxdev.h"
+#include "../dvb-core/dvb_filter.h"
+#include "../dvb-core/dvb_net.h"
+
+
+typedef enum BOOTSTATES
+{
+	BOOTSTATE_BUFFER_EMPTY	= 0,
+	BOOTSTATE_BUFFER_FULL	= 1,
+	BOOTSTATE_BOOT_COMPLETE	= 2
+} BOOTSTATES;
+
+typedef enum GPIO_MODE
+{
+	GPIO_INPUT = 0x00,
+	GPIO_IRQHI = 0x10,
+	GPIO_IRQLO = 0x20,
+	GPIO_IRQHL = 0x30,
+	GPIO_OUTLO = 0x40,
+	GPIO_OUTHI = 0x50
+} GPIO_MODE;
+
+typedef enum
+{	RP_None,
+	AudioPES,
+	AudioMp2,
+	AudioPCM,
+	VideoPES,
+	AV_PES
+} TYPE_REC_PLAY_FORMAT;
+
+typedef struct PARAMSTRUCT
+{
+	unsigned int	wCommand;
+        int             error;
+	unsigned long	pdwData[100];
+} PARAMSTRUCT, *PPARAMSTRUCT;
+
+typedef enum OSDPALTYPE
+{
+	NoPalet =  0,      /* No palette */
+	Pal1Bit =  2,      /* 2 colors for 1 Bit Palette    */
+	Pal2Bit =  4,      /* 4 colors for 2 bit palette    */
+	Pal4Bit =  16,     /* 16 colors for 4 bit palette   */
+	Pal8Bit =  256     /* 256 colors for 16 bit palette */
+} OSDPALTYPE, *POSDPALTYPE;
+
+typedef enum {
+   BITMAP1,           /* 1 bit bitmap */
+   BITMAP2,           /* 2 bit bitmap */
+   BITMAP4,           /* 4 bit bitmap */
+   BITMAP8,           /* 8 bit bitmap */
+   BITMAP1HR,         /* 1 Bit bitmap half resolution */
+   BITMAP2HR,         /* 2 bit bitmap half resolution */
+   BITMAP4HR,         /* 4 bit bitmap half resolution */
+   BITMAP8HR,         /* 8 bit bitmap half resolution */
+   YCRCB422,          /* 4:2:2 YCRCB Graphic Display */
+   YCRCB444,          /* 4:4:4 YCRCB Graphic Display */
+   YCRCB444HR,        /* 4:4:4 YCRCB graphic half resolution */
+   VIDEOTSIZE,        /* True Size Normal MPEG Video Display */
+   VIDEOHSIZE,        /* MPEG Video Display Half Resolution */
+   VIDEOQSIZE,        /* MPEG Video Display Quarter Resolution */
+   VIDEODSIZE,        /* MPEG Video Display Double Resolution */
+   VIDEOTHSIZE,       /* True Size MPEG Video Display Half Resolution */
+   VIDEOTQSIZE,       /* True Size MPEG Video Display Quarter Resolution*/
+   VIDEOTDSIZE,       /* True Size MPEG Video Display Double Resolution */
+   VIDEONSIZE,        /* Full Size MPEG Video Display */
+   CURSOR             /* Cursor */
+} DISPTYPE;           /* Window display type           */
+
+// switch defines
+#define SB_GPIO 3
+#define SB_OFF	GPIO_OUTLO  //SlowBlank aus (TV-Mode)
+#define SB_ON	GPIO_INPUT  //SlowBlank an  (AV-Mode)
+#define SB_WIDE GPIO_OUTHI  //SlowBlank 6V  (16/9-Mode) nicht realisiert
+
+#define FB_GPIO 1
+#define FB_OFF	GPIO_LO     //FastBlank aus (CVBS-Mode)
+#define FB_ON   GPIO_OUTHI  //FastBlank an  (RGB-Mode)
+#define FB_LOOP	GPIO_INPUT  //FastBlank der PC-Grafik durchschleifen
+
+typedef enum VIDEOOUTPUTMODE
+{
+        NO_OUT       = 0,		//disable analog Output
+	CVBS_RGB_OUT = 1,
+	CVBS_YC_OUT  = 2,
+	YC_OUT	     = 3
+} VIDEOOUTPUTMODE, *PVIDEOOUTPUTMODE;
+
+
+#define GPMQFull        0x0001                  //Main Message Queue Full
+#define GPMQOver        0x0002                  //Main Message Queue Overflow
+#define HPQFull         0x0004                  //High Priority Msg Queue Full
+#define HPQOver         0x0008
+#define OSDQFull        0x0010                  //OSD Queue Full
+#define OSDQOver        0x0020
+
+#define	SECTION_EIT	        0x01
+#define	SECTION_SINGLE	        0x00
+#define	SECTION_CYCLE		0x02
+#define	SECTION_CONTINUOS	0x04
+#define	SECTION_MODE		0x06
+#define SECTION_IPMPE		0x0C	// bis zu 4k groß
+#define SECTION_HIGH_SPEED	0x1C	// vergrößerter Puffer für High Speed Filter
+#define DATA_PIPING_FLAG	0x20	// für Data Piping Filter
+
+#define	PBUFSIZE_NONE 0x0000
+#define	PBUFSIZE_1P   0x0100
+#define	PBUFSIZE_2P   0x0200
+#define	PBUFSIZE_1K   0x0300
+#define	PBUFSIZE_2K   0x0400
+#define	PBUFSIZE_4K   0x0500
+#define	PBUFSIZE_8K   0x0600
+#define PBUFSIZE_16K  0x0700
+#define PBUFSIZE_32K  0x0800
+
+typedef enum {	
+        WCreate,
+	WDestroy,
+	WMoveD,
+	WMoveA,
+	WHide,
+	WTop,
+	DBox,
+	DLine,
+	DText,
+	Set_Font,
+	SetColor,
+	SetBlend,
+	SetWBlend,
+	SetCBlend,
+	SetNonBlend,
+	LoadBmp,
+	BlitBmp,
+	ReleaseBmp,
+	SetWTrans,
+	SetWNoTrans
+} OSDCOM;
+
+typedef enum { 
+	MultiPID,
+        VideoPID,
+	AudioPID,
+	InitFilt,
+	FiltError,
+	NewVersion,
+	CacheError,
+	AddPIDFilter,
+	DelPIDFilter,
+	Scan,
+	SetDescr,
+        SetIR
+} PIDCOM;
+			
+typedef enum {
+        SelAudChannels
+} MPEGCOM;
+
+typedef enum  { 
+        AudioDAC,
+	CabADAC,
+	ON22K,
+	OFF22K,
+	MainSwitch,
+	ADSwitch,
+	SendDiSEqC,
+	SetRegister
+} AUDCOM;
+
+typedef enum  {
+        AudioState,
+	AudioBuffState,
+	VideoState1,
+	VideoState2,
+	VideoState3,
+	CrashCounter,
+	ReqVersion,
+	ReqVCXO,
+	ReqRegister
+} REQCOM;
+
+typedef enum  {
+        SetVidMode,
+	SetTestMode,
+	LoadVidCode,
+	SetMonitorType,
+	SetPanScanType,
+	SetFreezeMode
+} ENC;
+
+typedef enum  { 
+        __Record,
+	__Stop,
+	__Play,
+	__Pause,
+	__Slow,
+	__FF_IP,
+	__Scan_I,
+	__Continue
+} REC_PLAY;
+
+typedef enum  { 
+        COMTYPE_NOCOM,
+	COMTYPE_PIDFILTER,
+	COMTYPE_MPEGDECODER,
+	COMTYPE_OSD,
+	COMTYPE_BMP,
+	COMTYPE_ENCODER,
+	COMTYPE_AUDIODAC,
+	COMTYPE_REQUEST,
+	COMTYPE_SYSTEM,
+	COMTYPE_REC_PLAY,
+	COMTYPE_COMMON_IF,
+	COMTYPE_PID_FILTER,
+        COMTYPE_PES,
+        COMTYPE_TS,
+	COMTYPE_VIDEO,
+	COMTYPE_AUDIO,
+	COMTYPE_CI_LL,
+} COMTYPE;
+
+typedef enum {
+	AV7110_VIDEO_FREEZE,
+	AV7110_VIDEO_CONTINUE
+} VIDEOCOM;
+
+typedef enum {
+	DVB_AUDIO_PAUSE,
+} AUDIOCOM;
+
+
+#define VID_NONE_PREF           0x00    /* No aspect ration processing preferred */
+#define VID_PAN_SCAN_PREF       0x01    /* Pan and Scan Display preferred */
+#define VID_VERT_COMP_PREF      0x02    /* Vertical compression display preferred */
+#define VID_VC_AND_PS_PREF      0x03    /* PanScan and vertical Compression if allowed */
+#define VID_CENTRE_CUT_PREF     0x05    /* PanScan with zero vector */
+
+#define DATA_NONE                0x00
+#define DATA_FSECTION            0x01
+#define DATA_IPMPE               0x02
+#define DATA_MPEG_RECORD         0x03
+#define DATA_DEBUG_MESSAGE       0x04
+#define DATA_COMMON_INTERFACE    0x05
+#define DATA_MPEG_PLAY           0x06
+#define DATA_BMP_LOAD            0x07
+#define DATA_IRCOMMAND           0x08
+#define DATA_PIPING              0x09
+#define DATA_STREAMING           0x0a
+#define DATA_CI_GET              0x0b
+#define DATA_CI_PUT              0x0c
+
+#define DATA_PES_RECORD          0x10
+#define DATA_PES_PLAY            0x11
+#define DATA_TS_RECORD           0x12
+#define DATA_TS_PLAY             0x13
+
+#define CI_CMD_ERROR             0x00
+#define CI_CMD_ACK               0x01
+#define CI_CMD_SYSTEM_READY      0x02
+#define CI_CMD_KEYPRESS          0x03
+#define CI_CMD_ON_TUNED          0x04
+#define CI_CMD_ON_SWITCH_PROGRAM 0x05
+#define CI_CMD_SECTION_ARRIVED   0x06
+#define CI_CMD_SECTION_TIMEOUT   0x07
+#define CI_CMD_TIME              0x08
+#define CI_CMD_ENTER_MENU        0x09
+#define CI_CMD_FAST_PSI          0x0a
+#define CI_CMD_GET_SLOT_INFO     0x0b
+
+#define CI_MSG_NONE              0x00
+#define CI_MSG_CI_INFO           0x01
+#define CI_MSG_MENU              0x02
+#define CI_MSG_LIST              0x03
+#define CI_MSG_TEXT              0x04
+#define CI_MSG_REQUEST_INPUT     0x05
+#define CI_MSG_INPUT_COMPLETE    0x06
+#define CI_MSG_LIST_MORE         0x07
+#define CI_MSG_MENU_MORE         0x08
+#define CI_MSG_CLOSE_MMI_IMM     0x09
+#define CI_MSG_SECTION_REQUEST   0x0a
+#define CI_MSG_CLOSE_FILTER      0x0b
+#define CI_PSI_COMPLETE          0x0c
+#define CI_MODULE_READY          0x0d
+#define CI_SWITCH_PRG_REPLY      0x0e
+#define CI_MSG_TEXT_MORE         0x0f
+
+#define CI_MSG_CA_PMT            0xe0
+#define CI_MSG_ERROR             0xf0
+
+typedef struct ring_buffer_s {
+        u8               *data;
+        int               size;
+        int               pread;
+        int               pwrite;
+
+        WAIT_QUEUE        queue;
+        spinlock_t        lock;
+        struct semaphore  sema;
+
+        int error;
+} ring_buffer_t;
+
+
+#define PROG_STREAM_MAP  0xBC
+#define PRIVATE_STREAM1  0xBD
+#define PADDING_STREAM   0xBE
+#define PRIVATE_STREAM2  0xBF
+#define AUDIO_STREAM_S   0xC0
+#define AUDIO_STREAM_E   0xDF
+#define VIDEO_STREAM_S   0xE0
+#define VIDEO_STREAM_E   0xEF
+#define ECM_STREAM       0xF0
+#define EMM_STREAM       0xF1
+#define DSM_CC_STREAM    0xF2
+#define ISO13522_STREAM  0xF3
+#define PROG_STREAM_DIR  0xFF
+
+#define PTS_DTS_FLAGS    0xC0
+
+//pts_dts flags
+#define PTS_ONLY         0x80
+#define PTS_DTS          0xC0
+#define TS_SIZE          188
+#define TRANS_ERROR      0x80
+#define PAY_START        0x40
+#define TRANS_PRIO       0x20
+#define PID_MASK_HI      0x1F
+//flags
+#define TRANS_SCRMBL1    0x80
+#define TRANS_SCRMBL2    0x40
+#define ADAPT_FIELD      0x20
+#define PAYLOAD          0x10
+#define COUNT_MASK       0x0F
+
+// adaptation flags
+#define DISCON_IND       0x80
+#define RAND_ACC_IND     0x40
+#define ES_PRI_IND       0x20
+#define PCR_FLAG         0x10
+#define OPCR_FLAG        0x08
+#define SPLICE_FLAG      0x04
+#define TRANS_PRIV       0x02
+#define ADAP_EXT_FLAG    0x01
+
+// adaptation extension flags
+#define LTW_FLAG         0x80
+#define PIECE_RATE       0x40
+#define SEAM_SPLICE      0x20
+
+#define MAX_PLENGTH      0xFFFF
+#define MAX_VID_PES      0x1FFF
+
+typedef struct section_s {
+        int               id;
+        int               length;
+        int               found;
+        u8                payload[4096+3];
+} section_t;
+
+
+#define MY_STATE_PES_START     1
+#define MY_STATE_PES_STARTED   2
+#define MY_STATE_FULL          4
+
+#define MASKL   DMX_MAX_FILTER_SIZE
+#define MAXFILT 32
+
+struct dvb_filter {
+        int               state;
+        int               flags;
+        int               type;
+        u8                ts_state;
+
+        u16               pid;
+        u8                value[MASKL];
+        u8                mask[MASKL];
+};
+
+
+enum {AV_PES_STREAM, PS_STREAM, TS_STREAM, PES_STREAM};
+
+typedef struct ps_packet_s{
+        u8                scr[6];
+        u8                mux_rate[3];
+        u8                stuff_length;
+        u8                data[20];
+        u8                sheader_llength[2];
+        int               sheader_length;
+        u8                rate_bound[3];
+        u8                audio_bound;
+        u8                video_bound;
+        u8                reserved;
+        int               npes;
+        int               mpeg;
+} ps_packet_t;
+
+typedef struct a2p_s{
+        int               type;
+        int               found;
+        int               length;
+        int               headr;
+        u8                cid;
+        u8                flags;
+        u8                abuf[MAX_PLENGTH];
+        int               alength;
+        u8                vbuf[MAX_PLENGTH];
+        int               vlength;
+        int               plength;
+        u8                last_av_pts[4];
+        u8                av_pts[4];
+        u8                scr[4];
+        u16               count0;
+        u16               count1;
+        u16               pidv;
+        u16               pida;
+        u16               countv;
+        u16               counta;
+        void             *dataA;
+        void             *dataV;
+        void              (*write_cb)(u8 const *buf, long int count,
+                                      void     *data);
+} a2p_t;
+
+
+typedef struct p2t_s {
+        u8                pes[TS_SIZE];
+        u8                counter;
+        long int          pos;
+        int               frags;
+        dvb_demux_feed_t *feed;
+} p2t_t;
+
+
+/* place to store all the necessary device information */
+typedef struct av7110_s {
+
+        /* devices */
+
+        struct dvb_device       dvb_dev;
+        dvb_net_t               dvb_net;
+        struct video_device     video;
+
+        struct saa7146         *saa;
+
+	struct tasklet_struct   debi_tasklet;
+	struct tasklet_struct   gpio_tasklet;
+	struct tasklet_struct   vpe_tasklet;
+	struct tasklet_struct   fidb_tasklet;
+
+        int adac_type;         /* audio DAC type */
+#define DVB_ADAC_TI       0
+#define DVB_ADAC_CRYSTAL  1
+#define DVB_ADAC_NONE    -1
+
+
+        /* buffers */
+
+        void                   *iobuf;   /* memory for all buffers */
+        ring_buffer_t           avout;   /* buffer for video or A/V mux */
+#define AVOUTLEN (128*1024)
+        ring_buffer_t           aout;    /* buffer for audio */
+#define AOUTLEN (64*1024)
+        void                   *bmpbuf;
+#define BMPLEN (8*32768+1024)
+
+        /* bitmap buffers and states */
+
+        int                     bmpp;
+        int                     bmplen;
+        int                     bmp_win;
+        u16                     bmp_x, bmp_y;
+        int                     bmp_trans;
+        int                     bmp_state;
+#define BMP_NONE     0
+#define BMP_LOADING  1
+#define BMP_LOADINGS 2
+#define BMP_LOADED   3
+        WAIT_QUEUE              bmpq;
+
+
+        /* DEBI and polled command interface */
+
+        spinlock_t              debilock;
+        struct semaphore        dcomlock;
+        int                     debitype;
+        int                     debilen;
+        int                     debibuf;
+
+
+        /* Recording and playback flags */
+
+        int                     rec_mode;
+        int                     playing;
+#define RP_NONE  0
+#define RP_VIDEO 1
+#define RP_AUDIO 2
+#define RP_AV    3
+
+
+        /* OSD */
+
+        int                     osdwin;      /* currently active window */
+        u16                     osdbpp[8];
+
+
+        /* CA */
+
+        ca_slot_info_t          ci_slot[2];
+
+        int                     vidmode;
+        dmxdev_t                dmxdev;
+        dvb_demux_t             demux;
+        char                    demux_id[16];
+
+        dmx_frontend_t          hw_frontend;
+        dmx_frontend_t          mem_frontend;
+
+        int                     fe_synced; 
+        struct semaphore        pid_mutex;
+
+        int                     video_blank;
+        struct video_status     videostate;
+        int                     display_ar;
+        int                     trickmode;
+#define TRICK_NONE   0
+#define TRICK_FAST   1
+#define TRICK_SLOW   2
+#define TRICK_FREEZE 3
+        struct audio_status      audiostate;
+
+        dvb_demux_filter_t     *handle2filter[32];
+        p2t_t                   p2t_filter[MAXFILT];
+        pes2ts_t                p2t[2];
+        struct ipack_s          ipack[2];
+        u8                     *kbuf[2];
+
+        int sinfo;
+        int shsize;
+        int swsize;
+
+        int tsf;
+        u32 ttbp;
+        int feeding;
+
+        int arm_errors;
+        int registered;
+
+
+	/* AV711X */
+
+        u32                 arm_fw;
+        u32                 arm_rtsl;
+        u32                 arm_vid;
+        u32                 arm_app;
+        u32                 avtype;
+        int                 arm_ready;
+        struct task_struct *arm_thread;
+        WAIT_QUEUE          arm_wait;
+        u16                 arm_loops;
+        int                 arm_rmmod;
+
+        void               *saa_mem;
+        void               *debi_virt;
+        dma_addr_t          debi_bus;
+
+        u16                 pids[DMX_PES_OTHER];
+        
+        ring_buffer_t       ci_rbuffer;
+        ring_buffer_t       ci_wbuffer;
+
+
+        dvb_adapter_t       *dvb_adapter;
+        dvb_device_t        *video_dev;
+        dvb_device_t        *audio_dev;
+        dvb_device_t        *ca_dev;
+        dvb_device_t        *osd_dev;
+
+        int                 dsp_dev;
+} av7110_t;
+
+
+#define	DPRAM_BASE 0x4000
+
+#define BOOT_STATE	(DPRAM_BASE + 0x3F8)
+#define BOOT_SIZE	(DPRAM_BASE + 0x3FA)
+#define BOOT_BASE	(DPRAM_BASE + 0x3FC)
+#define BOOT_BLOCK	(DPRAM_BASE + 0x400)
+#define BOOT_MAX_SIZE	0xc00
+
+#define IRQ_STATE	(DPRAM_BASE + 0x0F4)
+#define IRQ_STATE_EXT	(DPRAM_BASE + 0x0F6)
+#define MSGSTATE	(DPRAM_BASE + 0x0F8)
+#define FILT_STATE	(DPRAM_BASE + 0x0FA)
+#define COMMAND		(DPRAM_BASE + 0x0FC)
+#define COM_BUFF	(DPRAM_BASE + 0x100)
+#define COM_BUFF_SIZE	0x20
+
+#define BUFF1_BASE	(DPRAM_BASE + 0x120)
+#define BUFF1_SIZE	0xE0
+
+#define DATA_BUFF_BASE	(DPRAM_BASE + 0x200)
+#define DATA_BUFF_SIZE	0x1C00
+
+/* new buffers */
+
+#define DATA_BUFF0_BASE	(DPRAM_BASE + 0x200)
+#define DATA_BUFF0_SIZE	0x0800
+
+#define DATA_BUFF1_BASE	(DATA_BUFF0_BASE+DATA_BUFF0_SIZE)
+#define DATA_BUFF1_SIZE	0x0800
+
+#define DATA_BUFF2_BASE	(DATA_BUFF1_BASE+DATA_BUFF1_SIZE)
+#define DATA_BUFF2_SIZE	0x0800
+
+#define Reserved	(DPRAM_BASE + 0x1E00)
+#define Reserved_SIZE	0x1C0
+
+#define DEBUG_WINDOW	(DPRAM_BASE + 0x1FC0)
+#define	DBG_LOOP_CNT	(DEBUG_WINDOW + 0x00)
+#define DBG_SEC_CNT	(DEBUG_WINDOW + 0x02)
+#define DBG_AVRP_BUFF	(DEBUG_WINDOW + 0x04)
+#define DBG_AVRP_PEAK	(DEBUG_WINDOW + 0x06)
+#define DBG_MSG_CNT	(DEBUG_WINDOW + 0x08)
+#define DBG_CODE_REG	(DEBUG_WINDOW + 0x0a)
+#define DBG_TTX_Q	(DEBUG_WINDOW + 0x0c)
+#define DBG_AUD_EN	(DEBUG_WINDOW + 0x0e)
+#define DBG_WRONG_COM	(DEBUG_WINDOW + 0x10)
+#define DBG_ARR_OVFL	(DEBUG_WINDOW + 0x12)
+#define DBG_BUFF_OVFL	(DEBUG_WINDOW + 0x14)
+#define DBG_OVFL_CNT	(DEBUG_WINDOW + 0x16)
+#define DBG_SEC_OVFL	(DEBUG_WINDOW + 0x18)
+
+#define STATUS_BASE	(DPRAM_BASE + 0x1FC0)
+#define STATUS_SCR      (STATUS_BASE + 0x00)
+#define STATUS_MODES    (STATUS_BASE + 0x04)
+#define STATUS_LOOPS    (STATUS_BASE + 0x08)
+
+#define RX_TYPE         (DPRAM_BASE + 0x1FE8)
+#define RX_LEN          (DPRAM_BASE + 0x1FEA)
+#define TX_TYPE         (DPRAM_BASE + 0x1FEC)
+#define TX_LEN          (DPRAM_BASE + 0x1FEE)
+
+#define RX_BUFF         (DPRAM_BASE + 0x1FF4)
+#define TX_BUFF 	(DPRAM_BASE + 0x1FF6)
+
+#define HANDSHAKE_REG	(DPRAM_BASE + 0x1FF8)
+#define COM_IF_LOCK	(DPRAM_BASE + 0x1FFA)
+
+#define IRQ_RX		(DPRAM_BASE + 0x1FFC)
+#define IRQ_TX		(DPRAM_BASE + 0x1FFE)
+
+#define DRAM_START_CODE		0x2e000404
+#define DRAM_MAX_CODE_SIZE	0x00100000
+
+#define RESET_LINE		2
+#define DEBI_DONE_LINE		1
+#define ARM_IRQ_LINE		0
+
+#define DAC_CS	0x8000
+#define DAC_CDS	0x0000
+
+
+extern unsigned char *av7110_dpram_addr, *av7110_root_addr;
+extern int av7110_dpram_len, av7110_root_len;
+
+extern void av7110_register_irc_handler(void (*func)(u32));
+extern void av7110_unregister_irc_handler(void (*func)(u32)); 
+extern void av7110_setup_irc_config (av7110_t *av7110, u32 ir_config);
+
+extern int av7110_init (void);
+extern int av7110_ir_init (void);
+
+extern void av7110_exit (void);
+extern void av7110_ir_exit (void);
+
+
+#endif /* _AV7110_H_ */
+
+/*
+ * Local variables:
+ * c-indent-level: 8
+ * c-brace-imaginary-offset: 0
+ * c-brace-offset: -8
+ * c-argdecl-indent: 8
+ * c-label-offset: -8
+ * c-continued-statement-offset: 8
+ * c-continued-brace-offset: 0
+ * indent-tabs-mode: nil
+ * tab-width: 8
+ * End:
+ */
diff -Nru a/drivers/media/dvb/av7110/av7110_firm.h b/drivers/media/dvb/av7110/av7110_firm.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/av7110_firm.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,31852 @@
+
+#include <asm/types.h>
+
+u8 Dpram [] __initdata = {
+	0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e, 
+	0xe5, 0x9f, 0xf0, 0x18, 0xe2, 0x5e, 0xf0, 0x04, 
+	0xe2, 0x5e, 0xf0, 0x08, 0xe1, 0xa0, 0x00, 0x00, 
+	0xea, 0x00, 0x00, 0x06, 0xe2, 0x5e, 0xf0, 0x04, 
+	0x2c, 0x00, 0x00, 0xe8, 0x2e, 0x02, 0xcb, 0x40, 
+	0x2e, 0x02, 0x39, 0xb4, 0xa5, 0xa5, 0x5a, 0x5a, 
+	0x00, 0x1f, 0x15, 0x55, 0x00, 0x00, 0x00, 0x09, 
+	0xe9, 0x2d, 0x5f, 0xff, 0xe1, 0x4f, 0x00, 0x00, 
+	0xe9, 0x2d, 0x00, 0x01, 0xe2, 0x8f, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x10, 0x21, 0xff, 0x48, 0x25, 
+	0x68, 0x00, 0x40, 0x52, 0x42, 0x08, 0xd1, 0x0b, 
+	0x32, 0x20, 0x0a, 0x00, 0x42, 0x08, 0xd1, 0x07, 
+	0x32, 0x20, 0x0a, 0x00, 0x42, 0x08, 0xd1, 0x03, 
+	0x0a, 0x00, 0x42, 0x08, 0xd0, 0x29, 0x32, 0x20, 
+	0x21, 0x0f, 0x42, 0x08, 0xd1, 0x01, 0x32, 0x10, 
+	0x09, 0x00, 0x21, 0x01, 0x42, 0x08, 0xd1, 0x08, 
+	0x1d, 0x12, 0x21, 0x02, 0x42, 0x08, 0xd1, 0x04, 
+	0x1d, 0x12, 0x21, 0x04, 0x42, 0x08, 0xd1, 0x00, 
+	0x1d, 0x12, 0x48, 0x13, 0x68, 0x00, 0xb4, 0x01, 
+	0x08, 0x90, 0x21, 0x01, 0x40, 0x81, 0x48, 0x0f, 
+	0x60, 0x01, 0x48, 0x0d, 0x58, 0x82, 0x48, 0x01, 
+	0x46, 0x86, 0x47, 0x10, 0x2c, 0x00, 0x00, 0xb1, 
+	0xbc, 0x02, 0x48, 0x0b, 0x68, 0x02, 0x23, 0x20, 
+	0x05, 0x1b, 0x40, 0x1a, 0x43, 0x99, 0x43, 0x11, 
+	0x60, 0x01, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe8, 0xbd, 0x00, 0x01, 0xe1, 0x69, 0xf0, 0x00, 
+	0xe8, 0xbd, 0x5f, 0xff, 0xe2, 0x5e, 0xf0, 0x04, 
+	0x2e, 0x08, 0x3b, 0xa4, 0x66, 0x00, 0x00, 0x14, 
+	0x66, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x0c, 0x2e, 0x02, 0xcc, 0x48, 
+	0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+};
+
+
+u8 Root [] __initdata = {
+	0xb4, 0x90, 0x49, 0x18, 0x1c, 0x0b, 0x4a, 0x18, 
+	0x1a, 0x50, 0x4f, 0x18, 0x1a, 0x79, 0x10, 0x8f, 
+	0x21, 0x00, 0x2f, 0x00, 0xdd, 0x04, 0xcb, 0x10, 
+	0xc2, 0x10, 0x31, 0x01, 0x42, 0xb9, 0xdb, 0xfa, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
+	0x49, 0x13, 0x18, 0x08, 0x49, 0x13, 0x60, 0x08, 
+	0xbc, 0x90, 0x47, 0x70, 0x2e, 0x02, 0x36, 0x7c, 
+	0x9e, 0x00, 0x0a, 0x00, 0x2e, 0x02, 0x37, 0x7c, 
+	0x2e, 0x02, 0x36, 0xcc, 0x2e, 0x02, 0x38, 0x9c, 
+	0x2e, 0x02, 0x37, 0x04, 0x2e, 0x02, 0x38, 0xa0, 
+	0x2e, 0x02, 0x37, 0x20, 0x2e, 0x02, 0x38, 0xa4, 
+	0x2e, 0x02, 0x36, 0xcc, 0x2e, 0x02, 0x38, 0xa8, 
+	0x2e, 0x02, 0x36, 0xe8, 0x2e, 0x02, 0x38, 0xac, 
+	0x2e, 0x02, 0x37, 0x20, 0x2e, 0x02, 0x38, 0xb0, 
+	0x2e, 0x02, 0x37, 0x04, 0x2e, 0x02, 0x38, 0xb4, 
+	0x2e, 0x02, 0x36, 0x7c, 0x2e, 0x02, 0x38, 0xb8, 
+	0xb5, 0xf0, 0x1c, 0x0c, 0x1c, 0x15, 0x1c, 0x07, 
+	0xb0, 0x82, 0x2a, 0x00, 0xd1, 0x03, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x0e, 0x38, 
+	0x06, 0x00, 0x21, 0x0b, 0x06, 0x89, 0x4b, 0x43, 
+	0x93, 0x01, 0x42, 0x88, 0xd1, 0x32, 0x08, 0x78, 
+	0xd3, 0x05, 0x1e, 0x78, 0x88, 0x00, 0x70, 0x20, 
+	0x34, 0x01, 0x3d, 0x01, 0x37, 0x01, 0x08, 0xb8, 
+	0xd3, 0x0f, 0x2d, 0x02, 0xdb, 0x0d, 0x08, 0x60, 
+	0xd3, 0x06, 0x88, 0x39, 0x0a, 0x09, 0x70, 0x21, 
+	0x88, 0x38, 0x70, 0x60, 0x34, 0x02, 0xe0, 0x02, 
+	0x88, 0x38, 0x80, 0x20, 0x34, 0x02, 0x3d, 0x02, 
+	0x37, 0x02, 0x07, 0xae, 0x0f, 0xb6, 0x1b, 0xad, 
+	0xd0, 0x08, 0x9b, 0x01, 0x68, 0x1b, 0x1c, 0x38, 
+	0x1c, 0x21, 0x1c, 0x2a, 0xf0, 0x1d, 0xfe, 0x6a, 
+	0x19, 0x7f, 0x19, 0x64, 0x2e, 0x00, 0xd0, 0x54, 
+	0x68, 0x38, 0x90, 0x00, 0x46, 0x6f, 0x78, 0x38, 
+	0x70, 0x20, 0x34, 0x01, 0x37, 0x01, 0x3e, 0x01, 
+	0xd1, 0xf9, 0xe0, 0x4a, 0x0e, 0x20, 0x06, 0x00, 
+	0x42, 0x88, 0xd1, 0x3f, 0xe0, 0x14, 0x08, 0x60, 
+	0xd3, 0x08, 0x1e, 0x60, 0x88, 0x01, 0x23, 0xff, 
+	0x02, 0x1b, 0x40, 0x19, 0x78, 0x3a, 0x43, 0x11, 
+	0x80, 0x01, 0xe0, 0x06, 0x88, 0x21, 0x06, 0x09, 
+	0x0e, 0x09, 0x78, 0x3a, 0x02, 0x12, 0x43, 0x11, 
+	0x80, 0x21, 0x34, 0x01, 0x3d, 0x01, 0x37, 0x01, 
+	0x07, 0xb8, 0xd0, 0x01, 0x2d, 0x00, 0xdc, 0xe6, 
+	0x07, 0xae, 0x0f, 0xb6, 0x1b, 0xad, 0xd0, 0x06, 
+	0x9b, 0x01, 0x68, 0x1b, 0x1c, 0x38, 0x1c, 0x21, 
+	0x1c, 0x2a, 0xf0, 0x1d, 0xfe, 0x33, 0x19, 0x7f, 
+	0x19, 0x64, 0x2e, 0x00, 0xd0, 0x1d, 0x08, 0x60, 
+	0xd3, 0x08, 0x1e, 0x60, 0x88, 0x01, 0x23, 0xff, 
+	0x02, 0x1b, 0x40, 0x19, 0x78, 0x3a, 0x43, 0x11, 
+	0x80, 0x01, 0xe0, 0x06, 0x88, 0x21, 0x06, 0x09, 
+	0x0e, 0x09, 0x78, 0x3a, 0x02, 0x12, 0x43, 0x11, 
+	0x80, 0x21, 0x34, 0x01, 0x37, 0x01, 0x3e, 0x01, 
+	0xd1, 0xe9, 0xe0, 0x06, 0x9b, 0x01, 0x68, 0x1b, 
+	0x1c, 0x38, 0x1c, 0x21, 0x1c, 0x2a, 0xf0, 0x1d, 
+	0xfe, 0x11, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x48, 
+	0xb5, 0x00, 0x20, 0x03, 0xf0, 0x03, 0xfb, 0x98, 
+	0x48, 0x03, 0x89, 0x02, 0x8a, 0x01, 0x89, 0x80, 
+	0xf0, 0x05, 0xff, 0xc2, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x00, 0x00, 0xb5, 0xf0, 0x4f, 0x10, 
+	0x89, 0x3c, 0x89, 0xbe, 0x8a, 0x3d, 0x23, 0x04, 
+	0x43, 0xdb, 0x68, 0x78, 0x40, 0x18, 0x0c, 0x1a, 
+	0x60, 0x78, 0xb4, 0x04, 0x1c, 0x13, 0x22, 0x00, 
+	0x21, 0x00, 0x20, 0x00, 0xf0, 0x00, 0xf8, 0x14, 
+	0x20, 0x01, 0x60, 0x78, 0xb0, 0x01, 0x4a, 0x07, 
+	0xb4, 0x04, 0x1c, 0x20, 0x1c, 0x31, 0x1c, 0x2a, 
+	0x4b, 0x04, 0xf0, 0x00, 0xf8, 0x09, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0xb5, 0xf0, 0x9f, 0x05, 0x04, 0x04, 0x0c, 0x24, 
+	0x04, 0x0d, 0x0c, 0x2d, 0x04, 0x16, 0x0c, 0x36, 
+	0x04, 0x18, 0x0c, 0x00, 0xb0, 0x82, 0x90, 0x00, 
+	0x04, 0x38, 0x0c, 0x00, 0xb0, 0x81, 0x49, 0xa9, 
+	0x4f, 0xa9, 0x42, 0x8d, 0xd1, 0x00, 0x89, 0xbd, 
+	0x42, 0x8e, 0xd1, 0x00, 0x8a, 0x3e, 0x4a, 0xa7, 
+	0x42, 0x95, 0xd1, 0x02, 0x89, 0xbd, 0x08, 0xd3, 
+	0x81, 0xbb, 0x4b, 0xa4, 0x42, 0x9e, 0xd1, 0x02, 
+	0x8a, 0x3e, 0x08, 0xdb, 0x82, 0x3b, 0x9a, 0x01, 
+	0x42, 0x8a, 0xd1, 0x01, 0x8a, 0xba, 0x92, 0x01, 
+	0xa0, 0x9f, 0x22, 0x2d, 0x21, 0x00, 0xf0, 0x06, 
+	0xf8, 0x69, 0xa0, 0x9f, 0x22, 0x37, 0x21, 0x00, 
+	0xf0, 0x06, 0xf8, 0x64, 0x22, 0x3c, 0x21, 0x00, 
+	0x1c, 0x28, 0xf0, 0x06, 0xf8, 0x97, 0xa0, 0x9c, 
+	0x22, 0x41, 0x21, 0x00, 0xf0, 0x06, 0xf8, 0x5a, 
+	0x22, 0x46, 0x21, 0x00, 0x1c, 0x30, 0xf0, 0x06, 
+	0xf8, 0x8d, 0xa0, 0x99, 0x22, 0x37, 0x21, 0x01, 
+	0xf0, 0x06, 0xf8, 0x50, 0x22, 0x3e, 0x21, 0x01, 
+	0x1c, 0x20, 0xf0, 0x06, 0xf8, 0x83, 0xa0, 0x96, 
+	0x22, 0x37, 0x21, 0x02, 0xf0, 0x06, 0xf8, 0x46, 
+	0x22, 0x3e, 0x21, 0x02, 0x98, 0x01, 0xf0, 0x06, 
+	0xf8, 0x79, 0x8a, 0xbb, 0x99, 0x01, 0x42, 0x99, 
+	0xd0, 0x20, 0x68, 0x38, 0x90, 0x02, 0x28, 0x00, 
+	0xd0, 0x1a, 0x2b, 0x00, 0xd0, 0x0a, 0x22, 0x00, 
+	0x21, 0x00, 0x20, 0x1c, 0xb4, 0x07, 0x1c, 0x19, 
+	0x23, 0x10, 0x22, 0x1d, 0x98, 0x05, 0xf0, 0x0f, 
+	0xfe, 0x75, 0xb0, 0x03, 0x98, 0x01, 0x28, 0x00, 
+	0xd0, 0x0a, 0x22, 0x01, 0x21, 0x00, 0x20, 0x1c, 
+	0xb4, 0x07, 0x99, 0x04, 0x23, 0x10, 0x22, 0x1d, 
+	0x68, 0x38, 0xf0, 0x0f, 0xfe, 0x67, 0xb0, 0x03, 
+	0x98, 0x01, 0x82, 0xb8, 0x4b, 0x80, 0x42, 0x9c, 
+	0xd0, 0x46, 0xdc, 0x37, 0x2c, 0x00, 0xd0, 0x3d, 
+	0x3b, 0x02, 0x42, 0x9c, 0xd0, 0x38, 0x4b, 0x7d, 
+	0x42, 0x9c, 0xd1, 0x00, 0x1c, 0x34, 0xa0, 0x7c, 
+	0x22, 0x42, 0x21, 0x01, 0xf0, 0x06, 0xf8, 0x0a, 
+	0x22, 0x43, 0x21, 0x01, 0x1c, 0x20, 0xf0, 0x06, 
+	0xf8, 0x3d, 0xa0, 0x78, 0x22, 0x47, 0x21, 0x01, 
+	0xf0, 0x06, 0xf8, 0x00, 0x22, 0x00, 0xb4, 0x04, 
+	0x23, 0x00, 0x49, 0x64, 0x20, 0x1c, 0xf0, 0x0f, 
+	0xff, 0xdf, 0x89, 0xb8, 0xb0, 0x01, 0x42, 0x85, 
+	0xd1, 0x02, 0x89, 0x38, 0x42, 0x84, 0xd0, 0x44, 
+	0x81, 0xbd, 0x20, 0x1f, 0xf0, 0x10, 0xfb, 0x18, 
+	0x23, 0x03, 0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 
+	0x21, 0x02, 0x20, 0x1f, 0xf0, 0x10, 0xf9, 0x90, 
+	0x2d, 0x00, 0xd0, 0x33, 0x2d, 0x01, 0xd1, 0x11, 
+	0x25, 0x00, 0xe0, 0x32, 0x4b, 0x57, 0x42, 0x9c, 
+	0xd0, 0x04, 0x33, 0x01, 0x42, 0x9c, 0xd1, 0xca, 
+	0x89, 0x3c, 0xe7, 0xc8, 0x2d, 0x00, 0xd0, 0x01, 
+	0x1c, 0x2c, 0xe7, 0xc4, 0x1c, 0x34, 0xe7, 0xc2, 
+	0x1c, 0x2c, 0xe7, 0xc0, 0x42, 0xac, 0xd1, 0x01, 
+	0x20, 0x80, 0xe0, 0x00, 0x20, 0x00, 0x22, 0x00, 
+	0xb4, 0x04, 0x06, 0x00, 0x0e, 0x00, 0x22, 0x02, 
+	0x43, 0x02, 0x23, 0x01, 0x20, 0x1f, 0x1c, 0x29, 
+	0xf0, 0x0f, 0xff, 0xa6, 0x23, 0x01, 0x02, 0x9b, 
+	0x00, 0x5a, 0x21, 0x01, 0x20, 0x1f, 0xb0, 0x01, 
+	0xf0, 0x10, 0xf9, 0x62, 0x21, 0x00, 0x20, 0x1f, 
+	0xf0, 0x10, 0xfe, 0x54, 0x20, 0x01, 0xf0, 0x13, 
+	0xfa, 0x43, 0xe0, 0x02, 0x20, 0x00, 0xf0, 0x13, 
+	0xfa, 0x3f, 0x8a, 0x38, 0x42, 0x86, 0xd1, 0x02, 
+	0x89, 0x39, 0x42, 0x8c, 0xd0, 0x52, 0x28, 0x00, 
+	0xd0, 0x0d, 0x20, 0x03, 0xf0, 0x13, 0xfb, 0x96, 
+	0x20, 0x1e, 0xf0, 0x10, 0xfb, 0x93, 0x23, 0x03, 
+	0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 
+	0x20, 0x1e, 0xf0, 0x10, 0xf9, 0x41, 0x82, 0x3e, 
+	0x2e, 0x00, 0xd0, 0x3f, 0x42, 0xb4, 0xd1, 0x02, 
+	0x20, 0x80, 0x90, 0x00, 0xe0, 0x01, 0x20, 0x00, 
+	0x90, 0x00, 0xf0, 0x23, 0xf8, 0x8d, 0x23, 0x01, 
+	0x04, 0x1b, 0x43, 0x18, 0xf0, 0x23, 0xf8, 0x8c, 
+	0x21, 0x00, 0x20, 0x00, 0xf0, 0x14, 0xf8, 0x74, 
+	0x20, 0xff, 0x49, 0x37, 0x68, 0x09, 0x70, 0x08, 
+	0x49, 0x36, 0x48, 0x37, 0x23, 0x1e, 0x22, 0x10, 
+	0xf0, 0x14, 0xf9, 0xa8, 0x48, 0x35, 0x68, 0x00, 
+	0x78, 0x01, 0x23, 0x06, 0x43, 0x19, 0x70, 0x01, 
+	0xf0, 0x23, 0xf8, 0x72, 0x4b, 0x32, 0x40, 0x18, 
+	0xf0, 0x23, 0xf8, 0x72, 0x22, 0x00, 0xb4, 0x04, 
+	0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x22, 0x02, 
+	0x43, 0x02, 0x23, 0x02, 0x20, 0x1e, 0x1c, 0x31, 
+	0xf0, 0x0f, 0xff, 0x46, 0x23, 0x01, 0x02, 0x9b, 
+	0x00, 0x5a, 0x21, 0x01, 0x20, 0x1e, 0xb0, 0x01, 
+	0xf0, 0x10, 0xf9, 0x02, 0x21, 0x00, 0x20, 0x1e, 
+	0xf0, 0x10, 0xfd, 0xf4, 0x42, 0xac, 0xd0, 0x18, 
+	0x42, 0xb4, 0xd0, 0x16, 0x2c, 0x00, 0xd0, 0x14, 
+	0x23, 0x01, 0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 
+	0x20, 0x1c, 0xf0, 0x10, 0xf8, 0xf1, 0x22, 0x00, 
+	0xb4, 0x04, 0x23, 0x00, 0x22, 0x82, 0x20, 0x1c, 
+	0x1c, 0x21, 0xf0, 0x0f, 0xff, 0x25, 0xb0, 0x01, 
+	0xa0, 0x1a, 0x22, 0x47, 0x21, 0x01, 0xf0, 0x05, 
+	0xff, 0x39, 0x81, 0x3c, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 
+	0x53, 0x49, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 
+	0x56, 0x50, 0x49, 0x44, 0x3a, 0x00, 0x00, 0x00, 
+	0x41, 0x50, 0x49, 0x44, 0x3a, 0x00, 0x00, 0x00, 
+	0x50, 0x43, 0x52, 0x50, 0x49, 0x44, 0x3a, 0x00, 
+	0x54, 0x58, 0x54, 0x50, 0x49, 0x44, 0x3a, 0x00, 
+	0x00, 0x00, 0xff, 0xfd, 0x00, 0x00, 0xff, 0xfc, 
+	0x2f, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0x98, 0x2e, 0x08, 0x48, 0x10, 
+	0x2e, 0x08, 0x05, 0xb4, 0x2e, 0x08, 0x9b, 0xc4, 
+	0xff, 0xfe, 0xff, 0xff, 0x2a, 0x00, 0x00, 0x00, 
+	0xb5, 0x00, 0x22, 0x00, 0xb4, 0x04, 0x04, 0x01, 
+	0x0c, 0x09, 0x23, 0x00, 0x4a, 0x03, 0x1e, 0x50, 
+	0xf7, 0xff, 0xfe, 0x66, 0xb0, 0x01, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0xb5, 0x00, 0x22, 0x00, 0xb4, 0x04, 0x04, 0x02, 
+	0x0c, 0x12, 0x23, 0x00, 0x49, 0x03, 0x1e, 0x48, 
+	0xf7, 0xff, 0xfe, 0x56, 0xb0, 0x01, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0xb5, 0x00, 0x04, 0x00, 0x0c, 0x00, 0xd0, 0x08, 
+	0x28, 0x01, 0xd0, 0x0b, 0x28, 0x02, 0xd1, 0x02, 
+	0x02, 0x00, 0xf0, 0x13, 0xfa, 0xcf, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x80, 0xf0, 0x13, 0xfa, 0xca, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0xff, 0x30, 0x01, 
+	0xf0, 0x13, 0xfa, 0xc4, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xb0, 0x27, 0x00, 0x4c, 0x1b, 0x20, 0x01, 
+	0x04, 0x80, 0x21, 0x00, 0x22, 0x00, 0xc4, 0x86, 
+	0xc4, 0x84, 0x3c, 0x14, 0xf0, 0x05, 0xf8, 0x9c, 
+	0x61, 0x60, 0x28, 0x00, 0xd0, 0x06, 0x21, 0x01, 
+	0x04, 0x89, 0x61, 0xe1, 0x18, 0x41, 0x62, 0x20, 
+	0x61, 0xa1, 0xe0, 0x02, 0x61, 0xe7, 0x61, 0xa7, 
+	0x62, 0x27, 0x68, 0x21, 0x00, 0xc9, 0x4a, 0x10, 
+	0x18, 0x89, 0x60, 0x48, 0x20, 0x00, 0x49, 0x0f, 
+	0x4d, 0x0f, 0x00, 0x42, 0x52, 0x8d, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x1d, 0xdb, 0xf8, 
+	0x20, 0x00, 0x1c, 0x39, 0x4c, 0x0b, 0x4f, 0x0c, 
+	0x4b, 0x0c, 0x00, 0x42, 0x52, 0xa5, 0x00, 0x82, 
+	0x50, 0xb9, 0x50, 0x99, 0x30, 0x01, 0x06, 0x00, 
+	0x0e, 0x00, 0x28, 0x20, 0xdb, 0xf5, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x00, 0x1c, 
+	0x2e, 0x08, 0x3c, 0x20, 0x2e, 0x08, 0x49, 0xa8, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0xe0, 
+	0x2e, 0x08, 0x4a, 0x98, 0x2e, 0x08, 0x4b, 0x18, 
+	0xb4, 0xf0, 0xb0, 0x81, 0x49, 0x25, 0xc9, 0x0c, 
+	0x39, 0x08, 0x1a, 0xd2, 0x60, 0x8a, 0xd5, 0x02, 
+	0x32, 0xff, 0x32, 0x01, 0x60, 0x8a, 0x6a, 0x0a, 
+	0x62, 0x8a, 0x68, 0x8f, 0x2f, 0xfe, 0xdb, 0x03, 
+	0x20, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0x47, 0x70, 
+	0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 0x4c, 0x1b, 
+	0x69, 0xa6, 0x69, 0x64, 0x2f, 0x3e, 0xdb, 0x24, 
+	0x00, 0xdb, 0x4f, 0x19, 0x19, 0xdb, 0x68, 0x5b, 
+	0x62, 0x4b, 0x93, 0x00, 0x1a, 0x9f, 0x4b, 0x15, 
+	0x69, 0xdd, 0x2f, 0x00, 0xdc, 0x00, 0x19, 0x7f, 
+	0x23, 0x01, 0x03, 0x1b, 0x18, 0xc3, 0x42, 0xbb, 
+	0xdd, 0x0f, 0x18, 0x17, 0x42, 0xb7, 0xdb, 0x09, 
+	0x9a, 0x00, 0x1b, 0x12, 0x2a, 0x00, 0xdc, 0x00, 
+	0x19, 0x52, 0x42, 0x93, 0xdd, 0x11, 0x18, 0x20, 
+	0x62, 0x08, 0xe0, 0x0e, 0x62, 0x0f, 0x1c, 0x14, 
+	0xe0, 0x0b, 0x18, 0x10, 0x62, 0x08, 0x1c, 0x14, 
+	0xe0, 0x07, 0x18, 0x12, 0x42, 0xb2, 0xdb, 0x00, 
+	0x62, 0x0c, 0x6a, 0x0a, 0x18, 0x10, 0x62, 0x08, 
+	0x1c, 0x14, 0x1c, 0x20, 0xb0, 0x01, 0xbc, 0xf0, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x1c, 
+	0x2e, 0x08, 0x3c, 0x20, 0x48, 0x03, 0x6a, 0x81, 
+	0x62, 0x01, 0x69, 0x01, 0x31, 0x01, 0x61, 0x01, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x1c, 
+	0xb5, 0xf7, 0x04, 0x05, 0x0c, 0x2d, 0x04, 0x0e, 
+	0x0c, 0x36, 0xb0, 0x81, 0x23, 0x01, 0x03, 0x1b, 
+	0x98, 0x03, 0x42, 0x9e, 0xdd, 0x05, 0x20, 0xff, 
+	0xb0, 0x01, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x4f, 0x24, 0x68, 0xb9, 0x29, 0xff, 
+	0xdb, 0x02, 0x20, 0xff, 0xb0, 0x01, 0xe7, 0xf4, 
+	0x00, 0x69, 0x19, 0x49, 0x00, 0x89, 0x4a, 0x20, 
+	0x18, 0x8c, 0x89, 0x21, 0x29, 0x01, 0xd0, 0x02, 
+	0x20, 0xff, 0xb0, 0x01, 0xe7, 0xe9, 0x79, 0x81, 
+	0x91, 0x00, 0x88, 0xa0, 0x08, 0x40, 0x07, 0x80, 
+	0xd1, 0x02, 0x1c, 0x28, 0xf0, 0x05, 0xfa, 0xf4, 
+	0x88, 0xa0, 0x23, 0x06, 0x40, 0x18, 0x28, 0x02, 
+	0xd1, 0x09, 0x88, 0xe0, 0x99, 0x00, 0x42, 0x88, 
+	0xd1, 0x05, 0x1c, 0x28, 0xf0, 0x05, 0xfa, 0xe8, 
+	0x20, 0xff, 0xb0, 0x01, 0xe7, 0xd1, 0x88, 0xe0, 
+	0x4b, 0x10, 0x42, 0x98, 0xd1, 0x01, 0x99, 0x00, 
+	0x80, 0xe1, 0x68, 0x39, 0x00, 0xc8, 0x4a, 0x0e, 
+	0x52, 0x15, 0x18, 0x80, 0x80, 0x46, 0x9a, 0x03, 
+	0x31, 0x01, 0x60, 0x42, 0x20, 0x00, 0x23, 0xff, 
+	0x60, 0x39, 0x33, 0x01, 0x42, 0x99, 0xd1, 0x00, 
+	0x60, 0x38, 0x68, 0xb9, 0x31, 0x01, 0x60, 0xb9, 
+	0x68, 0xfb, 0x42, 0x99, 0xdd, 0x00, 0x60, 0xf9, 
+	0xb0, 0x01, 0xe7, 0xb2, 0x2e, 0x08, 0x00, 0x1c, 
+	0x2e, 0x08, 0x48, 0x28, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x3c, 0x20, 0xb5, 0xf0, 0x26, 0xff, 
+	0xb0, 0x83, 0x49, 0x3b, 0x91, 0x01, 0x48, 0x3b, 
+	0x8e, 0x80, 0x28, 0x00, 0xd0, 0x03, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x4f, 0x38, 
+	0xcf, 0x05, 0x3f, 0x08, 0x1a, 0x80, 0x60, 0xb8, 
+	0x1c, 0x01, 0xd5, 0x02, 0x1d, 0xc8, 0x30, 0xf9, 
+	0x60, 0xb8, 0x68, 0xb8, 0x28, 0x00, 0xd1, 0x03, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0xd0, 0x49, 0x30, 0x5a, 0x0d, 0x18, 0x40, 
+	0x88, 0x44, 0x68, 0x40, 0x90, 0x00, 0x00, 0xa8, 
+	0x49, 0x2d, 0x58, 0x09, 0x91, 0x02, 0x29, 0x00, 
+	0xd0, 0x08, 0x49, 0x2c, 0x58, 0x0b, 0x99, 0x00, 
+	0x9e, 0x02, 0x1c, 0x28, 0x1c, 0x22, 0xf0, 0x1d, 
+	0xfa, 0xdb, 0x26, 0x00, 0x48, 0x28, 0x78, 0x00, 
+	0x28, 0x00, 0xd0, 0x09, 0x1c, 0x28, 0xf0, 0x0d, 
+	0xfa, 0xc3, 0x28, 0xff, 0xd1, 0x04, 0x98, 0x00, 
+	0x1c, 0x21, 0xf0, 0x0d, 0xfa, 0x3f, 0x26, 0x00, 
+	0x2e, 0x00, 0xd0, 0x29, 0x06, 0xed, 0x0e, 0xed, 
+	0x1c, 0xe0, 0x08, 0x82, 0x00, 0x92, 0x98, 0x00, 
+	0x99, 0x01, 0x6a, 0xfb, 0xf0, 0x1d, 0xfa, 0xba, 
+	0x00, 0x68, 0x19, 0x40, 0x00, 0x80, 0x49, 0x1b, 
+	0x18, 0x40, 0x88, 0x80, 0x21, 0x0c, 0x40, 0x01, 
+	0x29, 0x0c, 0xd1, 0x04, 0x02, 0x29, 0x31, 0x02, 
+	0x04, 0x09, 0x0c, 0x09, 0xe0, 0x03, 0x02, 0x29, 
+	0x31, 0x01, 0x04, 0x09, 0x0c, 0x09, 0x08, 0x40, 
+	0xd3, 0x04, 0x04, 0x08, 0x0c, 0x00, 0x21, 0x01, 
+	0x03, 0xc9, 0x43, 0x01, 0x48, 0x09, 0x85, 0x01, 
+	0x85, 0x44, 0x21, 0x01, 0x02, 0x49, 0x86, 0x81, 
+	0x68, 0x78, 0x28, 0xff, 0xd1, 0x02, 0x20, 0x00, 
+	0x60, 0x78, 0xe0, 0x01, 0x30, 0x01, 0x60, 0x78, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2c, 0x00, 0x02, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2e, 0x08, 0x00, 0x1c, 0x2e, 0x08, 0x3c, 0x20, 
+	0x2e, 0x08, 0x4a, 0x98, 0x2e, 0x08, 0x4b, 0x18, 
+	0x2e, 0x08, 0x1a, 0x94, 0x2e, 0x08, 0x48, 0x28, 
+	0xb4, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x4f, 0x14, 
+	0x8e, 0xba, 0x2a, 0x00, 0xd0, 0x03, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0xf0, 0x47, 0x70, 0x1c, 0x05, 
+	0x4c, 0x10, 0x1d, 0x48, 0xd5, 0x00, 0x30, 0x01, 
+	0x10, 0x40, 0x04, 0x01, 0x0c, 0x09, 0x20, 0x00, 
+	0x29, 0x02, 0xdb, 0xf2, 0x29, 0xe0, 0xdc, 0xf0, 
+	0x22, 0x00, 0x29, 0x00, 0xdd, 0x07, 0x00, 0x53, 
+	0x5a, 0xee, 0x52, 0xe6, 0x32, 0x01, 0x04, 0x12, 
+	0x0c, 0x12, 0x42, 0x8a, 0xdb, 0xf7, 0x22, 0x04, 
+	0x85, 0x3a, 0x00, 0x49, 0x85, 0x79, 0x21, 0x0f, 
+	0x02, 0x49, 0x86, 0xb9, 0xbc, 0xf0, 0x47, 0x70, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x1e, 0x00, 
+	0xb5, 0xb0, 0x27, 0x00, 0x4d, 0x13, 0x8e, 0xa9, 
+	0x29, 0x00, 0xd0, 0x03, 0x43, 0xf8, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x79, 0x04, 0x09, 
+	0x0c, 0x09, 0x1c, 0x3a, 0x1c, 0x0f, 0x56, 0x81, 
+	0x29, 0x00, 0xd1, 0xf7, 0x24, 0x00, 0x2f, 0xfe, 
+	0xdd, 0x03, 0x27, 0xfe, 0x1d, 0xc1, 0x31, 0xd9, 
+	0x77, 0xcc, 0x1c, 0x7a, 0x49, 0x08, 0xf7, 0xff, 
+	0xfb, 0x8f, 0x20, 0x04, 0x85, 0x28, 0x1c, 0xf8, 
+	0x08, 0x80, 0x00, 0x80, 0x85, 0x68, 0x20, 0x0f, 
+	0x02, 0x40, 0x86, 0xa8, 0x1c, 0x20, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2c, 0x00, 0x1e, 0x00, 0xb5, 0x90, 0x06, 0x04, 
+	0x0e, 0x24, 0x06, 0x0f, 0x0e, 0x3f, 0xb0, 0x88, 
+	0xf0, 0x04, 0xfa, 0x1e, 0x28, 0x00, 0xd0, 0x05, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x08, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xab, 0x00, 0x70, 0x1c, 
+	0x70, 0x5f, 0x46, 0x68, 0x21, 0x20, 0xf0, 0x0a, 
+	0xfa, 0x6f, 0xb0, 0x08, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0xb4, 0xf0, 0x04, 0x0a, 0x0c, 0x12, 
+	0x4b, 0x15, 0x8e, 0x9f, 0x2f, 0x00, 0xd0, 0x03, 
+	0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 0x47, 0x70, 
+	0x07, 0xd7, 0x0f, 0xff, 0x04, 0x09, 0x0c, 0x09, 
+	0x08, 0x49, 0x2f, 0x00, 0xd0, 0x03, 0x31, 0x03, 
+	0x04, 0x09, 0x0c, 0x09, 0xe0, 0x02, 0x31, 0x02, 
+	0x04, 0x09, 0x0c, 0x09, 0x1c, 0x05, 0x4c, 0x0b, 
+	0x20, 0x00, 0x29, 0x00, 0xdd, 0x07, 0x00, 0x47, 
+	0x5b, 0xee, 0x53, 0xe6, 0x30, 0x01, 0x04, 0x00, 
+	0x0c, 0x00, 0x42, 0x88, 0xdb, 0xf7, 0x20, 0x05, 
+	0x85, 0x18, 0x85, 0x5a, 0x20, 0x01, 0x02, 0x40, 
+	0x86, 0x98, 0x20, 0x00, 0xbc, 0xf0, 0x47, 0x70, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x02, 0x00, 
+	0x04, 0x01, 0x0c, 0x09, 0x48, 0x0b, 0x6f, 0xc2, 
+	0x20, 0x00, 0x43, 0xc0, 0x2a, 0x00, 0xd1, 0x0f, 
+	0x4a, 0x09, 0x8e, 0xd3, 0x2b, 0x00, 0xd1, 0x0b, 
+	0x48, 0x08, 0x86, 0xc1, 0x23, 0x07, 0x86, 0x83, 
+	0x85, 0x93, 0x85, 0xd1, 0x20, 0x09, 0x02, 0x40, 
+	0x86, 0xd0, 0x20, 0x01, 0x87, 0x90, 0x20, 0x00, 
+	0x47, 0x70, 0x00, 0x00, 0x2c, 0x00, 0x1f, 0x80, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x00, 0xc0, 
+	0xb5, 0x80, 0x1c, 0x01, 0x4a, 0x0d, 0x8e, 0xd3, 
+	0x20, 0x00, 0x43, 0xc0, 0x2b, 0x00, 0xd1, 0x12, 
+	0x8d, 0x93, 0x2b, 0x07, 0xd1, 0x0f, 0x8d, 0xd7, 
+	0x20, 0x00, 0x85, 0x90, 0x2f, 0x00, 0xd0, 0x0a, 
+	0x23, 0x01, 0x02, 0xdb, 0x42, 0x9f, 0xdc, 0x06, 
+	0x1c, 0x3a, 0x48, 0x05, 0x4b, 0x05, 0x6a, 0xdb, 
+	0xf0, 0x1d, 0xf9, 0x98, 0x1c, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2c, 0x00, 0x12, 0x00, 0x2e, 0x08, 0x00, 0x1c, 
+	0xb5, 0xf0, 0xb0, 0x83, 0x49, 0x62, 0x8e, 0x88, 
+	0x28, 0x00, 0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x4e, 0x5f, 0x78, 0x30, 
+	0x49, 0x5f, 0x91, 0x02, 0x78, 0x09, 0x42, 0x88, 
+	0xd1, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x00, 0x4d, 0x5b, 0x4b, 0x5c, 
+	0x93, 0x01, 0x1d, 0xd9, 0x31, 0x19, 0x7d, 0x0a, 
+	0x00, 0x53, 0x18, 0x9b, 0x01, 0x1b, 0x19, 0x5b, 
+	0x78, 0xdc, 0x1c, 0x1f, 0x79, 0x1b, 0x42, 0x9c, 
+	0xd1, 0x04, 0x79, 0x7b, 0x07, 0xdb, 0x0f, 0xdb, 
+	0x2b, 0x01, 0xd1, 0x06, 0x7d, 0x0b, 0x93, 0x00, 
+	0x32, 0x01, 0x07, 0x52, 0x0f, 0x52, 0x75, 0x0a, 
+	0xe0, 0x08, 0x32, 0x01, 0x07, 0x52, 0x0f, 0x52, 
+	0x75, 0x0a, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
+	0x28, 0x08, 0xdb, 0xe0, 0x28, 0x08, 0xd1, 0x03, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x00, 0x00, 0x43, 0x18, 0x18, 0x01, 0x00, 
+	0x19, 0x47, 0x78, 0xf8, 0x00, 0xc0, 0x19, 0xc0, 
+	0x89, 0x84, 0x23, 0x01, 0x03, 0x1b, 0x42, 0x9c, 
+	0xdd, 0x00, 0x1c, 0x1c, 0x68, 0x81, 0x89, 0xc0, 
+	0x18, 0x08, 0x1c, 0xe1, 0x08, 0x8a, 0x00, 0x92, 
+	0x49, 0x3e, 0x9b, 0x01, 0x6a, 0xdb, 0xf0, 0x1d, 
+	0xf9, 0x35, 0x88, 0x38, 0x02, 0x00, 0x30, 0x09, 
+	0x49, 0x35, 0x85, 0x08, 0x85, 0x4c, 0x20, 0x01, 
+	0x02, 0x40, 0x86, 0x88, 0x78, 0xf8, 0x00, 0xc0, 
+	0x19, 0xc0, 0x89, 0xc1, 0x19, 0x09, 0x81, 0xc1, 
+	0x78, 0xf8, 0x00, 0xc0, 0x19, 0xc0, 0x89, 0x81, 
+	0x1b, 0x09, 0x81, 0x81, 0x78, 0xf8, 0x00, 0xc0, 
+	0x19, 0xc0, 0x89, 0x81, 0x29, 0x00, 0xd1, 0x4f, 
+	0x24, 0x00, 0x81, 0xc4, 0x78, 0xf9, 0x6a, 0xb8, 
+	0x18, 0x40, 0x73, 0x04, 0x78, 0xf8, 0x30, 0x01, 
+	0x07, 0x80, 0x0f, 0x80, 0x70, 0xf8, 0x78, 0x30, 
+	0x30, 0x01, 0x70, 0x30, 0x78, 0xf8, 0x79, 0x39, 
+	0x42, 0x88, 0xd1, 0x3d, 0x79, 0x78, 0x21, 0x02, 
+	0x40, 0x01, 0x29, 0x02, 0xd1, 0x1e, 0x70, 0xfc, 
+	0x71, 0x3c, 0x71, 0x7c, 0x49, 0x22, 0x80, 0x39, 
+	0x6a, 0xb8, 0x68, 0x00, 0xf0, 0x04, 0xfd, 0xb6, 
+	0x6a, 0xb8, 0xf0, 0x04, 0xfd, 0xb3, 0x20, 0x00, 
+	0x49, 0x1d, 0x00, 0x42, 0x18, 0x12, 0x01, 0x12, 
+	0x5a, 0xaa, 0x42, 0x8a, 0xd1, 0x04, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x08, 0xdb, 0xf4, 
+	0x28, 0x08, 0xd1, 0x1d, 0x70, 0x34, 0x99, 0x02, 
+	0x70, 0x0c, 0xe0, 0x19, 0x07, 0xc0, 0x0f, 0xc0, 
+	0x28, 0x01, 0xd1, 0x15, 0x70, 0xfc, 0x71, 0x3c, 
+	0x21, 0x06, 0x1d, 0xf8, 0x30, 0x19, 0x73, 0x41, 
+	0x6a, 0xb9, 0x72, 0x0c, 0x79, 0x79, 0x08, 0x49, 
+	0x00, 0x49, 0x71, 0x79, 0x22, 0x04, 0x7b, 0x01, 
+	0xb4, 0x06, 0x78, 0xb9, 0x22, 0x0a, 0x20, 0x85, 
+	0x6a, 0xbb, 0xf0, 0x0f, 0xfd, 0xc3, 0xb0, 0x02, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x03, 0xc0, 
+	0x2e, 0x08, 0x03, 0xbc, 0x2e, 0x08, 0x45, 0x18, 
+	0x2e, 0x08, 0x00, 0x1c, 0x2c, 0x00, 0x02, 0x00, 
+	0x00, 0x00, 0xff, 0xff, 0xb5, 0x80, 0x4f, 0x0b, 
+	0x68, 0x38, 0x28, 0x00, 0xd1, 0x0f, 0x20, 0x2f, 
+	0x02, 0x80, 0xf0, 0x04, 0xfd, 0x91, 0x60, 0x38, 
+	0x20, 0x00, 0x49, 0x07, 0x60, 0x08, 0x49, 0x07, 
+	0x60, 0x08, 0x49, 0x07, 0x60, 0x08, 0x20, 0x2f, 
+	0x02, 0x80, 0x49, 0x06, 0x60, 0x08, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x02, 0xcb, 0x04, 
+	0x2e, 0x02, 0xcb, 0x0c, 0x2e, 0x02, 0xcb, 0x08, 
+	0x2e, 0x02, 0xcb, 0x10, 0x2e, 0x02, 0xcb, 0x14, 
+	0xb5, 0x80, 0x4f, 0x04, 0x68, 0x38, 0xf0, 0x04, 
+	0xfd, 0x7d, 0x20, 0x00, 0x60, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x02, 0xcb, 0x04, 
+	0xb5, 0xf0, 0xb0, 0x82, 0x4a, 0x33, 0x8e, 0x90, 
+	0x28, 0x00, 0xd0, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x48, 0x30, 0x68, 0x01, 
+	0x4e, 0x30, 0x68, 0x30, 0x1a, 0x09, 0xd1, 0x03, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x29, 0x00, 0xda, 0x02, 0x23, 0x2f, 0x02, 0x9b, 
+	0x18, 0xc9, 0x23, 0x2f, 0x01, 0x1b, 0x42, 0x99, 
+	0xda, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x4a, 0x24, 0x8e, 0xd2, 0x2a, 0x00, 
+	0xd0, 0x06, 0x4b, 0x25, 0x42, 0x99, 0xda, 0x03, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1f, 0xcf, 0x3f, 0xff, 0x3f, 0x72, 0x4b, 0x21, 
+	0x42, 0x9f, 0xdd, 0x00, 0x1c, 0x1f, 0x21, 0x2f, 
+	0x02, 0x89, 0x1a, 0x0c, 0x4d, 0x1e, 0x49, 0x1f, 
+	0x91, 0x01, 0x42, 0xa7, 0xdd, 0x14, 0x1b, 0x3a, 
+	0x92, 0x00, 0x99, 0x01, 0x68, 0x09, 0x18, 0x08, 
+	0x1c, 0x22, 0x49, 0x1b, 0x6b, 0x2b, 0xf0, 0x1d, 
+	0xf8, 0x45, 0x4b, 0x19, 0x18, 0xe1, 0x98, 0x01, 
+	0x9a, 0x00, 0x68, 0x00, 0x6b, 0x2b, 0xf0, 0x1d, 
+	0xf8, 0x3d, 0x9a, 0x00, 0x60, 0x32, 0xe0, 0x0e, 
+	0x99, 0x01, 0x68, 0x09, 0x18, 0x08, 0x1c, 0x3a, 
+	0x49, 0x11, 0x6b, 0x2b, 0xf0, 0x1d, 0xf8, 0x32, 
+	0x68, 0x30, 0x19, 0xc1, 0x20, 0x2f, 0x02, 0x80, 
+	0xf0, 0x1d, 0xf8, 0x36, 0x60, 0x31, 0x20, 0x12, 
+	0x4a, 0x04, 0x85, 0x10, 0x85, 0x57, 0x20, 0x01, 
+	0x02, 0x40, 0x86, 0x90, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2e, 0x02, 0xcb, 0x0c, 0x2e, 0x02, 0xcb, 0x08, 
+	0x00, 0x00, 0x0a, 0x48, 0x00, 0x00, 0x0f, 0x6c, 
+	0x2e, 0x08, 0x00, 0x1c, 0x2e, 0x02, 0xcb, 0x04, 
+	0x2c, 0x00, 0x02, 0x00, 0x2a, 0x00, 0xd0, 0x05, 
+	0x78, 0x03, 0x70, 0x0b, 0x30, 0x01, 0x31, 0x01, 
+	0x3a, 0x01, 0xd1, 0xf9, 0x47, 0x70, 0xb5, 0xf3, 
+	0xb0, 0x83, 0x98, 0x03, 0x78, 0x40, 0x00, 0x80, 
+	0x1c, 0x0f, 0x49, 0x3d, 0x58, 0x08, 0x28, 0x00, 
+	0xd1, 0x05, 0x20, 0xb0, 0xb0, 0x03, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x03, 
+	0x88, 0x45, 0x30, 0x04, 0xc8, 0x41, 0x1d, 0xf2, 
+	0x32, 0xb9, 0x1a, 0x14, 0x23, 0x01, 0x03, 0x1b, 
+	0x42, 0x9d, 0xdd, 0x03, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x03, 0xe7, 0xec, 0x19, 0x79, 0x91, 0x00, 
+	0x4b, 0x30, 0x93, 0x02, 0x2c, 0xbc, 0xdc, 0x01, 
+	0x2c, 0x00, 0xda, 0x07, 0x9b, 0x02, 0x68, 0x18, 
+	0x30, 0x01, 0x60, 0x18, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x03, 0xe7, 0xdc, 0x42, 0xac, 0xdb, 0x06, 
+	0x9b, 0x02, 0x68, 0x5b, 0x1c, 0x39, 0x1c, 0x2a, 
+	0xf0, 0x1c, 0xff, 0xd0, 0xe0, 0x44, 0x2d, 0x00, 
+	0xdd, 0x42, 0x4b, 0x25, 0x93, 0x01, 0x99, 0x00, 
+	0x42, 0x8f, 0xd9, 0x07, 0x9b, 0x02, 0x68, 0x18, 
+	0x30, 0x01, 0x60, 0x18, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x03, 0xe7, 0xc4, 0x42, 0xa5, 0xdd, 0x07, 
+	0x9b, 0x02, 0x68, 0x5b, 0x1c, 0x39, 0x1c, 0x22, 
+	0xf0, 0x1c, 0xff, 0xb8, 0x68, 0x36, 0xe0, 0x05, 
+	0x9b, 0x02, 0x68, 0x5b, 0x1c, 0x39, 0x1c, 0x2a, 
+	0xf0, 0x1c, 0xff, 0xb0, 0x19, 0x3f, 0x1b, 0x2d, 
+	0x79, 0xb0, 0x19, 0x80, 0x9a, 0x03, 0x78, 0x52, 
+	0x00, 0xd3, 0x1a, 0x9a, 0x00, 0x92, 0x9b, 0x01, 
+	0x68, 0x1b, 0x18, 0xd2, 0x78, 0x92, 0x06, 0xd2, 
+	0x0e, 0xd2, 0x1d, 0x31, 0x2a, 0x12, 0xd1, 0x06, 
+	0x78, 0xca, 0x0a, 0x12, 0xd2, 0x03, 0x78, 0x89, 
+	0x29, 0x09, 0xd1, 0x00, 0x38, 0x01, 0x1d, 0xf1, 
+	0x31, 0xb9, 0x1a, 0x0c, 0x2c, 0xbc, 0xdc, 0x01, 
+	0x2c, 0x00, 0xda, 0x03, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x03, 0xe7, 0x90, 0x2d, 0x00, 0xdc, 0xbe, 
+	0x20, 0x00, 0xb0, 0x03, 0xe7, 0x8b, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x00, 0x58, 
+	0x2e, 0x08, 0x9b, 0x30, 0xb4, 0xf0, 0x68, 0x42, 
+	0x68, 0x84, 0x1d, 0xe1, 0x31, 0xb7, 0x1c, 0x16, 
+	0xb0, 0x81, 0x42, 0x91, 0xd9, 0x09, 0x78, 0x51, 
+	0x07, 0x09, 0x0f, 0x09, 0x02, 0x09, 0x78, 0x92, 
+	0x43, 0x11, 0x31, 0x03, 0x04, 0x09, 0x0c, 0x09, 
+	0xe0, 0x5b, 0x68, 0x21, 0x79, 0x8b, 0x93, 0x00, 
+	0x1d, 0x0f, 0x18, 0x59, 0x78, 0x45, 0x00, 0xeb, 
+	0x1b, 0x5b, 0x00, 0x9b, 0x4d, 0x2b, 0x68, 0x2d, 
+	0x19, 0x5b, 0x78, 0x9b, 0x06, 0xdb, 0x0e, 0xdb, 
+	0x2b, 0x12, 0xd1, 0x31, 0x1d, 0xe3, 0x33, 0xb9, 
+	0x1b, 0x9b, 0x06, 0x1d, 0x0e, 0x2d, 0x78, 0xfe, 
+	0x0a, 0x33, 0xd2, 0x29, 0x2d, 0x0e, 0xda, 0x27, 
+	0x9b, 0x00, 0x2b, 0x09, 0xdd, 0x06, 0x79, 0x3b, 
+	0x18, 0xfb, 0x33, 0x05, 0x42, 0x8b, 0xd0, 0x1f, 
+	0x39, 0x01, 0xe0, 0x1d, 0x9b, 0x00, 0x2b, 0x09, 
+	0xd1, 0x1a, 0x79, 0x3b, 0x2b, 0x00, 0xd0, 0x01, 
+	0x39, 0x01, 0xe0, 0x15, 0x39, 0x01, 0x1d, 0xe3, 
+	0x33, 0xb8, 0x42, 0x93, 0xd9, 0x09, 0x78, 0x53, 
+	0x07, 0x1b, 0x0f, 0x1b, 0x02, 0x1b, 0x04, 0x1b, 
+	0x0c, 0x1b, 0x33, 0x03, 0x04, 0x1b, 0x0c, 0x1b, 
+	0xe0, 0x03, 0x78, 0x4b, 0x33, 0x03, 0x04, 0x1b, 
+	0x0c, 0x1b, 0x42, 0x9d, 0xda, 0x00, 0x31, 0x01, 
+	0x1d, 0xe3, 0x33, 0xb8, 0x42, 0x93, 0xd9, 0x0b, 
+	0x78, 0x52, 0x07, 0x12, 0x0f, 0x12, 0x02, 0x12, 
+	0x04, 0x12, 0x0c, 0x12, 0x78, 0x09, 0x18, 0x51, 
+	0x31, 0x03, 0x04, 0x09, 0x0c, 0x09, 0xe0, 0x08, 
+	0x78, 0x0a, 0x07, 0x12, 0x0f, 0x12, 0x02, 0x12, 
+	0x78, 0x49, 0x43, 0x11, 0x31, 0x03, 0x04, 0x09, 
+	0x0c, 0x09, 0x80, 0x41, 0xb0, 0x01, 0xbc, 0xf0, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x30, 
+	0x4a, 0x02, 0xc2, 0x03, 0x3a, 0x08, 0x20, 0x00, 
+	0x60, 0x90, 0x47, 0x70, 0x2e, 0x08, 0x44, 0x20, 
+	0x48, 0x01, 0x68, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x44, 0x20, 0x48, 0x01, 0x68, 0x80, 
+	0x08, 0xc0, 0x47, 0x70, 0x2e, 0x08, 0x44, 0x20, 
+	0x48, 0x02, 0x68, 0x81, 0x08, 0xc9, 0x68, 0x00, 
+	0x18, 0x08, 0x47, 0x70, 0x2e, 0x08, 0x44, 0x20, 
+	0xb4, 0xf0, 0x1c, 0x03, 0x20, 0x00, 0xb0, 0x82, 
+	0x49, 0x53, 0x91, 0x01, 0x68, 0x89, 0x18, 0xcf, 
+	0x97, 0x00, 0x08, 0xca, 0x07, 0x4c, 0x0f, 0x64, 
+	0x49, 0x4f, 0x68, 0x09, 0xd1, 0x32, 0x1c, 0x1f, 
+	0xd5, 0x04, 0x42, 0x7f, 0x07, 0x7f, 0x0f, 0x7f, 
+	0x42, 0x7f, 0xe0, 0x01, 0x07, 0x7f, 0x0f, 0x7f, 
+	0x2f, 0x00, 0xd1, 0x27, 0x2b, 0x10, 0xd0, 0x16, 
+	0xdc, 0x05, 0x2b, 0x00, 0xd0, 0x5a, 0x2b, 0x08, 
+	0xd1, 0x59, 0x5c, 0x88, 0xe0, 0x81, 0x2b, 0x18, 
+	0xd0, 0x13, 0x2b, 0x20, 0xd1, 0x53, 0x5c, 0x88, 
+	0x06, 0x00, 0x18, 0x89, 0x78, 0x4a, 0x04, 0x12, 
+	0x18, 0x80, 0x78, 0x8a, 0x02, 0x12, 0x18, 0x80, 
+	0x78, 0xc9, 0x18, 0x40, 0xe0, 0x71, 0x5c, 0x88, 
+	0x02, 0x00, 0x18, 0x89, 0x78, 0x49, 0x18, 0x40, 
+	0xe0, 0x6b, 0x5c, 0x88, 0x04, 0x00, 0x18, 0x89, 
+	0x78, 0x4a, 0x02, 0x12, 0x18, 0x80, 0x78, 0x89, 
+	0x18, 0x40, 0xe0, 0x62, 0x2b, 0x00, 0xd1, 0x03, 
+	0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
+	0x9f, 0x00, 0x08, 0xfd, 0x07, 0x7f, 0x0f, 0x7f, 
+	0x2b, 0x20, 0xdc, 0x56, 0x1a, 0xae, 0x4d, 0x2f, 
+	0x2e, 0x05, 0xd2, 0x52, 0xa3, 0x01, 0x5d, 0x9b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x02, 0x09, 0x14, 0x25, 
+	0x38, 0x00, 0x5c, 0x88, 0x5d, 0x29, 0x40, 0x08, 
+	0x21, 0x08, 0x1b, 0xc9, 0x40, 0xc8, 0xe0, 0x44, 
+	0x1c, 0x50, 0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 
+	0x02, 0x12, 0x5c, 0x08, 0x18, 0x80, 0x21, 0x08, 
+	0x1b, 0xc9, 0x40, 0xc8, 0xe0, 0x39, 0x1c, 0x50, 
+	0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 0x02, 0x12, 
+	0x1c, 0x43, 0x5c, 0x08, 0x18, 0x80, 0x02, 0x00, 
+	0x5c, 0xc9, 0x18, 0x08, 0x21, 0x08, 0x1b, 0xc9, 
+	0x40, 0xc8, 0xe0, 0x2a, 0xe0, 0x29, 0xe0, 0x28, 
+	0x1c, 0x50, 0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 
+	0x02, 0x12, 0x1c, 0x43, 0x5c, 0x08, 0x18, 0x80, 
+	0x02, 0x00, 0x1c, 0x5a, 0x5c, 0xcb, 0x18, 0x18, 
+	0x02, 0x00, 0x5c, 0x89, 0x18, 0x08, 0x21, 0x08, 
+	0x1b, 0xc9, 0x40, 0xc8, 0xe0, 0x15, 0x1c, 0x50, 
+	0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 0x02, 0x12, 
+	0x1c, 0x43, 0x5c, 0x08, 0x18, 0x80, 0x02, 0x00, 
+	0x1c, 0x5a, 0x5c, 0xcb, 0x18, 0x18, 0x02, 0x03, 
+	0x1c, 0x50, 0x5c, 0x8a, 0x18, 0xd2, 0x40, 0xba, 
+	0x5c, 0x08, 0x21, 0x08, 0x1b, 0xc9, 0x40, 0xc8, 
+	0x18, 0x80, 0x99, 0x01, 0x9f, 0x00, 0x60, 0x8f, 
+	0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x44, 0x20, 0x2e, 0x08, 0x00, 0x60, 
+	0xb5, 0xb0, 0x1c, 0x07, 0x20, 0x00, 0x24, 0x00, 
+	0x2f, 0x00, 0xdd, 0x09, 0x00, 0x85, 0x18, 0x2d, 
+	0x00, 0x6d, 0x20, 0x04, 0xf7, 0xff, 0xff, 0x44, 
+	0x19, 0x40, 0x34, 0x01, 0x42, 0xbc, 0xdb, 0xf5, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x47, 0x70, 0xb5, 0xb0, 0x1c, 0x0c, 0x1c, 0x05, 
+	0x1c, 0x17, 0xb0, 0x90, 0xf0, 0x22, 0xfa, 0x20, 
+	0x49, 0x25, 0x20, 0x0c, 0xf0, 0x22, 0xf9, 0xe8, 
+	0xf0, 0x22, 0xf9, 0xde, 0x4b, 0x23, 0x40, 0x18, 
+	0xf0, 0x22, 0xf9, 0xde, 0xf0, 0x22, 0xfa, 0x4a, 
+	0x20, 0x10, 0x90, 0x0a, 0x20, 0xff, 0x90, 0x0b, 
+	0xa8, 0x0f, 0x90, 0x0c, 0x20, 0x0c, 0x90, 0x0d, 
+	0x48, 0x1d, 0x90, 0x0e, 0xa8, 0x0a, 0xf0, 0x14, 
+	0xfb, 0xa5, 0xab, 0x07, 0x70, 0x1d, 0x94, 0x08, 
+	0x72, 0x1f, 0x24, 0x00, 0xab, 0x09, 0x70, 0x5c, 
+	0x27, 0x00, 0x4d, 0x18, 0xf0, 0x14, 0xfc, 0x06, 
+	0x28, 0x00, 0xd0, 0x02, 0x37, 0x01, 0x42, 0xaf, 
+	0xdb, 0xf8, 0x20, 0x01, 0xa9, 0x07, 0xf0, 0x14, 
+	0xfc, 0x07, 0xf0, 0x14, 0xfb, 0xfb, 0x28, 0x00, 
+	0xd1, 0xfb, 0x94, 0x0b, 0xa8, 0x0a, 0xf0, 0x14, 
+	0xfb, 0x89, 0xf0, 0x22, 0xf9, 0xe9, 0x21, 0x00, 
+	0x20, 0x0c, 0xf0, 0x22, 0xf9, 0xb1, 0xf0, 0x22, 
+	0xf9, 0xa7, 0x23, 0x01, 0x02, 0xdb, 0x43, 0x18, 
+	0xf0, 0x22, 0xf9, 0xa6, 0xf0, 0x22, 0xfa, 0x12, 
+	0x46, 0x68, 0xf0, 0x14, 0xfb, 0xc3, 0x98, 0x04, 
+	0xb0, 0x10, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x00, 0x15, 0xa5, 0xff, 0xff, 0xf7, 0xff, 
+	0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x27, 0x10, 
+	0xb5, 0xff, 0x9e, 0x09, 0x1c, 0x04, 0x1c, 0x0d, 
+	0x1c, 0x17, 0xb0, 0x93, 0xf0, 0x22, 0xf9, 0xc4, 
+	0x49, 0x31, 0x20, 0x0c, 0xf0, 0x22, 0xf9, 0x8c, 
+	0xf0, 0x22, 0xf9, 0x82, 0x4b, 0x2f, 0x40, 0x18, 
+	0xf0, 0x22, 0xf9, 0x82, 0xf0, 0x22, 0xf9, 0xee, 
+	0x20, 0x10, 0x90, 0x0d, 0x20, 0xff, 0x90, 0x0e, 
+	0xa8, 0x12, 0x90, 0x0f, 0x20, 0x0c, 0x90, 0x10, 
+	0x48, 0x29, 0x90, 0x11, 0xa8, 0x0d, 0xf0, 0x14, 
+	0xfb, 0x49, 0xab, 0x07, 0x70, 0x1c, 0x95, 0x08, 
+	0x72, 0x1f, 0x20, 0xff, 0xab, 0x09, 0x70, 0x58, 
+	0x1c, 0x60, 0x71, 0x18, 0x9b, 0x16, 0x93, 0x0b, 
+	0xab, 0x0c, 0x70, 0x1e, 0x20, 0xff, 0x70, 0x58, 
+	0x24, 0x00, 0x4d, 0x20, 0xf0, 0x14, 0xfb, 0xa2, 
+	0x28, 0x00, 0xd0, 0x02, 0x34, 0x01, 0x42, 0xac, 
+	0xdb, 0xf8, 0x2f, 0x00, 0xd1, 0x04, 0x20, 0x01, 
+	0xa9, 0x0a, 0xf0, 0x14, 0xfb, 0xa1, 0xe0, 0x03, 
+	0x20, 0x02, 0xa9, 0x07, 0xf0, 0x14, 0xfb, 0x9c, 
+	0xf0, 0x14, 0xfb, 0x90, 0x28, 0x00, 0xd1, 0xfb, 
+	0x27, 0x00, 0x97, 0x0e, 0xa8, 0x0d, 0xf0, 0x14, 
+	0xfb, 0x1d, 0xf0, 0x22, 0xf9, 0x7d, 0x21, 0x00, 
+	0x20, 0x0c, 0xf0, 0x22, 0xf9, 0x45, 0xf0, 0x22, 
+	0xf9, 0x3b, 0x23, 0x01, 0x02, 0xdb, 0x43, 0x18, 
+	0xf0, 0x22, 0xf9, 0x3a, 0xf0, 0x22, 0xf9, 0xa6, 
+	0x46, 0x68, 0xf0, 0x14, 0xfb, 0x57, 0x98, 0x01, 
+	0x0a, 0x80, 0xd2, 0x05, 0x20, 0x01, 0xb0, 0x13, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0xb0, 0x13, 0xe7, 0xf8, 0x00, 0x00, 
+	0x2e, 0x00, 0x15, 0xa5, 0xff, 0xff, 0xf7, 0xff, 
+	0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x27, 0x10, 
+	0x1c, 0x01, 0x48, 0x04, 0x61, 0xc1, 0x68, 0x00, 
+	0x28, 0x00, 0xd1, 0x01, 0x48, 0x02, 0x60, 0x01, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x68, 
+	0x6e, 0x00, 0x17, 0x00, 0xb5, 0xb0, 0x4f, 0x41, 
+	0x69, 0x38, 0x4c, 0x41, 0x28, 0x00, 0xd0, 0x07, 
+	0x20, 0x03, 0x60, 0x20, 0x69, 0x38, 0x38, 0x01, 
+	0x61, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x02, 0x69, 0x78, 0x28, 0x00, 0xd0, 0x04, 
+	0x60, 0x21, 0x69, 0x78, 0x38, 0x01, 0x61, 0x78, 
+	0xd1, 0xf3, 0x68, 0xf8, 0x28, 0x00, 0xd0, 0x20, 
+	0x38, 0x01, 0x60, 0xf8, 0x4a, 0x35, 0xd0, 0x08, 
+	0x68, 0xbb, 0x18, 0xd2, 0x3a, 0x20, 0x7f, 0xd2, 
+	0x1e, 0x45, 0x40, 0xea, 0x07, 0xd2, 0x0f, 0xd2, 
+	0xe0, 0x09, 0x68, 0xbb, 0x18, 0xd2, 0x3a, 0x20, 
+	0x7f, 0xd2, 0x4b, 0x2f, 0x5c, 0x9a, 0x23, 0x01, 
+	0x40, 0x5a, 0x06, 0x12, 0x0e, 0x12, 0x23, 0x01, 
+	0x2a, 0x00, 0xd0, 0x02, 0x61, 0x79, 0x61, 0x3b, 
+	0xe0, 0x01, 0x61, 0x39, 0x61, 0x7b, 0x28, 0x00, 
+	0xd1, 0xcf, 0x68, 0xb8, 0x30, 0x01, 0x60, 0xb8, 
+	0x23, 0x09, 0x68, 0x7a, 0x1c, 0x01, 0x42, 0x90, 
+	0xdc, 0x03, 0x60, 0xfb, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x20, 0x1c, 0x55, 0x42, 0x8d, 
+	0xd1, 0x03, 0x61, 0x78, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x95, 0x42, 0x8d, 0xd1, 0x0d, 
+	0x7e, 0x3d, 0x2d, 0xff, 0xd0, 0x0a, 0x2d, 0x00, 
+	0xd0, 0x03, 0x60, 0xfb, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x19, 0x61, 0x38, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x32, 0x03, 0x42, 0x8a, 
+	0xd1, 0x04, 0x20, 0x22, 0x61, 0x78, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x69, 0xf9, 0x60, 0x21, 
+	0x68, 0x79, 0x68, 0xba, 0x31, 0x04, 0x42, 0x91, 
+	0xd1, 0x0a, 0x69, 0xf9, 0x29, 0x00, 0xd0, 0x03, 
+	0x61, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x61, 0x78, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0xf0, 0x03, 0xff, 0xca, 0x20, 0x00, 0x60, 0x38, 
+	0x69, 0xf8, 0x60, 0x20, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x68, 
+	0x6e, 0x00, 0x17, 0x00, 0x2e, 0x08, 0x44, 0x2c, 
+	0x2e, 0x08, 0x00, 0x68, 0xb5, 0xb0, 0x04, 0x0b, 
+	0x0c, 0x1b, 0x04, 0x14, 0x0c, 0x24, 0x49, 0x14, 
+	0x68, 0x0a, 0x2a, 0x00, 0xd0, 0x02, 0x68, 0x0a, 
+	0x2a, 0x00, 0xd1, 0xfc, 0x22, 0x01, 0x60, 0x0a, 
+	0x2b, 0x0a, 0xdd, 0x00, 0x23, 0x0a, 0x22, 0x00, 
+	0x4f, 0x0e, 0x2b, 0x00, 0xdd, 0x05, 0x00, 0x55, 
+	0x5b, 0x45, 0x54, 0xbd, 0x32, 0x01, 0x42, 0x9a, 
+	0xdb, 0xf9, 0x76, 0x0c, 0x20, 0xff, 0x18, 0xfa, 
+	0x70, 0x50, 0x20, 0x00, 0x60, 0x4b, 0x22, 0x20, 
+	0x61, 0x08, 0x61, 0x4a, 0x60, 0x88, 0x60, 0xc8, 
+	0x49, 0x05, 0x20, 0x32, 0xf0, 0x03, 0xff, 0x66, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x01, 0x68, 0x2e, 0x08, 0x44, 0x2c, 
+	0x2e, 0x00, 0x17, 0x61, 0xb5, 0x80, 0x04, 0x01, 
+	0x0c, 0x09, 0x20, 0x00, 0x22, 0x00, 0xb0, 0x88, 
+	0x00, 0x47, 0x46, 0x6b, 0x53, 0xda, 0x30, 0x01, 
+	0x04, 0x00, 0x14, 0x00, 0x28, 0x10, 0xdb, 0xf7, 
+	0x22, 0x80, 0x00, 0x43, 0x46, 0x68, 0x52, 0xc2, 
+	0x46, 0x6a, 0x1c, 0x08, 0x21, 0x05, 0xf0, 0x04, 
+	0xfa, 0x33, 0x49, 0x06, 0x80, 0x88, 0x00, 0x42, 
+	0x18, 0x12, 0x00, 0x92, 0x4b, 0x04, 0x5a, 0x9a, 
+	0x81, 0x0a, 0xb0, 0x08, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x88, 
+	0x2e, 0x08, 0x48, 0x28, 0xb5, 0x80, 0xb0, 0xb2, 
+	0x46, 0x68, 0xf0, 0x15, 0xf8, 0x99, 0xaf, 0x16, 
+	0xcf, 0x83, 0x9a, 0x19, 0xf0, 0x00, 0xf9, 0xd2, 
+	0x1c, 0x38, 0xf0, 0x00, 0xfa, 0xed, 0xb0, 0x32, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 
+	0x06, 0x00, 0x0e, 0x00, 0x06, 0x09, 0x0e, 0x09, 
+	0xf0, 0x0f, 0xfd, 0x7a, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x06, 0x09, 
+	0x0e, 0x09, 0x4b, 0x05, 0x68, 0x1b, 0x06, 0x1b, 
+	0x0e, 0x1b, 0x2b, 0x30, 0xd3, 0x01, 0xf0, 0x0f, 
+	0xfd, 0x6b, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0xbc, 0xb5, 0xf0, 0x25, 0x00, 
+	0x4e, 0x1a, 0x4c, 0x1b, 0x4f, 0x1b, 0x68, 0x30, 
+	0x68, 0x00, 0x00, 0x40, 0x0a, 0x40, 0x02, 0x40, 
+	0x21, 0x19, 0x06, 0x89, 0x6a, 0x89, 0x4b, 0x18, 
+	0x40, 0x19, 0x0a, 0x49, 0x43, 0x08, 0x49, 0x17, 
+	0x64, 0x08, 0xf0, 0x01, 0xfc, 0x63, 0xf0, 0x02, 
+	0xf9, 0x3b, 0x68, 0x38, 0x30, 0x01, 0x60, 0x38, 
+	0x48, 0x13, 0x88, 0x01, 0x31, 0x01, 0x80, 0x01, 
+	0x20, 0x0c, 0x68, 0x21, 0xf0, 0x1c, 0xfc, 0x42, 
+	0x29, 0x00, 0xd1, 0x01, 0xf7, 0xff, 0xff, 0xae, 
+	0x20, 0x32, 0x68, 0x21, 0xf0, 0x1c, 0xfc, 0x3a, 
+	0x4b, 0x0c, 0x42, 0x98, 0xd9, 0x01, 0x49, 0x0c, 
+	0x60, 0xf9, 0x42, 0x85, 0xd0, 0xd3, 0x1c, 0x05, 
+	0xf0, 0x00, 0xfe, 0x40, 0x20, 0x00, 0x60, 0x38, 
+	0xe7, 0xcd, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xa4, 
+	0x2e, 0x08, 0x05, 0xbc, 0x2e, 0x08, 0x01, 0x88, 
+	0x00, 0x03, 0xfe, 0x00, 0x2c, 0x00, 0x1f, 0x80, 
+	0x2c, 0x00, 0x1f, 0xc8, 0x00, 0x00, 0x05, 0x46, 
+	0x2e, 0x00, 0x19, 0x65, 0xb5, 0xf0, 0x27, 0x00, 
+	0xb0, 0x94, 0x46, 0x68, 0x4c, 0x2f, 0xcc, 0x6e, 
+	0xc0, 0x6e, 0xcc, 0x6e, 0xc0, 0x6e, 0x23, 0x28, 
+	0x22, 0x41, 0x00, 0xd2, 0x21, 0x00, 0x20, 0x01, 
+	0xf0, 0x0d, 0xfd, 0xda, 0x22, 0xff, 0x21, 0x64, 
+	0x20, 0x01, 0x32, 0xf5, 0xf0, 0x0d, 0xfe, 0x9c, 
+	0x20, 0x00, 0x46, 0x69, 0x5c, 0x09, 0x40, 0x41, 
+	0x23, 0x35, 0x40, 0x59, 0xaa, 0x0a, 0x54, 0x11, 
+	0x30, 0x01, 0x28, 0x25, 0xdb, 0xf5, 0x24, 0x00, 
+	0xa9, 0x0a, 0x54, 0x0c, 0x22, 0x00, 0x20, 0x01, 
+	0x1c, 0x23, 0xf0, 0x0e, 0xf8, 0xfa, 0x4e, 0x1e, 
+	0x4d, 0x1e, 0x4c, 0x1f, 0xf0, 0x03, 0xff, 0x6e, 
+	0xf0, 0x03, 0xff, 0x6c, 0x28, 0x28, 0xd9, 0x10, 
+	0x42, 0xb0, 0xd3, 0x0e, 0x69, 0xe9, 0x08, 0xc9, 
+	0xd3, 0x0b, 0x4b, 0x1a, 0x18, 0xc1, 0x20, 0x1e, 
+	0xf0, 0x1c, 0xfb, 0xe0, 0x21, 0x64, 0x1d, 0xc2, 
+	0x32, 0xff, 0x32, 0xee, 0x20, 0x01, 0xf0, 0x0d, 
+	0xfe, 0x6f, 0xf0, 0x01, 0xfb, 0xeb, 0xf0, 0x02, 
+	0xf8, 0xc3, 0xf0, 0x03, 0xff, 0x53, 0x1c, 0x01, 
+	0x20, 0x7d, 0x00, 0xc0, 0xf0, 0x1c, 0xfb, 0xce, 
+	0x1c, 0x01, 0x48, 0x0f, 0x88, 0x02, 0x32, 0x01, 
+	0x80, 0x02, 0x42, 0xb9, 0xd0, 0xd6, 0x2f, 0x04, 
+	0xd3, 0x06, 0x20, 0x01, 0xf0, 0x0d, 0xfd, 0x78, 
+	0xb0, 0x14, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x0f, 0xf0, 0x00, 0xfd, 0xcb, 0x20, 0x00, 
+	0x60, 0x20, 0xe7, 0xc7, 0x2e, 0x02, 0xcc, 0x74, 
+	0x00, 0x00, 0x0b, 0xb8, 0x72, 0x00, 0x01, 0x00, 
+	0x2e, 0x08, 0x01, 0x88, 0xff, 0xff, 0xf4, 0x48, 
+	0x2c, 0x00, 0x1f, 0xc8, 0xb5, 0x80, 0x27, 0x00, 
+	0x48, 0x08, 0x81, 0x07, 0x48, 0x08, 0x49, 0x09, 
+	0x60, 0xc8, 0xf0, 0x03, 0xfd, 0x43, 0xf7, 0xff, 
+	0xff, 0x85, 0xf0, 0x00, 0xf8, 0xd3, 0xf7, 0xff, 
+	0xff, 0x39, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2e, 0x00, 0x19, 0x53, 0x2e, 0x08, 0x01, 0x88, 
+	0x47, 0x70, 0xb5, 0xf0, 0x4d, 0x29, 0x68, 0x01, 
+	0x31, 0x03, 0x10, 0x89, 0x1e, 0xcb, 0x68, 0x41, 
+	0x10, 0x89, 0x68, 0x82, 0x10, 0x92, 0x00, 0x89, 
+	0x30, 0x0c, 0x18, 0x0c, 0x21, 0x03, 0x05, 0x89, 
+	0x27, 0x35, 0x06, 0x7f, 0x60, 0x39, 0x49, 0x22, 
+	0x68, 0x0e, 0x08, 0xb6, 0x00, 0xb6, 0x60, 0x0e, 
+	0x21, 0x00, 0x2b, 0x00, 0xd9, 0x04, 0xc8, 0x40, 
+	0xc5, 0x40, 0x31, 0x01, 0x42, 0x99, 0xd3, 0xfa, 
+	0x23, 0x00, 0x49, 0x1c, 0x65, 0x8b, 0x20, 0x00, 
+	0x2a, 0x00, 0xd9, 0x04, 0xcc, 0x20, 0x64, 0x8d, 
+	0x30, 0x01, 0x42, 0x90, 0xd3, 0xfa, 0x48, 0x18, 
+	0x60, 0x03, 0x60, 0x3b, 0x66, 0x8b, 0x60, 0x3b, 
+	0x22, 0x01, 0x64, 0xca, 0x21, 0x00, 0x4a, 0x15, 
+	0x68, 0x03, 0x2b, 0x00, 0xd1, 0x05, 0x33, 0x01, 
+	0x2b, 0x64, 0xdb, 0xfc, 0x31, 0x01, 0x42, 0x91, 
+	0xdb, 0xf6, 0x48, 0x11, 0x68, 0x01, 0x23, 0x01, 
+	0x43, 0x19, 0x60, 0x01, 0x49, 0x0f, 0x20, 0x33, 
+	0x06, 0x40, 0x65, 0x41, 0x49, 0x0e, 0x65, 0x81, 
+	0x49, 0x0e, 0x66, 0x81, 0x39, 0x04, 0x66, 0x41, 
+	0x21, 0x03, 0x67, 0x01, 0x21, 0x00, 0x20, 0x0d, 
+	0xf0, 0x14, 0xfd, 0x62, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x70, 0x6a, 0x00, 0x00, 0x80, 
+	0xcc, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x27, 0x10, 
+	0x6a, 0x00, 0x00, 0x10, 0xcc, 0x00, 0x0f, 0x84, 
+	0xcc, 0x00, 0x0f, 0x88, 0x98, 0x00, 0x0f, 0x88, 
+	0xb5, 0x00, 0x22, 0x00, 0x21, 0x00, 0x20, 0x08, 
+	0xf0, 0x15, 0xf9, 0x9c, 0x48, 0x08, 0x21, 0x40, 
+	0xf0, 0x14, 0xfe, 0x6c, 0x20, 0x01, 0x21, 0x35, 
+	0x06, 0x49, 0x61, 0x08, 0x20, 0x02, 0x43, 0xc0, 
+	0x49, 0x04, 0x63, 0x08, 0x20, 0x00, 0x21, 0x39, 
+	0x06, 0x49, 0x62, 0xc8, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x02, 0x3b, 0x04, 0x72, 0x00, 0x01, 0x00, 
+	0xb5, 0x00, 0x1c, 0x01, 0x48, 0x0f, 0xd0, 0x10, 
+	0x29, 0x01, 0xd0, 0x12, 0x29, 0x02, 0xd0, 0x14, 
+	0x29, 0x03, 0xd1, 0x01, 0x49, 0x0c, 0x60, 0x01, 
+	0x68, 0x01, 0x68, 0x40, 0x43, 0x08, 0x22, 0x00, 
+	0x21, 0x1e, 0xf0, 0x15, 0xf9, 0xdb, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x01, 0x04, 0x49, 0x60, 0x01, 
+	0xe7, 0xf2, 0x21, 0x21, 0x03, 0x09, 0x60, 0x01, 
+	0xe7, 0xee, 0x21, 0x41, 0x03, 0x09, 0x60, 0x01, 
+	0xe7, 0xea, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x98, 
+	0x00, 0x08, 0x10, 0x08, 0xb5, 0x00, 0x1c, 0x01, 
+	0x48, 0x0b, 0xd0, 0x0e, 0x29, 0x01, 0xd0, 0x0f, 
+	0x29, 0x02, 0xd1, 0x01, 0x21, 0x04, 0x60, 0x41, 
+	0x68, 0x01, 0x68, 0x40, 0x43, 0x08, 0x22, 0x00, 
+	0x21, 0x1e, 0xf0, 0x15, 0xf9, 0xb7, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x01, 0x60, 0x41, 0xe7, 0xf3, 
+	0x21, 0x02, 0x60, 0x41, 0xe7, 0xf0, 0x00, 0x00, 
+	0x2e, 0x08, 0x01, 0x98, 0xb5, 0x80, 0x4b, 0x09, 
+	0x22, 0x0a, 0x21, 0x0a, 0x20, 0x0b, 0xf0, 0x15, 
+	0xfb, 0xeb, 0x20, 0x0b, 0xf0, 0x15, 0xfd, 0x0d, 
+	0x4f, 0x05, 0x60, 0x38, 0x00, 0x80, 0xf0, 0x03, 
+	0xff, 0x2b, 0x60, 0x78, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0xc4, 
+	0x2e, 0x08, 0x01, 0xd4, 0xb5, 0xb0, 0x25, 0x00, 
+	0x1c, 0x0c, 0x1c, 0x07, 0x2a, 0x08, 0xd2, 0x30, 
+	0xa3, 0x01, 0x5c, 0x9b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x2c, 0x29, 0x29, 0x03, 0x29, 0x29, 0x03, 0x29, 
+	0x20, 0x00, 0xf0, 0x00, 0xf8, 0x4d, 0x23, 0x2d, 
+	0x01, 0x1b, 0x42, 0x9f, 0xd0, 0x13, 0x23, 0x0b, 
+	0x01, 0x9b, 0x42, 0x9f, 0xd0, 0x0f, 0x23, 0xff, 
+	0x33, 0xe1, 0x42, 0x9f, 0xd0, 0x0b, 0x23, 0xff, 
+	0x33, 0x61, 0x42, 0x9f, 0xd0, 0x07, 0x23, 0x21, 
+	0x01, 0x1b, 0x42, 0x9f, 0xd0, 0x03, 0x23, 0x11, 
+	0x01, 0x5b, 0x42, 0x9f, 0xd1, 0x08, 0x23, 0x09, 
+	0x01, 0x9b, 0x42, 0x9c, 0xd0, 0x09, 0x08, 0x5b, 
+	0x42, 0x9c, 0xd0, 0x06, 0x2c, 0xf0, 0xd0, 0x04, 
+	0x25, 0x01, 0xe0, 0x02, 0x20, 0x01, 0xf0, 0x00, 
+	0xf8, 0x27, 0x4f, 0x12, 0x6c, 0x78, 0x42, 0x85, 
+	0xd0, 0x1c, 0x1d, 0xfb, 0x33, 0x35, 0x2d, 0x00, 
+	0xd0, 0x12, 0x1f, 0xda, 0x3a, 0x0d, 0x21, 0x03, 
+	0x1d, 0x10, 0xb4, 0x07, 0x22, 0x0b, 0xb4, 0x04, 
+	0x1c, 0x19, 0x23, 0x00, 0x22, 0x00, 0x20, 0x00, 
+	0xf0, 0x0f, 0xff, 0xe4, 0x6a, 0xb8, 0x1c, 0x29, 
+	0xb0, 0x04, 0xf0, 0x11, 0xf9, 0x33, 0xe0, 0x04, 
+	0x21, 0x00, 0x6a, 0xb8, 0x1c, 0x1a, 0xf0, 0x10, 
+	0xfa, 0xe9, 0x64, 0x7d, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x98, 
+	0xb5, 0xf0, 0x1c, 0x07, 0xb0, 0x81, 0x4d, 0x56, 
+	0x1d, 0xee, 0x36, 0x19, 0x79, 0x30, 0x42, 0x87, 
+	0xd1, 0x03, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x24, 0x00, 0x6c, 0x68, 0x28, 0x00, 
+	0xd0, 0x05, 0x64, 0x6c, 0x4a, 0x4f, 0x21, 0x00, 
+	0x6a, 0xa8, 0xf0, 0x10, 0xfa, 0xcb, 0x71, 0x37, 
+	0x21, 0x00, 0x20, 0x0e, 0xf0, 0x14, 0xfc, 0x5c, 
+	0x20, 0x00, 0xf0, 0x11, 0xff, 0x5d, 0x20, 0x1f, 
+	0xf0, 0x0e, 0xff, 0xf2, 0x26, 0x03, 0x02, 0x76, 
+	0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 0x20, 0x1f, 
+	0x1c, 0x33, 0xf0, 0x0e, 0xfe, 0x69, 0x20, 0x1e, 
+	0xf0, 0x0f, 0xf8, 0xb0, 0x22, 0x01, 0x02, 0xd2, 
+	0x21, 0x02, 0x20, 0x1e, 0x1c, 0x33, 0xf0, 0x0e, 
+	0xfe, 0x5f, 0x26, 0x1c, 0x1c, 0x39, 0x48, 0x3e, 
+	0x27, 0x0c, 0x29, 0x06, 0xd2, 0x07, 0xa3, 0x02, 
+	0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x03, 0x12, 0x03, 0x21, 0x12, 0x30, 0x48, 0x39, 
+	0x21, 0x40, 0xf0, 0x14, 0xfd, 0x5b, 0xab, 0x00, 
+	0x70, 0x1c, 0x20, 0x08, 0x70, 0x58, 0x70, 0x9e, 
+	0x70, 0xdc, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x15, 
+	0xf8, 0x7d, 0xe0, 0x2b, 0x21, 0x1f, 0x43, 0xc9, 
+	0xf0, 0x14, 0xfd, 0x4c, 0xab, 0x00, 0x70, 0x1c, 
+	0x70, 0x5c, 0x70, 0x9f, 0x70, 0xdc, 0x22, 0x00, 
+	0x21, 0x00, 0x20, 0x00, 0xf0, 0x15, 0xf8, 0x6e, 
+	0xe0, 0x1c, 0x21, 0x40, 0xf0, 0x14, 0xfd, 0x3e, 
+	0xab, 0x00, 0x70, 0x1c, 0x20, 0x10, 0x70, 0x58, 
+	0x70, 0x9e, 0x70, 0xdc, 0x22, 0x00, 0x21, 0x00, 
+	0x20, 0x08, 0xf0, 0x15, 0xf8, 0x5f, 0xe0, 0x0d, 
+	0x21, 0x1f, 0x43, 0xc9, 0xf0, 0x14, 0xfd, 0x2e, 
+	0xab, 0x00, 0x70, 0x1c, 0x70, 0x5c, 0x70, 0x9f, 
+	0x70, 0xdc, 0x22, 0x00, 0x21, 0x00, 0x20, 0x08, 
+	0xf0, 0x15, 0xf8, 0x50, 0x20, 0x01, 0x21, 0x35, 
+	0x06, 0x49, 0x61, 0x08, 0x20, 0x02, 0x43, 0xc0, 
+	0x49, 0x19, 0x63, 0x08, 0x20, 0x39, 0x06, 0x40, 
+	0x62, 0xc4, 0xcd, 0x03, 0x43, 0x08, 0x22, 0x00, 
+	0x21, 0x1e, 0xf0, 0x15, 0xf8, 0xa7, 0x48, 0x15, 
+	0xf0, 0x11, 0xfe, 0x68, 0x20, 0x00, 0xf0, 0x11, 
+	0xfe, 0xd9, 0x20, 0x00, 0xf0, 0x00, 0xf8, 0x68, 
+	0x20, 0x00, 0xf0, 0x03, 0xfb, 0x15, 0x20, 0x01, 
+	0xf0, 0x11, 0xfe, 0xde, 0x4a, 0x0e, 0xb4, 0x04, 
+	0x1c, 0x13, 0x3a, 0x01, 0x49, 0x0d, 0x1e, 0xc8, 
+	0xf7, 0xfe, 0xfb, 0xae, 0x21, 0x00, 0x20, 0x0d, 
+	0xb0, 0x01, 0xf0, 0x14, 0xfb, 0xcd, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x01, 0x98, 0x2e, 0x08, 0x01, 0xd4, 
+	0x2e, 0x02, 0x81, 0x70, 0x2e, 0x02, 0x3b, 0x04, 
+	0x72, 0x00, 0x01, 0x00, 0x00, 0x80, 0x10, 0x80, 
+	0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xfe, 
+	0xb5, 0xb0, 0x1c, 0x07, 0x4c, 0x10, 0x6a, 0x20, 
+	0x42, 0x87, 0xd0, 0x19, 0x20, 0x00, 0x2f, 0x03, 
+	0xd1, 0x02, 0x21, 0x01, 0x61, 0x61, 0xe0, 0x00, 
+	0x61, 0x60, 0x21, 0x02, 0x4d, 0x0b, 0x60, 0x29, 
+	0x71, 0x28, 0x71, 0x68, 0x22, 0x01, 0xb4, 0x04, 
+	0x7a, 0x23, 0x7c, 0x22, 0x7b, 0x21, 0x20, 0x00, 
+	0xf0, 0x14, 0xfe, 0x9a, 0x69, 0x61, 0x1c, 0x28, 
+	0xb0, 0x01, 0xf0, 0x15, 0xff, 0x41, 0x62, 0x27, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x01, 0x98, 0x2e, 0x08, 0x01, 0xb0, 
+	0xb5, 0x00, 0x22, 0x02, 0x49, 0x09, 0x60, 0x0a, 
+	0x22, 0x00, 0x71, 0x0a, 0x71, 0x4a, 0x39, 0x48, 
+	0x28, 0x00, 0xd0, 0x08, 0x28, 0x01, 0xd1, 0x00, 
+	0x72, 0x08, 0x6a, 0x08, 0x62, 0x0a, 0xf7, 0xff, 
+	0xff, 0xc7, 0xbc, 0x08, 0x47, 0x18, 0x72, 0x0a, 
+	0xe7, 0xf7, 0x00, 0x00, 0x2e, 0x08, 0x01, 0xe0, 
+	0xb5, 0x80, 0x06, 0x00, 0x0e, 0x00, 0x4f, 0x0b, 
+	0xd0, 0x02, 0x20, 0x00, 0x73, 0x38, 0xe0, 0x01, 
+	0x20, 0x01, 0x73, 0x38, 0x22, 0x01, 0xb4, 0x04, 
+	0x7a, 0x3b, 0x7c, 0x3a, 0x7b, 0x39, 0x20, 0x00, 
+	0xf0, 0x14, 0xfe, 0x62, 0x69, 0x79, 0xb0, 0x01, 
+	0x48, 0x03, 0xf0, 0x15, 0xff, 0x09, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x01, 0x98, 
+	0x2e, 0x08, 0x01, 0xb0, 0xb5, 0x80, 0x06, 0x00, 
+	0x0e, 0x00, 0x1c, 0x01, 0x4f, 0x08, 0x74, 0x39, 
+	0x22, 0x01, 0xb4, 0x04, 0x7a, 0x3b, 0x7b, 0x39, 
+	0x1c, 0x02, 0x20, 0x00, 0xf0, 0x14, 0xfe, 0x48, 
+	0x69, 0x79, 0xb0, 0x01, 0x48, 0x03, 0xf0, 0x15, 
+	0xfe, 0xef, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x01, 0x98, 0x2e, 0x08, 0x01, 0xb0, 
+	0xb4, 0xb0, 0x21, 0x00, 0x48, 0x08, 0x60, 0x01, 
+	0x20, 0x00, 0x4c, 0x08, 0x4f, 0x08, 0x4b, 0x09, 
+	0x4a, 0x09, 0x00, 0x85, 0x51, 0x61, 0x54, 0x39, 
+	0x54, 0x19, 0x54, 0x11, 0x30, 0x01, 0x28, 0x20, 
+	0xdb, 0xf7, 0xbc, 0xb0, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x01, 0xe8, 0x2e, 0x08, 0x44, 0x38, 
+	0x2e, 0x08, 0x44, 0xb8, 0x2e, 0x08, 0x44, 0xf8, 
+	0x2e, 0x08, 0x44, 0xd8, 0x06, 0x00, 0x0e, 0x00, 
+	0x21, 0x01, 0x40, 0x81, 0x43, 0xca, 0x49, 0x05, 
+	0x68, 0x0b, 0x40, 0x1a, 0x60, 0x0a, 0x21, 0x00, 
+	0x00, 0x82, 0x4b, 0x03, 0x50, 0x99, 0x4a, 0x03, 
+	0x54, 0x11, 0x47, 0x70, 0x2e, 0x08, 0x01, 0xe8, 
+	0x2e, 0x08, 0x44, 0x38, 0x2e, 0x08, 0x44, 0xb8, 
+	0xb5, 0xf0, 0xb0, 0x84, 0x4f, 0x36, 0x68, 0x38, 
+	0x1d, 0xc1, 0x31, 0x0d, 0x20, 0x00, 0xf0, 0x2a, 
+	0xfb, 0x93, 0x1c, 0x04, 0x68, 0x38, 0x1d, 0xc1, 
+	0x31, 0x05, 0x20, 0x00, 0xf0, 0x2a, 0xfb, 0x8c, 
+	0x1c, 0x05, 0x68, 0x38, 0x1d, 0xc1, 0x31, 0x09, 
+	0x20, 0x00, 0xf0, 0x2a, 0xfb, 0x85, 0x43, 0x2c, 
+	0x1c, 0x20, 0x4c, 0x2c, 0x68, 0x21, 0x43, 0x08, 
+	0x27, 0x00, 0x60, 0x20, 0x1c, 0x05, 0xd0, 0x4a, 
+	0x48, 0x29, 0x90, 0x03, 0x48, 0x29, 0x90, 0x02, 
+	0x4a, 0x29, 0x92, 0x01, 0x4e, 0x29, 0x08, 0x68, 
+	0xd3, 0x3c, 0x98, 0x03, 0x5d, 0xc0, 0x28, 0x00, 
+	0xd0, 0x32, 0x98, 0x02, 0x5d, 0xc0, 0x28, 0x00, 
+	0xd0, 0x2a, 0x46, 0x68, 0x1c, 0x39, 0xf0, 0x16, 
+	0xfb, 0x01, 0xa8, 0x00, 0x78, 0x00, 0x28, 0x01, 
+	0xd1, 0x1b, 0x68, 0x60, 0x30, 0x01, 0x60, 0x60, 
+	0x5d, 0xf0, 0x28, 0x00, 0xd1, 0x06, 0x20, 0xff, 
+	0x55, 0xf0, 0x21, 0x00, 0x00, 0xb8, 0x9a, 0x01, 
+	0x50, 0x11, 0xe0, 0x1f, 0x20, 0x02, 0x1c, 0x39, 
+	0xf0, 0x00, 0xf8, 0x8e, 0x28, 0x00, 0xd1, 0x19, 
+	0x21, 0x00, 0x55, 0xf1, 0x20, 0x01, 0x40, 0xb8, 
+	0x43, 0xc0, 0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 
+	0xe0, 0x10, 0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 
+	0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 0xe0, 0x09, 
+	0x68, 0x60, 0x30, 0x01, 0x60, 0x60, 0xe0, 0x05, 
+	0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 0x68, 0x21, 
+	0x40, 0x08, 0x60, 0x20, 0x1c, 0x78, 0x06, 0x07, 
+	0x0e, 0x3f, 0x08, 0x6d, 0xd1, 0xbb, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0x78, 0x2e, 0x08, 0x01, 0xe8, 
+	0x2e, 0x08, 0x44, 0xd8, 0x2e, 0x08, 0x44, 0xf8, 
+	0x2e, 0x08, 0x44, 0x38, 0x2e, 0x08, 0x44, 0xb8, 
+	0xb5, 0xf0, 0x27, 0x00, 0xb0, 0x85, 0x4c, 0x26, 
+	0x68, 0x25, 0x2d, 0x00, 0xd0, 0x44, 0x4e, 0x25, 
+	0x48, 0x25, 0x90, 0x04, 0x49, 0x25, 0x91, 0x03, 
+	0x4a, 0x25, 0x92, 0x02, 0x48, 0x25, 0x90, 0x01, 
+	0x08, 0x68, 0xd3, 0x34, 0x5d, 0xf0, 0x28, 0x00, 
+	0xd0, 0x2b, 0x98, 0x04, 0x5d, 0xc0, 0x28, 0x00, 
+	0xd0, 0x2d, 0x46, 0x68, 0x1c, 0x39, 0xf0, 0x16, 
+	0xfa, 0x9d, 0xa8, 0x00, 0x78, 0x00, 0x28, 0x01, 
+	0xd1, 0x18, 0x68, 0x60, 0x30, 0x01, 0x60, 0x60, 
+	0x00, 0xb8, 0x99, 0x03, 0x58, 0x09, 0x69, 0x09, 
+	0x9a, 0x02, 0x50, 0x11, 0x20, 0x02, 0x1c, 0x39, 
+	0xf0, 0x00, 0xf8, 0x2e, 0x28, 0x00, 0xd1, 0x16, 
+	0x21, 0x00, 0x98, 0x01, 0x55, 0xc1, 0x20, 0x01, 
+	0x40, 0xb8, 0x43, 0xc0, 0x68, 0x21, 0x40, 0x08, 
+	0x60, 0x20, 0xe0, 0x0c, 0x20, 0x01, 0x40, 0xb8, 
+	0x43, 0xc0, 0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 
+	0xe0, 0x05, 0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 
+	0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0x08, 0x6d, 0xd1, 0xc3, 
+	0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x01, 0xe8, 0x2e, 0x08, 0x44, 0xd8, 
+	0x2e, 0x08, 0x44, 0xf8, 0x2e, 0x08, 0x9b, 0xc8, 
+	0x2e, 0x08, 0x44, 0x38, 0x2e, 0x08, 0x44, 0xb8, 
+	0xb4, 0xf0, 0x06, 0x02, 0x0e, 0x12, 0xb0, 0x82, 
+	0x92, 0x00, 0x06, 0x0c, 0x0e, 0x24, 0x00, 0xa0, 
+	0xb0, 0x81, 0x49, 0x31, 0x58, 0x09, 0x91, 0x00, 
+	0x29, 0x00, 0xd1, 0x03, 0x20, 0xb0, 0xb0, 0x03, 
+	0xbc, 0xf0, 0x47, 0x70, 0x49, 0x2d, 0x68, 0x09, 
+	0x18, 0x47, 0x00, 0xe1, 0x1b, 0x09, 0x00, 0x89, 
+	0x4a, 0x2b, 0x68, 0x12, 0x18, 0x89, 0x9a, 0x01, 
+	0x4d, 0x2a, 0x4b, 0x2b, 0x93, 0x02, 0x2a, 0x01, 
+	0xd0, 0x28, 0x2a, 0x02, 0xd1, 0x44, 0x4b, 0x29, 
+	0x58, 0x1a, 0x2a, 0x00, 0xd1, 0x03, 0x20, 0xff, 
+	0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 0x60, 0x4a, 
+	0x22, 0x00, 0x50, 0x1a, 0x5c, 0xa8, 0x42, 0xa0, 
+	0xd1, 0x06, 0x00, 0x90, 0x9b, 0x02, 0x58, 0x18, 
+	0x78, 0x46, 0x23, 0x80, 0x43, 0x9e, 0x70, 0x46, 
+	0x1c, 0x50, 0x06, 0x02, 0x0e, 0x12, 0x2a, 0x20, 
+	0xdb, 0xf0, 0x88, 0x08, 0x4b, 0x1c, 0x40, 0x18, 
+	0x80, 0x08, 0x98, 0x00, 0x9a, 0x01, 0x70, 0xc2, 
+	0x68, 0x38, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
+	0x60, 0x38, 0xe0, 0x19, 0x68, 0x38, 0x4b, 0x17, 
+	0x40, 0x18, 0x60, 0x38, 0x98, 0x00, 0x9a, 0x01, 
+	0x70, 0xc2, 0x20, 0x00, 0x60, 0x88, 0x70, 0xc8, 
+	0x60, 0xc8, 0x5c, 0x29, 0x42, 0xa1, 0xd1, 0x06, 
+	0x00, 0x81, 0x9b, 0x02, 0x58, 0x59, 0x78, 0x4a, 
+	0x23, 0x80, 0x43, 0x1a, 0x70, 0x4a, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x20, 0xdb, 0xf0, 
+	0x20, 0x00, 0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 
+	0x20, 0xbc, 0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9b, 0x38, 
+	0x2e, 0x08, 0x9b, 0x30, 0x2e, 0x08, 0x9d, 0x10, 
+	0x2e, 0x08, 0x9c, 0x50, 0x2e, 0x08, 0x44, 0x38, 
+	0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xdf, 0xff, 
+	0xb4, 0xf0, 0x78, 0x43, 0x00, 0x9e, 0x49, 0x32, 
+	0x59, 0x8c, 0x88, 0x42, 0x68, 0x87, 0x68, 0x40, 
+	0x1d, 0xf9, 0x31, 0xb9, 0x1a, 0x09, 0x42, 0x91, 
+	0xda, 0x3d, 0x25, 0x00, 0x1c, 0x18, 0x00, 0xdb, 
+	0x1a, 0x18, 0x00, 0x80, 0x4b, 0x2b, 0x68, 0x1b, 
+	0x18, 0xc0, 0x78, 0x80, 0x06, 0xc0, 0x0e, 0xc0, 
+	0x28, 0x12, 0xd1, 0x02, 0x29, 0x0e, 0xda, 0x00, 
+	0x25, 0x01, 0x2a, 0x00, 0xdd, 0x2b, 0x42, 0x8a, 
+	0xdd, 0x05, 0x68, 0x3f, 0x2f, 0x00, 0xd1, 0x02, 
+	0x20, 0xba, 0xbc, 0xf0, 0x47, 0x70, 0x1a, 0x52, 
+	0x79, 0xb9, 0x23, 0xc0, 0x1a, 0x59, 0x79, 0xfb, 
+	0x1d, 0x38, 0x08, 0x5b, 0xd3, 0x01, 0x22, 0x00, 
+	0xe0, 0x16, 0x2d, 0x00, 0xd0, 0x14, 0x42, 0x91, 
+	0xdb, 0x01, 0x31, 0x01, 0xe0, 0x10, 0x1c, 0x4b, 
+	0x42, 0x93, 0xd1, 0x0d, 0x78, 0x85, 0x2d, 0x09, 
+	0xdd, 0x06, 0x79, 0x05, 0x78, 0x80, 0x35, 0x09, 
+	0x42, 0x85, 0xd0, 0x05, 0x1c, 0x19, 0xe0, 0x03, 
+	0x78, 0x80, 0x28, 0x09, 0xd1, 0x00, 0x1c, 0x19, 
+	0x25, 0x00, 0x2a, 0x00, 0xdc, 0xd3, 0x69, 0x21, 
+	0x20, 0x00, 0x1c, 0x0a, 0x42, 0xb9, 0xd0, 0xd4, 
+	0x68, 0x0b, 0x42, 0xbb, 0xd0, 0x08, 0x68, 0x09, 
+	0x29, 0x00, 0xd1, 0x02, 0x20, 0xba, 0xbc, 0xf0, 
+	0x47, 0x70, 0x68, 0x0b, 0x42, 0xbb, 0xd1, 0xf6, 
+	0x4b, 0x07, 0x51, 0x9a, 0x60, 0x08, 0x69, 0xa2, 
+	0x69, 0x23, 0x60, 0x13, 0x61, 0xa1, 0x61, 0x27, 
+	0x61, 0x67, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9b, 0x30, 
+	0x2e, 0x08, 0x44, 0x38, 0xb5, 0xf0, 0x06, 0x07, 
+	0x0e, 0x3f, 0x04, 0x0c, 0x0c, 0x24, 0x06, 0x15, 
+	0x0e, 0x2d, 0x00, 0xf8, 0x49, 0x2c, 0x68, 0x09, 
+	0x18, 0x40, 0x00, 0xb9, 0x4a, 0x2b, 0x68, 0x12, 
+	0x18, 0x8a, 0x00, 0xf9, 0x1b, 0xc9, 0x00, 0x89, 
+	0x4b, 0x29, 0x68, 0x1b, 0x18, 0xc9, 0x68, 0x16, 
+	0x23, 0x01, 0x03, 0x5b, 0x43, 0x9e, 0x60, 0x16, 
+	0x68, 0x06, 0x23, 0x03, 0x03, 0x9b, 0x43, 0x9e, 
+	0x60, 0x06, 0x4b, 0x24, 0x42, 0x9c, 0xd0, 0x36, 
+	0x68, 0x06, 0x23, 0x21, 0x43, 0x9e, 0x60, 0x06, 
+	0x68, 0x16, 0x23, 0x07, 0x03, 0x5b, 0x40, 0x33, 
+	0x60, 0x13, 0x23, 0x07, 0x03, 0x5b, 0x43, 0x9c, 
+	0x1c, 0x23, 0x68, 0x14, 0x43, 0x23, 0x60, 0x13, 
+	0x22, 0x00, 0x75, 0x0a, 0x88, 0x0c, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x9c, 0x80, 0x0c, 0x07, 0xab, 
+	0x0f, 0x9b, 0x2b, 0x01, 0xd1, 0x04, 0x88, 0x0c, 
+	0x23, 0x10, 0x43, 0x23, 0x80, 0x0b, 0xe0, 0x03, 
+	0x88, 0x0c, 0x23, 0x10, 0x43, 0x9c, 0x80, 0x0c, 
+	0x68, 0x01, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x19, 
+	0x60, 0x01, 0x00, 0xf9, 0x4b, 0x0e, 0x68, 0x1b, 
+	0x18, 0xc9, 0x60, 0x4a, 0x68, 0x01, 0x4b, 0x0d, 
+	0x43, 0x19, 0x60, 0x01, 0x68, 0x01, 0x60, 0x01, 
+	0x21, 0x0f, 0x60, 0x41, 0xe0, 0x04, 0x1c, 0x38, 
+	0xf0, 0x13, 0xfa, 0xb6, 0x28, 0x00, 0xd1, 0x00, 
+	0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x9b, 0x3c, 0x2e, 0x08, 0x9b, 0x38, 
+	0x2e, 0x08, 0x9b, 0x30, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x9b, 0x40, 0x00, 0x00, 0x20, 0xa0, 
+	0xb5, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x1c, 0x07, 
+	0xb0, 0x8a, 0x48, 0x58, 0x29, 0x00, 0xd1, 0x0a, 
+	0x4d, 0x57, 0x69, 0x01, 0x91, 0x04, 0x49, 0x57, 
+	0x91, 0x03, 0x69, 0x41, 0x91, 0x02, 0x6a, 0x00, 
+	0x1e, 0x43, 0x93, 0x01, 0xe0, 0x0b, 0x29, 0x20, 
+	0xd1, 0x15, 0x4d, 0x53, 0x69, 0x81, 0x91, 0x04, 
+	0x49, 0x52, 0x91, 0x03, 0x69, 0xc1, 0x91, 0x02, 
+	0x6a, 0x40, 0x1e, 0x43, 0x93, 0x01, 0x24, 0x00, 
+	0x4b, 0x4f, 0x93, 0x09, 0x4a, 0x4f, 0x92, 0x08, 
+	0x4b, 0x4f, 0x93, 0x07, 0x4e, 0x4f, 0x96, 0x06, 
+	0x4a, 0x4f, 0x92, 0x05, 0xe0, 0x7a, 0x20, 0xb3, 
+	0xb0, 0x0a, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x04, 0x00, 0x80, 0x19, 0x40, 0x23, 0x01, 
+	0x02, 0x9b, 0x18, 0xc0, 0x68, 0x01, 0x98, 0x04, 
+	0x00, 0x80, 0x58, 0x28, 0x9a, 0x04, 0x18, 0xaa, 
+	0x00, 0x5b, 0x18, 0xd2, 0x78, 0x12, 0x92, 0x00, 
+	0x22, 0x00, 0x9b, 0x04, 0x18, 0xee, 0x23, 0x01, 
+	0x02, 0xdb, 0x18, 0xf3, 0x70, 0x1a, 0x9a, 0x04, 
+	0x32, 0x01, 0x92, 0x04, 0x9b, 0x01, 0x40, 0x1a, 
+	0x92, 0x04, 0x29, 0x00, 0xd0, 0x56, 0xb0, 0x82, 
+	0x91, 0x01, 0x21, 0x01, 0x9a, 0x02, 0x2a, 0x80, 
+	0xd1, 0x19, 0x22, 0x00, 0x9b, 0x01, 0x40, 0x0b, 
+	0xd0, 0x10, 0x9b, 0x0b, 0x5c, 0x9b, 0x2b, 0xff, 
+	0xd0, 0x0c, 0x9b, 0x0b, 0x5c, 0x9b, 0x93, 0x00, 
+	0x00, 0x91, 0x9a, 0x0a, 0x58, 0x52, 0x00, 0xa1, 
+	0x19, 0xc9, 0x61, 0x0a, 0x1c, 0x61, 0x06, 0x0c, 
+	0x0e, 0x24, 0xe0, 0x1c, 0x00, 0x49, 0x32, 0x01, 
+	0x2a, 0x10, 0xd3, 0xe7, 0xe0, 0x17, 0x22, 0x00, 
+	0x9b, 0x01, 0x40, 0x0b, 0xd0, 0x0f, 0x9b, 0x09, 
+	0x5c, 0x9b, 0x2b, 0xff, 0xd0, 0x0b, 0x93, 0x00, 
+	0x00, 0x93, 0x9e, 0x08, 0x58, 0xf6, 0x00, 0xa3, 
+	0x19, 0xdb, 0x61, 0x1e, 0x28, 0x00, 0xd0, 0x02, 
+	0x1c, 0x63, 0x06, 0x1c, 0x0e, 0x24, 0x00, 0x49, 
+	0x32, 0x01, 0x2a, 0x20, 0xd3, 0xe8, 0x2c, 0x00, 
+	0xd0, 0x1b, 0x9b, 0x00, 0x70, 0x7b, 0x60, 0x78, 
+	0x9b, 0x00, 0x00, 0x99, 0x9a, 0x07, 0x58, 0x52, 
+	0x69, 0x51, 0xe0, 0x07, 0x68, 0x09, 0x29, 0x00, 
+	0xd1, 0x04, 0x20, 0xba, 0xb0, 0x0c, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x42, 0x88, 0xd3, 0xf5, 
+	0x1d, 0xcb, 0x33, 0xb9, 0x42, 0x83, 0xd3, 0xf1, 
+	0x60, 0xb9, 0x61, 0x51, 0x1c, 0x38, 0xf0, 0x13, 
+	0xfa, 0xc0, 0xb0, 0x02, 0x98, 0x04, 0x99, 0x02, 
+	0x42, 0x88, 0xd0, 0x01, 0x2c, 0x00, 0xd0, 0x83, 
+	0x70, 0x3c, 0x98, 0x04, 0x99, 0x03, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x0a, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x9e, 0x00, 0x04, 0x80, 
+	0x2e, 0x08, 0x9d, 0xfc, 0x9e, 0x00, 0x04, 0x90, 
+	0x2e, 0x08, 0xa6, 0xfc, 0x9e, 0x00, 0x04, 0x98, 
+	0x2e, 0x08, 0x9d, 0x30, 0x2e, 0x08, 0x9c, 0xd0, 
+	0x2e, 0x08, 0x9d, 0x10, 0x2e, 0x08, 0x9c, 0x50, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb5, 0x00, 0x20, 0xff, 
+	0x49, 0x03, 0x60, 0x08, 0x20, 0x01, 0x05, 0x00, 
+	0xf0, 0x21, 0xf9, 0x74, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x01, 0xe8, 0xb5, 0xf0, 0x06, 0x07, 
+	0x0e, 0x3f, 0x06, 0x0c, 0x0e, 0x24, 0x20, 0x10, 
+	0x2f, 0x1f, 0xdc, 0x2c, 0x2c, 0x1f, 0xdc, 0x2a, 
+	0x1c, 0x39, 0x43, 0x21, 0x08, 0x49, 0xd2, 0x26, 
+	0x49, 0x14, 0x1c, 0x38, 0xf0, 0x21, 0xf9, 0x70, 
+	0x26, 0x01, 0x1c, 0x35, 0x40, 0xbd, 0x1c, 0x30, 
+	0x40, 0xa0, 0x1c, 0x04, 0x43, 0x28, 0xf0, 0x21, 
+	0xf9, 0x5a, 0xf0, 0x21, 0xf9, 0x5d, 0x43, 0xa8, 
+	0xf0, 0x21, 0xf9, 0x5e, 0xf0, 0x21, 0xf9, 0x58, 
+	0x43, 0xa0, 0xf0, 0x21, 0xf9, 0x59, 0x1c, 0x38, 
+	0xf0, 0x15, 0xfc, 0x02, 0x1c, 0x04, 0xd1, 0x07, 
+	0x21, 0x03, 0x05, 0x09, 0x20, 0x00, 0x1c, 0x3a, 
+	0x1c, 0x33, 0xf0, 0x16, 0xfa, 0xb3, 0x1c, 0x04, 
+	0xf7, 0xff, 0xfc, 0x92, 0x1c, 0x20, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x00, 0x2c, 0x0b, 
+	0xb5, 0xf0, 0x06, 0x04, 0x0e, 0x24, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x06, 0x16, 0x0e, 0x36, 0x9f, 0x05, 
+	0x06, 0x38, 0x0e, 0x00, 0x22, 0x00, 0x21, 0x00, 
+	0xb4, 0x07, 0x21, 0x10, 0x1c, 0x1a, 0xb4, 0x06, 
+	0x23, 0x10, 0x1c, 0x20, 0x1c, 0x29, 0x1c, 0x32, 
+	0xf0, 0x00, 0xf8, 0x54, 0xb0, 0x05, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x06, 0x04, 
+	0x0e, 0x24, 0x04, 0x0d, 0x0c, 0x2d, 0x06, 0x16, 
+	0x0e, 0x36, 0x9f, 0x05, 0x06, 0x38, 0x0e, 0x00, 
+	0x22, 0x00, 0x21, 0x00, 0xb4, 0x07, 0x21, 0x18, 
+	0x1c, 0x1a, 0xb4, 0x06, 0x23, 0x11, 0x1c, 0x20, 
+	0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x00, 0xf8, 0x3a, 
+	0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf0, 0x06, 0x04, 0x0e, 0x24, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x06, 0x16, 0x0e, 0x36, 0x9f, 0x05, 
+	0x06, 0x38, 0x0e, 0x00, 0x22, 0x00, 0x21, 0x00, 
+	0xb4, 0x07, 0x21, 0x20, 0x1c, 0x1a, 0xb4, 0x06, 
+	0x23, 0x51, 0x1c, 0x20, 0x1c, 0x29, 0x1c, 0x32, 
+	0xf0, 0x00, 0xf8, 0x20, 0xb0, 0x05, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x06, 0x03, 
+	0x0e, 0x1b, 0x04, 0x0d, 0x0c, 0x2d, 0x06, 0x16, 
+	0x0e, 0x36, 0x9c, 0x09, 0x9f, 0x0a, 0x06, 0x20, 
+	0x0e, 0x00, 0x22, 0x00, 0x1c, 0x39, 0xb4, 0x07, 
+	0x21, 0x10, 0x9a, 0x06, 0xb4, 0x06, 0x1c, 0x18, 
+	0x23, 0x62, 0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x00, 
+	0xf8, 0x05, 0xb0, 0x05, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x9e, 0x09, 
+	0x9f, 0x0b, 0x06, 0x04, 0x0e, 0x24, 0x04, 0x09, 
+	0x0c, 0x09, 0xb0, 0x88, 0x91, 0x00, 0x06, 0x15, 
+	0x0e, 0x2d, 0x06, 0x18, 0x0e, 0x00, 0x90, 0x01, 
+	0x06, 0x32, 0x0e, 0x12, 0x92, 0x02, 0x06, 0x38, 
+	0x0e, 0x00, 0x90, 0x03, 0xb0, 0x82, 0xf0, 0x21, 
+	0xf8, 0xbf, 0x0d, 0x40, 0xd2, 0x09, 0x20, 0xff, 
+	0x90, 0x00, 0xf0, 0x21, 0xf8, 0xb9, 0x23, 0x01, 
+	0x05, 0x1b, 0x43, 0x18, 0xf0, 0x21, 0xf8, 0xb8, 
+	0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 0x98, 0x03, 
+	0x08, 0x40, 0xd3, 0x02, 0x22, 0x12, 0x92, 0x01, 
+	0xe0, 0x01, 0x22, 0x11, 0x92, 0x01, 0x22, 0x01, 
+	0x1c, 0x11, 0x40, 0xa9, 0x4b, 0x5f, 0x1c, 0x0f, 
+	0x68, 0x18, 0x40, 0x07, 0xd0, 0x01, 0x27, 0x11, 
+	0xe0, 0xa2, 0x27, 0x00, 0x43, 0x08, 0x60, 0x18, 
+	0x23, 0x1c, 0x98, 0x05, 0x40, 0x18, 0x28, 0x1c, 
+	0xd1, 0x06, 0x21, 0x01, 0x20, 0x7d, 0x01, 0x00, 
+	0xf0, 0x15, 0xff, 0x60, 0x1c, 0x06, 0xe0, 0x0d, 
+	0x98, 0x05, 0x08, 0x40, 0xd3, 0x05, 0x21, 0x01, 
+	0x20, 0xc8, 0xf0, 0x15, 0xff, 0x57, 0x1c, 0x06, 
+	0xe0, 0x04, 0x21, 0x01, 0x20, 0x3c, 0xf0, 0x15, 
+	0xff, 0x51, 0x1c, 0x06, 0x20, 0x34, 0xf0, 0x03, 
+	0xf9, 0x57, 0x00, 0xaa, 0x92, 0x09, 0x49, 0x4c, 
+	0x91, 0x08, 0x50, 0x88, 0x00, 0xa1, 0x91, 0x07, 
+	0x48, 0x4a, 0x90, 0x06, 0x58, 0x40, 0x28, 0x00, 
+	0xd1, 0x05, 0x00, 0xb0, 0xf0, 0x03, 0xf9, 0x48, 
+	0x99, 0x07, 0x9a, 0x06, 0x50, 0x50, 0x98, 0x09, 
+	0x99, 0x08, 0x58, 0x08, 0x28, 0x00, 0xd0, 0x04, 
+	0x98, 0x06, 0x99, 0x07, 0x58, 0x40, 0x28, 0x00, 
+	0xd1, 0x01, 0x27, 0x13, 0xe0, 0x64, 0x99, 0x07, 
+	0x4a, 0x3f, 0x58, 0x51, 0x29, 0x00, 0xd1, 0x3a, 
+	0x9a, 0x01, 0xb4, 0x04, 0x23, 0x40, 0x1c, 0x31, 
+	0x1c, 0x22, 0xf0, 0x15, 0xff, 0xaf, 0xb0, 0x01, 
+	0x1c, 0x07, 0xd1, 0x17, 0x23, 0x03, 0x02, 0x5b, 
+	0x22, 0x01, 0x02, 0xd2, 0x21, 0x01, 0x1c, 0x20, 
+	0xf0, 0x0e, 0xf8, 0xf2, 0x22, 0x00, 0xb4, 0x04, 
+	0x22, 0x02, 0x99, 0x03, 0x9b, 0x02, 0x1c, 0x20, 
+	0xf0, 0x0d, 0xff, 0x26, 0xb0, 0x01, 0x1c, 0x07, 
+	0xd1, 0x04, 0x22, 0x01, 0x48, 0x2f, 0x55, 0x02, 
+	0x48, 0x2f, 0x55, 0x02, 0x2f, 0x00, 0xd1, 0x16, 
+	0x98, 0x16, 0x28, 0x00, 0xd0, 0x13, 0x21, 0x02, 
+	0x98, 0x16, 0xf0, 0x15, 0xfe, 0xff, 0x1c, 0x07, 
+	0x00, 0x80, 0xf0, 0x03, 0xf9, 0x05, 0x99, 0x07, 
+	0x4a, 0x28, 0x50, 0x50, 0x28, 0x00, 0xd0, 0x05, 
+	0x1c, 0x39, 0x1c, 0x22, 0xf0, 0x15, 0xff, 0x13, 
+	0x1c, 0x07, 0xe0, 0x00, 0x27, 0x13, 0x2f, 0x00, 
+	0xd1, 0x22, 0x98, 0x03, 0x09, 0x80, 0xd3, 0x06, 
+	0x20, 0x5c, 0xf0, 0x03, 0xf8, 0xf1, 0x28, 0x00, 
+	0xd1, 0x02, 0x27, 0x13, 0xe0, 0x00, 0x20, 0x00, 
+	0x1c, 0x02, 0x98, 0x05, 0x99, 0x17, 0xb4, 0x07, 
+	0x1c, 0x2a, 0xb4, 0x04, 0x98, 0x0d, 0x99, 0x0c, 
+	0x58, 0x08, 0x99, 0x18, 0x9a, 0x08, 0x9b, 0x07, 
+	0xf0, 0x00, 0xf9, 0x1c, 0xb0, 0x04, 0x2f, 0x00, 
+	0xd1, 0x06, 0x98, 0x09, 0x99, 0x08, 0x58, 0x08, 
+	0x1c, 0x21, 0xf0, 0x12, 0xf9, 0x93, 0x1c, 0x07, 
+	0x2f, 0x00, 0xd0, 0x03, 0x1c, 0x20, 0x1c, 0x29, 
+	0xf0, 0x00, 0xf8, 0x20, 0x98, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0xf0, 0x20, 0xff, 0xf1, 0x4b, 0x0c, 
+	0x40, 0x18, 0xf0, 0x20, 0xff, 0xf1, 0x1c, 0x38, 
+	0xb0, 0x0a, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0xf0, 
+	0x2e, 0x08, 0x01, 0xf4, 0x2e, 0x08, 0x02, 0x74, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x44, 0xf8, 
+	0x2e, 0x08, 0x44, 0xd8, 0x2e, 0x08, 0x02, 0xf4, 
+	0xff, 0xef, 0xff, 0xff, 0xb5, 0xf0, 0x06, 0x07, 
+	0x0e, 0x3f, 0x06, 0x0d, 0x0e, 0x2d, 0xb0, 0x83, 
+	0xf0, 0x20, 0xff, 0xce, 0x0d, 0x40, 0xd2, 0x09, 
+	0x20, 0xff, 0x90, 0x00, 0xf0, 0x20, 0xff, 0xc8, 
+	0x23, 0x01, 0x05, 0x1b, 0x43, 0x18, 0xf0, 0x20, 
+	0xff, 0xc7, 0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 
+	0x24, 0x00, 0x20, 0x01, 0x40, 0xa8, 0x1c, 0x02, 
+	0x49, 0x3f, 0x1c, 0x13, 0x68, 0x08, 0x40, 0x03, 
+	0xd0, 0x69, 0x43, 0xd2, 0x40, 0x10, 0x00, 0xae, 
+	0x60, 0x08, 0x4d, 0x3c, 0x59, 0xa8, 0x28, 0x00, 
+	0xd0, 0x62, 0x78, 0x81, 0x91, 0x02, 0x08, 0x49, 
+	0xd3, 0x02, 0x23, 0x12, 0x93, 0x01, 0xe0, 0x01, 
+	0x23, 0x11, 0x93, 0x01, 0x1c, 0x39, 0xf0, 0x12, 
+	0xf9, 0xad, 0x1c, 0x04, 0x59, 0xa8, 0x6b, 0x00, 
+	0x28, 0x00, 0xd0, 0x01, 0xf0, 0x03, 0xf8, 0x96, 
+	0x59, 0xa8, 0x6a, 0xc0, 0x28, 0x00, 0xd0, 0x01, 
+	0xf0, 0x03, 0xf8, 0x90, 0x59, 0xa8, 0xf0, 0x03, 
+	0xf8, 0x8d, 0x20, 0x00, 0x51, 0xa8, 0x00, 0xbd, 
+	0x48, 0x2b, 0x59, 0x40, 0x78, 0x80, 0x28, 0x00, 
+	0xd1, 0x40, 0x1c, 0x39, 0xf0, 0x15, 0xfc, 0xd2, 
+	0x2c, 0x00, 0xd1, 0x2a, 0x98, 0x02, 0x09, 0x80, 
+	0xd3, 0x0a, 0x21, 0x00, 0x1c, 0x3a, 0x48, 0x25, 
+	0xf0, 0x15, 0xfe, 0x6d, 0x28, 0x00, 0xd0, 0x03, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x22, 0x00, 0xb4, 0x04, 0x22, 0x02, 0x9b, 0x02, 
+	0x1c, 0x38, 0x49, 0x1e, 0xf0, 0x0d, 0xfe, 0x54, 
+	0xb0, 0x01, 0x1c, 0x04, 0xd1, 0x11, 0x9a, 0x01, 
+	0xb4, 0x04, 0x26, 0x00, 0x21, 0x00, 0x1c, 0x3a, 
+	0x1c, 0x33, 0x48, 0x18, 0xf0, 0x15, 0xfe, 0xbe, 
+	0x1c, 0x04, 0xb0, 0x01, 0x48, 0x16, 0x55, 0xc6, 
+	0x48, 0x16, 0x55, 0xc6, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfa, 0xc5, 0x4f, 0x15, 0x59, 0x78, 0xf0, 0x03, 
+	0xf8, 0x51, 0x26, 0x00, 0x51, 0x7e, 0x37, 0x80, 
+	0x59, 0x78, 0x28, 0x00, 0xd0, 0x04, 0xf0, 0x03, 
+	0xf8, 0x49, 0x51, 0x7e, 0xe0, 0x02, 0xe0, 0x00, 
+	0xe0, 0x00, 0x24, 0x12, 0x98, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0xf0, 0x20, 0xff, 0x45, 0x4b, 0x0b, 
+	0x40, 0x18, 0xf0, 0x20, 0xff, 0x45, 0x1c, 0x20, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x01, 0xf0, 0x2e, 0x08, 0x01, 0xf4, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x44, 0xf8, 0x2e, 0x08, 0x44, 0xd8, 
+	0x2e, 0x08, 0x02, 0x74, 0xff, 0xef, 0xff, 0xff, 
+	0xb5, 0xb0, 0x06, 0x00, 0x0e, 0x00, 0x00, 0x80, 
+	0x1c, 0x0c, 0x1c, 0x17, 0xb0, 0xad, 0x49, 0x1c, 
+	0x58, 0x08, 0x90, 0x04, 0x78, 0x81, 0x23, 0x04, 
+	0x40, 0x19, 0x25, 0x00, 0x29, 0x00, 0xd0, 0x0b, 
+	0xa9, 0x25, 0xf0, 0x12, 0xfd, 0x6f, 0xab, 0x00, 
+	0x80, 0x5d, 0xa8, 0x25, 0x90, 0x24, 0x46, 0x68, 
+	0x21, 0x00, 0xf0, 0x12, 0xfd, 0x8e, 0xe0, 0x0c, 
+	0x78, 0x00, 0x0a, 0x00, 0xd3, 0x04, 0x20, 0x01, 
+	0x03, 0x00, 0xab, 0x00, 0x80, 0x58, 0xe0, 0x03, 
+	0x20, 0x01, 0x02, 0x80, 0xab, 0x00, 0x80, 0x58, 
+	0x20, 0x00, 0x28, 0x00, 0xd1, 0x0e, 0xa8, 0x00, 
+	0x88, 0x40, 0x60, 0x38, 0xf0, 0x02, 0xff, 0xd4, 
+	0x60, 0x20, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x13, 
+	0xe0, 0x06, 0x1c, 0x01, 0x46, 0x68, 0xf0, 0x12, 
+	0xfd, 0x70, 0xe0, 0x01, 0x60, 0x25, 0x60, 0x3d, 
+	0xb0, 0x2d, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x01, 0xf4, 0xb4, 0xf0, 0x06, 0x12, 
+	0x0e, 0x12, 0x06, 0x1b, 0x0e, 0x1b, 0x9c, 0x06, 
+	0x9f, 0x07, 0x9d, 0x05, 0x9e, 0x04, 0x06, 0x36, 
+	0x0e, 0x36, 0x06, 0x2d, 0xd0, 0x02, 0x25, 0x80, 
+	0x70, 0x05, 0xe0, 0x01, 0x25, 0x00, 0x70, 0x05, 
+	0x25, 0x00, 0x70, 0x45, 0x80, 0x85, 0x72, 0x05, 
+	0x70, 0xc6, 0x70, 0x83, 0x62, 0xc4, 0x63, 0x07, 
+	0x27, 0x00, 0x23, 0x00, 0x2a, 0x00, 0xdd, 0x10, 
+	0x5c, 0xcc, 0x19, 0xc5, 0x73, 0x2c, 0x18, 0xcc, 
+	0x78, 0x66, 0x1c, 0x7c, 0x06, 0x25, 0x0e, 0x2d, 
+	0x1c, 0x3c, 0x18, 0x24, 0x77, 0x26, 0x33, 0x02, 
+	0x06, 0x1b, 0x0e, 0x1b, 0x1c, 0x2f, 0x42, 0x93, 
+	0xdb, 0xee, 0xbc, 0xf0, 0x47, 0x70, 0xb5, 0xf0, 
+	0xb0, 0xac, 0x21, 0x00, 0xa8, 0x07, 0xf0, 0x12, 
+	0xfb, 0xf5, 0xa8, 0x07, 0x78, 0x00, 0x90, 0x06, 
+	0x28, 0x00, 0xd0, 0x4b, 0x24, 0x00, 0x98, 0x06, 
+	0x28, 0x00, 0xdd, 0x43, 0xa8, 0x07, 0xf0, 0x12, 
+	0xff, 0xbc, 0x00, 0xa1, 0xa8, 0x07, 0x18, 0x08, 
+	0x69, 0x07, 0x78, 0xfe, 0xad, 0x07, 0x88, 0x6d, 
+	0x78, 0xb8, 0x09, 0xc0, 0xd3, 0x12, 0xa8, 0x07, 
+	0xa9, 0x01, 0xf0, 0x16, 0xfa, 0x0b, 0x78, 0xb8, 
+	0x08, 0x40, 0xd3, 0x05, 0x46, 0x6a, 0x1c, 0x38, 
+	0xa9, 0x01, 0xf0, 0x16, 0xfa, 0x38, 0xe0, 0x08, 
+	0x46, 0x6a, 0x1c, 0x38, 0xa9, 0x01, 0xf0, 0x16, 
+	0xfa, 0x75, 0xe0, 0x02, 0x20, 0x40, 0xab, 0x00, 
+	0x70, 0x18, 0xa8, 0x00, 0x78, 0x00, 0x09, 0xc0, 
+	0xd3, 0x16, 0x1c, 0x28, 0xf7, 0xfd, 0xfe, 0xf8, 
+	0x1c, 0x07, 0xd0, 0x11, 0xa8, 0x07, 0x1c, 0x39, 
+	0xf0, 0x12, 0xfe, 0x2e, 0x28, 0x00, 0xd1, 0x09, 
+	0x1c, 0x30, 0x1c, 0x29, 0x1c, 0x3a, 0xf7, 0xfd, 
+	0xff, 0x47, 0x28, 0x00, 0xd0, 0x04, 0xf7, 0xfd, 
+	0xff, 0x39, 0xe0, 0x01, 0xf7, 0xfd, 0xff, 0x36, 
+	0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 0x98, 0x06, 
+	0x42, 0x84, 0xdb, 0xbb, 0xa8, 0x07, 0xf0, 0x12, 
+	0xfc, 0x97, 0xe7, 0xaa, 0xf7, 0xff, 0xfa, 0x5c, 
+	0xb0, 0x2c, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf0, 0xb0, 0xad, 0x21, 0x00, 0xa8, 0x08, 
+	0xf0, 0x12, 0xfb, 0x98, 0x22, 0x05, 0x21, 0x16, 
+	0x1c, 0x04, 0xf0, 0x03, 0xfd, 0x6a, 0x2c, 0xb2, 
+	0xd1, 0x03, 0x21, 0x00, 0xa8, 0x08, 0xf0, 0x12, 
+	0xfb, 0x47, 0xa8, 0x08, 0x78, 0x00, 0x90, 0x06, 
+	0x28, 0x00, 0xd0, 0x73, 0x25, 0x00, 0x98, 0x06, 
+	0x28, 0x00, 0xdd, 0x57, 0xa8, 0x08, 0xf0, 0x12, 
+	0xff, 0x54, 0x00, 0xa9, 0xa8, 0x08, 0x18, 0x08, 
+	0x69, 0x07, 0x78, 0xf8, 0x90, 0x07, 0xae, 0x08, 
+	0x88, 0x76, 0x78, 0xb8, 0x09, 0xc0, 0xd3, 0x12, 
+	0xa8, 0x08, 0xa9, 0x01, 0xf0, 0x16, 0xf9, 0xa2, 
+	0x78, 0xb8, 0x08, 0x40, 0xd3, 0x05, 0x46, 0x6a, 
+	0x1c, 0x38, 0xa9, 0x01, 0xf0, 0x16, 0xf9, 0xcf, 
+	0xe0, 0x08, 0x46, 0x6a, 0x1c, 0x38, 0xa9, 0x01, 
+	0xf0, 0x16, 0xfa, 0x0c, 0xe0, 0x02, 0x20, 0x40, 
+	0xab, 0x00, 0x70, 0x18, 0xa8, 0x00, 0x78, 0x00, 
+	0x09, 0xc0, 0xd3, 0x29, 0x78, 0xb8, 0x09, 0x80, 
+	0xd3, 0x0f, 0xa8, 0x08, 0xa9, 0x01, 0xf0, 0x16, 
+	0xfb, 0x69, 0x1c, 0x04, 0xa8, 0x00, 0x78, 0x00, 
+	0x08, 0x80, 0xd2, 0x02, 0x78, 0xb8, 0x08, 0x80, 
+	0xd3, 0x1a, 0x1c, 0x38, 0xf0, 0x16, 0xfc, 0x70, 
+	0xe0, 0x16, 0x1c, 0x30, 0xf7, 0xfd, 0xfe, 0x7c, 
+	0x1c, 0x07, 0xd0, 0x11, 0xa8, 0x08, 0x1c, 0x39, 
+	0xf0, 0x12, 0xfd, 0xb2, 0x28, 0x00, 0xd1, 0x09, 
+	0x98, 0x07, 0x1c, 0x31, 0x1c, 0x3a, 0xf7, 0xfd, 
+	0xfe, 0xcb, 0x28, 0x00, 0xd0, 0x04, 0xf7, 0xfd, 
+	0xfe, 0xbd, 0xe0, 0x01, 0xf7, 0xfd, 0xfe, 0xba, 
+	0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 0x98, 0x06, 
+	0x42, 0x85, 0xdb, 0xa7, 0x98, 0x06, 0x28, 0x00, 
+	0xd0, 0x08, 0xa8, 0x08, 0xf0, 0x12, 0xfc, 0x18, 
+	0x2c, 0xb2, 0xd1, 0x03, 0x21, 0x00, 0xa8, 0x08, 
+	0xf0, 0x12, 0xfa, 0xda, 0xf7, 0xff, 0xf9, 0x5c, 
+	0x21, 0x00, 0xa8, 0x08, 0xf7, 0xff, 0xfb, 0x88, 
+	0x1c, 0x04, 0xa8, 0x08, 0x78, 0x00, 0x90, 0x06, 
+	0x28, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xd1, 0x89, 
+	0xf7, 0xff, 0xf9, 0xca, 0xb0, 0x2d, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x26, 0x00, 
+	0x48, 0x28, 0x71, 0x06, 0x70, 0x06, 0x20, 0x00, 
+	0x4f, 0x27, 0x4a, 0x28, 0x49, 0x28, 0x00, 0x43, 
+	0x52, 0xd6, 0x52, 0xfe, 0x00, 0x83, 0x50, 0xce, 
+	0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x28, 0x1d, 
+	0xdb, 0xf5, 0x28, 0x20, 0xda, 0x08, 0x00, 0x43, 
+	0x52, 0xd6, 0x00, 0x83, 0x50, 0xce, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x20, 0xdb, 0xf6, 
+	0x20, 0x01, 0x02, 0x80, 0xf0, 0x20, 0xfd, 0xa3, 
+	0xf0, 0x20, 0xfd, 0xa6, 0x4b, 0x1b, 0x40, 0x18, 
+	0xf0, 0x20, 0xfd, 0xa6, 0x49, 0x1a, 0x20, 0x0a, 
+	0xf0, 0x20, 0xfd, 0xa6, 0x21, 0x00, 0x4f, 0x19, 
+	0x20, 0xff, 0x4a, 0x19, 0x00, 0x4b, 0x18, 0x5b, 
+	0x01, 0x1b, 0x52, 0xd7, 0x18, 0x9b, 0x70, 0x98, 
+	0x70, 0xde, 0x71, 0x1e, 0x1d, 0xdc, 0x34, 0x19, 
+	0x73, 0x26, 0x71, 0x5e, 0x1c, 0x1d, 0x23, 0x06, 
+	0x73, 0x63, 0x23, 0x00, 0x00, 0xdc, 0x19, 0x2c, 
+	0x81, 0xa6, 0x81, 0xe6, 0x33, 0x01, 0x06, 0x1b, 
+	0x0e, 0x1b, 0x60, 0xa6, 0x2b, 0x04, 0xdb, 0xf5, 
+	0x31, 0x01, 0x06, 0x09, 0x0e, 0x09, 0x29, 0x08, 
+	0xdb, 0xe0, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x03, 0xbc, 
+	0x2e, 0x08, 0x4a, 0x60, 0x2e, 0x08, 0x4a, 0x20, 
+	0x2e, 0x08, 0x46, 0x98, 0xff, 0xff, 0xfb, 0xff, 
+	0x2e, 0x00, 0x30, 0x45, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x45, 0x18, 0xb5, 0xf0, 0x06, 0x00, 
+	0x0e, 0x00, 0xb0, 0x83, 0x90, 0x00, 0x04, 0x09, 
+	0x0c, 0x09, 0x91, 0x01, 0x06, 0x10, 0x0e, 0x00, 
+	0x04, 0x1c, 0x0c, 0x24, 0x27, 0x00, 0x49, 0x5a, 
+	0x00, 0x7b, 0x19, 0xdb, 0x01, 0x1b, 0x5a, 0xcd, 
+	0x4b, 0x58, 0x42, 0x9d, 0xd1, 0x01, 0x1c, 0x3a, 
+	0xe0, 0x04, 0x1c, 0x7b, 0x06, 0x1f, 0x0e, 0x3f, 
+	0x2f, 0x08, 0xdb, 0xf1, 0x2f, 0x08, 0xd1, 0x05, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x46, 0x4f, 0x50, 
+	0x97, 0x02, 0x5b, 0xbb, 0x2b, 0x00, 0xd0, 0x05, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x23, 0x01, 0x9f, 0x02, 
+	0x53, 0xbb, 0x00, 0x53, 0x18, 0x9a, 0x01, 0x12, 
+	0x18, 0x57, 0x80, 0x38, 0x20, 0x14, 0xf0, 0x02, 
+	0xfe, 0x03, 0x1c, 0x01, 0x62, 0xb8, 0x20, 0x00, 
+	0x29, 0x00, 0xd1, 0x08, 0x49, 0x41, 0x80, 0x39, 
+	0x9f, 0x02, 0x53, 0xb8, 0x43, 0xc0, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x0d, 
+	0x21, 0xff, 0x02, 0x09, 0x40, 0x21, 0x12, 0x08, 
+	0x28, 0x09, 0xd2, 0x1f, 0xa3, 0x01, 0x5c, 0x1b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x1b, 0x04, 0x06, 0x09, 
+	0x0c, 0x0f, 0x12, 0x15, 0x18, 0x00, 0x24, 0xb8, 
+	0xe0, 0x16, 0x24, 0xff, 0x34, 0x71, 0xe0, 0x13, 
+	0x24, 0x01, 0x02, 0xa4, 0xe0, 0x10, 0x24, 0x01, 
+	0x02, 0xe4, 0xe0, 0x0d, 0x24, 0x01, 0x03, 0x24, 
+	0xe0, 0x0a, 0x24, 0x01, 0x03, 0x64, 0xe0, 0x07, 
+	0x24, 0x01, 0x03, 0xa4, 0xe0, 0x04, 0x24, 0x01, 
+	0x03, 0xe4, 0xe0, 0x01, 0x24, 0x01, 0x02, 0xa4, 
+	0x80, 0xac, 0x88, 0xa8, 0x00, 0x80, 0xf0, 0x02, 
+	0xfd, 0xc7, 0x60, 0x28, 0x28, 0x00, 0xd1, 0x0d, 
+	0x48, 0x24, 0x80, 0x38, 0x20, 0x00, 0x9f, 0x02, 
+	0x53, 0xb8, 0x1c, 0x28, 0xf0, 0x02, 0xfd, 0xde, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x98, 0x00, 0x70, 0xb8, 
+	0x26, 0x00, 0x88, 0x38, 0x00, 0x80, 0x49, 0x1d, 
+	0x50, 0x0e, 0x20, 0x00, 0x1c, 0x01, 0x43, 0x61, 
+	0x68, 0x2a, 0x18, 0x8a, 0x00, 0xc1, 0x19, 0xc9, 
+	0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x60, 0x8a, 
+	0x28, 0x04, 0xdb, 0xf3, 0x20, 0xb8, 0x1c, 0x21, 
+	0xf0, 0x1b, 0xf9, 0x30, 0x1d, 0xfc, 0x34, 0x19, 
+	0x73, 0x20, 0x72, 0x2e, 0x78, 0xb8, 0x23, 0x01, 
+	0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 0xf0, 0x0d, 
+	0xfd, 0x63, 0x22, 0x00, 0xb4, 0x04, 0x78, 0xb8, 
+	0x23, 0x05, 0x22, 0x02, 0x99, 0x02, 0xf0, 0x0d, 
+	0xfb, 0x97, 0x22, 0x04, 0x7b, 0x21, 0xb0, 0x01, 
+	0xb4, 0x06, 0x78, 0xb9, 0x22, 0x0a, 0x20, 0x85, 
+	0x6a, 0xbb, 0xf0, 0x0d, 0xfd, 0xdf, 0x1c, 0x30, 
+	0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x45, 0x18, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x4a, 0x20, 0x2e, 0x08, 0x46, 0x98, 
+	0xb5, 0xf0, 0xb0, 0x82, 0x46, 0x68, 0xf0, 0x0e, 
+	0xfb, 0x73, 0x21, 0x00, 0x4f, 0x24, 0x4b, 0x25, 
+	0x93, 0x01, 0x4a, 0x25, 0x00, 0x48, 0x18, 0x40, 
+	0x01, 0x00, 0x19, 0xc0, 0x78, 0x84, 0x9d, 0x00, 
+	0x40, 0xe5, 0x07, 0xeb, 0x0f, 0xdb, 0x2b, 0x01, 
+	0xd1, 0x31, 0x6a, 0x83, 0x7a, 0x1c, 0x2c, 0xa4, 
+	0xd0, 0x01, 0x2c, 0xa5, 0xd1, 0x2b, 0x1d, 0xc4, 
+	0x34, 0x19, 0xe0, 0x0e, 0x79, 0x05, 0x73, 0x65, 
+	0x88, 0xde, 0x79, 0x05, 0x00, 0xed, 0x18, 0x2d, 
+	0x81, 0xae, 0x79, 0x05, 0x35, 0x01, 0x07, 0xad, 
+	0x0f, 0xad, 0x71, 0x05, 0x78, 0x15, 0x35, 0x01, 
+	0x70, 0x15, 0x7a, 0x9d, 0x7b, 0x66, 0x42, 0xb5, 
+	0xd0, 0x02, 0x79, 0x45, 0x2d, 0x00, 0xd0, 0xe9, 
+	0x7a, 0x1b, 0x2b, 0xa5, 0xd1, 0x0f, 0x79, 0x43, 
+	0x07, 0xdc, 0x0f, 0xe4, 0x2c, 0x01, 0xd0, 0x0a, 
+	0x1c, 0x1c, 0x23, 0x01, 0x43, 0x23, 0x71, 0x43, 
+	0x88, 0x00, 0x00, 0x80, 0x9b, 0x01, 0x18, 0xc0, 
+	0x68, 0x03, 0x33, 0x01, 0x60, 0x03, 0x1c, 0x48, 
+	0x06, 0x01, 0x0e, 0x09, 0x29, 0x08, 0xdb, 0xbd, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x45, 0x18, 0x2e, 0x08, 0x46, 0x98, 
+	0x2e, 0x08, 0x03, 0xbc, 0xb5, 0xf0, 0x04, 0x05, 
+	0x0c, 0x2d, 0x20, 0x00, 0x4c, 0x31, 0x00, 0x42, 
+	0x18, 0x12, 0x01, 0x12, 0x5a, 0xa2, 0x42, 0xaa, 
+	0xd1, 0x01, 0x1c, 0x01, 0xe0, 0x04, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x08, 0xdb, 0xf2, 
+	0x28, 0x08, 0xd1, 0x04, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x48, 
+	0x18, 0x40, 0x01, 0x00, 0x19, 0x07, 0x78, 0xb8, 
+	0x49, 0x25, 0xf0, 0x0d, 0xfd, 0xab, 0x79, 0x78, 
+	0x23, 0x02, 0x43, 0x18, 0x71, 0x78, 0x78, 0xbe, 
+	0x20, 0xff, 0x70, 0xb8, 0x21, 0x00, 0x1d, 0xf8, 
+	0x30, 0x19, 0x73, 0x01, 0x21, 0x06, 0x73, 0x41, 
+	0x78, 0xf8, 0x79, 0x39, 0x42, 0x88, 0xd1, 0x11, 
+	0x79, 0x78, 0x07, 0xc0, 0x0f, 0xc0, 0x28, 0x01, 
+	0xd0, 0x0c, 0x20, 0x00, 0x70, 0xf8, 0x71, 0x38, 
+	0x71, 0x78, 0x48, 0x17, 0x80, 0x38, 0x6a, 0xb8, 
+	0x68, 0x00, 0xf0, 0x02, 0xfc, 0xff, 0x6a, 0xb8, 
+	0xf0, 0x02, 0xfc, 0xfc, 0x4f, 0x12, 0x00, 0x68, 
+	0x49, 0x12, 0x52, 0x0f, 0x00, 0x71, 0x4a, 0x12, 
+	0x52, 0x57, 0x21, 0x00, 0x4a, 0x11, 0x52, 0x11, 
+	0x1c, 0x30, 0x1c, 0x29, 0xf0, 0x02, 0xff, 0xfa, 
+	0x20, 0x00, 0x00, 0x41, 0x18, 0x09, 0x01, 0x09, 
+	0x5a, 0x61, 0x42, 0xb9, 0xd1, 0x04, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x08, 0xdb, 0xf4, 
+	0x28, 0x08, 0xd1, 0x03, 0x21, 0x00, 0x48, 0x08, 
+	0x71, 0x01, 0x70, 0x01, 0x20, 0x00, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x45, 0x18, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0xe0, 
+	0x2e, 0x08, 0x49, 0xa8, 0x2e, 0x08, 0x4a, 0x20, 
+	0x2e, 0x08, 0x03, 0xbc, 0xb5, 0x80, 0x1c, 0x07, 
+	0x30, 0x28, 0xf0, 0x02, 0xfc, 0xa5, 0x49, 0x07, 
+	0x64, 0x88, 0x65, 0x08, 0x65, 0x48, 0x19, 0xc0, 
+	0x64, 0xc8, 0x20, 0x00, 0x64, 0x08, 0x64, 0x4f, 
+	0x49, 0x03, 0x84, 0x08, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x03, 0xc4, 
+	0x2c, 0x00, 0x01, 0x00, 0xb5, 0x80, 0x1c, 0x07, 
+	0x30, 0x28, 0xf0, 0x02, 0xfc, 0x8d, 0x49, 0x06, 
+	0x66, 0x08, 0x66, 0x88, 0x66, 0xc8, 0x19, 0xc0, 
+	0x66, 0x48, 0x20, 0x00, 0x65, 0x88, 0x65, 0xcf, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x03, 0xc4, 0xb4, 0x80, 0x04, 0x09, 
+	0x0c, 0x09, 0x88, 0x02, 0x42, 0x8a, 0xd0, 0x18, 
+	0x4a, 0x0d, 0x8f, 0x13, 0x2b, 0x01, 0xd0, 0x04, 
+	0x23, 0x01, 0x87, 0x13, 0x8f, 0x17, 0x2f, 0x01, 
+	0xd1, 0xfb, 0x88, 0x03, 0x42, 0x8b, 0xd0, 0x03, 
+	0x80, 0x01, 0x88, 0x03, 0x42, 0x8b, 0xd1, 0xfb, 
+	0x8f, 0x11, 0x1c, 0x10, 0x29, 0x00, 0xd0, 0x04, 
+	0x21, 0x00, 0x87, 0x01, 0x8f, 0x02, 0x2a, 0x00, 
+	0xd1, 0xfb, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0x80, 0x48, 0x27, 
+	0x8f, 0x40, 0x28, 0x00, 0xd1, 0x47, 0x4f, 0x26, 
+	0x88, 0x38, 0x12, 0x00, 0x4a, 0x25, 0x28, 0x06, 
+	0xd0, 0x21, 0xdc, 0x08, 0x28, 0x06, 0xd2, 0x36, 
+	0xa3, 0x01, 0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x3a, 0x09, 0x09, 0x15, 0x32, 0x09, 0x28, 0x0a, 
+	0xd0, 0x1b, 0xdc, 0x08, 0x28, 0x07, 0xd0, 0x15, 
+	0x28, 0x09, 0xd1, 0x28, 0x88, 0x79, 0x88, 0x38, 
+	0xf0, 0x00, 0xf8, 0xd4, 0xe0, 0x27, 0x28, 0x0b, 
+	0xd0, 0x1c, 0x28, 0x80, 0xd1, 0x1f, 0xf0, 0x00, 
+	0xf9, 0x25, 0xe0, 0x20, 0x88, 0x79, 0x88, 0x38, 
+	0xf0, 0x00, 0xf8, 0x2c, 0xe0, 0x1b, 0xf0, 0x00, 
+	0xf9, 0x75, 0xe0, 0x18, 0xf0, 0x00, 0xf9, 0xe0, 
+	0xe0, 0x15, 0x88, 0x38, 0xb0, 0x84, 0xab, 0x00, 
+	0x80, 0x18, 0x88, 0x78, 0x70, 0x98, 0x92, 0x01, 
+	0x46, 0x69, 0x20, 0x75, 0xf0, 0x08, 0xf8, 0x04, 
+	0xb0, 0x04, 0xe0, 0x08, 0x88, 0x79, 0x88, 0x38, 
+	0xf0, 0x00, 0xfc, 0x50, 0xe0, 0x03, 0x48, 0x08, 
+	0x8e, 0x81, 0x31, 0x01, 0x86, 0x81, 0x21, 0x00, 
+	0x1c, 0x38, 0xf7, 0xff, 0xff, 0x8f, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2c, 0x00, 0x00, 0xfc, 0x2c, 0x00, 0x01, 0x00, 
+	0x2e, 0x08, 0x04, 0x04, 0xb5, 0xf0, 0x04, 0x04, 
+	0x0c, 0x24, 0x04, 0x0d, 0x0c, 0x2d, 0x1c, 0x17, 
+	0xf0, 0x20, 0xfb, 0x5e, 0x2d, 0x10, 0xdd, 0x03, 
+	0x20, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x68, 0x10, 0x40, 0x00, 0x40, 0x04, 0x01, 
+	0x0c, 0x09, 0x1c, 0x88, 0x00, 0x40, 0x1d, 0x02, 
+	0x48, 0x1b, 0x6c, 0x03, 0x18, 0x9d, 0x6c, 0x46, 
+	0x4b, 0x1a, 0x42, 0xb5, 0xdd, 0x08, 0x88, 0x19, 
+	0x1c, 0x18, 0x23, 0x20, 0x43, 0x19, 0x80, 0x01, 
+	0x20, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x64, 0x05, 0x35, 0x28, 0x42, 0xb5, 0xdd, 0x04, 
+	0x88, 0x1e, 0x1c, 0x1d, 0x23, 0x10, 0x43, 0x33, 
+	0x80, 0x2b, 0x6d, 0x03, 0x80, 0x9c, 0x6d, 0x04, 
+	0x80, 0xe2, 0x23, 0x00, 0x29, 0x00, 0xdd, 0x08, 
+	0x88, 0x3d, 0x00, 0x5c, 0x6d, 0x06, 0x19, 0xa4, 
+	0x81, 0x25, 0x33, 0x01, 0x37, 0x02, 0x42, 0x8b, 
+	0xdb, 0xf6, 0x6d, 0x01, 0x18, 0x8a, 0x6c, 0xc3, 
+	0x42, 0x9a, 0xd9, 0x00, 0x6c, 0x82, 0x60, 0x0a, 
+	0x65, 0x02, 0xf0, 0x20, 0xfb, 0x53, 0x20, 0x00, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x03, 0xc4, 0x2c, 0x00, 0x00, 0xf8, 
+	0xb4, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x08, 
+	0x0c, 0x00, 0x28, 0x10, 0xdd, 0x02, 0x20, 0x02, 
+	0xbc, 0xf0, 0x47, 0x70, 0x30, 0x01, 0x4f, 0x1c, 
+	0x40, 0x07, 0x1c, 0xb8, 0x00, 0x40, 0x1d, 0x01, 
+	0x48, 0x1a, 0x6d, 0x83, 0x18, 0x5d, 0x6d, 0xc6, 
+	0x4b, 0x19, 0x42, 0xb5, 0xdd, 0x07, 0x88, 0x19, 
+	0x1c, 0x18, 0x23, 0x02, 0x43, 0x19, 0x80, 0x01, 
+	0x20, 0x01, 0xbc, 0xf0, 0x47, 0x70, 0x65, 0x85, 
+	0x35, 0x28, 0x42, 0xb5, 0xdd, 0x04, 0x88, 0x1e, 
+	0x1c, 0x1d, 0x23, 0x01, 0x43, 0x33, 0x80, 0x2b, 
+	0x6e, 0x83, 0x80, 0x9c, 0x6e, 0x84, 0x80, 0xe1, 
+	0x23, 0x00, 0x2f, 0x00, 0xdd, 0x08, 0x88, 0x15, 
+	0x00, 0x5c, 0x6e, 0x86, 0x19, 0xa4, 0x81, 0x25, 
+	0x32, 0x02, 0x33, 0x01, 0x42, 0xbb, 0xdb, 0xf6, 
+	0x6e, 0x82, 0x18, 0x51, 0x6e, 0x43, 0x42, 0x99, 
+	0xd3, 0x00, 0x6e, 0x01, 0x60, 0x11, 0x66, 0x81, 
+	0x20, 0x00, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
+	0x00, 0x00, 0xff, 0xfe, 0x2e, 0x08, 0x03, 0xc4, 
+	0x2c, 0x00, 0x00, 0xf8, 0xb5, 0xb0, 0x04, 0x04, 
+	0x0c, 0x24, 0x04, 0x0d, 0x0c, 0x2d, 0x1c, 0x17, 
+	0xf0, 0x20, 0xfa, 0xc2, 0x1c, 0x20, 0x1c, 0x29, 
+	0x1c, 0x3a, 0xf7, 0xff, 0xff, 0xa9, 0x1c, 0x07, 
+	0xf0, 0x20, 0xfa, 0xf0, 0x1c, 0x38, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb4, 0xf0, 0x04, 0x04, 
+	0x0c, 0x24, 0x04, 0x09, 0x0c, 0x09, 0x29, 0x08, 
+	0xdd, 0x02, 0x20, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
+	0x00, 0x88, 0x1d, 0xc7, 0x37, 0x01, 0x48, 0x19, 
+	0x6d, 0x83, 0x19, 0xdd, 0x6d, 0xc6, 0x4b, 0x18, 
+	0x42, 0xb5, 0xdd, 0x07, 0x88, 0x19, 0x1c, 0x18, 
+	0x23, 0x02, 0x43, 0x19, 0x80, 0x01, 0x20, 0x01, 
+	0xbc, 0xf0, 0x47, 0x70, 0x65, 0x85, 0x35, 0x28, 
+	0x42, 0xb5, 0xdd, 0x04, 0x88, 0x1e, 0x1c, 0x1d, 
+	0x23, 0x01, 0x43, 0x33, 0x80, 0x2b, 0x6e, 0x83, 
+	0x80, 0x9c, 0x6e, 0x84, 0x80, 0xe7, 0x23, 0x00, 
+	0x6e, 0x84, 0x29, 0x00, 0xdd, 0x06, 0xca, 0x40, 
+	0x00, 0x9d, 0x19, 0x2d, 0x60, 0xae, 0x33, 0x01, 
+	0x42, 0x8b, 0xdb, 0xf8, 0x6e, 0x81, 0x19, 0xca, 
+	0x6e, 0x43, 0x42, 0x9a, 0xd3, 0x00, 0x6e, 0x02, 
+	0x60, 0x0a, 0x66, 0x82, 0x20, 0x00, 0xbc, 0xf0, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x03, 0xc4, 
+	0x2c, 0x00, 0x00, 0xf8, 0xb5, 0x80, 0x48, 0x28, 
+	0x88, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x4f, 0x27, 
+	0x28, 0x01, 0xd0, 0x13, 0x28, 0x02, 0xd0, 0x1a, 
+	0x28, 0x03, 0xd1, 0x0c, 0x68, 0x38, 0x88, 0x41, 
+	0x29, 0x0e, 0xdb, 0x02, 0x88, 0x41, 0x29, 0x0f, 
+	0xdd, 0x2f, 0x88, 0x01, 0x04, 0x09, 0x88, 0x40, 
+	0x43, 0x08, 0xf0, 0x10, 0xfd, 0x0f, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x68, 0x38, 0x88, 0x82, 
+	0x88, 0x41, 0x88, 0x00, 0xf0, 0x13, 0xfb, 0xee, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x68, 0x38, 
+	0x88, 0x81, 0x04, 0x09, 0x88, 0xc2, 0x43, 0x11, 
+	0x88, 0x02, 0x04, 0x12, 0x88, 0x40, 0x43, 0x10, 
+	0xf0, 0x13, 0xf8, 0x92, 0x68, 0x38, 0x88, 0x41, 
+	0x29, 0x0e, 0xd1, 0x08, 0x88, 0x81, 0x04, 0x09, 
+	0x88, 0xc0, 0x43, 0x08, 0xf0, 0x10, 0xfb, 0x8c, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 
+	0xf0, 0x10, 0xfb, 0x86, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x88, 0x41, 0x48, 0x08, 0x29, 0x0e, 
+	0xd1, 0x02, 0x21, 0x00, 0x60, 0x01, 0xe0, 0x01, 
+	0x21, 0x01, 0x60, 0x01, 0x68, 0x00, 0xf0, 0x00, 
+	0xfb, 0xb7, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2c, 0x00, 0x00, 0xfc, 0x2e, 0x08, 0x03, 0xc4, 
+	0x2e, 0x08, 0x04, 0xf8, 0xb5, 0x90, 0x48, 0x31, 
+	0x88, 0x00, 0x06, 0x04, 0x0e, 0x24, 0x48, 0x30, 
+	0x22, 0x03, 0x21, 0x02, 0x4f, 0x2f, 0x2c, 0x08, 
+	0xd2, 0x4f, 0xa3, 0x02, 0x5d, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x4b, 0x10, 0x16, 
+	0x1c, 0x28, 0x34, 0x3f, 0x68, 0x39, 0x88, 0x49, 
+	0x06, 0x09, 0x0e, 0x09, 0x88, 0x00, 0x06, 0x00, 
+	0x0e, 0x00, 0xf0, 0x03, 0xfa, 0x8d, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x03, 0xf7, 0xfe, 
+	0xf8, 0x9f, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x02, 0xf7, 0xfe, 0xf8, 0x99, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x88, 0x00, 0x4b, 0x1e, 
+	0x28, 0x00, 0xd0, 0x03, 0x60, 0x1a, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x60, 0x19, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x88, 0x00, 0x4b, 0x19, 
+	0x28, 0x00, 0xd0, 0x03, 0x60, 0x1a, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x60, 0x19, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xf0, 0x02, 0xfe, 0x4c, 
+	0x68, 0x39, 0x88, 0x4a, 0x1d, 0x08, 0x88, 0x09, 
+	0xf7, 0xfe, 0xf9, 0x10, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0x38, 0x88, 0x81, 0x04, 0x09, 
+	0x88, 0xc2, 0x18, 0x8a, 0x88, 0x01, 0x04, 0x09, 
+	0x88, 0x40, 0x50, 0x0a, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x1d, 0xf8, 0x30, 0x39, 0x8e, 0x81, 
+	0x31, 0x01, 0x86, 0x81, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x00, 0xfc, 
+	0x2c, 0x00, 0x01, 0x00, 0x2e, 0x08, 0x03, 0xc4, 
+	0x6e, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x12, 0x00, 
+	0xb5, 0x90, 0xb0, 0x84, 0x48, 0x73, 0x88, 0x00, 
+	0x06, 0x00, 0x0e, 0x00, 0x4c, 0x72, 0x4f, 0x73, 
+	0x28, 0x0a, 0xd2, 0x60, 0xa3, 0x01, 0x5c, 0x1b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x04, 0x0e, 0x16, 0x39, 
+	0x5d, 0x85, 0x8f, 0xb6, 0xbe, 0xcc, 0xf0, 0x10, 
+	0xfe, 0xc7, 0x90, 0x03, 0x14, 0x00, 0x68, 0x39, 
+	0x80, 0x08, 0x98, 0x03, 0x68, 0x39, 0x80, 0x48, 
+	0xe0, 0xc7, 0x20, 0x1e, 0xa9, 0x03, 0xf0, 0x10, 
+	0xfd, 0xc9, 0x98, 0x03, 0x68, 0x39, 0x80, 0x08, 
+	0xe0, 0xbf, 0x1c, 0x20, 0xf0, 0x13, 0xf9, 0xc0, 
+	0x20, 0x00, 0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 
+	0x68, 0x3b, 0x52, 0x99, 0x30, 0x01, 0x28, 0x04, 
+	0xdd, 0xf7, 0x20, 0x07, 0x00, 0x81, 0x58, 0x61, 
+	0x00, 0x42, 0x68, 0x3b, 0x18, 0xd2, 0x3a, 0x40, 
+	0x87, 0x91, 0x30, 0x01, 0x28, 0x0b, 0xdd, 0xf5, 
+	0x20, 0x0d, 0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 
+	0x68, 0x3b, 0x18, 0xd2, 0x3a, 0x40, 0x87, 0x51, 
+	0x30, 0x01, 0x28, 0x12, 0xdd, 0xf5, 0xe0, 0x9c, 
+	0x20, 0x13, 0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 
+	0x68, 0x3b, 0x18, 0xd2, 0x3a, 0x40, 0x83, 0x51, 
+	0x30, 0x01, 0x28, 0x15, 0xdd, 0xf5, 0x20, 0x00, 
+	0x00, 0x81, 0x19, 0x09, 0x6d, 0x89, 0x00, 0x42, 
+	0x68, 0x3b, 0x18, 0xd2, 0x80, 0xd1, 0x30, 0x01, 
+	0x28, 0x0a, 0xdd, 0xf5, 0x20, 0x00, 0x00, 0x81, 
+	0x19, 0x09, 0x31, 0x80, 0x68, 0x49, 0x00, 0x42, 
+	0x68, 0x3b, 0x18, 0xd2, 0x83, 0x91, 0x30, 0x01, 
+	0x28, 0x01, 0xdd, 0xf4, 0xe0, 0x79, 0xe0, 0x73, 
+	0x20, 0x02, 0x00, 0x81, 0x19, 0x09, 0x31, 0x80, 
+	0x68, 0x49, 0x00, 0x42, 0x68, 0x3b, 0x18, 0xd2, 
+	0x3a, 0x40, 0x87, 0x91, 0x30, 0x01, 0x28, 0x05, 
+	0xdd, 0xf3, 0x20, 0x09, 0x00, 0x81, 0x19, 0x09, 
+	0x31, 0x80, 0x68, 0x49, 0x00, 0x42, 0x68, 0x3b, 
+	0x18, 0xd2, 0x3a, 0x40, 0x86, 0xd1, 0x30, 0x01, 
+	0x28, 0x0f, 0xdd, 0xf3, 0x20, 0x11, 0x00, 0x81, 
+	0x19, 0x09, 0x31, 0x80, 0x68, 0x49, 0x00, 0x42, 
+	0x68, 0x3b, 0x18, 0xd2, 0x3a, 0x40, 0x86, 0x91, 
+	0x30, 0x01, 0x28, 0x13, 0xdd, 0xf3, 0xe0, 0x50, 
+	0x22, 0x00, 0x21, 0x00, 0x20, 0x01, 0x02, 0xc0, 
+	0xf7, 0xff, 0xfe, 0x48, 0x6f, 0xb8, 0x49, 0x2a, 
+	0x80, 0x08, 0xe0, 0x46, 0x46, 0x68, 0xf0, 0x15, 
+	0xff, 0xa7, 0x98, 0x00, 0x0c, 0x00, 0x68, 0x39, 
+	0x80, 0x08, 0x98, 0x00, 0x68, 0x39, 0x80, 0x48, 
+	0x98, 0x01, 0x0c, 0x00, 0x68, 0x39, 0x80, 0x88, 
+	0x98, 0x01, 0x68, 0x39, 0x80, 0xc8, 0x98, 0x02, 
+	0x0c, 0x00, 0x68, 0x39, 0x81, 0x08, 0x98, 0x02, 
+	0x68, 0x39, 0x81, 0x48, 0x20, 0x01, 0x68, 0x39, 
+	0x81, 0x88, 0x48, 0x1c, 0x68, 0x39, 0x81, 0xc8, 
+	0x48, 0x1b, 0x68, 0x01, 0x14, 0x09, 0x68, 0x3a, 
+	0x82, 0x11, 0x68, 0x00, 0x68, 0x39, 0x82, 0x48, 
+	0xe0, 0x1f, 0x20, 0x19, 0x06, 0x80, 0x6b, 0x80, 
+	0x06, 0x00, 0x0e, 0x00, 0x68, 0x39, 0x80, 0x08, 
+	0xe0, 0x17, 0x68, 0x38, 0x88, 0x01, 0x04, 0x09, 
+	0x88, 0x40, 0x18, 0x08, 0x68, 0x00, 0x90, 0x03, 
+	0x14, 0x00, 0x68, 0x39, 0x80, 0x08, 0x98, 0x03, 
+	0x68, 0x39, 0x80, 0x48, 0xe0, 0x09, 0x48, 0x0d, 
+	0x68, 0x00, 0x68, 0x39, 0x80, 0x08, 0xe0, 0x04, 
+	0x1d, 0xf8, 0x30, 0x39, 0x8e, 0x81, 0x31, 0x01, 
+	0x86, 0x81, 0xb0, 0x04, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x00, 0xfc, 
+	0x2e, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x03, 0xc4, 
+	0x2c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x02, 
+	0x2e, 0x08, 0x05, 0x74, 0x2e, 0x08, 0x00, 0x58, 
+	0xb5, 0x80, 0x4f, 0x53, 0x6d, 0x78, 0x6d, 0x39, 
+	0x42, 0x81, 0xd0, 0x59, 0x88, 0x81, 0x06, 0x09, 
+	0x0e, 0x09, 0x29, 0x12, 0xd2, 0x55, 0xa3, 0x02, 
+	0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x09, 0x10, 0x1a, 0x14, 0x20, 0x52, 0x24, 0x2f, 
+	0x3a, 0x45, 0x56, 0x60, 0x67, 0x6c, 0x70, 0x74, 
+	0x7a, 0x81, 0x89, 0xc3, 0x89, 0x82, 0x89, 0x41, 
+	0x89, 0x00, 0xf0, 0x0b, 0xfe, 0x91, 0xe0, 0x72, 
+	0x89, 0x00, 0xf0, 0x0b, 0xfe, 0x75, 0xe0, 0x6e, 
+	0x89, 0x82, 0x89, 0x41, 0x89, 0x00, 0xf0, 0x0b, 
+	0xff, 0x4f, 0xe0, 0x68, 0x89, 0x82, 0x89, 0x41, 
+	0x89, 0x00, 0xf0, 0x0b, 0xfe, 0xf7, 0xe0, 0x62, 
+	0x89, 0x00, 0xf0, 0x0b, 0xff, 0x8d, 0xe0, 0x5e, 
+	0x8a, 0x42, 0x8a, 0x01, 0xb4, 0x06, 0x89, 0xc3, 
+	0x89, 0x82, 0x89, 0x41, 0x89, 0x00, 0xf0, 0x0c, 
+	0xf8, 0x11, 0xb0, 0x02, 0xe0, 0x53, 0x8a, 0x42, 
+	0x8a, 0x01, 0xb4, 0x06, 0x89, 0xc3, 0x89, 0x82, 
+	0x89, 0x41, 0x89, 0x00, 0xf0, 0x0c, 0xf8, 0x58, 
+	0xb0, 0x02, 0xe0, 0x48, 0x89, 0x83, 0x89, 0x42, 
+	0x89, 0x00, 0x49, 0x2e, 0xf0, 0x0c, 0xf9, 0x99, 
+	0x21, 0x00, 0x48, 0x2c, 0xf7, 0xff, 0xfc, 0x7e, 
+	0xe0, 0x3d, 0x89, 0xc1, 0x04, 0x0b, 0x14, 0x1b, 
+	0x89, 0x81, 0x04, 0x0a, 0x14, 0x12, 0x89, 0x41, 
+	0x89, 0x00, 0xf0, 0x0c, 0xf9, 0xb9, 0xe0, 0x32, 
+	0xe0, 0x43, 0xe0, 0x30, 0x89, 0x00, 0xf0, 0x0b, 
+	0xff, 0x6b, 0xe0, 0x2c, 0x89, 0xc1, 0x04, 0x09, 
+	0x8a, 0x02, 0x18, 0x8b, 0x89, 0x82, 0x89, 0x41, 
+	0x89, 0x00, 0xf0, 0x0c, 0xf9, 0xf1, 0xe0, 0x22, 
+	0x89, 0xc3, 0x89, 0x82, 0x89, 0x41, 0x89, 0x00, 
+	0xf0, 0x0c, 0xfa, 0x1c, 0xe0, 0x1b, 0x89, 0x41, 
+	0x89, 0x00, 0xf0, 0x0b, 0xff, 0x8d, 0xe0, 0x16, 
+	0x89, 0x00, 0xf0, 0x0b, 0xff, 0xa7, 0xe0, 0x12, 
+	0x89, 0x00, 0xf0, 0x0b, 0xff, 0xb7, 0xe0, 0x0e, 
+	0x89, 0x82, 0x89, 0x41, 0x89, 0x00, 0xf0, 0x0c, 
+	0xfa, 0x9b, 0xe0, 0x08, 0x89, 0xc3, 0x89, 0x82, 
+	0x89, 0x41, 0x89, 0x00, 0xf0, 0x0c, 0xfb, 0x34, 
+	0xe0, 0x01, 0xf0, 0x0c, 0xfb, 0xcb, 0x6d, 0x78, 
+	0x88, 0xc0, 0x6c, 0x39, 0x1a, 0x08, 0x64, 0x38, 
+	0x6c, 0x79, 0x1a, 0x08, 0x28, 0x28, 0xdb, 0x05, 
+	0x48, 0x07, 0x88, 0x01, 0x23, 0x10, 0x43, 0xdb, 
+	0x40, 0x19, 0x80, 0x01, 0x6d, 0x78, 0x68, 0x00, 
+	0x65, 0x78, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x03, 0xc4, 0x2c, 0x00, 0x01, 0x20, 
+	0x2c, 0x00, 0x00, 0xf8, 0xb5, 0x80, 0x06, 0x00, 
+	0x0e, 0x00, 0x06, 0x09, 0x0e, 0x09, 0x89, 0xd7, 
+	0x23, 0xc7, 0x40, 0x7b, 0x81, 0xd3, 0x4b, 0x06, 
+	0x6f, 0xdf, 0x37, 0x01, 0x67, 0xdf, 0x2f, 0x28, 
+	0xda, 0x03, 0x4b, 0x04, 0x68, 0x1b, 0xf0, 0x1a, 
+	0xfb, 0xf5, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x03, 0xc4, 0x2e, 0x08, 0x01, 0x94, 
+	0xb5, 0x90, 0x4f, 0x5d, 0x6e, 0xf8, 0x6e, 0xb9, 
+	0x42, 0x81, 0xd0, 0x5c, 0x88, 0x81, 0x0a, 0x0a, 
+	0x2a, 0x0a, 0xd2, 0x59, 0xa3, 0x01, 0x5c, 0x9b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x99, 0x04, 0x3e, 0x99, 
+	0x99, 0x44, 0x99, 0x99, 0x6c, 0x72, 0x06, 0x09, 
+	0x0e, 0x09, 0x24, 0x00, 0x29, 0x0c, 0xd2, 0x4b, 
+	0xa3, 0x01, 0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x1e, 0x0a, 0x14, 0x2b, 0x8b, 0x8b, 0x8b, 0x8b, 
+	0x8b, 0x28, 0x8b, 0x05, 0x68, 0x38, 0x88, 0x00, 
+	0xf0, 0x03, 0xf8, 0xde, 0xe0, 0x80, 0x22, 0x00, 
+	0xb4, 0x04, 0x89, 0x01, 0x1c, 0x23, 0x4a, 0x49, 
+	0x1e, 0x50, 0xf7, 0xfc, 0xfd, 0xe9, 0xb0, 0x01, 
+	0xe0, 0x76, 0x22, 0x00, 0xb4, 0x04, 0x89, 0x02, 
+	0x1c, 0x23, 0x49, 0x44, 0x1e, 0x48, 0xf7, 0xfc, 
+	0xfd, 0xdf, 0xb0, 0x01, 0xe0, 0x6c, 0x8a, 0x02, 
+	0xb4, 0x04, 0x89, 0xc3, 0x89, 0x82, 0x89, 0x41, 
+	0x89, 0x00, 0xf7, 0xfc, 0xfd, 0xd5, 0xb0, 0x01, 
+	0xe0, 0x62, 0xf7, 0xfc, 0xfd, 0x9d, 0xe0, 0x5f, 
+	0x21, 0x18, 0x20, 0x14, 0xf7, 0xfe, 0xfd, 0xea, 
+	0xe0, 0x5a, 0x06, 0x09, 0xd1, 0x58, 0x89, 0x00, 
+	0xf7, 0xfc, 0xff, 0x76, 0xe0, 0x54, 0x06, 0x09, 
+	0x0e, 0x09, 0x29, 0x06, 0xd2, 0x0c, 0xa3, 0x02, 
+	0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x03, 0x09, 0x0d, 0x11, 0x15, 0x19, 0x89, 0x00, 
+	0xf7, 0xfe, 0xf8, 0xaa, 0xe0, 0x44, 0xe0, 0x54, 
+	0xe0, 0x42, 0x89, 0x00, 0xf7, 0xfe, 0xf8, 0xca, 
+	0xe0, 0x3e, 0x89, 0x00, 0xf7, 0xfe, 0xf9, 0x58, 
+	0xe0, 0x3a, 0x89, 0x00, 0xf7, 0xfe, 0xfa, 0x3c, 
+	0xe0, 0x36, 0x89, 0x00, 0xf7, 0xfe, 0xfa, 0x6e, 
+	0xe0, 0x32, 0x89, 0x00, 0x06, 0x00, 0x0e, 0x00, 
+	0xf7, 0xfe, 0xfa, 0x4a, 0xe0, 0x2c, 0x06, 0x08, 
+	0xd1, 0x2a, 0x6f, 0xb8, 0x30, 0x01, 0x67, 0xb8, 
+	0xe0, 0x26, 0x06, 0x09, 0x0e, 0x09, 0x29, 0x08, 
+	0xd2, 0x22, 0xa3, 0x02, 0x5c, 0x5b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x0c, 0x08, 0x0f, 
+	0x12, 0x16, 0x19, 0x1c, 0x89, 0x00, 0xf0, 0x01, 
+	0xf9, 0x93, 0xe0, 0x15, 0x89, 0x00, 0xf0, 0x01, 
+	0xf9, 0xbb, 0xe0, 0x11, 0xf0, 0x01, 0xfa, 0x06, 
+	0xe0, 0x0e, 0xf0, 0x01, 0xfa, 0x5d, 0xe0, 0x0b, 
+	0x89, 0x00, 0xf0, 0x01, 0xfa, 0xe1, 0xe0, 0x07, 
+	0xf0, 0x01, 0xfb, 0x1a, 0xe0, 0x04, 0xf0, 0x01, 
+	0xfb, 0x33, 0xe0, 0x01, 0xf0, 0x01, 0xfa, 0x90, 
+	0x6e, 0xf8, 0x88, 0xc0, 0x6d, 0xb9, 0x1a, 0x08, 
+	0x65, 0xb8, 0x6d, 0xf9, 0x1a, 0x08, 0x28, 0x28, 
+	0xdb, 0x04, 0x48, 0x07, 0x88, 0x01, 0x08, 0x49, 
+	0x00, 0x49, 0x80, 0x01, 0x6e, 0xf8, 0x68, 0x00, 
+	0x66, 0xf8, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x03, 0xc4, 0x00, 0x00, 0xff, 0xff, 
+	0x2c, 0x00, 0x00, 0xf8, 0xb5, 0x80, 0x06, 0x00, 
+	0x0e, 0x00, 0x1c, 0x17, 0x28, 0x03, 0xd0, 0x0b, 
+	0x28, 0x07, 0xd0, 0x0e, 0x28, 0x08, 0xd1, 0x03, 
+	0x88, 0x38, 0xf0, 0x02, 0xfa, 0x5d, 0x80, 0x78, 
+	0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x18, 0x20, 0x14, 0xf7, 0xfe, 0xfd, 0x5e, 
+	0xe7, 0xf6, 0x88, 0x79, 0x88, 0x38, 0x1d, 0x3a, 
+	0xf0, 0x02, 0xf8, 0xce, 0x49, 0x01, 0x68, 0x09, 
+	0x80, 0x08, 0xe7, 0xed, 0x2e, 0x08, 0x03, 0xc4, 
+	0x48, 0x0d, 0x6f, 0xc0, 0x28, 0x00, 0xd1, 0x0c, 
+	0x49, 0x0c, 0x60, 0x08, 0x48, 0x0c, 0x8e, 0x83, 
+	0x49, 0x0c, 0x22, 0x01, 0x2b, 0x00, 0xd0, 0x05, 
+	0x8d, 0x03, 0x86, 0x8b, 0x8d, 0x43, 0x86, 0xcb, 
+	0x87, 0x82, 0x47, 0x70, 0x8e, 0xc3, 0x2b, 0x00, 
+	0xd0, 0xfb, 0x8d, 0x83, 0x86, 0x8b, 0x8d, 0xc3, 
+	0x86, 0xcb, 0x87, 0x82, 0x47, 0x70, 0x00, 0x00, 
+	0x2c, 0x00, 0x1f, 0x80, 0x2e, 0x08, 0x04, 0x44, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x00, 0xc0, 
+	0xb5, 0x00, 0xf0, 0x00, 0xfa, 0x91, 0xf7, 0xfd, 
+	0xf9, 0x53, 0xf7, 0xfc, 0xff, 0xd7, 0xf7, 0xfd, 
+	0xfa, 0x53, 0xf0, 0x03, 0xf8, 0xb1, 0xf7, 0xff, 
+	0xff, 0xcf, 0x48, 0x16, 0x8e, 0x80, 0x28, 0x00, 
+	0xd1, 0x21, 0x48, 0x15, 0x6f, 0xc0, 0x28, 0x00, 
+	0xd1, 0x13, 0x48, 0x14, 0x78, 0x00, 0x28, 0x00, 
+	0xd0, 0x0f, 0xb0, 0x82, 0x46, 0x69, 0xa8, 0x01, 
+	0xf0, 0x01, 0xfa, 0xd8, 0xa8, 0x01, 0x78, 0x00, 
+	0x28, 0x32, 0xda, 0x05, 0xa8, 0x00, 0x78, 0x00, 
+	0x28, 0x32, 0xda, 0x01, 0xf0, 0x07, 0xf9, 0xb0, 
+	0xb0, 0x02, 0x48, 0x0b, 0x69, 0xc0, 0x08, 0xc0, 
+	0xd3, 0x07, 0x48, 0x0a, 0x6c, 0x00, 0x28, 0x00, 
+	0xd0, 0x03, 0xf7, 0xff, 0xfd, 0xfd, 0xbc, 0x08, 
+	0x47, 0x18, 0xf7, 0xff, 0xfe, 0xc1, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2c, 0x00, 0x1f, 0x80, 0x2e, 0x08, 0x1a, 0x94, 
+	0x72, 0x00, 0x01, 0x00, 0x2e, 0x08, 0x03, 0xc4, 
+	0xb4, 0x80, 0x02, 0x4f, 0x4b, 0x07, 0x40, 0x3b, 
+	0x43, 0x1a, 0x23, 0x19, 0x06, 0x9b, 0x62, 0x9a, 
+	0x0a, 0x49, 0x02, 0x49, 0x08, 0x49, 0x07, 0xc0, 
+	0x43, 0x08, 0x49, 0x03, 0x68, 0x09, 0x60, 0x08, 
+	0xbc, 0x80, 0x47, 0x70, 0x00, 0x03, 0xfe, 0x00, 
+	0x2e, 0x08, 0x9b, 0xa4, 0xb4, 0x90, 0x4b, 0x0c, 
+	0x68, 0x1f, 0x68, 0x3f, 0x0f, 0xff, 0x60, 0x07, 
+	0x68, 0x18, 0x68, 0x00, 0x00, 0x40, 0x0a, 0x47, 
+	0x02, 0x7f, 0x20, 0x19, 0x06, 0x80, 0x6a, 0x84, 
+	0x4b, 0x06, 0x40, 0x23, 0x0a, 0x5b, 0x43, 0x3b, 
+	0x60, 0x0b, 0x6a, 0x80, 0x05, 0xc0, 0x0d, 0xc0, 
+	0x60, 0x10, 0xbc, 0x90, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xa4, 0x00, 0x03, 0xfe, 0x00, 
+	0xb5, 0x00, 0x49, 0x1d, 0x62, 0xc8, 0x28, 0x00, 
+	0xd0, 0x11, 0x28, 0x01, 0xd0, 0x1b, 0x28, 0x02, 
+	0xd0, 0x25, 0x28, 0x03, 0xd1, 0x09, 0x48, 0x19, 
+	0x68, 0x01, 0x08, 0x49, 0x00, 0x49, 0x60, 0x01, 
+	0x22, 0x01, 0x21, 0x01, 0x20, 0x00, 0xf0, 0x10, 
+	0xfd, 0x47, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x13, 
+	0x68, 0x01, 0x08, 0x49, 0x00, 0x49, 0x60, 0x01, 
+	0x48, 0x11, 0x68, 0x01, 0x04, 0x03, 0x43, 0x19, 
+	0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x0d, 
+	0x68, 0x01, 0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 
+	0x48, 0x0b, 0x68, 0x01, 0x4b, 0x0b, 0x40, 0x19, 
+	0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x07, 
+	0x68, 0x01, 0x08, 0x49, 0x00, 0x49, 0x60, 0x01, 
+	0x22, 0x00, 0x21, 0x00, 0x20, 0x00, 0xf0, 0x10, 
+	0xfd, 0x23, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0xc8, 0x6a, 0x00, 0x00, 0x18, 
+	0x6c, 0x00, 0x00, 0x20, 0xff, 0xdf, 0xff, 0xff, 
+	0xb5, 0x90, 0x48, 0x11, 0x6c, 0xc1, 0x6c, 0x80, 
+	0x1a, 0x0f, 0x48, 0x10, 0xd5, 0x01, 0x69, 0x01, 
+	0x18, 0x7f, 0x69, 0x00, 0x10, 0x80, 0x4c, 0x0e, 
+	0x42, 0xb8, 0xda, 0x0b, 0x68, 0xe0, 0x28, 0x00, 
+	0xd1, 0x08, 0x48, 0x0c, 0x68, 0x01, 0x23, 0x02, 
+	0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 0x20, 0x02, 
+	0xf0, 0x10, 0xf8, 0xc4, 0x2f, 0x00, 0xd1, 0x04, 
+	0x20, 0x01, 0x61, 0xe0, 0x6b, 0xa0, 0x30, 0x01, 
+	0x63, 0xa0, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x66, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x04, 0x48, 
+	0x2e, 0x08, 0x04, 0xc8, 0x6c, 0x00, 0x00, 0x20, 
+	0xb5, 0x00, 0x20, 0x03, 0xf0, 0x10, 0xf8, 0xae, 
+	0x20, 0x1e, 0xf0, 0x0d, 0xf8, 0xab, 0x23, 0x03, 
+	0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 
+	0x20, 0x1e, 0xf0, 0x0c, 0xfe, 0x59, 0x22, 0x00, 
+	0xb4, 0x04, 0x23, 0x02, 0x22, 0x02, 0x49, 0x07, 
+	0x20, 0x1e, 0xf0, 0x0c, 0xfc, 0x8d, 0x23, 0x01, 
+	0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 0x20, 0x1e, 
+	0xb0, 0x01, 0xf0, 0x0c, 0xfe, 0x49, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 
+	0xb5, 0x00, 0x21, 0x00, 0x20, 0x0e, 0xf0, 0x12, 
+	0xfc, 0x23, 0x20, 0x1f, 0xf0, 0x0c, 0xff, 0xbc, 
+	0x23, 0x03, 0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 
+	0x21, 0x02, 0x20, 0x1f, 0xf0, 0x0c, 0xfe, 0x34, 
+	0x20, 0x00, 0xf0, 0x0f, 0xff, 0x19, 0x22, 0x00, 
+	0xb4, 0x04, 0x23, 0x01, 0x22, 0x02, 0x49, 0x07, 
+	0x20, 0x1f, 0xf0, 0x0c, 0xfc, 0x65, 0x23, 0x01, 
+	0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 0x20, 0x1f, 
+	0xb0, 0x01, 0xf0, 0x0c, 0xfe, 0x21, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 
+	0xb5, 0x80, 0x20, 0x0f, 0x02, 0x40, 0x4f, 0x0a, 
+	0x61, 0x38, 0x49, 0x0a, 0x6c, 0x89, 0x61, 0x79, 
+	0xf0, 0x01, 0xfe, 0x42, 0x1d, 0xf9, 0x31, 0x79, 
+	0x61, 0x08, 0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 
+	0x61, 0xf8, 0x62, 0x38, 0x64, 0xf8, 0x20, 0xff, 
+	0x72, 0x08, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0x48, 0x66, 0x00, 0x00, 0x80, 
+	0xb5, 0x80, 0x4f, 0x05, 0x69, 0x38, 0x28, 0x00, 
+	0xd0, 0x03, 0xf0, 0x01, 0xfe, 0x4b, 0x20, 0x00, 
+	0x61, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0xc8, 0xb5, 0x00, 0x4a, 0x0d, 
+	0xb4, 0x04, 0x1f, 0x10, 0x1e, 0x51, 0x1c, 0x13, 
+	0xf7, 0xfc, 0xfb, 0xaa, 0x21, 0x33, 0x06, 0x49, 
+	0x6d, 0x88, 0x6d, 0x4a, 0x1a, 0x82, 0xb0, 0x01, 
+	0x48, 0x07, 0x62, 0x42, 0x6d, 0x49, 0x62, 0xc1, 
+	0x21, 0x00, 0x65, 0x81, 0x21, 0x01, 0x02, 0xc9, 
+	0x64, 0x41, 0x21, 0x01, 0x30, 0x60, 0x76, 0x01, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x04, 0x48, 0xb5, 0x00, 0x4a, 0x10, 
+	0xb4, 0x04, 0x1c, 0x13, 0x3a, 0x01, 0x49, 0x0f, 
+	0x1e, 0xc8, 0xf7, 0xfc, 0xfb, 0x89, 0x21, 0x33, 
+	0x06, 0x49, 0x6d, 0x88, 0x6d, 0x4a, 0x1a, 0x82, 
+	0xb0, 0x01, 0x48, 0x0b, 0x62, 0x42, 0x6d, 0x49, 
+	0x62, 0xc1, 0x21, 0x00, 0x65, 0x81, 0x21, 0x01, 
+	0x02, 0xc9, 0x64, 0x41, 0x21, 0x01, 0x30, 0x60, 
+	0x76, 0x01, 0x48, 0x06, 0x23, 0x02, 0x68, 0x01, 
+	0x43, 0x19, 0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xfe, 
+	0x2e, 0x08, 0x04, 0x48, 0x2e, 0x08, 0x00, 0x04, 
+	0x48, 0x03, 0x23, 0x02, 0x43, 0xdb, 0x68, 0x01, 
+	0x40, 0x19, 0x60, 0x01, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x00, 0x04, 0xb5, 0xf0, 0x20, 0x0f, 
+	0x02, 0x40, 0x4c, 0x11, 0x61, 0x20, 0x20, 0x00, 
+	0xf7, 0xfc, 0xfc, 0xf6, 0x48, 0x0f, 0xf7, 0xfc, 
+	0xfc, 0xf3, 0x26, 0x00, 0x1d, 0xe0, 0x30, 0x59, 
+	0x77, 0x06, 0x25, 0xff, 0x1d, 0xe7, 0x37, 0x79, 
+	0x70, 0x3d, 0x20, 0x01, 0x63, 0x78, 0x60, 0xe6, 
+	0x69, 0x78, 0x28, 0x00, 0xd1, 0x04, 0x20, 0x41, 
+	0x01, 0x40, 0xf0, 0x01, 0xfd, 0xb1, 0x61, 0x78, 
+	0x69, 0x78, 0x28, 0x00, 0xd0, 0x01, 0x76, 0x3e, 
+	0x70, 0x3d, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0x48, 0x00, 0x00, 0x1f, 0xff, 
+	0xb5, 0x00, 0x20, 0x00, 0xf7, 0xfd, 0xff, 0xdc, 
+	0x22, 0x00, 0xb4, 0x04, 0x23, 0x00, 0x4a, 0x06, 
+	0x21, 0x00, 0x20, 0x00, 0xf7, 0xfc, 0xfb, 0x28, 
+	0x21, 0x00, 0x20, 0x0d, 0xb0, 0x01, 0xf0, 0x12, 
+	0xfb, 0x47, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x00, 0x00, 0xff, 0xff, 0xb5, 0x80, 0x22, 0x00, 
+	0xb4, 0x04, 0x27, 0x00, 0x1c, 0x3b, 0x4a, 0x17, 
+	0x21, 0x00, 0x20, 0x00, 0xf7, 0xfc, 0xfb, 0x14, 
+	0x22, 0x00, 0xb0, 0x01, 0xb4, 0x04, 0x1c, 0x3b, 
+	0x4a, 0x12, 0x49, 0x13, 0x20, 0x00, 0xf7, 0xfc, 
+	0xfb, 0x0b, 0x21, 0x33, 0x06, 0x49, 0x6d, 0x88, 
+	0x6d, 0x4a, 0x1a, 0x82, 0xb0, 0x01, 0x48, 0x0f, 
+	0x62, 0x42, 0x6d, 0x49, 0x63, 0x01, 0x21, 0x01, 
+	0x02, 0xc9, 0x64, 0x81, 0x21, 0x01, 0x65, 0x87, 
+	0x30, 0x60, 0x76, 0x01, 0x77, 0x07, 0x22, 0x00, 
+	0x21, 0x00, 0x20, 0x00, 0xf7, 0xff, 0xfe, 0x28, 
+	0x20, 0x00, 0xf7, 0xff, 0xfe, 0x59, 0x21, 0x00, 
+	0x20, 0x0d, 0xf0, 0x12, 0xfb, 0x11, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 
+	0x00, 0x00, 0x1f, 0xfe, 0x2e, 0x08, 0x04, 0x48, 
+	0xb5, 0xf0, 0x06, 0x05, 0x0e, 0x2d, 0x20, 0x0f, 
+	0x02, 0x40, 0x4f, 0x2f, 0x26, 0x33, 0x06, 0x76, 
+	0x61, 0x38, 0x6d, 0xb0, 0x6d, 0x71, 0x1a, 0x40, 
+	0x62, 0x78, 0x62, 0xb8, 0x20, 0x00, 0x1d, 0xfc, 
+	0x34, 0x79, 0x60, 0xe0, 0x2d, 0x00, 0xd0, 0x02, 
+	0x20, 0xff, 0xf7, 0xfd, 0xff, 0x79, 0x22, 0x00, 
+	0xb4, 0x04, 0x23, 0x00, 0x21, 0x00, 0x20, 0x00, 
+	0xf7, 0xfc, 0xfa, 0xc6, 0x22, 0x01, 0x21, 0x01, 
+	0x20, 0x00, 0xb0, 0x01, 0xf0, 0x10, 0xfb, 0x84, 
+	0x21, 0x00, 0x20, 0x00, 0xf0, 0x10, 0xfc, 0x44, 
+	0x22, 0x00, 0xb4, 0x04, 0x23, 0x00, 0x4a, 0x1d, 
+	0x20, 0x00, 0x1e, 0x51, 0xf7, 0xfc, 0xfa, 0xb4, 
+	0x20, 0x01, 0x63, 0x60, 0x69, 0x60, 0xb0, 0x01, 
+	0x28, 0x00, 0xd1, 0x04, 0x20, 0x41, 0x01, 0x40, 
+	0xf0, 0x01, 0xfd, 0x1a, 0x61, 0x60, 0x69, 0x60, 
+	0x28, 0x00, 0xd0, 0x03, 0x20, 0x00, 0x76, 0x20, 
+	0x20, 0xff, 0x70, 0x20, 0x6d, 0x70, 0x63, 0x38, 
+	0x20, 0x01, 0x02, 0xc0, 0x64, 0xb8, 0x20, 0x00, 
+	0x26, 0x01, 0x65, 0xb8, 0x1d, 0xf9, 0x31, 0x59, 
+	0x76, 0x0e, 0x22, 0x00, 0x21, 0x00, 0x20, 0x00, 
+	0xf7, 0xff, 0xfd, 0xc6, 0x21, 0x00, 0x20, 0x0d, 
+	0xf0, 0x12, 0xfa, 0xb2, 0x20, 0x00, 0x60, 0xf8, 
+	0x2d, 0x00, 0xd1, 0x02, 0xf7, 0xff, 0xfd, 0xf0, 
+	0x61, 0xe6, 0x20, 0x00, 0x60, 0xb8, 0x66, 0x38, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0x48, 0x00, 0x00, 0x1f, 0xff, 
+	0xb5, 0xb0, 0x4f, 0x44, 0x25, 0x00, 0x6d, 0x38, 
+	0x4c, 0x43, 0x28, 0x05, 0xd2, 0x14, 0xa3, 0x02, 
+	0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x10, 0x03, 0x2e, 0x62, 0x70, 0x00, 0x4d, 0x3f, 
+	0x68, 0x28, 0x08, 0x41, 0xd2, 0x08, 0x08, 0xc0, 
+	0xd3, 0x09, 0xf7, 0xff, 0xfe, 0xb3, 0x23, 0x04, 
+	0x43, 0xdb, 0x68, 0x28, 0x40, 0x18, 0x60, 0x28, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x6d, 0x78, 
+	0x28, 0x00, 0xd0, 0xf9, 0x28, 0x01, 0xd0, 0x01, 
+	0x28, 0x05, 0xd1, 0x06, 0xf0, 0x00, 0xf8, 0x6a, 
+	0x8e, 0xa0, 0x28, 0x00, 0xd1, 0xf0, 0xf0, 0x00, 
+	0xf9, 0x27, 0x6d, 0x78, 0x28, 0x04, 0xd0, 0x01, 
+	0x28, 0x05, 0xd1, 0xe9, 0x8e, 0xa0, 0x28, 0x00, 
+	0xd1, 0xe6, 0xf0, 0x00, 0xfa, 0x49, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x8e, 0xe0, 0x28, 0x00, 
+	0xd1, 0xde, 0x8d, 0xa0, 0x06, 0x00, 0x0e, 0x00, 
+	0x28, 0x06, 0xd1, 0x12, 0x48, 0x26, 0x78, 0x00, 
+	0x28, 0x00, 0xd0, 0x06, 0x6d, 0x78, 0x28, 0x01, 
+	0xd0, 0x01, 0x28, 0x05, 0xd1, 0x01, 0xf0, 0x00, 
+	0xfc, 0xc3, 0x6d, 0x78, 0x28, 0x04, 0xd0, 0x01, 
+	0x28, 0x05, 0xd1, 0x01, 0xf0, 0x00, 0xfc, 0x2c, 
+	0x85, 0xa5, 0x8d, 0xa0, 0x28, 0x00, 0xd1, 0xc3, 
+	0x6d, 0x78, 0x28, 0x01, 0xd0, 0x08, 0x28, 0x04, 
+	0xd0, 0x0b, 0x28, 0x05, 0xd1, 0xbc, 0xf0, 0x00, 
+	0xfd, 0xdd, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0xf0, 0x00, 0xfd, 0xb2, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0xf0, 0x00, 0xfd, 0x81, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x8e, 0xe0, 0x28, 0x00, 
+	0xd1, 0xaa, 0x20, 0x06, 0x85, 0xa0, 0x85, 0xe5, 
+	0x20, 0x09, 0x02, 0x40, 0x86, 0xe0, 0x20, 0x04, 
+	0x65, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x8e, 0xe0, 0x28, 0x00, 0xd1, 0x9c, 0x8d, 0xa0, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x06, 0xd1, 0x97, 
+	0x85, 0xa5, 0x65, 0x3d, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x48, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x00, 0x04, 
+	0x2e, 0x08, 0x04, 0xc8, 0xb5, 0xb0, 0x48, 0x46, 
+	0x6c, 0xc1, 0x4c, 0x46, 0x64, 0x21, 0x69, 0x60, 
+	0x1a, 0x09, 0x1d, 0xe7, 0x37, 0x79, 0x63, 0xf9, 
+	0x29, 0x00, 0xda, 0x02, 0x69, 0x22, 0x18, 0x89, 
+	0x63, 0xf9, 0x23, 0xff, 0x6b, 0xf9, 0x33, 0x01, 
+	0x42, 0x99, 0xdb, 0x73, 0x22, 0x01, 0x03, 0x12, 
+	0x42, 0x91, 0xdd, 0x00, 0x63, 0xfa, 0x6b, 0xf9, 
+	0x08, 0x89, 0x00, 0x89, 0x63, 0xf9, 0x7a, 0x3a, 
+	0x2a, 0x00, 0xd0, 0x05, 0x23, 0xff, 0x03, 0x5b, 
+	0x1a, 0xc2, 0x61, 0xe2, 0x22, 0x00, 0x72, 0x3a, 
+	0x18, 0x42, 0x49, 0x35, 0x25, 0x12, 0x42, 0x8a, 
+	0xdd, 0x2c, 0x1a, 0x08, 0x64, 0x38, 0xf0, 0x1f, 
+	0xfb, 0x53, 0x4b, 0x32, 0x40, 0x18, 0xf0, 0x1f, 
+	0xfb, 0x53, 0x22, 0x00, 0x49, 0x30, 0xb4, 0x06, 
+	0x69, 0x60, 0x69, 0x39, 0x18, 0x41, 0x23, 0xff, 
+	0x03, 0x5b, 0x1a, 0xc9, 0x23, 0x0d, 0x06, 0x9b, 
+	0x1a, 0xc0, 0x6c, 0x3a, 0x1c, 0x2b, 0xf0, 0x14, 
+	0xfc, 0x21, 0x22, 0x00, 0xb0, 0x02, 0x49, 0x28, 
+	0xb4, 0x06, 0x6b, 0xf8, 0x6c, 0x39, 0x1a, 0x42, 
+	0x69, 0x39, 0x1c, 0x2b, 0x48, 0x25, 0xf0, 0x14, 
+	0xfc, 0x15, 0xb0, 0x02, 0xf0, 0x1f, 0xfb, 0x30, 
+	0x23, 0x01, 0x04, 0x9b, 0x43, 0x18, 0xf0, 0x1f, 
+	0xfb, 0x2f, 0xe0, 0x1d, 0xf0, 0x1f, 0xfb, 0x28, 
+	0x4b, 0x1c, 0x40, 0x18, 0xf0, 0x1f, 0xfb, 0x28, 
+	0x22, 0x00, 0x49, 0x1b, 0xb4, 0x06, 0x69, 0x60, 
+	0x69, 0x39, 0x18, 0x41, 0x23, 0xff, 0x03, 0x5b, 
+	0x1a, 0xc9, 0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 
+	0x6b, 0xfa, 0x1c, 0x2b, 0xf0, 0x14, 0xfb, 0xf6, 
+	0xb0, 0x02, 0xf0, 0x1f, 0xfb, 0x11, 0x23, 0x01, 
+	0x04, 0x9b, 0x43, 0x18, 0xf0, 0x1f, 0xfb, 0x10, 
+	0x69, 0x60, 0x6b, 0xf9, 0x18, 0x40, 0x23, 0x0d, 
+	0x06, 0x9b, 0x1a, 0xc1, 0x61, 0x60, 0x4b, 0x0e, 
+	0x42, 0x99, 0xd3, 0x02, 0x69, 0x21, 0x1a, 0x40, 
+	0x61, 0x60, 0x23, 0xff, 0x03, 0x5b, 0x69, 0x60, 
+	0x1a, 0xc0, 0xe0, 0x00, 0xe0, 0x00, 0x62, 0x20, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x04, 0x48, 
+	0x00, 0x1f, 0xfe, 0x00, 0xff, 0xfb, 0xff, 0xff, 
+	0x9e, 0x00, 0x08, 0x00, 0xcc, 0x1f, 0xe0, 0x00, 
+	0xcc, 0x1f, 0xfe, 0x00, 0x21, 0x00, 0x23, 0xff, 
+	0x68, 0x02, 0x33, 0xc1, 0x42, 0x9a, 0xd0, 0x01, 
+	0x1c, 0x08, 0x47, 0x70, 0x79, 0xc2, 0x0a, 0x12, 
+	0xd2, 0x01, 0x1c, 0x08, 0x47, 0x70, 0x7a, 0x41, 
+	0x23, 0x0e, 0x40, 0x19, 0x07, 0x49, 0x7a, 0x82, 
+	0x05, 0x92, 0x43, 0x11, 0x7a, 0xc2, 0x23, 0xfe, 
+	0x40, 0x1a, 0x03, 0x92, 0x43, 0x11, 0x7b, 0x02, 
+	0x01, 0xd2, 0x43, 0x11, 0x7b, 0x40, 0x40, 0x18, 
+	0x08, 0x40, 0x43, 0x08, 0x49, 0x01, 0x67, 0x08, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x48, 
+	0xb5, 0xf0, 0xb0, 0x86, 0x4c, 0x8c, 0x6c, 0xe0, 
+	0x1d, 0xe7, 0x37, 0x79, 0x1d, 0xfd, 0x35, 0x39, 
+	0x28, 0x00, 0xd0, 0x04, 0x28, 0x01, 0xd0, 0x3a, 
+	0x28, 0x02, 0xd1, 0x73, 0xe0, 0x74, 0x69, 0xe0, 
+	0x6a, 0x21, 0x1a, 0x09, 0x63, 0xf9, 0x1c, 0x0a, 
+	0xd5, 0x02, 0x69, 0x21, 0x18, 0x51, 0x63, 0xf9, 
+	0x6b, 0xf9, 0x29, 0x04, 0xdb, 0x67, 0x69, 0x3e, 
+	0x5c, 0x31, 0x06, 0x0a, 0x65, 0x7a, 0x92, 0x05, 
+	0x1c, 0x41, 0x69, 0x20, 0x90, 0x04, 0xf0, 0x19, 
+	0xfe, 0xe3, 0x61, 0xe1, 0x5c, 0x70, 0x04, 0x00, 
+	0x9a, 0x05, 0x18, 0x82, 0x65, 0x7a, 0x92, 0x03, 
+	0x98, 0x04, 0x31, 0x01, 0xf0, 0x19, 0xfe, 0xd8, 
+	0x61, 0xe1, 0x5c, 0x70, 0x02, 0x00, 0x9a, 0x03, 
+	0x18, 0x80, 0x65, 0x78, 0x90, 0x02, 0x98, 0x04, 
+	0x31, 0x01, 0xf0, 0x19, 0xfe, 0xcd, 0x61, 0xe1, 
+	0x5c, 0x70, 0x9a, 0x02, 0x18, 0x80, 0x65, 0x78, 
+	0x98, 0x04, 0x31, 0x01, 0xf0, 0x19, 0xfe, 0xc4, 
+	0x20, 0x01, 0x64, 0xe0, 0x61, 0xe1, 0x6a, 0x20, 
+	0x69, 0xe1, 0x1a, 0x40, 0x63, 0xf8, 0x1c, 0x01, 
+	0xd4, 0x05, 0x48, 0x67, 0x69, 0x06, 0x30, 0x80, 
+	0x69, 0x02, 0x92, 0x01, 0xe0, 0x03, 0x69, 0x20, 
+	0x18, 0x08, 0x63, 0xf8, 0xe7, 0xf5, 0x6b, 0xf8, 
+	0x90, 0x00, 0x28, 0x02, 0xdb, 0x22, 0x6d, 0x78, 
+	0x09, 0x01, 0x01, 0x09, 0x23, 0xff, 0x33, 0xc1, 
+	0x42, 0x99, 0xd1, 0x31, 0x9a, 0x01, 0x69, 0xe0, 
+	0x5c, 0x11, 0x02, 0x09, 0x83, 0x29, 0x1c, 0x41, 
+	0x1c, 0x30, 0xf0, 0x19, 0xfe, 0x9d, 0x61, 0xe1, 
+	0x69, 0x38, 0x5c, 0x40, 0x8b, 0x2a, 0x18, 0x80, 
+	0x83, 0x28, 0x8b, 0x28, 0x30, 0x06, 0x83, 0x28, 
+	0x19, 0x88, 0x1f, 0x41, 0x1c, 0x30, 0xf0, 0x19, 
+	0xfe, 0x8f, 0x61, 0xe1, 0x21, 0xff, 0x71, 0x39, 
+	0x20, 0x02, 0x64, 0xe0, 0x6c, 0xe0, 0x28, 0x02, 
+	0xd1, 0x00, 0xe0, 0x01, 0xe0, 0x94, 0xe0, 0x93, 
+	0x6a, 0x20, 0x69, 0xe1, 0x1a, 0x40, 0x63, 0xf8, 
+	0x1c, 0x01, 0xd5, 0x02, 0x69, 0x20, 0x18, 0x08, 
+	0x63, 0xf8, 0x79, 0x38, 0x28, 0x00, 0xd0, 0x13, 
+	0x20, 0x01, 0x02, 0xc0, 0x83, 0xa8, 0xe0, 0x11, 
+	0x02, 0x01, 0x65, 0x79, 0x9a, 0x01, 0x69, 0xe0, 
+	0x5c, 0x12, 0x18, 0x51, 0x65, 0x79, 0x1c, 0x41, 
+	0x1c, 0x30, 0xf0, 0x19, 0xfe, 0x69, 0x61, 0xe1, 
+	0x98, 0x00, 0x38, 0x01, 0x63, 0xf8, 0xe7, 0xb2, 
+	0x48, 0x3c, 0x83, 0xa8, 0x8b, 0x28, 0x6b, 0xf9, 
+	0x42, 0x88, 0xda, 0x01, 0x63, 0xf8, 0xe0, 0x02, 
+	0x8b, 0xa8, 0x42, 0x81, 0xdb, 0x68, 0x8b, 0xa8, 
+	0x6b, 0xf9, 0x42, 0x81, 0xdd, 0x00, 0x63, 0xf8, 
+	0x48, 0x35, 0x21, 0x00, 0x66, 0x78, 0x80, 0x01, 
+	0x30, 0x02, 0x21, 0xff, 0x31, 0xc1, 0x66, 0x78, 
+	0x80, 0x01, 0x48, 0x32, 0x66, 0x78, 0x79, 0x39, 
+	0x29, 0x00, 0xd0, 0x21, 0x21, 0x00, 0x71, 0x39, 
+	0x69, 0x3b, 0x69, 0x20, 0x18, 0x1a, 0xb4, 0x04, 
+	0x69, 0xe0, 0x18, 0x18, 0x6b, 0xfa, 0x49, 0x2a, 
+	0xf0, 0x00, 0xfe, 0xec, 0x6b, 0xf8, 0x38, 0x06, 
+	0x6e, 0x79, 0x80, 0x08, 0x31, 0x02, 0x66, 0x79, 
+	0xb0, 0x01, 0x48, 0x25, 0xf7, 0xff, 0xff, 0x02, 
+	0x8b, 0x28, 0x6b, 0xf9, 0x1a, 0x40, 0x83, 0x28, 
+	0x69, 0xe0, 0x6b, 0xf9, 0x18, 0x41, 0x69, 0x20, 
+	0xf0, 0x19, 0xfe, 0x26, 0x61, 0xe1, 0xe0, 0x26, 
+	0x6b, 0xf9, 0x31, 0x03, 0x80, 0x01, 0x48, 0x1e, 
+	0x21, 0x01, 0x03, 0xc9, 0x66, 0x78, 0x80, 0x01, 
+	0x30, 0x02, 0x21, 0xff, 0x66, 0x78, 0x80, 0x01, 
+	0x48, 0x1a, 0x66, 0x78, 0x69, 0x3b, 0x69, 0x20, 
+	0x18, 0x1a, 0xb4, 0x04, 0x69, 0xe0, 0x18, 0x18, 
+	0x6b, 0xfa, 0x49, 0x17, 0xf0, 0x00, 0xfe, 0xbe, 
+	0x8b, 0x28, 0x6b, 0xf9, 0x1a, 0x40, 0x83, 0x28, 
+	0x69, 0xe0, 0x6b, 0xfe, 0x19, 0x81, 0x69, 0x20, 
+	0xb0, 0x01, 0xf0, 0x19, 0xfe, 0x01, 0x1d, 0xf0, 
+	0x30, 0x02, 0x61, 0xe1, 0x63, 0xf8, 0x8b, 0x28, 
+	0x28, 0x00, 0xd1, 0x01, 0x21, 0x00, 0x64, 0xe0, 
+	0x21, 0x10, 0x48, 0x0c, 0x85, 0x01, 0x6b, 0xf9, 
+	0x85, 0x41, 0x21, 0x01, 0x02, 0x49, 0x86, 0x81, 
+	0xb0, 0x06, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0x48, 0x00, 0x00, 0x07, 0xf7, 
+	0x2c, 0x00, 0x02, 0x00, 0x2c, 0x00, 0x02, 0x04, 
+	0x2c, 0x00, 0x02, 0x06, 0x2c, 0x00, 0x02, 0x0a, 
+	0x2c, 0x00, 0x02, 0x09, 0x2c, 0x00, 0x1f, 0xc0, 
+	0xb5, 0xf0, 0x20, 0x33, 0x06, 0x40, 0x6e, 0x40, 
+	0xb0, 0x81, 0x4f, 0x77, 0x63, 0xb8, 0x6a, 0xf9, 
+	0x1a, 0x40, 0x1d, 0xfc, 0x34, 0x79, 0x63, 0xe0, 
+	0x28, 0x00, 0xda, 0x02, 0x6a, 0x79, 0x18, 0x40, 
+	0x63, 0xe0, 0x6b, 0xe0, 0x4b, 0x71, 0x42, 0x98, 
+	0xdc, 0x03, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x6d, 0xb9, 0x48, 0x6e, 0x1d, 0xc5, 
+	0x35, 0x59, 0x29, 0x00, 0xd1, 0x16, 0x7e, 0x01, 
+	0x29, 0x00, 0xd1, 0x13, 0x21, 0x01, 0x75, 0x01, 
+	0x21, 0x05, 0x84, 0x29, 0x23, 0x0d, 0x06, 0x9b, 
+	0x6c, 0x79, 0x1a, 0xca, 0x68, 0x52, 0x31, 0x08, 
+	0x23, 0x05, 0x02, 0x5b, 0x64, 0x79, 0x66, 0xba, 
+	0x42, 0x99, 0xdb, 0x06, 0x21, 0x01, 0x02, 0xc9, 
+	0x64, 0x79, 0xe0, 0x02, 0x21, 0x00, 0x75, 0x01, 
+	0x84, 0x29, 0x8c, 0x29, 0x1c, 0x4a, 0x6a, 0xfb, 
+	0x1a, 0x9a, 0x07, 0x92, 0x0f, 0x92, 0x18, 0x51, 
+	0x84, 0x29, 0x7e, 0x01, 0x29, 0x00, 0xd0, 0x03, 
+	0x21, 0x00, 0x66, 0x39, 0x66, 0x79, 0x76, 0x01, 
+	0x6c, 0x79, 0x4a, 0x58, 0x69, 0x52, 0x42, 0x91, 
+	0xd0, 0x26, 0x6e, 0x7a, 0x2a, 0x00, 0xd1, 0x10, 
+	0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc9, 0x68, 0x09, 
+	0x66, 0x79, 0x1c, 0x0a, 0x6e, 0x3b, 0x18, 0x59, 
+	0x66, 0x39, 0x4b, 0x51, 0x42, 0x99, 0xdb, 0x04, 
+	0x32, 0x01, 0x31, 0x01, 0x40, 0x19, 0x66, 0x39, 
+	0x66, 0x7a, 0x6e, 0x79, 0x6d, 0xba, 0x1a, 0x89, 
+	0x65, 0x21, 0x91, 0x00, 0x8c, 0x2b, 0x4e, 0x4b, 
+	0x1a, 0xf3, 0x42, 0x8b, 0xd3, 0x04, 0x63, 0xe1, 
+	0x21, 0x00, 0x65, 0xb9, 0x66, 0x79, 0xe0, 0x0a, 
+	0x18, 0xd1, 0x63, 0xe3, 0x65, 0xb9, 0xe0, 0x06, 
+	0x8c, 0x29, 0x4a, 0x44, 0x1a, 0x51, 0x63, 0xe1, 
+	0x6d, 0xba, 0x18, 0x51, 0x65, 0xb9, 0x49, 0x42, 
+	0x66, 0x61, 0x8c, 0x2a, 0x6b, 0xe1, 0x18, 0x89, 
+	0x31, 0x03, 0x83, 0xa9, 0x22, 0x00, 0x6e, 0x61, 
+	0x80, 0x0a, 0x31, 0x02, 0x22, 0xff, 0x32, 0xe1, 
+	0x66, 0x61, 0x80, 0x0a, 0x31, 0x02, 0x66, 0x61, 
+	0x8b, 0xaa, 0x80, 0x0a, 0x31, 0x02, 0x66, 0x61, 
+	0x7d, 0x00, 0x28, 0x00, 0xd0, 0x1d, 0x4a, 0x37, 
+	0x80, 0x0a, 0x1c, 0x88, 0x66, 0x60, 0x8c, 0x29, 
+	0x02, 0x09, 0x6e, 0xba, 0x0f, 0x52, 0x23, 0x06, 
+	0x40, 0x1a, 0x43, 0x11, 0x23, 0x21, 0x43, 0x19, 
+	0x80, 0x01, 0x30, 0x02, 0x66, 0x60, 0x6e, 0xb9, 
+	0x0b, 0x89, 0x23, 0x01, 0x43, 0x19, 0x80, 0x01, 
+	0x30, 0x02, 0x66, 0x60, 0x6e, 0xb9, 0x00, 0x49, 
+	0x43, 0x19, 0x80, 0x01, 0x30, 0x02, 0x66, 0x60, 
+	0xe0, 0x0b, 0x20, 0x01, 0x03, 0xc0, 0x80, 0x08, 
+	0x31, 0x02, 0x66, 0x61, 0x8c, 0x28, 0x02, 0x00, 
+	0x23, 0xff, 0x43, 0x18, 0x80, 0x08, 0x31, 0x02, 
+	0x66, 0x61, 0x48, 0x23, 0x6e, 0x61, 0x80, 0x08, 
+	0x31, 0x02, 0x66, 0x61, 0x80, 0x08, 0x31, 0x02, 
+	0x22, 0x33, 0x06, 0x52, 0x66, 0x61, 0x00, 0x53, 
+	0x6d, 0x90, 0x18, 0xc2, 0xb4, 0x04, 0x08, 0x5a, 
+	0x6d, 0x50, 0x18, 0xc6, 0x8c, 0x28, 0x4b, 0x1b, 
+	0x18, 0xc1, 0x00, 0x53, 0x6a, 0xf8, 0x18, 0xc0, 
+	0x6b, 0xe2, 0x1c, 0x33, 0xf0, 0x00, 0xfd, 0xb6, 
+	0x6a, 0xf8, 0x6b, 0xe1, 0x18, 0x40, 0x22, 0x33, 
+	0x06, 0x52, 0x62, 0xf8, 0x6d, 0x92, 0xb0, 0x01, 
+	0x42, 0x90, 0xdb, 0x02, 0x6a, 0x79, 0x1a, 0x40, 
+	0x62, 0xf8, 0x21, 0xff, 0x31, 0x11, 0x48, 0x10, 
+	0x85, 0x01, 0x8b, 0xa9, 0x31, 0x06, 0x85, 0x41, 
+	0x21, 0x01, 0x02, 0x49, 0x86, 0x81, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0x48, 0x00, 0x00, 0x0f, 0xee, 
+	0x2e, 0x08, 0x04, 0xa8, 0xcc, 0x00, 0x0f, 0x00, 
+	0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x07, 0xf7, 
+	0x2c, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x80, 
+	0x00, 0x00, 0xff, 0xff, 0x2c, 0x00, 0x02, 0x09, 
+	0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0xb0, 0x1c, 0x07, 
+	0xb0, 0x83, 0x4d, 0x20, 0x6b, 0x28, 0xf7, 0xff, 
+	0xfa, 0x53, 0x48, 0x1f, 0x6c, 0xc1, 0x6c, 0x80, 
+	0x1a, 0x08, 0xd5, 0x03, 0x1f, 0xe9, 0x39, 0x79, 
+	0x69, 0x09, 0x18, 0x40, 0x6e, 0xa9, 0x29, 0x00, 
+	0xd0, 0x22, 0x29, 0x10, 0xd0, 0x20, 0x29, 0x20, 
+	0xd0, 0x24, 0x29, 0x30, 0xd1, 0x04, 0x24, 0x2d, 
+	0x43, 0x44, 0xd5, 0x00, 0x34, 0x3f, 0x11, 0xa4, 
+	0x46, 0x6a, 0xa8, 0x01, 0xa9, 0x02, 0xf7, 0xff, 
+	0xfa, 0x19, 0x1b, 0x38, 0x99, 0x02, 0x1a, 0x08, 
+	0x22, 0x7d, 0x01, 0x52, 0x42, 0x90, 0xdc, 0x01, 
+	0x42, 0x90, 0xda, 0x05, 0x1a, 0x09, 0x91, 0x02, 
+	0x22, 0x00, 0x20, 0x00, 0xf7, 0xff, 0xf9, 0xf4, 
+	0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x01, 0x04, 0x1a, 0x24, 0xd5, 0x00, 0x34, 0x1f, 
+	0x11, 0x64, 0xe7, 0xe1, 0x21, 0x4b, 0x43, 0x41, 
+	0x20, 0x93, 0xf0, 0x19, 0xfc, 0x91, 0x1c, 0x04, 
+	0xe7, 0xda, 0x00, 0x00, 0x2e, 0x08, 0x04, 0xc8, 
+	0x66, 0x00, 0x00, 0x80, 0xb5, 0x90, 0x1c, 0x07, 
+	0xb0, 0x83, 0x4c, 0x18, 0x6f, 0x60, 0x30, 0x01, 
+	0x46, 0x6a, 0x67, 0x60, 0xa8, 0x01, 0xa9, 0x02, 
+	0xf7, 0xff, 0xf9, 0xe8, 0x4b, 0x14, 0x18, 0xf9, 
+	0x98, 0x02, 0x1a, 0x40, 0x4b, 0x13, 0x42, 0x98, 
+	0xdc, 0x04, 0x42, 0xd8, 0xdb, 0x02, 0x69, 0xe0, 
+	0x28, 0x01, 0xd1, 0x07, 0x91, 0x02, 0x20, 0x00, 
+	0x90, 0x01, 0x22, 0x00, 0xf7, 0xff, 0xf9, 0xc0, 
+	0x20, 0x01, 0x61, 0xe0, 0x69, 0xe0, 0x28, 0x00, 
+	0xd0, 0x0b, 0x6b, 0x20, 0xf7, 0xff, 0xf9, 0xec, 
+	0x6f, 0x60, 0x67, 0xa0, 0x48, 0x08, 0x60, 0x07, 
+	0x6f, 0xe0, 0x30, 0x01, 0x67, 0xe0, 0x20, 0x00, 
+	0x61, 0xe0, 0xb0, 0x03, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0xc8, 
+	0xff, 0xff, 0xec, 0x78, 0x00, 0x02, 0xbf, 0x20, 
+	0x2e, 0x08, 0x05, 0x48, 0xb4, 0xf0, 0x1c, 0x1c, 
+	0x23, 0x00, 0x9f, 0x04, 0x60, 0x3b, 0x79, 0x85, 
+	0x23, 0xc0, 0x40, 0x1d, 0x4b, 0x33, 0x2d, 0x80, 
+	0xd1, 0x16, 0x25, 0x02, 0x60, 0x9d, 0x79, 0xc5, 
+	0x0a, 0x2b, 0xd3, 0x06, 0x7a, 0x45, 0x23, 0xe0, 
+	0x40, 0x2b, 0x2b, 0x20, 0xd1, 0x01, 0x23, 0x09, 
+	0x60, 0x3b, 0x7a, 0x03, 0x33, 0x09, 0x60, 0x13, 
+	0x79, 0x02, 0x02, 0x12, 0x79, 0x45, 0x43, 0x2a, 
+	0x32, 0x06, 0x1a, 0xd2, 0x60, 0x22, 0xe0, 0x25, 
+	0x25, 0x06, 0x26, 0x01, 0x60, 0x9e, 0x79, 0x83, 
+	0x2b, 0xff, 0xd1, 0x03, 0x35, 0x01, 0x5d, 0x43, 
+	0x2b, 0xff, 0xd0, 0xfb, 0x5d, 0x46, 0x23, 0xc0, 
+	0x40, 0x33, 0x2b, 0x40, 0xd1, 0x00, 0x35, 0x02, 
+	0x5d, 0x46, 0x09, 0x33, 0x07, 0x9b, 0xd0, 0x08, 
+	0x60, 0x3d, 0x5d, 0x46, 0x09, 0x73, 0xd3, 0x02, 
+	0x1d, 0xeb, 0x33, 0x03, 0xe0, 0x02, 0x1d, 0x6b, 
+	0xe0, 0x00, 0x1c, 0x6b, 0x60, 0x13, 0x79, 0x02, 
+	0x02, 0x12, 0x79, 0x45, 0x43, 0x2a, 0x32, 0x06, 
+	0x1a, 0xd2, 0x60, 0x22, 0x68, 0x3a, 0x2a, 0x00, 
+	0xd0, 0x20, 0x5c, 0x82, 0x23, 0x0e, 0x40, 0x1a, 
+	0x07, 0x52, 0x60, 0x0a, 0x68, 0x3b, 0x18, 0xc3, 
+	0x78, 0x5b, 0x05, 0x9b, 0x43, 0x1a, 0x60, 0x0a, 
+	0x68, 0x3b, 0x18, 0xc3, 0x78, 0x9c, 0x23, 0xfe, 
+	0x40, 0x23, 0x03, 0x9b, 0x43, 0x1a, 0x60, 0x0a, 
+	0x68, 0x3b, 0x18, 0xc3, 0x78, 0xdb, 0x01, 0xdb, 
+	0x43, 0x1a, 0x60, 0x0a, 0x68, 0x3b, 0x18, 0xc0, 
+	0x79, 0x00, 0x23, 0xfe, 0x40, 0x18, 0x08, 0x40, 
+	0x43, 0x10, 0x60, 0x08, 0x20, 0x00, 0xbc, 0xf0, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x48, 
+	0xb5, 0xb0, 0xb0, 0x83, 0x48, 0x3f, 0x49, 0x40, 
+	0x8d, 0xc9, 0x4c, 0x40, 0x63, 0xe1, 0x29, 0x06, 
+	0xda, 0x03, 0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0x01, 0x09, 0x49, 0x01, 0x49, 
+	0x23, 0xff, 0x33, 0xe1, 0x42, 0x99, 0xd0, 0x03, 
+	0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x46, 0x6a, 0xb4, 0x04, 0xaa, 0x03, 0xab, 0x02, 
+	0x49, 0x35, 0xf7, 0xff, 0xff, 0x6f, 0xb0, 0x01, 
+	0x28, 0x00, 0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x98, 0x02, 0x99, 0x01, 
+	0x18, 0x40, 0x6b, 0xe1, 0x42, 0x88, 0xd0, 0x03, 
+	0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x00, 0x4f, 0x2c, 0x28, 0x00, 0xd0, 0x25, 
+	0x6e, 0x38, 0x6d, 0xb9, 0x18, 0x40, 0x23, 0x01, 
+	0x06, 0x1b, 0x66, 0x38, 0x42, 0x98, 0xdb, 0x04, 
+	0x43, 0xdb, 0x18, 0xc0, 0x66, 0x38, 0x1e, 0x48, 
+	0x65, 0xb8, 0x23, 0x0d, 0x06, 0x9b, 0x6d, 0xb8, 
+	0x6c, 0xb9, 0x1a, 0xc9, 0x60, 0x08, 0x6e, 0xe0, 
+	0x6c, 0xb9, 0x1a, 0xc9, 0x60, 0x48, 0x20, 0x00, 
+	0x65, 0xb8, 0x6c, 0xb8, 0x30, 0x08, 0x23, 0x05, 
+	0x02, 0x5b, 0x64, 0xb8, 0x42, 0x98, 0xd1, 0x02, 
+	0x20, 0x01, 0x02, 0xc0, 0x64, 0xb8, 0x6c, 0xb8, 
+	0x49, 0x19, 0x61, 0x48, 0x24, 0x33, 0x06, 0x64, 
+	0x00, 0x63, 0x6d, 0xa0, 0x18, 0xc2, 0xb4, 0x04, 
+	0x6d, 0x60, 0x18, 0xc5, 0x6e, 0x60, 0x18, 0xc1, 
+	0x98, 0x03, 0x4b, 0x0e, 0x18, 0xc0, 0x9a, 0x02, 
+	0x1c, 0x2b, 0xf0, 0x00, 0xfc, 0x53, 0xb0, 0x01, 
+	0x6d, 0xb8, 0x99, 0x01, 0x18, 0x40, 0x65, 0xb8, 
+	0x48, 0x0e, 0x68, 0x02, 0x18, 0x51, 0x60, 0x01, 
+	0x6e, 0x60, 0x6d, 0xa1, 0x42, 0x88, 0xdb, 0x04, 
+	0x48, 0x0a, 0x68, 0x01, 0x6a, 0x7a, 0x1a, 0x89, 
+	0x60, 0x01, 0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x12, 0x00, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x04, 0xc8, 
+	0x2e, 0x08, 0x05, 0x34, 0x2e, 0x08, 0x04, 0x48, 
+	0xcc, 0x00, 0x0f, 0x00, 0x66, 0x00, 0x00, 0x64, 
+	0xb5, 0xf0, 0xb0, 0x83, 0x4e, 0x65, 0x25, 0x00, 
+	0x4f, 0x65, 0x6a, 0xf8, 0xf7, 0xff, 0xf8, 0xcc, 
+	0x48, 0x64, 0x8d, 0xc0, 0x63, 0xf8, 0x28, 0x0a, 
+	0xda, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0x34, 0x09, 0x60, 0x01, 0x40, 
+	0x23, 0xff, 0x33, 0xc1, 0x42, 0x98, 0xd0, 0x07, 
+	0x23, 0xff, 0x33, 0xbe, 0x42, 0x9c, 0xd0, 0x03, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x46, 0x6a, 0xb4, 0x04, 0xaa, 0x03, 0xab, 0x02, 
+	0x49, 0x57, 0x1c, 0x30, 0xf7, 0xff, 0xfe, 0xd6, 
+	0xb0, 0x01, 0x28, 0x00, 0xd0, 0x03, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x02, 
+	0x99, 0x01, 0x18, 0x41, 0x6b, 0xfa, 0x42, 0x91, 
+	0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x01, 0x1c, 0x22, 0x4c, 0x4d, 
+	0x23, 0xff, 0x33, 0xbe, 0x42, 0x9a, 0xd1, 0x3c, 
+	0x5c, 0x30, 0x28, 0xa0, 0xd0, 0x03, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xe0, 
+	0x28, 0x00, 0xd1, 0x1b, 0x20, 0x02, 0x63, 0x78, 
+	0x60, 0xe1, 0x21, 0x00, 0x20, 0x00, 0xf0, 0x0f, 
+	0xf9, 0x4f, 0x20, 0x00, 0xf7, 0xfb, 0xfe, 0xb8, 
+	0x98, 0x02, 0x4b, 0x3c, 0x18, 0xc0, 0x79, 0x40, 
+	0x23, 0x30, 0x40, 0x18, 0x66, 0xb8, 0xd0, 0x16, 
+	0x28, 0x10, 0xd0, 0x14, 0x28, 0x20, 0xd0, 0x17, 
+	0x28, 0x30, 0xd1, 0x03, 0x21, 0x20, 0x20, 0x1e, 
+	0xf0, 0x0f, 0xfc, 0x69, 0x98, 0x00, 0x28, 0x00, 
+	0xd0, 0x2b, 0x6d, 0x60, 0x28, 0x05, 0xd1, 0x28, 
+	0x68, 0xf8, 0x28, 0x00, 0xd1, 0x25, 0x6f, 0x38, 
+	0xf7, 0xff, 0xfe, 0x08, 0xe0, 0x21, 0x21, 0x02, 
+	0x20, 0x1e, 0xf0, 0x0f, 0xfc, 0x58, 0xe7, 0xed, 
+	0x21, 0x08, 0x20, 0x1e, 0xf0, 0x0f, 0xfc, 0x53, 
+	0xe7, 0xe8, 0x68, 0xe0, 0x28, 0x00, 0xd0, 0x08, 
+	0x20, 0x00, 0x63, 0x79, 0x21, 0x00, 0x60, 0xe0, 
+	0xf0, 0x0f, 0xf9, 0x1a, 0x20, 0x02, 0xf0, 0x0f, 
+	0xf9, 0x6d, 0x98, 0x00, 0x28, 0x00, 0xd0, 0x08, 
+	0x6d, 0x60, 0x28, 0x05, 0xd1, 0x05, 0x68, 0xf8, 
+	0x28, 0x00, 0xd1, 0x02, 0x6f, 0x38, 0xf7, 0xff, 
+	0xfe, 0x2d, 0x68, 0xe0, 0x28, 0x00, 0xd0, 0x01, 
+	0x98, 0x02, 0x1d, 0xc5, 0x6b, 0xf8, 0x1b, 0x42, 
+	0x63, 0xfa, 0x7e, 0x39, 0x69, 0x78, 0x18, 0x41, 
+	0x4b, 0x16, 0x18, 0xe8, 0xf7, 0xfb, 0xfb, 0xfc, 
+	0x7e, 0x38, 0x6b, 0xf9, 0x18, 0x40, 0x07, 0x81, 
+	0x0f, 0x89, 0x76, 0x39, 0x1a, 0x44, 0x20, 0x01, 
+	0x06, 0x00, 0x49, 0x15, 0x60, 0x08, 0xf0, 0x1e, 
+	0xfe, 0x53, 0x4b, 0x14, 0x40, 0x18, 0xf0, 0x1e, 
+	0xfe, 0x53, 0x22, 0x04, 0x49, 0x10, 0xb4, 0x06, 
+	0x23, 0x12, 0x21, 0x1e, 0x69, 0x78, 0x1c, 0x22, 
+	0xf0, 0x13, 0xff, 0x28, 0xb0, 0x02, 0xf0, 0x1e, 
+	0xfe, 0x43, 0x23, 0x01, 0x04, 0x9b, 0x43, 0x18, 
+	0xf0, 0x1e, 0xfe, 0x42, 0x69, 0x78, 0x59, 0x01, 
+	0x60, 0x01, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x12, 0x00, 
+	0x2e, 0x08, 0x04, 0xc8, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2e, 0x08, 0x05, 0x38, 0x2e, 0x08, 0x04, 0x48, 
+	0x9e, 0x00, 0x08, 0x00, 0xff, 0xfb, 0xff, 0xff, 
+	0x20, 0x33, 0x06, 0x40, 0x6e, 0x81, 0x6e, 0x40, 
+	0x1a, 0x09, 0x48, 0x0f, 0x63, 0xc1, 0x29, 0x00, 
+	0xdc, 0x04, 0x1f, 0xc2, 0x3a, 0x79, 0x6a, 0x52, 
+	0x18, 0x89, 0x63, 0xc1, 0x6b, 0xc1, 0x08, 0x89, 
+	0x00, 0x89, 0x23, 0x01, 0x02, 0xdb, 0x63, 0xc1, 
+	0x42, 0x99, 0xdd, 0x0b, 0x4a, 0x07, 0x42, 0x91, 
+	0xdd, 0x00, 0x63, 0xc2, 0x4a, 0x06, 0x49, 0x07, 
+	0x85, 0x8a, 0x6b, 0xc0, 0x85, 0xc8, 0x20, 0x09, 
+	0x02, 0x40, 0x86, 0xc8, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0xc8, 0x00, 0x00, 0xff, 0xff, 
+	0x00, 0x00, 0x02, 0x06, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x48, 0x0f, 0x78, 0x01, 0x29, 0x00, 0xd0, 0x1a, 
+	0x49, 0x0e, 0x6c, 0x8a, 0x6c, 0xc9, 0x1a, 0x51, 
+	0x63, 0xc1, 0x1c, 0x0a, 0x29, 0x00, 0xdc, 0x04, 
+	0x1f, 0xc1, 0x39, 0x79, 0x69, 0x09, 0x18, 0x51, 
+	0x63, 0xc1, 0x23, 0x01, 0x03, 0x1b, 0x6b, 0xc1, 
+	0x42, 0x99, 0xdb, 0x08, 0x22, 0xff, 0x32, 0x07, 
+	0x49, 0x05, 0x85, 0x8a, 0x6b, 0xc0, 0x85, 0xc8, 
+	0x20, 0x09, 0x02, 0x40, 0x86, 0xc8, 0x47, 0x70, 
+	0x2e, 0x08, 0x04, 0xc8, 0x66, 0x00, 0x00, 0x80, 
+	0x2c, 0x00, 0x1f, 0xc0, 0xb4, 0x80, 0x20, 0x00, 
+	0x49, 0x1e, 0x6c, 0x8a, 0x6c, 0xc9, 0x1a, 0x52, 
+	0x49, 0x1d, 0x2a, 0x00, 0xdc, 0x01, 0x69, 0x0b, 
+	0x18, 0xd2, 0x23, 0x01, 0x02, 0xdb, 0x42, 0x9a, 
+	0xdd, 0x00, 0x08, 0xd8, 0x22, 0x33, 0x06, 0x52, 
+	0x6e, 0x93, 0x6e, 0x52, 0x1a, 0x9a, 0x2a, 0x00, 
+	0xdc, 0x01, 0x6a, 0x4b, 0x18, 0xd2, 0x08, 0x92, 
+	0x00, 0x92, 0x4b, 0x14, 0x68, 0xdb, 0x2b, 0x00, 
+	0xd0, 0x06, 0x23, 0x01, 0x03, 0x1b, 0x6a, 0x4f, 
+	0x18, 0xfb, 0x6a, 0x89, 0x1a, 0x59, 0xe0, 0x01, 
+	0x21, 0x01, 0x03, 0x09, 0x42, 0x8a, 0xdd, 0x04, 
+	0x04, 0x00, 0x0c, 0x00, 0x23, 0x01, 0x02, 0x5b, 
+	0x43, 0x18, 0x28, 0x00, 0xd0, 0x0b, 0x4b, 0x0a, 
+	0x42, 0x9a, 0xdd, 0x00, 0x1c, 0x1a, 0x21, 0x06, 
+	0x43, 0x01, 0x48, 0x08, 0x85, 0x81, 0x85, 0xc2, 
+	0x21, 0x09, 0x02, 0x49, 0x86, 0xc1, 0xbc, 0x80, 
+	0x47, 0x70, 0x00, 0x00, 0x66, 0x00, 0x00, 0x80, 
+	0x2e, 0x08, 0x04, 0x48, 0x2e, 0x08, 0x04, 0xc8, 
+	0x00, 0x00, 0xff, 0xff, 0x2c, 0x00, 0x1f, 0xc0, 
+	0xb5, 0x90, 0x04, 0x00, 0x0c, 0x00, 0x4f, 0x13, 
+	0x6d, 0x39, 0x29, 0x00, 0xd1, 0x10, 0x24, 0x01, 
+	0x28, 0x01, 0xd0, 0x10, 0x28, 0x04, 0xd0, 0x15, 
+	0x28, 0x05, 0xd1, 0x09, 0xf7, 0xff, 0xf8, 0x52, 
+	0xf7, 0xff, 0xf8, 0x06, 0x20, 0x00, 0x66, 0xf8, 
+	0x67, 0x38, 0x20, 0x05, 0x65, 0x78, 0x65, 0x3c, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0xf7, 0xfe, 
+	0xff, 0xfb, 0x65, 0x3c, 0x65, 0x7c, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xf8, 0x3e, 
+	0x20, 0x04, 0x65, 0x78, 0x65, 0x3c, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x04, 0x48, 
+	0xb5, 0x90, 0x04, 0x00, 0x0c, 0x00, 0x4f, 0x23, 
+	0x6d, 0x39, 0x29, 0x00, 0xd0, 0x0e, 0x29, 0x02, 
+	0xd1, 0x09, 0x6d, 0x78, 0x28, 0x01, 0xd0, 0x34, 
+	0x28, 0x04, 0xd0, 0x27, 0x28, 0x05, 0xd1, 0x02, 
+	0x20, 0xff, 0xf7, 0xff, 0xf8, 0xd1, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x24, 0x02, 0x28, 0x01, 
+	0xd0, 0x0c, 0x28, 0x04, 0xd0, 0x12, 0x28, 0x05, 
+	0xd1, 0xf5, 0x20, 0x00, 0xf7, 0xff, 0xf8, 0xc4, 
+	0x20, 0x05, 0x65, 0x78, 0x65, 0x3c, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xf8, 0x42, 
+	0x20, 0x01, 0x65, 0x78, 0x65, 0x3c, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xf8, 0x7a, 
+	0x20, 0x04, 0x65, 0x78, 0x65, 0x3c, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 0x20, 0x0e, 
+	0xf0, 0x11, 0xfb, 0xb2, 0x21, 0x00, 0x20, 0x0d, 
+	0xf0, 0x11, 0xfb, 0xae, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x02, 0xf0, 0x0f, 0xf8, 0x0e, 
+	0x20, 0xff, 0x49, 0x03, 0x70, 0x08, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x04, 0x48, 
+	0x2e, 0x08, 0x04, 0xc8, 0xb5, 0xf0, 0x4f, 0x2b, 
+	0x24, 0x00, 0x6d, 0x38, 0x28, 0x01, 0xd0, 0x1e, 
+	0x28, 0x02, 0xd1, 0x19, 0x26, 0x03, 0x6d, 0x78, 
+	0x1d, 0xfd, 0x35, 0x79, 0x28, 0x01, 0xd0, 0x34, 
+	0x28, 0x04, 0xd0, 0x3f, 0x28, 0x05, 0xd1, 0x0f, 
+	0x20, 0x02, 0x63, 0x6c, 0xf0, 0x0e, 0xff, 0xee, 
+	0x20, 0x00, 0xf7, 0xfb, 0xfd, 0x01, 0xf7, 0xff, 
+	0xf8, 0x2b, 0x65, 0x3e, 0x20, 0x00, 0x65, 0x78, 
+	0xf7, 0xfe, 0xfe, 0xc2, 0x20, 0x01, 0x61, 0xe8, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x6d, 0x78, 
+	0x28, 0x01, 0xd0, 0x0c, 0x28, 0x04, 0xd0, 0x11, 
+	0x28, 0x05, 0xd1, 0xf5, 0xf7, 0xfe, 0xff, 0x8c, 
+	0xf7, 0xfe, 0xff, 0xe2, 0x65, 0x3c, 0x65, 0x7c, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xf7, 0xfe, 
+	0xff, 0x83, 0x65, 0x3c, 0x65, 0x7c, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xfe, 0xff, 0xd4, 
+	0x65, 0x3c, 0x65, 0x7c, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x63, 0x6c, 0x20, 0x02, 0x60, 0xfc, 
+	0xf0, 0x0e, 0xff, 0xbc, 0x20, 0x00, 0xf7, 0xfb, 
+	0xfc, 0xcf, 0x65, 0x7c, 0x65, 0x3e, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xfe, 0xff, 0xf4, 
+	0x65, 0x7c, 0x65, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x48, 
+	0xb5, 0x90, 0x4c, 0x1b, 0x68, 0xe0, 0x28, 0x03, 
+	0xd0, 0x1f, 0x1f, 0xe7, 0x3f, 0x79, 0x6d, 0x38, 
+	0x28, 0x02, 0xd1, 0x1a, 0x6d, 0x78, 0x28, 0x01, 
+	0xd0, 0x1a, 0x28, 0x04, 0xd0, 0x20, 0x28, 0x05, 
+	0xd1, 0x13, 0x4a, 0x14, 0x49, 0x14, 0x48, 0x15, 
+	0xf7, 0xfe, 0xfe, 0x54, 0x21, 0x00, 0x20, 0x0e, 
+	0xf0, 0x11, 0xfb, 0x2a, 0x20, 0x01, 0xf0, 0x0e, 
+	0xff, 0x8d, 0x20, 0x03, 0x60, 0xe0, 0x68, 0xf8, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x01, 0xf0, 0x0e, 
+	0xff, 0x85, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x01, 0xf0, 0x0e, 0xff, 0x7f, 0x20, 0x00, 
+	0x70, 0x20, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x00, 0x20, 0x0b, 0xf0, 0x11, 0xfb, 0x10, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0xc8, 0x2e, 0x08, 0x05, 0x54, 
+	0x2e, 0x08, 0x05, 0x4c, 0x2e, 0x08, 0x05, 0x50, 
+	0xb5, 0xf0, 0x4c, 0x21, 0x6d, 0x20, 0x28, 0x02, 
+	0xd1, 0x24, 0x26, 0xff, 0x6d, 0x60, 0x1d, 0xe7, 
+	0x37, 0x79, 0x28, 0x01, 0xd0, 0x1d, 0x28, 0x04, 
+	0xd0, 0x1f, 0x28, 0x05, 0xd1, 0x1a, 0x20, 0x01, 
+	0xf0, 0x0e, 0xff, 0x58, 0x25, 0x00, 0x68, 0xe0, 
+	0x28, 0x00, 0xd0, 0x04, 0x21, 0x00, 0x20, 0x00, 
+	0xf0, 0x0e, 0xfe, 0xfa, 0x60, 0xe5, 0x70, 0x3e, 
+	0x68, 0xf8, 0x28, 0x03, 0xd1, 0x14, 0x48, 0x13, 
+	0x22, 0x00, 0x68, 0x41, 0x20, 0x00, 0xf7, 0xfe, 
+	0xfd, 0xef, 0x6b, 0x38, 0xf7, 0xfe, 0xfe, 0x20, 
+	0xe0, 0x0f, 0x70, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x00, 0x20, 0x0d, 0xf0, 0x11, 
+	0xfa, 0xd3, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x01, 0x61, 0xf8, 0x6b, 0x38, 0xf7, 0xfe, 
+	0xfe, 0x0f, 0x20, 0x02, 0x60, 0xfd, 0xf0, 0x0e, 
+	0xff, 0x2d, 0x21, 0x00, 0x20, 0x0d, 0xf0, 0x11, 
+	0xfa, 0xc3, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0x48, 0x2e, 0x08, 0x05, 0x48, 
+	0xb5, 0xb0, 0x04, 0x07, 0x0c, 0x3f, 0x2f, 0x01, 
+	0xda, 0x00, 0x27, 0x01, 0x2f, 0x3f, 0xdd, 0x00, 
+	0x27, 0x3f, 0x48, 0x17, 0x6d, 0x01, 0x29, 0x02, 
+	0xd1, 0x13, 0x6d, 0x40, 0x25, 0x02, 0x4c, 0x15, 
+	0x28, 0x04, 0xd0, 0x11, 0x28, 0x05, 0xd1, 0x0c, 
+	0x21, 0x00, 0x20, 0x0e, 0xf0, 0x11, 0xfa, 0xa4, 
+	0x21, 0x00, 0x20, 0x0d, 0xf0, 0x11, 0xfa, 0xa0, 
+	0x20, 0x22, 0x1c, 0x39, 0xf0, 0x11, 0xfa, 0x9c, 
+	0x60, 0xe5, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x00, 0x20, 0x0e, 0xf0, 0x11, 0xfa, 0x94, 
+	0x21, 0x00, 0x20, 0x0d, 0xf0, 0x11, 0xfa, 0x90, 
+	0x20, 0x22, 0x1c, 0x39, 0xf0, 0x11, 0xfa, 0x8c, 
+	0x20, 0x00, 0xf7, 0xfe, 0xfd, 0xcd, 0x60, 0xe5, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0x48, 0x2e, 0x08, 0x04, 0xc8, 
+	0xb5, 0x00, 0x48, 0x0b, 0x6d, 0x01, 0x29, 0x02, 
+	0xd1, 0x10, 0x6d, 0x40, 0x28, 0x04, 0xd0, 0x01, 
+	0x28, 0x05, 0xd1, 0x0b, 0x21, 0x00, 0x20, 0x16, 
+	0xf0, 0x11, 0xfa, 0x72, 0x20, 0x00, 0xf7, 0xfe, 
+	0xfd, 0xb3, 0x21, 0x00, 0x48, 0x03, 0x70, 0x01, 
+	0x21, 0x01, 0x60, 0xc1, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0x48, 0x2e, 0x08, 0x04, 0xc8, 
+	0xb5, 0x00, 0x48, 0x0b, 0x6d, 0x01, 0x29, 0x02, 
+	0xd1, 0x10, 0x6d, 0x40, 0x28, 0x04, 0xd0, 0x01, 
+	0x28, 0x05, 0xd1, 0x0b, 0x21, 0x00, 0x20, 0x1a, 
+	0xf0, 0x11, 0xfa, 0x56, 0x20, 0x00, 0xf7, 0xfe, 
+	0xfd, 0x97, 0x21, 0x00, 0x48, 0x03, 0x70, 0x01, 
+	0x21, 0x01, 0x60, 0xc1, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x04, 0x48, 0x2e, 0x08, 0x04, 0xc8, 
+	0x48, 0x03, 0x6d, 0x00, 0x28, 0x00, 0xd1, 0x00, 
+	0x47, 0x70, 0x20, 0xff, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0x48, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x4d, 0x52, 0x6d, 0x29, 0x48, 0x52, 
+	0x26, 0x00, 0x29, 0x01, 0xd0, 0x4c, 0x29, 0x02, 
+	0xd1, 0x6e, 0x6d, 0x69, 0x29, 0x01, 0xd0, 0x20, 
+	0x29, 0x04, 0xd0, 0x2e, 0x29, 0x05, 0xd1, 0x3e, 
+	0x6c, 0xc1, 0x6c, 0x80, 0x1a, 0x08, 0xd5, 0x01, 
+	0x69, 0x29, 0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 
+	0x69, 0x28, 0xf0, 0x18, 0xff, 0xdd, 0x70, 0x20, 
+	0x20, 0x33, 0x06, 0x40, 0x6e, 0x41, 0x6e, 0x80, 
+	0x1a, 0x08, 0xd5, 0x01, 0x6a, 0x69, 0x18, 0x40, 
+	0x21, 0x64, 0x43, 0x41, 0x6a, 0x68, 0xf0, 0x18, 
+	0xff, 0xcf, 0x70, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x6c, 0xc1, 0x6c, 0x80, 0x1a, 0x08, 
+	0xd5, 0x01, 0x69, 0x29, 0x18, 0x40, 0x21, 0x64, 
+	0x43, 0x41, 0x69, 0x28, 0xf0, 0x18, 0xff, 0xc0, 
+	0x70, 0x20, 0x70, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x33, 0x06, 0x40, 0x6e, 0x41, 
+	0x6e, 0x80, 0x1a, 0x08, 0xd5, 0x01, 0x6a, 0x69, 
+	0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 0x6a, 0x68, 
+	0xf0, 0x18, 0xff, 0xae, 0x70, 0x38, 0x70, 0x26, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x70, 0x26, 
+	0x70, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x6d, 0x69, 0x29, 0x01, 0xd0, 0x21, 0x29, 0x04, 
+	0xd0, 0x2f, 0x29, 0x05, 0xd1, 0x3f, 0x69, 0x69, 
+	0x6c, 0xc0, 0x1a, 0x40, 0xd5, 0x01, 0x69, 0x29, 
+	0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 0x69, 0x28, 
+	0xf0, 0x18, 0xff, 0x92, 0x70, 0x20, 0x21, 0x33, 
+	0x06, 0x49, 0x6a, 0xe8, 0x6e, 0x49, 0x1a, 0x08, 
+	0xd5, 0x01, 0x6a, 0x69, 0x18, 0x40, 0x21, 0x64, 
+	0x43, 0x41, 0x6a, 0x68, 0xf0, 0x18, 0xff, 0x84, 
+	0x70, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xe0, 0x26, 0x69, 0x69, 0x6c, 0xc0, 0x1a, 0x40, 
+	0xd5, 0x01, 0x69, 0x29, 0x18, 0x40, 0x21, 0x64, 
+	0x43, 0x41, 0x69, 0x28, 0xf0, 0x18, 0xff, 0x74, 
+	0x70, 0x20, 0x70, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x33, 0x06, 0x49, 0x6a, 0xe8, 
+	0x6e, 0x49, 0x1a, 0x08, 0xd5, 0x01, 0x6a, 0x69, 
+	0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 0x6a, 0x68, 
+	0xf0, 0x18, 0xff, 0x62, 0x70, 0x38, 0x70, 0x26, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x70, 0x26, 
+	0x70, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x70, 0x26, 0x70, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x48, 
+	0x66, 0x00, 0x00, 0x80, 0xb5, 0xf0, 0x1c, 0x17, 
+	0x9e, 0x05, 0x1a, 0xf2, 0x1c, 0x0d, 0x21, 0x00, 
+	0x1c, 0x1c, 0x42, 0xba, 0xda, 0x03, 0x1c, 0x08, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x42, 0xa0, 
+	0xd3, 0x01, 0x42, 0xb0, 0xd9, 0x03, 0x1c, 0x08, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x19, 0xc1, 
+	0x42, 0xb1, 0xd9, 0x0c, 0x1a, 0x32, 0x4e, 0x0a, 
+	0x64, 0x32, 0x1c, 0x29, 0xf7, 0xfb, 0xf8, 0x84, 
+	0x6c, 0x30, 0x1a, 0x3a, 0x18, 0x29, 0x1c, 0x20, 
+	0xf7, 0xfb, 0xf8, 0x7e, 0xe0, 0x03, 0x1c, 0x29, 
+	0x1c, 0x3a, 0xf7, 0xfb, 0xf8, 0x79, 0x1c, 0x38, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0xc8, 0xb5, 0xf0, 0x1c, 0x17, 
+	0x9e, 0x05, 0x1a, 0xf2, 0x1c, 0x05, 0x20, 0x00, 
+	0x1c, 0x1c, 0x42, 0xba, 0xdb, 0x18, 0x42, 0xa1, 
+	0xd3, 0x16, 0x42, 0xb1, 0xd2, 0x14, 0x19, 0xc8, 
+	0x42, 0xb0, 0xd9, 0x0c, 0x1a, 0x72, 0x4e, 0x0a, 
+	0x64, 0x32, 0x1c, 0x28, 0xf7, 0xfb, 0xf8, 0x5c, 
+	0x6c, 0x30, 0x1a, 0x3a, 0x18, 0x28, 0x1c, 0x21, 
+	0xf7, 0xfb, 0xf8, 0x56, 0xe0, 0x03, 0x1c, 0x28, 
+	0x1c, 0x3a, 0xf7, 0xfb, 0xf8, 0x51, 0x1c, 0x38, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x04, 0xc8, 0x47, 0x70, 0xb5, 0x00, 
+	0xb0, 0x82, 0x46, 0x6a, 0x49, 0x06, 0xa8, 0x01, 
+	0xf7, 0xfe, 0xfc, 0x58, 0x21, 0x00, 0x20, 0x0b, 
+	0xf0, 0x11, 0xf9, 0x2e, 0x20, 0x03, 0x49, 0x03, 
+	0x61, 0x88, 0xb0, 0x02, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x05, 0x64, 0x2e, 0x08, 0x05, 0x48, 
+	0xb5, 0x80, 0x4f, 0x0b, 0x22, 0x00, 0x20, 0x00, 
+	0x69, 0xf9, 0xf7, 0xfe, 0xfc, 0x2d, 0x21, 0x00, 
+	0x20, 0x0d, 0xf0, 0x11, 0xf9, 0x19, 0x21, 0x01, 
+	0x1f, 0xf8, 0x38, 0x79, 0x61, 0xc1, 0x6b, 0x00, 
+	0xf7, 0xfe, 0xfc, 0x56, 0x20, 0x00, 0x61, 0xb8, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0x48, 0xb5, 0x80, 0x4f, 0x06, 
+	0x68, 0x38, 0x1d, 0xc1, 0x31, 0xb5, 0x20, 0x2f, 
+	0x02, 0x80, 0xf0, 0x18, 0xfe, 0xbd, 0x60, 0x39, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x02, 0xcb, 0x10, 0x48, 0x05, 0x8f, 0xc1, 
+	0x29, 0x00, 0xd0, 0x05, 0x21, 0x00, 0x87, 0xc1, 
+	0x48, 0x03, 0x69, 0x01, 0x31, 0x01, 0x61, 0x01, 
+	0x47, 0x70, 0x00, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2e, 0x08, 0x05, 0x68, 0x48, 0x03, 0x21, 0x00, 
+	0x60, 0x01, 0x48, 0x03, 0x69, 0x41, 0x31, 0x01, 
+	0x61, 0x41, 0x47, 0x70, 0x2e, 0x08, 0x48, 0x00, 
+	0x2e, 0x08, 0x05, 0x68, 0xb5, 0x00, 0xb0, 0x88, 
+	0x46, 0x68, 0xf0, 0x13, 0xfc, 0xbf, 0x48, 0x07, 
+	0x69, 0x81, 0x31, 0x01, 0x23, 0x01, 0x22, 0x06, 
+	0x61, 0x81, 0x21, 0x47, 0x02, 0x49, 0x05, 0x48, 
+	0xf0, 0x13, 0xfb, 0xac, 0xb0, 0x08, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0x68, 
+	0xb5, 0x90, 0x1c, 0x07, 0x20, 0xff, 0x30, 0xa5, 
+	0xb0, 0x85, 0x90, 0x00, 0x20, 0x01, 0x02, 0x40, 
+	0x90, 0x02, 0x48, 0x12, 0x90, 0x04, 0x20, 0x0e, 
+	0xab, 0x03, 0x80, 0x18, 0x46, 0x68, 0xf0, 0x13, 
+	0xfc, 0xd1, 0x2f, 0x00, 0xd0, 0x16, 0x20, 0x33, 
+	0x06, 0x40, 0x6d, 0x40, 0x23, 0x0d, 0x06, 0x9b, 
+	0x1a, 0xc7, 0x98, 0x02, 0x1e, 0x79, 0xf0, 0x00, 
+	0xfb, 0x31, 0x4c, 0x09, 0x68, 0x20, 0x28, 0x00, 
+	0xd1, 0x04, 0x20, 0xa5, 0x01, 0xc0, 0xf0, 0x00, 
+	0xfb, 0x37, 0x60, 0x20, 0x98, 0x02, 0x1a, 0x38, 
+	0x49, 0x04, 0x60, 0x88, 0xb0, 0x05, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x1c, 0x00, 0x00, 
+	0x2e, 0x08, 0x00, 0x00, 0x2e, 0x08, 0x05, 0x68, 
+	0xb5, 0x00, 0x22, 0x01, 0x21, 0x01, 0x20, 0x00, 
+	0xf0, 0x0f, 0xf9, 0x2e, 0x48, 0x04, 0x68, 0x00, 
+	0x78, 0x01, 0x23, 0x06, 0x43, 0x19, 0x70, 0x01, 
+	0xf0, 0x00, 0xf9, 0xea, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x9b, 0xc4, 0xb5, 0xf0, 0x48, 0x55, 
+	0x4e, 0x55, 0x80, 0x30, 0x27, 0x00, 0x4c, 0x55, 
+	0x86, 0xe7, 0x86, 0xa7, 0x48, 0x54, 0x60, 0x07, 
+	0xf0, 0x0b, 0xf8, 0x2e, 0x48, 0x53, 0xf0, 0x14, 
+	0xf8, 0xdb, 0xf7, 0xfa, 0xff, 0x29, 0x21, 0xff, 
+	0x48, 0x51, 0x60, 0x01, 0x68, 0x01, 0x29, 0x00, 
+	0xd0, 0x01, 0x21, 0x00, 0xe0, 0x00, 0x21, 0x01, 
+	0x4a, 0x4e, 0x60, 0xd1, 0x60, 0x07, 0xf7, 0xfc, 
+	0xfb, 0x17, 0x20, 0x01, 0xf7, 0xff, 0xff, 0x98, 
+	0x21, 0x00, 0x20, 0x00, 0xf0, 0x0e, 0xfc, 0x6c, 
+	0xf0, 0x01, 0xfa, 0xbc, 0x48, 0x48, 0x60, 0x07, 
+	0x25, 0x02, 0x48, 0x48, 0x60, 0x05, 0x20, 0x03, 
+	0x49, 0x47, 0x60, 0x08, 0x49, 0x47, 0x60, 0x08, 
+	0x49, 0x47, 0x60, 0x0d, 0x49, 0x47, 0x60, 0x08, 
+	0x48, 0x47, 0x60, 0x07, 0x48, 0x47, 0x65, 0x87, 
+	0xf0, 0x00, 0xf9, 0x8a, 0xf0, 0x14, 0xf9, 0x48, 
+	0x20, 0x00, 0xf0, 0x11, 0xfe, 0x85, 0x28, 0x00, 
+	0xd1, 0x64, 0x48, 0x43, 0xf0, 0x0e, 0xfa, 0xbe, 
+	0x20, 0x00, 0xf0, 0x0e, 0xfb, 0x2f, 0x87, 0xe7, 
+	0x87, 0xa7, 0x22, 0x01, 0xb4, 0x04, 0x22, 0x03, 
+	0x21, 0x01, 0x20, 0x00, 0x1c, 0x2b, 0xf0, 0x11, 
+	0xfb, 0x2b, 0x20, 0x02, 0xb0, 0x01, 0xf7, 0xfc, 
+	0xfc, 0x73, 0xf7, 0xff, 0xff, 0x95, 0x20, 0x7d, 
+	0x00, 0xc0, 0xf7, 0xfd, 0xfd, 0xc7, 0x20, 0x7d, 
+	0x00, 0xc0, 0xf7, 0xfd, 0xfd, 0xdb, 0xf0, 0x09, 
+	0xff, 0x4f, 0xf0, 0x09, 0xff, 0x8d, 0xf7, 0xfb, 
+	0xf9, 0xbf, 0x21, 0x18, 0x20, 0x14, 0xf7, 0xfd, 
+	0xf8, 0x11, 0xf7, 0xfd, 0xfb, 0xbf, 0xf7, 0xfb, 
+	0xfd, 0x0d, 0x03, 0xe8, 0xf0, 0x00, 0xfa, 0x5c, 
+	0xf0, 0x05, 0xfc, 0x30, 0x49, 0x2b, 0x70, 0x08, 
+	0x05, 0xa8, 0xf0, 0x1e, 0xf9, 0x78, 0x49, 0x2a, 
+	0x20, 0x17, 0xf0, 0x1e, 0xf9, 0x81, 0x49, 0x29, 
+	0x20, 0x08, 0xf0, 0x1e, 0xf9, 0x7d, 0xf0, 0x1e, 
+	0xf9, 0x73, 0x4b, 0x27, 0x40, 0x18, 0xf0, 0x1e, 
+	0xf9, 0x73, 0x01, 0xe8, 0xf0, 0x1e, 0xf9, 0x67, 
+	0x48, 0x24, 0x23, 0x01, 0x22, 0x08, 0x21, 0x81, 
+	0x01, 0x09, 0x60, 0x07, 0xf0, 0x11, 0xfa, 0x38, 
+	0xf0, 0x01, 0xfa, 0xd6, 0x49, 0x20, 0x20, 0x04, 
+	0xf0, 0x1e, 0xf9, 0x66, 0xf0, 0x1e, 0xf9, 0x5c, 
+	0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 0xf0, 0x1e, 
+	0xf9, 0x5b, 0x20, 0x10, 0xf0, 0x1e, 0xf9, 0x4f, 
+	0x87, 0x67, 0x21, 0x00, 0x1c, 0x30, 0xf7, 0xfd, 
+	0xfd, 0xa9, 0x1c, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0x2c, 0x00, 0x00, 0xfc, 0x2c, 0x00, 0x1f, 0xc0, 
+	0x2e, 0x08, 0x04, 0x98, 0x07, 0x77, 0x77, 0x20, 
+	0x72, 0x00, 0x02, 0x00, 0x2e, 0x08, 0x05, 0x68, 
+	0x6e, 0x00, 0x10, 0x00, 0x6e, 0x00, 0x11, 0x00, 
+	0x6e, 0x00, 0x14, 0x00, 0x6e, 0x00, 0x15, 0x00, 
+	0x6e, 0x00, 0x16, 0x00, 0x6e, 0x00, 0x17, 0x00, 
+	0x6e, 0x00, 0x18, 0x00, 0xcc, 0x00, 0x0f, 0x80, 
+	0x00, 0x80, 0x10, 0x80, 0x2e, 0x08, 0x1a, 0x94, 
+	0x2e, 0x00, 0x54, 0xa1, 0x2e, 0x00, 0x54, 0xc1, 
+	0xff, 0xff, 0xfe, 0xff, 0x2e, 0x08, 0x48, 0x00, 
+	0x2e, 0x00, 0x54, 0x81, 0xb5, 0x90, 0x1c, 0x0c, 
+	0x1c, 0x07, 0xf0, 0x1e, 0xf9, 0x55, 0x2f, 0x01, 
+	0xda, 0x00, 0x27, 0x01, 0x4b, 0x0e, 0x42, 0x9f, 
+	0xdd, 0x00, 0x1c, 0x1f, 0x3f, 0x01, 0x04, 0x3f, 
+	0x4b, 0x0c, 0x18, 0xff, 0x21, 0x03, 0x48, 0x0c, 
+	0x60, 0x01, 0x60, 0x47, 0x21, 0x01, 0x60, 0x01, 
+	0x20, 0x01, 0x1c, 0x21, 0xf0, 0x1e, 0xf9, 0x0c, 
+	0xf0, 0x1e, 0xf9, 0x02, 0x23, 0x02, 0x43, 0xdb, 
+	0x40, 0x18, 0xf0, 0x1e, 0xf9, 0x01, 0xf0, 0x1e, 
+	0xf9, 0x6d, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x00, 0xfd, 0xe8, 0x00, 0x00, 0x9e, 0x34, 
+	0x6e, 0x00, 0x03, 0x00, 0xb5, 0x90, 0x1c, 0x0c, 
+	0x1c, 0x07, 0xf0, 0x1e, 0xf9, 0x29, 0x2f, 0x01, 
+	0xda, 0x00, 0x27, 0x01, 0x4b, 0x0e, 0x42, 0x9f, 
+	0xdd, 0x00, 0x1c, 0x1f, 0x3f, 0x01, 0x04, 0x3f, 
+	0x21, 0x03, 0x37, 0xff, 0x37, 0x96, 0x48, 0x0b, 
+	0x60, 0x01, 0x60, 0x47, 0x21, 0x01, 0x60, 0x01, 
+	0x20, 0x01, 0x1c, 0x21, 0xf0, 0x1e, 0xf8, 0xe0, 
+	0xf0, 0x1e, 0xf8, 0xd6, 0x23, 0x02, 0x43, 0xdb, 
+	0x40, 0x18, 0xf0, 0x1e, 0xf8, 0xd5, 0xf0, 0x1e, 
+	0xf9, 0x41, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x00, 0xfd, 0xe8, 0x6e, 0x00, 0x03, 0x00, 
+	0xb5, 0x00, 0xf0, 0x1e, 0xf9, 0x01, 0x20, 0x03, 
+	0x49, 0x05, 0x60, 0x08, 0xf0, 0x1e, 0xf8, 0xc0, 
+	0x23, 0x02, 0x43, 0x18, 0xf0, 0x1e, 0xf8, 0xc0, 
+	0xf0, 0x1e, 0xf9, 0x2c, 0xbc, 0x08, 0x47, 0x18, 
+	0x6e, 0x00, 0x03, 0x00, 0xb5, 0x90, 0x1c, 0x0c, 
+	0x1c, 0x07, 0xf0, 0x1e, 0xf8, 0xed, 0x2f, 0x01, 
+	0xda, 0x00, 0x27, 0x01, 0x4b, 0x0e, 0x42, 0x9f, 
+	0xdd, 0x00, 0x1c, 0x1f, 0x3f, 0x01, 0x04, 0x3f, 
+	0x4b, 0x0c, 0x18, 0xff, 0x21, 0x03, 0x48, 0x0c, 
+	0x60, 0x01, 0x60, 0x47, 0x21, 0x01, 0x60, 0x01, 
+	0x20, 0x05, 0x1c, 0x21, 0xf0, 0x1e, 0xf8, 0xa4, 
+	0xf0, 0x1e, 0xf8, 0x9a, 0x23, 0x20, 0x43, 0xdb, 
+	0x40, 0x18, 0xf0, 0x1e, 0xf8, 0x99, 0xf0, 0x1e, 
+	0xf9, 0x05, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x00, 0xfd, 0xe8, 0x00, 0x00, 0x9e, 0x34, 
+	0x6e, 0x00, 0x04, 0x00, 0xb5, 0x90, 0x1c, 0x0c, 
+	0x1c, 0x07, 0xf0, 0x1e, 0xf8, 0xc1, 0x2f, 0x01, 
+	0xda, 0x00, 0x27, 0x01, 0x4b, 0x0e, 0x42, 0x9f, 
+	0xdd, 0x00, 0x1c, 0x1f, 0x3f, 0x01, 0x04, 0x3f, 
+	0x21, 0x03, 0x37, 0xff, 0x37, 0x96, 0x48, 0x0b, 
+	0x60, 0x01, 0x60, 0x47, 0x21, 0x01, 0x60, 0x01, 
+	0x20, 0x05, 0x1c, 0x21, 0xf0, 0x1e, 0xf8, 0x78, 
+	0xf0, 0x1e, 0xf8, 0x6e, 0x23, 0x20, 0x43, 0xdb, 
+	0x40, 0x18, 0xf0, 0x1e, 0xf8, 0x6d, 0xf0, 0x1e, 
+	0xf8, 0xd9, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x00, 0xfd, 0xe8, 0x6e, 0x00, 0x04, 0x00, 
+	0xb5, 0x00, 0xf0, 0x1e, 0xf8, 0x99, 0x20, 0x03, 
+	0x49, 0x05, 0x60, 0x08, 0xf0, 0x1e, 0xf8, 0x58, 
+	0x23, 0x20, 0x43, 0x18, 0xf0, 0x1e, 0xf8, 0x58, 
+	0xf0, 0x1e, 0xf8, 0xc4, 0xbc, 0x08, 0x47, 0x18, 
+	0x6e, 0x00, 0x04, 0x00, 0xb5, 0x00, 0x48, 0x0b, 
+	0x68, 0x41, 0x31, 0x14, 0x60, 0x41, 0x68, 0x81, 
+	0x31, 0x01, 0x60, 0x81, 0x48, 0x08, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x28, 0x01, 0xd1, 0x01, 
+	0xf7, 0xfe, 0xfa, 0x52, 0xbc, 0x08, 0x47, 0x18, 
+	0x48, 0x04, 0x21, 0x10, 0xf0, 0x0f, 0xf8, 0x34, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xb4, 
+	0x2e, 0x08, 0x04, 0xfc, 0x2e, 0x08, 0x05, 0xb4, 
+	0xb5, 0x00, 0xf0, 0x1e, 0xf8, 0x69, 0x21, 0x00, 
+	0x48, 0x08, 0x60, 0x41, 0x60, 0x81, 0x49, 0x08, 
+	0x20, 0x07, 0xf0, 0x1e, 0xf8, 0x2d, 0xf0, 0x1e, 
+	0xf8, 0x23, 0x23, 0x80, 0x43, 0xdb, 0x40, 0x18, 
+	0xf0, 0x1e, 0xf8, 0x22, 0xf0, 0x1e, 0xf8, 0x8e, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xb4, 
+	0x2e, 0x00, 0x58, 0xe1, 0x48, 0x01, 0x68, 0x40, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xb4, 
+	0xb5, 0x90, 0x49, 0x0d, 0x1c, 0x0f, 0x48, 0x0d, 
+	0x24, 0x1e, 0x22, 0x10, 0x1c, 0x23, 0xf0, 0x0f, 
+	0xf9, 0x35, 0x22, 0x02, 0x21, 0x10, 0x1c, 0x38, 
+	0x1c, 0x23, 0xf0, 0x0b, 0xfb, 0x9d, 0x49, 0x08, 
+	0x20, 0x10, 0xf0, 0x1e, 0xf8, 0x05, 0xf0, 0x1d, 
+	0xff, 0xfb, 0x4b, 0x06, 0x40, 0x18, 0xf0, 0x1d, 
+	0xff, 0xfb, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x48, 0x10, 0x2e, 0x08, 0x05, 0xb4, 
+	0x2e, 0x00, 0x59, 0xa5, 0xff, 0xfe, 0xff, 0xff, 
+	0xb5, 0x00, 0xb0, 0x86, 0x46, 0x68, 0x49, 0x0c, 
+	0xc9, 0x0c, 0xc0, 0x0c, 0xc9, 0x0c, 0xc0, 0x0c, 
+	0xc9, 0x0c, 0xc0, 0x0c, 0x48, 0x09, 0xab, 0x00, 
+	0xcb, 0x0e, 0xb0, 0x03, 0xf0, 0x0f, 0xf9, 0x3a, 
+	0xb0, 0x03, 0x48, 0x07, 0x68, 0x01, 0x08, 0x4a, 
+	0xd3, 0x04, 0x08, 0x49, 0x00, 0x49, 0x23, 0x04, 
+	0x43, 0x19, 0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x48, 0x10, 0x2e, 0x08, 0x05, 0xb4, 
+	0x2e, 0x08, 0x00, 0x04, 0xb5, 0x80, 0x29, 0x0c, 
+	0xd2, 0x00, 0x21, 0x0c, 0x31, 0x07, 0x08, 0xc9, 
+	0x00, 0xc9, 0x27, 0x00, 0x68, 0x02, 0x42, 0x82, 
+	0xd0, 0x03, 0x68, 0x93, 0x42, 0x8b, 0xd3, 0x0d, 
+	0x1c, 0x17, 0x2f, 0x00, 0xd0, 0x1e, 0x68, 0xb8, 
+	0x1a, 0x42, 0x2a, 0x0c, 0xd2, 0x00, 0x1c, 0x01, 
+	0x1a, 0x42, 0xd1, 0x05, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x76, 0xe0, 0x0c, 0x68, 0x12, 0xe7, 0xea, 
+	0x1d, 0xca, 0x32, 0x01, 0x1a, 0x80, 0x60, 0xb8, 
+	0x19, 0xc0, 0x1d, 0xc7, 0x37, 0x01, 0x20, 0x00, 
+	0x60, 0x38, 0x60, 0x78, 0x60, 0xb9, 0x68, 0xb8, 
+	0x60, 0x38, 0x1d, 0xf8, 0x30, 0x01, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xb0, 0x1f, 0xcc, 
+	0x3c, 0x01, 0x68, 0x21, 0x19, 0x0a, 0x60, 0xa1, 
+	0x68, 0x07, 0x32, 0x08, 0x42, 0x87, 0xd1, 0x06, 
+	0x68, 0x41, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x48, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x42, 0x97, 
+	0xd1, 0x0f, 0x68, 0x7d, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x46, 0x68, 0xa0, 0x68, 0xb9, 0x18, 0x40, 
+	0x30, 0x08, 0x60, 0xa0, 0x1c, 0x20, 0x1c, 0x29, 
+	0xf0, 0x00, 0xf8, 0x36, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0xbb, 0x19, 0xdb, 0x33, 0x08, 
+	0x42, 0xa3, 0xd1, 0x13, 0x68, 0xb8, 0x18, 0x40, 
+	0x30, 0x08, 0x60, 0xb8, 0x19, 0xc0, 0x68, 0x3c, 
+	0x30, 0x08, 0x42, 0xa0, 0xd1, 0xdc, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf8, 0x29, 0x68, 0xb8, 0x68, 0xa1, 
+	0x18, 0x40, 0x30, 0x08, 0x60, 0xb8, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x42, 0xbc, 0xd2, 0x06, 
+	0x68, 0x79, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x14, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0x3f, 
+	0xe7, 0xc0, 0xb5, 0x00, 0x31, 0x10, 0x32, 0x01, 
+	0x1c, 0x0b, 0x1a, 0x51, 0x39, 0x08, 0x60, 0x99, 
+	0x60, 0x00, 0x1c, 0x01, 0x60, 0x40, 0x1c, 0x18, 
+	0xf0, 0x00, 0xf8, 0x02, 0xbc, 0x08, 0x47, 0x18, 
+	0x68, 0x0a, 0x60, 0x02, 0x60, 0x08, 0x68, 0x02, 
+	0x60, 0x50, 0x60, 0x41, 0x47, 0x70, 0xc8, 0x06, 
+	0x38, 0x08, 0x60, 0x11, 0xc8, 0x03, 0x60, 0x41, 
+	0x47, 0x70, 0xb5, 0x00, 0x1c, 0x0a, 0x1c, 0x01, 
+	0x48, 0x02, 0xf7, 0xff, 0xff, 0xde, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xd8, 
+	0xb5, 0x90, 0x1c, 0x07, 0xf0, 0x1d, 0xff, 0x24, 
+	0x23, 0x11, 0x05, 0x1b, 0x1c, 0x04, 0x43, 0x18, 
+	0xf0, 0x1d, 0xff, 0x22, 0x1c, 0x39, 0x48, 0x05, 
+	0xf7, 0xff, 0xff, 0x50, 0x1c, 0x07, 0x1c, 0x20, 
+	0xf0, 0x1d, 0xff, 0x1a, 0x1c, 0x38, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xd8, 
+	0xb5, 0x00, 0x1c, 0x01, 0x48, 0x02, 0xf7, 0xff, 
+	0xff, 0x41, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0xd8, 0xb5, 0x90, 0x1c, 0x07, 
+	0xd0, 0x0e, 0xf0, 0x1d, 0xff, 0x01, 0x23, 0x11, 
+	0x05, 0x1b, 0x1c, 0x04, 0x43, 0x18, 0xf0, 0x1d, 
+	0xfe, 0xff, 0x1c, 0x39, 0x48, 0x04, 0xf7, 0xff, 
+	0xff, 0x61, 0x1c, 0x20, 0xf0, 0x1d, 0xfe, 0xf8, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0xd8, 0xb5, 0x00, 0x4a, 0x04, 
+	0xc2, 0x03, 0x1c, 0x0a, 0x1c, 0x01, 0x48, 0x03, 
+	0xf7, 0xff, 0xff, 0x97, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x05, 0xc0, 0x2e, 0x08, 0x05, 0xd0, 
+	0xb5, 0x00, 0x1c, 0x01, 0x48, 0x02, 0xf7, 0xff, 
+	0xff, 0x11, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0xd0, 0xb5, 0x00, 0x49, 0x08, 
+	0x68, 0x0a, 0x42, 0x90, 0xd3, 0x02, 0x68, 0x49, 
+	0x42, 0x88, 0xd9, 0x03, 0xf7, 0xff, 0xff, 0xc6, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x01, 0x48, 0x03, 
+	0xf7, 0xff, 0xff, 0x30, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x05, 0xc0, 0x2e, 0x08, 0x05, 0xd0, 
+	0xb5, 0x00, 0x4a, 0x05, 0x60, 0x90, 0x60, 0xd1, 
+	0x1c, 0x0a, 0x1c, 0x01, 0x48, 0x03, 0xf7, 0xff, 
+	0xff, 0x68, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0xc0, 0x2e, 0x08, 0x05, 0xe0, 
+	0xb5, 0x00, 0x1c, 0x01, 0x48, 0x02, 0xf7, 0xff, 
+	0xfe, 0xe1, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x05, 0xe0, 0xb5, 0x00, 0x49, 0x08, 
+	0x68, 0x8a, 0x42, 0x90, 0xd3, 0x02, 0x68, 0xc9, 
+	0x42, 0x88, 0xd9, 0x03, 0xf7, 0xff, 0xff, 0x96, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x01, 0x48, 0x03, 
+	0xf7, 0xff, 0xff, 0x00, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x05, 0xc0, 0x2e, 0x08, 0x05, 0xe0, 
+	0xb5, 0xf0, 0x06, 0x07, 0x0e, 0x3f, 0x04, 0x09, 
+	0x0c, 0x09, 0xb0, 0x81, 0x91, 0x00, 0x06, 0x16, 
+	0x0e, 0x36, 0x00, 0xbd, 0x4c, 0x15, 0x59, 0x60, 
+	0x28, 0x00, 0xd1, 0x15, 0xf7, 0xfb, 0xfa, 0x06, 
+	0x22, 0x00, 0xb4, 0x04, 0x23, 0x00, 0x22, 0x02, 
+	0x99, 0x01, 0x1c, 0x38, 0xf0, 0x0a, 0xfd, 0x5c, 
+	0x23, 0x01, 0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 
+	0x1c, 0x38, 0xb0, 0x01, 0xf0, 0x0a, 0xff, 0x18, 
+	0x20, 0x03, 0x00, 0x71, 0x4a, 0x0a, 0x52, 0x50, 
+	0x59, 0x60, 0x30, 0x01, 0x51, 0x60, 0x48, 0x09, 
+	0x23, 0x14, 0x5e, 0xc1, 0x29, 0x00, 0xd1, 0x02, 
+	0x49, 0x07, 0x4a, 0x08, 0x65, 0xd1, 0x8a, 0x81, 
+	0x31, 0x01, 0x82, 0x81, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x02, 0xca, 0x84, 
+	0x2e, 0x08, 0x4a, 0x20, 0x2e, 0x08, 0x07, 0x68, 
+	0x2e, 0x02, 0xc8, 0x94, 0xa0, 0x00, 0x0d, 0x00, 
+	0xb5, 0xb0, 0x06, 0x07, 0x0e, 0x3f, 0x06, 0x0c, 
+	0x0e, 0x24, 0x00, 0xb9, 0x48, 0x1a, 0x58, 0x42, 
+	0x3a, 0x01, 0x50, 0x42, 0xd1, 0x20, 0x23, 0x01, 
+	0x02, 0x9b, 0x00, 0x5a, 0x21, 0x02, 0x1c, 0x38, 
+	0xf0, 0x0a, 0xfe, 0xe6, 0x22, 0x00, 0xb4, 0x04, 
+	0x25, 0x00, 0x1c, 0x38, 0x1c, 0x2b, 0x49, 0x13, 
+	0xf0, 0x0a, 0xfd, 0x1a, 0x00, 0x61, 0xb0, 0x01, 
+	0x48, 0x11, 0x52, 0x45, 0x48, 0x0f, 0x4a, 0x11, 
+	0x52, 0x50, 0x00, 0x79, 0x4a, 0x10, 0x52, 0x50, 
+	0x00, 0x62, 0x19, 0x12, 0x00, 0x92, 0x49, 0x0f, 
+	0x18, 0x53, 0x81, 0x1d, 0x52, 0x88, 0x80, 0x58, 
+	0x48, 0x0d, 0x8a, 0x81, 0x39, 0x01, 0x82, 0x81, 
+	0x23, 0x14, 0x5e, 0xc0, 0x28, 0x00, 0xd1, 0x03, 
+	0x20, 0xd7, 0x00, 0xc0, 0x49, 0x09, 0x65, 0xc8, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x02, 0xca, 0x84, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x4a, 0x20, 0x2e, 0x08, 0x49, 0xe0, 
+	0x2e, 0x08, 0x49, 0xa8, 0x2e, 0x08, 0x48, 0x28, 
+	0x2e, 0x08, 0x07, 0x68, 0xa0, 0x00, 0x0d, 0x00, 
+	0xb5, 0xf0, 0x04, 0x06, 0x0c, 0x36, 0x04, 0x0c, 
+	0x0c, 0x24, 0x1c, 0x17, 0xb0, 0x8a, 0x46, 0x69, 
+	0x1c, 0x30, 0x1c, 0x22, 0xf0, 0x00, 0xf8, 0xb0, 
+	0x23, 0x01, 0x1c, 0x05, 0x42, 0xd8, 0xd1, 0x03, 
+	0xb0, 0x0a, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x4b, 0x4e, 0x42, 0x9c, 0xd1, 0x06, 0xa8, 0x00, 
+	0x88, 0x00, 0x1c, 0x31, 0x1c, 0x2a, 0xf7, 0xff, 
+	0xff, 0x57, 0xe0, 0x7f, 0x20, 0x20, 0x40, 0x20, 
+	0x28, 0x20, 0xd1, 0x1f, 0x06, 0x2a, 0x0e, 0x12, 
+	0xa8, 0x00, 0x88, 0x00, 0x06, 0x00, 0x0e, 0x00, 
+	0x1c, 0x31, 0x1c, 0x23, 0xf7, 0xfd, 0xf8, 0x72, 
+	0x28, 0x00, 0xd0, 0x6f, 0x48, 0x42, 0x00, 0x69, 
+	0x4a, 0x42, 0x52, 0x50, 0xa9, 0x00, 0x88, 0x09, 
+	0x00, 0x49, 0x4a, 0x41, 0x52, 0x50, 0xa8, 0x00, 
+	0x88, 0x00, 0x1c, 0x29, 0xf0, 0x00, 0xf9, 0xce, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x0a, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x21, 0x00, 
+	0xaa, 0x01, 0x88, 0x3b, 0x0a, 0x1b, 0x70, 0x13, 
+	0x88, 0x3b, 0x93, 0x09, 0x32, 0x01, 0x06, 0x1b, 
+	0xd0, 0x02, 0x1c, 0x48, 0x06, 0x00, 0x0e, 0x00, 
+	0x9b, 0x09, 0x70, 0x13, 0x31, 0x01, 0x32, 0x01, 
+	0x37, 0x02, 0x29, 0x0e, 0xdb, 0xed, 0x21, 0x00, 
+	0x23, 0x00, 0x70, 0x13, 0x31, 0x01, 0x32, 0x01, 
+	0x29, 0x04, 0xdb, 0xfa, 0x21, 0x0c, 0x40, 0x21, 
+	0x29, 0x0c, 0xd1, 0x03, 0x04, 0x21, 0x0c, 0x09, 
+	0x24, 0x01, 0x43, 0x0c, 0x28, 0x06, 0xdc, 0x0e, 
+	0x06, 0x22, 0x0e, 0x12, 0xb4, 0x04, 0x06, 0x2a, 
+	0x0e, 0x12, 0xa8, 0x01, 0x88, 0x00, 0x06, 0x00, 
+	0x0e, 0x00, 0x1c, 0x31, 0xab, 0x02, 0xf7, 0xfc, 
+	0xfc, 0x4f, 0xb0, 0x01, 0xe0, 0x1e, 0x28, 0x0a, 
+	0xdc, 0x0e, 0x06, 0x22, 0x0e, 0x12, 0xb4, 0x04, 
+	0x06, 0x2a, 0x0e, 0x12, 0xa8, 0x01, 0x88, 0x00, 
+	0x06, 0x00, 0x0e, 0x00, 0x1c, 0x31, 0xab, 0x02, 
+	0xf7, 0xfc, 0xfc, 0x58, 0xb0, 0x01, 0xe0, 0x0d, 
+	0x06, 0x22, 0x0e, 0x12, 0xb4, 0x04, 0x06, 0x2a, 
+	0x0e, 0x12, 0xa8, 0x01, 0x88, 0x00, 0x06, 0x00, 
+	0x0e, 0x00, 0x1c, 0x31, 0xab, 0x02, 0xf7, 0xfc, 
+	0xfc, 0x63, 0xb0, 0x01, 0x28, 0x00, 0xd0, 0x05, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x0a, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xe7, 0xff, 0xa8, 0x00, 
+	0x88, 0x00, 0x00, 0x6a, 0x19, 0x52, 0x00, 0x92, 
+	0x49, 0x0a, 0x52, 0x88, 0x18, 0x50, 0x80, 0x46, 
+	0x80, 0x84, 0x49, 0x05, 0x80, 0xc1, 0x21, 0x01, 
+	0x81, 0x01, 0x1c, 0x28, 0xb0, 0x0a, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xb9, 0x6a, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0xe0, 
+	0x2e, 0x08, 0x49, 0xa8, 0x2e, 0x08, 0x48, 0x28, 
+	0xb4, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x17, 
+	0x0c, 0x3f, 0xb0, 0x82, 0x48, 0x58, 0x22, 0x00, 
+	0x4d, 0x58, 0x95, 0x01, 0x1c, 0x06, 0x00, 0x53, 
+	0x9d, 0x01, 0x5a, 0xed, 0x42, 0xb5, 0xd1, 0x02, 
+	0x04, 0x10, 0x0c, 0x00, 0xe0, 0x02, 0x32, 0x01, 
+	0x2a, 0x20, 0xdb, 0xf4, 0x42, 0xb0, 0xd1, 0x04, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 0xbc, 0xf0, 
+	0x47, 0x70, 0x80, 0x0e, 0x4a, 0x4e, 0x92, 0x00, 
+	0x4d, 0x4e, 0x4a, 0x4f, 0x4b, 0x4f, 0x42, 0x9f, 
+	0xd1, 0x32, 0x23, 0x00, 0x00, 0x5f, 0x5b, 0xd7, 
+	0x42, 0xa7, 0xd1, 0x0a, 0x00, 0x5f, 0x5b, 0xef, 
+	0x2f, 0x03, 0xd1, 0x01, 0x80, 0x0b, 0xe0, 0x07, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 0xbc, 0xf0, 
+	0x47, 0x70, 0x33, 0x01, 0x2b, 0x1c, 0xdb, 0xed, 
+	0x88, 0x0f, 0x4b, 0x3f, 0x42, 0x9f, 0xd1, 0x0a, 
+	0x27, 0x00, 0x00, 0x7b, 0x5a, 0xd6, 0x4b, 0x3c, 
+	0x42, 0x9e, 0xd1, 0x01, 0x80, 0x0f, 0xe0, 0x02, 
+	0x37, 0x01, 0x2f, 0x1c, 0xdb, 0xf5, 0x88, 0x0f, 
+	0x4b, 0x37, 0x42, 0x9f, 0xd1, 0x04, 0x20, 0x00, 
+	0x43, 0xc0, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
+	0x23, 0x03, 0x00, 0x47, 0x9e, 0x00, 0x53, 0xf3, 
+	0x88, 0x0f, 0x00, 0x7f, 0x53, 0xeb, 0xe0, 0x54, 
+	0x23, 0x20, 0x40, 0x3b, 0x2b, 0x20, 0xd1, 0x1e, 
+	0x23, 0x00, 0x00, 0x5f, 0x5b, 0xd7, 0x42, 0xa7, 
+	0xd1, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 
+	0xbc, 0xf0, 0x47, 0x70, 0x33, 0x01, 0x2b, 0x1c, 
+	0xdb, 0xf3, 0x27, 0x00, 0x00, 0x7b, 0x5a, 0xd5, 
+	0x42, 0xb5, 0xd1, 0x01, 0x80, 0x0f, 0xe0, 0x02, 
+	0x37, 0x01, 0x2f, 0x1c, 0xdb, 0xf6, 0x88, 0x0f, 
+	0x42, 0xb7, 0xd1, 0x36, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 0x23, 0x00, 
+	0x00, 0x5f, 0x5b, 0xd7, 0x42, 0xa7, 0xd1, 0x0a, 
+	0x00, 0x5f, 0x5b, 0xef, 0x2f, 0x02, 0xd1, 0x01, 
+	0x80, 0x0b, 0xe0, 0x07, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 0x33, 0x01, 
+	0x2b, 0x1c, 0xdb, 0xed, 0x88, 0x0f, 0x4b, 0x14, 
+	0x42, 0x9f, 0xd1, 0x0a, 0x27, 0x00, 0x00, 0x7b, 
+	0x5a, 0xd6, 0x4b, 0x11, 0x42, 0x9e, 0xd1, 0x01, 
+	0x80, 0x0f, 0xe0, 0x02, 0x37, 0x01, 0x2f, 0x1c, 
+	0xdb, 0xf5, 0x88, 0x0f, 0x4b, 0x0c, 0x42, 0x9f, 
+	0xd1, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 
+	0xbc, 0xf0, 0x47, 0x70, 0x23, 0x02, 0x00, 0x47, 
+	0x9e, 0x00, 0x53, 0xf3, 0x88, 0x0f, 0x00, 0x7f, 
+	0x53, 0xeb, 0x00, 0x43, 0x9d, 0x01, 0x52, 0xec, 
+	0x88, 0x09, 0x00, 0x49, 0x52, 0x54, 0x04, 0x00, 
+	0x14, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0xe0, 
+	0x2e, 0x08, 0x4a, 0x20, 0x2e, 0x08, 0x4a, 0x60, 
+	0x2e, 0x08, 0x49, 0xa8, 0x00, 0x00, 0xb9, 0x6a, 
+	0xb5, 0xf0, 0x04, 0x07, 0x0c, 0x3f, 0xb0, 0x81, 
+	0x4a, 0x34, 0x92, 0x00, 0x1c, 0x11, 0x42, 0x97, 
+	0xd0, 0x01, 0x2f, 0x20, 0xdb, 0x05, 0x20, 0x00, 
+	0x43, 0xc0, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x7c, 0x4a, 0x2e, 0x5b, 0x10, 
+	0x42, 0x88, 0xd1, 0x05, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x49, 0x28, 0x53, 0x11, 0x23, 0x00, 0x49, 0x29, 
+	0x00, 0x5e, 0x5b, 0x8e, 0x42, 0x86, 0xd1, 0x02, 
+	0x04, 0x1d, 0x0c, 0x2d, 0xe0, 0x02, 0x33, 0x01, 
+	0x2b, 0x1c, 0xdb, 0xf5, 0x23, 0x00, 0x00, 0x5e, 
+	0x5b, 0x96, 0x42, 0x86, 0xd1, 0x03, 0x04, 0x1a, 
+	0x0c, 0x12, 0x92, 0x00, 0xe0, 0x02, 0x33, 0x01, 
+	0x2b, 0x20, 0xdb, 0xf4, 0x9a, 0x00, 0x4e, 0x1b, 
+	0x42, 0xb2, 0xd1, 0x0d, 0x22, 0x00, 0x00, 0x53, 
+	0x5a, 0xcb, 0x42, 0x83, 0xd1, 0x05, 0x23, 0x00, 
+	0x00, 0x50, 0x4a, 0x19, 0x52, 0x13, 0x52, 0x0e, 
+	0xe0, 0x02, 0x32, 0x01, 0x2a, 0x1c, 0xdb, 0xf2, 
+	0x4e, 0x16, 0x5b, 0x30, 0x28, 0x02, 0xd1, 0x05, 
+	0x23, 0x00, 0x53, 0x33, 0x1c, 0x28, 0x1c, 0x39, 
+	0xf0, 0x00, 0xf8, 0x38, 0x5b, 0x30, 0x28, 0x01, 
+	0xd1, 0x0a, 0x1c, 0x38, 0xf7, 0xfc, 0xff, 0xe6, 
+	0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x5b, 0x30, 0x28, 0x03, 0xd1, 0x03, 0x1c, 0x28, 
+	0x1c, 0x39, 0xf7, 0xff, 0xfd, 0xcd, 0x04, 0x38, 
+	0x14, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x49, 0xe0, 0x2e, 0x08, 0x49, 0xa8, 
+	0x2e, 0x08, 0x4a, 0x60, 0x2e, 0x08, 0x4a, 0x20, 
+	0x04, 0x01, 0x0c, 0x09, 0x20, 0x02, 0x00, 0x4b, 
+	0x18, 0x5b, 0x00, 0x9b, 0x4a, 0x03, 0x18, 0x99, 
+	0x81, 0x08, 0x48, 0x03, 0x52, 0xd0, 0x80, 0x48, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x48, 0x28, 
+	0x00, 0x00, 0xff, 0xff, 0xb5, 0x80, 0x04, 0x0f, 
+	0x0c, 0x3f, 0x06, 0x39, 0x0e, 0x09, 0x06, 0x00, 
+	0x0e, 0x00, 0xf7, 0xfc, 0xfc, 0x1b, 0x20, 0x00, 
+	0x00, 0x7b, 0x19, 0xdb, 0x00, 0x9b, 0x4a, 0x04, 
+	0x18, 0x99, 0x81, 0x08, 0x48, 0x03, 0x52, 0xd0, 
+	0x80, 0x48, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x48, 0x28, 0x00, 0x00, 0xff, 0xff, 
+	0xb5, 0x80, 0x04, 0x09, 0x0c, 0x09, 0x78, 0x42, 
+	0x02, 0x12, 0x78, 0x83, 0x43, 0x1a, 0x05, 0x12, 
+	0x0d, 0x12, 0x27, 0x00, 0x43, 0xff, 0x32, 0x03, 
+	0x42, 0x8a, 0xd0, 0x03, 0x1c, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xf0, 0x0b, 0xf9, 0xa0, 
+	0x28, 0x00, 0xd0, 0x03, 0x1c, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x9c, 0x09, 
+	0x04, 0x00, 0x0c, 0x00, 0xb0, 0x81, 0x90, 0x00, 
+	0x06, 0x09, 0x0e, 0x09, 0x06, 0x12, 0x0e, 0x12, 
+	0xb0, 0x88, 0x4f, 0x16, 0x68, 0xb8, 0x28, 0x0c, 
+	0xdb, 0x06, 0x20, 0x00, 0x43, 0xc0, 0xb0, 0x09, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0x23, 0x00, 0x00, 0x45, 0x46, 0x6e, 
+	0x53, 0x73, 0x30, 0x01, 0x04, 0x00, 0x14, 0x00, 
+	0x28, 0x10, 0xdb, 0xf7, 0x02, 0x08, 0x43, 0x10, 
+	0xab, 0x00, 0x80, 0x18, 0x46, 0x6a, 0x21, 0x04, 
+	0x98, 0x08, 0xf7, 0xff, 0xfd, 0x95, 0x28, 0x00, 
+	0xda, 0x01, 0xb0, 0x09, 0xe7, 0xe4, 0x00, 0x81, 
+	0x4a, 0x05, 0x50, 0x54, 0x9b, 0x0c, 0x4a, 0x05, 
+	0x50, 0x53, 0x68, 0xb9, 0x31, 0x01, 0x60, 0xb9, 
+	0xb0, 0x09, 0xe7, 0xd9, 0x2e, 0x08, 0x07, 0x80, 
+	0x2e, 0x08, 0x4b, 0x18, 0x2e, 0x08, 0x4a, 0x98, 
+	0xb5, 0x80, 0x04, 0x07, 0x14, 0x3f, 0xd5, 0x04, 
+	0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x38, 0xf7, 0xff, 0xfe, 0xf4, 
+	0x20, 0x00, 0x00, 0xb9, 0x4a, 0x05, 0x50, 0x50, 
+	0x4a, 0x05, 0x50, 0x50, 0x49, 0x05, 0x68, 0x8a, 
+	0x3a, 0x01, 0x60, 0x8a, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x4a, 0x98, 
+	0x2e, 0x08, 0x4b, 0x18, 0x2e, 0x08, 0x07, 0x80, 
+	0xb5, 0x90, 0x27, 0x00, 0x4c, 0x08, 0x00, 0xb8, 
+	0x58, 0x20, 0x28, 0x00, 0xd0, 0x02, 0x1c, 0x38, 
+	0xf7, 0xff, 0xff, 0xd6, 0x37, 0x01, 0x2f, 0x20, 
+	0xdb, 0xf5, 0x20, 0x00, 0x49, 0x03, 0x60, 0xc8, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x4a, 0x98, 0x2e, 0x08, 0x07, 0x80, 
+	0xb5, 0x00, 0xf7, 0xff, 0xff, 0xe5, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0xff, 0x04, 0x00, 0x14, 0x00, 
+	0xb0, 0x83, 0x90, 0x00, 0x1c, 0x0f, 0x04, 0x11, 
+	0x0c, 0x09, 0x24, 0x00, 0x1c, 0x38, 0x1c, 0x0d, 
+	0xb0, 0x81, 0xf7, 0xff, 0xff, 0x59, 0x1c, 0x01, 
+	0x20, 0x00, 0x29, 0x00, 0xd0, 0x04, 0xb0, 0x04, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x78, 0xf9, 0x02, 0x09, 0x79, 0x3a, 0x43, 0x11, 
+	0x04, 0x09, 0x0c, 0x09, 0x9b, 0x07, 0x88, 0x1a, 
+	0x42, 0x91, 0xd0, 0x01, 0xb0, 0x04, 0xe7, 0xef, 
+	0x7a, 0x39, 0x02, 0x09, 0x7a, 0x7a, 0x43, 0x11, 
+	0x04, 0xc9, 0x0c, 0xc9, 0x91, 0x00, 0x7a, 0xb9, 
+	0x02, 0x09, 0x7a, 0xfa, 0x43, 0x11, 0x05, 0x0b, 
+	0x0d, 0x1b, 0x1d, 0xf9, 0x31, 0x05, 0x27, 0x00, 
+	0x1d, 0xd8, 0x30, 0x09, 0x1a, 0x2a, 0x2b, 0x00, 
+	0xdd, 0x0a, 0x78, 0x08, 0x28, 0x09, 0xd1, 0x00, 
+	0x37, 0x01, 0x78, 0x48, 0x1c, 0x85, 0x1b, 0x5b, 
+	0x18, 0x40, 0x1c, 0x81, 0x2b, 0x00, 0xdc, 0xf4, 
+	0x2a, 0x00, 0xdd, 0x36, 0x48, 0x2c, 0x88, 0x06, 
+	0x96, 0x03, 0x88, 0x85, 0x95, 0x02, 0x78, 0xc8, 
+	0x02, 0x00, 0x79, 0x0b, 0x43, 0x18, 0x05, 0x00, 
+	0x0d, 0x00, 0x78, 0x0b, 0x2b, 0x01, 0xd0, 0x01, 
+	0x2b, 0x02, 0xd1, 0x06, 0x78, 0x4d, 0x02, 0x2d, 
+	0x78, 0x8e, 0x43, 0x35, 0x04, 0xed, 0x0c, 0xed, 
+	0x9e, 0x03, 0x2b, 0x04, 0xd0, 0x01, 0x2b, 0x03, 
+	0xd1, 0x09, 0x78, 0x4b, 0x02, 0x1b, 0x78, 0x8d, 
+	0x43, 0x2b, 0x04, 0xdb, 0x0c, 0xdb, 0x9d, 0x02, 
+	0x42, 0xab, 0xd1, 0x00, 0x24, 0x01, 0x1d, 0x43, 
+	0x1a, 0xd2, 0x31, 0x05, 0x28, 0x00, 0xdd, 0x0a, 
+	0x78, 0x0b, 0x2b, 0x09, 0xd1, 0x00, 0x37, 0x01, 
+	0x78, 0x4b, 0x1c, 0x9d, 0x1b, 0x40, 0x18, 0x59, 
+	0x31, 0x02, 0x28, 0x00, 0xdc, 0xf4, 0x2a, 0x00, 
+	0xdc, 0xcd, 0x2c, 0x00, 0xd0, 0x17, 0xf7, 0xff, 
+	0xff, 0x63, 0x99, 0x00, 0x48, 0x0f, 0x80, 0x01, 
+	0x2f, 0x00, 0xd0, 0x0d, 0x20, 0x0a, 0xb0, 0x84, 
+	0xab, 0x00, 0x80, 0x18, 0x20, 0x02, 0x70, 0x98, 
+	0x9b, 0x0b, 0x93, 0x01, 0x46, 0x69, 0x20, 0x75, 
+	0xf0, 0x04, 0xff, 0x76, 0xb0, 0x04, 0xe0, 0x07, 
+	0xf7, 0xfa, 0xf8, 0xf4, 0xe0, 0x04, 0x98, 0x01, 
+	0xf7, 0xff, 0xff, 0x2a, 0xf0, 0x00, 0xf8, 0x22, 
+	0x20, 0x00, 0xb0, 0x04, 0xe7, 0x74, 0x00, 0x00, 
+	0x2e, 0x08, 0x07, 0x80, 0x2e, 0x08, 0x00, 0x08, 
+	0xb4, 0x90, 0x04, 0x02, 0x0c, 0x12, 0x04, 0x0f, 
+	0x0c, 0x3f, 0x4b, 0x07, 0x68, 0xd8, 0x28, 0x80, 
+	0xda, 0x08, 0x2a, 0x00, 0xd0, 0x06, 0x00, 0x41, 
+	0x4c, 0x04, 0x52, 0x67, 0x4f, 0x04, 0x52, 0x7a, 
+	0x30, 0x01, 0x60, 0xd8, 0xbc, 0x90, 0x47, 0x70, 
+	0x2e, 0x08, 0x07, 0x80, 0x2e, 0x08, 0x4b, 0x98, 
+	0x2e, 0x08, 0x4c, 0x98, 0xb5, 0x90, 0x4f, 0x13, 
+	0x24, 0x00, 0x43, 0xe4, 0x68, 0xf8, 0x28, 0x00, 
+	0xd1, 0x03, 0x1c, 0x20, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x40, 0x49, 0x0e, 0x18, 0x41, 
+	0x1e, 0x8a, 0xb4, 0x04, 0x49, 0x0d, 0x18, 0x40, 
+	0x38, 0x40, 0x8f, 0xc0, 0x4b, 0x0c, 0x22, 0xff, 
+	0x21, 0x02, 0xf7, 0xff, 0xfe, 0xaf, 0xb0, 0x01, 
+	0x28, 0x00, 0xda, 0x03, 0x1c, 0x20, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x68, 0xf8, 0x38, 0x01, 
+	0x60, 0xf8, 0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x07, 0x80, 
+	0x2e, 0x08, 0x4c, 0x98, 0x2e, 0x08, 0x4b, 0x98, 
+	0x2e, 0x00, 0x62, 0xef, 0xb5, 0xf0, 0x04, 0x05, 
+	0x14, 0x2d, 0x1c, 0x0f, 0x04, 0x11, 0x0c, 0x09, 
+	0x1c, 0x0e, 0x4c, 0x28, 0x23, 0x02, 0x69, 0x20, 
+	0x42, 0xd8, 0xd0, 0x04, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfe, 0x6b, 0x28, 0x00, 0xd0, 0x06, 0x1c, 0x28, 
+	0xf7, 0xff, 0xfe, 0xc2, 0x20, 0x00, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x79, 0xb8, 0x69, 0x21, 
+	0x42, 0x88, 0xd1, 0x09, 0x20, 0x01, 0x43, 0xc0, 
+	0x61, 0x20, 0x1c, 0x28, 0xf7, 0xff, 0xfe, 0xb4, 
+	0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x23, 0x01, 0x42, 0xd9, 0xd1, 0x02, 0x61, 0x20, 
+	0x20, 0x00, 0x60, 0xe0, 0x37, 0x08, 0x1f, 0xf4, 
+	0x3c, 0x05, 0x2c, 0x00, 0xdd, 0x11, 0x78, 0x38, 
+	0x02, 0x00, 0x78, 0x79, 0x43, 0x08, 0x04, 0x00, 
+	0x0c, 0x00, 0x78, 0xb9, 0x02, 0x09, 0x78, 0xfa, 
+	0x43, 0x11, 0x04, 0xc9, 0x0c, 0xc9, 0xf7, 0xff, 
+	0xff, 0x77, 0x37, 0x04, 0x3c, 0x04, 0x2c, 0x00, 
+	0xdc, 0xed, 0xf7, 0xff, 0xff, 0x8b, 0xf7, 0xff, 
+	0xff, 0x89, 0xf7, 0xff, 0xff, 0x87, 0xf7, 0xff, 
+	0xff, 0x85, 0xf7, 0xff, 0xff, 0x83, 0xf7, 0xff, 
+	0xff, 0x81, 0xf7, 0xff, 0xff, 0x7f, 0xf7, 0xff, 
+	0xff, 0x7d, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x07, 0x80, 
+	0xb5, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x26, 0x00, 0x43, 0xf6, 0x4f, 0x0f, 
+	0x62, 0x3e, 0x61, 0xfe, 0x61, 0xbe, 0xf7, 0xff, 
+	0xfe, 0x8f, 0x2d, 0x00, 0xd0, 0x13, 0x2c, 0x00, 
+	0xd0, 0x11, 0x0c, 0xf0, 0x42, 0x85, 0xd0, 0x0e, 
+	0x42, 0x84, 0xd0, 0x0c, 0x80, 0x3c, 0x80, 0xbd, 
+	0x20, 0x00, 0x61, 0x3e, 0x22, 0x00, 0x61, 0x78, 
+	0xb4, 0x04, 0x4b, 0x05, 0x22, 0xff, 0x21, 0x00, 
+	0xf7, 0xff, 0xfe, 0x1c, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x07, 0x80, 
+	0x2e, 0x00, 0x64, 0xc9, 0x56, 0x47, 0x41, 0x38, 
+	0x78, 0x31, 0x36, 0x00, 0xb5, 0x00, 0xb0, 0x81, 
+	0x48, 0x05, 0x69, 0xc0, 0x68, 0x80, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x00, 0xf0, 0x13, 0xfa, 0x22, 
+	0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb5, 0xf0, 0x27, 0x00, 
+	0xb0, 0x85, 0x97, 0x00, 0x26, 0x10, 0x96, 0x01, 
+	0x25, 0x05, 0x01, 0xed, 0x95, 0x02, 0x20, 0xff, 
+	0x30, 0xd1, 0x90, 0x03, 0x97, 0x04, 0x22, 0x00, 
+	0x21, 0x00, 0xb4, 0x06, 0x4c, 0x0d, 0x69, 0xe0, 
+	0x68, 0x81, 0x1c, 0x08, 0xaa, 0x02, 0x1c, 0x3b, 
+	0xf0, 0x13, 0xfc, 0x8a, 0xb0, 0x02, 0x97, 0x00, 
+	0x20, 0xff, 0x30, 0xd1, 0x90, 0x01, 0x95, 0x02, 
+	0x96, 0x03, 0x97, 0x04, 0x69, 0xe0, 0x68, 0x80, 
+	0x46, 0x69, 0xf0, 0x13, 0xfb, 0xbb, 0xf7, 0xff, 
+	0xff, 0xc9, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0x90, 0x20, 0x07, 0xb0, 0x85, 0xf0, 0x08, 
+	0xff, 0xaf, 0x24, 0xff, 0x34, 0xe1, 0x22, 0x05, 
+	0x01, 0xd2, 0x21, 0x00, 0x20, 0x07, 0x1c, 0x23, 
+	0xf0, 0x08, 0xff, 0xbe, 0x27, 0x00, 0x22, 0x00, 
+	0x21, 0x02, 0x20, 0x07, 0x1c, 0x3b, 0xf0, 0x09, 
+	0xfb, 0x67, 0x22, 0x01, 0x21, 0x01, 0x20, 0x07, 
+	0x1c, 0x3b, 0xf0, 0x09, 0xfb, 0x19, 0x22, 0x32, 
+	0x21, 0x32, 0x20, 0x07, 0xf0, 0x09, 0xf8, 0x74, 
+	0x97, 0x00, 0x97, 0x01, 0x20, 0x05, 0x01, 0xc0, 
+	0x90, 0x02, 0x94, 0x03, 0x97, 0x04, 0x48, 0x06, 
+	0x69, 0xc0, 0x68, 0x80, 0x46, 0x69, 0xf0, 0x13, 
+	0xfb, 0x85, 0xf7, 0xff, 0xff, 0x93, 0xb0, 0x05, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb4, 0x80, 0x01, 0x00, 
+	0x4b, 0x2a, 0x18, 0xc0, 0x4b, 0x2a, 0x69, 0xdb, 
+	0x69, 0x9f, 0x00, 0x8b, 0x18, 0x59, 0x02, 0x09, 
+	0x18, 0x89, 0x18, 0x79, 0x78, 0x02, 0x70, 0x0a, 
+	0x78, 0x42, 0x1d, 0xcb, 0x33, 0x39, 0x74, 0x1a, 
+	0x78, 0x82, 0x1d, 0xcb, 0x33, 0x99, 0x70, 0x1a, 
+	0x78, 0xc2, 0x1d, 0xcb, 0x33, 0xd9, 0x74, 0x1a, 
+	0x79, 0x02, 0x1d, 0xcb, 0x33, 0xff, 0x33, 0x3a, 
+	0x70, 0x1a, 0x79, 0x42, 0x1d, 0xcb, 0x33, 0xff, 
+	0x33, 0x7a, 0x74, 0x1a, 0x79, 0x82, 0x1d, 0xcb, 
+	0x33, 0xff, 0x33, 0xda, 0x70, 0x1a, 0x79, 0xc2, 
+	0x23, 0x11, 0x01, 0x5b, 0x18, 0xcb, 0x74, 0x1a, 
+	0x7a, 0x02, 0x23, 0x05, 0x01, 0xdb, 0x18, 0xcb, 
+	0x70, 0x1a, 0x7a, 0x42, 0x23, 0x0b, 0x01, 0x9b, 
+	0x18, 0xcb, 0x74, 0x1a, 0x7a, 0x82, 0x23, 0x19, 
+	0x01, 0x5b, 0x18, 0xcb, 0x70, 0x1a, 0x7a, 0xc2, 
+	0x23, 0x1b, 0x01, 0x5b, 0x18, 0xcb, 0x74, 0x1a, 
+	0x7b, 0x02, 0x23, 0x0f, 0x01, 0x9b, 0x18, 0xcb, 
+	0x70, 0x1a, 0x7b, 0x42, 0x23, 0x01, 0x02, 0x9b, 
+	0x18, 0xcb, 0x74, 0x1a, 0x7b, 0x82, 0x23, 0x23, 
+	0x01, 0x5b, 0x18, 0xcb, 0x70, 0x1a, 0x7b, 0xc0, 
+	0x23, 0x25, 0x01, 0x5b, 0x18, 0xc9, 0x74, 0x08, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x07, 0xa4, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb5, 0xb0, 0x23, 0x00, 
+	0x1c, 0x07, 0x56, 0xc0, 0x1c, 0x14, 0x1c, 0x0d, 
+	0x28, 0x00, 0xd0, 0x0f, 0x20, 0x50, 0x1c, 0x21, 
+	0xf0, 0x17, 0xfd, 0x3e, 0x19, 0x41, 0x23, 0x00, 
+	0x56, 0xf8, 0x1c, 0x22, 0xf7, 0xff, 0xff, 0x92, 
+	0x23, 0x00, 0x37, 0x01, 0x56, 0xf8, 0x34, 0x01, 
+	0x28, 0x00, 0xd1, 0xef, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x90, 0x06, 0x00, 0x0e, 0x00, 
+	0x04, 0x09, 0x14, 0x09, 0x04, 0x17, 0x14, 0x3f, 
+	0x09, 0x03, 0xb0, 0x81, 0x4a, 0x08, 0x5c, 0xd4, 
+	0xab, 0x00, 0x70, 0x1c, 0x07, 0x00, 0x0f, 0x00, 
+	0x5c, 0x10, 0x70, 0x58, 0x20, 0x00, 0x70, 0x98, 
+	0x46, 0x68, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0xce, 
+	0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x17, 0xbc, 0xb5, 0x90, 0x04, 0x00, 
+	0x0c, 0x00, 0x04, 0x09, 0x14, 0x09, 0x04, 0x17, 
+	0x14, 0x3f, 0x0b, 0x03, 0xb0, 0x82, 0x4a, 0x0f, 
+	0x5c, 0xd4, 0xab, 0x00, 0x70, 0x1c, 0x0a, 0x03, 
+	0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xd4, 0xab, 0x00, 
+	0x70, 0x5c, 0x09, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
+	0x5c, 0xd4, 0xab, 0x00, 0x70, 0x9c, 0x07, 0x00, 
+	0x0f, 0x00, 0x5c, 0x10, 0x70, 0xd8, 0x20, 0x00, 
+	0x71, 0x18, 0x46, 0x68, 0x1c, 0x3a, 0xf7, 0xff, 
+	0xff, 0xa5, 0xb0, 0x02, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x17, 0xbc, 
+	0xb5, 0x90, 0x04, 0x0f, 0x14, 0x3f, 0x04, 0x12, 
+	0x14, 0x12, 0x0f, 0x03, 0xb0, 0x83, 0x49, 0x1b, 
+	0x5c, 0xcc, 0xab, 0x00, 0x70, 0x1c, 0x0e, 0x03, 
+	0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xcc, 0xab, 0x00, 
+	0x70, 0x5c, 0x0d, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
+	0x5c, 0xcc, 0xab, 0x00, 0x70, 0x9c, 0x0c, 0x03, 
+	0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xcc, 0xab, 0x00, 
+	0x70, 0xdc, 0x0b, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
+	0x5c, 0xcc, 0xab, 0x01, 0x70, 0x1c, 0x0a, 0x03, 
+	0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xcc, 0xab, 0x01, 
+	0x70, 0x5c, 0x09, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
+	0x5c, 0xcc, 0xab, 0x01, 0x70, 0x9c, 0x07, 0x00, 
+	0x0f, 0x00, 0x5c, 0x08, 0x70, 0xd8, 0x20, 0x00, 
+	0x71, 0x18, 0x46, 0x68, 0x1c, 0x39, 0xf7, 0xff, 
+	0xff, 0x65, 0xb0, 0x03, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x17, 0xbc, 
+	0xb5, 0xf0, 0x1c, 0x04, 0x04, 0x10, 0x14, 0x00, 
+	0xb0, 0x81, 0x90, 0x00, 0x04, 0x1e, 0x14, 0x36, 
+	0x22, 0x3c, 0x1c, 0x20, 0x1c, 0x0f, 0xb0, 0x85, 
+	0xf0, 0x17, 0xfc, 0xd2, 0xa3, 0x72, 0xcb, 0x0c, 
+	0xf0, 0x17, 0xfc, 0xde, 0xf0, 0x17, 0xfc, 0xe0, 
+	0x4d, 0x71, 0x5c, 0x28, 0xab, 0x02, 0x70, 0x18, 
+	0x22, 0x38, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0xc3, 0xa3, 0x6b, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0xcf, 0xf0, 0x17, 0xfc, 0xd1, 0x5c, 0x28, 
+	0xab, 0x02, 0x70, 0x58, 0x22, 0x34, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0xb5, 0xa3, 0x64, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0xc1, 0xf0, 0x17, 
+	0xfc, 0xc3, 0x5c, 0x28, 0xab, 0x02, 0x70, 0x98, 
+	0x22, 0x30, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0xa7, 0xa3, 0x5d, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0xb3, 0xf0, 0x17, 0xfc, 0xb5, 0x5c, 0x28, 
+	0xab, 0x02, 0x70, 0xd8, 0x22, 0x2c, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0x99, 0xa3, 0x56, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0xa5, 0xf0, 0x17, 
+	0xfc, 0xa7, 0x5c, 0x28, 0xab, 0x03, 0x70, 0x18, 
+	0x22, 0x28, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0x8b, 0xa3, 0x4f, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0x97, 0xf0, 0x17, 0xfc, 0x99, 0x5c, 0x28, 
+	0xab, 0x03, 0x70, 0x58, 0x22, 0x24, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0x7d, 0xa3, 0x48, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0x89, 0xf0, 0x17, 
+	0xfc, 0x8b, 0x5c, 0x28, 0xab, 0x03, 0x70, 0x98, 
+	0x22, 0x20, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0x6f, 0xa3, 0x41, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0x7b, 0xf0, 0x17, 0xfc, 0x7d, 0x5c, 0x28, 
+	0xab, 0x03, 0x70, 0xd8, 0x22, 0x1c, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0x61, 0xa3, 0x3a, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0x6d, 0xf0, 0x17, 
+	0xfc, 0x6f, 0x5c, 0x28, 0xab, 0x00, 0x70, 0x18, 
+	0x22, 0x18, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0x53, 0xa3, 0x33, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0x5f, 0xf0, 0x17, 0xfc, 0x61, 0x5c, 0x28, 
+	0xab, 0x00, 0x70, 0x58, 0x22, 0x14, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0x45, 0xa3, 0x2c, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0x51, 0xf0, 0x17, 
+	0xfc, 0x53, 0x5c, 0x28, 0xab, 0x00, 0x70, 0x98, 
+	0x22, 0x10, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0x37, 0xa3, 0x25, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0x43, 0xf0, 0x17, 0xfc, 0x45, 0x5c, 0x28, 
+	0xab, 0x00, 0x70, 0xd8, 0x22, 0x0c, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0x29, 0xa3, 0x1e, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0x35, 0xf0, 0x17, 
+	0xfc, 0x37, 0x5c, 0x28, 0xab, 0x01, 0x70, 0x18, 
+	0x22, 0x08, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x17, 
+	0xfc, 0x1b, 0xa3, 0x17, 0xcb, 0x0c, 0xf0, 0x17, 
+	0xfc, 0x27, 0xf0, 0x17, 0xfc, 0x29, 0x5c, 0x28, 
+	0xab, 0x01, 0x70, 0x58, 0x22, 0x04, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf0, 0x17, 0xfc, 0x0d, 0xa3, 0x10, 
+	0xcb, 0x0c, 0xf0, 0x17, 0xfc, 0x19, 0xf0, 0x17, 
+	0xfc, 0x1b, 0x5c, 0x28, 0xab, 0x01, 0x70, 0x98, 
+	0xa3, 0x0b, 0xcb, 0x0c, 0x1c, 0x20, 0x1c, 0x39, 
+	0xf0, 0x17, 0xfc, 0x0e, 0xf0, 0x17, 0xfc, 0x10, 
+	0x5c, 0x28, 0xab, 0x01, 0x70, 0xd8, 0x20, 0x00, 
+	0x73, 0x18, 0x46, 0x68, 0x99, 0x05, 0x1c, 0x32, 
+	0x33, 0x0c, 0xf7, 0xff, 0xfe, 0x6f, 0xb0, 0x06, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0x17, 0xbc, 0x21, 0x00, 0xb0, 0x81, 
+	0x91, 0x00, 0xe0, 0x02, 0x99, 0x00, 0x31, 0x01, 
+	0x91, 0x00, 0x99, 0x00, 0x42, 0x81, 0xdb, 0xf9, 
+	0xb0, 0x01, 0x47, 0x70, 0xb5, 0xf0, 0x06, 0x06, 
+	0x0e, 0x36, 0x25, 0x02, 0x48, 0x0d, 0x60, 0x05, 
+	0x27, 0x07, 0x4c, 0x0d, 0x60, 0x25, 0x20, 0x01, 
+	0x40, 0xb8, 0x40, 0x30, 0xd0, 0x01, 0x20, 0x03, 
+	0xe0, 0x00, 0x20, 0x02, 0x49, 0x09, 0x60, 0x08, 
+	0x20, 0x0a, 0xf7, 0xff, 0xff, 0xdf, 0x20, 0x03, 
+	0x60, 0x20, 0x20, 0x0c, 0xf7, 0xff, 0xff, 0xda, 
+	0x3f, 0x01, 0xd5, 0xeb, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x6e, 0x00, 0x14, 0x00, 
+	0x6e, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x12, 0x00, 
+	0xb5, 0x80, 0x06, 0x00, 0x0e, 0x00, 0x06, 0x0f, 
+	0x0e, 0x3f, 0x06, 0x00, 0x0e, 0x00, 0x23, 0x80, 
+	0x43, 0x18, 0xf7, 0xff, 0xff, 0xcf, 0x20, 0x14, 
+	0xf7, 0xff, 0xff, 0xc0, 0x1c, 0x38, 0xf7, 0xff, 
+	0xff, 0xc9, 0x20, 0x03, 0x49, 0x04, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0x04, 0x60, 0x08, 0x49, 0x04, 
+	0x60, 0x08, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x6e, 0x00, 0x14, 0x00, 0x6e, 0x00, 0x12, 0x00, 
+	0x6e, 0x00, 0x13, 0x00, 0xb5, 0x00, 0x21, 0x01, 
+	0x20, 0x02, 0xf7, 0xff, 0xff, 0xd9, 0x48, 0x10, 
+	0xf7, 0xff, 0xff, 0xa4, 0x21, 0x00, 0x20, 0x02, 
+	0xf7, 0xff, 0xff, 0xd2, 0x48, 0x0d, 0xf7, 0xff, 
+	0xff, 0x9d, 0x21, 0x44, 0x20, 0x00, 0xf7, 0xff, 
+	0xff, 0xcb, 0x21, 0x81, 0x20, 0x01, 0xf7, 0xff, 
+	0xff, 0xc7, 0x21, 0xf0, 0x20, 0x02, 0xf7, 0xff, 
+	0xff, 0xc3, 0x21, 0x45, 0x20, 0x03, 0xf7, 0xff, 
+	0xff, 0xbf, 0x21, 0x45, 0x20, 0x04, 0xf7, 0xff, 
+	0xff, 0xbb, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x00, 0x00, 0x4e, 0x20, 0x00, 0x00, 0xc3, 0x50, 
+	0xb5, 0x80, 0x06, 0x07, 0x0e, 0x3f, 0x06, 0x08, 
+	0x0e, 0x00, 0x28, 0x45, 0xdd, 0x00, 0x20, 0x45, 
+	0x1d, 0xc1, 0x31, 0x79, 0x20, 0x03, 0xf7, 0xff, 
+	0xff, 0xa7, 0x2f, 0x45, 0xdd, 0x00, 0x27, 0x45, 
+	0x20, 0x04, 0x1d, 0xf9, 0x31, 0x79, 0xf7, 0xff, 
+	0xff, 0x9f, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x00, 0xf0, 0x1c, 0xfe, 0xcd, 0x23, 0x01, 
+	0x03, 0x5b, 0x43, 0x18, 0xf0, 0x1c, 0xfe, 0xcc, 
+	0xf0, 0x1c, 0xfe, 0xc6, 0x23, 0x01, 0x03, 0x9b, 
+	0x43, 0x18, 0xf0, 0x1c, 0xfe, 0xc5, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x00, 0xf0, 0x1c, 0xfe, 0xbc, 
+	0x4b, 0x05, 0x40, 0x18, 0xf0, 0x1c, 0xfe, 0xbc, 
+	0xf0, 0x1c, 0xfe, 0xb6, 0x4b, 0x03, 0x40, 0x18, 
+	0xf0, 0x1c, 0xfe, 0xb6, 0xbc, 0x08, 0x47, 0x18, 
+	0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xdf, 0xff, 
+	0xb5, 0x80, 0x1c, 0x07, 0xf7, 0xff, 0xff, 0xd8, 
+	0x07, 0xf8, 0x0f, 0x40, 0x49, 0x0a, 0x58, 0x08, 
+	0x0c, 0x39, 0xd3, 0x05, 0x23, 0x01, 0x02, 0x5b, 
+	0x68, 0x01, 0x43, 0x19, 0x60, 0x01, 0xe0, 0x03, 
+	0x68, 0x01, 0x4b, 0x06, 0x40, 0x19, 0x60, 0x01, 
+	0xf0, 0x13, 0xff, 0x5e, 0xf7, 0xff, 0xff, 0xd5, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0x44, 0xff, 0xff, 0xfd, 0xff, 
+	0xb5, 0x00, 0x4a, 0x09, 0x1f, 0x11, 0x20, 0x0e, 
+	0xf0, 0x13, 0xff, 0x08, 0x28, 0x00, 0xd1, 0x09, 
+	0x48, 0x06, 0xf0, 0x13, 0xff, 0x49, 0x49, 0x06, 
+	0x20, 0x0e, 0xf0, 0x1c, 0xfe, 0x85, 0xf7, 0xff, 
+	0xff, 0xbc, 0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x17, 0xe0, 0x2e, 0x08, 0x1a, 0x38, 
+	0x2e, 0x00, 0x6c, 0xab, 0xb5, 0x00, 0xf7, 0xff, 
+	0xff, 0x9f, 0x21, 0x00, 0x20, 0x0e, 0xf0, 0x1c, 
+	0xfe, 0x73, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x80, 
+	0xa0, 0x0d, 0x22, 0x00, 0x21, 0x0b, 0xf7, 0xff, 
+	0xfd, 0x61, 0x4f, 0x0d, 0x22, 0x0a, 0x21, 0x0b, 
+	0x68, 0x38, 0xf7, 0xff, 0xfd, 0xbd, 0x68, 0x38, 
+	0x30, 0x01, 0x60, 0x38, 0x48, 0x09, 0x7c, 0x01, 
+	0x29, 0x01, 0xd1, 0x05, 0x69, 0x41, 0x29, 0xff, 
+	0xd0, 0x02, 0x20, 0x01, 0xf0, 0x00, 0xf8, 0x0c, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x49, 0x52, 0x20, 0x49, 0x52, 0x51, 0x3a, 0x00, 
+	0x2e, 0x08, 0x1a, 0x4c, 0x2e, 0x08, 0x17, 0xcc, 
+	0xb5, 0x90, 0x06, 0x0c, 0x0e, 0x24, 0x1c, 0x07, 
+	0xf7, 0xff, 0xff, 0x6e, 0x48, 0x11, 0x68, 0x01, 
+	0x00, 0x49, 0x08, 0x49, 0x07, 0xfa, 0x43, 0x11, 
+	0x0a, 0x09, 0x02, 0x09, 0x43, 0x21, 0x60, 0x01, 
+	0x68, 0xc2, 0x2a, 0x00, 0xd1, 0x11, 0x68, 0x82, 
+	0x1c, 0x53, 0x68, 0x82, 0x60, 0x83, 0x00, 0x92, 
+	0x4b, 0x09, 0x50, 0x99, 0x68, 0x81, 0x29, 0x64, 
+	0xd1, 0x01, 0x21, 0x00, 0x60, 0x81, 0x68, 0x81, 
+	0x68, 0x42, 0x42, 0x91, 0xd1, 0x01, 0x21, 0x01, 
+	0x60, 0xc1, 0xf7, 0xff, 0xff, 0x5e, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x17, 0xcc, 
+	0x2e, 0x08, 0x4d, 0x98, 0xb5, 0x90, 0x1c, 0x07, 
+	0xf7, 0xff, 0xff, 0x42, 0x48, 0x10, 0x68, 0xc1, 
+	0x24, 0x00, 0x29, 0x00, 0xd1, 0x03, 0x68, 0x41, 
+	0x68, 0x82, 0x42, 0x91, 0xd0, 0x12, 0x68, 0x41, 
+	0x1c, 0x4a, 0x68, 0x41, 0x60, 0x42, 0x00, 0x89, 
+	0x4a, 0x0a, 0x58, 0x51, 0x60, 0x39, 0x68, 0x41, 
+	0x29, 0x64, 0xd1, 0x00, 0x60, 0x44, 0x60, 0xc4, 
+	0xf7, 0xff, 0xff, 0x3b, 0x20, 0x01, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xff, 0x35, 
+	0x1c, 0x20, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x17, 0xcc, 0x2e, 0x08, 0x4d, 0x98, 
+	0xb5, 0x80, 0xb0, 0x81, 0x4f, 0x0e, 0x8e, 0xb8, 
+	0x28, 0x00, 0xd1, 0x04, 0x46, 0x68, 0xf7, 0xff, 
+	0xff, 0xcd, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x00, 
+	0x43, 0xc0, 0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x98, 0x00, 0x49, 0x07, 0x60, 0x08, 
+	0x20, 0x08, 0x85, 0x38, 0x20, 0x04, 0x85, 0x78, 
+	0x20, 0x0f, 0x02, 0x40, 0x86, 0xb8, 0x20, 0x01, 
+	0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x1e, 0x00, 
+	0xb5, 0x00, 0x49, 0x0b, 0xca, 0x08, 0xc1, 0x08, 
+	0xca, 0x08, 0xc1, 0x08, 0xca, 0x0c, 0xc1, 0x0c, 
+	0x78, 0x01, 0x48, 0x08, 0x70, 0x01, 0x78, 0x00, 
+	0x28, 0x01, 0xd1, 0x04, 0xf0, 0x00, 0xf8, 0x41, 
+	0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x4f, 0x28, 0x2e, 0x08, 0x1a, 0x50, 
+	0xb5, 0x90, 0x27, 0x00, 0x48, 0x13, 0x70, 0x07, 
+	0x20, 0x02, 0xf0, 0x04, 0xfb, 0x57, 0x28, 0x00, 
+	0xd1, 0x03, 0x1c, 0x38, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x00, 0x21, 0x01, 0x4a, 0x0e, 
+	0x00, 0x43, 0x18, 0x1b, 0x00, 0x9b, 0x18, 0x9c, 
+	0x70, 0xa1, 0x52, 0xd7, 0x30, 0x01, 0x28, 0x02, 
+	0xdb, 0xf6, 0x22, 0x00, 0x1c, 0x08, 0x4c, 0x09, 
+	0x00, 0x53, 0x18, 0x9b, 0x00, 0xdb, 0x19, 0x19, 
+	0x70, 0x88, 0x52, 0xe7, 0x70, 0xcf, 0x32, 0x01, 
+	0x2a, 0x08, 0xdb, 0xf5, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0x50, 
+	0x2e, 0x08, 0x4f, 0x48, 0x2e, 0x08, 0x4f, 0x60, 
+	0xb5, 0x00, 0xf0, 0x04, 0xf9, 0xe7, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x80, 0x20, 0x00, 0x49, 0x17, 
+	0x78, 0x09, 0x29, 0x01, 0xd1, 0x26, 0x49, 0x16, 
+	0x78, 0x4a, 0x2a, 0x14, 0xd0, 0x18, 0xdc, 0x09, 
+	0x2a, 0x11, 0xd0, 0x12, 0x2a, 0x12, 0xd0, 0x16, 
+	0x2a, 0x13, 0xd1, 0x16, 0x68, 0x8f, 0xf0, 0x00, 
+	0xf8, 0x77, 0xe0, 0x12, 0x2a, 0x15, 0xd0, 0x05, 
+	0x2a, 0x23, 0xd1, 0x0e, 0x68, 0x8f, 0xf0, 0x00, 
+	0xf8, 0xaf, 0xe0, 0x0a, 0xf0, 0x00, 0xf8, 0x8a, 
+	0xe0, 0x07, 0xf0, 0x00, 0xf8, 0x13, 0xe0, 0x04, 
+	0xf0, 0x00, 0xf8, 0x4a, 0xe0, 0x01, 0xf0, 0x00, 
+	0xf8, 0x2d, 0x28, 0x00, 0xd1, 0x02, 0x1c, 0x38, 
+	0xf0, 0x04, 0xfa, 0xe6, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0x50, 
+	0x2e, 0x08, 0x4f, 0x28, 0xb5, 0x90, 0xb0, 0x81, 
+	0x4c, 0x0d, 0x79, 0xa0, 0x28, 0x01, 0xd1, 0x12, 
+	0xf0, 0x00, 0xf9, 0x1c, 0x1c, 0x07, 0xd5, 0x01, 
+	0x20, 0x00, 0xe0, 0x0d, 0x88, 0xa4, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x11, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfa, 0x0d, 0x28, 0x00, 0xd1, 0x03, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf0, 0x00, 0xf9, 0x47, 0x20, 0x01, 
+	0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x4f, 0x28, 0xb5, 0x90, 0xb0, 0x81, 
+	0x4c, 0x0a, 0x88, 0xa0, 0xf0, 0x00, 0xf8, 0x96, 
+	0x1c, 0x07, 0xd4, 0x0a, 0x88, 0xa4, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x12, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf9, 0xf1, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x00, 
+	0xf9, 0x2d, 0x20, 0x01, 0xb0, 0x01, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x4f, 0x28, 
+	0xb5, 0xb0, 0xb0, 0x81, 0x4c, 0x0b, 0x88, 0xa0, 
+	0xf0, 0x00, 0xf8, 0x7c, 0x1c, 0x07, 0xd4, 0x0c, 
+	0x88, 0xa5, 0x79, 0xa2, 0x46, 0x6b, 0x21, 0x14, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf9, 0xd7, 0x28, 0x00, 
+	0xd0, 0x03, 0x1c, 0x38, 0x1c, 0x29, 0xf0, 0x00, 
+	0xf9, 0x11, 0x20, 0x01, 0xb0, 0x01, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x4f, 0x28, 
+	0xb5, 0x90, 0xb0, 0x81, 0x4c, 0x0c, 0x88, 0xa0, 
+	0xf0, 0x00, 0xf8, 0x60, 0x1c, 0x07, 0xd4, 0x0c, 
+	0x68, 0xa0, 0x78, 0x01, 0x88, 0xa0, 0xf0, 0x00, 
+	0xf8, 0x71, 0x1c, 0x02, 0xd4, 0x07, 0x46, 0x6b, 
+	0x21, 0x13, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0xb6, 
+	0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 0x98, 0x00, 
+	0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x4f, 0x28, 0xb5, 0x90, 0xb0, 0x81, 
+	0x4c, 0x0d, 0x88, 0xa0, 0xf0, 0x00, 0xf8, 0x42, 
+	0x1c, 0x07, 0xd4, 0x0f, 0x00, 0x78, 0x19, 0xc0, 
+	0x00, 0x80, 0x49, 0x0a, 0x18, 0x40, 0x7a, 0x01, 
+	0x88, 0xa0, 0xf0, 0x00, 0xf8, 0x4f, 0x1c, 0x02, 
+	0xd4, 0x04, 0x46, 0x6b, 0x21, 0x15, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x94, 0x20, 0x01, 0xb0, 0x01, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x4f, 0x28, 0x2e, 0x08, 0x4f, 0x48, 
+	0xb5, 0x90, 0xb0, 0x81, 0x4f, 0x10, 0x88, 0xb8, 
+	0xf0, 0x00, 0xf8, 0x20, 0x1c, 0x04, 0xd4, 0x14, 
+	0x79, 0xb9, 0x88, 0xb8, 0xf0, 0x00, 0xf8, 0x32, 
+	0x1c, 0x02, 0xd5, 0x08, 0x79, 0xba, 0x88, 0xb9, 
+	0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x49, 0x1c, 0x02, 
+	0xd5, 0x01, 0x20, 0x00, 0xe0, 0x08, 0x46, 0x6b, 
+	0x21, 0x23, 0x1c, 0x20, 0xf0, 0x00, 0xf9, 0x6e, 
+	0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 0x98, 0x00, 
+	0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x4f, 0x28, 0xb4, 0x80, 0x04, 0x02, 
+	0x0c, 0x12, 0x20, 0x00, 0x49, 0x08, 0x00, 0x43, 
+	0x18, 0x1b, 0x00, 0x9b, 0x18, 0x5f, 0x78, 0xbf, 
+	0x2f, 0x01, 0xd0, 0x02, 0x5a, 0xcb, 0x42, 0x93, 
+	0xd0, 0x04, 0x30, 0x01, 0x28, 0x02, 0xdb, 0xf2, 
+	0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 0x47, 0x70, 
+	0x2e, 0x08, 0x4f, 0x48, 0xb4, 0xb0, 0x04, 0x02, 
+	0x0c, 0x12, 0x06, 0x0f, 0x0e, 0x3f, 0x20, 0x00, 
+	0x49, 0x0a, 0x00, 0x44, 0x18, 0x24, 0x00, 0xe4, 
+	0x18, 0x63, 0x78, 0x9d, 0x2d, 0x01, 0xd0, 0x05, 
+	0x5b, 0x0c, 0x42, 0x94, 0xd1, 0x02, 0x78, 0xdb, 
+	0x42, 0xbb, 0xd0, 0x04, 0x30, 0x01, 0x28, 0x08, 
+	0xdb, 0xef, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xb0, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x4f, 0x60, 
+	0xb5, 0xb0, 0x04, 0x09, 0x0c, 0x09, 0x06, 0x12, 
+	0x0e, 0x12, 0x24, 0x00, 0x1c, 0x07, 0x48, 0x13, 
+	0x00, 0x63, 0x19, 0x1b, 0x00, 0xdb, 0x18, 0x1b, 
+	0x78, 0x9b, 0x2b, 0x01, 0xd1, 0x16, 0x00, 0x63, 
+	0x19, 0x1b, 0x00, 0xdb, 0x18, 0x1d, 0x70, 0xea, 
+	0x52, 0xc1, 0x20, 0x03, 0x70, 0xa8, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf8, 0x9a, 0x00, 0x78, 0x19, 0xc0, 
+	0x00, 0x80, 0x49, 0x09, 0x18, 0x40, 0x88, 0xc1, 
+	0x31, 0x01, 0x80, 0xc1, 0x1c, 0x20, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x34, 0x01, 0x2c, 0x08, 
+	0xdb, 0xde, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x4f, 0x60, 
+	0x2e, 0x08, 0x4f, 0x48, 0xb4, 0x90, 0x20, 0x00, 
+	0x4c, 0x19, 0x4f, 0x1a, 0x88, 0xba, 0x49, 0x1a, 
+	0x00, 0x43, 0x18, 0x1b, 0x00, 0x9b, 0x18, 0x5b, 
+	0x78, 0x9b, 0x2b, 0x01, 0xd1, 0x17, 0x00, 0x43, 
+	0x18, 0x1b, 0x00, 0x9b, 0x52, 0xca, 0x22, 0x02, 
+	0x18, 0x59, 0x70, 0x8a, 0x22, 0x00, 0x80, 0xca, 
+	0x72, 0x4a, 0x89, 0x3a, 0x2a, 0x10, 0xdb, 0x03, 
+	0x23, 0xff, 0x33, 0x01, 0x42, 0x9a, 0xdd, 0x03, 
+	0x20, 0x02, 0x43, 0xc0, 0xbc, 0x90, 0x47, 0x70, 
+	0x80, 0x8a, 0xbc, 0x90, 0x47, 0x70, 0x00, 0x43, 
+	0x18, 0x1b, 0x00, 0xdb, 0x5a, 0xe3, 0x42, 0x93, 
+	0xd1, 0x03, 0x20, 0x01, 0x43, 0xc0, 0xbc, 0x90, 
+	0x47, 0x70, 0x30, 0x01, 0x28, 0x02, 0xdb, 0xd3, 
+	0x20, 0x00, 0x43, 0xc0, 0xbc, 0x90, 0x47, 0x70, 
+	0x2e, 0x08, 0x4f, 0x60, 0x2e, 0x08, 0x4f, 0x28, 
+	0x2e, 0x08, 0x4f, 0x48, 0xb5, 0xf0, 0x04, 0x0e, 
+	0x0c, 0x36, 0x1c, 0x07, 0xd5, 0x06, 0x2f, 0x02, 
+	0xdb, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 0x00, 0x7b, 
+	0x19, 0xdb, 0x00, 0x9b, 0x49, 0x0e, 0x18, 0x5a, 
+	0x70, 0x90, 0x22, 0x00, 0x52, 0xca, 0x24, 0x00, 
+	0x4d, 0x0c, 0x00, 0x60, 0x19, 0x00, 0x00, 0xc0, 
+	0x5a, 0x29, 0x42, 0xb1, 0xd1, 0x08, 0x22, 0x00, 
+	0x19, 0x41, 0x70, 0xca, 0x52, 0x2a, 0x20, 0x01, 
+	0x70, 0x88, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x20, 
+	0x34, 0x01, 0x2c, 0x08, 0xdb, 0xed, 0x1c, 0x38, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x4f, 0x48, 0x2e, 0x08, 0x4f, 0x60, 
+	0xb5, 0x00, 0x49, 0x03, 0x78, 0x08, 0xf0, 0x04, 
+	0xf8, 0x6b, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x4f, 0x28, 0xb5, 0x00, 0x49, 0x03, 
+	0x78, 0x08, 0xf0, 0x04, 0xf8, 0x61, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x4f, 0x38, 
+	0xb5, 0xf0, 0x01, 0x46, 0x18, 0x36, 0x00, 0xb6, 
+	0x1c, 0x07, 0xb0, 0x84, 0x48, 0x0c, 0x90, 0x03, 
+	0x18, 0x34, 0x68, 0xa0, 0x28, 0x00, 0xd0, 0x0a, 
+	0x46, 0x69, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x3e, 
+	0x1c, 0x05, 0xd0, 0x02, 0x98, 0x01, 0xf0, 0x04, 
+	0xf9, 0x23, 0x2d, 0x00, 0xd1, 0xf4, 0x20, 0x00, 
+	0x99, 0x03, 0x51, 0x88, 0x60, 0x60, 0x60, 0xa0, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x50, 0x20, 0xb4, 0xb0, 0x01, 0x43, 
+	0x18, 0x18, 0x00, 0x80, 0x4a, 0x12, 0x18, 0x82, 
+	0x20, 0x00, 0x68, 0x93, 0x2b, 0x0a, 0xda, 0x1d, 
+	0x33, 0x01, 0x60, 0x93, 0x78, 0x8c, 0x68, 0x55, 
+	0x00, 0x6b, 0x19, 0x5b, 0x00, 0x9b, 0x18, 0xd3, 
+	0x73, 0x9c, 0x68, 0x4c, 0x68, 0x55, 0x00, 0x6b, 
+	0x19, 0x5b, 0x00, 0x9b, 0x18, 0xd3, 0x61, 0x1c, 
+	0x89, 0x0f, 0x68, 0x54, 0x00, 0x63, 0x19, 0x1b, 
+	0x00, 0x9b, 0x18, 0xd1, 0x82, 0x8f, 0x68, 0x51, 
+	0x31, 0x01, 0x60, 0x51, 0x29, 0x0a, 0xdb, 0x00, 
+	0x60, 0x50, 0x20, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
+	0x2e, 0x08, 0x50, 0x20, 0xb4, 0xb0, 0x01, 0x47, 
+	0x18, 0x3f, 0x00, 0xbf, 0x4a, 0x12, 0x18, 0xbc, 
+	0x20, 0x00, 0x68, 0xa3, 0x2b, 0x00, 0xdd, 0x1d, 
+	0x3b, 0x01, 0x60, 0xa3, 0x59, 0xd5, 0x00, 0x6b, 
+	0x19, 0x5b, 0x00, 0x9b, 0x18, 0xe3, 0x7b, 0x9b, 
+	0x70, 0x8b, 0x59, 0xd5, 0x00, 0x6b, 0x19, 0x5b, 
+	0x00, 0x9b, 0x18, 0xe3, 0x69, 0x1b, 0x60, 0x4b, 
+	0x59, 0xd5, 0x00, 0x6b, 0x19, 0x5b, 0x00, 0x9b, 
+	0x18, 0xe3, 0x8a, 0x9b, 0x81, 0x0b, 0x59, 0xd1, 
+	0x31, 0x01, 0x51, 0xd1, 0x29, 0x0a, 0xdb, 0x00, 
+	0x51, 0xd0, 0x20, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
+	0x2e, 0x08, 0x50, 0x20, 0xb5, 0x90, 0x06, 0x09, 
+	0x0e, 0x09, 0x1c, 0x1f, 0x00, 0x43, 0x18, 0x1b, 
+	0x00, 0x9b, 0x4c, 0x0f, 0x19, 0x1b, 0x78, 0x9b, 
+	0x2b, 0x02, 0xd0, 0x0f, 0x2b, 0x03, 0xd0, 0x07, 
+	0x2b, 0x04, 0xd1, 0x11, 0x1c, 0x3b, 0xf0, 0x00, 
+	0xf9, 0x27, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x3b, 0xf0, 0x00, 0xf8, 0x37, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x3a, 0xf0, 0x00, 
+	0xf8, 0x09, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x4f, 0x48, 0xb5, 0x90, 0x06, 0x09, 
+	0x0e, 0x09, 0x23, 0x01, 0x60, 0x13, 0x29, 0x11, 
+	0xd1, 0x17, 0x22, 0x23, 0x49, 0x0d, 0x70, 0x0a, 
+	0x22, 0x21, 0x70, 0x4a, 0x22, 0x04, 0x80, 0x4a, 
+	0x00, 0x44, 0x18, 0x24, 0x00, 0xa4, 0x4f, 0x0a, 
+	0x5b, 0x38, 0x80, 0x88, 0xf7, 0xff, 0xff, 0x34, 
+	0x28, 0x00, 0xd0, 0x06, 0x20, 0x03, 0x19, 0xe1, 
+	0x70, 0x88, 0x20, 0x01, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x4f, 0x28, 
+	0x2e, 0x08, 0x4f, 0x48, 0xb5, 0xff, 0x06, 0x09, 
+	0x0e, 0x09, 0x27, 0x00, 0x20, 0x00, 0xb0, 0x84, 
+	0x60, 0x18, 0x1c, 0x1e, 0x98, 0x04, 0x00, 0x43, 
+	0x18, 0x18, 0x00, 0x80, 0x90, 0x03, 0x4a, 0x6a, 
+	0x92, 0x02, 0x18, 0x84, 0x25, 0x02, 0x48, 0x69, 
+	0x29, 0x12, 0xd0, 0x71, 0x9a, 0x06, 0x00, 0x53, 
+	0x18, 0x9a, 0x00, 0xd2, 0x4b, 0x66, 0x18, 0xd2, 
+	0x92, 0x01, 0x29, 0x13, 0xd0, 0x17, 0x29, 0x14, 
+	0xd0, 0x67, 0x29, 0x23, 0xd1, 0x66, 0x89, 0x82, 
+	0x99, 0x06, 0xb4, 0x04, 0x68, 0x83, 0x9d, 0x02, 
+	0x78, 0xea, 0x98, 0x05, 0xf0, 0x00, 0xf9, 0x52, 
+	0xb0, 0x01, 0x1c, 0x07, 0xd0, 0x5b, 0x89, 0xa8, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0x01, 0x60, 0x30, 
+	0x21, 0x04, 0x70, 0xa1, 0xe0, 0x97, 0x68, 0x81, 
+	0x78, 0x4a, 0x23, 0x80, 0x40, 0x1a, 0x88, 0xc0, 
+	0x1e, 0x83, 0x04, 0x1d, 0x0c, 0x2d, 0x31, 0x02, 
+	0x91, 0x00, 0x2a, 0x80, 0xd1, 0x28, 0x88, 0xa1, 
+	0x42, 0x81, 0xd0, 0x01, 0x20, 0x00, 0xe0, 0x87, 
+	0x9c, 0x01, 0x8a, 0xa1, 0x29, 0x00, 0xd1, 0x0c, 
+	0x1c, 0x28, 0xf0, 0x03, 0xff, 0xfb, 0x61, 0x20, 
+	0x28, 0x00, 0xd0, 0xf3, 0x82, 0xa5, 0x69, 0x20, 
+	0x99, 0x00, 0x1c, 0x2a, 0xf0, 0x16, 0xff, 0x12, 
+	0xe0, 0x75, 0x19, 0x48, 0x04, 0x02, 0x0c, 0x12, 
+	0x69, 0x20, 0xf0, 0x03, 0xff, 0xf0, 0x28, 0x00, 
+	0xd0, 0xe4, 0x61, 0x20, 0x8a, 0xa1, 0x18, 0x40, 
+	0x99, 0x00, 0x1c, 0x2a, 0xf0, 0x16, 0xff, 0x02, 
+	0x8a, 0xa0, 0x19, 0x40, 0x82, 0xa0, 0xe0, 0x62, 
+	0x9e, 0x01, 0x8a, 0xb1, 0x4c, 0x3d, 0x29, 0x00, 
+	0xd1, 0x1a, 0x1c, 0x28, 0xf0, 0x03, 0xff, 0xd6, 
+	0x60, 0xa0, 0x28, 0x00, 0xd0, 0xce, 0x21, 0x23, 
+	0x70, 0x21, 0x70, 0x61, 0x21, 0x0c, 0x80, 0x61, 
+	0x99, 0x03, 0x9a, 0x02, 0x5a, 0x51, 0x80, 0xa1, 
+	0x78, 0xf1, 0x71, 0xa1, 0x81, 0xa5, 0x99, 0x00, 
+	0x1c, 0x2a, 0xf0, 0x16, 0xfe, 0xe3, 0xe0, 0x24, 
+	0xe0, 0x4b, 0xe0, 0x2e, 0xe0, 0x43, 0xe0, 0x42, 
+	0x19, 0x48, 0x04, 0x02, 0x0c, 0x12, 0x69, 0x30, 
+	0xf0, 0x03, 0xff, 0xbd, 0x28, 0x00, 0xd0, 0xb1, 
+	0x61, 0x30, 0x8a, 0xb1, 0x18, 0x40, 0x99, 0x00, 
+	0x1c, 0x2a, 0xf0, 0x16, 0xfe, 0xcf, 0x8a, 0xb0, 
+	0x19, 0x40, 0x82, 0xb0, 0x21, 0x23, 0x70, 0x21, 
+	0x70, 0x61, 0x21, 0x0c, 0x80, 0x61, 0x98, 0x03, 
+	0x9a, 0x02, 0x5a, 0x10, 0x80, 0xa0, 0x78, 0xf0, 
+	0x71, 0xa0, 0x8a, 0xb0, 0x81, 0xa0, 0x69, 0x30, 
+	0x60, 0xa0, 0xf7, 0xff, 0xfe, 0x7f, 0x28, 0x00, 
+	0xd1, 0x03, 0x68, 0xa0, 0xf0, 0x03, 0xff, 0xbc, 
+	0xe0, 0x19, 0x20, 0x00, 0x82, 0xb0, 0x61, 0x30, 
+	0xe0, 0x14, 0x9a, 0x06, 0x06, 0x11, 0x0e, 0x09, 
+	0x29, 0x02, 0xd1, 0x10, 0x21, 0x23, 0x70, 0x01, 
+	0x21, 0x22, 0x70, 0x41, 0x21, 0x04, 0x80, 0x41, 
+	0x99, 0x03, 0x9a, 0x02, 0x5a, 0x51, 0x80, 0x81, 
+	0xf7, 0xff, 0xfe, 0x5a, 0x28, 0x00, 0xd1, 0x00, 
+	0xe7, 0x78, 0x70, 0xa5, 0x27, 0x01, 0x1c, 0x38, 
+	0xb0, 0x04, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x23, 0x70, 0x01, 0x21, 0x22, 
+	0x70, 0x41, 0x21, 0x04, 0x80, 0x41, 0x99, 0x03, 
+	0x9a, 0x02, 0x5a, 0x51, 0x80, 0x81, 0xf7, 0xff, 
+	0xfe, 0x43, 0x28, 0x00, 0xd1, 0xe9, 0xe7, 0x61, 
+	0x2e, 0x08, 0x4f, 0x48, 0x2e, 0x08, 0x4f, 0x28, 
+	0x2e, 0x08, 0x4f, 0x60, 0x2e, 0x08, 0x4f, 0x38, 
+	0xb5, 0xff, 0x06, 0x09, 0x0e, 0x09, 0x24, 0x00, 
+	0x20, 0x00, 0x60, 0x18, 0x1c, 0x1f, 0xb0, 0x84, 
+	0x29, 0x14, 0xd0, 0x04, 0xdc, 0x09, 0x29, 0x12, 
+	0xd0, 0x01, 0x29, 0x13, 0xd1, 0x65, 0x98, 0x04, 
+	0x1c, 0x3b, 0xf7, 0xff, 0xff, 0x03, 0x1c, 0x04, 
+	0xe0, 0x6e, 0x29, 0x15, 0xd0, 0x0a, 0x29, 0x23, 
+	0xd1, 0x5b, 0x49, 0x38, 0x1c, 0x10, 0xf7, 0xff, 
+	0xfe, 0x51, 0x1c, 0x04, 0xd0, 0x64, 0x20, 0x01, 
+	0x60, 0x38, 0xe0, 0x61, 0x1c, 0x17, 0x22, 0x00, 
+	0x98, 0x04, 0x00, 0x43, 0x18, 0x18, 0x00, 0x80, 
+	0x49, 0x31, 0x18, 0x43, 0x93, 0x03, 0x72, 0x5a, 
+	0x5a, 0x0a, 0x92, 0x00, 0x9b, 0x03, 0x88, 0xd8, 
+	0x28, 0x01, 0xd0, 0x03, 0x37, 0x01, 0x2f, 0x08, 
+	0xd1, 0x00, 0x27, 0x00, 0x26, 0x00, 0x48, 0x2b, 
+	0x90, 0x01, 0x1d, 0x01, 0x91, 0x02, 0x4d, 0x2a, 
+	0x00, 0x78, 0x19, 0xc0, 0x00, 0xc0, 0x5a, 0x29, 
+	0x9a, 0x00, 0x42, 0x91, 0xd1, 0x32, 0x19, 0x40, 
+	0x89, 0x80, 0x28, 0x00, 0xdd, 0x0e, 0x22, 0x00, 
+	0xb4, 0x04, 0x00, 0x78, 0x19, 0xc0, 0x00, 0xc0, 
+	0x19, 0x40, 0x78, 0xc2, 0x23, 0x00, 0x98, 0x05, 
+	0x1c, 0x39, 0xf0, 0x00, 0xf8, 0x3f, 0x1c, 0x04, 
+	0xb0, 0x01, 0xe0, 0x26, 0x99, 0x02, 0x1c, 0x38, 
+	0xf7, 0xff, 0xfe, 0x40, 0x1c, 0x04, 0xd0, 0x19, 
+	0x98, 0x01, 0x89, 0x82, 0xb4, 0x04, 0x98, 0x02, 
+	0x68, 0x84, 0x00, 0x78, 0x19, 0xc0, 0x00, 0xc0, 
+	0x19, 0x45, 0x78, 0xea, 0x98, 0x05, 0x1c, 0x39, 
+	0x1c, 0x23, 0x1c, 0x2e, 0xf0, 0x00, 0xf8, 0x26, 
+	0x1c, 0x04, 0x89, 0xa8, 0xb0, 0x01, 0x28, 0x00, 
+	0xd1, 0x0b, 0x68, 0x70, 0xf0, 0x03, 0xff, 0x10, 
+	0xe0, 0x07, 0xe0, 0x0d, 0x36, 0x01, 0x37, 0x01, 
+	0x2f, 0x08, 0xd1, 0x00, 0x27, 0x00, 0x2e, 0x08, 
+	0xdb, 0xbe, 0x9b, 0x03, 0x7a, 0x58, 0x28, 0x00, 
+	0xd1, 0x02, 0x20, 0x03, 0x9b, 0x03, 0x70, 0x98, 
+	0x1c, 0x20, 0xb0, 0x04, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x4f, 0x2c, 
+	0x2e, 0x08, 0x4f, 0x48, 0x2e, 0x08, 0x4f, 0x38, 
+	0x2e, 0x08, 0x4f, 0x60, 0xb5, 0xff, 0x06, 0x16, 
+	0x0e, 0x36, 0x9f, 0x09, 0x04, 0x3c, 0x0c, 0x24, 
+	0x1c, 0x18, 0x00, 0x4b, 0x18, 0x59, 0x00, 0xc9, 
+	0xb0, 0x85, 0x4a, 0x30, 0x18, 0x8f, 0x28, 0x00, 
+	0xd1, 0x02, 0x89, 0xbc, 0x68, 0xbd, 0xe0, 0x03, 
+	0x60, 0x78, 0x60, 0xb8, 0x81, 0xbc, 0x1c, 0x05, 
+	0x99, 0x05, 0x00, 0x4b, 0x18, 0x5b, 0x00, 0x9b, 
+	0x93, 0x04, 0x1c, 0xa2, 0x49, 0x28, 0x91, 0x03, 
+	0x18, 0x59, 0x91, 0x02, 0x88, 0x89, 0x42, 0x8a, 
+	0xdd, 0x0a, 0x20, 0x80, 0x90, 0x00, 0x1e, 0x88, 
+	0x04, 0x04, 0x0c, 0x24, 0x19, 0x28, 0x60, 0xb8, 
+	0x89, 0xb8, 0x1b, 0x00, 0x81, 0xb8, 0xe0, 0x09, 
+	0x21, 0x00, 0x91, 0x00, 0x81, 0xb9, 0x28, 0x00, 
+	0xd1, 0x04, 0x68, 0x78, 0xf0, 0x03, 0xfe, 0xbc, 
+	0x21, 0x00, 0x60, 0x79, 0x1c, 0xa0, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x01, 0xf0, 0x03, 0xfe, 0x8e, 
+	0x4f, 0x18, 0x60, 0xb8, 0x1c, 0x01, 0xd1, 0x01, 
+	0x20, 0x00, 0xe0, 0x22, 0x20, 0x21, 0x70, 0x38, 
+	0x20, 0x13, 0x70, 0x78, 0x20, 0x08, 0x80, 0x78, 
+	0x98, 0x04, 0x9a, 0x03, 0x5a, 0x10, 0x80, 0xb8, 
+	0x98, 0x01, 0x80, 0xf8, 0x70, 0x0e, 0x98, 0x00, 
+	0x68, 0xb9, 0x70, 0x48, 0x68, 0xb8, 0x30, 0x02, 
+	0x1c, 0x29, 0x1c, 0x22, 0xf0, 0x16, 0xfd, 0x92, 
+	0xf7, 0xff, 0xfd, 0x54, 0x28, 0x00, 0xd1, 0x03, 
+	0x68, 0xb8, 0xf0, 0x03, 0xfe, 0x91, 0xe7, 0xdf, 
+	0x99, 0x02, 0x72, 0x0e, 0x20, 0x01, 0x99, 0x02, 
+	0x72, 0x48, 0xb0, 0x05, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x4f, 0x60, 
+	0x2e, 0x08, 0x4f, 0x48, 0x2e, 0x08, 0x4f, 0x38, 
+	0xb5, 0xf0, 0x4d, 0x15, 0x69, 0x68, 0x28, 0x00, 
+	0xd1, 0x06, 0x20, 0xff, 0x30, 0x01, 0xf0, 0x03, 
+	0xfe, 0x51, 0x61, 0x68, 0x28, 0x00, 0xd0, 0x11, 
+	0x27, 0x00, 0x4c, 0x10, 0x21, 0x01, 0x01, 0x3e, 
+	0x19, 0x30, 0x81, 0x01, 0x21, 0x00, 0x60, 0xc1, 
+	0x20, 0x00, 0x1c, 0x39, 0xf0, 0x05, 0xf9, 0x90, 
+	0x04, 0x00, 0x0c, 0x00, 0x53, 0xa0, 0x04, 0x00, 
+	0x14, 0x00, 0xd5, 0x04, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x37, 0x01, 
+	0x2f, 0x02, 0xdb, 0xe7, 0x21, 0x00, 0x82, 0x29, 
+	0x20, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x54, 0x2e, 0x08, 0x54, 0x50, 
+	0xb5, 0xf7, 0x04, 0x01, 0x0c, 0x09, 0x04, 0x16, 
+	0x0c, 0x36, 0x27, 0x00, 0x48, 0x12, 0x01, 0x3a, 
+	0x5a, 0x82, 0x42, 0x8a, 0xd0, 0x02, 0x37, 0x01, 
+	0x2f, 0x02, 0xdb, 0xf8, 0x2f, 0x02, 0xda, 0x17, 
+	0x24, 0x00, 0x99, 0x01, 0x1c, 0x38, 0x1c, 0x32, 
+	0xf0, 0x00, 0xf9, 0xd6, 0x1c, 0x05, 0x28, 0x02, 
+	0xd1, 0x05, 0x20, 0x14, 0xf0, 0x03, 0xfe, 0x3e, 
+	0x34, 0x01, 0x2c, 0x0a, 0xd0, 0x08, 0x2d, 0x02, 
+	0xd0, 0xef, 0x2d, 0x00, 0xd1, 0x04, 0x20, 0x00, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0x43, 0xc0, 0xe7, 0xf8, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x50, 0xb5, 0xf0, 0x4f, 0x14, 
+	0x26, 0x00, 0x69, 0x78, 0x28, 0x00, 0xd0, 0x02, 
+	0xf0, 0x03, 0xfe, 0x1a, 0x61, 0x7e, 0x24, 0x00, 
+	0x4d, 0x10, 0x01, 0x27, 0x5b, 0xe8, 0x28, 0x00, 
+	0xdd, 0x02, 0xf0, 0x05, 0xf9, 0xe7, 0x53, 0xee, 
+	0x19, 0x78, 0x68, 0xc7, 0x2f, 0x00, 0xd0, 0x0c, 
+	0x68, 0x38, 0x28, 0x00, 0xd0, 0x06, 0x1c, 0x38, 
+	0x68, 0x3f, 0xf0, 0x03, 0xfe, 0x05, 0x68, 0x38, 
+	0x28, 0x00, 0xd1, 0xf8, 0x1c, 0x38, 0xf0, 0x03, 
+	0xfd, 0xff, 0x34, 0x01, 0x2c, 0x02, 0xdb, 0xe4, 
+	0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x54, 0x2e, 0x08, 0x54, 0x50, 
+	0xb5, 0xf0, 0x1c, 0x07, 0x20, 0x03, 0x1c, 0x0d, 
+	0x01, 0x39, 0x1c, 0x14, 0x4a, 0x12, 0x18, 0x8e, 
+	0x81, 0x30, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x22, 
+	0x28, 0x00, 0xd1, 0x10, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x6d, 0x28, 0x00, 0xd0, 0x04, 0x28, 0x07, 
+	0xd1, 0x12, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0x1c, 0x29, 0x1c, 0x22, 0xf0, 0x00, 
+	0xf8, 0xb3, 0x28, 0x00, 0xd0, 0x04, 0x20, 0x01, 
+	0x81, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x50, 0xb5, 0xf0, 0x27, 0x01, 
+	0xb0, 0x81, 0xab, 0x00, 0x70, 0x1f, 0x01, 0x05, 
+	0x4c, 0x15, 0x5b, 0x60, 0x46, 0x6a, 0x21, 0x06, 
+	0xf0, 0x05, 0xf9, 0x56, 0x28, 0x00, 0xdd, 0x1d, 
+	0xa8, 0x00, 0x78, 0x40, 0x28, 0x00, 0xd0, 0x19, 
+	0x27, 0x00, 0x20, 0x02, 0xab, 0x00, 0x70, 0x18, 
+	0x26, 0x06, 0x5b, 0x60, 0x46, 0x6a, 0x21, 0x06, 
+	0xf0, 0x05, 0xf9, 0x46, 0x28, 0x00, 0xdb, 0x05, 
+	0x20, 0x14, 0xf0, 0x03, 0xfd, 0xaf, 0x37, 0x01, 
+	0x2f, 0x0a, 0xd1, 0x01, 0x1c, 0x30, 0xe0, 0x06, 
+	0xa8, 0x00, 0x78, 0x40, 0x28, 0x00, 0xd0, 0xec, 
+	0x20, 0x00, 0xe0, 0x00, 0x1c, 0x38, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x50, 0xb5, 0x80, 0x27, 0x01, 
+	0xb0, 0x81, 0xab, 0x00, 0x70, 0x1f, 0x01, 0x00, 
+	0x49, 0x09, 0x5a, 0x08, 0x46, 0x6a, 0x21, 0x06, 
+	0xf0, 0x05, 0xf9, 0x22, 0x28, 0x00, 0xdd, 0x05, 
+	0xa8, 0x00, 0x78, 0x40, 0x28, 0x00, 0xd0, 0x01, 
+	0x20, 0x00, 0xe0, 0x00, 0x1c, 0x38, 0xb0, 0x01, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x50, 0xb5, 0xf0, 0x27, 0x00, 
+	0x26, 0x06, 0x01, 0x05, 0xb0, 0xff, 0xb0, 0x87, 
+	0x4c, 0x24, 0x20, 0x00, 0xab, 0x00, 0x80, 0x18, 
+	0x20, 0x01, 0x02, 0x40, 0x80, 0x58, 0xa8, 0x05, 
+	0x90, 0x01, 0x5b, 0x60, 0x46, 0x6a, 0x21, 0x02, 
+	0xf0, 0x05, 0xf8, 0xfe, 0x28, 0x00, 0xda, 0x01, 
+	0x1c, 0x30, 0xe0, 0x2f, 0xa9, 0x02, 0x88, 0x09, 
+	0xa8, 0x05, 0xaa, 0x03, 0xab, 0x04, 0xf0, 0x00, 
+	0xfa, 0x73, 0x28, 0x00, 0xda, 0x2b, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0x20, 0xc8, 0xf0, 0x03, 
+	0xfd, 0x59, 0x2f, 0x0a, 0xdb, 0xdd, 0x2f, 0x0a, 
+	0xd0, 0xea, 0xa8, 0x03, 0x88, 0x00, 0xab, 0x00, 
+	0x80, 0x18, 0x27, 0x01, 0x80, 0x5f, 0xa8, 0x04, 
+	0x90, 0x01, 0x5b, 0x60, 0x46, 0x6a, 0x21, 0x03, 
+	0xf0, 0x05, 0xf8, 0xda, 0x28, 0x00, 0xdb, 0xdb, 
+	0xa8, 0x02, 0x88, 0x00, 0x28, 0x01, 0xd1, 0xd7, 
+	0xab, 0x85, 0x70, 0x5f, 0x27, 0x00, 0x70, 0x1f, 
+	0x5b, 0x60, 0x21, 0x07, 0xaa, 0x85, 0xf0, 0x05, 
+	0xf8, 0xcb, 0x1c, 0x38, 0xb0, 0x7f, 0xb0, 0x07, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x27, 0x00, 
+	0xe7, 0xd9, 0x00, 0x00, 0x2e, 0x08, 0x54, 0x50, 
+	0xb5, 0xf7, 0x1c, 0x07, 0x20, 0x00, 0xb0, 0x84, 
+	0x4c, 0x5b, 0x70, 0x20, 0xab, 0x00, 0x70, 0x58, 
+	0x70, 0x18, 0x01, 0x38, 0x49, 0x59, 0x5a, 0x08, 
+	0x46, 0x6a, 0x21, 0x07, 0xf0, 0x05, 0xf8, 0xb0, 
+	0x28, 0x00, 0xdb, 0x2f, 0x1d, 0x22, 0x92, 0x03, 
+	0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 0xfa, 0x04, 
+	0x28, 0x01, 0xd0, 0x27, 0x78, 0x20, 0x23, 0x08, 
+	0x43, 0x18, 0x70, 0x20, 0x78, 0x22, 0x21, 0x01, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf9, 0xd3, 0x28, 0x01, 
+	0xd0, 0x1c, 0x78, 0x20, 0x23, 0xf7, 0x40, 0x18, 
+	0x70, 0x20, 0x78, 0x22, 0x21, 0x01, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0xc8, 0x28, 0x01, 0xd0, 0x11, 
+	0x21, 0x01, 0x9a, 0x03, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf9, 0xe7, 0x28, 0x01, 0xd0, 0x0a, 0x78, 0x20, 
+	0x23, 0x04, 0x43, 0x18, 0x70, 0x20, 0x78, 0x22, 
+	0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0xb6, 
+	0x28, 0x01, 0xd1, 0x01, 0x20, 0x05, 0xe0, 0x71, 
+	0x25, 0x00, 0x23, 0x01, 0x1c, 0x38, 0xa9, 0x02, 
+	0xaa, 0x01, 0xf0, 0x00, 0xf9, 0x33, 0x1c, 0x06, 
+	0x28, 0x01, 0xd0, 0xf3, 0x20, 0x14, 0xf0, 0x03, 
+	0xfc, 0xdd, 0x35, 0x01, 0x2d, 0x0a, 0xd0, 0xed, 
+	0x2e, 0x03, 0xd0, 0xee, 0x2e, 0x02, 0xd0, 0xec, 
+	0xa8, 0x02, 0x78, 0x00, 0x02, 0x00, 0xa9, 0x02, 
+	0x78, 0x49, 0x18, 0x40, 0x9a, 0x06, 0x60, 0x10, 
+	0x99, 0x05, 0x42, 0x88, 0xd9, 0x08, 0x99, 0x05, 
+	0x0a, 0x08, 0xab, 0x02, 0x70, 0x18, 0x99, 0x05, 
+	0x70, 0x59, 0x99, 0x05, 0x9a, 0x06, 0x60, 0x11, 
+	0x78, 0x20, 0x23, 0xfb, 0x40, 0x18, 0x70, 0x20, 
+	0x78, 0x22, 0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf9, 0x81, 0x28, 0x01, 0xd0, 0x0a, 0x78, 0x20, 
+	0x23, 0x02, 0x43, 0x18, 0x70, 0x20, 0x78, 0x22, 
+	0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x76, 
+	0x28, 0x01, 0xd1, 0x01, 0x20, 0x01, 0xe0, 0x31, 
+	0x25, 0x00, 0x22, 0x02, 0x1c, 0x38, 0xa9, 0x02, 
+	0xf0, 0x00, 0xf8, 0x36, 0x1c, 0x06, 0x28, 0x01, 
+	0xd0, 0xb4, 0x20, 0x14, 0xf0, 0x03, 0xfc, 0x9e, 
+	0x35, 0x01, 0x2d, 0x0a, 0xd0, 0xae, 0x2e, 0x02, 
+	0xd0, 0xef, 0x78, 0x20, 0x23, 0xfd, 0x40, 0x18, 
+	0x70, 0x20, 0x78, 0x22, 0x21, 0x01, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x58, 0x28, 0x01, 0xd0, 0xe1, 
+	0x25, 0x00, 0x21, 0x01, 0x9a, 0x03, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x76, 0x28, 0x01, 0xd0, 0x99, 
+	0x79, 0x20, 0x23, 0xc3, 0x40, 0x18, 0x71, 0x20, 
+	0x20, 0x14, 0xf0, 0x03, 0xfc, 0x7f, 0x35, 0x01, 
+	0x2d, 0x0a, 0xd0, 0x8f, 0x79, 0x20, 0x09, 0xc0, 
+	0xd3, 0xeb, 0x20, 0x00, 0xb0, 0x04, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0x54, 0x2e, 0x08, 0x54, 0x50, 
+	0xb5, 0xf7, 0x04, 0x15, 0x0c, 0x2d, 0x1c, 0x07, 
+	0x01, 0x00, 0xb0, 0x82, 0x90, 0x01, 0x49, 0x3d, 
+	0x91, 0x00, 0x18, 0x40, 0x89, 0x00, 0x28, 0x01, 
+	0xd0, 0x07, 0x4a, 0x3b, 0x21, 0x01, 0x1c, 0x38, 
+	0x1c, 0x16, 0xf0, 0x00, 0xf9, 0x49, 0x28, 0x01, 
+	0xd1, 0x01, 0x20, 0x01, 0xe0, 0x64, 0x4c, 0x37, 
+	0x79, 0x20, 0x23, 0xc3, 0x40, 0x18, 0x71, 0x20, 
+	0x79, 0x20, 0x0a, 0x00, 0xd3, 0x02, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x66, 0x21, 0x01, 0x1c, 0x38, 
+	0x1c, 0x32, 0xf0, 0x00, 0xf9, 0x35, 0x28, 0x01, 
+	0xd0, 0xeb, 0x79, 0x20, 0x23, 0xc3, 0x40, 0x18, 
+	0x71, 0x20, 0x79, 0x20, 0x09, 0xc0, 0xd2, 0x01, 
+	0x20, 0x02, 0xe0, 0x49, 0x78, 0x20, 0x23, 0x01, 
+	0x43, 0x18, 0x70, 0x20, 0x78, 0x22, 0x21, 0x01, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xfb, 0x28, 0x01, 
+	0xd0, 0xd7, 0x06, 0x2a, 0x0e, 0x12, 0x21, 0x02, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xf3, 0x28, 0x01, 
+	0xd0, 0xcf, 0x0a, 0x2a, 0x21, 0x03, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0xec, 0x28, 0x01, 0xd0, 0xc8, 
+	0x98, 0x01, 0x99, 0x00, 0x5a, 0x08, 0x9a, 0x03, 
+	0x1c, 0x29, 0xf0, 0x04, 0xff, 0x55, 0x42, 0xa8, 
+	0xd1, 0xbf, 0x21, 0x01, 0x1c, 0x38, 0x1c, 0x32, 
+	0xf0, 0x00, 0xf9, 0x02, 0x28, 0x01, 0xd0, 0xb8, 
+	0x79, 0x20, 0x23, 0xc3, 0x40, 0x18, 0x71, 0x20, 
+	0x79, 0x20, 0x08, 0x80, 0xd3, 0x0c, 0x78, 0x20, 
+	0x23, 0xfe, 0x40, 0x18, 0x70, 0x20, 0x78, 0x22, 
+	0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xca, 
+	0x28, 0x01, 0xd0, 0xa6, 0x20, 0x04, 0xe0, 0x0b, 
+	0x78, 0x20, 0x23, 0xfe, 0x40, 0x18, 0x70, 0x20, 
+	0x78, 0x22, 0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0xbd, 0x28, 0x01, 0xd0, 0x99, 0x20, 0x00, 
+	0xb0, 0x02, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x54, 0x50, 
+	0x2e, 0x08, 0x1a, 0x58, 0x2e, 0x08, 0x1a, 0x54, 
+	0xb5, 0xf0, 0xb0, 0x81, 0x46, 0x6a, 0x1c, 0x07, 
+	0x4e, 0x16, 0x25, 0x00, 0x69, 0x71, 0x1c, 0x2b, 
+	0xf0, 0x00, 0xf8, 0x2c, 0x28, 0x00, 0xd1, 0x21, 
+	0xa8, 0x00, 0x88, 0x00, 0x30, 0x07, 0x04, 0x00, 
+	0x0c, 0x00, 0xf0, 0x03, 0xfb, 0xa3, 0x1c, 0x04, 
+	0xd0, 0x18, 0xa8, 0x00, 0x60, 0x25, 0x88, 0x00, 
+	0x80, 0xa0, 0xaa, 0x00, 0x88, 0x12, 0x69, 0x71, 
+	0x1d, 0xa0, 0xf0, 0x16, 0xfa, 0xb7, 0x01, 0x38, 
+	0x49, 0x09, 0x18, 0x40, 0x68, 0xc1, 0x29, 0x00, 
+	0xd1, 0x01, 0x60, 0xc4, 0xe0, 0x06, 0x68, 0x08, 
+	0x28, 0x00, 0xd0, 0x03, 0x68, 0x09, 0x68, 0x08, 
+	0x28, 0x00, 0xd1, 0xfb, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x54, 
+	0x2e, 0x08, 0x54, 0x50, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x01, 0x00, 0xb0, 0x83, 0x90, 0x02, 0x1c, 0x14, 
+	0x1c, 0x0d, 0x49, 0x32, 0x91, 0x01, 0x18, 0x46, 
+	0x89, 0x30, 0x28, 0x01, 0xd1, 0x01, 0x20, 0x01, 
+	0xe0, 0x58, 0x2b, 0x00, 0xd0, 0x12, 0x68, 0xf0, 
+	0x28, 0x00, 0xd0, 0x0f, 0x88, 0x82, 0x1d, 0x81, 
+	0x1c, 0x28, 0xf0, 0x16, 0xfa, 0x87, 0x68, 0xf0, 
+	0x88, 0x80, 0x80, 0x20, 0x68, 0xf0, 0x1c, 0x01, 
+	0x68, 0x00, 0x60, 0xf0, 0x1c, 0x08, 0xf0, 0x03, 
+	0xfb, 0x83, 0xe0, 0x42, 0x4a, 0x24, 0x92, 0x00, 
+	0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x74, 
+	0x28, 0x01, 0xd0, 0xe0, 0x4e, 0x21, 0x79, 0x30, 
+	0x23, 0xc3, 0x40, 0x18, 0x71, 0x30, 0x79, 0x30, 
+	0x0a, 0x00, 0xd2, 0x01, 0x20, 0x03, 0xe0, 0x31, 
+	0x4a, 0x1d, 0x21, 0x02, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x63, 0x28, 0x01, 0xd0, 0xcf, 0x4a, 0x1b, 
+	0x21, 0x03, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x5c, 
+	0x28, 0x01, 0xd0, 0xc8, 0x7b, 0x30, 0x02, 0x00, 
+	0x7a, 0x31, 0x18, 0x40, 0x80, 0x20, 0x88, 0x20, 
+	0x4b, 0x15, 0x42, 0x98, 0xd0, 0xbf, 0x23, 0xff, 
+	0x33, 0x01, 0x42, 0x98, 0xdc, 0xbb, 0x1c, 0x38, 
+	0xf7, 0xff, 0xfd, 0xc0, 0x28, 0x01, 0xd0, 0xb6, 
+	0x98, 0x02, 0x99, 0x01, 0x5a, 0x08, 0x88, 0x21, 
+	0x1c, 0x2a, 0xf0, 0x04, 0xfe, 0xb3, 0x88, 0x21, 
+	0x42, 0x88, 0xd1, 0xac, 0x21, 0x01, 0x9a, 0x00, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x39, 0x28, 0x01, 
+	0xd0, 0xa5, 0x20, 0x00, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x50, 
+	0x2e, 0x08, 0x1a, 0x58, 0x2e, 0x08, 0x1a, 0x54, 
+	0x2e, 0x08, 0x1a, 0x5c, 0x2e, 0x08, 0x1a, 0x60, 
+	0x00, 0x00, 0xff, 0xff, 0xb5, 0xb0, 0xb0, 0x81, 
+	0xab, 0x00, 0x70, 0x1a, 0x1c, 0x0c, 0x1c, 0x07, 
+	0xb0, 0x82, 0xf7, 0xff, 0xfd, 0x93, 0x25, 0x01, 
+	0x28, 0x01, 0xd1, 0x01, 0x1c, 0x28, 0xe0, 0x11, 
+	0xab, 0x00, 0x80, 0x1c, 0xa8, 0x02, 0x90, 0x01, 
+	0x01, 0x3c, 0x4f, 0x08, 0x5b, 0x38, 0x46, 0x6a, 
+	0x21, 0x05, 0xf0, 0x04, 0xfe, 0xb1, 0x28, 0x00, 
+	0xda, 0x03, 0x19, 0xe1, 0x81, 0x0d, 0x1c, 0x28, 
+	0xe0, 0x00, 0x20, 0x00, 0xb0, 0x03, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x50, 
+	0xb5, 0xf0, 0x1c, 0x14, 0x1c, 0x0d, 0x1c, 0x07, 
+	0xb0, 0x82, 0xf7, 0xff, 0xfd, 0x6f, 0x26, 0x01, 
+	0x28, 0x01, 0xd1, 0x01, 0x1c, 0x30, 0xe0, 0x10, 
+	0xab, 0x00, 0x80, 0x1d, 0x94, 0x01, 0x01, 0x3c, 
+	0x4f, 0x08, 0x5b, 0x38, 0x46, 0x6a, 0x21, 0x04, 
+	0xf0, 0x04, 0xfe, 0x8e, 0x28, 0x00, 0xda, 0x03, 
+	0x19, 0xe1, 0x81, 0x0e, 0x1c, 0x30, 0xe0, 0x00, 
+	0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x54, 0x50, 
+	0xb5, 0xb0, 0xb0, 0x86, 0x90, 0x05, 0x91, 0x04, 
+	0x20, 0x00, 0x90, 0x01, 0x1c, 0x14, 0x46, 0x6a, 
+	0xa8, 0x02, 0xa9, 0x01, 0xb4, 0x07, 0xaa, 0x06, 
+	0xb4, 0x04, 0x1c, 0x1f, 0x21, 0x1d, 0x20, 0x00, 
+	0xaa, 0x09, 0xab, 0x08, 0xf0, 0x00, 0xf8, 0x82, 
+	0x25, 0x00, 0x43, 0xed, 0xb0, 0x04, 0x28, 0x00, 
+	0xdb, 0x3b, 0x46, 0x6a, 0xa8, 0x02, 0xa9, 0x01, 
+	0xb4, 0x07, 0xaa, 0x06, 0xb4, 0x04, 0x21, 0x1c, 
+	0x20, 0x00, 0xaa, 0x09, 0xab, 0x08, 0xf0, 0x00, 
+	0xf8, 0x71, 0xb0, 0x04, 0x28, 0x00, 0xdb, 0x2c, 
+	0x46, 0x6a, 0xa8, 0x02, 0xa9, 0x01, 0xb4, 0x07, 
+	0xaa, 0x06, 0xb4, 0x04, 0x21, 0x15, 0x20, 0x00, 
+	0xaa, 0x09, 0xab, 0x08, 0xf0, 0x00, 0xf8, 0x62, 
+	0xb0, 0x04, 0x28, 0x00, 0xdb, 0x1d, 0x46, 0x6a, 
+	0xa8, 0x02, 0xa9, 0x01, 0xb4, 0x07, 0xaa, 0x06, 
+	0xb4, 0x04, 0x21, 0x20, 0x20, 0x00, 0xaa, 0x09, 
+	0xab, 0x08, 0xf0, 0x00, 0xf8, 0x53, 0xb0, 0x04, 
+	0x28, 0x00, 0xdb, 0x0e, 0x46, 0x6a, 0xa8, 0x02, 
+	0xa9, 0x01, 0xb4, 0x07, 0xaa, 0x06, 0xb4, 0x04, 
+	0x21, 0x1a, 0x20, 0x00, 0xaa, 0x09, 0xab, 0x08, 
+	0xf0, 0x00, 0xf8, 0x44, 0xb0, 0x04, 0x28, 0x00, 
+	0xda, 0x01, 0x1c, 0x28, 0xe0, 0x3a, 0x98, 0x02, 
+	0x80, 0x20, 0x20, 0x01, 0x90, 0x03, 0x43, 0xc4, 
+	0x46, 0x6a, 0xa8, 0x02, 0xa9, 0x01, 0xb4, 0x07, 
+	0xaa, 0x06, 0xb4, 0x04, 0x21, 0x1b, 0x20, 0x00, 
+	0xaa, 0x09, 0xab, 0x08, 0xf0, 0x00, 0xf8, 0x2e, 
+	0xb0, 0x04, 0x28, 0x00, 0xd0, 0xf0, 0x42, 0xa0, 
+	0xd0, 0xee, 0x28, 0x00, 0xdb, 0xe5, 0x46, 0x6a, 
+	0xa8, 0x02, 0xa9, 0x01, 0xb4, 0x07, 0xaa, 0x06, 
+	0xb4, 0x04, 0x21, 0x14, 0x20, 0x00, 0xaa, 0x09, 
+	0xab, 0x08, 0xf0, 0x00, 0xf8, 0x1b, 0xb0, 0x04, 
+	0x28, 0x00, 0xdb, 0xd6, 0x46, 0x6a, 0xa8, 0x02, 
+	0xa9, 0x01, 0xb4, 0x07, 0xaa, 0x06, 0xb4, 0x04, 
+	0x21, 0xff, 0x20, 0x00, 0xaa, 0x09, 0xab, 0x08, 
+	0xf0, 0x00, 0xf8, 0x0c, 0xb0, 0x04, 0x28, 0x00, 
+	0xdb, 0xc7, 0x98, 0x01, 0x28, 0x0f, 0xd1, 0xc4, 
+	0x70, 0x38, 0x20, 0x01, 0xb0, 0x06, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x06, 0x08, 
+	0x0e, 0x00, 0xb0, 0x83, 0x90, 0x00, 0x25, 0x00, 
+	0x24, 0x00, 0x26, 0x00, 0x1c, 0x17, 0x22, 0x00, 
+	0x21, 0x00, 0xb0, 0x87, 0x91, 0x04, 0x98, 0x07, 
+	0x28, 0xff, 0xd1, 0x0b, 0x68, 0x38, 0x78, 0x00, 
+	0x28, 0xff, 0xd1, 0x07, 0x9b, 0x0d, 0x68, 0x18, 
+	0x28, 0x01, 0xd1, 0x03, 0x20, 0x00, 0x9b, 0x0d, 
+	0x60, 0x18, 0xe1, 0x87, 0x68, 0x38, 0x78, 0x01, 
+	0x78, 0x43, 0x93, 0x05, 0x30, 0x02, 0x32, 0x02, 
+	0x60, 0x38, 0x92, 0x06, 0x9a, 0x07, 0x42, 0x8a, 
+	0xd1, 0x5b, 0x21, 0x01, 0x91, 0x04, 0x9a, 0x07, 
+	0x2a, 0x1b, 0xd0, 0x57, 0xdc, 0x0b, 0x2a, 0x14, 
+	0xd0, 0x5a, 0x2a, 0x15, 0xd0, 0x11, 0x2a, 0x1a, 
+	0xd1, 0x4f, 0x78, 0x02, 0x07, 0x91, 0x0f, 0x89, 
+	0x29, 0x01, 0xdd, 0x14, 0xe0, 0x10, 0x2a, 0xc0, 
+	0xd0, 0x73, 0x2a, 0xc1, 0xd1, 0x45, 0xa1, 0xb6, 
+	0xf0, 0x16, 0xf9, 0x4c, 0x28, 0x00, 0xd1, 0x07, 
+	0xe1, 0x47, 0x78, 0x01, 0x29, 0x05, 0xd1, 0x03, 
+	0x78, 0x40, 0x28, 0x00, 0xd1, 0x00, 0xe1, 0x40, 
+	0x20, 0x00, 0x43, 0xc0, 0xe1, 0x56, 0x23, 0x3c, 
+	0x40, 0x1a, 0x78, 0x40, 0x9b, 0x16, 0x60, 0x18, 
+	0x29, 0x00, 0xd1, 0x02, 0x68, 0x38, 0x78, 0x80, 
+	0xe0, 0x04, 0x68, 0x38, 0x78, 0x83, 0x78, 0xc0, 
+	0x02, 0x00, 0x18, 0x18, 0x9b, 0x14, 0x60, 0x18, 
+	0x98, 0x14, 0x68, 0x00, 0x4b, 0xa8, 0x42, 0x98, 
+	0xdc, 0xe6, 0x68, 0x38, 0x18, 0x43, 0x78, 0xdb, 
+	0x08, 0x5b, 0xd3, 0xe1, 0x18, 0x89, 0x31, 0x04, 
+	0x18, 0x40, 0x90, 0x02, 0x9b, 0x0d, 0x68, 0x18, 
+	0x9a, 0x06, 0x1a, 0x80, 0x9a, 0x05, 0x1a, 0x51, 
+	0x1a, 0x40, 0x90, 0x03, 0xaa, 0x14, 0xca, 0x07, 
+	0xb4, 0x07, 0x9a, 0x16, 0xb4, 0x04, 0x21, 0xc0, 
+	0x98, 0x0b, 0xaa, 0x06, 0xab, 0x07, 0xf7, 0xff, 
+	0xff, 0x81, 0xb0, 0x04, 0x28, 0x00, 0xdb, 0xc7, 
+	0xe1, 0x07, 0xe1, 0x06, 0x78, 0x00, 0x09, 0x81, 
+	0x07, 0x89, 0xd1, 0x02, 0x21, 0x01, 0xe0, 0x01, 
+	0xe0, 0xc1, 0x21, 0x00, 0x9a, 0x13, 0x68, 0x12, 
+	0x40, 0x11, 0xd1, 0xb9, 0x23, 0xc0, 0x43, 0xdb, 
+	0x40, 0x18, 0x90, 0x00, 0x28, 0x0f, 0xd1, 0x01, 
+	0x99, 0x15, 0x60, 0x08, 0x20, 0x00, 0x99, 0x13, 
+	0x60, 0x08, 0x68, 0x39, 0x78, 0x08, 0x0a, 0x00, 
+	0xd3, 0x73, 0x78, 0x48, 0x28, 0x04, 0xd1, 0x71, 
+	0x78, 0x8a, 0x92, 0x09, 0x20, 0x0b, 0x40, 0x10, 
+	0xd0, 0x6d, 0x78, 0xcb, 0x20, 0x00, 0x22, 0x00, 
+	0x08, 0x5e, 0xd3, 0x00, 0x30, 0x01, 0x10, 0x5b, 
+	0xe0, 0x00, 0xe0, 0xa1, 0x06, 0x1b, 0x0e, 0x1b, 
+	0x32, 0x01, 0x2a, 0x08, 0xdb, 0xf4, 0x22, 0x04, 
+	0x1c, 0xc3, 0x2b, 0x04, 0xdb, 0x07, 0x5c, 0x8e, 
+	0x0a, 0x33, 0xd3, 0x00, 0x30, 0x01, 0x32, 0x01, 
+	0x1c, 0xc3, 0x42, 0x93, 0xda, 0xf7, 0x9a, 0x09, 
+	0x30, 0x01, 0x08, 0xd2, 0xd3, 0x25, 0x18, 0x0b, 
+	0x78, 0xda, 0x92, 0x08, 0x07, 0x92, 0x0f, 0x92, 
+	0x1c, 0x1e, 0x2a, 0x03, 0xd0, 0x09, 0x22, 0x00, 
+	0x79, 0x35, 0x0a, 0x2b, 0xd3, 0x04, 0x32, 0x01, 
+	0x18, 0xb3, 0x79, 0x1d, 0x0a, 0x2b, 0xd2, 0xfa, 
+	0x1c, 0x55, 0x23, 0x1c, 0x9a, 0x08, 0x40, 0x1a, 
+	0x2a, 0x1c, 0xd0, 0x0b, 0x22, 0x00, 0x19, 0x73, 
+	0x79, 0x1c, 0x1c, 0x1e, 0x0a, 0x23, 0xd3, 0x04, 
+	0x32, 0x01, 0x18, 0xb3, 0x79, 0x1c, 0x0a, 0x23, 
+	0xd2, 0xfa, 0x1c, 0x54, 0x19, 0x40, 0x19, 0x00, 
+	0x30, 0x01, 0x9a, 0x09, 0x09, 0x12, 0xd3, 0x0e, 
+	0x18, 0x0a, 0x78, 0xd6, 0x0a, 0x33, 0xd3, 0x09, 
+	0x79, 0x12, 0x23, 0xc0, 0x40, 0x13, 0x09, 0x9d, 
+	0x23, 0x30, 0x40, 0x1a, 0x09, 0x14, 0x19, 0x40, 
+	0x19, 0x00, 0x30, 0x01, 0x30, 0x01, 0x9a, 0x09, 
+	0x09, 0x52, 0xd3, 0x05, 0x18, 0x0a, 0x78, 0xd2, 
+	0x09, 0x52, 0xd3, 0x00, 0x30, 0x02, 0x30, 0x01, 
+	0x9a, 0x09, 0x09, 0x52, 0x07, 0x92, 0xd0, 0x11, 
+	0x18, 0x0a, 0x78, 0xd2, 0x23, 0x18, 0x40, 0x13, 
+	0x08, 0xdd, 0x23, 0x60, 0x40, 0x13, 0x09, 0x5c, 
+	0xe0, 0x02, 0xe0, 0x2c, 0xe0, 0x2b, 0xe0, 0x2a, 
+	0x0a, 0x12, 0xd3, 0x00, 0x00, 0x64, 0x19, 0x40, 
+	0x19, 0x00, 0x30, 0x01, 0x30, 0x03, 0x18, 0x09, 
+	0x91, 0x02, 0x9b, 0x0d, 0x68, 0x19, 0x9a, 0x06, 
+	0x1a, 0x89, 0x1a, 0x08, 0x90, 0x03, 0xaa, 0x14, 
+	0xca, 0x07, 0xb4, 0x07, 0x9a, 0x16, 0xb4, 0x04, 
+	0x21, 0xc0, 0x98, 0x0b, 0xaa, 0x06, 0xab, 0x07, 
+	0xf7, 0xff, 0xfe, 0xd0, 0xb0, 0x04, 0x28, 0x00, 
+	0xdb, 0x0d, 0xaa, 0x14, 0xca, 0x07, 0xb4, 0x07, 
+	0x9a, 0x16, 0xb4, 0x04, 0x21, 0xc1, 0x98, 0x0b, 
+	0xaa, 0x06, 0xab, 0x07, 0xf7, 0xff, 0xfe, 0xc2, 
+	0xb0, 0x04, 0x28, 0x00, 0xda, 0x02, 0x26, 0x01, 
+	0x43, 0xf6, 0xe0, 0x46, 0x98, 0x00, 0x9a, 0x16, 
+	0x68, 0x11, 0x42, 0x88, 0xd1, 0x01, 0x26, 0x01, 
+	0xe0, 0x3f, 0x26, 0x00, 0xe0, 0x3d, 0x9a, 0x05, 
+	0x2a, 0x00, 0xd0, 0x00, 0xe6, 0xf8, 0xe0, 0x38, 
+	0x99, 0x0a, 0x29, 0x1b, 0xd1, 0x05, 0xa1, 0x2f, 
+	0xf0, 0x16, 0xf8, 0x34, 0x28, 0x00, 0xd1, 0xf5, 
+	0xe0, 0x2f, 0x9a, 0x05, 0x2a, 0x0e, 0xd1, 0xf1, 
+	0x78, 0x01, 0x29, 0x41, 0xd1, 0xee, 0x78, 0x40, 
+	0x28, 0x02, 0xd1, 0xeb, 0xa0, 0x2a, 0xf0, 0x16, 
+	0xf8, 0x51, 0x90, 0x01, 0x68, 0x38, 0x9a, 0x01, 
+	0x30, 0x02, 0xa1, 0x27, 0xf0, 0x16, 0xf8, 0x6c, 
+	0x28, 0x00, 0xd1, 0xdf, 0x68, 0x38, 0x9a, 0x01, 
+	0x18, 0x80, 0x78, 0x80, 0xf0, 0x00, 0xf8, 0x4a, 
+	0x28, 0x00, 0xd0, 0xd7, 0x68, 0x38, 0x9a, 0x01, 
+	0x18, 0x80, 0x78, 0xc1, 0x29, 0x2e, 0xd1, 0xd1, 
+	0x79, 0x00, 0xf0, 0x00, 0xf8, 0x3f, 0x28, 0x00, 
+	0xd0, 0xcc, 0x68, 0x38, 0x9a, 0x01, 0x18, 0x80, 
+	0x79, 0x40, 0xf0, 0x00, 0xf8, 0x37, 0x28, 0x00, 
+	0xd0, 0xc4, 0x9a, 0x06, 0x9b, 0x05, 0x18, 0xd2, 
+	0x9b, 0x0d, 0x68, 0x18, 0x42, 0x82, 0xda, 0xbd, 
+	0x68, 0x38, 0x9b, 0x05, 0x18, 0xc0, 0x60, 0x38, 
+	0x9b, 0x0d, 0x68, 0x18, 0x1a, 0x80, 0x60, 0x18, 
+	0x99, 0x04, 0x29, 0x00, 0xd1, 0x00, 0xe6, 0x6e, 
+	0x98, 0x07, 0x28, 0x1b, 0xd1, 0x01, 0x1c, 0x30, 
+	0xe0, 0x00, 0x20, 0x01, 0xb0, 0x0a, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x44, 0x56, 0x42, 0x5f, 0x43, 0x49, 0x5f, 0x4d, 
+	0x4f, 0x44, 0x55, 0x4c, 0x45, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x0f, 0xfe, 0x44, 0x56, 0x42, 0x5f, 
+	0x48, 0x4f, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 
+	0x44, 0x56, 0x42, 0x5f, 0x43, 0x49, 0x5f, 0x56, 
+	0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x0e, 0x09, 
+	0x22, 0xf0, 0x40, 0x0a, 0x20, 0x00, 0x2a, 0x30, 
+	0xd1, 0x04, 0x07, 0x09, 0x0f, 0x09, 0x29, 0x09, 
+	0xdc, 0x00, 0x20, 0x01, 0x47, 0x70, 0xb5, 0xf3, 
+	0x26, 0x00, 0x1c, 0x07, 0xb0, 0x85, 0x48, 0x4f, 
+	0x90, 0x04, 0x23, 0x10, 0x5e, 0xc0, 0x22, 0x08, 
+	0x92, 0x01, 0x01, 0x01, 0x91, 0x03, 0x4a, 0x4c, 
+	0x92, 0x02, 0x18, 0x8d, 0x89, 0x29, 0x4c, 0x4b, 
+	0x29, 0x02, 0xd1, 0x47, 0x46, 0x6a, 0x23, 0x01, 
+	0x1d, 0xf9, 0x31, 0x01, 0xf7, 0xff, 0xfc, 0xc2, 
+	0x1c, 0x01, 0xd0, 0x16, 0x20, 0x04, 0x22, 0x03, 
+	0x29, 0x01, 0xd0, 0x2b, 0x29, 0x04, 0xd1, 0x6e, 
+	0x70, 0x22, 0x80, 0x60, 0x99, 0x03, 0x9a, 0x02, 
+	0x5a, 0x50, 0x80, 0xa0, 0x21, 0x02, 0x71, 0xa1, 
+	0x22, 0x08, 0x99, 0x06, 0x80, 0x0a, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf0, 0x15, 0xff, 0x4b, 0x26, 0x03, 
+	0xe0, 0x5d, 0x21, 0x02, 0x70, 0x21, 0xa8, 0x00, 
+	0x88, 0x00, 0x30, 0x07, 0x04, 0x00, 0x0c, 0x00, 
+	0x80, 0x60, 0x99, 0x03, 0x9a, 0x02, 0x5a, 0x51, 
+	0x80, 0xa1, 0xa9, 0x00, 0x88, 0x09, 0x80, 0xe1, 
+	0x30, 0x04, 0x99, 0x06, 0x80, 0x08, 0x9a, 0x01, 
+	0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x15, 0xff, 0x32, 
+	0x26, 0x02, 0xe0, 0x44, 0x81, 0x2a, 0x70, 0x20, 
+	0x80, 0x60, 0x99, 0x03, 0x9a, 0x02, 0x5a, 0x50, 
+	0x80, 0xa0, 0x22, 0x08, 0x99, 0x06, 0x80, 0x0a, 
+	0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x15, 0xff, 0x22, 
+	0x26, 0x04, 0xe0, 0x34, 0x21, 0xff, 0x31, 0x01, 
+	0x1d, 0x2a, 0xf7, 0xff, 0xfa, 0x2d, 0x1c, 0x01, 
+	0x20, 0x0c, 0x29, 0x00, 0xd0, 0x16, 0x29, 0x07, 
+	0xd1, 0x29, 0x26, 0x01, 0x70, 0x26, 0x21, 0x08, 
+	0x80, 0x61, 0x99, 0x03, 0x9a, 0x02, 0x5a, 0x51, 
+	0x80, 0xa1, 0x21, 0x02, 0x71, 0xa1, 0x68, 0x69, 
+	0x81, 0x21, 0x99, 0x06, 0x80, 0x08, 0x1c, 0x02, 
+	0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x15, 0xff, 0x02, 
+	0x81, 0x2e, 0xe0, 0x13, 0x23, 0x01, 0x70, 0x23, 
+	0x21, 0x08, 0x80, 0x61, 0x99, 0x03, 0x9a, 0x02, 
+	0x5a, 0x51, 0x80, 0xa1, 0x71, 0xa3, 0x68, 0x69, 
+	0x81, 0x21, 0x99, 0x06, 0x80, 0x08, 0x1c, 0x02, 
+	0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x15, 0xfe, 0xee, 
+	0x21, 0x02, 0x81, 0x29, 0x26, 0x01, 0x98, 0x04, 
+	0x8a, 0x00, 0x30, 0x01, 0x99, 0x04, 0x82, 0x08, 
+	0x23, 0x10, 0x98, 0x04, 0x5e, 0xc0, 0x28, 0x02, 
+	0xd1, 0x02, 0x20, 0x00, 0x99, 0x04, 0x82, 0x08, 
+	0x1c, 0x30, 0xb0, 0x05, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x54, 
+	0x2e, 0x08, 0x54, 0x50, 0x2e, 0x08, 0x54, 0x40, 
+	0xb5, 0x80, 0x27, 0x00, 0x78, 0x00, 0x49, 0x0d, 
+	0x72, 0x08, 0x7a, 0x0b, 0x48, 0x0c, 0x2b, 0x01, 
+	0xd1, 0x06, 0xca, 0x08, 0xc0, 0x08, 0xca, 0x08, 
+	0xc0, 0x08, 0xca, 0x0c, 0xc0, 0x0c, 0xe0, 0x07, 
+	0x68, 0xc9, 0x60, 0x01, 0x1c, 0x08, 0x49, 0x07, 
+	0xf7, 0xff, 0xff, 0x41, 0x1c, 0x07, 0xd0, 0x01, 
+	0xf0, 0x00, 0xf8, 0x50, 0x1c, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x6c, 
+	0x2e, 0x08, 0x54, 0x70, 0x2e, 0x08, 0x1a, 0x7c, 
+	0xb5, 0xb0, 0x24, 0x00, 0x4f, 0x17, 0x72, 0x3c, 
+	0x20, 0x01, 0xf0, 0x02, 0xff, 0xc3, 0x28, 0x00, 
+	0xd1, 0x03, 0x43, 0xc0, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0xf7, 0xff, 0xf9, 0x25, 0x28, 0x00, 
+	0xdc, 0x04, 0x20, 0x01, 0x43, 0xc0, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x25, 0x01, 
+	0x49, 0x0d, 0x00, 0x82, 0x18, 0x53, 0x70, 0x9d, 
+	0x52, 0x8c, 0x30, 0x01, 0x28, 0x02, 0xdb, 0xf8, 
+	0x68, 0xf8, 0x28, 0x00, 0xd1, 0x0a, 0x20, 0xff, 
+	0x30, 0x0d, 0xf0, 0x02, 0xff, 0x67, 0x60, 0xf8, 
+	0x28, 0x00, 0xd1, 0x03, 0x38, 0x03, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x28, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x6c, 
+	0x2e, 0x08, 0x1a, 0x6c, 0xb5, 0x80, 0x4f, 0x06, 
+	0x68, 0xf8, 0xf0, 0x02, 0xff, 0x79, 0x20, 0x00, 
+	0x60, 0xf8, 0xf7, 0xff, 0xf9, 0x53, 0xf0, 0x02, 
+	0xfe, 0x45, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x6c, 0xb5, 0x80, 0x21, 0x00, 
+	0x48, 0x18, 0x7a, 0x02, 0x48, 0x18, 0x2a, 0x01, 
+	0xd1, 0x0e, 0x78, 0x42, 0x2a, 0x13, 0xd1, 0x03, 
+	0x68, 0x87, 0xf0, 0x00, 0xf8, 0x2b, 0x1c, 0x01, 
+	0x29, 0x00, 0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x02, 
+	0xff, 0x5b, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x68, 0x00, 0x78, 0x00, 0x28, 0x01, 0xd0, 0x14, 
+	0x28, 0x02, 0xd0, 0x08, 0x28, 0x03, 0xd0, 0x0b, 
+	0x28, 0x04, 0xd1, 0xf2, 0xf0, 0x00, 0xf8, 0x8c, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xf0, 0x00, 
+	0xf8, 0x6b, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0xf0, 0x00, 0xf8, 0x4c, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0xf0, 0x00, 0xf8, 0x23, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x6c, 
+	0x2e, 0x08, 0x54, 0x70, 0xb5, 0x80, 0xb0, 0x83, 
+	0x4f, 0x0b, 0x88, 0xb8, 0xf0, 0x00, 0xf8, 0xae, 
+	0x28, 0x00, 0xdb, 0x0a, 0x88, 0xf9, 0xab, 0x02, 
+	0x80, 0x19, 0x68, 0xb9, 0x91, 0x01, 0x46, 0x6b, 
+	0x21, 0x13, 0xaa, 0x01, 0xf0, 0x00, 0xf8, 0xd6, 
+	0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 0x98, 0x00, 
+	0xb0, 0x03, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x70, 0xb5, 0xf0, 0xb0, 0x83, 
+	0x4e, 0x0f, 0x68, 0x30, 0x88, 0x84, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf8, 0x6e, 0x25, 0x01, 0x1c, 0x07, 
+	0xd4, 0x11, 0x68, 0x30, 0x79, 0x81, 0xab, 0x01, 
+	0x70, 0x19, 0x89, 0x00, 0x80, 0x58, 0x46, 0x6b, 
+	0x21, 0x01, 0x1c, 0x38, 0xaa, 0x01, 0xf0, 0x00, 
+	0xf8, 0xb5, 0x28, 0x00, 0xd1, 0x03, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf0, 0x00, 0xf8, 0x91, 0x1c, 0x28, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x70, 0xb5, 0x90, 0xb0, 0x83, 
+	0x4c, 0x0a, 0x68, 0x20, 0x88, 0x80, 0xf0, 0x00, 
+	0xf8, 0x4b, 0x27, 0x01, 0x28, 0x00, 0xdb, 0x08, 
+	0x68, 0x21, 0x79, 0x89, 0xab, 0x01, 0x70, 0x19, 
+	0x46, 0x6b, 0x21, 0x03, 0xaa, 0x01, 0xf0, 0x00, 
+	0xf8, 0x95, 0x1c, 0x38, 0xb0, 0x03, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x70, 
+	0xb5, 0x90, 0xb0, 0x83, 0x4c, 0x0b, 0x68, 0x20, 
+	0x88, 0x80, 0xf0, 0x00, 0xf8, 0x53, 0x27, 0x01, 
+	0x28, 0x00, 0xdb, 0x0a, 0x68, 0x21, 0x88, 0xca, 
+	0xab, 0x02, 0x80, 0x1a, 0x31, 0x08, 0x91, 0x01, 
+	0x46, 0x6b, 0x21, 0x02, 0xaa, 0x01, 0xf0, 0x00, 
+	0xf8, 0x79, 0x1c, 0x38, 0xb0, 0x03, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x70, 
+	0xb5, 0xb0, 0xb0, 0x81, 0x48, 0x0b, 0x68, 0x00, 
+	0x88, 0x84, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x36, 
+	0x25, 0x01, 0x1c, 0x07, 0xd4, 0x09, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x04, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x61, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x00, 
+	0xf8, 0x3f, 0x1c, 0x28, 0xb0, 0x01, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x70, 
+	0xb4, 0x80, 0x04, 0x03, 0x0c, 0x1b, 0x20, 0x00, 
+	0x49, 0x0d, 0x00, 0x82, 0x18, 0x57, 0x78, 0xbf, 
+	0x2f, 0x01, 0xd1, 0x06, 0x00, 0x87, 0x53, 0xcb, 
+	0x23, 0x02, 0x18, 0x51, 0x70, 0x8b, 0xbc, 0x80, 
+	0x47, 0x70, 0x5a, 0x8a, 0x42, 0x9a, 0xd1, 0x03, 
+	0x20, 0x01, 0x43, 0xc0, 0xbc, 0x80, 0x47, 0x70, 
+	0x30, 0x01, 0x28, 0x02, 0xdb, 0xe9, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0x6c, 0xb4, 0x80, 0x04, 0x02, 
+	0x0c, 0x12, 0x20, 0x00, 0x49, 0x07, 0x00, 0x83, 
+	0x18, 0x5f, 0x78, 0xbf, 0x2f, 0x01, 0xd0, 0x02, 
+	0x5a, 0xcb, 0x42, 0x93, 0xd0, 0x04, 0x30, 0x01, 
+	0x28, 0x02, 0xdb, 0xf4, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x1a, 0x6c, 
+	0xb4, 0x80, 0x28, 0x00, 0xda, 0x05, 0x28, 0x02, 
+	0xdb, 0x03, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 
+	0x47, 0x70, 0x23, 0x01, 0x00, 0x82, 0x49, 0x03, 
+	0x18, 0x57, 0x70, 0xbb, 0x23, 0x00, 0x52, 0x8b, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x1a, 0x6c, 
+	0xb5, 0x00, 0x49, 0x03, 0x78, 0x08, 0xf0, 0x02, 
+	0xfd, 0x77, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x70, 0xb5, 0x90, 0x06, 0x09, 
+	0x0e, 0x09, 0x00, 0x87, 0x4c, 0x0a, 0x19, 0x3f, 
+	0x78, 0xbf, 0x2f, 0x02, 0xd0, 0x06, 0x2f, 0x03, 
+	0xd1, 0x09, 0xf0, 0x00, 0xf8, 0x39, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xf0, 0x00, 0xf8, 0x0a, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0x6c, 0xb5, 0x90, 0x06, 0x09, 
+	0x0e, 0x09, 0x27, 0x01, 0x60, 0x1f, 0x29, 0x01, 
+	0xd1, 0x19, 0x23, 0x12, 0x49, 0x0e, 0x70, 0x0b, 
+	0x23, 0x11, 0x70, 0x4b, 0x23, 0x08, 0x80, 0x4b, 
+	0x00, 0x84, 0x4f, 0x0c, 0x5b, 0x38, 0x80, 0x88, 
+	0x78, 0x10, 0x71, 0x88, 0x88, 0x50, 0x81, 0x08, 
+	0xf7, 0xff, 0xff, 0xc2, 0x28, 0x00, 0xd0, 0x06, 
+	0x20, 0x03, 0x19, 0xe1, 0x70, 0x88, 0x20, 0x01, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x70, 0x2e, 0x08, 0x1a, 0x6c, 
+	0xb5, 0xff, 0x06, 0x09, 0x0e, 0x09, 0x1c, 0x17, 
+	0x22, 0x01, 0xb0, 0x81, 0x9b, 0x04, 0x25, 0x01, 
+	0x00, 0x86, 0x60, 0x1a, 0x48, 0x38, 0x90, 0x00, 
+	0x4c, 0x38, 0x29, 0x02, 0xd0, 0x23, 0x29, 0x03, 
+	0xd0, 0x41, 0x29, 0x04, 0xd0, 0x4f, 0x29, 0x13, 
+	0xd1, 0x5e, 0x88, 0xba, 0x98, 0x00, 0x5b, 0x80, 
+	0x68, 0x39, 0xf7, 0xfe, 0xff, 0x9d, 0x1c, 0x05, 
+	0xd1, 0x11, 0x20, 0x12, 0x70, 0x20, 0x20, 0x15, 
+	0x70, 0x60, 0x20, 0x04, 0x80, 0x60, 0x98, 0x00, 
+	0x5b, 0x80, 0x80, 0xa0, 0xf7, 0xff, 0xff, 0x88, 
+	0x28, 0x00, 0xd0, 0x4b, 0x20, 0x00, 0x9b, 0x04, 
+	0x25, 0x01, 0x60, 0x18, 0xe0, 0x46, 0x20, 0x00, 
+	0x9b, 0x04, 0x60, 0x18, 0xe0, 0x41, 0x88, 0xb8, 
+	0xf0, 0x02, 0xfd, 0xac, 0x60, 0xa0, 0x1c, 0x01, 
+	0xd1, 0x01, 0x20, 0x00, 0xe0, 0x3b, 0x20, 0x12, 
+	0x70, 0x20, 0x20, 0x13, 0x70, 0x60, 0x20, 0x08, 
+	0x80, 0x60, 0x98, 0x00, 0x5b, 0x80, 0x80, 0xa0, 
+	0x88, 0xb8, 0x80, 0xe0, 0x88, 0xba, 0x1c, 0x08, 
+	0x68, 0x39, 0xf0, 0x15, 0xfc, 0xb7, 0xf7, 0xff, 
+	0xff, 0x63, 0x28, 0x00, 0xd1, 0x26, 0x68, 0xa0, 
+	0xf0, 0x02, 0xfd, 0xb6, 0xe0, 0x21, 0x20, 0x12, 
+	0x70, 0x20, 0x20, 0x14, 0x70, 0x60, 0x20, 0x04, 
+	0x80, 0x60, 0x98, 0x00, 0x5b, 0x80, 0x80, 0xa0, 
+	0x78, 0x38, 0x80, 0xa0, 0xf7, 0xff, 0xff, 0x50, 
+	0x28, 0x00, 0xd1, 0x13, 0xe0, 0x11, 0x20, 0x12, 
+	0x70, 0x20, 0x70, 0x60, 0x20, 0x04, 0x80, 0x60, 
+	0x98, 0x00, 0x5b, 0x80, 0x80, 0xa0, 0xf7, 0xff, 
+	0xff, 0x43, 0x28, 0x00, 0xd0, 0x05, 0x20, 0x02, 
+	0x99, 0x00, 0x18, 0x71, 0x70, 0x88, 0xe0, 0x01, 
+	0xe7, 0xff, 0x25, 0x00, 0x1c, 0x28, 0xb0, 0x01, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x6c, 0x2e, 0x08, 0x54, 0x70, 
+	0xb5, 0xf0, 0x1c, 0x17, 0x06, 0x02, 0x0e, 0x12, 
+	0x04, 0x0c, 0x0c, 0x24, 0x1c, 0x59, 0x1c, 0x48, 
+	0x1c, 0x1d, 0x1c, 0x43, 0xb0, 0x81, 0x93, 0x00, 
+	0x1f, 0xd6, 0x3e, 0x89, 0x2e, 0x07, 0xd2, 0x51, 
+	0xa3, 0x01, 0x5d, 0x9b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x03, 0x4d, 0x14, 0x3e, 0x4d, 0x27, 0x31, 0x00, 
+	0x70, 0x2a, 0x1c, 0x0d, 0x21, 0x02, 0x70, 0x29, 
+	0x1c, 0x01, 0x1c, 0x05, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf8, 0xab, 0x88, 0xba, 0x68, 0x39, 0x1c, 0xa8, 
+	0xf0, 0x15, 0xfc, 0x5c, 0x88, 0xb8, 0x30, 0x04, 
+	0xe0, 0x3a, 0x70, 0x2a, 0x1c, 0x0d, 0x21, 0x07, 
+	0x70, 0x29, 0x1c, 0x05, 0x79, 0x38, 0x70, 0x28, 
+	0x9d, 0x00, 0x22, 0x04, 0x1c, 0x28, 0x1c, 0x39, 
+	0xf0, 0x15, 0xfc, 0x4c, 0x1c, 0x20, 0x1d, 0x29, 
+	0xf0, 0x00, 0xf8, 0x92, 0x20, 0x09, 0xe0, 0x27, 
+	0x70, 0x2a, 0x1c, 0x0d, 0x21, 0x02, 0x70, 0x29, 
+	0x1c, 0x01, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x88, 
+	0x20, 0x04, 0xe0, 0x1d, 0x70, 0x2a, 0x1c, 0x0d, 
+	0x21, 0x03, 0x70, 0x29, 0x1c, 0x05, 0x78, 0xb8, 
+	0x70, 0x28, 0x99, 0x00, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf8, 0x7b, 0x20, 0x05, 0xe0, 0x10, 0x70, 0x2a, 
+	0x1c, 0x0d, 0x21, 0x06, 0x70, 0x29, 0x22, 0x04, 
+	0x1c, 0x39, 0x1c, 0x05, 0xf0, 0x15, 0xfc, 0x26, 
+	0x1c, 0x20, 0x1d, 0x29, 0xf0, 0x00, 0xf8, 0x6c, 
+	0x20, 0x08, 0xe0, 0x01, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf0, 0x1c, 0x0f, 0x78, 0x01, 0x9d, 0x05, 
+	0x70, 0x11, 0x78, 0x41, 0x78, 0x12, 0x1c, 0x86, 
+	0x30, 0x03, 0x3a, 0x90, 0x1c, 0x1c, 0x2a, 0x07, 
+	0xd2, 0x51, 0xa3, 0x02, 0x5c, 0x9b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x11, 0x4d, 0x4d, 
+	0x1b, 0x2e, 0x39, 0x00, 0x29, 0x02, 0xd1, 0x3d, 
+	0x1c, 0x30, 0x1c, 0x21, 0xf0, 0x00, 0xf8, 0x4e, 
+	0x1c, 0xb0, 0x60, 0x28, 0x1f, 0x38, 0x80, 0xa8, 
+	0x88, 0x20, 0x80, 0xe8, 0xe0, 0x37, 0x29, 0x04, 
+	0xd1, 0x30, 0x22, 0x04, 0x1c, 0x68, 0x1c, 0x31, 
+	0xf0, 0x15, 0xfb, 0xf0, 0x2f, 0x06, 0xd0, 0x2e, 
+	0xe0, 0x28, 0x29, 0x07, 0xd1, 0x26, 0x78, 0x31, 
+	0x71, 0x29, 0x1c, 0x01, 0x1c, 0x06, 0x22, 0x04, 
+	0x1c, 0x28, 0xf0, 0x15, 0xfb, 0xe3, 0x1d, 0x30, 
+	0x1c, 0x21, 0xf0, 0x00, 0xf8, 0x2f, 0x88, 0x20, 
+	0x80, 0xe8, 0x2f, 0x09, 0xd0, 0x1b, 0xe0, 0x15, 
+	0x29, 0x02, 0xd1, 0x13, 0x1c, 0x30, 0x1c, 0x21, 
+	0xf0, 0x00, 0xf8, 0x24, 0x88, 0x20, 0x80, 0x28, 
+	0x2f, 0x04, 0xd0, 0x10, 0xe0, 0x0a, 0x29, 0x03, 
+	0xd1, 0x08, 0x78, 0x31, 0x70, 0xa9, 0x1c, 0x21, 
+	0xf0, 0x00, 0xf8, 0x18, 0x88, 0x20, 0x80, 0x28, 
+	0x2f, 0x05, 0xd0, 0x04, 0x20, 0x01, 0x43, 0xc0, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x38, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x06, 0x00, 0x0e, 0x00, 0x0a, 0x02, 0x70, 0x0a, 
+	0x70, 0x48, 0x47, 0x70, 0x78, 0x02, 0x02, 0x12, 
+	0x78, 0x40, 0x18, 0x10, 0x80, 0x08, 0x47, 0x70, 
+	0xb5, 0x00, 0x78, 0x01, 0x48, 0x0b, 0x71, 0x01, 
+	0x79, 0x00, 0x28, 0x01, 0xd0, 0x01, 0x28, 0x02, 
+	0xd1, 0x0b, 0x48, 0x09, 0xca, 0x08, 0xc0, 0x08, 
+	0xca, 0x08, 0xc0, 0x08, 0xca, 0x0c, 0xc0, 0x0c, 
+	0xf0, 0x00, 0xf8, 0x37, 0x20, 0x00, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0x80, 
+	0x2e, 0x08, 0x54, 0x80, 0xb5, 0x80, 0x20, 0x04, 
+	0xf0, 0x02, 0xfc, 0xa4, 0x22, 0x00, 0x28, 0x00, 
+	0xda, 0x03, 0x1c, 0x10, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x48, 0x0a, 0x71, 0x02, 0x21, 0x00, 
+	0x20, 0x01, 0x4b, 0x09, 0x01, 0x0f, 0x55, 0xd8, 
+	0x31, 0x01, 0x29, 0x20, 0xdb, 0xfa, 0x21, 0x00, 
+	0x4b, 0x06, 0x00, 0x4f, 0x53, 0xda, 0x31, 0x01, 
+	0x29, 0x10, 0xdb, 0xfa, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0x80, 
+	0x2e, 0x08, 0x54, 0xa0, 0x2e, 0x08, 0x56, 0xa0, 
+	0xb5, 0x00, 0xf0, 0x02, 0xfb, 0x3b, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x80, 0x20, 0x00, 0x49, 0x1e, 
+	0x79, 0x0a, 0x49, 0x1e, 0x2a, 0x01, 0xd1, 0x26, 
+	0x78, 0x4a, 0x2a, 0x43, 0xd0, 0x1d, 0xdc, 0x09, 
+	0x2a, 0x31, 0xd0, 0x14, 0x2a, 0x33, 0xd0, 0x15, 
+	0x2a, 0x34, 0xd1, 0x25, 0x68, 0x8f, 0xf0, 0x00, 
+	0xf8, 0x2f, 0xe0, 0x21, 0x2a, 0x45, 0xd0, 0x06, 
+	0x2a, 0x46, 0xd0, 0x11, 0x2a, 0x48, 0xd1, 0x1b, 
+	0xf0, 0x00, 0xf8, 0xcc, 0xe0, 0x18, 0x68, 0x8f, 
+	0xf0, 0x00, 0xf8, 0x6a, 0xe0, 0x14, 0xf0, 0x00, 
+	0xf8, 0x8b, 0xe0, 0x11, 0xf0, 0x00, 0xf8, 0x92, 
+	0xe0, 0x0e, 0xf0, 0x00, 0xf8, 0xc9, 0xe0, 0x0b, 
+	0xf0, 0x00, 0xf8, 0xf0, 0xe0, 0x08, 0x88, 0x08, 
+	0x28, 0x70, 0xdb, 0x04, 0x28, 0x80, 0xda, 0x02, 
+	0xf0, 0x00, 0xf9, 0x0c, 0xe0, 0x00, 0x20, 0x01, 
+	0x28, 0x00, 0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x02, 
+	0xfc, 0x2b, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x80, 0x2e, 0x08, 0x54, 0x80, 
+	0xb5, 0x90, 0xb0, 0x85, 0xaa, 0x01, 0xb4, 0x04, 
+	0x4f, 0x1f, 0x89, 0xb9, 0x68, 0xb8, 0xaa, 0x05, 
+	0xab, 0x04, 0xf7, 0xff, 0xfe, 0xf9, 0x24, 0x00, 
+	0xb0, 0x01, 0x28, 0x00, 0xda, 0x01, 0x1c, 0x20, 
+	0xe0, 0x2d, 0xa8, 0x04, 0x78, 0x00, 0x28, 0x91, 
+	0xd0, 0x06, 0xa8, 0x03, 0x88, 0x00, 0xf0, 0x00, 
+	0xf9, 0x4f, 0x1c, 0x07, 0xd4, 0xf3, 0xe0, 0x10, 
+	0x79, 0x38, 0xab, 0x01, 0x70, 0x18, 0xa8, 0x01, 
+	0x78, 0x00, 0xf0, 0x00, 0xf8, 0xff, 0x28, 0x00, 
+	0xda, 0x06, 0x20, 0xf1, 0xab, 0x02, 0x70, 0x58, 
+	0xa8, 0x01, 0xf0, 0x00, 0xfe, 0x77, 0xe0, 0x12, 
+	0x1c, 0x07, 0x46, 0x6b, 0xa9, 0x04, 0x78, 0x09, 
+	0x1c, 0x38, 0xaa, 0x01, 0xf0, 0x00, 0xf9, 0xe2, 
+	0x28, 0x00, 0xd0, 0xd8, 0x01, 0x38, 0x49, 0x07, 
+	0x5c, 0x08, 0x28, 0x02, 0xd1, 0x02, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x0c, 0x98, 0x00, 0xb0, 0x05, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x80, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0x90, 0xb0, 0x81, 0x4c, 0x0e, 0x88, 0xa0, 
+	0xf0, 0x00, 0xf9, 0x1a, 0x1c, 0x07, 0xd4, 0x07, 
+	0x78, 0x61, 0x46, 0x6b, 0x22, 0x00, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0xc0, 0x28, 0x00, 0xd1, 0x01, 
+	0x20, 0x00, 0x90, 0x00, 0x01, 0x38, 0x49, 0x07, 
+	0x5c, 0x08, 0x28, 0x02, 0xd1, 0x02, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0xe8, 0x98, 0x00, 0xb0, 0x01, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x80, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0x00, 0x48, 0x03, 0x79, 0x00, 0xf0, 0x00, 
+	0xfd, 0xef, 0x20, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x80, 0xb5, 0xf0, 0xb0, 0x83, 
+	0x4e, 0x14, 0x79, 0x30, 0xab, 0x00, 0x70, 0x18, 
+	0x27, 0x00, 0x4c, 0x13, 0x01, 0x3d, 0x5d, 0x60, 
+	0x28, 0x01, 0xd0, 0x13, 0x19, 0x29, 0x78, 0x4a, 
+	0x79, 0x30, 0x42, 0x82, 0xd0, 0x02, 0x79, 0x09, 
+	0x42, 0x81, 0xd1, 0x0b, 0x78, 0x71, 0x46, 0x6a, 
+	0x1c, 0x38, 0xab, 0x02, 0xf0, 0x00, 0xf9, 0x86, 
+	0x5d, 0x60, 0x28, 0x02, 0xd1, 0x02, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0xb4, 0x37, 0x01, 0x2f, 0x20, 
+	0xdb, 0xe4, 0xa8, 0x00, 0x78, 0x00, 0xf0, 0x00, 
+	0xfd, 0xd9, 0x98, 0x02, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x80, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb5, 0x00, 0x48, 0x03, 
+	0x79, 0x00, 0xf0, 0x00, 0xfd, 0xe1, 0x20, 0x01, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x80, 
+	0xb5, 0x90, 0xb0, 0x83, 0x4c, 0x11, 0x88, 0xa0, 
+	0xf0, 0x00, 0xf8, 0xb2, 0x1c, 0x07, 0xd5, 0x01, 
+	0x20, 0x01, 0xe0, 0x0c, 0x79, 0xa0, 0xab, 0x01, 
+	0x70, 0x18, 0x79, 0xe0, 0x70, 0x58, 0x78, 0x61, 
+	0x46, 0x6a, 0x1c, 0x38, 0x33, 0x04, 0xf0, 0x00, 
+	0xf9, 0x51, 0x28, 0x00, 0xd1, 0x00, 0x90, 0x02, 
+	0x01, 0x38, 0x49, 0x07, 0x5c, 0x08, 0x28, 0x02, 
+	0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x7a, 
+	0x98, 0x02, 0xb0, 0x03, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x54, 0x80, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb5, 0x90, 0xb0, 0x81, 
+	0x4c, 0x0e, 0x88, 0xa0, 0xf0, 0x00, 0xf8, 0x88, 
+	0x1c, 0x07, 0xd5, 0x01, 0x20, 0x01, 0xe0, 0x07, 
+	0x78, 0x61, 0x46, 0x6b, 0x22, 0x00, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x2c, 0x28, 0x00, 0xd1, 0x00, 
+	0x90, 0x00, 0x01, 0x38, 0x49, 0x06, 0x5c, 0x08, 
+	0x28, 0x02, 0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x55, 0x98, 0x00, 0xb0, 0x01, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x80, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb5, 0x80, 0xb0, 0x81, 
+	0x48, 0x0e, 0x88, 0x00, 0xf0, 0x00, 0xf8, 0x9e, 
+	0x1c, 0x07, 0xd5, 0x01, 0x20, 0x01, 0xe0, 0x11, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xd3, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x70, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf9, 0x05, 0x01, 0x38, 0x49, 0x06, 0x5c, 0x08, 
+	0x28, 0x02, 0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x31, 0x98, 0x00, 0xb0, 0x01, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x80, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb4, 0xb0, 0x06, 0x02, 
+	0x0e, 0x12, 0x49, 0x10, 0x23, 0x00, 0x5e, 0xcc, 
+	0x43, 0xdf, 0x2c, 0x20, 0xda, 0x17, 0x20, 0x00, 
+	0x4b, 0x0d, 0x01, 0x05, 0x5d, 0x5d, 0x2d, 0x01, 
+	0xd1, 0x0e, 0x25, 0x02, 0x01, 0x07, 0x55, 0xdd, 
+	0x18, 0xfb, 0x70, 0x5a, 0x1c, 0x42, 0x80, 0x5a, 
+	0x22, 0x00, 0x71, 0x1a, 0x80, 0xda, 0x81, 0x1a, 
+	0x1c, 0x62, 0x80, 0x0a, 0xbc, 0xb0, 0x47, 0x70, 
+	0x30, 0x01, 0x28, 0x20, 0xdb, 0xe9, 0x1c, 0x38, 
+	0xbc, 0xb0, 0x47, 0x70, 0x2e, 0x08, 0x1a, 0x80, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb5, 0x80, 0x1c, 0x07, 
+	0xd5, 0x06, 0x2f, 0x20, 0xdb, 0x04, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x87, 0x21, 0x01, 
+	0x01, 0x38, 0x4a, 0x05, 0x54, 0x11, 0x48, 0x05, 
+	0x88, 0x01, 0x39, 0x01, 0x80, 0x01, 0x1c, 0x38, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0xa0, 0x2e, 0x08, 0x1a, 0x80, 
+	0xb4, 0x80, 0x04, 0x02, 0x0c, 0x12, 0x20, 0x00, 
+	0x49, 0x09, 0x01, 0x03, 0x5c, 0xcf, 0x2f, 0x01, 
+	0xd0, 0x06, 0x18, 0x5b, 0x88, 0x5f, 0x42, 0x97, 
+	0xd0, 0x07, 0x88, 0xdb, 0x42, 0x93, 0xd0, 0x04, 
+	0x30, 0x01, 0x28, 0x20, 0xdb, 0xf1, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb4, 0x90, 0x04, 0x02, 
+	0x0c, 0x12, 0x06, 0x0b, 0x0e, 0x1b, 0x20, 0x00, 
+	0x49, 0x0b, 0x01, 0x07, 0x5d, 0xcc, 0x2c, 0x01, 
+	0xd0, 0x0b, 0x18, 0x7f, 0x88, 0x7f, 0x42, 0x97, 
+	0xd1, 0x07, 0x01, 0x02, 0x18, 0x51, 0x71, 0x0b, 
+	0x1d, 0xc2, 0x32, 0x1a, 0x80, 0xca, 0xbc, 0x90, 
+	0x47, 0x70, 0x30, 0x01, 0x28, 0x20, 0xdb, 0xec, 
+	0x20, 0x00, 0x43, 0xc0, 0xbc, 0x90, 0x47, 0x70, 
+	0x2e, 0x08, 0x54, 0xa0, 0xb4, 0x80, 0x04, 0x02, 
+	0x0c, 0x12, 0x20, 0x00, 0x49, 0x07, 0x01, 0x03, 
+	0x5c, 0xcf, 0x2f, 0x01, 0xd0, 0x03, 0x18, 0x5b, 
+	0x89, 0x1b, 0x42, 0x93, 0xd0, 0x04, 0x30, 0x01, 
+	0x28, 0x20, 0xdb, 0xf4, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0x80, 0x04, 0x01, 0x0c, 0x09, 0x22, 0x00, 
+	0x20, 0x00, 0x4b, 0x0f, 0x00, 0x47, 0x5b, 0xdf, 
+	0x2f, 0x00, 0xd1, 0x06, 0x1d, 0xc2, 0x32, 0x69, 
+	0x04, 0x12, 0x0c, 0x12, 0x00, 0x40, 0x52, 0x1a, 
+	0xe0, 0x02, 0x30, 0x01, 0x28, 0x10, 0xdd, 0xf1, 
+	0x2a, 0x00, 0xd0, 0x09, 0x20, 0x01, 0x04, 0x80, 
+	0x43, 0x10, 0xf0, 0x02, 0xf9, 0xdf, 0x04, 0x00, 
+	0x0c, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xa0, 0xb5, 0x90, 0x1c, 0x07, 
+	0x01, 0x00, 0x49, 0x0e, 0x18, 0x44, 0x89, 0x20, 
+	0x28, 0x00, 0xd0, 0x13, 0xf0, 0x02, 0xfa, 0x02, 
+	0x20, 0x00, 0x49, 0x0b, 0x01, 0x3a, 0x4b, 0x09, 
+	0x18, 0xd2, 0x89, 0x13, 0x22, 0x00, 0x00, 0x47, 
+	0x5b, 0xcf, 0x42, 0x9f, 0xd1, 0x02, 0x00, 0x40, 
+	0x52, 0x0a, 0xe0, 0x02, 0x30, 0x01, 0x28, 0x10, 
+	0xdd, 0xf5, 0x81, 0x22, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x54, 0xa0, 
+	0x2e, 0x08, 0x56, 0xa0, 0xb5, 0x00, 0x49, 0x03, 
+	0x78, 0x08, 0xf0, 0x02, 0xf9, 0x41, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x54, 0x80, 
+	0xb5, 0x00, 0x49, 0x03, 0x78, 0x08, 0xf0, 0x02, 
+	0xf9, 0x37, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x90, 0xb5, 0x90, 0x06, 0x09, 
+	0x0e, 0x09, 0x1c, 0x1f, 0x01, 0x03, 0x4c, 0x1d, 
+	0x5c, 0xe3, 0x1e, 0x9c, 0x2c, 0x07, 0xd2, 0x31, 
+	0xa3, 0x01, 0x5d, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x09, 0x15, 0x03, 0x0f, 0x1b, 0x21, 0x27, 0x00, 
+	0x1c, 0x3b, 0xf0, 0x00, 0xf9, 0x23, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x3b, 0xf0, 0x00, 
+	0xf8, 0x27, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x3b, 0xf0, 0x00, 0xf8, 0x5d, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x3b, 0xf0, 0x00, 
+	0xfa, 0x51, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x3b, 0xf0, 0x00, 0xfb, 0x65, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x3b, 0xf0, 0x00, 
+	0xfa, 0xf1, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x3b, 0xf0, 0x00, 0xfb, 0x35, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x1c, 0x1f, 
+	0x23, 0x01, 0x60, 0x3b, 0xb0, 0x81, 0x29, 0x91, 
+	0xd1, 0x23, 0x21, 0x45, 0x4b, 0x16, 0x70, 0x19, 
+	0x21, 0x42, 0x70, 0x59, 0x21, 0x08, 0x80, 0x59, 
+	0x01, 0x06, 0x4d, 0x14, 0x19, 0x74, 0x78, 0x60, 
+	0x71, 0x18, 0x88, 0x60, 0x80, 0xd8, 0x1c, 0x51, 
+	0x91, 0x00, 0x22, 0x04, 0x1d, 0xd8, 0x30, 0x01, 
+	0xf0, 0x15, 0xf8, 0xa8, 0xf7, 0xff, 0xff, 0x8a, 
+	0x28, 0x00, 0xd1, 0x01, 0x60, 0x38, 0xe0, 0x0f, 
+	0x22, 0x04, 0x99, 0x00, 0x1d, 0xe0, 0x30, 0x03, 
+	0xf0, 0x15, 0xf8, 0x9c, 0x20, 0x05, 0x55, 0xa8, 
+	0xe0, 0x03, 0x29, 0x7f, 0xdc, 0x01, 0x29, 0x45, 
+	0xd1, 0x01, 0x20, 0x00, 0x60, 0x38, 0x20, 0x01, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x80, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0xff, 0x1c, 0x04, 0x06, 0x08, 0x0e, 0x00, 
+	0x21, 0x01, 0xb0, 0x84, 0x9b, 0x07, 0x25, 0x01, 
+	0x60, 0x19, 0x4e, 0x55, 0x01, 0x21, 0x91, 0x03, 
+	0x28, 0x33, 0xd0, 0x5d, 0x28, 0x43, 0xd1, 0x5c, 
+	0x20, 0x09, 0xf0, 0x02, 0xf9, 0x57, 0x4f, 0x51, 
+	0x60, 0xb8, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x01, 
+	0xe0, 0x94, 0x9a, 0x06, 0x79, 0x51, 0x01, 0x20, 
+	0x4a, 0x4b, 0x18, 0x84, 0x1d, 0xe0, 0x30, 0x03, 
+	0x90, 0x02, 0x29, 0x00, 0xd0, 0x4a, 0x88, 0x60, 
+	0xf7, 0xff, 0xfe, 0xc8, 0x28, 0x00, 0xda, 0x20, 
+	0x20, 0xf1, 0xab, 0x01, 0x70, 0x18, 0x46, 0x68, 
+	0x22, 0x04, 0x99, 0x02, 0xf0, 0x15, 0xf8, 0x5a, 
+	0x20, 0x43, 0x70, 0x38, 0x20, 0x34, 0x70, 0x78, 
+	0x20, 0x0c, 0x80, 0x78, 0x78, 0x60, 0x71, 0x38, 
+	0x88, 0x61, 0x46, 0x6a, 0x20, 0x92, 0x68, 0xbb, 
+	0xf7, 0xff, 0xfb, 0xca, 0x81, 0xb8, 0xf7, 0xff, 
+	0xff, 0x2d, 0x28, 0x00, 0xd1, 0x03, 0x20, 0x00, 
+	0x9b, 0x07, 0x60, 0x18, 0xe0, 0x55, 0x20, 0x02, 
+	0xe0, 0x1e, 0x46, 0x68, 0x22, 0x04, 0x99, 0x02, 
+	0xf0, 0x15, 0xf8, 0x3c, 0x20, 0x43, 0x70, 0x38, 
+	0x20, 0x34, 0x70, 0x78, 0x20, 0x0c, 0x80, 0x78, 
+	0x9a, 0x06, 0x79, 0x50, 0x71, 0x38, 0x88, 0xe1, 
+	0x46, 0x6a, 0x20, 0x93, 0x68, 0xbb, 0xf7, 0xff, 
+	0xfb, 0xab, 0x81, 0xb8, 0xf7, 0xff, 0xff, 0x0e, 
+	0x28, 0x00, 0xd0, 0xe0, 0x20, 0x7d, 0x00, 0xc0, 
+	0xf7, 0xff, 0xfe, 0xbe, 0x81, 0x20, 0x20, 0x03, 
+	0x99, 0x03, 0x54, 0x70, 0x25, 0x01, 0xe0, 0x40, 
+	0xe0, 0x34, 0xe0, 0x37, 0x9a, 0x06, 0x79, 0x10, 
+	0xab, 0x01, 0x70, 0x18, 0x46, 0x68, 0x22, 0x04, 
+	0x99, 0x02, 0xf0, 0x15, 0xf8, 0x13, 0x20, 0x43, 
+	0x70, 0x38, 0x20, 0x34, 0x70, 0x78, 0x20, 0x0c, 
+	0x80, 0x78, 0x78, 0x60, 0x71, 0x38, 0x88, 0x61, 
+	0x46, 0x6a, 0x20, 0x92, 0x68, 0xbb, 0xf7, 0xff, 
+	0xfb, 0x83, 0x81, 0xb8, 0xf7, 0xff, 0xfe, 0xe6, 
+	0x28, 0x00, 0xd0, 0xb8, 0x9a, 0x06, 0x79, 0x10, 
+	0x28, 0x00, 0xd1, 0x13, 0x21, 0x45, 0x48, 0x14, 
+	0x70, 0x01, 0x21, 0x44, 0x70, 0x41, 0x27, 0x04, 
+	0x80, 0x47, 0x78, 0x61, 0x71, 0x81, 0x88, 0x61, 
+	0x80, 0x81, 0xf7, 0xff, 0xfe, 0xdd, 0x28, 0x00, 
+	0xd1, 0x01, 0x25, 0x00, 0xe0, 0x0d, 0x99, 0x03, 
+	0x54, 0x77, 0xe0, 0x0a, 0x20, 0x02, 0x99, 0x03, 
+	0x54, 0x70, 0xe0, 0x06, 0x28, 0x7f, 0xdc, 0x01, 
+	0x28, 0x45, 0xd1, 0x02, 0x20, 0x00, 0x9b, 0x07, 
+	0x60, 0x18, 0x1c, 0x28, 0xb0, 0x04, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0xa0, 0x2e, 0x08, 0x54, 0x80, 
+	0x2e, 0x08, 0x54, 0x90, 0xb5, 0xff, 0x06, 0x09, 
+	0x0e, 0x09, 0x22, 0x01, 0xb0, 0x83, 0x9b, 0x06, 
+	0x01, 0x00, 0x60, 0x1a, 0x90, 0x02, 0x4e, 0x98, 
+	0x19, 0x84, 0x4f, 0x98, 0x4d, 0x98, 0x29, 0x46, 
+	0xd0, 0x5d, 0xdc, 0x0e, 0x29, 0x33, 0xd0, 0x5b, 
+	0x29, 0x45, 0xd1, 0x5a, 0x89, 0xb8, 0x30, 0x04, 
+	0x04, 0x00, 0x0c, 0x00, 0xf0, 0x02, 0xf8, 0x96, 
+	0x60, 0xa8, 0x28, 0x00, 0xd1, 0x33, 0x20, 0x00, 
+	0xe0, 0xcf, 0x29, 0x90, 0xd0, 0x52, 0x29, 0x95, 
+	0xd1, 0x4b, 0x88, 0xe0, 0x28, 0x00, 0xd1, 0x6c, 
+	0x22, 0x05, 0x21, 0x04, 0x68, 0xb8, 0xf0, 0x02, 
+	0xf8, 0x8a, 0x60, 0xb8, 0x28, 0x00, 0xd0, 0xee, 
+	0x21, 0x00, 0xab, 0x00, 0x70, 0x99, 0x22, 0x43, 
+	0x70, 0x3a, 0x22, 0x34, 0x70, 0x7a, 0x21, 0x0c, 
+	0x80, 0x79, 0x78, 0x61, 0x71, 0x39, 0x88, 0x61, 
+	0x46, 0x6a, 0x1c, 0x03, 0x20, 0x96, 0xf7, 0xff, 
+	0xfb, 0x0f, 0x81, 0xb8, 0xf7, 0xff, 0xfe, 0x72, 
+	0x28, 0x00, 0xd0, 0xd8, 0x20, 0x45, 0x70, 0x28, 
+	0x20, 0x47, 0x70, 0x68, 0x20, 0x04, 0x80, 0x68, 
+	0x88, 0x60, 0x80, 0xa8, 0x21, 0x00, 0x71, 0xa9, 
+	0xf7, 0xff, 0xfe, 0x6e, 0xe0, 0xb0, 0x68, 0xb9, 
+	0x91, 0x00, 0x89, 0xb9, 0xab, 0x01, 0x80, 0x19, 
+	0x22, 0x43, 0x70, 0x2a, 0x22, 0x34, 0x70, 0x6a, 
+	0x21, 0x0c, 0x80, 0x69, 0x78, 0x61, 0x71, 0x29, 
+	0x88, 0x61, 0x46, 0x6a, 0x1c, 0x03, 0x20, 0x90, 
+	0xf7, 0xff, 0xfa, 0xea, 0x81, 0xa8, 0xf7, 0xff, 
+	0xfe, 0x57, 0x28, 0x00, 0xd1, 0x06, 0x68, 0xa8, 
+	0xf0, 0x02, 0xf8, 0x6a, 0xe7, 0xaf, 0xe0, 0x61, 
+	0xe0, 0x8b, 0xe0, 0xc5, 0x20, 0x00, 0x9b, 0x06, 
+	0x60, 0x18, 0xe0, 0x61, 0x88, 0xe0, 0x28, 0x00, 
+	0xd1, 0x1c, 0x9a, 0x05, 0x88, 0x90, 0xf0, 0x02, 
+	0xf8, 0x35, 0x60, 0xa8, 0x1c, 0x01, 0xd0, 0x9e, 
+	0x20, 0x45, 0x70, 0x28, 0x70, 0x68, 0x22, 0x0c, 
+	0x80, 0x6a, 0x88, 0x60, 0x80, 0xa8, 0x9a, 0x05, 
+	0x88, 0x90, 0x81, 0xa8, 0x89, 0xaa, 0x1c, 0x08, 
+	0x99, 0x05, 0x68, 0x09, 0xf0, 0x14, 0xff, 0x42, 
+	0xf7, 0xff, 0xfe, 0x2e, 0x28, 0x00, 0xd1, 0xdd, 
+	0xe7, 0xd5, 0xe0, 0x16, 0x99, 0x05, 0x88, 0xc9, 
+	0x42, 0x81, 0xd1, 0x05, 0x78, 0x60, 0x71, 0x38, 
+	0x68, 0xb8, 0x1c, 0x81, 0x88, 0x60, 0xe0, 0x03, 
+	0x79, 0x21, 0x71, 0x39, 0x68, 0xb9, 0x31, 0x02, 
+	0xf7, 0xff, 0xfb, 0x76, 0x22, 0x43, 0x70, 0x3a, 
+	0xf7, 0xff, 0xfe, 0x0c, 0x28, 0x00, 0xd0, 0xc1, 
+	0xe0, 0x2a, 0x22, 0x43, 0x70, 0x3a, 0x22, 0x34, 
+	0x70, 0x7a, 0x21, 0x0c, 0x80, 0x79, 0x9a, 0x05, 
+	0x88, 0x11, 0x42, 0x88, 0xd1, 0x0f, 0x78, 0x60, 
+	0x71, 0x38, 0x68, 0xb8, 0x1c, 0x81, 0x88, 0x60, 
+	0xf7, 0xff, 0xfb, 0x5e, 0x88, 0xe1, 0x79, 0x20, 
+	0x88, 0x62, 0x80, 0xe2, 0x78, 0x62, 0x71, 0x22, 
+	0x80, 0x61, 0x70, 0x60, 0xe0, 0x05, 0x79, 0x21, 
+	0x71, 0x39, 0x68, 0xb9, 0x31, 0x02, 0xf7, 0xff, 
+	0xfb, 0x4f, 0xf7, 0xff, 0xfd, 0xe7, 0x28, 0x00, 
+	0xd0, 0x9c, 0xe0, 0x23, 0x20, 0x04, 0xf0, 0x01, 
+	0xff, 0xdd, 0x60, 0xb8, 0x28, 0x00, 0xd1, 0x01, 
+	0x20, 0x01, 0xe0, 0x16, 0x25, 0x00, 0xab, 0x00, 
+	0x70, 0x9d, 0x22, 0x43, 0x70, 0x3a, 0x22, 0x34, 
+	0x70, 0x7a, 0x21, 0x0c, 0x80, 0x79, 0x78, 0x61, 
+	0x71, 0x39, 0x88, 0x61, 0x46, 0x6a, 0x1c, 0x03, 
+	0x20, 0x95, 0xf7, 0xff, 0xfa, 0x65, 0x81, 0xb8, 
+	0xf7, 0xff, 0xfd, 0xc8, 0x28, 0x00, 0xd1, 0x05, 
+	0x1c, 0x28, 0xb0, 0x03, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x7d, 0x00, 0xc0, 
+	0xf7, 0xff, 0xfd, 0x72, 0x81, 0x20, 0x20, 0x06, 
+	0xe0, 0x37, 0x88, 0xe0, 0x28, 0x00, 0xd0, 0x03, 
+	0x79, 0x20, 0x78, 0x61, 0x42, 0x88, 0xd1, 0x01, 
+	0x20, 0x02, 0xe0, 0x2e, 0x20, 0x04, 0xf0, 0x01, 
+	0xff, 0xa9, 0x60, 0xb8, 0x28, 0x00, 0xd0, 0xcb, 
+	0x21, 0x00, 0xab, 0x00, 0x70, 0x99, 0x79, 0x21, 
+	0x9a, 0x05, 0x78, 0x12, 0x42, 0x91, 0xd1, 0x02, 
+	0x78, 0x61, 0x88, 0x63, 0xe0, 0x00, 0x88, 0xe3, 
+	0x22, 0x43, 0x70, 0x3a, 0x22, 0x34, 0x70, 0x7a, 
+	0x22, 0x0c, 0x80, 0x7a, 0x71, 0x39, 0x46, 0x6a, 
+	0x1c, 0x05, 0x20, 0x95, 0x1c, 0x19, 0x1c, 0x2b, 
+	0xf7, 0xff, 0xfa, 0x2a, 0x81, 0xb8, 0xf7, 0xff, 
+	0xfd, 0x8d, 0x28, 0x00, 0xd1, 0x03, 0x21, 0x00, 
+	0x9b, 0x06, 0x60, 0x18, 0xe6, 0xef, 0x20, 0x7d, 
+	0x00, 0xc0, 0xf7, 0xff, 0xfd, 0x39, 0x81, 0x20, 
+	0x20, 0x08, 0x99, 0x02, 0x54, 0x70, 0xe7, 0x9f, 
+	0x29, 0x7f, 0xdd, 0x9d, 0xe7, 0x36, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0xa0, 0x2e, 0x08, 0x54, 0x80, 
+	0x2e, 0x08, 0x54, 0x90, 0xb5, 0xff, 0x06, 0x09, 
+	0x0e, 0x09, 0x22, 0x01, 0xb0, 0x83, 0x9b, 0x06, 
+	0x01, 0x05, 0x60, 0x1a, 0x4e, 0x4f, 0x19, 0xac, 
+	0x1d, 0xe2, 0x32, 0x03, 0x92, 0x02, 0x4f, 0x4e, 
+	0x29, 0x33, 0xd0, 0x61, 0x29, 0x70, 0xd0, 0x37, 
+	0x29, 0x94, 0xd1, 0x5e, 0xf7, 0xff, 0xfd, 0x3a, 
+	0x88, 0xe0, 0x99, 0x05, 0x88, 0xc9, 0x42, 0x88, 
+	0xd1, 0x06, 0x22, 0x04, 0x98, 0x02, 0x99, 0x05, 
+	0xf0, 0x14, 0xff, 0x2c, 0x28, 0x00, 0xd0, 0x01, 
+	0x20, 0x00, 0xe0, 0x2c, 0x99, 0x05, 0x79, 0x08, 
+	0xab, 0x01, 0x70, 0x18, 0x46, 0x68, 0x22, 0x04, 
+	0x99, 0x02, 0xf0, 0x14, 0xfe, 0x63, 0x20, 0x43, 
+	0x70, 0x38, 0x20, 0x34, 0x70, 0x78, 0x20, 0x0c, 
+	0x80, 0x78, 0x78, 0x60, 0x71, 0x38, 0x88, 0x61, 
+	0x46, 0x6a, 0x20, 0x92, 0x68, 0xbb, 0xf7, 0xff, 
+	0xf9, 0xd3, 0x81, 0xb8, 0xf7, 0xff, 0xfd, 0x36, 
+	0x28, 0x00, 0xd1, 0x03, 0x20, 0x00, 0x9b, 0x06, 
+	0x60, 0x18, 0xe7, 0xdd, 0x99, 0x05, 0x79, 0x08, 
+	0x28, 0x00, 0xd1, 0x53, 0x20, 0x04, 0xe0, 0x52, 
+	0x20, 0x09, 0xf0, 0x01, 0xff, 0x23, 0x60, 0xb8, 
+	0x28, 0x00, 0xd1, 0x05, 0x20, 0x01, 0xb0, 0x03, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0xf1, 0xab, 0x01, 0x70, 0x18, 0x46, 0x68, 
+	0x22, 0x04, 0x99, 0x02, 0xf0, 0x14, 0xfe, 0x32, 
+	0x20, 0x43, 0x70, 0x38, 0x20, 0x34, 0x70, 0x78, 
+	0x20, 0x0c, 0x80, 0x78, 0x78, 0x60, 0x71, 0x38, 
+	0x88, 0x61, 0x46, 0x6a, 0x20, 0x92, 0x68, 0xbb, 
+	0xf7, 0xff, 0xf9, 0xa2, 0x81, 0xb8, 0xf7, 0xff, 
+	0xfd, 0x05, 0x28, 0x00, 0xd0, 0xb0, 0xe0, 0x29, 
+	0xe0, 0x00, 0xe0, 0x2a, 0x78, 0x60, 0x99, 0x05, 
+	0x78, 0x09, 0x42, 0x88, 0xd1, 0x01, 0x20, 0x07, 
+	0xe0, 0x21, 0x20, 0x09, 0xf0, 0x01, 0xfe, 0xf2, 
+	0x60, 0xb8, 0x28, 0x00, 0xd0, 0xa0, 0x20, 0xf1, 
+	0xab, 0x01, 0x70, 0x18, 0x46, 0x68, 0x22, 0x04, 
+	0x99, 0x02, 0xf0, 0x14, 0xfe, 0x07, 0x20, 0x43, 
+	0x70, 0x38, 0x20, 0x34, 0x70, 0x78, 0x20, 0x0c, 
+	0x80, 0x78, 0x78, 0x60, 0x71, 0x38, 0x88, 0x61, 
+	0x46, 0x6a, 0x20, 0x92, 0x68, 0xbb, 0xf7, 0xff, 
+	0xf9, 0x77, 0x81, 0xb8, 0xf7, 0xff, 0xfc, 0xda, 
+	0x28, 0x00, 0xd0, 0xa3, 0x20, 0x02, 0x55, 0x70, 
+	0xe7, 0xb0, 0x29, 0x7f, 0xdc, 0x01, 0x29, 0x45, 
+	0xd1, 0xac, 0x20, 0x00, 0x9b, 0x06, 0x60, 0x18, 
+	0xe7, 0xa8, 0x00, 0x00, 0x2e, 0x08, 0x54, 0xa0, 
+	0x2e, 0x08, 0x54, 0x80, 0xb5, 0xf0, 0x06, 0x09, 
+	0x0e, 0x09, 0x1c, 0x04, 0x20, 0x01, 0x60, 0x18, 
+	0x1c, 0x17, 0xb0, 0x82, 0x29, 0x70, 0xd0, 0x28, 
+	0x29, 0x94, 0xd1, 0x2c, 0x1c, 0x20, 0xf7, 0xff, 
+	0xfc, 0x95, 0x79, 0x38, 0x28, 0x00, 0xd1, 0x2d, 
+	0x20, 0x43, 0x4f, 0x19, 0x70, 0x38, 0x20, 0x34, 
+	0x70, 0x78, 0x20, 0x0c, 0x80, 0x78, 0x01, 0x25, 
+	0x4e, 0x16, 0x19, 0xac, 0x79, 0x20, 0x71, 0x38, 
+	0x88, 0xe1, 0x46, 0x6a, 0x20, 0x95, 0x68, 0xbb, 
+	0xf7, 0xff, 0xf9, 0x3e, 0x81, 0xb8, 0xf7, 0xff, 
+	0xfc, 0xa1, 0x28, 0x00, 0xd1, 0x01, 0x25, 0x00, 
+	0xe0, 0x14, 0x20, 0x7d, 0x00, 0xc0, 0xf7, 0xff, 
+	0xfc, 0x4f, 0x81, 0x20, 0x20, 0x08, 0x55, 0x70, 
+	0xe0, 0x0b, 0x1c, 0x20, 0x1c, 0x3a, 0xf7, 0xff, 
+	0xff, 0x1d, 0x1c, 0x05, 0xe0, 0x06, 0x29, 0x7f, 
+	0xdc, 0x01, 0x29, 0x45, 0xd1, 0x01, 0x20, 0x00, 
+	0x60, 0x18, 0x25, 0x01, 0x1c, 0x28, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x54, 0x80, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x22, 0x01, 
+	0x26, 0x02, 0x01, 0x05, 0x60, 0x1a, 0x1c, 0x1f, 
+	0x4c, 0x0c, 0x29, 0x33, 0xd0, 0x08, 0x29, 0x70, 
+	0xd0, 0x08, 0x29, 0x96, 0xd1, 0x08, 0xf7, 0xff, 
+	0xfc, 0x49, 0x20, 0x00, 0x60, 0x38, 0xe0, 0x01, 
+	0xf7, 0xff, 0xfc, 0x44, 0x55, 0x66, 0xe0, 0x05, 
+	0x29, 0x7f, 0xdc, 0x01, 0x29, 0x45, 0xd1, 0x01, 
+	0x20, 0x00, 0x60, 0x38, 0x20, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0xa0, 
+	0xb5, 0xff, 0x06, 0x09, 0x0e, 0x09, 0xb0, 0x81, 
+	0x91, 0x00, 0x21, 0x01, 0xb0, 0x83, 0x9b, 0x07, 
+	0x60, 0x19, 0x91, 0x02, 0x01, 0x05, 0x99, 0x03, 
+	0x4e, 0x52, 0x19, 0xac, 0x4f, 0x52, 0x29, 0x33, 
+	0xd0, 0x4f, 0x29, 0x70, 0xd0, 0x06, 0x29, 0x96, 
+	0xd1, 0x5d, 0xf7, 0xff, 0xfc, 0x1f, 0x20, 0x00, 
+	0x9b, 0x07, 0x60, 0x18, 0x88, 0xe0, 0x28, 0x00, 
+	0xd1, 0x0f, 0x20, 0x45, 0x70, 0x38, 0x20, 0x47, 
+	0x70, 0x78, 0x20, 0x04, 0x80, 0x78, 0x88, 0x60, 
+	0x80, 0xb8, 0x20, 0x00, 0x71, 0xb8, 0xf7, 0xff, 
+	0xfc, 0x31, 0x28, 0x00, 0xd0, 0x75, 0x20, 0x02, 
+	0xe0, 0x51, 0x20, 0x05, 0xf0, 0x01, 0xfe, 0x26, 
+	0x4f, 0x42, 0x60, 0xb8, 0x28, 0x00, 0xd1, 0x01, 
+	0x20, 0x01, 0xe0, 0x76, 0x21, 0x43, 0x70, 0x39, 
+	0x21, 0x34, 0x70, 0x79, 0x21, 0x0c, 0x80, 0x79, 
+	0x99, 0x03, 0x29, 0x70, 0xd1, 0x03, 0x21, 0x00, 
+	0xab, 0x00, 0x70, 0x99, 0xe0, 0x08, 0x9a, 0x06, 
+	0x78, 0x91, 0xab, 0x00, 0x70, 0x99, 0x88, 0xe1, 
+	0x9a, 0x06, 0x88, 0x12, 0x42, 0x91, 0xd1, 0x04, 
+	0x78, 0x61, 0x71, 0x39, 0x88, 0x61, 0x1c, 0x03, 
+	0xe0, 0x02, 0x79, 0x22, 0x71, 0x3a, 0x1c, 0x03, 
+	0x46, 0x6a, 0x20, 0x96, 0xf7, 0xff, 0xf8, 0x9c, 
+	0x81, 0xb8, 0xf7, 0xff, 0xfc, 0x09, 0x28, 0x00, 
+	0xd1, 0xcd, 0x68, 0xb8, 0xf0, 0x01, 0xfe, 0x1c, 
+	0xe7, 0xd2, 0x88, 0xe0, 0x28, 0x00, 0xd1, 0x0f, 
+	0x20, 0x45, 0x70, 0x38, 0x20, 0x47, 0x70, 0x78, 
+	0x20, 0x04, 0x80, 0x78, 0x88, 0x60, 0x80, 0xb8, 
+	0x20, 0x00, 0x71, 0xb8, 0xf7, 0xff, 0xfb, 0xea, 
+	0x28, 0x00, 0xd1, 0xb8, 0xe0, 0x38, 0xe0, 0x2e, 
+	0x78, 0x60, 0x79, 0x21, 0x42, 0x88, 0xd1, 0x02, 
+	0x20, 0x02, 0x55, 0x70, 0xe7, 0xb8, 0x79, 0x39, 
+	0x42, 0x81, 0xd1, 0x02, 0x20, 0x08, 0x55, 0x70, 
+	0xe0, 0x2a, 0x20, 0x05, 0xf0, 0x01, 0xfd, 0xd2, 
+	0x60, 0xb8, 0x28, 0x00, 0xd0, 0xac, 0x21, 0x00, 
+	0xab, 0x00, 0x70, 0x99, 0x21, 0x43, 0x70, 0x39, 
+	0x21, 0x34, 0x70, 0x79, 0x21, 0x0c, 0x80, 0x79, 
+	0x78, 0x61, 0x71, 0x39, 0x88, 0x61, 0x46, 0x6a, 
+	0x1c, 0x03, 0x20, 0x96, 0xf7, 0xff, 0xf8, 0x5c, 
+	0x81, 0xb8, 0xf7, 0xff, 0xfb, 0xbf, 0x28, 0x00, 
+	0xd1, 0x8d, 0x68, 0xb8, 0xf0, 0x01, 0xfd, 0xdc, 
+	0xe0, 0x00, 0xe0, 0x09, 0xe7, 0x87, 0x99, 0x03, 
+	0x29, 0x7f, 0xdc, 0x02, 0x99, 0x03, 0x29, 0x45, 
+	0xd1, 0x02, 0x20, 0x00, 0x9b, 0x07, 0x60, 0x18, 
+	0x98, 0x02, 0xb0, 0x04, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0xa0, 
+	0x2e, 0x08, 0x54, 0x80, 0x2e, 0x08, 0x54, 0x90, 
+	0xb5, 0x00, 0x06, 0x01, 0x0e, 0x09, 0x22, 0x45, 
+	0x48, 0x07, 0x70, 0x02, 0x22, 0x41, 0x70, 0x42, 
+	0x22, 0x04, 0x80, 0x42, 0x71, 0x01, 0xf7, 0xff, 
+	0xfb, 0x95, 0x28, 0x00, 0xd1, 0x01, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x80, 0xb5, 0x00, 0x06, 0x01, 
+	0x0e, 0x09, 0x22, 0x45, 0x48, 0x07, 0x70, 0x02, 
+	0x22, 0x49, 0x70, 0x42, 0x22, 0x04, 0x80, 0x42, 
+	0x71, 0x01, 0xf7, 0xff, 0xfb, 0x7f, 0x28, 0x00, 
+	0xd1, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x54, 0x80, 
+	0xb5, 0x00, 0x06, 0x01, 0x0e, 0x09, 0x22, 0x43, 
+	0x48, 0x07, 0x70, 0x02, 0x22, 0x32, 0x70, 0x42, 
+	0x22, 0x04, 0x80, 0x42, 0x71, 0x01, 0xf7, 0xff, 
+	0xfb, 0x69, 0x28, 0x00, 0xd1, 0x01, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x80, 0xb5, 0x80, 0x79, 0x41, 
+	0xb0, 0x82, 0xab, 0x01, 0x70, 0x19, 0x1c, 0x41, 
+	0x46, 0x68, 0x22, 0x04, 0xf0, 0x14, 0xfc, 0x72, 
+	0x20, 0x43, 0x4f, 0x0b, 0x70, 0x38, 0x20, 0x34, 
+	0x70, 0x78, 0x20, 0x0c, 0x80, 0x78, 0x46, 0x6a, 
+	0x21, 0x00, 0x20, 0x92, 0x68, 0xbb, 0xf7, 0xfe, 
+	0xff, 0xe3, 0x81, 0xb8, 0xf7, 0xff, 0xfb, 0x46, 
+	0x28, 0x00, 0xd1, 0x00, 0xe0, 0x00, 0x20, 0x01, 
+	0xb0, 0x02, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x54, 0x80, 0xb5, 0xf0, 0x00, 0xc6, 
+	0x18, 0x36, 0x01, 0x36, 0x1c, 0x07, 0xb0, 0x84, 
+	0x48, 0x0d, 0x90, 0x03, 0x18, 0x34, 0x68, 0xa0, 
+	0x28, 0x00, 0xd0, 0x0b, 0x46, 0x69, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x48, 0x1c, 0x05, 0x28, 0x34, 
+	0xd1, 0x02, 0x98, 0x01, 0xf0, 0x01, 0xfd, 0x48, 
+	0x2d, 0x00, 0xd1, 0xf3, 0x20, 0x00, 0x99, 0x03, 
+	0x51, 0x88, 0x60, 0x60, 0x60, 0xa0, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x57, 0xc0, 0xb4, 0xb0, 0x06, 0x0f, 
+	0x0e, 0x3f, 0x00, 0xc3, 0x18, 0x18, 0x01, 0x00, 
+	0x49, 0x15, 0x18, 0x41, 0x20, 0x00, 0x68, 0x8b, 
+	0x2b, 0x0a, 0xda, 0x23, 0x33, 0x01, 0x60, 0x8b, 
+	0x68, 0x4d, 0x19, 0x4c, 0x34, 0x80, 0x71, 0x27, 
+	0x2f, 0x34, 0xd1, 0x14, 0x78, 0x14, 0x68, 0x4d, 
+	0x00, 0x6b, 0x19, 0x5b, 0x00, 0x9b, 0x18, 0xcb, 
+	0x73, 0x1c, 0x68, 0x54, 0x68, 0x4d, 0x00, 0x6b, 
+	0x19, 0x5b, 0x00, 0x9b, 0x18, 0xcb, 0x61, 0x1c, 
+	0x89, 0x17, 0x68, 0x4c, 0x00, 0x63, 0x19, 0x1b, 
+	0x00, 0x9b, 0x18, 0xca, 0x82, 0x97, 0x68, 0x4a, 
+	0x32, 0x01, 0x60, 0x4a, 0x2a, 0x0a, 0xdb, 0x00, 
+	0x60, 0x48, 0x20, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
+	0x2e, 0x08, 0x57, 0xc0, 0xb4, 0xf0, 0x00, 0xc7, 
+	0x18, 0x3f, 0x01, 0x3f, 0x4a, 0x16, 0x18, 0xbc, 
+	0x25, 0x00, 0x68, 0xa0, 0x28, 0x00, 0xdc, 0x02, 
+	0x1c, 0x28, 0xbc, 0xf0, 0x47, 0x70, 0x38, 0x01, 
+	0x60, 0xa0, 0x59, 0xd3, 0x18, 0xe0, 0x30, 0x80, 
+	0x79, 0x00, 0x28, 0x34, 0xd1, 0x14, 0x1c, 0x1e, 
+	0x00, 0x5b, 0x19, 0x9b, 0x00, 0x9b, 0x18, 0xe3, 
+	0x7b, 0x1b, 0x70, 0x0b, 0x59, 0xd6, 0x00, 0x73, 
+	0x19, 0x9b, 0x00, 0x9b, 0x18, 0xe3, 0x69, 0x1b, 
+	0x60, 0x4b, 0x59, 0xd6, 0x00, 0x73, 0x19, 0x9b, 
+	0x00, 0x9b, 0x18, 0xe3, 0x8a, 0x9b, 0x81, 0x0b, 
+	0x59, 0xd1, 0x31, 0x01, 0x51, 0xd1, 0x29, 0x0a, 
+	0xdb, 0xdb, 0x51, 0xd5, 0xbc, 0xf0, 0x47, 0x70, 
+	0x2e, 0x08, 0x57, 0xc0, 0xb5, 0x00, 0x78, 0x01, 
+	0x48, 0x0c, 0x70, 0x01, 0x78, 0x01, 0x29, 0x01, 
+	0xd0, 0x01, 0x29, 0x02, 0xd1, 0x0e, 0x48, 0x0a, 
+	0x29, 0x01, 0xd1, 0x04, 0xca, 0x0a, 0xc0, 0x0a, 
+	0xca, 0x0a, 0xc0, 0x0a, 0xe0, 0x01, 0x88, 0x11, 
+	0x80, 0x01, 0xf0, 0x00, 0xf8, 0x32, 0x20, 0x00, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x88, 
+	0x2e, 0x08, 0x56, 0xc0, 0xb5, 0x90, 0x27, 0x00, 
+	0x48, 0x0d, 0x70, 0x07, 0x80, 0x87, 0x20, 0x03, 
+	0xf0, 0x01, 0xfc, 0xc0, 0x28, 0x00, 0xda, 0x03, 
+	0x1c, 0x38, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x00, 0x20, 0x01, 0x27, 0xff, 0x4a, 0x07, 
+	0x00, 0xcb, 0x1a, 0x5b, 0x00, 0x9b, 0x18, 0x9c, 
+	0x70, 0xa0, 0x52, 0xd7, 0x31, 0x01, 0x29, 0x08, 
+	0xdb, 0xf6, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x88, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0x00, 0xf0, 0x01, 0xfb, 0x5f, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0xb0, 0x27, 0x00, 0x48, 0x1f, 
+	0x78, 0x00, 0x4c, 0x1f, 0x28, 0x01, 0xd1, 0x1c, 
+	0x78, 0x60, 0x28, 0x23, 0xd0, 0x0f, 0xdc, 0x06, 
+	0x28, 0x21, 0xd0, 0x10, 0x28, 0x22, 0xd1, 0x28, 
+	0xf0, 0x00, 0xf8, 0x62, 0xe0, 0x24, 0x28, 0x32, 
+	0xd0, 0x0c, 0x28, 0x34, 0xd1, 0x21, 0x68, 0xa5, 
+	0xf0, 0x00, 0xf8, 0xea, 0xe0, 0x1c, 0x68, 0xa5, 
+	0xf0, 0x00, 0xf8, 0x88, 0xe0, 0x18, 0xf0, 0x00, 
+	0xf8, 0x25, 0xe0, 0x15, 0xf0, 0x00, 0xf8, 0xf8, 
+	0xe0, 0x12, 0x28, 0x02, 0xd1, 0x11, 0x88, 0x20, 
+	0xf0, 0x01, 0xfc, 0x28, 0x88, 0x20, 0x28, 0x50, 
+	0xdd, 0x04, 0x28, 0x58, 0xdc, 0x02, 0xf0, 0x00, 
+	0xf9, 0x03, 0xe0, 0x05, 0x28, 0x60, 0xdd, 0x04, 
+	0x28, 0x68, 0xdc, 0x02, 0xf0, 0x00, 0xf9, 0x22, 
+	0x1c, 0x07, 0x2f, 0x00, 0xd1, 0x02, 0x1c, 0x28, 
+	0xf0, 0x01, 0xfc, 0x4e, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0x88, 
+	0x2e, 0x08, 0x56, 0xc0, 0xb5, 0x90, 0x20, 0x01, 
+	0xb0, 0x81, 0x90, 0x00, 0xf0, 0x00, 0xf9, 0x2c, 
+	0x1c, 0x04, 0xd5, 0x01, 0x20, 0x01, 0xe0, 0x1a, 
+	0x4f, 0x0f, 0x88, 0xb8, 0x00, 0xe1, 0x1b, 0x09, 
+	0x00, 0x89, 0x4a, 0x0e, 0x52, 0x50, 0x78, 0x79, 
+	0x46, 0x6b, 0x22, 0x00, 0x1c, 0x20, 0xf0, 0x00, 
+	0xfb, 0x05, 0x28, 0x00, 0xd1, 0x02, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf9, 0x60, 0x20, 0x35, 0x70, 0x38, 
+	0x20, 0x4a, 0x70, 0x78, 0x20, 0x04, 0x80, 0x78, 
+	0xf0, 0x00, 0xf9, 0xee, 0x98, 0x00, 0xb0, 0x01, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x56, 0xc0, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0xf0, 0x20, 0x01, 0xb0, 0x81, 0x90, 0x00, 
+	0x4c, 0x14, 0x88, 0xa6, 0x27, 0x00, 0x4d, 0x14, 
+	0x00, 0xf8, 0x1b, 0xc0, 0x00, 0x80, 0x19, 0x41, 
+	0x78, 0x89, 0x29, 0x01, 0xd0, 0x0d, 0x5a, 0x28, 
+	0x42, 0xb0, 0xd1, 0x0a, 0x78, 0x61, 0x46, 0x6b, 
+	0x22, 0x00, 0x1c, 0x38, 0xf0, 0x00, 0xfa, 0xd6, 
+	0x28, 0x00, 0xd0, 0x02, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf9, 0x31, 0x37, 0x01, 0x2f, 0x08, 0xdb, 0xe7, 
+	0x20, 0x35, 0x70, 0x20, 0x20, 0x4b, 0x70, 0x60, 
+	0x20, 0x04, 0x80, 0x60, 0xf0, 0x00, 0xf9, 0xbc, 
+	0x98, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x56, 0xc0, 
+	0x2e, 0x08, 0x56, 0xe0, 0xb5, 0xf0, 0x20, 0x00, 
+	0xb0, 0x87, 0x90, 0x00, 0x48, 0x2a, 0x89, 0x87, 
+	0x68, 0x85, 0x79, 0x80, 0x90, 0x05, 0x24, 0x00, 
+	0xaa, 0x03, 0xb4, 0x04, 0x04, 0x39, 0x0c, 0x09, 
+	0x9a, 0x06, 0x1c, 0x28, 0xab, 0x07, 0xf0, 0x00, 
+	0xfa, 0x21, 0xb0, 0x01, 0x90, 0x01, 0x28, 0x00, 
+	0xdb, 0x04, 0x98, 0x05, 0xf0, 0x00, 0xf9, 0x2c, 
+	0x1c, 0x06, 0xd5, 0x01, 0x20, 0x00, 0xe0, 0x36, 
+	0x98, 0x00, 0x30, 0x01, 0x90, 0x00, 0x98, 0x01, 
+	0x18, 0x2d, 0x1a, 0x3f, 0x2f, 0x00, 0xdd, 0x0b, 
+	0x04, 0x38, 0x0c, 0x00, 0xf0, 0x01, 0xfb, 0x96, 
+	0x1c, 0x04, 0xd0, 0xef, 0x1c, 0x20, 0x1c, 0x29, 
+	0x1c, 0x3a, 0xf0, 0x14, 0xfa, 0xaf, 0x1c, 0x25, 
+	0xa9, 0x06, 0x78, 0x09, 0x1c, 0x30, 0xaa, 0x03, 
+	0xab, 0x02, 0xf0, 0x00, 0xfa, 0x83, 0x28, 0x00, 
+	0xd0, 0xe0, 0x98, 0x00, 0x28, 0x02, 0xda, 0x01, 
+	0x2f, 0x00, 0xdc, 0xc9, 0x2c, 0x00, 0xd0, 0x02, 
+	0x1c, 0x20, 0xf0, 0x01, 0xfb, 0xa1, 0x2f, 0x00, 
+	0xd0, 0x01, 0x20, 0x00, 0x90, 0x02, 0x00, 0xf0, 
+	0x1b, 0x80, 0x00, 0x80, 0x49, 0x07, 0x18, 0x40, 
+	0x78, 0x80, 0x28, 0x02, 0xd1, 0x02, 0x1c, 0x30, 
+	0xf0, 0x00, 0xf8, 0xc8, 0x98, 0x02, 0xb0, 0x07, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x56, 0xc0, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0x80, 0xb0, 0x81, 0x4f, 0x09, 0x79, 0x38, 
+	0xf0, 0x00, 0xf8, 0xe2, 0x28, 0x00, 0xdb, 0x06, 
+	0x78, 0x79, 0x46, 0x6b, 0x22, 0x00, 0xf0, 0x00, 
+	0xfa, 0x51, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x00, 
+	0x90, 0x00, 0x98, 0x00, 0xb0, 0x01, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xc0, 
+	0xb5, 0x80, 0xb0, 0x81, 0x4f, 0x09, 0x79, 0x38, 
+	0xf0, 0x00, 0xf8, 0xca, 0x28, 0x00, 0xdb, 0x06, 
+	0x78, 0x79, 0x46, 0x6b, 0x22, 0x00, 0xf0, 0x00, 
+	0xfa, 0x39, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x00, 
+	0x90, 0x00, 0x98, 0x00, 0xb0, 0x01, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xc0, 
+	0xb5, 0x90, 0xb0, 0x81, 0x48, 0x0f, 0x88, 0x00, 
+	0xf0, 0x00, 0xf8, 0xca, 0x1c, 0x07, 0xd5, 0x01, 
+	0x20, 0x01, 0xe0, 0x13, 0x20, 0x00, 0x00, 0xf9, 
+	0x1b, 0xc9, 0x00, 0x89, 0x4a, 0x0a, 0x18, 0x8c, 
+	0x80, 0xa0, 0x21, 0x50, 0x46, 0x6b, 0x22, 0x00, 
+	0x1c, 0x38, 0xf0, 0x00, 0xfa, 0x17, 0x78, 0xa0, 
+	0x28, 0x02, 0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x71, 0x98, 0x00, 0xb0, 0x01, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xc0, 
+	0x2e, 0x08, 0x56, 0xe0, 0xb5, 0x00, 0xb0, 0x81, 
+	0x48, 0x0b, 0x88, 0x00, 0xf0, 0x00, 0xf8, 0xbc, 
+	0x28, 0x00, 0xda, 0x01, 0x20, 0x01, 0xe0, 0x0c, 
+	0x21, 0x00, 0x00, 0xc2, 0x1a, 0x12, 0x00, 0x92, 
+	0x4b, 0x06, 0x18, 0xd2, 0x80, 0xd1, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x60, 0xf0, 0x00, 0xf9, 0xf2, 
+	0x98, 0x00, 0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xc0, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0xf0, 0x4c, 0x22, 0x23, 0x04, 0x5e, 0xe1, 
+	0x1f, 0x58, 0x29, 0x08, 0xda, 0x35, 0x27, 0x00, 
+	0x4d, 0x1f, 0x00, 0xf9, 0x1b, 0xc9, 0x00, 0x89, 
+	0x19, 0x49, 0x78, 0x89, 0x29, 0x01, 0xd1, 0x2f, 
+	0x22, 0x00, 0x00, 0xd3, 0x1a, 0x9b, 0x00, 0x9b, 
+	0x19, 0x5b, 0x78, 0x9e, 0x2e, 0x01, 0xd0, 0x02, 
+	0x78, 0xdb, 0x42, 0x8b, 0xd0, 0x02, 0x32, 0x01, 
+	0x2a, 0x08, 0xdb, 0xf2, 0x2a, 0x08, 0xda, 0x04, 
+	0x31, 0x01, 0x06, 0x09, 0x0e, 0x09, 0x29, 0x09, 
+	0xdb, 0xea, 0x29, 0x09, 0xd0, 0x15, 0x00, 0xf8, 
+	0x1b, 0xc0, 0x00, 0x80, 0x19, 0x40, 0x70, 0xc1, 
+	0x21, 0x02, 0x70, 0x81, 0x21, 0x00, 0x80, 0x81, 
+	0x80, 0xc1, 0x82, 0x01, 0x60, 0xc1, 0x83, 0x01, 
+	0x61, 0x41, 0x76, 0x81, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfd, 0x7d, 0x88, 0xa0, 0x30, 0x01, 0x80, 0xa0, 
+	0x1c, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x37, 0x01, 0x2f, 0x08, 0xdb, 0xc5, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x88, 
+	0x2e, 0x08, 0x56, 0xe0, 0xb5, 0x90, 0x1c, 0x07, 
+	0xd5, 0x06, 0x2f, 0x08, 0xdb, 0x04, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x65, 0x00, 0xf8, 
+	0x1b, 0xc0, 0x00, 0x80, 0x49, 0x0a, 0x18, 0x44, 
+	0x88, 0xe0, 0x28, 0x00, 0xd0, 0x03, 0xf0, 0x01, 
+	0xfa, 0x79, 0x20, 0x00, 0x80, 0xe0, 0x1c, 0x38, 
+	0xf7, 0xff, 0xfd, 0x50, 0x20, 0x01, 0x70, 0xa0, 
+	0x48, 0x04, 0x88, 0x81, 0x39, 0x01, 0x80, 0x81, 
+	0x1c, 0x38, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xe0, 0x2e, 0x08, 0x1a, 0x88, 
+	0xb4, 0x80, 0x06, 0x02, 0x0e, 0x12, 0x20, 0x00, 
+	0x49, 0x08, 0x00, 0xc3, 0x1a, 0x1b, 0x00, 0x9b, 
+	0x18, 0x5b, 0x78, 0x9f, 0x2f, 0x01, 0xd0, 0x02, 
+	0x78, 0xdb, 0x42, 0x93, 0xd0, 0x04, 0x30, 0x01, 
+	0x28, 0x08, 0xdb, 0xf2, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb4, 0x80, 0x04, 0x02, 0x0c, 0x12, 0x20, 0x00, 
+	0x49, 0x08, 0x00, 0xc3, 0x1a, 0x1b, 0x00, 0x9b, 
+	0x18, 0x5b, 0x78, 0x9f, 0x2f, 0x01, 0xd0, 0x02, 
+	0x88, 0x9b, 0x42, 0x93, 0xd0, 0x04, 0x30, 0x01, 
+	0x28, 0x08, 0xdb, 0xf2, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb4, 0x80, 0x04, 0x02, 0x0c, 0x12, 0x20, 0x00, 
+	0x49, 0x08, 0x00, 0xc3, 0x1a, 0x1b, 0x00, 0x9b, 
+	0x18, 0x5b, 0x78, 0x9f, 0x2f, 0x01, 0xd0, 0x02, 
+	0x88, 0xdb, 0x42, 0x93, 0xd0, 0x04, 0x30, 0x01, 
+	0x28, 0x08, 0xdb, 0xf2, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0x80, 0x00, 0xc3, 0x1a, 0x18, 0x00, 0x80, 
+	0x49, 0x05, 0x18, 0x47, 0x88, 0xb8, 0x28, 0x00, 
+	0xd0, 0x03, 0xf0, 0x01, 0xfa, 0x13, 0x20, 0x00, 
+	0x80, 0xb8, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xe0, 0xb5, 0x80, 0x00, 0xc3, 
+	0x1a, 0x18, 0x00, 0x80, 0x49, 0x05, 0x18, 0x47, 
+	0x88, 0xf8, 0x28, 0x00, 0xd0, 0x03, 0xf0, 0x01, 
+	0xfa, 0x01, 0x20, 0x00, 0x80, 0xf8, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0x00, 0x49, 0x03, 0x78, 0x08, 0xf0, 0x01, 
+	0xf9, 0x53, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x56, 0xc0, 0xb5, 0x00, 0x49, 0x03, 
+	0x78, 0x08, 0xf0, 0x01, 0xf9, 0x49, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x56, 0xd0, 
+	0x04, 0x02, 0x0c, 0x12, 0x20, 0x00, 0x49, 0x0a, 
+	0x00, 0xc3, 0x1a, 0x1b, 0x00, 0x9b, 0x18, 0x5b, 
+	0x78, 0xdb, 0x42, 0x93, 0xd1, 0x06, 0x00, 0xc3, 
+	0x1a, 0x18, 0x00, 0x80, 0x5a, 0x08, 0x06, 0x00, 
+	0x0e, 0x00, 0x47, 0x70, 0x30, 0x01, 0x28, 0x08, 
+	0xdb, 0xee, 0x20, 0xff, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x56, 0xe0, 0xb5, 0xf0, 0x06, 0x05, 
+	0x0e, 0x2d, 0x06, 0x0c, 0x0e, 0x24, 0x1c, 0x17, 
+	0x1c, 0x59, 0x1c, 0x1a, 0x1c, 0x4e, 0xb0, 0x81, 
+	0x2d, 0x86, 0xd0, 0x3b, 0xdc, 0x0b, 0x1f, 0xef, 
+	0x3f, 0x79, 0x2f, 0x06, 0xd2, 0x3c, 0xa3, 0x02, 
+	0x5d, 0xdb, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x3a, 0x32, 0x32, 0x32, 0x32, 0x32, 0x2d, 0xa0, 
+	0xd0, 0x15, 0xdc, 0x0d, 0x20, 0x02, 0x18, 0x1b, 
+	0x33, 0x01, 0x2d, 0x87, 0xd0, 0x01, 0x2d, 0x88, 
+	0xd1, 0x2a, 0x70, 0x15, 0x70, 0x08, 0x70, 0x34, 
+	0x78, 0x38, 0x70, 0x18, 0x20, 0x04, 0xe0, 0x25, 
+	0x2d, 0xa1, 0xd0, 0x04, 0x2d, 0xa2, 0xd1, 0x1f, 
+	0x20, 0xa0, 0x70, 0x10, 0xe0, 0x17, 0x70, 0x15, 
+	0x1c, 0x0d, 0x88, 0xb9, 0x46, 0x6a, 0x1c, 0x28, 
+	0xf0, 0x00, 0xf8, 0x5d, 0xa8, 0x00, 0x88, 0x00, 
+	0x18, 0x28, 0x70, 0x04, 0x88, 0xb9, 0x1e, 0x4a, 
+	0x68, 0x39, 0x30, 0x01, 0xf0, 0x14, 0xf8, 0xbe, 
+	0x88, 0xb8, 0xa9, 0x00, 0x88, 0x09, 0x18, 0x40, 
+	0x30, 0x01, 0xe0, 0x07, 0x70, 0x15, 0x20, 0x01, 
+	0x70, 0x08, 0x70, 0x34, 0x20, 0x03, 0xe0, 0x01, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x06, 0x16, 
+	0x0e, 0x36, 0x9d, 0x05, 0x1c, 0x04, 0x78, 0x00, 
+	0x70, 0x18, 0xb0, 0x82, 0x46, 0x6a, 0x34, 0x01, 
+	0x1c, 0x20, 0xa9, 0x01, 0x1c, 0x1f, 0xf0, 0x00, 
+	0xf8, 0x57, 0x21, 0x00, 0x43, 0xc9, 0x28, 0x00, 
+	0xdb, 0x06, 0xa8, 0x00, 0x88, 0x00, 0x18, 0x20, 
+	0x78, 0x02, 0x30, 0x01, 0x42, 0xb2, 0xd0, 0x01, 
+	0x1c, 0x08, 0xe0, 0x20, 0x78, 0x3a, 0x2a, 0x85, 
+	0xd0, 0x17, 0xdc, 0x06, 0x2a, 0x80, 0xd0, 0x10, 
+	0x2a, 0x83, 0xd0, 0x12, 0x2a, 0x84, 0xd1, 0xf3, 
+	0xe0, 0x0f, 0x2a, 0x86, 0xd0, 0x0d, 0x2a, 0xa0, 
+	0xd0, 0x01, 0x2a, 0xa1, 0xd1, 0xec, 0x60, 0x28, 
+	0xa8, 0x01, 0x88, 0x00, 0x38, 0x01, 0x80, 0xa8, 
+	0xe0, 0x03, 0x78, 0x00, 0x23, 0x80, 0x40, 0x18, 
+	0x70, 0x28, 0xa8, 0x01, 0x88, 0x00, 0xa9, 0x00, 
+	0x88, 0x09, 0x18, 0x40, 0x30, 0x01, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x04, 0x09, 
+	0x0c, 0x09, 0xb0, 0x81, 0xab, 0x00, 0x80, 0x19, 
+	0x29, 0x7f, 0xdc, 0x05, 0xa9, 0x00, 0x88, 0x09, 
+	0x70, 0x01, 0x20, 0x01, 0x80, 0x10, 0xe0, 0x15, 
+	0xa9, 0x00, 0x88, 0x09, 0x29, 0xff, 0xdc, 0x07, 
+	0x21, 0x81, 0x70, 0x01, 0x21, 0x02, 0x80, 0x11, 
+	0xa9, 0x00, 0x88, 0x09, 0x70, 0x41, 0xe0, 0x09, 
+	0x21, 0x82, 0x70, 0x01, 0x21, 0x03, 0x80, 0x11, 
+	0xa9, 0x00, 0x78, 0x49, 0x70, 0x41, 0xa9, 0x00, 
+	0x78, 0x09, 0x70, 0x81, 0xb0, 0x01, 0x47, 0x70, 
+	0xb4, 0x90, 0x27, 0x01, 0x78, 0x04, 0x23, 0x80, 
+	0x40, 0x23, 0x2b, 0x80, 0xd1, 0x14, 0x06, 0x63, 
+	0x0e, 0x5b, 0x80, 0x13, 0x88, 0x13, 0x2b, 0x01, 
+	0xd1, 0x01, 0x78, 0x40, 0xe0, 0x05, 0x2b, 0x02, 
+	0xd1, 0x07, 0x78, 0x43, 0x02, 0x1b, 0x78, 0x80, 
+	0x18, 0x18, 0x80, 0x08, 0x88, 0x10, 0x30, 0x01, 
+	0xe0, 0x04, 0x27, 0x00, 0x43, 0xff, 0xe0, 0x02, 
+	0x80, 0x0c, 0x20, 0x01, 0x80, 0x10, 0x1c, 0x38, 
+	0xbc, 0x90, 0x47, 0x70, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x06, 0x09, 0x0e, 0x09, 0x1c, 0x18, 0x00, 0xfb, 
+	0x1b, 0xdb, 0x00, 0x9b, 0xb0, 0x82, 0x4c, 0x42, 
+	0x19, 0x1e, 0x78, 0xb3, 0x1e, 0x9c, 0x4b, 0x41, 
+	0x93, 0x01, 0x1d, 0x1d, 0x2c, 0x07, 0xd2, 0x63, 
+	0xa3, 0x01, 0x5d, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x60, 0x65, 0x03, 0x08, 0x40, 0x24, 0x6b, 0x00, 
+	0x1c, 0x03, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x80, 
+	0xe0, 0x66, 0x1c, 0x03, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfa, 0x83, 0x1c, 0x04, 0x28, 0x01, 0xd1, 0x5a, 
+	0x78, 0xb0, 0x28, 0x04, 0xd1, 0x57, 0x1c, 0x38, 
+	0x1c, 0x29, 0xf7, 0xff, 0xfb, 0xf7, 0x1c, 0x01, 
+	0xd0, 0x59, 0x9b, 0x01, 0x68, 0x9d, 0x46, 0x6b, 
+	0x22, 0x00, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x68, 
+	0x1c, 0x04, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x46, 
+	0xe0, 0x36, 0x1c, 0x03, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfc, 0x53, 0x1c, 0x04, 0x28, 0x01, 0xd1, 0x3e, 
+	0x78, 0xb0, 0x28, 0x04, 0xd1, 0x3b, 0x1c, 0x38, 
+	0x1c, 0x29, 0xf7, 0xff, 0xfb, 0xdb, 0x1c, 0x01, 
+	0xd0, 0x3d, 0x9b, 0x01, 0x68, 0x9d, 0x46, 0x6b, 
+	0x22, 0x00, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x4c, 
+	0x1c, 0x04, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x2a, 
+	0xe0, 0x1a, 0x1c, 0x03, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfc, 0x03, 0x1c, 0x04, 0x28, 0x01, 0xd1, 0x22, 
+	0x78, 0xb0, 0x28, 0x04, 0xd1, 0x1f, 0x1c, 0x38, 
+	0x1c, 0x29, 0xf7, 0xff, 0xfb, 0xbf, 0x1c, 0x01, 
+	0xd0, 0x21, 0x9b, 0x01, 0x68, 0x9d, 0x46, 0x6b, 
+	0x22, 0x00, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x30, 
+	0x1c, 0x04, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x0e, 
+	0x1c, 0x28, 0xf0, 0x01, 0xf8, 0xb5, 0xe0, 0x12, 
+	0xe0, 0x10, 0x1c, 0x02, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0x17, 0xe0, 0x09, 0x1c, 0x03, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x62, 0xe0, 0x04, 0xe0, 0x06, 
+	0x1c, 0x03, 0x1c, 0x38, 0xf0, 0x00, 0xfd, 0x14, 
+	0x1c, 0x04, 0xe0, 0x00, 0x24, 0x00, 0x1c, 0x20, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xe0, 0x2e, 0x08, 0x56, 0xc0, 
+	0xb5, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x1c, 0x17, 
+	0x22, 0x01, 0x00, 0xc3, 0x1a, 0x18, 0x00, 0x80, 
+	0xb0, 0x81, 0x60, 0x3a, 0x90, 0x00, 0x4e, 0x1f, 
+	0x19, 0x85, 0x29, 0x21, 0xd0, 0x02, 0x29, 0x80, 
+	0xd0, 0x2f, 0xe0, 0x06, 0x20, 0x03, 0xf0, 0x01, 
+	0xf8, 0x5d, 0x4c, 0x1b, 0x60, 0xa0, 0x1c, 0x01, 
+	0xd1, 0x01, 0x20, 0x00, 0xe0, 0x2a, 0x20, 0x32, 
+	0x70, 0x20, 0x20, 0x23, 0x70, 0x60, 0x20, 0x0c, 
+	0x80, 0x60, 0x98, 0x00, 0x5a, 0x30, 0x80, 0xa0, 
+	0x78, 0xe8, 0x71, 0xa0, 0x1c, 0x0b, 0x79, 0xa1, 
+	0x22, 0x00, 0x20, 0x82, 0xf7, 0xff, 0xfe, 0x66, 
+	0x81, 0xa0, 0xf7, 0xff, 0xfe, 0x35, 0x28, 0x00, 
+	0xd1, 0x01, 0x60, 0x38, 0xe7, 0xe5, 0x78, 0xe8, 
+	0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x43, 0x18, 0x49, 0x09, 0xf0, 0x00, 
+	0xff, 0xe9, 0x80, 0xa8, 0x20, 0x03, 0x70, 0xa8, 
+	0xe0, 0x03, 0x7e, 0xa8, 0x28, 0x00, 0xd1, 0x00, 
+	0x60, 0x38, 0x20, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xe0, 
+	0x2e, 0x08, 0x56, 0xc0, 0x00, 0x00, 0x27, 0x10, 
+	0xb5, 0xff, 0x06, 0x09, 0x0e, 0x09, 0x22, 0x01, 
+	0x60, 0x1a, 0x00, 0xc2, 0x1a, 0x12, 0x00, 0x92, 
+	0xb0, 0x81, 0x92, 0x00, 0x1c, 0x1f, 0x4e, 0x54, 
+	0x19, 0x95, 0x4c, 0x54, 0x29, 0x80, 0xd0, 0x35, 
+	0xdc, 0x04, 0x29, 0x22, 0xd0, 0x13, 0x29, 0x50, 
+	0xd1, 0x0d, 0xe0, 0x0e, 0x29, 0x83, 0xd0, 0x11, 
+	0x29, 0x84, 0xd1, 0x08, 0xf7, 0xff, 0xfd, 0xd4, 
+	0x20, 0x03, 0xf0, 0x01, 0xf8, 0x03, 0x4c, 0x4c, 
+	0x60, 0xa0, 0x1c, 0x01, 0xd1, 0x6d, 0x20, 0x00, 
+	0xe0, 0x89, 0x20, 0x02, 0xe0, 0x67, 0xf7, 0xff, 
+	0xfd, 0xc7, 0xe7, 0xfa, 0xf7, 0xff, 0xfd, 0xc4, 
+	0x20, 0x34, 0x70, 0x20, 0x20, 0x31, 0x70, 0x60, 
+	0x20, 0x04, 0x80, 0x60, 0x78, 0xe8, 0x71, 0x20, 
+	0xf7, 0xff, 0xfd, 0xde, 0x28, 0x00, 0xd1, 0x01, 
+	0x60, 0x38, 0xe0, 0x74, 0x78, 0xe8, 0x30, 0x50, 
+	0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 
+	0x43, 0x18, 0x49, 0x3c, 0xf0, 0x00, 0xff, 0x92, 
+	0x80, 0xa8, 0xe0, 0x65, 0xf7, 0xff, 0xfd, 0xa8, 
+	0x9a, 0x03, 0x78, 0x10, 0x28, 0x80, 0xd1, 0x21, 
+	0x20, 0x32, 0x70, 0x20, 0x20, 0x23, 0x70, 0x60, 
+	0x20, 0x0c, 0x80, 0x60, 0x9a, 0x00, 0x5a, 0xb0, 
+	0x80, 0xa0, 0x78, 0xe9, 0x71, 0xa1, 0x22, 0x00, 
+	0x20, 0x81, 0x68, 0xa3, 0xf7, 0xff, 0xfd, 0xe6, 
+	0x81, 0xa0, 0xf7, 0xff, 0xfd, 0xb5, 0x28, 0x00, 
+	0xd0, 0xc1, 0x78, 0xe8, 0x30, 0x50, 0x04, 0x00, 
+	0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 0x43, 0x18, 
+	0x49, 0x28, 0xf0, 0x00, 0xff, 0x6b, 0x80, 0xa8, 
+	0x20, 0x07, 0xe0, 0x20, 0x20, 0x32, 0x70, 0x20, 
+	0x20, 0x23, 0x70, 0x60, 0x20, 0x0c, 0x80, 0x60, 
+	0x9a, 0x00, 0x5a, 0xb0, 0x80, 0xa0, 0x78, 0xe9, 
+	0x71, 0xa1, 0x22, 0x00, 0x20, 0xa2, 0x68, 0xa3, 
+	0xf7, 0xff, 0xfd, 0xc4, 0x81, 0xa0, 0xf7, 0xff, 
+	0xfd, 0x93, 0x28, 0x00, 0xd0, 0x0a, 0x78, 0xe8, 
+	0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x43, 0x18, 0x49, 0x17, 0xf0, 0x00, 
+	0xff, 0x49, 0x80, 0xa8, 0x20, 0x05, 0x70, 0xa8, 
+	0xe0, 0x1c, 0xe7, 0xff, 0x20, 0x32, 0x70, 0x20, 
+	0x20, 0x23, 0x70, 0x60, 0x20, 0x0c, 0x80, 0x60, 
+	0x9a, 0x00, 0x5a, 0xb0, 0x80, 0xa0, 0x78, 0xe8, 
+	0x71, 0xa0, 0x1c, 0x0b, 0x22, 0x00, 0x1c, 0x01, 
+	0x20, 0x85, 0xf7, 0xff, 0xfd, 0x9f, 0x81, 0xa0, 
+	0xf7, 0xff, 0xfd, 0x78, 0x28, 0x00, 0xd1, 0x01, 
+	0x60, 0x38, 0xe7, 0x78, 0x20, 0x02, 0x70, 0xa8, 
+	0x20, 0x00, 0x60, 0x38, 0x20, 0x01, 0xb0, 0x01, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xe0, 0x2e, 0x08, 0x56, 0xc0, 
+	0x2e, 0x08, 0x56, 0xd0, 0x00, 0x00, 0x27, 0x10, 
+	0xb5, 0xff, 0x1c, 0x07, 0x06, 0x08, 0x0e, 0x00, 
+	0x21, 0x01, 0xb0, 0x84, 0x9a, 0x07, 0x26, 0x01, 
+	0x60, 0x11, 0x00, 0xf9, 0x1b, 0xc9, 0x00, 0x89, 
+	0x91, 0x02, 0x4a, 0x78, 0x92, 0x03, 0x18, 0x8c, 
+	0x28, 0x22, 0xd0, 0x0d, 0x4d, 0x76, 0x28, 0x32, 
+	0xd0, 0x6f, 0x28, 0x34, 0xd0, 0x12, 0x28, 0x60, 
+	0xd1, 0x6c, 0x20, 0x03, 0xf0, 0x00, 0xff, 0x4a, 
+	0x60, 0xa8, 0x1c, 0x01, 0xd1, 0x67, 0xe0, 0x16, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfd, 0x23, 0x1c, 0x38, 
+	0xf0, 0x00, 0xfc, 0x16, 0x1c, 0x06, 0xd0, 0x5f, 
+	0x20, 0x02, 0xe0, 0xcc, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfd, 0x19, 0x89, 0xa8, 0x30, 0x0a, 0x04, 0x00, 
+	0x0c, 0x00, 0xf0, 0x00, 0xff, 0x33, 0x4f, 0x67, 
+	0x60, 0xb8, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x00, 
+	0xe0, 0xbf, 0x89, 0xa9, 0x22, 0x01, 0x02, 0x92, 
+	0x42, 0x91, 0xdc, 0x1e, 0x31, 0x01, 0xab, 0x01, 
+	0x80, 0x19, 0x68, 0xa9, 0x91, 0x00, 0x21, 0x32, 
+	0x70, 0x39, 0x21, 0x23, 0x70, 0x79, 0x21, 0x0c, 
+	0x80, 0x79, 0x99, 0x02, 0x9a, 0x03, 0x5a, 0x51, 
+	0x80, 0xb9, 0x78, 0xe1, 0x71, 0xb9, 0x46, 0x6a, 
+	0x1c, 0x03, 0x20, 0xa0, 0xf7, 0xff, 0xfd, 0x32, 
+	0x81, 0xb8, 0x20, 0x00, 0x82, 0x20, 0x21, 0x05, 
+	0x60, 0xe0, 0x70, 0xa1, 0x9a, 0x07, 0x60, 0x10, 
+	0xe0, 0x1f, 0xab, 0x01, 0x80, 0x1a, 0x68, 0xa9, 
+	0x91, 0x00, 0x21, 0x32, 0x70, 0x39, 0x21, 0x23, 
+	0x70, 0x79, 0x21, 0x0c, 0x80, 0x79, 0x99, 0x02, 
+	0x9a, 0x03, 0x5a, 0x51, 0x80, 0xb9, 0x78, 0xe1, 
+	0x71, 0xb9, 0x46, 0x6a, 0x1c, 0x03, 0x20, 0xa1, 
+	0xf7, 0xff, 0xfd, 0x14, 0x81, 0xb8, 0x68, 0xa8, 
+	0x60, 0xa0, 0x4b, 0x47, 0x18, 0xc0, 0x60, 0xe0, 
+	0x89, 0xa8, 0x1a, 0xc0, 0x82, 0x20, 0x20, 0x06, 
+	0x70, 0xa0, 0xf7, 0xff, 0xfc, 0xe3, 0x28, 0x00, 
+	0xd1, 0x07, 0x68, 0xb8, 0xf0, 0x00, 0xff, 0x08, 
+	0xe0, 0x2f, 0xe0, 0x0e, 0xe0, 0x63, 0xe0, 0x3a, 
+	0xe0, 0x6e, 0x78, 0xe0, 0x30, 0x50, 0x04, 0x00, 
+	0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 0x43, 0x18, 
+	0x49, 0x3a, 0xf0, 0x00, 0xfe, 0x87, 0x80, 0xa0, 
+	0xe0, 0x62, 0x1c, 0x38, 0xf7, 0xff, 0xfc, 0xae, 
+	0x20, 0x03, 0xf0, 0x00, 0xfe, 0xcb, 0x60, 0xa8, 
+	0x1c, 0x01, 0xd0, 0x98, 0x20, 0x32, 0x70, 0x28, 
+	0x20, 0x23, 0x70, 0x68, 0x20, 0x0c, 0x80, 0x68, 
+	0x98, 0x02, 0x9a, 0x03, 0x5a, 0x10, 0x80, 0xa8, 
+	0x78, 0xe0, 0x71, 0xa8, 0x1c, 0x0b, 0x22, 0x00, 
+	0x1c, 0x01, 0x20, 0x84, 0xf7, 0xff, 0xfc, 0xd6, 
+	0x81, 0xa8, 0xf7, 0xff, 0xfc, 0xa5, 0x28, 0x00, 
+	0xd1, 0x01, 0x26, 0x00, 0xe0, 0x40, 0x78, 0xe0, 
+	0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x43, 0x18, 0x49, 0x23, 0xf0, 0x00, 
+	0xfe, 0x59, 0x80, 0xa0, 0xe0, 0x32, 0x20, 0x32, 
+	0x70, 0x28, 0x20, 0x23, 0x70, 0x68, 0x20, 0x0c, 
+	0x80, 0x68, 0x98, 0x02, 0x9a, 0x03, 0x5a, 0x10, 
+	0x80, 0xa8, 0x78, 0xe0, 0x71, 0xa8, 0x1c, 0x0b, 
+	0x22, 0x00, 0x1c, 0x01, 0x20, 0xa2, 0xf7, 0xff, 
+	0xfc, 0xb1, 0x81, 0xa8, 0xf7, 0xff, 0xfc, 0x80, 
+	0x28, 0x00, 0xd1, 0x02, 0x9a, 0x07, 0x60, 0x10, 
+	0xe7, 0xd7, 0x78, 0xe0, 0x30, 0x50, 0x04, 0x00, 
+	0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 0x43, 0x18, 
+	0x49, 0x10, 0xf0, 0x00, 0xfe, 0x33, 0x80, 0xa0, 
+	0x21, 0x05, 0x70, 0xa1, 0xe0, 0x0c, 0x28, 0x7f, 
+	0xda, 0x01, 0x21, 0x01, 0xe0, 0x00, 0x21, 0x00, 
+	0x9a, 0x07, 0x1c, 0x38, 0xf0, 0x00, 0xfb, 0x64, 
+	0x1c, 0x06, 0xd0, 0x01, 0x20, 0x08, 0x70, 0xa0, 
+	0x1c, 0x30, 0xb0, 0x04, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xe0, 
+	0x2e, 0x08, 0x56, 0xc0, 0x2e, 0x08, 0x56, 0xd0, 
+	0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x27, 0x10, 
+	0xb5, 0xff, 0x06, 0x09, 0x0e, 0x09, 0x20, 0x01, 
+	0xb0, 0x84, 0x9a, 0x07, 0x25, 0x01, 0x60, 0x10, 
+	0x98, 0x04, 0x00, 0xc3, 0x1a, 0x18, 0x00, 0x80, 
+	0x90, 0x03, 0x4e, 0xcf, 0x19, 0x87, 0x4c, 0xcf, 
+	0x29, 0x60, 0xd0, 0x6d, 0xdc, 0x0e, 0x29, 0x22, 
+	0xd0, 0x37, 0x29, 0x32, 0xd0, 0x69, 0x29, 0x34, 
+	0xd0, 0x68, 0x29, 0x50, 0xd1, 0x67, 0x20, 0x03, 
+	0xf0, 0x00, 0xfe, 0x40, 0x60, 0xa0, 0x28, 0x00, 
+	0xd1, 0x62, 0xe0, 0x80, 0x29, 0x80, 0xd0, 0x32, 
+	0x29, 0x84, 0xd0, 0x5e, 0x29, 0x86, 0xd1, 0x5a, 
+	0x98, 0x04, 0xf7, 0xff, 0xfc, 0x01, 0x20, 0x86, 
+	0x76, 0xb8, 0xf7, 0xff, 0xfb, 0x41, 0x1c, 0x05, 
+	0xd5, 0x73, 0x20, 0x01, 0xab, 0x01, 0x70, 0x18, 
+	0x21, 0x32, 0x70, 0x21, 0x21, 0x23, 0x70, 0x61, 
+	0x21, 0x0c, 0x80, 0x61, 0x98, 0x03, 0x5a, 0x30, 
+	0x80, 0xa0, 0x78, 0xf9, 0x71, 0xa1, 0x20, 0x88, 
+	0x68, 0xa3, 0xaa, 0x01, 0xf7, 0xff, 0xfc, 0x3a, 
+	0x81, 0xa0, 0xf7, 0xff, 0xfc, 0x09, 0x28, 0x00, 
+	0xd1, 0x5c, 0x1c, 0x28, 0xf7, 0xff, 0xfb, 0x6e, 
+	0xe0, 0xdd, 0x98, 0x04, 0xf7, 0xff, 0xfb, 0xdc, 
+	0x98, 0x04, 0xf0, 0x00, 0xfa, 0xe1, 0x1c, 0x05, 
+	0xd0, 0x2a, 0x20, 0x02, 0xe1, 0x4c, 0x98, 0x04, 
+	0xf7, 0xff, 0xfb, 0xd2, 0x9a, 0x06, 0x78, 0x10, 
+	0x28, 0x80, 0xd1, 0x27, 0x21, 0x32, 0x70, 0x21, 
+	0x21, 0x23, 0x70, 0x61, 0x21, 0x0c, 0x80, 0x61, 
+	0x98, 0x03, 0x5a, 0x30, 0x80, 0xa0, 0x78, 0xf9, 
+	0x71, 0xa1, 0x22, 0x00, 0x20, 0x81, 0x68, 0xa3, 
+	0xf7, 0xff, 0xfc, 0x10, 0x81, 0xa0, 0xf7, 0xff, 
+	0xfb, 0xdf, 0x28, 0x00, 0xd0, 0x73, 0x78, 0xf8, 
+	0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x43, 0x18, 0x49, 0x9a, 0xf0, 0x00, 
+	0xfd, 0x95, 0x80, 0xb8, 0x20, 0x07, 0xe1, 0x23, 
+	0xe1, 0x23, 0xe0, 0xea, 0xe0, 0xe6, 0xe1, 0x13, 
+	0xe0, 0xed, 0xe0, 0x7e, 0x8a, 0x38, 0x28, 0x00, 
+	0xdd, 0x5e, 0x68, 0xf9, 0x29, 0x00, 0xd0, 0x5c, 
+	0x91, 0x01, 0x21, 0x32, 0x4c, 0x91, 0x70, 0x21, 
+	0x21, 0x23, 0x70, 0x61, 0x21, 0x0c, 0x80, 0x61, 
+	0x99, 0x03, 0x5a, 0x71, 0x80, 0xa1, 0x78, 0xf9, 
+	0x71, 0xa1, 0x26, 0x01, 0x02, 0xb6, 0x42, 0xb0, 
+	0xdd, 0x1c, 0x48, 0x8b, 0xf0, 0x00, 0xfd, 0xbe, 
+	0x60, 0xa0, 0x28, 0x00, 0xd1, 0x04, 0x20, 0x00, 
+	0xe0, 0x01, 0xe0, 0x8e, 0xe0, 0x7e, 0xe0, 0xfd, 
+	0xab, 0x02, 0x80, 0x1e, 0x78, 0xf9, 0x1c, 0x03, 
+	0x20, 0xa1, 0xaa, 0x01, 0xf7, 0xff, 0xfb, 0xce, 
+	0x81, 0xa0, 0x68, 0xf8, 0x4b, 0x81, 0x18, 0xc0, 
+	0x60, 0xf8, 0x8a, 0x38, 0x1a, 0xc0, 0x82, 0x38, 
+	0x20, 0x06, 0xe0, 0x1a, 0x30, 0x0a, 0x04, 0x00, 
+	0x0c, 0x00, 0xf0, 0x00, 0xfd, 0x9f, 0x60, 0xa0, 
+	0x28, 0x00, 0xd0, 0xe0, 0x8a, 0x39, 0x31, 0x01, 
+	0xab, 0x02, 0x80, 0x19, 0x78, 0xf9, 0x1c, 0x03, 
+	0x20, 0xa0, 0xaa, 0x01, 0xf7, 0xff, 0xfb, 0xb2, 
+	0x81, 0xa0, 0x24, 0x00, 0x82, 0x3c, 0x60, 0xfc, 
+	0x68, 0xb8, 0xf0, 0x00, 0xfd, 0xb1, 0x20, 0x05, 
+	0x60, 0xbc, 0x70, 0xb8, 0xf7, 0xff, 0xfb, 0x82, 
+	0x28, 0x00, 0xd0, 0x0c, 0x78, 0xf8, 0x30, 0x50, 
+	0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 
+	0x43, 0x18, 0x49, 0x67, 0xf0, 0x00, 0xfd, 0x2e, 
+	0x80, 0xb8, 0x20, 0x00, 0xe0, 0x02, 0xe0, 0xa1, 
+	0xe0, 0x03, 0xe0, 0x02, 0x9a, 0x07, 0x60, 0x10, 
+	0xe0, 0xb7, 0x7e, 0xb8, 0x28, 0x00, 0xd1, 0x11, 
+	0x78, 0xf8, 0x30, 0x60, 0x04, 0x00, 0x0c, 0x00, 
+	0x23, 0x03, 0x04, 0x1b, 0x43, 0x18, 0x21, 0x7d, 
+	0x00, 0xc9, 0xf0, 0x00, 0xfd, 0x17, 0x80, 0xf8, 
+	0x20, 0x04, 0x70, 0xb8, 0x68, 0xa0, 0xf0, 0x00, 
+	0xfd, 0x83, 0xe0, 0xa2, 0x20, 0x00, 0x76, 0xb8, 
+	0xe0, 0x9f, 0x20, 0x84, 0x76, 0xb8, 0x21, 0x32, 
+	0x70, 0x21, 0x21, 0x23, 0x70, 0x61, 0x21, 0x0c, 
+	0x80, 0x61, 0x98, 0x03, 0x5a, 0x30, 0x80, 0xa0, 
+	0x78, 0xf9, 0x71, 0xa1, 0x22, 0x00, 0x20, 0x85, 
+	0x68, 0xa3, 0xf7, 0xff, 0xfb, 0x67, 0x81, 0xa0, 
+	0xf7, 0xff, 0xfb, 0x36, 0x28, 0x00, 0xd1, 0x01, 
+	0x25, 0x00, 0xe0, 0x03, 0x98, 0x04, 0xf0, 0x00, 
+	0xfa, 0x13, 0x1c, 0x05, 0x2d, 0x00, 0xd0, 0x00, 
+	0xe7, 0x2f, 0xe0, 0x7e, 0x78, 0xf8, 0x30, 0x50, 
+	0x04, 0x00, 0x0c, 0x00, 0x90, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x98, 0x00, 0x43, 0x18, 0x49, 0x40, 
+	0xf0, 0x00, 0xfc, 0xe0, 0x80, 0xb8, 0x20, 0x01, 
+	0xe0, 0x70, 0x00, 0xe8, 0x1b, 0x40, 0x00, 0x80, 
+	0x19, 0x81, 0x78, 0xc9, 0xab, 0x01, 0x70, 0x19, 
+	0x99, 0x03, 0x5a, 0x71, 0x52, 0x31, 0x21, 0x32, 
+	0x70, 0x21, 0x21, 0x23, 0x70, 0x61, 0x21, 0x0c, 
+	0x80, 0x61, 0x98, 0x03, 0x5a, 0x30, 0x80, 0xa0, 
+	0x78, 0xf9, 0x71, 0xa1, 0x20, 0x87, 0x68, 0xa3, 
+	0xaa, 0x01, 0xf7, 0xff, 0xfb, 0x2f, 0x81, 0xa0, 
+	0xf7, 0xff, 0xfa, 0xfe, 0x28, 0x00, 0xd1, 0x03, 
+	0x1c, 0x28, 0xf7, 0xff, 0xfa, 0x63, 0xe0, 0x31, 
+	0x21, 0x21, 0x9a, 0x07, 0x1c, 0x28, 0xf7, 0xff, 
+	0xfc, 0x8f, 0x1c, 0x05, 0x78, 0xf8, 0x30, 0x50, 
+	0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 
+	0x43, 0x18, 0x49, 0x25, 0xf0, 0x00, 0xfc, 0xaa, 
+	0x80, 0xb8, 0xe0, 0x3a, 0x98, 0x04, 0x1d, 0x22, 
+	0xe0, 0x01, 0x22, 0x00, 0x98, 0x04, 0xf7, 0xfe, 
+	0xff, 0xd9, 0x1c, 0x05, 0xe0, 0x31, 0x21, 0x32, 
+	0x70, 0x21, 0x21, 0x23, 0x70, 0x61, 0x21, 0x0c, 
+	0x80, 0x61, 0x99, 0x03, 0x5a, 0x71, 0x80, 0xa1, 
+	0x78, 0xf9, 0x71, 0xa1, 0x22, 0x00, 0x1c, 0x03, 
+	0x20, 0x84, 0xf7, 0xff, 0xfa, 0xfb, 0x81, 0xa0, 
+	0xf7, 0xff, 0xfa, 0xca, 0x28, 0x00, 0xd1, 0x03, 
+	0x9a, 0x07, 0x60, 0x10, 0x25, 0x00, 0xe0, 0x18, 
+	0x78, 0xf8, 0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 
+	0x23, 0x03, 0x04, 0x1b, 0x43, 0x18, 0x49, 0x0e, 
+	0xf0, 0x00, 0xfc, 0x7c, 0x80, 0xb8, 0xe0, 0x0a, 
+	0x29, 0x7f, 0xda, 0x01, 0x21, 0x01, 0xe0, 0x00, 
+	0x21, 0x00, 0x98, 0x04, 0x9a, 0x07, 0xf0, 0x00, 
+	0xf9, 0xaf, 0x1c, 0x05, 0xd0, 0x01, 0x20, 0x08, 
+	0x70, 0xb8, 0x1c, 0x28, 0xb0, 0x04, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x56, 0xe0, 0x2e, 0x08, 0x56, 0xc0, 
+	0x00, 0x00, 0x27, 0x10, 0x2e, 0x08, 0x56, 0xd0, 
+	0x00, 0x00, 0x04, 0x0a, 0x00, 0x00, 0x03, 0xff, 
+	0xb5, 0x80, 0x06, 0x09, 0x0e, 0x09, 0x1c, 0x07, 
+	0x20, 0x01, 0x60, 0x18, 0x29, 0x50, 0xd0, 0x0e, 
+	0xdc, 0x06, 0x29, 0x22, 0xd0, 0x0b, 0x29, 0x32, 
+	0xd0, 0x09, 0x29, 0x34, 0xd1, 0x0d, 0xe0, 0x06, 
+	0x29, 0x80, 0xd0, 0x02, 0x29, 0x84, 0xd1, 0x08, 
+	0xe0, 0x01, 0x20, 0x00, 0x70, 0x10, 0x1c, 0x38, 
+	0xf7, 0xff, 0xfe, 0x2e, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x29, 0x7f, 0xda, 0x01, 0x21, 0x01, 
+	0xe0, 0x00, 0x21, 0x00, 0x1c, 0x38, 0x1c, 0x1a, 
+	0xf0, 0x00, 0xf9, 0x72, 0x28, 0x00, 0xd0, 0xf1, 
+	0x21, 0x08, 0x00, 0xfa, 0x1b, 0xd2, 0x00, 0x92, 
+	0x4b, 0x02, 0x18, 0xd2, 0x70, 0x91, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0xff, 0x06, 0x09, 0x0e, 0x09, 0x20, 0x01, 
+	0xb0, 0x81, 0x1c, 0x17, 0x9a, 0x04, 0x25, 0x01, 
+	0x60, 0x10, 0x98, 0x01, 0x00, 0xc2, 0x1a, 0x12, 
+	0x00, 0x92, 0x1c, 0x16, 0x48, 0x78, 0x90, 0x00, 
+	0x18, 0x14, 0x29, 0x80, 0xd0, 0x59, 0xdc, 0x08, 
+	0x29, 0x22, 0xd0, 0x1a, 0x29, 0x32, 0xd0, 0x55, 
+	0x29, 0x34, 0xd0, 0x53, 0x29, 0x50, 0xd1, 0x61, 
+	0xe0, 0xc8, 0x29, 0x84, 0xd0, 0x4e, 0x4e, 0x71, 
+	0x29, 0xa0, 0xd0, 0x18, 0x29, 0xa1, 0xd1, 0x59, 
+	0x98, 0x01, 0xf7, 0xff, 0xfa, 0x19, 0x8b, 0x21, 
+	0x29, 0x00, 0xd1, 0x54, 0x88, 0xb8, 0xf0, 0x00, 
+	0xfc, 0x45, 0x60, 0xb0, 0x28, 0x00, 0xd1, 0x58, 
+	0xe0, 0x15, 0x98, 0x01, 0xf7, 0xff, 0xfa, 0x0c, 
+	0x98, 0x01, 0xf0, 0x00, 0xf9, 0x11, 0x1c, 0x05, 
+	0xd0, 0x6a, 0x20, 0x02, 0xe0, 0xbd, 0x98, 0x01, 
+	0xf7, 0xff, 0xfa, 0x02, 0x8b, 0x21, 0x29, 0x00, 
+	0xd1, 0x07, 0x88, 0xb8, 0xf0, 0x00, 0xfc, 0x2e, 
+	0x60, 0xb0, 0x28, 0x00, 0xd1, 0x0c, 0x20, 0x00, 
+	0xe0, 0xb1, 0x88, 0xb8, 0x18, 0x08, 0x04, 0x02, 
+	0x0c, 0x12, 0x69, 0x60, 0xf0, 0x00, 0xfc, 0x27, 
+	0x60, 0xb0, 0x28, 0x00, 0xd0, 0xf3, 0x61, 0x60, 
+	0x20, 0x34, 0x70, 0x30, 0x70, 0x70, 0x20, 0x0c, 
+	0x80, 0x70, 0x78, 0xe0, 0x71, 0x30, 0x88, 0xb9, 
+	0x8b, 0x20, 0x18, 0x09, 0x81, 0xb1, 0x68, 0xb1, 
+	0x18, 0x08, 0x88, 0xba, 0x68, 0x39, 0xf0, 0x13, 
+	0xfb, 0x2d, 0xf7, 0xff, 0xfa, 0x07, 0x28, 0x00, 
+	0xd1, 0x05, 0x68, 0xb0, 0xf0, 0x00, 0xfc, 0x2c, 
+	0xe0, 0x53, 0xe0, 0x36, 0xe0, 0x76, 0x78, 0xe0, 
+	0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x43, 0x18, 0x49, 0x46, 0xf0, 0x00, 
+	0xfb, 0xad, 0x80, 0xa0, 0x20, 0x00, 0x83, 0x20, 
+	0x61, 0x60, 0xe0, 0x22, 0xe0, 0x6d, 0x88, 0xb8, 
+	0x18, 0x08, 0x04, 0x02, 0x0c, 0x12, 0x69, 0x60, 
+	0xf0, 0x00, 0xfb, 0xf1, 0x60, 0xb0, 0x28, 0x00, 
+	0xd0, 0xbd, 0x61, 0x60, 0x8b, 0x21, 0x69, 0x60, 
+	0x18, 0x40, 0x88, 0xba, 0x68, 0x39, 0xf0, 0x13, 
+	0xfb, 0x01, 0x8b, 0x20, 0x88, 0xb9, 0x18, 0x40, 
+	0x83, 0x20, 0x78, 0xe0, 0x30, 0x50, 0x04, 0x00, 
+	0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 0x43, 0x18, 
+	0x49, 0x33, 0xf0, 0x00, 0xfb, 0x87, 0x80, 0xa0, 
+	0x20, 0x00, 0x9a, 0x04, 0x60, 0x10, 0xe0, 0x55, 
+	0xe0, 0x54, 0x98, 0x01, 0xf7, 0xff, 0xf9, 0x98, 
+	0x78, 0x38, 0x28, 0x80, 0xd1, 0x23, 0x20, 0x32, 
+	0x4f, 0x2c, 0x70, 0x38, 0x20, 0x23, 0x70, 0x78, 
+	0x20, 0x0c, 0x80, 0x78, 0x98, 0x00, 0x5b, 0x80, 
+	0x80, 0xb8, 0x78, 0xe1, 0x71, 0xb9, 0x22, 0x00, 
+	0x20, 0x81, 0x68, 0xbb, 0xf7, 0xff, 0xf9, 0xd6, 
+	0x81, 0xb8, 0xf7, 0xff, 0xf9, 0xa5, 0x28, 0x00, 
+	0xd1, 0x01, 0x25, 0x00, 0xe0, 0x36, 0x78, 0xe0, 
+	0x30, 0x50, 0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 
+	0x04, 0x1b, 0x43, 0x18, 0x49, 0x1c, 0xf0, 0x00, 
+	0xfb, 0x59, 0x80, 0xa0, 0xe0, 0x2a, 0x7e, 0xa0, 
+	0x28, 0x00, 0xd1, 0x10, 0x78, 0xe0, 0x30, 0x60, 
+	0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 
+	0x43, 0x18, 0x21, 0x7d, 0x00, 0xc9, 0xf0, 0x00, 
+	0xfb, 0x49, 0x80, 0xe0, 0x20, 0x00, 0x9a, 0x04, 
+	0x60, 0x10, 0x20, 0x04, 0xe0, 0x15, 0x20, 0x00, 
+	0x76, 0xa0, 0xe0, 0x13, 0x98, 0x01, 0x9b, 0x04, 
+	0x1c, 0x3a, 0xf7, 0xff, 0xfd, 0x29, 0x1c, 0x05, 
+	0xe0, 0x0c, 0x29, 0x7f, 0xda, 0x01, 0x21, 0x01, 
+	0xe0, 0x00, 0x21, 0x00, 0x98, 0x01, 0x9a, 0x04, 
+	0xf0, 0x00, 0xf8, 0x6e, 0x1c, 0x05, 0xd0, 0x01, 
+	0x20, 0x08, 0x70, 0xa0, 0x1c, 0x28, 0xb0, 0x01, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xe0, 0x2e, 0x08, 0x56, 0xd0, 
+	0x00, 0x00, 0x27, 0x10, 0x2e, 0x08, 0x56, 0xc0, 
+	0xb5, 0xf0, 0x1c, 0x07, 0x06, 0x08, 0x0e, 0x00, 
+	0x21, 0x01, 0x26, 0x02, 0x00, 0xfa, 0x1b, 0xd2, 
+	0x00, 0x92, 0x60, 0x19, 0x1c, 0x1c, 0x49, 0x19, 
+	0x18, 0x55, 0x28, 0x22, 0xd0, 0x19, 0x28, 0x50, 
+	0xd0, 0x11, 0x28, 0x80, 0xd0, 0x21, 0x28, 0x85, 
+	0xd1, 0x23, 0x1c, 0x38, 0xf7, 0xff, 0xf9, 0x20, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x25, 0x28, 0x00, 
+	0xd0, 0x00, 0x70, 0xae, 0x21, 0x00, 0x60, 0x21, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x1a, 0x28, 0x00, 0xd0, 0xf7, 
+	0xe0, 0x07, 0x1c, 0x38, 0xf7, 0xff, 0xf9, 0x0c, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x11, 0x28, 0x00, 
+	0xd0, 0xee, 0x70, 0xae, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0x00, 0x22, 0x34, 0x49, 0x0a, 0x70, 0x0a, 
+	0x22, 0x33, 0x70, 0x4a, 0x22, 0x04, 0x80, 0x4a, 
+	0x00, 0xc3, 0x1a, 0x18, 0x00, 0x80, 0x4a, 0x07, 
+	0x18, 0x80, 0x78, 0xc0, 0x71, 0x08, 0xf7, 0xff, 
+	0xf9, 0x0b, 0x28, 0x00, 0xd1, 0x01, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x56, 0xc0, 0x2e, 0x08, 0x56, 0xe0, 
+	0xb5, 0xf0, 0x1c, 0x04, 0x20, 0x01, 0x26, 0x01, 
+	0x60, 0x10, 0x1c, 0x17, 0x4d, 0x1b, 0x29, 0x00, 
+	0xd0, 0x08, 0x20, 0x03, 0xf0, 0x00, 0xfb, 0x02, 
+	0x60, 0xa8, 0x28, 0x00, 0xd1, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x32, 0x70, 0x28, 
+	0x20, 0x23, 0x70, 0x68, 0x20, 0x0c, 0x80, 0x68, 
+	0x00, 0xe0, 0x1b, 0x00, 0x00, 0x80, 0x49, 0x12, 
+	0x5a, 0x0a, 0x80, 0xaa, 0x18, 0x44, 0x78, 0xe1, 
+	0x71, 0xa9, 0x22, 0x00, 0x20, 0x84, 0x68, 0xab, 
+	0xf7, 0xff, 0xf9, 0x08, 0x81, 0xa8, 0xf7, 0xff, 
+	0xf8, 0xd7, 0x28, 0x00, 0xd1, 0x02, 0x26, 0x00, 
+	0x60, 0x38, 0xe0, 0x0a, 0x78, 0xe0, 0x30, 0x50, 
+	0x04, 0x00, 0x0c, 0x00, 0x23, 0x03, 0x04, 0x1b, 
+	0x43, 0x18, 0x49, 0x06, 0xf0, 0x00, 0xfa, 0x8a, 
+	0x80, 0xa0, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x56, 0xc0, 
+	0x2e, 0x08, 0x56, 0xe0, 0x00, 0x00, 0x27, 0x10, 
+	0x20, 0x00, 0x47, 0x70, 0xb5, 0x90, 0x28, 0x00, 
+	0xd0, 0x06, 0x21, 0xff, 0x4a, 0x24, 0x73, 0x11, 
+	0x4b, 0x24, 0x18, 0xc1, 0xf7, 0xfa, 0xfe, 0x88, 
+	0x20, 0x00, 0x21, 0x00, 0x4a, 0x22, 0x01, 0x83, 
+	0x18, 0x1b, 0x00, 0xdb, 0x18, 0x9b, 0x33, 0xff, 
+	0x33, 0xff, 0x33, 0x02, 0x60, 0x19, 0x60, 0x59, 
+	0x30, 0x01, 0x28, 0x06, 0xdb, 0xf3, 0x20, 0x00, 
+	0x43, 0xc4, 0x4a, 0x1c, 0x01, 0x03, 0x50, 0xd1, 
+	0x18, 0x9b, 0x60, 0xdc, 0x30, 0x01, 0x28, 0x1e, 
+	0xdb, 0xf8, 0x27, 0x01, 0x20, 0x02, 0x49, 0x18, 
+	0x60, 0x08, 0xf7, 0xfd, 0xfb, 0x11, 0x28, 0x01, 
+	0xd0, 0x00, 0x27, 0x00, 0xf7, 0xfb, 0xff, 0x78, 
+	0x28, 0x00, 0xd1, 0x00, 0x27, 0x00, 0xf7, 0xfe, 
+	0xfe, 0x09, 0x28, 0x00, 0xd1, 0x00, 0x27, 0x00, 
+	0xf7, 0xfd, 0xfe, 0x24, 0x28, 0x00, 0xd1, 0x00, 
+	0x27, 0x00, 0xf0, 0x01, 0xf9, 0x05, 0x28, 0x00, 
+	0xd1, 0x00, 0x27, 0x00, 0xf0, 0x02, 0xf8, 0xb6, 
+	0x42, 0xa0, 0xd1, 0x00, 0x27, 0x00, 0x2f, 0x01, 
+	0xd1, 0x01, 0xf0, 0x00, 0xf8, 0x0f, 0x1c, 0x38, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0x90, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x5e, 0x30, 0x2e, 0x08, 0x5c, 0x50, 
+	0x6e, 0x00, 0x11, 0x00, 0xb5, 0x00, 0xf0, 0x18, 
+	0xfd, 0x33, 0x49, 0x07, 0x20, 0x19, 0xf0, 0x18, 
+	0xfc, 0xfb, 0xf0, 0x18, 0xfc, 0xf1, 0x4b, 0x05, 
+	0x40, 0x18, 0xf0, 0x18, 0xfc, 0xf1, 0xf0, 0x18, 
+	0xfd, 0x5d, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x00, 0xaf, 0xb5, 0xfd, 0xff, 0xff, 0xff, 
+	0xb5, 0x00, 0xf0, 0x18, 0xfc, 0xe1, 0x23, 0x01, 
+	0x06, 0x5b, 0x43, 0x18, 0xf0, 0x18, 0xfc, 0xe0, 
+	0x20, 0x01, 0x06, 0x40, 0xf0, 0x18, 0xfc, 0xd3, 
+	0x48, 0x02, 0x68, 0x81, 0x31, 0x01, 0x60, 0x81, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x90, 
+	0xb5, 0xf0, 0xb0, 0x84, 0xf0, 0x00, 0xfa, 0x80, 
+	0x4f, 0x99, 0x88, 0x39, 0x48, 0x99, 0x29, 0x06, 
+	0xd2, 0x64, 0xa3, 0x02, 0x5c, 0x5b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x03, 0x36, 0x61, 0x8e, 
+	0xb9, 0xe8, 0x1d, 0xc5, 0x35, 0xff, 0x35, 0xfa, 
+	0x68, 0x6c, 0x68, 0x2e, 0x2e, 0x00, 0xd1, 0x13, 
+	0xf7, 0xfa, 0xfc, 0xa0, 0x69, 0x39, 0x42, 0x88, 
+	0xd9, 0x24, 0xf7, 0xfa, 0xfc, 0x9b, 0x30, 0x64, 
+	0x61, 0x38, 0x20, 0x00, 0xab, 0x01, 0x70, 0x18, 
+	0x3b, 0x04, 0x70, 0x18, 0x46, 0x69, 0x22, 0x00, 
+	0xa8, 0x01, 0xf7, 0xfd, 0xfa, 0x69, 0xe0, 0x15, 
+	0x21, 0x01, 0xab, 0x01, 0x70, 0x19, 0x19, 0x01, 
+	0x31, 0xff, 0x31, 0xe1, 0x78, 0x09, 0x3b, 0x04, 
+	0x70, 0x19, 0x01, 0x21, 0x18, 0x0a, 0x46, 0x69, 
+	0xa8, 0x01, 0xf7, 0xfd, 0xfa, 0x59, 0x20, 0x1e, 
+	0x1c, 0x61, 0x3e, 0x01, 0xf0, 0x13, 0xf8, 0xd8, 
+	0x60, 0x69, 0x60, 0x2e, 0x21, 0x01, 0xe0, 0x54, 
+	0x23, 0x01, 0x02, 0x9b, 0x18, 0xc5, 0x68, 0xec, 
+	0x68, 0xae, 0x2e, 0x00, 0xd0, 0x20, 0x19, 0x01, 
+	0x23, 0x1f, 0x01, 0x5b, 0x18, 0xc9, 0x7a, 0x09, 
+	0xab, 0x00, 0x70, 0x19, 0xa9, 0x00, 0x78, 0x09, 
+	0x09, 0x09, 0x29, 0x06, 0xd0, 0x01, 0x21, 0x01, 
+	0xe0, 0x00, 0x21, 0x02, 0xab, 0x01, 0x70, 0x19, 
+	0x01, 0x21, 0x18, 0x08, 0x23, 0x41, 0x00, 0xdb, 
+	0x18, 0xc2, 0x46, 0x69, 0xa8, 0x01, 0xf7, 0xfb, 
+	0xfe, 0xa3, 0x20, 0x1e, 0x1c, 0x61, 0x3e, 0x01, 
+	0xf0, 0x13, 0xf8, 0xae, 0x60, 0xe9, 0x60, 0xae, 
+	0x21, 0x02, 0xe0, 0x2a, 0xe0, 0xc2, 0x23, 0x03, 
+	0x02, 0x5b, 0x18, 0xc5, 0x69, 0x6c, 0x69, 0x2e, 
+	0x2e, 0x00, 0xd0, 0x21, 0x21, 0x01, 0xab, 0x01, 
+	0x70, 0x19, 0x19, 0x01, 0x23, 0x2f, 0x01, 0x5b, 
+	0x18, 0xc9, 0x7c, 0x09, 0xab, 0x00, 0x70, 0x19, 
+	0xa9, 0x00, 0x78, 0x09, 0x09, 0x09, 0x29, 0x06, 
+	0xd1, 0x02, 0x21, 0x02, 0x71, 0x19, 0x33, 0x04, 
+	0x01, 0x21, 0x18, 0x08, 0x23, 0x41, 0x01, 0x1b, 
+	0x18, 0xc2, 0x46, 0x69, 0xa8, 0x01, 0xf7, 0xfe, 
+	0xfd, 0x09, 0x20, 0x1e, 0x1c, 0x61, 0x3e, 0x01, 
+	0xf0, 0x13, 0xf8, 0x82, 0x61, 0x69, 0x61, 0x2e, 
+	0x21, 0x03, 0x80, 0x39, 0x20, 0x00, 0xe0, 0x97, 
+	0x23, 0x01, 0x02, 0xdb, 0x18, 0xc5, 0x69, 0xec, 
+	0x69, 0xae, 0x2e, 0x00, 0xd0, 0x21, 0x21, 0x01, 
+	0xab, 0x01, 0x70, 0x19, 0x19, 0x01, 0x23, 0x3f, 
+	0x01, 0x5b, 0x18, 0xc9, 0x7e, 0x09, 0xab, 0x00, 
+	0x70, 0x19, 0xa9, 0x00, 0x78, 0x09, 0x09, 0x09, 
+	0x29, 0x06, 0xd1, 0x02, 0x21, 0x02, 0x71, 0x19, 
+	0x33, 0x04, 0x01, 0x21, 0x18, 0x08, 0x23, 0xc3, 
+	0x00, 0xdb, 0x18, 0xc2, 0x46, 0x69, 0xa8, 0x01, 
+	0xf7, 0xfd, 0xfc, 0xfe, 0x20, 0x1e, 0x1c, 0x61, 
+	0x3e, 0x01, 0xf0, 0x13, 0xf8, 0x55, 0x61, 0xe9, 
+	0x61, 0xae, 0x20, 0x04, 0xe0, 0x2c, 0x23, 0x05, 
+	0x02, 0x5b, 0x18, 0xc5, 0x6a, 0x6c, 0x6a, 0x2e, 
+	0x2e, 0x00, 0xd0, 0x24, 0x19, 0x01, 0x18, 0xc9, 
+	0x78, 0x09, 0xab, 0x00, 0x70, 0x19, 0xa9, 0x00, 
+	0x78, 0x09, 0x09, 0x09, 0x29, 0x06, 0xd0, 0x05, 
+	0x29, 0x07, 0xd0, 0x01, 0x29, 0x08, 0xd1, 0x03, 
+	0x21, 0x03, 0xe0, 0x02, 0x21, 0x02, 0xe0, 0x00, 
+	0x21, 0x01, 0xab, 0x01, 0x70, 0x19, 0x01, 0x21, 
+	0x18, 0x08, 0x23, 0x41, 0x01, 0x5b, 0x18, 0xc2, 
+	0x46, 0x69, 0xa8, 0x01, 0xf0, 0x00, 0xff, 0xb4, 
+	0x20, 0x1e, 0x1c, 0x61, 0x3e, 0x01, 0xf0, 0x13, 
+	0xf8, 0x27, 0x62, 0x69, 0x62, 0x2e, 0x20, 0x05, 
+	0x80, 0x38, 0xe7, 0xa3, 0xe7, 0xff, 0x23, 0x03, 
+	0x02, 0x9b, 0x18, 0xc6, 0x6a, 0xf4, 0x6a, 0xb5, 
+	0x2d, 0x00, 0xd0, 0x33, 0x19, 0x01, 0x18, 0xc9, 
+	0x7a, 0x09, 0xab, 0x00, 0x70, 0x19, 0xa9, 0x00, 
+	0x78, 0x09, 0x09, 0x09, 0x29, 0x09, 0xd0, 0x10, 
+	0x29, 0x0a, 0xd1, 0x1f, 0x01, 0x21, 0x18, 0x08, 
+	0x23, 0x05, 0x02, 0x5b, 0x18, 0xc0, 0x90, 0x02, 
+	0x8d, 0x01, 0x6a, 0xc0, 0xf7, 0xf5, 0xfd, 0x7c, 
+	0x23, 0x01, 0x42, 0xd8, 0xd0, 0x14, 0x98, 0x02, 
+	0xe0, 0x0d, 0x01, 0x21, 0x18, 0x08, 0x23, 0x05, 
+	0x02, 0x5b, 0x18, 0xc0, 0x90, 0x03, 0x8d, 0x01, 
+	0x6a, 0xc0, 0xf7, 0xf5, 0xfd, 0xe6, 0x23, 0x01, 
+	0x42, 0xd8, 0xd0, 0x05, 0x98, 0x03, 0x6a, 0xc0, 
+	0xf0, 0x00, 0xf9, 0x42, 0x34, 0x01, 0x3d, 0x01, 
+	0x20, 0x1e, 0x1c, 0x21, 0xf0, 0x12, 0xff, 0xe8, 
+	0x62, 0xf1, 0x62, 0xb5, 0x20, 0x00, 0x80, 0x38, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x90, 0x2e, 0x08, 0x5e, 0x30, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0xb4, 0x0f, 0xb5, 0x80, 
+	0xb0, 0x84, 0x99, 0x06, 0xaa, 0x07, 0x4f, 0x15, 
+	0x68, 0x38, 0xf0, 0x13, 0xf8, 0xf5, 0x30, 0x01, 
+	0x04, 0x00, 0x0c, 0x00, 0xab, 0x00, 0x80, 0x18, 
+	0x28, 0x80, 0xdc, 0x19, 0xa8, 0x00, 0x88, 0x00, 
+	0x28, 0x04, 0xdb, 0x15, 0xa8, 0x00, 0x88, 0x00, 
+	0x30, 0x02, 0xf0, 0x00, 0xf8, 0xeb, 0x28, 0x00, 
+	0xd0, 0x0e, 0x90, 0x01, 0xaa, 0x00, 0x88, 0x12, 
+	0x68, 0x39, 0xf0, 0x13, 0xf8, 0x03, 0x21, 0x00, 
+	0xaa, 0x00, 0x88, 0x12, 0x98, 0x01, 0x54, 0x81, 
+	0x46, 0x69, 0x20, 0xa6, 0xf0, 0x00, 0xf8, 0x24, 
+	0xb0, 0x04, 0xbc, 0x80, 0xbc, 0x08, 0xb0, 0x04, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xcc, 
+	0xb5, 0x90, 0x04, 0x0c, 0x0c, 0x24, 0x1c, 0x07, 
+	0x1c, 0x20, 0xb0, 0x84, 0xf0, 0x00, 0xf8, 0xca, 
+	0x28, 0x00, 0xd1, 0x01, 0x43, 0xc0, 0xe0, 0x0b, 
+	0xab, 0x00, 0x80, 0x1c, 0x90, 0x01, 0x1c, 0x39, 
+	0x1c, 0x22, 0xf0, 0x12, 0xff, 0xdf, 0x46, 0x69, 
+	0x20, 0x96, 0xf0, 0x00, 0xf8, 0x05, 0x20, 0x00, 
+	0xb0, 0x04, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf0, 0x06, 0x06, 0x0e, 0x36, 0x07, 0x30, 
+	0x0f, 0x00, 0x01, 0x83, 0x18, 0x18, 0x00, 0xc0, 
+	0x1c, 0x0f, 0xb0, 0x83, 0x49, 0x2e, 0x18, 0x45, 
+	0x1f, 0xe8, 0x38, 0x79, 0x90, 0x02, 0x6f, 0x84, 
+	0x6f, 0xc0, 0x2c, 0x1e, 0xda, 0x4e, 0x09, 0x31, 
+	0x29, 0x06, 0xd1, 0x11, 0x88, 0x3a, 0xb0, 0x81, 
+	0x92, 0x00, 0x19, 0x01, 0x20, 0x1e, 0x1c, 0x2f, 
+	0xf0, 0x12, 0xff, 0x6a, 0x9a, 0x00, 0x01, 0x08, 
+	0x18, 0x38, 0x38, 0xff, 0x38, 0xff, 0x38, 0x42, 
+	0x87, 0x02, 0x18, 0x68, 0xb0, 0x01, 0xe0, 0x34, 
+	0x29, 0x07, 0xd1, 0x22, 0x19, 0x01, 0x20, 0x1e, 
+	0xf0, 0x12, 0xff, 0x5a, 0x91, 0x00, 0x01, 0x08, 
+	0x18, 0x28, 0x90, 0x01, 0x22, 0x10, 0x38, 0xff, 
+	0x38, 0xff, 0x38, 0x0a, 0x1c, 0x39, 0xf0, 0x12, 
+	0xff, 0x9d, 0x98, 0x00, 0x18, 0x28, 0x38, 0x40, 
+	0x76, 0x06, 0x78, 0xb8, 0xf0, 0x00, 0xf8, 0x76, 
+	0x99, 0x01, 0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 
+	0x67, 0xc8, 0x28, 0x00, 0xd1, 0x00, 0xe0, 0x1a, 
+	0x78, 0xba, 0x68, 0x79, 0xf0, 0x12, 0xff, 0x8a, 
+	0xe0, 0x11, 0x19, 0x01, 0x20, 0x1e, 0xf0, 0x12, 
+	0xff, 0x37, 0x91, 0x00, 0x01, 0x08, 0x18, 0x28, 
+	0x22, 0x10, 0x38, 0xff, 0x38, 0xff, 0x38, 0x0a, 
+	0x1c, 0x39, 0xf0, 0x12, 0xff, 0x7b, 0x98, 0x00, 
+	0x18, 0x28, 0x38, 0x40, 0x76, 0x06, 0x1c, 0x60, 
+	0x99, 0x02, 0x67, 0x88, 0x20, 0xff, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x5e, 0x30, 0xb5, 0xf3, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x98, 0x00, 0x04, 0x06, 0x0c, 0x36, 
+	0x27, 0x00, 0x4c, 0x17, 0x01, 0x38, 0x58, 0x20, 
+	0x42, 0xb0, 0xd1, 0x07, 0xf7, 0xfa, 0xfa, 0xb2, 
+	0x19, 0x41, 0x01, 0x38, 0x19, 0x00, 0x60, 0xc1, 
+	0x60, 0x85, 0xe0, 0x02, 0x37, 0x01, 0x2f, 0x1e, 
+	0xdb, 0xf0, 0x2f, 0x1e, 0xdb, 0x1a, 0x27, 0x00, 
+	0x01, 0x38, 0x58, 0x20, 0x28, 0x00, 0xd1, 0x0b, 
+	0x01, 0x38, 0x50, 0x26, 0x99, 0x00, 0x0c, 0x09, 
+	0x19, 0x04, 0x60, 0x61, 0xf7, 0xfa, 0xfa, 0x9a, 
+	0x19, 0x40, 0x60, 0xe0, 0x60, 0xa5, 0xe0, 0x02, 
+	0x37, 0x01, 0x2f, 0x1e, 0xdb, 0xec, 0x2f, 0x1e, 
+	0xdb, 0x04, 0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x30, 0xe7, 0xf9, 
+	0x2e, 0x08, 0x5c, 0x50, 0xb4, 0x80, 0x21, 0x00, 
+	0x4a, 0x07, 0x23, 0x00, 0x01, 0x0f, 0x59, 0xd7, 
+	0x42, 0x87, 0xd1, 0x02, 0x01, 0x08, 0x50, 0x13, 
+	0xe0, 0x02, 0x31, 0x01, 0x29, 0x1e, 0xdb, 0xf5, 
+	0x1c, 0x18, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x5c, 0x50, 0xb5, 0x00, 0xf7, 0xfa, 
+	0xfb, 0xd7, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
+	0x1c, 0x04, 0x1c, 0x10, 0x1c, 0x15, 0x1c, 0x0f, 
+	0xf7, 0xff, 0xff, 0xf4, 0x1c, 0x06, 0xd1, 0x06, 
+	0x1c, 0x20, 0xf7, 0xfa, 0xfb, 0xd3, 0x20, 0x00, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1b, 0xea, 
+	0x19, 0xf0, 0x21, 0x00, 0xf0, 0x12, 0xff, 0xfe, 
+	0x1c, 0x30, 0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x12, 
+	0xff, 0x01, 0x1c, 0x20, 0xf7, 0xfa, 0xfb, 0xc2, 
+	0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x80, 0x27, 0x01, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xfa, 0xfb, 0xb8, 0x1c, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x80, 0x1c, 0x07, 
+	0xf7, 0xfa, 0xfa, 0x40, 0x19, 0xc7, 0xf7, 0xfa, 
+	0xfa, 0x3d, 0x42, 0xb8, 0xd3, 0xfb, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 0x47, 0x70, 
+	0xb5, 0xf0, 0xf7, 0xfa, 0xfa, 0x33, 0x4e, 0x13, 
+	0x69, 0x71, 0x42, 0x88, 0xd0, 0x1d, 0xf7, 0xfa, 
+	0xfa, 0x2d, 0x27, 0x00, 0x61, 0x70, 0x4d, 0x10, 
+	0x4c, 0x10, 0x01, 0x38, 0x58, 0x22, 0x2a, 0x00, 
+	0xd0, 0x10, 0x19, 0x00, 0x68, 0xc3, 0x69, 0x71, 
+	0x42, 0x8b, 0xd2, 0x0b, 0x80, 0x2a, 0x68, 0x82, 
+	0x18, 0x51, 0x60, 0xc1, 0x68, 0x40, 0x07, 0x00, 
+	0x0f, 0x00, 0x23, 0x60, 0x43, 0x18, 0x1c, 0x29, 
+	0xf7, 0xff, 0xfe, 0xea, 0x37, 0x01, 0x2f, 0x1e, 
+	0xdb, 0xe7, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0x90, 
+	0x2e, 0x08, 0x5c, 0x40, 0x2e, 0x08, 0x5c, 0x50, 
+	0xb5, 0x80, 0x04, 0x00, 0x0c, 0x00, 0x21, 0x9f, 
+	0x4a, 0x07, 0x70, 0x11, 0x21, 0x80, 0x70, 0x51, 
+	0x21, 0x10, 0x70, 0x91, 0x27, 0x00, 0x70, 0xd7, 
+	0x21, 0x04, 0xf0, 0x01, 0xf8, 0xdd, 0x1c, 0x38, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x72, 0x60, 0xb5, 0x00, 0x04, 0x00, 
+	0x0c, 0x00, 0xf0, 0x00, 0xf8, 0x03, 0x20, 0x00, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x80, 0x04, 0x00, 
+	0x0c, 0x00, 0x21, 0x9f, 0x4a, 0x07, 0x70, 0x11, 
+	0x21, 0x80, 0x70, 0x51, 0x21, 0x12, 0x70, 0x91, 
+	0x27, 0x00, 0x70, 0xd7, 0x21, 0x04, 0xf0, 0x01, 
+	0xf8, 0xbf, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x72, 0x60, 
+	0xb5, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x21, 0x00, 
+	0x20, 0x9f, 0x4a, 0x14, 0x70, 0x10, 0x20, 0x80, 
+	0x70, 0x50, 0x20, 0x11, 0x70, 0x90, 0x27, 0x00, 
+	0x48, 0x11, 0x01, 0x3d, 0x19, 0xed, 0x00, 0xed, 
+	0x59, 0x46, 0x2e, 0x00, 0xd0, 0x0c, 0x00, 0x8b, 
+	0x18, 0x9b, 0x0e, 0x36, 0x71, 0x1e, 0x59, 0x46, 
+	0x0c, 0x36, 0x71, 0x5e, 0x59, 0x46, 0x0a, 0x36, 
+	0x71, 0x9e, 0x59, 0x45, 0x71, 0xdd, 0x31, 0x01, 
+	0x37, 0x01, 0x2f, 0x07, 0xdb, 0xe9, 0x00, 0x88, 
+	0x70, 0xd0, 0x1d, 0x01, 0x1c, 0x20, 0xf0, 0x01, 
+	0xf8, 0x8f, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x72, 0x60, 
+	0x2e, 0x08, 0x7e, 0xa8, 0xb5, 0x80, 0x04, 0x00, 
+	0x0c, 0x00, 0x21, 0x9f, 0x4a, 0x07, 0x70, 0x11, 
+	0x21, 0x80, 0x70, 0x51, 0x21, 0x20, 0x70, 0x91, 
+	0x27, 0x00, 0x70, 0xd7, 0x21, 0x04, 0xf0, 0x01, 
+	0xf8, 0x77, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x72, 0x60, 
+	0xb5, 0xf0, 0x04, 0x07, 0x0c, 0x3f, 0xb0, 0x82, 
+	0x1c, 0xc8, 0x1c, 0x0c, 0x46, 0x69, 0xf0, 0x00, 
+	0xfc, 0x8b, 0x1c, 0x01, 0x00, 0xf8, 0x4a, 0x25, 
+	0x18, 0x80, 0x88, 0xc2, 0x20, 0x00, 0x4f, 0x24, 
+	0x00, 0xc3, 0x1a, 0x1b, 0x00, 0x9b, 0x19, 0xdb, 
+	0x78, 0xdb, 0x42, 0x93, 0xd1, 0x07, 0x00, 0xc2, 
+	0x1a, 0x12, 0x00, 0x92, 0x5a, 0xba, 0x32, 0x01, 
+	0x4b, 0x1e, 0x70, 0x9a, 0xe0, 0x04, 0x30, 0x01, 
+	0x04, 0x00, 0x14, 0x00, 0x28, 0x08, 0xdb, 0xeb, 
+	0x18, 0x61, 0x91, 0x01, 0x7a, 0x09, 0x04, 0x0d, 
+	0x14, 0x2d, 0x00, 0xc6, 0x1a, 0x36, 0x00, 0xb6, 
+	0x5b, 0xb8, 0x01, 0x00, 0x4c, 0x16, 0x19, 0x00, 
+	0x68, 0x40, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 
+	0xff, 0x07, 0x1c, 0x68, 0xf7, 0xff, 0xfe, 0xde, 
+	0x5b, 0xb9, 0x01, 0x09, 0x19, 0x09, 0x60, 0x48, 
+	0x28, 0x00, 0xd0, 0x0a, 0x99, 0x01, 0x31, 0x09, 
+	0x1c, 0x2a, 0xf0, 0x12, 0xfd, 0xf3, 0x21, 0x00, 
+	0x5b, 0xb8, 0x01, 0x00, 0x19, 0x00, 0x68, 0x40, 
+	0x55, 0x41, 0x20, 0x02, 0x5b, 0xb9, 0x01, 0x0a, 
+	0x54, 0xa0, 0x1c, 0x08, 0xf0, 0x01, 0xf9, 0xae, 
+	0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7a, 0x60, 
+	0x2e, 0x08, 0x56, 0xe0, 0x2e, 0x08, 0x72, 0x60, 
+	0x2e, 0x08, 0x7e, 0x88, 0xb5, 0x80, 0x04, 0x00, 
+	0x0c, 0x00, 0x21, 0x9f, 0x4a, 0x07, 0x70, 0x11, 
+	0x21, 0x80, 0x70, 0x51, 0x21, 0x22, 0x70, 0x91, 
+	0x27, 0x00, 0x70, 0xd7, 0x21, 0x04, 0xf0, 0x01, 
+	0xf8, 0x03, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x72, 0x60, 
+	0xb5, 0x90, 0x04, 0x04, 0x0c, 0x24, 0xb0, 0x81, 
+	0x1c, 0xc8, 0x1c, 0x0f, 0x46, 0x69, 0xf0, 0x00, 
+	0xfc, 0x17, 0x18, 0x38, 0x78, 0xc0, 0x28, 0x00, 
+	0xd0, 0x0f, 0x23, 0x7d, 0x00, 0xdb, 0x43, 0x58, 
+	0x22, 0x03, 0x1c, 0x21, 0xf0, 0x01, 0xf8, 0x77, 
+	0x28, 0x00, 0xdd, 0x06, 0x00, 0x61, 0x4a, 0x07, 
+	0x18, 0x89, 0x31, 0xff, 0x31, 0xff, 0x31, 0x02, 
+	0x84, 0xc8, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x08, 
+	0x20, 0x00, 0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7e, 0xa8, 
+	0xb5, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x21, 0x9f, 
+	0x4a, 0x0b, 0x70, 0x11, 0x21, 0x84, 0x70, 0x51, 
+	0x21, 0x41, 0x70, 0x91, 0x49, 0x09, 0x68, 0x09, 
+	0x0a, 0x0b, 0x70, 0xd3, 0x71, 0x11, 0x49, 0x08, 
+	0x68, 0x09, 0x0c, 0x0b, 0x71, 0x53, 0x0a, 0x0b, 
+	0x71, 0x93, 0x71, 0xd1, 0x21, 0x08, 0xf0, 0x00, 
+	0xff, 0xbb, 0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x72, 0x60, 0x2e, 0x08, 0x1a, 0xd8, 
+	0x2e, 0x08, 0x1a, 0xd4, 0xb5, 0x80, 0x04, 0x00, 
+	0x0c, 0x00, 0x21, 0x9f, 0x4a, 0x07, 0x70, 0x11, 
+	0x21, 0x80, 0x70, 0x51, 0x21, 0x30, 0x70, 0x91, 
+	0x27, 0x00, 0x70, 0xd7, 0x21, 0x04, 0xf0, 0x00, 
+	0xff, 0xa3, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x72, 0x60, 
+	0xb5, 0x90, 0x04, 0x07, 0x0c, 0x3f, 0xb0, 0x81, 
+	0x1c, 0xc8, 0x46, 0x69, 0xf0, 0x00, 0xfb, 0xb8, 
+	0x00, 0xf8, 0x49, 0x19, 0x18, 0x40, 0x88, 0xc2, 
+	0x20, 0x00, 0x49, 0x18, 0x00, 0xc3, 0x1a, 0x1b, 
+	0x00, 0x9b, 0x18, 0x5b, 0x78, 0xdb, 0x42, 0x93, 
+	0xd1, 0x07, 0x00, 0xc2, 0x1a, 0x12, 0x00, 0x92, 
+	0x5a, 0x89, 0x31, 0x01, 0x4a, 0x12, 0x70, 0x91, 
+	0xe0, 0x04, 0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 
+	0x28, 0x08, 0xdb, 0xeb, 0x01, 0x00, 0x49, 0x0f, 
+	0x18, 0x47, 0x68, 0xb8, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xff, 0xfe, 0x3e, 0x24, 0x00, 0x81, 0xbc, 
+	0xa8, 0x00, 0x88, 0x00, 0xf7, 0xff, 0xfe, 0x12, 
+	0x60, 0xb8, 0x28, 0x00, 0xd0, 0x03, 0xa8, 0x00, 
+	0x88, 0x00, 0x08, 0x40, 0x81, 0xb8, 0x1c, 0x20, 
+	0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x7a, 0x60, 0x2e, 0x08, 0x56, 0xe0, 
+	0x2e, 0x08, 0x72, 0x60, 0x2e, 0x08, 0x7e, 0x88, 
+	0xb5, 0x80, 0x04, 0x07, 0x0c, 0x3f, 0x04, 0x08, 
+	0x0c, 0x00, 0xf0, 0x02, 0xfc, 0xe9, 0x28, 0x00, 
+	0xd0, 0x0c, 0x68, 0x82, 0x2a, 0x00, 0xd0, 0x09, 
+	0x89, 0x81, 0x29, 0x00, 0xd0, 0x06, 0x1c, 0x38, 
+	0xf0, 0x00, 0xff, 0x46, 0x20, 0x01, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x47, 0x70, 
+	0xb5, 0x90, 0x04, 0x04, 0x0c, 0x24, 0xb0, 0x81, 
+	0x1c, 0xc8, 0x1c, 0x0f, 0x46, 0x69, 0xf0, 0x00, 
+	0xfb, 0x57, 0x18, 0x3f, 0x78, 0xf8, 0x28, 0x00, 
+	0xd0, 0x0d, 0x28, 0x01, 0xd1, 0x16, 0x1c, 0x20, 
+	0xf0, 0x00, 0xfc, 0x16, 0x79, 0x38, 0x23, 0x7d, 
+	0x00, 0xdb, 0x43, 0x58, 0x22, 0x01, 0x1c, 0x21, 
+	0xf0, 0x00, 0xff, 0xb1, 0xe0, 0x08, 0x1c, 0x20, 
+	0xf0, 0x00, 0xfc, 0x0a, 0x21, 0x09, 0x48, 0x06, 
+	0x70, 0x01, 0x21, 0x20, 0xf7, 0xff, 0xfc, 0xec, 
+	0x20, 0x00, 0xe0, 0x01, 0x20, 0x00, 0x43, 0xc0, 
+	0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x72, 0x60, 0xb5, 0x90, 0x04, 0x04, 
+	0x0c, 0x24, 0xb0, 0x81, 0x1c, 0xc8, 0x1c, 0x0f, 
+	0x46, 0x69, 0xf0, 0x00, 0xfb, 0x29, 0x1c, 0x02, 
+	0x18, 0x38, 0x78, 0xc0, 0x28, 0x01, 0xd1, 0x04, 
+	0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x00, 0xf8, 0x0a, 
+	0xe0, 0x03, 0x21, 0xf0, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf8, 0x31, 0x20, 0x00, 0xb0, 0x01, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 0x04, 0x00, 
+	0x0c, 0x00, 0x04, 0x12, 0x14, 0x12, 0x18, 0x89, 
+	0x79, 0x0a, 0x2a, 0x00, 0xdd, 0x13, 0x2a, 0x03, 
+	0xdc, 0x11, 0x49, 0x0c, 0x70, 0x0a, 0x23, 0x9f, 
+	0x4a, 0x0b, 0x70, 0x13, 0x23, 0x88, 0x70, 0x53, 
+	0x23, 0x02, 0x70, 0x93, 0x70, 0xd3, 0x23, 0x01, 
+	0x71, 0x13, 0x78, 0x09, 0x71, 0x51, 0x21, 0x06, 
+	0xf0, 0x00, 0xfe, 0xd6, 0xe0, 0x02, 0x21, 0xf1, 
+	0xf0, 0x00, 0xf8, 0x0c, 0x20, 0x00, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0x70, 
+	0x2e, 0x08, 0x72, 0x60, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0xb5, 0x00, 0x04, 0x00, 
+	0x0c, 0x00, 0x23, 0x9f, 0x4a, 0x07, 0x70, 0x13, 
+	0x23, 0x88, 0x70, 0x53, 0x23, 0x02, 0x70, 0x93, 
+	0x23, 0x01, 0x70, 0xd3, 0x71, 0x11, 0x21, 0x05, 
+	0xf0, 0x00, 0xfe, 0xb6, 0x20, 0x00, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x72, 0x60, 
+	0xb5, 0xf3, 0xb0, 0x82, 0x4d, 0x1f, 0x78, 0x28, 
+	0x28, 0x0f, 0xd1, 0x2a, 0x99, 0x03, 0x1c, 0xc8, 
+	0xa9, 0x01, 0xf0, 0x00, 0xfa, 0xc9, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x00, 0x1d, 0xec, 0x34, 0xf9, 
+	0x88, 0xe1, 0xa8, 0x01, 0x88, 0x00, 0x18, 0x08, 
+	0x04, 0x06, 0x0c, 0x36, 0x68, 0xa0, 0x1c, 0x32, 
+	0xf7, 0xff, 0xfd, 0x41, 0x1c, 0x07, 0xd1, 0x01, 
+	0x43, 0xf8, 0xe0, 0x1d, 0x98, 0x00, 0x99, 0x03, 
+	0x18, 0x08, 0x1c, 0xc1, 0x88, 0xe0, 0x19, 0xc0, 
+	0xaa, 0x01, 0x88, 0x12, 0xf0, 0x12, 0xfc, 0x4e, 
+	0x1f, 0xb0, 0x04, 0x00, 0x0c, 0x00, 0x12, 0x01, 
+	0x71, 0x39, 0x71, 0x78, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfd, 0x4b, 0x21, 0x04, 0x48, 0x08, 0x70, 0x01, 
+	0x27, 0x00, 0x70, 0x47, 0x70, 0x87, 0x21, 0x03, 
+	0xf7, 0xff, 0xfc, 0x4a, 0x70, 0x2f, 0x1c, 0x38, 
+	0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0x7c, 
+	0x2e, 0x08, 0x72, 0x60, 0xb5, 0xf0, 0xb0, 0x81, 
+	0x1c, 0xc8, 0x1c, 0x0f, 0x46, 0x69, 0xf0, 0x00, 
+	0xfa, 0x87, 0x04, 0x05, 0x0c, 0x2d, 0x4e, 0x23, 
+	0x78, 0x30, 0x1d, 0xf4, 0x34, 0xf9, 0x28, 0x0f, 
+	0xd0, 0x23, 0xa8, 0x00, 0x88, 0x00, 0x30, 0x06, 
+	0xf7, 0xff, 0xfc, 0xfc, 0x60, 0xa0, 0x1c, 0x02, 
+	0xd0, 0x18, 0x19, 0x78, 0x1c, 0xc1, 0x1d, 0x90, 
+	0xaa, 0x00, 0x88, 0x12, 0xf0, 0x12, 0xfc, 0x12, 
+	0x20, 0x9f, 0x68, 0xa1, 0x70, 0x08, 0x20, 0x88, 
+	0x68, 0xa1, 0x70, 0x48, 0x20, 0x03, 0x68, 0xa1, 
+	0x70, 0x88, 0x20, 0x82, 0x68, 0xa1, 0x70, 0xc8, 
+	0x20, 0x0f, 0x70, 0x30, 0xa8, 0x00, 0x88, 0x00, 
+	0x30, 0x06, 0xe0, 0x18, 0x20, 0x00, 0x43, 0xc0, 
+	0xe0, 0x17, 0x88, 0xe1, 0xa8, 0x00, 0x88, 0x00, 
+	0x18, 0x0a, 0x68, 0xa0, 0xf7, 0xff, 0xfc, 0xdb, 
+	0x60, 0xa0, 0x28, 0x00, 0xd0, 0xf2, 0x88, 0xe1, 
+	0x18, 0x40, 0x19, 0x79, 0xaa, 0x00, 0x88, 0x12, 
+	0x31, 0x03, 0xf0, 0x12, 0xfb, 0xeb, 0x88, 0xe0, 
+	0xa9, 0x00, 0x88, 0x09, 0x18, 0x40, 0x80, 0xe0, 
+	0x20, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0x7c, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0xb5, 0xf0, 0x1c, 0x0f, 0x04, 0x01, 0x0c, 0x09, 
+	0xb0, 0x81, 0x91, 0x00, 0xb0, 0x81, 0x46, 0x69, 
+	0x1c, 0xf8, 0xf0, 0x00, 0xfa, 0x2d, 0x1c, 0x02, 
+	0x18, 0x38, 0x78, 0xc1, 0x07, 0xc9, 0x0f, 0xc9, 
+	0x79, 0x04, 0x23, 0x05, 0x48, 0x16, 0x70, 0x03, 
+	0x70, 0x41, 0x70, 0x84, 0x21, 0x00, 0xab, 0x00, 
+	0x88, 0x1b, 0x3b, 0x02, 0x2b, 0x00, 0xdd, 0x09, 
+	0x18, 0x55, 0x19, 0xed, 0x79, 0x6d, 0x18, 0x46, 
+	0x70, 0xf5, 0x31, 0x01, 0x04, 0x09, 0x14, 0x09, 
+	0x42, 0x8b, 0xdc, 0xf5, 0x27, 0x00, 0xa9, 0x00, 
+	0x88, 0x09, 0x18, 0x41, 0x70, 0x4f, 0xa9, 0x00, 
+	0x88, 0x09, 0x31, 0x02, 0xf7, 0xff, 0xfb, 0xb8, 
+	0x23, 0x05, 0x48, 0x08, 0x70, 0x03, 0x21, 0x01, 
+	0x70, 0x41, 0x30, 0xff, 0x30, 0x01, 0x99, 0x01, 
+	0x80, 0x41, 0x80, 0x84, 0x80, 0xc7, 0x1c, 0x38, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x72, 0x60, 0x2e, 0x08, 0x7d, 0x7c, 
+	0xb5, 0xb0, 0x21, 0x9f, 0x4f, 0x1e, 0x70, 0x39, 
+	0x21, 0x88, 0x70, 0x79, 0x21, 0x08, 0x70, 0xb9, 
+	0x1d, 0xc2, 0x32, 0xf9, 0x88, 0xd1, 0x18, 0x09, 
+	0x78, 0x4b, 0x21, 0x01, 0x24, 0x00, 0x2b, 0x0b, 
+	0xd1, 0x05, 0x70, 0xf9, 0x71, 0x3c, 0x88, 0x50, 
+	0x21, 0x05, 0x1c, 0x3a, 0xe0, 0x17, 0x23, 0x81, 
+	0x70, 0xfb, 0x88, 0xd3, 0x33, 0x01, 0x71, 0x3b, 
+	0x71, 0x79, 0x21, 0x00, 0x88, 0xd3, 0x2b, 0x00, 
+	0xdd, 0x09, 0x18, 0x43, 0x78, 0x9b, 0x18, 0x7d, 
+	0x71, 0xab, 0x31, 0x01, 0x04, 0x09, 0x14, 0x09, 
+	0x88, 0xd3, 0x42, 0x8b, 0xdc, 0xf5, 0x88, 0xd0, 
+	0x1d, 0x81, 0x88, 0x50, 0x1c, 0x3a, 0xf0, 0x00, 
+	0xfd, 0x9f, 0x22, 0x20, 0x21, 0x00, 0x1c, 0x38, 
+	0xf0, 0x12, 0xfc, 0x58, 0x20, 0x06, 0x70, 0x38, 
+	0x21, 0x20, 0x1c, 0x38, 0xf7, 0xff, 0xfb, 0x68, 
+	0x1c, 0x20, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x72, 0x60, 0xb5, 0xf0, 0x1c, 0x0f, 
+	0x04, 0x01, 0x0c, 0x09, 0xb0, 0x83, 0x91, 0x00, 
+	0xb0, 0x84, 0x49, 0x2f, 0x91, 0x06, 0x78, 0x08, 
+	0x4e, 0x2e, 0x1c, 0xf1, 0x91, 0x05, 0x4d, 0x2e, 
+	0x28, 0x08, 0xd1, 0x34, 0x1c, 0xf8, 0xa9, 0x02, 
+	0xf0, 0x00, 0xf9, 0x9e, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x01, 0x88, 0xe9, 0xa8, 0x02, 0x88, 0x00, 
+	0x18, 0x08, 0x04, 0x02, 0x0c, 0x12, 0x92, 0x00, 
+	0x68, 0xa8, 0xf7, 0xff, 0xfc, 0x18, 0x1c, 0x04, 
+	0xd1, 0x02, 0x20, 0x00, 0x43, 0xc0, 0xe0, 0x3a, 
+	0x98, 0x01, 0x18, 0x38, 0x1c, 0xc1, 0x88, 0xe8, 
+	0x19, 0x00, 0xaa, 0x02, 0x88, 0x12, 0xf0, 0x12, 
+	0xfb, 0x25, 0x9a, 0x00, 0x1f, 0x90, 0x04, 0x00, 
+	0x0c, 0x00, 0x12, 0x01, 0x71, 0x21, 0x71, 0x60, 
+	0x98, 0x05, 0x1c, 0x21, 0xaa, 0x03, 0xf0, 0x00, 
+	0xf9, 0xcd, 0x1c, 0x07, 0xd5, 0x03, 0x1c, 0x20, 
+	0xf7, 0xff, 0xfc, 0x1a, 0xe7, 0xe1, 0x1c, 0x20, 
+	0xf7, 0xff, 0xfc, 0x16, 0xe0, 0x06, 0x98, 0x05, 
+	0x1c, 0x39, 0xaa, 0x03, 0xf0, 0x00, 0xf9, 0xbe, 
+	0x1c, 0x07, 0xd4, 0xd6, 0x24, 0x02, 0x70, 0x34, 
+	0x12, 0x38, 0x70, 0x70, 0x70, 0xb7, 0xa8, 0x03, 
+	0x88, 0x00, 0x1c, 0xc1, 0x1c, 0x30, 0xf7, 0xff, 
+	0xfb, 0x0b, 0x99, 0x06, 0x70, 0x0c, 0x20, 0x01, 
+	0x99, 0x06, 0x70, 0x48, 0x99, 0x04, 0x80, 0x69, 
+	0x80, 0xa8, 0x21, 0x00, 0x80, 0xe9, 0xb0, 0x07, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x7d, 0x7c, 0x2e, 0x08, 0x72, 0x60, 
+	0x2e, 0x08, 0x7e, 0x7c, 0xb5, 0xf0, 0xb0, 0x81, 
+	0x1c, 0xc8, 0x1c, 0x0f, 0x46, 0x69, 0xf0, 0x00, 
+	0xf9, 0x3f, 0x04, 0x05, 0x0c, 0x2d, 0x4e, 0x23, 
+	0x78, 0x30, 0x1d, 0xf4, 0x34, 0xf9, 0x28, 0x08, 
+	0xd0, 0x23, 0xa8, 0x00, 0x88, 0x00, 0x30, 0x06, 
+	0xf7, 0xff, 0xfb, 0xb4, 0x60, 0xa0, 0x1c, 0x02, 
+	0xd0, 0x18, 0x19, 0x78, 0x1c, 0xc1, 0x1d, 0x90, 
+	0xaa, 0x00, 0x88, 0x12, 0xf0, 0x12, 0xfa, 0xca, 
+	0x20, 0x9f, 0x68, 0xa1, 0x70, 0x08, 0x20, 0x88, 
+	0x68, 0xa1, 0x70, 0x48, 0x20, 0x09, 0x68, 0xa1, 
+	0x70, 0x88, 0x20, 0x82, 0x68, 0xa1, 0x70, 0xc8, 
+	0x20, 0x08, 0x70, 0x30, 0xa8, 0x00, 0x88, 0x00, 
+	0x30, 0x06, 0xe0, 0x18, 0x20, 0x00, 0x43, 0xc0, 
+	0xe0, 0x17, 0x88, 0xe1, 0xa8, 0x00, 0x88, 0x00, 
+	0x18, 0x0a, 0x68, 0xa0, 0xf7, 0xff, 0xfb, 0x93, 
+	0x60, 0xa0, 0x28, 0x00, 0xd0, 0xf2, 0x88, 0xe1, 
+	0x18, 0x40, 0x19, 0x79, 0xaa, 0x00, 0x88, 0x12, 
+	0x31, 0x03, 0xf0, 0x12, 0xfa, 0xa3, 0x88, 0xe0, 
+	0xa9, 0x00, 0x88, 0x09, 0x18, 0x40, 0x80, 0xe0, 
+	0x20, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0x7c, 
+	0xb5, 0x80, 0x04, 0x00, 0x0c, 0x00, 0x22, 0x9f, 
+	0x4f, 0x0d, 0x70, 0x3a, 0x22, 0x88, 0x70, 0x7a, 
+	0x22, 0x0b, 0x70, 0xba, 0x22, 0x01, 0x70, 0xfa, 
+	0x71, 0x39, 0x21, 0x05, 0x1c, 0x3a, 0xf0, 0x00, 
+	0xfc, 0xbf, 0x22, 0x20, 0x21, 0x00, 0x1c, 0x38, 
+	0xf0, 0x12, 0xfb, 0x78, 0x20, 0x06, 0x70, 0x38, 
+	0x21, 0x20, 0x1c, 0x38, 0xf7, 0xff, 0xfa, 0x88, 
+	0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x72, 0x60, 0xb5, 0xf0, 0x1c, 0x0f, 
+	0x04, 0x01, 0x0c, 0x09, 0xb0, 0x83, 0x91, 0x00, 
+	0xb0, 0x84, 0x49, 0x2f, 0x91, 0x06, 0x78, 0x08, 
+	0x4e, 0x2e, 0x1c, 0xf1, 0x91, 0x05, 0x4d, 0x2e, 
+	0x28, 0x07, 0xd1, 0x34, 0x1c, 0xf8, 0xa9, 0x02, 
+	0xf0, 0x00, 0xf8, 0xbe, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x01, 0x88, 0xe9, 0xa8, 0x02, 0x88, 0x00, 
+	0x18, 0x08, 0x04, 0x02, 0x0c, 0x12, 0x92, 0x00, 
+	0x68, 0xa8, 0xf7, 0xff, 0xfb, 0x38, 0x1c, 0x04, 
+	0xd1, 0x02, 0x20, 0x00, 0x43, 0xc0, 0xe0, 0x3a, 
+	0x98, 0x01, 0x18, 0x38, 0x1c, 0xc1, 0x88, 0xe8, 
+	0x19, 0x00, 0xaa, 0x02, 0x88, 0x12, 0xf0, 0x12, 
+	0xfa, 0x45, 0x9a, 0x00, 0x1f, 0x90, 0x04, 0x00, 
+	0x0c, 0x00, 0x12, 0x01, 0x71, 0x21, 0x71, 0x60, 
+	0x98, 0x05, 0x1c, 0x21, 0xaa, 0x03, 0xf0, 0x00, 
+	0xf8, 0xed, 0x1c, 0x07, 0xd5, 0x03, 0x1c, 0x20, 
+	0xf7, 0xff, 0xfb, 0x3a, 0xe7, 0xe1, 0x1c, 0x20, 
+	0xf7, 0xff, 0xfb, 0x36, 0xe0, 0x06, 0x98, 0x05, 
+	0x1c, 0x39, 0xaa, 0x03, 0xf0, 0x00, 0xf8, 0xde, 
+	0x1c, 0x07, 0xd4, 0xd6, 0x24, 0x03, 0x70, 0x34, 
+	0x12, 0x38, 0x70, 0x70, 0x70, 0xb7, 0xa8, 0x03, 
+	0x88, 0x00, 0x19, 0x01, 0x1c, 0x30, 0xf7, 0xff, 
+	0xfa, 0x2b, 0x99, 0x06, 0x70, 0x0c, 0x20, 0x01, 
+	0x99, 0x06, 0x70, 0x48, 0x99, 0x04, 0x80, 0x69, 
+	0x80, 0xa8, 0x21, 0x00, 0x80, 0xe9, 0xb0, 0x07, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x7d, 0x7c, 0x2e, 0x08, 0x72, 0x60, 
+	0x2e, 0x08, 0x7e, 0x7c, 0xb5, 0xf0, 0xb0, 0x81, 
+	0x1c, 0xc8, 0x1c, 0x0f, 0x46, 0x69, 0xf0, 0x00, 
+	0xf8, 0x5f, 0x04, 0x05, 0x0c, 0x2d, 0x4e, 0x23, 
+	0x78, 0x30, 0x1d, 0xf4, 0x34, 0xf9, 0x28, 0x07, 
+	0xd0, 0x23, 0xa8, 0x00, 0x88, 0x00, 0x30, 0x06, 
+	0xf7, 0xff, 0xfa, 0xd4, 0x60, 0xa0, 0x1c, 0x02, 
+	0xd0, 0x18, 0x19, 0x78, 0x1c, 0xc1, 0x1d, 0x90, 
+	0xaa, 0x00, 0x88, 0x12, 0xf0, 0x12, 0xf9, 0xea, 
+	0x20, 0x9f, 0x68, 0xa1, 0x70, 0x08, 0x20, 0x88, 
+	0x68, 0xa1, 0x70, 0x48, 0x20, 0x0c, 0x68, 0xa1, 
+	0x70, 0x88, 0x20, 0x82, 0x68, 0xa1, 0x70, 0xc8, 
+	0x20, 0x07, 0x70, 0x30, 0xa8, 0x00, 0x88, 0x00, 
+	0x30, 0x06, 0xe0, 0x18, 0x20, 0x00, 0x43, 0xc0, 
+	0xe0, 0x17, 0x88, 0xe1, 0xa8, 0x00, 0x88, 0x00, 
+	0x18, 0x0a, 0x68, 0xa0, 0xf7, 0xff, 0xfa, 0xb3, 
+	0x60, 0xa0, 0x28, 0x00, 0xd0, 0xf2, 0x88, 0xe1, 
+	0x18, 0x40, 0x19, 0x79, 0xaa, 0x00, 0x88, 0x12, 
+	0x31, 0x03, 0xf0, 0x12, 0xf9, 0xc3, 0x88, 0xe0, 
+	0xa9, 0x00, 0x88, 0x09, 0x18, 0x40, 0x80, 0xe0, 
+	0x20, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0x7c, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0xb4, 0xb0, 0x24, 0x01, 0x22, 0x00, 0x78, 0x07, 
+	0x0a, 0x3b, 0xd3, 0x15, 0x23, 0x00, 0x06, 0x7c, 
+	0x0e, 0x64, 0x2c, 0x00, 0xdd, 0x0a, 0x02, 0x12, 
+	0x04, 0x12, 0x0c, 0x12, 0x18, 0xc5, 0x78, 0x6d, 
+	0x43, 0x2a, 0x04, 0x12, 0x0c, 0x12, 0x33, 0x01, 
+	0x42, 0x9c, 0xdc, 0xf4, 0x1c, 0x78, 0x06, 0x40, 
+	0x0e, 0x40, 0x04, 0x04, 0x14, 0x24, 0xe0, 0x01, 
+	0x06, 0x7a, 0x0e, 0x52, 0x80, 0x0a, 0x1c, 0x20, 
+	0xbc, 0xb0, 0x47, 0x70, 0xb5, 0xf0, 0x04, 0x16, 
+	0x0c, 0x36, 0x1c, 0x07, 0x78, 0x00, 0x04, 0x00, 
+	0x1c, 0x0c, 0x78, 0x79, 0x02, 0x09, 0x43, 0x08, 
+	0x78, 0xb9, 0x43, 0x08, 0xb0, 0x81, 0x4b, 0x12, 
+	0x42, 0x98, 0xd1, 0x09, 0x46, 0x69, 0x1c, 0xf8, 
+	0xf7, 0xff, 0xff, 0xca, 0x1c, 0x05, 0xa8, 0x00, 
+	0x88, 0x00, 0x30, 0x02, 0x42, 0xb0, 0xdd, 0x02, 
+	0x20, 0x00, 0x43, 0xc0, 0xe0, 0x10, 0x19, 0x78, 
+	0xaa, 0x00, 0x88, 0x12, 0x1c, 0xc1, 0x1c, 0x20, 
+	0xf0, 0x12, 0xf9, 0x5c, 0xa8, 0x00, 0x88, 0x00, 
+	0x18, 0x28, 0x30, 0x03, 0x04, 0x00, 0x14, 0x00, 
+	0x21, 0x00, 0xaa, 0x00, 0x88, 0x12, 0x54, 0xa1, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x9f, 0x88, 0x03, 0xb5, 0xf7, 0x1c, 0x07, 
+	0x20, 0x00, 0xb0, 0x85, 0x90, 0x02, 0x26, 0x00, 
+	0x99, 0x06, 0x1c, 0xc8, 0xa9, 0x04, 0xf7, 0xff, 
+	0xff, 0x9f, 0xa9, 0x04, 0x88, 0x09, 0x1c, 0x04, 
+	0x43, 0xf0, 0x02, 0xc3, 0x42, 0xd9, 0xd2, 0x58, 
+	0x21, 0x00, 0x91, 0x03, 0x4d, 0x2d, 0x99, 0x06, 
+	0x19, 0x08, 0x22, 0x01, 0x02, 0xd2, 0x30, 0x04, 
+	0x1c, 0x29, 0xf7, 0xff, 0xff, 0xaf, 0x90, 0x01, 
+	0x23, 0x01, 0x42, 0xd8, 0xd0, 0x1c, 0x1c, 0x28, 
+	0xf0, 0x12, 0xf9, 0x98, 0x90, 0x00, 0x1c, 0x42, 
+	0x1c, 0x38, 0x1c, 0x29, 0xf0, 0x12, 0xf9, 0x22, 
+	0x98, 0x00, 0x18, 0x38, 0x1c, 0x47, 0x98, 0x00, 
+	0x18, 0x30, 0x1c, 0x46, 0x98, 0x01, 0x18, 0x24, 
+	0x98, 0x03, 0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x03, 0x28, 0x03, 0xdb, 0xdb, 0xa8, 0x04, 
+	0x88, 0x00, 0x42, 0x84, 0xda, 0x27, 0xe0, 0x02, 
+	0x20, 0x00, 0x43, 0xc0, 0xe0, 0x29, 0x99, 0x06, 
+	0x19, 0x08, 0x22, 0x01, 0x02, 0xd2, 0x30, 0x04, 
+	0x1c, 0x29, 0xf7, 0xff, 0xff, 0x83, 0x90, 0x01, 
+	0x23, 0x01, 0x42, 0xd8, 0xd0, 0xf0, 0x1c, 0x28, 
+	0xf0, 0x12, 0xf9, 0x6c, 0x90, 0x00, 0x1c, 0x42, 
+	0x1c, 0x38, 0x1c, 0x29, 0xf0, 0x12, 0xf8, 0xf6, 
+	0x98, 0x00, 0x18, 0x38, 0x1c, 0x47, 0x98, 0x00, 
+	0x18, 0x30, 0x1c, 0x46, 0x98, 0x01, 0x18, 0x24, 
+	0x98, 0x02, 0x30, 0x01, 0x90, 0x02, 0xa8, 0x04, 
+	0x88, 0x00, 0x42, 0x84, 0xdb, 0xdb, 0x9a, 0x07, 
+	0x80, 0x16, 0x98, 0x02, 0x30, 0x03, 0x04, 0x00, 
+	0x14, 0x00, 0xb0, 0x05, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x6a, 0x60, 
+	0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0x54, 
+	0xb0, 0x84, 0xab, 0x00, 0x70, 0x18, 0x22, 0x46, 
+	0x70, 0x5a, 0x22, 0x04, 0x80, 0x5a, 0x80, 0x99, 
+	0x46, 0x69, 0xf7, 0xff, 0xf8, 0xf5, 0xb0, 0x04, 
+	0xbc, 0x08, 0x47, 0x18, 0x47, 0x70, 0x00, 0x00, 
+	0xb5, 0x00, 0x78, 0x01, 0x48, 0x0c, 0x70, 0x01, 
+	0x78, 0x00, 0x28, 0x01, 0xd0, 0x03, 0x28, 0x02, 
+	0xd0, 0x01, 0x28, 0x03, 0xd1, 0x0b, 0x48, 0x09, 
+	0xca, 0x08, 0xc0, 0x08, 0xca, 0x08, 0xc0, 0x08, 
+	0xca, 0x0c, 0xc0, 0x0c, 0xf0, 0x00, 0xf8, 0x67, 
+	0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0xa8, 0x2e, 0x08, 0x7b, 0x60, 
+	0xb5, 0x80, 0x20, 0x00, 0x27, 0x00, 0x4a, 0x1f, 
+	0x01, 0x03, 0x54, 0xd7, 0x18, 0x9b, 0x60, 0x5f, 
+	0x60, 0x9f, 0x81, 0x9f, 0x30, 0x01, 0x28, 0x02, 
+	0xdb, 0xf6, 0x48, 0x1b, 0x70, 0x07, 0x49, 0x1b, 
+	0x48, 0x1b, 0x60, 0x01, 0x49, 0x1b, 0x1d, 0xc2, 
+	0x32, 0x79, 0x60, 0x91, 0x49, 0x1a, 0x1d, 0xc2, 
+	0x32, 0xf9, 0x61, 0x11, 0x49, 0x19, 0x23, 0x05, 
+	0x01, 0xdb, 0x18, 0xc2, 0x23, 0x03, 0x02, 0x1b, 
+	0x62, 0x91, 0x18, 0xc1, 0x63, 0x0f, 0x49, 0x16, 
+	0x1d, 0xc2, 0x32, 0xff, 0x32, 0xfa, 0x30, 0xff, 
+	0x30, 0x81, 0x62, 0x11, 0x61, 0x87, 0x20, 0x05, 
+	0xf7, 0xff, 0xf9, 0x94, 0x28, 0x00, 0xda, 0x03, 
+	0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0x49, 0x0e, 0x00, 0xc2, 0x52, 0x8f, 
+	0x30, 0x01, 0x28, 0x40, 0xdb, 0xfa, 0x48, 0x0c, 
+	0x70, 0x47, 0x20, 0x01, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7e, 0x88, 
+	0x2e, 0x08, 0x1a, 0xa8, 0x00, 0x01, 0x00, 0x41, 
+	0x2e, 0x08, 0x7e, 0xa8, 0x00, 0x02, 0x00, 0x41, 
+	0x00, 0x03, 0x00, 0x41, 0x00, 0x40, 0x00, 0x41, 
+	0x00, 0x24, 0x00, 0x41, 0x2e, 0x08, 0x7b, 0x70, 
+	0x2e, 0x08, 0x7d, 0x7c, 0xb5, 0x00, 0xf7, 0xff, 
+	0xf8, 0x25, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
+	0xb0, 0x83, 0x48, 0xda, 0x90, 0x02, 0x78, 0x00, 
+	0x21, 0x00, 0x4a, 0xd9, 0x4c, 0xd9, 0x4f, 0xda, 
+	0x28, 0x01, 0xd1, 0x71, 0x78, 0x78, 0x38, 0x41, 
+	0x4d, 0xd8, 0x4e, 0xd9, 0x4b, 0xd9, 0x93, 0x01, 
+	0x28, 0x0b, 0xd2, 0x6a, 0xa3, 0x01, 0x5c, 0x1b, 
+	0x00, 0x5b, 0x44, 0x9f, 0xc9, 0x8e, 0xc9, 0xde, 
+	0xdd, 0xc9, 0x67, 0xc9, 0x3b, 0x2b, 0x05, 0x00, 
+	0x88, 0xb8, 0x06, 0x00, 0x0e, 0x00, 0x01, 0x00, 
+	0x9b, 0x01, 0x54, 0x19, 0x9b, 0x01, 0x18, 0xc0, 
+	0x68, 0x40, 0x1c, 0x0c, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xff, 0xf9, 0x26, 0x88, 0xb8, 0x06, 0x00, 
+	0x0e, 0x00, 0x01, 0x00, 0x9b, 0x01, 0x18, 0xc0, 
+	0x60, 0x44, 0x68, 0x80, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xff, 0xf9, 0x1a, 0x88, 0xb8, 0x06, 0x00, 
+	0x0e, 0x00, 0x01, 0x01, 0x9b, 0x01, 0x18, 0xc9, 
+	0x22, 0x01, 0x60, 0x8c, 0x70, 0x32, 0x70, 0x74, 
+	0x18, 0x80, 0xe0, 0x09, 0x20, 0x01, 0x88, 0xb9, 
+	0x06, 0x09, 0x0e, 0x09, 0x01, 0x0a, 0x9b, 0x01, 
+	0x54, 0x98, 0x70, 0x30, 0x70, 0x70, 0x18, 0x08, 
+	0x70, 0xb0, 0x21, 0x20, 0x1c, 0x30, 0xf7, 0xff, 
+	0xf8, 0x07, 0xe0, 0x8d, 0x26, 0x00, 0x00, 0xf1, 
+	0x19, 0x08, 0x88, 0xc2, 0x79, 0x3b, 0x42, 0x9a, 
+	0xd1, 0x1e, 0x22, 0x00, 0x80, 0xc2, 0x58, 0x60, 
+	0xf0, 0x00, 0xfa, 0x86, 0x23, 0x01, 0x42, 0xd8, 
+	0xd0, 0x16, 0x01, 0x01, 0x18, 0x09, 0x00, 0xc9, 
+	0x19, 0x49, 0x88, 0x8a, 0x2a, 0x00, 0xd0, 0x01, 
+	0x3a, 0x01, 0x80, 0x8a, 0x28, 0x04, 0xd1, 0x0b, 
+	0x00, 0x70, 0x19, 0x40, 0x30, 0xff, 0x30, 0xff, 
+	0x30, 0x02, 0x90, 0x00, 0x8c, 0xc0, 0xf0, 0x00, 
+	0xfa, 0xcb, 0x22, 0x00, 0x98, 0x00, 0x84, 0xc2, 
+	0x36, 0x01, 0x2e, 0x20, 0xdb, 0xd7, 0xe0, 0x63, 
+	0xe0, 0x9c, 0xe0, 0x74, 0x88, 0xb8, 0x00, 0xc0, 
+	0x1c, 0x0e, 0x19, 0x01, 0x80, 0xce, 0x58, 0x20, 
+	0xf0, 0x00, 0xfa, 0x5e, 0x23, 0x01, 0x42, 0xd8, 
+	0xd0, 0x56, 0x01, 0x01, 0x18, 0x09, 0x00, 0xc9, 
+	0x19, 0x49, 0x88, 0x8a, 0x2a, 0x00, 0xd0, 0x01, 
+	0x3a, 0x01, 0x80, 0x8a, 0x28, 0x04, 0xd1, 0x5e, 
+	0x88, 0xb8, 0x00, 0x40, 0x19, 0x40, 0x30, 0xff, 
+	0x30, 0xff, 0x30, 0x02, 0x8c, 0xc0, 0xf0, 0x00, 
+	0xfa, 0xa3, 0x88, 0xb8, 0x00, 0x40, 0x19, 0x40, 
+	0x30, 0xff, 0x30, 0xff, 0x30, 0x02, 0x84, 0xc6, 
+	0xe0, 0xb6, 0x7a, 0x38, 0x06, 0x00, 0x7a, 0x79, 
+	0x04, 0x09, 0x43, 0x08, 0x7a, 0xb9, 0x02, 0x09, 
+	0x43, 0x08, 0x7a, 0xf9, 0x43, 0x08, 0x4b, 0x8a, 
+	0x42, 0x98, 0xd0, 0x43, 0xdc, 0x0d, 0x49, 0x89, 
+	0x42, 0x88, 0xd0, 0x19, 0x42, 0x90, 0xd0, 0x1b, 
+	0x49, 0x87, 0x42, 0x88, 0xd1, 0x3a, 0x1d, 0xe8, 
+	0x30, 0xf9, 0x8a, 0x82, 0x32, 0x01, 0x82, 0x82, 
+	0xe0, 0x28, 0x49, 0x84, 0x42, 0x88, 0xd0, 0x1f, 
+	0x49, 0x83, 0x42, 0x88, 0xd1, 0x2e, 0x23, 0x05, 
+	0x01, 0xdb, 0x18, 0xe8, 0x8d, 0x82, 0x2a, 0x00, 
+	0xd1, 0x13, 0x22, 0x01, 0x85, 0x82, 0xe0, 0x19, 
+	0x88, 0xa8, 0x30, 0x01, 0x80, 0xa8, 0xe0, 0x15, 
+	0x1d, 0xe8, 0x30, 0x79, 0x89, 0x81, 0x31, 0x01, 
+	0x81, 0x81, 0x88, 0xf9, 0x00, 0xc8, 0x50, 0x22, 
+	0x79, 0x3a, 0x19, 0x00, 0x80, 0xc2, 0xe0, 0x10, 
+	0xe0, 0x7b, 0x88, 0xf9, 0x22, 0xf3, 0xe0, 0x13, 
+	0x1d, 0xe8, 0x30, 0xff, 0x30, 0xfa, 0x8c, 0x82, 
+	0x32, 0x01, 0x84, 0x82, 0x88, 0xfa, 0x00, 0xd0, 
+	0x50, 0x21, 0x79, 0x39, 0x19, 0x00, 0x80, 0xc1, 
+	0x1c, 0x11, 0x22, 0x00, 0xe0, 0x04, 0xe0, 0xbd, 
+	0xe0, 0x1b, 0xe0, 0x05, 0x88, 0xf9, 0x22, 0xf0, 
+	0x20, 0x00, 0xf0, 0x00, 0xf9, 0xc1, 0xe0, 0x5f, 
+	0x88, 0xb8, 0x00, 0xc1, 0x58, 0x61, 0x4b, 0x64, 
+	0x42, 0x99, 0xd0, 0x0b, 0xdc, 0x58, 0x4b, 0x61, 
+	0x42, 0x99, 0xd0, 0x04, 0x42, 0x91, 0xd1, 0x54, 
+	0xf7, 0xff, 0xf8, 0xf4, 0xe0, 0xa6, 0xf7, 0xff, 
+	0xf8, 0x8b, 0xe0, 0xa3, 0xf7, 0xff, 0xf9, 0xc2, 
+	0xe0, 0xa0, 0x68, 0xb9, 0x98, 0x02, 0x60, 0x41, 
+	0x88, 0xb8, 0xf0, 0x00, 0xf8, 0xbd, 0x98, 0x02, 
+	0x68, 0x40, 0xe0, 0x8f, 0x28, 0x03, 0xd1, 0x50, 
+	0x68, 0x78, 0x88, 0x3b, 0x06, 0x1e, 0x0e, 0x36, 
+	0x1c, 0x05, 0x2e, 0x06, 0xd0, 0x3f, 0xdc, 0x08, 
+	0x2e, 0x06, 0xd2, 0x58, 0xa3, 0x01, 0x5d, 0x9b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x5b, 0x55, 0x3c, 0x12, 
+	0x61, 0x4d, 0x2e, 0x0a, 0xd0, 0x3e, 0xdc, 0x05, 
+	0x2e, 0x08, 0xd0, 0x36, 0x2e, 0x09, 0xd1, 0x57, 
+	0x26, 0x00, 0xe0, 0x56, 0x2e, 0x0b, 0xd0, 0x66, 
+	0x2e, 0xe0, 0xd1, 0x51, 0x48, 0x49, 0x70, 0x01, 
+	0xe0, 0x69, 0x49, 0x49, 0x78, 0x4a, 0x2a, 0x01, 
+	0xd1, 0x4a, 0x78, 0x03, 0x1d, 0xca, 0x32, 0xf9, 
+	0x88, 0xd7, 0x18, 0x7f, 0x70, 0xbb, 0x88, 0xd3, 
+	0x33, 0x01, 0x80, 0xd3, 0x88, 0xd3, 0x88, 0x97, 
+	0x42, 0xbb, 0xd0, 0x02, 0x78, 0x00, 0x28, 0x0b, 
+	0xd1, 0x3a, 0x78, 0x08, 0x28, 0x02, 0xd0, 0x09, 
+	0x28, 0x03, 0xd0, 0x07, 0x28, 0x05, 0xd1, 0x33, 
+	0x1c, 0x08, 0xf7, 0xff, 0xfb, 0x59, 0xe0, 0x4a, 
+	0xe0, 0x54, 0xe0, 0x53, 0x78, 0x89, 0x88, 0x50, 
+	0xf7, 0xff, 0xfc, 0x52, 0xe0, 0x43, 0x78, 0xb9, 
+	0xf0, 0x00, 0xff, 0x52, 0xe0, 0x3f, 0x20, 0x00, 
+	0xe0, 0x0b, 0x78, 0xb9, 0xf0, 0x00, 0xfa, 0x2a, 
+	0xe0, 0x39, 0xe0, 0x3e, 0x78, 0x01, 0x02, 0x09, 
+	0x78, 0x40, 0x43, 0x08, 0x49, 0x2f, 0x81, 0x48, 
+	0x20, 0x08, 0xf0, 0x00, 0xfe, 0xeb, 0xe0, 0x2e, 
+	0x78, 0x01, 0x02, 0x09, 0x78, 0x40, 0x43, 0x08, 
+	0xf0, 0x00, 0xfa, 0x45, 0xe0, 0x27, 0xe0, 0x26, 
+	0x78, 0xba, 0x1c, 0x01, 0x78, 0x00, 0xf0, 0x00, 
+	0xfa, 0x13, 0xe0, 0x20, 0x78, 0xba, 0x1c, 0x01, 
+	0x78, 0x00, 0xf0, 0x00, 0xfa, 0x22, 0xe0, 0x1a, 
+	0xe0, 0x19, 0x00, 0xf0, 0x58, 0x21, 0x4b, 0x14, 
+	0x42, 0x99, 0xd1, 0x0d, 0x19, 0x00, 0x88, 0xc0, 
+	0xf7, 0xfd, 0xfd, 0x9a, 0x68, 0x79, 0x78, 0x09, 
+	0x30, 0x01, 0x42, 0x88, 0xd1, 0x04, 0x1c, 0x30, 
+	0xf7, 0xff, 0xf8, 0xd4, 0xe0, 0x07, 0xe0, 0x03, 
+	0x36, 0x01, 0x2e, 0x20, 0xdb, 0xe9, 0xe0, 0x02, 
+	0x20, 0xff, 0xf0, 0x00, 0xfa, 0x6b, 0x2d, 0x00, 
+	0xd0, 0x08, 0x1c, 0x28, 0xf7, 0xfe, 0xff, 0xa4, 
+	0xe0, 0x04, 0x28, 0x02, 0xd1, 0x02, 0x88, 0x38, 
+	0xf0, 0x00, 0xf9, 0xac, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0xa8, 
+	0x00, 0x02, 0x00, 0x41, 0x2e, 0x08, 0x7a, 0x60, 
+	0x2e, 0x08, 0x7b, 0x60, 0x2e, 0x08, 0x7e, 0xa8, 
+	0x2e, 0x08, 0x72, 0x60, 0x2e, 0x08, 0x7e, 0x88, 
+	0x00, 0x20, 0x00, 0x41, 0x00, 0x01, 0x00, 0x41, 
+	0x00, 0x03, 0x00, 0x41, 0x00, 0x24, 0x00, 0x41, 
+	0x00, 0x40, 0x00, 0x41, 0x2e, 0x08, 0x1a, 0x94, 
+	0x2e, 0x08, 0x7d, 0x7c, 0x2e, 0x08, 0x8f, 0x80, 
+	0xb5, 0x90, 0x04, 0x04, 0x0c, 0x24, 0x78, 0x08, 
+	0x04, 0x00, 0x1c, 0x0f, 0x78, 0x49, 0x02, 0x09, 
+	0x43, 0x08, 0x78, 0xb9, 0x43, 0x08, 0x4b, 0x47, 
+	0x42, 0x98, 0xd0, 0x5d, 0xdc, 0x20, 0x4b, 0x46, 
+	0x42, 0x98, 0xd0, 0x5a, 0xdc, 0x0f, 0x4b, 0x45, 
+	0x42, 0x98, 0xd0, 0x41, 0x33, 0x01, 0x42, 0x98, 
+	0xd0, 0x37, 0x4b, 0x43, 0x42, 0x98, 0xd1, 0x5f, 
+	0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 0xf8, 0x20, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x4b, 0x3f, 
+	0x42, 0x98, 0xd0, 0x3e, 0x4b, 0x3e, 0x42, 0x98, 
+	0xd1, 0x52, 0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 
+	0xf8, 0x87, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x4b, 0x3a, 0x42, 0x98, 0xd0, 0x50, 0xdc, 0x0f, 
+	0x4b, 0x39, 0x42, 0x98, 0xd0, 0x3d, 0x33, 0x06, 
+	0x42, 0x98, 0xd0, 0x42, 0x4b, 0x37, 0x42, 0x98, 
+	0xd1, 0x3e, 0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 
+	0xfa, 0xe1, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x4b, 0x33, 0x42, 0x98, 0xd0, 0x16, 0x33, 0x01, 
+	0x42, 0x98, 0xd1, 0x31, 0x1c, 0x20, 0x1c, 0x39, 
+	0xf7, 0xff, 0xfc, 0x20, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xfe, 
+	0xff, 0x85, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x20, 0xf7, 0xfe, 0xff, 0x9d, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x20, 0x1c, 0x39, 
+	0xf7, 0xff, 0xfb, 0xa0, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 
+	0xf9, 0x09, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xe0, 0x00, 0xe0, 0x1c, 0x1c, 0x20, 0x1c, 0x39, 
+	0xf7, 0xff, 0xf9, 0x02, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 
+	0xf9, 0x29, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xe0, 0x18, 0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 
+	0xfa, 0x1b, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 0xfb, 0x06, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x11, 
+	0x89, 0x40, 0xf0, 0x00, 0xf9, 0x60, 0x1c, 0x20, 
+	0x1c, 0x39, 0xf7, 0xff, 0xf8, 0x81, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x9f, 0x88, 0x00, 
+	0x00, 0x9f, 0x80, 0x31, 0x00, 0x9f, 0x80, 0x10, 
+	0x00, 0x9f, 0x80, 0x21, 0x00, 0x9f, 0x80, 0x33, 
+	0x00, 0x9f, 0x84, 0x40, 0x00, 0x9f, 0x88, 0x0a, 
+	0x00, 0x9f, 0x88, 0x01, 0x00, 0x9f, 0x88, 0x09, 
+	0x00, 0x9f, 0x88, 0x0c, 0x2e, 0x08, 0x8f, 0x80, 
+	0xb5, 0xf0, 0x04, 0x06, 0x0c, 0x36, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x1c, 0x28, 0x1c, 0x17, 0xf7, 0xfe, 
+	0xfe, 0x9d, 0x4c, 0x0d, 0x60, 0xa0, 0x28, 0x00, 
+	0xd1, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x54, 0x70, 0x21, 0x21, 0x45, 0x70, 0x61, 
+	0x21, 0x0c, 0x80, 0x61, 0x80, 0xa6, 0x81, 0xa5, 
+	0x1c, 0x39, 0x1c, 0x2a, 0xf0, 0x11, 0xfd, 0xaa, 
+	0x78, 0x20, 0x1c, 0x21, 0xf7, 0xfe, 0xfd, 0xd0, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x7b, 0x60, 0xb5, 0x00, 0x06, 0x02, 
+	0x0e, 0x12, 0x20, 0x54, 0x49, 0x05, 0x70, 0x08, 
+	0x23, 0x48, 0x70, 0x4b, 0x23, 0x04, 0x80, 0x4b, 
+	0x71, 0x0a, 0xf7, 0xfe, 0xfd, 0xbd, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7b, 0x60, 
+	0xb5, 0x90, 0x04, 0x0b, 0x0c, 0x1b, 0x27, 0x54, 
+	0x49, 0x07, 0x70, 0x0f, 0x24, 0x43, 0x70, 0x4c, 
+	0x24, 0x04, 0x80, 0x4c, 0x71, 0xc8, 0x80, 0x8b, 
+	0x71, 0x8a, 0x1c, 0x38, 0xf7, 0xfe, 0xfd, 0xa8, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x7b, 0x60, 0xb5, 0x00, 0x04, 0x02, 
+	0x0c, 0x12, 0x20, 0x54, 0x49, 0x05, 0x70, 0x08, 
+	0x23, 0x46, 0x70, 0x4b, 0x23, 0x04, 0x80, 0x4b, 
+	0x80, 0x8a, 0xf7, 0xfe, 0xfd, 0x95, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7b, 0x60, 
+	0x23, 0xff, 0x04, 0x1b, 0x40, 0x18, 0x23, 0x01, 
+	0x05, 0x5b, 0x42, 0x98, 0xd0, 0x1e, 0xdc, 0x0b, 
+	0x09, 0x5b, 0x42, 0x98, 0xd0, 0x16, 0x00, 0x5b, 
+	0x42, 0x98, 0xd0, 0x15, 0x23, 0x03, 0x04, 0x1b, 
+	0x42, 0x98, 0xd1, 0x19, 0x20, 0x02, 0x47, 0x70, 
+	0x23, 0x09, 0x04, 0x9b, 0x42, 0x98, 0xd0, 0x0f, 
+	0x23, 0x01, 0x05, 0x9b, 0x42, 0x98, 0xd0, 0x0d, 
+	0x23, 0x03, 0x05, 0x5b, 0x42, 0x98, 0xd1, 0x0b, 
+	0x20, 0x06, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x01, 0x47, 0x70, 0x20, 0x03, 0x47, 0x70, 
+	0x20, 0x04, 0x47, 0x70, 0x20, 0x05, 0x47, 0x70, 
+	0x20, 0x00, 0x43, 0xc0, 0x47, 0x70, 0xb5, 0xb0, 
+	0x04, 0x07, 0x0c, 0x3f, 0x04, 0x0b, 0x0c, 0x1b, 
+	0x04, 0x14, 0x0c, 0x24, 0x22, 0x00, 0x20, 0x00, 
+	0x49, 0x10, 0x00, 0xc5, 0x5b, 0x4d, 0x2d, 0x00, 
+	0xd1, 0x08, 0x1c, 0x42, 0x04, 0x12, 0x0c, 0x12, 
+	0x00, 0xc0, 0x52, 0x0a, 0x18, 0x40, 0x80, 0x84, 
+	0x80, 0x43, 0xe0, 0x02, 0x30, 0x01, 0x28, 0x40, 
+	0xdd, 0xef, 0x2a, 0x00, 0xd0, 0x0a, 0x20, 0x05, 
+	0x04, 0x00, 0x43, 0x10, 0x1c, 0x39, 0xf7, 0xfe, 
+	0xfd, 0xa9, 0x04, 0x00, 0x0c, 0x00, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x7b, 0x70, 
+	0xb5, 0x80, 0x04, 0x02, 0x0c, 0x12, 0x20, 0x00, 
+	0x49, 0x0b, 0x00, 0xc3, 0x5a, 0xcb, 0x42, 0x93, 
+	0xd1, 0x09, 0x27, 0x00, 0x00, 0xc0, 0x52, 0x0f, 
+	0x1c, 0x10, 0xf7, 0xfe, 0xfd, 0xc7, 0x1c, 0x38, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x30, 0x01, 
+	0x28, 0x40, 0xdb, 0xee, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x7b, 0x70, 0xb5, 0xf0, 0x04, 0x06, 
+	0x0c, 0x36, 0x27, 0x00, 0x4c, 0x17, 0x00, 0xf8, 
+	0x5a, 0x20, 0x42, 0xb0, 0xd1, 0x1d, 0x00, 0xfd, 
+	0x19, 0x28, 0x88, 0x81, 0x29, 0x05, 0xd2, 0x10, 
+	0xa3, 0x01, 0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x17, 0x02, 0x09, 0x10, 0x17, 0x00, 0x21, 0x09, 
+	0x48, 0x0f, 0x70, 0x01, 0x21, 0x20, 0xf7, 0xfe, 
+	0xfc, 0xdf, 0xe0, 0x02, 0x88, 0x40, 0xf0, 0x01, 
+	0xfc, 0xf9, 0x5b, 0x60, 0xf7, 0xff, 0xff, 0xc0, 
+	0xe0, 0x06, 0x88, 0x40, 0xf7, 0xfe, 0xff, 0x2c, 
+	0xe0, 0x02, 0x37, 0x01, 0x2f, 0x40, 0xdb, 0xda, 
+	0x2f, 0x40, 0xd1, 0x02, 0x1c, 0x30, 0xf7, 0xfe, 
+	0xfd, 0x89, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x7b, 0x70, 
+	0x2e, 0x08, 0x72, 0x60, 0x20, 0x00, 0x47, 0x70, 
+	0xb5, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x28, 0x05, 
+	0xd0, 0x0c, 0x28, 0x0a, 0xd0, 0x05, 0x28, 0x0b, 
+	0xd1, 0x08, 0x78, 0x48, 0x22, 0x10, 0x21, 0x0b, 
+	0xe0, 0x02, 0x78, 0x48, 0x22, 0x10, 0x21, 0x0a, 
+	0xf0, 0x01, 0xfc, 0x90, 0x20, 0x00, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x00, 0x06, 0x00, 0x0e, 0x00, 
+	0x28, 0x05, 0xd0, 0x06, 0x28, 0x0a, 0xd0, 0x07, 
+	0x28, 0x0b, 0xd1, 0x02, 0x78, 0x88, 0xf0, 0x01, 
+	0xfb, 0xaf, 0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 
+	0x78, 0x48, 0x28, 0x01, 0xd0, 0xf9, 0x78, 0x88, 
+	0xf0, 0x01, 0xfb, 0xa4, 0xe7, 0xf5, 0xb5, 0xf0, 
+	0x4d, 0x22, 0x81, 0x68, 0x27, 0x00, 0x06, 0x38, 
+	0x0e, 0x00, 0xf0, 0x01, 0xfb, 0xc5, 0x28, 0x4e, 
+	0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x01, 0xfb, 0x6c, 
+	0x1c, 0x78, 0x04, 0x07, 0x14, 0x3f, 0x2f, 0x14, 
+	0xdb, 0xf1, 0x89, 0x68, 0xf0, 0x01, 0xfc, 0xda, 
+	0x89, 0x68, 0xf0, 0x01, 0xfc, 0x41, 0x21, 0x0e, 
+	0x4f, 0x17, 0x28, 0x00, 0xd1, 0x02, 0x70, 0x39, 
+	0x20, 0x04, 0xe0, 0x1e, 0x20, 0x00, 0x24, 0x00, 
+	0x4e, 0x14, 0x00, 0xe1, 0x58, 0x71, 0x4b, 0x14, 
+	0x42, 0x99, 0xd1, 0x0e, 0x89, 0x69, 0x1c, 0x20, 
+	0xf7, 0xfe, 0xff, 0x3e, 0x28, 0x00, 0xd0, 0x07, 
+	0x21, 0x0e, 0x70, 0x39, 0x20, 0x00, 0x70, 0x78, 
+	0x21, 0x06, 0x1c, 0x38, 0xf7, 0xfe, 0xfc, 0x60, 
+	0x20, 0x01, 0x34, 0x01, 0x2c, 0x20, 0xdb, 0xe8, 
+	0x28, 0x00, 0xd1, 0x07, 0x21, 0x0e, 0x70, 0x39, 
+	0x20, 0x05, 0x70, 0x78, 0x21, 0x06, 0x1c, 0x38, 
+	0xf7, 0xfe, 0xfc, 0x52, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x80, 
+	0x2e, 0x08, 0x72, 0x60, 0x2e, 0x08, 0x7a, 0x60, 
+	0x00, 0x03, 0x00, 0x41, 0xb5, 0xf0, 0x06, 0x00, 
+	0x0e, 0x00, 0x21, 0x00, 0xb0, 0x85, 0x91, 0x02, 
+	0x22, 0x02, 0x92, 0x01, 0x28, 0xff, 0xd0, 0x02, 
+	0x22, 0x01, 0x92, 0x01, 0x1c, 0x01, 0x9a, 0x01, 
+	0x2a, 0x00, 0xdd, 0x4d, 0x4a, 0x28, 0x92, 0x04, 
+	0x4f, 0x28, 0x20, 0x01, 0x70, 0x38, 0x01, 0x08, 
+	0x9a, 0x04, 0x5c, 0x12, 0x70, 0x7a, 0x31, 0x01, 
+	0x91, 0x03, 0x70, 0xb9, 0x21, 0x00, 0x91, 0x00, 
+	0x9a, 0x04, 0x18, 0x84, 0x89, 0xa0, 0x28, 0x00, 
+	0xd0, 0x16, 0x68, 0xa3, 0x2b, 0x00, 0xd0, 0x13, 
+	0x70, 0xf8, 0x28, 0x00, 0xdd, 0x0b, 0x00, 0x4a, 
+	0x5a, 0x9d, 0x0a, 0x2e, 0x19, 0xd5, 0x71, 0x2e, 
+	0x5a, 0x9a, 0x71, 0x6a, 0x31, 0x01, 0x06, 0x09, 
+	0x0e, 0x09, 0x42, 0x88, 0xdc, 0xf3, 0x00, 0x40, 
+	0x99, 0x00, 0x18, 0x40, 0x1c, 0x45, 0xe0, 0x02, 
+	0x20, 0x00, 0x70, 0xf8, 0x25, 0x01, 0x68, 0x60, 
+	0x28, 0x00, 0xd0, 0x0e, 0xf0, 0x11, 0xfc, 0x66, 
+	0x1c, 0x02, 0x19, 0x78, 0x68, 0x61, 0x30, 0x03, 
+	0xf0, 0x11, 0xfb, 0xf0, 0x68, 0x60, 0xf0, 0x11, 
+	0xfc, 0x5d, 0x19, 0x45, 0x20, 0x00, 0x19, 0x79, 
+	0x70, 0xc8, 0x1c, 0x38, 0x1d, 0x69, 0xf7, 0xfe, 
+	0xfb, 0xf3, 0x99, 0x03, 0x06, 0x09, 0x0e, 0x09, 
+	0x98, 0x02, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
+	0x90, 0x02, 0x9a, 0x01, 0x42, 0x90, 0xdb, 0xb4, 
+	0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x7e, 0x88, 0x2e, 0x08, 0x72, 0x60, 
+	0xb5, 0x80, 0x20, 0x00, 0x22, 0x00, 0x1c, 0x0f, 
+	0x49, 0x0a, 0x54, 0x0a, 0x30, 0x01, 0x06, 0x00, 
+	0x0e, 0x00, 0x28, 0x02, 0xdb, 0xf9, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0xc6, 0x28, 0x01, 0xd1, 0x03, 
+	0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xb8, 
+	0xb5, 0xf0, 0x04, 0x0c, 0x0c, 0x24, 0x1c, 0x17, 
+	0xf0, 0x00, 0xf8, 0x8e, 0x4d, 0x0d, 0x69, 0x28, 
+	0x4b, 0x0d, 0x18, 0xc6, 0x20, 0x04, 0xf0, 0x00, 
+	0xf9, 0x65, 0x20, 0x00, 0x2c, 0x00, 0xdd, 0x0c, 
+	0x5c, 0x39, 0x80, 0x31, 0x23, 0x03, 0x07, 0x1b, 
+	0x69, 0x29, 0x18, 0xc9, 0x88, 0x09, 0x54, 0x39, 
+	0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 0x42, 0xa0, 
+	0xdb, 0xf2, 0x1c, 0x20, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xb0, 
+	0x30, 0x00, 0x40, 0x00, 0xb5, 0xf0, 0x1c, 0x0c, 
+	0x1c, 0x17, 0xb0, 0x83, 0xf0, 0x00, 0xf8, 0x68, 
+	0x4e, 0x13, 0x69, 0x30, 0x4b, 0x13, 0x18, 0xc5, 
+	0x20, 0x04, 0xf0, 0x00, 0xf9, 0x3f, 0x23, 0x03, 
+	0x07, 0x1b, 0x69, 0x30, 0x18, 0xc1, 0x20, 0x00, 
+	0x2c, 0x00, 0xdd, 0x0a, 0x88, 0x2a, 0x54, 0x3a, 
+	0x88, 0x0a, 0x54, 0x3a, 0x88, 0x0a, 0x54, 0x3a, 
+	0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 0x42, 0xa0, 
+	0xdb, 0xf4, 0x46, 0x68, 0x90, 0x02, 0x20, 0x01, 
+	0xab, 0x01, 0x80, 0x18, 0x21, 0x04, 0xa8, 0x01, 
+	0xf0, 0x00, 0xf8, 0x9e, 0x1c, 0x20, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0xb0, 0x30, 0x00, 0x40, 0x00, 
+	0xb5, 0xb0, 0x25, 0x01, 0x1c, 0x0c, 0x1c, 0x17, 
+	0xf0, 0x00, 0xf8, 0x36, 0x48, 0x18, 0x2c, 0x08, 
+	0xd2, 0x2a, 0xa3, 0x02, 0x5d, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x26, 0x04, 0x06, 0x0c, 
+	0x12, 0x18, 0x1e, 0x23, 0x25, 0x00, 0xe0, 0x1f, 
+	0x61, 0x47, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x00, 
+	0xf8, 0x31, 0xe0, 0x14, 0x61, 0x47, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf0, 0x00, 0xf8, 0x53, 0xe0, 0x0e, 
+	0x61, 0x87, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x00, 
+	0xf8, 0x6f, 0xe0, 0x08, 0x61, 0x87, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf0, 0x00, 0xf8, 0x93, 0xe0, 0x02, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xb1, 0x1c, 0x05, 
+	0xe0, 0x02, 0x1c, 0x38, 0xf0, 0x00, 0xfa, 0x14, 
+	0x1c, 0x28, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0xb0, 0x20, 0x00, 0x47, 0x70, 
+	0x49, 0x05, 0x68, 0xca, 0x42, 0x90, 0xd0, 0x06, 
+	0x60, 0xc8, 0x28, 0x00, 0xd1, 0x00, 0xe0, 0x01, 
+	0x20, 0x01, 0x03, 0x40, 0x61, 0x08, 0x47, 0x70, 
+	0x2e, 0x08, 0x1a, 0xb0, 0xb5, 0xb0, 0x1c, 0x07, 
+	0x88, 0x00, 0x4a, 0x10, 0x43, 0x02, 0x48, 0x10, 
+	0x69, 0x00, 0x43, 0x02, 0x25, 0x03, 0x07, 0x2d, 
+	0x43, 0x05, 0x1c, 0x08, 0x1c, 0x14, 0xf0, 0x00, 
+	0xf8, 0xc1, 0x20, 0x00, 0x88, 0x79, 0x29, 0x00, 
+	0xdd, 0x0a, 0x88, 0x21, 0x68, 0x7a, 0x54, 0x11, 
+	0x88, 0x29, 0x68, 0x7a, 0x54, 0x11, 0x88, 0x79, 
+	0x30, 0x01, 0x34, 0x02, 0x42, 0x81, 0xdc, 0xf4, 
+	0x30, 0x01, 0x81, 0x38, 0x20, 0x00, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x30, 0x00, 0x40, 0x00, 
+	0x2e, 0x08, 0x1a, 0xb0, 0xb5, 0x90, 0x1c, 0x07, 
+	0x88, 0x00, 0x4b, 0x0d, 0x18, 0xc0, 0x4a, 0x0d, 
+	0x69, 0x12, 0x18, 0x84, 0x1c, 0x08, 0xf0, 0x00, 
+	0xf8, 0x9d, 0x20, 0x00, 0x88, 0x79, 0x29, 0x00, 
+	0xdd, 0x07, 0x68, 0x79, 0x5c, 0x09, 0x80, 0x21, 
+	0x88, 0x79, 0x30, 0x01, 0x34, 0x02, 0x42, 0x81, 
+	0xdc, 0xf7, 0x20, 0x01, 0x81, 0x38, 0x20, 0x00, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x30, 0x00, 0x40, 0x00, 0x2e, 0x08, 0x1a, 0xb0, 
+	0xb5, 0xb0, 0x1c, 0x07, 0x88, 0x00, 0x07, 0xc2, 
+	0x0f, 0xd2, 0x4c, 0x0f, 0xd0, 0x04, 0x23, 0xfe, 
+	0x40, 0x18, 0x4b, 0x0e, 0x18, 0xc0, 0xe0, 0x01, 
+	0x4b, 0x0d, 0x18, 0xc0, 0x69, 0x22, 0x18, 0x85, 
+	0x1c, 0x08, 0xf0, 0x00, 0xf8, 0x73, 0x23, 0x03, 
+	0x07, 0x1b, 0x69, 0x20, 0x18, 0xc0, 0x88, 0x29, 
+	0x68, 0x7a, 0x70, 0x11, 0x88, 0x01, 0x68, 0x7a, 
+	0x70, 0x11, 0x88, 0x00, 0x68, 0x79, 0x70, 0x08, 
+	0x20, 0x00, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0xb0, 0x30, 0x00, 0x50, 0x00, 
+	0x30, 0x00, 0x40, 0x00, 0xb5, 0x90, 0x88, 0x02, 
+	0x07, 0xd3, 0x0f, 0xdb, 0x1c, 0x07, 0x48, 0x0b, 
+	0x2b, 0x00, 0xd0, 0x02, 0x4b, 0x0a, 0x18, 0xd2, 
+	0xe0, 0x01, 0x4b, 0x0a, 0x18, 0xd2, 0x69, 0x00, 
+	0x18, 0x14, 0x1c, 0x08, 0xf0, 0x00, 0xf8, 0x4a, 
+	0x68, 0x78, 0x78, 0x00, 0x80, 0x20, 0x88, 0x38, 
+	0x07, 0xc0, 0x0f, 0xc0, 0x20, 0x00, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0xb0, 
+	0x30, 0x00, 0x50, 0x00, 0x30, 0x00, 0x40, 0x00, 
+	0xb5, 0x90, 0x1c, 0x07, 0x20, 0x00, 0x78, 0x39, 
+	0x29, 0x01, 0xd0, 0x02, 0x29, 0x02, 0xd1, 0x28, 
+	0xe0, 0x26, 0x48, 0x15, 0x24, 0x00, 0x68, 0x01, 
+	0x29, 0x00, 0xd0, 0x16, 0x60, 0x04, 0x20, 0x1a, 
+	0xf0, 0x00, 0xf9, 0x10, 0x20, 0xc8, 0xf7, 0xfe, 
+	0xfb, 0x79, 0x20, 0x01, 0x06, 0x40, 0xf0, 0x16, 
+	0xfd, 0xca, 0xf0, 0x16, 0xfd, 0xcd, 0x4b, 0x0d, 
+	0x40, 0x18, 0xf0, 0x16, 0xfd, 0xcd, 0x20, 0x00, 
+	0xf0, 0x00, 0xf8, 0xb8, 0x20, 0x01, 0xf0, 0x00, 
+	0xf8, 0xb5, 0x48, 0x09, 0x1f, 0xc1, 0x39, 0x01, 
+	0x68, 0xc9, 0x5c, 0x40, 0x28, 0x00, 0xd0, 0x02, 
+	0x20, 0x01, 0x70, 0x78, 0xe0, 0x00, 0x70, 0x7c, 
+	0x20, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0x98, 0xfd, 0xff, 0xff, 0xff, 
+	0x2e, 0x08, 0x1a, 0xb8, 0xb5, 0xb0, 0x1c, 0x07, 
+	0x4c, 0x1e, 0x68, 0xe0, 0x00, 0x80, 0x4d, 0x1e, 
+	0x58, 0x28, 0x42, 0xb8, 0xd0, 0x32, 0x2f, 0x08, 
+	0xd2, 0x2d, 0xa3, 0x02, 0x5d, 0xdb, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x29, 0x29, 0x04, 0x04, 
+	0x13, 0x13, 0x29, 0x29, 0x28, 0x03, 0xd0, 0x22, 
+	0x28, 0x02, 0xd0, 0x20, 0x20, 0x03, 0x49, 0x15, 
+	0x60, 0x08, 0x68, 0xe0, 0x00, 0xc3, 0x18, 0x18, 
+	0xf0, 0x00, 0xf8, 0xc8, 0x21, 0xf3, 0x40, 0x01, 
+	0xe0, 0x10, 0x28, 0x04, 0xd0, 0x13, 0x28, 0x05, 
+	0xd0, 0x11, 0x20, 0x00, 0x21, 0x03, 0x07, 0x09, 
+	0x80, 0x08, 0x68, 0xe0, 0x00, 0xc3, 0x18, 0x18, 
+	0xf0, 0x00, 0xf8, 0xb8, 0x23, 0xf3, 0x40, 0x18, 
+	0x21, 0x04, 0x43, 0x01, 0x68, 0xe0, 0x00, 0xc3, 
+	0x18, 0x18, 0xf0, 0x00, 0xf8, 0x95, 0x68, 0xe0, 
+	0x00, 0x80, 0x50, 0x2f, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xb0, 
+	0x2e, 0x08, 0x1a, 0xb0, 0x6e, 0x00, 0x11, 0x00, 
+	0xb5, 0x80, 0x21, 0x80, 0x1c, 0x07, 0x20, 0x1f, 
+	0xf0, 0x00, 0xf8, 0x82, 0x21, 0x55, 0x20, 0x02, 
+	0xf0, 0x00, 0xf8, 0x7e, 0x20, 0x02, 0xf0, 0x00, 
+	0xf8, 0x95, 0x28, 0x55, 0xd0, 0x03, 0x20, 0x00, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x21, 0x33, 
+	0x20, 0x05, 0xf0, 0x00, 0xf8, 0x71, 0x21, 0x33, 
+	0x20, 0x0e, 0xf0, 0x00, 0xf8, 0x6d, 0x21, 0x21, 
+	0x20, 0x17, 0xf0, 0x00, 0xf8, 0x69, 0x21, 0x00, 
+	0x20, 0x01, 0xf0, 0x00, 0xf8, 0x65, 0x21, 0x00, 
+	0x20, 0x0a, 0xf0, 0x00, 0xf8, 0x61, 0x21, 0x01, 
+	0x20, 0x02, 0xf0, 0x00, 0xf8, 0x5d, 0x21, 0x01, 
+	0x20, 0x0b, 0xf0, 0x00, 0xf8, 0x59, 0x21, 0x00, 
+	0x20, 0x03, 0xf0, 0x00, 0xf8, 0x55, 0x21, 0x00, 
+	0x20, 0x0c, 0xf0, 0x00, 0xf8, 0x51, 0x21, 0x00, 
+	0x20, 0x04, 0xf0, 0x00, 0xf8, 0x4d, 0x21, 0x01, 
+	0x20, 0x0d, 0xf0, 0x00, 0xf8, 0x49, 0x21, 0x02, 
+	0x20, 0x1e, 0xf0, 0x00, 0xf8, 0x45, 0x21, 0x04, 
+	0x20, 0x1c, 0xf0, 0x00, 0xf8, 0x41, 0x21, 0x03, 
+	0x20, 0x1b, 0xf0, 0x00, 0xf8, 0x3d, 0x21, 0x01, 
+	0x20, 0x1f, 0xf0, 0x00, 0xf8, 0x39, 0x21, 0x01, 
+	0x20, 0x18, 0xf0, 0x00, 0xf8, 0x35, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x04, 0x20, 0x01, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x00, 0xc3, 
+	0x1c, 0x07, 0x18, 0x18, 0x1c, 0x06, 0xf0, 0x00, 
+	0xf8, 0x41, 0x07, 0xc0, 0x0f, 0xc0, 0x25, 0x01, 
+	0x4c, 0x10, 0x28, 0x00, 0xd0, 0x06, 0x5d, 0xe1, 
+	0x29, 0x00, 0xd0, 0x03, 0x1c, 0x28, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x28, 0x00, 0xd1, 0x01, 
+	0x55, 0xe0, 0xe7, 0xf7, 0x21, 0x80, 0x1c, 0x30, 
+	0xf0, 0x00, 0xf8, 0x12, 0x20, 0x32, 0xf7, 0xfe, 
+	0xfa, 0x95, 0x21, 0x00, 0x1c, 0x30, 0xf0, 0x00, 
+	0xf8, 0x0b, 0x20, 0x32, 0xf7, 0xfe, 0xfa, 0x8e, 
+	0x55, 0xe5, 0x1c, 0x28, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xb8, 
+	0xb5, 0xb0, 0x06, 0x07, 0x0e, 0x3f, 0x06, 0x0d, 
+	0x0e, 0x2d, 0x24, 0x09, 0xb0, 0x81, 0xab, 0x00, 
+	0x70, 0x1f, 0x70, 0x5d, 0x46, 0x69, 0x22, 0x02, 
+	0x20, 0x80, 0xf7, 0xf4, 0xfa, 0xe6, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x08, 0x1e, 0x60, 0x06, 0x04, 
+	0x0e, 0x24, 0xd1, 0xf0, 0xb0, 0x01, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x06, 0x04, 
+	0x0e, 0x24, 0xb0, 0x82, 0x48, 0x1f, 0x68, 0x00, 
+	0x90, 0x00, 0x25, 0x09, 0xab, 0x01, 0x70, 0x1c, 
+	0x20, 0xff, 0x3b, 0x04, 0x70, 0x18, 0x22, 0x01, 
+	0xb4, 0x04, 0x20, 0x80, 0xa9, 0x02, 0xab, 0x01, 
+	0xf7, 0xf4, 0xfb, 0x22, 0xb0, 0x01, 0xaf, 0x00, 
+	0x78, 0x3f, 0xab, 0x01, 0x70, 0x1c, 0x20, 0xff, 
+	0x3b, 0x04, 0x70, 0x18, 0x22, 0x01, 0xb4, 0x04, 
+	0x20, 0x80, 0xa9, 0x02, 0xab, 0x01, 0xf7, 0xf4, 
+	0xfb, 0x13, 0xb0, 0x01, 0xae, 0x00, 0x78, 0x36, 
+	0xab, 0x01, 0x70, 0x1c, 0x20, 0xff, 0x3b, 0x04, 
+	0x70, 0x18, 0x22, 0x01, 0xb4, 0x04, 0x20, 0x80, 
+	0xa9, 0x02, 0xab, 0x01, 0xf7, 0xf4, 0xfb, 0x04, 
+	0xb0, 0x01, 0xa8, 0x00, 0x78, 0x00, 0x42, 0xb7, 
+	0xd1, 0x03, 0x42, 0x87, 0xd1, 0x01, 0x1c, 0x38, 
+	0xe0, 0x04, 0x1e, 0x68, 0x06, 0x05, 0x0e, 0x2d, 
+	0xd1, 0xc8, 0x20, 0xff, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x02, 0xcc, 0x9c, 
+	0xb5, 0x80, 0x78, 0x01, 0x29, 0x00, 0xd1, 0x1b, 
+	0x78, 0x40, 0x28, 0x00, 0xd0, 0x18, 0x4f, 0x0e, 
+	0x68, 0xf8, 0x00, 0xc3, 0x18, 0x18, 0xf7, 0xff, 
+	0xff, 0xad, 0x21, 0x20, 0x43, 0x01, 0x68, 0xf8, 
+	0x00, 0xc3, 0x18, 0x18, 0xf7, 0xff, 0xff, 0x8c, 
+	0x68, 0xf8, 0x00, 0xc3, 0x18, 0x18, 0xf7, 0xff, 
+	0xff, 0xa1, 0x21, 0x40, 0x43, 0x01, 0x68, 0xf8, 
+	0x00, 0xc3, 0x18, 0x18, 0xf7, 0xff, 0xff, 0x80, 
+	0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0xb0, 0xb5, 0x80, 0x20, 0xe1, 
+	0x01, 0x00, 0xf7, 0xfe, 0xf9, 0xcb, 0x49, 0x1f, 
+	0x60, 0xc8, 0x28, 0x00, 0xd0, 0x0d, 0x27, 0x00, 
+	0x80, 0x4f, 0x70, 0x0f, 0x20, 0x64, 0x80, 0x88, 
+	0x80, 0xcf, 0x21, 0x64, 0x20, 0x00, 0xf0, 0x00, 
+	0xfe, 0x34, 0x20, 0x00, 0x22, 0xff, 0x49, 0x18, 
+	0xe0, 0x08, 0x78, 0x08, 0x23, 0x80, 0x43, 0x18, 
+	0x70, 0x08, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x01, 0x03, 0x18, 0x5b, 
+	0x70, 0x5a, 0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 
+	0x28, 0x0a, 0xdb, 0xf7, 0x20, 0x00, 0x49, 0x0f, 
+	0x22, 0xff, 0x32, 0x01, 0x54, 0x0f, 0x30, 0x01, 
+	0x04, 0x00, 0x0c, 0x00, 0x42, 0x90, 0xdb, 0xf9, 
+	0x20, 0x00, 0x49, 0x0b, 0x54, 0x0f, 0x30, 0x01, 
+	0x04, 0x00, 0x0c, 0x00, 0x42, 0x90, 0xdb, 0xf9, 
+	0x1c, 0x38, 0x49, 0x08, 0x63, 0x8f, 0x60, 0x4f, 
+	0x60, 0x0f, 0x62, 0x0f, 0x61, 0xcf, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x8f, 0x80, 
+	0x2e, 0x08, 0x8f, 0x90, 0x2e, 0x08, 0x90, 0x7c, 
+	0x2e, 0x08, 0x91, 0x7c, 0x2e, 0x08, 0x90, 0x30, 
+	0xb5, 0x90, 0x27, 0x00, 0x4c, 0x0b, 0x01, 0x38, 
+	0x5c, 0x21, 0x29, 0x00, 0xd0, 0x09, 0x19, 0x00, 
+	0x68, 0x81, 0x29, 0x00, 0xd0, 0x02, 0x88, 0x80, 
+	0xf7, 0xff, 0xfb, 0x8a, 0x1c, 0x38, 0xf0, 0x00, 
+	0xff, 0x83, 0x37, 0x01, 0x2f, 0x0a, 0xdb, 0xee, 
+	0xf0, 0x00, 0xf8, 0x06, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x90, 
+	0xb5, 0xf0, 0x25, 0x00, 0x4f, 0x1e, 0x88, 0x78, 
+	0x26, 0x00, 0x28, 0x00, 0xdd, 0x2c, 0x00, 0xec, 
+	0x19, 0x64, 0x00, 0xa4, 0x68, 0xf8, 0x19, 0x00, 
+	0x68, 0x80, 0x28, 0x00, 0xd0, 0x04, 0xf7, 0xfe, 
+	0xf9, 0x7b, 0x68, 0xf8, 0x19, 0x00, 0x60, 0x86, 
+	0x68, 0xf8, 0x19, 0x00, 0x68, 0x40, 0x28, 0x00, 
+	0xd0, 0x04, 0xf7, 0xfe, 0xf9, 0x71, 0x68, 0xf8, 
+	0x19, 0x00, 0x60, 0x46, 0x68, 0xf8, 0x59, 0x00, 
+	0x28, 0x00, 0xd0, 0x03, 0xf7, 0xfe, 0xf9, 0x68, 
+	0x68, 0xf8, 0x51, 0x06, 0x68, 0xf8, 0x19, 0x00, 
+	0x69, 0x40, 0x28, 0x00, 0xd0, 0x04, 0xf7, 0xfe, 
+	0xf9, 0x5f, 0x68, 0xf8, 0x19, 0x00, 0x61, 0x46, 
+	0x88, 0x78, 0x35, 0x01, 0x42, 0xa8, 0xdc, 0xd2, 
+	0x68, 0xf8, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xfe, 
+	0xf9, 0x53, 0x60, 0xfe, 0x80, 0x7e, 0x80, 0xbe, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x8f, 0x80, 0xb5, 0xf0, 0x06, 0x0d, 
+	0x0e, 0x2d, 0x1c, 0x07, 0x20, 0x02, 0x40, 0x28, 
+	0x26, 0x00, 0x43, 0xf6, 0x24, 0x00, 0x28, 0x00, 
+	0xd0, 0x0d, 0x68, 0x38, 0x28, 0x00, 0xd0, 0x02, 
+	0xf7, 0xfe, 0xf9, 0x3a, 0x60, 0x3c, 0x68, 0x78, 
+	0x28, 0x00, 0xd0, 0x02, 0xf7, 0xfe, 0xf9, 0x34, 
+	0x60, 0x7c, 0x61, 0x7e, 0x61, 0xbe, 0x08, 0x68, 
+	0xd3, 0x0d, 0x69, 0xf8, 0x28, 0x00, 0xd0, 0x02, 
+	0xf7, 0xfe, 0xf9, 0x2a, 0x61, 0xfc, 0x6a, 0x38, 
+	0x28, 0x00, 0xd0, 0x02, 0xf7, 0xfe, 0xf9, 0x24, 
+	0x62, 0x3c, 0x63, 0x3e, 0x63, 0x7e, 0x08, 0xe8, 
+	0xd3, 0x05, 0x6b, 0xb8, 0x28, 0x00, 0xd0, 0x02, 
+	0xf7, 0xfe, 0xf9, 0x1a, 0x63, 0xbc, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x80, 0x4f, 0x12, 
+	0x88, 0xb8, 0x1d, 0xc1, 0x31, 0x0d, 0x00, 0xca, 
+	0x18, 0x52, 0x00, 0x92, 0x00, 0xc1, 0x18, 0x09, 
+	0x00, 0x89, 0x68, 0xf8, 0xf7, 0xfe, 0xf8, 0xe7, 
+	0x60, 0xf8, 0x28, 0x00, 0xd0, 0x0b, 0x88, 0xb8, 
+	0x1d, 0xc1, 0x31, 0x0d, 0xf0, 0x00, 0xfd, 0x51, 
+	0x88, 0xb8, 0x30, 0x14, 0x80, 0xb8, 0x20, 0x00, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x78, 0x38, 
+	0x23, 0x80, 0x43, 0x18, 0x70, 0x38, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x8f, 0x80, 0xb5, 0x90, 0x06, 0x07, 
+	0x0e, 0x3f, 0x4c, 0x10, 0x2f, 0x11, 0xd1, 0x02, 
+	0x78, 0x20, 0x27, 0x08, 0x40, 0x07, 0xf7, 0xff, 
+	0xff, 0x3b, 0xf7, 0xff, 0xfe, 0xeb, 0x09, 0x38, 
+	0xd3, 0x03, 0x78, 0x20, 0x23, 0x08, 0x43, 0x18, 
+	0x70, 0x20, 0x4b, 0x09, 0x22, 0x00, 0x21, 0x00, 
+	0x20, 0x00, 0xf0, 0x00, 0xfe, 0x4f, 0x4b, 0x07, 
+	0x22, 0x11, 0x21, 0x00, 0x20, 0x42, 0xf0, 0x00, 
+	0xfe, 0x49, 0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x80, 
+	0x00, 0x00, 0x13, 0x88, 0x00, 0x00, 0x27, 0x10, 
+	0x49, 0x0e, 0x78, 0x0a, 0x08, 0x52, 0xd3, 0x01, 
+	0x22, 0xff, 0xe0, 0x00, 0x22, 0x00, 0x70, 0x02, 
+	0x78, 0x0a, 0x08, 0x92, 0xd3, 0x01, 0x22, 0xff, 
+	0xe0, 0x00, 0x22, 0x00, 0x70, 0x42, 0x78, 0x0a, 
+	0x09, 0x52, 0xd3, 0x01, 0x22, 0xff, 0xe0, 0x00, 
+	0x22, 0x00, 0x70, 0x82, 0x78, 0x09, 0x09, 0x89, 
+	0xd3, 0x01, 0x21, 0xff, 0xe0, 0x00, 0x21, 0x00, 
+	0x70, 0xc1, 0x47, 0x70, 0x2e, 0x08, 0x8f, 0x80, 
+	0xb5, 0x00, 0xf7, 0xff, 0xfe, 0xf9, 0x48, 0x03, 
+	0x78, 0x01, 0x23, 0x80, 0x43, 0x19, 0x70, 0x01, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x8f, 0x80, 
+	0xb5, 0xf0, 0x04, 0x0d, 0x0c, 0x2d, 0x1c, 0x07, 
+	0xb0, 0x81, 0x48, 0x3b, 0x90, 0x00, 0x78, 0x00, 
+	0x23, 0x80, 0x40, 0x18, 0x26, 0x00, 0x43, 0xf6, 
+	0x28, 0x00, 0xd1, 0x04, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfe, 0xd5, 0x1c, 0x04, 0xd5, 0x01, 0x1c, 0x30, 
+	0xe0, 0x61, 0x78, 0x38, 0x4e, 0x33, 0x28, 0x42, 
+	0xd0, 0x45, 0xdc, 0x1c, 0x28, 0x00, 0xd0, 0x25, 
+	0x28, 0x01, 0xd0, 0x57, 0x28, 0x02, 0xd1, 0x55, 
+	0x1c, 0x38, 0x1c, 0x29, 0xf0, 0x00, 0xf9, 0xe8, 
+	0x28, 0x00, 0xd0, 0x04, 0x01, 0x20, 0x19, 0x80, 
+	0x88, 0x80, 0xf7, 0xff, 0xfa, 0x5d, 0x1c, 0x20, 
+	0xf0, 0x00, 0xfe, 0x56, 0xf0, 0x00, 0xfd, 0x6f, 
+	0x28, 0x00, 0xd1, 0x43, 0xf0, 0x00, 0xfd, 0x6b, 
+	0x28, 0x00, 0xd0, 0xfb, 0xe0, 0x3e, 0x28, 0x4e, 
+	0xd0, 0x38, 0x28, 0x70, 0xd0, 0x1e, 0x28, 0x73, 
+	0xd1, 0x38, 0x1c, 0x38, 0x1c, 0x29, 0xf0, 0x00, 
+	0xfc, 0x37, 0xe0, 0x33, 0x98, 0x00, 0x78, 0x00, 
+	0x08, 0x40, 0xd2, 0x2f, 0x1c, 0x38, 0x1c, 0x29, 
+	0xf0, 0x00, 0xf8, 0x36, 0x28, 0x01, 0xd1, 0x29, 
+	0x01, 0x20, 0x19, 0x80, 0x88, 0x80, 0xf7, 0xff, 
+	0xfa, 0x37, 0xf0, 0x00, 0xfd, 0x4c, 0x28, 0x00, 
+	0xd1, 0x20, 0xf0, 0x00, 0xfd, 0x48, 0x28, 0x00, 
+	0xd0, 0xfb, 0xe0, 0x1b, 0x1c, 0x38, 0x1c, 0x29, 
+	0xf0, 0x00, 0xfb, 0xf6, 0xe0, 0x16, 0x98, 0x00, 
+	0x78, 0x00, 0x09, 0x40, 0xd2, 0x12, 0x1c, 0x38, 
+	0x1c, 0x29, 0xf0, 0x00, 0xf8, 0xd1, 0x28, 0x10, 
+	0xd1, 0x0c, 0x01, 0x20, 0x19, 0x80, 0x88, 0x80, 
+	0xf7, 0xff, 0xfa, 0x1a, 0x1c, 0x20, 0xf0, 0x00, 
+	0xfe, 0x13, 0xe0, 0x03, 0x1c, 0x38, 0x1c, 0x29, 
+	0xf0, 0x00, 0xfb, 0x10, 0x20, 0x00, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x8f, 0x80, 0x2e, 0x08, 0x8f, 0x90, 
+	0xb5, 0xf0, 0x04, 0x09, 0x0c, 0x09, 0x25, 0x00, 
+	0xb0, 0x85, 0xf7, 0xf3, 0xff, 0xa9, 0x20, 0x08, 
+	0xf7, 0xf3, 0xff, 0xc2, 0x20, 0x04, 0xf7, 0xf3, 
+	0xff, 0xbf, 0x20, 0x0c, 0xf7, 0xf3, 0xff, 0xbc, 
+	0x04, 0x00, 0x0c, 0x00, 0x90, 0x03, 0x20, 0x10, 
+	0xf7, 0xf3, 0xff, 0xb6, 0x4f, 0x4d, 0x81, 0x38, 
+	0x20, 0x02, 0xf7, 0xf3, 0xff, 0xb1, 0x20, 0x05, 
+	0xf7, 0xf3, 0xff, 0xae, 0x06, 0x04, 0x0e, 0x24, 
+	0x20, 0x01, 0xf7, 0xf3, 0xff, 0xa9, 0x20, 0x08, 
+	0xf7, 0xf3, 0xff, 0xa6, 0x06, 0x06, 0x0e, 0x36, 
+	0x20, 0x08, 0xf7, 0xf3, 0xff, 0xa1, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x02, 0x48, 0x42, 0x90, 0x04, 
+	0x5d, 0x80, 0x0a, 0x01, 0xd3, 0x03, 0x06, 0xc0, 
+	0x0e, 0xc0, 0x42, 0xa0, 0xd0, 0x45, 0x20, 0x80, 
+	0x43, 0x20, 0x99, 0x04, 0x55, 0x88, 0x98, 0x03, 
+	0x38, 0x09, 0xd5, 0x00, 0x30, 0x03, 0x10, 0x80, 
+	0x04, 0x00, 0x0c, 0x00, 0x90, 0x01, 0x88, 0x7c, 
+	0x28, 0x00, 0xdd, 0x36, 0x20, 0x10, 0xf7, 0xf3, 
+	0xff, 0x83, 0x04, 0x06, 0x0c, 0x36, 0x20, 0x10, 
+	0xf7, 0xf3, 0xff, 0x7e, 0x04, 0xc1, 0x0c, 0xc9, 
+	0x91, 0x00, 0x2e, 0x00, 0xd0, 0x21, 0x1c, 0x30, 
+	0xf0, 0x00, 0xfb, 0xe0, 0x4b, 0x2f, 0x42, 0x98, 
+	0xd1, 0x10, 0x88, 0xb8, 0x88, 0x79, 0x42, 0x88, 
+	0xd1, 0x05, 0xf7, 0xff, 0xfe, 0xa3, 0x23, 0x01, 
+	0x42, 0xd8, 0xd1, 0x00, 0xe0, 0x49, 0x88, 0x79, 
+	0x31, 0x01, 0x80, 0x79, 0x1c, 0x61, 0x1c, 0x20, 
+	0x04, 0x0c, 0x0c, 0x24, 0x00, 0xc3, 0x18, 0x18, 
+	0x00, 0x80, 0x68, 0xf9, 0x18, 0x09, 0x81, 0xce, 
+	0x99, 0x00, 0x68, 0xfa, 0x18, 0x10, 0x82, 0x01, 
+	0xe0, 0x01, 0x99, 0x00, 0x80, 0xf9, 0x1c, 0x68, 
+	0x04, 0x05, 0x0c, 0x2d, 0x98, 0x01, 0x42, 0x85, 
+	0xdb, 0xc8, 0x98, 0x04, 0x99, 0x02, 0xf0, 0x00, 
+	0xfb, 0xd3, 0x28, 0xff, 0xd1, 0x28, 0x22, 0x00, 
+	0x21, 0x00, 0x20, 0x00, 0xf0, 0x00, 0xfe, 0x0a, 
+	0x04, 0x00, 0x0c, 0x00, 0xf0, 0x00, 0xfd, 0x78, 
+	0x78, 0x38, 0x09, 0x00, 0xd3, 0x16, 0x20, 0x00, 
+	0x88, 0x79, 0x29, 0x00, 0xdd, 0x12, 0x00, 0xc2, 
+	0x18, 0x12, 0x00, 0x92, 0x68, 0xf9, 0x18, 0x89, 
+	0x89, 0xca, 0x89, 0x7b, 0x42, 0x9a, 0xd0, 0x03, 
+	0x7f, 0x0a, 0x23, 0x80, 0x43, 0x1a, 0x77, 0x0a, 
+	0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 0x88, 0x79, 
+	0x42, 0x81, 0xdc, 0xec, 0x78, 0x38, 0x23, 0x01, 
+	0x43, 0x18, 0x70, 0x38, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x80, 
+	0x2e, 0x08, 0x90, 0x7c, 0x00, 0x00, 0xff, 0xff, 
+	0xb5, 0xf0, 0x04, 0x09, 0x0c, 0x09, 0x25, 0x00, 
+	0xb0, 0x88, 0xf7, 0xf3, 0xfe, 0xf1, 0x20, 0x08, 
+	0xf7, 0xf3, 0xff, 0x0a, 0x20, 0x04, 0xf7, 0xf3, 
+	0xff, 0x07, 0x20, 0x0c, 0xf7, 0xf3, 0xff, 0x04, 
+	0x04, 0x04, 0x0c, 0x24, 0x20, 0x10, 0xf7, 0xf3, 
+	0xfe, 0xff, 0x20, 0x02, 0xf7, 0xf3, 0xfe, 0xfc, 
+	0x20, 0x05, 0xf7, 0xf3, 0xfe, 0xf9, 0x06, 0x06, 
+	0x0e, 0x36, 0x20, 0x01, 0xf7, 0xf3, 0xfe, 0xf4, 
+	0x20, 0x08, 0xf7, 0xf3, 0xfe, 0xf1, 0x06, 0x07, 
+	0x0e, 0x3f, 0x20, 0x08, 0xf7, 0xf3, 0xfe, 0xec, 
+	0x06, 0x01, 0x0e, 0x09, 0x91, 0x04, 0x20, 0x10, 
+	0xf7, 0xf3, 0xfe, 0xe6, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfe, 0xe3, 0x49, 0x4c, 0x91, 0x07, 0x5d, 0xc8, 
+	0x0a, 0x01, 0xd3, 0x05, 0x06, 0xc0, 0x0e, 0xc0, 
+	0x42, 0xb0, 0xd1, 0x01, 0x20, 0x00, 0xe0, 0x88, 
+	0x20, 0x80, 0x43, 0x30, 0x99, 0x07, 0x55, 0xc8, 
+	0x4f, 0x45, 0x88, 0x78, 0x90, 0x00, 0x1f, 0xe0, 
+	0x38, 0x05, 0x90, 0x06, 0x28, 0x00, 0xdd, 0x68, 
+	0x48, 0x42, 0x90, 0x05, 0x20, 0x10, 0xf7, 0xf3, 
+	0xfe, 0xc7, 0x04, 0x06, 0x0c, 0x36, 0x20, 0x06, 
+	0xf7, 0xf3, 0xfe, 0xc2, 0x20, 0x06, 0xf7, 0xf3, 
+	0xfe, 0xbf, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x03, 
+	0x2e, 0x00, 0xd1, 0x11, 0x20, 0x0c, 0xf7, 0xf3, 
+	0xfe, 0xb7, 0x04, 0x06, 0x0c, 0x36, 0x24, 0x00, 
+	0x2e, 0x00, 0xdd, 0x07, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfe, 0xaf, 0x1c, 0x60, 0x04, 0x04, 0x0c, 0x24, 
+	0x42, 0xb4, 0xdb, 0xf7, 0x19, 0xa8, 0xe0, 0x3e, 
+	0x1c, 0x30, 0xf0, 0x00, 0xfb, 0x0f, 0x1c, 0x04, 
+	0x4b, 0x2f, 0x42, 0x98, 0xd1, 0x18, 0x88, 0xb8, 
+	0x88, 0x79, 0x42, 0x88, 0xd1, 0x05, 0xf7, 0xff, 
+	0xfd, 0xd1, 0x23, 0x01, 0x42, 0xd8, 0xd1, 0x00, 
+	0xe0, 0x47, 0x9c, 0x00, 0x00, 0xe1, 0x19, 0x09, 
+	0x00, 0x89, 0x68, 0xf8, 0x18, 0x40, 0x81, 0xc6, 
+	0x88, 0x78, 0x30, 0x01, 0x80, 0x78, 0x98, 0x00, 
+	0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 0x90, 0x00, 
+	0x98, 0x03, 0x00, 0xe2, 0x19, 0x12, 0x00, 0x92, 
+	0x68, 0xf9, 0x18, 0x89, 0x77, 0xc8, 0x20, 0x0c, 
+	0xf7, 0xf3, 0xfe, 0x7e, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x02, 0x26, 0x00, 0x28, 0x00, 0xdd, 0x0c, 
+	0x98, 0x05, 0xa9, 0x01, 0x1c, 0x22, 0xf0, 0x00, 
+	0xfb, 0x45, 0xa8, 0x01, 0x88, 0x00, 0x18, 0x30, 
+	0x04, 0x06, 0x0c, 0x36, 0x98, 0x02, 0x42, 0x86, 
+	0xdb, 0xf2, 0x98, 0x02, 0x18, 0x28, 0x30, 0x05, 
+	0x04, 0x05, 0x0c, 0x2d, 0x98, 0x06, 0x42, 0xa8, 
+	0xdc, 0x98, 0x98, 0x07, 0x99, 0x04, 0xf0, 0x00, 
+	0xfa, 0xe7, 0x28, 0xff, 0xd1, 0x82, 0x78, 0x38, 
+	0x23, 0x10, 0x43, 0x18, 0x70, 0x38, 0x78, 0x38, 
+	0x08, 0x81, 0xd3, 0x05, 0x09, 0x41, 0xd3, 0x03, 
+	0x09, 0x00, 0xd2, 0x01, 0xf0, 0x00, 0xfe, 0xd3, 
+	0x20, 0x10, 0xb0, 0x08, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x91, 0x7c, 
+	0x2e, 0x08, 0x8f, 0x80, 0x2e, 0x08, 0x82, 0x80, 
+	0x00, 0x00, 0xff, 0xff, 0x20, 0x00, 0x47, 0x70, 
+	0xb5, 0xf0, 0x04, 0x09, 0x0c, 0x09, 0x22, 0x00, 
+	0xb0, 0x90, 0x92, 0x0c, 0x92, 0x02, 0x92, 0x01, 
+	0xf7, 0xf3, 0xfe, 0x1a, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfe, 0x33, 0x20, 0x04, 0xf7, 0xf3, 0xfe, 0x30, 
+	0x20, 0x0c, 0xf7, 0xf3, 0xfe, 0x2d, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x0d, 0x20, 0x10, 0xf7, 0xf3, 
+	0xfe, 0x27, 0x04, 0x00, 0x0c, 0x00, 0x90, 0x0a, 
+	0x20, 0x02, 0xf7, 0xf3, 0xfe, 0x21, 0x20, 0x05, 
+	0xf7, 0xf3, 0xfe, 0x1e, 0x06, 0x03, 0x0e, 0x1b, 
+	0x93, 0x05, 0x20, 0x01, 0xf7, 0xf3, 0xfe, 0x18, 
+	0x06, 0x02, 0x0e, 0x12, 0x92, 0x04, 0x20, 0x08, 
+	0xf7, 0xf3, 0xfe, 0x12, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfe, 0x0f, 0x20, 0x03, 0xf7, 0xf3, 0xfe, 0x0c, 
+	0x20, 0x0d, 0xf7, 0xf3, 0xfe, 0x09, 0x04, 0x07, 
+	0x0c, 0x3f, 0x20, 0x04, 0xf7, 0xf3, 0xfe, 0x04, 
+	0x20, 0x0c, 0xf7, 0xf3, 0xfe, 0x01, 0x04, 0x01, 
+	0x0c, 0x09, 0x91, 0x09, 0x98, 0x0a, 0xf0, 0x00, 
+	0xfd, 0x13, 0x1c, 0x04, 0xd1, 0x01, 0x43, 0xe0, 
+	0xe1, 0x27, 0x7f, 0x20, 0x0a, 0x00, 0xd3, 0x01, 
+	0x20, 0x00, 0xe1, 0x22, 0x84, 0x27, 0x25, 0x00, 
+	0x99, 0x09, 0x4e, 0x92, 0x1d, 0xf7, 0x37, 0xf9, 
+	0x29, 0x00, 0xdd, 0x2a, 0x98, 0x0a, 0xf0, 0x00, 
+	0xfa, 0x51, 0x1c, 0x02, 0x1c, 0x30, 0xa9, 0x06, 
+	0xf0, 0x00, 0xfa, 0xb4, 0x28, 0x09, 0xd1, 0x16, 
+	0x98, 0x02, 0x28, 0x00, 0xd1, 0x06, 0x20, 0xff, 
+	0x90, 0x01, 0x20, 0x01, 0x70, 0x38, 0x18, 0x28, 
+	0x04, 0x05, 0x0c, 0x2d, 0x20, 0xff, 0x90, 0x02, 
+	0x19, 0x78, 0xaa, 0x06, 0x88, 0x12, 0x1c, 0x31, 
+	0xf0, 0x10, 0xfd, 0x14, 0xa8, 0x06, 0x88, 0x00, 
+	0x18, 0x28, 0x04, 0x05, 0x0c, 0x2d, 0xa9, 0x06, 
+	0x88, 0x09, 0x98, 0x0c, 0x18, 0x40, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x0c, 0x99, 0x09, 0x42, 0x88, 
+	0xdb, 0xd4, 0x48, 0x7b, 0x90, 0x0f, 0x2d, 0x00, 
+	0xd0, 0x0d, 0x9a, 0x04, 0xb4, 0x04, 0x21, 0x03, 
+	0x98, 0x10, 0x9a, 0x0b, 0x9b, 0x06, 0xf0, 0x00, 
+	0xfd, 0xac, 0xb0, 0x01, 0x98, 0x0f, 0x1c, 0x39, 
+	0x1c, 0x2a, 0xf0, 0x00, 0xfd, 0xc8, 0x20, 0x00, 
+	0x90, 0x0b, 0x98, 0x0d, 0x99, 0x09, 0x1a, 0x40, 
+	0x38, 0x0d, 0x90, 0x0e, 0x28, 0x00, 0xdd, 0x75, 
+	0x20, 0x00, 0x90, 0x00, 0x25, 0x00, 0x20, 0x08, 
+	0xf7, 0xf3, 0xfd, 0x9e, 0x06, 0x00, 0x0e, 0x00, 
+	0x90, 0x03, 0x20, 0x03, 0xf7, 0xf3, 0xfd, 0x98, 
+	0x20, 0x0d, 0xf7, 0xf3, 0xfd, 0x95, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x07, 0x98, 0x03, 0x28, 0x07, 
+	0xd2, 0x12, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x0e, 0x04, 0x04, 0x07, 
+	0x07, 0x0e, 0x0c, 0x00, 0x98, 0x07, 0x82, 0x60, 
+	0xe0, 0x06, 0x99, 0x07, 0x1c, 0x20, 0xf0, 0x00, 
+	0xfd, 0x51, 0xe0, 0x01, 0x20, 0xff, 0x90, 0x00, 
+	0x20, 0x04, 0xf7, 0xf3, 0xfd, 0x79, 0x20, 0x0c, 
+	0xf7, 0xf3, 0xfd, 0x76, 0x04, 0x01, 0x0c, 0x09, 
+	0x91, 0x08, 0x20, 0x00, 0x90, 0x0c, 0x29, 0x00, 
+	0xdd, 0x1c, 0x98, 0x0a, 0xf0, 0x00, 0xf9, 0xd6, 
+	0x1c, 0x02, 0x1c, 0x30, 0xa9, 0x06, 0xf0, 0x00, 
+	0xfa, 0x39, 0x28, 0x09, 0xd0, 0x37, 0x28, 0x0a, 
+	0xd0, 0x44, 0x28, 0x56, 0xd1, 0x04, 0x98, 0x00, 
+	0x28, 0xff, 0xd1, 0x01, 0x98, 0x07, 0x83, 0x60, 
+	0xa9, 0x06, 0x88, 0x09, 0x98, 0x0c, 0x18, 0x40, 
+	0x04, 0x00, 0x0c, 0x00, 0x90, 0x0c, 0x99, 0x08, 
+	0x42, 0x88, 0xdb, 0xe2, 0x98, 0x03, 0x70, 0x38, 
+	0x98, 0x07, 0x12, 0x00, 0x70, 0x78, 0x98, 0x07, 
+	0x70, 0xb8, 0x20, 0x00, 0x70, 0xf8, 0x71, 0x38, 
+	0x20, 0x01, 0x71, 0x78, 0x2d, 0x00, 0xd0, 0x40, 
+	0x98, 0x02, 0x28, 0x00, 0xd1, 0x0a, 0x20, 0xff, 
+	0x90, 0x02, 0x9a, 0x04, 0xb4, 0x04, 0x21, 0x03, 
+	0x98, 0x10, 0x9a, 0x0b, 0x9b, 0x06, 0xf0, 0x00, 
+	0xfd, 0x30, 0xb0, 0x01, 0x1f, 0x68, 0x12, 0x01, 
+	0x70, 0xf9, 0x71, 0x38, 0x98, 0x0f, 0x1c, 0x39, 
+	0x1c, 0x2a, 0xe0, 0x3e, 0xe0, 0x4b, 0x2d, 0x00, 
+	0xd1, 0x00, 0x25, 0x06, 0x19, 0x78, 0xaa, 0x06, 
+	0x88, 0x12, 0x1c, 0x31, 0xf0, 0x10, 0xfc, 0x6a, 
+	0xa8, 0x06, 0x88, 0x00, 0x18, 0x28, 0x04, 0x05, 
+	0x0c, 0x2d, 0xe7, 0xc1, 0x98, 0x03, 0x28, 0x04, 
+	0xd0, 0x02, 0x98, 0x03, 0x28, 0x03, 0xd1, 0xbb, 
+	0x69, 0x60, 0x28, 0x00, 0xd0, 0x09, 0x8b, 0x21, 
+	0x00, 0xc9, 0x18, 0x40, 0x78, 0xb1, 0x38, 0x06, 
+	0x70, 0x81, 0x78, 0x71, 0x70, 0x41, 0x78, 0x31, 
+	0x70, 0x01, 0x22, 0x00, 0x8b, 0x21, 0x00, 0xc9, 
+	0x69, 0x60, 0x18, 0x40, 0x38, 0x20, 0x77, 0x42, 
+	0xe7, 0xa6, 0x98, 0x01, 0x28, 0xff, 0xd1, 0x12, 
+	0x98, 0x02, 0x28, 0x00, 0xd1, 0x0a, 0x20, 0xff, 
+	0x90, 0x02, 0x9a, 0x04, 0xb4, 0x04, 0x21, 0x03, 
+	0x98, 0x10, 0x9a, 0x0b, 0x9b, 0x06, 0xf0, 0x00, 
+	0xfc, 0xec, 0xb0, 0x01, 0x22, 0x05, 0x98, 0x0f, 
+	0x1c, 0x39, 0xf0, 0x00, 0xfd, 0x24, 0x98, 0x0b, 
+	0x99, 0x08, 0x18, 0x40, 0x30, 0x06, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x0b, 0x98, 0x0e, 0x99, 0x0b, 
+	0x42, 0x88, 0xdd, 0x00, 0xe7, 0x3c, 0x7f, 0x20, 
+	0x23, 0x80, 0x43, 0x18, 0x77, 0x20, 0x9a, 0x04, 
+	0x07, 0xd0, 0x0e, 0x80, 0x9b, 0x05, 0x18, 0xc0, 
+	0x77, 0x60, 0x98, 0x02, 0x28, 0xff, 0xd1, 0x03, 
+	0x99, 0x0f, 0x1c, 0x20, 0xf0, 0x00, 0xfd, 0x20, 
+	0x20, 0x01, 0xb0, 0x10, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x83, 0x80, 
+	0x2e, 0x08, 0x85, 0x80, 0xb5, 0xf0, 0x04, 0x09, 
+	0x0c, 0x09, 0x22, 0x00, 0xb0, 0x88, 0x92, 0x05, 
+	0xf7, 0xf3, 0xfc, 0xa2, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfc, 0xbb, 0x20, 0x04, 0xf7, 0xf3, 0xfc, 0xb8, 
+	0x20, 0x0c, 0xf7, 0xf3, 0xfc, 0xb5, 0x04, 0x05, 
+	0x0c, 0x2d, 0x20, 0x10, 0xf7, 0xf3, 0xfc, 0xb0, 
+	0x04, 0x07, 0x0c, 0x3f, 0x20, 0x02, 0xf7, 0xf3, 
+	0xfc, 0xab, 0x20, 0x05, 0xf7, 0xf3, 0xfc, 0xa8, 
+	0x20, 0x01, 0xf7, 0xf3, 0xfc, 0xa5, 0x06, 0x04, 
+	0x0e, 0x24, 0x20, 0x08, 0xf7, 0xf3, 0xfc, 0xa0, 
+	0x06, 0x06, 0x0e, 0x36, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfc, 0x9b, 0x20, 0x10, 0xf7, 0xf3, 0xfc, 0x98, 
+	0x20, 0x10, 0xf7, 0xf3, 0xfc, 0x95, 0x20, 0x08, 
+	0xf7, 0xf3, 0xfc, 0x92, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfc, 0x8f, 0x2c, 0x00, 0xd0, 0x65, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0xf4, 0x90, 0x03, 0x4b, 0x44, 
+	0x42, 0x98, 0xd0, 0x5e, 0x48, 0x43, 0x89, 0x41, 
+	0x42, 0xb9, 0xd1, 0x5b, 0x68, 0xc0, 0x9a, 0x03, 
+	0x00, 0xd1, 0x18, 0x89, 0x00, 0x89, 0x18, 0x40, 
+	0x7f, 0x80, 0x4c, 0x3f, 0x1d, 0xe7, 0x37, 0x39, 
+	0x28, 0x04, 0xd0, 0x0b, 0x28, 0x05, 0xd0, 0x09, 
+	0x2e, 0x00, 0xd1, 0x01, 0x20, 0x00, 0xe0, 0x04, 
+	0x2e, 0x01, 0xd1, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x02, 0x72, 0xb8, 0x2d, 0x0f, 0xdd, 0x61, 
+	0x1f, 0xe8, 0x38, 0x08, 0x90, 0x07, 0x28, 0x00, 
+	0xdd, 0x5c, 0x48, 0x34, 0x90, 0x06, 0x20, 0x10, 
+	0xf7, 0xf3, 0xfc, 0x5e, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x04, 0x20, 0x10, 0xf7, 0xf3, 0xfc, 0x58, 
+	0x20, 0x18, 0xf7, 0xf3, 0xfc, 0x55, 0x90, 0x01, 
+	0x20, 0x18, 0xf7, 0xf3, 0xfc, 0x51, 0x90, 0x00, 
+	0x20, 0x03, 0xf7, 0xf3, 0xfc, 0x4d, 0x20, 0x01, 
+	0xf7, 0xf3, 0xfc, 0x4a, 0x20, 0x0c, 0xf7, 0xf3, 
+	0xfc, 0x47, 0x04, 0x05, 0x0c, 0x2d, 0x98, 0x05, 
+	0x19, 0x40, 0x30, 0x0c, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x05, 0x7a, 0xb8, 0x00, 0xc1, 0x1a, 0x09, 
+	0x00, 0x89, 0x19, 0x09, 0x69, 0x8a, 0x9b, 0x04, 
+	0x42, 0x9a, 0xd0, 0x2b, 0x26, 0x00, 0x28, 0x00, 
+	0xd0, 0x01, 0x28, 0x01, 0xd1, 0x0b, 0x98, 0x01, 
+	0x60, 0xc8, 0x7a, 0xb9, 0x00, 0xcb, 0x1a, 0x59, 
+	0x00, 0x89, 0x19, 0x09, 0x98, 0x00, 0x61, 0x08, 
+	0xe0, 0x05, 0xe0, 0x1f, 0xe0, 0x1e, 0x98, 0x01, 
+	0x63, 0xe0, 0x98, 0x00, 0x64, 0x20, 0x2d, 0x00, 
+	0xdd, 0x14, 0x98, 0x06, 0x9a, 0x03, 0xa9, 0x02, 
+	0xf0, 0x00, 0xf8, 0xec, 0x28, 0x4d, 0xd1, 0x06, 
+	0x7a, 0xb9, 0x00, 0xcb, 0x1a, 0x59, 0x00, 0x89, 
+	0x19, 0x09, 0x98, 0x04, 0x61, 0x48, 0xa8, 0x02, 
+	0x88, 0x00, 0x18, 0x30, 0x04, 0x06, 0x0c, 0x36, 
+	0x42, 0xae, 0xdb, 0xea, 0x98, 0x07, 0x99, 0x05, 
+	0x42, 0x88, 0xdc, 0xa4, 0x20, 0x00, 0xb0, 0x08, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x8f, 0x80, 
+	0x2e, 0x08, 0x90, 0x30, 0x2e, 0x08, 0x89, 0x98, 
+	0xb5, 0x80, 0x04, 0x09, 0x0c, 0x09, 0xf7, 0xf3, 
+	0xfb, 0xd7, 0x20, 0x08, 0xf7, 0xf3, 0xfb, 0xf0, 
+	0x20, 0x04, 0xf7, 0xf3, 0xfb, 0xed, 0x20, 0x0c, 
+	0xf7, 0xf3, 0xfb, 0xea, 0x20, 0x10, 0xf7, 0xf3, 
+	0xfb, 0xe7, 0x4f, 0x07, 0x60, 0xf8, 0x20, 0x18, 
+	0xf7, 0xf3, 0xfb, 0xe2, 0x60, 0xb8, 0x48, 0x05, 
+	0x78, 0x01, 0x23, 0x20, 0x43, 0x19, 0x70, 0x01, 
+	0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1a, 0xcc, 0x2e, 0x08, 0x8f, 0x80, 
+	0xb5, 0xb0, 0x04, 0x09, 0x0c, 0x09, 0xb0, 0x81, 
+	0xf7, 0xf3, 0xfb, 0xb2, 0x20, 0x08, 0xf7, 0xf3, 
+	0xfb, 0xcb, 0x20, 0x04, 0xf7, 0xf3, 0xfb, 0xc8, 
+	0x20, 0x0c, 0xf7, 0xf3, 0xfb, 0xc5, 0x20, 0x10, 
+	0xf7, 0xf3, 0xfb, 0xc2, 0x04, 0x00, 0x0c, 0x00, 
+	0x4f, 0x11, 0x60, 0xf8, 0x20, 0x18, 0xf7, 0xf3, 
+	0xfb, 0xbb, 0x60, 0xb8, 0x20, 0x04, 0xf7, 0xf3, 
+	0xfb, 0xb7, 0x20, 0x0c, 0xf7, 0xf3, 0xfb, 0xb4, 
+	0x04, 0x04, 0x0c, 0x24, 0x27, 0x00, 0x2c, 0x00, 
+	0xdd, 0x0c, 0x4d, 0x0a, 0x46, 0x69, 0x1c, 0x28, 
+	0x4a, 0x09, 0xf0, 0x00, 0xf8, 0x7b, 0xa8, 0x00, 
+	0x88, 0x00, 0x18, 0x38, 0x04, 0x07, 0x0c, 0x3f, 
+	0x42, 0xa7, 0xdb, 0xf3, 0x20, 0x00, 0xb0, 0x01, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1a, 0xcc, 0x2e, 0x08, 0x8a, 0x98, 
+	0x00, 0x00, 0xff, 0xff, 0xb4, 0x80, 0x04, 0x02, 
+	0x0c, 0x12, 0x20, 0x00, 0x49, 0x0a, 0x88, 0x49, 
+	0x29, 0x00, 0xdd, 0x0d, 0x4b, 0x08, 0x68, 0xdf, 
+	0x00, 0xc3, 0x18, 0x1b, 0x00, 0x9b, 0x18, 0xfb, 
+	0x89, 0xdb, 0x42, 0x93, 0xd0, 0x05, 0x30, 0x01, 
+	0x04, 0x00, 0x0c, 0x00, 0x42, 0x81, 0xdc, 0xf3, 
+	0x48, 0x02, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x8f, 0x80, 0x00, 0x00, 0xff, 0xff, 
+	0xb4, 0x80, 0x06, 0x0a, 0x0e, 0x12, 0x21, 0x00, 
+	0x32, 0x01, 0x2a, 0x00, 0xdd, 0x0a, 0x5c, 0x47, 
+	0x0a, 0x3b, 0xd2, 0x02, 0x20, 0x00, 0xbc, 0x80, 
+	0x47, 0x70, 0x31, 0x01, 0x06, 0x09, 0x0e, 0x09, 
+	0x42, 0x8a, 0xdc, 0xf4, 0x20, 0xff, 0xbc, 0x80, 
+	0x47, 0x70, 0xb4, 0x90, 0x04, 0x02, 0x0c, 0x12, 
+	0x04, 0x0f, 0x0c, 0x3f, 0x42, 0xba, 0xda, 0x29, 
+	0x20, 0x00, 0x49, 0x15, 0x00, 0xd3, 0x18, 0x9b, 
+	0x00, 0x9b, 0x68, 0xcc, 0x18, 0xe4, 0x81, 0xe0, 
+	0x68, 0xcc, 0x18, 0xe4, 0x77, 0x20, 0x68, 0xcc, 
+	0x18, 0xe4, 0x60, 0x60, 0x68, 0xcc, 0x50, 0xe0, 
+	0x68, 0xcc, 0x18, 0xe4, 0x82, 0x20, 0x68, 0xcc, 
+	0x18, 0xe4, 0x60, 0xa0, 0x68, 0xcc, 0x18, 0xe4, 
+	0x81, 0xa0, 0x68, 0xcc, 0x18, 0xe4, 0x61, 0x60, 
+	0x68, 0xcc, 0x18, 0xe4, 0x83, 0x20, 0x68, 0xcc, 
+	0x18, 0xe4, 0x83, 0x60, 0x68, 0xcc, 0x18, 0xe3, 
+	0x82, 0x58, 0x32, 0x01, 0x04, 0x12, 0x0c, 0x12, 
+	0x42, 0xba, 0xdb, 0xd7, 0xbc, 0x90, 0x47, 0x70, 
+	0x2e, 0x08, 0x8f, 0x80, 0xb5, 0xf0, 0x04, 0x15, 
+	0x0c, 0x2d, 0x1c, 0x07, 0x20, 0x08, 0x1c, 0x0c, 
+	0xf7, 0xf3, 0xfb, 0x26, 0x06, 0x06, 0x0e, 0x36, 
+	0x20, 0x08, 0xf7, 0xf3, 0xfb, 0x21, 0x06, 0x01, 
+	0x0e, 0x09, 0x1c, 0x88, 0x80, 0x20, 0x2e, 0x48, 
+	0xd0, 0x42, 0xdc, 0x0c, 0x1e, 0xb0, 0x28, 0x09, 
+	0xd2, 0x61, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x25, 0x2c, 0x5e, 0x5e, 
+	0x5e, 0x5e, 0x33, 0x1e, 0x4f, 0x00, 0x2e, 0x56, 
+	0xd0, 0x4e, 0xdc, 0x0a, 0x2e, 0x4d, 0xd0, 0x36, 
+	0x2e, 0x4e, 0xd1, 0x51, 0x1c, 0x38, 0x1c, 0x2a, 
+	0xf0, 0x00, 0xfd, 0x4c, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x2e, 0x58, 0xd0, 0x32, 0x2e, 0x5d, 
+	0xd1, 0x46, 0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 
+	0xfc, 0x11, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 0xfb, 0xbc, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x38, 
+	0x1c, 0x2a, 0xf0, 0x00, 0xfb, 0xcd, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x38, 0x1c, 0x2a, 
+	0xf0, 0x00, 0xfb, 0xd8, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 
+	0xfb, 0xe3, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 0xfc, 0x00, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x38, 
+	0x1c, 0x2a, 0xf0, 0x00, 0xfc, 0x71, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x1c, 0x38, 0x1c, 0x2a, 
+	0xf0, 0x00, 0xfd, 0x6c, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 
+	0xfd, 0x97, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 0xfd, 0xb4, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xe7, 0xff, 
+	0x1c, 0x38, 0x1c, 0x2a, 0xf0, 0x00, 0xfd, 0xbe, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
+	0x22, 0x01, 0x20, 0x00, 0xb0, 0x88, 0x4f, 0x35, 
+	0x88, 0x79, 0x25, 0x00, 0x29, 0x00, 0xdd, 0x35, 
+	0x00, 0xc4, 0x18, 0x24, 0x00, 0xa4, 0x68, 0xf9, 
+	0x19, 0x09, 0x7f, 0x0e, 0x0a, 0x33, 0xd2, 0x1d, 
+	0x09, 0xf3, 0xd2, 0x1b, 0x8a, 0x0b, 0x2b, 0x00, 
+	0xd0, 0x18, 0x00, 0xc3, 0x18, 0x18, 0x00, 0x80, 
+	0x68, 0xfa, 0x18, 0x10, 0x8a, 0x02, 0x89, 0xc9, 
+	0x4b, 0x29, 0x20, 0x02, 0xf0, 0x00, 0xf8, 0x52, 
+	0x21, 0x00, 0x43, 0xc9, 0x42, 0x88, 0xd1, 0x01, 
+	0x1c, 0x08, 0xe0, 0x42, 0x68, 0xf8, 0x19, 0x00, 
+	0x7f, 0x01, 0x23, 0x40, 0x43, 0x19, 0x77, 0x01, 
+	0x1c, 0x28, 0xe0, 0x3a, 0x8a, 0x0b, 0x2b, 0x00, 
+	0xd1, 0x02, 0x23, 0xa0, 0x43, 0x33, 0x77, 0x0b, 
+	0x68, 0xf9, 0x19, 0x09, 0x7f, 0x09, 0x0a, 0x09, 
+	0xd2, 0x00, 0x22, 0x00, 0x88, 0x79, 0x30, 0x01, 
+	0x42, 0x81, 0xdc, 0xc9, 0x2a, 0x00, 0xd1, 0x01, 
+	0x20, 0x02, 0xe0, 0x26, 0x78, 0x38, 0x08, 0x81, 
+	0xd2, 0x22, 0x23, 0x02, 0x43, 0x18, 0x70, 0x38, 
+	0x78, 0x38, 0x09, 0x00, 0xd3, 0x02, 0x89, 0x78, 
+	0xf7, 0xfe, 0xfd, 0x1d, 0x20, 0x0c, 0xab, 0x00, 
+	0x70, 0x18, 0x88, 0x78, 0x0a, 0x01, 0x70, 0x59, 
+	0x70, 0x98, 0x46, 0x68, 0x21, 0x20, 0xf7, 0xfd, 
+	0xf9, 0xa7, 0x78, 0x38, 0x08, 0x81, 0xd3, 0x05, 
+	0x09, 0x41, 0xd3, 0x03, 0x09, 0x00, 0xd2, 0x01, 
+	0xf0, 0x00, 0xfa, 0xcd, 0x22, 0x14, 0x21, 0x00, 
+	0x20, 0x70, 0x1c, 0x2b, 0xf0, 0x00, 0xf8, 0x0a, 
+	0x20, 0x01, 0xb0, 0x08, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x80, 
+	0x00, 0x00, 0x13, 0x88, 0xb5, 0xf0, 0x06, 0x04, 
+	0x0e, 0x24, 0x04, 0x08, 0x0c, 0x00, 0xb0, 0x83, 
+	0x90, 0x00, 0x04, 0x10, 0x0c, 0x00, 0x90, 0x01, 
+	0x04, 0x1e, 0x0c, 0x36, 0xb0, 0x89, 0x98, 0x0a, 
+	0xf0, 0x00, 0xf9, 0x28, 0x90, 0x00, 0x23, 0x01, 
+	0x42, 0xd8, 0xd1, 0x00, 0xe0, 0x55, 0x98, 0x00, 
+	0x01, 0x01, 0x91, 0x0b, 0x4f, 0x2b, 0x19, 0xc8, 
+	0x70, 0x44, 0x9a, 0x09, 0x80, 0x42, 0x5c, 0x7a, 
+	0x23, 0x01, 0x43, 0x1a, 0x54, 0x7a, 0x99, 0x0a, 
+	0x80, 0xc1, 0x1c, 0x05, 0x60, 0x86, 0x20, 0x00, 
+	0x21, 0x00, 0x00, 0x42, 0xab, 0x01, 0x52, 0x99, 
+	0x30, 0x01, 0x04, 0x00, 0x14, 0x00, 0x28, 0x10, 
+	0xdb, 0xf6, 0x02, 0x20, 0x23, 0xff, 0x43, 0x18, 
+	0xab, 0x01, 0x80, 0x18, 0x2c, 0x02, 0xd0, 0x01, 
+	0x2c, 0x4e, 0xd1, 0x10, 0x20, 0xff, 0x02, 0x00, 
+	0x9a, 0x09, 0x40, 0x10, 0x23, 0xff, 0x43, 0x18, 
+	0xab, 0x01, 0x80, 0x58, 0x9a, 0x09, 0x02, 0x10, 
+	0x23, 0xff, 0x02, 0x1b, 0x40, 0x18, 0x23, 0xff, 
+	0x43, 0x18, 0xab, 0x02, 0x80, 0x18, 0x21, 0x04, 
+	0x98, 0x0a, 0xaa, 0x01, 0xf7, 0xf7, 0xfe, 0x98, 
+	0x04, 0x01, 0x0c, 0x09, 0x81, 0xa9, 0x20, 0x00, 
+	0x43, 0xc0, 0x42, 0x81, 0xd1, 0x07, 0x21, 0x00, 
+	0x9a, 0x0b, 0x54, 0xb9, 0x21, 0xff, 0x70, 0x69, 
+	0x0c, 0x01, 0x81, 0xa9, 0xe0, 0x0d, 0x99, 0x0b, 
+	0x5c, 0x78, 0x23, 0x02, 0x43, 0x18, 0x54, 0x78, 
+	0x2e, 0x00, 0xd0, 0x05, 0x22, 0x02, 0x99, 0x00, 
+	0x1c, 0x30, 0xf7, 0xfe, 0xfb, 0xe0, 0x80, 0xa8, 
+	0x20, 0x00, 0xb0, 0x0c, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x90, 
+	0xb5, 0xf0, 0x04, 0x00, 0x14, 0x00, 0x01, 0x05, 
+	0x4c, 0x10, 0x5d, 0x60, 0x26, 0x00, 0x28, 0x00, 
+	0xd1, 0x03, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x19, 0x2f, 0x89, 0xb8, 0xf7, 0xf7, 
+	0xff, 0xe3, 0x22, 0x00, 0x43, 0xd2, 0x21, 0xff, 
+	0x42, 0x90, 0xd1, 0x07, 0x55, 0x66, 0x70, 0x79, 
+	0x0c, 0x00, 0x81, 0xb8, 0x1c, 0x10, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x55, 0x66, 0x70, 0x79, 
+	0x1c, 0x30, 0x49, 0x03, 0x81, 0xb9, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x8f, 0x90, 
+	0x00, 0x00, 0xff, 0xff, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x00, 0x47, 0x70, 0xb5, 0xb0, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x1c, 0x07, 0xb0, 0x84, 0xf0, 0x00, 
+	0xf8, 0x2d, 0x23, 0x01, 0x42, 0xd8, 0xd1, 0x01, 
+	0x20, 0x01, 0xe0, 0x15, 0x1c, 0x28, 0xf7, 0xfd, 
+	0xf9, 0xb1, 0x1c, 0x04, 0xd0, 0x0f, 0x1c, 0x20, 
+	0x1c, 0x39, 0x1c, 0x2a, 0xf0, 0x10, 0xf8, 0xca, 
+	0x20, 0x06, 0xab, 0x00, 0x80, 0x18, 0x70, 0x9d, 
+	0x94, 0x01, 0x46, 0x69, 0x20, 0x85, 0xf7, 0xfd, 
+	0xf8, 0xeb, 0x20, 0x00, 0xe0, 0x00, 0x20, 0x02, 
+	0xb0, 0x04, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x06, 0x00, 0x0e, 0x00, 0x28, 0x0a, 0xdd, 0x01, 
+	0x20, 0xff, 0x47, 0x70, 0x01, 0x00, 0x49, 0x02, 
+	0x18, 0x40, 0x78, 0x40, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x8f, 0x90, 0xb4, 0x90, 0x21, 0x00, 
+	0x4b, 0x13, 0x01, 0x0a, 0x5c, 0x9f, 0x2f, 0x00, 
+	0xd0, 0x18, 0x18, 0xd7, 0x78, 0x7c, 0x78, 0x02, 
+	0x42, 0x94, 0xd1, 0x13, 0x2a, 0x00, 0xd0, 0x0e, 
+	0x2a, 0x42, 0xd0, 0x0c, 0x2a, 0x70, 0xd0, 0x0a, 
+	0x2a, 0x73, 0xd0, 0x08, 0x79, 0x02, 0x78, 0xc4, 
+	0x02, 0x24, 0x19, 0x12, 0x04, 0x12, 0x0c, 0x12, 
+	0x88, 0x7f, 0x42, 0x97, 0xd1, 0x02, 0x1c, 0x08, 
+	0xbc, 0x90, 0x47, 0x70, 0x31, 0x01, 0x04, 0x09, 
+	0x14, 0x09, 0x29, 0x0a, 0xd1, 0xdd, 0x20, 0x00, 
+	0x43, 0xc0, 0xbc, 0x90, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x8f, 0x90, 0xb4, 0xb0, 0x06, 0x03, 
+	0x0e, 0x1b, 0x04, 0x0f, 0x0c, 0x3f, 0x06, 0x14, 
+	0x0e, 0x24, 0x20, 0x00, 0x4a, 0x09, 0x01, 0x01, 
+	0x18, 0x89, 0x78, 0x4d, 0x42, 0x9d, 0xd1, 0x04, 
+	0x2c, 0x00, 0xd0, 0x09, 0x88, 0x49, 0x42, 0xb9, 
+	0xd0, 0x06, 0x30, 0x01, 0x04, 0x00, 0x14, 0x00, 
+	0x28, 0x0a, 0xd1, 0xf0, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0xb0, 0x47, 0x70, 0x2e, 0x08, 0x8f, 0x90, 
+	0xb4, 0x80, 0x04, 0x02, 0x0c, 0x12, 0x20, 0x00, 
+	0x49, 0x09, 0x01, 0x03, 0x5c, 0xcf, 0x2f, 0x00, 
+	0xd0, 0x06, 0x18, 0x5b, 0x89, 0x9b, 0x42, 0x93, 
+	0xd1, 0x02, 0x20, 0xff, 0xbc, 0x80, 0x47, 0x70, 
+	0x30, 0x01, 0x04, 0x00, 0x0c, 0x00, 0x28, 0x0a, 
+	0xdb, 0xef, 0x20, 0x00, 0xbc, 0x80, 0x47, 0x70, 
+	0x2e, 0x08, 0x8f, 0x90, 0x48, 0x0a, 0x21, 0x00, 
+	0x4a, 0x0a, 0x01, 0x0b, 0x5c, 0xd3, 0x2b, 0x00, 
+	0xd1, 0x00, 0x1c, 0x08, 0x31, 0x01, 0x04, 0x09, 
+	0x0c, 0x09, 0x29, 0x0a, 0xdb, 0xf5, 0x4b, 0x04, 
+	0x42, 0x98, 0xd0, 0x02, 0x04, 0x00, 0x14, 0x00, 
+	0x47, 0x70, 0x20, 0x00, 0x43, 0xc0, 0x47, 0x70, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x8f, 0x90, 
+	0xb4, 0x80, 0x04, 0x07, 0x0c, 0x3f, 0x20, 0x00, 
+	0x49, 0x0b, 0x88, 0x4a, 0x2a, 0x00, 0xdd, 0x10, 
+	0x68, 0xc9, 0x00, 0xc3, 0x18, 0x1b, 0x00, 0x9b, 
+	0x18, 0xcb, 0x89, 0xdb, 0x42, 0xbb, 0xd1, 0x05, 
+	0x00, 0xc3, 0x18, 0x18, 0x00, 0x80, 0x18, 0x08, 
+	0xbc, 0x80, 0x47, 0x70, 0x30, 0x01, 0x42, 0x82, 
+	0xdc, 0xef, 0x20, 0x00, 0xbc, 0x80, 0x47, 0x70, 
+	0x2e, 0x08, 0x8f, 0x80, 0xb5, 0x90, 0x06, 0x03, 
+	0x0e, 0x1b, 0x06, 0x0c, 0x0e, 0x24, 0x06, 0x00, 
+	0x0e, 0x00, 0x01, 0x02, 0x48, 0x16, 0x18, 0x11, 
+	0x27, 0x00, 0x2c, 0x0a, 0xd0, 0x0c, 0x2c, 0x0b, 
+	0xd1, 0x06, 0x2b, 0x0a, 0xda, 0x04, 0x54, 0x87, 
+	0x20, 0xff, 0x70, 0x48, 0x48, 0x11, 0x81, 0x88, 
+	0x1c, 0x38, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2b, 0x0a, 0xda, 0xf9, 0x5c, 0x84, 0x23, 0x02, 
+	0x43, 0x23, 0x54, 0x83, 0x78, 0x48, 0x28, 0x00, 
+	0xd0, 0x0b, 0x28, 0x02, 0xd1, 0xf0, 0x88, 0x48, 
+	0xf7, 0xff, 0xff, 0xba, 0x28, 0x00, 0xd0, 0xeb, 
+	0x7f, 0x01, 0x23, 0x10, 0x43, 0x19, 0x77, 0x01, 
+	0xe7, 0xe6, 0x48, 0x05, 0x78, 0x01, 0x23, 0x40, 
+	0x43, 0x19, 0x70, 0x01, 0xe7, 0xe0, 0x00, 0x00, 
+	0x2e, 0x08, 0x8f, 0x90, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x8f, 0x80, 0xb5, 0x90, 0x04, 0x07, 
+	0x14, 0x3f, 0x2f, 0x0a, 0xda, 0x25, 0x2f, 0x00, 
+	0xdb, 0x23, 0x01, 0x38, 0x49, 0x17, 0x18, 0x44, 
+	0x78, 0x60, 0x28, 0x02, 0xd1, 0x0d, 0x88, 0x60, 
+	0xf7, 0xff, 0xff, 0x96, 0x28, 0x00, 0xd0, 0x08, 
+	0x7f, 0x01, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x19, 
+	0x77, 0x01, 0x7f, 0x01, 0x23, 0xa0, 0x43, 0x19, 
+	0x77, 0x01, 0x78, 0x60, 0x28, 0x42, 0xd1, 0x09, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfe, 0xa5, 0x4b, 0x0c, 
+	0x22, 0x11, 0x21, 0x00, 0x20, 0x42, 0xf7, 0xff, 
+	0xfe, 0x2d, 0xe0, 0x02, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfe, 0x9b, 0xf7, 0xff, 0xfd, 0xb4, 0x28, 0x00, 
+	0xd1, 0x03, 0xf7, 0xff, 0xfd, 0xb0, 0x28, 0x00, 
+	0xd0, 0xfb, 0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x8f, 0x90, 
+	0x00, 0x00, 0x27, 0x10, 0xb5, 0xb0, 0x04, 0x05, 
+	0x0c, 0x2d, 0x24, 0x00, 0x27, 0x00, 0x48, 0x0e, 
+	0x21, 0x07, 0xf7, 0xfe, 0xff, 0x4b, 0x1c, 0x28, 
+	0xf7, 0xff, 0xff, 0x5e, 0x28, 0x00, 0xd0, 0x0e, 
+	0x8a, 0x41, 0x29, 0x00, 0xd0, 0x00, 0x1c, 0x0f, 
+	0x69, 0x40, 0x28, 0x00, 0xd0, 0x03, 0x88, 0x00, 
+	0x42, 0x88, 0xd0, 0x00, 0x1c, 0x04, 0x42, 0xbc, 
+	0xd0, 0x01, 0xf7, 0xf2, 0xf9, 0x27, 0x20, 0x00, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x90, 0x30, 0xb5, 0x90, 0x04, 0x0c, 
+	0x0c, 0x24, 0x1c, 0x07, 0x69, 0x40, 0x28, 0x00, 
+	0xd0, 0x06, 0x8b, 0x39, 0x1c, 0x4a, 0x00, 0xd2, 
+	0x00, 0xc9, 0xf7, 0xfd, 0xf8, 0x4c, 0xe0, 0x02, 
+	0x20, 0x08, 0xf7, 0xfd, 0xf8, 0x43, 0x61, 0x78, 
+	0x69, 0x78, 0x28, 0x00, 0xd0, 0x0e, 0x8b, 0x39, 
+	0x31, 0x01, 0x83, 0x39, 0x8b, 0x39, 0x00, 0xc9, 
+	0x18, 0x40, 0x38, 0x40, 0x87, 0x04, 0x21, 0x00, 
+	0x8b, 0x3a, 0x00, 0xd2, 0x69, 0x78, 0x18, 0x80, 
+	0x38, 0x20, 0x76, 0x81, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0xb4, 0xb0, 0x06, 0x09, 0x0e, 0x09, 
+	0x04, 0x12, 0x0c, 0x12, 0x06, 0x1b, 0x0e, 0x1b, 
+	0x9f, 0x03, 0x06, 0x3c, 0x0e, 0x24, 0x27, 0x9f, 
+	0x70, 0x07, 0x27, 0x80, 0x70, 0x47, 0x27, 0x32, 
+	0x70, 0x87, 0x27, 0x82, 0x70, 0xc7, 0x27, 0x00, 
+	0x71, 0x07, 0x25, 0x06, 0x71, 0x45, 0x71, 0x81, 
+	0x0a, 0x11, 0x71, 0xc1, 0x72, 0x02, 0x08, 0x59, 
+	0x43, 0x21, 0x72, 0x41, 0x72, 0x87, 0x72, 0xc7, 
+	0x1c, 0x38, 0xbc, 0xb0, 0x47, 0x70, 0xb5, 0xb0, 
+	0x04, 0x14, 0x0c, 0x24, 0x1c, 0x07, 0x79, 0x00, 
+	0x02, 0x00, 0x79, 0x7a, 0x43, 0x10, 0x04, 0x05, 
+	0x0c, 0x2d, 0x1d, 0xf8, 0x30, 0x05, 0x1c, 0x22, 
+	0xf0, 0x0f, 0xff, 0x1c, 0x19, 0x28, 0x04, 0x00, 
+	0x0c, 0x00, 0x12, 0x01, 0x71, 0x39, 0x71, 0x78, 
+	0x0a, 0x20, 0x72, 0xb8, 0x72, 0xfc, 0x20, 0x00, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xb0, 
+	0x04, 0x15, 0x0c, 0x2d, 0x1c, 0x07, 0x79, 0x00, 
+	0x02, 0x00, 0x79, 0x7a, 0x43, 0x10, 0x04, 0x04, 
+	0x0c, 0x24, 0x19, 0x38, 0x30, 0x06, 0x1c, 0x2a, 
+	0xf0, 0x0f, 0xff, 0x00, 0x19, 0x60, 0x04, 0x00, 
+	0x0c, 0x00, 0x12, 0x01, 0x71, 0x39, 0x71, 0x78, 
+	0x20, 0x00, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf3, 0x79, 0x08, 0x02, 0x00, 0x1c, 0x0f, 
+	0x79, 0x49, 0x43, 0x08, 0x04, 0x00, 0x0c, 0x00, 
+	0x25, 0x9f, 0x23, 0x80, 0x22, 0x32, 0x28, 0x80, 
+	0xda, 0x04, 0x24, 0x04, 0x70, 0xbd, 0x70, 0xfb, 
+	0x71, 0x3a, 0xe0, 0x07, 0x28, 0xff, 0xda, 0x07, 
+	0x24, 0x05, 0x70, 0x7d, 0x70, 0xbb, 0x70, 0xfa, 
+	0x21, 0x81, 0x71, 0x39, 0x71, 0x78, 0xe0, 0x00, 
+	0x24, 0x06, 0x19, 0x00, 0x1c, 0x06, 0xf7, 0xfc, 
+	0xff, 0xb5, 0x1c, 0x05, 0xd0, 0x0a, 0x20, 0x06, 
+	0x1b, 0x00, 0x19, 0xc1, 0x1c, 0x28, 0x1c, 0x32, 
+	0xf0, 0x0f, 0xfe, 0xcc, 0x98, 0x00, 0x60, 0x85, 
+	0x98, 0x00, 0x81, 0x86, 0x20, 0x00, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x47, 0x70, 
+	0xb5, 0xf0, 0x06, 0x12, 0x0e, 0x12, 0xb0, 0x81, 
+	0x92, 0x00, 0x25, 0x00, 0x1c, 0x04, 0x1c, 0x0f, 
+	0x28, 0x00, 0xd0, 0x01, 0x2f, 0x00, 0xd1, 0x01, 
+	0x20, 0x00, 0xe0, 0x34, 0x26, 0x00, 0x1c, 0x20, 
+	0xf0, 0x0f, 0xff, 0x20, 0x28, 0x00, 0xd9, 0x2a, 
+	0x5d, 0xa0, 0x28, 0x80, 0xdb, 0x03, 0x28, 0x9f, 
+	0xdc, 0x01, 0x21, 0x00, 0xe0, 0x00, 0x21, 0xff, 
+	0x9a, 0x00, 0x2a, 0x00, 0xd0, 0x0f, 0x28, 0x87, 
+	0xd1, 0x01, 0x22, 0xff, 0xe0, 0x00, 0x22, 0x00, 
+	0x2a, 0x00, 0xd0, 0x10, 0x29, 0x00, 0xd0, 0x0e, 
+	0x1c, 0x69, 0x04, 0x0a, 0x0c, 0x12, 0x1c, 0x29, 
+	0x54, 0x78, 0x1c, 0x15, 0xe0, 0x07, 0x29, 0x00, 
+	0xd0, 0x05, 0x1c, 0x69, 0x04, 0x09, 0x0c, 0x09, 
+	0x1c, 0x2a, 0x54, 0xb8, 0x1c, 0x0d, 0x1c, 0x70, 
+	0x04, 0x06, 0x0c, 0x36, 0x1c, 0x20, 0xf0, 0x0f, 
+	0xfe, 0xf5, 0x42, 0xb0, 0xd8, 0xd4, 0x20, 0x00, 
+	0x55, 0x78, 0x04, 0x28, 0x14, 0x00, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0xb5, 0xf0, 0x04, 0x0d, 0x0c, 0x2d, 0x26, 0x09, 
+	0x70, 0x06, 0x1c, 0x07, 0x70, 0x7d, 0x24, 0x00, 
+	0x2d, 0x00, 0xdd, 0x09, 0x20, 0x08, 0xf7, 0xf2, 
+	0xff, 0x27, 0x19, 0x39, 0x70, 0x88, 0x1c, 0x60, 
+	0x06, 0x04, 0x0e, 0x24, 0x42, 0xac, 0xdb, 0xf5, 
+	0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x90, 0x04, 0x0c, 0x0c, 0x24, 0x27, 0x00, 
+	0x2c, 0x00, 0xdd, 0x07, 0x20, 0x08, 0xf7, 0xf2, 
+	0xff, 0x13, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
+	0x42, 0xa7, 0xdb, 0xf7, 0x20, 0x02, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x04, 0x0c, 
+	0x0c, 0x24, 0x27, 0x00, 0x2c, 0x00, 0xdd, 0x07, 
+	0x20, 0x08, 0xf7, 0xf2, 0xff, 0x01, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0x42, 0xa7, 0xdb, 0xf7, 
+	0x20, 0x03, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x90, 0x04, 0x0c, 0x0c, 0x24, 0x27, 0x00, 
+	0x2c, 0x00, 0xdd, 0x07, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfe, 0xef, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
+	0x42, 0xa7, 0xdb, 0xf7, 0x20, 0x08, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x04, 0x0c, 
+	0x0c, 0x24, 0x27, 0x00, 0x2c, 0x00, 0xdd, 0x07, 
+	0x20, 0x08, 0xf7, 0xf2, 0xfe, 0xdd, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0x42, 0xa7, 0xdb, 0xf7, 
+	0x20, 0x5d, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf0, 0x04, 0x14, 0x0c, 0x24, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfe, 0xce, 0x4f, 0x37, 0x00, 0xe3, 
+	0x19, 0x1c, 0x00, 0xa4, 0x68, 0xf9, 0x19, 0x09, 
+	0x77, 0x88, 0x20, 0x08, 0x1c, 0x26, 0xf7, 0xf2, 
+	0xfe, 0xc3, 0x06, 0x05, 0x0e, 0x2d, 0x68, 0xf8, 
+	0x19, 0x80, 0x68, 0x40, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xfc, 0xff, 0x06, 0x1c, 0x68, 0xf7, 0xfc, 
+	0xfe, 0xdd, 0x68, 0xf9, 0x19, 0x09, 0x60, 0x48, 
+	0x28, 0x00, 0xd1, 0x0b, 0x26, 0x00, 0x2d, 0x00, 
+	0xdd, 0x1c, 0x20, 0x08, 0xf7, 0xf2, 0xfe, 0xac, 
+	0x1c, 0x70, 0x06, 0x06, 0x0e, 0x36, 0x42, 0xae, 
+	0xdb, 0xf7, 0xe0, 0x13, 0x26, 0x00, 0x2d, 0x00, 
+	0xdd, 0x0b, 0x20, 0x08, 0xf7, 0xf2, 0xfe, 0xa0, 
+	0x68, 0xf9, 0x19, 0x09, 0x68, 0x49, 0x55, 0x88, 
+	0x1c, 0x70, 0x06, 0x06, 0x0e, 0x36, 0x42, 0xae, 
+	0xdb, 0xf3, 0x21, 0x00, 0x68, 0xf8, 0x19, 0x00, 
+	0x68, 0x40, 0x55, 0x81, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfe, 0x8f, 0x06, 0x05, 0x0e, 0x2d, 0x68, 0xf8, 
+	0x59, 0x00, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xfc, 
+	0xfe, 0xd3, 0x1c, 0x68, 0xf7, 0xfc, 0xfe, 0xaa, 
+	0x68, 0xf9, 0x51, 0x08, 0x28, 0x00, 0xd1, 0x0b, 
+	0x27, 0x00, 0x2d, 0x00, 0xdd, 0x1a, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfe, 0x7a, 0x1c, 0x78, 0x06, 0x07, 
+	0x0e, 0x3f, 0x42, 0xaf, 0xdb, 0xf7, 0xe0, 0x11, 
+	0x26, 0x00, 0x2d, 0x00, 0xdd, 0x0a, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfe, 0x6e, 0x68, 0xf9, 0x59, 0x09, 
+	0x55, 0x88, 0x1c, 0x70, 0x06, 0x06, 0x0e, 0x36, 
+	0x42, 0xae, 0xdb, 0xf4, 0x21, 0x00, 0x68, 0xf8, 
+	0x59, 0x00, 0x55, 0x81, 0x20, 0x48, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x8f, 0x80, 
+	0xb5, 0xf0, 0x04, 0x0d, 0x0c, 0x2d, 0x20, 0x18, 
+	0xf7, 0xf2, 0xfe, 0x56, 0x4f, 0x4e, 0x1d, 0xfc, 
+	0x34, 0x39, 0x7a, 0xa0, 0x28, 0x00, 0xd0, 0x0e, 
+	0x28, 0x01, 0xd0, 0x0c, 0x27, 0x00, 0x1e, 0xec, 
+	0x2c, 0x00, 0xdd, 0x68, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfe, 0x47, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
+	0x42, 0xbc, 0xdc, 0xf7, 0xe0, 0x84, 0x28, 0x00, 
+	0xd1, 0x01, 0x21, 0x02, 0xe0, 0x00, 0x21, 0x01, 
+	0x1c, 0x38, 0xf7, 0xfe, 0xfd, 0x3b, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfe, 0x36, 0x06, 0x05, 0x0e, 0x2d, 
+	0x1c, 0x68, 0xf7, 0xfc, 0xfe, 0x57, 0x7a, 0xa1, 
+	0x00, 0xcb, 0x1a, 0x59, 0x00, 0x89, 0x50, 0x78, 
+	0x28, 0x00, 0xd1, 0x0b, 0x26, 0x00, 0x2d, 0x00, 
+	0xdd, 0x29, 0x20, 0x08, 0xf7, 0xf2, 0xfe, 0x24, 
+	0x1c, 0x70, 0x06, 0x06, 0x0e, 0x36, 0x42, 0xae, 
+	0xdb, 0xf7, 0xe0, 0x20, 0x26, 0x00, 0x2d, 0x00, 
+	0xdd, 0x0d, 0x20, 0x08, 0xf7, 0xf2, 0xfe, 0x18, 
+	0x7a, 0xa1, 0x00, 0xcb, 0x1a, 0x59, 0x00, 0x89, 
+	0x58, 0x79, 0x55, 0x88, 0x1c, 0x70, 0x06, 0x06, 
+	0x0e, 0x36, 0x42, 0xae, 0xdb, 0xf1, 0x20, 0x00, 
+	0x7a, 0xa1, 0x00, 0xcb, 0x1a, 0x59, 0x00, 0x89, 
+	0x58, 0x79, 0x55, 0x88, 0x7a, 0xa0, 0x00, 0xc3, 
+	0x1a, 0x18, 0x00, 0x80, 0x58, 0x39, 0x22, 0x00, 
+	0x1c, 0x08, 0xf7, 0xff, 0xfe, 0x81, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfd, 0xfa, 0x06, 0x06, 0x0e, 0x36, 
+	0x1c, 0x70, 0xf7, 0xfc, 0xfe, 0x1b, 0x7a, 0xa1, 
+	0x00, 0xcb, 0x1a, 0x59, 0x00, 0x89, 0x19, 0xc9, 
+	0x60, 0x48, 0x28, 0x00, 0xd1, 0x0c, 0x27, 0x00, 
+	0x2e, 0x00, 0xdd, 0x08, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0xe7, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
+	0x42, 0xb7, 0xdb, 0xf7, 0xe0, 0x24, 0xe0, 0x23, 
+	0x25, 0x00, 0x2e, 0x00, 0xdd, 0x0e, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfd, 0xda, 0x7a, 0xa1, 0x00, 0xcb, 
+	0x1a, 0x59, 0x00, 0x89, 0x19, 0xc9, 0x68, 0x49, 
+	0x55, 0x48, 0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 
+	0x42, 0xb5, 0xdb, 0xf0, 0x20, 0x00, 0x7a, 0xa1, 
+	0x00, 0xcb, 0x1a, 0x59, 0x00, 0x89, 0x19, 0xc9, 
+	0x68, 0x49, 0x55, 0x48, 0x7a, 0xa0, 0x00, 0xc3, 
+	0x1a, 0x18, 0x00, 0x80, 0x19, 0xc0, 0x68, 0x41, 
+	0x22, 0x00, 0x1c, 0x08, 0xf7, 0xff, 0xfe, 0x40, 
+	0x20, 0x4d, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x90, 0x30, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x20, 0x04, 0xb0, 0x81, 0xf7, 0xf2, 0xfd, 0xb0, 
+	0x20, 0x04, 0xf7, 0xf2, 0xfd, 0xad, 0x20, 0x18, 
+	0xf7, 0xf2, 0xfd, 0xaa, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0xa7, 0x04, 0x00, 0x0c, 0x00, 0x90, 0x00, 
+	0x26, 0x00, 0x28, 0x00, 0xdd, 0x2e, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfd, 0x9e, 0x04, 0x05, 0x0c, 0x2d, 
+	0x24, 0x00, 0x2d, 0x00, 0xdd, 0x08, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfd, 0x96, 0x55, 0x38, 0x1c, 0x60, 
+	0x04, 0x04, 0x0c, 0x24, 0x42, 0xac, 0xdb, 0xf6, 
+	0x20, 0x20, 0x55, 0x78, 0x19, 0x70, 0x06, 0x06, 
+	0x0e, 0x36, 0x20, 0x08, 0xf7, 0xf2, 0xfd, 0x88, 
+	0x04, 0x04, 0x0c, 0x24, 0x25, 0x00, 0x2c, 0x00, 
+	0xdd, 0x08, 0x20, 0x08, 0xf7, 0xf2, 0xfd, 0x80, 
+	0x55, 0x78, 0x1c, 0x68, 0x04, 0x05, 0x0c, 0x2d, 
+	0x42, 0xa5, 0xdb, 0xf6, 0x20, 0x00, 0x55, 0x38, 
+	0x19, 0x30, 0x06, 0x06, 0x0e, 0x36, 0x98, 0x00, 
+	0x42, 0x86, 0xdb, 0xd0, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0x6f, 0x04, 0x05, 0x0c, 0x2d, 0x24, 0x00, 
+	0x2d, 0x00, 0xdd, 0x08, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0x67, 0x55, 0x38, 0x1c, 0x60, 0x06, 0x04, 
+	0x0e, 0x24, 0x42, 0xac, 0xdb, 0xf6, 0x20, 0x00, 
+	0x55, 0x78, 0x20, 0x4e, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x04, 0x0c, 
+	0x0c, 0x24, 0x26, 0x00, 0x2c, 0x00, 0xdd, 0x24, 
+	0x4d, 0x14, 0x20, 0x18, 0xf7, 0xf2, 0xfd, 0x50, 
+	0x68, 0x29, 0x42, 0x88, 0xd1, 0x12, 0x20, 0x06, 
+	0xf7, 0xf2, 0xfd, 0x4a, 0x20, 0x01, 0xf7, 0xf2, 
+	0xfd, 0x47, 0x20, 0x01, 0xf7, 0xf2, 0xfd, 0x44, 
+	0x20, 0x10, 0xf7, 0xf2, 0xfd, 0x41, 0x20, 0x28, 
+	0xf7, 0xf2, 0xfd, 0x3e, 0x20, 0x10, 0xf7, 0xf2, 
+	0xfd, 0x3b, 0xe0, 0x08, 0x27, 0x00, 0x20, 0x08, 
+	0xf7, 0xf2, 0xfd, 0x36, 0x1c, 0x78, 0x04, 0x07, 
+	0x0c, 0x3f, 0x2f, 0x0a, 0xdb, 0xf7, 0x42, 0xa6, 
+	0xdb, 0xdb, 0x20, 0x58, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xd0, 
+	0xb5, 0xb0, 0x1c, 0x07, 0x04, 0x08, 0x0c, 0x00, 
+	0x24, 0x00, 0x08, 0x85, 0x2d, 0x00, 0xdd, 0x17, 
+	0x2c, 0x00, 0xd1, 0x0d, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0x1b, 0x70, 0x38, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0x17, 0x70, 0x78, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfd, 0x13, 0x70, 0xb8, 0x20, 0x08, 0xe0, 0x00, 
+	0x20, 0x20, 0xf7, 0xf2, 0xfd, 0x0d, 0x1c, 0x60, 
+	0x06, 0x04, 0x0e, 0x24, 0x42, 0xa5, 0xdc, 0xe7, 
+	0x20, 0x0a, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x90, 0x04, 0x0c, 0x0c, 0x24, 0x27, 0x00, 
+	0x2c, 0x00, 0xdd, 0x07, 0x20, 0x08, 0xf7, 0xf2, 
+	0xfc, 0xfb, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
+	0x42, 0xa7, 0xdb, 0xf7, 0x20, 0x56, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x04, 0x0c, 
+	0x0c, 0x24, 0x27, 0x00, 0x2c, 0x00, 0xdd, 0x07, 
+	0x20, 0x08, 0xf7, 0xf2, 0xfc, 0xe9, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0x42, 0xa7, 0xdb, 0xf7, 
+	0x20, 0xff, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf7, 0x06, 0x0e, 0x0e, 0x36, 0xb0, 0x83, 
+	0xf0, 0x0c, 0xfc, 0x22, 0x1c, 0x05, 0xd0, 0x05, 
+	0x00, 0xa8, 0x30, 0x0c, 0xf7, 0xf7, 0xf8, 0x5c, 
+	0x1c, 0x04, 0xd1, 0x01, 0x20, 0x00, 0xe0, 0x22, 
+	0x95, 0x01, 0x1d, 0xe0, 0x30, 0x05, 0x90, 0x02, 
+	0x46, 0x6a, 0xb4, 0x04, 0x25, 0x00, 0x98, 0x04, 
+	0x1c, 0x31, 0xaa, 0x02, 0x1c, 0x2b, 0x1c, 0x27, 
+	0xf0, 0x0c, 0xf9, 0xc8, 0xb0, 0x01, 0x98, 0x00, 
+	0x60, 0x38, 0x28, 0x00, 0xd0, 0x0b, 0x99, 0x05, 
+	0xf0, 0x0c, 0xfb, 0x9e, 0x28, 0x00, 0xd1, 0x02, 
+	0x60, 0x7d, 0x1c, 0x38, 0xe0, 0x07, 0x68, 0x38, 
+	0xa9, 0x01, 0xf0, 0x0c, 0xf9, 0xe7, 0x1c, 0x20, 
+	0xf7, 0xf7, 0xf8, 0x58, 0x1c, 0x28, 0xb0, 0x03, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xff, 0x9c, 0x0b, 0x9d, 0x09, 0x9e, 0x0a, 
+	0xb0, 0x8c, 0x4a, 0x78, 0x92, 0x0b, 0x49, 0x78, 
+	0x91, 0x0a, 0x2c, 0x00, 0xd1, 0x0b, 0x20, 0x00, 
+	0x00, 0x81, 0x9a, 0x0b, 0x58, 0x51, 0x29, 0x00, 
+	0xd1, 0x01, 0x1c, 0x04, 0xe0, 0x19, 0x30, 0x01, 
+	0x28, 0x08, 0xdb, 0xf5, 0xe0, 0x15, 0x2c, 0x08, 
+	0xd8, 0x07, 0x3c, 0x01, 0x00, 0xa0, 0x9a, 0x0b, 
+	0x58, 0x10, 0x28, 0x00, 0xd0, 0x0d, 0x20, 0x00, 
+	0xe0, 0xcf, 0x23, 0x20, 0x99, 0x0a, 0x5e, 0xcc, 
+	0x1c, 0x60, 0x84, 0x08, 0x99, 0x0a, 0x5e, 0xc8, 
+	0x28, 0x00, 0xd1, 0x02, 0x20, 0x64, 0x99, 0x0a, 
+	0x84, 0x08, 0x2e, 0x00, 0xd0, 0x03, 0x2e, 0x01, 
+	0xd1, 0x03, 0x22, 0x01, 0xe0, 0x02, 0x22, 0x00, 
+	0xe0, 0x00, 0x22, 0x03, 0x92, 0x01, 0x1c, 0x28, 
+	0xf0, 0x08, 0xfd, 0xd3, 0x90, 0x00, 0x00, 0x80, 
+	0x30, 0x80, 0xf7, 0xf6, 0xff, 0xf1, 0x1c, 0x07, 
+	0xd0, 0xdd, 0x98, 0x00, 0x1d, 0xc2, 0x32, 0x79, 
+	0x21, 0x00, 0x1c, 0x38, 0xf0, 0x0f, 0xfc, 0x9e, 
+	0x98, 0x00, 0x60, 0xf8, 0x1d, 0xf8, 0x30, 0x79, 
+	0x61, 0x38, 0x98, 0x0e, 0x86, 0x78, 0x98, 0x0f, 
+	0x86, 0xb8, 0x98, 0x0c, 0x90, 0x02, 0x99, 0x0d, 
+	0x91, 0x03, 0x9a, 0x0e, 0x18, 0x80, 0x38, 0x01, 
+	0x90, 0x04, 0x98, 0x0f, 0x18, 0x08, 0x38, 0x01, 
+	0x90, 0x05, 0xa8, 0x02, 0x1c, 0x29, 0xf0, 0x08, 
+	0xfd, 0xb3, 0x61, 0x78, 0x9a, 0x01, 0x2a, 0x00, 
+	0xd0, 0x0e, 0x2a, 0x01, 0xd1, 0x1e, 0x00, 0x80, 
+	0xf7, 0xf6, 0xff, 0xc6, 0x61, 0xb8, 0x28, 0x00, 
+	0xd0, 0x04, 0x69, 0x79, 0x00, 0x8a, 0x21, 0x00, 
+	0xf0, 0x0f, 0xfc, 0x74, 0x20, 0x01, 0xe0, 0x0b, 
+	0x00, 0x80, 0xf7, 0xf7, 0xf8, 0x01, 0x61, 0xb8, 
+	0x28, 0x00, 0xd0, 0x04, 0x69, 0x79, 0x00, 0x8a, 
+	0x21, 0x00, 0xf0, 0x0f, 0xfc, 0x67, 0x20, 0x00, 
+	0x86, 0x38, 0x23, 0x01, 0x03, 0xdb, 0x69, 0xf8, 
+	0x43, 0x18, 0xe0, 0x0d, 0x61, 0xbe, 0x0e, 0x36, 
+	0x06, 0x36, 0x23, 0x0d, 0x06, 0x9b, 0x42, 0xde, 
+	0xd1, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x20, 0x01, 
+	0x86, 0x38, 0x69, 0xf8, 0x4b, 0x33, 0x40, 0x18, 
+	0x61, 0xf8, 0x69, 0xb8, 0x28, 0x00, 0xd1, 0x06, 
+	0x69, 0x78, 0x28, 0x00, 0xd0, 0x03, 0x1c, 0x38, 
+	0xf7, 0xf6, 0xff, 0xb4, 0xe7, 0x7f, 0x68, 0xf8, 
+	0x90, 0x06, 0x69, 0x38, 0x90, 0x07, 0x69, 0x78, 
+	0x90, 0x08, 0x69, 0xb8, 0x90, 0x09, 0xa8, 0x02, 
+	0x1c, 0x21, 0x1d, 0xfa, 0x32, 0x01, 0xb4, 0x07, 
+	0x1c, 0x2a, 0xb4, 0x04, 0x20, 0x00, 0x9a, 0x05, 
+	0xa9, 0x0a, 0xab, 0x0c, 0xf0, 0x03, 0xf8, 0x8a, 
+	0xb0, 0x04, 0x28, 0x00, 0xd0, 0x03, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x5f, 0xe7, 0x63, 0x2d, 0x00, 
+	0xd0, 0x09, 0x2d, 0x01, 0xd0, 0x07, 0x2d, 0x02, 
+	0xd0, 0x05, 0x2d, 0x03, 0xd0, 0x03, 0x23, 0x02, 
+	0x69, 0xf8, 0x43, 0x18, 0x61, 0xf8, 0x85, 0xfc, 
+	0x2c, 0x08, 0xd2, 0x02, 0x00, 0xa0, 0x9a, 0x0b, 
+	0x50, 0x17, 0x20, 0x01, 0x24, 0x00, 0x63, 0xf8, 
+	0x63, 0xbc, 0x85, 0xbd, 0x21, 0x01, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x0c, 0x99, 0x0a, 0x8c, 0x88, 
+	0x06, 0x01, 0x0e, 0x09, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0xbe, 0x22, 0x00, 0x21, 0x00, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x93, 0x98, 0x18, 0x60, 0x38, 
+	0x98, 0x18, 0x28, 0x00, 0xd0, 0x06, 0x22, 0x00, 
+	0x21, 0x03, 0x1c, 0x23, 0x9c, 0x18, 0x1c, 0x38, 
+	0xf0, 0x0f, 0xfa, 0xaa, 0x68, 0xb8, 0x60, 0x78, 
+	0x1c, 0x38, 0xb0, 0x0c, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0xdc, 
+	0x2e, 0x08, 0x1a, 0xdc, 0xff, 0xff, 0x7f, 0xff, 
+	0xb5, 0x80, 0x1c, 0x07, 0xb0, 0x82, 0x28, 0x00, 
+	0xd0, 0x13, 0x68, 0x78, 0x28, 0x00, 0xd1, 0x10, 
+	0x68, 0xb8, 0x90, 0x00, 0x1d, 0xf8, 0x30, 0x05, 
+	0x90, 0x01, 0x46, 0x69, 0x68, 0x38, 0xf0, 0x0c, 
+	0xf8, 0xd1, 0x22, 0x0c, 0x21, 0x00, 0x1c, 0x38, 
+	0xf0, 0x0f, 0xfb, 0xd4, 0x1c, 0x38, 0xf7, 0xf6, 
+	0xff, 0x3d, 0xb0, 0x02, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x90, 0x1c, 0x07, 0xb0, 0x84, 
+	0x28, 0x00, 0xd1, 0x03, 0xb0, 0x04, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x23, 0x00, 
+	0x49, 0x1d, 0x00, 0x82, 0x58, 0x8c, 0x42, 0xbc, 
+	0xd1, 0x00, 0x50, 0x8b, 0x30, 0x01, 0x28, 0x08, 
+	0xdb, 0xf7, 0x21, 0x00, 0x1c, 0x38, 0xf0, 0x00, 
+	0xf8, 0xbc, 0x68, 0xf8, 0x90, 0x00, 0x69, 0x38, 
+	0x90, 0x01, 0x69, 0x78, 0x90, 0x02, 0x69, 0xb8, 
+	0x90, 0x03, 0x46, 0x68, 0x1d, 0xc2, 0x32, 0x01, 
+	0x46, 0x69, 0x68, 0xb8, 0xf0, 0x03, 0xfb, 0x0e, 
+	0x6a, 0x38, 0x28, 0x00, 0xd0, 0x03, 0x68, 0x41, 
+	0x39, 0x01, 0x60, 0x41, 0x30, 0x04, 0x69, 0xf8, 
+	0x0c, 0x00, 0xd3, 0x0c, 0x23, 0x30, 0x5e, 0xf8, 
+	0x28, 0x00, 0xd1, 0x03, 0x69, 0xb8, 0xf7, 0xf6, 
+	0xff, 0x31, 0xe0, 0x04, 0x28, 0x01, 0xd1, 0x02, 
+	0x69, 0xb8, 0xf7, 0xf6, 0xfe, 0xfb, 0x22, 0x80, 
+	0x21, 0x00, 0x1c, 0x38, 0xf0, 0x0f, 0xfb, 0x8a, 
+	0x1c, 0x38, 0xf7, 0xf6, 0xfe, 0xf3, 0xe7, 0xbd, 
+	0x2e, 0x08, 0x1a, 0xdc, 0x28, 0x00, 0xd0, 0x08, 
+	0x28, 0x01, 0xd0, 0x08, 0x28, 0x02, 0xd0, 0x08, 
+	0x28, 0x03, 0xd1, 0x08, 0x20, 0xff, 0x30, 0x01, 
+	0x47, 0x70, 0x20, 0x02, 0x47, 0x70, 0x20, 0x04, 
+	0x47, 0x70, 0x20, 0x10, 0x47, 0x70, 0x20, 0x00, 
+	0x47, 0x70, 0xb5, 0x90, 0x1c, 0x07, 0x06, 0x08, 
+	0x0e, 0x00, 0x06, 0x14, 0x0e, 0x24, 0x28, 0x00, 
+	0xd0, 0x0a, 0x21, 0x03, 0x68, 0xb8, 0xf0, 0x04, 
+	0xfc, 0x15, 0x68, 0xb8, 0x1c, 0x21, 0xf0, 0x04, 
+	0xfc, 0xbd, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x21, 0x00, 0x68, 0xb8, 0xf0, 0x04, 0xfc, 0x0a, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 
+	0x06, 0x09, 0xd0, 0x02, 0x68, 0x80, 0x21, 0x02, 
+	0xe0, 0x01, 0x68, 0x80, 0x21, 0x00, 0xf0, 0x04, 
+	0xfb, 0xfd, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 
+	0x06, 0x09, 0x0e, 0x09, 0x28, 0x00, 0xd0, 0x02, 
+	0x68, 0x80, 0xf0, 0x04, 0xfe, 0x03, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0xb0, 0x23, 0x05, 0x43, 0x18, 
+	0x4d, 0x08, 0x84, 0xa8, 0x27, 0x00, 0x4c, 0x08, 
+	0x00, 0xb8, 0x58, 0x20, 0x8c, 0xa9, 0x06, 0x09, 
+	0x0e, 0x09, 0xf7, 0xff, 0xff, 0xe8, 0x37, 0x01, 
+	0x2f, 0x08, 0xdb, 0xf5, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xdc, 
+	0x2e, 0x08, 0x1a, 0xdc, 0x48, 0x01, 0x23, 0x24, 
+	0x5e, 0xc0, 0x47, 0x70, 0x2e, 0x08, 0x1a, 0xdc, 
+	0xb5, 0x90, 0x1c, 0x04, 0x1c, 0x0f, 0x28, 0x00, 
+	0xd0, 0x15, 0x6a, 0x20, 0x28, 0x00, 0xd0, 0x06, 
+	0x42, 0xb8, 0xd0, 0x10, 0x68, 0x41, 0x39, 0x01, 
+	0x60, 0x41, 0x20, 0x00, 0x62, 0x20, 0x2f, 0x00, 
+	0xd0, 0x09, 0x68, 0xa0, 0x68, 0x39, 0xf0, 0x0c, 
+	0xf8, 0x0f, 0x28, 0x00, 0xd1, 0x03, 0x62, 0x27, 
+	0x68, 0x78, 0x30, 0x01, 0x60, 0x78, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 0x06, 0x09, 
+	0xd0, 0x01, 0x21, 0x01, 0xe0, 0x00, 0x21, 0x00, 
+	0x68, 0x80, 0xf0, 0x04, 0xfd, 0x03, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x90, 0x1c, 0x07, 0x1c, 0x0c, 
+	0xd0, 0x01, 0x21, 0x01, 0xe0, 0x00, 0x21, 0x00, 
+	0x68, 0xb8, 0xf0, 0x04, 0xf8, 0x9b, 0x2c, 0x00, 
+	0xd0, 0x03, 0x23, 0x01, 0x69, 0xf8, 0x43, 0x18, 
+	0xe0, 0x02, 0x69, 0xf8, 0x08, 0x40, 0x00, 0x40, 
+	0x61, 0xf8, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x01, 0x21, 0x07, 0x07, 0x09, 0x63, 0x88, 
+	0x47, 0x70, 0x00, 0x00, 0xb5, 0x90, 0x9c, 0x03, 
+	0x9f, 0x04, 0xb0, 0x85, 0x91, 0x00, 0x92, 0x01, 
+	0x93, 0x02, 0x94, 0x03, 0x97, 0x04, 0x68, 0x80, 
+	0x46, 0x69, 0xf0, 0x0a, 0xff, 0x5f, 0xb0, 0x05, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 
+	0xb0, 0x86, 0x98, 0x06, 0x6a, 0x40, 0x68, 0xc3, 
+	0x93, 0x05, 0x98, 0x06, 0x6b, 0xc0, 0x01, 0x80, 
+	0x06, 0x05, 0x0e, 0x2d, 0x95, 0x00, 0x68, 0x18, 
+	0x01, 0x00, 0x30, 0x1f, 0x09, 0x40, 0x01, 0x40, 
+	0x08, 0xc0, 0x90, 0x04, 0x99, 0x07, 0x68, 0x48, 
+	0x99, 0x04, 0x43, 0x48, 0x99, 0x07, 0x68, 0x09, 
+	0x08, 0xc9, 0x18, 0x0f, 0x97, 0x03, 0x21, 0x00, 
+	0x91, 0x02, 0x9b, 0x05, 0x68, 0x58, 0x28, 0x00, 
+	0xdd, 0x5e, 0x23, 0x32, 0x98, 0x06, 0x5e, 0xc0, 
+	0x9b, 0x09, 0x43, 0x58, 0x9a, 0x08, 0x18, 0x81, 
+	0x1c, 0x08, 0xd5, 0x00, 0x30, 0x03, 0x10, 0x80, 
+	0x29, 0x00, 0xda, 0x04, 0x42, 0x49, 0x07, 0x89, 
+	0x0f, 0x89, 0x42, 0x49, 0xe0, 0x01, 0x07, 0x89, 
+	0x0f, 0x89, 0x00, 0x4a, 0x9d, 0x00, 0x41, 0x15, 
+	0x1c, 0x2b, 0x06, 0x2d, 0x0e, 0x2d, 0x27, 0xc0, 
+	0x40, 0xd7, 0x06, 0x3a, 0x0e, 0x12, 0x9b, 0x06, 
+	0x69, 0x9b, 0x18, 0x18, 0x9b, 0x05, 0x9f, 0x03, 
+	0x19, 0xdb, 0x33, 0x88, 0x78, 0x1f, 0x33, 0x01, 
+	0x93, 0x01, 0x24, 0x00, 0x9b, 0x07, 0x68, 0x9b, 
+	0x2b, 0x00, 0xd9, 0x23, 0x0a, 0x3b, 0xd3, 0x05, 
+	0x78, 0x03, 0x43, 0x93, 0x70, 0x03, 0x78, 0x03, 
+	0x43, 0x2b, 0x70, 0x03, 0x31, 0x01, 0x29, 0x03, 
+	0xdd, 0x04, 0x22, 0xc0, 0x21, 0x00, 0x9d, 0x00, 
+	0x30, 0x01, 0xe0, 0x05, 0x10, 0x92, 0x06, 0x12, 
+	0x0e, 0x12, 0x10, 0xab, 0x06, 0x1d, 0x0e, 0x2d, 
+	0x00, 0x7b, 0x06, 0x1f, 0x0e, 0x3f, 0x34, 0x01, 
+	0x07, 0x63, 0xd1, 0x03, 0x9b, 0x01, 0x78, 0x1f, 
+	0x33, 0x01, 0x93, 0x01, 0x9b, 0x07, 0x68, 0x9b, 
+	0x42, 0xa3, 0xd8, 0xdb, 0x98, 0x04, 0x9f, 0x03, 
+	0x18, 0x3f, 0x97, 0x03, 0x9b, 0x09, 0x33, 0x01, 
+	0x93, 0x09, 0x99, 0x02, 0x31, 0x01, 0x91, 0x02, 
+	0x9b, 0x05, 0x68, 0x58, 0x42, 0x88, 0xdc, 0xa0, 
+	0xb0, 0x06, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0xff, 0xb0, 0x86, 0x98, 0x06, 
+	0x6a, 0x40, 0x68, 0xc3, 0x93, 0x05, 0x98, 0x06, 
+	0x6b, 0xc0, 0x07, 0x06, 0x0f, 0x36, 0x96, 0x00, 
+	0x01, 0x30, 0x06, 0x06, 0x0e, 0x36, 0x96, 0x01, 
+	0x68, 0x18, 0x01, 0x00, 0x30, 0x1f, 0x09, 0x40, 
+	0x01, 0x40, 0x08, 0xc0, 0x90, 0x04, 0x68, 0x48, 
+	0x9a, 0x04, 0x43, 0x50, 0x68, 0x0a, 0x08, 0xd2, 
+	0x18, 0x17, 0x97, 0x03, 0x22, 0x00, 0x92, 0x02, 
+	0x9b, 0x05, 0x68, 0x58, 0x28, 0x00, 0xdd, 0x48, 
+	0x23, 0x32, 0x98, 0x06, 0x5e, 0xc0, 0x9b, 0x09, 
+	0x43, 0x58, 0x9a, 0x08, 0x18, 0x82, 0x1c, 0x10, 
+	0xd5, 0x00, 0x30, 0x01, 0x10, 0x40, 0x9b, 0x06, 
+	0x69, 0x9b, 0x18, 0x18, 0x9b, 0x05, 0x9f, 0x03, 
+	0x19, 0xdb, 0x1d, 0xdd, 0x35, 0x81, 0x78, 0x2f, 
+	0x24, 0x00, 0x68, 0x8b, 0x35, 0x01, 0x2b, 0x00, 
+	0xd9, 0x21, 0x0a, 0x3b, 0xd3, 0x10, 0x08, 0x53, 
+	0xd3, 0x06, 0x78, 0x06, 0x23, 0xf0, 0x40, 0x33, 
+	0x70, 0x03, 0x78, 0x03, 0x9e, 0x00, 0xe0, 0x05, 
+	0x78, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 0x70, 0x03, 
+	0x78, 0x03, 0x9e, 0x01, 0x43, 0x33, 0x70, 0x03, 
+	0x32, 0x01, 0x08, 0x53, 0xd2, 0x00, 0x30, 0x01, 
+	0x00, 0x7b, 0x06, 0x1f, 0x0e, 0x3f, 0x34, 0x01, 
+	0x07, 0x63, 0xd1, 0x01, 0x78, 0x2f, 0x35, 0x01, 
+	0x68, 0x8b, 0x42, 0xa3, 0xd8, 0xdd, 0x98, 0x04, 
+	0x9f, 0x03, 0x18, 0x3f, 0x97, 0x03, 0x9b, 0x09, 
+	0x33, 0x01, 0x93, 0x09, 0x9a, 0x02, 0x32, 0x01, 
+	0x92, 0x02, 0x9b, 0x05, 0x68, 0x58, 0x42, 0x90, 
+	0xdc, 0xb6, 0xb0, 0x06, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0xb0, 0x83, 
+	0x98, 0x03, 0x6a, 0x40, 0x68, 0xc4, 0x98, 0x03, 
+	0x6b, 0xc0, 0x06, 0x03, 0x0e, 0x1b, 0x93, 0x00, 
+	0x68, 0x20, 0x01, 0x00, 0x30, 0x1f, 0x09, 0x40, 
+	0x01, 0x40, 0x08, 0xc2, 0x92, 0x02, 0x68, 0x48, 
+	0x43, 0x50, 0x68, 0x0a, 0x08, 0xd2, 0x18, 0x10, 
+	0x90, 0x01, 0x25, 0x00, 0x68, 0x60, 0x28, 0x00, 
+	0xdd, 0x35, 0x23, 0x32, 0x98, 0x03, 0x5e, 0xc0, 
+	0x9b, 0x06, 0x43, 0x58, 0x9a, 0x05, 0x18, 0x80, 
+	0x9a, 0x03, 0x69, 0x92, 0x18, 0x17, 0x98, 0x01, 
+	0x18, 0x20, 0x1d, 0xc6, 0x36, 0x81, 0x78, 0x32, 
+	0x20, 0x00, 0x68, 0x8b, 0x36, 0x01, 0x2b, 0x00, 
+	0xd9, 0x16, 0x0a, 0x13, 0xd3, 0x01, 0x9b, 0x00, 
+	0x70, 0x3b, 0x00, 0x52, 0x06, 0x12, 0x0e, 0x12, 
+	0xd1, 0x09, 0x1d, 0xc2, 0x32, 0x01, 0x08, 0xd2, 
+	0x00, 0xd2, 0x1a, 0x10, 0x19, 0xc7, 0x1c, 0x10, 
+	0x78, 0x32, 0x36, 0x01, 0xe0, 0x01, 0x30, 0x01, 
+	0x37, 0x01, 0x68, 0x8b, 0x42, 0x83, 0xd8, 0xe8, 
+	0x98, 0x01, 0x9a, 0x02, 0x18, 0x80, 0x90, 0x01, 
+	0x9b, 0x06, 0x33, 0x01, 0x93, 0x06, 0x68, 0x60, 
+	0x35, 0x01, 0x42, 0xa8, 0xdc, 0xc9, 0xb0, 0x03, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xff, 0x23, 0x2c, 0x1c, 0x07, 0x5e, 0xc0, 
+	0xb0, 0x85, 0x28, 0x01, 0xd0, 0x0f, 0x28, 0x02, 
+	0xd0, 0x07, 0x28, 0x03, 0xd1, 0x11, 0xab, 0x06, 
+	0xcb, 0x0e, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0x9a, 
+	0xe0, 0x5d, 0xab, 0x06, 0xcb, 0x0e, 0x1c, 0x38, 
+	0xf7, 0xff, 0xff, 0x23, 0xe0, 0x57, 0xab, 0x06, 
+	0xcb, 0x0e, 0x1c, 0x38, 0xf7, 0xff, 0xfe, 0x97, 
+	0xe0, 0x51, 0x6a, 0x78, 0x68, 0xc0, 0x90, 0x04, 
+	0x68, 0x00, 0x01, 0x00, 0x30, 0x1f, 0x09, 0x40, 
+	0x01, 0x40, 0x08, 0xc0, 0x90, 0x03, 0x99, 0x06, 
+	0x68, 0x48, 0x99, 0x03, 0x43, 0x48, 0x99, 0x06, 
+	0x68, 0x09, 0x08, 0xc9, 0x18, 0x09, 0x91, 0x02, 
+	0x21, 0x00, 0x91, 0x01, 0x98, 0x04, 0x68, 0x40, 
+	0x28, 0x00, 0xdd, 0x38, 0x98, 0x04, 0x99, 0x02, 
+	0x9e, 0x07, 0x18, 0x40, 0x30, 0x88, 0x78, 0x05, 
+	0x30, 0x01, 0x90, 0x00, 0x24, 0x00, 0x99, 0x06, 
+	0x68, 0x88, 0x28, 0x00, 0xd9, 0x1d, 0x0a, 0x28, 
+	0xd3, 0x05, 0x68, 0xb8, 0x6b, 0xfb, 0x9a, 0x08, 
+	0x1c, 0x31, 0xf0, 0x0a, 0xfb, 0x7d, 0x00, 0x68, 
+	0x06, 0x05, 0x0e, 0x2d, 0xd1, 0x0b, 0x1d, 0xe0, 
+	0x30, 0x01, 0x08, 0xc0, 0x00, 0xc0, 0x1b, 0x01, 
+	0x19, 0x8e, 0x1c, 0x04, 0x98, 0x00, 0x78, 0x05, 
+	0x30, 0x01, 0x90, 0x00, 0xe0, 0x01, 0x34, 0x01, 
+	0x36, 0x01, 0x99, 0x06, 0x68, 0x88, 0x42, 0xa0, 
+	0xd8, 0xe1, 0x98, 0x03, 0x99, 0x02, 0x18, 0x09, 
+	0x91, 0x02, 0x9a, 0x08, 0x32, 0x01, 0x92, 0x08, 
+	0x99, 0x01, 0x31, 0x01, 0x91, 0x01, 0x98, 0x04, 
+	0x68, 0x40, 0x42, 0x88, 0xdc, 0xc6, 0xb0, 0x05, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x90, 0x1c, 0x07, 0x20, 0x00, 0xb0, 0x88, 
+	0xf0, 0x08, 0xfa, 0x2b, 0x90, 0x06, 0x00, 0x80, 
+	0x30, 0x10, 0x00, 0x80, 0xf7, 0xf6, 0xfc, 0x48, 
+	0x1c, 0x04, 0x20, 0x00, 0x2c, 0x00, 0xd1, 0x03, 
+	0xb0, 0x08, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x1d, 0xe1, 0x31, 0x09, 0x91, 0x07, 0x49, 0x19, 
+	0x68, 0x4b, 0x1c, 0x5a, 0x60, 0x4a, 0x60, 0x63, 
+	0x60, 0xe7, 0x68, 0x39, 0x01, 0x09, 0x31, 0x1f, 
+	0x09, 0x49, 0x01, 0x49, 0x90, 0x00, 0x90, 0x01, 
+	0x1e, 0x48, 0x90, 0x02, 0x68, 0xe0, 0x68, 0x40, 
+	0x00, 0xc0, 0x38, 0x01, 0x90, 0x03, 0x46, 0x68, 
+	0x21, 0x00, 0xf0, 0x08, 0xfa, 0x09, 0x60, 0xa0, 
+	0x68, 0xe0, 0x30, 0x88, 0x90, 0x05, 0x68, 0xa0, 
+	0x90, 0x04, 0x46, 0x68, 0x1c, 0x22, 0x68, 0x61, 
+	0xb4, 0x07, 0x22, 0x00, 0xb4, 0x04, 0x22, 0x01, 
+	0x20, 0x00, 0xa9, 0x0a, 0xab, 0x08, 0xf0, 0x02, 
+	0xfd, 0x21, 0xb0, 0x04, 0x28, 0x00, 0xd0, 0x03, 
+	0x1c, 0x20, 0xf7, 0xf6, 0xfc, 0x2f, 0x24, 0x00, 
+	0x1c, 0x20, 0xe7, 0xc5, 0x2e, 0x08, 0x1b, 0x04, 
+	0xb5, 0x80, 0x1c, 0x07, 0xb0, 0x84, 0x28, 0x00, 
+	0xd0, 0x1a, 0x20, 0x00, 0xf0, 0x08, 0xf9, 0xdd, 
+	0x90, 0x00, 0x1d, 0xf8, 0x30, 0x09, 0x90, 0x01, 
+	0x68, 0xb8, 0x90, 0x02, 0x68, 0xf8, 0x30, 0x88, 
+	0x90, 0x03, 0x46, 0x68, 0x46, 0x69, 0x1d, 0xc2, 
+	0x32, 0x01, 0x68, 0x38, 0xf0, 0x03, 0xf8, 0x0e, 
+	0x22, 0x10, 0x21, 0x00, 0x1c, 0x38, 0xf0, 0x0f, 
+	0xf8, 0xa1, 0x1c, 0x38, 0xf7, 0xf6, 0xfc, 0x0a, 
+	0xb0, 0x04, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xff, 0x23, 0x32, 0x1c, 0x07, 0x5e, 0xc0, 
+	0x1c, 0x0c, 0x1c, 0x15, 0xb0, 0x8a, 0x42, 0x90, 
+	0xdd, 0x63, 0x6a, 0x78, 0x28, 0x00, 0xd1, 0x0b, 
+	0x4e, 0x38, 0x68, 0x30, 0x28, 0x00, 0xd1, 0x05, 
+	0x48, 0x37, 0xf7, 0xff, 0xff, 0x7d, 0x60, 0x30, 
+	0x28, 0x00, 0xd0, 0x61, 0x68, 0x30, 0x62, 0x78, 
+	0x23, 0x01, 0x6b, 0xb8, 0x6a, 0x79, 0x42, 0xd8, 
+	0xd1, 0x01, 0x22, 0x01, 0xe0, 0x00, 0x22, 0x00, 
+	0x92, 0x01, 0x68, 0xc8, 0x90, 0x00, 0x68, 0x00, 
+	0x90, 0x04, 0x98, 0x00, 0x68, 0x40, 0x90, 0x03, 
+	0x6b, 0xf8, 0x28, 0x01, 0xd1, 0x01, 0x90, 0x02, 
+	0xe0, 0x11, 0x20, 0x00, 0x90, 0x02, 0x9a, 0x01, 
+	0x2a, 0x00, 0xd1, 0x0c, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf8, 0x57, 0x6b, 0xba, 0x99, 0x03, 0xb4, 0x06, 
+	0x1c, 0x03, 0x9a, 0x0f, 0x1c, 0x38, 0x1c, 0x29, 
+	0xf7, 0xff, 0xfd, 0x80, 0xb0, 0x02, 0x99, 0x03, 
+	0x91, 0x08, 0x20, 0x01, 0x90, 0x09, 0x78, 0x20, 
+	0x28, 0x00, 0xd0, 0x31, 0x23, 0x32, 0x5e, 0xf8, 
+	0x42, 0xa8, 0xdd, 0x22, 0x78, 0x20, 0x99, 0x00, 
+	0xf0, 0x00, 0xf8, 0x34, 0x90, 0x07, 0x1c, 0x06, 
+	0x78, 0x20, 0x07, 0x00, 0x0f, 0x00, 0x99, 0x04, 
+	0x43, 0x48, 0x90, 0x05, 0x78, 0x20, 0x09, 0x00, 
+	0x07, 0x40, 0x0f, 0x40, 0x99, 0x03, 0x43, 0x48, 
+	0x90, 0x06, 0x98, 0x02, 0x34, 0x01, 0x28, 0x00, 
+	0xd0, 0x0c, 0x99, 0x0d, 0x9a, 0x01, 0xb4, 0x06, 
+	0x6a, 0x78, 0x68, 0xb9, 0x68, 0x00, 0xaa, 0x07, 
+	0x1c, 0x2b, 0xf0, 0x0a, 0xfd, 0x81, 0xb0, 0x02, 
+	0xe0, 0x06, 0xe0, 0x09, 0x9b, 0x0d, 0x1c, 0x38, 
+	0xa9, 0x05, 0x1c, 0x2a, 0xf7, 0xff, 0xfe, 0xa8, 
+	0x19, 0xad, 0x78, 0x20, 0x28, 0x00, 0xd1, 0xcd, 
+	0xb0, 0x0a, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1b, 0x04, 
+	0x2e, 0x03, 0x45, 0xb8, 0x29, 0x00, 0xd1, 0x00, 
+	0x49, 0x02, 0x06, 0x40, 0x0e, 0x40, 0x18, 0x40, 
+	0x7a, 0x00, 0x47, 0x70, 0x2e, 0x03, 0x45, 0xb8, 
+	0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0xd1, 0x08, 
+	0x4f, 0x0c, 0x68, 0x38, 0x28, 0x00, 0xd1, 0x03, 
+	0x48, 0x0b, 0xf7, 0xff, 0xfe, 0xf9, 0x60, 0x38, 
+	0x68, 0x3f, 0x25, 0x00, 0x78, 0x20, 0x28, 0x00, 
+	0xd0, 0x08, 0x78, 0x20, 0x68, 0xf9, 0x34, 0x01, 
+	0xf7, 0xff, 0xff, 0xe0, 0x19, 0x45, 0x78, 0x20, 
+	0x28, 0x00, 0xd1, 0xf6, 0x1c, 0x28, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1b, 0x04, 
+	0x2e, 0x03, 0x45, 0xb8, 0xb5, 0x80, 0x28, 0x00, 
+	0xd1, 0x08, 0x4f, 0x09, 0x68, 0x38, 0x28, 0x00, 
+	0xd1, 0x03, 0x48, 0x08, 0xf7, 0xff, 0xfe, 0xd8, 
+	0x60, 0x38, 0x68, 0x38, 0x28, 0x00, 0xd1, 0x02, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xc0, 
+	0x68, 0x40, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x1b, 0x04, 0x2e, 0x03, 0x45, 0xb8, 
+	0xb5, 0xf0, 0xb0, 0x83, 0x4a, 0x18, 0x21, 0x00, 
+	0x20, 0xff, 0x30, 0x01, 0xf7, 0xff, 0xfa, 0xac, 
+	0x49, 0x16, 0x27, 0x00, 0x64, 0x08, 0x49, 0x16, 
+	0x91, 0x02, 0x49, 0x16, 0x91, 0x01, 0x49, 0x16, 
+	0x91, 0x00, 0x4c, 0x16, 0x01, 0x38, 0x06, 0x01, 
+	0x0e, 0x09, 0x20, 0x10, 0x1c, 0x22, 0x1c, 0x0d, 
+	0xf7, 0xff, 0xfa, 0x9a, 0x00, 0xbe, 0x99, 0x02, 
+	0x51, 0x88, 0x20, 0x04, 0x1c, 0x29, 0x1c, 0x22, 
+	0xf7, 0xff, 0xfa, 0x92, 0x99, 0x01, 0x51, 0x88, 
+	0x20, 0x02, 0x1c, 0x29, 0x1c, 0x22, 0xf7, 0xff, 
+	0xfa, 0x8b, 0x99, 0x00, 0x51, 0x88, 0x37, 0x01, 
+	0x2f, 0x08, 0xdb, 0xe3, 0x20, 0x00, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x1b, 0x4c, 0x2e, 0x08, 0x1d, 0x0c, 
+	0x2e, 0x08, 0x92, 0xbc, 0x2e, 0x08, 0x92, 0xdc, 
+	0x2e, 0x08, 0x92, 0xfc, 0x2e, 0x08, 0x1b, 0x0c, 
+	0xb5, 0x80, 0x48, 0x0c, 0xf7, 0xff, 0xfe, 0x84, 
+	0x4f, 0x0b, 0x64, 0x78, 0x48, 0x0b, 0xf7, 0xff, 
+	0xfe, 0x7f, 0x64, 0xb8, 0x48, 0x0a, 0xf7, 0xff, 
+	0xfe, 0x7b, 0x64, 0xf8, 0x20, 0x00, 0x22, 0x00, 
+	0x49, 0x08, 0x00, 0x83, 0x50, 0xca, 0x30, 0x01, 
+	0x28, 0x10, 0xdb, 0xfa, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x02, 0xcc, 0xa0, 
+	0x2e, 0x08, 0x1d, 0x0c, 0x2e, 0x03, 0x03, 0x2c, 
+	0x2e, 0x03, 0x45, 0xb8, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0x90, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
+	0x29, 0x00, 0xd0, 0x0b, 0x29, 0x0f, 0xdc, 0x09, 
+	0x00, 0x8c, 0x4f, 0x06, 0x59, 0x39, 0x29, 0x00, 
+	0xd0, 0x04, 0x1c, 0x08, 0xf7, 0xff, 0xfb, 0x91, 
+	0x20, 0x00, 0x51, 0x38, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0xff, 0x04, 0x05, 0x0c, 0x2d, 0x04, 0x10, 
+	0x0c, 0x00, 0xb0, 0x82, 0x90, 0x00, 0x04, 0x18, 
+	0x0c, 0x00, 0x90, 0x01, 0x2d, 0x00, 0xd0, 0x01, 
+	0x2d, 0x0f, 0xdd, 0x01, 0x20, 0xff, 0xe0, 0x53, 
+	0x00, 0xaf, 0x4c, 0x2c, 0x59, 0xe0, 0x28, 0x00, 
+	0xd0, 0x02, 0x1c, 0x28, 0xf7, 0xff, 0xff, 0xd0, 
+	0x98, 0x00, 0x4a, 0x29, 0x40, 0x02, 0x92, 0x00, 
+	0x23, 0x2d, 0x01, 0x1b, 0x42, 0x9a, 0xdd, 0x01, 
+	0x1c, 0x1a, 0x93, 0x00, 0x23, 0x09, 0x01, 0x9b, 
+	0x98, 0x01, 0x42, 0x98, 0xdd, 0x01, 0x1c, 0x1a, 
+	0x93, 0x00, 0x2d, 0x08, 0xda, 0x01, 0x20, 0x00, 
+	0xe0, 0x00, 0x20, 0x01, 0x22, 0x00, 0x21, 0x00, 
+	0xb4, 0x07, 0x9a, 0x06, 0xb4, 0x04, 0x20, 0x00, 
+	0x9a, 0x04, 0x9b, 0x05, 0xf7, 0xff, 0xfa, 0x38, 
+	0x51, 0xe0, 0xb0, 0x04, 0x1c, 0x01, 0xd0, 0xd1, 
+	0x48, 0x18, 0x6c, 0x82, 0x62, 0x4a, 0x21, 0x01, 
+	0x59, 0xe2, 0x63, 0xd1, 0x21, 0x00, 0x43, 0xc9, 
+	0x59, 0xe2, 0x63, 0x91, 0x99, 0x03, 0x29, 0x08, 
+	0xd2, 0x10, 0xa3, 0x02, 0x5c, 0x5b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x06, 0x08, 0x0b, 
+	0x04, 0x06, 0x08, 0x0b, 0x48, 0x0e, 0xe0, 0x02, 
+	0x48, 0x0e, 0xe0, 0x00, 0x48, 0x0e, 0x59, 0xc6, 
+	0xe0, 0x00, 0x6c, 0x06, 0x59, 0xe0, 0x1c, 0x31, 
+	0xf7, 0xff, 0xfb, 0xd6, 0x59, 0xe0, 0x68, 0x80, 
+	0x21, 0x07, 0xf0, 0x04, 0xf9, 0xb3, 0x20, 0x00, 
+	0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0x00, 0x00, 0xff, 0xfe, 0x2e, 0x08, 0x1d, 0x0c, 
+	0x2e, 0x08, 0x92, 0xfc, 0x2e, 0x08, 0x92, 0xdc, 
+	0x2e, 0x08, 0x92, 0xbc, 0xb5, 0xf0, 0x04, 0x00, 
+	0x0c, 0x00, 0x04, 0x09, 0x14, 0x09, 0x04, 0x16, 
+	0x14, 0x36, 0xb0, 0x85, 0x28, 0x07, 0xdc, 0x29, 
+	0x00, 0x84, 0x4f, 0x21, 0x59, 0x38, 0x28, 0x00, 
+	0xd0, 0x24, 0x08, 0x49, 0x00, 0x49, 0x04, 0x0d, 
+	0x14, 0x2d, 0x68, 0x80, 0xa9, 0x01, 0xf0, 0x04, 
+	0xfa, 0x61, 0x98, 0x01, 0x19, 0x40, 0x90, 0x01, 
+	0x98, 0x03, 0x19, 0x40, 0x90, 0x03, 0x98, 0x02, 
+	0x19, 0x80, 0x90, 0x02, 0x98, 0x04, 0x19, 0x80, 
+	0x90, 0x04, 0x98, 0x01, 0x49, 0x15, 0x42, 0x88, 
+	0xd8, 0x0c, 0x98, 0x02, 0x42, 0x88, 0xd8, 0x09, 
+	0x23, 0x2d, 0x01, 0x1b, 0x98, 0x01, 0x42, 0x98, 
+	0xda, 0x04, 0x23, 0x09, 0x01, 0x9b, 0x98, 0x02, 
+	0x42, 0x98, 0xdb, 0x01, 0x20, 0xff, 0xe0, 0x12, 
+	0x59, 0x38, 0x68, 0x80, 0xa9, 0x01, 0xf0, 0x02, 
+	0xf8, 0x31, 0x59, 0x38, 0x68, 0x80, 0x46, 0x69, 
+	0xf0, 0x03, 0xff, 0x00, 0x98, 0x00, 0x28, 0x00, 
+	0xd1, 0x04, 0x59, 0x38, 0x68, 0x80, 0x21, 0x01, 
+	0xf0, 0x03, 0xfc, 0x44, 0x20, 0x00, 0xb0, 0x05, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x92, 0x7c, 0x80, 0x00, 0x00, 0x00, 
+	0xb5, 0xf0, 0x04, 0x07, 0x0c, 0x3f, 0x04, 0x0b, 
+	0x0c, 0x1b, 0x04, 0x16, 0x0c, 0x36, 0x20, 0xff, 
+	0xb0, 0x85, 0x2f, 0x07, 0xdc, 0x10, 0x00, 0xbc, 
+	0x4f, 0x1c, 0x59, 0x39, 0x29, 0x00, 0xd0, 0x0b, 
+	0x08, 0x5a, 0x00, 0x52, 0x04, 0x15, 0x0c, 0x2d, 
+	0x23, 0x2d, 0x01, 0x1b, 0x42, 0x9d, 0xda, 0x03, 
+	0x23, 0x09, 0x01, 0x9b, 0x42, 0x9e, 0xdb, 0x03, 
+	0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x68, 0x88, 0xa9, 0x01, 0xf0, 0x04, 0xfa, 0x02, 
+	0x98, 0x03, 0x99, 0x01, 0x1a, 0x40, 0x90, 0x03, 
+	0x19, 0x40, 0x90, 0x03, 0x98, 0x04, 0x99, 0x02, 
+	0x1a, 0x40, 0x90, 0x04, 0x19, 0x80, 0x90, 0x04, 
+	0x95, 0x01, 0x96, 0x02, 0x59, 0x38, 0x68, 0x80, 
+	0xa9, 0x01, 0xf0, 0x01, 0xff, 0xe3, 0x59, 0x38, 
+	0x68, 0x80, 0x46, 0x69, 0xf0, 0x03, 0xfe, 0xb2, 
+	0x98, 0x00, 0x28, 0x00, 0xd1, 0x04, 0x59, 0x38, 
+	0x68, 0x80, 0x21, 0x01, 0xf0, 0x03, 0xfb, 0xf6, 
+	0x20, 0x00, 0xe7, 0xd5, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x80, 
+	0x49, 0x04, 0x58, 0x08, 0x28, 0x00, 0xd0, 0x03, 
+	0x68, 0x80, 0x21, 0x00, 0xf0, 0x03, 0xfb, 0xe6, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0x80, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
+	0x29, 0x07, 0xdc, 0x0c, 0x29, 0x01, 0xdb, 0x0a, 
+	0x00, 0x88, 0x49, 0x06, 0x58, 0x08, 0x27, 0x00, 
+	0x28, 0x00, 0xd0, 0x03, 0x68, 0x80, 0x21, 0x01, 
+	0xf0, 0x03, 0xfa, 0x2c, 0x1c, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x92, 0x7c, 
+	0x04, 0x01, 0x0c, 0x09, 0x20, 0x00, 0x29, 0x0f, 
+	0xdc, 0x06, 0x00, 0x89, 0x4a, 0x03, 0x58, 0x51, 
+	0x29, 0x00, 0xd0, 0x01, 0x23, 0x32, 0x5e, 0xc8, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0x04, 0x01, 0x0c, 0x09, 0x20, 0x00, 0x29, 0x0f, 
+	0xdc, 0x06, 0x00, 0x89, 0x4a, 0x03, 0x58, 0x51, 
+	0x29, 0x00, 0xd0, 0x01, 0x23, 0x34, 0x5e, 0xc8, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0xb0, 0x04, 0x03, 0x0c, 0x1b, 0x04, 0x0a, 
+	0x0c, 0x12, 0x20, 0xff, 0x2b, 0x07, 0xdc, 0x10, 
+	0x00, 0x9d, 0x4f, 0x09, 0x59, 0x79, 0x29, 0x00, 
+	0xd0, 0x0b, 0x07, 0x14, 0x0f, 0x24, 0x68, 0x88, 
+	0x21, 0x03, 0xf0, 0x03, 0xfe, 0x9b, 0x59, 0x78, 
+	0x68, 0x80, 0x1c, 0x21, 0xf0, 0x03, 0xff, 0x42, 
+	0x20, 0x00, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb5, 0x00, 0x04, 0x01, 
+	0x0c, 0x09, 0x20, 0xff, 0x29, 0x07, 0xdc, 0x09, 
+	0x00, 0x89, 0x4a, 0x05, 0x58, 0x51, 0x29, 0x00, 
+	0xd0, 0x04, 0x68, 0x88, 0x21, 0x02, 0xf0, 0x03, 
+	0xfe, 0x81, 0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb5, 0x00, 0x04, 0x01, 
+	0x0c, 0x09, 0x20, 0xff, 0x29, 0x07, 0xdc, 0x09, 
+	0x00, 0x89, 0x4a, 0x05, 0x58, 0x51, 0x29, 0x00, 
+	0xd0, 0x04, 0x68, 0x88, 0x21, 0x00, 0xf0, 0x03, 
+	0xfe, 0x6d, 0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb5, 0xf0, 0x04, 0x05, 
+	0x0c, 0x2d, 0x04, 0x09, 0x0c, 0x09, 0x04, 0x12, 
+	0x0c, 0x12, 0x04, 0x1e, 0x0c, 0x36, 0x9c, 0x05, 
+	0x9f, 0x06, 0x04, 0x24, 0x0c, 0x24, 0x04, 0x3f, 
+	0x0c, 0x3f, 0x20, 0xff, 0xb0, 0x85, 0x2d, 0x0f, 
+	0xdc, 0x04, 0x00, 0xab, 0x4d, 0x10, 0x58, 0xed, 
+	0x2d, 0x00, 0xd1, 0x03, 0xb0, 0x05, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x19, 0x88, 0x23, 0x32, 
+	0x5e, 0xeb, 0x42, 0x98, 0xdd, 0x02, 0x1a, 0x58, 
+	0x04, 0x06, 0x0c, 0x36, 0x19, 0x10, 0x23, 0x34, 
+	0x5e, 0xeb, 0x42, 0x98, 0xdd, 0x02, 0x1a, 0x98, 
+	0x04, 0x04, 0x0c, 0x24, 0x91, 0x00, 0x92, 0x01, 
+	0x96, 0x02, 0x94, 0x03, 0x97, 0x04, 0x46, 0x69, 
+	0x68, 0xa8, 0xf0, 0x0a, 0xfa, 0x13, 0xe7, 0xe1, 
+	0x2e, 0x08, 0x92, 0x7c, 0xb4, 0x80, 0x04, 0x03, 
+	0x0c, 0x1b, 0x20, 0x00, 0x29, 0x00, 0xdb, 0x0f, 
+	0x2a, 0x00, 0xdb, 0x0d, 0x00, 0x9b, 0x4f, 0x07, 
+	0x58, 0xff, 0x2f, 0x00, 0xd0, 0x08, 0x23, 0x32, 
+	0x5e, 0xfb, 0x42, 0x8b, 0xdd, 0x04, 0x23, 0x34, 
+	0x5e, 0xf9, 0x42, 0x91, 0xdd, 0x00, 0x20, 0x01, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0xf0, 0x9c, 0x06, 0x9e, 0x05, 0x04, 0x00, 
+	0x0c, 0x00, 0xb0, 0x85, 0x90, 0x00, 0x04, 0x08, 
+	0x14, 0x00, 0x04, 0x17, 0x14, 0x3f, 0x04, 0x1d, 
+	0x14, 0x2d, 0x04, 0x31, 0x14, 0x09, 0x91, 0x01, 
+	0x04, 0x23, 0x0c, 0x1b, 0x93, 0x02, 0xb0, 0x82, 
+	0x99, 0x02, 0x00, 0x89, 0x91, 0x06, 0x4a, 0x71, 
+	0x92, 0x05, 0x58, 0x51, 0x29, 0x00, 0xd1, 0x01, 
+	0x20, 0xff, 0xe0, 0xd6, 0x2d, 0x00, 0xda, 0x0e, 
+	0x19, 0x40, 0x04, 0x00, 0x14, 0x00, 0x42, 0x69, 
+	0x04, 0x0d, 0x14, 0x2d, 0x99, 0x03, 0x18, 0x79, 
+	0x04, 0x0f, 0x14, 0x3f, 0x99, 0x03, 0x42, 0x49, 
+	0x04, 0x09, 0x14, 0x09, 0x91, 0x03, 0x1c, 0x01, 
+	0x1c, 0x04, 0x98, 0x02, 0x1c, 0x3a, 0xf7, 0xff, 
+	0xff, 0xb1, 0x28, 0x00, 0xd0, 0x08, 0x98, 0x06, 
+	0x99, 0x05, 0x58, 0x08, 0x68, 0x80, 0x9b, 0x04, 
+	0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x09, 0xff, 0x70, 
+	0x98, 0x03, 0x10, 0x40, 0x90, 0x00, 0x10, 0x6e, 
+	0x1c, 0x28, 0xb0, 0x82, 0xf0, 0x0e, 0xfd, 0x38, 
+	0xf0, 0x0e, 0xfd, 0x74, 0x90, 0x00, 0x91, 0x01, 
+	0x98, 0x05, 0xf0, 0x0e, 0xfd, 0x31, 0xf0, 0x0e, 
+	0xfd, 0x6d, 0x9a, 0x00, 0x9b, 0x01, 0xb0, 0x02, 
+	0xf0, 0x0e, 0xfd, 0x6c, 0x28, 0x00, 0xd0, 0x4c, 
+	0x98, 0x03, 0x28, 0x00, 0xdd, 0x21, 0x26, 0x00, 
+	0x2d, 0x00, 0xdd, 0x6d, 0x98, 0x00, 0x99, 0x03, 
+	0x18, 0x40, 0x90, 0x00, 0x34, 0x01, 0x42, 0xa8, 
+	0xdb, 0x03, 0x98, 0x00, 0x1b, 0x40, 0x90, 0x00, 
+	0x37, 0x01, 0x98, 0x02, 0x1c, 0x21, 0x1c, 0x3a, 
+	0xf7, 0xff, 0xff, 0x78, 0x28, 0x00, 0xd0, 0x08, 
+	0x98, 0x06, 0x99, 0x05, 0x58, 0x08, 0x68, 0x80, 
+	0x9b, 0x04, 0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x09, 
+	0xff, 0x37, 0x36, 0x01, 0x42, 0xae, 0xdb, 0xe1, 
+	0xe0, 0x76, 0x98, 0x03, 0x42, 0x40, 0x04, 0x00, 
+	0x14, 0x00, 0x90, 0x03, 0x98, 0x00, 0x42, 0x46, 
+	0x20, 0x00, 0x90, 0x01, 0x2d, 0x00, 0xdd, 0x43, 
+	0x98, 0x03, 0x18, 0x36, 0x34, 0x01, 0x42, 0xae, 
+	0xdb, 0x01, 0x1b, 0x76, 0x3f, 0x01, 0x98, 0x02, 
+	0x1c, 0x21, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x52, 
+	0x28, 0x00, 0xd0, 0x08, 0x98, 0x06, 0x99, 0x05, 
+	0x58, 0x08, 0x68, 0x80, 0x9b, 0x04, 0x1c, 0x21, 
+	0x1c, 0x3a, 0xf0, 0x09, 0xff, 0x11, 0x98, 0x01, 
+	0x30, 0x01, 0x90, 0x01, 0x42, 0xa8, 0xdb, 0xe3, 
+	0xe0, 0x4e, 0x98, 0x03, 0x28, 0x00, 0xdd, 0x24, 
+	0x20, 0x00, 0x90, 0x01, 0x98, 0x03, 0x28, 0x00, 
+	0xdd, 0x1e, 0x19, 0x76, 0x99, 0x03, 0x37, 0x01, 
+	0x42, 0x8e, 0xdb, 0x02, 0x98, 0x03, 0x1a, 0x36, 
+	0x34, 0x01, 0x98, 0x02, 0x1c, 0x21, 0x1c, 0x3a, 
+	0xf7, 0xff, 0xff, 0x2c, 0x28, 0x00, 0xd0, 0x08, 
+	0x98, 0x06, 0x99, 0x05, 0x58, 0x08, 0x68, 0x80, 
+	0x9b, 0x04, 0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x09, 
+	0xfe, 0xeb, 0x98, 0x01, 0x30, 0x01, 0x90, 0x01, 
+	0x99, 0x03, 0x42, 0x88, 0xdb, 0xe1, 0xe0, 0x27, 
+	0xe0, 0x26, 0x98, 0x03, 0x42, 0x40, 0x04, 0x01, 
+	0x14, 0x09, 0x91, 0x03, 0x20, 0x00, 0x90, 0x01, 
+	0x29, 0x00, 0xdd, 0x1d, 0x19, 0x76, 0x99, 0x03, 
+	0x3f, 0x01, 0x42, 0x8e, 0xdb, 0x02, 0x99, 0x03, 
+	0x1a, 0x76, 0x34, 0x01, 0x98, 0x02, 0x1c, 0x21, 
+	0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x03, 0x28, 0x00, 
+	0xd0, 0x08, 0x98, 0x06, 0x99, 0x05, 0x58, 0x08, 
+	0x68, 0x80, 0x9b, 0x04, 0x1c, 0x21, 0x1c, 0x3a, 
+	0xf0, 0x09, 0xfe, 0xc2, 0x98, 0x01, 0x30, 0x01, 
+	0x90, 0x01, 0x99, 0x03, 0x42, 0x88, 0xdb, 0xe1, 
+	0x20, 0x00, 0xb0, 0x07, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb4, 0x80, 0x23, 0x00, 0x88, 0x01, 0x0a, 0x0a, 
+	0x06, 0x12, 0x0e, 0x12, 0x06, 0x09, 0x0e, 0x09, 
+	0x2a, 0xdf, 0xd0, 0x1a, 0xdc, 0x07, 0x2a, 0xc4, 
+	0xd0, 0x19, 0x2a, 0xd6, 0xd0, 0x1b, 0x2a, 0xdc, 
+	0xd1, 0x08, 0x22, 0x1e, 0xe0, 0x06, 0x2a, 0xe4, 
+	0xd0, 0x13, 0x2a, 0xf6, 0xd0, 0x15, 0x2a, 0xfc, 
+	0xd1, 0x00, 0x22, 0x1f, 0x29, 0xdf, 0xd0, 0x26, 
+	0xdc, 0x11, 0x29, 0xc4, 0xd0, 0x25, 0x29, 0xd6, 
+	0xd0, 0x27, 0x29, 0xdc, 0xd1, 0x12, 0x21, 0x1e, 
+	0xe0, 0x10, 0x22, 0x19, 0xe7, 0xf2, 0x22, 0x1a, 
+	0xe7, 0xf0, 0x22, 0x1b, 0xe7, 0xee, 0x22, 0x1c, 
+	0xe7, 0xec, 0x22, 0x1d, 0xe7, 0xea, 0x29, 0xe4, 
+	0xd0, 0x15, 0x29, 0xf6, 0xd0, 0x17, 0x29, 0xfc, 
+	0xd1, 0x00, 0x21, 0x1f, 0x02, 0x17, 0x18, 0x7f, 
+	0x80, 0x07, 0x30, 0x02, 0x2a, 0x00, 0xd0, 0x04, 
+	0x29, 0x00, 0xd0, 0x02, 0x33, 0x01, 0x2b, 0x70, 
+	0xdb, 0xc0, 0xbc, 0x80, 0x47, 0x70, 0x21, 0x19, 
+	0xe7, 0xf0, 0x21, 0x1a, 0xe7, 0xee, 0x21, 0x1b, 
+	0xe7, 0xec, 0x21, 0x1c, 0xe7, 0xea, 0x21, 0x1d, 
+	0xe7, 0xe8, 0xb5, 0xf0, 0x1c, 0x0f, 0x1c, 0x11, 
+	0x04, 0x02, 0x0c, 0x12, 0x04, 0x0c, 0x0c, 0x24, 
+	0x04, 0x1d, 0x0c, 0x2d, 0x00, 0x96, 0xb0, 0x81, 
+	0x48, 0x10, 0x90, 0x00, 0x59, 0x81, 0x20, 0xff, 
+	0x29, 0x00, 0xd0, 0x16, 0x2a, 0x00, 0xd0, 0x14, 
+	0x2a, 0x0f, 0xdc, 0x12, 0x23, 0x32, 0x5e, 0xca, 
+	0x42, 0xa2, 0xdb, 0x0e, 0x23, 0x34, 0x5e, 0xc9, 
+	0x42, 0xa9, 0xdb, 0x0a, 0x1c, 0x38, 0xf7, 0xff, 
+	0xff, 0x93, 0x98, 0x00, 0x59, 0x80, 0x1c, 0x39, 
+	0x1c, 0x22, 0x1c, 0x2b, 0xf7, 0xff, 0xfb, 0x5c, 
+	0x20, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb4, 0xb0, 0x04, 0x07, 0x0c, 0x3f, 0x04, 0x09, 
+	0x0c, 0x09, 0x04, 0x14, 0x14, 0x24, 0x04, 0x1a, 
+	0x14, 0x12, 0x20, 0xff, 0x2f, 0x0f, 0xdc, 0x1d, 
+	0x00, 0xbd, 0x4f, 0x0f, 0x59, 0x7b, 0x2b, 0x00, 
+	0xd0, 0x18, 0x48, 0x0e, 0x29, 0x01, 0xd0, 0x05, 
+	0x29, 0x02, 0xd0, 0x01, 0x29, 0x03, 0xd0, 0x03, 
+	0x6c, 0x80, 0xe0, 0x02, 0x6c, 0x40, 0xe0, 0x00, 
+	0x6c, 0xc0, 0x62, 0x58, 0x59, 0x78, 0x63, 0xc4, 
+	0x20, 0x00, 0x43, 0xc0, 0x42, 0x82, 0xd1, 0x02, 
+	0x59, 0x79, 0x63, 0x88, 0xe0, 0x01, 0x59, 0x78, 
+	0x63, 0x82, 0x20, 0x00, 0xbc, 0xb0, 0x47, 0x70, 
+	0x2e, 0x08, 0x92, 0x7c, 0x2e, 0x08, 0x1d, 0x0c, 
+	0xb5, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x04, 0x09, 
+	0x0c, 0x09, 0x00, 0x80, 0x4a, 0x07, 0x58, 0x10, 
+	0x28, 0x00, 0xd1, 0x02, 0x20, 0xff, 0xbc, 0x08, 
+	0x47, 0x18, 0x07, 0x89, 0x0f, 0x89, 0x68, 0x80, 
+	0xf0, 0x03, 0xfe, 0x6c, 0x20, 0x00, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0x80, 0x04, 0x00, 0x0c, 0x00, 0x04, 0x12, 
+	0x0c, 0x12, 0x1c, 0x1f, 0x28, 0x07, 0xdc, 0x1f, 
+	0x28, 0x01, 0xdb, 0x1d, 0x00, 0x80, 0x4b, 0x10, 
+	0x58, 0x1b, 0x2b, 0x00, 0xd0, 0x18, 0x29, 0x02, 
+	0xd0, 0x0e, 0x29, 0x04, 0xd0, 0x0c, 0x29, 0x10, 
+	0xd0, 0x0a, 0x23, 0xff, 0x33, 0x01, 0x42, 0x99, 
+	0xd1, 0x0e, 0x06, 0x12, 0x0e, 0x12, 0x1c, 0x39, 
+	0x48, 0x08, 0x6c, 0x00, 0x68, 0x00, 0xe0, 0x05, 
+	0x07, 0x12, 0x0f, 0x12, 0x49, 0x06, 0x58, 0x08, 
+	0x68, 0x00, 0x1c, 0x39, 0xf0, 0x0b, 0xfa, 0xf2, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x92, 0x7c, 0x2e, 0x08, 0x1d, 0x0c, 
+	0x2e, 0x08, 0x92, 0xbc, 0xb5, 0xf0, 0x04, 0x07, 
+	0x0c, 0x3f, 0x04, 0x10, 0x0c, 0x00, 0x22, 0x00, 
+	0xb0, 0x85, 0x92, 0x00, 0x2f, 0x07, 0xdc, 0x74, 
+	0x2f, 0x01, 0xdb, 0x73, 0x00, 0xbe, 0x4a, 0x3e, 
+	0x59, 0x92, 0x2a, 0x00, 0xd0, 0x6f, 0x04, 0x1a, 
+	0x0c, 0x12, 0x07, 0xd5, 0x0f, 0xed, 0x24, 0x02, 
+	0x40, 0x14, 0x27, 0x04, 0x40, 0x17, 0x23, 0x08, 
+	0x40, 0x1a, 0x92, 0x04, 0x29, 0x02, 0xd0, 0x34, 
+	0x29, 0x04, 0xd0, 0x32, 0x29, 0x10, 0xd0, 0x30, 
+	0x01, 0x5b, 0x42, 0x99, 0xd1, 0x60, 0x06, 0x02, 
+	0x0e, 0x12, 0x46, 0x69, 0x1c, 0x16, 0x48, 0x31, 
+	0x90, 0x01, 0x6c, 0x00, 0x68, 0x00, 0xf0, 0x0b, 
+	0xfa, 0xe9, 0x98, 0x00, 0x4b, 0x2e, 0x40, 0x18, 
+	0x90, 0x00, 0x2d, 0x00, 0xd0, 0x02, 0x23, 0x02, 
+	0x43, 0x18, 0x90, 0x00, 0x2c, 0x00, 0xd0, 0x04, 
+	0x23, 0x01, 0x04, 0x5b, 0x98, 0x00, 0x43, 0x18, 
+	0x90, 0x00, 0x2f, 0x00, 0xd0, 0x03, 0x23, 0x01, 
+	0x98, 0x00, 0x43, 0x18, 0x90, 0x00, 0x9a, 0x04, 
+	0x2a, 0x00, 0xd0, 0x04, 0x23, 0x01, 0x04, 0x1b, 
+	0x98, 0x00, 0x43, 0x18, 0x90, 0x00, 0x98, 0x01, 
+	0x99, 0x00, 0x6c, 0x00, 0x68, 0x00, 0x1c, 0x32, 
+	0xe0, 0x30, 0x07, 0x02, 0x0f, 0x12, 0x92, 0x03, 
+	0x48, 0x1c, 0x90, 0x02, 0x59, 0x80, 0x68, 0x00, 
+	0x46, 0x69, 0xf0, 0x0b, 0xfa, 0xbb, 0x98, 0x00, 
+	0x4b, 0x17, 0x40, 0x18, 0x90, 0x00, 0x2d, 0x00, 
+	0xd0, 0x02, 0x23, 0x02, 0x43, 0x18, 0x90, 0x00, 
+	0x2c, 0x00, 0xd0, 0x04, 0x23, 0x01, 0x04, 0x5b, 
+	0x98, 0x00, 0x43, 0x18, 0x90, 0x00, 0x2f, 0x00, 
+	0xd0, 0x03, 0x23, 0x01, 0x98, 0x00, 0x43, 0x18, 
+	0x90, 0x00, 0x9a, 0x04, 0x2a, 0x00, 0xd0, 0x04, 
+	0x23, 0x01, 0x04, 0x1b, 0x98, 0x00, 0x43, 0x18, 
+	0x90, 0x00, 0x98, 0x02, 0x9a, 0x03, 0x59, 0x80, 
+	0xe0, 0x02, 0xe0, 0x05, 0xe0, 0x04, 0xe0, 0x03, 
+	0x68, 0x00, 0x99, 0x00, 0xf0, 0x0b, 0xfa, 0x62, 
+	0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x92, 0x7c, 0x2e, 0x08, 0x1d, 0x0c, 
+	0xff, 0xfc, 0xff, 0xfc, 0x2e, 0x08, 0x92, 0xbc, 
+	0xb5, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x04, 0x16, 0x0c, 0x36, 0xb0, 0x85, 
+	0xa8, 0x01, 0x49, 0x48, 0xc9, 0x8e, 0xc0, 0x8e, 
+	0x2c, 0x00, 0xd0, 0x07, 0x2c, 0x01, 0xd0, 0x07, 
+	0x2c, 0x02, 0xd0, 0x07, 0x2c, 0x03, 0xd1, 0x74, 
+	0x20, 0x08, 0xe0, 0x04, 0x20, 0x01, 0xe0, 0x02, 
+	0x20, 0x02, 0xe0, 0x00, 0x20, 0x04, 0x90, 0x00, 
+	0x23, 0x2d, 0x01, 0x1b, 0x42, 0x9d, 0xdc, 0x69, 
+	0x23, 0x09, 0x01, 0x9b, 0x42, 0x9e, 0xdc, 0x65, 
+	0x1e, 0x68, 0x90, 0x03, 0x1e, 0x70, 0x90, 0x04, 
+	0xa8, 0x01, 0x1c, 0x21, 0xf0, 0x07, 0xfb, 0xe4, 
+	0x4f, 0x37, 0x60, 0x78, 0x00, 0x80, 0x23, 0x01, 
+	0x04, 0x1b, 0x42, 0x98, 0xdc, 0x56, 0x1f, 0xf8, 
+	0x38, 0x79, 0x67, 0xc4, 0x68, 0x38, 0x28, 0x00, 
+	0xd0, 0x0a, 0x68, 0x80, 0xb0, 0x81, 0x46, 0x6b, 
+	0x22, 0x00, 0x21, 0x00, 0xf0, 0x09, 0xfd, 0x6e, 
+	0x68, 0x38, 0xf7, 0xfe, 0xfe, 0xd2, 0xb0, 0x01, 
+	0x22, 0x00, 0x21, 0x0a, 0x20, 0x01, 0xb4, 0x07, 
+	0x1c, 0x22, 0xb4, 0x04, 0x21, 0x00, 0x20, 0x00, 
+	0x1c, 0x2a, 0x1c, 0x33, 0xf7, 0xfe, 0xfd, 0xac, 
+	0x60, 0x38, 0xb0, 0x04, 0x28, 0x00, 0xd0, 0x40, 
+	0x69, 0x84, 0x98, 0x00, 0x43, 0x45, 0x1d, 0xe8, 
+	0xd5, 0x00, 0x30, 0x07, 0x10, 0xc0, 0x43, 0x70, 
+	0x1c, 0x01, 0x60, 0x78, 0x20, 0x00, 0x29, 0x00, 
+	0xdd, 0x05, 0x21, 0x00, 0x54, 0x21, 0x68, 0x7a, 
+	0x30, 0x01, 0x42, 0x90, 0xdb, 0xfa, 0x20, 0x01, 
+	0x02, 0x80, 0xf7, 0xf0, 0xff, 0x55, 0x28, 0x00, 
+	0xdb, 0xf9, 0x4d, 0x18, 0x1c, 0x28, 0xf7, 0xf0, 
+	0xff, 0x6f, 0x28, 0x00, 0xdb, 0xfa, 0x68, 0x78, 
+	0x28, 0x00, 0xdd, 0x14, 0x68, 0x78, 0x04, 0x00, 
+	0x0c, 0x00, 0xf7, 0xf0, 0xff, 0x45, 0x28, 0x00, 
+	0xdb, 0xf8, 0x1c, 0x20, 0xf7, 0xf0, 0xff, 0x60, 
+	0x28, 0x00, 0xdb, 0xfa, 0x18, 0x24, 0x68, 0x79, 
+	0x1a, 0x08, 0x60, 0x78, 0x28, 0x00, 0xdc, 0xed, 
+	0xe0, 0x01, 0xe0, 0x0a, 0xe0, 0x09, 0x20, 0x00, 
+	0xf7, 0xf0, 0xff, 0x32, 0x28, 0x00, 0xd1, 0xfa, 
+	0x1c, 0x20, 0xf7, 0xf0, 0xff, 0x4d, 0x28, 0x00, 
+	0xdb, 0xfa, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x03, 0xa7, 0xc4, 
+	0x2e, 0x08, 0x1d, 0x8c, 0x2e, 0x08, 0x93, 0x1c, 
+	0xb5, 0xf0, 0x04, 0x00, 0x0c, 0x00, 0x04, 0x09, 
+	0x0c, 0x09, 0xb0, 0x87, 0x91, 0x00, 0x04, 0x11, 
+	0x0c, 0x09, 0x91, 0x01, 0x04, 0x19, 0x0c, 0x09, 
+	0x91, 0x02, 0xb0, 0x85, 0x28, 0x07, 0xdc, 0x43, 
+	0x28, 0x01, 0xdb, 0x41, 0x00, 0x85, 0x48, 0x3e, 
+	0x90, 0x0b, 0x59, 0x41, 0x29, 0x00, 0xd0, 0x3b, 
+	0x48, 0x3c, 0x90, 0x0a, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x36, 0x23, 0x2c, 0x5e, 0xca, 0x2a, 0x0b, 
+	0xd2, 0x32, 0xa3, 0x02, 0x5c, 0x9b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x06, 0x06, 0x06, 0x06, 
+	0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 
+	0x22, 0x00, 0x92, 0x00, 0x92, 0x01, 0x23, 0x32, 
+	0x5e, 0xc3, 0x93, 0x02, 0x23, 0x34, 0x5e, 0xc0, 
+	0x90, 0x03, 0x92, 0x04, 0x98, 0x07, 0x08, 0x80, 
+	0xd3, 0x40, 0x23, 0x2c, 0x5e, 0xc8, 0x28, 0x00, 
+	0xd0, 0x08, 0x28, 0x01, 0xd0, 0x08, 0x28, 0x02, 
+	0xd0, 0x08, 0x28, 0x03, 0xd1, 0x10, 0x27, 0xff, 
+	0x37, 0x01, 0xe0, 0x04, 0x27, 0x02, 0xe0, 0x02, 
+	0x27, 0x04, 0xe0, 0x00, 0x27, 0x10, 0x4e, 0x24, 
+	0x23, 0xff, 0x33, 0x01, 0x42, 0x9f, 0xd1, 0x16, 
+	0x24, 0x00, 0x48, 0x22, 0x90, 0x09, 0xe0, 0x03, 
+	0xb0, 0x0c, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0xa0, 0x58, 0x31, 0x29, 0x00, 0xd0, 0x06, 
+	0x06, 0x22, 0x0e, 0x12, 0x98, 0x09, 0x6c, 0x00, 
+	0x68, 0x00, 0xf0, 0x0b, 0xf9, 0x53, 0x34, 0x01, 
+	0x42, 0xbc, 0xdb, 0xf1, 0xe0, 0x12, 0x24, 0x00, 
+	0x2f, 0x00, 0xdd, 0x0f, 0x48, 0x16, 0x90, 0x08, 
+	0x00, 0xa0, 0x58, 0x31, 0x29, 0x00, 0xd0, 0x06, 
+	0x07, 0x22, 0x0f, 0x12, 0x98, 0x08, 0x59, 0x40, 
+	0x68, 0x00, 0xf0, 0x0b, 0xf9, 0x3f, 0x34, 0x01, 
+	0x42, 0xbc, 0xdb, 0xf1, 0x98, 0x07, 0x08, 0x40, 
+	0xd3, 0x01, 0x22, 0xff, 0xe0, 0x00, 0x22, 0x00, 
+	0x99, 0x06, 0xb4, 0x06, 0x98, 0x0d, 0x59, 0x40, 
+	0x68, 0x81, 0x98, 0x0c, 0x68, 0x00, 0x68, 0x80, 
+	0x9b, 0x07, 0xaa, 0x02, 0xf0, 0x09, 0xff, 0x08, 
+	0xb0, 0x0e, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x92, 0x7c, 0x2e, 0x08, 0x1d, 0x8c, 
+	0x2e, 0x08, 0x93, 0x1c, 0x2e, 0x08, 0x1d, 0x0c, 
+	0x2e, 0x08, 0x92, 0xbc, 0xb5, 0x80, 0x4f, 0x05, 
+	0x68, 0x38, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xfe, 
+	0xfd, 0xd4, 0x20, 0x00, 0x60, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1d, 0x8c, 
+	0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
+	0x29, 0x07, 0xdc, 0x09, 0x00, 0x89, 0x4a, 0x05, 
+	0x58, 0x51, 0x29, 0x00, 0xd0, 0x04, 0x68, 0x88, 
+	0x21, 0x01, 0xf0, 0x03, 0xfb, 0x93, 0x20, 0x00, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
+	0x29, 0x07, 0xdc, 0x09, 0x00, 0x89, 0x4a, 0x05, 
+	0x58, 0x51, 0x29, 0x00, 0xd0, 0x04, 0x68, 0x88, 
+	0x21, 0x00, 0xf0, 0x03, 0xfb, 0x7f, 0x20, 0x00, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x92, 0x7c, 
+	0xb5, 0xf7, 0xb0, 0x86, 0x9c, 0x07, 0x20, 0x00, 
+	0x6e, 0x40, 0x90, 0x05, 0x98, 0x05, 0x30, 0x0c, 
+	0x90, 0x05, 0x48, 0x7f, 0x90, 0x04, 0x98, 0x04, 
+	0x30, 0x0c, 0x90, 0x04, 0xf0, 0x13, 0xfc, 0x2a, 
+	0x90, 0x01, 0xf0, 0x13, 0xfc, 0x0d, 0x90, 0x00, 
+	0x20, 0x00, 0x43, 0xc0, 0x49, 0x79, 0x60, 0x08, 
+	0x20, 0x00, 0x43, 0xc0, 0x49, 0x77, 0x60, 0x88, 
+	0x20, 0x00, 0x43, 0xc0, 0x49, 0x75, 0x61, 0x08, 
+	0x98, 0x06, 0x28, 0x00, 0xd0, 0x73, 0x20, 0x00, 
+	0x6a, 0x40, 0x90, 0x03, 0x68, 0x20, 0x30, 0x05, 
+	0x99, 0x06, 0x1a, 0x08, 0x90, 0x06, 0x68, 0xe0, 
+	0x28, 0x00, 0xd0, 0x08, 0x68, 0x60, 0x99, 0x03, 
+	0x68, 0x09, 0x42, 0x88, 0xd1, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x06, 0x68, 0x60, 
+	0x9a, 0x08, 0x42, 0x90, 0xd1, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x73, 
+	0x68, 0x27, 0x68, 0xe0, 0x28, 0x00, 0xd0, 0x01, 
+	0x98, 0x05, 0xe0, 0x00, 0x98, 0x04, 0x1c, 0x06, 
+	0x68, 0xe0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 
+	0x6e, 0x40, 0xe0, 0x00, 0x48, 0x5c, 0x90, 0x02, 
+	0x1d, 0xe5, 0x35, 0x0d, 0x68, 0xa0, 0x28, 0x08, 
+	0xd2, 0x5f, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x16, 0x28, 0x3a, 
+	0x49, 0x55, 0x65, 0x71, 0x69, 0x20, 0x49, 0x55, 
+	0x60, 0x08, 0xcd, 0x02, 0x48, 0x53, 0x60, 0x41, 
+	0xcd, 0x02, 0x98, 0x02, 0x60, 0x01, 0x3f, 0x01, 
+	0x1c, 0x38, 0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 
+	0xcd, 0x02, 0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x67, 
+	0x69, 0x20, 0x49, 0x4c, 0x60, 0x88, 0xcd, 0x02, 
+	0x48, 0x4a, 0x60, 0xc1, 0xcd, 0x02, 0x98, 0x02, 
+	0x60, 0x41, 0x3f, 0x01, 0x1c, 0x38, 0x3f, 0x01, 
+	0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 0xc6, 0x02, 
+	0xe7, 0xf8, 0xe0, 0x55, 0x69, 0x20, 0x49, 0x43, 
+	0x61, 0x08, 0xcd, 0x02, 0x48, 0x41, 0x61, 0x41, 
+	0xcd, 0x02, 0x98, 0x02, 0x60, 0x81, 0x3f, 0x01, 
+	0x1c, 0x38, 0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 
+	0xcd, 0x02, 0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x43, 
+	0x69, 0x20, 0x00, 0x80, 0xe0, 0x00, 0xe0, 0x4b, 
+	0x21, 0x00, 0x6a, 0x89, 0x50, 0x0e, 0x1c, 0x38, 
+	0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
+	0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x34, 0x69, 0x20, 
+	0x00, 0x80, 0x49, 0x33, 0x50, 0x0e, 0x1c, 0x38, 
+	0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
+	0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x28, 0x69, 0x20, 
+	0x00, 0x80, 0x21, 0x00, 0x6e, 0x09, 0xe0, 0x01, 
+	0xe0, 0x28, 0xe0, 0x20, 0x50, 0x0e, 0x1c, 0x38, 
+	0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
+	0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x18, 0x69, 0x20, 
+	0x00, 0x80, 0x49, 0x26, 0x50, 0x0e, 0x1c, 0x38, 
+	0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
+	0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x0c, 0x69, 0x20, 
+	0x90, 0x03, 0x1c, 0x38, 0x3f, 0x01, 0x28, 0x00, 
+	0xd0, 0x04, 0xcd, 0x02, 0x98, 0x03, 0xc0, 0x02, 
+	0x90, 0x03, 0xe7, 0xf6, 0xe0, 0x00, 0xe7, 0xff, 
+	0x68, 0xe0, 0x28, 0xff, 0xd1, 0x01, 0x96, 0x05, 
+	0xe0, 0x00, 0x96, 0x04, 0x68, 0x20, 0x00, 0x80, 
+	0x19, 0x00, 0x1d, 0xc4, 0x34, 0x0d, 0xe7, 0x3b, 
+	0x98, 0x01, 0x28, 0x00, 0xd1, 0x01, 0xf0, 0x13, 
+	0xfb, 0x89, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x01, 
+	0xf0, 0x13, 0xfb, 0x68, 0x20, 0x00, 0x6e, 0x80, 
+	0x68, 0x00, 0x4b, 0x0f, 0x42, 0x98, 0xd0, 0x06, 
+	0x48, 0x0d, 0x21, 0x00, 0x6e, 0x89, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x08, 0x62, 0x08, 0x20, 0x00, 
+	0x21, 0x00, 0x6e, 0x89, 0x60, 0x08, 0x20, 0x00, 
+	0xb0, 0x06, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0xb0, 0x06, 0xe7, 0xf9, 0x00, 0x00, 
+	0x2e, 0x08, 0x97, 0x1c, 0x66, 0x00, 0x00, 0x80, 
+	0x2e, 0x08, 0x3b, 0xa4, 0x2e, 0x08, 0x1d, 0x94, 
+	0xda, 0xa5, 0xaa, 0x57, 0xb5, 0x80, 0xb0, 0xa7, 
+	0x46, 0x68, 0x4f, 0x08, 0x23, 0x13, 0xcf, 0x06, 
+	0xc0, 0x06, 0x3b, 0x01, 0xd1, 0xfb, 0xcf, 0x04, 
+	0xc0, 0x04, 0x46, 0x69, 0x4a, 0x04, 0x20, 0x27, 
+	0xf7, 0xff, 0xfe, 0xde, 0xb0, 0x27, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x03, 0xa7, 0xd4, 
+	0xf0, 0x24, 0x00, 0x09, 0xb5, 0xff, 0xb0, 0x83, 
+	0x99, 0x04, 0x04, 0x09, 0x0c, 0x09, 0x91, 0x00, 
+	0x9a, 0x05, 0x06, 0x16, 0x0e, 0x36, 0x9b, 0x06, 
+	0x06, 0x18, 0x0e, 0x00, 0x90, 0x01, 0x98, 0x0c, 
+	0x06, 0x00, 0x0e, 0x00, 0x90, 0x02, 0xb0, 0x84, 
+	0x25, 0x00, 0x98, 0x07, 0x1d, 0xc2, 0x32, 0x21, 
+	0x92, 0x00, 0x20, 0xff, 0x30, 0x01, 0x68, 0x00, 
+	0x49, 0x6b, 0x60, 0x08, 0x98, 0x12, 0x28, 0x01, 
+	0xd1, 0x73, 0x98, 0x07, 0x28, 0x00, 0xd1, 0x05, 
+	0x20, 0x63, 0xb0, 0x07, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 0x91, 0x01, 
+	0x99, 0x01, 0x23, 0xff, 0x33, 0xe1, 0x42, 0x99, 
+	0xd3, 0x04, 0xe0, 0x0a, 0x99, 0x01, 0x31, 0x01, 
+	0x91, 0x01, 0xe7, 0xf5, 0x20, 0x00, 0x99, 0x01, 
+	0x23, 0x2c, 0x43, 0x59, 0x9a, 0x00, 0x50, 0x50, 
+	0xe7, 0xf4, 0x98, 0x07, 0x49, 0x5b, 0x68, 0x09, 
+	0x60, 0x08, 0x98, 0x05, 0x28, 0x10, 0xdb, 0x01, 
+	0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0x99, 0x05, 
+	0x29, 0x1f, 0xdc, 0x01, 0x21, 0x01, 0xe0, 0x00, 
+	0x21, 0x00, 0x40, 0x08, 0xd0, 0x04, 0x98, 0x05, 
+	0x49, 0x53, 0x68, 0x09, 0x60, 0x08, 0xe0, 0x02, 
+	0x20, 0x62, 0xb0, 0x07, 0xe7, 0xce, 0x20, 0x00, 
+	0x49, 0x4d, 0x68, 0x09, 0x70, 0x08, 0x1c, 0x30, 
+	0x23, 0x03, 0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 
+	0x21, 0x01, 0xf0, 0x00, 0xfb, 0x01, 0x1c, 0x07, 
+	0x2f, 0x00, 0xd0, 0x02, 0x20, 0xa2, 0xb0, 0x07, 
+	0xe7, 0xbc, 0x22, 0x00, 0xb4, 0x04, 0x99, 0x05, 
+	0x1c, 0x30, 0x23, 0x04, 0x22, 0x00, 0xf0, 0x00, 
+	0xf9, 0x2f, 0xb0, 0x01, 0x1c, 0x07, 0x2f, 0x00, 
+	0xd0, 0x02, 0x20, 0xa2, 0xb0, 0x07, 0xe7, 0xad, 
+	0x98, 0x06, 0x28, 0x00, 0xdb, 0x04, 0x98, 0x06, 
+	0x28, 0x3f, 0xdc, 0x01, 0x9d, 0x06, 0xe0, 0x00, 
+	0x25, 0x1b, 0x98, 0x11, 0x01, 0x80, 0x43, 0x05, 
+	0x23, 0x80, 0x43, 0x1d, 0x48, 0x39, 0x68, 0x01, 
+	0x0a, 0x09, 0x02, 0x09, 0x60, 0x01, 0x48, 0x37, 
+	0x68, 0x01, 0x43, 0x29, 0x60, 0x01, 0xf0, 0x13, 
+	0xfa, 0x67, 0x90, 0x03, 0xf0, 0x13, 0xfa, 0x7e, 
+	0xe0, 0x00, 0xe0, 0x13, 0x90, 0x02, 0xf0, 0x13, 
+	0xfa, 0xdd, 0x1c, 0x04, 0x4b, 0x30, 0x40, 0x1c, 
+	0x1c, 0x20, 0xf0, 0x13, 0xfa, 0xdb, 0x98, 0x02, 
+	0x28, 0x40, 0xd0, 0x01, 0xf0, 0x13, 0xfa, 0xa6, 
+	0x98, 0x03, 0x28, 0x80, 0xd0, 0x01, 0xf0, 0x13, 
+	0xfa, 0x85, 0xe0, 0x43, 0x22, 0x00, 0xb4, 0x04, 
+	0x1c, 0x30, 0x23, 0x04, 0x22, 0x00, 0x49, 0x27, 
+	0xf0, 0x00, 0xf8, 0xee, 0xb0, 0x01, 0x1c, 0x07, 
+	0x2f, 0x00, 0xd0, 0x02, 0x20, 0xa2, 0xb0, 0x07, 
+	0xe7, 0x6c, 0x1c, 0x30, 0x23, 0x03, 0x02, 0x5b, 
+	0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 0xf0, 0x00, 
+	0xfa, 0xa3, 0x1c, 0x07, 0x2f, 0x00, 0xd0, 0x02, 
+	0x20, 0xa2, 0xb0, 0x07, 0xe7, 0x5e, 0x48, 0x19, 
+	0x68, 0x01, 0x0a, 0x09, 0x02, 0x09, 0x60, 0x01, 
+	0x48, 0x16, 0x68, 0x01, 0x23, 0x1b, 0x43, 0x19, 
+	0x60, 0x01, 0x48, 0x12, 0x68, 0x00, 0x68, 0x00, 
+	0x90, 0x07, 0xf0, 0x13, 0xfa, 0x21, 0x90, 0x03, 
+	0xf0, 0x13, 0xfa, 0x38, 0x90, 0x02, 0xf0, 0x13, 
+	0xfa, 0x99, 0x1c, 0x04, 0x23, 0x01, 0x04, 0x5b, 
+	0x43, 0x1c, 0x1c, 0x20, 0xf0, 0x13, 0xfa, 0x96, 
+	0x98, 0x02, 0x28, 0x40, 0xd0, 0x01, 0xf0, 0x13, 
+	0xfa, 0x61, 0x98, 0x03, 0x28, 0x80, 0xd0, 0x01, 
+	0xf0, 0x13, 0xfa, 0x40, 0x1c, 0x38, 0xb0, 0x07, 
+	0xe7, 0x34, 0xb0, 0x04, 0xb0, 0x03, 0xe7, 0x31, 
+	0x2e, 0x08, 0x9b, 0x24, 0x2e, 0x08, 0x9b, 0x1c, 
+	0x2e, 0x08, 0x9b, 0x20, 0x68, 0x00, 0x00, 0x38, 
+	0xff, 0xfd, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 
+	0xb5, 0x00, 0xf7, 0xff, 0xfe, 0xe7, 0xf0, 0x00, 
+	0xf8, 0x02, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
+	0xf0, 0x0b, 0xf9, 0x48, 0x26, 0x00, 0x2e, 0x04, 
+	0xd3, 0x02, 0xe0, 0x12, 0x36, 0x01, 0xe7, 0xfa, 
+	0x01, 0x30, 0x4b, 0x3c, 0x18, 0xc7, 0x25, 0x00, 
+	0x2d, 0x04, 0xd3, 0x02, 0xe0, 0x08, 0x35, 0x01, 
+	0xe7, 0xfa, 0x20, 0x00, 0x60, 0xb8, 0x20, 0x00, 
+	0x60, 0xf8, 0x37, 0xff, 0x37, 0x01, 0xe7, 0xf6, 
+	0xe7, 0xec, 0x4f, 0x35, 0x25, 0x00, 0x2d, 0x04, 
+	0xd3, 0x02, 0xe0, 0x07, 0x35, 0x01, 0xe7, 0xfa, 
+	0x20, 0x00, 0x60, 0xb8, 0x20, 0x00, 0x60, 0xf8, 
+	0x37, 0x10, 0xe7, 0xf7, 0x20, 0x00, 0x49, 0x2f, 
+	0x68, 0x09, 0x70, 0x08, 0x24, 0x00, 0x2c, 0x20, 
+	0xd3, 0x02, 0xe0, 0x1f, 0x34, 0x01, 0xe7, 0xfa, 
+	0x21, 0x00, 0x00, 0xe0, 0x4a, 0x2a, 0x68, 0x12, 
+	0x50, 0x11, 0x20, 0x00, 0x00, 0xe1, 0x4a, 0x28, 
+	0x68, 0x12, 0x18, 0x89, 0x60, 0x48, 0x21, 0x00, 
+	0x00, 0xe0, 0x4a, 0x26, 0x68, 0x12, 0x18, 0x80, 
+	0x60, 0x41, 0x20, 0x00, 0x00, 0xa1, 0x4a, 0x24, 
+	0x68, 0x12, 0x50, 0x50, 0x20, 0x00, 0x00, 0xe1, 
+	0x1b, 0x09, 0x00, 0x89, 0x4a, 0x21, 0x68, 0x12, 
+	0x52, 0x50, 0xe7, 0xdf, 0x20, 0x00, 0x21, 0x19, 
+	0x06, 0x89, 0x62, 0x48, 0x48, 0x1e, 0x21, 0x19, 
+	0x06, 0x89, 0x62, 0x48, 0x20, 0x00, 0x49, 0x1d, 
+	0x68, 0x09, 0x60, 0x08, 0x20, 0x00, 0x49, 0x1b, 
+	0x68, 0x09, 0x60, 0x48, 0x20, 0x00, 0x49, 0x19, 
+	0x68, 0x09, 0x60, 0xc8, 0x20, 0x00, 0x49, 0x17, 
+	0x68, 0x09, 0x61, 0x08, 0x20, 0x00, 0x49, 0x15, 
+	0x68, 0x09, 0x61, 0x48, 0x20, 0x00, 0x49, 0x13, 
+	0x68, 0x09, 0x61, 0x88, 0x20, 0x00, 0x49, 0x12, 
+	0x68, 0x09, 0x60, 0x08, 0x20, 0x00, 0x49, 0x10, 
+	0x68, 0x09, 0x60, 0x48, 0x20, 0x00, 0x49, 0x0e, 
+	0x68, 0x09, 0x60, 0x88, 0x48, 0x0d, 0x68, 0x01, 
+	0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x9e, 0x00, 0x00, 0xc0, 
+	0x9e, 0x00, 0x09, 0x80, 0x2e, 0x08, 0x9b, 0x28, 
+	0x2e, 0x08, 0x9b, 0x3c, 0x2e, 0x08, 0x9b, 0x40, 
+	0x2e, 0x08, 0x9b, 0x38, 0x2e, 0x08, 0x9b, 0x30, 
+	0x00, 0x40, 0x00, 0x03, 0x2e, 0x08, 0x9b, 0x78, 
+	0x2e, 0x08, 0x9b, 0x7c, 0x6a, 0x00, 0x00, 0x10, 
+	0xb5, 0xff, 0xb0, 0x83, 0x98, 0x03, 0x06, 0x04, 
+	0x0e, 0x24, 0x99, 0x04, 0x04, 0x08, 0x0c, 0x00, 
+	0x90, 0x00, 0x9a, 0x05, 0x06, 0x10, 0x0e, 0x00, 
+	0x90, 0x01, 0x9b, 0x06, 0x06, 0x18, 0x0e, 0x00, 
+	0x90, 0x02, 0xb0, 0x81, 0x00, 0xe0, 0x49, 0xc1, 
+	0x68, 0x09, 0x18, 0x47, 0x00, 0xa0, 0x49, 0xc0, 
+	0x68, 0x09, 0x18, 0x45, 0x00, 0xe0, 0x1b, 0x00, 
+	0x00, 0x80, 0x49, 0xbe, 0x68, 0x09, 0x18, 0x46, 
+	0x2c, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x04, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x68, 0x28, 0x4b, 0xb9, 0x40, 0x18, 0x60, 0x28, 
+	0x68, 0x38, 0x4b, 0xb8, 0x40, 0x18, 0x60, 0x38, 
+	0x68, 0x38, 0x23, 0x40, 0x40, 0x18, 0xd0, 0x17, 
+	0x68, 0x38, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x18, 
+	0x60, 0x38, 0x48, 0xb3, 0x68, 0x01, 0x08, 0x49, 
+	0x00, 0x49, 0x60, 0x01, 0x48, 0xb1, 0x68, 0x01, 
+	0x23, 0x01, 0x05, 0x5b, 0x43, 0x19, 0x60, 0x01, 
+	0x98, 0x01, 0x4b, 0xaf, 0x42, 0x98, 0xd1, 0x03, 
+	0x20, 0x00, 0x49, 0xae, 0x68, 0x09, 0x60, 0x08, 
+	0x98, 0x01, 0x4b, 0xab, 0x42, 0x98, 0xd0, 0x73, 
+	0x68, 0x38, 0x23, 0x21, 0x43, 0xdb, 0x40, 0x18, 
+	0x60, 0x38, 0x68, 0x28, 0x23, 0x07, 0x03, 0x5b, 
+	0x40, 0x18, 0x60, 0x28, 0x98, 0x01, 0x4b, 0xa6, 
+	0x40, 0x18, 0x68, 0x29, 0x43, 0x08, 0x60, 0x28, 
+	0x20, 0x00, 0x75, 0x30, 0x98, 0x02, 0x07, 0x80, 
+	0x0f, 0x80, 0x28, 0x01, 0xd1, 0x04, 0x88, 0x30, 
+	0x23, 0x10, 0x43, 0x18, 0x80, 0x30, 0xe0, 0x04, 
+	0x88, 0x30, 0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 
+	0x80, 0x30, 0x98, 0x02, 0x23, 0x80, 0x40, 0x18, 
+	0x28, 0x80, 0xd1, 0x08, 0x68, 0x38, 0x23, 0x40, 
+	0x43, 0x18, 0x60, 0x38, 0x20, 0xff, 0x49, 0x97, 
+	0x68, 0x09, 0x70, 0x08, 0xe0, 0x04, 0x68, 0x38, 
+	0x23, 0x40, 0x43, 0xdb, 0x40, 0x18, 0x60, 0x38, 
+	0x98, 0x03, 0x28, 0x01, 0xd1, 0x36, 0x88, 0x30, 
+	0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 0x80, 0x30, 
+	0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 0x23, 0x0d, 
+	0x06, 0x9b, 0x1a, 0xc1, 0x00, 0xe0, 0x4a, 0x8c, 
+	0x68, 0x12, 0x18, 0x80, 0x60, 0x41, 0x20, 0x01, 
+	0x70, 0xb0, 0x68, 0x38, 0x23, 0x01, 0x03, 0x9b, 
+	0x43, 0x18, 0x60, 0x38, 0x68, 0x38, 0x4b, 0x87, 
+	0x43, 0x18, 0x60, 0x38, 0x48, 0x86, 0x70, 0x44, 
+	0x20, 0x00, 0x49, 0x86, 0x68, 0x09, 0x60, 0x08, 
+	0x20, 0x01, 0x02, 0xc0, 0x49, 0x84, 0x61, 0x48, 
+	0x49, 0x83, 0x61, 0x08, 0x20, 0x01, 0x49, 0x83, 
+	0x64, 0x48, 0x20, 0x00, 0x49, 0x81, 0x64, 0x48, 
+	0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
+	0x60, 0x28, 0x20, 0x00, 0x49, 0x7e, 0x68, 0x09, 
+	0x60, 0x08, 0xe0, 0x9a, 0x98, 0x03, 0x28, 0x02, 
+	0xd1, 0x30, 0x20, 0x33, 0x06, 0x40, 0xe0, 0x00, 
+	0xe0, 0x94, 0x6d, 0xc0, 0x23, 0x0d, 0x06, 0x9b, 
+	0x1a, 0xc0, 0x00, 0xe1, 0x4a, 0x70, 0x68, 0x12, 
+	0x18, 0x89, 0x60, 0x48, 0x20, 0x02, 0x70, 0xb0, 
+	0x68, 0x38, 0x23, 0x01, 0x03, 0xdb, 0x43, 0x18, 
+	0x60, 0x38, 0x68, 0x38, 0x4b, 0x6b, 0x43, 0x18, 
+	0x60, 0x38, 0x48, 0x6b, 0x70, 0x84, 0x20, 0x00, 
+	0x49, 0x6e, 0x60, 0x08, 0x00, 0xe0, 0x49, 0x5b, 
+	0x68, 0x09, 0x58, 0x08, 0x23, 0xff, 0x33, 0x01, 
+	0x43, 0x18, 0x00, 0xe1, 0x4a, 0x57, 0x68, 0x12, 
+	0x50, 0x50, 0x20, 0x4b, 0x49, 0x67, 0x60, 0x08, 
+	0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
+	0x60, 0x28, 0xe0, 0x66, 0x98, 0x03, 0x28, 0x04, 
+	0xd1, 0x15, 0x20, 0x00, 0x00, 0xe1, 0x4a, 0x5a, 
+	0x68, 0x12, 0x18, 0x89, 0x60, 0x48, 0x98, 0x03, 
+	0x70, 0xb0, 0x68, 0x38, 0x23, 0x20, 0x43, 0x18, 
+	0x60, 0x38, 0x68, 0x38, 0x60, 0x38, 0x48, 0x56, 
+	0x70, 0x04, 0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 
+	0x43, 0x18, 0x60, 0x28, 0xe0, 0x4d, 0x98, 0x03, 
+	0x23, 0x10, 0x40, 0x18, 0xd0, 0x0f, 0x21, 0x00, 
+	0x00, 0xe0, 0x4a, 0x4d, 0x68, 0x12, 0x18, 0x80, 
+	0x60, 0x41, 0x68, 0x38, 0x4b, 0x52, 0x43, 0x18, 
+	0x60, 0x38, 0x68, 0x38, 0x60, 0x38, 0x37, 0x04, 
+	0x20, 0x0e, 0x60, 0x38, 0xe0, 0x39, 0x98, 0x03, 
+	0x28, 0x08, 0xd1, 0x23, 0x48, 0x4d, 0x68, 0x00, 
+	0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 0xd0, 0x03, 
+	0x20, 0x4f, 0xb0, 0x04, 0xe6, 0xf8, 0xe0, 0x67, 
+	0x20, 0x01, 0x49, 0x48, 0x68, 0x09, 0x31, 0x60, 
+	0x76, 0x88, 0x48, 0x46, 0x68, 0x00, 0x30, 0x60, 
+	0x76, 0x04, 0x20, 0x01, 0x49, 0x43, 0x68, 0x09, 
+	0x31, 0x80, 0x70, 0xc8, 0x49, 0x42, 0x00, 0xe0, 
+	0x4a, 0x37, 0x68, 0x12, 0x18, 0x80, 0x60, 0x41, 
+	0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
+	0x60, 0x28, 0xe0, 0x12, 0x21, 0x00, 0x00, 0xe0, 
+	0x4a, 0x31, 0x68, 0x12, 0x18, 0x80, 0x60, 0x41, 
+	0x98, 0x03, 0x70, 0xb0, 0x68, 0x38, 0x23, 0x20, 
+	0x43, 0x18, 0x60, 0x38, 0x68, 0x38, 0x60, 0x38, 
+	0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
+	0x60, 0x28, 0xe0, 0x33, 0x98, 0x03, 0x23, 0x10, 
+	0x40, 0x18, 0xd0, 0x09, 0x1c, 0x20, 0xf0, 0x05, 
+	0xf8, 0x0f, 0x90, 0x00, 0x28, 0x00, 0xd0, 0x02, 
+	0x98, 0x00, 0xb0, 0x04, 0xe6, 0xbc, 0xe0, 0x1a, 
+	0x98, 0x03, 0x28, 0x01, 0xd1, 0x03, 0x20, 0xff, 
+	0x49, 0x21, 0x70, 0x48, 0xe0, 0x13, 0x98, 0x03, 
+	0x28, 0x02, 0xd1, 0x03, 0x20, 0xff, 0x49, 0x1e, 
+	0x70, 0x88, 0xe0, 0x0c, 0x98, 0x03, 0x28, 0x08, 
+	0xd1, 0x09, 0x20, 0x00, 0x49, 0x21, 0x68, 0x09, 
+	0x31, 0x80, 0x70, 0xc8, 0x20, 0x00, 0x49, 0x1f, 
+	0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 0x7d, 0x30, 
+	0x07, 0xc0, 0x0f, 0xc0, 0x28, 0x01, 0xd1, 0x03, 
+	0x1c, 0x20, 0x49, 0x1c, 0xf0, 0x00, 0xf9, 0x16, 
+	0x20, 0x00, 0x70, 0xb0, 0x20, 0x00, 0xb0, 0x04, 
+	0xe6, 0x92, 0xb0, 0x01, 0xb0, 0x03, 0xe6, 0x8f, 
+	0xe6, 0x8e, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x3c, 
+	0x2e, 0x08, 0x9b, 0x38, 0x2e, 0x08, 0x9b, 0x30, 
+	0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0x3f, 0xff, 
+	0x6a, 0x00, 0x00, 0x18, 0x6c, 0x00, 0x00, 0x20, 
+	0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x9b, 0x44, 
+	0xff, 0xff, 0x1f, 0xff, 0x2e, 0x08, 0x9b, 0x98, 
+	0x2e, 0x08, 0x9b, 0x40, 0x00, 0x00, 0x20, 0x01, 
+	0x2e, 0x08, 0x9b, 0x9c, 0x2e, 0x08, 0x9b, 0x68, 
+	0xcc, 0x00, 0x0f, 0x00, 0x66, 0x00, 0x00, 0x80, 
+	0x2e, 0x08, 0x9b, 0xac, 0x2e, 0x08, 0x9b, 0xb0, 
+	0x00, 0x00, 0x20, 0xa0, 0x2e, 0x08, 0xb9, 0xb0, 
+	0x66, 0x00, 0x01, 0xf0, 0xff, 0xff, 0x00, 0x00, 
+	0xb5, 0xff, 0x98, 0x00, 0x06, 0x01, 0x0e, 0x09, 
+	0x98, 0x01, 0x06, 0x02, 0x0e, 0x12, 0x98, 0x02, 
+	0x04, 0x07, 0x0c, 0x3f, 0x9b, 0x03, 0x04, 0x1c, 
+	0x0c, 0x24, 0x29, 0x20, 0xdb, 0x04, 0x20, 0xa2, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2a, 0x02, 0xd1, 0x0a, 0x00, 0xc8, 0x4b, 0x1f, 
+	0x68, 0x1b, 0x58, 0x18, 0x4b, 0x1e, 0x40, 0x18, 
+	0x00, 0xcb, 0x4d, 0x1c, 0x68, 0x2d, 0x50, 0xe8, 
+	0xe0, 0x30, 0x2a, 0x01, 0xd1, 0x0b, 0x00, 0xc8, 
+	0x4b, 0x18, 0x68, 0x1b, 0x58, 0x18, 0x43, 0x27, 
+	0x1c, 0x3b, 0x43, 0x18, 0x00, 0xcb, 0x4d, 0x15, 
+	0x68, 0x2d, 0x50, 0xe8, 0xe0, 0x22, 0x20, 0x00, 
+	0x28, 0x20, 0xdb, 0x04, 0xe0, 0x1e, 0x1c, 0x43, 
+	0x06, 0x1b, 0x16, 0x18, 0xe7, 0xf8, 0x2a, 0x03, 
+	0xd1, 0x0b, 0x00, 0xc3, 0x4d, 0x0d, 0x68, 0x2d, 
+	0x58, 0xeb, 0x1c, 0x3d, 0x43, 0x25, 0x43, 0x1d, 
+	0x00, 0xc3, 0x4e, 0x0a, 0x68, 0x36, 0x50, 0xf5, 
+	0xe0, 0x0b, 0x2a, 0x04, 0xd1, 0x09, 0x00, 0xc3, 
+	0x4d, 0x06, 0x68, 0x2d, 0x58, 0xed, 0x4b, 0x06, 
+	0x40, 0x2b, 0x00, 0xc5, 0x4e, 0x03, 0x68, 0x36, 
+	0x51, 0x73, 0xe7, 0xe0, 0x20, 0x00, 0xe7, 0xbb, 
+	0xe7, 0xba, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x3c, 
+	0xff, 0xff, 0xe1, 0xff, 0xb4, 0xb0, 0x1c, 0x07, 
+	0x1c, 0x0a, 0x06, 0x38, 0x0e, 0x00, 0x06, 0x11, 
+	0x0e, 0x09, 0x4c, 0x14, 0x68, 0x25, 0x4b, 0x14, 
+	0x40, 0x2b, 0x60, 0x23, 0x28, 0x01, 0xd1, 0x06, 
+	0x4c, 0x10, 0x68, 0x25, 0x23, 0x01, 0x04, 0x1b, 
+	0x43, 0x2b, 0x60, 0x23, 0xe0, 0x07, 0x28, 0x00, 
+	0xd1, 0x05, 0x4c, 0x0c, 0x68, 0x25, 0x23, 0x01, 
+	0x05, 0x9b, 0x43, 0x2b, 0x60, 0x23, 0x29, 0x01, 
+	0xd1, 0x06, 0x4c, 0x08, 0x68, 0x25, 0x23, 0x01, 
+	0x03, 0x9b, 0x43, 0x2b, 0x60, 0x23, 0xe0, 0x07, 
+	0x29, 0x02, 0xd1, 0x05, 0x4c, 0x03, 0x68, 0x25, 
+	0x23, 0x01, 0x03, 0xdb, 0x43, 0x2b, 0x60, 0x23, 
+	0xbc, 0xb0, 0x47, 0x70, 0x64, 0x00, 0x00, 0x24, 
+	0xff, 0xbe, 0x3f, 0xff, 0xb5, 0xff, 0x1c, 0x1f, 
+	0x9c, 0x09, 0xb0, 0x82, 0x98, 0x02, 0x04, 0x00, 
+	0x0c, 0x00, 0x90, 0x00, 0x99, 0x03, 0x06, 0x0a, 
+	0x0e, 0x12, 0x98, 0x04, 0x06, 0x05, 0x0e, 0x2d, 
+	0x98, 0x0c, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x01, 
+	0x00, 0xd0, 0x1a, 0x80, 0x00, 0x80, 0x4b, 0x1b, 
+	0x68, 0x1b, 0x18, 0xc1, 0x2a, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2d, 0x1f, 0xdb, 0x02, 
+	0x20, 0xaf, 0xb0, 0x02, 0xe7, 0xf6, 0x71, 0x8d, 
+	0x68, 0x3b, 0x00, 0xd0, 0x4e, 0x12, 0x68, 0x36, 
+	0x19, 0x80, 0x60, 0x43, 0x1c, 0x20, 0x71, 0xc8, 
+	0x20, 0x00, 0x80, 0x88, 0x20, 0x00, 0x60, 0xc8, 
+	0x98, 0x00, 0x23, 0x01, 0x43, 0x18, 0x75, 0x08, 
+	0x98, 0x01, 0x74, 0x88, 0x60, 0x8f, 0x88, 0xb8, 
+	0x82, 0x08, 0x20, 0x00, 0x74, 0xc8, 0x88, 0xb8, 
+	0x61, 0x38, 0x20, 0x00, 0x73, 0x38, 0x20, 0x00, 
+	0x73, 0x78, 0x20, 0x00, 0x73, 0xb8, 0x20, 0x00, 
+	0x73, 0xf8, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xd1, 
+	0xb0, 0x02, 0xe7, 0xcf, 0x2e, 0x08, 0x9b, 0x30, 
+	0x2e, 0x08, 0x9b, 0x40, 0xb5, 0xf3, 0x98, 0x00, 
+	0x06, 0x04, 0x0e, 0x24, 0x99, 0x01, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x00, 0xe0, 0x1b, 0x00, 0x00, 0x80, 
+	0x49, 0x25, 0x68, 0x09, 0x18, 0x47, 0x2c, 0x20, 
+	0xdb, 0x04, 0x20, 0xa2, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x4b, 0x21, 0x42, 0x9d, 
+	0xd1, 0x27, 0x00, 0xe1, 0x4b, 0x20, 0x68, 0x1b, 
+	0x18, 0xc8, 0x00, 0xa1, 0x4b, 0x1f, 0x68, 0x1b, 
+	0x18, 0xca, 0x68, 0x11, 0x4b, 0x1e, 0x40, 0x19, 
+	0x60, 0x11, 0x68, 0x01, 0x23, 0x40, 0x40, 0x19, 
+	0xd0, 0x13, 0x68, 0x01, 0x23, 0x40, 0x43, 0xdb, 
+	0x40, 0x19, 0x60, 0x01, 0x21, 0x00, 0x4b, 0x19, 
+	0x68, 0x1b, 0x70, 0x19, 0x49, 0x18, 0x68, 0x0b, 
+	0x08, 0x5b, 0x00, 0x5b, 0x60, 0x0b, 0x49, 0x17, 
+	0x68, 0x0e, 0x23, 0x01, 0x05, 0x5b, 0x43, 0x33, 
+	0x60, 0x0b, 0x68, 0x01, 0x4b, 0x14, 0x40, 0x19, 
+	0x60, 0x01, 0x20, 0x00, 0x75, 0x38, 0x20, 0x00, 
+	0x80, 0x38, 0x20, 0x00, 0x80, 0xb8, 0x68, 0xb8, 
+	0x72, 0x44, 0x20, 0xa0, 0x68, 0xb9, 0x72, 0x08, 
+	0x20, 0x00, 0x60, 0xb8, 0x79, 0xb9, 0x20, 0x01, 
+	0x40, 0x88, 0xf0, 0x12, 0xfe, 0x1f, 0x20, 0x00, 
+	0x71, 0xb8, 0x20, 0x00, 0xe7, 0xba, 0xe7, 0xb9, 
+	0x2e, 0x08, 0x9b, 0x30, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x9b, 0x3c, 0x2e, 0x08, 0x9b, 0x38, 
+	0xff, 0xff, 0xdf, 0xff, 0x2e, 0x08, 0x9b, 0x2c, 
+	0x6a, 0x00, 0x00, 0x18, 0x6c, 0x00, 0x00, 0x20, 
+	0xff, 0xff, 0x3f, 0xde, 0xb5, 0xff, 0x1c, 0x05, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x28, 0x0e, 0x00, 
+	0x06, 0x23, 0x0e, 0x1b, 0x06, 0x39, 0x0e, 0x09, 
+	0x9e, 0x03, 0x06, 0x36, 0x16, 0x32, 0x28, 0x20, 
+	0xda, 0x02, 0x4e, 0x08, 0x68, 0x36, 0x60, 0x30, 
+	0x4e, 0x07, 0x68, 0x36, 0x60, 0x33, 0x4e, 0x07, 
+	0x68, 0x36, 0x60, 0x31, 0x4e, 0x06, 0x68, 0x36, 
+	0x60, 0x32, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x58, 
+	0x2e, 0x08, 0x9b, 0x5c, 0x2e, 0x08, 0x9b, 0x60, 
+	0x2e, 0x08, 0x9b, 0x64, 0x1c, 0x01, 0x06, 0x08, 
+	0x0e, 0x00, 0x28, 0x01, 0xd1, 0x04, 0x22, 0x01, 
+	0x4b, 0x04, 0x68, 0x1b, 0x60, 0x1a, 0xe0, 0x03, 
+	0x22, 0x02, 0x4b, 0x02, 0x68, 0x1b, 0x60, 0x1a, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xa0, 
+	0xb5, 0xf1, 0x98, 0x00, 0x06, 0x04, 0x0e, 0x24, 
+	0xb0, 0x81, 0x27, 0x00, 0x26, 0x00, 0x4a, 0x55, 
+	0x92, 0x00, 0x00, 0xe0, 0x49, 0x54, 0x68, 0x09, 
+	0x58, 0x08, 0x23, 0x03, 0x03, 0x9b, 0x40, 0x18, 
+	0x23, 0x01, 0x03, 0x9b, 0x42, 0x98, 0xd0, 0x05, 
+	0x20, 0xa0, 0xb0, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0xe0, 0x49, 0x4c, 
+	0x68, 0x09, 0x58, 0x08, 0x21, 0x20, 0x43, 0x01, 
+	0x00, 0xe0, 0x4a, 0x49, 0x68, 0x12, 0x50, 0x11, 
+	0x21, 0x00, 0x48, 0x48, 0xf0, 0x05, 0xfc, 0x3c, 
+	0x48, 0x47, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x01, 
+	0xe0, 0x08, 0xe0, 0x82, 0x20, 0x02, 0xf0, 0x0c, 
+	0xf8, 0x75, 0x1c, 0x38, 0x37, 0x01, 0x4b, 0x43, 
+	0x42, 0x98, 0xd3, 0xf1, 0x4b, 0x41, 0x42, 0x9f, 
+	0xd3, 0x00, 0x26, 0xa1, 0x48, 0x40, 0x68, 0x01, 
+	0x4b, 0x40, 0x40, 0x19, 0x60, 0x01, 0x20, 0x00, 
+	0x00, 0xe1, 0x1b, 0x09, 0x00, 0x89, 0x4a, 0x3e, 
+	0x68, 0x12, 0x18, 0x89, 0x70, 0x88, 0x20, 0x00, 
+	0x43, 0xc0, 0x49, 0x3c, 0x67, 0x48, 0x22, 0x00, 
+	0xb4, 0x04, 0x1c, 0x20, 0x23, 0x00, 0x22, 0x00, 
+	0x49, 0x39, 0xf7, 0xff, 0xfc, 0x69, 0xb0, 0x01, 
+	0x27, 0x00, 0x25, 0x00, 0x2d, 0x04, 0xdb, 0x02, 
+	0xe0, 0x1e, 0x35, 0x01, 0xe7, 0xfa, 0x00, 0xa9, 
+	0x22, 0x0f, 0x1c, 0x10, 0x40, 0x88, 0x01, 0x29, 
+	0x9a, 0x00, 0x18, 0x89, 0x68, 0x49, 0x42, 0xa1, 
+	0xd1, 0x11, 0x21, 0x33, 0x06, 0x49, 0x6b, 0xc9, 
+	0x40, 0x01, 0xd0, 0x01, 0x37, 0x01, 0xe0, 0x00, 
+	0xe0, 0x02, 0x4b, 0x26, 0x42, 0x9f, 0xd3, 0xf4, 
+	0x4b, 0x24, 0x42, 0x9f, 0xd3, 0x02, 0x26, 0xa1, 
+	0xe0, 0x02, 0xe0, 0x3a, 0x27, 0x00, 0xe7, 0xe0, 
+	0x48, 0x26, 0x68, 0x01, 0x23, 0xff, 0x33, 0x01, 
+	0x43, 0x19, 0x60, 0x01, 0x48, 0x21, 0x6d, 0x80, 
+	0x49, 0x20, 0x65, 0x88, 0x48, 0x1f, 0x6b, 0xc0, 
+	0x23, 0x01, 0x07, 0x9b, 0x40, 0x18, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 
+	0x21, 0x33, 0x06, 0x49, 0x66, 0x48, 0x20, 0x33, 
+	0x06, 0x40, 0x6d, 0x80, 0x21, 0x33, 0x06, 0x49, 
+	0x66, 0x88, 0x20, 0x03, 0x02, 0x00, 0x49, 0x15, 
+	0x67, 0x48, 0x48, 0x11, 0x68, 0x01, 0x23, 0x01, 
+	0x02, 0x5b, 0x43, 0x19, 0x60, 0x01, 0x20, 0x00, 
+	0x49, 0x13, 0x65, 0x88, 0x20, 0x00, 0x49, 0x12, 
+	0x65, 0xc8, 0x20, 0x00, 0x49, 0x10, 0x66, 0x08, 
+	0x21, 0x00, 0x20, 0xff, 0xf0, 0x05, 0xfb, 0xb8, 
+	0x1c, 0x30, 0xb0, 0x01, 0xe7, 0x66, 0xb0, 0x01, 
+	0xe7, 0x64, 0xe7, 0x63, 0x9e, 0x00, 0x00, 0xc0, 
+	0x2e, 0x08, 0x9b, 0x3c, 0x00, 0x00, 0x80, 0x0f, 
+	0xcc, 0x00, 0x05, 0x00, 0x00, 0x1e, 0x84, 0x80, 
+	0x66, 0x00, 0x00, 0x4c, 0xff, 0xff, 0xfd, 0xff, 
+	0x2e, 0x08, 0x9b, 0x30, 0x66, 0x00, 0x00, 0x80, 
+	0x00, 0x00, 0xff, 0xff, 0x66, 0x00, 0x00, 0xe0, 
+	0xcc, 0x00, 0x00, 0x00, 0xb5, 0xf1, 0x98, 0x00, 
+	0x06, 0x07, 0x0e, 0x3f, 0xb0, 0x81, 0x25, 0x00, 
+	0x26, 0x00, 0x4a, 0x2e, 0x92, 0x00, 0x00, 0xf8, 
+	0x49, 0x2d, 0x68, 0x09, 0x58, 0x08, 0x23, 0x03, 
+	0x03, 0x9b, 0x40, 0x18, 0x23, 0x01, 0x03, 0xdb, 
+	0x42, 0x98, 0xd0, 0x05, 0x20, 0xa0, 0xb0, 0x01, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x22, 0x00, 0xb4, 0x04, 0x1c, 0x38, 0x23, 0x00, 
+	0x22, 0x00, 0x49, 0x24, 0xf7, 0xff, 0xfb, 0xd0, 
+	0xb0, 0x01, 0x24, 0x00, 0x2c, 0x04, 0xdb, 0x02, 
+	0xe0, 0x1e, 0x34, 0x01, 0xe7, 0xfa, 0x00, 0xa1, 
+	0x22, 0x0f, 0x1c, 0x10, 0x40, 0x88, 0x01, 0x21, 
+	0x9a, 0x00, 0x18, 0x89, 0x68, 0x49, 0x42, 0xb9, 
+	0xd1, 0x11, 0x21, 0x33, 0x06, 0x49, 0x6b, 0xc9, 
+	0x40, 0x01, 0xd0, 0x01, 0x35, 0x01, 0xe0, 0x00, 
+	0xe0, 0x02, 0x4b, 0x17, 0x42, 0x9d, 0xd3, 0xf4, 
+	0x4b, 0x15, 0x42, 0x9d, 0xd9, 0x02, 0x26, 0xa1, 
+	0xe0, 0x02, 0xe0, 0x1d, 0x25, 0x00, 0xe7, 0xe0, 
+	0x20, 0x04, 0xf0, 0x02, 0xff, 0xb7, 0x20, 0x01, 
+	0x21, 0x33, 0x06, 0x49, 0x66, 0xc8, 0x21, 0x00, 
+	0x00, 0xf8, 0x4a, 0x0b, 0x68, 0x12, 0x50, 0x11, 
+	0x21, 0x00, 0x00, 0xf8, 0x4a, 0x08, 0x68, 0x12, 
+	0x18, 0x80, 0x60, 0x41, 0x21, 0x00, 0x00, 0xb8, 
+	0x4a, 0x08, 0x68, 0x12, 0x50, 0x11, 0x1c, 0x30, 
+	0xb0, 0x01, 0xe7, 0xb5, 0xb0, 0x01, 0xe7, 0xb3, 
+	0xe7, 0xb2, 0x00, 0x00, 0x9e, 0x00, 0x00, 0xc0, 
+	0x2e, 0x08, 0x9b, 0x3c, 0x00, 0x00, 0xff, 0xff, 
+	0x00, 0x01, 0xd4, 0xc0, 0x2e, 0x08, 0x9b, 0x38, 
+	0xb5, 0xff, 0x99, 0x01, 0x06, 0x0f, 0x0e, 0x3f, 
+	0x9a, 0x02, 0x06, 0x15, 0x0e, 0x2d, 0x9b, 0x03, 
+	0x06, 0x1e, 0x0e, 0x36, 0x2d, 0x1f, 0xdb, 0x04, 
+	0x20, 0xaf, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x2f, 0x20, 0xdb, 0x01, 0x20, 0xa2, 
+	0xe7, 0xf7, 0x2e, 0x80, 0xd0, 0x13, 0xf0, 0x12, 
+	0xfc, 0xc3, 0x1c, 0x04, 0x1c, 0x39, 0x22, 0x80, 
+	0x20, 0x01, 0xf0, 0x00, 0xfb, 0x6d, 0x2c, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfc, 0xef, 0x98, 0x00, 
+	0x21, 0x80, 0x68, 0x49, 0x60, 0x08, 0x48, 0x09, 
+	0x68, 0x00, 0x70, 0x05, 0xe0, 0x0b, 0xf0, 0x12, 
+	0xfc, 0xaf, 0x1c, 0x04, 0x1c, 0x39, 0x22, 0x80, 
+	0x20, 0x02, 0xf0, 0x00, 0xfb, 0x59, 0x2c, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfc, 0xdb, 0x20, 0x00, 
+	0xe7, 0xd3, 0xe7, 0xd2, 0x2e, 0x08, 0x9b, 0x88, 
+	0xb5, 0xff, 0x99, 0x01, 0x06, 0x0e, 0x0e, 0x36, 
+	0x9a, 0x02, 0x06, 0x17, 0x0e, 0x3f, 0x9b, 0x03, 
+	0x06, 0x1c, 0x0e, 0x24, 0xb0, 0x82, 0x20, 0x80, 
+	0x40, 0x38, 0x90, 0x00, 0x06, 0x7f, 0x0e, 0x7f, 
+	0x2e, 0x1f, 0xdb, 0x05, 0x20, 0xaf, 0xb0, 0x02, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2c, 0x20, 0xdb, 0x02, 0x20, 0xa2, 0xb0, 0x02, 
+	0xe7, 0xf6, 0x2f, 0x04, 0xd1, 0x00, 0x27, 0x00, 
+	0x00, 0xe0, 0x1b, 0x00, 0x00, 0x80, 0x49, 0x17, 
+	0x68, 0x09, 0x18, 0x40, 0x90, 0x01, 0x98, 0x00, 
+	0x28, 0x00, 0xd0, 0x0d, 0xf0, 0x12, 0xfc, 0x74, 
+	0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x02, 0x92, 
+	0x20, 0x02, 0xf0, 0x00, 0xfb, 0x1d, 0x2d, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfc, 0x9f, 0xe0, 0x13, 
+	0xf0, 0x12, 0xfc, 0x66, 0x1c, 0x05, 0x1c, 0x21, 
+	0x22, 0x01, 0x02, 0x92, 0x20, 0x01, 0xf0, 0x00, 
+	0xfb, 0x0f, 0x2d, 0x80, 0xd0, 0x01, 0xf0, 0x12, 
+	0xfc, 0x91, 0x98, 0x02, 0x21, 0x80, 0x68, 0x89, 
+	0x60, 0x08, 0x20, 0x80, 0x6a, 0x00, 0x55, 0xc6, 
+	0x20, 0x00, 0xb0, 0x02, 0xe7, 0xc4, 0xb0, 0x02, 
+	0xe7, 0xc2, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x30, 
+	0xb5, 0xff, 0xb0, 0x82, 0x99, 0x03, 0x04, 0x0d, 
+	0x0c, 0x2d, 0x9a, 0x04, 0x06, 0x10, 0x0e, 0x00, 
+	0x90, 0x00, 0x9b, 0x05, 0x06, 0x18, 0x0e, 0x00, 
+	0x90, 0x01, 0x98, 0x00, 0x28, 0x1f, 0xdb, 0x05, 
+	0x20, 0xaf, 0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x98, 0x01, 0x23, 0x80, 
+	0x40, 0x18, 0xd1, 0x2f, 0x98, 0x00, 0x49, 0x2c, 
+	0x68, 0x09, 0x73, 0x08, 0x27, 0x00, 0x2f, 0x20, 
+	0xdb, 0x04, 0xe0, 0x26, 0x1c, 0x78, 0x06, 0x07, 
+	0x0e, 0x3f, 0xe7, 0xf8, 0x20, 0x01, 0x40, 0xb8, 
+	0x99, 0x02, 0x40, 0x08, 0xd0, 0x1c, 0x24, 0x00, 
+	0x20, 0x40, 0x40, 0x28, 0xd0, 0x04, 0x04, 0x20, 
+	0x0c, 0x00, 0x24, 0x01, 0x03, 0xa4, 0x43, 0x04, 
+	0x20, 0x80, 0x40, 0x28, 0xd0, 0x04, 0x04, 0x20, 
+	0x0c, 0x00, 0x24, 0x01, 0x03, 0xe4, 0x43, 0x04, 
+	0xf0, 0x12, 0xfc, 0x0e, 0x1c, 0x06, 0x1c, 0x22, 
+	0x1c, 0x39, 0x20, 0x01, 0xf0, 0x00, 0xfa, 0xb8, 
+	0x2e, 0x80, 0xd0, 0x01, 0xf0, 0x12, 0xfc, 0x3a, 
+	0xe7, 0xd8, 0xe0, 0x24, 0x27, 0x00, 0x2f, 0x20, 
+	0xdb, 0x04, 0xe0, 0x20, 0x1c, 0x78, 0x06, 0x07, 
+	0x0e, 0x3f, 0xe7, 0xf8, 0x20, 0x01, 0x40, 0xb8, 
+	0x99, 0x02, 0x40, 0x08, 0xd0, 0x16, 0x24, 0x00, 
+	0x20, 0x40, 0x40, 0x28, 0xd0, 0x01, 0x4b, 0x0d, 
+	0x40, 0x1c, 0x20, 0x80, 0x40, 0x28, 0xd0, 0x01, 
+	0x04, 0x64, 0x0c, 0x64, 0xf0, 0x12, 0xfb, 0xe8, 
+	0x1c, 0x06, 0x1c, 0x22, 0x1c, 0x39, 0x20, 0x02, 
+	0xf0, 0x00, 0xfa, 0x92, 0x2e, 0x80, 0xd0, 0x01, 
+	0xf0, 0x12, 0xfc, 0x14, 0xe7, 0xde, 0x20, 0x00, 
+	0xb0, 0x02, 0xe7, 0x9f, 0xb0, 0x02, 0xe7, 0x9d, 
+	0x2e, 0x08, 0x9b, 0x7c, 0x00, 0x00, 0xbf, 0xff, 
+	0xb5, 0x80, 0x1c, 0x07, 0x48, 0x07, 0x68, 0x01, 
+	0x20, 0x00, 0xf0, 0x1b, 0xfa, 0xad, 0x60, 0x38, 
+	0x48, 0x04, 0x68, 0x00, 0x1d, 0x01, 0x20, 0x00, 
+	0xf0, 0x1b, 0xfa, 0xa6, 0x60, 0x78, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x9b, 0x7c, 
+	0xb5, 0xf7, 0x1c, 0x07, 0x99, 0x01, 0x06, 0x0e, 
+	0x0e, 0x36, 0x9a, 0x02, 0x06, 0x14, 0x0e, 0x24, 
+	0x2e, 0x1f, 0xdb, 0x04, 0x20, 0xaf, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x2c, 0x20, 
+	0xdb, 0x01, 0x20, 0xa2, 0xe7, 0xf7, 0x20, 0x80, 
+	0x40, 0x20, 0xd0, 0x0d, 0xf0, 0x12, 0xfb, 0xa8, 
+	0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x02, 0xd2, 
+	0x20, 0x02, 0xf0, 0x00, 0xfa, 0x51, 0x2d, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfb, 0xd3, 0xe0, 0x16, 
+	0x48, 0x0c, 0x68, 0x00, 0x60, 0x07, 0x48, 0x0b, 
+	0x68, 0x00, 0x71, 0x46, 0x20, 0xff, 0x49, 0x09, 
+	0x68, 0x09, 0x71, 0x08, 0xf0, 0x12, 0xfb, 0x90, 
+	0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x02, 0xd2, 
+	0x20, 0x01, 0xf0, 0x00, 0xfa, 0x39, 0x2d, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfb, 0xbb, 0x20, 0x00, 
+	0xe7, 0xcd, 0xe7, 0xcc, 0x2e, 0x08, 0x9b, 0x80, 
+	0xb5, 0xf7, 0x1c, 0x07, 0x99, 0x01, 0x06, 0x0e, 
+	0x0e, 0x36, 0x9a, 0x02, 0x06, 0x14, 0x0e, 0x24, 
+	0x2e, 0x1f, 0xdb, 0x04, 0x20, 0xaf, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x2c, 0x20, 
+	0xdb, 0x01, 0x20, 0xa2, 0xe7, 0xf7, 0x20, 0x80, 
+	0x40, 0x20, 0xd0, 0x0d, 0xf0, 0x12, 0xfb, 0x68, 
+	0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x03, 0x12, 
+	0x20, 0x02, 0xf0, 0x00, 0xfa, 0x11, 0x2d, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfb, 0x93, 0xe0, 0x16, 
+	0x48, 0x0c, 0x68, 0x00, 0x60, 0x07, 0x48, 0x0b, 
+	0x68, 0x00, 0x71, 0x46, 0x20, 0xff, 0x49, 0x09, 
+	0x68, 0x09, 0x71, 0x08, 0xf0, 0x12, 0xfb, 0x50, 
+	0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x03, 0x12, 
+	0x20, 0x01, 0xf0, 0x00, 0xf9, 0xf9, 0x2d, 0x80, 
+	0xd0, 0x01, 0xf0, 0x12, 0xfb, 0x7b, 0x20, 0x00, 
+	0xe7, 0xcd, 0xe7, 0xcc, 0x2e, 0x08, 0x9b, 0x84, 
+	0xb5, 0xff, 0xb0, 0x81, 0x98, 0x01, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x00, 0x99, 0x02, 0x06, 0x0d, 
+	0x0e, 0x2d, 0x9a, 0x03, 0x06, 0x16, 0x0e, 0x36, 
+	0x9f, 0x04, 0x1c, 0x29, 0x98, 0x00, 0xf0, 0x00, 
+	0xf8, 0x91, 0x28, 0x00, 0xd0, 0x05, 0x20, 0xa2, 
+	0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x79, 0x38, 0x79, 0x79, 0x18, 0x40, 
+	0x79, 0xb9, 0x18, 0x40, 0x06, 0x04, 0x0e, 0x24, 
+	0x79, 0xb8, 0x02, 0x00, 0x43, 0x04, 0x00, 0x68, 
+	0x19, 0x80, 0x01, 0x00, 0x49, 0x15, 0x68, 0x09, 
+	0x50, 0x0c, 0x9b, 0x04, 0x88, 0x99, 0x00, 0x68, 
+	0x19, 0x80, 0x01, 0x00, 0x4a, 0x11, 0x68, 0x12, 
+	0x18, 0x80, 0x60, 0x41, 0x78, 0x78, 0x78, 0x39, 
+	0x18, 0x40, 0x78, 0xb9, 0x18, 0x40, 0x06, 0x04, 
+	0x0e, 0x24, 0x78, 0xb8, 0x02, 0x00, 0x43, 0x04, 
+	0x00, 0x68, 0x19, 0x80, 0x01, 0x00, 0x49, 0x09, 
+	0x68, 0x09, 0x18, 0x40, 0x60, 0x84, 0x9b, 0x04, 
+	0x88, 0x19, 0x00, 0x68, 0x19, 0x80, 0x01, 0x00, 
+	0x4a, 0x04, 0x68, 0x12, 0x18, 0x80, 0x60, 0xc1, 
+	0x20, 0x00, 0xb0, 0x01, 0xe7, 0xc5, 0xb0, 0x01, 
+	0xe7, 0xc3, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x34, 
+	0xb5, 0xff, 0x1c, 0x07, 0x06, 0x3d, 0x0e, 0x2d, 
+	0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0x9a, 0x02, 
+	0x06, 0x16, 0x0e, 0x36, 0x1c, 0x21, 0x1c, 0x28, 
+	0xf0, 0x00, 0xf8, 0x40, 0x28, 0x00, 0xd0, 0x04, 
+	0x20, 0xa2, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x9a, 0x03, 0x1c, 0x31, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf8, 0x02, 0xe7, 0xf5, 0xe7, 0xf4, 
+	0xb4, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x13, 
+	0x06, 0x21, 0x0e, 0x09, 0x06, 0x3a, 0x0e, 0x12, 
+	0x29, 0x10, 0xdb, 0x02, 0x20, 0xa2, 0xbc, 0xf0, 
+	0x47, 0x70, 0x88, 0xdd, 0x00, 0x48, 0x18, 0x80, 
+	0x01, 0x00, 0x4e, 0x0f, 0x68, 0x36, 0x50, 0x35, 
+	0x88, 0x98, 0x00, 0x4d, 0x18, 0xad, 0x01, 0x2d, 
+	0x4e, 0x0b, 0x68, 0x36, 0x19, 0xad, 0x60, 0x68, 
+	0x88, 0x58, 0x00, 0x4d, 0x18, 0xad, 0x01, 0x2d, 
+	0x4e, 0x07, 0x68, 0x36, 0x19, 0xad, 0x60, 0xa8, 
+	0x88, 0x18, 0x00, 0x4d, 0x18, 0xad, 0x01, 0x2d, 
+	0x4e, 0x03, 0x68, 0x36, 0x19, 0xad, 0x60, 0xe8, 
+	0x20, 0x00, 0xe7, 0xdc, 0xe7, 0xdb, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0x34, 0xb4, 0xb0, 0x1c, 0x07, 
+	0x1c, 0x0a, 0x06, 0x39, 0x0e, 0x09, 0x06, 0x15, 
+	0x0e, 0x2d, 0xb0, 0x81, 0x29, 0x20, 0xdb, 0x03, 
+	0x20, 0xa2, 0xb0, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
+	0x2d, 0x10, 0xdb, 0x02, 0x20, 0xa2, 0xb0, 0x01, 
+	0xe7, 0xf8, 0x00, 0xc8, 0x4b, 0x0a, 0x68, 0x1b, 
+	0x18, 0xc4, 0x68, 0x20, 0x90, 0x00, 0x98, 0x00, 
+	0x4b, 0x08, 0x40, 0x18, 0x90, 0x00, 0x00, 0x68, 
+	0x23, 0x1e, 0x40, 0x18, 0x9b, 0x00, 0x43, 0x18, 
+	0x90, 0x00, 0x98, 0x00, 0x60, 0x20, 0x20, 0x00, 
+	0xb0, 0x01, 0xe7, 0xe3, 0xb0, 0x01, 0xe7, 0xe1, 
+	0x2e, 0x08, 0x9b, 0x3c, 0xff, 0xff, 0xdf, 0xe1, 
+	0x20, 0xff, 0x49, 0x02, 0x68, 0x09, 0x70, 0x08, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x98, 
+	0xb4, 0xb0, 0x1c, 0x07, 0x1c, 0x0a, 0xb0, 0x83, 
+	0x20, 0x00, 0x43, 0xc0, 0x23, 0x19, 0x06, 0x9b, 
+	0x67, 0x58, 0x08, 0xb9, 0x00, 0x89, 0x1a, 0x78, 
+	0x90, 0x02, 0x98, 0x02, 0x18, 0x10, 0x07, 0x80, 
+	0x0f, 0x80, 0x90, 0x01, 0x98, 0x02, 0x18, 0x10, 
+	0x08, 0x80, 0x90, 0x00, 0x9b, 0x02, 0x20, 0x03, 
+	0x1a, 0xc0, 0x23, 0x19, 0x06, 0x9b, 0x67, 0xd8, 
+	0x24, 0x00, 0x98, 0x00, 0x42, 0x84, 0xd3, 0x02, 
+	0xe0, 0x06, 0x34, 0x01, 0xe7, 0xf9, 0xc9, 0x08, 
+	0x20, 0x19, 0x06, 0x80, 0x67, 0x03, 0xe7, 0xf8, 
+	0x98, 0x01, 0x28, 0x00, 0xd0, 0x0b, 0x9b, 0x01, 
+	0x00, 0xd8, 0x25, 0x00, 0x43, 0xed, 0x40, 0xc5, 
+	0x1c, 0x2b, 0x43, 0xdb, 0x68, 0x0d, 0x40, 0x2b, 
+	0x25, 0x19, 0x06, 0xad, 0x67, 0x2b, 0x20, 0x19, 
+	0x06, 0x80, 0x6f, 0x40, 0xb0, 0x03, 0xbc, 0xb0, 
+	0x47, 0x70, 0xb0, 0x03, 0xe7, 0xfb, 0x1c, 0x01, 
+	0x06, 0x08, 0x0e, 0x00, 0x22, 0x19, 0x06, 0x92, 
+	0x63, 0x90, 0x47, 0x70, 0xb4, 0xf0, 0x48, 0x4d, 
+	0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x74, 
+	0x22, 0x00, 0x27, 0x00, 0x49, 0x4a, 0x20, 0x00, 
+	0x28, 0x20, 0xdb, 0x04, 0xe0, 0x16, 0x1c, 0x43, 
+	0x06, 0x18, 0x0e, 0x00, 0xe7, 0xf8, 0x00, 0x83, 
+	0x58, 0xcc, 0x23, 0x01, 0x03, 0x5b, 0x40, 0x23, 
+	0xd0, 0x0b, 0x24, 0x01, 0x40, 0x84, 0x1c, 0x23, 
+	0x43, 0x1f, 0x00, 0x83, 0x58, 0xcc, 0x23, 0x01, 
+	0x03, 0x5b, 0x43, 0x9c, 0x1c, 0x23, 0x00, 0x84, 
+	0x51, 0x0b, 0xe7, 0xe8, 0x20, 0x00, 0x28, 0x04, 
+	0xdb, 0x04, 0xe0, 0x1a, 0x1c, 0x43, 0x06, 0x18, 
+	0x0e, 0x00, 0xe7, 0xf8, 0x01, 0x05, 0x4b, 0x39, 
+	0x18, 0xec, 0x22, 0x00, 0x2a, 0x04, 0xdb, 0x04, 
+	0xe0, 0x0e, 0x1c, 0x53, 0x06, 0x1a, 0x0e, 0x12, 
+	0xe7, 0xf8, 0x4b, 0x35, 0x60, 0x23, 0x4b, 0x35, 
+	0x60, 0x63, 0x23, 0x00, 0x60, 0xa3, 0x23, 0x00, 
+	0x60, 0xe3, 0x34, 0xff, 0x34, 0x01, 0xe7, 0xf0, 
+	0xe7, 0xe4, 0xb0, 0x82, 0x4b, 0x2b, 0x69, 0xdc, 
+	0x23, 0x0c, 0x40, 0x23, 0x08, 0x9c, 0xab, 0x01, 
+	0x70, 0x1c, 0x4b, 0x28, 0x69, 0xdc, 0x23, 0x30, 
+	0x40, 0x23, 0x09, 0x1c, 0xab, 0x00, 0x70, 0x1c, 
+	0xab, 0x01, 0x78, 0x1b, 0xac, 0x00, 0x78, 0x24, 
+	0x42, 0xa3, 0xd1, 0x09, 0x23, 0x33, 0x06, 0x5b, 
+	0x6b, 0xdb, 0x2b, 0x00, 0xd1, 0x04, 0x4b, 0x1f, 
+	0x6a, 0x9b, 0x07, 0xdb, 0x0f, 0xdb, 0xd0, 0x21, 
+	0x4b, 0x1c, 0x69, 0xdd, 0x23, 0x0c, 0x40, 0x2b, 
+	0x08, 0x9c, 0x00, 0xa5, 0x26, 0x01, 0x40, 0xae, 
+	0x1c, 0x33, 0x25, 0x33, 0x06, 0x6d, 0x64, 0x2b, 
+	0x25, 0x01, 0x40, 0xa5, 0x1c, 0x2b, 0x4d, 0x1a, 
+	0x63, 0xab, 0x4b, 0x14, 0x69, 0xdd, 0x23, 0x0c, 
+	0x40, 0x2b, 0x08, 0x9d, 0xab, 0x01, 0x70, 0x1d, 
+	0xe0, 0x00, 0xe0, 0x1d, 0x4b, 0x0f, 0x69, 0xdd, 
+	0x23, 0x30, 0x40, 0x2b, 0x09, 0x1d, 0xab, 0x00, 
+	0x70, 0x1d, 0xe7, 0xcd, 0xb0, 0x02, 0x20, 0x00, 
+	0x28, 0x20, 0xdb, 0x04, 0xe0, 0x10, 0x1c, 0x43, 
+	0x06, 0x18, 0x0e, 0x00, 0xe7, 0xf8, 0x24, 0x01, 
+	0x40, 0x84, 0x1c, 0x23, 0x40, 0x3b, 0xd0, 0x06, 
+	0x00, 0x83, 0x58, 0xcc, 0x23, 0x01, 0x03, 0x5b, 
+	0x43, 0x23, 0x00, 0x84, 0x51, 0x0b, 0xe7, 0xee, 
+	0xbc, 0xf0, 0x47, 0x70, 0x66, 0x00, 0x01, 0x00, 
+	0x64, 0x00, 0x00, 0x80, 0x9e, 0x00, 0x00, 0xc0, 
+	0x9e, 0x00, 0x00, 0x00, 0x2e, 0x0f, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x80, 0xb4, 0x80, 0x1c, 0x03, 
+	0x1c, 0x0a, 0x48, 0x0a, 0x68, 0x00, 0x68, 0x01, 
+	0x20, 0x19, 0x06, 0x80, 0x6a, 0x80, 0x0a, 0x40, 
+	0x00, 0x4f, 0x43, 0x38, 0x60, 0x18, 0x0f, 0xc8, 
+	0x07, 0xc0, 0x60, 0x10, 0x68, 0x10, 0x0f, 0xc0, 
+	0x60, 0x10, 0x20, 0x00, 0xbc, 0x80, 0x47, 0x70, 
+	0xe7, 0xfc, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xa4, 
+	0xb5, 0x80, 0x1c, 0x07, 0x48, 0x05, 0x68, 0x00, 
+	0x1d, 0xc1, 0x31, 0x01, 0x20, 0x00, 0xf0, 0x1b, 
+	0xf8, 0x37, 0x60, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x7c, 
+	0xb4, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x13, 
+	0x06, 0x20, 0x0e, 0x00, 0x06, 0x39, 0x0e, 0x09, 
+	0x04, 0x1a, 0x0c, 0x12, 0x4d, 0x07, 0x68, 0x2d, 
+	0x70, 0xe8, 0x4d, 0x06, 0x68, 0x2d, 0x70, 0xa9, 
+	0x4d, 0x04, 0x68, 0x2d, 0x80, 0x2a, 0x25, 0x01, 
+	0x04, 0x2d, 0x26, 0x33, 0x06, 0x76, 0x60, 0x35, 
+	0xbc, 0xf0, 0x47, 0x70, 0x2e, 0x08, 0x9b, 0xa8, 
+	0x20, 0x0d, 0x06, 0xc0, 0x69, 0xc0, 0x47, 0x70, 
+	0xe7, 0xfd, 0x1c, 0x01, 0x31, 0x01, 0x23, 0x2d, 
+	0x01, 0x1b, 0x42, 0x99, 0xd9, 0x03, 0x20, 0x2d, 
+	0x01, 0x00, 0x47, 0x70, 0xe0, 0x01, 0x1c, 0x08, 
+	0xe7, 0xfb, 0xe7, 0xfa, 0xb5, 0xf3, 0xb0, 0x85, 
+	0x20, 0x00, 0x90, 0x03, 0x20, 0x00, 0x90, 0x02, 
+	0x9f, 0x05, 0x69, 0x3d, 0x69, 0x38, 0x28, 0x13, 
+	0xd1, 0x05, 0x20, 0x75, 0xb0, 0x05, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x99, 0x06, 
+	0x68, 0x88, 0x68, 0x09, 0x1a, 0x40, 0x1c, 0x41, 
+	0x91, 0x04, 0x69, 0x78, 0x23, 0x04, 0x40, 0x18, 
+	0xd0, 0x02, 0x99, 0x04, 0x08, 0x49, 0x91, 0x04, 
+	0x00, 0xa8, 0x49, 0xf8, 0x58, 0x08, 0x99, 0x04, 
+	0x43, 0x48, 0x61, 0xf8, 0x99, 0x06, 0x68, 0x88, 
+	0x68, 0x09, 0x1a, 0x40, 0x30, 0x01, 0x63, 0xb8, 
+	0x68, 0xf8, 0x90, 0x01, 0x48, 0xf2, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x06, 0x98, 0x01, 0x28, 0x19, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0xe0, 0x05, 0x98, 0x01, 0x28, 0x08, 0xd3, 0x01, 
+	0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 
+	0xd0, 0x07, 0x1d, 0xf8, 0x30, 0x21, 0x99, 0x06, 
+	0xf0, 0x02, 0xf9, 0xea, 0x20, 0x00, 0xb0, 0x05, 
+	0xe7, 0xc5, 0x49, 0xe6, 0x20, 0x91, 0xf0, 0x1a, 
+	0xff, 0xb7, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x0b, 0xfb, 0x64, 0xe7, 0xf5, 0x98, 0x01, 
+	0x00, 0x80, 0x49, 0xe1, 0x58, 0x08, 0x99, 0x05, 
+	0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 0x49, 0xdd, 
+	0x60, 0x08, 0x20, 0xff, 0xb0, 0x05, 0xe7, 0xae, 
+	0x48, 0xd9, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x03, 
+	0x2d, 0x0b, 0xdb, 0x26, 0x2d, 0x12, 0xdc, 0x24, 
+	0x2d, 0x0b, 0xdb, 0x0b, 0x2d, 0x12, 0xdc, 0x09, 
+	0x48, 0xd6, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
+	0x1d, 0xf8, 0x30, 0x21, 0x99, 0x06, 0xf0, 0x02, 
+	0xf9, 0xbb, 0xe0, 0x16, 0x6b, 0x38, 0xf7, 0xff, 
+	0xff, 0x7c, 0x90, 0x00, 0x6a, 0xb9, 0x9a, 0x00, 
+	0x48, 0xcf, 0xf0, 0x0c, 0xfb, 0x4b, 0x1d, 0xf8, 
+	0x30, 0x21, 0x99, 0x06, 0xf0, 0x02, 0xf9, 0xac, 
+	0x6b, 0x38, 0xf7, 0xff, 0xff, 0x6e, 0x90, 0x00, 
+	0x6a, 0xb9, 0x9a, 0x00, 0x48, 0xc8, 0xf0, 0x0c, 
+	0xfb, 0x6b, 0x48, 0xc8, 0x68, 0x00, 0x99, 0x05, 
+	0x42, 0x88, 0xd1, 0x30, 0x48, 0xc0, 0x68, 0x00, 
+	0x28, 0x00, 0xd1, 0x2c, 0x48, 0xc1, 0x68, 0x00, 
+	0x28, 0x00, 0xd1, 0x0a, 0x20, 0x0d, 0x06, 0xc0, 
+	0x68, 0xc0, 0x90, 0x02, 0x98, 0x02, 0x28, 0x01, 
+	0xd1, 0x03, 0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 
+	0x60, 0xc8, 0x48, 0xba, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x0d, 0x6a, 0xb8, 0x30, 0x01, 0x05, 0x00, 
+	0x6a, 0xf9, 0x31, 0x01, 0x02, 0x89, 0x43, 0x08, 
+	0x6b, 0x79, 0x31, 0x02, 0x43, 0x08, 0x21, 0x0d, 
+	0x06, 0xc9, 0x61, 0x88, 0xe0, 0x0b, 0x6a, 0xb8, 
+	0x30, 0x01, 0x05, 0x00, 0x6a, 0xf9, 0x31, 0x01, 
+	0x02, 0x89, 0x43, 0x08, 0x6b, 0x79, 0x31, 0x02, 
+	0x43, 0x08, 0x49, 0xaf, 0x60, 0x08, 0x2d, 0x0b, 
+	0xdb, 0x15, 0x2d, 0x12, 0xdc, 0x13, 0x48, 0xa9, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x0f, 0x48, 0xa4, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x0b, 0x20, 0x00, 
+	0x62, 0xb8, 0x20, 0x00, 0x62, 0xf8, 0x48, 0xa7, 
+	0x63, 0x38, 0x48, 0xa7, 0x63, 0x78, 0x6b, 0x38, 
+	0xf7, 0xff, 0xff, 0x1b, 0x90, 0x00, 0x48, 0x9c, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x16, 0x20, 0x0d, 
+	0x06, 0xc0, 0x68, 0x80, 0x90, 0x03, 0x20, 0x00, 
+	0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 0xf0, 0x01, 
+	0xfb, 0x07, 0x6b, 0x38, 0xf7, 0xff, 0xff, 0x09, 
+	0x90, 0x00, 0x9a, 0x00, 0x99, 0x01, 0x1c, 0x38, 
+	0xf0, 0x01, 0xfa, 0x8c, 0x98, 0x03, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x88, 0x48, 0x93, 0x68, 0x00, 
+	0x99, 0x05, 0x42, 0x88, 0xd1, 0x0b, 0x48, 0x8c, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x07, 0x48, 0x8d, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x03, 0x98, 0x02, 
+	0x21, 0x0d, 0x06, 0xc9, 0x60, 0xc8, 0x48, 0x86, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 0x48, 0x87, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x6f, 0xb0, 0x84, 
+	0x98, 0x05, 0xf0, 0x0c, 0xf9, 0xe1, 0x28, 0x00, 
+	0xd1, 0x0e, 0x2d, 0x0b, 0xdb, 0x01, 0x2d, 0x12, 
+	0xdd, 0x0a, 0x1d, 0xf8, 0x30, 0x21, 0x99, 0x0a, 
+	0xf0, 0x02, 0xf9, 0x12, 0x20, 0x92, 0x49, 0x7b, 
+	0x60, 0x08, 0x20, 0x00, 0xb0, 0x09, 0xe6, 0xea, 
+	0x49, 0x80, 0x20, 0x91, 0xf0, 0x1a, 0xfe, 0xdc, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0c, 
+	0xfa, 0x22, 0x20, 0x92, 0x49, 0x7b, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x7b, 0x68, 0x09, 0x60, 0x08, 
+	0x2d, 0x0b, 0xdb, 0x39, 0x2d, 0x12, 0xdc, 0x37, 
+	0xb0, 0x81, 0x24, 0x00, 0x20, 0x00, 0x90, 0x03, 
+	0x20, 0x01, 0x49, 0x75, 0x68, 0x09, 0x23, 0x07, 
+	0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0x6a, 0xb8, 
+	0x30, 0x01, 0x05, 0x00, 0x6a, 0xf9, 0x31, 0x01, 
+	0x02, 0x89, 0x43, 0x08, 0x6b, 0x79, 0x31, 0x02, 
+	0x43, 0x08, 0x90, 0x00, 0x20, 0x00, 0x62, 0xb8, 
+	0x20, 0x00, 0x62, 0xf8, 0x48, 0x67, 0x63, 0x38, 
+	0x48, 0x67, 0x63, 0x78, 0x6b, 0x38, 0xf7, 0xff, 
+	0xfe, 0x9c, 0x90, 0x02, 0x48, 0x66, 0x68, 0x00, 
+	0x23, 0x77, 0x01, 0x1b, 0x18, 0xc0, 0x9a, 0x02, 
+	0x1c, 0x39, 0xf0, 0x0b, 0xfe, 0x05, 0x98, 0x00, 
+	0x49, 0x61, 0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xc9, 0x66, 0xc8, 0x48, 0x5e, 0x68, 0x00, 
+	0xf0, 0x0c, 0xf9, 0xf8, 0xb0, 0x01, 0xe1, 0x2b, 
+	0x24, 0x00, 0x26, 0x00, 0x2e, 0x00, 0xd1, 0x16, 
+	0x2c, 0x07, 0xd2, 0x14, 0x6a, 0xf8, 0x05, 0x81, 
+	0x0d, 0x89, 0x1c, 0x20, 0x34, 0x01, 0x00, 0x83, 
+	0x18, 0x18, 0x00, 0xc0, 0xe0, 0x00, 0xe1, 0x3c, 
+	0x4a, 0x53, 0x68, 0x12, 0x18, 0x80, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 0x42, 0x81, 
+	0xd1, 0x00, 0x26, 0x01, 0xe7, 0xe6, 0x2e, 0x00, 
+	0xd1, 0x13, 0x2c, 0x18, 0xd2, 0x11, 0x6a, 0xf8, 
+	0x05, 0x81, 0x0d, 0x89, 0x1c, 0x20, 0x34, 0x01, 
+	0x23, 0x4c, 0x43, 0x58, 0x4a, 0x48, 0x68, 0x12, 
+	0x18, 0x80, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x69, 0x40, 0x42, 0x81, 0xd1, 0x00, 0x26, 0x01, 
+	0xe7, 0xe9, 0x3c, 0x01, 0x6b, 0x38, 0xf7, 0xff, 
+	0xfe, 0x50, 0x90, 0x01, 0x2c, 0x07, 0xd2, 0x05, 
+	0x48, 0x3f, 0x68, 0x01, 0x1c, 0x20, 0xf0, 0x0b, 
+	0xfc, 0xcb, 0xe0, 0x06, 0x2c, 0x18, 0xd2, 0x04, 
+	0x1f, 0xe0, 0x49, 0x3b, 0x68, 0x09, 0xf0, 0x0b, 
+	0xfd, 0x01, 0x48, 0x3a, 0x49, 0x38, 0x68, 0x09, 
+	0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x66, 0xc8, 
+	0x48, 0x36, 0x49, 0x35, 0x68, 0x09, 0x23, 0x09, 
+	0x01, 0xdb, 0x18, 0xc9, 0x67, 0x08, 0x48, 0x33, 
+	0x49, 0x31, 0x68, 0x09, 0x23, 0x09, 0x01, 0xdb, 
+	0x18, 0xc9, 0x66, 0x88, 0x48, 0x2f, 0x49, 0x2e, 
+	0x68, 0x09, 0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 
+	0x66, 0x48, 0x20, 0x00, 0x49, 0x2a, 0x68, 0x09, 
+	0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x64, 0x88, 
+	0x6b, 0x79, 0x48, 0x27, 0x68, 0x00, 0xf0, 0x0b, 
+	0xfd, 0x4b, 0x94, 0x02, 0x1d, 0xf8, 0x30, 0x21, 
+	0x99, 0x0a, 0xf0, 0x02, 0xf8, 0x4d, 0x24, 0x00, 
+	0x26, 0x00, 0x2e, 0x00, 0xd1, 0x14, 0x2c, 0x07, 
+	0xd2, 0x12, 0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 
+	0x1c, 0x20, 0x34, 0x01, 0x00, 0x83, 0x18, 0x18, 
+	0x00, 0xc0, 0x4a, 0x1b, 0x68, 0x12, 0x18, 0x80, 
+	0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 
+	0x42, 0x81, 0xda, 0x00, 0x26, 0x01, 0xe7, 0xe8, 
+	0x2e, 0x00, 0xd1, 0x2f, 0x2c, 0x18, 0xd2, 0x2d, 
+	0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 0x1c, 0x20, 
+	0x34, 0x01, 0x23, 0x4c, 0x43, 0x58, 0x4a, 0x10, 
+	0x68, 0x12, 0x18, 0x80, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x02, 0x69, 0x40, 0x42, 0x81, 0xda, 0x1c, 
+	0xe0, 0x1a, 0x00, 0x00, 0x2e, 0x03, 0xa8, 0xc8, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x2c, 
+	0x2e, 0x08, 0xb9, 0xc4, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xbb, 0x00, 0x2e, 0x08, 0xba, 0x28, 
+	0x2e, 0x08, 0x9b, 0xb8, 0x00, 0x00, 0x02, 0xcf, 
+	0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0xd1, 0xf4, 
+	0x2e, 0x08, 0xbb, 0x20, 0x00, 0x00, 0xff, 0xff, 
+	0x26, 0x01, 0xe7, 0xcd, 0x3c, 0x01, 0x6b, 0x38, 
+	0xf7, 0xff, 0xfd, 0xc3, 0x90, 0x01, 0x2c, 0x07, 
+	0xd2, 0x12, 0x48, 0x48, 0x68, 0x01, 0x1c, 0x20, 
+	0xf0, 0x0b, 0xfb, 0xcc, 0x00, 0xa0, 0x19, 0x00, 
+	0x00, 0xc0, 0x49, 0x44, 0x68, 0x09, 0x18, 0x40, 
+	0x23, 0x2b, 0x01, 0x5b, 0x18, 0xc0, 0x9a, 0x01, 
+	0x1c, 0x39, 0xf0, 0x0b, 0xfd, 0x21, 0xe0, 0x4a, 
+	0x2c, 0x18, 0xd2, 0x48, 0x1f, 0xe0, 0x49, 0x3d, 
+	0x68, 0x09, 0xf0, 0x0b, 0xfc, 0x0b, 0x20, 0x4c, 
+	0x43, 0x60, 0x49, 0x3a, 0x68, 0x09, 0x18, 0x40, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x0a, 0x9a, 0x01, 
+	0x1c, 0x39, 0xf0, 0x0b, 0xfd, 0x0d, 0x20, 0x4c, 
+	0x43, 0x60, 0x49, 0x34, 0x68, 0x09, 0x18, 0x40, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x82, 0x6f, 0xc0, 
+	0x28, 0x00, 0xd0, 0x17, 0x20, 0x4c, 0x43, 0x60, 
+	0x49, 0x2e, 0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 
+	0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 0x04, 0x00, 
+	0x0c, 0x00, 0xd0, 0x0b, 0x20, 0x4c, 0x43, 0x60, 
+	0x49, 0x28, 0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 
+	0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 0x0c, 0x00, 
+	0x04, 0x00, 0xd1, 0x0a, 0x20, 0x02, 0x21, 0x4c, 
+	0x43, 0x61, 0x4a, 0x22, 0x68, 0x12, 0x18, 0x89, 
+	0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 0x67, 0x48, 
+	0xe0, 0x09, 0x20, 0x03, 0x21, 0x4c, 0x43, 0x61, 
+	0x4a, 0x1c, 0x68, 0x12, 0x18, 0x89, 0x39, 0xff, 
+	0x39, 0xff, 0x39, 0x82, 0x67, 0x48, 0x48, 0x19, 
+	0x68, 0x00, 0xf0, 0x0c, 0xf8, 0xcf, 0x6b, 0x79, 
+	0x48, 0x16, 0x68, 0x00, 0xf0, 0x0b, 0xfc, 0x36, 
+	0x98, 0x02, 0x42, 0x84, 0xda, 0x01, 0x1c, 0x21, 
+	0xe0, 0x00, 0x99, 0x02, 0x91, 0x00, 0x99, 0x00, 
+	0x48, 0x10, 0x68, 0x00, 0xf0, 0x0b, 0xfd, 0x46, 
+	0x49, 0x0f, 0x20, 0x91, 0xf0, 0x1a, 0xfd, 0x58, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x0b, 
+	0x68, 0x00, 0x90, 0x03, 0x48, 0x0b, 0x68, 0x00, 
+	0x49, 0x08, 0x60, 0x08, 0x98, 0x03, 0x49, 0x09, 
+	0x60, 0x08, 0x20, 0x92, 0x49, 0x06, 0x60, 0x08, 
+	0xb0, 0x04, 0x20, 0x92, 0x49, 0x06, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x05, 0xe5, 0x4b, 0xb0, 0x05, 
+	0xe5, 0x49, 0x00, 0x00, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x24, 
+	0x2e, 0x08, 0xba, 0x2c, 0xb5, 0xff, 0x1c, 0x07, 
+	0x9d, 0x09, 0xb0, 0x89, 0x26, 0x00, 0x20, 0x00, 
+	0x90, 0x03, 0x99, 0x0a, 0x68, 0x4c, 0x2d, 0x13, 
+	0xd1, 0x05, 0x20, 0x75, 0xb0, 0x09, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x15, 
+	0x60, 0x04, 0x20, 0x00, 0x60, 0xe0, 0x20, 0x00, 
+	0x61, 0x20, 0x69, 0x60, 0x4b, 0xf9, 0x40, 0x18, 
+	0x61, 0x60, 0x02, 0x00, 0x69, 0x60, 0x4b, 0xf8, 
+	0x40, 0x18, 0x61, 0x60, 0x04, 0x80, 0x69, 0x60, 
+	0x4b, 0xf6, 0x40, 0x18, 0x61, 0x60, 0x05, 0x80, 
+	0x69, 0x60, 0x23, 0xc0, 0x43, 0xdb, 0x40, 0x18, 
+	0x61, 0x60, 0x06, 0x00, 0x69, 0x60, 0x4b, 0xf2, 
+	0x40, 0x18, 0x61, 0x60, 0x04, 0x40, 0x69, 0x60, 
+	0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0x61, 0x60, 
+	0x06, 0x80, 0x69, 0x60, 0x09, 0x40, 0x01, 0x40, 
+	0x61, 0x60, 0x06, 0xc0, 0x20, 0x00, 0x61, 0xa0, 
+	0x20, 0x00, 0x61, 0xe0, 0x20, 0x00, 0x62, 0x20, 
+	0x20, 0x00, 0x62, 0x60, 0x20, 0x00, 0x63, 0xa0, 
+	0x20, 0x00, 0x63, 0xe0, 0x20, 0x00, 0x64, 0x60, 
+	0x20, 0x00, 0x64, 0x20, 0x20, 0x00, 0x60, 0x20, 
+	0x20, 0x00, 0x71, 0x20, 0x99, 0x0a, 0x68, 0x48, 
+	0x64, 0xe0, 0x99, 0x0a, 0x68, 0x08, 0x64, 0xa0, 
+	0x1d, 0xe0, 0x30, 0x21, 0x99, 0x13, 0xf0, 0x01, 
+	0xff, 0x07, 0x2d, 0x0b, 0xdb, 0x06, 0x2d, 0x12, 
+	0xdc, 0x04, 0x1d, 0xe0, 0x30, 0x49, 0x99, 0x13, 
+	0xf0, 0x01, 0xfe, 0xfe, 0x6b, 0x20, 0x6a, 0xa1, 
+	0x1a, 0x40, 0x30, 0x01, 0x63, 0xa0, 0x00, 0xa8, 
+	0x49, 0xd4, 0x58, 0x08, 0x69, 0x61, 0x09, 0x49, 
+	0x01, 0x49, 0x06, 0xc0, 0x0e, 0xc0, 0x43, 0x08, 
+	0x61, 0x60, 0x06, 0xc0, 0x0e, 0xc0, 0x6b, 0x20, 
+	0x6a, 0xa1, 0x1a, 0x40, 0x1c, 0x41, 0x91, 0x04, 
+	0x69, 0x60, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x02, 
+	0x99, 0x04, 0x08, 0x49, 0x91, 0x04, 0x00, 0xa8, 
+	0x49, 0xc9, 0x58, 0x08, 0x99, 0x04, 0x43, 0x48, 
+	0x61, 0xe0, 0x2d, 0x13, 0xd1, 0x04, 0x20, 0x00, 
+	0x90, 0x14, 0x20, 0x00, 0x61, 0xa0, 0xe0, 0x13, 
+	0x9b, 0x0c, 0x68, 0x58, 0x90, 0x01, 0x98, 0x01, 
+	0x08, 0x80, 0x61, 0xa0, 0x98, 0x01, 0x64, 0x60, 
+	0x9b, 0x0c, 0x68, 0x18, 0x64, 0x20, 0x20, 0x00, 
+	0x62, 0x60, 0x9a, 0x0b, 0x63, 0xe2, 0x69, 0x60, 
+	0x4b, 0xb6, 0x40, 0x18, 0x61, 0x60, 0x02, 0x00, 
+	0x69, 0x60, 0x4b, 0xb6, 0x40, 0x18, 0x61, 0x60, 
+	0x05, 0x80, 0x69, 0x60, 0x23, 0x0f, 0x02, 0x9b, 
+	0x43, 0x18, 0x61, 0x60, 0x04, 0x80, 0x69, 0x60, 
+	0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0x61, 0x60, 
+	0x06, 0x80, 0x69, 0x60, 0x23, 0xc0, 0x43, 0x18, 
+	0x61, 0x60, 0x06, 0x00, 0x69, 0x60, 0x23, 0x01, 
+	0x03, 0x9b, 0x43, 0x18, 0x61, 0x60, 0x04, 0x40, 
+	0x98, 0x14, 0x60, 0xe0, 0x61, 0x25, 0x48, 0xab, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x06, 0x98, 0x14, 
+	0x28, 0x19, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0xe0, 0x05, 0x98, 0x14, 0x28, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x09, 
+	0xe7, 0x35, 0x49, 0xa1, 0x20, 0x91, 0xf0, 0x1a, 
+	0xfc, 0x5b, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x0b, 0xf8, 0x08, 0xe7, 0xf5, 0x48, 0x9d, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x53, 0x68, 0x38, 
+	0x01, 0x80, 0x0f, 0xc0, 0x68, 0xa1, 0x4b, 0x9a, 
+	0x40, 0x19, 0x07, 0xc0, 0x09, 0x80, 0x43, 0x08, 
+	0x60, 0xa0, 0x01, 0x80, 0x0f, 0xc0, 0x68, 0x38, 
+	0x01, 0xc0, 0x0f, 0xc0, 0x68, 0xa1, 0x4b, 0x95, 
+	0x40, 0x19, 0x07, 0xc0, 0x09, 0xc0, 0x43, 0x08, 
+	0x60, 0xa0, 0x01, 0xc0, 0x0f, 0xc0, 0x68, 0x38, 
+	0x02, 0x00, 0x0e, 0x00, 0x68, 0xa1, 0x4b, 0x85, 
+	0x40, 0x19, 0x06, 0x00, 0x0e, 0x00, 0x04, 0x00, 
+	0x43, 0x08, 0x60, 0xa0, 0x02, 0x00, 0x0e, 0x00, 
+	0x48, 0x86, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x2a, 
+	0x2f, 0x00, 0xd0, 0x28, 0x20, 0x0d, 0x06, 0xc0, 
+	0x6a, 0x00, 0x1c, 0x06, 0x68, 0x38, 0x4b, 0x85, 
+	0x43, 0x98, 0xd0, 0x06, 0x68, 0x38, 0x02, 0x00, 
+	0x0e, 0x01, 0x20, 0x01, 0x40, 0x88, 0x43, 0x06, 
+	0xe0, 0x05, 0x68, 0x38, 0x02, 0x00, 0x0e, 0x00, 
+	0x21, 0x01, 0x40, 0x81, 0x43, 0x8e, 0x68, 0x38, 
+	0x4b, 0x7b, 0x43, 0x98, 0xd0, 0x08, 0x68, 0x38, 
+	0x02, 0x00, 0x0e, 0x00, 0x1d, 0xc1, 0x31, 0x01, 
+	0x20, 0x01, 0x40, 0x88, 0x43, 0x06, 0xe0, 0x06, 
+	0x68, 0x38, 0x02, 0x00, 0x0e, 0x00, 0x30, 0x08, 
+	0x21, 0x01, 0x40, 0x81, 0x43, 0x8e, 0x2d, 0x0b, 
+	0xdb, 0x0a, 0x2d, 0x12, 0xdc, 0x08, 0x48, 0x6f, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x04, 0x20, 0x51, 
+	0x01, 0x00, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x08, 
+	0x98, 0x14, 0x00, 0x80, 0x49, 0x6c, 0x58, 0x08, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0x83, 0x90, 0x03, 
+	0x2d, 0x0b, 0xdb, 0x08, 0x2d, 0x12, 0xdc, 0x06, 
+	0x48, 0x68, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x01, 
+	0x20, 0x84, 0x90, 0x03, 0xe0, 0x06, 0x9a, 0x0b, 
+	0x2a, 0x01, 0xd1, 0x03, 0x2d, 0x13, 0xd0, 0x01, 
+	0x20, 0x82, 0x90, 0x03, 0x98, 0x03, 0x28, 0x00, 
+	0xd0, 0x07, 0x20, 0x92, 0x49, 0x5a, 0x60, 0x08, 
+	0x20, 0x08, 0x60, 0xe0, 0x98, 0x03, 0xb0, 0x09, 
+	0xe6, 0xa1, 0x98, 0x15, 0x68, 0x01, 0x98, 0x14, 
+	0x00, 0x80, 0x4a, 0x59, 0x50, 0x11, 0x6a, 0xa0, 
+	0x28, 0x00, 0xda, 0x01, 0x20, 0x00, 0x62, 0xa0, 
+	0x6b, 0x20, 0x28, 0x00, 0xdc, 0x01, 0x20, 0x01, 
+	0x63, 0x20, 0x6a, 0xe0, 0x28, 0x00, 0xda, 0x01, 
+	0x20, 0x00, 0x62, 0xe0, 0x6b, 0x60, 0x4b, 0x52, 
+	0x42, 0x98, 0xdd, 0x01, 0x48, 0x50, 0x63, 0x60, 
+	0x6b, 0x20, 0xf7, 0xff, 0xfb, 0x9e, 0x90, 0x00, 
+	0x2d, 0x13, 0xd1, 0x05, 0x6a, 0xa1, 0x9a, 0x00, 
+	0x48, 0x4c, 0xf0, 0x0b, 0xff, 0x99, 0xe0, 0x15, 
+	0x2d, 0x0b, 0xdb, 0x01, 0x2d, 0x12, 0xdd, 0x03, 
+	0x48, 0x40, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x0d, 
+	0x2d, 0x0b, 0xdb, 0x06, 0x2d, 0x12, 0xdc, 0x04, 
+	0x48, 0x3e, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x00, 
+	0xe0, 0x04, 0x6a, 0xa1, 0x9a, 0x00, 0x48, 0x41, 
+	0xf0, 0x0b, 0xff, 0x82, 0x2d, 0x0b, 0xdb, 0x5f, 
+	0x2d, 0x12, 0xdc, 0x5e, 0x98, 0x15, 0x68, 0x00, 
+	0x49, 0x3a, 0x60, 0x08, 0x99, 0x13, 0xa8, 0x05, 
+	0xf0, 0x01, 0xfd, 0xae, 0xa9, 0x05, 0x98, 0x15, 
+	0x68, 0x00, 0xf0, 0x05, 0xfc, 0x5f, 0x1d, 0xe0, 
+	0x30, 0x21, 0xa9, 0x05, 0xf0, 0x01, 0xfd, 0xa4, 
+	0x20, 0x01, 0x49, 0x35, 0x65, 0x08, 0x20, 0x02, 
+	0x21, 0x0d, 0x06, 0xc9, 0x60, 0xc8, 0x21, 0x00, 
+	0x20, 0x02, 0xf0, 0x04, 0xfa, 0xdd, 0x2d, 0x0b, 
+	0xd0, 0x05, 0x2d, 0x0f, 0xd0, 0x03, 0x2d, 0x10, 
+	0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x03, 0x21, 0x00, 
+	0x20, 0x12, 0xf0, 0x04, 0xfa, 0xd1, 0x2d, 0x0c, 
+	0xd0, 0x01, 0x2d, 0x0f, 0xd1, 0x03, 0x21, 0x00, 
+	0x20, 0x04, 0xf0, 0x04, 0xfa, 0xc9, 0x2d, 0x0d, 
+	0xd0, 0x01, 0x2d, 0x10, 0xd1, 0x03, 0x21, 0x00, 
+	0x20, 0x08, 0xf0, 0x04, 0xfa, 0xc1, 0x2d, 0x0e, 
+	0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x03, 0x21, 0x00, 
+	0x20, 0x01, 0xf0, 0x04, 0xfa, 0xb9, 0x48, 0x15, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 0xb0, 0x82, 
+	0x49, 0x1c, 0x20, 0x91, 0xf0, 0x1a, 0xfb, 0x40, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0b, 
+	0xfe, 0x86, 0x20, 0x92, 0x49, 0x17, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x17, 0x68, 0x09, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x15, 0x68, 0x09, 0x23, 0x07, 
+	0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0xe0, 0x25, 
+	0xe0, 0xae, 0xe0, 0xad, 0xff, 0x00, 0xff, 0xff, 
+	0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xfc, 0xff, 
+	0xff, 0xff, 0xbf, 0xff, 0x2e, 0x03, 0xa8, 0x78, 
+	0x2e, 0x03, 0xa8, 0xc8, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0x9d, 0xf0, 
+	0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 
+	0x2e, 0x08, 0xb9, 0xc4, 0x2e, 0x08, 0xba, 0x28, 
+	0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0xbb, 0x00, 
+	0xcc, 0x00, 0x00, 0x00, 0x2e, 0x08, 0xd1, 0xf4, 
+	0x2e, 0x08, 0xbb, 0x20, 0x6a, 0xa0, 0x30, 0x01, 
+	0x05, 0x00, 0x6a, 0xe1, 0x31, 0x01, 0x02, 0x89, 
+	0x43, 0x08, 0x6b, 0x61, 0x31, 0x02, 0x43, 0x08, 
+	0x90, 0x00, 0x20, 0x00, 0x62, 0xa0, 0x20, 0x00, 
+	0x62, 0xe0, 0x48, 0x5f, 0x63, 0x20, 0x48, 0x5f, 
+	0x63, 0x60, 0x6b, 0x20, 0xf7, 0xff, 0xfa, 0xe1, 
+	0x90, 0x02, 0x48, 0x5d, 0x68, 0x00, 0x23, 0x77, 
+	0x01, 0x1b, 0x18, 0xc0, 0x9a, 0x02, 0x1c, 0x21, 
+	0xf0, 0x0b, 0xfa, 0x4a, 0x98, 0x00, 0x49, 0x58, 
+	0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
+	0x66, 0xc8, 0x48, 0x55, 0x68, 0x00, 0x21, 0x00, 
+	0xf0, 0x0b, 0xfa, 0xc4, 0x48, 0x52, 0x68, 0x00, 
+	0xf0, 0x0b, 0xfe, 0x38, 0x49, 0x51, 0x20, 0x91, 
+	0xf0, 0x1a, 0xfa, 0xd2, 0xe0, 0x00, 0xe0, 0x11, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf6, 0x48, 0x4c, 
+	0x68, 0x00, 0x90, 0x01, 0x48, 0x4c, 0x68, 0x00, 
+	0x49, 0x49, 0x60, 0x08, 0x98, 0x01, 0x49, 0x4a, 
+	0x60, 0x08, 0x20, 0x92, 0x49, 0x47, 0x60, 0x08, 
+	0xb0, 0x02, 0xe0, 0x40, 0x48, 0x47, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x0c, 0x6a, 0xa0, 0x30, 0x01, 
+	0x05, 0x00, 0x6a, 0xe1, 0x31, 0x01, 0x02, 0x89, 
+	0x43, 0x08, 0x6b, 0x61, 0x31, 0x02, 0x43, 0x08, 
+	0x49, 0x41, 0x60, 0x08, 0xe0, 0x0c, 0x6a, 0xa0, 
+	0x30, 0x01, 0x05, 0x00, 0x6a, 0xe1, 0x31, 0x01, 
+	0x02, 0x89, 0x43, 0x08, 0x6b, 0x61, 0x31, 0x02, 
+	0x43, 0x08, 0x21, 0x0d, 0x06, 0xc9, 0x61, 0x88, 
+	0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 0x90, 0x02, 
+	0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 
+	0xf0, 0x00, 0xfe, 0x82, 0x48, 0x33, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x07, 0x20, 0x00, 0x62, 0xa0, 
+	0x20, 0x00, 0x62, 0xe0, 0x48, 0x2a, 0x63, 0x20, 
+	0x48, 0x2a, 0x63, 0x60, 0x6b, 0x20, 0xf7, 0xff, 
+	0xfa, 0x78, 0x90, 0x00, 0x9a, 0x00, 0x99, 0x14, 
+	0x1c, 0x20, 0xf0, 0x00, 0xfd, 0xfb, 0x98, 0x02, 
+	0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 0xe0, 0x05, 
+	0x2d, 0x13, 0xd1, 0x03, 0x20, 0x1f, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x08, 0x2d, 0x0b, 0xdb, 0x01, 
+	0x2d, 0x12, 0xdd, 0x1a, 0x48, 0x23, 0x68, 0x00, 
+	0x28, 0x00, 0xd1, 0x16, 0x20, 0x0d, 0x06, 0xc0, 
+	0x68, 0x80, 0x90, 0x02, 0x20, 0x00, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x88, 0xf0, 0x00, 0xfe, 0x50, 
+	0x6b, 0x20, 0xf7, 0xff, 0xfa, 0x52, 0x90, 0x00, 
+	0x9a, 0x00, 0x99, 0x14, 0x1c, 0x20, 0xf0, 0x00, 
+	0xfd, 0xd5, 0x98, 0x02, 0x21, 0x0d, 0x06, 0xc9, 
+	0x60, 0x88, 0x48, 0x14, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x06, 0x48, 0x14, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x02, 0x20, 0x0d, 0x06, 0xc0, 0x62, 0x06, 
+	0x48, 0x0e, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x07, 
+	0x48, 0x0e, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x03, 
+	0x98, 0x14, 0x21, 0x00, 0xf0, 0x0b, 0xfd, 0x0a, 
+	0x20, 0x92, 0x49, 0x0b, 0x60, 0x08, 0x20, 0x00, 
+	0xb0, 0x09, 0xe5, 0x10, 0xb0, 0x09, 0xe5, 0x0e, 
+	0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x02, 0x3f, 
+	0x2e, 0x08, 0xbb, 0x20, 0x2e, 0x08, 0xd1, 0xf4, 
+	0x2e, 0x08, 0xbb, 0x24, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0x9b, 0xb8, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0xb5, 0xf7, 0xb0, 0x83, 
+	0x9f, 0x03, 0x69, 0x38, 0x90, 0x00, 0x98, 0x00, 
+	0x28, 0x13, 0xd1, 0x05, 0x20, 0x75, 0xb0, 0x03, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x6c, 0x78, 0x99, 0x04, 0x60, 0x48, 0x6c, 0x38, 
+	0x99, 0x04, 0x60, 0x08, 0x6c, 0xf8, 0x9a, 0x05, 
+	0x60, 0x50, 0x6c, 0xb8, 0x9a, 0x05, 0x60, 0x10, 
+	0x68, 0xfd, 0x48, 0xf9, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x03, 
+	0xe7, 0xda, 0x49, 0xf0, 0x20, 0x91, 0xf0, 0x1a, 
+	0xf9, 0xf3, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x0a, 0xfd, 0xa0, 0xe7, 0xf5, 0x00, 0xa8, 
+	0x49, 0xeb, 0x58, 0x08, 0x99, 0x03, 0x42, 0x88, 
+	0xd0, 0x05, 0x20, 0x92, 0x49, 0xe7, 0x60, 0x08, 
+	0x20, 0xff, 0xb0, 0x03, 0xe7, 0xc4, 0x21, 0x00, 
+	0x00, 0xa8, 0x4a, 0xe5, 0x50, 0x11, 0x48, 0xe2, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x69, 0x38, 
+	0x28, 0x0b, 0xdb, 0x16, 0x69, 0x38, 0x28, 0x12, 
+	0xdc, 0x13, 0x48, 0xe0, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x06, 0x69, 0x38, 0x28, 0x0b, 0xdb, 0x03, 
+	0x69, 0x38, 0x28, 0x12, 0xdc, 0x00, 0xe0, 0x08, 
+	0x6b, 0x38, 0xf7, 0xff, 0xf9, 0xb6, 0x90, 0x01, 
+	0x6a, 0xb9, 0x9a, 0x01, 0x48, 0xd8, 0xf0, 0x0b, 
+	0xfd, 0x85, 0x69, 0x38, 0x28, 0x0b, 0xdb, 0x2e, 
+	0x69, 0x38, 0x28, 0x12, 0xdc, 0x2b, 0x48, 0xd0, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x27, 0x20, 0x00, 
+	0x49, 0xd2, 0x65, 0x08, 0x20, 0x01, 0x03, 0x00, 
+	0x49, 0xd0, 0x65, 0x48, 0x20, 0x00, 0x49, 0xcf, 
+	0x65, 0x88, 0x20, 0x00, 0x49, 0xcd, 0x65, 0xc8, 
+	0x20, 0x00, 0x49, 0xcc, 0x66, 0x08, 0x20, 0x00, 
+	0x49, 0xcb, 0x60, 0x08, 0x20, 0x02, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0xc8, 0x21, 0x00, 0x20, 0x02, 
+	0xf0, 0x04, 0xf9, 0x0a, 0x48, 0xc3, 0x68, 0x00, 
+	0x28, 0x00, 0xd1, 0x04, 0x48, 0xc5, 0x21, 0x0d, 
+	0x06, 0xc9, 0x61, 0x88, 0xe0, 0x02, 0x48, 0xc3, 
+	0x49, 0xc3, 0x60, 0x08, 0xe0, 0x06, 0x69, 0x38, 
+	0x28, 0x13, 0xd1, 0x03, 0x20, 0x00, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x08, 0x48, 0xb6, 0x68, 0x00, 
+	0x28, 0x00, 0xd1, 0x2c, 0x20, 0x0d, 0x06, 0xc0, 
+	0x68, 0x80, 0x90, 0x02, 0x20, 0x00, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x88, 0xf0, 0x00, 0xfd, 0x64, 
+	0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 0x4b, 0xb7, 
+	0x18, 0xc9, 0x60, 0x08, 0x20, 0x00, 0x43, 0xc0, 
+	0x00, 0xe9, 0x4b, 0xb4, 0x18, 0xc9, 0x60, 0x48, 
+	0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 0x4b, 0xb1, 
+	0x18, 0xc9, 0x64, 0x08, 0x20, 0x00, 0x43, 0xc0, 
+	0x00, 0xe9, 0x4b, 0xae, 0x18, 0xc9, 0x64, 0x48, 
+	0x20, 0x01, 0x40, 0xa8, 0x43, 0xc0, 0x99, 0x02, 
+	0x40, 0x08, 0x90, 0x02, 0x98, 0x02, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x88, 0xe0, 0x9c, 0x69, 0x38, 
+	0x28, 0x0b, 0xdb, 0x74, 0x69, 0x38, 0x28, 0x12, 
+	0xdc, 0x72, 0x48, 0x9b, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x6f, 0x20, 0x00, 0x49, 0x9d, 0x65, 0x08, 
+	0x20, 0x01, 0x03, 0x00, 0x49, 0x9b, 0x65, 0x48, 
+	0x20, 0x00, 0x49, 0x9a, 0x65, 0x88, 0x20, 0x00, 
+	0x49, 0x98, 0x65, 0xc8, 0x20, 0x00, 0x49, 0x97, 
+	0x66, 0x08, 0x20, 0x00, 0x49, 0x96, 0x60, 0x08, 
+	0x20, 0x02, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0xc8, 
+	0x21, 0x00, 0x20, 0x02, 0xf0, 0x04, 0xf8, 0xa0, 
+	0x49, 0x95, 0x20, 0x91, 0xf0, 0x1a, 0xf9, 0x2c, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0b, 
+	0xfc, 0x72, 0x20, 0x92, 0x49, 0x90, 0x60, 0x08, 
+	0x48, 0x90, 0x68, 0x00, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xc0, 0x69, 0x80, 0x08, 0x40, 0x00, 0x40, 
+	0x49, 0x8c, 0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xc9, 0x61, 0x88, 0x20, 0x01, 0x49, 0x89, 
+	0x68, 0x09, 0x60, 0x08, 0x20, 0x01, 0x49, 0x87, 
+	0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
+	0x66, 0x88, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x83, 
+	0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
+	0x61, 0x08, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x7f, 
+	0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
+	0x61, 0x48, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x7b, 
+	0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
+	0x60, 0xc8, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x77, 
+	0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
+	0x60, 0x88, 0x6b, 0x38, 0xf7, 0xff, 0xf8, 0xd9, 
+	0x90, 0x01, 0x48, 0x72, 0x68, 0x00, 0x23, 0x77, 
+	0x01, 0x1b, 0x18, 0xc0, 0x9a, 0x01, 0x1c, 0x39, 
+	0xf0, 0x0b, 0xf8, 0x42, 0xe0, 0x02, 0xe0, 0x23, 
+	0xe0, 0x22, 0xe0, 0x21, 0x48, 0x67, 0x49, 0x6b, 
+	0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
+	0x66, 0xc8, 0x48, 0x68, 0x68, 0x00, 0x21, 0x00, 
+	0xf0, 0x0b, 0xf8, 0xb8, 0x48, 0x65, 0x68, 0x00, 
+	0xf0, 0x0b, 0xfc, 0x2c, 0x49, 0x62, 0x20, 0x91, 
+	0xf0, 0x1a, 0xf8, 0xc6, 0x28, 0x92, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x48, 0x60, 0x68, 0x04, 0x48, 0x60, 
+	0x68, 0x00, 0x49, 0x5e, 0x60, 0x08, 0x48, 0x5e, 
+	0x60, 0x04, 0x20, 0x92, 0x49, 0x5a, 0x60, 0x08, 
+	0x48, 0x52, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 
+	0x48, 0x4d, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x6f, 
+	0x1c, 0x28, 0xf0, 0x0b, 0xfb, 0x9d, 0x28, 0x01, 
+	0xd1, 0x6a, 0x98, 0x00, 0x28, 0x0b, 0xdb, 0x02, 
+	0x98, 0x00, 0x28, 0x12, 0xdd, 0x65, 0xb0, 0x84, 
+	0x49, 0x4f, 0x20, 0x91, 0xf0, 0x1a, 0xf8, 0xa0, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0b, 
+	0xfb, 0xe6, 0x48, 0x4c, 0x68, 0x00, 0x68, 0x40, 
+	0x28, 0x00, 0xd0, 0x06, 0x48, 0x49, 0x68, 0x00, 
+	0x68, 0x40, 0x38, 0x01, 0x49, 0x47, 0x68, 0x09, 
+	0x60, 0x48, 0x20, 0x92, 0x49, 0x44, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x44, 0x68, 0x09, 0x60, 0x08, 
+	0x24, 0x00, 0x20, 0x00, 0x90, 0x02, 0x98, 0x02, 
+	0x28, 0x00, 0xd1, 0x15, 0x2c, 0x07, 0xd2, 0x13, 
+	0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 0x1c, 0x20, 
+	0x34, 0x01, 0x00, 0x83, 0x18, 0x18, 0x00, 0xc0, 
+	0x4a, 0x3a, 0x68, 0x12, 0x18, 0x80, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 0x42, 0x81, 
+	0xd1, 0x01, 0x20, 0x01, 0x90, 0x02, 0xe7, 0xe6, 
+	0x98, 0x02, 0x28, 0x00, 0xd1, 0x14, 0x2c, 0x18, 
+	0xd2, 0x12, 0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 
+	0x1c, 0x20, 0x34, 0x01, 0x23, 0x4c, 0x43, 0x58, 
+	0x4a, 0x2e, 0x68, 0x12, 0x18, 0x80, 0x38, 0xff, 
+	0x38, 0xff, 0x38, 0x02, 0x69, 0x40, 0x42, 0x81, 
+	0xd1, 0x01, 0x20, 0x01, 0x90, 0x02, 0xe7, 0xe7, 
+	0x3c, 0x01, 0x6b, 0x38, 0xf7, 0xff, 0xf8, 0x41, 
+	0x90, 0x01, 0x2c, 0x07, 0xd2, 0x09, 0x48, 0x25, 
+	0x68, 0x01, 0x1c, 0x20, 0xf0, 0x0a, 0xfe, 0xbc, 
+	0x48, 0x22, 0x68, 0x00, 0xf0, 0x0b, 0xfb, 0xa6, 
+	0xe0, 0x09, 0x2c, 0x18, 0xd2, 0x07, 0xe0, 0x01, 
+	0xe0, 0x95, 0xe0, 0x94, 0x1f, 0xe0, 0x49, 0x1d, 
+	0x68, 0x09, 0xf0, 0x0a, 0xfe, 0xeb, 0x48, 0x1b, 
+	0x68, 0x00, 0x4b, 0x1c, 0x18, 0xc0, 0xf0, 0x0b, 
+	0xf8, 0x0b, 0x20, 0x00, 0x49, 0x17, 0x68, 0x09, 
+	0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x64, 0x88, 
+	0x48, 0x14, 0x68, 0x00, 0x68, 0x40, 0x28, 0x07, 
+	0xd3, 0x2c, 0x48, 0x12, 0x68, 0x00, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x23, 0xfe, 
+	0x43, 0x18, 0x49, 0x0e, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0xe0, 0x1c, 0x00, 0x00, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x2c, 
+	0x2e, 0x08, 0xb9, 0xc4, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xbb, 0x00, 0xcc, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0xba, 0x28, 0x3f, 0xff, 0xff, 0xff, 
+	0x2e, 0x08, 0x9b, 0xb8, 0x68, 0x00, 0x04, 0x00, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0x00, 0x00, 0x04, 0xcc, 
+	0x61, 0x88, 0xe0, 0x2d, 0x26, 0x01, 0x21, 0x00, 
+	0x91, 0x00, 0x48, 0x2b, 0x68, 0x00, 0x68, 0x40, 
+	0x99, 0x00, 0x42, 0x88, 0xd8, 0x04, 0xe0, 0x06, 
+	0x99, 0x00, 0x31, 0x01, 0x91, 0x00, 0xe7, 0xf4, 
+	0x00, 0x70, 0x1c, 0x46, 0xe7, 0xf8, 0x08, 0x76, 
+	0x00, 0x76, 0x48, 0x23, 0x68, 0x00, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x07, 0xc0, 
+	0x0f, 0xc0, 0x49, 0x1f, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x48, 0x1c, 
+	0x68, 0x00, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc0, 
+	0x69, 0x80, 0x43, 0x30, 0x49, 0x18, 0x68, 0x09, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 
+	0x1c, 0x21, 0x48, 0x15, 0x68, 0x00, 0xf0, 0x0a, 
+	0xff, 0xb1, 0x6b, 0x79, 0x48, 0x12, 0x68, 0x00, 
+	0xf0, 0x0a, 0xfe, 0xe6, 0x1c, 0x28, 0x21, 0x00, 
+	0xf0, 0x0b, 0xfa, 0x88, 0x49, 0x0f, 0x20, 0x91, 
+	0xf0, 0x19, 0xff, 0xba, 0x28, 0x92, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x48, 0x0b, 0x68, 0x00, 0x90, 0x03, 
+	0x48, 0x0b, 0x68, 0x00, 0x49, 0x08, 0x60, 0x08, 
+	0x98, 0x03, 0x49, 0x09, 0x60, 0x08, 0x20, 0x92, 
+	0x49, 0x06, 0x60, 0x08, 0xb0, 0x04, 0x20, 0x92, 
+	0x49, 0x06, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x03, 
+	0xe5, 0x86, 0xb0, 0x03, 0xe5, 0x84, 0x00, 0x00, 
+	0x2e, 0x08, 0xbb, 0x20, 0x2e, 0x08, 0xd1, 0xf4, 
+	0x2e, 0x08, 0xbb, 0x24, 0x2e, 0x08, 0xba, 0x2c, 
+	0xb5, 0xf3, 0xb0, 0x85, 0x20, 0x00, 0x90, 0x01, 
+	0x9d, 0x05, 0x9f, 0x06, 0x69, 0x28, 0x90, 0x04, 
+	0x69, 0x3c, 0x98, 0x04, 0x28, 0x13, 0xd0, 0x01, 
+	0x2c, 0x13, 0xd1, 0x05, 0x20, 0xff, 0xb0, 0x05, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x68, 0xee, 0x68, 0xf9, 0x91, 0x03, 0x48, 0xdf, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x2e, 0x19, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0xe0, 0x04, 0x2e, 0x08, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x20, 
+	0x48, 0xd6, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x06, 
+	0x99, 0x03, 0x29, 0x19, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x05, 0x99, 0x03, 
+	0x29, 0x08, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0x28, 0x00, 0xd0, 0x06, 0x99, 0x03, 
+	0x60, 0xe9, 0x60, 0xfe, 0x20, 0x00, 0xb0, 0x05, 
+	0xe7, 0xce, 0xe1, 0x92, 0x1c, 0x3d, 0x9f, 0x05, 
+	0x9e, 0x03, 0x68, 0xf9, 0x91, 0x03, 0x9c, 0x04, 
+	0xe0, 0xaa, 0x48, 0xc6, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x06, 0x99, 0x03, 0x29, 0x19, 0xd3, 0x01, 
+	0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0xe0, 0x05, 
+	0x99, 0x03, 0x29, 0x08, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd1, 0x73, 
+	0x49, 0xbd, 0x20, 0x91, 0xf0, 0x19, 0xff, 0x38, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x0a, 
+	0xfa, 0xe5, 0xe7, 0xf5, 0x00, 0xb0, 0x49, 0xb9, 
+	0x58, 0x08, 0x42, 0xa8, 0xd1, 0x05, 0x99, 0x03, 
+	0x00, 0x88, 0x49, 0xb6, 0x58, 0x08, 0x42, 0xb8, 
+	0xd0, 0x05, 0x20, 0x92, 0x49, 0xb2, 0x60, 0x08, 
+	0x20, 0xff, 0xb0, 0x05, 0xe7, 0x98, 0x48, 0xb2, 
+	0x68, 0x00, 0x42, 0xa8, 0xd0, 0x03, 0x48, 0xb0, 
+	0x68, 0x00, 0x42, 0xb8, 0xd1, 0x0a, 0x20, 0x0d, 
+	0x06, 0xc0, 0x68, 0xc0, 0x90, 0x01, 0x98, 0x01, 
+	0x28, 0x01, 0xd1, 0x03, 0x20, 0x00, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0xc8, 0x99, 0x03, 0x60, 0xe9, 
+	0x60, 0xfe, 0x00, 0xb0, 0x49, 0xa5, 0x50, 0x0f, 
+	0x99, 0x03, 0x00, 0x88, 0x49, 0xa3, 0x50, 0x0d, 
+	0x48, 0xa0, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x55, 
+	0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 0x90, 0x02, 
+	0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 
+	0x20, 0x01, 0x40, 0xb0, 0x99, 0x02, 0x40, 0x08, 
+	0xd1, 0x12, 0x99, 0x03, 0x20, 0x01, 0x40, 0x88, 
+	0x99, 0x02, 0x40, 0x08, 0xd0, 0x0b, 0x99, 0x03, 
+	0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 0x99, 0x02, 
+	0x40, 0x08, 0x90, 0x02, 0x20, 0x01, 0x40, 0xb0, 
+	0x99, 0x02, 0x43, 0x08, 0x90, 0x02, 0xe0, 0x11, 
+	0x99, 0x03, 0x20, 0x01, 0x40, 0x88, 0x99, 0x02, 
+	0x40, 0x08, 0xd1, 0x0b, 0x20, 0x01, 0x40, 0xb0, 
+	0x43, 0xc0, 0x99, 0x02, 0x40, 0x08, 0x90, 0x02, 
+	0x99, 0x03, 0x20, 0x01, 0x40, 0x88, 0x99, 0x02, 
+	0x43, 0x08, 0x90, 0x02, 0x6b, 0x28, 0xf7, 0xfe, 
+	0xfe, 0xbc, 0x90, 0x00, 0x9a, 0x00, 0xe0, 0x00, 
+	0xe0, 0x22, 0x99, 0x03, 0x1c, 0x28, 0xf0, 0x00, 
+	0xfa, 0x3d, 0x6b, 0x38, 0xf7, 0xfe, 0xfe, 0xb1, 
+	0x90, 0x00, 0x9a, 0x00, 0x1c, 0x31, 0x1c, 0x38, 
+	0xf0, 0x00, 0xfa, 0x34, 0x98, 0x02, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x88, 0x48, 0x7c, 0x68, 0x00, 
+	0x42, 0xa8, 0xd0, 0x03, 0x48, 0x7a, 0x68, 0x00, 
+	0x42, 0xb8, 0xd1, 0x03, 0x98, 0x01, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0xc8, 0x20, 0x92, 0x49, 0x74, 
+	0x60, 0x08, 0x20, 0x00, 0xb0, 0x05, 0xe7, 0x1b, 
+	0x49, 0x71, 0x20, 0x91, 0xf0, 0x19, 0xfe, 0xa0, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x0a, 
+	0xfa, 0x4d, 0xe7, 0xf5, 0x00, 0xb0, 0x49, 0x6d, 
+	0x58, 0x08, 0x42, 0xa8, 0xd0, 0x05, 0x20, 0x92, 
+	0x49, 0x69, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x05, 
+	0xe7, 0x06, 0x2c, 0x0b, 0xdb, 0x12, 0x2c, 0x12, 
+	0xdc, 0x10, 0x48, 0x67, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x09, 0x48, 0x65, 0x68, 0x00, 0x42, 0xa8, 
+	0xd0, 0x05, 0x20, 0x92, 0x49, 0x60, 0x60, 0x08, 
+	0x20, 0xff, 0xb0, 0x05, 0xe6, 0xf4, 0x48, 0x60, 
+	0x60, 0x07, 0xe0, 0x08, 0x6b, 0xf8, 0x28, 0x01, 
+	0xd1, 0x05, 0x20, 0x92, 0x49, 0x5a, 0x60, 0x08, 
+	0x20, 0xff, 0xb0, 0x05, 0xe6, 0xe8, 0x48, 0x5a, 
+	0x68, 0x00, 0x42, 0xa8, 0xd1, 0x02, 0x20, 0x00, 
+	0x49, 0x57, 0x60, 0x08, 0x00, 0xb0, 0x49, 0x55, 
+	0x50, 0x0f, 0x99, 0x03, 0x60, 0xe9, 0x60, 0xfe, 
+	0x48, 0x50, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x73, 
+	0x6b, 0x28, 0xf7, 0xfe, 0xfe, 0x4e, 0x90, 0x00, 
+	0x6a, 0xa9, 0x9a, 0x00, 0x48, 0x4f, 0xf0, 0x0b, 
+	0xfa, 0x1d, 0x6b, 0x38, 0xf7, 0xfe, 0xfe, 0x45, 
+	0x90, 0x00, 0x6a, 0xb9, 0x9a, 0x00, 0x48, 0x4b, 
+	0xf0, 0x0b, 0xfa, 0x42, 0x48, 0x48, 0x68, 0x00, 
+	0x42, 0xa8, 0xd1, 0x0f, 0x20, 0x02, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0xc8, 0x2c, 0x0b, 0xdb, 0x01, 
+	0x2c, 0x12, 0xdd, 0x07, 0x21, 0x00, 0x20, 0x02, 
+	0xf0, 0x03, 0xfd, 0xae, 0x48, 0x42, 0x21, 0x0d, 
+	0x06, 0xc9, 0x61, 0x88, 0x2c, 0x0b, 0xdb, 0x42, 
+	0x2c, 0x12, 0xdc, 0x40, 0x98, 0x04, 0x42, 0xa0, 
+	0xd0, 0x2c, 0x20, 0x02, 0x21, 0x0d, 0x06, 0xc9, 
+	0x60, 0xc8, 0x21, 0x00, 0x20, 0x02, 0xf0, 0x03, 
+	0xfd, 0x9b, 0x2c, 0x0f, 0xd0, 0x05, 0x2c, 0x10, 
+	0xd0, 0x03, 0x2c, 0x11, 0xd0, 0x01, 0x2c, 0x0b, 
+	0xd1, 0x03, 0x21, 0x00, 0x20, 0x12, 0xf0, 0x03, 
+	0xfd, 0x8f, 0x2c, 0x0c, 0xd0, 0x01, 0x2c, 0x0f, 
+	0xd1, 0x03, 0x21, 0x00, 0x20, 0x04, 0xf0, 0x03, 
+	0xfd, 0x87, 0x2c, 0x0d, 0xd0, 0x01, 0x2c, 0x10, 
+	0xd1, 0x03, 0x21, 0x00, 0x20, 0x08, 0xf0, 0x03, 
+	0xfd, 0x7f, 0x2c, 0x0e, 0xd0, 0x01, 0x2c, 0x11, 
+	0xd1, 0x03, 0x21, 0x00, 0x20, 0x01, 0xf0, 0x03, 
+	0xfd, 0x77, 0xe0, 0x03, 0x20, 0x00, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0xc8, 0x6a, 0xb8, 0x30, 0x01, 
+	0x05, 0x00, 0x6a, 0xf9, 0x31, 0x01, 0x02, 0x89, 
+	0x43, 0x08, 0x6b, 0x79, 0x31, 0x02, 0x43, 0x08, 
+	0x21, 0x0d, 0x06, 0xc9, 0x61, 0x88, 0x20, 0x0d, 
+	0x06, 0xc0, 0x68, 0x80, 0x90, 0x02, 0x20, 0x00, 
+	0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 0xe0, 0x00, 
+	0xe0, 0x1f, 0x20, 0x01, 0x40, 0xb0, 0x43, 0xc0, 
+	0x99, 0x02, 0x40, 0x08, 0x90, 0x02, 0xf0, 0x00, 
+	0xf9, 0xcf, 0x6b, 0x38, 0xf7, 0xfe, 0xfd, 0xd1, 
+	0x90, 0x00, 0x9a, 0x00, 0x1c, 0x31, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf9, 0x54, 0x98, 0x02, 0x21, 0x0d, 
+	0x06, 0xc9, 0x60, 0x88, 0x2c, 0x0b, 0xdb, 0x08, 
+	0x2c, 0x12, 0xdc, 0x06, 0x98, 0x04, 0x42, 0xa0, 
+	0xd1, 0x03, 0x20, 0x01, 0x21, 0x0d, 0x06, 0xc9, 
+	0x60, 0xc8, 0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x05, 0xe6, 0x3c, 0xb0, 0x05, 
+	0xe6, 0x3a, 0xe6, 0x39, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x2e, 0x08, 0xba, 0x28, 0x2e, 0x08, 0xbb, 0x00, 
+	0x3f, 0xff, 0xff, 0xff, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x00, 0xb8, 0x49, 0x09, 0x58, 0x0c, 0x1c, 0x7d, 
+	0x60, 0xe5, 0x00, 0xa8, 0x49, 0x06, 0x50, 0x0c, 
+	0x6b, 0x20, 0xf7, 0xfe, 0xfd, 0x9a, 0x1c, 0x06, 
+	0x1c, 0x32, 0x1c, 0x29, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf9, 0x1d, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xb9, 0xc4, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x00, 0xb8, 0x49, 0x09, 0x58, 0x0c, 0x1e, 0x7d, 
+	0x60, 0xe5, 0x00, 0xa8, 0x49, 0x06, 0x50, 0x0c, 
+	0x6b, 0x20, 0xf7, 0xfe, 0xfd, 0x82, 0x1c, 0x06, 
+	0x1c, 0x32, 0x1c, 0x29, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf9, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xb9, 0xc4, 0xb5, 0xf3, 0x1c, 0x0f, 
+	0xb0, 0x86, 0x98, 0x06, 0x90, 0x05, 0x98, 0x05, 
+	0x68, 0xc5, 0x48, 0x77, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x20, 0xff, 0xb0, 0x06, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x05, 0x69, 0x00, 0x28, 0x13, 0xd1, 0x02, 
+	0x20, 0xff, 0xb0, 0x06, 0xe7, 0xf4, 0x49, 0x69, 
+	0x20, 0x91, 0xf0, 0x19, 0xfd, 0x5d, 0x28, 0x92, 
+	0xd0, 0x03, 0x20, 0x01, 0xf0, 0x0a, 0xf9, 0x0a, 
+	0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x64, 0x58, 0x08, 
+	0x99, 0x05, 0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 
+	0x49, 0x60, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x06, 
+	0xe7, 0xde, 0x42, 0xbd, 0xd1, 0x05, 0x20, 0x92, 
+	0x49, 0x5c, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x06, 
+	0xe7, 0xd6, 0x20, 0x00, 0x00, 0xa9, 0x4a, 0x5a, 
+	0x50, 0x50, 0x98, 0x05, 0x60, 0xc7, 0x48, 0x59, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x0d, 0x48, 0x54, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x09, 0x99, 0x05, 
+	0x00, 0xb8, 0x4a, 0x53, 0x50, 0x11, 0x20, 0x92, 
+	0x49, 0x50, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x06, 
+	0xe7, 0xbe, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 
+	0x1c, 0x04, 0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 
+	0x60, 0x88, 0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 
+	0x4b, 0x4b, 0x18, 0xc9, 0x60, 0x08, 0x20, 0x00, 
+	0x43, 0xc0, 0x00, 0xe9, 0x4b, 0x48, 0x18, 0xc9, 
+	0x60, 0x48, 0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 
+	0x4b, 0x45, 0x18, 0xc9, 0x64, 0x08, 0x20, 0x00, 
+	0x43, 0xc0, 0x00, 0xe9, 0x4b, 0x42, 0x18, 0xc9, 
+	0x64, 0x48, 0x20, 0x01, 0x90, 0x01, 0x20, 0x01, 
+	0x40, 0xa8, 0x40, 0x20, 0xd1, 0x01, 0x20, 0x00, 
+	0x90, 0x01, 0x20, 0x01, 0x40, 0xa8, 0x43, 0xc0, 
+	0x40, 0x04, 0x1c, 0x3e, 0x42, 0xbd, 0xd9, 0x23, 
+	0x00, 0xb0, 0x49, 0x37, 0x58, 0x08, 0x28, 0x00, 
+	0xd0, 0x01, 0x36, 0x01, 0xe7, 0xf8, 0x1e, 0x70, 
+	0x90, 0x04, 0x98, 0x04, 0x42, 0xb8, 0xda, 0x04, 
+	0xe0, 0x07, 0x98, 0x04, 0x38, 0x01, 0x90, 0x04, 
+	0xe7, 0xf7, 0x98, 0x04, 0xf7, 0xff, 0xff, 0x32, 
+	0xe7, 0xf7, 0x20, 0xff, 0x40, 0xb8, 0x90, 0x03, 
+	0x20, 0xff, 0x40, 0xb0, 0x43, 0xc0, 0x99, 0x03, 
+	0x40, 0x08, 0x90, 0x03, 0x98, 0x03, 0x00, 0x40, 
+	0x90, 0x03, 0x00, 0x60, 0x90, 0x00, 0xe0, 0x1f, 
+	0x00, 0xb0, 0x49, 0x25, 0x58, 0x08, 0x28, 0x00, 
+	0xd0, 0x01, 0x3e, 0x01, 0xe7, 0xf8, 0x1c, 0x70, 
+	0x90, 0x04, 0x98, 0x04, 0x42, 0xb8, 0xd9, 0x04, 
+	0xe0, 0x07, 0x98, 0x04, 0x30, 0x01, 0x90, 0x04, 
+	0xe7, 0xf7, 0x98, 0x04, 0xf7, 0xff, 0xff, 0x26, 
+	0xe7, 0xf7, 0x20, 0xff, 0x40, 0xb0, 0x90, 0x03, 
+	0x20, 0xff, 0x40, 0xb8, 0x43, 0xc0, 0x99, 0x03, 
+	0x40, 0x08, 0x90, 0x03, 0x08, 0x60, 0x90, 0x00, 
+	0x98, 0x00, 0x99, 0x03, 0x40, 0x08, 0x90, 0x00, 
+	0x98, 0x03, 0x43, 0x84, 0x98, 0x00, 0x43, 0x04, 
+	0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 0x40, 0x04, 
+	0x98, 0x01, 0x40, 0xb8, 0x43, 0x04, 0x99, 0x05, 
+	0x00, 0xb8, 0x4a, 0x0d, 0x50, 0x11, 0x98, 0x05, 
+	0x6b, 0x00, 0xf7, 0xfe, 0xfc, 0x92, 0x90, 0x02, 
+	0x9a, 0x02, 0x1c, 0x39, 0x98, 0x05, 0xf0, 0x00, 
+	0xf8, 0x15, 0x20, 0x0d, 0x06, 0xc0, 0x60, 0x84, 
+	0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 0x20, 0x00, 
+	0xb0, 0x06, 0xe7, 0x25, 0xb0, 0x06, 0xe7, 0x23, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x2c, 
+	0x2e, 0x08, 0xb9, 0xc4, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x68, 0x00, 0x04, 0x00, 0xb5, 0xf7, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x01, 0x3d, 0x4b, 0x2f, 0x18, 0xe9, 
+	0x1d, 0xe2, 0x32, 0x0d, 0x20, 0x00, 0x28, 0x03, 
+	0xd3, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
+	0xca, 0x20, 0xc1, 0x20, 0xe7, 0xfa, 0x6a, 0xe3, 
+	0x05, 0x9d, 0x0d, 0xad, 0x00, 0xfe, 0x4b, 0x28, 
+	0x18, 0xf3, 0x60, 0x1d, 0x6b, 0x63, 0x33, 0x01, 
+	0x05, 0x9d, 0x0d, 0xad, 0x00, 0xfe, 0x4b, 0x24, 
+	0x18, 0xf3, 0x60, 0x5d, 0x6a, 0xa5, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x1d, 0x00, 0xfe, 0x4b, 0x20, 
+	0x18, 0xf3, 0x64, 0x1d, 0x9d, 0x02, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x1d, 0x00, 0xfe, 0x4b, 0x1c, 
+	0x18, 0xf3, 0x64, 0x5d, 0x4b, 0x1b, 0x68, 0x1b, 
+	0x2b, 0x01, 0xd1, 0x2a, 0x2f, 0x00, 0xd1, 0x28, 
+	0x4b, 0x17, 0x68, 0x5d, 0x23, 0x8f, 0x00, 0x9b, 
+	0x42, 0x9d, 0xd3, 0x03, 0x23, 0x8f, 0x00, 0x9b, 
+	0x4d, 0x13, 0x60, 0x6b, 0x4b, 0x12, 0x68, 0x1d, 
+	0x4b, 0x13, 0x42, 0x9d, 0xd3, 0x02, 0x4b, 0x12, 
+	0x4d, 0x0f, 0x60, 0x2b, 0x4b, 0x0e, 0x6c, 0x5d, 
+	0x23, 0x01, 0x02, 0x9b, 0x1a, 0xed, 0x23, 0xb3, 
+	0x00, 0x9b, 0x42, 0x9d, 0xd3, 0x02, 0x4b, 0x0d, 
+	0x4d, 0x09, 0x64, 0x6b, 0x4b, 0x08, 0x6c, 0x1d, 
+	0x23, 0x01, 0x02, 0x9b, 0x1a, 0xed, 0x4b, 0x0a, 
+	0x42, 0x9d, 0xd3, 0x02, 0x4b, 0x09, 0x4d, 0x04, 
+	0x64, 0x2b, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x68, 0x00, 0x0c, 0x00, 
+	0x68, 0x00, 0x04, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x00, 0x00, 0x02, 0x3a, 0x00, 0x00, 0x06, 0xcc, 
+	0x00, 0x00, 0x02, 0xca, 0x00, 0x00, 0x06, 0xca, 
+	0xb4, 0xf0, 0x4f, 0x15, 0x4c, 0x15, 0x20, 0x00, 
+	0x21, 0x00, 0x22, 0x00, 0x43, 0xd2, 0x4d, 0x14, 
+	0x68, 0x6d, 0x42, 0x85, 0xdd, 0x1b, 0x1c, 0x05, 
+	0x30, 0x01, 0x00, 0xad, 0x59, 0x7b, 0x42, 0x93, 
+	0xd0, 0xf9, 0x4d, 0x0f, 0x68, 0x6d, 0x42, 0x85, 
+	0xda, 0x00, 0xe0, 0x10, 0x31, 0x01, 0x1c, 0x05, 
+	0x30, 0x01, 0x00, 0xad, 0x59, 0x7a, 0x42, 0x93, 
+	0xd0, 0xf9, 0x02, 0x95, 0x43, 0x1d, 0x1c, 0x2e, 
+	0xc4, 0x40, 0x4d, 0x07, 0x68, 0x6d, 0x42, 0x85, 
+	0xdb, 0x00, 0x31, 0x01, 0xe7, 0xdf, 0x25, 0x0d, 
+	0x06, 0xed, 0x61, 0x29, 0xbc, 0xf0, 0x47, 0x70, 
+	0x2e, 0x08, 0xba, 0x38, 0x68, 0x00, 0x0d, 0x40, 
+	0x2e, 0x08, 0xbb, 0x00, 0xb5, 0xf3, 0xb0, 0x82, 
+	0x9d, 0x02, 0x69, 0x2c, 0x2c, 0x13, 0xd1, 0x05, 
+	0x20, 0x75, 0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x68, 0xee, 0x48, 0xf8, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x2e, 0x19, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0xe0, 0x04, 0x2e, 0x08, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x02, 
+	0x20, 0xff, 0xb0, 0x02, 0xe7, 0xe6, 0x49, 0xef, 
+	0x20, 0x91, 0xf0, 0x19, 0xfb, 0xbd, 0x28, 0x92, 
+	0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 0xff, 0x6a, 
+	0xe7, 0xf5, 0x00, 0xb0, 0x49, 0xea, 0x58, 0x08, 
+	0x99, 0x02, 0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 
+	0x49, 0xe6, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x02, 
+	0xe7, 0xd0, 0x48, 0xe3, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x16, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 
+	0x90, 0x01, 0x99, 0x03, 0x29, 0x01, 0xd1, 0x05, 
+	0x20, 0x01, 0x40, 0xb0, 0x99, 0x01, 0x43, 0x08, 
+	0x90, 0x01, 0xe0, 0x05, 0x20, 0x01, 0x40, 0xb0, 
+	0x43, 0xc0, 0x99, 0x01, 0x40, 0x08, 0x90, 0x01, 
+	0x98, 0x01, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 
+	0x48, 0xd8, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 
+	0x48, 0xd3, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x6f, 
+	0x99, 0x03, 0x29, 0x01, 0xd1, 0x6c, 0xb0, 0x83, 
+	0x1c, 0x30, 0xf0, 0x0a, 0xfe, 0x71, 0x28, 0x01, 
+	0xd1, 0x05, 0x20, 0x92, 0x49, 0xcd, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x05, 0xe7, 0x9e, 0x49, 0xce, 
+	0x20, 0x91, 0xf0, 0x19, 0xfb, 0x75, 0x28, 0x92, 
+	0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0a, 0xfe, 0xbb, 
+	0x2c, 0x0b, 0xdb, 0x01, 0x2c, 0x12, 0xdd, 0x06, 
+	0x48, 0xc8, 0x68, 0x00, 0x68, 0x40, 0x30, 0x01, 
+	0x49, 0xc6, 0x68, 0x09, 0x60, 0x48, 0x20, 0x92, 
+	0x49, 0xc3, 0x60, 0x08, 0x20, 0x01, 0x49, 0xc3, 
+	0x68, 0x09, 0x60, 0x08, 0x2c, 0x0b, 0xdb, 0x11, 
+	0x2c, 0x12, 0xdc, 0x0f, 0x48, 0xbf, 0x68, 0x00, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 
+	0x23, 0x01, 0x43, 0x18, 0x49, 0xbb, 0x68, 0x09, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 
+	0x27, 0x00, 0xe0, 0xbc, 0x27, 0x00, 0x20, 0x00, 
+	0x90, 0x01, 0x98, 0x01, 0x28, 0x00, 0xd1, 0x15, 
+	0x2f, 0x07, 0xd2, 0x13, 0x6a, 0xe8, 0x05, 0x81, 
+	0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 
+	0x18, 0x18, 0x00, 0xc0, 0x4a, 0xaf, 0x68, 0x12, 
+	0x18, 0x80, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 
+	0x6f, 0xc0, 0x42, 0x81, 0xda, 0x01, 0x20, 0x01, 
+	0x90, 0x01, 0xe7, 0xe6, 0x98, 0x01, 0x28, 0x00, 
+	0xd1, 0x16, 0x2f, 0x18, 0xd2, 0x14, 0x6a, 0xe8, 
+	0x05, 0x81, 0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 
+	0x23, 0x4c, 0x43, 0x58, 0x4a, 0xa3, 0x68, 0x12, 
+	0x18, 0x80, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x69, 0x40, 0x42, 0x81, 0xda, 0x03, 0xe0, 0x00, 
+	0xe0, 0xb0, 0x20, 0x01, 0x90, 0x01, 0xe7, 0xe5, 
+	0x3f, 0x01, 0x6b, 0x28, 0xf7, 0xfe, 0xfb, 0x01, 
+	0x90, 0x00, 0x2f, 0x07, 0xd2, 0x16, 0x48, 0x99, 
+	0x68, 0x01, 0x1c, 0x38, 0xf0, 0x0a, 0xf9, 0x0a, 
+	0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 0x49, 0x95, 
+	0x68, 0x09, 0x18, 0x40, 0x23, 0x2b, 0x01, 0x5b, 
+	0x18, 0xc0, 0x9a, 0x00, 0x1c, 0x29, 0xf0, 0x0a, 
+	0xfa, 0x5f, 0x48, 0x90, 0x68, 0x00, 0xf0, 0x0a, 
+	0xfe, 0x59, 0xe0, 0x4a, 0x2f, 0x18, 0xd2, 0x48, 
+	0x1f, 0xf8, 0x49, 0x8c, 0x68, 0x09, 0xf0, 0x0a, 
+	0xf9, 0x45, 0x20, 0x4c, 0x43, 0x78, 0x49, 0x89, 
+	0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x0a, 0x9a, 0x00, 0x1c, 0x29, 0xf0, 0x0a, 
+	0xfa, 0x47, 0x20, 0x4c, 0x43, 0x78, 0x49, 0x83, 
+	0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x82, 0x6f, 0xc0, 0x28, 0x00, 0xd0, 0x17, 
+	0x20, 0x4c, 0x43, 0x78, 0x49, 0x7d, 0x68, 0x09, 
+	0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x68, 0x00, 0x04, 0x00, 0x0c, 0x00, 0xd0, 0x0b, 
+	0x20, 0x4c, 0x43, 0x78, 0x49, 0x77, 0x68, 0x09, 
+	0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x68, 0x00, 0x0c, 0x00, 0x04, 0x00, 0xd1, 0x0a, 
+	0x20, 0x02, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x71, 
+	0x68, 0x12, 0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 
+	0x39, 0x82, 0x67, 0x48, 0xe0, 0x09, 0x20, 0x03, 
+	0x21, 0x4c, 0x43, 0x79, 0x4a, 0x6b, 0x68, 0x12, 
+	0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 
+	0x67, 0x48, 0x48, 0x68, 0x68, 0x00, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x00, 0x40, 
+	0x90, 0x03, 0x98, 0x03, 0x23, 0x02, 0x43, 0x18, 
+	0x90, 0x03, 0x48, 0x62, 0x68, 0x00, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x07, 0xc0, 
+	0x0f, 0xc0, 0x99, 0x03, 0x18, 0x40, 0x90, 0x03, 
+	0x98, 0x03, 0x49, 0x5c, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x1c, 0x39, 
+	0x48, 0x58, 0x68, 0x00, 0xf0, 0x0a, 0xfa, 0x72, 
+	0x2c, 0x0b, 0xdb, 0x01, 0x2c, 0x12, 0xdd, 0x04, 
+	0x6b, 0x69, 0x48, 0x54, 0x68, 0x00, 0xf0, 0x0a, 
+	0xf9, 0x4d, 0x1c, 0x30, 0x21, 0x01, 0xf0, 0x0a, 
+	0xfd, 0x45, 0x49, 0x4f, 0x20, 0x91, 0xf0, 0x19, 
+	0xfa, 0x77, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
+	0x48, 0x4c, 0x68, 0x00, 0x90, 0x02, 0x48, 0x4c, 
+	0x68, 0x00, 0x49, 0x4a, 0x60, 0x08, 0x98, 0x02, 
+	0x49, 0x49, 0x60, 0x08, 0x20, 0x92, 0x49, 0x46, 
+	0x60, 0x08, 0xb0, 0x03, 0x48, 0x43, 0x68, 0x00, 
+	0x28, 0x01, 0xd1, 0x75, 0x48, 0x3e, 0x68, 0x00, 
+	0x28, 0x01, 0xd1, 0x71, 0x99, 0x03, 0x29, 0x00, 
+	0xd1, 0x6e, 0xb0, 0x85, 0x1c, 0x30, 0xf0, 0x0a, 
+	0xfd, 0x47, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x92, 
+	0x49, 0x38, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x07, 
+	0xe6, 0x74, 0x49, 0x39, 0x20, 0x91, 0xf0, 0x19, 
+	0xfa, 0x4b, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
+	0xf0, 0x0a, 0xfd, 0x91, 0x2c, 0x0b, 0xdb, 0x01, 
+	0x2c, 0x12, 0xdd, 0x0b, 0x48, 0x33, 0x68, 0x00, 
+	0x68, 0x40, 0x28, 0x00, 0xd0, 0x06, 0x48, 0x31, 
+	0x68, 0x00, 0x68, 0x40, 0x38, 0x01, 0x49, 0x2f, 
+	0x68, 0x09, 0x60, 0x48, 0x20, 0x92, 0x49, 0x2c, 
+	0x60, 0x08, 0x20, 0x01, 0x49, 0x2b, 0x68, 0x09, 
+	0x60, 0x08, 0x2c, 0x0b, 0xdb, 0x11, 0x2c, 0x12, 
+	0xdc, 0x0f, 0x48, 0x28, 0x68, 0x00, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x08, 0x40, 
+	0x00, 0x40, 0x49, 0x24, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x27, 0x00, 
+	0xe0, 0xb2, 0x27, 0x00, 0x20, 0x00, 0x90, 0x03, 
+	0x98, 0x03, 0x28, 0x00, 0xd1, 0x15, 0x2f, 0x07, 
+	0xd2, 0x13, 0x6a, 0xe8, 0x05, 0x81, 0x0d, 0x89, 
+	0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 0x18, 0x18, 
+	0x00, 0xc0, 0x4a, 0x18, 0x68, 0x12, 0x18, 0x80, 
+	0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 
+	0x42, 0x81, 0xd1, 0x01, 0x20, 0x01, 0x90, 0x03, 
+	0xe7, 0xe6, 0x98, 0x03, 0x28, 0x00, 0xd1, 0x26, 
+	0x2f, 0x18, 0xd2, 0x24, 0x6a, 0xe8, 0x05, 0x81, 
+	0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x23, 0x4c, 
+	0x43, 0x58, 0x4a, 0x0c, 0x68, 0x12, 0x18, 0x80, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0xe0, 0x00, 
+	0xe0, 0xa9, 0x69, 0x40, 0x42, 0x81, 0xd1, 0x11, 
+	0x20, 0x01, 0x90, 0x03, 0xe0, 0x0e, 0x00, 0x00, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x2c, 
+	0x2e, 0x08, 0xb9, 0xc4, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0xe7, 0xd5, 0x3f, 0x01, 
+	0x6b, 0x28, 0xf7, 0xfe, 0xf9, 0xc2, 0x90, 0x01, 
+	0x2f, 0x07, 0xd2, 0x09, 0x48, 0x4a, 0x68, 0x01, 
+	0x1c, 0x38, 0xf0, 0x0a, 0xf8, 0x3d, 0x48, 0x48, 
+	0x68, 0x00, 0xf0, 0x0a, 0xfd, 0x27, 0xe0, 0x06, 
+	0x2f, 0x18, 0xd2, 0x04, 0x1f, 0xf8, 0x49, 0x44, 
+	0x68, 0x09, 0xf0, 0x0a, 0xf8, 0x6f, 0x48, 0x42, 
+	0x68, 0x00, 0x4b, 0x42, 0x18, 0xc0, 0xf0, 0x0a, 
+	0xf9, 0x8f, 0x20, 0x00, 0x49, 0x3e, 0x68, 0x09, 
+	0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x64, 0x88, 
+	0x48, 0x3b, 0x68, 0x00, 0x68, 0x40, 0x28, 0x07, 
+	0xd3, 0x0e, 0x48, 0x39, 0x68, 0x00, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x23, 0xfe, 
+	0x43, 0x18, 0x49, 0x35, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0xe0, 0x33, 
+	0x20, 0x01, 0x90, 0x00, 0x21, 0x00, 0x91, 0x02, 
+	0x48, 0x2f, 0x68, 0x00, 0x68, 0x40, 0x99, 0x02, 
+	0x42, 0x88, 0xd8, 0x04, 0xe0, 0x08, 0x99, 0x02, 
+	0x31, 0x01, 0x91, 0x02, 0xe7, 0xf4, 0x98, 0x00, 
+	0x00, 0x40, 0x30, 0x01, 0x90, 0x00, 0xe7, 0xf6, 
+	0x98, 0x00, 0x08, 0x40, 0x00, 0x40, 0x90, 0x00, 
+	0x48, 0x25, 0x68, 0x00, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xc0, 0x69, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 
+	0x49, 0x21, 0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xc9, 0x61, 0x88, 0x48, 0x1e, 0x68, 0x00, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 
+	0x99, 0x00, 0x43, 0x08, 0x49, 0x1a, 0x68, 0x09, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 
+	0x1c, 0x39, 0x48, 0x17, 0x68, 0x00, 0xf0, 0x0a, 
+	0xf9, 0x4d, 0x2c, 0x0b, 0xdb, 0x01, 0x2c, 0x12, 
+	0xdd, 0x04, 0x6b, 0x69, 0x48, 0x12, 0x68, 0x00, 
+	0xf0, 0x0a, 0xf8, 0x7e, 0x1c, 0x30, 0x21, 0x00, 
+	0xf0, 0x0a, 0xfc, 0x20, 0x49, 0x10, 0x20, 0x91, 
+	0xf0, 0x19, 0xf9, 0x52, 0x28, 0x92, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x48, 0x0b, 0x68, 0x00, 0x90, 0x04, 
+	0x48, 0x0c, 0x68, 0x00, 0x49, 0x08, 0x60, 0x08, 
+	0x98, 0x04, 0x49, 0x0a, 0x60, 0x08, 0x20, 0x92, 
+	0x49, 0x07, 0x60, 0x08, 0xb0, 0x05, 0x20, 0x92, 
+	0x49, 0x07, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x02, 
+	0xe5, 0x60, 0xb0, 0x02, 0xe5, 0x5e, 0x00, 0x00, 
+	0x2e, 0x08, 0xbb, 0x20, 0x00, 0x00, 0x04, 0xcc, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x24, 
+	0x2e, 0x08, 0xba, 0x2c, 0xb5, 0xf3, 0x1c, 0x07, 
+	0x1c, 0x3e, 0x69, 0x30, 0x28, 0x13, 0xd1, 0x04, 
+	0x20, 0x75, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0xf4, 0x48, 0x1e, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x2c, 0x19, 0xd3, 0x01, 
+	0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 
+	0x2c, 0x08, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0x28, 0x00, 0xd0, 0x01, 0x20, 0xff, 
+	0xe7, 0xe7, 0x49, 0x16, 0x20, 0x91, 0xf0, 0x19, 
+	0xf9, 0x0b, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x09, 0xfc, 0xb8, 0xe7, 0xf5, 0x00, 0xa0, 
+	0x49, 0x11, 0x58, 0x08, 0x42, 0xb8, 0xd0, 0x04, 
+	0x20, 0x92, 0x49, 0x0e, 0x60, 0x08, 0x20, 0xff, 
+	0xe7, 0xd3, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 
+	0x1c, 0x05, 0x20, 0x01, 0x40, 0xa0, 0x40, 0x05, 
+	0x2d, 0x00, 0xd1, 0x03, 0x20, 0x00, 0x99, 0x01, 
+	0x60, 0x08, 0xe0, 0x02, 0x20, 0x01, 0x99, 0x01, 
+	0x60, 0x08, 0x20, 0x92, 0x49, 0x03, 0x60, 0x08, 
+	0x20, 0x00, 0xe7, 0xbe, 0xe7, 0xbd, 0x00, 0x00, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x2c, 
+	0x2e, 0x08, 0xb9, 0xc4, 0xb5, 0xf3, 0x1c, 0x07, 
+	0xb0, 0x81, 0x1c, 0x3c, 0x68, 0xe5, 0x69, 0x60, 
+	0x4b, 0x49, 0x40, 0x18, 0x99, 0x02, 0x07, 0x89, 
+	0x0f, 0x89, 0x02, 0x09, 0x43, 0x08, 0x61, 0x60, 
+	0x05, 0x80, 0x48, 0x46, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 0xb0, 0x01, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x49, 0x3b, 0x20, 0x91, 0xf0, 0x19, 0xf8, 0xb4, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 
+	0xfc, 0x61, 0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x37, 
+	0x58, 0x08, 0x42, 0xb8, 0xd0, 0x05, 0x20, 0x92, 
+	0x49, 0x33, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x01, 
+	0xe7, 0xe6, 0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x69, 0x20, 0x28, 0x0b, 0xdb, 0x0c, 
+	0x69, 0x20, 0x28, 0x12, 0xdc, 0x09, 0x01, 0x28, 
+	0x4b, 0x2d, 0x18, 0xc1, 0x91, 0x00, 0x1d, 0xe6, 
+	0x36, 0x0d, 0x68, 0x30, 0x99, 0x00, 0x60, 0x08, 
+	0xe0, 0x41, 0x48, 0x26, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x3d, 0x48, 0x28, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x39, 0xb0, 0x82, 0x1c, 0x28, 0xf0, 0x0a, 
+	0xfb, 0x73, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x92, 
+	0x49, 0x1f, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x03, 
+	0xe7, 0xbe, 0x49, 0x21, 0x20, 0x91, 0xf0, 0x19, 
+	0xf8, 0x77, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
+	0xf0, 0x0a, 0xfb, 0xbd, 0x20, 0x92, 0x49, 0x1c, 
+	0x60, 0x08, 0x20, 0x01, 0x49, 0x1b, 0x68, 0x09, 
+	0x60, 0x08, 0x48, 0x1a, 0x68, 0x01, 0x1c, 0x20, 
+	0xf0, 0x0a, 0xfb, 0x6e, 0x90, 0x00, 0x69, 0x60, 
+	0x99, 0x00, 0x60, 0xc8, 0x49, 0x14, 0x20, 0x91, 
+	0xf0, 0x19, 0xf8, 0x5e, 0x28, 0x92, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x48, 0x12, 0x68, 0x00, 0x90, 0x01, 
+	0x48, 0x11, 0x68, 0x00, 0x49, 0x0f, 0x60, 0x08, 
+	0x98, 0x01, 0x49, 0x0f, 0x60, 0x08, 0x20, 0x92, 
+	0x49, 0x0b, 0x60, 0x08, 0xb0, 0x02, 0x20, 0x92, 
+	0x49, 0x05, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x01, 
+	0xe7, 0x8a, 0xb0, 0x01, 0xe7, 0x88, 0x00, 0x00, 
+	0xff, 0xff, 0xfc, 0xff, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0xb5, 0xf3, 0x1c, 0x07, 
+	0xb0, 0x81, 0x1c, 0x3c, 0x68, 0xe5, 0x69, 0x60, 
+	0x4b, 0x49, 0x40, 0x18, 0x99, 0x02, 0x07, 0x09, 
+	0x0f, 0x09, 0x02, 0x89, 0x43, 0x08, 0x61, 0x60, 
+	0x04, 0x80, 0x48, 0x46, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 0xb0, 0x01, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x49, 0x3b, 0x20, 0x91, 0xf0, 0x19, 0xf8, 0x08, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 
+	0xfb, 0xb5, 0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x37, 
+	0x58, 0x08, 0x42, 0xb8, 0xd0, 0x05, 0x20, 0x92, 
+	0x49, 0x33, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x01, 
+	0xe7, 0xe6, 0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x69, 0x20, 0x28, 0x0b, 0xdb, 0x0c, 
+	0x69, 0x20, 0x28, 0x12, 0xdc, 0x09, 0x01, 0x28, 
+	0x4b, 0x2d, 0x18, 0xc6, 0x1d, 0xe0, 0x30, 0x0d, 
+	0x90, 0x00, 0x98, 0x00, 0x68, 0x00, 0x60, 0x30, 
+	0xe0, 0x41, 0x48, 0x26, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x3d, 0x48, 0x28, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x39, 0xb0, 0x82, 0x1c, 0x28, 0xf0, 0x0a, 
+	0xfa, 0xc7, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x92, 
+	0x49, 0x1f, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x03, 
+	0xe7, 0xbe, 0x49, 0x21, 0x20, 0x91, 0xf0, 0x18, 
+	0xff, 0xcb, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
+	0xf0, 0x0a, 0xfb, 0x11, 0x20, 0x92, 0x49, 0x1c, 
+	0x60, 0x08, 0x20, 0x01, 0x49, 0x1b, 0x68, 0x09, 
+	0x60, 0x08, 0x48, 0x1a, 0x68, 0x01, 0x1c, 0x20, 
+	0xf0, 0x0a, 0xfa, 0xc2, 0x90, 0x00, 0x69, 0x60, 
+	0x99, 0x00, 0x60, 0xc8, 0x49, 0x14, 0x20, 0x91, 
+	0xf0, 0x18, 0xff, 0xb2, 0x28, 0x92, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x48, 0x12, 0x68, 0x00, 0x90, 0x01, 
+	0x48, 0x11, 0x68, 0x00, 0x49, 0x0f, 0x60, 0x08, 
+	0x98, 0x01, 0x49, 0x0f, 0x60, 0x08, 0x20, 0x92, 
+	0x49, 0x0b, 0x60, 0x08, 0xb0, 0x02, 0x20, 0x92, 
+	0x49, 0x05, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x01, 
+	0xe7, 0x8a, 0xb0, 0x01, 0xe7, 0x88, 0x00, 0x00, 
+	0xff, 0xff, 0xc3, 0xff, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0xb5, 0xf3, 0x1c, 0x07, 
+	0xb0, 0x82, 0x1c, 0x3c, 0x68, 0xe5, 0x26, 0x00, 
+	0x99, 0x03, 0x29, 0x01, 0xd1, 0x00, 0x26, 0x01, 
+	0x69, 0x60, 0x06, 0x80, 0x0f, 0xc0, 0x42, 0xb0, 
+	0xd1, 0x05, 0x20, 0x00, 0xb0, 0x02, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x69, 0x60, 
+	0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0x07, 0xf1, 
+	0x0e, 0x89, 0x43, 0x08, 0x61, 0x60, 0x06, 0x80, 
+	0x48, 0x44, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
+	0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 0xd3, 0x01, 
+	0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 
+	0xd0, 0x02, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xde, 
+	0x49, 0x3b, 0x20, 0x91, 0xf0, 0x18, 0xff, 0x50, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 
+	0xfa, 0xfd, 0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x37, 
+	0x58, 0x08, 0x42, 0xb8, 0xd0, 0x05, 0x20, 0x92, 
+	0x49, 0x33, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x02, 
+	0xe7, 0xc9, 0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x69, 0x20, 0x28, 0x0b, 0xdb, 0x0e, 
+	0x69, 0x20, 0x28, 0x12, 0xdc, 0x0b, 0x01, 0x28, 
+	0x4b, 0x2d, 0x18, 0xc1, 0x91, 0x01, 0x1d, 0xe0, 
+	0x30, 0x0d, 0x90, 0x00, 0x98, 0x00, 0x68, 0x00, 
+	0x99, 0x01, 0x60, 0x08, 0xe0, 0x41, 0x48, 0x25, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x3d, 0x48, 0x27, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x39, 0xb0, 0x82, 
+	0x1c, 0x28, 0xf0, 0x0a, 0xfa, 0x0d, 0x28, 0x00, 
+	0xd1, 0x05, 0x20, 0x92, 0x49, 0x1e, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x04, 0xe7, 0x9f, 0x49, 0x20, 
+	0x20, 0x91, 0xf0, 0x18, 0xff, 0x11, 0x28, 0x92, 
+	0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0a, 0xfa, 0x57, 
+	0x20, 0x92, 0x49, 0x1b, 0x60, 0x08, 0x20, 0x01, 
+	0x49, 0x1a, 0x68, 0x09, 0x60, 0x08, 0x48, 0x19, 
+	0x68, 0x01, 0x1c, 0x20, 0xf0, 0x0a, 0xfa, 0x08, 
+	0x90, 0x00, 0x69, 0x60, 0x99, 0x00, 0x60, 0xc8, 
+	0x49, 0x13, 0x20, 0x91, 0xf0, 0x18, 0xfe, 0xf8, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x11, 
+	0x68, 0x00, 0x90, 0x01, 0x48, 0x10, 0x68, 0x00, 
+	0x49, 0x0e, 0x60, 0x08, 0x98, 0x01, 0x49, 0x0e, 
+	0x60, 0x08, 0x20, 0x92, 0x49, 0x0a, 0x60, 0x08, 
+	0xb0, 0x02, 0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x02, 0xe7, 0x6b, 0xb0, 0x02, 
+	0xe7, 0x69, 0x00, 0x00, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x1c, 0x0f, 0xb0, 0x83, 0x1c, 0x25, 0x69, 0x28, 
+	0x28, 0x13, 0xd1, 0x04, 0x20, 0x75, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xee, 
+	0x20, 0x04, 0x40, 0x38, 0x08, 0x81, 0x91, 0x02, 
+	0x69, 0x68, 0x23, 0xc0, 0x43, 0xdb, 0x40, 0x18, 
+	0x07, 0xb9, 0x0f, 0x89, 0x01, 0x89, 0x43, 0x08, 
+	0x61, 0x68, 0x06, 0x00, 0x69, 0x68, 0x4b, 0x48, 
+	0x40, 0x18, 0x99, 0x02, 0x07, 0xc9, 0x0c, 0x49, 
+	0x43, 0x08, 0x61, 0x68, 0x04, 0x40, 0x48, 0x45, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x2e, 0x19, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0xe0, 0x04, 0x2e, 0x08, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x02, 
+	0x20, 0x00, 0xb0, 0x03, 0xe7, 0xd0, 0x49, 0x3c, 
+	0x20, 0x91, 0xf0, 0x18, 0xfe, 0x91, 0x28, 0x92, 
+	0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 0xfa, 0x3e, 
+	0xe7, 0xf5, 0x00, 0xb0, 0x49, 0x37, 0x58, 0x08, 
+	0x42, 0xa0, 0xd0, 0x05, 0x20, 0x92, 0x49, 0x34, 
+	0x60, 0x08, 0x20, 0xff, 0xb0, 0x03, 0xe7, 0xbb, 
+	0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
+	0x69, 0x28, 0x28, 0x0b, 0xdb, 0x0e, 0x69, 0x28, 
+	0x28, 0x12, 0xdc, 0x0b, 0x01, 0x30, 0x4b, 0x2e, 
+	0x18, 0xc0, 0x90, 0x01, 0x1d, 0xe8, 0x30, 0x0d, 
+	0x90, 0x00, 0x98, 0x00, 0x68, 0x00, 0x99, 0x01, 
+	0x60, 0x08, 0xe0, 0x41, 0x48, 0x25, 0x68, 0x00, 
+	0x28, 0x01, 0xd1, 0x3d, 0x48, 0x27, 0x68, 0x00, 
+	0x28, 0x01, 0xd1, 0x39, 0xb0, 0x82, 0x1c, 0x30, 
+	0xf0, 0x0a, 0xf9, 0x4e, 0x28, 0x00, 0xd1, 0x05, 
+	0x20, 0x92, 0x49, 0x1f, 0x60, 0x08, 0x20, 0x00, 
+	0xb0, 0x05, 0xe7, 0x91, 0x49, 0x20, 0x20, 0x91, 
+	0xf0, 0x18, 0xfe, 0x52, 0x28, 0x92, 0xd0, 0x00, 
+	0xe7, 0xf8, 0xf0, 0x0a, 0xf9, 0x98, 0x20, 0x92, 
+	0x49, 0x1b, 0x60, 0x08, 0x20, 0x01, 0x49, 0x1b, 
+	0x68, 0x09, 0x60, 0x08, 0x48, 0x19, 0x68, 0x01, 
+	0x1c, 0x28, 0xf0, 0x0a, 0xf9, 0x49, 0x90, 0x00, 
+	0x69, 0x68, 0x99, 0x00, 0x60, 0xc8, 0x49, 0x14, 
+	0x20, 0x91, 0xf0, 0x18, 0xfe, 0x39, 0x28, 0x92, 
+	0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x11, 0x68, 0x00, 
+	0x90, 0x01, 0x48, 0x11, 0x68, 0x00, 0x49, 0x0f, 
+	0x60, 0x08, 0x98, 0x01, 0x49, 0x0e, 0x60, 0x08, 
+	0x20, 0x92, 0x49, 0x0b, 0x60, 0x08, 0xb0, 0x02, 
+	0x20, 0x92, 0x49, 0x05, 0x60, 0x08, 0x20, 0x00, 
+	0xb0, 0x03, 0xe7, 0x5d, 0xb0, 0x03, 0xe7, 0x5b, 
+	0xff, 0xff, 0xbf, 0xff, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0x1c, 0x01, 0x20, 0x0d, 
+	0x06, 0xc0, 0x60, 0x41, 0x48, 0x02, 0x63, 0x81, 
+	0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x00, 0x00, 
+	0x68, 0x00, 0x0d, 0x00, 0x20, 0x0d, 0x06, 0xc0, 
+	0x68, 0x40, 0x02, 0x00, 0x0a, 0x00, 0x47, 0x70, 
+	0xe7, 0xfd, 0x1c, 0x01, 0x1c, 0x0a, 0x68, 0xd0, 
+	0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x03, 0x1c, 0x0a, 
+	0x1c, 0x19, 0x69, 0x08, 0x28, 0x13, 0xd1, 0x01, 
+	0x20, 0x75, 0x47, 0x70, 0x69, 0x08, 0x28, 0x0b, 
+	0xdb, 0x0b, 0x69, 0x08, 0x28, 0x12, 0xdc, 0x08, 
+	0x6d, 0x08, 0x60, 0x10, 0x6d, 0x88, 0x60, 0x90, 
+	0x6d, 0x48, 0x60, 0x50, 0x6d, 0xc8, 0x60, 0xd0, 
+	0xe0, 0x07, 0x6a, 0x88, 0x60, 0x10, 0x6b, 0x08, 
+	0x60, 0x90, 0x6a, 0xc8, 0x60, 0x50, 0x6b, 0x48, 
+	0x60, 0xd0, 0x20, 0x00, 0xe7, 0xe5, 0xe7, 0xe4, 
+	0x1c, 0x03, 0x1c, 0x0a, 0x68, 0x10, 0x60, 0x18, 
+	0x68, 0x90, 0x60, 0x98, 0x68, 0x50, 0x60, 0x58, 
+	0x68, 0xd0, 0x60, 0xd8, 0x47, 0x70, 0xe7, 0xfd, 
+	0x1c, 0x01, 0x1c, 0x0a, 0x69, 0x50, 0x05, 0x80, 
+	0x0f, 0x80, 0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 
+	0x1c, 0x0a, 0x69, 0x50, 0x12, 0x80, 0x07, 0x00, 
+	0x0f, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0xb4, 0x80, 
+	0x1c, 0x01, 0x1c, 0x0f, 0x22, 0x01, 0x69, 0x78, 
+	0x23, 0x20, 0x40, 0x18, 0xd1, 0x00, 0x22, 0x00, 
+	0x1c, 0x10, 0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 
+	0x1c, 0x01, 0x1c, 0x0b, 0x69, 0x18, 0x28, 0x13, 
+	0xd1, 0x01, 0x20, 0x75, 0x47, 0x70, 0x69, 0x58, 
+	0x06, 0x00, 0x0f, 0x82, 0x69, 0x58, 0x04, 0x40, 
+	0x0f, 0xc0, 0x00, 0x80, 0x43, 0x02, 0x1c, 0x10, 
+	0xe7, 0xf4, 0xe7, 0xf3, 0x1c, 0x01, 0x20, 0x0d, 
+	0x06, 0xc0, 0x61, 0x41, 0x20, 0x00, 0x47, 0x70, 
+	0xe7, 0xfd, 0x20, 0x0d, 0x06, 0xc0, 0x69, 0x40, 
+	0x1c, 0x01, 0x1c, 0x08, 0x47, 0x70, 0xe7, 0xfd, 
+	0x1c, 0x01, 0x22, 0x00, 0x29, 0x01, 0xd1, 0x00, 
+	0x22, 0x01, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0xc0, 
+	0x1c, 0x03, 0x2b, 0x02, 0xd1, 0x01, 0x29, 0x00, 
+	0xd1, 0x02, 0x20, 0x0d, 0x06, 0xc0, 0x60, 0xc2, 
+	0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x21, 0x01, 
+	0x20, 0x0d, 0x06, 0xc0, 0x68, 0xc0, 0x1c, 0x02, 
+	0x2a, 0x00, 0xd1, 0x00, 0x21, 0x00, 0x1c, 0x08, 
+	0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 0x1c, 0x0a, 
+	0x69, 0x10, 0x47, 0x70, 0xe7, 0xfd, 0xb4, 0x90, 
+	0x1c, 0x07, 0x1c, 0x0a, 0x1c, 0x39, 0x69, 0x08, 
+	0x28, 0x13, 0xd0, 0x05, 0x69, 0x08, 0x28, 0x0b, 
+	0xdb, 0x05, 0x69, 0x08, 0x28, 0x12, 0xdc, 0x02, 
+	0x20, 0x86, 0xbc, 0x90, 0x47, 0x70, 0x6b, 0x8c, 
+	0x69, 0x48, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x00, 
+	0x08, 0x64, 0x69, 0x08, 0x00, 0x80, 0x4b, 0x03, 
+	0x58, 0x18, 0x43, 0x60, 0x60, 0x10, 0x20, 0x00, 
+	0xe7, 0xef, 0xe7, 0xee, 0x2e, 0x03, 0xa8, 0xc8, 
+	0xb5, 0xf3, 0x1c, 0x07, 0xb0, 0x81, 0x9c, 0x02, 
+	0x69, 0x20, 0x28, 0x13, 0xd0, 0x05, 0x69, 0x20, 
+	0x28, 0x0b, 0xdb, 0x08, 0x69, 0x20, 0x28, 0x12, 
+	0xdc, 0x05, 0x20, 0x86, 0xb0, 0x01, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xe5, 
+	0x68, 0x38, 0x64, 0x20, 0x68, 0x7e, 0x64, 0x66, 
+	0x08, 0xb6, 0x61, 0xa6, 0x48, 0x3f, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 
+	0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 
+	0x2d, 0x08, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 
+	0xb0, 0x01, 0xe7, 0xe0, 0x49, 0x36, 0x20, 0x91, 
+	0xf0, 0x18, 0xfd, 0x16, 0x28, 0x92, 0xd0, 0x03, 
+	0x20, 0x01, 0xf0, 0x09, 0xf8, 0xc3, 0xe7, 0xf5, 
+	0x00, 0xa8, 0x49, 0x32, 0x58, 0x08, 0x99, 0x02, 
+	0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 0x49, 0x2e, 
+	0x60, 0x08, 0x20, 0x86, 0xb0, 0x01, 0xe7, 0xca, 
+	0x48, 0x2a, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x06, 
+	0x01, 0x28, 0x4b, 0x2b, 0x18, 0xc0, 0x90, 0x00, 
+	0x98, 0x00, 0x60, 0x06, 0xe0, 0x41, 0x48, 0x25, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x3d, 0x48, 0x27, 
+	0x68, 0x00, 0x28, 0x01, 0xd1, 0x39, 0xb0, 0x82, 
+	0x1c, 0x28, 0xf0, 0x09, 0xff, 0xdd, 0x28, 0x00, 
+	0xd1, 0x05, 0x20, 0x92, 0x49, 0x1e, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x03, 0xe7, 0xab, 0x49, 0x20, 
+	0x20, 0x91, 0xf0, 0x18, 0xfc, 0xe1, 0x28, 0x92, 
+	0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0a, 0xf8, 0x27, 
+	0x20, 0x92, 0x49, 0x1b, 0x60, 0x08, 0x20, 0x01, 
+	0x49, 0x1a, 0x68, 0x09, 0x60, 0x08, 0x48, 0x19, 
+	0x68, 0x01, 0x1c, 0x20, 0xf0, 0x09, 0xff, 0xd8, 
+	0x90, 0x00, 0x69, 0xa0, 0x99, 0x00, 0x61, 0x08, 
+	0x49, 0x13, 0x20, 0x91, 0xf0, 0x18, 0xfc, 0xc8, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x11, 
+	0x68, 0x00, 0x90, 0x01, 0x48, 0x10, 0x68, 0x00, 
+	0x49, 0x0e, 0x60, 0x08, 0x98, 0x01, 0x49, 0x0e, 
+	0x60, 0x08, 0x20, 0x92, 0x49, 0x0a, 0x60, 0x08, 
+	0xb0, 0x02, 0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x01, 0xe7, 0x77, 0xb0, 0x01, 
+	0xe7, 0x75, 0x00, 0x00, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x68, 0x00, 0x0c, 0x04, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xbb, 0x24, 0xb4, 0x80, 0x1c, 0x01, 
+	0x06, 0x0b, 0x0e, 0x1b, 0x22, 0x01, 0x2a, 0x19, 
+	0xd3, 0x02, 0xe0, 0x0f, 0x32, 0x01, 0xe7, 0xfa, 
+	0x00, 0x90, 0x4f, 0x08, 0x58, 0x38, 0x68, 0x80, 
+	0x02, 0x00, 0x0e, 0x00, 0x42, 0x98, 0xd1, 0x04, 
+	0x00, 0x90, 0x4f, 0x04, 0x58, 0x38, 0xbc, 0x80, 
+	0x47, 0x70, 0xe7, 0xef, 0x20, 0x00, 0xe7, 0xfa, 
+	0xe7, 0xf9, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xc4, 
+	0xb4, 0x90, 0x1c, 0x07, 0x1c, 0x0a, 0x06, 0x38, 
+	0x16, 0x01, 0x48, 0x20, 0x60, 0x02, 0x48, 0x20, 
+	0x68, 0x80, 0x23, 0x33, 0x06, 0x5b, 0x65, 0xd8, 
+	0x48, 0x1d, 0x68, 0xc0, 0x23, 0x33, 0x06, 0x5b, 
+	0x66, 0x18, 0x48, 0x1c, 0x4b, 0x1a, 0x60, 0x98, 
+	0x48, 0x1b, 0x4b, 0x19, 0x60, 0xd8, 0x20, 0x01, 
+	0x23, 0x33, 0x06, 0x5b, 0x66, 0xd8, 0x48, 0x19, 
+	0x68, 0x04, 0x23, 0x01, 0x04, 0xdb, 0x43, 0x23, 
+	0x60, 0x03, 0x48, 0x16, 0x68, 0x04, 0x23, 0x01, 
+	0x04, 0xdb, 0x43, 0x9c, 0x1c, 0x23, 0x60, 0x03, 
+	0x29, 0x00, 0xd1, 0x10, 0x20, 0xff, 0x30, 0x14, 
+	0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 0x48, 0x10, 
+	0x68, 0x04, 0x23, 0xff, 0x33, 0x01, 0x43, 0x9c, 
+	0x1c, 0x23, 0x60, 0x03, 0x48, 0x0d, 0x23, 0x1b, 
+	0x06, 0x9b, 0x64, 0x18, 0xe0, 0x08, 0x20, 0xff, 
+	0x30, 0x14, 0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 
+	0x48, 0x02, 0x68, 0x00, 0x4b, 0x08, 0x60, 0x18, 
+	0xbc, 0x90, 0x47, 0x70, 0x2e, 0x08, 0x9b, 0xbc, 
+	0x2e, 0x08, 0xb9, 0x88, 0xcc, 0x1f, 0xe0, 0x00, 
+	0xcc, 0x1f, 0xfe, 0x00, 0x6c, 0x00, 0x00, 0x40, 
+	0x6c, 0x00, 0x00, 0x20, 0x00, 0x00, 0x82, 0x18, 
+	0x6c, 0x00, 0x00, 0x80, 0xb4, 0xf0, 0x1c, 0x01, 
+	0xb0, 0x82, 0x23, 0x1b, 0x06, 0x9b, 0x6a, 0x1b, 
+	0x1c, 0x18, 0x27, 0x00, 0x22, 0x00, 0x08, 0x40, 
+	0x00, 0x40, 0x4b, 0xaf, 0x68, 0x1c, 0x08, 0x64, 
+	0x00, 0x64, 0x60, 0x1c, 0x4b, 0xad, 0x68, 0x1b, 
+	0x1c, 0x1d, 0x23, 0x1b, 0x06, 0x9b, 0x6c, 0x1b, 
+	0x93, 0x01, 0x23, 0xff, 0x33, 0x01, 0x40, 0x03, 
+	0xd0, 0x00, 0x22, 0xff, 0x23, 0x01, 0x04, 0x9b, 
+	0x40, 0x03, 0xd0, 0x1b, 0x4c, 0xa4, 0x68, 0x26, 
+	0x23, 0x01, 0x04, 0x9b, 0x43, 0x9e, 0x1c, 0x33, 
+	0x60, 0x23, 0x4c, 0xa1, 0x68, 0x26, 0x23, 0x01, 
+	0x43, 0x33, 0x60, 0x23, 0x23, 0x00, 0x93, 0x00, 
+	0x9b, 0x00, 0x2b, 0x0a, 0xdb, 0x04, 0xe0, 0x04, 
+	0x9b, 0x00, 0x33, 0x01, 0x93, 0x00, 0xe7, 0xf7, 
+	0xe7, 0xfa, 0x4b, 0x99, 0x68, 0x1c, 0x08, 0x64, 
+	0x00, 0x64, 0x60, 0x1c, 0x23, 0x01, 0x02, 0x9b, 
+	0x40, 0x0b, 0xd0, 0x29, 0x23, 0x01, 0x02, 0xdb, 
+	0x40, 0x0b, 0xd0, 0x01, 0x4b, 0x94, 0x40, 0x18, 
+	0x23, 0x01, 0x03, 0x1b, 0x40, 0x0b, 0xd0, 0x02, 
+	0x23, 0x01, 0x05, 0x9b, 0x43, 0x18, 0x4b, 0x91, 
+	0x40, 0x18, 0x02, 0x4c, 0x23, 0x7f, 0x02, 0x5b, 
+	0x40, 0x23, 0x43, 0x18, 0x23, 0x40, 0x40, 0x0b, 
+	0xd0, 0x03, 0x23, 0x01, 0x04, 0x5b, 0x43, 0x18, 
+	0xe0, 0x0a, 0x4b, 0x8b, 0x40, 0x18, 0x23, 0x20, 
+	0x40, 0x0b, 0xd0, 0x03, 0x23, 0x01, 0x04, 0x1b, 
+	0x43, 0x18, 0xe0, 0x01, 0x4b, 0x87, 0x40, 0x18, 
+	0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 0xe0, 0xfc, 
+	0x23, 0x04, 0x40, 0x0b, 0xd0, 0x0f, 0x4c, 0x7e, 
+	0x68, 0x26, 0x23, 0x01, 0x43, 0x33, 0x60, 0x23, 
+	0x4b, 0x81, 0x68, 0x9b, 0x24, 0x33, 0x06, 0x64, 
+	0x65, 0xe3, 0x4b, 0x7f, 0x68, 0xdb, 0x24, 0x33, 
+	0x06, 0x64, 0x66, 0x23, 0xe0, 0xe9, 0x23, 0x01, 
+	0x03, 0x5b, 0x40, 0x0b, 0xd0, 0x13, 0x4b, 0x7a, 
+	0x68, 0x9b, 0x24, 0x33, 0x06, 0x64, 0x65, 0xe3, 
+	0x4b, 0x77, 0x68, 0xdb, 0x24, 0x33, 0x06, 0x64, 
+	0x66, 0x23, 0x23, 0x01, 0x24, 0x33, 0x06, 0x64, 
+	0x66, 0xe3, 0x4c, 0x6d, 0x68, 0x26, 0x23, 0x01, 
+	0x43, 0x33, 0x60, 0x23, 0xe0, 0xd1, 0x07, 0xcb, 
+	0x0f, 0xdb, 0xd0, 0x02, 0x23, 0x02, 0x43, 0x18, 
+	0xe0, 0x05, 0x23, 0x02, 0x40, 0x0b, 0xd0, 0x02, 
+	0x23, 0x02, 0x43, 0xdb, 0x40, 0x18, 0x23, 0x07, 
+	0x01, 0xdb, 0x40, 0x0b, 0xd0, 0x0f, 0x23, 0x0c, 
+	0x43, 0xdb, 0x40, 0x18, 0x23, 0xff, 0x33, 0x01, 
+	0x40, 0x0b, 0xd0, 0x02, 0x23, 0x04, 0x43, 0x18, 
+	0xe0, 0x05, 0x23, 0x01, 0x02, 0x5b, 0x40, 0x0b, 
+	0xd0, 0x01, 0x23, 0x08, 0x43, 0x18, 0x23, 0x01, 
+	0x04, 0x1b, 0x40, 0x0b, 0xd0, 0x08, 0x23, 0x01, 
+	0x04, 0x9b, 0x43, 0x98, 0x1c, 0x04, 0x20, 0x01, 
+	0x04, 0xc0, 0x43, 0x20, 0x23, 0x01, 0x43, 0x18, 
+	0x23, 0x78, 0x40, 0x0b, 0xd0, 0x73, 0x23, 0x30, 
+	0x40, 0x03, 0xd0, 0x06, 0x2b, 0x10, 0xd0, 0x04, 
+	0x2b, 0x20, 0xd0, 0x42, 0x2b, 0x30, 0xd0, 0x40, 
+	0xe0, 0x81, 0x23, 0x10, 0x40, 0x0b, 0xd1, 0x02, 
+	0x23, 0x08, 0x40, 0x0b, 0xd0, 0x08, 0x23, 0x30, 
+	0x43, 0xdb, 0x40, 0x18, 0x23, 0x10, 0x40, 0x0b, 
+	0xd0, 0x01, 0x23, 0x10, 0x43, 0x18, 0xe0, 0x2f, 
+	0x23, 0x30, 0x43, 0xdb, 0x40, 0x18, 0x23, 0x20, 
+	0x40, 0x0b, 0xd0, 0x02, 0x23, 0x20, 0x43, 0x18, 
+	0xe0, 0x01, 0x23, 0x30, 0x43, 0x18, 0x23, 0x01, 
+	0x43, 0x18, 0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 
+	0x27, 0xff, 0x2a, 0x00, 0xd0, 0x04, 0x4b, 0x43, 
+	0x68, 0x1b, 0x4c, 0x43, 0x60, 0x23, 0xe0, 0x17, 
+	0x07, 0xab, 0x0f, 0x9b, 0xd0, 0x09, 0x2b, 0x01, 
+	0xd0, 0x02, 0x2b, 0x02, 0xd0, 0x0a, 0xe0, 0x0e, 
+	0x4b, 0x3e, 0x24, 0x1b, 0x06, 0xa4, 0x64, 0x23, 
+	0xe0, 0x0a, 0x4b, 0x3d, 0x24, 0x1b, 0x06, 0xa4, 
+	0x64, 0x23, 0xe0, 0x05, 0x4b, 0x3b, 0x24, 0x1b, 
+	0x06, 0xa4, 0x64, 0x23, 0xe0, 0x00, 0xe7, 0xff, 
+	0xe0, 0x42, 0x23, 0x40, 0x40, 0x0b, 0xd1, 0x02, 
+	0x23, 0x20, 0x40, 0x0b, 0xd0, 0x0b, 0x23, 0x30, 
+	0x43, 0xdb, 0x40, 0x18, 0x23, 0x20, 0x40, 0x0b, 
+	0xd0, 0x02, 0x23, 0x20, 0x43, 0x18, 0xe0, 0x01, 
+	0x23, 0x30, 0x43, 0x18, 0xe0, 0x2e, 0x23, 0x30, 
+	0x43, 0xdb, 0x40, 0x18, 0x23, 0x10, 0x40, 0x0b, 
+	0xd0, 0x01, 0x23, 0x10, 0x43, 0x18, 0x23, 0x01, 
+	0x43, 0x18, 0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 
+	0x27, 0xff, 0x2a, 0x00, 0xd0, 0x04, 0x4b, 0x23, 
+	0x68, 0x1b, 0x4c, 0x23, 0x60, 0x23, 0xe0, 0x19, 
+	0x07, 0xab, 0x0f, 0x9b, 0xe0, 0x00, 0xe0, 0x17, 
+	0xd0, 0x09, 0x2b, 0x01, 0xd0, 0x02, 0x2b, 0x02, 
+	0xd0, 0x0a, 0xe0, 0x0e, 0x4b, 0x20, 0x24, 0x1b, 
+	0x06, 0xa4, 0x64, 0x23, 0xe0, 0x0a, 0x4b, 0x1f, 
+	0x24, 0x1b, 0x06, 0xa4, 0x64, 0x23, 0xe0, 0x05, 
+	0x4b, 0x1d, 0x24, 0x1b, 0x06, 0xa4, 0x64, 0x23, 
+	0xe0, 0x00, 0xe7, 0xff, 0xe0, 0x00, 0xe7, 0xff, 
+	0x2f, 0x00, 0xd1, 0x12, 0x23, 0x1b, 0x06, 0x9b, 
+	0x62, 0x18, 0x23, 0x00, 0x93, 0x00, 0x9b, 0x00, 
+	0x2b, 0x0a, 0xdb, 0x04, 0xe0, 0x04, 0x9b, 0x00, 
+	0x33, 0x01, 0x93, 0x00, 0xe7, 0xf7, 0xe7, 0xfa, 
+	0x4b, 0x03, 0x68, 0x1c, 0x08, 0x64, 0x00, 0x64, 
+	0x60, 0x1c, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
+	0x6c, 0x00, 0x00, 0x20, 0x6c, 0x00, 0x68, 0x00, 
+	0xff, 0xbf, 0xff, 0xff, 0xff, 0xfe, 0x01, 0xff, 
+	0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 
+	0x2e, 0x08, 0xb9, 0x88, 0x2e, 0x08, 0x9b, 0xbc, 
+	0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x98, 0x60, 
+	0x00, 0x01, 0x58, 0x60, 0x00, 0x02, 0x54, 0x28, 
+	0x00, 0x00, 0x82, 0x18, 0x00, 0x01, 0x42, 0x18, 
+	0x00, 0x02, 0x42, 0x18, 0xb5, 0xf3, 0x1c, 0x0f, 
+	0xb0, 0x81, 0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 
+	0x90, 0x00, 0x98, 0x00, 0x28, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x33, 0x06, 0x40, 
+	0x6e, 0x00, 0x21, 0x33, 0x06, 0x49, 0x6d, 0xc9, 
+	0x1a, 0x46, 0x48, 0x12, 0x6c, 0x80, 0x1c, 0x04, 
+	0x48, 0x10, 0x6c, 0xc0, 0x1c, 0x05, 0x42, 0xac, 
+	0xd9, 0x09, 0x1b, 0x60, 0x21, 0x64, 0x43, 0x41, 
+	0x1c, 0x30, 0xf0, 0x09, 0xff, 0xcb, 0x21, 0x64, 
+	0x1a, 0x08, 0x60, 0x38, 0xe0, 0x06, 0x1b, 0x28, 
+	0x21, 0x64, 0x43, 0x41, 0x1c, 0x30, 0xf0, 0x09, 
+	0xff, 0xc1, 0x60, 0x38, 0x42, 0xac, 0xd1, 0x03, 
+	0x20, 0x31, 0xb0, 0x01, 0xe7, 0xd6, 0xe0, 0x02, 
+	0x20, 0x00, 0xb0, 0x01, 0xe7, 0xd2, 0xb0, 0x01, 
+	0xe7, 0xd0, 0x00, 0x00, 0x66, 0x00, 0x00, 0x80, 
+	0xb5, 0xff, 0x1c, 0x14, 0x1c, 0x1f, 0xb0, 0x82, 
+	0x98, 0x02, 0x06, 0x01, 0x0e, 0x09, 0x91, 0x00, 
+	0x98, 0x0b, 0x06, 0x03, 0x16, 0x1b, 0x93, 0x01, 
+	0xb0, 0x84, 0x99, 0x04, 0x29, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x9b, 0x05, 0x2b, 0x1f, 
+	0xdd, 0x02, 0x20, 0xaf, 0xb0, 0x06, 0xe7, 0xf5, 
+	0x98, 0x07, 0x90, 0x01, 0x2f, 0x00, 0xd0, 0x47, 
+	0xb0, 0x81, 0x98, 0x08, 0x22, 0x00, 0x92, 0x00, 
+	0x22, 0x1b, 0x06, 0x92, 0x6a, 0x12, 0x23, 0x01, 
+	0x05, 0x1b, 0x40, 0x1a, 0xd0, 0x01, 0x22, 0xff, 
+	0x92, 0x00, 0x25, 0x00, 0x08, 0x62, 0x42, 0xaa, 
+	0xd8, 0x02, 0xe0, 0x34, 0x35, 0x01, 0xe7, 0xf9, 
+	0x9a, 0x00, 0x2a, 0x00, 0xd0, 0x1e, 0x88, 0x02, 
+	0x23, 0xff, 0x02, 0x1b, 0x40, 0x1a, 0x12, 0x12, 
+	0x88, 0x03, 0x02, 0x1b, 0x43, 0x1a, 0x04, 0x11, 
+	0x0c, 0x09, 0x2f, 0x00, 0xda, 0x05, 0x42, 0x7a, 
+	0x41, 0x11, 0x1c, 0x0b, 0x04, 0x19, 0x0c, 0x09, 
+	0xe0, 0x03, 0x40, 0xb9, 0x1c, 0x0a, 0x04, 0x11, 
+	0x0c, 0x09, 0x22, 0xff, 0x02, 0x12, 0x40, 0x0a, 
+	0x12, 0x12, 0x02, 0x0b, 0x43, 0x13, 0x80, 0x03, 
+	0x30, 0x02, 0xe0, 0x0f, 0x2f, 0x00, 0xda, 0x07, 
+	0x88, 0x02, 0x42, 0x7e, 0x41, 0x32, 0x04, 0x12, 
+	0x0c, 0x12, 0x80, 0x02, 0x30, 0x02, 0xe0, 0x05, 
+	0x88, 0x02, 0x40, 0xba, 0x04, 0x12, 0x0c, 0x12, 
+	0x80, 0x02, 0x30, 0x02, 0xe7, 0xca, 0xb0, 0x01, 
+	0x49, 0x23, 0x91, 0x03, 0x20, 0x01, 0x06, 0x00, 
+	0x99, 0x03, 0x60, 0x08, 0x48, 0x21, 0x6c, 0x80, 
+	0x49, 0x20, 0x6c, 0xc9, 0x1a, 0x40, 0x90, 0x00, 
+	0x98, 0x00, 0x28, 0x00, 0xdc, 0x09, 0x20, 0x33, 
+	0x06, 0x40, 0x6e, 0x00, 0x21, 0x33, 0x06, 0x49, 
+	0x6d, 0xc9, 0x1a, 0x40, 0x99, 0x00, 0x18, 0x40, 
+	0x90, 0x00, 0x98, 0x00, 0x23, 0x3b, 0x01, 0xdb, 
+	0x42, 0x98, 0xda, 0x02, 0x20, 0x06, 0xf0, 0x08, 
+	0xfd, 0x8d, 0x98, 0x00, 0x23, 0x3b, 0x01, 0xdb, 
+	0x42, 0x98, 0xdb, 0xdf, 0x98, 0x00, 0x42, 0x84, 
+	0xd9, 0x02, 0x98, 0x00, 0x90, 0x02, 0xe0, 0x00, 
+	0x94, 0x02, 0x22, 0x04, 0x99, 0x03, 0xb4, 0x06, 
+	0x9b, 0x07, 0x9a, 0x04, 0x99, 0x06, 0x98, 0x03, 
+	0xf0, 0x04, 0xfb, 0x8c, 0xb0, 0x02, 0x98, 0x02, 
+	0x1a, 0x24, 0x98, 0x01, 0x99, 0x02, 0x18, 0x40, 
+	0x90, 0x01, 0x20, 0x00, 0x90, 0x00, 0x2c, 0x00, 
+	0xd1, 0xc4, 0x20, 0x00, 0xb0, 0x06, 0xe7, 0x65, 
+	0xb0, 0x04, 0xb0, 0x02, 0xe7, 0x62, 0x00, 0x00, 
+	0x9e, 0x00, 0x08, 0x00, 0x66, 0x00, 0x00, 0x80, 
+	0x20, 0x1b, 0x06, 0x80, 0x6a, 0x00, 0x07, 0xc0, 
+	0x0f, 0xc0, 0x4a, 0x03, 0x68, 0x12, 0x1c, 0x01, 
+	0x43, 0x11, 0x1c, 0x08, 0x47, 0x70, 0xe7, 0xfd, 
+	0x6c, 0x00, 0x08, 0x00, 0xb4, 0x90, 0x1c, 0x01, 
+	0x20, 0x1b, 0x06, 0x80, 0x6a, 0x00, 0x1c, 0x04, 
+	0x48, 0x1b, 0x68, 0x00, 0x1c, 0x07, 0x20, 0x30, 
+	0x40, 0x20, 0xd0, 0x06, 0x28, 0x10, 0xd0, 0x06, 
+	0x28, 0x20, 0xd0, 0x06, 0x28, 0x30, 0xd0, 0x06, 
+	0xe0, 0x07, 0x22, 0x01, 0xe0, 0x08, 0x22, 0x02, 
+	0xe0, 0x06, 0x22, 0x04, 0xe0, 0x04, 0x22, 0x08, 
+	0xe0, 0x02, 0x20, 0x30, 0xbc, 0x90, 0x47, 0x70, 
+	0x20, 0x03, 0x07, 0x40, 0x40, 0x38, 0x0f, 0x40, 
+	0xd0, 0x04, 0x28, 0x01, 0xd0, 0x05, 0x28, 0x02, 
+	0xd0, 0x06, 0xe0, 0x08, 0x23, 0x10, 0x43, 0x1a, 
+	0xe0, 0x07, 0x23, 0x20, 0x43, 0x1a, 0xe0, 0x04, 
+	0x23, 0x40, 0x43, 0x1a, 0xe0, 0x01, 0x20, 0x30, 
+	0xe7, 0xe8, 0x20, 0x01, 0x05, 0xc0, 0x40, 0x38, 
+	0xd1, 0x01, 0x23, 0x80, 0x43, 0x1a, 0x60, 0x0a, 
+	0x20, 0x00, 0xe7, 0xdf, 0xe7, 0xde, 0x00, 0x00, 
+	0x6c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0x48, 0x01, 
+	0x60, 0x01, 0x47, 0x70, 0x6c, 0x00, 0x00, 0x80, 
+	0x1c, 0x01, 0x29, 0x1f, 0xdd, 0x01, 0x20, 0xaf, 
+	0x47, 0x70, 0x20, 0x80, 0x6c, 0x00, 0x60, 0x01, 
+	0x20, 0x00, 0xe7, 0xf9, 0xe7, 0xf8, 0xb5, 0xf3, 
+	0x1c, 0x0a, 0xb0, 0x81, 0x98, 0x01, 0x06, 0x03, 
+	0x0e, 0x1b, 0x93, 0x00, 0xb0, 0x81, 0x20, 0x1b, 
+	0x06, 0x80, 0x6a, 0x00, 0x1c, 0x01, 0x25, 0x00, 
+	0x20, 0x00, 0x90, 0x00, 0x20, 0x1b, 0x06, 0x80, 
+	0x6c, 0x00, 0x1c, 0x04, 0x27, 0x00, 0x9b, 0x01, 
+	0x2b, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x02, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 0x23, 0x0d, 
+	0x06, 0x9b, 0x1a, 0xc0, 0x9b, 0x01, 0x00, 0xdb, 
+	0x4e, 0x5f, 0x68, 0x36, 0x19, 0x9b, 0x60, 0x58, 
+	0x20, 0xff, 0x30, 0x01, 0x40, 0x08, 0xd0, 0x01, 
+	0x20, 0xff, 0x90, 0x00, 0x23, 0x01, 0x04, 0xdb, 
+	0x43, 0x99, 0x1c, 0x08, 0x21, 0x01, 0x04, 0x89, 
+	0x43, 0x01, 0x20, 0x01, 0x03, 0x00, 0x40, 0x10, 
+	0xd0, 0x05, 0x06, 0x90, 0x0e, 0x80, 0xd0, 0x02, 
+	0x23, 0x01, 0x05, 0x1b, 0x43, 0x19, 0x23, 0x30, 
+	0x43, 0xdb, 0x40, 0x19, 0x05, 0x10, 0x0d, 0x00, 
+	0x28, 0x40, 0xd0, 0x48, 0xdc, 0x0e, 0x28, 0x08, 
+	0xd0, 0x32, 0xdc, 0x06, 0x28, 0x01, 0xd0, 0x1e, 
+	0x28, 0x02, 0xd0, 0x21, 0x28, 0x04, 0xd0, 0x26, 
+	0xe0, 0x67, 0x28, 0x10, 0xd0, 0x2f, 0x28, 0x20, 
+	0xd0, 0x32, 0xe0, 0x62, 0x23, 0x01, 0x02, 0x5b, 
+	0x42, 0x98, 0xd0, 0x49, 0xdc, 0x06, 0x28, 0x80, 
+	0xd0, 0x38, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
+	0xd0, 0x3b, 0xe0, 0x56, 0x23, 0x01, 0x02, 0x9b, 
+	0x42, 0x98, 0xd0, 0x44, 0x23, 0x01, 0x02, 0xdb, 
+	0x42, 0x98, 0xd0, 0x47, 0xe0, 0x4d, 0x4b, 0x3d, 
+	0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x3b, 0xe0, 0x49, 
+	0x23, 0x10, 0x43, 0x19, 0x4b, 0x39, 0x42, 0x9c, 
+	0xd0, 0x00, 0x4f, 0x38, 0xe0, 0x42, 0x4b, 0x38, 
+	0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x36, 0xe0, 0x3d, 
+	0x23, 0x10, 0x43, 0x19, 0x4b, 0x34, 0x42, 0x9c, 
+	0xd0, 0x00, 0x4f, 0x33, 0xe0, 0x36, 0x4b, 0x33, 
+	0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x31, 0xe0, 0x31, 
+	0x23, 0x10, 0x43, 0x19, 0x4b, 0x2f, 0x42, 0x9c, 
+	0xd0, 0x00, 0x4f, 0x2e, 0xe0, 0x2a, 0x23, 0x20, 
+	0x43, 0x19, 0x4b, 0x2d, 0x42, 0x9c, 0xd0, 0x00, 
+	0x4f, 0x2b, 0xe0, 0x23, 0x23, 0x30, 0x43, 0x19, 
+	0x4b, 0x29, 0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x28, 
+	0xe0, 0x1c, 0x23, 0x20, 0x43, 0x19, 0x4b, 0x27, 
+	0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x25, 0xe0, 0x15, 
+	0x23, 0x30, 0x43, 0x19, 0x4b, 0x23, 0x42, 0x9c, 
+	0xd0, 0x00, 0x4f, 0x22, 0xe0, 0x0e, 0x23, 0x20, 
+	0x43, 0x19, 0x4b, 0x21, 0x42, 0x9c, 0xd0, 0x00, 
+	0x4f, 0x1f, 0xe0, 0x07, 0x23, 0x30, 0x43, 0x19, 
+	0x4b, 0x1d, 0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x1c, 
+	0xe0, 0x00, 0xe7, 0xff, 0x98, 0x00, 0x28, 0x00, 
+	0xd0, 0x0a, 0x23, 0x01, 0x43, 0x19, 0x20, 0x1b, 
+	0x06, 0x80, 0x62, 0x01, 0x48, 0x17, 0x68, 0x00, 
+	0x4b, 0x17, 0x60, 0x18, 0x25, 0xff, 0xe0, 0x0e, 
+	0x23, 0x01, 0x43, 0x19, 0x2f, 0x00, 0xd0, 0x07, 
+	0x20, 0x1b, 0x06, 0x80, 0x62, 0x01, 0x20, 0x1b, 
+	0x06, 0x80, 0x64, 0x07, 0x25, 0xff, 0xe0, 0x02, 
+	0x20, 0x1b, 0x06, 0x80, 0x62, 0x01, 0x2d, 0x00, 
+	0xd1, 0x04, 0x48, 0x0e, 0x68, 0x03, 0x08, 0x5b, 
+	0x00, 0x5b, 0x60, 0x03, 0x20, 0x00, 0xb0, 0x02, 
+	0xe7, 0x36, 0xb0, 0x01, 0xb0, 0x01, 0xe7, 0x33, 
+	0x2e, 0x08, 0x9b, 0x40, 0x00, 0x00, 0x82, 0x18, 
+	0x00, 0x01, 0x42, 0x18, 0x00, 0x02, 0x42, 0x18, 
+	0x00, 0x00, 0x98, 0x60, 0x00, 0x01, 0x58, 0x60, 
+	0x00, 0x02, 0x54, 0x28, 0x2e, 0x08, 0x9b, 0xbc, 
+	0x6c, 0x00, 0x00, 0x80, 0x6c, 0x00, 0x00, 0x20, 
+	0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x82, 0x49, 0x2c, 
+	0x46, 0x68, 0x22, 0x08, 0xf0, 0x09, 0xfd, 0xca, 
+	0x20, 0x04, 0xf7, 0xff, 0xfc, 0x23, 0x48, 0x29, 
+	0x68, 0x80, 0x21, 0x33, 0x06, 0x49, 0x65, 0xc8, 
+	0x48, 0x26, 0x68, 0xc0, 0x21, 0x33, 0x06, 0x49, 
+	0x66, 0x08, 0x48, 0x25, 0x68, 0x01, 0x23, 0x02, 
+	0x43, 0x19, 0x60, 0x01, 0x20, 0x01, 0x21, 0x33, 
+	0x06, 0x49, 0x67, 0xc8, 0x48, 0x21, 0x68, 0x01, 
+	0x31, 0xff, 0x31, 0xff, 0x31, 0x02, 0x60, 0x01, 
+	0x1c, 0x78, 0x12, 0x00, 0xab, 0x01, 0x70, 0x18, 
+	0x1c, 0x78, 0xab, 0x01, 0x70, 0x58, 0x20, 0x33, 
+	0x06, 0x40, 0x6d, 0xc5, 0x4b, 0x1a, 0x43, 0x1d, 
+	0x26, 0x00, 0x2e, 0x10, 0xdb, 0x02, 0xe0, 0x18, 
+	0x36, 0x01, 0xe7, 0xfa, 0x24, 0x00, 0x2c, 0x07, 
+	0xd3, 0x02, 0xe0, 0x06, 0x34, 0x01, 0xe7, 0xfa, 
+	0x46, 0x68, 0x5d, 0x01, 0x70, 0x29, 0x35, 0x01, 
+	0xe7, 0xf8, 0x24, 0x00, 0x42, 0xbc, 0xdb, 0x02, 
+	0xe0, 0x06, 0x34, 0x01, 0xe7, 0xfa, 0x98, 0x02, 
+	0x5d, 0x01, 0x70, 0x29, 0x35, 0x01, 0xe7, 0xf8, 
+	0xe7, 0xe6, 0x20, 0x33, 0x06, 0x40, 0x66, 0x05, 
+	0x48, 0x0a, 0x68, 0x01, 0x23, 0x01, 0x05, 0x5b, 
+	0x43, 0x19, 0x60, 0x01, 0xb0, 0x02, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x03, 0xa8, 0x70, 0x2e, 0x08, 0xb9, 0x88, 
+	0x66, 0x00, 0x00, 0x70, 0x66, 0x00, 0x00, 0x5c, 
+	0xcc, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x20, 
+	0xb5, 0xf7, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x20, 
+	0x0e, 0x00, 0x06, 0x3d, 0x0e, 0x2d, 0x99, 0x02, 
+	0x06, 0x0a, 0x0e, 0x12, 0x21, 0x02, 0x40, 0x01, 
+	0xd0, 0x04, 0x21, 0xff, 0x4b, 0x2f, 0x68, 0x1b, 
+	0x72, 0x19, 0xe0, 0x0c, 0x49, 0x2d, 0x68, 0x09, 
+	0x7a, 0x09, 0x29, 0xff, 0xd1, 0x03, 0x21, 0x00, 
+	0x4b, 0x2a, 0x68, 0x1b, 0x60, 0x19, 0x21, 0x00, 
+	0x4b, 0x28, 0x68, 0x1b, 0x72, 0x19, 0x07, 0xc1, 
+	0x0f, 0xc9, 0xd0, 0x04, 0x21, 0xff, 0x4b, 0x25, 
+	0x68, 0x1b, 0x72, 0x59, 0xe0, 0x0c, 0x49, 0x23, 
+	0x68, 0x09, 0x7a, 0x49, 0x29, 0xff, 0xd1, 0x03, 
+	0x21, 0x00, 0x4b, 0x20, 0x68, 0x1b, 0x60, 0x59, 
+	0x21, 0x00, 0x4b, 0x1e, 0x68, 0x1b, 0x72, 0x59, 
+	0x2d, 0x01, 0xd1, 0x0f, 0x49, 0x1c, 0x68, 0x0e, 
+	0x23, 0x01, 0x05, 0x5b, 0x43, 0x9e, 0x1c, 0x33, 
+	0x60, 0x0b, 0x49, 0x1a, 0x68, 0x09, 0x78, 0x09, 
+	0x23, 0x02, 0x43, 0x19, 0x4b, 0x17, 0x68, 0x1b, 
+	0x70, 0x19, 0xe0, 0x0e, 0x49, 0x14, 0x68, 0x0e, 
+	0x23, 0x01, 0x05, 0x5b, 0x43, 0x33, 0x60, 0x0b, 
+	0x49, 0x12, 0x68, 0x09, 0x78, 0x09, 0x23, 0x02, 
+	0x43, 0xdb, 0x40, 0x19, 0x4b, 0x0f, 0x68, 0x1b, 
+	0x70, 0x19, 0x49, 0x0f, 0x62, 0x4a, 0x2a, 0x01, 
+	0xd1, 0x08, 0x49, 0x0c, 0x68, 0x09, 0x78, 0x09, 
+	0x23, 0x01, 0x43, 0x19, 0x4b, 0x09, 0x68, 0x1b, 
+	0x70, 0x19, 0xe0, 0x07, 0x49, 0x07, 0x68, 0x09, 
+	0x78, 0x09, 0x08, 0x49, 0x00, 0x49, 0x4b, 0x05, 
+	0x68, 0x1b, 0x70, 0x19, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x9b, 0xc0, 
+	0x6c, 0x00, 0x00, 0x20, 0x2e, 0x08, 0x9b, 0xc4, 
+	0xcc, 0x00, 0x0f, 0x80, 0xb4, 0x80, 0x1c, 0x07, 
+	0x1c, 0x0a, 0x68, 0x38, 0x49, 0x23, 0x68, 0x09, 
+	0x60, 0xc8, 0x68, 0x78, 0x49, 0x21, 0x68, 0x09, 
+	0x61, 0x08, 0x68, 0xb8, 0x49, 0x1f, 0x68, 0x09, 
+	0x61, 0x48, 0x68, 0xf8, 0x49, 0x1d, 0x68, 0x09, 
+	0x61, 0x88, 0x7d, 0x38, 0x49, 0x1b, 0x68, 0x09, 
+	0x31, 0x20, 0x70, 0x08, 0x7d, 0x78, 0x49, 0x19, 
+	0x68, 0x09, 0x31, 0x20, 0x70, 0x48, 0x69, 0x38, 
+	0x49, 0x16, 0x68, 0x09, 0x61, 0xc8, 0x7d, 0xb8, 
+	0x49, 0x14, 0x68, 0x09, 0x31, 0x20, 0x70, 0x88, 
+	0x68, 0x10, 0x49, 0x12, 0x68, 0x09, 0x62, 0x48, 
+	0x68, 0x50, 0x49, 0x10, 0x68, 0x09, 0x62, 0x88, 
+	0x68, 0x90, 0x49, 0x0e, 0x68, 0x09, 0x62, 0xc8, 
+	0x68, 0xd0, 0x49, 0x0c, 0x68, 0x09, 0x63, 0x08, 
+	0x7d, 0x10, 0x49, 0x0a, 0x68, 0x09, 0x31, 0x20, 
+	0x76, 0x08, 0x7d, 0x50, 0x49, 0x07, 0x68, 0x09, 
+	0x31, 0x20, 0x76, 0x48, 0x69, 0x10, 0x49, 0x05, 
+	0x68, 0x09, 0x63, 0x48, 0x7d, 0x90, 0x49, 0x03, 
+	0x68, 0x09, 0x31, 0x20, 0x76, 0x88, 0xbc, 0x80, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xc0, 
+	0x1c, 0x02, 0x1c, 0x0b, 0x48, 0x03, 0x68, 0x00, 
+	0x60, 0x02, 0x48, 0x02, 0x68, 0x00, 0x60, 0x43, 
+	0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xc0, 
+	0xb5, 0xf3, 0xb0, 0x88, 0x98, 0x08, 0x68, 0x04, 
+	0x20, 0x01, 0x90, 0x06, 0x20, 0x01, 0x90, 0x05, 
+	0x48, 0x8c, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x19, 
+	0x48, 0x8a, 0x68, 0x00, 0x38, 0x01, 0x49, 0x89, 
+	0x60, 0x08, 0x48, 0x88, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x10, 0x48, 0x87, 0x78, 0x80, 0x90, 0x00, 
+	0x98, 0x00, 0x00, 0xc0, 0x49, 0x85, 0x68, 0x09, 
+	0x58, 0x08, 0x23, 0xff, 0x33, 0x01, 0x43, 0x98, 
+	0x1c, 0x01, 0x98, 0x00, 0x00, 0xc0, 0x4a, 0x81, 
+	0x68, 0x12, 0x50, 0x11, 0x20, 0x33, 0x06, 0x40, 
+	0x6e, 0x00, 0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc1, 
+	0x91, 0x02, 0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 
+	0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x90, 0x01, 
+	0x48, 0x79, 0x68, 0x00, 0x42, 0x84, 0xd1, 0x73, 
+	0x98, 0x01, 0x1d, 0xc7, 0x37, 0x01, 0x78, 0x38, 
+	0x18, 0x38, 0x1c, 0x47, 0x48, 0x75, 0x6c, 0xc0, 
+	0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x42, 0xb8, 
+	0xd9, 0x19, 0x78, 0x38, 0x28, 0xff, 0xd1, 0x12, 
+	0x78, 0x78, 0x23, 0xf0, 0x40, 0x18, 0x28, 0xf0, 
+	0xd1, 0x0d, 0x78, 0xb8, 0x10, 0x80, 0x07, 0x80, 
+	0x0f, 0x80, 0x06, 0x00, 0x16, 0x00, 0x90, 0x06, 
+	0x78, 0x78, 0x10, 0xc0, 0x07, 0xc0, 0x09, 0xc0, 
+	0x16, 0x00, 0x90, 0x05, 0xe0, 0x03, 0x21, 0x01, 
+	0x70, 0x39, 0x18, 0x7f, 0xe7, 0xde, 0x21, 0x40, 
+	0x91, 0x03, 0x25, 0x20, 0x21, 0x14, 0x91, 0x07, 
+	0x98, 0x06, 0x28, 0x00, 0xd1, 0x02, 0x25, 0x23, 
+	0x21, 0x12, 0x91, 0x07, 0x98, 0x06, 0x28, 0x02, 
+	0xd1, 0x02, 0x25, 0x30, 0x21, 0x18, 0x91, 0x07, 
+	0x98, 0x05, 0x28, 0x00, 0xd1, 0x02, 0x00, 0x6d, 
+	0x21, 0x70, 0x91, 0x03, 0x99, 0x03, 0x00, 0x48, 
+	0x99, 0x02, 0x1a, 0x08, 0x90, 0x04, 0x98, 0x04, 
+	0x99, 0x02, 0x42, 0x88, 0xd3, 0x05, 0xe0, 0x4e, 
+	0x98, 0x04, 0x99, 0x03, 0x18, 0x40, 0x90, 0x04, 
+	0xe7, 0xf5, 0x9f, 0x04, 0x21, 0x00, 0x70, 0x39, 
+	0x37, 0x01, 0x21, 0x00, 0x70, 0x39, 0x37, 0x01, 
+	0x21, 0x01, 0x70, 0x39, 0x18, 0x7f, 0x21, 0xc0, 
+	0x70, 0x39, 0x37, 0x01, 0x21, 0x00, 0x70, 0x39, 
+	0x37, 0x01, 0x21, 0x3a, 0x70, 0x39, 0x37, 0x01, 
+	0x21, 0x80, 0x70, 0x39, 0x37, 0x01, 0x21, 0x00, 
+	0x70, 0x39, 0x37, 0x01, 0x99, 0x03, 0x1f, 0xc8, 
+	0x38, 0x02, 0x1b, 0x41, 0x70, 0x39, 0x37, 0x01, 
+	0x26, 0x00, 0x99, 0x03, 0x1f, 0xc8, 0x38, 0x02, 
+	0x1b, 0x40, 0x42, 0xb0, 0xdc, 0x04, 0xe0, 0x00, 
+	0xe0, 0x34, 0xe0, 0x05, 0x36, 0x01, 0xe7, 0xf4, 
+	0x21, 0xff, 0x70, 0x39, 0x37, 0x01, 0xe7, 0xf9, 
+	0x21, 0xff, 0x70, 0x39, 0x37, 0x01, 0x98, 0x05, 
+	0x00, 0xc0, 0x21, 0xf7, 0x43, 0x01, 0x70, 0x39, 
+	0x37, 0x01, 0x99, 0x07, 0x70, 0x39, 0x37, 0x01, 
+	0x21, 0xc0, 0x70, 0x39, 0x37, 0x01, 0x26, 0x00, 
+	0x1f, 0x28, 0x42, 0xb0, 0xdc, 0x02, 0xe0, 0x05, 
+	0x36, 0x01, 0xe7, 0xf9, 0x21, 0x00, 0x70, 0x39, 
+	0x37, 0x01, 0xe7, 0xf9, 0xe7, 0xb0, 0x99, 0x03, 
+	0x00, 0x48, 0x99, 0x02, 0x1a, 0x08, 0x23, 0x0d, 
+	0x06, 0x9b, 0x18, 0xc0, 0x49, 0x29, 0x64, 0x88, 
+	0x99, 0x09, 0x20, 0x78, 0x40, 0x08, 0x23, 0x02, 
+	0x43, 0x18, 0xf7, 0xff, 0xfa, 0x17, 0x20, 0x01, 
+	0xf7, 0xff, 0xfa, 0x14, 0x48, 0x22, 0x68, 0x00, 
+	0x38, 0x02, 0x42, 0xa0, 0xd1, 0x09, 0x48, 0x22, 
+	0x68, 0x01, 0x23, 0x01, 0x05, 0x5b, 0x43, 0x19, 
+	0x60, 0x01, 0x20, 0xff, 0x49, 0x1f, 0x68, 0x09, 
+	0x70, 0x08, 0x48, 0x1b, 0x68, 0x00, 0x38, 0x02, 
+	0x42, 0xa0, 0xd3, 0x0f, 0x48, 0x1c, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x05, 0x48, 0x1a, 0x68, 0x00, 
+	0x23, 0x01, 0x06, 0x9b, 0x40, 0x18, 0xd0, 0x05, 
+	0x20, 0x32, 0x49, 0x13, 0x60, 0x08, 0x48, 0x12, 
+	0x68, 0x00, 0x1e, 0x84, 0x2c, 0x01, 0xd1, 0x02, 
+	0x20, 0x02, 0xf7, 0xff, 0xf9, 0xeb, 0x2c, 0xff, 
+	0xd1, 0x08, 0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 
+	0x30, 0xbc, 0x49, 0x0c, 0x6c, 0xc9, 0x42, 0x88, 
+	0xd2, 0x00, 0x24, 0x18, 0x2c, 0x00, 0xd0, 0x02, 
+	0x2c, 0xff, 0xd0, 0x00, 0x3c, 0x01, 0x98, 0x08, 
+	0x60, 0x04, 0xb0, 0x08, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x9b, 0xb0, 
+	0x2e, 0x08, 0x9b, 0x9c, 0x2e, 0x08, 0x9b, 0x3c, 
+	0x2e, 0x08, 0x1f, 0x98, 0x66, 0x00, 0x00, 0x80, 
+	0x6c, 0x00, 0x00, 0x20, 0x2e, 0x08, 0x9b, 0x98, 
+	0x6c, 0x00, 0x08, 0x00, 0xb5, 0xff, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x9a, 0x02, 0x06, 0x15, 0x0e, 0x2d, 
+	0x9b, 0x03, 0x06, 0x1e, 0x0e, 0x36, 0x2e, 0x20, 
+	0xdb, 0x04, 0x20, 0xa2, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2d, 0x1f, 0xdb, 0x01, 
+	0x20, 0xaf, 0xe7, 0xf7, 0x20, 0x01, 0x03, 0x40, 
+	0xf7, 0xff, 0xf9, 0xac, 0x20, 0x14, 0x49, 0x09, 
+	0x60, 0x08, 0x20, 0xff, 0x60, 0x20, 0x1c, 0x33, 
+	0x1c, 0x29, 0x1c, 0x38, 0x22, 0x02, 0xf7, 0xfc, 
+	0xfa, 0x4b, 0x48, 0x05, 0x68, 0x01, 0x23, 0x01, 
+	0x05, 0x5b, 0x43, 0x19, 0x60, 0x01, 0x20, 0x00, 
+	0xe7, 0xe0, 0xe7, 0xdf, 0x2e, 0x08, 0x1f, 0x98, 
+	0x6c, 0x00, 0x00, 0x20, 0xb4, 0x0f, 0xb5, 0xf0, 
+	0x1c, 0x07, 0xb0, 0x82, 0x20, 0x00, 0x49, 0x16, 
+	0x60, 0x08, 0x48, 0x16, 0x6f, 0x80, 0x23, 0x09, 
+	0x01, 0x9b, 0x42, 0x98, 0xd1, 0x02, 0x20, 0xe1, 
+	0x00, 0xc0, 0xe0, 0x00, 0x48, 0x12, 0x1c, 0x05, 
+	0x68, 0x38, 0x28, 0xff, 0xd1, 0x17, 0x98, 0x0d, 
+	0x90, 0x00, 0x98, 0x0c, 0x90, 0x01, 0x98, 0x01, 
+	0x99, 0x00, 0x1a, 0x46, 0x08, 0x68, 0x19, 0x81, 
+	0x1c, 0x28, 0xf0, 0x09, 0xfa, 0xeb, 0x1c, 0x04, 
+	0x34, 0x01, 0x0f, 0xf0, 0x07, 0xc0, 0xd0, 0x00, 
+	0x24, 0x04, 0x2c, 0x32, 0xd9, 0x00, 0x24, 0x04, 
+	0x1d, 0xe0, 0x30, 0x0d, 0x60, 0x38, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0xb0, 0x04, 0x47, 0x18, 
+	0x2e, 0x08, 0x9b, 0xb0, 0xcc, 0x00, 0x0f, 0x80, 
+	0x00, 0x00, 0x05, 0xdd, 0xb5, 0xf3, 0x1c, 0x07, 
+	0xb0, 0x81, 0x99, 0x02, 0x06, 0x09, 0x0e, 0x09, 
+	0x91, 0x00, 0xb0, 0x82, 0x99, 0x02, 0x29, 0x20, 
+	0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x03, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x99, 0x02, 
+	0x00, 0x88, 0x49, 0x2f, 0x58, 0x08, 0x90, 0x01, 
+	0x28, 0x00, 0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x03, 
+	0xe7, 0xf1, 0x20, 0x00, 0x70, 0x78, 0x78, 0xb8, 
+	0x07, 0x00, 0x0f, 0x00, 0x90, 0x00, 0x98, 0x00, 
+	0x28, 0x04, 0xd1, 0x1f, 0x6a, 0xfe, 0x24, 0x00, 
+	0x2c, 0x08, 0xdb, 0x04, 0xe0, 0x18, 0x1c, 0x60, 
+	0x06, 0x04, 0x0e, 0x24, 0xe7, 0xf8, 0x00, 0xa0, 
+	0x19, 0x80, 0x68, 0x40, 0x00, 0xa1, 0x19, 0x89, 
+	0x64, 0x48, 0x21, 0x00, 0x00, 0xa0, 0x19, 0x80, 
+	0x62, 0x41, 0x00, 0xa0, 0x19, 0x80, 0x6c, 0x40, 
+	0x28, 0x00, 0xd0, 0x04, 0x20, 0x80, 0x41, 0x20, 
+	0x88, 0x31, 0x43, 0x08, 0x80, 0x30, 0xe7, 0xe6, 
+	0x88, 0x30, 0x80, 0x70, 0x78, 0xb8, 0x23, 0x20, 
+	0x40, 0x18, 0xd0, 0x1f, 0x6b, 0x3d, 0x20, 0x00, 
+	0x60, 0x28, 0x20, 0x00, 0x60, 0x68, 0x20, 0x00, 
+	0x60, 0xa8, 0x24, 0x00, 0x2c, 0x08, 0xdb, 0x04, 
+	0xe0, 0x0c, 0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 
+	0xe7, 0xf8, 0x20, 0x00, 0x00, 0xa1, 0x19, 0x49, 
+	0x60, 0xc8, 0x20, 0x00, 0x00, 0xa1, 0x19, 0x49, 
+	0x63, 0x88, 0xe7, 0xf2, 0x20, 0x00, 0x62, 0xe8, 
+	0x20, 0x00, 0x63, 0x28, 0x20, 0x00, 0x63, 0x68, 
+	0x20, 0x00, 0x65, 0xa8, 0x99, 0x02, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x3e, 0xb0, 0x03, 0xe7, 0x9e, 
+	0xb0, 0x02, 0xb0, 0x01, 0xe7, 0x9b, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb5, 0xf3, 0x1c, 0x07, 
+	0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0xb0, 0x82, 
+	0x2c, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x02, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0xa0, 0x49, 0x12, 0x58, 0x08, 0x1c, 0x05, 
+	0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x02, 0xe7, 0xf3, 
+	0x1c, 0x21, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x84, 
+	0x1c, 0x06, 0xd0, 0x02, 0x1c, 0x30, 0xb0, 0x02, 
+	0xe7, 0xea, 0x78, 0x68, 0x21, 0x20, 0x40, 0x01, 
+	0x91, 0x00, 0x99, 0x00, 0x1c, 0x38, 0xf0, 0x00, 
+	0xff, 0x3f, 0x68, 0xe9, 0x91, 0x01, 0x29, 0x00, 
+	0xd0, 0x03, 0x99, 0x01, 0x1c, 0x38, 0xf0, 0x03, 
+	0xfe, 0x7a, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xd7, 
+	0xb0, 0x02, 0xe7, 0xd5, 0x2e, 0x08, 0x9b, 0xc8, 
+	0xb5, 0xf3, 0x1c, 0x02, 0x99, 0x01, 0x06, 0x0f, 
+	0x0e, 0x3f, 0xb0, 0x86, 0x00, 0xb8, 0x4b, 0xa1, 
+	0x68, 0x1b, 0x18, 0xc0, 0x90, 0x00, 0x2f, 0x20, 
+	0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0xb8, 
+	0x4b, 0x9b, 0x58, 0x18, 0x90, 0x05, 0x28, 0x00, 
+	0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x06, 0xe7, 0xf2, 
+	0x78, 0x90, 0x90, 0x01, 0x71, 0xd7, 0x78, 0xd1, 
+	0x98, 0x01, 0x23, 0x80, 0x40, 0x18, 0xd1, 0x73, 
+	0x29, 0x20, 0xdd, 0x02, 0x20, 0xb1, 0xb0, 0x06, 
+	0xe7, 0xe5, 0x48, 0x92, 0x68, 0x00, 0x23, 0x01, 
+	0x42, 0xd8, 0xd1, 0x02, 0x20, 0xb2, 0xb0, 0x06, 
+	0xe7, 0xdd, 0x20, 0x01, 0x40, 0x88, 0x4b, 0x8d, 
+	0x68, 0x1b, 0x40, 0x18, 0xd0, 0x02, 0x20, 0xb1, 
+	0xb0, 0x06, 0xe7, 0xd4, 0x00, 0x88, 0x4b, 0x8a, 
+	0x50, 0x1a, 0x48, 0x8a, 0x54, 0x47, 0x01, 0x08, 
+	0x4b, 0x89, 0x18, 0xc5, 0x7f, 0x10, 0x06, 0x00, 
+	0x7f, 0x53, 0x04, 0x1b, 0x43, 0x18, 0x7f, 0x93, 
+	0x02, 0x1b, 0x43, 0x18, 0x7f, 0xd3, 0x43, 0x03, 
+	0xc5, 0x08, 0x1d, 0xd0, 0x30, 0x19, 0x78, 0x00, 
+	0x06, 0x00, 0x1d, 0xd3, 0x33, 0x19, 0x78, 0x5b, 
+	0x04, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 0x33, 0x19, 
+	0x78, 0x9b, 0x02, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 
+	0x33, 0x19, 0x78, 0xdb, 0x43, 0x03, 0xc5, 0x08, 
+	0x01, 0x08, 0x4b, 0x7a, 0x18, 0xc4, 0x7b, 0x10, 
+	0x06, 0x00, 0x7b, 0x53, 0x04, 0x1b, 0x43, 0x18, 
+	0x7b, 0x93, 0x02, 0x1b, 0x43, 0x18, 0x7b, 0xd3, 
+	0x43, 0x03, 0xc4, 0x08, 0x7c, 0x10, 0x06, 0x00, 
+	0x7c, 0x53, 0x04, 0x1b, 0x43, 0x18, 0x7c, 0x93, 
+	0x02, 0x1b, 0x43, 0x18, 0x7c, 0xd3, 0x43, 0x03, 
+	0xc4, 0x08, 0x98, 0x01, 0x07, 0xc0, 0x0f, 0xc0, 
+	0xd0, 0x20, 0x1d, 0xd0, 0x30, 0x19, 0x79, 0x00, 
+	0x06, 0x00, 0x1d, 0xd3, 0x33, 0x19, 0x79, 0x5b, 
+	0x04, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 0x33, 0x19, 
+	0x79, 0x9b, 0x02, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 
+	0x33, 0x19, 0x79, 0xdb, 0x43, 0x03, 0xc5, 0x08, 
+	0x7d, 0x10, 0x06, 0x00, 0x7d, 0x53, 0x04, 0x1b, 
+	0x43, 0x18, 0x7d, 0x93, 0x02, 0x1b, 0xe0, 0x00, 
+	0xe0, 0x42, 0x43, 0x18, 0x7d, 0xd3, 0x43, 0x03, 
+	0xc4, 0x08, 0xe0, 0x03, 0x23, 0x00, 0xc5, 0x08, 
+	0x23, 0x00, 0xc4, 0x08, 0x23, 0xff, 0xc5, 0x08, 
+	0x20, 0x19, 0x06, 0x80, 0x6b, 0x00, 0x23, 0x08, 
+	0x40, 0x18, 0xd0, 0x06, 0x88, 0x90, 0x04, 0x00, 
+	0x19, 0xc3, 0x93, 0x02, 0x9b, 0x02, 0xc4, 0x08, 
+	0xe0, 0x00, 0xc4, 0x80, 0x98, 0x01, 0x23, 0x08, 
+	0x40, 0x18, 0xd0, 0x17, 0x48, 0x50, 0x5d, 0xc0, 
+	0x30, 0x01, 0x4b, 0x4f, 0x55, 0xd8, 0x7a, 0x10, 
+	0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x04, 0x20, 0x01, 
+	0x40, 0x88, 0x23, 0x19, 0x06, 0x9b, 0x61, 0x18, 
+	0x7a, 0x10, 0x23, 0x02, 0x40, 0x18, 0xd0, 0x04, 
+	0x20, 0x01, 0x40, 0x88, 0x23, 0x19, 0x06, 0x9b, 
+	0x61, 0x58, 0xe0, 0x05, 0x4e, 0x45, 0x20, 0x01, 
+	0x40, 0x88, 0x68, 0x33, 0x43, 0x18, 0x60, 0x30, 
+	0x20, 0x01, 0x40, 0x88, 0x4b, 0x3b, 0x68, 0x1b, 
+	0x43, 0x18, 0x4b, 0x3a, 0x60, 0x18, 0xe0, 0x4f, 
+	0x98, 0x01, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x48, 
+	0x48, 0x3d, 0x88, 0x00, 0x4b, 0x3d, 0x42, 0x98, 
+	0xd1, 0x02, 0x20, 0xb2, 0xb0, 0x06, 0xe7, 0x26, 
+	0x00, 0x88, 0x4b, 0x3b, 0x58, 0x18, 0x28, 0x00, 
+	0xd0, 0x02, 0x20, 0xb1, 0xb0, 0x06, 0xe7, 0x1e, 
+	0x29, 0x10, 0xdb, 0x02, 0x20, 0xb1, 0xb0, 0x06, 
+	0xe7, 0x19, 0x20, 0x01, 0x40, 0x88, 0x4b, 0x32, 
+	0x88, 0x1b, 0x40, 0x18, 0xd0, 0x02, 0x20, 0xb1, 
+	0xb0, 0x06, 0xe7, 0x10, 0x98, 0x05, 0x78, 0x80, 
+	0x28, 0x02, 0xdb, 0x02, 0x20, 0xb1, 0xb0, 0x06, 
+	0xe7, 0x09, 0x00, 0x88, 0x4b, 0x2c, 0x50, 0x1a, 
+	0x48, 0x2c, 0x54, 0x47, 0x00, 0xf8, 0x1b, 0xc0, 
+	0x00, 0x80, 0x4b, 0x2b, 0x68, 0x1b, 0x18, 0xc0, 
+	0x90, 0x04, 0x98, 0x04, 0x7e, 0x00, 0x28, 0xff, 
+	0xd1, 0x02, 0x98, 0x04, 0x76, 0x01, 0xe0, 0x01, 
+	0x98, 0x04, 0x76, 0x41, 0x4e, 0x25, 0x96, 0x03, 
+	0x1d, 0xd3, 0x33, 0x05, 0x00, 0x88, 0x9e, 0x03, 
+	0x50, 0x33, 0x20, 0x01, 0x40, 0x88, 0x4b, 0x1c, 
+	0x88, 0x1b, 0x43, 0x18, 0x4b, 0x1a, 0x80, 0x18, 
+	0xe0, 0x02, 0x20, 0xb1, 0xb0, 0x06, 0xe6, 0xe2, 
+	0x78, 0x50, 0x23, 0x80, 0x43, 0xdb, 0x40, 0x18, 
+	0x70, 0x50, 0x98, 0x05, 0x78, 0x80, 0x28, 0x00, 
+	0xd1, 0x09, 0x98, 0x00, 0x68, 0x00, 0x23, 0x01, 
+	0x03, 0x5b, 0x43, 0x18, 0x9b, 0x00, 0x60, 0x18, 
+	0x20, 0x02, 0x9b, 0x05, 0x70, 0xd8, 0x98, 0x05, 
+	0x78, 0x80, 0x30, 0x01, 0x9b, 0x05, 0x70, 0x98, 
+	0x20, 0x00, 0xb0, 0x06, 0xe6, 0xc7, 0xb0, 0x06, 
+	0xe6, 0xc5, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x38, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9c, 0x48, 
+	0x2e, 0x08, 0x9c, 0x50, 0x2e, 0x08, 0x9d, 0x10, 
+	0x64, 0x00, 0x10, 0x00, 0x64, 0x00, 0x08, 0x00, 
+	0x2e, 0x08, 0xb9, 0x60, 0x64, 0x00, 0x00, 0x18, 
+	0x2e, 0x08, 0x9c, 0x4c, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x9c, 0xd0, 0x2e, 0x08, 0x9d, 0x30, 
+	0x2e, 0x08, 0x9b, 0x30, 0x9e, 0x00, 0x04, 0xb8, 
+	0xb5, 0xf3, 0x1c, 0x02, 0x99, 0x01, 0x06, 0x0f, 
+	0x0e, 0x3f, 0xb0, 0x86, 0x00, 0xb8, 0x4b, 0x65, 
+	0x68, 0x1b, 0x18, 0xc0, 0x90, 0x01, 0x2f, 0x20, 
+	0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0xb8, 
+	0x4b, 0x5f, 0x58, 0x18, 0x1c, 0x05, 0xd1, 0x02, 
+	0x20, 0xb0, 0xb0, 0x06, 0xe7, 0xf3, 0x78, 0x90, 
+	0x90, 0x03, 0x78, 0xd1, 0x00, 0x88, 0x4b, 0x5b, 
+	0x58, 0x18, 0x42, 0x90, 0xd0, 0x02, 0x20, 0xb1, 
+	0xb0, 0x06, 0xe7, 0xe8, 0x98, 0x03, 0x23, 0x80, 
+	0x40, 0x18, 0xd1, 0x49, 0x01, 0x08, 0x4b, 0x56, 
+	0x18, 0xc3, 0x93, 0x00, 0x20, 0x00, 0x9b, 0x00, 
+	0x60, 0x18, 0x23, 0x00, 0x00, 0x88, 0x4e, 0x51, 
+	0x50, 0x33, 0x23, 0xff, 0x48, 0x51, 0x54, 0x43, 
+	0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 0x4b, 0x50, 
+	0x68, 0x1b, 0x40, 0x18, 0x4b, 0x4e, 0x60, 0x18, 
+	0x98, 0x03, 0x23, 0x08, 0x40, 0x18, 0xd0, 0x27, 
+	0x20, 0x01, 0x40, 0x88, 0x90, 0x04, 0x7a, 0x10, 
+	0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x0b, 0x98, 0x04, 
+	0x23, 0x19, 0x06, 0x9b, 0x69, 0x1b, 0x40, 0x18, 
+	0xd0, 0x04, 0x98, 0x04, 0x23, 0x19, 0x06, 0x9b, 
+	0x61, 0x18, 0xe7, 0xf4, 0xe0, 0x0e, 0x7a, 0x10, 
+	0x23, 0x02, 0x40, 0x18, 0xd0, 0x0a, 0x98, 0x04, 
+	0x23, 0x19, 0x06, 0x9b, 0x69, 0x5b, 0x40, 0x18, 
+	0xd0, 0x04, 0x98, 0x04, 0x23, 0x19, 0x06, 0x9b, 
+	0x61, 0x58, 0xe7, 0xf4, 0x48, 0x3b, 0x5d, 0xc0, 
+	0x38, 0x01, 0x4b, 0x3a, 0x55, 0xd8, 0xe0, 0x06, 
+	0x4e, 0x39, 0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 
+	0x68, 0x33, 0x40, 0x18, 0x60, 0x30, 0xe0, 0x36, 
+	0x98, 0x03, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x2f, 
+	0x00, 0xf8, 0x1b, 0xc0, 0x00, 0x80, 0x4b, 0x33, 
+	0x68, 0x1b, 0x18, 0xc3, 0x93, 0x02, 0x9b, 0x02, 
+	0x7e, 0x18, 0x42, 0x88, 0xd1, 0x03, 0x20, 0xff, 
+	0x9b, 0x02, 0x76, 0x18, 0xe0, 0x0a, 0x9b, 0x02, 
+	0x7e, 0x58, 0x42, 0x88, 0xd1, 0x03, 0x20, 0xff, 
+	0x9b, 0x02, 0x76, 0x58, 0xe0, 0x02, 0x20, 0xb1, 
+	0xb0, 0x06, 0xe7, 0x7c, 0x23, 0x00, 0x00, 0x88, 
+	0x4e, 0x27, 0x50, 0x33, 0x20, 0xff, 0x4b, 0x27, 
+	0x54, 0x58, 0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 
+	0x4b, 0x25, 0x88, 0x1b, 0x40, 0x18, 0x4b, 0x24, 
+	0x80, 0x18, 0x4e, 0x24, 0x96, 0x05, 0x23, 0x00, 
+	0x00, 0x88, 0x9e, 0x05, 0x50, 0x33, 0xe0, 0x02, 
+	0x20, 0xb1, 0xb0, 0x06, 0xe7, 0x63, 0x78, 0xa8, 
+	0x38, 0x01, 0x70, 0xa8, 0x78, 0x50, 0x23, 0x80, 
+	0x43, 0x18, 0x70, 0x50, 0x78, 0xa8, 0x28, 0x00, 
+	0xd1, 0x07, 0x98, 0x01, 0x68, 0x00, 0x4b, 0x1a, 
+	0x40, 0x18, 0x9b, 0x01, 0x60, 0x18, 0x20, 0x01, 
+	0x70, 0xe8, 0x24, 0x1f, 0x2c, 0x00, 0xd1, 0x02, 
+	0xe0, 0x0a, 0x3c, 0x01, 0xe7, 0xfa, 0x48, 0x0d, 
+	0x5d, 0x00, 0x28, 0x00, 0xd1, 0x03, 0x20, 0x19, 
+	0x06, 0x80, 0x64, 0xc4, 0xe0, 0x00, 0xe7, 0xf4, 
+	0x20, 0x00, 0xb0, 0x06, 0xe7, 0x3f, 0xb0, 0x06, 
+	0xe7, 0x3d, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0x38, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9c, 0x50, 
+	0x64, 0x00, 0x08, 0x08, 0x2e, 0x08, 0x9d, 0x10, 
+	0x2e, 0x08, 0x9c, 0x48, 0x2e, 0x08, 0xb9, 0x60, 
+	0x64, 0x00, 0x00, 0x18, 0x2e, 0x08, 0x9b, 0x30, 
+	0x2e, 0x08, 0x9c, 0xd0, 0x2e, 0x08, 0x9d, 0x30, 
+	0x2e, 0x08, 0x9c, 0x4c, 0x9e, 0x00, 0x04, 0xb8, 
+	0xff, 0xff, 0xdf, 0xff, 0x1c, 0x03, 0x1c, 0x0a, 
+	0x78, 0x58, 0x70, 0x10, 0x20, 0x00, 0x47, 0x70, 
+	0xe7, 0xfd, 0xb5, 0xf7, 0x1c, 0x07, 0xb0, 0x81, 
+	0x9a, 0x03, 0x06, 0x10, 0x0e, 0x00, 0x90, 0x00, 
+	0xb0, 0x87, 0x78, 0x78, 0x23, 0x80, 0x40, 0x18, 
+	0xd0, 0x4c, 0x78, 0x78, 0x23, 0x80, 0x40, 0x18, 
+	0xd0, 0x48, 0x78, 0xb8, 0x90, 0x06, 0x99, 0x09, 
+	0x78, 0x88, 0x90, 0x05, 0x98, 0x06, 0x23, 0x20, 
+	0x40, 0x18, 0xd0, 0x3f, 0x98, 0x05, 0x23, 0x20, 
+	0x40, 0x18, 0xd0, 0x3b, 0x6b, 0x38, 0x90, 0x01, 
+	0x99, 0x09, 0x6b, 0x08, 0x90, 0x00, 0x98, 0x01, 
+	0x28, 0x00, 0xd1, 0x02, 0x98, 0x00, 0x28, 0x00, 
+	0xd0, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd1, 0x05, 0x20, 0xb6, 0xb0, 0x08, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x01, 0x68, 0x05, 0x98, 0x00, 0x68, 0x04, 
+	0x7a, 0x2e, 0x7a, 0x21, 0x91, 0x04, 0x7d, 0x6a, 
+	0x92, 0x03, 0x7d, 0x62, 0x92, 0x02, 0x98, 0x07, 
+	0x28, 0x00, 0xd0, 0x0a, 0x9a, 0x02, 0x99, 0x04, 
+	0x1c, 0x28, 0xf0, 0x00, 0xfc, 0xe5, 0x9a, 0x03, 
+	0x1c, 0x31, 0x1c, 0x20, 0xf0, 0x00, 0xfc, 0xe0, 
+	0xe0, 0x09, 0x99, 0x04, 0x1c, 0x28, 0x22, 0x00, 
+	0xf0, 0x00, 0xfc, 0xda, 0x1c, 0x31, 0x1c, 0x20, 
+	0x22, 0x00, 0xf0, 0x00, 0xfc, 0xd5, 0x20, 0x00, 
+	0xb0, 0x08, 0xe7, 0xd5, 0x20, 0xb1, 0xb0, 0x08, 
+	0xe7, 0xd2, 0xb0, 0x07, 0xb0, 0x01, 0xe7, 0xcf, 
+	0xb4, 0xf0, 0x1c, 0x02, 0x1c, 0x0b, 0x06, 0x1d, 
+	0x0e, 0x2d, 0xb0, 0x82, 0x2d, 0x00, 0xd1, 0x0a, 
+	0x48, 0x1a, 0x69, 0x00, 0x90, 0x01, 0x49, 0x1a, 
+	0x48, 0x18, 0x69, 0x40, 0x90, 0x00, 0x48, 0x17, 
+	0x6a, 0x00, 0x1e, 0x44, 0xe0, 0x10, 0x2d, 0x20, 
+	0xd1, 0x0a, 0x48, 0x14, 0x69, 0x80, 0x90, 0x01, 
+	0x49, 0x14, 0x48, 0x12, 0x69, 0xc0, 0x90, 0x00, 
+	0x48, 0x10, 0x6a, 0x40, 0x1e, 0x44, 0xe0, 0x03, 
+	0x20, 0xb3, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
+	0x20, 0x00, 0x70, 0x10, 0x78, 0x50, 0x00, 0x80, 
+	0x4e, 0x0d, 0x58, 0x37, 0x69, 0x38, 0x61, 0x78, 
+	0x98, 0x01, 0x9e, 0x00, 0x42, 0xb0, 0xd0, 0x07, 
+	0x98, 0x01, 0x30, 0x01, 0x90, 0x01, 0x98, 0x01, 
+	0x40, 0x20, 0x90, 0x01, 0x98, 0x01, 0x60, 0x08, 
+	0x20, 0x00, 0xb0, 0x02, 0xe7, 0xe6, 0xb0, 0x02, 
+	0xe7, 0xe4, 0x00, 0x00, 0x9e, 0x00, 0x04, 0x80, 
+	0x9e, 0x00, 0x04, 0x90, 0x9e, 0x00, 0x04, 0x98, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb5, 0xf3, 0x1c, 0x07, 
+	0xb0, 0x81, 0x99, 0x02, 0x06, 0x08, 0x0e, 0x00, 
+	0x90, 0x00, 0xb0, 0x88, 0x98, 0x08, 0x28, 0x00, 
+	0xd1, 0x0e, 0x49, 0x69, 0x91, 0x02, 0x48, 0x69, 
+	0x69, 0x00, 0x90, 0x07, 0x48, 0x68, 0x90, 0x06, 
+	0x48, 0x66, 0x69, 0x40, 0x90, 0x05, 0x48, 0x65, 
+	0x6a, 0x00, 0x1e, 0x41, 0x91, 0x04, 0xe0, 0x17, 
+	0x98, 0x08, 0x28, 0x20, 0xd1, 0x0e, 0x49, 0x63, 
+	0x91, 0x02, 0x48, 0x60, 0x69, 0x80, 0x90, 0x07, 
+	0x48, 0x61, 0x90, 0x06, 0x48, 0x5d, 0x69, 0xc0, 
+	0x90, 0x05, 0x48, 0x5c, 0x6a, 0x40, 0x1e, 0x41, 
+	0x91, 0x04, 0xe0, 0x05, 0x20, 0xb3, 0xb0, 0x09, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x25, 0x00, 0x98, 0x07, 0x99, 0x05, 0x42, 0x88, 
+	0xd0, 0x73, 0x2d, 0x00, 0xd1, 0x72, 0x98, 0x07, 
+	0x00, 0x80, 0x99, 0x02, 0x18, 0x40, 0x23, 0x01, 
+	0x02, 0x9b, 0x18, 0xc0, 0x68, 0x01, 0x91, 0x03, 
+	0x98, 0x07, 0x00, 0x80, 0x99, 0x02, 0x58, 0x08, 
+	0x90, 0x01, 0x99, 0x02, 0x98, 0x07, 0x18, 0x08, 
+	0x23, 0x01, 0x02, 0xdb, 0x18, 0xc0, 0x78, 0x00, 
+	0x90, 0x00, 0x20, 0x00, 0x99, 0x02, 0x9a, 0x07, 
+	0x18, 0x89, 0x23, 0x01, 0x02, 0xdb, 0x18, 0xc9, 
+	0x70, 0x08, 0x98, 0x07, 0x30, 0x01, 0x90, 0x07, 
+	0x98, 0x07, 0x99, 0x04, 0x40, 0x08, 0x90, 0x07, 
+	0x99, 0x03, 0x29, 0x00, 0xd0, 0x71, 0xb0, 0x83, 
+	0x20, 0x00, 0x90, 0x00, 0x99, 0x06, 0x91, 0x02, 
+	0x20, 0x01, 0x90, 0x01, 0x98, 0x03, 0x28, 0x80, 
+	0xd1, 0x1f, 0x24, 0x00, 0x2c, 0x10, 0xd3, 0x02, 
+	0xe0, 0x1a, 0x34, 0x01, 0xe7, 0xfa, 0x98, 0x01, 
+	0x99, 0x02, 0x40, 0x08, 0xd0, 0x10, 0x48, 0x39, 
+	0x5d, 0x00, 0x28, 0xff, 0xd0, 0x0c, 0x48, 0x37, 
+	0x5d, 0x00, 0x90, 0x00, 0x00, 0xa0, 0x49, 0x36, 
+	0x58, 0x09, 0x00, 0xa8, 0x19, 0xc0, 0x61, 0x01, 
+	0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 0xe0, 0x03, 
+	0x98, 0x01, 0x00, 0x40, 0x90, 0x01, 0xe7, 0xe4, 
+	0xe0, 0x1d, 0x24, 0x00, 0x2c, 0x20, 0xd3, 0x02, 
+	0xe0, 0x19, 0x34, 0x01, 0xe7, 0xfa, 0x98, 0x01, 
+	0x99, 0x02, 0x40, 0x08, 0xd0, 0x0f, 0x48, 0x2b, 
+	0x5d, 0x00, 0x28, 0xff, 0xd0, 0x0b, 0x48, 0x29, 
+	0x5d, 0x00, 0x90, 0x00, 0x00, 0xa0, 0x49, 0x28, 
+	0x58, 0x09, 0x00, 0xa8, 0x19, 0xc0, 0x61, 0x01, 
+	0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 0x98, 0x01, 
+	0x00, 0x40, 0x90, 0x01, 0xe7, 0xe5, 0x2d, 0x00, 
+	0xe0, 0x01, 0xe0, 0x27, 0xe0, 0x26, 0xd0, 0x23, 
+	0xb0, 0x81, 0x98, 0x01, 0x70, 0x78, 0x98, 0x05, 
+	0x60, 0x78, 0x98, 0x01, 0x00, 0x80, 0x49, 0x1d, 
+	0x58, 0x08, 0x90, 0x00, 0x98, 0x00, 0x69, 0x46, 
+	0x98, 0x05, 0x42, 0xb0, 0xd3, 0x04, 0x1d, 0xf0, 
+	0x30, 0xb9, 0x99, 0x05, 0x42, 0x88, 0xd2, 0x08, 
+	0x68, 0x30, 0x28, 0x00, 0xd0, 0x01, 0x68, 0x36, 
+	0xe0, 0x02, 0x20, 0xba, 0xb0, 0x0d, 0xe7, 0x63, 
+	0xe7, 0xee, 0x60, 0xbe, 0x98, 0x00, 0x61, 0x46, 
+	0x1c, 0x38, 0xf0, 0x00, 0xfb, 0x02, 0xb0, 0x01, 
+	0xb0, 0x03, 0xe7, 0x5e, 0x70, 0x3d, 0x98, 0x07, 
+	0x99, 0x06, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x09, 
+	0xe7, 0x52, 0xb0, 0x08, 0xb0, 0x01, 0xe7, 0x4f, 
+	0x2e, 0x08, 0x9d, 0xfc, 0x9e, 0x00, 0x04, 0x80, 
+	0x9e, 0x00, 0x04, 0x90, 0x2e, 0x08, 0xa6, 0xfc, 
+	0x9e, 0x00, 0x04, 0x98, 0x2e, 0x08, 0x9d, 0x30, 
+	0x2e, 0x08, 0x9c, 0xd0, 0x2e, 0x08, 0x9d, 0x10, 
+	0x2e, 0x08, 0x9c, 0x50, 0x2e, 0x08, 0x9b, 0xc8, 
+	0xb4, 0x90, 0x1c, 0x01, 0x78, 0x48, 0x00, 0x80, 
+	0x4c, 0x0d, 0x58, 0x23, 0x69, 0x1a, 0x68, 0x8f, 
+	0x42, 0xba, 0xd0, 0x12, 0x68, 0x10, 0x42, 0xb8, 
+	0xd0, 0x08, 0x68, 0x10, 0x28, 0x00, 0xd0, 0x01, 
+	0x68, 0x12, 0xe0, 0x02, 0x20, 0xba, 0xbc, 0x90, 
+	0x47, 0x70, 0xe7, 0xf3, 0x20, 0x00, 0x60, 0x10, 
+	0x69, 0x9c, 0x69, 0x18, 0x60, 0x20, 0x61, 0x1f, 
+	0x61, 0x9a, 0x20, 0x00, 0xe7, 0xf3, 0xe7, 0xf2, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb4, 0xb0, 0x1c, 0x02, 
+	0x1c, 0x0f, 0x78, 0x90, 0x23, 0x04, 0x40, 0x18, 
+	0xd0, 0x1c, 0x78, 0x90, 0x23, 0x20, 0x40, 0x18, 
+	0xd0, 0x18, 0x6b, 0x14, 0x68, 0x20, 0x28, 0x00, 
+	0xd0, 0x02, 0x1d, 0xe5, 0x35, 0x05, 0xe0, 0x01, 
+	0x1d, 0xe5, 0x35, 0x31, 0x21, 0x00, 0x29, 0x08, 
+	0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x48, 0x06, 0x01, 
+	0x0e, 0x09, 0xe7, 0xf8, 0x00, 0x88, 0x58, 0x2b, 
+	0x00, 0x88, 0x50, 0x3b, 0xe7, 0xf6, 0x20, 0x00, 
+	0xbc, 0xb0, 0x47, 0x70, 0x20, 0xb1, 0xe7, 0xfb, 
+	0xe7, 0xfa, 0xb5, 0xf3, 0x1c, 0x0a, 0xb0, 0x93, 
+	0x20, 0x00, 0x90, 0x06, 0x98, 0x13, 0x69, 0x00, 
+	0x90, 0x00, 0x98, 0x00, 0x6b, 0x00, 0x90, 0x12, 
+	0x98, 0x00, 0x78, 0x80, 0x90, 0x05, 0x98, 0x12, 
+	0x68, 0x00, 0x90, 0x01, 0x28, 0x00, 0xd0, 0x03, 
+	0x98, 0x12, 0x30, 0x0c, 0x90, 0x09, 0xe0, 0x0e, 
+	0x98, 0x12, 0x6a, 0xc0, 0x90, 0x01, 0x28, 0x00, 
+	0xd0, 0x03, 0x98, 0x12, 0x30, 0x38, 0x90, 0x09, 
+	0xe0, 0x05, 0x20, 0xb1, 0xb0, 0x13, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
+	0x90, 0x06, 0x98, 0x05, 0x23, 0x04, 0x40, 0x18, 
+	0xd0, 0x73, 0x21, 0x00, 0x29, 0x08, 0xdb, 0x04, 
+	0xe0, 0x0c, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
+	0xe7, 0xf8, 0x98, 0x13, 0x30, 0x80, 0x69, 0x00, 
+	0x00, 0x8b, 0x58, 0xc0, 0x00, 0x8e, 0xab, 0x0a, 
+	0x51, 0x98, 0xe7, 0xf2, 0x9d, 0x01, 0x21, 0x00, 
+	0x29, 0x08, 0xdb, 0x04, 0xe0, 0xa7, 0x1c, 0x48, 
+	0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x00, 0x88, 
+	0xab, 0x0a, 0x58, 0x18, 0x28, 0x00, 0xd0, 0x55, 
+	0x20, 0x00, 0x90, 0x08, 0x48, 0x73, 0x90, 0x07, 
+	0x20, 0x00, 0x90, 0x02, 0x98, 0x02, 0x28, 0x20, 
+	0xdb, 0x06, 0xe0, 0x8d, 0x98, 0x02, 0x30, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x90, 0x02, 0xe7, 0xf5, 
+	0x00, 0x8b, 0xa8, 0x0a, 0x58, 0xc0, 0x9b, 0x07, 
+	0x40, 0x18, 0x90, 0x08, 0x28, 0x00, 0xd0, 0x73, 
+	0x00, 0x88, 0x9b, 0x09, 0x58, 0x18, 0x9b, 0x08, 
+	0x40, 0x18, 0xd0, 0x6e, 0x1d, 0xec, 0x34, 0x01, 
+	0x27, 0x00, 0x79, 0xa0, 0x9b, 0x06, 0x42, 0x98, 
+	0xd0, 0x08, 0x68, 0x68, 0x1c, 0x05, 0xd1, 0x02, 
+	0x20, 0xba, 0xb0, 0x13, 0xe7, 0xab, 0x1d, 0xec, 
+	0x34, 0x01, 0xe7, 0xf2, 0x78, 0x60, 0x07, 0x00, 
+	0x0f, 0x00, 0x02, 0x00, 0x04, 0x07, 0x0c, 0x3f, 
+	0x78, 0xa0, 0x19, 0xc0, 0x30, 0x03, 0x04, 0x07, 
+	0x0c, 0x3f, 0x2a, 0x00, 0xd0, 0x42, 0x98, 0x13, 
+	0x88, 0x40, 0x42, 0xb8, 0xdb, 0x3a, 0x98, 0x13, 
+	0x88, 0x40, 0x1b, 0xc0, 0x9b, 0x13, 0x80, 0x58, 
+	0x20, 0xbc, 0x90, 0x04, 0x2f, 0x00, 0xdd, 0x30, 
+	0x2f, 0xbc, 0xdd, 0x1b, 0x20, 0x00, 0x90, 0x03, 
+	0x98, 0x03, 0x28, 0xbc, 0xdb, 0x09, 0xe0, 0x0d, 
+	0x98, 0x03, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
+	0xe0, 0x01, 0xe0, 0x4c, 0xe0, 0x41, 0x90, 0x03, 
+	0xe7, 0xf2, 0x78, 0x23, 0x34, 0x01, 0x70, 0x13, 
+	0x32, 0x01, 0xe7, 0xf1, 0x1f, 0xf8, 0x38, 0xb5, 
+	0x04, 0x07, 0x0c, 0x3f, 0x68, 0x2d, 0x1d, 0xec, 
+	0x34, 0x01, 0xe0, 0x11, 0x20, 0x00, 0x90, 0x03, 
+	0x98, 0x03, 0x42, 0xb8, 0xdb, 0x06, 0xe0, 0x0a, 
+	0x98, 0x03, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
+	0x90, 0x03, 0xe7, 0xf5, 0x78, 0x23, 0x34, 0x01, 
+	0x70, 0x13, 0x32, 0x01, 0xe7, 0xf4, 0x27, 0x00, 
+	0xe7, 0xcc, 0xe0, 0x02, 0x20, 0xb7, 0xb0, 0x13, 
+	0xe7, 0x59, 0xe0, 0x04, 0x98, 0x13, 0x88, 0x40, 
+	0x19, 0xc0, 0x9b, 0x13, 0x80, 0x58, 0x00, 0x88, 
+	0xab, 0x0a, 0x58, 0x18, 0x9b, 0x07, 0x43, 0x98, 
+	0x00, 0x8e, 0xab, 0x0a, 0x51, 0x98, 0xe0, 0x01, 
+	0xe0, 0x01, 0xe0, 0x00, 0x9d, 0x01, 0x98, 0x06, 
+	0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x06, 
+	0x98, 0x07, 0x08, 0x40, 0x90, 0x07, 0xe7, 0x71, 
+	0xe0, 0x04, 0x98, 0x06, 0x30, 0x20, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x06, 0xe7, 0x57, 0x20, 0x00, 
+	0xb0, 0x13, 0xe7, 0x34, 0xe0, 0x44, 0x98, 0x05, 
+	0x23, 0x02, 0x40, 0x18, 0xd0, 0x3b, 0x98, 0x01, 
+	0x1d, 0xc4, 0x34, 0x01, 0x78, 0x60, 0x07, 0x00, 
+	0x0f, 0x00, 0x02, 0x00, 0x04, 0x07, 0x0c, 0x3f, 
+	0x78, 0xa0, 0x19, 0xc0, 0x30, 0x03, 0x04, 0x07, 
+	0x0c, 0x3f, 0x2f, 0x00, 0xdd, 0x28, 0x2f, 0xbc, 
+	0xdd, 0x17, 0x21, 0x00, 0x29, 0xbc, 0xdb, 0x04, 
+	0xe0, 0x08, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
+	0xe7, 0xf8, 0x78, 0x23, 0x34, 0x01, 0x70, 0x13, 
+	0x32, 0x01, 0xe7, 0xf6, 0x1f, 0xf8, 0x38, 0xb5, 
+	0x04, 0x07, 0x0c, 0x3f, 0x98, 0x01, 0x68, 0x00, 
+	0x90, 0x01, 0x98, 0x01, 0x1d, 0xc4, 0x34, 0x01, 
+	0xe0, 0x0d, 0x21, 0x00, 0x42, 0xb9, 0xdb, 0x04, 
+	0xe0, 0x08, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
+	0xe7, 0xf8, 0x78, 0x23, 0x34, 0x01, 0x70, 0x13, 
+	0x32, 0x01, 0xe7, 0xf6, 0x27, 0x00, 0xe7, 0xd4, 
+	0x20, 0x00, 0xb0, 0x13, 0xe6, 0xf3, 0x20, 0xb1, 
+	0xb0, 0x13, 0xe6, 0xf0, 0xb0, 0x13, 0xe6, 0xee, 
+	0xe6, 0xed, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 
+	0xb5, 0xf3, 0xb0, 0x84, 0x98, 0x04, 0x78, 0x40, 
+	0x00, 0x80, 0x49, 0x4b, 0x58, 0x08, 0x90, 0x03, 
+	0x28, 0x00, 0xd1, 0x05, 0x20, 0xb0, 0xb0, 0x04, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x04, 0x68, 0x86, 0x98, 0x04, 0x88, 0x47, 
+	0x98, 0x04, 0x68, 0x44, 0x1d, 0xf0, 0x30, 0xb9, 
+	0x99, 0x04, 0x68, 0x49, 0x1a, 0x45, 0x42, 0xbd, 
+	0xdb, 0x0c, 0x2f, 0x00, 0xdb, 0x01, 0x2f, 0xbc, 
+	0xdd, 0x02, 0x20, 0xba, 0xb0, 0x04, 0xe7, 0xe7, 
+	0x1c, 0x3a, 0x99, 0x05, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf9, 0x29, 0xe0, 0x6b, 0x20, 0x00, 0x90, 0x00, 
+	0x98, 0x04, 0x78, 0x40, 0x00, 0xc3, 0x1a, 0x18, 
+	0x00, 0x80, 0x49, 0x36, 0x68, 0x09, 0x18, 0x40, 
+	0x90, 0x01, 0x98, 0x01, 0x78, 0x80, 0x90, 0x02, 
+	0x98, 0x02, 0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x02, 
+	0x98, 0x02, 0x28, 0x12, 0xd1, 0x03, 0x2d, 0x0e, 
+	0xda, 0x01, 0x20, 0x01, 0x90, 0x00, 0x2f, 0x00, 
+	0xdd, 0x50, 0xb0, 0x81, 0x42, 0xaf, 0xdd, 0x0d, 
+	0x2d, 0x00, 0xdb, 0x01, 0x2d, 0xbc, 0xdd, 0x02, 
+	0x20, 0xba, 0xb0, 0x05, 0xe7, 0xbc, 0x1c, 0x2a, 
+	0x99, 0x06, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0xfe, 
+	0x68, 0x36, 0xe0, 0x0b, 0x2f, 0x00, 0xdb, 0x01, 
+	0x2f, 0xbc, 0xdd, 0x02, 0x20, 0xba, 0xb0, 0x05, 
+	0xe7, 0xae, 0x1c, 0x3a, 0x99, 0x06, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf8, 0xf0, 0x99, 0x06, 0x19, 0x49, 
+	0x91, 0x06, 0x1b, 0x7f, 0x1d, 0x31, 0x91, 0x00, 
+	0x99, 0x00, 0x78, 0x88, 0x19, 0x84, 0x98, 0x01, 
+	0x28, 0x00, 0xd0, 0x20, 0x99, 0x00, 0x78, 0xc8, 
+	0x23, 0x80, 0x40, 0x18, 0xd1, 0x1b, 0x1d, 0xf0, 
+	0x30, 0xb9, 0x1b, 0x05, 0x42, 0xbd, 0xdb, 0x01, 
+	0x3c, 0x01, 0xe0, 0x14, 0x1c, 0x68, 0x42, 0xb8, 
+	0xd1, 0x11, 0x99, 0x00, 0x78, 0x88, 0x28, 0x09, 
+	0xdd, 0x08, 0x99, 0x00, 0x79, 0x08, 0x30, 0x09, 
+	0x99, 0x00, 0x78, 0x89, 0x42, 0x88, 0xd0, 0x00, 
+	0x3c, 0x01, 0xe0, 0x04, 0x99, 0x00, 0x78, 0x88, 
+	0x28, 0x09, 0xd1, 0x00, 0x3c, 0x01, 0x20, 0x00, 
+	0x90, 0x01, 0x1d, 0xf0, 0x30, 0xb9, 0x1b, 0x05, 
+	0xb0, 0x01, 0xe7, 0xac, 0x20, 0x00, 0xb0, 0x04, 
+	0xe7, 0x72, 0xb0, 0x04, 0xe7, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9b, 0x30, 
+	0xb5, 0xf1, 0x98, 0x00, 0x06, 0x04, 0x0e, 0x24, 
+	0xb0, 0x83, 0x00, 0xa0, 0x4b, 0x4c, 0x58, 0x1d, 
+	0x78, 0x28, 0x90, 0x02, 0x2c, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x03, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0xa0, 0x4b, 0x46, 
+	0x58, 0x18, 0x1c, 0x05, 0xd1, 0x02, 0x20, 0xb0, 
+	0xb0, 0x03, 0xe7, 0xf3, 0x00, 0xe0, 0x1b, 0x00, 
+	0x00, 0x80, 0x4b, 0x42, 0x68, 0x1b, 0x18, 0xc7, 
+	0x78, 0xa8, 0x28, 0x00, 0xd0, 0x63, 0x20, 0x00, 
+	0x42, 0x80, 0xd0, 0x20, 0x21, 0x00, 0x29, 0x20, 
+	0xdb, 0x04, 0xe0, 0x1b, 0x1c, 0x48, 0x06, 0x01, 
+	0x0e, 0x09, 0xe7, 0xf8, 0x00, 0x88, 0x4b, 0x3a, 
+	0x58, 0x18, 0x90, 0x01, 0x98, 0x01, 0x79, 0xc0, 
+	0x42, 0xa0, 0xd1, 0x0e, 0x20, 0x01, 0x40, 0x88, 
+	0x43, 0xc0, 0x4b, 0x36, 0x68, 0x1b, 0x40, 0x18, 
+	0x4b, 0x34, 0x60, 0x18, 0x23, 0x00, 0x00, 0x88, 
+	0x4e, 0x31, 0x50, 0x33, 0x23, 0xff, 0x48, 0x32, 
+	0x54, 0x43, 0xe7, 0xe3, 0xe0, 0x3f, 0x7e, 0x38, 
+	0x1c, 0x02, 0x28, 0xff, 0xd0, 0x10, 0x20, 0xff, 
+	0x4b, 0x2e, 0x54, 0x98, 0x23, 0x00, 0x00, 0x90, 
+	0x4e, 0x2d, 0x50, 0x33, 0x20, 0x01, 0x40, 0x90, 
+	0x43, 0xc0, 0x4b, 0x2c, 0x88, 0x1b, 0x40, 0x18, 
+	0x4b, 0x2a, 0x80, 0x18, 0x20, 0xff, 0x76, 0x38, 
+	0x7e, 0x78, 0x1c, 0x02, 0x28, 0xff, 0xd0, 0x11, 
+	0x20, 0xff, 0x4b, 0x24, 0x54, 0x98, 0x23, 0x00, 
+	0x00, 0x90, 0x4e, 0x23, 0x50, 0x33, 0x20, 0x01, 
+	0x40, 0x90, 0x43, 0xc0, 0x4b, 0x21, 0x88, 0x1b, 
+	0x40, 0x18, 0x4b, 0x20, 0x80, 0x18, 0x20, 0xff, 
+	0x76, 0x78, 0xe0, 0x02, 0x20, 0xb1, 0xb0, 0x03, 
+	0xe7, 0x98, 0x23, 0x00, 0x00, 0x90, 0x4e, 0x1a, 
+	0x50, 0x33, 0x20, 0x01, 0x40, 0x90, 0x43, 0xc0, 
+	0x4b, 0x18, 0x88, 0x1b, 0x40, 0x18, 0x4b, 0x17, 
+	0x80, 0x18, 0x4e, 0x17, 0x96, 0x00, 0x20, 0x00, 
+	0x00, 0x93, 0x9e, 0x00, 0x50, 0xf0, 0x98, 0x02, 
+	0x23, 0x20, 0x40, 0x18, 0xd0, 0xff, 0x21, 0x00, 
+	0x29, 0x0c, 0xdb, 0x04, 0xe0, 0x07, 0x1c, 0x48, 
+	0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x20, 0x00, 
+	0x18, 0x7b, 0x73, 0x18, 0xe7, 0xf7, 0x20, 0x00, 
+	0x83, 0x38, 0x20, 0x00, 0x70, 0xf8, 0x20, 0x00, 
+	0xb0, 0x03, 0xe7, 0x6f, 0xb0, 0x03, 0xe7, 0x6d, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9b, 0x30, 
+	0x2e, 0x08, 0x9c, 0x50, 0x2e, 0x08, 0x9c, 0x48, 
+	0x2e, 0x08, 0x9d, 0x10, 0x2e, 0x08, 0x9d, 0x30, 
+	0x2e, 0x08, 0x9c, 0xd0, 0x2e, 0x08, 0x9c, 0x4c, 
+	0x9e, 0x00, 0x04, 0xb8, 0xb5, 0xf0, 0x1c, 0x05, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x20, 0x1d, 0x02, 0x80, 
+	0x69, 0x86, 0x1c, 0x3a, 0x1c, 0x29, 0x1c, 0x20, 
+	0xf0, 0x08, 0xfb, 0x32, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0xb4, 0xf0, 0x1c, 0x01, 0xb0, 0x82, 
+	0x68, 0x48, 0x68, 0x8c, 0x1d, 0xe2, 0x32, 0xb7, 
+	0x42, 0x82, 0xd9, 0x09, 0x78, 0x42, 0x07, 0x12, 
+	0x0f, 0x12, 0x02, 0x12, 0x78, 0x83, 0x43, 0x1a, 
+	0x32, 0x03, 0x04, 0x17, 0x0c, 0x3f, 0xe0, 0x41, 
+	0xb0, 0x82, 0x68, 0x23, 0x93, 0x01, 0x9b, 0x01, 
+	0x33, 0x04, 0x93, 0x00, 0x9b, 0x00, 0x78, 0x9b, 
+	0x9e, 0x01, 0x19, 0x9a, 0x78, 0x4e, 0x00, 0xf3, 
+	0x1b, 0x9b, 0x00, 0x9b, 0x4e, 0x1b, 0x68, 0x36, 
+	0x19, 0x9b, 0x93, 0x02, 0x9b, 0x02, 0x78, 0x9d, 
+	0x06, 0xed, 0x0e, 0xed, 0x2d, 0x12, 0xd1, 0x0f, 
+	0x1d, 0xe3, 0x33, 0xb9, 0x68, 0x4e, 0x1b, 0x9b, 
+	0x06, 0x1b, 0x0e, 0x1b, 0x93, 0x03, 0x9b, 0x00, 
+	0x78, 0xde, 0x23, 0x80, 0x40, 0x33, 0xd1, 0x03, 
+	0x9b, 0x03, 0x2b, 0x0e, 0xda, 0x00, 0x3a, 0x01, 
+	0x1d, 0xe3, 0x33, 0xb8, 0x42, 0x83, 0xd9, 0x0b, 
+	0x78, 0x43, 0x07, 0x1b, 0x0f, 0x1b, 0x02, 0x1b, 
+	0x04, 0x1f, 0x0c, 0x3f, 0x78, 0x13, 0x18, 0xfb, 
+	0x33, 0x03, 0x04, 0x1f, 0x0c, 0x3f, 0xe0, 0x08, 
+	0x78, 0x13, 0x07, 0x1b, 0x0f, 0x1b, 0x02, 0x1b, 
+	0x78, 0x56, 0x43, 0x33, 0x33, 0x03, 0x04, 0x1f, 
+	0x0c, 0x3f, 0xb0, 0x02, 0x80, 0x4f, 0xb0, 0x02, 
+	0xbc, 0xf0, 0x47, 0x70, 0x2e, 0x08, 0x9b, 0x30, 
+	0xb5, 0xf3, 0xb0, 0x81, 0x99, 0x02, 0x06, 0x0b, 
+	0x0e, 0x1b, 0x93, 0x00, 0x9b, 0x00, 0x2b, 0x00, 
+	0xd1, 0x0a, 0x49, 0x24, 0x4b, 0x24, 0x69, 0x1b, 
+	0x1c, 0x18, 0x4b, 0x23, 0x69, 0x5b, 0x1c, 0x1c, 
+	0x4b, 0x21, 0x6a, 0x1b, 0x1e, 0x5a, 0xe0, 0x09, 
+	0x49, 0x20, 0x4b, 0x1f, 0x69, 0x9b, 0x1c, 0x18, 
+	0x4b, 0x1d, 0x69, 0xdb, 0x1c, 0x1c, 0x4b, 0x1c, 
+	0x6a, 0x5b, 0x1e, 0x5a, 0x9b, 0x01, 0x78, 0xdd, 
+	0x26, 0x01, 0x40, 0xae, 0x1c, 0x37, 0x42, 0xa0, 
+	0xd0, 0x26, 0x00, 0x83, 0x18, 0x5d, 0x23, 0x01, 
+	0x02, 0x9b, 0x18, 0xeb, 0x68, 0x1b, 0x40, 0x3b, 
+	0xd0, 0x1b, 0x00, 0x83, 0x18, 0x5d, 0x23, 0x01, 
+	0x02, 0x9b, 0x18, 0xeb, 0x68, 0x1b, 0x43, 0xbb, 
+	0x1c, 0x1d, 0x00, 0x83, 0x18, 0x5e, 0x23, 0x01, 
+	0x02, 0x9b, 0x18, 0xf3, 0x60, 0x1d, 0x00, 0x83, 
+	0x18, 0x5d, 0x23, 0x01, 0x02, 0x9b, 0x18, 0xeb, 
+	0x68, 0x1b, 0x2b, 0x00, 0xd1, 0x05, 0x25, 0x00, 
+	0x18, 0x0e, 0x23, 0x01, 0x02, 0xdb, 0x18, 0xf3, 
+	0x70, 0x1d, 0x30, 0x01, 0x40, 0x10, 0xe7, 0xd6, 
+	0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x9d, 0xfc, 
+	0x9e, 0x00, 0x04, 0x80, 0x2e, 0x08, 0xa6, 0xfc, 
+	0xb4, 0x90, 0x1c, 0x03, 0x1c, 0x0c, 0x1c, 0x17, 
+	0x06, 0x21, 0x0e, 0x09, 0x06, 0x38, 0x0e, 0x00, 
+	0x72, 0x19, 0x28, 0x00, 0xd0, 0x00, 0x75, 0x58, 
+	0x68, 0x5b, 0x2b, 0x00, 0xd1, 0xf8, 0xbc, 0x90, 
+	0x47, 0x70, 0x00, 0x00, 0xb5, 0x80, 0x1c, 0x07, 
+	0x68, 0xf8, 0x28, 0x1f, 0xd9, 0x03, 0x20, 0xe1, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x1e, 
+	0x6d, 0x00, 0x68, 0x00, 0x4b, 0x1d, 0x40, 0x18, 
+	0x49, 0x1b, 0x6d, 0x09, 0x60, 0x08, 0x05, 0x80, 
+	0x48, 0x19, 0x6d, 0x00, 0x68, 0x00, 0x49, 0x18, 
+	0x6e, 0xc9, 0x60, 0x08, 0x48, 0x16, 0x6d, 0x00, 
+	0x68, 0x00, 0x23, 0x01, 0x02, 0x5b, 0x43, 0x18, 
+	0x49, 0x13, 0x6d, 0x09, 0x60, 0x08, 0x05, 0x80, 
+	0x48, 0x11, 0x6d, 0x00, 0x68, 0x00, 0x49, 0x10, 
+	0x6e, 0xc9, 0x60, 0x08, 0x48, 0x0e, 0x6f, 0xc1, 
+	0xcf, 0x09, 0xc1, 0x09, 0xcf, 0x09, 0xc1, 0x09, 
+	0xcf, 0x08, 0xc1, 0x08, 0xf0, 0x00, 0xfc, 0x1e, 
+	0x20, 0x00, 0x49, 0x09, 0x60, 0x08, 0x20, 0x00, 
+	0x49, 0x07, 0x60, 0x48, 0x20, 0x00, 0x49, 0x06, 
+	0x60, 0x88, 0x49, 0x07, 0x20, 0x0b, 0xf0, 0x0d, 
+	0xfd, 0xef, 0x20, 0xff, 0x30, 0x01, 0x49, 0x02, 
+	0x61, 0xc8, 0x20, 0x00, 0xe7, 0xc0, 0xe7, 0xbf, 
+	0x2e, 0x08, 0x1f, 0x9c, 0xff, 0xff, 0xfd, 0xff, 
+	0x2e, 0x01, 0x5f, 0x15, 0x1c, 0x01, 0x48, 0x0e, 
+	0x6f, 0x00, 0x68, 0x00, 0x60, 0x08, 0x48, 0x0c, 
+	0x6e, 0x80, 0x68, 0x00, 0x60, 0x48, 0x48, 0x0a, 
+	0x6e, 0xc0, 0x68, 0x00, 0x60, 0x88, 0x48, 0x08, 
+	0x6f, 0x40, 0x68, 0x00, 0x60, 0xc8, 0x48, 0x06, 
+	0x68, 0x00, 0x61, 0x08, 0x48, 0x04, 0x68, 0x40, 
+	0x61, 0x48, 0x48, 0x03, 0x68, 0x80, 0x61, 0x88, 
+	0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x00, 0x00, 
+	0x2e, 0x08, 0x1f, 0x9c, 0x48, 0x03, 0x6e, 0x80, 
+	0x68, 0x00, 0x07, 0x40, 0x0f, 0xc0, 0x47, 0x70, 
+	0xe7, 0xfd, 0x00, 0x00, 0x2e, 0x08, 0x1f, 0x9c, 
+	0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x48, 0x37, 
+	0x69, 0xc0, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
+	0xd0, 0x02, 0x20, 0xe0, 0xbc, 0x80, 0x47, 0x70, 
+	0x48, 0x32, 0x62, 0x07, 0x20, 0x00, 0x49, 0x31, 
+	0x62, 0x48, 0x48, 0x31, 0x60, 0x02, 0x48, 0x30, 
+	0x68, 0x00, 0x78, 0x00, 0x49, 0x2d, 0x61, 0x88, 
+	0x48, 0x2d, 0x68, 0x00, 0x7a, 0x00, 0x49, 0x2b, 
+	0x61, 0x08, 0x48, 0x2b, 0x68, 0x00, 0x68, 0x40, 
+	0x49, 0x28, 0x60, 0xc8, 0x48, 0x27, 0x69, 0x80, 
+	0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x01, 0x48, 0x27, 
+	0xe0, 0x01, 0x20, 0x01, 0x02, 0x40, 0x49, 0x23, 
+	0x61, 0xc8, 0x48, 0x22, 0x68, 0x40, 0x30, 0x01, 
+	0x49, 0x20, 0x60, 0x48, 0x48, 0x1f, 0x6d, 0x40, 
+	0x68, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x49, 0x1d, 
+	0x69, 0x89, 0x08, 0x49, 0x06, 0x09, 0x0e, 0x09, 
+	0x43, 0x08, 0x49, 0x1a, 0x6d, 0x49, 0x60, 0x08, 
+	0x06, 0x00, 0x48, 0x18, 0x6d, 0x00, 0x68, 0x00, 
+	0x4b, 0x19, 0x40, 0x18, 0x49, 0x15, 0x69, 0x89, 
+	0x07, 0xc9, 0x0c, 0x49, 0x43, 0x08, 0x49, 0x13, 
+	0x6d, 0x09, 0x60, 0x08, 0x04, 0x40, 0x48, 0x11, 
+	0x6d, 0x00, 0x68, 0x00, 0x4b, 0x13, 0x40, 0x18, 
+	0x49, 0x0e, 0x6d, 0x09, 0x60, 0x08, 0x05, 0x40, 
+	0x48, 0x0c, 0x6d, 0x00, 0x68, 0x00, 0x23, 0x01, 
+	0x03, 0x1b, 0x43, 0x18, 0x49, 0x09, 0x6d, 0x09, 
+	0x60, 0x08, 0x04, 0xc0, 0x48, 0x07, 0x6d, 0x40, 
+	0x68, 0x00, 0x49, 0x06, 0x6f, 0x09, 0x60, 0x08, 
+	0x48, 0x04, 0x6d, 0x00, 0x68, 0x00, 0x49, 0x03, 
+	0x6e, 0xc9, 0x60, 0x08, 0x20, 0x00, 0xe7, 0x99, 
+	0xe7, 0x98, 0x00, 0x00, 0x2e, 0x08, 0x1f, 0x9c, 
+	0x2e, 0x08, 0x9d, 0xc0, 0x00, 0x00, 0x02, 0x01, 
+	0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xfb, 0xff, 
+	0xb5, 0x00, 0x48, 0xf6, 0x6e, 0x80, 0x68, 0x00, 
+	0x23, 0x08, 0x40, 0x18, 0xd0, 0x74, 0x48, 0xf3, 
+	0x6d, 0x00, 0x68, 0x00, 0x4b, 0xf2, 0x40, 0x18, 
+	0x49, 0xf0, 0x6d, 0x09, 0x60, 0x08, 0x04, 0x80, 
+	0x48, 0xee, 0x6e, 0x40, 0x68, 0x00, 0x0a, 0x00, 
+	0x02, 0x00, 0x49, 0xec, 0x6e, 0x49, 0x60, 0x08, 
+	0x06, 0x00, 0x48, 0xea, 0x6e, 0xc0, 0x68, 0x00, 
+	0x23, 0x01, 0x02, 0xdb, 0x40, 0x18, 0xd0, 0x3e, 
+	0x20, 0xff, 0x30, 0x01, 0x49, 0xe5, 0x61, 0xc8, 
+	0x48, 0xe4, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0xe5, 
+	0x40, 0x18, 0x49, 0xe2, 0x6d, 0x09, 0x60, 0x08, 
+	0x04, 0xc0, 0x48, 0xe0, 0x6f, 0xc0, 0x68, 0x80, 
+	0x68, 0x01, 0x02, 0x09, 0x0a, 0x09, 0x4a, 0xdd, 
+	0x6a, 0x52, 0x06, 0x12, 0x43, 0x11, 0x60, 0x01, 
+	0x48, 0xdd, 0x68, 0x00, 0x7a, 0x00, 0x49, 0xd9, 
+	0x69, 0x09, 0x1a, 0x41, 0x48, 0xd7, 0x6f, 0xc0, 
+	0x68, 0x80, 0x68, 0x02, 0x4b, 0xd9, 0x40, 0x1a, 
+	0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 0x43, 0x11, 
+	0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 0x48, 0xd1, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x23, 0x04, 
+	0x43, 0x19, 0x60, 0x01, 0x07, 0x48, 0x48, 0xcd, 
+	0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 0x40, 0x88, 
+	0xf0, 0x0d, 0xfc, 0xd0, 0x48, 0xc9, 0x68, 0x00, 
+	0x30, 0x01, 0x49, 0xc8, 0x60, 0x08, 0x48, 0xc7, 
+	0x69, 0xc0, 0x4b, 0xcb, 0x42, 0x98, 0xd0, 0x73, 
+	0xdc, 0x08, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
+	0xd0, 0x6f, 0x23, 0x01, 0x02, 0x5b, 0x42, 0x98, 
+	0xd0, 0x07, 0xe2, 0xba, 0x4b, 0xc5, 0x42, 0x98, 
+	0xd0, 0x68, 0x4b, 0xc5, 0x42, 0x98, 0xd0, 0x66, 
+	0xe2, 0xb3, 0x48, 0xbc, 0x6e, 0x80, 0x68, 0x00, 
+	0x23, 0x01, 0x02, 0x5b, 0x40, 0x18, 0xe0, 0x00, 
+	0xe2, 0xcd, 0xd0, 0x3f, 0x48, 0xb7, 0x68, 0x00, 
+	0x30, 0x01, 0x49, 0xb6, 0x60, 0x08, 0x48, 0xb5, 
+	0x6d, 0x00, 0x68, 0x00, 0x4b, 0xb5, 0x40, 0x18, 
+	0x49, 0xb2, 0x6d, 0x09, 0x60, 0x08, 0x04, 0xc0, 
+	0x20, 0xff, 0x30, 0x01, 0x49, 0xaf, 0x61, 0xc8, 
+	0x48, 0xae, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 
+	0x02, 0x09, 0x0a, 0x09, 0x4a, 0xab, 0x6a, 0x52, 
+	0x06, 0x12, 0x43, 0x11, 0x60, 0x01, 0x48, 0xac, 
+	0x68, 0x00, 0x7a, 0x00, 0x49, 0xa7, 0x69, 0x09, 
+	0x1a, 0x41, 0x48, 0xa6, 0x6f, 0xc0, 0x68, 0x80, 
+	0x68, 0x02, 0x4b, 0xa8, 0x40, 0x1a, 0x04, 0x09, 
+	0x0c, 0x09, 0x02, 0x09, 0x43, 0x11, 0x60, 0x01, 
+	0x02, 0x08, 0x0c, 0x00, 0x48, 0x9f, 0x6f, 0xc0, 
+	0x68, 0x80, 0x68, 0x01, 0x23, 0x02, 0x43, 0x19, 
+	0x60, 0x01, 0x07, 0x88, 0x48, 0x9b, 0x6f, 0xc0, 
+	0x68, 0xc1, 0x20, 0x01, 0x40, 0x88, 0xf0, 0x0d, 
+	0xfc, 0x6d, 0xe0, 0x5e, 0x48, 0x97, 0x69, 0x00, 
+	0x28, 0x00, 0xd0, 0x20, 0x48, 0x95, 0x69, 0x00, 
+	0x38, 0x01, 0x49, 0x94, 0x61, 0x08, 0x48, 0x93, 
+	0x68, 0xc0, 0x78, 0x00, 0x49, 0x91, 0x6c, 0x89, 
+	0x68, 0x09, 0x0a, 0x09, 0x02, 0x09, 0x43, 0x08, 
+	0x49, 0x8e, 0x6c, 0x89, 0x60, 0x08, 0x06, 0x00, 
+	0x0e, 0x00, 0x48, 0x8c, 0x68, 0xc0, 0xe0, 0x03, 
+	0xe1, 0x4b, 0xe2, 0x4d, 0xe0, 0x42, 0xe1, 0x93, 
+	0x30, 0x01, 0x49, 0x88, 0x60, 0xc8, 0x48, 0x8d, 
+	0x49, 0x86, 0x61, 0xc8, 0xe0, 0x39, 0x20, 0xff, 
+	0x30, 0x01, 0x49, 0x84, 0x61, 0xc8, 0x48, 0x83, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 
+	0x0a, 0x09, 0x4a, 0x80, 0x6a, 0x52, 0x06, 0x12, 
+	0x43, 0x11, 0x60, 0x01, 0x48, 0x80, 0x68, 0x00, 
+	0x7a, 0x00, 0x49, 0x7c, 0x69, 0x09, 0x1a, 0x41, 
+	0x48, 0x7a, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 
+	0x4b, 0x7c, 0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 
+	0x02, 0x09, 0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 
+	0x0c, 0x00, 0x48, 0x74, 0x6f, 0xc0, 0x68, 0x80, 
+	0x68, 0x01, 0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 
+	0x07, 0xc8, 0x48, 0x70, 0x6f, 0xc0, 0x68, 0xc1, 
+	0x20, 0x01, 0x40, 0x88, 0xf0, 0x0d, 0xfc, 0x16, 
+	0x48, 0x6c, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0x6d, 
+	0x40, 0x18, 0x49, 0x6a, 0x6d, 0x09, 0x60, 0x08, 
+	0x04, 0xc0, 0xe2, 0x08, 0x48, 0x67, 0x69, 0x00, 
+	0x28, 0x00, 0xd0, 0x5f, 0x48, 0x65, 0x6e, 0x80, 
+	0x68, 0x00, 0x23, 0xff, 0x33, 0x01, 0x40, 0x18, 
+	0xd0, 0x3f, 0x48, 0x62, 0x68, 0x00, 0x30, 0x01, 
+	0x49, 0x60, 0x60, 0x08, 0x48, 0x5f, 0x6d, 0x00, 
+	0x68, 0x00, 0x4b, 0x60, 0x40, 0x18, 0x49, 0x5d, 
+	0x6d, 0x09, 0x60, 0x08, 0x04, 0xc0, 0x20, 0xff, 
+	0x30, 0x01, 0x49, 0x5a, 0x61, 0xc8, 0x48, 0x59, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 
+	0x0a, 0x09, 0x4a, 0x56, 0x6a, 0x52, 0x06, 0x12, 
+	0x43, 0x11, 0x60, 0x01, 0x48, 0x56, 0x68, 0x00, 
+	0x7a, 0x00, 0x49, 0x52, 0x69, 0x09, 0x1a, 0x41, 
+	0x48, 0x50, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 
+	0x4b, 0x52, 0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 
+	0x02, 0x09, 0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 
+	0x0c, 0x00, 0x48, 0x4a, 0x6f, 0xc0, 0x68, 0x80, 
+	0x68, 0x01, 0x23, 0x02, 0x43, 0x19, 0x60, 0x01, 
+	0x07, 0x88, 0x48, 0x46, 0x6f, 0xc0, 0x68, 0xc1, 
+	0x20, 0x01, 0x40, 0x88, 0xf0, 0x0d, 0xfb, 0xc2, 
+	0xe0, 0x17, 0x48, 0x42, 0x68, 0xc0, 0x78, 0x00, 
+	0x49, 0x40, 0x6c, 0x89, 0x68, 0x09, 0x0a, 0x09, 
+	0x02, 0x09, 0x43, 0x08, 0x49, 0x3d, 0x6c, 0x89, 
+	0x60, 0x08, 0x06, 0x00, 0x0e, 0x00, 0x48, 0x3b, 
+	0x68, 0xc0, 0x30, 0x01, 0x49, 0x39, 0x60, 0xc8, 
+	0x48, 0x38, 0x69, 0x00, 0x38, 0x01, 0x49, 0x37, 
+	0x61, 0x08, 0xe0, 0xa1, 0x48, 0x35, 0x6a, 0x00, 
+	0x38, 0x01, 0x49, 0x34, 0x62, 0x08, 0x48, 0x33, 
+	0x6a, 0x00, 0x28, 0x00, 0xd0, 0x4b, 0x48, 0x31, 
+	0x6a, 0x40, 0x30, 0x01, 0x49, 0x2f, 0x62, 0x48, 
+	0x48, 0x31, 0x68, 0x00, 0x30, 0x0c, 0x49, 0x30, 
+	0x60, 0x08, 0x48, 0x2f, 0x68, 0x00, 0x78, 0x00, 
+	0x49, 0x2a, 0x61, 0x88, 0x48, 0x2c, 0x68, 0x00, 
+	0x7a, 0x00, 0x49, 0x28, 0x61, 0x08, 0x48, 0x2a, 
+	0x68, 0x00, 0x68, 0x40, 0x49, 0x25, 0x60, 0xc8, 
+	0x48, 0x24, 0x69, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 
+	0xd0, 0x01, 0x48, 0x27, 0xe0, 0x01, 0x20, 0x01, 
+	0x02, 0x40, 0x49, 0x20, 0x61, 0xc8, 0x48, 0x1f, 
+	0x6d, 0x00, 0x68, 0x00, 0x23, 0x01, 0x03, 0x5b, 
+	0x43, 0x18, 0x49, 0x1c, 0x6d, 0x09, 0x60, 0x08, 
+	0x04, 0x80, 0x48, 0x1a, 0x6d, 0x40, 0x68, 0x00, 
+	0x0a, 0x00, 0x02, 0x00, 0x49, 0x17, 0x69, 0x89, 
+	0x08, 0x49, 0x06, 0x09, 0x0e, 0x09, 0x43, 0x08, 
+	0x49, 0x14, 0x6d, 0x49, 0x60, 0x08, 0x06, 0x00, 
+	0x48, 0x12, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0x19, 
+	0x40, 0x18, 0x49, 0x10, 0x69, 0x89, 0x07, 0xc9, 
+	0x0c, 0x49, 0x43, 0x08, 0x49, 0x0d, 0x6d, 0x09, 
+	0x60, 0x08, 0x04, 0x40, 0xe0, 0x4c, 0x20, 0xff, 
+	0x30, 0x01, 0x49, 0x0a, 0x61, 0xc8, 0x48, 0x09, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 
+	0x0a, 0x09, 0x4a, 0x06, 0x6a, 0x52, 0x06, 0x12, 
+	0x43, 0x11, 0x60, 0x01, 0x48, 0x06, 0x68, 0x00, 
+	0x7a, 0x00, 0x49, 0x02, 0x69, 0x09, 0x1a, 0x41, 
+	0x48, 0x00, 0xe0, 0x11, 0x2e, 0x08, 0x1f, 0x9c, 
+	0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xef, 0xff, 
+	0x2e, 0x08, 0x9d, 0xc0, 0xff, 0x00, 0x00, 0xff, 
+	0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x02, 
+	0x00, 0x00, 0x02, 0x03, 0xff, 0xff, 0xbf, 0xff, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 0x4b, 0xa5, 
+	0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 
+	0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 
+	0x48, 0xa1, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 
+	0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0x07, 0xc8, 
+	0x48, 0x9d, 0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 
+	0x40, 0x88, 0xf0, 0x0d, 0xfb, 0x0f, 0x48, 0x9a, 
+	0x6d, 0x00, 0x68, 0x00, 0x4b, 0x99, 0x40, 0x18, 
+	0x49, 0x97, 0x6d, 0x09, 0x60, 0x08, 0x04, 0xc0, 
+	0xe1, 0x01, 0x48, 0x95, 0x6e, 0x80, 0x68, 0x00, 
+	0x23, 0x01, 0x02, 0x5b, 0x40, 0x18, 0xd0, 0x3f, 
+	0x48, 0x91, 0x68, 0x00, 0x30, 0x01, 0x49, 0x90, 
+	0x60, 0x08, 0x48, 0x8f, 0x6d, 0x00, 0x68, 0x00, 
+	0x4b, 0x8e, 0x40, 0x18, 0x49, 0x8c, 0x6d, 0x09, 
+	0x60, 0x08, 0x04, 0xc0, 0x20, 0xff, 0x30, 0x01, 
+	0x49, 0x89, 0x61, 0xc8, 0x48, 0x88, 0x6f, 0xc0, 
+	0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 0x0a, 0x09, 
+	0x4a, 0x85, 0x6a, 0x52, 0x06, 0x12, 0x43, 0x11, 
+	0x60, 0x01, 0x48, 0x85, 0x68, 0x00, 0x7a, 0x00, 
+	0x49, 0x81, 0x69, 0x09, 0x1a, 0x41, 0x48, 0x80, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 0x4b, 0x7d, 
+	0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 
+	0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 
+	0x48, 0x79, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 
+	0x23, 0x02, 0x43, 0x19, 0x60, 0x01, 0x07, 0x88, 
+	0x48, 0x75, 0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 
+	0x40, 0x88, 0xf0, 0x0d, 0xfa, 0xbf, 0xe0, 0x02, 
+	0x48, 0x74, 0x49, 0x71, 0x61, 0xc8, 0xe0, 0xb6, 
+	0x48, 0x6f, 0x69, 0x00, 0x28, 0x00, 0xd0, 0x62, 
+	0x48, 0x6d, 0x6e, 0x00, 0x68, 0x00, 0x49, 0x6c, 
+	0x68, 0xc9, 0x70, 0x08, 0x48, 0x6a, 0x68, 0xc0, 
+	0x30, 0x01, 0x49, 0x69, 0x60, 0xc8, 0x48, 0x68, 
+	0x69, 0x00, 0x38, 0x01, 0x49, 0x66, 0x61, 0x08, 
+	0x48, 0x65, 0x69, 0x00, 0x28, 0x00, 0xd1, 0x4d, 
+	0x48, 0x63, 0x6a, 0x00, 0x28, 0x01, 0xd1, 0x49, 
+	0x48, 0x63, 0x68, 0x00, 0x7a, 0x40, 0x49, 0x60, 
+	0x6d, 0x09, 0x68, 0x09, 0x4b, 0x62, 0x40, 0x19, 
+	0x07, 0xc0, 0x0d, 0x40, 0x43, 0x08, 0x49, 0x5c, 
+	0x6d, 0x09, 0x60, 0x08, 0x05, 0x40, 0x0f, 0xc0, 
+	0x20, 0xff, 0x30, 0x01, 0x49, 0x58, 0x61, 0xc8, 
+	0x48, 0x57, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0x57, 
+	0x40, 0x18, 0x49, 0x55, 0x6d, 0x09, 0x60, 0x08, 
+	0x04, 0xc0, 0x48, 0x53, 0x6f, 0xc0, 0x68, 0x80, 
+	0x68, 0x01, 0x02, 0x09, 0x0a, 0x09, 0x4a, 0x50, 
+	0x6a, 0x52, 0x06, 0x12, 0x43, 0x11, 0x60, 0x01, 
+	0x48, 0x4f, 0x68, 0x00, 0x7a, 0x00, 0x49, 0x4c, 
+	0x69, 0x09, 0x1a, 0x41, 0x48, 0x4a, 0x6f, 0xc0, 
+	0x68, 0x80, 0x68, 0x02, 0x4b, 0x47, 0x40, 0x1a, 
+	0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 0x43, 0x11, 
+	0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 0x48, 0x44, 
+	0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x23, 0x01, 
+	0x43, 0x19, 0x60, 0x01, 0x07, 0xc8, 0x48, 0x40, 
+	0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 0x40, 0x88, 
+	0xf0, 0x0d, 0xfa, 0x54, 0xe0, 0x4f, 0x48, 0x3c, 
+	0x6a, 0x00, 0x38, 0x01, 0x49, 0x3a, 0x62, 0x08, 
+	0x48, 0x39, 0x6a, 0x40, 0x30, 0x01, 0x49, 0x38, 
+	0x62, 0x48, 0x48, 0x39, 0x68, 0x00, 0x30, 0x0c, 
+	0x49, 0x37, 0x60, 0x08, 0x48, 0x36, 0x68, 0x00, 
+	0x78, 0x00, 0x49, 0x33, 0x61, 0x88, 0x48, 0x34, 
+	0x68, 0x00, 0x7a, 0x00, 0x49, 0x30, 0x61, 0x08, 
+	0x48, 0x31, 0x68, 0x00, 0x68, 0x40, 0x49, 0x2e, 
+	0x60, 0xc8, 0x48, 0x2d, 0x69, 0x80, 0x07, 0xc0, 
+	0x0f, 0xc0, 0xd0, 0x01, 0x48, 0x2f, 0xe0, 0x01, 
+	0x20, 0x01, 0x02, 0x40, 0x49, 0x28, 0x61, 0xc8, 
+	0x48, 0x27, 0x6d, 0x00, 0x68, 0x00, 0x23, 0x01, 
+	0x03, 0x5b, 0x43, 0x18, 0x49, 0x24, 0x6d, 0x09, 
+	0x60, 0x08, 0x04, 0x80, 0x48, 0x22, 0x6d, 0x40, 
+	0x68, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x49, 0x20, 
+	0x69, 0x89, 0x08, 0x49, 0x06, 0x09, 0x0e, 0x09, 
+	0x43, 0x08, 0x49, 0x1d, 0x6d, 0x49, 0x60, 0x08, 
+	0x06, 0x00, 0x48, 0x1b, 0x6d, 0x00, 0x68, 0x00, 
+	0x4b, 0x1f, 0x40, 0x18, 0x49, 0x18, 0x69, 0x89, 
+	0x07, 0xc9, 0x0c, 0x49, 0x43, 0x08, 0x49, 0x16, 
+	0x6d, 0x09, 0x60, 0x08, 0x04, 0x40, 0xe0, 0x01, 
+	0xe0, 0x00, 0xe7, 0xff, 0x48, 0x12, 0x6c, 0x80, 
+	0x68, 0x00, 0x49, 0x11, 0x6e, 0x49, 0x60, 0x08, 
+	0x48, 0x0f, 0x6d, 0x40, 0x68, 0x00, 0x49, 0x0e, 
+	0x6f, 0x09, 0x60, 0x08, 0x48, 0x0c, 0x6d, 0x00, 
+	0x68, 0x00, 0x49, 0x0b, 0x6e, 0xc9, 0x60, 0x08, 
+	0x48, 0x09, 0x6c, 0xc0, 0x68, 0x00, 0x23, 0x08, 
+	0x43, 0x18, 0x49, 0x07, 0x6c, 0xc9, 0x60, 0x08, 
+	0x07, 0x00, 0x48, 0x05, 0x6c, 0xc0, 0x68, 0x00, 
+	0x49, 0x03, 0x6e, 0x89, 0x60, 0x08, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 
+	0x2e, 0x08, 0x1f, 0x9c, 0xff, 0xff, 0xef, 0xff, 
+	0x2e, 0x08, 0x9d, 0xc0, 0x00, 0x00, 0x02, 0x03, 
+	0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x02, 0x01, 
+	0xff, 0xff, 0xbf, 0xff, 0xb4, 0x80, 0x49, 0x2e, 
+	0x20, 0x00, 0x28, 0x08, 0xd3, 0x04, 0xe0, 0x06, 
+	0x1c, 0x42, 0x06, 0x10, 0x0e, 0x00, 0xe7, 0xf8, 
+	0x23, 0x00, 0xc1, 0x08, 0xe7, 0xf8, 0x4a, 0x29, 
+	0x6f, 0xd2, 0x68, 0x12, 0x4b, 0x27, 0x6d, 0x9b, 
+	0x68, 0x1b, 0x0a, 0x1b, 0x02, 0x1b, 0x06, 0x12, 
+	0x0e, 0x12, 0x43, 0x1a, 0x4b, 0x23, 0x6d, 0x9b, 
+	0x60, 0x1a, 0x06, 0x12, 0x0e, 0x12, 0x4a, 0x21, 
+	0x6f, 0xd2, 0x68, 0x52, 0x4b, 0x1f, 0x6d, 0x1b, 
+	0x68, 0x1f, 0x23, 0x01, 0x03, 0xdb, 0x43, 0x9f, 
+	0x1c, 0x3b, 0x07, 0xd2, 0x0c, 0x12, 0x43, 0x1a, 
+	0x4b, 0x1a, 0x6d, 0x1b, 0x60, 0x1a, 0x04, 0x12, 
+	0x0f, 0xd2, 0x4a, 0x18, 0x6f, 0xd2, 0x69, 0x12, 
+	0x4b, 0x16, 0x6d, 0xdb, 0x68, 0x1b, 0x0c, 0x1b, 
+	0x04, 0x1b, 0x04, 0x12, 0x0c, 0x12, 0x43, 0x1a, 
+	0x4b, 0x12, 0x6d, 0xdb, 0x60, 0x1a, 0x04, 0x12, 
+	0x0c, 0x12, 0x4a, 0x10, 0x6d, 0x12, 0x68, 0x12, 
+	0x23, 0x01, 0x02, 0x5b, 0x43, 0x1a, 0x4b, 0x0d, 
+	0x6d, 0x1b, 0x60, 0x1a, 0x05, 0x92, 0x4a, 0x0b, 
+	0x6d, 0x12, 0x68, 0x12, 0x4b, 0x09, 0x6e, 0xdb, 
+	0x60, 0x1a, 0x4a, 0x08, 0x6d, 0x92, 0x68, 0x12, 
+	0x4b, 0x06, 0x6f, 0x5b, 0x60, 0x1a, 0x4a, 0x05, 
+	0x6d, 0xd2, 0x68, 0x12, 0x4b, 0x03, 0x6f, 0x9b, 
+	0x60, 0x1a, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x1f, 0xc4, 0x2e, 0x08, 0x1f, 0x9c, 
+	0xb5, 0x90, 0x1c, 0x07, 0x1c, 0x0c, 0x2f, 0x22, 
+	0xd1, 0x07, 0x2c, 0x3f, 0xd8, 0x01, 0x2c, 0x01, 
+	0xd2, 0x03, 0x20, 0x38, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x01, 0x49, 0x13, 0x70, 0x08, 
+	0x23, 0x01, 0x03, 0xdb, 0x42, 0x9f, 0xd0, 0x02, 
+	0x4b, 0x11, 0x42, 0x9f, 0xd1, 0x04, 0x48, 0x11, 
+	0x60, 0x07, 0x20, 0x00, 0xe7, 0xee, 0xe0, 0x18, 
+	0x2f, 0xff, 0xd1, 0x0b, 0x21, 0x00, 0x43, 0xc9, 
+	0x20, 0x0d, 0xf0, 0x00, 0xf8, 0x1d, 0x48, 0x0c, 
+	0x68, 0x01, 0x48, 0x0c, 0x68, 0x00, 0xf0, 0x00, 
+	0xf8, 0x43, 0xe0, 0x07, 0x1c, 0x21, 0x1c, 0x38, 
+	0xf0, 0x00, 0xf8, 0x3e, 0x48, 0x07, 0x60, 0x07, 
+	0x48, 0x05, 0x60, 0x04, 0x20, 0x00, 0xe7, 0xd5, 
+	0xe7, 0xd4, 0xe7, 0xd3, 0x2e, 0x08, 0x9d, 0xe8, 
+	0x00, 0x00, 0x80, 0x0f, 0xcc, 0x00, 0x05, 0x00, 
+	0x2e, 0x08, 0x9d, 0xe4, 0x2e, 0x08, 0x20, 0x1c, 
+	0xb4, 0xb0, 0x1c, 0x07, 0x1c, 0x0a, 0x4b, 0x13, 
+	0x68, 0x5b, 0x1c, 0x18, 0x21, 0x00, 0x29, 0x02, 
+	0xdb, 0x04, 0xe0, 0x1a, 0x1c, 0x4b, 0x06, 0x19, 
+	0x0e, 0x09, 0xe7, 0xf8, 0x23, 0x0d, 0x06, 0x9b, 
+	0x1a, 0xc4, 0x29, 0x00, 0xd1, 0x01, 0x60, 0x27, 
+	0xe0, 0x05, 0x23, 0x01, 0x42, 0xda, 0xd0, 0x01, 
+	0x60, 0x22, 0xe0, 0x00, 0xe0, 0x09, 0x1d, 0x05, 
+	0x23, 0x05, 0x02, 0x1b, 0x42, 0x9d, 0xdb, 0x02, 
+	0x20, 0x01, 0x02, 0x80, 0xe0, 0x00, 0x30, 0x04, 
+	0xe7, 0xe4, 0x4b, 0x02, 0x60, 0x58, 0xbc, 0xb0, 
+	0x47, 0x70, 0x00, 0x00, 0xcc, 0x00, 0x0f, 0x00, 
+	0xb5, 0x90, 0x1c, 0x04, 0x1c, 0x0f, 0x05, 0x20, 
+	0x0d, 0x00, 0x23, 0xff, 0x33, 0x04, 0x42, 0x98, 
+	0xd0, 0x50, 0xdc, 0x18, 0x28, 0x10, 0xd0, 0x2d, 
+	0xdc, 0x08, 0x28, 0x01, 0xd0, 0x23, 0x28, 0x02, 
+	0xd0, 0x1e, 0x28, 0x04, 0xd0, 0x1f, 0x28, 0x08, 
+	0xd0, 0x1d, 0xe0, 0x76, 0x28, 0x12, 0xd0, 0x1d, 
+	0x28, 0x22, 0xd0, 0x3a, 0x23, 0xff, 0x33, 0x02, 
+	0x42, 0x98, 0xd0, 0x24, 0x23, 0xff, 0x33, 0x03, 
+	0x42, 0x98, 0xd0, 0x29, 0xe0, 0x69, 0x38, 0xff, 
+	0x38, 0x05, 0x28, 0x08, 0xd2, 0x65, 0xa3, 0x02, 
+	0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x35, 0x3c, 0x41, 0x4f, 0x56, 0x4b, 0x5d, 0x46, 
+	0x20, 0x00, 0x49, 0x32, 0x63, 0x48, 0x48, 0x31, 
+	0x62, 0x04, 0xe0, 0x5c, 0x20, 0x01, 0x49, 0x2f, 
+	0x63, 0x48, 0xe0, 0x58, 0x20, 0x00, 0x49, 0x2e, 
+	0x67, 0x08, 0x21, 0x00, 0x43, 0xc9, 0x20, 0x10, 
+	0xf7, 0xff, 0xff, 0x92, 0xe0, 0x4f, 0x20, 0x01, 
+	0x49, 0x29, 0x67, 0x08, 0x21, 0x00, 0x43, 0xc9, 
+	0x20, 0x10, 0xf7, 0xff, 0xff, 0x89, 0xe0, 0x46, 
+	0x20, 0x02, 0x49, 0x25, 0x67, 0x08, 0x21, 0x00, 
+	0x43, 0xc9, 0x20, 0x10, 0xf7, 0xff, 0xff, 0x80, 
+	0xe0, 0x3d, 0x1c, 0x39, 0x20, 0x22, 0xf7, 0xff, 
+	0xff, 0x7b, 0xe0, 0x38, 0x48, 0x1e, 0x65, 0xc7, 
+	0x21, 0x01, 0x20, 0x35, 0xf7, 0xff, 0xff, 0x74, 
+	0xe0, 0x31, 0x48, 0x1b, 0x65, 0xc7, 0x21, 0x02, 
+	0x20, 0x35, 0xf7, 0xff, 0xff, 0x6d, 0xe0, 0x2a, 
+	0x21, 0x00, 0x20, 0x35, 0xf7, 0xff, 0xff, 0x68, 
+	0xe0, 0x25, 0x21, 0x03, 0x20, 0x35, 0xf7, 0xff, 
+	0xff, 0x63, 0xe0, 0x20, 0x21, 0x04, 0x20, 0x35, 
+	0xf7, 0xff, 0xff, 0x5e, 0xe0, 0x1b, 0x20, 0x00, 
+	0x49, 0x0f, 0x65, 0xc8, 0xe0, 0x17, 0x48, 0x0e, 
+	0x66, 0x07, 0x21, 0x01, 0x20, 0x36, 0xf7, 0xff, 
+	0xff, 0x53, 0xe0, 0x10, 0x48, 0x0a, 0x66, 0x07, 
+	0x21, 0x02, 0x20, 0x36, 0xf7, 0xff, 0xff, 0x4c, 
+	0xe0, 0x09, 0x20, 0x00, 0x49, 0x06, 0x66, 0x08, 
+	0xe0, 0x05, 0x1c, 0x20, 0x21, 0x00, 0x43, 0xc9, 
+	0xf7, 0xff, 0xff, 0x42, 0xe7, 0xff, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xcc, 0x00, 0x0f, 0x80, 
+	0xcc, 0x00, 0x05, 0x00, 0xb4, 0xb0, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x1c, 0x13, 0x06, 0x38, 0x0e, 0x00, 
+	0x06, 0x19, 0x0e, 0x09, 0x29, 0x01, 0xd0, 0x08, 
+	0x22, 0x00, 0x4d, 0x09, 0x60, 0x2a, 0x22, 0x00, 
+	0x43, 0xd2, 0x4d, 0x08, 0x68, 0x2d, 0x60, 0x2a, 
+	0xe0, 0x08, 0x4a, 0x07, 0x68, 0x12, 0x60, 0x14, 
+	0x4a, 0x04, 0x68, 0x12, 0x60, 0x10, 0x22, 0x01, 
+	0x4d, 0x01, 0x60, 0x2a, 0xbc, 0xb0, 0x47, 0x70, 
+	0xcc, 0x00, 0x0d, 0x00, 0x2e, 0x08, 0x9d, 0xdc, 
+	0x2e, 0x08, 0x9d, 0xd8, 0xb5, 0xf3, 0xb0, 0x81, 
+	0x99, 0x02, 0x06, 0x08, 0x16, 0x00, 0x90, 0x00, 
+	0xb0, 0x85, 0x20, 0x00, 0x90, 0x01, 0x9c, 0x06, 
+	0x1d, 0xe6, 0x36, 0x05, 0xcc, 0x20, 0x07, 0xa8, 
+	0x0f, 0x80, 0x06, 0x00, 0x16, 0x00, 0x90, 0x00, 
+	0x08, 0xad, 0x3d, 0x03, 0xcc, 0x80, 0x08, 0xb8, 
+	0x00, 0x80, 0x19, 0x86, 0xcc, 0x02, 0x91, 0x04, 
+	0x99, 0x04, 0x08, 0x89, 0x91, 0x04, 0x20, 0x03, 
+	0x05, 0x80, 0x21, 0x35, 0x06, 0x49, 0x60, 0x08, 
+	0x48, 0x46, 0x68, 0x01, 0x08, 0x89, 0x00, 0x89, 
+	0x60, 0x01, 0x48, 0x45, 0x90, 0x03, 0x20, 0x00, 
+	0x90, 0x02, 0x98, 0x02, 0x42, 0xa8, 0xd3, 0x04, 
+	0xe0, 0x08, 0x98, 0x02, 0x30, 0x01, 0x90, 0x02, 
+	0xe7, 0xf7, 0xcc, 0x02, 0x98, 0x03, 0xc0, 0x02, 
+	0x90, 0x03, 0xe7, 0xf6, 0x98, 0x00, 0x28, 0x00, 
+	0xd0, 0x03, 0xcc, 0x02, 0x98, 0x03, 0xc0, 0x02, 
+	0x90, 0x03, 0x20, 0x00, 0x49, 0x39, 0x65, 0x88, 
+	0x9f, 0x04, 0x2f, 0x00, 0xd8, 0x02, 0xe0, 0x05, 
+	0x3f, 0x01, 0xe7, 0xfa, 0xce, 0x02, 0x48, 0x35, 
+	0x64, 0x81, 0xe7, 0xf9, 0x20, 0x00, 0x49, 0x34, 
+	0x60, 0x48, 0x20, 0x00, 0x21, 0x35, 0x06, 0x49, 
+	0x60, 0x08, 0x20, 0x00, 0x49, 0x2f, 0x66, 0x88, 
+	0x20, 0x00, 0x21, 0x35, 0x06, 0x49, 0x61, 0x88, 
+	0x20, 0x01, 0x49, 0x2c, 0x64, 0xc8, 0x48, 0x2c, 
+	0x68, 0x40, 0x28, 0x00, 0xd1, 0x0e, 0x27, 0x00, 
+	0x2f, 0x64, 0xd3, 0x02, 0xe0, 0x02, 0x37, 0x01, 
+	0xe7, 0xfa, 0xe7, 0xfc, 0x98, 0x01, 0x1c, 0x41, 
+	0x91, 0x01, 0x4b, 0x26, 0x42, 0x98, 0xdb, 0x00, 
+	0xe0, 0x00, 0xe7, 0xec, 0x48, 0x24, 0x68, 0x01, 
+	0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0x48, 0x23, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x03, 0x48, 0x21, 
+	0x68, 0x40, 0x28, 0x00, 0xd1, 0x0b, 0x48, 0x20, 
+	0x68, 0x40, 0x4b, 0x19, 0x18, 0xc0, 0x49, 0x1d, 
+	0x60, 0x08, 0x48, 0x1d, 0x68, 0x80, 0x4b, 0x16, 
+	0x18, 0xc0, 0x49, 0x1a, 0x60, 0x48, 0x48, 0x19, 
+	0x68, 0x00, 0x21, 0x33, 0x06, 0x49, 0x65, 0x48, 
+	0x48, 0x16, 0x68, 0x40, 0x21, 0x33, 0x06, 0x49, 
+	0x65, 0x88, 0x48, 0x14, 0x68, 0x40, 0x21, 0x33, 
+	0x06, 0x49, 0x66, 0x88, 0x48, 0x11, 0x68, 0x00, 
+	0x21, 0x33, 0x06, 0x49, 0x66, 0x48, 0x20, 0x03, 
+	0x21, 0x33, 0x06, 0x49, 0x67, 0x08, 0x20, 0x00, 
+	0x49, 0x0e, 0x68, 0x09, 0x70, 0x08, 0x21, 0x00, 
+	0x20, 0x0d, 0xf7, 0xff, 0xfe, 0x2d, 0xb0, 0x05, 
+	0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x66, 0x00, 0x00, 0x70, 
+	0xcc, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x80, 
+	0xcc, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x27, 0x10, 
+	0x6a, 0x00, 0x00, 0x10, 0x2e, 0x08, 0xb9, 0x88, 
+	0xcc, 0x00, 0x0f, 0x80, 0x2e, 0x08, 0xd2, 0x10, 
+	0x1c, 0x01, 0xb0, 0x81, 0x48, 0x27, 0x22, 0x00, 
+	0x92, 0x00, 0x9a, 0x00, 0x2a, 0x16, 0xdb, 0x04, 
+	0xe0, 0x09, 0x9a, 0x00, 0x32, 0x01, 0x92, 0x00, 
+	0xe7, 0xf7, 0x68, 0x02, 0x9b, 0x00, 0x00, 0x9b, 
+	0x50, 0xca, 0x30, 0x04, 0xe7, 0xf5, 0x48, 0x20, 
+	0x22, 0x00, 0x92, 0x00, 0x9a, 0x00, 0x2a, 0x0b, 
+	0xdb, 0x04, 0xe0, 0x0a, 0x9a, 0x00, 0x32, 0x01, 
+	0x92, 0x00, 0xe7, 0xf7, 0x68, 0x03, 0x9a, 0x00, 
+	0x00, 0x92, 0x18, 0x52, 0x65, 0x93, 0x30, 0x04, 
+	0xe7, 0xf4, 0x48, 0x18, 0x22, 0x00, 0x92, 0x00, 
+	0x9a, 0x00, 0x2a, 0x11, 0xdb, 0x04, 0xe0, 0x0b, 
+	0x9a, 0x00, 0x32, 0x01, 0x92, 0x00, 0xe7, 0xf7, 
+	0x68, 0x03, 0x9a, 0x00, 0x00, 0x92, 0x18, 0x52, 
+	0x32, 0x80, 0x60, 0x53, 0x30, 0x04, 0xe7, 0xf3, 
+	0x48, 0x0f, 0x22, 0x02, 0x92, 0x00, 0x9a, 0x00, 
+	0x2a, 0x05, 0xdb, 0x04, 0xe0, 0x0b, 0x9a, 0x00, 
+	0x32, 0x01, 0x92, 0x00, 0xe7, 0xf7, 0x68, 0x02, 
+	0x9b, 0x00, 0x00, 0x9b, 0x18, 0x5b, 0x33, 0x80, 
+	0x60, 0x5a, 0x30, 0x04, 0xe7, 0xf3, 0x4a, 0x07, 
+	0x6c, 0x12, 0x1d, 0xcb, 0x33, 0x79, 0x61, 0xda, 
+	0xb0, 0x01, 0x47, 0x70, 0xcc, 0x00, 0x05, 0x20, 
+	0xcc, 0x00, 0x0c, 0x00, 0xcc, 0x00, 0x0c, 0x5c, 
+	0xcc, 0x00, 0x0c, 0xa0, 0xcc, 0x00, 0x0c, 0x80, 
+	0xb4, 0xf0, 0x1c, 0x06, 0x1c, 0x0f, 0x1c, 0x14, 
+	0x1c, 0x1d, 0x06, 0x29, 0x0e, 0x09, 0x2c, 0x1f, 
+	0xdb, 0x02, 0x20, 0xaf, 0xbc, 0xf0, 0x47, 0x70, 
+	0x4b, 0x0b, 0x40, 0x1f, 0x48, 0x0b, 0x68, 0x00, 
+	0x60, 0x06, 0x29, 0x01, 0xd1, 0x07, 0x48, 0x0a, 
+	0x68, 0x02, 0x43, 0x3a, 0x60, 0x02, 0x20, 0x80, 
+	0x6e, 0x00, 0x60, 0x04, 0xe0, 0x05, 0x29, 0x02, 
+	0xd1, 0x03, 0x48, 0x05, 0x68, 0x02, 0x43, 0xba, 
+	0x60, 0x02, 0x20, 0x00, 0xe7, 0xe6, 0xe7, 0xe5, 
+	0xff, 0xff, 0xf8, 0xff, 0x2e, 0x08, 0x9d, 0xe0, 
+	0xcc, 0x00, 0x02, 0x20, 0xb5, 0xf3, 0xb0, 0x81, 
+	0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 
+	0x99, 0x02, 0x06, 0x0e, 0x0e, 0x36, 0x48, 0x1a, 
+	0x6f, 0x00, 0x23, 0x02, 0x40, 0x18, 0xd0, 0x0d, 
+	0x20, 0x33, 0x06, 0x40, 0x6d, 0x80, 0x21, 0x33, 
+	0x06, 0x49, 0x6d, 0x49, 0x1a, 0x41, 0x48, 0x14, 
+	0x6d, 0xc0, 0x4a, 0x13, 0x6d, 0x92, 0x1a, 0x80, 
+	0x18, 0x0d, 0xe0, 0x06, 0x20, 0x33, 0x06, 0x40, 
+	0x6d, 0x80, 0x21, 0x33, 0x06, 0x49, 0x6d, 0x49, 
+	0x1a, 0x45, 0x98, 0x00, 0x43, 0x68, 0x1c, 0x01, 
+	0x20, 0x64, 0xf0, 0x07, 0xfb, 0x43, 0x1c, 0x04, 
+	0x43, 0x6e, 0x1c, 0x31, 0x20, 0x64, 0xf0, 0x07, 
+	0xfb, 0x3d, 0x1c, 0x07, 0x08, 0xa4, 0x00, 0xa4, 
+	0x08, 0xbf, 0x00, 0xbf, 0x48, 0x05, 0x64, 0x84, 
+	0x48, 0x04, 0x64, 0xc7, 0xb0, 0x01, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x80, 0xcc, 0x00, 0x0c, 0x80, 
+	0xb5, 0xf7, 0x9a, 0x02, 0x06, 0x15, 0x0e, 0x2d, 
+	0xb0, 0x82, 0x27, 0x00, 0x2d, 0x1f, 0xdb, 0x05, 
+	0x20, 0xaf, 0xb0, 0x02, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2f, 0x00, 0xd1, 0x0d, 
+	0x48, 0x19, 0x69, 0x80, 0x28, 0x00, 0xd0, 0x00, 
+	0xe7, 0xfa, 0x20, 0x02, 0x49, 0x16, 0x61, 0x88, 
+	0x48, 0x15, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x00, 
+	0x27, 0xff, 0xe7, 0xef, 0x4c, 0x13, 0x94, 0x00, 
+	0x20, 0x01, 0x02, 0x40, 0x90, 0x01, 0x22, 0x00, 
+	0x99, 0x03, 0xb4, 0x06, 0x06, 0x2b, 0x16, 0x1b, 
+	0x9a, 0x03, 0x99, 0x04, 0x1c, 0x20, 0xf0, 0x01, 
+	0xff, 0x75, 0xb0, 0x02, 0x1c, 0x06, 0x2e, 0xd2, 
+	0xd1, 0x06, 0x20, 0x00, 0x49, 0x08, 0x61, 0x88, 
+	0x20, 0xd2, 0xb0, 0x02, 0xe7, 0xd2, 0xe0, 0x08, 
+	0x20, 0x00, 0x99, 0x00, 0x60, 0x08, 0x20, 0x00, 
+	0x49, 0x03, 0x61, 0x88, 0x20, 0x00, 0xb0, 0x02, 
+	0xe7, 0xc8, 0xb0, 0x02, 0xe7, 0xc6, 0x00, 0x00, 
+	0xcc, 0x00, 0x0f, 0x80, 0xcc, 0x00, 0x06, 0x00, 
+	0xb5, 0xff, 0x9f, 0x09, 0xb0, 0x81, 0x9b, 0x01, 
+	0x06, 0x18, 0x0e, 0x00, 0x9b, 0x02, 0x06, 0x19, 
+	0x0e, 0x09, 0x9b, 0x03, 0x06, 0x1b, 0x0e, 0x1b, 
+	0x93, 0x00, 0x9b, 0x04, 0x06, 0x1a, 0x0e, 0x12, 
+	0x06, 0x3d, 0x0e, 0x2d, 0x2d, 0x01, 0xd1, 0x07, 
+	0x4c, 0x1c, 0x68, 0x26, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x9e, 0x1c, 0x33, 0x60, 0x23, 0xe0, 0x07, 
+	0x2d, 0x02, 0xd1, 0x05, 0x4c, 0x17, 0x68, 0x26, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x33, 0x60, 0x23, 
+	0x28, 0x00, 0xd1, 0x03, 0x23, 0x00, 0x4c, 0x14, 
+	0x61, 0xe3, 0xe0, 0x04, 0x28, 0x01, 0xd1, 0x02, 
+	0x23, 0x01, 0x4c, 0x11, 0x61, 0xe3, 0x29, 0x00, 
+	0xd1, 0x03, 0x23, 0x00, 0x4c, 0x0e, 0x65, 0xa3, 
+	0xe0, 0x04, 0x29, 0x01, 0xd1, 0x02, 0x23, 0x01, 
+	0x4c, 0x0b, 0x65, 0xa3, 0x2a, 0x00, 0xd1, 0x03, 
+	0x23, 0x02, 0x4c, 0x09, 0x66, 0xe3, 0xe0, 0x04, 
+	0x2a, 0x01, 0xd1, 0x02, 0x23, 0x03, 0x4c, 0x06, 
+	0x66, 0xe3, 0x9b, 0x00, 0x4c, 0x04, 0x67, 0x23, 
+	0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0xcc, 0x00, 0x02, 0x20, 
+	0xcc, 0x00, 0x0f, 0x80, 0xb5, 0xf0, 0x1c, 0x05, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x2e, 0x0e, 0x36, 
+	0xb0, 0x84, 0x48, 0x15, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x04, 0x20, 0x39, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x01, 0xd1, 0x0a, 
+	0x94, 0x00, 0x97, 0x01, 0x48, 0x0f, 0x90, 0x02, 
+	0x48, 0x0f, 0x90, 0x03, 0x46, 0x68, 0x21, 0x01, 
+	0xf0, 0x00, 0xfd, 0x1a, 0xe0, 0x0f, 0x20, 0x00, 
+	0x90, 0x00, 0x20, 0x00, 0x90, 0x01, 0x48, 0x09, 
+	0x90, 0x02, 0x48, 0x09, 0x90, 0x03, 0x46, 0x68, 
+	0x21, 0x01, 0xf0, 0x00, 0xfd, 0x0d, 0x21, 0x00, 
+	0x20, 0x02, 0xf7, 0xff, 0xfc, 0x85, 0x20, 0x00, 
+	0xb0, 0x04, 0xe7, 0xdc, 0xb0, 0x04, 0xe7, 0xda, 
+	0x2e, 0x08, 0xba, 0x28, 0x00, 0x00, 0x02, 0xcf, 
+	0x00, 0x00, 0x02, 0x3f, 0xb4, 0xb0, 0x1c, 0x05, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x48, 0x14, 0x6c, 0x00, 
+	0x1c, 0x01, 0x48, 0x13, 0x6f, 0x80, 0x23, 0x09, 
+	0x01, 0x9b, 0x42, 0x98, 0xd1, 0x12, 0x20, 0x02, 
+	0x40, 0x20, 0xd0, 0x0c, 0x2d, 0x02, 0xd1, 0x0a, 
+	0x2f, 0x03, 0xd1, 0x00, 0x31, 0x04, 0x2f, 0x03, 
+	0xd2, 0x05, 0x07, 0xe0, 0x0f, 0xc0, 0xd0, 0x01, 
+	0x31, 0x05, 0xe0, 0x00, 0x31, 0x08, 0x2d, 0x02, 
+	0xd9, 0x00, 0x21, 0x12, 0x00, 0x48, 0x18, 0x40, 
+	0x30, 0x01, 0x10, 0x40, 0x21, 0x2d, 0x02, 0x09, 
+	0x43, 0x41, 0x48, 0x03, 0x69, 0x40, 0x18, 0x09, 
+	0x1c, 0x08, 0xbc, 0xb0, 0x47, 0x70, 0xe7, 0xfc, 
+	0xcc, 0x00, 0x0f, 0x80, 0x48, 0x07, 0x6a, 0xc0, 
+	0x1c, 0x01, 0x00, 0x48, 0x18, 0x40, 0x30, 0x01, 
+	0x10, 0x40, 0x21, 0x2d, 0x02, 0x09, 0x43, 0x41, 
+	0x48, 0x03, 0x69, 0x40, 0x18, 0x09, 0x1c, 0x08, 
+	0x47, 0x70, 0xe7, 0xfd, 0xcc, 0x00, 0x00, 0x00, 
+	0xcc, 0x00, 0x0f, 0x80, 0x48, 0x07, 0x68, 0x80, 
+	0x28, 0x00, 0xd1, 0x03, 0x48, 0x06, 0x69, 0x00, 
+	0x1c, 0x01, 0xe0, 0x02, 0x48, 0x04, 0x68, 0xc0, 
+	0x1c, 0x01, 0x4b, 0x02, 0x18, 0xc9, 0x1c, 0x08, 
+	0x47, 0x70, 0xe7, 0xfd, 0xcc, 0x00, 0x00, 0x00, 
+	0xcc, 0x00, 0x0f, 0x80, 0xb5, 0x90, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x48, 0x06, 0x6c, 0x40, 0x60, 0x20, 
+	0x48, 0x04, 0x6c, 0x80, 0x60, 0x38, 0xf7, 0xff, 
+	0xff, 0xe1, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xe7, 0xfb, 0x00, 0x00, 0xcc, 0x00, 0x02, 0x00, 
+	0xb5, 0xf0, 0x1c, 0x05, 0x1c, 0x0c, 0x1c, 0x17, 
+	0xf7, 0xff, 0xff, 0xd4, 0x1c, 0x06, 0x2d, 0x00, 
+	0xd0, 0x01, 0x2c, 0x00, 0xd1, 0x03, 0x20, 0x3a, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x08, 0x78, 
+	0x00, 0x40, 0xd0, 0x01, 0x20, 0x3a, 0xe7, 0xf7, 
+	0x20, 0x00, 0x49, 0x0d, 0x66, 0x88, 0x48, 0x0d, 
+	0x68, 0x01, 0x23, 0x12, 0x43, 0x19, 0x60, 0x01, 
+	0x48, 0x0b, 0x63, 0x45, 0x48, 0x0a, 0x63, 0x84, 
+	0x20, 0x01, 0x49, 0x09, 0x62, 0x48, 0x48, 0x09, 
+	0x68, 0x01, 0x23, 0x01, 0x40, 0x59, 0x60, 0x01, 
+	0x48, 0x05, 0x63, 0xc7, 0x48, 0x02, 0x60, 0x46, 
+	0x20, 0x00, 0xe7, 0xdd, 0xe7, 0xdc, 0x00, 0x00, 
+	0xcc, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x0f, 0x48, 
+	0xcc, 0x00, 0x00, 0x80, 0xcc, 0x00, 0x00, 0x08, 
+	0xb4, 0xf0, 0x1c, 0x07, 0x1c, 0x0c, 0x1c, 0x16, 
+	0x1c, 0x1d, 0x48, 0x10, 0x6a, 0x00, 0x28, 0x10, 
+	0xd0, 0x02, 0x20, 0x3b, 0xbc, 0xf0, 0x47, 0x70, 
+	0x48, 0x0d, 0x68, 0x00, 0x60, 0x38, 0x68, 0x38, 
+	0x4b, 0x0b, 0x18, 0xc0, 0x60, 0x38, 0x48, 0x0b, 
+	0x6b, 0x40, 0x60, 0x30, 0x48, 0x09, 0x6b, 0x80, 
+	0x60, 0x28, 0x48, 0x09, 0x6c, 0x80, 0x23, 0x10, 
+	0x40, 0x18, 0xd0, 0x02, 0x20, 0x02, 0x60, 0x20, 
+	0xe0, 0x01, 0x20, 0x01, 0x60, 0x20, 0x20, 0x00, 
+	0xe7, 0xe4, 0xe7, 0xe3, 0xcc, 0x00, 0x05, 0x00, 
+	0xcc, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x80, 
+	0xcc, 0x00, 0x0f, 0x00, 0xb4, 0xf0, 0x1c, 0x05, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x2a, 0x0e, 0x12, 
+	0x06, 0x21, 0x0e, 0x09, 0x2f, 0x00, 0xd1, 0x30, 
+	0xb0, 0x81, 0x46, 0x6f, 0x2a, 0x00, 0xd0, 0x06, 
+	0x2a, 0x08, 0xd0, 0x0d, 0x2a, 0x10, 0xd0, 0x14, 
+	0x2a, 0x18, 0xd0, 0x1b, 0xe0, 0x23, 0x20, 0x00, 
+	0x70, 0x38, 0x20, 0x00, 0x70, 0x78, 0x20, 0x0c, 
+	0x70, 0xb8, 0x20, 0x00, 0x70, 0xf8, 0xe0, 0x1b, 
+	0x20, 0x00, 0x70, 0x38, 0x20, 0x08, 0x70, 0x78, 
+	0x20, 0x1c, 0x70, 0xb8, 0x20, 0x00, 0x70, 0xf8, 
+	0xe0, 0x12, 0x20, 0x00, 0x70, 0x38, 0x20, 0x10, 
+	0x70, 0x78, 0x20, 0x0c, 0x70, 0xb8, 0x20, 0x00, 
+	0x70, 0xf8, 0xe0, 0x09, 0x20, 0x00, 0x70, 0x38, 
+	0x20, 0x18, 0x70, 0x78, 0x20, 0x1c, 0x70, 0xb8, 
+	0x20, 0x00, 0x70, 0xf8, 0xe0, 0x00, 0xe7, 0xff, 
+	0xb0, 0x01, 0x23, 0x00, 0x56, 0xf8, 0x23, 0x39, 
+	0x06, 0x5b, 0x60, 0x18, 0x23, 0x01, 0x56, 0xf8, 
+	0x23, 0x39, 0x06, 0x5b, 0x61, 0xd8, 0x29, 0x00, 
+	0xd1, 0x06, 0x48, 0x0e, 0x68, 0x06, 0x23, 0x20, 
+	0x43, 0x9e, 0x1c, 0x33, 0x60, 0x03, 0xe0, 0x06, 
+	0x29, 0x20, 0xd1, 0x04, 0x48, 0x09, 0x68, 0x06, 
+	0x23, 0x20, 0x43, 0x33, 0x60, 0x03, 0x23, 0x02, 
+	0x56, 0xf8, 0x23, 0x39, 0x06, 0x5b, 0x60, 0x58, 
+	0x23, 0x03, 0x56, 0xf8, 0x4b, 0x04, 0x63, 0x18, 
+	0x20, 0x00, 0x23, 0x39, 0x06, 0x5b, 0x64, 0x98, 
+	0xbc, 0xf0, 0x47, 0x70, 0x72, 0x00, 0x00, 0x1c, 
+	0x72, 0x00, 0x01, 0x00, 0xb4, 0xb0, 0x1c, 0x07, 
+	0x1c, 0x0d, 0x1c, 0x14, 0x06, 0x29, 0x0e, 0x09, 
+	0x06, 0x22, 0x0e, 0x12, 0xb0, 0x84, 0x29, 0x33, 
+	0xdc, 0x01, 0x2a, 0x0f, 0xdd, 0x03, 0x20, 0xff, 
+	0xb0, 0x04, 0xbc, 0xb0, 0x47, 0x70, 0x20, 0x39, 
+	0x06, 0x40, 0x63, 0x41, 0x20, 0x10, 0x43, 0x10, 
+	0x23, 0x39, 0x06, 0x5b, 0x63, 0x98, 0x20, 0x39, 
+	0x06, 0x40, 0x68, 0x00, 0x90, 0x03, 0x98, 0x03, 
+	0x23, 0x9c, 0x43, 0xdb, 0x40, 0x18, 0x90, 0x03, 
+	0x20, 0x39, 0x06, 0x40, 0x68, 0x40, 0x90, 0x01, 
+	0x98, 0x01, 0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 
+	0x90, 0x01, 0x06, 0x38, 0x0e, 0x00, 0xd0, 0x29, 
+	0x20, 0x10, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x03, 
+	0x23, 0x80, 0x43, 0x18, 0x90, 0x03, 0x20, 0x08, 
+	0x40, 0x38, 0xd0, 0x03, 0x98, 0x03, 0x23, 0x10, 
+	0x43, 0x18, 0x90, 0x03, 0x20, 0x04, 0x40, 0x38, 
+	0xd0, 0x04, 0x98, 0x03, 0x23, 0x08, 0x43, 0x18, 
+	0x90, 0x03, 0xe0, 0x0c, 0x20, 0x02, 0x40, 0x38, 
+	0xd0, 0x04, 0x98, 0x03, 0x23, 0x0c, 0x43, 0x18, 
+	0x90, 0x03, 0xe0, 0x04, 0x98, 0x03, 0x23, 0x0c, 
+	0x43, 0xdb, 0x40, 0x18, 0x90, 0x03, 0x20, 0x20, 
+	0x40, 0x38, 0xd0, 0x03, 0x98, 0x01, 0x23, 0x20, 
+	0x43, 0x18, 0x90, 0x01, 0x98, 0x03, 0x23, 0x39, 
+	0x06, 0x5b, 0x60, 0x18, 0x98, 0x01, 0x23, 0x39, 
+	0x06, 0x5b, 0x60, 0x58, 0x20, 0x39, 0x06, 0x40, 
+	0x6a, 0x00, 0x90, 0x00, 0x98, 0x00, 0x23, 0xf0, 
+	0x43, 0xdb, 0x43, 0x18, 0x90, 0x00, 0x20, 0xff, 
+	0x02, 0x00, 0x40, 0x38, 0xd0, 0x27, 0x20, 0xff, 
+	0x30, 0x01, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
+	0x23, 0xfe, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
+	0x02, 0x40, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
+	0x23, 0xfd, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
+	0x02, 0x80, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
+	0x23, 0xfb, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
+	0x02, 0xc0, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
+	0x23, 0xf7, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
+	0x03, 0x00, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
+	0x23, 0xf0, 0x40, 0x18, 0x90, 0x00, 0x98, 0x00, 
+	0x23, 0x39, 0x06, 0x5b, 0x62, 0x18, 0x20, 0x39, 
+	0x06, 0x40, 0x69, 0xc0, 0x90, 0x02, 0x98, 0x02, 
+	0x08, 0x40, 0x00, 0x40, 0x90, 0x02, 0x20, 0x39, 
+	0x06, 0x40, 0x6a, 0xc0, 0x90, 0x00, 0x98, 0x00, 
+	0x23, 0x1c, 0x43, 0xdb, 0x40, 0x18, 0x90, 0x00, 
+	0x20, 0x39, 0x06, 0x40, 0x6b, 0x80, 0x90, 0x03, 
+	0x98, 0x03, 0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 
+	0x90, 0x03, 0x20, 0x39, 0x06, 0x40, 0x6b, 0xc0, 
+	0x90, 0x01, 0x98, 0x01, 0x09, 0x00, 0x01, 0x00, 
+	0x90, 0x01, 0x48, 0x4a, 0x40, 0x38, 0xd0, 0x45, 
+	0x20, 0x01, 0x04, 0x00, 0x40, 0x38, 0xd0, 0x03, 
+	0x98, 0x02, 0x23, 0x01, 0x43, 0x18, 0x90, 0x02, 
+	0x20, 0x01, 0x05, 0xc0, 0x40, 0x38, 0xd0, 0x03, 
+	0x98, 0x00, 0x23, 0x10, 0x43, 0x18, 0x90, 0x00, 
+	0x20, 0x07, 0x04, 0x40, 0x40, 0x38, 0x23, 0x01, 
+	0x04, 0x5b, 0x42, 0x98, 0xd0, 0x08, 0x23, 0x01, 
+	0x04, 0x9b, 0x42, 0x98, 0xd0, 0x07, 0x23, 0x01, 
+	0x04, 0xdb, 0x42, 0x98, 0xd0, 0x08, 0xe0, 0x0c, 
+	0x98, 0x00, 0x90, 0x00, 0xe0, 0x0a, 0x98, 0x00, 
+	0x23, 0x04, 0x43, 0x18, 0x90, 0x00, 0xe0, 0x05, 
+	0x98, 0x00, 0x23, 0x0c, 0x43, 0x18, 0x90, 0x00, 
+	0xe0, 0x00, 0xe7, 0xff, 0x20, 0x01, 0x05, 0x80, 
+	0x40, 0x38, 0xd0, 0x03, 0x98, 0x03, 0x23, 0x10, 
+	0x43, 0x18, 0x90, 0x03, 0x20, 0x01, 0x05, 0x00, 
+	0x40, 0x38, 0xd0, 0x03, 0x98, 0x01, 0x23, 0x08, 
+	0x43, 0x18, 0x90, 0x01, 0x20, 0x01, 0x05, 0x40, 
+	0x40, 0x38, 0xd0, 0x03, 0x98, 0x01, 0x23, 0x07, 
+	0x43, 0x18, 0x90, 0x01, 0x98, 0x03, 0x23, 0x39, 
+	0x06, 0x5b, 0x63, 0x98, 0x98, 0x02, 0x23, 0x39, 
+	0x06, 0x5b, 0x61, 0xd8, 0x98, 0x01, 0x23, 0x39, 
+	0x06, 0x5b, 0x63, 0xd8, 0x98, 0x00, 0x23, 0x39, 
+	0x06, 0x5b, 0x62, 0xd8, 0x20, 0x39, 0x06, 0x40, 
+	0x68, 0x80, 0x90, 0x03, 0x98, 0x03, 0x08, 0x80, 
+	0x00, 0x80, 0x90, 0x03, 0x0f, 0x38, 0x07, 0x00, 
+	0xd0, 0x26, 0x20, 0x01, 0x07, 0x00, 0x40, 0x38, 
+	0x23, 0x01, 0x07, 0x1b, 0x42, 0x98, 0xd1, 0x04, 
+	0x98, 0x03, 0x23, 0x02, 0x43, 0x18, 0x90, 0x03, 
+	0xe0, 0x07, 0x20, 0x00, 0x42, 0x80, 0xd1, 0x04, 
+	0x98, 0x03, 0x23, 0x02, 0x43, 0xdb, 0x40, 0x18, 
+	0x90, 0x03, 0x20, 0x01, 0x07, 0x40, 0x40, 0x38, 
+	0x23, 0x01, 0x07, 0x5b, 0x42, 0x98, 0xd1, 0x04, 
+	0x98, 0x03, 0x23, 0x01, 0x43, 0x18, 0x90, 0x03, 
+	0xe0, 0x06, 0x20, 0x00, 0x42, 0x80, 0xd1, 0x03, 
+	0x98, 0x03, 0x08, 0x40, 0x00, 0x40, 0x90, 0x03, 
+	0x98, 0x03, 0x23, 0x39, 0x06, 0x5b, 0x60, 0x98, 
+	0x20, 0x00, 0xb0, 0x04, 0xe6, 0xc1, 0xb0, 0x04, 
+	0xe6, 0xbf, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 
+	0x48, 0x02, 0x69, 0xc0, 0x06, 0x00, 0x16, 0x00, 
+	0x47, 0x70, 0xe7, 0xfd, 0x72, 0x00, 0x01, 0x00, 
+	0xb5, 0xf7, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x23, 
+	0x16, 0x18, 0x06, 0x3b, 0x16, 0x19, 0x9b, 0x02, 
+	0x06, 0x1a, 0x0e, 0x12, 0x2a, 0x00, 0xd1, 0x0b, 
+	0x23, 0x39, 0x06, 0x5b, 0x60, 0xd8, 0x23, 0x39, 
+	0x06, 0x5b, 0x61, 0x19, 0x4d, 0x0b, 0x68, 0x2e, 
+	0x23, 0x01, 0x43, 0x33, 0x60, 0x2b, 0xe0, 0x0c, 
+	0x2a, 0x01, 0xd1, 0x0a, 0x23, 0x39, 0x06, 0x5b, 
+	0x61, 0x58, 0x23, 0x39, 0x06, 0x5b, 0x61, 0x99, 
+	0x4d, 0x04, 0x68, 0x2e, 0x23, 0x02, 0x43, 0x33, 
+	0x60, 0x2b, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x72, 0x00, 0x00, 0x08, 
+	0xb4, 0x90, 0x1c, 0x01, 0x20, 0x92, 0x4b, 0x4b, 
+	0x60, 0x18, 0x20, 0x92, 0x4b, 0x4a, 0x60, 0x18, 
+	0x20, 0x10, 0x4b, 0x4a, 0x60, 0x18, 0x20, 0x00, 
+	0x4b, 0x48, 0x60, 0x58, 0x48, 0x48, 0x4b, 0x47, 
+	0x60, 0x98, 0x22, 0x00, 0x2a, 0x10, 0xdb, 0x02, 
+	0xe0, 0x07, 0x32, 0x01, 0xe7, 0xfa, 0x20, 0x00, 
+	0x43, 0xc0, 0x00, 0x93, 0x4c, 0x42, 0x50, 0xe0, 
+	0xe7, 0xf7, 0x20, 0x00, 0x43, 0xc0, 0x00, 0x93, 
+	0x4c, 0x3f, 0x50, 0xe0, 0x22, 0x00, 0x2a, 0x08, 
+	0xdb, 0x02, 0xe0, 0x08, 0x32, 0x01, 0xe7, 0xfa, 
+	0x20, 0x00, 0x43, 0xc0, 0x00, 0x94, 0x4b, 0x3b, 
+	0x18, 0xe3, 0x64, 0x18, 0xe7, 0xf6, 0x22, 0x00, 
+	0x2a, 0x20, 0xdb, 0x02, 0xe0, 0x08, 0x32, 0x01, 
+	0xe7, 0xfa, 0x20, 0x00, 0x43, 0xc0, 0x00, 0x94, 
+	0x4b, 0x35, 0x18, 0xe3, 0x60, 0x18, 0xe7, 0xf6, 
+	0x22, 0x00, 0x2a, 0x19, 0xdb, 0x02, 0xe0, 0x06, 
+	0x32, 0x01, 0xe7, 0xfa, 0x20, 0x00, 0x00, 0x93, 
+	0x4c, 0x30, 0x50, 0xe0, 0xe7, 0xf8, 0x20, 0x00, 
+	0x4b, 0x2f, 0x60, 0x18, 0x20, 0x39, 0x06, 0x40, 
+	0x69, 0xc0, 0x27, 0x18, 0x40, 0x07, 0x2f, 0x00, 
+	0xd0, 0x03, 0x48, 0x2c, 0x4b, 0x2c, 0x60, 0x18, 
+	0xe0, 0x03, 0x20, 0xff, 0x30, 0xe0, 0x4b, 0x2a, 
+	0x60, 0x18, 0x20, 0x00, 0x4b, 0x29, 0x60, 0x18, 
+	0x20, 0x00, 0x4b, 0x28, 0x60, 0x58, 0x48, 0x28, 
+	0x4b, 0x26, 0x60, 0x98, 0x48, 0x24, 0x68, 0x00, 
+	0x4b, 0x24, 0x60, 0xd8, 0x48, 0x25, 0x60, 0x01, 
+	0x20, 0x0d, 0x06, 0xc0, 0x61, 0xc1, 0x20, 0x05, 
+	0x02, 0x00, 0x23, 0x0d, 0x06, 0xdb, 0x60, 0x18, 
+	0x48, 0x21, 0x23, 0x0d, 0x06, 0xdb, 0x60, 0x58, 
+	0x48, 0x1f, 0x4b, 0x16, 0x63, 0x98, 0x20, 0x00, 
+	0x23, 0x0d, 0x06, 0xdb, 0x60, 0x98, 0x20, 0x00, 
+	0x23, 0x0d, 0x06, 0xdb, 0x61, 0x18, 0x48, 0x1b, 
+	0x23, 0x0d, 0x06, 0xdb, 0x61, 0x98, 0x20, 0x01, 
+	0x23, 0x0d, 0x06, 0xdb, 0x60, 0xd8, 0x48, 0x18, 
+	0x23, 0x0d, 0x06, 0xdb, 0x63, 0x18, 0x48, 0x17, 
+	0x23, 0x0d, 0x06, 0xdb, 0x63, 0x58, 0x20, 0x00, 
+	0x4b, 0x15, 0x60, 0x18, 0x48, 0x11, 0x4b, 0x15, 
+	0x60, 0x18, 0x20, 0x00, 0xbc, 0x90, 0x47, 0x70, 
+	0xe7, 0xfc, 0x00, 0x00, 0x2e, 0x08, 0xba, 0x30, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xbb, 0x00, 
+	0x2e, 0x08, 0xba, 0x38, 0x68, 0x00, 0x0d, 0x00, 
+	0x68, 0x00, 0x04, 0x00, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x2e, 0x08, 0xba, 0x28, 0x00, 0x00, 0x02, 0x3f, 
+	0x2e, 0x08, 0x9d, 0xec, 0x2e, 0x08, 0xbb, 0x0c, 
+	0x00, 0x00, 0x02, 0xcf, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x00, 0xf0, 0x29, 0x6d, 0x3f, 0xff, 0xff, 0xff, 
+	0x00, 0x80, 0x10, 0x80, 0x00, 0x80, 0xeb, 0x80, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0x9b, 0xb8, 
+	0xb5, 0xff, 0xb0, 0x85, 0x20, 0x39, 0x06, 0x40, 
+	0x69, 0xc0, 0x23, 0x18, 0x40, 0x18, 0x90, 0x00, 
+	0x98, 0x00, 0x28, 0x00, 0xd0, 0x03, 0x48, 0x5a, 
+	0x4b, 0x5a, 0x60, 0x18, 0xe0, 0x03, 0x20, 0xff, 
+	0x30, 0xe0, 0x4b, 0x58, 0x60, 0x18, 0x9c, 0x06, 
+	0x9f, 0x07, 0x22, 0x00, 0x21, 0x00, 0x98, 0x05, 
+	0x38, 0x0c, 0x28, 0x06, 0xd2, 0x0c, 0xa3, 0x02, 
+	0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x04, 0x03, 0x06, 0x04, 0x03, 0x06, 0x32, 0x01, 
+	0x32, 0x01, 0xe0, 0x02, 0x3a, 0x01, 0xe0, 0x00, 
+	0xe7, 0xff, 0x98, 0x05, 0x38, 0x0b, 0x28, 0x08, 
+	0xd2, 0x15, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x0a, 0x04, 0x04, 0x04, 
+	0x0a, 0x0a, 0x0a, 0x04, 0x25, 0x2d, 0x01, 0x2d, 
+	0x48, 0x44, 0x68, 0x00, 0x1c, 0x46, 0xe0, 0x0e, 
+	0x48, 0x43, 0x6c, 0x40, 0x1c, 0x05, 0x48, 0x43, 
+	0x68, 0x40, 0x1c, 0x06, 0xe0, 0x07, 0x21, 0xff, 
+	0x1c, 0x08, 0xb0, 0x05, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xe7, 0xff, 0x2d, 0x00, 
+	0xd0, 0x01, 0x2e, 0x00, 0xd1, 0x04, 0x25, 0x2d, 
+	0x01, 0x2d, 0x48, 0x38, 0x68, 0x00, 0x1c, 0x46, 
+	0x29, 0xff, 0xd1, 0x02, 0x1c, 0x08, 0xb0, 0x05, 
+	0xe7, 0xec, 0x1e, 0x68, 0x90, 0x02, 0x1e, 0x70, 
+	0x90, 0x01, 0x23, 0x01, 0x42, 0xda, 0xd1, 0x08, 
+	0x42, 0x50, 0x40, 0x85, 0x1c, 0x2b, 0x1e, 0x5d, 
+	0x42, 0x50, 0x40, 0x86, 0x1c, 0x33, 0x1e, 0x5e, 
+	0xe0, 0x05, 0x41, 0x15, 0x1c, 0x28, 0x1e, 0x45, 
+	0x41, 0x16, 0x1c, 0x30, 0x1e, 0x46, 0x07, 0xe0, 
+	0x0f, 0xc0, 0xd0, 0x02, 0x21, 0x80, 0x08, 0x64, 
+	0x00, 0x64, 0x07, 0xf8, 0x0f, 0xc0, 0xd0, 0x02, 
+	0x21, 0x80, 0x08, 0x7f, 0x00, 0x7f, 0x19, 0x60, 
+	0x90, 0x04, 0x19, 0xb8, 0x90, 0x03, 0x2c, 0x00, 
+	0xda, 0x01, 0x21, 0x80, 0x24, 0x00, 0x98, 0x04, 
+	0x28, 0x01, 0xda, 0x02, 0x21, 0x80, 0x20, 0x01, 
+	0x90, 0x04, 0x4b, 0x1f, 0x42, 0x9c, 0xdb, 0x01, 
+	0x21, 0x80, 0x4c, 0x1e, 0x98, 0x04, 0x4b, 0x1c, 
+	0x42, 0x98, 0xdd, 0x02, 0x21, 0x80, 0x48, 0x1a, 
+	0x90, 0x04, 0x2f, 0x00, 0xda, 0x01, 0x21, 0x80, 
+	0x27, 0x00, 0x98, 0x03, 0x28, 0x01, 0xda, 0x02, 
+	0x21, 0x80, 0x20, 0x01, 0x90, 0x03, 0x48, 0x11, 
+	0x68, 0x00, 0x42, 0x87, 0xd3, 0x03, 0x21, 0x80, 
+	0x48, 0x0e, 0x68, 0x00, 0x1e, 0x47, 0x98, 0x03, 
+	0x4b, 0x0c, 0x68, 0x1b, 0x42, 0x98, 0xd9, 0x03, 
+	0x21, 0x80, 0x48, 0x0a, 0x68, 0x00, 0x90, 0x03, 
+	0x9b, 0x08, 0x60, 0x1c, 0x9b, 0x08, 0x60, 0x5f, 
+	0x98, 0x04, 0x9b, 0x08, 0x60, 0x98, 0x98, 0x03, 
+	0x9b, 0x08, 0x60, 0xd8, 0x1c, 0x08, 0xb0, 0x05, 
+	0xe7, 0x88, 0xb0, 0x05, 0xe7, 0x86, 0x00, 0x00, 
+	0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0x9d, 0xec, 
+	0xcc, 0x00, 0x02, 0x00, 0xcc, 0x00, 0x0c, 0x00, 
+	0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x02, 0xce, 
+	0xb5, 0xf0, 0x1c, 0x07, 0x1c, 0x0c, 0xb0, 0x81, 
+	0x2c, 0x0b, 0xdb, 0x19, 0x2c, 0x12, 0xdc, 0x17, 
+	0x68, 0xbe, 0x68, 0xf9, 0x91, 0x00, 0x68, 0x7a, 
+	0x1c, 0x3b, 0x68, 0x39, 0x1c, 0x20, 0xf7, 0xff, 
+	0xff, 0x23, 0x1c, 0x05, 0x68, 0xb8, 0x42, 0xb0, 
+	0xd0, 0x00, 0x25, 0x80, 0x68, 0xf8, 0x99, 0x00, 
+	0x42, 0x88, 0xd0, 0x00, 0x25, 0x80, 0x1c, 0x28, 
+	0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x25, 0x00, 0x68, 0x38, 0x28, 0x00, 0xda, 0x02, 
+	0x25, 0x80, 0x20, 0x00, 0x60, 0x38, 0x68, 0x78, 
+	0x28, 0x00, 0xda, 0x02, 0x25, 0x80, 0x20, 0x00, 
+	0x60, 0x78, 0x68, 0x38, 0x07, 0xc0, 0x0f, 0xc0, 
+	0xd0, 0x04, 0x25, 0x80, 0x68, 0x38, 0x08, 0x40, 
+	0x00, 0x40, 0x60, 0x38, 0x68, 0xb8, 0x07, 0xc0, 
+	0x0f, 0xc0, 0xd1, 0x09, 0x25, 0x80, 0x68, 0xb8, 
+	0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x01, 0x68, 0xb8, 
+	0xe0, 0x01, 0x68, 0xb8, 0x38, 0x01, 0x60, 0xb8, 
+	0x68, 0xb8, 0x68, 0x39, 0x42, 0x88, 0xdc, 0x03, 
+	0x25, 0x80, 0x68, 0x38, 0x30, 0x01, 0x60, 0xb8, 
+	0x68, 0x78, 0x68, 0xf9, 0x42, 0x88, 0xdb, 0x03, 
+	0x25, 0x80, 0x68, 0x78, 0x30, 0x01, 0x60, 0xf8, 
+	0x1c, 0x28, 0xb0, 0x01, 0xe7, 0xc5, 0xb0, 0x01, 
+	0xe7, 0xc3, 0x1c, 0x02, 0x21, 0x18, 0xe0, 0x00, 
+	0x31, 0x01, 0x1c, 0x08, 0x47, 0x70, 0xe7, 0xfd, 
+	0xb4, 0xf0, 0x1c, 0x07, 0x1c, 0x0a, 0xb0, 0x81, 
+	0x68, 0xb8, 0x68, 0x3b, 0x1a, 0xc0, 0x1c, 0x46, 
+	0x68, 0xf8, 0x68, 0x7b, 0x1a, 0xc0, 0x30, 0x01, 
+	0x90, 0x00, 0x00, 0x90, 0x4b, 0x15, 0x58, 0x1c, 
+	0x98, 0x00, 0x43, 0x46, 0x1c, 0x35, 0x07, 0xa0, 
+	0x0f, 0x80, 0x1c, 0x29, 0x40, 0x81, 0x2a, 0x0b, 
+	0xdb, 0x01, 0x2a, 0x12, 0xdd, 0x01, 0x2a, 0x13, 
+	0xd1, 0x01, 0x21, 0x00, 0xe0, 0x0a, 0x2a, 0x09, 
+	0xd0, 0x01, 0x2a, 0x0a, 0xd1, 0x03, 0x00, 0x69, 
+	0x19, 0x49, 0x00, 0xc9, 0xe0, 0x02, 0x2a, 0x08, 
+	0xd1, 0x00, 0x01, 0x29, 0x20, 0x04, 0x40, 0x20, 
+	0xd0, 0x00, 0x08, 0x49, 0x09, 0x4c, 0x06, 0xc8, 
+	0x0e, 0xc0, 0xd0, 0x00, 0x34, 0x01, 0x1c, 0x20, 
+	0xb0, 0x01, 0xbc, 0xf0, 0x47, 0x70, 0xb0, 0x01, 
+	0xe7, 0xfb, 0x00, 0x00, 0x2e, 0x03, 0xa8, 0x78, 
+	0xb4, 0x80, 0x23, 0x00, 0x22, 0x01, 0x21, 0x00, 
+	0x29, 0x08, 0xdb, 0x02, 0xe0, 0x09, 0x31, 0x01, 
+	0xe7, 0xfa, 0x00, 0x88, 0x4f, 0x05, 0x58, 0x38, 
+	0x28, 0x00, 0xd0, 0x00, 0x43, 0x13, 0x00, 0x52, 
+	0xe7, 0xf5, 0x1c, 0x18, 0xbc, 0x80, 0x47, 0x70, 
+	0xe7, 0xfc, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xc4, 
+	0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x81, 0x20, 0x39, 
+	0x06, 0x40, 0x69, 0xc0, 0x23, 0x18, 0x40, 0x18, 
+	0x90, 0x00, 0x98, 0x00, 0x28, 0x00, 0xd0, 0x03, 
+	0x48, 0x32, 0x49, 0x33, 0x60, 0x08, 0xe0, 0x03, 
+	0x20, 0xff, 0x30, 0xe0, 0x49, 0x30, 0x60, 0x08, 
+	0x24, 0x00, 0x99, 0x01, 0x48, 0x2f, 0xf7, 0xfc, 
+	0xfa, 0x1f, 0x48, 0x2e, 0x68, 0x00, 0x28, 0x00, 
+	0xda, 0x03, 0x20, 0x00, 0x49, 0x2b, 0x60, 0x08, 
+	0x24, 0x80, 0x48, 0x2a, 0x68, 0x40, 0x28, 0x00, 
+	0xda, 0x03, 0x20, 0x00, 0x49, 0x27, 0x60, 0x48, 
+	0x24, 0x80, 0x48, 0x26, 0x68, 0x80, 0x4b, 0x26, 
+	0x42, 0x98, 0xdd, 0x03, 0x48, 0x24, 0x49, 0x23, 
+	0x60, 0x88, 0x24, 0x80, 0x48, 0x21, 0x68, 0xc0, 
+	0x49, 0x1f, 0x68, 0x09, 0x42, 0x88, 0xd9, 0x04, 
+	0x48, 0x1d, 0x68, 0x00, 0x49, 0x1d, 0x60, 0xc8, 
+	0x24, 0x80, 0x48, 0x1e, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x27, 0x2f, 0x01, 0xd1, 0x25, 0x48, 0x19, 
+	0x68, 0x06, 0x48, 0x18, 0x68, 0x45, 0x23, 0xff, 
+	0x33, 0x68, 0x42, 0x9e, 0xdd, 0x01, 0x26, 0xff, 
+	0x36, 0x68, 0x48, 0x13, 0x68, 0x00, 0x08, 0x40, 
+	0x42, 0xa8, 0xd2, 0x02, 0x48, 0x10, 0x68, 0x00, 
+	0x08, 0x45, 0x48, 0x13, 0x49, 0x13, 0x65, 0x48, 
+	0x48, 0x13, 0x43, 0x70, 0x23, 0x01, 0x04, 0x1b, 
+	0x18, 0xc0, 0x14, 0x40, 0x49, 0x0f, 0x65, 0x88, 
+	0x20, 0x00, 0x49, 0x0e, 0x65, 0xc8, 0x48, 0x0d, 
+	0x66, 0x05, 0x1c, 0x38, 0x21, 0x00, 0xf7, 0xfe, 
+	0xff, 0x13, 0x1c, 0x20, 0xb0, 0x01, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 
+	0xe7, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3f, 
+	0x2e, 0x08, 0x9d, 0xec, 0x2e, 0x08, 0xbb, 0x0c, 
+	0x00, 0x00, 0x02, 0xcf, 0x2e, 0x08, 0xba, 0x28, 
+	0x00, 0x00, 0x07, 0xfa, 0xcc, 0x00, 0x00, 0x00, 
+	0x00, 0x0b, 0x60, 0xb6, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x1c, 0x0f, 0xb0, 0x81, 0x1c, 0x26, 0x69, 0x30, 
+	0x90, 0x00, 0x98, 0x00, 0x28, 0x13, 0xd1, 0x04, 
+	0x20, 0x75, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0xf5, 0x68, 0x38, 0x08, 0x40, 
+	0x00, 0x40, 0x60, 0x38, 0x68, 0x78, 0x08, 0x40, 
+	0x00, 0x40, 0x60, 0x78, 0x68, 0xb8, 0x07, 0xc0, 
+	0x0f, 0xc0, 0xd1, 0x02, 0x68, 0xb8, 0x38, 0x01, 
+	0x60, 0xb8, 0x68, 0xf8, 0x07, 0xc0, 0x0f, 0xc0, 
+	0xd1, 0x02, 0x68, 0xf8, 0x38, 0x01, 0x60, 0xf8, 
+	0x1d, 0xf0, 0x30, 0x49, 0x1c, 0x39, 0xf7, 0xfc, 
+	0xf9, 0x8b, 0x48, 0x1c, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
+	0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x01, 
+	0xe7, 0xcc, 0x49, 0x13, 0x20, 0x91, 0xf0, 0x14, 
+	0xff, 0x47, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x05, 0xfa, 0xf4, 0xe7, 0xf5, 0x00, 0xa8, 
+	0x49, 0x0e, 0x58, 0x08, 0x42, 0xa0, 0xd0, 0x05, 
+	0x20, 0x92, 0x49, 0x0b, 0x60, 0x08, 0x20, 0xff, 
+	0xb0, 0x01, 0xe7, 0xb7, 0x48, 0x0a, 0x68, 0x00, 
+	0x42, 0xa0, 0xd1, 0x03, 0x1c, 0x39, 0x1c, 0x20, 
+	0xf0, 0x00, 0xf8, 0x10, 0x20, 0x92, 0x49, 0x04, 
+	0x60, 0x08, 0x20, 0x00, 0xb0, 0x01, 0xe7, 0xa9, 
+	0xb0, 0x01, 0xe7, 0xa7, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x2c, 0x2e, 0x08, 0xb9, 0xc4, 
+	0x2e, 0x08, 0xba, 0x28, 0xb5, 0xf3, 0x1c, 0x0f, 
+	0xb0, 0x9b, 0x20, 0x39, 0x06, 0x40, 0x69, 0xc0, 
+	0x23, 0x18, 0x40, 0x18, 0x90, 0x01, 0x98, 0x01, 
+	0x28, 0x00, 0xd0, 0x03, 0x48, 0xf8, 0x49, 0xf9, 
+	0x60, 0x08, 0xe0, 0x03, 0x20, 0xff, 0x30, 0xe0, 
+	0x49, 0xf6, 0x60, 0x08, 0x20, 0xff, 0x30, 0x01, 
+	0x90, 0x06, 0x98, 0x1b, 0x90, 0x1a, 0x98, 0x1a, 
+	0x69, 0x05, 0x98, 0x1a, 0x68, 0xc0, 0x90, 0x19, 
+	0x48, 0xf1, 0x68, 0x00, 0x99, 0x1b, 0x42, 0x88, 
+	0xd1, 0x73, 0x20, 0x02, 0x90, 0x08, 0x2d, 0x0c, 
+	0xd0, 0x01, 0x2d, 0x0f, 0xd1, 0x02, 0x20, 0x04, 
+	0x90, 0x08, 0xe0, 0x0c, 0x2d, 0x0d, 0xd0, 0x01, 
+	0x2d, 0x10, 0xd1, 0x02, 0x20, 0x08, 0x90, 0x08, 
+	0xe0, 0x05, 0x2d, 0x0e, 0xd0, 0x01, 0x2d, 0x11, 
+	0xd1, 0x01, 0x20, 0x01, 0x90, 0x08, 0x68, 0xf8, 
+	0x68, 0x79, 0x1a, 0x40, 0x1c, 0x44, 0x2d, 0x0b, 
+	0xd0, 0x05, 0x2d, 0x0f, 0xd0, 0x03, 0x2d, 0x10, 
+	0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x11, 0x48, 0xdf, 
+	0x6c, 0x40, 0x1c, 0x06, 0x48, 0xdd, 0x6c, 0x81, 
+	0x91, 0x07, 0x2e, 0x00, 0xd0, 0x02, 0x99, 0x07, 
+	0x29, 0x00, 0xd1, 0x05, 0x26, 0x2d, 0x01, 0x36, 
+	0x48, 0xd6, 0x68, 0x00, 0x1c, 0x41, 0x91, 0x07, 
+	0xe0, 0x05, 0x26, 0x2d, 0x01, 0x36, 0x48, 0xd3, 
+	0x68, 0x00, 0x1c, 0x41, 0x91, 0x07, 0x49, 0xd4, 
+	0xa8, 0x15, 0xf7, 0xfc, 0xf8, 0xe9, 0x98, 0x17, 
+	0x1e, 0x71, 0x42, 0x88, 0xdd, 0x01, 0x1e, 0x70, 
+	0x90, 0x17, 0x98, 0x18, 0x99, 0x07, 0x39, 0x01, 
+	0x42, 0x88, 0xdd, 0x02, 0x99, 0x07, 0x1e, 0x48, 
+	0x90, 0x18, 0x98, 0x18, 0x99, 0x16, 0x1a, 0x40, 
+	0x00, 0x40, 0x1c, 0x81, 0x98, 0x08, 0xf0, 0x06, 
+	0xfb, 0xd3, 0x90, 0x0a, 0x98, 0x0a, 0x42, 0x84, 
+	0xdd, 0x00, 0x9c, 0x0a, 0x48, 0xc5, 0x6f, 0x00, 
+	0x90, 0x02, 0x20, 0x00, 0x90, 0x05, 0x98, 0x02, 
+	0x28, 0x02, 0xd0, 0x02, 0x98, 0x02, 0x28, 0x03, 
+	0xd1, 0x3a, 0x48, 0xc1, 0x6b, 0x00, 0x90, 0x04, 
+	0x48, 0xbe, 0x6e, 0xc1, 0x91, 0x03, 0x98, 0x04, 
+	0x99, 0x03, 0x42, 0x88, 0xdd, 0x21, 0x20, 0xc0, 
+	0x90, 0x06, 0x1d, 0x20, 0x28, 0x00, 0xda, 0x02, 
+	0xe0, 0x00, 0xe1, 0x8e, 0x30, 0x07, 0x10, 0xc0, 
+	0x90, 0x05, 0x98, 0x04, 0x28, 0x03, 0xd0, 0x14, 
+	0x99, 0x03, 0x29, 0x03, 0xd1, 0x07, 0x20, 0xcd, 
+	0x90, 0x06, 0x1d, 0x61, 0x20, 0x0a, 0xf0, 0x06, 
+	0xfb, 0xa3, 0x90, 0x05, 0xe0, 0x09, 0x98, 0x02, 
+	0x28, 0x02, 0xd1, 0x06, 0x20, 0x9a, 0x90, 0x06, 
+	0x1c, 0xa1, 0x20, 0x05, 0xf0, 0x06, 0xfb, 0x98, 
+	0x90, 0x05, 0x98, 0x06, 0x28, 0x9a, 0xd0, 0x02, 
+	0x98, 0x06, 0x28, 0xcd, 0xd1, 0x08, 0x2d, 0x0e, 
+	0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x04, 0x20, 0x00, 
+	0x90, 0x05, 0x20, 0xff, 0x30, 0x01, 0x90, 0x06, 
+	0x2d, 0x12, 0xd1, 0x0b, 0x48, 0x9d, 0x68, 0x00, 
+	0x30, 0x01, 0x42, 0xa0, 0xd1, 0x06, 0x68, 0x78, 
+	0x28, 0x00, 0xd1, 0x03, 0x20, 0x01, 0x49, 0x9f, 
+	0x63, 0x48, 0xe0, 0x02, 0x20, 0x00, 0x49, 0x9d, 
+	0x63, 0x48, 0x98, 0x0a, 0x99, 0x06, 0x43, 0x48, 
+	0x28, 0x00, 0xda, 0x00, 0x30, 0xff, 0x12, 0x00, 
+	0x42, 0xa0, 0xdd, 0x04, 0x20, 0x00, 0x90, 0x05, 
+	0x20, 0xff, 0x30, 0x01, 0x90, 0x06, 0x68, 0x78, 
+	0x99, 0x05, 0x18, 0x40, 0x60, 0x78, 0x1c, 0x39, 
+	0xa8, 0x11, 0xf7, 0xfc, 0xf8, 0x61, 0x1c, 0x29, 
+	0xa8, 0x11, 0xf7, 0xff, 0xfd, 0x71, 0x98, 0x12, 
+	0x49, 0x88, 0x68, 0x09, 0x39, 0x01, 0x42, 0x88, 
+	0xd1, 0x00, 0x24, 0x00, 0x99, 0x15, 0x91, 0x0d, 
+	0x98, 0x16, 0x90, 0x0f, 0x21, 0x00, 0x91, 0x10, 
+	0x68, 0x38, 0x28, 0x00, 0xda, 0x08, 0x68, 0x38, 
+	0x99, 0x08, 0x43, 0x48, 0x42, 0x41, 0x29, 0x00, 
+	0xda, 0x00, 0x31, 0x01, 0x10, 0x49, 0x91, 0x10, 
+	0x68, 0x78, 0x28, 0x00, 0xda, 0x0d, 0x68, 0x78, 
+	0x99, 0x08, 0x43, 0x48, 0x28, 0x00, 0xda, 0x00, 
+	0x30, 0x01, 0x10, 0x40, 0x02, 0x01, 0x98, 0x06, 
+	0xf0, 0x06, 0xfb, 0x36, 0x99, 0x0f, 0x1a, 0x08, 
+	0x90, 0x0f, 0x98, 0x18, 0x99, 0x0f, 0x42, 0x88, 
+	0xdc, 0x02, 0x98, 0x18, 0x30, 0x01, 0x90, 0x0f, 
+	0x98, 0x17, 0x99, 0x0d, 0x1a, 0x40, 0x30, 0x01, 
+	0x90, 0x0e, 0x98, 0x18, 0x99, 0x0f, 0x1a, 0x40, 
+	0x30, 0x01, 0x90, 0x09, 0x98, 0x09, 0x00, 0x41, 
+	0x98, 0x08, 0xf0, 0x06, 0xfb, 0x1d, 0x99, 0x06, 
+	0x43, 0x48, 0x28, 0x00, 0xda, 0x00, 0x30, 0xff, 
+	0x12, 0x00, 0x90, 0x09, 0x68, 0xb8, 0x68, 0x39, 
+	0x1a, 0x40, 0x1c, 0x41, 0x91, 0x0c, 0x98, 0x17, 
+	0x99, 0x15, 0x1a, 0x40, 0x00, 0x40, 0x1c, 0x81, 
+	0x98, 0x08, 0xf0, 0x06, 0xfb, 0x09, 0x90, 0x0b, 
+	0x98, 0x0b, 0x4b, 0x65, 0x40, 0x18, 0x90, 0x0b, 
+	0x98, 0x0b, 0x99, 0x08, 0x43, 0x48, 0x28, 0x00, 
+	0xda, 0x00, 0x30, 0x01, 0x10, 0x40, 0x90, 0x0e, 
+	0x99, 0x0c, 0x98, 0x0b, 0x42, 0x81, 0xdd, 0x01, 
+	0x98, 0x0b, 0x90, 0x0c, 0x99, 0x0c, 0x4b, 0x5c, 
+	0x40, 0x19, 0x91, 0x0c, 0x98, 0x0c, 0x28, 0x00, 
+	0xdd, 0x05, 0x68, 0x38, 0x99, 0x0c, 0x18, 0x40, 
+	0x38, 0x01, 0x90, 0x13, 0xe0, 0x02, 0x68, 0x38, 
+	0x30, 0x01, 0x90, 0x13, 0x98, 0x13, 0x28, 0x01, 
+	0xda, 0x01, 0x20, 0x01, 0x90, 0x13, 0x98, 0x13, 
+	0x4b, 0x52, 0x42, 0x98, 0xdd, 0x01, 0x48, 0x51, 
+	0x90, 0x13, 0x99, 0x06, 0x43, 0x4c, 0x1c, 0x20, 
+	0x28, 0x00, 0xda, 0x00, 0x30, 0xff, 0x12, 0x04, 
+	0x98, 0x0a, 0x42, 0x84, 0xdd, 0x00, 0x9c, 0x0a, 
+	0x2c, 0x02, 0xda, 0x00, 0x24, 0x02, 0x68, 0x78, 
+	0x19, 0x00, 0x38, 0x01, 0x90, 0x14, 0x98, 0x14, 
+	0x28, 0x01, 0xda, 0x01, 0x20, 0x01, 0x90, 0x14, 
+	0x98, 0x14, 0x49, 0x3c, 0x68, 0x09, 0x42, 0x88, 
+	0xd9, 0x02, 0x48, 0x3a, 0x68, 0x00, 0x90, 0x14, 
+	0x98, 0x12, 0x49, 0x38, 0x68, 0x09, 0x39, 0x01, 
+	0x42, 0x88, 0xd9, 0x03, 0x48, 0x35, 0x68, 0x00, 
+	0x38, 0x01, 0x90, 0x12, 0x98, 0x09, 0x28, 0x04, 
+	0xdb, 0x01, 0x2c, 0x04, 0xda, 0x01, 0x20, 0x00, 
+	0x90, 0x0e, 0x98, 0x0e, 0x28, 0x03, 0xdb, 0x02, 
+	0x98, 0x0c, 0x28, 0x04, 0xda, 0x09, 0x20, 0x00, 
+	0x90, 0x0e, 0x48, 0x35, 0x90, 0x11, 0x48, 0x33, 
+	0x90, 0x13, 0x20, 0x00, 0x90, 0x12, 0x20, 0x01, 
+	0x90, 0x14, 0x21, 0x00, 0x91, 0x00, 0x98, 0x08, 
+	0x28, 0x01, 0xd1, 0x16, 0x98, 0x0e, 0x99, 0x10, 
+	0x1a, 0x40, 0x00, 0x40, 0x4b, 0x2b, 0x42, 0x98, 
+	0xdd, 0x0b, 0x98, 0x0e, 0x99, 0x10, 0x1a, 0x40, 
+	0x00, 0x40, 0x23, 0x2d, 0x01, 0x1b, 0x1a, 0xc1, 
+	0x29, 0x00, 0xda, 0x00, 0x31, 0x01, 0x10, 0x49, 
+	0x91, 0x00, 0x98, 0x0e, 0x42, 0xb0, 0xdd, 0x00, 
+	0x96, 0x0e, 0x99, 0x10, 0x42, 0xb1, 0xdd, 0x00, 
+	0x96, 0x10, 0x1c, 0x30, 0x21, 0x01, 0x07, 0x49, 
+	0xf0, 0x06, 0xfa, 0x76, 0x99, 0x0d, 0x43, 0x48, 
+	0x23, 0x01, 0x04, 0x1b, 0x18, 0xc0, 0x14, 0x40, 
+	0x49, 0x1c, 0x65, 0x88, 0x1c, 0x30, 0x21, 0x01, 
+	0x07, 0x49, 0xf0, 0x06, 0xfa, 0x69, 0x99, 0x10, 
+	0x43, 0x48, 0x23, 0x01, 0x04, 0x1b, 0x18, 0xc0, 
+	0x14, 0x40, 0x49, 0x16, 0x65, 0xc8, 0x1c, 0x30, 
+	0x21, 0x01, 0x07, 0x49, 0xf0, 0x06, 0xfa, 0x5c, 
+	0x99, 0x0e, 0x43, 0x48, 0x23, 0x01, 0x04, 0x1b, 
+	0x18, 0xc0, 0x14, 0x40, 0x49, 0x0f, 0x65, 0x48, 
+	0x99, 0x07, 0x1f, 0x08, 0x99, 0x0f, 0x42, 0x88, 
+	0xdc, 0x1b, 0x99, 0x07, 0x1f, 0x08, 0xe0, 0x17, 
+	0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0x9d, 0xec, 
+	0x2e, 0x08, 0xba, 0x28, 0xcc, 0x00, 0x02, 0x00, 
+	0x2e, 0x08, 0xbb, 0x0c, 0xcc, 0x00, 0x0f, 0x80, 
+	0xcc, 0x00, 0x00, 0x80, 0xcc, 0x00, 0x01, 0x00, 
+	0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x02, 0xcf, 
+	0x00, 0x00, 0x02, 0xce, 0xcc, 0x00, 0x00, 0x00, 
+	0x90, 0x0f, 0x98, 0x0f, 0x49, 0x0d, 0x66, 0x08, 
+	0x1c, 0x30, 0x21, 0x01, 0x07, 0x49, 0xf0, 0x06, 
+	0xfa, 0x2b, 0x99, 0x00, 0x43, 0x48, 0x23, 0x01, 
+	0x04, 0x1b, 0x18, 0xc0, 0x14, 0x40, 0x49, 0x07, 
+	0x66, 0x48, 0xa9, 0x11, 0x1c, 0x38, 0xf7, 0xfb, 
+	0xff, 0x1f, 0x20, 0x00, 0xb0, 0x1b, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x1b, 
+	0xe7, 0xf9, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 
+	0xb4, 0xb0, 0x1c, 0x02, 0x1c, 0x0f, 0x2a, 0x00, 
+	0xd1, 0x02, 0x20, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
+	0x2f, 0x01, 0xd1, 0x20, 0x20, 0x00, 0x23, 0x00, 
+	0x4d, 0x13, 0x62, 0x2b, 0x23, 0x00, 0x4d, 0x12, 
+	0x62, 0xab, 0x4b, 0x12, 0x68, 0x9b, 0x1c, 0x1c, 
+	0x4b, 0x11, 0x6e, 0xdb, 0x1c, 0x19, 0x2c, 0x02, 
+	0xd0, 0x01, 0x29, 0x02, 0xd1, 0x01, 0x20, 0x08, 
+	0xe0, 0x00, 0x20, 0x07, 0x79, 0x13, 0x2b, 0x00, 
+	0xd0, 0x01, 0x23, 0x10, 0x43, 0x18, 0x4b, 0x08, 
+	0x62, 0x58, 0x79, 0x55, 0x23, 0x80, 0x43, 0x2b, 
+	0x4d, 0x05, 0x62, 0xab, 0xe0, 0x05, 0x48, 0x07, 
+	0x68, 0x05, 0x23, 0x80, 0x43, 0x9d, 0x1c, 0x2b, 
+	0x60, 0x03, 0x20, 0x00, 0xe7, 0xd2, 0xe7, 0xd1, 
+	0x72, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x0c, 0x00, 
+	0xcc, 0x00, 0x0f, 0x80, 0x72, 0x00, 0x01, 0x28, 
+	0xb5, 0xff, 0x9f, 0x09, 0xb0, 0x81, 0x98, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 0x99, 0x02, 
+	0x06, 0x0c, 0x0e, 0x24, 0x98, 0x03, 0x06, 0x02, 
+	0x0e, 0x12, 0x9b, 0x04, 0x06, 0x1d, 0x0e, 0x2d, 
+	0x2f, 0x01, 0xd1, 0x1b, 0x20, 0x00, 0x4b, 0x14, 
+	0x62, 0x18, 0x20, 0x00, 0x4b, 0x12, 0x62, 0x98, 
+	0x98, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x01, 0x23, 
+	0x43, 0x18, 0x06, 0x01, 0x0e, 0x09, 0x48, 0x0e, 
+	0x62, 0x41, 0x07, 0x50, 0x0f, 0x40, 0x07, 0x6b, 
+	0x0f, 0x5b, 0x00, 0xdb, 0x43, 0x18, 0x06, 0x01, 
+	0x0e, 0x09, 0x20, 0x80, 0x43, 0x08, 0x4b, 0x08, 
+	0x62, 0x98, 0xe0, 0x05, 0x48, 0x07, 0x68, 0x06, 
+	0x23, 0x80, 0x43, 0x9e, 0x1c, 0x33, 0x60, 0x03, 
+	0x20, 0x00, 0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 
+	0x72, 0x00, 0x01, 0x00, 0x72, 0x00, 0x01, 0x28, 
+	0xb5, 0xf1, 0x98, 0x00, 0x06, 0x07, 0x0e, 0x3f, 
+	0xb0, 0x81, 0x2f, 0x1f, 0xdb, 0x05, 0x20, 0xb3, 
+	0xb0, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x48, 0x62, 0x23, 0x80, 0x68, 0x1b, 
+	0x60, 0x18, 0x48, 0x61, 0x23, 0x80, 0x6b, 0x1b, 
+	0x60, 0x18, 0x48, 0x60, 0x23, 0x80, 0x6b, 0x5b, 
+	0x60, 0x18, 0x48, 0x5f, 0x23, 0x80, 0x6b, 0x9b, 
+	0x60, 0x18, 0x20, 0x01, 0x40, 0xb8, 0x4b, 0x59, 
+	0x60, 0x18, 0x20, 0x00, 0x4b, 0x57, 0x71, 0x18, 
+	0x20, 0x00, 0x4b, 0x56, 0x71, 0x58, 0x48, 0x55, 
+	0x68, 0x00, 0x4b, 0x58, 0x60, 0x58, 0x48, 0x58, 
+	0x4b, 0x56, 0x60, 0x98, 0x48, 0x57, 0x4b, 0x55, 
+	0x60, 0xd8, 0x20, 0xff, 0x30, 0x01, 0x4b, 0x53, 
+	0x62, 0x18, 0x20, 0xff, 0x30, 0x01, 0x4b, 0x51, 
+	0x62, 0x58, 0x20, 0x03, 0x4b, 0x52, 0x75, 0x18, 
+	0x20, 0x0e, 0x4b, 0x51, 0x75, 0x58, 0x20, 0x04, 
+	0x4b, 0x4f, 0x75, 0x98, 0x20, 0x03, 0x4b, 0x4e, 
+	0x75, 0xd8, 0x20, 0x00, 0x4b, 0x4d, 0x60, 0x18, 
+	0x20, 0x00, 0x4b, 0x4d, 0x60, 0x18, 0x20, 0x0d, 
+	0x23, 0x19, 0x06, 0x9b, 0x63, 0x18, 0x22, 0x00, 
+	0x2a, 0x20, 0xdb, 0x04, 0xe0, 0x21, 0x1c, 0x50, 
+	0x06, 0x02, 0x0e, 0x12, 0xe7, 0xf8, 0x25, 0x00, 
+	0x00, 0x93, 0x4e, 0x46, 0x50, 0xf5, 0x25, 0xff, 
+	0x4b, 0x45, 0x54, 0x9d, 0x01, 0x15, 0x4b, 0x45, 
+	0x18, 0xec, 0x01, 0x15, 0x4b, 0x44, 0x18, 0xe8, 
+	0x25, 0x00, 0xc4, 0x20, 0x25, 0x00, 0xc4, 0x20, 
+	0x25, 0x00, 0xc4, 0x20, 0x25, 0x00, 0xc4, 0x20, 
+	0x25, 0x00, 0xc0, 0x20, 0x25, 0x00, 0xc0, 0x20, 
+	0x25, 0x00, 0xc0, 0x20, 0x25, 0x00, 0xc0, 0x20, 
+	0xe7, 0xdd, 0x21, 0x00, 0x29, 0x20, 0xdb, 0x04, 
+	0xe0, 0x0b, 0x1c, 0x48, 0x04, 0x01, 0x0c, 0x09, 
+	0xe7, 0xf8, 0x23, 0x00, 0x00, 0x88, 0x4c, 0x2a, 
+	0x50, 0x23, 0x23, 0x00, 0x48, 0x35, 0x54, 0x43, 
+	0xe7, 0xf3, 0x4c, 0x35, 0x94, 0x00, 0x22, 0x00, 
+	0x2a, 0x10, 0xdb, 0x04, 0xe0, 0x0f, 0x1c, 0x50, 
+	0x06, 0x02, 0x0e, 0x12, 0xe7, 0xf8, 0x20, 0x00, 
+	0x00, 0x93, 0x4c, 0x30, 0x50, 0xe0, 0x23, 0xff, 
+	0x48, 0x2f, 0x54, 0x83, 0x20, 0x00, 0x00, 0x93, 
+	0x9c, 0x00, 0x50, 0xe0, 0xe7, 0xef, 0x21, 0x00, 
+	0x23, 0xff, 0x33, 0x01, 0x42, 0x99, 0xdb, 0x04, 
+	0xe0, 0x2a, 0x1c, 0x48, 0x04, 0x01, 0x0c, 0x09, 
+	0xe7, 0xf6, 0x23, 0x00, 0x00, 0x88, 0x4c, 0x1a, 
+	0x50, 0x23, 0x20, 0x00, 0x00, 0x8b, 0x4c, 0x18, 
+	0x19, 0x1c, 0x23, 0x01, 0x02, 0x9b, 0x18, 0xe3, 
+	0x60, 0x18, 0x20, 0x00, 0x4b, 0x14, 0x18, 0x5c, 
+	0x23, 0x01, 0x02, 0xdb, 0x18, 0xe3, 0x70, 0x18, 
+	0x20, 0x00, 0x00, 0x8b, 0x4c, 0x11, 0x50, 0xe0, 
+	0x20, 0x00, 0x00, 0x8b, 0x4c, 0x0f, 0x19, 0x1c, 
+	0x23, 0x01, 0x02, 0x9b, 0x18, 0xe3, 0x60, 0x18, 
+	0x20, 0x00, 0x4b, 0x0c, 0x18, 0x5c, 0x23, 0x01, 
+	0x02, 0xdb, 0x18, 0xe3, 0x70, 0x18, 0xe7, 0xd4, 
+	0x20, 0x00, 0xb0, 0x01, 0xe7, 0x39, 0xb0, 0x01, 
+	0xe7, 0x37, 0x00, 0x00, 0x2e, 0x08, 0xb0, 0x58, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0xaf, 0xfc, 
+	0x2e, 0x08, 0xb0, 0x08, 0x9e, 0x00, 0x04, 0x80, 
+	0x2e, 0x08, 0x9d, 0xfc, 0x2e, 0x08, 0xa6, 0xfc, 
+	0x9e, 0x00, 0x04, 0xa0, 0x2e, 0x08, 0x9c, 0x48, 
+	0x2e, 0x08, 0x9c, 0x4c, 0x2e, 0x08, 0x9c, 0x50, 
+	0x2e, 0x08, 0x9d, 0x10, 0x64, 0x00, 0x08, 0x00, 
+	0x64, 0x00, 0x10, 0x00, 0x2e, 0x08, 0xb9, 0x60, 
+	0x9e, 0x00, 0x04, 0xb8, 0x2e, 0x08, 0x9c, 0xd0, 
+	0x2e, 0x08, 0x9d, 0x30, 0xb4, 0xb0, 0x1c, 0x07, 
+	0x1c, 0x0a, 0x06, 0x11, 0x0e, 0x09, 0x29, 0x20, 
+	0xdb, 0x02, 0x20, 0xa2, 0xbc, 0xb0, 0x47, 0x70, 
+	0x00, 0x88, 0x4b, 0x0a, 0x58, 0x18, 0x1c, 0x05, 
+	0xd1, 0x01, 0x20, 0xb0, 0xe7, 0xf6, 0x68, 0xe8, 
+	0x1c, 0x04, 0xd1, 0x01, 0x20, 0xb6, 0xe7, 0xf1, 
+	0x68, 0x60, 0x00, 0x43, 0x18, 0x18, 0x01, 0x80, 
+	0x08, 0x80, 0x60, 0x38, 0x20, 0x00, 0xe7, 0xe9, 
+	0xe7, 0xe8, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xc8, 
+	0xb5, 0xff, 0xb0, 0x82, 0x9a, 0x04, 0x06, 0x11, 
+	0x0e, 0x09, 0x91, 0x00, 0x9b, 0x05, 0x06, 0x18, 
+	0x0e, 0x00, 0x90, 0x01, 0xb0, 0x83, 0x99, 0x03, 
+	0x29, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x05, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x98, 0x05, 0x28, 0x00, 0xd0, 0x64, 0x98, 0x05, 
+	0x23, 0x0d, 0x06, 0x9b, 0x42, 0xd8, 0xd3, 0x02, 
+	0x20, 0xb4, 0xb0, 0x05, 0xe7, 0xf0, 0x99, 0x06, 
+	0x23, 0xff, 0x33, 0x81, 0x42, 0x99, 0xd2, 0x02, 
+	0x20, 0xb5, 0xb0, 0x05, 0xe7, 0xe8, 0x99, 0x03, 
+	0x00, 0x88, 0x49, 0x2c, 0x58, 0x08, 0x90, 0x02, 
+	0x28, 0x00, 0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x05, 
+	0xe7, 0xde, 0x99, 0x06, 0x00, 0x88, 0x1f, 0xc1, 
+	0x39, 0x05, 0x91, 0x00, 0x9e, 0x05, 0x98, 0x05, 
+	0x1d, 0xc5, 0x35, 0x05, 0x60, 0x35, 0x99, 0x06, 
+	0x60, 0x71, 0x20, 0x00, 0x60, 0xb0, 0x98, 0x04, 
+	0x28, 0x10, 0xd1, 0x0a, 0x98, 0x02, 0x68, 0x84, 
+	0x98, 0x02, 0x30, 0x18, 0x90, 0x01, 0x1c, 0x2a, 
+	0x99, 0x00, 0x98, 0x01, 0xf0, 0x00, 0xfc, 0x86, 
+	0xe0, 0x25, 0x98, 0x04, 0x28, 0x20, 0xd1, 0x1f, 
+	0x98, 0x02, 0x68, 0xc0, 0x1c, 0x07, 0xd1, 0x02, 
+	0x20, 0xb6, 0xb0, 0x05, 0xe7, 0xb8, 0x78, 0xb8, 
+	0x08, 0x40, 0x00, 0x40, 0x70, 0xb8, 0x69, 0x3c, 
+	0x1d, 0xf8, 0x30, 0x05, 0x90, 0x01, 0x68, 0xb8, 
+	0x28, 0x00, 0xd1, 0x00, 0x60, 0xbd, 0x1c, 0x2a, 
+	0x99, 0x00, 0x98, 0x01, 0xf0, 0x00, 0xfc, 0x6a, 
+	0x68, 0x79, 0x18, 0x40, 0x60, 0x78, 0x78, 0x78, 
+	0x99, 0x03, 0xf0, 0x00, 0xf8, 0xb9, 0xe0, 0x02, 
+	0x20, 0xbc, 0xb0, 0x05, 0xe7, 0x9c, 0x68, 0xa0, 
+	0x28, 0x00, 0xd0, 0x01, 0x68, 0xa4, 0xe7, 0xfa, 
+	0x60, 0xa6, 0x20, 0x00, 0xb0, 0x05, 0xe7, 0x93, 
+	0x20, 0xb4, 0xb0, 0x05, 0xe7, 0x90, 0xb0, 0x03, 
+	0xb0, 0x02, 0xe7, 0x8d, 0x2e, 0x08, 0x9b, 0xc8, 
+	0xb5, 0xff, 0xb0, 0x81, 0x9a, 0x03, 0x06, 0x16, 
+	0x0e, 0x36, 0x9b, 0x04, 0x06, 0x18, 0x0e, 0x00, 
+	0x90, 0x00, 0xb0, 0x83, 0x27, 0x00, 0x2e, 0x20, 
+	0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x04, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0xb0, 
+	0x49, 0x45, 0x58, 0x08, 0x1c, 0x04, 0xd1, 0x02, 
+	0x20, 0xb0, 0xb0, 0x04, 0xe7, 0xf3, 0x78, 0xe0, 
+	0x28, 0x00, 0xd1, 0x73, 0x98, 0x03, 0x28, 0x20, 
+	0xd1, 0x19, 0x68, 0xe0, 0x1c, 0x07, 0xd1, 0x02, 
+	0x20, 0xb6, 0xb0, 0x04, 0xe7, 0xe7, 0x69, 0x38, 
+	0x49, 0x3c, 0x60, 0x48, 0x48, 0x3b, 0x68, 0x40, 
+	0x68, 0x00, 0x60, 0xb8, 0x1d, 0xf8, 0x30, 0x05, 
+	0x90, 0x02, 0x20, 0x01, 0x90, 0x00, 0x48, 0x37, 
+	0x68, 0x40, 0x68, 0x40, 0x00, 0x80, 0x1f, 0xc1, 
+	0x39, 0x19, 0x91, 0x01, 0xe0, 0x1d, 0x98, 0x03, 
+	0x28, 0x10, 0xd1, 0x17, 0x68, 0xa0, 0x49, 0x31, 
+	0x60, 0x48, 0x48, 0x30, 0x68, 0x40, 0x68, 0x00, 
+	0x61, 0x20, 0x48, 0x2e, 0x68, 0x40, 0x68, 0x00, 
+	0x61, 0x60, 0x1d, 0xe0, 0x30, 0x11, 0x90, 0x02, 
+	0x48, 0x2a, 0x68, 0x40, 0x68, 0x40, 0x00, 0x80, 
+	0x1f, 0xc1, 0x39, 0x21, 0x91, 0x01, 0x20, 0x00, 
+	0x90, 0x00, 0xe0, 0x02, 0x20, 0xbc, 0xb0, 0x04, 
+	0xe7, 0xb5, 0x48, 0x24, 0x68, 0x40, 0x68, 0x80, 
+	0x28, 0x00, 0xd0, 0x37, 0x25, 0x00, 0x48, 0x21, 
+	0x68, 0x40, 0x68, 0x02, 0x99, 0x01, 0x98, 0x02, 
+	0xf0, 0x00, 0xfb, 0xe8, 0x19, 0x45, 0x48, 0x1d, 
+	0x68, 0x40, 0x49, 0x1c, 0x60, 0x08, 0x48, 0x1b, 
+	0x68, 0x00, 0x68, 0x80, 0x49, 0x19, 0x60, 0x48, 
+	0x48, 0x18, 0x68, 0x40, 0x68, 0x40, 0x00, 0x80, 
+	0x1f, 0xc1, 0x39, 0x05, 0x91, 0x01, 0x48, 0x15, 
+	0x68, 0x40, 0x68, 0x80, 0x28, 0x00, 0xd1, 0xe2, 
+	0x20, 0x00, 0x49, 0x12, 0x68, 0x09, 0x60, 0x88, 
+	0x48, 0x10, 0x68, 0x40, 0x99, 0x04, 0x60, 0x08, 
+	0x48, 0x0e, 0x68, 0x40, 0x68, 0x40, 0x99, 0x05, 
+	0x60, 0x08, 0x98, 0x00, 0x28, 0x00, 0xd0, 0x06, 
+	0x60, 0x7d, 0x78, 0x78, 0x1c, 0x31, 0xf0, 0x00, 
+	0xf8, 0x13, 0xe0, 0x00, 0xe0, 0x05, 0x20, 0x00, 
+	0xb0, 0x04, 0xe7, 0x78, 0x20, 0xb4, 0xb0, 0x04, 
+	0xe7, 0x75, 0x20, 0xbc, 0xb0, 0x04, 0xe7, 0x72, 
+	0xb0, 0x03, 0xb0, 0x01, 0xe7, 0x6f, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9d, 0xf4, 
+	0xb5, 0xf3, 0x98, 0x00, 0x06, 0x02, 0x0e, 0x12, 
+	0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0xb0, 0x81, 
+	0x2c, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x01, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0xa0, 0x4b, 0x14, 0x58, 0x18, 0x1c, 0x05, 
+	0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x01, 0xe7, 0xf3, 
+	0x68, 0xe8, 0x1c, 0x01, 0xd1, 0x02, 0x20, 0xb6, 
+	0xb0, 0x01, 0xe7, 0xed, 0x11, 0x10, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x00, 0x28, 0x00, 0xd1, 0x04, 
+	0x68, 0x48, 0x40, 0xd0, 0x06, 0x07, 0x0e, 0x3f, 
+	0xe0, 0x09, 0x68, 0x48, 0x07, 0x16, 0x0f, 0x36, 
+	0x40, 0xf0, 0x68, 0x4e, 0x40, 0xd6, 0x1c, 0x33, 
+	0x18, 0xc0, 0x06, 0x07, 0x0e, 0x3f, 0x70, 0x0f, 
+	0x70, 0x4a, 0x20, 0x00, 0xb0, 0x01, 0xe7, 0xd3, 
+	0xb0, 0x01, 0xe7, 0xd1, 0x2e, 0x08, 0x9b, 0xc8, 
+	0xb4, 0xb0, 0x1c, 0x03, 0x1c, 0x0a, 0x06, 0x11, 
+	0x0e, 0x09, 0x29, 0x20, 0xdb, 0x02, 0x20, 0xa2, 
+	0xbc, 0xb0, 0x47, 0x70, 0x00, 0x88, 0x4d, 0x08, 
+	0x58, 0x28, 0x1c, 0x04, 0xd1, 0x01, 0x20, 0xb0, 
+	0xe7, 0xf6, 0x68, 0xe0, 0x1c, 0x07, 0xd1, 0x01, 
+	0x20, 0xb6, 0xe7, 0xf1, 0x78, 0x78, 0x70, 0x18, 
+	0x20, 0x00, 0xe7, 0xed, 0xe7, 0xec, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb5, 0xf3, 0xb0, 0x81, 
+	0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 
+	0x99, 0x02, 0x06, 0x0d, 0x0e, 0x2d, 0xb0, 0x86, 
+	0x20, 0x00, 0x90, 0x00, 0x2d, 0x20, 0xdd, 0x05, 
+	0x20, 0xa2, 0xb0, 0x07, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0xa8, 0x49, 0xa2, 
+	0x58, 0x08, 0x90, 0x04, 0x28, 0x00, 0xd1, 0x02, 
+	0x20, 0xb0, 0xb0, 0x07, 0xe7, 0xf2, 0x00, 0xa8, 
+	0x49, 0x9e, 0x68, 0x09, 0x18, 0x40, 0x90, 0x05, 
+	0x00, 0xe8, 0x1b, 0x40, 0x00, 0x80, 0x49, 0x9c, 
+	0x68, 0x09, 0x18, 0x46, 0x98, 0x06, 0x28, 0x00, 
+	0xd0, 0x73, 0x28, 0x01, 0xd0, 0x4f, 0x28, 0x02, 
+	0xd0, 0x00, 0xe1, 0x1d, 0x98, 0x04, 0x69, 0x00, 
+	0x60, 0x70, 0x98, 0x04, 0x78, 0x40, 0x06, 0xc0, 
+	0x0e, 0xc0, 0x90, 0x02, 0x98, 0x02, 0x28, 0x13, 
+	0xd0, 0x16, 0x27, 0x00, 0x2f, 0x20, 0xdb, 0x04, 
+	0xe0, 0x11, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
+	0xe7, 0xf8, 0x48, 0x8e, 0x5d, 0xc0, 0x42, 0xa8, 
+	0xd1, 0x08, 0x00, 0xb8, 0x49, 0x8c, 0x58, 0x08, 
+	0x30, 0x01, 0x78, 0x01, 0x23, 0x80, 0x43, 0xdb, 
+	0x40, 0x19, 0x70, 0x01, 0xe7, 0xed, 0xe0, 0x1e, 
+	0x27, 0x00, 0x2f, 0x10, 0xdb, 0x04, 0xe0, 0x1a, 
+	0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 
+	0x48, 0x84, 0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x11, 
+	0x00, 0xb8, 0x49, 0x83, 0x58, 0x08, 0x30, 0x01, 
+	0x78, 0x01, 0x23, 0x80, 0x43, 0xdb, 0x40, 0x19, 
+	0x70, 0x01, 0x98, 0x00, 0x30, 0x01, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x00, 0x98, 0x00, 0x28, 0x02, 
+	0xd1, 0x00, 0xe0, 0x00, 0xe7, 0xe4, 0x88, 0x30, 
+	0x4b, 0x7a, 0x40, 0x18, 0x80, 0x30, 0x98, 0x05, 
+	0x68, 0x00, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
+	0x99, 0x05, 0x60, 0x08, 0xe0, 0xd3, 0x98, 0x05, 
+	0x68, 0x00, 0x4b, 0x75, 0x40, 0x18, 0x99, 0x05, 
+	0x60, 0x08, 0x20, 0x00, 0x60, 0xb0, 0x20, 0x00, 
+	0x70, 0xf0, 0x20, 0x00, 0x60, 0xf0, 0x98, 0x04, 
+	0x78, 0x40, 0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x02, 
+	0x98, 0x02, 0x28, 0x13, 0xd0, 0x16, 0x27, 0x00, 
+	0x2f, 0x20, 0xdb, 0x04, 0xe0, 0x11, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 0x48, 0x63, 
+	0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x08, 0x00, 0xb8, 
+	0xe0, 0x00, 0xe0, 0x27, 0x49, 0x60, 0x58, 0x0c, 
+	0x78, 0x60, 0x23, 0x80, 0x43, 0x18, 0x70, 0x60, 
+	0xe7, 0xed, 0xe0, 0x1e, 0x27, 0x00, 0x2f, 0x10, 
+	0xdb, 0x04, 0xe0, 0x1a, 0x1c, 0x78, 0x06, 0x07, 
+	0x0e, 0x3f, 0xe7, 0xf8, 0x48, 0x59, 0x5d, 0xc0, 
+	0x42, 0xa8, 0xd1, 0x11, 0x00, 0xb8, 0x49, 0x58, 
+	0x58, 0x08, 0x30, 0x01, 0x78, 0x01, 0x23, 0x80, 
+	0x43, 0xdb, 0x40, 0x19, 0x70, 0x01, 0x98, 0x00, 
+	0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 
+	0x98, 0x00, 0x28, 0x02, 0xd1, 0x00, 0xe0, 0x00, 
+	0xe7, 0xe4, 0xe0, 0x88, 0x98, 0x05, 0x68, 0x00, 
+	0x4b, 0x4f, 0x40, 0x18, 0x99, 0x05, 0x60, 0x08, 
+	0x20, 0x00, 0x60, 0xb0, 0x20, 0x00, 0x70, 0xf0, 
+	0x20, 0x00, 0x60, 0xf0, 0x98, 0x04, 0x78, 0x40, 
+	0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x02, 0x98, 0x04, 
+	0x78, 0x40, 0x21, 0x20, 0x40, 0x01, 0x91, 0x03, 
+	0x98, 0x02, 0x28, 0x13, 0xd0, 0x4c, 0x27, 0x00, 
+	0x2f, 0x20, 0xdb, 0x04, 0xe0, 0x47, 0x1c, 0x78, 
+	0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 0x48, 0x3b, 
+	0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x3e, 0x00, 0xb8, 
+	0x49, 0x39, 0x58, 0x0c, 0x20, 0x80, 0x70, 0x60, 
+	0x99, 0x03, 0x1c, 0x20, 0xf7, 0xfd, 0xfb, 0x30, 
+	0x78, 0xa0, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x28, 
+	0x6a, 0xe0, 0x22, 0x00, 0x92, 0x01, 0x99, 0x01, 
+	0x29, 0x08, 0xdb, 0x06, 0xe0, 0x1f, 0x99, 0x01, 
+	0x31, 0x01, 0x06, 0x09, 0x0e, 0x09, 0x91, 0x01, 
+	0xe7, 0xf5, 0x99, 0x01, 0x00, 0x89, 0x18, 0x09, 
+	0x68, 0x49, 0x9a, 0x01, 0x00, 0x92, 0x18, 0x12, 
+	0x64, 0x51, 0x22, 0x00, 0x99, 0x01, 0x00, 0x89, 
+	0x18, 0x09, 0x62, 0x4a, 0x99, 0x01, 0x00, 0x89, 
+	0x18, 0x09, 0x6c, 0x49, 0x29, 0x00, 0xd0, 0x05, 
+	0x9a, 0x01, 0x21, 0x80, 0x41, 0x11, 0x88, 0x02, 
+	0x43, 0x11, 0x80, 0x01, 0xe7, 0xdf, 0x88, 0x01, 
+	0x80, 0x41, 0x78, 0xa0, 0x23, 0x20, 0x40, 0x18, 
+	0xd0, 0x04, 0x98, 0x04, 0x68, 0xc1, 0x1c, 0x20, 
+	0xf0, 0x00, 0xfa, 0x3d, 0xe7, 0xb7, 0xe0, 0x1e, 
+	0x27, 0x00, 0x2f, 0x10, 0xdb, 0x04, 0xe0, 0x1a, 
+	0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 
+	0x48, 0x16, 0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x11, 
+	0x00, 0xb8, 0x49, 0x15, 0x58, 0x0c, 0x20, 0x80, 
+	0x70, 0x60, 0x99, 0x03, 0x1c, 0x20, 0xf7, 0xfd, 
+	0xfa, 0xe3, 0x98, 0x00, 0x30, 0x01, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x00, 0x98, 0x00, 0x28, 0x02, 
+	0xd1, 0x00, 0xe0, 0x00, 0xe7, 0xe4, 0xe0, 0x02, 
+	0x20, 0xbc, 0xb0, 0x07, 0xe6, 0xbe, 0x98, 0x06, 
+	0x99, 0x04, 0x70, 0xc8, 0x20, 0x00, 0xb0, 0x07, 
+	0xe6, 0xb8, 0xb0, 0x06, 0xb0, 0x01, 0xe6, 0xb5, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9b, 0x38, 
+	0x2e, 0x08, 0x9b, 0x30, 0x2e, 0x08, 0x9d, 0x10, 
+	0x2e, 0x08, 0x9c, 0x50, 0x2e, 0x08, 0x9d, 0x30, 
+	0x2e, 0x08, 0x9c, 0xd0, 0xff, 0xff, 0xfb, 0xff, 
+	0xff, 0xff, 0xdf, 0xff, 0xb4, 0x90, 0x1c, 0x03, 
+	0x1c, 0x0a, 0x06, 0x11, 0x0e, 0x09, 0x29, 0x20, 
+	0xdd, 0x02, 0x20, 0xa2, 0xbc, 0x90, 0x47, 0x70, 
+	0x00, 0x88, 0x4c, 0x05, 0x58, 0x20, 0x1c, 0x07, 
+	0xd1, 0x01, 0x20, 0xb0, 0xe7, 0xf6, 0x78, 0xf8, 
+	0x70, 0x18, 0x20, 0x00, 0xe7, 0xf2, 0xe7, 0xf1, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb4, 0x90, 0x1c, 0x02, 
+	0x1c, 0x0f, 0x06, 0x38, 0x16, 0x04, 0x2a, 0x02, 
+	0xda, 0x02, 0x20, 0x00, 0xbc, 0x90, 0x47, 0x70, 
+	0x2c, 0x01, 0xd1, 0x01, 0x21, 0x28, 0xe0, 0x09, 
+	0x2c, 0x02, 0xd1, 0x01, 0x21, 0x20, 0xe0, 0x05, 
+	0x2c, 0x00, 0xd1, 0x01, 0x21, 0x0c, 0xe0, 0x01, 
+	0x20, 0x00, 0xe7, 0xef, 0x00, 0x50, 0x18, 0x80, 
+	0x01, 0x80, 0x18, 0x41, 0x1c, 0xc8, 0x08, 0x81, 
+	0x1c, 0x08, 0xe7, 0xe7, 0xe7, 0xe6, 0xb5, 0xf7, 
+	0x1c, 0x07, 0xb0, 0x81, 0x9a, 0x03, 0x06, 0x11, 
+	0x0e, 0x09, 0x91, 0x00, 0xb0, 0x84, 0x99, 0x04, 
+	0x29, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x05, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x99, 0x04, 0x00, 0x88, 0x49, 0x29, 0x58, 0x08, 
+	0x1c, 0x06, 0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x05, 
+	0xe7, 0xf2, 0x2f, 0x00, 0xd1, 0x02, 0x20, 0xb4, 
+	0xb0, 0x05, 0xe7, 0xed, 0x4b, 0x24, 0x42, 0x9f, 
+	0xd1, 0x0a, 0x78, 0xf0, 0x28, 0x00, 0xd0, 0x02, 
+	0x20, 0xbc, 0xb0, 0x05, 0xe7, 0xe4, 0x20, 0x00, 
+	0x60, 0xf0, 0x20, 0x00, 0xb0, 0x05, 0xe7, 0xdf, 
+	0x68, 0xf0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0xb4, 
+	0xb0, 0x05, 0xe7, 0xd9, 0x99, 0x06, 0x00, 0x88, 
+	0x1f, 0xc1, 0x39, 0x19, 0x91, 0x02, 0x20, 0xff, 
+	0x30, 0x81, 0x90, 0x01, 0x99, 0x02, 0x98, 0x01, 
+	0x42, 0x81, 0xda, 0x02, 0x20, 0xb5, 0xb0, 0x05, 
+	0xe7, 0xca, 0x1c, 0x3c, 0x60, 0xf4, 0x37, 0x14, 
+	0x1c, 0x3d, 0x37, 0x0c, 0x60, 0x2f, 0x99, 0x06, 
+	0x60, 0x69, 0x20, 0x00, 0x60, 0xa8, 0x97, 0x03, 
+	0x20, 0x00, 0x60, 0xe0, 0x1d, 0xe0, 0x30, 0x05, 
+	0x9a, 0x03, 0x99, 0x02, 0xf0, 0x00, 0xf9, 0x56, 
+	0x90, 0x00, 0x20, 0x00, 0x70, 0xa0, 0x98, 0x00, 
+	0x60, 0x60, 0x9a, 0x03, 0x60, 0xa2, 0x61, 0x25, 
+	0x99, 0x04, 0x20, 0x54, 0xf7, 0xff, 0xfd, 0xa0, 
+	0xb0, 0x05, 0xe7, 0xa9, 0xb0, 0x04, 0xb0, 0x01, 
+	0xe7, 0xa6, 0x00, 0x00, 0x2e, 0x08, 0x9b, 0xc8, 
+	0x00, 0x00, 0xff, 0xff, 0xb5, 0xff, 0xb0, 0x83, 
+	0x9a, 0x05, 0x06, 0x11, 0x0e, 0x09, 0x91, 0x00, 
+	0x9b, 0x06, 0x06, 0x18, 0x0e, 0x00, 0x90, 0x01, 
+	0x98, 0x0c, 0x06, 0x01, 0x0e, 0x09, 0x91, 0x02, 
+	0xb0, 0x85, 0x99, 0x05, 0x29, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x08, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x98, 0x08, 0x28, 0x00, 
+	0xd1, 0x02, 0x20, 0xb4, 0xb0, 0x08, 0xe7, 0xf5, 
+	0x99, 0x05, 0x00, 0xc8, 0x1a, 0x40, 0x00, 0x80, 
+	0x49, 0x83, 0x68, 0x09, 0x18, 0x47, 0x98, 0x08, 
+	0x4b, 0x82, 0x42, 0x98, 0xd1, 0x73, 0x99, 0x05, 
+	0x00, 0x88, 0x49, 0x81, 0x58, 0x08, 0x1c, 0x05, 
+	0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x08, 0xe7, 0xe1, 
+	0x68, 0xe8, 0x28, 0x00, 0xd1, 0x02, 0x78, 0xe8, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0xbc, 0xb0, 0x08, 
+	0xe7, 0xd8, 0x78, 0xa8, 0x28, 0x00, 0xd0, 0x54, 
+	0x20, 0x00, 0x42, 0x80, 0xd0, 0x1d, 0x24, 0x00, 
+	0x2c, 0x20, 0xdb, 0x04, 0xe0, 0x18, 0x1c, 0x60, 
+	0x06, 0x04, 0x0e, 0x24, 0xe7, 0xf8, 0x48, 0x73, 
+	0x5d, 0x00, 0x99, 0x05, 0x42, 0x88, 0xd1, 0x0e, 
+	0x20, 0x01, 0x40, 0xa0, 0x43, 0xc0, 0x49, 0x70, 
+	0x68, 0x09, 0x40, 0x08, 0x49, 0x6e, 0x60, 0x08, 
+	0x20, 0x00, 0x00, 0xa1, 0x4a, 0x6d, 0x50, 0x50, 
+	0x20, 0xff, 0x49, 0x6a, 0x55, 0x08, 0xe7, 0xe6, 
+	0xe0, 0x33, 0x4a, 0x6b, 0x92, 0x03, 0x7e, 0x38, 
+	0x1c, 0x06, 0x28, 0xff, 0xd0, 0x14, 0x20, 0x00, 
+	0x00, 0xb1, 0x4a, 0x68, 0x50, 0x50, 0x20, 0x01, 
+	0x40, 0xb0, 0x43, 0xc0, 0x49, 0x66, 0x68, 0x09, 
+	0x40, 0x08, 0x49, 0x65, 0x60, 0x08, 0x20, 0xff, 
+	0x76, 0x38, 0x21, 0xff, 0x48, 0x63, 0x55, 0x81, 
+	0x21, 0x00, 0x00, 0xb0, 0x9a, 0x03, 0x50, 0x11, 
+	0x7e, 0x78, 0x1c, 0x06, 0x28, 0xff, 0xd0, 0x14, 
+	0x21, 0x00, 0x00, 0xb0, 0x4a, 0x5b, 0x50, 0x11, 
+	0x20, 0x01, 0x40, 0xb0, 0x43, 0xc0, 0x49, 0x5a, 
+	0x68, 0x09, 0x40, 0x08, 0x49, 0x58, 0x60, 0x08, 
+	0x20, 0xff, 0x76, 0x78, 0x20, 0xff, 0x49, 0x51, 
+	0x55, 0x88, 0x21, 0x00, 0x00, 0xb0, 0x9a, 0x03, 
+	0x50, 0x11, 0x20, 0x00, 0x99, 0x05, 0x00, 0x89, 
+	0x4a, 0x4b, 0x50, 0x50, 0x24, 0x00, 0x2c, 0x0c, 
+	0xdb, 0x06, 0xe0, 0x09, 0xe0, 0x00, 0xe0, 0x0e, 
+	0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 0xe7, 0xf6, 
+	0x20, 0x00, 0x19, 0x39, 0x73, 0x08, 0xe7, 0xf7, 
+	0x20, 0x00, 0x83, 0x38, 0x20, 0x00, 0x70, 0xf8, 
+	0x20, 0x00, 0xb0, 0x08, 0xe7, 0x66, 0x99, 0x05, 
+	0x00, 0x88, 0x49, 0x3f, 0x58, 0x08, 0x28, 0x00, 
+	0xd0, 0x02, 0x20, 0xb0, 0xb0, 0x08, 0xe7, 0x5d, 
+	0x99, 0x07, 0x29, 0x11, 0xdb, 0x02, 0x99, 0x07, 
+	0x29, 0x13, 0xdd, 0x02, 0x20, 0xb1, 0xb0, 0x08, 
+	0xe7, 0x54, 0x99, 0x09, 0x00, 0x88, 0x1f, 0xc1, 
+	0x39, 0x21, 0x91, 0x01, 0x20, 0xff, 0x30, 0x81, 
+	0x90, 0x00, 0x99, 0x01, 0x98, 0x00, 0x42, 0x81, 
+	0xda, 0x02, 0x20, 0xb5, 0xb0, 0x08, 0xe7, 0x45, 
+	0x9d, 0x08, 0x98, 0x08, 0x30, 0x1c, 0x90, 0x08, 
+	0x98, 0x08, 0x90, 0x04, 0x98, 0x08, 0x30, 0x0c, 
+	0x90, 0x08, 0x98, 0x08, 0x90, 0x02, 0x9a, 0x02, 
+	0x98, 0x04, 0x60, 0x02, 0x99, 0x09, 0x98, 0x04, 
+	0x60, 0x41, 0x20, 0x00, 0x99, 0x04, 0x60, 0x88, 
+	0x20, 0x00, 0x61, 0xa8, 0x1d, 0xe8, 0x30, 0x11, 
+	0x9a, 0x02, 0x99, 0x01, 0xf0, 0x00, 0xf8, 0x56, 
+	0x20, 0x00, 0x70, 0x28, 0x98, 0x06, 0x99, 0x07, 
+	0x43, 0x08, 0x70, 0x68, 0x20, 0x00, 0x70, 0xa8, 
+	0x20, 0x02, 0x70, 0xe8, 0x20, 0x00, 0x71, 0x28, 
+	0x98, 0x04, 0x60, 0xa8, 0x20, 0x00, 0x60, 0xe8, 
+	0x9a, 0x02, 0x61, 0x2a, 0x9a, 0x02, 0x61, 0x6a, 
+	0x99, 0x05, 0x00, 0x88, 0x49, 0x16, 0x50, 0x0d, 
+	0x20, 0x00, 0x60, 0xf8, 0x88, 0x38, 0x4b, 0x1c, 
+	0x40, 0x18, 0x80, 0x38, 0x20, 0x00, 0x60, 0xb8, 
+	0x9a, 0x02, 0x60, 0x7a, 0x98, 0x06, 0x99, 0x07, 
+	0x43, 0x08, 0x70, 0xb8, 0x24, 0x00, 0x2c, 0x0c, 
+	0xdb, 0x04, 0xe0, 0x07, 0x1c, 0x60, 0x06, 0x04, 
+	0x0e, 0x24, 0xe7, 0xf8, 0x20, 0x00, 0x19, 0x39, 
+	0x74, 0x08, 0xe7, 0xf7, 0x20, 0x00, 0x83, 0x38, 
+	0x20, 0x00, 0x70, 0xf8, 0x20, 0xff, 0x76, 0x38, 
+	0x20, 0xff, 0x76, 0x78, 0x20, 0x00, 0xb0, 0x08, 
+	0xe6, 0xec, 0xb0, 0x05, 0xb0, 0x03, 0xe6, 0xe9, 
+	0x2e, 0x08, 0x9b, 0x30, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x2e, 0x08, 0x9d, 0x10, 
+	0x2e, 0x08, 0x9c, 0x48, 0x2e, 0x08, 0x9c, 0x50, 
+	0x9e, 0x00, 0x04, 0xb8, 0x2e, 0x08, 0x9c, 0xd0, 
+	0x2e, 0x08, 0x9c, 0x4c, 0x2e, 0x08, 0x9d, 0x30, 
+	0xff, 0xff, 0xfb, 0xff, 0xb4, 0x90, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x1c, 0x13, 0x21, 0x00, 0x68, 0x22, 
+	0x2a, 0x00, 0xd0, 0x00, 0x60, 0x13, 0x1d, 0xd8, 
+	0x30, 0xb9, 0x60, 0x18, 0x33, 0xc0, 0x31, 0x01, 
+	0x3f, 0xc0, 0x2f, 0xc0, 0xd8, 0xf7, 0x20, 0x00, 
+	0x60, 0x18, 0x60, 0x23, 0x31, 0x01, 0x1c, 0x08, 
+	0xbc, 0x90, 0x47, 0x70, 0xe7, 0xfc, 0xb4, 0x90, 
+	0x1c, 0x03, 0x1c, 0x0a, 0x6b, 0x18, 0x68, 0xd1, 
+	0x68, 0x07, 0x2f, 0x00, 0xd0, 0x0c, 0x68, 0x07, 
+	0x60, 0x0f, 0x68, 0x41, 0x68, 0x57, 0x68, 0x84, 
+	0x19, 0x3f, 0x60, 0x57, 0x27, 0x00, 0x60, 0x07, 
+	0x27, 0x00, 0x60, 0x47, 0x27, 0x00, 0x60, 0x87, 
+	0x6a, 0xc7, 0x2f, 0x00, 0xd0, 0x0c, 0x6a, 0xc7, 
+	0x60, 0x0f, 0x6b, 0x01, 0x68, 0x57, 0x6b, 0x44, 
+	0x19, 0x3f, 0x60, 0x57, 0x27, 0x00, 0x62, 0xc7, 
+	0x27, 0x00, 0x63, 0x07, 0x27, 0x00, 0x63, 0x47, 
+	0x60, 0xd1, 0xbc, 0x90, 0x47, 0x70, 0xe7, 0xfc, 
+	0x20, 0x00, 0x49, 0x01, 0x70, 0x08, 0x47, 0x70, 
+	0x2e, 0x08, 0xb9, 0x80, 0xb5, 0xff, 0xb0, 0x82, 
+	0x9b, 0x05, 0x06, 0x18, 0x16, 0x00, 0x90, 0x00, 
+	0x98, 0x0c, 0x06, 0x01, 0x16, 0x09, 0x91, 0x01, 
+	0x98, 0x00, 0x28, 0x1f, 0xdd, 0x05, 0x20, 0xaf, 
+	0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x48, 0x37, 0x78, 0x00, 0x28, 0x00, 
+	0xd0, 0x03, 0x20, 0xd2, 0xb0, 0x02, 0xe7, 0xf4, 
+	0xe0, 0x64, 0x20, 0xff, 0x49, 0x32, 0x70, 0x08, 
+	0x49, 0x32, 0x98, 0x00, 0xf0, 0x0a, 0xff, 0x04, 
+	0x9a, 0x04, 0x2a, 0x00, 0xd9, 0x52, 0x20, 0xff, 
+	0x49, 0x2f, 0x70, 0x08, 0x9d, 0x02, 0x98, 0x0b, 
+	0x99, 0x01, 0x18, 0x44, 0x99, 0x01, 0x20, 0xc0, 
+	0x1a, 0x40, 0x9a, 0x04, 0x42, 0x90, 0xd9, 0x01, 
+	0x9f, 0x04, 0xe0, 0x02, 0x99, 0x01, 0x20, 0xc0, 
+	0x1a, 0x47, 0x1c, 0x3a, 0x1c, 0x21, 0x1c, 0x28, 
+	0x23, 0xfe, 0xf0, 0x05, 0xfa, 0xa5, 0x1c, 0x06, 
+	0x2e, 0xd0, 0xd1, 0x0a, 0x20, 0x03, 0xf0, 0x04, 
+	0xf9, 0xa9, 0x1c, 0x3a, 0x1c, 0x21, 0x1c, 0x28, 
+	0x23, 0xfe, 0xf0, 0x05, 0xfa, 0x99, 0x1c, 0x06, 
+	0xe7, 0xf2, 0x98, 0x02, 0x19, 0xc0, 0x90, 0x02, 
+	0x9a, 0x04, 0x1b, 0xd2, 0x92, 0x04, 0x9d, 0x0b, 
+	0x9c, 0x03, 0x9b, 0x00, 0x1c, 0x3a, 0x1c, 0x21, 
+	0x1c, 0x28, 0xf0, 0x05, 0xfa, 0x89, 0x1c, 0x06, 
+	0x2e, 0xd0, 0xd1, 0x0a, 0x20, 0x03, 0xf0, 0x04, 
+	0xf9, 0x8d, 0x9b, 0x00, 0x1c, 0x3a, 0x1c, 0x21, 
+	0x1c, 0x28, 0xf0, 0x05, 0xfa, 0x7d, 0x1c, 0x06, 
+	0xe7, 0xf2, 0x99, 0x03, 0x29, 0x20, 0xd3, 0x04, 
+	0x99, 0x01, 0x18, 0x78, 0x99, 0x03, 0x18, 0x41, 
+	0x91, 0x03, 0x48, 0x0b, 0x78, 0x00, 0x28, 0x00, 
+	0xd0, 0x03, 0x20, 0x03, 0xf0, 0x04, 0xf9, 0x76, 
+	0xe7, 0xf7, 0xe7, 0xa9, 0x20, 0x00, 0x49, 0x04, 
+	0x70, 0x08, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0x90, 
+	0xb0, 0x02, 0xe7, 0x8e, 0xe7, 0x8d, 0x00, 0x00, 
+	0x2e, 0x08, 0x20, 0x20, 0x2e, 0x01, 0x8b, 0x35, 
+	0x2e, 0x08, 0xb9, 0x80, 0xb5, 0xff, 0x1c, 0x0f, 
+	0x9a, 0x02, 0x06, 0x14, 0x0e, 0x24, 0x9b, 0x03, 
+	0x06, 0x1d, 0x0e, 0x2d, 0x2c, 0x1f, 0xdb, 0x04, 
+	0x20, 0xb3, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x04, 0x3a, 0x0c, 0x12, 0x2d, 0x01, 
+	0xd1, 0x73, 0x20, 0x01, 0x03, 0x40, 0x40, 0x10, 
+	0xd0, 0x0a, 0x4b, 0x6f, 0x40, 0x1a, 0x48, 0x6f, 
+	0x68, 0x00, 0x68, 0x00, 0x23, 0x02, 0x43, 0xdb, 
+	0x40, 0x18, 0x4b, 0x6c, 0x68, 0x1b, 0x60, 0x18, 
+	0x20, 0x01, 0x02, 0x40, 0x40, 0x10, 0xd0, 0x0a, 
+	0x4b, 0x69, 0x40, 0x1a, 0x48, 0x67, 0x68, 0x00, 
+	0x68, 0x00, 0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 
+	0x4b, 0x64, 0x68, 0x1b, 0x60, 0x18, 0x20, 0x01, 
+	0x05, 0x00, 0x40, 0x38, 0xd0, 0x08, 0x48, 0x63, 
+	0x68, 0x00, 0x69, 0x80, 0x23, 0x01, 0x05, 0x1b, 
+	0x43, 0x18, 0x4b, 0x60, 0x68, 0x1b, 0x61, 0x98, 
+	0x20, 0x01, 0x05, 0x40, 0x40, 0x38, 0xd0, 0x08, 
+	0x48, 0x5c, 0x68, 0x00, 0x69, 0x80, 0x23, 0x01, 
+	0x05, 0x5b, 0x43, 0x18, 0x4b, 0x59, 0x68, 0x1b, 
+	0x61, 0x98, 0x0a, 0x12, 0x48, 0x55, 0x68, 0x00, 
+	0x68, 0x00, 0x43, 0x90, 0x4b, 0x53, 0x68, 0x1b, 
+	0x60, 0x18, 0x48, 0x52, 0x68, 0x00, 0x68, 0x00, 
+	0x4b, 0x53, 0x65, 0x18, 0x48, 0x51, 0x68, 0x00, 
+	0x77, 0x04, 0x20, 0x09, 0x04, 0x80, 0x40, 0x38, 
+	0xd0, 0x35, 0x21, 0x00, 0x29, 0x20, 0xdb, 0x04, 
+	0xe0, 0x31, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
+	0xe7, 0xf8, 0x20, 0x01, 0x40, 0x88, 0x9b, 0x00, 
+	0x40, 0x18, 0xd0, 0x27, 0x20, 0x01, 0x05, 0x40, 
+	0x40, 0x38, 0xd0, 0x0e, 0x00, 0xc8, 0x1a, 0x40, 
+	0x00, 0x80, 0x4b, 0x46, 0x68, 0x1b, 0x5a, 0x18, 
+	0x23, 0xff, 0x33, 0x01, 0x43, 0x18, 0x00, 0xcb, 
+	0x1a, 0x5b, 0x00, 0x9b, 0x4e, 0x41, 0x68, 0x36, 
+	0x52, 0xf0, 0x20, 0x01, 0x04, 0x80, 0x40, 0x38, 
+	0xd0, 0x10, 0x00, 0xc8, 0x1a, 0x40, 0x00, 0x80, 
+	0xe0, 0x00, 0xe0, 0x0d, 0x4b, 0x3b, 0x68, 0x1b, 
+	0x5a, 0x18, 0x23, 0x01, 0x02, 0x5b, 0x43, 0x18, 
+	0x00, 0xcb, 0x1a, 0x5b, 0x00, 0x9b, 0x4e, 0x37, 
+	0x68, 0x36, 0x52, 0xf0, 0xe7, 0xcd, 0xe0, 0x5c, 
+	0x2d, 0x02, 0xd1, 0x5a, 0x0a, 0x12, 0x48, 0x2f, 
+	0x68, 0x00, 0x68, 0x00, 0x43, 0x10, 0x4b, 0x2d, 
+	0x68, 0x1b, 0x60, 0x18, 0x48, 0x2b, 0x68, 0x00, 
+	0x68, 0x00, 0x4b, 0x2d, 0x65, 0x18, 0x20, 0x01, 
+	0x05, 0x00, 0x40, 0x38, 0xd0, 0x07, 0x48, 0x29, 
+	0x68, 0x00, 0x69, 0x80, 0x4b, 0x2a, 0x40, 0x18, 
+	0x4b, 0x26, 0x68, 0x1b, 0x61, 0x98, 0x20, 0x01, 
+	0x05, 0x40, 0x40, 0x38, 0xd0, 0x07, 0x48, 0x23, 
+	0x68, 0x00, 0x69, 0x80, 0x4b, 0x25, 0x40, 0x18, 
+	0x4b, 0x20, 0x68, 0x1b, 0x61, 0x98, 0x21, 0x00, 
+	0x29, 0x20, 0xdb, 0x04, 0xe0, 0x31, 0x1c, 0x48, 
+	0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x20, 0x09, 
+	0x04, 0x80, 0x40, 0x38, 0xd0, 0x28, 0x20, 0x01, 
+	0x40, 0x88, 0x9b, 0x00, 0x40, 0x18, 0xd0, 0x23, 
+	0x20, 0x01, 0x05, 0x40, 0x40, 0x38, 0xd0, 0x0d, 
+	0x00, 0xc8, 0x1a, 0x40, 0x00, 0x80, 0x4b, 0x15, 
+	0x68, 0x1b, 0x5a, 0x18, 0x4b, 0x16, 0x40, 0x18, 
+	0x00, 0xcb, 0x1a, 0x5b, 0x00, 0x9b, 0x4e, 0x11, 
+	0x68, 0x36, 0x52, 0xf0, 0x20, 0x01, 0x04, 0x80, 
+	0x40, 0x38, 0xd0, 0x0d, 0x00, 0xc8, 0x1a, 0x40, 
+	0x00, 0x80, 0x4b, 0x0c, 0x68, 0x1b, 0x5a, 0x18, 
+	0x4b, 0x05, 0x40, 0x18, 0x00, 0xcb, 0x1a, 0x5b, 
+	0x00, 0x9b, 0x4e, 0x08, 0x68, 0x36, 0x52, 0xf0, 
+	0xe7, 0xcd, 0x20, 0x00, 0xe7, 0x15, 0xe7, 0x14, 
+	0xff, 0xff, 0xfd, 0xff, 0x2e, 0x08, 0xb9, 0x84, 
+	0xff, 0xff, 0xdf, 0xff, 0x2e, 0x08, 0x9b, 0x78, 
+	0x66, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x9b, 0x30, 
+	0xff, 0xef, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 
+	0xff, 0xff, 0xfe, 0xff, 0xb5, 0x80, 0x1c, 0x07, 
+	0x48, 0x17, 0x68, 0x01, 0x20, 0x00, 0xf0, 0x13, 
+	0xfc, 0xa3, 0x60, 0x38, 0x48, 0x14, 0x68, 0x00, 
+	0x1d, 0x01, 0x20, 0x00, 0xf0, 0x13, 0xfc, 0x9c, 
+	0x60, 0x78, 0x48, 0x11, 0x68, 0x00, 0x1d, 0xc1, 
+	0x31, 0x05, 0x20, 0x00, 0xf0, 0x13, 0xfc, 0x94, 
+	0x60, 0xf8, 0x48, 0x0d, 0x68, 0x00, 0x1d, 0xc1, 
+	0x31, 0x09, 0x20, 0x00, 0xf0, 0x13, 0xfc, 0x8c, 
+	0x61, 0x38, 0x48, 0x09, 0x68, 0x00, 0x1d, 0xc1, 
+	0x31, 0x0d, 0x20, 0x00, 0xf0, 0x13, 0xfc, 0x84, 
+	0x61, 0x78, 0x48, 0x05, 0x68, 0x00, 0x1d, 0xc1, 
+	0x31, 0x01, 0x20, 0x00, 0xf0, 0x13, 0xfc, 0x7c, 
+	0x60, 0xb8, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x9b, 0x78, 0xb5, 0xf0, 0x1c, 0x07, 
+	0xb0, 0x82, 0x26, 0x00, 0x89, 0xb8, 0x23, 0x08, 
+	0x40, 0x18, 0xd0, 0x08, 0x48, 0x59, 0x6e, 0xc2, 
+	0x48, 0x58, 0x6f, 0x01, 0x48, 0x57, 0x6a, 0x00, 
+	0xf7, 0xfd, 0xff, 0x5c, 0x1c, 0x06, 0x89, 0xb8, 
+	0x23, 0x10, 0x40, 0x18, 0xd0, 0x02, 0x48, 0x53, 
+	0x69, 0x40, 0x1c, 0x06, 0x89, 0xb8, 0x07, 0xc0, 
+	0x0f, 0xc0, 0xd0, 0x21, 0x48, 0x50, 0x68, 0xc0, 
+	0x90, 0x00, 0x68, 0x78, 0x02, 0x40, 0x99, 0x00, 
+	0x1a, 0x08, 0x90, 0x01, 0x98, 0x01, 0x21, 0x33, 
+	0x06, 0x49, 0x65, 0xc8, 0x98, 0x00, 0x21, 0x33, 
+	0x06, 0x49, 0x66, 0x08, 0x98, 0x01, 0x49, 0x48, 
+	0x60, 0x88, 0x98, 0x00, 0x49, 0x46, 0x60, 0xc8, 
+	0x20, 0x01, 0x21, 0x33, 0x06, 0x49, 0x66, 0xc8, 
+	0x20, 0x00, 0x21, 0x33, 0x06, 0x49, 0x66, 0xc8, 
+	0x89, 0xb8, 0x23, 0x02, 0x43, 0x18, 0x81, 0xb8, 
+	0x89, 0xb8, 0x23, 0x02, 0x40, 0x18, 0xd0, 0x3e, 
+	0x48, 0x3d, 0x68, 0x80, 0x1f, 0xc4, 0x3c, 0xff, 
+	0x3c, 0xfa, 0x68, 0x38, 0x02, 0x40, 0x1a, 0x25, 
+	0x48, 0x38, 0x60, 0x45, 0x48, 0x37, 0x60, 0x84, 
+	0x20, 0x33, 0x06, 0x40, 0x65, 0x45, 0x20, 0x33, 
+	0x06, 0x40, 0x65, 0x84, 0x1b, 0x60, 0x38, 0xc0, 
+	0x21, 0x33, 0x06, 0x49, 0x66, 0x88, 0x21, 0x00, 
+	0x48, 0x32, 0xf7, 0xfd, 0xfb, 0x89, 0x48, 0x32, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x00, 0xe7, 0xfa, 
+	0x48, 0x30, 0x68, 0x01, 0x23, 0xff, 0x33, 0x01, 
+	0x43, 0x19, 0x60, 0x01, 0x48, 0x2e, 0x6d, 0x80, 
+	0x49, 0x2d, 0x65, 0x88, 0x48, 0x2c, 0x6b, 0xc0, 
+	0x23, 0x01, 0x07, 0x9b, 0x40, 0x18, 0xd0, 0x00, 
+	0xe7, 0xf8, 0x20, 0x33, 0x06, 0x40, 0x66, 0x45, 
+	0x20, 0x33, 0x06, 0x40, 0x66, 0x84, 0x21, 0x00, 
+	0x20, 0xff, 0xf7, 0xfd, 0xfb, 0x69, 0x48, 0x20, 
+	0x60, 0x05, 0x48, 0x1f, 0x60, 0x44, 0x89, 0xb8, 
+	0x23, 0x04, 0x40, 0x18, 0xd0, 0x21, 0x68, 0xb8, 
+	0x28, 0x00, 0xd1, 0x06, 0x48, 0x1f, 0x68, 0x01, 
+	0x23, 0x02, 0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 
+	0xe0, 0x17, 0x69, 0x38, 0x49, 0x1a, 0x65, 0x88, 
+	0x69, 0x38, 0x68, 0xb9, 0x02, 0x49, 0x18, 0x40, 
+	0x49, 0x17, 0x65, 0xc8, 0x20, 0x03, 0x02, 0x00, 
+	0x49, 0x15, 0x67, 0x48, 0x20, 0x02, 0x49, 0x14, 
+	0x67, 0x88, 0x20, 0x40, 0x49, 0x12, 0x66, 0x08, 
+	0x48, 0x12, 0x68, 0x01, 0x23, 0x02, 0x43, 0x19, 
+	0x60, 0x01, 0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 
+	0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x60, 0x38, 
+	0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 0x23, 0x0d, 
+	0x06, 0x9b, 0x1a, 0xc0, 0x60, 0x78, 0x48, 0x0a, 
+	0x43, 0x30, 0x60, 0xb8, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xcc, 0x00, 0x0f, 0x80, 
+	0x2e, 0x08, 0xb9, 0x88, 0x00, 0x00, 0x80, 0x0f, 
+	0xcc, 0x00, 0x05, 0x00, 0x66, 0x00, 0x00, 0xe0, 
+	0x66, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0xf0, 
+	0xcc, 0x00, 0x00, 0x00, 0xb5, 0xf3, 0x1c, 0x02, 
+	0xb0, 0x81, 0x68, 0x93, 0x68, 0x54, 0x21, 0x00, 
+	0x1d, 0xd8, 0x30, 0xb9, 0x1b, 0x00, 0x06, 0x05, 
+	0x0e, 0x2d, 0x2d, 0x12, 0xda, 0x12, 0x21, 0x00, 
+	0x42, 0xa9, 0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x48, 
+	0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x78, 0x26, 
+	0x34, 0x01, 0x98, 0x02, 0x54, 0x46, 0xe7, 0xf6, 
+	0x68, 0x1b, 0x1d, 0x18, 0x90, 0x00, 0x98, 0x00, 
+	0x78, 0x80, 0x18, 0xc4, 0x1c, 0x0f, 0x2f, 0x12, 
+	0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x78, 0x06, 0x07, 
+	0x0e, 0x3f, 0xe7, 0xf8, 0x78, 0x26, 0x34, 0x01, 
+	0x98, 0x02, 0x55, 0xc6, 0xe7, 0xf6, 0x20, 0x00, 
+	0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 0xb4, 0xf0, 
+	0x1c, 0x07, 0x1c, 0x0d, 0x1c, 0x14, 0xb0, 0x82, 
+	0x20, 0x00, 0x70, 0x20, 0x78, 0x78, 0x23, 0x80, 
+	0x40, 0x18, 0xd0, 0x03, 0x20, 0xb1, 0xb0, 0x02, 
+	0xbc, 0xf0, 0x47, 0x70, 0x78, 0xba, 0x20, 0x40, 
+	0x40, 0x10, 0xd0, 0x2a, 0x07, 0x12, 0x0f, 0x12, 
+	0x07, 0xd0, 0x0f, 0xc0, 0xd0, 0x25, 0x20, 0x40, 
+	0x70, 0x20, 0x35, 0x0a, 0x21, 0x00, 0x1d, 0xf8, 
+	0x30, 0x0d, 0x90, 0x01, 0x1d, 0xf8, 0x30, 0x1d, 
+	0x90, 0x00, 0x21, 0x00, 0x29, 0x08, 0xdb, 0x04, 
+	0xe0, 0x14, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
+	0xe7, 0xf8, 0x78, 0x2e, 0x35, 0x01, 0x98, 0x00, 
+	0x78, 0x03, 0x30, 0x01, 0x90, 0x00, 0x40, 0x33, 
+	0x98, 0x01, 0x78, 0x06, 0x30, 0x01, 0x90, 0x01, 
+	0x42, 0xb3, 0xd0, 0x02, 0x20, 0x00, 0x70, 0x20, 
+	0xe0, 0x00, 0xe7, 0xea, 0x20, 0x00, 0xb0, 0x02, 
+	0xe7, 0xce, 0x20, 0xb1, 0xb0, 0x02, 0xe7, 0xcb, 
+	0xb0, 0x02, 0xe7, 0xc9, 0xb5, 0xf7, 0x1c, 0x07, 
+	0xb0, 0x8d, 0x20, 0x00, 0x9a, 0x0f, 0x70, 0x10, 
+	0x78, 0x78, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x05, 
+	0x20, 0xb1, 0xb0, 0x0d, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x78, 0xb8, 0x90, 0x05, 
+	0x98, 0x05, 0x23, 0x40, 0x40, 0x18, 0xd0, 0x73, 
+	0x98, 0x05, 0x07, 0x00, 0x0f, 0x00, 0x90, 0x05, 
+	0x98, 0x05, 0x23, 0x02, 0x40, 0x18, 0xd1, 0x03, 
+	0x98, 0x05, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x68, 
+	0x99, 0x0e, 0x79, 0x48, 0x23, 0x3e, 0x40, 0x18, 
+	0x90, 0x0c, 0x78, 0xf8, 0x90, 0x04, 0x98, 0x04, 
+	0x01, 0x00, 0x4b, 0x81, 0x18, 0xc0, 0x90, 0x02, 
+	0x98, 0x02, 0x68, 0x00, 0x90, 0x01, 0x78, 0x7c, 
+	0x23, 0xbf, 0x40, 0x1c, 0x23, 0xfe, 0x40, 0x1c, 
+	0x20, 0x00, 0x90, 0x03, 0x98, 0x01, 0x06, 0x00, 
+	0x0e, 0x00, 0x99, 0x0c, 0x42, 0x88, 0xd0, 0x08, 
+	0x06, 0x20, 0x0e, 0x00, 0x24, 0x01, 0x43, 0x04, 
+	0x20, 0x01, 0x90, 0x03, 0x23, 0xdf, 0x40, 0x1c, 
+	0xe0, 0x06, 0x20, 0x02, 0x40, 0x20, 0xd0, 0x03, 
+	0x70, 0x7c, 0x20, 0x00, 0xb0, 0x0d, 0xe7, 0xbd, 
+	0x23, 0xfd, 0x40, 0x1c, 0x98, 0x05, 0x23, 0x04, 
+	0x40, 0x18, 0xd0, 0x73, 0x6a, 0xfd, 0x98, 0x03, 
+	0x28, 0x00, 0xd0, 0x14, 0x26, 0x00, 0x2e, 0x08, 
+	0xdb, 0x04, 0xe0, 0x0e, 0x1c, 0x70, 0x06, 0x06, 
+	0x0e, 0x36, 0xe7, 0xf8, 0x00, 0xb0, 0x19, 0x40, 
+	0x68, 0x40, 0x00, 0xb1, 0x19, 0x49, 0x64, 0x48, 
+	0x20, 0x00, 0x00, 0xb1, 0x19, 0x49, 0x62, 0x48, 
+	0xe7, 0xf0, 0x88, 0x28, 0x80, 0x68, 0x20, 0x20, 
+	0x40, 0x20, 0xd1, 0x3e, 0x99, 0x0e, 0x79, 0xc8, 
+	0x09, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x0a, 
+	0x99, 0x0e, 0x79, 0xc8, 0x06, 0xc0, 0x0e, 0xc0, 
+	0x90, 0x09, 0x98, 0x0a, 0x30, 0x01, 0x06, 0x06, 
+	0x0e, 0x36, 0x2e, 0x08, 0xdb, 0x04, 0xe0, 0x10, 
+	0x1c, 0x70, 0x06, 0x06, 0x0e, 0x36, 0xe7, 0xf8, 
+	0x20, 0x00, 0x00, 0xb1, 0x19, 0x49, 0xe0, 0x01, 
+	0xe0, 0x9d, 0xe0, 0x9c, 0x64, 0x48, 0x88, 0x68, 
+	0x21, 0x80, 0x41, 0x31, 0x43, 0x88, 0x80, 0x68, 
+	0xe7, 0xee, 0x98, 0x0a, 0x00, 0x80, 0x19, 0x40, 
+	0x6c, 0x41, 0x98, 0x09, 0x00, 0x80, 0x4a, 0x4b, 
+	0x58, 0x10, 0x40, 0x08, 0x99, 0x0a, 0x00, 0x89, 
+	0x19, 0x49, 0x64, 0x48, 0x06, 0x20, 0x0e, 0x00, 
+	0x24, 0x20, 0x43, 0x04, 0x98, 0x01, 0x0a, 0x00, 
+	0x02, 0x00, 0x90, 0x01, 0x98, 0x01, 0x99, 0x0c, 
+	0x43, 0x08, 0x90, 0x01, 0x98, 0x01, 0x99, 0x02, 
+	0x60, 0x08, 0x78, 0x38, 0x23, 0x80, 0x40, 0x18, 
+	0xd0, 0x19, 0x99, 0x0e, 0x7b, 0x08, 0x07, 0x42, 
+	0x0f, 0x52, 0x92, 0x07, 0x99, 0x0e, 0x7b, 0x08, 
+	0x08, 0xc0, 0x06, 0x02, 0x0e, 0x12, 0x92, 0x08, 
+	0x1d, 0xe9, 0x31, 0x3d, 0x91, 0x06, 0x99, 0x06, 
+	0x9a, 0x08, 0x5c, 0x88, 0x49, 0x36, 0x9a, 0x07, 
+	0x5c, 0x89, 0xe0, 0x00, 0xe0, 0x4e, 0x40, 0x08, 
+	0x99, 0x06, 0x9a, 0x08, 0x54, 0x88, 0x99, 0x0e, 
+	0x79, 0x88, 0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x00, 
+	0x98, 0x00, 0x49, 0x30, 0x40, 0xc1, 0x91, 0x00, 
+	0x99, 0x0e, 0x79, 0x88, 0x09, 0x40, 0x06, 0x02, 
+	0x0e, 0x12, 0x92, 0x0b, 0x9a, 0x0b, 0x00, 0x90, 
+	0x19, 0x40, 0x6c, 0x40, 0x99, 0x00, 0x40, 0x08, 
+	0xd0, 0x33, 0x06, 0x20, 0x0e, 0x00, 0x24, 0x40, 
+	0x43, 0x04, 0x9a, 0x0b, 0x00, 0x90, 0x19, 0x40, 
+	0x6c, 0x40, 0x99, 0x00, 0x40, 0x41, 0x00, 0x90, 
+	0x19, 0x40, 0x64, 0x41, 0x9a, 0x0b, 0x00, 0x90, 
+	0x19, 0x40, 0x6a, 0x40, 0x99, 0x00, 0x43, 0x01, 
+	0x00, 0x90, 0x19, 0x40, 0x62, 0x41, 0x9a, 0x0b, 
+	0x00, 0x90, 0x19, 0x40, 0x6c, 0x40, 0x28, 0x00, 
+	0xd1, 0x17, 0x88, 0x68, 0x9a, 0x0b, 0x21, 0x80, 
+	0x41, 0x11, 0x43, 0x88, 0x80, 0x68, 0x88, 0x68, 
+	0x28, 0x00, 0xd1, 0x0e, 0x06, 0x20, 0x0e, 0x00, 
+	0x24, 0x02, 0x43, 0x04, 0x23, 0xfe, 0x40, 0x1c, 
+	0x98, 0x0c, 0x30, 0x02, 0x06, 0x00, 0x0e, 0x00, 
+	0x90, 0x0c, 0x98, 0x0c, 0x23, 0x3e, 0x40, 0x18, 
+	0x90, 0x0c, 0xe0, 0x0a, 0x06, 0x20, 0x0e, 0x00, 
+	0x24, 0x40, 0x43, 0x04, 0x23, 0xfe, 0x40, 0x1c, 
+	0x98, 0x0c, 0x1c, 0x41, 0x98, 0x04, 0xf0, 0x00, 
+	0xf8, 0x13, 0x9a, 0x0f, 0x70, 0x14, 0x70, 0x7c, 
+	0x20, 0x00, 0xb0, 0x0d, 0xe6, 0xe2, 0x20, 0xb1, 
+	0xb0, 0x0d, 0xe6, 0xdf, 0xb0, 0x0d, 0xe6, 0xdd, 
+	0x64, 0x00, 0x08, 0x00, 0x2e, 0x08, 0x20, 0x90, 
+	0x2e, 0x08, 0x21, 0x10, 0x80, 0x00, 0x00, 0x00, 
+	0xb5, 0xf3, 0x98, 0x00, 0x06, 0x07, 0x0e, 0x3f, 
+	0x99, 0x01, 0x06, 0x0e, 0x0e, 0x36, 0x00, 0xf8, 
+	0x4b, 0x13, 0x18, 0xc5, 0x01, 0x38, 0x4b, 0x13, 
+	0x18, 0xc4, 0x01, 0x38, 0x4b, 0x12, 0x18, 0xc2, 
+	0x68, 0x10, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x18, 
+	0x60, 0x10, 0x2e, 0x3e, 0xdc, 0x15, 0x68, 0x20, 
+	0x1c, 0x01, 0x0a, 0x09, 0x02, 0x09, 0x43, 0x31, 
+	0x60, 0x21, 0x68, 0x28, 0x1c, 0x01, 0x0a, 0x09, 
+	0x02, 0x09, 0x23, 0x3e, 0x43, 0x19, 0x60, 0x29, 
+	0x68, 0x10, 0x23, 0x40, 0x43, 0x18, 0x60, 0x10, 
+	0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0xbd, 0xe7, 0xf9, 0xe7, 0xf8, 
+	0x64, 0x00, 0x10, 0x00, 0x64, 0x00, 0x08, 0x00, 
+	0x64, 0x00, 0x08, 0x08, 0xb5, 0xf3, 0xb0, 0x93, 
+	0x98, 0x13, 0x69, 0x00, 0x90, 0x01, 0x98, 0x01, 
+	0x78, 0x40, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x05, 
+	0x20, 0xbe, 0xb0, 0x13, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x98, 0x01, 0x78, 0x80, 
+	0x90, 0x08, 0x98, 0x08, 0x23, 0x40, 0x40, 0x18, 
+	0xd0, 0x73, 0x98, 0x08, 0x23, 0x20, 0x40, 0x18, 
+	0xd0, 0x6f, 0x98, 0x01, 0x6b, 0x07, 0x98, 0x01, 
+	0x79, 0xc0, 0x00, 0x80, 0x49, 0x76, 0x58, 0x08, 
+	0x90, 0x00, 0x98, 0x00, 0x68, 0xc0, 0x1c, 0x06, 
+	0xd1, 0x02, 0x20, 0xb6, 0xb0, 0x13, 0xe7, 0xe1, 
+	0x78, 0xb0, 0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x02, 
+	0x20, 0xb6, 0xb0, 0x13, 0xe7, 0xda, 0xa9, 0x11, 
+	0x1c, 0x30, 0xf0, 0x00, 0xf9, 0x2b, 0x90, 0x02, 
+	0x98, 0x11, 0x28, 0x00, 0xd1, 0x02, 0x98, 0x02, 
+	0xb0, 0x13, 0xe7, 0xcf, 0x98, 0x11, 0x90, 0x0e, 
+	0x20, 0x01, 0x90, 0x0b, 0x98, 0x13, 0x88, 0x40, 
+	0x90, 0x0d, 0x98, 0x13, 0x68, 0x40, 0x90, 0x06, 
+	0x98, 0x13, 0x68, 0x81, 0x91, 0x10, 0x99, 0x10, 
+	0x1d, 0xc8, 0x30, 0xb9, 0x90, 0x05, 0x98, 0x05, 
+	0x99, 0x06, 0x1a, 0x40, 0x04, 0x04, 0x0c, 0x24, 
+	0x99, 0x14, 0x79, 0x88, 0x90, 0x03, 0x98, 0x03, 
+	0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x0a, 0x98, 0x0a, 
+	0x49, 0x5a, 0x40, 0xc1, 0x91, 0x0a, 0x98, 0x03, 
+	0x09, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x09, 
+	0x98, 0x09, 0x00, 0x80, 0x19, 0xc0, 0x6b, 0x80, 
+	0x99, 0x0a, 0x40, 0x08, 0xd0, 0x02, 0x20, 0xb1, 
+	0xb0, 0x13, 0xe7, 0x9f, 0x20, 0xb8, 0x90, 0x0c, 
+	0x98, 0x11, 0x30, 0x08, 0x90, 0x04, 0x20, 0x00, 
+	0x90, 0x07, 0x98, 0x07, 0x28, 0x00, 0xd0, 0x10, 
+	0x99, 0x10, 0x68, 0x09, 0x91, 0x10, 0x99, 0x10, 
+	0x1d, 0x08, 0x90, 0x12, 0x98, 0x12, 0x78, 0x80, 
+	0x99, 0x10, 0x18, 0x40, 0x90, 0x06, 0x98, 0x12, 
+	0x78, 0x81, 0x20, 0xc0, 0x1a, 0x40, 0x04, 0x04, 
+	0x0c, 0x24, 0x98, 0x0d, 0x42, 0x84, 0xdb, 0x05, 
+	0xe0, 0x00, 0xe0, 0x7c, 0x9c, 0x0d, 0x20, 0x00, 
+	0x90, 0x0d, 0xe0, 0x06, 0x98, 0x0d, 0x1b, 0x00, 
+	0x04, 0x00, 0x0c, 0x00, 0x90, 0x0d, 0x20, 0x01, 
+	0x90, 0x07, 0x98, 0x0c, 0x42, 0xa0, 0xda, 0x2e, 
+	0x25, 0x00, 0x98, 0x0c, 0x42, 0x85, 0xdb, 0x04, 
+	0xe0, 0x0c, 0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 
+	0xe7, 0xf7, 0x98, 0x06, 0x78, 0x01, 0x30, 0x01, 
+	0x90, 0x06, 0x98, 0x04, 0x70, 0x01, 0x30, 0x01, 
+	0x90, 0x04, 0xe7, 0xf2, 0x98, 0x0c, 0x1a, 0x20, 
+	0x04, 0x04, 0x0c, 0x24, 0xa9, 0x11, 0x1c, 0x30, 
+	0xf0, 0x00, 0xf8, 0xac, 0x90, 0x02, 0x98, 0x11, 
+	0x28, 0x00, 0xd1, 0x08, 0x98, 0x0e, 0x60, 0xb0, 
+	0x68, 0x70, 0x99, 0x0b, 0x18, 0x40, 0x60, 0x70, 
+	0x98, 0x02, 0xb0, 0x13, 0xe7, 0x4a, 0x98, 0x0b, 
+	0x30, 0x01, 0x90, 0x0b, 0x20, 0xb8, 0x90, 0x0c, 
+	0x98, 0x11, 0x30, 0x08, 0x90, 0x04, 0x25, 0x00, 
+	0x42, 0xa5, 0xdb, 0x04, 0xe0, 0x0c, 0x1c, 0x68, 
+	0x06, 0x05, 0x0e, 0x2d, 0xe7, 0xf8, 0x98, 0x06, 
+	0x78, 0x01, 0x30, 0x01, 0x90, 0x06, 0x98, 0x04, 
+	0x70, 0x01, 0x30, 0x01, 0x90, 0x04, 0xe7, 0xf2, 
+	0x98, 0x0c, 0x1b, 0x00, 0x04, 0x00, 0x0c, 0x00, 
+	0x90, 0x0c, 0x98, 0x0d, 0x28, 0x00, 0xd1, 0x90, 
+	0x6b, 0x39, 0x91, 0x0f, 0x6a, 0xf8, 0x28, 0x00, 
+	0xd1, 0x02, 0x98, 0x0e, 0x62, 0xf8, 0xe0, 0x05, 
+	0x98, 0x0e, 0x99, 0x0f, 0x60, 0x08, 0x98, 0x0e, 
+	0x6d, 0xb9, 0x60, 0x08, 0x98, 0x09, 0x00, 0x80, 
+	0x19, 0xc0, 0x6b, 0x80, 0x99, 0x0a, 0x43, 0x01, 
+	0x98, 0x09, 0x00, 0x80, 0x19, 0xc0, 0x63, 0x81, 
+	0x6b, 0x78, 0x99, 0x0b, 0x18, 0x40, 0x63, 0x78, 
+	0x20, 0x00, 0x99, 0x11, 0x60, 0x08, 0x98, 0x11, 
+	0x63, 0x38, 0x98, 0x0e, 0x30, 0x04, 0x65, 0xb8, 
+	0x98, 0x02, 0xb0, 0x13, 0xe7, 0x02, 0x20, 0xb1, 
+	0xb0, 0x13, 0xe6, 0xff, 0xb0, 0x13, 0xe6, 0xfd, 
+	0x2e, 0x08, 0x9b, 0xc8, 0x80, 0x00, 0x00, 0x00, 
+	0xb4, 0xf0, 0x1c, 0x01, 0x78, 0x88, 0x23, 0x20, 
+	0x40, 0x18, 0xd0, 0x42, 0x79, 0xc8, 0x00, 0x80, 
+	0x4b, 0x21, 0x58, 0x1d, 0x6b, 0x0a, 0x68, 0xef, 
+	0x68, 0x10, 0x28, 0x00, 0xd0, 0x17, 0x68, 0xfe, 
+	0x68, 0x10, 0x60, 0x30, 0x68, 0x50, 0x60, 0xf8, 
+	0x68, 0x78, 0x68, 0x93, 0x18, 0xc0, 0x60, 0x78, 
+	0x20, 0x00, 0x60, 0x10, 0x20, 0x00, 0x60, 0x50, 
+	0x20, 0x00, 0x60, 0x90, 0x68, 0x78, 0x78, 0x3b, 
+	0x42, 0x98, 0xd9, 0x04, 0x78, 0xb8, 0x23, 0x02, 
+	0x43, 0xdb, 0x40, 0x18, 0x70, 0xb8, 0x6a, 0xd0, 
+	0x60, 0x10, 0x6b, 0x10, 0x60, 0x50, 0x6b, 0x50, 
+	0x60, 0x90, 0x24, 0x00, 0x2c, 0x08, 0xdb, 0x04, 
+	0xe0, 0x0e, 0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 
+	0xe7, 0xf8, 0x00, 0xa0, 0x18, 0x80, 0x6b, 0x80, 
+	0x00, 0xa3, 0x18, 0x9b, 0x60, 0xd8, 0x23, 0x00, 
+	0x00, 0xa0, 0x18, 0x80, 0x63, 0x83, 0xe7, 0xf0, 
+	0x20, 0x00, 0x62, 0xd0, 0x20, 0x00, 0x63, 0x10, 
+	0x20, 0x00, 0x63, 0x50, 0x20, 0x00, 0xbc, 0xf0, 
+	0x47, 0x70, 0x20, 0xb1, 0xe7, 0xfb, 0xe7, 0xfa, 
+	0x2e, 0x08, 0x9b, 0xc8, 0xb4, 0x90, 0x1c, 0x02, 
+	0x1c, 0x0f, 0x78, 0x14, 0x68, 0x90, 0x1c, 0x01, 
+	0xd1, 0x08, 0x20, 0x00, 0x60, 0x38, 0x78, 0x90, 
+	0x23, 0x01, 0x43, 0x18, 0x70, 0x90, 0x20, 0xb7, 
+	0xbc, 0x90, 0x47, 0x70, 0x68, 0x08, 0x60, 0x90, 
+	0x20, 0x00, 0x60, 0x48, 0x60, 0x39, 0x68, 0x50, 
+	0x38, 0x01, 0x60, 0x50, 0x68, 0x50, 0x42, 0xa0, 
+	0xd1, 0x02, 0x20, 0xbf, 0xe7, 0xf0, 0xe0, 0x01, 
+	0x20, 0x00, 0xe7, 0xed, 0xe7, 0xec, 0x00, 0x00, 
+	0x1c, 0x01, 0x22, 0x00, 0x6a, 0x50, 0x68, 0x02, 
+	0x60, 0x0a, 0x4a, 0x05, 0x6f, 0xd2, 0x60, 0x8a, 
+	0x4a, 0x04, 0x68, 0x12, 0x60, 0x4a, 0x22, 0x1d, 
+	0x02, 0x92, 0x68, 0x12, 0x60, 0xca, 0x47, 0x70, 
+	0xcc, 0x00, 0x0f, 0x80, 0x2e, 0x08, 0x20, 0x24, 
+	0x1c, 0x01, 0x48, 0x02, 0x60, 0x01, 0x20, 0x00, 
+	0x47, 0x70, 0xe7, 0xfd, 0x66, 0x00, 0x01, 0x00, 
+	0x1c, 0x01, 0x20, 0x33, 0x06, 0x40, 0x62, 0x01, 
+	0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 
+	0x20, 0x33, 0x06, 0x40, 0x6a, 0xc0, 0x23, 0x7f, 
+	0x03, 0x9b, 0x40, 0x18, 0x03, 0x8a, 0x43, 0x10, 
+	0x22, 0x33, 0x06, 0x52, 0x62, 0xd0, 0x20, 0x00, 
+	0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 0x20, 0x33, 
+	0x06, 0x40, 0x6a, 0xc0, 0x23, 0x03, 0x03, 0x1b, 
+	0x40, 0x18, 0x43, 0x08, 0x22, 0x33, 0x06, 0x52, 
+	0x62, 0xd0, 0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 
+	0x1c, 0x01, 0x06, 0x0a, 0x0e, 0x12, 0x2a, 0x00, 
+	0xd0, 0x06, 0x20, 0x33, 0x06, 0x40, 0x6a, 0xc0, 
+	0x23, 0x01, 0x05, 0x5b, 0x43, 0x18, 0xe0, 0x04, 
+	0x20, 0x33, 0x06, 0x40, 0x6a, 0xc0, 0x4b, 0x04, 
+	0x40, 0x18, 0x23, 0x33, 0x06, 0x5b, 0x62, 0xd8, 
+	0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x00, 0x00, 
+	0xff, 0xdf, 0xff, 0xff, 0x48, 0x04, 0x69, 0x80, 
+	0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x01, 0x20, 0xff, 
+	0x47, 0x70, 0x20, 0x00, 0xe7, 0xfc, 0xe7, 0xfb, 
+	0x66, 0x00, 0x00, 0x80, 0xb4, 0x80, 0x1c, 0x01, 
+	0x06, 0x0f, 0x0e, 0x3f, 0x4a, 0x08, 0x2f, 0x00, 
+	0xd0, 0x03, 0x68, 0x10, 0x23, 0x01, 0x43, 0x18, 
+	0xe0, 0x02, 0x68, 0x10, 0x08, 0x40, 0x00, 0x40, 
+	0x68, 0x13, 0x43, 0x18, 0x60, 0x10, 0x20, 0x00, 
+	0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x98, 0xb4, 0x80, 0x1c, 0x07, 
+	0x1c, 0x0a, 0x4b, 0x06, 0x40, 0x1a, 0x4b, 0x06, 
+	0x40, 0x1f, 0x0b, 0x10, 0x02, 0x39, 0x43, 0x08, 
+	0x49, 0x04, 0x61, 0xc8, 0x20, 0x00, 0xbc, 0x80, 
+	0x47, 0x70, 0xe7, 0xfc, 0x01, 0xff, 0xf0, 0x00, 
+	0x00, 0xff, 0xf0, 0x00, 0x66, 0x00, 0x00, 0x80, 
+	0x48, 0x01, 0x69, 0xc0, 0x47, 0x70, 0xe7, 0xfd, 
+	0x66, 0x00, 0x00, 0x80, 0x1c, 0x01, 0x48, 0x07, 
+	0x68, 0x02, 0x4b, 0x07, 0x40, 0x1a, 0x60, 0x02, 
+	0x23, 0x01, 0x05, 0x9b, 0x42, 0x99, 0xd1, 0x03, 
+	0x48, 0x02, 0x68, 0x02, 0x43, 0x0a, 0x60, 0x02, 
+	0x47, 0x70, 0x00, 0x00, 0x66, 0x00, 0x00, 0x2c, 
+	0xff, 0xbf, 0xff, 0xff, 0x1c, 0x01, 0x20, 0x33, 
+	0x06, 0x40, 0x67, 0x41, 0x47, 0x70, 0x1c, 0x01, 
+	0x20, 0x33, 0x06, 0x40, 0x67, 0x81, 0x47, 0x70, 
+	0xb5, 0x90, 0x4c, 0x21, 0x20, 0x01, 0x60, 0x20, 
+	0xf0, 0x12, 0xff, 0xa4, 0x48, 0x1f, 0x69, 0x84, 
+	0x27, 0x00, 0x2f, 0x04, 0xd3, 0x04, 0xe0, 0x06, 
+	0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 
+	0x21, 0x00, 0xc4, 0x02, 0xe7, 0xf8, 0x20, 0x00, 
+	0x49, 0x18, 0x69, 0x49, 0x60, 0x08, 0x20, 0x00, 
+	0x49, 0x16, 0x69, 0x49, 0x60, 0x48, 0x20, 0x00, 
+	0x49, 0x14, 0x69, 0x49, 0x60, 0x88, 0x20, 0x00, 
+	0x49, 0x12, 0x69, 0x49, 0x60, 0xc8, 0x20, 0x00, 
+	0x49, 0x10, 0x69, 0x49, 0x61, 0x08, 0x20, 0x00, 
+	0x49, 0x0e, 0x69, 0x49, 0x61, 0x48, 0x20, 0x00, 
+	0x49, 0x0c, 0x69, 0x49, 0x61, 0x88, 0x20, 0x00, 
+	0x49, 0x0a, 0x69, 0x49, 0x61, 0xc8, 0x20, 0x00, 
+	0x49, 0x08, 0x69, 0x49, 0x62, 0x08, 0x20, 0x00, 
+	0x49, 0x06, 0x69, 0x49, 0x62, 0x48, 0x20, 0x18, 
+	0x49, 0x04, 0x69, 0x49, 0x62, 0x88, 0x20, 0x00, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0xe7, 0xfb, 
+	0x70, 0x00, 0x00, 0x38, 0x2e, 0x08, 0x20, 0x28, 
+	0xb5, 0xff, 0x1c, 0x0f, 0xb0, 0x81, 0x9c, 0x01, 
+	0x69, 0x20, 0x28, 0x08, 0xd1, 0x01, 0x08, 0x7f, 
+	0x00, 0x7f, 0x6b, 0xa0, 0x9a, 0x03, 0x43, 0x50, 
+	0x19, 0xc6, 0x69, 0x20, 0x00, 0x80, 0x49, 0x34, 
+	0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x00, 
+	0x08, 0x76, 0x69, 0x20, 0x00, 0x80, 0x49, 0x31, 
+	0x58, 0x08, 0x43, 0x70, 0x90, 0x00, 0x69, 0xa0, 
+	0x99, 0x00, 0x09, 0x49, 0x18, 0x45, 0x6b, 0xe0, 
+	0x28, 0x00, 0xd1, 0x02, 0x03, 0x28, 0x0b, 0x00, 
+	0xe0, 0x01, 0x02, 0x28, 0x0a, 0x00, 0x1c, 0x05, 
+	0xf0, 0x12, 0xff, 0x42, 0xf0, 0x12, 0xff, 0x1e, 
+	0x48, 0x27, 0x69, 0x80, 0x68, 0x00, 0x08, 0xc0, 
+	0x00, 0xc0, 0x49, 0x25, 0x69, 0x89, 0x60, 0x08, 
+	0x07, 0x40, 0x48, 0x23, 0x69, 0x80, 0x68, 0x00, 
+	0x01, 0x40, 0x09, 0x40, 0x49, 0x20, 0x69, 0x89, 
+	0x60, 0x08, 0x6b, 0xe0, 0x49, 0x1e, 0x69, 0x89, 
+	0x68, 0x09, 0x4b, 0x1e, 0x40, 0x19, 0x07, 0xc0, 
+	0x0c, 0x80, 0x43, 0x08, 0x49, 0x1a, 0x69, 0x89, 
+	0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x1c, 0x21, 
+	0x1c, 0x20, 0xf0, 0x00, 0xfe, 0x51, 0x48, 0x16, 
+	0x69, 0xc0, 0x68, 0x00, 0x4b, 0x16, 0x40, 0x18, 
+	0x02, 0x29, 0x0a, 0x09, 0x00, 0x89, 0x43, 0x08, 
+	0x49, 0x11, 0x69, 0xc9, 0x60, 0x08, 0x01, 0x80, 
+	0x48, 0x0f, 0x69, 0xc0, 0x68, 0x00, 0x01, 0x40, 
+	0x09, 0x40, 0x99, 0x00, 0x06, 0xc9, 0x43, 0x08, 
+	0x49, 0x0b, 0x69, 0xc9, 0x60, 0x08, 0x99, 0x04, 
+	0x1c, 0x20, 0x22, 0x00, 0xf0, 0x00, 0xfe, 0xbc, 
+	0xf0, 0x00, 0xff, 0x9d, 0xf0, 0x12, 0xff, 0x14, 
+	0x20, 0x00, 0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 
+	0x2e, 0x03, 0xa8, 0x78, 0x2e, 0x03, 0xa8, 0xc8, 
+	0x2e, 0x08, 0x20, 0x28, 0xff, 0xff, 0xdf, 0xff, 
+	0xfc, 0x00, 0x00, 0x03, 0xb5, 0xff, 0x1c, 0x0f, 
+	0xb0, 0x81, 0x9c, 0x01, 0x69, 0x20, 0x28, 0x08, 
+	0xd1, 0x01, 0x08, 0x7f, 0x00, 0x7f, 0x6b, 0xa0, 
+	0x9a, 0x03, 0x43, 0x50, 0x19, 0xc6, 0x69, 0x20, 
+	0x00, 0x80, 0x49, 0x37, 0x58, 0x08, 0x23, 0x04, 
+	0x40, 0x18, 0xd0, 0x00, 0x08, 0x76, 0x69, 0x20, 
+	0x00, 0x80, 0x49, 0x34, 0x58, 0x08, 0x43, 0x70, 
+	0x90, 0x00, 0x69, 0xa0, 0x99, 0x00, 0x09, 0x49, 
+	0x18, 0x45, 0x6b, 0xe0, 0x28, 0x00, 0xd1, 0x02, 
+	0x03, 0x28, 0x0b, 0x00, 0xe0, 0x01, 0x02, 0x28, 
+	0x0a, 0x00, 0x1c, 0x05, 0xf0, 0x12, 0xfe, 0xc0, 
+	0xf0, 0x12, 0xfe, 0x9c, 0x48, 0x2a, 0x69, 0x80, 
+	0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 0x23, 0x01, 
+	0x43, 0x18, 0x49, 0x27, 0x69, 0x89, 0x60, 0x08, 
+	0x07, 0x40, 0x6b, 0xe0, 0x49, 0x24, 0x69, 0x89, 
+	0x68, 0x09, 0x4b, 0x24, 0x40, 0x19, 0x07, 0xc0, 
+	0x0c, 0x80, 0x43, 0x08, 0x49, 0x20, 0x69, 0x89, 
+	0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x48, 0x1e, 
+	0x69, 0x80, 0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 
+	0x99, 0x00, 0x06, 0xc9, 0x43, 0x01, 0x48, 0x1a, 
+	0x69, 0x80, 0x60, 0x01, 0x1c, 0x21, 0x1c, 0x20, 
+	0xf0, 0x00, 0xfd, 0xca, 0x48, 0x16, 0x69, 0xc0, 
+	0x68, 0x00, 0x4b, 0x17, 0x40, 0x18, 0x02, 0x29, 
+	0x0a, 0x09, 0x00, 0x89, 0x43, 0x08, 0x49, 0x12, 
+	0x69, 0xc9, 0x60, 0x08, 0x01, 0x80, 0x48, 0x10, 
+	0x69, 0xc0, 0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 
+	0x49, 0x0d, 0x69, 0xc9, 0x60, 0x08, 0xf0, 0x00, 
+	0xff, 0x1e, 0xf0, 0x12, 0xfe, 0x73, 0x48, 0x0a, 
+	0x6b, 0x81, 0x1c, 0x20, 0xf0, 0x00, 0xfe, 0xf0, 
+	0x9b, 0x04, 0x60, 0x18, 0xf0, 0x12, 0xfe, 0x8c, 
+	0x20, 0x00, 0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 
+	0x2e, 0x03, 0xa8, 0x78, 0x2e, 0x03, 0xa8, 0xc8, 
+	0x2e, 0x08, 0x20, 0x28, 0xff, 0xff, 0xdf, 0xff, 
+	0xfc, 0x00, 0x00, 0x03, 0xb5, 0xff, 0x1c, 0x0c, 
+	0x1c, 0x1f, 0xb0, 0x83, 0x9d, 0x03, 0x6b, 0x28, 
+	0x6a, 0xa9, 0x1a, 0x40, 0x30, 0x01, 0x90, 0x00, 
+	0x19, 0xe0, 0x99, 0x00, 0x42, 0x88, 0xd9, 0x01, 
+	0x98, 0x00, 0x1b, 0x07, 0x69, 0x28, 0x28, 0x08, 
+	0xd1, 0x02, 0x08, 0x7f, 0x08, 0x64, 0x00, 0x64, 
+	0x6b, 0xa8, 0x9a, 0x05, 0x43, 0x50, 0x19, 0x01, 
+	0x91, 0x01, 0x69, 0x28, 0x00, 0x80, 0x49, 0x38, 
+	0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x02, 
+	0x99, 0x01, 0x08, 0x49, 0x91, 0x01, 0x69, 0x28, 
+	0x00, 0x80, 0x49, 0x34, 0x58, 0x08, 0x99, 0x01, 
+	0x43, 0x48, 0x90, 0x02, 0x69, 0xa8, 0x99, 0x02, 
+	0x09, 0x49, 0x18, 0x46, 0x6b, 0xe8, 0x28, 0x00, 
+	0xd1, 0x02, 0x03, 0x30, 0x0b, 0x00, 0xe0, 0x01, 
+	0x02, 0x30, 0x0a, 0x00, 0x1c, 0x06, 0xf0, 0x12, 
+	0xfe, 0x27, 0xf0, 0x12, 0xfe, 0x03, 0x48, 0x2a, 
+	0x69, 0x80, 0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 
+	0x49, 0x27, 0x69, 0x89, 0x60, 0x08, 0x48, 0x26, 
+	0x69, 0x80, 0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 
+	0x23, 0x02, 0x43, 0x18, 0x49, 0x22, 0x69, 0x89, 
+	0x60, 0x08, 0x07, 0x40, 0x6b, 0xe8, 0x49, 0x20, 
+	0x69, 0x89, 0x68, 0x09, 0x4b, 0x1f, 0x40, 0x19, 
+	0x07, 0xc0, 0x0c, 0x80, 0x43, 0x08, 0x49, 0x1c, 
+	0x69, 0x89, 0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 
+	0x1c, 0x29, 0x1c, 0x28, 0xf0, 0x00, 0xfd, 0x34, 
+	0x48, 0x17, 0x69, 0xc0, 0x68, 0x00, 0x4b, 0x18, 
+	0x40, 0x18, 0x02, 0x31, 0x0a, 0x09, 0x00, 0x89, 
+	0x43, 0x08, 0x49, 0x13, 0x69, 0xc9, 0x60, 0x08, 
+	0x01, 0x80, 0x48, 0x11, 0x69, 0xc0, 0x68, 0x00, 
+	0x01, 0x40, 0x09, 0x40, 0x99, 0x02, 0x06, 0xc9, 
+	0x43, 0x08, 0x49, 0x0d, 0x69, 0xc9, 0x60, 0x08, 
+	0x99, 0x0c, 0x1c, 0x28, 0x22, 0x02, 0xf0, 0x00, 
+	0xfd, 0x9f, 0x48, 0x09, 0x69, 0x40, 0x62, 0x07, 
+	0xf0, 0x00, 0xfe, 0x7d, 0xf0, 0x12, 0xfd, 0xf4, 
+	0x20, 0x00, 0xb0, 0x03, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb0, 0x03, 0xe7, 0xf9, 
+	0x2e, 0x03, 0xa8, 0x78, 0x2e, 0x03, 0xa8, 0xc8, 
+	0x2e, 0x08, 0x20, 0x28, 0xff, 0xff, 0xdf, 0xff, 
+	0xfc, 0x00, 0x00, 0x03, 0xb5, 0xff, 0xb0, 0x81, 
+	0x9f, 0x01, 0x6b, 0x78, 0x6a, 0xf9, 0x1a, 0x40, 
+	0x30, 0x01, 0x90, 0x00, 0x9a, 0x03, 0x9b, 0x04, 
+	0x18, 0xd0, 0x99, 0x00, 0x42, 0x88, 0xd9, 0x03, 
+	0x98, 0x00, 0x9a, 0x03, 0x1a, 0x83, 0x93, 0x04, 
+	0x69, 0x38, 0x28, 0x08, 0xd1, 0x03, 0x99, 0x02, 
+	0x08, 0x49, 0x00, 0x49, 0x91, 0x02, 0x6b, 0xb8, 
+	0x9a, 0x03, 0x43, 0x50, 0x99, 0x02, 0x18, 0x45, 
+	0x69, 0x38, 0x00, 0x80, 0x49, 0x3c, 0x58, 0x08, 
+	0x23, 0x04, 0x40, 0x18, 0xd0, 0x00, 0x08, 0x6d, 
+	0x69, 0x38, 0x00, 0x80, 0x49, 0x39, 0x58, 0x08, 
+	0x1c, 0x06, 0x43, 0x6e, 0x69, 0xb8, 0x09, 0x71, 
+	0x18, 0x44, 0x6b, 0xf8, 0x28, 0x00, 0xd1, 0x02, 
+	0x03, 0x20, 0x0b, 0x00, 0xe0, 0x01, 0x02, 0x20, 
+	0x0a, 0x00, 0x1c, 0x04, 0xf0, 0x12, 0xfd, 0x90, 
+	0xf0, 0x12, 0xfd, 0x6c, 0x48, 0x30, 0x69, 0x80, 
+	0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 0x49, 0x2e, 
+	0x69, 0x89, 0x60, 0x08, 0x48, 0x2c, 0x69, 0x80, 
+	0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 0x23, 0x03, 
+	0x43, 0x18, 0x49, 0x29, 0x69, 0x89, 0x60, 0x08, 
+	0x07, 0x40, 0x6b, 0xf8, 0x49, 0x26, 0x69, 0x89, 
+	0x68, 0x09, 0x4b, 0x26, 0x40, 0x19, 0x07, 0xc0, 
+	0x0c, 0x80, 0x43, 0x08, 0x49, 0x22, 0x69, 0x89, 
+	0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x1c, 0x39, 
+	0x1c, 0x38, 0xf0, 0x00, 0xfc, 0x9d, 0x99, 0x0a, 
+	0x1c, 0x38, 0x22, 0x03, 0xf0, 0x00, 0xfd, 0x20, 
+	0x69, 0xf8, 0x49, 0x1b, 0x69, 0x49, 0x61, 0x08, 
+	0x48, 0x19, 0x69, 0xc0, 0x68, 0x00, 0x4b, 0x1a, 
+	0x40, 0x18, 0x02, 0x21, 0x0a, 0x09, 0x00, 0x89, 
+	0x43, 0x08, 0x49, 0x15, 0x69, 0xc9, 0x60, 0x08, 
+	0x01, 0x80, 0x48, 0x13, 0x69, 0xc0, 0x68, 0x00, 
+	0x01, 0x40, 0x09, 0x40, 0x06, 0xf1, 0x43, 0x08, 
+	0x49, 0x0f, 0x69, 0xc9, 0x60, 0x08, 0x48, 0x0e, 
+	0x69, 0x40, 0x61, 0x84, 0x06, 0xf0, 0x0e, 0xc0, 
+	0x49, 0x0b, 0x69, 0x49, 0x61, 0x48, 0x9b, 0x04, 
+	0x48, 0x09, 0x69, 0x40, 0x62, 0x43, 0xf0, 0x00, 
+	0xfd, 0xda, 0xf0, 0x12, 0xfd, 0x51, 0x20, 0x00, 
+	0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 0x00, 0x00, 
+	0x2e, 0x03, 0xa8, 0x78, 0x2e, 0x03, 0xa8, 0xc8, 
+	0x2e, 0x08, 0x20, 0x28, 0xff, 0xff, 0xdf, 0xff, 
+	0xfc, 0x00, 0x00, 0x03, 0xb5, 0xf3, 0xb0, 0x86, 
+	0x9f, 0x06, 0x99, 0x07, 0x68, 0x8c, 0x99, 0x07, 
+	0x68, 0xc8, 0x90, 0x03, 0x99, 0x07, 0x68, 0x0d, 
+	0x99, 0x07, 0x68, 0x49, 0x91, 0x02, 0x6b, 0x78, 
+	0x6a, 0xf9, 0x1a, 0x40, 0x30, 0x01, 0x90, 0x01, 
+	0x6b, 0x38, 0x6a, 0xb9, 0x1a, 0x40, 0x30, 0x01, 
+	0x90, 0x00, 0x99, 0x02, 0x98, 0x03, 0x18, 0x08, 
+	0x99, 0x01, 0x42, 0x88, 0xd9, 0x03, 0x98, 0x01, 
+	0x99, 0x02, 0x1a, 0x40, 0x90, 0x03, 0x19, 0x28, 
+	0x99, 0x00, 0x42, 0x88, 0xd9, 0x01, 0x98, 0x00, 
+	0x1b, 0x44, 0x69, 0x38, 0x28, 0x08, 0xd1, 0x02, 
+	0x08, 0x64, 0x08, 0x6d, 0x00, 0x6d, 0x6b, 0xb8, 
+	0x99, 0x02, 0x43, 0x48, 0x19, 0x41, 0x91, 0x04, 
+	0x69, 0x38, 0x00, 0x80, 0x49, 0x41, 0x58, 0x08, 
+	0x23, 0x04, 0x40, 0x18, 0xd0, 0x02, 0x99, 0x04, 
+	0x08, 0x49, 0x91, 0x04, 0x69, 0x38, 0x00, 0x80, 
+	0x49, 0x3d, 0x58, 0x08, 0x99, 0x04, 0x43, 0x48, 
+	0x90, 0x05, 0x69, 0xb8, 0x99, 0x05, 0x09, 0x49, 
+	0x18, 0x46, 0x6b, 0xf8, 0x28, 0x00, 0xd1, 0x02, 
+	0x03, 0x30, 0x0b, 0x00, 0xe0, 0x01, 0x02, 0x30, 
+	0x0a, 0x00, 0x1c, 0x06, 0xf0, 0x12, 0xfc, 0xd4, 
+	0xf0, 0x12, 0xfc, 0xb0, 0x48, 0x33, 0x69, 0x80, 
+	0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 0x49, 0x31, 
+	0x69, 0x89, 0x60, 0x08, 0x48, 0x2f, 0x69, 0x80, 
+	0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 0x23, 0x04, 
+	0x43, 0x18, 0x49, 0x2c, 0x69, 0x89, 0x60, 0x08, 
+	0x07, 0x40, 0x48, 0x2a, 0x69, 0xc0, 0x68, 0x00, 
+	0x01, 0x40, 0x09, 0x40, 0x99, 0x05, 0x06, 0xc9, 
+	0x43, 0x08, 0x49, 0x26, 0x69, 0xc9, 0x60, 0x08, 
+	0x48, 0x24, 0x69, 0xc0, 0x68, 0x00, 0x4b, 0x24, 
+	0x40, 0x18, 0x02, 0x31, 0x0a, 0x09, 0x00, 0x89, 
+	0x43, 0x08, 0x49, 0x20, 0x69, 0xc9, 0x60, 0x08, 
+	0x01, 0x80, 0x1c, 0x39, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfb, 0xd7, 0x6b, 0xf8, 0x49, 0x1b, 0x69, 0x89, 
+	0x68, 0x09, 0x4b, 0x1c, 0x40, 0x19, 0x07, 0xc0, 
+	0x0c, 0x80, 0x43, 0x08, 0x49, 0x17, 0x69, 0x89, 
+	0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x99, 0x07, 
+	0x69, 0x09, 0x1c, 0x38, 0x22, 0x04, 0xf0, 0x00, 
+	0xfc, 0x4b, 0x69, 0xf8, 0x49, 0x11, 0x69, 0x49, 
+	0x61, 0x08, 0x98, 0x05, 0x06, 0xc0, 0x0e, 0xc0, 
+	0x49, 0x0e, 0x69, 0x49, 0x61, 0x48, 0x48, 0x0d, 
+	0x69, 0x40, 0x61, 0x86, 0x48, 0x0b, 0x69, 0x40, 
+	0x62, 0x04, 0x98, 0x03, 0x49, 0x09, 0x69, 0x49, 
+	0x62, 0x48, 0xf0, 0x00, 0xfd, 0x18, 0xf0, 0x12, 
+	0xfc, 0x8f, 0x20, 0x00, 0xb0, 0x06, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x06, 
+	0xe7, 0xf9, 0x00, 0x00, 0x2e, 0x03, 0xa8, 0x78, 
+	0x2e, 0x03, 0xa8, 0xc8, 0x2e, 0x08, 0x20, 0x28, 
+	0xfc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xdf, 0xff, 
+	0xb5, 0xff, 0x9d, 0x09, 0xb0, 0x81, 0x98, 0x0b, 
+	0x06, 0x02, 0x0e, 0x12, 0x92, 0x00, 0xb0, 0x93, 
+	0x98, 0x14, 0x90, 0x12, 0x99, 0x15, 0x91, 0x11, 
+	0xaf, 0x0c, 0x1c, 0x38, 0x9a, 0x16, 0xca, 0x5e, 
+	0xc0, 0x5e, 0x68, 0x39, 0x91, 0x04, 0x68, 0x79, 
+	0x91, 0x03, 0x98, 0x12, 0x99, 0x11, 0x42, 0x88, 
+	0xd1, 0x73, 0x99, 0x03, 0x42, 0x8d, 0xd9, 0x71, 
+	0x68, 0xb8, 0x90, 0x01, 0x68, 0xf8, 0x90, 0x02, 
+	0x99, 0x11, 0x6b, 0x48, 0x6a, 0xc9, 0x1a, 0x40, 
+	0x1c, 0x44, 0x99, 0x11, 0x6b, 0x08, 0x6a, 0x89, 
+	0x1a, 0x40, 0x30, 0x01, 0x90, 0x00, 0x98, 0x02, 
+	0x18, 0x28, 0x42, 0xa0, 0xd9, 0x01, 0x1b, 0x61, 
+	0x91, 0x02, 0x9b, 0x17, 0x98, 0x01, 0x18, 0x18, 
+	0x99, 0x00, 0x42, 0x88, 0xd9, 0x03, 0x98, 0x00, 
+	0x9b, 0x17, 0x1a, 0xc0, 0x90, 0x01, 0x98, 0x01, 
+	0x60, 0xb8, 0x98, 0x02, 0x60, 0xf8, 0x98, 0x12, 
+	0x69, 0xc0, 0x90, 0x0a, 0x98, 0x12, 0x6b, 0x80, 
+	0x99, 0x03, 0x43, 0x48, 0x99, 0x04, 0x18, 0x41, 
+	0x91, 0x05, 0x98, 0x12, 0x69, 0x00, 0x00, 0x80, 
+	0x49, 0x48, 0x58, 0x08, 0x99, 0x05, 0x43, 0x48, 
+	0x90, 0x0b, 0x98, 0x12, 0x69, 0x80, 0x99, 0x0b, 
+	0x09, 0x49, 0x18, 0x41, 0x91, 0x07, 0x98, 0x0a, 
+	0x99, 0x02, 0x43, 0x48, 0x90, 0x0b, 0x98, 0x0b, 
+	0x09, 0x40, 0x99, 0x07, 0x18, 0x40, 0x90, 0x06, 
+	0x98, 0x06, 0x0b, 0xc0, 0x99, 0x07, 0x0b, 0xc9, 
+	0x1a, 0x40, 0x90, 0x09, 0x98, 0x09, 0x28, 0x00, 
+	0xd0, 0x56, 0x9e, 0x02, 0x98, 0x06, 0x04, 0x40, 
+	0x0c, 0x40, 0x01, 0x41, 0x91, 0x08, 0x99, 0x08, 
+	0x98, 0x0a, 0xf0, 0x04, 0xf9, 0x17, 0x1c, 0x04, 
+	0x2c, 0x00, 0xd1, 0x00, 0x34, 0x01, 0x99, 0x03, 
+	0x98, 0x02, 0x18, 0x08, 0x1b, 0x00, 0x60, 0x78, 
+	0x60, 0xfc, 0x98, 0x02, 0x18, 0x28, 0x1b, 0x05, 
+	0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 
+	0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 
+	0xf8, 0x57, 0xb0, 0x02, 0x1b, 0x36, 0x98, 0x09, 
+	0xe0, 0x01, 0xe0, 0x3c, 0xe0, 0x3b, 0x38, 0x01, 
+	0x90, 0x09, 0x98, 0x09, 0x28, 0x00, 0xd0, 0x1a, 
+	0x98, 0x0a, 0x21, 0x01, 0x03, 0x09, 0xf0, 0x04, 
+	0xf8, 0xf1, 0x1c, 0x04, 0x68, 0x78, 0x1b, 0x80, 
+	0x60, 0x78, 0x60, 0xfc, 0x68, 0xf8, 0x1a, 0x2d, 
+	0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 
+	0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 
+	0xf8, 0x37, 0xb0, 0x02, 0x1b, 0x36, 0x98, 0x09, 
+	0x38, 0x01, 0x90, 0x09, 0xe7, 0xe1, 0x68, 0x78, 
+	0x1b, 0x80, 0x60, 0x78, 0x60, 0xfe, 0x68, 0xf8, 
+	0x1a, 0x2d, 0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 
+	0x9b, 0x19, 0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 
+	0xf0, 0x00, 0xf8, 0x22, 0xb0, 0x02, 0xe0, 0x09, 
+	0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 
+	0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 
+	0xf8, 0x17, 0xb0, 0x02, 0xe0, 0x09, 0x9a, 0x13, 
+	0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 0x1c, 0x3a, 
+	0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 0xf8, 0xb8, 
+	0xb0, 0x02, 0x20, 0x00, 0xb0, 0x14, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x13, 
+	0xb0, 0x01, 0xe7, 0xf8, 0x2e, 0x03, 0xa8, 0xc8, 
+	0xb5, 0xff, 0x9d, 0x09, 0xb0, 0x81, 0x98, 0x0b, 
+	0x06, 0x02, 0x0e, 0x12, 0x92, 0x00, 0xb0, 0x92, 
+	0x98, 0x13, 0x90, 0x11, 0x99, 0x14, 0x91, 0x10, 
+	0xaf, 0x0b, 0x1c, 0x38, 0x9a, 0x15, 0xca, 0x5e, 
+	0xc0, 0x5e, 0x68, 0x38, 0x90, 0x03, 0x68, 0x78, 
+	0x90, 0x02, 0x68, 0xb8, 0x90, 0x00, 0x68, 0xf9, 
+	0x91, 0x01, 0x98, 0x11, 0x69, 0xc0, 0x90, 0x09, 
+	0x99, 0x10, 0x6b, 0x88, 0x43, 0x68, 0x9b, 0x16, 
+	0x18, 0xc1, 0x91, 0x04, 0x99, 0x10, 0x69, 0x08, 
+	0x00, 0x80, 0x49, 0x42, 0x58, 0x08, 0x99, 0x04, 
+	0x43, 0x48, 0x90, 0x0a, 0x99, 0x10, 0x69, 0x88, 
+	0x99, 0x0a, 0x09, 0x49, 0x18, 0x40, 0x90, 0x06, 
+	0x98, 0x09, 0x99, 0x01, 0x43, 0x48, 0x90, 0x0a, 
+	0x98, 0x0a, 0x09, 0x40, 0x99, 0x06, 0x18, 0x40, 
+	0x90, 0x05, 0x98, 0x05, 0x0b, 0xc0, 0x99, 0x06, 
+	0x0b, 0xc9, 0x1a, 0x40, 0x90, 0x08, 0x98, 0x08, 
+	0x28, 0x00, 0xd0, 0x53, 0x9e, 0x01, 0x98, 0x05, 
+	0x04, 0x40, 0x0c, 0x40, 0x01, 0x41, 0x91, 0x07, 
+	0x99, 0x07, 0x98, 0x09, 0xf0, 0x04, 0xf8, 0x5e, 
+	0x1c, 0x04, 0x2c, 0x00, 0xd1, 0x00, 0x34, 0x01, 
+	0x98, 0x02, 0x99, 0x01, 0x18, 0x40, 0x1b, 0x00, 
+	0x60, 0x78, 0x60, 0xfc, 0x99, 0x01, 0x18, 0x68, 
+	0x1b, 0x05, 0x9a, 0x12, 0x1c, 0x29, 0xb4, 0x06, 
+	0x9b, 0x18, 0x1c, 0x3a, 0x99, 0x16, 0x98, 0x15, 
+	0xf0, 0x00, 0xf8, 0x4a, 0xb0, 0x02, 0x1b, 0x36, 
+	0x98, 0x08, 0x38, 0x01, 0x90, 0x08, 0x98, 0x08, 
+	0x28, 0x00, 0xd0, 0x1a, 0x98, 0x09, 0x21, 0x01, 
+	0x03, 0x09, 0xf0, 0x04, 0xf8, 0x3b, 0x1c, 0x04, 
+	0x68, 0x78, 0x1b, 0x80, 0x60, 0x78, 0x60, 0xfc, 
+	0x68, 0xf8, 0x1a, 0x2d, 0x9a, 0x12, 0x1c, 0x29, 
+	0xb4, 0x06, 0x9b, 0x18, 0x1c, 0x3a, 0x99, 0x16, 
+	0x98, 0x15, 0xf0, 0x00, 0xf8, 0x2d, 0xb0, 0x02, 
+	0x1b, 0x36, 0x98, 0x08, 0x38, 0x01, 0x90, 0x08, 
+	0xe7, 0xe1, 0x68, 0x78, 0x1b, 0x80, 0x60, 0x78, 
+	0x60, 0xfe, 0x68, 0xf8, 0x1a, 0x2d, 0x9a, 0x12, 
+	0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x18, 0x1c, 0x3a, 
+	0x99, 0x16, 0x98, 0x15, 0xf0, 0x00, 0xf8, 0x18, 
+	0xb0, 0x02, 0xe0, 0x09, 0x9a, 0x12, 0x1c, 0x29, 
+	0xb4, 0x06, 0x9b, 0x18, 0x1c, 0x3a, 0x99, 0x16, 
+	0x98, 0x15, 0xf0, 0x00, 0xf8, 0x0d, 0xb0, 0x02, 
+	0x20, 0x00, 0xb0, 0x13, 0xb0, 0x04, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xb0, 0x12, 0xb0, 0x01, 
+	0xe7, 0xf8, 0x00, 0x00, 0x2e, 0x03, 0xa8, 0xc8, 
+	0xb5, 0xff, 0xb0, 0x81, 0x98, 0x0b, 0x06, 0x02, 
+	0x0e, 0x12, 0x92, 0x00, 0xb0, 0x8e, 0x9f, 0x0f, 
+	0x9c, 0x10, 0x9a, 0x11, 0x68, 0x10, 0x90, 0x07, 
+	0x9a, 0x11, 0x68, 0x50, 0x90, 0x06, 0x9a, 0x11, 
+	0x68, 0x91, 0x91, 0x08, 0x9a, 0x11, 0x68, 0xd0, 
+	0x90, 0x09, 0x6b, 0x60, 0x6a, 0xe1, 0x1a, 0x40, 
+	0x30, 0x01, 0x90, 0x01, 0x6b, 0x20, 0x6a, 0xa1, 
+	0x1a, 0x40, 0x30, 0x01, 0x90, 0x00, 0x99, 0x18, 
+	0x98, 0x09, 0x18, 0x08, 0x99, 0x01, 0x42, 0x88, 
+	0xd9, 0x03, 0x98, 0x01, 0x99, 0x18, 0x1a, 0x41, 
+	0x91, 0x09, 0x9b, 0x12, 0x99, 0x08, 0x18, 0x58, 
+	0x99, 0x00, 0x42, 0x88, 0xd9, 0x03, 0x98, 0x00, 
+	0x9b, 0x12, 0x1a, 0xc1, 0x91, 0x08, 0x22, 0x00, 
+	0x92, 0x05, 0x42, 0xa7, 0xd1, 0x20, 0x99, 0x18, 
+	0x98, 0x06, 0x42, 0x81, 0xd9, 0x0c, 0x22, 0x02, 
+	0x92, 0x05, 0x99, 0x06, 0x98, 0x09, 0x18, 0x08, 
+	0x1e, 0x41, 0x91, 0x06, 0x99, 0x18, 0x98, 0x09, 
+	0x18, 0x08, 0x1e, 0x41, 0x91, 0x18, 0xe0, 0x0f, 
+	0x9b, 0x12, 0x98, 0x07, 0x42, 0x83, 0xd9, 0x0b, 
+	0x22, 0x01, 0x92, 0x05, 0x98, 0x07, 0x99, 0x08, 
+	0x18, 0x40, 0x38, 0x01, 0x90, 0x07, 0x9b, 0x12, 
+	0x99, 0x08, 0x18, 0x58, 0x1e, 0x43, 0x93, 0x12, 
+	0x69, 0x38, 0x28, 0x08, 0xd1, 0x0a, 0x99, 0x08, 
+	0x08, 0x49, 0x91, 0x08, 0x98, 0x07, 0x08, 0x40, 
+	0x00, 0x40, 0x90, 0x07, 0x9b, 0x12, 0x08, 0x5b, 
+	0x00, 0x5b, 0x93, 0x12, 0x69, 0x38, 0x00, 0x80, 
+	0x49, 0xc6, 0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 
+	0x08, 0x80, 0x90, 0x03, 0x69, 0x20, 0x00, 0x80, 
+	0x49, 0xc2, 0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 
+	0x08, 0x80, 0x90, 0x02, 0x6b, 0xb8, 0x99, 0x06, 
+	0x43, 0x48, 0x99, 0x07, 0x18, 0x41, 0x91, 0x04, 
+	0x98, 0x03, 0x28, 0x00, 0xd0, 0x02, 0x99, 0x04, 
+	0x08, 0x49, 0x91, 0x04, 0x69, 0x38, 0x00, 0x80, 
+	0x49, 0xb9, 0x58, 0x08, 0x99, 0x04, 0x1c, 0x06, 
+	0x43, 0x4e, 0x6b, 0xa0, 0x99, 0x18, 0x43, 0x48, 
+	0x9b, 0x12, 0x18, 0xc1, 0x91, 0x04, 0x98, 0x02, 
+	0x28, 0x00, 0xd0, 0x02, 0x99, 0x04, 0x08, 0x49, 
+	0x91, 0x04, 0x69, 0x20, 0x00, 0x80, 0x49, 0xb0, 
+	0x58, 0x08, 0x99, 0x04, 0x1c, 0x05, 0x43, 0x4d, 
+	0x9a, 0x05, 0x2a, 0x01, 0xd1, 0x3d, 0x69, 0x38, 
+	0x28, 0x08, 0xd0, 0x3a, 0x69, 0x38, 0x28, 0x09, 
+	0xd0, 0x02, 0x69, 0x38, 0x28, 0x0a, 0xd1, 0x0a, 
+	0x36, 0x10, 0x69, 0xb8, 0x09, 0x71, 0x18, 0x41, 
+	0x91, 0x0b, 0x06, 0xf0, 0x0e, 0xc0, 0x1d, 0xc1, 
+	0x31, 0x01, 0x91, 0x0a, 0xe0, 0x0b, 0x69, 0xb8, 
+	0x09, 0x71, 0x18, 0x41, 0x91, 0x0b, 0x69, 0x38, 
+	0x00, 0x80, 0x49, 0x9f, 0x58, 0x08, 0x19, 0x86, 
+	0x06, 0xf1, 0x0e, 0xc9, 0x91, 0x0a, 0x69, 0x20, 
+	0x28, 0x09, 0xd0, 0x02, 0x69, 0x20, 0x28, 0x0a, 
+	0xd1, 0x0a, 0x35, 0x10, 0x69, 0xa0, 0x09, 0x69, 
+	0x18, 0x41, 0x91, 0x0d, 0x06, 0xe8, 0x0e, 0xc0, 
+	0x1d, 0xc1, 0x31, 0x01, 0x91, 0x0c, 0xe0, 0x0b, 
+	0x69, 0xa0, 0x09, 0x69, 0x18, 0x41, 0x91, 0x0d, 
+	0x69, 0x20, 0x00, 0x80, 0x49, 0x90, 0x58, 0x08, 
+	0x19, 0x45, 0x06, 0xe9, 0x0e, 0xc9, 0x91, 0x0c, 
+	0xe0, 0x0d, 0x69, 0xb8, 0x09, 0x71, 0x18, 0x41, 
+	0x91, 0x0b, 0x69, 0xa0, 0x09, 0x69, 0x18, 0x41, 
+	0x91, 0x0d, 0x06, 0xf1, 0x0e, 0xc9, 0x91, 0x0a, 
+	0x06, 0xe9, 0x0e, 0xc9, 0x91, 0x0c, 0x6b, 0xf8, 
+	0x28, 0x00, 0xd1, 0x03, 0x99, 0x0b, 0x03, 0x09, 
+	0x0b, 0x09, 0xe0, 0x02, 0x99, 0x0b, 0x02, 0x09, 
+	0x0a, 0x09, 0x91, 0x0b, 0x6b, 0xe0, 0x28, 0x00, 
+	0xd1, 0x03, 0x99, 0x0d, 0x03, 0x09, 0x0b, 0x09, 
+	0xe0, 0x02, 0x99, 0x0d, 0x02, 0x09, 0x0a, 0x09, 
+	0x91, 0x0d, 0xf0, 0x12, 0xf9, 0xd5, 0xf0, 0x12, 
+	0xf9, 0xb1, 0x48, 0x7a, 0x69, 0x80, 0x68, 0x00, 
+	0x08, 0xc0, 0x00, 0xc0, 0x23, 0x05, 0x43, 0x18, 
+	0x49, 0x76, 0x69, 0x89, 0x60, 0x08, 0x07, 0x40, 
+	0x1c, 0x21, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xf8, 
+	0x98, 0x03, 0x28, 0x00, 0xd0, 0x18, 0x98, 0x02, 
+	0x28, 0x00, 0xd0, 0x15, 0x48, 0x6f, 0x69, 0x80, 
+	0x68, 0x00, 0x23, 0x08, 0x43, 0xdb, 0x40, 0x18, 
+	0x49, 0x6c, 0x69, 0x89, 0x60, 0x08, 0x07, 0x00, 
+	0x48, 0x6a, 0x69, 0x80, 0x68, 0x00, 0x4b, 0x6a, 
+	0x40, 0x18, 0x49, 0x68, 0x69, 0x89, 0x60, 0x08, 
+	0x05, 0xc0, 0x99, 0x08, 0x08, 0x49, 0x91, 0x08, 
+	0x6b, 0xf8, 0x49, 0x64, 0x69, 0x89, 0x68, 0x09, 
+	0x4b, 0x64, 0x40, 0x19, 0x07, 0xc0, 0x0c, 0x40, 
+	0x43, 0x08, 0x49, 0x60, 0x69, 0x89, 0x60, 0x08, 
+	0x04, 0x40, 0x0f, 0xc0, 0x6b, 0xe0, 0x49, 0x5d, 
+	0x69, 0x89, 0x68, 0x09, 0x4b, 0x5e, 0x40, 0x19, 
+	0x07, 0xc0, 0x0c, 0x80, 0x43, 0x08, 0x49, 0x59, 
+	0x69, 0x89, 0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 
+	0x68, 0x38, 0x28, 0x00, 0xd0, 0x0d, 0x79, 0x38, 
+	0x49, 0x54, 0x69, 0x89, 0x68, 0x09, 0x4b, 0x57, 
+	0x40, 0x19, 0x03, 0xc0, 0x43, 0x08, 0x49, 0x51, 
+	0x69, 0x89, 0x60, 0x08, 0x02, 0x40, 0x0e, 0x00, 
+	0xe0, 0x0d, 0x6a, 0x78, 0x78, 0x00, 0x49, 0x4d, 
+	0x69, 0x89, 0x68, 0x09, 0x4b, 0x4f, 0x40, 0x19, 
+	0x03, 0xc0, 0x43, 0x08, 0x49, 0x49, 0x69, 0x89, 
+	0x60, 0x08, 0x02, 0x40, 0x0e, 0x00, 0x69, 0x20, 
+	0x00, 0x80, 0x49, 0x45, 0x58, 0x08, 0x99, 0x08, 
+	0x43, 0x48, 0x28, 0x40, 0xd9, 0x01, 0x21, 0x00, 
+	0xe0, 0x00, 0x21, 0x01, 0x1c, 0x08, 0x49, 0x41, 
+	0x69, 0x89, 0x68, 0x09, 0x4b, 0x44, 0x40, 0x19, 
+	0x07, 0xc2, 0x09, 0x52, 0x43, 0x11, 0x4a, 0x3d, 
+	0x69, 0x92, 0x60, 0x11, 0x01, 0x49, 0x0f, 0xc9, 
+	0x49, 0x3a, 0x69, 0x89, 0x68, 0x09, 0x4b, 0x3f, 
+	0x40, 0x19, 0x9a, 0x05, 0x07, 0x92, 0x0f, 0x92, 
+	0x05, 0xd2, 0x43, 0x11, 0x4a, 0x35, 0x69, 0x92, 
+	0x60, 0x11, 0x01, 0xc9, 0x49, 0x33, 0x69, 0x89, 
+	0x68, 0x09, 0x4b, 0x39, 0x40, 0x19, 0x9a, 0x0e, 
+	0x07, 0xd2, 0x09, 0x92, 0x43, 0x11, 0x4a, 0x2f, 
+	0x69, 0x92, 0x60, 0x11, 0x01, 0x89, 0x69, 0xf9, 
+	0x4a, 0x2c, 0x69, 0x52, 0x60, 0x11, 0x49, 0x2b, 
+	0x69, 0x89, 0x68, 0x09, 0x01, 0x49, 0x09, 0x49, 
+	0x9a, 0x0a, 0x06, 0xd2, 0x43, 0x11, 0x4a, 0x27, 
+	0x69, 0x92, 0x60, 0x11, 0x99, 0x0a, 0x4a, 0x25, 
+	0x69, 0x52, 0x60, 0x51, 0x99, 0x0b, 0x4a, 0x23, 
+	0x69, 0x52, 0x60, 0x91, 0x99, 0x0b, 0x4a, 0x21, 
+	0x69, 0x52, 0x60, 0xd1, 0x69, 0xe1, 0x4a, 0x1f, 
+	0x69, 0x52, 0x61, 0x11, 0x49, 0x1d, 0x69, 0xc9, 
+	0x68, 0x09, 0x01, 0x49, 0x09, 0x49, 0x9a, 0x0c, 
+	0x06, 0xd2, 0x43, 0x11, 0x4a, 0x19, 0x69, 0xd2, 
+	0x60, 0x11, 0x99, 0x0c, 0x4a, 0x17, 0x69, 0x52, 
+	0x61, 0x51, 0x99, 0x0d, 0x4a, 0x15, 0x69, 0x52, 
+	0x61, 0x91, 0x99, 0x0d, 0x4a, 0x13, 0x69, 0x52, 
+	0x61, 0xd1, 0x99, 0x09, 0x4a, 0x11, 0x69, 0x52, 
+	0x62, 0x51, 0x99, 0x08, 0x4a, 0x0f, 0x69, 0x52, 
+	0x62, 0x11, 0x68, 0x38, 0x28, 0x00, 0xd0, 0x05, 
+	0x48, 0x14, 0x68, 0x01, 0x23, 0x01, 0x43, 0x19, 
+	0x60, 0x01, 0xe0, 0x02, 0x48, 0x11, 0x21, 0x00, 
+	0x60, 0x01, 0xf0, 0x00, 0xf9, 0x8c, 0xf0, 0x12, 
+	0xf9, 0x03, 0x20, 0x00, 0xb0, 0x0f, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x0e, 
+	0xb0, 0x01, 0xe7, 0xf8, 0x2e, 0x03, 0xa8, 0x78, 
+	0x2e, 0x03, 0xa8, 0xc8, 0x2e, 0x08, 0x20, 0x28, 
+	0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xbf, 0xff, 
+	0xff, 0xff, 0xdf, 0xff, 0xff, 0x80, 0x7f, 0xff, 
+	0xfb, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 
+	0xfd, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x40, 
+	0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x69, 0x38, 
+	0x00, 0x80, 0x49, 0x3c, 0x58, 0x08, 0x23, 0x18, 
+	0x40, 0x18, 0x08, 0xc0, 0x49, 0x3a, 0x69, 0x89, 
+	0x68, 0x09, 0x23, 0xc0, 0x43, 0xdb, 0x40, 0x19, 
+	0x07, 0x80, 0x0f, 0x80, 0x01, 0x80, 0x43, 0x08, 
+	0x49, 0x35, 0x69, 0x89, 0x60, 0x08, 0x06, 0x00, 
+	0x0f, 0x80, 0x69, 0x38, 0x00, 0x80, 0x49, 0x31, 
+	0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 0x08, 0x80, 
+	0x49, 0x2f, 0x69, 0x89, 0x68, 0x09, 0x23, 0x08, 
+	0x43, 0xdb, 0x40, 0x19, 0x07, 0xc0, 0x0f, 0x00, 
+	0x43, 0x08, 0x49, 0x2b, 0x69, 0x89, 0x60, 0x08, 
+	0x07, 0x00, 0x0f, 0xc0, 0x69, 0x38, 0x00, 0x80, 
+	0x49, 0x26, 0x58, 0x08, 0x49, 0x26, 0x69, 0x89, 
+	0x68, 0x09, 0x23, 0x30, 0x43, 0xdb, 0x40, 0x19, 
+	0x07, 0x80, 0x0f, 0x80, 0x01, 0x00, 0x43, 0x08, 
+	0x49, 0x21, 0x69, 0x89, 0x60, 0x08, 0x06, 0x80, 
+	0x0f, 0x80, 0x69, 0x10, 0x00, 0x80, 0x49, 0x1d, 
+	0x58, 0x08, 0x23, 0x18, 0x40, 0x18, 0x08, 0xc0, 
+	0x49, 0x1b, 0x69, 0x89, 0x68, 0x09, 0x4b, 0x1b, 
+	0x40, 0x19, 0x07, 0x80, 0x0f, 0x80, 0x02, 0xc0, 
+	0x43, 0x08, 0x49, 0x17, 0x69, 0x89, 0x60, 0x08, 
+	0x04, 0xc0, 0x0f, 0x80, 0x69, 0x10, 0x00, 0x80, 
+	0x49, 0x12, 0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 
+	0x08, 0x80, 0x49, 0x11, 0x69, 0x89, 0x68, 0x09, 
+	0x4b, 0x11, 0x40, 0x19, 0x07, 0xc0, 0x0d, 0xc0, 
+	0x43, 0x08, 0x49, 0x0d, 0x69, 0x89, 0x60, 0x08, 
+	0x05, 0xc0, 0x0f, 0xc0, 0x69, 0x10, 0x00, 0x80, 
+	0x49, 0x08, 0x58, 0x08, 0x49, 0x08, 0x69, 0x89, 
+	0x68, 0x09, 0x4b, 0x0a, 0x40, 0x19, 0x07, 0x80, 
+	0x0f, 0x80, 0x02, 0x40, 0x43, 0x08, 0x49, 0x04, 
+	0x69, 0x89, 0x60, 0x08, 0x05, 0x40, 0x0f, 0x80, 
+	0xbc, 0x80, 0x47, 0x70, 0x2e, 0x03, 0xa8, 0x78, 
+	0x2e, 0x08, 0x20, 0x28, 0xff, 0xff, 0xe7, 0xff, 
+	0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xf9, 0xff, 
+	0xb4, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x15, 
+	0x2d, 0x00, 0xd0, 0x06, 0x2d, 0x02, 0xd0, 0x21, 
+	0x2d, 0x03, 0xd0, 0x02, 0x2d, 0x04, 0xd0, 0x1d, 
+	0xe0, 0xa3, 0x69, 0x20, 0x28, 0x0b, 0xd2, 0x14, 
+	0xa3, 0x01, 0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x05, 0x07, 0x09, 0x0b, 0x05, 0x07, 0x09, 0x0b, 
+	0x0d, 0x0e, 0x0e, 0x00, 0x07, 0xff, 0xe0, 0x09, 
+	0x07, 0xbf, 0xe0, 0x07, 0x07, 0x3f, 0xe0, 0x05, 
+	0x06, 0x3f, 0xe0, 0x03, 0xe0, 0x02, 0x02, 0x3f, 
+	0xe0, 0x00, 0xe7, 0xff, 0x48, 0x46, 0x6a, 0x00, 
+	0x60, 0x07, 0xe0, 0x86, 0x69, 0x20, 0x28, 0x0b, 
+	0xd2, 0x73, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x06, 0x15, 0x24, 0x33, 
+	0x06, 0x15, 0x24, 0x33, 0x41, 0x45, 0x45, 0x00, 
+	0x01, 0xff, 0x48, 0x3d, 0x6a, 0x40, 0x68, 0x00, 
+	0x4b, 0x3c, 0x40, 0x18, 0x06, 0x39, 0x0e, 0x09, 
+	0x00, 0x89, 0x43, 0x08, 0x49, 0x38, 0x6a, 0x49, 
+	0x60, 0x08, 0x05, 0x80, 0xe0, 0x69, 0x01, 0xbf, 
+	0x48, 0x35, 0x6a, 0x40, 0x68, 0x00, 0x4b, 0x35, 
+	0x40, 0x18, 0x06, 0x39, 0x0e, 0x09, 0x00, 0x89, 
+	0x43, 0x08, 0x49, 0x31, 0x6a, 0x49, 0x60, 0x08, 
+	0x05, 0x80, 0xe0, 0x5a, 0x01, 0x3f, 0x48, 0x2e, 
+	0x6a, 0x40, 0x68, 0x00, 0x4b, 0x2d, 0x40, 0x18, 
+	0x06, 0x39, 0x0e, 0x09, 0x00, 0x89, 0x43, 0x08, 
+	0x49, 0x29, 0x6a, 0x49, 0x60, 0x08, 0x05, 0x80, 
+	0xe0, 0x4b, 0x48, 0x27, 0x6a, 0x40, 0x68, 0x00, 
+	0x4b, 0x26, 0x40, 0x18, 0x06, 0x39, 0x0e, 0x09, 
+	0x00, 0x89, 0x43, 0x08, 0x49, 0x22, 0x6a, 0x49, 
+	0x60, 0x08, 0x05, 0x80, 0xe0, 0x3d, 0x48, 0x20, 
+	0x6a, 0x00, 0x60, 0x07, 0xe0, 0x39, 0x48, 0x1e, 
+	0x6a, 0x40, 0x68, 0x00, 0x4b, 0x1d, 0x40, 0x18, 
+	0x06, 0x39, 0x0e, 0x09, 0x00, 0x89, 0x43, 0x08, 
+	0x49, 0x19, 0x6a, 0x49, 0x60, 0x08, 0x05, 0x80, 
+	0x48, 0x17, 0x6a, 0x40, 0x68, 0x00, 0x4b, 0x18, 
+	0x40, 0x18, 0x21, 0xff, 0x02, 0x09, 0x40, 0x39, 
+	0x00, 0x89, 0x43, 0x08, 0x49, 0x12, 0x6a, 0x49, 
+	0x60, 0x08, 0x03, 0x80, 0x48, 0x10, 0x6a, 0x40, 
+	0x68, 0x00, 0x4b, 0x12, 0x40, 0x18, 0x21, 0xff, 
+	0x04, 0x09, 0x40, 0x39, 0x00, 0x89, 0x43, 0x01, 
+	0x48, 0x0b, 0x6a, 0x40, 0x60, 0x01, 0x01, 0x88, 
+	0xe0, 0x00, 0xe0, 0x0d, 0x48, 0x08, 0x6a, 0x40, 
+	0x68, 0x00, 0x01, 0x80, 0x09, 0x80, 0x21, 0x3f, 
+	0x06, 0x09, 0x40, 0x39, 0x00, 0x89, 0x43, 0x08, 
+	0x49, 0x03, 0x6a, 0x49, 0x60, 0x08, 0xe0, 0x00, 
+	0xe7, 0xff, 0xbc, 0xb0, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x20, 0x28, 0xff, 0xff, 0xfc, 0x03, 
+	0xff, 0xfc, 0x03, 0xff, 0xfc, 0x03, 0xff, 0xff, 
+	0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x69, 0x38, 
+	0x28, 0x0b, 0xd2, 0x1a, 0xa3, 0x01, 0x5c, 0x1b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x05, 0x08, 0x0b, 0x0e, 
+	0x05, 0x08, 0x0b, 0x0e, 0x11, 0x13, 0x13, 0x00, 
+	0x68, 0x10, 0x0f, 0xc1, 0xe0, 0x0f, 0x68, 0x10, 
+	0x0f, 0x81, 0xe0, 0x0c, 0x68, 0x10, 0x0f, 0x01, 
+	0xe0, 0x09, 0x68, 0x10, 0x0e, 0x01, 0xe0, 0x06, 
+	0x68, 0x11, 0xe0, 0x04, 0x68, 0x10, 0x0a, 0x01, 
+	0xe0, 0x01, 0x68, 0x11, 0xe7, 0xff, 0x1c, 0x08, 
+	0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 0x48, 0x14, 
+	0x69, 0x80, 0x68, 0x00, 0x49, 0x12, 0x6a, 0x89, 
+	0x60, 0x08, 0x48, 0x11, 0x69, 0xc0, 0x68, 0x00, 
+	0x49, 0x0f, 0x6a, 0xc9, 0x60, 0x08, 0x48, 0x0e, 
+	0x6a, 0x00, 0x68, 0x00, 0x49, 0x0c, 0x6b, 0x09, 
+	0x60, 0x08, 0x48, 0x0b, 0x6a, 0x40, 0x68, 0x00, 
+	0x49, 0x09, 0x6b, 0x49, 0x60, 0x08, 0x20, 0x01, 
+	0x49, 0x07, 0x6b, 0xc9, 0x60, 0x08, 0x20, 0x00, 
+	0x49, 0x06, 0x60, 0x08, 0x20, 0x00, 0x49, 0x05, 
+	0x60, 0x48, 0x20, 0x00, 0x49, 0x03, 0x60, 0x88, 
+	0x20, 0x00, 0x49, 0x02, 0x60, 0xc8, 0x47, 0x70, 
+	0x2e, 0x08, 0x20, 0x28, 0x2e, 0x08, 0x20, 0x2c, 
+	0xb4, 0x90, 0x1c, 0x01, 0x29, 0x00, 0xd1, 0x02, 
+	0x20, 0x8d, 0xbc, 0x90, 0x47, 0x70, 0x4c, 0x08, 
+	0x1c, 0x0f, 0x22, 0x00, 0x23, 0xff, 0x33, 0x01, 
+	0x42, 0x9a, 0xd3, 0x02, 0xe0, 0x04, 0x32, 0x01, 
+	0xe7, 0xf8, 0xcf, 0x08, 0xc4, 0x08, 0xe7, 0xfa, 
+	0x20, 0x00, 0xe7, 0xee, 0xe7, 0xed, 0x00, 0x00, 
+	0x68, 0x00, 0x18, 0x00, 0xb4, 0x90, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x1c, 0x13, 0x06, 0x1a, 0x0e, 0x12, 
+	0x1c, 0x21, 0x60, 0x0f, 0x71, 0x0a, 0x20, 0x00, 
+	0xbc, 0x90, 0x47, 0x70, 0xe7, 0xfc, 0x00, 0x00, 
+	0xb5, 0x00, 0x48, 0x1d, 0x69, 0x00, 0x23, 0x04, 
+	0x40, 0x18, 0xd0, 0x19, 0x48, 0x1a, 0x69, 0x00, 
+	0x23, 0x02, 0x40, 0x18, 0xd0, 0x09, 0x48, 0x18, 
+	0x69, 0x40, 0x49, 0x18, 0x68, 0x09, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x17, 0x68, 0x09, 0x70, 0x08, 
+	0xe0, 0x03, 0x20, 0x00, 0x49, 0x14, 0x68, 0x09, 
+	0x70, 0x08, 0x48, 0x14, 0x78, 0x01, 0x20, 0x01, 
+	0x40, 0x88, 0xf0, 0x08, 0xff, 0x9f, 0xe0, 0x18, 
+	0x48, 0x11, 0x6a, 0x80, 0x23, 0x02, 0x40, 0x18, 
+	0xd0, 0x13, 0x48, 0x0f, 0x6a, 0x80, 0x07, 0xc0, 
+	0x0f, 0xc0, 0xd0, 0x04, 0x20, 0xfe, 0x49, 0x0d, 
+	0x68, 0x09, 0x70, 0x08, 0xe0, 0x03, 0x20, 0x0e, 
+	0x49, 0x0a, 0x68, 0x09, 0x70, 0x08, 0x48, 0x0a, 
+	0x78, 0x01, 0x20, 0x01, 0x40, 0x88, 0xf0, 0x08, 
+	0xff, 0x85, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x6e, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0xb9, 0x98, 
+	0x2e, 0x08, 0xb9, 0x9c, 0x2e, 0x08, 0xb9, 0xa0, 
+	0x6e, 0x00, 0x0e, 0x00, 0x2e, 0x08, 0xb9, 0xa4, 
+	0x2e, 0x08, 0xb9, 0xa8, 0xb5, 0xf0, 0x1c, 0x05, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x2e, 0x0e, 0x36, 
+	0x2e, 0x1f, 0xdd, 0x03, 0x20, 0xaf, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x49, 0x08, 0x20, 0x0d, 
+	0xf0, 0x08, 0xff, 0x76, 0x48, 0x07, 0x60, 0x04, 
+	0x20, 0x00, 0x49, 0x06, 0x68, 0x09, 0x70, 0x08, 
+	0x48, 0x05, 0x60, 0x07, 0x48, 0x05, 0x70, 0x06, 
+	0x20, 0x00, 0xe7, 0xec, 0xe7, 0xeb, 0x00, 0x00, 
+	0x2e, 0x01, 0xa9, 0xed, 0x2e, 0x08, 0xb9, 0x9c, 
+	0x2e, 0x08, 0xb9, 0x98, 0x2e, 0x08, 0xb9, 0xa0, 
+	0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x25, 
+	0x0e, 0x2d, 0x2d, 0x1f, 0xdd, 0x03, 0x20, 0xaf, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x49, 0x07, 
+	0x20, 0x0d, 0xf0, 0x08, 0xff, 0x51, 0x48, 0x06, 
+	0x60, 0x07, 0x20, 0x00, 0x49, 0x04, 0x68, 0x09, 
+	0x70, 0x08, 0x48, 0x04, 0x70, 0x05, 0x20, 0x00, 
+	0xe7, 0xee, 0xe7, 0xed, 0x2e, 0x01, 0xa9, 0xed, 
+	0x2e, 0x08, 0xb9, 0xa4, 0x2e, 0x08, 0xb9, 0xa8, 
+	0xb4, 0xb0, 0x1c, 0x01, 0x4a, 0x35, 0x23, 0x01, 
+	0x60, 0x13, 0x4a, 0x35, 0x1c, 0x0f, 0x68, 0x3d, 
+	0xc2, 0x20, 0x88, 0x8d, 0xc2, 0x20, 0x88, 0xcb, 
+	0x60, 0x13, 0x68, 0x8c, 0x2c, 0x00, 0xd0, 0x57, 
+	0x4a, 0x30, 0x1c, 0x27, 0x20, 0x00, 0x28, 0x13, 
+	0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
+	0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x2c, 
+	0x1d, 0xe7, 0x37, 0x45, 0x20, 0x00, 0x28, 0x0b, 
+	0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
+	0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x27, 
+	0x1d, 0xe7, 0x37, 0x71, 0x20, 0x00, 0x28, 0x07, 
+	0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
+	0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x22, 
+	0x1d, 0xe7, 0x37, 0x8d, 0x20, 0x00, 0x28, 0x09, 
+	0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
+	0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x1d, 
+	0x1d, 0xe7, 0x37, 0xb1, 0x20, 0x00, 0x28, 0x09, 
+	0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
+	0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x68, 0x0d, 
+	0x23, 0x01, 0x02, 0x9b, 0x40, 0x2b, 0xd0, 0x17, 
+	0x4a, 0x15, 0x1d, 0xe7, 0x37, 0xd5, 0x20, 0x00, 
+	0x28, 0x09, 0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 
+	0xe7, 0xfa, 0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 
+	0x4a, 0x10, 0x1d, 0xe7, 0x37, 0xf9, 0x20, 0x00, 
+	0x28, 0x09, 0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 
+	0xe7, 0xfa, 0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 
+	0x4a, 0x02, 0x23, 0x00, 0x60, 0x13, 0xbc, 0xb0, 
+	0x47, 0x70, 0x00, 0x00, 0x6e, 0x00, 0x0c, 0x0c, 
+	0x6e, 0x00, 0x0c, 0x00, 0x6e, 0x00, 0x08, 0x00, 
+	0x6e, 0x00, 0x08, 0x50, 0x6e, 0x00, 0x08, 0x80, 
+	0x6e, 0x00, 0x08, 0xa0, 0x6e, 0x00, 0x08, 0xd0, 
+	0x6e, 0x00, 0x09, 0x00, 0x6e, 0x00, 0x09, 0x30, 
+	0xb4, 0xf0, 0x1c, 0x01, 0x69, 0x08, 0x06, 0xc0, 
+	0x0e, 0xc0, 0x28, 0x01, 0xdb, 0x04, 0x69, 0x08, 
+	0x06, 0xc0, 0x0e, 0xc0, 0x28, 0x0a, 0xdd, 0x02, 
+	0x20, 0xc3, 0xbc, 0xf0, 0x47, 0x70, 0x69, 0x08, 
+	0x05, 0x80, 0x0e, 0xc0, 0x28, 0x01, 0xdb, 0x04, 
+	0x69, 0x08, 0x05, 0x80, 0x0e, 0xc0, 0x28, 0x0a, 
+	0xdd, 0x01, 0x20, 0xc4, 0xe7, 0xf1, 0x48, 0x4f, 
+	0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0xd1, 0x01, 
+	0x20, 0xc0, 0xe7, 0xea, 0x68, 0x08, 0x07, 0x00, 
+	0x0f, 0xc0, 0x4b, 0x4b, 0x70, 0x18, 0x4f, 0x49, 
+	0x1c, 0x0c, 0x22, 0x00, 0x2a, 0x04, 0xd3, 0x02, 
+	0xe0, 0x04, 0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 
+	0xc7, 0x08, 0xe7, 0xfa, 0x4f, 0x45, 0x69, 0x08, 
+	0x06, 0xc0, 0x0e, 0xc0, 0x00, 0x43, 0x18, 0x18, 
+	0x38, 0x03, 0x69, 0x0b, 0x05, 0x9b, 0x0e, 0xde, 
+	0x00, 0x73, 0x19, 0x9b, 0x3b, 0x03, 0x01, 0x5b, 
+	0x43, 0x18, 0x60, 0x38, 0x4f, 0x3e, 0x69, 0x48, 
+	0x60, 0x38, 0x4f, 0x3e, 0x69, 0x88, 0x05, 0x40, 
+	0x0d, 0x40, 0x69, 0x8b, 0x02, 0x9b, 0x0d, 0x5b, 
+	0x02, 0xdb, 0x43, 0x18, 0x60, 0x38, 0x69, 0xcd, 
+	0x2d, 0x00, 0xd0, 0x63, 0x4f, 0x38, 0x1c, 0x2c, 
+	0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
+	0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
+	0xe7, 0xfa, 0x4f, 0x34, 0x1d, 0xec, 0x34, 0x1d, 
+	0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
+	0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
+	0xe7, 0xfa, 0x4f, 0x2f, 0x1d, 0xec, 0x34, 0x41, 
+	0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
+	0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
+	0xe7, 0xfa, 0x4f, 0x2a, 0x1d, 0xec, 0x34, 0x65, 
+	0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
+	0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
+	0xe7, 0xfa, 0x4f, 0x25, 0x1d, 0xec, 0x34, 0x89, 
+	0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 0xe0, 0x04, 
+	0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
+	0xe7, 0xfa, 0x4f, 0x20, 0x1d, 0xec, 0x34, 0x9d, 
+	0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 0xe0, 0x04, 
+	0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
+	0xe7, 0xfa, 0x68, 0x08, 0x23, 0x01, 0x02, 0x9b, 
+	0x40, 0x18, 0xd0, 0x17, 0x4f, 0x18, 0x1d, 0xec, 
+	0x34, 0xb1, 0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 
+	0xe0, 0x04, 0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 
+	0xc7, 0x08, 0xe7, 0xfa, 0x4f, 0x13, 0x1d, 0xec, 
+	0x34, 0xc5, 0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 
+	0xe0, 0x04, 0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 
+	0xc7, 0x08, 0xe7, 0xfa, 0x20, 0x00, 0xe7, 0x54, 
+	0xe7, 0x53, 0x00, 0x00, 0x6e, 0x00, 0x0e, 0x00, 
+	0x2e, 0x08, 0xb9, 0xa9, 0x6e, 0x00, 0x0e, 0x10, 
+	0x6e, 0x00, 0x0e, 0x14, 0x6e, 0x00, 0x0e, 0x18, 
+	0x6e, 0x00, 0x0a, 0x00, 0x6e, 0x00, 0x0a, 0x24, 
+	0x6e, 0x00, 0x0a, 0x48, 0x6e, 0x00, 0x0a, 0x90, 
+	0x6e, 0x00, 0x0a, 0xc0, 0x6e, 0x00, 0x0a, 0xe4, 
+	0x6e, 0x00, 0x09, 0xc0, 0x6e, 0x00, 0x09, 0xe4, 
+	0x1c, 0x01, 0x48, 0x0c, 0x78, 0x00, 0x28, 0x00, 
+	0xd0, 0x01, 0x20, 0xc1, 0x47, 0x70, 0x48, 0x0a, 
+	0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0xd1, 0x01, 
+	0x20, 0xc0, 0xe7, 0xf7, 0x20, 0x00, 0x4b, 0x06, 
+	0x61, 0x58, 0x4a, 0x06, 0x68, 0x08, 0x60, 0x10, 
+	0x4a, 0x05, 0x68, 0x48, 0x60, 0x10, 0x20, 0x00, 
+	0xe7, 0xec, 0xe7, 0xeb, 0x2e, 0x08, 0xb9, 0xa9, 
+	0x6e, 0x00, 0x0e, 0x00, 0x6e, 0x00, 0x0e, 0x20, 
+	0x6e, 0x00, 0x0e, 0x24, 0x48, 0x09, 0x78, 0x00, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0xc1, 0x47, 0x70, 
+	0x48, 0x07, 0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 
+	0xd0, 0x01, 0x20, 0xc2, 0xe7, 0xf7, 0x20, 0x01, 
+	0x49, 0x03, 0x61, 0x48, 0x20, 0x00, 0xe7, 0xf2, 
+	0xe7, 0xf1, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xa9, 
+	0x6e, 0x00, 0x0e, 0x00, 0xb5, 0xff, 0x1c, 0x04, 
+	0x1c, 0x0d, 0x1c, 0x17, 0x9e, 0x09, 0x20, 0x00, 
+	0x60, 0x30, 0x48, 0x13, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x07, 0x9b, 0x03, 0x2b, 0x00, 0xd1, 0x04, 
+	0x20, 0x8a, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x23, 0xff, 0x33, 0x01, 0x42, 0x9c, 
+	0xdd, 0x01, 0x20, 0x87, 0xe7, 0xf5, 0x19, 0x28, 
+	0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 0xd9, 0x01, 
+	0x20, 0x88, 0xe7, 0xee, 0x68, 0x79, 0x1c, 0x20, 
+	0x80, 0x48, 0x70, 0x0d, 0x9b, 0x03, 0x60, 0x4b, 
+	0x68, 0x78, 0x60, 0xc8, 0x68, 0x38, 0x60, 0x88, 
+	0x60, 0x31, 0x20, 0x00, 0xe7, 0xe1, 0xe7, 0xe0, 
+	0x2e, 0x08, 0x9d, 0xf0, 0x1c, 0x03, 0x1c, 0x0a, 
+	0x1c, 0x19, 0x68, 0xc8, 0x60, 0x50, 0x68, 0x88, 
+	0x60, 0x10, 0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 
+	0xb5, 0xf3, 0xb0, 0x87, 0x21, 0x00, 0x91, 0x06, 
+	0x26, 0x00, 0x98, 0x07, 0xf0, 0x00, 0xfa, 0xcb, 
+	0x90, 0x03, 0x9c, 0x07, 0x9d, 0x08, 0x88, 0x69, 
+	0x91, 0x04, 0x98, 0x03, 0x99, 0x04, 0x42, 0x88, 
+	0xd0, 0x09, 0x48, 0xbb, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x05, 0x20, 0xff, 0xb0, 0x07, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x78, 0x28, 
+	0x90, 0x05, 0x99, 0x04, 0x23, 0xff, 0x33, 0x01, 
+	0x42, 0x99, 0xdd, 0x02, 0x20, 0xff, 0xb0, 0x07, 
+	0xe7, 0xf1, 0x98, 0x05, 0x99, 0x04, 0x18, 0x40, 
+	0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 0xdd, 0x02, 
+	0x20, 0xff, 0xb0, 0x07, 0xe7, 0xe7, 0x48, 0xad, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x0a, 0x68, 0xa0, 
+	0x23, 0x01, 0x06, 0x1b, 0x40, 0x18, 0xd0, 0x05, 
+	0x68, 0x68, 0x28, 0x00, 0xd1, 0x02, 0x20, 0x8a, 
+	0xb0, 0x07, 0xe7, 0xd8, 0x62, 0x65, 0x69, 0x60, 
+	0x4b, 0xa5, 0x40, 0x18, 0x99, 0x05, 0x06, 0x09, 
+	0x0e, 0x09, 0x04, 0x09, 0x43, 0x08, 0x61, 0x60, 
+	0x02, 0x00, 0x68, 0xe0, 0x90, 0x00, 0x48, 0x9e, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x06, 0x98, 0x00, 
+	0x28, 0x19, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
+	0x20, 0x00, 0xe0, 0x05, 0x98, 0x00, 0x28, 0x08, 
+	0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x07, 
+	0xe7, 0xb5, 0x48, 0x94, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x1e, 0x48, 0x91, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x1a, 0x68, 0xa0, 0x02, 0x00, 0x0e, 0x00, 
+	0x06, 0x01, 0x0e, 0x09, 0x91, 0x06, 0x99, 0x04, 
+	0x29, 0x04, 0xd0, 0x06, 0x29, 0x10, 0xd0, 0x07, 
+	0x23, 0xff, 0x33, 0x01, 0x42, 0x99, 0xd0, 0x06, 
+	0xe0, 0x08, 0x26, 0xff, 0x36, 0x01, 0xe0, 0x07, 
+	0x26, 0x01, 0x02, 0x76, 0xe0, 0x04, 0x26, 0x03, 
+	0x02, 0x36, 0xe0, 0x01, 0x26, 0x00, 0xe7, 0xff, 
+	0x49, 0x84, 0x20, 0x91, 0xf0, 0x11, 0xfc, 0x04, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 
+	0xff, 0xb1, 0xe7, 0xf5, 0x98, 0x00, 0x00, 0x80, 
+	0x49, 0x7f, 0x58, 0x08, 0x99, 0x07, 0x42, 0x88, 
+	0xd0, 0x05, 0x20, 0x92, 0x49, 0x7b, 0x60, 0x08, 
+	0x20, 0xff, 0xb0, 0x07, 0xe7, 0x7b, 0x48, 0x77, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x73, 0x48, 0x74, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x6f, 0x98, 0x00, 
+	0xf0, 0x02, 0xfe, 0xd6, 0x28, 0x00, 0xd0, 0x6a, 
+	0xb0, 0x82, 0x49, 0x74, 0x20, 0x91, 0xf0, 0x11, 
+	0xfb, 0xdf, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
+	0xf0, 0x02, 0xff, 0x25, 0x20, 0x92, 0x49, 0x6f, 
+	0x60, 0x08, 0x20, 0x01, 0x49, 0x6e, 0x68, 0x09, 
+	0x60, 0x08, 0x27, 0x00, 0x20, 0x00, 0x90, 0x00, 
+	0x98, 0x00, 0x28, 0x00, 0xd1, 0x15, 0x2f, 0x07, 
+	0xd2, 0x13, 0x6a, 0xe0, 0x05, 0x81, 0x0d, 0x89, 
+	0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 0x18, 0x18, 
+	0x00, 0xc0, 0x4a, 0x65, 0x68, 0x12, 0x18, 0x80, 
+	0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 
+	0x42, 0x81, 0xd1, 0x01, 0x20, 0x01, 0x90, 0x00, 
+	0xe7, 0xe6, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x14, 
+	0x2f, 0x18, 0xd2, 0x12, 0x6a, 0xe0, 0x05, 0x81, 
+	0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x23, 0x4c, 
+	0x43, 0x58, 0x4a, 0x59, 0x68, 0x12, 0x18, 0x80, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x69, 0x40, 
+	0x42, 0x81, 0xd1, 0x01, 0x20, 0x01, 0x90, 0x00, 
+	0xe7, 0xe7, 0x3f, 0x01, 0x2f, 0x07, 0xd2, 0x10, 
+	0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 0x49, 0x50, 
+	0x68, 0x09, 0x18, 0x40, 0x23, 0x2b, 0x01, 0x5b, 
+	0x18, 0xc0, 0x1c, 0x21, 0xf0, 0x02, 0xfb, 0x38, 
+	0x48, 0x4b, 0x68, 0x00, 0xf0, 0x02, 0xfe, 0xee, 
+	0xe0, 0x46, 0x2f, 0x18, 0xd2, 0x44, 0x20, 0x4c, 
+	0x43, 0x78, 0x49, 0x47, 0x68, 0x09, 0x18, 0x40, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x0a, 0x1c, 0x21, 
+	0xf0, 0x02, 0xfb, 0x26, 0x20, 0x4c, 0x43, 0x78, 
+	0x49, 0x41, 0x68, 0x09, 0xe0, 0x00, 0xe0, 0x48, 
+	0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x82, 
+	0x6f, 0xc0, 0x28, 0x00, 0xd0, 0x17, 0x20, 0x4c, 
+	0x43, 0x78, 0x49, 0x3b, 0x68, 0x09, 0x18, 0x40, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 
+	0x04, 0x00, 0x0c, 0x00, 0xd0, 0x0b, 0x20, 0x4c, 
+	0x43, 0x78, 0x49, 0x35, 0x68, 0x09, 0x18, 0x40, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 
+	0x0c, 0x00, 0x04, 0x00, 0xd1, 0x0a, 0x20, 0x02, 
+	0x21, 0x4c, 0x43, 0x79, 0x4a, 0x2e, 0x68, 0x12, 
+	0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 
+	0x67, 0x48, 0xe0, 0x09, 0x20, 0x03, 0x21, 0x4c, 
+	0x43, 0x79, 0x4a, 0x29, 0x68, 0x12, 0x18, 0x89, 
+	0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 0x67, 0x48, 
+	0x49, 0x24, 0x20, 0x91, 0xf0, 0x11, 0xfb, 0x40, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x22, 
+	0x68, 0x00, 0x90, 0x01, 0x48, 0x21, 0x68, 0x00, 
+	0x49, 0x1f, 0x60, 0x08, 0x98, 0x01, 0x49, 0x1f, 
+	0x60, 0x08, 0x20, 0x92, 0x49, 0x1b, 0x60, 0x08, 
+	0xb0, 0x02, 0x48, 0x15, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x1d, 0x98, 0x00, 0x01, 0x00, 0x4b, 0x1a, 
+	0x18, 0xc1, 0x91, 0x01, 0x1d, 0xe0, 0x30, 0x0d, 
+	0x90, 0x02, 0x98, 0x02, 0x68, 0x00, 0x99, 0x01, 
+	0x60, 0x08, 0x48, 0x0e, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x0d, 0x68, 0x68, 0x08, 0x80, 0x99, 0x06, 
+	0x00, 0x89, 0x4b, 0x12, 0x18, 0xc9, 0x67, 0x08, 
+	0x98, 0x05, 0x43, 0x30, 0x99, 0x06, 0x00, 0x89, 
+	0x4b, 0x0f, 0x18, 0xc9, 0x61, 0x08, 0x20, 0x92, 
+	0x49, 0x06, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x07, 
+	0xe6, 0x91, 0xb0, 0x07, 0xe6, 0x8f, 0x00, 0x00, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0x9d, 0xf0, 
+	0xff, 0x00, 0xff, 0xff, 0x2e, 0x08, 0xba, 0x2c, 
+	0x2e, 0x08, 0xb9, 0xc4, 0x2e, 0x08, 0xd1, 0xf4, 
+	0x2e, 0x08, 0xbb, 0x20, 0x2e, 0x08, 0xbb, 0x24, 
+	0x68, 0x00, 0x0c, 0x00, 0x68, 0x00, 0x0e, 0x00, 
+	0x68, 0x00, 0x0e, 0x80, 0x1c, 0x01, 0x1c, 0x0a, 
+	0x6a, 0x53, 0x1c, 0x18, 0x47, 0x70, 0xe7, 0xfd, 
+	0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x82, 0x48, 0x2b, 
+	0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x20, 0x8a, 
+	0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x98, 0x02, 0x90, 0x01, 0x98, 0x01, 
+	0x88, 0x44, 0x98, 0x01, 0x78, 0x06, 0x23, 0xff, 
+	0x33, 0x01, 0x42, 0x9c, 0xdd, 0x02, 0x20, 0xff, 
+	0xb0, 0x02, 0xe7, 0xee, 0x19, 0x30, 0x23, 0xff, 
+	0x33, 0x01, 0x42, 0x98, 0xdd, 0x02, 0x20, 0xff, 
+	0xb0, 0x02, 0xe7, 0xe6, 0x49, 0x1c, 0x20, 0x91, 
+	0xf0, 0x11, 0xfa, 0xc2, 0x28, 0x92, 0xd0, 0x03, 
+	0x20, 0x01, 0xf0, 0x01, 0xfe, 0x6f, 0xe7, 0xf5, 
+	0x2c, 0x10, 0xda, 0x0d, 0x25, 0x00, 0x42, 0xa5, 
+	0xdb, 0x02, 0xe0, 0x08, 0x35, 0x01, 0xe7, 0xfa, 
+	0xcf, 0x01, 0x19, 0x71, 0x00, 0x89, 0x4b, 0x13, 
+	0x18, 0xc9, 0x60, 0x08, 0xe7, 0xf6, 0xe0, 0x15, 
+	0x4a, 0x11, 0x43, 0x22, 0x92, 0x00, 0x20, 0x91, 
+	0x49, 0x10, 0x60, 0x08, 0x00, 0xb0, 0x4b, 0x0d, 
+	0x18, 0xc1, 0x9a, 0x00, 0x1c, 0x38, 0x23, 0x02, 
+	0xf0, 0x00, 0xfa, 0xfe, 0x28, 0x00, 0xd0, 0x00, 
+	0xe7, 0xf4, 0x48, 0x0a, 0x68, 0x00, 0x28, 0x92, 
+	0xd0, 0x00, 0xe7, 0xfa, 0x20, 0x92, 0x49, 0x04, 
+	0x60, 0x08, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xb0, 
+	0xb0, 0x02, 0xe7, 0xae, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xba, 0x30, 0x68, 0x00, 0x08, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0x2e, 0x08, 0xba, 0x34, 
+	0x21, 0x04, 0xe0, 0x00, 0x31, 0x01, 0x1c, 0x08, 
+	0x47, 0x70, 0xe7, 0xfd, 0xb5, 0xf3, 0x1c, 0x0f, 
+	0xb0, 0x82, 0x48, 0x2b, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x05, 0x20, 0x8a, 0xb0, 0x02, 0xb0, 0x02, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x02, 
+	0x90, 0x01, 0x98, 0x01, 0x88, 0x44, 0x98, 0x01, 
+	0x78, 0x06, 0x23, 0xff, 0x33, 0x01, 0x42, 0x9c, 
+	0xdd, 0x02, 0x20, 0xff, 0xb0, 0x02, 0xe7, 0xee, 
+	0x19, 0x30, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
+	0xdd, 0x02, 0x20, 0xff, 0xb0, 0x02, 0xe7, 0xe6, 
+	0x49, 0x1c, 0x20, 0x91, 0xf0, 0x11, 0xfa, 0x58, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 
+	0xfe, 0x05, 0xe7, 0xf5, 0x2c, 0x10, 0xda, 0x0d, 
+	0x25, 0x00, 0x42, 0xa5, 0xdb, 0x02, 0xe0, 0x08, 
+	0x35, 0x01, 0xe7, 0xfa, 0x19, 0x70, 0x00, 0x80, 
+	0x4b, 0x13, 0x18, 0xc0, 0x68, 0x01, 0xc7, 0x02, 
+	0xe7, 0xf6, 0xe0, 0x15, 0x4a, 0x11, 0x43, 0x22, 
+	0x92, 0x00, 0x20, 0x91, 0x49, 0x10, 0x60, 0x08, 
+	0x00, 0xb0, 0x4b, 0x0d, 0x18, 0xc0, 0x9a, 0x00, 
+	0x1c, 0x39, 0x23, 0x02, 0xf0, 0x00, 0xfa, 0x94, 
+	0x28, 0x00, 0xd0, 0x00, 0xe7, 0xf4, 0x48, 0x0a, 
+	0x68, 0x00, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xfa, 
+	0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 0x20, 0x00, 
+	0xb0, 0x02, 0xe7, 0xb0, 0xb0, 0x02, 0xe7, 0xae, 
+	0x2e, 0x08, 0x9d, 0xf0, 0x2e, 0x08, 0xba, 0x30, 
+	0x68, 0x00, 0x08, 0x00, 0xf0, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0xba, 0x34, 0xb5, 0xf7, 0x9a, 0x02, 
+	0x06, 0x15, 0x0e, 0x2d, 0x9c, 0x00, 0x88, 0x66, 
+	0x42, 0xb5, 0xdd, 0x04, 0x20, 0xff, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x78, 0x20, 
+	0x19, 0x40, 0x06, 0x07, 0x0e, 0x3f, 0x23, 0xff, 
+	0x33, 0x01, 0x42, 0x9f, 0xdd, 0x01, 0x20, 0xff, 
+	0xe7, 0xf1, 0x49, 0x0a, 0x20, 0x91, 0xf0, 0x11, 
+	0xf9, 0xff, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x01, 0xfd, 0xac, 0xe7, 0xf5, 0x99, 0x01, 
+	0x00, 0xb8, 0x4b, 0x05, 0x18, 0xc0, 0x60, 0x01, 
+	0x20, 0x92, 0x49, 0x02, 0x60, 0x08, 0x20, 0x00, 
+	0xe7, 0xdd, 0xe7, 0xdc, 0x2e, 0x08, 0xba, 0x30, 
+	0x68, 0x00, 0x08, 0x00, 0xb5, 0xf7, 0x9a, 0x02, 
+	0x06, 0x14, 0x0e, 0x24, 0x9f, 0x00, 0x88, 0x7d, 
+	0x78, 0x38, 0x19, 0x00, 0x06, 0x06, 0x0e, 0x36, 
+	0x42, 0xac, 0xdd, 0x04, 0x20, 0xff, 0xb0, 0x03, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x49, 0x0b, 
+	0x20, 0x91, 0xf0, 0x11, 0xf9, 0xd5, 0x28, 0x92, 
+	0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 0xfd, 0x82, 
+	0xe7, 0xf5, 0x00, 0xb0, 0x4b, 0x06, 0x18, 0xc0, 
+	0x68, 0x00, 0x99, 0x01, 0x60, 0x08, 0x20, 0x92, 
+	0x49, 0x02, 0x60, 0x08, 0x20, 0x00, 0xe7, 0xe6, 
+	0xe7, 0xe5, 0x00, 0x00, 0x2e, 0x08, 0xba, 0x30, 
+	0x68, 0x00, 0x08, 0x00, 0x1c, 0x01, 0x1c, 0x0a, 
+	0x88, 0x50, 0x47, 0x70, 0xe7, 0xfd, 0xb4, 0x80, 
+	0x1c, 0x01, 0x1c, 0x0f, 0x69, 0x3a, 0x2a, 0x08, 
+	0xd2, 0x12, 0xa3, 0x02, 0x5c, 0x9b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x07, 0x09, 0x0b, 
+	0x04, 0x07, 0x09, 0x0b, 0x20, 0x02, 0xbc, 0x80, 
+	0x47, 0x70, 0x20, 0x04, 0xe7, 0xfb, 0x20, 0x10, 
+	0xe7, 0xf9, 0x20, 0xff, 0x30, 0x01, 0xe7, 0xf6, 
+	0x20, 0x00, 0xe7, 0xf4, 0xe7, 0xf3, 0xb5, 0xf3, 
+	0x98, 0x00, 0x06, 0x05, 0x0e, 0x2d, 0x48, 0x89, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x04, 0x20, 0x8b, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x48, 0x85, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x04, 
+	0x2d, 0x17, 0xdd, 0x02, 0x20, 0x8c, 0xe7, 0xf3, 
+	0xe0, 0xfe, 0x2d, 0x07, 0xdd, 0x01, 0x20, 0x8c, 
+	0xe7, 0xee, 0x49, 0x80, 0x20, 0x91, 0xf0, 0x11, 
+	0xf9, 0x7f, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
+	0xf0, 0x01, 0xfd, 0x2c, 0xe7, 0xf5, 0x1c, 0x28, 
+	0xf7, 0xf8, 0xfc, 0xd8, 0x1c, 0x04, 0x2c, 0x00, 
+	0xd0, 0x09, 0x68, 0xa0, 0x4b, 0x78, 0x40, 0x18, 
+	0x99, 0x01, 0x07, 0xc9, 0x09, 0xc9, 0x43, 0x08, 
+	0x60, 0xa0, 0x01, 0xc0, 0xe0, 0x04, 0x20, 0x92, 
+	0x49, 0x72, 0x60, 0x08, 0x20, 0xff, 0xe7, 0xcf, 
+	0x48, 0x6f, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x11, 
+	0x99, 0x01, 0x29, 0x00, 0xd0, 0x06, 0x48, 0x6f, 
+	0x21, 0x01, 0x40, 0xa9, 0x68, 0x02, 0x43, 0x11, 
+	0x60, 0x01, 0xe0, 0x06, 0x48, 0x6b, 0x21, 0x01, 
+	0x40, 0xa9, 0x43, 0xc9, 0x68, 0x02, 0x40, 0x11, 
+	0x60, 0x01, 0xe0, 0xbf, 0x68, 0xe0, 0xf0, 0x02, 
+	0xfc, 0x3b, 0x28, 0x00, 0xd0, 0x73, 0xb0, 0x81, 
+	0x49, 0x65, 0x20, 0x91, 0xf0, 0x11, 0xf9, 0x44, 
+	0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x02, 
+	0xfc, 0x8a, 0x20, 0x92, 0x49, 0x60, 0x60, 0x08, 
+	0x20, 0x01, 0x49, 0x60, 0x68, 0x09, 0x60, 0x08, 
+	0x27, 0x00, 0x26, 0x00, 0x2e, 0x00, 0xd1, 0x14, 
+	0x2f, 0x07, 0xd2, 0x12, 0x6a, 0xe0, 0x05, 0x81, 
+	0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 
+	0x18, 0x18, 0x00, 0xc0, 0x4a, 0x57, 0x68, 0x12, 
+	0x18, 0x80, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 
+	0x6f, 0xc0, 0x42, 0x81, 0xd1, 0x00, 0x26, 0x01, 
+	0xe7, 0xe8, 0x2e, 0x00, 0xd1, 0x13, 0x2f, 0x18, 
+	0xd2, 0x11, 0x6a, 0xe0, 0x05, 0x81, 0x0d, 0x89, 
+	0x1c, 0x38, 0x37, 0x01, 0x23, 0x4c, 0x43, 0x58, 
+	0x4a, 0x4c, 0x68, 0x12, 0x18, 0x80, 0x38, 0xff, 
+	0x38, 0xff, 0x38, 0x02, 0x69, 0x40, 0x42, 0x81, 
+	0xd1, 0x00, 0x26, 0x01, 0xe7, 0xe9, 0x3f, 0x01, 
+	0x2f, 0x07, 0xd2, 0x32, 0x99, 0x02, 0x29, 0x00, 
+	0xd0, 0x16, 0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 
+	0x49, 0x42, 0x68, 0x09, 0x18, 0x40, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc0, 0x6e, 0x80, 0x4b, 0x40, 
+	0x43, 0x18, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
+	0x4a, 0x3c, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0xe0, 0x17, 
+	0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 0x49, 0x37, 
+	0x68, 0x09, 0x18, 0x40, 0x23, 0x05, 0x02, 0x1b, 
+	0x18, 0xc0, 0x6e, 0x80, 0x04, 0x00, 0x0c, 0x00, 
+	0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x31, 
+	0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 
+	0x18, 0xc9, 0x66, 0x88, 0xe0, 0x00, 0xe0, 0x45, 
+	0xe0, 0x2b, 0x99, 0x02, 0x29, 0x00, 0xd0, 0x14, 
+	0x20, 0x4c, 0x43, 0x78, 0x49, 0x29, 0x68, 0x09, 
+	0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x68, 0x00, 0x4b, 0x27, 0x43, 0x18, 0x21, 0x4c, 
+	0x43, 0x79, 0x4a, 0x24, 0x68, 0x12, 0x18, 0x89, 
+	0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 0x60, 0x08, 
+	0xe0, 0x13, 0x20, 0x4c, 0x43, 0x78, 0x49, 0x1f, 
+	0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x02, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x00, 
+	0x21, 0x4c, 0x43, 0x79, 0x4a, 0x19, 0x68, 0x12, 
+	0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 
+	0x60, 0x08, 0x48, 0x16, 0x68, 0x00, 0xf0, 0x02, 
+	0xfc, 0x05, 0x49, 0x13, 0x20, 0x91, 0xf0, 0x11, 
+	0xf8, 0x9f, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
+	0x48, 0x10, 0x68, 0x00, 0x90, 0x00, 0x48, 0x11, 
+	0x68, 0x00, 0x49, 0x0e, 0x60, 0x08, 0x98, 0x00, 
+	0x49, 0x0e, 0x60, 0x08, 0x20, 0x92, 0x49, 0x0a, 
+	0x60, 0x08, 0xb0, 0x01, 0x20, 0x92, 0x49, 0x05, 
+	0x60, 0x08, 0x20, 0x00, 0xe6, 0xf4, 0xe6, 0xf3, 
+	0xe6, 0xf2, 0x00, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x30, 
+	0xfe, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x20, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x2e, 0x08, 0xbb, 0x20, 
+	0xff, 0xff, 0x00, 0x00, 0x2e, 0x08, 0xbb, 0x24, 
+	0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x26, 
+	0x0e, 0x36, 0x48, 0x0f, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x03, 0x20, 0x8b, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x2e, 0x07, 0xdd, 0x01, 0x20, 0x8c, 
+	0xe7, 0xf8, 0x1c, 0x30, 0xf7, 0xf8, 0xfb, 0xc2, 
+	0x1c, 0x05, 0x2d, 0x00, 0xd0, 0x04, 0x68, 0xa8, 
+	0x01, 0xc0, 0x0f, 0xc0, 0x60, 0x38, 0xe0, 0x04, 
+	0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 0x20, 0xff, 
+	0xe7, 0xe8, 0x20, 0x00, 0xe7, 0xe6, 0xe7, 0xe5, 
+	0x2e, 0x08, 0x9d, 0xf0, 0x2e, 0x08, 0xba, 0x30, 
+	0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x25, 
+	0x0e, 0x2d, 0x48, 0x20, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x03, 0x20, 0x8b, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x48, 0x1d, 0x68, 0x00, 0x28, 0x01, 
+	0xd1, 0x04, 0x2d, 0x17, 0xdd, 0x02, 0x20, 0x8c, 
+	0xe7, 0xf4, 0xe0, 0x2d, 0x2d, 0x07, 0xdd, 0x01, 
+	0x20, 0x8c, 0xe7, 0xef, 0x48, 0x16, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0xff, 0xe7, 0xe9, 
+	0x49, 0x14, 0x20, 0x91, 0xf0, 0x11, 0xf8, 0x28, 
+	0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 
+	0xfb, 0xd5, 0xe7, 0xf5, 0x2f, 0x00, 0xd0, 0x08, 
+	0x48, 0x0f, 0x1d, 0xe9, 0x31, 0x01, 0x22, 0x01, 
+	0x40, 0x8a, 0x68, 0x01, 0x43, 0x11, 0x60, 0x01, 
+	0xe0, 0x08, 0x48, 0x0b, 0x1d, 0xea, 0x32, 0x01, 
+	0x21, 0x01, 0x40, 0x91, 0x43, 0xc9, 0x68, 0x02, 
+	0x40, 0x11, 0x60, 0x01, 0x20, 0x92, 0x49, 0x05, 
+	0x60, 0x08, 0x20, 0x00, 0xe7, 0xc6, 0xe7, 0xc5, 
+	0xe7, 0xc4, 0x00, 0x00, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xd1, 0xf0, 0x2e, 0x08, 0xba, 0x30, 
+	0x68, 0x00, 0x00, 0x20, 0xb4, 0x90, 0x1c, 0x07, 
+	0x1c, 0x0a, 0x06, 0x39, 0x0e, 0x09, 0x48, 0x10, 
+	0x68, 0x00, 0x28, 0x00, 0xd1, 0x02, 0x20, 0x8b, 
+	0xbc, 0x90, 0x47, 0x70, 0x29, 0x07, 0xdd, 0x01, 
+	0x20, 0x8c, 0xe7, 0xf9, 0x48, 0x0b, 0x68, 0x00, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0xff, 0xe7, 0xf3, 
+	0x1d, 0xc8, 0x30, 0x01, 0x24, 0x01, 0x40, 0x84, 
+	0x1c, 0x23, 0x20, 0x0d, 0x06, 0xc0, 0x6a, 0x00, 
+	0x40, 0x18, 0x1d, 0xcc, 0x34, 0x01, 0x40, 0xe0, 
+	0x60, 0x10, 0x20, 0x00, 0xe7, 0xe4, 0xe7, 0xe3, 
+	0x2e, 0x08, 0x9d, 0xf0, 0x2e, 0x08, 0xd1, 0xf0, 
+	0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x25, 
+	0x0e, 0x2d, 0x48, 0x13, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x03, 0x20, 0x8b, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x2d, 0x07, 0xdd, 0x01, 0x20, 0x8c, 
+	0xe7, 0xf8, 0x48, 0x0e, 0x68, 0x00, 0x28, 0x00, 
+	0xd0, 0x01, 0x20, 0xff, 0xe7, 0xf2, 0x49, 0x0c, 
+	0x20, 0x91, 0xf0, 0x10, 0xff, 0xb9, 0x28, 0x92, 
+	0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 0xfb, 0x66, 
+	0xe7, 0xf5, 0x08, 0xb8, 0x00, 0xa9, 0x4b, 0x07, 
+	0x18, 0xc9, 0x67, 0x08, 0x20, 0x92, 0x49, 0x04, 
+	0x60, 0x08, 0x20, 0x00, 0xe7, 0xde, 0xe7, 0xdd, 
+	0x2e, 0x08, 0x9d, 0xf0, 0x2e, 0x08, 0xd1, 0xf0, 
+	0x2e, 0x08, 0xba, 0x30, 0x68, 0x00, 0x0e, 0x00, 
+	0xb4, 0xf0, 0x1c, 0x05, 0x1c, 0x0c, 0x1c, 0x17, 
+	0x1c, 0x1e, 0x04, 0x3f, 0x0c, 0x3f, 0x1c, 0x39, 
+	0x29, 0x00, 0xd8, 0x02, 0xe0, 0x04, 0x39, 0x01, 
+	0xe7, 0xfa, 0xcd, 0x04, 0xc4, 0x04, 0xe7, 0xfa, 
+	0x20, 0x92, 0x4a, 0x03, 0x60, 0x10, 0x20, 0x00, 
+	0xbc, 0xf0, 0x47, 0x70, 0xe7, 0xfc, 0x00, 0x00, 
+	0x2e, 0x08, 0xba, 0x34, 0x20, 0x00, 0x6b, 0x00, 
+	0x49, 0x63, 0x60, 0x08, 0x20, 0x00, 0x6b, 0x40, 
+	0x49, 0x62, 0x60, 0x08, 0x48, 0x62, 0x49, 0x63, 
+	0x60, 0x08, 0x48, 0x63, 0x49, 0x63, 0x60, 0x08, 
+	0x20, 0x00, 0x6a, 0xc0, 0x49, 0x62, 0x60, 0x08, 
+	0x48, 0x62, 0x49, 0x63, 0x60, 0x08, 0x48, 0x63, 
+	0x49, 0x63, 0x60, 0x08, 0x48, 0x63, 0x49, 0x64, 
+	0x60, 0x08, 0x20, 0x00, 0x6b, 0x80, 0x49, 0x63, 
+	0x60, 0x08, 0x20, 0x00, 0x6b, 0xc0, 0x49, 0x62, 
+	0x60, 0x08, 0x20, 0x00, 0x6c, 0x00, 0x49, 0x61, 
+	0x60, 0x08, 0x20, 0x00, 0x6c, 0x40, 0x49, 0x60, 
+	0x60, 0x08, 0x20, 0x00, 0x6c, 0x80, 0x49, 0x5f, 
+	0x60, 0x08, 0x20, 0x00, 0x6c, 0xc0, 0x49, 0x5e, 
+	0x60, 0x08, 0x20, 0x00, 0x6e, 0xc0, 0x49, 0x5d, 
+	0x60, 0x08, 0x20, 0x80, 0x6d, 0x00, 0x49, 0x5c, 
+	0x60, 0x08, 0x20, 0x80, 0x6d, 0x40, 0x49, 0x5b, 
+	0x60, 0x08, 0x20, 0x80, 0x6d, 0x80, 0x49, 0x5a, 
+	0x60, 0x08, 0x20, 0x00, 0x6d, 0x00, 0x49, 0x59, 
+	0x60, 0x08, 0x20, 0x00, 0x6d, 0x40, 0x49, 0x58, 
+	0x60, 0x08, 0x20, 0x00, 0x6d, 0x80, 0x49, 0x57, 
+	0x60, 0x08, 0x20, 0x00, 0x6d, 0xc0, 0x49, 0x56, 
+	0x60, 0x08, 0x20, 0x80, 0x6a, 0xc0, 0x49, 0x55, 
+	0x60, 0x08, 0x20, 0x80, 0x6d, 0xc0, 0x49, 0x54, 
+	0x60, 0x08, 0x20, 0x80, 0x6c, 0xc0, 0x49, 0x53, 
+	0x60, 0x08, 0x20, 0x80, 0x68, 0x40, 0x49, 0x52, 
+	0x60, 0x08, 0x20, 0x80, 0x68, 0x80, 0x49, 0x51, 
+	0x60, 0x08, 0x20, 0x80, 0x68, 0xc0, 0x49, 0x50, 
+	0x60, 0x08, 0x20, 0x80, 0x69, 0x00, 0x49, 0x4f, 
+	0x60, 0x08, 0x20, 0x80, 0x69, 0x40, 0x49, 0x4e, 
+	0x60, 0x08, 0x20, 0x80, 0x69, 0x80, 0x49, 0x4d, 
+	0x60, 0x08, 0x20, 0x80, 0x69, 0xc0, 0x49, 0x4c, 
+	0x60, 0x08, 0x20, 0x80, 0x6a, 0x00, 0x49, 0x4b, 
+	0x60, 0x08, 0x20, 0x80, 0x6a, 0x40, 0x49, 0x4a, 
+	0x60, 0x08, 0x20, 0x80, 0x6a, 0x80, 0x49, 0x49, 
+	0x60, 0x08, 0x20, 0x00, 0x6f, 0x00, 0x49, 0x48, 
+	0x60, 0x08, 0x20, 0x00, 0x6f, 0x40, 0x49, 0x47, 
+	0x60, 0x08, 0x20, 0x80, 0x6c, 0x40, 0x49, 0x46, 
+	0x60, 0x08, 0x20, 0x80, 0x6c, 0x80, 0x49, 0x45, 
+	0x60, 0x08, 0x20, 0x80, 0x6e, 0x40, 0x49, 0x44, 
+	0x60, 0x08, 0x20, 0x80, 0x6e, 0x80, 0x49, 0x43, 
+	0x60, 0x08, 0x20, 0x00, 0x49, 0x42, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0x41, 0x60, 0x48, 0x48, 0x41, 
+	0x49, 0x3f, 0x60, 0x88, 0x48, 0x40, 0x49, 0x3e, 
+	0x60, 0xc8, 0x20, 0xff, 0x30, 0x01, 0x68, 0x40, 
+	0x49, 0x3e, 0x60, 0x08, 0x20, 0x80, 0x6e, 0xc0, 
+	0x49, 0x3d, 0x60, 0x08, 0x20, 0x80, 0x6f, 0x00, 
+	0x49, 0x3c, 0x60, 0x08, 0x20, 0x80, 0x6f, 0x40, 
+	0x49, 0x3b, 0x60, 0x08, 0x20, 0x80, 0x6f, 0x80, 
+	0x49, 0x3a, 0x60, 0x08, 0x20, 0x80, 0x6f, 0xc0, 
+	0x49, 0x39, 0x60, 0x08, 0x20, 0xff, 0x30, 0x01, 
+	0x68, 0x80, 0x49, 0x38, 0x60, 0x08, 0x47, 0x70, 
+	0x2e, 0x08, 0x9b, 0x28, 0x2e, 0x08, 0x9b, 0x2c, 
+	0x64, 0x00, 0x05, 0x00, 0x2e, 0x08, 0x9b, 0x34, 
+	0x64, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x9b, 0x38, 
+	0x2e, 0x08, 0x9b, 0x30, 0x64, 0x00, 0x04, 0x00, 
+	0x2e, 0x08, 0x9b, 0x3c, 0x9e, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0x9b, 0x54, 0x9e, 0x00, 0x05, 0x00, 
+	0x2e, 0x08, 0x9b, 0x40, 0x2e, 0x08, 0xd2, 0x08, 
+	0x2e, 0x08, 0xd2, 0x0c, 0x2e, 0x08, 0xd2, 0x10, 
+	0x2e, 0x08, 0xd2, 0x14, 0x2e, 0x08, 0x9b, 0x44, 
+	0x2e, 0x08, 0x9b, 0x48, 0x2e, 0x08, 0x9b, 0x58, 
+	0x2e, 0x08, 0x9b, 0x5c, 0x2e, 0x08, 0x9b, 0x60, 
+	0x2e, 0x08, 0x9b, 0x64, 0x2e, 0x08, 0x9b, 0x4c, 
+	0x2e, 0x08, 0x9b, 0x50, 0x2e, 0x08, 0x9d, 0xd8, 
+	0x2e, 0x08, 0x9d, 0xdc, 0x2e, 0x08, 0x9b, 0x68, 
+	0x2e, 0x08, 0x9b, 0x6c, 0x2e, 0x08, 0x9b, 0x98, 
+	0x2e, 0x08, 0x9b, 0x70, 0x2e, 0x08, 0x9b, 0x74, 
+	0x2e, 0x08, 0x9b, 0x78, 0x2e, 0x08, 0x9b, 0x7c, 
+	0x2e, 0x08, 0x9b, 0x80, 0x2e, 0x08, 0x9b, 0x84, 
+	0x2e, 0x08, 0x9b, 0x88, 0x2e, 0x08, 0x9b, 0x8c, 
+	0x2e, 0x08, 0x9b, 0x90, 0x2e, 0x08, 0x9b, 0x94, 
+	0x2e, 0x08, 0x9b, 0x1c, 0x2e, 0x08, 0x9b, 0x20, 
+	0x2e, 0x08, 0xb9, 0xb0, 0x2e, 0x08, 0x9b, 0xc0, 
+	0x2e, 0x08, 0x9b, 0xa0, 0x2e, 0x08, 0x9d, 0xe0, 
+	0x2e, 0x08, 0xb9, 0x88, 0xcc, 0x1f, 0xe0, 0x00, 
+	0xcc, 0x1f, 0xfe, 0x00, 0x2e, 0x08, 0x9b, 0xac, 
+	0x2e, 0x08, 0x9b, 0xc4, 0x2e, 0x08, 0x9b, 0xa4, 
+	0x2e, 0x08, 0x9b, 0xa8, 0x2e, 0x08, 0xb9, 0xac, 
+	0x2e, 0x08, 0xb9, 0x84, 0x2e, 0x08, 0x9b, 0xb4, 
+	0x49, 0x4f, 0x68, 0x0a, 0x23, 0x04, 0x43, 0x1a, 
+	0x60, 0x0a, 0x21, 0xff, 0x4a, 0x4d, 0x68, 0x12, 
+	0x32, 0x40, 0x72, 0x11, 0x21, 0xff, 0x4a, 0x4b, 
+	0x68, 0x12, 0x32, 0x40, 0x76, 0x11, 0x21, 0xff, 
+	0x4a, 0x48, 0x68, 0x12, 0x32, 0x60, 0x72, 0x11, 
+	0x21, 0xff, 0x4a, 0x46, 0x68, 0x12, 0x32, 0x20, 
+	0x72, 0x11, 0x21, 0xff, 0x4a, 0x43, 0x68, 0x12, 
+	0x32, 0x20, 0x76, 0x11, 0x21, 0xff, 0x4a, 0x41, 
+	0x68, 0x12, 0x32, 0x60, 0x76, 0x11, 0x21, 0x00, 
+	0x4a, 0x3e, 0x68, 0x12, 0x32, 0x40, 0x72, 0x91, 
+	0x21, 0x00, 0x4a, 0x3c, 0x68, 0x12, 0x32, 0x40, 
+	0x76, 0x91, 0x21, 0x00, 0x4a, 0x39, 0x68, 0x12, 
+	0x32, 0x60, 0x72, 0x91, 0x21, 0x00, 0x4a, 0x37, 
+	0x68, 0x12, 0x32, 0x20, 0x72, 0x91, 0x21, 0x00, 
+	0x4a, 0x34, 0x68, 0x12, 0x32, 0x20, 0x76, 0x91, 
+	0x21, 0x00, 0x4a, 0x32, 0x68, 0x12, 0x32, 0x60, 
+	0x76, 0x91, 0x21, 0x00, 0x4a, 0x2f, 0x68, 0x12, 
+	0x32, 0x80, 0x70, 0xd1, 0x21, 0x00, 0x4a, 0x2d, 
+	0x68, 0x12, 0x32, 0x80, 0x70, 0x51, 0x21, 0x00, 
+	0x4a, 0x2a, 0x68, 0x12, 0x32, 0x80, 0x70, 0x91, 
+	0x21, 0x00, 0x4a, 0x29, 0x60, 0x11, 0x21, 0x00, 
+	0x4a, 0x28, 0x64, 0x11, 0x21, 0x03, 0x4a, 0x28, 
+	0x61, 0x11, 0x49, 0x28, 0x68, 0x0a, 0x4b, 0x28, 
+	0x43, 0x1a, 0x60, 0x0a, 0x49, 0x26, 0x22, 0x33, 
+	0x06, 0x52, 0x60, 0x51, 0x21, 0x00, 0x4a, 0x25, 
+	0x70, 0x11, 0x21, 0x00, 0x4a, 0x23, 0x70, 0x51, 
+	0x21, 0x00, 0x4a, 0x22, 0x70, 0x91, 0x21, 0x00, 
+	0x4a, 0x20, 0x70, 0xd1, 0x21, 0x00, 0x4a, 0x1f, 
+	0x71, 0x11, 0x21, 0x00, 0x4a, 0x1d, 0x71, 0x51, 
+	0x21, 0x00, 0x4a, 0x1c, 0x71, 0x91, 0x21, 0x00, 
+	0x4a, 0x1a, 0x71, 0xd1, 0x21, 0x00, 0x4a, 0x19, 
+	0x72, 0x11, 0x21, 0x00, 0x4a, 0x17, 0x72, 0x51, 
+	0x21, 0x00, 0x4a, 0x16, 0x72, 0x91, 0x21, 0x00, 
+	0x4a, 0x14, 0x72, 0xd1, 0x21, 0x00, 0x4a, 0x13, 
+	0x73, 0x11, 0x21, 0xff, 0x4a, 0x11, 0x70, 0x11, 
+	0x21, 0x00, 0x4a, 0x10, 0x70, 0x11, 0x21, 0x00, 
+	0x4a, 0x0e, 0x70, 0x51, 0x20, 0x00, 0x28, 0x20, 
+	0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x41, 0x06, 0x08, 
+	0x0e, 0x00, 0xe7, 0xf8, 0x21, 0xff, 0x4a, 0x03, 
+	0x68, 0x12, 0x54, 0x11, 0xe7, 0xf6, 0x47, 0x70, 
+	0x66, 0x00, 0x01, 0x18, 0x2e, 0x08, 0xb9, 0xb0, 
+	0x9e, 0x00, 0x0a, 0x00, 0x9e, 0x00, 0x0a, 0x80, 
+	0x66, 0x00, 0x01, 0x00, 0x66, 0x00, 0x00, 0x08, 
+	0x23, 0x48, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xb4, 
+	0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x06, 0x39, 
+	0x0e, 0x09, 0x29, 0x05, 0xd2, 0x40, 0xa3, 0x02, 
+	0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x03, 0x14, 0x07, 0x0d, 0x13, 0x00, 0x78, 0x10, 
+	0x4b, 0x1f, 0x70, 0x18, 0xe0, 0x38, 0x78, 0x50, 
+	0x4b, 0x1e, 0x68, 0x1b, 0x33, 0x80, 0x71, 0x58, 
+	0xe0, 0x32, 0x78, 0x10, 0x4b, 0x1b, 0x68, 0x1b, 
+	0x33, 0x80, 0x71, 0x18, 0xe0, 0x2c, 0xe0, 0x2b, 
+	0x78, 0x10, 0x4b, 0x17, 0x70, 0x18, 0x78, 0x50, 
+	0x4b, 0x15, 0x70, 0x58, 0x78, 0x90, 0x4b, 0x14, 
+	0x70, 0x98, 0x78, 0xd0, 0x4b, 0x12, 0x70, 0xd8, 
+	0x79, 0x10, 0x4b, 0x11, 0x71, 0x18, 0x79, 0x50, 
+	0x4b, 0x0f, 0x71, 0x58, 0x79, 0x90, 0x4b, 0x0e, 
+	0x71, 0x98, 0x79, 0xd0, 0x4b, 0x0c, 0x71, 0xd8, 
+	0x7a, 0x10, 0x4b, 0x0b, 0x72, 0x18, 0x7a, 0x50, 
+	0x4b, 0x09, 0x72, 0x58, 0x7a, 0x90, 0x4b, 0x08, 
+	0x72, 0x98, 0x7a, 0xd0, 0x4b, 0x06, 0x72, 0xd8, 
+	0x7b, 0x10, 0x4b, 0x05, 0x73, 0x18, 0xe0, 0x03, 
+	0x20, 0x4a, 0xbc, 0x80, 0x47, 0x70, 0xe7, 0xff, 
+	0x20, 0x00, 0xe7, 0xfa, 0xe7, 0xf9, 0x00, 0x00, 
+	0x2e, 0x08, 0xb9, 0xb4, 0x2e, 0x08, 0xb9, 0xb0, 
+	0xb5, 0xf3, 0x1c, 0x07, 0x06, 0x3e, 0x0e, 0x36, 
+	0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0x2e, 0x20, 
+	0xdb, 0x04, 0x20, 0xa2, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0x02, 0xd0, 0x03, 
+	0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 0xd1, 0x0b, 
+	0x48, 0xb8, 0x68, 0x00, 0x30, 0x20, 0x7a, 0x80, 
+	0x28, 0x00, 0xd1, 0x39, 0x48, 0xb5, 0x68, 0x00, 
+	0x30, 0x20, 0x7e, 0x80, 0x28, 0x00, 0xd1, 0x33, 
+	0x2c, 0x00, 0xd1, 0x17, 0x48, 0xb1, 0x68, 0x00, 
+	0x30, 0x40, 0x7a, 0x80, 0x28, 0x00, 0xd1, 0x2b, 
+	0x48, 0xae, 0x68, 0x00, 0x30, 0x40, 0x7e, 0x80, 
+	0x28, 0x00, 0xd1, 0x25, 0x48, 0xab, 0x68, 0x00, 
+	0x30, 0x60, 0x7a, 0x80, 0x28, 0x00, 0xd1, 0x1f, 
+	0x48, 0xa8, 0x68, 0x00, 0x30, 0x20, 0x7e, 0x80, 
+	0x28, 0x00, 0xd1, 0x19, 0x2c, 0x01, 0xd1, 0x19, 
+	0x48, 0xa4, 0x68, 0x00, 0x30, 0x40, 0x7a, 0x80, 
+	0x28, 0x00, 0xd1, 0x11, 0x48, 0xa1, 0x68, 0x00, 
+	0x30, 0x40, 0x7e, 0x80, 0x28, 0x00, 0xd1, 0x0b, 
+	0x48, 0x9e, 0x68, 0x00, 0x30, 0x60, 0x7a, 0x80, 
+	0x28, 0x00, 0xd1, 0x05, 0x48, 0x9b, 0x68, 0x00, 
+	0x30, 0x20, 0x7a, 0x80, 0x28, 0x00, 0xd0, 0x01, 
+	0x20, 0x49, 0xe7, 0xb3, 0x48, 0x97, 0x68, 0x00, 
+	0x55, 0x84, 0x2c, 0xff, 0xd0, 0x73, 0x20, 0x01, 
+	0x49, 0x95, 0x60, 0x48, 0x2c, 0x05, 0xd2, 0x6f, 
+	0xa3, 0x01, 0x5d, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
+	0x02, 0x34, 0x30, 0x30, 0x30, 0x00, 0x20, 0x02, 
+	0x49, 0x90, 0x61, 0x88, 0x48, 0x90, 0x6a, 0xc0, 
+	0x49, 0x90, 0x60, 0x08, 0x48, 0x90, 0x68, 0x01, 
+	0x23, 0x01, 0x07, 0x5b, 0x43, 0x19, 0x60, 0x01, 
+	0x48, 0x8e, 0x49, 0x8b, 0x62, 0xc8, 0x48, 0x8c, 
+	0x68, 0x01, 0x4b, 0x8d, 0x40, 0x19, 0x60, 0x01, 
+	0x20, 0x01, 0x21, 0x31, 0x06, 0x49, 0x61, 0x88, 
+	0x20, 0x15, 0x21, 0x31, 0x06, 0x49, 0x61, 0x08, 
+	0x20, 0x0f, 0x21, 0x31, 0x06, 0x49, 0x61, 0xc8, 
+	0x20, 0x0c, 0x21, 0x31, 0x06, 0x49, 0x61, 0xc8, 
+	0x20, 0x54, 0x21, 0x31, 0x06, 0x49, 0x62, 0xc8, 
+	0x20, 0x37, 0x21, 0x31, 0x06, 0x49, 0x60, 0x88, 
+	0xe0, 0x56, 0x20, 0x00, 0x49, 0x79, 0x61, 0x88, 
+	0xe0, 0x52, 0x20, 0x01, 0x49, 0x77, 0x61, 0x88, 
+	0x20, 0x01, 0x49, 0x7c, 0x62, 0x88, 0x48, 0x7c, 
+	0x78, 0x00, 0x06, 0x80, 0x0e, 0x80, 0x02, 0x80, 
+	0x49, 0x79, 0x78, 0x49, 0x07, 0xc9, 0x0d, 0x89, 
+	0x43, 0x08, 0x49, 0x77, 0x78, 0x89, 0x07, 0xc9, 
+	0x0d, 0xc9, 0x43, 0x08, 0x49, 0x74, 0x78, 0xc9, 
+	0x07, 0x89, 0x0f, 0x89, 0x01, 0x89, 0x43, 0x08, 
+	0x49, 0x71, 0x79, 0x09, 0x07, 0x89, 0x0f, 0x89, 
+	0x01, 0x09, 0x43, 0x08, 0x49, 0x6e, 0x79, 0x49, 
+	0x07, 0x89, 0x0f, 0x89, 0x00, 0x89, 0x43, 0x08, 
+	0x49, 0x6b, 0x79, 0x89, 0x07, 0x89, 0x0f, 0x89, 
+	0x43, 0x08, 0x49, 0x68, 0x62, 0x08, 0x48, 0x68, 
+	0x79, 0xc0, 0x07, 0xc0, 0x0e, 0x40, 0x49, 0x66, 
+	0x7a, 0x09, 0x07, 0xc9, 0xe0, 0x01, 0xe0, 0x21, 
+	0xe0, 0x18, 0x0e, 0xc9, 0x43, 0x08, 0x49, 0x62, 
+	0x7a, 0x49, 0x07, 0xc9, 0x0f, 0x09, 0x43, 0x08, 
+	0x49, 0x5f, 0x7a, 0x89, 0x07, 0xc9, 0x0f, 0x49, 
+	0x43, 0x08, 0x49, 0x5d, 0x7a, 0xc9, 0x07, 0xc9, 
+	0x0f, 0x89, 0x43, 0x08, 0x49, 0x5a, 0x7b, 0x09, 
+	0x07, 0xc9, 0x0f, 0xc9, 0x43, 0x08, 0x49, 0x57, 
+	0x62, 0x48, 0xe0, 0x01, 0x20, 0x4a, 0xe7, 0x1d, 
+	0x48, 0x51, 0x68, 0x01, 0x4b, 0x55, 0x40, 0x19, 
+	0x60, 0x01, 0xe0, 0x8f, 0x48, 0x49, 0x68, 0x00, 
+	0x30, 0x80, 0x78, 0xc0, 0x28, 0x00, 0xd0, 0x08, 
+	0x22, 0x00, 0xb4, 0x04, 0x1c, 0x30, 0x23, 0x00, 
+	0x22, 0x00, 0x49, 0x4f, 0xf7, 0xf4, 0xfc, 0x10, 
+	0xb0, 0x01, 0x20, 0x00, 0x49, 0x42, 0x60, 0x48, 
+	0x48, 0x45, 0x68, 0x01, 0x4b, 0x4b, 0x43, 0x19, 
+	0x60, 0x01, 0x48, 0x4a, 0x21, 0x33, 0x06, 0x49, 
+	0x60, 0x48, 0x48, 0x49, 0x68, 0x01, 0x23, 0x04, 
+	0x43, 0x19, 0x60, 0x01, 0x2c, 0x00, 0xd1, 0x0e, 
+	0x48, 0x3c, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x0a, 
+	0x48, 0x3a, 0x68, 0x00, 0x49, 0x38, 0x62, 0xc8, 
+	0x20, 0x00, 0x49, 0x38, 0x60, 0x08, 0x20, 0x00, 
+	0x21, 0x31, 0x06, 0x49, 0x61, 0x88, 0x20, 0x00, 
+	0x49, 0x30, 0x68, 0x09, 0x31, 0x80, 0x70, 0x48, 
+	0x20, 0x00, 0x49, 0x2e, 0x68, 0x09, 0x31, 0x80, 
+	0x70, 0x88, 0x20, 0x00, 0x49, 0x39, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0x39, 0x64, 0x08, 0x20, 0x03, 
+	0x49, 0x2a, 0x61, 0x08, 0x25, 0x00, 0x2d, 0x20, 
+	0xd3, 0x02, 0xe0, 0x06, 0x35, 0x01, 0xe7, 0xfa, 
+	0x20, 0xff, 0x49, 0x24, 0x68, 0x09, 0x55, 0x48, 
+	0xe7, 0xf8, 0x20, 0xff, 0x49, 0x21, 0x68, 0x09, 
+	0x31, 0x40, 0x72, 0x08, 0x20, 0xff, 0x49, 0x1f, 
+	0x68, 0x09, 0x31, 0x40, 0x76, 0x08, 0x20, 0xff, 
+	0x49, 0x1c, 0x68, 0x09, 0x31, 0x60, 0x72, 0x08, 
+	0x20, 0xff, 0x49, 0x1a, 0x68, 0x09, 0x31, 0x20, 
+	0x72, 0x08, 0x20, 0xff, 0x49, 0x17, 0x68, 0x09, 
+	0x31, 0x20, 0x76, 0x08, 0x20, 0xff, 0x49, 0x15, 
+	0x68, 0x09, 0x31, 0x60, 0x76, 0x08, 0x20, 0x00, 
+	0x49, 0x12, 0x68, 0x09, 0x31, 0x40, 0x72, 0x88, 
+	0x20, 0x00, 0x49, 0x10, 0x68, 0x09, 0x31, 0x40, 
+	0x76, 0x88, 0x20, 0x00, 0x49, 0x0d, 0x68, 0x09, 
+	0x31, 0x60, 0x72, 0x88, 0x20, 0x00, 0x49, 0x0b, 
+	0x68, 0x09, 0x31, 0x20, 0x72, 0x88, 0x20, 0x00, 
+	0x49, 0x08, 0x68, 0x09, 0x31, 0x20, 0x76, 0x88, 
+	0x20, 0x00, 0x49, 0x06, 0x68, 0x09, 0x31, 0x60, 
+	0x76, 0x88, 0x20, 0x00, 0x49, 0x03, 0x68, 0x09, 
+	0x31, 0x80, 0x70, 0xc8, 0x20, 0x00, 0xe6, 0x85, 
+	0xe6, 0x84, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xb0, 
+	0x62, 0x00, 0x03, 0x00, 0x66, 0x00, 0x01, 0x00, 
+	0xa0, 0x00, 0x0d, 0x80, 0x2e, 0x08, 0x20, 0x88, 
+	0x66, 0x00, 0x00, 0x08, 0x2e, 0x01, 0xe1, 0xa8, 
+	0xdf, 0xff, 0xff, 0xff, 0x62, 0x01, 0x00, 0x00, 
+	0x2e, 0x08, 0xb9, 0xb4, 0xfc, 0xb7, 0xff, 0xff, 
+	0x00, 0x00, 0xff, 0xff, 0x23, 0x48, 0x00, 0x00, 
+	0x66, 0x00, 0x01, 0x18, 0x9e, 0x00, 0x0a, 0x00, 
+	0x9e, 0x00, 0x0a, 0x80, 0xb5, 0xf7, 0x1c, 0x17, 
+	0x98, 0x00, 0x06, 0x02, 0x0e, 0x12, 0x99, 0x01, 
+	0x06, 0x0d, 0x0e, 0x2d, 0x48, 0x6a, 0x68, 0x00, 
+	0x5c, 0x81, 0x2a, 0x20, 0xdb, 0x04, 0x20, 0xa2, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x29, 0xff, 0xd1, 0x01, 0x20, 0x4b, 0xe7, 0xf7, 
+	0x48, 0x64, 0x69, 0x80, 0x28, 0x00, 0xd1, 0x03, 
+	0x29, 0x04, 0xd1, 0x01, 0x20, 0x58, 0xe7, 0xef, 
+	0x48, 0x60, 0x69, 0x80, 0x28, 0x00, 0xd1, 0x03, 
+	0x29, 0x02, 0xd0, 0x01, 0x29, 0x03, 0xd1, 0x0b, 
+	0x48, 0x5c, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 
+	0x29, 0x00, 0xd1, 0x05, 0x48, 0x59, 0x69, 0x80, 
+	0x28, 0x01, 0xd1, 0x03, 0x29, 0x01, 0xd0, 0x01, 
+	0x20, 0x4d, 0xe7, 0xd9, 0x29, 0x02, 0xd1, 0x05, 
+	0x48, 0x53, 0x68, 0x00, 0x30, 0x40, 0x7a, 0x80, 
+	0x28, 0x00, 0xd1, 0x17, 0x29, 0x03, 0xd1, 0x05, 
+	0x48, 0x4f, 0x68, 0x00, 0x30, 0x40, 0x7e, 0x80, 
+	0x28, 0x00, 0xd1, 0x0f, 0x29, 0x00, 0xd1, 0x05, 
+	0x48, 0x4b, 0x68, 0x00, 0x30, 0x20, 0x7a, 0x80, 
+	0x28, 0x00, 0xd1, 0x07, 0x29, 0x01, 0xd1, 0x07, 
+	0x48, 0x47, 0x68, 0x00, 0x30, 0x20, 0x7e, 0x80, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0x4e, 0xe7, 0xb7, 
+	0x68, 0x78, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x4c, 
+	0xe7, 0xb2, 0x23, 0x01, 0x01, 0x08, 0x4e, 0x40, 
+	0x68, 0x36, 0x19, 0x80, 0x30, 0x20, 0x72, 0x83, 
+	0x2d, 0x01, 0xd1, 0x0b, 0x20, 0x33, 0x06, 0x40, 
+	0x6e, 0x40, 0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 
+	0x00, 0xd3, 0x4e, 0x3b, 0x68, 0x36, 0x19, 0x9b, 
+	0x60, 0x58, 0xe0, 0x12, 0x2d, 0x02, 0xd1, 0x0a, 
+	0x48, 0x38, 0x6c, 0xc0, 0x23, 0x0d, 0x06, 0x9b, 
+	0x1a, 0xc3, 0x00, 0xd0, 0x4e, 0x34, 0x68, 0x36, 
+	0x19, 0x80, 0x60, 0x43, 0xe0, 0x05, 0x68, 0x3b, 
+	0x00, 0xd0, 0x4e, 0x31, 0x68, 0x36, 0x19, 0x80, 
+	0x60, 0x43, 0x68, 0x3b, 0x01, 0x08, 0x4e, 0x2c, 
+	0x68, 0x36, 0x19, 0x80, 0x62, 0x03, 0x68, 0x7b, 
+	0x01, 0x08, 0x4e, 0x29, 0x68, 0x36, 0x19, 0x80, 
+	0x62, 0x43, 0x01, 0x08, 0x4b, 0x26, 0x68, 0x1b, 
+	0x18, 0xc0, 0x62, 0xc7, 0x01, 0x08, 0x4b, 0x24, 
+	0x68, 0x1b, 0x18, 0xc0, 0x30, 0x20, 0x72, 0x45, 
+	0x01, 0x08, 0x4b, 0x21, 0x68, 0x1b, 0x18, 0xc0, 
+	0x30, 0x20, 0x72, 0x02, 0x20, 0x00, 0x60, 0x78, 
+	0x20, 0x00, 0x72, 0x78, 0x20, 0x00, 0x4b, 0x20, 
+	0x60, 0x18, 0x20, 0x00, 0x4b, 0x1f, 0x64, 0x18, 
+	0x01, 0x08, 0x4b, 0x19, 0x68, 0x1b, 0x18, 0xc0, 
+	0x6a, 0x40, 0x28, 0xbc, 0xdd, 0x01, 0x24, 0xbc, 
+	0xe0, 0x04, 0x01, 0x08, 0x4b, 0x14, 0x68, 0x1b, 
+	0x18, 0xc0, 0x6a, 0x44, 0x48, 0x18, 0x60, 0x04, 
+	0x29, 0x01, 0xd1, 0x14, 0x20, 0x01, 0x4b, 0x17, 
+	0x62, 0x98, 0x48, 0x17, 0x68, 0x03, 0x04, 0x1b, 
+	0x0c, 0x1b, 0x60, 0x03, 0x48, 0x14, 0x04, 0x23, 
+	0x68, 0x06, 0x43, 0x33, 0x60, 0x03, 0x48, 0x13, 
+	0x68, 0x06, 0x23, 0x20, 0x43, 0x33, 0x60, 0x03, 
+	0x20, 0x01, 0x4b, 0x0e, 0x63, 0x18, 0x48, 0x07, 
+	0x69, 0x80, 0x28, 0x00, 0xd1, 0x04, 0x48, 0x0e, 
+	0x68, 0x06, 0x23, 0x28, 0x43, 0x33, 0x60, 0x03, 
+	0x20, 0x00, 0xe7, 0x31, 0xe7, 0x30, 0x00, 0x00, 
+	0x2e, 0x08, 0xb9, 0xb0, 0x66, 0x00, 0x01, 0x00, 
+	0x2e, 0x08, 0x9b, 0x40, 0x66, 0x00, 0x00, 0x80, 
+	0x9e, 0x00, 0x0a, 0x00, 0x9e, 0x00, 0x0a, 0x80, 
+	0x62, 0x00, 0x03, 0x00, 0x62, 0x01, 0x00, 0x00, 
+	0x62, 0x01, 0x00, 0x20, 0x62, 0x01, 0x00, 0x24, 
+	0x64, 0x00, 0x00, 0x60, 0xb5, 0xf3, 0x1c, 0x0f, 
+	0x98, 0x00, 0x06, 0x06, 0x0e, 0x36, 0xb0, 0x82, 
+	0x4d, 0x68, 0x49, 0x69, 0x91, 0x01, 0x48, 0x69, 
+	0x68, 0x00, 0x5d, 0x84, 0x2e, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0xff, 0xd1, 0x02, 
+	0x20, 0x4b, 0xb0, 0x02, 0xe7, 0xf6, 0x48, 0x62, 
+	0x69, 0x80, 0x28, 0x00, 0xd1, 0x05, 0x2c, 0x02, 
+	0xd0, 0x03, 0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 
+	0xd1, 0x0b, 0x48, 0x5d, 0x69, 0x80, 0x28, 0x02, 
+	0xd1, 0x01, 0x2c, 0x00, 0xd1, 0x05, 0x48, 0x5a, 
+	0x69, 0x80, 0x28, 0x01, 0xd1, 0x04, 0x2c, 0x01, 
+	0xd0, 0x02, 0x20, 0x4d, 0xb0, 0x02, 0xe7, 0xdd, 
+	0x48, 0x54, 0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x4f, 0xb0, 0x02, 
+	0xe7, 0xd4, 0x48, 0x50, 0x68, 0x00, 0x30, 0x80, 
+	0x78, 0xc0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x50, 
+	0xb0, 0x02, 0xe7, 0xcb, 0x68, 0x78, 0x28, 0x00, 
+	0xd1, 0x02, 0x20, 0x4c, 0xb0, 0x02, 0xe7, 0xc5, 
+	0x2c, 0x04, 0xd1, 0x08, 0x68, 0x79, 0x20, 0xbc, 
+	0xf0, 0x01, 0xff, 0xac, 0x29, 0x00, 0xd0, 0x02, 
+	0x20, 0x59, 0xb0, 0x02, 0xe7, 0xba, 0x48, 0x43, 
+	0x68, 0x00, 0x30, 0x80, 0x78, 0x80, 0x21, 0x01, 
+	0x40, 0x81, 0x48, 0x41, 0x68, 0x40, 0x40, 0x08, 
+	0x07, 0x80, 0x0f, 0x80, 0xd0, 0x02, 0x20, 0x51, 
+	0xb0, 0x02, 0xe7, 0xab, 0x20, 0x33, 0x06, 0x40, 
+	0x6b, 0x80, 0x90, 0x00, 0x23, 0x04, 0x40, 0x18, 
+	0xd0, 0x02, 0x20, 0x52, 0xb0, 0x02, 0xe7, 0xa1, 
+	0x2c, 0x00, 0xd1, 0x04, 0x48, 0x37, 0x68, 0x01, 
+	0x23, 0xfd, 0x40, 0x19, 0x60, 0x01, 0x20, 0x01, 
+	0x49, 0x32, 0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 
+	0x68, 0x38, 0x49, 0x30, 0x68, 0x09, 0x67, 0x08, 
+	0x68, 0x78, 0x49, 0x2e, 0x68, 0x09, 0x67, 0x48, 
+	0x48, 0x2c, 0x68, 0x00, 0x67, 0xc7, 0x20, 0x00, 
+	0x49, 0x2a, 0x68, 0x09, 0x31, 0x60, 0x76, 0x48, 
+	0x48, 0x28, 0x68, 0x00, 0x30, 0x60, 0x76, 0x06, 
+	0x20, 0x00, 0x60, 0x78, 0x20, 0x00, 0x72, 0x78, 
+	0x48, 0x24, 0x68, 0x00, 0x5d, 0x80, 0x28, 0x01, 
+	0xd1, 0x02, 0x20, 0x01, 0x49, 0x24, 0x62, 0x88, 
+	0x98, 0x00, 0x01, 0x00, 0x19, 0x45, 0x48, 0x1f, 
+	0x68, 0x00, 0x6f, 0x40, 0x28, 0xbc, 0xdd, 0x07, 
+	0x48, 0x20, 0x60, 0xa8, 0x20, 0xbc, 0x49, 0x1b, 
+	0x68, 0x09, 0x31, 0x80, 0x70, 0x08, 0xe0, 0x0d, 
+	0x48, 0x18, 0x68, 0x00, 0x6f, 0x40, 0x23, 0x01, 
+	0x07, 0x9b, 0x43, 0x18, 0x60, 0xa8, 0x48, 0x15, 
+	0x68, 0x00, 0x6f, 0x40, 0x49, 0x13, 0x68, 0x09, 
+	0x31, 0x80, 0x70, 0x08, 0x48, 0x11, 0x68, 0x00, 
+	0x30, 0x80, 0x78, 0x80, 0x00, 0x43, 0x18, 0x18, 
+	0x01, 0x80, 0x99, 0x01, 0x18, 0x41, 0x91, 0x01, 
+	0x48, 0x0c, 0x68, 0x00, 0x6f, 0x00, 0x60, 0x28, 
+	0x99, 0x01, 0x1d, 0x08, 0x60, 0x68, 0x20, 0x01, 
+	0x06, 0x00, 0x60, 0xe8, 0x99, 0x00, 0x20, 0x01, 
+	0x40, 0x88, 0x21, 0x33, 0x06, 0x49, 0x63, 0x48, 
+	0x20, 0x00, 0xb0, 0x02, 0xe7, 0x3a, 0xb0, 0x02, 
+	0xe7, 0x38, 0x00, 0x00, 0x9e, 0x00, 0x09, 0x80, 
+	0x9e, 0x00, 0x0b, 0x80, 0x2e, 0x08, 0xb9, 0xb0, 
+	0x66, 0x00, 0x01, 0x00, 0x62, 0x00, 0x00, 0x1c, 
+	0x62, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0xbc, 
+	0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x81, 0x98, 0x01, 
+	0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 0xb0, 0x82, 
+	0x48, 0xf9, 0x68, 0x00, 0x99, 0x02, 0x5c, 0x44, 
+	0x98, 0x02, 0x28, 0x20, 0xdb, 0x05, 0x20, 0xa2, 
+	0xb0, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x2c, 0xff, 0xd1, 0x02, 0x20, 0x4b, 
+	0xb0, 0x03, 0xe7, 0xf6, 0x48, 0xf1, 0x69, 0x80, 
+	0x28, 0x00, 0xd1, 0x05, 0x2c, 0x02, 0xd0, 0x03, 
+	0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 0xd1, 0x0b, 
+	0x48, 0xec, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 
+	0x2c, 0x00, 0xd1, 0x05, 0x48, 0xe9, 0x69, 0x80, 
+	0x28, 0x01, 0xd1, 0x04, 0x2c, 0x01, 0xd0, 0x02, 
+	0x20, 0x4d, 0xb0, 0x03, 0xe7, 0xdd, 0x48, 0xe4, 
+	0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 
+	0xd0, 0x02, 0x20, 0x4f, 0xb0, 0x03, 0xe7, 0xd4, 
+	0x68, 0x78, 0x28, 0x00, 0xd1, 0x02, 0x20, 0x4c, 
+	0xb0, 0x03, 0xe7, 0xce, 0x2c, 0x04, 0xd1, 0x08, 
+	0x68, 0x79, 0x20, 0xbc, 0xf0, 0x01, 0xfe, 0xce, 
+	0x29, 0x00, 0xd0, 0x02, 0x20, 0x59, 0xb0, 0x03, 
+	0xe7, 0xc3, 0x48, 0xd7, 0x68, 0x00, 0x30, 0x80, 
+	0x78, 0xc0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x50, 
+	0xb0, 0x03, 0xe7, 0xba, 0x2c, 0x00, 0xd1, 0x04, 
+	0x48, 0xd3, 0x68, 0x01, 0x23, 0xfd, 0x40, 0x19, 
+	0x60, 0x01, 0x48, 0xd2, 0x68, 0x01, 0x23, 0x8d, 
+	0x05, 0x9b, 0x43, 0x19, 0x60, 0x01, 0x48, 0xd0, 
+	0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 0x20, 0x01, 
+	0x49, 0xc9, 0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 
+	0x68, 0x38, 0x49, 0xc7, 0x68, 0x09, 0x67, 0x08, 
+	0x68, 0x78, 0x49, 0xc5, 0x68, 0x09, 0x67, 0x48, 
+	0x48, 0xc3, 0x68, 0x00, 0x67, 0xc7, 0x20, 0x00, 
+	0x49, 0xc1, 0x68, 0x09, 0x31, 0x60, 0x76, 0x48, 
+	0x98, 0x02, 0x49, 0xbf, 0x68, 0x09, 0x31, 0x60, 
+	0x76, 0x08, 0x20, 0x00, 0x49, 0xbc, 0x68, 0x09, 
+	0x6f, 0xc9, 0x60, 0x48, 0x20, 0x00, 0x49, 0xba, 
+	0x68, 0x09, 0x6f, 0xc9, 0x72, 0x48, 0x48, 0xb8, 
+	0x68, 0x00, 0x99, 0x02, 0x5c, 0x40, 0x28, 0x01, 
+	0xd1, 0x02, 0x20, 0x01, 0x49, 0xb9, 0x62, 0x88, 
+	0x48, 0xb3, 0x68, 0x00, 0x30, 0x80, 0x78, 0x81, 
+	0x20, 0x01, 0x40, 0x88, 0x49, 0xb1, 0x68, 0x49, 
+	0x40, 0x08, 0x07, 0x80, 0x0f, 0x80, 0xd0, 0x1b, 
+	0x20, 0x00, 0x49, 0xad, 0x68, 0x09, 0x31, 0x60, 
+	0x76, 0x88, 0x20, 0x51, 0x49, 0xaa, 0x68, 0x09, 
+	0x6f, 0xc9, 0x72, 0x48, 0x48, 0xa8, 0x68, 0x00, 
+	0x6f, 0xc0, 0x7a, 0x00, 0x28, 0xff, 0xd0, 0x07, 
+	0x48, 0xa5, 0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x01, 
+	0x20, 0x01, 0x40, 0x88, 0xf0, 0x07, 0xf9, 0xea, 
+	0x20, 0x51, 0xb0, 0x03, 0xe7, 0x55, 0xe1, 0x6c, 
+	0x20, 0x33, 0x06, 0x40, 0x6b, 0x81, 0x91, 0x00, 
+	0x99, 0x00, 0x20, 0x04, 0x40, 0x08, 0xd0, 0x07, 
+	0x20, 0x04, 0xf0, 0x00, 0xfc, 0xb3, 0x20, 0x33, 
+	0x06, 0x40, 0x6b, 0x81, 0x91, 0x00, 0xe7, 0xf3, 
+	0x4d, 0x9d, 0x99, 0x00, 0x01, 0x08, 0x19, 0x45, 
+	0x48, 0x95, 0x68, 0x00, 0x6f, 0x40, 0x28, 0xbc, 
+	0xdd, 0x07, 0x48, 0x9a, 0x60, 0xa8, 0x20, 0xbc, 
+	0x49, 0x91, 0x68, 0x09, 0x31, 0x80, 0x70, 0x08, 
+	0xe0, 0x0d, 0x48, 0x8f, 0x68, 0x00, 0x6f, 0x40, 
+	0x23, 0x01, 0x07, 0x9b, 0x43, 0x18, 0x60, 0xa8, 
+	0x48, 0x8b, 0x68, 0x00, 0x6f, 0x40, 0x49, 0x8a, 
+	0x68, 0x09, 0x31, 0x80, 0x70, 0x08, 0x48, 0x90, 
+	0x90, 0x01, 0x48, 0x87, 0x68, 0x00, 0x30, 0x80, 
+	0x78, 0x80, 0x00, 0x43, 0x18, 0x18, 0x01, 0x80, 
+	0x99, 0x01, 0x18, 0x40, 0x90, 0x01, 0x48, 0x82, 
+	0x68, 0x00, 0x6f, 0x00, 0x60, 0x28, 0x98, 0x01, 
+	0x30, 0x04, 0x60, 0x68, 0x20, 0x01, 0x06, 0x00, 
+	0x60, 0xe8, 0x99, 0x00, 0x20, 0x01, 0x40, 0x88, 
+	0x21, 0x33, 0x06, 0x49, 0x63, 0x48, 0x48, 0x83, 
+	0x6b, 0x00, 0x23, 0x01, 0x06, 0x1b, 0x40, 0x18, 
+	0xd1, 0x03, 0x20, 0x04, 0xf0, 0x00, 0xfc, 0x6a, 
+	0xe7, 0xf5, 0x20, 0x01, 0x06, 0x00, 0x21, 0x33, 
+	0x06, 0x49, 0x60, 0x48, 0x4e, 0x7c, 0x48, 0x72, 
+	0x68, 0x00, 0x30, 0x80, 0x78, 0x80, 0x01, 0x00, 
+	0x19, 0x86, 0x98, 0x01, 0x30, 0x04, 0x60, 0x30, 
+	0x48, 0x78, 0x60, 0x70, 0x48, 0x6c, 0x68, 0x00, 
+	0x30, 0x80, 0x78, 0x00, 0x23, 0x01, 0x07, 0x9b, 
+	0x43, 0x18, 0x60, 0xb0, 0x20, 0x01, 0x05, 0x80, 
+	0x60, 0xf0, 0x48, 0x67, 0x68, 0x00, 0x30, 0x80, 
+	0x78, 0x81, 0x20, 0x01, 0x40, 0x88, 0x49, 0x65, 
+	0x60, 0xc8, 0x48, 0x63, 0x68, 0x00, 0x30, 0x60, 
+	0x7e, 0x00, 0x49, 0x61, 0x68, 0x09, 0x5c, 0x08, 
+	0x28, 0x00, 0xd0, 0x48, 0x28, 0x01, 0xd0, 0x47, 
+	0x28, 0x02, 0xd0, 0x02, 0x28, 0x03, 0xd0, 0x21, 
+	0xe0, 0x5a, 0x48, 0x67, 0x68, 0x01, 0x23, 0x02, 
+	0x43, 0x19, 0x60, 0x01, 0x48, 0x58, 0x68, 0x00, 
+	0x6f, 0x40, 0x49, 0x57, 0x68, 0x09, 0x31, 0x80, 
+	0x78, 0x09, 0x1a, 0x40, 0x28, 0xbc, 0xd8, 0x05, 
+	0x48, 0x5f, 0x68, 0x01, 0x23, 0x10, 0x43, 0x19, 
+	0x60, 0x01, 0xe0, 0x05, 0x48, 0x5c, 0x68, 0x01, 
+	0x23, 0x10, 0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 
+	0x48, 0x59, 0x68, 0x01, 0x23, 0x08, 0x43, 0x19, 
+	0x60, 0x01, 0xe0, 0x39, 0x48, 0x56, 0x68, 0x01, 
+	0x23, 0x04, 0x43, 0x19, 0x60, 0x01, 0x48, 0x48, 
+	0x68, 0x00, 0x6f, 0x40, 0x49, 0x46, 0x68, 0x09, 
+	0x31, 0x80, 0x78, 0x09, 0x1a, 0x40, 0x28, 0xbc, 
+	0xd8, 0x05, 0x48, 0x4f, 0x68, 0x01, 0x23, 0x10, 
+	0x43, 0x19, 0x60, 0x01, 0xe0, 0x05, 0x48, 0x4c, 
+	0x68, 0x01, 0x23, 0x10, 0x43, 0xdb, 0x40, 0x19, 
+	0x60, 0x01, 0x48, 0x49, 0x68, 0x01, 0x23, 0x08, 
+	0x43, 0x19, 0x60, 0x01, 0xe0, 0x18, 0xe0, 0x17, 
+	0x48, 0x46, 0x68, 0x01, 0x04, 0x09, 0x0c, 0x09, 
+	0x60, 0x01, 0x48, 0x44, 0x49, 0x36, 0x68, 0x09, 
+	0x31, 0x80, 0x78, 0x09, 0x04, 0x09, 0x68, 0x02, 
+	0x43, 0x11, 0x60, 0x01, 0x48, 0x40, 0x68, 0x01, 
+	0x23, 0x20, 0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 
+	0x20, 0x01, 0x49, 0x34, 0x63, 0x08, 0xe7, 0xff, 
+	0x48, 0x36, 0x6b, 0x00, 0x23, 0x01, 0x05, 0x9b, 
+	0x40, 0x18, 0xd1, 0x03, 0x20, 0x04, 0xf0, 0x00, 
+	0xfb, 0xd1, 0xe7, 0xf5, 0x20, 0x01, 0x05, 0x80, 
+	0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 0x48, 0x26, 
+	0x68, 0x00, 0x30, 0x80, 0x78, 0x80, 0x23, 0x01, 
+	0x40, 0x58, 0x49, 0x23, 0x68, 0x09, 0x31, 0x80, 
+	0x70, 0x88, 0x48, 0x21, 0x68, 0x00, 0x6f, 0x40, 
+	0x49, 0x1f, 0x68, 0x09, 0x31, 0x80, 0x78, 0x09, 
+	0x1a, 0x40, 0x49, 0x1d, 0x68, 0x09, 0x67, 0x48, 
+	0x48, 0x1b, 0x68, 0x00, 0x6f, 0xc0, 0x30, 0x04, 
+	0x49, 0x19, 0x68, 0x09, 0x31, 0x80, 0x78, 0x09, 
+	0x68, 0x02, 0x18, 0x89, 0x60, 0x01, 0x48, 0x16, 
+	0x68, 0x00, 0x6f, 0x00, 0x49, 0x14, 0x68, 0x09, 
+	0x31, 0x80, 0x78, 0x09, 0x18, 0x40, 0x49, 0x12, 
+	0x68, 0x09, 0x67, 0x08, 0x48, 0x10, 0x68, 0x00, 
+	0x6f, 0x40, 0x28, 0x00, 0xd0, 0x00, 0xe6, 0xb3, 
+	0x48, 0x11, 0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 
+	0x48, 0x0e, 0x68, 0x01, 0x4b, 0x19, 0x40, 0x19, 
+	0x60, 0x01, 0x20, 0x48, 0x49, 0x08, 0x68, 0x09, 
+	0x6f, 0xc9, 0x72, 0x48, 0x20, 0x00, 0x49, 0x06, 
+	0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 0x48, 0x04, 
+	0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x00, 0x28, 0xff, 
+	0xd0, 0x29, 0x48, 0x01, 0xe0, 0x20, 0x00, 0x00, 
+	0x2e, 0x08, 0xb9, 0xb0, 0x66, 0x00, 0x01, 0x00, 
+	0x62, 0x00, 0x00, 0x1c, 0x66, 0x00, 0x00, 0x08, 
+	0x23, 0x48, 0x00, 0x00, 0x62, 0x01, 0x00, 0x00, 
+	0x9e, 0x00, 0x09, 0x80, 0x40, 0x00, 0x00, 0xbc, 
+	0x9e, 0x00, 0x0b, 0x80, 0x66, 0x00, 0x00, 0x80, 
+	0x9e, 0x00, 0x09, 0xc0, 0x66, 0x00, 0x01, 0xf0, 
+	0x64, 0x00, 0x00, 0x60, 0x62, 0x01, 0x00, 0x20, 
+	0x62, 0x01, 0x00, 0x24, 0xfc, 0xb7, 0xff, 0xff, 
+	0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x01, 0x20, 0x01, 
+	0x40, 0x88, 0xf0, 0x07, 0xf8, 0x7f, 0x20, 0x00, 
+	0xb0, 0x03, 0xe5, 0xea, 0xb0, 0x02, 0xb0, 0x01, 
+	0xe5, 0xe7, 0xe5, 0xe6, 0xb5, 0xb0, 0x1c, 0x07, 
+	0x06, 0x3d, 0x0e, 0x2d, 0x48, 0x5d, 0x68, 0x00, 
+	0x5d, 0x44, 0x2d, 0x20, 0xdb, 0x03, 0x20, 0xa2, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x59, 
+	0x68, 0x00, 0x5d, 0x40, 0x28, 0xff, 0xd1, 0x01, 
+	0x20, 0x4b, 0xe7, 0xf5, 0x48, 0x56, 0x69, 0x80, 
+	0x28, 0x00, 0xd1, 0x05, 0x2c, 0x02, 0xd0, 0x03, 
+	0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 0xd1, 0x0b, 
+	0x48, 0x51, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 
+	0x2c, 0x00, 0xd1, 0x05, 0x48, 0x4e, 0x69, 0x80, 
+	0x28, 0x01, 0xd1, 0x04, 0x2c, 0x01, 0xd0, 0x02, 
+	0x20, 0x4d, 0xe7, 0xdd, 0xe0, 0x90, 0x48, 0x4b, 
+	0x68, 0x01, 0x4b, 0x4b, 0x43, 0x19, 0x60, 0x01, 
+	0x48, 0x49, 0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 
+	0x48, 0x48, 0x68, 0x01, 0x23, 0x04, 0x43, 0x19, 
+	0x60, 0x01, 0x20, 0x00, 0x49, 0x41, 0x68, 0x09, 
+	0x31, 0x80, 0x70, 0x88, 0x20, 0x00, 0x49, 0x3f, 
+	0x68, 0x09, 0x31, 0x80, 0x70, 0x48, 0x20, 0xff, 
+	0x49, 0x3c, 0x68, 0x09, 0x55, 0x48, 0x2c, 0x00, 
+	0xd1, 0x03, 0x20, 0x18, 0x21, 0x31, 0x06, 0x49, 
+	0x62, 0x48, 0x01, 0x20, 0x49, 0x37, 0x68, 0x09, 
+	0x18, 0x40, 0x30, 0x20, 0x7a, 0x80, 0x28, 0x00, 
+	0xd0, 0x28, 0x20, 0x00, 0x49, 0x38, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0x38, 0x64, 0x08, 0x20, 0x03, 
+	0x49, 0x31, 0x61, 0x08, 0x21, 0x55, 0x01, 0x20, 
+	0x4a, 0x2e, 0x68, 0x12, 0x18, 0x80, 0x6a, 0xc0, 
+	0x72, 0x41, 0x21, 0x00, 0x01, 0x20, 0x4a, 0x2b, 
+	0x68, 0x12, 0x18, 0x80, 0x30, 0x20, 0x72, 0x81, 
+	0x01, 0x20, 0x49, 0x28, 0x68, 0x09, 0x18, 0x40, 
+	0x6a, 0xc0, 0x7a, 0x00, 0x28, 0xff, 0xd0, 0x09, 
+	0x01, 0x20, 0x49, 0x24, 0x68, 0x09, 0x18, 0x40, 
+	0x6a, 0xc0, 0x7a, 0x01, 0x20, 0x01, 0x40, 0x88, 
+	0xf0, 0x06, 0xff, 0xf8, 0x48, 0x1f, 0x68, 0x00, 
+	0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 0xd0, 0x2b, 
+	0x48, 0x1c, 0x68, 0x00, 0x30, 0x80, 0x78, 0xc0, 
+	0x28, 0x00, 0xd0, 0x0d, 0x20, 0x00, 0x49, 0x19, 
+	0x68, 0x09, 0x31, 0x80, 0x70, 0xc8, 0x22, 0x00, 
+	0xb4, 0x04, 0x1c, 0x28, 0x23, 0x00, 0x22, 0x00, 
+	0x49, 0x1b, 0xf7, 0xf3, 0xfe, 0xcd, 0xb0, 0x01, 
+	0x20, 0x55, 0x49, 0x12, 0x68, 0x09, 0x6f, 0xc9, 
+	0x72, 0x48, 0x20, 0x00, 0x49, 0x0f, 0x68, 0x09, 
+	0x31, 0x60, 0x76, 0x88, 0x48, 0x0d, 0x68, 0x00, 
+	0x6f, 0xc0, 0x7a, 0x00, 0x28, 0xff, 0xd0, 0x07, 
+	0x48, 0x0a, 0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x01, 
+	0x20, 0x01, 0x40, 0x88, 0xf0, 0x06, 0xff, 0xc6, 
+	0x48, 0x09, 0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 
+	0x48, 0x06, 0x68, 0x01, 0x4b, 0x0b, 0x40, 0x19, 
+	0x60, 0x01, 0x20, 0x00, 0xe7, 0x4c, 0xe7, 0x4b, 
+	0xe7, 0x4a, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xb0, 
+	0x66, 0x00, 0x01, 0x00, 0x66, 0x00, 0x00, 0x08, 
+	0x23, 0x48, 0x00, 0x00, 0x66, 0x00, 0x01, 0x18, 
+	0x9e, 0x00, 0x0a, 0x00, 0x9e, 0x00, 0x0a, 0x80, 
+	0x00, 0x00, 0xff, 0xff, 0xfc, 0xb7, 0xff, 0xff, 
+	0xb5, 0xff, 0x1c, 0x1f, 0x98, 0x00, 0x06, 0x02, 
+	0x0e, 0x12, 0x99, 0x01, 0x06, 0x0d, 0x0e, 0x2d, 
+	0x98, 0x02, 0x06, 0x04, 0x0e, 0x24, 0x48, 0x2d, 
+	0x68, 0x00, 0x5c, 0x81, 0x2a, 0x20, 0xdb, 0x04, 
+	0x20, 0xa2, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x29, 0xff, 0xd1, 0x01, 0x20, 0x4b, 
+	0xe7, 0xf7, 0x48, 0x27, 0x69, 0x80, 0x28, 0x00, 
+	0xd1, 0x05, 0x29, 0x02, 0xd0, 0x03, 0x29, 0x03, 
+	0xd0, 0x01, 0x29, 0x04, 0xd1, 0x0b, 0x48, 0x22, 
+	0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 0x29, 0x00, 
+	0xd1, 0x05, 0x48, 0x1f, 0x69, 0x80, 0x28, 0x01, 
+	0xd1, 0x03, 0x29, 0x01, 0xd0, 0x01, 0x20, 0x4d, 
+	0xe7, 0xdf, 0x29, 0x05, 0xd2, 0x2a, 0xa3, 0x02, 
+	0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
+	0x03, 0x07, 0x04, 0x05, 0x06, 0x00, 0xe0, 0x24, 
+	0xe0, 0x23, 0xe0, 0x22, 0xe0, 0x21, 0x01, 0x08, 
+	0x4b, 0x12, 0x68, 0x1b, 0x18, 0xc0, 0x30, 0x20, 
+	0x7a, 0x80, 0x28, 0x00, 0xd1, 0x05, 0x48, 0x0f, 
+	0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 
+	0xd0, 0x02, 0x20, 0x49, 0xe7, 0xc1, 0xe0, 0x13, 
+	0x2d, 0x00, 0xd1, 0x05, 0x00, 0xa0, 0x4b, 0x0b, 
+	0x18, 0xc0, 0x68, 0x00, 0x60, 0x38, 0xe0, 0x04, 
+	0x68, 0x38, 0x00, 0xa6, 0x4b, 0x07, 0x18, 0xf3, 
+	0x60, 0x18, 0xe0, 0x02, 0x20, 0x4a, 0xe7, 0xb0, 
+	0xe7, 0xff, 0x20, 0x00, 0xe7, 0xad, 0xe7, 0xac, 
+	0xe7, 0xab, 0x00, 0x00, 0x2e, 0x08, 0xb9, 0xb0, 
+	0x66, 0x00, 0x01, 0x00, 0x62, 0x01, 0x00, 0x80, 
+	0xb5, 0xf7, 0xb0, 0x82, 0x98, 0x02, 0x06, 0x03, 
+	0x0e, 0x1b, 0x93, 0x00, 0x99, 0x03, 0x06, 0x08, 
+	0x0e, 0x00, 0x90, 0x01, 0x9a, 0x04, 0x06, 0x15, 
+	0x0e, 0x2d, 0xb0, 0x84, 0x4a, 0xca, 0x4f, 0xcb, 
+	0x48, 0xcb, 0x68, 0x00, 0x9b, 0x04, 0x5c, 0xc4, 
+	0x48, 0xca, 0x90, 0x02, 0x21, 0x00, 0x23, 0x00, 
+	0x93, 0x01, 0x9b, 0x04, 0x2b, 0x20, 0xdb, 0x05, 
+	0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2c, 0xff, 0xd1, 0x02, 
+	0x20, 0x4b, 0xb0, 0x06, 0xe7, 0xf6, 0x48, 0xc2, 
+	0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 0x2c, 0x00, 
+	0xd1, 0x03, 0x48, 0xbf, 0x69, 0x80, 0x28, 0x02, 
+	0xd0, 0x02, 0x20, 0x4d, 0xb0, 0x06, 0xe7, 0xe9, 
+	0x98, 0x05, 0x28, 0x01, 0xd1, 0x08, 0x48, 0xb8, 
+	0x68, 0x00, 0x30, 0x80, 0x78, 0xc0, 0x28, 0x00, 
+	0xd0, 0x02, 0x20, 0x50, 0xb0, 0x06, 0xe7, 0xdd, 
+	0x98, 0x05, 0x28, 0x00, 0xd1, 0x05, 0x48, 0xb2, 
+	0x68, 0x00, 0x30, 0x20, 0x7a, 0x80, 0x28, 0x00, 
+	0xd0, 0x08, 0x98, 0x05, 0x28, 0x01, 0xd1, 0x08, 
+	0x48, 0xad, 0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 
+	0x28, 0x00, 0xd1, 0x02, 0x20, 0x5a, 0xb0, 0x06, 
+	0xe7, 0xc8, 0x20, 0x00, 0x4b, 0xa8, 0x68, 0x1b, 
+	0x6f, 0xdb, 0x72, 0x58, 0x98, 0x05, 0x28, 0x00, 
+	0xd1, 0x50, 0x2d, 0x01, 0xd0, 0x01, 0x2d, 0x02, 
+	0xd1, 0x32, 0x4e, 0xa6, 0x68, 0x30, 0x23, 0x01, 
+	0x04, 0xdb, 0x43, 0x18, 0x60, 0x30, 0x20, 0x00, 
+	0x4b, 0xa3, 0x60, 0x18, 0x48, 0x9e, 0x68, 0x00, 
+	0x30, 0x80, 0x78, 0x40, 0x00, 0x43, 0x18, 0x18, 
+	0x01, 0x80, 0x9b, 0x02, 0x18, 0xc0, 0x90, 0x02, 
+	0x98, 0x02, 0x68, 0x01, 0x48, 0x9a, 0x69, 0x80, 
+	0x07, 0x80, 0x0f, 0x80, 0x01, 0x80, 0x43, 0x01, 
+	0x23, 0x20, 0x43, 0x19, 0x4b, 0x99, 0x43, 0x19, 
+	0x98, 0x02, 0x60, 0x01, 0x4e, 0x98, 0x68, 0x30, 
+	0x23, 0x01, 0x04, 0xdb, 0x43, 0x18, 0x60, 0x30, 
+	0x4e, 0x92, 0x68, 0x30, 0x4b, 0x95, 0x40, 0x18, 
+	0x60, 0x30, 0x2c, 0x00, 0xd1, 0x04, 0x20, 0x00, 
+	0x4b, 0x8b, 0x68, 0x1b, 0x33, 0x20, 0x72, 0x98, 
+	0x2d, 0x02, 0xd0, 0x04, 0x20, 0x01, 0x04, 0xc0, 
+	0x23, 0x33, 0x06, 0x5b, 0x60, 0x18, 0x2c, 0x00, 
+	0xd1, 0x0f, 0x20, 0xff, 0x02, 0x00, 0x40, 0x08, 
+	0xd1, 0x0b, 0x2d, 0x02, 0xd0, 0x09, 0x48, 0x82, 
+	0x68, 0x00, 0x30, 0x80, 0x78, 0x40, 0x23, 0x01, 
+	0x40, 0x58, 0x4b, 0x7f, 0x68, 0x1b, 0x33, 0x80, 
+	0x70, 0x58, 0xe0, 0xed, 0x2d, 0x01, 0xd1, 0x73, 
+	0x2c, 0x00, 0xd1, 0x72, 0x20, 0x31, 0x06, 0x40, 
+	0x68, 0x80, 0x23, 0x08, 0x40, 0x18, 0xd1, 0x3a, 
+	0x48, 0x7a, 0x68, 0x06, 0x23, 0x05, 0x05, 0x9b, 
+	0x43, 0x33, 0x60, 0x03, 0x68, 0x10, 0x4b, 0x7c, 
+	0x40, 0x18, 0x60, 0x10, 0x32, 0xc0, 0x68, 0x10, 
+	0x4b, 0x79, 0x40, 0x18, 0x60, 0x10, 0x20, 0x00, 
+	0x4b, 0x6f, 0x68, 0x1b, 0x67, 0x58, 0x20, 0x00, 
+	0x4b, 0x6d, 0x68, 0x1b, 0x33, 0x80, 0x70, 0x18, 
+	0x48, 0x6d, 0x68, 0x80, 0x23, 0x02, 0x40, 0x18, 
+	0xd1, 0x04, 0x20, 0x00, 0x4b, 0x68, 0x68, 0x1b, 
+	0x33, 0x60, 0x76, 0x98, 0x20, 0x5b, 0x4b, 0x66, 
+	0x68, 0x1b, 0x6f, 0xdb, 0x72, 0x58, 0x4e, 0x6d, 
+	0x68, 0x30, 0x23, 0x02, 0x43, 0x18, 0x60, 0x30, 
+	0x4e, 0x67, 0x68, 0x30, 0x23, 0x05, 0x05, 0x9b, 
+	0x43, 0x18, 0x60, 0x30, 0x4e, 0x61, 0x68, 0x30, 
+	0x4b, 0x67, 0x40, 0x18, 0x60, 0x30, 0x20, 0x5b, 
+	0xb0, 0x06, 0xe7, 0x2b, 0xe0, 0xae, 0x48, 0x5d, 
+	0x68, 0x06, 0x23, 0x01, 0x05, 0x9b, 0x43, 0x33, 
+	0x60, 0x03, 0x20, 0x31, 0x06, 0x40, 0x6a, 0x00, 
+	0x23, 0x04, 0x40, 0x18, 0xd1, 0x27, 0x9b, 0x01, 
+	0x20, 0x31, 0x06, 0x40, 0x6b, 0x00, 0x18, 0x1b, 
+	0x93, 0x01, 0x4e, 0x5c, 0x68, 0x30, 0x23, 0x3b, 
+	0x40, 0x18, 0x60, 0x30, 0x4e, 0x57, 0x68, 0x30, 
+	0x23, 0x0e, 0x43, 0x18, 0x60, 0x30, 0x4e, 0x55, 
+	0x68, 0x30, 0x23, 0x0c, 0x40, 0x18, 0x60, 0x30, 
+	0x20, 0x37, 0x23, 0x31, 0x06, 0x5b, 0x60, 0x98, 
+	0x20, 0x01, 0x90, 0x00, 0x98, 0x00, 0x28, 0x64, 
+	0xd3, 0x04, 0xe0, 0x07, 0x98, 0x00, 0x30, 0x01, 
+	0x90, 0x00, 0xe7, 0xf7, 0xe7, 0xfa, 0xe0, 0x01, 
+	0xe0, 0x36, 0xe0, 0x34, 0xe7, 0xd1, 0x4e, 0x46, 
+	0x68, 0x30, 0x23, 0x01, 0x05, 0x9b, 0x43, 0x18, 
+	0x60, 0x30, 0x4e, 0x40, 0x68, 0x30, 0x4b, 0x48, 
+	0x40, 0x18, 0x60, 0x30, 0x48, 0x3c, 0x68, 0x40, 
+	0x28, 0x00, 0xd0, 0x0d, 0x20, 0x5b, 0x4b, 0x38, 
+	0x68, 0x1b, 0x6f, 0xdb, 0x72, 0x58, 0x20, 0x00, 
+	0x4b, 0x35, 0x68, 0x1b, 0x33, 0x60, 0x76, 0x98, 
+	0x20, 0x5b, 0xb0, 0x06, 0xe6, 0xda, 0xe0, 0x5d, 
+	0x48, 0x31, 0x68, 0x00, 0x6f, 0xc0, 0x1d, 0x06, 
+	0x48, 0x2f, 0x68, 0x00, 0x30, 0x80, 0x78, 0x00, 
+	0x9b, 0x01, 0x1a, 0xc0, 0x68, 0x33, 0x18, 0xc0, 
+	0x60, 0x30, 0x20, 0x5c, 0x4b, 0x2a, 0x68, 0x1b, 
+	0x6f, 0xdb, 0x72, 0x58, 0x20, 0x00, 0x4b, 0x28, 
+	0x68, 0x1b, 0x33, 0x60, 0x76, 0x98, 0xe0, 0x3f, 
+	0x20, 0x33, 0x06, 0x40, 0x6b, 0x80, 0x90, 0x03, 
+	0x23, 0x04, 0x40, 0x18, 0xd0, 0x03, 0x20, 0x52, 
+	0xb0, 0x06, 0xe6, 0xb7, 0xe0, 0x3a, 0x98, 0x03, 
+	0x01, 0x00, 0x19, 0xc7, 0x48, 0x1e, 0x68, 0x00, 
+	0x6f, 0x40, 0x28, 0xbc, 0xdd, 0x07, 0x48, 0x29, 
+	0x60, 0xb8, 0x20, 0xbc, 0x4b, 0x1a, 0x68, 0x1b, 
+	0x33, 0x80, 0x70, 0x18, 0xe0, 0x0d, 0x48, 0x18, 
+	0x68, 0x00, 0x6f, 0x40, 0x23, 0x01, 0x07, 0x9b, 
+	0x43, 0x18, 0x60, 0xb8, 0x48, 0x14, 0x68, 0x00, 
+	0x6f, 0x40, 0x4b, 0x13, 0x68, 0x1b, 0x33, 0x80, 
+	0x70, 0x18, 0x48, 0x11, 0x68, 0x00, 0x30, 0x80, 
+	0x78, 0x80, 0x00, 0x43, 0x18, 0x18, 0x01, 0x80, 
+	0x18, 0x82, 0x48, 0x0d, 0x68, 0x00, 0x6f, 0x00, 
+	0x60, 0x38, 0x1d, 0x10, 0x60, 0x78, 0x20, 0x01, 
+	0x06, 0x00, 0x60, 0xf8, 0x9e, 0x03, 0x20, 0x01, 
+	0x40, 0xb0, 0x23, 0x33, 0x06, 0x5b, 0x63, 0x58, 
+	0x20, 0x00, 0xb0, 0x06, 0xe6, 0x7e, 0xb0, 0x04, 
+	0xb0, 0x02, 0xe6, 0x7b, 0xe6, 0x7a, 0x00, 0x00, 
+	0x9e, 0x00, 0x0b, 0x80, 0x9e, 0x00, 0x09, 0x80, 
+	0x2e, 0x08, 0xb9, 0xb0, 0x9e, 0x00, 0x0a, 0x00, 
+	0x66, 0x00, 0x01, 0x00, 0x66, 0x00, 0x00, 0x08, 
+	0x62, 0x00, 0x03, 0x00, 0x80, 0x00, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x04, 0xff, 0xf7, 0xff, 0xff, 
+	0xff, 0xff, 0x00, 0xff, 0x62, 0x00, 0x00, 0x1c, 
+	0xfe, 0xbf, 0xff, 0xff, 0x62, 0x00, 0x00, 0x08, 
+	0xff, 0xbf, 0xff, 0xff, 0x40, 0x00, 0x00, 0xbc, 
+	0x48, 0x07, 0x69, 0x80, 0x28, 0x02, 0xd0, 0x03, 
+	0x48, 0x05, 0x69, 0x80, 0x28, 0x03, 0xd1, 0x04, 
+	0x20, 0x31, 0x06, 0x40, 0x6a, 0x80, 0x47, 0x70, 
+	0xe0, 0x01, 0x20, 0x00, 0xe7, 0xfb, 0xe7, 0xfa, 
+	0x66, 0x00, 0x01, 0x00, 0xb5, 0xb0, 0x27, 0x0f, 
+	0x20, 0x31, 0x06, 0x40, 0x68, 0xc0, 0x09, 0x05, 
+	0xf7, 0xff, 0xff, 0xe6, 0x43, 0xc4, 0x48, 0x18, 
+	0x69, 0x80, 0x28, 0x00, 0xd0, 0x03, 0x48, 0x16, 
+	0x69, 0x80, 0x28, 0x01, 0xd1, 0x03, 0x1c, 0x38, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x2d, 0x09, 
+	0xd2, 0x1e, 0xa3, 0x02, 0x5d, 0x5b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x05, 0x05, 0x05, 0x05, 
+	0x05, 0x07, 0x07, 0x07, 0x0e, 0x00, 0x1c, 0x2f, 
+	0xe0, 0x13, 0x20, 0x08, 0x40, 0x20, 0xd0, 0x01, 
+	0x1c, 0x2f, 0xe0, 0x00, 0x27, 0x02, 0xe0, 0x0c, 
+	0x20, 0x08, 0x40, 0x20, 0xd0, 0x06, 0x20, 0x02, 
+	0x40, 0x20, 0xd0, 0x01, 0x27, 0x07, 0xe0, 0x00, 
+	0x27, 0x08, 0xe0, 0x00, 0x27, 0x02, 0xe0, 0x00, 
+	0xe7, 0xff, 0x1c, 0x38, 0xe7, 0xd8, 0xe7, 0xd7, 
+	0x66, 0x00, 0x01, 0x00, 0x1c, 0x01, 0x29, 0x07, 
+	0xd2, 0x0f, 0xa3, 0x02, 0x5c, 0x5b, 0x00, 0x5b, 
+	0x44, 0x9f, 0x1c, 0x00, 0x04, 0x05, 0x06, 0x09, 
+	0x08, 0x07, 0x0a, 0x00, 0xe0, 0x06, 0xe0, 0x05, 
+	0xe0, 0x04, 0xe0, 0x03, 0xe0, 0x02, 0xe0, 0x01, 
+	0xe0, 0x00, 0xe7, 0xff, 0x20, 0x00, 0x47, 0x70, 
+	0xe7, 0xfd, 0x00, 0x00, 0x20, 0x1d, 0x02, 0x80, 
+	0x69, 0x80, 0x49, 0x06, 0x60, 0x08, 0x20, 0x1d, 
+	0x02, 0x80, 0x69, 0x40, 0x49, 0x04, 0x60, 0x08, 
+	0x20, 0x1d, 0x02, 0x80, 0x69, 0xc0, 0x49, 0x03, 
+	0x60, 0x08, 0x47, 0x70, 0x2e, 0x08, 0xd1, 0xfc, 
+	0x2e, 0x08, 0xd2, 0x00, 0x2e, 0x08, 0xd2, 0x04, 
+	0xb5, 0xf1, 0xb0, 0x81, 0x20, 0x00, 0x4d, 0x21, 
+	0x95, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 
+	0x43, 0xdb, 0x4c, 0x1f, 0x68, 0x64, 0x42, 0x8c, 
+	0xdd, 0x21, 0x1c, 0x0c, 0x31, 0x01, 0x00, 0xa4, 
+	0x9d, 0x00, 0x59, 0x2f, 0x42, 0x9f, 0xd0, 0xf8, 
+	0x4c, 0x19, 0x68, 0x64, 0x42, 0x8c, 0xda, 0x00, 
+	0xe0, 0x15, 0x32, 0x01, 0x1c, 0x0c, 0x31, 0x01, 
+	0x00, 0xa4, 0x9d, 0x00, 0x59, 0x2b, 0x42, 0x9f, 
+	0xd0, 0xf8, 0x02, 0x9c, 0x43, 0x3c, 0x1c, 0x25, 
+	0x1c, 0x04, 0x30, 0x01, 0x00, 0xa4, 0x9e, 0x01, 
+	0x51, 0x35, 0x4c, 0x0f, 0x68, 0x64, 0x42, 0x8c, 
+	0xdb, 0x00, 0x32, 0x01, 0xe7, 0xd9, 0x28, 0x08, 
+	0xd3, 0x02, 0xe0, 0x07, 0x30, 0x01, 0xe7, 0xfa, 
+	0x25, 0x00, 0x43, 0xed, 0x00, 0x84, 0x9e, 0x01, 
+	0x51, 0x35, 0xe7, 0xf7, 0x4c, 0x07, 0x68, 0x24, 
+	0x2c, 0x00, 0xd1, 0x02, 0x24, 0x0d, 0x06, 0xe4, 
+	0x61, 0x22, 0xb0, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0xba, 0x38, 
+	0x2e, 0x08, 0xbb, 0x00, 0x2e, 0x08, 0xd1, 0xf0, 
+	0xb5, 0x80, 0x48, 0xdc, 0x68, 0x00, 0x28, 0x00, 
+	0xd1, 0x04, 0x48, 0xda, 0x68, 0x00, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xff, 0x92, 
+	0x48, 0xd7, 0x49, 0xd8, 0x60, 0x08, 0x48, 0xd8, 
+	0x49, 0xd8, 0x60, 0x08, 0x48, 0xd8, 0x49, 0xd9, 
+	0x60, 0x08, 0x48, 0xd3, 0x49, 0xd8, 0x68, 0x0b, 
+	0x4a, 0xd8, 0x21, 0x00, 0xf0, 0x01, 0xf8, 0xda, 
+	0x20, 0x00, 0x49, 0xd0, 0x68, 0x09, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0xd0, 0x68, 0x09, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0xd0, 0x68, 0x09, 0x60, 0x08, 
+	0x20, 0x00, 0x49, 0xca, 0x68, 0x09, 0x23, 0x07, 
+	0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0x48, 0xce, 
+	0x49, 0xc6, 0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xc9, 0x66, 0xc8, 0x20, 0x00, 0x49, 0xc5, 
+	0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
+	0x66, 0x88, 0x48, 0xc7, 0x49, 0xc1, 0x68, 0x09, 
+	0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 0x66, 0xc8, 
+	0x20, 0x00, 0x49, 0xc0, 0x68, 0x09, 0x23, 0x07, 
+	0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0x48, 0xc0, 
+	0x49, 0xbc, 0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xc9, 0x66, 0xc8, 0x27, 0x00, 0x2f, 0x19, 
+	0xd3, 0x02, 0xe0, 0x38, 0x37, 0x01, 0xe7, 0xfa, 
+	0x48, 0xba, 0x00, 0xb9, 0x4a, 0xb1, 0x68, 0x12, 
+	0x18, 0x89, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 
+	0x62, 0x08, 0x48, 0xb6, 0x00, 0xb9, 0x4a, 0xad, 
+	0x68, 0x12, 0x18, 0x89, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xc9, 0x60, 0x48, 0x48, 0xb1, 0x00, 0xb9, 
+	0x4a, 0xaa, 0x68, 0x12, 0x18, 0x89, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x62, 0x08, 0x48, 0xad, 
+	0x00, 0xb9, 0x4a, 0xa6, 0x68, 0x12, 0x18, 0x89, 
+	0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 0x60, 0x48, 
+	0x48, 0xa8, 0x00, 0xb9, 0x4a, 0xa3, 0x68, 0x12, 
+	0x18, 0x89, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 
+	0x62, 0x08, 0x48, 0xa4, 0x00, 0xb9, 0x4a, 0x9f, 
+	0x68, 0x12, 0x18, 0x89, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xc9, 0x60, 0x48, 0xe7, 0xc6, 0x27, 0x00, 
+	0x2f, 0x07, 0xd3, 0x02, 0xe0, 0x86, 0x37, 0x01, 
+	0xe7, 0xfa, 0x48, 0x9c, 0x00, 0xb9, 0x19, 0xc9, 
+	0x00, 0xc9, 0x4a, 0x92, 0x68, 0x12, 0x18, 0x89, 
+	0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 0x60, 0x08, 
+	0x48, 0x96, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
+	0x4a, 0x8c, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc9, 0x67, 0xc8, 0x48, 0x91, 
+	0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x87, 
+	0x68, 0x12, 0x18, 0x89, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc9, 0x60, 0x48, 0x48, 0x8b, 0x00, 0xb9, 
+	0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x81, 0x68, 0x12, 
+	0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc9, 
+	0x67, 0x88, 0x48, 0x86, 0x00, 0xb9, 0x19, 0xc9, 
+	0x00, 0xc9, 0x4a, 0x7e, 0x68, 0x12, 0x18, 0x89, 
+	0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 0x60, 0x08, 
+	0x48, 0x80, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
+	0x4a, 0x78, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc9, 0x67, 0xc8, 0x48, 0x7b, 
+	0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x73, 
+	0x68, 0x12, 0x18, 0x89, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc9, 0x60, 0x48, 0x48, 0x75, 0x00, 0xb9, 
+	0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x6d, 0x68, 0x12, 
+	0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc9, 
+	0x67, 0x88, 0x48, 0x70, 0x00, 0xb9, 0x19, 0xc9, 
+	0x00, 0xc9, 0x4a, 0x6a, 0x68, 0x12, 0x18, 0x89, 
+	0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 0x60, 0x08, 
+	0x48, 0x6a, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
+	0x4a, 0x64, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc9, 0x67, 0xc8, 0x48, 0x65, 
+	0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x5f, 
+	0x68, 0x12, 0x18, 0x89, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc9, 0x60, 0x48, 0x48, 0x5f, 0x00, 0xb9, 
+	0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x59, 0x68, 0x12, 
+	0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc9, 
+	0x67, 0x88, 0xe7, 0x78, 0x27, 0x00, 0x2f, 0x12, 
+	0xd3, 0x02, 0xe0, 0x56, 0x37, 0x01, 0xe7, 0xfa, 
+	0x48, 0x56, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x4d, 
+	0x68, 0x12, 0x18, 0x89, 0x62, 0xc8, 0x48, 0x53, 
+	0x21, 0x4c, 0x43, 0x79, 0x4a, 0x49, 0x68, 0x12, 
+	0x18, 0x89, 0x62, 0x88, 0x48, 0x4f, 0x21, 0x4c, 
+	0x43, 0x79, 0x4a, 0x46, 0x68, 0x12, 0x18, 0x89, 
+	0x63, 0x08, 0x48, 0x4c, 0x21, 0x4c, 0x43, 0x79, 
+	0x4a, 0x42, 0x68, 0x12, 0x18, 0x89, 0x62, 0x48, 
+	0x48, 0x48, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x41, 
+	0x68, 0x12, 0x18, 0x89, 0x62, 0xc8, 0x48, 0x45, 
+	0x21, 0x4c, 0x43, 0x79, 0x4a, 0x3d, 0x68, 0x12, 
+	0x18, 0x89, 0x62, 0x88, 0x48, 0x41, 0x21, 0x4c, 
+	0x43, 0x79, 0x4a, 0x3a, 0x68, 0x12, 0x18, 0x89, 
+	0x63, 0x08, 0x48, 0x3e, 0x21, 0x4c, 0x43, 0x79, 
+	0x4a, 0x36, 0x68, 0x12, 0x18, 0x89, 0x62, 0x48, 
+	0x48, 0x3a, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x35, 
+	0x68, 0x12, 0x18, 0x89, 0x62, 0xc8, 0x48, 0x37, 
+	0x21, 0x4c, 0x43, 0x79, 0x4a, 0x31, 0x68, 0x12, 
+	0x18, 0x89, 0x62, 0x88, 0x48, 0x33, 0x21, 0x4c, 
+	0x43, 0x79, 0x4a, 0x2e, 0x68, 0x12, 0x18, 0x89, 
+	0x63, 0x08, 0x48, 0x30, 0x21, 0x4c, 0x43, 0x79, 
+	0x4a, 0x2a, 0x68, 0x12, 0x18, 0x89, 0x62, 0x48, 
+	0xe7, 0xa8, 0x20, 0x00, 0x49, 0x25, 0x68, 0x09, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0xc8, 
+	0x20, 0x00, 0x49, 0x22, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x20, 0x00, 
+	0x49, 0x1c, 0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xc9, 0x61, 0xc8, 0x20, 0x00, 0x49, 0x19, 
+	0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 
+	0x61, 0x88, 0x20, 0x00, 0x49, 0x19, 0x68, 0x09, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0xc8, 
+	0x20, 0x00, 0x49, 0x16, 0x68, 0x09, 0x23, 0x0d, 
+	0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x20, 0x92, 
+	0x49, 0x17, 0x60, 0x08, 0x27, 0x00, 0x2f, 0x08, 
+	0xd3, 0x02, 0xe0, 0x08, 0x37, 0x01, 0xe7, 0xfa, 
+	0x20, 0x00, 0x43, 0xc0, 0x00, 0xb9, 0x4b, 0x13, 
+	0x18, 0xc9, 0x64, 0x08, 0xe7, 0xf6, 0x20, 0x10, 
+	0x21, 0x0d, 0x06, 0xc9, 0x61, 0x08, 0x20, 0x01, 
+	0x49, 0x0f, 0x60, 0x08, 0x48, 0x0e, 0x68, 0x00, 
+	0xe6, 0x4d, 0xe6, 0x4c, 0x2e, 0x08, 0x9d, 0xf0, 
+	0x2e, 0x08, 0xbb, 0x28, 0x2e, 0x08, 0xbb, 0x1c, 
+	0x2e, 0x08, 0xc2, 0xc0, 0x2e, 0x08, 0xbb, 0x20, 
+	0x2e, 0x08, 0xca, 0x58, 0x2e, 0x08, 0xbb, 0x24, 
+	0x2e, 0x08, 0xd2, 0x00, 0x00, 0x00, 0x16, 0xc8, 
+	0x3f, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 
+	0x2e, 0x08, 0xd1, 0xf4, 0x68, 0x00, 0x0d, 0x00, 
+	0x2e, 0x08, 0xd1, 0xf0, 0xb5, 0x90, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x1c, 0x39, 0x20, 0x00, 0xf0, 0x00, 
+	0xf8, 0x4d, 0x1c, 0x39, 0x1c, 0x20, 0xf0, 0x00, 
+	0xf8, 0x03, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x68, 0x78, 
+	0x28, 0x07, 0xd9, 0x1d, 0x23, 0x03, 0x02, 0x5b, 
+	0x18, 0xf8, 0x6d, 0x40, 0x28, 0x00, 0xd0, 0x06, 
+	0x23, 0x03, 0x02, 0x5b, 0x18, 0xf8, 0x6d, 0x80, 
+	0x04, 0x00, 0x0c, 0x00, 0xd1, 0x02, 0x20, 0x02, 
+	0x60, 0xb8, 0xe0, 0x01, 0x20, 0x03, 0x60, 0xb8, 
+	0x1d, 0xfd, 0x35, 0x05, 0x23, 0x65, 0x01, 0x1b, 
+	0x18, 0xfe, 0x1c, 0x31, 0x1c, 0x28, 0x4a, 0x11, 
+	0x68, 0x13, 0x22, 0x28, 0xf0, 0x00, 0xfe, 0xee, 
+	0x2c, 0x06, 0xd0, 0x18, 0x00, 0xa0, 0x19, 0x00, 
+	0x00, 0xc0, 0x19, 0xc0, 0x23, 0x2b, 0x01, 0x5b, 
+	0x18, 0xc6, 0x00, 0xa0, 0x19, 0x00, 0x00, 0xc0, 
+	0x19, 0xc0, 0x23, 0xb1, 0x00, 0xdb, 0x18, 0xc5, 
+	0x20, 0x06, 0x1b, 0x00, 0x00, 0x82, 0x18, 0x12, 
+	0x00, 0xd2, 0x1c, 0x31, 0x1c, 0x28, 0x4b, 0x04, 
+	0x68, 0x1b, 0xf0, 0x00, 0xfe, 0xd3, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0xd1, 0xfc, 
+	0x2e, 0x08, 0xd2, 0x04, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x1c, 0x0c, 0x2f, 0x10, 0xd0, 0x13, 0x20, 0x4c, 
+	0x43, 0x78, 0x19, 0x00, 0x1d, 0xc6, 0x36, 0x01, 
+	0x20, 0x4c, 0x43, 0x78, 0x19, 0x00, 0x1d, 0xc5, 
+	0x35, 0x4d, 0x20, 0x10, 0x1b, 0xc0, 0x22, 0x4c, 
+	0x43, 0x42, 0x1c, 0x31, 0x1c, 0x28, 0x4b, 0x03, 
+	0x68, 0x1b, 0xf0, 0x00, 0xfe, 0xb3, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0xd2, 0x04, 
+	0xb5, 0x90, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x39, 
+	0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x07, 0x1c, 0x39, 
+	0x20, 0x00, 0xf0, 0x00, 0xf8, 0x33, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x00, 0xa0, 0x19, 0x00, 0x00, 0xc0, 
+	0x19, 0xc0, 0x23, 0xb1, 0x00, 0xdb, 0x18, 0xc6, 
+	0x00, 0xa0, 0x19, 0x00, 0x00, 0xc0, 0x19, 0xc0, 
+	0x23, 0x2b, 0x01, 0x5b, 0x18, 0xc5, 0x20, 0x06, 
+	0x1b, 0x00, 0x00, 0x82, 0x18, 0x12, 0x00, 0xd2, 
+	0x1c, 0x31, 0x1c, 0x28, 0x4b, 0x09, 0x68, 0x1b, 
+	0xf0, 0x00, 0xfe, 0x84, 0x1d, 0xfe, 0x36, 0x05, 
+	0x23, 0x65, 0x01, 0x1b, 0x18, 0xfd, 0x1c, 0x31, 
+	0x1c, 0x28, 0x4a, 0x05, 0x68, 0x13, 0x22, 0x28, 
+	0xf0, 0x00, 0xfe, 0x78, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0xd2, 0x04, 
+	0x2e, 0x08, 0xd1, 0xfc, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x1c, 0x0c, 0x20, 0x4c, 0x43, 0x78, 0x19, 0x00, 
+	0x1d, 0xc6, 0x36, 0x4d, 0x20, 0x4c, 0x43, 0x78, 
+	0x19, 0x00, 0x1d, 0xc5, 0x35, 0x01, 0x20, 0x10, 
+	0x1b, 0xc0, 0x22, 0x4c, 0x43, 0x42, 0x1c, 0x31, 
+	0x1c, 0x28, 0x4b, 0x03, 0x68, 0x1b, 0xf0, 0x00, 
+	0xfe, 0x59, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xd2, 0x04, 0xb4, 0xb0, 0x1c, 0x02, 
+	0x1c, 0x0f, 0x20, 0x00, 0x1c, 0x03, 0x30, 0x01, 
+	0x00, 0x9b, 0x18, 0x9c, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xe3, 0x68, 0x5b, 0x10, 0x7c, 0x34, 0x01, 
+	0x42, 0xa3, 0xd2, 0x00, 0xe7, 0xf2, 0x38, 0x01, 
+	0x21, 0x18, 0x42, 0x81, 0xd8, 0x02, 0xe0, 0x1a, 
+	0x39, 0x01, 0xe7, 0xfa, 0x00, 0x8b, 0x18, 0x9c, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xe3, 0x69, 0xdc, 
+	0x00, 0x8b, 0x18, 0x9d, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xeb, 0x62, 0x1c, 0x00, 0x8b, 0x18, 0x9c, 
+	0x23, 0x07, 0x02, 0x1b, 0x18, 0xe3, 0x68, 0x1c, 
+	0x00, 0x8b, 0x18, 0x9d, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xeb, 0x60, 0x5c, 0xe7, 0xe4, 0x23, 0x00, 
+	0x2b, 0x00, 0xd0, 0x10, 0x10, 0x7b, 0x1c, 0x5c, 
+	0x00, 0x83, 0x18, 0x9d, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xeb, 0x62, 0x1c, 0x10, 0x7b, 0x1c, 0x5c, 
+	0x00, 0x83, 0x18, 0x9d, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xeb, 0x60, 0x5c, 0xe0, 0x0e, 0x10, 0x7c, 
+	0x00, 0x83, 0x18, 0x9d, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xeb, 0x62, 0x1c, 0x10, 0x7b, 0x1c, 0x5c, 
+	0x00, 0x83, 0x18, 0x9d, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xeb, 0x60, 0x5c, 0xbc, 0xb0, 0x47, 0x70, 
+	0xb4, 0xb0, 0x1c, 0x02, 0x1c, 0x0f, 0x21, 0x00, 
+	0x1c, 0x0b, 0x31, 0x01, 0x00, 0x9b, 0x18, 0x9c, 
+	0x23, 0x07, 0x02, 0x1b, 0x18, 0xe3, 0x68, 0x5b, 
+	0x10, 0x7c, 0x34, 0x01, 0x42, 0xa3, 0xd0, 0x00, 
+	0xe7, 0xf2, 0x39, 0x01, 0x1c, 0x08, 0x28, 0x18, 
+	0xd3, 0x02, 0xe0, 0x1a, 0x30, 0x01, 0xe7, 0xfa, 
+	0x00, 0x83, 0x18, 0x9c, 0x23, 0x0d, 0x01, 0xdb, 
+	0x18, 0xe3, 0x6a, 0x5c, 0x00, 0x83, 0x18, 0x9d, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xeb, 0x62, 0x1c, 
+	0x00, 0x83, 0x18, 0x9c, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xe3, 0x68, 0x9c, 0x00, 0x83, 0x18, 0x9d, 
+	0x23, 0x07, 0x02, 0x1b, 0x18, 0xeb, 0x60, 0x5c, 
+	0xe7, 0xe4, 0x4c, 0x06, 0x23, 0x07, 0x02, 0x1b, 
+	0x18, 0xd3, 0x60, 0x1c, 0x4c, 0x03, 0x23, 0x07, 
+	0x02, 0x1b, 0x18, 0xd3, 0x66, 0x5c, 0xbc, 0xb0, 
+	0x47, 0x70, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0xb4, 0xb0, 0x1c, 0x07, 0x1c, 0x0c, 0x1c, 0x15, 
+	0x6a, 0xa1, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x19, 
+	0x62, 0x39, 0x21, 0x01, 0x02, 0x89, 0x43, 0x29, 
+	0x62, 0x79, 0x6a, 0xe1, 0x05, 0x89, 0x0d, 0x89, 
+	0x61, 0xf9, 0x6b, 0x61, 0x31, 0x01, 0x05, 0x89, 
+	0x0d, 0x89, 0x61, 0xb9, 0x69, 0x61, 0x60, 0xf9, 
+	0x69, 0xa1, 0x61, 0x39, 0x69, 0xe1, 0x61, 0x79, 
+	0x68, 0xa1, 0x23, 0x01, 0x06, 0x1b, 0x40, 0x19, 
+	0xd0, 0x02, 0x49, 0x0f, 0x60, 0xb9, 0xe0, 0x01, 
+	0x21, 0x00, 0x60, 0xb9, 0x6a, 0x60, 0x28, 0x00, 
+	0xd0, 0x0b, 0x68, 0x41, 0x60, 0x39, 0x78, 0x01, 
+	0x00, 0x89, 0x4b, 0x0a, 0x18, 0xc9, 0x60, 0x79, 
+	0x68, 0xb9, 0x88, 0x42, 0x43, 0x11, 0x60, 0xb9, 
+	0xe0, 0x07, 0x21, 0x00, 0x60, 0x39, 0x21, 0x00, 
+	0x60, 0x79, 0x68, 0xb9, 0x0c, 0x09, 0x04, 0x09, 
+	0x60, 0xb9, 0xbc, 0xb0, 0x47, 0x70, 0x00, 0x00, 
+	0xff, 0xff, 0x00, 0x00, 0x68, 0x00, 0x08, 0x00, 
+	0xb4, 0x80, 0x1c, 0x02, 0x1c, 0x0f, 0x69, 0x79, 
+	0x60, 0xd1, 0x69, 0xb9, 0x61, 0x11, 0x69, 0xf9, 
+	0x61, 0x51, 0x68, 0xb9, 0x23, 0x01, 0x06, 0x1b, 
+	0x40, 0x19, 0xd0, 0x02, 0x49, 0x0e, 0x60, 0x91, 
+	0xe0, 0x01, 0x21, 0x00, 0x60, 0x91, 0x6a, 0x78, 
+	0x28, 0x00, 0xd0, 0x0b, 0x68, 0x41, 0x60, 0x11, 
+	0x78, 0x01, 0x00, 0x89, 0x4b, 0x09, 0x18, 0xc9, 
+	0x60, 0x51, 0x68, 0x91, 0x88, 0x43, 0x43, 0x19, 
+	0x60, 0x91, 0xe0, 0x07, 0x21, 0x00, 0x60, 0x11, 
+	0x21, 0x00, 0x60, 0x51, 0x68, 0x91, 0x0c, 0x09, 
+	0x04, 0x09, 0x60, 0x91, 0xbc, 0x80, 0x47, 0x70, 
+	0xff, 0xff, 0x00, 0x00, 0x68, 0x00, 0x08, 0x00, 
+	0x1c, 0x01, 0x48, 0x07, 0x62, 0x08, 0x48, 0x06, 
+	0x62, 0x48, 0x48, 0x05, 0x61, 0xc8, 0x48, 0x04, 
+	0x61, 0x88, 0x20, 0x00, 0x60, 0x08, 0x20, 0x00, 
+	0x60, 0x48, 0x20, 0x00, 0x60, 0x88, 0x47, 0x70, 
+	0x00, 0x00, 0xff, 0xff, 0xb5, 0xb0, 0x1c, 0x07, 
+	0x1c, 0x0c, 0x2c, 0x07, 0xd2, 0x73, 0x25, 0x00, 
+	0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x2f, 0x35, 0x01, 
+	0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 
+	0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 
+	0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 0x00, 0xc9, 
+	0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 
+	0x68, 0x49, 0x42, 0x88, 0xd0, 0x1a, 0x00, 0xa8, 
+	0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
+	0x01, 0xdb, 0x18, 0xc0, 0x68, 0x40, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x00, 0xa8, 
+	0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
+	0x01, 0xdb, 0x18, 0xc0, 0x68, 0x00, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0xf8, 
+	0xf0, 0x00, 0xfb, 0xd2, 0xe7, 0xcf, 0x23, 0xcf, 
+	0x00, 0xdb, 0x18, 0xf8, 0xf7, 0xff, 0xfb, 0xb8, 
+	0x25, 0x00, 0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x54, 
+	0x35, 0x01, 0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 
+	0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc0, 0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 
+	0x00, 0xc9, 0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc9, 0x68, 0x49, 0x42, 0x88, 0xd0, 0x1a, 
+	0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 
+	0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 0x68, 0x40, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
+	0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 
+	0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 0x68, 0x00, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
+	0x48, 0xdb, 0xf0, 0x00, 0xfb, 0x6b, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 
+	0x43, 0x69, 0x19, 0xc9, 0xe0, 0x00, 0xe0, 0x94, 
+	0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0xcc, 
+	0xf0, 0x00, 0xfb, 0x7a, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x30, 0x34, 0xf7, 0xff, 0xfb, 0x60, 
+	0xe7, 0xaa, 0x25, 0x07, 0x2d, 0x11, 0xdb, 0x02, 
+	0xe0, 0x4e, 0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x02, 0x69, 0x80, 0x21, 0x4c, 0x43, 0x69, 
+	0x19, 0xc9, 0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 
+	0x69, 0xc9, 0x42, 0x88, 0xd0, 0x18, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x02, 0x69, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x69, 0x80, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x01, 0x48, 0xb1, 0xf0, 0x00, 0xfb, 0x16, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
+	0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 
+	0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x01, 0x48, 0xa2, 0xf0, 0x00, 
+	0xfb, 0x27, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x30, 0x34, 0xf7, 0xff, 0xfb, 0x0d, 0xe7, 0xb0, 
+	0x25, 0x0a, 0x2d, 0x11, 0xdb, 0x02, 0xe0, 0x1f, 
+	0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 
+	0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
+	0x48, 0x8d, 0xf0, 0x00, 0xfa, 0xcf, 0xe7, 0xdf, 
+	0xe1, 0xca, 0x2c, 0x0e, 0xd3, 0x73, 0x3c, 0x07, 
+	0x1f, 0xe5, 0x42, 0xa5, 0xd3, 0x02, 0xe0, 0x1f, 
+	0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 
+	0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
+	0x48, 0x79, 0xf0, 0x00, 0xfa, 0xd5, 0xe7, 0xdf, 
+	0x1c, 0x25, 0x2d, 0x11, 0xdb, 0x02, 0xe0, 0x50, 
+	0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x69, 0x80, 0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 
+	0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 0x69, 0xc9, 
+	0x42, 0x88, 0xd0, 0x18, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x69, 0xc0, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x69, 0x80, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
+	0x48, 0x61, 0xf0, 0x00, 0xfa, 0x77, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 
+	0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 
+	0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x01, 0x48, 0x53, 0xf0, 0x00, 0xfa, 0x88, 
+	0x20, 0x4c, 0x43, 0x68, 0xe0, 0x00, 0xe0, 0x29, 
+	0x19, 0xc0, 0x30, 0x34, 0xf7, 0xff, 0xfa, 0x6c, 
+	0xe7, 0xae, 0x25, 0x0a, 0x2d, 0x11, 0xdb, 0x02, 
+	0xe0, 0x1f, 0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 
+	0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 
+	0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x01, 0x48, 0x3d, 0xf0, 0x00, 0xfa, 0x2e, 
+	0xe7, 0xdf, 0xe1, 0x29, 0x3c, 0x07, 0x1c, 0x25, 
+	0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x2f, 0x35, 0x01, 
+	0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 
+	0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 
+	0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 0x00, 0xc9, 
+	0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 
+	0x68, 0x49, 0x42, 0x88, 0xd0, 0x1a, 0x00, 0xa8, 
+	0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
+	0x01, 0xdb, 0x18, 0xc0, 0x68, 0x40, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x00, 0xa8, 
+	0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
+	0x01, 0xdb, 0x18, 0xc0, 0x68, 0x00, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0x22, 
+	0xf0, 0x00, 0xfa, 0x26, 0xe7, 0xcf, 0x25, 0x00, 
+	0x42, 0xa5, 0xd3, 0x02, 0xe0, 0x1f, 0x35, 0x01, 
+	0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 
+	0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0x10, 
+	0xf0, 0x00, 0xfa, 0x02, 0xe7, 0xdf, 0x1c, 0x25, 
+	0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x55, 0x35, 0x01, 
+	0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 
+	0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 
+	0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 0x00, 0xc9, 
+	0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 
+	0x68, 0x49, 0x42, 0x88, 0xd0, 0x1d, 0x00, 0xa8, 
+	0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0xe0, 0x01, 
+	0x2e, 0x08, 0xbb, 0x00, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc0, 0x68, 0x40, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x02, 0x00, 0xa8, 0x19, 0x40, 
+	0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 
+	0x18, 0xc0, 0x68, 0x00, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x01, 0x48, 0x50, 0xf0, 0x00, 
+	0xf9, 0x9d, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 
+	0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0x42, 
+	0xf0, 0x00, 0xf9, 0xae, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x30, 0x34, 0xf7, 0xff, 0xf9, 0x94, 
+	0xe7, 0xa9, 0x25, 0x07, 0x2d, 0x11, 0xdb, 0x02, 
+	0xe0, 0x4e, 0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x02, 0x69, 0x80, 0x21, 0x4c, 0x43, 0x69, 
+	0x19, 0xc9, 0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 
+	0x69, 0xc9, 0x42, 0x88, 0xd0, 0x18, 0x20, 0x4c, 
+	0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
+	0x38, 0x02, 0x69, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
+	0x69, 0x80, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
+	0x1c, 0x01, 0x48, 0x27, 0xf0, 0x00, 0xf9, 0x4a, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
+	0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 
+	0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
+	0x43, 0x98, 0x1c, 0x01, 0x48, 0x18, 0xf0, 0x00, 
+	0xf9, 0x5b, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
+	0x30, 0x34, 0xf7, 0xff, 0xf9, 0x41, 0xe7, 0xb0, 
+	0x25, 0x0a, 0x2d, 0x11, 0xdb, 0x02, 0xe0, 0x1f, 
+	0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
+	0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 
+	0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
+	0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
+	0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
+	0x48, 0x03, 0xf0, 0x00, 0xf9, 0x03, 0xe7, 0xdf, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0xbb, 0x00, 0xb4, 0x90, 0x1c, 0x02, 
+	0x1c, 0x0f, 0x3a, 0x01, 0x2f, 0x01, 0xd1, 0x0d, 
+	0x09, 0x50, 0x00, 0x80, 0x49, 0x0d, 0x58, 0x08, 
+	0x06, 0xd4, 0x0e, 0xe4, 0x21, 0x01, 0x40, 0xa1, 
+	0x43, 0x08, 0x09, 0x51, 0x00, 0x89, 0x4b, 0x09, 
+	0x50, 0x58, 0xe0, 0x0d, 0x09, 0x50, 0x00, 0x80, 
+	0x49, 0x06, 0x58, 0x08, 0x06, 0xd4, 0x0e, 0xe4, 
+	0x21, 0x01, 0x40, 0xa1, 0x43, 0xc9, 0x40, 0x01, 
+	0x09, 0x50, 0x00, 0x80, 0x4b, 0x01, 0x50, 0x19, 
+	0xbc, 0x90, 0x47, 0x70, 0x2e, 0x08, 0xd1, 0xf8, 
+	0xb4, 0x80, 0x1c, 0x01, 0x39, 0x01, 0x09, 0x48, 
+	0x00, 0x80, 0x4a, 0x08, 0x58, 0x10, 0x06, 0xca, 
+	0x0e, 0xd2, 0x27, 0x01, 0x40, 0x97, 0x1c, 0x3b, 
+	0x40, 0x18, 0xd0, 0x03, 0x20, 0x01, 0xbc, 0x80, 
+	0x47, 0x70, 0xe0, 0x01, 0x20, 0x00, 0xe7, 0xfa, 
+	0xe7, 0xf9, 0x00, 0x00, 0x2e, 0x08, 0xd1, 0xf8, 
+	0xb4, 0xf0, 0x1c, 0x07, 0x1c, 0x0a, 0x68, 0x54, 
+	0x6a, 0xf8, 0x05, 0x86, 0x0d, 0xb6, 0x2c, 0x07, 
+	0xda, 0x01, 0x1c, 0x20, 0xe0, 0x00, 0x20, 0x07, 
+	0x1c, 0x05, 0x21, 0x00, 0x42, 0xa9, 0xd3, 0x02, 
+	0xe0, 0x15, 0x31, 0x01, 0xe7, 0xfa, 0x00, 0x88, 
+	0x18, 0x40, 0x00, 0xc0, 0x18, 0x80, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 0x42, 0xb0, 
+	0xd1, 0x08, 0x00, 0x88, 0x18, 0x40, 0x00, 0xc0, 
+	0x18, 0x80, 0x23, 0x2b, 0x01, 0x5b, 0x18, 0xc0, 
+	0xbc, 0xf0, 0x47, 0x70, 0xe7, 0xe9, 0x1f, 0xe0, 
+	0x28, 0x11, 0xda, 0x01, 0x1f, 0xe0, 0xe0, 0x00, 
+	0x20, 0x11, 0x1c, 0x05, 0x21, 0x00, 0x42, 0xa9, 
+	0xd3, 0x02, 0xe0, 0x0d, 0x31, 0x01, 0xe7, 0xfa, 
+	0x20, 0x4c, 0x43, 0x48, 0x18, 0x80, 0x6a, 0x80, 
+	0x42, 0xb0, 0xd1, 0x04, 0x20, 0x4c, 0x43, 0x48, 
+	0x18, 0x80, 0x30, 0x0c, 0xe7, 0xe4, 0xe7, 0xf1, 
+	0x20, 0x00, 0xe7, 0xe1, 0xe7, 0xe0, 0xb5, 0x90, 
+	0x48, 0x07, 0x68, 0x04, 0x48, 0x07, 0x68, 0x07, 
+	0x1c, 0x39, 0x1c, 0x20, 0x4a, 0x06, 0x68, 0x13, 
+	0x22, 0xf3, 0x00, 0xd2, 0xf0, 0x00, 0xf9, 0xca, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0xbb, 0x20, 0x2e, 0x08, 0xbb, 0x24, 
+	0x2e, 0x08, 0xd1, 0xfc, 0xb4, 0xf0, 0x1c, 0x01, 
+	0xb0, 0x83, 0x22, 0x00, 0x68, 0x4b, 0x2b, 0x07, 
+	0xdd, 0x01, 0x23, 0x07, 0xe0, 0x00, 0x68, 0x4b, 
+	0x1c, 0x1c, 0x23, 0x00, 0x43, 0xdb, 0x93, 0x02, 
+	0x23, 0x00, 0x43, 0xdb, 0x93, 0x01, 0x23, 0x00, 
+	0x93, 0x00, 0x4b, 0x17, 0x68, 0x1b, 0x2b, 0x00, 
+	0xd0, 0x07, 0x4b, 0x15, 0x68, 0x1b, 0x6a, 0xdb, 
+	0x93, 0x02, 0x4b, 0x13, 0x68, 0x1b, 0x6b, 0x5b, 
+	0x93, 0x01, 0x20, 0x00, 0x42, 0xa0, 0xd3, 0x02, 
+	0xe0, 0x16, 0x30, 0x01, 0xe7, 0xfa, 0x00, 0x83, 
+	0x18, 0x1b, 0x00, 0xdb, 0x18, 0x5d, 0x23, 0x05, 
+	0x02, 0x1b, 0x18, 0xeb, 0x6e, 0x9f, 0x04, 0x3b, 
+	0x0c, 0x1b, 0xd0, 0x08, 0x0c, 0x3b, 0x04, 0x1b, 
+	0xd0, 0x05, 0x9b, 0x00, 0x18, 0xc5, 0x26, 0x01, 
+	0x40, 0xae, 0x1c, 0x33, 0x43, 0x1a, 0xe7, 0xe8, 
+	0x23, 0x0d, 0x01, 0xdb, 0x18, 0xcb, 0x61, 0xda, 
+	0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0xb9, 0xc4, 0xb4, 0x80, 0x1c, 0x01, 
+	0x20, 0x00, 0x68, 0x0a, 0x42, 0x90, 0xdb, 0x02, 
+	0xe0, 0x07, 0x30, 0x01, 0xe7, 0xf9, 0x23, 0x00, 
+	0x43, 0xdb, 0x68, 0x8a, 0x00, 0x87, 0x51, 0xd3, 
+	0xe7, 0xf7, 0x22, 0x00, 0x43, 0xd2, 0x68, 0x8b, 
+	0x68, 0x0f, 0x00, 0xbf, 0x51, 0xda, 0x23, 0x00, 
+	0x43, 0xdb, 0x68, 0x8a, 0x68, 0x0f, 0x00, 0xbf, 
+	0x19, 0xd2, 0x60, 0x53, 0x22, 0x00, 0x60, 0x4a, 
+	0xbc, 0x80, 0x47, 0x70, 0xb4, 0xf0, 0x1c, 0x03, 
+	0x1c, 0x0c, 0x1c, 0x17, 0x68, 0x9a, 0xca, 0x40, 
+	0x42, 0xa6, 0xd2, 0x00, 0xe7, 0xfb, 0x3a, 0x04, 
+	0x1c, 0x11, 0xc9, 0x40, 0x42, 0xbe, 0xd2, 0x00, 
+	0xe7, 0xfb, 0x39, 0x04, 0x68, 0x10, 0x42, 0xa0, 
+	0xd1, 0x02, 0x68, 0x08, 0x42, 0xb8, 0xd0, 0x02, 
+	0x20, 0xff, 0xbc, 0xf0, 0x47, 0x70, 0x39, 0x04, 
+	0x68, 0x98, 0x68, 0x5e, 0x00, 0xb6, 0x19, 0x85, 
+	0x68, 0x58, 0x38, 0x02, 0x60, 0x58, 0x68, 0x50, 
+	0x60, 0x10, 0x32, 0x04, 0x42, 0x8a, 0xd3, 0xfa, 
+	0x68, 0x88, 0x60, 0x08, 0x31, 0x04, 0x42, 0xa9, 
+	0xd3, 0xfa, 0x20, 0x00, 0xe7, 0xe9, 0xe7, 0xe8, 
+	0xb4, 0xf0, 0x1c, 0x03, 0x1c, 0x0c, 0x1c, 0x17, 
+	0x68, 0x58, 0x68, 0x1e, 0x3e, 0x01, 0x42, 0xb0, 
+	0xdb, 0x02, 0x20, 0xff, 0xbc, 0xf0, 0x47, 0x70, 
+	0x68, 0x9a, 0xca, 0x40, 0x42, 0xa6, 0xd2, 0x00, 
+	0xe7, 0xfb, 0x3a, 0x04, 0x1c, 0x15, 0xcd, 0x40, 
+	0x42, 0xbe, 0xd2, 0x00, 0xe7, 0xfb, 0x68, 0x58, 
+	0x30, 0x02, 0x60, 0x58, 0x68, 0x98, 0x68, 0x5e, 
+	0x00, 0xb6, 0x19, 0x80, 0x1f, 0xc1, 0x39, 0x01, 
+	0x68, 0x08, 0x60, 0x88, 0x39, 0x04, 0x1d, 0xc8, 
+	0x30, 0x01, 0x42, 0xa8, 0xd8, 0xf8, 0x60, 0x8f, 
+	0x68, 0x08, 0x60, 0x48, 0x39, 0x04, 0x1d, 0x08, 
+	0x42, 0x90, 0xd8, 0xf9, 0x60, 0x14, 0x20, 0x00, 
+	0xe7, 0xd8, 0xe7, 0xd7, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x1c, 0x0c, 0xb0, 0x81, 0x1c, 0x38, 0x21, 0x00, 
+	0xf0, 0x0e, 0xfc, 0x1a, 0x1c, 0x06, 0x1c, 0x38, 
+	0x21, 0x01, 0xf0, 0x0e, 0xfc, 0x15, 0x90, 0x00, 
+	0x1c, 0x31, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x50, 
+	0x49, 0x20, 0x68, 0x09, 0x60, 0x08, 0x99, 0x00, 
+	0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x49, 0x49, 0x1e, 
+	0x68, 0x09, 0x60, 0x08, 0x48, 0x1b, 0x68, 0x00, 
+	0x68, 0x05, 0x48, 0x1c, 0x68, 0x01, 0x23, 0x02, 
+	0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 0x2c, 0x00, 
+	0xd0, 0x0c, 0x48, 0x19, 0x68, 0x00, 0x78, 0x00, 
+	0x28, 0x00, 0xd0, 0x07, 0x48, 0x14, 0x68, 0x00, 
+	0x68, 0x05, 0x48, 0x14, 0x68, 0x01, 0x23, 0x02, 
+	0x43, 0x19, 0x60, 0x01, 0x1c, 0x20, 0x49, 0x13, 
+	0x68, 0x09, 0x70, 0x08, 0x48, 0x12, 0x63, 0xc5, 
+	0x20, 0x3f, 0x04, 0x00, 0x40, 0x28, 0x0c, 0x00, 
+	0x49, 0x10, 0x62, 0x08, 0x20, 0xff, 0x02, 0x00, 
+	0x40, 0x28, 0x0a, 0x00, 0x49, 0x0d, 0x62, 0x48, 
+	0x06, 0xa8, 0x0e, 0x80, 0x23, 0x80, 0x43, 0x18, 
+	0x49, 0x0a, 0x62, 0x88, 0x1c, 0x28, 0xb0, 0x01, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 
+	0xe7, 0xfa, 0x00, 0x00, 0x2e, 0x08, 0xd2, 0x08, 
+	0x2e, 0x08, 0xd2, 0x0c, 0x6a, 0x00, 0x00, 0x18, 
+	0x2e, 0x08, 0xd2, 0x10, 0x2e, 0x08, 0xd2, 0x14, 
+	0x68, 0x00, 0x0d, 0x00, 0x72, 0x00, 0x01, 0x00, 
+	0xb4, 0x80, 0x1c, 0x02, 0x1c, 0x0f, 0x06, 0xb9, 
+	0x0e, 0x89, 0x20, 0x01, 0x03, 0x80, 0x40, 0x10, 
+	0x09, 0xc0, 0x43, 0x01, 0x20, 0xf0, 0x40, 0x10, 
+	0x01, 0x40, 0x43, 0x01, 0x07, 0x10, 0x0f, 0x00, 
+	0x03, 0x00, 0x43, 0x01, 0x20, 0x07, 0x02, 0xc0, 
+	0x40, 0x10, 0x01, 0x40, 0x43, 0x01, 0x20, 0x07, 
+	0x02, 0x00, 0x40, 0x10, 0x02, 0xc0, 0x43, 0x01, 
+	0x1c, 0x08, 0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 
+	0xb5, 0xff, 0x1c, 0x05, 0x1c, 0x0c, 0x1c, 0x17, 
+	0x9b, 0x03, 0x06, 0x18, 0x16, 0x06, 0x20, 0x33, 
+	0x06, 0x40, 0x6b, 0x80, 0x1c, 0x01, 0x20, 0x04, 
+	0x40, 0x08, 0xd0, 0x05, 0x20, 0xd0, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xe0, 0x17, 
+	0x23, 0x04, 0x43, 0xdb, 0x40, 0x19, 0x01, 0x08, 
+	0x4b, 0x0a, 0x68, 0x1b, 0x18, 0xc2, 0x60, 0x15, 
+	0x60, 0x54, 0x2e, 0xfe, 0xd0, 0x04, 0x20, 0x01, 
+	0x40, 0xb0, 0x60, 0xd0, 0x4b, 0x06, 0x43, 0x1f, 
+	0x60, 0x97, 0x20, 0x01, 0x40, 0x88, 0x23, 0x33, 
+	0x06, 0x5b, 0x63, 0x58, 0x20, 0x00, 0xe7, 0xe2, 
+	0xe7, 0xe1, 0x00, 0x00, 0x2e, 0x08, 0x20, 0x8c, 
+	0x80, 0x00, 0x00, 0x00, 0xb4, 0xb0, 0x1c, 0x01, 
+	0x06, 0x08, 0x16, 0x04, 0x4f, 0x0c, 0x22, 0x00, 
+	0x20, 0x00, 0x28, 0x04, 0xd3, 0x02, 0xe0, 0x0b, 
+	0x30, 0x01, 0xe7, 0xfa, 0x01, 0x03, 0x19, 0xdb, 
+	0x68, 0x5b, 0x42, 0xa3, 0xd1, 0x03, 0x25, 0x01, 
+	0x40, 0x85, 0x1c, 0x2b, 0x43, 0x1a, 0xe7, 0xf3, 
+	0x23, 0x33, 0x06, 0x5b, 0x6c, 0x1b, 0x40, 0x13, 
+	0xd0, 0x00, 0xe7, 0xf9, 0xbc, 0xb0, 0x47, 0x70, 
+	0x9e, 0x00, 0x00, 0xc0, 0xe3, 0xa0, 0x14, 0x62, 
+	0xe5, 0x91, 0x10, 0x14, 0xe2, 0x01, 0x00, 0xff, 
+	0xe5, 0x9f, 0x10, 0x2c, 0xe5, 0xd1, 0x10, 0x00, 
+	0xe3, 0x51, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x05, 
+	0xe5, 0x9f, 0x10, 0x1c, 0xe5, 0xd1, 0x10, 0x00, 
+	0xe3, 0xa0, 0x20, 0x01, 0xe1, 0xa0, 0x11, 0x12, 
+	0xe3, 0xa0, 0x24, 0x66, 0xe5, 0x82, 0x10, 0x10, 
+	0xe3, 0xa0, 0x14, 0x62, 0xe5, 0x81, 0x00, 0x14, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x08, 0xb9, 0xb4, 
+	0x47, 0x00, 0x00, 0x00, 0x47, 0x08, 0x00, 0x00, 
+	0x47, 0x10, 0x00, 0x00, 0x47, 0x18, 0x00, 0x00, 
+	0x47, 0x20, 0x00, 0x00, 0x47, 0x28, 0x00, 0x00, 
+	0x47, 0x30, 0x00, 0x00, 0x47, 0x38, 0x00, 0x00, 
+	0x17, 0xcb, 0x40, 0x59, 0x1a, 0xc9, 0x17, 0xc2, 
+	0x40, 0x50, 0x1a, 0x80, 0xd1, 0x01, 0xf0, 0x00, 
+	0xf9, 0xf1, 0xb4, 0x0c, 0x08, 0x4b, 0x1c, 0x02, 
+	0x42, 0x9a, 0xd8, 0x00, 0x00, 0x52, 0xd3, 0xfb, 
+	0x23, 0x00, 0xe0, 0x00, 0x08, 0x52, 0x42, 0x91, 
+	0x41, 0x5b, 0x42, 0x91, 0xd3, 0x00, 0x1a, 0x89, 
+	0x42, 0x82, 0xd1, 0xf7, 0x1c, 0x18, 0xbc, 0x0c, 
+	0x40, 0x5a, 0x40, 0x50, 0x1a, 0x80, 0x40, 0x59, 
+	0x1a, 0xc9, 0x47, 0x70, 0x08, 0x4b, 0x1c, 0x02, 
+	0xd1, 0x01, 0xf0, 0x00, 0xf9, 0xd3, 0x42, 0x9a, 
+	0xd8, 0x00, 0x00, 0x52, 0xd3, 0xfb, 0x23, 0x00, 
+	0xe0, 0x00, 0x08, 0x52, 0x42, 0x91, 0x41, 0x5b, 
+	0x42, 0x91, 0xd3, 0x00, 0x1a, 0x89, 0x42, 0x82, 
+	0xd1, 0xf7, 0x1c, 0x18, 0x47, 0x70, 0x00, 0x00, 
+	0x3a, 0x20, 0xd5, 0x09, 0x42, 0x53, 0x32, 0x20, 
+	0x40, 0xd0, 0x46, 0x94, 0x1c, 0x0a, 0x40, 0x9a, 
+	0x43, 0x10, 0x46, 0x62, 0x40, 0xd1, 0x47, 0x70, 
+	0x1c, 0x08, 0x40, 0xd0, 0x21, 0x00, 0x47, 0x70, 
+	0x40, 0x10, 0x40, 0x19, 0x47, 0x70, 0x00, 0x00, 
+	0x47, 0x70, 0x00, 0x00, 0x1a, 0x43, 0x42, 0x93, 
+	0xd3, 0x30, 0x46, 0x84, 0x07, 0x8b, 0xd0, 0x07, 
+	0x1e, 0x52, 0xd3, 0x29, 0x78, 0x0b, 0x70, 0x03, 
+	0x1c, 0x40, 0x1c, 0x49, 0x07, 0x8b, 0xd1, 0xf7, 
+	0x07, 0x83, 0xd1, 0x17, 0x3a, 0x10, 0xd3, 0x05, 
+	0xb4, 0xb0, 0xc9, 0xb8, 0xc0, 0xb8, 0x3a, 0x10, 
+	0xd2, 0xfb, 0xbc, 0xb0, 0x32, 0x0c, 0xd3, 0x0f, 
+	0xc9, 0x08, 0xc0, 0x08, 0x1f, 0x12, 0xd2, 0xfb, 
+	0xe0, 0x0a, 0xc9, 0x08, 0x70, 0xc3, 0x0a, 0x1b, 
+	0x70, 0x83, 0x0a, 0x1b, 0x70, 0x43, 0x0a, 0x1b, 
+	0x70, 0x03, 0x1d, 0x00, 0x1f, 0x12, 0xd2, 0xf4, 
+	0x1c, 0xd2, 0xd3, 0x05, 0x78, 0x0b, 0x70, 0x03, 
+	0x1c, 0x49, 0x1c, 0x40, 0x1e, 0x52, 0xd2, 0xf9, 
+	0x46, 0x60, 0x47, 0x70, 0x1c, 0x03, 0x43, 0x0b, 
+	0x43, 0x13, 0x07, 0x9b, 0xd1, 0x04, 0x1f, 0x12, 
+	0x58, 0x8b, 0x50, 0x83, 0xd1, 0xfb, 0x47, 0x70, 
+	0x1e, 0x52, 0x5c, 0x8b, 0x54, 0x83, 0xd1, 0xfb, 
+	0x47, 0x70, 0x00, 0x00, 0x1c, 0x02, 0x43, 0x0a, 
+	0x07, 0x92, 0xd1, 0x1a, 0x46, 0xbc, 0xb4, 0x30, 
+	0x4c, 0x11, 0x01, 0xe5, 0xc8, 0x04, 0xc9, 0x08, 
+	0x1a, 0xd7, 0xd1, 0x09, 0x1b, 0x17, 0x43, 0x97, 
+	0x40, 0x2f, 0xd0, 0xf7, 0x20, 0x00, 0xbc, 0x30, 
+	0x46, 0x67, 0x47, 0x70, 0x02, 0x12, 0x02, 0x1b, 
+	0x0e, 0x11, 0x0e, 0x18, 0x1a, 0x08, 0xd1, 0x01, 
+	0x29, 0x00, 0xd1, 0xf7, 0xbc, 0x30, 0x46, 0x67, 
+	0x47, 0x70, 0x78, 0x02, 0x78, 0x0b, 0x1a, 0xd2, 
+	0xd1, 0x03, 0x1c, 0x40, 0x1c, 0x49, 0x2b, 0x00, 
+	0xd1, 0xf7, 0x1c, 0x10, 0x47, 0x70, 0x00, 0x00, 
+	0x01, 0x01, 0x01, 0x01, 0x42, 0x41, 0x46, 0x8c, 
+	0x07, 0x83, 0xd0, 0x05, 0x78, 0x03, 0x2b, 0x00, 
+	0xd0, 0x16, 0x1c, 0x40, 0x07, 0x83, 0xd1, 0xf9, 
+	0x49, 0x0a, 0xc8, 0x04, 0x09, 0xc9, 0x1a, 0x53, 
+	0x43, 0x93, 0x01, 0xc9, 0x40, 0x0b, 0xd0, 0xf8, 
+	0x1f, 0x00, 0x0e, 0x13, 0xd0, 0x08, 0x1c, 0x40, 
+	0x02, 0x13, 0x0e, 0x1b, 0xd0, 0x04, 0x1c, 0x40, 
+	0x04, 0x13, 0x0e, 0x1b, 0xd0, 0x00, 0x1c, 0x40, 
+	0x44, 0x60, 0x47, 0x70, 0x80, 0x80, 0x80, 0x80, 
+	0x46, 0xbc, 0xb4, 0x60, 0x1c, 0x03, 0x43, 0x08, 
+	0x07, 0x80, 0xd1, 0x1b, 0x1f, 0x12, 0xd3, 0x0b, 
+	0x4e, 0x0f, 0xcb, 0x01, 0xc9, 0x80, 0x1b, 0xc0, 
+	0xd1, 0x09, 0x1b, 0xbd, 0x43, 0xbd, 0x01, 0xf7, 
+	0x40, 0x3d, 0xd1, 0x04, 0x1f, 0x12, 0xd2, 0xf4, 
+	0x1c, 0xd2, 0xd3, 0x0e, 0xe0, 0x02, 0x1f, 0x1b, 
+	0x1f, 0x09, 0x1c, 0xd2, 0x78, 0x18, 0x78, 0x0f, 
+	0x1b, 0xc0, 0xd1, 0x06, 0x2f, 0x00, 0xd0, 0x04, 
+	0x1c, 0x5b, 0x1c, 0x49, 0x1e, 0x52, 0xd2, 0xf5, 
+	0x20, 0x00, 0xbc, 0x60, 0x46, 0x67, 0x47, 0x70, 
+	0x01, 0x01, 0x01, 0x01, 0x46, 0xbc, 0x1c, 0x03, 
+	0x43, 0x08, 0x07, 0x80, 0xd1, 0x13, 0x1f, 0x12, 
+	0xd3, 0x05, 0xcb, 0x01, 0xc9, 0x80, 0x1b, 0xc0, 
+	0xd1, 0x04, 0x1f, 0x12, 0xd2, 0xf9, 0x1c, 0xd2, 
+	0xd3, 0x0c, 0xe0, 0x02, 0x1f, 0x1b, 0x1f, 0x09, 
+	0x1c, 0xd2, 0x78, 0x18, 0x78, 0x0f, 0x1b, 0xc0, 
+	0xd1, 0x04, 0x1c, 0x5b, 0x1c, 0x49, 0x1e, 0x52, 
+	0xd2, 0xf7, 0x20, 0x00, 0x46, 0x67, 0x47, 0x70, 
+	0xb5, 0x80, 0xb0, 0x8f, 0x4b, 0x0a, 0x93, 0x08, 
+	0x4b, 0x0a, 0x93, 0x09, 0x4b, 0x0a, 0x93, 0x07, 
+	0x90, 0x0e, 0x46, 0x6b, 0xa8, 0x0e, 0xf0, 0x00, 
+	0xff, 0x4d, 0x1c, 0x07, 0x20, 0x00, 0xa9, 0x0e, 
+	0xf0, 0x00, 0xf8, 0xdc, 0x1c, 0x38, 0xb0, 0x0f, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x01, 0xe6, 0x39, 0x2e, 0x01, 0xe6, 0x47, 
+	0x2e, 0x01, 0xeb, 0xe3, 0x46, 0x84, 0x07, 0x83, 
+	0xd0, 0x05, 0x1e, 0x52, 0xd3, 0x12, 0x70, 0x01, 
+	0x1c, 0x40, 0x07, 0x83, 0xd1, 0xf9, 0x3a, 0x08, 
+	0xd3, 0x07, 0x02, 0x0b, 0x43, 0x19, 0x04, 0x0b, 
+	0x43, 0x19, 0x1c, 0x0b, 0xc0, 0x0a, 0x3a, 0x08, 
+	0xd2, 0xfc, 0x1d, 0xd2, 0xd3, 0x02, 0x54, 0x81, 
+	0x1e, 0x52, 0xd2, 0xfc, 0x46, 0x60, 0x47, 0x70, 
+	0x47, 0x78, 0x00, 0x00, 0xe2, 0x10, 0xc1, 0x02, 
+	0x12, 0x60, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 
+	0x03, 0xa0, 0x10, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x8c, 0xc1, 0x01, 0xe3, 0x8c, 0xc6, 0x1e, 
+	0xe1, 0xb0, 0x28, 0x20, 0x01, 0xa0, 0x08, 0x00, 
+	0x02, 0x4c, 0xc4, 0x01, 0xe1, 0xb0, 0x2c, 0x20, 
+	0x01, 0xa0, 0x04, 0x00, 0x02, 0x4c, 0xc5, 0x02, 
+	0xe1, 0xb0, 0x2e, 0x20, 0x01, 0xa0, 0x02, 0x00, 
+	0x02, 0x4c, 0xc5, 0x01, 0xe1, 0xb0, 0x2f, 0x20, 
+	0x01, 0xa0, 0x01, 0x00, 0x02, 0x4c, 0xc6, 0x02, 
+	0xe1, 0xb0, 0x2f, 0xa0, 0x01, 0xa0, 0x00, 0x80, 
+	0x02, 0x4c, 0xc6, 0x01, 0xe1, 0xa0, 0x00, 0x80, 
+	0xe1, 0xa0, 0x1a, 0x00, 0xe1, 0x8c, 0x06, 0x20, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x22, 0x01, 0x07, 0xd2, 
+	0x40, 0x50, 0x47, 0x70, 0xe2, 0x20, 0x01, 0x02, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x00, 0x40, 0x08, 0x40, 
+	0x47, 0x70, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0xc4, 0xff, 0xe3, 0x8c, 0xc6, 0x0e, 
+	0xe1, 0x5c, 0x00, 0x82, 0x9a, 0x00, 0x00, 0x0a, 
+	0xe1, 0xb0, 0x00, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x0a, 0x3a, 0x00, 0x00, 0x12, 
+	0xe1, 0x50, 0x00, 0x0c, 0x03, 0x51, 0x00, 0x00, 
+	0x8a, 0x00, 0x04, 0xec, 0xe1, 0xb0, 0x20, 0x82, 
+	0x8a, 0x00, 0x00, 0x18, 0xe3, 0xa0, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x03, 0x53, 0x00, 0x00, 
+	0x0a, 0xff, 0xff, 0xf2, 0xea, 0x00, 0x04, 0xe9, 
+	0xe1, 0x50, 0x00, 0x0c, 0x03, 0x51, 0x00, 0x00, 
+	0x8a, 0x00, 0x04, 0xe2, 0xe1, 0xb0, 0x20, 0x82, 
+	0x33, 0xa0, 0x00, 0x01, 0x23, 0xa0, 0x00, 0x00, 
+	0x03, 0x33, 0x00, 0x00, 0x03, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x0c, 
+	0x03, 0x51, 0x00, 0x00, 0x8a, 0x00, 0x04, 0xd9, 
+	0xe1, 0xb0, 0x20, 0x82, 0x23, 0xa0, 0x00, 0x00, 
+	0x21, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x02, 
+	0x01, 0x51, 0x00, 0x03, 0x33, 0xa0, 0x00, 0x01, 
+	0x23, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0x50, 0x00, 0x02, 0x01, 0x51, 0x00, 0x03, 
+	0x83, 0xa0, 0x00, 0x01, 0x93, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe5, 0x9f, 0xc0, 0x28, 0xe8, 0xac, 0x7f, 0xff, 
+	0xe2, 0x8f, 0x00, 0x0c, 0xe2, 0x4c, 0x10, 0x3c, 
+	0xe2, 0x4e, 0xe0, 0x04, 0xe5, 0x8c, 0xe0, 0x00, 
+	0xea, 0x00, 0x05, 0x71, 0x80, 0x00, 0x00, 0x20, 
+	0x44, 0x69, 0x76, 0x69, 0x64, 0x65, 0x20, 0x62, 
+	0x79, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x00, 0x00, 
+	0x2e, 0x08, 0x21, 0xd0, 0x06, 0x00, 0x0e, 0x00, 
+	0x68, 0x0a, 0x70, 0x10, 0x32, 0x01, 0x60, 0x0a, 
+	0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 0x00, 0x00, 
+	0xb4, 0x90, 0x18, 0x42, 0x78, 0x17, 0x23, 0x00, 
+	0x2f, 0x00, 0xd0, 0x22, 0x2f, 0x35, 0xdb, 0x20, 
+	0x2f, 0x35, 0xd0, 0x01, 0x24, 0x30, 0xe0, 0x07, 
+	0x1c, 0x17, 0x78, 0x7c, 0x37, 0x01, 0x2c, 0x30, 
+	0xd0, 0xfb, 0x2c, 0x00, 0xd1, 0xf6, 0xe0, 0x14, 
+	0x3a, 0x01, 0x78, 0x17, 0x2f, 0x39, 0xd1, 0x01, 
+	0x70, 0x14, 0xe7, 0xf9, 0x37, 0x01, 0x70, 0x17, 
+	0x78, 0x02, 0x2a, 0x30, 0xd0, 0x09, 0x29, 0x00, 
+	0xdb, 0x04, 0x5c, 0x42, 0x18, 0x43, 0x70, 0x5a, 
+	0x39, 0x01, 0xd5, 0xfa, 0x20, 0x01, 0xbc, 0x90, 
+	0x47, 0x70, 0x1c, 0x18, 0xbc, 0x90, 0x47, 0x70, 
+	0xb5, 0x90, 0x1c, 0x0c, 0x1e, 0x57, 0x2a, 0x00, 
+	0xdd, 0x08, 0xf0, 0x01, 0xfc, 0x81, 0x31, 0x30, 
+	0x70, 0x21, 0x1c, 0x39, 0x3c, 0x01, 0x3f, 0x01, 
+	0x29, 0x00, 0xdc, 0xf6, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0xf7, 0x1c, 0x14, 0x1c, 0x0f, 
+	0xb0, 0x85, 0xa3, 0xfb, 0x1c, 0x08, 0x1c, 0x11, 
+	0xcb, 0x0c, 0xf7, 0xff, 0xff, 0x3b, 0x28, 0x00, 
+	0xd0, 0x05, 0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 
+	0xff, 0x29, 0x1c, 0x0c, 0x1c, 0x07, 0xa3, 0xf4, 
+	0xcb, 0x0c, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x01, 
+	0xfc, 0x7b, 0x28, 0x00, 0xd0, 0x05, 0x27, 0x00, 
+	0x97, 0x01, 0x1f, 0x78, 0x90, 0x00, 0x1c, 0x3e, 
+	0xe1, 0xc8, 0xb0, 0x8a, 0x46, 0x6a, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf0, 0x01, 0xfc, 0x93, 0x90, 0x08, 
+	0x91, 0x09, 0x20, 0xff, 0x30, 0x2e, 0x9f, 0x00, 
+	0x43, 0x78, 0x4b, 0xe9, 0x18, 0xc1, 0x20, 0x7d, 
+	0x00, 0xc0, 0xf7, 0xff, 0xfd, 0x71, 0x90, 0x0a, 
+	0x1b, 0xc2, 0xa1, 0xe6, 0xc9, 0x03, 0xf0, 0x01, 
+	0xfc, 0xc7, 0x9e, 0x0a, 0xb0, 0x83, 0xf0, 0x01, 
+	0xfd, 0x55, 0x90, 0x00, 0x91, 0x01, 0x92, 0x02, 
+	0x2e, 0x00, 0xda, 0x04, 0x42, 0x76, 0x4d, 0xe1, 
+	0x4c, 0xe1, 0x1c, 0x67, 0xe0, 0x02, 0x4d, 0xe1, 
+	0x4c, 0xe1, 0x27, 0x00, 0x2e, 0x00, 0xd0, 0x16, 
+	0x08, 0x70, 0xd3, 0x0a, 0x46, 0x6b, 0x1c, 0x28, 
+	0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x01, 0xfd, 0xba, 
+	0x90, 0x00, 0x91, 0x01, 0x92, 0x02, 0x2e, 0x01, 
+	0xd0, 0x09, 0x1c, 0x28, 0x1c, 0x21, 0x1c, 0x3a, 
+	0xf0, 0x01, 0xfd, 0xca, 0x10, 0x76, 0x1c, 0x0c, 
+	0x1c, 0x05, 0x1c, 0x17, 0xe7, 0xe8, 0xaa, 0x00, 
+	0xca, 0x07, 0xf0, 0x01, 0xfd, 0xdd, 0x90, 0x04, 
+	0x91, 0x05, 0xb0, 0x03, 0x98, 0x08, 0x99, 0x09, 
+	0x9a, 0x01, 0x9b, 0x02, 0xf0, 0x01, 0xfe, 0xd6, 
+	0x1c, 0x04, 0x1c, 0x0f, 0xa3, 0xcd, 0xcb, 0x0c, 
+	0xf7, 0xff, 0xfe, 0xd0, 0x28, 0x00, 0xd0, 0x1d, 
+	0xa3, 0xcc, 0x68, 0x1a, 0x68, 0x5b, 0x1c, 0x20, 
+	0x1c, 0x39, 0x1c, 0x15, 0x1c, 0x1e, 0xf0, 0x01, 
+	0xff, 0x6f, 0x1c, 0x04, 0x98, 0x0a, 0x38, 0x01, 
+	0x90, 0x0a, 0x1c, 0x0f, 0x98, 0x01, 0x99, 0x02, 
+	0x1c, 0x2a, 0x1c, 0x33, 0xf0, 0x01, 0xfe, 0xba, 
+	0x90, 0x01, 0x91, 0x02, 0xa3, 0xbf, 0xcb, 0x0c, 
+	0x1c, 0x20, 0x1c, 0x39, 0xf7, 0xff, 0xfe, 0xb2, 
+	0x28, 0x00, 0xd1, 0xe1, 0xa3, 0xbf, 0xcb, 0x0c, 
+	0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x01, 0xff, 0xc2, 
+	0x28, 0x00, 0xd0, 0x1d, 0xa3, 0xb9, 0x68, 0x1a, 
+	0x68, 0x5b, 0x1c, 0x20, 0x1c, 0x39, 0x1c, 0x15, 
+	0x1c, 0x1e, 0xf0, 0x01, 0xfe, 0x9f, 0x1c, 0x04, 
+	0x98, 0x0a, 0x30, 0x01, 0x90, 0x0a, 0x1c, 0x0f, 
+	0x98, 0x01, 0x99, 0x02, 0x1c, 0x2a, 0x1c, 0x33, 
+	0xf0, 0x01, 0xff, 0x3e, 0x90, 0x01, 0x91, 0x02, 
+	0xa3, 0xb0, 0xcb, 0x0c, 0x1c, 0x20, 0x1c, 0x39, 
+	0xf0, 0x01, 0xff, 0xa4, 0x28, 0x00, 0xd1, 0xe1, 
+	0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x01, 0xff, 0xf6, 
+	0x90, 0x0b, 0x98, 0x0a, 0x42, 0x46, 0x96, 0x0e, 
+	0x98, 0x0b, 0xf7, 0xff, 0xfe, 0x3d, 0x9a, 0x00, 
+	0x9e, 0x0a, 0x1a, 0xb2, 0xf0, 0x01, 0xfc, 0x34, 
+	0x90, 0x06, 0x91, 0x07, 0xa0, 0x96, 0x68, 0x02, 
+	0x92, 0x04, 0x68, 0x41, 0x91, 0x05, 0x9e, 0x0a, 
+	0x2e, 0x00, 0xda, 0x25, 0x9e, 0x0e, 0xa1, 0xa1, 
+	0xc9, 0x03, 0xa2, 0x91, 0x68, 0x14, 0x68, 0x52, 
+	0x92, 0x03, 0x25, 0x00, 0x1c, 0x02, 0x1c, 0x2b, 
+	0x1c, 0x07, 0xf0, 0x02, 0xf8, 0x13, 0x1c, 0x02, 
+	0x1c, 0x0b, 0x99, 0x03, 0x1c, 0x20, 0xf0, 0x02, 
+	0xf8, 0x15, 0xa1, 0x9a, 0x68, 0x08, 0x68, 0x49, 
+	0x91, 0x0d, 0x1c, 0x3a, 0x1c, 0x2b, 0x1c, 0x04, 
+	0xf0, 0x01, 0xfe, 0xfe, 0xa3, 0x87, 0xcb, 0x0c, 
+	0xf0, 0x02, 0xf8, 0x76, 0x9b, 0x0d, 0x1c, 0x22, 
+	0xf0, 0x01, 0xfe, 0x4c, 0x1c, 0x04, 0xe0, 0x05, 
+	0xa0, 0x90, 0x68, 0x45, 0x68, 0x07, 0xa0, 0x7e, 
+	0x68, 0x41, 0x68, 0x04, 0x91, 0x03, 0x2e, 0x00, 
+	0xd0, 0x5d, 0x08, 0x70, 0xd3, 0x35, 0xb0, 0x82, 
+	0x98, 0x08, 0x99, 0x09, 0x9b, 0x05, 0x1c, 0x22, 
+	0xf0, 0x01, 0xfe, 0xe2, 0x90, 0x00, 0x91, 0x01, 
+	0x9b, 0x05, 0x1c, 0x38, 0x1c, 0x29, 0x1c, 0x22, 
+	0xf0, 0x01, 0xff, 0xe8, 0x9a, 0x06, 0x9b, 0x07, 
+	0xf0, 0x01, 0xfe, 0xd6, 0x9a, 0x00, 0x9b, 0x01, 
+	0xb0, 0x02, 0xf0, 0x01, 0xff, 0xdf, 0x90, 0x04, 
+	0x91, 0x05, 0x98, 0x06, 0x99, 0x07, 0x1c, 0x3a, 
+	0x1c, 0x2b, 0xf0, 0x01, 0xfe, 0xc9, 0xb0, 0x82, 
+	0x90, 0x00, 0x23, 0x00, 0x93, 0x01, 0x1c, 0x02, 
+	0xf0, 0x01, 0xff, 0xc8, 0x1c, 0x02, 0x1c, 0x0b, 
+	0x98, 0x06, 0x99, 0x07, 0xf0, 0x01, 0xff, 0xca, 
+	0x90, 0x06, 0x91, 0x07, 0x98, 0x00, 0x90, 0x08, 
+	0x99, 0x01, 0x91, 0x09, 0xb0, 0x02, 0x2e, 0x01, 
+	0xd0, 0x25, 0xa1, 0x72, 0xc9, 0x03, 0x1c, 0x3a, 
+	0x1c, 0x2b, 0xf0, 0x01, 0xfe, 0xad, 0x9b, 0x03, 
+	0x1c, 0x22, 0xf0, 0x01, 0xff, 0xb7, 0x9b, 0x03, 
+	0x1c, 0x22, 0xf0, 0x01, 0xfe, 0xa5, 0x91, 0x03, 
+	0x1c, 0x04, 0x1c, 0x38, 0x1c, 0x29, 0x1c, 0x3a, 
+	0x1c, 0x2b, 0xf0, 0x01, 0xfe, 0x9d, 0x25, 0x00, 
+	0x1c, 0x02, 0x1c, 0x2b, 0x1c, 0x07, 0xf0, 0x01, 
+	0xff, 0x9d, 0x1c, 0x02, 0x1c, 0x0b, 0x99, 0x03, 
+	0x1c, 0x20, 0xf0, 0x01, 0xff, 0x9f, 0x91, 0x03, 
+	0x10, 0x76, 0x1c, 0x04, 0xe7, 0xa1, 0xe7, 0xff, 
+	0xab, 0x06, 0xcb, 0x0f, 0xf0, 0x02, 0xf8, 0x0c, 
+	0x28, 0x00, 0xd1, 0x03, 0x98, 0x0b, 0x38, 0x01, 
+	0x90, 0x0b, 0xe7, 0x55, 0x98, 0x08, 0x99, 0x09, 
+	0x9a, 0x06, 0x9b, 0x07, 0xf0, 0x01, 0xff, 0x82, 
+	0x9a, 0x04, 0x9b, 0x05, 0xf0, 0x01, 0xff, 0x7e, 
+	0x9a, 0x01, 0x9b, 0x02, 0xf0, 0x01, 0xfd, 0xca, 
+	0xa3, 0x4c, 0x68, 0x1a, 0x68, 0x5b, 0x93, 0x0c, 
+	0x1c, 0x15, 0xf0, 0x01, 0xfe, 0x6d, 0x1c, 0x0c, 
+	0x1c, 0x07, 0xf0, 0x01, 0xff, 0x2f, 0x1c, 0x06, 
+	0xf7, 0xff, 0xfd, 0x7a, 0x1c, 0x3a, 0x1c, 0x23, 
+	0xf0, 0x01, 0xff, 0xde, 0x9b, 0x0c, 0x1c, 0x2a, 
+	0xf0, 0x01, 0xfe, 0x5e, 0xf0, 0x01, 0xff, 0x22, 
+	0x1c, 0x07, 0xd5, 0x04, 0x4b, 0x47, 0x18, 0xff, 
+	0x3e, 0x01, 0x2f, 0x00, 0xdb, 0xfa, 0x48, 0x45, 
+	0x42, 0x87, 0xdb, 0x04, 0x4b, 0x43, 0x1a, 0xff, 
+	0x36, 0x01, 0x42, 0x87, 0xda, 0xfa, 0x2e, 0x00, 
+	0xda, 0x06, 0x4b, 0x40, 0x18, 0xf6, 0x99, 0x0b, 
+	0x39, 0x01, 0x91, 0x0b, 0x2e, 0x00, 0xdb, 0xf8, 
+	0x42, 0x86, 0xdb, 0x06, 0x4b, 0x3b, 0x1a, 0xf6, 
+	0x99, 0x0b, 0x31, 0x01, 0x91, 0x0b, 0x42, 0x86, 
+	0xda, 0xf8, 0x99, 0x0b, 0x4b, 0x38, 0x42, 0x99, 
+	0xda, 0x17, 0x98, 0x0b, 0x00, 0x84, 0x18, 0x24, 
+	0x00, 0x64, 0x1c, 0x18, 0x1c, 0x31, 0xf7, 0xff, 
+	0xfb, 0xe3, 0x18, 0x20, 0x90, 0x0b, 0x00, 0x8c, 
+	0x18, 0x64, 0x00, 0x64, 0x1c, 0x39, 0x48, 0x30, 
+	0xf7, 0xff, 0xfb, 0xda, 0x18, 0x26, 0x00, 0x8f, 
+	0x18, 0x7f, 0x00, 0x7f, 0x98, 0x0a, 0x38, 0x01, 
+	0xe0, 0x16, 0x99, 0x0b, 0x42, 0x81, 0xdb, 0x14, 
+	0x98, 0x0b, 0xf0, 0x01, 0xfa, 0xa1, 0x4b, 0x27, 
+	0x43, 0x59, 0x19, 0x89, 0x90, 0x0b, 0x1c, 0x08, 
+	0xf0, 0x01, 0xfa, 0x9a, 0x4b, 0x23, 0x43, 0x59, 
+	0x19, 0xc9, 0x1c, 0x06, 0x1d, 0x48, 0xf0, 0x01, 
+	0xfa, 0x93, 0x1c, 0x07, 0x98, 0x0a, 0x30, 0x01, 
+	0x90, 0x0a, 0xb0, 0x0a, 0x24, 0x30, 0x98, 0x05, 
+	0x70, 0x04, 0x98, 0x05, 0x1d, 0x81, 0x22, 0x06, 
+	0x98, 0x01, 0xf7, 0xff, 0xfd, 0xfd, 0x98, 0x05, 
+	0x1d, 0xc1, 0x31, 0x05, 0x22, 0x06, 0x1c, 0x30, 
+	0xf7, 0xff, 0xfd, 0xf6, 0xe0, 0x2e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xff, 0xea, 0x84, 0x3f, 0xf0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 
+	0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x40, 0x01, 
+	0xa0, 0x00, 0x00, 0x00, 0x40, 0xf8, 0x6a, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x41, 0x2e, 0x84, 0x80, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xc9, 0x99, 0x99, 
+	0x99, 0x99, 0x99, 0x9a, 0x40, 0x14, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x42, 0x40, 
+	0x00, 0x01, 0x86, 0xa0, 0x98, 0x05, 0x1d, 0xc1, 
+	0x31, 0x0b, 0x22, 0x06, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfd, 0xbf, 0x98, 0x05, 0x74, 0xc4, 0x27, 0x00, 
+	0x98, 0x05, 0x75, 0x07, 0x98, 0x00, 0x30, 0x05, 
+	0xb0, 0x05, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0x02, 0x08, 0x12, 0xd3, 0x01, 
+	0x22, 0x01, 0xe0, 0x00, 0x22, 0x00, 0x60, 0x0a, 
+	0x68, 0x01, 0x4a, 0x08, 0x40, 0x0a, 0x4b, 0x07, 
+	0x42, 0x9a, 0xd0, 0x01, 0x20, 0x00, 0x47, 0x70, 
+	0x03, 0x09, 0xd1, 0x02, 0x68, 0x40, 0x28, 0x00, 
+	0xd0, 0x01, 0x20, 0x01, 0x47, 0x70, 0x20, 0x02, 
+	0x47, 0x70, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
+	0xb5, 0x90, 0x1c, 0x04, 0x54, 0x63, 0x1c, 0x4f, 
+	0x2a, 0x00, 0xda, 0x02, 0x42, 0x52, 0x21, 0x2d, 
+	0xe0, 0x00, 0x21, 0x2b, 0x1c, 0x38, 0x54, 0x21, 
+	0x23, 0x7d, 0x00, 0xdb, 0x37, 0x01, 0x42, 0x9a, 
+	0xdb, 0x09, 0x1c, 0x18, 0x1c, 0x11, 0xf7, 0xff, 
+	0xfb, 0x37, 0x1d, 0xc2, 0x32, 0x29, 0x1c, 0x38, 
+	0x54, 0x22, 0x1c, 0x0a, 0x37, 0x01, 0x2a, 0x64, 
+	0xdb, 0x09, 0x20, 0x64, 0x1c, 0x11, 0xf7, 0xff, 
+	0xfb, 0x2b, 0x1d, 0xc2, 0x32, 0x29, 0x1c, 0x38, 
+	0x54, 0x22, 0x1c, 0x0a, 0x37, 0x01, 0x1c, 0x10, 
+	0xf0, 0x01, 0xf9, 0xf6, 0x1d, 0xc2, 0x32, 0x29, 
+	0x1c, 0x38, 0x54, 0x22, 0x37, 0x01, 0x1c, 0x38, 
+	0x31, 0x30, 0x54, 0x21, 0x37, 0x01, 0x1c, 0x38, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
+	0x1c, 0x06, 0xb0, 0x82, 0x68, 0x10, 0x90, 0x00, 
+	0x1d, 0xd0, 0x30, 0x0d, 0xb0, 0x81, 0x1c, 0x0f, 
+	0x46, 0x69, 0x1c, 0x14, 0x1c, 0x05, 0xf7, 0xff, 
+	0xff, 0xa0, 0x99, 0x00, 0x29, 0x00, 0xd0, 0x01, 
+	0xa1, 0xc9, 0xe0, 0x0a, 0x99, 0x01, 0x08, 0x89, 
+	0xd3, 0x01, 0xa1, 0xc8, 0xe0, 0x05, 0x99, 0x01, 
+	0x08, 0xc9, 0xd3, 0x01, 0xa1, 0xc6, 0xe0, 0x00, 
+	0xa1, 0xc6, 0x60, 0x61, 0x28, 0x00, 0xd0, 0x15, 
+	0x28, 0x01, 0xd1, 0x01, 0xa0, 0xc4, 0xe0, 0x00, 
+	0xa0, 0xc4, 0x78, 0x01, 0x70, 0x39, 0x78, 0x41, 
+	0x70, 0x79, 0x78, 0x80, 0x70, 0xb8, 0x20, 0x00, 
+	0x70, 0xf8, 0x98, 0x01, 0x4b, 0xc0, 0x40, 0x18, 
+	0x60, 0x20, 0x20, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xcd, 0x06, 0xb0, 0x01, 
+	0x48, 0xbc, 0x90, 0x01, 0x2e, 0x45, 0xd0, 0x74, 
+	0x2e, 0x65, 0xd0, 0x72, 0x2e, 0x66, 0xd1, 0x71, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfd, 0x2e, 0x1c, 0x06, 
+	0xd5, 0x4e, 0x42, 0x76, 0x68, 0xa0, 0x1c, 0x41, 
+	0x42, 0xb1, 0xda, 0x09, 0x21, 0x30, 0x70, 0x39, 
+	0x98, 0x01, 0x68, 0x00, 0x78, 0x00, 0x25, 0x02, 
+	0x70, 0x78, 0x68, 0xa0, 0x61, 0x20, 0xe0, 0x3b, 
+	0x1b, 0x80, 0x1c, 0x85, 0x2d, 0x12, 0xdd, 0x03, 
+	0x1f, 0xe8, 0x38, 0x0c, 0x25, 0x13, 0x61, 0x20, 
+	0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, 0xfc, 0xd4, 
+	0x28, 0x00, 0xd0, 0x01, 0x35, 0x01, 0x3e, 0x01, 
+	0x2e, 0x00, 0xd1, 0x02, 0x78, 0x78, 0x70, 0x38, 
+	0xe0, 0x0d, 0x2e, 0x01, 0xd1, 0x10, 0x1c, 0x28, 
+	0x2d, 0x00, 0xdd, 0x05, 0x5c, 0x39, 0x18, 0x3a, 
+	0x70, 0x51, 0x38, 0x01, 0x28, 0x00, 0xdc, 0xf9, 
+	0x21, 0x30, 0x70, 0x39, 0x35, 0x01, 0x98, 0x01, 
+	0x68, 0x00, 0x78, 0x00, 0x70, 0x78, 0xe0, 0x13, 
+	0x1c, 0x28, 0x2d, 0x00, 0xdd, 0x05, 0x5c, 0x39, 
+	0x18, 0x3a, 0x70, 0x91, 0x38, 0x01, 0x28, 0x00, 
+	0xdc, 0xf9, 0x21, 0x30, 0x70, 0x39, 0x98, 0x01, 
+	0x68, 0x00, 0x78, 0x00, 0x70, 0x78, 0x20, 0x3c, 
+	0x70, 0xb8, 0x1e, 0x70, 0x60, 0xe0, 0x35, 0x02, 
+	0x69, 0x20, 0x28, 0x00, 0xdd, 0x5d, 0xe0, 0x26, 
+	0x68, 0xa0, 0x19, 0x80, 0x1c, 0x85, 0x2d, 0x12, 
+	0xdd, 0x41, 0x25, 0x13, 0x1c, 0x38, 0x1c, 0x29, 
+	0xf7, 0xff, 0xfc, 0x96, 0x28, 0x00, 0xd0, 0x01, 
+	0x25, 0x14, 0x36, 0x01, 0x1e, 0x69, 0x42, 0xb1, 
+	0xdd, 0x1a, 0x20, 0x00, 0x2e, 0x00, 0xdb, 0x05, 
+	0x18, 0x39, 0x78, 0x49, 0x54, 0x39, 0x30, 0x01, 
+	0x42, 0xb0, 0xdd, 0xf9, 0x98, 0x01, 0x68, 0x00, 
+	0xe0, 0x01, 0xe0, 0xc1, 0xe0, 0x45, 0x78, 0x00, 
+	0x19, 0xb9, 0x70, 0x48, 0x68, 0xa0, 0x19, 0x80, 
+	0x38, 0x11, 0x61, 0x20, 0xd0, 0x35, 0x21, 0x3e, 
+	0x1c, 0x28, 0x54, 0x39, 0x35, 0x01, 0xe0, 0x30, 
+	0x20, 0x00, 0x29, 0x00, 0xdd, 0x05, 0x18, 0x3a, 
+	0x78, 0x52, 0x54, 0x3a, 0x30, 0x01, 0x42, 0x81, 
+	0xdc, 0xf9, 0x20, 0x3c, 0x19, 0x79, 0x39, 0x20, 
+	0x77, 0xc8, 0x1b, 0x70, 0x30, 0x02, 0x60, 0xe0, 
+	0x98, 0x01, 0x68, 0x00, 0x78, 0x01, 0x1c, 0x28, 
+	0x54, 0x39, 0x68, 0xa0, 0x35, 0x01, 0x28, 0x00, 
+	0xd0, 0x17, 0x61, 0x20, 0xe7, 0xdf, 0x1c, 0x38, 
+	0x1c, 0x29, 0xf7, 0xff, 0xfc, 0x55, 0x28, 0x00, 
+	0xd0, 0x01, 0x35, 0x01, 0x36, 0x01, 0x20, 0x00, 
+	0x2e, 0x00, 0xdb, 0x05, 0x18, 0x39, 0x78, 0x49, 
+	0x54, 0x39, 0x30, 0x01, 0x42, 0xb0, 0xdd, 0xf9, 
+	0x98, 0x01, 0x68, 0x00, 0x78, 0x00, 0x19, 0xb9, 
+	0x70, 0x48, 0x68, 0xa0, 0x28, 0x00, 0xd1, 0x68, 
+	0x98, 0x00, 0x09, 0x00, 0xd2, 0x66, 0x3d, 0x01, 
+	0xe0, 0x75, 0x1c, 0x38, 0xb0, 0x81, 0xf7, 0xff, 
+	0xfc, 0x74, 0x90, 0x00, 0x68, 0xa0, 0x28, 0x01, 
+	0xda, 0x01, 0x20, 0x01, 0x60, 0xa0, 0x68, 0xa0, 
+	0x28, 0x11, 0xdd, 0x01, 0x25, 0x12, 0xe0, 0x00, 
+	0x1c, 0x45, 0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, 
+	0xfc, 0x27, 0x99, 0x00, 0x18, 0x42, 0x68, 0xa0, 
+	0x42, 0x90, 0xdd, 0x02, 0x23, 0x04, 0x42, 0xda, 
+	0xda, 0x02, 0x78, 0x78, 0x70, 0x38, 0xe0, 0x22, 
+	0x26, 0x66, 0x2a, 0x00, 0xdb, 0x0e, 0x20, 0x00, 
+	0x2a, 0x00, 0xdb, 0x05, 0x18, 0x39, 0x78, 0x49, 
+	0x54, 0x39, 0x30, 0x01, 0x42, 0x90, 0xdd, 0xf9, 
+	0x98, 0x02, 0x68, 0x00, 0x78, 0x00, 0x18, 0xb9, 
+	0x70, 0x48, 0xe0, 0x14, 0x42, 0x52, 0x1c, 0x28, 
+	0xd4, 0x04, 0x5c, 0x3b, 0x18, 0x81, 0x54, 0x7b, 
+	0x38, 0x01, 0xd5, 0xfa, 0x18, 0xad, 0x20, 0x00, 
+	0x2a, 0x00, 0xdb, 0x04, 0x21, 0x30, 0x54, 0x39, 
+	0x30, 0x01, 0x42, 0x90, 0xdd, 0xfb, 0x98, 0x02, 
+	0x68, 0x00, 0x78, 0x00, 0x70, 0x78, 0x98, 0x01, 
+	0x09, 0x00, 0xd2, 0x1c, 0x20, 0x00, 0x43, 0xc0, 
+	0x61, 0x20, 0x5d, 0x78, 0x99, 0x02, 0x68, 0x09, 
+	0x78, 0x09, 0x42, 0x88, 0xd0, 0x0a, 0x19, 0x78, 
+	0x38, 0x20, 0x7f, 0xc0, 0x28, 0x30, 0xd1, 0x05, 
+	0x3d, 0x01, 0x19, 0x78, 0x38, 0x20, 0x7f, 0xc0, 
+	0x28, 0x30, 0xd0, 0xf9, 0x19, 0x78, 0x38, 0x20, 
+	0x7f, 0xc0, 0x42, 0x88, 0xd1, 0x0c, 0x3d, 0x01, 
+	0xe0, 0x0a, 0xe0, 0x10, 0xe0, 0x0f, 0x68, 0xa0, 
+	0x28, 0x11, 0xdd, 0x05, 0x38, 0x11, 0x21, 0x3e, 
+	0x61, 0x20, 0x1c, 0x28, 0x54, 0x39, 0x35, 0x01, 
+	0x2e, 0x66, 0xd0, 0x03, 0x1c, 0x38, 0x1c, 0x29, 
+	0x1e, 0xb3, 0xe0, 0x31, 0xb0, 0x01, 0x1c, 0x28, 
+	0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x1c, 0x38, 0xb0, 0x81, 0xf7, 0xff, 0xfb, 0xf9, 
+	0x90, 0x00, 0x68, 0xa0, 0x28, 0x11, 0xdd, 0x03, 
+	0x38, 0x11, 0x61, 0x20, 0x20, 0x11, 0x60, 0xa0, 
+	0x68, 0xa0, 0x1c, 0x85, 0x1c, 0x38, 0x1c, 0x29, 
+	0xf7, 0xff, 0xfb, 0xae, 0x99, 0x00, 0x18, 0x42, 
+	0x78, 0x78, 0x70, 0x38, 0x68, 0xa0, 0x28, 0x00, 
+	0xd1, 0x04, 0x98, 0x01, 0x09, 0x00, 0xd2, 0x01, 
+	0x25, 0x01, 0xe0, 0x03, 0x98, 0x02, 0x68, 0x00, 
+	0x78, 0x00, 0x70, 0x78, 0x69, 0x20, 0x28, 0x00, 
+	0xdd, 0x03, 0x21, 0x3e, 0x1c, 0x28, 0x54, 0x39, 
+	0x35, 0x01, 0x1c, 0x38, 0x1c, 0x29, 0x1c, 0x33, 
+	0xf7, 0xff, 0xfe, 0x26, 0x1c, 0x05, 0xe7, 0xc9, 
+	0x2d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 
+	0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x4e, 0x61, 0x4e, 0x00, 0x49, 0x6e, 0x66, 0x00, 
+	0xff, 0xff, 0xfe, 0xff, 0x2e, 0x08, 0x22, 0x10, 
+	0xb5, 0xf0, 0x1c, 0x04, 0x25, 0x00, 0x26, 0x00, 
+	0x1c, 0x18, 0xb0, 0x92, 0x68, 0x13, 0x93, 0x00, 
+	0x1c, 0x17, 0x43, 0xea, 0x60, 0xfa, 0x61, 0x3a, 
+	0x1c, 0x1a, 0x23, 0x21, 0x01, 0x1b, 0x40, 0x1a, 
+	0xd1, 0x01, 0x22, 0x01, 0x60, 0xba, 0x1d, 0xfa, 
+	0x32, 0x29, 0x29, 0x67, 0xd0, 0x0e, 0xdc, 0x2c, 
+	0x29, 0x64, 0xd0, 0x5b, 0xdc, 0x06, 0x29, 0x45, 
+	0xd0, 0x08, 0x29, 0x47, 0xd0, 0x06, 0x29, 0x58, 
+	0xd1, 0x0c, 0xe0, 0x58, 0x29, 0x65, 0xd0, 0x01, 
+	0x29, 0x66, 0xd1, 0x07, 0xab, 0x01, 0x1c, 0x08, 
+	0x1c, 0x19, 0x69, 0xfb, 0x1c, 0x3a, 0xf7, 0xff, 
+	0xf9, 0x29, 0x1c, 0x05, 0xb0, 0x82, 0x6a, 0xf9, 
+	0x91, 0x00, 0x23, 0x01, 0x02, 0x5b, 0x98, 0x02, 
+	0x40, 0x18, 0x90, 0x0d, 0xd0, 0x6c, 0x21, 0x00, 
+	0x91, 0x01, 0x68, 0xf8, 0x28, 0x00, 0xdd, 0x01, 
+	0x1e, 0x41, 0x91, 0x01, 0x69, 0x38, 0x28, 0x00, 
+	0xdd, 0x63, 0x99, 0x01, 0x18, 0x40, 0x1e, 0x41, 
+	0xe0, 0xca, 0x29, 0x70, 0xd0, 0x33, 0xdc, 0x2e, 
+	0x29, 0x69, 0xd0, 0x2b, 0x29, 0x6f, 0xd1, 0xe1, 
+	0x99, 0x00, 0x09, 0xc9, 0xd3, 0x63, 0xb0, 0x82, 
+	0x68, 0x10, 0x90, 0x00, 0x68, 0x51, 0x91, 0x01, 
+	0xa3, 0xc0, 0x93, 0x12, 0xcb, 0x0c, 0xf0, 0x01, 
+	0xfd, 0x2d, 0x28, 0x00, 0xd0, 0x18, 0x98, 0x00, 
+	0x99, 0x01, 0xf7, 0xff, 0xf9, 0x4d, 0x07, 0x40, 
+	0x0f, 0x40, 0x6a, 0xb9, 0x5c, 0x09, 0x1c, 0x28, 
+	0xaa, 0x03, 0x54, 0x11, 0x22, 0x03, 0x98, 0x00, 
+	0x99, 0x01, 0x35, 0x01, 0xf7, 0xff, 0xf9, 0x2c, 
+	0x90, 0x00, 0x91, 0x01, 0x9b, 0x12, 0xcb, 0x0c, 
+	0xf0, 0x01, 0xfd, 0x14, 0x28, 0x00, 0xd1, 0xe6, 
+	0xb0, 0x02, 0xe0, 0x49, 0xe0, 0x4f, 0x29, 0x75, 
+	0xd0, 0x4d, 0x29, 0x78, 0xd1, 0xb2, 0x99, 0x00, 
+	0x09, 0xc9, 0xd3, 0x27, 0xb0, 0x82, 0x68, 0x10, 
+	0x90, 0x00, 0x68, 0x51, 0x91, 0x01, 0xa3, 0xa9, 
+	0x93, 0x13, 0xcb, 0x0c, 0xf0, 0x01, 0xfc, 0xfe, 
+	0x28, 0x00, 0xd0, 0x71, 0x98, 0x00, 0x99, 0x01, 
+	0xf7, 0xff, 0xf9, 0x1e, 0x07, 0x00, 0x0f, 0x00, 
+	0x6a, 0xb9, 0x5c, 0x09, 0x1c, 0x28, 0xaa, 0x03, 
+	0x54, 0x11, 0x22, 0x04, 0x98, 0x00, 0x99, 0x01, 
+	0x35, 0x01, 0xf7, 0xff, 0xf8, 0xfd, 0x90, 0x00, 
+	0x91, 0x01, 0x9b, 0x13, 0xcb, 0x0c, 0xf0, 0x01, 
+	0xfc, 0xe5, 0x28, 0x00, 0xd1, 0xe6, 0xe0, 0x57, 
+	0xe0, 0x65, 0xe0, 0x6a, 0x28, 0x00, 0xd0, 0x85, 
+	0x07, 0x02, 0x0f, 0x12, 0x6a, 0xb9, 0x5c, 0x8a, 
+	0x1c, 0x29, 0xab, 0x01, 0x54, 0x5a, 0x35, 0x01, 
+	0x09, 0x00, 0xd1, 0xf5, 0xe7, 0x7a, 0xe7, 0xff, 
+	0x28, 0x00, 0xd0, 0x09, 0x07, 0x41, 0x0f, 0x49, 
+	0x1d, 0xca, 0x32, 0x29, 0x1c, 0x29, 0xab, 0x01, 
+	0x54, 0x5a, 0x35, 0x01, 0x08, 0xc0, 0xd1, 0xf5, 
+	0x98, 0x00, 0x09, 0x00, 0xd3, 0xee, 0x68, 0xb8, 
+	0x38, 0x01, 0x60, 0xb8, 0xe7, 0x66, 0x99, 0x00, 
+	0x09, 0xc9, 0xd3, 0x33, 0xb0, 0x82, 0x68, 0x10, 
+	0x90, 0x00, 0x68, 0x51, 0x91, 0x01, 0xa3, 0x83, 
+	0x93, 0x11, 0xcb, 0x0c, 0xf0, 0x01, 0xfc, 0xb2, 
+	0x28, 0x00, 0xd0, 0x25, 0xa3, 0x81, 0x93, 0x10, 
+	0xa3, 0x82, 0x93, 0x0f, 0xa3, 0x7f, 0x93, 0x0e, 
+	0x98, 0x00, 0x99, 0x01, 0x9b, 0x10, 0xcb, 0x0c, 
+	0xf0, 0x01, 0xfc, 0xac, 0x1c, 0x19, 0x1c, 0x10, 
+	0x9b, 0x0f, 0xcb, 0x0c, 0xf0, 0x01, 0xfc, 0xe8, 
+	0xf7, 0xff, 0xf8, 0xc2, 0x1c, 0x29, 0xaa, 0x03, 
+	0x54, 0x50, 0x98, 0x00, 0x99, 0x01, 0x9b, 0x0e, 
+	0xcb, 0x0c, 0x35, 0x01, 0xf0, 0x01, 0xfc, 0x9a, 
+	0x90, 0x00, 0x91, 0x01, 0x9b, 0x11, 0xcb, 0x0c, 
+	0xf0, 0x01, 0xfc, 0x8c, 0x28, 0x00, 0xd1, 0xdf, 
+	0xb0, 0x02, 0xe7, 0x2f, 0x28, 0x00, 0xd0, 0xb1, 
+	0xf0, 0x01, 0xfc, 0xd2, 0x1d, 0xca, 0x32, 0x29, 
+	0x1c, 0x29, 0xab, 0x01, 0x54, 0x5a, 0x35, 0x01, 
+	0x28, 0x00, 0xd1, 0xf5, 0xe7, 0x22, 0x68, 0xb8, 
+	0x1b, 0x41, 0x91, 0x01, 0xd5, 0x01, 0x21, 0x00, 
+	0x91, 0x01, 0x68, 0x78, 0xf7, 0xff, 0xf9, 0x0a, 
+	0x99, 0x01, 0x19, 0x49, 0x18, 0x40, 0x99, 0x00, 
+	0x1a, 0x08, 0x90, 0x00, 0x23, 0xff, 0x33, 0x01, 
+	0x98, 0x02, 0x40, 0x18, 0x90, 0x0c, 0xd1, 0x1b, 
+	0x98, 0x02, 0x08, 0x40, 0xd2, 0x18, 0xb0, 0x81, 
+	0x98, 0x0d, 0x28, 0x00, 0xd0, 0x01, 0x20, 0x30, 
+	0xe0, 0x00, 0x20, 0x20, 0x06, 0x00, 0x0e, 0x00, 
+	0x90, 0x00, 0x98, 0x01, 0x38, 0x01, 0x90, 0x01, 
+	0xd4, 0x09, 0x98, 0x00, 0x6a, 0x3a, 0x1c, 0x21, 
+	0x36, 0x01, 0xf7, 0xff, 0xf8, 0x1d, 0x98, 0x01, 
+	0x38, 0x01, 0x90, 0x01, 0xd5, 0xf5, 0xb0, 0x01, 
+	0x68, 0x79, 0x78, 0x08, 0x31, 0x01, 0xb0, 0x81, 
+	0x91, 0x00, 0x28, 0x00, 0xd0, 0x0a, 0x6a, 0x3a, 
+	0x1c, 0x21, 0xf7, 0xff, 0xf8, 0x0d, 0x99, 0x00, 
+	0x78, 0x08, 0x31, 0x01, 0x91, 0x00, 0x36, 0x01, 
+	0x28, 0x00, 0xd1, 0xf4, 0xb0, 0x01, 0x98, 0x02, 
+	0x07, 0xc0, 0x0f, 0xc0, 0x90, 0x0b, 0xd1, 0x18, 
+	0xb0, 0x81, 0x98, 0x0d, 0x28, 0x00, 0xd0, 0x01, 
+	0x20, 0x30, 0xe0, 0x00, 0x20, 0x20, 0x06, 0x00, 
+	0x0e, 0x00, 0x90, 0x00, 0x98, 0x01, 0x38, 0x01, 
+	0x90, 0x01, 0xd4, 0x09, 0x98, 0x00, 0x6a, 0x3a, 
+	0x1c, 0x21, 0x36, 0x01, 0xf7, 0xfe, 0xff, 0xec, 
+	0x98, 0x01, 0x38, 0x01, 0x90, 0x01, 0xd5, 0xf5, 
+	0xb0, 0x01, 0x98, 0x0d, 0x28, 0x00, 0xd0, 0x35, 
+	0x21, 0x00, 0xb0, 0x81, 0x91, 0x00, 0x2d, 0x00, 
+	0xdd, 0x2e, 0xa8, 0x04, 0x99, 0x00, 0x5c, 0x40, 
+	0x28, 0x3c, 0xd0, 0x10, 0x28, 0x3e, 0xd1, 0x1d, 
+	0x69, 0x38, 0x38, 0x01, 0x61, 0x38, 0xd4, 0x1e, 
+	0x20, 0x30, 0x6a, 0x3a, 0x1c, 0x21, 0x36, 0x01, 
+	0xf7, 0xfe, 0xff, 0xce, 0x69, 0x38, 0x38, 0x01, 
+	0x61, 0x38, 0xd5, 0xf5, 0xe0, 0x13, 0x68, 0xf8, 
+	0x38, 0x01, 0x60, 0xf8, 0xd4, 0x0f, 0x20, 0x30, 
+	0x6a, 0x3a, 0x1c, 0x21, 0x36, 0x01, 0xf7, 0xfe, 
+	0xff, 0xbf, 0x68, 0xf8, 0x38, 0x01, 0x60, 0xf8, 
+	0xd5, 0xf5, 0xe0, 0x04, 0x6a, 0x3a, 0x1c, 0x21, 
+	0xf7, 0xfe, 0xff, 0xb6, 0x36, 0x01, 0x99, 0x00, 
+	0x31, 0x01, 0x91, 0x00, 0x42, 0xa9, 0xdb, 0xd0, 
+	0xb0, 0x01, 0xe0, 0x1c, 0x99, 0x01, 0x1e, 0x48, 
+	0x90, 0x01, 0xd4, 0x09, 0x20, 0x30, 0x6a, 0x3a, 
+	0x1c, 0x21, 0x36, 0x01, 0xf7, 0xfe, 0xff, 0xa4, 
+	0x98, 0x01, 0x38, 0x01, 0x90, 0x01, 0xd5, 0xf5, 
+	0x19, 0x76, 0x1c, 0x28, 0x3d, 0x01, 0x28, 0x00, 
+	0xdd, 0x09, 0xa8, 0x03, 0x5d, 0x40, 0x6a, 0x3a, 
+	0x1c, 0x21, 0xf7, 0xfe, 0xff, 0x95, 0x1c, 0x28, 
+	0x3d, 0x01, 0x28, 0x00, 0xdc, 0xf5, 0x98, 0x0b, 
+	0x28, 0x00, 0xd0, 0x0a, 0x98, 0x00, 0x1e, 0x45, 
+	0xd4, 0x07, 0x20, 0x20, 0x6a, 0x3a, 0x1c, 0x21, 
+	0x36, 0x01, 0xf7, 0xfe, 0xff, 0x85, 0x3d, 0x01, 
+	0xd5, 0xf7, 0x1c, 0x30, 0xb0, 0x14, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 
+	0x00, 0x00, 0x00, 0x00, 0xb5, 0xff, 0x20, 0x00, 
+	0xb0, 0x88, 0x90, 0x00, 0x99, 0x09, 0x78, 0x08, 
+	0x31, 0x01, 0x91, 0x09, 0x1c, 0x1c, 0x1c, 0x17, 
+	0x28, 0x00, 0xd0, 0x74, 0xa3, 0xf4, 0x93, 0x07, 
+	0x1d, 0xe2, 0x32, 0x0d, 0x92, 0x06, 0x1d, 0xe1, 
+	0x31, 0x29, 0x91, 0x05, 0x28, 0x25, 0xd0, 0x07, 
+	0x99, 0x08, 0x6a, 0x22, 0xf7, 0xfe, 0xff, 0x58, 
+	0x98, 0x00, 0x30, 0x01, 0x90, 0x00, 0xe2, 0xc4, 
+	0x25, 0x00, 0x23, 0x00, 0xb0, 0x82, 0x93, 0x00, 
+	0x20, 0x00, 0x60, 0xa0, 0x99, 0x0b, 0x78, 0x0e, 
+	0x31, 0x01, 0x91, 0x0b, 0x2e, 0x2b, 0xd0, 0x16, 
+	0xdc, 0x06, 0x2e, 0x20, 0xd0, 0x16, 0x2e, 0x23, 
+	0xd1, 0x17, 0x23, 0x08, 0x43, 0x1d, 0xe7, 0xf1, 
+	0x2e, 0x2d, 0xd0, 0x05, 0x2e, 0x30, 0xd1, 0x10, 
+	0x23, 0xff, 0x33, 0x01, 0x43, 0x1d, 0xe7, 0xe9, 
+	0x23, 0xff, 0x33, 0x01, 0x43, 0x9d, 0x1c, 0x28, 
+	0x25, 0x01, 0x43, 0x05, 0xe7, 0xe2, 0x23, 0x02, 
+	0x43, 0x1d, 0xe7, 0xdf, 0x23, 0x04, 0x43, 0x1d, 
+	0xe7, 0xdc, 0x20, 0x00, 0x2e, 0x2a, 0xd1, 0x11, 
+	0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 
+	0x30, 0x04, 0x60, 0x38, 0x38, 0x80, 0x6f, 0xc0, 
+	0x28, 0x00, 0xda, 0x02, 0x42, 0x40, 0x23, 0x01, 
+	0x40, 0x5d, 0x99, 0x0b, 0x78, 0x0e, 0x31, 0x01, 
+	0x91, 0x0b, 0xe0, 0x0f, 0x49, 0xce, 0x5d, 0x8a, 
+	0x09, 0x92, 0xd3, 0x0b, 0x00, 0x83, 0x18, 0x18, 
+	0x00, 0x40, 0x19, 0x80, 0x9a, 0x0b, 0x78, 0x16, 
+	0x32, 0x01, 0x92, 0x0b, 0x5d, 0x8a, 0x38, 0x30, 
+	0x09, 0x92, 0xd2, 0xf3, 0x28, 0x00, 0xda, 0x00, 
+	0x20, 0x00, 0x90, 0x01, 0x2e, 0x2e, 0xd1, 0x2a, 
+	0x20, 0x00, 0x99, 0x0b, 0x78, 0x0e, 0x31, 0x01, 
+	0x91, 0x0b, 0x2e, 0x2a, 0xd1, 0x0e, 0x68, 0x38, 
+	0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 0x30, 0x04, 
+	0x60, 0x38, 0x38, 0x80, 0xe0, 0x00, 0xe2, 0x67, 
+	0x6f, 0xc0, 0x99, 0x0b, 0x78, 0x0e, 0x31, 0x01, 
+	0x91, 0x0b, 0xe0, 0x0f, 0x49, 0xb8, 0x5d, 0x8a, 
+	0x09, 0x92, 0xd3, 0x0b, 0x00, 0x83, 0x18, 0x18, 
+	0x00, 0x40, 0x19, 0x80, 0x9a, 0x0b, 0x78, 0x16, 
+	0x32, 0x01, 0x92, 0x0b, 0x5d, 0x8a, 0x38, 0x30, 
+	0x09, 0x92, 0xd2, 0xf3, 0x28, 0x00, 0xdb, 0x02, 
+	0x23, 0x10, 0x43, 0x1d, 0x60, 0xa0, 0x2e, 0x6c, 
+	0xd0, 0x01, 0x2e, 0x4c, 0xd1, 0x0d, 0x99, 0x0b, 
+	0x78, 0x0e, 0x31, 0x01, 0x91, 0x0b, 0x2e, 0x6c, 
+	0xd0, 0x01, 0x2e, 0x4c, 0xd1, 0x02, 0x23, 0x40, 
+	0x43, 0x1d, 0xe0, 0x06, 0x23, 0x20, 0x43, 0x1d, 
+	0xe0, 0x07, 0x2e, 0x68, 0xd1, 0x05, 0x23, 0x80, 
+	0x43, 0x1d, 0x99, 0x0b, 0x78, 0x0e, 0x31, 0x01, 
+	0x91, 0x0b, 0x2e, 0x67, 0xd0, 0x63, 0xdc, 0x12, 
+	0x2e, 0x63, 0xd0, 0x21, 0xdc, 0x08, 0x2e, 0x00, 
+	0xd0, 0x5e, 0x2e, 0x45, 0xd0, 0x5b, 0x2e, 0x47, 
+	0xd0, 0x59, 0x2e, 0x58, 0xd0, 0x59, 0xe0, 0x1f, 
+	0x2e, 0x64, 0xd0, 0x57, 0x2e, 0x65, 0xd0, 0x52, 
+	0x2e, 0x66, 0xd0, 0x50, 0xe0, 0x18, 0x2e, 0x70, 
+	0xd0, 0x55, 0xdc, 0x06, 0x2e, 0x69, 0xd0, 0x4d, 
+	0x2e, 0x6e, 0xd0, 0x51, 0x2e, 0x6f, 0xd0, 0x5c, 
+	0xe0, 0x0e, 0x2e, 0x73, 0xd0, 0x5a, 0x2e, 0x75, 
+	0xd0, 0x59, 0x2e, 0x78, 0xd0, 0x58, 0xe0, 0x07, 
+	0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 
+	0x30, 0x04, 0x60, 0x38, 0x38, 0x80, 0x6f, 0xc6, 
+	0x98, 0x01, 0x38, 0x01, 0x90, 0x01, 0x07, 0xe8, 
+	0x0f, 0xc0, 0x90, 0x06, 0xd1, 0x16, 0x0a, 0x68, 
+	0xd3, 0x01, 0x20, 0x30, 0xe0, 0x00, 0x20, 0x20, 
+	0x06, 0x05, 0x0e, 0x2d, 0x98, 0x01, 0x38, 0x01, 
+	0x90, 0x01, 0xd4, 0x0b, 0x98, 0x02, 0x30, 0x01, 
+	0x90, 0x02, 0x99, 0x0a, 0x6a, 0x22, 0x1c, 0x28, 
+	0xf7, 0xfe, 0xfe, 0x72, 0x98, 0x01, 0x38, 0x01, 
+	0x90, 0x01, 0xd5, 0xf3, 0x99, 0x0a, 0x6a, 0x22, 
+	0x1c, 0x30, 0xf7, 0xfe, 0xfe, 0x69, 0x98, 0x02, 
+	0x30, 0x01, 0x90, 0x02, 0x98, 0x06, 0x28, 0x00, 
+	0xd0, 0x52, 0x98, 0x01, 0x1e, 0x45, 0xd4, 0x58, 
+	0x98, 0x02, 0x30, 0x01, 0x90, 0x02, 0x20, 0x20, 
+	0x99, 0x0a, 0x6a, 0x22, 0xf7, 0xfe, 0xfe, 0x58, 
+	0x3d, 0x01, 0xd5, 0xf5, 0xe1, 0xc4, 0xe1, 0xa0, 
+	0xe0, 0x01, 0xe0, 0x8e, 0xe1, 0x53, 0x99, 0x0b, 
+	0x39, 0x01, 0x91, 0x0b, 0xe1, 0xbc, 0xe0, 0xed, 
+	0x0a, 0x28, 0xd3, 0x0e, 0x98, 0x02, 0x68, 0x39, 
+	0x31, 0x03, 0x08, 0x89, 0x00, 0x89, 0x31, 0x04, 
+	0x60, 0x39, 0x39, 0x80, 0x6f, 0xc9, 0x80, 0x08, 
+	0xe1, 0xae, 0xe0, 0xf5, 0xe0, 0x1d, 0xe1, 0x1b, 
+	0xe0, 0xa0, 0x09, 0xe8, 0xd3, 0x0c, 0x98, 0x02, 
+	0x68, 0x39, 0x31, 0x03, 0x08, 0x89, 0x00, 0x89, 
+	0x31, 0x04, 0x60, 0x39, 0x39, 0x80, 0x6f, 0xcd, 
+	0xf0, 0x01, 0xfa, 0xda, 0xc5, 0x03, 0xe1, 0x9b, 
+	0x20, 0x20, 0x40, 0x28, 0x99, 0x02, 0x68, 0x38, 
+	0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 0x30, 0x04, 
+	0x60, 0x38, 0x38, 0x80, 0x6f, 0xc0, 0x60, 0x01, 
+	0xe1, 0x8e, 0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 
+	0x00, 0x80, 0x30, 0x04, 0x60, 0x38, 0x38, 0x80, 
+	0x6f, 0xc0, 0xb0, 0x81, 0x90, 0x00, 0x09, 0x68, 
+	0xd3, 0x0c, 0x26, 0x00, 0x68, 0xa0, 0xe0, 0x01, 
+	0xe1, 0x7e, 0x36, 0x01, 0x42, 0x86, 0xda, 0x09, 
+	0x99, 0x00, 0x5d, 0x89, 0x29, 0x00, 0xd1, 0xf8, 
+	0xe0, 0x04, 0xe1, 0x75, 0x98, 0x00, 0xf7, 0xfe, 
+	0xfe, 0xcd, 0x1c, 0x06, 0x98, 0x02, 0x1b, 0x80, 
+	0x90, 0x02, 0x07, 0xe8, 0x0f, 0xc0, 0x90, 0x06, 
+	0xd1, 0x16, 0x0a, 0x68, 0xd3, 0x01, 0x20, 0x30, 
+	0xe0, 0x00, 0x20, 0x20, 0x06, 0x05, 0x0e, 0x2d, 
+	0x98, 0x02, 0x38, 0x01, 0x90, 0x02, 0xd4, 0x0b, 
+	0x98, 0x03, 0x30, 0x01, 0x90, 0x03, 0x99, 0x0b, 
+	0x6a, 0x22, 0x1c, 0x28, 0xf7, 0xfe, 0xfd, 0xe8, 
+	0x98, 0x02, 0x38, 0x01, 0x90, 0x02, 0xd5, 0xf3, 
+	0x25, 0x00, 0x2e, 0x00, 0xdd, 0x08, 0x99, 0x00, 
+	0x5d, 0x48, 0x99, 0x0b, 0x6a, 0x22, 0xf7, 0xfe, 
+	0xfd, 0xdb, 0x35, 0x01, 0x42, 0xb5, 0xdb, 0xf6, 
+	0x98, 0x03, 0x19, 0x80, 0x90, 0x03, 0x98, 0x06, 
+	0x28, 0x00, 0xd0, 0x0c, 0x98, 0x02, 0x1e, 0x45, 
+	0xd4, 0x09, 0x98, 0x03, 0x30, 0x01, 0x90, 0x03, 
+	0x20, 0x20, 0x99, 0x0b, 0x6a, 0x22, 0xf7, 0xfe, 
+	0xfd, 0xc7, 0x3d, 0x01, 0xd5, 0xf5, 0xb0, 0x01, 
+	0xe1, 0x32, 0x09, 0xe8, 0xd3, 0x0c, 0x68, 0x38, 
+	0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 0x30, 0x08, 
+	0x1f, 0xc1, 0x39, 0x01, 0x60, 0x38, 0x22, 0x08, 
+	0x98, 0x07, 0xf7, 0xfe, 0xfe, 0x0f, 0xe0, 0x08, 
+	0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 
+	0x30, 0x04, 0x60, 0x38, 0x38, 0x80, 0x6f, 0xc3, 
+	0x93, 0x00, 0x0a, 0x28, 0xd3, 0x03, 0x9b, 0x00, 
+	0x04, 0x1b, 0x0c, 0x1b, 0x93, 0x00, 0xa0, 0x17, 
+	0x62, 0xa0, 0x09, 0x28, 0xd3, 0x01, 0xa0, 0x1a, 
+	0xe0, 0x00, 0xa0, 0x18, 0x60, 0x60, 0x09, 0x68, 
+	0xd3, 0x61, 0xe0, 0xe3, 0x09, 0xe8, 0xd3, 0x0c, 
+	0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 
+	0x30, 0x08, 0x1f, 0xc1, 0x39, 0x01, 0x60, 0x38, 
+	0x22, 0x08, 0x98, 0x07, 0xf7, 0xfe, 0xfd, 0xe6, 
+	0xe0, 0x08, 0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 
+	0x00, 0x80, 0x30, 0x04, 0x60, 0x38, 0x38, 0x80, 
+	0x6f, 0xc3, 0x93, 0x00, 0x0a, 0x28, 0xd3, 0x16, 
+	0x9b, 0x00, 0x04, 0x1b, 0x0c, 0x1b, 0xe0, 0x11, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0x22, 0x44, 0x30, 0x31, 0x32, 0x33, 
+	0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 
+	0x43, 0x44, 0x45, 0x46, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x58, 0x00, 0x00, 0x93, 0x00, 0xa0, 0x78, 
+	0x62, 0xa0, 0x09, 0x28, 0xd3, 0x01, 0xa0, 0x7b, 
+	0xe0, 0x00, 0xa0, 0x79, 0x60, 0x60, 0x09, 0x68, 
+	0xd3, 0x25, 0xe0, 0xa7, 0x68, 0x38, 0x30, 0x03, 
+	0x08, 0x80, 0x00, 0x80, 0x30, 0x04, 0x60, 0x38, 
+	0x38, 0x80, 0x6f, 0xc3, 0x93, 0x00, 0xa0, 0x6e, 
+	0x62, 0xa0, 0x09, 0x28, 0xd3, 0x01, 0xa0, 0x72, 
+	0xe0, 0x00, 0xa0, 0x6f, 0x60, 0x60, 0x20, 0x08, 
+	0x23, 0x10, 0x43, 0x1d, 0x60, 0xa0, 0xe0, 0x7e, 
+	0x09, 0xe8, 0xd3, 0x0d, 0x68, 0x38, 0x30, 0x03, 
+	0x08, 0x80, 0x00, 0x80, 0x30, 0x08, 0x1f, 0xc1, 
+	0x39, 0x01, 0x60, 0x38, 0x22, 0x08, 0x98, 0x07, 
+	0xf7, 0xfe, 0xfd, 0x94, 0xe0, 0x09, 0xe0, 0x9b, 
+	0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 
+	0x30, 0x04, 0x60, 0x38, 0x38, 0x80, 0x6f, 0xc3, 
+	0x93, 0x00, 0x0a, 0x28, 0xd3, 0x03, 0x9b, 0x00, 
+	0x04, 0x1b, 0x0c, 0x1b, 0x93, 0x00, 0x09, 0x28, 
+	0xd3, 0x01, 0xa0, 0x5e, 0xe0, 0x00, 0xa0, 0x5a, 
+	0x60, 0x60, 0x09, 0x68, 0xd3, 0x57, 0xe0, 0x69, 
+	0x09, 0xe8, 0xd3, 0x0c, 0x68, 0x38, 0x30, 0x03, 
+	0x08, 0x80, 0x00, 0x80, 0x30, 0x08, 0x1f, 0xc1, 
+	0x39, 0x01, 0x60, 0x38, 0x22, 0x08, 0x98, 0x07, 
+	0xf7, 0xfe, 0xfd, 0x6c, 0xe0, 0x08, 0x68, 0x38, 
+	0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 0x30, 0x04, 
+	0x60, 0x38, 0x38, 0x80, 0x6f, 0xc3, 0x93, 0x00, 
+	0x0a, 0x28, 0xd3, 0x03, 0x9b, 0x00, 0x04, 0x1b, 
+	0x0c, 0x1b, 0x93, 0x00, 0xa0, 0x48, 0x60, 0x60, 
+	0x09, 0x68, 0xd3, 0x34, 0xe0, 0x46, 0x09, 0xe8, 
+	0xd3, 0x21, 0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 
+	0x00, 0x80, 0x30, 0x08, 0x1f, 0xc1, 0x39, 0x01, 
+	0x60, 0x38, 0x22, 0x08, 0x98, 0x07, 0xf7, 0xfe, 
+	0xfd, 0x49, 0x99, 0x07, 0x9b, 0x09, 0x68, 0x08, 
+	0x90, 0x04, 0x68, 0x49, 0x91, 0x03, 0xcb, 0x0c, 
+	0xf0, 0x01, 0xf9, 0x94, 0x28, 0x00, 0xd0, 0x08, 
+	0x98, 0x04, 0x99, 0x03, 0xf0, 0x01, 0xf9, 0x98, 
+	0x9a, 0x07, 0xc2, 0x03, 0x20, 0x00, 0x43, 0xc0, 
+	0xe0, 0x14, 0x20, 0x00, 0xe0, 0x12, 0x68, 0x38, 
+	0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 0x30, 0x04, 
+	0x60, 0x38, 0x38, 0x80, 0x6f, 0xc0, 0x0a, 0x29, 
+	0xd3, 0x01, 0x04, 0x00, 0x14, 0x00, 0x28, 0x00, 
+	0xda, 0x02, 0x42, 0x43, 0xe0, 0x01, 0xe0, 0x2b, 
+	0x1c, 0x03, 0x93, 0x00, 0x28, 0x00, 0xda, 0x01, 
+	0xa0, 0x2d, 0xe0, 0x08, 0x08, 0xa8, 0xd3, 0x01, 
+	0xa0, 0x2c, 0xe0, 0x04, 0x08, 0xe8, 0xd3, 0x01, 
+	0xa0, 0x2b, 0xe0, 0x00, 0xa0, 0x24, 0x60, 0x60, 
+	0x09, 0x68, 0xd3, 0x19, 0x4b, 0x29, 0x40, 0x1d, 
+	0xe0, 0x16, 0x23, 0x01, 0x02, 0x5b, 0x43, 0x1d, 
+	0x09, 0x68, 0xd2, 0x01, 0x20, 0x06, 0x60, 0xa0, 
+	0x68, 0x38, 0x30, 0x03, 0x08, 0x80, 0x00, 0x80, 
+	0x30, 0x08, 0x1f, 0xc1, 0x39, 0x01, 0x60, 0x38, 
+	0x22, 0x08, 0x98, 0x08, 0xf7, 0xfe, 0xfc, 0xfa, 
+	0x20, 0x00, 0x23, 0x00, 0x60, 0x60, 0x93, 0x00, 
+	0x98, 0x01, 0x62, 0xe0, 0x60, 0x25, 0x98, 0x0a, 
+	0x9b, 0x00, 0x1c, 0x31, 0x1c, 0x22, 0xf7, 0xff, 
+	0xfb, 0x3f, 0x99, 0x02, 0x18, 0x40, 0x90, 0x02, 
+	0xb0, 0x02, 0x99, 0x09, 0x78, 0x08, 0x31, 0x01, 
+	0x91, 0x09, 0x28, 0x00, 0xd0, 0x00, 0xe5, 0x29, 
+	0x98, 0x08, 0x6a, 0x61, 0xf7, 0xfe, 0xfc, 0x82, 
+	0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0x43, 0xc0, 
+	0xe0, 0x00, 0x98, 0x00, 0xb0, 0x08, 0xb0, 0x04, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
+	0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x00, 0x00, 
+	0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x2d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 
+	0x20, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xff, 
+	0xe3, 0x10, 0x06, 0x01, 0x13, 0xa0, 0x00, 0x00, 
+	0x11, 0x2f, 0xff, 0x1e, 0xea, 0x00, 0x00, 0x0a, 
+	0xe3, 0x12, 0x07, 0x02, 0x0a, 0x00, 0x00, 0x08, 
+	0xe1, 0x5c, 0x00, 0x80, 0x83, 0xa0, 0x00, 0x00, 
+	0x81, 0x2f, 0xff, 0x1e, 0x03, 0x51, 0x00, 0x00, 
+	0x03, 0xa0, 0x00, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x10, 0x07, 0x02, 0x13, 0xa0, 0x00, 0x00, 
+	0x11, 0x2f, 0xff, 0x1e, 0xe3, 0xa0, 0x35, 0x06, 
+	0xea, 0x00, 0x07, 0x2e, 0xe1, 0x2f, 0xff, 0x1f, 
+	0xea, 0x00, 0x00, 0x3e, 0xe5, 0x9f, 0x04, 0x5c, 
+	0xe3, 0x50, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x02, 
+	0xe3, 0xa0, 0x00, 0x20, 0xe3, 0xa0, 0x10, 0x01, 
+	0xef, 0x12, 0x34, 0x56, 0xe5, 0x9f, 0x04, 0x48, 
+	0xe3, 0x50, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 
+	0xe5, 0x90, 0x10, 0x00, 0xe5, 0x9f, 0x04, 0x3c, 
+	0xe5, 0x90, 0x30, 0x00, 0xe5, 0x9f, 0x04, 0x38, 
+	0xe5, 0x90, 0xd0, 0x00, 0xea, 0x00, 0x00, 0x0b, 
+	0xe3, 0xa0, 0x00, 0x16, 0xe5, 0x9f, 0x44, 0x18, 
+	0xe2, 0x84, 0x20, 0xa8, 0xe2, 0x84, 0x10, 0xa4, 
+	0xe5, 0x81, 0x20, 0x00, 0xef, 0x12, 0x34, 0x56, 
+	0xe2, 0x84, 0x00, 0xa8, 0xe5, 0x90, 0xd0, 0x08, 
+	0xe5, 0x90, 0x30, 0x04, 0xe5, 0x90, 0x10, 0x00, 
+	0xe3, 0x51, 0x00, 0x00, 0x05, 0x9f, 0x14, 0x04, 
+	0xe2, 0x8f, 0x00, 0x10, 0xeb, 0x00, 0x00, 0x36, 
+	0xe5, 0x9f, 0x03, 0xfc, 0xe5, 0x9f, 0x33, 0xfc, 
+	0xeb, 0x00, 0x00, 0x12, 0xea, 0x00, 0x00, 0x4e, 
+	0x2e, 0x00, 0x04, 0x04, 0x2e, 0x03, 0xa9, 0xd0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xe9, 0x2d, 0x40, 0x00, 0xe3, 0x1c, 0x00, 0x01, 
+	0x1a, 0x00, 0x00, 0x03, 0xe1, 0xa0, 0xe0, 0x0f, 
+	0xe1, 0x2f, 0xff, 0x1c, 0xe8, 0xbd, 0x40, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x8f, 0xe0, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1c, 0x47, 0x78, 0x00, 0x00, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x1c, 0x02, 0x1c, 0x13, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x40, 0x00, 0xe3, 0x13, 0x00, 0x01, 
+	0x1a, 0x00, 0x00, 0x03, 0xe1, 0xa0, 0xe0, 0x0f, 
+	0xe1, 0x2f, 0xff, 0x13, 0xe8, 0xbd, 0x40, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x8f, 0xe0, 0x01, 
+	0xe1, 0x2f, 0xff, 0x13, 0x47, 0x78, 0x00, 0x00, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe5, 0x9f, 0xc0, 0x44, 0xe8, 0x8c, 0xff, 0xff, 
+	0xe2, 0x8f, 0x00, 0x00, 0xea, 0x00, 0x0e, 0xf4, 
+	0x00, 0x80, 0x0e, 0x09, 0x54, 0x68, 0x69, 0x73, 
+	0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x63, 0x61, 
+	0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x72, 
+	0x75, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 
+	0x54, 0x68, 0x75, 0x6d, 0x62, 0x20, 0x63, 0x6f, 
+	0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 
+	0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 
+	0x6f, 0x72, 0x00, 0x00, 0x2e, 0x08, 0x21, 0xd0, 
+	0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0x73, 0x08, 
+	0xe5, 0x87, 0x00, 0x00, 0xe2, 0x8f, 0x50, 0xc9, 
+	0xe2, 0x85, 0x5c, 0x02, 0xe5, 0x87, 0x50, 0x10, 
+	0xe2, 0x8f, 0x50, 0xe9, 0xe2, 0x85, 0x5c, 0x02, 
+	0xe5, 0x87, 0x50, 0x14, 0xe1, 0xa0, 0x80, 0x0e, 
+	0xe2, 0x87, 0x00, 0x04, 0xeb, 0x00, 0x04, 0x1d, 
+	0xe9, 0x2d, 0x01, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
+	0xe5, 0xc7, 0x00, 0x2c, 0xe2, 0x87, 0x00, 0x04, 
+	0xeb, 0x00, 0x00, 0xce, 0xe3, 0xa0, 0x40, 0x00, 
+	0xe2, 0x8d, 0x00, 0x04, 0xe5, 0x97, 0x10, 0x00, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe5, 0xc7, 0x30, 0x2e, 
+	0xe2, 0x81, 0x30, 0x08, 0xe8, 0x91, 0x00, 0x06, 
+	0xe5, 0x9f, 0xc2, 0xcc, 0xeb, 0xff, 0xff, 0xb7, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0x80, 0x01, 
+	0xea, 0x00, 0x00, 0x01, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0x80, 0x00, 0xe1, 0xa0, 0x70, 0x00, 
+	0xeb, 0x00, 0x04, 0x15, 0xe1, 0xa0, 0x00, 0x08, 
+	0xeb, 0x00, 0x00, 0x0d, 0xe1, 0xa0, 0x20, 0x07, 
+	0xe3, 0x52, 0x00, 0x00, 0x12, 0x8f, 0x00, 0x08, 
+	0x15, 0x9f, 0x10, 0x00, 0xeb, 0x00, 0x0e, 0xb5, 
+	0x41, 0x42, 0x45, 0x58, 0x00, 0x80, 0x0e, 0x06, 
+	0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 
+	0x6f, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x6f, 0x20, 
+	0x6c, 0x61, 0x72, 0x67, 0x65, 0x00, 0x00, 0x00, 
+	0xe3, 0xa0, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe5, 0x9f, 0x32, 0x60, 0xeb, 0xff, 0xff, 0xa9, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0xc2, 0x28, 
+	0xe5, 0xdc, 0x00, 0x2c, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xa0, 0x30, 0x00, 0xe5, 0x9f, 0x12, 0x14, 
+	0xe4, 0x81, 0xf0, 0x04, 0xe8, 0xb3, 0x00, 0x04, 
+	0xe8, 0xa1, 0x00, 0x04, 0xe4, 0xd3, 0x20, 0x01, 
+	0xe4, 0xc1, 0x20, 0x01, 0xe3, 0x52, 0x00, 0x00, 
+	0x1a, 0xff, 0xff, 0xfb, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0xa0, 0x80, 0x01, 
+	0xeb, 0xff, 0xff, 0xf2, 0xe5, 0x9f, 0x71, 0xe8, 
+	0xe5, 0xd7, 0x20, 0x2f, 0xe3, 0x52, 0x00, 0x00, 
+	0x1a, 0x00, 0x00, 0x2c, 0xe3, 0xa0, 0x20, 0x01, 
+	0xe5, 0xc7, 0x20, 0x2f, 0xeb, 0x00, 0x00, 0x3b, 
+	0xe1, 0xa0, 0x10, 0x08, 0xeb, 0x00, 0x03, 0xde, 
+	0xe3, 0x50, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x1b, 
+	0xe2, 0x88, 0xb0, 0x40, 0xe9, 0x3b, 0x01, 0xef, 
+	0xe9, 0x2c, 0x01, 0xef, 0xe9, 0x3b, 0x01, 0xef, 
+	0xe9, 0x2c, 0x01, 0xef, 0xe5, 0x9f, 0x71, 0xa8, 
+	0xe5, 0x97, 0x40, 0xa0, 0xe3, 0x84, 0x40, 0x80, 
+	0xe1, 0x21, 0xf0, 0x04, 0xe1, 0xa0, 0xd0, 0x0c, 
+	0xe1, 0xa0, 0xb0, 0x04, 0xe5, 0x9f, 0x01, 0x8c, 
+	0xe5, 0x90, 0x00, 0x04, 0xe1, 0xa0, 0x10, 0x0d, 
+	0xeb, 0x00, 0x03, 0xfe, 0xe3, 0xa0, 0x10, 0x00, 
+	0xe5, 0xc7, 0x10, 0x2f, 0xe1, 0xa0, 0x10, 0x0d, 
+	0xe3, 0x54, 0x00, 0x10, 0x1a, 0x00, 0x00, 0x02, 
+	0xe3, 0xa0, 0x00, 0x17, 0xef, 0x12, 0x34, 0x56, 
+	0xe3, 0x21, 0xf0, 0x93, 0xe1, 0xa0, 0x00, 0x00, 
+	0xe2, 0x81, 0xe0, 0x3c, 0xe9, 0x5e, 0x7f, 0xff, 
+	0xe1, 0xa0, 0x00, 0x00, 0xe8, 0xde, 0x80, 0x00, 
+	0xe2, 0x8f, 0x00, 0x00, 0xea, 0x00, 0x0e, 0x72, 
+	0x00, 0x80, 0x0e, 0x07, 0x4e, 0x6f, 0x20, 0x53, 
+	0x74, 0x61, 0x63, 0x6b, 0x20, 0x66, 0x6f, 0x72, 
+	0x20, 0x54, 0x72, 0x61, 0x70, 0x20, 0x48, 0x61, 
+	0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 
+	0xe2, 0x8f, 0x00, 0x00, 0xea, 0x00, 0x0e, 0x68, 
+	0x00, 0x80, 0x0e, 0x00, 0x52, 0x65, 0x63, 0x75, 
+	0x72, 0x73, 0x69, 0x76, 0x65, 0x20, 0x54, 0x72, 
+	0x61, 0x70, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe5, 0x9f, 0xc1, 0x04, 0xe3, 0xa0, 0x00, 0x00, 
+	0xe5, 0xcc, 0x00, 0x2f, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0x00, 0xf0, 
+	0xe5, 0x90, 0x00, 0x00, 0xe5, 0x90, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe5, 0x9f, 0x00, 0xdc, 0xe2, 0x80, 0x00, 0x04, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe5, 0x9f, 0xc0, 0xcc, 0xe3, 0x50, 0x0b, 0x02, 
+	0x33, 0xa0, 0x0b, 0x02, 0xe2, 0x8c, 0xc0, 0x04, 
+	0xe9, 0x9c, 0x00, 0x0c, 0xe0, 0x53, 0x31, 0x00, 
+	0x21, 0x53, 0x00, 0x02, 0x3a, 0x00, 0x00, 0x03, 
+	0xe5, 0x81, 0x20, 0x00, 0xe0, 0x82, 0x21, 0x00, 
+	0xe5, 0x8c, 0x20, 0x04, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe9, 0x2d, 0x50, 0x03, 0xe1, 0xa0, 0x10, 0x0c, 
+	0xeb, 0x00, 0x00, 0x44, 0xe3, 0x50, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x0d, 0xe5, 0x9d, 0xc0, 0x08, 
+	0xe9, 0x9c, 0x40, 0x04, 0xe1, 0x5e, 0x00, 0x01, 
+	0x10, 0x4e, 0x30, 0x02, 0xe0, 0x81, 0xe0, 0x00, 
+	0x11, 0xa0, 0x00, 0x02, 0x11, 0xa0, 0x20, 0x01, 
+	0xe9, 0x8c, 0x40, 0x04, 0x13, 0x53, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x03, 0xe8, 0xbd, 0x50, 0x03, 
+	0xe5, 0x81, 0x00, 0x00, 0xe1, 0xa0, 0x01, 0x43, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe8, 0xbd, 0x50, 0x03, 
+	0xe9, 0x9c, 0x00, 0x0c, 0xe0, 0x43, 0x00, 0x02, 
+	0xe1, 0xb0, 0x01, 0x40, 0x03, 0xa0, 0x20, 0x00, 
+	0x15, 0x8c, 0x30, 0x04, 0xe5, 0x81, 0x20, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe2, 0x80, 0x20, 0x03, 0xe3, 0xc2, 0x20, 0x03, 
+	0xe5, 0x9f, 0xc0, 0x24, 0xe2, 0x8c, 0xc0, 0x08, 
+	0xe8, 0x9c, 0x00, 0x03, 0xe0, 0x90, 0x20, 0x02, 
+	0x31, 0x52, 0x00, 0x01, 0x35, 0x8c, 0x20, 0x00, 
+	0x23, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x2e, 0x08, 0x21, 0x4c, 0x2e, 0x08, 0x21, 0x18, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x02, 0xcc, 0x18, 
+	0x2e, 0x02, 0xcc, 0x14, 0x2e, 0x02, 0xcc, 0x10, 
+	0x2e, 0x08, 0xd7, 0x68, 0x2e, 0x00, 0x1a, 0xf9, 
+	0x2e, 0x02, 0x0e, 0x19, 0x2e, 0x02, 0x0c, 0xcd, 
+	0x2e, 0x02, 0x0d, 0x8d, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0x00, 0x04, 0xe5, 0x90, 0x00, 0x00, 
+	0xe2, 0x00, 0x04, 0xff, 0xe3, 0x50, 0x04, 0xea, 
+	0x03, 0xa0, 0x00, 0x01, 0x13, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe2, 0x40, 0x0b, 0x05, 0xe3, 0x50, 0x0b, 0x1b, 
+	0x33, 0xa0, 0x00, 0x01, 0x23, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe2, 0x8f, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x55, 0x6e, 0x6b, 0x6e, 
+	0x6f, 0x77, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 
+	0x72, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 
+	0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x20, 0x54, 
+	0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x5a, 
+	0x65, 0x72, 0x6f, 0x00, 0x00, 0x02, 0x00, 0x01, 
+	0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 
+	0x64, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 
+	0x00, 0x02, 0x00, 0x02, 0x55, 0x6e, 0x64, 0x65, 
+	0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x53, 0x57, 
+	0x49, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 
+	0x00, 0x02, 0x00, 0x03, 0x50, 0x72, 0x65, 0x66, 
+	0x65, 0x74, 0x63, 0x68, 0x20, 0x41, 0x62, 0x6f, 
+	0x72, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 
+	0x44, 0x61, 0x74, 0x61, 0x20, 0x41, 0x62, 0x6f, 
+	0x72, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, 
+	0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 
+	0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 
+	0x6e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 
+	0x55, 0x6e, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 
+	0x64, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 
+	0x75, 0x70, 0x74, 0x00, 0x00, 0x02, 0x00, 0x07, 
+	0x55, 0x6e, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 
+	0x64, 0x20, 0x46, 0x61, 0x73, 0x74, 0x20, 0x49, 
+	0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x01, 0xfe, 0x80, 
+	0x2e, 0x01, 0xfe, 0x98, 0x2e, 0x01, 0xfe, 0xb4, 
+	0x2e, 0x01, 0xfe, 0xd4, 0x2e, 0x01, 0xfe, 0xe8, 
+	0x2e, 0x01, 0xfe, 0xf8, 0x2e, 0x01, 0xff, 0x10, 
+	0x2e, 0x01, 0xff, 0x28, 0xe2, 0x4f, 0x20, 0x28, 
+	0xe7, 0x92, 0x01, 0x00, 0xea, 0xff, 0xff, 0x1c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x17, 0xc3, 0x40, 0x58, 0x1a, 0xc0, 0x1c, 0x01, 
+	0x08, 0x40, 0x08, 0x42, 0x18, 0x80, 0x09, 0x02, 
+	0x18, 0x80, 0x0a, 0x02, 0x18, 0x80, 0x0c, 0x02, 
+	0x18, 0x80, 0x08, 0xc0, 0x00, 0x82, 0x18, 0x12, 
+	0x00, 0x52, 0x1a, 0x89, 0x29, 0x0a, 0xdb, 0x01, 
+	0x1c, 0x40, 0x39, 0x0a, 0x40, 0x58, 0x1a, 0xc0, 
+	0x40, 0x59, 0x1a, 0xc9, 0x47, 0x70, 0x00, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0x30, 0x00, 0x02, 
+	0x01, 0x31, 0x00, 0x03, 0x0a, 0x00, 0x00, 0x05, 
+	0xe1, 0x80, 0xc0, 0x02, 0xe3, 0x3c, 0x01, 0x02, 
+	0x01, 0x91, 0xc0, 0x03, 0x03, 0xa0, 0x00, 0x01, 
+	0x13, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xa0, 0xc4, 0xff, 0xe3, 0x8c, 0xc6, 0x0e, 
+	0xe1, 0x5c, 0x00, 0x80, 0x83, 0xa0, 0x00, 0x01, 
+	0x81, 0x2f, 0xff, 0x1e, 0x03, 0x51, 0x00, 0x00, 
+	0x03, 0xa0, 0x00, 0x01, 0x13, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xb5, 0x04, 0xf0, 0x00, 
+	0xf8, 0x04, 0xbc, 0x08, 0x60, 0x1a, 0xbc, 0x08, 
+	0x47, 0x18, 0x47, 0x78, 0xe1, 0xb0, 0x00, 0x80, 
+	0x03, 0x31, 0x00, 0x00, 0x01, 0xa0, 0x00, 0x60, 
+	0x03, 0xa0, 0x20, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xa0, 0x2a, 0xa0, 0xe1, 0xc0, 0x0a, 0x82, 
+	0xe1, 0xa0, 0x00, 0x60, 0xe3, 0x32, 0x00, 0x00, 
+	0xe2, 0x42, 0x2c, 0x03, 0xe2, 0x42, 0x20, 0xfe, 
+	0x0a, 0x00, 0x00, 0x06, 0xe3, 0x80, 0x04, 0x3f, 
+	0xe3, 0x80, 0x06, 0x0e, 0xe2, 0x22, 0x3b, 0x01, 
+	0xe3, 0x33, 0x00, 0x01, 0x11, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xa0, 0x10, 0x01, 0xea, 0x00, 0x04, 0x70, 
+	0xe2, 0x00, 0xc1, 0x02, 0xe1, 0xa0, 0x06, 0x00, 
+	0xe2, 0x42, 0x20, 0x01, 0xe1, 0xb0, 0x00, 0x80, 
+	0x4a, 0x00, 0x00, 0x02, 0xe1, 0xb0, 0x10, 0x81, 
+	0x23, 0x80, 0x0a, 0x01, 0xea, 0xff, 0xff, 0xf9, 
+	0xe1, 0xa0, 0x04, 0xc0, 0xe3, 0xc0, 0x05, 0x01, 
+	0xe1, 0x8c, 0x01, 0x20, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe2, 0x00, 0xc1, 0x02, 0xe1, 0xb0, 0x30, 0x80, 
+	0xe1, 0xb0, 0x3a, 0xa3, 0x0a, 0x00, 0x00, 0x0b, 
+	0xe2, 0x83, 0xe0, 0x01, 0xe3, 0x5e, 0x0b, 0x02, 
+	0xaa, 0x00, 0x00, 0x39, 0xe0, 0x93, 0x30, 0x02, 
+	0xda, 0x00, 0x00, 0x11, 0xe2, 0x83, 0xe0, 0x01, 
+	0xe3, 0x5e, 0x0b, 0x02, 0xaa, 0x00, 0x00, 0x37, 
+	0xe1, 0x83, 0x06, 0x00, 0xe1, 0x8c, 0x06, 0x60, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0x91, 0x30, 0x80, 0x01, 0xa0, 0x00, 0x0c, 
+	0x08, 0xbd, 0x40, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xb0, 0x10, 0x81, 0xe0, 0xa0, 0x00, 0x00, 
+	0xe2, 0x42, 0x20, 0x01, 0xe3, 0x10, 0x06, 0x01, 
+	0x0a, 0xff, 0xff, 0xfa, 0xe3, 0xa0, 0x30, 0x01, 
+	0xea, 0xff, 0xff, 0xeb, 0xe1, 0xa0, 0x05, 0x80, 
+	0xe3, 0x80, 0x01, 0x02, 0xe3, 0x73, 0x00, 0x14, 
+	0xca, 0x00, 0x00, 0x05, 0xe3, 0x73, 0x00, 0x34, 
+	0xaa, 0x00, 0x00, 0x0d, 0xe1, 0xa0, 0x00, 0x0c, 
+	0xe3, 0xa0, 0x10, 0x00, 0xe8, 0xbd, 0x40, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0xa0, 0x05, 0xa0, 
+	0xe2, 0x63, 0x30, 0x01, 0xe2, 0x63, 0x20, 0x20, 
+	0xe1, 0xa0, 0xe2, 0x11, 0xe1, 0xb0, 0xe0, 0x8e, 
+	0xe1, 0xa0, 0xe2, 0x10, 0xe1, 0x8e, 0x13, 0x31, 
+	0xe1, 0xa0, 0x03, 0x30, 0xe1, 0x80, 0x00, 0x0c, 
+	0xea, 0x00, 0x00, 0x0a, 0xe2, 0x93, 0x30, 0x20, 
+	0xda, 0x00, 0x00, 0x03, 0xe1, 0x80, 0x0a, 0xa1, 
+	0xe1, 0xb0, 0xe3, 0x11, 0xe2, 0x63, 0x30, 0x0c, 
+	0xea, 0x00, 0x00, 0x02, 0xe2, 0x83, 0x30, 0x15, 
+	0xe1, 0x91, 0xe3, 0x10, 0xe2, 0x63, 0x30, 0x21, 
+	0xe1, 0xa0, 0x13, 0x30, 0xe1, 0xa0, 0x00, 0x0c, 
+	0x03, 0x11, 0x00, 0x01, 0x98, 0xbd, 0x40, 0x00, 
+	0x91, 0x2f, 0xff, 0x1e, 0xe2, 0x91, 0x10, 0x01, 
+	0x22, 0x80, 0x00, 0x01, 0xe8, 0xbd, 0x40, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe8, 0xbd, 0x40, 0x00, 
+	0xe3, 0xa0, 0x10, 0x01, 0xea, 0x00, 0x04, 0x1e, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe3, 0xa0, 0x10, 0x01, 
+	0xea, 0x00, 0x04, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0xb0, 0xc0, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0xe1, 0xa0, 0x35, 0x0c, 0xe1, 0xa0, 0x0a, 0x2c, 
+	0xe1, 0xa0, 0x25, 0x81, 0xe1, 0x83, 0x1a, 0xa1, 
+	0x12, 0x80, 0x0b, 0x1e, 0xe1, 0xa0, 0x00, 0x60, 
+	0x13, 0x81, 0x11, 0x02, 0xe1, 0xb0, 0xca, 0xcc, 
+	0x0a, 0x00, 0x00, 0x02, 0xe3, 0x7c, 0x00, 0x01, 
+	0x03, 0x80, 0x01, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x11, 0x01, 0x02, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xd1, 0x11, 0x02, 0x0a, 0x00, 0x00, 0x15, 
+	0xe1, 0xb0, 0x38, 0x21, 0x01, 0xa0, 0x18, 0x01, 
+	0x03, 0xa0, 0xc0, 0x10, 0x13, 0xa0, 0xc0, 0x00, 
+	0xe1, 0xb0, 0x3c, 0x21, 0x01, 0xa0, 0x14, 0x01, 
+	0x02, 0x8c, 0xc0, 0x08, 0xe1, 0xb0, 0x3e, 0x21, 
+	0x01, 0xa0, 0x12, 0x01, 0x02, 0x8c, 0xc0, 0x04, 
+	0xe1, 0xb0, 0x3f, 0x21, 0x01, 0xa0, 0x11, 0x01, 
+	0x02, 0x8c, 0xc0, 0x02, 0xe1, 0xb0, 0x3f, 0xa1, 
+	0x01, 0xa0, 0x10, 0x81, 0x02, 0x8c, 0xc0, 0x01, 
+	0xe2, 0x6c, 0x30, 0x20, 0xe1, 0x81, 0x13, 0x32, 
+	0xe1, 0xa0, 0x2c, 0x12, 0xe0, 0x40, 0x00, 0x0c, 
+	0xe2, 0x80, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xb0, 0x38, 0x22, 0x01, 0xa0, 0x28, 0x02, 
+	0x03, 0xa0, 0xc0, 0x10, 0x13, 0xa0, 0xc0, 0x00, 
+	0xe1, 0xb0, 0x3c, 0x22, 0x01, 0xa0, 0x24, 0x02, 
+	0x02, 0x8c, 0xc0, 0x08, 0xe1, 0xb0, 0x3e, 0x22, 
+	0x01, 0xa0, 0x22, 0x02, 0x02, 0x8c, 0xc0, 0x04, 
+	0xe1, 0xb0, 0x3f, 0x22, 0x01, 0xa0, 0x21, 0x02, 
+	0x02, 0x8c, 0xc0, 0x02, 0xe1, 0xb0, 0x3f, 0xa2, 
+	0x01, 0xa0, 0x20, 0x82, 0x02, 0x8c, 0xc0, 0x01, 
+	0xe1, 0xa0, 0x10, 0x02, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe2, 0x40, 0x00, 0x1f, 0xe0, 0x40, 0x00, 0x0c, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x4b, 0xf0, 0xe8, 0x93, 0x00, 0x38, 
+	0xe3, 0x10, 0x01, 0x01, 0x03, 0x13, 0x01, 0x01, 
+	0x1a, 0x00, 0x00, 0x03, 0xeb, 0x00, 0x03, 0xe5, 
+	0xeb, 0x00, 0x05, 0x39, 0xe8, 0xbd, 0x4b, 0xf0, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe2, 0x4f, 0xe0, 0x14, 
+	0xe3, 0xa0, 0xb0, 0x00, 0xea, 0x00, 0x04, 0x7f, 
+	0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x4b, 0xf0, 
+	0xe1, 0xa0, 0x30, 0x00, 0xe1, 0xa0, 0x40, 0x01, 
+	0xe1, 0xa0, 0x50, 0x02, 0xe3, 0x10, 0x01, 0x01, 
+	0x1a, 0x00, 0x00, 0x03, 0xeb, 0x00, 0x03, 0xd7, 
+	0xeb, 0x00, 0x05, 0x2b, 0xe8, 0xbd, 0x4b, 0xf0, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe2, 0x4f, 0xe0, 0x14, 
+	0xe3, 0xa0, 0xb0, 0x00, 0xea, 0x00, 0x04, 0x71, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0xa0, 0x38, 0x80, 
+	0xe1, 0xa0, 0x38, 0xa3, 0xe1, 0xc0, 0x00, 0x03, 
+	0xe1, 0xd1, 0xc0, 0x80, 0x5a, 0x00, 0x00, 0x0c, 
+	0xe2, 0x53, 0x3b, 0x0f, 0x4a, 0x00, 0x00, 0x13, 
+	0x12, 0x83, 0xc0, 0x01, 0x13, 0x5c, 0x0b, 0x02, 
+	0xaa, 0x00, 0x00, 0x0d, 0xe1, 0xb0, 0xc5, 0xa2, 
+	0x2a, 0x00, 0x00, 0x58, 0xe1, 0x80, 0x0a, 0x03, 
+	0xe3, 0xc1, 0x11, 0x02, 0xe1, 0x80, 0x05, 0xa1, 
+	0xe1, 0x8c, 0x1a, 0x81, 0xe3, 0xa0, 0x30, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x10, 0x01, 0x01, 
+	0x1a, 0x00, 0x00, 0x40, 0xe2, 0x00, 0x01, 0x02, 
+	0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x30, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x33, 0x00, 0x00, 
+	0x13, 0xa0, 0x33, 0x19, 0x11, 0x2f, 0xff, 0x1e, 
+	0xe2, 0x93, 0x30, 0x34, 0x0a, 0x00, 0x00, 0x31, 
+	0x42, 0x00, 0x01, 0x02, 0x43, 0xa0, 0x10, 0x00, 
+	0x43, 0xa0, 0x30, 0x00, 0x41, 0x2f, 0xff, 0x1e, 
+	0xe2, 0x53, 0x30, 0x20, 0x0a, 0x00, 0x00, 0x13, 
+	0xba, 0x00, 0x00, 0x1a, 0xe1, 0xb0, 0xc3, 0x12, 
+	0x4a, 0x00, 0x00, 0x05, 0xe2, 0x63, 0xc0, 0x20, 
+	0xe1, 0x80, 0x0c, 0x31, 0xe1, 0xa0, 0x2c, 0x32, 
+	0xe1, 0x82, 0x13, 0x11, 0xe3, 0xa0, 0x30, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x96, 0xc0, 0x8c, 
+	0xe2, 0x63, 0xc0, 0x20, 0xe1, 0x80, 0x0c, 0x31, 
+	0xe1, 0xa0, 0x2c, 0x32, 0xe1, 0x82, 0x13, 0x11, 
+	0xe3, 0xa0, 0x30, 0x00, 0x03, 0x11, 0x00, 0x01, 
+	0x01, 0x2f, 0xff, 0x1e, 0xe2, 0x91, 0x10, 0x01, 
+	0x22, 0x80, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe3, 0x32, 0x01, 0x02, 
+	0x41, 0x2f, 0xff, 0x1e, 0x03, 0x11, 0x00, 0x01, 
+	0x01, 0x2f, 0xff, 0x1e, 0xe2, 0x91, 0x10, 0x01, 
+	0x22, 0x80, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe2, 0x83, 0x30, 0x20, 0xe1, 0xb0, 0xc3, 0x11, 
+	0x4a, 0x00, 0x00, 0x04, 0xe2, 0x63, 0xc0, 0x20, 
+	0xe1, 0xa0, 0x1c, 0x31, 0xe2, 0x00, 0x01, 0x02, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x3c, 0x01, 0x02, 0x01, 0x92, 0xc0, 0x06, 
+	0xe2, 0x63, 0xc0, 0x20, 0xe1, 0xa0, 0x1c, 0x31, 
+	0x03, 0x11, 0x00, 0x01, 0x12, 0x81, 0x10, 0x01, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x31, 0x01, 0x02, 0x03, 0x32, 0x00, 0x00, 
+	0x03, 0xa0, 0x10, 0x00, 0x13, 0xa0, 0x10, 0x01, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x10, 0x02, 0x02, 0x1a, 0x00, 0x00, 0x0b, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe3, 0x31, 0x00, 0x00, 
+	0x11, 0xb0, 0x10, 0x81, 0x43, 0xe0, 0x00, 0x00, 
+	0x41, 0x2f, 0xff, 0x1e, 0x03, 0x32, 0x00, 0x00, 
+	0x13, 0xa0, 0x34, 0x61, 0x11, 0x2f, 0xff, 0x1e, 
+	0xe2, 0x00, 0x01, 0x02, 0xe3, 0x80, 0x02, 0x07, 
+	0xe3, 0x80, 0x06, 0xff, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xc1, 0x11, 0x02, 0xe1, 0xa0, 0xcb, 0x02, 
+	0xe1, 0x9c, 0xc0, 0x06, 0xe2, 0x00, 0xc1, 0x02, 
+	0xe1, 0xa0, 0x0a, 0x03, 0xe1, 0x80, 0x05, 0xa1, 
+	0xe1, 0xa0, 0x1a, 0x81, 0xe1, 0x81, 0x15, 0xa2, 
+	0xe3, 0xa0, 0x30, 0x00, 0x0a, 0x00, 0x00, 0x06, 
+	0xe2, 0x91, 0x10, 0x01, 0x22, 0x80, 0x00, 0x01, 
+	0xe2, 0x90, 0x26, 0x01, 0xe1, 0x80, 0x00, 0x0c, 
+	0x51, 0x2f, 0xff, 0x1e, 0xe3, 0xa0, 0x33, 0x19, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x03, 0x11, 0x00, 0x01, 
+	0x01, 0x80, 0x00, 0x0c, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe2, 0x91, 0x10, 0x01, 0x22, 0x80, 0x00, 0x01, 
+	0xe2, 0x90, 0x26, 0x01, 0xe1, 0x80, 0x00, 0x0c, 
+	0x51, 0x2f, 0xff, 0x1e, 0xe3, 0xa0, 0x33, 0x19, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x4b, 0xf0, 0xe1, 0xb0, 0xc0, 0x82, 
+	0x03, 0x33, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x3c, 
+	0xe1, 0xa0, 0x85, 0x0c, 0xe1, 0xa0, 0x2a, 0x2c, 
+	0xe1, 0xa0, 0x55, 0x83, 0xe1, 0x88, 0x4a, 0xa3, 
+	0x12, 0x82, 0x2b, 0x1e, 0xe1, 0xa0, 0x30, 0x62, 
+	0x13, 0x84, 0x41, 0x02, 0xe1, 0xb0, 0xca, 0xcc, 
+	0x02, 0x8f, 0xe0, 0x08, 0x0a, 0x00, 0x04, 0xf8, 
+	0xe3, 0x7c, 0x00, 0x01, 0x0a, 0x00, 0x00, 0x16, 
+	0xe1, 0xb0, 0xc0, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x3c, 0xe1, 0xa0, 0x85, 0x0c, 
+	0xe1, 0xa0, 0x0a, 0x2c, 0xe1, 0xa0, 0x25, 0x81, 
+	0xe1, 0x88, 0x1a, 0xa1, 0x12, 0x80, 0x0b, 0x1e, 
+	0xe1, 0xa0, 0x00, 0x60, 0x13, 0x81, 0x11, 0x02, 
+	0xe1, 0xb0, 0xca, 0xcc, 0x02, 0x8f, 0xe0, 0x08, 
+	0x0a, 0x00, 0x04, 0xb9, 0xe3, 0x7c, 0x00, 0x01, 
+	0x0a, 0x00, 0x00, 0x16, 0xe3, 0xa0, 0xb0, 0x02, 
+	0xeb, 0x00, 0x05, 0x15, 0xeb, 0xff, 0xff, 0x5f, 
+	0xe3, 0x13, 0x02, 0x02, 0x08, 0xbd, 0x4b, 0xf0, 
+	0x01, 0x2f, 0xff, 0x1e, 0xe3, 0x83, 0x35, 0x02, 
+	0xea, 0x00, 0x04, 0x0f, 0xe3, 0x83, 0x31, 0x01, 
+	0xe1, 0xb0, 0xc0, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x0e, 0xe1, 0xa0, 0x85, 0x0c, 
+	0xe1, 0xa0, 0x0a, 0x2c, 0xe1, 0xa0, 0x25, 0x81, 
+	0xe1, 0x88, 0x1a, 0xa1, 0x12, 0x80, 0x0b, 0x1e, 
+	0xe1, 0xa0, 0x00, 0x60, 0x13, 0x81, 0x11, 0x02, 
+	0xe1, 0xb0, 0xca, 0xcc, 0x02, 0x8f, 0xe0, 0x08, 
+	0x0a, 0x00, 0x04, 0xa1, 0xe3, 0x7c, 0x00, 0x01, 
+	0x03, 0x80, 0x01, 0x01, 0xe2, 0x4f, 0xe0, 0x60, 
+	0xe3, 0xa0, 0xb0, 0x02, 0xea, 0x00, 0x06, 0x2b, 
+	0xe1, 0x95, 0xc0, 0x84, 0x0a, 0x00, 0x00, 0x13, 
+	0xe1, 0xb0, 0x40, 0x84, 0x5a, 0x00, 0x00, 0x0d, 
+	0xe3, 0xe0, 0x00, 0x00, 0xe8, 0xbd, 0x4b, 0xf0, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0xb0, 0xc0, 0x80, 
+	0x03, 0x31, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x07, 
+	0xe1, 0xf0, 0xca, 0x4c, 0x08, 0xbd, 0x4b, 0xf0, 
+	0x01, 0x2f, 0xff, 0x1e, 0xe3, 0x3c, 0x00, 0x01, 
+	0x1a, 0x00, 0x00, 0x04, 0xe1, 0x91, 0xc6, 0x00, 
+	0x08, 0xbd, 0x4b, 0xf0, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xa0, 0x35, 0x06, 0xea, 0x00, 0x03, 0xe8, 
+	0xe3, 0xa0, 0x35, 0x0a, 0xea, 0x00, 0x03, 0xe6, 
+	0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
+	0xe8, 0xbd, 0x4b, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x4b, 0xf0, 
+	0xe1, 0xb0, 0xc0, 0x82, 0x03, 0x33, 0x00, 0x00, 
+	0xe1, 0xa0, 0x85, 0x0c, 0xe1, 0xa0, 0x2a, 0x2c, 
+	0xe1, 0xa0, 0x55, 0x83, 0xe1, 0x88, 0x4a, 0xa3, 
+	0x12, 0x82, 0x2b, 0x1e, 0xe1, 0xa0, 0x30, 0x62, 
+	0x13, 0x84, 0x41, 0x02, 0xe1, 0xb0, 0xca, 0xcc, 
+	0x02, 0x8f, 0xe0, 0x08, 0x0a, 0x00, 0x04, 0xa4, 
+	0xe3, 0x7c, 0x00, 0x01, 0x0a, 0x00, 0x00, 0x14, 
+	0xe1, 0xb0, 0xc0, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0xe1, 0xa0, 0x85, 0x0c, 0xe1, 0xa0, 0x0a, 0x2c, 
+	0xe1, 0xa0, 0x25, 0x81, 0xe1, 0x88, 0x1a, 0xa1, 
+	0x12, 0x80, 0x0b, 0x1e, 0xe1, 0xa0, 0x00, 0x60, 
+	0x13, 0x81, 0x11, 0x02, 0xe1, 0xb0, 0xca, 0xcc, 
+	0x02, 0x8f, 0xe0, 0x08, 0x0a, 0x00, 0x04, 0x66, 
+	0xe3, 0x7c, 0x00, 0x01, 0x0a, 0x00, 0x00, 0x14, 
+	0xeb, 0x00, 0x02, 0xdc, 0xeb, 0xff, 0xff, 0x0d, 
+	0xe3, 0x13, 0x02, 0x02, 0x08, 0xbd, 0x4b, 0xf0, 
+	0x01, 0x2f, 0xff, 0x1e, 0xe3, 0x83, 0x35, 0x02, 
+	0xea, 0x00, 0x03, 0xbd, 0xe3, 0x83, 0x31, 0x01, 
+	0xe1, 0xb0, 0xc0, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0xe1, 0xa0, 0x85, 0x0c, 0xe1, 0xa0, 0x0a, 0x2c, 
+	0xe1, 0xa0, 0x25, 0x81, 0xe1, 0x88, 0x1a, 0xa1, 
+	0x12, 0x80, 0x0b, 0x1e, 0xe1, 0xa0, 0x00, 0x60, 
+	0x13, 0x81, 0x11, 0x02, 0xe1, 0xb0, 0xca, 0xcc, 
+	0x02, 0x8f, 0xe0, 0x08, 0x0a, 0x00, 0x04, 0x50, 
+	0xe3, 0x7c, 0x00, 0x01, 0x03, 0x80, 0x01, 0x01, 
+	0xe2, 0x4f, 0xe0, 0x5c, 0xe3, 0xa0, 0xb0, 0x02, 
+	0xea, 0x00, 0x03, 0x64, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0xc4, 0xff, 0xe3, 0x8c, 0xc6, 0x0e, 
+	0xe1, 0x5c, 0x00, 0x82, 0x9a, 0x00, 0x00, 0x0a, 
+	0xe1, 0xb0, 0x00, 0x80, 0x03, 0x31, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x0a, 0x3a, 0x00, 0x00, 0x12, 
+	0xe1, 0x50, 0x00, 0x0c, 0x03, 0x51, 0x00, 0x00, 
+	0x8a, 0xff, 0xfc, 0x60, 0xe1, 0xb0, 0x20, 0x82, 
+	0x8a, 0x00, 0x00, 0x18, 0xe3, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x03, 0x53, 0x00, 0x00, 
+	0x0a, 0xff, 0xff, 0xf2, 0xea, 0xff, 0xfc, 0x5d, 
+	0xe1, 0x50, 0x00, 0x0c, 0x03, 0x51, 0x00, 0x00, 
+	0x8a, 0xff, 0xfc, 0x56, 0xe1, 0xb0, 0x20, 0x82, 
+	0x33, 0xa0, 0x00, 0x00, 0x23, 0xa0, 0x00, 0x01, 
+	0x03, 0x33, 0x00, 0x00, 0x03, 0xa0, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x0c, 
+	0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfc, 0x4d, 
+	0xe1, 0xb0, 0x20, 0x82, 0x23, 0xa0, 0x00, 0x01, 
+	0x21, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x02, 
+	0x01, 0x51, 0x00, 0x03, 0x33, 0xa0, 0x00, 0x00, 
+	0x23, 0xa0, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0x50, 0x00, 0x02, 0x01, 0x51, 0x00, 0x03, 
+	0x83, 0xa0, 0x00, 0x00, 0x93, 0xa0, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0xb0, 0x20, 0x80, 0xe1, 0xa0, 0x2a, 0xa2, 
+	0xe1, 0xa0, 0x05, 0x80, 0xe1, 0x80, 0x0a, 0xa1, 
+	0xe3, 0x80, 0x01, 0x02, 0xe2, 0x42, 0x2c, 0x03, 
+	0x2a, 0x00, 0x00, 0x08, 0xe2, 0x52, 0x20, 0xff, 
+	0x4a, 0x00, 0x00, 0x04, 0xe2, 0x72, 0x20, 0x1f, 
+	0xc1, 0xa0, 0x02, 0x30, 0xc1, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xc0, 0x01, 0x02, 0xea, 0x00, 0x00, 0x09, 
+	0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe2, 0x52, 0x20, 0xff, 0x4a, 0xff, 0xff, 0xfb, 
+	0xe2, 0x72, 0x20, 0x1f, 0xc1, 0xa0, 0x02, 0x30, 
+	0xc2, 0x60, 0x00, 0x00, 0xc1, 0x2f, 0xff, 0x1e, 
+	0x01, 0x91, 0xc0, 0x80, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe3, 0xa0, 0x36, 0x12, 0xe2, 0x82, 0x2e, 0x3e, 
+	0xe3, 0x72, 0x00, 0x01, 0x1a, 0x00, 0x03, 0x63, 
+	0xe1, 0x91, 0xc0, 0x80, 0x13, 0xa0, 0x37, 0x42, 
+	0xea, 0x00, 0x03, 0x60, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x4b, 0xf0, 0xe2, 0x22, 0x21, 0x02, 
+	0xea, 0x00, 0x00, 0x01, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x4b, 0xf0, 0xe1, 0xb0, 0xc0, 0x82, 
+	0x03, 0x33, 0x00, 0x00, 0xe1, 0xa0, 0x85, 0x0c, 
+	0xe1, 0xa0, 0x2a, 0x2c, 0xe1, 0xa0, 0x55, 0x83, 
+	0xe1, 0x88, 0x4a, 0xa3, 0x12, 0x82, 0x2b, 0x1e, 
+	0xe1, 0xa0, 0x30, 0x62, 0x13, 0x84, 0x41, 0x02, 
+	0xe1, 0xb0, 0xca, 0xcc, 0x02, 0x8f, 0xe0, 0x08, 
+	0x0a, 0x00, 0x04, 0x1d, 0xe3, 0x7c, 0x00, 0x01, 
+	0x0a, 0x00, 0x00, 0x14, 0xe1, 0xb0, 0xc0, 0x80, 
+	0x03, 0x31, 0x00, 0x00, 0xe1, 0xa0, 0x85, 0x0c, 
+	0xe1, 0xa0, 0x0a, 0x2c, 0xe1, 0xa0, 0x25, 0x81, 
+	0xe1, 0x88, 0x1a, 0xa1, 0x12, 0x80, 0x0b, 0x1e, 
+	0xe1, 0xa0, 0x00, 0x60, 0x13, 0x81, 0x11, 0x02, 
+	0xe1, 0xb0, 0xca, 0xcc, 0x02, 0x8f, 0xe0, 0x08, 
+	0x0a, 0x00, 0x03, 0xdf, 0xe3, 0x7c, 0x00, 0x01, 
+	0x0a, 0x00, 0x00, 0x14, 0xeb, 0x00, 0x05, 0xbb, 
+	0xeb, 0xff, 0xfe, 0x86, 0xe3, 0x13, 0x02, 0x02, 
+	0x08, 0xbd, 0x4b, 0xf0, 0x01, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x83, 0x35, 0x02, 0xea, 0x00, 0x03, 0x36, 
+	0xe3, 0x83, 0x31, 0x01, 0xe1, 0xb0, 0xc0, 0x80, 
+	0x03, 0x31, 0x00, 0x00, 0xe1, 0xa0, 0x85, 0x0c, 
+	0xe1, 0xa0, 0x0a, 0x2c, 0xe1, 0xa0, 0x25, 0x81, 
+	0xe1, 0x88, 0x1a, 0xa1, 0x12, 0x80, 0x0b, 0x1e, 
+	0xe1, 0xa0, 0x00, 0x60, 0x13, 0x81, 0x11, 0x02, 
+	0xe1, 0xb0, 0xca, 0xcc, 0x02, 0x8f, 0xe0, 0x08, 
+	0x0a, 0x00, 0x03, 0xc9, 0xe3, 0x7c, 0x00, 0x01, 
+	0x03, 0x80, 0x01, 0x01, 0xe2, 0x4f, 0xe0, 0x5c, 
+	0xe3, 0xa0, 0xb0, 0x02, 0xea, 0x00, 0x05, 0xff, 
+	0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x4b, 0xf0, 
+	0xe2, 0x20, 0x01, 0x02, 0xea, 0xff, 0xff, 0xc6, 
+	0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0xc4, 0xff, 
+	0xe3, 0x8c, 0xc6, 0x0e, 0xe1, 0x5c, 0x00, 0x82, 
+	0x9a, 0x00, 0x00, 0x0a, 0xe1, 0xb0, 0x00, 0x80, 
+	0x03, 0x31, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0a, 
+	0x3a, 0x00, 0x00, 0x11, 0xe1, 0x50, 0x00, 0x0c, 
+	0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfb, 0xd5, 
+	0xe1, 0xb0, 0x20, 0x82, 0x8a, 0x00, 0x00, 0x17, 
+	0xe3, 0xa0, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x03, 0x53, 0x00, 0x00, 0x0a, 0xff, 0xff, 0xf2, 
+	0xea, 0xff, 0xfb, 0xd2, 0xe1, 0x50, 0x00, 0x0c, 
+	0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfb, 0xcb, 
+	0xe1, 0xb0, 0x20, 0x82, 0x03, 0x33, 0x00, 0x00, 
+	0x83, 0xa0, 0x00, 0x00, 0x93, 0xa0, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x0c, 
+	0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfb, 0xc3, 
+	0xe1, 0xb0, 0x20, 0x82, 0x23, 0xa0, 0x00, 0x00, 
+	0x21, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x02, 
+	0x01, 0x51, 0x00, 0x03, 0x93, 0xa0, 0x00, 0x01, 
+	0x83, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0x50, 0x00, 0x02, 0x01, 0x51, 0x00, 0x03, 
+	0x33, 0xa0, 0x00, 0x00, 0x23, 0xa0, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x42, 0x99, 0xd1, 0x03, 
+	0x42, 0x90, 0xd1, 0x01, 0x20, 0x00, 0x47, 0x70, 
+	0x20, 0x01, 0x47, 0x70, 0xb5, 0x70, 0x1c, 0x04, 
+	0x1c, 0x0d, 0x1c, 0x16, 0x46, 0x9e, 0x47, 0x78, 
+	0xe3, 0xa0, 0x00, 0x00, 0xe3, 0xa0, 0x10, 0x00, 
+	0xe1, 0xa0, 0x30, 0x05, 0xe1, 0xa0, 0x20, 0x04, 
+	0xe3, 0x3e, 0x00, 0x00, 0x03, 0x36, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x14, 0xe3, 0xb0, 0xc0, 0x00, 
+	0xe0, 0x96, 0x60, 0x06, 0xe0, 0xbe, 0xe0, 0x0e, 
+	0x2a, 0x00, 0x00, 0x04, 0xe1, 0x5e, 0x00, 0x03, 
+	0x01, 0x56, 0x00, 0x02, 0x92, 0x8c, 0xc0, 0x01, 
+	0x9a, 0xff, 0xff, 0xf8, 0xe2, 0x9c, 0xc0, 0x00, 
+	0xe1, 0xb0, 0xe0, 0x6e, 0xe1, 0xa0, 0x60, 0x66, 
+	0xe0, 0x52, 0x40, 0x06, 0xe0, 0xd3, 0x50, 0x0e, 
+	0x21, 0xa0, 0x30, 0x05, 0x21, 0xa0, 0x20, 0x04, 
+	0xe0, 0xb0, 0x00, 0x00, 0xe0, 0xa1, 0x10, 0x01, 
+	0xe1, 0xb0, 0xe0, 0xae, 0xe1, 0xa0, 0x60, 0x66, 
+	0xe2, 0x5c, 0xc0, 0x01, 0xaa, 0xff, 0xff, 0xf5, 
+	0xe8, 0xbd, 0x40, 0x70, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x18, 0x80, 0x41, 0x59, 0x47, 0x70, 0x00, 0x00, 
+	0x1c, 0x01, 0x08, 0x40, 0x08, 0x42, 0x18, 0x80, 
+	0x09, 0x02, 0x18, 0x80, 0x0a, 0x02, 0x18, 0x80, 
+	0x0c, 0x02, 0x18, 0x80, 0x08, 0xc0, 0x00, 0x82, 
+	0x18, 0x12, 0x00, 0x52, 0x1a, 0x89, 0x29, 0x0a, 
+	0xdb, 0x01, 0x1c, 0x40, 0x39, 0x0a, 0x47, 0x70, 
+	0xb4, 0x80, 0x20, 0x03, 0x43, 0xc0, 0x23, 0x00, 
+	0x49, 0x07, 0x54, 0x0b, 0x30, 0x01, 0xd4, 0xfc, 
+	0x20, 0x00, 0x4a, 0x06, 0x5c, 0x17, 0x54, 0x0f, 
+	0x18, 0x0f, 0x37, 0x80, 0x70, 0x3b, 0x30, 0x01, 
+	0x28, 0x80, 0xd3, 0xf7, 0xbc, 0x80, 0x47, 0x70, 
+	0x2e, 0x08, 0x22, 0x44, 0x2e, 0x03, 0xa9, 0x2c, 
+	0x17, 0xc1, 0x47, 0x70, 0x42, 0x99, 0xdb, 0x04, 
+	0xdc, 0x01, 0x42, 0x90, 0xd3, 0x01, 0x20, 0x00, 
+	0x47, 0x70, 0x20, 0x01, 0x47, 0x70, 0x00, 0x00, 
+	0x1c, 0x0b, 0x21, 0x00, 0x42, 0x40, 0x41, 0x99, 
+	0x47, 0x70, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0xb0, 0x00, 0xe1, 0xa0, 0x20, 0x01, 
+	0xe8, 0x80, 0x00, 0x0e, 0xe5, 0x9f, 0xc0, 0x38, 
+	0xe5, 0x8c, 0xd0, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0x20, 0x28, 
+	0xe5, 0x92, 0x20, 0x00, 0xe5, 0x91, 0x40, 0x2c, 
+	0xe5, 0x91, 0xc0, 0x34, 0xe1, 0x5c, 0x00, 0x02, 
+	0x23, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0xc0, 0x08, 
+	0xe5, 0x9c, 0xd0, 0x00, 0xe3, 0xa0, 0xb0, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x08, 0x23, 0x44, 
+	0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe5, 0x9f, 0xc0, 0xe4, 0xe5, 0x9c, 0x00, 0x00, 
+	0xe3, 0x50, 0x00, 0x00, 0xe3, 0xa0, 0x00, 0x04, 
+	0x15, 0x8c, 0x00, 0x04, 0x0b, 0x00, 0x00, 0x01, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe5, 0x9f, 0xc0, 0xcc, 0xea, 0xff, 0xfb, 0x87, 
+	0xe3, 0xa0, 0x10, 0x0a, 0xe3, 0x50, 0x01, 0x02, 
+	0x13, 0x50, 0x01, 0x06, 0x13, 0x50, 0x01, 0x16, 
+	0x03, 0xa0, 0x10, 0x03, 0xe3, 0x50, 0x01, 0x0a, 
+	0x13, 0x50, 0x01, 0x0e, 0x03, 0xa0, 0x10, 0x05, 
+	0xe5, 0x9f, 0x20, 0xa8, 0xe1, 0x50, 0x00, 0x02, 
+	0xe2, 0x82, 0x20, 0xff, 0x21, 0x52, 0x00, 0x00, 
+	0x23, 0xa0, 0x10, 0x02, 0xe3, 0x50, 0x01, 0x82, 
+	0x03, 0xa0, 0x10, 0x02, 0xe3, 0x50, 0x01, 0x86, 
+	0x03, 0xa0, 0x10, 0x07, 0xe5, 0x9f, 0x20, 0x88, 
+	0xe0, 0x50, 0x20, 0x02, 0x13, 0x52, 0x00, 0x01, 
+	0x03, 0xa0, 0x10, 0x05, 0xe1, 0xa0, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x40, 0x02, 0xe1, 0xa0, 0x30, 0x00, 
+	0xeb, 0xff, 0xff, 0xe4, 0xe8, 0xbd, 0x40, 0x02, 
+	0xe5, 0x9f, 0xc0, 0x50, 0xe3, 0xa0, 0x20, 0x01, 
+	0xe5, 0xcc, 0x20, 0x00, 0xe9, 0x2d, 0x00, 0x0a, 
+	0xeb, 0xff, 0xff, 0xdc, 0xea, 0x00, 0x00, 0x09, 
+	0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0xc0, 0x30, 
+	0xe3, 0xa0, 0x10, 0x00, 0xe5, 0x8c, 0x10, 0x00, 
+	0xe5, 0x9c, 0x00, 0x04, 0xe3, 0x50, 0x00, 0x00, 
+	0x01, 0x2f, 0xff, 0x1e, 0xe5, 0x8c, 0x10, 0x04, 
+	0xea, 0xff, 0xff, 0xd2, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0xa0, 0xc0, 0x0d, 0xe9, 0x2d, 0xd9, 0xf0, 
+	0xe2, 0x4c, 0xb0, 0x04, 0xe3, 0xa0, 0x10, 0x01, 
+	0xea, 0xff, 0xfb, 0xa4, 0x2e, 0x08, 0x21, 0x34, 
+	0x2e, 0x08, 0x21, 0x46, 0x2e, 0x02, 0x24, 0x85, 
+	0x80, 0x00, 0x02, 0x00, 0x80, 0x80, 0x0e, 0xa0, 
+	0xb5, 0xff, 0xa6, 0x23, 0xa5, 0x22, 0xa4, 0x22, 
+	0x68, 0x5a, 0x68, 0x1f, 0x4b, 0x21, 0x60, 0x5a, 
+	0x23, 0x00, 0x4a, 0x21, 0x70, 0x13, 0x70, 0x53, 
+	0x70, 0x93, 0x4a, 0x20, 0x2a, 0x00, 0xd0, 0x02, 
+	0x9a, 0x02, 0xf7, 0xff, 0xff, 0xfe, 0x48, 0x1e, 
+	0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 
+	0x48, 0x1c, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 
+	0xff, 0xfe, 0x48, 0x1b, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xff, 0xff, 0x06, 0x48, 0x19, 0x28, 0x00, 
+	0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 0x48, 0x18, 
+	0x28, 0x00, 0xd0, 0x01, 0xf0, 0x01, 0xfb, 0xf8, 
+	0x48, 0x16, 0x28, 0x00, 0xd0, 0x01, 0xf0, 0x01, 
+	0xfd, 0x69, 0x48, 0x15, 0x28, 0x00, 0xd0, 0x01, 
+	0xf7, 0xff, 0xff, 0xfe, 0xf7, 0xff, 0xff, 0xa0, 
+	0x48, 0x12, 0x28, 0x00, 0xd0, 0x04, 0x1c, 0x30, 
+	0x1c, 0x29, 0x1c, 0x22, 0xf0, 0x01, 0xff, 0x6e, 
+	0x2f, 0x00, 0xd0, 0x01, 0xf7, 0xfd, 0xfa, 0x5a, 
+	0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x3a, 0x74, 0x74, 0x00, 0x2e, 0x08, 0x23, 0x48, 
+	0x2e, 0x08, 0x23, 0x48, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x02, 0x0b, 0x1d, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x02, 0x25, 0x15, 0x2e, 0x02, 0x28, 0x01, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x02, 0x2c, 0x29, 
+	0xb5, 0x90, 0x28, 0x00, 0xd0, 0x04, 0x48, 0x12, 
+	0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 
+	0x4f, 0x10, 0x68, 0x78, 0x28, 0x00, 0xd0, 0x03, 
+	0xf7, 0xfd, 0xfa, 0x22, 0x20, 0x00, 0x60, 0x78, 
+	0x4f, 0x0d, 0x78, 0x78, 0x24, 0x01, 0x28, 0x00, 
+	0xd1, 0x05, 0x70, 0x7c, 0x48, 0x0b, 0x28, 0x00, 
+	0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 0x78, 0xb8, 
+	0x28, 0x00, 0xd1, 0x05, 0x70, 0xbc, 0x48, 0x08, 
+	0x28, 0x00, 0xd0, 0x01, 0xf0, 0x01, 0xff, 0x7a, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x23, 0x48, 
+	0x2e, 0x08, 0x23, 0x48, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x02, 0x2c, 0xc9, 0xb5, 0x90, 0x1c, 0x0c, 
+	0x21, 0x01, 0x1c, 0x17, 0xf0, 0x01, 0xfb, 0x9c, 
+	0x21, 0x00, 0x1c, 0x20, 0xf0, 0x01, 0xfb, 0x98, 
+	0x21, 0x02, 0x1c, 0x38, 0xf0, 0x01, 0xfb, 0x94, 
+	0x20, 0x01, 0xf7, 0xfe, 0xfe, 0x95, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf1, 0x20, 0x00, 
+	0xb0, 0x89, 0x90, 0x06, 0x26, 0x00, 0x90, 0x05, 
+	0x20, 0x01, 0x90, 0x04, 0x27, 0x00, 0x20, 0x00, 
+	0x90, 0x03, 0x90, 0x02, 0x25, 0x00, 0x90, 0x01, 
+	0xf0, 0x01, 0xfc, 0xc2, 0x1c, 0x04, 0x78, 0x00, 
+	0x28, 0x00, 0xd0, 0x17, 0x49, 0xe3, 0x5d, 0xe0, 
+	0x5c, 0x08, 0x08, 0x40, 0xd3, 0x06, 0x37, 0x01, 
+	0x5d, 0xe0, 0x5c, 0x08, 0x08, 0x40, 0xd2, 0xfa, 
+	0xe0, 0x00, 0x37, 0x01, 0x5d, 0xe0, 0x5c, 0x0a, 
+	0x08, 0x52, 0xd2, 0x01, 0x28, 0x00, 0xd1, 0xf8, 
+	0x98, 0x04, 0x30, 0x01, 0x90, 0x04, 0x5d, 0xe0, 
+	0x28, 0x00, 0xd1, 0xe8, 0x98, 0x04, 0x00, 0x80, 
+	0xf0, 0x01, 0xfc, 0xde, 0x4b, 0xd6, 0x93, 0x08, 
+	0x60, 0x18, 0x1c, 0x78, 0xf0, 0x01, 0xfc, 0xd8, 
+	0x9b, 0x08, 0x60, 0x58, 0x48, 0xd3, 0x28, 0x00, 
+	0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 0x21, 0x00, 
+	0x20, 0x00, 0x90, 0x04, 0x48, 0xd0, 0x90, 0x07, 
+	0x78, 0x27, 0x34, 0x01, 0x2e, 0x00, 0xd1, 0x58, 
+	0x2f, 0x22, 0xd0, 0x01, 0x2f, 0x27, 0xd1, 0x02, 
+	0x97, 0x05, 0x1c, 0x3e, 0xe0, 0x93, 0x98, 0x06, 
+	0x42, 0x81, 0xd1, 0x4e, 0x98, 0x03, 0x28, 0x00, 
+	0xd1, 0x4b, 0x25, 0x00, 0x43, 0xed, 0x1c, 0x2a, 
+	0x95, 0x01, 0x22, 0x00, 0xab, 0x00, 0x70, 0x1a, 
+	0x70, 0x5a, 0x1e, 0x60, 0x78, 0x02, 0x2a, 0x30, 
+	0xdb, 0x04, 0x2a, 0x39, 0xdc, 0x02, 0x30, 0x01, 
+	0x1f, 0xd5, 0x3d, 0x29, 0x78, 0x02, 0x2a, 0x3e, 
+	0xd0, 0x01, 0x2a, 0x3c, 0xd1, 0x35, 0x2a, 0x3e, 
+	0xd1, 0x0e, 0x22, 0x77, 0xab, 0x00, 0x70, 0x1a, 
+	0x2d, 0x00, 0xd0, 0x63, 0x2d, 0x02, 0xdc, 0x62, 
+	0x78, 0x42, 0x30, 0x01, 0x2a, 0x3e, 0xd1, 0x13, 
+	0x22, 0x61, 0x70, 0x1a, 0x30, 0x01, 0xe0, 0x0f, 
+	0x30, 0x01, 0x1c, 0x02, 0xe0, 0x02, 0x2b, 0x3e, 
+	0xd0, 0x56, 0x32, 0x01, 0x78, 0x13, 0x2b, 0x00, 
+	0xd0, 0x01, 0x2b, 0x20, 0xd1, 0xf7, 0x2d, 0x00, 
+	0xdc, 0x4d, 0x22, 0x72, 0xab, 0x00, 0x70, 0x1a, 
+	0x78, 0x02, 0x2a, 0x26, 0xd1, 0x24, 0x23, 0x01, 
+	0x42, 0xdd, 0xd0, 0x19, 0x2d, 0x00, 0xdd, 0x5e, 
+	0x78, 0x42, 0x30, 0x01, 0x2a, 0x30, 0xdb, 0x5b, 
+	0x2a, 0x32, 0xdc, 0x3c, 0x30, 0x01, 0x1c, 0x2b, 
+	0xd5, 0x04, 0x07, 0xdb, 0x0f, 0xdb, 0x42, 0x5b, 
+	0xe0, 0x02, 0xe0, 0x42, 0x07, 0xdb, 0x0f, 0xdb, 
+	0x33, 0x31, 0x42, 0x9a, 0xd1, 0x63, 0x22, 0x00, 
+	0xab, 0x00, 0x70, 0x1a, 0x95, 0x01, 0xe0, 0x11, 
+	0x22, 0x02, 0x92, 0x01, 0xaa, 0x00, 0x78, 0x12, 
+	0x30, 0x01, 0x2a, 0x72, 0xd0, 0x09, 0xe0, 0x06, 
+	0x23, 0x01, 0x42, 0xdd, 0xd1, 0x06, 0xaa, 0x00, 
+	0x78, 0x12, 0x2a, 0x72, 0xd0, 0x01, 0x25, 0x01, 
+	0xe0, 0x00, 0x25, 0x00, 0xaa, 0x00, 0x78, 0x12, 
+	0x2a, 0x00, 0xd0, 0x16, 0x22, 0x01, 0x92, 0x03, 
+	0x4a, 0x8c, 0x78, 0x03, 0x5c, 0xd3, 0x08, 0x5b, 
+	0xd3, 0x04, 0x78, 0x43, 0x5c, 0xd3, 0x30, 0x01, 
+	0x08, 0x5b, 0xd2, 0xfa, 0x78, 0x02, 0x2a, 0x22, 
+	0xd0, 0x01, 0x2a, 0x27, 0xd1, 0x0c, 0x30, 0x01, 
+	0x1c, 0x16, 0xe0, 0x09, 0xe0, 0x6a, 0xe0, 0xfb, 
+	0xe0, 0x23, 0x78, 0x02, 0x2a, 0x00, 0xd0, 0x03, 
+	0x4b, 0x80, 0x5c, 0x9a, 0x08, 0x52, 0xd3, 0x61, 
+	0x22, 0x01, 0x92, 0x02, 0x1c, 0x04, 0x78, 0x27, 
+	0x34, 0x01, 0x2e, 0x00, 0xd0, 0x15, 0x2f, 0x5c, 
+	0xd1, 0x0b, 0x78, 0x20, 0x28, 0x22, 0xd0, 0x03, 
+	0x28, 0x5c, 0xd0, 0x01, 0x28, 0x27, 0xd1, 0x04, 
+	0x34, 0x01, 0x1c, 0x07, 0xe0, 0x09, 0xe0, 0xdf, 
+	0xe0, 0xde, 0x1c, 0x30, 0x42, 0xb7, 0xd1, 0x04, 
+	0x40, 0x7e, 0x78, 0x27, 0x34, 0x01, 0x42, 0x87, 
+	0xd0, 0xfa, 0x2f, 0x00, 0xd0, 0x0c, 0x2e, 0x00, 
+	0xd1, 0x03, 0x48, 0x6e, 0x5d, 0xc0, 0x08, 0x40, 
+	0xd2, 0x06, 0x1c, 0x08, 0x9b, 0x08, 0x68, 0x5a, 
+	0x54, 0x17, 0x31, 0x01, 0xe0, 0x97, 0xe0, 0xc7, 
+	0x98, 0x06, 0x42, 0x81, 0xd1, 0x08, 0x98, 0x05, 
+	0x28, 0x00, 0xd1, 0x05, 0x98, 0x02, 0x28, 0x00, 
+	0xd0, 0x74, 0x98, 0x03, 0x28, 0x00, 0xd1, 0x72, 
+	0x22, 0x00, 0x1c, 0x08, 0x9b, 0x08, 0x68, 0x5b, 
+	0x54, 0x1a, 0x98, 0x02, 0x31, 0x01, 0x28, 0x00, 
+	0xd0, 0x6a, 0x98, 0x03, 0x28, 0x00, 0xd0, 0x13, 
+	0x01, 0xa8, 0x99, 0x07, 0x18, 0x42, 0x9b, 0x08, 
+	0x68, 0x58, 0x99, 0x06, 0x18, 0x40, 0x46, 0x69, 
+	0xf0, 0x01, 0xfd, 0x3a, 0x28, 0x00, 0xd1, 0x07, 
+	0x9b, 0x08, 0x68, 0x58, 0x99, 0x06, 0x18, 0x41, 
+	0xa2, 0x58, 0xa0, 0x5e, 0xf7, 0xff, 0xfe, 0xb6, 
+	0x23, 0x01, 0x98, 0x01, 0x42, 0xd8, 0xdd, 0x51, 
+	0x98, 0x01, 0x28, 0x00, 0xda, 0x03, 0x40, 0x18, 
+	0x42, 0x40, 0xe0, 0x02, 0xe0, 0x90, 0x07, 0xc0, 
+	0x0f, 0xc0, 0x1c, 0x41, 0x98, 0x01, 0xf0, 0x01, 
+	0xfe, 0x29, 0x01, 0x80, 0x99, 0x07, 0x18, 0x40, 
+	0xf0, 0x01, 0xfa, 0xdc, 0x28, 0x00, 0xd1, 0x3d, 
+	0xb0, 0x82, 0x98, 0x03, 0x01, 0x80, 0x99, 0x09, 
+	0x18, 0x40, 0x90, 0x01, 0x9a, 0x03, 0x2a, 0x00, 
+	0xda, 0x03, 0x07, 0xd2, 0x0f, 0xd2, 0x42, 0x52, 
+	0xe0, 0x01, 0x07, 0xd2, 0x0f, 0xd2, 0x01, 0x90, 
+	0x99, 0x09, 0x18, 0x40, 0x30, 0x40, 0x90, 0x00, 
+	0x20, 0xff, 0x30, 0x01, 0xf0, 0x01, 0xfb, 0xa8, 
+	0x1c, 0x01, 0x23, 0xff, 0x22, 0x01, 0x02, 0x52, 
+	0x98, 0x01, 0x33, 0x01, 0xf0, 0x01, 0xfe, 0x1e, 
+	0x98, 0x01, 0x68, 0xc0, 0x23, 0x01, 0x02, 0xdb, 
+	0x43, 0x18, 0x99, 0x01, 0x60, 0xc8, 0x08, 0xd8, 
+	0xf0, 0x01, 0xfb, 0x96, 0x1c, 0x01, 0x23, 0xff, 
+	0x22, 0x01, 0x02, 0x52, 0x98, 0x00, 0x33, 0x01, 
+	0xf0, 0x01, 0xfe, 0x0c, 0x98, 0x00, 0x68, 0xc0, 
+	0x23, 0x01, 0x02, 0xdb, 0x43, 0x18, 0x99, 0x00, 
+	0x60, 0xc8, 0xe0, 0x02, 0xe0, 0x13, 0xe0, 0x12, 
+	0xe0, 0x05, 0xb0, 0x02, 0x20, 0x00, 0x90, 0x02, 
+	0x90, 0x03, 0x99, 0x06, 0xe0, 0x0b, 0x9b, 0x08, 
+	0x68, 0x58, 0x9a, 0x06, 0x18, 0x82, 0x98, 0x04, 
+	0x1c, 0x43, 0x93, 0x04, 0x00, 0x80, 0x9b, 0x08, 
+	0x68, 0x1b, 0x50, 0x1a, 0x91, 0x06, 0x2f, 0x00, 
+	0xd0, 0x01, 0x26, 0x00, 0x96, 0x05, 0x2f, 0x00, 
+	0xd0, 0x00, 0xe6, 0x9d, 0x2e, 0x00, 0xd0, 0x0a, 
+	0xb0, 0x81, 0xab, 0x00, 0x70, 0x1e, 0x22, 0x00, 
+	0x70, 0x5a, 0x46, 0x69, 0xa2, 0x24, 0xa0, 0x25, 
+	0xf7, 0xff, 0xfe, 0x3c, 0xb0, 0x01, 0x22, 0x00, 
+	0x98, 0x04, 0x00, 0x80, 0x9b, 0x08, 0x68, 0x19, 
+	0x50, 0x0a, 0x98, 0x04, 0x28, 0x00, 0xdd, 0x0f, 
+	0x9b, 0x08, 0x68, 0x18, 0x68, 0x01, 0x68, 0x09, 
+	0x4b, 0x21, 0x40, 0x19, 0xa2, 0x21, 0x68, 0x12, 
+	0x42, 0x91, 0xd1, 0x05, 0x9b, 0x04, 0x3b, 0x01, 
+	0x93, 0x04, 0x30, 0x04, 0x9b, 0x08, 0x60, 0x18, 
+	0x9a, 0x09, 0x9b, 0x08, 0x68, 0x19, 0x98, 0x04, 
+	0xf7, 0xfe, 0xfc, 0x47, 0xf7, 0xfe, 0xfc, 0xc0, 
+	0x1e, 0x61, 0xa2, 0x19, 0xa0, 0x19, 0xf7, 0xff, 
+	0xfe, 0x15, 0xb0, 0x09, 0xb0, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x22, 0x44, 
+	0x2e, 0x08, 0x23, 0x50, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0xd3, 0x48, 0x27, 0x20, 0x66, 0x6f, 
+	0x72, 0x20, 0x49, 0x2f, 0x4f, 0x20, 0x72, 0x65, 
+	0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 
+	0x6e, 0x0a, 0x00, 0x00, 0x63, 0x61, 0x6e, 0x27, 
+	0x74, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x27, 
+	0x00, 0x00, 0x00, 0x00, 0x6d, 0x69, 0x73, 0x73, 
+	0x69, 0x6e, 0x67, 0x20, 0x63, 0x6c, 0x6f, 0x73, 
+	0x69, 0x6e, 0x67, 0x20, 0x00, 0x00, 0x00, 0x00, 
+	0xdf, 0xdf, 0xdf, 0xdf, 0x52, 0x55, 0x4e, 0x00, 
+	0x27, 0x0a, 0x00, 0x00, 0x75, 0x6e, 0x73, 0x75, 
+	0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 
+	0x6f, 0x72, 0x20, 0x69, 0x6c, 0x6c, 0x65, 0x67, 
+	0x61, 0x6c, 0x20, 0x49, 0x2f, 0x4f, 0x20, 0x72, 
+	0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 
+	0x6f, 0x6e, 0x20, 0x27, 0x00, 0x00, 0x00, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0x20, 0x01, 
+	0xea, 0x00, 0x00, 0x01, 0x47, 0x78, 0x00, 0x00, 
+	0xe3, 0xa0, 0x20, 0x02, 0xe2, 0x00, 0x31, 0x02, 
+	0xe5, 0x9f, 0x00, 0x18, 0xe5, 0x80, 0x20, 0x00, 
+	0xe3, 0x31, 0x00, 0x00, 0x03, 0xa0, 0x00, 0x00, 
+	0x15, 0x9f, 0x00, 0x0c, 0x18, 0x90, 0x00, 0x03, 
+	0xe1, 0x80, 0x00, 0x03, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x2e, 0x08, 0x21, 0x30, 0x2e, 0x08, 0x21, 0x3c, 
+	0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
+	0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
+	0xe0, 0x88, 0x30, 0x09, 0xe2, 0x43, 0x3c, 0x3f, 
+	0xe2, 0x43, 0x30, 0xfe, 0xe3, 0x32, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x5d, 0xe3, 0x35, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x3d, 0xe9, 0x2d, 0x48, 0x81, 
+	0xe1, 0xa0, 0x08, 0x21, 0xe1, 0xc1, 0x78, 0x00, 
+	0xe1, 0xa0, 0x68, 0x24, 0xe1, 0xc4, 0x88, 0x06, 
+	0xe0, 0x09, 0x06, 0x90, 0xe0, 0x06, 0x06, 0x97, 
+	0xe0, 0x07, 0x07, 0x98, 0xe0, 0x97, 0x78, 0x06, 
+	0xe0, 0xa9, 0x98, 0x26, 0xe0, 0x08, 0x08, 0x90, 
+	0xe0, 0x97, 0x78, 0x08, 0xe0, 0xa9, 0x08, 0x28, 
+	0xe1, 0xa0, 0xb8, 0x22, 0xe1, 0xc2, 0xe8, 0x0b, 
+	0xe1, 0xa0, 0x68, 0x25, 0xe1, 0xc5, 0x88, 0x06, 
+	0xe0, 0x09, 0x06, 0x9b, 0xe0, 0x06, 0x06, 0x9e, 
+	0xe0, 0x0e, 0x0e, 0x98, 0xe0, 0x9e, 0xe8, 0x06, 
+	0xe0, 0xa9, 0x98, 0x26, 0xe0, 0x08, 0x08, 0x9b, 
+	0xe0, 0x9e, 0xe8, 0x08, 0xe0, 0xa9, 0xb8, 0x28, 
+	0xe0, 0x97, 0x70, 0x0b, 0xe2, 0xa0, 0x00, 0x00, 
+	0xe0, 0x97, 0xb0, 0x0e, 0xe0, 0xb7, 0x70, 0x00, 
+	0xe2, 0xa0, 0x00, 0x00, 0xe0, 0x51, 0x80, 0x02, 
+	0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x60, 0x00, 
+	0x31, 0xe0, 0x10, 0x01, 0x30, 0x44, 0x60, 0x05, 
+	0x10, 0x55, 0x90, 0x04, 0x03, 0xa0, 0x10, 0x00, 
+	0x31, 0xe0, 0x10, 0x01, 0x30, 0x46, 0x60, 0x08, 
+	0xe1, 0xa0, 0x48, 0x28, 0xe1, 0xc8, 0x58, 0x04, 
+	0xe1, 0xa0, 0x88, 0x29, 0xe1, 0xc9, 0x98, 0x08, 
+	0xe0, 0x22, 0x68, 0x94, 0xe0, 0x08, 0x08, 0x95, 
+	0xe0, 0x06, 0x05, 0x99, 0xe0, 0x96, 0x68, 0x08, 
+	0xe0, 0xa2, 0x28, 0x28, 0xe0, 0x09, 0x09, 0x94, 
+	0xe0, 0x96, 0x68, 0x09, 0xe0, 0xa2, 0x28, 0x29, 
+	0xe0, 0x9b, 0x60, 0x06, 0xe0, 0xb7, 0x20, 0x02, 
+	0xe0, 0xb0, 0x10, 0x01, 0xe1, 0x8e, 0xe1, 0x0e, 
+	0xe1, 0x86, 0x61, 0x2e, 0x48, 0xbd, 0x88, 0x81, 
+	0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
+	0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
+	0xe8, 0xbd, 0x88, 0x81, 0xe1, 0xa0, 0x58, 0x24, 
+	0xe1, 0xc4, 0x68, 0x05, 0xe1, 0xa0, 0x88, 0x21, 
+	0xe1, 0xc1, 0x98, 0x08, 0xe0, 0x04, 0x08, 0x95, 
+	0xe0, 0x08, 0x08, 0x96, 0xe0, 0x01, 0x06, 0x99, 
+	0xe0, 0x91, 0x18, 0x08, 0xe0, 0xa4, 0x48, 0x28, 
+	0xe0, 0x09, 0x09, 0x95, 0xe0, 0x91, 0x18, 0x09, 
+	0xe0, 0xa4, 0x48, 0x29, 0xe1, 0xa0, 0x88, 0x22, 
+	0xe1, 0xc2, 0x98, 0x08, 0xe0, 0x02, 0x08, 0x95, 
+	0xe0, 0x08, 0x08, 0x96, 0xe0, 0x06, 0x06, 0x99, 
+	0xe0, 0x96, 0x68, 0x08, 0xe0, 0xa2, 0x28, 0x28, 
+	0xe0, 0x09, 0x09, 0x95, 0xe0, 0x96, 0x68, 0x09, 
+	0xe0, 0xa2, 0x58, 0x29, 0xe0, 0x95, 0x20, 0x01, 
+	0xe2, 0xb4, 0x10, 0x00, 0x41, 0xa0, 0xf0, 0x0e, 
+	0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
+	0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x35, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x24, 0xe1, 0xa0, 0x28, 0x21, 
+	0xe1, 0xc1, 0x68, 0x02, 0xe1, 0xa0, 0x88, 0x24, 
+	0xe1, 0xc4, 0x98, 0x08, 0xe0, 0x01, 0x08, 0x92, 
+	0xe0, 0x08, 0x08, 0x96, 0xe0, 0x04, 0x06, 0x99, 
+	0xe0, 0x94, 0x48, 0x08, 0xe0, 0xa1, 0x18, 0x28, 
+	0xe0, 0x09, 0x09, 0x92, 0xe0, 0x94, 0x48, 0x09, 
+	0xe0, 0xa1, 0x18, 0x29, 0xe1, 0xa0, 0x88, 0x25, 
+	0xe1, 0xc5, 0x98, 0x08, 0xe0, 0x05, 0x08, 0x92, 
+	0xe0, 0x08, 0x08, 0x96, 0xe0, 0x06, 0x06, 0x99, 
+	0xe0, 0x96, 0x68, 0x08, 0xe0, 0xa5, 0x58, 0x28, 
+	0xe0, 0x09, 0x09, 0x92, 0xe0, 0x96, 0x68, 0x09, 
+	0xe0, 0xa5, 0x28, 0x29, 0xe0, 0x92, 0x20, 0x04, 
+	0xe2, 0xb1, 0x10, 0x00, 0x41, 0xa0, 0xf0, 0x0e, 
+	0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
+	0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0xc0, 0x81, 0x03, 
+	0xe3, 0xc3, 0x91, 0x03, 0xe0, 0x20, 0x00, 0x03, 
+	0xe2, 0x00, 0x01, 0x02, 0xe0, 0x88, 0x30, 0x09, 
+	0xe2, 0x43, 0x3c, 0x3f, 0xe2, 0x43, 0x30, 0xfe, 
+	0xe1, 0xa0, 0x58, 0x24, 0xe1, 0xc4, 0x68, 0x05, 
+	0xe1, 0xa0, 0x88, 0x21, 0xe1, 0xc1, 0x98, 0x08, 
+	0xe0, 0x01, 0x08, 0x95, 0xe0, 0x08, 0x08, 0x96, 
+	0xe0, 0x02, 0x06, 0x99, 0xe0, 0x92, 0x28, 0x08, 
+	0xe0, 0xa1, 0x18, 0x28, 0xe0, 0x09, 0x09, 0x95, 
+	0xe0, 0x92, 0x28, 0x09, 0xe0, 0xb1, 0x18, 0x29, 
+	0xe3, 0xa0, 0x60, 0x00, 0x41, 0xa0, 0xf0, 0x0e, 
+	0xe0, 0x92, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
+	0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0xa0, 0x98, 0x83, 0xe3, 0x79, 0x08, 0x02, 
+	0x30, 0x09, 0x90, 0x04, 0xe0, 0x19, 0x90, 0x83, 
+	0xe1, 0xa0, 0x88, 0x80, 0xe3, 0x78, 0x08, 0x02, 
+	0x30, 0x08, 0x80, 0x01, 0xe0, 0x18, 0x80, 0x80, 
+	0x4a, 0x00, 0x00, 0x1f, 0xe3, 0x19, 0x01, 0x02, 
+	0x1a, 0x00, 0x00, 0x2f, 0xe1, 0x91, 0x80, 0x02, 
+	0x11, 0x94, 0x80, 0x05, 0x0a, 0x00, 0x00, 0x13, 
+	0xe0, 0x11, 0x60, 0x80, 0x43, 0xc1, 0x11, 0x02, 
+	0x42, 0x80, 0x00, 0x01, 0xe0, 0x14, 0x60, 0x83, 
+	0x43, 0xc4, 0x41, 0x02, 0x42, 0x83, 0x30, 0x01, 
+	0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
+	0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
+	0xe0, 0x88, 0x30, 0x09, 0xe2, 0x43, 0x3c, 0x3f, 
+	0xe2, 0x43, 0x30, 0xfe, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe3, 0x11, 0x01, 0x02, 0x0b, 0x00, 0x06, 0x7c, 
+	0xe3, 0x14, 0x01, 0x02, 0x0b, 0x00, 0x06, 0x93, 
+	0xe8, 0xbd, 0x40, 0x00, 0xea, 0xff, 0xff, 0x44, 
+	0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
+	0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe3, 0xa0, 0x60, 0x00, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x19, 0x01, 0x02, 
+	0x0a, 0x00, 0x00, 0x09, 0xe1, 0x82, 0x80, 0x81, 
+	0xe1, 0x88, 0x80, 0x05, 0xe1, 0x98, 0x80, 0x84, 
+	0x1a, 0x00, 0x06, 0xbc, 0xe0, 0x20, 0x80, 0x03, 
+	0xe2, 0x08, 0x81, 0x02, 0xe2, 0x8f, 0x00, 0x44, 
+	0xe8, 0x90, 0x00, 0x07, 0xe1, 0x80, 0x00, 0x08, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0x92, 0x80, 0x81, 
+	0x1a, 0x00, 0x06, 0xc5, 0xe1, 0x94, 0x80, 0x05, 
+	0x1a, 0xff, 0xff, 0xf5, 0xe3, 0x80, 0x04, 0x61, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0x95, 0x80, 0x84, 
+	0x1a, 0x00, 0x06, 0xb6, 0xe1, 0x91, 0x80, 0x02, 
+	0x1a, 0xff, 0xff, 0xef, 0xe3, 0x80, 0x04, 0x61, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x40, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xe8, 0xbd, 0x4b, 0xf0, 
+	0xe5, 0x9f, 0x20, 0x6c, 0xe5, 0x92, 0x10, 0x00, 
+	0xe1, 0xa0, 0xc1, 0x83, 0xe1, 0xa0, 0xcd, 0xac, 
+	0xe1, 0x81, 0x10, 0x0c, 0xe5, 0x82, 0x10, 0x00, 
+	0xe3, 0x13, 0x03, 0x01, 0x1a, 0x00, 0x00, 0x05, 
+	0xe3, 0x13, 0x04, 0x02, 0x1a, 0x00, 0x00, 0x07, 
+	0xe3, 0x11, 0x08, 0x01, 0x0a, 0x00, 0x00, 0x44, 
+	0xe2, 0x8f, 0x00, 0x54, 0xea, 0x00, 0x00, 0x06, 
+	0xe3, 0x11, 0x07, 0x01, 0x0a, 0x00, 0x00, 0x34, 
+	0xe2, 0x8f, 0x00, 0x74, 0xea, 0x00, 0x00, 0x02, 
+	0xe3, 0x11, 0x08, 0x02, 0x0a, 0x00, 0x00, 0x30, 
+	0xe2, 0x8f, 0x00, 0x8c, 0xe5, 0x9f, 0x10, 0x1c, 
+	0xe2, 0x4e, 0xe0, 0x04, 0xe5, 0x81, 0xe0, 0x3c, 
+	0xe3, 0xa0, 0xec, 0xde, 0xe3, 0x8e, 0xe0, 0xad, 
+	0xe1, 0x8e, 0xe8, 0x0e, 0xe8, 0x81, 0x7f, 0xff, 
+	0xea, 0x00, 0x00, 0x01, 0x2e, 0x08, 0x23, 0x5c, 
+	0x2e, 0x08, 0x23, 0x60, 0xe5, 0x9f, 0xc1, 0x2c, 
+	0xe3, 0x5c, 0x00, 0x00, 0x11, 0x2f, 0xff, 0x1c, 
+	0xe6, 0x00, 0x00, 0x10, 0x80, 0x00, 0x02, 0x00, 
+	0x46, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 
+	0x20, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x45, 
+	0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 
+	0x3a, 0x20, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 
+	0x64, 0x20, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 
+	0x69, 0x6f, 0x6e, 0x00, 0x80, 0x00, 0x02, 0x01, 
+	0x46, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 
+	0x20, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x45, 
+	0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 
+	0x3a, 0x20, 0x4f, 0x76, 0x65, 0x72, 0x66, 0x6c, 
+	0x6f, 0x77, 0x00, 0x00, 0x80, 0x00, 0x02, 0x02, 
+	0x46, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 
+	0x20, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x45, 
+	0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 
+	0x3a, 0x20, 0x44, 0x69, 0x76, 0x69, 0x64, 0x65, 
+	0x20, 0x42, 0x79, 0x20, 0x5a, 0x65, 0x72, 0x6f, 
+	0x00, 0x00, 0x00, 0x00, 0xe2, 0x00, 0x21, 0x02, 
+	0xe3, 0x13, 0x07, 0x0f, 0x1a, 0x00, 0x00, 0x13, 
+	0xe3, 0x13, 0x05, 0x02, 0x12, 0x8f, 0x00, 0x0c, 
+	0x18, 0x90, 0x00, 0x03, 0x05, 0x9f, 0x00, 0x0c, 
+	0xe1, 0x80, 0x00, 0x02, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x7f, 0x80, 0x00, 0x00, 0xe3, 0x13, 0x07, 0x0f, 
+	0x12, 0x00, 0x21, 0x02, 0x1a, 0x00, 0x00, 0x07, 
+	0xe3, 0x13, 0x05, 0x02, 0x12, 0x8f, 0x00, 0x08, 
+	0x18, 0x90, 0x00, 0x03, 0x05, 0x9f, 0x00, 0x08, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x7f, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 
+	0xe3, 0x13, 0x07, 0x02, 0x13, 0xa0, 0x00, 0x00, 
+	0x13, 0xa0, 0x10, 0x00, 0x11, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x13, 0x07, 0x01, 0x13, 0xe0, 0x00, 0x00, 
+	0x13, 0xe0, 0x10, 0x00, 0x11, 0x2f, 0xff, 0x1e, 
+	0xe3, 0x13, 0x06, 0x01, 0x13, 0xa0, 0x00, 0x00, 
+	0x13, 0xa0, 0x11, 0x02, 0x03, 0xa0, 0x01, 0x02, 
+	0xe3, 0x32, 0x01, 0x02, 0x11, 0xe0, 0x00, 0x00, 
+	0x11, 0xe0, 0x10, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x2e, 0x01, 0xfb, 0xe5, 0xe3, 0x10, 0x02, 0x06, 
+	0x1a, 0x00, 0x00, 0x0d, 0xe1, 0xb0, 0x80, 0x86, 
+	0x0a, 0x00, 0x00, 0x0d, 0x22, 0x92, 0x20, 0x01, 
+	0x22, 0x91, 0x10, 0x01, 0x23, 0xa0, 0x11, 0x02, 
+	0xe2, 0xb3, 0x30, 0x00, 0x4a, 0x00, 0x00, 0x0a, 
+	0xe2, 0x83, 0xc0, 0x01, 0xe3, 0xcc, 0xc1, 0x01, 
+	0xe3, 0x5c, 0x09, 0x02, 0xc3, 0xa0, 0x33, 0x19, 
+	0xe2, 0x00, 0x01, 0x02, 0xe1, 0x83, 0x00, 0x00, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0xa0, 0x30, 0x00, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0x21, 0xb0, 0x80, 0xa2, 
+	0xea, 0xff, 0xff, 0xef, 0xe3, 0x11, 0x01, 0x02, 
+	0x1a, 0x00, 0x00, 0x04, 0xe3, 0xa0, 0x10, 0x00, 
+	0xe3, 0xa0, 0x20, 0x00, 0xe2, 0x00, 0x01, 0x02, 
+	0xe3, 0xa0, 0x30, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0xb0, 0xc8, 0x21, 0x01, 0xa0, 0xc8, 0x22, 
+	0x01, 0x8c, 0x18, 0x01, 0x02, 0x83, 0x30, 0x10, 
+	0xe1, 0xb0, 0xcc, 0x21, 0x01, 0xa0, 0xcc, 0x22, 
+	0x01, 0x8c, 0x14, 0x01, 0x02, 0x83, 0x30, 0x08, 
+	0xe1, 0xb0, 0xce, 0x21, 0x01, 0xa0, 0xce, 0x22, 
+	0x01, 0x8c, 0x12, 0x01, 0x02, 0x83, 0x30, 0x04, 
+	0xe1, 0xb0, 0xcf, 0x21, 0x01, 0xa0, 0xcf, 0x22, 
+	0x01, 0x8c, 0x11, 0x01, 0x02, 0x83, 0x30, 0x02, 
+	0xe1, 0xb0, 0xcf, 0xa1, 0x01, 0xa0, 0xcf, 0xa2, 
+	0x01, 0x8c, 0x10, 0x81, 0x02, 0x83, 0x30, 0x01, 
+	0xe1, 0xb0, 0x30, 0x03, 0x4a, 0xff, 0xff, 0xe4, 
+	0x5a, 0xff, 0xff, 0xda, 0xe3, 0x11, 0x01, 0x02, 
+	0x01, 0xa0, 0xf0, 0x0e, 0xe9, 0x2d, 0x40, 0x08, 
+	0xe3, 0xd1, 0x11, 0x02, 0x0a, 0x00, 0x00, 0x15, 
+	0xe1, 0xb0, 0x38, 0x21, 0x01, 0xa0, 0x18, 0x01, 
+	0x03, 0xa0, 0xc0, 0x10, 0x13, 0xa0, 0xc0, 0x00, 
+	0xe1, 0xb0, 0x3c, 0x21, 0x01, 0xa0, 0x14, 0x01, 
+	0x02, 0x8c, 0xc0, 0x08, 0xe1, 0xb0, 0x3e, 0x21, 
+	0x01, 0xa0, 0x12, 0x01, 0x02, 0x8c, 0xc0, 0x04, 
+	0xe1, 0xb0, 0x3f, 0x21, 0x01, 0xa0, 0x11, 0x01, 
+	0x02, 0x8c, 0xc0, 0x02, 0xe1, 0xb0, 0x3f, 0xa1, 
+	0x01, 0xa0, 0x10, 0x81, 0x02, 0x8c, 0xc0, 0x01, 
+	0xe2, 0x6c, 0x30, 0x20, 0xe1, 0x81, 0x13, 0x32, 
+	0xe1, 0xa0, 0x2c, 0x12, 0xe0, 0x40, 0x00, 0x0c, 
+	0xe2, 0x80, 0x00, 0x01, 0xe8, 0xbd, 0x80, 0x08, 
+	0xe1, 0xb0, 0x38, 0x22, 0x01, 0xa0, 0x28, 0x02, 
+	0x03, 0xa0, 0xc0, 0x10, 0x13, 0xa0, 0xc0, 0x00, 
+	0xe1, 0xb0, 0x3c, 0x22, 0x01, 0xa0, 0x24, 0x02, 
+	0x02, 0x8c, 0xc0, 0x08, 0xe1, 0xb0, 0x3e, 0x22, 
+	0x01, 0xa0, 0x22, 0x02, 0x02, 0x8c, 0xc0, 0x04, 
+	0xe1, 0xb0, 0x3f, 0x22, 0x01, 0xa0, 0x21, 0x02, 
+	0x02, 0x8c, 0xc0, 0x02, 0xe1, 0xb0, 0x3f, 0xa2, 
+	0x01, 0xa0, 0x20, 0x82, 0x02, 0x8c, 0xc0, 0x01, 
+	0xe1, 0xa0, 0x10, 0x02, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe2, 0x40, 0x00, 0x1f, 0xe0, 0x40, 0x00, 0x0c, 
+	0xe8, 0xbd, 0x80, 0x08, 0xe3, 0x14, 0x01, 0x02, 
+	0x01, 0xa0, 0xf0, 0x0e, 0xe9, 0x2d, 0x40, 0x01, 
+	0xe3, 0xd4, 0x41, 0x02, 0x0a, 0x00, 0x00, 0x15, 
+	0xe1, 0xb0, 0x08, 0x24, 0x01, 0xa0, 0x48, 0x04, 
+	0x03, 0xa0, 0xc0, 0x10, 0x13, 0xa0, 0xc0, 0x00, 
+	0xe1, 0xb0, 0x0c, 0x24, 0x01, 0xa0, 0x44, 0x04, 
+	0x02, 0x8c, 0xc0, 0x08, 0xe1, 0xb0, 0x0e, 0x24, 
+	0x01, 0xa0, 0x42, 0x04, 0x02, 0x8c, 0xc0, 0x04, 
+	0xe1, 0xb0, 0x0f, 0x24, 0x01, 0xa0, 0x41, 0x04, 
+	0x02, 0x8c, 0xc0, 0x02, 0xe1, 0xb0, 0x0f, 0xa4, 
+	0x01, 0xa0, 0x40, 0x84, 0x02, 0x8c, 0xc0, 0x01, 
+	0xe2, 0x6c, 0x00, 0x20, 0xe1, 0x84, 0x40, 0x35, 
+	0xe1, 0xa0, 0x5c, 0x15, 0xe0, 0x43, 0x30, 0x0c, 
+	0xe2, 0x83, 0x30, 0x01, 0xe8, 0xbd, 0x80, 0x01, 
+	0xe1, 0xb0, 0x08, 0x25, 0x01, 0xa0, 0x58, 0x05, 
+	0x03, 0xa0, 0xc0, 0x10, 0x13, 0xa0, 0xc0, 0x00, 
+	0xe1, 0xb0, 0x0c, 0x25, 0x01, 0xa0, 0x54, 0x05, 
+	0x02, 0x8c, 0xc0, 0x08, 0xe1, 0xb0, 0x0e, 0x25, 
+	0x01, 0xa0, 0x52, 0x05, 0x02, 0x8c, 0xc0, 0x04, 
+	0xe1, 0xb0, 0x0f, 0x25, 0x01, 0xa0, 0x51, 0x05, 
+	0x02, 0x8c, 0xc0, 0x02, 0xe1, 0xb0, 0x0f, 0xa5, 
+	0x01, 0xa0, 0x50, 0x85, 0x02, 0x8c, 0xc0, 0x01, 
+	0xe1, 0xa0, 0x40, 0x05, 0xe3, 0xa0, 0x50, 0x00, 
+	0xe2, 0x43, 0x30, 0x1f, 0xe0, 0x43, 0x30, 0x0c, 
+	0xe8, 0xbd, 0x80, 0x01, 0xe1, 0xa0, 0x80, 0x00, 
+	0xe1, 0xa0, 0x00, 0x03, 0xe1, 0xa0, 0x30, 0x08, 
+	0xe1, 0xa0, 0x80, 0x01, 0xe1, 0xa0, 0x10, 0x04, 
+	0xe1, 0xa0, 0x40, 0x08, 0xe1, 0xa0, 0x80, 0x02, 
+	0xe1, 0xa0, 0x20, 0x05, 0xe1, 0xa0, 0x50, 0x08, 
+	0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
+	0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
+	0xe0, 0x49, 0x30, 0x08, 0xe2, 0x83, 0x3c, 0x3f, 
+	0xe2, 0x83, 0x30, 0xff, 0xe9, 0x2d, 0x48, 0x89, 
+	0xe1, 0xa0, 0x08, 0x21, 0xe1, 0xc1, 0x78, 0x00, 
+	0xe1, 0xa0, 0xb8, 0x22, 0xe1, 0xc2, 0xe8, 0x0b, 
+	0xe2, 0x8f, 0x6e, 0x36, 0xe7, 0xd6, 0x64, 0x20, 
+	0xe0, 0x28, 0x66, 0x90, 0xe2, 0x68, 0x85, 0x02, 
+	0xe0, 0x06, 0x06, 0x98, 0xe1, 0xa0, 0x69, 0xa6, 
+	0xe2, 0x86, 0x60, 0x02, 0xe1, 0xa0, 0x86, 0xa1, 
+	0xe0, 0x29, 0x66, 0x98, 0xe2, 0x69, 0x92, 0x02, 
+	0xe1, 0xa0, 0x88, 0x29, 0xe1, 0xc9, 0x98, 0x08, 
+	0xe0, 0x02, 0x06, 0x99, 0xe0, 0x01, 0x06, 0x98, 
+	0xe0, 0x81, 0x68, 0x22, 0xe1, 0xa0, 0x63, 0x26, 
+	0xe1, 0xb0, 0x40, 0xa4, 0xe1, 0xb0, 0x50, 0x65, 
+	0x33, 0xa0, 0x30, 0x00, 0x23, 0xa0, 0x31, 0x02, 
+	0xe1, 0xa0, 0x87, 0xa4, 0xe0, 0x09, 0x08, 0x96, 
+	0xe1, 0xa0, 0x98, 0x29, 0xe0, 0x08, 0x0b, 0x99, 
+	0xe0, 0x55, 0x50, 0x08, 0xe0, 0x08, 0x09, 0x90, 
+	0xe0, 0xc4, 0x40, 0x08, 0xe0, 0x08, 0x0e, 0x99, 
+	0xe0, 0x53, 0x38, 0x08, 0xe0, 0xd5, 0x58, 0x28, 
+	0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x58, 0x08, 
+	0x20, 0x55, 0x58, 0x08, 0xe0, 0xc4, 0x48, 0x28, 
+	0xe1, 0xa0, 0x18, 0x09, 0xe1, 0xa0, 0x81, 0x24, 
+	0xe0, 0x09, 0x08, 0x96, 0xe1, 0xa0, 0x98, 0x29, 
+	0xe0, 0x08, 0x0b, 0x99, 0xe0, 0x53, 0x39, 0x88, 
+	0xe0, 0xd5, 0x56, 0xa8, 0xe0, 0x08, 0x09, 0x90, 
+	0x30, 0x45, 0x59, 0x88, 0x20, 0x55, 0x59, 0x88, 
+	0xe0, 0xc4, 0x46, 0xa8, 0xe0, 0x08, 0x0e, 0x99, 
+	0xe0, 0x53, 0x31, 0x88, 0xe0, 0xd5, 0x5e, 0xa8, 
+	0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x51, 0x88, 
+	0x20, 0x55, 0x51, 0x88, 0xe0, 0xc4, 0x4e, 0xa8, 
+	0xe1, 0xa0, 0x4d, 0x04, 0xe1, 0x84, 0x43, 0x25, 
+	0xe1, 0xa0, 0x5d, 0x05, 0xe1, 0x85, 0x53, 0x23, 
+	0xe1, 0xa0, 0x3d, 0x03, 0xe0, 0x81, 0x11, 0x89, 
+	0xe5, 0x9d, 0x80, 0x0c, 0xe3, 0x18, 0x00, 0x01, 
+	0x1a, 0x00, 0x00, 0x94, 0xe1, 0xa0, 0x87, 0xa4, 
+	0xe0, 0x09, 0x08, 0x96, 0xe1, 0xa0, 0x98, 0x29, 
+	0xe0, 0x08, 0x0b, 0x99, 0xe0, 0x55, 0x50, 0x08, 
+	0xe0, 0x08, 0x09, 0x90, 0xe0, 0xc4, 0x40, 0x08, 
+	0xe0, 0x08, 0x0e, 0x99, 0xe0, 0x53, 0x38, 0x08, 
+	0xe0, 0xd5, 0x58, 0x28, 0xe0, 0x08, 0x07, 0x99, 
+	0x30, 0x45, 0x58, 0x08, 0x20, 0x55, 0x58, 0x08, 
+	0xe0, 0xc4, 0x48, 0x28, 0xe1, 0xa0, 0x2b, 0x09, 
+	0xe0, 0x81, 0x15, 0x29, 0xe1, 0xa0, 0x81, 0x24, 
+	0xe0, 0x09, 0x08, 0x96, 0xe1, 0xa0, 0x98, 0x29, 
+	0xe0, 0x08, 0x0b, 0x99, 0xe0, 0x53, 0x39, 0x88, 
+	0xe0, 0xd5, 0x56, 0xa8, 0xe0, 0x08, 0x09, 0x90, 
+	0x30, 0x45, 0x59, 0x88, 0x20, 0x55, 0x59, 0x88, 
+	0xe0, 0xc4, 0x46, 0xa8, 0xe0, 0x08, 0x0e, 0x99, 
+	0xe0, 0x53, 0x31, 0x88, 0xe0, 0xd5, 0x5e, 0xa8, 
+	0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x51, 0x88, 
+	0x20, 0x55, 0x51, 0x88, 0xe0, 0xc4, 0x4e, 0xa8, 
+	0xe1, 0xa0, 0x4d, 0x04, 0xe1, 0x84, 0x43, 0x25, 
+	0xe1, 0xa0, 0x5d, 0x05, 0xe1, 0x85, 0x53, 0x23, 
+	0xe1, 0xa0, 0x3d, 0x03, 0xe0, 0x92, 0x24, 0x89, 
+	0xe2, 0xa1, 0x10, 0x00, 0xe5, 0x9d, 0x80, 0x0c, 
+	0xe3, 0x18, 0x00, 0x02, 0x1a, 0x00, 0x00, 0x3f, 
+	0xe1, 0xa0, 0x87, 0xa4, 0xe0, 0x09, 0x08, 0x96, 
+	0xe1, 0xa0, 0x98, 0x29, 0xe0, 0x08, 0x0b, 0x99, 
+	0xe0, 0x55, 0x50, 0x08, 0xe0, 0x08, 0x09, 0x90, 
+	0xe0, 0xc4, 0x40, 0x08, 0xe0, 0x08, 0x0e, 0x99, 
+	0xe0, 0x53, 0x38, 0x08, 0xe0, 0xd5, 0x58, 0x28, 
+	0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x58, 0x08, 
+	0x20, 0x55, 0x58, 0x08, 0xe0, 0xc4, 0x48, 0x28, 
+	0xe1, 0xa0, 0x47, 0x04, 0xe1, 0x84, 0x49, 0x25, 
+	0xe1, 0xa0, 0x57, 0x05, 0xe1, 0x85, 0x59, 0x23, 
+	0xe1, 0xa0, 0x37, 0x03, 0xe1, 0xa0, 0x6e, 0x09, 
+	0xe0, 0x92, 0x22, 0x29, 0xe2, 0xa1, 0x10, 0x00, 
+	0xe1, 0x87, 0x08, 0x00, 0xe1, 0x8e, 0x78, 0x0b, 
+	0xe3, 0xa0, 0xe0, 0x00, 0xe0, 0x55, 0x90, 0x07, 
+	0xe0, 0xd4, 0x80, 0x00, 0x21, 0xa0, 0x50, 0x09, 
+	0x21, 0xa0, 0x40, 0x08, 0xe0, 0xae, 0xe0, 0x0e, 
+	0xe3, 0xa0, 0xb0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
+	0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xb4, 0x40, 0x04, 
+	0xe0, 0xab, 0xb0, 0x0b, 0xe0, 0x55, 0x90, 0x07, 
+	0xe0, 0xd4, 0x80, 0x00, 0xe2, 0xdb, 0xb0, 0x00, 
+	0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
+	0xe0, 0xae, 0xe0, 0x0e, 0xe3, 0xa0, 0xb0, 0x00, 
+	0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
+	0xe0, 0xb4, 0x40, 0x04, 0xe0, 0xab, 0xb0, 0x0b, 
+	0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
+	0xe2, 0xdb, 0xb0, 0x00, 0x21, 0xa0, 0x50, 0x09, 
+	0x21, 0xa0, 0x40, 0x08, 0xe0, 0xae, 0xe0, 0x0e, 
+	0xe1, 0x94, 0x80, 0x05, 0x13, 0x86, 0x60, 0x01, 
+	0xe0, 0x96, 0x6e, 0x0e, 0xe2, 0xb2, 0x20, 0x00, 
+	0xe2, 0xb1, 0x10, 0x00, 0x48, 0xbd, 0x88, 0x89, 
+	0xe8, 0xbd, 0x48, 0x89, 0xe0, 0x96, 0x60, 0x06, 
+	0xe0, 0xb2, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
+	0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0x87, 0x08, 0x00, 0xe1, 0x8e, 0x78, 0x0b, 
+	0xe3, 0xa0, 0xe0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
+	0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xa4, 0x40, 0x04, 
+	0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
+	0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
+	0xe0, 0xae, 0xe0, 0x0e, 0xe3, 0xa0, 0xb0, 0x00, 
+	0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
+	0xe0, 0xb4, 0x40, 0x04, 0xe0, 0xab, 0xb0, 0x0b, 
+	0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
+	0xe2, 0xdb, 0xb0, 0x00, 0x21, 0xa0, 0x50, 0x09, 
+	0x21, 0xa0, 0x40, 0x08, 0xe0, 0xae, 0xe0, 0x0e, 
+	0xe3, 0xa0, 0xb0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
+	0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xb4, 0x40, 0x04, 
+	0xe0, 0xab, 0xb0, 0x0b, 0xe0, 0x55, 0x90, 0x07, 
+	0xe0, 0xd4, 0x80, 0x00, 0xe2, 0xdb, 0xb0, 0x00, 
+	0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
+	0xe0, 0xae, 0xe0, 0x0e, 0xe1, 0x84, 0x60, 0x05, 
+	0xe0, 0x92, 0x24, 0x8e, 0xe2, 0xb1, 0x10, 0x00, 
+	0x48, 0xbd, 0x88, 0x89, 0xe8, 0xbd, 0x48, 0x89, 
+	0xe0, 0x92, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
+	0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0x87, 0x08, 0x00, 0xe1, 0x8e, 0x78, 0x0b, 
+	0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
+	0xe0, 0xa4, 0x40, 0x04, 0xe0, 0x55, 0x90, 0x07, 
+	0xe0, 0xd4, 0x80, 0x00, 0x21, 0xa0, 0x50, 0x09, 
+	0x21, 0xa0, 0x40, 0x08, 0x22, 0x81, 0x10, 0x20, 
+	0xe3, 0xa0, 0xb0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
+	0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xb4, 0x40, 0x04, 
+	0xe0, 0xab, 0xb0, 0x0b, 0xe0, 0x55, 0x90, 0x07, 
+	0xe0, 0xd4, 0x80, 0x00, 0xe2, 0xdb, 0xb0, 0x00, 
+	0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
+	0x22, 0x81, 0x10, 0x10, 0xe3, 0xa0, 0xb0, 0x00, 
+	0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
+	0xe0, 0xb4, 0x40, 0x04, 0xe0, 0xab, 0xb0, 0x0b, 
+	0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
+	0xe2, 0xdb, 0xb0, 0x00, 0x21, 0xa0, 0x50, 0x09, 
+	0x21, 0xa0, 0x40, 0x08, 0x22, 0x81, 0x10, 0x08, 
+	0xe1, 0x84, 0x60, 0x05, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe3, 0x31, 0x00, 0x00, 0x48, 0xbd, 0x88, 0x89, 
+	0xe8, 0xbd, 0x48, 0x89, 0xe1, 0xa0, 0x10, 0x81, 
+	0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0x80, 0x80, 0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a, 
+	0x79, 0x78, 0x77, 0x76, 0x76, 0x75, 0x74, 0x73, 
+	0x72, 0x71, 0x71, 0x70, 0x6f, 0x6e, 0x6e, 0x6d, 
+	0x6c, 0x6c, 0x6b, 0x6a, 0x6a, 0x69, 0x68, 0x68, 
+	0x67, 0x66, 0x66, 0x65, 0x64, 0x64, 0x63, 0x63, 
+	0x62, 0x61, 0x61, 0x60, 0x60, 0x5f, 0x5f, 0x5e, 
+	0x5e, 0x5d, 0x5d, 0x5c, 0x5c, 0x5b, 0x5b, 0x5a, 
+	0x5a, 0x59, 0x59, 0x58, 0x58, 0x57, 0x57, 0x56, 
+	0x56, 0x55, 0x55, 0x55, 0x54, 0x54, 0x53, 0x53, 
+	0x52, 0x52, 0x52, 0x51, 0x51, 0x50, 0x50, 0x50, 
+	0x4f, 0x4f, 0x4f, 0x4e, 0x4e, 0x4d, 0x4d, 0x4d, 
+	0x4c, 0x4c, 0x4c, 0x4b, 0x4b, 0x4b, 0x4a, 0x4a, 
+	0x4a, 0x49, 0x49, 0x49, 0x48, 0x48, 0x48, 0x47, 
+	0x47, 0x47, 0x47, 0x46, 0x46, 0x46, 0x45, 0x45, 
+	0x45, 0x44, 0x44, 0x44, 0x44, 0x43, 0x43, 0x43, 
+	0x43, 0x42, 0x42, 0x42, 0x42, 0x41, 0x41, 0x41, 
+	0xe1, 0xa0, 0x98, 0x83, 0xe3, 0x79, 0x08, 0x02, 
+	0x30, 0x09, 0x90, 0x04, 0xe0, 0x19, 0x90, 0x83, 
+	0xe1, 0xa0, 0x88, 0x80, 0xe3, 0x78, 0x08, 0x02, 
+	0x30, 0x08, 0x80, 0x01, 0xe0, 0x18, 0x80, 0x80, 
+	0x4a, 0x00, 0x00, 0x20, 0xe3, 0x19, 0x01, 0x02, 
+	0x1a, 0x00, 0x00, 0x32, 0xe3, 0x1b, 0x00, 0x04, 
+	0x1a, 0x00, 0x00, 0x08, 0xe1, 0xa0, 0x80, 0x00, 
+	0xe1, 0xa0, 0x00, 0x03, 0xe1, 0xa0, 0x30, 0x08, 
+	0xe1, 0xa0, 0x80, 0x01, 0xe1, 0xa0, 0x10, 0x04, 
+	0xe1, 0xa0, 0x40, 0x08, 0xe1, 0xa0, 0x80, 0x02, 
+	0xe1, 0xa0, 0x20, 0x05, 0xe1, 0xa0, 0x50, 0x08, 
+	0xe0, 0x11, 0x60, 0x80, 0x43, 0xc1, 0x11, 0x02, 
+	0x42, 0x80, 0x00, 0x01, 0xe0, 0x14, 0x60, 0x83, 
+	0x43, 0xc4, 0x41, 0x02, 0x42, 0x83, 0x30, 0x01, 
+	0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
+	0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
+	0xe0, 0x49, 0x30, 0x08, 0xe2, 0x83, 0x3c, 0x3f, 
+	0xe2, 0x83, 0x30, 0xff, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe3, 0x11, 0x01, 0x02, 0x0b, 0x00, 0x04, 0x30, 
+	0xe3, 0x14, 0x01, 0x02, 0x0b, 0x00, 0x04, 0x15, 
+	0xe8, 0xbd, 0x40, 0x00, 0xea, 0xff, 0xfe, 0xb6, 
+	0xe3, 0x19, 0x01, 0x02, 0x0a, 0x00, 0x00, 0x05, 
+	0xe1, 0x82, 0x80, 0x81, 0xe1, 0x88, 0x80, 0x05, 
+	0xe1, 0x98, 0x80, 0x84, 0x1a, 0x00, 0x04, 0x45, 
+	0xe3, 0x80, 0x04, 0x61, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0x92, 0x80, 0x81, 0x1a, 0x00, 0x04, 0x52, 
+	0xe0, 0x20, 0x80, 0x03, 0xe2, 0x08, 0x81, 0x02, 
+	0xe3, 0x1b, 0x00, 0x04, 0x02, 0x8f, 0x00, 0x50, 
+	0x12, 0x8f, 0x00, 0x40, 0xe8, 0x90, 0x00, 0x07, 
+	0xe1, 0x80, 0x00, 0x08, 0xe3, 0xa0, 0x30, 0x00, 
+	0xe3, 0xa0, 0x60, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0x95, 0x80, 0x84, 0x1a, 0x00, 0x04, 0x3d, 
+	0xe0, 0x20, 0x80, 0x03, 0xe2, 0x08, 0x81, 0x02, 
+	0xe3, 0x1b, 0x00, 0x04, 0x12, 0x8f, 0x00, 0x20, 
+	0x02, 0x8f, 0x00, 0x10, 0xe8, 0x90, 0x00, 0x07, 
+	0xe1, 0x80, 0x00, 0x08, 0xe3, 0xa0, 0x30, 0x00, 
+	0xe3, 0xa0, 0x60, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x7f, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xe9, 0x2d, 0x40, 0x00, 0xe1, 0xa0, 0x68, 0x80, 
+	0xe0, 0x56, 0x88, 0x83, 0xe0, 0x20, 0xe0, 0x03, 
+	0xe2, 0x00, 0x01, 0x02, 0xe1, 0xa0, 0x38, 0xa6, 
+	0x8a, 0x00, 0x00, 0x1a, 0x01, 0xa0, 0x90, 0x08, 
+	0x0a, 0x00, 0x00, 0x2e, 0xe2, 0x68, 0x60, 0x00, 
+	0xe1, 0xa0, 0x68, 0xa6, 0xe0, 0x83, 0x30, 0x06, 
+	0xe1, 0xa0, 0x92, 0xa6, 0xe1, 0xc6, 0x62, 0x89, 
+	0xe3, 0x59, 0x00, 0x02, 0x33, 0x39, 0x00, 0x00, 
+	0xe2, 0x66, 0x90, 0x20, 0xe1, 0xa0, 0x89, 0x12, 
+	0xe1, 0xa0, 0x26, 0x32, 0xe1, 0x82, 0x29, 0x11, 
+	0xe1, 0xa0, 0x16, 0x31, 0x0a, 0x00, 0x00, 0x03, 
+	0x11, 0x88, 0x81, 0x08, 0x11, 0x82, 0x81, 0x28, 
+	0x11, 0xa0, 0x20, 0x01, 0x13, 0xa0, 0x10, 0x00, 
+	0x3a, 0x00, 0x00, 0x04, 0x21, 0x88, 0x80, 0x02, 
+	0x21, 0x88, 0x81, 0x08, 0x21, 0x81, 0x81, 0x28, 
+	0x23, 0xa0, 0x20, 0x00, 0x23, 0xa0, 0x10, 0x00, 
+	0xe3, 0xa0, 0x90, 0x00, 0xea, 0x00, 0x00, 0x15, 
+	0xe1, 0xa0, 0x68, 0xa8, 0xe1, 0xa0, 0x82, 0xa6, 
+	0xe1, 0xc6, 0x62, 0x88, 0xe3, 0x58, 0x00, 0x02, 
+	0x33, 0x38, 0x00, 0x00, 0xe2, 0x66, 0x80, 0x20, 
+	0xe1, 0xa0, 0x98, 0x15, 0xe1, 0xa0, 0x56, 0x35, 
+	0xe1, 0x85, 0x58, 0x14, 0xe1, 0xa0, 0x46, 0x34, 
+	0x0a, 0x00, 0x00, 0x03, 0x11, 0x89, 0x91, 0x09, 
+	0x11, 0x85, 0x91, 0x29, 0x11, 0xa0, 0x50, 0x04, 
+	0x13, 0xa0, 0x40, 0x00, 0x3a, 0x00, 0x00, 0x04, 
+	0x21, 0x89, 0x90, 0x05, 0x21, 0x89, 0x91, 0x09, 
+	0x21, 0x84, 0x91, 0x29, 0x23, 0xa0, 0x50, 0x00, 
+	0x23, 0xa0, 0x40, 0x00, 0xe3, 0xa0, 0x80, 0x00, 
+	0xe3, 0x1e, 0x01, 0x02, 0x1a, 0x00, 0x00, 0x09, 
+	0xe0, 0x98, 0x60, 0x09, 0xe0, 0xb2, 0x20, 0x05, 
+	0xe0, 0xb1, 0x10, 0x04, 0x38, 0xbd, 0x80, 0x00, 
+	0xe2, 0x83, 0x30, 0x01, 0xe1, 0xb0, 0x10, 0x61, 
+	0xe1, 0xb0, 0x20, 0x62, 0xe1, 0x86, 0x60, 0x86, 
+	0xe1, 0xa0, 0x60, 0x66, 0xe8, 0xbd, 0x80, 0x00, 
+	0xe0, 0x58, 0x60, 0x09, 0xe0, 0xd2, 0x20, 0x05, 
+	0xe0, 0xd1, 0x10, 0x04, 0x2a, 0x00, 0x00, 0x03, 
+	0xe2, 0x20, 0x01, 0x02, 0xe2, 0x76, 0x60, 0x00, 
+	0xe2, 0xf2, 0x20, 0x00, 0xe2, 0xe1, 0x10, 0x00, 
+	0xe3, 0x11, 0x01, 0x02, 0x18, 0xbd, 0x80, 0x00, 
+	0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
+	0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
+	0xe3, 0x11, 0x01, 0x02, 0x18, 0xbd, 0x80, 0x00, 
+	0xe1, 0x91, 0xe0, 0x02, 0x1b, 0x00, 0x03, 0x7e, 
+	0x18, 0xbd, 0x80, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
+	0xe3, 0xa0, 0x10, 0x00, 0xe2, 0x8d, 0xd0, 0x04, 
+	0xe8, 0xbd, 0x4b, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xa0, 0x98, 0x83, 0xe3, 0x79, 0x08, 0x02, 
+	0x30, 0x09, 0x90, 0x04, 0xe0, 0x19, 0x90, 0x83, 
+	0xe1, 0xa0, 0x88, 0x80, 0xe3, 0x78, 0x08, 0x02, 
+	0x30, 0x08, 0x80, 0x01, 0xe0, 0x18, 0x80, 0x80, 
+	0x4a, 0x00, 0x00, 0x14, 0xe3, 0x19, 0x01, 0x02, 
+	0x1a, 0x00, 0x00, 0x22, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe0, 0x11, 0x60, 0x80, 0x43, 0xc1, 0x11, 0x02, 
+	0x42, 0x80, 0x00, 0x01, 0xe0, 0x14, 0x60, 0x83, 
+	0x43, 0xc4, 0x41, 0x02, 0x42, 0x83, 0x30, 0x01, 
+	0xe3, 0x10, 0x01, 0x01, 0x11, 0xb0, 0x68, 0x80, 
+	0x1b, 0x00, 0x02, 0xe6, 0xe3, 0x13, 0x01, 0x01, 
+	0x11, 0xb0, 0x68, 0x83, 0x1b, 0x00, 0x03, 0x1d, 
+	0xeb, 0xff, 0xff, 0x8a, 0xe3, 0x11, 0x01, 0x02, 
+	0x18, 0xbd, 0x80, 0x00, 0xe1, 0x91, 0xe0, 0x02, 
+	0x1b, 0x00, 0x03, 0x5b, 0xe8, 0xbd, 0x80, 0x00, 
+	0xe3, 0x19, 0x01, 0x02, 0x0a, 0x00, 0x00, 0x09, 
+	0xe1, 0x82, 0x80, 0x81, 0xe1, 0x88, 0x80, 0x05, 
+	0xe1, 0x98, 0x80, 0x84, 0x1a, 0x00, 0x03, 0xa5, 
+	0xe0, 0x23, 0x85, 0x0b, 0xe0, 0x38, 0x80, 0x00, 
+	0x52, 0x00, 0x81, 0x02, 0x5a, 0x00, 0x00, 0x0a, 
+	0xe3, 0x80, 0x04, 0x61, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0x92, 0x80, 0x81, 0x1a, 0x00, 0x03, 0xae, 
+	0xe2, 0x00, 0x81, 0x02, 0xea, 0x00, 0x00, 0x04, 
+	0xe1, 0x95, 0x80, 0x84, 0x1a, 0x00, 0x03, 0xa1, 
+	0xe2, 0x03, 0x81, 0x02, 0xe3, 0x1b, 0x06, 0x02, 
+	0x12, 0x28, 0x81, 0x02, 0xe3, 0x1b, 0x06, 0x01, 
+	0x12, 0x28, 0x81, 0x02, 0xe2, 0x8f, 0x00, 0x14, 
+	0xe8, 0x90, 0x00, 0x07, 0xe1, 0x80, 0x00, 0x08, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x40, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x49, 0x02, 
+	0xf0, 0x00, 0xf9, 0x2a, 0xbc, 0x08, 0x47, 0x18, 
+	0xff, 0xff, 0xff, 0xfd, 0xb5, 0x80, 0x1c, 0x07, 
+	0x28, 0x0a, 0xd2, 0x14, 0xa3, 0x01, 0x5c, 0x1b, 
+	0x00, 0x5b, 0x44, 0x9f, 0x10, 0x04, 0x10, 0x06, 
+	0x08, 0x0a, 0x0c, 0x10, 0x0e, 0x0e, 0xa0, 0x0f, 
+	0xe0, 0x0c, 0xa0, 0x1a, 0xe0, 0x0a, 0xa0, 0x33, 
+	0xe0, 0x08, 0xa0, 0x3f, 0xe0, 0x06, 0xa0, 0x4b, 
+	0xe0, 0x04, 0xa0, 0x52, 0xe0, 0x02, 0x1c, 0x38, 
+	0xf0, 0x00, 0xff, 0x71, 0x21, 0x03, 0xf0, 0x00, 
+	0xf9, 0x27, 0x2f, 0x04, 0xd1, 0x05, 0x20, 0x01, 
+	0xf7, 0xfd, 0xfc, 0x2c, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0xf7, 0xfe, 0xfc, 0xd3, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x41, 0x62, 0x6e, 0x6f, 
+	0x72, 0x6d, 0x61, 0x6c, 0x20, 0x74, 0x65, 0x72, 
+	0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 
+	0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x61, 
+	0x62, 0x6f, 0x72, 0x74, 0x28, 0x29, 0x20, 0x66, 
+	0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 
+	0x00, 0x00, 0x00, 0x00, 0x49, 0x6c, 0x6c, 0x65, 
+	0x67, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x73, 0x74, 
+	0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 
+	0x28, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x6f, 
+	0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x66, 0x75, 0x6e, 
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 
+	0x64, 0x65, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x75, 
+	0x70, 0x74, 0x65, 0x64, 0x29, 0x0a, 0x5b, 0x69, 
+	0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6c, 
+	0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x70, 
+	0x6f, 0x69, 0x6e, 0x74, 0x20, 0x65, 0x6d, 0x75, 
+	0x6c, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x69, 0x6e, 
+	0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x3f, 
+	0x5d, 0x00, 0x00, 0x00, 0x49, 0x6e, 0x74, 0x65, 
+	0x72, 0x72, 0x75, 0x70, 0x74, 0x20, 0x72, 0x65, 
+	0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 
+	0x72, 0x6f, 0x6d, 0x20, 0x75, 0x73, 0x65, 0x72, 
+	0x20, 0x2d, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 
+	0x61, 0x6d, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 
+	0x6e, 0x61, 0x74, 0x65, 0x64, 0x00, 0x00, 0x00, 
+	0x49, 0x6c, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20, 
+	0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 
+	0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x77, 0x69, 
+	0x6c, 0x64, 0x6c, 0x79, 0x20, 0x6f, 0x75, 0x74, 
+	0x73, 0x69, 0x64, 0x65, 0x20, 0x61, 0x72, 0x72, 
+	0x61, 0x79, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 
+	0x73, 0x29, 0x00, 0x00, 0x54, 0x65, 0x72, 0x6d, 
+	0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 
+	0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 
+	0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 
+	0x00, 0x00, 0x00, 0x00, 0x55, 0x73, 0x65, 0x72, 
+	0x2d, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 
+	0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x00, 
+	0xb5, 0x00, 0x20, 0x01, 0x49, 0x05, 0x70, 0x08, 
+	0xa0, 0x05, 0x21, 0x03, 0xf0, 0x00, 0xf8, 0x78, 
+	0x20, 0x64, 0xf7, 0xfd, 0xfb, 0x7f, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x23, 0x48, 
+	0x53, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x6f, 0x76, 
+	0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x0a, 0x00, 
+	0xb5, 0x00, 0x28, 0x07, 0xd1, 0x03, 0xf7, 0xff, 
+	0xff, 0xe3, 0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 
+	0xff, 0x19, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 
+	0xf7, 0xff, 0xff, 0xf2, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x90, 0x28, 0x00, 0xdd, 0x01, 0x28, 0x0b, 
+	0xdb, 0x05, 0x20, 0x03, 0x49, 0x0b, 0x60, 0x08, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x87, 
+	0x4b, 0x09, 0x59, 0xd9, 0x4a, 0x09, 0x42, 0x91, 
+	0xd1, 0x02, 0xf7, 0xff, 0xff, 0xdd, 0xe0, 0x05, 
+	0x4c, 0x07, 0x42, 0xa1, 0xd0, 0x02, 0x51, 0xda, 
+	0xf7, 0xfb, 0xfe, 0x9c, 0x20, 0x00, 0xbc, 0x90, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x21, 0x30, 
+	0x2e, 0x08, 0xd2, 0x18, 0xff, 0xff, 0xff, 0xff, 
+	0xff, 0xff, 0xff, 0xfd, 0x28, 0x00, 0xdd, 0x09, 
+	0x28, 0x0b, 0xda, 0x07, 0x00, 0x80, 0x49, 0x04, 
+	0x58, 0x08, 0x49, 0x04, 0x42, 0x88, 0xd0, 0x01, 
+	0x20, 0x01, 0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 
+	0x2e, 0x08, 0xd2, 0x18, 0xff, 0xff, 0xff, 0xff, 
+	0x28, 0x00, 0xdd, 0x01, 0x28, 0x0b, 0xdb, 0x01, 
+	0x48, 0x03, 0x47, 0x70, 0x00, 0x83, 0x4a, 0x03, 
+	0x58, 0xd0, 0x50, 0xd1, 0x47, 0x70, 0x00, 0x00, 
+	0xff, 0xff, 0xff, 0xfe, 0x2e, 0x08, 0xd2, 0x18, 
+	0xb5, 0x90, 0x27, 0x01, 0x4c, 0x05, 0x1c, 0x38, 
+	0x1c, 0x21, 0xf7, 0xff, 0xff, 0xe9, 0x37, 0x01, 
+	0x2f, 0x0b, 0xdb, 0xf8, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
+	0xb5, 0x90, 0x1c, 0x0c, 0x1c, 0x07, 0x48, 0x12, 
+	0x28, 0x00, 0xd0, 0x09, 0x48, 0x11, 0x78, 0x00, 
+	0x28, 0x00, 0xd1, 0x05, 0x1c, 0x38, 0x1c, 0x21, 
+	0xf0, 0x00, 0xfb, 0x2c, 0x28, 0x00, 0xd1, 0x13, 
+	0x08, 0x60, 0xd3, 0x02, 0x20, 0x0a, 0xf0, 0x00, 
+	0xf8, 0xd3, 0x78, 0x38, 0x28, 0x00, 0xd0, 0x06, 
+	0x78, 0x38, 0x37, 0x01, 0xf0, 0x00, 0xf8, 0xcc, 
+	0x78, 0x38, 0x28, 0x00, 0xd1, 0xf8, 0x08, 0xa0, 
+	0xd3, 0x02, 0x20, 0x0a, 0xf0, 0x00, 0xf8, 0xc4, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x02, 0x2b, 0xa9, 0x2e, 0x08, 0x23, 0x48, 
+	0xb5, 0x80, 0xb0, 0x83, 0x90, 0x00, 0x91, 0x01, 
+	0xf7, 0xfb, 0xfe, 0xf8, 0x90, 0x02, 0x46, 0x69, 
+	0x20, 0x01, 0xf0, 0x01, 0xf8, 0x49, 0x23, 0x01, 
+	0x1c, 0x07, 0x42, 0xd8, 0xd1, 0x05, 0x21, 0x00, 
+	0x20, 0x13, 0xf0, 0x01, 0xf8, 0x41, 0x49, 0x03, 
+	0x60, 0x08, 0x1c, 0x38, 0xb0, 0x03, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x21, 0x30, 
+	0xb5, 0x80, 0xb0, 0x81, 0x90, 0x00, 0x46, 0x69, 
+	0x20, 0x02, 0xf0, 0x01, 0xf8, 0x31, 0x1c, 0x07, 
+	0xd0, 0x05, 0x21, 0x00, 0x20, 0x13, 0xf0, 0x01, 
+	0xf8, 0x2b, 0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 
+	0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x21, 0x30, 0xb5, 0x80, 0xb0, 0x84, 
+	0x90, 0x00, 0x91, 0x01, 0x92, 0x02, 0x46, 0x69, 
+	0x20, 0x05, 0xf0, 0x01, 0xf8, 0x19, 0x1c, 0x07, 
+	0xd0, 0x05, 0x21, 0x00, 0x20, 0x13, 0xf0, 0x01, 
+	0xf8, 0x13, 0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 
+	0xb0, 0x04, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x21, 0x30, 0xb5, 0x80, 0xb0, 0x84, 
+	0x90, 0x00, 0x91, 0x01, 0x92, 0x02, 0x93, 0x03, 
+	0x46, 0x69, 0x20, 0x06, 0xf0, 0x01, 0xf8, 0x00, 
+	0x1c, 0x07, 0xd0, 0x05, 0x21, 0x00, 0x20, 0x13, 
+	0xf0, 0x00, 0xff, 0xfa, 0x49, 0x03, 0x60, 0x08, 
+	0x1c, 0x38, 0xb0, 0x04, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x21, 0x30, 
+	0xb5, 0x00, 0xb0, 0x81, 0x90, 0x00, 0x46, 0x69, 
+	0x20, 0x08, 0xf0, 0x00, 0xff, 0xe9, 0xb0, 0x01, 
+	0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 0x69, 0x40, 
+	0xb0, 0x81, 0x90, 0x00, 0x46, 0x69, 0x20, 0x09, 
+	0xf0, 0x00, 0xff, 0xde, 0xb0, 0x01, 0xbc, 0x08, 
+	0x47, 0x18, 0xb5, 0x80, 0xb0, 0x82, 0x90, 0x00, 
+	0x91, 0x01, 0x46, 0x69, 0x20, 0x0a, 0xf0, 0x00, 
+	0xff, 0xd3, 0x1c, 0x07, 0xd5, 0x05, 0x21, 0x00, 
+	0x20, 0x13, 0xf0, 0x00, 0xff, 0xcd, 0x49, 0x03, 
+	0x60, 0x08, 0x1c, 0x38, 0xb0, 0x02, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x21, 0x30, 
+	0xb5, 0x80, 0xb0, 0x81, 0x90, 0x00, 0x46, 0x69, 
+	0x20, 0x0b, 0xf0, 0x00, 0xff, 0xbd, 0x1c, 0x07, 
+	0xd5, 0x05, 0x21, 0x00, 0x20, 0x13, 0xf0, 0x00, 
+	0xff, 0xb7, 0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 
+	0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x21, 0x30, 0xb5, 0x00, 0xb0, 0x81, 
+	0x90, 0x00, 0x46, 0x69, 0x20, 0x0c, 0xf0, 0x00, 
+	0xff, 0xa7, 0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x00, 0xb0, 0x83, 0x90, 0x00, 0x91, 0x01, 
+	0x92, 0x02, 0x46, 0x69, 0x20, 0x0d, 0xf0, 0x00, 
+	0xff, 0x9b, 0xb0, 0x03, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x01, 0x46, 0x69, 0x20, 0x03, 0xf0, 0x00, 
+	0xff, 0x93, 0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 
+	0xb5, 0x80, 0xb0, 0x82, 0x90, 0x00, 0xf7, 0xfb, 
+	0xfe, 0x35, 0x90, 0x01, 0x46, 0x69, 0x20, 0x12, 
+	0xf0, 0x00, 0xff, 0x86, 0x1c, 0x07, 0xd0, 0x05, 
+	0x21, 0x00, 0x20, 0x13, 0xf0, 0x00, 0xff, 0x80, 
+	0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 0xb0, 0x02, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x21, 0x30, 0xb5, 0x80, 0xb0, 0x82, 
+	0x90, 0x00, 0xf7, 0xfb, 0xfe, 0x1b, 0x90, 0x01, 
+	0x46, 0x69, 0x20, 0x0e, 0xf0, 0x00, 0xff, 0x6c, 
+	0x1c, 0x07, 0xd0, 0x05, 0x21, 0x00, 0x20, 0x13, 
+	0xf0, 0x00, 0xff, 0x66, 0x49, 0x03, 0x60, 0x08, 
+	0x1c, 0x38, 0xb0, 0x02, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x21, 0x30, 
+	0xb5, 0x80, 0xb0, 0x84, 0x90, 0x00, 0x1c, 0x0f, 
+	0xf7, 0xfb, 0xfe, 0x00, 0x90, 0x01, 0x97, 0x02, 
+	0x1c, 0x38, 0xf7, 0xfb, 0xfd, 0xfb, 0x90, 0x03, 
+	0x46, 0x69, 0x20, 0x0f, 0xf0, 0x00, 0xff, 0x4c, 
+	0x1c, 0x07, 0xd0, 0x05, 0x21, 0x00, 0x20, 0x13, 
+	0xf0, 0x00, 0xff, 0x46, 0x49, 0x03, 0x60, 0x08, 
+	0x1c, 0x38, 0xb0, 0x04, 0xbc, 0x80, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x21, 0x30, 
+	0xb5, 0x80, 0xb0, 0x82, 0x4f, 0x08, 0x97, 0x00, 
+	0x20, 0xff, 0x30, 0x01, 0x90, 0x01, 0x46, 0x69, 
+	0x20, 0x15, 0xf0, 0x00, 0xff, 0x31, 0x28, 0x00, 
+	0xd0, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x1c, 0x38, 
+	0xb0, 0x02, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xd2, 0x48, 0xb5, 0x00, 0x21, 0x00, 
+	0x20, 0x10, 0xf0, 0x00, 0xff, 0x21, 0x49, 0x02, 
+	0x68, 0x09, 0x1a, 0x40, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x23, 0x58, 0xb5, 0x00, 0x21, 0x00, 
+	0x20, 0x10, 0xf0, 0x00, 0xff, 0x15, 0x49, 0x02, 
+	0x60, 0x08, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x23, 0x58, 0xb5, 0x80, 0x21, 0x00, 
+	0x1c, 0x07, 0x20, 0x11, 0xf0, 0x00, 0xff, 0x08, 
+	0x2f, 0x00, 0xd0, 0x00, 0x60, 0x38, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x47, 0x70, 
+	0xb5, 0x80, 0x49, 0x07, 0x68, 0x09, 0xf7, 0xfb, 
+	0xfc, 0xd9, 0x1c, 0x07, 0xd1, 0x03, 0xa1, 0x05, 
+	0xa0, 0x05, 0xf0, 0x00, 0xfc, 0xe7, 0x1c, 0x38, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x21, 0x28, 0x00, 0x00, 0x00, 0x00, 
+	0x4e, 0x6f, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 
+	0x20, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x66, 0x6f, 
+	0x72, 0x20, 0x49, 0x2f, 0x4f, 0x20, 0x62, 0x75, 
+	0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 
+	0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 
+	0x00, 0x00, 0x00, 0x00, 0x23, 0x80, 0x68, 0xc1, 
+	0x43, 0x19, 0x60, 0xc1, 0x21, 0x00, 0x60, 0x01, 
+	0x60, 0x81, 0x47, 0x70, 0xb5, 0xf7, 0x68, 0xd5, 
+	0x69, 0x56, 0x1c, 0x0c, 0x1c, 0x17, 0x0d, 0x68, 
+	0xd3, 0x05, 0x23, 0x10, 0x43, 0x1d, 0x1c, 0x30, 
+	0xf7, 0xff, 0xff, 0x14, 0x61, 0xb8, 0x48, 0x12, 
+	0x40, 0x28, 0xd0, 0x08, 0x69, 0xb9, 0x1c, 0x30, 
+	0xf7, 0xff, 0xfe, 0xdf, 0x28, 0x00, 0xdb, 0x10, 
+	0x4b, 0x0e, 0x40, 0x1d, 0x60, 0xfd, 0x99, 0x00, 
+	0x1c, 0x30, 0x1c, 0x22, 0x1c, 0x2b, 0xf7, 0xff, 
+	0xfe, 0x8d, 0x00, 0x41, 0x08, 0x49, 0x1a, 0x61, 
+	0x69, 0xba, 0x18, 0x51, 0x61, 0xb9, 0x28, 0x00, 
+	0xd0, 0x08, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0xce, 
+	0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xe7, 0xf9, 
+	0x00, 0x02, 0x00, 0x10, 0xff, 0xfd, 0xff, 0xef, 
+	0xb5, 0xb0, 0x48, 0x15, 0x68, 0xc1, 0x4b, 0x15, 
+	0x40, 0x19, 0x1c, 0x1d, 0x42, 0x99, 0xd1, 0x01, 
+	0xf0, 0x00, 0xfc, 0xd6, 0x48, 0x12, 0x68, 0xc1, 
+	0x4b, 0x10, 0x40, 0x19, 0x42, 0xa9, 0xd1, 0x01, 
+	0xf0, 0x00, 0xfc, 0xce, 0x48, 0x0f, 0x68, 0xc1, 
+	0x4b, 0x0c, 0x40, 0x19, 0x42, 0xa9, 0xd1, 0x01, 
+	0xf0, 0x00, 0xfc, 0xc6, 0x27, 0x00, 0x4c, 0x0c, 
+	0x01, 0xb8, 0x19, 0x00, 0x68, 0xc1, 0x4b, 0x07, 
+	0x40, 0x19, 0x42, 0xa9, 0xd1, 0x01, 0xf0, 0x00, 
+	0xfc, 0xbb, 0x37, 0x01, 0x2f, 0x0d, 0xdb, 0xf3, 
+	0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0xd3, 0x48, 0x00, 0x00, 0x02, 0x02, 
+	0x2e, 0x08, 0xd3, 0x88, 0x2e, 0x08, 0xd3, 0xc8, 
+	0x2e, 0x08, 0xd4, 0x08, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x69, 0x04, 0x6a, 0xc0, 0x68, 0x79, 0x42, 0x88, 
+	0xd9, 0x00, 0x1c, 0x01, 0x68, 0xf8, 0x4b, 0x13, 
+	0x40, 0x18, 0x07, 0x82, 0x0f, 0x92, 0x25, 0x00, 
+	0x60, 0xf8, 0x2a, 0x01, 0xd0, 0x1a, 0x22, 0x82, 
+	0x40, 0x02, 0x15, 0x1e, 0x2a, 0x02, 0xd1, 0x0a, 
+	0x0c, 0x40, 0xd3, 0x13, 0x42, 0xa1, 0xd0, 0x0a, 
+	0x1b, 0x09, 0x1c, 0x20, 0x1c, 0x3a, 0xf7, 0xff, 
+	0xff, 0x75, 0x28, 0x00, 0xd0, 0x03, 0x1c, 0x30, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x62, 0xfc, 
+	0x60, 0x7c, 0x60, 0xbd, 0x68, 0xf8, 0x4b, 0x04, 
+	0x40, 0x18, 0x60, 0xf8, 0x1c, 0x28, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0xff, 0xf7, 0xff, 0xff, 
+	0xff, 0xfe, 0xff, 0xff, 0xb5, 0x80, 0x1c, 0x07, 
+	0x68, 0xc0, 0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 
+	0x60, 0xf8, 0x69, 0xb8, 0x6a, 0xb9, 0x42, 0x88, 
+	0xd0, 0x0d, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0xbe, 
+	0x68, 0xf8, 0x4b, 0x08, 0x40, 0x18, 0x23, 0x10, 
+	0x43, 0x18, 0x60, 0xf8, 0x6a, 0xb8, 0x61, 0xb8, 
+	0x69, 0x38, 0x62, 0xf8, 0x60, 0x78, 0x68, 0xf8, 
+	0x4b, 0x03, 0x40, 0x18, 0x60, 0xf8, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0xff, 0xff, 0xcf, 0xff, 
+	0xff, 0xff, 0xbf, 0xbf, 0xb5, 0xf0, 0x1c, 0x07, 
+	0x69, 0x40, 0xb0, 0x83, 0x90, 0x01, 0x69, 0x38, 
+	0x90, 0x00, 0x25, 0x00, 0x68, 0xfe, 0x07, 0xb0, 
+	0xd1, 0x01, 0x43, 0xc0, 0xe0, 0x48, 0x09, 0x30, 
+	0xd2, 0x40, 0x24, 0x10, 0x1c, 0x38, 0xf0, 0x00, 
+	0xfc, 0x3f, 0x1c, 0x05, 0x0d, 0x70, 0xd3, 0x1b, 
+	0x24, 0x00, 0x49, 0x21, 0x91, 0x02, 0x01, 0xa0, 
+	0x99, 0x02, 0x18, 0x40, 0x42, 0xb8, 0xd0, 0x10, 
+	0x68, 0xc1, 0x07, 0x8a, 0xd0, 0x0d, 0x69, 0x42, 
+	0x9b, 0x01, 0x42, 0x9a, 0xd1, 0x09, 0x0d, 0x49, 
+	0xd3, 0x07, 0x68, 0xc1, 0x4b, 0x19, 0x40, 0x19, 
+	0x60, 0xc1, 0x68, 0xf8, 0x40, 0x18, 0x60, 0xf8, 
+	0xe0, 0x02, 0x34, 0x01, 0x2c, 0x10, 0xdb, 0xe6, 
+	0x2c, 0x10, 0xd1, 0x06, 0x98, 0x01, 0xf7, 0xff, 
+	0xfd, 0x9b, 0x28, 0x00, 0xda, 0x01, 0x25, 0x00, 
+	0x43, 0xed, 0x0b, 0x30, 0xd3, 0x04, 0x98, 0x00, 
+	0x49, 0x0f, 0x68, 0x09, 0xf7, 0xfb, 0xfb, 0xa6, 
+	0x0d, 0xf0, 0x05, 0xc0, 0x23, 0xa5, 0x05, 0xdb, 
+	0x42, 0xd8, 0xd1, 0x07, 0x48, 0x0b, 0x28, 0x00, 
+	0xd0, 0x04, 0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, 
+	0xff, 0xfe, 0x1c, 0x05, 0x22, 0x40, 0x21, 0x00, 
+	0x1c, 0x38, 0xf7, 0xfb, 0xfc, 0xe7, 0x1c, 0x28, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xd3, 0x48, 0xff, 0xef, 0xff, 0xff, 
+	0x2e, 0x08, 0x21, 0x2c, 0x00, 0x00, 0x00, 0x00, 
+	0xb5, 0xf7, 0x1c, 0x10, 0x1c, 0x0c, 0x1c, 0x17, 
+	0xf7, 0xff, 0xff, 0x98, 0x78, 0x20, 0x34, 0x01, 
+	0x28, 0x61, 0xd0, 0x09, 0x28, 0x72, 0xd0, 0x04, 
+	0x28, 0x77, 0xd1, 0x25, 0x26, 0x02, 0x25, 0x04, 
+	0xe0, 0x04, 0x26, 0x01, 0x25, 0x00, 0xe0, 0x01, 
+	0x4e, 0x1a, 0x25, 0x08, 0x78, 0x20, 0x34, 0x01, 
+	0x28, 0x2b, 0xd0, 0x06, 0x28, 0x62, 0xd1, 0x09, 
+	0x23, 0x04, 0x43, 0x1e, 0x23, 0x01, 0x43, 0x1d, 
+	0xe7, 0xf4, 0x23, 0x03, 0x43, 0x1e, 0x23, 0x02, 
+	0x43, 0x1d, 0xe7, 0xef, 0x1f, 0xe0, 0x38, 0x19, 
+	0x7f, 0xc0, 0x28, 0x74, 0xd1, 0x01, 0x23, 0x10, 
+	0x43, 0x1d, 0x98, 0x00, 0x1c, 0x29, 0xf7, 0xff, 
+	0xfd, 0x23, 0x23, 0x01, 0x42, 0xd8, 0xd1, 0x04, 
+	0x20, 0x00, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x21, 0x00, 0x60, 0x79, 0x61, 0x39, 
+	0x21, 0x01, 0x03, 0x09, 0x61, 0x78, 0x61, 0xf9, 
+	0x60, 0xfe, 0x09, 0x28, 0xd3, 0x04, 0x22, 0x02, 
+	0x21, 0x00, 0x1c, 0x38, 0xf0, 0x00, 0xfb, 0xc4, 
+	0x1c, 0x38, 0xe7, 0xea, 0x00, 0x00, 0x80, 0x02, 
+	0xb5, 0x90, 0x23, 0x03, 0x4f, 0x08, 0x01, 0x9a, 
+	0x19, 0xd2, 0x68, 0xd4, 0x07, 0xa4, 0xd1, 0x04, 
+	0xf7, 0xff, 0xff, 0xaa, 0xbc, 0x90, 0xbc, 0x08, 
+	0x47, 0x18, 0x33, 0x01, 0x2b, 0x10, 0xdb, 0xf2, 
+	0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xd3, 0x48, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x1c, 0x0f, 0x4d, 0x10, 0x68, 0xe8, 0x08, 0x80, 
+	0xd3, 0x18, 0x20, 0x01, 0x4e, 0x0e, 0x70, 0x30, 
+	0x40, 0x38, 0xd0, 0x03, 0x20, 0x0a, 0x1c, 0x29, 
+	0xf0, 0x00, 0xfc, 0x1e, 0x1c, 0x20, 0x1c, 0x29, 
+	0xf0, 0x00, 0xfc, 0x2c, 0x08, 0xb8, 0xd3, 0x03, 
+	0x20, 0x0a, 0x1c, 0x29, 0xf0, 0x00, 0xfc, 0x14, 
+	0x20, 0x00, 0x70, 0x30, 0x20, 0x01, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0xf0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0xd3, 0xc8, 
+	0x2e, 0x08, 0x23, 0x48, 0xb5, 0x80, 0x1c, 0x07, 
+	0xa0, 0x06, 0x21, 0x01, 0xf7, 0xff, 0xfc, 0x98, 
+	0x21, 0x02, 0x1c, 0x38, 0xf7, 0xff, 0xfc, 0x94, 
+	0x20, 0x01, 0xf7, 0xfc, 0xff, 0x95, 0xbc, 0x80, 
+	0xbc, 0x08, 0x47, 0x18, 0x43, 0x6f, 0x75, 0x6c, 
+	0x64, 0x6e, 0x27, 0x74, 0x20, 0x77, 0x72, 0x69, 
+	0x74, 0x65, 0x20, 0x00, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x1c, 0x15, 0x1c, 0x0f, 0x48, 0x20, 0x22, 0x01, 
+	0x02, 0x92, 0x21, 0x00, 0x1c, 0x06, 0xf7, 0xfb, 
+	0xfc, 0x2d, 0x4a, 0x1e, 0x1c, 0x28, 0xa1, 0x1e, 
+	0xf7, 0xff, 0xff, 0x4e, 0x28, 0x00, 0xd1, 0x02, 
+	0x1c, 0x28, 0xf7, 0xff, 0xff, 0xd3, 0x1c, 0x20, 
+	0x1c, 0x32, 0xa1, 0x1a, 0xf7, 0xff, 0xff, 0x44, 
+	0x28, 0x00, 0xd1, 0x02, 0x1c, 0x20, 0xf7, 0xff, 
+	0xff, 0xc9, 0x4a, 0x17, 0x1c, 0x38, 0x1c, 0x15, 
+	0xa1, 0x13, 0xf7, 0xff, 0xff, 0x39, 0x28, 0x00, 
+	0xd1, 0x02, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0xbe, 
+	0x1c, 0x30, 0x26, 0x01, 0x03, 0x36, 0x08, 0xf2, 
+	0x21, 0x00, 0x1c, 0x33, 0xf0, 0x00, 0xf8, 0x52, 
+	0x28, 0x00, 0xd0, 0x02, 0x1c, 0x20, 0xf7, 0xff, 
+	0xff, 0xb1, 0x22, 0x01, 0x02, 0x52, 0x21, 0x00, 
+	0x1c, 0x28, 0x1c, 0x33, 0xf0, 0x00, 0xf8, 0x46, 
+	0x28, 0x00, 0xd0, 0x02, 0x1c, 0x38, 0xf7, 0xff, 
+	0xff, 0xa5, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0xd3, 0x48, 0x2e, 0x08, 0xd3, 0xc8, 
+	0x77, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0xd3, 0x88, 0xb5, 0x90, 0x27, 0x03, 
+	0x4c, 0x09, 0x01, 0xb8, 0x19, 0x00, 0xf7, 0xff, 
+	0xfe, 0xa5, 0x37, 0x01, 0x2f, 0x10, 0xdb, 0xf8, 
+	0x27, 0x00, 0x01, 0xb8, 0x19, 0x00, 0xf7, 0xff, 
+	0xfe, 0x9d, 0x37, 0x01, 0x2f, 0x03, 0xdb, 0xf8, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0xd3, 0x48, 0xb5, 0xb0, 0x01, 0x80, 
+	0x1c, 0x0f, 0x4c, 0x0a, 0x19, 0x00, 0x1c, 0x05, 
+	0xf7, 0xff, 0xfe, 0x8c, 0x01, 0xb8, 0x19, 0x00, 
+	0x23, 0x01, 0x05, 0x1b, 0x68, 0xc1, 0x43, 0x19, 
+	0x60, 0xc1, 0x4b, 0x05, 0x40, 0x19, 0x60, 0xe9, 
+	0x69, 0x40, 0x61, 0x68, 0x1c, 0x38, 0xbc, 0xb0, 
+	0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0xd3, 0x48, 
+	0x00, 0x10, 0x8f, 0x03, 0xb4, 0xf0, 0x1c, 0x1f, 
+	0x68, 0xc3, 0x07, 0x9e, 0x0f, 0xb6, 0x25, 0x01, 
+	0x1c, 0x1c, 0x2e, 0x00, 0xd0, 0x13, 0x1c, 0x1e, 
+	0x0d, 0xf3, 0xd2, 0x10, 0x02, 0x2b, 0x42, 0x9a, 
+	0xd0, 0x09, 0x00, 0x5b, 0x42, 0x9a, 0xd0, 0x06, 
+	0x00, 0x5b, 0x42, 0x9a, 0xd1, 0x07, 0x27, 0x01, 
+	0x1d, 0xc1, 0x31, 0x1d, 0xe0, 0x06, 0x1e, 0x7e, 
+	0x4b, 0x08, 0x42, 0x9e, 0xd3, 0x02, 0x1c, 0x28, 
+	0xbc, 0xf0, 0x47, 0x70, 0x61, 0x01, 0x23, 0x0f, 
+	0x02, 0x1b, 0x43, 0x9c, 0x60, 0x41, 0x61, 0xc7, 
+	0x1c, 0x21, 0x43, 0x11, 0x60, 0xc1, 0x20, 0x00, 
+	0xbc, 0xf0, 0x47, 0x70, 0x00, 0xff, 0xff, 0xff, 
+	0xe2, 0x00, 0x01, 0x02, 0xe3, 0x31, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x17, 0xe3, 0xa0, 0x80, 0x00, 
+	0xe1, 0xb0, 0x98, 0x21, 0x01, 0xa0, 0x18, 0x01, 
+	0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x21, 
+	0x01, 0xa0, 0x14, 0x01, 0x02, 0x88, 0x80, 0x08, 
+	0xe1, 0xb0, 0x9e, 0x21, 0x01, 0xa0, 0x12, 0x01, 
+	0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x21, 
+	0x01, 0xa0, 0x11, 0x01, 0x02, 0x88, 0x80, 0x02, 
+	0xe1, 0xb0, 0x9f, 0xa1, 0x01, 0xa0, 0x10, 0x81, 
+	0x02, 0x88, 0x80, 0x01, 0xe0, 0x58, 0x98, 0xa6, 
+	0x81, 0xa0, 0x19, 0x31, 0x81, 0xa0, 0x88, 0xa6, 
+	0xe2, 0x68, 0x60, 0x20, 0xe1, 0x81, 0x16, 0x32, 
+	0xe1, 0xa0, 0x28, 0x12, 0x30, 0x40, 0x00, 0x09, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x56, 0x05, 0x01, 
+	0x3a, 0x00, 0x00, 0x16, 0xe1, 0xb0, 0x10, 0x02, 
+	0x01, 0xa0, 0xf0, 0x0e, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe3, 0xa0, 0x80, 0x20, 0xe1, 0xb0, 0x98, 0x21, 
+	0x01, 0xa0, 0x18, 0x01, 0x02, 0x88, 0x80, 0x10, 
+	0xe1, 0xb0, 0x9c, 0x21, 0x01, 0xa0, 0x14, 0x01, 
+	0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x21, 
+	0x01, 0xa0, 0x12, 0x01, 0x02, 0x88, 0x80, 0x04, 
+	0xe1, 0xb0, 0x9f, 0x21, 0x01, 0xa0, 0x11, 0x01, 
+	0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa1, 
+	0x01, 0xa0, 0x10, 0x81, 0x02, 0x88, 0x80, 0x01, 
+	0xe0, 0x58, 0x98, 0xa6, 0x81, 0xa0, 0x19, 0x31, 
+	0x30, 0x40, 0x00, 0x09, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0xa0, 0x88, 0xa6, 0xe2, 0x68, 0x90, 0x20, 
+	0xe1, 0xa0, 0x18, 0x11, 0xe1, 0x81, 0x19, 0x32, 
+	0xe1, 0xa0, 0x28, 0x12, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe2, 0x03, 0x31, 0x02, 0xe3, 0x34, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x17, 0xe3, 0xa0, 0x80, 0x00, 
+	0xe1, 0xb0, 0x98, 0x24, 0x01, 0xa0, 0x48, 0x04, 
+	0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x24, 
+	0x01, 0xa0, 0x44, 0x04, 0x02, 0x88, 0x80, 0x08, 
+	0xe1, 0xb0, 0x9e, 0x24, 0x01, 0xa0, 0x42, 0x04, 
+	0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x24, 
+	0x01, 0xa0, 0x41, 0x04, 0x02, 0x88, 0x80, 0x02, 
+	0xe1, 0xb0, 0x9f, 0xa4, 0x01, 0xa0, 0x40, 0x84, 
+	0x02, 0x88, 0x80, 0x01, 0xe0, 0x58, 0x98, 0xa6, 
+	0x81, 0xa0, 0x49, 0x34, 0x81, 0xa0, 0x88, 0xa6, 
+	0xe2, 0x68, 0x60, 0x20, 0xe1, 0x84, 0x46, 0x35, 
+	0xe1, 0xa0, 0x58, 0x15, 0x30, 0x43, 0x30, 0x09, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x56, 0x05, 0x01, 
+	0x3a, 0x00, 0x00, 0x16, 0xe1, 0xb0, 0x40, 0x05, 
+	0x01, 0xa0, 0xf0, 0x0e, 0xe3, 0xa0, 0x50, 0x00, 
+	0xe3, 0xa0, 0x80, 0x20, 0xe1, 0xb0, 0x98, 0x24, 
+	0x01, 0xa0, 0x48, 0x04, 0x02, 0x88, 0x80, 0x10, 
+	0xe1, 0xb0, 0x9c, 0x24, 0x01, 0xa0, 0x44, 0x04, 
+	0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x24, 
+	0x01, 0xa0, 0x42, 0x04, 0x02, 0x88, 0x80, 0x04, 
+	0xe1, 0xb0, 0x9f, 0x24, 0x01, 0xa0, 0x41, 0x04, 
+	0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa4, 
+	0x01, 0xa0, 0x40, 0x84, 0x02, 0x88, 0x80, 0x01, 
+	0xe0, 0x58, 0x98, 0xa6, 0x81, 0xa0, 0x49, 0x34, 
+	0x30, 0x43, 0x30, 0x09, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe1, 0xa0, 0x88, 0xa6, 0xe2, 0x68, 0x90, 0x20, 
+	0xe1, 0xa0, 0x48, 0x14, 0xe1, 0x84, 0x49, 0x35, 
+	0xe1, 0xa0, 0x58, 0x15, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe3, 0xa0, 0x20, 0x00, 0xe2, 0x16, 0x01, 0x02, 
+	0x12, 0x66, 0x10, 0x00, 0x01, 0xb0, 0x10, 0x06, 
+	0x03, 0xa0, 0x30, 0x00, 0x01, 0xa0, 0xf0, 0x0e, 
+	0xe3, 0xa0, 0x39, 0x01, 0xe3, 0x83, 0x30, 0x1e, 
+	0xe3, 0xa0, 0x60, 0x00, 0xe3, 0x31, 0x00, 0x00, 
+	0x01, 0xa0, 0x10, 0x02, 0x03, 0xa0, 0x20, 0x00, 
+	0x02, 0x43, 0x30, 0x20, 0xe3, 0xa0, 0x80, 0x00, 
+	0xe1, 0xb0, 0x98, 0x21, 0x01, 0xa0, 0x18, 0x01, 
+	0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x21, 
+	0x01, 0xa0, 0x14, 0x01, 0x02, 0x88, 0x80, 0x08, 
+	0xe1, 0xb0, 0x9e, 0x21, 0x01, 0xa0, 0x12, 0x01, 
+	0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x21, 
+	0x01, 0xa0, 0x11, 0x01, 0x02, 0x88, 0x80, 0x02, 
+	0xe1, 0xb0, 0x9f, 0xa1, 0x01, 0xa0, 0x10, 0x81, 
+	0x02, 0x88, 0x80, 0x01, 0xe2, 0x78, 0x90, 0x20, 
+	0xe1, 0x81, 0x19, 0x32, 0xe1, 0xa0, 0x28, 0x12, 
+	0xe0, 0x43, 0x30, 0x08, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe3, 0x34, 0x00, 0x00, 0x01, 0xa0, 0x40, 0x05, 
+	0x03, 0xa0, 0x50, 0x00, 0x02, 0x43, 0x30, 0x20, 
+	0xe3, 0xa0, 0x80, 0x00, 0xe1, 0xb0, 0x98, 0x24, 
+	0x01, 0xa0, 0x48, 0x04, 0x02, 0x88, 0x80, 0x10, 
+	0xe1, 0xb0, 0x9c, 0x24, 0x01, 0xa0, 0x44, 0x04, 
+	0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x24, 
+	0x01, 0xa0, 0x42, 0x04, 0x02, 0x88, 0x80, 0x04, 
+	0xe1, 0xb0, 0x9f, 0x24, 0x01, 0xa0, 0x41, 0x04, 
+	0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa4, 
+	0x01, 0xa0, 0x40, 0x84, 0x02, 0x88, 0x80, 0x01, 
+	0xe2, 0x78, 0x90, 0x20, 0xe1, 0x84, 0x49, 0x35, 
+	0xe1, 0xa0, 0x58, 0x15, 0xe0, 0x43, 0x30, 0x08, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x31, 0x00, 0x00, 
+	0x01, 0xa0, 0x10, 0x02, 0x03, 0xa0, 0x20, 0x00, 
+	0x02, 0x83, 0x30, 0x20, 0xe3, 0xa0, 0x80, 0x00, 
+	0xe1, 0xb0, 0x98, 0x21, 0x01, 0xa0, 0x18, 0x01, 
+	0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x21, 
+	0x01, 0xa0, 0x14, 0x01, 0x02, 0x88, 0x80, 0x08, 
+	0xe1, 0xb0, 0x9e, 0x21, 0x01, 0xa0, 0x12, 0x01, 
+	0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x21, 
+	0x01, 0xa0, 0x11, 0x01, 0x02, 0x88, 0x80, 0x02, 
+	0xe1, 0xb0, 0x9f, 0xa1, 0x01, 0xa0, 0x10, 0x81, 
+	0x02, 0x88, 0x80, 0x01, 0xe2, 0x78, 0x90, 0x20, 
+	0xe1, 0x81, 0x19, 0x32, 0xe1, 0xa0, 0x28, 0x12, 
+	0xe0, 0x83, 0x30, 0x08, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x7f, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xe1, 0x92, 0x80, 0x81, 0x0a, 0x00, 0x00, 0x05, 
+	0xe3, 0x11, 0x01, 0x01, 0x0a, 0x00, 0x00, 0x0c, 
+	0xe1, 0x95, 0x80, 0x84, 0x0a, 0x00, 0x00, 0x0a, 
+	0xe3, 0x14, 0x01, 0x01, 0x1a, 0x00, 0x00, 0x08, 
+	0xe3, 0x14, 0x01, 0x01, 0x0a, 0x00, 0x00, 0x28, 
+	0xe1, 0xa0, 0x00, 0x03, 0xe1, 0xa0, 0x10, 0x04, 
+	0xe1, 0xa0, 0x20, 0x05, 0xea, 0x00, 0x00, 0x04, 
+	0xe3, 0x11, 0x01, 0x01, 0x0a, 0x00, 0x00, 0x22, 
+	0xea, 0x00, 0x00, 0x01, 0xe3, 0x11, 0x01, 0x01, 
+	0x0a, 0x00, 0x00, 0x1f, 0xe3, 0x1b, 0x00, 0x01, 
+	0x1a, 0x00, 0x00, 0x16, 0xe3, 0x1b, 0x00, 0x02, 
+	0x1a, 0x00, 0x00, 0x0c, 0xe3, 0x1b, 0x0c, 0x02, 
+	0x1a, 0x00, 0x00, 0x05, 0xe3, 0xc0, 0x81, 0x03, 
+	0xe3, 0xa0, 0x90, 0xff, 0xe3, 0x89, 0x9c, 0x43, 
+	0xe1, 0x58, 0x00, 0x09, 0x33, 0xc2, 0x20, 0x01, 
+	0x03, 0x82, 0x20, 0x01, 0xe2, 0x00, 0x01, 0x03, 
+	0xe3, 0x80, 0x00, 0xff, 0xe3, 0x80, 0x0c, 0x7f, 
+	0xe1, 0x30, 0x00, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe2, 0x00, 0x01, 0x03, 0xe3, 0x80, 0x00, 0xff, 
+	0xe3, 0x80, 0x0c, 0x43, 0xe1, 0xa0, 0x25, 0xa2, 
+	0xe1, 0xa0, 0x25, 0x82, 0xe3, 0x81, 0x11, 0x02, 
+	0xe1, 0x30, 0x00, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
+	0xe2, 0x00, 0x01, 0x03, 0xe3, 0x80, 0x00, 0x7f, 
+	0xe3, 0x80, 0x09, 0x01, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe3, 0xc1, 0x10, 0xff, 0xe3, 0x81, 0x11, 0x02, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x80, 0x04, 0x61, 
+	0xe1, 0xa0, 0xf0, 0x0e, 0xb5, 0x80, 0x1c, 0x0f, 
+	0x29, 0x0f, 0xdd, 0x04, 0x11, 0x39, 0xf7, 0xff, 
+	0xff, 0xf9, 0x07, 0x3f, 0x0f, 0x3f, 0x2f, 0x09, 
+	0xdd, 0x02, 0x1d, 0xf9, 0x31, 0x29, 0xe0, 0x01, 
+	0x1d, 0xf9, 0x31, 0x50, 0x70, 0x01, 0x30, 0x01, 
+	0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 
+	0x1c, 0x07, 0x48, 0x0d, 0x68, 0x01, 0x29, 0x00, 
+	0xd1, 0x12, 0x4c, 0x0c, 0x1c, 0x20, 0xa1, 0x0c, 
+	0x22, 0x14, 0xf7, 0xfb, 0xf8, 0x67, 0x1d, 0xe0, 
+	0x30, 0x0b, 0x1c, 0x39, 0xf7, 0xff, 0xff, 0xda, 
+	0x21, 0x29, 0x70, 0x01, 0x21, 0x00, 0x70, 0x41, 
+	0x1c, 0x20, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x30, 0x08, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
+	0x2e, 0x08, 0x21, 0x4c, 0x2e, 0x08, 0xd7, 0x48, 
+	0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 
+	0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x28, 
+	0x30, 0x78, 0x00, 0x00, 0xb5, 0x90, 0x1c, 0x04, 
+	0x1c, 0x0f, 0xa0, 0x09, 0x21, 0x01, 0xf7, 0xff, 
+	0xf9, 0x87, 0x21, 0x00, 0x1c, 0x20, 0xf7, 0xff, 
+	0xf9, 0x83, 0x21, 0x02, 0x1c, 0x38, 0xf7, 0xff, 
+	0xf9, 0x7f, 0x20, 0x01, 0xf7, 0xfc, 0xfc, 0x80, 
+	0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x2a, 0x2a, 0x2a, 0x20, 0x66, 0x61, 0x74, 0x61, 
+	0x6c, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 
+	0x69, 0x6e, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 
+	0x69, 0x6d, 0x65, 0x20, 0x73, 0x79, 0x73, 0x74, 
+	0x65, 0x6d, 0x3a, 0x20, 0x00, 0x00, 0x00, 0x00, 
+	0xb5, 0xb0, 0x1c, 0x07, 0x68, 0xc0, 0x07, 0x81, 
+	0xd0, 0x1f, 0x23, 0x20, 0x40, 0x18, 0xd0, 0x01, 
+	0x6a, 0xbd, 0xe0, 0x04, 0x68, 0x79, 0x69, 0xba, 
+	0x18, 0x89, 0x69, 0x3a, 0x1a, 0x8d, 0x28, 0x00, 
+	0xd0, 0x02, 0x1c, 0x38, 0xf7, 0xff, 0xfb, 0xa2, 
+	0x68, 0xf8, 0x4b, 0x0a, 0x40, 0x18, 0x60, 0xf8, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfb, 0x67, 0x1c, 0x04, 
+	0x22, 0x00, 0x1c, 0x38, 0x1c, 0x29, 0xf0, 0x00, 
+	0xf8, 0x27, 0x1c, 0x20, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x20, 0x00, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xff, 
+	0xb5, 0xb0, 0x24, 0x00, 0x28, 0x00, 0xd0, 0x03, 
+	0xf7, 0xff, 0xff, 0xce, 0x1c, 0x04, 0xe0, 0x0c, 
+	0x27, 0x00, 0x4d, 0x08, 0x01, 0xb8, 0x19, 0x40, 
+	0xf7, 0xff, 0xff, 0xc6, 0x28, 0x00, 0xd0, 0x01, 
+	0x24, 0x00, 0x43, 0xe4, 0x37, 0x01, 0x2f, 0x10, 
+	0xdb, 0xf4, 0x1c, 0x20, 0xbc, 0xb0, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0xd3, 0x48, 
+	0xb5, 0xf7, 0x68, 0xc5, 0x69, 0x46, 0x1c, 0x0c, 
+	0x1c, 0x07, 0xb0, 0x81, 0x48, 0x3c, 0x40, 0x28, 
+	0xd0, 0x04, 0x1c, 0x38, 0xf7, 0xff, 0xf9, 0xaa, 
+	0x28, 0x00, 0xd0, 0x01, 0x20, 0x02, 0xe0, 0x6a, 
+	0x9a, 0x03, 0x2a, 0x00, 0xd0, 0x26, 0x2a, 0x01, 
+	0xd0, 0x0b, 0x2a, 0x02, 0xd1, 0x24, 0x1c, 0x30, 
+	0xf7, 0xff, 0xf9, 0xd4, 0x28, 0x00, 0xda, 0x09, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfa, 0xa7, 0x20, 0x01, 
+	0xe0, 0x59, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x8c, 
+	0x19, 0x04, 0xe0, 0x13, 0x68, 0x79, 0x6a, 0xfa, 
+	0x42, 0x8a, 0xd9, 0x00, 0x1c, 0x11, 0x69, 0xba, 
+	0x18, 0x89, 0x69, 0x3a, 0x1a, 0x89, 0x68, 0xfa, 
+	0x09, 0x92, 0xd3, 0x03, 0x6a, 0xba, 0x42, 0x8a, 
+	0xdd, 0x00, 0x1c, 0x11, 0x42, 0x81, 0xdd, 0x00, 
+	0x1c, 0x08, 0x18, 0x24, 0x2c, 0x00, 0xda, 0x03, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfa, 0x87, 0xe7, 0xcd, 
+	0x0b, 0xa8, 0xd3, 0x04, 0x68, 0x78, 0x6a, 0xf9, 
+	0x42, 0x81, 0xd2, 0x00, 0x62, 0xf8, 0x69, 0xb8, 
+	0x42, 0xa0, 0xdc, 0x10, 0x68, 0x79, 0x6a, 0xfa, 
+	0x42, 0x8a, 0xd9, 0x01, 0x1c, 0x13, 0xe0, 0x00, 
+	0x1c, 0x0b, 0x18, 0x1b, 0x69, 0x3e, 0x1b, 0x9b, 
+	0x42, 0xa3, 0xdb, 0x04, 0x6b, 0x3b, 0x93, 0x00, 
+	0x18, 0xc3, 0x42, 0xa3, 0xdc, 0x06, 0x20, 0x20, 
+	0x43, 0x28, 0x21, 0x00, 0x60, 0x39, 0x60, 0xb9, 
+	0x62, 0xbc, 0xe0, 0x14, 0x1a, 0x24, 0x08, 0xa8, 
+	0xd3, 0x03, 0x9b, 0x00, 0x1b, 0x18, 0x42, 0x40, 
+	0x60, 0xb8, 0x08, 0x68, 0xd3, 0x06, 0x42, 0x8a, 
+	0xd9, 0x00, 0x1c, 0x11, 0x1b, 0x88, 0x1b, 0x00, 
+	0x42, 0x40, 0x60, 0x38, 0x19, 0x30, 0x23, 0x20, 
+	0x43, 0x9d, 0x60, 0x78, 0x1c, 0x28, 0x4b, 0x05, 
+	0x40, 0x18, 0x60, 0xf8, 0x20, 0x00, 0xb0, 0x01, 
+	0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
+	0x00, 0x10, 0x00, 0x03, 0xff, 0xf7, 0xcf, 0xbf, 
+	0xb5, 0x00, 0x68, 0x8a, 0x68, 0x4b, 0x3a, 0x01, 
+	0xd5, 0x03, 0xf0, 0x00, 0xf8, 0x3f, 0xbc, 0x08, 
+	0x47, 0x18, 0x06, 0x00, 0x0e, 0x00, 0x70, 0x18, 
+	0x33, 0x01, 0x60, 0x8a, 0x60, 0x4b, 0xbc, 0x08, 
+	0x47, 0x18, 0x00, 0x00, 0xb5, 0xb0, 0x1c, 0x07, 
+	0x78, 0x00, 0x1c, 0x0c, 0x37, 0x01, 0x28, 0x00, 
+	0xd0, 0x0e, 0x25, 0x00, 0x43, 0xed, 0x1c, 0x21, 
+	0xf0, 0x00, 0xf8, 0xe8, 0x42, 0xa8, 0xd1, 0x03, 
+	0x1c, 0x28, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x78, 0x38, 0x37, 0x01, 0x28, 0x00, 0xd1, 0xf2, 
+	0x20, 0x00, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
+	0x68, 0xc1, 0x07, 0x8a, 0xd1, 0x04, 0x20, 0x01, 
+	0x49, 0x09, 0x60, 0x08, 0x42, 0x40, 0x47, 0x70, 
+	0x09, 0x8a, 0xd3, 0x01, 0x6a, 0x80, 0xe0, 0x04, 
+	0x68, 0x42, 0x69, 0x83, 0x18, 0xd2, 0x69, 0x00, 
+	0x1a, 0x10, 0x0d, 0x09, 0xd3, 0xf3, 0x28, 0x00, 
+	0xdd, 0xf1, 0x38, 0x01, 0x47, 0x70, 0x00, 0x00, 
+	0x2e, 0x08, 0x21, 0x30, 0xb5, 0xf0, 0x1c, 0x04, 
+	0x68, 0xc8, 0x1c, 0x0f, 0x4b, 0x5a, 0x40, 0x18, 
+	0x23, 0x01, 0x05, 0x9b, 0x43, 0x18, 0x60, 0xc8, 
+	0x09, 0x80, 0xd3, 0x02, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfa, 0x95, 0x06, 0x26, 0x0e, 0x36, 0x68, 0xb9, 
+	0x29, 0x00, 0xda, 0x12, 0x68, 0xf8, 0x0a, 0x82, 
+	0xd2, 0x0f, 0x22, 0x00, 0x43, 0xd2, 0x1a, 0x51, 
+	0x23, 0x09, 0x03, 0x5b, 0x43, 0x18, 0x60, 0xf8, 
+	0x60, 0xb9, 0x68, 0x79, 0x70, 0x0e, 0x31, 0x01, 
+	0x60, 0x79, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
+	0x47, 0x18, 0x68, 0xf8, 0x49, 0x49, 0x40, 0x01, 
+	0x29, 0x02, 0xd0, 0x03, 0x1c, 0x38, 0xf7, 0xff, 
+	0xf9, 0xcd, 0xe0, 0x7f, 0x49, 0x46, 0x40, 0x01, 
+	0x23, 0x01, 0x03, 0xdb, 0x42, 0x99, 0xd1, 0x0b, 
+	0x22, 0x02, 0x21, 0x00, 0x1c, 0x38, 0xf7, 0xff, 
+	0xfe, 0xfb, 0x68, 0xf8, 0x09, 0x80, 0xd3, 0x02, 
+	0x1c, 0x38, 0xf7, 0xff, 0xfa, 0x63, 0x68, 0xf8, 
+	0x25, 0x09, 0x03, 0x6d, 0x43, 0x05, 0x60, 0xfd, 
+	0x69, 0x38, 0x28, 0x00, 0xd1, 0x2f, 0x1c, 0x38, 
+	0xf7, 0xff, 0xf8, 0xa0, 0x28, 0x00, 0xd0, 0x18, 
+	0x68, 0xf8, 0x0a, 0x00, 0x07, 0x80, 0xd0, 0x09, 
+	0x69, 0xf8, 0xf7, 0xff, 0xf9, 0x7d, 0x61, 0x38, 
+	0x60, 0x78, 0x23, 0x01, 0x02, 0xdb, 0x43, 0x1d, 
+	0x68, 0xf8, 0xe0, 0x1a, 0x1d, 0xf8, 0x30, 0x1d, 
+	0x61, 0x38, 0x60, 0x78, 0x20, 0x01, 0x23, 0x01, 
+	0x02, 0x9b, 0x43, 0x1d, 0x61, 0xf8, 0x60, 0xfd, 
+	0xe0, 0x11, 0x69, 0xf8, 0xf7, 0xff, 0xf9, 0x68, 
+	0x61, 0x38, 0x60, 0x78, 0x23, 0x01, 0x02, 0xdb, 
+	0x43, 0x1d, 0x68, 0xf8, 0x43, 0x28, 0x60, 0xf8, 
+	0x0a, 0x29, 0x07, 0x89, 0xd1, 0x03, 0x08, 0xdb, 
+	0x43, 0x1d, 0x43, 0x28, 0x60, 0xf8, 0x0a, 0x68, 
+	0xd3, 0x19, 0x68, 0x78, 0x6a, 0xf9, 0x69, 0x3c, 
+	0x42, 0x81, 0xd9, 0x00, 0x1c, 0x08, 0x1b, 0x01, 
+	0xd0, 0x05, 0x1c, 0x20, 0x1c, 0x3a, 0xf7, 0xff, 
+	0xf9, 0x7d, 0x28, 0x00, 0xd1, 0x26, 0x1c, 0x60, 
+	0x62, 0xf8, 0x60, 0x78, 0x69, 0xf8, 0x1e, 0x41, 
+	0x63, 0x38, 0x60, 0xb9, 0x70, 0x26, 0x1c, 0x30, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x69, 0x38, 
+	0x68, 0x7a, 0x70, 0x14, 0x32, 0x01, 0x60, 0x7a, 
+	0x6a, 0xf9, 0x42, 0x91, 0xd8, 0x00, 0x1c, 0x11, 
+	0x1a, 0x09, 0x69, 0xfa, 0x63, 0x3a, 0x0a, 0xeb, 
+	0xd2, 0x03, 0x2e, 0x0a, 0xd0, 0x01, 0x42, 0x8a, 
+	0xdc, 0x0d, 0x62, 0xf8, 0x22, 0x00, 0x60, 0x78, 
+	0x60, 0xba, 0x1c, 0x3a, 0xf7, 0xff, 0xf9, 0x56, 
+	0x28, 0x00, 0xd0, 0x04, 0x20, 0x00, 0x43, 0xc0, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x30, 
+	0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0xff, 0xf7, 0xff, 0xff, 0x00, 0x00, 0x10, 0x8a, 
+	0x00, 0x00, 0xa0, 0x10, 0xb5, 0x00, 0x68, 0x8a, 
+	0x68, 0x4b, 0x3a, 0x01, 0xd5, 0x03, 0xf7, 0xff, 
+	0xff, 0x39, 0xbc, 0x08, 0x47, 0x18, 0x06, 0x00, 
+	0x0e, 0x00, 0x70, 0x18, 0x33, 0x01, 0x60, 0x8a, 
+	0x60, 0x4b, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
+	0x47, 0x78, 0x46, 0xc0, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe2, 0x8f, 0xe0, 0x00, 0xef, 0x12, 0x34, 0x56, 
+	0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe1, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x00, 0x18, 
+	0xe5, 0x9f, 0x10, 0x18, 0xef, 0x12, 0x34, 0x56, 
+	0xea, 0xff, 0xff, 0xfe, 0xe1, 0xa0, 0x10, 0x00, 
+	0xe3, 0xa0, 0x00, 0x18, 0xe5, 0x9f, 0x10, 0x08, 
+	0xef, 0x12, 0x34, 0x56, 0xea, 0xff, 0xff, 0xfe, 
+	0x00, 0x02, 0x00, 0x26, 0x00, 0x02, 0x00, 0x23, 
+	0xe8, 0xb0, 0x01, 0xf0, 0xe8, 0xa1, 0x01, 0xf0, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe8, 0xb0, 0x01, 0xf8, 0xe8, 0xa1, 0x01, 0xf8, 
+	0xe2, 0x52, 0x20, 0xbc, 0x1a, 0xff, 0xff, 0xed, 
+	0xe8, 0xbd, 0x01, 0xf8, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe4, 0x90, 0x40, 0x04, 0xe1, 0x85, 0x54, 0x24, 
+	0xe4, 0x81, 0x50, 0x04, 0xe1, 0xa0, 0x5c, 0x04, 
+	0xe2, 0x53, 0x30, 0x04, 0x1a, 0xff, 0xff, 0xf9, 
+	0xe5, 0x9f, 0xf0, 0x88, 0xe4, 0x90, 0x40, 0x04, 
+	0xe1, 0x85, 0x5c, 0x24, 0xe4, 0x81, 0x50, 0x04, 
+	0xe1, 0xa0, 0x54, 0x04, 0xe2, 0x53, 0x30, 0x04, 
+	0x1a, 0xff, 0xff, 0xf9, 0xe5, 0x9f, 0xf0, 0x70, 
+	0xe4, 0x90, 0x40, 0x04, 0xe1, 0xa0, 0x58, 0x24, 
+	0xe0, 0xc1, 0x50, 0xb2, 0xe0, 0xc1, 0x40, 0xb2, 
+	0xe2, 0x53, 0x30, 0x04, 0x1a, 0xff, 0xff, 0xf9, 
+	0xe5, 0x9f, 0xf0, 0x4c, 0xe2, 0x03, 0x40, 0x0f, 
+	0xe0, 0x53, 0x40, 0x04, 0x0a, 0x00, 0x00, 0x0a, 
+	0xe9, 0x2d, 0x00, 0xc4, 0xe1, 0xa0, 0x20, 0x03, 
+	0xe1, 0xa0, 0x30, 0x04, 0xe8, 0xb0, 0x00, 0xf0, 
+	0xe8, 0xa1, 0x00, 0xf0, 0xe2, 0x53, 0x30, 0x10, 
+	0x1a, 0xff, 0xff, 0xfb, 0xe1, 0xa0, 0x30, 0x02, 
+	0xe8, 0xbd, 0x00, 0xc4, 0xe2, 0x13, 0x30, 0x0f, 
+	0x0a, 0x00, 0x00, 0x03, 0xe4, 0x90, 0x40, 0x04, 
+	0xe4, 0x81, 0x40, 0x04, 0xe2, 0x53, 0x30, 0x04, 
+	0x1a, 0xff, 0xff, 0xfb, 0xe5, 0x9f, 0xf0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x02, 0x38, 0x58, 
+	0x2e, 0x02, 0x37, 0xfc, 0x2e, 0x02, 0x38, 0x2c, 
+	0xe9, 0x2d, 0x00, 0x38, 0xe3, 0x52, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x3f, 0xe3, 0xe0, 0x30, 0x03, 
+	0xe0, 0x12, 0x30, 0x03, 0x0a, 0x00, 0x00, 0x30, 
+	0xe2, 0x10, 0x30, 0x01, 0x0a, 0x00, 0x00, 0x03, 
+	0xe4, 0xd0, 0x30, 0x01, 0xe4, 0xc1, 0x30, 0x01, 
+	0xe2, 0x52, 0x20, 0x01, 0x0a, 0x00, 0x00, 0x36, 
+	0xe2, 0x10, 0x30, 0x02, 0x0a, 0x00, 0x00, 0x05, 
+	0xe0, 0xd0, 0x30, 0xb2, 0xe1, 0xa0, 0x44, 0x23, 
+	0xe4, 0xc1, 0x40, 0x01, 0xe4, 0xc1, 0x30, 0x01, 
+	0xe2, 0x52, 0x20, 0x02, 0x0a, 0x00, 0x00, 0x2e, 
+	0xe3, 0xe0, 0x30, 0x03, 0xe0, 0x12, 0x30, 0x03, 
+	0x0a, 0x00, 0x00, 0x1f, 0xe2, 0x11, 0x40, 0x01, 
+	0x0a, 0x00, 0x00, 0x19, 0xe2, 0x11, 0x40, 0x02, 
+	0x1a, 0x00, 0x00, 0x0b, 0xe2, 0x41, 0x10, 0x01, 
+	0xe5, 0x91, 0x50, 0x00, 0xe1, 0xa0, 0x5c, 0x25, 
+	0xe1, 0xa0, 0x5c, 0x05, 0xe5, 0x9f, 0xf0, 0xa8, 
+	0xe5, 0x91, 0x40, 0x00, 0xe1, 0xa0, 0x44, 0x04, 
+	0xe1, 0xa0, 0x44, 0x24, 0xe1, 0x85, 0x50, 0x04, 
+	0xe5, 0x81, 0x50, 0x00, 0xe2, 0x81, 0x10, 0x01, 
+	0xea, 0x00, 0x00, 0x0f, 0xe2, 0x41, 0x10, 0x03, 
+	0xe5, 0x91, 0x50, 0x00, 0xe1, 0xa0, 0x54, 0x25, 
+	0xe1, 0xa0, 0x54, 0x05, 0xe5, 0x9f, 0xf0, 0x7c, 
+	0xe5, 0x91, 0x40, 0x00, 0xe1, 0xa0, 0x4c, 0x04, 
+	0xe1, 0xa0, 0x4c, 0x24, 0xe1, 0x85, 0x50, 0x04, 
+	0xe5, 0x81, 0x50, 0x00, 0xe2, 0x81, 0x10, 0x03, 
+	0xea, 0x00, 0x00, 0x03, 0xe2, 0x11, 0x40, 0x02, 
+	0x0a, 0x00, 0x00, 0x00, 0xe5, 0x9f, 0xf0, 0x5c, 
+	0xe5, 0x9f, 0xf0, 0x48, 0xe2, 0x12, 0x20, 0x03, 
+	0x0a, 0x00, 0x00, 0x09, 0xe4, 0xd0, 0x40, 0x01, 
+	0xe4, 0xc1, 0x40, 0x01, 0xe2, 0x52, 0x20, 0x01, 
+	0x0a, 0x00, 0x00, 0x05, 0xe4, 0xd0, 0x40, 0x01, 
+	0xe4, 0xc1, 0x40, 0x01, 0xe2, 0x52, 0x20, 0x01, 
+	0x0a, 0x00, 0x00, 0x01, 0xe4, 0xd0, 0x40, 0x01, 
+	0xe4, 0xc1, 0x40, 0x01, 0xe8, 0xbd, 0x00, 0x38, 
+	0xe3, 0x8e, 0xe0, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe9, 0x2d, 0x01, 0xf8, 0xe5, 0x9f, 0xf0, 0x18, 
+	0x2e, 0x02, 0x36, 0xcc, 0x2e, 0x02, 0x37, 0x04, 
+	0x2e, 0x02, 0x37, 0x20, 0x2e, 0x02, 0x36, 0xcc, 
+	0x2e, 0x02, 0x36, 0xe8, 0x2e, 0x02, 0x37, 0x20, 
+	0x2e, 0x02, 0x37, 0x04, 0x2e, 0x02, 0x36, 0x7c, 
+	0xe9, 0x2d, 0x5f, 0xff, 0xe1, 0x4f, 0x00, 0x00, 
+	0xe9, 0x2d, 0x00, 0x01, 0xe2, 0x8f, 0x00, 0x01, 
+	0xe1, 0x2f, 0xff, 0x10, 0x21, 0xff, 0x48, 0x37, 
+	0x68, 0x00, 0x40, 0x52, 0x42, 0x08, 0xd1, 0x0b, 
+	0x32, 0x20, 0x0a, 0x00, 0x42, 0x08, 0xd1, 0x07, 
+	0x32, 0x20, 0x0a, 0x00, 0x42, 0x08, 0xd1, 0x03, 
+	0x0a, 0x00, 0x42, 0x08, 0xd0, 0x23, 0x32, 0x20, 
+	0x21, 0x0f, 0x42, 0x08, 0xd1, 0x01, 0x32, 0x10, 
+	0x09, 0x00, 0x21, 0x01, 0x42, 0x08, 0xd1, 0x08, 
+	0x1d, 0x12, 0x21, 0x02, 0x42, 0x08, 0xd1, 0x04, 
+	0x1d, 0x12, 0x21, 0x04, 0x42, 0x08, 0xd1, 0x00, 
+	0x1d, 0x12, 0x48, 0x25, 0x68, 0x00, 0xb4, 0x01, 
+	0x08, 0x90, 0x21, 0x01, 0x40, 0x81, 0x48, 0x21, 
+	0x60, 0x01, 0x48, 0x1d, 0x58, 0x82, 0x48, 0x01, 
+	0x46, 0x86, 0x47, 0x10, 0x2e, 0x02, 0x39, 0x35, 
+	0xbc, 0x02, 0x48, 0x1d, 0x60, 0x01, 0x00, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe8, 0xbd, 0x00, 0x01, 
+	0xe1, 0x69, 0xf0, 0x00, 0xe8, 0xbd, 0x5f, 0xff, 
+	0xe2, 0x5e, 0xf0, 0x04, 0x48, 0x12, 0x21, 0x20, 
+	0x4a, 0x12, 0x60, 0x02, 0x1d, 0x00, 0x1e, 0x49, 
+	0xd1, 0xfb, 0x20, 0x00, 0x47, 0x70, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x46, 0x73, 0x49, 0x0e, 
+	0x60, 0x08, 0x20, 0x00, 0x47, 0x18, 0x46, 0x73, 
+	0x49, 0x0c, 0x60, 0x08, 0x20, 0x00, 0x47, 0x18, 
+	0x46, 0x73, 0x48, 0x0b, 0x68, 0x00, 0x47, 0x18, 
+	0x46, 0x73, 0x49, 0x09, 0x60, 0x08, 0x47, 0x18, 
+	0x46, 0x73, 0x4a, 0x03, 0x00, 0x80, 0x18, 0x12, 
+	0x68, 0x10, 0x60, 0x11, 0x47, 0x18, 0x00, 0x00, 
+	0x2e, 0x08, 0x3b, 0xa4, 0x2e, 0x02, 0x39, 0x64, 
+	0x66, 0x00, 0x00, 0x10, 0x66, 0x00, 0x00, 0x14, 
+	0x66, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x1c, 
+	0xe9, 0x2d, 0x5f, 0xf0, 0xe1, 0x4f, 0x40, 0x00, 
+	0xe3, 0x14, 0x00, 0x20, 0x11, 0x5e, 0x40, 0xb2, 
+	0x13, 0xc4, 0x4c, 0xff, 0x05, 0x1e, 0x40, 0x04, 
+	0x03, 0xc4, 0x44, 0xff, 0xe5, 0x9f, 0x50, 0x14, 
+	0xe7, 0x95, 0x51, 0x04, 0xe5, 0x9f, 0xe0, 0x00, 
+	0xe1, 0x2f, 0xff, 0x15, 0x2e, 0x02, 0x39, 0xe4, 
+	0xe8, 0xbd, 0x5f, 0xf0, 0xe1, 0xb0, 0xf0, 0x0e, 
+	0x2e, 0x08, 0x20, 0x68, 0x00, 0x00, 0x00, 0xc0, 
+	0x46, 0x73, 0x47, 0x78, 0xe1, 0x0f, 0x10, 0x00, 
+	0xe3, 0x81, 0x00, 0x80, 0xe1, 0x29, 0xf0, 0x00, 
+	0xe2, 0x01, 0x00, 0x80, 0xe1, 0x2f, 0xff, 0x13, 
+	0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x4f, 0x10, 0x00, 0xe3, 0x81, 0x00, 0x80, 
+	0xe1, 0x69, 0xf0, 0x00, 0xe2, 0x01, 0x00, 0x80, 
+	0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0x0f, 0x10, 0x00, 
+	0xe3, 0x81, 0x00, 0x40, 0xe1, 0x29, 0xf0, 0x00, 
+	0xe2, 0x01, 0x00, 0x40, 0xe1, 0x2f, 0xff, 0x13, 
+	0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x4f, 0x10, 0x00, 0xe3, 0x81, 0x00, 0x40, 
+	0xe1, 0x69, 0xf0, 0x00, 0xe2, 0x01, 0x00, 0x40, 
+	0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0x0f, 0x00, 0x00, 
+	0xe3, 0xc0, 0x00, 0x80, 0xe1, 0x29, 0xf0, 0x00, 
+	0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x13, 
+	0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x4f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x80, 
+	0xe1, 0x69, 0xf0, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe1, 0x0f, 0x00, 0x00, 
+	0xe3, 0xc0, 0x00, 0x40, 0xe1, 0x29, 0xf0, 0x00, 
+	0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x13, 
+	0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
+	0xe1, 0x4f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x40, 
+	0xe1, 0x69, 0xf0, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
+	0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x49, 0x02, 
+	0x60, 0x08, 0x20, 0x00, 0x46, 0x9f, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x00, 0x46, 0x73, 0x49, 0x02, 
+	0x60, 0x08, 0x20, 0x00, 0x46, 0x9f, 0x00, 0x00, 
+	0x66, 0x00, 0x00, 0x04, 0x46, 0x73, 0x48, 0x03, 
+	0x68, 0x00, 0x47, 0x18, 0x46, 0x73, 0x49, 0x01, 
+	0x60, 0x08, 0x47, 0x18, 0x66, 0x00, 0x00, 0x08, 
+	0x00, 0x00, 0x46, 0x6c, 0x00, 0x00, 0x10, 0x00, 
+	0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x50, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
+	0x00, 0x00, 0x02, 0xd0, 0x00, 0x00, 0x02, 0xd0, 
+	0x00, 0x00, 0x00, 0x15, 0x00, 0x03, 0xb1, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x90, 0x85, 
+	0x00, 0x00, 0xa6, 0xee, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x02, 0xd0, 0x00, 0x00, 0x02, 0x40, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xa0, 
+	0x00, 0x08, 0x08, 0x28, 0x00, 0x08, 0x88, 0x68, 
+	0x00, 0x08, 0xa0, 0x98, 0x00, 0x08, 0x88, 0x68, 
+	0x00, 0x08, 0x28, 0x98, 0x00, 0x08, 0xac, 0xf4, 
+	0x00, 0x08, 0xb8, 0x7c, 0x00, 0x02, 0x02, 0x88, 
+	0x00, 0x02, 0x08, 0x22, 0x00, 0x02, 0x88, 0xaa, 
+	0x00, 0x02, 0x22, 0xaa, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x24, 
+	0x00, 0x04, 0x04, 0x24, 0x00, 0x04, 0x28, 0x6c, 
+	0x00, 0x04, 0x28, 0x6c, 0x00, 0x01, 0x10, 0x44, 
+	0x00, 0x01, 0x20, 0x44, 0x00, 0x01, 0x11, 0xaa, 
+	0x00, 0x01, 0x88, 0x55, 0x00, 0x01, 0x44, 0xaa, 
+	0x00, 0x01, 0x44, 0x55, 0x00, 0x20, 0x80, 0xa0, 
+	0x00, 0x20, 0x80, 0xc0, 0x00, 0x20, 0x20, 0xa0, 
+	0x00, 0x20, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 
+	0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x13, 0x16, 
+	0x1a, 0x1b, 0x1d, 0x22, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x13, 0x16, 
+	0x1a, 0x1b, 0x1d, 0x22, 0x10, 0x10, 0x16, 0x18, 
+	0x1b, 0x1d, 0x22, 0x25, 0x13, 0x16, 0x1a, 0x1b, 
+	0x1d, 0x22, 0x22, 0x26, 0x16, 0x16, 0x1a, 0x1b, 
+	0x1d, 0x22, 0x25, 0x28, 0x16, 0x1a, 0x1b, 0x1d, 
+	0x20, 0x23, 0x28, 0x30, 0x1a, 0x1b, 0x1d, 0x20, 
+	0x23, 0x28, 0x30, 0x3a, 0x1a, 0x1b, 0x1d, 0x22, 
+	0x26, 0x2e, 0x38, 0x45, 0x1b, 0x1d, 0x23, 0x26, 
+	0x2e, 0x38, 0x45, 0x53, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xd6, 0x00, 
+	0x00, 0x1b, 0x08, 0x00, 0x00, 0x1f, 0xde, 0x00, 
+	0x00, 0x00, 0x50, 0x00, 0x00, 0x09, 0xce, 0x00, 
+	0x00, 0x13, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0x05, 0x28, 0x20, 0x01, 0x00, 0x00, 0x02, 0x40, 
+	0x71, 0x01, 0x00, 0x68, 0xe0, 0x7f, 0xb0, 0x7f, 
+	0x60, 0x40, 0xe0, 0x1d, 0x90, 0x10, 0xb4, 0x81, 
+	0xe8, 0xc0, 0xe0, 0xc2, 0x90, 0x18, 0x00, 0x8a, 
+	0x70, 0xc0, 0x0f, 0x87, 0xe3, 0xe8, 0xc0, 0x00, 
+	0x70, 0x40, 0xe0, 0x01, 0xe0, 0x86, 0x00, 0x26, 
+	0xd0, 0x28, 0xe0, 0x0e, 0xd0, 0x0e, 0x0f, 0x0b, 
+	0x70, 0x1d, 0xe0, 0x67, 0x0f, 0x87, 0x0f, 0x87, 
+	0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x02, 0x20, 
+	0xd0, 0x01, 0xe0, 0x25, 0x0f, 0x45, 0x6f, 0x81, 
+	0xdf, 0xa6, 0xe0, 0x36, 0xe1, 0x30, 0xa0, 0x37, 
+	0xc0, 0x00, 0xe0, 0x26, 0x00, 0x33, 0xdf, 0x00, 
+	0xe0, 0x32, 0x0f, 0xc5, 0x0f, 0x87, 0x00, 0x27, 
+	0xd0, 0x4c, 0xe0, 0x21, 0x00, 0x33, 0xdf, 0x60, 
+	0x00, 0x27, 0xd0, 0x56, 0x60, 0x01, 0xe0, 0x2d, 
+	0x03, 0xa0, 0xd0, 0x41, 0xa0, 0x78, 0x00, 0x60, 
+	0xd0, 0x41, 0xa0, 0x77, 0x00, 0x22, 0xd0, 0x58, 
+	0xa0, 0x76, 0x00, 0x21, 0xd0, 0x7c, 0x00, 0x4a, 
+	0xd0, 0x72, 0x70, 0x40, 0x00, 0x06, 0x0f, 0x87, 
+	0x00, 0x22, 0xdc, 0xf8, 0xf0, 0x4a, 0xe1, 0x70, 
+	0x07, 0xef, 0xdd, 0xbf, 0x4f, 0x36, 0x1d, 0x99, 
+	0x4d, 0x80, 0x10, 0x18, 0xdd, 0x50, 0x60, 0x35, 
+	0xdd, 0x72, 0xdd, 0x10, 0x3d, 0xb4, 0xec, 0x57, 
+	0x2d, 0x36, 0x1d, 0x03, 0xbd, 0x04, 0xe4, 0x2b, 
+	0x01, 0x46, 0x00, 0x06, 0xac, 0xf6, 0x80, 0x3f, 
+	0x0d, 0x0a, 0x10, 0x02, 0x7d, 0x40, 0x10, 0x1e, 
+	0xb0, 0x20, 0xbc, 0xe0, 0x00, 0x06, 0x00, 0xc6, 
+	0xe0, 0x52, 0xb7, 0x60, 0xb7, 0x60, 0xc0, 0x5d, 
+	0x30, 0x5f, 0xe4, 0x72, 0xc7, 0x5e, 0x00, 0xed, 
+	0xd0, 0x28, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
+	0xc0, 0x1d, 0x30, 0x1c, 0xf8, 0x7e, 0x00, 0x21, 
+	0xd0, 0x01, 0x00, 0x26, 0xd0, 0x78, 0xa0, 0x38, 
+	0x80, 0x3f, 0x70, 0x01, 0xb0, 0x3f, 0x60, 0x01, 
+	0x0f, 0x87, 0x80, 0x34, 0x03, 0xef, 0xd8, 0x3f, 
+	0xa8, 0x38, 0x01, 0x35, 0xdc, 0x33, 0xe0, 0x46, 
+	0xc0, 0x1c, 0xe4, 0xa5, 0x97, 0x2e, 0x30, 0x1c, 
+	0xe8, 0x8e, 0x00, 0x21, 0xd0, 0x00, 0xa0, 0x38, 
+	0xc0, 0x5d, 0x00, 0x23, 0xd0, 0x00, 0x30, 0x40, 
+	0x30, 0x5e, 0xe4, 0x99, 0x20, 0x5e, 0xc0, 0x01, 
+	0x30, 0x1c, 0xec, 0xa4, 0xe0, 0x9d, 0x20, 0x5f, 
+	0xc0, 0x1c, 0x30, 0x01, 0xf4, 0xa5, 0xc0, 0x1c, 
+	0x30, 0x1d, 0xec, 0xa4, 0xe4, 0xa5, 0x90, 0x38, 
+	0x00, 0x1b, 0xe8, 0xa5, 0xa0, 0x66, 0xb1, 0x3f, 
+	0xe4, 0xb3, 0xe8, 0xb1, 0xc0, 0x4b, 0x30, 0x44, 
+	0xf8, 0xb3, 0x60, 0x45, 0xb1, 0x7c, 0x01, 0x20, 
+	0xd0, 0x00, 0xa0, 0x05, 0x80, 0x40, 0x72, 0xc5, 
+	0x00, 0x06, 0x90, 0x55, 0xd0, 0x01, 0x00, 0x40, 
+	0xa0, 0x55, 0x0f, 0x87, 0x01, 0x46, 0x00, 0x06, 
+	0x03, 0xef, 0xd0, 0x3f, 0xa0, 0x38, 0xb0, 0x01, 
+	0xa0, 0x37, 0x80, 0x3f, 0x82, 0x34, 0x80, 0x3f, 
+	0xf2, 0x1a, 0x80, 0x34, 0x80, 0x3f, 0xf2, 0x1a, 
+	0xd8, 0x00, 0xd8, 0x40, 0xd8, 0x80, 0xd8, 0xc0, 
+	0xd9, 0x00, 0xd9, 0x40, 0xd9, 0x80, 0xd9, 0xc0, 
+	0xda, 0x00, 0xda, 0x40, 0xda, 0x80, 0xda, 0xc0, 
+	0xdb, 0x00, 0xdb, 0x40, 0xdb, 0x80, 0xdb, 0xc0, 
+	0xdc, 0x00, 0xdc, 0x40, 0xdc, 0x80, 0xdc, 0xc0, 
+	0xdd, 0x00, 0xdd, 0x40, 0xdd, 0x80, 0xdd, 0xc0, 
+	0xde, 0x00, 0xde, 0x40, 0xde, 0x80, 0xde, 0xc0, 
+	0xdf, 0x00, 0xdf, 0x40, 0xdf, 0x80, 0xdf, 0xc0, 
+	0xde, 0x80, 0xde, 0xc1, 0x00, 0x28, 0xd0, 0x60, 
+	0x6e, 0x81, 0x80, 0x00, 0x80, 0x05, 0x00, 0xe3, 
+	0xd1, 0x88, 0x00, 0x73, 0xd5, 0x80, 0x60, 0x06, 
+	0xb1, 0xbc, 0x00, 0xfa, 0xd0, 0x80, 0x60, 0x06, 
+	0x00, 0x26, 0xd0, 0x6c, 0x6e, 0x81, 0x04, 0xf4, 
+	0xdc, 0x00, 0x00, 0xee, 0xd1, 0x94, 0x60, 0x06, 
+	0x00, 0xed, 0xd0, 0x50, 0x6e, 0x81, 0x00, 0x22, 
+	0xd0, 0x70, 0x6e, 0x81, 0x00, 0xee, 0xd0, 0x74, 
+	0x6e, 0x81, 0xd0, 0x4c, 0x6e, 0x81, 0xd0, 0x02, 
+	0x00, 0xef, 0xd0, 0x6c, 0x60, 0x01, 0xd0, 0x03, 
+	0x00, 0xef, 0xd0, 0x70, 0x60, 0x01, 0x00, 0xe0, 
+	0xd0, 0x48, 0xd0, 0x02, 0x60, 0x01, 0x00, 0x32, 
+	0xdf, 0x20, 0xa0, 0x1c, 0x00, 0x21, 0xd0, 0x60, 
+	0xa0, 0x76, 0x00, 0x34, 0xd5, 0x70, 0x80, 0x3f, 
+	0x00, 0x23, 0xd0, 0x5c, 0x00, 0x4a, 0xd0, 0x72, 
+	0x70, 0x40, 0x00, 0x06, 0x00, 0x22, 0xd1, 0xa4, 
+	0x6e, 0xc6, 0xd0, 0x58, 0x6e, 0xc1, 0xd0, 0xc9, 
+	0x00, 0xed, 0xd0, 0x54, 0x60, 0xc1, 0x00, 0x22, 
+	0xd0, 0x40, 0x60, 0xc1, 0x00, 0x22, 0xd0, 0x60, 
+	0x60, 0xc1, 0x82, 0x34, 0x80, 0x3f, 0xd6, 0xd9, 
+	0x01, 0x2d, 0xd6, 0x0c, 0x16, 0x08, 0xd0, 0x55, 
+	0xd0, 0x2c, 0x60, 0x40, 0xd0, 0x70, 0x00, 0xfb, 
+	0xd1, 0x00, 0x60, 0x01, 0x00, 0x2b, 0xd4, 0x10, 
+	0x00, 0x29, 0xd4, 0x40, 0x00, 0x2b, 0xd0, 0x90, 
+	0xc0, 0xc2, 0xd1, 0x18, 0xd1, 0x44, 0xa1, 0x50, 
+	0x00, 0x21, 0xd0, 0xb6, 0xd0, 0xd7, 0x00, 0x29, 
+	0xd0, 0x04, 0x64, 0x00, 0xb0, 0x3c, 0x64, 0x40, 
+	0x80, 0x34, 0x80, 0x3f, 0xd0, 0x40, 0x00, 0x35, 
+	0xd0, 0x00, 0x60, 0x01, 0xd0, 0x48, 0x6e, 0x81, 
+	0xd0, 0x44, 0x6e, 0x81, 0x00, 0x64, 0xd1, 0x80, 
+	0x6e, 0x86, 0x01, 0x3c, 0xd2, 0x39, 0xe0, 0x46, 
+	0xd0, 0x00, 0xd0, 0x40, 0xd0, 0x80, 0xd0, 0xc0, 
+	0xd1, 0x00, 0xd1, 0x40, 0xd1, 0x80, 0xd1, 0xc0, 
+	0xd2, 0x00, 0xd2, 0x40, 0xd2, 0x80, 0xd2, 0xc0, 
+	0xd3, 0x00, 0xd3, 0x40, 0xd3, 0x80, 0xd3, 0xc0, 
+	0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 
+	0xd5, 0x00, 0xd5, 0x40, 0xd5, 0x80, 0xd5, 0xc0, 
+	0xd6, 0x00, 0xd6, 0x40, 0xd6, 0x80, 0xd6, 0xc0, 
+	0xd7, 0x00, 0xd7, 0x40, 0xd7, 0x80, 0xd7, 0xc0, 
+	0x0f, 0xc5, 0x50, 0x00, 0x01, 0x46, 0x00, 0x06, 
+	0xde, 0x80, 0xde, 0xc1, 0x03, 0x2f, 0xd0, 0x33, 
+	0xa0, 0x38, 0xb0, 0x01, 0xa0, 0x37, 0x80, 0x3f, 
+	0x08, 0x20, 0xdf, 0x00, 0x82, 0x34, 0x80, 0x3f, 
+	0x00, 0xee, 0xd0, 0x08, 0x77, 0xc0, 0xb0, 0x04, 
+	0x77, 0x80, 0xb0, 0x04, 0xc0, 0x5f, 0x30, 0x5e, 
+	0x60, 0x40, 0xd7, 0x00, 0xb7, 0x01, 0x80, 0x34, 
+	0x80, 0x3f, 0x00, 0x60, 0xd0, 0x80, 0x00, 0xec, 
+	0xd0, 0x40, 0x60, 0x81, 0xb0, 0x7c, 0x60, 0x81, 
+	0x00, 0xa0, 0xd0, 0x80, 0xb0, 0x74, 0x60, 0x81, 
+	0xb0, 0x7c, 0x60, 0x81, 0x00, 0x68, 0xd0, 0x80, 
+	0x6e, 0x82, 0x00, 0xef, 0xd0, 0x8c, 0x6e, 0x82, 
+	0x00, 0x06, 0xd0, 0x11, 0xa0, 0x38, 0x80, 0x3f, 
+	0x08, 0x20, 0xd0, 0x40, 0x10, 0x48, 0xa0, 0x4a, 
+	0xa0, 0x5b, 0x0c, 0x20, 0xd0, 0x00, 0x10, 0x08, 
+	0xa0, 0x27, 0xa0, 0x0a, 0x90, 0x4d, 0x0f, 0xff, 
+	0xd8, 0x1f, 0x40, 0x40, 0xa0, 0x4d, 0x80, 0x0a, 
+	0x80, 0x07, 0x80, 0x1b, 0x80, 0x27, 0x00, 0x60, 
+	0xd0, 0x00, 0xa0, 0x09, 0x80, 0x28, 0x01, 0x20, 
+	0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 
+	0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 
+	0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x00, 0xa0, 0x29, 
+	0x80, 0x2b, 0x02, 0x30, 0xd0, 0x00, 0xa0, 0x38, 
+	0x80, 0x3f, 0x01, 0xb0, 0xd0, 0x10, 0xa0, 0x37, 
+	0x80, 0x3f, 0x02, 0x30, 0xd0, 0x01, 0xa0, 0x38, 
+	0x00, 0xea, 0xd0, 0x00, 0xd0, 0x4e, 0x0f, 0x0b, 
+	0x70, 0x40, 0x00, 0x06, 0x00, 0x21, 0xd0, 0x88, 
+	0x00, 0xe1, 0xd0, 0x60, 0x60, 0x81, 0x00, 0x2b, 
+	0xd0, 0x80, 0x00, 0xe0, 0xd0, 0x6c, 0x60, 0x81, 
+	0xb0, 0x7c, 0x00, 0x29, 0xd0, 0x80, 0x60, 0x81, 
+	0xb0, 0x7c, 0xd0, 0x82, 0x60, 0x81, 0xb0, 0x7c, 
+	0xd0, 0x85, 0x60, 0x81, 0xb0, 0x7c, 0x03, 0xaa, 
+	0xd0, 0x98, 0x60, 0x81, 0xb0, 0x7c, 0x6e, 0x81, 
+	0x00, 0x27, 0xd0, 0x40, 0x6e, 0x81, 0xb0, 0x7c, 
+	0x6e, 0x81, 0xb0, 0x7c, 0x6e, 0x81, 0x00, 0x27, 
+	0xd1, 0x90, 0x6e, 0x86, 0x00, 0x21, 0xd1, 0xb8, 
+	0x6e, 0x86, 0x00, 0x66, 0xd1, 0xa0, 0xd0, 0x00, 
+	0x01, 0x64, 0xd0, 0x58, 0x30, 0x01, 0x60, 0x06, 
+	0x00, 0xed, 0xd1, 0xbc, 0x6e, 0x86, 0x00, 0xec, 
+	0xd1, 0xb8, 0x6e, 0x86, 0xb1, 0x84, 0x6e, 0x86, 
+	0x00, 0xee, 0xd1, 0x84, 0x70, 0x46, 0x00, 0x65, 
+	0xd1, 0x94, 0x60, 0x46, 0x00, 0x64, 0xd1, 0xbc, 
+	0x6e, 0x86, 0x00, 0x65, 0xd1, 0x80, 0x6e, 0x86, 
+	0xb1, 0xbc, 0x6e, 0x86, 0xb1, 0xbc, 0x6e, 0x86, 
+	0x00, 0xed, 0xd1, 0xa8, 0x6e, 0x86, 0xd0, 0x0e, 
+	0xb1, 0xbc, 0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 
+	0x00, 0x65, 0xd1, 0xa4, 0x60, 0x06, 0x00, 0x28, 
+	0xd1, 0xa4, 0x6e, 0x86, 0x00, 0x27, 0xd1, 0x98, 
+	0x6e, 0x86, 0x00, 0x64, 0xd1, 0xa4, 0x6e, 0x86, 
+	0xd2, 0x01, 0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 
+	0x00, 0x64, 0xd1, 0x80, 0x70, 0x46, 0x6e, 0x86, 
+	0x00, 0xef, 0xd1, 0x98, 0x70, 0x86, 0x08, 0x20, 
+	0xd0, 0xcf, 0x30, 0xc1, 0xea, 0x42, 0xd0, 0x81, 
+	0x00, 0x21, 0xd1, 0xa8, 0x60, 0x86, 0x00, 0xed, 
+	0xd1, 0xa0, 0x6e, 0xc6, 0x00, 0x65, 0xd1, 0x98, 
+	0x6e, 0xc6, 0x00, 0x22, 0xd0, 0x00, 0xa0, 0x05, 
+	0x80, 0x40, 0x00, 0xc6, 0x01, 0x73, 0xd4, 0x3d, 
+	0xe0, 0x46, 0x50, 0x00, 0x08, 0x20, 0xd0, 0x00, 
+	0x5f, 0x00, 0x00, 0x64, 0xd0, 0x60, 0x70, 0xc1, 
+	0x00, 0xec, 0xd0, 0x40, 0x71, 0x81, 0xb0, 0x7c, 
+	0x71, 0xc1, 0xc0, 0x87, 0x30, 0x86, 0xf9, 0x83, 
+	0x10, 0xee, 0xe9, 0x76, 0x10, 0xe1, 0xe9, 0x76, 
+	0xe2, 0x57, 0x00, 0x63, 0xd0, 0xbf, 0x72, 0x06, 
+	0xb1, 0xbc, 0x41, 0x82, 0x02, 0x1b, 0xe9, 0x8d, 
+	0x72, 0x86, 0xb1, 0xbc, 0x41, 0x82, 0xd0, 0x75, 
+	0x30, 0x48, 0xe9, 0xfe, 0xb0, 0x7f, 0xea, 0x00, 
+	0x02, 0x1c, 0xe9, 0x96, 0x15, 0xa3, 0xea, 0x57, 
+	0x10, 0xf0, 0xe9, 0x9a, 0x10, 0xfa, 0xf9, 0xa1, 
+	0x15, 0xa3, 0xea, 0x57, 0x00, 0x21, 0xd0, 0x4c, 
+	0x70, 0x41, 0x10, 0x61, 0xfa, 0x57, 0x00, 0xed, 
+	0xd0, 0x08, 0x70, 0x40, 0xd0, 0x85, 0x40, 0x42, 
+	0x60, 0x40, 0x00, 0x64, 0xd0, 0x64, 0x62, 0x01, 
+	0x12, 0x2b, 0xe9, 0xeb, 0x12, 0x3b, 0xe9, 0xd5, 
+	0x00, 0xec, 0xd0, 0x40, 0x61, 0x81, 0x12, 0x2d, 
+	0xe9, 0xbf, 0x12, 0x30, 0xe9, 0xd4, 0x12, 0x36, 
+	0xe9, 0xd4, 0x12, 0x3a, 0xe9, 0xd4, 0xd0, 0x62, 
+	0x30, 0x48, 0xe9, 0xf2, 0x12, 0x2e, 0xe9, 0xf9, 
+	0xe1, 0x76, 0x00, 0xed, 0xd0, 0x08, 0x70, 0x40, 
+	0xd0, 0x85, 0x40, 0x42, 0x60, 0x40, 0xb0, 0x08, 
+	0x00, 0x21, 0xd0, 0x41, 0x60, 0x40, 0x00, 0x64, 
+	0xd0, 0x60, 0x62, 0x01, 0xf2, 0x5a, 0x00, 0xed, 
+	0xd0, 0x20, 0xd0, 0x41, 0x60, 0x40, 0x10, 0xe1, 
+	0xea, 0x3a, 0xe2, 0x57, 0xe2, 0x53, 0x10, 0xee, 
+	0xf9, 0xe9, 0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 
+	0x97, 0x2e, 0xc7, 0x5c, 0xa7, 0x66, 0x81, 0x34, 
+	0x80, 0x3f, 0x00, 0x21, 0xd0, 0x01, 0xa0, 0x38, 
+	0x00, 0xc6, 0x00, 0x21, 0xd0, 0x15, 0x0b, 0x09, 
+	0x00, 0x4d, 0xb0, 0x01, 0xed, 0xe5, 0xd2, 0x1a, 
+	0xe1, 0xec, 0xf1, 0x18, 0x00, 0xec, 0xd0, 0x40, 
+	0x71, 0x81, 0xd0, 0x4e, 0x60, 0x46, 0xe2, 0x54, 
+	0xc0, 0x0a, 0x10, 0x06, 0x52, 0x80, 0x00, 0xed, 
+	0xd0, 0x40, 0x62, 0x81, 0xe2, 0x53, 0x00, 0x64, 
+	0xd0, 0x60, 0x62, 0x01, 0xf2, 0x5a, 0xe1, 0x70, 
+	0x12, 0xa3, 0xf6, 0x57, 0x15, 0xa1, 0xfa, 0x57, 
+	0x12, 0xa0, 0xea, 0x23, 0x00, 0x65, 0xd1, 0x1c, 
+	0xd0, 0x75, 0x30, 0x48, 0xea, 0x0a, 0xb1, 0x3c, 
+	0x71, 0x04, 0x11, 0x20, 0xfa, 0x11, 0x00, 0xec, 
+	0xd0, 0x40, 0x61, 0x81, 0xe2, 0x57, 0x12, 0xa1, 
+	0xea, 0x33, 0x00, 0xe2, 0xd0, 0x60, 0x70, 0x01, 
+	0xb0, 0x7c, 0x70, 0x41, 0x10, 0x0c, 0x50, 0x40, 
+	0x0c, 0x30, 0xd0, 0x00, 0x31, 0x01, 0xee, 0x21, 
+	0x21, 0x00, 0xe6, 0x57, 0xe2, 0x23, 0x31, 0x00, 
+	0xfe, 0x57, 0xd0, 0x75, 0x30, 0x48, 0xea, 0x28, 
+	0xf2, 0x5a, 0xe2, 0x0d, 0x00, 0xec, 0xd0, 0x40, 
+	0x71, 0x81, 0x00, 0x63, 0xd1, 0x3f, 0xb1, 0xbc, 
+	0x41, 0x84, 0x61, 0x81, 0xd0, 0x50, 0x60, 0x46, 
+	0xe2, 0x57, 0x00, 0xed, 0xd0, 0x7c, 0x70, 0x41, 
+	0x08, 0x20, 0xd0, 0x00, 0x10, 0x08, 0xe2, 0x1c, 
+	0xd2, 0x84, 0x00, 0xed, 0xd1, 0xa4, 0x62, 0x86, 
+	0xd5, 0x00, 0xb5, 0x01, 0x01, 0x46, 0x82, 0x34, 
+	0x80, 0x3f, 0xc7, 0x5e, 0x97, 0x2e, 0x81, 0x34, 
+	0x80, 0x3f, 0x02, 0xe8, 0xd0, 0x30, 0xa0, 0x37, 
+	0xa0, 0x38, 0x08, 0x20, 0xdf, 0x00, 0x80, 0x73, 
+	0x80, 0x3f, 0x00, 0xc6, 0x01, 0x7a, 0xde, 0x1a, 
+	0xe0, 0x46, 0xf2, 0x5a, 0x00, 0x64, 0xd0, 0x60, 
+	0x62, 0x01, 0x02, 0x3c, 0xdc, 0x89, 0xe0, 0x46, 
+	0x00, 0x28, 0xd0, 0x64, 0x70, 0x81, 0x00, 0x22, 
+	0xd0, 0x00, 0x50, 0x80, 0x60, 0x81, 0x0f, 0xc5, 
+	0x50, 0x00, 0x50, 0x00, 0x00, 0xed, 0xd1, 0xa4, 
+	0x72, 0x86, 0x00, 0xef, 0xd1, 0x90, 0x70, 0x46, 
+	0x10, 0x5c, 0x10, 0x65, 0xed, 0x7d, 0xd0, 0x46, 
+	0xc0, 0x0a, 0x10, 0x40, 0x60, 0x46, 0x00, 0x22, 
+	0xd0, 0x73, 0x30, 0x54, 0xe9, 0x8e, 0x12, 0xa4, 
+	0xe9, 0xb5, 0x15, 0x20, 0xe9, 0xc0, 0xb0, 0x7b, 
+	0xe9, 0xc3, 0xb0, 0x41, 0xe9, 0xc9, 0xc0, 0x54, 
+	0x10, 0x5c, 0x10, 0x6e, 0xe9, 0xc6, 0xe1, 0xb5, 
+	0x00, 0x28, 0xd1, 0xb0, 0xd0, 0x00, 0x60, 0x06, 
+	0x12, 0xa4, 0xf9, 0xb2, 0x00, 0xed, 0xd1, 0x9c, 
+	0x62, 0x86, 0xd2, 0x80, 0x00, 0xed, 0xd1, 0xa4, 
+	0x62, 0x86, 0xd0, 0x02, 0x00, 0xec, 0xd1, 0xbc, 
+	0x60, 0x06, 0x00, 0x64, 0xd1, 0xa0, 0x72, 0x06, 
+	0x12, 0x21, 0xf9, 0xa6, 0xd2, 0x0d, 0x62, 0x06, 
+	0x00, 0xed, 0xd1, 0xa0, 0x61, 0x86, 0xd0, 0x0e, 
+	0x00, 0xed, 0xd1, 0xac, 0x60, 0x06, 0xb1, 0xbc, 
+	0x60, 0x06, 0x00, 0x65, 0xd1, 0xa4, 0x60, 0x06, 
+	0x01, 0x7e, 0xd2, 0x32, 0xe1, 0xcb, 0x01, 0x46, 
+	0x90, 0x49, 0x00, 0x60, 0xd0, 0x00, 0x50, 0x40, 
+	0xa0, 0x49, 0x80, 0x3f, 0x00, 0xc6, 0x0c, 0x09, 
+	0x05, 0x0d, 0xe1, 0x70, 0x01, 0xbf, 0xd0, 0x41, 
+	0xe1, 0xcb, 0x01, 0xbb, 0xda, 0x10, 0xe1, 0xcb, 
+	0x01, 0xbd, 0xda, 0x0b, 0xe1, 0xcb, 0x03, 0xb9, 
+	0xd8, 0x10, 0x01, 0x46, 0x90, 0x49, 0x00, 0x60, 
+	0xd1, 0x00, 0x50, 0x44, 0x30, 0x44, 0xa0, 0x49, 
+	0x80, 0x3f, 0x00, 0xc6, 0xe0, 0x46, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x01, 0xfa, 0xd4, 0x3d, 
+	0x00, 0x25, 0xdc, 0xd8, 0xf0, 0x4a, 0x00, 0x26, 
+	0xd0, 0x18, 0xd0, 0x40, 0x60, 0x40, 0x00, 0x28, 
+	0xd0, 0x24, 0x70, 0x40, 0xd0, 0x82, 0x50, 0x42, 
+	0x60, 0x40, 0x00, 0xec, 0xd0, 0xa4, 0x70, 0xc2, 
+	0x10, 0xe0, 0xf9, 0x81, 0x00, 0xec, 0xd1, 0x98, 
+	0xd0, 0x41, 0x60, 0x46, 0x70, 0xc2, 0x10, 0xe0, 
+	0xe9, 0x8e, 0xd0, 0x40, 0x60, 0x46, 0xe1, 0x81, 
+	0xd0, 0x40, 0x00, 0xe6, 0xd0, 0x10, 0x60, 0x40, 
+	0xb0, 0x3c, 0x60, 0x40, 0xb0, 0x3c, 0x60, 0x40, 
+	0xd0, 0xe0, 0x00, 0xea, 0xd0, 0x40, 0x00, 0xe8, 
+	0xd0, 0x82, 0x01, 0x46, 0x70, 0x01, 0xb0, 0x7c, 
+	0x60, 0x02, 0xb0, 0xbc, 0x00, 0x06, 0x00, 0xc6, 
+	0xb0, 0xc1, 0xed, 0x9b, 0x80, 0x49, 0xd6, 0x44, 
+	0xd5, 0x43, 0x00, 0xe0, 0xd1, 0x80, 0x00, 0x06, 
+	0x0b, 0x09, 0x01, 0x0d, 0x0b, 0x09, 0x61, 0x06, 
+	0xb1, 0xbc, 0x01, 0x4d, 0x09, 0x09, 0x61, 0x46, 
+	0xb1, 0xbc, 0x00, 0xcd, 0x09, 0x09, 0x10, 0xe4, 
+	0xed, 0xb8, 0x60, 0xc6, 0xb1, 0xbc, 0x00, 0xcd, 
+	0x60, 0xc6, 0x00, 0xed, 0xd0, 0x04, 0x70, 0x00, 
+	0x10, 0x20, 0xf9, 0xd8, 0xd0, 0x0a, 0x40, 0x03, 
+	0xe9, 0xc9, 0x10, 0xe2, 0xe9, 0xc9, 0x10, 0xe7, 
+	0xe9, 0xc9, 0x10, 0xe8, 0xf9, 0xd8, 0x01, 0x46, 
+	0x90, 0x10, 0x00, 0x20, 0xd0, 0x44, 0x50, 0x40, 
+	0x00, 0xc6, 0xa0, 0x50, 0x00, 0xa0, 0xd0, 0x00, 
+	0xa0, 0x05, 0x80, 0x40, 0x00, 0xed, 0xd1, 0xa4, 
+	0xd0, 0x04, 0x60, 0x06, 0x00, 0xee, 0xd1, 0xac, 
+	0x73, 0x86, 0x10, 0xe3, 0xe5, 0xe3, 0xe9, 0xe8, 
+	0x00, 0xe7, 0xd0, 0x40, 0x00, 0xae, 0xd0, 0xbb, 
+	0xe1, 0xec, 0x01, 0x24, 0xd0, 0x6b, 0x00, 0xea, 
+	0xd0, 0xa6, 0xe1, 0xec, 0x01, 0x21, 0xd0, 0x7b, 
+	0x00, 0xe8, 0xd0, 0x90, 0x13, 0xa0, 0xf9, 0xef, 
+	0xc0, 0x42, 0x00, 0xe0, 0xd1, 0xa8, 0x60, 0x46, 
+	0xb1, 0x98, 0x0b, 0xc9, 0x00, 0x4d, 0x09, 0x09, 
+	0x10, 0x44, 0x00, 0x8d, 0x20, 0x42, 0x10, 0x5f, 
+	0x60, 0x46, 0xb1, 0xb8, 0x00, 0x90, 0xea, 0x1c, 
+	0x0a, 0x89, 0x00, 0x8d, 0x60, 0x86, 0xb1, 0xbc, 
+	0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0x10, 0x60, 
+	0xea, 0x10, 0x00, 0xe8, 0xd1, 0x80, 0xf2, 0xb0, 
+	0x10, 0x60, 0xfa, 0x1c, 0x08, 0x49, 0x00, 0xe0, 
+	0xd1, 0xa4, 0x00, 0x4d, 0x60, 0x46, 0x10, 0x60, 
+	0xea, 0x20, 0x00, 0xe9, 0xd1, 0x80, 0xf2, 0xb0, 
+	0x10, 0x60, 0xea, 0x20, 0x00, 0xe0, 0xd1, 0x88, 
+	0xd0, 0x40, 0x60, 0x46, 0xd0, 0x00, 0x00, 0xe0, 
+	0xd1, 0xa8, 0x70, 0x46, 0x00, 0xef, 0xd1, 0x9c, 
+	0x70, 0x86, 0xb0, 0xb0, 0xee, 0x2a, 0xd0, 0x81, 
+	0x00, 0x90, 0xea, 0x2d, 0x20, 0x01, 0x10, 0x41, 
+	0x10, 0x9f, 0x10, 0xa0, 0xee, 0x2a, 0x10, 0x1c, 
+	0x00, 0x65, 0xd1, 0xa8, 0x60, 0x06, 0x01, 0xb4, 
+	0xd6, 0x3a, 0xe0, 0x46, 0x02, 0x31, 0xde, 0x13, 
+	0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0x0c, 0x09, 
+	0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 
+	0x30, 0x54, 0xe9, 0xea, 0xb0, 0x7d, 0xfa, 0x05, 
+	0x09, 0x09, 0x01, 0xcd, 0x11, 0xe1, 0xf9, 0xc7, 
+	0x80, 0x09, 0x80, 0x27, 0x0a, 0x09, 0xd6, 0x45, 
+	0x00, 0xe1, 0xd1, 0xa0, 0x00, 0x4d, 0x60, 0x46, 
+	0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 
+	0x00, 0x50, 0xe9, 0x91, 0xd4, 0x01, 0xb1, 0xbc, 
+	0x08, 0x89, 0x00, 0x4d, 0x60, 0x46, 0x00, 0xe0, 
+	0xd1, 0x80, 0x08, 0x89, 0x00, 0x4d, 0x08, 0x89, 
+	0x10, 0x4c, 0x71, 0x06, 0x21, 0x01, 0x61, 0x06, 
+	0xb1, 0xbc, 0x00, 0x4d, 0x0b, 0x49, 0x10, 0x4c, 
+	0x71, 0x46, 0x21, 0x41, 0x61, 0x46, 0xb1, 0xb0, 
+	0x00, 0x4d, 0x10, 0x5f, 0x60, 0x46, 0xb1, 0xbc, 
+	0x0a, 0x09, 0x00, 0x4d, 0x10, 0x4a, 0x70, 0x86, 
+	0x20, 0x81, 0x60, 0x86, 0x00, 0xe1, 0xd1, 0xac, 
+	0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x08, 0x89, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x09, 0x49, 0x00, 0x8d, 0x60, 0x86, 0xc0, 0x02, 
+	0x00, 0xe0, 0xd1, 0xa8, 0x70, 0xc6, 0x10, 0xc0, 
+	0xd0, 0x20, 0x30, 0x01, 0x10, 0xc0, 0x60, 0xc6, 
+	0xe1, 0x75, 0x11, 0xe2, 0xf9, 0x75, 0x00, 0xe2, 
+	0xd1, 0x80, 0x08, 0xc9, 0x00, 0x4d, 0x60, 0x46, 
+	0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 
+	0xb1, 0xbc, 0x10, 0x60, 0xf9, 0xd7, 0xb1, 0xb4, 
+	0xe1, 0xde, 0xd2, 0x03, 0x0a, 0x09, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0xb2, 0x01, 0xf9, 0xd8, 
+	0x0b, 0xc9, 0x00, 0x4d, 0x10, 0x49, 0x10, 0x56, 
+	0x60, 0x46, 0xb1, 0xbc, 0x0b, 0x89, 0x00, 0x4d, 
+	0x10, 0x4a, 0x10, 0x56, 0x60, 0x46, 0xe1, 0x75, 
+	0x0b, 0x2c, 0xd4, 0x40, 0xf3, 0xb0, 0xe1, 0x77, 
+	0x00, 0xe0, 0xd0, 0x6c, 0x00, 0xe0, 0xd1, 0x80, 
+	0xd0, 0x0a, 0xf1, 0xfe, 0x00, 0xe1, 0xd1, 0xb0, 
+	0xd0, 0x02, 0xf1, 0xfe, 0x00, 0xe0, 0xd1, 0x80, 
+	0x76, 0x86, 0xb1, 0xbc, 0x73, 0x46, 0xe2, 0x3c, 
+	0x70, 0x81, 0x60, 0x86, 0xb1, 0xbc, 0xb0, 0x7c, 
+	0xb0, 0x01, 0xed, 0xfe, 0x0f, 0xc5, 0x00, 0xe1, 
+	0xd1, 0xa0, 0x70, 0x46, 0xd0, 0x8f, 0x40, 0x42, 
+	0x00, 0x25, 0xd0, 0xe0, 0x00, 0x24, 0xd1, 0x20, 
+	0x10, 0x6a, 0xea, 0x1e, 0x00, 0x66, 0xd0, 0xe0, 
+	0x00, 0x62, 0xd1, 0x00, 0x10, 0x66, 0xea, 0x1e, 
+	0x00, 0x6e, 0xd0, 0xc0, 0x10, 0x64, 0xea, 0x1e, 
+	0x00, 0x2b, 0xd0, 0xd0, 0x00, 0x29, 0xd1, 0x00, 
+	0x00, 0xe0, 0xd1, 0x80, 0x76, 0x86, 0x16, 0xa0, 
+	0xe9, 0xee, 0x30, 0xda, 0xe5, 0xee, 0xb1, 0xbc, 
+	0x73, 0x46, 0x13, 0x60, 0xe9, 0xee, 0x31, 0x0d, 
+	0xe5, 0xee, 0xd0, 0x82, 0xb1, 0xbc, 0x70, 0x46, 
+	0x10, 0x60, 0xe9, 0xee, 0xb0, 0x81, 0xee, 0x2c, 
+	0x00, 0xe0, 0xd0, 0x40, 0x00, 0xe0, 0xd1, 0xac, 
+	0xd0, 0x0a, 0xf1, 0xfe, 0x00, 0xe1, 0xd0, 0x70, 
+	0xd0, 0x02, 0xf1, 0xfe, 0x00, 0xec, 0xd1, 0x98, 
+	0xd0, 0x40, 0x60, 0x46, 0x00, 0xe0, 0xd0, 0x8c, 
+	0x70, 0x82, 0x00, 0x21, 0xd0, 0x70, 0x60, 0x81, 
+	0xd0, 0x40, 0x00, 0x25, 0xd0, 0x20, 0x30, 0x1a, 
+	0xfa, 0x50, 0x00, 0x24, 0xd0, 0x20, 0x30, 0x0d, 
+	0xfa, 0x50, 0xd0, 0x41, 0x00, 0x21, 0xd1, 0x84, 
+	0x60, 0x46, 0xb6, 0xb1, 0x16, 0x9c, 0x01, 0x7a, 
+	0xde, 0x1a, 0xe0, 0x46, 0x02, 0x31, 0xde, 0x13, 
+	0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0x00, 0xec, 
+	0xd0, 0xa8, 0x70, 0xc2, 0x10, 0xe0, 0xf9, 0x77, 
+	0x00, 0xec, 0xd1, 0x9c, 0xd0, 0x41, 0x60, 0x46, 
+	0x70, 0xc2, 0x10, 0xe0, 0xe9, 0x84, 0xd0, 0x40, 
+	0x60, 0x46, 0xe1, 0x77, 0x0b, 0x49, 0x00, 0xe2, 
+	0xd1, 0xa0, 0x00, 0x4d, 0x10, 0x5f, 0x00, 0x6f, 
+	0xd0, 0xff, 0x40, 0x43, 0x60, 0x46, 0xb1, 0xbc, 
+	0x0b, 0x09, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x08, 0x89, 0x00, 0x4d, 0x60, 0x46, 0x10, 0x61, 
+	0xf9, 0x9b, 0xd3, 0xc2, 0x00, 0xec, 0xd1, 0xbc, 
+	0x63, 0xc6, 0x0c, 0x09, 0x90, 0x4d, 0x10, 0x60, 
+	0xe5, 0x9c, 0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 
+	0xd0, 0x72, 0x30, 0x54, 0xf9, 0xa9, 0x0b, 0xa0, 
+	0xd4, 0x40, 0xf3, 0xb0, 0xe1, 0xa0, 0x00, 0xec, 
+	0xd1, 0x9c, 0xd0, 0x40, 0x60, 0x46, 0x01, 0x7a, 
+	0xde, 0x1a, 0xe0, 0x46, 0x0b, 0x09, 0x00, 0x4d, 
+	0x0b, 0x09, 0x00, 0x4d, 0x0a, 0x09, 0x01, 0x4d, 
+	0x0a, 0x09, 0x00, 0x4d, 0x01, 0x59, 0xe9, 0x96, 
+	0x09, 0x09, 0x00, 0x4d, 0x10, 0x5f, 0x10, 0x61, 
+	0xf9, 0x96, 0x09, 0x09, 0x01, 0x4d, 0x11, 0x5f, 
+	0x0b, 0xc9, 0x00, 0x4d, 0xc0, 0x01, 0x10, 0x5f, 
+	0x11, 0x4e, 0x51, 0x41, 0x08, 0x49, 0x00, 0x4d, 
+	0x0b, 0xc9, 0x10, 0x0f, 0x00, 0x4d, 0x50, 0x01, 
+	0x00, 0xed, 0xd1, 0xb6, 0x01, 0x46, 0x00, 0x06, 
+	0xa0, 0x3c, 0xa1, 0x7d, 0x60, 0x06, 0x00, 0xc6, 
+	0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 
+	0xe0, 0x46, 0x50, 0x00, 0x00, 0xec, 0xd0, 0xac, 
+	0x70, 0xc2, 0x10, 0xe0, 0xf9, 0x70, 0x00, 0xec, 
+	0xd1, 0xa0, 0xd0, 0x41, 0x60, 0x46, 0x70, 0xc2, 
+	0x10, 0xe0, 0xe9, 0x7f, 0xd0, 0x40, 0x60, 0x46, 
+	0xe1, 0x70, 0x0a, 0x89, 0x0b, 0xcd, 0x00, 0xe3, 
+	0xd1, 0x80, 0x6b, 0xc6, 0x08, 0xc9, 0x05, 0x8d, 
+	0x15, 0xa3, 0xee, 0x6e, 0x15, 0xa0, 0xea, 0x6e, 
+	0x90, 0x4d, 0xd0, 0x9f, 0xd0, 0xdf, 0x40, 0x81, 
+	0x10, 0x55, 0x40, 0xc1, 0x01, 0x46, 0x82, 0x34, 
+	0x80, 0x3f, 0xc8, 0x1d, 0x81, 0x34, 0x80, 0x3f, 
+	0x00, 0xc6, 0xd1, 0x23, 0x31, 0x03, 0x11, 0x02, 
+	0x38, 0x04, 0xb0, 0x8d, 0x10, 0x9d, 0x28, 0x02, 
+	0xc0, 0x60, 0x00, 0x65, 0xd1, 0x94, 0x71, 0x06, 
+	0x68, 0x06, 0x30, 0x44, 0x00, 0xed, 0xd1, 0xa8, 
+	0x70, 0x06, 0x10, 0x20, 0xe9, 0xb0, 0x00, 0xee, 
+	0xd0, 0xc0, 0x70, 0xc3, 0x20, 0x43, 0xb0, 0x01, 
+	0xf9, 0xac, 0x60, 0x06, 0x00, 0x64, 0xd1, 0xbc, 
+	0x71, 0x06, 0xc0, 0x04, 0x21, 0x01, 0x61, 0x06, 
+	0x10, 0x20, 0xf5, 0xbb, 0x11, 0x20, 0xe5, 0xbb, 
+	0xb0, 0x41, 0x00, 0x65, 0xd1, 0x80, 0x71, 0x06, 
+	0x21, 0x01, 0x61, 0x06, 0x00, 0xed, 0xd1, 0xac, 
+	0x71, 0x06, 0x15, 0xa1, 0xe9, 0xcb, 0xb1, 0x3f, 
+	0x61, 0x06, 0x15, 0xa3, 0xf9, 0xd6, 0xd0, 0xbf, 
+	0xe1, 0xd3, 0xd0, 0x40, 0x60, 0x46, 0xb1, 0xbc, 
+	0x70, 0x86, 0x61, 0x06, 0x31, 0x02, 0xe5, 0xd3, 
+	0x20, 0x84, 0x00, 0x65, 0xd1, 0xa4, 0x60, 0x86, 
+	0xd9, 0x40, 0x00, 0xec, 0xd1, 0x94, 0x79, 0x06, 
+	0xb1, 0x84, 0x78, 0xc6, 0xc0, 0x63, 0x30, 0x64, 
+	0xe9, 0xf8, 0x00, 0xa7, 0xd0, 0xff, 0x7a, 0x63, 
+	0x00, 0x65, 0xd0, 0x00, 0x71, 0x00, 0x31, 0x29, 
+	0xe5, 0xf8, 0xc0, 0x63, 0xc8, 0xc1, 0xb0, 0x78, 
+	0x40, 0x43, 0xc0, 0xa4, 0x30, 0x81, 0xe9, 0xf2, 
+	0x7a, 0x41, 0x31, 0x29, 0xf5, 0xe8, 0x21, 0x29, 
+	0x61, 0x00, 0xb8, 0xfc, 0x79, 0x63, 0xb8, 0xfc, 
+	0x48, 0xc3, 0x68, 0xc6, 0x00, 0xed, 0xd1, 0xb8, 
+	0x69, 0x46, 0x80, 0x28, 0x0b, 0xc9, 0x00, 0x4d, 
+	0x08, 0x49, 0x10, 0x41, 0x00, 0xe3, 0xd1, 0x84, 
+	0x00, 0x8d, 0x20, 0x42, 0x60, 0x46, 0x00, 0xee, 
+	0xd1, 0xa4, 0x70, 0x86, 0x10, 0xa1, 0xee, 0x18, 
+	0xe6, 0x6b, 0x90, 0x86, 0x00, 0x90, 0xea, 0x18, 
+	0x00, 0xed, 0xd0, 0x1c, 0x70, 0x80, 0xb0, 0x81, 
+	0xe6, 0x6b, 0x60, 0x80, 0xb1, 0xa8, 0x70, 0x86, 
+	0x10, 0xa0, 0xfa, 0x6b, 0x00, 0x21, 0xd0, 0x38, 
+	0x70, 0x80, 0x10, 0xa0, 0xfa, 0x6b, 0x0f, 0xef, 
+	0xd0, 0xbf, 0x30, 0x81, 0xfa, 0x22, 0x60, 0x00, 
+	0x08, 0x20, 0xd0, 0x00, 0x5f, 0x00, 0x15, 0xa3, 
+	0xea, 0x6b, 0x00, 0xee, 0xd1, 0x80, 0x79, 0x46, 
+	0x00, 0xf8, 0xd0, 0x00, 0xc4, 0x40, 0x00, 0xe3, 
+	0xd1, 0x84, 0x78, 0x46, 0x0f, 0xef, 0xd0, 0x3f, 
+	0x30, 0x21, 0xea, 0x48, 0x00, 0xe0, 0xd1, 0x90, 
+	0x78, 0x06, 0xc0, 0xa1, 0x18, 0x43, 0x28, 0x42, 
+	0x18, 0x43, 0x28, 0x42, 0x18, 0x1e, 0xd8, 0x80, 
+	0x08, 0x11, 0xea, 0x41, 0x28, 0xa1, 0x18, 0x01, 
+	0x18, 0x5f, 0x18, 0x60, 0xee, 0x3e, 0xc0, 0x51, 
+	0x30, 0x62, 0xee, 0x4e, 0xc8, 0x91, 0x18, 0x9f, 
+	0x00, 0x21, 0xd1, 0xb8, 0xd0, 0x01, 0x60, 0x06, 
+	0x00, 0xef, 0xd0, 0x10, 0xd0, 0x72, 0x60, 0x40, 
+	0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0xc8, 0xdc, 
+	0xc9, 0x1d, 0x81, 0x34, 0x80, 0x3f, 0x00, 0xc6, 
+	0x38, 0xe4, 0xee, 0x5e, 0xea, 0x52, 0x28, 0xe5, 
+	0x01, 0x46, 0x90, 0x6d, 0x28, 0xc1, 0x00, 0xc6, 
+	0x38, 0xe2, 0xf6, 0x6b, 0xdb, 0x08, 0xf1, 0x16, 
+	0xf1, 0x18, 0x00, 0x21, 0xd1, 0xb4, 0x61, 0x86, 
+	0xe2, 0x52, 0x01, 0xf7, 0xd2, 0x19, 0xe0, 0x46, 
+	0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 
+	0xe0, 0x46, 0x50, 0x00, 0x02, 0x31, 0xde, 0x13, 
+	0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0xdb, 0x09, 
+	0x00, 0xe3, 0xd0, 0x1c, 0x6b, 0x00, 0xda, 0xc1, 
+	0x00, 0xe6, 0xd1, 0x98, 0x70, 0x06, 0xb1, 0x84, 
+	0x60, 0x06, 0xb1, 0x84, 0x60, 0x06, 0x05, 0x9f, 
+	0xe9, 0x9f, 0x08, 0x49, 0xd1, 0x17, 0x46, 0x44, 
+	0x00, 0x4d, 0x10, 0x43, 0x26, 0x41, 0x08, 0xc9, 
+	0x05, 0xcd, 0xb5, 0xc1, 0xe5, 0xcc, 0xc0, 0x57, 
+	0x15, 0xc6, 0x25, 0xc1, 0x15, 0xa3, 0xf9, 0x9f, 
+	0x08, 0x49, 0xd1, 0x0f, 0x46, 0x44, 0x00, 0x4d, 
+	0x10, 0x44, 0x26, 0x41, 0x08, 0xc9, 0x06, 0x0d, 
+	0xb6, 0x01, 0xe5, 0xcc, 0xc0, 0x58, 0x16, 0x06, 
+	0x26, 0x01, 0x08, 0x49, 0x00, 0x4d, 0x10, 0x60, 
+	0xe9, 0xa6, 0x0a, 0x09, 0x00, 0x4d, 0xe1, 0x9f, 
+	0x0c, 0x09, 0x90, 0x4d, 0x10, 0x60, 0xe5, 0xa7, 
+	0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 
+	0x30, 0x54, 0xf9, 0xb3, 0xd4, 0x40, 0xf3, 0xb0, 
+	0xe1, 0xab, 0xb0, 0x7d, 0xf9, 0xb8, 0x02, 0x34, 
+	0xd4, 0x44, 0xe0, 0x46, 0x00, 0xec, 0xd1, 0xa0, 
+	0xd0, 0x40, 0x60, 0x46, 0x02, 0x3c, 0xdc, 0x89, 
+	0x00, 0xec, 0xd1, 0x80, 0x70, 0x46, 0xb1, 0xbc, 
+	0x70, 0x86, 0x30, 0x81, 0xe8, 0x46, 0x15, 0x63, 
+	0xe9, 0xc9, 0x05, 0x5e, 0xe8, 0x46, 0x01, 0x73, 
+	0xd4, 0x3d, 0xe0, 0x46, 0xd5, 0x00, 0xb5, 0x01, 
+	0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0xcc, 0xc0, 0xcd, 0x01, 
+	0xcd, 0x42, 0xcd, 0x83, 0x00, 0xa0, 0xd0, 0x01, 
+	0xa0, 0x38, 0xc8, 0x7f, 0xc8, 0x06, 0xb1, 0xbe, 
+	0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 0x58, 0x80, 
+	0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x96, 0xc9, 0x00, 
+	0xf3, 0x92, 0x58, 0xc0, 0xf3, 0x96, 0xc9, 0x40, 
+	0xf3, 0x92, 0x59, 0x40, 0xc0, 0x22, 0xc0, 0x65, 
+	0xc0, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0x80, 
+	0xf3, 0x92, 0x59, 0x00, 0xf3, 0x96, 0xc9, 0x40, 
+	0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 0x59, 0x40, 
+	0xf3, 0x96, 0xc9, 0xc0, 0xf3, 0x92, 0x58, 0x80, 
+	0xc0, 0x23, 0xc0, 0x62, 0xd0, 0x88, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x92, 
+	0x58, 0xc0, 0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 
+	0x59, 0xc0, 0xc0, 0x24, 0xc0, 0x67, 0xd0, 0x90, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x00, 
+	0xf3, 0x92, 0x59, 0x80, 0xf3, 0x96, 0xc9, 0xc0, 
+	0xf3, 0x96, 0xca, 0x00, 0xf3, 0x92, 0x59, 0xc0, 
+	0xf3, 0x96, 0xca, 0x40, 0xf3, 0x92, 0x59, 0x00, 
+	0xc0, 0x25, 0xc0, 0x64, 0xd0, 0x98, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 
+	0x58, 0x80, 0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 
+	0x59, 0x00, 0xc0, 0x23, 0xc0, 0x64, 0xd0, 0x84, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0xc0, 
+	0xf3, 0x92, 0x59, 0x40, 0xf3, 0x96, 0xc9, 0x00, 
+	0xf3, 0x92, 0x5a, 0x40, 0xc0, 0x26, 0xc0, 0x69, 
+	0xd0, 0xa0, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
+	0xc9, 0x80, 0xf3, 0x92, 0x5a, 0x00, 0xf3, 0x96, 
+	0xca, 0x40, 0xf3, 0x92, 0x5a, 0x40, 0xf3, 0x96, 
+	0xca, 0x80, 0xf3, 0x92, 0x59, 0x80, 0xc0, 0x27, 
+	0xc0, 0x66, 0xd0, 0xa8, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc9, 0xc0, 0xf3, 0x92, 0x59, 0x00, 
+	0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 0x58, 0xc0, 
+	0xc0, 0x22, 0xc0, 0x63, 0xd0, 0x8c, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x92, 0x59, 0x80, 0xc0, 0x25, 
+	0xc0, 0x66, 0xd0, 0x94, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 0x59, 0xc0, 
+	0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x92, 0x5a, 0x80, 
+	0xc0, 0x28, 0xc0, 0x6a, 0xd0, 0xb0, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 
+	0x59, 0x40, 0xc0, 0x29, 0xc0, 0x65, 0xd0, 0xb8, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x80, 
+	0xf3, 0x92, 0x58, 0xc0, 0xf3, 0x96, 0xca, 0x00, 
+	0xf3, 0x92, 0x58, 0x80, 0xc0, 0x24, 0xc0, 0x62, 
+	0xd0, 0x9c, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x92, 
+	0x5a, 0x00, 0xc0, 0x27, 0xc0, 0x68, 0xd0, 0xa4, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xca, 0x80, 
+	0xf3, 0x92, 0x59, 0x80, 0xf3, 0x96, 0xca, 0x40, 
+	0xf3, 0x92, 0x5a, 0x40, 0xf3, 0x96, 0xc9, 0x40, 
+	0xf3, 0x92, 0x5a, 0x80, 0xc0, 0x23, 0xc0, 0x6a, 
+	0xd0, 0xac, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x92, 
+	0x59, 0x40, 0xc0, 0x26, 0xc0, 0x65, 0xd0, 0xb4, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x00, 
+	0xf3, 0x92, 0x59, 0x00, 0xc0, 0x29, 0xc0, 0x64, 
+	0xd0, 0xbc, 0x20, 0x86, 0xf3, 0x9a, 0xc0, 0x33, 
+	0xc0, 0x74, 0xc0, 0xb5, 0xc0, 0xf6, 0xd0, 0x40, 
+	0x00, 0xa0, 0xd8, 0x00, 0xa8, 0x38, 0x08, 0x45, 
+	0x0a, 0x09, 0x00, 0x0d, 0x0f, 0xc5, 0x50, 0x00, 
+	0x0a, 0x09, 0x00, 0x0d, 0x10, 0x08, 0x0f, 0xc5, 
+	0x01, 0x46, 0x00, 0x06, 0xa0, 0x7c, 0xa0, 0x3d, 
+	0x60, 0x42, 0x00, 0xc6, 0x0f, 0xc5, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x14, 0x48, 0xd0, 0x81, 
+	0x00, 0xef, 0xd1, 0x8c, 0x71, 0x46, 0x11, 0x60, 
+	0xfb, 0xb1, 0x60, 0x86, 0x71, 0x46, 0x31, 0x42, 
+	0xfb, 0xb1, 0x00, 0xec, 0xd1, 0x0c, 0x74, 0x84, 
+	0x00, 0x68, 0xd0, 0x80, 0x70, 0x02, 0x10, 0x20, 
+	0xfb, 0xc4, 0xc4, 0x82, 0xc4, 0xd2, 0xb4, 0xfc, 
+	0xda, 0x00, 0xda, 0x4f, 0x0a, 0x09, 0x0f, 0xef, 
+	0xd0, 0x3f, 0xb4, 0x7f, 0xca, 0x29, 0x1a, 0x18, 
+	0x4a, 0x00, 0x1a, 0x48, 0x00, 0x8d, 0x2a, 0x42, 
+	0xd0, 0x03, 0x40, 0x11, 0xfb, 0xe3, 0xb4, 0x44, 
+	0x00, 0xa0, 0xd0, 0xc0, 0x30, 0xd3, 0xff, 0xe3, 
+	0xb4, 0xfe, 0x01, 0x46, 0x00, 0x06, 0xaa, 0x3d, 
+	0xaa, 0x7c, 0x6a, 0x53, 0x00, 0xc6, 0xb4, 0xfe, 
+	0xb4, 0x7c, 0x1a, 0x61, 0xfb, 0xc8, 0xb4, 0x43, 
+	0x00, 0xef, 0xd0, 0x3f, 0x40, 0x11, 0xeb, 0xf7, 
+	0xb0, 0xc4, 0xe7, 0xf7, 0xeb, 0xee, 0x61, 0x53, 
+	0x64, 0x52, 0x64, 0xc4, 0x00, 0x28, 0xd1, 0x24, 
+	0x70, 0x04, 0x00, 0x21, 0xd0, 0x80, 0x50, 0x02, 
+	0x60, 0x04, 0x61, 0x46, 0x0a, 0x09, 0x0f, 0xc5, 
+	0x50, 0x00, 0x50, 0x00, 0x02, 0x31, 0xde, 0x13, 
+	0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0x01, 0xfa, 
+	0xd4, 0x3d, 0x00, 0x25, 0xdc, 0xd8, 0xf0, 0x4a, 
+	0x09, 0x09, 0x01, 0xcd, 0x11, 0xe8, 0xf9, 0xe2, 
+	0x00, 0xe3, 0xd1, 0x9c, 0x09, 0x09, 0x05, 0xcd, 
+	0xb5, 0xc1, 0x09, 0x09, 0x00, 0x4d, 0xb0, 0x41, 
+	0x10, 0x46, 0x25, 0xc1, 0x09, 0x09, 0x06, 0x0d, 
+	0xb6, 0x01, 0x09, 0x09, 0x00, 0x4d, 0x08, 0x89, 
+	0xb0, 0x41, 0x10, 0x46, 0x26, 0x01, 0x00, 0x8d, 
+	0x08, 0x89, 0x10, 0x82, 0xd0, 0x04, 0xc0, 0x55, 
+	0x00, 0x40, 0x40, 0x40, 0x05, 0x4d, 0x08, 0x49, 
+	0x0b, 0x0d, 0xd1, 0x00, 0x15, 0x63, 0xe9, 0xa2, 
+	0xd1, 0x01, 0x55, 0x41, 0xdb, 0x01, 0x4b, 0x15, 
+	0xa1, 0x1b, 0x08, 0x89, 0x00, 0x4d, 0x08, 0x49, 
+	0x10, 0x41, 0xd1, 0x19, 0x46, 0x44, 0x26, 0x41, 
+	0x00, 0xcd, 0x08, 0x49, 0x10, 0xc4, 0x00, 0x4d, 
+	0x08, 0x49, 0x10, 0x41, 0x20, 0x81, 0xa0, 0x89, 
+	0x00, 0x4d, 0x10, 0x43, 0x20, 0xc1, 0xa0, 0xe8, 
+	0x08, 0x49, 0x00, 0x4d, 0x1b, 0x03, 0x5b, 0x01, 
+	0xbb, 0x3f, 0x6b, 0x06, 0x08, 0x49, 0xb1, 0xbc, 
+	0x00, 0x4d, 0x60, 0x46, 0x08, 0x49, 0xb1, 0xbc, 
+	0x0a, 0xcd, 0x1a, 0xc2, 0x4a, 0xd9, 0x1a, 0xde, 
+	0x6a, 0xc6, 0x08, 0x49, 0xb1, 0xbc, 0x00, 0x4d, 
+	0x60, 0x46, 0x10, 0x60, 0xea, 0x3e, 0xb1, 0xbc, 
+	0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x08, 0xc9, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x09, 0xc9, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0x0a, 0x09, 0x00, 0x4d, 0x60, 0x46, 0xe2, 0x3e, 
+	0x11, 0xe3, 0xfa, 0x00, 0x00, 0xe7, 0xd0, 0xc0, 
+	0xd0, 0x84, 0xb0, 0x81, 0xe6, 0x3e, 0x08, 0x49, 
+	0x00, 0x4d, 0x60, 0x43, 0xb0, 0xfc, 0x10, 0x60, 
+	0xe9, 0xe7, 0x10, 0xa3, 0xf9, 0xf4, 0x00, 0xe8, 
+	0xd1, 0x80, 0xe1, 0xf8, 0x10, 0xa2, 0xf9, 0xfa, 
+	0x00, 0xe9, 0xd1, 0x80, 0xf2, 0xb0, 0xe1, 0xe7, 
+	0xd2, 0x3f, 0x0a, 0x09, 0x00, 0x4d, 0xb2, 0x01, 
+	0xf5, 0xfb, 0xe1, 0xe7, 0x11, 0xe7, 0xfa, 0x3e, 
+	0xd4, 0x01, 0x00, 0xe1, 0xd0, 0x24, 0x70, 0x00, 
+	0x10, 0x21, 0xea, 0x0d, 0x15, 0x63, 0xfa, 0x0d, 
+	0xd4, 0x03, 0x44, 0x2c, 0xb4, 0x3f, 0x00, 0xe6, 
+	0xd1, 0x90, 0x0b, 0x09, 0x00, 0x4d, 0x09, 0x49, 
+	0x10, 0x45, 0x00, 0x8d, 0x50, 0x81, 0xd0, 0x40, 
+	0x10, 0x87, 0x10, 0x98, 0x30, 0x42, 0xf2, 0x61, 
+	0x60, 0x46, 0xb1, 0xbc, 0x0b, 0x09, 0x00, 0x0d, 
+	0x09, 0x49, 0x00, 0x0d, 0xb4, 0x01, 0xfa, 0x0f, 
+	0x00, 0xe6, 0xd0, 0x18, 0x30, 0x06, 0xe6, 0x29, 
+	0x60, 0x46, 0xb1, 0xbc, 0xe2, 0x22, 0x00, 0xe0, 
+	0xd1, 0x88, 0x70, 0x46, 0x10, 0x63, 0xea, 0x39, 
+	0x10, 0x64, 0xea, 0x39, 0x00, 0xe6, 0xd1, 0x90, 
+	0xd0, 0x00, 0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 
+	0xb1, 0xbc, 0x60, 0x06, 0xe2, 0x3e, 0x00, 0xef, 
+	0xd1, 0x84, 0x70, 0x46, 0x10, 0x60, 0xfa, 0x30, 
+	0x0c, 0x09, 0x90, 0x4d, 0x10, 0x60, 0xe6, 0x3f, 
+	0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 
+	0x30, 0x54, 0xfa, 0x4b, 0xd4, 0x40, 0xf3, 0xb0, 
+	0xe2, 0x43, 0xb0, 0x7d, 0xe9, 0x7a, 0x00, 0xec, 
+	0xd1, 0xa0, 0xd0, 0x40, 0x60, 0x46, 0x02, 0x3c, 
+	0xdc, 0x89, 0x00, 0xec, 0xd1, 0x80, 0x70, 0x46, 
+	0xb1, 0xbc, 0x70, 0x86, 0x30, 0x81, 0xe8, 0x46, 
+	0x15, 0x63, 0xea, 0x5e, 0x05, 0x5e, 0xe8, 0x46, 
+	0x01, 0x73, 0xd4, 0x3d, 0xe0, 0x46, 0x00, 0xe0, 
+	0xd0, 0x00, 0x70, 0xc0, 0x10, 0xc1, 0x00, 0xe0, 
+	0xd0, 0x08, 0x70, 0x00, 0x10, 0x23, 0xea, 0x75, 
+	0xc0, 0x83, 0x10, 0x9d, 0x30, 0xc2, 0x10, 0x9f, 
+	0x30, 0xc2, 0x00, 0xef, 0xd0, 0xac, 0x70, 0x82, 
+	0x10, 0xa3, 0xea, 0x75, 0x10, 0xc1, 0xc0, 0x83, 
+	0x30, 0x81, 0xe6, 0x7e, 0xc0, 0x83, 0x20, 0x81, 
+	0xf6, 0x7f, 0xd0, 0x40, 0x30, 0x43, 0x0f, 0xc5, 
+	0xc0, 0x43, 0x0f, 0xc5, 0x00, 0xed, 0xd1, 0xa4, 
+	0x72, 0x86, 0x15, 0xa3, 0xee, 0x23, 0x15, 0xa1, 
+	0xe6, 0x23, 0x08, 0x20, 0xd0, 0x00, 0x5f, 0x00, 
+	0xd8, 0xc4, 0x15, 0x63, 0xe9, 0x7e, 0x48, 0xd5, 
+	0x18, 0xde, 0x18, 0xe0, 0xe9, 0xc2, 0x00, 0xed, 
+	0xd1, 0xb4, 0x79, 0xc6, 0x19, 0xe0, 0xe9, 0x8c, 
+	0x00, 0xed, 0xd0, 0x3a, 0x79, 0xc6, 0x69, 0xc0, 
+	0xd9, 0xc0, 0x69, 0xc6, 0x00, 0xed, 0xd0, 0x38, 
+	0x79, 0x40, 0x19, 0x60, 0xe9, 0x98, 0x00, 0x28, 
+	0xd0, 0x24, 0x70, 0x40, 0x02, 0x20, 0xd0, 0x80, 
+	0x50, 0x42, 0x60, 0x40, 0x15, 0xa3, 0xe9, 0x9f, 
+	0x00, 0xec, 0xd1, 0xb8, 0x79, 0xc6, 0x69, 0x46, 
+	0xc9, 0x67, 0x00, 0xec, 0xd9, 0xb4, 0x70, 0x66, 
+	0x00, 0xec, 0xd1, 0xbc, 0x70, 0x06, 0x10, 0x20, 
+	0xed, 0xbe, 0x10, 0x60, 0xe9, 0xc1, 0x00, 0xe0, 
+	0xda, 0xa8, 0x7a, 0xaa, 0xc0, 0x2a, 0x10, 0x1f, 
+	0x00, 0x22, 0xd0, 0xa0, 0x70, 0x82, 0x20, 0x6a, 
+	0x00, 0x9f, 0xe9, 0xb5, 0x20, 0x40, 0x19, 0x60, 
+	0xf9, 0xb8, 0xc9, 0x41, 0xb0, 0x48, 0x30, 0x65, 
+	0xf5, 0xbd, 0xb0, 0x70, 0xed, 0xbe, 0xd9, 0x40, 
+	0x00, 0xed, 0xd1, 0xbc, 0x69, 0x46, 0x69, 0x66, 
+	0x12, 0xa4, 0xea, 0x21, 0x00, 0xec, 0xd1, 0xbc, 
+	0x73, 0xc6, 0x15, 0xa3, 0xe9, 0xdf, 0x33, 0xe3, 
+	0xe5, 0xd3, 0xed, 0xd2, 0x63, 0xc6, 0x00, 0x21, 
+	0xd1, 0xa8, 0x63, 0xc6, 0x00, 0xed, 0xd1, 0xa0, 
+	0x63, 0xc6, 0x15, 0xa1, 0xf9, 0xdc, 0x12, 0xa3, 
+	0xe5, 0xe3, 0xd3, 0xc2, 0x00, 0xec, 0xd1, 0xbc, 
+	0x63, 0xc6, 0xe1, 0xe3, 0x12, 0xa3, 0xea, 0x21, 
+	0xe1, 0xe3, 0x12, 0xa2, 0xf6, 0x21, 0x13, 0xe0, 
+	0xfa, 0x21, 0x00, 0xee, 0xd1, 0x8c, 0x78, 0x06, 
+	0xb1, 0xbc, 0x78, 0x46, 0xb1, 0xbc, 0x78, 0x86, 
+	0xd1, 0x88, 0x72, 0x46, 0xd1, 0x84, 0x73, 0x06, 
+	0x13, 0x20, 0xf9, 0xe3, 0x00, 0x64, 0xd1, 0xa0, 
+	0x70, 0x46, 0xd0, 0xa2, 0x30, 0x81, 0xe9, 0xff, 
+	0x10, 0x70, 0xea, 0x11, 0x10, 0x6d, 0xea, 0x14, 
+	0x10, 0x76, 0xea, 0x19, 0x10, 0x7a, 0xea, 0x28, 
+	0xe2, 0x3b, 0x18, 0xe0, 0xea, 0x3b, 0x00, 0xed, 
+	0xd1, 0x80, 0x70, 0x86, 0xb0, 0x81, 0xd0, 0x3f, 
+	0x40, 0x02, 0x10, 0x20, 0xea, 0x0c, 0x60, 0x86, 
+	0xf3, 0x8a, 0xe1, 0xe3, 0xc0, 0x02, 0x10, 0x1a, 
+	0x50, 0x80, 0x60, 0x86, 0xe2, 0x3b, 0x15, 0xa3, 
+	0xea, 0x21, 0xe2, 0xe9, 0xd2, 0x80, 0x00, 0xed, 
+	0xd1, 0xa4, 0x62, 0x86, 0xe3, 0x0c, 0x00, 0xed, 
+	0xd1, 0x88, 0xd0, 0x60, 0x70, 0x06, 0x50, 0x40, 
+	0x60, 0x46, 0x15, 0xa3, 0xfb, 0x0c, 0xd5, 0x84, 
+	0xe3, 0x0c, 0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 
+	0xde, 0x1a, 0xe0, 0x46, 0x00, 0xed, 0xd1, 0x88, 
+	0xd0, 0x60, 0x70, 0x06, 0x50, 0x40, 0x60, 0x46, 
+	0x15, 0xa2, 0xe7, 0x0c, 0xee, 0x21, 0x00, 0x21, 
+	0xd1, 0x8c, 0x18, 0xe0, 0xfa, 0x39, 0x70, 0x46, 
+	0x10, 0x61, 0xea, 0x70, 0xe2, 0x21, 0x65, 0x86, 
+	0xe2, 0x21, 0x18, 0xe0, 0xea, 0x70, 0xd1, 0x80, 
+	0x73, 0x06, 0x15, 0xa2, 0xee, 0x68, 0x00, 0x22, 
+	0xd1, 0x80, 0x70, 0x46, 0x6b, 0x06, 0xcb, 0x01, 
+	0xb1, 0xb4, 0x70, 0x46, 0x6a, 0xc6, 0xca, 0xc1, 
+	0x00, 0x65, 0xd1, 0x98, 0x70, 0x46, 0x10, 0x61, 
+	0xfa, 0x50, 0x02, 0x41, 0xc3, 0x21, 0xc7, 0xe0, 
+	0x02, 0x50, 0xea, 0x56, 0xc3, 0x20, 0xc7, 0xe1, 
+	0xd1, 0x88, 0xd0, 0x01, 0x02, 0x40, 0x62, 0x46, 
+	0x0f, 0xef, 0xd0, 0x7f, 0x30, 0x6f, 0xfa, 0x5f, 
+	0xc3, 0x20, 0xc7, 0x4c, 0xd0, 0x00, 0x00, 0x65, 
+	0xd1, 0x98, 0x70, 0x46, 0x60, 0x06, 0xb0, 0x41, 
+	0x43, 0x01, 0xe2, 0x70, 0xc3, 0x22, 0xc7, 0xcc, 
+	0xc7, 0x60, 0xc7, 0xa1, 0x02, 0x50, 0xea, 0x70, 
+	0xc7, 0x61, 0xc7, 0xa0, 0xdb, 0x80, 0xd1, 0x00, 
+	0x00, 0xef, 0xd1, 0xa8, 0x70, 0x46, 0x10, 0x60, 
+	0xfa, 0x7a, 0x00, 0xe0, 0xd1, 0x88, 0x70, 0x46, 
+	0x00, 0x22, 0xd1, 0xb0, 0x70, 0x86, 0x30, 0x81, 
+	0xea, 0x82, 0x60, 0x46, 0xd0, 0x20, 0xf3, 0x06, 
+	0x10, 0x63, 0xea, 0x87, 0x10, 0x64, 0xea, 0x87, 
+	0xe2, 0x95, 0x00, 0xef, 0xd1, 0x6c, 0x71, 0x45, 
+	0xc0, 0x05, 0x30, 0x01, 0xf6, 0x95, 0xdb, 0x82, 
+	0xd1, 0x01, 0x10, 0x63, 0xea, 0x95, 0xd1, 0x02, 
+	0x11, 0x62, 0xea, 0x95, 0xd1, 0x03, 0xd1, 0x8c, 
+	0x61, 0x06, 0xdb, 0x40, 0x00, 0xe0, 0xd0, 0x00, 
+	0x71, 0x00, 0xc0, 0x84, 0x10, 0x9c, 0xb0, 0x96, 
+	0xfa, 0xa0, 0xb1, 0x38, 0xb0, 0x96, 0xfa, 0xa3, 
+	0xb1, 0x30, 0x00, 0x29, 0xd1, 0x84, 0x00, 0x22, 
+	0xd0, 0x74, 0x70, 0x86, 0x70, 0xc1, 0x61, 0x06, 
+	0x30, 0xc2, 0xea, 0xae, 0x60, 0x81, 0xdb, 0x41, 
+	0xb0, 0x3c, 0xb1, 0xbc, 0xb0, 0x7c, 0x71, 0x00, 
+	0x70, 0x86, 0x70, 0xc1, 0x61, 0x06, 0x30, 0xc2, 
+	0xea, 0xb9, 0x60, 0x81, 0xdb, 0x41, 0x00, 0xee, 
+	0xd1, 0xb4, 0x70, 0x06, 0xb1, 0xbc, 0x70, 0x46, 
+	0x30, 0x40, 0xea, 0xc2, 0x60, 0x06, 0xdb, 0x41, 
+	0x00, 0x24, 0xd0, 0x60, 0x30, 0x81, 0xea, 0xc7, 
+	0x30, 0x81, 0x50, 0x02, 0xea, 0xca, 0xd0, 0x01, 
+	0x00, 0x22, 0xd1, 0xbc, 0x70, 0x86, 0x30, 0x80, 
+	0xea, 0xd2, 0x60, 0x06, 0xd0, 0x10, 0xf3, 0x06, 
+	0x00, 0x22, 0xd1, 0xa4, 0x71, 0x06, 0xd0, 0x01, 
+	0x41, 0x00, 0x5b, 0x44, 0x5b, 0x6e, 0x6b, 0x46, 
+	0x00, 0x28, 0xd0, 0x70, 0x70, 0x41, 0x10, 0x62, 
+	0xfa, 0xe6, 0xd1, 0x84, 0x70, 0x06, 0x10, 0x20, 
+	0xfa, 0xdf, 0x00, 0x22, 0xd0, 0x00, 0xf3, 0x06, 
+	0x02, 0x7d, 0xde, 0x68, 0xe0, 0x46, 0x00, 0xed, 
+	0xd1, 0x88, 0x71, 0x06, 0x01, 0x1f, 0xfa, 0xfd, 
+	0xd0, 0x41, 0x41, 0x01, 0xd0, 0x62, 0x00, 0x65, 
+	0xd0, 0x30, 0x70, 0x00, 0x10, 0x21, 0xea, 0xfa, 
+	0xee, 0xf9, 0x1a, 0xe1, 0xfa, 0xfa, 0xd0, 0x52, 
+	0x51, 0x01, 0x61, 0x06, 0xe3, 0x0c, 0x18, 0xe0, 
+	0xea, 0x70, 0xc7, 0x60, 0xc7, 0xe1, 0x02, 0x50, 
+	0xea, 0x70, 0xc7, 0x61, 0xc7, 0xe0, 0xe2, 0x70, 
+	0x00, 0x28, 0xdc, 0xa4, 0x7c, 0x72, 0x5c, 0x40, 
+	0x6c, 0x72, 0x0f, 0xc5, 0x18, 0xe0, 0xeb, 0x82, 
+	0xd9, 0x0d, 0x00, 0xee, 0xd1, 0xa4, 0x70, 0x06, 
+	0x10, 0x21, 0xfb, 0x7f, 0xd9, 0x0c, 0x90, 0x06, 
+	0x00, 0x10, 0xeb, 0x7f, 0x00, 0x21, 0xd1, 0x88, 
+	0x7a, 0x06, 0x1a, 0x20, 0xeb, 0x7f, 0xd9, 0x00, 
+	0x00, 0xed, 0xd1, 0xbc, 0x79, 0x46, 0x19, 0x60, 
+	0xeb, 0x7f, 0x39, 0x68, 0xc0, 0xe5, 0xc0, 0x25, 
+	0x10, 0x13, 0xb0, 0x0f, 0xef, 0x7f, 0xb0, 0x22, 
+	0xe7, 0x7f, 0x00, 0xe0, 0xd1, 0xa8, 0x71, 0x46, 
+	0x11, 0x5f, 0x29, 0x45, 0x00, 0x22, 0xd0, 0x18, 
+	0x00, 0x22, 0xd4, 0x54, 0x00, 0x22, 0xd0, 0x9c, 
+	0x70, 0x00, 0x74, 0x51, 0x70, 0x42, 0x34, 0x40, 
+	0xe7, 0x3c, 0xd0, 0x40, 0x00, 0x22, 0xd4, 0x50, 
+	0x74, 0x51, 0x34, 0x40, 0xef, 0x42, 0x20, 0x45, 
+	0x60, 0x42, 0x39, 0x41, 0x19, 0x60, 0xf7, 0x5e, 
+	0x00, 0x65, 0xd1, 0xa8, 0x7a, 0x86, 0x29, 0x6a, 
+	0x19, 0x59, 0xb9, 0x7e, 0xf7, 0x75, 0x15, 0xa3, 
+	0xf7, 0x57, 0x00, 0xed, 0xd1, 0xac, 0x70, 0x06, 
+	0x00, 0xed, 0xd1, 0xb0, 0x70, 0x46, 0x30, 0x01, 
+	0xfb, 0x7f, 0x00, 0x65, 0xd1, 0x84, 0x70, 0x46, 
+	0xb0, 0x7f, 0x60, 0x46, 0xd5, 0x84, 0xe3, 0x7f, 
+	0x11, 0x41, 0xd0, 0x4a, 0x00, 0xed, 0xd1, 0xa0, 
+	0x74, 0x46, 0xd0, 0x00, 0x60, 0x06, 0x30, 0xc5, 
+	0x39, 0x45, 0xe7, 0x6e, 0x14, 0x60, 0xeb, 0x6b, 
+	0xf3, 0x85, 0xb0, 0x41, 0xef, 0x65, 0xe3, 0x71, 
+	0x00, 0x66, 0xd1, 0xa0, 0x60, 0xc6, 0x15, 0xa3, 
+	0xeb, 0x7f, 0xf3, 0x85, 0xe3, 0x7f, 0xd9, 0x01, 
+	0x00, 0x66, 0xd1, 0xa0, 0x70, 0x06, 0x30, 0x03, 
+	0xe7, 0x7e, 0x10, 0x1d, 0x10, 0x3b, 0xe7, 0x7f, 
+	0x60, 0xc6, 0x00, 0x66, 0xd1, 0xa4, 0x69, 0x06, 
+	0x15, 0xa4, 0xea, 0x23, 0xe2, 0x3b, 0x00, 0x65, 
+	0xdd, 0x08, 0x7c, 0xf4, 0xbc, 0xff, 0x6c, 0xf4, 
+	0x00, 0xef, 0xdd, 0x10, 0x7c, 0xf4, 0xbc, 0xfe, 
+	0x6c, 0xf4, 0xc0, 0x3f, 0xf1, 0x18, 0xf1, 0x16, 
+	0xf1, 0x18, 0x00, 0x05, 0x08, 0x20, 0xd0, 0x40, 
+	0x5f, 0x01, 0x15, 0x63, 0xe9, 0x77, 0x05, 0x5e, 
+	0xeb, 0x08, 0x00, 0x22, 0xd1, 0xa0, 0x6b, 0x06, 
+	0x00, 0x22, 0xd1, 0xa8, 0x6b, 0xc6, 0x00, 0x22, 
+	0xd1, 0xac, 0x6a, 0xc6, 0x00, 0xee, 0xd0, 0x0c, 
+	0x00, 0xe6, 0xd1, 0x9c, 0x70, 0x40, 0x30, 0x5f, 
+	0xe9, 0x8d, 0xb0, 0x3c, 0xb1, 0xb4, 0x70, 0x40, 
+	0x30, 0x5f, 0xe9, 0x8d, 0xb1, 0xb4, 0x00, 0xe6, 
+	0xd0, 0x10, 0xd0, 0x83, 0x70, 0x40, 0x60, 0x46, 
+	0xb0, 0x3c, 0xb1, 0xbc, 0xb0, 0x81, 0xed, 0x90, 
+	0x00, 0xee, 0xd0, 0x0c, 0x00, 0xe6, 0xd1, 0x9c, 
+	0x70, 0x40, 0x30, 0x4c, 0xe9, 0xa3, 0xb0, 0x3c, 
+	0xb1, 0xb4, 0x70, 0x40, 0x30, 0x4c, 0xe9, 0xa3, 
+	0xb1, 0xb4, 0x00, 0xe6, 0xd0, 0x00, 0x61, 0x80, 
+	0x00, 0x21, 0xd1, 0xb4, 0x70, 0x06, 0x10, 0x20, 
+	0xe9, 0xae, 0xd0, 0x00, 0x60, 0x06, 0xf1, 0x18, 
+	0x00, 0x21, 0xd1, 0x8c, 0x70, 0x46, 0x65, 0x86, 
+	0xde, 0xc0, 0x00, 0xee, 0xd0, 0x20, 0x70, 0x00, 
+	0x10, 0x22, 0xfd, 0xb9, 0xde, 0xc2, 0x00, 0x21, 
+	0xd0, 0x04, 0x70, 0x00, 0x10, 0x21, 0xe9, 0xc0, 
+	0x15, 0xa3, 0xe9, 0xdc, 0xd0, 0x02, 0x4c, 0x00, 
+	0x10, 0x63, 0xe9, 0xc5, 0xcc, 0x3b, 0xd0, 0x04, 
+	0x63, 0x00, 0xd0, 0x00, 0x70, 0x00, 0x30, 0x1f, 
+	0xfb, 0x08, 0xd0, 0x18, 0x70, 0x00, 0x10, 0x20, 
+	0xed, 0xc7, 0xd0, 0x04, 0x70, 0x80, 0x10, 0xa0, 
+	0xeb, 0x08, 0xf1, 0x16, 0x00, 0x21, 0xd0, 0x9a, 
+	0xc0, 0x39, 0x30, 0x1f, 0x10, 0x18, 0x30, 0x02, 
+	0xfd, 0xcf, 0xe3, 0x08, 0x00, 0xe0, 0xd9, 0x04, 
+	0x79, 0x24, 0xb9, 0x38, 0x19, 0x1c, 0xdc, 0x88, 
+	0x4c, 0xac, 0xd0, 0x02, 0x40, 0x2c, 0x10, 0x02, 
+	0x0c, 0x80, 0x10, 0x63, 0xea, 0x70, 0x15, 0x63, 
+	0xf9, 0xec, 0xf1, 0x18, 0x00, 0xef, 0xdc, 0x00, 
+	0x7c, 0x30, 0x00, 0x24, 0xd0, 0x30, 0x70, 0x00, 
+	0x10, 0x21, 0xf9, 0xf6, 0xbc, 0x3b, 0xe1, 0xfd, 
+	0x10, 0x22, 0xf9, 0xfa, 0xbc, 0x38, 0xe1, 0xfd, 
+	0x10, 0x23, 0xf9, 0xfd, 0xbc, 0x3c, 0x1e, 0xe0, 
+	0xea, 0x03, 0x15, 0x63, 0xfa, 0x02, 0xbe, 0xfc, 
+	0xdc, 0x12, 0x0e, 0xde, 0xfa, 0x09, 0xc0, 0x24, 
+	0x30, 0x30, 0xf6, 0x09, 0x2c, 0x00, 0xd0, 0x2c, 
+	0x6c, 0x00, 0x1e, 0xe0, 0xea, 0x0f, 0xcc, 0x24, 
+	0x1c, 0x1f, 0xd9, 0x40, 0x06, 0x50, 0xea, 0x22, 
+	0xc0, 0x24, 0xb0, 0x12, 0xfe, 0x22, 0xd9, 0x74, 
+	0x79, 0x65, 0x19, 0x5f, 0x30, 0x25, 0xee, 0x1b, 
+	0x29, 0x40, 0x19, 0x5f, 0x19, 0x41, 0xc0, 0x25, 
+	0x20, 0x30, 0x30, 0x24, 0xe6, 0x22, 0x3c, 0x00, 
+	0xd0, 0x38, 0x69, 0x40, 0x1c, 0x05, 0xbc, 0x38, 
+	0x3c, 0x32, 0x5c, 0x3b, 0xbc, 0x3f, 0xd8, 0xec, 
+	0x78, 0xe3, 0xc0, 0xa3, 0x10, 0xb2, 0xf6, 0x2f, 
+	0xd0, 0x92, 0x02, 0xe4, 0xd8, 0x00, 0xd0, 0xc0, 
+	0x20, 0xe0, 0xb0, 0x81, 0xee, 0x32, 0xd0, 0x30, 
+	0x60, 0xc0, 0x00, 0xac, 0xd0, 0x20, 0xc0, 0xc0, 
+	0xd8, 0x40, 0xc1, 0x23, 0xd4, 0x64, 0x34, 0x63, 
+	0xdc, 0x40, 0x0c, 0x1f, 0xfa, 0x5b, 0xc0, 0x65, 
+	0xb0, 0x41, 0xe6, 0x47, 0x68, 0x40, 0xb0, 0x3c, 
+	0xe2, 0x42, 0xc0, 0xc0, 0x34, 0x65, 0xdc, 0x48, 
+	0x4c, 0x70, 0x1c, 0x5f, 0x20, 0xf1, 0x15, 0x63, 
+	0xfa, 0x5c, 0xf2, 0x54, 0xc1, 0x11, 0xc0, 0x83, 
+	0xf2, 0xa5, 0xe2, 0x6f, 0xb1, 0x01, 0xe6, 0x5a, 
+	0x68, 0x40, 0x28, 0x60, 0xb0, 0x3c, 0xe2, 0x54, 
+	0x0f, 0xc5, 0xd9, 0x40, 0xb1, 0x12, 0x11, 0x01, 
+	0x21, 0x25, 0xf2, 0x54, 0xc1, 0x11, 0xb1, 0x01, 
+	0xe6, 0x6f, 0x20, 0x31, 0x68, 0x40, 0x30, 0x31, 
+	0xb0, 0x3c, 0x28, 0x60, 0x70, 0x43, 0x30, 0x31, 
+	0x60, 0x40, 0x20, 0x31, 0xb0, 0x3c, 0xb0, 0xf8, 
+	0xe2, 0x61, 0xe2, 0xf7, 0xd8, 0xec, 0x78, 0xe3, 
+	0x00, 0xa8, 0xd0, 0x80, 0x00, 0xa8, 0xd1, 0x44, 
+	0x00, 0xac, 0xd0, 0x20, 0xc0, 0xc0, 0x0c, 0x1f, 
+	0xfa, 0xb3, 0xd9, 0x78, 0x79, 0x65, 0x39, 0x25, 
+	0x19, 0x5f, 0xc9, 0xa5, 0x19, 0x83, 0x20, 0x26, 
+	0x20, 0xe6, 0x20, 0xa6, 0x21, 0x66, 0xc1, 0x23, 
+	0xc0, 0x64, 0x10, 0x5f, 0x10, 0x9d, 0x20, 0x81, 
+	0x31, 0x01, 0x30, 0x44, 0xf6, 0x8e, 0x21, 0x01, 
+	0x30, 0x84, 0x10, 0x83, 0xc4, 0x64, 0x34, 0x63, 
+	0xdc, 0x48, 0x4c, 0x70, 0x1c, 0x5f, 0x15, 0x63, 
+	0xfa, 0xc3, 0x20, 0xb1, 0xf2, 0xa5, 0xc1, 0x24, 
+	0x11, 0x1f, 0xc0, 0x85, 0x30, 0xb1, 0xf2, 0xa5, 
+	0xc1, 0x11, 0xc0, 0x83, 0x0c, 0x9d, 0xfa, 0xa3, 
+	0xb0, 0xbc, 0xf2, 0xa5, 0xe2, 0xec, 0xb1, 0x01, 
+	0xe6, 0x5a, 0x70, 0x42, 0xb0, 0xb8, 0x60, 0x40, 
+	0xb0, 0x3c, 0xe2, 0xa5, 0xb1, 0x01, 0xe6, 0x5a, 
+	0x70, 0x42, 0xb0, 0xb8, 0x60, 0x40, 0xb0, 0x38, 
+	0xe2, 0xac, 0x00, 0xac, 0xd0, 0x24, 0xc1, 0x23, 
+	0xb1, 0x12, 0xf2, 0xac, 0xd1, 0x24, 0x31, 0x23, 
+	0x00, 0xa8, 0xd0, 0x84, 0xf2, 0xac, 0xd1, 0x12, 
+	0x00, 0xa8, 0xd0, 0x84, 0xc0, 0x03, 0xf2, 0xac, 
+	0xe2, 0xec, 0xd8, 0x82, 0x48, 0x95, 0x18, 0x81, 
+	0xb1, 0x01, 0xe6, 0xd9, 0x20, 0xb1, 0x70, 0x42, 
+	0x30, 0xb1, 0x20, 0x22, 0x60, 0x40, 0x30, 0x22, 
+	0xb0, 0xbc, 0xb0, 0x3c, 0x30, 0xb1, 0x70, 0x42, 
+	0x20, 0xb1, 0x30, 0x22, 0x60, 0x40, 0x20, 0x22, 
+	0xb0, 0xbc, 0xb0, 0x3c, 0xe2, 0xc6, 0xc1, 0x11, 
+	0xc0, 0x85, 0x30, 0xb1, 0x20, 0xe2, 0xb1, 0x01, 
+	0xe6, 0xec, 0x70, 0x42, 0xb0, 0xb8, 0x20, 0x22, 
+	0x60, 0x40, 0x30, 0x22, 0xb0, 0x3c, 0x70, 0x43, 
+	0xb0, 0xf8, 0x30, 0x22, 0x60, 0x40, 0x20, 0x22, 
+	0xb0, 0x3c, 0xe2, 0xdd, 0xd0, 0x08, 0x5c, 0x00, 
+	0x3c, 0x32, 0xd0, 0x04, 0x40, 0x30, 0x3c, 0x00, 
+	0x15, 0x63, 0xfa, 0xf7, 0x1e, 0xe0, 0xea, 0xf7, 
+	0xbc, 0x3c, 0x00, 0xac, 0xd0, 0xa0, 0x00, 0xa8, 
+	0xd0, 0x00, 0x00, 0x20, 0xd1, 0x24, 0x70, 0x42, 
+	0xb0, 0xbc, 0x60, 0x40, 0xb0, 0x3c, 0xb1, 0x01, 
+	0xee, 0xfd, 0xd0, 0x30, 0x30, 0x30, 0xef, 0x03, 
+	0xd0, 0x04, 0x63, 0x00, 0x08, 0x20, 0xd0, 0x40, 
+	0x3f, 0x01, 0x02, 0xba, 0xde, 0x3c, 0xe0, 0x46, 
+	0x50, 0x00, 0x50, 0x00, 0x01, 0x46, 0xd0, 0x08, 
+	0x94, 0x89, 0xd0, 0x8c, 0x44, 0x82, 0x14, 0x9e, 
+	0x30, 0x12, 0xd0, 0x88, 0x10, 0x80, 0x00, 0xe8, 
+	0xd1, 0x80, 0x70, 0xc6, 0x00, 0x06, 0xa0, 0xbd, 
+	0xa0, 0xfc, 0x80, 0x3f, 0xb1, 0xbe, 0x60, 0xc6, 
+	0x00, 0x06, 0x80, 0xa9, 0x80, 0x3f, 0x80, 0x2a, 
+	0x80, 0x3f, 0x00, 0x21, 0xd0, 0x3c, 0x00, 0x0a, 
+	0xb1, 0x82, 0xd0, 0x6b, 0x70, 0x46, 0x00, 0x06, 
+	0x80, 0x07, 0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 
+	0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 
+	0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 
+	0xd0, 0x00, 0xa0, 0x29, 0x80, 0x2b, 0x0c, 0x20, 
+	0xd0, 0x00, 0x10, 0x08, 0xa0, 0x27, 0x90, 0x09, 
+	0xd0, 0x41, 0x40, 0x01, 0xd0, 0x44, 0x40, 0x70, 
+	0x20, 0x01, 0xa0, 0x27, 0x80, 0x3f, 0x00, 0xc6, 
+	0x15, 0x63, 0xe9, 0xae, 0x05, 0x5e, 0xe9, 0xbe, 
+	0x00, 0xe0, 0xd0, 0x40, 0x70, 0x81, 0x10, 0x9c, 
+	0xb0, 0x96, 0xf9, 0xb7, 0x00, 0x21, 0xd0, 0x40, 
+	0xe1, 0xbb, 0xb0, 0x96, 0xf9, 0xbe, 0x00, 0x22, 
+	0xd0, 0x40, 0x27, 0xc1, 0x27, 0x41, 0x27, 0x81, 
+	0x90, 0x83, 0x00, 0x64, 0xd0, 0x10, 0x60, 0x80, 
+	0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0x00, 0x64, 
+	0xd0, 0x14, 0x67, 0x40, 0x80, 0x34, 0x80, 0x3f, 
+	0x00, 0xc6, 0x90, 0xae, 0x00, 0x64, 0xd0, 0x18, 
+	0x60, 0x80, 0x90, 0xa6, 0x00, 0x64, 0xd0, 0x1c, 
+	0x60, 0x80, 0x15, 0x63, 0xe9, 0xe3, 0x0c, 0x1f, 
+	0xe9, 0xe3, 0x05, 0x50, 0xf9, 0xe3, 0x15, 0xa3, 
+	0xf9, 0xe3, 0x90, 0x4d, 0x10, 0x60, 0xe5, 0xdb, 
+	0x00, 0x06, 0x05, 0x0d, 0x01, 0x7a, 0xde, 0x1a, 
+	0xe0, 0x46, 0x15, 0xa3, 0xf9, 0xfb, 0x00, 0x21, 
+	0xd0, 0x04, 0x70, 0x00, 0x10, 0x21, 0xe9, 0xfb, 
+	0xd0, 0x38, 0x70, 0x00, 0x15, 0x63, 0xe9, 0xef, 
+	0x10, 0x1f, 0x15, 0x21, 0xe5, 0xe0, 0xd0, 0x64, 
+	0x30, 0x54, 0xe5, 0xe0, 0xc0, 0x40, 0xb0, 0x7f, 
+	0x30, 0x54, 0xe9, 0xfb, 0x0c, 0x09, 0x05, 0x0d, 
+	0xe1, 0xef, 0xc0, 0x5f, 0x10, 0x58, 0x10, 0x48, 
+	0x00, 0xee, 0xd0, 0x8c, 0xd0, 0xc3, 0x70, 0x02, 
+	0x30, 0x01, 0xea, 0x10, 0xb0, 0xbc, 0xb0, 0xc1, 
+	0xee, 0x01, 0x00, 0x26, 0xd0, 0x20, 0x70, 0x40, 
+	0xb0, 0x7f, 0x60, 0x40, 0x15, 0xa3, 0xea, 0x0f, 
+	0xb0, 0x88, 0x77, 0xc2, 0x80, 0x07, 0x09, 0x49, 
+	0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 
+	0x00, 0x4d, 0xa0, 0x6c, 0xd3, 0x80, 0xd0, 0xa1, 
+	0x00, 0x88, 0xd0, 0xa9, 0x00, 0x4d, 0x00, 0x50, 
+	0xfa, 0x1a, 0x0c, 0x49, 0x00, 0x8d, 0xc0, 0x42, 
+	0x10, 0x60, 0xea, 0x2a, 0xb0, 0x5e, 0xb0, 0x43, 
+	0xfe, 0x34, 0xd0, 0x61, 0x23, 0x81, 0xe2, 0x1f, 
+	0x0c, 0x09, 0x05, 0x0d, 0x15, 0x20, 0xfe, 0x31, 
+	0xd0, 0x65, 0x30, 0x54, 0xee, 0x10, 0x03, 0xb4, 
+	0xd6, 0x29, 0xe0, 0x46, 0xc6, 0xd4, 0xb6, 0xc1, 
+	0xe6, 0x31, 0xd0, 0x64, 0x30, 0x5b, 0xfe, 0x31, 
+	0xd7, 0x00, 0xb7, 0x01, 0xd3, 0x81, 0x00, 0x27, 
+	0xd0, 0x10, 0xd0, 0x81, 0x60, 0x80, 0x15, 0x63, 
+	0xfa, 0x54, 0x00, 0x22, 0xdc, 0xd8, 0x03, 0xf8, 
+	0xd0, 0x10, 0xf0, 0x4a, 0x15, 0xa3, 0xfa, 0x51, 
+	0x02, 0xf7, 0xdc, 0x26, 0x0c, 0x10, 0xf8, 0x46, 
+	0x02, 0xfc, 0xd8, 0x22, 0xe0, 0x46, 0x02, 0xf2, 
+	0xd6, 0x2b, 0xe0, 0x46, 0x00, 0x22, 0xdc, 0xd8, 
+	0x03, 0xfa, 0xd0, 0x10, 0xf0, 0x4a, 0x03, 0x35, 
+	0xda, 0x20, 0x15, 0xa3, 0xe8, 0x46, 0x03, 0x30, 
+	0xdc, 0x27, 0xe0, 0x46, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xe0, 
+	0xe1, 0xec, 0xe2, 0x12, 0xe2, 0x14, 0xe1, 0xc7, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8d, 0x06, 0x50, 
+	0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
+	0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x64, 
+	0x30, 0x5b, 0xfc, 0x11, 0xc0, 0x39, 0x30, 0x31, 
+	0x10, 0x12, 0x10, 0x20, 0xe9, 0x88, 0x03, 0x10, 
+	0xe9, 0x93, 0x0f, 0x19, 0xf9, 0x8f, 0xd1, 0x44, 
+	0xe1, 0x79, 0x03, 0xde, 0xf9, 0xba, 0x03, 0xdf, 
+	0xe9, 0x99, 0xd3, 0x40, 0xca, 0x50, 0xd1, 0x42, 
+	0xe2, 0xea, 0xc0, 0x50, 0x10, 0x54, 0xc0, 0x90, 
+	0x10, 0x8c, 0x10, 0x92, 0x10, 0xe0, 0xe5, 0xa8, 
+	0xc0, 0x01, 0x10, 0x01, 0x20, 0x40, 0xc0, 0x02, 
+	0x10, 0x01, 0x20, 0x80, 0x10, 0x60, 0xfd, 0xab, 
+	0xb0, 0x7f, 0x10, 0xa0, 0xfd, 0xae, 0xb0, 0xbf, 
+	0x10, 0x5f, 0x10, 0x9f, 0x00, 0xef, 0xd0, 0x3e, 
+	0x20, 0x52, 0x20, 0x83, 0x20, 0x93, 0x10, 0x4c, 
+	0x10, 0x82, 0x40, 0x80, 0x50, 0x42, 0x0f, 0xc5, 
+	0xcb, 0xaa, 0xcb, 0xeb, 0xca, 0x50, 0xd0, 0xc0, 
+	0xb0, 0xc1, 0xf1, 0x9b, 0xcb, 0x01, 0xd0, 0xc1, 
+	0xf1, 0x9b, 0xcb, 0x41, 0xba, 0x7f, 0xbb, 0x3f, 
+	0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 
+	0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x48, 
+	0xcc, 0xb1, 0x1c, 0x9f, 0x06, 0xd0, 0xe9, 0xd5, 
+	0x01, 0x69, 0xd0, 0x20, 0x3c, 0x80, 0xc0, 0x1c, 
+	0x10, 0x08, 0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 
+	0x01, 0xb5, 0xd4, 0x00, 0x2c, 0x80, 0xde, 0x84, 
+	0xde, 0xc4, 0xe3, 0x1e, 0xd3, 0xc2, 0xf2, 0xd3, 
+	0x13, 0xa0, 0xed, 0xe5, 0xf2, 0x32, 0xb3, 0x81, 
+	0xe9, 0xec, 0x80, 0x07, 0xd4, 0x00, 0xc4, 0x50, 
+	0xd3, 0x08, 0xe2, 0x95, 0xd0, 0x71, 0x20, 0x56, 
+	0x00, 0x48, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
+	0xe9, 0xfa, 0x06, 0x5e, 0xfa, 0x03, 0x08, 0x89, 
+	0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xfa, 0xd3, 0xc4, 
+	0x06, 0x5e, 0xfa, 0x03, 0xd0, 0x43, 0x40, 0x4c, 
+	0xea, 0x03, 0x08, 0x49, 0x00, 0x8d, 0x10, 0x87, 
+	0x53, 0x02, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
+	0x03, 0x1c, 0xea, 0x0a, 0x09, 0x49, 0x00, 0x0d, 
+	0xd0, 0x9f, 0x40, 0x02, 0xb0, 0x20, 0x03, 0x19, 
+	0xea, 0x10, 0xb0, 0x20, 0xa0, 0x2c, 0xe2, 0x5b, 
+	0x06, 0x5f, 0xfa, 0x80, 0xd4, 0x00, 0xc4, 0x50, 
+	0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xd3, 
+	0xe1, 0xdc, 0xe2, 0x00, 0xe2, 0x02, 0xe1, 0xac, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x91, 0x06, 0x50, 
+	0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
+	0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x64, 
+	0x30, 0x5b, 0xfc, 0x11, 0xbc, 0x10, 0xd0, 0x10, 
+	0x0c, 0x1e, 0xf9, 0x8e, 0xbc, 0x10, 0xd0, 0x30, 
+	0xc0, 0x40, 0x30, 0x70, 0xed, 0x8e, 0x03, 0x10, 
+	0xe9, 0x97, 0x0f, 0x19, 0xf9, 0x93, 0xd1, 0x44, 
+	0xe1, 0x79, 0x03, 0xdf, 0xe9, 0xa1, 0xd3, 0x40, 
+	0xca, 0x50, 0xcb, 0x52, 0x03, 0x1d, 0xf9, 0xa8, 
+	0xca, 0x12, 0xca, 0x52, 0xe1, 0xa5, 0x03, 0x1d, 
+	0xf9, 0xa8, 0xca, 0x12, 0xca, 0x53, 0xca, 0xae, 
+	0xca, 0xef, 0xb1, 0x7e, 0x03, 0x1e, 0xfa, 0xea, 
+	0xb1, 0x7e, 0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 
+	0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 0xf9, 0xd2, 
+	0x00, 0xa8, 0xd0, 0x00, 0xcc, 0x5b, 0x1c, 0x5f, 
+	0x1c, 0x43, 0x20, 0x31, 0x7c, 0x40, 0xb0, 0x3c, 
+	0x7e, 0x80, 0xcc, 0xb1, 0xce, 0xfa, 0x1c, 0x9f, 
+	0x1e, 0xdf, 0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 
+	0xe9, 0xc4, 0x3c, 0x80, 0x0e, 0xd9, 0xe9, 0xc7, 
+	0x3e, 0xc0, 0x3e, 0xf2, 0x3e, 0xb1, 0xd0, 0x01, 
+	0x40, 0x1b, 0x10, 0x05, 0x20, 0x1f, 0x2c, 0x40, 
+	0x2c, 0x80, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
+	0xe3, 0x1e, 0xd3, 0xc2, 0xf2, 0xd3, 0x13, 0xa0, 
+	0xed, 0xd8, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xdc, 
+	0x80, 0x07, 0xe2, 0x95, 0x0d, 0x09, 0xd1, 0x8c, 
+	0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xe8, 0x06, 0x5e, 
+	0xf9, 0xf1, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
+	0xf9, 0xe8, 0xd3, 0xc4, 0x06, 0x5e, 0xf9, 0xf1, 
+	0xd0, 0x43, 0x40, 0x4c, 0xe9, 0xf1, 0x08, 0x49, 
+	0x00, 0x8d, 0x10, 0x87, 0x53, 0x02, 0x01, 0x46, 
+	0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xf8, 
+	0x09, 0x49, 0x00, 0x0d, 0xd0, 0x9f, 0x40, 0x02, 
+	0xb0, 0x20, 0x03, 0x19, 0xe9, 0xfe, 0xb0, 0x20, 
+	0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x80, 
+	0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
+	0xe2, 0x8d, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xc1, 
+	0xe1, 0xca, 0xe1, 0xee, 0xe1, 0xf0, 0xe1, 0xa8, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8d, 0x06, 0x50, 
+	0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
+	0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x64, 
+	0x30, 0x5b, 0xfc, 0x11, 0xc0, 0x39, 0x30, 0x31, 
+	0x10, 0x12, 0x10, 0x20, 0xe9, 0x88, 0x03, 0x10, 
+	0xe9, 0x93, 0x0f, 0x19, 0xf9, 0x8f, 0xd1, 0x44, 
+	0xe1, 0x79, 0x03, 0xdf, 0xe9, 0x9d, 0xd3, 0x40, 
+	0xca, 0x50, 0xcb, 0x52, 0x03, 0x1d, 0xf9, 0xa4, 
+	0xca, 0x12, 0xca, 0x52, 0xe1, 0xa1, 0x03, 0x1d, 
+	0xf9, 0xa4, 0xca, 0x12, 0xca, 0x53, 0xca, 0xae, 
+	0xca, 0xef, 0xb1, 0x7e, 0x03, 0x1e, 0xfa, 0xea, 
+	0xb1, 0x7e, 0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 
+	0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 
+	0x1c, 0x48, 0xcc, 0xb1, 0x1c, 0x9f, 0x06, 0xd0, 
+	0xe9, 0xb6, 0x01, 0x69, 0xd0, 0x20, 0x3c, 0x80, 
+	0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 0x2c, 0x40, 
+	0x2c, 0x80, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
+	0xde, 0x84, 0xde, 0xc4, 0xe3, 0x1e, 0xd3, 0xc2, 
+	0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xc6, 0xf2, 0x32, 
+	0xb3, 0x81, 0xe9, 0xca, 0x80, 0x07, 0xe2, 0x95, 
+	0x0d, 0x09, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
+	0xe9, 0xd6, 0x06, 0x5e, 0xf9, 0xdf, 0x08, 0x89, 
+	0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xd6, 0xd3, 0xc4, 
+	0x06, 0x5e, 0xf9, 0xdf, 0xd0, 0x43, 0x40, 0x4c, 
+	0xe9, 0xdf, 0x08, 0x49, 0x00, 0x8d, 0x10, 0x87, 
+	0x53, 0x02, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
+	0x03, 0x1c, 0xe9, 0xe6, 0x09, 0x49, 0x00, 0x0d, 
+	0xd0, 0x9f, 0x40, 0x02, 0xb0, 0x20, 0x03, 0x19, 
+	0xe9, 0xec, 0xb0, 0x20, 0xa0, 0x2c, 0xe2, 0x5b, 
+	0x06, 0x5f, 0xfa, 0x80, 0xd4, 0x00, 0xc4, 0x50, 
+	0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xdb, 
+	0xe1, 0xe9, 0xe2, 0x00, 0xe2, 0x02, 0xe1, 0xc3, 
+	0xe1, 0x65, 0x30, 0x5a, 0xe5, 0x8d, 0x06, 0x50, 
+	0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
+	0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x52, 
+	0x30, 0x5b, 0xfc, 0x11, 0xc0, 0x39, 0x30, 0x31, 
+	0x10, 0x11, 0x10, 0x20, 0xe9, 0x88, 0x03, 0x10, 
+	0xe9, 0x93, 0x0f, 0x19, 0xf9, 0x8f, 0xd1, 0x44, 
+	0xe1, 0x79, 0x03, 0xd0, 0xf9, 0x98, 0xca, 0x50, 
+	0x03, 0xde, 0xf9, 0x9a, 0xd1, 0x42, 0xe2, 0xea, 
+	0xcb, 0xaa, 0xcb, 0xeb, 0xc0, 0x50, 0x10, 0x54, 
+	0xc0, 0x90, 0x10, 0x8c, 0x10, 0x92, 0xd0, 0xc1, 
+	0x05, 0x50, 0xe9, 0xa5, 0xb0, 0xc2, 0x10, 0x60, 
+	0xfd, 0xa8, 0xb0, 0x7f, 0x10, 0xa0, 0xfd, 0xab, 
+	0xb0, 0xbf, 0x10, 0x5f, 0x10, 0x9f, 0x00, 0xef, 
+	0xd0, 0x3e, 0x20, 0x52, 0x20, 0x83, 0x20, 0x93, 
+	0x10, 0x4c, 0x10, 0x82, 0x40, 0x80, 0x50, 0x42, 
+	0xd0, 0x81, 0x14, 0x1f, 0x14, 0x01, 0x05, 0x50, 
+	0xe9, 0xbd, 0x50, 0x42, 0xe1, 0xbe, 0x54, 0x02, 
+	0xca, 0x10, 0xca, 0x50, 0xcb, 0x01, 0xcb, 0x41, 
+	0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 
+	0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x49, 
+	0xcc, 0xb1, 0x1c, 0x9f, 0xc0, 0x1c, 0x10, 0x08, 
+	0x20, 0x1f, 0x05, 0x50, 0xf9, 0xd2, 0xb0, 0x3c, 
+	0x2c, 0x40, 0x2c, 0x80, 0x01, 0xb5, 0xd4, 0x00, 
+	0x2c, 0x80, 0x02, 0xe4, 0xde, 0x80, 0xde, 0xc1, 
+	0xe3, 0x1e, 0xd3, 0xc0, 0xf2, 0xd3, 0x13, 0xa0, 
+	0xed, 0xe0, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xe9, 
+	0x80, 0x07, 0xd4, 0x02, 0x44, 0x15, 0x14, 0x1f, 
+	0xc4, 0x50, 0xd3, 0x08, 0xe2, 0x95, 0xd0, 0x71, 
+	0x20, 0x56, 0x00, 0x48, 0xd1, 0x8c, 0x03, 0x0d, 
+	0x41, 0x8c, 0xe9, 0xf7, 0x08, 0x89, 0x03, 0xcd, 
+	0x13, 0xe3, 0xf9, 0xf6, 0xd3, 0xc4, 0xe1, 0xf7, 
+	0xb3, 0xc1, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
+	0x03, 0x1c, 0xe9, 0xfe, 0x09, 0x49, 0x00, 0x0d, 
+	0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x7f, 
+	0xd4, 0x02, 0x44, 0x15, 0x14, 0x1f, 0xc4, 0x50, 
+	0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xc9, 
+	0xe1, 0xd2, 0xe1, 0xe7, 0xe1, 0xe9, 0xe1, 0xab, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x91, 0x06, 0x50, 
+	0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
+	0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x52, 
+	0x30, 0x5b, 0xfc, 0x11, 0xbc, 0x10, 0xd0, 0x10, 
+	0x0c, 0x1e, 0xf9, 0x8e, 0xbc, 0x10, 0xd0, 0x20, 
+	0xc0, 0x40, 0x30, 0x70, 0xed, 0x8e, 0x03, 0x10, 
+	0xe9, 0x97, 0x0f, 0x19, 0xf9, 0x93, 0xd1, 0x44, 
+	0xe1, 0x79, 0x03, 0xd0, 0xf9, 0xa0, 0xca, 0x50, 
+	0xcb, 0x52, 0x03, 0x1d, 0xf9, 0xa7, 0xca, 0x12, 
+	0xca, 0x52, 0xe1, 0xa4, 0x03, 0x1d, 0xf9, 0xa7, 
+	0xca, 0x12, 0xca, 0x53, 0xca, 0xae, 0xca, 0xef, 
+	0xb1, 0x7e, 0x03, 0x1e, 0xfa, 0xea, 0xb1, 0x7e, 
+	0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 
+	0x2c, 0x80, 0x17, 0x20, 0xf9, 0xc8, 0x00, 0x2a, 
+	0xd0, 0x00, 0x20, 0x1b, 0x20, 0x1b, 0x05, 0x50, 
+	0xf9, 0xb8, 0xb0, 0x3f, 0x10, 0x02, 0x7c, 0x40, 
+	0xcc, 0xb1, 0x1c, 0x9f, 0x01, 0x69, 0xd0, 0x3c, 
+	0x0c, 0x99, 0xe9, 0xc1, 0x3c, 0x80, 0xde, 0xa0, 
+	0x2c, 0x5f, 0x2c, 0x9f, 0xd0, 0x30, 0x70, 0x00, 
+	0x2c, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 0xd3, 0xc0, 
+	0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xce, 0xf2, 0x32, 
+	0xb3, 0x81, 0xe9, 0xd2, 0x80, 0x07, 0xe2, 0x95, 
+	0x0d, 0x09, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
+	0xe9, 0xde, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
+	0xf9, 0xdd, 0xd3, 0xc4, 0xe1, 0xde, 0xb3, 0xc1, 
+	0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 
+	0xe9, 0xe5, 0x09, 0x49, 0x00, 0x0d, 0xa0, 0x2c, 
+	0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x7f, 0xd4, 0x00, 
+	0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 
+	0x50, 0x00, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xa3, 
+	0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8a, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x87, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x64, 0x30, 0x5b, 0xfd, 0xb4, 
+	0xc0, 0x39, 0x30, 0x31, 0x10, 0x12, 0x10, 0x20, 
+	0xe9, 0x82, 0xd1, 0x42, 0xd3, 0x40, 0xe2, 0xea, 
+	0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 
+	0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x48, 0xcc, 0xb1, 
+	0x1c, 0x9f, 0x06, 0xd0, 0xe9, 0x98, 0x01, 0x69, 
+	0xd0, 0x20, 0x3c, 0x80, 0xc0, 0x1c, 0x10, 0x08, 
+	0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0x01, 0xb5, 
+	0xd4, 0x00, 0x2c, 0x80, 0xde, 0x84, 0xde, 0xc4, 
+	0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 
+	0x30, 0x5a, 0xe5, 0xc8, 0x00, 0x26, 0xd0, 0x00, 
+	0x70, 0x00, 0x10, 0x20, 0xe9, 0xbf, 0x00, 0xe0, 
+	0xd0, 0x44, 0x70, 0x41, 0x10, 0x5c, 0x30, 0x5b, 
+	0xb0, 0x41, 0xed, 0xc8, 0x0f, 0x17, 0xf9, 0xb4, 
+	0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xb8, 
+	0xdf, 0x00, 0x00, 0x06, 0x03, 0xb4, 0xd6, 0x29, 
+	0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 
+	0xe5, 0xc8, 0x0f, 0x17, 0xf9, 0xc3, 0x02, 0xf2, 
+	0xd6, 0x2b, 0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 
+	0xe2, 0x95, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xb5, 
+	0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8e, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8b, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x64, 0x30, 0x5b, 0xfd, 0xc6, 
+	0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x88, 
+	0xbc, 0x10, 0xd0, 0x30, 0xc0, 0x40, 0x30, 0x70, 
+	0xed, 0x88, 0xd1, 0x42, 0xd3, 0x40, 0xe2, 0xea, 
+	0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 
+	0x17, 0x20, 0xf9, 0xb4, 0x00, 0xa8, 0xd0, 0x00, 
+	0xcc, 0x5b, 0x1c, 0x5f, 0x1c, 0x43, 0x20, 0x31, 
+	0x7c, 0x40, 0xb0, 0x3c, 0x7e, 0x80, 0xcc, 0xb1, 
+	0xce, 0xfa, 0x1c, 0x9f, 0x1e, 0xdf, 0x01, 0x69, 
+	0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xa6, 0x3c, 0x80, 
+	0x0e, 0xd9, 0xe9, 0xa9, 0x3e, 0xc0, 0x3e, 0xf2, 
+	0x3e, 0xb1, 0xd0, 0x01, 0x40, 0x1b, 0x10, 0x05, 
+	0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0xd0, 0x30, 
+	0x70, 0x00, 0x2c, 0x80, 0xe3, 0x1e, 0xf2, 0xd3, 
+	0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xda, 
+	0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 
+	0xe9, 0xd1, 0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 
+	0x10, 0x5c, 0x30, 0x5b, 0xb0, 0x41, 0xed, 0xda, 
+	0x0f, 0x17, 0xf9, 0xc6, 0x0f, 0x49, 0xf2, 0xd3, 
+	0x0f, 0x19, 0xf9, 0xca, 0xdf, 0x00, 0x00, 0x06, 
+	0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 
+	0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xda, 0x0f, 0x17, 
+	0xf9, 0xd5, 0x02, 0xf7, 0xdc, 0x26, 0xe0, 0x46, 
+	0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xa2, 
+	0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8a, 
+	0xe1, 0x65, 0x30, 0x5a, 0xe5, 0x87, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x52, 0x30, 0x5b, 0xfd, 0xb3, 
+	0xc0, 0x39, 0x30, 0x31, 0x10, 0x11, 0x10, 0x20, 
+	0xe9, 0x82, 0xd1, 0x42, 0xd3, 0x41, 0xe2, 0xea, 
+	0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 
+	0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x49, 0xcc, 0xb1, 
+	0x1c, 0x9f, 0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 
+	0x05, 0x50, 0xf9, 0x99, 0xb0, 0x3c, 0x2c, 0x40, 
+	0x2c, 0x80, 0x01, 0xb5, 0xd4, 0x00, 0x2c, 0x80, 
+	0x02, 0xe4, 0xde, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 
+	0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 
+	0xe5, 0xc7, 0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 
+	0x10, 0x20, 0xe9, 0xbe, 0x00, 0xe0, 0xd0, 0x44, 
+	0x70, 0x41, 0x10, 0x5b, 0x30, 0x5b, 0xb0, 0x41, 
+	0xed, 0xc7, 0x0f, 0x17, 0xf9, 0xb3, 0x0f, 0x49, 
+	0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xb7, 0xdf, 0x00, 
+	0x00, 0x06, 0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 
+	0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xc7, 
+	0x0f, 0x17, 0xf9, 0xc2, 0x03, 0x30, 0xdc, 0x27, 
+	0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 
+	0x50, 0x00, 0x50, 0x00, 0x03, 0x76, 0xd0, 0x73, 
+	0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xac, 
+	0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8e, 
+	0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8b, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x52, 0x30, 0x5b, 0xfd, 0xbd, 
+	0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x88, 
+	0xbc, 0x10, 0xd0, 0x20, 0xc0, 0x40, 0x30, 0x70, 
+	0xed, 0x88, 0xd1, 0x42, 0xd3, 0x41, 0xe2, 0xea, 
+	0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 
+	0x17, 0x20, 0xf9, 0xab, 0x00, 0x2a, 0xd0, 0x00, 
+	0x20, 0x1b, 0x20, 0x1b, 0x05, 0x50, 0xf9, 0x9b, 
+	0xb0, 0x3f, 0x10, 0x02, 0x7c, 0x40, 0xcc, 0xb1, 
+	0x1c, 0x9f, 0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 
+	0xe9, 0xa4, 0x3c, 0x80, 0xde, 0xa0, 0x2c, 0x5f, 
+	0x2c, 0x9f, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
+	0xde, 0xc1, 0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 
+	0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xd1, 0x00, 0x26, 
+	0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 0xe9, 0xc8, 
+	0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 0x10, 0x5b, 
+	0x30, 0x5b, 0xb0, 0x41, 0xed, 0xd1, 0x0f, 0x17, 
+	0xf9, 0xbd, 0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 
+	0xf9, 0xc1, 0xdf, 0x00, 0x00, 0x06, 0x03, 0xb4, 
+	0xd6, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 
+	0xb0, 0x7e, 0xe5, 0xd1, 0x0f, 0x17, 0xf9, 0xcc, 
+	0x03, 0x35, 0xda, 0x20, 0xe0, 0x46, 0xd3, 0x08, 
+	0xd3, 0xc0, 0xe2, 0x95, 0xd0, 0x61, 0x23, 0x81, 
+	0x0c, 0x49, 0xd0, 0x61, 0x00, 0x8d, 0x10, 0xa0, 
+	0xea, 0x3b, 0x30, 0x42, 0xe6, 0x30, 0x23, 0x82, 
+	0x0f, 0xc5, 0x0c, 0x09, 0x05, 0x0d, 0x15, 0x20, 
+	0xfe, 0x45, 0xd0, 0x65, 0x15, 0x63, 0xea, 0x43, 
+	0xd0, 0x53, 0x30, 0x54, 0xee, 0x4a, 0x0f, 0x17, 
+	0xfa, 0x45, 0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 
+	0x80, 0x07, 0x09, 0x49, 0xd4, 0x00, 0xd4, 0x40, 
+	0xd4, 0x80, 0xd4, 0xc0, 0x00, 0x4d, 0xa0, 0x6c, 
+	0xd0, 0xa1, 0x00, 0x88, 0xd0, 0xa9, 0x00, 0x4d, 
+	0x00, 0x50, 0xfa, 0x53, 0xf2, 0x32, 0xd3, 0x80, 
+	0xe1, 0x76, 0xd1, 0xc2, 0x41, 0xcf, 0x11, 0xdf, 
+	0xd0, 0x41, 0x01, 0xc1, 0x00, 0xef, 0xd0, 0xbe, 
+	0x03, 0x10, 0xf9, 0x77, 0x80, 0x07, 0x21, 0x96, 
+	0x11, 0xa2, 0xe9, 0x78, 0x03, 0x1d, 0xea, 0x73, 
+	0xc0, 0xd7, 0xc2, 0x90, 0xf2, 0xa4, 0xc4, 0x0a, 
+	0x03, 0xd0, 0xea, 0x72, 0xc2, 0x91, 0xf2, 0xa4, 
+	0xc4, 0x4a, 0x03, 0x1e, 0xea, 0x8d, 0xc0, 0xd8, 
+	0xc2, 0x92, 0xf2, 0xa4, 0xc4, 0x8a, 0x03, 0xd0, 
+	0xea, 0x7d, 0xc2, 0x93, 0xf2, 0xa4, 0xc4, 0xca, 
+	0xe2, 0x8d, 0xd3, 0xc0, 0xc0, 0xd7, 0xc2, 0x90, 
+	0xf2, 0xa4, 0xc4, 0x0a, 0x03, 0xd0, 0xea, 0x88, 
+	0xc2, 0x91, 0xf2, 0xa4, 0xc4, 0x4a, 0x08, 0x49, 
+	0x00, 0x4d, 0x10, 0x61, 0xf8, 0x11, 0x03, 0x1f, 
+	0xea, 0x93, 0x0d, 0xc9, 0x00, 0x4d, 0xd0, 0x1a, 
+	0xe2, 0x98, 0x03, 0x10, 0xfa, 0x97, 0xd0, 0x1d, 
+	0xe2, 0x98, 0xd0, 0x18, 0x0f, 0x16, 0xfa, 0x98, 
+	0xd0, 0x4c, 0x40, 0x4c, 0x10, 0x6c, 0xea, 0xa2, 
+	0x03, 0xde, 0xfa, 0xa2, 0x0f, 0x12, 0xfa, 0xa0, 
+	0x00, 0x08, 0xe2, 0xd9, 0xd2, 0x00, 0x13, 0xe1, 
+	0xee, 0xa9, 0x08, 0x49, 0x02, 0x0d, 0x00, 0xc8, 
+	0xc2, 0xca, 0x12, 0x94, 0xd0, 0x1f, 0x30, 0x07, 
+	0x12, 0xc0, 0xc2, 0x43, 0x12, 0x5a, 0x00, 0x0d, 
+	0x03, 0xde, 0xea, 0xb6, 0x0e, 0xc9, 0x04, 0x8d, 
+	0x02, 0x48, 0x22, 0x80, 0x12, 0x88, 0xd0, 0x0b, 
+	0x30, 0x03, 0x12, 0x80, 0xd0, 0x19, 0x20, 0x03, 
+	0x12, 0x80, 0x00, 0x0d, 0x22, 0xc0, 0x12, 0xc8, 
+	0xd0, 0x0b, 0x30, 0x09, 0x12, 0xc0, 0x12, 0xd8, 
+	0xd0, 0x16, 0x20, 0x09, 0x20, 0x07, 0x12, 0xc0, 
+	0x42, 0xc2, 0x22, 0x8b, 0x22, 0x88, 0x03, 0xde, 
+	0xea, 0xd2, 0x0e, 0xc9, 0xc4, 0x4a, 0x04, 0xcd, 
+	0x0f, 0xc5, 0x01, 0x46, 0x90, 0x4d, 0x00, 0xc6, 
+	0x10, 0x60, 0xe6, 0xd3, 0x0f, 0xc5, 0x01, 0xb5, 
+	0xd4, 0x00, 0xca, 0x9d, 0xcb, 0x9e, 0xca, 0xea, 
+	0xcb, 0xee, 0x2a, 0xc0, 0x2b, 0xc0, 0xca, 0x10, 
+	0xca, 0x51, 0xcb, 0x12, 0xcb, 0x53, 0xd1, 0x40, 
+	0xd3, 0x41, 0xb7, 0x3f, 0xc0, 0x5c, 0xe1, 0x7b, 
+	0xd0, 0xc0, 0xc1, 0x28, 0xc2, 0x2a, 0xc2, 0xab, 
+	0xf1, 0x7a, 0x0f, 0x17, 0xfa, 0xef, 0xcc, 0xe8, 
+	0xcd, 0x29, 0xcd, 0x6c, 0xcd, 0xad, 0xc8, 0x08, 
+	0xc8, 0x49, 0xca, 0x0a, 0xca, 0x4b, 0xf3, 0x31, 
+	0xd0, 0xc1, 0xc1, 0x34, 0xc2, 0x2a, 0xc2, 0xab, 
+	0xf1, 0x7a, 0x00, 0x28, 0xd9, 0xc0, 0xc8, 0x88, 
+	0xc8, 0xc9, 0xa9, 0xf8, 0xca, 0x8a, 0xca, 0xcb, 
+	0x11, 0x62, 0xe9, 0x79, 0xd0, 0xc0, 0xc1, 0x35, 
+	0xc2, 0x2e, 0xc2, 0xaf, 0xf1, 0x7a, 0xc9, 0x08, 
+	0xc9, 0x49, 0xa9, 0xf8, 0xcb, 0x0a, 0xcb, 0x4b, 
+	0xd0, 0xc1, 0xc1, 0x36, 0xc2, 0x2e, 0xc2, 0xaf, 
+	0xf1, 0x7a, 0xc0, 0x27, 0xc9, 0x88, 0xc9, 0xc9, 
+	0xa0, 0x38, 0xcb, 0x8a, 0xcb, 0xcb, 0xe1, 0x79, 
+	0x5f, 0x0d, 0x07, 0x7d, 0xde, 0x07, 0x11, 0x5e, 
+	0x30, 0x05, 0xcd, 0xc0, 0x00, 0x28, 0xd0, 0x00, 
+	0xa0, 0x38, 0x11, 0x61, 0xf9, 0x75, 0x00, 0xe2, 
+	0xd0, 0x00, 0x0f, 0x1d, 0xeb, 0x29, 0x00, 0x2d, 
+	0xdf, 0x4b, 0xf3, 0x3f, 0xe1, 0x75, 0x04, 0xeb, 
+	0xd0, 0x00, 0x11, 0x62, 0xeb, 0x36, 0xb0, 0x20, 
+	0x0f, 0x19, 0xfb, 0x36, 0xac, 0xe0, 0x01, 0xa4, 
+	0xde, 0x00, 0x5e, 0x0d, 0x00, 0x2d, 0xdf, 0x7a, 
+	0xdd, 0xc0, 0xd8, 0x80, 0xd9, 0x00, 0xd9, 0x80, 
+	0x5f, 0x00, 0x01, 0x46, 0x00, 0x28, 0xd0, 0x01, 
+	0x00, 0x06, 0xa0, 0x37, 0x80, 0x3f, 0x00, 0xc6, 
+	0x0f, 0xc5, 0xad, 0xda, 0xc6, 0xb1, 0xd0, 0x01, 
+	0x01, 0xa3, 0xde, 0x1d, 0x40, 0x30, 0x3e, 0x00, 
+	0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 0xc8, 0x28, 
+	0xc8, 0x69, 0xc8, 0xaa, 0xc8, 0xeb, 0x0c, 0x1e, 
+	0xfb, 0x68, 0x26, 0xba, 0x07, 0x7d, 0xdc, 0x00, 
+	0x1d, 0xcf, 0x1d, 0xd1, 0x5d, 0xc0, 0x00, 0x2d, 
+	0xdf, 0x64, 0x0f, 0x87, 0xad, 0xda, 0x80, 0x3f, 
+	0x0e, 0x0a, 0x66, 0xda, 0xc9, 0x2c, 0xc9, 0x6d, 
+	0xc9, 0xae, 0xc9, 0xef, 0x0f, 0x2f, 0xd0, 0x37, 
+	0x4f, 0x00, 0x0f, 0x1a, 0xeb, 0xbe, 0x01, 0xa4, 
+	0xde, 0x20, 0xd0, 0x01, 0x40, 0x3c, 0x2e, 0x00, 
+	0x00, 0x2d, 0xdf, 0x7a, 0xac, 0xe0, 0x0f, 0x87, 
+	0x0e, 0x0a, 0x76, 0xe0, 0xbf, 0x79, 0xbe, 0x3c, 
+	0x0f, 0x1b, 0xeb, 0x9e, 0x0f, 0x87, 0x0e, 0x0a, 
+	0x76, 0xe1, 0xbf, 0x79, 0xbe, 0x34, 0x18, 0xa0, 
+	0xeb, 0xb9, 0x0f, 0x87, 0xad, 0x20, 0x80, 0x3f, 
+	0x0e, 0x0a, 0x76, 0xe2, 0xbf, 0x79, 0xbe, 0x3c, 
+	0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe3, 0x0f, 0x1b, 
+	0xeb, 0xb3, 0xbf, 0x77, 0xbe, 0x0c, 0x19, 0x20, 
+	0xeb, 0xb9, 0x0f, 0x87, 0xad, 0x60, 0x80, 0x3f, 
+	0x0e, 0x0a, 0x76, 0xe4, 0xbe, 0x3c, 0xbf, 0x75, 
+	0x0f, 0x15, 0xf8, 0x1c, 0x1f, 0x0a, 0x1f, 0x16, 
+	0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe5, 0xbf, 0x79, 
+	0xbe, 0x34, 0x19, 0xa0, 0xeb, 0xb9, 0x0f, 0x87, 
+	0xad, 0xa0, 0x80, 0x3f, 0x0e, 0x0a, 0x76, 0xe6, 
+	0xbe, 0x3c, 0xbf, 0x79, 0x0f, 0x87, 0x0e, 0x0a, 
+	0x76, 0xe7, 0x0f, 0x15, 0xeb, 0xbe, 0x00, 0x2f, 
+	0xdf, 0x72, 0x1d, 0xe0, 0xf8, 0x1c, 0x00, 0x28, 
+	0xd0, 0x01, 0xa0, 0x38, 0x80, 0x3f, 0x0f, 0x87, 
+	0xd0, 0x01, 0x4d, 0xc0, 0x1f, 0x0f, 0x1f, 0x11, 
+	0x00, 0x2f, 0xdf, 0x76, 0xc6, 0xb2, 0x03, 0x7d, 
+	0xde, 0x0e, 0x01, 0xa3, 0xde, 0x2d, 0x5d, 0xc0, 
+	0x0f, 0x87, 0x1e, 0xe1, 0xeb, 0xdb, 0xad, 0xda, 
+	0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 0x0c, 0x1e, 
+	0xfb, 0xe4, 0x26, 0xbb, 0x03, 0xff, 0xdd, 0xff, 
+	0x4d, 0xc0, 0x00, 0xa3, 0xde, 0x2d, 0xbf, 0x56, 
+	0x0f, 0x87, 0x07, 0x7d, 0xde, 0x0e, 0x5d, 0xc0, 
+	0x00, 0xa3, 0xde, 0x1d, 0xad, 0xda, 0x80, 0x3f, 
+	0x0e, 0x0a, 0x66, 0xda, 0xdf, 0x5c, 0xd0, 0x0e, 
+	0x4f, 0x00, 0x0f, 0x87, 0xd0, 0x06, 0x40, 0x3c, 
+	0xeb, 0xf0, 0xbf, 0x3e, 0xb0, 0x04, 0xe7, 0xf2, 
+	0xeb, 0xf6, 0xbf, 0x0c, 0xbf, 0x3a, 0x0f, 0x87, 
+	0x0f, 0x1d, 0xfb, 0x4b, 0xbf, 0x38, 0x0f, 0x87, 
+	0x0f, 0x1c, 0xfb, 0xcb, 0xbf, 0x30, 0x0f, 0x87, 
+	0x50, 0x00, 0x50, 0x00, 0x0f, 0x17, 0xf9, 0x70, 
+	0x90, 0x4d, 0x10, 0x60, 0xe5, 0x72, 0x0f, 0x49, 
+	0x90, 0x4d, 0x10, 0x60, 0xe5, 0x76, 0x0f, 0x19, 
+	0xf9, 0x79, 0x01, 0x46, 0xd0, 0x11, 0xa0, 0x38, 
+	0x80, 0x3f, 0x00, 0xc6, 0xdf, 0x00, 0x00, 0x06, 
+	0x08, 0x20, 0xd0, 0x00, 0x10, 0x08, 0xa0, 0x0a, 
+	0xa0, 0x1b, 0x0c, 0x20, 0xd0, 0x00, 0x10, 0x08, 
+	0xa0, 0x27, 0x90, 0x4d, 0x0f, 0xff, 0xd8, 0x1f, 
+	0x40, 0x40, 0xa0, 0x4d, 0x80, 0x0a, 0xd0, 0x00, 
+	0x06, 0x50, 0xf9, 0x95, 0xd0, 0x01, 0xa0, 0x09, 
+	0x80, 0x1b, 0xa0, 0x27, 0x01, 0x20, 0xd0, 0x67, 
+	0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 
+	0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 
+	0x01, 0x20, 0xd0, 0x40, 0xa0, 0x69, 0x80, 0x2b, 
+	0x80, 0x07, 0x08, 0x20, 0xdf, 0x00, 0x02, 0x30, 
+	0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 0x01, 0xb0, 
+	0xd0, 0x10, 0xa0, 0x37, 0x80, 0x3f, 0x02, 0x30, 
+	0xd0, 0x01, 0xa0, 0x38, 0xd0, 0x10, 0xa0, 0x38, 
+	0x15, 0x63, 0xe9, 0xba, 0x05, 0x5e, 0xf9, 0xfa, 
+	0xc0, 0xdf, 0x00, 0xe0, 0xd1, 0x80, 0x70, 0x06, 
+	0x10, 0x1c, 0xc1, 0x40, 0x11, 0x48, 0xd3, 0x10, 
+	0x00, 0x21, 0xd0, 0x80, 0xb0, 0x16, 0xe9, 0xca, 
+	0xd3, 0x20, 0x10, 0x81, 0xb0, 0x16, 0xf9, 0xfa, 
+	0x30, 0xc2, 0xd2, 0x64, 0xd0, 0x92, 0x00, 0xee, 
+	0xd0, 0x54, 0x70, 0x41, 0x30, 0x43, 0xed, 0xd7, 
+	0xd2, 0x6c, 0x72, 0x49, 0xc0, 0x89, 0xb0, 0xbf, 
+	0x10, 0x9f, 0x22, 0x42, 0x04, 0x31, 0xd0, 0x10, 
+	0xc0, 0x42, 0x30, 0x49, 0xe5, 0xde, 0x10, 0x03, 
+	0xc1, 0x0c, 0xc1, 0x83, 0xb1, 0xbe, 0x01, 0x46, 
+	0x00, 0x06, 0xa0, 0x3d, 0xa0, 0x3c, 0x60, 0x06, 
+	0x00, 0xc6, 0xb1, 0xbc, 0xb1, 0x01, 0xed, 0xe1, 
+	0xc1, 0x0c, 0x21, 0x85, 0x01, 0x46, 0x00, 0x06, 
+	0xa0, 0x3d, 0xa0, 0x3c, 0x60, 0x06, 0x00, 0xc6, 
+	0xb1, 0xbc, 0xb1, 0x01, 0xed, 0xec, 0x02, 0xe4, 
+	0xd0, 0x00, 0x20, 0xc0, 0xb2, 0x41, 0xed, 0xd8, 
+	0x15, 0xa3, 0xfa, 0x00, 0xbc, 0x10, 0x0c, 0x1e, 
+	0xfa, 0x00, 0xbc, 0x10, 0xd0, 0x04, 0x70, 0x00, 
+	0x10, 0x20, 0xfa, 0x00, 0x00, 0x27, 0xd0, 0x10, 
+	0xd0, 0x40, 0x60, 0x40, 0x00, 0x26, 0xd0, 0x14, 
+	0x60, 0x40, 0xb0, 0x28, 0x70, 0x40, 0xb0, 0x7f, 
+	0x60, 0x40, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
+	0x50, 0x00, 0x50, 0x00, 0x00, 0x28, 0xd1, 0xb0, 
+	0x70, 0x06, 0xd0, 0x81, 0x60, 0x86, 0x10, 0x20, 
+	0xe9, 0xab, 0xb0, 0x3f, 0x60, 0x06, 0x00, 0xec, 
+	0xd1, 0x84, 0x70, 0x46, 0xb1, 0x84, 0x70, 0x86, 
+	0x30, 0x42, 0xe9, 0xab, 0x70, 0x42, 0xd0, 0x35, 
+	0x30, 0x40, 0xf9, 0xab, 0x00, 0x63, 0xd0, 0x3f, 
+	0xb0, 0xbc, 0x40, 0x80, 0x70, 0xc2, 0x10, 0xe3, 
+	0xe5, 0xab, 0xb0, 0xbc, 0x40, 0x80, 0x60, 0x86, 
+	0x00, 0x28, 0xd0, 0x24, 0x70, 0x40, 0x00, 0x22, 
+	0xd0, 0x80, 0x50, 0x42, 0x60, 0x40, 0x00, 0x64, 
+	0xd0, 0x60, 0xd0, 0x90, 0x60, 0x81, 0x00, 0xed, 
+	0xd1, 0x88, 0x70, 0x46, 0x10, 0xe4, 0xe9, 0xa8, 
+	0x00, 0x21, 0xd0, 0xe8, 0xd0, 0x00, 0x60, 0x03, 
+	0xd0, 0x81, 0x40, 0x42, 0x60, 0x46, 0x02, 0x3c, 
+	0xdc, 0x89, 0xe0, 0x46, 0xd0, 0x82, 0x50, 0x42, 
+	0x60, 0x46, 0x00, 0x23, 0xd5, 0x3e, 0x01, 0x7a, 
+	0xde, 0x1a, 0xe0, 0x46, 0x01, 0x46, 0xdf, 0x5c, 
+	0x08, 0x20, 0xd1, 0x00, 0xcf, 0x04, 0x11, 0x08, 
+	0xa1, 0x0a, 0xa1, 0x1b, 0x11, 0x1f, 0xa1, 0x27, 
+	0xd2, 0x80, 0xb2, 0x81, 0x90, 0x4d, 0xc0, 0x01, 
+	0x10, 0x14, 0x00, 0x16, 0xe9, 0x8d, 0x80, 0x33, 
+	0x80, 0x3f, 0x92, 0x8b, 0x00, 0x23, 0xd0, 0x3f, 
+	0x42, 0x80, 0xe9, 0x8d, 0x0f, 0xff, 0xdf, 0xff, 
+	0x40, 0x01, 0xa0, 0x0d, 0xe1, 0x94, 0xa1, 0x0a, 
+	0x00, 0xea, 0xd0, 0x00, 0xd0, 0x8e, 0x00, 0x06, 
+	0x0f, 0x0b, 0x70, 0x80, 0x80, 0x73, 0x80, 0x0a, 
+	0xd0, 0x00, 0x06, 0x50, 0xf9, 0x9a, 0xd0, 0x01, 
+	0xd0, 0x44, 0x40, 0x70, 0x20, 0x01, 0x15, 0x63, 
+	0xf9, 0xa1, 0x80, 0x1b, 0xe1, 0xa2, 0x80, 0x5b, 
+	0xa0, 0x27, 0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 
+	0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 
+	0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 
+	0xd0, 0x40, 0xa0, 0x69, 0x80, 0x2b, 0x80, 0x07, 
+	0x08, 0x20, 0xd0, 0x00, 0xcf, 0x00, 0x02, 0x30, 
+	0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 0x01, 0xb2, 
+	0xd2, 0x10, 0xa0, 0x37, 0x80, 0x3f, 0x02, 0x30, 
+	0xd0, 0x01, 0xa0, 0x38, 0x00, 0x30, 0xd0, 0x10, 
+	0xa0, 0x38, 0x80, 0x3f, 0x00, 0xc6, 0x00, 0x28, 
+	0xd1, 0x24, 0x70, 0x04, 0xd0, 0x41, 0x50, 0x01, 
+	0x60, 0x04, 0x00, 0x27, 0xd0, 0x18, 0x70, 0x40, 
+	0xb0, 0x7f, 0x60, 0x40, 0x00, 0x26, 0xd0, 0x20, 
+	0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x08, 0x20, 
+	0xdf, 0x00, 0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 
+	0xd4, 0xc0, 0xd3, 0x81, 0x12, 0xa0, 0xed, 0xe3, 
+	0xd0, 0x08, 0x0a, 0x09, 0x00, 0x4d, 0xb0, 0x01, 
+	0xed, 0xdf, 0x03, 0xbf, 0xd4, 0x27, 0xe0, 0x46, 
+	0x50, 0x00, 0x50, 0x00, 0x02, 0x24, 0xd0, 0x00, 
+	0xa0, 0x37, 0x00, 0x27, 0xd3, 0xd0, 0x00, 0x26, 
+	0xd0, 0x04, 0x73, 0xcf, 0x13, 0xe1, 0xe9, 0x7b, 
+	0xb0, 0x3c, 0xf2, 0x00, 0x00, 0x26, 0xd0, 0x40, 
+	0xd0, 0x00, 0x60, 0x01, 0x00, 0x26, 0xd0, 0x14, 
+	0xf2, 0x00, 0x00, 0x26, 0xd0, 0x18, 0xf2, 0x00, 
+	0x00, 0xee, 0xd0, 0x1c, 0x71, 0x40, 0xd1, 0x24, 
+	0x15, 0x63, 0xe9, 0x8d, 0x11, 0x1f, 0xc7, 0x1a, 
+	0xb7, 0x01, 0xd3, 0x81, 0xc4, 0xd4, 0xf2, 0x04, 
+	0x00, 0x26, 0xd0, 0x18, 0x70, 0x40, 0xb0, 0x54, 
+	0xfd, 0x9b, 0x00, 0xed, 0xd0, 0x24, 0xd0, 0x44, 
+	0x60, 0x40, 0x13, 0xe1, 0xf9, 0xbc, 0x15, 0xa3, 
+	0xf9, 0xa1, 0x0c, 0x10, 0xe9, 0xb9, 0x11, 0x61, 
+	0xe5, 0xb3, 0xed, 0xb9, 0x15, 0xa3, 0xf9, 0xab, 
+	0x00, 0x26, 0xd0, 0x14, 0x70, 0x40, 0x10, 0x62, 
+	0xf5, 0xb3, 0x15, 0x22, 0xe5, 0xb3, 0xc0, 0x44, 
+	0x30, 0x54, 0xe5, 0xb3, 0x34, 0xd4, 0xf5, 0xb3, 
+	0xe1, 0xbf, 0x03, 0xb4, 0xd6, 0x29, 0x00, 0x26, 
+	0xd0, 0x40, 0x60, 0x01, 0xe1, 0xdb, 0x03, 0xb4, 
+	0xd6, 0x29, 0xe0, 0x46, 0x01, 0x7a, 0xde, 0x1a, 
+	0xe0, 0x46, 0x80, 0x07, 0x09, 0x49, 0xd4, 0x00, 
+	0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 0x00, 0x4d, 
+	0xa0, 0x6c, 0xd3, 0x80, 0xd0, 0xa1, 0x00, 0x88, 
+	0xd0, 0xa9, 0x00, 0x4d, 0x00, 0x50, 0xf9, 0xc9, 
+	0x0c, 0x49, 0xd0, 0x61, 0x00, 0x8d, 0x10, 0xa0, 
+	0xe9, 0x90, 0x30, 0x42, 0xf5, 0xd8, 0xd0, 0x61, 
+	0x23, 0x81, 0xe1, 0xce, 0x23, 0x82, 0x13, 0xa1, 
+	0xf9, 0x90, 0xd0, 0x42, 0x15, 0xa1, 0xf9, 0xdf, 
+	0xb0, 0x7f, 0x00, 0x26, 0xd0, 0x14, 0x70, 0x00, 
+	0x30, 0x01, 0xf5, 0xe8, 0x16, 0xe0, 0xe5, 0xe8, 
+	0xb6, 0xc1, 0xbc, 0x20, 0xc0, 0x44, 0x30, 0x5b, 
+	0xfd, 0xb9, 0xc0, 0x44, 0x30, 0x54, 0xe5, 0xb9, 
+	0x15, 0x63, 0xf9, 0xf8, 0x15, 0xa3, 0xf9, 0xf5, 
+	0x03, 0x3c, 0xd8, 0x1c, 0xe0, 0x46, 0x03, 0x39, 
+	0xda, 0x17, 0xe0, 0x46, 0x15, 0xa3, 0xf9, 0xfd, 
+	0x03, 0x72, 0xde, 0x19, 0xe0, 0x46, 0x03, 0x70, 
+	0xd0, 0x17, 0xe0, 0x46, 0x70, 0x40, 0xb0, 0x7f, 
+	0x60, 0x40, 0x0f, 0xc5, 0xdf, 0x00, 0x0c, 0x09, 
+	0x05, 0x0d, 0x08, 0x20, 0xdf, 0x00, 0x0f, 0xc5, 
+	0x50, 0x00, 0x50, 0x00, 0x00, 0xef, 0xd0, 0x14, 
+	0x70, 0x40, 0x10, 0x60, 0xe9, 0x45, 0xb0, 0x04, 
+	0x70, 0x40, 0xb0, 0x41, 0xed, 0x44, 0x00, 0xed, 
+	0xd0, 0x24, 0xd0, 0x44, 0x60, 0x40, 0x00, 0x64, 
+	0xd0, 0x20, 0x70, 0x00, 0x10, 0x30, 0xe9, 0x45, 
+	0x00, 0x21, 0xd0, 0x28, 0x60, 0x40, 0x00, 0x64, 
+	0xd2, 0xc0, 0x70, 0x0b, 0x00, 0x11, 0xe9, 0x6a, 
+	0x08, 0x20, 0xd0, 0x4f, 0x30, 0x40, 0xe9, 0x55, 
+	0xb0, 0x4f, 0xf9, 0x6a, 0x03, 0xef, 0xdf, 0xbf, 
+	0xaf, 0xb8, 0xdf, 0x80, 0x0f, 0x87, 0xd0, 0x18, 
+	0x70, 0x00, 0x10, 0x20, 0xed, 0x6c, 0xdf, 0x84, 
+	0xd0, 0x40, 0x60, 0x7e, 0x00, 0x27, 0xd0, 0x54, 
+	0x70, 0x41, 0x10, 0x60, 0x01, 0xa0, 0xd0, 0x40, 
+	0xa0, 0x78, 0x80, 0x34, 0x80, 0x3f, 0x01, 0x3c, 
+	0xd2, 0x39, 0x00, 0x21, 0xdf, 0x86, 0x0f, 0x87, 
+	0xd0, 0x40, 0x60, 0x4b, 0x03, 0xe6, 0xd0, 0x08, 
+	0xe0, 0x36, 0x50, 0x00, 0x00, 0x28, 0xd0, 0x24, 
+	0x72, 0xc0, 0xd0, 0x40, 0x60, 0x40, 0xd0, 0x0c, 
+	0x52, 0xc0, 0xc0, 0x1c, 0x30, 0x1d, 0xf5, 0x3c, 
+	0x20, 0x1f, 0x30, 0x1e, 0x90, 0x6d, 0x20, 0x01, 
+	0x00, 0x22, 0xd0, 0x58, 0x60, 0x01, 0x00, 0xe3, 
+	0xd0, 0x48, 0x70, 0x41, 0x30, 0x40, 0xf5, 0x47, 
+	0xb2, 0xc8, 0x00, 0xe3, 0xd0, 0x4c, 0x70, 0x41, 
+	0x30, 0x40, 0xfd, 0x4d, 0xb2, 0xc4, 0x00, 0x28, 
+	0xd0, 0x20, 0x70, 0x00, 0x42, 0xc0, 0xa2, 0xc5, 
+	0x12, 0xe0, 0xe9, 0x55, 0x80, 0x40, 0x80, 0x34, 
+	0x80, 0x3f, 0xcf, 0x95, 0x82, 0x34, 0x80, 0x3f, 
+	0x03, 0xe8, 0xd0, 0x00, 0x1f, 0xa3, 0xe9, 0x60, 
+	0x03, 0xea, 0xd0, 0x00, 0x00, 0x27, 0xd0, 0x4c, 
+	0x7f, 0x81, 0x00, 0x27, 0xd0, 0x54, 0x70, 0x41, 
+	0x10, 0x60, 0x03, 0xa0, 0xd0, 0x40, 0xa0, 0x78, 
+	0xe0, 0x3c, 0x50, 0x00, 0xc0, 0x84, 0x10, 0x8c, 
+	0x10, 0x92, 0xd0, 0x41, 0x30, 0x4d, 0x40, 0x43, 
+	0x10, 0x43, 0x20, 0x81, 0xd1, 0x8f, 0x41, 0x82, 
+	0x10, 0x9c, 0x20, 0x9b, 0xc1, 0xc2, 0x10, 0x82, 
+	0x20, 0x87, 0xc0, 0x42, 0x10, 0x43, 0x20, 0x81, 
+	0x10, 0x88, 0x22, 0x02, 0x10, 0x97, 0x01, 0xd0, 
+	0xe9, 0x48, 0xb0, 0x96, 0x10, 0x88, 0x22, 0x82, 
+	0xc0, 0x5c, 0x10, 0x48, 0xc0, 0x84, 0x10, 0x91, 
+	0x10, 0x86, 0x20, 0x42, 0x41, 0x0d, 0x11, 0x02, 
+	0x20, 0x44, 0x22, 0x01, 0x22, 0x81, 0x02, 0xe4, 
+	0xd2, 0x40, 0xc2, 0xca, 0xb2, 0xe0, 0x01, 0xd0, 
+	0xe9, 0x5e, 0xc2, 0xca, 0x22, 0xc9, 0xb2, 0xa0, 
+	0x22, 0x48, 0xd0, 0x78, 0x03, 0x50, 0xf9, 0x69, 
+	0xd0, 0x7c, 0x01, 0x9d, 0xf9, 0x69, 0xc2, 0x48, 
+	0xb2, 0x60, 0xc2, 0xca, 0xb2, 0xf0, 0x11, 0x82, 
+	0x41, 0x81, 0x22, 0x06, 0x11, 0x9f, 0x41, 0x81, 
+	0x22, 0x86, 0x0f, 0xc5, 0xc0, 0x84, 0x10, 0x8c, 
+	0x10, 0x92, 0xd1, 0x8f, 0x41, 0x82, 0x10, 0x9c, 
+	0xc1, 0xdb, 0x11, 0xc1, 0x21, 0xc3, 0x20, 0x87, 
+	0xc1, 0xc2, 0x10, 0x82, 0x20, 0x87, 0xc0, 0x42, 
+	0x10, 0x43, 0x20, 0x81, 0x10, 0x88, 0x22, 0x02, 
+	0x10, 0x97, 0x01, 0xd0, 0xe9, 0x46, 0xb0, 0x96, 
+	0x10, 0x88, 0x22, 0x82, 0xc0, 0x5c, 0x10, 0x48, 
+	0xc0, 0x84, 0x10, 0x91, 0x10, 0x86, 0x20, 0x42, 
+	0xd0, 0x81, 0x41, 0x02, 0x11, 0x02, 0x20, 0x44, 
+	0x22, 0x01, 0x22, 0x81, 0x02, 0xe4, 0xd2, 0x40, 
+	0xc2, 0xca, 0xb2, 0xe0, 0x01, 0xd0, 0xe9, 0x5d, 
+	0xc2, 0xca, 0x22, 0xc9, 0xb2, 0xa0, 0x22, 0x48, 
+	0x11, 0x9f, 0x11, 0x83, 0x22, 0x06, 0x11, 0x9c, 
+	0x11, 0x83, 0x22, 0x86, 0x0f, 0xc5, 0xd0, 0x41, 
+	0x40, 0x44, 0x20, 0x55, 0x10, 0x62, 0xf9, 0x6f, 
+	0x01, 0xb5, 0xd4, 0x00, 0xc2, 0x9f, 0xc2, 0x1f, 
+	0x22, 0x80, 0xe1, 0x30, 0x0f, 0x11, 0xf9, 0x51, 
+	0x90, 0x38, 0x80, 0x3f, 0x00, 0x1b, 0xf9, 0x51, 
+	0x00, 0x27, 0xd0, 0x04, 0x70, 0x40, 0x30, 0x71, 
+	0xf9, 0x51, 0xb0, 0x3c, 0x70, 0x40, 0x30, 0x5d, 
+	0xf9, 0x51, 0xb0, 0x08, 0x70, 0x40, 0xb0, 0x7f, 
+	0x60, 0x40, 0x10, 0x63, 0xe5, 0x5d, 0x02, 0x20, 
+	0xd0, 0x01, 0xa0, 0x37, 0x00, 0x26, 0xd0, 0x24, 
+	0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0xb0, 0x08, 
+	0x70, 0x40, 0xb0, 0x41, 0x60, 0x40, 0x00, 0x26, 
+	0xd0, 0x30, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
+	0xb0, 0x30, 0xd0, 0x40, 0x60, 0x40, 0xb0, 0x3c, 
+	0x6c, 0x40, 0xb0, 0x3c, 0x67, 0x40, 0x00, 0x33, 
+	0xdf, 0xb0, 0xe0, 0x36, 0x00, 0x26, 0xd0, 0x1c, 
+	0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0xb0, 0x3c, 
+	0x70, 0x40, 0xb0, 0x41, 0x60, 0x40, 0x08, 0x20, 
+	0xdf, 0x00, 0x80, 0x35, 0xc0, 0x3c, 0x10, 0x08, 
+	0xa0, 0x0a, 0xa0, 0x27, 0xa0, 0x1b, 0xdf, 0x5c, 
+	0x01, 0xa0, 0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 
+	0x80, 0x34, 0x80, 0x3f, 0x03, 0xbb, 0xd8, 0x1e, 
+	0xcf, 0x95, 0x82, 0x34, 0x80, 0x3f, 0x03, 0xe8, 
+	0xd0, 0x00, 0x1f, 0xa3, 0xe9, 0x55, 0x1f, 0xa0, 
+	0xe9, 0x55, 0x03, 0xea, 0xd0, 0x00, 0x00, 0x21, 
+	0xdf, 0x86, 0xe0, 0x3c, 0x89, 0x78, 0x89, 0x37, 
+	0x00, 0xee, 0xd0, 0x14, 0x76, 0x00, 0xd0, 0x30, 
+	0x76, 0x40, 0x26, 0x58, 0xd6, 0xd9, 0x00, 0xee, 
+	0xd0, 0x20, 0x75, 0x40, 0xd0, 0x1c, 0x71, 0x40, 
+	0xd0, 0x20, 0x71, 0x00, 0xd0, 0x24, 0x70, 0x80, 
+	0xc4, 0x02, 0xd0, 0x28, 0x70, 0xc0, 0x00, 0x21, 
+	0xd0, 0x10, 0x72, 0x00, 0x93, 0x90, 0xd4, 0x81, 
+	0x13, 0x96, 0x43, 0x92, 0x34, 0x8e, 0x00, 0x22, 
+	0xd1, 0xa4, 0x71, 0x86, 0xde, 0x40, 0x7e, 0x79, 
+	0xd0, 0x18, 0x70, 0x40, 0xb0, 0x41, 0xf5, 0x58, 
+	0xd3, 0x42, 0x50, 0x4d, 0x60, 0x40, 0x10, 0x60, 
+	0xe5, 0x62, 0xd0, 0x54, 0x70, 0x01, 0xb0, 0x3c, 
+	0x60, 0x01, 0x04, 0x2d, 0xd0, 0x30, 0xe0, 0x36, 
+	0x00, 0x22, 0xd0, 0x60, 0x71, 0xc1, 0xd0, 0x4f, 
+	0x41, 0xc1, 0x04, 0x20, 0xd0, 0x28, 0xe0, 0x36, 
+	0x50, 0x00, 0x50, 0x00, 0x04, 0x22, 0xd0, 0x18, 
+	0xd3, 0x44, 0x72, 0x8d, 0x12, 0xa0, 0xe8, 0x36, 
+	0xc0, 0x47, 0x10, 0x5d, 0x30, 0x4e, 0xf8, 0x36, 
+	0xb2, 0x3e, 0x60, 0x4d, 0x00, 0xed, 0xd0, 0x48, 
+	0x70, 0x01, 0xde, 0x45, 0x50, 0x39, 0x00, 0x1b, 
+	0xf9, 0x44, 0xb0, 0x01, 0x00, 0x1c, 0xf9, 0x47, 
+	0xb0, 0x04, 0x60, 0x01, 0xd0, 0x40, 0x62, 0x81, 
+	0xce, 0x4a, 0xd0, 0x43, 0x41, 0xc1, 0xd0, 0x58, 
+	0x61, 0xc1, 0x90, 0x43, 0x00, 0xe0, 0xd0, 0x28, 
+	0x70, 0x00, 0x10, 0x1f, 0x20, 0x40, 0xb1, 0xc1, 
+	0xf5, 0x54, 0x00, 0x21, 0xd0, 0x08, 0x60, 0x40, 
+	0x00, 0xe6, 0xd0, 0x40, 0x70, 0x41, 0xd2, 0x94, 
+	0x60, 0x4a, 0x04, 0x2c, 0xd0, 0x08, 0x01, 0x90, 
+	0xf8, 0x36, 0x04, 0x2d, 0xd0, 0x30, 0xe0, 0x36, 
+	0x50, 0x00, 0x50, 0x00, 0xc0, 0x47, 0x10, 0x5d, 
+	0x30, 0x4e, 0xf9, 0x41, 0x90, 0x43, 0x00, 0xe0, 
+	0xd0, 0x28, 0x70, 0x00, 0x20, 0x40, 0x00, 0x21, 
+	0xd0, 0x08, 0x60, 0x40, 0x00, 0x26, 0xd0, 0x74, 
+	0x70, 0x01, 0xb0, 0x3f, 0x60, 0x01, 0x00, 0xed, 
+	0xd0, 0x48, 0x70, 0x41, 0x00, 0x5e, 0xf9, 0x4b, 
+	0x00, 0x21, 0xd0, 0x00, 0x73, 0x80, 0xd4, 0x81, 
+	0x34, 0x8e, 0x00, 0x34, 0xd3, 0x70, 0xe0, 0x36, 
+	0x50, 0x00, 0x50, 0x00, 0xd1, 0x88, 0xd1, 0xc8, 
+	0x01, 0x1b, 0xe9, 0x39, 0x11, 0x9f, 0x11, 0xdf, 
+	0xd4, 0x80, 0xd3, 0x81, 0xe1, 0x43, 0x00, 0xed, 
+	0xd0, 0x08, 0x70, 0x00, 0x00, 0x10, 0xf9, 0x37, 
+	0x0c, 0x1f, 0xf9, 0x36, 0x13, 0xa1, 0xe9, 0x43, 
+	0xbe, 0x7c, 0x00, 0x69, 0xd2, 0x54, 0x12, 0x48, 
+	0xc0, 0x39, 0x30, 0x18, 0xe5, 0x4b, 0xd2, 0x70, 
+	0x72, 0x49, 0x22, 0x79, 0x00, 0x21, 0xd0, 0x00, 
+	0x63, 0x80, 0x04, 0x24, 0xd0, 0x38, 0x02, 0x10, 
+	0xe9, 0x56, 0xd0, 0x41, 0x51, 0x41, 0xe0, 0x36, 
+	0x15, 0x61, 0xe8, 0x36, 0xd5, 0x80, 0xd3, 0x00, 
+	0xd3, 0x40, 0x04, 0x28, 0xd0, 0x18, 0xe0, 0x36, 
+	0x50, 0x00, 0x50, 0x00, 0x00, 0x21, 0xd0, 0x18, 
+	0x73, 0x00, 0xb0, 0x04, 0x73, 0x80, 0xd2, 0x80, 
+	0xb0, 0x38, 0x72, 0xc0, 0x31, 0x0d, 0xc0, 0x0e, 
+	0x10, 0x0b, 0x10, 0x20, 0xe9, 0x42, 0xf5, 0x3f, 
+	0x22, 0x8d, 0x10, 0x01, 0x13, 0x5f, 0xe1, 0x3b, 
+	0x33, 0x8b, 0x15, 0x61, 0xf9, 0x49, 0x00, 0x21, 
+	0xd0, 0x64, 0x70, 0x41, 0x33, 0x81, 0x03, 0xd0, 
+	0xe9, 0x4c, 0x20, 0x0b, 0x13, 0xdf, 0x12, 0xc1, 
+	0x13, 0xe0, 0xf9, 0x49, 0x10, 0x03, 0xc0, 0x50, 
+	0x10, 0x4b, 0x13, 0x0b, 0x23, 0x00, 0x13, 0x20, 
+	0xe9, 0x5c, 0xf5, 0x59, 0x22, 0x81, 0x13, 0x01, 
+	0x10, 0x5f, 0xe1, 0x55, 0x12, 0x99, 0x12, 0x87, 
+	0x21, 0x0a, 0x00, 0xa0, 0xd2, 0x80, 0xc3, 0x0a, 
+	0x03, 0x90, 0xe9, 0x66, 0x22, 0x82, 0x23, 0x03, 
+	0x10, 0x81, 0x10, 0xc1, 0x13, 0x9f, 0x13, 0xa0, 
+	0xed, 0x62, 0xc0, 0x8a, 0xc0, 0xcc, 0x04, 0x26, 
+	0xd0, 0x38, 0xe0, 0x36, 0x15, 0x61, 0xf9, 0x3d, 
+	0x07, 0x32, 0xd0, 0x00, 0x30, 0x03, 0xed, 0x3d, 
+	0xc0, 0x03, 0x10, 0x1d, 0x30, 0xc0, 0xc0, 0x02, 
+	0x10, 0x1d, 0x30, 0x80, 0xe1, 0x32, 0x10, 0x94, 
+	0x10, 0xd4, 0x00, 0x21, 0xd0, 0x20, 0x73, 0x00, 
+	0xc5, 0x8c, 0xd3, 0x4e, 0x01, 0x1b, 0xe9, 0x48, 
+	0x13, 0x1f, 0xd3, 0x4f, 0x43, 0x4c, 0x13, 0x1c, 
+	0xc0, 0x0c, 0x10, 0x03, 0x20, 0x0c, 0xc0, 0x40, 
+	0x10, 0x42, 0x20, 0x40, 0x10, 0x46, 0x20, 0x4d, 
+	0x10, 0x42, 0x2e, 0x41, 0x10, 0x5c, 0x10, 0x43, 
+	0x00, 0x59, 0xe9, 0x5b, 0x01, 0x69, 0xd0, 0x20, 
+	0x30, 0x40, 0x22, 0x41, 0x04, 0x28, 0xd0, 0x18, 
+	0xe0, 0x36, 0x50, 0x00, 0x2c, 0x14, 0xd0, 0x34, 
+	0x63, 0x00, 0xd0, 0x38, 0x72, 0xc0, 0xc0, 0x51, 
+	0x10, 0x5c, 0x30, 0x4b, 0x10, 0x44, 0xd4, 0xc0, 
+	0xd5, 0x00, 0xc0, 0x18, 0x30, 0x39, 0xed, 0x5f, 
+	0xd4, 0xd0, 0xc5, 0x01, 0xd0, 0x18, 0x70, 0x00, 
+	0x0c, 0x1f, 0xe9, 0x48, 0x10, 0x20, 0xfd, 0x48, 
+	0xd4, 0xc0, 0xd5, 0x00, 0x10, 0x22, 0xe5, 0x4e, 
+	0xd4, 0xc0, 0xbc, 0x30, 0xd5, 0x00, 0xb5, 0x10, 
+	0xb0, 0x3f, 0xf9, 0x52, 0x3c, 0x01, 0x3c, 0x01, 
+	0x02, 0x1f, 0xe9, 0x5f, 0x00, 0xa8, 0xd3, 0xc0, 
+	0xd3, 0xa4, 0x00, 0xaa, 0xd0, 0x10, 0x70, 0x4f, 
+	0xb3, 0xfc, 0x60, 0x40, 0xb0, 0x3c, 0xb3, 0x81, 
+	0xed, 0x59, 0x00, 0x21, 0xd0, 0x28, 0x70, 0x00, 
+	0x10, 0x20, 0xf9, 0x69, 0x02, 0x1f, 0xf9, 0x6a, 
+	0x90, 0x10, 0x00, 0x1e, 0xe9, 0x6a, 0xb1, 0x7c, 
+	0x04, 0x2a, 0xd0, 0x18, 0xe0, 0x36, 0x50, 0x00, 
+	0x50, 0x00, 0x50, 0x00, 0x01, 0x5e, 0xf9, 0x35, 
+	0x01, 0x50, 0xe9, 0x35, 0xb1, 0x78, 0xd2, 0x00, 
+	0x01, 0x5c, 0xf9, 0x5f, 0xc0, 0x18, 0x30, 0x39, 
+	0xed, 0x5f, 0x11, 0x9f, 0xce, 0x58, 0xc2, 0x59, 
+	0x00, 0xaa, 0xd2, 0x10, 0x14, 0x82, 0x22, 0x12, 
+	0xc0, 0x0c, 0x10, 0x1f, 0x10, 0x03, 0x22, 0x00, 
+	0x70, 0x48, 0x03, 0x10, 0xe9, 0x4c, 0xb2, 0x38, 
+	0xbe, 0x60, 0xb2, 0x60, 0x2e, 0x41, 0x10, 0x5f, 
+	0x00, 0x59, 0xe9, 0x53, 0x01, 0x69, 0xd0, 0x3c, 
+	0x30, 0x40, 0x22, 0x41, 0x13, 0x41, 0x2e, 0x4d, 
+	0x13, 0x5d, 0x13, 0x43, 0x22, 0x4d, 0x14, 0xe0, 
+	0xe9, 0x5f, 0x33, 0x0b, 0x13, 0x04, 0x2c, 0x0c, 
+	0x35, 0x0c, 0xc3, 0x46, 0xc3, 0x87, 0x04, 0x62, 
+	0xd0, 0x10, 0x15, 0x62, 0xfc, 0x36, 0x04, 0x60, 
+	0xd0, 0x10, 0xe0, 0x36, 0x00, 0x22, 0xd0, 0x74, 
+	0x74, 0x01, 0xb0, 0x7c, 0x74, 0x41, 0xb0, 0x7c, 
+	0x71, 0x41, 0xd1, 0x18, 0xc0, 0x10, 0x10, 0x1c, 
+	0xb0, 0x16, 0xf9, 0x45, 0x00, 0x24, 0xd0, 0x20, 
+	0x30, 0x11, 0xf9, 0x45, 0xb1, 0x70, 0x01, 0x50, 
+	0xf9, 0x45, 0xb1, 0x20, 0x14, 0x41, 0xc0, 0x90, 
+	0x00, 0x2b, 0xd0, 0xd0, 0x01, 0x50, 0xe9, 0x4b, 
+	0xc0, 0xd0, 0x00, 0x35, 0xdc, 0x00, 0x20, 0x11, 
+	0x10, 0x1f, 0xa0, 0x1c, 0x00, 0x21, 0xd0, 0x2c, 
+	0x70, 0x00, 0x10, 0x05, 0x51, 0x40, 0xd0, 0x1c, 
+	0x61, 0x40, 0xd0, 0x20, 0x61, 0x00, 0xd0, 0x24, 
+	0x60, 0x80, 0xd0, 0x28, 0x60, 0xc0, 0x04, 0x2d, 
+	0xd0, 0x30, 0x00, 0x22, 0xd0, 0x64, 0xb1, 0x81, 
+	0x61, 0x81, 0xe0, 0x36, 0x90, 0x50, 0xd0, 0x3c, 
+	0x10, 0x41, 0x60, 0x40, 0x15, 0x62, 0xfd, 0x3d, 
+	0xc0, 0x10, 0x10, 0x1e, 0x10, 0x07, 0x21, 0x00, 
+	0x10, 0x16, 0x34, 0x00, 0xc0, 0x90, 0xd3, 0x40, 
+	0x00, 0x24, 0xd3, 0xc0, 0x04, 0x23, 0xd0, 0x18, 
+	0x01, 0x9f, 0xe8, 0x36, 0xd0, 0x54, 0x70, 0x41, 
+	0x73, 0x41, 0x04, 0x2e, 0xd0, 0x28, 0xe0, 0x36, 
+	0x50, 0x00, 0x50, 0x00, 0x00, 0xef, 0xd3, 0x30, 
+	0x73, 0x0c, 0xd0, 0x0c, 0x70, 0x00, 0xc0, 0x40, 
+	0x13, 0x24, 0xf5, 0x42, 0x13, 0x22, 0xe9, 0x41, 
+	0xe5, 0x43, 0xd3, 0x00, 0x10, 0x22, 0xf9, 0x41, 
+	0xd0, 0x01, 0xd0, 0x43, 0xd3, 0x01, 0x21, 0x00, 
+	0xd3, 0x40, 0x03, 0x10, 0xf9, 0x47, 0xd3, 0x40, 
+	0xe1, 0x61, 0x00, 0x23, 0xd0, 0x00, 0x10, 0x61, 
+	0xe9, 0x50, 0xb0, 0x33, 0x10, 0x63, 0xe9, 0x50, 
+	0x00, 0x22, 0xd0, 0x1a, 0xc3, 0xc0, 0xd2, 0xc0, 
+	0x00, 0x10, 0xe9, 0x55, 0x22, 0xd0, 0x10, 0x1f, 
+	0x14, 0x01, 0x10, 0x20, 0xed, 0x52, 0x14, 0x18, 
+	0x12, 0xd8, 0xc0, 0x8b, 0x32, 0xd0, 0x12, 0xc3, 
+	0x33, 0x4b, 0x13, 0x47, 0x21, 0x0d, 0x04, 0x23, 
+	0xd0, 0x18, 0xe0, 0x36, 0x00, 0x24, 0xd0, 0x30, 
+	0xd0, 0x40, 0x60, 0x40, 0xd3, 0xc7, 0x43, 0xc4, 
+	0x31, 0x0f, 0xd5, 0xd4, 0x25, 0xcf, 0x15, 0xc4, 
+	0x10, 0xdf, 0xc2, 0xc6, 0xc3, 0x07, 0x11, 0x81, 
+	0xb1, 0x3b, 0x15, 0x64, 0xe9, 0x47, 0x10, 0xdf, 
+	0x12, 0xc1, 0x11, 0x81, 0x11, 0xc1, 0xb1, 0x3f, 
+	0xb5, 0xf8, 0x90, 0x10, 0x00, 0x16, 0xf9, 0x5e, 
+	0xb5, 0xfc, 0xd0, 0x20, 0x40, 0x39, 0x2e, 0x4b, 
+	0x22, 0x4c, 0x12, 0x20, 0xe9, 0x59, 0x20, 0x39, 
+	0x00, 0x1b, 0xe9, 0x59, 0x2c, 0x13, 0x35, 0x13, 
+	0x0e, 0x5a, 0xf9, 0x59, 0xb2, 0x38, 0x02, 0xe3, 
+	0xd0, 0x00, 0x0e, 0x5a, 0xe9, 0x5e, 0x2e, 0x40, 
+	0x01, 0xee, 0xd2, 0x80, 0x42, 0x84, 0xc0, 0x03, 
+	0x30, 0x02, 0xf5, 0x6b, 0x31, 0x0a, 0x12, 0x98, 
+	0x20, 0x03, 0xf5, 0x69, 0x12, 0x9f, 0x12, 0x87, 
+	0x51, 0x0a, 0x00, 0x34, 0xd4, 0xf0, 0xe0, 0x36, 
+	0x50, 0x00, 0x50, 0x00, 0xd3, 0xc7, 0x43, 0xc4, 
+	0x15, 0x61, 0xf9, 0x48, 0x10, 0xc1, 0xd5, 0xe0, 
+	0xd1, 0x80, 0xd1, 0xc0, 0x31, 0x0f, 0x13, 0xe1, 
+	0xe9, 0x3c, 0xd3, 0xc0, 0x00, 0x24, 0xd0, 0x30, 
+	0x63, 0xc0, 0x25, 0xcf, 0x15, 0xc2, 0xd0, 0x03, 
+	0x40, 0x16, 0x25, 0xc0, 0x15, 0xc2, 0x15, 0x81, 
+	0x35, 0x91, 0xe1, 0x5c, 0x00, 0x24, 0xd0, 0x30, 
+	0x63, 0xc0, 0x01, 0x50, 0xe9, 0x54, 0x15, 0xa0, 
+	0xf9, 0x55, 0x00, 0x24, 0xd0, 0x34, 0x70, 0x00, 
+	0x10, 0x20, 0xe9, 0x55, 0xd3, 0xc0, 0x31, 0x0f, 
+	0xd5, 0xfc, 0x25, 0xcf, 0x15, 0xc3, 0x14, 0xa0, 
+	0xe9, 0x5c, 0xb5, 0xfc, 0x00, 0x34, 0xd4, 0xf0, 
+	0xe0, 0x36, 0x50, 0x00, 0xc4, 0x91, 0x34, 0x96, 
+	0xed, 0x34, 0xd4, 0x80, 0x14, 0x84, 0xb3, 0xc1, 
+	0xe5, 0x41, 0xc0, 0x52, 0x10, 0x5e, 0x34, 0x81, 
+	0xb3, 0xc1, 0xe5, 0x41, 0xc0, 0x52, 0x10, 0x5c, 
+	0x24, 0x81, 0xb3, 0xc1, 0xe5, 0x37, 0x02, 0xe8, 
+	0xd0, 0x00, 0xb4, 0xb0, 0x14, 0x9b, 0x00, 0x24, 
+	0xd0, 0x60, 0x30, 0x52, 0xed, 0x4a, 0x24, 0x81, 
+	0x20, 0x12, 0xa0, 0x1c, 0x10, 0x8a, 0x50, 0x83, 
+	0xa0, 0x96, 0xa1, 0x50, 0xa1, 0x11, 0xc0, 0x52, 
+	0xd4, 0x84, 0x10, 0x6c, 0xed, 0x56, 0xd4, 0x81, 
+	0xd1, 0x00, 0xb1, 0x17, 0x00, 0x23, 0xd1, 0x40, 
+	0xc2, 0xb9, 0x22, 0x86, 0x12, 0x20, 0xf9, 0x66, 
+	0x02, 0xe3, 0xd0, 0x40, 0x02, 0x9a, 0xe9, 0x63, 
+	0x22, 0x81, 0x02, 0x5a, 0xe9, 0x66, 0x22, 0x41, 
+	0x75, 0xd7, 0xc3, 0xd7, 0xd0, 0xd7, 0x00, 0x21, 
+	0xd0, 0xb6, 0x8b, 0x38, 0x00, 0x33, 0xdd, 0x08, 
+	0xe0, 0x36, 0x50, 0x00, 0xd0, 0x7c, 0x60, 0x01, 
+	0xae, 0x52, 0xd0, 0x60, 0x40, 0x79, 0x00, 0x13, 
+	0xe8, 0xc9, 0xa2, 0x94, 0x22, 0x86, 0x13, 0xe0, 
+	0xe4, 0xd0, 0x13, 0xc1, 0x15, 0x62, 0xfc, 0xd1, 
+	0x13, 0xc1, 0xe0, 0xd1, 0xc3, 0xd7, 0x03, 0xd9, 
+	0xe8, 0xd4, 0x22, 0x8d, 0x15, 0x62, 0xfc, 0xda, 
+	0x03, 0xda, 0xe8, 0xda, 0x22, 0x8d, 0x22, 0x8d, 
+	0xce, 0x4a, 0x22, 0x86, 0x00, 0x14, 0xe8, 0xe0, 
+	0xa2, 0x53, 0x22, 0x47, 0x03, 0xd1, 0xe8, 0xe8, 
+	0x22, 0x4e, 0x15, 0x62, 0xfc, 0xe8, 0x03, 0xd2, 
+	0xe8, 0xe8, 0x22, 0x4e, 0x12, 0x20, 0xe9, 0x09, 
+	0x20, 0x79, 0x00, 0x5b, 0xe8, 0xf4, 0x15, 0x20, 
+	0xfc, 0xf1, 0x2c, 0x13, 0x35, 0x13, 0x0e, 0x5b, 
+	0xe8, 0xf4, 0xb2, 0x38, 0x02, 0x9a, 0xe8, 0xfb, 
+	0x70, 0x08, 0xd0, 0x7c, 0x42, 0x81, 0x22, 0x98, 
+	0x22, 0x80, 0x02, 0x5a, 0xe9, 0x11, 0x70, 0x08, 
+	0xd0, 0x78, 0x42, 0x41, 0x22, 0x59, 0x10, 0x1f, 
+	0x22, 0x40, 0x00, 0x19, 0xe9, 0x11, 0x01, 0x69, 
+	0xd0, 0x7c, 0x32, 0x41, 0xe1, 0x11, 0x02, 0xe3, 
+	0xd0, 0x40, 0x02, 0x9a, 0xe9, 0x0e, 0x22, 0x81, 
+	0x02, 0x5a, 0xe9, 0x11, 0x22, 0x41, 0x0e, 0x5a, 
+	0xe9, 0x15, 0xce, 0x4a, 0x3e, 0x46, 0x0f, 0x87, 
+	0xdd, 0x48, 0xe1, 0x19, 0xdd, 0x40, 0xdc, 0xc8, 
+	0xdd, 0x3c, 0x7d, 0x34, 0x1d, 0x19, 0x3d, 0x35, 
+	0x4d, 0x33, 0x4c, 0xec, 0x3d, 0x33, 0xf9, 0x17, 
+	0x0f, 0xc5, 0x50, 0x00, 0xd0, 0x39, 0xd0, 0x35, 
+	0xd0, 0x1d, 0xd0, 0x2d, 0xd0, 0x3f, 0xd0, 0x2e, 
+	0xd0, 0x3c, 0xd0, 0x37, 0xd0, 0x33, 0xd0, 0x19, 
+	0xd0, 0x33, 0xd0, 0x2e, 0xd0, 0x3d, 0xd0, 0x3e, 
+	0xd0, 0x27, 0xd0, 0x3e, 0xd0, 0x3a, 0xd0, 0x2f, 
+	0xd0, 0x32, 0x00, 0x00, 0x00, 0x00, 0x46, 0x44, 
+	0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x80, 
+	0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0xd0, 
+	0x00, 0x00, 0x02, 0xd0, 0x00, 0x00, 0x00, 0x1e, 
+	0x00, 0x05, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x90, 0x85, 0x00, 0x00, 0xa6, 0xee, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xd0, 
+	0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x08, 0x08, 0xa0, 0x00, 0x08, 0x08, 0x28, 
+	0x00, 0x08, 0x88, 0x68, 0x00, 0x08, 0xa0, 0x98, 
+	0x00, 0x08, 0x88, 0x68, 0x00, 0x08, 0x28, 0x98, 
+	0x00, 0x08, 0xac, 0xf4, 0x00, 0x08, 0xb8, 0x7c, 
+	0x00, 0x02, 0x02, 0x88, 0x00, 0x02, 0x08, 0x22, 
+	0x00, 0x02, 0x88, 0xaa, 0x00, 0x02, 0x22, 0xaa, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x04, 0x24, 0x00, 0x04, 0x04, 0x24, 
+	0x00, 0x04, 0x28, 0x6c, 0x00, 0x04, 0x28, 0x6c, 
+	0x00, 0x01, 0x10, 0x44, 0x00, 0x01, 0x20, 0x44, 
+	0x00, 0x01, 0x11, 0xaa, 0x00, 0x01, 0x88, 0x55, 
+	0x00, 0x01, 0x44, 0xaa, 0x00, 0x01, 0x44, 0x55, 
+	0x00, 0x20, 0x80, 0xa0, 0x00, 0x20, 0x80, 0xc0, 
+	0x00, 0x20, 0x20, 0xa0, 0x00, 0x20, 0x40, 0xc0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x01, 0xe0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x08, 0x10, 0x13, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x08, 0x10, 0x13, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 
+	0x10, 0x10, 0x16, 0x18, 0x1b, 0x1d, 0x22, 0x25, 
+	0x13, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 0x22, 0x26, 
+	0x16, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 0x25, 0x28, 
+	0x16, 0x1a, 0x1b, 0x1d, 0x20, 0x23, 0x28, 0x30, 
+	0x1a, 0x1b, 0x1d, 0x20, 0x23, 0x28, 0x30, 0x3a, 
+	0x1a, 0x1b, 0x1d, 0x22, 0x26, 0x2e, 0x38, 0x45, 
+	0x1b, 0x1d, 0x23, 0x26, 0x2e, 0x38, 0x45, 0x53, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0xd6, 0x00, 0x00, 0x1b, 0x08, 0x00, 
+	0x00, 0x1f, 0xde, 0x00, 0x00, 0x00, 0x50, 0x00, 
+	0x00, 0x08, 0x39, 0x00, 0x00, 0x10, 0x22, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x03, 0x05, 0x28, 0x20, 0x01, 
+	0x00, 0x00, 0x01, 0xe0, 0x71, 0x01, 0x00, 0x68, 
+	0xe0, 0x7f, 0xb0, 0x7f, 0x60, 0x40, 0xe0, 0x1d, 
+	0x90, 0x10, 0xb4, 0x81, 0xe8, 0xc0, 0xe0, 0xc2, 
+	0x90, 0x18, 0x00, 0x8a, 0x70, 0xc0, 0x0f, 0x87, 
+	0xe3, 0xe8, 0xc0, 0x00, 0x70, 0x40, 0xe0, 0x01, 
+	0xe0, 0x86, 0x00, 0x26, 0xd0, 0x28, 0xe0, 0x0e, 
+	0xd0, 0x0e, 0x0f, 0x0b, 0x70, 0x1d, 0xe0, 0x67, 
+	0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 
+	0x0f, 0x87, 0x02, 0x20, 0xd0, 0x01, 0xe0, 0x25, 
+	0x0f, 0x45, 0x6f, 0x81, 0xdf, 0xa6, 0xe0, 0x36, 
+	0xe1, 0x30, 0xa0, 0x37, 0xc0, 0x00, 0xe0, 0x26, 
+	0x00, 0x33, 0xde, 0xc8, 0xe0, 0x32, 0x0f, 0xc5, 
+	0x0f, 0x87, 0x00, 0x27, 0xd0, 0x4c, 0xe0, 0x21, 
+	0x00, 0x33, 0xdf, 0x28, 0x00, 0x27, 0xd0, 0x56, 
+	0x60, 0x01, 0xe0, 0x2d, 0x03, 0xa0, 0xd0, 0x41, 
+	0xa0, 0x78, 0x00, 0x60, 0xd0, 0x41, 0xa0, 0x77, 
+	0x00, 0x22, 0xd0, 0x58, 0xa0, 0x76, 0x00, 0x21, 
+	0xd0, 0x7c, 0x00, 0x4a, 0xd0, 0x72, 0x70, 0x40, 
+	0x00, 0x06, 0x0f, 0x87, 0x00, 0x22, 0xdc, 0xf8, 
+	0xf0, 0x4a, 0xe1, 0x70, 0x07, 0xef, 0xdd, 0xbf, 
+	0x4f, 0x36, 0x1d, 0x99, 0x4d, 0x80, 0x10, 0x18, 
+	0xdd, 0x50, 0x60, 0x35, 0xdd, 0x72, 0xdd, 0x10, 
+	0x3d, 0xb4, 0xec, 0x57, 0x2d, 0x36, 0x1d, 0x03, 
+	0xbd, 0x04, 0xe4, 0x2b, 0x01, 0x46, 0x00, 0x06, 
+	0xac, 0xf6, 0x80, 0x3f, 0x0d, 0x0a, 0x10, 0x02, 
+	0x7d, 0x40, 0x10, 0x1e, 0xb0, 0x20, 0xbc, 0xe0, 
+	0x00, 0x06, 0x00, 0xc6, 0xe0, 0x52, 0xb7, 0x60, 
+	0xb7, 0x60, 0xc0, 0x5d, 0x30, 0x5f, 0xe4, 0x72, 
+	0xc7, 0x5e, 0x00, 0xed, 0xd0, 0x28, 0x70, 0x40, 
+	0xb0, 0x7f, 0x60, 0x40, 0xc0, 0x1d, 0x30, 0x1c, 
+	0xf8, 0x7e, 0x00, 0x21, 0xd0, 0x01, 0x00, 0x26, 
+	0xd0, 0x78, 0xa0, 0x38, 0x80, 0x3f, 0x70, 0x01, 
+	0xb0, 0x3f, 0x60, 0x01, 0x0f, 0x87, 0x80, 0x34, 
+	0x03, 0xef, 0xd8, 0x3f, 0xa8, 0x38, 0x01, 0x35, 
+	0xdc, 0x33, 0xe0, 0x46, 0xc0, 0x1c, 0xe4, 0xa5, 
+	0x97, 0x2e, 0x30, 0x1c, 0xe8, 0x8e, 0x00, 0x21, 
+	0xd0, 0x00, 0xa0, 0x38, 0xc0, 0x5d, 0x00, 0x23, 
+	0xd0, 0x00, 0x30, 0x40, 0x30, 0x5e, 0xe4, 0x99, 
+	0x20, 0x5e, 0xc0, 0x01, 0x30, 0x1c, 0xec, 0xa4, 
+	0xe0, 0x9d, 0x20, 0x5f, 0xc0, 0x1c, 0x30, 0x01, 
+	0xf4, 0xa5, 0xc0, 0x1c, 0x30, 0x1d, 0xec, 0xa4, 
+	0xe4, 0xa5, 0x90, 0x38, 0x00, 0x1b, 0xe8, 0xa5, 
+	0xa0, 0x66, 0xb1, 0x3f, 0xe4, 0xb3, 0xe8, 0xb1, 
+	0xc0, 0x4b, 0x30, 0x44, 0xf8, 0xb3, 0x60, 0x45, 
+	0xb1, 0x7c, 0x01, 0x20, 0xd0, 0x00, 0xa0, 0x05, 
+	0x80, 0x40, 0x72, 0xc5, 0x00, 0x06, 0x90, 0x55, 
+	0xd0, 0x01, 0x00, 0x40, 0xa0, 0x55, 0x0f, 0x87, 
+	0x01, 0x46, 0x00, 0x06, 0x03, 0xef, 0xd0, 0x3f, 
+	0xa0, 0x38, 0xb0, 0x01, 0xa0, 0x37, 0x80, 0x3f, 
+	0x82, 0x34, 0x80, 0x3f, 0xf2, 0x1a, 0x80, 0x34, 
+	0x80, 0x3f, 0xf2, 0x1a, 0xd8, 0x00, 0xd8, 0x40, 
+	0xd8, 0x80, 0xd8, 0xc0, 0xd9, 0x00, 0xd9, 0x40, 
+	0xd9, 0x80, 0xd9, 0xc0, 0xda, 0x00, 0xda, 0x40, 
+	0xda, 0x80, 0xda, 0xc0, 0xdb, 0x00, 0xdb, 0x40, 
+	0xdb, 0x80, 0xdb, 0xc0, 0xdc, 0x00, 0xdc, 0x40, 
+	0xdc, 0x80, 0xdc, 0xc0, 0xdd, 0x00, 0xdd, 0x40, 
+	0xdd, 0x80, 0xdd, 0xc0, 0xde, 0x00, 0xde, 0x40, 
+	0xde, 0x80, 0xde, 0xc0, 0xdf, 0x00, 0xdf, 0x40, 
+	0xdf, 0x80, 0xdf, 0xc0, 0xde, 0x80, 0xde, 0xc1, 
+	0x00, 0x28, 0xd0, 0x60, 0x6e, 0x81, 0x80, 0x00, 
+	0x80, 0x05, 0x00, 0xe3, 0xd1, 0x88, 0x00, 0x73, 
+	0xd5, 0x80, 0x60, 0x06, 0xb1, 0xbc, 0x00, 0xfa, 
+	0xd0, 0x80, 0x60, 0x06, 0x00, 0x26, 0xd0, 0x6c, 
+	0x6e, 0x81, 0x04, 0x32, 0xd2, 0x00, 0x00, 0xee, 
+	0xd1, 0x94, 0x60, 0x06, 0x00, 0xed, 0xd0, 0x50, 
+	0x6e, 0x81, 0x00, 0x22, 0xd0, 0x70, 0x6e, 0x81, 
+	0x00, 0xee, 0xd0, 0x74, 0x6e, 0x81, 0xd0, 0x4c, 
+	0x6e, 0x81, 0xd0, 0x02, 0x00, 0xef, 0xd0, 0x6c, 
+	0x60, 0x01, 0xd0, 0x03, 0x00, 0xef, 0xd0, 0x70, 
+	0x60, 0x01, 0x00, 0xe0, 0xd0, 0x48, 0xd0, 0x02, 
+	0x60, 0x01, 0x00, 0x32, 0xd6, 0xf0, 0xa0, 0x1c, 
+	0x00, 0x21, 0xd0, 0x60, 0xa0, 0x76, 0x00, 0x34, 
+	0xd5, 0x48, 0x80, 0x3f, 0x00, 0x23, 0xd0, 0x5c, 
+	0x00, 0x4a, 0xd0, 0x72, 0x70, 0x40, 0x00, 0x06, 
+	0x00, 0x22, 0xd1, 0xa4, 0x6e, 0xc6, 0xd0, 0x58, 
+	0x6e, 0xc1, 0xd0, 0xc9, 0x00, 0xed, 0xd0, 0x54, 
+	0x60, 0xc1, 0x00, 0x22, 0xd0, 0x40, 0x60, 0xc1, 
+	0x00, 0x22, 0xd0, 0x60, 0x60, 0xc1, 0x82, 0x34, 
+	0x80, 0x3f, 0xd6, 0xd9, 0x01, 0x20, 0xd6, 0x22, 
+	0x16, 0x08, 0xd0, 0x5e, 0xd0, 0x2c, 0x60, 0x40, 
+	0xd0, 0x70, 0x01, 0x74, 0xd6, 0x00, 0x60, 0x01, 
+	0x00, 0x2b, 0xd4, 0x10, 0x00, 0x27, 0xd4, 0x60, 
+	0x00, 0x2b, 0xd0, 0x90, 0xc0, 0xc2, 0xd1, 0x08, 
+	0xd1, 0x44, 0xa1, 0x50, 0x00, 0x21, 0xd0, 0xb6, 
+	0xd0, 0xd7, 0x00, 0x29, 0xd0, 0x04, 0x64, 0x00, 
+	0xb0, 0x3c, 0x64, 0x40, 0x80, 0x34, 0x80, 0x3f, 
+	0xd0, 0x40, 0x00, 0x35, 0xd0, 0x00, 0x60, 0x01, 
+	0xd0, 0x48, 0x6e, 0x81, 0xd0, 0x44, 0x6e, 0x81, 
+	0x00, 0x64, 0xd1, 0x80, 0x6e, 0x86, 0x01, 0x3c, 
+	0xd2, 0x39, 0xe0, 0x46, 0xd0, 0x00, 0xd0, 0x40, 
+	0xd0, 0x80, 0xd0, 0xc0, 0xd1, 0x00, 0xd1, 0x40, 
+	0xd1, 0x80, 0xd1, 0xc0, 0xd2, 0x00, 0xd2, 0x40, 
+	0xd2, 0x80, 0xd2, 0xc0, 0xd3, 0x00, 0xd3, 0x40, 
+	0xd3, 0x80, 0xd3, 0xc0, 0xd4, 0x00, 0xd4, 0x40, 
+	0xd4, 0x80, 0xd4, 0xc0, 0xd5, 0x00, 0xd5, 0x40, 
+	0xd5, 0x80, 0xd5, 0xc0, 0xd6, 0x00, 0xd6, 0x40, 
+	0xd6, 0x80, 0xd6, 0xc0, 0xd7, 0x00, 0xd7, 0x40, 
+	0xd7, 0x80, 0xd7, 0xc0, 0x0f, 0xc5, 0x50, 0x00, 
+	0x01, 0x46, 0x00, 0x06, 0xde, 0x80, 0xde, 0xc1, 
+	0x03, 0x2f, 0xd0, 0x33, 0xa0, 0x38, 0xb0, 0x01, 
+	0xa0, 0x37, 0x80, 0x3f, 0x08, 0x20, 0xdf, 0x00, 
+	0x82, 0x34, 0x80, 0x3f, 0x00, 0xee, 0xd0, 0x08, 
+	0x77, 0xc0, 0xb0, 0x04, 0x77, 0x80, 0xb0, 0x04, 
+	0xc0, 0x5f, 0x30, 0x5e, 0x60, 0x40, 0xd7, 0x00, 
+	0xb7, 0x01, 0x80, 0x34, 0x80, 0x3f, 0x00, 0x60, 
+	0xd0, 0x80, 0x00, 0xec, 0xd0, 0x40, 0x60, 0x81, 
+	0xb0, 0x7c, 0x60, 0x81, 0x00, 0xa0, 0xd0, 0x80, 
+	0xb0, 0x74, 0x60, 0x81, 0xb0, 0x7c, 0x60, 0x81, 
+	0x00, 0x68, 0xd0, 0x80, 0x6e, 0x82, 0x00, 0xef, 
+	0xd0, 0x8c, 0x6e, 0x82, 0x00, 0x06, 0xd0, 0x11, 
+	0xa0, 0x38, 0x80, 0x3f, 0x08, 0x20, 0xd0, 0x40, 
+	0x10, 0x48, 0xa0, 0x4a, 0xa0, 0x5b, 0x0c, 0x20, 
+	0xd0, 0x00, 0x10, 0x08, 0xa0, 0x27, 0xa0, 0x0a, 
+	0x90, 0x4d, 0x0f, 0xff, 0xd8, 0x1f, 0x40, 0x40, 
+	0xa0, 0x4d, 0x80, 0x0a, 0x80, 0x07, 0x80, 0x1b, 
+	0x80, 0x27, 0x00, 0x60, 0xd0, 0x00, 0xa0, 0x09, 
+	0x80, 0x28, 0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 
+	0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 
+	0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 
+	0xd0, 0x00, 0xa0, 0x29, 0x80, 0x2b, 0x02, 0x30, 
+	0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 0x01, 0xb0, 
+	0xd0, 0x10, 0xa0, 0x37, 0x80, 0x3f, 0x02, 0x30, 
+	0xd0, 0x01, 0xa0, 0x38, 0x00, 0xea, 0xd0, 0x00, 
+	0xd0, 0x4e, 0x0f, 0x0b, 0x70, 0x40, 0x00, 0x06, 
+	0x00, 0x21, 0xd0, 0x88, 0x00, 0xe1, 0xd0, 0x60, 
+	0x60, 0x81, 0x00, 0x2b, 0xd0, 0x80, 0x00, 0xe0, 
+	0xd0, 0x6c, 0x60, 0x81, 0xb0, 0x7c, 0x00, 0x27, 
+	0xd0, 0xa0, 0x60, 0x81, 0xb0, 0x7c, 0xd0, 0x82, 
+	0x60, 0x81, 0xb0, 0x7c, 0xd0, 0x85, 0x60, 0x81, 
+	0xb0, 0x7c, 0x03, 0xaa, 0xd0, 0x98, 0x60, 0x81, 
+	0xb0, 0x7c, 0x6e, 0x81, 0x00, 0x27, 0xd0, 0x40, 
+	0x6e, 0x81, 0xb0, 0x7c, 0x6e, 0x81, 0xb0, 0x7c, 
+	0x6e, 0x81, 0x00, 0x27, 0xd1, 0x90, 0x6e, 0x86, 
+	0x00, 0x21, 0xd1, 0xb8, 0x6e, 0x86, 0x00, 0x66, 
+	0xd1, 0xa0, 0xd0, 0x00, 0x01, 0x26, 0xd0, 0x58, 
+	0x30, 0x01, 0x60, 0x06, 0x00, 0xed, 0xd1, 0xbc, 
+	0x6e, 0x86, 0x00, 0xec, 0xd1, 0xb8, 0x6e, 0x86, 
+	0xb1, 0x84, 0x6e, 0x86, 0x00, 0xee, 0xd1, 0x84, 
+	0x70, 0x46, 0x00, 0x65, 0xd1, 0x94, 0x60, 0x46, 
+	0x00, 0x64, 0xd1, 0xbc, 0x6e, 0x86, 0x00, 0x65, 
+	0xd1, 0x80, 0x6e, 0x86, 0xb1, 0xbc, 0x6e, 0x86, 
+	0xb1, 0xbc, 0x6e, 0x86, 0x00, 0xed, 0xd1, 0xa8, 
+	0x6e, 0x86, 0xd0, 0x0e, 0xb1, 0xbc, 0x60, 0x06, 
+	0xb1, 0xbc, 0x60, 0x06, 0x00, 0x65, 0xd1, 0xa4, 
+	0x60, 0x06, 0x00, 0x28, 0xd1, 0xa4, 0x6e, 0x86, 
+	0x00, 0x27, 0xd1, 0x98, 0x6e, 0x86, 0x00, 0x64, 
+	0xd1, 0xa4, 0x6e, 0x86, 0xd2, 0x01, 0x00, 0x64, 
+	0xd0, 0x60, 0x62, 0x01, 0x00, 0x64, 0xd1, 0x80, 
+	0x70, 0x46, 0x6e, 0x86, 0x00, 0xef, 0xd1, 0x98, 
+	0x70, 0x86, 0x08, 0x20, 0xd0, 0xcf, 0x30, 0xc1, 
+	0xea, 0x42, 0xd0, 0x81, 0x00, 0x21, 0xd1, 0xa8, 
+	0x60, 0x86, 0x00, 0xed, 0xd1, 0xa0, 0x6e, 0xc6, 
+	0x00, 0x65, 0xd1, 0x98, 0x6e, 0xc6, 0x00, 0x22, 
+	0xd0, 0x00, 0xa0, 0x05, 0x80, 0x40, 0x00, 0xc6, 
+	0x01, 0x73, 0xd4, 0x3d, 0xe0, 0x46, 0x50, 0x00, 
+	0x08, 0x20, 0xd0, 0x00, 0x5f, 0x00, 0x00, 0x64, 
+	0xd0, 0x60, 0x70, 0xc1, 0x00, 0xec, 0xd0, 0x40, 
+	0x71, 0x81, 0xb0, 0x7c, 0x71, 0xc1, 0xc0, 0x87, 
+	0x30, 0x86, 0xf9, 0x83, 0x10, 0xee, 0xe9, 0x76, 
+	0x10, 0xe1, 0xe9, 0x76, 0xe2, 0x57, 0x00, 0x63, 
+	0xd0, 0xbf, 0x72, 0x06, 0xb1, 0xbc, 0x41, 0x82, 
+	0x02, 0x1b, 0xe9, 0x8d, 0x72, 0x86, 0xb1, 0xbc, 
+	0x41, 0x82, 0xd0, 0x75, 0x30, 0x48, 0xe9, 0xfe, 
+	0xb0, 0x7f, 0xea, 0x00, 0x02, 0x1c, 0xe9, 0x96, 
+	0x15, 0xa3, 0xea, 0x57, 0x10, 0xf0, 0xe9, 0x9a, 
+	0x10, 0xfa, 0xf9, 0xa1, 0x15, 0xa3, 0xea, 0x57, 
+	0x00, 0x21, 0xd0, 0x4c, 0x70, 0x41, 0x10, 0x61, 
+	0xfa, 0x57, 0x00, 0xed, 0xd0, 0x08, 0x70, 0x40, 
+	0xd0, 0x85, 0x40, 0x42, 0x60, 0x40, 0x00, 0x64, 
+	0xd0, 0x64, 0x62, 0x01, 0x12, 0x2b, 0xe9, 0xeb, 
+	0x12, 0x3b, 0xe9, 0xd5, 0x00, 0xec, 0xd0, 0x40, 
+	0x61, 0x81, 0x12, 0x2d, 0xe9, 0xbf, 0x12, 0x30, 
+	0xe9, 0xd4, 0x12, 0x36, 0xe9, 0xd4, 0x12, 0x3a, 
+	0xe9, 0xd4, 0xd0, 0x62, 0x30, 0x48, 0xe9, 0xf2, 
+	0x12, 0x2e, 0xe9, 0xf9, 0xe1, 0x76, 0x00, 0xed, 
+	0xd0, 0x08, 0x70, 0x40, 0xd0, 0x85, 0x40, 0x42, 
+	0x60, 0x40, 0xb0, 0x08, 0x00, 0x21, 0xd0, 0x41, 
+	0x60, 0x40, 0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 
+	0xf2, 0x5a, 0x00, 0xed, 0xd0, 0x20, 0xd0, 0x41, 
+	0x60, 0x40, 0x10, 0xe1, 0xea, 0x3a, 0xe2, 0x57, 
+	0xe2, 0x53, 0x10, 0xee, 0xf9, 0xe9, 0x01, 0x46, 
+	0x82, 0x34, 0x80, 0x3f, 0x97, 0x2e, 0xc7, 0x5c, 
+	0xa7, 0x66, 0x81, 0x34, 0x80, 0x3f, 0x00, 0x21, 
+	0xd0, 0x01, 0xa0, 0x38, 0x00, 0xc6, 0x00, 0x21, 
+	0xd0, 0x15, 0x0b, 0x09, 0x00, 0x4d, 0xb0, 0x01, 
+	0xed, 0xe5, 0xd2, 0x1a, 0xe1, 0xec, 0xf1, 0x18, 
+	0x00, 0xec, 0xd0, 0x40, 0x71, 0x81, 0xd0, 0x4e, 
+	0x60, 0x46, 0xe2, 0x54, 0xc0, 0x0a, 0x10, 0x06, 
+	0x52, 0x80, 0x00, 0xed, 0xd0, 0x40, 0x62, 0x81, 
+	0xe2, 0x53, 0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 
+	0xf2, 0x5a, 0xe1, 0x70, 0x12, 0xa3, 0xf6, 0x57, 
+	0x15, 0xa1, 0xfa, 0x57, 0x12, 0xa0, 0xea, 0x23, 
+	0x00, 0x65, 0xd1, 0x1c, 0xd0, 0x75, 0x30, 0x48, 
+	0xea, 0x0a, 0xb1, 0x3c, 0x71, 0x04, 0x11, 0x20, 
+	0xfa, 0x11, 0x00, 0xec, 0xd0, 0x40, 0x61, 0x81, 
+	0xe2, 0x57, 0x12, 0xa1, 0xea, 0x33, 0x00, 0xe2, 
+	0xd0, 0x60, 0x70, 0x01, 0xb0, 0x7c, 0x70, 0x41, 
+	0x10, 0x0c, 0x50, 0x40, 0x0c, 0x30, 0xd0, 0x00, 
+	0x31, 0x01, 0xee, 0x21, 0x21, 0x00, 0xe6, 0x57, 
+	0xe2, 0x23, 0x31, 0x00, 0xfe, 0x57, 0xd0, 0x75, 
+	0x30, 0x48, 0xea, 0x28, 0xf2, 0x5a, 0xe2, 0x0d, 
+	0x00, 0xec, 0xd0, 0x40, 0x71, 0x81, 0x00, 0x63, 
+	0xd1, 0x3f, 0xb1, 0xbc, 0x41, 0x84, 0x61, 0x81, 
+	0xd0, 0x50, 0x60, 0x46, 0xe2, 0x57, 0x00, 0xed, 
+	0xd0, 0x7c, 0x70, 0x41, 0x08, 0x20, 0xd0, 0x00, 
+	0x10, 0x08, 0xe2, 0x1c, 0xd2, 0x84, 0x00, 0xed, 
+	0xd1, 0xa4, 0x62, 0x86, 0xd5, 0x00, 0xb5, 0x01, 
+	0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0xc7, 0x5e, 
+	0x97, 0x2e, 0x81, 0x34, 0x80, 0x3f, 0x02, 0xe8, 
+	0xd0, 0x30, 0xa0, 0x37, 0xa0, 0x38, 0x08, 0x20, 
+	0xdf, 0x00, 0x80, 0x73, 0x80, 0x3f, 0x00, 0xc6, 
+	0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0xf2, 0x5a, 
+	0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 0x02, 0x3c, 
+	0xda, 0x89, 0xe0, 0x46, 0x00, 0x28, 0xd0, 0x64, 
+	0x70, 0x81, 0x00, 0x22, 0xd0, 0x00, 0x50, 0x80, 
+	0x60, 0x81, 0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 
+	0x00, 0xed, 0xd1, 0xa4, 0x72, 0x86, 0x00, 0xef, 
+	0xd1, 0x90, 0x70, 0x46, 0x10, 0x5c, 0x10, 0x65, 
+	0xed, 0x7d, 0xd0, 0x46, 0xc0, 0x0a, 0x10, 0x40, 
+	0x60, 0x46, 0x00, 0x22, 0xd0, 0x73, 0x30, 0x54, 
+	0xe9, 0x8e, 0x12, 0xa4, 0xe9, 0xb5, 0x15, 0x20, 
+	0xe9, 0xc0, 0xb0, 0x7b, 0xe9, 0xc3, 0xb0, 0x41, 
+	0xe9, 0xc9, 0xc0, 0x54, 0x10, 0x5c, 0x10, 0x6e, 
+	0xe9, 0xc6, 0xe1, 0xb5, 0x00, 0x28, 0xd1, 0xb0, 
+	0xd0, 0x00, 0x60, 0x06, 0x12, 0xa4, 0xf9, 0xb2, 
+	0x00, 0xed, 0xd1, 0x9c, 0x62, 0x86, 0xd2, 0x80, 
+	0x00, 0xed, 0xd1, 0xa4, 0x62, 0x86, 0xd0, 0x02, 
+	0x00, 0xec, 0xd1, 0xbc, 0x60, 0x06, 0x00, 0x64, 
+	0xd1, 0xa0, 0x72, 0x06, 0x12, 0x21, 0xf9, 0xa6, 
+	0xd2, 0x0d, 0x62, 0x06, 0x00, 0xed, 0xd1, 0xa0, 
+	0x61, 0x86, 0xd0, 0x0e, 0x00, 0xed, 0xd1, 0xac, 
+	0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 0x00, 0x65, 
+	0xd1, 0xa4, 0x60, 0x06, 0x01, 0x7e, 0xd2, 0x31, 
+	0xe1, 0xcb, 0x01, 0x46, 0x90, 0x49, 0x00, 0x60, 
+	0xd0, 0x00, 0x50, 0x40, 0xa0, 0x49, 0x80, 0x3f, 
+	0x00, 0xc6, 0x0c, 0x09, 0x05, 0x0d, 0xe1, 0x70, 
+	0x01, 0xbe, 0xde, 0x41, 0xe1, 0xcb, 0x01, 0xbb, 
+	0xd8, 0x10, 0xe1, 0xcb, 0x01, 0xbd, 0xd8, 0x0b, 
+	0xe1, 0xcb, 0x03, 0xb8, 0xda, 0x10, 0x01, 0x46, 
+	0x90, 0x49, 0x00, 0x60, 0xd1, 0x00, 0x50, 0x44, 
+	0x30, 0x44, 0xa0, 0x49, 0x80, 0x3f, 0x00, 0xc6, 
+	0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x01, 0xfa, 0xd2, 0x3d, 0x00, 0x25, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0x00, 0x26, 0xd0, 0x18, 0xd0, 0x40, 
+	0x60, 0x40, 0x00, 0x28, 0xd0, 0x24, 0x70, 0x40, 
+	0xd0, 0x82, 0x50, 0x42, 0x60, 0x40, 0x00, 0xec, 
+	0xd0, 0xa4, 0x70, 0xc2, 0x10, 0xe0, 0xf9, 0x81, 
+	0x00, 0xec, 0xd1, 0x98, 0xd0, 0x41, 0x60, 0x46, 
+	0x70, 0xc2, 0x10, 0xe0, 0xe9, 0x8e, 0xd0, 0x40, 
+	0x60, 0x46, 0xe1, 0x81, 0xd0, 0x40, 0x00, 0xe6, 
+	0xd0, 0x10, 0x60, 0x40, 0xb0, 0x3c, 0x60, 0x40, 
+	0xb0, 0x3c, 0x60, 0x40, 0xd0, 0xe0, 0x00, 0xea, 
+	0xd0, 0x40, 0x00, 0xe8, 0xd0, 0x82, 0x01, 0x46, 
+	0x70, 0x01, 0xb0, 0x7c, 0x60, 0x02, 0xb0, 0xbc, 
+	0x00, 0x06, 0x00, 0xc6, 0xb0, 0xc1, 0xed, 0x9b, 
+	0x80, 0x49, 0xd6, 0x44, 0xd5, 0x43, 0x00, 0xe0, 
+	0xd1, 0x80, 0x00, 0x06, 0x0b, 0x09, 0x01, 0x0d, 
+	0x0b, 0x09, 0x61, 0x06, 0xb1, 0xbc, 0x01, 0x4d, 
+	0x09, 0x09, 0x61, 0x46, 0xb1, 0xbc, 0x00, 0xcd, 
+	0x09, 0x09, 0x10, 0xe4, 0xed, 0xb8, 0x60, 0xc6, 
+	0xb1, 0xbc, 0x00, 0xcd, 0x60, 0xc6, 0x00, 0xed, 
+	0xd0, 0x04, 0x70, 0x00, 0x10, 0x20, 0xf9, 0xd3, 
+	0x10, 0xe3, 0xe9, 0xc4, 0x10, 0xe6, 0xf9, 0xd3, 
+	0x01, 0x46, 0x90, 0x10, 0x00, 0x20, 0xd0, 0x44, 
+	0x50, 0x40, 0x00, 0xc6, 0xa0, 0x50, 0x00, 0xa0, 
+	0xd0, 0x00, 0xa0, 0x05, 0x80, 0x40, 0x00, 0xed, 
+	0xd1, 0xa4, 0xd0, 0x04, 0x60, 0x06, 0x00, 0xee, 
+	0xd1, 0xac, 0x73, 0x86, 0x10, 0xe3, 0xe5, 0xde, 
+	0xe9, 0xe3, 0x00, 0xe7, 0xd0, 0x40, 0x00, 0xae, 
+	0xd0, 0xbb, 0xe1, 0xe7, 0x01, 0x24, 0xd0, 0x6b, 
+	0x00, 0xea, 0xd0, 0xa6, 0xe1, 0xe7, 0x01, 0x21, 
+	0xd0, 0x7b, 0x00, 0xe8, 0xd0, 0x90, 0x13, 0xa0, 
+	0xf9, 0xea, 0xc0, 0x42, 0x00, 0xe0, 0xd1, 0xa8, 
+	0x60, 0x46, 0xb1, 0x98, 0x0b, 0xc9, 0x00, 0x4d, 
+	0x09, 0x09, 0x10, 0x44, 0x00, 0x8d, 0x20, 0x42, 
+	0x10, 0x5f, 0x60, 0x46, 0xb1, 0xb8, 0x00, 0x90, 
+	0xea, 0x17, 0x0a, 0x89, 0x00, 0x8d, 0x60, 0x86, 
+	0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 
+	0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 
+	0x10, 0x60, 0xea, 0x0b, 0x00, 0xe8, 0xd1, 0x80, 
+	0xf2, 0xb0, 0x10, 0x60, 0xfa, 0x17, 0x08, 0x49, 
+	0x00, 0xe0, 0xd1, 0xa4, 0x00, 0x4d, 0x60, 0x46, 
+	0x10, 0x60, 0xea, 0x1b, 0x00, 0xe9, 0xd1, 0x80, 
+	0xf2, 0xb0, 0x10, 0x60, 0xea, 0x1b, 0x00, 0xe0, 
+	0xd1, 0x88, 0xd0, 0x40, 0x60, 0x46, 0xd0, 0x00, 
+	0x00, 0xe0, 0xd1, 0xa8, 0x70, 0x46, 0x00, 0xef, 
+	0xd1, 0x9c, 0x70, 0x86, 0xb0, 0xb0, 0xee, 0x25, 
+	0xd0, 0x81, 0x00, 0x90, 0xea, 0x28, 0x20, 0x01, 
+	0x10, 0x41, 0x10, 0x9f, 0x10, 0xa0, 0xee, 0x25, 
+	0x10, 0x1c, 0x00, 0x65, 0xd1, 0xa8, 0x60, 0x06, 
+	0x01, 0xb4, 0xd4, 0x3a, 0xe0, 0x46, 0x50, 0x00, 
+	0x02, 0x31, 0xdc, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0x0c, 0x09, 0x00, 0x06, 0x05, 0x0d, 
+	0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 0xe9, 0xea, 
+	0xb0, 0x7d, 0xfa, 0x05, 0x09, 0x09, 0x01, 0xcd, 
+	0x11, 0xe1, 0xf9, 0xc7, 0x80, 0x09, 0x80, 0x27, 
+	0x0a, 0x09, 0xd6, 0x45, 0x00, 0xe1, 0xd1, 0xa0, 
+	0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 
+	0x00, 0x4d, 0x60, 0x46, 0x00, 0x50, 0xe9, 0x91, 
+	0xd4, 0x01, 0xb1, 0xbc, 0x08, 0x89, 0x00, 0x4d, 
+	0x60, 0x46, 0x00, 0xe0, 0xd1, 0x80, 0x08, 0x89, 
+	0x00, 0x4d, 0x08, 0x89, 0x10, 0x4c, 0x71, 0x06, 
+	0x21, 0x01, 0x61, 0x06, 0xb1, 0xbc, 0x00, 0x4d, 
+	0x0b, 0x49, 0x10, 0x4c, 0x71, 0x46, 0x21, 0x41, 
+	0x61, 0x46, 0xb1, 0xb0, 0x00, 0x4d, 0x10, 0x5f, 
+	0x60, 0x46, 0xb1, 0xbc, 0x0a, 0x09, 0x00, 0x4d, 
+	0x10, 0x4a, 0x70, 0x86, 0x20, 0x81, 0x60, 0x86, 
+	0x00, 0xe1, 0xd1, 0xac, 0x08, 0x49, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x08, 0x89, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x09, 0x49, 0x00, 0x8d, 
+	0x60, 0x86, 0xc0, 0x02, 0x00, 0xe0, 0xd1, 0xa8, 
+	0x70, 0xc6, 0x10, 0xc0, 0xd0, 0x20, 0x30, 0x01, 
+	0x10, 0xc0, 0x60, 0xc6, 0xe1, 0x75, 0x11, 0xe2, 
+	0xf9, 0x75, 0x00, 0xe2, 0xd1, 0x80, 0x08, 0xc9, 
+	0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 
+	0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x10, 0x60, 
+	0xf9, 0xd7, 0xb1, 0xb4, 0xe1, 0xde, 0xd2, 0x03, 
+	0x0a, 0x09, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
+	0xb2, 0x01, 0xf9, 0xd8, 0x0b, 0xc9, 0x00, 0x4d, 
+	0x10, 0x49, 0x10, 0x56, 0x60, 0x46, 0xb1, 0xbc, 
+	0x0b, 0x89, 0x00, 0x4d, 0x10, 0x4a, 0x10, 0x56, 
+	0x60, 0x46, 0xe1, 0x75, 0x0b, 0x2c, 0xd4, 0x40, 
+	0xf3, 0xb0, 0xe1, 0x77, 0x00, 0xe0, 0xd0, 0x6c, 
+	0x00, 0xe0, 0xd1, 0x80, 0xd0, 0x0a, 0xf1, 0xfe, 
+	0x00, 0xe1, 0xd1, 0xb0, 0xd0, 0x02, 0xf1, 0xfe, 
+	0x00, 0xe0, 0xd1, 0x80, 0x76, 0x86, 0xb1, 0xbc, 
+	0x73, 0x46, 0xe2, 0x3c, 0x70, 0x81, 0x60, 0x86, 
+	0xb1, 0xbc, 0xb0, 0x7c, 0xb0, 0x01, 0xed, 0xfe, 
+	0x0f, 0xc5, 0x00, 0xe1, 0xd1, 0xa0, 0x70, 0x46, 
+	0xd0, 0x8f, 0x40, 0x42, 0x00, 0x25, 0xd0, 0xe0, 
+	0x00, 0x24, 0xd1, 0x20, 0x10, 0x6a, 0xea, 0x1e, 
+	0x00, 0x66, 0xd0, 0xe0, 0x00, 0x62, 0xd1, 0x00, 
+	0x10, 0x66, 0xea, 0x1e, 0x00, 0x6e, 0xd0, 0xc0, 
+	0x10, 0x64, 0xea, 0x1e, 0x00, 0x2b, 0xd0, 0xd0, 
+	0x00, 0x29, 0xd1, 0x00, 0x00, 0xe0, 0xd1, 0x80, 
+	0x76, 0x86, 0x16, 0xa0, 0xe9, 0xee, 0x30, 0xda, 
+	0xe5, 0xee, 0xb1, 0xbc, 0x73, 0x46, 0x13, 0x60, 
+	0xe9, 0xee, 0x31, 0x0d, 0xe5, 0xee, 0xd0, 0x82, 
+	0xb1, 0xbc, 0x70, 0x46, 0x10, 0x60, 0xe9, 0xee, 
+	0xb0, 0x81, 0xee, 0x2c, 0x00, 0xe0, 0xd0, 0x40, 
+	0x00, 0xe0, 0xd1, 0xac, 0xd0, 0x0a, 0xf1, 0xfe, 
+	0x00, 0xe1, 0xd0, 0x70, 0xd0, 0x02, 0xf1, 0xfe, 
+	0x00, 0xec, 0xd1, 0x98, 0xd0, 0x40, 0x60, 0x46, 
+	0x00, 0xe0, 0xd0, 0x8c, 0x70, 0x82, 0x00, 0x21, 
+	0xd0, 0x70, 0x60, 0x81, 0xd0, 0x40, 0x00, 0x25, 
+	0xd0, 0x20, 0x30, 0x1a, 0xfa, 0x50, 0x00, 0x23, 
+	0xd0, 0x30, 0x30, 0x0d, 0xfa, 0x50, 0xd0, 0x41, 
+	0x00, 0x21, 0xd1, 0x84, 0x60, 0x46, 0xb6, 0xb1, 
+	0x16, 0x9c, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
+	0x02, 0x31, 0xdc, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0x00, 0xec, 0xd0, 0xa8, 0x70, 0xc2, 
+	0x10, 0xe0, 0xf9, 0x77, 0x00, 0xec, 0xd1, 0x9c, 
+	0xd0, 0x41, 0x60, 0x46, 0x70, 0xc2, 0x10, 0xe0, 
+	0xe9, 0x84, 0xd0, 0x40, 0x60, 0x46, 0xe1, 0x77, 
+	0x0b, 0x49, 0x00, 0xe2, 0xd1, 0xa0, 0x00, 0x4d, 
+	0x10, 0x5f, 0x00, 0x6f, 0xd0, 0xff, 0x40, 0x43, 
+	0x60, 0x46, 0xb1, 0xbc, 0x0b, 0x09, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x08, 0x89, 0x00, 0x4d, 
+	0x60, 0x46, 0x10, 0x61, 0xf9, 0x9b, 0xd3, 0xc2, 
+	0x00, 0xec, 0xd1, 0xbc, 0x63, 0xc6, 0x0c, 0x09, 
+	0x90, 0x4d, 0x10, 0x60, 0xe5, 0x9c, 0x00, 0x06, 
+	0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 
+	0xf9, 0xa9, 0x0b, 0xa0, 0xd4, 0x40, 0xf3, 0xb0, 
+	0xe1, 0xa0, 0x00, 0xec, 0xd1, 0x9c, 0xd0, 0x40, 
+	0x60, 0x46, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
+	0x0b, 0x09, 0x00, 0x4d, 0x0b, 0x09, 0x00, 0x4d, 
+	0x0a, 0x09, 0x01, 0x4d, 0x0a, 0x09, 0x00, 0x4d, 
+	0x01, 0x59, 0xe9, 0x96, 0x09, 0x09, 0x00, 0x4d, 
+	0x10, 0x5f, 0x10, 0x61, 0xf9, 0x96, 0x09, 0x09, 
+	0x01, 0x4d, 0x11, 0x5f, 0x0b, 0xc9, 0x00, 0x4d, 
+	0xc0, 0x01, 0x10, 0x5f, 0x11, 0x4e, 0x51, 0x41, 
+	0x08, 0x49, 0x00, 0x4d, 0x0b, 0xc9, 0x10, 0x0f, 
+	0x00, 0x4d, 0x50, 0x01, 0x00, 0xed, 0xd1, 0xb6, 
+	0x01, 0x46, 0x00, 0x06, 0xa0, 0x3c, 0xa1, 0x7d, 
+	0x60, 0x06, 0x00, 0xc6, 0xd5, 0x00, 0xb5, 0x01, 
+	0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 
+	0x00, 0xec, 0xd0, 0xac, 0x70, 0xc2, 0x10, 0xe0, 
+	0xf9, 0x70, 0x00, 0xec, 0xd1, 0xa0, 0xd0, 0x41, 
+	0x60, 0x46, 0x70, 0xc2, 0x10, 0xe0, 0xe9, 0x7f, 
+	0xd0, 0x40, 0x60, 0x46, 0xe1, 0x70, 0x0a, 0x89, 
+	0x0b, 0xcd, 0x00, 0xe3, 0xd1, 0x80, 0x6b, 0xc6, 
+	0x08, 0xc9, 0x05, 0x8d, 0x15, 0xa3, 0xee, 0x6e, 
+	0x15, 0xa0, 0xea, 0x6e, 0x90, 0x4d, 0xd0, 0x9f, 
+	0xd0, 0xdf, 0x40, 0x81, 0x10, 0x55, 0x40, 0xc1, 
+	0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0xc8, 0x1d, 
+	0x81, 0x34, 0x80, 0x3f, 0x00, 0xc6, 0xd1, 0x23, 
+	0x31, 0x03, 0x11, 0x02, 0x38, 0x04, 0xb0, 0x8d, 
+	0x10, 0x9d, 0x28, 0x02, 0xc0, 0x60, 0x00, 0x65, 
+	0xd1, 0x94, 0x71, 0x06, 0x68, 0x06, 0x30, 0x44, 
+	0x00, 0xed, 0xd1, 0xa8, 0x70, 0x06, 0x10, 0x20, 
+	0xe9, 0xb0, 0x00, 0xee, 0xd0, 0xc0, 0x70, 0xc3, 
+	0x20, 0x43, 0xb0, 0x01, 0xf9, 0xac, 0x60, 0x06, 
+	0x00, 0x64, 0xd1, 0xbc, 0x71, 0x06, 0xc0, 0x04, 
+	0x21, 0x01, 0x61, 0x06, 0x10, 0x20, 0xf5, 0xbb, 
+	0x11, 0x20, 0xe5, 0xbb, 0xb0, 0x41, 0x00, 0x65, 
+	0xd1, 0x80, 0x71, 0x06, 0x21, 0x01, 0x61, 0x06, 
+	0x00, 0xed, 0xd1, 0xac, 0x71, 0x06, 0x15, 0xa1, 
+	0xe9, 0xcb, 0xb1, 0x3f, 0x61, 0x06, 0x15, 0xa3, 
+	0xf9, 0xd6, 0xd0, 0xbf, 0xe1, 0xd3, 0xd0, 0x40, 
+	0x60, 0x46, 0xb1, 0xbc, 0x70, 0x86, 0x61, 0x06, 
+	0x31, 0x02, 0xe5, 0xd3, 0x20, 0x84, 0x00, 0x65, 
+	0xd1, 0xa4, 0x60, 0x86, 0xd9, 0x40, 0x00, 0xec, 
+	0xd1, 0x94, 0x79, 0x06, 0xb1, 0x84, 0x78, 0xc6, 
+	0xc0, 0x63, 0x30, 0x64, 0xe9, 0xf8, 0x00, 0xa7, 
+	0xd0, 0xff, 0x7a, 0x63, 0x00, 0x65, 0xd0, 0x00, 
+	0x71, 0x00, 0x31, 0x29, 0xe5, 0xf8, 0xc0, 0x63, 
+	0xc8, 0xc1, 0xb0, 0x78, 0x40, 0x43, 0xc0, 0xa4, 
+	0x30, 0x81, 0xe9, 0xf2, 0x7a, 0x41, 0x31, 0x29, 
+	0xf5, 0xe8, 0x21, 0x29, 0x61, 0x00, 0xb8, 0xfc, 
+	0x79, 0x63, 0xb8, 0xfc, 0x48, 0xc3, 0x68, 0xc6, 
+	0x00, 0xed, 0xd1, 0xb8, 0x69, 0x46, 0x80, 0x28, 
+	0x0b, 0xc9, 0x00, 0x4d, 0x08, 0x49, 0x10, 0x41, 
+	0x00, 0xe3, 0xd1, 0x84, 0x00, 0x8d, 0x20, 0x42, 
+	0x60, 0x46, 0x00, 0xee, 0xd1, 0xa4, 0x70, 0x86, 
+	0x10, 0xa1, 0xee, 0x18, 0xe6, 0x6b, 0x90, 0x86, 
+	0x00, 0x90, 0xea, 0x18, 0x00, 0xed, 0xd0, 0x1c, 
+	0x70, 0x80, 0xb0, 0x81, 0xe6, 0x6b, 0x60, 0x80, 
+	0xb1, 0xa8, 0x70, 0x86, 0x10, 0xa0, 0xfa, 0x6b, 
+	0x00, 0x21, 0xd0, 0x38, 0x70, 0x80, 0x10, 0xa0, 
+	0xfa, 0x6b, 0x0f, 0xef, 0xd0, 0xbf, 0x30, 0x81, 
+	0xfa, 0x22, 0x60, 0x00, 0x08, 0x20, 0xd0, 0x00, 
+	0x5f, 0x00, 0x15, 0xa3, 0xea, 0x6b, 0x00, 0xee, 
+	0xd1, 0x80, 0x79, 0x46, 0x00, 0xf8, 0xd0, 0x00, 
+	0xc4, 0x40, 0x00, 0xe3, 0xd1, 0x84, 0x78, 0x46, 
+	0x0f, 0xef, 0xd0, 0x3f, 0x30, 0x21, 0xea, 0x48, 
+	0x00, 0xe0, 0xd1, 0x90, 0x78, 0x06, 0xc0, 0xa1, 
+	0x18, 0x43, 0x28, 0x42, 0x18, 0x43, 0x28, 0x42, 
+	0x18, 0x1e, 0xd8, 0x80, 0x08, 0x11, 0xea, 0x41, 
+	0x28, 0xa1, 0x18, 0x01, 0x18, 0x5f, 0x18, 0x60, 
+	0xee, 0x3e, 0xc0, 0x51, 0x30, 0x62, 0xee, 0x4e, 
+	0xc8, 0x91, 0x18, 0x9f, 0x00, 0x21, 0xd1, 0xb8, 
+	0xd0, 0x01, 0x60, 0x06, 0x00, 0xef, 0xd0, 0x10, 
+	0xd0, 0x72, 0x60, 0x40, 0x01, 0x46, 0x82, 0x34, 
+	0x80, 0x3f, 0xc8, 0xdc, 0xc9, 0x1d, 0x81, 0x34, 
+	0x80, 0x3f, 0x00, 0xc6, 0x38, 0xe4, 0xee, 0x5e, 
+	0xea, 0x52, 0x28, 0xe5, 0x01, 0x46, 0x90, 0x6d, 
+	0x28, 0xc1, 0x00, 0xc6, 0x38, 0xe2, 0xf6, 0x6b, 
+	0xdb, 0x08, 0xf1, 0x16, 0xf1, 0x18, 0x00, 0x21, 
+	0xd1, 0xb4, 0x61, 0x86, 0xe2, 0x52, 0x01, 0xf7, 
+	0xd0, 0x19, 0xe0, 0x46, 0xd5, 0x00, 0xb5, 0x01, 
+	0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 
+	0x02, 0x31, 0xdc, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xdb, 0x09, 0x00, 0xe3, 0xd0, 0x1c, 
+	0x6b, 0x00, 0xda, 0xc1, 0x00, 0xe6, 0xd1, 0x98, 
+	0x70, 0x06, 0xb1, 0x84, 0x60, 0x06, 0xb1, 0x84, 
+	0x60, 0x06, 0x05, 0x9f, 0xe9, 0x9f, 0x08, 0x49, 
+	0xd1, 0x17, 0x46, 0x44, 0x00, 0x4d, 0x10, 0x43, 
+	0x26, 0x41, 0x08, 0xc9, 0x05, 0xcd, 0xb5, 0xc1, 
+	0xe5, 0xcc, 0xc0, 0x57, 0x15, 0xc6, 0x25, 0xc1, 
+	0x15, 0xa3, 0xf9, 0x9f, 0x08, 0x49, 0xd1, 0x0f, 
+	0x46, 0x44, 0x00, 0x4d, 0x10, 0x44, 0x26, 0x41, 
+	0x08, 0xc9, 0x06, 0x0d, 0xb6, 0x01, 0xe5, 0xcc, 
+	0xc0, 0x58, 0x16, 0x06, 0x26, 0x01, 0x08, 0x49, 
+	0x00, 0x4d, 0x10, 0x60, 0xe9, 0xa6, 0x0a, 0x09, 
+	0x00, 0x4d, 0xe1, 0x9f, 0x0c, 0x09, 0x90, 0x4d, 
+	0x10, 0x60, 0xe5, 0xa7, 0x00, 0x06, 0x05, 0x0d, 
+	0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 0xf9, 0xb3, 
+	0xd4, 0x40, 0xf3, 0xb0, 0xe1, 0xab, 0xb0, 0x7d, 
+	0xf9, 0xb8, 0x02, 0x34, 0xd2, 0x44, 0xe0, 0x46, 
+	0x00, 0xec, 0xd1, 0xa0, 0xd0, 0x40, 0x60, 0x46, 
+	0x02, 0x3c, 0xda, 0x89, 0x00, 0xec, 0xd1, 0x80, 
+	0x70, 0x46, 0xb1, 0xbc, 0x70, 0x86, 0x30, 0x81, 
+	0xe8, 0x46, 0x15, 0x63, 0xe9, 0xc9, 0x05, 0x5e, 
+	0xe8, 0x46, 0x01, 0x73, 0xd4, 0x3d, 0xe0, 0x46, 
+	0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 
+	0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0xcc, 0xc0, 0xcd, 0x01, 0xcd, 0x42, 0xcd, 0x83, 
+	0x00, 0xa0, 0xd0, 0x01, 0xa0, 0x38, 0xc8, 0x7f, 
+	0xc8, 0x06, 0xb1, 0xbe, 0xf3, 0x96, 0xc8, 0x80, 
+	0xf3, 0x92, 0x58, 0x80, 0xf3, 0x96, 0xc8, 0xc0, 
+	0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x58, 0xc0, 
+	0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 0x59, 0x40, 
+	0xc0, 0x22, 0xc0, 0x65, 0xc0, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 0x59, 0x00, 
+	0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x96, 0xc9, 0x80, 
+	0xf3, 0x92, 0x59, 0x40, 0xf3, 0x96, 0xc9, 0xc0, 
+	0xf3, 0x92, 0x58, 0x80, 0xc0, 0x23, 0xc0, 0x62, 
+	0xd0, 0x88, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
+	0xc8, 0xc0, 0xf3, 0x92, 0x58, 0xc0, 0xf3, 0x96, 
+	0xc8, 0x80, 0xf3, 0x92, 0x59, 0xc0, 0xc0, 0x24, 
+	0xc0, 0x67, 0xd0, 0x90, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x59, 0x80, 
+	0xf3, 0x96, 0xc9, 0xc0, 0xf3, 0x96, 0xca, 0x00, 
+	0xf3, 0x92, 0x59, 0xc0, 0xf3, 0x96, 0xca, 0x40, 
+	0xf3, 0x92, 0x59, 0x00, 0xc0, 0x25, 0xc0, 0x64, 
+	0xd0, 0x98, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
+	0xc9, 0x40, 0xf3, 0x92, 0x58, 0x80, 0xf3, 0x96, 
+	0xc9, 0x00, 0xf3, 0x92, 0x59, 0x00, 0xc0, 0x23, 
+	0xc0, 0x64, 0xd0, 0x84, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x92, 0x59, 0x40, 
+	0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x5a, 0x40, 
+	0xc0, 0x26, 0xc0, 0x69, 0xd0, 0xa0, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 
+	0x5a, 0x00, 0xf3, 0x96, 0xca, 0x40, 0xf3, 0x92, 
+	0x5a, 0x40, 0xf3, 0x96, 0xca, 0x80, 0xf3, 0x92, 
+	0x59, 0x80, 0xc0, 0x27, 0xc0, 0x66, 0xd0, 0xa8, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0xc0, 
+	0xf3, 0x92, 0x59, 0x00, 0xf3, 0x96, 0xc9, 0x80, 
+	0xf3, 0x92, 0x58, 0xc0, 0xc0, 0x22, 0xc0, 0x63, 
+	0xd0, 0x8c, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x92, 
+	0x59, 0x80, 0xc0, 0x25, 0xc0, 0x66, 0xd0, 0x94, 
+	0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0x80, 
+	0xf3, 0x92, 0x59, 0xc0, 0xf3, 0x96, 0xc8, 0xc0, 
+	0xf3, 0x92, 0x5a, 0x80, 0xc0, 0x28, 0xc0, 0x6a, 
+	0xd0, 0xb0, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
+	0xc9, 0x40, 0xf3, 0x92, 0x59, 0x40, 0xc0, 0x29, 
+	0xc0, 0x65, 0xd0, 0xb8, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 0x58, 0xc0, 
+	0xf3, 0x96, 0xca, 0x00, 0xf3, 0x92, 0x58, 0x80, 
+	0xc0, 0x24, 0xc0, 0x62, 0xd0, 0x9c, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x92, 0x5a, 0x00, 0xc0, 0x27, 
+	0xc0, 0x68, 0xd0, 0xa4, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xca, 0x80, 0xf3, 0x92, 0x59, 0x80, 
+	0xf3, 0x96, 0xca, 0x40, 0xf3, 0x92, 0x5a, 0x40, 
+	0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 0x5a, 0x80, 
+	0xc0, 0x23, 0xc0, 0x6a, 0xd0, 0xac, 0x20, 0x86, 
+	0xf3, 0x9a, 0xf3, 0x92, 0x59, 0x40, 0xc0, 0x26, 
+	0xc0, 0x65, 0xd0, 0xb4, 0x20, 0x86, 0xf3, 0x9a, 
+	0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x59, 0x00, 
+	0xc0, 0x29, 0xc0, 0x64, 0xd0, 0xbc, 0x20, 0x86, 
+	0xf3, 0x9a, 0xc0, 0x33, 0xc0, 0x74, 0xc0, 0xb5, 
+	0xc0, 0xf6, 0xd0, 0x40, 0x00, 0xa0, 0xd8, 0x00, 
+	0xa8, 0x38, 0x08, 0x45, 0x0a, 0x09, 0x00, 0x0d, 
+	0x0f, 0xc5, 0x50, 0x00, 0x0a, 0x09, 0x00, 0x0d, 
+	0x10, 0x08, 0x0f, 0xc5, 0x01, 0x46, 0x00, 0x06, 
+	0xa0, 0x7c, 0xa0, 0x3d, 0x60, 0x42, 0x00, 0xc6, 
+	0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x14, 0x48, 0xd0, 0x81, 0x00, 0xef, 0xd1, 0x8c, 
+	0x71, 0x46, 0x11, 0x60, 0xfb, 0xb1, 0x60, 0x86, 
+	0x71, 0x46, 0x31, 0x42, 0xfb, 0xb1, 0x00, 0xec, 
+	0xd1, 0x0c, 0x74, 0x84, 0x00, 0x68, 0xd0, 0x80, 
+	0x70, 0x02, 0x10, 0x20, 0xfb, 0xc4, 0xc4, 0x82, 
+	0xc4, 0xd2, 0xb4, 0xfc, 0xda, 0x00, 0xda, 0x4f, 
+	0x0a, 0x09, 0x0f, 0xef, 0xd0, 0x3f, 0xb4, 0x7f, 
+	0xca, 0x29, 0x1a, 0x18, 0x4a, 0x00, 0x1a, 0x48, 
+	0x00, 0x8d, 0x2a, 0x42, 0xd0, 0x03, 0x40, 0x11, 
+	0xfb, 0xe3, 0xb4, 0x44, 0x00, 0xa0, 0xd0, 0xc0, 
+	0x30, 0xd3, 0xff, 0xe3, 0xb4, 0xfe, 0x01, 0x46, 
+	0x00, 0x06, 0xaa, 0x3d, 0xaa, 0x7c, 0x6a, 0x53, 
+	0x00, 0xc6, 0xb4, 0xfe, 0xb4, 0x7c, 0x1a, 0x61, 
+	0xfb, 0xc8, 0xb4, 0x43, 0x00, 0xef, 0xd0, 0x3f, 
+	0x40, 0x11, 0xeb, 0xf7, 0xb0, 0xc4, 0xe7, 0xf7, 
+	0xeb, 0xee, 0x61, 0x53, 0x64, 0x52, 0x64, 0xc4, 
+	0x00, 0x28, 0xd1, 0x24, 0x70, 0x04, 0x00, 0x21, 
+	0xd0, 0x80, 0x50, 0x02, 0x60, 0x04, 0x61, 0x46, 
+	0x0a, 0x09, 0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 
+	0x02, 0x31, 0xdc, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0x01, 0xfa, 0xd2, 0x3d, 0x00, 0x25, 
+	0xdc, 0xd8, 0xf0, 0x4a, 0x09, 0x09, 0x01, 0xcd, 
+	0x11, 0xe8, 0xf9, 0xe2, 0x00, 0xe3, 0xd1, 0x9c, 
+	0x09, 0x09, 0x05, 0xcd, 0xb5, 0xc1, 0x09, 0x09, 
+	0x00, 0x4d, 0xb0, 0x41, 0x10, 0x46, 0x25, 0xc1, 
+	0x09, 0x09, 0x06, 0x0d, 0xb6, 0x01, 0x09, 0x09, 
+	0x00, 0x4d, 0x08, 0x89, 0xb0, 0x41, 0x10, 0x46, 
+	0x26, 0x01, 0x00, 0x8d, 0x08, 0x89, 0x10, 0x82, 
+	0xd0, 0x04, 0xc0, 0x55, 0x00, 0x40, 0x40, 0x40, 
+	0x05, 0x4d, 0x08, 0x49, 0x0b, 0x0d, 0xd1, 0x00, 
+	0x15, 0x63, 0xe9, 0xa2, 0xd1, 0x01, 0x55, 0x41, 
+	0xdb, 0x01, 0x4b, 0x15, 0xa1, 0x1b, 0x08, 0x89, 
+	0x00, 0x4d, 0x08, 0x49, 0x10, 0x41, 0xd1, 0x19, 
+	0x46, 0x44, 0x26, 0x41, 0x00, 0xcd, 0x08, 0x49, 
+	0x10, 0xc4, 0x00, 0x4d, 0x08, 0x49, 0x10, 0x41, 
+	0x20, 0x81, 0xa0, 0x89, 0x00, 0x4d, 0x10, 0x43, 
+	0x20, 0xc1, 0xa0, 0xe8, 0x08, 0x49, 0x00, 0x4d, 
+	0x1b, 0x03, 0x5b, 0x01, 0xbb, 0x3f, 0x6b, 0x06, 
+	0x08, 0x49, 0xb1, 0xbc, 0x00, 0x4d, 0x60, 0x46, 
+	0x08, 0x49, 0xb1, 0xbc, 0x0a, 0xcd, 0x1a, 0xc2, 
+	0x4a, 0xd9, 0x1a, 0xde, 0x6a, 0xc6, 0x08, 0x49, 
+	0xb1, 0xbc, 0x00, 0x4d, 0x60, 0x46, 0x10, 0x60, 
+	0xea, 0x3e, 0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x08, 0xc9, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x09, 0xc9, 0x00, 0x4d, 
+	0x60, 0x46, 0xb1, 0xbc, 0x0a, 0x09, 0x00, 0x4d, 
+	0x60, 0x46, 0xe2, 0x3e, 0x11, 0xe3, 0xfa, 0x00, 
+	0x00, 0xe7, 0xd0, 0xc0, 0xd0, 0x84, 0xb0, 0x81, 
+	0xe6, 0x3e, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x43, 
+	0xb0, 0xfc, 0x10, 0x60, 0xe9, 0xe7, 0x10, 0xa3, 
+	0xf9, 0xf4, 0x00, 0xe8, 0xd1, 0x80, 0xe1, 0xf8, 
+	0x10, 0xa2, 0xf9, 0xfa, 0x00, 0xe9, 0xd1, 0x80, 
+	0xf2, 0xb0, 0xe1, 0xe7, 0xd2, 0x3f, 0x0a, 0x09, 
+	0x00, 0x4d, 0xb2, 0x01, 0xf5, 0xfb, 0xe1, 0xe7, 
+	0x11, 0xe7, 0xfa, 0x3e, 0xd4, 0x01, 0x00, 0xe1, 
+	0xd0, 0x24, 0x70, 0x00, 0x10, 0x21, 0xea, 0x0d, 
+	0x15, 0x63, 0xfa, 0x0d, 0xd4, 0x03, 0x44, 0x2c, 
+	0xb4, 0x3f, 0x00, 0xe6, 0xd1, 0x90, 0x0b, 0x09, 
+	0x00, 0x4d, 0x09, 0x49, 0x10, 0x45, 0x00, 0x8d, 
+	0x50, 0x81, 0xd0, 0x40, 0x10, 0x87, 0x10, 0x98, 
+	0x30, 0x42, 0xf2, 0x61, 0x60, 0x46, 0xb1, 0xbc, 
+	0x0b, 0x09, 0x00, 0x0d, 0x09, 0x49, 0x00, 0x0d, 
+	0xb4, 0x01, 0xfa, 0x0f, 0x00, 0xe6, 0xd0, 0x18, 
+	0x30, 0x06, 0xe6, 0x29, 0x60, 0x46, 0xb1, 0xbc, 
+	0xe2, 0x22, 0x00, 0xe0, 0xd1, 0x88, 0x70, 0x46, 
+	0x10, 0x63, 0xea, 0x39, 0x10, 0x64, 0xea, 0x39, 
+	0x00, 0xe6, 0xd1, 0x90, 0xd0, 0x00, 0x60, 0x06, 
+	0xb1, 0xbc, 0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 
+	0xe2, 0x3e, 0x00, 0xef, 0xd1, 0x84, 0x70, 0x46, 
+	0x10, 0x60, 0xfa, 0x30, 0x0c, 0x09, 0x90, 0x4d, 
+	0x10, 0x60, 0xe6, 0x3f, 0x00, 0x06, 0x05, 0x0d, 
+	0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 0xfa, 0x4b, 
+	0xd4, 0x40, 0xf3, 0xb0, 0xe2, 0x43, 0xb0, 0x7d, 
+	0xe9, 0x7a, 0x00, 0xec, 0xd1, 0xa0, 0xd0, 0x40, 
+	0x60, 0x46, 0x02, 0x3c, 0xda, 0x89, 0x00, 0xec, 
+	0xd1, 0x80, 0x70, 0x46, 0xb1, 0xbc, 0x70, 0x86, 
+	0x30, 0x81, 0xe8, 0x46, 0x15, 0x63, 0xea, 0x5e, 
+	0x05, 0x5e, 0xe8, 0x46, 0x01, 0x73, 0xd4, 0x3d, 
+	0xe0, 0x46, 0x00, 0xe0, 0xd0, 0x00, 0x70, 0xc0, 
+	0x10, 0xc1, 0x00, 0xe0, 0xd0, 0x08, 0x70, 0x00, 
+	0x10, 0x23, 0xea, 0x75, 0xc0, 0x83, 0x10, 0x9d, 
+	0x30, 0xc2, 0x10, 0x9f, 0x30, 0xc2, 0x00, 0xef, 
+	0xd0, 0xac, 0x70, 0x82, 0x10, 0xa3, 0xea, 0x75, 
+	0x10, 0xc1, 0xc0, 0x83, 0x30, 0x81, 0xe6, 0x7e, 
+	0xc0, 0x83, 0x20, 0x81, 0xf6, 0x7f, 0xd0, 0x40, 
+	0x30, 0x43, 0x0f, 0xc5, 0xc0, 0x43, 0x0f, 0xc5, 
+	0x00, 0xed, 0xd1, 0xa4, 0x72, 0x86, 0x15, 0xa3, 
+	0xee, 0x23, 0x15, 0xa1, 0xe6, 0x23, 0x08, 0x20, 
+	0xd0, 0x00, 0x5f, 0x00, 0xd8, 0xc4, 0x15, 0x63, 
+	0xe9, 0x7e, 0x48, 0xd5, 0x18, 0xde, 0x18, 0xe0, 
+	0xe9, 0xc2, 0x00, 0xed, 0xd1, 0xb4, 0x79, 0xc6, 
+	0x19, 0xe0, 0xe9, 0x8c, 0x00, 0xed, 0xd0, 0x3a, 
+	0x79, 0xc6, 0x69, 0xc0, 0xd9, 0xc0, 0x69, 0xc6, 
+	0x00, 0xed, 0xd0, 0x38, 0x79, 0x40, 0x19, 0x60, 
+	0xe9, 0x98, 0x00, 0x28, 0xd0, 0x24, 0x70, 0x40, 
+	0x02, 0x20, 0xd0, 0x80, 0x50, 0x42, 0x60, 0x40, 
+	0x15, 0xa3, 0xe9, 0x9f, 0x00, 0xec, 0xd1, 0xb8, 
+	0x79, 0xc6, 0x69, 0x46, 0xc9, 0x67, 0x00, 0xec, 
+	0xd9, 0xb4, 0x70, 0x66, 0x00, 0xec, 0xd1, 0xbc, 
+	0x70, 0x06, 0x10, 0x20, 0xed, 0xbe, 0x10, 0x60, 
+	0xe9, 0xc1, 0x00, 0xe0, 0xda, 0xa8, 0x7a, 0xaa, 
+	0xc0, 0x2a, 0x10, 0x1f, 0x00, 0x22, 0xd0, 0xa0, 
+	0x70, 0x82, 0x20, 0x6a, 0x00, 0x9f, 0xe9, 0xb5, 
+	0x20, 0x40, 0x19, 0x60, 0xf9, 0xb8, 0xc9, 0x41, 
+	0xb0, 0x48, 0x30, 0x65, 0xf5, 0xbd, 0xb0, 0x70, 
+	0xed, 0xbe, 0xd9, 0x40, 0x00, 0xed, 0xd1, 0xbc, 
+	0x69, 0x46, 0x69, 0x66, 0x12, 0xa4, 0xea, 0x21, 
+	0x00, 0xec, 0xd1, 0xbc, 0x73, 0xc6, 0x15, 0xa3, 
+	0xe9, 0xdf, 0x33, 0xe3, 0xe5, 0xd3, 0xed, 0xd2, 
+	0x63, 0xc6, 0x00, 0x21, 0xd1, 0xa8, 0x63, 0xc6, 
+	0x00, 0xed, 0xd1, 0xa0, 0x63, 0xc6, 0x15, 0xa1, 
+	0xf9, 0xdc, 0x12, 0xa3, 0xe5, 0xe3, 0xd3, 0xc2, 
+	0x00, 0xec, 0xd1, 0xbc, 0x63, 0xc6, 0xe1, 0xe3, 
+	0x12, 0xa3, 0xea, 0x21, 0xe1, 0xe3, 0x12, 0xa2, 
+	0xf6, 0x21, 0x13, 0xe0, 0xfa, 0x21, 0x00, 0xee, 
+	0xd1, 0x8c, 0x78, 0x06, 0xb1, 0xbc, 0x78, 0x46, 
+	0xb1, 0xbc, 0x78, 0x86, 0xd1, 0x88, 0x72, 0x46, 
+	0xd1, 0x84, 0x73, 0x06, 0x13, 0x20, 0xf9, 0xe3, 
+	0x00, 0x64, 0xd1, 0xa0, 0x70, 0x46, 0xd0, 0xa2, 
+	0x30, 0x81, 0xe9, 0xff, 0x10, 0x70, 0xea, 0x11, 
+	0x10, 0x6d, 0xea, 0x14, 0x10, 0x76, 0xea, 0x19, 
+	0x10, 0x7a, 0xea, 0x28, 0xe2, 0x3b, 0x18, 0xe0, 
+	0xea, 0x3b, 0x00, 0xed, 0xd1, 0x80, 0x70, 0x86, 
+	0xb0, 0x81, 0xd0, 0x3f, 0x40, 0x02, 0x10, 0x20, 
+	0xea, 0x0c, 0x60, 0x86, 0xf3, 0x8a, 0xe1, 0xe3, 
+	0xc0, 0x02, 0x10, 0x1a, 0x50, 0x80, 0x60, 0x86, 
+	0xe2, 0x3b, 0x15, 0xa3, 0xea, 0x21, 0xe2, 0xe9, 
+	0xd2, 0x80, 0x00, 0xed, 0xd1, 0xa4, 0x62, 0x86, 
+	0xe3, 0x0c, 0x00, 0xed, 0xd1, 0x88, 0xd0, 0x60, 
+	0x70, 0x06, 0x50, 0x40, 0x60, 0x46, 0x15, 0xa3, 
+	0xfb, 0x0c, 0xd5, 0x84, 0xe3, 0x0c, 0xd5, 0x00, 
+	0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
+	0x00, 0xed, 0xd1, 0x88, 0xd0, 0x60, 0x70, 0x06, 
+	0x50, 0x40, 0x60, 0x46, 0x15, 0xa2, 0xe7, 0x0c, 
+	0xee, 0x21, 0x00, 0x21, 0xd1, 0x8c, 0x18, 0xe0, 
+	0xfa, 0x39, 0x70, 0x46, 0x10, 0x61, 0xea, 0x70, 
+	0xe2, 0x21, 0x65, 0x86, 0xe2, 0x21, 0x18, 0xe0, 
+	0xea, 0x70, 0xd1, 0x80, 0x73, 0x06, 0x15, 0xa2, 
+	0xee, 0x68, 0x00, 0x22, 0xd1, 0x80, 0x70, 0x46, 
+	0x6b, 0x06, 0xcb, 0x01, 0xb1, 0xb4, 0x70, 0x46, 
+	0x6a, 0xc6, 0xca, 0xc1, 0x00, 0x65, 0xd1, 0x98, 
+	0x70, 0x46, 0x10, 0x61, 0xfa, 0x50, 0x02, 0x41, 
+	0xc3, 0x21, 0xc7, 0xe0, 0x02, 0x50, 0xea, 0x56, 
+	0xc3, 0x20, 0xc7, 0xe1, 0xd1, 0x88, 0xd0, 0x01, 
+	0x02, 0x40, 0x62, 0x46, 0x0f, 0xef, 0xd0, 0x7f, 
+	0x30, 0x6f, 0xfa, 0x5f, 0xc3, 0x20, 0xc7, 0x4c, 
+	0xd0, 0x00, 0x00, 0x65, 0xd1, 0x98, 0x70, 0x46, 
+	0x60, 0x06, 0xb0, 0x41, 0x43, 0x01, 0xe2, 0x70, 
+	0xc3, 0x22, 0xc7, 0xcc, 0xc7, 0x60, 0xc7, 0xa1, 
+	0x02, 0x50, 0xea, 0x70, 0xc7, 0x61, 0xc7, 0xa0, 
+	0xdb, 0x80, 0xd1, 0x00, 0x00, 0xef, 0xd1, 0xa8, 
+	0x70, 0x46, 0x10, 0x60, 0xfa, 0x7a, 0x00, 0xe0, 
+	0xd1, 0x88, 0x70, 0x46, 0x00, 0x22, 0xd1, 0xb0, 
+	0x70, 0x86, 0x30, 0x81, 0xea, 0x82, 0x60, 0x46, 
+	0xd0, 0x20, 0xf3, 0x06, 0x10, 0x63, 0xea, 0x87, 
+	0x10, 0x64, 0xea, 0x87, 0xe2, 0x95, 0x00, 0xef, 
+	0xd1, 0x6c, 0x71, 0x45, 0xc0, 0x05, 0x30, 0x01, 
+	0xf6, 0x95, 0xdb, 0x82, 0xd1, 0x01, 0x10, 0x63, 
+	0xea, 0x95, 0xd1, 0x02, 0x11, 0x62, 0xea, 0x95, 
+	0xd1, 0x03, 0xd1, 0x8c, 0x61, 0x06, 0xdb, 0x40, 
+	0x00, 0xe0, 0xd0, 0x00, 0x71, 0x00, 0xc0, 0x84, 
+	0x10, 0x9c, 0xb0, 0x96, 0xfa, 0xa0, 0xb1, 0x38, 
+	0xb0, 0x96, 0xfa, 0xa3, 0xb1, 0x30, 0x00, 0x29, 
+	0xd1, 0x84, 0x00, 0x22, 0xd0, 0x74, 0x70, 0x86, 
+	0x70, 0xc1, 0x61, 0x06, 0x30, 0xc2, 0xea, 0xae, 
+	0x60, 0x81, 0xdb, 0x41, 0xb0, 0x3c, 0xb1, 0xbc, 
+	0xb0, 0x7c, 0x71, 0x00, 0x70, 0x86, 0x70, 0xc1, 
+	0x61, 0x06, 0x30, 0xc2, 0xea, 0xb9, 0x60, 0x81, 
+	0xdb, 0x41, 0x00, 0xee, 0xd1, 0xb4, 0x70, 0x06, 
+	0xb1, 0xbc, 0x70, 0x46, 0x30, 0x40, 0xea, 0xc2, 
+	0x60, 0x06, 0xdb, 0x41, 0x00, 0x23, 0xd0, 0x70, 
+	0x30, 0x81, 0xea, 0xc7, 0x30, 0x81, 0x50, 0x02, 
+	0xea, 0xca, 0xd0, 0x01, 0x00, 0x22, 0xd1, 0xbc, 
+	0x70, 0x86, 0x30, 0x80, 0xea, 0xd2, 0x60, 0x06, 
+	0xd0, 0x10, 0xf3, 0x06, 0x00, 0x22, 0xd1, 0xa4, 
+	0x71, 0x06, 0xd0, 0x01, 0x41, 0x00, 0x5b, 0x44, 
+	0x5b, 0x6e, 0x6b, 0x46, 0x00, 0x28, 0xd0, 0x70, 
+	0x70, 0x41, 0x10, 0x62, 0xfa, 0xe6, 0xd1, 0x84, 
+	0x70, 0x06, 0x10, 0x20, 0xfa, 0xdf, 0x00, 0x22, 
+	0xd0, 0x00, 0xf3, 0x06, 0x02, 0x7d, 0xdc, 0x62, 
+	0xe0, 0x46, 0x00, 0xed, 0xd1, 0x88, 0x71, 0x06, 
+	0x01, 0x1f, 0xfa, 0xfd, 0xd0, 0x41, 0x41, 0x01, 
+	0xd0, 0x62, 0x00, 0x65, 0xd0, 0x30, 0x70, 0x00, 
+	0x10, 0x21, 0xea, 0xfa, 0xee, 0xf9, 0x1a, 0xe1, 
+	0xfa, 0xfa, 0xd0, 0x52, 0x51, 0x01, 0x61, 0x06, 
+	0xe3, 0x0c, 0x18, 0xe0, 0xea, 0x70, 0xc7, 0x60, 
+	0xc7, 0xe1, 0x02, 0x50, 0xea, 0x70, 0xc7, 0x61, 
+	0xc7, 0xe0, 0xe2, 0x70, 0x00, 0x28, 0xdc, 0xa4, 
+	0x7c, 0x72, 0x5c, 0x40, 0x6c, 0x72, 0x0f, 0xc5, 
+	0x18, 0xe0, 0xeb, 0x82, 0xd9, 0x0d, 0x00, 0xee, 
+	0xd1, 0xa4, 0x70, 0x06, 0x10, 0x21, 0xfb, 0x7f, 
+	0xd9, 0x0c, 0x90, 0x06, 0x00, 0x10, 0xeb, 0x7f, 
+	0x00, 0x21, 0xd1, 0x88, 0x7a, 0x06, 0x1a, 0x20, 
+	0xeb, 0x7f, 0xd9, 0x00, 0x00, 0xed, 0xd1, 0xbc, 
+	0x79, 0x46, 0x19, 0x60, 0xeb, 0x7f, 0x39, 0x68, 
+	0xc0, 0xe5, 0xc0, 0x25, 0x10, 0x13, 0xb0, 0x0f, 
+	0xef, 0x7f, 0xb0, 0x22, 0xe7, 0x7f, 0x00, 0xe0, 
+	0xd1, 0xa8, 0x71, 0x46, 0x11, 0x5f, 0x29, 0x45, 
+	0x00, 0x22, 0xd0, 0x18, 0x00, 0x22, 0xd4, 0x54, 
+	0x00, 0x22, 0xd0, 0x9c, 0x70, 0x00, 0x74, 0x51, 
+	0x70, 0x42, 0x34, 0x40, 0xe7, 0x3c, 0xd0, 0x40, 
+	0x00, 0x22, 0xd4, 0x50, 0x74, 0x51, 0x34, 0x40, 
+	0xef, 0x42, 0x20, 0x45, 0x60, 0x42, 0x39, 0x41, 
+	0x19, 0x60, 0xf7, 0x5e, 0x00, 0x65, 0xd1, 0xa8, 
+	0x7a, 0x86, 0x29, 0x6a, 0x19, 0x59, 0xb9, 0x7e, 
+	0xf7, 0x75, 0x15, 0xa3, 0xf7, 0x57, 0x00, 0xed, 
+	0xd1, 0xac, 0x70, 0x06, 0x00, 0xed, 0xd1, 0xb0, 
+	0x70, 0x46, 0x30, 0x01, 0xfb, 0x7f, 0x00, 0x65, 
+	0xd1, 0x84, 0x70, 0x46, 0xb0, 0x7f, 0x60, 0x46, 
+	0xd5, 0x84, 0xe3, 0x7f, 0x11, 0x41, 0xd0, 0x4a, 
+	0x00, 0xed, 0xd1, 0xa0, 0x74, 0x46, 0xd0, 0x00, 
+	0x60, 0x06, 0x30, 0xc5, 0x39, 0x45, 0xe7, 0x6e, 
+	0x14, 0x60, 0xeb, 0x6b, 0xf3, 0x85, 0xb0, 0x41, 
+	0xef, 0x65, 0xe3, 0x71, 0x00, 0x66, 0xd1, 0xa0, 
+	0x60, 0xc6, 0x15, 0xa3, 0xeb, 0x7f, 0xf3, 0x85, 
+	0xe3, 0x7f, 0xd9, 0x01, 0x00, 0x66, 0xd1, 0xa0, 
+	0x70, 0x06, 0x30, 0x03, 0xe7, 0x7e, 0x10, 0x1d, 
+	0x10, 0x3b, 0xe7, 0x7f, 0x60, 0xc6, 0x00, 0x66, 
+	0xd1, 0xa4, 0x69, 0x06, 0x15, 0xa4, 0xea, 0x23, 
+	0xe2, 0x3b, 0x00, 0x65, 0xdd, 0x08, 0x7c, 0xf4, 
+	0xbc, 0xff, 0x6c, 0xf4, 0x00, 0xef, 0xdd, 0x10, 
+	0x7c, 0xf4, 0xbc, 0xfe, 0x6c, 0xf4, 0xc0, 0x3f, 
+	0xf1, 0x18, 0xf1, 0x16, 0xf1, 0x18, 0x00, 0x05, 
+	0x08, 0x20, 0xd0, 0x40, 0x5f, 0x01, 0x15, 0x63, 
+	0xe9, 0x77, 0x05, 0x5e, 0xea, 0xf2, 0x00, 0x22, 
+	0xd1, 0xa0, 0x6b, 0x06, 0x00, 0x22, 0xd1, 0xa8, 
+	0x6b, 0xc6, 0x00, 0x22, 0xd1, 0xac, 0x6a, 0xc6, 
+	0x00, 0xee, 0xd0, 0x0c, 0x00, 0xe6, 0xd1, 0x9c, 
+	0x70, 0x40, 0x30, 0x5f, 0xe9, 0x8d, 0xb0, 0x3c, 
+	0xb1, 0xb4, 0x70, 0x40, 0x30, 0x5f, 0xe9, 0x8d, 
+	0xb1, 0xb4, 0x00, 0xe6, 0xd0, 0x10, 0xd0, 0x83, 
+	0x70, 0x40, 0x60, 0x46, 0xb0, 0x3c, 0xb1, 0xbc, 
+	0xb0, 0x81, 0xed, 0x90, 0x00, 0xee, 0xd0, 0x0c, 
+	0x00, 0xe6, 0xd1, 0x9c, 0x70, 0x40, 0x30, 0x4c, 
+	0xe9, 0xa3, 0xb0, 0x3c, 0xb1, 0xb4, 0x70, 0x40, 
+	0x30, 0x4c, 0xe9, 0xa3, 0xb1, 0xb4, 0x00, 0xe6, 
+	0xd0, 0x00, 0x61, 0x80, 0x00, 0x21, 0xd1, 0xb4, 
+	0x70, 0x06, 0x10, 0x20, 0xe9, 0xae, 0xd0, 0x00, 
+	0x60, 0x06, 0xf1, 0x18, 0x00, 0x21, 0xd1, 0x8c, 
+	0x70, 0x46, 0x65, 0x86, 0xde, 0xc0, 0x00, 0xee, 
+	0xd0, 0x20, 0x70, 0x00, 0x10, 0x22, 0xfd, 0xb9, 
+	0xde, 0xc2, 0x00, 0x21, 0xd0, 0x04, 0x70, 0x00, 
+	0x10, 0x21, 0xe9, 0xc0, 0x15, 0xa3, 0xe9, 0xdc, 
+	0xd0, 0x02, 0x4c, 0x00, 0x10, 0x63, 0xe9, 0xc5, 
+	0xcc, 0x3b, 0xd0, 0x04, 0x63, 0x00, 0xd0, 0x00, 
+	0x70, 0x00, 0x30, 0x1f, 0xfa, 0xf2, 0xd0, 0x18, 
+	0x70, 0x00, 0x10, 0x20, 0xed, 0xc7, 0xd0, 0x04, 
+	0x70, 0x80, 0x10, 0xa0, 0xea, 0xf2, 0xf1, 0x16, 
+	0x00, 0x21, 0xd0, 0x9a, 0xc0, 0x39, 0x30, 0x1f, 
+	0x10, 0x18, 0x30, 0x02, 0xfd, 0xcf, 0xe2, 0xf2, 
+	0x00, 0xe0, 0xd9, 0x04, 0x79, 0x24, 0xb9, 0x38, 
+	0x19, 0x1c, 0xd0, 0x1e, 0x30, 0x24, 0xf5, 0xe5, 
+	0x29, 0x00, 0xdc, 0x88, 0x4c, 0xac, 0xd0, 0x02, 
+	0x40, 0x2c, 0x10, 0x02, 0x0c, 0x80, 0x10, 0x63, 
+	0xea, 0x5a, 0x15, 0x63, 0xf9, 0xf0, 0xf1, 0x18, 
+	0xdc, 0x1e, 0x1e, 0xe0, 0xe9, 0xf6, 0x15, 0x63, 
+	0xf9, 0xf6, 0xbe, 0xfc, 0xd0, 0x2c, 0x6c, 0x00, 
+	0xcc, 0x24, 0xd9, 0x40, 0x06, 0x50, 0xea, 0x0c, 
+	0xc0, 0x24, 0xb0, 0x0f, 0xfe, 0x0c, 0xd9, 0x74, 
+	0x79, 0x65, 0x19, 0x5f, 0x30, 0x25, 0xee, 0x05, 
+	0x29, 0x40, 0x19, 0x5f, 0x19, 0x41, 0xc0, 0x25, 
+	0x20, 0x30, 0x30, 0x24, 0xe6, 0x0c, 0x3c, 0x00, 
+	0xd0, 0x38, 0x69, 0x40, 0x1c, 0x05, 0xbc, 0x38, 
+	0x3c, 0x32, 0x5c, 0x3b, 0xbc, 0x3f, 0xd8, 0xec, 
+	0x78, 0xe3, 0xc0, 0xa3, 0x10, 0xaf, 0xf6, 0x19, 
+	0xd0, 0x8f, 0x02, 0xe4, 0xd8, 0x00, 0xd0, 0xc0, 
+	0x20, 0xe0, 0xb0, 0x81, 0xee, 0x1c, 0xd0, 0x30, 
+	0x60, 0xc0, 0x00, 0xab, 0xd0, 0x30, 0xc0, 0xc0, 
+	0xd8, 0x40, 0xc1, 0x23, 0xd4, 0x5e, 0x34, 0x63, 
+	0xdc, 0x40, 0x0c, 0x1f, 0xfa, 0x45, 0xc0, 0x65, 
+	0xb0, 0x41, 0xe6, 0x31, 0x68, 0x40, 0xb0, 0x3c, 
+	0xe2, 0x2c, 0xc0, 0xc0, 0x34, 0x65, 0xdc, 0x48, 
+	0x4c, 0x70, 0x1c, 0x5f, 0x20, 0xf1, 0x15, 0x63, 
+	0xfa, 0x46, 0xf2, 0x3e, 0xc1, 0x11, 0xc0, 0x83, 
+	0xf2, 0x8f, 0xe2, 0x59, 0xb1, 0x01, 0xe6, 0x44, 
+	0x68, 0x40, 0x28, 0x60, 0xb0, 0x3c, 0xe2, 0x3e, 
+	0x0f, 0xc5, 0xd9, 0x40, 0xb1, 0x0f, 0x11, 0x01, 
+	0x21, 0x25, 0xf2, 0x3e, 0xc1, 0x11, 0xb1, 0x01, 
+	0xe6, 0x59, 0x20, 0x31, 0x68, 0x40, 0x30, 0x31, 
+	0xb0, 0x3c, 0x28, 0x60, 0x70, 0x43, 0x30, 0x31, 
+	0x60, 0x40, 0x20, 0x31, 0xb0, 0x3c, 0xb0, 0xf8, 
+	0xe2, 0x4b, 0xe2, 0xe1, 0xd8, 0xec, 0x78, 0xe3, 
+	0x00, 0xa8, 0xd0, 0x80, 0x00, 0xa8, 0xd1, 0x44, 
+	0x00, 0xab, 0xd0, 0x30, 0xc0, 0xc0, 0x0c, 0x1f, 
+	0xfa, 0x9d, 0xd9, 0x78, 0x79, 0x65, 0x39, 0x25, 
+	0x19, 0x5f, 0xc9, 0xa5, 0x19, 0x83, 0x20, 0x26, 
+	0x20, 0xe6, 0x20, 0xa6, 0x21, 0x66, 0xc1, 0x23, 
+	0xc0, 0x64, 0x10, 0x5f, 0x10, 0x9d, 0x20, 0x81, 
+	0x31, 0x01, 0x30, 0x44, 0xf6, 0x78, 0x21, 0x01, 
+	0x30, 0x84, 0x10, 0x83, 0xc4, 0x64, 0x34, 0x63, 
+	0xdc, 0x48, 0x4c, 0x70, 0x1c, 0x5f, 0x15, 0x63, 
+	0xfa, 0xad, 0x20, 0xb1, 0xf2, 0x8f, 0xc1, 0x24, 
+	0x11, 0x1f, 0xc0, 0x85, 0x30, 0xb1, 0xf2, 0x8f, 
+	0xc1, 0x11, 0xc0, 0x83, 0x0c, 0x9d, 0xfa, 0x8d, 
+	0xb0, 0xbc, 0xf2, 0x8f, 0xe2, 0xd6, 0xb1, 0x01, 
+	0xe6, 0x44, 0x70, 0x42, 0xb0, 0xb8, 0x60, 0x40, 
+	0xb0, 0x3c, 0xe2, 0x8f, 0xb1, 0x01, 0xe6, 0x44, 
+	0x70, 0x42, 0xb0, 0xb8, 0x60, 0x40, 0xb0, 0x38, 
+	0xe2, 0x96, 0x00, 0xab, 0xd0, 0x34, 0xc1, 0x23, 
+	0xb1, 0x0f, 0xf2, 0x96, 0xd1, 0x1e, 0x31, 0x23, 
+	0x00, 0xa8, 0xd0, 0x84, 0xf2, 0x96, 0xd1, 0x0f, 
+	0x00, 0xa8, 0xd0, 0x84, 0xc0, 0x03, 0xf2, 0x96, 
+	0xe2, 0xd6, 0xd8, 0x82, 0x48, 0x95, 0x18, 0x81, 
+	0xb1, 0x01, 0xe6, 0xc3, 0x20, 0xb1, 0x70, 0x42, 
+	0x30, 0xb1, 0x20, 0x22, 0x60, 0x40, 0x30, 0x22, 
+	0xb0, 0xbc, 0xb0, 0x3c, 0x30, 0xb1, 0x70, 0x42, 
+	0x20, 0xb1, 0x30, 0x22, 0x60, 0x40, 0x20, 0x22, 
+	0xb0, 0xbc, 0xb0, 0x3c, 0xe2, 0xb0, 0xc1, 0x11, 
+	0xc0, 0x85, 0x30, 0xb1, 0x20, 0xe2, 0xb1, 0x01, 
+	0xe6, 0xd6, 0x70, 0x42, 0xb0, 0xb8, 0x20, 0x22, 
+	0x60, 0x40, 0x30, 0x22, 0xb0, 0x3c, 0x70, 0x43, 
+	0xb0, 0xf8, 0x30, 0x22, 0x60, 0x40, 0x20, 0x22, 
+	0xb0, 0x3c, 0xe2, 0xc7, 0xd0, 0x08, 0x5c, 0x00, 
+	0x3c, 0x32, 0xd0, 0x04, 0x40, 0x30, 0x3c, 0x00, 
+	0x15, 0x63, 0xfa, 0xe1, 0x1e, 0xe0, 0xea, 0xe1, 
+	0xbc, 0x3c, 0x00, 0xab, 0xd0, 0xb0, 0x00, 0xa8, 
+	0xd0, 0x00, 0x00, 0x20, 0xd1, 0x1e, 0x70, 0x42, 
+	0xb0, 0xbc, 0x60, 0x40, 0xb0, 0x3c, 0xb1, 0x01, 
+	0xee, 0xe7, 0xd0, 0x30, 0x30, 0x30, 0xee, 0xed, 
+	0xd0, 0x04, 0x63, 0x00, 0x08, 0x20, 0xd0, 0x40, 
+	0x3f, 0x01, 0x02, 0xba, 0xd0, 0x3c, 0xe0, 0x46, 
+	0x01, 0x46, 0xd0, 0x08, 0x94, 0x89, 0xd0, 0x8c, 
+	0x44, 0x82, 0x14, 0x9e, 0x30, 0x12, 0xd0, 0x88, 
+	0x10, 0x80, 0x00, 0xe8, 0xd1, 0x80, 0x70, 0xc6, 
+	0x00, 0x06, 0xa0, 0xbd, 0xa0, 0xfc, 0x80, 0x3f, 
+	0xb1, 0xbe, 0x60, 0xc6, 0x00, 0x06, 0x80, 0xa9, 
+	0x80, 0x3f, 0x80, 0x2a, 0x80, 0x3f, 0x00, 0x21, 
+	0xd0, 0x3c, 0x00, 0x0a, 0xb1, 0x82, 0xd0, 0x6b, 
+	0x70, 0x46, 0x00, 0x06, 0x80, 0x07, 0x01, 0x20, 
+	0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 
+	0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 
+	0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x00, 0xa0, 0x29, 
+	0x80, 0x2b, 0x0c, 0x20, 0xd0, 0x00, 0x10, 0x08, 
+	0xa0, 0x27, 0x90, 0x09, 0xd0, 0x41, 0x40, 0x01, 
+	0xd0, 0x44, 0x40, 0x70, 0x20, 0x01, 0xa0, 0x27, 
+	0x80, 0x3f, 0x00, 0xc6, 0x15, 0x63, 0xe9, 0xae, 
+	0x05, 0x5e, 0xe9, 0xbe, 0x00, 0xe0, 0xd0, 0x40, 
+	0x70, 0x81, 0x10, 0x9c, 0xb0, 0x96, 0xf9, 0xb7, 
+	0x00, 0x21, 0xd0, 0x40, 0xe1, 0xbb, 0xb0, 0x96, 
+	0xf9, 0xbe, 0x00, 0x22, 0xd0, 0x40, 0x27, 0xc1, 
+	0x27, 0x41, 0x27, 0x81, 0x90, 0x83, 0x00, 0x64, 
+	0xd0, 0x10, 0x60, 0x80, 0x01, 0x46, 0x82, 0x34, 
+	0x80, 0x3f, 0x00, 0x64, 0xd0, 0x14, 0x67, 0x40, 
+	0x80, 0x34, 0x80, 0x3f, 0x00, 0xc6, 0x90, 0xae, 
+	0x00, 0x64, 0xd0, 0x18, 0x60, 0x80, 0x90, 0xa6, 
+	0x00, 0x64, 0xd0, 0x1c, 0x60, 0x80, 0x15, 0x63, 
+	0xe9, 0xe3, 0x0c, 0x1f, 0xe9, 0xe3, 0x05, 0x50, 
+	0xf9, 0xe3, 0x15, 0xa3, 0xf9, 0xe3, 0x90, 0x4d, 
+	0x10, 0x60, 0xe5, 0xdb, 0x00, 0x06, 0x05, 0x0d, 
+	0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x15, 0xa3, 
+	0xf9, 0xfb, 0x00, 0x21, 0xd0, 0x04, 0x70, 0x00, 
+	0x10, 0x21, 0xe9, 0xfb, 0xd0, 0x38, 0x70, 0x00, 
+	0x15, 0x63, 0xe9, 0xef, 0x10, 0x1f, 0x15, 0x21, 
+	0xe5, 0xe0, 0xd0, 0x5e, 0x30, 0x54, 0xe5, 0xe0, 
+	0xc0, 0x40, 0xb0, 0x7f, 0x30, 0x54, 0xe9, 0xfb, 
+	0x0c, 0x09, 0x05, 0x0d, 0xe1, 0xef, 0xc0, 0x5f, 
+	0x10, 0x58, 0x10, 0x48, 0x00, 0xee, 0xd0, 0x8c, 
+	0xd0, 0xc3, 0x70, 0x02, 0x30, 0x01, 0xea, 0x10, 
+	0xb0, 0xbc, 0xb0, 0xc1, 0xee, 0x01, 0x00, 0x26, 
+	0xd0, 0x20, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
+	0x15, 0xa3, 0xea, 0x0f, 0xb0, 0x88, 0x77, 0xc2, 
+	0x80, 0x07, 0x09, 0x49, 0xd4, 0x00, 0xd4, 0x40, 
+	0xd4, 0x80, 0xd4, 0xc0, 0x00, 0x4d, 0xa0, 0x6c, 
+	0xd3, 0x80, 0xd0, 0xa1, 0x00, 0x88, 0xd0, 0xa9, 
+	0x00, 0x4d, 0x00, 0x50, 0xfa, 0x1a, 0x0c, 0x49, 
+	0x00, 0x8d, 0xc0, 0x42, 0x10, 0x60, 0xea, 0x2a, 
+	0xb0, 0x5e, 0xb0, 0x43, 0xfe, 0x34, 0xd0, 0x61, 
+	0x23, 0x81, 0xe2, 0x1f, 0x0c, 0x09, 0x05, 0x0d, 
+	0x15, 0x20, 0xfe, 0x31, 0xd0, 0x5f, 0x30, 0x54, 
+	0xee, 0x10, 0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 
+	0xc6, 0xd4, 0xb6, 0xc1, 0xe6, 0x31, 0xd0, 0x5e, 
+	0x30, 0x5b, 0xfe, 0x31, 0xd7, 0x00, 0xb7, 0x01, 
+	0xd3, 0x81, 0x00, 0x27, 0xd0, 0x10, 0xd0, 0x81, 
+	0x60, 0x80, 0x15, 0x63, 0xfa, 0x54, 0x00, 0x22, 
+	0xdc, 0xd8, 0x03, 0xf7, 0xd2, 0x10, 0xf0, 0x4a, 
+	0x15, 0xa3, 0xfa, 0x51, 0x02, 0xf6, 0xde, 0x26, 
+	0x0c, 0x10, 0xf8, 0x46, 0x02, 0xfb, 0xda, 0x22, 
+	0xe0, 0x46, 0x02, 0xf1, 0xd8, 0x2b, 0xe0, 0x46, 
+	0x00, 0x22, 0xdc, 0xd8, 0x03, 0xf9, 0xd2, 0x10, 
+	0xf0, 0x4a, 0x03, 0x34, 0xdc, 0x20, 0x15, 0xa3, 
+	0xe8, 0x46, 0x02, 0xff, 0xde, 0x27, 0xe0, 0x46, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xe0, 0xe1, 0xec, 0xe2, 0x12, 
+	0xe2, 0x14, 0xe1, 0xc7, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x8d, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
+	0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x5e, 0x30, 0x5b, 0xfc, 0x11, 
+	0xc0, 0x39, 0x30, 0x31, 0x10, 0x12, 0x10, 0x20, 
+	0xe9, 0x88, 0x03, 0x10, 0xe9, 0x93, 0x0f, 0x19, 
+	0xf9, 0x8f, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xde, 
+	0xf9, 0xba, 0x03, 0xdf, 0xe9, 0x99, 0xd3, 0x40, 
+	0xca, 0x50, 0xd1, 0x42, 0xe2, 0xea, 0xc0, 0x50, 
+	0x10, 0x54, 0xc0, 0x90, 0x10, 0x8c, 0x10, 0x92, 
+	0x10, 0xe0, 0xe5, 0xa8, 0xc0, 0x01, 0x10, 0x01, 
+	0x20, 0x40, 0xc0, 0x02, 0x10, 0x01, 0x20, 0x80, 
+	0x10, 0x60, 0xfd, 0xab, 0xb0, 0x7f, 0x10, 0xa0, 
+	0xfd, 0xae, 0xb0, 0xbf, 0x10, 0x5f, 0x10, 0x9f, 
+	0x00, 0xef, 0xd0, 0x3e, 0x20, 0x52, 0x20, 0x83, 
+	0x20, 0x93, 0x10, 0x4c, 0x10, 0x82, 0x40, 0x80, 
+	0x50, 0x42, 0x0f, 0xc5, 0xcb, 0xaa, 0xcb, 0xeb, 
+	0xca, 0x50, 0xd0, 0xc0, 0xb0, 0xc1, 0xf1, 0x9b, 
+	0xcb, 0x01, 0xd0, 0xc1, 0xf1, 0x9b, 0xcb, 0x41, 
+	0xba, 0x7f, 0xbb, 0x3f, 0xe2, 0xea, 0xcc, 0x5b, 
+	0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 
+	0x2c, 0x40, 0x1c, 0x48, 0xcc, 0xb1, 0x1c, 0x9f, 
+	0x06, 0xd0, 0xe9, 0xd5, 0x01, 0x69, 0xd0, 0x20, 
+	0x3c, 0x80, 0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 
+	0x2c, 0x40, 0x2c, 0x80, 0x01, 0x74, 0xd6, 0x00, 
+	0x2c, 0x80, 0xde, 0x84, 0xde, 0xc4, 0xe3, 0x1e, 
+	0xd3, 0xc2, 0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xe5, 
+	0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xec, 0x80, 0x07, 
+	0xd4, 0x00, 0xc4, 0x50, 0xd3, 0x08, 0xe2, 0x95, 
+	0xd0, 0x71, 0x20, 0x56, 0x00, 0x48, 0xd1, 0x8c, 
+	0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xfa, 0x06, 0x5e, 
+	0xfa, 0x03, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
+	0xf9, 0xfa, 0xd3, 0xc4, 0x06, 0x5e, 0xfa, 0x03, 
+	0xd0, 0x43, 0x40, 0x4c, 0xea, 0x03, 0x08, 0x49, 
+	0x00, 0x8d, 0x10, 0x87, 0x53, 0x02, 0x01, 0x46, 
+	0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xea, 0x0a, 
+	0x09, 0x49, 0x00, 0x0d, 0xd0, 0x9f, 0x40, 0x02, 
+	0xb0, 0x20, 0x03, 0x19, 0xea, 0x10, 0xb0, 0x20, 
+	0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x80, 
+	0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
+	0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xd3, 0xe1, 0xdc, 0xe2, 0x00, 
+	0xe2, 0x02, 0xe1, 0xac, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x91, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
+	0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x5e, 0x30, 0x5b, 0xfc, 0x11, 
+	0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x8e, 
+	0xbc, 0x10, 0xd0, 0x30, 0xc0, 0x40, 0x30, 0x70, 
+	0xed, 0x8e, 0x03, 0x10, 0xe9, 0x97, 0x0f, 0x19, 
+	0xf9, 0x93, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xdf, 
+	0xe9, 0xa1, 0xd3, 0x40, 0xca, 0x50, 0xcb, 0x52, 
+	0x03, 0x1d, 0xf9, 0xa8, 0xca, 0x12, 0xca, 0x52, 
+	0xe1, 0xa5, 0x03, 0x1d, 0xf9, 0xa8, 0xca, 0x12, 
+	0xca, 0x53, 0xca, 0xae, 0xca, 0xef, 0xb1, 0x7e, 
+	0x03, 0x1e, 0xfa, 0xea, 0xb1, 0x7e, 0xe2, 0xea, 
+	0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 
+	0x17, 0x20, 0xf9, 0xd2, 0x00, 0xa8, 0xd0, 0x00, 
+	0xcc, 0x5b, 0x1c, 0x5f, 0x1c, 0x43, 0x20, 0x31, 
+	0x7c, 0x40, 0xb0, 0x3c, 0x7e, 0x80, 0xcc, 0xb1, 
+	0xce, 0xfa, 0x1c, 0x9f, 0x1e, 0xdf, 0x01, 0x69, 
+	0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xc4, 0x3c, 0x80, 
+	0x0e, 0xd9, 0xe9, 0xc7, 0x3e, 0xc0, 0x3e, 0xf2, 
+	0x3e, 0xb1, 0xd0, 0x01, 0x40, 0x1b, 0x10, 0x05, 
+	0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0xd0, 0x30, 
+	0x70, 0x00, 0x2c, 0x80, 0xe3, 0x1e, 0xd3, 0xc2, 
+	0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xd8, 0xf2, 0x32, 
+	0xb3, 0x81, 0xe9, 0xdc, 0x80, 0x07, 0xe2, 0x95, 
+	0x0d, 0x09, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
+	0xe9, 0xe8, 0x06, 0x5e, 0xf9, 0xf1, 0x08, 0x89, 
+	0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xe8, 0xd3, 0xc4, 
+	0x06, 0x5e, 0xf9, 0xf1, 0xd0, 0x43, 0x40, 0x4c, 
+	0xe9, 0xf1, 0x08, 0x49, 0x00, 0x8d, 0x10, 0x87, 
+	0x53, 0x02, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
+	0x03, 0x1c, 0xe9, 0xf8, 0x09, 0x49, 0x00, 0x0d, 
+	0xd0, 0x9f, 0x40, 0x02, 0xb0, 0x20, 0x03, 0x19, 
+	0xe9, 0xfe, 0xb0, 0x20, 0xa0, 0x2c, 0xe2, 0x5b, 
+	0x06, 0x5f, 0xfa, 0x80, 0xd4, 0x00, 0xc4, 0x50, 
+	0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xc1, 0xe1, 0xca, 0xe1, 0xee, 
+	0xe1, 0xf0, 0xe1, 0xa8, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x8d, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
+	0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x5e, 0x30, 0x5b, 0xfc, 0x11, 
+	0xc0, 0x39, 0x30, 0x31, 0x10, 0x12, 0x10, 0x20, 
+	0xe9, 0x88, 0x03, 0x10, 0xe9, 0x93, 0x0f, 0x19, 
+	0xf9, 0x8f, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xdf, 
+	0xe9, 0x9d, 0xd3, 0x40, 0xca, 0x50, 0xcb, 0x52, 
+	0x03, 0x1d, 0xf9, 0xa4, 0xca, 0x12, 0xca, 0x52, 
+	0xe1, 0xa1, 0x03, 0x1d, 0xf9, 0xa4, 0xca, 0x12, 
+	0xca, 0x53, 0xca, 0xae, 0xca, 0xef, 0xb1, 0x7e, 
+	0x03, 0x1e, 0xfa, 0xea, 0xb1, 0x7e, 0xe2, 0xea, 
+	0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 
+	0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x48, 0xcc, 0xb1, 
+	0x1c, 0x9f, 0x06, 0xd0, 0xe9, 0xb6, 0x01, 0x69, 
+	0xd0, 0x20, 0x3c, 0x80, 0xc0, 0x1c, 0x10, 0x08, 
+	0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0xd0, 0x30, 
+	0x70, 0x00, 0x2c, 0x80, 0xde, 0x84, 0xde, 0xc4, 
+	0xe3, 0x1e, 0xd3, 0xc2, 0xf2, 0xd3, 0x13, 0xa0, 
+	0xed, 0xc6, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xca, 
+	0x80, 0x07, 0xe2, 0x95, 0x0d, 0x09, 0xd1, 0x8c, 
+	0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xd6, 0x06, 0x5e, 
+	0xf9, 0xdf, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
+	0xf9, 0xd6, 0xd3, 0xc4, 0x06, 0x5e, 0xf9, 0xdf, 
+	0xd0, 0x43, 0x40, 0x4c, 0xe9, 0xdf, 0x08, 0x49, 
+	0x00, 0x8d, 0x10, 0x87, 0x53, 0x02, 0x01, 0x46, 
+	0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xe6, 
+	0x09, 0x49, 0x00, 0x0d, 0xd0, 0x9f, 0x40, 0x02, 
+	0xb0, 0x20, 0x03, 0x19, 0xe9, 0xec, 0xb0, 0x20, 
+	0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x80, 
+	0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
+	0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xdb, 0xe1, 0xe9, 0xe2, 0x00, 
+	0xe2, 0x02, 0xe1, 0xc3, 0xe1, 0x65, 0x30, 0x5a, 
+	0xe5, 0x8d, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
+	0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x4f, 0x30, 0x5b, 0xfc, 0x11, 
+	0xc0, 0x39, 0x30, 0x31, 0x10, 0x11, 0x10, 0x20, 
+	0xe9, 0x88, 0x03, 0x10, 0xe9, 0x93, 0x0f, 0x19, 
+	0xf9, 0x8f, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xd0, 
+	0xf9, 0x98, 0xca, 0x50, 0x03, 0xde, 0xf9, 0x9a, 
+	0xd1, 0x42, 0xe2, 0xea, 0xcb, 0xaa, 0xcb, 0xeb, 
+	0xc0, 0x50, 0x10, 0x54, 0xc0, 0x90, 0x10, 0x8c, 
+	0x10, 0x92, 0xd0, 0xc1, 0x05, 0x50, 0xe9, 0xa5, 
+	0xb0, 0xc2, 0x10, 0x60, 0xfd, 0xa8, 0xb0, 0x7f, 
+	0x10, 0xa0, 0xfd, 0xab, 0xb0, 0xbf, 0x10, 0x5f, 
+	0x10, 0x9f, 0x00, 0xef, 0xd0, 0x3e, 0x20, 0x52, 
+	0x20, 0x83, 0x20, 0x93, 0x10, 0x4c, 0x10, 0x82, 
+	0x40, 0x80, 0x50, 0x42, 0xd0, 0x81, 0x14, 0x1f, 
+	0x14, 0x01, 0x05, 0x50, 0xe9, 0xbd, 0x50, 0x42, 
+	0xe1, 0xbe, 0x54, 0x02, 0xca, 0x10, 0xca, 0x50, 
+	0xcb, 0x01, 0xcb, 0x41, 0xe2, 0xea, 0xcc, 0x5b, 
+	0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 
+	0x2c, 0x40, 0x1c, 0x49, 0xcc, 0xb1, 0x1c, 0x9f, 
+	0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 0x05, 0x50, 
+	0xf9, 0xd2, 0xb0, 0x3c, 0x2c, 0x40, 0x2c, 0x80, 
+	0x01, 0x74, 0xd6, 0x00, 0x2c, 0x80, 0x02, 0xe4, 
+	0xde, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 0xd3, 0xc0, 
+	0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xe0, 0xf2, 0x32, 
+	0xb3, 0x81, 0xe9, 0xe9, 0x80, 0x07, 0xd4, 0x02, 
+	0x44, 0x15, 0x14, 0x1f, 0xc4, 0x50, 0xd3, 0x08, 
+	0xe2, 0x95, 0xd0, 0x71, 0x20, 0x56, 0x00, 0x48, 
+	0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xf7, 
+	0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xf6, 
+	0xd3, 0xc4, 0xe1, 0xf7, 0xb3, 0xc1, 0x01, 0x46, 
+	0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xfe, 
+	0x09, 0x49, 0x00, 0x0d, 0xa0, 0x2c, 0xe2, 0x5b, 
+	0x06, 0x5f, 0xfa, 0x7f, 0xd4, 0x02, 0x44, 0x15, 
+	0x14, 0x1f, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
+	0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xc9, 0xe1, 0xd2, 0xe1, 0xe7, 
+	0xe1, 0xe9, 0xe1, 0xab, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x91, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
+	0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
+	0xb6, 0xff, 0xd0, 0x4f, 0x30, 0x5b, 0xfc, 0x11, 
+	0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x8e, 
+	0xbc, 0x10, 0xd0, 0x20, 0xc0, 0x40, 0x30, 0x70, 
+	0xed, 0x8e, 0x03, 0x10, 0xe9, 0x97, 0x0f, 0x19, 
+	0xf9, 0x93, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xd0, 
+	0xf9, 0xa0, 0xca, 0x50, 0xcb, 0x52, 0x03, 0x1d, 
+	0xf9, 0xa7, 0xca, 0x12, 0xca, 0x52, 0xe1, 0xa4, 
+	0x03, 0x1d, 0xf9, 0xa7, 0xca, 0x12, 0xca, 0x53, 
+	0xca, 0xae, 0xca, 0xef, 0xb1, 0x7e, 0x03, 0x1e, 
+	0xfa, 0xea, 0xb1, 0x7e, 0xe2, 0xea, 0x00, 0x24, 
+	0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 
+	0xf9, 0xc8, 0x00, 0x2a, 0xd0, 0x00, 0x20, 0x1b, 
+	0x20, 0x1b, 0x05, 0x50, 0xf9, 0xb8, 0xb0, 0x3f, 
+	0x10, 0x02, 0x7c, 0x40, 0xcc, 0xb1, 0x1c, 0x9f, 
+	0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xc1, 
+	0x3c, 0x80, 0xde, 0xa0, 0x2c, 0x5f, 0x2c, 0x9f, 
+	0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 0xde, 0xc1, 
+	0xe3, 0x1e, 0xd3, 0xc0, 0xf2, 0xd3, 0x13, 0xa0, 
+	0xed, 0xce, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xd2, 
+	0x80, 0x07, 0xe2, 0x95, 0x0d, 0x09, 0xd1, 0x8c, 
+	0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xde, 0x08, 0x89, 
+	0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xdd, 0xd3, 0xc4, 
+	0xe1, 0xde, 0xb3, 0xc1, 0x01, 0x46, 0x90, 0x2c, 
+	0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xe5, 0x09, 0x49, 
+	0x00, 0x0d, 0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 
+	0xfa, 0x7f, 0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 
+	0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xa3, 0xc0, 0x00, 0xc0, 0x00, 
+	0xc0, 0x00, 0xe1, 0x8a, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x87, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x5e, 
+	0x30, 0x5b, 0xfd, 0xb4, 0xc0, 0x39, 0x30, 0x31, 
+	0x10, 0x12, 0x10, 0x20, 0xe9, 0x82, 0xd1, 0x42, 
+	0xd3, 0x40, 0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 
+	0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 
+	0x1c, 0x48, 0xcc, 0xb1, 0x1c, 0x9f, 0x06, 0xd0, 
+	0xe9, 0x98, 0x01, 0x69, 0xd0, 0x20, 0x3c, 0x80, 
+	0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 0x2c, 0x40, 
+	0x2c, 0x80, 0x01, 0x74, 0xd6, 0x00, 0x2c, 0x80, 
+	0xde, 0x84, 0xde, 0xc4, 0xe3, 0x1e, 0xf2, 0xd3, 
+	0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xc8, 
+	0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 
+	0xe9, 0xbf, 0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 
+	0x10, 0x5c, 0x30, 0x5b, 0xb0, 0x41, 0xed, 0xc8, 
+	0x0f, 0x17, 0xf9, 0xb4, 0x0f, 0x49, 0xf2, 0xd3, 
+	0x0f, 0x19, 0xf9, 0xb8, 0xdf, 0x00, 0x00, 0x06, 
+	0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 
+	0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xc8, 0x0f, 0x17, 
+	0xf9, 0xc3, 0x02, 0xf1, 0xd8, 0x2b, 0xe0, 0x46, 
+	0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xb5, 0xc0, 0x00, 0xc0, 0x00, 
+	0xc0, 0x00, 0xe1, 0x8e, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x8b, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x5e, 
+	0x30, 0x5b, 0xfd, 0xc6, 0xbc, 0x10, 0xd0, 0x10, 
+	0x0c, 0x1e, 0xf9, 0x88, 0xbc, 0x10, 0xd0, 0x30, 
+	0xc0, 0x40, 0x30, 0x70, 0xed, 0x88, 0xd1, 0x42, 
+	0xd3, 0x40, 0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 
+	0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 0xf9, 0xb4, 
+	0x00, 0xa8, 0xd0, 0x00, 0xcc, 0x5b, 0x1c, 0x5f, 
+	0x1c, 0x43, 0x20, 0x31, 0x7c, 0x40, 0xb0, 0x3c, 
+	0x7e, 0x80, 0xcc, 0xb1, 0xce, 0xfa, 0x1c, 0x9f, 
+	0x1e, 0xdf, 0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 
+	0xe9, 0xa6, 0x3c, 0x80, 0x0e, 0xd9, 0xe9, 0xa9, 
+	0x3e, 0xc0, 0x3e, 0xf2, 0x3e, 0xb1, 0xd0, 0x01, 
+	0x40, 0x1b, 0x10, 0x05, 0x20, 0x1f, 0x2c, 0x40, 
+	0x2c, 0x80, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
+	0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 
+	0x30, 0x5a, 0xe5, 0xda, 0x00, 0x26, 0xd0, 0x00, 
+	0x70, 0x00, 0x10, 0x20, 0xe9, 0xd1, 0x00, 0xe0, 
+	0xd0, 0x44, 0x70, 0x41, 0x10, 0x5c, 0x30, 0x5b, 
+	0xb0, 0x41, 0xed, 0xda, 0x0f, 0x17, 0xf9, 0xc6, 
+	0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xca, 
+	0xdf, 0x00, 0x00, 0x06, 0x03, 0xb3, 0xd8, 0x29, 
+	0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 
+	0xe5, 0xda, 0x0f, 0x17, 0xf9, 0xd5, 0x02, 0xf6, 
+	0xde, 0x26, 0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 
+	0xe2, 0x95, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xa2, 0xc0, 0x00, 0xc0, 0x00, 
+	0xc0, 0x00, 0xe1, 0x8a, 0xe1, 0x65, 0x30, 0x5a, 
+	0xe5, 0x87, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x4f, 
+	0x30, 0x5b, 0xfd, 0xb3, 0xc0, 0x39, 0x30, 0x31, 
+	0x10, 0x11, 0x10, 0x20, 0xe9, 0x82, 0xd1, 0x42, 
+	0xd3, 0x41, 0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 
+	0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 
+	0x1c, 0x49, 0xcc, 0xb1, 0x1c, 0x9f, 0xc0, 0x1c, 
+	0x10, 0x08, 0x20, 0x1f, 0x05, 0x50, 0xf9, 0x99, 
+	0xb0, 0x3c, 0x2c, 0x40, 0x2c, 0x80, 0x01, 0x74, 
+	0xd6, 0x00, 0x2c, 0x80, 0x02, 0xe4, 0xde, 0x80, 
+	0xde, 0xc1, 0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 
+	0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xc7, 0x00, 0x26, 
+	0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 0xe9, 0xbe, 
+	0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 0x10, 0x5b, 
+	0x30, 0x5b, 0xb0, 0x41, 0xed, 0xc7, 0x0f, 0x17, 
+	0xf9, 0xb3, 0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 
+	0xf9, 0xb7, 0xdf, 0x00, 0x00, 0x06, 0x03, 0xb3, 
+	0xd8, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 
+	0xb0, 0x7e, 0xe5, 0xc7, 0x0f, 0x17, 0xf9, 0xc2, 
+	0x02, 0xff, 0xde, 0x27, 0xe0, 0x46, 0xd3, 0x08, 
+	0xd3, 0xc0, 0xe2, 0x95, 0x50, 0x00, 0x50, 0x00, 
+	0x03, 0x75, 0xd2, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
+	0xf0, 0x4a, 0xe1, 0xac, 0xc0, 0x00, 0xc0, 0x00, 
+	0xc0, 0x00, 0xe1, 0x8e, 0xe1, 0x30, 0x30, 0x5a, 
+	0xe5, 0x8b, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x4f, 
+	0x30, 0x5b, 0xfd, 0xbd, 0xbc, 0x10, 0xd0, 0x10, 
+	0x0c, 0x1e, 0xf9, 0x88, 0xbc, 0x10, 0xd0, 0x20, 
+	0xc0, 0x40, 0x30, 0x70, 0xed, 0x88, 0xd1, 0x42, 
+	0xd3, 0x41, 0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 
+	0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 0xf9, 0xab, 
+	0x00, 0x2a, 0xd0, 0x00, 0x20, 0x1b, 0x20, 0x1b, 
+	0x05, 0x50, 0xf9, 0x9b, 0xb0, 0x3f, 0x10, 0x02, 
+	0x7c, 0x40, 0xcc, 0xb1, 0x1c, 0x9f, 0x01, 0x69, 
+	0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xa4, 0x3c, 0x80, 
+	0xde, 0xa0, 0x2c, 0x5f, 0x2c, 0x9f, 0xd0, 0x30, 
+	0x70, 0x00, 0x2c, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 
+	0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 
+	0xe5, 0xd1, 0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 
+	0x10, 0x20, 0xe9, 0xc8, 0x00, 0xe0, 0xd0, 0x44, 
+	0x70, 0x41, 0x10, 0x5b, 0x30, 0x5b, 0xb0, 0x41, 
+	0xed, 0xd1, 0x0f, 0x17, 0xf9, 0xbd, 0x0f, 0x49, 
+	0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xc1, 0xdf, 0x00, 
+	0x00, 0x06, 0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 
+	0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xd1, 
+	0x0f, 0x17, 0xf9, 0xcc, 0x03, 0x34, 0xdc, 0x20, 
+	0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 
+	0xd0, 0x61, 0x23, 0x81, 0x0c, 0x49, 0xd0, 0x61, 
+	0x00, 0x8d, 0x10, 0xa0, 0xea, 0x3b, 0x30, 0x42, 
+	0xe6, 0x30, 0x23, 0x82, 0x0f, 0xc5, 0x0c, 0x09, 
+	0x05, 0x0d, 0x15, 0x20, 0xfe, 0x45, 0xd0, 0x5f, 
+	0x15, 0x63, 0xea, 0x43, 0xd0, 0x50, 0x30, 0x54, 
+	0xee, 0x4a, 0x0f, 0x17, 0xfa, 0x45, 0x03, 0xb3, 
+	0xd8, 0x29, 0xe0, 0x46, 0x80, 0x07, 0x09, 0x49, 
+	0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 
+	0x00, 0x4d, 0xa0, 0x6c, 0xd0, 0xa1, 0x00, 0x88, 
+	0xd0, 0xa9, 0x00, 0x4d, 0x00, 0x50, 0xfa, 0x53, 
+	0xf2, 0x32, 0xd3, 0x80, 0xe1, 0x76, 0xd1, 0xc2, 
+	0x41, 0xcf, 0x11, 0xdf, 0xd0, 0x41, 0x01, 0xc1, 
+	0x00, 0xef, 0xd0, 0xbe, 0x03, 0x10, 0xf9, 0x77, 
+	0x80, 0x07, 0x21, 0x96, 0x11, 0xa2, 0xe9, 0x78, 
+	0x03, 0x1d, 0xea, 0x73, 0xc0, 0xd7, 0xc2, 0x90, 
+	0xf2, 0xa4, 0xc4, 0x0a, 0x03, 0xd0, 0xea, 0x72, 
+	0xc2, 0x91, 0xf2, 0xa4, 0xc4, 0x4a, 0x03, 0x1e, 
+	0xea, 0x8d, 0xc0, 0xd8, 0xc2, 0x92, 0xf2, 0xa4, 
+	0xc4, 0x8a, 0x03, 0xd0, 0xea, 0x7d, 0xc2, 0x93, 
+	0xf2, 0xa4, 0xc4, 0xca, 0xe2, 0x8d, 0xd3, 0xc0, 
+	0xc0, 0xd7, 0xc2, 0x90, 0xf2, 0xa4, 0xc4, 0x0a, 
+	0x03, 0xd0, 0xea, 0x88, 0xc2, 0x91, 0xf2, 0xa4, 
+	0xc4, 0x4a, 0x08, 0x49, 0x00, 0x4d, 0x10, 0x61, 
+	0xf8, 0x11, 0x03, 0x1f, 0xea, 0x93, 0x0d, 0xc9, 
+	0x00, 0x4d, 0xd0, 0x1a, 0xe2, 0x98, 0x03, 0x10, 
+	0xfa, 0x97, 0xd0, 0x1d, 0xe2, 0x98, 0xd0, 0x18, 
+	0x0f, 0x16, 0xfa, 0x98, 0xd0, 0x4c, 0x40, 0x4c, 
+	0x10, 0x6c, 0xea, 0xa2, 0x03, 0xde, 0xfa, 0xa2, 
+	0x0f, 0x12, 0xfa, 0xa0, 0x00, 0x08, 0xe2, 0xd9, 
+	0xd2, 0x00, 0x13, 0xe1, 0xee, 0xa9, 0x08, 0x49, 
+	0x02, 0x0d, 0x00, 0xc8, 0xc2, 0xca, 0x12, 0x94, 
+	0xd0, 0x1f, 0x30, 0x07, 0x12, 0xc0, 0xc2, 0x43, 
+	0x12, 0x5a, 0x00, 0x0d, 0x03, 0xde, 0xea, 0xb6, 
+	0x0e, 0xc9, 0x04, 0x8d, 0x02, 0x48, 0x22, 0x80, 
+	0x12, 0x88, 0xd0, 0x0b, 0x30, 0x03, 0x12, 0x80, 
+	0xd0, 0x19, 0x20, 0x03, 0x12, 0x80, 0x00, 0x0d, 
+	0x22, 0xc0, 0x12, 0xc8, 0xd0, 0x0b, 0x30, 0x09, 
+	0x12, 0xc0, 0x12, 0xd8, 0xd0, 0x16, 0x20, 0x09, 
+	0x20, 0x07, 0x12, 0xc0, 0x42, 0xc2, 0x22, 0x8b, 
+	0x22, 0x88, 0x03, 0xde, 0xea, 0xd2, 0x0e, 0xc9, 
+	0xc4, 0x4a, 0x04, 0xcd, 0x0f, 0xc5, 0x01, 0x46, 
+	0x90, 0x4d, 0x00, 0xc6, 0x10, 0x60, 0xe6, 0xd3, 
+	0x0f, 0xc5, 0x01, 0x74, 0xd6, 0x00, 0xca, 0x9d, 
+	0xcb, 0x9e, 0xca, 0xea, 0xcb, 0xee, 0x2a, 0xc0, 
+	0x2b, 0xc0, 0xca, 0x10, 0xca, 0x51, 0xcb, 0x12, 
+	0xcb, 0x53, 0xd1, 0x40, 0xd3, 0x41, 0xb7, 0x3f, 
+	0xc0, 0x5c, 0xe1, 0x7b, 0xd0, 0xc0, 0xc1, 0x28, 
+	0xc2, 0x2a, 0xc2, 0xab, 0xf1, 0x7a, 0x0f, 0x17, 
+	0xfa, 0xef, 0xcc, 0xe8, 0xcd, 0x29, 0xcd, 0x6c, 
+	0xcd, 0xad, 0xc8, 0x08, 0xc8, 0x49, 0xca, 0x0a, 
+	0xca, 0x4b, 0xf3, 0x31, 0xd0, 0xc1, 0xc1, 0x34, 
+	0xc2, 0x2a, 0xc2, 0xab, 0xf1, 0x7a, 0x00, 0x28, 
+	0xd9, 0xc0, 0xc8, 0x88, 0xc8, 0xc9, 0xa9, 0xf8, 
+	0xca, 0x8a, 0xca, 0xcb, 0x11, 0x62, 0xe9, 0x79, 
+	0xd0, 0xc0, 0xc1, 0x35, 0xc2, 0x2e, 0xc2, 0xaf, 
+	0xf1, 0x7a, 0xc9, 0x08, 0xc9, 0x49, 0xa9, 0xf8, 
+	0xcb, 0x0a, 0xcb, 0x4b, 0xd0, 0xc1, 0xc1, 0x36, 
+	0xc2, 0x2e, 0xc2, 0xaf, 0xf1, 0x7a, 0xc0, 0x27, 
+	0xc9, 0x88, 0xc9, 0xc9, 0xa0, 0x38, 0xcb, 0x8a, 
+	0xcb, 0xcb, 0xe1, 0x79, 0x5f, 0x0d, 0x07, 0x7d, 
+	0xde, 0x07, 0x11, 0x5e, 0x30, 0x05, 0xcd, 0xc0, 
+	0x00, 0x28, 0xd0, 0x00, 0xa0, 0x38, 0x11, 0x61, 
+	0xf9, 0x75, 0x00, 0xe2, 0xd0, 0x00, 0x0f, 0x1d, 
+	0xeb, 0x29, 0x00, 0x2d, 0xdf, 0x4b, 0xf3, 0x3f, 
+	0xe1, 0x75, 0x04, 0xeb, 0xd0, 0x00, 0x11, 0x62, 
+	0xeb, 0x36, 0xb0, 0x20, 0x0f, 0x19, 0xfb, 0x36, 
+	0xac, 0xe0, 0x01, 0xa4, 0xde, 0x00, 0x5e, 0x0d, 
+	0x00, 0x2d, 0xdf, 0x7a, 0xdd, 0xc0, 0xd8, 0x80, 
+	0xd9, 0x00, 0xd9, 0x80, 0x5f, 0x00, 0x01, 0x46, 
+	0x00, 0x28, 0xd0, 0x01, 0x00, 0x06, 0xa0, 0x37, 
+	0x80, 0x3f, 0x00, 0xc6, 0x0f, 0xc5, 0xad, 0xda, 
+	0xc6, 0xb1, 0xd0, 0x01, 0x01, 0xa3, 0xde, 0x1d, 
+	0x40, 0x30, 0x3e, 0x00, 0x80, 0x3f, 0x0e, 0x0a, 
+	0x66, 0xda, 0xc8, 0x28, 0xc8, 0x69, 0xc8, 0xaa, 
+	0xc8, 0xeb, 0x0c, 0x1e, 0xfb, 0x68, 0x26, 0xba, 
+	0x07, 0x7d, 0xdc, 0x00, 0x1d, 0xcf, 0x1d, 0xd1, 
+	0x5d, 0xc0, 0x00, 0x2d, 0xdf, 0x64, 0x0f, 0x87, 
+	0xad, 0xda, 0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 
+	0xc9, 0x2c, 0xc9, 0x6d, 0xc9, 0xae, 0xc9, 0xef, 
+	0x0f, 0x2f, 0xd0, 0x37, 0x4f, 0x00, 0x0f, 0x1a, 
+	0xeb, 0xbe, 0x01, 0xa4, 0xde, 0x20, 0xd0, 0x01, 
+	0x40, 0x3c, 0x2e, 0x00, 0x00, 0x2d, 0xdf, 0x7a, 
+	0xac, 0xe0, 0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe0, 
+	0xbf, 0x79, 0xbe, 0x3c, 0x0f, 0x1b, 0xeb, 0x9e, 
+	0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe1, 0xbf, 0x79, 
+	0xbe, 0x34, 0x18, 0xa0, 0xeb, 0xb9, 0x0f, 0x87, 
+	0xad, 0x20, 0x80, 0x3f, 0x0e, 0x0a, 0x76, 0xe2, 
+	0xbf, 0x79, 0xbe, 0x3c, 0x0f, 0x87, 0x0e, 0x0a, 
+	0x76, 0xe3, 0x0f, 0x1b, 0xeb, 0xb3, 0xbf, 0x77, 
+	0xbe, 0x0c, 0x19, 0x20, 0xeb, 0xb9, 0x0f, 0x87, 
+	0xad, 0x60, 0x80, 0x3f, 0x0e, 0x0a, 0x76, 0xe4, 
+	0xbe, 0x3c, 0xbf, 0x75, 0x0f, 0x15, 0xf8, 0x1c, 
+	0x1f, 0x0a, 0x1f, 0x16, 0x0f, 0x87, 0x0e, 0x0a, 
+	0x76, 0xe5, 0xbf, 0x79, 0xbe, 0x34, 0x19, 0xa0, 
+	0xeb, 0xb9, 0x0f, 0x87, 0xad, 0xa0, 0x80, 0x3f, 
+	0x0e, 0x0a, 0x76, 0xe6, 0xbe, 0x3c, 0xbf, 0x79, 
+	0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe7, 0x0f, 0x15, 
+	0xeb, 0xbe, 0x00, 0x2f, 0xdf, 0x72, 0x1d, 0xe0, 
+	0xf8, 0x1c, 0x00, 0x28, 0xd0, 0x01, 0xa0, 0x38, 
+	0x80, 0x3f, 0x0f, 0x87, 0xd0, 0x01, 0x4d, 0xc0, 
+	0x1f, 0x0f, 0x1f, 0x11, 0x00, 0x2f, 0xdf, 0x76, 
+	0xc6, 0xb2, 0x03, 0x7d, 0xde, 0x0e, 0x01, 0xa3, 
+	0xde, 0x2d, 0x5d, 0xc0, 0x0f, 0x87, 0x1e, 0xe1, 
+	0xeb, 0xdb, 0xad, 0xda, 0x80, 0x3f, 0x0e, 0x0a, 
+	0x66, 0xda, 0x0c, 0x1e, 0xfb, 0xe4, 0x26, 0xbb, 
+	0x03, 0xff, 0xdd, 0xff, 0x4d, 0xc0, 0x00, 0xa3, 
+	0xde, 0x2d, 0xbf, 0x56, 0x0f, 0x87, 0x07, 0x7d, 
+	0xde, 0x0e, 0x5d, 0xc0, 0x00, 0xa3, 0xde, 0x1d, 
+	0xad, 0xda, 0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 
+	0xdf, 0x5c, 0xd0, 0x0e, 0x4f, 0x00, 0x0f, 0x87, 
+	0xd0, 0x06, 0x40, 0x3c, 0xeb, 0xf0, 0xbf, 0x3e, 
+	0xb0, 0x04, 0xe7, 0xf2, 0xeb, 0xf6, 0xbf, 0x0c, 
+	0xbf, 0x3a, 0x0f, 0x87, 0x0f, 0x1d, 0xfb, 0x4b, 
+	0xbf, 0x38, 0x0f, 0x87, 0x0f, 0x1c, 0xfb, 0xcb, 
+	0xbf, 0x30, 0x0f, 0x87, 0x50, 0x00, 0x50, 0x00, 
+	0x0f, 0x17, 0xf9, 0x70, 0x90, 0x4d, 0x10, 0x60, 
+	0xe5, 0x72, 0x0f, 0x49, 0x90, 0x4d, 0x10, 0x60, 
+	0xe5, 0x76, 0x0f, 0x19, 0xf9, 0x79, 0x01, 0x46, 
+	0xd0, 0x11, 0xa0, 0x38, 0x80, 0x3f, 0x00, 0xc6, 
+	0xdf, 0x00, 0x00, 0x06, 0x08, 0x20, 0xd0, 0x00, 
+	0x10, 0x08, 0xa0, 0x0a, 0xa0, 0x1b, 0x0c, 0x20, 
+	0xd0, 0x00, 0x10, 0x08, 0xa0, 0x27, 0x90, 0x4d, 
+	0x0f, 0xff, 0xd8, 0x1f, 0x40, 0x40, 0xa0, 0x4d, 
+	0x80, 0x0a, 0xd0, 0x00, 0x06, 0x50, 0xf9, 0x95, 
+	0xd0, 0x01, 0xa0, 0x09, 0x80, 0x1b, 0xa0, 0x27, 
+	0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 
+	0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 
+	0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x40, 
+	0xa0, 0x69, 0x80, 0x2b, 0x80, 0x07, 0x08, 0x20, 
+	0xdf, 0x00, 0x02, 0x30, 0xd0, 0x00, 0xa0, 0x38, 
+	0x80, 0x3f, 0x01, 0xb0, 0xd0, 0x10, 0xa0, 0x37, 
+	0x80, 0x3f, 0x02, 0x30, 0xd0, 0x01, 0xa0, 0x38, 
+	0xd0, 0x10, 0xa0, 0x38, 0x15, 0x63, 0xe9, 0xba, 
+	0x05, 0x5e, 0xf9, 0xfa, 0xc0, 0xdf, 0x00, 0xe0, 
+	0xd1, 0x80, 0x70, 0x06, 0x10, 0x1c, 0xc1, 0x40, 
+	0x11, 0x48, 0xd3, 0x10, 0x00, 0x21, 0xd0, 0x80, 
+	0xb0, 0x16, 0xe9, 0xca, 0xd3, 0x20, 0x10, 0x81, 
+	0xb0, 0x16, 0xf9, 0xfa, 0x30, 0xc2, 0xd2, 0x5e, 
+	0xd0, 0x8f, 0x00, 0xee, 0xd0, 0x54, 0x70, 0x41, 
+	0x30, 0x43, 0xed, 0xd7, 0xd2, 0x6c, 0x72, 0x49, 
+	0xc0, 0x89, 0xb0, 0xbf, 0x10, 0x9f, 0x22, 0x42, 
+	0x04, 0x31, 0xd0, 0x10, 0xc0, 0x42, 0x30, 0x49, 
+	0xe5, 0xde, 0x10, 0x03, 0xc1, 0x0c, 0xc1, 0x83, 
+	0xb1, 0xbe, 0x01, 0x46, 0x00, 0x06, 0xa0, 0x3d, 
+	0xa0, 0x3c, 0x60, 0x06, 0x00, 0xc6, 0xb1, 0xbc, 
+	0xb1, 0x01, 0xed, 0xe1, 0xc1, 0x0c, 0x21, 0x85, 
+	0x01, 0x46, 0x00, 0x06, 0xa0, 0x3d, 0xa0, 0x3c, 
+	0x60, 0x06, 0x00, 0xc6, 0xb1, 0xbc, 0xb1, 0x01, 
+	0xed, 0xec, 0x02, 0xe4, 0xd0, 0x00, 0x20, 0xc0, 
+	0xb2, 0x41, 0xed, 0xd8, 0x15, 0xa3, 0xfa, 0x00, 
+	0xbc, 0x10, 0x0c, 0x1e, 0xfa, 0x00, 0xbc, 0x10, 
+	0xd0, 0x04, 0x70, 0x00, 0x10, 0x20, 0xfa, 0x00, 
+	0x00, 0x27, 0xd0, 0x10, 0xd0, 0x40, 0x60, 0x40, 
+	0x00, 0x26, 0xd0, 0x14, 0x60, 0x40, 0xb0, 0x28, 
+	0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x01, 0x7a, 
+	0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 
+	0x00, 0x28, 0xd1, 0xb0, 0x70, 0x06, 0xd0, 0x81, 
+	0x60, 0x86, 0x10, 0x20, 0xe9, 0xab, 0xb0, 0x3f, 
+	0x60, 0x06, 0x00, 0xec, 0xd1, 0x84, 0x70, 0x46, 
+	0xb1, 0x84, 0x70, 0x86, 0x30, 0x42, 0xe9, 0xab, 
+	0x70, 0x42, 0xd0, 0x35, 0x30, 0x40, 0xf9, 0xab, 
+	0x00, 0x63, 0xd0, 0x3f, 0xb0, 0xbc, 0x40, 0x80, 
+	0x70, 0xc2, 0x10, 0xe3, 0xe5, 0xab, 0xb0, 0xbc, 
+	0x40, 0x80, 0x60, 0x86, 0x00, 0x28, 0xd0, 0x24, 
+	0x70, 0x40, 0x00, 0x22, 0xd0, 0x80, 0x50, 0x42, 
+	0x60, 0x40, 0x00, 0x64, 0xd0, 0x60, 0xd0, 0x90, 
+	0x60, 0x81, 0x00, 0xed, 0xd1, 0x88, 0x70, 0x46, 
+	0x10, 0xe4, 0xe9, 0xa8, 0x00, 0x21, 0xd0, 0xe8, 
+	0xd0, 0x00, 0x60, 0x03, 0xd0, 0x81, 0x40, 0x42, 
+	0x60, 0x46, 0x02, 0x3c, 0xda, 0x89, 0xe0, 0x46, 
+	0xd0, 0x82, 0x50, 0x42, 0x60, 0x46, 0x00, 0x23, 
+	0xd5, 0x3e, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
+	0x01, 0x46, 0xdf, 0x5c, 0x08, 0x20, 0xd1, 0x00, 
+	0xcf, 0x04, 0x11, 0x08, 0xa1, 0x0a, 0xa1, 0x1b, 
+	0x11, 0x1f, 0xa1, 0x27, 0xd2, 0x80, 0xb2, 0x81, 
+	0x90, 0x4d, 0xc0, 0x01, 0x10, 0x14, 0x00, 0x16, 
+	0xe9, 0x8d, 0x80, 0x33, 0x80, 0x3f, 0x92, 0x8b, 
+	0x00, 0x23, 0xd0, 0x3f, 0x42, 0x80, 0xe9, 0x8d, 
+	0x0f, 0xff, 0xdf, 0xff, 0x40, 0x01, 0xa0, 0x0d, 
+	0xe1, 0x94, 0xa1, 0x0a, 0x00, 0xea, 0xd0, 0x00, 
+	0xd0, 0x8e, 0x00, 0x06, 0x0f, 0x0b, 0x70, 0x80, 
+	0x80, 0x73, 0x80, 0x0a, 0xd0, 0x00, 0x06, 0x50, 
+	0xf9, 0x9a, 0xd0, 0x01, 0xd0, 0x44, 0x40, 0x70, 
+	0x20, 0x01, 0x15, 0x63, 0xf9, 0xa1, 0x80, 0x1b, 
+	0xe1, 0xa2, 0x80, 0x5b, 0xa0, 0x27, 0x01, 0x20, 
+	0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 
+	0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 
+	0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x40, 0xa0, 0x69, 
+	0x80, 0x2b, 0x80, 0x07, 0x08, 0x20, 0xd0, 0x00, 
+	0xcf, 0x00, 0x02, 0x30, 0xd0, 0x00, 0xa0, 0x38, 
+	0x80, 0x3f, 0x01, 0xb2, 0xd2, 0x10, 0xa0, 0x37, 
+	0x80, 0x3f, 0x02, 0x30, 0xd0, 0x01, 0xa0, 0x38, 
+	0x00, 0x30, 0xd0, 0x10, 0xa0, 0x38, 0x80, 0x3f, 
+	0x00, 0xc6, 0x00, 0x28, 0xd1, 0x24, 0x70, 0x04, 
+	0xd0, 0x41, 0x50, 0x01, 0x60, 0x04, 0x00, 0x27, 
+	0xd0, 0x18, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
+	0x00, 0x26, 0xd0, 0x20, 0x70, 0x40, 0xb0, 0x7f, 
+	0x60, 0x40, 0x08, 0x20, 0xdf, 0x00, 0xd4, 0x00, 
+	0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 0xd3, 0x81, 
+	0x12, 0xa0, 0xed, 0xe3, 0xd0, 0x08, 0x0a, 0x09, 
+	0x00, 0x4d, 0xb0, 0x01, 0xed, 0xdf, 0x03, 0xbe, 
+	0xd6, 0x27, 0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 
+	0x02, 0x24, 0xd0, 0x00, 0xa0, 0x37, 0x00, 0x27, 
+	0xd3, 0xd0, 0x00, 0x26, 0xd0, 0x04, 0x73, 0xcf, 
+	0x13, 0xe1, 0xe9, 0x7b, 0xb0, 0x3c, 0xf2, 0x00, 
+	0x00, 0x26, 0xd0, 0x40, 0xd0, 0x00, 0x60, 0x01, 
+	0x00, 0x26, 0xd0, 0x14, 0xf2, 0x00, 0x00, 0x26, 
+	0xd0, 0x18, 0xf2, 0x00, 0x00, 0xee, 0xd0, 0x1c, 
+	0x71, 0x40, 0xd1, 0x1e, 0x15, 0x63, 0xe9, 0x8d, 
+	0x11, 0x1f, 0xc7, 0x1a, 0xb7, 0x01, 0xd3, 0x81, 
+	0xc4, 0xd4, 0xf2, 0x04, 0x00, 0x26, 0xd0, 0x18, 
+	0x70, 0x40, 0xb0, 0x54, 0xfd, 0x9b, 0x00, 0xed, 
+	0xd0, 0x24, 0xd0, 0x44, 0x60, 0x40, 0x13, 0xe1, 
+	0xf9, 0xbc, 0x15, 0xa3, 0xf9, 0xa1, 0x0c, 0x10, 
+	0xe9, 0xb9, 0x11, 0x61, 0xe5, 0xb3, 0xed, 0xb9, 
+	0x15, 0xa3, 0xf9, 0xab, 0x00, 0x26, 0xd0, 0x14, 
+	0x70, 0x40, 0x10, 0x62, 0xf5, 0xb3, 0x15, 0x22, 
+	0xe5, 0xb3, 0xc0, 0x44, 0x30, 0x54, 0xe5, 0xb3, 
+	0x34, 0xd4, 0xf5, 0xb3, 0xe1, 0xbf, 0x03, 0xb3, 
+	0xd8, 0x29, 0x00, 0x26, 0xd0, 0x40, 0x60, 0x01, 
+	0xe1, 0xdb, 0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 
+	0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x80, 0x07, 
+	0x09, 0x49, 0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 
+	0xd4, 0xc0, 0x00, 0x4d, 0xa0, 0x6c, 0xd3, 0x80, 
+	0xd0, 0xa1, 0x00, 0x88, 0xd0, 0xa9, 0x00, 0x4d, 
+	0x00, 0x50, 0xf9, 0xc9, 0x0c, 0x49, 0xd0, 0x61, 
+	0x00, 0x8d, 0x10, 0xa0, 0xe9, 0x90, 0x30, 0x42, 
+	0xf5, 0xd8, 0xd0, 0x61, 0x23, 0x81, 0xe1, 0xce, 
+	0x23, 0x82, 0x13, 0xa1, 0xf9, 0x90, 0xd0, 0x42, 
+	0x15, 0xa1, 0xf9, 0xdf, 0xb0, 0x7f, 0x00, 0x26, 
+	0xd0, 0x14, 0x70, 0x00, 0x30, 0x01, 0xf5, 0xe8, 
+	0x16, 0xe0, 0xe5, 0xe8, 0xb6, 0xc1, 0xbc, 0x20, 
+	0xc0, 0x44, 0x30, 0x5b, 0xfd, 0xb9, 0xc0, 0x44, 
+	0x30, 0x54, 0xe5, 0xb9, 0x15, 0x63, 0xf9, 0xf8, 
+	0x15, 0xa3, 0xf9, 0xf5, 0x03, 0x3b, 0xda, 0x1c, 
+	0xe0, 0x46, 0x03, 0x38, 0xdc, 0x17, 0xe0, 0x46, 
+	0x15, 0xa3, 0xf9, 0xfd, 0x03, 0x72, 0xd0, 0x19, 
+	0xe0, 0x46, 0x03, 0x3f, 0xd2, 0x17, 0xe0, 0x46, 
+	0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x0f, 0xc5, 
+	0xdf, 0x00, 0x0c, 0x09, 0x05, 0x0d, 0x08, 0x20, 
+	0xdf, 0x00, 0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 
+	0x00, 0xef, 0xd0, 0x14, 0x70, 0x40, 0x10, 0x60, 
+	0xe9, 0x45, 0xb0, 0x04, 0x70, 0x40, 0xb0, 0x41, 
+	0xed, 0x44, 0x00, 0xed, 0xd0, 0x24, 0xd0, 0x44, 
+	0x60, 0x40, 0x00, 0x64, 0xd0, 0x20, 0x70, 0x00, 
+	0x10, 0x30, 0xe9, 0x45, 0x00, 0x21, 0xd0, 0x28, 
+	0x60, 0x40, 0x00, 0x64, 0xd2, 0xc0, 0x70, 0x0b, 
+	0x00, 0x11, 0xe9, 0x6a, 0x08, 0x20, 0xd0, 0x4f, 
+	0x30, 0x40, 0xe9, 0x55, 0xb0, 0x4f, 0xf9, 0x6a, 
+	0x03, 0xef, 0xdf, 0xbf, 0xaf, 0xb8, 0xdf, 0x80, 
+	0x0f, 0x87, 0xd0, 0x18, 0x70, 0x00, 0x10, 0x20, 
+	0xed, 0x6c, 0xdf, 0x84, 0xd0, 0x40, 0x60, 0x7e, 
+	0x00, 0x27, 0xd0, 0x54, 0x70, 0x41, 0x10, 0x60, 
+	0x01, 0xa0, 0xd0, 0x40, 0xa0, 0x78, 0x80, 0x34, 
+	0x80, 0x3f, 0x01, 0x3c, 0xd2, 0x39, 0x00, 0x21, 
+	0xdf, 0x86, 0x0f, 0x87, 0xd0, 0x40, 0x60, 0x4b, 
+	0x03, 0xe5, 0xd0, 0x10, 0xe0, 0x36, 0x50, 0x00, 
+	0x00, 0x28, 0xd0, 0x24, 0x72, 0xc0, 0xd0, 0x40, 
+	0x60, 0x40, 0xd0, 0x0c, 0x52, 0xc0, 0xc0, 0x1c, 
+	0x30, 0x1d, 0xf5, 0x3c, 0x20, 0x1f, 0x30, 0x1e, 
+	0x90, 0x6d, 0x20, 0x01, 0x00, 0x22, 0xd0, 0x58, 
+	0x60, 0x01, 0x00, 0xe3, 0xd0, 0x48, 0x70, 0x41, 
+	0x30, 0x40, 0xf5, 0x47, 0xb2, 0xc8, 0x00, 0xe3, 
+	0xd0, 0x4c, 0x70, 0x41, 0x30, 0x40, 0xfd, 0x4d, 
+	0xb2, 0xc4, 0x00, 0x28, 0xd0, 0x20, 0x70, 0x00, 
+	0x42, 0xc0, 0xa2, 0xc5, 0x12, 0xe0, 0xe9, 0x55, 
+	0x80, 0x40, 0x80, 0x34, 0x80, 0x3f, 0xcf, 0x95, 
+	0x82, 0x34, 0x80, 0x3f, 0x03, 0xe7, 0xd0, 0x08, 
+	0x1f, 0xa3, 0xe9, 0x60, 0x03, 0xe9, 0xd0, 0x08, 
+	0x00, 0x27, 0xd0, 0x4c, 0x7f, 0x81, 0x00, 0x27, 
+	0xd0, 0x54, 0x70, 0x41, 0x10, 0x60, 0x03, 0xa0, 
+	0xd0, 0x40, 0xa0, 0x78, 0xe0, 0x3c, 0x50, 0x00, 
+	0xc0, 0x84, 0x10, 0x8c, 0x10, 0x92, 0xd0, 0x41, 
+	0x30, 0x4d, 0x40, 0x43, 0x10, 0x43, 0x20, 0x81, 
+	0xd1, 0x8f, 0x41, 0x82, 0x10, 0x9c, 0x20, 0x9b, 
+	0xc1, 0xc2, 0x10, 0x82, 0x20, 0x87, 0xc0, 0x42, 
+	0x10, 0x43, 0x20, 0x81, 0x10, 0x88, 0x22, 0x02, 
+	0x10, 0x97, 0x01, 0xd0, 0xe9, 0x48, 0xb0, 0x96, 
+	0x10, 0x88, 0x22, 0x82, 0xc0, 0x5c, 0x10, 0x48, 
+	0xc0, 0x84, 0x10, 0x91, 0x10, 0x86, 0x20, 0x42, 
+	0x41, 0x0d, 0x11, 0x02, 0x20, 0x44, 0x22, 0x01, 
+	0x22, 0x81, 0x02, 0xe4, 0xd2, 0x40, 0xc2, 0xca, 
+	0xb2, 0xe0, 0x01, 0xd0, 0xe9, 0x5e, 0xc2, 0xca, 
+	0x22, 0xc9, 0xb2, 0xa0, 0x22, 0x48, 0xd0, 0x78, 
+	0x03, 0x50, 0xf9, 0x69, 0xd0, 0x7c, 0x01, 0x9d, 
+	0xf9, 0x69, 0xc2, 0x48, 0xb2, 0x60, 0xc2, 0xca, 
+	0xb2, 0xf0, 0x11, 0x82, 0x41, 0x81, 0x22, 0x06, 
+	0x11, 0x9f, 0x41, 0x81, 0x22, 0x86, 0x0f, 0xc5, 
+	0xc0, 0x84, 0x10, 0x8c, 0x10, 0x92, 0xd1, 0x8f, 
+	0x41, 0x82, 0x10, 0x9c, 0xc1, 0xdb, 0x11, 0xc1, 
+	0x21, 0xc3, 0x20, 0x87, 0xc1, 0xc2, 0x10, 0x82, 
+	0x20, 0x87, 0xc0, 0x42, 0x10, 0x43, 0x20, 0x81, 
+	0x10, 0x88, 0x22, 0x02, 0x10, 0x97, 0x01, 0xd0, 
+	0xe9, 0x46, 0xb0, 0x96, 0x10, 0x88, 0x22, 0x82, 
+	0xc0, 0x5c, 0x10, 0x48, 0xc0, 0x84, 0x10, 0x91, 
+	0x10, 0x86, 0x20, 0x42, 0xd0, 0x81, 0x41, 0x02, 
+	0x11, 0x02, 0x20, 0x44, 0x22, 0x01, 0x22, 0x81, 
+	0x02, 0xe4, 0xd2, 0x40, 0xc2, 0xca, 0xb2, 0xe0, 
+	0x01, 0xd0, 0xe9, 0x5d, 0xc2, 0xca, 0x22, 0xc9, 
+	0xb2, 0xa0, 0x22, 0x48, 0x11, 0x9f, 0x11, 0x83, 
+	0x22, 0x06, 0x11, 0x9c, 0x11, 0x83, 0x22, 0x86, 
+	0x0f, 0xc5, 0xd0, 0x41, 0x40, 0x44, 0x20, 0x55, 
+	0x10, 0x62, 0xf9, 0x6f, 0x01, 0x74, 0xd6, 0x00, 
+	0xc2, 0x9f, 0xc2, 0x1f, 0x22, 0x80, 0xe1, 0x30, 
+	0x0f, 0x11, 0xf9, 0x51, 0x90, 0x38, 0x80, 0x3f, 
+	0x00, 0x1b, 0xf9, 0x51, 0x00, 0x27, 0xd0, 0x04, 
+	0x70, 0x40, 0x30, 0x71, 0xf9, 0x51, 0xb0, 0x3c, 
+	0x70, 0x40, 0x30, 0x5d, 0xf9, 0x51, 0xb0, 0x08, 
+	0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x10, 0x63, 
+	0xe5, 0x5d, 0x02, 0x20, 0xd0, 0x01, 0xa0, 0x37, 
+	0x00, 0x26, 0xd0, 0x24, 0x70, 0x40, 0xb0, 0x7f, 
+	0x60, 0x40, 0xb0, 0x08, 0x70, 0x40, 0xb0, 0x41, 
+	0x60, 0x40, 0x00, 0x26, 0xd0, 0x30, 0x70, 0x40, 
+	0xb0, 0x7f, 0x60, 0x40, 0xb0, 0x30, 0xd0, 0x40, 
+	0x60, 0x40, 0xb0, 0x3c, 0x6c, 0x40, 0xb0, 0x3c, 
+	0x67, 0x40, 0x00, 0x33, 0xdf, 0x78, 0xe0, 0x36, 
+	0x00, 0x26, 0xd0, 0x1c, 0x70, 0x40, 0xb0, 0x7f, 
+	0x60, 0x40, 0xb0, 0x3c, 0x70, 0x40, 0xb0, 0x41, 
+	0x60, 0x40, 0x08, 0x20, 0xdf, 0x00, 0x80, 0x35, 
+	0xc0, 0x3c, 0x10, 0x08, 0xa0, 0x0a, 0xa0, 0x27, 
+	0xa0, 0x1b, 0xdf, 0x5c, 0x01, 0xa0, 0xd0, 0x00, 
+	0xa0, 0x38, 0x80, 0x3f, 0x80, 0x34, 0x80, 0x3f, 
+	0x03, 0xba, 0xda, 0x1e, 0xcf, 0x95, 0x82, 0x34, 
+	0x80, 0x3f, 0x03, 0xe7, 0xd0, 0x08, 0x1f, 0xa3, 
+	0xe9, 0x55, 0x1f, 0xa0, 0xe9, 0x55, 0x03, 0xe9, 
+	0xd0, 0x08, 0x00, 0x21, 0xdf, 0x86, 0xe0, 0x3c, 
+	0x89, 0x78, 0x89, 0x37, 0x00, 0xee, 0xd0, 0x14, 
+	0x76, 0x00, 0xd0, 0x30, 0x76, 0x40, 0x26, 0x58, 
+	0xd6, 0xd9, 0x00, 0xee, 0xd0, 0x20, 0x75, 0x40, 
+	0xd0, 0x1c, 0x71, 0x40, 0xd0, 0x20, 0x71, 0x00, 
+	0xd0, 0x24, 0x70, 0x80, 0xc4, 0x02, 0xd0, 0x28, 
+	0x70, 0xc0, 0x00, 0x21, 0xd0, 0x10, 0x72, 0x00, 
+	0x93, 0x90, 0xd4, 0x81, 0x13, 0x96, 0x43, 0x92, 
+	0x34, 0x8e, 0x00, 0x22, 0xd1, 0xa4, 0x71, 0x86, 
+	0xde, 0x40, 0x7e, 0x79, 0xd0, 0x18, 0x70, 0x40, 
+	0xb0, 0x41, 0xf5, 0x58, 0xd3, 0x42, 0x50, 0x4d, 
+	0x60, 0x40, 0x10, 0x60, 0xe5, 0x62, 0xd0, 0x54, 
+	0x70, 0x01, 0xb0, 0x3c, 0x60, 0x01, 0x04, 0x2d, 
+	0xd0, 0x08, 0xe0, 0x36, 0x00, 0x22, 0xd0, 0x60, 
+	0x71, 0xc1, 0xd0, 0x4f, 0x41, 0xc1, 0x03, 0xef, 
+	0xd0, 0x30, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
+	0x04, 0x21, 0xd0, 0x20, 0xd3, 0x44, 0x72, 0x8d, 
+	0x12, 0xa0, 0xe8, 0x36, 0xc0, 0x47, 0x10, 0x5d, 
+	0x30, 0x4e, 0xf8, 0x36, 0xb2, 0x3e, 0x60, 0x4d, 
+	0x00, 0xed, 0xd0, 0x48, 0x70, 0x01, 0xde, 0x45, 
+	0x50, 0x39, 0x00, 0x1b, 0xf9, 0x44, 0xb0, 0x01, 
+	0x00, 0x1c, 0xf9, 0x47, 0xb0, 0x04, 0x60, 0x01, 
+	0xd0, 0x40, 0x62, 0x81, 0xce, 0x4a, 0xd0, 0x43, 
+	0x41, 0xc1, 0xd0, 0x58, 0x61, 0xc1, 0x90, 0x43, 
+	0x00, 0xe0, 0xd0, 0x28, 0x70, 0x00, 0x10, 0x1f, 
+	0x20, 0x40, 0xb1, 0xc1, 0xf5, 0x54, 0x00, 0x21, 
+	0xd0, 0x08, 0x60, 0x40, 0x00, 0xe6, 0xd0, 0x40, 
+	0x70, 0x41, 0xd2, 0x94, 0x60, 0x4a, 0x04, 0x2b, 
+	0xd0, 0x10, 0x01, 0x90, 0xf8, 0x36, 0x04, 0x2d, 
+	0xd0, 0x08, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
+	0xc0, 0x47, 0x10, 0x5d, 0x30, 0x4e, 0xf9, 0x41, 
+	0x90, 0x43, 0x00, 0xe0, 0xd0, 0x28, 0x70, 0x00, 
+	0x20, 0x40, 0x00, 0x21, 0xd0, 0x08, 0x60, 0x40, 
+	0x00, 0x26, 0xd0, 0x74, 0x70, 0x01, 0xb0, 0x3f, 
+	0x60, 0x01, 0x00, 0xed, 0xd0, 0x48, 0x70, 0x41, 
+	0x00, 0x5e, 0xf9, 0x4b, 0x00, 0x21, 0xd0, 0x00, 
+	0x73, 0x80, 0xd4, 0x81, 0x34, 0x8e, 0x00, 0x34, 
+	0xd3, 0x48, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
+	0xd1, 0x88, 0xd1, 0xc8, 0x01, 0x1b, 0xe9, 0x39, 
+	0x11, 0x9f, 0x11, 0xdf, 0xd4, 0x80, 0xd3, 0x81, 
+	0xe1, 0x43, 0x00, 0xed, 0xd0, 0x08, 0x70, 0x00, 
+	0x00, 0x10, 0xf9, 0x37, 0x0c, 0x1f, 0xf9, 0x36, 
+	0x13, 0xa1, 0xe9, 0x43, 0xbe, 0x7c, 0x00, 0x65, 
+	0xd2, 0x46, 0x12, 0x48, 0xc0, 0x39, 0x30, 0x18, 
+	0xe5, 0x4b, 0xd2, 0x70, 0x72, 0x49, 0x22, 0x79, 
+	0x00, 0x21, 0xd0, 0x00, 0x63, 0x80, 0x04, 0x24, 
+	0xd0, 0x00, 0x02, 0x10, 0xe9, 0x56, 0xd0, 0x41, 
+	0x51, 0x41, 0xe0, 0x36, 0x15, 0x61, 0xe8, 0x36, 
+	0xd5, 0x80, 0xd3, 0x00, 0xd3, 0x40, 0x04, 0x27, 
+	0xd0, 0x20, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
+	0x00, 0x21, 0xd0, 0x18, 0x73, 0x00, 0xb0, 0x04, 
+	0x73, 0x80, 0xd2, 0x80, 0xb0, 0x38, 0x72, 0xc0, 
+	0x31, 0x0d, 0xc0, 0x0e, 0x10, 0x0b, 0x10, 0x20, 
+	0xe9, 0x42, 0xf5, 0x3f, 0x22, 0x8d, 0x10, 0x01, 
+	0x13, 0x5f, 0xe1, 0x3b, 0x33, 0x8b, 0x15, 0x61, 
+	0xf9, 0x49, 0x00, 0x21, 0xd0, 0x64, 0x70, 0x41, 
+	0x33, 0x81, 0x03, 0xd0, 0xe9, 0x4c, 0x20, 0x0b, 
+	0x13, 0xdf, 0x12, 0xc1, 0x13, 0xe0, 0xf9, 0x49, 
+	0x10, 0x03, 0xc0, 0x50, 0x10, 0x4b, 0x13, 0x0b, 
+	0x23, 0x00, 0x13, 0x20, 0xe9, 0x5c, 0xf5, 0x59, 
+	0x22, 0x81, 0x13, 0x01, 0x10, 0x5f, 0xe1, 0x55, 
+	0x12, 0x99, 0x12, 0x87, 0x21, 0x0a, 0x00, 0xa0, 
+	0xd2, 0x80, 0xc3, 0x0a, 0x03, 0x90, 0xe9, 0x66, 
+	0x22, 0x82, 0x23, 0x03, 0x10, 0x81, 0x10, 0xc1, 
+	0x13, 0x9f, 0x13, 0xa0, 0xed, 0x62, 0xc0, 0x8a, 
+	0xc0, 0xcc, 0x04, 0x26, 0xd0, 0x00, 0xe0, 0x36, 
+	0x15, 0x61, 0xf9, 0x3d, 0x07, 0x32, 0xd0, 0x00, 
+	0x30, 0x03, 0xed, 0x3d, 0xc0, 0x03, 0x10, 0x1d, 
+	0x30, 0xc0, 0xc0, 0x02, 0x10, 0x1d, 0x30, 0x80, 
+	0xe1, 0x32, 0x10, 0x94, 0x10, 0xd4, 0x00, 0x21, 
+	0xd0, 0x20, 0x73, 0x00, 0xc5, 0x8c, 0xd3, 0x4e, 
+	0x01, 0x1b, 0xe9, 0x48, 0x13, 0x1f, 0xd3, 0x4f, 
+	0x43, 0x4c, 0x13, 0x1c, 0xc0, 0x0c, 0x10, 0x03, 
+	0x20, 0x0c, 0xc0, 0x40, 0x10, 0x42, 0x20, 0x40, 
+	0x10, 0x46, 0x20, 0x4d, 0x10, 0x42, 0x2e, 0x41, 
+	0x10, 0x5c, 0x10, 0x43, 0x00, 0x59, 0xe9, 0x5b, 
+	0x01, 0x69, 0xd0, 0x20, 0x30, 0x40, 0x22, 0x41, 
+	0x04, 0x27, 0xd0, 0x20, 0xe0, 0x36, 0x50, 0x00, 
+	0x2c, 0x14, 0xd0, 0x34, 0x63, 0x00, 0xd0, 0x38, 
+	0x72, 0xc0, 0xc0, 0x51, 0x10, 0x5c, 0x30, 0x4b, 
+	0x10, 0x44, 0xd4, 0xc0, 0xd5, 0x00, 0xc0, 0x18, 
+	0x30, 0x39, 0xed, 0x5f, 0xd4, 0xd0, 0xc5, 0x01, 
+	0xd0, 0x18, 0x70, 0x00, 0x0c, 0x1f, 0xe9, 0x48, 
+	0x10, 0x20, 0xfd, 0x48, 0xd4, 0xc0, 0xd5, 0x00, 
+	0x10, 0x22, 0xe5, 0x4e, 0xd4, 0xc0, 0xbc, 0x30, 
+	0xd5, 0x00, 0xb5, 0x10, 0xb0, 0x3f, 0xf9, 0x52, 
+	0x3c, 0x01, 0x3c, 0x01, 0x02, 0x1f, 0xe9, 0x5f, 
+	0x00, 0xa8, 0xd3, 0xc0, 0xd3, 0x9e, 0x00, 0xa9, 
+	0xd0, 0x38, 0x70, 0x4f, 0xb3, 0xfc, 0x60, 0x40, 
+	0xb0, 0x3c, 0xb3, 0x81, 0xed, 0x59, 0x00, 0x21, 
+	0xd0, 0x28, 0x70, 0x00, 0x10, 0x20, 0xf9, 0x69, 
+	0x02, 0x1f, 0xf9, 0x6a, 0x90, 0x10, 0x00, 0x1e, 
+	0xe9, 0x6a, 0xb1, 0x7c, 0x04, 0x29, 0xd0, 0x20, 
+	0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x01, 0x5e, 0xf9, 0x35, 0x01, 0x50, 0xe9, 0x35, 
+	0xb1, 0x78, 0xd2, 0x00, 0x01, 0x5c, 0xf9, 0x5f, 
+	0xc0, 0x18, 0x30, 0x39, 0xed, 0x5f, 0x11, 0x9f, 
+	0xce, 0x58, 0xc2, 0x59, 0x00, 0xa9, 0xd2, 0x38, 
+	0x14, 0x82, 0x22, 0x12, 0xc0, 0x0c, 0x10, 0x1f, 
+	0x10, 0x03, 0x22, 0x00, 0x70, 0x48, 0x03, 0x10, 
+	0xe9, 0x4c, 0xb2, 0x38, 0xbe, 0x60, 0xb2, 0x60, 
+	0x2e, 0x41, 0x10, 0x5f, 0x00, 0x59, 0xe9, 0x53, 
+	0x01, 0x69, 0xd0, 0x3c, 0x30, 0x40, 0x22, 0x41, 
+	0x13, 0x41, 0x2e, 0x4d, 0x13, 0x5d, 0x13, 0x43, 
+	0x22, 0x4d, 0x14, 0xe0, 0xe9, 0x5f, 0x33, 0x0b, 
+	0x13, 0x04, 0x2c, 0x0c, 0x35, 0x0c, 0xc3, 0x46, 
+	0xc3, 0x87, 0x04, 0x61, 0xd0, 0x28, 0x15, 0x62, 
+	0xfc, 0x36, 0x04, 0x2f, 0xd0, 0x28, 0xe0, 0x36, 
+	0x00, 0x22, 0xd0, 0x74, 0x74, 0x01, 0xb0, 0x7c, 
+	0x74, 0x41, 0xb0, 0x7c, 0x00, 0x27, 0xd0, 0x20, 
+	0x30, 0x11, 0xf5, 0x3b, 0x24, 0x40, 0x71, 0x41, 
+	0xd1, 0x08, 0xc0, 0x10, 0x10, 0x1c, 0xb0, 0x16, 
+	0xf9, 0x4a, 0x00, 0x23, 0xd0, 0x30, 0x30, 0x11, 
+	0xf9, 0x4a, 0xb1, 0x70, 0x01, 0x50, 0xf9, 0x4a, 
+	0xb1, 0x20, 0x14, 0x41, 0xc0, 0x90, 0x00, 0x2b, 
+	0xd0, 0xd0, 0x01, 0x50, 0xe9, 0x50, 0xc0, 0xd0, 
+	0x00, 0x34, 0xdc, 0x00, 0x20, 0x11, 0x10, 0x1f, 
+	0xa0, 0x1c, 0x00, 0x21, 0xd0, 0x2c, 0x70, 0x00, 
+	0x10, 0x05, 0x51, 0x40, 0xd0, 0x1c, 0x61, 0x40, 
+	0xd0, 0x20, 0x61, 0x00, 0xd0, 0x24, 0x60, 0x80, 
+	0xd0, 0x28, 0x60, 0xc0, 0x04, 0x2d, 0xd0, 0x08, 
+	0x00, 0x22, 0xd0, 0x64, 0xb1, 0x81, 0x61, 0x81, 
+	0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
+	0x90, 0x50, 0xd0, 0x3c, 0x10, 0x41, 0x60, 0x40, 
+	0x15, 0x62, 0xfd, 0x3d, 0xc0, 0x10, 0x10, 0x1e, 
+	0x10, 0x07, 0x21, 0x00, 0x10, 0x16, 0x34, 0x00, 
+	0xc0, 0x90, 0xd3, 0x40, 0x00, 0x24, 0xd3, 0xc0, 
+	0x04, 0x22, 0xd0, 0x20, 0x01, 0x9f, 0xe8, 0x36, 
+	0xd0, 0x54, 0x70, 0x41, 0x73, 0x41, 0x04, 0x2e, 
+	0xd0, 0x00, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
+	0x00, 0xef, 0xd3, 0x30, 0x73, 0x0c, 0xd0, 0x0c, 
+	0x70, 0x00, 0xc0, 0x40, 0x13, 0x24, 0xf5, 0x42, 
+	0x13, 0x22, 0xe9, 0x41, 0xe5, 0x43, 0xd3, 0x00, 
+	0x10, 0x22, 0xf9, 0x41, 0xd0, 0x01, 0xd0, 0x43, 
+	0xd3, 0x01, 0x21, 0x00, 0xd3, 0x40, 0x03, 0x10, 
+	0xf9, 0x47, 0xd3, 0x40, 0xe1, 0x61, 0x00, 0x23, 
+	0xd0, 0x00, 0x10, 0x61, 0xe9, 0x50, 0xb0, 0x33, 
+	0x10, 0x63, 0xe9, 0x50, 0x00, 0x22, 0xd0, 0x1a, 
+	0xc3, 0xc0, 0xd2, 0xc0, 0x00, 0x10, 0xe9, 0x55, 
+	0x22, 0xd0, 0x10, 0x1f, 0x14, 0x01, 0x10, 0x20, 
+	0xed, 0x52, 0x14, 0x18, 0x12, 0xd8, 0xc0, 0x8b, 
+	0x32, 0xd0, 0x12, 0xc3, 0x33, 0x4b, 0x13, 0x47, 
+	0x21, 0x0d, 0x04, 0x22, 0xd0, 0x20, 0xe0, 0x36, 
+	0x00, 0x24, 0xd0, 0x30, 0xd0, 0x40, 0x60, 0x40, 
+	0xd3, 0xc7, 0x43, 0xc4, 0x31, 0x0f, 0xd5, 0xd4, 
+	0x25, 0xcf, 0x15, 0xc4, 0x10, 0xdf, 0xc2, 0xc6, 
+	0xc3, 0x07, 0x11, 0x81, 0xb1, 0x3b, 0x15, 0x64, 
+	0xe9, 0x47, 0x10, 0xdf, 0x12, 0xc1, 0x11, 0x81, 
+	0x11, 0xc1, 0xb1, 0x3f, 0xb5, 0xf8, 0x90, 0x10, 
+	0x00, 0x16, 0xf9, 0x5e, 0xb5, 0xfc, 0xd0, 0x20, 
+	0x40, 0x39, 0x2e, 0x4b, 0x22, 0x4c, 0x12, 0x20, 
+	0xe9, 0x59, 0x20, 0x39, 0x00, 0x1b, 0xe9, 0x59, 
+	0x2c, 0x13, 0x35, 0x13, 0x0e, 0x5a, 0xf9, 0x59, 
+	0xb2, 0x38, 0x02, 0xe3, 0xd0, 0x00, 0x0e, 0x5a, 
+	0xe9, 0x5e, 0x2e, 0x40, 0x01, 0xee, 0xd2, 0x80, 
+	0x42, 0x84, 0xc0, 0x03, 0x30, 0x02, 0xf5, 0x6b, 
+	0x31, 0x0a, 0x12, 0x98, 0x20, 0x03, 0xf5, 0x69, 
+	0x12, 0x9f, 0x12, 0x87, 0x51, 0x0a, 0x00, 0x34, 
+	0xd4, 0xc8, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
+	0xd3, 0xc7, 0x43, 0xc4, 0x15, 0x61, 0xf9, 0x48, 
+	0x10, 0xc1, 0xd5, 0xe0, 0xd1, 0x80, 0xd1, 0xc0, 
+	0x31, 0x0f, 0x13, 0xe1, 0xe9, 0x3c, 0xd3, 0xc0, 
+	0x00, 0x24, 0xd0, 0x30, 0x63, 0xc0, 0x25, 0xcf, 
+	0x15, 0xc2, 0xd0, 0x03, 0x40, 0x16, 0x25, 0xc0, 
+	0x15, 0xc2, 0x15, 0x81, 0x35, 0x91, 0xe1, 0x5c, 
+	0x00, 0x24, 0xd0, 0x30, 0x63, 0xc0, 0x01, 0x50, 
+	0xe9, 0x54, 0x15, 0xa0, 0xf9, 0x55, 0x00, 0x24, 
+	0xd0, 0x34, 0x70, 0x00, 0x10, 0x20, 0xe9, 0x55, 
+	0xd3, 0xc0, 0x31, 0x0f, 0xd5, 0xfc, 0x25, 0xcf, 
+	0x15, 0xc3, 0x14, 0xa0, 0xe9, 0x5c, 0xb5, 0xfc, 
+	0x00, 0x34, 0xd4, 0xc8, 0xe0, 0x36, 0x50, 0x00, 
+	0xc4, 0x91, 0x34, 0x96, 0xed, 0x34, 0xd4, 0x80, 
+	0x14, 0x84, 0xb3, 0xc1, 0xe5, 0x41, 0xc0, 0x52, 
+	0x10, 0x5e, 0x34, 0x81, 0xb3, 0xc1, 0xe5, 0x41, 
+	0xc0, 0x52, 0x10, 0x5c, 0x24, 0x81, 0xb3, 0xc1, 
+	0xe5, 0x37, 0x02, 0x68, 0xd0, 0x00, 0xb4, 0xb0, 
+	0x14, 0x9b, 0x00, 0x23, 0xd0, 0x70, 0x30, 0x52, 
+	0xed, 0x4a, 0x24, 0x81, 0x20, 0x12, 0xa0, 0x1c, 
+	0x10, 0x8a, 0x50, 0x83, 0xa0, 0x96, 0xa1, 0x50, 
+	0xa1, 0x11, 0xc0, 0x52, 0xd4, 0x84, 0x10, 0x6c, 
+	0xed, 0x56, 0xd4, 0x81, 0xd1, 0x00, 0xb1, 0x13, 
+	0x00, 0x23, 0xd1, 0x40, 0xc2, 0xb9, 0x22, 0x86, 
+	0x12, 0x20, 0xf9, 0x66, 0x02, 0xe3, 0xd0, 0x40, 
+	0x02, 0x9a, 0xe9, 0x63, 0x22, 0x81, 0x02, 0x5a, 
+	0xe9, 0x66, 0x22, 0x41, 0x75, 0xd7, 0xc3, 0xd7, 
+	0xd0, 0xd7, 0x00, 0x21, 0xd0, 0xb6, 0x8b, 0x38, 
+	0x00, 0x33, 0xdc, 0xd0, 0xe0, 0x36, 0x50, 0x00, 
+	0xd0, 0x7c, 0x60, 0x01, 0xae, 0x52, 0xd0, 0x60, 
+	0x40, 0x79, 0x00, 0x13, 0xe8, 0xc9, 0xa2, 0x94, 
+	0x22, 0x86, 0x13, 0xe0, 0xe4, 0xd0, 0x13, 0xc1, 
+	0x15, 0x62, 0xfc, 0xd1, 0x13, 0xc1, 0xe0, 0xd1, 
+	0xc3, 0xd7, 0x03, 0xd9, 0xe8, 0xd4, 0x22, 0x8d, 
+	0x15, 0x62, 0xfc, 0xda, 0x03, 0xda, 0xe8, 0xda, 
+	0x22, 0x8d, 0x22, 0x8d, 0xce, 0x4a, 0x22, 0x86, 
+	0x00, 0x14, 0xe8, 0xe0, 0xa2, 0x53, 0x22, 0x47, 
+	0x03, 0xd1, 0xe8, 0xe8, 0x22, 0x4e, 0x15, 0x62, 
+	0xfc, 0xe8, 0x03, 0xd2, 0xe8, 0xe8, 0x22, 0x4e, 
+	0x12, 0x20, 0xe9, 0x09, 0x20, 0x79, 0x00, 0x5b, 
+	0xe8, 0xf4, 0x15, 0x20, 0xfc, 0xf1, 0x2c, 0x13, 
+	0x35, 0x13, 0x0e, 0x5b, 0xe8, 0xf4, 0xb2, 0x38, 
+	0x02, 0x9a, 0xe8, 0xfb, 0x70, 0x08, 0xd0, 0x7c, 
+	0x42, 0x81, 0x22, 0x98, 0x22, 0x80, 0x02, 0x5a, 
+	0xe9, 0x11, 0x70, 0x08, 0xd0, 0x78, 0x42, 0x41, 
+	0x22, 0x59, 0x10, 0x1f, 0x22, 0x40, 0x00, 0x19, 
+	0xe9, 0x11, 0x01, 0x69, 0xd0, 0x7c, 0x32, 0x41, 
+	0xe1, 0x11, 0x02, 0xe3, 0xd0, 0x40, 0x02, 0x9a, 
+	0xe9, 0x0e, 0x22, 0x81, 0x02, 0x5a, 0xe9, 0x11, 
+	0x22, 0x41, 0x0e, 0x5a, 0xe9, 0x15, 0xce, 0x4a, 
+	0x3e, 0x46, 0x0f, 0x87, 0xdd, 0x48, 0xe1, 0x19, 
+	0xdd, 0x40, 0xdc, 0xc8, 0xdd, 0x3c, 0x7d, 0x34, 
+	0x1d, 0x19, 0x3d, 0x35, 0x4d, 0x33, 0x4c, 0xec, 
+	0x3d, 0x33, 0xf9, 0x17, 0x0f, 0xc5, 0x50, 0x00, 
+	0xd0, 0x39, 0xd0, 0x35, 0xd0, 0x1d, 0xd0, 0x2d, 
+	0xd0, 0x3f, 0xd0, 0x2e, 0xd0, 0x3c, 0xd0, 0x37, 
+	0xd0, 0x38, 0xd0, 0x19, 0xd0, 0x33, 0xd0, 0x2e, 
+	0xd0, 0x3d, 0xd0, 0x3e, 0xd0, 0x27, 0xd0, 0x3e, 
+	0xd0, 0x3a, 0xd0, 0x2f, 0xd0, 0x32, 0x00, 0x00, 
+	0x47, 0x78, 0x46, 0xc0, 0xe1, 0x01, 0x00, 0x90, 
+	0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
+	0xe9, 0x2d, 0x40, 0x00, 0xe5, 0x9f, 0x20, 0x6c, 
+	0xe0, 0x21, 0x10, 0x01, 0xe1, 0x02, 0x00, 0x91, 
+	0xe3, 0x50, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x02, 
+	0xe3, 0xa0, 0x00, 0x00, 0xeb, 0x00, 0x38, 0x71, 
+	0xea, 0xff, 0xff, 0xf7, 0xe8, 0xbd, 0x40, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xb5, 0x00, 0x4a, 0x12, 
+	0x68, 0x10, 0x28, 0x00, 0xd1, 0x03, 0x20, 0x00, 
+	0xf7, 0xf0, 0xfb, 0x8c, 0xe7, 0xf7, 0xbd, 0x00, 
+	0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
+	0xe5, 0x9f, 0x20, 0x2c, 0xe3, 0xa0, 0x10, 0x01, 
+	0xe1, 0x02, 0x00, 0x91, 0xe3, 0x50, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x02, 0xe3, 0xa0, 0x00, 0x00, 
+	0xeb, 0x00, 0x38, 0x60, 0xea, 0xff, 0xff, 0xf7, 
+	0xe8, 0xbd, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x10, 
+	0x48, 0x02, 0x40, 0x49, 0x60, 0x01, 0x47, 0x70, 
+	0x70, 0x00, 0x00, 0x34, 0x2e, 0x08, 0x20, 0x28, 
+	0x47, 0x78, 0x46, 0xc0, 0xe1, 0xa0, 0x09, 0x00, 
+	0xe1, 0xb0, 0x10, 0x01, 0x03, 0xc0, 0x01, 0x02, 
+	0x13, 0x80, 0x01, 0x02, 0xe3, 0xa0, 0x13, 0x3f, 
+	0xe3, 0xa0, 0x30, 0x0e, 0xe1, 0xb0, 0x10, 0x81, 
+	0x3a, 0x00, 0x00, 0x04, 0xe1, 0xb0, 0x00, 0x80, 
+	0x32, 0x21, 0x13, 0x03, 0xe2, 0x53, 0x30, 0x01, 
+	0x1a, 0xff, 0xff, 0xf9, 0xea, 0x00, 0x00, 0x03, 
+	0xe1, 0xb0, 0x00, 0x80, 0x22, 0x21, 0x13, 0x03, 
+	0xe2, 0x53, 0x30, 0x01, 0x1a, 0xff, 0xff, 0xf4, 
+	0xe1, 0xa0, 0x0d, 0x21, 0xe1, 0x2f, 0xff, 0x1e, 
+	0xe9, 0x2d, 0x41, 0xf0, 0xe2, 0x4d, 0xd0, 0x14, 
+	0xe3, 0xa0, 0xc0, 0x44, 0xe2, 0x8c, 0xc4, 0x66, 
+	0xe5, 0x9c, 0xc0, 0x00, 0xe5, 0x9f, 0x01, 0x94, 
+	0xe5, 0x80, 0xc0, 0x00, 0xe1, 0xa0, 0xc1, 0x4c, 
+	0xe2, 0x0c, 0xc0, 0x03, 0xe5, 0x9f, 0x01, 0x88, 
+	0xe5, 0xc0, 0xc0, 0x00, 0xe5, 0x9f, 0x01, 0x84, 
+	0xe5, 0x90, 0x00, 0x00, 0xe0, 0x80, 0x64, 0x0c, 
+	0xe1, 0xa0, 0x70, 0x06, 0xe8, 0xb7, 0x00, 0x01, 
+	0xe2, 0x00, 0x40, 0x1f, 0xe2, 0x8f, 0x2f, 0x69, 
+	0xe7, 0x92, 0x21, 0x04, 0xe3, 0x52, 0x00, 0x00, 
+	0x0a, 0x00, 0x00, 0x51, 0xe5, 0x9f, 0x32, 0x1c, 
+	0xe2, 0x83, 0x50, 0xbc, 0xe5, 0x9f, 0x12, 0x1c, 
+	0xe1, 0x55, 0x00, 0x01, 0x03, 0xa0, 0x50, 0x00, 
+	0xe5, 0x9f, 0x12, 0x04, 0xe1, 0x51, 0x00, 0x05, 
+	0x0a, 0x00, 0x00, 0x45, 0xe5, 0x9f, 0x81, 0xf4, 
+	0xe0, 0x88, 0x80, 0x03, 0xe5, 0x9f, 0x11, 0x5c, 
+	0xe1, 0xa0, 0x36, 0x20, 0xe2, 0x03, 0x30, 0x0f, 
+	0xe1, 0x81, 0x10, 0x03, 0xe5, 0x9f, 0x21, 0x48, 
+	0xe7, 0x92, 0x31, 0x04, 0xe1, 0xa0, 0x39, 0x83, 
+	0xe1, 0xa0, 0x35, 0xa3, 0xe1, 0x81, 0x10, 0x03, 
+	0xe1, 0xa0, 0x33, 0xa0, 0xe2, 0x03, 0x30, 0x01, 
+	0xe1, 0xa0, 0x3b, 0x03, 0xe1, 0x81, 0x10, 0x03, 
+	0xe1, 0xa0, 0x35, 0x20, 0xe2, 0x03, 0x30, 0x03, 
+	0xe1, 0xa0, 0x32, 0x03, 0xe1, 0x81, 0x10, 0x03, 
+	0xe1, 0xa0, 0x3a, 0xa0, 0xe2, 0x03, 0x30, 0x01, 
+	0xe1, 0xa0, 0x3b, 0x83, 0xe1, 0x81, 0x10, 0x03, 
+	0xe1, 0xa0, 0x34, 0xa0, 0xe2, 0x03, 0x30, 0x01, 
+	0xe1, 0xa0, 0x3a, 0x83, 0xe1, 0x81, 0x10, 0x03, 
+	0xe2, 0x00, 0x30, 0x60, 0xe1, 0xa0, 0x31, 0x03, 
+	0xe1, 0x81, 0x10, 0x03, 0xe8, 0xa8, 0x00, 0x02, 
+	0xe5, 0x9f, 0x00, 0xf0, 0xe3, 0xa0, 0x10, 0x30, 
+	0xe5, 0x80, 0x10, 0x00, 0xe5, 0x9f, 0x00, 0x9c, 
+	0xe5, 0xd0, 0x40, 0x00, 0xe2, 0x84, 0x10, 0x01, 
+	0xe5, 0xc0, 0x10, 0x00, 0xe2, 0x04, 0x40, 0x00, 
+	0xe5, 0x9f, 0x00, 0x98, 0xe5, 0x90, 0x10, 0x00, 
+	0xe3, 0x11, 0x00, 0x10, 0x1a, 0x00, 0x00, 0x1a, 
+	0xe5, 0x80, 0x10, 0x00, 0xe5, 0x8f, 0x51, 0x4c, 
+	0xe1, 0xa0, 0x22, 0x04, 0xe1, 0x82, 0x10, 0x0c, 
+	0xe5, 0x9f, 0x00, 0xac, 0xe0, 0x80, 0x02, 0x01, 
+	0xe5, 0x80, 0x70, 0x00, 0xe5, 0x80, 0x80, 0x04, 
+	0xe5, 0x9f, 0x10, 0x5c, 0xe5, 0x80, 0x10, 0x08, 
+	0xe5, 0x9f, 0x10, 0x58, 0xe5, 0x80, 0x10, 0x0c, 
+	0xe5, 0x9f, 0x00, 0x58, 0xe5, 0x90, 0x10, 0x00, 
+	0xe0, 0x84, 0x00, 0x01, 0xe3, 0xa0, 0x20, 0x01, 
+	0xe1, 0xa0, 0x00, 0x12, 0xe3, 0xa0, 0x10, 0x40, 
+	0xe2, 0x81, 0x14, 0x66, 0xe5, 0x81, 0x00, 0x00, 
+	0xe3, 0xa0, 0x10, 0x01, 0xe1, 0xa0, 0x0c, 0x11, 
+	0xe3, 0xa0, 0x10, 0xb8, 0xe2, 0x81, 0x14, 0x66, 
+	0xe5, 0x81, 0x00, 0x00, 0xe2, 0x8d, 0xd0, 0x14, 
+	0xe8, 0xbd, 0x81, 0xf0, 0xe5, 0x9f, 0x10, 0xf0, 
+	0xe2, 0x81, 0x10, 0x01, 0xe5, 0x8f, 0x10, 0xe8, 
+	0xea, 0xff, 0xff, 0xf4, 0xe5, 0x9f, 0xf0, 0x08, 
+	0xa0, 0x00, 0x05, 0xc4, 0x80, 0x00, 0x00, 0xb8, 
+	0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x06, 0xf4, 
+	0xa0, 0x00, 0x04, 0x28, 0xa0, 0x00, 0x00, 0x00, 
+	0xa0, 0x00, 0x05, 0x50, 0x2c, 0x00, 0x1f, 0xe8, 
+	0x2c, 0x00, 0x1f, 0xea, 0x2c, 0x00, 0x1f, 0xf4, 
+	0x00, 0x00, 0x05, 0xe0, 0x00, 0x00, 0x02, 0x00, 
+	0x00, 0x00, 0x00, 0x12, 0x2c, 0x00, 0x02, 0x00, 
+	0x64, 0x00, 0x04, 0x00, 0x64, 0x00, 0x00, 0x80, 
+	0x47, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0xc0, 
+	0x66, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xea, 0x00, 0x00, 0x07, 0xe1, 0xb0, 0xf0, 0x0e, 
+	0xe5, 0x9f, 0xf1, 0x00, 0xe2, 0x5e, 0xf0, 0x04, 
+	0xe2, 0x5e, 0xf0, 0x08, 0xea, 0x00, 0x00, 0x02, 
+	0xe5, 0x9f, 0xf0, 0xec, 0xe2, 0x5e, 0xf0, 0x04, 
+	0x2c, 0x00, 0x00, 0xe8, 0xe1, 0x0f, 0x00, 0x00, 
+	0xe3, 0xc0, 0x00, 0x1f, 0xe3, 0x80, 0x00, 0x1b, 
+	0xe1, 0x29, 0xf0, 0x00, 0xe5, 0x9f, 0xd0, 0xd8, 
+	0xe5, 0x9f, 0x00, 0xd8, 0xe0, 0x8d, 0xd0, 0x00, 
+	0xe1, 0x0f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x1f, 
+	0xe3, 0x80, 0x00, 0x13, 0xe1, 0x29, 0xf0, 0x00, 
+	0xe5, 0x9f, 0xd0, 0xc4, 0xe5, 0x9f, 0x00, 0xc4, 
+	0xe0, 0x8d, 0xd0, 0x00, 0xe1, 0x0f, 0x00, 0x00, 
+	0xe3, 0xc0, 0x00, 0x1f, 0xe3, 0x80, 0x00, 0x12, 
+	0xe1, 0x29, 0xf0, 0x00, 0xe5, 0x9f, 0xd0, 0xb0, 
+	0xe5, 0x9f, 0x00, 0xb0, 0xe0, 0x8d, 0xd0, 0x00, 
+	0xe1, 0x0f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x9f, 
+	0xe3, 0x80, 0x00, 0x10, 0xe1, 0x29, 0xf0, 0x00, 
+	0xe5, 0x9f, 0xd0, 0x60, 0xeb, 0x00, 0x00, 0x08, 
+	0xe5, 0x9f, 0x00, 0x64, 0xe5, 0x9f, 0x10, 0x5c, 
+	0xeb, 0x00, 0x37, 0x7f, 0xe5, 0x9f, 0x00, 0x60, 
+	0xe5, 0x9f, 0x10, 0x58, 0xeb, 0x00, 0x37, 0x7f, 
+	0xe5, 0x9f, 0xe0, 0x58, 0xe3, 0x8e, 0xe0, 0x01, 
+	0xe1, 0x2f, 0xff, 0x1e, 0xe5, 0x9f, 0x00, 0x8c, 
+	0xe5, 0x9f, 0x10, 0x8c, 0xe5, 0x9f, 0x30, 0x8c, 
+	0xe1, 0x50, 0x00, 0x01, 0x0a, 0x00, 0x00, 0x03, 
+	0xe1, 0x51, 0x00, 0x03, 0x34, 0x90, 0x20, 0x04, 
+	0x34, 0x81, 0x20, 0x04, 0x3a, 0xff, 0xff, 0xfb, 
+	0xe5, 0x9f, 0x10, 0x74, 0xe3, 0xa0, 0x20, 0x00, 
+	0xe1, 0x53, 0x00, 0x01, 0x34, 0x83, 0x20, 0x04, 
+	0x3a, 0xff, 0xff, 0xfc, 0xe1, 0x2f, 0xff, 0x1e, 
+	0x2e, 0x1b, 0xff, 0xf0, 0x2e, 0x1b, 0x7f, 0xf0, 
+	0x2e, 0x1b, 0x7f, 0xef, 0x2e, 0x08, 0xd7, 0x6c, 
+	0xcc, 0x1f, 0xff, 0xef, 0xcc, 0x1f, 0x7f, 0xf0, 
+	0x2e, 0x00, 0x1a, 0xf9, 0x2e, 0x02, 0x38, 0xbc, 
+	0x2e, 0x02, 0x39, 0xb4, 0x2e, 0x08, 0x33, 0xa4, 
+	0x00, 0x00, 0x08, 0x00, 0x2e, 0x08, 0x23, 0xa4, 
+	0x00, 0x00, 0x08, 0x00, 0x2e, 0x08, 0x2b, 0xa4, 
+	0x00, 0x00, 0x08, 0x00, 0x2e, 0x08, 0x97, 0x1c, 
+	0xe5, 0x9f, 0xf0, 0x04, 0xe5, 0x9f, 0xf0, 0x04, 
+	0xe5, 0x9f, 0xf0, 0x04, 0x2e, 0x08, 0x97, 0x1c, 
+	0x2e, 0x08, 0x97, 0x1d, 0x2e, 0x08, 0x97, 0x1e, 
+	0x2e, 0x03, 0xa9, 0xd0, 0x2e, 0x08, 0x00, 0x00, 
+	0x2e, 0x08, 0x3c, 0x20, 0x2e, 0x08, 0xd7, 0x68, 
+	0x1d, 0x77, 0x1e, 0x16, 0x03, 0x00, 0x03, 0x03, 
+	0x1d, 0x7f, 0x50, 0x50, 0x4f, 0x5d, 0x49, 0x5d, 
+	0x40, 0x4a, 0x44, 0x43, 0x01, 0x49, 0x4d, 0x56, 
+	0x48, 0x4b, 0x5d, 0x4f, 0x5d, 0x4d, 0x4f, 0x0a, 
+	0x78, 0x71, 0x73, 0x7f, 0x70, 0x00, 0x00, 0x00, 
+	0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 
+	0x00, 0x00, 0x00, 0x1b, 0x12, 0x12, 0x12, 0x12, 
+	0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 
+	0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 
+	0x12, 0x12, 0x12, 0x12, 0x08, 0x0f, 0x0f, 0x0d, 
+	0x13, 0x0d, 0x11, 0x0e, 0x07, 0x08, 0x09, 0x0d, 
+	0x0d, 0x15, 0x10, 0x05, 0x08, 0x08, 0x09, 0x0e, 
+	0x07, 0x08, 0x07, 0x07, 0x0d, 0x0d, 0x0d, 0x0d, 
+	0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x07, 0x07, 
+	0x0e, 0x0e, 0x0e, 0x0d, 0x18, 0x0f, 0x10, 0x11, 
+	0x11, 0x10, 0x0f, 0x13, 0x11, 0x06, 0x0c, 0x10, 
+	0x0d, 0x13, 0x11, 0x13, 0x10, 0x13, 0x11, 0x10, 
+	0x0e, 0x11, 0x0f, 0x17, 0x0f, 0x10, 0x0f, 0x07, 
+	0x07, 0x07, 0x0c, 0x0d, 0x08, 0x0d, 0x0e, 0x0c, 
+	0x0e, 0x0d, 0x07, 0x0e, 0x0e, 0x05, 0x06, 0x0c, 
+	0x06, 0x14, 0x0e, 0x0d, 0x0e, 0x0e, 0x08, 0x0c, 
+	0x07, 0x0e, 0x0b, 0x11, 0x0b, 0x0c, 0x0c, 0x08, 
+	0x06, 0x08, 0x0e, 0x12, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xc0, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x19, 0x80, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x0c, 0xc0, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x0c, 0xc0, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x19, 0x80, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
+	0x0c, 0xc0, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x0c, 0xc0, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0x00, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x30, 0x01, 0x80, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0xc0, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0xc0, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0xc0, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0xf0, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x03, 0xe0, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0x30, 0x78, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0x30, 0x1c, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x3e, 0x60, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x0c, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x70, 0x60, 0x00, 0x00, 0x30, 0x01, 0x80, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x32, 0x0c, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 
+	0x60, 0xe0, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
+	0x30, 0x70, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x37, 0x1c, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 
+	0x71, 0xe0, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x33, 0xf8, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 
+	0x7f, 0xe0, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x31, 0xf0, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x00, 
+	0x1e, 0x30, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
+	0x06, 0x30, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
+	0x1e, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
+	0x0e, 0x70, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x33, 0x07, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
+	0x0e, 0x70, 0x00, 0x00, 0x7a, 0xf0, 0x00, 0x00, 
+	0x61, 0x86, 0x00, 0x00, 0x1c, 0xe0, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
+	0x0c, 0x60, 0x00, 0x00, 0x62, 0x30, 0x00, 0x00, 
+	0x61, 0x8e, 0x00, 0x00, 0x18, 0x60, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
+	0x0c, 0x60, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 
+	0x61, 0x8c, 0x00, 0x00, 0x18, 0x60, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 
+	0x61, 0x9c, 0x00, 0x00, 0x0c, 0xe0, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 
+	0x61, 0xb8, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0xc0, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
+	0x33, 0x30, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0xc0, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
+	0x1e, 0x73, 0xc0, 0x00, 0x1f, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0xc0, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 
+	0x00, 0x66, 0x60, 0x00, 0x39, 0xcc, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x39, 0xc0, 0x00, 0x00, 0x02, 0x70, 0x00, 0x00, 
+	0x00, 0xec, 0x30, 0x00, 0x70, 0xdc, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x02, 0x30, 0x00, 0x00, 
+	0x00, 0xcc, 0x30, 0x00, 0x60, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x62, 0x30, 0x00, 0x00, 
+	0x01, 0xcc, 0x30, 0x00, 0x60, 0x78, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x31, 0x80, 0x00, 0x00, 0x72, 0x70, 0x00, 0x00, 
+	0x01, 0x8c, 0x30, 0x00, 0x70, 0x38, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x3a, 0xf0, 0x00, 0x00, 
+	0x03, 0x8c, 0x30, 0x00, 0x38, 0xfc, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x03, 0x06, 0x60, 0x00, 0x3f, 0xee, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x63, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x07, 0x03, 0xc0, 0x00, 0x0f, 0xcc, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0xc0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x70, 0x60, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x1d, 0x80, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0xc0, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x19, 0x80, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x0e, 0xc0, 0x00, 0x00, 
+	0x3f, 0x80, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x01, 0xc0, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
+	0x01, 0xc0, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 
+	0x7f, 0xe0, 0x00, 0x00, 0x67, 0x80, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x1c, 0xc0, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 
+	0x60, 0x70, 0x00, 0x00, 0x78, 0xe0, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
+	0x03, 0xc0, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x30, 0xe0, 0x00, 0x00, 
+	0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x60, 0x70, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x38, 0x60, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x30, 0x0f, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x38, 0x06, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 
+	0x07, 0xc0, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x0f, 0xfc, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x0f, 0xfe, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x30, 0x1e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3c, 0x07, 0x80, 0x00, 0x38, 0x06, 0x00, 0x00, 
+	0x0f, 0xfe, 0x00, 0x00, 0x07, 0xc1, 0xe0, 0x00, 
+	0x07, 0xc0, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x1e, 0x1e, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x30, 0x3c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3c, 0x07, 0x80, 0x00, 0x3c, 0x06, 0x00, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x0e, 0x00, 0x70, 0x00, 
+	0x06, 0xc0, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 
+	0x38, 0x07, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0x03, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x30, 0x70, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3c, 0x07, 0x80, 0x00, 0x3e, 0x06, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x1c, 0x79, 0xb8, 0x00, 
+	0x0e, 0xe0, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 
+	0x30, 0x07, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x03, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x30, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x36, 0x0d, 0x80, 0x00, 0x36, 0x06, 0x00, 0x00, 
+	0x30, 0x01, 0x80, 0x00, 0x39, 0xff, 0x9c, 0x00, 
+	0x0c, 0x60, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x31, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x36, 0x0d, 0x80, 0x00, 0x37, 0x06, 0x00, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x31, 0xcf, 0x9c, 0x00, 
+	0x0c, 0x60, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x37, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x36, 0x0d, 0x80, 0x00, 0x33, 0x06, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x33, 0x87, 0x0c, 0x00, 
+	0x1c, 0x70, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x3f, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x37, 0x1d, 0x80, 0x00, 0x31, 0x86, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x77, 0x03, 0x0c, 0x00, 
+	0x18, 0x30, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x60, 0x3f, 0x80, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x33, 0x19, 0x80, 0x00, 0x31, 0xc6, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x67, 0x03, 0x0c, 0x00, 
+	0x38, 0x38, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x3f, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x3d, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x33, 0x19, 0x80, 0x00, 0x30, 0xc6, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x66, 0x03, 0x0c, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x01, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x33, 0x19, 0x80, 0x00, 0x30, 0x66, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x66, 0x07, 0x1c, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x70, 0x03, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x01, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
+	0x30, 0x70, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x31, 0xb1, 0x80, 0x00, 0x30, 0x76, 0x00, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x66, 0x06, 0x18, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x07, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x01, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x00, 
+	0x30, 0x38, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x31, 0xb1, 0x80, 0x00, 0x30, 0x36, 0x00, 0x00, 
+	0x30, 0x01, 0x80, 0x00, 0x67, 0x0e, 0x38, 0x00, 
+	0x60, 0x0c, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x38, 0x06, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x00, 
+	0x30, 0x3c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x31, 0xf1, 0x80, 0x00, 0x30, 0x3e, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x77, 0x1e, 0x70, 0x00, 
+	0x60, 0x0c, 0x00, 0x00, 0x30, 0x1e, 0x00, 0x00, 
+	0x1e, 0x1e, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1e, 0x0f, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 
+	0x30, 0x1c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x31, 0xf1, 0x80, 0x00, 0x30, 0x1e, 0x00, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x73, 0xff, 0xe0, 0x00, 
+	0xe0, 0x0e, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x0f, 0xfc, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0f, 0xff, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
+	0x30, 0x0e, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x30, 0xe1, 0x80, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x0f, 0xfe, 0x00, 0x00, 0x39, 0xe7, 0xc0, 0x00, 
+	0xc0, 0x06, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x07, 0xf0, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x03, 0xfc, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
+	0x30, 0x07, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x30, 0xe1, 0x80, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x3c, 0x00, 0x0e, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0xf8, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x07, 0xf0, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x00, 
+	0xc0, 0x38, 0x06, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0xe0, 0x07, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x0f, 0xfe, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 
+	0xe0, 0x7c, 0x0e, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x1e, 0x00, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x30, 0x1e, 0x00, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 
+	0xe0, 0x7c, 0x0e, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x30, 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x0e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x60, 0x6c, 0x0c, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x01, 0x80, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x60, 0xec, 0x0c, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
+	0x1c, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x30, 0x06, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x70, 0xee, 0x1c, 0x00, 0x06, 0xc0, 0x00, 0x00, 
+	0x0e, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x39, 0xc0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x30, 0x1e, 0x00, 0x00, 
+	0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x70, 0xc6, 0x1c, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x06, 0x60, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 
+	0x30, 0xc6, 0x18, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x07, 0xf8, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 
+	0x31, 0xc7, 0x18, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x03, 0xc0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x30, 0xe0, 0x00, 0x00, 
+	0x00, 0x7c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x31, 0x83, 0x18, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0xc0, 0x00, 0x30, 0x70, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 
+	0x39, 0x83, 0x38, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x30, 0x38, 0x00, 0x00, 
+	0x60, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
+	0x1b, 0x83, 0xb0, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x31, 0x80, 0x00, 0x30, 0x38, 0x00, 0x00, 
+	0x70, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x30, 0x06, 0x00, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
+	0x1b, 0x01, 0xb0, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0x3f, 0x80, 0x00, 0x30, 0x1c, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x1f, 0x01, 0xf0, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1e, 0x1f, 0x00, 0x00, 0x30, 0x1e, 0x00, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x1c, 0x1c, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x1f, 0x01, 0xf0, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0f, 0xff, 0x80, 0x00, 0x30, 0x0e, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x0f, 0xf8, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x1e, 0x00, 0xe0, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x03, 0xff, 0xc0, 0x00, 0x30, 0x07, 0x00, 0x00, 
+	0x07, 0xf0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x07, 0xf0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x0e, 0x00, 0xe0, 0x00, 0xe0, 0x0e, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x33, 0xc0, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x0f, 0xb0, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x33, 0xc0, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x37, 0xcf, 0x80, 0x00, 0x33, 0xc0, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3f, 0xdf, 0x80, 0x00, 0x37, 0xe0, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x3c, 0x70, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x3c, 0x70, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x31, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3c, 0xf9, 0xc0, 0x00, 0x3c, 0x70, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x70, 0x60, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x38, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x33, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x70, 0xc0, 0x00, 0x38, 0x30, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0xe0, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3e, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x7f, 0xf0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3e, 0x60, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x33, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x60, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x33, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0xe0, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x70, 0x60, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x70, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x31, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x71, 0xe0, 0x00, 0x00, 0x3c, 0x70, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x7f, 0xe0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x30, 0x00, 0x00, 0x33, 0xc0, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x70, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x60, 0xc0, 0x00, 0x30, 0x30, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x60, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x37, 0xc0, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x00, 
+	0xc0, 0x81, 0x80, 0x00, 0xe0, 0x60, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x3f, 0xf0, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x00, 
+	0xc1, 0xc1, 0x80, 0x00, 0x60, 0xc0, 0x00, 0x00, 
+	0x60, 0xe0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x3c, 0x70, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 
+	0xe1, 0xc1, 0x80, 0x00, 0x31, 0xc0, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x00, 
+	0x63, 0xe3, 0x00, 0x00, 0x3b, 0x80, 0x00, 0x00, 
+	0x30, 0xc0, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 
+	0x63, 0x63, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
+	0x31, 0xc0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x7f, 0x98, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x7f, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 
+	0x67, 0x63, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x39, 0xc0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x67, 0xf8, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1f, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 
+	0x37, 0x76, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x19, 0x80, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x41, 0xf0, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x3b, 0x80, 0x00, 0x00, 
+	0x36, 0x36, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x19, 0x80, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 
+	0x60, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x30, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 
+	0x3e, 0x3e, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
+	0x1d, 0x80, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x60, 0x60, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x30, 0x70, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
+	0x1e, 0x3c, 0x00, 0x00, 0x3b, 0x80, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x3c, 0x70, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0xf0, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x1c, 0x1c, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x37, 0xe0, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x1c, 0x1c, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x02, 0x00, 0x00, 0x33, 0xc0, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x0f, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x0c, 0x18, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x21, 
+	0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 
+	0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 
+	0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 
+	0x0a, 0x12, 0x13, 0x10, 0x17, 0x10, 0x15, 0x10, 
+	0x08, 0x09, 0x0a, 0x10, 0x10, 0x1a, 0x13, 0x06, 
+	0x0a, 0x0a, 0x0b, 0x11, 0x08, 0x0a, 0x08, 0x08, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x08, 0x08, 0x11, 0x11, 0x11, 0x10, 
+	0x1d, 0x13, 0x13, 0x15, 0x15, 0x13, 0x12, 0x17, 
+	0x15, 0x07, 0x0f, 0x13, 0x10, 0x17, 0x15, 0x17, 
+	0x13, 0x17, 0x15, 0x13, 0x13, 0x15, 0x13, 0x1e, 
+	0x13, 0x13, 0x12, 0x08, 0x08, 0x08, 0x0e, 0x10, 
+	0x0a, 0x10, 0x10, 0x0f, 0x10, 0x10, 0x08, 0x10, 
+	0x10, 0x07, 0x07, 0x0e, 0x07, 0x19, 0x10, 0x10, 
+	0x10, 0x10, 0x0a, 0x0f, 0x08, 0x10, 0x0d, 0x15, 
+	0x0d, 0x0d, 0x0e, 0x0a, 0x08, 0x0a, 0x11, 0x16, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
+	0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x07, 0xff, 0x80, 0x00, 0x0e, 0x38, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1e, 0x1c, 0x00, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x0f, 0xff, 0xe0, 0x00, 0x0e, 0x38, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 
+	0x03, 0xb8, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x1f, 0x83, 0xf0, 0x00, 0x0e, 0x38, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x07, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3e, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 
+	0x78, 0x00, 0x3c, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x0f, 0x1e, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x78, 0x00, 0x3c, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 
+	0x0e, 0x0e, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x70, 0x00, 0x1c, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 
+	0x0e, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x70, 0x00, 0x1c, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x70, 0x00, 0x1c, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 
+	0x1c, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x70, 0x00, 0x1c, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x7f, 0x80, 0x00, 0x00, 0x38, 0x3e, 0x00, 0x00, 
+	0x1f, 0xff, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 
+	0x70, 0x00, 0x1c, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x7f, 0x80, 0x00, 0x00, 0x38, 0x1f, 0x00, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x78, 0x00, 0x3c, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x7f, 0x80, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x3f, 0x9c, 0x00, 0x00, 
+	0x78, 0x00, 0x3c, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x3c, 0x00, 0x78, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x3c, 0x01, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x78, 0x03, 0xc0, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x1e, 0x00, 0xf8, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x3c, 0x01, 0xe0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x39, 0xc3, 0x80, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x70, 0x3c, 0x00, 0x00, 
+	0x1f, 0x83, 0xf0, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x1f, 0x07, 0xc0, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x39, 0xe7, 0x00, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x78, 0x7c, 0x00, 0x00, 
+	0x0f, 0xff, 0xe0, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x0f, 0xff, 0x80, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0x00, 0x00, 
+	0xe0, 0x01, 0xe0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x03, 0xff, 0xc0, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x07, 0xff, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x7c, 0x00, 0x00, 
+	0xe0, 0x00, 0xe0, 0x00, 0x1f, 0x8e, 0x00, 0x00, 
+	0x00, 0xfe, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x03, 0xfe, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
+	0x0f, 0xe0, 0x00, 0x00, 0x0f, 0x80, 0x60, 0x00, 
+	0x03, 0xe0, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x01, 0xc0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x1f, 0xc0, 0xe0, 0x00, 
+	0x07, 0xf0, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, 
+	0x3d, 0xb8, 0x00, 0x00, 0x38, 0xe0, 0xc0, 0x00, 
+	0x0f, 0x78, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x76, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, 
+	0x79, 0xbc, 0x00, 0x00, 0x30, 0x61, 0xc0, 0x00, 
+	0x0e, 0x38, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, 
+	0x71, 0x9c, 0x00, 0x00, 0x30, 0x61, 0x80, 0x00, 
+	0x0e, 0x38, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0x71, 0x80, 0x00, 0x00, 0x30, 0x63, 0x80, 0x00, 
+	0x0e, 0x38, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x73, 0x80, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0x79, 0x80, 0x00, 0x00, 0x30, 0x63, 0x00, 0x00, 
+	0x0f, 0x78, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0x7d, 0x80, 0x00, 0x00, 0x30, 0x67, 0x00, 0x00, 
+	0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x39, 0xc0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1e, 0x78, 0x00, 0x00, 
+	0x3f, 0x80, 0x00, 0x00, 0x38, 0xe6, 0x00, 0x00, 
+	0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x19, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x1f, 0xce, 0x00, 0x00, 
+	0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x0f, 0xf8, 0x00, 0x00, 0x0f, 0x8c, 0x7c, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x00, 
+	0x01, 0xfc, 0x00, 0x00, 0x00, 0x1c, 0xfe, 0x00, 
+	0x3e, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0xf0, 0x00, 0x00, 
+	0x01, 0xbe, 0x00, 0x00, 0x00, 0x19, 0xc7, 0x00, 
+	0x38, 0x73, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0x01, 0x9e, 0x00, 0x00, 0x00, 0x39, 0x83, 0x00, 
+	0x78, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0x01, 0x8e, 0x00, 0x00, 0x00, 0x31, 0x83, 0x00, 
+	0x70, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0x71, 0x8e, 0x00, 0x00, 0x00, 0x71, 0x83, 0x00, 
+	0x70, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x71, 0x8e, 0x00, 0x00, 0x00, 0x61, 0x83, 0x00, 
+	0x70, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x79, 0x9e, 0x00, 0x00, 0x00, 0xe1, 0x83, 0x00, 
+	0x78, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x79, 0xe0, 0x00, 0x00, 
+	0x3d, 0xbc, 0x00, 0x00, 0x00, 0xc1, 0xc7, 0x00, 
+	0x3c, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0xfe, 0x00, 
+	0x1f, 0xfb, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 
+	0x0f, 0xf0, 0x00, 0x00, 0x01, 0x80, 0x7c, 0x00, 
+	0x0f, 0xe1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0x80, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xc0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
+	0x0f, 0xe0, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x03, 0xf0, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x0f, 0xf8, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x00, 0x78, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x3c, 0x3c, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
+	0x7c, 0x7c, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 
+	0x00, 0xf8, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x3e, 0x3e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x3c, 0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
+	0x78, 0x3c, 0x00, 0x00, 0x70, 0x3c, 0x00, 0x00, 
+	0x01, 0xf8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 
+	0x78, 0x1e, 0x00, 0x00, 0x1e, 0xe0, 0x00, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x01, 0xf8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x1c, 0xe0, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x03, 0xb8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0xfe, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x3f, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x10, 0xe0, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
+	0x07, 0x38, 0x00, 0x00, 0x7b, 0xe0, 0x00, 0x00, 
+	0x73, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
+	0x1c, 0x38, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x07, 0xfc, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x00, 0x3c, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
+	0x0f, 0x38, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 
+	0x77, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x03, 0xfc, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 
+	0x0e, 0x38, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
+	0x7f, 0xfc, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x0f, 0xe0, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x7e, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x1c, 0x38, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
+	0x7c, 0x3e, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x3c, 0x3e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x00, 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
+	0x38, 0x38, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
+	0x78, 0x1e, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x3c, 0x3c, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x7e, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x01, 0xe0, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
+	0x78, 0x38, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x78, 0x1e, 0x00, 0x00, 0x1f, 0xee, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x03, 0xfc, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x03, 0xc0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x7f, 0xfe, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x0f, 0xce, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0xfc, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x1f, 0xf0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x7f, 0xfe, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xfe, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x3f, 0x80, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x78, 0x1e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x7f, 0xfe, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x78, 0x0e, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x70, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x38, 0x1e, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x78, 0x1e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x3c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x3c, 0x3c, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x7c, 0x3e, 0x00, 0x00, 0x78, 0x7c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x7f, 0xfc, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x7f, 0xfc, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x0f, 0xf8, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x1f, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x7f, 0xfc, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x07, 0xe0, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1f, 0xf0, 0x00, 0x01, 0xf0, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x00, 0xff, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x01, 0xe0, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0x00, 
+	0x3c, 0x00, 0xe0, 0x00, 0x01, 0xff, 0x00, 0x00, 
+	0x00, 0x7f, 0xfe, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x07, 0xff, 0xc0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x03, 0xc0, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x7c, 0x00, 
+	0x3c, 0x00, 0xe0, 0x00, 0x07, 0xff, 0x80, 0x00, 
+	0x01, 0xff, 0xff, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x3f, 0xff, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x0f, 0xff, 0xe0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7e, 0x00, 0xfc, 0x00, 
+	0x3e, 0x00, 0xe0, 0x00, 0x0f, 0xff, 0xe0, 0x00, 
+	0x03, 0xf8, 0x3f, 0x80, 0x03, 0xb8, 0x00, 0x00, 
+	0x38, 0x0f, 0x80, 0x00, 0x1f, 0x83, 0xe0, 0x00, 
+	0x38, 0x07, 0xc0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1f, 0x83, 0xf0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x0f, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7e, 0x00, 0xfc, 0x00, 
+	0x3f, 0x00, 0xe0, 0x00, 0x1f, 0x83, 0xf0, 0x00, 
+	0x07, 0xc0, 0x07, 0xc0, 0x07, 0xbc, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x3e, 0x01, 0xe0, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7f, 0x01, 0xfc, 0x00, 
+	0x3f, 0x00, 0xe0, 0x00, 0x3e, 0x00, 0xf8, 0x00, 
+	0x07, 0x80, 0x03, 0xe0, 0x07, 0x1c, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x3c, 0x00, 0xf0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x78, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x77, 0x01, 0xdc, 0x00, 
+	0x3b, 0x80, 0xe0, 0x00, 0x3c, 0x00, 0x78, 0x00, 
+	0x0f, 0x0f, 0x1d, 0xe0, 0x07, 0x1c, 0x00, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x78, 0x00, 0x70, 0x00, 
+	0x38, 0x00, 0xf0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x30, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x77, 0x01, 0xdc, 0x00, 
+	0x3b, 0xc0, 0xe0, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x1e, 0x3f, 0xbc, 0xf0, 0x0f, 0x1e, 0x00, 0x00, 
+	0x38, 0x0f, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x70, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x77, 0x83, 0xdc, 0x00, 
+	0x39, 0xc0, 0xe0, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x1e, 0x7f, 0xfc, 0xf0, 0x0e, 0x0e, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x70, 0x00, 0x3f, 0xff, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x3f, 0xff, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x39, 0xe0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x73, 0x83, 0x9c, 0x00, 
+	0x38, 0xe0, 0xe0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x1c, 0xf9, 0xf8, 0x70, 0x0e, 0x0e, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x70, 0x00, 0x3f, 0xff, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x3f, 0xff, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3b, 0xe0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x73, 0x83, 0x9c, 0x00, 
+	0x38, 0xe0, 0xe0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x3c, 0xf0, 0xf8, 0x70, 0x1e, 0x0f, 0x00, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x70, 0x00, 0x3f, 0xff, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x0f, 0xf8, 0x00, 
+	0x3f, 0xff, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x73, 0xc7, 0x9c, 0x00, 
+	0x38, 0x70, 0xe0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x39, 0xe0, 0x78, 0x70, 0x1c, 0x07, 0x00, 0x00, 
+	0x38, 0x07, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x70, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x0f, 0xf8, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x71, 0xc7, 0x1c, 0x00, 
+	0x38, 0x38, 0xe0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x39, 0xe0, 0x78, 0x70, 0x1f, 0xff, 0x00, 0x00, 
+	0x38, 0x03, 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x70, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x0f, 0xf8, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3e, 0x78, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x71, 0xc7, 0x1c, 0x00, 
+	0x38, 0x38, 0xe0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x39, 0xc0, 0x70, 0x70, 0x3f, 0xff, 0x80, 0x00, 
+	0x38, 0x01, 0xc0, 0x00, 0x78, 0x00, 0x60, 0x00, 
+	0x38, 0x00, 0xf0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x38, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x71, 0xef, 0x1c, 0x00, 
+	0x38, 0x1c, 0xe0, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x39, 0xc0, 0xf0, 0xf0, 0x3f, 0xff, 0x80, 0x00, 
+	0x38, 0x01, 0xc0, 0x00, 0x78, 0x00, 0xf0, 0x00, 
+	0x38, 0x00, 0xf0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x38, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0x38, 0x00, 0x00, 0x38, 0x3e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0xee, 0x1c, 0x00, 
+	0x38, 0x1e, 0xe0, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x39, 0xc0, 0xf0, 0xe0, 0x38, 0x03, 0x80, 0x00, 
+	0x38, 0x01, 0xc0, 0x00, 0x3c, 0x00, 0xf0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x38, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0x38, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0xee, 0x1c, 0x00, 
+	0x38, 0x0e, 0xe0, 0x00, 0x3c, 0x00, 0x78, 0x00, 
+	0x39, 0xe1, 0xe1, 0xc0, 0x78, 0x03, 0xc0, 0x00, 
+	0x38, 0x03, 0xc0, 0x00, 0x3e, 0x01, 0xe0, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x78, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x78, 0x78, 0x00, 0x00, 0x38, 0x0f, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0xfe, 0x1c, 0x00, 
+	0x38, 0x07, 0xe0, 0x00, 0x1e, 0x00, 0xf8, 0x00, 
+	0x3d, 0xe3, 0xe3, 0xc0, 0x70, 0x01, 0xc0, 0x00, 
+	0x38, 0x07, 0xc0, 0x00, 0x1f, 0x87, 0xe0, 0x00, 
+	0x38, 0x07, 0xc0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1f, 0x81, 0xf8, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x7c, 0xf8, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x7c, 0x1c, 0x00, 
+	0x38, 0x07, 0xe0, 0x00, 0x1f, 0x83, 0xf0, 0x00, 
+	0x3c, 0xff, 0xe7, 0x80, 0x70, 0x01, 0xc0, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x3f, 0xff, 0x80, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x3f, 0xf0, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x7c, 0x1c, 0x00, 
+	0x38, 0x03, 0xe0, 0x00, 0x0f, 0xff, 0xe0, 0x00, 
+	0x1e, 0xfe, 0xff, 0x00, 0xe0, 0x01, 0xe0, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x3f, 0xf0, 0x00, 0x00, 0x38, 0x03, 0xc0, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x7c, 0x1c, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x03, 0xff, 0xc0, 0x00, 
+	0x1e, 0x3c, 0x7c, 0x78, 0xe0, 0x00, 0xe0, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 
+	0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x0f, 0xc0, 0x00, 0x00, 0x38, 0x01, 0xe0, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x38, 0x1c, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x00, 0xfe, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0xc0, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0xf8, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x7f, 0xff, 0xc0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x0f, 0x80, 0x38, 
+	0x78, 0x03, 0xc0, 0x00, 0xf0, 0x01, 0xe0, 0x00, 
+	0x7f, 0xff, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0xc0, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x7f, 0xff, 0xc0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0xf0, 0x01, 0xe0, 0x00, 0xf0, 0x0f, 0x80, 0x78, 
+	0x3c, 0x07, 0x80, 0x00, 0x70, 0x03, 0xc0, 0x00, 
+	0x7f, 0xff, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0xe0, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x0f, 0xff, 0xe0, 0x00, 
+	0x3f, 0xff, 0xc0, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x7f, 0xff, 0xc0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0xf0, 0x1f, 0xc0, 0x78, 
+	0x1c, 0x07, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x7f, 0xff, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x07, 0xc0, 0x00, 0x1f, 0x83, 0xf0, 0x00, 
+	0x38, 0x03, 0xe0, 0x00, 0x3e, 0x0f, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x70, 0x01, 0xc0, 0x00, 0x70, 0x1f, 0xc0, 0x70, 
+	0x1e, 0x0f, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x03, 0xc0, 0x00, 0x1e, 0x00, 0xf8, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x78, 0x03, 0xc0, 0x00, 0x70, 0x1d, 0xc0, 0x70, 
+	0x0f, 0x1e, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
+	0x00, 0x1e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x60, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x01, 0xc0, 0x00, 0x3c, 0x00, 0x78, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x78, 0x1d, 0xc0, 0xf0, 
+	0x07, 0xbc, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 
+	0x00, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x01, 0xc0, 0x00, 0x38, 0x00, 0x3c, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x38, 0x07, 0x80, 0x00, 0x78, 0x3d, 0xe0, 0xf0, 
+	0x07, 0xbc, 0x00, 0x00, 0x0f, 0x1e, 0x00, 0x00, 
+	0x00, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x01, 0xc0, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x3c, 0x07, 0x80, 0x00, 0x38, 0x38, 0xe0, 0xe0, 
+	0x03, 0xf8, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
+	0x00, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x30, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x03, 0xc0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x38, 0x03, 0xe0, 0x00, 0x1f, 0x80, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x1c, 0x07, 0x00, 0x00, 0x38, 0x38, 0xe0, 0xe0, 
+	0x01, 0xf0, 0x00, 0x00, 0x07, 0xbc, 0x00, 0x00, 
+	0x00, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x07, 0xc0, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x3f, 0xff, 0xc0, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x3c, 0x38, 0xe1, 0xe0, 
+	0x00, 0xe0, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x01, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x78, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x3f, 0xff, 0x80, 0x00, 0x03, 0xfe, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x1e, 0x0f, 0x00, 0x00, 0x3c, 0x78, 0xf1, 0xe0, 
+	0x01, 0xf0, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 
+	0x03, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x3f, 0xff, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x0e, 0x0e, 0x00, 0x00, 0x1c, 0x70, 0x71, 0xc0, 
+	0x01, 0xf0, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
+	0x38, 0x3c, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x0f, 0x1e, 0x00, 0x00, 0x1c, 0x70, 0x71, 0xc0, 
+	0x03, 0xb8, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x38, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x1e, 0x70, 0x73, 0xc0, 
+	0x07, 0xbc, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x08, 0x38, 0x00, 
+	0x38, 0x0f, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
+	0x07, 0x1c, 0x00, 0x00, 0x1e, 0xf0, 0x7b, 0xc0, 
+	0x0f, 0x1e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x0e, 0x78, 0x00, 
+	0x38, 0x07, 0x80, 0x00, 0x78, 0x03, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x3c, 0x01, 0xe0, 0x00, 
+	0x07, 0xbc, 0x00, 0x00, 0x0e, 0xe0, 0x3b, 0x80, 
+	0x0f, 0x1e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1e, 0x0f, 0xf0, 0x00, 
+	0x38, 0x03, 0x80, 0x00, 0x78, 0x07, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x3c, 0x01, 0xe0, 0x00, 
+	0x03, 0xb8, 0x00, 0x00, 0x0e, 0xe0, 0x3b, 0x80, 
+	0x1e, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1f, 0x83, 0xe0, 0x00, 
+	0x38, 0x03, 0xc0, 0x00, 0x3e, 0x0f, 0x80, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x1f, 0x07, 0xc0, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x0f, 0xe0, 0x3f, 0x80, 
+	0x3c, 0x07, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0x00, 
+	0x38, 0x01, 0xe0, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 
+	0x03, 0xf8, 0x00, 0x00, 0x0f, 0xe0, 0x3f, 0x80, 
+	0x38, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0xff, 0xff, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x06, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf8, 0x00, 
+	0x38, 0x00, 0xe0, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 
+	0x01, 0xf0, 0x00, 0x00, 0x07, 0xc0, 0x1f, 0x00, 
+	0x78, 0x03, 0xc0, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0xff, 0xff, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x01, 0xff, 0x3c, 0x00, 
+	0x38, 0x00, 0xf0, 0x00, 0x07, 0xf8, 0x00, 0x00, 
+	0x00, 0xe0, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 
+	0x01, 0xf0, 0x00, 0x00, 0x07, 0xc0, 0x1f, 0x00, 
+	0xf0, 0x01, 0xe0, 0x00, 0x00, 0xe0, 0x00, 0x00, 
+	0xff, 0xff, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 
+	0x39, 0xf0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x0f, 0x9c, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0xfe, 0x00, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
+	0x39, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x39, 0xf0, 0xf8, 0x00, 
+	0x39, 0xf0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0xfe, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3f, 0xfb, 0xfc, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x3e, 0x3c, 0x00, 0x00, 0x3c, 0x78, 0x00, 0x00, 
+	0x3c, 0x7c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x3e, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x1e, 0x00, 
+	0x3e, 0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x38, 0x3c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x3c, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x39, 0xe0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x1e, 0x0e, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x1e, 0x00, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x78, 0x3c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3b, 0xc0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0x9c, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3b, 0xc0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x70, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x39, 0xe0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x3c, 0x1e, 0x00, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x78, 0x3c, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x3c, 0x00, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x38, 0x3c, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x78, 0x7c, 0x00, 0x00, 
+	0x3e, 0x3c, 0x00, 0x00, 0x3c, 0x78, 0x00, 0x00, 
+	0x3c, 0x7c, 0x00, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0x8e, 0x00, 0x00, 
+	0x39, 0xf0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x0f, 0x9c, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x0e, 0x00, 
+	0x38, 0x1c, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7c, 0x78, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x39, 0xf0, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
+	0x3b, 0xc0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
+	0xfe, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0xe0, 0x38, 0x00, 0x01, 0xe0, 0x70, 0x3c, 0x00, 
+	0xe0, 0x38, 0x00, 0x00, 0xe0, 0x38, 0x00, 0x00, 
+	0x7f, 0xf8, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
+	0xfe, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0xf0, 0x78, 0x00, 0x00, 0xe0, 0x70, 0x38, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0xf0, 0x78, 0x00, 0x00, 
+	0x7f, 0xf8, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3e, 0x3c, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x3e, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0xe0, 0xf8, 0x38, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x00, 0x78, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x1f, 0x01, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0xe0, 0xf8, 0x38, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
+	0x00, 0xf0, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x7f, 0xe3, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x38, 0x1e, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x70, 0xd8, 0x70, 0x00, 
+	0x1d, 0xc0, 0x00, 0x00, 0x78, 0xf0, 0x00, 0x00, 
+	0x01, 0xe0, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x7f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x71, 0xdc, 0x70, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x03, 0xc0, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x61, 0xff, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x71, 0x8c, 0x70, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x40, 0x7c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x31, 0x8c, 0x60, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x39, 0xe0, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x1d, 0xc0, 0x00, 0x00, 0x33, 0x8e, 0xe0, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x1d, 0xc0, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x38, 0x0e, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x1d, 0xc0, 0x00, 0x00, 0x3b, 0x06, 0xe0, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x1d, 0xc0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3c, 0x1e, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x0d, 0x80, 0x00, 0x00, 0x1b, 0x06, 0xe0, 0x00, 
+	0x1d, 0xc0, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3c, 0x1c, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x78, 0x1c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x1f, 0x07, 0xc0, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3e, 0x3c, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
+	0x0f, 0x80, 0x00, 0x00, 0x1e, 0x07, 0xc0, 0x00, 
+	0x38, 0xe0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
+	0x3e, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x1e, 0x03, 0xc0, 0x00, 
+	0x70, 0x70, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
+	0x39, 0xe0, 0x00, 0x00, 0x07, 0x9c, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x0e, 0x03, 0x80, 0x00, 
+	0xe0, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 
+	0x00, 0x00, 0x00, 0x27, 0x1a, 0x1a, 0x1a, 0x1a, 
+	0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 
+	0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 
+	0x1a, 0x1a, 0x1a, 0x1a, 0x0b, 0x15, 0x17, 0x13, 
+	0x1a, 0x13, 0x19, 0x13, 0x09, 0x0b, 0x0c, 0x13, 
+	0x13, 0x1e, 0x17, 0x06, 0x0b, 0x0b, 0x0d, 0x14, 
+	0x09, 0x0b, 0x09, 0x09, 0x13, 0x13, 0x13, 0x13, 
+	0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x09, 0x09, 
+	0x14, 0x14, 0x14, 0x13, 0x23, 0x17, 0x17, 0x19, 
+	0x19, 0x17, 0x15, 0x1a, 0x19, 0x09, 0x11, 0x17, 
+	0x13, 0x1d, 0x19, 0x1a, 0x17, 0x1a, 0x19, 0x17, 
+	0x15, 0x19, 0x17, 0x22, 0x17, 0x15, 0x15, 0x09, 
+	0x09, 0x09, 0x11, 0x13, 0x0b, 0x12, 0x12, 0x11, 
+	0x12, 0x12, 0x0a, 0x12, 0x13, 0x07, 0x07, 0x11, 
+	0x07, 0x1b, 0x13, 0x12, 0x12, 0x12, 0x0b, 0x11, 
+	0x09, 0x13, 0x11, 0x17, 0x10, 0x11, 0x10, 0x0b, 
+	0x09, 0x0b, 0x14, 0x1a, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
+	0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
+	0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
+	0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
+	0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
+	0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
+	0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
+	0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
+	0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
+	0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
+	0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
+	0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
+	0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0xe3, 0x80, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0xe3, 0x80, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0xe3, 0x80, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfe, 
+	0x00, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 
+	0x03, 0xff, 0xf0, 0x00, 0x00, 0x07, 0x1c, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x07, 
+	0x1c, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
+	0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
+	0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
+	0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfe, 
+	0x00, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 
+	0x07, 0xe1, 0xf8, 0x00, 0x00, 0x07, 0x1c, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x07, 
+	0x1c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x07, 0x00, 0x00, 0x00, 0x00, 0xee, 
+	0x00, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 
+	0x0f, 0x80, 0x7c, 0x00, 0x00, 0x07, 0x1c, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x07, 
+	0x1c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x07, 0x00, 0x00, 0x00, 0x01, 0xef, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x07, 0x00, 0x00, 0x00, 0x01, 0xc7, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x07, 0x00, 0x00, 0x00, 0x03, 0xc7, 
+	0x80, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x03, 0xf0, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x0e, 0x00, 0x00, 0x00, 0x03, 0xc7, 
+	0x80, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0xfc, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x0e, 0x00, 0x00, 0x00, 0x03, 0x83, 
+	0x80, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x1f, 0xfe, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x07, 0x83, 
+	0xc0, 0x00, 0x00, 0x78, 0x1f, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x3e, 0x1f, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x07, 0x01, 
+	0xc0, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x3c, 0x0f, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x0f, 0x01, 
+	0xe0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x78, 0x07, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x1f, 0x00, 0x00, 0x00, 0x0f, 0x01, 
+	0xe0, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x0f, 0x80, 0x00, 0x00, 0x0f, 0xff, 
+	0xe0, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 
+	0x00, 0x1c, 0x07, 0xc0, 0x00, 0x00, 0x1f, 0xff, 
+	0xf0, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x07, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 
+	0x00, 0x1c, 0x01, 0xe0, 0x00, 0x00, 0x1f, 0xff, 
+	0xf0, 0x00, 0x00, 0x3f, 0xf7, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x0f, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 
+	0x70, 0x00, 0x00, 0x7c, 0x07, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x3c, 0x00, 
+	0x78, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x1e, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x20, 0x70, 0x00, 0x00, 0x38, 0x00, 
+	0x38, 0x00, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x1e, 0x00, 0x00, 0x78, 0x07, 0x80, 
+	0x00, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 0x38, 
+	0x07, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0xf0, 0xf0, 0x00, 0x00, 0x78, 0x00, 
+	0x3c, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0x00, 
+	0x0f, 0x80, 0x7c, 0x00, 0x00, 0x3c, 0x0f, 0x00, 
+	0x00, 0x00, 0x0f, 0x00, 0x78, 0x00, 0x00, 0x3c, 
+	0x07, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0xf9, 0xf0, 0x00, 0x00, 0x78, 0x00, 
+	0x3c, 0x00, 0x00, 0x7c, 0x3f, 0x00, 0x00, 0x00, 
+	0x07, 0xe1, 0xf8, 0x00, 0x00, 0x3e, 0x1f, 0x00, 
+	0x00, 0x00, 0x0f, 0xc1, 0xf8, 0x00, 0x00, 0x3e, 
+	0x1f, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x7f, 0xe0, 0x00, 0x00, 0x70, 0x00, 
+	0x1c, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 0x00, 
+	0x03, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xfe, 0x00, 
+	0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x1f, 
+	0xff, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
+	0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
+	0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
+	0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
+	0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x3f, 0xc0, 0x00, 0x00, 0xf0, 0x00, 
+	0x1e, 0x00, 0x00, 0x3f, 0xf7, 0x80, 0x00, 0x00, 
+	0x01, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xfc, 0x00, 
+	0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x1f, 
+	0xfb, 0x80, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
+	0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
+	0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
+	0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
+	0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x1f, 0x80, 0x00, 0x00, 0xe0, 0x00, 
+	0x0e, 0x00, 0x00, 0x0f, 0xe3, 0x80, 0x00, 0x00, 
+	0x00, 0x7f, 0x80, 0x00, 0x00, 0x03, 0xf0, 0x00, 
+	0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x07, 
+	0xe3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x01, 0xc3, 0x80, 0x00, 0x00, 
+	0x07, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x0e, 
+	0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x01, 0xc7, 0x80, 0x00, 0x00, 
+	0x0f, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x1e, 
+	0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 
+	0x1f, 0xfe, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x1c, 
+	0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x03, 0xc7, 0x00, 0x00, 0x00, 
+	0x3e, 0xde, 0x00, 0x00, 0x00, 0x3c, 0x78, 0x3c, 
+	0x00, 0x00, 0x07, 0x8f, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x76, 0xe0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x03, 0x87, 0x00, 0x00, 0x00, 
+	0x3c, 0xcf, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 
+	0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x03, 0x87, 0x00, 0x00, 0x00, 
+	0x38, 0xc7, 0x00, 0x00, 0x00, 0x38, 0x38, 0x78, 
+	0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x03, 0x8f, 0x00, 0x00, 0x00, 
+	0x38, 0xc0, 0x00, 0x00, 0x00, 0x38, 0x38, 0x70, 
+	0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 
+	0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
+	0x38, 0xc0, 0x00, 0x00, 0x00, 0x38, 0x38, 0xf0, 
+	0x00, 0x00, 0x07, 0x8f, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 
+	0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
+	0x3c, 0xc0, 0x00, 0x00, 0x00, 0x38, 0x38, 0xe0, 
+	0x00, 0x00, 0x03, 0x9e, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x39, 0xc0, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
+	0x1e, 0xc0, 0x00, 0x00, 0x00, 0x3c, 0x79, 0xe0, 
+	0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x19, 0x80, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x00, 
+	0x1f, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x71, 0xc0, 
+	0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x07, 0x1e, 0x00, 0x00, 0x00, 
+	0x0f, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xe3, 0xc0, 
+	0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0x1e, 0x00, 0x00, 0x00, 
+	0x03, 0xfe, 0x00, 0x00, 0x00, 0x07, 0xc3, 0x8f, 
+	0x80, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xbf, 
+	0xc0, 0x00, 0x0f, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x07, 0x38, 
+	0xe0, 0x00, 0x1e, 0x3c, 0x78, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
+	0x00, 0xc7, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x78, 
+	0xf0, 0x00, 0x3c, 0x1e, 0x78, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
+	0x00, 0xc3, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x70, 
+	0x70, 0x00, 0x38, 0x1e, 0xf0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
+	0x00, 0xc3, 0x80, 0x00, 0x00, 0x00, 0x1e, 0x70, 
+	0x70, 0x00, 0x38, 0x0f, 0xf0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x1e, 0x38, 0x00, 0x00, 0x00, 
+	0x70, 0xc3, 0x80, 0x00, 0x00, 0x00, 0x1c, 0x70, 
+	0x70, 0x00, 0x38, 0x07, 0xe0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 0x00, 
+	0x78, 0xc7, 0x80, 0x00, 0x00, 0x00, 0x3c, 0x70, 
+	0x70, 0x00, 0x3c, 0x03, 0xc0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 0x00, 
+	0x78, 0xc7, 0x80, 0x00, 0x00, 0x00, 0x38, 0x70, 
+	0x70, 0x00, 0x3c, 0x07, 0xe0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x78, 0x00, 0x00, 0x00, 
+	0x3e, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 
+	0xf0, 0x00, 0x1f, 0x1f, 0xf0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3c, 0x78, 0x00, 0x00, 0x00, 
+	0x3f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x70, 0x38, 
+	0xe0, 0x00, 0x0f, 0xff, 0x7c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3c, 0x70, 0x00, 0x00, 0x00, 
+	0x1f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 
+	0xc0, 0x00, 0x07, 0xfe, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xf0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, 
+	0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 
+	0x80, 0x00, 0x03, 0xf8, 0x18, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xe0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
+	0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0xfc, 
+	0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 
+	0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x00, 0x7f, 
+	0xff, 0xc0, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0xf8, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x0f, 0xfe, 
+	0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 
+	0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x7f, 
+	0xff, 0xc0, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x1f, 0xff, 
+	0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x80, 
+	0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 0x00, 0x7f, 
+	0xff, 0xc0, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0xff, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 
+	0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x3e, 0x0f, 
+	0x80, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00, 0x00, 
+	0x00, 0x3e, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
+	0x00, 0x00, 0x1f, 0x0f, 0x80, 0x00, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
+	0x00, 0x3e, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
+	0x1f, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x78, 0x03, 
+	0xc0, 0x00, 0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 
+	0x00, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x03, 0xc0, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x3c, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x07, 0x80, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x03, 
+	0xc0, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
+	0x00, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x01, 0xc0, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x78, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x03, 0x80, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x1f, 0x70, 0x00, 0x00, 0x00, 0x70, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x00, 0xfe, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x03, 0x80, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x1e, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
+	0x01, 0xee, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
+	0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x03, 0xce, 0x00, 0x00, 0x00, 0x3b, 0xf8, 0x00, 
+	0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xc0, 
+	0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0xc0, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
+	0x03, 0xce, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 
+	0x00, 0x00, 0x71, 0xfc, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
+	0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xc0, 
+	0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0x80, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 
+	0x07, 0x8e, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x00, 
+	0x00, 0x00, 0x77, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x00, 0x78, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xc0, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xc0, 
+	0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 
+	0x1f, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0x80, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 
+	0x0f, 0x0e, 0x00, 0x00, 0x00, 0x7c, 0x0f, 0x80, 
+	0x00, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 
+	0x00, 0x78, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 
+	0x3e, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x00, 0x00, 0x00, 0x01, 0xff, 0x80, 0x00, 0x00, 
+	0x1e, 0x0e, 0x00, 0x00, 0x00, 0x78, 0x03, 0x80, 
+	0x00, 0x00, 0x7e, 0x0f, 0x80, 0x00, 0x00, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x00, 0x3e, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 
+	0x7c, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1e, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
+	0x1e, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 
+	0x00, 0x00, 0x7c, 0x03, 0xc0, 0x00, 0x00, 0x00, 
+	0xe0, 0x00, 0x00, 0x00, 0x3e, 0x0f, 0x80, 0x00, 
+	0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x3c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
+	0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 0x00, 0x01, 
+	0xe0, 0x00, 0x00, 0x00, 0x78, 0x03, 0x80, 0x00, 
+	0x00, 0x0f, 0xfd, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 
+	0xe0, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xf8, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x78, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
+	0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x07, 0xf1, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xc0, 
+	0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x01, 
+	0xe0, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x01, 0xf0, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xc0, 
+	0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xfe, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xc0, 
+	0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0xe0, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
+	0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x01, 0xc0, 
+	0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x03, 
+	0xc0, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xc0, 
+	0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x07, 0x80, 
+	0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 
+	0x7f, 0xff, 0xc0, 0x00, 0x00, 0x70, 0x01, 0xc0, 
+	0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x03, 
+	0x80, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x0f, 0x00, 
+	0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 
+	0x00, 0x00, 0x38, 0x03, 0xc0, 0x00, 0x00, 0x03, 
+	0x80, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x70, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x00, 
+	0x00, 0x00, 0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x78, 0x07, 0x80, 
+	0x00, 0x00, 0x3c, 0x03, 0x80, 0x00, 0x00, 0x07, 
+	0x80, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 
+	0x00, 0x78, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 
+	0x00, 0x00, 0x00, 0x3e, 0x0f, 0x80, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x3e, 0x0f, 0x00, 
+	0x00, 0x00, 0x1e, 0x0f, 0x80, 0x00, 0x00, 0x07, 
+	0x80, 0x00, 0x00, 0x00, 0x3e, 0x0f, 0x80, 0x00, 
+	0x00, 0x3c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xff, 
+	0xc0, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 
+	0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
+	0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xff, 
+	0xc0, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 
+	0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
+	0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xff, 
+	0xc0, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 
+	0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
+	0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x00, 
+	0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x1f, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
+	0x1f, 0xff, 0x80, 0x00, 0x00, 0x1f, 0xff, 0xf0, 
+	0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x07, 
+	0xc0, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x7f, 0x80, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 
+	0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x1f, 0xff, 
+	0xc0, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 
+	0x1f, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 0xf0, 
+	0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x01, 
+	0xff, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0xf8, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x0f, 
+	0xc0, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x00, 0x01, 
+	0xff, 0xe0, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xe0, 
+	0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 
+	0xe0, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 
+	0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 0xf0, 
+	0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x03, 
+	0xff, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x0f, 
+	0xc0, 0x00, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x03, 
+	0xff, 0xf0, 0x00, 0x00, 0x00, 0xfe, 0x07, 0xf0, 
+	0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x1c, 0x01, 
+	0xf0, 0x00, 0x00, 0x07, 0xc1, 0xf0, 0x00, 0x00, 
+	0x1c, 0x01, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0xe0, 0xfc, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x03, 0xe0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x0f, 
+	0xc0, 0x00, 0x1f, 0x80, 0x1c, 0x00, 0x00, 0x07, 
+	0xe1, 0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0xf8, 
+	0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0xf0, 0x00, 0x00, 0x0f, 0x00, 0x78, 0x00, 0x00, 
+	0x1c, 0x00, 0x78, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x80, 0x1e, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x07, 0xc0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x1f, 
+	0xc0, 0x00, 0x1f, 0x80, 0x1c, 0x00, 0x00, 0x0f, 
+	0x80, 0x7c, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x7c, 
+	0x00, 0x01, 0xef, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0x70, 0x00, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 
+	0x1c, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x0f, 0x80, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xc0, 0x1d, 
+	0xc0, 0x00, 0x1f, 0xc0, 0x1c, 0x00, 0x00, 0x1e, 
+	0x00, 0x1e, 0x00, 0x00, 0x07, 0x80, 0x00, 0x3c, 
+	0x00, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x1c, 0x00, 
+	0x70, 0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 
+	0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1e, 
+	0x00, 0x0f, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x1f, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xc0, 0x1d, 
+	0xc0, 0x00, 0x1d, 0xc0, 0x1c, 0x00, 0x00, 0x1e, 
+	0x00, 0x1e, 0x00, 0x00, 0x0f, 0x03, 0xe3, 0x9e, 
+	0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 0x1c, 0x00, 
+	0x70, 0x00, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x00, 
+	0x1c, 0x00, 0x1e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x06, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x3e, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xe0, 0x1d, 
+	0xc0, 0x00, 0x1c, 0xe0, 0x1c, 0x00, 0x00, 0x1c, 
+	0x00, 0x0e, 0x00, 0x00, 0x0f, 0x0f, 0xf7, 0x8e, 
+	0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 0x1c, 0x00, 
+	0xf0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x1e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x7c, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x39, 
+	0xc0, 0x00, 0x1c, 0xf0, 0x1c, 0x00, 0x00, 0x3c, 
+	0x00, 0x0f, 0x00, 0x00, 0x1e, 0x1f, 0xff, 0x8f, 
+	0x00, 0x03, 0x83, 0x80, 0x00, 0x00, 0x1c, 0x01, 
+	0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0xf8, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x39, 
+	0xc0, 0x00, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x3e, 0x3f, 0x0f, 
+	0x00, 0x07, 0x83, 0xc0, 0x00, 0x00, 0x1f, 0xff, 
+	0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1d, 0xf0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf0, 0x39, 
+	0xc0, 0x00, 0x1c, 0x78, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x3c, 0x1f, 0x07, 
+	0x00, 0x07, 0x01, 0xc0, 0x00, 0x00, 0x1f, 0xff, 
+	0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 0xe0, 
+	0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf0, 0x79, 
+	0xc0, 0x00, 0x1c, 0x3c, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x3c, 0x78, 0x0f, 0x07, 
+	0x00, 0x0f, 0x01, 0xe0, 0x00, 0x00, 0x1f, 0xff, 
+	0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 0xe0, 
+	0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x38, 
+	0x03, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x71, 
+	0xc0, 0x00, 0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x38, 0x70, 0x0f, 0x07, 
+	0x00, 0x0f, 0x01, 0xe0, 0x00, 0x00, 0x1c, 0x01, 
+	0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 0xe0, 
+	0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x38, 
+	0x03, 0xff, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1f, 0x9c, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x70, 0x71, 
+	0xc0, 0x00, 0x1c, 0x1e, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x38, 0xf0, 0x0f, 0x07, 
+	0x00, 0x0f, 0xff, 0xe0, 0x00, 0x00, 0x1c, 0x00, 
+	0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x03, 0xff, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1f, 0x1e, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x78, 0xf1, 
+	0xc0, 0x00, 0x1c, 0x0f, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x38, 0xe0, 0x0e, 0x07, 
+	0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1c, 0x00, 
+	0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0xe1, 
+	0xc0, 0x00, 0x1c, 0x07, 0x1c, 0x00, 0x00, 0x38, 
+	0x00, 0x07, 0x00, 0x00, 0x38, 0xe0, 0x0e, 0x0f, 
+	0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1c, 0x00, 
+	0x38, 0x00, 0x00, 0x3c, 0x00, 0x0c, 0x00, 0x00, 
+	0x1c, 0x00, 0x1e, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x07, 0x80, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0xe1, 
+	0xc0, 0x00, 0x1c, 0x07, 0x9c, 0x00, 0x00, 0x3c, 
+	0x00, 0x0f, 0x00, 0x00, 0x38, 0xe0, 0x1e, 0x0e, 
+	0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x1c, 0x00, 
+	0x38, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x00, 
+	0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x03, 0x80, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3d, 0xe1, 
+	0xc0, 0x00, 0x1c, 0x03, 0x9c, 0x00, 0x00, 0x1c, 
+	0x00, 0x0e, 0x00, 0x00, 0x38, 0xe0, 0x1e, 0x1e, 
+	0x00, 0x3c, 0x00, 0x78, 0x00, 0x00, 0x1c, 0x00, 
+	0x38, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x00, 
+	0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1e, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x03, 0xc0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1d, 0xc1, 
+	0xc0, 0x00, 0x1c, 0x01, 0xdc, 0x00, 0x00, 0x1e, 
+	0x00, 0x1e, 0x00, 0x00, 0x38, 0xe0, 0x3c, 0x1c, 
+	0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 
+	0x78, 0x00, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 
+	0x1c, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x00, 0x07, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x1c, 
+	0x00, 0x00, 0x00, 0x1c, 0x01, 0xe0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1d, 0xc1, 
+	0xc0, 0x00, 0x1c, 0x01, 0xfc, 0x00, 0x00, 0x1e, 
+	0x00, 0x1e, 0x00, 0x00, 0x3c, 0xf0, 0x7c, 0x3c, 
+	0x00, 0x78, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 
+	0x78, 0x00, 0x00, 0x0f, 0x00, 0x7c, 0x00, 0x00, 
+	0x1c, 0x00, 0x78, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x80, 0x1f, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3c, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0xf0, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1f, 0xc1, 
+	0xc0, 0x00, 0x1c, 0x00, 0xfc, 0x00, 0x00, 0x0f, 
+	0x80, 0x7c, 0x00, 0x00, 0x3c, 0x78, 0xfc, 0xf8, 
+	0x00, 0x78, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x01, 
+	0xf0, 0x00, 0x00, 0x07, 0xe1, 0xf8, 0x00, 0x00, 
+	0x1c, 0x01, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0xe0, 0x7f, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x78, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1f, 0x81, 
+	0xc0, 0x00, 0x1c, 0x00, 0xfc, 0x00, 0x00, 0x07, 
+	0xe1, 0xf8, 0x00, 0x00, 0x1c, 0x7f, 0xff, 0xf0, 
+	0x00, 0x70, 0x00, 0x1c, 0x00, 0x00, 0x1f, 0xff, 
+	0xe0, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 
+	0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 0xf8, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 
+	0xff, 0xfc, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 
+	0x1f, 0xff, 0xc0, 0x00, 0x00, 0x1c, 0x0f, 0x81, 
+	0xc0, 0x00, 0x1c, 0x00, 0x7c, 0x00, 0x00, 0x03, 
+	0xff, 0xf0, 0x00, 0x00, 0x1e, 0x3f, 0xdf, 0xe0, 
+	0x00, 0xf0, 0x00, 0x1e, 0x00, 0x00, 0x1f, 0xff, 
+	0xc0, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 
+	0x1f, 0xff, 0xc0, 0x00, 0x00, 0x1f, 0xff, 0xf8, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 
+	0x1f, 0xff, 0xc0, 0x00, 0x00, 0x1c, 0x0f, 0x81, 
+	0xc0, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x01, 
+	0xff, 0xe0, 0x00, 0x00, 0x0f, 0x1f, 0x0f, 0x87, 
+	0x80, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 
+	0x80, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
+	0x1f, 0xff, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf8, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x3f, 0xc0, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
+	0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 
+	0x00, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x00, 
+	0x1f, 0xff, 0xc0, 0x00, 0x00, 0x1c, 0x0f, 0x01, 
+	0xc0, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x7f, 0x80, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x0f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x1f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x7e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x01, 0xfc, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 
+	0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x1f, 0xff, 
+	0xc0, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 
+	0x7f, 0xff, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0xe0, 
+	0x03, 0xe0, 0x03, 0x80, 0x3c, 0x00, 0x78, 0x00, 
+	0x00, 0xf0, 0x00, 0x78, 0x00, 0x00, 0x1f, 0xff, 
+	0xe0, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 
+	0xe0, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 
+	0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x1f, 0xff, 
+	0xf0, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 
+	0x7f, 0xff, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x00, 0xf0, 
+	0x03, 0xe0, 0x07, 0x80, 0x1e, 0x00, 0xf0, 0x00, 
+	0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x1f, 0xff, 
+	0xe0, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 
+	0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 
+	0xf8, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0x00, 
+	0x7f, 0xff, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x00, 0xf0, 
+	0x07, 0xe0, 0x07, 0x80, 0x0e, 0x00, 0xe0, 0x00, 
+	0x00, 0x78, 0x00, 0xf0, 0x00, 0x00, 0x1f, 0xff, 
+	0xe0, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xf0, 0x00, 
+	0x00, 0x07, 0xc1, 0xf0, 0x00, 0x00, 0x1c, 0x00, 
+	0xf8, 0x00, 0x00, 0x0f, 0x83, 0xe0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x00, 0x70, 
+	0x07, 0xf0, 0x07, 0x00, 0x0f, 0x01, 0xe0, 0x00, 
+	0x00, 0x3c, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x01, 
+	0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 
+	0x00, 0x0f, 0x00, 0x78, 0x00, 0x00, 0x1c, 0x00, 
+	0x3c, 0x00, 0x00, 0x1e, 0x00, 0xf0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x00, 0x70, 
+	0x07, 0x70, 0x07, 0x00, 0x07, 0x83, 0xc0, 0x00, 
+	0x00, 0x1c, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 
+	0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 
+	0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 
+	0x1c, 0x00, 0x00, 0x1c, 0x00, 0xf0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x78, 
+	0x07, 0x70, 0x0f, 0x00, 0x03, 0x83, 0x80, 0x00, 
+	0x00, 0x1e, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x07, 
+	0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x78, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x0f, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 
+	0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 
+	0x1c, 0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x3c, 0x00, 0x78, 0x00, 0x00, 0x78, 
+	0x0f, 0x78, 0x0f, 0x00, 0x03, 0xc7, 0x80, 0x00, 
+	0x00, 0x0f, 0x07, 0x80, 0x00, 0x00, 0x00, 0x07, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 
+	0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 
+	0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x3c, 0x00, 0x78, 0x00, 0x00, 0x38, 
+	0x0e, 0x38, 0x0e, 0x00, 0x01, 0xef, 0x00, 0x00, 
+	0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x1e, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 
+	0x00, 0x3c, 0x00, 0x1e, 0x00, 0x00, 0x1c, 0x00, 
+	0x3c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x38, 
+	0x0e, 0x38, 0x0e, 0x00, 0x00, 0xfe, 0x00, 0x00, 
+	0x00, 0x07, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x1e, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 
+	0x3c, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x1e, 0x00, 0xf0, 0x00, 0x00, 0x3c, 
+	0x0e, 0x38, 0x1e, 0x00, 0x00, 0x7c, 0x00, 0x00, 
+	0x00, 0x03, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x1e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 
+	0xf8, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x1e, 0x00, 0xf0, 0x00, 0x00, 0x3c, 
+	0x1e, 0x3c, 0x1e, 0x00, 0x00, 0x7c, 0x00, 0x00, 
+	0x00, 0x03, 0xde, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 
+	0xf8, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x0f, 0x01, 0xe0, 0x00, 0x00, 0x1c, 
+	0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x7c, 0x00, 0x00, 
+	0x00, 0x01, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x78, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 
+	0xf0, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x0f, 0x01, 0xe0, 0x00, 0x00, 0x1c, 
+	0x1c, 0x1c, 0x1c, 0x00, 0x00, 0x7c, 0x00, 0x00, 
+	0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xf0, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1f, 0xff, 
+	0xc0, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x07, 0x01, 0xc0, 0x00, 0x00, 0x1e, 
+	0x3c, 0x1c, 0x3c, 0x00, 0x00, 0xfe, 0x00, 0x00, 
+	0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x01, 0xe0, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x0f, 
+	0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x07, 0x83, 0xc0, 0x00, 0x00, 0x1e, 
+	0x3c, 0x1e, 0x3c, 0x00, 0x01, 0xef, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0xc0, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x07, 
+	0x80, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x07, 0x83, 0xc0, 0x00, 0x00, 0x0e, 
+	0x38, 0x0e, 0x38, 0x00, 0x01, 0xc7, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0xc0, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x3c, 0x00, 0x1e, 0x00, 0x00, 0x1c, 0x07, 
+	0xc0, 0x00, 0x00, 0x38, 0x00, 0x78, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 0x0e, 
+	0x38, 0x0e, 0x38, 0x00, 0x03, 0xc7, 0x80, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x07, 0x80, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x03, 
+	0xe0, 0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
+	0x00, 0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 0x0f, 
+	0x78, 0x0f, 0x78, 0x00, 0x07, 0x83, 0xc0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x0f, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x07, 0x3c, 0x00, 0x00, 0x1c, 0x01, 
+	0xf0, 0x00, 0x00, 0x3c, 0x00, 0x38, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x3c, 
+	0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x0f, 
+	0x70, 0x07, 0x78, 0x00, 0x0f, 0x01, 0xe0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x1e, 0x07, 0xb8, 0x00, 0x00, 0x1c, 0x00, 
+	0xf0, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x3c, 
+	0x00, 0x00, 0x01, 0xef, 0x00, 0x00, 0x00, 0x07, 
+	0x70, 0x07, 0x70, 0x00, 0x0e, 0x00, 0xe0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0x07, 0xf8, 0x00, 0x00, 0x1c, 0x00, 
+	0x78, 0x00, 0x00, 0x1e, 0x00, 0xf8, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x78, 
+	0x00, 0x00, 0x01, 0xef, 0x00, 0x00, 0x00, 0x07, 
+	0xf0, 0x07, 0xf0, 0x00, 0x1e, 0x00, 0xf0, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0xc1, 0xf0, 0x00, 0x00, 0x1c, 0x00, 
+	0x78, 0x00, 0x00, 0x0f, 0xc1, 0xf0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x0f, 0xc1, 0xf8, 
+	0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x07, 
+	0xf0, 0x07, 0xf0, 0x00, 0x3c, 0x00, 0x78, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x78, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0xff, 0xf8, 0x00, 0x00, 0x1c, 0x00, 
+	0x3c, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0, 
+	0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x07, 
+	0xe0, 0x03, 0xf0, 0x00, 0x38, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xff, 
+	0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x01, 0xff, 0xfe, 0x00, 0x00, 0x1c, 0x00, 
+	0x3e, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 
+	0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 
+	0xe0, 0x03, 0xe0, 0x00, 0x78, 0x00, 0x3c, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xff, 
+	0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x03, 0xc0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7f, 0x9f, 0x00, 0x00, 0x1c, 0x00, 
+	0x1e, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 
+	0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 
+	0xe0, 0x03, 0xe0, 0x00, 0xf0, 0x00, 0x1e, 0x00, 
+	0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7f, 0xff, 
+	0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0xc0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 
+	0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 
+	0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 
+	0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x39, 0xf8, 
+	0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 
+	0x07, 0xe7, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 
+	0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x07, 
+	0xe7, 0x00, 0x00, 0x00, 0x38, 0xfc, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x0f, 0x80, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x39, 0xf0, 0x7e, 
+	0x00, 0x00, 0x39, 0xfc, 0x00, 0x00, 0x00, 0x03, 
+	0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x3b, 0xfc, 
+	0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 
+	0x0f, 0xf7, 0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 
+	0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x0f, 
+	0xf7, 0x00, 0x00, 0x00, 0x3b, 0xfe, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x1f, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3b, 0xfc, 0xff, 
+	0x00, 0x00, 0x3b, 0xff, 0x00, 0x00, 0x00, 0x0f, 
+	0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfe, 
+	0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 
+	0x1f, 0xff, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 
+	0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x1f, 
+	0xff, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x3e, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfd, 0xff, 
+	0x80, 0x00, 0x3f, 0xff, 0x00, 0x00, 0x00, 0x1f, 
+	0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x78, 0x1f, 0x00, 0x00, 0x00, 0x3f, 0x1f, 
+	0x00, 0x00, 0x00, 0x3e, 0x1e, 0x00, 0x00, 0x00, 
+	0x3e, 0x3f, 0x00, 0x00, 0x00, 0x3e, 0x1f, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x3e, 
+	0x3f, 0x00, 0x00, 0x00, 0x3f, 0x0f, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x8f, 
+	0x80, 0x00, 0x3f, 0x0f, 0x80, 0x00, 0x00, 0x3e, 
+	0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x07, 
+	0x00, 0x00, 0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 
+	0x38, 0x1f, 0x00, 0x00, 0x00, 0x38, 0x07, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x1f, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x1f, 0x07, 
+	0x80, 0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 0x3c, 
+	0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x07, 
+	0x80, 0x00, 0x00, 0x78, 0x07, 0x00, 0x00, 0x00, 
+	0x78, 0x0f, 0x00, 0x00, 0x00, 0x78, 0x07, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x78, 
+	0x0f, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x39, 0xe0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x0f, 0x03, 
+	0x80, 0x00, 0x3c, 0x03, 0x80, 0x00, 0x00, 0x78, 
+	0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x38, 0x03, 
+	0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x07, 0x00, 0x00, 0x00, 0x70, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3b, 0xc0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x38, 0x03, 
+	0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x07, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x38, 0x03, 
+	0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x07, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0xf7, 0x00, 0x00, 0x00, 0x38, 0x03, 
+	0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x07, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x7c, 0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 
+	0x80, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x70, 0x07, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3c, 0xf0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 
+	0x80, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
+	0x70, 0x07, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
+	0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x07, 
+	0x80, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 
+	0x78, 0x0f, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x78, 
+	0x0f, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x78, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x78, 
+	0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x70, 0x1f, 0x00, 0x00, 0x00, 0x3c, 0x0f, 
+	0x00, 0x00, 0x00, 0x38, 0x0f, 0x00, 0x00, 0x00, 
+	0x3c, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 
+	0x0f, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x3c, 
+	0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x7c, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x1f, 
+	0x00, 0x00, 0x00, 0x3e, 0x3e, 0x00, 0x00, 0x00, 
+	0x3e, 0x3f, 0x00, 0x00, 0x00, 0x3e, 0x0f, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x3e, 
+	0x3f, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x3e, 
+	0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfe, 
+	0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 
+	0x1f, 0xff, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1f, 
+	0xff, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x1f, 
+	0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0xf7, 0x80, 0x00, 0x00, 0x3b, 0xfc, 
+	0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00, 
+	0x0f, 0xf7, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0xff, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x0f, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x0f, 
+	0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0xe3, 0x80, 0x00, 0x00, 0x39, 0xf8, 
+	0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 
+	0x07, 0xe7, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 
+	0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 
+	0xe7, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x03, 
+	0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x03, 
+	0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 
+	0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 
+	0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 
+	0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
+	0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
+	0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x39, 0xf8, 0x00, 0x00, 
+	0x00, 0x07, 0xe7, 0x00, 0x00, 0x00, 0x39, 0xe0, 
+	0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 
+	0xff, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0xf0, 0x07, 0x80, 0x00, 0x01, 0xe0, 
+	0x38, 0x0f, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x7f, 0xfe, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3b, 0xfc, 0x00, 0x00, 
+	0x00, 0x0f, 0xf7, 0x00, 0x00, 0x00, 0x3b, 0xe0, 
+	0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 
+	0xff, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0xf0, 0x07, 0x80, 0x00, 0x00, 0xe0, 
+	0x3c, 0x0e, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 
+	0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 0x7f, 0xfe, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xe0, 
+	0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 
+	0xff, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0xf0, 
+	0x7c, 0x1e, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
+	0x00, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x7f, 0xfe, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 
+	0x00, 0x3e, 0x3f, 0x00, 0x00, 0x00, 0x3e, 0x00, 
+	0x00, 0x00, 0x00, 0x78, 0x3e, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 0xf0, 
+	0x7c, 0x1e, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x00, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x3c, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x1f, 0x00, 0x40, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3e, 0x0f, 0x00, 0x00, 
+	0x00, 0x38, 0x1f, 0x00, 0x00, 0x00, 0x3c, 0x00, 
+	0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x70, 
+	0x7c, 0x1c, 0x00, 0x00, 0x1e, 0x38, 0x00, 0x00, 
+	0x00, 0x3c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x78, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x3f, 0xc0, 0xc0, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 
+	0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 0x00, 0x70, 
+	0xec, 0x1c, 0x00, 0x00, 0x0e, 0x78, 0x00, 0x00, 
+	0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xf8, 
+	0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 
+	0x00, 0x00, 0x7f, 0xf1, 0xc0, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3c, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x3c, 0x1e, 0x00, 0x00, 0x00, 0x78, 
+	0xee, 0x3c, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 
+	0x00, 0x1e, 0x1c, 0x00, 0x00, 0x00, 0x01, 0xf0, 
+	0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 
+	0x00, 0x00, 0x71, 0xff, 0xc0, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x38, 
+	0xee, 0x38, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x00, 0x1e, 0x1c, 0x00, 0x00, 0x00, 0x01, 0xe0, 
+	0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 
+	0x00, 0x00, 0x60, 0x7f, 0x80, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x1e, 0x3c, 0x00, 0x00, 0x00, 0x38, 
+	0xe6, 0x38, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
+	0x00, 0x0e, 0x38, 0x00, 0x00, 0x00, 0x03, 0xc0, 
+	0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 
+	0x00, 0x00, 0x40, 0x1f, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, 0x00, 0x3d, 
+	0xc6, 0x78, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
+	0x00, 0x0f, 0x38, 0x00, 0x00, 0x00, 0x07, 0x80, 
+	0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, 0x00, 0x1d, 
+	0xc7, 0x70, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
+	0x00, 0x0f, 0x38, 0x00, 0x00, 0x00, 0x0f, 0x00, 
+	0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
+	0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 
+	0x00, 0x00, 0x0f, 0x78, 0x00, 0x00, 0x00, 0x1d, 
+	0xc7, 0x70, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
+	0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x1e, 0x00, 
+	0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
+	0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0x80, 
+	0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x00, 0x1d, 
+	0xc3, 0x70, 0x00, 0x00, 0x0f, 0x70, 0x00, 0x00, 
+	0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3c, 0x0f, 0x00, 0x00, 
+	0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x78, 0x07, 0x00, 0x00, 0x00, 
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 
+	0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x0f, 
+	0x83, 0xe0, 0x00, 0x00, 0x1e, 0x78, 0x00, 0x00, 
+	0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x7c, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 
+	0x00, 0x3e, 0x3f, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3c, 0x1f, 0x00, 0x00, 0x00, 
+	0x3c, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x1f, 0x80, 
+	0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x0f, 
+	0x83, 0xe0, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
+	0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0xf8, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
+	0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 
+	0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x0f, 
+	0x83, 0xe0, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
+	0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xfe, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x3b, 0xfc, 0x00, 0x00, 
+	0x00, 0x0f, 0xf7, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 
+	0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfb, 0x80, 
+	0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x0f, 
+	0x03, 0xc0, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
+	0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xfe, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
+	0x00, 0x04, 0x00, 0x00, 0x39, 0xf0, 0x00, 0x00, 
+	0x00, 0x03, 0xe7, 0x00, 0x00, 0x00, 0x38, 0x00, 
+	0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 
+	0x1f, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe3, 0x80, 
+	0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x07, 
+	0x01, 0xc0, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 
+	0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xfe, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
+	0xff, 0xfc, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 
+	0x1c, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x08, 0xf0, 0x24, 0x00, 0x09, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0x00, 0x00, 0x0c, 0x94, 0xea, 0xff, 0xfd, 0x70, 
+	0xea, 0x00, 0x00, 0x01, 0xe3, 0x5c, 0x00, 0xb7, 
+	0xa5, 0x9f, 0xf0, 0x04, 0xe0, 0x86, 0xc0, 0x0c, 
+	0xe5, 0x9f, 0xf0, 0x00, 0x00, 0x00, 0x0f, 0x74, 
+	0x00, 0x00, 0x0c, 0x98, 0x00, 0x00, 0x00, 0x0f, 
+	0xf0, 0x24, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0e, 0x4c, 
+	0xea, 0xff, 0xfd, 0x03, 0xea, 0x00, 0x00, 0x07, 
+	0xe5, 0x9f, 0xc0, 0x1c, 0xe5, 0x9c, 0x30, 0x00, 
+	0xe3, 0x83, 0x33, 0x33, 0xe1, 0x52, 0x00, 0x03, 
+	0x05, 0x9f, 0xc0, 0x10, 0x05, 0x9c, 0xc0, 0x00, 
+	0x03, 0x8c, 0x23, 0x33, 0xe5, 0x9f, 0xc0, 0x08, 
+	0xe5, 0x9f, 0xf0, 0x08, 0x66, 0x00, 0x00, 0x60, 
+	0x66, 0x00, 0x00, 0x5c, 0x66, 0x00, 0x00, 0x58, 
+	0x00, 0x00, 0x0e, 0x50, 0x00, 0x00, 0x00, 0x01, 
+	0xf0, 0x24, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x02, 0x6c, 
+	0xa0, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x01, 0xc0, 
+	0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 
+	0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 
+	0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 
+	0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 
+	0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x19, 
+	0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x18, 
+	0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 
+	0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 
+	0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 
+	0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 
+	0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 
+	0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 
+	0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 
+	0x40, 0x41, 0x41, 0x41, 0x41, 0x41, 0x40, 0x40, 
+	0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 
+	0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 
+	0x05, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 
+	0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 
+	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+	0x20, 0x20, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 
+	0x02, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
+	0x10, 0x10, 0x10, 0x02, 0x02, 0x02, 0x02, 0x02, 
+	0x02, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x08, 
+	0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 
+	0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 
+	0x08, 0x08, 0x08, 0x02, 0x02, 0x02, 0x02, 0x40, 
+	0xe5, 0x9f, 0xc0, 0x00, 0xe1, 0x2f, 0xff, 0x1c, 
+	0x2e, 0x01, 0xcf, 0x19, 0xe5, 0x9f, 0xc0, 0x00, 
+	0xe1, 0x2f, 0xff, 0x1c, 0x2e, 0x00, 0x5b, 0x17, 
+	0xe5, 0x9f, 0xc0, 0x00, 0xe1, 0x2f, 0xff, 0x1c, 
+	0x2e, 0x00, 0x5b, 0xa1, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x02, 0x37, 0x7c, 
+	0x2e, 0x02, 0x38, 0x94, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x02, 0x37, 0x7c, 0xff, 0x7f, 0x3f, 0x1f, 
+	0x0f, 0x07, 0x03, 0x01, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
+	0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 
+	0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
+	0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x02, 0x40, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2c, 0x00, 0x01, 0x00, 0x43, 0x6f, 0x70, 0x79, 
+	0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x46, 0x75, 
+	0x6a, 0x69, 0x74, 0x73, 0x75, 0x20, 0x53, 0x69, 
+	0x65, 0x6d, 0x65, 0x6e, 0x73, 0x20, 0x26, 0x20, 
+	0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 
+	0x6e, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 
+	0x67, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 
+	0x65, 0x64, 0x69, 0x61, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x57, 0x5e, 0x61, 0xa3, 
+	0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x0c, 
+	0x6c, 0x00, 0x00, 0x24, 0x64, 0x00, 0x00, 0x28, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x4e, 0x20, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0xd0, 0x00, 0x00, 0x07, 0xd0, 
+	0x00, 0x00, 0x13, 0x88, 0x02, 0x02, 0x01, 0x00, 
+	0x00, 0x00, 0x4e, 0x20, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x07, 0xd0, 0x00, 0x00, 0x07, 0xd0, 
+	0x00, 0x00, 0x13, 0x88, 0x02, 0x02, 0x01, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xd0, 
+	0x2e, 0x08, 0x05, 0xd0, 0x2e, 0x08, 0x05, 0xd8, 
+	0x2e, 0x08, 0x05, 0xd8, 0x2e, 0x08, 0x05, 0xe0, 
+	0x2e, 0x08, 0x05, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 
+	0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 
+	0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 
+	0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 
+	0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 
+	0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 
+	0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 
+	0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 
+	0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 
+	0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 
+	0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x32, 0x78, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 
+	0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, 
+	0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 
+	0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 
+	0x3c, 0xdb, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, 
+	0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0xfe, 0x3e, 
+	0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 
+	0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 
+	0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 
+	0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 
+	0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 
+	0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 
+	0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 
+	0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 
+	0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 
+	0x6c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 
+	0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 
+	0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 
+	0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 
+	0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 
+	0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 
+	0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 
+	0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 
+	0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 
+	0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 
+	0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 
+	0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 
+	0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 
+	0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 
+	0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 
+	0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 
+	0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 
+	0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 
+	0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
+	0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
+	0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 
+	0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
+	0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 
+	0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 
+	0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 
+	0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 
+	0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 
+	0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 
+	0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 
+	0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 
+	0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 
+	0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 
+	0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 
+	0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 
+	0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 
+	0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 
+	0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 
+	0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xd6, 0xde, 0x7c, 0x0c, 0x0e, 0x00, 0x00, 
+	0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 
+	0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 
+	0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 
+	0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 
+	0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 
+	0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 
+	0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 
+	0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 
+	0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 
+	0x00, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 
+	0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 
+	0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00, 
+	0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 
+	0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 
+	0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 
+	0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 
+	0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 
+	0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 
+	0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 
+	0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 
+	0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 
+	0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 
+	0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 
+	0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 
+	0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 
+	0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 
+	0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 
+	0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 
+	0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 
+	0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x70, 0x00, 0x00, 
+	0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0c, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xcc, 0x00, 0x00, 0x78, 0x0c, 0x7c, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0c, 0x7c, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x70, 0x00, 0x00, 
+	0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 
+	0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x18, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xc6, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 
+	0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x38, 0x6c, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xfe, 
+	0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 
+	0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x36, 0x36, 
+	0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xc6, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00, 
+	0x00, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 
+	0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 
+	0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 
+	0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0xf8, 0xcc, 0xcc, 0xf8, 0xc4, 0xcc, 0xde, 
+	0xcc, 0xcc, 0xcc, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x7e, 0x18, 
+	0x18, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0c, 0x7c, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0c, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, 
+	0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 
+	0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
+	0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 
+	0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 
+	0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 
+	0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 
+	0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 
+	0x60, 0xdc, 0x86, 0x0c, 0x18, 0x3e, 0x00, 0x00, 
+	0x00, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 
+	0x66, 0xce, 0x9a, 0x3f, 0x06, 0x06, 0x00, 0x00, 
+	0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 
+	0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 
+	0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 
+	0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 
+	0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 
+	0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 
+	0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 
+	0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 
+	0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 
+	0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 
+	0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 
+	0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 
+	0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0xd8, 
+	0xd8, 0xd8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xd8, 0xcc, 
+	0xc6, 0xc6, 0xc6, 0xcc, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 
+	0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 
+	0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x18, 
+	0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 
+	0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 
+	0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xc0, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 
+	0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 
+	0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 
+	0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1e, 0x30, 0x18, 0x0c, 0x3e, 0x66, 
+	0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 
+	0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x03, 0x06, 0x7e, 0xdb, 0xdb, 
+	0xf3, 0x7e, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, 
+	0x60, 0x60, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 
+	0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 
+	0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 
+	0x18, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x06, 0x0c, 
+	0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 
+	0x18, 0x0c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
+	0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7e, 
+	0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 
+	0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
+	0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xec, 
+	0x6c, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x6c, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x3c, 0x66, 0x0c, 0x18, 0x32, 0x7e, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 
+	0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x65, 0xd0, 
+	0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 
+	0x2e, 0x08, 0x07, 0xa4, 0x00, 0x00, 0x00, 0x00, 
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
+	0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 
+	0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 
+	0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 
+	0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0c, 
+	0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0e, 
+	0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x14, 
+	0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x17, 
+	0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x04, 
+	0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf7, 
+	0x11, 0x38, 0x06, 0x53, 0x2e, 0x08, 0x17, 0xe4, 
+	0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x20, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x21, 
+	0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
+	0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 
+	0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x39, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x20, 
+	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x21, 
+	0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xb9, 
+	0x0e, 0xa6, 0x06, 0x53, 0x2e, 0x08, 0x19, 0x14, 
+	0x2e, 0x08, 0x1a, 0x38, 0x2e, 0x08, 0x19, 0x08, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf4, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0x8b, 0x98, 0x00, 0x44, 0x45, 0x55, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 
+	0x00, 0x80, 0x10, 0x80, 0x00, 0x80, 0xda, 0x80, 
+	0x00, 0x5a, 0x51, 0xf0, 0x00, 0x36, 0x91, 0x22, 
+	0x00, 0xf0, 0x29, 0x6e, 0x00, 0x10, 0xd2, 0x92, 
+	0x00, 0xca, 0x6a, 0xde, 0x00, 0xa6, 0xaa, 0x10, 
+	0x00, 0x80, 0x3b, 0x80, 0x00, 0x80, 0xbc, 0x80, 
+	0x00, 0x80, 0x7e, 0x80, 0x00, 0xcf, 0x22, 0x73, 
+	0x00, 0x93, 0x48, 0x5d, 0x00, 0xa2, 0x73, 0x93, 
+	0x00, 0x25, 0xae, 0xad, 0x00, 0xa7, 0x9f, 0x60, 
+	0x00, 0x10, 0x10, 0x10, 0x00, 0x59, 0x10, 0x10, 
+	0x00, 0xa2, 0x10, 0x10, 0x00, 0xeb, 0x10, 0x10, 
+	0x00, 0x10, 0x10, 0x59, 0x00, 0x59, 0x10, 0x59, 
+	0x00, 0xa2, 0x10, 0x59, 0x00, 0xeb, 0x10, 0x59, 
+	0x00, 0x10, 0x10, 0xa2, 0x00, 0x59, 0x10, 0xa2, 
+	0x00, 0xa2, 0x10, 0xa2, 0x00, 0xeb, 0x10, 0xa2, 
+	0x00, 0x10, 0x10, 0xeb, 0x00, 0x59, 0x10, 0xeb, 
+	0x00, 0xa2, 0x10, 0xeb, 0x00, 0xeb, 0x10, 0xeb, 
+	0x00, 0x10, 0x2f, 0x10, 0x00, 0x59, 0x2f, 0x10, 
+	0x00, 0xa2, 0x2f, 0x10, 0x00, 0xeb, 0x2f, 0x10, 
+	0x00, 0x10, 0x2f, 0x59, 0x00, 0x59, 0x2f, 0x59, 
+	0x00, 0xa2, 0x2f, 0x59, 0x00, 0xeb, 0x2f, 0x59, 
+	0x00, 0x10, 0x2f, 0xa2, 0x00, 0x59, 0x2f, 0xa2, 
+	0x00, 0xa2, 0x2f, 0xa2, 0x00, 0xeb, 0x2f, 0xa2, 
+	0x00, 0x10, 0x2f, 0xeb, 0x00, 0x59, 0x2f, 0xeb, 
+	0x00, 0xa2, 0x2f, 0xeb, 0x00, 0xeb, 0x2f, 0xeb, 
+	0x00, 0x10, 0x4e, 0x10, 0x00, 0x59, 0x4e, 0x10, 
+	0x00, 0xa2, 0x4e, 0x10, 0x00, 0xeb, 0x4e, 0x10, 
+	0x00, 0x10, 0x4e, 0x59, 0x00, 0x59, 0x4e, 0x59, 
+	0x00, 0xa2, 0x4e, 0x59, 0x00, 0xeb, 0x4e, 0x59, 
+	0x00, 0x10, 0x4e, 0xa2, 0x00, 0x59, 0x4e, 0xa2, 
+	0x00, 0xa2, 0x4e, 0xa2, 0x00, 0xeb, 0x4e, 0xa2, 
+	0x00, 0x10, 0x4e, 0xeb, 0x00, 0x59, 0x4e, 0xeb, 
+	0x00, 0xa2, 0x4e, 0xeb, 0x00, 0xeb, 0x4e, 0xeb, 
+	0x00, 0x10, 0x6d, 0x10, 0x00, 0x59, 0x6d, 0x10, 
+	0x00, 0xa2, 0x6d, 0x10, 0x00, 0xeb, 0x6d, 0x10, 
+	0x00, 0x10, 0x6d, 0x59, 0x00, 0x59, 0x6d, 0x59, 
+	0x00, 0xa2, 0x6d, 0x59, 0x00, 0xeb, 0x6d, 0x59, 
+	0x00, 0x10, 0x6d, 0xa2, 0x00, 0x59, 0x6d, 0xa2, 
+	0x00, 0xa2, 0x6d, 0xa2, 0x00, 0xeb, 0x6d, 0xa2, 
+	0x00, 0x10, 0x6d, 0xeb, 0x00, 0x59, 0x6d, 0xeb, 
+	0x00, 0xa2, 0x6d, 0xeb, 0x00, 0xeb, 0x6d, 0xeb, 
+	0x00, 0x10, 0x8c, 0x10, 0x00, 0x59, 0x8c, 0x10, 
+	0x00, 0xa2, 0x8c, 0x10, 0x00, 0xeb, 0x8c, 0x10, 
+	0x00, 0x10, 0x8c, 0x59, 0x00, 0x59, 0x8c, 0x59, 
+	0x00, 0xa2, 0x8c, 0x59, 0x00, 0xeb, 0x8c, 0x59, 
+	0x00, 0x10, 0x8c, 0xa2, 0x00, 0x59, 0x8c, 0xa2, 
+	0x00, 0xa2, 0x8c, 0xa2, 0x00, 0xeb, 0x8c, 0xa2, 
+	0x00, 0x10, 0x8c, 0xeb, 0x00, 0x59, 0x8c, 0xeb, 
+	0x00, 0xa2, 0x8c, 0xeb, 0x00, 0xeb, 0x8c, 0xeb, 
+	0x00, 0x10, 0xab, 0x10, 0x00, 0x59, 0xab, 0x10, 
+	0x00, 0xa2, 0xab, 0x10, 0x00, 0xeb, 0xab, 0x10, 
+	0x00, 0x10, 0xab, 0x59, 0x00, 0x59, 0xab, 0x59, 
+	0x00, 0xa2, 0xab, 0x59, 0x00, 0xeb, 0xab, 0x59, 
+	0x00, 0x10, 0xab, 0xa2, 0x00, 0x59, 0xab, 0xa2, 
+	0x00, 0xa2, 0xab, 0xa2, 0x00, 0xeb, 0xab, 0xa2, 
+	0x00, 0x10, 0xab, 0xeb, 0x00, 0x59, 0xab, 0xeb, 
+	0x00, 0xa2, 0xab, 0xeb, 0x00, 0xeb, 0xab, 0xeb, 
+	0x00, 0x10, 0xca, 0x10, 0x00, 0x59, 0xca, 0x10, 
+	0x00, 0xa2, 0xca, 0x10, 0x00, 0xeb, 0xca, 0x10, 
+	0x00, 0x10, 0xca, 0x59, 0x00, 0x59, 0xca, 0x59, 
+	0x00, 0xa2, 0xca, 0x59, 0x00, 0xeb, 0xca, 0x59, 
+	0x00, 0x10, 0xca, 0xa2, 0x00, 0x59, 0xca, 0xa2, 
+	0x00, 0xa2, 0xca, 0xa2, 0x00, 0xeb, 0xca, 0xa2, 
+	0x00, 0x10, 0xca, 0xeb, 0x00, 0x59, 0xca, 0xeb, 
+	0x00, 0xa2, 0xca, 0xeb, 0x00, 0xeb, 0xca, 0xeb, 
+	0x00, 0x10, 0xe9, 0x10, 0x00, 0x59, 0xe9, 0x10, 
+	0x00, 0xa2, 0xe9, 0x10, 0x00, 0xeb, 0xe9, 0x10, 
+	0x00, 0x10, 0xe9, 0x59, 0x00, 0x59, 0xe9, 0x59, 
+	0x00, 0xa2, 0xe9, 0x59, 0x00, 0xeb, 0xe9, 0x59, 
+	0x00, 0x10, 0xe9, 0xa2, 0x00, 0x59, 0xe9, 0xa2, 
+	0x00, 0xa2, 0xe9, 0xa2, 0x00, 0xeb, 0xe9, 0xa2, 
+	0x00, 0x10, 0xe9, 0xeb, 0x00, 0x59, 0xe9, 0xeb, 
+	0x00, 0xa2, 0xe9, 0xeb, 0x00, 0xeb, 0xe9, 0xeb, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0xc0, 
+	0xc1, 0x11, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0f, 0x6d, 0xbb, 0xeb, 0x8e, 0x01, 0xea, 0x25, 
+	0x04, 0xd0, 0x82, 0x49, 0xed, 0x4c, 0x8f, 0xc2, 
+	0x66, 0x0b, 0x65, 0xc5, 0x0c, 0xc2, 0x41, 0x19, 
+	0x07, 0xa8, 0x94, 0x13, 0x42, 0x09, 0x27, 0xb5, 
+	0x32, 0x3f, 0x09, 0x98, 0x2d, 0x97, 0x14, 0x33, 
+	0x09, 0x04, 0x64, 0x00, 0xff, 0xff, 0x24, 0xc0, 
+	0xe0, 0x11, 0x21, 0x00, 0x01, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x13, 0x8e, 0xf7, 0xe7, 0x6e, 0x9c, 0x0c, 0xc3, 
+	0xd2, 0xb4, 0x05, 0x16, 0x3c, 0x8e, 0x82, 0xd4, 
+	0x16, 0x5e, 0x9c, 0x0c, 0xc3, 0xd2, 0xb4, 0x05, 
+	0x16, 0x3c, 0x8e, 0x82, 0xd4, 0x16, 0x5e, 0x9c, 
+	0x0c, 0xc3, 0xd2, 0xb4, 0x05, 0x16, 0x3c, 0x8e, 
+	0x82, 0xd4, 0x16, 0x50, 0xff, 0xff, 0x24, 0xc0, 
+	0xd4, 0x11, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x0d, 0x4d, 0xf8, 0xd5, 0x9e, 0x7f, 0x02, 0x22, 
+	0x08, 0xa3, 0xbd, 0x94, 0x53, 0x16, 0x79, 0xfc, 
+	0x08, 0x88, 0x22, 0x8e, 0xf6, 0x51, 0x4c, 0x59, 
+	0xe7, 0xf0, 0x22, 0x20, 0x8a, 0x3b, 0xd9, 0x45, 
+	0x31, 0x67, 0x9f, 0xc0, 0x88, 0x82, 0x28, 0xef, 
+	0x65, 0x14, 0xc4, 0x00, 0xff, 0xff, 0x24, 0xc0, 
+	0xe8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x14, 0x6d, 0xfb, 0x1d, 0x77, 0xc1, 0x38, 0x81, 
+	0xfb, 0xb1, 0xd7, 0x7c, 0x13, 0x88, 0x1f, 0xbb, 
+	0x1d, 0x77, 0xc1, 0x38, 0x81, 0xfb, 0xb1, 0xd7, 
+	0x7c, 0x13, 0x88, 0x1f, 0xbb, 0x1d, 0x77, 0xc1, 
+	0x38, 0x81, 0xfb, 0xb1, 0xd7, 0x7c, 0x13, 0x88, 
+	0x1f, 0x80, 0x00, 0x00, 0xff, 0xff, 0x24, 0xc0, 
+	0x9b, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x50, 0x3d, 0x75, 0xf7, 0x14, 0x0a, 0xc3, 0x29, 
+	0x9f, 0x51, 0xbc, 0xfb, 0xdc, 0x7b, 0x8a, 0x05, 
+	0x61, 0x94, 0xcf, 0xa8, 0xde, 0x7d, 0xee, 0x3d, 
+	0xc5, 0x02, 0xb0, 0xca, 0x67, 0xd4, 0x6f, 0x3e, 
+	0xf7, 0x1e, 0xe2, 0x81, 0x58, 0x65, 0x33, 0xea, 
+	0x37, 0x9f, 0x7b, 0x80, 0xff, 0xff, 0x24, 0xc0, 
+	0x12, 0xe0, 0x00, 0x00, 0x00, 0x01, 0x11, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xeb, 0x50, 0xfb, 0xe7, 0x78, 0x1f, 0xde, 0xa1, 
+	0x62, 0x99, 0x11, 0x36, 0x02, 0x00, 0x97, 0xd6, 
+	0x69, 0x98, 0x1f, 0xde, 0xa1, 0x62, 0x99, 0x11, 
+	0x36, 0x02, 0x00, 0x97, 0xd6, 0x69, 0x98, 0x1f, 
+	0xde, 0xa1, 0x62, 0x99, 0x11, 0x36, 0x02, 0x00, 
+	0x97, 0xd6, 0x69, 0x90, 0xff, 0xff, 0x24, 0xc0, 
+	0x11, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xdf, 0x95, 0x03, 0xa1, 0x49, 0xc5, 0x45, 0xe7, 
+	0x96, 0xe6, 0x1d, 0xdc, 0x0d, 0x50, 0xa4, 0xe2, 
+	0xa2, 0xf3, 0xcb, 0x73, 0x0e, 0xee, 0x06, 0xa8, 
+	0x52, 0x71, 0x51, 0x79, 0xe5, 0xb9, 0x87, 0x77, 
+	0x03, 0x54, 0x29, 0x38, 0xa8, 0xbc, 0xf2, 0xdc, 
+	0xc3, 0xbb, 0x81, 0xa0, 0xff, 0xff, 0x24, 0xc0, 
+	0x11, 0x21, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0xe7, 0xae, 0x35, 0x0d, 0x42, 0x14, 0xc2, 0xf9, 
+	0x4a, 0x13, 0x55, 0xa6, 0x6e, 0xf4, 0x88, 0x53, 
+	0x0b, 0xe5, 0x28, 0x4d, 0x56, 0x99, 0xbb, 0xd2, 
+	0x21, 0x4c, 0x2f, 0x94, 0xa1, 0x35, 0x5a, 0x66, 
+	0xef, 0x48, 0x85, 0x30, 0xbe, 0x52, 0x84, 0xd5, 
+	0x69, 0x9b, 0xbd, 0x20, 0x00, 0x00, 0x00, 0x14, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x08, 0x1f, 0xc8, 0x2e, 0x08, 0x1f, 0xcc, 
+	0x2e, 0x08, 0x1f, 0xd0, 0x2e, 0x08, 0x1f, 0xd8, 
+	0x2e, 0x08, 0x1f, 0xdc, 0x2e, 0x08, 0x1f, 0xe0, 
+	0x6e, 0x00, 0x01, 0x00, 0x6e, 0x00, 0x01, 0x00, 
+	0x6e, 0x00, 0x01, 0x08, 0x6e, 0x00, 0x01, 0x0c, 
+	0x6e, 0x00, 0x01, 0x04, 0x6e, 0x00, 0x01, 0x10, 
+	0x6e, 0x00, 0x01, 0x14, 0x2e, 0x08, 0x9d, 0xc4, 
+	0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 
+	0xb0, 0x25, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x68, 0x00, 0x0d, 0x00, 0x2e, 0x08, 0x20, 0x2c, 
+	0x2e, 0x08, 0x20, 0x30, 0x2e, 0x08, 0x20, 0x34, 
+	0x2e, 0x08, 0x20, 0x38, 0x70, 0x00, 0x00, 0x00, 
+	0x70, 0x00, 0x00, 0x04, 0x70, 0x00, 0x00, 0x08, 
+	0x70, 0x00, 0x00, 0x0c, 0x70, 0x00, 0x00, 0x10, 
+	0x70, 0x00, 0x00, 0x30, 0x2e, 0x02, 0x3a, 0x7d, 
+	0x2e, 0x02, 0x3a, 0x0d, 0x2e, 0x02, 0x39, 0x85, 
+	0x2e, 0x02, 0x39, 0x7d, 0x2e, 0x02, 0x3a, 0xb5, 
+	0x2e, 0x02, 0x3a, 0x45, 0x2e, 0x02, 0x3a, 0xf9, 
+	0x2e, 0x02, 0x3a, 0xf1, 0x00, 0x00, 0x00, 0x00, 
+	0x9e, 0x00, 0x09, 0x80, 0x80, 0x00, 0x00, 0x00, 
+	0xc0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
+	0xf0, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 
+	0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
+	0xff, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 
+	0xff, 0xc0, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 
+	0xff, 0xf0, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
+	0xff, 0xfc, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 
+	0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x80, 0x00, 
+	0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xe0, 0x00, 
+	0xff, 0xff, 0xf0, 0x00, 0xff, 0xff, 0xf8, 0x00, 
+	0xff, 0xff, 0xfc, 0x00, 0xff, 0xff, 0xfe, 0x00, 
+	0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x80, 
+	0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xe0, 
+	0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xf8, 
+	0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfe, 
+	0xff, 0xff, 0xff, 0xff, 0x80, 0xc0, 0xe0, 0xf0, 
+	0xf8, 0xfc, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x7f, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x2e, 0x03, 0xa9, 0x18, 
+	0x2e, 0x03, 0xa9, 0x1a, 0x2e, 0x03, 0xa9, 0x1b, 
+	0x2e, 0x03, 0xa9, 0x1c, 0x2e, 0x03, 0xa9, 0x1d, 
+	0x2e, 0x03, 0xa9, 0x1e, 0x2e, 0x03, 0xa9, 0x1f, 
+	0x2e, 0x03, 0xa9, 0x20, 0x2e, 0x03, 0xa9, 0x21, 
+	0x2e, 0x03, 0xa9, 0x22, 0xff, 0xff, 0xff, 0xff, 
+	0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x40, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 0x2e, 0x02, 0x39, 0x64, 
+	0x2e, 0x02, 0x39, 0x64, 
+};
+
diff -Nru a/drivers/media/dvb/av7110/av7110_ir.c b/drivers/media/dvb/av7110/av7110_ir.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/av7110_ir.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,171 @@
+#include <asm/types.h>
+#include <asm/bitops.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/input.h>
+#include <linux/proc_fs.h>
+
+#include "av7110.h"
+
+
+#define UP_TIMEOUT (HZ/2)
+
+static int av7110_ir_debug = 0;
+
+#define dprintk(x...)  do { if (av7110_ir_debug) printk (x); } while (0)
+
+
+static struct input_dev input_dev;
+
+
+static
+u16 key_map [256] = {
+	KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7,
+	KEY_8, KEY_9, KEY_LAST, 0, KEY_POWER, KEY_MUTE, 0, KEY_INFO,
+	KEY_VOLUMEUP, KEY_VOLUMEDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+	KEY_CHANNELUP, KEY_CHANNELDOWN, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+	0, 0, 0, 0, KEY_TEXT, 0, 0, KEY_TV, 0, 0, 0, 0, 0, KEY_SETUP, 0, 0,
+	0, 0, 0, KEY_SUBTITLE, 0, 0, KEY_LANGUAGE, 0,
+	KEY_RADIO, 0, 0, 0, 0, KEY_EXIT, 0, 0, 
+	KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_OK, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_RED, KEY_GREEN, KEY_YELLOW,
+	KEY_BLUE, 0, 0, 0, 0, 0, 0, 0, KEY_MENU, KEY_LIST, 0, 0, 0, 0, 0, 0, 
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+	0, 0, 0, 0, KEY_UP, KEY_UP, KEY_DOWN, KEY_DOWN,
+	0, 0, 0, 0, KEY_EPG, 0, 0, 0, 
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_MHP
+};
+
+
+static
+void av7110_emit_keyup (unsigned long data)
+{
+	if (!data || !test_bit (data, input_dev.key))
+		return;
+
+	input_event (&input_dev, EV_KEY, data, !!0);
+}
+
+
+static
+struct timer_list keyup_timer = { function: av7110_emit_keyup };
+
+
+static
+void av7110_emit_key (u32 ircom)
+{
+	int down = ircom & (0x80000000);
+	u16 keycode = key_map[ircom & 0xff];
+
+	dprintk ("#########%08x######### key %02x %s (keycode %i)\n",
+		 ircom, ircom & 0xff, down ? "pressed" : "released", keycode);
+
+	if (!keycode) {
+		printk ("%s: unknown key 0x%02x!!\n",
+			__FUNCTION__, ircom & 0xff);
+		return;
+	}
+
+	if (timer_pending (&keyup_timer)) {
+		del_timer (&keyup_timer);
+		if (keyup_timer.data != keycode)
+			input_event (&input_dev, EV_KEY, keyup_timer.data, !!0);
+	}
+
+	clear_bit (keycode, input_dev.key);
+
+	input_event (&input_dev, EV_KEY, keycode, !0);
+
+	keyup_timer.expires = jiffies + UP_TIMEOUT;
+	keyup_timer.data = keycode;
+
+	add_timer (&keyup_timer);
+}
+
+static
+void input_register_keys (void)
+{
+	int i;
+
+	memset (input_dev.keybit, 0, sizeof(input_dev.keybit));
+
+	for (i=0; i<sizeof(key_map)/sizeof(key_map[0]); i++) {
+		if (key_map[i] > KEY_MAX)
+			key_map[i] = 0;
+		else if (key_map[i] > KEY_RESERVED)
+			set_bit (key_map[i], input_dev.keybit);
+	}
+}
+
+
+static
+int av7110_ir_write_proc (struct file *file, const char *buffer,
+	                  unsigned long count, void *data)
+{
+	u32 ir_config;
+
+	if (count < 4 + 256 * sizeof(u16))
+		return -EINVAL;
+	
+	memcpy (&ir_config, buffer, 4);
+	memcpy (&key_map, buffer + 4, 256 * sizeof(u16));
+
+	av7110_setup_irc_config (NULL, ir_config);
+
+	input_register_keys ();
+
+	return count;
+}
+
+
+int __init av7110_ir_init (void)
+{
+	static struct proc_dir_entry *e;
+
+	init_timer (&keyup_timer);
+	keyup_timer.data = 0;
+
+        input_dev.name = "DVB on-card IR receiver";
+
+        /**
+         *  enable keys
+         */
+        set_bit (EV_KEY, input_dev.evbit);
+
+	input_register_keys ();
+
+	input_register_device(&input_dev);
+
+	av7110_setup_irc_config (NULL, 0x0001);
+	av7110_register_irc_handler (av7110_emit_key);
+
+	e = create_proc_entry ("av7110_ir", S_IFREG | S_IRUGO | S_IWUSR, NULL);
+
+	if (e) {
+		e->write_proc = av7110_ir_write_proc;
+		e->size = 4 + 256 * sizeof(u16);
+	}
+
+	return 0;
+}
+
+
+void __exit av7110_ir_exit (void)
+{
+	remove_proc_entry ("av7110_ir", NULL);
+	av7110_unregister_irc_handler (av7110_emit_key);
+	input_unregister_device(&input_dev);
+}
+
+//MODULE_AUTHOR("Holger Waechtler <holger@convergence.de>");
+//MODULE_LICENSE("GPL");
+
+MODULE_PARM(av7110_ir_debug,"i");
+MODULE_PARM_DESC(av7110_ir_debug, "enable AV7110 IR receiver debug messages");
+
diff -Nru a/drivers/media/dvb/av7110/saa7146.c b/drivers/media/dvb/av7110/saa7146.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/saa7146.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1662 @@
+/*
+    the api- and os-independet parts of the saa7146 device driver
+    
+    Copyright (C) 1998,1999 Michael Hunold <michael@mihu.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "saa7146_defs.h"
+
+#define TRUNC(val,max) ((val) < (max) ? (val) : (max))
+
+#ifdef __COMPILE_SAA7146__
+
+struct saa7146_modes_constants
+ modes_constants[] = {
+	{ V_OFFSET_PAL,		V_FIELD_PAL,	V_ACTIVE_LINES_PAL,
+	  H_OFFSET_PAL,		H_PIXELS_PAL,	H_PIXELS_PAL+1,
+	  V_ACTIVE_LINES_PAL,	1024 },	/* PAL values */
+	{ V_OFFSET_NTSC,	V_FIELD_NTSC,	V_ACTIVE_LINES_NTSC,
+	  H_OFFSET_NTSC,	H_PIXELS_NTSC,  H_PIXELS_NTSC+1,
+	  V_ACTIVE_LINES_NTSC,	1024 },	/* NTSC values */
+	{ 0,0,0,0,0,0,0,0 }, /* secam values */
+	{ 0,288,576, 
+	  0,188*4,188*4+1,
+	  288,188*4 } /* TS values */
+};
+
+/* -----------------------------------------------------------------------------------------
+   helper functions for the calculation of the horizontal- and vertical scaling	registers,
+   clip-format-register etc ...
+   these functions take pointers to the (most-likely read-out original-values) and manipulate
+   them according to the requested new scaling parameters.
+   ----------------------------------------------------------------------------------------- */
+
+/* hps_coeff used for CXY and CXUV; scale 1/1 -> scale 1/64 */
+struct {
+	u16 hps_coeff;
+	u16 weight_sum;
+} hps_h_coeff_tab [] = { 
+	{0x00,   2}, {0x02,   4}, {0x00,   4}, {0x06,   8}, {0x02,   8},
+	{0x08,   8}, {0x00,   8}, {0x1E,  16}, {0x0E,   8}, {0x26,   8},
+	{0x06,   8}, {0x42,   8}, {0x02,   8}, {0x80,   8}, {0x00,   8},
+	{0xFE,  16}, {0xFE,   8}, {0x7E,   8}, {0x7E,   8}, {0x3E,   8},
+	{0x3E,   8}, {0x1E,   8}, {0x1E,   8}, {0x0E,   8}, {0x0E,   8},
+	{0x06,   8}, {0x06,   8}, {0x02,   8}, {0x02,   8}, {0x00,   8},
+	{0x00,   8}, {0xFE,  16}, {0xFE,   8}, {0xFE,   8}, {0xFE,   8},
+	{0xFE,   8}, {0xFE,   8}, {0xFE,   8}, {0xFE,   8}, {0xFE,   8},
+	{0xFE,   8}, {0xFE,   8}, {0xFE,   8}, {0xFE,   8}, {0xFE,   8},
+	{0xFE,   8}, {0xFE,   8}, {0xFE,   8}, {0xFE,   8}, {0x7E,   8},
+	{0x7E,   8}, {0x3E,   8}, {0x3E,   8}, {0x1E,   8}, {0x1E,   8},
+	{0x0E,   8}, {0x0E,   8}, {0x06,   8}, {0x06,   8}, {0x02,   8},
+	{0x02,   8}, {0x00,   8}, {0x00,   8}, {0xFE,  16}
+};
+
+/* table of attenuation values for horizontal scaling */
+u8 h_attenuation[] = { 1, 2, 4, 8, 2, 4, 8, 16, 0};
+
+int calculate_h_scale_registers(struct saa7146* saa, u32 in_x, u32 out_x, int flip_lr, u32* hps_ctrl, u32* hps_v_gain, u32* hps_h_prescale, u32* hps_h_scale)
+{
+	/* horizontal prescaler */
+	u32 dcgx = 0, xpsc = 0, xacm = 0, cxy = 0, cxuv = 0;
+	/* horizontal scaler */
+	u32 xim = 0, xp = 0, xsci =0;
+	/* vertical scale & gain */
+	u32 pfuv = 0;	
+	/* helper variables */
+	u32 h_atten = 0, i = 0;
+
+	if ( 0 == out_x ) {
+		printk("saa7146: ==> calculate_h_scale_registers: invalid value (=0).\n");
+		return -EINVAL;
+	}
+	
+	/* mask out vanity-bit */
+	*hps_ctrl &= ~MASK_29;
+		
+	/* calculate prescale-(xspc)-value:	[n   .. 1/2) : 1
+				    		[1/2 .. 1/3) : 2
+				    		[1/3 .. 1/4) : 3
+						... 			*/
+	if (in_x > out_x) {
+		xpsc = in_x / out_x;
+	} else {
+		/* zooming */
+		xpsc = 1;						
+	}
+	
+	/* if flip_lr-bit is set, number of pixels after horizontal prescaling must be < 384 */
+	if ( 0 != flip_lr ) {
+		/* set vanity bit */
+		*hps_ctrl |= MASK_29;
+	
+		while (in_x / xpsc >= 384 )
+			xpsc++;
+	}
+	/* if zooming is wanted, number of pixels after horizontal prescaling must be < 768 */
+	else {
+		while ( in_x / xpsc >= 768 )
+			xpsc++;
+	}
+	
+	/* maximum prescale is 64 (p.69) */
+	if ( xpsc > 64 )
+		xpsc = 64;
+
+	/* keep xacm clear*/
+	xacm = 0;
+	
+	/* set horizontal filter parameters (CXY = CXUV) */
+	cxy = hps_h_coeff_tab[TRUNC(xpsc - 1, 63)].hps_coeff;
+	cxuv = cxy;
+	
+	/* calculate and set horizontal fine scale (xsci) */
+	
+	/* bypass the horizontal scaler ? */
+	if ( (in_x == out_x) && ( 1 == xpsc ) )
+		xsci = 0x400;
+	else	
+		xsci = ( (1024 * in_x) / (out_x * xpsc) ) + xpsc;
+
+	/* set start phase for horizontal fine scale (xp) to 0 */	
+	xp = 0;
+	
+	/* set xim, if we bypass the horizontal scaler */
+	if ( 0x400 == xsci )
+		xim = 1;
+	else
+		xim = 0;
+		
+	/* if the prescaler is bypassed, enable horizontal accumulation mode (xacm)
+	   and clear dcgx */
+	if( 1 == xpsc ) {
+		xacm = 1;
+		dcgx = 0;
+	} else {
+		xacm = 0;
+		/* get best match in the table of attenuations for horizontal scaling */
+		h_atten = hps_h_coeff_tab[TRUNC(xpsc - 1, 63)].weight_sum;
+	
+		for (i = 0; h_attenuation[i] != 0; i++) {
+			if (h_attenuation[i] >= h_atten)
+				break;
+		}
+	
+		dcgx = i;
+	}
+
+	/* the horizontal scaling increment controls the UV filter to reduce the bandwith to
+	   improve the display quality, so set it ... */
+	if ( xsci == 0x400)
+		pfuv = 0x00;
+	else if ( xsci < 0x600)
+		pfuv = 0x01;
+	else if ( xsci < 0x680)
+		pfuv = 0x11;
+	else if ( xsci < 0x700)
+		pfuv = 0x22;
+	else
+		pfuv = 0x33;
+
+	
+	*hps_v_gain  &= MASK_W0|MASK_B2;
+	*hps_v_gain  |= (pfuv << 24);	
+
+	*hps_h_scale 	&= ~(MASK_W1 | 0xf000);
+	*hps_h_scale	|= (xim << 31) | (xp << 24) | (xsci << 12);
+
+	*hps_h_prescale	|= (dcgx << 27) | ((xpsc-1) << 18) | (xacm << 17) | (cxy << 8) | (cxuv << 0);
+
+	return 0;
+}
+
+struct {
+	u16 hps_coeff;
+	u16 weight_sum;
+} hps_v_coeff_tab [] = { 
+	{0x0100,   2},  {0x0102,   4},  {0x0300,   4},  {0x0106,   8},
+	{0x0502,   8},  {0x0708,   8},  {0x0F00,   8},  {0x011E,  16},
+	{0x110E,  16},  {0x1926,  16},  {0x3906,  16},  {0x3D42,  16},
+	{0x7D02,  16},  {0x7F80,  16},  {0xFF00,  16},  {0x01FE,  32},
+	{0x01FE,  32},  {0x817E,  32},  {0x817E,  32},  {0xC13E,  32},
+	{0xC13E,  32},  {0xE11E,  32},  {0xE11E,  32},  {0xF10E,  32},
+	{0xF10E,  32},  {0xF906,  32},  {0xF906,  32},  {0xFD02,  32},
+	{0xFD02,  32},  {0xFF00,  32},  {0xFF00,  32},  {0x01FE,  64},
+	{0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},
+	{0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},
+	{0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},
+	{0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},  {0x01FE,  64},
+	{0x01FE,  64},  {0x817E,  64},  {0x817E,  64},  {0xC13E,  64},
+	{0xC13E,  64},  {0xE11E,  64},  {0xE11E,  64},  {0xF10E,  64},
+	{0xF10E,  64},  {0xF906,  64},  {0xF906,  64},  {0xFD02,  64},
+	{0xFD02,  64},  {0xFF00,  64},  {0xFF00,  64},  {0x01FE, 128}
+};
+
+/* table of attenuation values for vertical scaling */
+u16 v_attenuation[] = { 2, 4, 8, 16, 32, 64, 128, 256, 0};
+
+int calculate_v_scale_registers(struct saa7146* saa, u32 in_y, u32 out_y, u32* hps_v_scale, u32* hps_v_gain)
+{
+	u32 yacm = 0, ysci = 0, yacl = 0, ypo = 0, ype = 0;	/* vertical scaling */
+	u32 dcgy = 0, cya_cyb = 0;				/* vertical scale & gain */
+				
+	u32 v_atten = 0, i = 0;					/* helper variables */
+
+	/* error, if vertical zooming */
+	if ( in_y < out_y ) {
+		printk("saa7146: ==> calculate_v_scale_registers: we cannot do vertical zooming.\n");
+		return -EINVAL;
+	}
+
+	/* linear phase interpolation may be used if scaling is between 1 and 1/2
+	   or scaling is between 1/2 and 1/4 (if interlace is set; see below) */
+	if( ((2*out_y) >= in_y) || (((4*out_y) >= in_y) && saa->interlace != 0)) {
+
+		/* convention: if scaling is between 1/2 and 1/4 we only use
+		   the even lines, the odd lines get discarded (see function move_to)
+		   if interlace is set */
+		if( saa->interlace != 0 && (out_y*4) >= in_y && (out_y*2) <= in_y) 
+			out_y *= 2;
+
+		yacm = 0;
+		yacl = 0;
+		cya_cyb = 0x00ff;
+		
+		/* calculate scaling increment */
+		if ( in_y > out_y )
+			ysci = ((1024 * in_y) / (out_y + 1)) - 1024;
+		else
+			ysci = 0;
+
+		dcgy = 0;
+
+		/* calculate ype and ypo */
+                if (saa->interlace !=0) { 
+                    
+                    /* Special case for interlaced input */
+
+                    /* See Philips SAA7146A Product Spec (page 75):       */
+                    /* "For interlaced input, ype and ypo is defiend as   */
+                    /* YPeven= 3/2 x YPodd (line 1 = odd)"                */
+                    /*                                                    */
+                    /* It looks like the spec is wrong!                   */
+                    /* The  ad hoc values below works fine for a target   */
+                    /* window height of 480 (vertical scale = 1/1) NTSC.  */
+                    /* PLI: December 27, 2000.                            */
+                    ypo=64;
+                    ype=0; 
+                } else {
+                    ype = ysci / 16;
+                    ypo = ype + (ysci / 64);
+                }
+	}
+	else {
+		yacm = 1;	
+
+		/* calculate scaling increment */
+		ysci = (((10 * 1024 * (in_y - out_y - 1)) / in_y) + 9) / 10;
+
+		/* calculate ype and ypo */
+		ypo = ype = ((ysci + 15) / 16);
+
+		/* the sequence length interval (yacl) has to be set according
+		   to the prescale value, e.g.	[n   .. 1/2) : 0
+		   				[1/2 .. 1/3) : 1
+						[1/3 .. 1/4) : 2
+						... */
+		if ( ysci < 512) {
+			yacl = 0;
+		}
+		else {
+			yacl = ( ysci / (1024 - ysci) );
+		}
+
+		/* get filter coefficients for cya, cyb from table hps_v_coeff_tab */	
+		cya_cyb = hps_v_coeff_tab[TRUNC(yacl, 63)].hps_coeff;
+
+		/* get best match in the table of attenuations for vertical scaling */
+		v_atten = hps_v_coeff_tab[TRUNC(yacl, 63)].weight_sum;
+
+		for (i = 0; v_attenuation[i] != 0; i++) {
+			if (v_attenuation[i] >= v_atten)
+				break;
+		}
+	
+		dcgy = i;
+	}
+
+	/* ypo and ype swapped in spec ? */
+	*hps_v_scale	|= (yacm << 31) | (ysci << 21) | (yacl << 15) | (ypo << 8 ) | (ype << 1);
+
+	*hps_v_gain	&= ~(MASK_W0|MASK_B2);
+	*hps_v_gain	|= (dcgy << 16) | (cya_cyb << 0);
+
+	return 0;
+}
+
+void calculate_hxo_hyo_and_sources(struct saa7146* saa, int port_sel, int sync_sel, u32* hps_h_scale, u32* hps_ctrl)
+{
+	u32 hyo = 0, hxo = 0;
+	
+	hyo = modes_constants[saa->mode].v_offset;
+	hxo = modes_constants[saa->mode].h_offset;
+				
+	*hps_h_scale	&= ~(MASK_B0 | 0xf00);
+	*hps_ctrl	&= ~(MASK_W0 | MASK_B2 | MASK_30 | MASK_31 | MASK_28);
+
+	*hps_h_scale	|= (hxo <<  0);
+	*hps_ctrl	|= (hyo << 12);
+
+	*hps_ctrl	|= ( port_sel == 0 ? 0x0 : MASK_30);
+	*hps_ctrl	|= ( sync_sel == 0 ? 0x0 : MASK_28);
+}
+
+void calculate_output_format_register(struct saa7146* saa, u16 palette, u32* clip_format)
+{
+	/* clear out the necessary bits */
+	*clip_format &= 0x0000ffff;	
+	/* set these bits new */
+	*clip_format |=  (( ((palette&0xf00)>>8) << 30) | ((palette&0x00f) << 24) | (((palette&0x0f0)>>4) << 16));
+}
+
+void calculate_bcs_ctrl_register(struct saa7146 *saa, u32 brightness, u32 contrast, u32 colour, u32 *bcs_ctrl)
+{
+	*bcs_ctrl = ((brightness << 24) | (contrast << 16) | (colour <<  0));
+}
+
+
+int calculate_video_dma1_grab(struct saa7146* saa, int frame, struct saa7146_video_dma* vdma1) 
+{
+	int depth = 0;
+	
+	switch(saa->grab_format[frame]) {
+		case YUV422_COMPOSED:
+		case RGB15_COMPOSED:
+		case RGB16_COMPOSED:
+			depth = 2;
+			break;
+		case RGB24_COMPOSED:
+			depth = 3;
+			break;
+		default:
+			depth = 4;	
+		break;
+	}
+
+	vdma1->pitch		= saa->grab_width[frame]*depth*2;
+	vdma1->base_even	= 0;
+	vdma1->base_odd		= vdma1->base_even + (vdma1->pitch/2);
+	vdma1->prot_addr	= (saa->grab_width[frame]*saa->grab_height[frame]*depth)-1;
+	vdma1->num_line_byte	= ((modes_constants[saa->mode].v_field<<16) + modes_constants[saa->mode].h_pixels);
+	vdma1->base_page	= virt_to_bus(saa->page_table[frame]) | ME1;
+
+	/* convention: if scaling is between 1/2 and 1/4 we only use
+	   the even lines, the odd lines get discarded (see vertical scaling) */
+	if( saa->interlace != 0 && saa->grab_height[frame]*4 >= modes_constants[saa->mode].v_calc && saa->grab_height[frame]*2 <= modes_constants[saa->mode].v_calc) {
+		vdma1->base_odd = vdma1->prot_addr;
+		vdma1->pitch /= 2;
+	}
+
+	return 0;
+}
+
+/* ---------------------------------------------*/
+/* position of overlay-window			*/
+/* ---------------------------------------------*/
+		
+/* calculate the new memory offsets for a desired position */
+int move_to(struct saa7146* saa, int w_x, int w_y, int w_height, int b_width, int b_depth, int b_bpl, u32 base, int td_flip)
+{	
+	struct	saa7146_video_dma	vdma1;
+
+	if( w_y < 0 || w_height <= 0 || b_depth <= 0 || b_bpl <= 0 || base == 0 ) {
+		printk("saa7146: ==> calculate_video_dma1_overlay: illegal values: y: %d  h: %d  d: %d  b: %d  base: %d\n",w_y ,w_height,b_depth,b_bpl,base);
+		return -EINVAL;
+	}	
+
+	/* calculate memory offsets for picture, look if we shall top-down-flip */
+	vdma1.pitch	= 2*b_bpl;
+	if ( 0 == td_flip ) {
+		vdma1.prot_addr = (u32)base + ((w_height+w_y+1)*b_width*(b_depth/4));		
+		vdma1.base_even = (u32)base + (w_y * (vdma1.pitch/2)) + (w_x * (b_depth / 8)); 
+		vdma1.base_odd  = vdma1.base_even + (vdma1.pitch / 2);
+	}
+	else {
+		vdma1.prot_addr = (u32)base + (w_y * (vdma1.pitch/2));
+		vdma1.base_even = (u32)base + ((w_y+w_height) * (vdma1.pitch/2)) + (w_x * (b_depth / 8)); 
+		vdma1.base_odd  = vdma1.base_even + (vdma1.pitch / 2);
+		vdma1.pitch    *= -1;
+	}	
+
+	/* convention: if scaling is between 1/2 and 1/4 we only use
+	   the even lines, the odd lines get discarded (see vertical scaling) */
+	if( saa->interlace != 0 && w_height*4 >= modes_constants[saa->mode].v_calc && w_height*2 <= modes_constants[saa->mode].v_calc) {
+		vdma1.base_odd = vdma1.prot_addr;
+		vdma1.pitch /= 2;
+	}
+		
+	vdma1.base_page = 0;
+	vdma1.num_line_byte = (modes_constants[saa->mode].v_field<<16)+modes_constants[saa->mode].h_pixels;
+
+	saa7146_write(saa->mem, BASE_EVEN1,     vdma1.base_even);
+	saa7146_write(saa->mem, BASE_ODD1,      vdma1.base_odd);
+	saa7146_write(saa->mem, PROT_ADDR1,     vdma1.prot_addr);
+	saa7146_write(saa->mem, BASE_PAGE1,     vdma1.base_page);
+	saa7146_write(saa->mem, PITCH1,		vdma1.pitch);
+	saa7146_write(saa->mem, NUM_LINE_BYTE1,	vdma1.num_line_byte);
+
+	/* update the video dma 1 registers */
+      	saa7146_write(saa->mem, MC2, (MASK_02 | MASK_18));
+	
+	return 0;
+
+}
+
+/* ---------------------------------------------*/
+/* size of window (overlay)			*/
+/* ---------------------------------------------*/
+
+int set_window(struct saa7146* saa, int width, int height, int flip_lr, int port_sel, int sync_sel)
+{
+	u32 hps_v_scale = 0, hps_v_gain  = 0, hps_ctrl = 0, hps_h_prescale = 0, hps_h_scale = 0;
+
+	/* set vertical scale according to selected mode: 0 = PAL, 1 = NTSC */
+	hps_v_scale = 0; /* all bits get set by the function-call */
+	hps_v_gain  = 0; /* fixme: saa7146_read(saa->mem, HPS_V_GAIN);*/ 
+	calculate_v_scale_registers(saa, modes_constants[saa->mode].v_calc, height, &hps_v_scale, &hps_v_gain);
+
+	/* set horizontal scale according to selected mode: 0 = PAL, 1 = NTSC */
+	hps_ctrl 	= 0;
+	hps_h_prescale	= 0; /* all bits get set in the function */
+	hps_h_scale	= 0;
+	calculate_h_scale_registers(saa, modes_constants[saa->mode].h_calc, width, 0, &hps_ctrl, &hps_v_gain, &hps_h_prescale, &hps_h_scale);
+
+	/* set hyo and hxo */
+	calculate_hxo_hyo_and_sources(saa, port_sel, sync_sel, &hps_h_scale, &hps_ctrl);
+	
+	/* write out new register contents */
+	saa7146_write(saa->mem, HPS_V_SCALE,	hps_v_scale);
+	saa7146_write(saa->mem, HPS_V_GAIN,	hps_v_gain);
+	saa7146_write(saa->mem, HPS_CTRL,	hps_ctrl);
+	saa7146_write(saa->mem, HPS_H_PRESCALE,hps_h_prescale);
+	saa7146_write(saa->mem, HPS_H_SCALE,	hps_h_scale);
+
+	/* upload shadow-ram registers */
+      	saa7146_write( saa->mem, MC2, (MASK_05 | MASK_06 | MASK_21 | MASK_22) );
+
+/*
+	printk("w:%d,h:%d\n",width,height);
+*/
+	return 0;
+
+}
+
+void set_output_format(struct saa7146* saa, u16 palette)
+{
+	u32	clip_format = saa7146_read(saa->mem, CLIP_FORMAT_CTRL);
+	
+	dprintk("saa7146: ==> set_output_format: pal:0x%03x\n",palette);
+	
+	/* call helper function */
+	calculate_output_format_register(saa,palette,&clip_format);
+	dprintk("saa7146: ==> set_output_format: 0x%08x\n",clip_format);
+
+	/* update the hps registers */
+	saa7146_write(saa->mem, CLIP_FORMAT_CTRL, clip_format);
+      	saa7146_write(saa->mem, MC2, (MASK_05 | MASK_21));
+}
+
+void set_picture_prop(struct saa7146 *saa, u32 brightness, u32 contrast, u32 colour)
+{
+	u32	bcs_ctrl = 0;
+	
+	calculate_bcs_ctrl_register(saa, brightness, contrast, colour, &bcs_ctrl);
+	saa7146_write(saa->mem, BCS_CTRL, bcs_ctrl);
+	
+	/* update the bcs register */
+      	saa7146_write(saa->mem, MC2, (MASK_06 | MASK_22));
+}
+
+/* ---------------------------------------------*/
+/* overlay enable/disable			*/
+/* ---------------------------------------------*/
+
+/* enable(1) / disable(0) video */
+void video_setmode(struct saa7146* saa, int v)
+{
+	hprintk("saa7146: ==> video_setmode; m:%d\n",v);
+	
+	/* disable ? */
+	if(v==0) {
+		/* disable video dma1 */
+      		saa7146_write(saa->mem, MC1, MASK_22);
+	} else {/* or enable ? */
+		/* fixme: enable video */
+	        saa7146_write(saa->mem, MC1, (MASK_06 | MASK_22));
+	}
+}		
+
+/* -----------------------------------------------------
+   common grabbing-functions. if you have some simple
+   saa7146-based frame-grabber you can most likely call
+   these. they do all the revision-dependend stuff and
+   do rps/irq-based grabbing for you.
+   -----------------------------------------------------*/
+
+/* this function initializes the rps for the next grab for any "old"
+   saa7146s (= revision 0). it assumes that the rps is *not* running
+   when it gets called. */
+int init_rps0_rev0(struct saa7146* saa, int frame, int irq_call)
+{
+	struct	saa7146_video_dma	vdma1;
+	u32 hps_v_scale = 0, hps_v_gain  = 0, hps_ctrl = 0, hps_h_prescale = 0, hps_h_scale = 0;
+	u32 clip_format = 0; /* this can be 0, since we don't do clipping */
+	u32 bcs_ctrl = 0;
+	
+	int count = 0;
+
+/* these static values are used to remember the last "programming" of the rps.
+   if the height, width and format of the grab has not changed (which is very likely
+   when some streaming capture is done) the reprogramming overhead can be minimized */
+static	int last_height = 0;
+static	int last_width = 0;
+static	int last_format = 0;
+static	int last_port = 0;
+static	int last_frame = -1;
+
+	/* write the address of the rps-program */
+	saa7146_write(saa->mem, RPS_ADDR0, virt_to_bus(&saa->rps0[ 0]));
+
+	/* let's check if we can re-use something of the last grabbing process */
+	if (	   saa->grab_height[frame] != last_height
+		|| saa->grab_width[frame] != last_width
+		|| saa->grab_port[frame] != last_port
+		|| saa->grab_format[frame] != last_format ) {
+
+		/* nope, we have to start from the beginning */
+		calculate_video_dma1_grab(saa, frame, &vdma1);
+		calculate_v_scale_registers(saa, modes_constants[saa->mode].v_calc, saa->grab_height[frame], &hps_v_scale, &hps_v_gain);
+		calculate_h_scale_registers(saa, modes_constants[saa->mode].h_calc, saa->grab_width[frame], 0, &hps_ctrl, &hps_v_gain, &hps_h_prescale, &hps_h_scale);
+		calculate_hxo_hyo_and_sources(saa, saa->grab_port[frame], saa->grab_port[frame], &hps_h_scale, &hps_ctrl);
+		calculate_output_format_register(saa,saa->grab_format[frame],&clip_format);
+		calculate_bcs_ctrl_register(saa, 0x80, 0x40, 0x40, &bcs_ctrl);
+
+		count = 0;
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG_MASK | (MC1/4));		/* turn off video-dma1 and dma2 (clipping)*/
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22 | MASK_05 | MASK_21);	/* => mask */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_22 | MASK_21);			/* => values */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | ( saa->grab_port[frame] == 0 ? MASK_12 : MASK_14));	/* wait for o_fid_a/b */
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | ( saa->grab_port[frame] == 0 ? MASK_11 : MASK_13));	/* wait for e_fid_a/b */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (6 << 8) | HPS_CTRL/4);	/* upload hps-registers for next grab */
+		saa->rps0[ count++ ] = cpu_to_le32(hps_ctrl);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_v_scale);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_v_gain);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_h_prescale);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_h_scale);
+		saa->rps0[ count++ ] = cpu_to_le32(bcs_ctrl);
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (1 << 8) | CLIP_FORMAT_CTRL/4);/* upload hps-registers for next grab */
+		saa->rps0[ count++ ] = cpu_to_le32(clip_format);
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_UPLOAD | MASK_05 | MASK_06);		/* upload hps1/2 */
+
+		/* upload video-dma1 registers for next grab */
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (6 << 8) | BASE_ODD1/4);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.base_odd);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.base_even);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.prot_addr);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.pitch);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.base_page);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.num_line_byte);
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_UPLOAD | MASK_02);		/* upload video-dma1 */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG_MASK | (MC1/4));		/* turn on video-dma1 */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22);	    		/* => mask */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22);			/* => values */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (1 << 8) | (MC2/4)); 	/* Write MC2 */
+		saa->rps0[ count++ ] = cpu_to_le32((1 << (27+frame)) | (1 << (11+frame)));
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | ( saa->grab_port[frame] == 0 ? MASK_12 : MASK_14));	/* wait for o_fid_a/b */
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | ( saa->grab_port[frame] == 0 ? MASK_11 : MASK_13));	/* wait for e_fid_a/b */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG_MASK | (MC1/4));     		/* turn off video-dma1 */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22);	    		/* => mask */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_22);					/* => values */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_INTERRUPT);				/* generate interrupt */
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_STOP);				/* stop processing */	
+	} else {
+	
+		/* the height, width, ... have not changed. check if the user wants to grab to
+		   another *buffer* */
+		if( frame != last_frame ) {
+
+			/* ok, we want to grab to another buffer, but with the same programming.
+			   it is sufficient to adjust the video_dma1-registers and the rps-signal stuff. */
+			saa->rps0[ 20 ] = cpu_to_le32(virt_to_bus(saa->page_table[frame]) | ME1);
+			saa->rps0[ 27 ] = cpu_to_le32((1 << (27+frame)) | (1 << (11+frame)));
+	
+		}
+	 }
+	 
+	/* if we are called from within the irq-handler, the hps is at the beginning of a
+	   new frame. the rps does not need to wait the new frame, and so we tweak the
+	   starting address a little bit and so we can directly start grabbing again.
+	   note: for large video-sizes and slow computers this can cause jaggy pictures
+	   because the whole process is not in sync. perhaps one should be able to
+	   disable this. (please remember that this whole stuff only belongs to 
+	   "old" saa7146s (= revision 0), newer saa7146s don´t have any hardware-bugs
+	   and capture works fine. (see below) */   
+	if( 1 == irq_call ) {
+		saa7146_write(saa->mem, RPS_ADDR0, virt_to_bus(&saa->rps0[15]));
+	}	
+	
+	/* turn on rps */
+	saa7146_write(saa->mem, MC1, (MASK_12 | MASK_28));	
+
+	/* store the values for the last grab */
+	last_height = saa->grab_height[frame];
+	last_width = saa->grab_width[frame];
+	last_format = saa->grab_format[frame];
+	last_port = saa->grab_port[frame];
+	last_frame = frame;
+
+	return 0;
+}
+
+int init_rps0_rev1(struct saa7146* saa, int frame) {
+
+static	int old_width[SAA7146_MAX_BUF];		/* pixel width of grabs */
+static	int old_height[SAA7146_MAX_BUF];	/* pixel height of grabs */
+static	int old_format[SAA7146_MAX_BUF];	/* video format of grabs */
+static	int old_port[SAA7146_MAX_BUF];		/* video port for grab */
+	
+static	int buf_stat[SAA7146_MAX_BUF];
+
+	struct	saa7146_video_dma	vdma1;
+	u32 hps_v_scale = 0, hps_v_gain  = 0, hps_ctrl = 0, hps_h_prescale = 0, hps_h_scale = 0;
+	u32 clip_format = 0; /* this can be 0, since we don't do clipping */
+	u32 bcs_ctrl = 0;
+
+	int i = 0, count = 0;
+
+	/* check if something has changed since the last grab for this buffer */
+	if ( 	   saa->grab_height[frame]	== old_height[frame]
+		&& saa->grab_width[frame]	== old_width[frame]
+		&& saa->grab_port[frame] 	== old_port[frame]
+		&& saa->grab_format[frame]	== old_format[frame] ) {
+
+		/* nope, nothing to be done here */
+		return 0;
+	}
+
+	/* re-program the rps0 completely */
+
+	/* indicate that the user has requested re-programming of the 'frame'-buffer */
+	buf_stat[frame] = 1;
+
+	/* turn off rps */
+	saa7146_write(saa->mem, MC1, MASK_28);	
+
+
+	/* write beginning of rps-program */
+	count = 0;
+	saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | MASK_12);				/* wait for o_fid_a */
+	saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | MASK_11);				/* wait for e_fid_a */
+	for(i = 0; i < saa->buffers; i++) {		
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_JUMP  | (1 << (21+i)));		/* check signal x, jump if set */
+		saa->rps0[ count++ ] = cpu_to_le32(virt_to_bus(&saa->rps0[40*(i+1)]));
+	}
+	saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | MASK_12);				/* wait for o_fid_a */
+	saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | MASK_11);				/* wait for e_fid_a */
+	saa->rps0[ count++ ] = cpu_to_le32(CMD_JUMP);					/* jump to the beginning */
+	saa->rps0[ count++ ] = cpu_to_le32(virt_to_bus(&saa->rps0[2]));
+		
+	for(i = 0; i < saa->buffers; i++) {
+
+		/* we only re-program the i-th buffer if the user had set some values for it earlier.
+		   otherwise the calculation-functions may fail. */
+		if( buf_stat[i] == 0)
+			continue;
+
+		count = 40*(i+1);
+
+		calculate_video_dma1_grab(saa, i, &vdma1);
+		calculate_v_scale_registers(saa, modes_constants[saa->mode].v_calc, saa->grab_height[i], &hps_v_scale, &hps_v_gain);
+		calculate_h_scale_registers(saa, modes_constants[saa->mode].h_calc, saa->grab_width[i], 0, &hps_ctrl, &hps_v_gain, &hps_h_prescale, &hps_h_scale);
+		calculate_hxo_hyo_and_sources(saa, saa->grab_port[i], saa->grab_port[i], &hps_h_scale, &hps_ctrl);
+		calculate_output_format_register(saa,saa->grab_format[i],&clip_format);
+		calculate_bcs_ctrl_register(saa, 0x80, 0x40, 0x40, &bcs_ctrl);
+	
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (6 << 8) | HPS_CTRL/4);	/* upload hps-registers for next grab */
+		saa->rps0[ count++ ] = cpu_to_le32(hps_ctrl);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_v_scale);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_v_gain);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_h_prescale);
+		saa->rps0[ count++ ] = cpu_to_le32(hps_h_scale);
+		saa->rps0[ count++ ] = cpu_to_le32(bcs_ctrl);
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (1 << 8) | CLIP_FORMAT_CTRL/4);/* upload hps-registers for next grab */
+		saa->rps0[ count++ ] = cpu_to_le32(clip_format);	
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_UPLOAD | MASK_05 | MASK_06);		/* upload hps1/2 */
+	
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (6 << 8) | BASE_ODD1/4);	/* upload video-dma1 registers for next grab */
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.base_odd);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.base_even);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.prot_addr);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.pitch);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.base_page);
+		saa->rps0[ count++ ] = cpu_to_le32(vdma1.num_line_byte);
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_UPLOAD | MASK_02);		/* upload video-dma1 */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG_MASK | (MC1/4));		/* turn on video-dma1 */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22);	    		/* => mask */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22);			/* => values */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | ( saa->grab_port[i] == 0 ? MASK_12 : MASK_14));	/* wait for o_fid_a/b */
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_PAUSE | ( saa->grab_port[i] == 0 ? MASK_11 : MASK_13));	/* wait for e_fid_a/b */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG_MASK | (MC1/4));		/* turn off video-dma1 and dma2 (clipping)*/
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_06 | MASK_22 | MASK_05 | MASK_21);	/* => mask */
+		saa->rps0[ count++ ] = cpu_to_le32(MASK_22 | MASK_21);			/* => values */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_WR_REG | (1 << 8) | (MC2/4)); 	/* Write MC2 */
+		saa->rps0[ count++ ] = cpu_to_le32((1 << (27+i)));
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_INTERRUPT);				/* generate interrupt */
+
+		saa->rps0[ count++ ] = cpu_to_le32(CMD_JUMP);	/* jump to the beginning */
+		saa->rps0[ count++ ] = cpu_to_le32(virt_to_bus(&saa->rps0[2]));
+
+		old_height[frame] = saa->grab_height[frame];
+		old_width[frame]  = saa->grab_width[frame];
+		old_port[frame]	  = saa->grab_port[frame];
+		old_format[frame] = saa->grab_format[frame];
+	}
+
+	/* write the address of the rps-program */
+	saa7146_write(saa->mem, RPS_ADDR0, virt_to_bus(&saa->rps0[ 0]));
+	/* turn on rps again */
+	saa7146_write(saa->mem, MC1, (MASK_12 | MASK_28));	
+
+	return 0;
+}
+
+/* this funtion is called whenever a new grab is requested. if possible (that
+   means: if the rps is not running) it re-programs the rps, otherwise it relys on
+   the irq-handler to do that */
+int set_up_grabbing(struct saa7146* saa, int frame)
+{
+	u32 mc1 = 0;
+
+	if( 0 == saa->revision ) {
+
+		/* check if the rps is currently in use */
+		mc1   = saa7146_read(saa->mem, MC1);
+
+		/* the rps is not running ... */
+		if( 0 == ( mc1 & MASK_12) ) {
+
+			/* we can completly re-program the rps now */
+			dprintk("saa7146_v4l.o: ==> set_up_grabbing: start new rps.\n");
+			init_rps0_rev0(saa,frame,0);
+		} else {
+	
+			/* the rps is running. in this case, the irq-handler is responsible for
+			   re-programming the rps and nothing can be done right now */
+			dprintk("saa7146_v4l.o: ==> set_up_grabbing: no new rps started.\n");
+		}
+	} else {
+			/* check if something has changed, reprogram if necessary */
+			init_rps0_rev1(saa,frame);
+			/* set rps-signal-bit to start grabbing */
+			saa7146_write(saa->mem, MC2, (1 << (27+frame)) |  (1 << (11+frame)));
+	}
+	
+	return 0;	
+}
+
+
+void saa7146_std_grab_irq_callback_rps0(struct saa7146* saa, u32 isr, void* data)
+{
+	u32 mc2 = 0;
+	int i = 0;
+		
+	hprintk("saa7146_v4l.o: ==> saa7146_v4l_irq_callback_rps0\n");
+
+	/* check for revision: old revision */
+	if( 0 == saa->revision ) {
+
+		/* look what buffer has been grabbed, set the ´done´-flag and clear the signal */
+		mc2   = saa7146_read(saa->mem, MC2);
+		for( i = 0; i < saa->buffers; i++ ) {
+
+			if ((0 != (mc2 & (1 << (11+i)))) && (GBUFFER_GRABBING == saa->frame_stat[i])) {
+				saa->frame_stat[i] = GBUFFER_DONE;
+				saa7146_write(saa->mem, MC2, (1<<(27+i)));
+			}
+		}
+
+		/* look if there is another buffer we can grab to */
+		for( i = 0; i < saa->buffers; i++ ) {
+			if ( GBUFFER_GRABBING == saa->frame_stat[i] )
+					break;
+		}
+
+		/* yes, then set up the rps again */
+		if( saa->buffers != i) {
+			init_rps0_rev0(saa,i,1);
+		}
+ 	} else {
+		/* new revisions */
+
+		/* look what buffer has been grabbed, set the ´done´-flag */
+		mc2   = saa7146_read(saa->mem, MC2);
+		for( i = 0; i < saa->buffers; i++ ) {
+
+			if ((0 == (mc2 & (1 << (11+i)))) && (GBUFFER_GRABBING == saa->frame_stat[i])) {
+				saa->frame_stat[i] = GBUFFER_DONE;
+			}
+		}
+				
+	}
+	/* notify any pending process */
+	wake_up_interruptible(&saa->rps0_wq);
+	return;
+}
+
+/* ---------------------------------------------*/
+/* mask-clipping				*/
+/* ---------------------------------------------*/
+int calculate_clipping_registers_mask(struct saa7146* saa, u32 width, u32 height, struct saa7146_video_dma* vdma2, u32* clip_format, u32* arbtr_ctrl)
+{ 
+	u32 clip_addr = 0, clip_pitch = 0;
+
+	dprintk("saa7146: ==> calculate_clipping_registers_mask\n");
+
+	/* adjust arbitration control register */
+	*arbtr_ctrl &= 0xffff00ff;
+	*arbtr_ctrl |= 0x00001000;	
+
+	clip_addr	= virt_to_bus(saa->clipping);
+	clip_pitch = ((width+31)/32)*4;
+
+	vdma2->base_even	= clip_addr;	
+	vdma2->base_page	= 0x04;	/* enable read - operation */
+	vdma2->prot_addr	= clip_addr + (clip_pitch*height);
+
+	/* convention: if scaling is between 1/2 and 1/4 we only use
+	   the even lines, the odd lines get discarded (see vertical scaling) */
+	if( saa->interlace != 0 && height*4 >= modes_constants[saa->mode].v_calc && height*2 <= modes_constants[saa->mode].v_calc) {
+		vdma2->base_odd		= vdma2->prot_addr;
+		vdma2->pitch		= clip_pitch;
+		vdma2->num_line_byte	= (((height)-1) << 16) | (clip_pitch-1);
+	} else {
+		vdma2->base_odd		= clip_addr+clip_pitch;
+		vdma2->pitch		= clip_pitch*2;
+		vdma2->num_line_byte	= (((height/2)-1) << 16) | (clip_pitch-1);
+	}
+
+	*clip_format &= 0xfffffff7;
+
+	return 0;
+}
+
+/* helper functions for emulate rect-clipping via mask-clipping.
+   note: these are extremely inefficient, but for clipping with less than 16
+   windows rect-clipping should be done anyway...
+*/
+
+/* clear one pixel of the clipping memory at position (x,y) */
+void set_pixel(s32 x, s32 y, s32 window_width, u32* mem) {
+
+	u32 mem_per_row = 0;
+	u32 adr		= 0;
+	u32 shift 	= 0;
+	u32 bit 	= 0;
+
+	mem_per_row 	= (window_width + 31 )/ 32 ;
+	adr 		= y * mem_per_row + (x / 32);
+	shift 		= 31 - (x % 32);
+	bit 		= (1 << shift);
+	
+	mem[adr] |= bit;	
+}
+
+/* clear a box out of the clipping memory, beginning at (x,y) with "width" and "height" */
+void set_box(s32 x, s32 y, s32 width, s32 height, s32 window_width, s32 window_height, u32* mem)
+{
+	s32 ty = 0;
+	s32 tx = 0;
+
+	/* the video_clip-struct may contain negative values to indicate that a window
+	   doesn't lay completly over the video window. Thus, we correct the values */
+	
+	if( width < 0) {
+		x += width; width = -width;
+	}
+	if( height < 0) {
+		y += height; height = -height;
+	}
+
+	if( x < 0) {
+		width += x; x = 0;
+	}
+	if( y < 0) {
+		height += y; y = 0;
+	}
+
+	if( width <= 0 || height <= 0) {
+ 		printk("saa7146: ==> set_box: sanity error!\n");
+		return;
+	}			
+
+	if(x + width > window_width)
+		width -= (x + width) - window_width;
+	if(y + height > window_height)
+		height -= (y + height) - window_height;
+
+	/* Now, set a '1' in the memory, where no video picture should appear */
+	for(ty = y; ty < y+height; ty++) {		
+		for(tx = x; tx < x+width; tx++) {
+			set_pixel(tx, ty, window_width, mem);
+		}
+	}
+}
+
+int emulate_rect_clipping(struct saa7146 *saa, u16 clipcount, int x[], int y[], int w[], int h[], u32 w_width, u32 w_height)
+{
+	int i = 0;
+	
+	/* clear out clipping mem */
+	memset(saa->clipping, 0x0, CLIPPING_MEM_SIZE*sizeof(u32));
+
+	/* go through list of clipping-windows, clear out rectangular-regions in the clipping memory */
+	for(i = 0; i < clipcount; i++) {
+		set_box(x[i], y[i], w[i], h[i], w_width, w_height, saa->clipping);
+	}		
+
+	return 0;
+}
+
+/* ---------------------------------------------*/
+/* rectangle-clipping				*/
+/* ---------------------------------------------*/
+
+#define MIN(x,y)	( ((x) < (y)) ? (x) : (y) )
+#define MAX(x,y)	( ((x) > (y)) ? (x) : (y) )
+
+/* simple double-sort algorithm with duplicate elimination */
+int sort_and_eliminate(u32* values, int* count)
+{
+	int low = 0, high = 0, top = 0, temp = 0;
+	int cur = 0, next = 0;
+	
+	/* sanity checks */
+	if( (0 > *count) || (NULL == values) ) {
+		printk("saa7146: ==> sort_and_eliminate: internal error #1\n");
+		return -EINVAL;
+	}
+	
+	/* bubble sort the first ´count´ items of the array ´values´ */
+	for( top = *count; top > 0; top--) {
+		for( low = 0, high = 1; high < top; low++, high++) {
+			if( values[low] > values[high] ) {
+				temp = values[low];
+				values[low] = values[high];
+				values[high] = temp;
+			}
+		}
+	}
+
+	/* remove duplicate items */
+	for( cur = 0, next = 1; next < *count; next++) {
+		if( values[cur] != values[next])
+			values[++cur] = values[next];
+	}
+	
+	*count = cur + 1;
+	 
+	return 0;
+}
+
+int calculate_clipping_registers_rect(struct saa7146 *saa, int clipcount, int x[], int y[], int w[], int h[], u32 width, u32 height, struct saa7146_video_dma* vdma2, u32* clip_format, u32* arbtr_ctrl)
+{
+	u32 line_list[32];			
+	u32 pixel_list[32];
+	u32 numdwords = 0;
+
+	int i = 0, j = 0;
+	int l = 0, r = 0, t = 0, b = 0;
+	int cnt_line = 0, cnt_pixel = 0;
+
+	dprintk("saa7146: ==> calculate_clipping_registers_clip\n");
+							
+	/* clear out memory */
+	memset(&line_list[0],  0x00, sizeof(u32)*32);
+	memset(&pixel_list[0], 0x00, sizeof(u32)*32);
+	memset(saa->clipping,  0x00, sizeof(u32)*CLIPPING_MEM_SIZE);
+
+	/* fill the line and pixel-lists */
+	for(i = 0; i < clipcount; i++) {
+
+		/* calculate values for l(eft), r(ight), t(op), b(ottom) */
+		l = x[i];
+		r = x[i]+w[i];
+		t = y[i];
+		b = y[i]+h[i];
+
+		/* insert left/right coordinates */
+		pixel_list[ 2*i   ] = MIN(l, width);
+		pixel_list[(2*i)+1] = MIN(r, width);
+		/* insert top/bottom coordinates */
+		line_list[ 2*i   ] = MIN(t, height);
+		line_list[(2*i)+1] = MIN(b, height);
+	}
+
+	/* sort and eliminate lists */
+	cnt_line = cnt_pixel = 2*clipcount;
+	sort_and_eliminate( &pixel_list[0], &cnt_pixel );
+	sort_and_eliminate( &line_list[0], &cnt_line );
+
+	/* calculate the number of used u32s */
+	numdwords = MAX( (cnt_line+1), (cnt_pixel+1))*2; 
+	numdwords = MAX(4, numdwords);
+	numdwords = MIN(64, numdwords);
+
+	/* fill up cliptable */
+	for(i = 0; i < cnt_pixel; i++) {
+		saa->clipping[2*i] |= (pixel_list[i] << 16);
+	}
+	for(i = 0; i < cnt_line; i++) {
+		saa->clipping[(2*i)+1] |= (line_list[i] << 16);
+	}
+
+	/* fill up cliptable with the display infos */
+	for(j = 0; j < clipcount; j++) {
+
+		for(i = 0; i < cnt_pixel; i++) {
+
+			if( x[j] < 0)
+				x[j] = 0;
+
+			if( pixel_list[i] < (x[j] + w[j])) {
+			
+				if ( pixel_list[i] >= x[j] ) {
+					saa->clipping[2*i] |= (1 << j);			
+				}
+			}
+		}
+		for(i = 0; i < cnt_line; i++) {
+
+			if( y[j] < 0)
+				y[j] = 0;
+
+			if( line_list[i] < (y[j] + h[j]) ) {
+
+				if( line_list[i] >= y[j] ) {
+					saa->clipping[(2*i)+1] |= (1 << j);			
+				}
+			}
+		}
+	}
+
+	/* adjust arbitration control register */
+	*arbtr_ctrl &= 0xffff00ff;
+	*arbtr_ctrl |= 0x00001c00;	
+	
+	vdma2->base_even	= virt_to_bus(saa->clipping);
+	vdma2->base_odd		= virt_to_bus(saa->clipping);
+	vdma2->prot_addr	= virt_to_bus(saa->clipping)+((sizeof(u32))*(numdwords));
+	vdma2->base_page	= 0x04;
+	vdma2->pitch		= 0x00;
+	vdma2->num_line_byte	= (0 << 16 | (sizeof(u32))*(numdwords-1) );
+
+	/* set clipping-mode. please note again, that for sizes below 1/2, we only use the
+	   even-field. because of this, we have to specify ´recinterl´ correctly (specs, p. 97)*/
+	*clip_format &= 0xfffffff7;
+
+	if( saa->interlace != 0 && height*4 >= modes_constants[saa->mode].v_calc && height*2 <= modes_constants[saa->mode].v_calc) {
+		*clip_format |= 0x00000000;
+	} else {
+		*clip_format |= 0x00000008;
+	}
+	return 0;
+}
+
+
+/* ---------------------------------------------*/
+/* main function for clipping			*/
+/* ---------------------------------------------*/
+/* arguments:
+	type 	= see ´saa7146.h´
+	width 	= width of the video-window
+	height 	= height of the video-window
+	*mask 	= pointer to mask memory	(only needed for mask-clipping)
+	*clips	= pointer to clip-window-list   (only needed for rect-clipping)
+	clipcount = # of clip-windows		(only needed for rect-clipping)
+*/
+int clip_windows(struct saa7146* saa, u32 type, u32 width, u32 height, u32* mask, u16 clipcount, int x[], int y[], int w[], int h[]) 
+{
+	struct	saa7146_video_dma	vdma2;
+
+	u32 clip_format	= saa7146_read(saa->mem, CLIP_FORMAT_CTRL);
+	u32 arbtr_ctrl	= saa7146_read(saa->mem, PCI_BT_V1);
+
+	hprintk("saa7146: ==> clip_windows\n");
+	
+	/* some sanity checks first */
+	if ( width <= 0 || height <= 0 ) {
+		printk("saa7146: ==> clip_windows: sanity error #1!\n");
+		return -EINVAL;
+	}
+
+	/* check if anything to do here, disable clipping if == 0 */
+	if( clipcount == 0 ) {
+	
+		/* mask out relevant bits (=lower word)*/
+		clip_format &= MASK_W1;
+
+		/* upload clipping-registers*/
+		saa7146_write(saa->mem, CLIP_FORMAT_CTRL,clip_format);
+ 		saa7146_write(saa->mem, MC2, (MASK_05 | MASK_21));
+ 
+ 		/* disable video dma2 */
+		saa7146_write(saa->mem, MC1, (MASK_21));
+
+		return 0;
+	}
+
+	switch(type) {
+		
+		case SAA7146_CLIPPING_MASK_INVERTED:
+		case SAA7146_CLIPPING_MASK:
+		{
+		  printk("mask\n");
+			/* sanity check */
+			if( NULL == mask ) {
+				printk("saa7146: ==> clip_windows: sanity error #1!\n");
+				return -EINVAL;
+			}
+			
+			/* copy the clipping mask to structure */
+			memmove(saa->clipping, mask, CLIPPING_MEM_SIZE*sizeof(u32));
+			/* set clipping registers */
+			calculate_clipping_registers_mask(saa,width,height,&vdma2,&clip_format,&arbtr_ctrl);
+
+			break;
+		}
+
+		case SAA7146_CLIPPING_RECT_INVERTED:
+		case SAA7146_CLIPPING_RECT:
+		{
+			/* see if we have anything to do */
+			if ( 0 == clipcount ) {
+				return 0;	
+			}
+
+			/* sanity check */
+			if( NULL == x || NULL == y || NULL == w || NULL == h ) {
+				printk("saa7146: ==> clip_windows: sanity error #2!\n");
+				return -EINVAL;
+			}
+
+			/* rectangle clipping can only handle 16 overlay windows; if we
+			   have more, we have do emulate the whole thing with mask-clipping */
+			if (1) { //clipcount >  > 16 ) {
+			  //printk("emulate\n");
+				emulate_rect_clipping(saa, clipcount, x,y,w,h, width, height);
+				calculate_clipping_registers_mask(saa,width,height,&vdma2,&clip_format,&arbtr_ctrl);
+				if( SAA7146_CLIPPING_RECT == type )
+					type = SAA7146_CLIPPING_MASK;
+				else
+					type = SAA7146_CLIPPING_MASK_INVERTED;
+				
+			}
+			else {
+				calculate_clipping_registers_rect(saa,clipcount,x,y,w,h,width,height,&vdma2,&clip_format,&arbtr_ctrl);
+			}
+			
+			break;
+		}
+
+		default:
+		{
+			printk("saa7146: ==> clip_windows: internal error #1!\n");
+			return -EINVAL;
+		}
+	
+	}
+
+	/* set clipping format */
+	clip_format &= 0xffff0008;
+	clip_format |= (type << 4);
+
+	saa7146_write(saa->mem, BASE_EVEN2,     vdma2.base_even);
+	saa7146_write(saa->mem, BASE_ODD2,      vdma2.base_odd);
+	saa7146_write(saa->mem, PROT_ADDR2,     vdma2.prot_addr);
+	saa7146_write(saa->mem, BASE_PAGE2,     vdma2.base_page);
+	saa7146_write(saa->mem, PITCH2,		vdma2.pitch);
+	saa7146_write(saa->mem, NUM_LINE_BYTE2,	vdma2.num_line_byte);
+
+	saa7146_write(saa->mem, CLIP_FORMAT_CTRL,clip_format);
+	saa7146_write(saa->mem, PCI_BT_V1, arbtr_ctrl);	
+
+	/* upload clip_control-register, clipping-registers, enable video dma2 */
+	saa7146_write(saa->mem, MC2, (MASK_05 | MASK_21 | MASK_03 | MASK_19));
+	saa7146_write(saa->mem, MC1, (MASK_05 | MASK_21));
+/*
+       	printk("ARBTR_CTRL:     0x%08x\n",saa7146_read(saa->mem, PCI_BT_V1));
+       	printk("CLIP_FORMAT:    0x%08x\n",saa7146_read(saa->mem, CLIP_FORMAT_CTRL));
+        printk("BASE_ODD1:      0x%08x\n",saa7146_read(saa->mem, BASE_ODD1));
+        printk("BASE_EVEN1:     0x%08x\n",saa7146_read(saa->mem, BASE_EVEN1));
+        printk("PROT_ADDR1:     0x%08x\n",saa7146_read(saa->mem, PROT_ADDR1));
+        printk("PITCH1:         0x%08x\n",saa7146_read(saa->mem, PITCH1));
+        printk("BASE_PAGE1:     0x%08x\n",saa7146_read(saa->mem, BASE_PAGE1));
+        printk("NUM_LINE_BYTE1: 0x%08x\n",saa7146_read(saa->mem, NUM_LINE_BYTE1));
+        printk("BASE_ODD2:      0x%08x\n",saa7146_read(saa->mem, BASE_ODD2));
+        printk("BASE_EVEN2:     0x%08x\n",saa7146_read(saa->mem, BASE_EVEN2));
+        printk("PROT_ADDR2:     0x%08x\n",saa7146_read(saa->mem, PROT_ADDR2));
+        printk("PITCH2:         0x%08x\n",saa7146_read(saa->mem, PITCH2));
+        printk("BASE_PAGE2:     0x%08x\n",saa7146_read(saa->mem, BASE_PAGE2));
+        printk("NUM_LINE_BYTE2: 0x%08x\n",saa7146_read(saa->mem, NUM_LINE_BYTE2));
+*/
+	return 0;
+
+}		
+#endif
+
+#ifdef __COMPILE_SAA7146_I2C__
+
+/* ---------------------------------------------*/
+/* i2c-helper functions				*/
+/* ---------------------------------------------*/
+
+/* this functions gets the status from the saa7146 at address 'addr'
+   and returns it */
+u32 i2c_status_check(struct saa7146* saa) 
+{
+	u32 iicsta = 0;
+	
+	iicsta = saa7146_read(saa->mem, I2C_STATUS );
+	hprintk("saa7146: ==> i2c_status_check:0x%08x\n",iicsta);
+
+	return iicsta;
+}
+
+/* this function should be called after an i2c-command has been written. 
+   if we are debugging, it checks, if the busy flags rises and falls correctly
+   and reports a timeout (-1) or the error-bits set like in described in the specs,
+   p.123, table 110 */
+int i2c_busy_rise_and_fall(struct saa7146* saa, int timeout)
+{
+	int i = 0;
+	u32 status = 0;
+		
+	hprintk("saa7146: ==> i2c_busy_rise_and_fall\n");
+
+	/* wait until busy-flag rises */
+	for (i = 5; i > 0; i--) {
+
+		hprintk("saa7146: i2c_busy_rise_and_fall; rise wait %d\n",i);
+
+		status = i2c_status_check(saa);
+
+		/* check busy flag */
+		if ( 0 != (status & SAA7146_I2C_BUSY))
+			break;
+
+		/* see if anything can be done while we're waiting */
+		cond_resched ();
+		mdelay(1);
+	}
+
+	/* we don't check the i-value, since it does not matter
+	   if we missed the rise of the busy flag or the fall or
+	   whatever. we just have to wait some undefined time
+	   after an i2c-command has been written out */	
+	
+	/* wait until busy-flag is inactive or error is reported */
+	for (i = timeout; i > 0; i--) {
+	
+		hprintk("saa7146: i2c_busy_rise_and_fall; fall wait %d\n",i);
+
+		status = i2c_status_check(saa);
+
+		/* check busy flag */
+		if ( 0 == (status & SAA7146_I2C_BUSY))
+			break;
+
+		/* check error flag */
+		if ( 0 != (status & SAA7146_I2C_ERR))
+			break;
+
+		/* see if anything can be done while we're waiting */
+		cond_resched ();
+
+		mdelay(1);
+	}
+	
+	/* did a timeout occur ? */
+	if ( 0 == i ) {
+		hprintk("saa7146: i2c_busy_rise_and_fall: timeout #2\n");
+		return -1;
+	}
+	
+	/* report every error pending */
+	switch( status & 0xfc ) {
+		
+		case SAA7146_I2C_SPERR:
+			hprintk("saa7146: i2c_busy_rise_and_fall: error due to invalid start/stop condition\n");
+			break;
+
+		case SAA7146_I2C_APERR:
+			hprintk("saa7146: i2c_busy_rise_and_fall: error in address phase\n");
+			break;
+
+		case SAA7146_I2C_DTERR:
+			hprintk("saa7146: i2c_busy_rise_and_fall: error in data transmission\n");
+			break;
+
+		case SAA7146_I2C_DRERR:
+			hprintk("saa7146: i2c_busy_rise_and_fall: error when receiving data\n");
+			break;
+
+		case SAA7146_I2C_AL:
+			hprintk("saa7146: i2c_busy_rise_and_fall: error because arbitration lost\n");
+			break;
+	}
+				
+	return status;	
+
+}
+
+/* this functions resets the saa7146 at address 'addr'
+   and returns 0 if everything was fine, otherwise -1 */
+int i2c_reset(struct saa7146* saa)
+{
+	u32 status = 0;
+
+	hprintk("saa7146: ==> i2c_reset\n");
+
+	status = i2c_status_check(saa);
+
+	/* clear data-byte for sure */
+    	saa7146_write(saa->mem, I2C_TRANSFER, 0x00);
+	
+	/* check if any operation is still in progress */
+	if ( 0 != ( status & SAA7146_I2C_BUSY) ) {
+
+		/* Yes, kill ongoing operation */
+		hprintk("saa7146: i2c_reset: busy_state detected\n"); 
+
+		/* set ABORT-OPERATION-bit */
+		saa7146_write(saa->mem, I2C_STATUS, ( SAA7146_I2C_BBR | MASK_07));
+		saa7146_write(saa->mem, MC2, (MASK_00 | MASK_16));
+		mdelay( SAA7146_I2C_DELAY );
+
+		/* clear all error-bits pending; this is needed because p.123, note 1 */
+		saa7146_write(saa->mem, I2C_STATUS, SAA7146_I2C_BBR );
+		saa7146_write(saa->mem, MC2, (MASK_00 | MASK_16));
+		mdelay( SAA7146_I2C_DELAY );
+ 	}
+
+	/* check if any other error is still present */
+	if ( SAA7146_I2C_BBR != (status = i2c_status_check(saa)) ) {
+
+		/* yes, try to kick it */
+		hprintk("saa7146: i2c_reset: error_state detected, status:0x%08x\n",status);
+
+		/* clear all error-bits pending */
+		saa7146_write(saa->mem, I2C_STATUS, SAA7146_I2C_BBR );
+		saa7146_write(saa->mem, MC2, (MASK_00 | MASK_16));
+		mdelay( SAA7146_I2C_DELAY );
+ 		/* the data sheet says it might be necessary to clear the status
+		   twice after an abort */
+		saa7146_write(saa->mem, I2C_STATUS, SAA7146_I2C_BBR );
+		saa7146_write(saa->mem, MC2, (MASK_00 | MASK_16));
+	}
+
+	/* if any error is still present, a fatal error has occured ... */
+	if ( SAA7146_I2C_BBR != (status = i2c_status_check(saa)) ) {
+		hprintk("saa7146: i2c_reset: fatal error, status:0x%08x\n",status);
+		return -1;
+	}
+
+	return 0;
+}
+
+/* this functions writes out the data-bytes at 'data' to the saa7146
+   at address 'addr' regarding the 'timeout' and 'retries' values;
+   it returns 0 if ok, -1 if the transfer failed, -2 if the transfer
+   failed badly (e.g. address error) */
+int i2c_write_out(struct saa7146* saa, u32* data, int timeout)
+{
+	int status = 0;
+		
+	hprintk("saa7146: ==> writeout: 0x%08x (before) (to:%d)\n",*data,timeout);
+	
+	/* write out i2c-command */
+	saa7146_write(saa->mem, I2C_TRANSFER, *data);
+   	saa7146_write(saa->mem, I2C_STATUS, SAA7146_I2C_BBR);
+	saa7146_write(saa->mem, MC2, (MASK_00 | MASK_16));
+
+	/* after writing out an i2c-command we have to wait for a while;
+	   because we do not know, how long we have to wait, we simply look
+	   what the busy-flag is doing, before doing something else */
+	 
+	/* reason: while fiddling around with the i2c-routines, I noticed
+	   that after writing out an i2c-command, one may not read out the
+	   status immediately after that. you *must* wait some time, before
+	   even the busy-flag gets set */
+	   
+	status = i2c_busy_rise_and_fall(saa,timeout);
+
+	if ( -1 == status ) {
+		hprintk("saa7146: i2c_write_out; timeout\n");
+		return -ETIMEDOUT;
+	}
+
+	/* we only handle address-errors here */
+	if ( 0 != (status & SAA7146_I2C_APERR)) {
+		hprintk("saa7146: i2c_write_out; error in address phase\n");
+		return -EREMOTEIO;
+	}
+
+	/* check for some other mysterious error; we don't handle this here */
+	if ( 0 != ( status & 0xff)) {
+		hprintk("saa7146: i2c_write_out: some error has occured\n");
+        	return -EIO;
+  	}
+	
+	/* read back data, just in case we were reading ... */
+	*data = saa7146_read(saa->mem, I2C_TRANSFER);
+
+	hprintk("saa7146: writeout: 0x%08x (after)\n",*data);
+
+	return 0;
+}
+
+int clean_up(struct i2c_msg m[], int num, u32 *op)
+{
+	u16 i, j;
+	u16 op_count = 0;
+
+	/* loop through all messages */
+	for(i = 0; i < num; i++) {
+		op_count++;
+		/* loop throgh all bytes of message i */
+		for(j = 0; j < m[i].len; j++) {
+			/* write back all bytes that could have been read */
+			m[i].buf[j] = (op[op_count/3] >> ((3-(op_count%3))*8));
+			op_count++;
+		}
+	}
+	
+	return 0;
+}
+
+int prepare(struct i2c_msg m[], int num, u32 *op)
+{
+	u16 h1, h2;
+	u16 i, j, addr;
+	u16 mem = 0, op_count = 0;
+
+//for (i=0; i<num; i++) { printk ("\n%02x (%s): ", m[i].addr, m[i].flags & I2C_M_RD ? "R" : "W"); for (j=0; j<m[i].len; j++) { m[i].buf[j] &= 0xff; printk (" %02x ", (u8) m[i].buf[j]); } } printk ("\n");
+	/* determine size of needed memory */
+	for(i = 0; i < num; i++)
+		mem += m[i].len + 1;
+
+	/* we need one u32 for three bytes to be send plus
+	   one byte to address the device */
+	mem = 1 + ((mem-1) / 3);
+
+	if ( mem > I2C_MEM_SIZE ) {
+		hprintk("saa7146: prepare: i2c-message to big\n");
+		return -1;
+	}
+
+	/* be careful: clear out the i2c-mem first */
+	memset(op,0,sizeof(u32)*mem);
+
+	for(i = 0; i < num; i++) {
+		/* insert the address of the i2c-slave.
+		 * note: we get 7-bit-i2c-addresses,
+		 * so we have to perform a translation
+		 */
+		addr = (m[i].addr << 1) | ((m[i].flags & I2C_M_RD) ? 1 : 0);
+		h1 = op_count/3; h2 = op_count%3;
+		op[h1] |= ((u8)addr << ((3-h2)*8));
+		op[h1] |= (SAA7146_I2C_START << ((3-h2)*2));
+		op_count++;
+		/* loop through all bytes of message i */
+		for(j = 0; j < m[i].len; j++) {
+			/* insert the data bytes */
+			h1 = op_count/3; h2 = op_count%3;
+			op[h1] |= ((u8)m[i].buf[j] << ((3-h2)*8));
+			op[h1] |= (SAA7146_I2C_CONT << ((3-h2)*2));
+			op_count++;
+		}
+	}
+
+	/* have a look at the last byte inserted:
+	 * if it was: ...CONT change it to ...STOP
+	 */
+	h1 = (op_count-1)/3; h2 = (op_count-1)%3;
+	if ( SAA7146_I2C_CONT == (0x3 & ((op[h1]) >> ((3-h2)*2))) ) {
+		op[h1] &= ~(0x2 << ((3-h2)*2));
+		op[h1] |= (SAA7146_I2C_STOP << ((3-h2)*2));
+	}
+
+	return mem;
+}
+#endif
+
+
+#ifdef __COMPILE_SAA7146_DEBI__
+
+/* functions for accessing the debi-port. note: we currently don't support 
+ * page-table-transfers.
+ */
+
+#define MY_DEBI_TIMEOUT_MS 5
+
+int	debi_transfer(struct saa7146* saa, struct saa7146_debi_transfer* dt)
+{
+	u32	debi_config = 0, debi_command = 0, debi_page = 0, debi_ad = 0;
+	u32	timeout = MY_DEBI_TIMEOUT_MS;
+
+	/* sanity checks */
+	if(dt->direction > 1 || dt->timeout > 15 || dt->swap > 3 || dt->slave16 > 2 || dt->intel > 1 || dt->increment > 1 || dt->tien > 1 )
+		return -EINVAL;
+
+	debi_page	= 0;
+	/* keep bits 31,30,28 clear */
+	debi_config	= (dt->timeout << 22) | (dt->swap << 20) | (dt->slave16 << 19) | (dt->increment << 18) | (dt->intel << 17) | (dt->tien << 16);
+	debi_command	= (dt->num_bytes << 17) | (dt->direction << 16) | (dt->address << 0);
+	debi_ad		= dt->mem;
+
+	saa7146_write(saa->mem, DEBI_PAGE,	debi_page);	
+	saa7146_write(saa->mem, DEBI_CONFIG,	debi_config);	
+	saa7146_write(saa->mem, DEBI_COMMAND,	debi_command);	
+	saa7146_write(saa->mem, DEBI_AD,	debi_ad);	
+
+	/* upload debi-registers */
+	saa7146_write(saa->mem, MC2, (MASK_01|MASK_17));
+
+	/* wait for DEBI upload to complete */
+	while (! (saa7146_read(saa->mem, MC2) & 0x2));
+
+	while( --timeout ) {
+		/* check, if DEBI still active */
+		u32 psr = saa7146_read(saa->mem, PSR);
+		if (0 !=  (psr & SPCI_DEBI_S)) {
+			/* check, if error occured */
+/*			if ( 0 != (saa7146_read(saa->mem, SSR) & (MASK_23|MASK_22))) { */
+			if ( 0 != (saa7146_read(saa->mem, SSR) & (MASK_22))) {
+				/* clear error status and indicate error */
+				saa7146_write(saa->mem, ISR, SPCI_DEBI_E);
+				return -1;
+			}
+		 }
+		else {
+			/* Clear status bit */
+			saa7146_write(saa->mem, ISR, SPCI_DEBI_S);
+			break;
+		}
+		/* I don´t know how we should actually wait for the debi to have finished.
+		   we simply wait 1ms here and then check in a loop for max. MY_DEBI_TIMEOUT_MS */		
+		mdelay(1);
+	}
+
+	/* check for timeout */
+	if( 0 == timeout ) {
+		return -1;
+	}
+
+	/* read back data if we did immediate read-transfer */
+	if(dt->num_bytes <= 4 && dt->direction == 1) {
+		dt->mem = saa7146_read(saa->mem, DEBI_AD);
+		switch(dt->num_bytes) {
+			case 1:
+			 dt->mem &= 0x000000ff;
+			break;
+			case 2:
+			 dt->mem &= 0x0000ffff;
+			break;
+			case 3:
+			 dt->mem &= 0x00ffffff;
+			break;
+		}		
+	}
+	
+	return 0;
+}
+#endif
+
+#ifdef __COMPILE_SAA7146_STUFF__
+/* ---------------------------------------------*/
+/* helper-function: set gpio-pins		*/
+/* ---------------------------------------------*/
+void	gpio_set(struct saa7146* saa, u8 pin, u8 data)
+{
+	u32 value = 0;
+
+	/* sanity check */
+	if(pin > 3)
+		return;
+
+	/* read old register contents */
+	value = saa7146_read(saa->mem, GPIO_CTRL );
+	
+	value &= ~(0xff << (8*pin));
+	value |= (data << (8*pin));
+
+	saa7146_write(saa->mem, GPIO_CTRL, value);
+}
+
+void select_input(struct saa7146* saa, int p)
+{
+	u32 hps_ctrl = 0;
+
+	/* sanity check */
+	if( p < 0 || p > 1 )
+		return;
+
+	/* read old state */
+	hps_ctrl = saa7146_read(saa->mem, HPS_CTRL);
+
+	/* mask out relevant bits */
+	hps_ctrl &= ~( MASK_31 | MASK_30 | MASK_28 );
+
+	/* set bits for input b */
+	if( 1 == p ) {
+		hps_ctrl |= ( (1 << 30) | (1 << 28) );
+	}
+
+	/* write back & upload register */
+	saa7146_write(saa->mem, HPS_CTRL, hps_ctrl);
+	saa7146_write(saa->mem, MC2, (MASK_05 | MASK_21));
+} 
+
+#endif
+
diff -Nru a/drivers/media/dvb/av7110/saa7146_core.c b/drivers/media/dvb/av7110/saa7146_core.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/saa7146_core.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,968 @@
+/*
+    saa7146_core.c - core-functions + i2c driver for the saa7146 by
+    Philips Semiconductors.
+    
+    Copyright (C) 1998,1999 Michael Hunold <michael@mihu.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <linux/module.h>	/* for module-version */
+#include <linux/delay.h>	/* for delay-stuff */
+#include <linux/slab.h>		/* for kmalloc/kfree */
+#include <linux/pci.h>		/* for pci-config-stuff, vendor ids etc. */
+#include <linux/wrapper.h>	/* for mem_map_reserve */
+#include <linux/init.h>
+#include <asm/io.h>		/* for accessing the pci-device */
+#include <linux/vmalloc.h>	/* for module-version */
+
+#include "saa7146_defs.h"
+#include "saa7146_core.h"
+#include "saa7146_v4l.h"
+#include "av7110.h"
+#include "../dvb-core/compat.h"
+#include "../dvb-core/dvb_i2c.h"
+
+/* insmod parameter: here you can specify the number of video-buffers
+   to be allocated. for simple capturing 2 buffers (double-buffering)
+   should suffice. but if you plan to do 25fps grabbing, you should
+   set this to 4(=maximum), in order to be able to catch up from
+   temporarily delays */
+static int buffers = 2;
+
+/* insmod parameter: some programs (e.g. ´vic´) do not allow to
+   specify the used video-mode, so you have to tell this to the
+   modules by hand, 0 = PAL, 1 = NTSC  */
+static int mode = 0;
+
+/* debug levels: 0 -- no debugging outputs
+		 1 -- prints out entering (and exiting if useful) of functions
+		 2 -- prints out very, very detailed informations of what is going on
+		 3 -- both of the above */
+int saa7146_debug = 0;	/* insmod parameter */
+
+#define dprintk		if (saa7146_debug & 1) printk
+#define hprintk		if (saa7146_debug & 2) printk
+
+/* ---------------------------------------------*/
+/* memory functions - taken from bttv.c		*/
+/* ---------------------------------------------*/
+
+static inline unsigned long kvirt_to_pa(unsigned long adr) 
+{
+	unsigned long kva;
+
+	kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
+	kva |= adr & (PAGE_SIZE-1); /* restore the offset */
+
+	return __pa(kva);
+}
+
+
+static LIST_HEAD(saa7146_list);
+
+static int saa7146_extension_count = 0;
+static struct saa7146_extension* saa7146_ext[SAA7146_MAX_EXTENSIONS];
+
+#define SAA7146_I2C_TIMEOUT  100   /* in ms */
+#define SAA7146_I2C_RETRIES  6
+
+static u32 SAA7146_I2C_BBR = SAA7146_I2C_BUS_BIT_RATE_3200;
+
+#define	__COMPILE_SAA7146_I2C__
+#define	__COMPILE_SAA7146_DEBI__
+#include "saa7146.c"
+#undef	__COMPILE_SAA7146_I2C__
+
+/* ---------------------------------------------*/
+/* memory functions designed for saa7146	*/
+/* ---------------------------------------------*/
+
+/* rvmalloc allocates the memory and builds up
+   the page-tables for ´quant´-number of buffers */
+static void* rvmalloc(int quant, u32* pt[])
+{
+	void* mem;
+
+	unsigned long adr = 0;
+	unsigned long count = 0;
+
+	u32* ptp = 0;
+	int i = 0, j = 0;
+
+	dprintk(KERN_ERR "saa7146: rvmalloc called, quant:%d\n",quant);
+
+	if(!quant) 
+		return NULL;
+
+	/* get grabbing memory */
+	mem = vmalloc_32(quant*GRABBING_MEM_SIZE); 
+
+	if(!mem) 
+		return NULL;
+
+	dprintk(KERN_ERR "saa7146: alloc page tables\n");
+
+	/* alloc one page for a page-table for ´quant´ buffers */
+	for(i = 0; i < quant; i++) {
+		pt[i] = (u32*)kmalloc(PAGE_SIZE,GFP_KERNEL);
+
+		/* error: memory could not be allocated */
+		if(!pt[i]) {
+			dprintk(KERN_ERR "saa7146: failed, free tables\n");
+			for(j = (i-1); j >= 0; j--) 
+				kfree(pt[j]);
+			dprintk(KERN_ERR "saa7146: free buffer memory\n");
+			vfree(mem);
+			dprintk(KERN_ERR "saa7146: return 0 address for buffer\n");
+			return NULL;
+		}
+		memset(pt[i], 0x00, PAGE_SIZE);
+	}
+
+	dprintk(KERN_ERR "saa7146: clear RAM\n");
+
+	/* clear the ram out, no junk to the user
+	   note: 0x7f gives a nice grey field
+	   in RGB and YUV as well */
+	memset(mem, 0x7f, quant*GRABBING_MEM_SIZE); 
+
+	dprintk(KERN_ERR "saa7146: build page tables\n");
+	adr = (unsigned long)mem;
+	/* walk through the grabbing-memory and build up the page-tables */
+	for(i = 0; i < quant; i++) {
+
+	        for (count=0; count<GRABBING_MEM_SIZE; count+=PAGE_SIZE) 
+		        mem_map_reserve(virt_to_page(__va(kvirt_to_pa(adr+count))));
+		/* separate loop for SAA MMU, PAGE_SIZE can be !=4096 */
+		ptp = pt[i];
+		for (count=0; count<GRABBING_MEM_SIZE; count+=4096, adr+=4096)
+ 	                *(ptp++) = cpu_to_le32(kvirt_to_pa(adr));
+	}
+	dprintk(KERN_ERR "saa7146: page tables built\n");
+	return mem;
+}
+
+static void rvfree(void* mem, int quant, u32* pt[])
+{
+        unsigned long adr, page;
+	unsigned long size = 0;
+
+	int i = 0;
+
+	dprintk(KERN_ERR "saa7146: rvfree called\n");
+
+	if (!quant) 
+		return;
+	
+	if (mem) {
+		adr = (unsigned long)mem;
+		size = quant * GRABBING_MEM_SIZE;
+		
+		while (size > 0) {
+			page = kvirt_to_pa(adr);
+			mem_map_unreserve(virt_to_page(__va(page)));
+			adr	+= PAGE_SIZE;
+			size	-= PAGE_SIZE;
+		}
+		
+		/* release the grabbing memory */
+		vfree(mem);
+	}
+	/* free the page tables */
+	for(i = 0; i < quant; i++) {
+		kfree(pt[i]);
+	}
+}
+
+
+/* ---------------------------------------------*/
+/* i2c-functions				*/
+/* ---------------------------------------------*/
+
+static
+int do_master_xfer (struct dvb_i2c_bus *i2c, struct i2c_msg msgs[], int num)
+{
+	struct saa7146 *a = i2c->data;
+	int result, count;
+	int i = 0;
+	
+	dprintk(KERN_ERR "saa7146_core.o: master_xfer called, num:%d\n",num);
+
+	/* prepare the message(s), get number of u32s to transfer */
+	count = prepare(msgs, num, a->i2c);
+	if ( 0 > count ) {
+		hprintk(KERN_ERR "saa7146_core.o: master_xfer: could not prepare i2c-message\n");
+		return -EIO;
+	}
+
+	/* reset the i2c-device if necessary */
+	result = i2c_reset( a );
+	if ( 0 > result ) {
+		hprintk(KERN_ERR "saa7146_core.o: master_xfer: could not reset i2c-bus\n");
+		return result;
+	}	
+
+	for(i = 0; i < count; i++) {
+		/* see how many u32 have to be transferred;
+		 * if there is only 1,
+		 * we do not start the whole rps1-engine...
+		 */
+
+		result = i2c_write_out( a, &a->i2c[i],
+					SAA7146_I2C_TIMEOUT );
+
+		if ( 0 != result) {
+			/* if address-error occured, don't retry */
+			if ( result == -EREMOTEIO )
+			{
+				hprintk(KERN_ERR "saa7146_core.o: master_xfer: error in address phase\n");
+				return result;
+			}
+			hprintk(KERN_ERR "saa7146_core.o: master_xfer: error transferring, trying again\n");
+			break;
+		}
+	}
+
+	/* see if an error occured & the last retry failed */
+	if (0 != result) {
+		hprintk(KERN_ERR "saa7146_core.o: master_xfer: could not transfer i2c-message\n");
+		return -EIO;
+	}
+
+	/* if any things had to be read, get the results */
+	result = clean_up(msgs, num, a->i2c);
+	if ( 0 > result ) {
+		hprintk(KERN_ERR "saa7146_core.o: master_xfer: could not cleanup\n");
+		return -EIO;
+	}
+
+	/* return the number of delivered messages */
+	return num;
+}
+
+
+
+static
+int master_xfer (struct dvb_i2c_bus *i2c, struct i2c_msg msgs[], int num)
+{
+	int retries = SAA7146_I2C_RETRIES;
+	int ret;
+
+	do {
+		ret = do_master_xfer (i2c, msgs, num);
+	} while (ret != num && retries--);
+
+	return ret;
+}
+
+
+/* registering functions to load algorithms at runtime */
+int i2c_saa7146_add_bus (struct saa7146 *saa)
+{
+	/* enable i2c-port pins */
+	saa7146_write (saa->mem, MC1, (MASK_08 | MASK_24));
+
+	sprintf(saa->name, "saa7146(%d)", saa->dvb_adapter->num);	
+
+	saa->i2c_bus = dvb_register_i2c_bus (master_xfer, saa,
+					     saa->dvb_adapter, 0);
+	if (!saa->i2c_bus)
+		return -ENOMEM;
+
+	return 0;
+}
+
+
+void i2c_saa7146_del_bus (struct saa7146 *saa)
+{
+	dvb_unregister_i2c_bus (master_xfer,
+				saa->i2c_bus->adapter, saa->i2c_bus->id);
+
+	dvb_unregister_adapter (saa->dvb_adapter);
+}
+
+/* ---------------------------------------------*/
+/* debug-helper function: dump-registers	*/
+/* ---------------------------------------------*/
+
+void	dump_registers(unsigned char* mem) {	
+	
+	u16 j = 0;
+	
+	for( j = 0x0; j < 0x1fe; j+=0x4 ) {
+	printk("0x%03x: 0x%08x\n",j,saa7146_read(mem,j));
+	}
+
+}
+
+/* -----------------------------------------------------*/
+/* dispatcher-function for handling external commands	*/
+/* -----------------------------------------------------*/
+
+static int saa7146_core_command (struct dvb_i2c_bus *i2c, unsigned int cmd, void *arg)
+{
+	int i = 0, result = -ENOIOCTLCMD;
+	struct saa7146* saa = i2c->data;
+
+	dprintk("saa7146_core.o: ==> saa7146_core_command\n");
+
+	if( NULL == saa)
+		return -EINVAL;
+
+	/* first let the extensions handle the command */
+	for (i = 0; i < SAA7146_MAX_EXTENSIONS; i++) {
+		if (NULL != saa7146_ext[i]) {
+			if( -ENOIOCTLCMD != (result = saa7146_ext[i]->command(saa, saa->data[i], cmd, arg))) {
+				break;
+			}
+		}
+	}
+
+	/* if command has not been handled by an extension, handle it now */
+	if( result == -ENOIOCTLCMD ) {
+		
+		switch(cmd) {
+	        case SAA7146_DUMP_REGISTERS:
+		{
+			dump_registers(saa->mem);
+                        break;
+		}
+		case SAA7146_SET_DD1:
+		{
+			u32 *i = arg;
+
+			dprintk(KERN_ERR "saa7146_core.o: SAA7146_SET_DD1 to 0x%08x\n",*i);
+
+			/* set dd1 port register */
+			saa7146_write(saa->mem, DD1_INIT, *i);
+
+			/* write out init-values */
+			saa7146_write(saa->mem,MC2, (MASK_09 | MASK_10 | MASK_26 | MASK_26));
+
+			break;
+		}
+		case SAA7146_DO_MMAP:
+		{
+			struct vm_area_struct *vma = arg;
+			unsigned long size = vma->vm_end - vma->vm_start;
+			unsigned long start = vma->vm_start;
+			unsigned long page,pos;
+
+			dprintk(KERN_ERR "saa7146_core.o: SAA7146_DO_MMAP.\n");
+			
+			if (size > saa->buffers * GRABBING_MEM_SIZE)
+			        return -EINVAL;
+
+                        if ( NULL == saa->grabbing )
+                                return -EINVAL;
+
+			pos=(unsigned long)saa->grabbing;
+
+			while (size > 0) 
+			{
+			        page = kvirt_to_pa(pos);
+				if (remap_page_range(vma, start, page,
+						     PAGE_SIZE, PAGE_SHARED))
+					return -EAGAIN;
+				start	+= PAGE_SIZE;
+				pos	+= PAGE_SIZE;
+				size	-= PAGE_SIZE;    
+			}
+				
+			break;
+		}
+		case SAA7146_DEBI_TRANSFER: {
+		
+			struct saa7146_debi_transfer *dt = arg;
+
+			printk("saa7146_core.o: SAA7146_DEBI_TRANSFER\n");
+			printk("saa7146_core.o: timeout:%d, swap:%d, slave16:%d, increment:%d, intel:%d, tien:%d\n", dt->timeout, dt->swap, dt->slave16, dt->increment, dt->intel, dt->tien);
+			printk("saa7146_core.o: address:0x%04x, num_bytes:%d, direction:%d, mem:0x%08x\n",dt->address,dt->address,dt->direction,dt->mem);						
+
+			debi_transfer(saa, dt);
+			break;
+		}
+		
+		default: {
+			return -ENOIOCTLCMD;
+		}
+		}
+	}
+	
+	return 0;
+}
+
+/* -----------------------------------------------------*/
+/* dispatcher-function for handling irq-events		*/
+/* -----------------------------------------------------*/
+
+/* irq-handler function */
+static void saa7146_irq(int irq, void *dev_id, struct pt_regs * regs)
+{
+	struct saa7146 *saa = (struct saa7146 *)dev_id;
+	u32 isr = 0;
+	int i;
+	int count = 0;
+
+	/* process all interrupts */
+	while (1) {
+
+		/* read out the primary status register */
+		isr = saa7146_read(saa->mem, ISR);
+		/* clear all IRQs */
+		saa7146_write(saa->mem, ISR, isr);
+	
+		/* is anything to do? */
+		if ( 0 == isr )
+			return;
+
+		dprintk("%s: irq-call: isr:0x%08x\n",saa->name,isr);
+		
+		/* first let the extensions handle the interrupt */
+		for (i = 0; i < SAA7146_MAX_EXTENSIONS; i++) 
+			if (saa7146_ext[i] && 
+			    (isr&saa7146_ext[i]->handles_irqs)) {
+			  saa7146_ext[i]->irq_handler(saa, isr, saa->data[i]);
+			  //saa7146_write(saa->mem, ISR, saa7146_ext[i]->handles_irqs);
+			}
+		
+		//printk(KERN_ERR "%s: unhandled interrupt: 0x%08x\n", saa->name, isr);
+		
+		/* see if we are in a hard interrupt loop */
+		++count;
+		if (count > 10)
+			printk (KERN_WARNING "%s: irq loop %d\n", saa->name, count);
+		if (count > 20) {
+			saa7146_write(saa->mem, IER, 0x00000000);
+			printk(KERN_ERR "%s: IRQ lockup, cleared int mask\n", saa->name);
+			break;
+		}
+	}
+}
+
+/* -----------------------------------------------------
+   functions for finding any saa7146s in the system,
+   inserting/removing module for kernel, etc.
+   -----------------------------------------------------*/
+
+int configure_saa7146 (struct saa7146 *saa)
+{
+	u32 rev = 0;
+	int result = 0;
+
+	hprintk("saa7146_core.o: ==> configure_saa7146\n");
+
+	/* check module-parameters for sanity */
+
+	/* check if wanted number of video-buffers is valid, otherwise fix it */
+	//if (buffers < 2)
+	//	buffers = 2;
+
+	if ( buffers > SAA7146_MAX_BUF )
+		buffers = SAA7146_MAX_BUF;
+
+	/* check if mode is supported */
+	switch( mode ) {
+		/* 0 = pal, 1 = ntsc */
+		case 0:
+		case 1:
+		{
+			break;
+		}
+		/* default to pal */
+		default:
+		{
+			mode = 0;
+			break;
+		}
+	}
+
+	/* get chip-revision; this is needed to enable bug-fixes */
+	if( 0 > pci_read_config_dword(saa->device, 0x08, &rev)) {
+		printk (KERN_ERR 
+			"saa7146_core.o: cannot read from pci-device!\n");
+		return -1;
+	}
+
+	saa->revision = (rev & 0xf);
+
+	/* remap the memory from virtual to physical adress */
+	saa->mem = ioremap ((saa->device->resource[0].start)
+			    &PCI_BASE_ADDRESS_MEM_MASK, 0x1000);
+
+	if ( !saa->mem ) {
+	    	printk(KERN_ERR "saa7146_core.o: cannot map pci-address!\n");
+		return -EFAULT;
+	}
+	
+	/* get clipping memory */	
+	saa->clipping = (u32*) kmalloc (CLIPPING_MEM_SIZE*sizeof(u32),GFP_KERNEL);
+
+	if ( !saa->clipping ) {
+	    	printk(KERN_ERR "saa7146_core.o: not enough kernel-memory for clipping!\n");
+		return -ENOMEM;
+	}
+
+	memset(saa->clipping, 0x0, CLIPPING_MEM_SIZE*sizeof(u32));
+
+	/* get i2c memory */	
+	saa->i2c = (u32*) kmalloc (I2C_MEM_SIZE*sizeof(u32),GFP_KERNEL); /*64*/
+
+	if ( !saa->i2c ) {
+	    	printk(KERN_ERR "saa7146_core.o: not enough kernel-memory for i2c!\n");
+		kfree(saa->clipping);
+		return -ENOMEM;
+	}
+
+	memset(saa->i2c, 0x0, I2C_MEM_SIZE*sizeof(u32));
+	
+	/* get grabbing memory */
+	saa->grabbing = (u32*) rvmalloc (buffers, &saa->page_table[0]);
+
+	if ( !saa->grabbing ) {
+	    	printk(KERN_ERR "saa7146_core.o: not enough kernel-memory for grabbing_mem!\n");
+		kfree(saa->i2c);
+		kfree(saa->clipping);
+		return -ENOMEM;
+	}
+
+	/* get rps0 memory */
+	saa->rps0 = (u32*) kmalloc (RPS_MEM_SIZE*sizeof(u32),GFP_KERNEL);
+
+	if ( !saa->rps0 ) {
+	    	printk(KERN_ERR "saa7146_core.o: not enough kernel-memory for rps0_mem!\n");
+		kfree(saa->i2c);
+		kfree(saa->clipping);
+		rvfree(saa->grabbing, buffers, &saa->page_table[0]);
+		return -ENOMEM;
+	}
+
+	memset(saa->rps0, 0x0, RPS_MEM_SIZE*sizeof(u32));
+
+	/* get rps1 memory */
+	saa->rps1 = (u32*) kmalloc (RPS_MEM_SIZE*sizeof(u32),GFP_KERNEL);
+	if ( !saa->rps1 ) {
+	    	printk(KERN_ERR "saa7146_core.o: not enough kernel-memory for rps1_mem!\n");
+		kfree(saa->rps0);
+		kfree(saa->i2c);
+		kfree(saa->clipping);
+		rvfree(saa->grabbing, buffers, &saa->page_table[0]);
+		return -1;
+	}
+
+	memset(saa->rps1, 0x0, RPS_MEM_SIZE*sizeof(u32));
+
+	/* get debi memory (32kB) */
+	saa->debi = (u32*) kmalloc (8192*sizeof(u32),GFP_KERNEL);
+
+	if ( !saa->debi ) {
+	    	printk(KERN_ERR "saa7146_core.o: not enough kernel-memory for debi_mem!\n");
+		kfree(saa->rps1);
+		kfree(saa->rps0);
+		kfree(saa->i2c);
+		kfree(saa->clipping);
+		rvfree(saa->grabbing, buffers, &saa->page_table[0]);
+		return -1;
+	}
+
+	memset(saa->debi, 0x0, 8192*sizeof(u32));
+
+
+	/* clear out memory for grabbing information */
+	memset(&saa->grab_width[0],  0x0, sizeof(int)*SAA7146_MAX_BUF);
+	memset(&saa->grab_height[0], 0x0, sizeof(int)*SAA7146_MAX_BUF);
+	memset(&saa->grab_format[0], 0x0, sizeof(int)*SAA7146_MAX_BUF);
+	memset(&saa->grab_port[0], 0x0, sizeof(int)*SAA7146_MAX_BUF);
+
+	/* init the frame-status array */
+	memset(&saa->frame_stat[0], GBUFFER_UNUSED, sizeof(int)*SAA7146_MAX_BUF);
+	
+	/* clear out all wait queues */
+	init_waitqueue_head(&saa->rps0_wq);
+	init_waitqueue_head(&saa->rps1_wq);
+	
+
+    	/* request an interrupt for the saa7146 */
+	result = request_irq (saa->device->irq, saa7146_irq,
+			      SA_SHIRQ | SA_INTERRUPT, saa->name, (void *) saa);
+
+	switch(result) {
+		case -EINVAL:
+		{
+			printk(KERN_ERR "saa7146_core.o: Bad irq number or handler\n");
+			return -EINVAL;
+		}
+		case -EBUSY:
+		{
+			printk(KERN_ERR "saa7146_core.o: IRQ %d busy, change your PnP config in BIOS\n", saa->device->irq);
+			return -EBUSY;
+		}
+		case 0:
+		{
+			break;
+		}
+		default:
+		{
+			return result;
+		}
+	}
+	
+	/* print status message */
+    	printk(KERN_ERR "saa7146_core.o: %s: bus:%d, rev:%d, mem:0x%08x.\n", saa->name, saa->device->bus->number, saa->revision, (unsigned int) saa->mem);
+
+	/* enable bus-mastering */
+ 	pci_set_master( saa->device );
+
+	/* disable everything on the saa7146, perform a software-reset */
+	saa7146_write(saa->mem, MC1, 0xbfff0000);
+	mdelay(2);
+#if 0
+	{
+		int j;
+
+		/* clear all registers */
+		for( j = 0x0; j < 0xfc; j+=0x4 ) {
+			saa7146_write(saa->mem,j, 0x0000000);
+		}
+		for( j = 0x104; j < 0x1fc; j+=0x4 ) {
+			saa7146_write(saa->mem,j, 0x0000000); 
+		}
+	}
+#endif 
+	/* clear out any rps-signals pending */
+	saa7146_write(saa->mem, MC2, 0xf8000000);
+
+	/* enable video-port-pins*/
+	saa7146_write(saa->mem,MC1, (MASK_10 | MASK_26));
+
+	/* disable all interrupt-conditions, only enable RPS interrupts */
+	saa7146_write(saa->mem, ISR, 0xffffffff);
+	saa7146_write(saa->mem, IER, (MASK_27 | MASK_28));
+/*
+	printk("main: 0x114: 0x%08x\n",saa7146_read(saa->mem, 0x114));
+	printk("main: 0x0e4: 0x%08x\n",saa7146_read(saa->mem, 0x0e4));
+	printk("PSR:   0x%08x\n",saa7146_read(saa->mem, PSR));
+	printk("SSR:   0x%08x\n",saa7146_read(saa->mem, SSR));
+	printk("IER:   0x%08x\n",saa7146_read(saa->mem, IER));
+	printk("ISR:   0x%08x\n",saa7146_read(saa->mem, ISR));
+*/
+
+	saa7146_write(saa->mem,PCI_BT_V1, 0x1c00101f);
+	saa7146_write(saa->mem,BCS_CTRL, 0x80400040);
+
+	/* set dd1 stream a & b */
+      	saa7146_write(saa->mem, DD1_STREAM_B, 0x00000000);
+	saa7146_write(saa->mem, DD1_INIT, 0x02000000);
+	saa7146_write(saa->mem, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
+
+	saa7146_write(saa->mem, MC2, 0x077c077c);
+
+	/* the Siemens DVB needs this if you want to have the i2c chips
+           get recognized before the main driver is loaded 
+	*/
+        saa7146_write(saa->mem, GPIO_CTRL, 0x500000);
+
+	saa->command = &saa7146_core_command;
+	saa->buffers = buffers;
+	saa->mode = mode;
+	saa->interlace = 1;
+
+	i2c_saa7146_add_bus (saa);
+
+        saa7146_write(saa->mem, GPIO_CTRL, 0x000000);
+	return 0;
+}
+
+
+void saa7146_foreach (void (*callback) (struct saa7146* saa, void *data),
+		      void *data)
+{
+	struct list_head *entry;
+
+	list_for_each (entry, &saa7146_list) {
+		struct saa7146* saa;
+
+		saa = list_entry (entry, struct saa7146, list_head);
+		callback (saa, data);
+	}
+}
+
+
+static
+void saa7146_attach_extension (struct saa7146* saa, void *data)
+{
+	int ext_id = (int) data;
+	saa7146_ext[ext_id]->attach (saa, &saa->data[ext_id]);
+}
+
+
+static
+void saa7146_detach_extension (struct saa7146* saa, void *data)
+{
+	int ext_id = (int) data;
+	saa7146_ext[ext_id]->detach (saa, &saa->data[ext_id]);
+}
+
+
+int saa7146_add_extension(struct saa7146_extension* ext)
+{
+	int ext_id = 0;
+
+	for (ext_id = 0; ext_id < SAA7146_MAX_EXTENSIONS; ext_id++) {
+		if (NULL == saa7146_ext[ext_id])
+			break;
+		if (SAA7146_MAX_EXTENSIONS == ext_id) {
+			printk(KERN_WARNING "saa7146.o: attach_extension(%s) - "
+			       "enlarge SAA7146_MAX_EXTENSIONS.\n",ext->name);
+			return -ENOMEM;
+		}
+	}
+
+	saa7146_ext[ext_id] = ext;
+	saa7146_extension_count++;
+
+	if (ext->attach)
+ 		saa7146_foreach (saa7146_attach_extension, (void*) ext_id);
+	
+	return 0;
+}
+
+
+int saa7146_del_extension(struct saa7146_extension* ext)
+{
+	int ext_id = 0;
+
+	for (ext_id = 0; ext_id < SAA7146_MAX_EXTENSIONS; ext_id++)
+		if (ext == saa7146_ext[ext_id])
+			break;
+
+	if (SAA7146_MAX_EXTENSIONS == ext_id) {
+		printk("%s: detach_extension extension [%s] not found.\n",
+			__FUNCTION__, ext->name);
+		return -ENODEV;
+	}		
+
+	if (ext->detach)
+ 		saa7146_foreach (saa7146_detach_extension, (void*) ext_id);
+	
+	saa7146_ext[ext_id] = NULL;
+	saa7146_extension_count--;		
+
+	return 0;
+}
+
+
+static
+void remove_saa7146(struct saa7146 *saa)
+{
+	i2c_saa7146_del_bus (saa);
+
+	/* shut down all dma transfers */
+        saa7146_write(saa->mem, MC1, 0xbfff0000);
+	
+	dprintk("free irqs\n");
+	/* disable alle irqs, release irq-routine */
+	saa7146_write(saa->mem, IER, 0x00);
+	saa7146_write(saa->mem, ISR, 0xffffffff);
+	free_irq(saa->device->irq, (void *)saa);
+	dprintk("unmap memory\n");
+	/* unmap the memory, if necessary */
+	if (saa->mem)
+		iounmap((unsigned char *)((unsigned int)saa->mem));
+	
+	dprintk("release grabbing memory\n");
+	/* release grabbing memory */
+	if(saa->grabbing)
+		rvfree(saa->grabbing, buffers, &saa->page_table[0]);
+	
+	dprintk("release other memory\n");
+	/* release clipping, i2c, rps0 memory */
+	kfree(saa->clipping);
+	kfree(saa->i2c);
+	kfree(saa->rps0);
+	kfree(saa->rps1);
+	kfree(saa->debi);
+}
+
+
+static int saa7146_suspend(struct pci_dev *pdev, u32 state)
+{
+        printk("saa7146_suspend()\n");
+	saa7146_core_command(((struct saa7146 *) pdev->driver_data)->i2c_bus,
+			     SAA7146_SUSPEND, 0);
+	return 0;
+}
+
+static int
+saa7146_resume(struct pci_dev *pdev)
+{
+        printk("saa7146_resume()\n");
+	saa7146_core_command(((struct saa7146 *) pdev->driver_data)->i2c_bus,
+			     SAA7146_RESUME, 0);
+	return 0;
+}
+
+
+struct card_info {
+	int type;
+	char *name;
+};
+
+
+static
+int __devinit saa7146_init_one (struct pci_dev *pdev,
+				const struct pci_device_id *ent)
+{
+	struct dvb_adapter_s *adap;
+	struct saa7146 *saa;
+	int card_type;
+	struct card_info *cinfo= (struct card_info *) ent->driver_data;
+
+	dprintk("saa7146_init_one()\n");
+
+	card_type = cinfo->type;
+	dvb_register_adapter(&adap, cinfo->name);
+
+	if (!(saa = kmalloc (sizeof (struct saa7146), GFP_KERNEL))) {
+		printk ("%s: out of memory!\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+
+	memset (saa, 0, sizeof (struct saa7146));
+
+	saa->device = pdev;
+	saa->device->driver_data = saa;
+	saa->card_type = card_type;
+	saa->dvb_adapter = adap;
+
+	pci_enable_device (saa->device);
+
+	configure_saa7146 (saa);
+
+	list_add_tail (&saa->list_head, &saa7146_list);
+
+	return 0;
+}
+
+static
+void __devexit saa7146_remove_one (struct pci_dev *pdev)
+{
+	struct saa7146 *saa = pdev->driver_data;
+
+	dprintk("saa7146_remove_one()\n");
+
+	list_del (&saa->list_head);
+	pci_disable_device(pdev);
+	remove_saa7146 (saa);
+}
+
+
+static struct card_info fs_1_5 = { DVB_CARD_TT_SIEMENS,   "Siemens cable card PCI rev1.5" };
+static struct card_info fs_1_3 = { DVB_CARD_TT_SIEMENS,   "Siemens/Technotrend/Hauppauge PCI rev1.3" };
+static struct card_info ttbs   = { DVB_CARD_TT_BUDGET,    "TT-Budget/WinTV-NOVA-S  PCI" };
+static struct card_info ttbc   = { DVB_CARD_TT_BUDGET,    "TT-Budget/WinTV-NOVA-C  PCI" };
+static struct card_info ttbt   = { DVB_CARD_TT_BUDGET,    "TT-Budget/WinTV-NOVA-T  PCI" };
+static struct card_info ttbci  = { DVB_CARD_TT_BUDGET_CI, "TT-Budget/WinTV-NOVA-CI PCI" };
+static struct card_info satel  = { DVB_CARD_TT_BUDGET,    "SATELCO Multimedia PCI"};
+static struct card_info unkwn  = { DVB_CARD_TT_SIEMENS,   "Technotrend/Hauppauge PCI rev?(unknown0)?"};
+static struct card_info tt_1_6 = { DVB_CARD_TT_SIEMENS,   "Technotrend/Hauppauge PCI rev1.3 or 1.6" };
+static struct card_info tt_2_1 = { DVB_CARD_TT_SIEMENS,   "Technotrend/Hauppauge PCI rev2.1" };
+static struct card_info tt_t   = { DVB_CARD_TT_SIEMENS,   "Technotrend/Hauppauge PCI DVB-T" };
+static struct card_info knc1   = { DVB_CARD_KNC1,         "KNC1 DVB-S" };
+
+#define PHILIPS_SAA7146 PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA7146
+#define CARD_INFO driver_data: (unsigned long) &
+
+static struct pci_device_id saa7146_pci_tbl[] __devinitdata = {
+	{ PHILIPS_SAA7146, 0x110a, 0xffff, CARD_INFO fs_1_5 },
+	{ PHILIPS_SAA7146, 0x110a, 0x0000, CARD_INFO fs_1_5 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x1003, CARD_INFO ttbs },
+	{ PHILIPS_SAA7146, 0x13c2, 0x1004, CARD_INFO ttbc },
+	{ PHILIPS_SAA7146, 0x13c2, 0x1005, CARD_INFO ttbt },
+	{ PHILIPS_SAA7146, 0x13c2, 0x100c, CARD_INFO ttbci },
+	{ PHILIPS_SAA7146, 0x13c2, 0x1013, CARD_INFO satel },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0000, CARD_INFO fs_1_3 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x1002, CARD_INFO unkwn },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0001, CARD_INFO tt_1_6 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0002, CARD_INFO tt_2_1 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0003, CARD_INFO tt_2_1 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0004, CARD_INFO tt_2_1 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0006, CARD_INFO tt_1_6 },
+	{ PHILIPS_SAA7146, 0x13c2, 0x0008, CARD_INFO tt_t },
+	{ PHILIPS_SAA7146, 0xffc2, 0x0000, CARD_INFO unkwn },
+	{ PHILIPS_SAA7146, 0x1131, 0x4f56, CARD_INFO knc1 },
+	{ 0,},
+};
+
+MODULE_DEVICE_TABLE(pci, saa7146_pci_tbl);
+	
+static struct pci_driver saa7146_driver = {
+	name:		"saa7146",
+	id_table:	saa7146_pci_tbl,
+	probe:		saa7146_init_one,
+	remove:		saa7146_remove_one,
+	suspend:	saa7146_suspend,
+	resume:		saa7146_resume,
+};
+
+
+static
+int __init saa7146_init_module(void)
+{
+	int err;
+
+	dprintk("saa7146_init_module\n");
+
+	if ((err = pci_module_init(&saa7146_driver)))
+		return err;
+
+	if ((err = saa7146_v4l_init ()))
+		return err;
+
+	if ((err = av7110_init ()))
+		return err;
+
+	if ((err = av7110_ir_init ()))
+		return err;
+
+	return 0;
+}
+
+static
+void __exit saa7146_cleanup_module(void)
+{
+	av7110_ir_exit ();
+	av7110_exit ();
+	saa7146_v4l_exit ();
+	pci_unregister_driver(&saa7146_driver);
+}
+
+module_init(saa7146_init_module);
+module_exit(saa7146_cleanup_module);
+
+MODULE_AUTHOR("Michael Hunold <michael@mihu.de>, "
+	      "Christian Theiss <mistert@rz.fh-augsburg.de>, "
+	      "Ralph Metzler <rjkm@convergence.de>, "
+	      "Marcus Metzler <mocm@convergence.de>, "
+	      "Holger Waechtler <holger@convergence.de> and others");
+
+MODULE_DESCRIPTION("driver for saa7146/av7110 based DVB PCI cards");
+MODULE_LICENSE("GPL");
+MODULE_PARM(mode,"i");
+MODULE_PARM(saa7146_debug,"i");
+MODULE_PARM(buffers,"i");
+
diff -Nru a/drivers/media/dvb/av7110/saa7146_core.h b/drivers/media/dvb/av7110/saa7146_core.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/saa7146_core.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,116 @@
+#ifndef __SAA7146_CORE__
+#define __SAA7146_CORE__
+
+#include <asm/io.h>		/* definitions of u32 etc. */
+#include "../dvb-core/dvbdev.h"
+
+#if LINUX_VERSION_CODE < 0x020300
+#define DECLARE_MUTEX(foo)         struct semaphore foo = MUTEX
+#define DECLARE_MUTEX_LOCKED(foo)  struct semaphore foo = MUTEX_LOCKED
+#define WAIT_QUEUE                 struct wait_queue*
+#define init_waitqueue_head(wq)    *(wq) = NULL;
+#else
+#define WAIT_QUEUE                 wait_queue_head_t
+#endif
+
+/* maximum number of capture frames we support */
+#define SAA7146_MAX_BUF		5
+/* maximum number of extensions we support */
+#define SAA7146_MAX_EXTENSIONS	4
+
+/* stuff for writing to saa7146 */
+#define saa7146_write(mem,adr,dat)    writel((dat),(mem+(adr)))
+#define saa7146_read(mem,adr)         readl(mem+(adr))
+
+
+#define DVB_CARD_TT_SIEMENS   0
+#define DVB_CARD_TT_BUDGET    1
+#define DVB_CARD_TT_BUDGET_CI 2
+#define DVB_CARD_KNC1         3
+
+
+/* this struct contains some constants needed for horizontal and vertical scaling. 
+   currently we only support PAL (mode=0)and NTSC (mode=1). */
+
+struct saa7146 {
+
+        char			name[32];	/* give it a nice name */
+
+	struct list_head	list_head;
+
+	dvb_adapter_t		*dvb_adapter;
+	struct dvb_i2c_bus	*i2c_bus;	
+	struct pci_dev		*device;
+	int 			card_type;
+
+	void*			  data[SAA7146_MAX_EXTENSIONS];	/* data hooks for extensions */
+
+	int (*command) (struct dvb_i2c_bus *i, unsigned int cmd, void *arg);
+
+	unsigned char*		mem;		/* pointer to mapped IO memory */
+	int			revision;	/* chip revision; needed for bug-workarounds*/
+
+	int			interlace;
+	int			mode;
+	
+	u32*	i2c;				/* i2c memory */
+	u32*	grabbing;			/* grabbing memory */
+	u32*	clipping;			/* clipping memory for mask or rectangle clipping*/
+	u32*	rps0;				/* memory for rps0-program */
+	u32*	rps1;				/* memory for rps1-program */
+	u32*	debi;				/* memory for debi-transfers */
+	
+	int	buffers;			/* number of grabbing-buffers */
+		
+	u32*	page_table[SAA7146_MAX_BUF];	/* page_tables for buffers*/
+	int	frame_stat[SAA7146_MAX_BUF];	/* status of grabbing buffers */
+
+	int grab_width[SAA7146_MAX_BUF];	/* pixel width of grabs */
+	int grab_height[SAA7146_MAX_BUF];	/* pixel height of grabs */
+	int grab_format[SAA7146_MAX_BUF];	/* video format of grabs */
+	int grab_port[SAA7146_MAX_BUF];		/* video port for grab */
+
+        WAIT_QUEUE rps0_wq;                /* rps0 interrupt queue (=> capture) */
+        WAIT_QUEUE rps1_wq;                /* rps1 interrupt queue (=> i2c, ...) */
+};
+
+#define	SAA7146_IRQ_RPS0  
+#define	SAA7146_IRQ_RPS1 
+
+struct saa7146_extension {
+	char	name[32];
+	u32 	handles_irqs;
+
+	void (*irq_handler)(struct saa7146*, u32, void*);
+
+	int (*command)(struct saa7146*, void*, unsigned int cmd, void *arg);
+
+	int (*attach)(struct saa7146*, void**);
+	int (*detach)(struct saa7146*, void**);
+
+	void (*inc_use)(struct saa7146*);
+	void (*dec_use)(struct saa7146*);
+};
+
+extern int saa7146_add_extension(struct saa7146_extension* ext);
+extern int saa7146_del_extension(struct saa7146_extension* ext);
+
+
+/* external grabbing states */
+#define GBUFFER_UNUSED         0x000
+#define GBUFFER_GRABBING       0x001
+#define GBUFFER_DONE           0x002
+
+#define SAA7146_CORE_BASE	200
+
+#define	SAA7146_DO_MMAP		_IOW('d', (SAA7146_CORE_BASE+11), struct vm_area_struct *)
+#define SAA7146_SET_DD1		_IOW('d', (SAA7146_CORE_BASE+12), u32)
+#define SAA7146_DUMP_REGISTERS	_IOW('d', (SAA7146_CORE_BASE+13), u32)
+#define SAA7146_DEBI_TRANSFER	_IOW('d', (SAA7146_CORE_BASE+14), struct saa7146_debi_transfer)
+
+
+#define SAA7146_SUSPEND	_IOW('d', (SAA7146_CORE_BASE+32), u32)
+#define SAA7146_RESUME	_IOW('d', (SAA7146_CORE_BASE+33), u32)
+
+#endif
+
diff -Nru a/drivers/media/dvb/av7110/saa7146_defs.h b/drivers/media/dvb/av7110/saa7146_defs.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/saa7146_defs.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,382 @@
+#ifndef __INCLUDED_SAA7146__
+#define __INCLUDED_SAA7146__
+
+struct	saa7146_video_dma {
+	u32 base_odd;
+	u32 base_even;
+	u32 prot_addr;
+	u32 pitch;
+	u32 base_page;
+	u32 num_line_byte;
+};
+
+struct saa7146_debi_transfer {
+
+	u8	timeout;	/* have a look at the specs for reasonable values, p.110 ff */
+	u8	swap;
+	u8	slave16;
+	u8	increment;	/* only for block transfers */
+	u8	intel;
+	u8	tien;
+
+	u16	address;
+	u16	num_bytes;
+	u8	direction;
+	u32	mem;		/* either a "pointer" (actually the physical address) of the debi-memory (block-transfer, use virt_to_bus to supply it) or 4 bytes (as one u32-value) for immediate transfer */
+};
+
+struct saa7146_modes_constants {
+	u8  v_offset;
+	u16 v_field;
+	u16 v_calc;
+	
+	u8  h_offset;
+	u16 h_pixels;
+	u16 h_calc;
+	
+	u16 v_max_out;
+	u16 h_max_out;
+};
+
+struct	saa7146_mmap_struct
+{
+	const char *adr;
+	unsigned long size;
+};
+
+#define SAA7146_PAL	0
+#define SAA7146_NTSC	1
+#define SAA7146_SECAM	2
+
+#define SAA7146_HPS_SOURCE_PORT_A	0x00
+#define SAA7146_HPS_SOURCE_PORT_B	0x01
+#define SAA7146_HPS_SOURCE_YPB_CPA	0x02
+#define SAA7146_HPS_SOURCE_YPA_CPB	0x03
+
+#define SAA7146_HPS_SYNC_PORT_A	0x00
+#define SAA7146_HPS_SYNC_PORT_B	0x01
+
+
+/* Number of vertical active lines */
+#define V_ACTIVE_LINES_PAL	576
+#define V_ACTIVE_LINES_NTSC	480
+#define V_ACTIVE_LINES_SECAM	576
+
+/* Number of lines in a field for HPS to process */
+#define V_FIELD_PAL	288
+#define V_FIELD_NTSC	240
+#define V_FIELD_SECAM	288
+
+/* Number of lines of vertical offset before processing */
+#define V_OFFSET_NTSC	0x10 /* PLI */
+#define V_OFFSET_PAL	0x15
+#define V_OFFSET_SECAM	0x14
+
+/* Number of horizontal pixels to process */
+#define H_PIXELS_NTSC	708
+#define H_PIXELS_PAL	720
+#define H_PIXELS_SECAM	720
+
+/* Horizontal offset of processing window */
+#define H_OFFSET_NTSC	0x40 /* PLI Try 0x3f and find all red colors turning into blue !!?? */
+#define H_OFFSET_PAL	0x3a
+#define H_OFFSET_SECAM	0x14
+
+/* some memory-sizes */
+#define GRABBING_MEM_SIZE	0x240000	/* 1024 * 576 * 4*/
+#define CLIPPING_MEM_SIZE	20000 	        /* 1024 * 625 / 32 */
+#define I2C_MEM_SIZE		0x000800	/* 2048 */
+#define	RPS_MEM_SIZE		0x000800	/* 2048 */
+
+/************************************************************************/
+/* UNSORTED								*/
+/************************************************************************/
+
+#define ME1    0x0000000800
+#define PV1    0x0000000008
+
+/************************************************************************/
+/* CLIPPING								*/
+/************************************************************************/
+
+/* some defines for the various clipping-modes */
+#define SAA7146_CLIPPING_RECT		0x4
+#define SAA7146_CLIPPING_RECT_INVERTED	0x5
+#define SAA7146_CLIPPING_MASK		0x6
+#define SAA7146_CLIPPING_MASK_INVERTED	0x7
+
+/************************************************************************/
+/* RPS									*/
+/************************************************************************/
+
+#define CMD_NOP		0x00000000  /* No operation */
+#define CMD_CLR_EVENT	0x00000000  /* Clear event */
+#define CMD_SET_EVENT	0x10000000  /* Set signal event */
+#define CMD_PAUSE	0x20000000  /* Pause */
+#define CMD_CHECK_LATE	0x30000000  /* Check late */
+#define CMD_UPLOAD	0x40000000  /* Upload */
+#define CMD_STOP	0x50000000  /* Stop */
+#define CMD_INTERRUPT	0x60000000  /* Interrupt */
+#define CMD_JUMP	0x80000000  /* Jump */
+#define CMD_WR_REG	0x90000000  /* Write (load) register */
+#define CMD_RD_REG	0xa0000000  /* Read (store) register */
+#define CMD_WR_REG_MASK	0xc0000000  /* Write register with mask */
+
+/************************************************************************/
+/* OUTPUT FORMATS 							*/
+/************************************************************************/
+
+/* output formats; each entry holds three types of information */
+/* composed is used in the sense of "not-planar" */
+
+#define RGB15_COMPOSED	0x213
+/* this means: yuv2rgb-conversation-mode=2, dither=yes(=1), format-mode = 3 */
+#define RGB16_COMPOSED	0x210
+#define RGB24_COMPOSED	0x201
+#define RGB32_COMPOSED	0x202
+
+#define YUV411_COMPOSED		0x003
+/* this means: yuv2rgb-conversation-mode=0, dither=no(=0), format-mode = 3 */
+#define YUV422_COMPOSED		0x000
+#define YUV411_DECOMPOSED	0x00b
+#define YUV422_DECOMPOSED	0x009
+#define YUV420_DECOMPOSED	0x00a
+
+/************************************************************************/
+/* MISC 								*/
+/************************************************************************/
+
+/* Bit mask constants */
+#define MASK_00   0x00000001    /* Mask value for bit 0 */
+#define MASK_01   0x00000002    /* Mask value for bit 1 */
+#define MASK_02   0x00000004    /* Mask value for bit 2 */
+#define MASK_03   0x00000008    /* Mask value for bit 3 */
+#define MASK_04   0x00000010    /* Mask value for bit 4 */
+#define MASK_05   0x00000020    /* Mask value for bit 5 */
+#define MASK_06   0x00000040    /* Mask value for bit 6 */
+#define MASK_07   0x00000080    /* Mask value for bit 7 */
+#define MASK_08   0x00000100    /* Mask value for bit 8 */
+#define MASK_09   0x00000200    /* Mask value for bit 9 */
+#define MASK_10   0x00000400    /* Mask value for bit 10 */
+#define MASK_11   0x00000800    /* Mask value for bit 11 */
+#define MASK_12   0x00001000    /* Mask value for bit 12 */
+#define MASK_13   0x00002000    /* Mask value for bit 13 */
+#define MASK_14   0x00004000    /* Mask value for bit 14 */
+#define MASK_15   0x00008000    /* Mask value for bit 15 */
+#define MASK_16   0x00010000    /* Mask value for bit 16 */
+#define MASK_17   0x00020000    /* Mask value for bit 17 */
+#define MASK_18   0x00040000    /* Mask value for bit 18 */
+#define MASK_19   0x00080000    /* Mask value for bit 19 */
+#define MASK_20   0x00100000    /* Mask value for bit 20 */
+#define MASK_21   0x00200000    /* Mask value for bit 21 */
+#define MASK_22   0x00400000    /* Mask value for bit 22 */
+#define MASK_23   0x00800000    /* Mask value for bit 23 */
+#define MASK_24   0x01000000    /* Mask value for bit 24 */
+#define MASK_25   0x02000000    /* Mask value for bit 25 */
+#define MASK_26   0x04000000    /* Mask value for bit 26 */
+#define MASK_27   0x08000000    /* Mask value for bit 27 */
+#define MASK_28   0x10000000    /* Mask value for bit 28 */
+#define MASK_29   0x20000000    /* Mask value for bit 29 */
+#define MASK_30   0x40000000    /* Mask value for bit 30 */
+#define MASK_31   0x80000000    /* Mask value for bit 31 */
+
+#define MASK_B0   0x000000ff    /* Mask value for byte 0 */
+#define MASK_B1   0x0000ff00    /* Mask value for byte 1 */
+#define MASK_B2   0x00ff0000    /* Mask value for byte 2 */
+#define MASK_B3   0xff000000    /* Mask value for byte 3 */
+
+#define MASK_W0   0x0000ffff    /* Mask value for word 0 */
+#define MASK_W1   0xffff0000    /* Mask value for word 1 */
+
+#define MASK_PA   0xfffffffc    /* Mask value for physical address */
+#define MASK_PR   0xfffffffe 	/* Mask value for protection register */
+#define MASK_ER   0xffffffff    /* Mask value for the entire register */
+
+#define MASK_NONE 0x00000000    /* No mask */
+
+/************************************************************************/
+/* REGISTERS 								*/
+/************************************************************************/
+
+#define BASE_ODD1         0x00  /* Video DMA 1 registers  */
+#define BASE_EVEN1        0x04
+#define PROT_ADDR1        0x08
+#define PITCH1            0x0C
+#define BASE_PAGE1        0x10  /* Video DMA 1 base page */
+#define NUM_LINE_BYTE1    0x14
+
+#define BASE_ODD2         0x18  /* Video DMA 2 registers */
+#define BASE_EVEN2        0x1C
+#define PROT_ADDR2        0x20
+#define PITCH2            0x24
+#define BASE_PAGE2        0x28  /* Video DMA 2 base page */
+#define NUM_LINE_BYTE2    0x2C
+
+#define BASE_ODD3         0x30  /* Video DMA 3 registers */
+#define BASE_EVEN3        0x34
+#define PROT_ADDR3        0x38
+#define PITCH3            0x3C         
+#define BASE_PAGE3        0x40  /* Video DMA 3 base page */
+#define NUM_LINE_BYTE3    0x44
+
+#define PCI_BT_V1         0x48  /* Video/FIFO 1 */
+#define PCI_BT_V2         0x49  /* Video/FIFO 2 */
+#define PCI_BT_V3         0x4A  /* Video/FIFO 3 */
+#define PCI_BT_DEBI       0x4B  /* DEBI */
+#define PCI_BT_A          0x4C  /* Audio */
+
+#define DD1_INIT          0x50  /* Init setting of DD1 interface */
+
+#define DD1_STREAM_B      0x54  /* DD1 B video data stream handling */
+#define DD1_STREAM_A      0x56  /* DD1 A video data stream handling */
+
+#define BRS_CTRL          0x58  /* BRS control register */
+#define HPS_CTRL          0x5C  /* HPS control register */
+#define HPS_V_SCALE       0x60  /* HPS vertical scale */
+#define HPS_V_GAIN        0x64  /* HPS vertical ACL and gain */
+#define HPS_H_PRESCALE    0x68  /* HPS horizontal prescale   */
+#define HPS_H_SCALE       0x6C  /* HPS horizontal scale */
+#define BCS_CTRL          0x70  /* BCS control */
+#define CHROMA_KEY_RANGE  0x74
+#define CLIP_FORMAT_CTRL  0x78  /* HPS outputs formats & clipping */
+
+#define DEBI_CONFIG       0x7C
+#define DEBI_COMMAND      0x80
+#define DEBI_PAGE         0x84
+#define DEBI_AD           0x88	
+
+#define I2C_TRANSFER      0x8C	
+#define I2C_STATUS        0x90	
+
+#define BASE_A1_IN        0x94	/* Audio 1 input DMA */
+#define PROT_A1_IN        0x98
+#define PAGE_A1_IN        0x9C
+  
+#define BASE_A1_OUT       0xA0  /* Audio 1 output DMA */
+#define PROT_A1_OUT       0xA4
+#define PAGE_A1_OUT       0xA8
+
+#define BASE_A2_IN        0xAC  /* Audio 2 input DMA */
+#define PROT_A2_IN        0xB0
+#define PAGE_A2_IN        0xB4
+
+#define BASE_A2_OUT       0xB8  /* Audio 2 output DMA */
+#define PROT_A2_OUT       0xBC
+#define PAGE_A2_OUT       0xC0
+
+#define RPS_PAGE0         0xC4  /* RPS task 0 page register */
+#define RPS_PAGE1         0xC8  /* RPS task 1 page register */
+
+#define RPS_THRESH0       0xCC  /* HBI threshold for task 0 */
+#define RPS_THRESH1       0xD0  /* HBI threshold for task 1 */
+
+#define RPS_TOV0          0xD4  /* RPS timeout for task 0 */
+#define RPS_TOV1          0xD8  /* RPS timeout for task 1 */
+
+#define IER               0xDC  /* Interrupt enable register */
+
+#define GPIO_CTRL         0xE0  /* GPIO 0-3 register */
+
+#define EC1SSR            0xE4  /* Event cnt set 1 source select */
+#define EC2SSR            0xE8  /* Event cnt set 2 source select */
+#define ECT1R             0xEC  /* Event cnt set 1 thresholds */
+#define ECT2R             0xF0  /* Event cnt set 2 thresholds */
+
+#define ACON1             0xF4
+#define ACON2             0xF8
+
+#define MC1               0xFC   /* Main control register 1 */
+#define MC2               0x100  /* Main control register 2  */
+
+#define RPS_ADDR0         0x104  /* RPS task 0 address register */
+#define RPS_ADDR1         0x108  /* RPS task 1 address register */
+
+#define ISR               0x10C  /* Interrupt status register */                                                             
+#define PSR               0x110  /* Primary status register */
+#define SSR               0x114  /* Secondary status register */
+
+#define EC1R              0x118  /* Event counter set 1 register */
+#define EC2R              0x11C  /* Event counter set 2 register */         
+
+#define PCI_VDP1          0x120  /* Video DMA pointer of FIFO 1 */
+#define PCI_VDP2          0x124  /* Video DMA pointer of FIFO 2 */
+#define PCI_VDP3          0x128  /* Video DMA pointer of FIFO 3 */
+#define PCI_ADP1          0x12C  /* Audio DMA pointer of audio out 1 */
+#define PCI_ADP2          0x130  /* Audio DMA pointer of audio in 1 */
+#define PCI_ADP3          0x134  /* Audio DMA pointer of audio out 2 */
+#define PCI_ADP4          0x138  /* Audio DMA pointer of audio in 2 */
+#define PCI_DMA_DDP       0x13C  /* DEBI DMA pointer */
+
+#define LEVEL_REP         0x140,
+#define A_TIME_SLOT1      0x180,  /* from 180 - 1BC */
+#define A_TIME_SLOT2      0x1C0,  /* from 1C0 - 1FC */
+
+/************************************************************************/
+/* ISR-MASKS 								*/
+/************************************************************************/
+
+#define SPCI_PPEF       0x80000000  /* PCI parity error */
+#define SPCI_PABO       0x40000000  /* PCI access error (target or master abort) */
+#define SPCI_PPED       0x20000000  /* PCI parity error on 'real time data' */
+#define SPCI_RPS_I1     0x10000000  /* Interrupt issued by RPS1 */
+#define SPCI_RPS_I0     0x08000000  /* Interrupt issued by RPS0 */
+#define SPCI_RPS_LATE1  0x04000000  /* RPS task 1 is late */
+#define SPCI_RPS_LATE0  0x02000000  /* RPS task 0 is late */
+#define SPCI_RPS_E1     0x01000000  /* RPS error from task 1 */
+#define SPCI_RPS_E0     0x00800000  /* RPS error from task 0 */
+#define SPCI_RPS_TO1    0x00400000  /* RPS timeout task 1 */
+#define SPCI_RPS_TO0    0x00200000  /* RPS timeout task 0 */
+#define SPCI_UPLD       0x00100000  /* RPS in upload */
+#define SPCI_DEBI_S     0x00080000  /* DEBI status */
+#define SPCI_DEBI_E     0x00040000  /* DEBI error */
+#define SPCI_IIC_S      0x00020000  /* I2C status */
+#define SPCI_IIC_E      0x00010000  /* I2C error */
+#define SPCI_A2_IN      0x00008000  /* Audio 2 input DMA protection / limit */
+#define SPCI_A2_OUT     0x00004000  /* Audio 2 output DMA protection / limit */
+#define SPCI_A1_IN      0x00002000  /* Audio 1 input DMA protection / limit */
+#define SPCI_A1_OUT     0x00001000  /* Audio 1 output DMA protection / limit */
+#define SPCI_AFOU       0x00000800  /* Audio FIFO over- / underflow */
+#define SPCI_V_PE       0x00000400  /* Video protection address */
+#define SPCI_VFOU       0x00000200  /* Video FIFO over- / underflow */
+#define SPCI_FIDA       0x00000100  /* Field ID video port A */
+#define SPCI_FIDB       0x00000080  /* Field ID video port B */
+#define SPCI_PIN3       0x00000040  /* GPIO pin 3 */
+#define SPCI_PIN2       0x00000020  /* GPIO pin 2 */
+#define SPCI_PIN1       0x00000010  /* GPIO pin 1 */
+#define SPCI_PIN0       0x00000008  /* GPIO pin 0 */
+#define SPCI_ECS        0x00000004  /* Event counter 1, 2, 4, 5 */
+#define SPCI_EC3S       0x00000002  /* Event counter 3 */
+#define SPCI_EC0S       0x00000001  /* Event counter 0 */
+
+/************************************************************************/
+/* I2C									*/
+/************************************************************************/
+
+/* time we wait after certain i2c-operations */
+#define SAA7146_I2C_DELAY 		10
+
+#define	SAA7146_I2C_ABORT	(1<<7)
+#define	SAA7146_I2C_SPERR	(1<<6)
+#define	SAA7146_I2C_APERR	(1<<5)
+#define	SAA7146_I2C_DTERR	(1<<4)
+#define	SAA7146_I2C_DRERR	(1<<3)
+#define	SAA7146_I2C_AL		(1<<2)
+#define	SAA7146_I2C_ERR		(1<<1)
+#define	SAA7146_I2C_BUSY	(1<<0)
+
+#define	SAA7146_I2C_START	(0x3)
+#define	SAA7146_I2C_CONT	(0x2)
+#define	SAA7146_I2C_STOP	(0x1)
+#define	SAA7146_I2C_NOP		(0x0)
+
+#define SAA7146_I2C_BUS_BIT_RATE_6400	(0x500)
+#define SAA7146_I2C_BUS_BIT_RATE_3200	(0x100)
+#define SAA7146_I2C_BUS_BIT_RATE_480	(0x400)
+#define SAA7146_I2C_BUS_BIT_RATE_320	(0x600)
+#define SAA7146_I2C_BUS_BIT_RATE_240	(0x700)
+#define SAA7146_I2C_BUS_BIT_RATE_120	(0x000)
+#define SAA7146_I2C_BUS_BIT_RATE_80	(0x200)
+#define SAA7146_I2C_BUS_BIT_RATE_60	(0x300)
+
+
+#endif
diff -Nru a/drivers/media/dvb/av7110/saa7146_v4l.c b/drivers/media/dvb/av7110/saa7146_v4l.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/saa7146_v4l.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,502 @@
+/*
+    video4linux-parts of the saa7146 device driver
+    
+    Copyright (C) 1998,1999 Michael Hunold <michael@mihu.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/module.h>	/* for module-version */
+#include <linux/string.h>
+#include <linux/slab.h>		/* for kmalloc/kfree */
+#include <linux/delay.h>	/* for delay-stuff */
+#include <asm/uaccess.h>	/* for copy_to/from_user */
+#include <linux/wrapper.h>	/* for mem_map_reserve */
+#include <linux/vmalloc.h>
+#include <linux/videodev.h>
+
+#include "saa7146_defs.h"
+#include "saa7146_core.h"
+#include "saa7146_v4l.h"
+
+
+static int saa7146_v4l_debug = 0;
+
+#define dprintk	if (saa7146_v4l_debug) printk
+#define hprintk	if (saa7146_v4l_debug >= 2) printk
+#define gprintk	if (saa7146_v4l_debug >= 3) printk
+
+#define __COMPILE_SAA7146__
+#include "saa7146.c"
+
+/* transform video4linux-cliplist to plain arrays -- we assume that the arrays
+   are big enough -- if not: your fault! */	
+int	saa7146_v4lclip2plain(struct video_clip *clips, u16 clipcount, int x[], int y[], int width[], int height[])
+{
+	int	i = 0;
+	struct	video_clip* vc = NULL;
+
+	dprintk("saa7146_v4l.o: ==> saa7146_v4lclip2plain, cc:%d\n",clipcount);
+
+	/* anything to do here? */	
+	if( 0 == clipcount )
+		return 0;
+
+	/* copy to kernel-space */
+	vc = vmalloc(sizeof(struct video_clip)*(clipcount));
+	if( NULL == vc	) {
+		printk("saa7146_v4l.o: ==> v4lclip2saa7146_v4l.o: no memory #2!\n");
+		return -ENOMEM;
+	}
+	if(copy_from_user(vc,clips,sizeof(struct video_clip)*clipcount)) {
+		printk("saa7146_v4l.o: ==> v4lclip2saa7146_v4l.o: could not copy from user-space!\n");
+		return -EFAULT;
+	}
+
+	/* copy the clip-list to the arrays
+	   note: the video_clip-struct may contain negative values to indicate that a window
+		 doesn't lay completly over the video window. Thus, we correct the values right here */
+	for(i = 0; i < clipcount; i++) {
+
+		if( vc[i].width < 0) {
+			vc[i].x += vc[i].width; vc[i].width = -vc[i].width;
+		}
+		if( vc[i].height < 0) {
+			vc[i].y += vc[i].height; vc[i].height = -vc[i].height;
+		}			
+
+		if( vc[i].x < 0) {
+			vc[i].width += vc[i].x; vc[i].x = 0;
+		}
+		if( vc[i].y < 0) {
+			vc[i].height += vc[i].y; vc[i].y = 0;
+		}		
+
+		if(vc[i].width <= 0 || vc[i].height <= 0) {
+			vfree(vc);
+			return -EINVAL;
+		}
+		
+		x[i]		= vc[i].x;
+		y[i]		= vc[i].y;
+		width[i]	= vc[i].width;
+		height[i]	= vc[i].height;
+	}		
+
+	/* free memory used for temporary clips */
+	vfree(vc);
+
+	return 0;	
+}
+	
+struct saa7146_v4l_struct {
+	struct video_buffer	buffer;
+	struct video_mbuf	mbuf;
+	struct video_window	window;
+	struct video_picture	picture;
+}; 
+
+static int saa7146_v4l_command(struct saa7146* saa, void *p, unsigned int cmd, void *arg)
+{
+	struct saa7146_v4l_struct* data = (struct saa7146_v4l_struct*)p;
+
+	hprintk("saa7146_v4l.o: ==> saa7146_v4l_command\n");
+
+	if( NULL == saa)
+		return -EINVAL;
+
+	switch(cmd) {
+		case SAA7146_V4L_GPICT:
+		{
+			struct video_picture *p = arg;
+
+			hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_GPICT\n");
+
+			memcpy(p, &data->picture, sizeof(struct video_picture));
+
+		}
+		break;
+
+		case SAA7146_V4L_SPICT:
+		{
+			struct video_picture *p = arg;
+			
+			hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_SPICT\n");
+
+			memcpy(&data->picture, p, sizeof(struct video_picture));
+			set_picture_prop(saa, (u32)(data->picture.brightness>>8),(u32)(data->picture.contrast>>9),(u32)(data->picture.colour>>9));
+
+		}
+		break;
+
+		case SAA7146_V4L_SWIN:
+		{
+			struct video_window *vw = arg;
+			int	*x = NULL, *y = NULL, *w = NULL, *h = NULL;
+
+			u32 palette = 0;
+			
+			hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_SWIN\n");
+			
+			video_setmode(saa, 0);
+			saa7146_write(saa->mem, MC1, (MASK_21));
+
+			set_window(saa, vw->width, vw->height,0,0,0);
+			//saa->port, saa->sync);
+			if (move_to(saa, vw->x, vw->y, vw->height, data->buffer.width,
+				    data->buffer.depth, data->buffer.bytesperline,
+				    (u32)data->buffer.base, 0)<0)
+			  return -1;
+
+			switch( data->picture.palette ) {
+
+			case VIDEO_PALETTE_RGB555:
+				palette = RGB15_COMPOSED;
+				break;
+
+			case VIDEO_PALETTE_RGB24:
+				palette = RGB24_COMPOSED;
+				break;
+
+			case VIDEO_PALETTE_RGB32:
+				palette = RGB32_COMPOSED;
+				break;
+
+			case VIDEO_PALETTE_UYVY:
+				palette = YUV422_COMPOSED;
+				break;
+
+			case VIDEO_PALETTE_YUV422P:
+				palette = YUV422_DECOMPOSED;
+				break;
+
+			case VIDEO_PALETTE_YUV420P:
+				palette = YUV420_DECOMPOSED;
+				break;
+
+			case VIDEO_PALETTE_YUV411P:
+				palette = YUV411_DECOMPOSED;
+				break;
+
+			default:
+			/*case VIDEO_PALETTE_RGB565:*/
+				palette = RGB16_COMPOSED;
+				break;
+			}
+
+			set_output_format(saa, palette);
+
+			if (vw->flags==VIDEO_CLIP_BITMAP) {
+			  clip_windows(saa, SAA7146_CLIPPING_MASK, vw->width, vw->height,
+				       (u32 *) vw->clips, 1, 0, 0, 0, 0);
+			} else {
+			  
+			  
+			  /* this is tricky, but helps us saving kmalloc/kfree-calls 
+			     and boring if/else-constructs ... */
+			  x = (int*)kmalloc(sizeof(int)*vw->clipcount*4,GFP_KERNEL);
+			  if( NULL == x ) {
+			    hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_SWIN: out of kernel-memory.\n");
+			    return -ENOMEM;
+			  }
+			  y = x+(1*vw->clipcount);
+			  w = x+(2*vw->clipcount);
+			  h = x+(3*vw->clipcount);
+			  
+			  /* transform clipping-windows */
+			  if (0 != saa7146_v4lclip2plain(vw->clips, vw->clipcount,x,y,w,h))
+			    break;
+			  clip_windows(saa, SAA7146_CLIPPING_RECT, vw->width, vw->height,
+				       NULL, vw->clipcount, x, y, w, h);
+			  kfree(x);
+			  
+			  memcpy(&data->window, arg, sizeof(struct video_window));
+			}
+			video_setmode(saa, 1);
+			break;
+		}
+
+		case SAA7146_V4L_CCAPTURE:
+		{
+			int* i = arg;
+
+			hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_CCAPTURE\n");
+
+			if ( 0 == *i ) {
+				video_setmode(saa, 0);
+			}
+			else {
+				video_setmode(saa, 1);
+			}
+						
+			break;
+		}
+
+		case SAA7146_V4L_GFBUF:
+		{
+			struct video_buffer *b = arg;
+
+			hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_GFBUF\n");
+
+			memcpy(b, &data->buffer, sizeof(struct video_buffer));
+
+			break;
+		}
+
+		case SAA7146_V4L_SFBUF:
+		{
+			struct video_buffer *b = arg;
+		
+			memcpy(&data->buffer, b, sizeof(struct video_buffer));
+			hprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_SFBUF: b:0x%08x, h:%d, w:%d, d:%d\n", (u32)data->buffer.base, data->buffer.height, data->buffer.width, data->buffer.depth);			
+
+			break;
+		}
+
+
+		case SAA7146_V4L_CSYNC:
+		{
+			int i = *((int*)arg);
+
+			int count = 0, k = 0;
+			unsigned char* grabbfr;
+			unsigned char y, uv;
+
+			/* sanity checks */
+                        if ( i >= saa->buffers || i < 0) {
+				gprintk("saa7146_v4l.o: SAA7146_V4L_CSYNC, invalid buffer %d\n",i);
+				return -EINVAL;
+			}
+
+			/* get the state */
+			switch ( saa->frame_stat[i] ) {
+				case GBUFFER_UNUSED:
+				{
+					/* there was no grab to this buffer */
+					gprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_CSYNC, invalid frame (fr:%d)\n",i);
+					return -EINVAL;
+				}
+				case GBUFFER_GRABBING:
+				{		
+					/* wait to be woken up by the irq-handler */
+					interruptible_sleep_on(&saa->rps0_wq);
+					break;
+				}
+				case GBUFFER_DONE:
+				{
+					gprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_CSYNC, frame done! (fr:%d)\n",i);
+					break;
+				}
+			}
+
+			/* all saa7146´s below chip-revision 3 are not capable of
+			   doing byte-swaps with video-dma1. for rgb-grabbing this
+			   does not matter, but yuv422-grabbing has the wrong
+			   byte-order, so we have to swap in software */
+			if ( ( saa->revision<3) && 
+			     (saa->grab_format[i] == YUV422_COMPOSED)) {
+				/* swap UYVY to YUYV */
+				count = saa->grab_height[i]*saa->grab_width[i]*2;
+				grabbfr = ((unsigned char*)(saa->grabbing))+i*GRABBING_MEM_SIZE;
+				for (k=0; k<count; k=k+2) {
+					y = grabbfr[k+1];
+					uv = grabbfr[k];
+					grabbfr[k] = y;
+					grabbfr[k+1] = uv;
+				}
+			}
+						
+			/* set corresponding buffer to ´unused´ */
+			saa->frame_stat[i] = GBUFFER_UNUSED;
+printk ("saa7146_v4l.o: SAA7146_V4L_CSYNC, frame %i done.\n", i);
+
+			break;
+		}
+		case SAA7146_V4L_CMCAPTURE:
+		{
+                        struct video_mmap *vm = arg;
+
+			gprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_CMCAPTURE, trying buffer:%d\n", vm->frame);
+
+			/* check status for wanted frame */
+			if ( GBUFFER_GRABBING == saa->frame_stat[vm->frame] ) {
+				gprintk("saa7146_v4l.o: frame #%d still grabbing!\n",vm->frame);
+				return -EBUSY;
+			}
+
+			/* do necessary transformations from the videodev-structure to our own format. */		
+
+			/* sanity checks */
+			if ( vm->width <= 0 || vm->height <= 0 ) {
+				gprintk("saa7146_v4l.o: set_up_grabbing, invalid dimension for wanted buffer %d\n",vm->frame);
+				return -EINVAL;
+			}
+
+			/* set corresponding buffer to ´grabbing´ */
+			saa->frame_stat[vm->frame] = GBUFFER_GRABBING;
+
+			/* copy grabbing informtaion for the buffer */
+			saa->grab_height[vm->frame] = vm->height;
+			saa->grab_width[vm->frame]  = vm->width;
+			/* fixme: setting of grabbing port ?!*/
+			saa->grab_port[vm->frame]   = 0;
+
+			switch( vm->format ) {
+
+				case VIDEO_PALETTE_RGB555:
+					saa->grab_format[vm->frame] = RGB15_COMPOSED;
+					break;
+
+				case VIDEO_PALETTE_RGB24:
+					saa->grab_format[vm->frame] = RGB24_COMPOSED;
+					break;
+
+				case VIDEO_PALETTE_RGB32:
+					saa->grab_format[vm->frame] = RGB32_COMPOSED;
+					break;
+
+				case VIDEO_PALETTE_YUV420P:
+					return -EINVAL;
+
+				case VIDEO_PALETTE_YUV422:
+					saa->grab_format[vm->frame] = YUV422_COMPOSED;
+					break;
+
+				case VIDEO_PALETTE_YUV422P:
+					saa->grab_format[vm->frame] = YUV422_DECOMPOSED;
+					break;
+
+				case VIDEO_PALETTE_YUV411P:
+					saa->grab_format[vm->frame] = YUV411_DECOMPOSED;
+					break;
+
+				default:
+					/*case VIDEO_PALETTE_RGB565:*/
+					saa->grab_format[vm->frame] = RGB16_COMPOSED;
+					break;
+				}
+
+			set_up_grabbing(saa,vm->frame);
+			break;
+		}
+		case SAA7146_V4L_GMBUF:
+		{
+                        struct video_mbuf *m = arg;
+			int i = 0;
+
+			m->size = saa->buffers * GRABBING_MEM_SIZE;
+			m->frames = saa->buffers;
+
+			for(i = 0; i < saa->buffers; i++)
+				m->offsets[i]=(i*GRABBING_MEM_SIZE);
+
+			gprintk(KERN_ERR "saa7146_v4l.o: SAA7146_V4L_GMBUF, providing %d buffers.\n", saa->buffers);
+			
+			break;
+		}
+
+		default:
+			return -ENOIOCTLCMD;
+	}
+	
+	return 0;
+}
+
+int saa7146_v4l_attach(struct saa7146* adap, void** p)
+{
+	struct saa7146_v4l_struct* data;
+
+	hprintk("saa7146_v4l.o: ==> saa7146_v4l_inc_use_attach\n");
+					
+	if (!(data = kmalloc(sizeof(struct saa7146_v4l_struct), GFP_KERNEL))) {
+	    	printk (KERN_ERR "%s: out of memory!\n", __FUNCTION__);
+		return -ENOMEM;
+	}
+	*(struct saa7146_v4l_struct**)p = data;
+
+	memset(&data->buffer, 0x0, sizeof(struct video_buffer));
+	memset(&data->mbuf,   0x0, sizeof(struct video_mbuf));
+	memset(&data->window, 0x0, sizeof(struct video_window));
+	memset(&data->picture,0x0, sizeof(struct video_picture));
+
+	data->picture.brightness = 32768;
+	data->picture.contrast = 32768;
+	data->picture.colour = 32768;	/* saturation */
+	data->picture.depth = 16;
+	data->picture.palette = VIDEO_PALETTE_RGB565;
+
+	return 0;
+}
+
+
+void saa7146_v4l_inc_use(struct saa7146* adap)
+{
+	MOD_INC_USE_COUNT;
+}
+
+
+int saa7146_v4l_detach(struct saa7146* adap, void** p)
+{
+	struct saa7146_v4l_struct** data = (struct saa7146_v4l_struct**)p;
+
+	kfree(*data);
+	*data = NULL;
+
+	return 0;
+}
+
+
+void saa7146_v4l_dec_use(struct saa7146* adap)
+{
+	MOD_DEC_USE_COUNT;
+}
+
+
+static struct saa7146_extension saa7146_v4l_extension = {
+	"v4l extension\0",
+	MASK_27,                            /* handles rps0 irqs */
+	saa7146_std_grab_irq_callback_rps0,
+	saa7146_v4l_command,
+	saa7146_v4l_attach,
+	saa7146_v4l_detach,
+	saa7146_v4l_inc_use,
+	saa7146_v4l_dec_use
+};	
+
+
+int saa7146_v4l_init (void) 
+{
+	int res = 0;
+
+	if((res = saa7146_add_extension(&saa7146_v4l_extension))) {
+		printk("saa7146_v4l.o: extension registration failed, module not inserted.\n");
+		return res;
+	}
+	
+	return 0;
+}
+
+
+void saa7146_v4l_exit (void) 
+{
+	int res = 0;
+	if ((res = saa7146_del_extension(&saa7146_v4l_extension))) {
+		printk("saa7146_v4l.o: extension deregistration failed, module not removed.\n");
+	}
+}
+
+MODULE_PARM(saa7146_v4l_debug, "i");
+MODULE_PARM_DESC(saa7146_v4l_debug, "set saa7146_v4l.c in debug mode");
+
diff -Nru a/drivers/media/dvb/av7110/saa7146_v4l.h b/drivers/media/dvb/av7110/saa7146_v4l.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/av7110/saa7146_v4l.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,32 @@
+#ifndef __INCLUDED_SAA7146_V4L_V4L__
+#define __INCLUDED_SAA7146_V4L_V4L__
+
+/************************************************************************/
+/* ADDRESSING 								*/
+/************************************************************************/
+
+#define SAA7146_V4L_BASE	100
+
+#define	SAA7146_V4L_GPICT	    	_IOW('d', (SAA7146_V4L_BASE+ 1), struct video_picture)
+#define	SAA7146_V4L_SPICT	    	_IOW('d', (SAA7146_V4L_BASE+ 2), struct video_picture)
+
+#define	SAA7146_V4L_GFBUF	    	_IOW('d', (SAA7146_V4L_BASE+ 3), struct video_buffer)
+#define	SAA7146_V4L_SFBUF	    	_IOW('d', (SAA7146_V4L_BASE+ 4), struct video_buffer)
+
+#define	SAA7146_V4L_GMBUF	    	_IOW('d', (SAA7146_V4L_BASE+ 5), struct video_mbuf)
+
+#define	SAA7146_V4L_SWIN	    	_IOW('d', (SAA7146_V4L_BASE+ 6), struct video_window)
+
+#define	SAA7146_V4L_CCAPTURE    	_IOW('d', (SAA7146_V4L_BASE+ 7), int)
+
+#define	SAA7146_V4L_CMCAPTURE		_IOW('d', (SAA7146_V4L_BASE+ 8), struct video_mmap)
+#define	SAA7146_V4L_CSYNC    		_IOW('d', (SAA7146_V4L_BASE+ 9), int)
+#define	SAA7146_V4L_CGSTATUS   		_IOW('d', (SAA7146_V4L_BASE+10), int)
+
+#define	SAA7146_V4L_TSCAPTURE  		_IOW('d', (SAA7146_V4L_BASE+11), int)
+
+extern int saa7146_v4l_init (void);
+extern void saa7146_v4l_exit (void);
+
+#endif
+
diff -Nru a/drivers/media/dvb/dvb-core/Kconfig b/drivers/media/dvb/dvb-core/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,17 @@
+config DVB_CORE
+	tristate "DVB Core Support"
+	depends on DVB
+	help
+	  DVB core utility functions for device handling, software fallbacks etc.
+
+	  Say Y when you have a DVB card and want to use it. If unsure say N.
+
+config DVB_DEVFS_ONLY
+	bool "devfs only"
+	depends on DVB_CORE=y && DEVFS_FS
+	help
+	  Drop support for old major/minor device scheme and support only devfs 
+	  systems. This saves some code.
+
+	  If unsure say N.
+
diff -Nru a/drivers/media/dvb/dvb-core/Makefile b/drivers/media/dvb/dvb-core/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/Makefile	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,13 @@
+#
+# Makefile for the kernel DVB device drivers.
+#
+
+export-objs     := dvb_ksyms.o
+
+dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \
+		dvb_frontend.o dvb_i2c.o dvb_net.o dvb_ksyms.o
+
+obj-$(CONFIG_DVB_CORE) += dvb-core.o
+
+include $(TOPDIR)/Rules.make
+
diff -Nru a/drivers/media/dvb/dvb-core/compat.h b/drivers/media/dvb/dvb-core/compat.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/compat.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,24 @@
+#ifndef __CRAP_H
+#define __CRAP_H
+
+/**
+ *  compatibility crap for old kernels. No guarantee for a working driver
+ *  even when everything compiles.
+ */
+
+
+#include <linux/module.h>
+#include <linux/list.h>
+
+#ifndef MODULE_LICENSE
+#define MODULE_LICENSE(x)
+#endif
+
+#ifndef list_for_each_safe
+#define list_for_each_safe(pos, n, head) \
+        for (pos = (head)->next, n = pos->next; pos != (head); \
+                pos = n, n = pos->next)
+#endif
+
+#endif
+
diff -Nru a/drivers/media/dvb/dvb-core/demux.h b/drivers/media/dvb/dvb-core/demux.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/demux.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,301 @@
+/* demux.h 
+ *
+ * Copyright (c) 2002 Convergence GmbH
+ * 
+ * based on code:
+ * Copyright (c) 2000 Nokia Research Center
+ *                    Tampere, FINLAND
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 __DEMUX_H 
+#define __DEMUX_H 
+
+#ifndef __KERNEL__ 
+#define __KERNEL__ 
+#endif 
+
+#include <linux/types.h>
+#include <linux/list.h> 
+#include <linux/time.h> 
+#include <linux/errno.h>
+
+/*--------------------------------------------------------------------------*/ 
+/* Common definitions */ 
+/*--------------------------------------------------------------------------*/ 
+
+/*
+ * DMX_MAX_FILTER_SIZE: Maximum length (in bytes) of a section/PES filter.
+ */ 
+
+#ifndef DMX_MAX_FILTER_SIZE 
+#define DMX_MAX_FILTER_SIZE 18
+#endif 
+
+/*
+ * dmx_success_t: Success codes for the Demux Callback API. 
+ */ 
+
+typedef enum { 
+  DMX_OK = 0, /* Received Ok */ 
+  DMX_LENGTH_ERROR, /* Incorrect length */ 
+  DMX_OVERRUN_ERROR, /* Receiver ring buffer overrun */ 
+  DMX_CRC_ERROR, /* Incorrect CRC */ 
+  DMX_FRAME_ERROR, /* Frame alignment error */ 
+  DMX_FIFO_ERROR, /* Receiver FIFO overrun */ 
+  DMX_MISSED_ERROR /* Receiver missed packet */ 
+} dmx_success_t; 
+
+/*--------------------------------------------------------------------------*/ 
+/* TS packet reception */ 
+/*--------------------------------------------------------------------------*/
+
+/* TS filter type for set() */
+
+#define TS_PACKET       1   /* send TS packets (188 bytes) to callback (default) */ 
+#define	TS_PAYLOAD_ONLY 2   /* in case TS_PACKET is set, only send the TS
+			       payload (<=184 bytes per packet) to callback */
+#define TS_DECODER      4   /* send stream to built-in decoder (if present) */
+
+/* PES type for filters which write to built-in decoder */
+/* these should be kept identical to the types in dmx.h */
+
+typedef enum
+{  /* also send packets to decoder (if it exists) */
+        DMX_TS_PES_AUDIO0,
+	DMX_TS_PES_VIDEO0,
+	DMX_TS_PES_TELETEXT0,
+	DMX_TS_PES_SUBTITLE0,
+	DMX_TS_PES_PCR0,
+
+        DMX_TS_PES_AUDIO1,
+	DMX_TS_PES_VIDEO1,
+	DMX_TS_PES_TELETEXT1,
+	DMX_TS_PES_SUBTITLE1,
+	DMX_TS_PES_PCR1,
+
+        DMX_TS_PES_AUDIO2,
+	DMX_TS_PES_VIDEO2,
+	DMX_TS_PES_TELETEXT2,
+	DMX_TS_PES_SUBTITLE2,
+	DMX_TS_PES_PCR2,
+
+        DMX_TS_PES_AUDIO3,
+	DMX_TS_PES_VIDEO3,
+	DMX_TS_PES_TELETEXT3,
+	DMX_TS_PES_SUBTITLE3,
+	DMX_TS_PES_PCR3,
+
+	DMX_TS_PES_OTHER
+} dmx_ts_pes_t;
+
+#define DMX_TS_PES_AUDIO    DMX_TS_PES_AUDIO0
+#define DMX_TS_PES_VIDEO    DMX_TS_PES_VIDEO0
+#define DMX_TS_PES_TELETEXT DMX_TS_PES_TELETEXT0
+#define DMX_TS_PES_SUBTITLE DMX_TS_PES_SUBTITLE0
+#define DMX_TS_PES_PCR      DMX_TS_PES_PCR0
+
+
+struct dmx_ts_feed_s { 
+        int is_filtering; /* Set to non-zero when filtering in progress */
+        struct dmx_demux_s *parent; /* Back-pointer */
+        void *priv; /* Pointer to private data of the API client */ 
+        int (*set) (struct dmx_ts_feed_s *feed, 
+		    uint16_t pid,
+		    int type, 
+		    dmx_ts_pes_t pes_type,
+		    size_t callback_length, 
+		    size_t circular_buffer_size, 
+		    int descramble, 
+		    struct timespec timeout); 
+        int (*start_filtering) (struct dmx_ts_feed_s* feed); 
+        int (*stop_filtering) (struct dmx_ts_feed_s* feed); 
+};
+
+typedef struct dmx_ts_feed_s dmx_ts_feed_t; 
+
+/*--------------------------------------------------------------------------*/ 
+/* Section reception */ 
+/*--------------------------------------------------------------------------*/ 
+
+typedef struct { 
+        __u8 filter_value [DMX_MAX_FILTER_SIZE]; 
+        __u8 filter_mask [DMX_MAX_FILTER_SIZE]; 
+        __u8 filter_mode [DMX_MAX_FILTER_SIZE]; 
+        struct dmx_section_feed_s* parent; /* Back-pointer */ 
+        void* priv; /* Pointer to private data of the API client */ 
+} dmx_section_filter_t;
+
+struct dmx_section_feed_s { 
+        int is_filtering; /* Set to non-zero when filtering in progress */ 
+        struct dmx_demux_s* parent; /* Back-pointer */
+        void* priv; /* Pointer to private data of the API client */ 
+        int (*set) (struct dmx_section_feed_s* feed, 
+		    __u16 pid, 
+		    size_t circular_buffer_size, 
+		    int descramble, 
+		    int check_crc); 
+        int (*allocate_filter) (struct dmx_section_feed_s* feed, 
+				dmx_section_filter_t** filter); 
+        int (*release_filter) (struct dmx_section_feed_s* feed, 
+			       dmx_section_filter_t* filter); 
+        int (*start_filtering) (struct dmx_section_feed_s* feed); 
+        int (*stop_filtering) (struct dmx_section_feed_s* feed); 
+};
+typedef struct dmx_section_feed_s dmx_section_feed_t; 
+
+/*--------------------------------------------------------------------------*/ 
+/* Callback functions */ 
+/*--------------------------------------------------------------------------*/ 
+
+typedef int (*dmx_ts_cb) ( __u8 * buffer1, 
+			   size_t buffer1_length,
+			   __u8 * buffer2, 
+			   size_t buffer2_length,
+			   dmx_ts_feed_t* source, 
+			   dmx_success_t success); 
+
+typedef int (*dmx_section_cb) (	__u8 * buffer1,
+				size_t buffer1_len,
+				__u8 * buffer2, 
+				size_t buffer2_len,
+			       	dmx_section_filter_t * source,
+			       	dmx_success_t success);
+
+/*--------------------------------------------------------------------------*/ 
+/* DVB Front-End */
+/*--------------------------------------------------------------------------*/ 
+
+typedef enum { 
+	DMX_MEMORY_FE,
+	DMX_FRONTEND_0,
+	DMX_FRONTEND_1,
+	DMX_FRONTEND_2,
+	DMX_FRONTEND_3,
+	DMX_STREAM_0,    /* external stream input, e.g. LVDS */
+	DMX_STREAM_1,
+	DMX_STREAM_2,
+	DMX_STREAM_3
+} dmx_frontend_source_t; 
+
+typedef struct { 
+        /* The following char* fields point to NULL terminated strings */ 
+        char* id;                    /* Unique front-end identifier */ 
+        char* vendor;                /* Name of the front-end vendor */ 
+        char* model;                 /* Name of the front-end model */ 
+        struct list_head connectivity_list; /* List of front-ends that can 
+					       be connected to a particular 
+					       demux */ 
+        void* priv;     /* Pointer to private data of the API client */ 
+        dmx_frontend_source_t source;
+} dmx_frontend_t;
+
+/*--------------------------------------------------------------------------*/ 
+/* MPEG-2 TS Demux */ 
+/*--------------------------------------------------------------------------*/ 
+
+/* 
+ * Flags OR'ed in the capabilites field of struct dmx_demux_s. 
+ */ 
+
+#define DMX_TS_FILTERING                        1 
+#define DMX_PES_FILTERING                       2 
+#define DMX_SECTION_FILTERING                   4 
+#define DMX_MEMORY_BASED_FILTERING              8    /* write() available */ 
+#define DMX_CRC_CHECKING                        16 
+#define DMX_TS_DESCRAMBLING                     32 
+#define DMX_SECTION_PAYLOAD_DESCRAMBLING        64 
+#define DMX_MAC_ADDRESS_DESCRAMBLING            128 
+
+/* 
+ * Demux resource type identifier. 
+*/ 
+
+/* 
+ * DMX_FE_ENTRY(): Casts elements in the list of registered 
+ * front-ends from the generic type struct list_head
+ * to the type * dmx_frontend_t
+ *. 
+*/
+
+#define DMX_FE_ENTRY(list) list_entry(list, dmx_frontend_t, connectivity_list) 
+
+struct dmx_demux_s { 
+        /* The following char* fields point to NULL terminated strings */ 
+        char* id;                    /* Unique demux identifier */ 
+        char* vendor;                /* Name of the demux vendor */ 
+        char* model;                 /* Name of the demux model */ 
+        __u32 capabilities;          /* Bitfield of capability flags */ 
+        dmx_frontend_t* frontend;    /* Front-end connected to the demux */ 
+        struct list_head reg_list;   /* List of registered demuxes */
+        void* priv;                  /* Pointer to private data of the API client */ 
+        int users;                   /* Number of users */
+        int (*open) (struct dmx_demux_s* demux); 
+        int (*close) (struct dmx_demux_s* demux); 
+        int (*write) (struct dmx_demux_s* demux, const char* buf, size_t count); 
+        int (*allocate_ts_feed) (struct dmx_demux_s* demux, 
+				 dmx_ts_feed_t** feed, 
+				 dmx_ts_cb callback); 
+        int (*release_ts_feed) (struct dmx_demux_s* demux, 
+				dmx_ts_feed_t* feed); 
+        int (*allocate_section_feed) (struct dmx_demux_s* demux, 
+				      dmx_section_feed_t** feed, 
+				      dmx_section_cb callback); 
+        int (*release_section_feed) (struct dmx_demux_s* demux,
+				     dmx_section_feed_t* feed); 
+        int (*descramble_mac_address) (struct dmx_demux_s* demux, 
+				       __u8* buffer1, 
+				       size_t buffer1_length, 
+				       __u8* buffer2, 
+				       size_t buffer2_length,
+				       __u16 pid); 
+        int (*descramble_section_payload) (struct dmx_demux_s* demux,
+					   __u8* buffer1, 
+					   size_t buffer1_length,
+					   __u8* buffer2, size_t buffer2_length,
+					   __u16 pid); 
+        int (*add_frontend) (struct dmx_demux_s* demux, 
+			     dmx_frontend_t* frontend); 
+        int (*remove_frontend) (struct dmx_demux_s* demux,
+				dmx_frontend_t* frontend); 
+        struct list_head* (*get_frontends) (struct dmx_demux_s* demux); 
+        int (*connect_frontend) (struct dmx_demux_s* demux, 
+				 dmx_frontend_t* frontend); 
+        int (*disconnect_frontend) (struct dmx_demux_s* demux); 
+
+        int (*get_pes_pids) (struct dmx_demux_s* demux, __u16 *pids);
+}; 
+typedef struct dmx_demux_s dmx_demux_t; 
+
+/*--------------------------------------------------------------------------*/ 
+/* Demux directory */ 
+/*--------------------------------------------------------------------------*/ 
+
+/* 
+ * DMX_DIR_ENTRY(): Casts elements in the list of registered 
+ * demuxes from the generic type struct list_head* to the type dmx_demux_t
+ *. 
+ */ 
+
+#define DMX_DIR_ENTRY(list) list_entry(list, dmx_demux_t, reg_list)
+
+int dmx_register_demux (dmx_demux_t* demux); 
+int dmx_unregister_demux (dmx_demux_t* demux); 
+struct list_head* dmx_get_demuxes (void); 
+
+#endif /* #ifndef __DEMUX_H */
+
diff -Nru a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dmxdev.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1113 @@
+/* 
+ * dmxdev.c - DVB demultiplexer device 
+ *
+ * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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/vmalloc.h>
+#include <linux/module.h>
+#include <linux/poll.h>
+#include <asm/uaccess.h>
+
+#include "dmxdev.h"
+
+
+//MODULE_DESCRIPTION("");
+//MODULE_AUTHOR("Ralph Metzler, Marcus Metzler");
+//#ifdef MODULE_LICENSE
+//MODULE_LICENSE("GPL");
+//#endif
+MODULE_PARM(debug,"i");
+static int debug = 0;
+
+#define dprintk	if (debug) printk
+
+inline dmxdev_filter_t *
+DmxDevFile2Filter(struct file *file)
+{
+        return (dmxdev_filter_t *) file->private_data;
+}
+
+inline dmxdev_dvr_t *
+DmxDevFile2DVR(dmxdev_t *dmxdev, struct file *file)
+{
+        return (dmxdev_dvr_t *) file->private_data;
+}
+
+static inline void 
+DmxDevBufferInit(dmxdev_buffer_t *buffer) 
+{
+        buffer->data=0;
+        buffer->size=8192;
+        buffer->pread=0;
+        buffer->pwrite=0;
+        buffer->error=0;
+        init_waitqueue_head(&buffer->queue);
+}
+
+static inline int 
+DmxDevBufferWrite(dmxdev_buffer_t *buf, uint8_t *src, int len) 
+{
+        int split;
+        int free;
+        int todo;
+
+	if (!len)
+	        return 0;
+	if (!buf->data)
+	        return 0;
+	
+        free=buf->pread-buf->pwrite;
+        split=0;
+        if (free<=0) {
+                free+=buf->size;
+                split=buf->size-buf->pwrite;
+        }
+        if (len>=free) {
+		dprintk("dmxdev: buffer overflow\n");
+                return -1;
+	}
+        if (split>=len)
+                split=0;
+        todo=len;
+        if (split) {
+                memcpy(buf->data + buf->pwrite, src, split);
+                todo-=split;
+                buf->pwrite=0;
+        }
+        memcpy(buf->data + buf->pwrite, src+split, todo);
+        buf->pwrite=(buf->pwrite+todo)%buf->size;
+        return len;
+}
+
+static ssize_t 
+DmxDevBufferRead(dmxdev_buffer_t *src, int non_blocking, 
+		 char *buf, size_t count, loff_t *ppos)
+{
+        unsigned long todo=count;
+        int split, avail, error;
+	
+	if (!src->data)
+	        return 0;
+
+	if ((error=src->error)) {
+	        src->error=0;
+		return error; 
+	}
+
+	if (non_blocking && (src->pwrite==src->pread))
+	        return -EWOULDBLOCK;
+
+        while (todo>0) {
+	        if (non_blocking && (src->pwrite==src->pread))
+		        return (count-todo) ? (count-todo) : -EWOULDBLOCK;
+
+	        if (wait_event_interruptible(src->queue,
+					     (src->pread!=src->pwrite) ||
+					     (src->error))<0)
+		        return count-todo;
+
+		if ((error=src->error)) {
+		        src->error=0;
+			return error; 
+		}
+		
+                split=src->size;
+                avail=src->pwrite - src->pread;
+                if (avail<0) {
+                        avail+=src->size;
+                        split=src->size - src->pread;
+                }
+                if (avail>todo)
+                        avail=todo;
+                if (split<avail) {
+                        if (copy_to_user(buf, src->data+src->pread, split))
+                                  return -EFAULT;
+                        buf+=split;
+                        src->pread=0;
+                        todo-=split;
+                        avail-=split;
+                }
+                if (avail) {
+                        if (copy_to_user(buf, src->data+src->pread, avail))
+                                return -EFAULT;
+                        src->pread = (src->pread + avail) % src->size;
+                        todo-=avail;
+                        buf+=avail;
+                }
+        }
+        return count;
+}
+
+static dmx_frontend_t *
+get_fe(dmx_demux_t *demux, int type)
+{
+        struct list_head *head, *pos;
+
+        head=demux->get_frontends(demux);
+	if (!head)
+	        return 0;
+	list_for_each(pos, head)
+	        if (DMX_FE_ENTRY(pos)->source==type)
+		        return DMX_FE_ENTRY(pos);
+	
+	return 0;
+}
+
+static inline void 
+DmxDevDVRStateSet(dmxdev_dvr_t *dmxdevdvr, int state)
+{
+        spin_lock_irq(&dmxdevdvr->dev->lock);
+        dmxdevdvr->state=state;
+	spin_unlock_irq(&dmxdevdvr->dev->lock);
+}
+
+static int dvb_dvr_open(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+        dmx_frontend_t *front;
+
+        dprintk ("function : %s\n", __FUNCTION__);
+
+        if (down_interruptible (&dmxdev->mutex))
+		return -ERESTARTSYS;
+	
+	if ((file->f_flags&O_ACCMODE)==O_RDWR) {
+	        if (!(dmxdev->capabilities&DMXDEV_CAP_DUPLEX)) {
+			up(&dmxdev->mutex);
+		        return -EOPNOTSUPP;
+		}
+	}
+
+	if ((file->f_flags&O_ACCMODE)==O_RDONLY) {
+	      DmxDevBufferInit(&dmxdev->dvr_buffer);
+	      dmxdev->dvr_buffer.size=DVR_BUFFER_SIZE;
+	      dmxdev->dvr_buffer.data=vmalloc(DVR_BUFFER_SIZE);
+	      if (!dmxdev->dvr_buffer.data) {
+		      up(&dmxdev->mutex);
+	              return -ENOMEM;
+	      }
+	}
+
+	if ((file->f_flags&O_ACCMODE)==O_WRONLY) {
+	        dmxdev->dvr_orig_fe=dmxdev->demux->frontend;
+		
+		if (!dmxdev->demux->write) {
+			up(&dmxdev->mutex);
+			return -EOPNOTSUPP;
+		}
+		
+		front=get_fe(dmxdev->demux, DMX_MEMORY_FE);
+		
+		if (!front) {
+			up(&dmxdev->mutex);
+		        return -EINVAL;
+		}
+		dmxdev->demux->disconnect_frontend(dmxdev->demux);	
+		dmxdev->demux->connect_frontend(dmxdev->demux, front);	
+	}
+        up(&dmxdev->mutex);
+        return 0;
+}
+
+static int dvb_dvr_release(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+
+        if (down_interruptible (&dmxdev->mutex))
+		return -ERESTARTSYS;
+
+	if ((file->f_flags&O_ACCMODE)==O_WRONLY) {
+	        dmxdev->demux->disconnect_frontend(dmxdev->demux);	
+		dmxdev->demux->connect_frontend(dmxdev->demux, 
+						dmxdev->dvr_orig_fe);
+	}
+	if ((file->f_flags&O_ACCMODE)==O_RDONLY) {
+		if (dmxdev->dvr_buffer.data) {
+		        void *mem=dmxdev->dvr_buffer.data;
+			mb();
+			spin_lock_irq(&dmxdev->lock);
+			dmxdev->dvr_buffer.data=0;
+			spin_unlock_irq(&dmxdev->lock);
+		        vfree(mem);
+		}
+	}
+        up(&dmxdev->mutex);
+	return 0;
+}
+
+static ssize_t 
+dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+	int ret;
+
+        if (!dmxdev->demux->write)
+	        return -EOPNOTSUPP;
+	if ((file->f_flags&O_ACCMODE)!=O_WRONLY)
+	        return -EINVAL;
+        if (down_interruptible (&dmxdev->mutex))
+		return -ERESTARTSYS;
+        ret=dmxdev->demux->write(dmxdev->demux, buf, count);
+        up(&dmxdev->mutex);
+	return ret;
+}
+
+static ssize_t 
+dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+	int ret;
+
+        //down(&dmxdev->mutex);
+        ret= DmxDevBufferRead(&dmxdev->dvr_buffer, 
+			      file->f_flags&O_NONBLOCK, 
+			      buf, count, ppos);
+        //up(&dmxdev->mutex);
+	return ret;
+}
+
+static inline void 
+DmxDevFilterStateSet(dmxdev_filter_t *dmxdevfilter, int state)
+{
+        spin_lock_irq(&dmxdevfilter->dev->lock);
+        dmxdevfilter->state=state;
+	spin_unlock_irq(&dmxdevfilter->dev->lock);
+}
+
+static int 
+DmxDevSetBufferSize(dmxdev_filter_t *dmxdevfilter, unsigned long size)
+{
+	dmxdev_buffer_t *buf=&dmxdevfilter->buffer;
+	void *mem;
+
+	if (buf->size==size)
+	        return 0;
+        if (dmxdevfilter->state>=DMXDEV_STATE_GO)
+                return -EBUSY;
+	spin_lock_irq(&dmxdevfilter->dev->lock);
+	mem=buf->data;
+	buf->data=0;
+	buf->size=size;
+	buf->pwrite=buf->pread=0;    
+	spin_unlock_irq(&dmxdevfilter->dev->lock);
+        if (mem) 
+		vfree(mem);
+		
+        if (buf->size) {
+	        mem=vmalloc(dmxdevfilter->buffer.size);
+		if (!mem)
+		        return -ENOMEM;
+	        spin_lock_irq(&dmxdevfilter->dev->lock);
+                buf->data=mem;
+	        spin_unlock_irq(&dmxdevfilter->dev->lock);
+	}
+	return 0;
+}
+
+static void
+DmxDevFilterTimeout(unsigned long data)
+{
+        dmxdev_filter_t *dmxdevfilter=(dmxdev_filter_t *)data;
+	
+	dmxdevfilter->buffer.error=-ETIMEDOUT;
+        spin_lock_irq(&dmxdevfilter->dev->lock);
+	dmxdevfilter->state=DMXDEV_STATE_TIMEDOUT;
+        spin_unlock_irq(&dmxdevfilter->dev->lock);
+	wake_up(&dmxdevfilter->buffer.queue);
+}
+
+static void
+DmxDevFilterTimer(dmxdev_filter_t *dmxdevfilter)
+{
+        struct dmx_sct_filter_params *para=&dmxdevfilter->params.sec;
+  
+	del_timer(&dmxdevfilter->timer);
+	if (para->timeout) {
+	        dmxdevfilter->timer.function=DmxDevFilterTimeout;
+		dmxdevfilter->timer.data=(unsigned long) dmxdevfilter;
+		dmxdevfilter->timer.expires=jiffies+1+(HZ/2+HZ*para->timeout)/1000;
+		add_timer(&dmxdevfilter->timer);
+	}
+}
+
+static int 
+DmxDevSectionCallback(u8 *buffer1, size_t buffer1_len,
+		      u8 *buffer2, size_t buffer2_len,
+		      dmx_section_filter_t *filter,
+		      dmx_success_t success)
+{
+        dmxdev_filter_t *dmxdevfilter=(dmxdev_filter_t *) filter->priv;
+        int ret;
+        
+	if (dmxdevfilter->buffer.error) {
+		wake_up(&dmxdevfilter->buffer.queue);
+	        return 0;
+	}
+	spin_lock(&dmxdevfilter->dev->lock);
+	if (dmxdevfilter->state!=DMXDEV_STATE_GO) {
+		spin_unlock(&dmxdevfilter->dev->lock);
+	        return 0;
+	}
+	del_timer(&dmxdevfilter->timer);
+	dprintk("dmxdev: section callback %02x %02x %02x %02x %02x %02x\n", 
+		buffer1[0], buffer1[1], 
+		buffer1[2], buffer1[3], 
+		buffer1[4], buffer1[5]);
+        ret=DmxDevBufferWrite(&dmxdevfilter->buffer, buffer1, buffer1_len);
+        if (ret==buffer1_len) {
+	        ret=DmxDevBufferWrite(&dmxdevfilter->buffer, buffer2, buffer2_len);
+	}
+        if (ret<0) {
+	        dmxdevfilter->buffer.pwrite=dmxdevfilter->buffer.pread;    
+	        dmxdevfilter->buffer.error=-EOVERFLOW;
+	}
+	if (dmxdevfilter->params.sec.flags&DMX_ONESHOT)
+	        dmxdevfilter->state=DMXDEV_STATE_DONE;
+	spin_unlock(&dmxdevfilter->dev->lock);
+	wake_up(&dmxdevfilter->buffer.queue);
+	return 0;
+}
+
+static int 
+DmxDevTSCallback(u8 *buffer1, size_t buffer1_len,
+		 u8 *buffer2, size_t buffer2_len,
+		 dmx_ts_feed_t *feed,
+		 dmx_success_t success)
+{
+        dmxdev_filter_t *dmxdevfilter=(dmxdev_filter_t *) feed->priv;
+	dmxdev_buffer_t *buffer;
+        int ret;
+        
+	spin_lock(&dmxdevfilter->dev->lock);
+	if (dmxdevfilter->params.pes.output==DMX_OUT_DECODER) {
+		spin_unlock(&dmxdevfilter->dev->lock);
+		return 0;
+	}
+
+	if (dmxdevfilter->params.pes.output==DMX_OUT_TAP)
+	        buffer=&dmxdevfilter->buffer;
+	else
+	        buffer=&dmxdevfilter->dev->dvr_buffer;
+	if (buffer->error) {
+		spin_unlock(&dmxdevfilter->dev->lock);
+		wake_up(&buffer->queue);
+	        return 0;
+	}
+        ret=DmxDevBufferWrite(buffer, buffer1, buffer1_len);
+        if (ret==buffer1_len) 
+	        ret=DmxDevBufferWrite(buffer, buffer2, buffer2_len);
+        if (ret<0) {
+	        buffer->pwrite=buffer->pread;    
+	        buffer->error=-EOVERFLOW;
+	}
+	spin_unlock(&dmxdevfilter->dev->lock);
+	wake_up(&buffer->queue);
+	return 0;
+}
+
+
+/* stop feed but only mark the specified filter as stopped (state set) */
+
+static int 
+DmxDevFeedStop(dmxdev_filter_t *dmxdevfilter)
+{
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_SET);
+
+	switch (dmxdevfilter->type) {
+	case DMXDEV_TYPE_SEC:
+	        del_timer(&dmxdevfilter->timer);
+	        dmxdevfilter->feed.sec->stop_filtering(dmxdevfilter->feed.sec);
+		break;
+	case DMXDEV_TYPE_PES:
+	        dmxdevfilter->feed.ts->stop_filtering(dmxdevfilter->feed.ts);
+		break;
+	default:
+	        return -EINVAL;
+	}
+        return 0;
+}
+
+
+/* start feed associated with the specified filter */
+
+static int 
+DmxDevFeedStart(dmxdev_filter_t *dmxdevfilter)
+{
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_GO);
+
+	switch (dmxdevfilter->type) {
+	case DMXDEV_TYPE_SEC:
+	        dmxdevfilter->feed.sec->start_filtering(dmxdevfilter->feed.sec);
+		break;
+	case DMXDEV_TYPE_PES:
+	        dmxdevfilter->feed.ts->start_filtering(dmxdevfilter->feed.ts);
+		break;
+	default:
+	        return -EINVAL;
+	}
+        return 0;
+}
+
+
+/* restart section feed if it has filters left associated with it, 
+   otherwise release the feed */
+
+static int 
+DmxDevFeedRestart(dmxdev_filter_t *dmxdevfilter)
+{
+	int i;
+	dmxdev_t *dmxdev=dmxdevfilter->dev;
+	uint16_t pid=dmxdevfilter->params.sec.pid;
+	
+	for (i=0; i<dmxdev->filternum; i++) 
+		if (dmxdev->filter[i].state>=DMXDEV_STATE_GO &&
+		    dmxdev->filter[i].type==DMXDEV_TYPE_SEC &&
+		    dmxdev->filter[i].pid==pid) {
+			DmxDevFeedStart(&dmxdev->filter[i]);
+			return 0;
+		}
+	
+	dmxdevfilter->dev->demux->
+		release_section_feed(dmxdev->demux,
+				     dmxdevfilter->feed.sec);
+
+        return 0;
+}
+
+static int 
+DmxDevFilterStop(dmxdev_filter_t *dmxdevfilter)
+{
+        if (dmxdevfilter->state<DMXDEV_STATE_GO) 
+	        return 0;
+
+	switch (dmxdevfilter->type) {
+	case DMXDEV_TYPE_SEC:
+	        if (!dmxdevfilter->feed.sec)
+		        break;
+	        DmxDevFeedStop(dmxdevfilter);
+	        if (dmxdevfilter->filter.sec)
+		        dmxdevfilter->feed.sec->
+				release_filter(dmxdevfilter->feed.sec,
+					       dmxdevfilter->filter.sec);
+	        DmxDevFeedRestart(dmxdevfilter);
+		dmxdevfilter->feed.sec=0;
+		break;
+	case DMXDEV_TYPE_PES:
+	        if (!dmxdevfilter->feed.ts)
+		        break;
+	        DmxDevFeedStop(dmxdevfilter);
+	        dmxdevfilter->dev->demux->
+			release_ts_feed(dmxdevfilter->dev->demux,
+					dmxdevfilter->feed.ts);
+		dmxdevfilter->feed.ts=0;
+		break;
+	default:
+		if (dmxdevfilter->state==DMXDEV_STATE_ALLOCATED) 
+			return 0;
+	        return -EINVAL;
+	}
+	dmxdevfilter->buffer.pwrite=dmxdevfilter->buffer.pread=0;    
+        return 0;
+}
+
+static inline int 
+DmxDevFilterReset(dmxdev_filter_t *dmxdevfilter)
+{
+	if (dmxdevfilter->state<DMXDEV_STATE_SET) 
+		return 0;
+
+	dmxdevfilter->type=DMXDEV_TYPE_NONE;
+	dmxdevfilter->pid=0xffff;
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_ALLOCATED);
+        return 0;
+}
+
+static int 
+DmxDevFilterStart(dmxdev_filter_t *dmxdevfilter)
+{
+	dmxdev_t *dmxdev=dmxdevfilter->dev;
+	void *mem;
+	int ret, i;
+
+        if (dmxdevfilter->state<DMXDEV_STATE_SET) 
+	        return -EINVAL;
+        if (dmxdevfilter->state>=DMXDEV_STATE_GO)
+	        DmxDevFilterStop(dmxdevfilter); 
+
+	mem=dmxdevfilter->buffer.data;
+	if (!mem) {
+                mem=vmalloc(dmxdevfilter->buffer.size);
+	        spin_lock_irq(&dmxdevfilter->dev->lock);
+		dmxdevfilter->buffer.data=mem;
+	        spin_unlock_irq(&dmxdevfilter->dev->lock);
+                if (!dmxdevfilter->buffer.data)
+                        return -ENOMEM;
+	}
+
+	switch (dmxdevfilter->type) {
+	case DMXDEV_TYPE_SEC:
+	{
+		struct dmx_sct_filter_params *para=&dmxdevfilter->params.sec;
+		dmx_section_filter_t **secfilter=&dmxdevfilter->filter.sec;
+		dmx_section_feed_t **secfeed=&dmxdevfilter->feed.sec;
+
+		*secfilter=0;
+		*secfeed=0;
+
+		/* find active filter/feed with same PID */
+		for (i=0; i<dmxdev->filternum; i++) 
+			if (dmxdev->filter[i].state>=DMXDEV_STATE_GO &&
+			    dmxdev->filter[i].pid==para->pid) {
+				if (dmxdev->filter[i].type!=DMXDEV_TYPE_SEC)
+					return -EBUSY;
+				*secfeed=dmxdev->filter[i].feed.sec;
+				break;
+			}
+
+		/* if no feed found, try to allocate new one */ 
+		if (!*secfeed) {
+			ret=dmxdev->demux->
+				allocate_section_feed(dmxdev->demux, 
+						      secfeed, 
+						      DmxDevSectionCallback);
+			if (ret<0) {
+				printk ("DVB (%s): could not alloc feed\n",
+					__FUNCTION__);
+				return ret;
+			}
+			
+			ret=(*secfeed)->set(*secfeed, para->pid, 32768, 0, 
+					    (para->flags & DMX_CHECK_CRC) ? 1 : 0);
+			
+			if (ret<0) {
+				printk ("DVB (%s): could not set feed\n",
+					__FUNCTION__);
+				DmxDevFeedRestart(dmxdevfilter);
+				return ret;
+			}
+		}
+	        else 
+			DmxDevFeedStop(dmxdevfilter);
+			
+		ret=(*secfeed)->allocate_filter(*secfeed, secfilter);
+		if (ret<0) {
+			DmxDevFeedRestart(dmxdevfilter);
+			dmxdevfilter->feed.sec->
+				start_filtering(*secfeed);
+			dprintk ("could not get filter\n");
+			return ret;
+		}
+
+		(*secfilter)->priv=(void *) dmxdevfilter;
+
+		memcpy(&((*secfilter)->filter_value[3]), 
+		       &(para->filter.filter[1]), DMX_FILTER_SIZE-1);
+		memcpy(&(*secfilter)->filter_mask[3], 
+		       &para->filter.mask[1], DMX_FILTER_SIZE-1);
+		memcpy(&(*secfilter)->filter_mode[3], 
+		       &para->filter.mode[1], DMX_FILTER_SIZE-1);
+
+		(*secfilter)->filter_value[0]=para->filter.filter[0];
+		(*secfilter)->filter_mask[0]=para->filter.mask[0];
+		(*secfilter)->filter_mode[0]=para->filter.mode[0];
+		(*secfilter)->filter_mask[1]=0;
+		(*secfilter)->filter_mask[2]=0;
+		
+	        dmxdevfilter->todo=0;
+	        dmxdevfilter->feed.sec->
+			start_filtering(dmxdevfilter->feed.sec);
+	        DmxDevFilterTimer(dmxdevfilter);
+		break;
+	}
+
+	case DMXDEV_TYPE_PES: 
+	{
+		struct timespec timeout = {0 };
+		struct dmx_pes_filter_params *para=&dmxdevfilter->params.pes;
+		dmx_output_t otype;
+		int ret;
+		int ts_type;
+		dmx_ts_pes_t ts_pes;
+		dmx_ts_feed_t **tsfeed=&dmxdevfilter->feed.ts;
+		
+		dmxdevfilter->feed.ts=0;
+		otype=para->output;
+		
+		ts_pes=(dmx_ts_pes_t) para->pes_type;
+		
+		if (ts_pes<DMX_PES_OTHER) 
+			ts_type=TS_DECODER;
+		else
+			ts_type=0;
+		
+		if (otype==DMX_OUT_TS_TAP) 
+			ts_type|=TS_PACKET;
+		
+		if (otype==DMX_OUT_TAP) 
+			ts_type|=TS_PAYLOAD_ONLY|TS_PACKET;
+		
+		ret=dmxdev->demux->allocate_ts_feed(dmxdev->demux, 
+						    tsfeed, 
+						    DmxDevTSCallback);
+		if (ret<0) 
+			return ret;
+
+		(*tsfeed)->priv=(void *) dmxdevfilter;
+		ret=(*tsfeed)->set(*tsfeed, para->pid, ts_type, ts_pes, 188, 32768, 0, timeout);
+		if (ret<0) {
+			dmxdev->demux->
+				release_ts_feed(dmxdev->demux, *tsfeed);
+			return ret;
+		}
+	        dmxdevfilter->feed.ts->
+			start_filtering(dmxdevfilter->feed.ts);
+		break;
+	}
+	default:
+	        return -EINVAL;
+	}
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_GO);
+        return 0;
+}
+
+static int dvb_demux_open(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+        int i;
+        dmxdev_filter_t *dmxdevfilter;
+
+	if (!dmxdev->filter)
+	        return -EINVAL;
+        if (down_interruptible(&dmxdev->mutex))
+		return -ERESTARTSYS;
+        for (i=0; i<dmxdev->filternum; i++)
+                if (dmxdev->filter[i].state==DMXDEV_STATE_FREE)
+                        break;
+        if (i==dmxdev->filternum) {
+	        up(&dmxdev->mutex);
+                return -EMFILE;
+	}
+        dmxdevfilter=&dmxdev->filter[i];
+        dmxdevfilter->dvbdev=dmxdev->dvbdev;
+	file->private_data=dmxdevfilter;
+
+	DmxDevBufferInit(&dmxdevfilter->buffer);
+        dmxdevfilter->type=DMXDEV_TYPE_NONE;
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_ALLOCATED);
+	dmxdevfilter->feed.ts=0;
+	init_timer(&dmxdevfilter->timer);
+
+        up(&dmxdev->mutex);
+        return 0;
+}
+
+int 
+DmxDevFilterFree(dmxdev_t *dmxdev, dmxdev_filter_t *dmxdevfilter)
+{
+        if (down_interruptible(&dmxdev->mutex))
+		return -ERESTARTSYS;
+
+        DmxDevFilterStop(dmxdevfilter);
+	DmxDevFilterReset(dmxdevfilter);
+        
+        if (dmxdevfilter->buffer.data) {
+	        void *mem=dmxdevfilter->buffer.data;
+		
+	        spin_lock_irq(&dmxdev->lock);
+		dmxdevfilter->buffer.data=0;
+	        spin_unlock_irq(&dmxdev->lock);
+		vfree(mem);
+	}
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_FREE);
+	wake_up(&dmxdevfilter->buffer.queue);
+	up(&dmxdev->mutex);
+        return 0;
+}
+
+static inline void 
+invert_mode(dmx_filter_t *filter)
+{
+	int i;
+
+	for (i=0; i<DMX_FILTER_SIZE; i++)
+		filter->mode[i]^=0xff;
+}
+
+
+static int 
+DmxDevFilterSet(dmxdev_t *dmxdev, 
+                dmxdev_filter_t *dmxdevfilter, 
+		struct dmx_sct_filter_params *params)
+{
+        dprintk ("function : %s\n", __FUNCTION__);
+
+	DmxDevFilterStop(dmxdevfilter);
+        
+        dmxdevfilter->type=DMXDEV_TYPE_SEC;
+        dmxdevfilter->pid=params->pid;
+	memcpy(&dmxdevfilter->params.sec, 
+	       params, sizeof(struct dmx_sct_filter_params));
+	invert_mode(&dmxdevfilter->params.sec.filter);
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_SET);
+		
+        if (params->flags&DMX_IMMEDIATE_START) 
+                return DmxDevFilterStart(dmxdevfilter);
+
+        return 0;
+}
+
+static int 
+DmxDevPesFilterSet(dmxdev_t *dmxdev,
+                   dmxdev_filter_t *dmxdevfilter,
+                   struct dmx_pes_filter_params *params)
+{
+	DmxDevFilterStop(dmxdevfilter);
+
+	if (params->pes_type>DMX_PES_OTHER || params->pes_type<0)
+	        return -EINVAL;
+
+        dmxdevfilter->type=DMXDEV_TYPE_PES;
+        dmxdevfilter->pid=params->pid;
+	memcpy(&dmxdevfilter->params, params, sizeof(struct dmx_pes_filter_params));
+
+	DmxDevFilterStateSet(dmxdevfilter, DMXDEV_STATE_SET);
+
+        if (params->flags&DMX_IMMEDIATE_START) 
+                return DmxDevFilterStart(dmxdevfilter);
+
+        return 0;
+}
+
+static ssize_t 
+DmxDevReadSec(dmxdev_filter_t *dfil, struct file *file, 
+	      char *buf, size_t count, loff_t *ppos)
+{
+        int result, hcount;
+	int done=0;
+	
+	if (dfil->todo<=0) {
+	        hcount=3+dfil->todo;
+	        if (hcount>count)
+		        hcount=count;
+		result=DmxDevBufferRead(&dfil->buffer, file->f_flags&O_NONBLOCK, 
+					buf, hcount, ppos);
+		if (result<0) {
+			dfil->todo=0;
+		        return result;
+		}
+		if (copy_from_user(dfil->secheader-dfil->todo, buf, result)) 
+		        return -EFAULT;
+		buf+=result;
+		done=result;
+		count-=result;
+		dfil->todo-=result;
+		if (dfil->todo>-3)
+		        return done;
+		dfil->todo=((dfil->secheader[1]<<8)|dfil->secheader[2])&0xfff;
+		if (!count)
+		        return done;
+	}
+	if (count>dfil->todo)
+	        count=dfil->todo;
+        result=DmxDevBufferRead(&dfil->buffer, file->f_flags&O_NONBLOCK, 
+				buf, count, ppos);
+	if (result<0)
+	        return result;
+	dfil->todo-=result;
+	return (result+done);
+}
+
+
+ssize_t 
+dvb_demux_read(struct file *file, char *buf, size_t count, loff_t *ppos)
+{
+        dmxdev_filter_t *dmxdevfilter=DmxDevFile2Filter(file);
+	//dmxdev_t *dmxdev=dmxdevfilter->dev;
+	int ret=0;
+
+	// semaphore should not be necessary (I hope ...)
+        //down(&dmxdev->mutex);
+	if (dmxdevfilter->type==DMXDEV_TYPE_SEC)
+	        ret=DmxDevReadSec(dmxdevfilter, file, buf, count, ppos);
+	else
+	        ret=DmxDevBufferRead(&dmxdevfilter->buffer, 
+				     file->f_flags&O_NONBLOCK, 
+				     buf, count, ppos);
+        //up(&dmxdev->mutex);
+	return ret;
+}
+
+
+static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
+			      unsigned int cmd, void *parg)
+{
+        dmxdev_filter_t *dmxdevfilter=DmxDevFile2Filter(file);
+	dmxdev_t *dmxdev=dmxdevfilter->dev;
+        unsigned long arg=(unsigned long) parg;
+	int ret=0;
+  
+        if (down_interruptible (&dmxdev->mutex))
+		return -ERESTARTSYS;
+
+	switch (cmd) {
+	case DMX_START: 
+	        if (dmxdevfilter->state<DMXDEV_STATE_SET)
+		        ret=-EINVAL;
+		else
+		        ret=DmxDevFilterStart(dmxdevfilter);
+		break;
+
+	case DMX_STOP: 
+		ret=DmxDevFilterStop(dmxdevfilter);
+		break;
+
+	case DMX_SET_FILTER: 
+		ret=DmxDevFilterSet(dmxdev, dmxdevfilter, 
+				    (struct dmx_sct_filter_params *)parg);
+		break;
+
+	case DMX_SET_PES_FILTER: 
+		ret=DmxDevPesFilterSet(dmxdev, dmxdevfilter, 
+					       (struct dmx_pes_filter_params *)parg);
+		break;
+
+	case DMX_SET_BUFFER_SIZE: 
+	        ret=DmxDevSetBufferSize(dmxdevfilter, arg);
+		break;
+        
+        case DMX_GET_EVENT: 
+	        break;
+		
+        case DMX_GET_PES_PIDS: 
+		if (!dmxdev->demux->get_pes_pids) {
+		        ret=-EINVAL;
+			break;
+		}
+		dmxdev->demux->get_pes_pids(dmxdev->demux, (uint16_t *)parg);
+	        break;
+
+	default:
+	        ret=-EINVAL;
+	}
+        up(&dmxdev->mutex);
+	return ret;
+}
+
+static int dvb_demux_ioctl(struct inode *inode, struct file *file,
+			   unsigned int cmd, unsigned long arg)
+{
+	return generic_usercopy(inode, file, cmd, arg, dvb_demux_do_ioctl);
+}
+
+
+static unsigned int dvb_demux_poll(struct file *file, poll_table *wait)
+{
+        dmxdev_filter_t *dmxdevfilter=DmxDevFile2Filter(file);
+
+	if (!dmxdevfilter)
+	        return -EINVAL;
+
+	if (dmxdevfilter->state==DMXDEV_STATE_FREE)
+	        return 0;
+
+	if (dmxdevfilter->buffer.error)
+	        return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
+
+	if (dmxdevfilter->buffer.pread!=dmxdevfilter->buffer.pwrite)
+	        return (POLLIN | POLLRDNORM | POLLPRI);
+
+	if (dmxdevfilter->state!=DMXDEV_STATE_GO)
+	        return 0;
+
+	poll_wait(file, &dmxdevfilter->buffer.queue, wait);
+                
+	if (dmxdevfilter->state==DMXDEV_STATE_FREE)
+	        return 0;
+
+	if (dmxdevfilter->buffer.error)
+	        return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
+
+	if (dmxdevfilter->buffer.pread!=dmxdevfilter->buffer.pwrite)
+	        return (POLLIN | POLLRDNORM | POLLPRI);
+
+	return 0;
+}
+
+static int dvb_demux_release(struct inode *inode, struct file *file)
+{
+        dmxdev_filter_t *dmxdevfilter=DmxDevFile2Filter(file);
+	dmxdev_t *dmxdev=dmxdevfilter->dev;
+
+	return DmxDevFilterFree(dmxdev, dmxdevfilter);
+}
+
+static struct file_operations dvb_demux_fops = {
+	owner:		THIS_MODULE,
+        read:		dvb_demux_read,
+	write:		0,
+	ioctl:		dvb_demux_ioctl,
+	open:		dvb_demux_open,
+	release:	dvb_demux_release,
+	poll:		dvb_demux_poll,
+};
+
+static dvb_device_t dvbdev_demux = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_demux_fops
+};
+
+static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
+			    unsigned int cmd, void *parg)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+
+	int ret=0;
+
+        if (down_interruptible (&dmxdev->mutex))
+		return -ERESTARTSYS;
+
+	switch (cmd) {
+	case DMX_SET_BUFFER_SIZE: 
+		// FIXME: implement
+	        ret=0;
+		break;
+		
+	default:
+	        ret=-EINVAL;
+	}
+        up(&dmxdev->mutex);
+	return ret;
+}
+
+static int dvb_dvr_ioctl(struct inode *inode, struct file *file,
+			 unsigned int cmd, unsigned long arg)
+{
+	return generic_usercopy(inode, file, cmd, arg, dvb_dvr_do_ioctl);
+}
+
+
+static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dmxdev_t *dmxdev=(dmxdev_t *) dvbdev->priv;
+
+        dprintk ("function : %s\n", __FUNCTION__);
+
+        if ((file->f_flags&O_ACCMODE)==O_RDONLY) {
+		if (dmxdev->dvr_buffer.error)
+			return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
+
+		if (dmxdev->dvr_buffer.pread!=dmxdev->dvr_buffer.pwrite)
+			return (POLLIN | POLLRDNORM | POLLPRI);
+		
+		poll_wait(file, &dmxdev->dvr_buffer.queue, wait);
+		
+		if (dmxdev->dvr_buffer.error)
+			return (POLLIN | POLLRDNORM | POLLPRI | POLLERR);
+
+		if (dmxdev->dvr_buffer.pread!=dmxdev->dvr_buffer.pwrite)
+			return (POLLIN | POLLRDNORM | POLLPRI);
+		
+		return 0;
+	} else 
+	        return (POLLOUT | POLLWRNORM | POLLPRI);
+}
+
+static struct file_operations dvb_dvr_fops = {
+	owner:		THIS_MODULE,
+        read:		dvb_dvr_read,
+	write:		dvb_dvr_write,
+	ioctl:		dvb_dvr_ioctl,
+	open:		dvb_dvr_open,
+	release:	dvb_dvr_release,
+	poll:		dvb_dvr_poll,
+};
+
+static dvb_device_t dvbdev_dvr = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_dvr_fops
+};
+
+int 
+DmxDevInit(dmxdev_t *dmxdev, dvb_adapter_t *dvb_adapter)
+{
+        int i;
+
+	if (dmxdev->demux->open(dmxdev->demux)<0)
+		return -EUSERS;
+	
+	dmxdev->filter=vmalloc(dmxdev->filternum*sizeof(dmxdev_filter_t));
+	if (!dmxdev->filter)
+	        return -ENOMEM;
+
+	dmxdev->dvr=vmalloc(dmxdev->filternum*sizeof(dmxdev_dvr_t));
+	if (!dmxdev->dvr) {
+		vfree(dmxdev->filter);
+		dmxdev->filter=0;
+	        return -ENOMEM;
+	}
+        sema_init(&dmxdev->mutex, 1);
+	spin_lock_init(&dmxdev->lock);
+	for (i=0; i<dmxdev->filternum; i++) {
+                dmxdev->filter[i].dev=dmxdev;
+                dmxdev->filter[i].buffer.data=0;
+	        DmxDevFilterStateSet(&dmxdev->filter[i], DMXDEV_STATE_FREE);
+                dmxdev->dvr[i].dev=dmxdev;
+                dmxdev->dvr[i].buffer.data=0;
+	        DmxDevFilterStateSet(&dmxdev->filter[i], DMXDEV_STATE_FREE);
+	        DmxDevDVRStateSet(&dmxdev->dvr[i], DMXDEV_STATE_FREE);
+	}
+	dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev, DVB_DEVICE_DEMUX);
+	dvb_register_device(dvb_adapter, &dmxdev->dvr_dvbdev, &dvbdev_dvr, dmxdev, DVB_DEVICE_DVR);
+
+	DmxDevBufferInit(&dmxdev->dvr_buffer);
+	MOD_INC_USE_COUNT;
+	return 0;
+}
+
+void 
+DmxDevRelease(dmxdev_t *dmxdev)
+{
+	dvb_unregister_device(dmxdev->dvbdev);
+	dvb_unregister_device(dmxdev->dvr_dvbdev);
+	if (dmxdev->filter) {
+	        vfree(dmxdev->filter);
+		dmxdev->filter=0;
+	}
+	if (dmxdev->dvr) {
+	        vfree(dmxdev->dvr);
+		dmxdev->dvr=0;
+	}
+        dmxdev->demux->close(dmxdev->demux);
+	MOD_DEC_USE_COUNT;
+}
+
+
diff -Nru a/drivers/media/dvb/dvb-core/dmxdev.h b/drivers/media/dvb/dvb-core/dmxdev.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dmxdev.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,128 @@
+/* 
+ * dmxdev.h
+ *
+ * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DMXDEV_H_
+#define _DMXDEV_H_
+
+#ifndef __KERNEL__ 
+#define __KERNEL__ 
+#endif 
+
+#include <linux/dvb/dmx.h>
+
+#include <linux/version.h>
+#include <linux/wait.h>
+#include <linux/types.h>
+#include <linux/fs.h>
+
+#include "dvbdev.h"
+#include "demux.h"
+
+typedef enum {
+	DMXDEV_TYPE_NONE,
+	DMXDEV_TYPE_SEC,
+	DMXDEV_TYPE_PES,
+} dmxdev_type_t;
+
+typedef enum {
+	DMXDEV_STATE_FREE,
+	DMXDEV_STATE_ALLOCATED,
+	DMXDEV_STATE_SET,
+	DMXDEV_STATE_GO,
+	DMXDEV_STATE_DONE,
+	DMXDEV_STATE_TIMEDOUT
+} dmxdev_state_t;
+
+typedef struct dmxdev_buffer_s {
+        uint8_t *data;
+        uint32_t size;
+        int32_t  pread;
+        int32_t  pwrite;
+	wait_queue_head_t queue;
+        int error;
+} dmxdev_buffer_t;
+
+
+typedef struct dmxdev_filter_s {
+	dvb_device_t *dvbdev;
+
+        union {
+	        dmx_section_filter_t *sec;
+	} filter;
+
+        union {
+                dmx_ts_feed_t *ts;
+                dmx_section_feed_t *sec;
+	} feed;
+
+        union {
+	        struct dmx_sct_filter_params sec;
+	        struct dmx_pes_filter_params pes;
+	} params;
+
+        int type;
+        dmxdev_state_t state;
+        struct dmxdev_s *dev;
+        dmxdev_buffer_t buffer;
+
+        // only for sections
+        struct timer_list timer;
+        int todo;
+        uint8_t secheader[3];
+
+        u16 pid;
+} dmxdev_filter_t;
+
+
+typedef struct dmxdev_dvr_s {
+        int state;
+        struct dmxdev_s *dev;
+        dmxdev_buffer_t buffer;
+} dmxdev_dvr_t;
+
+
+typedef struct dmxdev_s {
+	dvb_device_t *dvbdev;
+	dvb_device_t *dvr_dvbdev;
+
+        dmxdev_filter_t *filter;
+        dmxdev_dvr_t *dvr;
+        dmx_demux_t *demux;
+
+        int filternum;
+        int capabilities;
+#define DMXDEV_CAP_DUPLEX 1
+        dmx_frontend_t *dvr_orig_fe;
+
+        dmxdev_buffer_t dvr_buffer;
+#define DVR_BUFFER_SIZE (10*188*1024)
+
+	struct semaphore mutex;
+	spinlock_t lock;
+} dmxdev_t;
+
+
+int DmxDevInit(dmxdev_t *dmxdev, dvb_adapter_t *);
+void DmxDevRelease(dmxdev_t *dmxdev);
+
+#endif /* _DMXDEV_H_ */
diff -Nru a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_demux.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1179 @@
+/* 
+ * dvb_demux.c - DVB kernel demux API
+ *
+ * Copyright (C) 2000-2001 Ralph  Metzler <ralph@convergence.de>
+ *                       & Marcus Metzler <marcus@convergence.de>
+ *                         for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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/vmalloc.h>
+#include <linux/module.h>
+#include <linux/poll.h>
+#include <linux/version.h>
+#include <asm/uaccess.h>
+
+#include "compat.h"
+#include "dvb_demux.h"
+
+#define NOBUFS  
+
+LIST_HEAD(dmx_muxs);
+
+int dmx_register_demux(dmx_demux_t *demux) 
+{
+	struct list_head *pos, *head=&dmx_muxs;
+	
+	if (!(demux->id && demux->vendor && demux->model)) 
+	        return -EINVAL;
+	list_for_each(pos, head) 
+	{
+	        if (!strcmp(DMX_DIR_ENTRY(pos)->id, demux->id))
+		        return -EEXIST;
+	}
+	demux->users=0;
+	list_add(&(demux->reg_list), head);
+	MOD_INC_USE_COUNT;
+	return 0;
+}
+
+int dmx_unregister_demux(dmx_demux_t* demux)
+{
+	struct list_head *pos, *n, *head=&dmx_muxs;
+
+	list_for_each_safe (pos, n, head) 
+	{
+	        if (DMX_DIR_ENTRY(pos)==demux) 
+		{
+		        if (demux->users>0)
+			        return -EINVAL;
+		        list_del(pos);
+		        MOD_DEC_USE_COUNT;
+			return 0;
+		}
+	}
+	return -ENODEV;
+}
+
+
+struct list_head *dmx_get_demuxes(void)
+{
+        if (list_empty(&dmx_muxs))
+	        return NULL;
+
+	return &dmx_muxs;
+}
+
+/******************************************************************************
+ * static inlined helper functions
+ ******************************************************************************/
+
+static inline u16 
+section_length(const u8 *buf)
+{
+        return 3+((buf[1]&0x0f)<<8)+buf[2];
+}
+
+static inline u16 
+ts_pid(const u8 *buf)
+{
+        return ((buf[1]&0x1f)<<8)+buf[2];
+}
+
+static inline int
+payload(const u8 *tsp)
+{
+        if (!(tsp[3]&0x10)) // no payload?
+                return 0;
+        if (tsp[3]&0x20) {  // adaptation field?
+		if (tsp[4]>183)    // corrupted data?
+			return 0;
+		else
+			return 184-1-tsp[4];
+	}
+        return 184;
+}
+
+
+static u32 
+dvb_crc_table[256] = {
+	0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
+	0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
+	0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,
+	0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
+	0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3,
+	0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+	0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef,
+	0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
+	0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb,
+	0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
+	0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
+	0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
+	0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4,
+	0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
+	0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08,
+	0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
+	0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc,
+	0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
+	0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050,
+	0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
+	0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
+	0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
+	0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1,
+	0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
+	0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5,
+	0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
+	0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9,
+	0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
+	0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd,
+	0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
+	0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
+	0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
+	0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2,
+	0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
+	0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e,
+	0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
+	0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a,
+	0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
+	0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676,
+	0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
+	0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
+	0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
+	0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4};
+
+u32 dvb_crc32(u8 *data, int len)
+{
+	int i;
+	u32 crc = 0xffffffff;
+
+	for (i=0; i<len; i++)
+                crc = (crc << 8) ^ dvb_crc_table[((crc >> 24) ^ *data++) & 0xff];
+	return crc;
+}
+
+void dvb_set_crc32(u8 *data, int length)
+{
+        u32 crc;
+
+        crc=dvb_crc32(data,length);
+        data[length]   = (crc>>24)&0xff;
+        data[length+1] = (crc>>16)&0xff;
+        data[length+2] = (crc>>8)&0xff;
+        data[length+3] = (crc)&0xff;
+}
+  
+
+/******************************************************************************
+ * Software filter functions
+ ******************************************************************************/
+
+static inline int
+DvbDmxSWFilterPayload(dvb_demux_feed_t *dvbdmxfeed, const u8 *buf) 
+{
+        int p, count;
+	//int ccok;
+	//u8 cc;
+
+        if (!(count=payload(buf)))
+                return -1;
+        p=188-count;
+        /*
+	cc=buf[3]&0x0f;
+        ccok=((dvbdmxfeed->cc+1)&0x0f)==cc ? 1 : 0;
+        dvbdmxfeed->cc=cc;
+        if (!ccok)
+          printk("missed packet!\n");
+        */
+        if (buf[1]&0x40)  // PUSI ?
+                dvbdmxfeed->peslen=0xfffa;
+        dvbdmxfeed->peslen+=count;
+
+        return dvbdmxfeed->cb.ts((u8 *)&buf[p], count, 0, 0, 
+                                 &dvbdmxfeed->feed.ts, DMX_OK); 
+}
+
+
+static int
+DvbDmxSWFilterSectionFilter(dvb_demux_feed_t *dvbdmxfeed, 
+                            dvb_demux_filter_t *f)
+{
+        dmx_section_filter_t *filter=&f->filter;
+        int i;
+	u8 xor, neq=0;
+
+        for (i=0; i<DVB_DEMUX_MASK_MAX; i++) {
+		xor=filter->filter_value[i]^dvbdmxfeed->secbuf[i];
+		if (f->maskandmode[i]&xor)
+			return 0;
+		neq|=f->maskandnotmode[i]&xor;
+	}
+	if (f->doneq & !neq)
+		return 0;
+
+        return dvbdmxfeed->cb.sec(dvbdmxfeed->secbuf, dvbdmxfeed->seclen, 
+                                  0, 0, filter, DMX_OK); 
+}
+
+static inline int
+DvbDmxSWFilterSectionFeed(dvb_demux_feed_t *dvbdmxfeed)
+{
+        u8 *buf=dvbdmxfeed->secbuf;
+        dvb_demux_filter_t *f;
+
+        if (dvbdmxfeed->secbufp!=dvbdmxfeed->seclen)
+                return -1;
+        if (!dvbdmxfeed->feed.sec.is_filtering)
+                return 0;
+        if (!(f=dvbdmxfeed->filter))
+                return 0;
+        do 
+                if (DvbDmxSWFilterSectionFilter(dvbdmxfeed, f)<0)
+                        return -1;
+        while ((f=f->next) && dvbdmxfeed->feed.sec.is_filtering);
+
+        dvbdmxfeed->secbufp=dvbdmxfeed->seclen=0;
+        memset(buf, 0, DVB_DEMUX_MASK_MAX);
+        return 0;
+}
+
+static inline int
+DvbDmxSWFilterSectionPacket(dvb_demux_feed_t *dvbdmxfeed, const u8 *buf) 
+{
+        int p, count;
+        int ccok, rest;
+	u8 cc;
+
+        if (!(count=payload(buf)))
+                return -1;
+        p=188-count;
+
+	cc=buf[3]&0x0f;
+        ccok=((dvbdmxfeed->cc+1)&0x0f)==cc ? 1 : 0;
+        dvbdmxfeed->cc=cc;
+
+        if (buf[1]&0x40) { // PUSI set
+                // offset to start of first section is in buf[p] 
+		if (p+buf[p]>187) // trash if it points beyond packet
+			return -1;
+                if (buf[p] && ccok) { // rest of previous section?
+                        // did we have enough data in last packet to calc length?
+			int tmp=3-dvbdmxfeed->secbufp;
+                        if (tmp>0 && tmp!=3) {
+				if (p+tmp>=187)
+					return -1;
+                                memcpy(dvbdmxfeed->secbuf+dvbdmxfeed->secbufp,
+                                       buf+p+1, tmp);
+                                dvbdmxfeed->seclen=section_length(dvbdmxfeed->secbuf);
+				if (dvbdmxfeed->seclen>4096) 
+					return -1;
+                        }
+                        rest=dvbdmxfeed->seclen-dvbdmxfeed->secbufp;
+                        if (rest==buf[p] && dvbdmxfeed->seclen) {
+                                memcpy(dvbdmxfeed->secbuf+dvbdmxfeed->secbufp,
+                                       buf+p+1, buf[p]);
+                                dvbdmxfeed->secbufp+=buf[p];
+                                DvbDmxSWFilterSectionFeed(dvbdmxfeed);
+                        }
+                }
+                p+=buf[p]+1; 		// skip rest of last section
+                count=188-p;
+                while (count>0) {
+                        if ((count>2) &&  // enough data to determine sec length?
+                            ((dvbdmxfeed->seclen=section_length(buf+p))<=count)) {
+				if (dvbdmxfeed->seclen>4096) 
+					return -1;
+                                memcpy(dvbdmxfeed->secbuf, buf+p, 
+                                       dvbdmxfeed->seclen);
+                                dvbdmxfeed->secbufp=dvbdmxfeed->seclen;
+                                p+=dvbdmxfeed->seclen;
+                                count=188-p;
+                                DvbDmxSWFilterSectionFeed(dvbdmxfeed);
+
+                                // filling bytes until packet end?
+                                if (count && buf[p]==0xff) 
+                                        count=0;
+                        } else { // section continues to following TS packet
+                                memcpy(dvbdmxfeed->secbuf, buf+p, count);
+                                dvbdmxfeed->secbufp+=count;
+                                count=0;
+                        }
+                }
+		return 0;
+	}
+
+	// section continued below
+	if (!ccok)
+		return -1;
+	if (!dvbdmxfeed->secbufp) // any data in last ts packet?
+		return -1;
+	// did we have enough data in last packet to calc section length?
+	if (dvbdmxfeed->secbufp<3) {
+		int tmp=3-dvbdmxfeed->secbufp;
+		
+		if (tmp>count)
+			return -1;
+		memcpy(dvbdmxfeed->secbuf+dvbdmxfeed->secbufp, buf+p, tmp);
+		dvbdmxfeed->seclen=section_length(dvbdmxfeed->secbuf);
+		if (dvbdmxfeed->seclen>4096) 
+			return -1;
+	}
+	rest=dvbdmxfeed->seclen-dvbdmxfeed->secbufp;
+	if (rest<0)
+		return -1;
+	if (rest<=count) {	// section completed in this TS packet
+		memcpy(dvbdmxfeed->secbuf+dvbdmxfeed->secbufp, buf+p, rest);
+		dvbdmxfeed->secbufp+=rest;
+		DvbDmxSWFilterSectionFeed(dvbdmxfeed);
+	} else 	{	// section continues in following ts packet
+		memcpy(dvbdmxfeed->secbuf+dvbdmxfeed->secbufp, buf+p, count);
+		dvbdmxfeed->secbufp+=count;
+	}
+        return 0;
+}
+
+static inline void 
+DvbDmxSWFilterPacketType(dvb_demux_feed_t *dvbdmxfeed, const u8 *buf)
+{
+        switch(dvbdmxfeed->type) {
+        case DMX_TYPE_TS:
+                if (!dvbdmxfeed->feed.ts.is_filtering)
+                        break;
+                if (dvbdmxfeed->ts_type & TS_PACKET) {
+                        if (dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY)
+                                DvbDmxSWFilterPayload(dvbdmxfeed, buf);
+                        else
+                                dvbdmxfeed->cb.ts((u8 *)buf, 188, 0, 0, 
+                                                  &dvbdmxfeed->feed.ts, DMX_OK); 
+                }
+                if (dvbdmxfeed->ts_type & TS_DECODER) 
+                        if (dvbdmxfeed->demux->write_to_decoder)
+                                dvbdmxfeed->demux->
+                                  write_to_decoder(dvbdmxfeed, (u8 *)buf, 188);
+                break;
+
+        case DMX_TYPE_SEC:
+                if (!dvbdmxfeed->feed.sec.is_filtering)
+                        break;
+                if (DvbDmxSWFilterSectionPacket(dvbdmxfeed, buf)<0)
+                        dvbdmxfeed->seclen=dvbdmxfeed->secbufp=0;
+                break;
+
+        default:
+                break;
+        }
+}
+
+void inline
+DvbDmxSWFilterPacket(dvb_demux_t *dvbdmx, const u8 *buf)
+{
+        dvb_demux_feed_t *dvbdmxfeed;
+
+        if (!(dvbdmxfeed=dvbdmx->pid2feed[ts_pid(buf)]))
+                return;
+        DvbDmxSWFilterPacketType(dvbdmxfeed, buf);
+}
+
+void
+DvbDmxSWFilterPackets(dvb_demux_t *dvbdmx, const u8 *buf, int count)
+{
+        dvb_demux_feed_t *dvbdmxfeed;
+
+	spin_lock(&dvbdmx->lock);
+	if ((dvbdmxfeed=dvbdmx->pid2feed[0x2000]))
+		dvbdmxfeed->cb.ts((u8 *)buf, count*188, 0, 0, 
+				  &dvbdmxfeed->feed.ts, DMX_OK); 
+        while (count) {
+		DvbDmxSWFilterPacket(dvbdmx, buf);
+		count--;
+		buf+=188;
+	}
+	spin_unlock(&dvbdmx->lock);
+}
+
+static inline void
+DvbDmxSWFilter(dvb_demux_t *dvbdmx, const u8 *buf, size_t count)
+{
+        int p=0,i, j;
+        
+        if ((i=dvbdmx->tsbufp)) {
+                if (count<(j=188-i)) {
+                        memcpy(&dvbdmx->tsbuf[i], buf, count);
+                        dvbdmx->tsbufp+=count;
+                        return;
+                }
+                memcpy(&dvbdmx->tsbuf[i], buf, j);
+                DvbDmxSWFilterPacket(dvbdmx, dvbdmx->tsbuf);
+                dvbdmx->tsbufp=0;
+                p+=j;
+        }
+        
+        while (p<count) {
+                if (buf[p]==0x47) {
+                        if (count-p>=188) {
+                                DvbDmxSWFilterPacket(dvbdmx, buf+p);
+                                p+=188;
+                        } else {
+                                i=count-p;
+                                memcpy(dvbdmx->tsbuf, buf+p, i);
+                                dvbdmx->tsbufp=i;
+				return;
+                        }
+                } else 
+                        p++;
+        }
+}
+
+
+/******************************************************************************
+ ******************************************************************************
+ * DVB DEMUX API LEVEL FUNCTIONS
+ ******************************************************************************
+ ******************************************************************************/
+
+static dvb_demux_filter_t *
+DvbDmxFilterAlloc(dvb_demux_t *dvbdmx)
+{
+        int i;
+
+        for (i=0; i<dvbdmx->filternum; i++)
+                if (dvbdmx->filter[i].state==DMX_STATE_FREE)
+                        break;
+        if (i==dvbdmx->filternum)
+                return 0;
+        dvbdmx->filter[i].state=DMX_STATE_ALLOCATED;
+        return &dvbdmx->filter[i];
+}
+
+static dvb_demux_feed_t *
+DvbDmxFeedAlloc(dvb_demux_t *dvbdmx)
+{
+        int i;
+
+        for (i=0; i<dvbdmx->feednum; i++)
+                if (dvbdmx->feed[i].state==DMX_STATE_FREE)
+                        break;
+        if (i==dvbdmx->feednum)
+                return 0;
+        dvbdmx->feed[i].state=DMX_STATE_ALLOCATED;
+        return &dvbdmx->feed[i];
+}
+
+
+/******************************************************************************
+ * dmx_ts_feed API calls
+ ******************************************************************************/
+
+static int 
+dmx_pid_set(u16 pid, dvb_demux_feed_t *dvbdmxfeed)
+{
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+	dvb_demux_feed_t **pid2feed=dvbdmx->pid2feed;
+
+	if (pid>DMX_MAX_PID)
+                return -EINVAL;
+        if (dvbdmxfeed->pid!=0xffff) {
+                if (dvbdmxfeed->pid<=DMX_MAX_PID)
+                        pid2feed[dvbdmxfeed->pid]=0;
+                dvbdmxfeed->pid=0xffff;
+        }
+        if (pid2feed[pid]) {
+                return -EBUSY;
+	}
+        pid2feed[pid]=dvbdmxfeed;
+        dvbdmxfeed->pid=pid;
+	return 0;
+}
+
+
+static int 
+dmx_ts_feed_set(struct dmx_ts_feed_s* feed,
+                u16 pid,
+		int ts_type, 
+		dmx_ts_pes_t pes_type,
+		size_t callback_length, 
+                size_t circular_buffer_size, 
+                int descramble, 
+                struct timespec timeout
+                )
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+	int ret;
+	
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+	if (ts_type & TS_DECODER) {
+                if (pes_type >= DMX_TS_PES_OTHER) {
+			up(&dvbdmx->mutex);
+                        return -EINVAL;
+		}
+                if (dvbdmx->pesfilter[pes_type] && 
+                    (dvbdmx->pesfilter[pes_type]!=dvbdmxfeed)) {
+			up(&dvbdmx->mutex);
+                        return -EINVAL;
+		}
+		if ((pes_type != DMX_TS_PES_PCR0) && 
+		    (pes_type != DMX_TS_PES_PCR1) && 
+		    (pes_type != DMX_TS_PES_PCR2) && 
+		    (pes_type != DMX_TS_PES_PCR3)) {
+			if ((ret=dmx_pid_set(pid, dvbdmxfeed))<0) {
+				up(&dvbdmx->mutex);
+				return ret;
+			} else
+				dvbdmxfeed->pid=pid;
+		}
+                dvbdmx->pesfilter[pes_type]=dvbdmxfeed;
+	        dvbdmx->pids[pes_type]=dvbdmxfeed->pid;
+        } else
+		if ((ret=dmx_pid_set(pid, dvbdmxfeed))<0) {
+			up(&dvbdmx->mutex);
+			return ret;
+		}
+
+        dvbdmxfeed->buffer_size=circular_buffer_size;
+        dvbdmxfeed->descramble=descramble;
+        dvbdmxfeed->timeout=timeout;
+        dvbdmxfeed->cb_length=callback_length;
+        dvbdmxfeed->ts_type=ts_type;
+        dvbdmxfeed->pes_type=pes_type;
+
+        if (dvbdmxfeed->descramble) {
+		up(&dvbdmx->mutex);
+                return -ENOSYS;
+	}
+
+        if (dvbdmxfeed->buffer_size) {
+#ifdef NOBUFS
+                dvbdmxfeed->buffer=0;
+#else
+                dvbdmxfeed->buffer=vmalloc(dvbdmxfeed->buffer_size);
+                if (!dvbdmxfeed->buffer) {
+			up(&dvbdmx->mutex);
+			return -ENOMEM;
+		}
+#endif
+        }
+        dvbdmxfeed->state=DMX_STATE_READY;
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+static int 
+dmx_ts_feed_start_filtering(struct dmx_ts_feed_s* feed)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+	int ret;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (dvbdmxfeed->state!=DMX_STATE_READY ||
+	    dvbdmxfeed->type!=DMX_TYPE_TS) {
+		up(&dvbdmx->mutex);
+                return -EINVAL;
+	}
+        if (!dvbdmx->start_feed) {
+		up(&dvbdmx->mutex);
+                return -1;
+	}
+        ret=dvbdmx->start_feed(dvbdmxfeed); 
+        if (ret<0) {
+		up(&dvbdmx->mutex);
+		return ret;
+	}
+	spin_lock_irq(&dvbdmx->lock);
+        feed->is_filtering=1;
+        dvbdmxfeed->state=DMX_STATE_GO;
+	spin_unlock_irq(&dvbdmx->lock);
+        up(&dvbdmx->mutex);
+	return 0;
+}
+ 
+static int 
+dmx_ts_feed_stop_filtering(struct dmx_ts_feed_s* feed)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+	int ret;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (dvbdmxfeed->state<DMX_STATE_GO) {
+		up(&dvbdmx->mutex);
+                return -EINVAL;
+	}
+        if (!dvbdmx->stop_feed) {
+		up(&dvbdmx->mutex);
+                return -1;
+	}
+        ret=dvbdmx->stop_feed(dvbdmxfeed); 
+	spin_lock_irq(&dvbdmx->lock);
+        feed->is_filtering=0;
+        dvbdmxfeed->state=DMX_STATE_ALLOCATED;
+
+	spin_unlock_irq(&dvbdmx->lock);
+        up(&dvbdmx->mutex);
+        return ret;
+}
+
+static int dvbdmx_allocate_ts_feed(dmx_demux_t *demux,
+                                   dmx_ts_feed_t **feed, 
+                                   dmx_ts_cb callback)
+{
+        dvb_demux_t *dvbdmx=(dvb_demux_t *) demux;
+        dvb_demux_feed_t *dvbdmxfeed;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (!(dvbdmxfeed=DvbDmxFeedAlloc(dvbdmx))) {
+		up(&dvbdmx->mutex);
+                return -EBUSY;
+	}
+        dvbdmxfeed->type=DMX_TYPE_TS;
+        dvbdmxfeed->cb.ts=callback;
+        dvbdmxfeed->demux=dvbdmx;
+        dvbdmxfeed->pid=0xffff;
+        dvbdmxfeed->peslen=0xfffa;
+        dvbdmxfeed->buffer=0;
+
+        (*feed)=&dvbdmxfeed->feed.ts;
+        (*feed)->is_filtering=0;
+        (*feed)->parent=demux;
+        (*feed)->priv=0;
+        (*feed)->set=dmx_ts_feed_set;
+        (*feed)->start_filtering=dmx_ts_feed_start_filtering;
+        (*feed)->stop_filtering=dmx_ts_feed_stop_filtering;
+
+
+        if (!(dvbdmxfeed->filter=DvbDmxFilterAlloc(dvbdmx))) {
+                dvbdmxfeed->state=DMX_STATE_FREE;
+		up(&dvbdmx->mutex);
+                return -EBUSY;
+        }
+
+        dvbdmxfeed->filter->type=DMX_TYPE_TS;
+        dvbdmxfeed->filter->feed=dvbdmxfeed;
+        dvbdmxfeed->filter->state=DMX_STATE_READY;
+        
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+static int dvbdmx_release_ts_feed(dmx_demux_t *demux, dmx_ts_feed_t *feed)
+{
+        dvb_demux_t *dvbdmx=(dvb_demux_t *) demux;
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (dvbdmxfeed->state==DMX_STATE_FREE) {
+		up(&dvbdmx->mutex);
+                return -EINVAL;
+	}
+#ifndef NOBUFS
+        if (dvbdmxfeed->buffer) { 
+                vfree(dvbdmxfeed->buffer);
+                dvbdmxfeed->buffer=0;
+        }
+#endif
+        dvbdmxfeed->state=DMX_STATE_FREE;
+        dvbdmxfeed->filter->state=DMX_STATE_FREE;
+	if (dvbdmxfeed->pid<=DMX_MAX_PID) {
+		dvbdmxfeed->demux->pid2feed[dvbdmxfeed->pid]=0;
+                dvbdmxfeed->pid=0xffff;
+        }
+
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+
+/******************************************************************************
+ * dmx_section_feed API calls
+ ******************************************************************************/
+
+static int 
+dmx_section_feed_allocate_filter(struct dmx_section_feed_s* feed, 
+                                 dmx_section_filter_t** filter) 
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdemux=dvbdmxfeed->demux;
+        dvb_demux_filter_t *dvbdmxfilter;
+
+	if (down_interruptible (&dvbdemux->mutex))
+		return -ERESTARTSYS;
+
+        dvbdmxfilter=DvbDmxFilterAlloc(dvbdemux);
+        if (!dvbdmxfilter) {
+		up(&dvbdemux->mutex);
+                return -ENOSPC;
+	}
+	spin_lock_irq(&dvbdemux->lock);
+        *filter=&dvbdmxfilter->filter;
+        (*filter)->parent=feed;
+        (*filter)->priv=0;
+        dvbdmxfilter->feed=dvbdmxfeed;
+        dvbdmxfilter->type=DMX_TYPE_SEC;
+        dvbdmxfilter->state=DMX_STATE_READY;
+
+        dvbdmxfilter->next=dvbdmxfeed->filter;
+        dvbdmxfeed->filter=dvbdmxfilter;
+	spin_unlock_irq(&dvbdemux->lock);
+        up(&dvbdemux->mutex);
+        return 0;
+}
+
+static int 
+dmx_section_feed_set(struct dmx_section_feed_s* feed, 
+                     u16 pid, size_t circular_buffer_size, 
+                     int descramble, int check_crc) 
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+
+        if (pid>0x1fff)
+                return -EINVAL;
+
+	if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+	
+        if (dvbdmxfeed->pid!=0xffff) {
+                dvbdmx->pid2feed[dvbdmxfeed->pid]=0;
+                dvbdmxfeed->pid=0xffff;
+        }
+        if (dvbdmx->pid2feed[pid]) {
+		up(&dvbdmx->mutex);
+		return -EBUSY;
+	}
+        dvbdmx->pid2feed[pid]=dvbdmxfeed;
+        dvbdmxfeed->pid=pid;
+
+        dvbdmxfeed->buffer_size=circular_buffer_size;
+        dvbdmxfeed->descramble=descramble;
+        if (dvbdmxfeed->descramble) {
+		up(&dvbdmx->mutex);
+                return -ENOSYS;
+	}
+
+        dvbdmxfeed->check_crc=check_crc;
+#ifdef NOBUFS
+        dvbdmxfeed->buffer=0;
+#else
+        dvbdmxfeed->buffer=vmalloc(dvbdmxfeed->buffer_size);
+        if (!dvbdmxfeed->buffer) {
+		up(&dvbdmx->mutex);
+		return -ENOMEM;
+	}
+#endif
+        dvbdmxfeed->state=DMX_STATE_READY;
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+static void prepare_secfilters(dvb_demux_feed_t *dvbdmxfeed)
+{
+	int i;
+        dmx_section_filter_t *sf;
+	dvb_demux_filter_t *f;
+	u8 mask, mode, doneq;
+		
+	if (!(f=dvbdmxfeed->filter))
+                return;
+        do {
+		sf=&f->filter;
+		doneq=0;
+		for (i=0; i<DVB_DEMUX_MASK_MAX; i++) {
+			mode=sf->filter_mode[i];
+			mask=sf->filter_mask[i];
+			f->maskandmode[i]=mask&mode;
+			doneq|=f->maskandnotmode[i]=mask&~mode;
+		}
+		f->doneq=doneq ? 1 : 0;
+	} while ((f=f->next));
+}
+
+
+static int 
+dmx_section_feed_start_filtering(dmx_section_feed_t *feed)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+	int ret;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+	
+        if (feed->is_filtering) {
+		up(&dvbdmx->mutex);
+		return -EBUSY;
+	}
+        if (!dvbdmxfeed->filter) {
+		up(&dvbdmx->mutex);
+                return -EINVAL;
+	}
+        dvbdmxfeed->secbufp=0;
+        dvbdmxfeed->seclen=0;
+        
+        if (!dvbdmx->start_feed) {
+		up(&dvbdmx->mutex);
+                return -1;
+	}
+	prepare_secfilters(dvbdmxfeed);
+        ret=dvbdmx->start_feed(dvbdmxfeed); 
+	if (ret<0) {
+		up(&dvbdmx->mutex);
+		return ret;
+	}
+	spin_lock_irq(&dvbdmx->lock);
+        feed->is_filtering=1;
+        dvbdmxfeed->state=DMX_STATE_GO;
+	spin_unlock_irq(&dvbdmx->lock);
+        up(&dvbdmx->mutex);
+	return 0;
+}
+
+static int 
+dmx_section_feed_stop_filtering(struct dmx_section_feed_s* feed)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+        int ret;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (!dvbdmx->stop_feed) {
+		up(&dvbdmx->mutex);
+                return -1;
+	}
+	ret=dvbdmx->stop_feed(dvbdmxfeed); 
+	spin_lock_irq(&dvbdmx->lock);
+        dvbdmxfeed->state=DMX_STATE_READY;
+        feed->is_filtering=0;
+	spin_unlock_irq(&dvbdmx->lock);
+        up(&dvbdmx->mutex);
+	return ret;
+}
+
+static int 
+dmx_section_feed_release_filter(dmx_section_feed_t *feed, 
+                                dmx_section_filter_t* filter)
+{
+        dvb_demux_filter_t *dvbdmxfilter=(dvb_demux_filter_t *) filter, *f;
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=dvbdmxfeed->demux;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (dvbdmxfilter->feed!=dvbdmxfeed) {
+		up(&dvbdmx->mutex);
+                return -EINVAL;
+	}
+        if (feed->is_filtering) 
+                feed->stop_filtering(feed);
+	
+	spin_lock_irq(&dvbdmx->lock);
+        f=dvbdmxfeed->filter;
+        if (f==dvbdmxfilter)
+                dvbdmxfeed->filter=dvbdmxfilter->next;
+        else {
+                while(f->next!=dvbdmxfilter)
+                        f=f->next;
+                f->next=f->next->next;
+        }
+        dvbdmxfilter->state=DMX_STATE_FREE;
+	spin_unlock_irq(&dvbdmx->lock);
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+static int dvbdmx_allocate_section_feed(dmx_demux_t *demux, 
+                                        dmx_section_feed_t **feed,
+                                        dmx_section_cb callback)
+{
+        dvb_demux_t *dvbdmx=(dvb_demux_t *) demux;
+        dvb_demux_feed_t *dvbdmxfeed;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (!(dvbdmxfeed=DvbDmxFeedAlloc(dvbdmx))) {
+		up(&dvbdmx->mutex);
+                return -EBUSY;
+	}
+        dvbdmxfeed->type=DMX_TYPE_SEC;
+        dvbdmxfeed->cb.sec=callback;
+        dvbdmxfeed->demux=dvbdmx;
+        dvbdmxfeed->pid=0xffff;
+        dvbdmxfeed->secbufp=0;
+        dvbdmxfeed->filter=0;
+        dvbdmxfeed->buffer=0;
+
+        (*feed)=&dvbdmxfeed->feed.sec;
+        (*feed)->is_filtering=0;
+        (*feed)->parent=demux;
+        (*feed)->priv=0;
+        (*feed)->set=dmx_section_feed_set;
+        (*feed)->allocate_filter=dmx_section_feed_allocate_filter;
+        (*feed)->release_filter=dmx_section_feed_release_filter;
+        (*feed)->start_filtering=dmx_section_feed_start_filtering;
+        (*feed)->stop_filtering=dmx_section_feed_stop_filtering;
+
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+static int dvbdmx_release_section_feed(dmx_demux_t *demux, 
+                                       dmx_section_feed_t *feed)
+{
+        dvb_demux_feed_t *dvbdmxfeed=(dvb_demux_feed_t *) feed;
+        dvb_demux_t *dvbdmx=(dvb_demux_t *) demux;
+
+        if (down_interruptible (&dvbdmx->mutex))
+		return -ERESTARTSYS;
+
+        if (dvbdmxfeed->state==DMX_STATE_FREE) {
+		up(&dvbdmx->mutex);
+                return -EINVAL;
+	}
+#ifndef NOBUFS
+        if (dvbdmxfeed->buffer) {
+                vfree(dvbdmxfeed->buffer);
+                dvbdmxfeed->buffer=0;
+        }
+#endif
+        dvbdmxfeed->state=DMX_STATE_FREE;
+        dvbdmxfeed->demux->pid2feed[dvbdmxfeed->pid]=0;
+        if (dvbdmxfeed->pid!=0xffff)
+                dvbdmxfeed->demux->pid2feed[dvbdmxfeed->pid]=0;
+        up(&dvbdmx->mutex);
+        return 0;
+}
+
+
+/******************************************************************************
+ * dvb_demux kernel data API calls
+ ******************************************************************************/
+
+static int dvbdmx_open(dmx_demux_t *demux)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        if (dvbdemux->users>=MAX_DVB_DEMUX_USERS)
+                return -EUSERS;
+        dvbdemux->users++;
+        return 0;
+}
+
+static int dvbdmx_close(struct dmx_demux_s *demux)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        if (dvbdemux->users==0)
+                return -ENODEV;
+        dvbdemux->users--;
+        //FIXME: release any unneeded resources if users==0
+        return 0;
+}
+
+static int dvbdmx_write(dmx_demux_t *demux, const char *buf, size_t count)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        if ((!demux->frontend) ||
+            (demux->frontend->source!=DMX_MEMORY_FE))
+                return -EINVAL;
+
+        if (down_interruptible (&dvbdemux->mutex))
+		return -ERESTARTSYS;
+
+        DvbDmxSWFilter(dvbdemux, buf, count);
+        up(&dvbdemux->mutex);
+        return count;
+}
+
+
+static int dvbdmx_add_frontend(dmx_demux_t *demux, 
+                               dmx_frontend_t *frontend)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+        struct list_head *pos, *head=&dvbdemux->frontend_list;
+	
+	if (!(frontend->id && frontend->vendor && frontend->model)) 
+	        return -EINVAL;
+	list_for_each(pos, head) 
+	{
+	        if (!strcmp(DMX_FE_ENTRY(pos)->id, frontend->id))
+		        return -EEXIST;
+	}
+
+	list_add(&(frontend->connectivity_list), head);
+        return 0;
+}
+
+static int 
+dvbdmx_remove_frontend(dmx_demux_t *demux, 
+                       dmx_frontend_t *frontend)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+        struct list_head *pos, *n, *head=&dvbdemux->frontend_list;
+
+	list_for_each_safe (pos, n, head) 
+	{
+	        if (DMX_FE_ENTRY(pos)==frontend) 
+                {
+		        list_del(pos);
+			return 0;
+		}
+	}
+	return -ENODEV;
+}
+
+static struct list_head *
+dvbdmx_get_frontends(dmx_demux_t *demux)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        if (list_empty(&dvbdemux->frontend_list))
+	        return NULL;
+        return &dvbdemux->frontend_list;
+}
+
+static int dvbdmx_connect_frontend(dmx_demux_t *demux, 
+                                   dmx_frontend_t *frontend)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        if (demux->frontend)
+                return -EINVAL;
+        
+        if (down_interruptible (&dvbdemux->mutex))
+		return -ERESTARTSYS;
+
+        demux->frontend=frontend;
+        up(&dvbdemux->mutex);
+        return 0;
+}
+
+static int dvbdmx_disconnect_frontend(dmx_demux_t *demux)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        if (down_interruptible (&dvbdemux->mutex))
+		return -ERESTARTSYS;
+
+        demux->frontend=NULL;
+        up(&dvbdemux->mutex);
+        return 0;
+}
+
+static int dvbdmx_get_pes_pids(dmx_demux_t *demux, u16 *pids)
+{
+        dvb_demux_t *dvbdemux=(dvb_demux_t *) demux;
+
+        memcpy(pids, dvbdemux->pids, 5*sizeof(u16));
+        return 0;
+}
+
+int 
+DvbDmxInit(dvb_demux_t *dvbdemux)
+{
+        int i;
+        dmx_demux_t *dmx=&dvbdemux->dmx;
+
+        dvbdemux->users=0;
+	dvbdemux->filter=vmalloc(dvbdemux->filternum*sizeof(dvb_demux_filter_t));
+	if (!dvbdemux->filter)
+                return -ENOMEM;
+
+	dvbdemux->feed=vmalloc(dvbdemux->feednum*sizeof(dvb_demux_feed_t));
+	if (!dvbdemux->feed) {
+	        vfree(dvbdemux->filter);
+                return -ENOMEM;
+	}
+        for (i=0; i<dvbdemux->filternum; i++) {
+                dvbdemux->filter[i].state=DMX_STATE_FREE;
+                dvbdemux->filter[i].index=i;
+        }
+        for (i=0; i<dvbdemux->feednum; i++)
+                dvbdemux->feed[i].state=DMX_STATE_FREE;
+        dvbdemux->frontend_list.next=
+          dvbdemux->frontend_list.prev=
+            &dvbdemux->frontend_list;
+        for (i=0; i<DMX_TS_PES_OTHER; i++) {
+                dvbdemux->pesfilter[i]=NULL;
+                dvbdemux->pids[i]=0xffff;
+	}
+        dvbdemux->playing=dvbdemux->recording=0;
+        memset(dvbdemux->pid2feed, 0, (DMX_MAX_PID+1)*sizeof(dvb_demux_feed_t *));
+        dvbdemux->tsbufp=0;
+
+        dmx->frontend=0;
+        dmx->reg_list.next=dmx->reg_list.prev=&dmx->reg_list;
+        dmx->priv=(void *) dvbdemux;
+        //dmx->users=0;                  // reset in dmx_register_demux() 
+        dmx->open=dvbdmx_open;
+        dmx->close=dvbdmx_close;
+        dmx->write=dvbdmx_write;
+        dmx->allocate_ts_feed=dvbdmx_allocate_ts_feed;
+        dmx->release_ts_feed=dvbdmx_release_ts_feed;
+        dmx->allocate_section_feed=dvbdmx_allocate_section_feed;
+        dmx->release_section_feed=dvbdmx_release_section_feed;
+
+        dmx->descramble_mac_address=NULL;
+        dmx->descramble_section_payload=NULL;
+        
+        dmx->add_frontend=dvbdmx_add_frontend;
+        dmx->remove_frontend=dvbdmx_remove_frontend;
+        dmx->get_frontends=dvbdmx_get_frontends;
+        dmx->connect_frontend=dvbdmx_connect_frontend;
+        dmx->disconnect_frontend=dvbdmx_disconnect_frontend;
+        dmx->get_pes_pids=dvbdmx_get_pes_pids;
+        sema_init(&dvbdemux->mutex, 1);
+	spin_lock_init(&dvbdemux->lock);
+
+        if (dmx_register_demux(dmx)<0) 
+                return -1;
+
+        return 0;
+}
+
+int 
+DvbDmxRelease(dvb_demux_t *dvbdemux)
+{
+        dmx_demux_t *dmx=&dvbdemux->dmx;
+
+        dmx_unregister_demux(dmx);
+	if (dvbdemux->filter)
+                vfree(dvbdemux->filter);
+	if (dvbdemux->feed)
+                vfree(dvbdemux->feed);
+        return 0;
+}
+
+#if 0
+MODULE_DESCRIPTION("Software MPEG Demultiplexer");
+MODULE_AUTHOR("Ralph Metzler, Markus Metzler");
+MODULE_LICENSE("GPL");
+#endif
+
diff -Nru a/drivers/media/dvb/dvb-core/dvb_demux.h b/drivers/media/dvb/dvb-core/dvb_demux.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_demux.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,134 @@
+/* 
+ * dvb_demux.h - DVB kernel demux API
+ *
+ * Copyright (C) 2000-2001 Marcus Metzler <marcus@convergence.de>
+ *                       & Ralph  Metzler <ralph@convergence.de>
+ *                         for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVB_DEMUX_H_
+#define _DVB_DEMUX_H_
+
+#include "demux.h"
+
+#define DMX_TYPE_TS  0
+#define DMX_TYPE_SEC 1
+#define DMX_TYPE_PES 2
+
+#define DMX_STATE_FREE      0
+#define DMX_STATE_ALLOCATED 1
+#define DMX_STATE_SET       2
+#define DMX_STATE_READY     3
+#define DMX_STATE_GO        4
+
+#define DVB_DEMUX_MASK_MAX 18
+
+typedef struct dvb_demux_filter_s {
+        dmx_section_filter_t filter;
+        u8 maskandmode    [DMX_MAX_FILTER_SIZE]; 
+        u8 maskandnotmode [DMX_MAX_FILTER_SIZE]; 
+	int doneq;
+		
+        struct dvb_demux_filter_s *next;
+        struct dvb_demux_feed_s *feed;
+        int index;
+        int state;
+        int type;
+	int pesto;
+
+        u16 handle;
+        u16 hw_handle;
+        struct timer_list timer;
+	int ts_state;
+
+        //u16 pid;  //to be removed
+} dvb_demux_filter_t;
+
+typedef struct dvb_demux_feed_s {
+        union {
+	        dmx_ts_feed_t ts;
+	        dmx_section_feed_t sec;
+	} feed;
+
+        union {
+	        dmx_ts_cb ts;
+	        dmx_section_cb sec;
+	} cb;
+
+        struct dvb_demux_s *demux;
+        int type;
+        int state;
+        u16 pid;
+        u8 *buffer;
+        int buffer_size;
+        int descramble;
+        int check_crc;
+
+        struct timespec timeout; 
+        dvb_demux_filter_t *filter;
+        int cb_length;
+  
+        int ts_type;
+        dmx_ts_pes_t pes_type;
+
+        u8 secbuf[4096];
+        int secbufp;
+        int seclen;
+        int cc;
+
+        u16 peslen;
+} dvb_demux_feed_t;
+
+typedef struct dvb_demux_s {
+        dmx_demux_t dmx;
+        void *priv;
+        int filternum;
+        int feednum;
+        int (*start_feed)(dvb_demux_feed_t *);
+        int (*stop_feed)(dvb_demux_feed_t *);
+        int (*write_to_decoder)(dvb_demux_feed_t *, u8 *, size_t);
+
+  
+        int users;
+#define MAX_DVB_DEMUX_USERS 10
+        dvb_demux_filter_t *filter;
+        dvb_demux_feed_t *feed;
+
+        struct list_head frontend_list;
+
+        dvb_demux_feed_t *pesfilter[DMX_TS_PES_OTHER];
+        u16 pids[DMX_TS_PES_OTHER];
+        int playing; 
+        int recording; 
+
+#define DMX_MAX_PID 0x2000
+        dvb_demux_feed_t *pid2feed[DMX_MAX_PID+1];
+        u8 tsbuf[188];
+        int tsbufp;
+
+	struct semaphore mutex;
+	spinlock_t lock;
+} dvb_demux_t;
+
+
+int DvbDmxInit(dvb_demux_t *dvbdemux);
+int DvbDmxRelease(dvb_demux_t *dvbdemux);
+void DvbDmxSWFilterPackets(dvb_demux_t *dvbdmx, const u8 *buf, int count);
+
+#endif /* _DVB_DEMUX_H_ */
diff -Nru a/drivers/media/dvb/dvb-core/dvb_filter.c b/drivers/media/dvb/dvb-core/dvb_filter.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_filter.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,962 @@
+#include <linux/module.h>
+#include <linux/videodev.h>
+#include "dvb_filter.h"
+
+unsigned int bitrates[3][16] =
+{{0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0},
+ {0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,0},
+ {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,0}};
+
+uint32_t freq[4] = {441, 480, 320, 0};
+
+unsigned int ac3_bitrates[32] =
+    {32,40,48,56,64,80,96,112,128,160,192,224,256,320,384,448,512,576,640,
+     0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+uint32_t ac3_freq[4] = {480, 441, 320, 0};
+uint32_t ac3_frames[3][32] =
+    {{64,80,96,112,128,160,192,224,256,320,384,448,512,640,768,896,1024,
+      1152,1280,0,0,0,0,0,0,0,0,0,0,0,0,0},
+     {69,87,104,121,139,174,208,243,278,348,417,487,557,696,835,975,1114,
+      1253,1393,0,0,0,0,0,0,0,0,0,0,0,0,0},
+     {96,120,144,168,192,240,288,336,384,480,576,672,768,960,1152,1344,
+      1536,1728,1920,0,0,0,0,0,0,0,0,0,0,0,0,0}}; 
+
+
+
+void pes2ts_init(pes2ts_t *p2ts, unsigned short pid, 
+		 pes2ts_cb_t *cb, void *priv)
+{
+	unsigned char *buf=p2ts->buf;
+
+	buf[0]=0x47;
+	buf[1]=(pid>>8);
+	buf[2]=pid&0xff;
+	p2ts->cc=0;
+	p2ts->cb=cb;
+	p2ts->priv=priv;
+}
+
+int pes2ts(pes2ts_t *p2ts, unsigned char *pes, int len)
+{
+	unsigned char *buf=p2ts->buf;
+	int ret=0, rest;
+	
+	//len=6+((pes[4]<<8)|pes[5]);
+
+	buf[1]|=0x40;
+	while (len>=184) {
+		buf[3]=0x10|((p2ts->cc++)&0x0f);
+		memcpy(buf+4, pes, 184);
+		if ((ret=p2ts->cb(p2ts->priv, buf)))
+			return ret;
+		len-=184; pes+=184;
+		buf[1]&=~0x40;
+	}
+	if (!len)
+	        return 0;
+	buf[3]=0x30|((p2ts->cc++)&0x0f);
+	rest=183-len;
+	if (rest) {
+	        buf[5]=0x00;
+		if (rest-1)
+			memset(buf+6, 0xff, rest-1);
+	}
+	buf[4]=rest;
+	memcpy(buf+5+rest, pes, len);
+	return p2ts->cb(p2ts->priv, buf);
+}
+
+void reset_ipack(ipack *p)
+{
+	p->found = 0;
+	p->cid = 0;
+	p->plength = 0;
+	p->flag1 = 0;
+	p->flag2 = 0;
+	p->hlength = 0;
+	p->mpeg = 0;
+	p->check = 0;
+	p->which = 0;
+	p->done = 0;
+	p->count = 0;
+}
+
+void init_ipack(ipack *p, int size,
+		void (*func)(u8 *buf, int size, void *priv))
+{
+	if ( !(p->buf = vmalloc(size*sizeof(u8))) ){
+		printk ("Couldn't allocate memory for ipack\n");
+	}
+	p->size = size;
+	p->func = func;
+	p->repack_subids = 0;
+	reset_ipack(p);
+}
+
+void free_ipack(ipack * p)
+{
+	if (p->buf) vfree(p->buf);
+}
+
+void send_ipack(ipack *p)
+{
+	int off;
+	AudioInfo ai;
+	int ac3_off = 0;
+	int streamid=0;
+	int nframes= 0;
+	int f=0;
+
+	switch ( p->mpeg ){
+	case 2:		
+		if (p->count < 10) return;
+		p->buf[3] = p->cid;
+		
+		p->buf[4] = (u8)(((p->count-6) & 0xFF00) >> 8);
+		p->buf[5] = (u8)((p->count-6) & 0x00FF);
+		if (p->repack_subids && p->cid == PRIVATE_STREAM1){
+			
+			off = 9+p->buf[8];
+			streamid = p->buf[off];
+			if ((streamid & 0xF8) == 0x80){
+				ai.off = 0;
+				ac3_off = ((p->buf[off+2] << 8)| 
+					   p->buf[off+3]);
+				if (ac3_off < p->count)
+					f=get_ac3info(p->buf+off+3+ac3_off, 
+						      p->count-ac3_off, &ai,0);
+				if ( !f ){
+					nframes = (p->count-off-3-ac3_off)/ 
+						ai.framesize + 1;
+					p->buf[off+2] = (ac3_off >> 8)& 0xFF;
+					p->buf[off+3] = (ac3_off)& 0xFF;
+					p->buf[off+1] = nframes;
+					
+					ac3_off +=  nframes * ai.framesize - 
+						p->count;
+				}
+			}
+		} 
+		p->func(p->buf, p->count, p->data);
+	
+		p->buf[6] = 0x80;
+		p->buf[7] = 0x00;
+		p->buf[8] = 0x00;
+		p->count = 9;
+		if (p->repack_subids && p->cid == PRIVATE_STREAM1 
+		    && (streamid & 0xF8)==0x80 ){
+			p->count += 4;
+			p->buf[9] = streamid;
+			p->buf[10] = (ac3_off >> 8)& 0xFF;
+			p->buf[11] = (ac3_off)& 0xFF;
+			p->buf[12] = 0;
+		}
+
+		break;
+	case 1:
+		if (p->count < 8) return;
+		p->buf[3] = p->cid;
+		
+		p->buf[4] = (u8)(((p->count-6) & 0xFF00) >> 8);
+		p->buf[5] = (u8)((p->count-6) & 0x00FF);
+		p->func(p->buf, p->count, p->data);
+	
+		p->buf[6] = 0x0F;
+		p->count = 7;
+		break;
+	}
+}
+
+void send_ipack_rest(ipack *p)
+{
+	if (p->plength != MMAX_PLENGTH-6 || p->found<=6)
+		return;
+	p->plength = p->found-6;
+	p->found = 0;
+	send_ipack(p);
+	reset_ipack(p);
+}
+
+static void write_ipack(ipack *p, u8 *data, int count)
+{
+	u8 headr[3] = { 0x00, 0x00, 0x01} ;
+
+	if (p->count < 6){
+		memcpy(p->buf, headr, 3);
+		p->count = 6;
+	}
+
+	if (p->count + count < p->size){
+		memcpy(p->buf+p->count, data, count);
+		p->count += count;
+	} else {
+		int rest = p->size - p->count;
+		memcpy(p->buf+p->count, data, rest);
+		p->count += rest;
+		send_ipack(p);
+		if (count - rest > 0)
+			write_ipack(p, data+rest, count-rest);
+	}
+}
+
+int instant_repack(u8 *buf, int count, ipack *p)
+{
+	int l;
+	int c=0;
+
+	while (c < count && (p->mpeg == 0 ||
+			     (p->mpeg == 1 && p->found < 7) ||
+			     (p->mpeg == 2 && p->found < 9))
+	       &&  (p->found < 5 || !p->done)){
+		switch ( p->found ){
+		case 0:
+		case 1:
+			if (buf[c] == 0x00) p->found++;
+			else p->found = 0;
+			c++;
+			break;
+		case 2:
+			if (buf[c] == 0x01) p->found++;
+			else if (buf[c] == 0) {
+				p->found = 2;
+			} else p->found = 0;
+			c++;
+			break;
+		case 3:
+			p->cid = 0;
+			switch (buf[c]){
+			case PROG_STREAM_MAP:
+			case PRIVATE_STREAM2:
+			case PROG_STREAM_DIR:
+			case ECM_STREAM     :
+			case EMM_STREAM     :
+			case PADDING_STREAM :
+			case DSM_CC_STREAM  :
+			case ISO13522_STREAM:
+				p->done = 1;
+			case PRIVATE_STREAM1:
+			case VIDEO_STREAM_S ... VIDEO_STREAM_E:
+			case AUDIO_STREAM_S ... AUDIO_STREAM_E:
+				p->found++;
+				p->cid = buf[c];
+				c++;
+				break;
+			default:
+				p->found = 0;
+				break;
+			}
+			break;
+			
+		case 4:
+			if (count-c > 1){
+				p->plen[0] = buf[c];
+				c++;
+				p->plen[1] = buf[c];
+				c++;
+				p->found+=2;
+				p->plength=(p->plen[0]<<8)|p->plen[1];
+ 			} else {
+				p->plen[0] = buf[c];
+				p->found++;
+				return count;
+			}
+			break;
+		case 5:
+			p->plen[1] = buf[c];
+			c++;
+			p->found++;
+			p->plength=(p->plen[0]<<8)|p->plen[1];
+			break;
+		case 6:
+			if (!p->done){
+				p->flag1 = buf[c];
+				c++;
+				p->found++;
+				if ( (p->flag1 & 0xC0) == 0x80 ) p->mpeg = 2;
+				else {
+					p->hlength = 0;
+					p->which = 0;
+					p->mpeg = 1;
+					p->flag2 = 0;
+				}
+			}
+			break;
+
+		case 7:
+			if ( !p->done && p->mpeg == 2) {
+				p->flag2 = buf[c];
+				c++;
+				p->found++;
+			}	
+			break;
+
+		case 8:
+			if ( !p->done && p->mpeg == 2) {
+				p->hlength = buf[c];
+				c++;
+				p->found++;
+			}
+			break;
+			
+		default:
+
+			break;
+		}
+	}
+
+	if (c == count) return count;
+
+	if (!p->plength) p->plength = MMAX_PLENGTH-6;
+
+	if ( p->done || ((p->mpeg == 2 && p->found >= 9) || 
+	     (p->mpeg == 1 && p->found >= 7)) ){
+		switch (p->cid){
+			
+		case AUDIO_STREAM_S ... AUDIO_STREAM_E:			
+		case VIDEO_STREAM_S ... VIDEO_STREAM_E:
+		case PRIVATE_STREAM1:
+			
+			if (p->mpeg == 2 && p->found == 9) {
+				write_ipack(p, &p->flag1, 1);
+				write_ipack(p, &p->flag2, 1);
+				write_ipack(p, &p->hlength, 1);
+			}
+
+			if (p->mpeg == 1 && p->found == 7) 
+				write_ipack(p, &p->flag1, 1);
+			
+			if (p->mpeg == 2 && (p->flag2 & PTS_ONLY) &&  
+			    p->found < 14) {
+				while (c < count && p->found < 14) {
+					p->pts[p->found-9] = buf[c];
+					write_ipack(p, buf+c, 1);
+					c++;
+					p->found++;
+				}
+				if (c == count) return count;
+			}
+
+			if (p->mpeg == 1 && p->which < 2000) {
+
+				if (p->found == 7) {
+					p->check = p->flag1;
+					p->hlength = 1;
+				}
+
+				while (!p->which && c < count && 
+				       p->check == 0xFF){
+					p->check = buf[c];
+					write_ipack(p, buf+c, 1);
+					c++;
+					p->found++;
+					p->hlength++;
+				}
+				
+				if ( c == count) return count;
+				
+				if ( (p->check & 0xC0) == 0x40 && !p->which){
+					p->check = buf[c];
+					write_ipack(p, buf+c, 1);
+					c++;
+					p->found++;
+					p->hlength++;
+					
+					p->which = 1;
+					if ( c == count) return count;
+					p->check = buf[c];
+					write_ipack(p, buf+c, 1);
+					c++;
+					p->found++;
+					p->hlength++;
+					p->which = 2;
+					if ( c == count) return count;
+				}
+				
+				if (p->which == 1){
+					p->check = buf[c];
+					write_ipack(p, buf+c, 1);
+					c++;
+					p->found++;
+					p->hlength++;
+					p->which = 2;
+					if ( c == count) return count;
+				}
+				
+				if ( (p->check & 0x30) && p->check != 0xFF){
+					p->flag2 = (p->check & 0xF0) << 2;
+					p->pts[0] = p->check;
+					p->which = 3;
+				} 
+			
+				if ( c == count) return count;
+				if (p->which > 2){
+					if ((p->flag2 & PTS_DTS_FLAGS)
+					    == PTS_ONLY){
+						while (c < count && 
+						       p->which < 7){
+							p->pts[p->which-2] =
+								buf[c];
+							write_ipack(p,buf+c,1);
+							c++;
+							p->found++;
+							p->which++;
+							p->hlength++;
+						}
+						if ( c == count) return count;
+					} else if ((p->flag2 & PTS_DTS_FLAGS) 
+						   == PTS_DTS){
+						while (c < count && 
+						       p->which< 12){
+							if (p->which< 7)
+								p->pts[p->which
+								      -2] =
+									buf[c];
+							write_ipack(p,buf+c,1);
+							c++;
+							p->found++;
+							p->which++;
+							p->hlength++;
+						}
+						if ( c == count) return count;
+					}
+					p->which = 2000;
+				}
+				
+			}
+			
+			while (c < count && p->found < p->plength+6){
+				l = count -c;
+				if (l+p->found > p->plength+6)
+					l = p->plength+6-p->found;
+				write_ipack(p, buf+c, l);
+				p->found += l;
+				c += l;
+			}	
+			
+			break;
+		}
+
+
+		if ( p->done ){
+			if( p->found + count - c < p->plength+6){
+				p->found += count-c;
+				c = count;
+			} else {
+				c += p->plength+6 - p->found;
+				p->found = p->plength+6;
+			}
+		}
+
+		if (p->plength && p->found == p->plength+6) {
+			send_ipack(p);
+			reset_ipack(p);
+			if (c < count)
+				instant_repack(buf+c, count-c, p);
+		}
+	}
+	return count;
+}
+
+
+
+void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv, 
+		  void (*pes_write)(u8 *buf, int count, void *data),
+		  void *priv)
+{
+	init_ipack(pa, IPACKS, pes_write);
+	init_ipack(pv, IPACKS, pes_write);
+	pa->pid = pida;
+	pv->pid = pidv;
+	pa->data = priv;
+	pv->data = priv;
+}
+
+void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188)
+{
+	u8 off = 0;
+
+	if (!buf || !p ){
+		printk("NULL POINTER IDIOT\n");
+		return;
+	}
+	if (buf[1]&PAY_START) {
+		if (p->plength == MMAX_PLENGTH-6 && p->found>6){
+			p->plength = p->found-6;
+			p->found = 0;
+			send_ipack(p);
+			reset_ipack(p);
+		}
+	}
+	if (buf[3] & ADAPT_FIELD) {  // adaptation field?
+		off = buf[4] + 1;
+		if (off+4 > 187) return;
+	}
+	instant_repack(buf+4+off, TS_SIZE-4-off, p);
+}
+
+/* needs 5 byte input, returns picture coding type*/
+int read_picture_header(uint8_t *headr, mpg_picture *pic, int field, int pr)
+{
+	uint8_t pct;
+
+	if (pr) printk( "Pic header: ");
+        pic->temporal_reference[field] = (( headr[0] << 2 ) | 
+					  (headr[1] & 0x03) )& 0x03ff;
+	if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
+
+	pct = ( headr[1] >> 2 ) & 0x07;
+        pic->picture_coding_type[field] = pct;
+	if (pr) {
+		switch(pct){
+			case I_FRAME:
+				printk( "  I-FRAME");
+				break;
+			case B_FRAME:
+				printk( "  B-FRAME");
+				break;
+			case P_FRAME:
+				printk( "  P-FRAME");
+				break;
+		}
+	}
+
+
+        pic->vinfo.vbv_delay  = (( headr[1] >> 5 ) | ( headr[2] << 3) | 
+				 ( (headr[3] & 0x1F) << 11) ) & 0xffff;
+
+	if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
+
+        pic->picture_header_parameter = ( headr[3] & 0xe0 ) | 
+		((headr[4] & 0x80) >> 3);
+
+        if ( pct == B_FRAME ){
+                pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
+        }
+	if (pr) printk( " pic head param: 0x%x", 
+			pic->picture_header_parameter);
+
+	return pct;
+} 
+
+
+/* needs 4 byte input */
+int read_gop_header(uint8_t *headr, mpg_picture *pic, int pr)
+{
+	if (pr) printk("GOP header: "); 
+
+	pic->time_code  = (( headr[0] << 17 ) | ( headr[1] << 9) | 
+			   ( headr[2] << 1 ) | (headr[3] &0x01)) & 0x1ffffff;
+
+	if (pr) printk(" time: %d:%d.%d ", (headr[0]>>2)& 0x1F,
+		       ((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F),
+		       ((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F));
+
+        if ( ( headr[3] & 0x40 ) != 0 ){
+                pic->closed_gop = 1;
+        } else {
+                pic->closed_gop = 0;
+        }
+	if (pr) printk("closed: %d", pic->closed_gop); 
+
+        if ( ( headr[3] & 0x20 ) != 0 ){
+                pic->broken_link = 1;
+        } else {
+                pic->broken_link = 0;
+        }
+	if (pr) printk(" broken: %d\n", pic->broken_link); 
+
+	return 0;
+}
+
+/* needs 8 byte input */
+int read_sequence_header(uint8_t *headr, VideoInfo *vi, int pr)
+{
+        int sw;
+	int form = -1;
+
+	if (pr) printk("Reading sequence header\n");
+
+	vi->horizontal_size	= ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
+	vi->vertical_size	= ((headr[1] &0x0F) << 8) | (headr[2]);
+    
+        sw = (int)((headr[3]&0xF0) >> 4) ;
+
+        switch( sw ){
+	case 1:
+		if (pr)
+			printk("Videostream: ASPECT: 1:1");
+		vi->aspect_ratio = 100;        
+		break;
+	case 2:
+		if (pr)
+			printk("Videostream: ASPECT: 4:3");
+                vi->aspect_ratio = 133;        
+		break;
+	case 3:
+		if (pr)
+			printk("Videostream: ASPECT: 16:9");
+                vi->aspect_ratio = 177;        
+		break;
+	case 4:
+		if (pr)
+			printk("Videostream: ASPECT: 2.21:1");
+                vi->aspect_ratio = 221;        
+		break;
+
+        case 5 ... 15:
+		if (pr)
+			printk("Videostream: ASPECT: reserved");
+                vi->aspect_ratio = 0;        
+		break;
+
+        default:
+                vi->aspect_ratio = 0;        
+                return -1;
+	}
+
+	if (pr)
+		printk("  Size = %dx%d",vi->horizontal_size,vi->vertical_size);
+
+        sw = (int)(headr[3]&0x0F);
+
+        switch ( sw ) {
+	case 1:
+		if (pr)
+			printk("  FRate: 23.976 fps");
+                vi->framerate = 23976;
+		form = -1;
+		break;
+	case 2:
+		if (pr)
+			printk("  FRate: 24 fps");
+                vi->framerate = 24000;
+		form = -1;
+		break;
+	case 3:
+		if (pr)
+			printk("  FRate: 25 fps");
+                vi->framerate = 25000;
+		form = VIDEO_MODE_PAL;
+		break;
+	case 4:
+		if (pr)
+			printk("  FRate: 29.97 fps");
+                vi->framerate = 29970;
+		form = VIDEO_MODE_NTSC;
+		break;
+	case 5:
+		if (pr)
+			printk("  FRate: 30 fps");
+                vi->framerate = 30000;
+		form = VIDEO_MODE_NTSC;
+		break;
+	case 6:
+		if (pr)
+			printk("  FRate: 50 fps");
+                vi->framerate = 50000;
+		form = VIDEO_MODE_PAL;
+		break;
+	case 7:
+		if (pr)
+			printk("  FRate: 60 fps");
+                vi->framerate = 60000;
+		form = VIDEO_MODE_NTSC;
+		break;
+	}
+
+	vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03);
+	
+        vi->vbv_buffer_size
+                = (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
+
+	if (pr){
+		printk("  BRate: %d Mbit/s",4*(vi->bit_rate)/10000);
+		printk("  vbvbuffer %d",16*1024*(vi->vbv_buffer_size));
+		printk("\n");
+	}
+
+        vi->video_format = form;
+
+	return 0;
+}
+
+int get_vinfo(uint8_t *mbuf, int count, VideoInfo *vi, int pr)
+{
+	uint8_t *headr;
+	int found = 0;
+	int c = 0;
+
+	while (found < 4 && c+4 < count){
+		uint8_t *b;
+
+		b = mbuf+c;
+		if ( b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01
+		     && b[3] == 0xb3) found = 4;
+		else {
+			c++;
+		}
+	}
+
+	if (! found) return -1;
+	c += 4;
+	if (c+12 >= count) return -1;
+	headr = mbuf+c;
+	if (read_sequence_header(headr, vi, pr) < 0) return -1;
+	vi->off = c-4;
+	return 0;
+}
+
+int get_ainfo(uint8_t *mbuf, int count, AudioInfo *ai, int pr)
+{
+	uint8_t *headr;
+	int found = 0;
+	int c = 0;
+	int fr = 0;
+
+	while (found < 2 && c < count){
+		uint8_t b[2];
+		memcpy( b, mbuf+c, 2);
+
+		if ( b[0] == 0xff && (b[1] & 0xf8) == 0xf8)
+			found = 2;
+		else {
+			c++;
+		}
+	}	
+
+	if (!found) return -1;
+
+	if (c+3 >= count) return -1;
+        headr = mbuf+c;
+
+	ai->layer = (headr[1] & 0x06) >> 1;
+
+	if (pr)
+		printk("Audiostream: Layer: %d", 4-ai->layer);
+
+
+	ai->bit_rate = bitrates[(3-ai->layer)][(headr[2] >> 4 )]*1000;
+
+	if (pr){
+		if (ai->bit_rate == 0)
+			printk("  Bit rate: free");
+		else if (ai->bit_rate == 0xf)
+			printk("  BRate: reserved");
+		else
+			printk("  BRate: %d kb/s", ai->bit_rate/1000);
+	}
+
+	fr = (headr[2] & 0x0c ) >> 2;
+	ai->frequency = freq[fr]*100;
+	if (pr){
+		if (ai->frequency == 3)
+			printk("  Freq: reserved\n");
+		else
+			printk("  Freq: %d kHz\n",ai->frequency); 
+			       
+	}
+	ai->off = c;
+	return 0;
+}
+
+int get_ac3info(uint8_t *mbuf, int count, AudioInfo *ai, int pr)
+{
+	uint8_t *headr;
+	int found = 0;
+	int c = 0;
+	uint8_t frame = 0;
+	int fr = 0;
+	
+	while ( !found  && c < count){
+		uint8_t *b = mbuf+c;
+
+		if ( b[0] == 0x0b &&  b[1] == 0x77 )
+			found = 1;
+		else {
+			c++;
+		}
+	}	
+
+	if (!found) return -1;
+	if (pr)
+		printk("Audiostream: AC3");
+
+	ai->off = c;
+	if (c+5 >= count) return -1;
+
+	ai->layer = 0;  // 0 for AC3
+        headr = mbuf+c+2;
+
+	frame = (headr[2]&0x3f);
+	ai->bit_rate = ac3_bitrates[frame >> 1]*1000;
+
+	if (pr)
+		printk("  BRate: %d kb/s", ai->bit_rate/1000);
+
+	ai->frequency = (headr[2] & 0xc0 ) >> 6;
+	fr = (headr[2] & 0xc0 ) >> 6;
+	ai->frequency = freq[fr]*100;
+	if (pr) printk ("  Freq: %d Hz\n", ai->frequency);
+
+
+	ai->framesize = ac3_frames[fr][frame >> 1];
+	if ((frame & 1) &&  (fr == 1)) ai->framesize++;
+	ai->framesize = ai->framesize << 1;
+	if (pr) printk ("  Framesize %d\n", ai->framesize);
+
+
+	return 0;
+}
+
+uint8_t *skip_pes_header(uint8_t **bufp)
+{
+        uint8_t *inbuf = *bufp;
+        uint8_t *buf = inbuf;
+        uint8_t *pts = NULL;
+        int skip = 0;
+
+int mpeg1_skip_table[16] = {
+        1, 0xffff,      5,     10, 0xffff, 0xffff, 0xffff, 0xffff,
+        0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+};
+
+
+        if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */
+                if (buf[7] & PTS_ONLY)
+                        pts = buf+9;
+                else pts = NULL;
+                buf = inbuf + 9 + inbuf[8];
+        } else {        /* mpeg1 */
+                for (buf = inbuf + 6; *buf == 0xff; buf++)
+                        if (buf == inbuf + 6 + 16) {
+                                break;
+                        }
+                if ((*buf & 0xc0) == 0x40)
+                        buf += 2;
+                skip = mpeg1_skip_table [*buf >> 4];
+                if (skip == 5 || skip == 10) pts = buf;
+                else pts = NULL;
+
+                buf += mpeg1_skip_table [*buf >> 4];
+        }
+
+        *bufp = buf;
+        return pts;
+}
+
+
+void initialize_quant_matrix( uint32_t *matrix )
+{
+        int i;
+
+        matrix[0]  = 0x08101013;
+        matrix[1]  = 0x10131616;
+        matrix[2]  = 0x16161616;
+        matrix[3]  = 0x1a181a1b;
+        matrix[4]  = 0x1b1b1a1a;
+        matrix[5]  = 0x1a1a1b1b;
+        matrix[6]  = 0x1b1d1d1d;
+        matrix[7]  = 0x2222221d;
+        matrix[8]  = 0x1d1d1b1b;
+        matrix[9]  = 0x1d1d2020;
+        matrix[10] = 0x22222526;
+        matrix[11] = 0x25232322;
+        matrix[12] = 0x23262628;
+        matrix[13] = 0x28283030;
+        matrix[14] = 0x2e2e3838;
+        matrix[15] = 0x3a454553;
+
+        for ( i = 16 ; i < 32 ; i++ )
+                matrix[i] = 0x10101010;
+}
+
+void initialize_mpg_picture(mpg_picture *pic)
+{
+        int i;
+
+        /* set MPEG1 */
+        pic->mpeg1_flag = 1;
+        pic->profile_and_level = 0x4A ;        /* MP@LL */
+        pic->progressive_sequence = 1;
+        pic->low_delay = 0;
+
+        pic->sequence_display_extension_flag = 0;
+        for ( i = 0 ; i < 4 ; i++ ){
+                pic->frame_centre_horizontal_offset[i] = 0;
+                pic->frame_centre_vertical_offset[i] = 0;
+        }
+        pic->last_frame_centre_horizontal_offset = 0;
+        pic->last_frame_centre_vertical_offset = 0;
+
+        pic->picture_display_extension_flag[0] = 0;
+        pic->picture_display_extension_flag[1] = 0;
+        pic->sequence_header_flag = 0;      
+	pic->gop_flag = 0;              
+        pic->sequence_end_flag = 0;	
+}
+
+
+void mpg_set_picture_parameter( int32_t field_type, mpg_picture *pic )
+{
+        int16_t last_h_offset;
+        int16_t last_v_offset;
+
+        int16_t *p_h_offset;
+        int16_t *p_v_offset;
+
+        if ( pic->mpeg1_flag ){
+                pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE;
+                pic->top_field_first = 0;
+                pic->repeat_first_field = 0;
+                pic->progressive_frame = 1;
+                pic->picture_coding_parameter = 0x000010;
+        }
+
+        /* Reset flag */
+        pic->picture_display_extension_flag[field_type] = 0;
+
+        last_h_offset = pic->last_frame_centre_horizontal_offset;
+        last_v_offset = pic->last_frame_centre_vertical_offset;
+        if ( field_type == FIRST_FIELD ){
+                p_h_offset = pic->frame_centre_horizontal_offset;
+                p_v_offset = pic->frame_centre_vertical_offset;
+                *p_h_offset = last_h_offset;
+                *(p_h_offset + 1) = last_h_offset;
+                *(p_h_offset + 2) = last_h_offset;
+                *p_v_offset = last_v_offset;
+                *(p_v_offset + 1) = last_v_offset;
+                *(p_v_offset + 2) = last_v_offset;
+        } else {
+                pic->frame_centre_horizontal_offset[3] = last_h_offset;
+                pic->frame_centre_vertical_offset[3] = last_v_offset;
+        }
+}
+
+void init_mpg_picture( mpg_picture *pic, int chan, int32_t field_type)
+{
+        pic->picture_header = 0;
+        pic->sequence_header_data
+                = ( INIT_HORIZONTAL_SIZE << 20 )
+                        | ( INIT_VERTICAL_SIZE << 8 )
+                        | ( INIT_ASPECT_RATIO << 4 )
+                        | ( INIT_FRAME_RATE );
+        pic->mpeg1_flag = 0;
+        pic->vinfo.horizontal_size
+                = INIT_DISP_HORIZONTAL_SIZE;
+        pic->vinfo.vertical_size
+                = INIT_DISP_VERTICAL_SIZE;
+        pic->picture_display_extension_flag[field_type]
+                = 0;
+        pic->pts_flag[field_type] = 0;
+
+        pic->sequence_gop_header = 0;
+        pic->picture_header = 0;
+        pic->sequence_header_flag = 0;
+        pic->gop_flag = 0;
+        pic->sequence_end_flag = 0;
+        pic->sequence_display_extension_flag = 0;
+        pic->last_frame_centre_horizontal_offset = 0;
+        pic->last_frame_centre_vertical_offset = 0;
+	pic->channel = chan;
+}
diff -Nru a/drivers/media/dvb/dvb-core/dvb_filter.h b/drivers/media/dvb/dvb-core/dvb_filter.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_filter.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,249 @@
+#ifndef _DVB_FILTER_H_
+#define _DVB_FILTER_H_
+
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+
+#include "demux.h"
+
+typedef int (pes2ts_cb_t) (void *, unsigned char *);
+
+typedef struct pes2ts_s {
+	unsigned char buf[188];
+        unsigned char cc;
+        pes2ts_cb_t *cb;
+	void *priv;
+} pes2ts_t;
+
+void pes2ts_init(pes2ts_t *p2ts, unsigned short pid, 
+		 pes2ts_cb_t *cb, void *priv);
+int pes2ts(pes2ts_t *p2ts, unsigned char *pes, int len);
+
+
+#define PROG_STREAM_MAP  0xBC
+#define PRIVATE_STREAM1  0xBD
+#define PADDING_STREAM   0xBE
+#define PRIVATE_STREAM2  0xBF
+#define AUDIO_STREAM_S   0xC0
+#define AUDIO_STREAM_E   0xDF
+#define VIDEO_STREAM_S   0xE0
+#define VIDEO_STREAM_E   0xEF
+#define ECM_STREAM       0xF0
+#define EMM_STREAM       0xF1
+#define DSM_CC_STREAM    0xF2
+#define ISO13522_STREAM  0xF3
+#define PROG_STREAM_DIR  0xFF
+
+#define PICTURE_START    0x00
+#define USER_START       0xb2
+#define SEQUENCE_HEADER  0xb3
+#define SEQUENCE_ERROR   0xb4
+#define EXTENSION_START  0xb5
+#define SEQUENCE_END     0xb7
+#define GOP_START        0xb8
+#define EXCEPT_SLICE     0xb0
+
+#define SEQUENCE_EXTENSION           0x01
+#define SEQUENCE_DISPLAY_EXTENSION   0x02
+#define PICTURE_CODING_EXTENSION     0x08
+#define QUANT_MATRIX_EXTENSION       0x03
+#define PICTURE_DISPLAY_EXTENSION    0x07
+
+#define I_FRAME 0x01 
+#define B_FRAME 0x02 
+#define P_FRAME 0x03
+
+/* Initialize sequence_data */
+#define INIT_HORIZONTAL_SIZE        720
+#define INIT_VERTICAL_SIZE          576
+#define INIT_ASPECT_RATIO          0x02
+#define INIT_FRAME_RATE            0x03
+#define INIT_DISP_HORIZONTAL_SIZE   540
+#define INIT_DISP_VERTICAL_SIZE     576
+
+
+//flags2
+#define PTS_DTS_FLAGS    0xC0
+#define ESCR_FLAG        0x20
+#define ES_RATE_FLAG     0x10
+#define DSM_TRICK_FLAG   0x08
+#define ADD_CPY_FLAG     0x04
+#define PES_CRC_FLAG     0x02
+#define PES_EXT_FLAG     0x01
+
+//pts_dts flags 
+#define PTS_ONLY         0x80
+#define PTS_DTS          0xC0
+
+#define TS_SIZE        188
+#define TRANS_ERROR    0x80
+#define PAY_START      0x40
+#define TRANS_PRIO     0x20
+#define PID_MASK_HI    0x1F
+//flags
+#define TRANS_SCRMBL1  0x80
+#define TRANS_SCRMBL2  0x40
+#define ADAPT_FIELD    0x20
+#define PAYLOAD        0x10
+#define COUNT_MASK     0x0F
+
+// adaptation flags
+#define DISCON_IND     0x80
+#define RAND_ACC_IND   0x40
+#define ES_PRI_IND     0x20
+#define PCR_FLAG       0x10
+#define OPCR_FLAG      0x08
+#define SPLICE_FLAG    0x04
+#define TRANS_PRIV     0x02
+#define ADAP_EXT_FLAG  0x01
+
+// adaptation extension flags
+#define LTW_FLAG       0x80
+#define PIECE_RATE     0x40
+#define SEAM_SPLICE    0x20
+
+
+#define MAX_PLENGTH 0xFFFF
+#define MMAX_PLENGTH (256*MAX_PLENGTH)
+
+#ifndef IPACKS
+#define IPACKS 2048
+#endif
+
+typedef struct ipack_s {
+	int size;
+	int found;
+	u8 *buf;
+	u8 cid;
+	uint32_t plength;
+	u8 plen[2];
+	u8 flag1;
+	u8 flag2;
+	u8 hlength;
+	u8 pts[5];
+	u16 *pid;
+	int mpeg;
+	u8 check;
+	int which;
+	int done;
+	void *data;
+	void (*func)(u8 *buf,  int size, void *priv);
+	int count;
+	int repack_subids;
+} ipack;
+
+typedef struct video_i{
+	uint32_t horizontal_size;
+	uint32_t vertical_size;
+	uint32_t aspect_ratio;
+	uint32_t framerate;
+	uint32_t video_format;
+	uint32_t bit_rate;
+	uint32_t comp_bit_rate;
+	uint32_t vbv_buffer_size;
+        int16_t  vbv_delay;
+	uint32_t CSPF;
+	uint32_t off;
+} VideoInfo;            
+
+
+#define OFF_SIZE 4
+#define FIRST_FIELD 0
+#define SECOND_FIELD 1
+#define VIDEO_FRAME_PICTURE 0x03
+
+typedef struct mpg_picture_s{
+        int       channel;
+	VideoInfo vinfo;
+        uint32_t  *sequence_gop_header;
+        uint32_t  *picture_header;
+        int32_t   time_code;
+        int       low_delay;
+        int       closed_gop;
+        int       broken_link;
+        int       sequence_header_flag;      
+        int       gop_flag;              
+        int       sequence_end_flag;
+                                                                
+        uint8_t   profile_and_level;
+        int32_t   picture_coding_parameter;
+        uint32_t  matrix[32];
+        int8_t    matrix_change_flag;
+
+        uint8_t   picture_header_parameter;
+  /* bit 0 - 2: bwd f code
+     bit 3    : fpb vector
+     bit 4 - 6: fwd f code
+     bit 7    : fpf vector */
+
+        int       mpeg1_flag;
+        int       progressive_sequence;
+        int       sequence_display_extension_flag;
+        uint32_t  sequence_header_data;
+        int16_t   last_frame_centre_horizontal_offset;
+        int16_t   last_frame_centre_vertical_offset;
+
+        uint32_t  pts[2]; /* [0] 1st field, [1] 2nd field */
+        int       top_field_first;
+        int       repeat_first_field;
+        int       progressive_frame;
+        int       bank;
+        int       forward_bank;
+        int       backward_bank;
+        int       compress;
+        int16_t   frame_centre_horizontal_offset[OFF_SIZE];                   
+                  /* [0-2] 1st field, [3] 2nd field */
+        int16_t   frame_centre_vertical_offset[OFF_SIZE];
+                  /* [0-2] 1st field, [3] 2nd field */
+        int16_t   temporal_reference[2];                               
+                  /* [0] 1st field, [1] 2nd field */
+
+        int8_t    picture_coding_type[2];
+                 /* [0] 1st field, [1] 2nd field */
+        int8_t    picture_structure[2];
+                 /* [0] 1st field, [1] 2nd field */
+        int8_t    picture_display_extension_flag[2];
+                 /* [0] 1st field, [1] 2nd field */
+                 /* picture_display_extenion() 0:no 1:exit*/
+        int8_t    pts_flag[2];
+                 /* [0] 1st field, [1] 2nd field */
+} mpg_picture;
+
+
+
+
+typedef struct audio_i{
+	int layer               ;
+	uint32_t bit_rate    ;
+	uint32_t frequency   ;
+	uint32_t mode                ;
+	uint32_t mode_extension ;
+	uint32_t emphasis    ;
+	uint32_t framesize;
+	uint32_t off;
+} AudioInfo;
+
+
+void reset_ipack(ipack *p);
+int instant_repack(u8 *buf, int count, ipack *p);
+void init_ipack(ipack *p, int size,
+		void (*func)(u8 *buf,  int size, void *priv));
+void free_ipack(ipack * p);
+void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv, 
+		  void (*pes_write)(u8 *buf, int count, void *data),
+		  void *priv);
+void ts_to_pes(ipack *p, u8 *buf); 
+void send_ipack(ipack *p);
+void send_ipack_rest(ipack *p);
+int get_ainfo(uint8_t *mbuf, int count, AudioInfo *ai, int pr);
+int get_ac3info(uint8_t *mbuf, int count, AudioInfo *ai, int pr);
+int get_vinfo(uint8_t *mbuf, int count, VideoInfo *vi, int pr);
+uint8_t *skip_pes_header(uint8_t **bufp);
+void initialize_quant_matrix( uint32_t *matrix );
+void initialize_mpg_picture(mpg_picture *pic);
+void init_mpg_picture( mpg_picture *pic, int chan, int32_t field_type);
+void mpg_set_picture_parameter( int32_t field_type, mpg_picture *pic );
+int read_sequence_header(uint8_t *headr, VideoInfo *vi, int pr);
+int read_gop_header(uint8_t *headr, mpg_picture *pic, int pr);
+int read_picture_header(uint8_t *headr, mpg_picture *pic, int field, int pr);
+#endif
diff -Nru a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,938 @@
+/*
+ * dvb-core.c: DVB core driver
+ *
+ * Copyright (C) 1999-2001 Ralph  Metzler
+ *                         Marcus Metzler
+ *                         Holger Waechtler 
+ *                                    for convergence integrated media GmbH
+ *
+ * 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.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
+#include <linux/slab.h>
+#include <linux/poll.h>
+#include <linux/module.h>
+#include <linux/compatmac.h>
+#include <linux/list.h>
+
+#include "compat.h"
+#include "dvb_frontend.h"
+#include "dvbdev.h"
+
+
+static int dvb_frontend_debug = 0;
+static int dvb_shutdown_timeout = 0;
+
+#define dprintk if (dvb_frontend_debug) printk
+
+#define MAX_EVENT 8
+
+struct dvb_fe_events {
+	struct dvb_frontend_event events[MAX_EVENT];
+	int                       eventw;
+	int                       eventr;
+	int                       overflow;
+	wait_queue_head_t         wait_queue;
+	struct semaphore          sem;
+};
+
+
+struct dvb_fe_notifier_callbacks {
+	struct list_head list_head;
+	void (*callback) (fe_status_t s, void *data);
+	void *data;
+};
+
+
+struct dvb_frontend_data {
+	struct dvb_frontend_info *info;
+	struct dvb_frontend frontend;
+	struct dvb_device *dvbdev;
+	struct list_head notifier_callbacks;
+	struct dvb_frontend_parameters parameters;
+	struct dvb_fe_events events;
+	struct semaphore sem;
+	struct list_head list_head;
+	wait_queue_head_t wait_queue;
+	struct task_struct *thread;
+	unsigned long release_jiffies;
+	unsigned long lost_sync_jiffies;
+	int bending;
+	int lnb_drift;
+	int timeout_count;
+	int lost_sync_count;
+	int exit;
+        fe_status_t status;
+};
+
+
+struct dvb_frontend_ioctl_data {
+	struct list_head list_head;
+	struct dvb_adapter_s *adapter;
+	int (*before_ioctl) (struct dvb_frontend *frontend,
+			     unsigned int cmd, void *arg);
+	int (*after_ioctl)  (struct dvb_frontend *frontend,
+			     unsigned int cmd, void *arg);
+	void *before_after_data;
+};
+
+
+static LIST_HEAD(frontend_list);
+static LIST_HEAD(frontend_ioctl_list);
+
+static DECLARE_MUTEX(frontend_mutex);
+
+
+static
+inline void ddelay (int ms)
+{
+	current->state=TASK_INTERRUPTIBLE;
+	schedule_timeout((HZ*ms)/1000);
+}
+
+
+static
+int dvb_frontend_internal_ioctl (struct dvb_frontend *frontend, 
+				 unsigned int cmd, void *arg)
+{
+	int err = -EOPNOTSUPP;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (frontend->before_ioctl)
+		err = frontend->before_ioctl (frontend, cmd, arg);
+
+	if (err) {
+		err = frontend->ioctl (frontend, cmd, arg);
+
+		if (err && frontend->after_ioctl)
+			err = frontend->after_ioctl (frontend, cmd, arg);
+	}
+
+	return err;
+}
+
+
+/**
+ *  if 2 tuners are located side by side you can get interferences when
+ *  they try to tune to the same frequency, so both lose sync.
+ *  We will slightly mistune in this case. The AFC of the demodulator
+ *  should make it still possible to receive the requested transponder 
+ *  on both tuners...
+ */
+static
+void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
+{
+	struct list_head *entry;
+	int stepsize = this_fe->info->frequency_stepsize;
+	int frequency;
+
+	if (!stepsize || recursive > 10) {
+		printk ("%s: too deep recursion, check frequency_stepsize "
+			"in your frontend code!\n", __FUNCTION__);
+		return;
+	}
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (!recursive) {
+		if (down_interruptible (&frontend_mutex))
+			return;
+		this_fe->bending = 0;
+	}
+
+	list_for_each (entry, &frontend_list) {
+		struct dvb_frontend_data *fe;
+		int f;
+
+		fe = list_entry (entry, struct dvb_frontend_data, list_head);
+
+		f = fe->parameters.frequency;
+		f += fe->lnb_drift;
+		f += fe->bending;
+
+		frequency = this_fe->parameters.frequency;
+		frequency += this_fe->lnb_drift;
+		frequency += this_fe->bending;
+
+		if (this_fe != fe &&
+                    frequency > f - stepsize && frequency < f + stepsize)
+		{
+			if (recursive % 2)
+				this_fe->bending += stepsize;
+			else
+				this_fe->bending = -this_fe->bending;
+
+			dvb_bend_frequency (this_fe, recursive + 1);
+			goto done;
+		}
+	}
+done:
+	if (!recursive)
+		up (&frontend_mutex);
+}
+
+
+static
+void dvb_call_frontend_notifiers (struct dvb_frontend_data *fe,
+				  fe_status_t s)
+{
+        struct list_head *e;
+	struct dvb_fe_notifier_callbacks *c;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if ((fe->status & FE_HAS_LOCK) && !(s & FE_HAS_LOCK))
+		fe->lost_sync_jiffies = jiffies;
+
+	if (((s ^ fe->status) & FE_HAS_LOCK) && (s & FE_HAS_LOCK))
+		ddelay (fe->info->notifier_delay);
+
+	fe->status = s;
+
+	if (!(s & FE_HAS_LOCK) && (fe->info->caps & FE_CAN_MUTE_TS))
+		return;
+
+	/**
+	 *   now tell the Demux about the TS status changes...
+	 */
+	list_for_each (e, &fe->notifier_callbacks) {
+		c = list_entry (e, struct dvb_fe_notifier_callbacks, list_head);
+		c->callback (fe->status, c->data);
+	}
+}
+
+
+static
+void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t status)
+{
+	struct dvb_fe_events *events = &fe->events;
+	struct dvb_frontend_event *e;
+	int wp;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&events->sem))
+		return;
+
+	wp = (events->eventw + 1) % MAX_EVENT;
+
+	if (wp == events->eventr) {
+		events->overflow = 1;
+		events->eventr = (events->eventr + 1) % MAX_EVENT;
+	}
+
+	e = &events->events[events->eventw];
+
+	memcpy (&e->parameters, &fe->parameters, 
+		sizeof (struct dvb_frontend_parameters));
+
+	if (status & FE_HAS_LOCK)
+		dvb_frontend_internal_ioctl (&fe->frontend,
+					     FE_GET_FRONTEND,
+					     &e->parameters);
+	events->eventw = wp;
+
+	up (&events->sem);
+
+	e->status = status;
+	dvb_call_frontend_notifiers (fe, status);
+
+	wake_up_interruptible (&events->wait_queue);
+}
+
+
+static
+int dvb_frontend_get_event (struct dvb_frontend_data *fe,
+			    struct dvb_frontend_event *event, int flags)
+{
+        struct dvb_fe_events *events = &fe->events;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (events->overflow) {
+                events->overflow = 0;
+                return -EOVERFLOW;
+        }
+
+        if (events->eventw == events->eventr) {
+		int ret;
+
+                if (flags & O_NONBLOCK)
+                        return -EWOULDBLOCK;
+
+                ret = wait_event_interruptible (events->wait_queue,
+                                                events->eventw != events->eventr);
+                if (ret < 0)
+                        return ret;
+        }
+
+        if (down_interruptible (&events->sem))
+		return -ERESTARTSYS;
+
+       	memcpy (event, &events->events[events->eventr],
+		sizeof(struct dvb_frontend_event));
+
+        events->eventr = (events->eventr + 1) % MAX_EVENT;
+
+       	up (&events->sem);
+
+        return 0;
+}
+
+
+static
+struct dvb_frontend_parameters default_param [] = {
+	{						/* NTV on Astra */
+		frequency: 12669500-10600000,
+		inversion: INVERSION_OFF,
+		{ qpsk: { symbol_rate: 22000000, fec_inner: FEC_AUTO } }
+	},
+	{						/* Cable */
+		frequency: 394000000,
+		inversion: INVERSION_OFF,
+		{ qam:  { symbol_rate: 6900000,
+			  fec_inner: FEC_AUTO,
+			  modulation: QAM_64
+			}
+		}
+	},
+	{						/* DVB-T */
+		frequency: 730000000,
+		inversion: INVERSION_OFF,
+		{ ofdm: { bandwidth: BANDWIDTH_8_MHZ,
+			  code_rate_HP: FEC_2_3,
+			  code_rate_LP: FEC_1_2,
+			  constellation: QAM_16,
+			  transmission_mode: TRANSMISSION_MODE_2K,
+			  guard_interval: GUARD_INTERVAL_1_8,
+			  hierarchy_information: HIERARCHY_NONE
+			}
+		}
+	}
+};
+
+
+static
+int dvb_frontend_set_parameters (struct dvb_frontend_data *fe,
+				 struct dvb_frontend_parameters *param,
+				 int first_trial)
+{
+	struct dvb_frontend *frontend = &fe->frontend;
+	int err;
+
+	dprintk ("%s: f == %i, drift == %i\n",
+		 __FUNCTION__, param->frequency, fe->lnb_drift);
+
+	dvb_bend_frequency (fe, 0);
+
+	if (first_trial) {
+		fe->timeout_count = 0;
+		fe->lost_sync_count = 0;
+		fe->lost_sync_jiffies = jiffies;
+		fe->lnb_drift = 0;
+		if (fe->status & ~FE_TIMEDOUT)
+			dvb_frontend_add_event (fe, 0);
+		memcpy (&fe->parameters, param,
+			sizeof (struct dvb_frontend_parameters));
+	}
+
+	param->frequency += fe->lnb_drift + fe->bending;
+	err = dvb_frontend_internal_ioctl (frontend, FE_SET_FRONTEND, param);
+	param->frequency -= fe->lnb_drift + fe->bending;
+
+	wake_up_interruptible (&fe->wait_queue);
+
+	return err;
+}
+
+static
+void dvb_frontend_init (struct dvb_frontend_data *fe)
+{
+	struct dvb_frontend *frontend = &fe->frontend;
+	struct dvb_frontend_parameters *init_param;
+
+	printk ("%s: initialising frontend %i:%i (%s)...\n", __FUNCTION__,
+		frontend->i2c->adapter->num, frontend->i2c->id,
+		fe->info->name);
+
+	dvb_frontend_internal_ioctl (frontend, FE_INIT, NULL);
+
+	if (fe->info->type == FE_QPSK) {
+		dvb_frontend_internal_ioctl (frontend, FE_SET_VOLTAGE,
+					     (void*) SEC_VOLTAGE_13);
+		dvb_frontend_internal_ioctl (frontend, FE_SET_TONE,
+					     (void*) SEC_TONE_ON);
+	}
+
+	init_param = &default_param[fe->info->type-FE_QPSK];
+
+	dvb_frontend_set_parameters (fe, init_param, 1);
+}
+
+
+static
+void update_delay (int *quality, int *delay, int locked)
+{
+	int q2;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (locked)
+		(*quality) = (*quality * 220 + 36*256) / 256;
+	else
+		(*quality) = (*quality * 220 + 0) / 256;
+
+	q2 = *quality - 128;
+	q2 *= q2;
+
+	*delay = HZ/20 + q2 * HZ / (128*128);
+}
+
+
+#define LNB_DRIFT 1024  /*  max. tolerated LNB drift, XXX FIXME: adjust! */
+#define TIMEOUT 2*HZ
+
+/**
+ *  here we only come when we have lost the lock bit, 
+ *  let's try to do something useful...
+ */
+static
+void dvb_frontend_recover (struct dvb_frontend_data *fe)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+#if 0
+	if (fe->timeout_count > 3) {
+		printk ("%s: frontend seems dead, reinitializing...\n",
+			__FUNCTION__);
+		dvb_call_frontend_notifiers (fe, 0);
+		dvb_frontend_internal_ioctl (&fe->frontend, FE_INIT, NULL);
+		dvb_frontend_set_parameters (fe, &fe->parameters, 1);
+		dvb_frontend_add_event (fe, FE_REINIT);
+		fe->lost_sync_jiffies = jiffies;
+		fe->timeout_count = 0;
+		return;
+	}
+#endif
+
+	/**
+	 *  let's start a zigzag scan to compensate LNB drift...
+	 */
+	{
+		int j = fe->lost_sync_count;
+		int stepsize = fe->info->frequency_stepsize;
+
+		if (j % 32 == 0)
+			fe->lnb_drift = 0;
+		
+		if (j % 2)
+			fe->lnb_drift += stepsize * ((j+1)/2);
+		else
+			fe->lnb_drift = -fe->lnb_drift;
+
+		dvb_frontend_set_parameters (fe, &fe->parameters, 0);
+	}
+
+	dvb_frontend_internal_ioctl (&fe->frontend, FE_RESET, NULL);
+}
+
+
+
+static
+int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
+{
+	if (fe->exit)
+		return 1;
+
+	if (fe->dvbdev->users == 0 && dvb_shutdown_timeout)
+		if (jiffies - fe->release_jiffies > dvb_shutdown_timeout * HZ)
+			return 1;
+
+	return 0;
+}
+
+
+static
+int dvb_frontend_thread (void *data)
+{
+	struct dvb_frontend_data *fe = (struct dvb_frontend_data *) data;
+	int quality = 0, delay = 3*HZ;
+	fe_status_t s;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	lock_kernel ();
+	daemonize ();
+	sigfillset (&current->blocked);
+	strncpy (current->comm, "kdvb-fe", sizeof (current->comm));
+	fe->thread = current;
+	unlock_kernel ();
+
+	dvb_call_frontend_notifiers (fe, 0);
+	dvb_frontend_init (fe);
+
+	while (!dvb_frontend_is_exiting (fe)) {
+		up (&fe->sem);      /* is locked when we enter the thread... */
+
+		interruptible_sleep_on_timeout (&fe->wait_queue, delay);
+
+		if (down_interruptible (&fe->sem)) {
+			fe->thread = NULL;
+			return -ERESTARTSYS;
+		}
+
+		if (dvb_frontend_is_exiting (fe))
+			break;
+
+		dvb_frontend_internal_ioctl (&fe->frontend, FE_READ_STATUS, &s);
+
+		update_delay (&quality, &delay, s & FE_HAS_LOCK);
+
+		s &= ~FE_TIMEDOUT;
+
+		if (s & FE_HAS_LOCK) {
+			fe->timeout_count = 0;
+			fe->lost_sync_count = 0;
+		} else {
+			fe->lost_sync_count++;
+
+			dvb_frontend_recover (fe);
+			delay = HZ/5;
+			if (jiffies - fe->lost_sync_jiffies > TIMEOUT) {
+				s |= FE_TIMEDOUT;
+				if ((fe->status & FE_TIMEDOUT) == 0)
+					fe->timeout_count++;
+			}
+		}
+
+		if (s != fe->status)
+			dvb_frontend_add_event (fe, s);
+	};
+
+	dvb_frontend_internal_ioctl (&fe->frontend, FE_SLEEP, NULL); 
+	up (&fe->sem);
+	fe->thread = NULL;
+	return 0;
+}
+
+
+static
+void dvb_frontend_start (struct dvb_frontend_data *fe)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (!fe->exit && !fe->thread) {
+		if (down_interruptible (&fe->sem))
+			return;
+		kernel_thread (dvb_frontend_thread, fe, 0);
+	}
+}
+
+
+static
+void dvb_frontend_stop (struct dvb_frontend_data *fe)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	fe->exit = 1;
+	wake_up_interruptible (&fe->wait_queue);
+
+	while (fe->thread) {
+		current->state = TASK_INTERRUPTIBLE;
+		schedule_timeout (5);
+	};
+}
+
+
+static
+int dvb_frontend_ioctl (struct inode *inode, struct file *file,
+			unsigned int cmd, void *parg)
+{
+	struct dvb_device *dvbdev = file->private_data;
+	struct dvb_frontend_data *fe = dvbdev->priv;
+	int err = 0;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (!fe || !fe->frontend.ioctl || fe->exit)
+		return -ENODEV;
+
+	if (down_interruptible (&fe->sem))
+		return -ERESTARTSYS;
+
+	switch (cmd) {
+	case FE_DISEQC_SEND_MASTER_CMD:
+	case FE_DISEQC_SEND_BURST:
+	case FE_SET_TONE:
+		if (fe->status)
+			dvb_call_frontend_notifiers (fe, 0);
+		dvb_frontend_internal_ioctl (&fe->frontend, cmd, parg);
+		break;
+	case FE_SET_FRONTEND:
+		err = dvb_frontend_set_parameters (fe, parg, 1);
+		break;
+	case FE_GET_EVENT:
+		err = dvb_frontend_get_event (fe, parg, file->f_flags);
+		break;
+	case FE_GET_FRONTEND:
+		memcpy (parg, &fe->parameters,
+			sizeof (struct dvb_frontend_parameters));
+		/*  fall-through... */
+	default:
+		dvb_frontend_internal_ioctl (&fe->frontend, cmd, parg);
+	};
+
+	up (&fe->sem);
+
+	return err;
+}
+
+
+static
+unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wait)
+{
+	struct dvb_device *dvbdev = file->private_data;
+	struct dvb_frontend_data *fe = dvbdev->priv;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (fe->events.eventw != fe->events.eventr)
+		return (POLLIN | POLLRDNORM | POLLPRI);
+
+	poll_wait (file, &fe->events.wait_queue, wait);
+
+	if (fe->events.eventw != fe->events.eventr)
+		return (POLLIN | POLLRDNORM | POLLPRI);
+
+	return 0;
+}
+
+
+static
+int dvb_frontend_open (struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev = file->private_data;
+	struct dvb_frontend_data *fe = dvbdev->priv;
+	int ret;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if ((ret = dvb_generic_open (inode, file)) < 0)
+		return ret;
+
+	dvb_frontend_start (fe);
+
+	/*  empty event queue */
+	fe->events.eventr = fe->events.eventw;
+	
+	return ret;
+}
+
+
+static
+int dvb_frontend_release (struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev = file->private_data;
+	struct dvb_frontend_data *fe = dvbdev->priv;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	fe->release_jiffies = jiffies;
+
+	return dvb_generic_release (inode, file);
+}
+
+
+
+int
+dvb_add_frontend_ioctls (struct dvb_adapter_s *adapter,
+                         int (*before_ioctl) (struct dvb_frontend *frontend,
+                                              unsigned int cmd, void *arg),
+                         int (*after_ioctl)  (struct dvb_frontend *frontend,
+                                              unsigned int cmd, void *arg),
+			 void *before_after_data)
+{
+	struct dvb_frontend_ioctl_data *ioctl;
+        struct list_head *entry;
+	int frontend_count = 0;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&frontend_mutex))
+		return -ERESTARTSYS;
+
+	ioctl = kmalloc (sizeof(struct dvb_frontend_ioctl_data), GFP_KERNEL);
+
+	if (!ioctl) {
+		up (&frontend_mutex);
+		return -ENOMEM;
+	}
+
+	ioctl->adapter = adapter;
+	ioctl->before_ioctl = before_ioctl;
+	ioctl->after_ioctl = after_ioctl;
+	ioctl->before_after_data = before_after_data;
+
+	list_add_tail (&ioctl->list_head, &frontend_ioctl_list);
+
+	list_for_each (entry, &frontend_list) {
+		struct dvb_frontend_data *fe;
+
+		fe = list_entry (entry, struct dvb_frontend_data, list_head);
+
+		if (fe->frontend.i2c->adapter == adapter &&
+		    fe->frontend.before_ioctl == NULL &&
+		    fe->frontend.after_ioctl == NULL)
+		{
+			fe->frontend.before_ioctl = before_ioctl;
+			fe->frontend.after_ioctl = after_ioctl;
+			fe->frontend.before_after_data = before_after_data;
+			dvb_frontend_start (fe);
+			frontend_count++;
+		}
+	}
+
+	up (&frontend_mutex);
+
+	return frontend_count;
+}
+
+
+void
+dvb_remove_frontend_ioctls (struct dvb_adapter_s *adapter,
+			    int (*before_ioctl) (struct dvb_frontend *frontend,
+                                                 unsigned int cmd, void *arg),
+                            int (*after_ioctl)  (struct dvb_frontend *frontend,
+                                                 unsigned int cmd, void *arg))
+{
+        struct list_head *entry;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&frontend_mutex))
+		return;
+
+	list_for_each (entry, &frontend_list) {
+		struct dvb_frontend_data *fe;
+
+		fe = list_entry (entry, struct dvb_frontend_data, list_head);
+
+		if (fe->frontend.i2c->adapter == adapter &&
+		    fe->frontend.before_ioctl == before_ioctl &&
+		    fe->frontend.after_ioctl == after_ioctl)
+		{
+			fe->frontend.before_ioctl = NULL;
+			fe->frontend.after_ioctl = NULL;
+
+		}
+	}
+
+	up (&frontend_mutex);
+}
+
+
+int
+dvb_add_frontend_notifier (struct dvb_adapter_s *adapter,
+			   void (*callback) (fe_status_t s, void *data),
+			   void *data)
+{
+        struct list_head *entry;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&frontend_mutex))
+		return -ERESTARTSYS;
+
+	list_for_each (entry, &frontend_list) {
+		struct dvb_frontend_data *fe;
+
+		fe = list_entry (entry, struct dvb_frontend_data, list_head);
+
+		if (fe->frontend.i2c->adapter == adapter) {
+			struct dvb_fe_notifier_callbacks *e;
+
+			e = kmalloc (sizeof(struct dvb_fe_notifier_callbacks),
+				     GFP_KERNEL);
+
+			if (!e) {
+				up (&frontend_mutex);
+				return -ENOMEM;
+			}
+
+			e->callback = callback;
+			e->data = data;
+			list_add_tail (&e->list_head, &fe->notifier_callbacks);
+
+			up (&frontend_mutex);
+			return 0;
+		}
+	}
+
+	up (&frontend_mutex);
+
+	return -ENODEV;
+}
+
+
+void
+dvb_remove_frontend_notifier (struct dvb_adapter_s *adapter,
+			      void (*callback) (fe_status_t s, void *data))
+{
+        struct list_head *entry;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&frontend_mutex))
+		return;
+
+	list_for_each (entry, &frontend_list) {
+		struct dvb_frontend_data *fe;
+
+		fe = list_entry (entry, struct dvb_frontend_data, list_head);
+
+		if (fe->frontend.i2c->adapter == adapter) {
+			struct list_head *e0, *n0;
+
+			list_for_each_safe (e0, n0, &fe->notifier_callbacks) {
+				struct dvb_fe_notifier_callbacks *e;
+
+				e = list_entry (e0,
+						struct dvb_fe_notifier_callbacks,
+						list_head);
+				list_del (&e->list_head);
+				kfree (e);
+			}
+		}
+	}
+
+	up (&frontend_mutex);
+}
+
+
+static
+struct file_operations dvb_frontend_fops = {
+        owner:          THIS_MODULE,
+        ioctl:          dvb_generic_ioctl,
+	poll:		dvb_frontend_poll,
+        open:           dvb_frontend_open,
+        release:        dvb_frontend_release
+};
+
+
+
+int
+dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend,
+				     unsigned int cmd, void *arg),
+		       struct dvb_i2c_bus *i2c,
+		       void *data,
+		       struct dvb_frontend_info *info)
+{
+	struct list_head *entry;
+	struct dvb_frontend_data *fe;
+	dvb_device_t dvbdev_template = { users: 1, writers: 1,
+					 fops: &dvb_frontend_fops,
+					 kernel_ioctl: dvb_frontend_ioctl
+	};
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&frontend_mutex))
+		return -ERESTARTSYS;
+
+	if (!(fe = kmalloc (sizeof (struct dvb_frontend_data), GFP_KERNEL))) {
+		up (&frontend_mutex);
+		return -ENOMEM;
+	}
+
+	memset (fe, 0, sizeof (struct dvb_frontend_data));
+
+	init_MUTEX (&fe->sem);
+	init_waitqueue_head (&fe->wait_queue);
+	init_waitqueue_head (&fe->events.wait_queue);
+	init_MUTEX (&fe->events.sem);
+	fe->events.eventw = fe->events.eventr = 0;
+	fe->events.overflow = 0;
+	INIT_LIST_HEAD (&fe->notifier_callbacks);
+
+	fe->frontend.ioctl = ioctl;
+	fe->frontend.i2c = i2c;
+	fe->frontend.data = data;
+	fe->info = info;
+
+	list_for_each (entry, &frontend_ioctl_list) {
+		struct dvb_frontend_ioctl_data *ioctl;
+
+		ioctl = list_entry (entry, struct dvb_frontend_ioctl_data, list_head);
+
+		if (ioctl->adapter == i2c->adapter) {
+			fe->frontend.before_ioctl = ioctl->before_ioctl;
+			fe->frontend.after_ioctl = ioctl->after_ioctl;
+			fe->frontend.before_after_data = ioctl->before_after_data;
+			dvb_frontend_start (fe);
+			break;
+		}
+	}
+
+	list_add_tail (&fe->list_head, &frontend_list);
+
+	dvb_register_device (i2c->adapter, &fe->dvbdev, &dvbdev_template,
+			     fe, DVB_DEVICE_FRONTEND);
+
+	up (&frontend_mutex);
+
+	return 0;
+}
+
+
+int dvb_unregister_frontend (int (*ioctl) (struct dvb_frontend *frontend,
+					   unsigned int cmd, void *arg),
+			     struct dvb_i2c_bus *i2c)
+{
+        struct list_head *entry, *n;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (down_interruptible (&frontend_mutex))
+		return -ERESTARTSYS;
+
+	list_for_each_safe (entry, n, &frontend_list) {
+		struct dvb_frontend_data *fe;
+
+		fe = list_entry (entry, struct dvb_frontend_data, list_head);
+
+		if (fe->frontend.ioctl == ioctl && fe->frontend.i2c == i2c) {
+			dvb_unregister_device (fe->dvbdev);
+
+			list_del (entry);
+			up (&frontend_mutex);
+
+			dvb_frontend_stop (fe);
+			kfree (fe);
+			return 0;
+		}
+	}
+
+	up (&frontend_mutex);
+	return -EINVAL;
+}
+
+MODULE_PARM(dvb_frontend_debug,"i");
+MODULE_PARM(dvb_shutdown_timeout,"i");
+MODULE_PARM_DESC(dvb_frontend_debug, "enable verbose debug messages");
+MODULE_PARM_DESC(dvb_shutdown_timeout, "wait <shutdown_timeout> seconds after close() before suspending hardware");
diff -Nru a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,117 @@
+/* 
+ * dvb-core.h
+ *
+ * Copyright (C) 2001 Ralph  Metzler <ralph@convergence.de>
+ *                    overhauled by Holger Waechtler <holger@convergence.de>
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVB_FRONTEND_H_
+#define _DVB_FRONTEND_H_
+
+#include <asm/types.h>
+#include <linux/sched.h>
+#include <linux/ioctl.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+
+#ifndef MODULE_LICENSE
+#define MODULE_LICENSE(x)
+#endif
+
+#include <linux/dvb/frontend.h>
+
+#include "dvb_i2c.h"
+#include "dvbdev.h"
+
+
+
+
+/**
+ *   when before_ioctl is registered and returns value 0, ioctl and after_ioctl
+ *   are not executed.
+ */
+
+struct dvb_frontend {
+	int (*before_ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg);
+	int (*ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg);
+	int (*after_ioctl) (struct dvb_frontend *frontend, unsigned int cmd, void *arg);
+	struct dvb_i2c_bus *i2c;
+	void *before_after_data;   /*  can be used by hardware module... */
+	void *data;                /*  can be used by hardware module... */
+};
+
+
+/**
+ *   private frontend command ioctl's.
+ *   keep them in sync with the public ones defined in linux/dvb/frontend.h
+ */
+#define FE_SLEEP              _IO('v', 80)
+#define FE_INIT               _IO('v', 81)
+#define FE_RESET              _IO('v', 82)
+
+
+extern int
+dvb_register_frontend (int (*ioctl) (struct dvb_frontend *frontend,
+				     unsigned int cmd, void *arg),
+		       struct dvb_i2c_bus *i2c,
+		       void *data,
+		       struct dvb_frontend_info *info);
+
+extern int
+dvb_unregister_frontend (int (*ioctl) (struct dvb_frontend *frontend,
+				       unsigned int cmd, void *arg),
+			 struct dvb_i2c_bus *i2c);
+
+
+/**
+ *  Add special ioctl code performed before and after the main ioctl
+ *  to all frontend devices on the specified DVB adapter.
+ *  This is necessairy because the 22kHz/13V-18V/DiSEqC stuff depends
+ *  heavily on the hardware around the frontend, the same tuner can create 
+ *  these signals on about a million different ways...
+ *
+ *  Return value: number of frontends where the ioctl's were applied.
+ */
+extern int
+dvb_add_frontend_ioctls (struct dvb_adapter_s *adapter,
+			 int (*before_ioctl) (struct dvb_frontend *frontend,
+					      unsigned int cmd, void *arg),
+			 int (*after_ioctl)  (struct dvb_frontend *frontend,
+					      unsigned int cmd, void *arg),
+			 void *before_after_data);
+
+
+extern void
+dvb_remove_frontend_ioctls (struct dvb_adapter_s *adapter,
+			    int (*before_ioctl) (struct dvb_frontend *frontend,
+					         unsigned int cmd, void *arg),
+			    int (*after_ioctl)  (struct dvb_frontend *frontend,
+					         unsigned int cmd, void *arg));
+
+extern int
+dvb_add_frontend_notifier (struct dvb_adapter_s *adapter,
+			   void (*callback) (fe_status_t s, void *data),
+			   void *data);
+extern void
+dvb_remove_frontend_notifier (struct dvb_adapter_s *adapter,
+			      void (*callback) (fe_status_t s, void *data));
+
+#endif
+
diff -Nru a/drivers/media/dvb/dvb-core/dvb_i2c.c b/drivers/media/dvb/dvb-core/dvb_i2c.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_i2c.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,301 @@
+/*
+ * dvb_i2c.h: simplified i2c interface for DVB adapters to get rid of i2c-core.c
+ *
+ * Copyright (C) 2002 Holger Waechtler for convergence integrated media GmbH
+ *
+ * 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.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/module.h>
+
+#include "compat.h"
+#include "dvb_i2c.h"
+
+
+struct dvb_i2c_device {
+	struct list_head list_head;
+	struct module *owner;
+	int (*attach) (struct dvb_i2c_bus *i2c);
+	void (*detach) (struct dvb_i2c_bus *i2c);
+};
+
+
+LIST_HEAD(dvb_i2c_buslist);
+LIST_HEAD(dvb_i2c_devicelist);
+
+DECLARE_MUTEX(dvb_i2c_mutex);
+
+
+static
+int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
+{
+	struct dvb_i2c_device *client;
+
+	if (!(client = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL)))
+		return -ENOMEM;
+
+	client->detach = dev->detach;
+	client->owner = dev->owner;
+
+	INIT_LIST_HEAD(&client->list_head);
+
+	list_add_tail (&client->list_head, &i2c->client_list);
+
+	return 0;
+}
+
+
+static
+void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
+{
+	if (dev->owner) {
+		if (!MOD_CAN_QUERY(dev->owner))
+			return;
+
+		__MOD_INC_USE_COUNT(dev->owner);
+	}
+
+	if (dev->attach (i2c) == 0) {
+		register_i2c_client (i2c, dev);
+	} else {
+		if (dev->owner)
+			__MOD_DEC_USE_COUNT(dev->owner);
+	}
+}
+
+
+static
+void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
+{
+	dev->detach (i2c);
+
+	if (dev->owner)
+		__MOD_DEC_USE_COUNT(dev->owner);
+}
+
+
+static
+void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev,
+				     struct dvb_i2c_bus *i2c)
+{
+	struct list_head *entry;
+
+	list_for_each (entry, &i2c->client_list) {
+                struct dvb_i2c_device *client;
+
+		client = list_entry (entry, struct dvb_i2c_device, list_head);
+
+		if (client->detach == dev->detach)
+			detach_device (i2c, dev);
+	}
+}
+
+
+static
+void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev)
+{
+	struct list_head *entry;
+
+	list_for_each (entry, &dvb_i2c_buslist) {
+                struct dvb_i2c_bus *i2c;
+
+		i2c = list_entry (entry, struct dvb_i2c_bus, list_head);
+
+		unregister_i2c_client_from_bus (dev, i2c);
+	}
+}
+
+
+static
+void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c)
+{
+	struct list_head *entry, *n;
+
+	list_for_each_safe (entry, n, &(i2c->client_list)) {
+		struct dvb_i2c_device *client;
+
+		client = list_entry (entry, struct dvb_i2c_device, list_head);
+
+		detach_device (i2c, client);
+
+		list_del (entry);
+	}
+}
+
+
+
+static
+void probe_device_on_all_busses (struct dvb_i2c_device *dev)
+{
+	struct list_head *entry;
+
+	list_for_each (entry, &dvb_i2c_buslist) {
+                struct dvb_i2c_bus *i2c;
+
+		i2c = list_entry (entry, struct dvb_i2c_bus, list_head);
+
+		try_attach_device (i2c, dev);
+	}
+}
+
+
+static
+void probe_devices_on_bus (struct dvb_i2c_bus *i2c)
+{
+	struct list_head *entry;
+
+	list_for_each (entry, &dvb_i2c_devicelist) {
+		struct dvb_i2c_device *dev;
+
+		dev = list_entry (entry, struct dvb_i2c_device, list_head);
+
+		try_attach_device (i2c, dev);
+	}
+}
+
+
+struct dvb_i2c_bus*
+dvb_register_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
+				   struct i2c_msg msgs[], int num),
+		      void *data,
+		      struct dvb_adapter_s *adapter,
+		      int id)
+{
+	struct dvb_i2c_bus *i2c;
+
+	if (!(i2c = kmalloc (sizeof (struct dvb_i2c_bus), GFP_KERNEL)))
+		return NULL;
+
+	INIT_LIST_HEAD(&i2c->list_head);
+	INIT_LIST_HEAD(&i2c->client_list);
+
+	i2c->xfer = xfer;
+	i2c->data = data;
+	i2c->adapter = adapter;
+	i2c->id = id;
+
+	probe_devices_on_bus (i2c);
+
+	list_add_tail (&i2c->list_head, &dvb_i2c_buslist);
+
+	return i2c;
+}
+
+
+struct dvb_i2c_bus*
+dvb_find_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
+                                   struct i2c_msg msgs[], int num),
+                  struct dvb_adapter_s *adapter,
+		  int id)
+{
+	struct list_head *entry;
+
+	if (down_interruptible (&dvb_i2c_mutex))
+		return NULL;
+
+	list_for_each (entry, &dvb_i2c_buslist) {
+		struct dvb_i2c_bus *i2c;
+
+		i2c = list_entry (entry, struct dvb_i2c_bus, list_head);
+
+		if (i2c->xfer == xfer &&
+		    i2c->adapter == adapter &&
+		    i2c->id == id)
+		{
+			up (&dvb_i2c_mutex);
+			return i2c;
+		}
+	}
+
+	up (&dvb_i2c_mutex);
+
+	return NULL;
+}
+
+
+
+void dvb_unregister_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
+					  struct i2c_msg msgs[], int num),
+			     struct dvb_adapter_s *adapter,
+			     int id)
+{
+	struct dvb_i2c_bus *i2c = dvb_find_i2c_bus (xfer, adapter, id);
+
+	if (i2c) {
+		unregister_all_clients_from_bus (i2c);
+		list_del (&i2c->list_head);
+		kfree (i2c);
+	}
+}
+
+
+int dvb_register_i2c_device (struct module *owner,
+			     int (*attach) (struct dvb_i2c_bus *i2c),
+			     void (*detach) (struct dvb_i2c_bus *i2c))
+{
+	struct dvb_i2c_device *entry;
+
+	if (down_interruptible (&dvb_i2c_mutex))
+		return -ERESTARTSYS;
+
+	if (!(entry = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL)))
+		return -ENOMEM;
+
+	entry->owner = owner;
+	entry->attach = attach;
+	entry->detach = detach;
+
+	INIT_LIST_HEAD(&entry->list_head);
+
+	probe_device_on_all_busses (entry);
+
+	list_add_tail (&entry->list_head, &dvb_i2c_devicelist);
+
+	up (&dvb_i2c_mutex);
+
+	return 0;
+}
+
+
+int dvb_unregister_i2c_device (int (*attach) (struct dvb_i2c_bus *i2c))
+{
+	struct list_head *entry, *n;
+
+	if (down_interruptible (&dvb_i2c_mutex))
+		return -ERESTARTSYS;
+
+	list_for_each_safe (entry, n, &dvb_i2c_devicelist) {
+		struct dvb_i2c_device *dev;
+
+		dev = list_entry (entry, struct dvb_i2c_device, list_head);
+
+		if (dev->attach == attach) {
+			list_del (entry);
+			unregister_i2c_client_from_all_busses (dev);
+			kfree (entry);
+			up (&dvb_i2c_mutex);
+			return 0;
+                }
+        }
+
+	up (&dvb_i2c_mutex);
+
+        return -EINVAL;
+}
+
+
diff -Nru a/drivers/media/dvb/dvb-core/dvb_i2c.h b/drivers/media/dvb/dvb-core/dvb_i2c.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_i2c.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,63 @@
+/*
+ * dvb_i2c.h: i2c interface to get rid of i2c-core.c
+ *
+ * Copyright (C) 2002 Holger Waechtler for convergence integrated media GmbH
+ *
+ * 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.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ */
+
+#ifndef _DVB_I2C_H_
+#define _DVB_I2C_H_
+
+#include <linux/list.h>
+#include <linux/i2c.h>
+
+#include "dvbdev.h"
+
+
+struct dvb_i2c_bus {
+	struct list_head list_head;
+	int (*xfer) (struct dvb_i2c_bus *i2c, struct i2c_msg msgs[], int num);
+	void *data;
+	struct dvb_adapter_s *adapter;
+	int id;
+	struct list_head client_list;
+};
+
+
+extern 
+struct dvb_i2c_bus* dvb_register_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
+						       struct i2c_msg msgs[],
+						       int num),
+					  void *data,
+					  struct dvb_adapter_s *adapter,
+					  int id);
+
+extern
+void dvb_unregister_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
+					  struct i2c_msg msgs[], int num),
+			     struct dvb_adapter_s *adapter,
+			     int id);
+
+
+extern int dvb_register_i2c_device (struct module *owner,
+				    int (*attach) (struct dvb_i2c_bus *i2c),
+				    void (*detach) (struct dvb_i2c_bus *i2c));
+
+extern int dvb_unregister_i2c_device (int (*attach) (struct dvb_i2c_bus *i2c));
+
+#endif
+
diff -Nru a/drivers/media/dvb/dvb-core/dvb_ksyms.c b/drivers/media/dvb/dvb-core/dvb_ksyms.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_ksyms.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,49 @@
+#include <linux/module.h>
+
+#include "dmxdev.h"
+#include "dvb_filter.h"
+#include "dvb_frontend.h"
+#include "dvb_i2c.h"
+#include "dvbdev.h"
+#include "dvb_demux.h"
+#include "dvb_net.h"
+
+
+EXPORT_SYMBOL(DmxDevInit);
+EXPORT_SYMBOL(DmxDevRelease);
+EXPORT_SYMBOL(DvbDmxInit);
+EXPORT_SYMBOL(DvbDmxRelease);
+EXPORT_SYMBOL(DvbDmxSWFilterPackets);
+
+EXPORT_SYMBOL(dvb_register_frontend);
+EXPORT_SYMBOL(dvb_unregister_frontend);
+EXPORT_SYMBOL(dvb_add_frontend_ioctls);
+EXPORT_SYMBOL(dvb_remove_frontend_ioctls);
+EXPORT_SYMBOL(dvb_add_frontend_notifier);
+EXPORT_SYMBOL(dvb_remove_frontend_notifier);
+
+EXPORT_SYMBOL(dvb_register_i2c_bus);
+EXPORT_SYMBOL(dvb_unregister_i2c_bus);
+EXPORT_SYMBOL(dvb_register_i2c_device);
+EXPORT_SYMBOL(dvb_unregister_i2c_device);
+
+EXPORT_SYMBOL(dvb_net_init);
+EXPORT_SYMBOL(dvb_net_release);
+
+EXPORT_SYMBOL(dvb_register_adapter);
+EXPORT_SYMBOL(dvb_unregister_adapter);
+EXPORT_SYMBOL(dvb_register_device);
+EXPORT_SYMBOL(dvb_unregister_device);
+EXPORT_SYMBOL(dvb_generic_ioctl);
+EXPORT_SYMBOL(dvb_generic_open);
+EXPORT_SYMBOL(dvb_generic_release);
+EXPORT_SYMBOL(generic_usercopy);
+
+EXPORT_SYMBOL(init_ipack);
+EXPORT_SYMBOL(reset_ipack);
+EXPORT_SYMBOL(free_ipack);
+EXPORT_SYMBOL(send_ipack_rest);
+EXPORT_SYMBOL(instant_repack);
+EXPORT_SYMBOL(pes2ts_init);
+EXPORT_SYMBOL(pes2ts);
+
diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_net.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,507 @@
+/* 
+ * dvb_net.c
+ *
+ * Copyright (C) 2001 Convergence integrated media GmbH
+ *                    Ralph Metzler <ralph@convergence.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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/dvb/net.h>
+
+#include <asm/uaccess.h>
+#include "demux.h"
+#include "dvb_net.h"
+
+/*
+ *	Determine the packet's protocol ID. The rule here is that we 
+ *	assume 802.3 if the type field is short enough to be a length.
+ *	This is normal practice and works for any 'now in use' protocol.
+ *
+ *  stolen from eth.c out of the linux kernel, hacked for dvb-device
+ *  by Michael Holzt <kju@debian.org>
+ */
+ 
+unsigned short my_eth_type_trans(struct sk_buff *skb, struct net_device *dev)
+{
+	struct ethhdr *eth;
+	unsigned char *rawp;
+	
+	skb->mac.raw=skb->data;
+	skb_pull(skb,dev->hard_header_len);
+	eth= skb->mac.ethernet;
+	
+	if(*eth->h_dest&1)
+	{
+		if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0)
+			skb->pkt_type=PACKET_BROADCAST;
+		else
+			skb->pkt_type=PACKET_MULTICAST;
+	}
+	
+	if (ntohs(eth->h_proto) >= 1536)
+		return eth->h_proto;
+		
+	rawp = skb->data;
+	
+	/*
+	 *	This is a magic hack to spot IPX packets. Older Novell breaks
+	 *	the protocol design and runs IPX over 802.3 without an 802.2 LLC
+	 *	layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
+	 *	won't work for fault tolerant netware but does for the rest.
+	 */
+	if (*(unsigned short *)rawp == 0xFFFF)
+		return htons(ETH_P_802_3);
+		
+	/*
+	 *	Real 802.2 LLC
+	 */
+	return htons(ETH_P_802_2);
+}
+
+static void 
+dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
+{
+        u8 *eth;
+        struct sk_buff *skb;
+
+        if (pkt_len<13) {
+                printk("%s: IP/MPE packet length = %d too small.\n", dev->name, pkt_len);
+		return;
+	}
+        skb = dev_alloc_skb(pkt_len+2);
+        if (skb == NULL) {
+                printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n",
+                       dev->name);
+                ((dvb_net_priv_t *)dev->priv)->stats.rx_dropped++;
+                return;
+        }
+        eth=(u8 *) skb_put(skb, pkt_len+2);
+        memcpy(eth+14, (void*)pkt+12, pkt_len-12);
+
+        eth[0]=pkt[0x0b];
+        eth[1]=pkt[0x0a];
+        eth[2]=pkt[0x09];
+        eth[3]=pkt[0x08];
+        eth[4]=pkt[0x04];
+        eth[5]=pkt[0x03];
+        eth[6]=eth[7]=eth[8]=eth[9]=eth[10]=eth[11]=0;
+        eth[12]=0x08; eth[13]=0x00;
+
+	skb->protocol=my_eth_type_trans(skb,dev);
+        skb->dev=dev;
+        
+        ((dvb_net_priv_t *)dev->priv)->stats.rx_packets++;
+        ((dvb_net_priv_t *)dev->priv)->stats.rx_bytes+=skb->len;
+        //sti();
+        netif_rx(skb);
+}
+ 
+static int 
+dvb_net_callback(u8 *buffer1, size_t buffer1_len,
+		 u8 *buffer2, size_t buffer2_len,
+		 dmx_section_filter_t *filter,
+		 dmx_success_t success)
+{
+        struct net_device *dev=(struct net_device *) filter->priv;
+
+	/* FIXME: this only works if exactly one complete section is
+	          delivered in buffer1 only */
+	dvb_net_sec(dev, buffer1, buffer1_len);
+	return 0;
+}
+
+static int
+dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
+{
+	return 0;
+}
+
+#define MASK 0x00;
+
+static int 
+dvb_net_filter_set(struct net_device *dev, 
+		   dmx_section_filter_t **secfilter,
+		   unsigned char *mac)
+{
+	dvb_net_priv_t *priv=(dvb_net_priv_t *)dev->priv;
+	int ret;
+
+	*secfilter=0;
+	ret=priv->secfeed->allocate_filter(priv->secfeed, secfilter);
+	if (ret<0) {
+		printk("%s: could not get filter\n", dev->name);
+		return ret;
+	}
+
+	(*secfilter)->priv=(void *) dev;
+
+	memset((*secfilter)->filter_value, 0, DMX_MAX_FILTER_SIZE);
+	memset((*secfilter)->filter_mask , 0, DMX_MAX_FILTER_SIZE);
+
+	(*secfilter)->filter_value[0]=0x3e;
+	(*secfilter)->filter_mask[0]=MASK;
+
+	(*secfilter)->filter_value[3]=mac[5];
+	(*secfilter)->filter_mask[3]=MASK;
+	(*secfilter)->filter_value[4]=mac[4];
+	(*secfilter)->filter_mask[4]=MASK;
+	(*secfilter)->filter_value[8]=mac[3];
+	(*secfilter)->filter_mask[8]=MASK;
+	(*secfilter)->filter_value[9]=mac[2];
+	(*secfilter)->filter_mask[9]=MASK;
+
+	(*secfilter)->filter_value[10]=mac[1];
+	(*secfilter)->filter_mask[10]=MASK;
+	(*secfilter)->filter_value[11]=mac[0];
+	(*secfilter)->filter_mask[11]=MASK;
+
+	printk("%s: filter mac=%02x %02x %02x %02x %02x %02x\n", 
+	       dev->name, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+	return 0;
+}
+
+static int
+dvb_net_feed_start(struct net_device *dev)
+{
+	int ret, i;
+	dvb_net_priv_t *priv=(dvb_net_priv_t *)dev->priv;
+        dmx_demux_t *demux=priv->demux;
+        unsigned char *mac=(unsigned char *) dev->dev_addr;
+		
+	priv->secfeed=0;
+	priv->secfilter=0;
+
+	ret=demux->allocate_section_feed(demux, &priv->secfeed, 
+					 dvb_net_callback);
+	if (ret<0) {
+		printk("%s: could not get section feed\n", dev->name);
+		return ret;
+	}
+
+	ret=priv->secfeed->set(priv->secfeed, priv->pid, 32768, 0, 0);
+	if (ret<0) {
+		printk("%s: could not set section feed\n", dev->name);
+		priv->demux->
+		        release_section_feed(priv->demux, priv->secfeed);
+		priv->secfeed=0;
+		return ret;
+	}
+	MOD_INC_USE_COUNT;
+
+	dvb_net_filter_set(dev, &priv->secfilter, mac);
+	for (i=0; i<priv->multi_num; i++) 
+		dvb_net_filter_set(dev, &priv->secfilter,
+				   priv->multi_macs[i]);
+
+	priv->secfeed->start_filtering(priv->secfeed);
+	printk("%s: feed_started\n", dev->name);
+	return 0;
+}
+
+static void
+dvb_net_feed_stop(struct net_device *dev)
+{
+	dvb_net_priv_t *priv=(dvb_net_priv_t *)dev->priv;
+	int i;
+
+        if (priv->secfeed) {
+	        if (priv->secfeed->is_filtering)
+		        priv->secfeed->stop_filtering(priv->secfeed);
+		printk("%s: feed_stopped\n", dev->name);
+	        if (priv->secfilter)
+		        priv->secfeed->
+			        release_filter(priv->secfeed, 
+					       priv->secfilter);
+		priv->secfilter=0;
+
+		for (i=0; i<priv->multi_num; i++) {
+			if (priv->multi_secfilter[i])
+				priv->secfeed->
+					release_filter(priv->secfeed, 
+						       priv->multi_secfilter[i]);
+			priv->multi_secfilter[i]=0;
+		}
+		priv->demux->
+		        release_section_feed(priv->demux, priv->secfeed);
+		priv->secfeed=0;
+		MOD_DEC_USE_COUNT;
+	} else
+		printk("%s: no feed to stop\n", dev->name);
+}
+
+static int
+dvb_set_mc_filter(struct net_device *dev, struct dev_mc_list *mc)
+{
+	dvb_net_priv_t *priv=(dvb_net_priv_t *)dev->priv;
+
+	if (priv->multi_num==DVB_NET_MULTICAST_MAX)
+		return -ENOMEM;
+
+	printk("%s: set_mc_filter %d: %02x %02x %02x %02x %02x %02x\n", 
+	       dev->name, 
+	       priv->multi_num,
+	       mc->dmi_addr[0],
+	       mc->dmi_addr[1],
+	       mc->dmi_addr[2],
+	       mc->dmi_addr[3],
+	       mc->dmi_addr[4],
+	       mc->dmi_addr[5]);
+	memcpy(priv->multi_macs[priv->multi_num], mc->dmi_addr, 6);
+	
+	priv->multi_num++;
+	return 0;
+}
+
+static void
+dvb_net_set_multi(struct net_device *dev)
+{
+	dvb_net_priv_t *priv=(dvb_net_priv_t *)dev->priv;
+
+	printk("%s: set_multi()\n", dev->name);
+	dvb_net_feed_stop(dev);
+
+	if (dev->flags&IFF_PROMISC) {
+		/* Enable promiscuous mode */
+		printk("%s: promiscuous mode\n", dev->name);
+	} else if((dev->flags&IFF_ALLMULTI)) {
+		/* Disable promiscuous mode, use normal mode. */
+		printk("%s: normal mode\n", dev->name);
+	} else if(dev->mc_count) {
+                int mci;
+                struct dev_mc_list *mc;
+		
+		printk("%s: set_mc_list, %d entries\n", 
+		       dev->name, dev->mc_count);
+		priv->multi_num=0;
+                for (mci=0, mc=dev->mc_list; 
+		     mci<dev->mc_count;
+		     mc=mc->next, mci++) {
+			dvb_set_mc_filter(dev, mc);
+                } 
+	}
+	dvb_net_feed_start(dev);
+}
+
+static int
+dvb_net_set_config(struct net_device *dev, struct ifmap *map)
+{
+	if (netif_running(dev))
+		return -EBUSY;
+	return 0;
+}
+
+static int
+dvb_net_set_mac(struct net_device *dev, void *p)
+{
+	struct sockaddr *addr=p;
+
+	memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+	if (netif_running(dev)) {
+	        dvb_net_feed_stop(dev);
+		dvb_net_feed_start(dev);
+	}
+        return 0;
+}
+
+
+static int
+dvb_net_open(struct net_device *dev)
+{
+	dvb_net_feed_start(dev);
+	return 0;
+}
+
+static int
+dvb_net_stop(struct net_device *dev)
+{
+        dvb_net_feed_stop(dev);
+	return 0;
+}
+
+static struct net_device_stats *
+dvb_net_get_stats(struct net_device *dev)
+{
+        return &((dvb_net_priv_t *)dev->priv)->stats;
+}
+
+
+static int
+dvb_net_init_dev(struct net_device *dev)
+{
+	printk("dvb_net: dvb_net_init_dev()\n");
+
+	ether_setup(dev);
+
+	dev->open		= dvb_net_open;
+	dev->stop		= dvb_net_stop;
+	dev->hard_start_xmit	= dvb_net_tx;
+	dev->get_stats		= dvb_net_get_stats;
+	dev->set_multicast_list = dvb_net_set_multi;
+	dev->set_config         = dvb_net_set_config;
+	dev->set_mac_address    = dvb_net_set_mac;
+	dev->mtu		= 4096;
+
+	dev->flags             |= IFF_NOARP;
+	dev->hard_header_cache  = NULL;
+
+	//SET_MODULE_OWNER(dev);
+	
+	return 0;
+}
+
+static int 
+get_if(dvb_net_t *dvbnet)
+{
+	int i;
+
+	for (i=0; i<dvbnet->dev_num; i++) 
+		if (!dvbnet->state[i])
+			break;
+	if (i==dvbnet->dev_num)
+		return -1;
+	dvbnet->state[i]=1;
+	return i;
+}
+
+
+int 
+dvb_net_add_if(dvb_net_t *dvbnet, u16 pid)
+{
+        struct net_device *net;
+	dmx_demux_t *demux;
+	int result;
+	int if_num;
+ 
+	if_num=get_if(dvbnet);
+	if (if_num<0)
+		return -EINVAL;
+
+	net=&dvbnet->device[if_num];
+	demux=dvbnet->demux;
+	
+	net->base_addr = 0;
+	net->irq       = 0;
+	net->dma       = 0;
+	net->mem_start = 0;
+        memcpy(net->name, "dvb0_0", 7);
+        net->name[3]=dvbnet->card_num+0x30;
+        net->name[5]=if_num+0x30;
+        net->next      = NULL;
+        net->init      = dvb_net_init_dev;
+        net->priv      = kmalloc(sizeof(dvb_net_priv_t), GFP_KERNEL);
+	if (net->priv == NULL)
+			return -ENOMEM;
+	memset(net->priv, 0, sizeof(dvb_net_priv_t));
+
+        ((dvb_net_priv_t *)net->priv)->demux=demux;
+        ((dvb_net_priv_t *)net->priv)->pid=pid;
+
+        net->base_addr=pid;
+                
+	if ((result = register_netdev(net)) < 0) {
+		return result;
+	}
+	MOD_INC_USE_COUNT;
+        return if_num;
+}
+
+int 
+dvb_net_remove_if(dvb_net_t *dvbnet, int num)
+{
+	if (!dvbnet->state[num])
+		return -EINVAL;
+	dvb_net_stop(&dvbnet->device[num]);
+        kfree(dvbnet->device[num].priv);
+        unregister_netdev(&dvbnet->device[num]);
+	dvbnet->state[num]=0;
+	MOD_DEC_USE_COUNT;
+	return 0;
+}
+
+int dvb_net_ioctl(struct inode *inode, struct file *file, 
+		  unsigned int cmd, void *parg)
+{
+	dvb_device_t *dvbdev=(dvb_device_t *) file->private_data;
+	dvb_net_t *dvbnet=(dvb_net_t *) dvbdev->priv;
+
+	if (((file->f_flags&O_ACCMODE)==O_RDONLY))
+		return -EPERM;
+	
+	switch (cmd) {
+	case NET_ADD_IF:
+	{
+		struct dvb_net_if *dvbnetif=(struct dvb_net_if *)parg;
+		int result;
+		
+		result=dvb_net_add_if(dvbnet, dvbnetif->pid);
+		if (result<0)
+			return result;
+		dvbnetif->if_num=result;
+		break;
+	}
+	case NET_REMOVE_IF:
+		return dvb_net_remove_if(dvbnet, (int) parg);
+	default:
+		return -EINVAL;
+	}
+	return 0;
+}
+
+static struct file_operations dvb_net_fops = {
+	owner:		THIS_MODULE,
+        read:		0,
+	write:		0,
+	ioctl:		dvb_generic_ioctl,
+	open:		dvb_generic_open,
+	release:	dvb_generic_release,
+	poll:		0,
+};
+
+static dvb_device_t dvbdev_net = {
+        priv: 0,
+        users: 1,
+        writers: 1,
+        fops: &dvb_net_fops,
+        kernel_ioctl: dvb_net_ioctl,
+};
+
+void
+dvb_net_release(dvb_net_t *dvbnet)
+{
+	int i;
+
+	dvb_unregister_device(dvbnet->dvbdev);
+	for (i=0; i<dvbnet->dev_num; i++) {
+		if (!dvbnet->state[i])
+			continue;
+		dvb_net_remove_if(dvbnet, i);
+	}
+}
+
+int
+dvb_net_init(dvb_adapter_t *adap, dvb_net_t *dvbnet, dmx_demux_t *demux)
+{
+	int i;
+		
+	dvbnet->demux=demux;
+	dvbnet->dev_num=DVB_NET_DEVICES_MAX;
+	for (i=0; i<dvbnet->dev_num; i++) 
+		dvbnet->state[i]=0;
+	dvb_register_device(adap, &dvbnet->dvbdev, &dvbdev_net, dvbnet, DVB_DEVICE_NET);
+	return 0;
+}
+
diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.h b/drivers/media/dvb/dvb-core/dvb_net.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvb_net.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,63 @@
+/* 
+ * dvb_net.h
+ *
+ * Copyright (C) 2001 Convergence integrated media GmbH
+ *                    Ralph Metzler <ralph@convergence.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVB_NET_H_
+#define _DVB_NET_H_
+
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/inetdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+
+#include "dvbdev.h"
+
+#define DVB_NET_DEVICES_MAX 10
+#define DVB_NET_MULTICAST_MAX 10
+
+typedef struct dvb_net_priv_s {
+        struct net_device_stats stats;
+        char name[6];
+	u16 pid;
+        dmx_demux_t *demux;
+	dmx_section_feed_t *secfeed;
+	dmx_section_filter_t *secfilter;
+	int multi_num;
+	dmx_section_filter_t *multi_secfilter[DVB_NET_MULTICAST_MAX];
+	unsigned char multi_macs[DVB_NET_MULTICAST_MAX][6];
+} dvb_net_priv_t;
+
+typedef struct dvb_net_s {
+	dvb_device_t *dvbdev;
+
+	int card_num;
+	int dev_num;
+	struct net_device device[DVB_NET_DEVICES_MAX];
+	int state[DVB_NET_DEVICES_MAX];
+	dmx_demux_t *demux;
+} dvb_net_t;
+
+
+void dvb_net_release(dvb_net_t *);
+int  dvb_net_init(dvb_adapter_t *, dvb_net_t *, dmx_demux_t *);
+
+#endif
diff -Nru a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvbdev.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,434 @@
+/* 
+ * dvbdev.c
+ *
+ * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 CONFIG_DVB_DEVFS_ONLY 1*/
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+#include <linux/kmod.h>
+#include <linux/slab.h>
+
+#include "compat.h"
+#include "dvbdev.h"
+
+static int dvbdev_debug = 0;
+#define dprintk if (dvbdev_debug) printk
+
+static devfs_handle_t dvb_devfs_handle;
+static LIST_HEAD(dvb_adapter_list);
+static DECLARE_MUTEX(dvbdev_register_lock);
+
+
+static char *dnames[] = { 
+        "video", "audio", "sec", "frontend", "demux", "dvr", "ca",
+	"net", "osd"
+};
+
+
+#ifdef CONFIG_DVB_DEVFS_ONLY
+
+	#define DVB_MAX_IDS              ~0
+	#define nums2minor(num,type,id)  0
+	#define DVB_DEVFS_FLAGS          (DEVFS_FL_DEFAULT|DEVFS_FL_AUTO_DEVNUM)
+
+#else
+
+	#define DVB_MAX_IDS              4
+	#define nums2minor(num,type,id)  ((num << 6) | (id << 4) | type)
+	#define DVB_DEVFS_FLAGS          (DEVFS_FL_DEFAULT)
+
+
+static
+dvb_device_t* dvbdev_find_device (int minor)
+{
+	struct list_head *entry;
+
+	list_for_each (entry, &dvb_adapter_list) {
+		struct list_head *entry0;
+		dvb_adapter_t *adap;
+		adap = list_entry (entry, dvb_adapter_t, list_head);
+		list_for_each (entry0, &adap->device_list) {
+			dvb_device_t *dev;
+			dev = list_entry (entry0, dvb_device_t, list_head);
+			if (nums2minor(adap->num, dev->type, dev->id) == minor)
+				return dev;
+		}
+	}
+
+	return NULL;
+}
+
+
+static
+int dvb_device_open(struct inode *inode, struct file *file)
+{
+	dvb_device_t *dvbdev;
+	
+	dvbdev = dvbdev_find_device (minor(inode->i_rdev));
+
+	if (dvbdev && dvbdev->fops) {
+		int err = 0;
+		struct file_operations *old_fops;
+
+		file->private_data = dvbdev;
+		old_fops = file->f_op;
+                file->f_op = fops_get(dvbdev->fops);
+                if(file->f_op->open)
+                        err = file->f_op->open(inode,file);
+                if (err) {
+                        fops_put(file->f_op);
+                        file->f_op = fops_get(old_fops);
+                }
+                fops_put(old_fops);
+                return err;
+	}
+	return -ENODEV;
+}
+
+
+static struct file_operations dvb_device_fops =
+{
+	owner:		THIS_MODULE,
+        read:		NULL,
+	write:		NULL,
+	ioctl:		NULL,
+	open:		dvb_device_open,
+	release:	NULL,
+	poll:		NULL,
+};
+#endif /* CONFIG_DVB_DEVFS_ONLY */
+
+
+
+int dvb_generic_open(struct inode *inode, struct file *file)
+{
+        dvb_device_t *dvbdev = file->private_data;
+
+        if (!dvbdev)
+                return -ENODEV;
+
+	if (!dvbdev->users)
+                return -EBUSY;
+
+	if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
+                if (!dvbdev->writers)
+		        return -EBUSY;
+		dvbdev->writers--;
+	}
+
+	dvbdev->users--;
+	return 0;
+}
+
+
+int dvb_generic_release(struct inode *inode, struct file *file)
+{
+        dvb_device_t *dvbdev = file->private_data;
+
+	if (!dvbdev)
+                return -ENODEV;
+
+	if ((file->f_flags & O_ACCMODE) != O_RDONLY)
+		dvbdev->writers++;
+
+	dvbdev->users++;
+	return 0;
+}
+
+
+/*
+ * helper function -- handles userspace copying for ioctl arguments
+ */
+int
+generic_usercopy(struct inode *inode, struct file *file,
+		 unsigned int cmd, unsigned long arg,
+		 int (*func)(struct inode *inode, struct file *file,
+			     unsigned int cmd, void *arg))
+{
+	char	sbuf[128];
+	void    *mbuf = NULL;
+	void	*parg = NULL;
+	int	err  = -EINVAL;
+
+	/*  Copy arguments into temp kernel buffer  */
+	switch (_IOC_DIR(cmd)) {
+	case _IOC_NONE:
+		parg = (void *)arg;
+		break;
+	case _IOC_READ: /* some v4l ioctls are marked wrong ... */
+	case _IOC_WRITE:
+	case (_IOC_WRITE | _IOC_READ):
+		if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
+			parg = sbuf;
+		} else {
+			/* too big to allocate from stack */
+			mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);
+			if (NULL == mbuf)
+				return -ENOMEM;
+			parg = mbuf;
+		}
+		
+		err = -EFAULT;
+		if (copy_from_user(parg, (void *)arg, _IOC_SIZE(cmd)))
+			goto out;
+		break;
+	}
+
+	/* call driver */
+	if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)
+		err = -EINVAL;
+
+	if (err < 0)
+		goto out;
+
+	/*  Copy results into user buffer  */
+	switch (_IOC_DIR(cmd))
+	{
+	case _IOC_READ:
+	case (_IOC_WRITE | _IOC_READ):
+		if (copy_to_user((void *)arg, parg, _IOC_SIZE(cmd)))
+			err = -EFAULT;
+		break;
+	}
+
+out:
+	if (mbuf)
+		kfree(mbuf);
+
+	return err;
+}
+
+
+int dvb_generic_ioctl(struct inode *inode, struct file *file,
+		      unsigned int cmd, unsigned long arg)
+{
+        dvb_device_t *dvbdev = file->private_data;
+	
+        if (!dvbdev)
+	        return -ENODEV;
+
+	if (!dvbdev->kernel_ioctl)
+		return -EINVAL;
+
+	return generic_usercopy (inode, file, cmd, arg, dvbdev->kernel_ioctl);
+}
+
+
+static
+int dvbdev_get_free_id (struct dvb_adapter_s *adap, int type)
+{
+	u32 id = 0;
+
+	while (id < DVB_MAX_IDS) {
+		struct list_head *entry;
+		list_for_each (entry, &adap->device_list) {
+			dvb_device_t *dev;
+			dev = list_entry (entry, dvb_device_t, list_head);
+			if (dev->type == type && dev->id == id)
+				goto skip;
+		}
+		return id;
+skip:
+		id++;
+	}
+	return -ENFILE;
+}
+
+
+int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, 
+			dvb_device_t *template, void *priv, int type)
+{
+	u32 id;
+	char name [20];
+	dvb_device_t *dvbdev;
+
+	if (down_interruptible (&dvbdev_register_lock))
+		return -ERESTARTSYS;
+
+	if ((id = dvbdev_get_free_id (adap, type)) < 0) {
+		up (&dvbdev_register_lock);
+		*pdvbdev = 0;
+		printk ("%s: could get find free device id...\n", __FUNCTION__);
+		return -ENFILE;
+	}
+
+	*pdvbdev = dvbdev = kmalloc(sizeof(dvb_device_t), GFP_KERNEL);
+
+	if (!dvbdev) {
+		up(&dvbdev_register_lock);
+		return -ENOMEM;
+	}
+
+	up (&dvbdev_register_lock);
+	
+	memcpy(dvbdev, template, sizeof(dvb_device_t));
+	dvbdev->type = type;
+	dvbdev->id = id;
+	dvbdev->adapter = adap;
+	dvbdev->priv = priv;
+
+	list_add_tail (&dvbdev->list_head, &adap->device_list);
+
+	sprintf(name, "%s%d", dnames[type], id);
+	dvbdev->devfs_handle = devfs_register(adap->devfs_handle, name,
+					      DVB_DEVFS_FLAGS,
+					      DVB_MAJOR,
+					      nums2minor(adap->num, type, id),
+					      S_IFCHR | S_IRUSR | S_IWUSR,
+					      dvbdev->fops, dvbdev);
+
+	dprintk("%s: register adapter%d/%s @ minor: %i (0x%02x) - dvbdev: %p\n",
+		__FUNCTION__, adap->num, name, nums2minor(adap->num, type, id),
+		nums2minor(adap->num, type, id), dvbdev);
+
+	return 0;
+}
+
+
+void dvb_unregister_device(dvb_device_t *dvbdev)
+{
+	if (!dvbdev)
+		return;
+
+	devfs_unregister(dvbdev->devfs_handle);
+	list_del (&dvbdev->list_head);
+	kfree (dvbdev);
+}
+
+
+static
+int dvbdev_get_free_adapter_num (void)
+{
+	int num = 0;
+
+	while (1) {
+		struct list_head *entry;
+		list_for_each (entry, &dvb_adapter_list) {
+			dvb_adapter_t *adap;
+			adap = list_entry (entry, dvb_adapter_t, list_head);
+			if (adap->num == num)
+				goto skip;
+		}
+		return num;
+skip:
+		num++;
+	}
+
+	return -ENFILE;
+}
+
+
+int dvb_register_adapter(dvb_adapter_t **padap, char *name)
+{
+	char dirname[10];
+	dvb_adapter_t *adap;
+	int num;
+
+	if (down_interruptible (&dvbdev_register_lock))
+		return -ERESTARTSYS;
+
+	if ((num = dvbdev_get_free_adapter_num ()) < 0) {
+		up (&dvbdev_register_lock);
+		return -ENFILE;
+	}
+
+	if (!(*padap = adap = kmalloc(sizeof(dvb_adapter_t), GFP_KERNEL))) {
+		up(&dvbdev_register_lock);
+		return -ENOMEM;
+	}
+
+	memset (adap, 0, sizeof(dvb_adapter_t));
+	INIT_LIST_HEAD (&adap->device_list);
+
+	MOD_INC_USE_COUNT;
+
+	printk ("%s: registering new adapter (%s).\n", __FUNCTION__, name);
+	
+	sprintf(dirname, "adapter%d", num);
+	adap->devfs_handle = devfs_mk_dir(dvb_devfs_handle, dirname, NULL);
+	adap->num = num;
+
+	list_add_tail (&adap->list_head, &dvb_adapter_list);
+
+	up (&dvbdev_register_lock);
+
+	return num;
+}
+
+
+int dvb_unregister_adapter(dvb_adapter_t *adap)
+{
+        devfs_unregister (adap->devfs_handle);
+	if (down_interruptible (&dvbdev_register_lock))
+		return -ERESTARTSYS;
+	list_del (&adap->list_head);
+	up (&dvbdev_register_lock);
+	kfree (adap);
+	MOD_DEC_USE_COUNT;
+	return 0;
+}
+
+
+static
+int __init init_dvbdev(void)
+{
+	dvb_devfs_handle = devfs_mk_dir (NULL, "dvb", NULL);
+#ifndef CONFIG_DVB_DEVFS_ONLY
+	if(register_chrdev(DVB_MAJOR,"DVB", &dvb_device_fops)) {
+		printk("video_dev: unable to get major %d\n", DVB_MAJOR);
+		return -EIO;
+	}
+#endif
+	return 0;
+}
+
+
+static 
+void __exit exit_dvbdev(void)
+{
+#ifndef CONFIG_DVB_DEVFS_ONLY
+	unregister_chrdev(DVB_MAJOR, "DVB");
+#endif
+        devfs_unregister(dvb_devfs_handle);
+}
+
+module_init(init_dvbdev);
+module_exit(exit_dvbdev);
+
+MODULE_DESCRIPTION("DVB Core Driver");
+MODULE_AUTHOR("Marcus Metzler, Ralph Metzler, Holger Waechtler");
+MODULE_LICENSE("GPL");
+
+MODULE_PARM(dvbdev_debug,"i");
+MODULE_PARM_DESC(dvbdev_debug, "enable verbose debug messages");
+
diff -Nru a/drivers/media/dvb/dvb-core/dvbdev.h b/drivers/media/dvb/dvb-core/dvbdev.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/dvb-core/dvbdev.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,91 @@
+/* 
+ * dvbdev.h
+ *
+ * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Lesser Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVBDEV_H_
+#define _DVBDEV_H_
+
+#include <linux/types.h>
+#include <linux/version.h>
+#include <linux/poll.h>
+#include <linux/devfs_fs_kernel.h>
+#include <linux/list.h>
+
+#define DVB_MAJOR 250
+
+#define DVB_DEVICE_VIDEO      0
+#define DVB_DEVICE_AUDIO      1
+#define DVB_DEVICE_SEC        2
+#define DVB_DEVICE_FRONTEND   3
+#define DVB_DEVICE_DEMUX      4
+#define DVB_DEVICE_DVR        5
+#define DVB_DEVICE_CA         6
+#define DVB_DEVICE_NET        7
+#define DVB_DEVICE_OSD        8
+
+
+typedef struct dvb_adapter_s
+{
+	int num;
+	devfs_handle_t devfs_handle;
+	struct list_head list_head;
+	struct list_head device_list;
+} dvb_adapter_t;
+
+
+typedef struct dvb_device
+{
+	struct list_head list_head;
+	struct file_operations *fops;
+	devfs_handle_t devfs_handle;
+	dvb_adapter_t *adapter;
+	int type;
+	u32 id;
+
+	int users;
+	int writers;
+
+	/* don't really need those !? */
+	int (*kernel_ioctl)(struct inode *inode, struct file *file,
+			    unsigned int cmd, void *arg);  // FIXME: use generic_usercopy()
+
+	void *priv;
+} dvb_device_t;
+
+
+int dvb_register_device(dvb_adapter_t *adap, dvb_device_t **pdvbdev, 
+			dvb_device_t *template, void *priv, int type);
+void dvb_unregister_device(struct dvb_device *dvbdev);
+
+int dvb_register_adapter(dvb_adapter_t **padap, char *name);
+int dvb_unregister_adapter(dvb_adapter_t *adap);
+
+int dvb_generic_ioctl(struct inode *inode, struct file *file,
+		      unsigned int cmd, unsigned long arg);
+int dvb_generic_open(struct inode *inode, struct file *file);
+int dvb_generic_release(struct inode *inode, struct file *file);
+int generic_usercopy(struct inode *inode, struct file *file,
+		     unsigned int cmd, unsigned long arg,
+		     int (*func)(struct inode *inode, struct file *file,
+				 unsigned int cmd, void *arg));
+
+#endif /* #ifndef __DVBDEV_H */
diff -Nru a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,57 @@
+comment "Supported Frontend Modules"
+	depends on DVB
+
+config DVB_ALPS_BSRU6
+	tristate "Alps BSRU6 (QPSK)"
+	depends on DVB_CORE
+	help
+	  A DVB-S tuner module. 
+
+	  Say Y when you want to support this frontend.
+
+	  If you don't know what tuner module is soldered on your 
+	  DVB adapter simply enable all supported frontends, the 
+	  right one will get autodetected.
+
+config DVB_ALPS_BSRV2
+	tristate "Alps BSRV2 (QPSK)"
+	depends on DVB_CORE
+	help
+	  A DVB-S tuner module. Say Y when you want to support this frontend.
+
+	  If you don't know what tuner module is soldered on your 
+	  DVB adapter simply enable all supported frontends, the 
+	  right one will get autodetected.
+
+config DVB_GRUNDIG_29504_491
+	tristate "Grundig 29504-491 (QPSK)"
+	depends on DVB_CORE
+	help
+	  A DVB-S tuner module. Say Y when you want to support this frontend.
+
+	  If you don't know what tuner module is soldered on your 
+	  DVB adapter simply enable all supported frontends, the 
+	  right one will get autodetected.
+
+config DVB_GRUNDIG_29504_401
+	tristate "Grundig 29504-401 (OFDM)"
+	depends on DVB_CORE
+	help
+	  A DVB-T tuner module. Say Y when you want to support this frontend.
+
+	  If you don't know what tuner module is soldered on your 
+	  DVB adapter simply enable all supported frontends, the 
+	  right one will get autodetected.
+
+config DVB_VES1820
+	tristate "Frontends with external VES1820 demodulator (QAM)"
+	depends on DVB_CORE
+	help
+	  The VES1820 Demodulator is used on many DVB-C PCI cards and in some
+	  DVB-C SetTopBoxes. Say Y when you see this demodulator chip near your
+	  tuner module.
+
+	  If you don't know what tuner module is soldered on your 
+	  DVB adapter simply enable all supported frontends, the 
+	  right one will get autodetected.
+
diff -Nru a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/Makefile	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,14 @@
+#
+# Makefile for the kernel DVB frontend device drivers.
+#
+
+EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
+
+obj-$(CONFIG_DVB_ALPS_BSRU6) += alps_bsru6.o
+obj-$(CONFIG_DVB_ALPS_BSRV2) += alps_bsrv2.o
+obj-$(CONFIG_DVB_GRUNDIG_29504_491) += grundig_29504-491.o
+obj-$(CONFIG_DVB_GRUNDIG_29504_401) += grundig_29504-401.o
+obj-$(CONFIG_DVB_VES1820) += ves1820.o
+
+include $(TOPDIR)/Rules.make 
+ 
diff -Nru a/drivers/media/dvb/frontends/alps_bsru6.c b/drivers/media/dvb/frontends/alps_bsru6.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/alps_bsru6.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,700 @@
+/* 
+    Alps BSRU6 DVB QPSK frontend driver
+
+    Copyright (C) 2001-2002 Convergence Integrated Media GmbH
+	<ralph@convergence.de>, <holger@convergence.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/    
+
+#include <linux/init.h>
+#include <linux/module.h>
+
+#include "compat.h"
+#include "dvb_frontend.h"
+
+
+static int debug = 0;
+#define dprintk	if (debug) printk
+
+
+#define M_CLK (88000000UL)
+
+/* M=21, K=0, P=0, f_VCO = 4MHz*4*(M+1)/(K+1) = 352 MHz */
+
+static
+struct dvb_frontend_info bsru6_info = {
+	name: "Alps BSRU6",
+	type: FE_QPSK,
+	frequency_min: 950000,
+	frequency_max: 2150000,
+	frequency_stepsize: 125,   /* kHz for QPSK frontends */
+	frequency_tolerance: M_CLK/2000,
+	symbol_rate_min: 1000000,
+	symbol_rate_max: 45000000,
+	symbol_rate_tolerance: 500,  /* ppm */
+	notifier_delay: 0,
+	caps: FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+	      FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
+	      FE_CAN_QPSK
+};
+
+
+static
+u8 init_tab [] = {
+	0x01, 0x15,   // M: 0x15 DIRCLK: 0 K:0
+	0x02, 0x30,   // P: 0  SERCLK: 0 VCO:ON  STDBY:0
+ 
+	0x03, 0x00,
+	0x04, 0x7d,   // F22FR, F22=22kHz
+	0x05, 0x35,   // SDAT:0 SCLT:0 I2CT:1
+	0x06, 0x00,   // DAC mode and MSB 
+	0x07, 0x00,   // DAC LSB
+	0x08, 0x43,   // DiSEqC
+	0x09, 0x00,
+	0x0a, 0x42, 
+	0x0c, 0x51,   // QPSK reverse:1  Nyquist:0 OP0 val:1 OP0 con:1 OP1 val:1 OP1 con:1 
+	0x0d, 0x82,
+	0x0e, 0x23,
+	0x0f, 0x52,
+
+	0x10, 0x3d,   // AGC2
+	0x11, 0x84,   
+	0x12, 0xb5,   // Lock detect: -64  Carrier freq detect:on
+	0x13, 0xb6,   // alpha_car b:4 a:0  noise est:256ks  derot:on 
+	0x14, 0x93,   // beat carc:0 d:0 e:0xf  phase detect algo: 1
+	0x15, 0xc9,   // lock detector threshold
+	
+	0x16, 0x1d,
+	0x17, 0x0,
+	0x18, 0x14,
+	0x19, 0xf2,
+
+	0x1a, 0x11,
+
+	0x1b, 0x9c,
+	0x1c, 0x0,
+	0x1d, 0x0,
+	0x1e, 0xb,
+
+	0x22, 0x00,
+	0x23, 0x00,
+	0x24, 0xff,
+	0x25, 0xff,
+	0x26, 0xff,
+
+	0x28, 0x00,  // out imp: normal  out type: parallel FEC mode:0 
+	0x29, 0x1e,  // 1/2 threshold
+	0x2a, 0x14,  // 2/3 threshold
+	0x2b, 0x0f,  // 3/4 threshold
+	0x2c, 0x09,  // 5/6 threshold
+	0x2d, 0x05,  // 7/8 threshold
+	0x2e, 0x01,
+
+	0x31, 0x1f,  // test all FECs 
+
+	0x32, 0x19,  // viterbi and synchro search
+	0x33, 0xfc,  // rs control
+	0x34, 0x93,  // error control
+
+	
+	0x0b, 0x00, 
+	0x27, 0x00, 0x2f, 0x00, 0x30, 0x00,
+	0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 
+	0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 
+	0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00,
+	0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00,
+	0x44, 0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 
+	0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 
+	0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00
+};
+
+
+static
+int stv0299_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
+{
+	int ret;
+	u8 buf [] = { reg, data };
+	struct i2c_msg msg = { addr: 0x68, flags: 0, buf: buf, len: 2 };
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	ret = i2c->xfer (i2c, &msg, 1);
+
+	if (ret != 1) 
+		dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
+			__FUNCTION__, reg, data, ret);
+
+	return (ret != 1) ? -1 : 0;
+}
+
+
+static
+u8 stv0299_readreg (struct dvb_i2c_bus *i2c, u8 reg)
+{
+	int ret;
+	u8 b0 [] = { reg };
+	u8 b1 [] = { 0 };
+	struct i2c_msg msg [] = { { addr: 0x68, flags: 0, buf: b0, len: 1 },
+			   { addr: 0x68, flags: I2C_M_RD, buf: b1, len: 1 } };
+        
+	dprintk ("%s\n", __FUNCTION__);
+
+	ret = i2c->xfer (i2c, msg, 2);
+        
+	if (ret != 2) 
+		dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
+
+	return b1[0];
+}
+
+
+static
+int stv0299_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
+{
+        int ret;
+        struct i2c_msg msg [] = { { addr: 0x68, flags: 0, buf: &reg1, len: 1 },
+                           { addr: 0x68, flags: I2C_M_RD, buf: b, len: len } };
+
+	dprintk ("%s\n", __FUNCTION__);
+
+        ret = i2c->xfer (i2c, msg, 2);
+
+        if (ret != 2)
+                dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
+
+        return ret == 2 ? 0 : -1;
+}
+
+
+
+static
+int tsa5059_write (struct dvb_i2c_bus *i2c, u8 data [4])
+{
+	int ret;
+	u8 rpt1 [] = { 0x05, 0xb5 };  /*  enable i2c repeater on stv0299  */
+	struct i2c_msg msg [] = {{ addr: 0x68, flags: 0, buf: rpt1, len: 2 },
+				 { addr: 0x61, flags: 0, buf: data, len: 4 }};
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	ret = i2c->xfer (i2c, msg, 2);
+
+	if (ret != 2)
+		dprintk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
+
+	return (ret != 2) ? -1 : 0;
+}
+
+
+/**
+ *   set up the downconverter frequency divisor for a 
+ *   reference clock comparision frequency of 125 kHz.
+ */
+static
+int tsa5059_set_tv_freq	(struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
+{
+	u32 div = freq / 125;
+	u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x84, (pwr << 5) | 0x20 };
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	return tsa5059_write (i2c, buf);
+}
+
+
+static
+int stv0299_init (struct dvb_i2c_bus *i2c)
+{
+	int i;
+
+	dprintk("stv0299: init chip\n");
+
+	for (i=0; i<sizeof(init_tab); i+=2)
+		stv0299_writereg (i2c, init_tab[i], init_tab[i+1]);
+
+	return 0;
+}
+
+
+static
+int stv0299_set_inversion (struct dvb_i2c_bus *i2c, int inversion)
+{
+	u8 val;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	switch (inversion) {
+	case INVERSION_AUTO:
+		return -EOPNOTSUPP;
+	case INVERSION_OFF:
+		val = stv0299_readreg (i2c, 0x0c);
+		return stv0299_writereg (i2c, 0x0c, val | 0x01);
+	case INVERSION_ON:
+		val = stv0299_readreg (i2c, 0x0c);
+		return stv0299_writereg (i2c, 0x0c, val & 0xfe);
+	default:
+		return -EINVAL;
+	}
+}
+
+
+static
+int stv0299_set_FEC (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	switch (fec) {
+	case FEC_AUTO:
+		return stv0299_writereg (i2c, 0x31, 0x1f);
+	case FEC_1_2:
+		return stv0299_writereg (i2c, 0x31, 0x01);
+	case FEC_2_3:
+		return stv0299_writereg (i2c, 0x31, 0x02);
+	case FEC_3_4:
+		return stv0299_writereg (i2c, 0x31, 0x04);
+	case FEC_5_6:
+		return stv0299_writereg (i2c, 0x31, 0x08);
+	case FEC_7_8:
+		return stv0299_writereg (i2c, 0x31, 0x10);
+	default:
+		return -EINVAL;
+	}
+}
+
+
+static
+fe_code_rate_t stv0299_get_FEC (struct dvb_i2c_bus *i2c)
+{
+	static fe_code_rate_t fec_tab [] = { FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_1_2 };
+	u8 index;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	index = stv0299_readreg (i2c, 0x1b);
+	index &= 0x7;
+
+	if (index > 4)
+		return FEC_AUTO;
+
+	return fec_tab [index];
+}
+
+
+static
+int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
+{
+	unsigned long start = jiffies;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	while (stv0299_readreg(i2c, 0x0a) & 1) {
+		if (jiffies - start > timeout) {
+			dprintk ("%s: timeout!!\n", __FUNCTION__);
+			return -ETIMEDOUT;
+		}
+		current->state = TASK_INTERRUPTIBLE;
+		schedule_timeout (1);
+	};
+
+	return 0;
+}
+
+
+static
+int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout)
+{
+	unsigned long start = jiffies;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	while ((stv0299_readreg(i2c, 0x0a) & 3) != 2 ) {
+		if (jiffies - start > timeout) {
+			dprintk ("%s: timeout!!\n", __FUNCTION__);
+			return -ETIMEDOUT;
+		}
+		current->state = TASK_INTERRUPTIBLE;
+		schedule_timeout (1);
+	};
+
+	return 0;
+}
+
+
+static
+int stv0299_send_diseqc_msg (struct dvb_i2c_bus *i2c,
+			     struct dvb_diseqc_master_cmd *m)
+{
+	u8 val;
+	int i;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	val = stv0299_readreg (i2c, 0x08);
+
+	if (stv0299_writereg (i2c, 0x08, (val & ~0x7) | 0x6))  /* DiSEqC mode */
+		return -EREMOTEIO;
+
+	for (i=0; i<m->msg_len; i++) {
+		if (stv0299_wait_diseqc_fifo (i2c, 100) < 0)
+			return -ETIMEDOUT;
+
+		if (stv0299_writereg (i2c, 0x09, m->msg[i]))
+			return -EREMOTEIO;
+	}
+
+	/* Shouldn't we wait for idle state (FE=1, FF=0) here to 
+	   make certain all bytes have been sent ? 
+	   Hmm, actually we should do that before all mode changes too ...
+	   if (stv0299_wait_diseqc_idle (i2c, 100) < 0) */ 
+
+	if (stv0299_wait_diseqc_fifo (i2c, 100) < 0)
+		return -ETIMEDOUT;
+
+	return 0;
+}
+
+
+static
+int stv0299_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
+{
+	u8 val;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	val = stv0299_readreg (i2c, 0x08);
+
+	if (stv0299_wait_diseqc_fifo (i2c, 100) < 0)
+		return -ETIMEDOUT;
+
+	if (stv0299_writereg (i2c, 0x08, (val & ~0x7) | 0x2))   /* burst mode */
+		return -EREMOTEIO;
+
+	if (stv0299_writereg (i2c, 0x09, burst == SEC_MINI_A ? 0x00 : 0xff))
+		return -EREMOTEIO;
+
+	if (stv0299_wait_diseqc_fifo (i2c, 100) < 0)
+		return -ETIMEDOUT;
+
+	if (stv0299_writereg (i2c, 0x08, val))
+		return -EREMOTEIO;
+
+	return 0;
+}
+
+
+static
+int stv0299_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
+{
+	u8 val;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	val = stv0299_readreg (i2c, 0x08);
+
+	switch (tone) {
+	case SEC_TONE_ON:
+		return stv0299_writereg (i2c, 0x08, val | 0x3);
+	case SEC_TONE_OFF:
+		return stv0299_writereg (i2c, 0x08, (val & ~0x3) | 0x02);
+	default:
+		return -EINVAL;
+	};
+}
+
+
+static
+int stv0299_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
+{
+	u8 val;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	val = stv0299_readreg (i2c, 0x0c);
+	val &= 0x0f;
+	val |= 0x40;
+	
+	switch (voltage) {
+	case SEC_VOLTAGE_13:
+		return stv0299_writereg (i2c, 0x0c, val);
+	case SEC_VOLTAGE_18:
+		return stv0299_writereg (i2c, 0x0c, val | 0x10);
+	default:
+		return -EINVAL;
+	};
+}
+
+	
+static
+int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
+{
+	u32 ratio;
+	u32 tmp;
+	u8 aclk = 0xb4, bclk = 0x51;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	if (srate > M_CLK)
+		srate = M_CLK;
+        if (srate < 500000)
+		srate = 500000;
+
+	if (srate < 30000000) { aclk = 0xb6; bclk = 0x53; }
+	if (srate < 14000000) { aclk = 0xb7; bclk = 0x53; }
+	if (srate < 7000000) { aclk = 0xb7; bclk = 0x4f; }
+	if (srate < 3000000) { aclk = 0xb7; bclk = 0x4b; }
+	if (srate < 1500000) { aclk = 0xb7; bclk = 0x47; }
+
+#define FIN (M_CLK >> 4)
+
+	tmp = srate << 4;
+	ratio = tmp / FIN;
+        
+	tmp = (tmp % FIN) << 8;
+	ratio = (ratio << 8) + tmp / FIN;
+        
+	tmp = (tmp % FIN) << 8;
+	ratio = (ratio << 8) + tmp / FIN;
+  
+	stv0299_writereg (i2c, 0x13, aclk);
+	stv0299_writereg (i2c, 0x14, bclk);
+	stv0299_writereg (i2c, 0x1f, (ratio >> 16) & 0xff);
+	stv0299_writereg (i2c, 0x20, (ratio >>  8) & 0xff);
+	stv0299_writereg (i2c, 0x21, (ratio      ) & 0xf0);
+
+	return 0;
+}
+
+
+
+static
+int stv0299_get_symbolrate (struct dvb_i2c_bus *i2c)
+{
+	u32 Mclk = M_CLK / 4096L;
+	u32 srate;
+	s32 offset;
+	u8 sfr[3];
+	s8 rtf;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	stv0299_readregs (i2c, 0x1f, sfr, 3);
+	stv0299_readregs (i2c, 0x1a, &rtf, 1);
+
+	srate = (sfr[0] << 8) | sfr[1];
+	srate *= Mclk;
+	srate /= 16;
+	srate += (sfr[2] >> 4) * Mclk / 256;
+
+	offset = (s32) rtf * (srate / 4096L);
+	offset /= 128;
+
+	srate += offset;
+
+	srate += 1000;
+	srate /= 2000;
+	srate *= 2000;
+
+	return srate;
+}
+
+
+static
+int bsru6_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
+{
+	struct dvb_i2c_bus *i2c = fe->i2c;
+
+	dprintk ("%s\n", __FUNCTION__);
+
+	switch (cmd) {
+	case FE_GET_INFO:
+		memcpy (arg, &bsru6_info, sizeof(struct dvb_frontend_info));
+		break;
+
+	case FE_READ_STATUS:
+	{
+		fe_status_t *status = (fe_status_t *) arg;
+		u8 signal = 0xff - stv0299_readreg (i2c, 0x18);
+		u8 sync = stv0299_readreg (i2c, 0x1b);
+
+		*status = 0;
+
+		if (signal > 10)
+			*status |= FE_HAS_SIGNAL;
+
+		if (sync & 0x80)
+			*status |= FE_HAS_CARRIER;
+
+		if (sync & 0x10)
+			*status |= FE_HAS_VITERBI;
+
+		if (sync & 0x08)
+			*status |= FE_HAS_SYNC;
+
+		if ((sync & 0x98) == 0x98)
+			*status |= FE_HAS_LOCK;
+
+		break;
+	}
+
+        case FE_READ_BER:
+		*((u32*) arg) = (stv0299_readreg (i2c, 0x1d) << 8)
+			       | stv0299_readreg (i2c, 0x1e);
+		break;
+
+	case FE_READ_SIGNAL_STRENGTH:
+	{
+		s32 signal =  0xffff - ((stv0299_readreg (i2c, 0x18) << 8)
+			               | stv0299_readreg (i2c, 0x19));
+		signal = signal * 5 / 4;
+		*((u16*) arg) = (signal > 0xffff) ? 0xffff :
+				(signal < 0) ? 0 : signal;
+		break;
+	}
+        case FE_READ_SNR:
+	{
+		s32 snr = 0xffff - ((stv0299_readreg (i2c, 0x24) << 8)
+			           | stv0299_readreg (i2c, 0x25));
+		snr = 3 * (snr - 0xa100);
+		*((u16*) arg) = (snr > 0xffff) ? 0xffff :
+				(snr < 0) ? 0 : snr;
+		break;
+	}
+	case FE_READ_UNCORRECTED_BLOCKS: 
+		*((u32*) arg) = 0;    /* the stv0299 can't measure BER and */
+		return -EOPNOTSUPP;   /* errors at the same time.... */
+
+        case FE_SET_FRONTEND:
+        {
+		struct dvb_frontend_parameters *p = arg;
+
+		tsa5059_set_tv_freq (i2c, p->frequency, 3);
+		stv0299_set_inversion (i2c, p->inversion);
+                stv0299_set_FEC (i2c, p->u.qpsk.fec_inner);
+                stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate);
+		tsa5059_set_tv_freq (i2c, p->frequency, 0);
+		stv0299_writereg (i2c, 0x22, 0x00);
+		stv0299_writereg (i2c, 0x23, 0x00);
+		stv0299_readreg (i2c, 0x23);
+		stv0299_writereg (i2c, 0x12, 0xb9);
+                break;
+        }
+
+        case FE_GET_FRONTEND:
+        {
+		struct dvb_frontend_parameters *p = arg;
+		s32 derot_freq;
+
+		derot_freq = (s32)(s16) ((stv0299_readreg (i2c, 0x22) << 8)
+					| stv0299_readreg (i2c, 0x23));
+
+		derot_freq *= (M_CLK >> 16);
+		derot_freq += 500;
+		derot_freq /= 1000;
+
+		p->frequency += derot_freq;
+		p->inversion = (stv0299_readreg (i2c, 0x0c) & 1) ?
+						INVERSION_OFF : INVERSION_ON;
+		p->u.qpsk.fec_inner = stv0299_get_FEC (i2c);
+		p->u.qpsk.symbol_rate = stv0299_get_symbolrate (i2c);
+                break;
+        }
+
+        case FE_SLEEP:
+		stv0299_writereg (i2c, 0x0c, 0x00);  /*  LNB power off! */
+		stv0299_writereg (i2c, 0x02, 0x80);
+		break;
+
+        case FE_INIT:
+		return stv0299_init (i2c);
+
+        case FE_RESET:
+		stv0299_writereg (i2c, 0x22, 0x00);
+		stv0299_writereg (i2c, 0x23, 0x00);
+		stv0299_readreg (i2c, 0x23);
+		stv0299_writereg (i2c, 0x12, 0xb9);
+                break;
+
+	case FE_DISEQC_SEND_MASTER_CMD:
+		return stv0299_send_diseqc_msg (i2c, arg);
+
+	case FE_DISEQC_SEND_BURST:
+		return stv0299_send_diseqc_burst (i2c, (fe_sec_mini_cmd_t) arg);
+
+	case FE_SET_TONE:
+		return stv0299_set_tone (i2c, (fe_sec_tone_mode_t) arg);
+
+	case FE_SET_VOLTAGE:
+		return stv0299_set_voltage (i2c, (fe_sec_voltage_t) arg);
+
+	default:
+		return -EOPNOTSUPP;
+	};
+
+	return 0;
+}
+
+
+
+static
+int bsru6_attach (struct dvb_i2c_bus *i2c)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	if ((stv0299_readreg (i2c, 0x00)) != 0xa1)
+                return -ENODEV;
+
+	dvb_register_frontend (bsru6_ioctl, i2c, NULL, &bsru6_info);
+
+	return 0;
+}
+
+
+static
+void bsru6_detach (struct dvb_i2c_bus *i2c)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	dvb_unregister_frontend (bsru6_ioctl, i2c);
+}
+
+
+static
+int __init init_bsru6 (void)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	return dvb_register_i2c_device (THIS_MODULE, bsru6_attach, bsru6_detach);
+}
+
+
+static 
+void __exit exit_bsru6 (void)
+{
+	dprintk ("%s\n", __FUNCTION__);
+
+	dvb_unregister_i2c_device (bsru6_attach);
+}
+
+module_init (init_bsru6);
+module_exit (exit_bsru6);
+
+MODULE_PARM(debug,"i");
+MODULE_PARM_DESC(debug, "enable verbose debug messages");
+MODULE_DESCRIPTION("BSRU6 DVB Frontend driver");
+MODULE_AUTHOR("Ralph Metzler, Holger Waechtler");
+MODULE_LICENSE("GPL");
+
diff -Nru a/drivers/media/dvb/frontends/alps_bsrv2.c b/drivers/media/dvb/frontends/alps_bsrv2.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/alps_bsrv2.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,470 @@
+/* 
+    Driver for Alps BSRV2 QPSK Frontend
+
+    Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/    
+
+#include <linux/module.h>
+#include <linux/init.h>
+
+#include "compat.h"
+#include "dvb_frontend.h"
+
+static int debug = 0;
+#define dprintk	if (debug) printk
+
+
+static
+struct dvb_frontend_info bsrv2_info = {
+	name: "Alps BSRV2",
+	type: FE_QPSK,
+	frequency_min: 950000,
+	frequency_max: 2150000,
+	frequency_stepsize: 250,           /* kHz for QPSK frontends */
+	frequency_tolerance: 29500,
+	symbol_rate_min: 1000000,
+	symbol_rate_max: 45000000,
+/*      symbol_rate_tolerance: ???,*/
+	notifier_delay: 50,                /* 1/20 s */
+	caps:   FE_CAN_INVERSION_AUTO |
+		FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+		FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
+		FE_CAN_QPSK
+};
+
+
+
+static
+u8 init_1893_tab [] = {
+        0x01, 0xA4, 0x35, 0x81, 0x2A, 0x0d, 0x55, 0xC4,
+        0x09, 0x69, 0x00, 0x86, 0x4c, 0x28, 0x7F, 0x00,
+        0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,	
+        0x80, 0x00, 0x31, 0xb0, 0x14, 0x00, 0xDC, 0x20,
+        0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x55, 0x00, 0x00, 0x7f, 0x00
+};
+
+
+static
+u8 init_1893_wtab[] =
+{
+        1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0,
+        0,1,0,0,0,0,0,0, 1,0,1,1,0,0,0,1,
+        1,1,1,0,0,0,0,0, 0,0,1,1,0,0,0,0,
+        1,1,1,0,1,1
+};
+
+
+static
+int ves1893_writereg (struct dvb_i2c_bus *i2c, int reg, int data)
+{
+        u8 buf [] = { 0x00, reg, data };
+	struct i2c_msg msg = { addr: 0x08, flags: 0, buf: buf, len: 3 };
+	int err;
+
+        if ((err = i2c->xfer (i2c, &msg, 1)) != 1) {
+		dprintk ("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n", __FUNCTION__, err, reg, data);
+		return -EREMOTEIO;
+	}
+
+        return 0;
+}
+
+
+static
+u8 ves1893_readreg (struct dvb_i2c_bus *i2c, u8 reg)
+{
+	int ret;
+	u8 b0 [] = { 0x00, reg };
+	u8 b1 [] = { 0 };
+	struct i2c_msg msg [] = { { addr: 0x08, flags: 0, buf: b0, len: 2 },
+			   { addr: 0x08, flags: I2C_M_RD, buf: b1, len: 1 } };
+
+	ret = i2c->xfer (i2c, msg, 2);
+
+	if (ret != 2)
+		dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
+
+	return b1[0];
+}
+
+
+static
+int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
+{
+        int ret;
+        struct i2c_msg msg = { addr: 0x61, flags: 0, buf: data, len: 4 };
+
+        ret = i2c->xfer (i2c, &msg, 1);
+
+        if (ret != 1)
+                printk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
+
+        return (ret != 1) ? -1 : 0;
+}
+
+
+
+/**
+ *   set up the downconverter frequency divisor for a
+ *   reference clock comparision frequency of 125 kHz.
+ */
+static
+int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
+{
+        u32 div = (freq + 479500) / 125;
+        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x95, (pwr << 5) | 0x30 };
+
+	return sp5659_write (i2c, buf);
+}
+
+
+static
+int ves1893_init (struct dvb_i2c_bus *i2c)
+{
+	int i;
+        
+	dprintk("%s: init chip\n", __FUNCTION__);
+
+	for (i=0; i<54; i++)
+		if (init_1893_wtab[i])
+			ves1893_writereg (i2c, i, init_1893_tab[i]);
+
+	return 0;
+}
+
+
+static
+int ves1893_clr_bit (struct dvb_i2c_bus *i2c)
+{
+        ves1893_writereg (i2c, 0, init_1893_tab[0] & 0xfe);
+        ves1893_writereg (i2c, 0, init_1893_tab[0]);
+        ves1893_writereg (i2c, 3, 0x00);
+        return ves1893_writereg (i2c, 3, init_1893_tab[3]);
+}
+
+
+static
+int ves1893_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
+{
+	u8 val;
+
+	switch (inversion) {
+	case INVERSION_OFF:
+		val = 0xc0;
+		break;
+	case INVERSION_ON:
+		val = 0x80;
+		break;
+	case INVERSION_AUTO:
+		val = 0x40;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return ves1893_writereg (i2c, 0x0c, (init_1893_tab[0x0c] & 0x3f) | val);
+}
+
+
+static
+int ves1893_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
+{
+	if (fec == FEC_AUTO)
+		return ves1893_writereg (i2c, 0x0d, 0x08);
+	else if (fec < FEC_1_2 || fec > FEC_8_9)
+		return -EINVAL;
+	else
+		return ves1893_writereg (i2c, 0x0d, fec - FEC_1_2);
+}
+
+
+static
+fe_code_rate_t ves1893_get_fec (struct dvb_i2c_bus *i2c)
+{
+	return FEC_1_2 + ((ves1893_readreg (i2c, 0x0d) >> 4) & 0x7);
+}
+
+
+static
+int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
+{
+	u32 BDR;
+        u32 ratio;
+	u8  ADCONF, FCONF, FNR;
+	u32 BDRI;
+	u32 tmp;
+
+	dprintk("%s: srate == %d\n", __FUNCTION__, srate);
+
+	if (srate > 90100000UL/2)
+		srate = 90100000UL/2;
+
+	if (srate < 500000)
+		srate = 500000;
+
+#define MUL (1UL<<26)
+#define FIN (90106000UL>>4)
+
+	tmp = srate << 6;
+	ratio = tmp / FIN;
+
+	tmp = (tmp % FIN) << 8;
+	ratio = (ratio << 8) + tmp / FIN;
+
+	tmp = (tmp % FIN) << 8;
+	ratio = (ratio << 8) + tmp / FIN;
+
+	FNR = 0xff;
+
+	if (ratio < MUL/3)           FNR = 0;
+	if (ratio < (MUL*11)/50)     FNR = 1;
+	if (ratio < MUL/6)           FNR = 2;
+	if (ratio < MUL/9)           FNR = 3;
+	if (ratio < MUL/12)          FNR = 4;
+	if (ratio < (MUL*11)/200)    FNR = 5;
+	if (ratio < MUL/24)          FNR = 6;
+	if (ratio < (MUL*27)/1000)   FNR = 7;
+	if (ratio < MUL/48)          FNR = 8;
+	if (ratio < (MUL*137)/10000) FNR = 9;
+
+	if (FNR == 0xff) {
+		ADCONF = 0x89;
+		FCONF  = 0x80;
+		FNR	= 0;
+	} else {
+		ADCONF = 0x81;
+		FCONF  = 0x88 | (FNR >> 1) | ((FNR & 0x01) << 5);
+	}
+
+	BDR = (( (ratio << (FNR >> 1)) >> 4) + 1) >> 1;
+	BDRI = ( ((FIN << 8) / ((srate << (FNR >> 1)) >> 2)) + 1) >> 1;
+
+        dprintk("FNR= %d\n", FNR);
+        dprintk("ratio= %08x\n", ratio);
+        dprintk("BDR= %08x\n", BDR);
+        dprintk("BDRI= %02x\n", BDRI);
+
+	if (BDRI > 0xff)
+		BDRI = 0xff;
+
+	ves1893_writereg (i2c, 0x06, 0xff & BDR);
+	ves1893_writereg (i2c, 0x07, 0xff & (BDR >> 8));
+	ves1893_writereg (i2c, 0x08, 0x0f & (BDR >> 16));
+
+	ves1893_writereg (i2c, 0x09, BDRI);
+	ves1893_writereg (i2c, 0x20, ADCONF);
+	ves1893_writereg (i2c, 0x21, FCONF);
+
+	if (srate < 6000000) 
+		ves1893_writereg (i2c, 0x05, init_1893_tab[0x05] | 0x80);
+	else
+		ves1893_writereg (i2c, 0x05, init_1893_tab[0x05] & 0x7f);
+
+	ves1893_writereg (i2c, 0x00, 0x00);
+	ves1893_writereg (i2c, 0x00, 0x01);
+
+	ves1893_clr_bit (i2c);
+
+	return 0;
+}
+
+
+static
+int ves1893_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
+{
+	switch (voltage) {
+	case SEC_VOLTAGE_13:
+		return ves1893_writereg (i2c, 0x1f, 0x20);
+	case SEC_VOLTAGE_18:
+		return ves1893_writereg (i2c, 0x1f, 0x30);
+	default:
+		return -EINVAL;
+	};
+}
+
+
+static
+int bsrv2_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
+{
+	struct dvb_i2c_bus *i2c = fe->i2c;
+                
+        switch (cmd) {
+        case FE_GET_INFO:
+		memcpy (arg, &bsrv2_info, sizeof(struct dvb_frontend_info));
+		break;
+
+        case FE_READ_STATUS:
+	{
+		fe_status_t *status = arg;
+		int sync = ves1893_readreg (i2c, 0x0e);
+
+		*status = 0;
+
+		if (sync & 1)
+			*status |= FE_HAS_SIGNAL;
+
+		if (sync & 2)
+			*status |= FE_HAS_CARRIER;
+
+		if (sync & 4)
+			*status |= FE_HAS_VITERBI;
+
+		if (sync & 8)
+			*status |= FE_HAS_SYNC;
+
+		if ((sync & 0x1f) == 0x1f)
+			*status |= FE_HAS_LOCK;
+
+		break;
+	}
+
+        case FE_READ_BER:
+	{
+		u32 *ber = (u32 *) arg;
+
+		*ber = ves1893_readreg (i2c, 0x15);
+                *ber |= (ves1893_readreg (i2c, 0x16) << 8);
+                *ber |= (ves1893_readreg (i2c, 0x17) << 16);
+		*ber *= 10;
+		break;
+	}
+
+        case FE_READ_SIGNAL_STRENGTH:
+	{
+		u8 signal = ~ves1893_readreg (i2c, 0x0b);
+		*((u16*) arg) = (signal << 8) | signal;
+		break;
+	}
+
+        case FE_READ_SNR:
+	{
+		u8 snr = ~ves1893_readreg (i2c, 0x1c);
+		*(u16*) arg = (snr << 8) | snr;
+		break;
+	}
+
+	case FE_READ_UNCORRECTED_BLOCKS: 
+	{
+		*(u32*) arg = ves1893_readreg (i2c, 0x18) & 0x7f;
+
+		if (*(u32*) arg == 0x7f)
+			*(u32*) arg = 0xffffffff;   /* counter overflow... */
+		
+		ves1893_writereg (i2c, 0x18, 0x00);  /* reset the counter */
+		ves1893_writereg (i2c, 0x18, 0x80);  /* dto. */
+		break;
+	}
+
+        case FE_SET_FRONTEND:
+        {
+		struct dvb_frontend_parameters *p = arg;
+
+		sp5659_set_tv_freq (i2c, p->frequency, 0);
+		ves1893_set_inversion (i2c, p->inversion);
+		ves1893_set_fec (i2c, p->u.qpsk.fec_inner);
+//		sp5659_set_tv_freq (i2c, p->frequency, 0);
+		ves1893_set_symbolrate (i2c, p->u.qpsk.symbol_rate);
+                break;
+        }
+
+	case FE_GET_FRONTEND:
+	{
+		struct dvb_frontend_parameters *p = arg;
+		s32 afc;
+
+		afc = ((int)((char)(ves1893_readreg (i2c, 0x0a) << 1)))/2;
+		afc = (afc * (int)(p->u.qpsk.symbol_rate/8))/16;
+
+		p->frequency += afc;
+		p->inversion = (ves1893_readreg (i2c, 0x0f) & 2) ? 
+					INVERSION_ON : INVERSION_OFF;
+		p->u.qpsk.fec_inner = ves1893_get_fec (i2c);
+	/*  XXX FIXME: timing offset !! */
+		break;
+	}
+
+        case FE_SLEEP:
+		ves1893_writereg (i2c, 0x1f, 0x00);    /*  LNB power off  */
+		return ves1893_writereg (i2c, 0x00, 0x08);
+
+        case FE_INIT:
+		return ves1893_init (i2c);
+
+	case FE_RESET:
+		return ves1893_clr_bit (i2c);
+
+	case FE_SET_TONE:
+		return -EOPNOTSUPP;  /* the ves1893 can generate the 22k */
+				     /* let's implement this when we have */
+				     /* a box that uses the 22K_0 pin... */
+	case FE_SET_VOLTAGE:
+		return ves1893_set_voltage (i2c, (fe_sec_voltage_t) arg);
+
+	default:
+		return -EOPNOTSUPP;
+        };
+        
+        return 0;
+} 
+
+
+static
+int bsrv2_attach (struct dvb_i2c_bus *i2c)
+{
+	if ((ves1893_readreg (i2c, 0x1e) & 0xf0) != 0xd0)
+		return -ENODEV;
+
+	dvb_register_frontend (bsrv2_ioctl, i2c, NULL, &bsrv2_info);
+
+	return 0;
+}
+
+
+static
+void bsrv2_detach (struct dvb_i2c_bus *i2c)
+{
+	dvb_unregister_frontend (bsrv2_ioctl, i2c);
+}
+
+
+static
+int __init init_bsrv2 (void)
+{
+	return dvb_register_i2c_device (THIS_MODULE, bsrv2_attach, bsrv2_detach);
+}
+
+
+static 
+void __exit exit_bsrv2 (void)
+{
+	dvb_unregister_i2c_device (bsrv2_attach);
+}
+
+
+module_init(init_bsrv2);
+module_exit(exit_bsrv2);
+
+
+MODULE_DESCRIPTION("BSRV2 DVB-S Frontend");
+MODULE_AUTHOR("Ralph Metzler");
+MODULE_LICENSE("GPL");
+MODULE_PARM(debug,"i");
+
diff -Nru a/drivers/media/dvb/frontends/grundig_29504-401.c b/drivers/media/dvb/frontends/grundig_29504-401.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/grundig_29504-401.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,484 @@
+/* 
+    driver for Grundig 29504-401 DVB-T Frontends based on
+    LSI L64781 COFDM demodulator as used in Technotrend DVB-T cards
+
+    Copyright (C) 2001 Holger Waechtler <holger@convergence.de>
+                       for Convergence Integrated Media GmbH
+                       Marko Kohtala <marko.kohtala@nokia.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 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.
+
+*/    
+
+#include <linux/module.h>
+#include <linux/init.h>
+
+#include "compat.h"
+#include "dvb_frontend.h"
+
+static int debug = 0;
+
+#define dprintk	if (debug) printk
+
+
+struct dvb_frontend_info grundig_29504_401_info = {
+	name: "Grundig 29504-401",
+	type: FE_OFDM,
+/*	frequency_min: ???,*/
+/*	frequency_max: ???,*/
+	frequency_stepsize: 166666,
+/*      frequency_tolerance: ???,*/
+/*      symbol_rate_tolerance: ???,*/
+	notifier_delay: 0,
+	caps: FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | 
+	      FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
+	      FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
+	      FE_CAN_MUTE_TS
+};
+
+
+static
+int l64781_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
+{
+	int ret;
+	u8 buf [] = { reg, data };
+	struct i2c_msg msg = { addr: 0x55, flags: 0, buf: buf, len: 2 };
+
+	if ((ret = i2c->xfer (i2c, &msg, 1)) != 1)
+		dprintk ("%s: write_reg error (reg == %02x) = %02x!\n",
+			 __FUNCTION__, reg, ret);
+
+	return (ret != 1) ? -1 : 0;
+}
+
+
+static
+u8 l64781_readreg (struct dvb_i2c_bus *i2c, u8 reg)
+{
+	int ret;
+	u8 b0 [] = { reg };
+	u8 b1 [] = { 0 };
+	struct i2c_msg msg [] = { { addr: 0x55, flags: 0, buf: b0, len: 1 },
+			   { addr: 0x55, flags: I2C_M_RD, buf: b1, len: 1 } };
+
+	ret = i2c->xfer (i2c, msg, 2);
+
+	if (ret != 2)
+		dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
+
+	return b1[0];
+}
+
+
+static
+int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4])
+{
+	int ret;
+	struct i2c_msg msg = { addr: 0x61, flags: 0, buf: data, len: 4 };
+
+	if ((ret = i2c->xfer (i2c, &msg, 1)) != 1)
+		dprintk ("%s: write_reg error == %02x!\n", __FUNCTION__, ret);
+
+	return (ret != 1) ? -1 : 0;
+}
+
+
+/**
+ *   set up the downconverter frequency divisor for a
+ *   reference clock comparision frequency of 166666 Hz.
+ *   frequency offset is 36000000 Hz.
+ */
+static
+int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
+{
+	u32 div;
+	u8 buf [4];
+	u8 cfg;
+
+	if (freq < 700000000) {
+		div = (36000000 + freq) / 31250;
+		cfg = 0x86;
+	} else {
+		div = (36000000 + freq) / 166666;
+		cfg = 0x88;
+	}
+
+	buf [0] = (div >> 8) & 0x7f;
+	buf [1] = div & 0xff;
+	buf [2] = ((div >> 10) & 0x60) | cfg;
+	buf [3] = pwr << 6;
+
+	return tsa5060_write (i2c, buf);
+}
+
+
+static
+void apply_tps (struct dvb_i2c_bus *i2c)
+{
+	l64781_writereg (i2c, 0x2a, 0x00);
+	l64781_writereg (i2c, 0x2a, 0x01);
+
+	/* This here is a little bit questionable because it enables
+	   the automatic update of TPS registers. I think we'd need to
+	   handle the IRQ from FE to update some other registers as
+	   well, or at least implement some magic to tuning to correct
+	   to the TPS received from transmission. */
+	l64781_writereg (i2c, 0x2a, 0x02);
+}
+
+
+static
+void reset_afc (struct dvb_i2c_bus *i2c)
+{
+	/* Set AFC stall for the AFC_INIT_FRQ setting, TIM_STALL for
+	   timing offset */
+	l64781_writereg (i2c, 0x07, 0x9e); /* stall AFC */
+	l64781_writereg (i2c, 0x08, 0);    /* AFC INIT FREQ */
+	l64781_writereg (i2c, 0x09, 0);
+	l64781_writereg (i2c, 0x0a, 0);
+	l64781_writereg (i2c, 0x07, 0x8e);
+	l64781_writereg (i2c, 0x0e, 0);    /* AGC gain to zero in beginning */
+	l64781_writereg (i2c, 0x11, 0x80); /* stall TIM */
+	l64781_writereg (i2c, 0x10, 0);    /* TIM_OFFSET_LSB */
+	l64781_writereg (i2c, 0x12, 0);
+	l64781_writereg (i2c, 0x13, 0);
+	l64781_writereg (i2c, 0x11, 0x00);
+}
+
+
+static
+int apply_frontend_param (struct dvb_i2c_bus *i2c,
+			  struct dvb_frontend_parameters *param)
+{
+	/* The coderates for FEC_NONE, FEC_4_5 and FEC_FEC_6_7 are arbitrary */
+	static const u8 fec_tab[] = { 7, 0, 1, 2, 9, 3, 10, 4 };
+	/* QPSK, QAM_16, QAM_64 */
+	static const u8 qam_tab [] = { 2, 4, 0, 6 };
+	static const u8 bw_tab [] = { 8, 7, 6 };  /* 8Mhz, 7MHz, 6MHz */
+	static const u8 guard_tab [] = { 1, 2, 4, 8 };
+	/* The Grundig 29504-401.04 Tuner comes with 18.432MHz crystal. */
+	static const u32 ppm = 8000;
+	struct dvb_ofdm_parameters *p = &param->u.ofdm;
+	u32 ddfs_offset_fixed;
+/*	u32 ddfs_offset_variable = 0x6000-((1000000UL+ppm)/ */
+/*			bw_tab[p->bandWidth]<<10)/15625; */
+	u32 init_freq;
+	u32 spi_bias;
+	u8 val0x04;
+	u8 val0x05;
+	u8 val0x06;
+
+	if (param->inversion != INVERSION_ON &&
+	    param->inversion != INVERSION_OFF)
+		return -EINVAL;
+
+	if (p->bandwidth < BANDWIDTH_8_MHZ || p->bandwidth > BANDWIDTH_6_MHZ)
+		return -EINVAL;
+	
+	if (p->code_rate_HP != FEC_1_2 && p->code_rate_HP != FEC_2_3 &&
+	    p->code_rate_HP != FEC_3_4 && p->code_rate_HP != FEC_5_6 &&
+	    p->code_rate_HP != FEC_7_8)
+		return -EINVAL;
+
+	if (p->hierarchy_information != HIERARCHY_NONE &&
+	    (p->code_rate_LP != FEC_1_2 && p->code_rate_LP != FEC_2_3 &&
+	     p->code_rate_LP != FEC_3_4 && p->code_rate_LP != FEC_5_6 &&
+	     p->code_rate_LP != FEC_7_8))
+		return -EINVAL;
+
+	if (p->constellation != QPSK && p->constellation != QAM_16 &&
+	    p->constellation != QAM_64)
+		return -EINVAL;
+
+	if (p->transmission_mode != TRANSMISSION_MODE_2K &&
+	    p->transmission_mode != TRANSMISSION_MODE_8K)
+		return -EINVAL;
+
+	if (p->guard_interval < GUARD_INTERVAL_1_32 ||
+	    p->guard_interval > GUARD_INTERVAL_1_4)
+		return -EINVAL;
+
+	if (p->hierarchy_information < HIERARCHY_NONE ||
+	    p->hierarchy_information > HIERARCHY_4)
+		return -EINVAL;
+
+	ddfs_offset_fixed = 0x4000-(ppm<<16)/bw_tab[p->bandwidth]/1000000;
+
+	/* This works up to 20000 ppm, it overflows if too large ppm! */
+	init_freq = (((8UL<<25) + (8UL<<19) / 25*ppm / (15625/25)) /
+			bw_tab[p->bandwidth] & 0xFFFFFF);
+
+	/* SPI bias calculation is slightly modified to fit in 32bit */
+	/* will work for high ppm only... */
+	spi_bias = 378 * (1 << 10);
+	spi_bias *= 16;
+	spi_bias *= bw_tab[p->bandwidth];
+	spi_bias *= qam_tab[p->constellation];
+	spi_bias /= p->code_rate_HP + 1;
+	spi_bias /= (guard_tab[p->guard_interval] + 32);
+	spi_bias *= 1000ULL;
+	spi_bias /= 1000ULL + ppm/1000;
+	spi_bias *= p->code_rate_HP;
+
+	val0x04 = (p->transmission_mode << 2) | p->guard_interval;
+	val0x05 = fec_tab[p->code_rate_HP];
+	if (p->hierarchy_information != HIERARCHY_NONE)
+		val0x05 |= (p->code_rate_LP - FEC_1_2) << 3;
+
+	val0x06 = (p->hierarchy_information << 2) | p->constellation;
+
+	l64781_writereg (i2c, 0x04, val0x04);
+	l64781_writereg (i2c, 0x05, val0x05);
+	l64781_writereg (i2c, 0x06, val0x06);
+
+	reset_afc (i2c);
+
+	/* Technical manual section 2.6.1, TIM_IIR_GAIN optimal values */
+	l64781_writereg (i2c, 0x15,
+			 p->transmission_mode == TRANSMISSION_MODE_2K ? 1 : 3);
+	l64781_writereg (i2c, 0x16, init_freq & 0xff);
+	l64781_writereg (i2c, 0x17, (init_freq >> 8) & 0xff);
+	l64781_writereg (i2c, 0x18, (init_freq >> 16) & 0xff);
+
+	l64781_writereg (i2c, 0x1b, spi_bias & 0xff);
+	l64781_writereg (i2c, 0x1c, (spi_bias >> 8) & 0xff);
+	l64781_writereg (i2c, 0x1d, ((spi_bias >> 16) & 0x7f) |
+		(param->inversion == INVERSION_ON ? 0x80 : 0x00));
+
+	l64781_writereg (i2c, 0x22, ddfs_offset_fixed & 0xff);
+	l64781_writereg (i2c, 0x23, (ddfs_offset_fixed >> 8) & 0x3f);
+
+	l64781_readreg (i2c, 0x00);  /*  clear interrupt registers... */
+	l64781_readreg (i2c, 0x01);  /*  dto. */
+
+	apply_tps (i2c);
+
+	return 0;
+}
+
+
+static
+void reset_and_configure (struct dvb_i2c_bus *i2c)
+{
+	u8 buf [] = { 0x06 };
+	struct i2c_msg msg = { addr: 0x00, flags: 0, buf: buf, len: 1 };
+
+	i2c->xfer (i2c, &msg, 1);
+}
+
+
+
+static
+int init (struct dvb_i2c_bus *i2c)
+{
+        reset_and_configure (i2c);
+
+	/* Power up */
+	l64781_writereg (i2c, 0x3e, 0xa5);
+
+	/* Reset hard */
+	l64781_writereg (i2c, 0x2a, 0x04);
+	l64781_writereg (i2c, 0x2a, 0x00);
+
+	/* Set tuner specific things */
+	/* AFC_POL, set also in reset_afc */
+	l64781_writereg (i2c, 0x07, 0x8e);
+
+	/* Use internal ADC */
+	l64781_writereg (i2c, 0x0b, 0x81);
+
+	/* AGC loop gain, and polarity is positive */
+	l64781_writereg (i2c, 0x0c, 0x84);
+
+	/* Internal ADC outputs two's complement */
+	l64781_writereg (i2c, 0x0d, 0x8c);
+
+	/* With ppm=8000, it seems the DTR_SENSITIVITY will result in
+           value of 2 with all possible bandwidths and guard
+           intervals, which is the initial value anyway. */
+        /*l64781_writereg (i2c, 0x19, 0x92);*/
+
+	/* Everything is two's complement, soft bit and CSI_OUT too */
+	l64781_writereg (i2c, 0x1e, 0x49);
+
+	return 0;
+}
+
+
+static 
+int grundig_29504_401_ioctl (struct dvb_frontend *fe,
+			     unsigned int cmd, void *arg)
+{
+	struct dvb_i2c_bus *i2c = fe->i2c;
+        switch (cmd) {
+        case FE_GET_INFO:
+		memcpy (arg, &grundig_29504_401_info,
+			sizeof(struct dvb_frontend_info));
+                break;
+
+	case FE_READ_STATUS:
+	{
+		fe_status_t *status = (fe_status_t *) arg;
+		int sync = l64781_readreg (i2c, 0x32);
+		int gain = l64781_readreg (i2c, 0x0e);
+
+		l64781_readreg (i2c, 0x00);  /*  clear interrupt registers... */
+		l64781_readreg (i2c, 0x01);  /*  dto. */
+
+		*status = 0;
+
+		if (gain > 5)
+			*status |= FE_HAS_SIGNAL;
+
+		if (sync & 0x02) /* VCXO locked, this criteria should be ok */
+			*status |= FE_HAS_CARRIER;
+
+		if (sync & 0x20)
+			*status |= FE_HAS_VITERBI;
+
+		if (sync & 0x40)
+			*status |= FE_HAS_SYNC;
+
+		if (sync == 0x7f)
+			*status |= FE_HAS_LOCK;
+
+		break;
+	}
+
+        case FE_READ_BER:
+	{
+		/*   XXX FIXME: set up counting period (reg 0x26...0x28)
+		 */
+		u32 *ber = (u32 *) arg;
+		*ber = l64781_readreg (i2c, 0x39)
+		    | (l64781_readreg (i2c, 0x3a) << 8);
+		break;
+	}
+
+        case FE_READ_SIGNAL_STRENGTH:
+	{
+		u8 gain = l64781_readreg (i2c, 0x0e);
+		*(u16 *) arg = (gain << 8) | gain;
+		break;
+	}
+
+        case FE_READ_SNR:
+	{
+		u16 *snr = (u16 *) arg;
+		u8 avg_quality = 0xff - l64781_readreg (i2c, 0x33);
+		*snr = (avg_quality << 8) | avg_quality; /* not exact, but...*/ 
+		break;
+	}
+
+	case FE_READ_UNCORRECTED_BLOCKS: 
+	{
+		u32 *ub = (u32 *) arg;
+		*ub = l64781_readreg (i2c, 0x37)
+		   | (l64781_readreg (i2c, 0x38) << 8);
+		break;
+	}
+
+        case FE_SET_FRONTEND:
+	{
+		struct dvb_frontend_parameters *p = arg;
+
+		tsa5060_set_tv_freq (i2c, p->frequency, 3);
+		apply_frontend_param (i2c, p);
+//		tsa5060_set_tv_freq (i2c, p->frequency, 0);
+	}
+        case FE_GET_FRONTEND:
+		/*  we could correct the frequency here, but...
+		 *  (...do you want to implement this?;)
+		 */
+		return 0;
+
+	case FE_SLEEP:
+		/* Power down */
+		return l64781_writereg (i2c, 0x3e, 0x5a);
+
+	case FE_INIT:
+		return init (i2c);
+
+        case FE_RESET:
+		//reset_afc (i2c);
+		apply_tps (i2c);
+		l64781_readreg (i2c, 0x00);  /*  clear interrupt registers... */
+		l64781_readreg (i2c, 0x01);  /*  dto. */
+		break;
+
+        default:
+		dprintk ("%s: unknown command !!!\n", __FUNCTION__);
+		return -EINVAL;
+        };
+        
+        return 0;
+} 
+
+
+static
+int l64781_attach (struct dvb_i2c_bus *i2c)
+{
+	u8 b0 [] = { 0x1a };
+	u8 b1 [] = { 0x00 };
+	struct i2c_msg msg [] = { { addr: 0x55, flags: 0, buf: b0, len: 1 },
+			   { addr: 0x55, flags: I2C_M_RD, buf: b1, len: 1 } };
+
+	if (i2c->xfer (i2c, msg, 2) == 2)   /*  probably an EEPROM... */
+		return -ENODEV;
+
+	reset_and_configure (i2c);
+
+	if (i2c->xfer (i2c, msg, 2) != 2)   /*  nothing... */
+		return -ENODEV;
+
+	if (b1[0] != 0xa1)
+		return -ENODEV;
+
+	dvb_register_frontend (grundig_29504_401_ioctl, i2c, NULL,
+			       &grundig_29504_401_info);
+	return 0;
+}
+
+
+static
+void l64781_detach (struct dvb_i2c_bus *i2c)
+{
+	dvb_unregister_frontend (grundig_29504_401_ioctl, i2c);
+}
+
+
+static
+int __init init_grundig_29504_401 (void)
+{
+	return dvb_register_i2c_device (THIS_MODULE,
+					l64781_attach, l64781_detach);
+}
+
+
+static
+void __exit exit_grundig_29504_401 (void)
+{
+	dvb_unregister_i2c_device (l64781_attach);
+}
+
+module_init(init_grundig_29504_401);
+module_exit(exit_grundig_29504_401);
+
+MODULE_PARM(debug,"i");
+MODULE_PARM_DESC(debug, "enable verbose debug messages");
+MODULE_DESCRIPTION("Grundig 29504-401 DVB-T Frontend");
+MODULE_AUTHOR("Holger Waechtler, Marko Kohtala");
+MODULE_LICENSE("GPL");
+
diff -Nru a/drivers/media/dvb/frontends/grundig_29504-491.c b/drivers/media/dvb/frontends/grundig_29504-491.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/grundig_29504-491.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,496 @@
+/* 
+    Driver for Grundig 29504-491, a Philips TDA8083 based QPSK Frontend
+
+    Copyright (C) 2001 Convergence Integrated Media GmbH
+
+    written by Ralph Metzler <ralph@convergence.de>
+
+    adoption to the new DVB frontend API and diagnostic ioctl's
+    by Holger Waechtler <holger@convergence.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/    
+
+#include <linux/init.h>
+#include <linux/module.h>
+
+#include "compat.h"
+#include "dvb_frontend.h"
+
+static int debug = 0;
+#define dprintk	if (debug) printk
+
+
+static
+struct dvb_frontend_info grundig_29504_491_info = {
+	name: "Grundig 29504-491, (TDA8083 based)",
+	type: FE_QPSK,
+	frequency_min: 950000,     /* FIXME: guessed! */
+	frequency_max: 1400000,    /* FIXME: guessed! */
+	frequency_stepsize: 125,   /* kHz for QPSK frontends */
+/*      frequency_tolerance: ???,*/
+	symbol_rate_min: 1000000,   /* FIXME: guessed! */
+	symbol_rate_max: 45000000,  /* FIXME: guessed! */
+/*      symbol_rate_tolerance: ???,*/
+	notifier_delay: 0,
+	caps:	FE_CAN_INVERSION_AUTO |
+		FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+		FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
+		FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
+		FE_CAN_QPSK |
+		FE_CAN_MUTE_TS
+};
+
+
+
+static
+u8 tda8083_init_tab [] = {
+	0x04, 0x00, 0x4a, 0x79, 0x04, 0x00, 0xff, 0xea,
+	0x48, 0x42, 0x79, 0x60, 0x70, 0x52, 0x9a, 0x10,
+	0x0e, 0x10, 0xf2, 0xa7, 0x93, 0x0b, 0x05, 0xc8,
+	0x9d, 0x00, 0x42, 0x80, 0x00, 0x60, 0x40, 0x00,
+	0x00, 0x75, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00
+};
+
+
+
+static
+int tda8083_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
+{
+	int ret;
+	u8 buf [] = { reg, data };
+	struct i2c_msg msg = { addr: 0x68, flags: 0, buf: buf, len: 2 };
+
+        ret = i2c->xfer (i2c, &msg, 1);
+
+        if (ret != 1)
+                dprintk ("%s: writereg error (reg %02x, ret == %i)\n",
+			__FUNCTION__, reg, ret);
+
+        return (ret != 1) ? -1 : 0;
+}
+
+
+static
+int tda8083_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
+{
+	int ret;
+	struct i2c_msg msg [] = { { addr: 0x68, flags: 0, buf: &reg1, len: 1 },
+			   { addr: 0x68, flags: I2C_M_RD, buf: b, len: len } };
+
+	ret = i2c->xfer (i2c, msg, 2);
+
+	if (ret != 2)
+		dprintk ("%s: readreg error (reg %02x, ret == %i)\n",
+			__FUNCTION__, reg1, ret);
+
+        return ret == 2 ? 0 : -1;
+}
+
+
+static inline
+u8 tda8083_readreg (struct dvb_i2c_bus *i2c, u8 reg)
+{
+	u8 val;
+
+	tda8083_readregs (i2c, reg, &val, 1);
+
+	return val;
+}
+
+
+static
+int tsa5522_write (struct dvb_i2c_bus *i2c, u8 data [4])
+{
+	int ret;
+	struct i2c_msg msg = { addr: 0x61, flags: 0, buf: data, len: 4 };
+
+	ret = i2c->xfer (i2c, &msg, 1);
+
+	if (ret != 1)
+		dprintk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
+
+	return (ret != 1) ? -1 : 0;
+}
+
+
+/**
+ *   set up the downconverter frequency divisor for a
+ *   reference clock comparision frequency of 125 kHz.
+ */
+static
+int tsa5522_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
+{
+	u32 div = freq / 125;
+	u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x8e, 0x00 };
+
+	return tsa5522_write (i2c, buf);
+}
+
+
+static int 
+tda8083_init (struct dvb_i2c_bus *i2c)
+{
+	int i;
+	
+	dprintk("%s: init TDA8083\n", __FILE__);
+
+	for (i=0; i<44; i++)
+		tda8083_writereg (i2c, i, tda8083_init_tab[i]);
+
+	return 0;
+}
+
+
+static int 
+tda8083_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
+{
+	/*  XXX FIXME: implement other modes than FEC_AUTO */
+	if (inversion == INVERSION_AUTO)
+		return 0;
+	
+	return -EINVAL;
+}
+
+
+static int 
+tda8083_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
+{
+	if (fec == FEC_AUTO)
+		return tda8083_writereg (i2c, 0x07, 0xff);
+
+	if (fec >= FEC_1_2 && fec <= FEC_8_9)
+		return tda8083_writereg (i2c, 0x07, 1 << (FEC_8_9 - fec));
+
+	return -EINVAL;
+}
+
+
+static
+fe_code_rate_t tda8083_get_fec (struct dvb_i2c_bus *i2c)
+{
+	u8 index;
+	static fe_code_rate_t fec_tab [] = { FEC_8_9, FEC_1_2, FEC_2_3, FEC_3_4,
+				       FEC_4_5, FEC_5_6, FEC_6_7, FEC_7_8 };
+
+	index = tda8083_readreg (i2c, 0x0e) & 0x3;
+
+	if (index > 7)
+		return FEC_NONE;
+
+	return fec_tab [index];
+}
+
+
+static
+int tda8083_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
+{
+        u32 ratio;
+	u32 tmp;
+	u8 filter;
+
+	if (srate > 32000000)
+                srate = 32000000;
+        if (srate < 500000)
+                srate = 500000;
+
+	filter = 0;
+	if (srate < 24000000)
+		filter = 2;
+	if (srate < 16000000)
+		filter = 3;
+
+	tmp = 31250 << 16;
+	ratio = tmp / srate;
+        
+	tmp = (tmp % srate) << 8;
+	ratio = (ratio << 8) + tmp / srate;
+        
+	tmp = (tmp % srate) << 8;
+	ratio = (ratio << 8) + tmp / srate;
+	
+	dprintk("tda8083: ratio == %08x\n", ratio);
+
+	tda8083_writereg (i2c, 0x05, filter);
+	tda8083_writereg (i2c, 0x02, (ratio >> 16) & 0xff);
+	tda8083_writereg (i2c, 0x03, (ratio >>  8) & 0xff);
+	tda8083_writereg (i2c, 0x04, (ratio      ) & 0xff);
+	
+	tda8083_writereg (i2c, 0x00, 0x3c);
+	tda8083_writereg (i2c, 0x00, 0x04);
+
+	return 1;
+}
+
+
+static
+void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
+{
+	unsigned long start = jiffies;
+
+	while (jiffies - start < timeout &&
+               !(tda8083_readreg(i2c, 0x02) & 0x80))
+	{
+		current->state = TASK_INTERRUPTIBLE;
+		schedule_timeout (5);
+	};
+}
+
+
+static
+int tda8083_send_diseqc_msg (struct dvb_i2c_bus *i2c,
+			     struct dvb_diseqc_master_cmd *m)
+{
+	int i;
+
+	tda8083_writereg (i2c, 0x29, (m->msg_len - 3) | (1 << 2)); /* enable */
+
+	for (i=0; i<m->msg_len; i++)
+		tda8083_writereg (i2c, 0x23 + i, m->msg[i]);
+
+	tda8083_writereg (i2c, 0x29, (m->msg_len - 3) | (3 << 2)); /* send!! */
+
+	tda8083_wait_diseqc_fifo (i2c, 100);
+
+	return 0;
+}
+
+
+static
+int tda8083_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
+{
+	switch (burst) {
+	case SEC_MINI_A:
+		tda8083_writereg (i2c, 0x29, (5 << 2));  /* send burst A */
+		break;
+	case SEC_MINI_B:
+		tda8083_writereg (i2c, 0x29, (7 << 2));  /* send B */
+		break;
+	default:
+		return -EINVAL;
+	};
+	
+	tda8083_wait_diseqc_fifo (i2c, 100); 
+
+	return 0;
+}
+
+
+static
+int tda8083_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
+{
+	tda8083_writereg (i2c, 0x26, 0xf1);
+
+	switch (tone) {
+	case SEC_TONE_OFF:
+		return tda8083_writereg (i2c, 0x29, 0x00);
+	case SEC_TONE_ON:
+		return tda8083_writereg (i2c, 0x29, 0x80);
+	default:
+		return -EINVAL;
+	};
+}
+
+
+static
+int tda8083_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
+{
+	switch (voltage) {
+	case SEC_VOLTAGE_13:
+		return tda8083_writereg (i2c, 0x20, 0x00);
+	case SEC_VOLTAGE_18:
+		return tda8083_writereg (i2c, 0x20, 0x11);
+	default:
+		return -EINVAL;
+	};
+}
+
+
+static
+int grundig_29504_491_ioctl (struct dvb_frontend *fe, unsigned int cmd,
+			     void *arg)
+{
+	struct dvb_i2c_bus *i2c = fe->i2c;
+
+        switch (cmd) {
+	case FE_GET_INFO:
+		memcpy (arg, &grundig_29504_491_info, 
+			sizeof(struct dvb_frontend_info));
+                break;
+
+        case FE_READ_STATUS:
+	{
+		fe_status_t *status=(fe_status_t *) arg;
+		u8 signal = ~tda8083_readreg (i2c, 0x01);
+		u8 sync = tda8083_readreg (i2c, 0x02);
+
+		*status = 0;
+
+		if (signal > 10)
+			*status |= FE_HAS_SIGNAL;
+
+		if (sync & 0x01)
+			*status |= FE_HAS_CARRIER;
+
+		if (sync & 0x02)
+			*status |= FE_HAS_VITERBI;
+
+		if (sync & 0x10)
+			*status |= FE_HAS_SYNC;
+
+		if ((sync & 0x1f) == 0x1f)
+			*status |= FE_HAS_LOCK;
+
+		break;
+	}
+
+        case FE_READ_BER:
+                *((u32*) arg) = 0; /*   XXX FIXME: implement me!!! */
+                return -EOPNOTSUPP;
+
+        case FE_READ_SIGNAL_STRENGTH:
+	{
+		u8 signal = ~tda8083_readreg (i2c, 0x01);
+                *((u16*) arg) = (signal << 8) | signal;
+                break;
+	}
+        case FE_READ_SNR:
+	{
+		u8 snr = tda8083_readreg (i2c, 0x08);
+                *((u16*) arg) = (snr << 8) | snr;
+                break;
+	}
+        case FE_READ_UNCORRECTED_BLOCKS:
+                *((u32*) arg) = 0; /*   XXX FIXME: implement me!!! */
+                return -EOPNOTSUPP;
+
+
+        case FE_SET_FRONTEND:
+        {
+		struct dvb_frontend_parameters *p = arg;
+
+		tsa5522_set_tv_freq (i2c, p->frequency);
+		tda8083_set_inversion (i2c, p->inversion);
+		tda8083_set_fec (i2c, p->u.qpsk.fec_inner);
+		tda8083_set_symbolrate (i2c, p->u.qpsk.symbol_rate);
+
+		tda8083_writereg (i2c, 0x00, 0x3c);
+		tda8083_writereg (i2c, 0x00, 0x04);
+
+		break;
+        }
+
+	case FE_GET_FRONTEND:
+        {
+		struct dvb_frontend_parameters *p = arg;
+
+		/*  FIXME: get symbolrate & frequency offset...*/
+		/*p->frequency = ???;*/
+		p->inversion = (tda8083_readreg (i2c, 0x0e) & 0x80) ?
+				INVERSION_ON : INVERSION_OFF;
+		p->u.qpsk.fec_inner = tda8083_get_fec (i2c);
+		/*p->u.qpsk.symbol_rate = tda8083_get_symbolrate (i2c);*/
+		break;
+        }
+
+	case FE_SLEEP:
+		tda8083_writereg (i2c, 0x00, 0x02);
+		break;
+
+	case FE_INIT:
+		tda8083_init (i2c);
+		tda8083_writereg (i2c, 0x00, 0x3c);
+		tda8083_writereg (i2c, 0x00, 0x04);
+		break;
+
+	case FE_RESET:
+		tda8083_writereg (i2c, 0x00, 0x3c);
+		tda8083_writereg (i2c, 0x00, 0x04);
+		break;
+
+	case FE_DISEQC_SEND_MASTER_CMD:
+		return tda8083_send_diseqc_msg (i2c, arg);
+
+	case FE_DISEQC_SEND_BURST:
+		tda8083_send_diseqc_burst (i2c, (fe_sec_mini_cmd_t) arg);
+		tda8083_writereg (i2c, 0x00, 0x3c);
+		tda8083_writereg (i2c, 0x00, 0x04);
+
+		break;
+
+	case FE_SET_TONE:
+		tda8083_set_tone (i2c, (fe_sec_tone_mode_t) arg);
+		tda8083_writereg (i2c, 0x00, 0x3c);
+		tda8083_writereg (i2c, 0x00, 0x04);
+		break;
+
+	case FE_SET_VOLTAGE:
+		tda8083_set_voltage (i2c, (fe_sec_voltage_t) arg);
+		tda8083_writereg (i2c, 0x00, 0x3c);
+		tda8083_writereg (i2c, 0x00, 0x04);
+		break;
+
+	default:
+		return -EOPNOTSUPP;
+	};
+
+	return 0;
+} 
+
+
+static
+int tda8083_attach (struct dvb_i2c_bus *i2c)
+{
+	if ((tda8083_readreg (i2c, 0x00)) != 0x05)
+		return -ENODEV;
+
+	dvb_register_frontend (grundig_29504_491_ioctl, i2c, NULL,
+			       &grundig_29504_491_info);
+
+	return 0;
+}
+
+
+static
+void tda8083_detach (struct dvb_i2c_bus *i2c)
+{
+	dvb_unregister_frontend (grundig_29504_491_ioctl, i2c);
+}
+
+
+static
+int __init init_tda8083 (void)
+{
+	return dvb_register_i2c_device (THIS_MODULE,
+					tda8083_attach, tda8083_detach);
+}
+
+
+static
+void __exit exit_tda8083 (void)
+{
+	dvb_unregister_i2c_device (tda8083_attach);
+}
+
+module_init(init_tda8083);
+module_exit(exit_tda8083);
+
+MODULE_PARM(debug,"i");
+MODULE_DESCRIPTION("Grundig 29504-491 DVB frontend driver");
+MODULE_AUTHOR("Ralph Metzler, Holger Waechtler");
+MODULE_LICENSE("GPL");
+
diff -Nru a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/dvb/frontends/ves1820.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,537 @@
+/* 
+    VES1820  - Single Chip Cable Channel Receiver driver module
+               used on the the Siemens DVB-C cards
+
+    Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/    
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/delay.h>
+
+#include "compat.h"
+#include "dvb_frontend.h"
+
+
+static int debug = 0;
+#define dprintk	if (debug) printk
+
+
+/**
+ *  since we need only a few bits to store internal state we don't allocate
+ *  extra memory but use frontend->data as bitfield
+ */
+
+#define SET_PWM(frontend,pwm) do { 		\
+	(int) frontend->data &= ~0xff; 		\
+	(int) frontend->data |= pwm; 		\
+} while (0)
+
+#define SET_REG0(frontend,reg0) do {		\
+	(int) frontend->data &= ~(0xff << 8); 	\
+	(int) frontend->data |= reg0 << 8; 	\
+} while (0)
+
+#define SET_TUNER(frontend,type) do {		\
+	(int) frontend->data &= ~(0xff << 16); 	\
+	(int) frontend->data |= type << 16;	\
+} while (0)
+
+#define GET_PWM(frontend) ((u8) ((int) frontend->data & 0xff))
+#define GET_REG0(frontend) ((u8) (((int) frontend->data >> 8) & 0xff))
+#define GET_TUNER(frontend) ((u8) (((int) frontend->data >> 16) & 0xff))
+
+
+
+static
+struct dvb_frontend_info ves1820_info = {
+	name: "VES1820/Grundig tuner as used on the Siemens DVB-C card",
+	type: FE_QAM,
+	frequency_stepsize: 62500,
+	frequency_min: 51000000,
+	frequency_max: 858000000,
+#if 0
+	frequency_tolerance: ???,
+	symbol_rate_min: ???,
+	symbol_rate_max: ???,
+	symbol_rate_tolerance: ???,  /* ppm */  /* == 8% (spec p. 5) */
+	notifier_delay: ?,
+#endif
+	caps: FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 |
+		FE_CAN_QAM_128 | FE_CAN_QAM_256
+};
+
+
+
+static
+u8 ves1820_inittab [] =
+{
+  0x69, 0x6A, 0x9B, 0x0A, 0x52, 0x46, 0x26, 0x1A,
+  0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x28,
+  0xE0, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x40
+};
+
+
+static
+int ves1820_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
+{
+        int ret;
+        u8 buf[] = { 0x00, reg, data };
+	struct i2c_msg msg = { addr: 0x09, flags: 0, buf: buf, len: 3 };
+
+	ret = i2c->xfer (i2c, &msg, 1);
+
+	if (ret != 1)
+		dprintk("%s: writereg error "
+			"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
+			__FUNCTION__, reg, data, ret);
+
+	mdelay(10);
+	return (ret != 1) ? -EREMOTEIO : 0;
+}
+
+
+static
+u8 ves1820_readreg (struct dvb_i2c_bus *i2c, u8 reg)
+{
+	int ret;
+	u8 b0 [] = { 0x00, reg };
+	u8 b1 [] = { 0 };
+	struct i2c_msg msg [] = { { addr: 0x09, flags: 0, buf: b0, len: 2 },
+	                   { addr: 0x09, flags: I2C_M_RD, buf: b1, len: 1 } };
+
+
+	ret = i2c->xfer (i2c, msg, 2);
+
+	if (ret != 2)
+		dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
+
+	return b1[0];
+}
+
+
+static
+int tuner_write (struct dvb_i2c_bus *i2c, u8 addr, u8 data [4])
+{
+        int ret;
+        struct i2c_msg msg = { addr: addr, flags: 0, buf: data, len: 4 };
+
+        ret = i2c->xfer (i2c, &msg, 1);
+
+        if (ret != 1)
+                printk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
+
+        return (ret != 1) ? -EREMOTEIO : 0;
+}
+
+
+/**
+ *   set up the downconverter frequency divisor for a
+ *   reference clock comparision frequency of 62.5 kHz.
+ */
+static
+int tuner_set_tv_freq (struct dvb_frontend *frontend, u32 freq)
+{
+        u32 div;
+	static u8 addr [] = { 0x61, 0x62 };
+	static u8 byte3 [] = { 0x8e, 0x85 };
+	int tuner_type = GET_TUNER(frontend);
+        u8 buf [4];
+
+	div = (freq + 36250000 + 31250) / 62500;
+	buf[0] = (div >> 8) & 0x7f;
+	buf[1] = div & 0xff;
+	buf[2] = byte3[tuner_type];
+
+	if (tuner_type == 1) {
+		buf[2] |= (div >> 10) & 0x60;
+		buf[3] = (freq < 174000000 ? 0x88 :
+			  freq < 470000000 ? 0x84 : 0x81);
+	} else {
+		buf[3] = (freq < 174000000 ? 0xa1 :
+			  freq < 454000000 ? 0x92 : 0x34);
+	}
+
+        return tuner_write (frontend->i2c, addr[tuner_type], buf);
+}
+
+
+static
+int probe_tuner (struct dvb_frontend *frontend)
+{
+	struct dvb_i2c_bus *i2c = frontend->i2c;
+	struct i2c_msg msg = { addr: 0x61, flags: 0, buf: NULL, len: 0 };
+
+	if (i2c->xfer(i2c, &msg, 1) == 1) {
+		SET_TUNER(frontend,0);
+		printk ("%s: setup for tuner spXXXX\n", __FILE__);
+	} else {
+		SET_TUNER(frontend,1);
+		printk ("%s: setup for tuner sp5659c\n", __FILE__);
+	}
+
+	return 0;
+}
+
+
+static
+int ves1820_init (struct dvb_frontend *frontend)
+{
+	struct dvb_i2c_bus *i2c = frontend->i2c;
+	u8 b0 [] = { 0xff };
+	u8 pwm;
+	int i;
+	struct i2c_msg msg [] = { { addr: 0x28, flags: 0, buf: b0, len: 1 },
+	                   { addr: 0x28, flags: I2C_M_RD, buf: &pwm, len: 1 } };
+        
+        dprintk("VES1820: init chip\n");
+
+	i2c->xfer (i2c, msg, 2);
+
+	dprintk("VES1820: pwm=%02x\n", pwm);
+
+	if (pwm == 0xff)
+                pwm=0x48;
+
+        ves1820_writereg (i2c, 0, 0);
+
+	for (i=0; i<53; i++)
+                ves1820_writereg (i2c, i, ves1820_inittab[i]);
+
+        ves1820_writereg (i2c, 0x34, pwm);
+
+	(int) frontend->data = 0;
+	SET_PWM(frontend,pwm);
+
+	probe_tuner (frontend);
+
+	return 0;
+}
+
+
+static
+int ves1820_setup_reg0 (struct dvb_frontend *frontend,
+			u8 real_qam, fe_spectral_inversion_t inversion)
+{
+	struct dvb_i2c_bus *i2c = frontend->i2c;
+	u8 reg0 = (ves1820_inittab[0] & 0xe3) | (real_qam << 2);
+
+	switch (inversion) {
+	case INVERSION_OFF:      /* XXX FIXME: reversed?? p. 25  */
+		reg0 |= 0x20;
+		break;
+
+	case INVERSION_ON:
+		reg0 &= 0xdf;
+		break;
+
+	default:
+		return -EINVAL;
+	}
+
+	SET_REG0(frontend, reg0);
+
+	ves1820_writereg (i2c, 0x00, reg0 & 0xfe);
+        ves1820_writereg (i2c, 0x00, reg0);
+
+	return 0;
+}
+
+
+static
+int ves1820_reset (struct dvb_frontend *frontend)
+{
+	struct dvb_i2c_bus *i2c = frontend->i2c;
+	u8 reg0 = GET_REG0(frontend);
+
+	ves1820_writereg (i2c, 0x00, reg0 & 0xfe);
+        ves1820_writereg (i2c, 0x00, reg0);
+
+	return 0;
+}
+
+
+static
+void ves1820_reset_uncorrected_block_counter (struct dvb_i2c_bus *i2c)
+{
+	ves1820_writereg (i2c, 0x10, ves1820_inittab[0x10] & 0xdf);
+        ves1820_writereg (i2c, 0x10, ves1820_inittab[0x10]);
+}
+
+
+static
+int ves1820_set_symbolrate (struct dvb_i2c_bus *i2c, u32 symbolrate)
+{
+        s32 BDR; 
+        s32 BDRI;
+        s16 SFIL=0;
+        u16 NDEC = 0;
+        u32 tmp, ratio;
+
+#define XIN 57840000UL
+#define FIN (57840000UL>>4)
+
+        if (symbolrate > XIN/2) 
+                symbolrate = XIN/2;
+
+	if (symbolrate < 500000)
+                symbolrate = 500000;
+
+        if (symbolrate < XIN/16) NDEC = 1;
+        if (symbolrate < XIN/32) NDEC = 2;
+        if (symbolrate < XIN/64) NDEC = 3;
+
+        if (symbolrate < (u32)(XIN/12.3)) SFIL = 1;
+        if (symbolrate < (u32)(XIN/16))	 SFIL = 0;
+        if (symbolrate < (u32)(XIN/24.6)) SFIL = 1;
+        if (symbolrate < (u32)(XIN/32))	 SFIL = 0;
+        if (symbolrate < (u32)(XIN/49.2)) SFIL = 1;
+        if (symbolrate < (u32)(XIN/64))	 SFIL = 0;
+        if (symbolrate < (u32)(XIN/98.4)) SFIL = 1;
+        
+        symbolrate <<= NDEC;
+        ratio = (symbolrate << 4) / FIN;
+        tmp =  ((symbolrate << 4) % FIN) << 8;
+        ratio = (ratio << 8) + tmp / FIN;
+        tmp = (tmp % FIN) << 8;
+        ratio = (ratio << 8) + (tmp + FIN/2) / FIN;
+        
+        BDR = ratio;
+        BDRI = (((XIN << 5) / symbolrate) + 1) / 2;
+        
+        if (BDRI > 0xFF) 
+                BDRI = 0xFF;
+        
+        SFIL = (SFIL << 4) | ves1820_inittab[0x0E];
+        
+        NDEC = (NDEC << 6) | ves1820_inittab[0x03];
+
+        ves1820_writereg (i2c, 0x03, NDEC);
+        ves1820_writereg (i2c, 0x0a, BDR&0xff);
+        ves1820_writereg (i2c, 0x0b, (BDR>> 8)&0xff);
+        ves1820_writereg (i2c, 0x0c, (BDR>>16)&0x3f);
+
+        ves1820_writereg (i2c, 0x0d, BDRI);
+        ves1820_writereg (i2c, 0x0e, SFIL);
+
+        return 0;
+}
+
+
+static
+void ves1820_reset_pwm (struct dvb_frontend *frontend) 
+{
+	u8 pwm = GET_PWM(frontend);
+
+	ves1820_writereg (frontend->i2c, 0x34, pwm); 
+}
+
+
+typedef struct {
+        fe_modulation_t  QAM_Mode;
+        int         NoOfSym;
+        u8          Reg1;
+        u8          Reg5;
+        u8          Reg8;
+        u8          Reg9;
+} QAM_SETTING;
+
+
+QAM_SETTING QAM_Values[] = {	
+        {  QAM_16,  16, 140, 164, 162, 145 },
+        {  QAM_32,  32, 140, 120, 116, 150 },
+        {  QAM_64,  64, 106,  70,  67, 106 },
+        { QAM_128, 128, 120,  54,  52, 126 },
+        { QAM_256, 256,  92,  38,  35, 107 }
+};
+
+
+static
+int ves1820_set_parameters (struct dvb_frontend *frontend,
+			    struct dvb_frontend_parameters *p)
+{
+	struct dvb_i2c_bus* i2c = frontend->i2c;
+        int real_qam;
+        
+        switch (p->u.qam.modulation) {
+        case QAM_16 : real_qam = 0; break;
+        case QAM_32 : real_qam = 1; break;
+        case QAM_64 : real_qam = 2; break;
+        case QAM_128: real_qam = 3; break;
+        case QAM_256: real_qam = 4; break;
+        default:
+                return -EINVAL;
+        }
+
+	tuner_set_tv_freq (frontend, p->frequency);
+	ves1820_set_symbolrate (i2c, p->u.qam.symbol_rate);
+	ves1820_reset_pwm (frontend);
+
+        ves1820_writereg (i2c, 0x01, QAM_Values[real_qam].Reg1);
+        ves1820_writereg (i2c, 0x05, QAM_Values[real_qam].Reg5);
+        ves1820_writereg (i2c, 0x08, QAM_Values[real_qam].Reg8);
+        ves1820_writereg (i2c, 0x09, QAM_Values[real_qam].Reg9);
+
+	ves1820_setup_reg0 (frontend, real_qam, p->inversion);
+	
+	return 0;
+}
+
+
+
+static
+int ves1820_ioctl (struct dvb_frontend *frontend, unsigned int cmd, void *arg)
+{
+        switch (cmd) {
+	case FE_GET_INFO:
+		memcpy (arg, &ves1820_info, sizeof(struct dvb_frontend_info));
+		break;
+
+        case FE_READ_STATUS:
+	{
+		fe_status_t *status = (fe_status_t *) arg;
+		int sync;
+
+		*status = 0;
+
+                sync = ves1820_readreg (frontend->i2c, 0x11);
+
+		if (sync & 2)
+			*status |= FE_HAS_SIGNAL;
+
+		if (sync & 2)
+			*status |= FE_HAS_CARRIER;
+
+		if (sync & 2)           /* XXX FIXME! */
+			*status |= FE_HAS_VITERBI;
+		
+		if (sync & 4)
+			*status |= FE_HAS_SYNC;
+
+		if (sync & 8)
+			*status |= FE_HAS_LOCK;
+
+		break;
+	}
+
+	case FE_READ_BER:
+		*((u32*) arg) = ves1820_readreg(frontend->i2c, 0x14) |
+			        (ves1820_readreg(frontend->i2c, 0x15) << 8) |
+			        (ves1820_readreg(frontend->i2c, 0x16) << 16);
+		/* XXX FIXME: scale!!*/
+		break;
+
+	case FE_READ_SIGNAL_STRENGTH:
+	{
+		u8 gain = ves1820_readreg(frontend->i2c, 0x17);
+		*((u16*) arg) = (gain << 8) | gain;
+		break;
+	}
+
+	case FE_READ_SNR:
+	{
+		u8 quality = ~ves1820_readreg(frontend->i2c, 0x18);
+		*((u16*) arg) = (quality << 8) | quality;
+		break;
+	}
+
+	case FE_READ_UNCORRECTED_BLOCKS:
+		*((u32*) arg) = ves1820_readreg (frontend->i2c, 0x13) & 0x7f;
+		if (*((u32*) arg) == 0x7f)
+			*((u32*) arg) = 0xffffffff;
+		ves1820_reset_uncorrected_block_counter (frontend->i2c);
+		break;
+
+        case FE_SET_FRONTEND:
+		return ves1820_set_parameters (frontend, arg);
+
+	case FE_GET_FRONTEND:
+		/*  XXX FIXME: implement! */
+/*
+                struct frontend *front = (struct frontend *)arg;
+                
+                front->afc=(int)((char)(readreg(client,0x19)));
+                front->afc=(front->afc*(int)(front->param.u.qam.SymbolRate/8))/128;
+*/
+		break;
+
+	case FE_SLEEP:
+		ves1820_writereg (frontend->i2c, 0x1b, 0x02);  /* pdown ADC */
+		ves1820_writereg (frontend->i2c, 0x00, 0x80);  /* standby */
+		break;
+
+        case FE_INIT:
+                return ves1820_init (frontend);
+
+        case FE_RESET:
+		ves1820_reset (frontend);
+		break;
+
+        default:
+                return -EINVAL;
+        }
+
+        return 0;
+} 
+
+
+static
+int ves1820_attach (struct dvb_i2c_bus *i2c)
+{
+        if ((ves1820_readreg (i2c, 0x1a) & 0xf0) != 0x70)
+                return -ENODEV;
+        
+        dvb_register_frontend (ves1820_ioctl, i2c, NULL, &ves1820_info);
+
+        return 0;
+}
+
+
+static
+void ves1820_detach (struct dvb_i2c_bus *i2c)
+{
+	dvb_unregister_frontend (ves1820_ioctl, i2c);
+}
+
+
+static
+int __init init_ves1820 (void)
+{
+	return dvb_register_i2c_device (THIS_MODULE,
+					ves1820_attach, ves1820_detach);
+}
+
+
+static
+void __exit exit_ves1820 (void)
+{
+	dvb_unregister_i2c_device (ves1820_attach);
+}
+
+
+module_init(init_ves1820);
+module_exit(exit_ves1820);
+
+MODULE_DESCRIPTION("");
+MODULE_AUTHOR("Ralph Metzler");
+MODULE_LICENSE("GPL");
+MODULE_PARM(debug,"i");
+
diff -Nru a/drivers/media/radio/Config.help b/drivers/media/radio/Config.help
--- a/drivers/media/radio/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,274 +0,0 @@
-CONFIG_RADIO_RTRACK
-  Choose Y here if you have one of these FM radio cards, and then fill
-  in the port address below.
-
-  Note that newer AIMSlab RadioTrack cards have a different chipset
-  and are not supported by this driver.  For these cards, use the
-  RadioTrack II driver below.
-
-  If you have a GemTeks combined (PnP) sound- and radio card you must
-  use this driver as a module and setup the card with isapnptools.
-  You must also pass the module a suitable io parameter, 0x248 has
-  been reported to be used by these cards.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.  More
-  information is contained in the file
-  <file:Documentation/video4linux/radiotrack.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-aimslab.o.
-
-CONFIG_RADIO_RTRACK_PORT
-  Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you
-  haven't changed the jumper setting on the card.
-
-CONFIG_RADIO_RTRACK2
-  Choose Y here if you have this FM radio card, and then fill in the
-  port address below.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-rtrack2.o.
-
-CONFIG_RADIO_RTRACK2_PORT
-  Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you
-  haven't changed the jumper setting on the card.
-
-CONFIG_RADIO_AZTECH
-  Choose Y here if you have one of these FM radio cards, and then fill
-  in the port address below.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-aztech.o.
-
-CONFIG_RADIO_AZTECH_PORT
-  Enter either 0x350 or 0x358 here.  The card default is 0x350, if you
-  haven't changed the setting of jumper JP3 on the card.  Removing the
-  jumper sets the card to 0x358.
-
-CONFIG_RADIO_CADET
-  Choose Y here if you have one of these AM/FM radio cards, and then
-  fill in the port address below.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  Further documentation on this driver can be found on the WWW at
-  <http://linux.blackhawke.net/cadet.html>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-cadet.o.
-
-CONFIG_RADIO_SF16FMI
-  Choose Y here if you have one of these FM radio cards.  If you
-  compile the driver into the kernel and your card is not PnP one, you
-  have to add "sf16fm=<io>" to the kernel command line (I/O address is
-  0x284 or 0x384).
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-sf16fmi.o.
-
-CONFIG_RADIO_TYPHOON
-  Choose Y here if you have one of these FM radio cards, and then fill
-  in the port address and the frequency used for muting below.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-typhoon.o.
-
-CONFIG_RADIO_TYPHOON_PROC_FS
-  Say Y here if you want the typhoon radio card driver to write
-  status information (frequency, volume, muted, mute frequency,
-  base address) to /proc/radio-typhoon. The file can be viewed with
-  your favorite pager (i.e. use "more /proc/radio-typhoon" or "less
-  /proc/radio-typhoon" or simply "cat /proc/radio-typhoon").
-
-CONFIG_RADIO_TYPHOON_PORT
-  Enter the I/O port of your Typhoon or EcoRadio radio card.
-
-CONFIG_RADIO_TYPHOON_MUTEFREQ
-  Enter the frequency used for muting the radio. The device is never
-  completely silent. If the volume is just turned down, you can still
-  hear silent voices and music. For that reason, the frequency of the
-  radio device is set to the frequency you can enter here whenever
-  the device is muted. There should be no local radio station at that
-  frequency.
-
-CONFIG_RADIO_ZOLTRIX
-  Choose Y here if you have one of these FM radio cards, and then fill
-  in the port address below.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-zoltrix.o.
-
-CONFIG_RADIO_ZOLTRIX_PORT
-  Enter the I/O port of your Zoltrix radio card.
-
-CONFIG_RADIO_MIROPCM20
-  Choose Y here if you have this FM radio card. You also need to say Y
-  to "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20 radio)" (in "Sound")
-  for this to work.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called miropcm20.o.
-
-CONFIG_RADIO_MIROPCM20_RDS
-  Choose Y here if you want to see RDS/RBDS information like
-  RadioText, Programme Service name, Clock Time and date, Programme
-  TYpe and Traffic Announcement/Programme identification.  You also
-  need to say Y to "miroSOUND PCM20 radio" and devfs!
-
-  It's not possible to read the raw RDS packets from the device, so
-  the driver cant provide an V4L interface for this.  But the
-  availability of RDS is reported over V4L by the basic driver
-  already.  Here RDS can be read from files in /dev/v4l/rds.
-
-  As module the driver will be called miropcm20-rds.o.
-
-CONFIG_RADIO_MAESTRO
-  Say Y here to directly support the on-board radio tuner on the
-  Maestro 2 or 2E sound card.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-maestro.o.
-
-CONFIG_RADIO_MAXIRADIO
-  Choose Y here if you have this radio card.  This card may also be
-  found as Gemtek PCI FM.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-maxiradio.o.
-
-CONFIG_RADIO_GEMTEK
-  Choose Y here if you have this FM radio card, and then fill in the
-  port address below.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-gemtek.o.
-
-CONFIG_RADIO_GEMTEK_PORT
-  Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is
-  0x34c, if you haven't changed the jumper setting on the card. On
-  Sound Vision 16 Gold PnP with FM Radio (ESS1869+FM Gemtek), the I/O
-  port is 0x28c.
-
-CONFIG_RADIO_GEMTEK_PCI
-  Choose Y here if you have this PCI FM radio card.
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video for Linux API.  Information on 
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-gemtek-pci.o.
-
-CONFIG_RADIO_TERRATEC
-  Choose Y here if you have this FM radio card, and then fill in the
-  port address below. (TODO)
-
-  Note: This driver is in its early stages.  Right now volume and
-  frequency control and muting works at least for me, but
-  unfortunately I have not found anybody who wants to use this card
-  with Linux.  So if it is this what YOU are trying to do right now,
-  PLEASE DROP ME A NOTE!!  Rolf Offermanns (rolf@offermanns.de)
-
-  In order to control your radio card, you will need to use programs
-  that are compatible with the Video For Linux API.  Information on
-  this API and pointers to "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called radio-terratec.o.
-
-CONFIG_RADIO_TERRATEC_PORT
-  Fill in the I/O port of your TerraTec FM radio card. If unsure, go
-  with the default.
-
-CONFIG_RADIO_TRUST
-  This is a driver for the Trust FM radio cards. Say Y if you have
-  such a card and want to use it under Linux.
-
-  This driver is also available as a module called radio-trust.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_RADIO_TRUST_PORT
-  Enter the I/O port of your Trust FM radio card. If unsure, try the
-  values "0x350" or "0x358".
-
diff -Nru a/drivers/media/radio/Config.in b/drivers/media/radio/Config.in
--- a/drivers/media/radio/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,57 +0,0 @@
-#
-# Multimedia Video device configuration
-#
-mainmenu_option next_comment
-comment 'Radio Adapters'
-
-if [ "$CONFIG_ISA" = "y" ]; then
-dep_tristate '  ADS Cadet AM/FM Tuner' CONFIG_RADIO_CADET $CONFIG_VIDEO_DEV
-dep_tristate '  AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_RTRACK" = "y" ]; then
-   hex '  RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 20f
-fi
-dep_tristate '  AIMSlab RadioTrack II support' CONFIG_RADIO_RTRACK2 $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_RTRACK2" = "y" ]; then
-   hex '    RadioTrack II i/o port (0x20c or 0x30c)' CONFIG_RADIO_RTRACK2_PORT 30c
-fi
-dep_tristate '  Aztech/Packard Bell Radio' CONFIG_RADIO_AZTECH $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_AZTECH" = "y" ]; then
-   hex '    Aztech/Packard Bell I/O port (0x350 or 0x358)' CONFIG_RADIO_AZTECH_PORT 350
-fi
-dep_tristate '  GemTek Radio Card support' CONFIG_RADIO_GEMTEK $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_GEMTEK" = "y" ]; then
-   hex '    GemTek i/o port (0x20c, 0x30c, 0x24c or 0x34c)' CONFIG_RADIO_GEMTEK_PORT 34c
-fi
-fi
-dep_tristate '  GemTek PCI Radio Card support' CONFIG_RADIO_GEMTEK_PCI $CONFIG_VIDEO_DEV $CONFIG_PCI
-dep_tristate '  Guillemot MAXI Radio FM 2000 radio' CONFIG_RADIO_MAXIRADIO $CONFIG_VIDEO_DEV
-dep_tristate '  Maestro on board radio' CONFIG_RADIO_MAESTRO $CONFIG_VIDEO_DEV
-if [ "$CONFIG_ISA" = "y" ]; then
-dep_tristate '  miroSOUND PCM20 radio' CONFIG_RADIO_MIROPCM20 $CONFIG_VIDEO_DEV $CONFIG_SOUND_ACI_MIXER
-dep_tristate '    miroSOUND PCM20 radio RDS user interface (EXPERIMENTAL)' CONFIG_RADIO_MIROPCM20_RDS $CONFIG_RADIO_MIROPCM20 $CONFIG_EXPERIMENTAL
-dep_tristate '  SF16FMI Radio' CONFIG_RADIO_SF16FMI $CONFIG_VIDEO_DEV
-dep_tristate '  TerraTec ActiveRadio ISA Standalone' CONFIG_RADIO_TERRATEC $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_TERRATEC" = "y" ]; then
-   hex '    Terratec i/o port (normally 0x590)' CONFIG_RADIO_TERRATEC_PORT 590
-fi
-dep_tristate '  Trust FM radio card' CONFIG_RADIO_TRUST $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_TRUST" = "y" ]; then
-   hex '    Trust i/o port (usually 0x350 or 0x358)' CONFIG_RADIO_TRUST_PORT 350
-fi
-dep_tristate '  Typhoon Radio (a.k.a. EcoRadio)' CONFIG_RADIO_TYPHOON $CONFIG_VIDEO_DEV
-if [ "$CONFIG_PROC_FS" = "y" ]; then
-   if [ "$CONFIG_RADIO_TYPHOON" != "n" ]; then
-      bool '    Support for /proc/radio-typhoon' CONFIG_RADIO_TYPHOON_PROC_FS
-   fi
-fi
-if [ "$CONFIG_RADIO_TYPHOON" = "y" ]; then
-   hex '  Typhoon I/O port (0x316 or 0x336)' CONFIG_RADIO_TYPHOON_PORT 316
-   int '  Typhoon frequency set when muting the device (kHz)' CONFIG_RADIO_TYPHOON_MUTEFREQ 87500
-fi
-dep_tristate '  Zoltrix Radio' CONFIG_RADIO_ZOLTRIX $CONFIG_VIDEO_DEV
-if [ "$CONFIG_RADIO_ZOLTRIX" = "y" ]; then
-   hex '    ZOLTRIX I/O port (0x20c or 0x30c)' CONFIG_RADIO_ZOLTRIX_PORT 20c
-fi
-fi
-
-endmenu
diff -Nru a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/radio/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,367 @@
+#
+# Multimedia Video device configuration
+#
+
+menu "Radio Adapters"
+	depends on VIDEO_DEV!=n
+
+config RADIO_CADET
+	tristate "ADS Cadet AM/FM Tuner"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have one of these AM/FM radio cards, and then
+	  fill in the port address below.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  Further documentation on this driver can be found on the WWW at
+	  <http://linux.blackhawke.net/cadet.html>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-cadet.o.
+
+config RADIO_RTRACK
+	tristate "AIMSlab RadioTrack (aka RadioReveal) support"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have one of these FM radio cards, and then fill
+	  in the port address below.
+
+	  Note that newer AIMSlab RadioTrack cards have a different chipset
+	  and are not supported by this driver.  For these cards, use the
+	  RadioTrack II driver below.
+
+	  If you have a GemTeks combined (PnP) sound- and radio card you must
+	  use this driver as a module and setup the card with isapnptools.
+	  You must also pass the module a suitable io parameter, 0x248 has
+	  been reported to be used by these cards.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.  More
+	  information is contained in the file
+	  <file:Documentation/video4linux/radiotrack.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-aimslab.o.
+
+config RADIO_RTRACK_PORT
+	hex "RadioTrack i/o port (0x20f or 0x30f)"
+	depends on RADIO_RTRACK=y
+	default "20f"
+	help
+	  Enter either 0x30f or 0x20f here.  The card default is 0x30f, if you
+	  haven't changed the jumper setting on the card.
+
+config RADIO_RTRACK2
+	tristate "AIMSlab RadioTrack II support"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have this FM radio card, and then fill in the
+	  port address below.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-rtrack2.o.
+
+config RADIO_RTRACK2_PORT
+	hex "RadioTrack II i/o port (0x20c or 0x30c)"
+	depends on RADIO_RTRACK2=y
+	default "30c"
+	help
+	  Enter either 0x30c or 0x20c here.  The card default is 0x30c, if you
+	  haven't changed the jumper setting on the card.
+
+config RADIO_AZTECH
+	tristate "Aztech/Packard Bell Radio"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have one of these FM radio cards, and then fill
+	  in the port address below.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-aztech.o.
+
+config RADIO_AZTECH_PORT
+	hex "Aztech/Packard Bell I/O port (0x350 or 0x358)"
+	depends on RADIO_AZTECH=y
+	default "350"
+	help
+	  Enter either 0x350 or 0x358 here.  The card default is 0x350, if you
+	  haven't changed the setting of jumper JP3 on the card.  Removing the
+	  jumper sets the card to 0x358.
+
+config RADIO_GEMTEK
+	tristate "GemTek Radio Card support"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have this FM radio card, and then fill in the
+	  port address below.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-gemtek.o.
+
+config RADIO_GEMTEK_PORT
+	hex "GemTek i/o port (0x20c, 0x30c, 0x24c or 0x34c)"
+	depends on RADIO_GEMTEK=y
+	default "34c"
+	help
+	  Enter either 0x20c, 0x30c, 0x24c or 0x34c here. The card default is
+	  0x34c, if you haven't changed the jumper setting on the card. On
+	  Sound Vision 16 Gold PnP with FM Radio (ESS1869+FM Gemtek), the I/O
+	  port is 0x28c.
+
+config RADIO_GEMTEK_PCI
+	tristate "GemTek PCI Radio Card support"
+	depends on VIDEO_DEV && PCI
+	---help---
+	  Choose Y here if you have this PCI FM radio card.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video for Linux API.  Information on 
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-gemtek-pci.o.
+
+config RADIO_MAXIRADIO
+	tristate "Guillemot MAXI Radio FM 2000 radio"
+	depends on VIDEO_DEV
+	---help---
+	  Choose Y here if you have this radio card.  This card may also be
+	  found as Gemtek PCI FM.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-maxiradio.o.
+
+config RADIO_MAESTRO
+	tristate "Maestro on board radio"
+	depends on VIDEO_DEV
+	---help---
+	  Say Y here to directly support the on-board radio tuner on the
+	  Maestro 2 or 2E sound card.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-maestro.o.
+
+config RADIO_MIROPCM20
+	tristate "miroSOUND PCM20 radio"
+	depends on ISA && VIDEO_DEV && SOUND_ACI_MIXER
+	---help---
+	  Choose Y here if you have this FM radio card. You also need to say Y
+	  to "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20 radio)" (in "Sound")
+	  for this to work.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called miropcm20.o.
+
+config RADIO_MIROPCM20_RDS
+	tristate "miroSOUND PCM20 radio RDS user interface (EXPERIMENTAL)"
+	depends on RADIO_MIROPCM20 && EXPERIMENTAL
+	---help---
+	  Choose Y here if you want to see RDS/RBDS information like
+	  RadioText, Programme Service name, Clock Time and date, Programme
+	  TYpe and Traffic Announcement/Programme identification.  You also
+	  need to say Y to "miroSOUND PCM20 radio" and devfs!
+
+	  It's not possible to read the raw RDS packets from the device, so
+	  the driver cant provide an V4L interface for this.  But the
+	  availability of RDS is reported over V4L by the basic driver
+	  already.  Here RDS can be read from files in /dev/v4l/rds.
+
+	  As module the driver will be called miropcm20-rds.o.
+
+config RADIO_SF16FMI
+	tristate "SF16FMI Radio"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have one of these FM radio cards.  If you
+	  compile the driver into the kernel and your card is not PnP one, you
+	  have to add "sf16fm=<io>" to the kernel command line (I/O address is
+	  0x284 or 0x384).
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-sf16fmi.o.
+
+config RADIO_TERRATEC
+	tristate "TerraTec ActiveRadio ISA Standalone"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have this FM radio card, and then fill in the
+	  port address below. (TODO)
+
+	  Note: This driver is in its early stages.  Right now volume and
+	  frequency control and muting works at least for me, but
+	  unfortunately I have not found anybody who wants to use this card
+	  with Linux.  So if it is this what YOU are trying to do right now,
+	  PLEASE DROP ME A NOTE!!  Rolf Offermanns (rolf@offermanns.de)
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-terratec.o.
+
+config RADIO_TERRATEC_PORT
+	hex "Terratec i/o port (normally 0x590)"
+	depends on RADIO_TERRATEC=y
+	default "590"
+	help
+	  Fill in the I/O port of your TerraTec FM radio card. If unsure, go
+	  with the default.
+
+config RADIO_TRUST
+	tristate "Trust FM radio card"
+	depends on ISA && VIDEO_DEV
+	help
+	  This is a driver for the Trust FM radio cards. Say Y if you have
+	  such a card and want to use it under Linux.
+
+	  This driver is also available as a module called radio-trust.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config RADIO_TRUST_PORT
+	hex "Trust i/o port (usually 0x350 or 0x358)"
+	depends on RADIO_TRUST=y
+	default "350"
+	help
+	  Enter the I/O port of your Trust FM radio card. If unsure, try the
+	  values "0x350" or "0x358".
+
+config RADIO_TYPHOON
+	tristate "Typhoon Radio (a.k.a. EcoRadio)"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have one of these FM radio cards, and then fill
+	  in the port address and the frequency used for muting below.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-typhoon.o.
+
+config RADIO_TYPHOON_PROC_FS
+	bool "Support for /proc/radio-typhoon"
+	depends on PROC_FS && RADIO_TYPHOON
+	help
+	  Say Y here if you want the typhoon radio card driver to write
+	  status information (frequency, volume, muted, mute frequency,
+	  base address) to /proc/radio-typhoon. The file can be viewed with
+	  your favorite pager (i.e. use "more /proc/radio-typhoon" or "less
+	  /proc/radio-typhoon" or simply "cat /proc/radio-typhoon").
+
+config RADIO_TYPHOON_PORT
+	hex "Typhoon I/O port (0x316 or 0x336)"
+	depends on RADIO_TYPHOON=y
+	default "316"
+	help
+	  Enter the I/O port of your Typhoon or EcoRadio radio card.
+
+config RADIO_TYPHOON_MUTEFREQ
+	int "Typhoon frequency set when muting the device (kHz)"
+	depends on RADIO_TYPHOON=y
+	default "87500"
+	help
+	  Enter the frequency used for muting the radio. The device is never
+	  completely silent. If the volume is just turned down, you can still
+	  hear silent voices and music. For that reason, the frequency of the
+	  radio device is set to the frequency you can enter here whenever
+	  the device is muted. There should be no local radio station at that
+	  frequency.
+
+config RADIO_ZOLTRIX
+	tristate "Zoltrix Radio"
+	depends on ISA && VIDEO_DEV
+	---help---
+	  Choose Y here if you have one of these FM radio cards, and then fill
+	  in the port address below.
+
+	  In order to control your radio card, you will need to use programs
+	  that are compatible with the Video For Linux API.  Information on
+	  this API and pointers to "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called radio-zoltrix.o.
+
+config RADIO_ZOLTRIX_PORT
+	hex "ZOLTRIX I/O port (0x20c or 0x30c)"
+	depends on RADIO_ZOLTRIX=y
+	default "20c"
+	help
+	  Enter the I/O port of your Zoltrix radio card.
+
+endmenu
+
diff -Nru a/drivers/media/video/Config.help b/drivers/media/video/Config.help
--- a/drivers/media/video/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,153 +0,0 @@
-CONFIG_VIDEO_PROC_FS
-  If you say Y here, you are able to access video device information
-  in /proc/video.
-
-  To use this option, you have to check, that the "/proc file system
-  support" (CONFIG_PROC_FS) is enabled too.
-
-CONFIG_I2C_PARPORT
-  I2C is a simple serial bus system used in many micro controller
-  applications.  Saying Y here will allow you to use your parallel
-  port as an I2C interface.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called i2c-parport.o.
-
-CONFIG_VIDEO_PLANB
-  PlanB is the V4L driver for the PowerMac 7x00/8x00 series video
-  input hardware. If you want to experiment with this, say Y.
-  Otherwise, or if you don't understand a word, say N.
-  See <http://www.cpu.lu/~mlan/planb.html> for more info.
-
-  Saying M will compile this driver as a module (planb.o).
-
-CONFIG_VIDEO_BT848
-  Support for BT848 based frame grabber/overlay boards. This includes
-  the Miro, Hauppauge and STB boards. Please read the material in
-  <file:Documentation/video4linux/bttv> for more information.
-
-  If you say Y or M here, you need to say Y or M to "I2C support" and
-  "I2C bit-banging interfaces" in the character device section.
-
-  This driver is available as a module called bttv.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_VIDEO_VINO
-  Say Y here to build in support for the Vino video input system found
-  on SGI Indy machines.
-
-CONFIG_VIDEO_STRADIS
-  Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video
-  driver for PCI.  There is a product page at
-  <http://www.stradis.com/decoder.html>.
-
-CONFIG_VIDEO_ZORAN
-  Say Y here to include support for video cards based on the Zoran
-  ZR36057/36060 encoder/decoder chip (including the Iomega Buz and the
-  Miro DC10 and DC30 video capture cards).
-
-CONFIG_VIDEO_ZORAN_BUZ
-  Say Y here to include support for the Iomega Buz video card.  There
-  is a Buz/Linux homepage at <http://www.lysator.liu.se/~gz/buz/>.
-
-CONFIG_VIDEO_ZR36120
-  Support for ZR36120/ZR36125 based frame grabber/overlay boards.
-  This includes the Victor II, WaveWatcher, Video Wonder, Maxi-TV,
-  and Buster boards. Please read the material in
-  <file:Documentation/video4linux/zr36120.txt> for more information.
-
-  This driver is also available as a module called zr36120.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_VIDEO_SAA5249
-  Support for I2C bus based teletext using the SAA5249 chip. At the
-  moment this is only useful on some European WinTV cards.
-
-  This driver is also available as a module called saa5249.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_VIDEO_BWQCAM
-  Say Y have if you the black and white version of the QuickCam
-  camera. See the next option for the color version.
-
-  This driver is also available as a module called bw-qcam.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_VIDEO_CQCAM
-  This is the video4linux driver for the colour version of the
-  Connectix QuickCam.  If you have one of these cameras, say Y here,
-  otherwise say N.  This driver does not work with the original
-  monochrome QuickCam, QuickCam VC or QuickClip.  It is also available
-  as a module (c-qcam.o).
-  Read <file:Documentation/video4linux/CQcam.txt> for more information.
-
-CONFIG_VIDEO_W9966
-  Video4linux driver for Winbond's w9966 based Webcams.
-  Currently tested with the LifeView FlyCam Supra.
-  If you have one of these cameras, say Y here
-  otherwise say N.
-  This driver is also available as a module (w9966.o).
-
-  Check out <file:Documentation/video4linux/w9966.txt> for more
-  information.
-
-CONFIG_VIDEO_CPIA
-  This is the video4linux driver for cameras based on Vision's CPiA
-  (Colour Processor Interface ASIC), such as the Creative Labs Video
-  Blaster Webcam II. If you have one of these cameras, say Y here
-  and select parallel port and/or USB lowlevel support below,
-  otherwise say N. This will not work with the Creative Webcam III.
-
-  Please read <file:Documentation/video4linux/README.cpia> for more
-  information.
-
-  This driver is also available as a module (cpia.o).
-
-CONFIG_VIDEO_CPIA_PP
-  This is the lowlevel parallel port support for cameras based on
-  Vision's CPiA (Colour Processor Interface ASIC), such as the
-  Creative Webcam II. If you have the parallel port version of one
-  of these cameras, say Y here, otherwise say N. It is also available
-  as a module (cpia_pp.o).
-
-CONFIG_VIDEO_CPIA_USB
-  This is the lowlevel USB support for cameras based on Vision's CPiA
-  (Colour Processor Interface ASIC), such as the Creative Webcam II.
-  If you have the USB version of one of these cameras, say Y here,
-  otherwise say N. This will not work with the Creative Webcam III.
-  It is also available as a module (cpia_usb.o).
-
-CONFIG_VIDEO_PMS
-  Say Y if you have such a thing.  This driver is also available as a
-  module called pms.o ( = code which can be inserted in and removed
-  from the running kernel whenever you want).  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_VIDEO_MEYE
-  This is the video4linux driver for the Motion Eye camera found
-  in the Vaio Picturebook laptops. Please read the material in
-  <file:Documentation/video4linux/meye.txt> for more information.
-
-  If you say Y or M here, you need to say Y or M to "Sony Programmable
-  I/O Control Device" in the character device section.
-
-  This driver is available as a module called meye.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_TUNER_3036
-  Say Y here to include support for Philips SAB3036 compatible tuners.
-  If in doubt, say N.
-
diff -Nru a/drivers/media/video/Config.in b/drivers/media/video/Config.in
--- a/drivers/media/video/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,54 +0,0 @@
-#
-# Multimedia Video device configuration
-#
-mainmenu_option next_comment
-comment 'Video For Linux'
-
-dep_bool '  V4L information in proc filesystem' CONFIG_VIDEO_PROC_FS $CONFIG_PROC_FS
-
-comment 'Video Adapters'
-if [ "$CONFIG_I2C_ALGOBIT" = "y" -o "$CONFIG_I2C_ALGOBIT" = "m" ]; then
-   dep_tristate '  BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C_ALGOBIT
-fi
-dep_tristate '  Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   dep_tristate '  PlanB Video-In on PowerMac' CONFIG_VIDEO_PLANB $CONFIG_VIDEO_DEV
-fi
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   dep_tristate '  Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '  QuickCam Colour Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
-   fi
-fi
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   if [ "$CONFIG_PARPORT_1284" != "n" ]; then
-      dep_tristate '  W9966CF Webcam (FlyCam Supra and others) Video For Linux' CONFIG_VIDEO_W9966 $CONFIG_VIDEO_DEV $CONFIG_PARPORT
-   fi
-fi
-dep_tristate '  CPiA Video For Linux' CONFIG_VIDEO_CPIA $CONFIG_VIDEO_DEV
-if [ "$CONFIG_VIDEO_CPIA" != "n" ]; then
-  if [ "$CONFIG_PARPORT_1284" != "n" ]; then
-    dep_tristate '    CPiA Parallel Port Lowlevel Support' CONFIG_VIDEO_CPIA_PP $CONFIG_VIDEO_CPIA $CONFIG_PARPORT
-  fi
-  if [ "$CONFIG_USB" != "n" ]; then
-    dep_tristate '    CPiA USB Lowlevel Support' CONFIG_VIDEO_CPIA_USB $CONFIG_VIDEO_CPIA $CONFIG_USB
-  fi
-fi
-dep_tristate '  SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV $CONFIG_I2C
-dep_tristate '  SAB3036 tuner' CONFIG_TUNER_3036 $CONFIG_VIDEO_DEV $CONFIG_I2C
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   if [ "$CONFIG_SGI" = "y" ]; then
-      dep_tristate '  SGI Vino Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_VINO $CONFIG_VIDEO_DEV $CONFIG_SGI
-   fi
-   dep_tristate '  Stradis 4:2:2 MPEG-2 video driver  (EXPERIMENTAL)' CONFIG_VIDEO_STRADIS $CONFIG_VIDEO_DEV $CONFIG_PCI
-fi
-dep_tristate '  Zoran ZR36057/36060 Video For Linux' CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
-dep_tristate '  Iomega Buz support' CONFIG_VIDEO_ZORAN_BUZ $CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
-dep_tristate '  Miro DC10(+) support' CONFIG_VIDEO_ZORAN_DC10 $CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
-dep_tristate '  Linux Media Labs LML33 support' CONFIG_VIDEO_ZORAN_LML33 $CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
-dep_tristate '  Zoran ZR36120/36125 Video For Linux' CONFIG_VIDEO_ZR36120 $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_I2C
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  dep_tristate '  Sony Vaio Picturebook Motion Eye Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_MEYE $CONFIG_VIDEO_DEV $CONFIG_PCI $CONFIG_SONYPI
-fi
-
-endmenu
diff -Nru a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/media/video/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,216 @@
+#
+# Multimedia Video device configuration
+#
+
+menu "Video For Linux"
+	depends on VIDEO_DEV!=n
+
+config VIDEO_PROC_FS
+	bool "V4L information in proc filesystem"
+	depends on PROC_FS
+	help
+	  If you say Y here, you are able to access video device information
+	  in /proc/video.
+
+	  To use this option, you have to check, that the "/proc file system
+	  support" (CONFIG_PROC_FS) is enabled too.
+
+comment "Video Adapters"
+
+config VIDEO_BT848
+	tristate "BT848 Video For Linux"
+	depends on VIDEO_DEV && PCI && I2C_ALGOBIT
+	---help---
+	  Support for BT848 based frame grabber/overlay boards. This includes
+	  the Miro, Hauppauge and STB boards. Please read the material in
+	  <file:Documentation/video4linux/bttv> for more information.
+
+	  If you say Y or M here, you need to say Y or M to "I2C support" and
+	  "I2C bit-banging interfaces" in the character device section.
+
+	  This driver is available as a module called bttv.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config VIDEO_PMS
+	tristate "Mediavision Pro Movie Studio Video For Linux"
+	depends on VIDEO_DEV
+	help
+	  Say Y if you have such a thing.  This driver is also available as a
+	  module called pms.o ( = code which can be inserted in and removed
+	  from the running kernel whenever you want).  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config VIDEO_PLANB
+	tristate "PlanB Video-In on PowerMac"
+	depends on ALL_PPC && VIDEO_DEV
+	help
+	  PlanB is the V4L driver for the PowerMac 7x00/8x00 series video
+	  input hardware. If you want to experiment with this, say Y.
+	  Otherwise, or if you don't understand a word, say N.
+	  See <http://www.cpu.lu/~mlan/planb.html> for more info.
+
+	  Saying M will compile this driver as a module (planb.o).
+
+config VIDEO_BWQCAM
+	tristate "Quickcam BW Video For Linux"
+	depends on VIDEO_DEV && PARPORT
+	help
+	  Say Y have if you the black and white version of the QuickCam
+	  camera. See the next option for the color version.
+
+	  This driver is also available as a module called bw-qcam.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config VIDEO_CQCAM
+	tristate "QuickCam Colour Video For Linux (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && VIDEO_DEV && PARPORT
+	help
+	  This is the video4linux driver for the colour version of the
+	  Connectix QuickCam.  If you have one of these cameras, say Y here,
+	  otherwise say N.  This driver does not work with the original
+	  monochrome QuickCam, QuickCam VC or QuickClip.  It is also available
+	  as a module (c-qcam.o).
+	  Read <file:Documentation/video4linux/CQcam.txt> for more information.
+
+config VIDEO_W9966
+	tristate "W9966CF Webcam (FlyCam Supra and others) Video For Linux"
+	depends on PARPORT_1284 && VIDEO_DEV && PARPORT
+	help
+	  Video4linux driver for Winbond's w9966 based Webcams.
+	  Currently tested with the LifeView FlyCam Supra.
+	  If you have one of these cameras, say Y here
+	  otherwise say N.
+	  This driver is also available as a module (w9966.o).
+
+	  Check out <file:Documentation/video4linux/w9966.txt> for more
+	  information.
+
+config VIDEO_CPIA
+	tristate "CPiA Video For Linux"
+	depends on VIDEO_DEV
+	---help---
+	  This is the video4linux driver for cameras based on Vision's CPiA
+	  (Colour Processor Interface ASIC), such as the Creative Labs Video
+	  Blaster Webcam II. If you have one of these cameras, say Y here
+	  and select parallel port and/or USB lowlevel support below,
+	  otherwise say N. This will not work with the Creative Webcam III.
+
+	  Please read <file:Documentation/video4linux/README.cpia> for more
+	  information.
+
+	  This driver is also available as a module (cpia.o).
+
+config VIDEO_CPIA_PP
+	tristate "CPiA Parallel Port Lowlevel Support"
+	depends on PARPORT_1284 && VIDEO_CPIA && PARPORT
+	help
+	  This is the lowlevel parallel port support for cameras based on
+	  Vision's CPiA (Colour Processor Interface ASIC), such as the
+	  Creative Webcam II. If you have the parallel port version of one
+	  of these cameras, say Y here, otherwise say N. It is also available
+	  as a module (cpia_pp.o).
+
+config VIDEO_CPIA_USB
+	tristate "CPiA USB Lowlevel Support"
+	depends on VIDEO_CPIA && USB
+	help
+	  This is the lowlevel USB support for cameras based on Vision's CPiA
+	  (Colour Processor Interface ASIC), such as the Creative Webcam II.
+	  If you have the USB version of one of these cameras, say Y here,
+	  otherwise say N. This will not work with the Creative Webcam III.
+	  It is also available as a module (cpia_usb.o).
+
+config VIDEO_SAA5249
+	tristate "SAA5249 Teletext processor"
+	depends on VIDEO_DEV && I2C
+	help
+	  Support for I2C bus based teletext using the SAA5249 chip. At the
+	  moment this is only useful on some European WinTV cards.
+
+	  This driver is also available as a module called saa5249.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config TUNER_3036
+	tristate "SAB3036 tuner"
+	depends on VIDEO_DEV && I2C
+	help
+	  Say Y here to include support for Philips SAB3036 compatible tuners.
+	  If in doubt, say N.
+
+config VIDEO_VINO
+	tristate "SGI Vino Video For Linux (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && VIDEO_DEV && SGI
+	help
+	  Say Y here to build in support for the Vino video input system found
+	  on SGI Indy machines.
+
+config VIDEO_STRADIS
+	tristate "Stradis 4:2:2 MPEG-2 video driver  (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && VIDEO_DEV && PCI
+	help
+	  Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video
+	  driver for PCI.  There is a product page at
+	  <http://www.stradis.com/decoder.html>.
+
+config VIDEO_ZORAN
+	tristate "Zoran ZR36057/36060 Video For Linux"
+	depends on VIDEO_DEV && PCI && I2C
+	help
+	  Say Y here to include support for video cards based on the Zoran
+	  ZR36057/36060 encoder/decoder chip (including the Iomega Buz and the
+	  Miro DC10 and DC30 video capture cards).
+
+config VIDEO_ZORAN_BUZ
+	tristate "Iomega Buz support"
+	depends on VIDEO_ZORAN
+	help
+	  Say Y here to include support for the Iomega Buz video card.  There
+	  is a Buz/Linux homepage at <http://www.lysator.liu.se/~gz/buz/>.
+
+config VIDEO_ZORAN_DC10
+	tristate "Miro DC10(+) support"
+	depends on VIDEO_ZORAN
+
+config VIDEO_ZORAN_LML33
+	tristate "Linux Media Labs LML33 support"
+	depends on VIDEO_ZORAN
+
+config VIDEO_ZR36120
+	tristate "Zoran ZR36120/36125 Video For Linux"
+	depends on VIDEO_DEV && PCI && I2C
+	help
+	  Support for ZR36120/ZR36125 based frame grabber/overlay boards.
+	  This includes the Victor II, WaveWatcher, Video Wonder, Maxi-TV,
+	  and Buster boards. Please read the material in
+	  <file:Documentation/video4linux/zr36120.txt> for more information.
+
+	  This driver is also available as a module called zr36120.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config VIDEO_MEYE
+	tristate "Sony Vaio Picturebook Motion Eye Video For Linux (EXPERIMENTAL)"
+	depends on VIDEO_DEV && SONYPI
+	---help---
+	  This is the video4linux driver for the Motion Eye camera found
+	  in the Vaio Picturebook laptops. Please read the material in
+	  <file:Documentation/video4linux/meye.txt> for more information.
+
+	  If you say Y or M here, you need to say Y or M to "Sony Programmable
+	  I/O Control Device" in the character device section.
+
+	  This driver is available as a module called meye.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+endmenu
+
diff -Nru a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c
--- a/drivers/media/video/adv7175.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/media/video/adv7175.c	Wed Oct 30 16:44:33 2002
@@ -45,7 +45,7 @@
 #include <linux/version.h>
 #include <asm/uaccess.h>
 
-#include <linux/i2c-old.h>
+#include <linux/i2c.h>
 
 #include <linux/video_encoder.h>
 
@@ -55,28 +55,15 @@
 #define DEBUG(x...)
 #endif
 
-/* ----------------------------------------------------------------------- */
-
-struct adv7175 {
-	struct i2c_bus *bus;
-	int addr;
-	unsigned char reg[128];
-
-	int norm;
-	int input;
-	int enable;
-	int bright;
-	int contrast;
-	int hue;
-	int sat;
-};
+#define I2C_ADV7175	0xd4
+#define I2C_ADV7176	0x54
 
-#define   I2C_ADV7175        0xd4
-#define   I2C_ADV7176        0x54
+#define IF_NAME		"adv7175"
 
 static char adv7175_name[] = "adv7175";
 static char adv7176_name[] = "adv7176";
 static char unknown_name[] = "UNKNOWN";
+char *dname;
 
 #if (DEBUGLEVEL > 0)
 static char *inputs[] = { "pass_through", "play_back", "color_bar" };
@@ -85,64 +72,34 @@
 
 #define I2C_DELAY   10
 
-/* ----------------------------------------------------------------------- */
-
-static int adv7175_write(struct adv7175 *dev, unsigned char subaddr, unsigned char data)
-{
-	int ack;
-
-	LOCK_I2C_BUS(dev->bus);
-
-	i2c_start(dev->bus);
-	i2c_sendbyte(dev->bus, dev->addr, I2C_DELAY);
-	i2c_sendbyte(dev->bus, subaddr, I2C_DELAY);
-	ack = i2c_sendbyte(dev->bus, data, I2C_DELAY);
-	dev->reg[subaddr] = data;
-	i2c_stop(dev->bus);
-	UNLOCK_I2C_BUS(dev->bus);
-	return ack;
-}
-
-static unsigned char adv7175_read(struct adv7175 *dev, unsigned char subaddr)
-{
-	unsigned char data;
+static unsigned short normal_i2c[] = {I2C_ADV7175, I2C_CLIENT_END};
+static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
+static unsigned short probe[2] = {I2C_CLIENT_END, I2C_CLIENT_END};
+static unsigned short probe_range[2] = {I2C_CLIENT_END, I2C_CLIENT_END};
+static unsigned short ignore[2] = {I2C_CLIENT_END, I2C_CLIENT_END};
+static unsigned short ignore_range[2] = {I2C_CLIENT_END, I2C_CLIENT_END};
+static unsigned short force[2] = {I2C_CLIENT_END, I2C_CLIENT_END};
+
+static struct i2c_client_address_data addr_data = {
+						normal_i2c, normal_i2c_range,
+						probe, probe_range,
+						ignore, ignore_range,
+						force};
+static struct i2c_client client_template;
 
-	LOCK_I2C_BUS(dev->bus);
-
-	i2c_start(dev->bus);
-	i2c_sendbyte(dev->bus, dev->addr, I2C_DELAY);
-	i2c_sendbyte(dev->bus, subaddr, I2C_DELAY);
-	i2c_sendbyte(dev->bus, dev->addr + 1, I2C_DELAY);
-	data = i2c_readbyte(dev->bus, 1);
-	dev->reg[subaddr] = data;
-	i2c_stop(dev->bus);
-	UNLOCK_I2C_BUS(dev->bus);
-	return data;
-}
-
-static int adv7175_write_block(struct adv7175 *dev,
-			       unsigned const char *data, unsigned int len)
-{
-	int ack = 0;
-	unsigned subaddr;
-
-	while (len > 1) {
-		LOCK_I2C_BUS(dev->bus);
-		i2c_start(dev->bus);
-		i2c_sendbyte(dev->bus, dev->addr, I2C_DELAY);
-		ack = i2c_sendbyte(dev->bus, (subaddr = *data++), I2C_DELAY);
-		ack = i2c_sendbyte(dev->bus, (dev->reg[subaddr] = *data++), I2C_DELAY);
-		len -= 2;
-		while (len > 1 && *data == ++subaddr) {
-			data++;
-			ack = i2c_sendbyte(dev->bus, (dev->reg[subaddr] = *data++), I2C_DELAY);
-			len -= 2;
-		}
-		i2c_stop(dev->bus);
-		UNLOCK_I2C_BUS(dev->bus);
-	}
-	return ack;
-}
+struct adv7175 {
+	struct i2c_client 	*client;
+	int 			addr;
+	unsigned char 		reg[128];
+	struct semaphore	lock;
+	int 			norm;
+	int 			input;
+	int 			enable;
+	int 			bright;
+	int 			contrast;
+	int 			hue;
+	int 			sat;
+};
 
 /* ----------------------------------------------------------------------- */
 // Output filter:  S-Video  Composite
@@ -203,65 +160,87 @@
 	0x06, 0x1a,		/* subc. phase */
 };
 
-static int adv7175_attach(struct i2c_device *device)
+static int adv717x_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
 {
-	int i;
 	struct adv7175 *encoder;
-	char *dname;
+	struct	i2c_client	*client;
+	int rv, i, x_common=39; /* x is number entries init_common - 1 */
 
-	MOD_INC_USE_COUNT;
+	printk(KERN_INFO "adv717x: video chip found.\n");
+	client=kmalloc(sizeof(*client), GFP_KERNEL);
+	if(client == NULL)
+		return -ENOMEM;
+
+	client_template.adapter = adap;
+	client_template.addr = addr;
+	memcpy(client, &client_template, sizeof(*client));
 
-	device->data = encoder = kmalloc(sizeof(struct adv7175), GFP_KERNEL);
+	encoder = kmalloc(sizeof(*encoder), GFP_KERNEL);
 	if (encoder == NULL) {
-		MOD_DEC_USE_COUNT;
+		kfree(client);
 		return -ENOMEM;
 	}
 
-
-	memset(encoder, 0, sizeof(struct adv7175));
-	if ((device->addr == I2C_ADV7175) || (device->addr == (I2C_ADV7175 + 2))) {
+	memset(encoder, 0, sizeof(*encoder));
+	if ((encoder->addr == I2C_ADV7175) || (encoder->addr == (I2C_ADV7175 + 2))) {
 		dname = adv7175_name;
-	} else if ((device->addr == I2C_ADV7176) || (device->addr == (I2C_ADV7176 + 2))) {
+	} else if ((encoder->addr == I2C_ADV7176) || (encoder->addr == (I2C_ADV7176 + 2))) {
 		dname = adv7176_name;
 	} else {
 		// We should never get here!!!
 		dname = unknown_name;
 	}
-	strcpy(device->name, dname);
-	encoder->bus = device->bus;
-	encoder->addr = device->addr;
+	strcpy(client->name, dname);
+	init_MUTEX(&encoder->lock);
+	encoder->client = client;
+	encoder->addr = addr;
 	encoder->norm = VIDEO_MODE_PAL;
 	encoder->input = 0;
 	encoder->enable = 1;
 
-	i = adv7175_write_block(encoder, init_common, sizeof(init_common));
-	if (i >= 0) {
-		i = adv7175_write(encoder, 0x07, TR0MODE | TR0RST);
-		i = adv7175_write(encoder, 0x07, TR0MODE);
-		i = adv7175_read(encoder, 0x12);
-		printk(KERN_INFO "%s_attach: %s rev. %d at 0x%02x\n",
-		       device->name, dname, i & 1, device->addr);
+	for (i=1; i<x_common; i++) {
+		rv = i2c_smbus_write_byte(client,init_common[i]);
+		if (rv < 0) {
+			printk(KERN_ERR "%s_attach: init error %d\n", client->name, rv);
+			break;
+		}
 	}
-	if (i < 0) {
-		printk(KERN_ERR "%s_attach: init error %d\n", device->name,
-		       i);
+
+	if (rv >= 0) {
+		i2c_smbus_write_byte_data(client,0x07, TR0MODE | TR0RST);
+		i2c_smbus_write_byte_data(client,0x07, TR0MODE);
+		i2c_smbus_read_byte_data(client,0x12);
+		printk(KERN_INFO "%s_attach: %s rev. %d at 0x%02x\n",
+		       client->name, dname, rv & 1, client->addr);
 	}
 
+	i2c_attach_client(client);
+
 	return 0;
 }
 
+static
+int adv717x_probe(struct i2c_adapter *adap)
+{
+	return i2c_probe(adap, &addr_data, adv717x_attach);
+}
+
 
-static int adv7175_detach(struct i2c_device *device)
+static int adv717x_detach(struct i2c_client *client)
 {
-	kfree(device->data);
-	MOD_DEC_USE_COUNT;
+	i2c_detach_client(client);
+	kfree(client->data);
+	kfree(client);
 	return 0;
 }
 
-static int adv7175_command(struct i2c_device *device, unsigned int cmd,
+static int adv717x_command(struct i2c_client *client, unsigned int cmd,
 			   void *arg)
 {
-	struct adv7175 *encoder = device->data;
+	struct adv7175 *encoder = client->data;
+	int i, x_ntsc=13, x_pal=13; 
+		/* x_ntsc is number of entries in init_ntsc -1 */
+		/* x_pal is number of entries in init_pal -1 */
 
 	switch (cmd) {
 
@@ -286,29 +265,21 @@
 				switch (iarg) {
 
 				case VIDEO_MODE_NTSC:
-					adv7175_write_block(encoder,
-							    init_ntsc,
-							    sizeof
-							    (init_ntsc));
+					for (i=1; i< x_ntsc; i++)
+						i2c_smbus_write_byte(client, init_ntsc[i]);
 					if (encoder->input == 0)
-						adv7175_write(encoder, 0x0d, 0x4f);	// Enable genlock
-					adv7175_write(encoder, 0x07,
-						      TR0MODE | TR0RST);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE);
+						i2c_smbus_write_byte_data(client,0x0d, 0x4f); // Enable genlock
+					i2c_smbus_write_byte_data(client,0x07, TR0MODE | TR0RST);
+					i2c_smbus_write_byte_data(client,0x07, TR0MODE);
 					break;
 
 				case VIDEO_MODE_PAL:
-					adv7175_write_block(encoder,
-							    init_pal,
-							    sizeof
-							    (init_pal));
+					for (i=1; i< x_pal; i++)
+						i2c_smbus_write_byte(client, init_pal[i]);
 					if (encoder->input == 0)
-						adv7175_write(encoder, 0x0d, 0x4f);	// Enable genlock
-					adv7175_write(encoder, 0x07,
-						      TR0MODE | TR0RST);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE);
+						i2c_smbus_write_byte_data(client,0x0d, 0x4f); // Enable genlock
+					i2c_smbus_write_byte_data(client,0x07, TR0MODE | TR0RST);
+					i2c_smbus_write_byte_data(client,0x07, TR0MODE);
 					break;
 
 				case VIDEO_MODE_SECAM:	// WARNING! ADV7176 does not support SECAM.
@@ -316,27 +287,23 @@
 					// it does not work due to genlock: when decoder
 					// is in SECAM and encoder in in PAL the subcarrier
 					// can not be syncronized with horizontal frequency)
-					adv7175_write_block(encoder,
-							    init_pal,
-							    sizeof
-							    (init_pal));
+					for (i=1; i< x_pal; i++)
+						i2c_smbus_write_byte(client, init_pal[i]);
 					if (encoder->input == 0)
-						adv7175_write(encoder, 0x0d, 0x49);	// Disable genlock
-					adv7175_write(encoder, 0x07,
-						      TR0MODE | TR0RST);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE);
+						i2c_smbus_write_byte_data(client,0x0d, 0x49); // Disable genlock
+					i2c_smbus_write_byte_data(client,0x07, TR0MODE | TR0RST);
+					i2c_smbus_write_byte_data(client,0x07, TR0MODE);
 					break;
 				default:
 					printk(KERN_ERR
 					       "%s: illegal norm: %d\n",
-					       device->name, iarg);
+					       client->name, iarg);
 					return -EINVAL;
 
 				}
 				DEBUG(printk
 				      (KERN_INFO "%s: switched to %s\n",
-				       device->name, norms[iarg]));
+				       client->name, norms[iarg]));
 				encoder->norm = iarg;
 			}
 		}
@@ -354,51 +321,45 @@
 				switch (iarg) {
 
 				case 0:
-					adv7175_write(encoder, 0x01, 0x00);
-					adv7175_write(encoder, 0x0c, TR1CAPT);	/* TR1 */
+					i2c_smbus_write_byte_data(client, 0x01, 0x00);
+					i2c_smbus_write_byte_data(client, 0x0c, TR1CAPT);	/* TR1 */
 					if (encoder->norm ==
 					    VIDEO_MODE_SECAM)
-						adv7175_write(encoder, 0x0d, 0x49);	// Disable genlock
+						i2c_smbus_write_byte_data(client, 0x0d, 0x49);	// Disable genlock
 					else
-						adv7175_write(encoder, 0x0d, 0x4f);	// Enable genlock
-					adv7175_write(encoder, 0x07,
-						      TR0MODE | TR0RST);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE);
+						i2c_smbus_write_byte_data(client, 0x0d, 0x4f);	// Enable genlock
+					i2c_smbus_write_byte_data(client, 0x07, TR0MODE | TR0RST);
+					i2c_smbus_write_byte_data(client, 0x07, TR0MODE);
 					//udelay(10);
 					break;
 
 				case 1:
-					adv7175_write(encoder, 0x01, 0x00);
-					adv7175_write(encoder, 0x0c, TR1PLAY);	/* TR1 */
-					adv7175_write(encoder, 0x0d, 0x49);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE | TR0RST);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE);
+					i2c_smbus_write_byte_data(client, 0x01, 0x00);
+					i2c_smbus_write_byte_data(client, 0x0c, TR1PLAY);	/* TR1 */
+					i2c_smbus_write_byte_data(client, 0x0d, 0x49);
+					i2c_smbus_write_byte_data(client, 0x07, TR0MODE | TR0RST);
+					i2c_smbus_write_byte_data(client, 0x07, TR0MODE);
 					//udelay(10);
 					break;
 
 				case 2:
-					adv7175_write(encoder, 0x01, 0x80);
-					adv7175_write(encoder, 0x0d, 0x49);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE | TR0RST);
-					adv7175_write(encoder, 0x07,
-						      TR0MODE);
+					i2c_smbus_write_byte_data(client, 0x01, 0x80);
+					i2c_smbus_write_byte_data(client, 0x0d, 0x49);
+					i2c_smbus_write_byte_data(client, 0x07, TR0MODE | TR0RST);
+					i2c_smbus_write_byte_data(client, 0x07, TR0MODE);
 					//udelay(10);
 					break;
 
 				default:
 					printk(KERN_ERR
 					       "%s: illegal input: %d\n",
-					       device->name, iarg);
+					       client->name, iarg);
 					return -EINVAL;
 
 				}
 				DEBUG(printk
 				      (KERN_INFO "%s: switched to %s\n",
-				       device->name, inputs[iarg]));
+				       client->name, inputs[iarg]));
 				encoder->input = iarg;
 			}
 		}
@@ -420,7 +381,7 @@
 			int *iarg = arg;
 
 			encoder->enable = !!*iarg;
-			adv7175_write(encoder, 0x61,
+			i2c_smbus_write_byte_data(client, 0x61,
 				      (encoder->
 				       reg[0x61] & 0xbf) | (encoder->
 							    enable ? 0x00 :
@@ -435,42 +396,60 @@
 	return 0;
 }
 
+static void adv717x_inc_use(struct i2c_client *client)
+{
+	MOD_INC_USE_COUNT;
+}
+
+static void adv717x_dec_use(struct i2c_client *client)
+{
+	MOD_DEC_USE_COUNT;
+}
+
+
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_adv7175 = {
-	"adv7175",		/* name */
-	I2C_DRIVERID_VIDEOENCODER,	/* ID */
-	I2C_ADV7175, I2C_ADV7175 + 3,
-
-	adv7175_attach,
-	adv7175_detach,
-	adv7175_command
+	name:		"adv7175",		/* name */
+	id:		I2C_DRIVERID_ADV717x,	/* ID */
+	flags:		I2C_DF_NOTIFY, //I2C_ADV7175, I2C_ADV7175 + 3,
+	attach_adapter:	adv717x_probe,
+	detach_client:	adv717x_detach,
+	command:	adv717x_command,
+	inc_use:	&adv717x_inc_use,
+	dec_use:	&adv717x_dec_use
 };
 
 static struct i2c_driver i2c_driver_adv7176 = {
-	"adv7175",		/* name */
-	I2C_DRIVERID_VIDEOENCODER,	/* ID */
-	I2C_ADV7176, I2C_ADV7176 + 3,
-
-	adv7175_attach,
-	adv7175_detach,
-	adv7175_command
+	name:		"adv7176",		/* name */
+	id:		I2C_DRIVERID_ADV717x,	/* ID */
+	flags:		I2C_DF_NOTIFY, //I2C_ADV7176, I2C_ADV7176 + 3,
+	attach_adapter:	adv717x_probe,
+	detach_client:	adv717x_detach,
+	command:	adv717x_command,
+	inc_use:	&adv717x_inc_use,
+	dec_use:	&adv717x_dec_use
+};
+
+static struct i2c_client client_template = {
+	name:		"adv7175_client",
+	driver:		&i2c_driver_adv7175
 };
 
-static int adv7175_init(void)
+static int adv717x_init(void)
 {
 	int res_adv7175 = 0, res_adv7176 = 0;
-	res_adv7175 = i2c_register_driver(&i2c_driver_adv7175);
-	res_adv7176 = i2c_register_driver(&i2c_driver_adv7176);
+	res_adv7175 = i2c_add_driver(&i2c_driver_adv7175);
+	res_adv7176 = i2c_add_driver(&i2c_driver_adv7176);
 	return (res_adv7175 | res_adv7176);	// Any idea how to make it better?
 }
 
-static void adv7175_exit(void)
+static void adv717x_exit(void)
 {
-	i2c_unregister_driver(&i2c_driver_adv7176);
-	i2c_unregister_driver(&i2c_driver_adv7175);
+	i2c_del_driver(&i2c_driver_adv7176);
+	i2c_del_driver(&i2c_driver_adv7175);
 }
 
-module_init(adv7175_init);
-module_exit(adv7175_exit);
+module_init(adv717x_init);
+module_exit(adv717x_exit);
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c
--- a/drivers/media/video/cpia.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/media/video/cpia.c	Wed Oct 30 16:44:30 2002
@@ -6,6 +6,7 @@
  * (C) Copyright 1999-2000 Peter Pregler
  * (C) Copyright 1999-2000 Scott J. Bertin
  * (C) Copyright 1999-2000 Johannes Erdfelt <johannes@erdfelt.com>
+ * (C) Copyright 2000 STMicroelectronics
  *
  * 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
@@ -30,7 +31,6 @@
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/vmalloc.h>
-#include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/proc_fs.h>
 #include <linux/ctype.h>
@@ -101,6 +101,7 @@
 #define CPIA_COMMAND_I2CRead		(INPUT | CPIA_MODULE_SYSTEM | 13)
 
 #define CPIA_COMMAND_GetVPVersion	(INPUT | CPIA_MODULE_VP_CTRL | 1)
+#define CPIA_COMMAND_ResetFrameCounter	(INPUT | CPIA_MODULE_VP_CTRL | 2)
 #define CPIA_COMMAND_SetColourParams	(OUTPUT | CPIA_MODULE_VP_CTRL | 3)
 #define CPIA_COMMAND_SetExposure	(OUTPUT | CPIA_MODULE_VP_CTRL | 4)
 #define CPIA_COMMAND_SetColourBalance	(OUTPUT | CPIA_MODULE_VP_CTRL | 6)
@@ -131,6 +132,7 @@
 #define CPIA_COMMAND_SetYUVThresh	(OUTPUT | CPIA_MODULE_CAPTURE | 12)
 #define CPIA_COMMAND_SetCompressionParams (OUTPUT | CPIA_MODULE_CAPTURE | 13)
 #define CPIA_COMMAND_DiscardFrame	(OUTPUT | CPIA_MODULE_CAPTURE | 14)
+#define CPIA_COMMAND_GrabReset		(OUTPUT | CPIA_MODULE_CAPTURE | 15)
 
 #define CPIA_COMMAND_OutputRS232	(OUTPUT | CPIA_MODULE_DEBUG | 1)
 #define CPIA_COMMAND_AbortProcess	(OUTPUT | CPIA_MODULE_DEBUG | 4)
@@ -139,6 +141,7 @@
 #define CPIA_COMMAND_StartDummyDtream	(OUTPUT | CPIA_MODULE_DEBUG | 8)
 #define CPIA_COMMAND_AbortStream	(OUTPUT | CPIA_MODULE_DEBUG | 9)
 #define CPIA_COMMAND_DownloadDRAM	(OUTPUT | CPIA_MODULE_DEBUG | 10)
+#define CPIA_COMMAND_Null		(OUTPUT | CPIA_MODULE_DEBUG | 11)
 
 enum {
 	FRAME_READY,		/* Ready to grab into */
@@ -164,6 +167,25 @@
 #define COMMAND_SETFLICKERCTRL		0x2000
 #define COMMAND_SETVLOFFSET		0x4000
 #define COMMAND_SETLIGHTS		0x8000
+
+#define ROUND_UP_EXP_FOR_FLICKER 15
+
+/* Constants for automatic frame rate adjustment */
+#define MAX_EXP       302
+#define MAX_EXP_102   255
+#define LOW_EXP       140
+#define VERY_LOW_EXP   70
+#define TC             94
+#define	EXP_ACC_DARK   50
+#define	EXP_ACC_LIGHT  90
+#define HIGH_COMP_102 160		
+#define MAX_COMP      239		
+#define DARK_TIME       3
+#define LIGHT_TIME      3
+
+/* Maximum number of 10ms loops to wait for the stream to become ready */
+#define READY_TIMEOUT 100
+
 /* Developer's Guide Table 5 p 3-34
  * indexed by [mains][sensorFps.baserate][sensorFps.divisor]*/
 static u8 flicker_jumps[2][2][4] =
@@ -173,6 +195,10 @@
 
 /* forward declaration of local function */
 static void reset_camera_struct(struct cam_data *cam);
+static int find_over_exposure(int brightness);
+static void set_flicker(struct cam_params *params, volatile u32 *command_flags,
+                        int on);
+
 
 /**********************************************************************
  *
@@ -291,12 +317,6 @@
 	out += sprintf(out, "video_size:               %s\n",
 	               cam->params.format.videoSize == VIDEOSIZE_CIF ?
 		       "CIF " : "QCIF");
-	out += sprintf(out, "sub_sample:               %s\n",
-	               cam->params.format.subSample == SUBSAMPLE_420 ?
-		       "420" : "422");
-	out += sprintf(out, "yuv_order:                %s\n",
-	               cam->params.format.yuvOrder == YUVORDER_YUYV ?
-		       "YUYV" : "UYVY");
 	out += sprintf(out, "roi:                      (%3d, %3d) to (%3d, %3d)\n",
 	               cam->params.roi.colStart*8,
 	               cam->params.roi.rowStart*4,
@@ -331,11 +351,17 @@
 	               2*cam->params.streamStartLine, 0,
 		       cam->params.format.videoSize == VIDEOSIZE_CIF ? 288:144,
 		       cam->params.format.videoSize == VIDEOSIZE_CIF ? 240:120);
+	out += sprintf(out, "sub_sample:             %8s  %8s  %8s  %8s\n",
+	               cam->params.format.subSample == SUBSAMPLE_420 ?
+		       "420" : "422", "420", "422", "422");
+	out += sprintf(out, "yuv_order:              %8s  %8s  %8s  %8s\n",
+	               cam->params.format.yuvOrder == YUVORDER_YUYV ?
+		       "YUYV" : "UYVY", "YUYV" , "UYVY", "YUYV");
 	out += sprintf(out, "ecp_timing:             %8s  %8s  %8s  %8s\n",
 	               cam->params.ecpTiming ? "slow" : "normal", "slow",
 		       "normal", "normal");
 
-	if (cam->params.colourBalance.balanceModeIsAuto) {
+	if (cam->params.colourBalance.balanceMode == 2) {
 		sprintf(tmpstr, "auto");
 	} else {
 		sprintf(tmpstr, "manual");
@@ -385,31 +411,33 @@
 	               1<<cam->params.exposure.gain, 1, 1);
 	if (cam->params.version.firmwareVersion == 1 &&
 	   cam->params.version.firmwareRevision == 2)
-		/* 1-02 firmware limits fineExp to 127 */
-		tmp = 255;
+		/* 1-02 firmware limits fineExp/2 to 127 */
+		tmp = 254;
 	else
-		tmp = 511;
+		tmp = 510;
 
 	out += sprintf(out, "fine_exp:               %8d  %8d  %8d  %8d\n",
 	               cam->params.exposure.fineExp*2, 0, tmp, 0);
 	if (cam->params.version.firmwareVersion == 1 &&
 	   cam->params.version.firmwareRevision == 2)
 		/* 1-02 firmware limits coarseExpHi to 0 */
-		tmp = 255;
+		tmp = MAX_EXP_102;
 	else
-		tmp = 65535;
+		tmp = MAX_EXP;
 
 	out += sprintf(out, "coarse_exp:             %8d  %8d  %8d"
 		       "  %8d\n", cam->params.exposure.coarseExpLo+
 		       256*cam->params.exposure.coarseExpHi, 0, tmp, 185);
 	out += sprintf(out, "red_comp:               %8d  %8d  %8d  %8d\n",
-	               cam->params.exposure.redComp, 220, 255, 220);
+	               cam->params.exposure.redComp, COMP_RED, 255, COMP_RED);
 	out += sprintf(out, "green1_comp:            %8d  %8d  %8d  %8d\n",
-	               cam->params.exposure.green1Comp, 214, 255, 214);
+	               cam->params.exposure.green1Comp, COMP_GREEN1, 255,
+		       COMP_GREEN1);
 	out += sprintf(out, "green2_comp:            %8d  %8d  %8d  %8d\n",
-	               cam->params.exposure.green2Comp, 214, 255, 214);
+	               cam->params.exposure.green2Comp, COMP_GREEN2, 255,
+		       COMP_GREEN2);
 	out += sprintf(out, "blue_comp:              %8d  %8d  %8d  %8d\n",
-	               cam->params.exposure.blueComp, 230, 255, 230);
+	               cam->params.exposure.blueComp, COMP_BLUE, 255, COMP_BLUE);
 	
 	out += sprintf(out, "apcor_gain1:            %#8x  %#8x  %#8x  %#8x\n",
 	               cam->params.apcor.gain1, 0, 0xff, 0x1c);
@@ -433,9 +461,14 @@
 	out += sprintf(out, "mains_frequency:        %8d  %8d  %8d  %8d"
 	               " only 50/60\n",
 	               cam->mainsFreq ? 60 : 50, 50, 60, 50);
-	out += sprintf(out, "allowable_overexposure: %8d  %8d  %8d  %8d\n",
-	               cam->params.flickerControl.allowableOverExposure, 0,
-		       255, 0);
+	if(cam->params.flickerControl.allowableOverExposure < 0)
+		out += sprintf(out, "allowable_overexposure: %4dauto      auto  %8d      auto\n",
+		               -cam->params.flickerControl.allowableOverExposure,
+		               255);
+	else
+		out += sprintf(out, "allowable_overexposure: %8d      auto  %8d      auto\n",
+		               cam->params.flickerControl.allowableOverExposure,
+		               255);
 	out += sprintf(out, "compression_mode:       ");
 	switch(cam->params.compression.mode) {
 	case CPIA_COMPRESSION_NONE:
@@ -453,8 +486,8 @@
 	}
 	out += sprintf(out, "    none,auto,manual      auto\n");
 	out += sprintf(out, "decimation_enable:      %8s  %8s  %8s  %8s\n",
-        	       cam->params.compression.decimation == 
-		       DECIMATION_ENAB ? "on":"off", "off", "off",
+        	       cam->params.compression.decimation ==
+		       DECIMATION_ENAB ? "on":"off", "off", "on", 
 		       "off");
 	out += sprintf(out, "compression_target:    %9s %9s %9s %9s\n",
 	               cam->params.compressionTarget.frTargeting  == 
@@ -462,13 +495,13 @@
 		       "framerate":"quality",
 		       "framerate", "quality", "quality");
 	out += sprintf(out, "target_framerate:       %8d  %8d  %8d  %8d\n",
-	               cam->params.compressionTarget.targetFR, 0, 30, 7);
+	               cam->params.compressionTarget.targetFR, 1, 30, 15);
 	out += sprintf(out, "target_quality:         %8d  %8d  %8d  %8d\n",
-	               cam->params.compressionTarget.targetQ, 0, 255, 10);
+	               cam->params.compressionTarget.targetQ, 1, 64, 5);
 	out += sprintf(out, "y_threshold:            %8d  %8d  %8d  %8d\n",
-	               cam->params.yuvThreshold.yThreshold, 0, 31, 15);
+	               cam->params.yuvThreshold.yThreshold, 0, 31, 6);
 	out += sprintf(out, "uv_threshold:           %8d  %8d  %8d  %8d\n",
-	               cam->params.yuvThreshold.uvThreshold, 0, 31, 15);
+	               cam->params.yuvThreshold.uvThreshold, 0, 31, 6);
 	out += sprintf(out, "hysteresis:             %8d  %8d  %8d  %8d\n",
 	               cam->params.compressionParams.hysteresis, 0, 255, 3);
 	out += sprintf(out, "threshold_max:          %8d  %8d  %8d  %8d\n",
@@ -511,6 +544,47 @@
 	return len;
 }
 
+
+static int match(char *checkstr, char **buffer, unsigned long *count,
+                 int *find_colon, int *err)
+{
+	int ret, colon_found = 1;
+	int len = strlen(checkstr);
+	ret = (len <= *count && strncmp(*buffer, checkstr, len) == 0);
+	if (ret) {
+		*buffer += len;
+		*count -= len;
+		if (*find_colon) {
+			colon_found = 0;
+			while (*count && (**buffer == ' ' || **buffer == '\t' ||
+					  (!colon_found && **buffer == ':'))) {
+				if (**buffer == ':')
+					colon_found = 1;
+				--*count;
+				++*buffer;
+			}
+			if (!*count || !colon_found)
+				*err = -EINVAL;
+			*find_colon = 0;
+		}
+	}
+	return ret;
+}
+
+static unsigned long int value(char **buffer, unsigned long *count, int *err)
+{
+	char *p;
+	unsigned long int ret;
+	ret = simple_strtoul(*buffer, &p, 0);
+	if (p == *buffer)
+		*err = -EINVAL;
+	else {
+		*count -= p - *buffer;
+		*buffer = p;
+	}
+	return ret;
+}
+
 static int cpia_write_proc(struct file *file, const char *buf,
                            unsigned long count, void *data)
 {
@@ -565,45 +639,11 @@
 	memcpy(&new_params, &cam->params, sizeof(struct cam_params));
 	new_mains = cam->mainsFreq;
 	
-#define MATCH(x) \
-	({ \
-		int _len = strlen(x), _ret, _colon_found; \
-		_ret = (_len <= count && strncmp(buffer, x, _len) == 0); \
-		if (_ret) { \
-			buffer += _len; \
-			count -= _len; \
-			if (find_colon) { \
-				_colon_found = 0; \
-				while (count && (*buffer == ' ' || *buffer == '\t' || \
-				       (!_colon_found && *buffer == ':'))) { \
-					if (*buffer == ':')  \
-						_colon_found = 1; \
-					--count; \
-					++buffer; \
-				} \
-				if (!count || !_colon_found) \
-					retval = -EINVAL; \
-				find_colon = 0; \
-			} \
-		} \
-		_ret; \
-	})
+#define MATCH(x) (match(x, &buffer, &count, &find_colon, &retval))
+#define VALUE (value(&buffer,&count, &retval))
 #define FIRMWARE_VERSION(x,y) (new_params.version.firmwareVersion == (x) && \
                                new_params.version.firmwareRevision == (y))
-#define VALUE \
-	({ \
-		char *_p; \
-		unsigned long int _ret; \
-		_ret = simple_strtoul(buffer, &_p, 0); \
-		if (_p == buffer) \
-			retval = -EINVAL; \
-		else { \
-			count -= _p - buffer; \
-			buffer = _p; \
-		} \
-		_ret; \
-	})
-
+	
 	retval = 0;
 	while (count && !retval) {
 		find_colon = 1;
@@ -618,6 +658,12 @@
 					retval = -EINVAL;
 			}
 			command_flags |= COMMAND_SETCOLOURPARAMS;
+			if(new_params.flickerControl.allowableOverExposure < 0)
+				new_params.flickerControl.allowableOverExposure = 
+					-find_over_exposure(new_params.colourParams.brightness);
+			if(new_params.flickerControl.flickerMode != 0)
+				command_flags |= COMMAND_SETFLICKERCTRL;
+
 		} else if (MATCH("contrast")) {
 			if (!retval)
 				val = VALUE;
@@ -686,6 +732,7 @@
 					command_flags |= COMMAND_SETFLICKERCTRL;
 			}
 			command_flags |= COMMAND_SETSENSORFPS;
+			cam->exposure_status = EXPOSURE_NORMAL;
 		} else if (MATCH("stream_start_line")) {
 			if (!retval)
 				val = VALUE;
@@ -700,6 +747,24 @@
 				else
 					retval = -EINVAL;
 			}
+		} else if (MATCH("sub_sample")) {
+			if (!retval && MATCH("420"))
+				new_params.format.subSample = SUBSAMPLE_420;
+			else if (!retval && MATCH("422"))
+				new_params.format.subSample = SUBSAMPLE_422;
+			else
+				retval = -EINVAL;
+
+			command_flags |= COMMAND_SETFORMAT;
+		} else if (MATCH("yuv_order")) {
+			if (!retval && MATCH("YUYV"))
+				new_params.format.yuvOrder = YUVORDER_YUYV;
+			else if (!retval && MATCH("UYVY"))
+				new_params.format.yuvOrder = YUVORDER_UYVY;
+			else
+				retval = -EINVAL;
+
+			command_flags |= COMMAND_SETFORMAT;
 		} else if (MATCH("ecp_timing")) {
 			if (!retval && MATCH("normal"))
 				new_params.ecpTiming = 0;
@@ -711,9 +776,9 @@
 			command_flags |= COMMAND_SETECPTIMING;
 		} else if (MATCH("color_balance_mode")) {
 			if (!retval && MATCH("manual"))
-				new_params.colourBalance.balanceModeIsAuto = 0;
+				new_params.colourBalance.balanceMode = 3;
 			else if (!retval && MATCH("auto"))
-				new_params.colourBalance.balanceModeIsAuto = 1;
+				new_params.colourBalance.balanceMode = 2;
 			else
 				retval = -EINVAL;
 
@@ -723,9 +788,10 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val <= 212)
+				if (val <= 212) {
 					new_params.colourBalance.redGain = val;
-				else
+					new_params.colourBalance.balanceMode = 1;
+				} else
 					retval = -EINVAL;
 			}
 			command_flags |= COMMAND_SETCOLOURBALANCE;
@@ -734,9 +800,10 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val <= 212)
+				if (val <= 212) {
 					new_params.colourBalance.greenGain = val;
-				else
+					new_params.colourBalance.balanceMode = 1;
+				} else
 					retval = -EINVAL;
 			}
 			command_flags |= COMMAND_SETCOLOURBALANCE;
@@ -745,9 +812,10 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val <= 212)
+				if (val <= 212) {
 					new_params.colourBalance.blueGain = val;
-				else
+					new_params.colourBalance.balanceMode = 1;
+				} else
 					retval = -EINVAL;
 			}
 			command_flags |= COMMAND_SETCOLOURBALANCE;
@@ -784,8 +852,9 @@
 			else if (!retval && MATCH("manual")) {
 				if (new_params.exposure.expMode == 2)
 					new_params.exposure.expMode = 3;
+				if(new_params.flickerControl.flickerMode != 0)
+					command_flags |= COMMAND_SETFLICKERCTRL;
 				new_params.flickerControl.flickerMode = 0;
-				command_flags |= COMMAND_SETFLICKERCTRL;
 			} else
 				retval = -EINVAL;
 
@@ -807,32 +876,24 @@
 				switch(val) {
 				case 1:
 					new_params.exposure.gain = 0;
-					new_params.exposure.expMode = 1;
-					new_params.flickerControl.flickerMode = 0;
-					command_flags |= COMMAND_SETFLICKERCTRL;
 					break;
 				case 2:
 					new_params.exposure.gain = 1;
-					new_params.exposure.expMode = 1;
-					new_params.flickerControl.flickerMode = 0;
-					command_flags |= COMMAND_SETFLICKERCTRL;
 					break;
 				case 4:
 					new_params.exposure.gain = 2;
-					new_params.exposure.expMode = 1;
-					new_params.flickerControl.flickerMode = 0;
-					command_flags |= COMMAND_SETFLICKERCTRL;
 					break;
 				case 8:
 					new_params.exposure.gain = 3;
-					new_params.exposure.expMode = 1;
-					new_params.flickerControl.flickerMode = 0;
-					command_flags |= COMMAND_SETFLICKERCTRL;
 					break;
 				default:
 					retval = -EINVAL;
 					break;
 				}
+				new_params.exposure.expMode = 1;
+				if(new_params.flickerControl.flickerMode != 0)
+					command_flags |= COMMAND_SETFLICKERCTRL;
+				new_params.flickerControl.flickerMode = 0;
 				command_flags |= COMMAND_SETEXPOSURE;
 				if (new_params.exposure.gain >
 				    new_params.exposure.gainMode-1)
@@ -840,16 +901,18 @@
 			}
 		} else if (MATCH("fine_exp")) {
 			if (!retval)
-				val = VALUE;
+				val = VALUE/2;
 
 			if (!retval) {
 				if (val < 256) {
-					/* 1-02 firmware limits fineExp to 127*/
+					/* 1-02 firmware limits fineExp/2 to 127*/
 					if (FIRMWARE_VERSION(1,2) && val > 127)
 						val = 127;
 					new_params.exposure.fineExp = val;
 					new_params.exposure.expMode = 1;
 					command_flags |= COMMAND_SETEXPOSURE;
+					if(new_params.flickerControl.flickerMode != 0)
+						command_flags |= COMMAND_SETFLICKERCTRL;
 					new_params.flickerControl.flickerMode = 0;
 					command_flags |= COMMAND_SETFLICKERCTRL;
 				} else
@@ -860,17 +923,18 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val < 65536) {
-					/* 1-02 firmware limits
-					 * coarseExp to 255 */
-					if (FIRMWARE_VERSION(1,2) && val > 255)
-						val = 255;
+				if (val <= MAX_EXP) {
+					if (FIRMWARE_VERSION(1,2) &&
+					    val > MAX_EXP_102)
+						val = MAX_EXP_102;
 					new_params.exposure.coarseExpLo =
 						val & 0xff;
 					new_params.exposure.coarseExpHi =
 						val >> 8;
 					new_params.exposure.expMode = 1;
 					command_flags |= COMMAND_SETEXPOSURE;
+					if(new_params.flickerControl.flickerMode != 0)
+						command_flags |= COMMAND_SETFLICKERCTRL;
 					new_params.flickerControl.flickerMode = 0;
 					command_flags |= COMMAND_SETFLICKERCTRL;
 				} else
@@ -881,8 +945,9 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val >= 220 && val <= 255) {
+				if (val >= COMP_RED && val <= 255) {
 					new_params.exposure.redComp = val;
+					new_params.exposure.compMode = 1;
 					command_flags |= COMMAND_SETEXPOSURE;
 				} else
 					retval = -EINVAL;
@@ -892,8 +957,9 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val >= 214 && val <= 255) {
+				if (val >= COMP_GREEN1 && val <= 255) {
 					new_params.exposure.green1Comp = val;
+					new_params.exposure.compMode = 1;
 					command_flags |= COMMAND_SETEXPOSURE;
 				} else
 					retval = -EINVAL;
@@ -903,8 +969,9 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val >= 214 && val <= 255) {
+				if (val >= COMP_GREEN2 && val <= 255) {
 					new_params.exposure.green2Comp = val;
+					new_params.exposure.compMode = 1;
 					command_flags |= COMMAND_SETEXPOSURE;
 				} else
 					retval = -EINVAL;
@@ -914,8 +981,9 @@
 				val = VALUE;
 
 			if (!retval) {
-				if (val >= 230 && val <= 255) {
+				if (val >= COMP_BLUE && val <= 255) {
 					new_params.exposure.blueComp = val;
+					new_params.exposure.compMode = 1;
 					command_flags |= COMMAND_SETEXPOSURE;
 				} else
 					retval = -EINVAL;
@@ -1010,12 +1078,10 @@
 			command_flags |= COMMAND_SETVLOFFSET;
 		} else if (MATCH("flicker_control")) {
 			if (!retval && MATCH("on")) {
-				new_params.flickerControl.flickerMode = 1;
-				new_params.exposure.expMode = 2;
-				command_flags |= COMMAND_SETEXPOSURE;
-			} else if (!retval && MATCH("off"))
-				new_params.flickerControl.flickerMode = 0;
-			else
+				set_flicker(&new_params, &command_flags, 1);
+			} else if (!retval && MATCH("off")) {
+				set_flicker(&new_params, &command_flags, 0);
+			} else
 				retval = -EINVAL;
 
 			command_flags |= COMMAND_SETFLICKERCTRL;
@@ -1039,16 +1105,24 @@
 			} else
 				retval = -EINVAL;
 		} else if (MATCH("allowable_overexposure")) {
-			if (!retval)
-				val = VALUE;
-
-			if (!retval) {
-				if (val <= 0xff) {
-					new_params.flickerControl.
-						allowableOverExposure = val;
+			if (!retval && MATCH("auto")) {
+				new_params.flickerControl.allowableOverExposure = 
+					-find_over_exposure(new_params.colourParams.brightness);
+				if(new_params.flickerControl.flickerMode != 0)
 					command_flags |= COMMAND_SETFLICKERCTRL;
-				} else
-					retval = -EINVAL;
+			} else {
+				if (!retval)
+					val = VALUE;
+
+				if (!retval) {
+					if (val <= 0xff) {
+						new_params.flickerControl.
+							allowableOverExposure = val;
+						if(new_params.flickerControl.flickerMode != 0)
+							command_flags |= COMMAND_SETFLICKERCTRL;
+					} else
+						retval = -EINVAL;
+				}
 			}
 		} else if (MATCH("compression_mode")) {
 			if (!retval && MATCH("none"))
@@ -1067,6 +1141,8 @@
 		} else if (MATCH("decimation_enable")) {
 			if (!retval && MATCH("off"))
 				new_params.compression.decimation = 0;
+			else if (!retval && MATCH("on"))
+				new_params.compression.decimation = 1;
 			else
 				retval = -EINVAL;
 
@@ -1086,16 +1162,23 @@
 			if (!retval)
 				val = VALUE;
 
-			if (!retval)
-				new_params.compressionTarget.targetFR = val;
+			if (!retval) {
+				if(val > 0 && val <= 30)
+					new_params.compressionTarget.targetFR = val;
+				else
+					retval = -EINVAL;
+			}
 			command_flags |= COMMAND_SETCOMPRESSIONTARGET;
 		} else if (MATCH("target_quality")) {
 			if (!retval)
 				val = VALUE;
 
-			if (!retval)
-				new_params.compressionTarget.targetQ = val;
-
+			if (!retval) {
+				if(val > 0 && val <= 64)
+					new_params.compressionTarget.targetQ = val;
+				else 
+					retval = -EINVAL;
+			}
 			command_flags |= COMMAND_SETCOMPRESSIONTARGET;
 		} else if (MATCH("y_threshold")) {
 			if (!retval)
@@ -1247,10 +1330,8 @@
 		}
 	}
 #undef MATCH	
-#undef FIRMWARE_VERSION
 #undef VALUE
-#undef FIND_VALUE
-#undef FIND_END
+#undef FIRMWARE_VERSION
 	if (!retval) {
 		if (command_flags & COMMAND_SETCOLOURPARAMS) {
 			/* Adjust cam->vp to reflect these changes */
@@ -1261,7 +1342,10 @@
 			cam->vp.colour =
 				new_params.colourParams.saturation*65535/100;
 		}
-		
+		if((command_flags & COMMAND_SETEXPOSURE) &&
+		   new_params.exposure.expMode == 2)
+			cam->exposure_status = EXPOSURE_NORMAL;
+
 		memcpy(&cam->params, &new_params, sizeof(struct cam_params));
 		cam->mainsFreq = new_mains;
 		cam->cmd_queue |= command_flags;
@@ -1294,11 +1378,11 @@
 	ent->read_proc = cpia_read_proc;
 	ent->write_proc = cpia_write_proc;
 	/* 
-	   size of the proc entry is 3672 bytes for the standard webcam;
- 	   the extra features of the QX3 microscope add 188 bytes.
+	   size of the proc entry is 3736 bytes for the standard webcam;
+ 	   the extra features of the QX3 microscope add 189 bytes.
 	   (we have not yet probed the camera to see which type it is).
 	*/
-	ent->size = 3672 + 188;
+	ent->size = 3736 + 189;
 	cam->proc_entry = ent;
 }
 
@@ -1324,10 +1408,12 @@
 		LOG("Unable to initialise /proc/cpia\n");
 }
 
+#ifdef MODULE
 static void proc_cpia_destroy(void)
 {
 	remove_proc_entry("cpia", 0);
 }
+#endif /*MODULE*/
 #endif /* CONFIG_PROC_FS */
 
 /* ----------------------- debug functions ---------------------- */
@@ -1410,9 +1496,7 @@
 		cam->vw.height = 288;
 		cam->params.format.videoSize=VIDEOSIZE_CIF;
 		cam->params.roi.colStart=0;
-		cam->params.roi.colEnd=44;
 		cam->params.roi.rowStart=0;
-		cam->params.roi.rowEnd=72;
 		cam->params.streamStartLine = 120;
 		break;
 	case VIDEOSIZE_SIF:
@@ -1420,9 +1504,7 @@
 		cam->vw.height = 240;
 		cam->params.format.videoSize=VIDEOSIZE_CIF;
 		cam->params.roi.colStart=2;
-		cam->params.roi.colEnd=42;
 		cam->params.roi.rowStart=6;
-		cam->params.roi.rowEnd=66;
 		cam->params.streamStartLine = 120;
 		break;
 	case VIDEOSIZE_288_216:
@@ -1430,9 +1512,7 @@
 		cam->vw.height = 216;
 		cam->params.format.videoSize=VIDEOSIZE_CIF;
 		cam->params.roi.colStart=4;
-		cam->params.roi.colEnd=40;
 		cam->params.roi.rowStart=9;
-		cam->params.roi.rowEnd=63;
 		cam->params.streamStartLine = 120;
 		break;
 	case VIDEOSIZE_256_192:
@@ -1440,9 +1520,7 @@
 		cam->vw.height = 192;
 		cam->params.format.videoSize=VIDEOSIZE_CIF;
 		cam->params.roi.colStart=6;
-		cam->params.roi.colEnd=38;
 		cam->params.roi.rowStart=12;
-		cam->params.roi.rowEnd=60;
 		cam->params.streamStartLine = 120;
 		break;
 	case VIDEOSIZE_224_168:
@@ -1450,9 +1528,7 @@
 		cam->vw.height = 168;
 		cam->params.format.videoSize=VIDEOSIZE_CIF;
 		cam->params.roi.colStart=8;
-		cam->params.roi.colEnd=36;
 		cam->params.roi.rowStart=15;
-		cam->params.roi.rowEnd=57;
 		cam->params.streamStartLine = 120;
 		break;
 	case VIDEOSIZE_192_144:
@@ -1460,9 +1536,7 @@
 		cam->vw.height = 144;
 		cam->params.format.videoSize=VIDEOSIZE_CIF;
 		cam->params.roi.colStart=10;
-		cam->params.roi.colEnd=34;
 		cam->params.roi.rowStart=18;
-		cam->params.roi.rowEnd=54;
 		cam->params.streamStartLine = 120;
 		break;
 	case VIDEOSIZE_QCIF:
@@ -1470,9 +1544,7 @@
 		cam->vw.height = 144;
 		cam->params.format.videoSize=VIDEOSIZE_QCIF;
 		cam->params.roi.colStart=0;
-		cam->params.roi.colEnd=22;
 		cam->params.roi.rowStart=0;
-		cam->params.roi.rowEnd=36;
 		cam->params.streamStartLine = 60;
 		break;
 	case VIDEOSIZE_QSIF:
@@ -1480,9 +1552,7 @@
 		cam->vw.height = 120;
 		cam->params.format.videoSize=VIDEOSIZE_QCIF;
 		cam->params.roi.colStart=1;
-		cam->params.roi.colEnd=21;
 		cam->params.roi.rowStart=3;
-		cam->params.roi.rowEnd=33;
 		cam->params.streamStartLine = 60;
 		break;
 	case VIDEOSIZE_128_96:
@@ -1490,9 +1560,7 @@
 		cam->vw.height = 96;
 		cam->params.format.videoSize=VIDEOSIZE_QCIF;
 		cam->params.roi.colStart=3;
-		cam->params.roi.colEnd=19;
 		cam->params.roi.rowStart=6;
-		cam->params.roi.rowEnd=30;
 		cam->params.streamStartLine = 60;
 		break;
 	case VIDEOSIZE_88_72:
@@ -1500,9 +1568,7 @@
 		cam->vw.height = 72;
 		cam->params.format.videoSize=VIDEOSIZE_QCIF;
 		cam->params.roi.colStart=5;
-		cam->params.roi.colEnd=16;
 		cam->params.roi.rowStart=9;
-		cam->params.roi.rowEnd=27;
 		cam->params.streamStartLine = 60;
 		break;
 	case VIDEOSIZE_64_48:
@@ -1510,9 +1576,7 @@
 		cam->vw.height = 48;
 		cam->params.format.videoSize=VIDEOSIZE_QCIF;
 		cam->params.roi.colStart=7;
-		cam->params.roi.colEnd=15;
 		cam->params.roi.rowStart=12;
-		cam->params.roi.rowEnd=24;
 		cam->params.streamStartLine = 60;
 		break;
 	case VIDEOSIZE_48_48:
@@ -1520,15 +1584,26 @@
 		cam->vw.height = 48;
 		cam->params.format.videoSize=VIDEOSIZE_QCIF;
 		cam->params.roi.colStart=8;
-		cam->params.roi.colEnd=14;
 		cam->params.roi.rowStart=6;
-		cam->params.roi.rowEnd=30;
 		cam->params.streamStartLine = 60;
 		break;
 	default:
 		LOG("bad videosize value: %d\n", cam->video_size);
+		return;
 	}
 
+	if(cam->vc.width == 0)
+		cam->vc.width = cam->vw.width;
+	if(cam->vc.height == 0)
+		cam->vc.height = cam->vw.height;
+	
+	cam->params.roi.colStart += cam->vc.x >> 3;
+	cam->params.roi.colEnd = cam->params.roi.colStart +
+	                         (cam->vc.width >> 3);
+	cam->params.roi.rowStart += cam->vc.y >> 2;
+	cam->params.roi.rowEnd = cam->params.roi.rowStart +
+	                         (cam->vc.height >> 2);
+
 	return;
 }
 
@@ -1668,29 +1743,6 @@
 			cam->params.exposure.green1Comp = data[5];
 			cam->params.exposure.green2Comp = data[6];
 			cam->params.exposure.blueComp = data[7];
-			/* If the *Comp parameters are wacko, generate
-			 * a warning, and reset them back to default
-			 * values.             - rich@annexia.org
-			 */
-			if (cam->params.exposure.redComp < 220 ||
-			    cam->params.exposure.redComp > 255 ||
-			    cam->params.exposure.green1Comp < 214 ||
-			    cam->params.exposure.green1Comp > 255 ||
-			    cam->params.exposure.green2Comp < 214 ||
-			    cam->params.exposure.green2Comp > 255 ||
-			    cam->params.exposure.blueComp < 230 ||
-			    cam->params.exposure.blueComp > 255)
-			  {
-			    printk (KERN_WARNING "*_comp parameters have gone AWOL (%d/%d/%d/%d) - reseting them\n",
-				    cam->params.exposure.redComp,
-				    cam->params.exposure.green1Comp,
-				    cam->params.exposure.green2Comp,
-				    cam->params.exposure.blueComp);
-			    cam->params.exposure.redComp = 220;
-			    cam->params.exposure.green1Comp = 214;
-			    cam->params.exposure.green2Comp = 214;
-			    cam->params.exposure.blueComp = 230;
-			  }
 			up(&cam->param_lock);
 			break;
 
@@ -1756,6 +1808,122 @@
  **********************************************************************/
 #define LIMIT(x) ((((x)>0xffffff)?0xff0000:(((x)<=0xffff)?0:(x)&0xff0000))>>16)
 
+static int convert420(unsigned char *yuv, unsigned char *rgb, int out_fmt,
+                      int linesize, int mmap_kludge)
+{
+	int y, u, v, r, g, b, y1;
+	
+	/* Odd lines use the same u and v as the previous line.
+	 * Because of compression, it is necessary to get this
+	 * information from the decoded image. */
+	switch(out_fmt) {
+	case VIDEO_PALETTE_RGB555:
+		y = (*yuv++ - 16) * 76310;
+		y1 = (*yuv - 16) * 76310;
+		r = ((*(rgb+1-linesize)) & 0x7c) << 1;
+		g = ((*(rgb-linesize)) & 0xe0) >> 4 |
+		    ((*(rgb+1-linesize)) & 0x03) << 6;
+		b = ((*(rgb-linesize)) & 0x1f) << 3;
+		u = (-53294 * r - 104635 * g + 157929 * b) / 5756495;
+		v = (157968 * r - 132278 * g - 25690 * b) / 5366159;
+		r = 104635 * v;
+		g = -25690 * u - 53294 * v;
+		b = 132278 * u;
+		*rgb++ = ((LIMIT(g+y) & 0xf8) << 2) | (LIMIT(b+y) >> 3);
+		*rgb++ = ((LIMIT(r+y) & 0xf8) >> 1) | (LIMIT(g+y) >> 6);
+		*rgb++ = ((LIMIT(g+y1) & 0xf8) << 2) | (LIMIT(b+y1) >> 3);
+		*rgb = ((LIMIT(r+y1) & 0xf8) >> 1) | (LIMIT(g+y1) >> 6);
+		return 4;
+	case VIDEO_PALETTE_RGB565:
+		y = (*yuv++ - 16) * 76310;
+		y1 = (*yuv - 16) * 76310;
+		r = (*(rgb+1-linesize)) & 0xf8;
+		g = ((*(rgb-linesize)) & 0xe0) >> 3 |
+		    ((*(rgb+1-linesize)) & 0x07) << 5;
+		b = ((*(rgb-linesize)) & 0x1f) << 3;
+		u = (-53294 * r - 104635 * g + 157929 * b) / 5756495;
+		v = (157968 * r - 132278 * g - 25690 * b) / 5366159;
+		r = 104635 * v;
+		g = -25690 * u - 53294 * v;
+		b = 132278 * u;
+		*rgb++ = ((LIMIT(g+y) & 0xfc) << 3) | (LIMIT(b+y) >> 3);
+		*rgb++ = (LIMIT(r+y) & 0xf8) | (LIMIT(g+y) >> 5);
+		*rgb++ = ((LIMIT(g+y1) & 0xfc) << 3) | (LIMIT(b+y1) >> 3);
+		*rgb = (LIMIT(r+y1) & 0xf8) | (LIMIT(g+y1) >> 5);
+		return 4;
+		break;
+	case VIDEO_PALETTE_RGB24:
+	case VIDEO_PALETTE_RGB32:
+		y = (*yuv++ - 16) * 76310;
+		y1 = (*yuv - 16) * 76310;
+		if (mmap_kludge) {
+			r = *(rgb+2-linesize);
+			g = *(rgb+1-linesize);
+			b = *(rgb-linesize);
+		} else {
+			r = *(rgb-linesize);
+			g = *(rgb+1-linesize);
+			b = *(rgb+2-linesize);
+		}
+		u = (-53294 * r - 104635 * g + 157929 * b) / 5756495;
+		v = (157968 * r - 132278 * g - 25690 * b) / 5366159;
+		r = 104635 * v;
+		g = -25690 * u + -53294 * v;
+		b = 132278 * u;
+		if (mmap_kludge) {
+			*rgb++ = LIMIT(b+y);
+			*rgb++ = LIMIT(g+y);
+			*rgb++ = LIMIT(r+y);
+			if(out_fmt == VIDEO_PALETTE_RGB32)
+				rgb++;
+			*rgb++ = LIMIT(b+y1);
+			*rgb++ = LIMIT(g+y1);
+			*rgb = LIMIT(r+y1);
+		} else {
+			*rgb++ = LIMIT(r+y);
+			*rgb++ = LIMIT(g+y);
+			*rgb++ = LIMIT(b+y);
+			if(out_fmt == VIDEO_PALETTE_RGB32)
+				rgb++;
+			*rgb++ = LIMIT(r+y1);
+			*rgb++ = LIMIT(g+y1);
+			*rgb = LIMIT(b+y1);
+		}
+		if(out_fmt == VIDEO_PALETTE_RGB32)
+			return 8;
+		return 6;
+	case VIDEO_PALETTE_YUV422:
+	case VIDEO_PALETTE_YUYV:
+		y = *yuv++;
+		u = *(rgb+1-linesize);
+		y1 = *yuv;
+		v = *(rgb+3-linesize);
+		*rgb++ = y;
+		*rgb++ = u;
+		*rgb++ = y1;
+		*rgb = v;
+		return 4;
+	case VIDEO_PALETTE_UYVY:
+		u = *(rgb-linesize);
+		y = *yuv++;
+		v = *(rgb+2-linesize);
+		y1 = *yuv;
+		*rgb++ = u;
+		*rgb++ = y;
+		*rgb++ = v;
+		*rgb = y1;
+		return 4;
+	case VIDEO_PALETTE_GREY:
+		*rgb++ = *yuv++;
+		*rgb = *yuv;
+		return 2;
+	default:
+		DBG("Empty: %d\n", out_fmt);
+		return 0;
+	}
+}
+
+
 static int yuvconvert(unsigned char *yuv, unsigned char *rgb, int out_fmt,
                       int in_uyvy, int mmap_kludge)
 {
@@ -1887,7 +2055,8 @@
 static int parse_picture(struct cam_data *cam, int size)
 {
 	u8 *obuf, *ibuf, *end_obuf;
-	int ll, in_uyvy, compressed, origsize, out_fmt;
+	int ll, in_uyvy, compressed, decimation, even_line, origsize, out_fmt;
+	int rows, cols, linesize, subsample_422;
 
 	/* make sure params don't change while we are decoding */
 	down(&cam->param_lock);
@@ -1910,11 +2079,12 @@
 		return -1;
 	}
 	
-	if (ibuf[17] != SUBSAMPLE_422) {
+	if (ibuf[17] != SUBSAMPLE_420 && ibuf[17] != SUBSAMPLE_422) {
 		LOG("illegal subtype %d\n",ibuf[17]);
 		up(&cam->param_lock);
 		return -1;
 	}
+	subsample_422 = ibuf[17] == SUBSAMPLE_422;
 	
 	if (ibuf[18] != YUVORDER_YUYV && ibuf[18] != YUVORDER_UYVY) {
 		LOG("illegal yuvorder %d\n",ibuf[18]);
@@ -1923,8 +2093,6 @@
 	}
 	in_uyvy = ibuf[18] == YUVORDER_UYVY;
 	
-#if 0
-	/* FIXME: ROI mismatch occurs when switching capture sizes */
 	if ((ibuf[24] != cam->params.roi.colStart) ||
 	    (ibuf[25] != cam->params.roi.colEnd) ||
 	    (ibuf[26] != cam->params.roi.rowStart) ||
@@ -1933,7 +2101,9 @@
 		up(&cam->param_lock);
 		return -1;
 	}
-#endif
+	cols = 8*(ibuf[25] - ibuf[24]);
+	rows = 4*(ibuf[27] - ibuf[26]);
+
 	
 	if ((ibuf[28] != NOT_COMPRESSED) && (ibuf[28] != COMPRESSED)) {
 		LOG("illegal compression %d\n",ibuf[28]);
@@ -1942,12 +2112,13 @@
 	}
 	compressed = (ibuf[28] == COMPRESSED);
 	
-	if (ibuf[29] != NO_DECIMATION) {
-		LOG("decimation not supported\n");
+	if (ibuf[29] != NO_DECIMATION && ibuf[29] != DECIMATION_ENAB) {
+		LOG("illegal decimation %d\n",ibuf[29]);
 		up(&cam->param_lock);
 		return -1;
 	}
-	
+	decimation = (ibuf[29] == DECIMATION_ENAB);	
+
 	cam->params.yuvThreshold.yThreshold = ibuf[30];
 	cam->params.yuvThreshold.uvThreshold = ibuf[31];
 	cam->params.status.systemState = ibuf[32];
@@ -1961,10 +2132,12 @@
 	cam->fps = ibuf[41];
 	up(&cam->param_lock);
 	
+	linesize = skipcount(cols, out_fmt);
 	ibuf += FRAME_HEADER_SIZE;
 	size -= FRAME_HEADER_SIZE;
 	ll = ibuf[0] | (ibuf[1] << 8);
 	ibuf += 2;
+	even_line = 1;
 
 	while (size > 0) {
 		size -= (ll+2);
@@ -1975,16 +2148,24 @@
 
 		while (ll > 1) {
 			if (!compressed || (compressed && !(*ibuf & 1))) {
+				if(subsample_422 || even_line) {
 				obuf += yuvconvert(ibuf, obuf, out_fmt,
 				                   in_uyvy, cam->mmap_kludge);
 				ibuf += 4;
 				ll -= 4;
 			} else {
+					/* SUBSAMPLE_420 on an odd line */
+					obuf += convert420(ibuf, obuf,
+					                   out_fmt, linesize,
+			                		   cam->mmap_kludge);
+					ibuf += 2;
+					ll -= 2;
+				}
+			} else {
 				/*skip compressed interval from previous frame*/
-				int skipsize = skipcount(*ibuf >> 1, out_fmt);
-				obuf += skipsize;
+				obuf += skipcount(*ibuf >> 1, out_fmt);
 				if (obuf > end_obuf) {
-					LOG("Insufficient data in buffer\n");
+					LOG("Insufficient buffer size\n");
 					return -1;
 				}
 				++ibuf;
@@ -1998,7 +2179,7 @@
 				return -1;
 			}
 
-			ibuf++; /* skip over EOL */
+			++ibuf; /* skip over EOL */
 
 			if ((size > 3) && (ibuf[0] == EOI) && (ibuf[1] == EOI) &&
 			   (ibuf[2] == EOI) && (ibuf[3] == EOI)) {
@@ -2006,10 +2187,17 @@
 				break;
 			}
 
+			if(decimation) {
+				/* skip the odd lines for now */
+				obuf += linesize;
+			}
+
 			if (size > 1) {
 				ll = ibuf[0] | (ibuf[1] << 8);
 				ibuf += 2; /* skip over line length */
 			}
+			if(!decimation)
+				even_line = !even_line;
 		} else {
 			LOG("line length was not 1 but %d after %d/%d bytes\n",
 			    ll, origsize-size, origsize);
@@ -2017,6 +2205,25 @@
 		}
 	}
 	
+	if(decimation) {
+		/* interpolate odd rows */
+		int i, j;
+		u8 *prev, *next;
+		prev = cam->decompressed_frame.data;
+		obuf = prev+linesize;
+		next = obuf+linesize;
+		for(i=1; i<rows-1; i+=2) {
+			for(j=0; j<linesize; ++j) {
+				*obuf++ = ((int)*prev++ + *next++) / 2;
+			}
+			prev += linesize;
+			obuf += linesize;
+			next += linesize;
+		}
+		/* last row is odd, just copy previous row */
+		memcpy(obuf, prev, linesize);
+	}
+
 	cam->decompressed_frame.count = obuf-cam->decompressed_frame.data;
 
 	return cam->decompressed_frame.count;
@@ -2029,6 +2236,38 @@
 	                  0, cam->params.streamStartLine, 0, 0);
 }
 
+
+/*  find_over_exposure
+ *    Finds a suitable value of OverExposure for use with SetFlickerCtrl
+ *    Some calculation is required because this value changes with the brightness
+ *    set with SetColourParameters
+ *
+ *  Parameters: Brightness  -  last brightness value set with SetColourParameters
+ *
+ *  Returns: OverExposure value to use with SetFlickerCtrl
+ */
+#define FLICKER_MAX_EXPOSURE                    250
+#define FLICKER_ALLOWABLE_OVER_EXPOSURE         146
+#define FLICKER_BRIGHTNESS_CONSTANT             59
+static int find_over_exposure(int brightness)
+{
+	int MaxAllowableOverExposure, OverExposure;
+
+	MaxAllowableOverExposure = FLICKER_MAX_EXPOSURE - brightness -
+	                           FLICKER_BRIGHTNESS_CONSTANT;
+
+	if (MaxAllowableOverExposure < FLICKER_ALLOWABLE_OVER_EXPOSURE) {
+		OverExposure = MaxAllowableOverExposure;
+	} else {
+		OverExposure = FLICKER_ALLOWABLE_OVER_EXPOSURE;
+	}
+
+	return OverExposure;
+}
+#undef FLICKER_MAX_EXPOSURE
+#undef FLICKER_ALLOWABLE_OVER_EXPOSURE
+#undef FLICKER_BRIGHTNESS_CONSTANT
+
 /* update various camera modes and settings */
 static void dispatch_commands(struct cam_data *cam)
 {
@@ -2039,17 +2278,6 @@
 	}
 	DEB_BYTE(cam->cmd_queue);
 	DEB_BYTE(cam->cmd_queue>>8);
-	if (cam->cmd_queue & COMMAND_SETCOLOURPARAMS)
-		do_command(cam, CPIA_COMMAND_SetColourParams,
-		           cam->params.colourParams.brightness,
-		           cam->params.colourParams.contrast,
-		           cam->params.colourParams.saturation, 0);
-
-	if (cam->cmd_queue & COMMAND_SETCOMPRESSION)
-		do_command(cam, CPIA_COMMAND_SetCompression,
-		           cam->params.compression.mode,
-			   cam->params.compression.decimation, 0, 0);
-
 	if (cam->cmd_queue & COMMAND_SETFORMAT) {
 		do_command(cam, CPIA_COMMAND_SetFormat,
 	        	   cam->params.format.videoSize,
@@ -2061,37 +2289,30 @@
 		cam->first_frame = 1;
 	}
 
-	if (cam->cmd_queue & COMMAND_SETCOMPRESSIONTARGET)
-		do_command(cam, CPIA_COMMAND_SetCompressionTarget,
-		           cam->params.compressionTarget.frTargeting,
-		           cam->params.compressionTarget.targetFR,
-		           cam->params.compressionTarget.targetQ, 0);
-
-	if (cam->cmd_queue & COMMAND_SETYUVTHRESH)
-		do_command(cam, CPIA_COMMAND_SetYUVThresh,
-		           cam->params.yuvThreshold.yThreshold,
-		           cam->params.yuvThreshold.uvThreshold, 0, 0);
+	if (cam->cmd_queue & COMMAND_SETCOLOURPARAMS)
+		do_command(cam, CPIA_COMMAND_SetColourParams,
+		           cam->params.colourParams.brightness,
+		           cam->params.colourParams.contrast,
+		           cam->params.colourParams.saturation, 0);
 
-	if (cam->cmd_queue & COMMAND_SETECPTIMING)
-		do_command(cam, CPIA_COMMAND_SetECPTiming,
-		           cam->params.ecpTiming, 0, 0, 0);
+	if (cam->cmd_queue & COMMAND_SETAPCOR)
+		do_command(cam, CPIA_COMMAND_SetApcor,
+		           cam->params.apcor.gain1,
+		           cam->params.apcor.gain2,
+		           cam->params.apcor.gain4,
+		           cam->params.apcor.gain8);
 
-	if (cam->cmd_queue & COMMAND_SETCOMPRESSIONPARAMS)
-		do_command_extended(cam, CPIA_COMMAND_SetCompressionParams,
-		            0, 0, 0, 0,
-		            cam->params.compressionParams.hysteresis,
-		            cam->params.compressionParams.threshMax,
-		            cam->params.compressionParams.smallStep,
-		            cam->params.compressionParams.largeStep,
-		            cam->params.compressionParams.decimationHysteresis,
-		            cam->params.compressionParams.frDiffStepThresh,
-		            cam->params.compressionParams.qDiffStepThresh,
-		            cam->params.compressionParams.decimationThreshMod);
+	if (cam->cmd_queue & COMMAND_SETVLOFFSET)
+		do_command(cam, CPIA_COMMAND_SetVLOffset,
+		           cam->params.vlOffset.gain1,
+		           cam->params.vlOffset.gain2,
+		           cam->params.vlOffset.gain4,
+		           cam->params.vlOffset.gain8);
 
-	if (cam->cmd_queue & COMMAND_SETEXPOSURE)
+	if (cam->cmd_queue & COMMAND_SETEXPOSURE) {
 		do_command_extended(cam, CPIA_COMMAND_SetExposure,
 		                    cam->params.exposure.gainMode,
-		                    cam->params.exposure.expMode,
+		                    1,
 		                    cam->params.exposure.compMode,
 		                    cam->params.exposure.centreWeight,
 		                    cam->params.exposure.gain,
@@ -2102,12 +2323,21 @@
 		                    cam->params.exposure.green1Comp,
 		                    cam->params.exposure.green2Comp,
 		                    cam->params.exposure.blueComp);
-
+		if(cam->params.exposure.expMode != 1) {
+			do_command_extended(cam, CPIA_COMMAND_SetExposure,
+		                	    0,
+		                	    cam->params.exposure.expMode,
+		                	    0, 0,
+		                	    cam->params.exposure.gain,
+		                	    cam->params.exposure.fineExp,
+		                	    cam->params.exposure.coarseExpLo,
+		                	    cam->params.exposure.coarseExpHi,
+		                	    0, 0, 0, 0);
+		}
+	}
+	
 	if (cam->cmd_queue & COMMAND_SETCOLOURBALANCE) {
-		if (cam->params.colourBalance.balanceModeIsAuto) {
-			do_command(cam, CPIA_COMMAND_SetColourBalance,
-				   2, 0, 0, 0);
-		} else {
+		if (cam->params.colourBalance.balanceMode == 1) {
 			do_command(cam, CPIA_COMMAND_SetColourBalance,
 				   1,
 				   cam->params.colourBalance.redGain,
@@ -2116,32 +2346,59 @@
 			do_command(cam, CPIA_COMMAND_SetColourBalance,
 				   3, 0, 0, 0);
 		}
+		if (cam->params.colourBalance.balanceMode == 2) {
+			do_command(cam, CPIA_COMMAND_SetColourBalance,
+				   2, 0, 0, 0);
+		}
+		if (cam->params.colourBalance.balanceMode == 3) {
+			do_command(cam, CPIA_COMMAND_SetColourBalance,
+				   3, 0, 0, 0);
+		}
 	}
 
+	if (cam->cmd_queue & COMMAND_SETCOMPRESSIONTARGET)
+		do_command(cam, CPIA_COMMAND_SetCompressionTarget,
+		           cam->params.compressionTarget.frTargeting,
+		           cam->params.compressionTarget.targetFR,
+		           cam->params.compressionTarget.targetQ, 0);
+
+	if (cam->cmd_queue & COMMAND_SETYUVTHRESH)
+		do_command(cam, CPIA_COMMAND_SetYUVThresh,
+		           cam->params.yuvThreshold.yThreshold,
+		           cam->params.yuvThreshold.uvThreshold, 0, 0);
+
+	if (cam->cmd_queue & COMMAND_SETCOMPRESSIONPARAMS)
+		do_command_extended(cam, CPIA_COMMAND_SetCompressionParams,
+		            0, 0, 0, 0,
+		            cam->params.compressionParams.hysteresis,
+		            cam->params.compressionParams.threshMax,
+		            cam->params.compressionParams.smallStep,
+		            cam->params.compressionParams.largeStep,
+		            cam->params.compressionParams.decimationHysteresis,
+		            cam->params.compressionParams.frDiffStepThresh,
+		            cam->params.compressionParams.qDiffStepThresh,
+		            cam->params.compressionParams.decimationThreshMod);
+
+	if (cam->cmd_queue & COMMAND_SETCOMPRESSION)
+		do_command(cam, CPIA_COMMAND_SetCompression,
+		           cam->params.compression.mode,
+			   cam->params.compression.decimation, 0, 0);
+
 	if (cam->cmd_queue & COMMAND_SETSENSORFPS)
 		do_command(cam, CPIA_COMMAND_SetSensorFPS,
 		           cam->params.sensorFps.divisor,
 		           cam->params.sensorFps.baserate, 0, 0);
 
-	if (cam->cmd_queue & COMMAND_SETAPCOR)
-		do_command(cam, CPIA_COMMAND_SetApcor,
-		           cam->params.apcor.gain1,
-		           cam->params.apcor.gain2,
-		           cam->params.apcor.gain4,
-		           cam->params.apcor.gain8);
-
 	if (cam->cmd_queue & COMMAND_SETFLICKERCTRL)
 		do_command(cam, CPIA_COMMAND_SetFlickerCtrl,
 		           cam->params.flickerControl.flickerMode,
 		           cam->params.flickerControl.coarseJump,
-		           cam->params.flickerControl.allowableOverExposure, 0);
+		           abs(cam->params.flickerControl.allowableOverExposure),
+		           0);
 
-	if (cam->cmd_queue & COMMAND_SETVLOFFSET)
-		do_command(cam, CPIA_COMMAND_SetVLOffset,
-		           cam->params.vlOffset.gain1,
-		           cam->params.vlOffset.gain2,
-		           cam->params.vlOffset.gain4,
-		           cam->params.vlOffset.gain8);
+	if (cam->cmd_queue & COMMAND_SETECPTIMING)
+		do_command(cam, CPIA_COMMAND_SetECPTiming,
+		           cam->params.ecpTiming, 0, 0, 0);
 
 	if (cam->cmd_queue & COMMAND_PAUSE)
 		do_command(cam, CPIA_COMMAND_EndStreamCap, 0, 0, 0, 0);
@@ -2149,20 +2406,416 @@
 	if (cam->cmd_queue & COMMAND_RESUME)
 		init_stream_cap(cam);
 
-	if (cam->cmd_queue & COMMAND_SETLIGHTS && cam->params.qx3.qx3_detected) {
-		int p1 = (cam->params.qx3.bottomlight == 0) << 1;
-		int p2 = (cam->params.qx3.toplight == 0) << 3;
-		do_command(cam, CPIA_COMMAND_WriteVCReg,  0x90, 0x8F, 0x50, 0);
-		do_command(cam, CPIA_COMMAND_WriteMCPort, 2, 0, (p1|p2|0xE0), 0);
-	}
+	if (cam->cmd_queue & COMMAND_SETLIGHTS && cam->params.qx3.qx3_detected)
+	  {
+	    int p1 = (cam->params.qx3.bottomlight == 0) << 1;
+            int p2 = (cam->params.qx3.toplight == 0) << 3;
+            do_command(cam, CPIA_COMMAND_WriteVCReg,  0x90, 0x8F, 0x50, 0);
+            do_command(cam, CPIA_COMMAND_WriteMCPort, 2, 0, (p1|p2|0xE0), 0);
+	  }
 
-	up(&cam->param_lock);
 	cam->cmd_queue = COMMAND_NONE;
+	up(&cam->param_lock);
 	return;
 }
 
+
+
+static void set_flicker(struct cam_params *params, volatile u32 *command_flags,
+                        int on)
+{
+	/* Everything in here is from the Windows driver */
+#define FIRMWARE_VERSION(x,y) (params->version.firmwareVersion == (x) && \
+                               params->version.firmwareRevision == (y))
+/* define for compgain calculation */
+#define COMPGAIN(base, curexp, newexp) \
+    (u8) ((((float) base - 128.0) * ((float) curexp / (float) newexp)) + 128.5)
+#define EXP_FROM_COMP(basecomp, curcomp, curexp) \
+    (u16)((float)curexp * (float)(u8)(curcomp + 128) / (float)(u8)(basecomp - 128))
+	int currentexp = params->exposure.coarseExpLo +
+			 params->exposure.coarseExpHi*256;
+	int startexp;
+	if (on) {
+		int cj = params->flickerControl.coarseJump;
+		params->flickerControl.flickerMode = 1;
+		params->flickerControl.disabled = 0;
+		if(params->exposure.expMode != 2)
+			*command_flags |= COMMAND_SETEXPOSURE;
+		params->exposure.expMode = 2;
+		currentexp = currentexp << params->exposure.gain;
+		params->exposure.gain = 0;
+		/* round down current exposure to nearest value */
+		startexp = (currentexp + ROUND_UP_EXP_FOR_FLICKER) / cj;
+		if(startexp < 1)
+			startexp = 1;
+		startexp = (startexp * cj) - 1;
+		if(FIRMWARE_VERSION(1,2))
+			while(startexp > MAX_EXP_102)
+				startexp -= cj;
+		else
+			while(startexp > MAX_EXP)
+				startexp -= cj;
+		params->exposure.coarseExpLo = startexp & 0xff;
+		params->exposure.coarseExpHi = startexp >> 8;
+		if (currentexp > startexp) {
+			if (currentexp > (2 * startexp))
+				currentexp = 2 * startexp;
+			params->exposure.redComp = COMPGAIN (COMP_RED, currentexp, startexp);
+			params->exposure.green1Comp = COMPGAIN (COMP_GREEN1, currentexp, startexp);
+			params->exposure.green2Comp = COMPGAIN (COMP_GREEN2, currentexp, startexp);
+			params->exposure.blueComp = COMPGAIN (COMP_BLUE, currentexp, startexp);
+		} else {
+			params->exposure.redComp = COMP_RED;
+			params->exposure.green1Comp = COMP_GREEN1;
+			params->exposure.green2Comp = COMP_GREEN2;
+			params->exposure.blueComp = COMP_BLUE;
+		}
+		if(FIRMWARE_VERSION(1,2))
+			params->exposure.compMode = 0;
+		else 
+			params->exposure.compMode = 1;
+
+		params->apcor.gain1 = 0x18;
+		params->apcor.gain2 = 0x18;
+		params->apcor.gain4 = 0x16;
+		params->apcor.gain8 = 0x14;
+		*command_flags |= COMMAND_SETAPCOR;
+	} else {
+		params->flickerControl.flickerMode = 0;
+		params->flickerControl.disabled = 1;
+		/* Coarse = average of equivalent coarse for each comp channel */
+		startexp = EXP_FROM_COMP(COMP_RED, params->exposure.redComp, currentexp);
+		startexp += EXP_FROM_COMP(COMP_GREEN1, params->exposure.green1Comp, currentexp);
+		startexp += EXP_FROM_COMP(COMP_GREEN2, params->exposure.green2Comp, currentexp);
+		startexp += EXP_FROM_COMP(COMP_BLUE, params->exposure.blueComp, currentexp);
+		startexp = startexp >> 2;
+		while(startexp > MAX_EXP &&
+		      params->exposure.gain < params->exposure.gainMode-1) {
+			startexp = startexp >> 1;
+			++params->exposure.gain;
+		}
+		if(FIRMWARE_VERSION(1,2) && startexp > MAX_EXP_102)
+			startexp = MAX_EXP_102;
+		if(startexp > MAX_EXP)
+			startexp = MAX_EXP;
+		params->exposure.coarseExpLo = startexp&0xff;
+		params->exposure.coarseExpHi = startexp >> 8;
+		params->exposure.redComp = COMP_RED;
+		params->exposure.green1Comp = COMP_GREEN1;
+		params->exposure.green2Comp = COMP_GREEN2;
+		params->exposure.blueComp = COMP_BLUE;
+		params->exposure.compMode = 1;
+		*command_flags |= COMMAND_SETEXPOSURE;
+		params->apcor.gain1 = 0x18;
+		params->apcor.gain2 = 0x16;
+		params->apcor.gain4 = 0x24;
+		params->apcor.gain8 = 0x34;
+		*command_flags |= COMMAND_SETAPCOR;
+	}
+	params->vlOffset.gain1 = 20;
+	params->vlOffset.gain2 = 24;
+	params->vlOffset.gain4 = 26;
+	params->vlOffset.gain8 = 26;
+	*command_flags |= COMMAND_SETVLOFFSET;
+#undef FIRMWARE_VERSION
+#undef EXP_FROM_COMP
+#undef COMPGAIN
+}
+
+#define FIRMWARE_VERSION(x,y) (cam->params.version.firmwareVersion == (x) && \
+                               cam->params.version.firmwareRevision == (y))
+/* monitor the exposure and adjust the sensor frame rate if needed */
+static void monitor_exposure(struct cam_data *cam)
+{
+	u8 exp_acc, bcomp, gain, coarseL, cmd[8], data[8];
+	int retval, light_exp, dark_exp, very_dark_exp;
+	int old_exposure, new_exposure, framerate;
+	
+	/* get necessary stats and register settings from camera */
+	/* do_command can't handle this, so do it ourselves */
+	cmd[0] = CPIA_COMMAND_ReadVPRegs>>8;
+	cmd[1] = CPIA_COMMAND_ReadVPRegs&0xff;
+	cmd[2] = 30;
+	cmd[3] = 4;
+	cmd[4] = 9;
+	cmd[5] = 8;
+	cmd[6] = 8;
+	cmd[7] = 0;
+	retval = cam->ops->transferCmd(cam->lowlevel_data, cmd, data);
+	if (retval) {
+		LOG("ReadVPRegs(30,4,9,8) - failed, retval=%d\n",
+		    retval);
+		return;
+	}
+	exp_acc = data[0];
+	bcomp = data[1];
+	gain = data[2];
+	coarseL = data[3];
+
+	down(&cam->param_lock);
+	light_exp = cam->params.colourParams.brightness +
+	            TC - 50 + EXP_ACC_LIGHT;
+	if(light_exp > 255)
+		light_exp = 255;
+	dark_exp = cam->params.colourParams.brightness +
+	           TC - 50 - EXP_ACC_DARK;
+	if(dark_exp < 0)
+		dark_exp = 0;
+	very_dark_exp = dark_exp/2;
+	
+	old_exposure = cam->params.exposure.coarseExpHi * 256 +
+	               cam->params.exposure.coarseExpLo;
+
+	if(!cam->params.flickerControl.disabled) {
+		/* Flicker control on */
+		int max_comp = FIRMWARE_VERSION(1,2) ? MAX_COMP : HIGH_COMP_102;
+		bcomp += 128;	/* decode */
+		if(bcomp >= max_comp && exp_acc < dark_exp) {
+			/* dark */
+			if(exp_acc < very_dark_exp) {
+				/* very dark */
+				if(cam->exposure_status == EXPOSURE_VERY_DARK)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_VERY_DARK;
+					cam->exposure_count = 1;
+				}
+			} else {
+				/* just dark */
+				if(cam->exposure_status == EXPOSURE_DARK)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_DARK;
+					cam->exposure_count = 1;
+				}
+			}
+		} else if(old_exposure <= LOW_EXP || exp_acc > light_exp) {
+			/* light */
+			if(old_exposure <= VERY_LOW_EXP) {
+				/* very light */
+				if(cam->exposure_status == EXPOSURE_VERY_LIGHT)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_VERY_LIGHT;
+					cam->exposure_count = 1;
+				}
+			} else {
+				/* just light */
+				if(cam->exposure_status == EXPOSURE_LIGHT)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_LIGHT;
+					cam->exposure_count = 1;
+				}
+			}
+		} else {
+			/* not dark or light */
+			cam->exposure_status = EXPOSURE_NORMAL;
+		}
+	} else {
+		/* Flicker control off */
+		if(old_exposure >= MAX_EXP && exp_acc < dark_exp) {
+			/* dark */
+			if(exp_acc < very_dark_exp) {
+				/* very dark */
+				if(cam->exposure_status == EXPOSURE_VERY_DARK)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_VERY_DARK;
+					cam->exposure_count = 1;
+				}
+			} else {
+				/* just dark */
+				if(cam->exposure_status == EXPOSURE_DARK)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_DARK;
+					cam->exposure_count = 1;
+				}
+			}
+		} else if(old_exposure <= LOW_EXP || exp_acc > light_exp) {
+			/* light */
+			if(old_exposure <= VERY_LOW_EXP) {
+				/* very light */
+				if(cam->exposure_status == EXPOSURE_VERY_LIGHT)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_VERY_LIGHT;
+					cam->exposure_count = 1;
+				}
+			} else {
+				/* just light */
+				if(cam->exposure_status == EXPOSURE_LIGHT)
+					++cam->exposure_count;
+				else {
+					cam->exposure_status = EXPOSURE_LIGHT;
+					cam->exposure_count = 1;
+				}
+			}
+		} else {
+			/* not dark or light */
+			cam->exposure_status = EXPOSURE_NORMAL;
+		}
+	}
+	
+	framerate = cam->fps;
+	if(framerate > 30 || framerate < 1)
+		framerate = 1;
+	
+	if(!cam->params.flickerControl.disabled) {
+		/* Flicker control on */
+		if((cam->exposure_status == EXPOSURE_VERY_DARK ||
+		    cam->exposure_status == EXPOSURE_DARK) &&
+		   cam->exposure_count >= DARK_TIME*framerate &&
+		   cam->params.sensorFps.divisor < 3) {
+
+			/* dark for too long */
+			++cam->params.sensorFps.divisor;
+			cam->cmd_queue |= COMMAND_SETSENSORFPS;
+
+			cam->params.flickerControl.coarseJump = 
+				flicker_jumps[cam->mainsFreq]
+				             [cam->params.sensorFps.baserate]
+				             [cam->params.sensorFps.divisor];
+			cam->cmd_queue |= COMMAND_SETFLICKERCTRL;
+
+			new_exposure = cam->params.flickerControl.coarseJump-1;
+			while(new_exposure < old_exposure/2)
+				new_exposure += cam->params.flickerControl.coarseJump;
+			cam->params.exposure.coarseExpLo = new_exposure & 0xff;
+			cam->params.exposure.coarseExpHi = new_exposure >> 8;
+			cam->cmd_queue |= COMMAND_SETEXPOSURE;
+			cam->exposure_status = EXPOSURE_NORMAL;
+			LOG("Automatically decreasing sensor_fps\n");
+
+		} else if((cam->exposure_status == EXPOSURE_VERY_LIGHT ||
+		    cam->exposure_status == EXPOSURE_LIGHT) &&
+		   cam->exposure_count >= LIGHT_TIME*framerate &&
+		   cam->params.sensorFps.divisor > 0) {
+
+			/* light for too long */
+		   	int max_exp = FIRMWARE_VERSION(1,2) ? MAX_EXP_102 : MAX_EXP ; 
+
+			--cam->params.sensorFps.divisor;
+			cam->cmd_queue |= COMMAND_SETSENSORFPS;
+
+			cam->params.flickerControl.coarseJump = 
+				flicker_jumps[cam->mainsFreq]
+				             [cam->params.sensorFps.baserate]
+				             [cam->params.sensorFps.divisor];
+			cam->cmd_queue |= COMMAND_SETFLICKERCTRL;
+
+			new_exposure = cam->params.flickerControl.coarseJump-1;
+			while(new_exposure < 2*old_exposure &&
+			      new_exposure+
+			      cam->params.flickerControl.coarseJump < max_exp)
+				new_exposure += cam->params.flickerControl.coarseJump;
+			cam->params.exposure.coarseExpLo = new_exposure & 0xff;
+			cam->params.exposure.coarseExpHi = new_exposure >> 8;
+			cam->cmd_queue |= COMMAND_SETEXPOSURE;
+			cam->exposure_status = EXPOSURE_NORMAL;
+			LOG("Automatically increasing sensor_fps\n");
+		}
+	} else {
+		/* Flicker control off */
+		if((cam->exposure_status == EXPOSURE_VERY_DARK ||
+		    cam->exposure_status == EXPOSURE_DARK) &&
+		   cam->exposure_count >= DARK_TIME*framerate &&
+		   cam->params.sensorFps.divisor < 3) {
+
+			/* dark for too long */
+			++cam->params.sensorFps.divisor;
+			cam->cmd_queue |= COMMAND_SETSENSORFPS;
+
+			if(cam->params.exposure.gain > 0) {
+				--cam->params.exposure.gain;
+				cam->cmd_queue |= COMMAND_SETEXPOSURE;
+			}
+			cam->exposure_status = EXPOSURE_NORMAL;
+			LOG("Automatically decreasing sensor_fps\n");
+
+		} else if((cam->exposure_status == EXPOSURE_VERY_LIGHT ||
+		    cam->exposure_status == EXPOSURE_LIGHT) &&
+		   cam->exposure_count >= LIGHT_TIME*framerate &&
+		   cam->params.sensorFps.divisor > 0) {
+
+			/* light for too long */
+			--cam->params.sensorFps.divisor;
+			cam->cmd_queue |= COMMAND_SETSENSORFPS;
+
+			if(cam->params.exposure.gain <
+			   cam->params.exposure.gainMode-1) {
+				++cam->params.exposure.gain;
+				cam->cmd_queue |= COMMAND_SETEXPOSURE;
+			}
+			cam->exposure_status = EXPOSURE_NORMAL;
+			LOG("Automatically increasing sensor_fps\n");
+		}
+	}
+	up(&cam->param_lock);
+}
+
+/*-----------------------------------------------------------------*/
+/* if flicker is switched off, this function switches it back on.It checks,
+   however, that conditions are suitable before restarting it.
+   This should only be called for firmware version 1.2.
+
+   It also adjust the colour balance when an exposure step is detected - as
+   long as flicker is running
+*/   
+static void restart_flicker(struct cam_data *cam)
+{
+	int cam_exposure, old_exp;
+	if(!FIRMWARE_VERSION(1,2))
+		return;
+	down(&cam->param_lock);
+	if(cam->params.flickerControl.flickerMode == 0 ||
+	   cam->raw_image[39] == 0) {
+		up(&cam->param_lock);
+		return;
+	}
+	cam_exposure = cam->raw_image[39]*2;
+	old_exp = cam->params.exposure.coarseExpLo +
+	          cam->params.exposure.coarseExpHi*256;
+ 	/* 
+	  see how far away camera exposure is from a valid 
+ 	  flicker exposure value
+ 	*/
+ 	cam_exposure %= cam->params.flickerControl.coarseJump;
+	if(!cam->params.flickerControl.disabled &&
+     	   cam_exposure <= cam->params.flickerControl.coarseJump - 3) {
+		/* Flicker control auto-disabled */
+		cam->params.flickerControl.disabled = 1;
+	}
+	
+	if(cam->params.flickerControl.disabled &&
+	   cam->params.flickerControl.flickerMode &&
+	   old_exp > cam->params.flickerControl.coarseJump +
+	             ROUND_UP_EXP_FOR_FLICKER) {
+		/* exposure is now high enough to switch
+		   flicker control back on */
+		set_flicker(&cam->params, &cam->cmd_queue, 1);
+		if((cam->cmd_queue & COMMAND_SETEXPOSURE) &&
+		   cam->params.exposure.expMode == 2)
+			cam->exposure_status = EXPOSURE_NORMAL;
+
+	}
+	up(&cam->param_lock);
+}
+#undef FIRMWARE_VERSION
+
+static int clear_stall(struct cam_data *cam)
+{
+	/* FIXME: Does this actually work? */
+	LOG("Clearing stall\n");
+	
+	cam->ops->streamRead(cam->lowlevel_data, cam->raw_image, 0);
+	do_command(cam, CPIA_COMMAND_GetCameraStatus,0,0,0,0);
+	return cam->params.status.streamState != STREAM_PAUSED;
+}
+
 /* kernel thread function to read image from camera */
-static void fetch_frame(void *data)
+static int fetch_frame(void *data)
 {
 	int image_size, retry;
 	struct cam_data *cam = (struct cam_data *)data;
@@ -2179,41 +2832,54 @@
 
 		/* load first frame always uncompressed */
 		if (cam->first_frame &&
-		    cam->params.compression.mode != CPIA_COMPRESSION_NONE)
+		    cam->params.compression.mode != CPIA_COMPRESSION_NONE) {
 			do_command(cam, CPIA_COMMAND_SetCompression,
 				   CPIA_COMPRESSION_NONE,
 				   NO_DECIMATION, 0, 0);
+			/* Trial & error - Discarding a frame prevents the
+			   first frame from having an error in the data. */
+			do_command(cam, CPIA_COMMAND_DiscardFrame, 0, 0, 0, 0);
+		}
 
 		/* init camera upload */
-		if (do_command(cam, CPIA_COMMAND_SetGrabMode,
-			       CPIA_GRAB_CONTINUOUS, 0, 0, 0))
-			continue;
-
 		if (do_command(cam, CPIA_COMMAND_GrabFrame, 0,
 			       cam->params.streamStartLine, 0, 0))
 			continue;
 
 		if (cam->ops->wait_for_stream_ready) {
 			/* loop until image ready */
+			int count = 0;
 			do_command(cam, CPIA_COMMAND_GetCameraStatus,0,0,0,0);
 			while (cam->params.status.streamState != STREAM_READY) {
+				if(++count > READY_TIMEOUT)
+					break;
+				if(cam->params.status.streamState ==
+				   STREAM_PAUSED) {
+					/* Bad news */
+					if(!clear_stall(cam))
+						return -EIO;
+				}
+
 				cond_resched();
 
+				/* sleep for 10 ms, hopefully ;) */
 				current->state = TASK_INTERRUPTIBLE;
 
-				/* sleep for 10 ms, hopefully ;) */
 				schedule_timeout(10*HZ/1000);
 				if (signal_pending(current))
-					return;
+					return -EINTR;
 
 				do_command(cam, CPIA_COMMAND_GetCameraStatus,
 				           0, 0, 0, 0);
 			}
+			if(cam->params.status.streamState != STREAM_READY) {
+				continue;
+			}
 		}
 
-		/* grab image from camera */
 		cond_resched();
 
+		/* grab image from camera */
 		oldjif = jiffies;
 		image_size = cam->ops->streamRead(cam->lowlevel_data,
 						  cam->raw_image, 0);
@@ -2227,6 +2893,14 @@
 		cam->transfer_rate = diff==0 ? rate : rate/diff;
 			/* diff==0 ? unlikely but possible */
 
+		/* Switch flicker control back on if it got turned off */
+		restart_flicker(cam);
+		
+		/* If AEC is enabled, monitor the exposure and
+		   adjust the sensor frame rate if needed */
+		if(cam->params.exposure.expMode == 2)
+			monitor_exposure(cam);
+		
 		/* camera idle now so dispatch queued commands */
 		dispatch_commands(cam);
 
@@ -2238,12 +2912,28 @@
 		/* decompress and convert image to by copying it from
 		 * raw_image to decompressed_frame
 		 */
+
 		cond_resched();
 
 		cam->image_size = parse_picture(cam, image_size);
-		if (cam->image_size <= 0)
+		if (cam->image_size <= 0) {
 			DBG("parse_picture failed %d\n", cam->image_size);
-		else
+			if(cam->params.compression.mode !=
+			   CPIA_COMPRESSION_NONE) {
+				/* Compression may not work right if we
+				   had a bad frame, get the next one
+				   uncompressed. */
+				cam->first_frame = 1;
+				do_command(cam, CPIA_COMMAND_SetGrabMode,
+		        		   CPIA_GRAB_SINGLE, 0, 0, 0);
+				/* FIXME: Trial & error - need up to 70ms for
+				   the grab mode change to complete ? */
+				current->state = TASK_INTERRUPTIBLE;
+				schedule_timeout(70*HZ / 1000);
+				if (signal_pending(current))
+					return -EINTR;
+			}
+		} else
 			break;
 	}
 
@@ -2257,66 +2947,51 @@
 		} else
 			cam->decompressed_frame.state = FRAME_DONE;
 
-#if 0
-		if (cam->first_frame &&
-		    cam->params.compression.mode != CPIA_COMPRESSION_NONE) {
-			cam->first_frame = 0;
-			cam->cmd_queue |= COMMAND_SETCOMPRESSION;
-		}
-#else
 		if (cam->first_frame) {
 			cam->first_frame = 0;
-			cam->cmd_queue |= COMMAND_SETCOMPRESSION;
-			cam->cmd_queue |= COMMAND_SETEXPOSURE;
+			do_command(cam, CPIA_COMMAND_SetCompression,
+		        	   cam->params.compression.mode,
+				   cam->params.compression.decimation, 0, 0);
+
+			/* Switch from single-grab to continuous grab */
+			do_command(cam, CPIA_COMMAND_SetGrabMode,
+		        	   CPIA_GRAB_CONTINUOUS, 0, 0, 0);
 		}
-#endif
+		return 0;
 	}
+	return -EIO;
 }
 
 static int capture_frame(struct cam_data *cam, struct video_mmap *vm)
 {
-	int retval = 0;
-
 	if (!cam->frame_buf) {
 		/* we do lazy allocation */
-		if ((retval = allocate_frame_buf(cam)))
-			return retval;
+		int err;
+		if ((err = allocate_frame_buf(cam)))
+			return err;
 	}
 	
-	/* FIXME: the first frame seems to be captured by the camera
-	   without regards to any initial settings, so we throw away
-	   that one, the next one is generated with our settings
-	   (exposure, color balance, ...)
-	*/
-	if (cam->first_frame) {
-		cam->curframe = vm->frame;
-		cam->frame[cam->curframe].state = FRAME_READY;
-		fetch_frame(cam);
-		if (cam->frame[cam->curframe].state != FRAME_DONE)
-			retval = -EIO;
-	}
 	cam->curframe = vm->frame;
 	cam->frame[cam->curframe].state = FRAME_READY;
-	fetch_frame(cam);
-	if (cam->frame[cam->curframe].state != FRAME_DONE)
-		retval=-EIO;
-
-	return retval;
+	return fetch_frame(cam);
 }
   
 static int goto_high_power(struct cam_data *cam)
 {
 	if (do_command(cam, CPIA_COMMAND_GotoHiPower, 0, 0, 0, 0))
-		return -1;
-	mdelay(100);		/* windows driver does it too */
+		return -EIO;
+	current->state = TASK_INTERRUPTIBLE;
+	schedule_timeout(40*HZ/1000);	/* windows driver does it too */
+	if(signal_pending(current))
+		return -EINTR;
 	if (do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0))
-		return -1;
+		return -EIO;
 	if (cam->params.status.systemState == HI_POWER_STATE) {
 		DBG("camera now in HIGH power state\n");
 		return 0;
 	}
 	printstatus(cam);
-	return -1;
+	return -EIO;
 }
 
 static int goto_low_power(struct cam_data *cam)
@@ -2335,8 +3010,10 @@
 
 static void save_camera_state(struct cam_data *cam)
 {
-	do_command(cam, CPIA_COMMAND_GetColourBalance, 0, 0, 0, 0);
-	do_command(cam, CPIA_COMMAND_GetExposure, 0, 0, 0, 0);
+	if(!(cam->cmd_queue & COMMAND_SETCOLOURBALANCE))
+		do_command(cam, CPIA_COMMAND_GetColourBalance, 0, 0, 0, 0);
+	if(!(cam->cmd_queue & COMMAND_SETEXPOSURE))
+		do_command(cam, CPIA_COMMAND_GetExposure, 0, 0, 0, 0);
 
 	DBG("%d/%d/%d/%d/%d/%d/%d/%d\n",
 	     cam->params.exposure.gain,
@@ -2353,44 +3030,8 @@
 	     cam->params.colourBalance.blueGain);
 }
 
-static void set_camera_state(struct cam_data *cam)
+static int set_camera_state(struct cam_data *cam)
 {
-	if(cam->params.colourBalance.balanceModeIsAuto) {
-		do_command(cam, CPIA_COMMAND_SetColourBalance, 
-	        	   2, 0, 0, 0);
-	} else {
-		do_command(cam, CPIA_COMMAND_SetColourBalance, 
-	        	   1,
-	        	   cam->params.colourBalance.redGain,
-	        	   cam->params.colourBalance.greenGain,
-	        	   cam->params.colourBalance.blueGain);
-		do_command(cam, CPIA_COMMAND_SetColourBalance, 
-	        	   3, 0, 0, 0);
-	}
-
-
-	do_command_extended(cam, CPIA_COMMAND_SetExposure,
-			    cam->params.exposure.gainMode, 1, 1,
-			    cam->params.exposure.centreWeight,
-	                    cam->params.exposure.gain,
-	                    cam->params.exposure.fineExp,
-	                    cam->params.exposure.coarseExpLo,
-	                    cam->params.exposure.coarseExpHi,
-			    cam->params.exposure.redComp,
-			    cam->params.exposure.green1Comp,
-			    cam->params.exposure.green2Comp,
-			    cam->params.exposure.blueComp);
-	do_command_extended(cam, CPIA_COMMAND_SetExposure,
-			    0, 3, 0, 0,
-			    0, 0, 0, 0, 0, 0, 0, 0);
-
-	if (!cam->params.exposure.gainMode)
-		cam->params.exposure.gainMode = 2;
-	if (!cam->params.exposure.expMode)
-		cam->params.exposure.expMode = 2;
-	if (!cam->params.exposure.centreWeight)
-		cam->params.exposure.centreWeight = 1;
-	
 	cam->cmd_queue = COMMAND_SETCOMPRESSION |
 	                 COMMAND_SETCOMPRESSIONTARGET |
 	                 COMMAND_SETCOLOURPARAMS |
@@ -2398,18 +3039,29 @@
 	                 COMMAND_SETYUVTHRESH |
 	                 COMMAND_SETECPTIMING |
 	                 COMMAND_SETCOMPRESSIONPARAMS |
-#if 0
 	                 COMMAND_SETEXPOSURE |
-#endif
 	                 COMMAND_SETCOLOURBALANCE |
 	                 COMMAND_SETSENSORFPS |
 	                 COMMAND_SETAPCOR |
 	                 COMMAND_SETFLICKERCTRL |
 	                 COMMAND_SETVLOFFSET;
+
+	do_command(cam, CPIA_COMMAND_SetGrabMode, CPIA_GRAB_SINGLE,0,0,0);
 	dispatch_commands(cam);
+	
+	/* Wait 6 frames for the sensor to get all settings and
+	   AEC/ACB to settle */
+	current->state = TASK_INTERRUPTIBLE;
+	schedule_timeout((6*(cam->params.sensorFps.baserate ? 33 : 40) *
+	                    (1 << cam->params.sensorFps.divisor) + 10) *
+			 HZ / 1000);
+
+	if(signal_pending(current))
+		return -EINTR;
+	
 	save_camera_state(cam);
 
-	return;
+	return 0;
 }
 
 static void get_version_information(struct cam_data *cam)
@@ -2424,14 +3076,16 @@
 /* initialize camera */
 static int reset_camera(struct cam_data *cam)
 {
+	int err;
 	/* Start the camera in low power mode */
 	if (goto_low_power(cam)) {
 		if (cam->params.status.systemState != WARM_BOOT_STATE)
 			return -ENODEV;
 
 		/* FIXME: this is just dirty trial and error */
-		reset_camera_struct(cam);
-		goto_high_power(cam);
+		err = goto_high_power(cam);
+		if(err)
+			return err;
 		do_command(cam, CPIA_COMMAND_DiscardFrame, 0, 0, 0, 0);
 		if (goto_low_power(cam))
 			return -ENODEV;
@@ -2439,12 +3093,18 @@
 	
 	/* procedure described in developer's guide p3-28 */
 	
-	/* Check the firmware version FIXME: should we check PNPID? */
+	/* Check the firmware version. */
 	cam->params.version.firmwareVersion = 0;
 	get_version_information(cam);
 	if (cam->params.version.firmwareVersion != 1)
 		return -ENODEV;
 
+	/* A bug in firmware 1-02 limits gainMode to 2 */
+	if(cam->params.version.firmwareRevision <= 2 &&
+	   cam->params.exposure.gainMode > 2) {
+		cam->params.exposure.gainMode = 2;
+	}
+
 	/* set QX3 detected flag */
 	cam->params.qx3.qx3_detected = (cam->params.pnpID.vendor == 0x0813 &&
 					cam->params.pnpID.product == 0x0001);
@@ -2458,8 +3118,9 @@
 	           STREAM_NOT_READY, 0);
 	
 	/* GotoHiPower */
-	if (goto_high_power(cam))
-		return -ENODEV;
+	err = goto_high_power(cam);
+	if (err)
+		return err;
 
 	/* Check the camera status */
 	if (do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0))
@@ -2492,9 +3153,13 @@
 	do_command(cam, CPIA_COMMAND_GetVPVersion, 0, 0, 0, 0);
 
 	/* set camera to a known state */
-	set_camera_state(cam);
-	
-	return 0;
+	return set_camera_state(cam);
+}
+
+static void put_cam(struct cpia_camera_ops* ops)
+{
+	if (ops->owner)
+		__MOD_DEC_USE_COUNT(ops->owner);
 }
 
 /* ------------------------- V4L interface --------------------- */
@@ -2508,7 +3173,10 @@
 		DBG("Internal error, cam_data not found!\n");
 		return -ENODEV;
 	}
-	    
+
+	if (!try_inc_mod_count(cam->ops->owner))
+		return -ENODEV;
+
 	down(&cam->busy_lock);
 	err = -EBUSY;
 	if (cam->open_count > 0) {
@@ -2522,7 +3190,7 @@
 		if (!cam->raw_image)
 			goto oops;
 	}
-
+	
 	if (!cam->decompressed_frame.data) {
 		cam->decompressed_frame.data = rvmalloc(CPIA_MAX_FRAME_SIZE);
 		if (!cam->decompressed_frame.data)
@@ -2539,6 +3207,9 @@
 		cam->ops->close(cam->lowlevel_data);
 		goto oops;
 	}
+
+	if(signal_pending(current))
+		return -EINTR;
 	
 	/* Set ownership of /proc/cpia/videoX to current user */
 	if(cam->proc_entry)
@@ -2552,6 +3223,7 @@
 	
 	++cam->open_count;
 	file->private_data = dev;
+	up(&cam->busy_lock);
 	return 0;
 
  oops:
@@ -2564,6 +3236,7 @@
 		cam->raw_image = NULL;
 	}
 	up(&cam->busy_lock);
+	put_cam(cam->ops);
 	return err;
 }
 
@@ -2591,6 +3264,8 @@
 
 		/* close cpia */
 		cam->ops->close(cam->lowlevel_data);
+
+		put_cam(cam->ops);
 	}
 
 	if (--cam->open_count == 0) {
@@ -2621,6 +3296,7 @@
 {
 	struct video_device *dev = file->private_data;
 	struct cam_data *cam = dev->priv;
+	int err;
 
 	/* make this _really_ smp and multithread-safe */
 	if (down_interruptible(&cam->busy_lock))
@@ -2647,19 +3323,17 @@
 	/* upload frame */
 	cam->decompressed_frame.state = FRAME_READY;
 	cam->mmap_kludge=0;
-	fetch_frame(cam);
-	if (cam->decompressed_frame.state != FRAME_DONE) {
-		DBG("upload failed %d/%d\n", cam->decompressed_frame.count,
-		    cam->decompressed_frame.state);
+	if((err = fetch_frame(cam)) != 0) {
+		DBG("ERROR from fetch_frame: %d\n", err);
 		up(&cam->busy_lock);
-		return -EIO;
+		return err;
 	}
 	cam->decompressed_frame.state = FRAME_UNUSED;
 
 	/* copy data to user space */
 	if (cam->decompressed_frame.count > count) {
 		DBG("count wrong: %d, %lu\n", cam->decompressed_frame.count,
-		    count);
+		    (unsigned long) count);
 		up(&cam->busy_lock);
 		return -EFAULT;
 	}
@@ -2698,7 +3372,7 @@
 
 		DBG("VIDIOCGCAP\n");
 		strcpy(b->name, "CPiA Camera");
-		b->type = VID_TYPE_CAPTURE;
+		b->type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
 		b->channels = 1;
 		b->audios = 0;
 		b->maxwidth = 352;	/* VIDEOSIZE_CIF */
@@ -2754,8 +3428,8 @@
 		DBG("VIDIOCSPICT\n");
 
 		/* check validity */
-		DBG("palette: %d\n", vp.palette);
-		DBG("depth: %d\n", vp.depth);
+		DBG("palette: %d\n", vp->palette);
+		DBG("depth: %d\n", vp->depth);
 		if (!valid_mode(vp->palette, vp->depth)) {
 			retval = -EINVAL;
 			break;
@@ -2825,6 +3499,10 @@
 				break;
 			}
 			cam->video_size = video_size;
+
+			/* video size is changing, reset the subcapture area */
+			memset(&cam->vc, 0, sizeof(cam->vc));
+			
 			set_vw_size(cam);
 			DBG("%d / %d\n", cam->vw.width, cam->vw.height);
 			cam->cmd_queue |= COMMAND_SETFORMAT;
@@ -2904,6 +3582,10 @@
 		}
 		if (video_size != cam->video_size) {
 			cam->video_size = video_size;
+
+			/* video size is changing, reset the subcapture area */
+			memset(&cam->vc, 0, sizeof(cam->vc));
+			
 			set_vw_size(cam);
 			cam->cmd_queue |= COMMAND_SETFORMAT;
 			dispatch_commands(cam);
@@ -2946,6 +3628,77 @@
 		break;
 	}
 
+	case VIDIOCGCAPTURE:
+		DBG("VIDIOCGCAPTURE\n");
+		if (copy_to_user(arg, &cam->vc, sizeof(struct video_capture)))
+			retval = -EFAULT;
+		break;
+
+	case VIDIOCSCAPTURE:
+	{
+		struct video_capture vc;
+
+		DBG("VIDIOCSCAPTURE\n");
+		if (copy_from_user(&vc, arg, sizeof(vc))) {
+			retval = -EFAULT;
+			break;
+		}
+
+		if (vc.decimation != 0) {    /* How should this be used? */
+			retval = -EINVAL;
+			break;
+		}
+		if (vc.flags != 0) {     /* Even/odd grab not supported */
+			retval = -EINVAL;
+			break;
+		}
+		
+		/* Clip to the resolution we can set for the ROI
+		   (every 8 columns and 4 rows) */
+		vc.x      = vc.x      & ~(__u32)7;
+		vc.y      = vc.y      & ~(__u32)3;
+		vc.width  = vc.width  & ~(__u32)7;
+		vc.height = vc.height & ~(__u32)3;
+
+		if(vc.width == 0 || vc.height == 0 ||
+		   vc.x + vc.width  > cam->vw.width ||
+		   vc.y + vc.height > cam->vw.height) {
+			retval = -EINVAL;
+			break;
+		}
+
+		DBG("%d,%d/%dx%d\n", vc.x,vc.y,vc.width, vc.height);
+		
+		down(&cam->param_lock);
+		
+		cam->vc.x      = vc.x;
+		cam->vc.y      = vc.y;
+		cam->vc.width  = vc.width;
+		cam->vc.height = vc.height;
+		
+		set_vw_size(cam);
+		cam->cmd_queue |= COMMAND_SETFORMAT;
+
+		up(&cam->param_lock);
+
+		/* setformat ignored by camera during streaming,
+		 * so stop/dispatch/start */
+		dispatch_commands(cam);
+		break;
+	}
+	
+	case VIDIOCGUNIT:
+	{
+		struct video_unit vu;
+		vu.video    = cam->vdev.minor;
+		vu.vbi      = VIDEO_NO_UNIT;
+		vu.radio    = VIDEO_NO_UNIT;
+		vu.audio    = VIDEO_NO_UNIT;
+		vu.teletext = VIDEO_NO_UNIT;
+		break;
+	}
+		
+
 	/* pointless to implement overlay with this camera */
 	case VIDIOCCAPTURE:
 	case VIDIOCGFBUF:
@@ -2966,7 +3719,6 @@
 		break;
 	}
 
-	up(&cam->param_lock);
 	up(&cam->busy_lock);
 	return retval;
 } 
@@ -3057,7 +3809,7 @@
 	cam->params.colourParams.brightness = 50;
 	cam->params.colourParams.contrast = 48;
 	cam->params.colourParams.saturation = 50;
-	cam->params.exposure.gainMode = 2;
+	cam->params.exposure.gainMode = 4;
 	cam->params.exposure.expMode = 2;		/* AEC */
 	cam->params.exposure.compMode = 1;
 	cam->params.exposure.centreWeight = 1;
@@ -3065,27 +3817,31 @@
 	cam->params.exposure.fineExp = 0;
 	cam->params.exposure.coarseExpLo = 185;
 	cam->params.exposure.coarseExpHi = 0;
-	cam->params.exposure.redComp = 220;
-	cam->params.exposure.green1Comp = 214;
-	cam->params.exposure.green2Comp = 214;
-	cam->params.exposure.blueComp = 230;
-	cam->params.colourBalance.balanceModeIsAuto = 1;
+	cam->params.exposure.redComp = COMP_RED;
+	cam->params.exposure.green1Comp = COMP_GREEN1;
+	cam->params.exposure.green2Comp = COMP_GREEN2;
+	cam->params.exposure.blueComp = COMP_BLUE;
+	cam->params.colourBalance.balanceMode = 2;	/* ACB */
 	cam->params.colourBalance.redGain = 32;
 	cam->params.colourBalance.greenGain = 6;
 	cam->params.colourBalance.blueGain = 92;
-	cam->params.apcor.gain1 = 0x1c;
-	cam->params.apcor.gain2 = 0x1a;
-	cam->params.apcor.gain4 = 0x2d;
-	cam->params.apcor.gain8 = 0x2a;
+	cam->params.apcor.gain1 = 0x18;
+	cam->params.apcor.gain2 = 0x16;
+	cam->params.apcor.gain4 = 0x24;
+	cam->params.apcor.gain8 = 0x34;
 	cam->params.flickerControl.flickerMode = 0;
+	cam->params.flickerControl.disabled = 1;
+
 	cam->params.flickerControl.coarseJump = 
 		flicker_jumps[cam->mainsFreq]
 		             [cam->params.sensorFps.baserate]
 		             [cam->params.sensorFps.divisor];
-	cam->params.vlOffset.gain1 = 24;
-	cam->params.vlOffset.gain2 = 28;
-	cam->params.vlOffset.gain4 = 30;
-	cam->params.vlOffset.gain8 = 30;
+	cam->params.flickerControl.allowableOverExposure = 
+		-find_over_exposure(cam->params.colourParams.brightness);
+	cam->params.vlOffset.gain1 = 20;
+	cam->params.vlOffset.gain2 = 24;
+	cam->params.vlOffset.gain4 = 26;
+	cam->params.vlOffset.gain8 = 26;
 	cam->params.compressionParams.hysteresis = 3;
 	cam->params.compressionParams.threshMax = 11;
 	cam->params.compressionParams.smallStep = 1;
@@ -3097,6 +3853,7 @@
 	/* End of default values from Software Developer's Guide */
 	
 	cam->transfer_rate = 0;
+	cam->exposure_status = EXPOSURE_NORMAL;
 	
 	/* Set Sensor FPS to 15fps. This seems better than 30fps
 	 * for indoor lighting. */
@@ -3131,17 +3888,21 @@
 	cam->vp.depth = 24;          /* to be set by user */
 	cam->vp.palette = VIDEO_PALETTE_RGB24; /* to be set by user */
 
+	cam->vc.x = 0;
+	cam->vc.y = 0;
+	cam->vc.width = 0;
+	cam->vc.height = 0;
+	
 	cam->vw.x = 0;
 	cam->vw.y = 0;
 	set_vw_size(cam);
 	cam->vw.chromakey = 0;
-	/* PP NOTE: my extension to use vw.flags for this, bear it! */
 	cam->vw.flags = 0;
 	cam->vw.clipcount = 0;
 	cam->vw.clips = NULL;
 
 	cam->cmd_queue = COMMAND_NONE;
-	cam->first_frame = 0;
+	cam->first_frame = 1;
 
 	return;
 }
diff -Nru a/drivers/media/video/cpia.h b/drivers/media/video/cpia.h
--- a/drivers/media/video/cpia.h	Wed Oct 30 16:44:33 2002
+++ b/drivers/media/video/cpia.h	Wed Oct 30 16:44:33 2002
@@ -26,13 +26,13 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define CPIA_MAJ_VER	0
-#define CPIA_MIN_VER    8
-#define CPIA_PATCH_VER	1
-
-#define CPIA_PP_MAJ_VER       0
-#define CPIA_PP_MIN_VER       8
-#define CPIA_PP_PATCH_VER     1
+#define CPIA_MAJ_VER	1
+#define CPIA_MIN_VER    2
+#define CPIA_PATCH_VER	2
+
+#define CPIA_PP_MAJ_VER       1
+#define CPIA_PP_MIN_VER       2
+#define CPIA_PP_PATCH_VER     2
 
 #define CPIA_MAX_FRAME_SIZE_UNALIGNED	(352 * 288 * 4)   /* CIF at RGB32 */
 #define CPIA_MAX_FRAME_SIZE	((CPIA_MAX_FRAME_SIZE_UNALIGNED + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) /* align above to PAGE_SIZE */
@@ -93,6 +93,11 @@
 	 * is STREAM_READY before calling streamRead.
 	 */
 	int wait_for_stream_ready;
+
+	/* 
+	 * Used to maintain lowlevel module usage counts
+	 */
+	struct module *owner;
 };
 
 struct cpia_frame {
@@ -150,7 +155,7 @@
 		u8 blueComp;
 	} exposure;
 	struct {
-		u8 balanceModeIsAuto;
+		u8 balanceMode;
 		u8 redGain;
 		u8 greenGain;
 		u8 blueGain;
@@ -166,9 +171,10 @@
 		u8 gain8;
 	} apcor;
 	struct {
+		u8 disabled;
 		u8 flickerMode;
 		u8 coarseJump;
-		u8 allowableOverExposure;
+		int allowableOverExposure;
 	} flickerControl;
 	struct {
 		u8 gain1;
@@ -261,6 +267,7 @@
 	struct video_device vdev;	/* v4l videodev */
 	struct video_picture vp;	/* v4l camera settings */
 	struct video_window vw;		/* v4l capture area */
+	struct video_capture vc;       	/* v4l subcapture area */
 
 				/* mmap interface */
 	int curframe;			/* the current frame to grab into */
@@ -271,6 +278,8 @@
 	int first_frame;
 	int mmap_kludge;		/* 'wrong' byte order for mmap */
 	volatile u32 cmd_queue;		/* queued commands */
+	int exposure_status;		/* EXPOSURE_* */
+	int exposure_count;		/* number of frames at this status */
 };
 
 /* cpia_register_camera is called by low level driver for each camera.
@@ -382,15 +391,27 @@
 #define VP_STATE_ACB_RMAX		0x40
 #define VP_STATE_ACB_GMAX		0x80
 
+/* default (minimum) compensation values */
+#define COMP_RED        220
+#define COMP_GREEN1     214
+#define COMP_GREEN2     COMP_GREEN1
+#define COMP_BLUE       230
+
+/* exposure status */
+#define EXPOSURE_VERY_LIGHT 0
+#define EXPOSURE_LIGHT      1
+#define EXPOSURE_NORMAL     2
+#define EXPOSURE_DARK       3
+#define EXPOSURE_VERY_DARK  4
+
 /* ErrorCode */
 #define ERROR_FLICKER_BELOW_MIN_EXP     0x01 /*flicker exposure got below minimum exposure */
-
 #define ALOG(fmt,args...) printk(fmt, ##args)
 #define LOG(fmt,args...) ALOG(KERN_INFO __FILE__ ":%s(%d):" fmt, __FUNCTION__ , __LINE__ , ##args)
 
 #ifdef _CPIA_DEBUG_
-#define ADBG(lineno,fmt,args...) printk(fmt, jiffies, lineno, ##args)
-#define DBG(fmt,args...) ADBG((__LINE__), KERN_DEBUG __FILE__" (%ld):" __FUNCTION__ "(%d):" fmt, ##args)
+#define ADBG(fmt,args...) printk(fmt, jiffies, ##args)
+#define DBG(fmt,args...) ADBG(KERN_DEBUG __FILE__" (%ld):%s(%d):" fmt, __FUNCTION__, __LINE__ , ##args)
 #else
 #define DBG(fmn,args...) do {} while(0)
 #endif
@@ -400,15 +421,19 @@
       (p)&0x80?1:0, (p)&0x40?1:0, (p)&0x20?1:0, (p)&0x10?1:0,\
         (p)&0x08?1:0, (p)&0x04?1:0, (p)&0x02?1:0, (p)&0x01?1:0);
 
-static inline void cpia_add_to_list(struct cam_data* l, struct cam_data* drv)
+static inline void cpia_add_to_list(struct cam_data** l, struct cam_data** drv_p)
 {
-	drv->next = l;
-	drv->previous = &l;
-	l = drv;
+	struct cam_data* drv;
+	drv = *drv_p;
+	drv->next = *l;
+	drv->previous = l;
+	*l = drv;
 }
 
-static inline void cpia_remove_from_list(struct cam_data* drv)
+static inline void cpia_remove_from_list(struct cam_data** drv_p)
 {
+	struct cam_data* drv;
+	drv = *drv_p;
 	if (drv->previous != NULL) {
 		if (drv->next != NULL)
 			drv->next->previous = drv->previous;
diff -Nru a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c
--- a/drivers/media/video/cpia_pp.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/media/video/cpia_pp.c	Wed Oct 30 16:44:17 2002
@@ -157,7 +157,8 @@
 	cpia_pp_streamStop,
 	cpia_pp_streamRead,
 	cpia_pp_close,
-	1
+	1,
+	THIS_MODULE
 };
 
 static struct cam_data *cam_list;
@@ -565,7 +566,7 @@
 		return -ENXIO;
 	}
 	spin_lock( &cam_list_lock_pp );
-	cpia_add_to_list(cam_list, cpia);
+	cpia_add_to_list(&cam_list, &cpia);
 	spin_unlock( &cam_list_lock_pp );
 
 	return 0;
@@ -575,11 +576,11 @@
 {
 	struct cam_data *cpia;
 
-	spin_lock( &cam_list_lock_pp );
 	for(cpia = cam_list; cpia != NULL; cpia = cpia->next) {
 		struct pp_cam_entry *cam = cpia->lowlevel_data;
 		if (cam && cam->port->number == port->number) {
-			cpia_remove_from_list(cpia);
+			spin_lock( &cam_list_lock_pp );
+			cpia_remove_from_list(&cpia);
 			spin_unlock( &cam_list_lock_pp );			
 			cpia_unregister_camera(cpia);
 			
diff -Nru a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c
--- a/drivers/media/video/cpia_usb.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/media/video/cpia_usb.c	Wed Oct 30 16:44:17 2002
@@ -100,7 +100,8 @@
 	cpia_usb_streamStop,
 	cpia_usb_streamRead,
 	cpia_usb_close,
-	0
+	0,
+	THIS_MODULE
 };
 
 static struct cam_data *cam_list;
@@ -219,7 +220,7 @@
 	urb->dev = ucpia->dev;
 	urb->context = ucpia;
 	urb->pipe = usb_rcvisocpipe(ucpia->dev, 1);
-	urb->transfer_flags = USB_ISO_ASAP;
+	urb->transfer_flags = URB_ISO_ASAP;
 	urb->transfer_buffer = ucpia->sbuf[0].data;
 	urb->complete = cpia_usb_complete;
 	urb->number_of_packets = FRAMES_PER_DESC;
@@ -241,7 +242,7 @@
 	urb->dev = ucpia->dev;
 	urb->context = ucpia;
 	urb->pipe = usb_rcvisocpipe(ucpia->dev, 1);
-	urb->transfer_flags = USB_ISO_ASAP;
+	urb->transfer_flags = URB_ISO_ASAP;
 	urb->transfer_buffer = ucpia->sbuf[1].data;
 	urb->complete = cpia_usb_complete;
 	urb->number_of_packets = FRAMES_PER_DESC;
@@ -548,7 +549,7 @@
 	}
 
 	spin_lock( &cam_list_lock_usb );
-	cpia_add_to_list(cam_list, cam);
+	cpia_add_to_list(&cam_list, &cam);
 	spin_unlock( &cam_list_lock_usb );
 
 	dev_set_drvdata(&intf->dev, cam);
@@ -602,7 +603,7 @@
 
 	ucpia = (struct usb_cpia *) cam->lowlevel_data;
 	spin_lock( &cam_list_lock_usb );
-	cpia_remove_from_list(cam);
+	cpia_remove_from_list(&cam);
 	spin_unlock( &cam_list_lock_usb );
 	
 	/* Don't even try to reset the altsetting if we're disconnected */
diff -Nru a/drivers/media/video/planb.c b/drivers/media/video/planb.c
--- a/drivers/media/video/planb.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/media/video/planb.c	Wed Oct 30 16:44:31 2002
@@ -41,7 +41,6 @@
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/wrapper.h>
-#include <linux/tqueue.h>
 #include <linux/videodev.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
diff -Nru a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
--- a/drivers/media/video/w9966.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/media/video/w9966.c	Wed Oct 30 16:44:26 2002
@@ -130,7 +130,7 @@
 MODULE_PARM(pardev, "1-" __MODULE_STRING(W9966_MAXCAMS) "s");
 MODULE_PARM_DESC(pardev, "pardev: where to search for\n\
 \teach camera. 'aggressive' means brute-force search.\n\
-\tEg: >pardev=parport3,aggressive,parport2,parport1< would assign
+\tEg: >pardev=parport3,aggressive,parport2,parport1< would assign\n\
 \tcam 1 to parport3 and search every parport for cam 2 etc...");
 
 static int parmode = 0;
diff -Nru a/drivers/message/fusion/Config.help b/drivers/message/fusion/Config.help
--- a/drivers/message/fusion/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,130 +0,0 @@
-CONFIG_FUSION
-  LSI Logic Fusion(TM) Message Passing Technology (MPT) device support
-  provides high performance SCSI host initiator, and LAN [1] interface
-  services to a host system.  The Fusion architecture is capable of
-  duplexing these protocols on high-speed Fibre Channel
-  (up to 2 GHz x 2 ports = 4 GHz) and parallel SCSI (up to Ultra-320)
-  physical medium.
-
-          [1] LAN is not supported on parallel SCSI medium.
-
-  These drivers require a Fusion MPT compatible PCI adapter installed
-  in the host system.  MPT adapters contain specialized I/O processors
-  to handle I/O workload, and more importantly to offload this work
-  from the host CPU(s).
-
-  If you have Fusion MPT hardware and want to use it, you can say
-  Y or M here to add MPT (base + ScsiHost) drivers.
-    <Y> = build lib (fusion.o), and link [static] into the kernel [2]
-          proper
-    <M> = compiled as [dynamic] modules [3] named: (mptbase.o,
-          mptscsih.o)
-
-          [2] In order enable capability to boot the linux kernel
-              natively from a Fusion MPT target device, you MUST
-               answer Y here! (currently requires CONFIG_BLK_DEV_SD)
-          [3] This support is also available as a module ( = code
-              which can be inserted in and removed from the running
-              kernel whenever you want).  If you want to compile as
-              modules, say M here and read
-              <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-  If you say Y or M here you will get a choice of these
-  additional protocol and support module options:         Module Name:
-    <M>   Enhanced SCSI error reporting                     (isense.o)
-    <M>   Fusion MPT misc device (ioctl) driver             (mptctl.o)
-    <M>   Fusion MPT LAN driver                             (mptlan.o)
-
-  ---
-  Fusion MPT is trademark of LSI Logic Corporation, and its
-  architecture is based on LSI Logic's Message Passing Interface (MPI)
-  specification.
-
-Maximum number of scatter gather entries
-CONFIG_FUSION_MAX_SGE
-  This option allows you to specify the maximum number of scatter-
-  gather entries per I/O. The driver defaults to 40, a reasonable number
-  for most systems. However, the user may increase this up to 128.
-  Increasing this parameter will require significantly more memory 
-  on a per controller instance. Increasing the parameter is not
-  necessary (or recommended) unless the user will be running 
-  large I/O's via the raw interface.
-
-CONFIG_FUSION_ISENSE
-  The isense module (roughly stands for Interpret SENSE data) is
-  completely optional.  It simply provides extra English readable
-  strings in SCSI Error Report(s) that might be generated from the
-  Fusion MPT SCSI Host driver, for example when a target device
-  returns a SCSI check condition on a I/O.  Without this module
-  loaded you might see:
-
-    SCSI Error Report =-=-= (ioc0,scsi5:0)
-      SCSI_Status=02h (CHECK_CONDITION)
-      Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00
-      SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00
-      SenseKey=2h (NOT READY); FRU=02h
-      ASC/ASCQ=29h/00h
-
-  Where otherwise, if this module had been loaded, you would see:
-
-    SCSI Error Report =-=-= (ioc0,scsi5:0)
-      SCSI_Status=02h (CHECK_CONDITION)
-      Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00 - "WRITE(10)"
-      SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00
-      SenseKey=2h (NOT READY); FRU=02h
-      ASC/ASCQ=29h/00h "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED"
-
-  Say M for "Enhanced SCSI error reporting" to compile this optional module,
-  creating a driver named: isense.o.
-
-  NOTE: Support for building this feature into the kernel is not
-  available, due to kernel size considerations.
-
-CONFIG_FUSION_CTL
-  The Fusion MPT misc device driver provides specialized control
-  of MPT adapters via system ioctl calls.  Use of ioctl calls to
-  the MPT driver requires that you create and use a misc device
-  node ala:
-    mknod /dev/mptctl c 10 240
-
-  One use of this ioctl interface is to perform an upgrade (reflash)
-  of the MPT adapter firmware.  Refer to readme file(s) distributed
-  with the Fusion MPT linux driver for additional details.
-
-  If enabled by saying M to this, a driver named: mptctl.o
-  will be compiled.
-
-  If unsure whether you really want or need this, say N.
-
-CONFIG_FUSION_LAN
-  This module supports LAN IP traffic over Fibre Channel port(s)
-  on Fusion MPT compatible hardware (LSIFC9xx chips).
-  The physical interface used is defined in RFC 2625.
-  Please refer to that document for details.
-
-  Installing this driver requires the knowledge to configure and
-  activate a new network interface, "fc0", using standard Linux tools.
-
-  If enabled by saying M to this, a driver named: mptlan.o
-  will be compiled.
-
-  If unsure whether you really want or need this, say N.
-
-  NOTES: This feature is NOT available nor supported for linux-2.2.x
-  kernels.  You must be building a linux-2.3.x or linux-2.4.x kernel
-  in order to configure this option.
-  Support for building this feature into the linux kernel is not
-  yet available.
-
-CONFIG_NET_FC
-  Fibre Channel is a high speed serial protocol mainly used to connect
-  large storage devices to the computer; it is compatible with and
-  intended to replace SCSI.
-
-  If you intend to use Fibre Channel, you need to have a Fibre channel
-  adaptor card in your computer; say Y here and to the driver for your
-  adaptor below. You also should have said Y to "SCSI support" and
-  "SCSI generic support".
-
diff -Nru a/drivers/message/fusion/Config.in b/drivers/message/fusion/Config.in
--- a/drivers/message/fusion/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,38 +0,0 @@
-mainmenu_option next_comment
-comment 'Fusion MPT device support'
-
-dep_tristate "Fusion MPT (base + ScsiHost) drivers" CONFIG_FUSION $CONFIG_SCSI $CONFIG_BLK_DEV_SD
-
-if [ "$CONFIG_FUSION" = "y" -o "$CONFIG_FUSION" = "m" ]; then
-
-  if [ "$CONFIG_BLK_DEV_SD" = "y" -a "$CONFIG_FUSION" = "y" ]; then
-    define_bool CONFIG_FUSION_BOOT y
-  else
-    define_bool CONFIG_FUSION_BOOT n
-  fi
-  int  "  Maximum number of scatter gather entries" CONFIG_FUSION_MAX_SGE 40 
-
-  if [ "$CONFIG_MODULES" = "y" ]; then
-    #  How can we force these options to module or nothing?
-    dep_tristate "  Enhanced SCSI error reporting" CONFIG_FUSION_ISENSE $CONFIG_FUSION m
-    dep_tristate "  Fusion MPT misc device (ioctl) driver" CONFIG_FUSION_CTL $CONFIG_FUSION m
-  fi
-
-  dep_tristate "  Fusion MPT LAN driver" CONFIG_FUSION_LAN $CONFIG_FUSION $CONFIG_NET
-  if [ "$CONFIG_FUSION_LAN" != "n" ]; then
-    define_bool CONFIG_NET_FC y
-  fi
-
-else
-
-  define_bool CONFIG_FUSION_BOOT n
-  # These <should> be define_tristate, but we leave them define_bool
-  # for backward compatibility with pre-linux-2.2.15 kernels.
-  # (Bugzilla:fibrebugs, #384)
-  define_bool CONFIG_FUSION_ISENSE n
-  define_bool CONFIG_FUSION_CTL n
-  define_bool CONFIG_FUSION_LAN n
-
-fi
-
-endmenu
diff -Nru a/drivers/message/fusion/Kconfig b/drivers/message/fusion/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/message/fusion/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,152 @@
+
+menu "Fusion MPT device support"
+
+config FUSION
+	tristate "Fusion MPT (base + ScsiHost) drivers"
+	depends on BLK_DEV_SD
+	---help---
+	  LSI Logic Fusion(TM) Message Passing Technology (MPT) device support
+	  provides high performance SCSI host initiator, and LAN [1] interface
+	  services to a host system.  The Fusion architecture is capable of
+	  duplexing these protocols on high-speed Fibre Channel
+	  (up to 2 GHz x 2 ports = 4 GHz) and parallel SCSI (up to Ultra-320)
+	  physical medium.
+
+	  [1] LAN is not supported on parallel SCSI medium.
+
+	  These drivers require a Fusion MPT compatible PCI adapter installed
+	  in the host system.  MPT adapters contain specialized I/O processors
+	  to handle I/O workload, and more importantly to offload this work
+	  from the host CPU(s).
+
+	  If you have Fusion MPT hardware and want to use it, you can say
+	  Y or M here to add MPT (base + ScsiHost) drivers.
+	  <Y> = build lib (fusion.o), and link [static] into the kernel [2]
+	  proper
+	  <M> = compiled as [dynamic] modules [3] named: (mptbase.o,
+	  mptscsih.o)
+
+	  [2] In order enable capability to boot the linux kernel
+	  natively from a Fusion MPT target device, you MUST
+	  answer Y here! (currently requires CONFIG_BLK_DEV_SD)
+	  [3] This support is also available as a module ( = code
+	  which can be inserted in and removed from the running
+	  kernel whenever you want).  If you want to compile as
+	  modules, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+	  If you say Y or M here you will get a choice of these
+	  additional protocol and support module options:         Module Name:
+	  <M>   Enhanced SCSI error reporting                     (isense.o)
+	  <M>   Fusion MPT misc device (ioctl) driver             (mptctl.o)
+	  <M>   Fusion MPT LAN driver                             (mptlan.o)
+
+	  ---
+	  Fusion MPT is trademark of LSI Logic Corporation, and its
+	  architecture is based on LSI Logic's Message Passing Interface (MPI)
+	  specification.
+
+config FUSION_BOOT
+	bool
+	depends on FUSION=y
+	default y
+
+config FUSION_MAX_SGE
+	int "Maximum number of scatter gather entries"
+	depends on FUSION
+	default "40"
+	help
+	  This option allows you to specify the maximum number of scatter-
+	  gather entries per I/O. The driver defaults to 40, a reasonable number
+	  for most systems. However, the user may increase this up to 128.
+	  Increasing this parameter will require significantly more memory 
+	  on a per controller instance. Increasing the parameter is not
+	  necessary (or recommended) unless the user will be running 
+	  large I/O's via the raw interface.
+
+#  How can we force these options to module or nothing?
+config FUSION_ISENSE
+	tristate "Enhanced SCSI error reporting"
+	depends on MODULES && FUSION && m
+	---help---
+	  The isense module (roughly stands for Interpret SENSE data) is
+	  completely optional.  It simply provides extra English readable
+	  strings in SCSI Error Report(s) that might be generated from the
+	  Fusion MPT SCSI Host driver, for example when a target device
+	  returns a SCSI check condition on a I/O.  Without this module
+	  loaded you might see:
+
+	  SCSI Error Report =-=-= (ioc0,scsi5:0)
+	  SCSI_Status=02h (CHECK_CONDITION)
+	  Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00
+	  SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00
+	  SenseKey=2h (NOT READY); FRU=02h
+	  ASC/ASCQ=29h/00h
+
+	  Where otherwise, if this module had been loaded, you would see:
+
+	  SCSI Error Report =-=-= (ioc0,scsi5:0)
+	  SCSI_Status=02h (CHECK_CONDITION)
+	  Original_CDB[]: 2A 00 00 00 00 41 00 00 02 00 - "WRITE(10)"
+	  SenseData[12h]: 70 00 02 00 00 00 00 0A 00 00 00 00 04 02 02 00 00 00
+	  SenseKey=2h (NOT READY); FRU=02h
+	  ASC/ASCQ=29h/00h "LOGICAL UNIT NOT READY, INITIALIZING CMD. REQUIRED"
+
+	  Say M for "Enhanced SCSI error reporting" to compile this optional module,
+	  creating a driver named: isense.o.
+
+	  NOTE: Support for building this feature into the kernel is not
+	  available, due to kernel size considerations.
+
+config FUSION_CTL
+	tristate "Fusion MPT misc device (ioctl) driver"
+	depends on MODULES && FUSION && m
+	---help---
+	  The Fusion MPT misc device driver provides specialized control
+	  of MPT adapters via system ioctl calls.  Use of ioctl calls to
+	  the MPT driver requires that you create and use a misc device
+	  node ala:
+	  mknod /dev/mptctl c 10 240
+
+	  One use of this ioctl interface is to perform an upgrade (reflash)
+	  of the MPT adapter firmware.  Refer to readme file(s) distributed
+	  with the Fusion MPT linux driver for additional details.
+
+	  If enabled by saying M to this, a driver named: mptctl.o
+	  will be compiled.
+
+	  If unsure whether you really want or need this, say N.
+
+config FUSION_LAN
+	tristate "Fusion MPT LAN driver"
+	depends on FUSION && NET_FC
+	---help---
+	  This module supports LAN IP traffic over Fibre Channel port(s)
+	  on Fusion MPT compatible hardware (LSIFC9xx chips).
+	  The physical interface used is defined in RFC 2625.
+	  Please refer to that document for details.
+
+	  Installing this driver requires the knowledge to configure and
+	  activate a new network interface, "fc0", using standard Linux tools.
+
+	  If enabled by saying M to this, a driver named: mptlan.o
+	  will be compiled.
+
+	  If unsure whether you really want or need this, say N.
+
+	  NOTES: This feature is NOT available nor supported for linux-2.2.x
+	  kernels.  You must be building a linux-2.3.x or linux-2.4.x kernel
+	  in order to configure this option.
+	  Support for building this feature into the linux kernel is not
+	  yet available.
+
+#  if [ "$CONFIG_FUSION_LAN" != "n" ]; then
+#    define_bool CONFIG_NET_FC y
+#  fi
+# These <should> be define_tristate, but we leave them define_bool
+# for backward compatibility with pre-linux-2.2.15 kernels.
+# (Bugzilla:fibrebugs, #384)
+endmenu
+
diff -Nru a/drivers/message/fusion/mptlan.h b/drivers/message/fusion/mptlan.h
--- a/drivers/message/fusion/mptlan.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/message/fusion/mptlan.h	Wed Oct 30 16:44:27 2002
@@ -8,6 +8,7 @@
 #include <linux/module.h>
 #endif
 
+#include <linux/version.h>
 #include <linux/netdevice.h>
 #include <linux/errno.h>
 // #include <linux/etherdevice.h>
@@ -20,6 +21,7 @@
 #include <linux/slab.h>
 #include <linux/miscdevice.h>
 #include <linux/spinlock.h>
+#include <linux/version.h>
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
 #include <linux/tqueue.h>
 #else
diff -Nru a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
--- a/drivers/message/fusion/mptscsih.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/message/fusion/mptscsih.c	Wed Oct 30 16:44:27 2002
@@ -78,7 +78,6 @@
 #include <linux/reboot.h>	/* notifier code */
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
-#include "../../scsi/sd.h"
 
 #include "mptbase.h"
 #include "mptscsih.h"
@@ -1295,10 +1294,6 @@
 #endif
 				sh->this_id = this->pfacts[portnum].PortSCSIID;
 
-				/* OS entry to allow host drivers to force
-				 * a queue depth on a per device basis.
-				 */
-				sh->select_queue_depths = mptscsih_select_queue_depths;
 				/* Required entry.
 				 */
 				sh->unique_id = this->id;
@@ -3643,15 +3638,18 @@
  *	This is anyones guess quite frankly.
  */
 int
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
-mptscsih_bios_param(Disk * disk, struct block_device *dev, int *ip)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,44)
+mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev,
+		sector_t capacity, int *ip)
+{
 #else
 mptscsih_bios_param(Disk * disk, kdev_t dev, int *ip)
-#endif
 {
+	sector_t capacity = disk->capacity;
+#endif
 	int size;
 
-	size = disk->capacity;
+	size = capacity;
 	ip[0] = 64;				/* heads			*/
 	ip[1] = 32;				/* sectors			*/
 	if ((ip[2] = size >> 11) > 1024) {	/* cylinders, test for big disk */
@@ -3668,37 +3666,19 @@
  *	Called once per device the bus scan. Use it to force the queue_depth
  *	member to 1 if a device does not support Q tags.
  */
-void
-mptscsih_select_queue_depths(struct Scsi_Host *sh, Scsi_Device *sdList)
+int
+mptscsih_slave_attach(Scsi_Device *device)
 {
-	struct scsi_device	*device;
 	VirtDevice		*pTarget;
-	MPT_SCSI_HOST		*hd;
-	int			 ii, max;
-
-	for (device = sdList; device != NULL; device = device->next) {
-
-		if (device->host != sh)
-			continue;
-
-		hd = (MPT_SCSI_HOST *) sh->hostdata;
-		if (hd == NULL)
-			continue;
-
-		if (hd->Targets != NULL) {
-			if (hd->is_spi)
-				max = MPT_MAX_SCSI_DEVICES;
-			else
-				max = MPT_MAX_FC_DEVICES<256 ? MPT_MAX_FC_DEVICES : 255;
-
-			for (ii=0; ii < max; ii++) {
-				pTarget = hd->Targets[ii];
-				if (pTarget && !(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) {
-					device->queue_depth = 1;
-				}
-			}
-		}
+	pTarget = device->hostdata;
+	if (!device->tagged_supported ||
+	    !(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)) {
+		scsi_adjust_queue_depth(device, 0, 1);
+	} else {
+		scsi_adjust_queue_depth(device, MSG_SIMPLE_TAG,
+					       device->host->can_queue >> 1);
 	}
+	return 0;
 }
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff -Nru a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
--- a/drivers/message/fusion/mptscsih.h	Wed Oct 30 16:44:36 2002
+++ b/drivers/message/fusion/mptscsih.h	Wed Oct 30 16:44:36 2002
@@ -206,11 +206,12 @@
 #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_select_queue_depths	mptscsih_select_queue_depths
+#define x_scsi_slave_attach	mptscsih_slave_attach
 
 #define x_scsi_taskmgmt_bh	mptscsih_taskmgmt_bh
 #define x_scsi_old_abort	mptscsih_old_abort
 #define x_scsi_old_reset	mptscsih_old_reset
+#define x_scsi_slave_attach	mptscsih_slave_attach
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
@@ -234,8 +235,9 @@
 #else
 extern	int		 x_scsi_bios_param(Disk *, kdev_t, int *);
 #endif
-extern	void		 x_scsi_select_queue_depths(struct Scsi_Host *, Scsi_Device *);
+extern	int		 x_scsi_slave_attach(Scsi_Device *);
 extern	void		 x_scsi_taskmgmt_bh(void *);
+extern	int		 x_scsi_slave_attach(Scsi_Device *);
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
 #define PROC_SCSI_DECL
@@ -248,53 +250,46 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1)
 
 #define MPT_SCSIHOST {						\
-	next:				NULL,			\
 	PROC_SCSI_DECL						\
-	name:				"MPT SCSI Host",	\
-	detect:				x_scsi_detect,		\
-	release:			x_scsi_release,		\
-	info:				x_scsi_info,		\
-	command:			NULL,			\
-	queuecommand:			x_scsi_queuecommand,	\
-	eh_strategy_handler:		NULL,			\
-	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,	\
-	unchecked_isa_dma:		0,			\
-	use_clustering:			ENABLE_CLUSTERING,	\
+	.name				= "MPT SCSI Host",	\
+	.detect				= x_scsi_detect,	\
+	.release			= x_scsi_release,	\
+	.info				= x_scsi_info,		\
+	.queuecommand			= x_scsi_queuecommand,	\
+	.slave_attach			= x_scsi_slave_attach,	\
+	.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,	\
+	.slave_attach			x_scsi_slave_attach,	\
 }
 
 #else  /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1) */
 
 #define MPT_SCSIHOST {						\
-	next:				NULL,			\
 	PROC_SCSI_DECL						\
-	name:				"MPT SCSI Host",	\
-	detect:				x_scsi_detect,		\
-	release:			x_scsi_release,		\
-	info:				x_scsi_info,		\
-	command:			NULL,			\
-	queuecommand:			x_scsi_queuecommand,	\
-	eh_strategy_handler:		NULL,			\
-	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:		NULL,			\
-	bios_param:			x_scsi_bios_param,	\
-	can_queue:			MPT_SCSI_CAN_QUEUE,	\
-	this_id:			-1,			\
-	sg_tablesize:			MPT_SCSI_SG_DEPTH,	\
-	cmd_per_lun:			MPT_SCSI_CMD_PER_LUN,	\
-	unchecked_isa_dma:		0,			\
-	use_clustering:			ENABLE_CLUSTERING,	\
-	use_new_eh_code:		1			\
+	.name				= "MPT SCSI Host",	\
+	.detect				= x_scsi_detect,	\
+	.release			= x_scsi_release,	\
+	.info				= x_scsi_info,		\
+	.queuecommand			= x_scsi_queuecommand,	\
+	.eh_abort_handler		= x_scsi_abort,		\
+	.eh_device_reset_handler	= x_scsi_dev_reset,	\
+	.eh_bus_reset_handler		= x_scsi_bus_reset,	\
+	.bios_param			= x_scsi_bios_param,	\
+	.can_queue			= MPT_SCSI_CAN_QUEUE,	\
+	.this_id			= -1,			\
+	.sg_tablesize			= MPT_SCSI_SG_DEPTH,	\
+	.cmd_per_lun			= MPT_SCSI_CMD_PER_LUN,	\
+	.use_clustering			= ENABLE_CLUSTERING,	\
+	.use_new_eh_code		= 1			\
 }
 
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1) */
@@ -302,23 +297,20 @@
 #else /* MPT_SCSI_USE_NEW_EH */
 
 #define MPT_SCSIHOST {						\
-	next:				NULL,			\
 	PROC_SCSI_DECL						\
-	name:				"MPT SCSI Host",	\
-	detect:				x_scsi_detect,		\
-	release:			x_scsi_release,		\
-	info:				x_scsi_info,		\
-	command:			NULL,			\
-	queuecommand:			x_scsi_queuecommand,	\
-	abort:				x_scsi_old_abort,	\
-	reset:				x_scsi_old_reset,	\
-	bios_param:			x_scsi_bios_param,	\
-	can_queue:			MPT_SCSI_CAN_QUEUE,	\
-	this_id:			-1,			\
-	sg_tablesize:			MPT_SCSI_SG_DEPTH,	\
-	cmd_per_lun:			MPT_SCSI_CMD_PER_LUN,	\
-	unchecked_isa_dma:		0,			\
-	use_clustering:			ENABLE_CLUSTERING	\
+	.name				= "MPT SCSI Host",	\
+	.detect				= x_scsi_detect,	\
+	.release			= x_scsi_release,	\
+	.info				= x_scsi_info,		\
+	.queuecommand			= x_scsi_queuecommand,	\
+	.abort				= x_scsi_old_abort,	\
+	.reset				= x_scsi_old_reset,	\
+	.bios_param			= x_scsi_bios_param,	\
+	.can_queue			= MPT_SCSI_CAN_QUEUE,	\
+	.this_id			= -1,			\
+	.sg_tablesize			= MPT_SCSI_SG_DEPTH,	\
+	.cmd_per_lun			= MPT_SCSI_CMD_PER_LUN,	\
+	.use_clustering			= ENABLE_CLUSTERING	\
 }
 #endif  /* MPT_SCSI_USE_NEW_EH */
 
diff -Nru a/drivers/message/i2o/Config.help b/drivers/message/i2o/Config.help
--- a/drivers/message/i2o/Config.help	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,71 +0,0 @@
-CONFIG_I2O
-  The Intelligent Input/Output (I2O) architecture allows hardware
-  drivers to be split into two parts: an operating system specific
-  module called the OSM and an hardware specific module called the
-  HDM. The OSM can talk to a whole range of HDM's, and ideally the
-  HDM's are not OS dependent. This allows for the same HDM driver to
-  be used under different operating systems if the relevant OSM is in
-  place. In order for this to work, you need to have an I2O interface
-  adapter card in your computer. This card contains a special I/O
-  processor (IOP), thus allowing high speeds since the CPU does not
-  have to deal with I/O.
-
-  If you say Y here, you will get a choice of interface adapter
-  drivers and OSM's with the following questions.
-
-  This support is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  You will get modules called
-  i2o_core.o and i2o_config.o.
-
-  If unsure, say N.
-
-CONFIG_I2O_PCI
-  Say Y for support of PCI bus I2O interface adapters. Currently this
-  is the only variety supported, so you should say Y.
-
-  This support is also available as a module called i2o_pci.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_I2O_BLOCK
-  Include support for the I2O Block OSM. The Block OSM presents disk
-  and other structured block devices to the operating system.
-
-  This support is also available as a module called i2o_block.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_I2O_LAN
-  Include support for the LAN OSM. You will also need to include
-  support for token ring or FDDI if you wish to use token ring or FDDI
-  I2O cards with this driver.
-
-  This support is also available as a module called i2o_lan.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_I2O_SCSI
-  Allows direct SCSI access to SCSI devices on a SCSI or FibreChannel
-  I2O controller. You can use both the SCSI and Block OSM together if
-  you wish.
-
-  This support is also available as a module called i2o_scsi.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_I2O_PROC
-  If you say Y here and to "/proc file system support", you will be
-  able to read I2O related information from the virtual directory
-  /proc/i2o.
-
-  This support is also available as a module called i2o_proc.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/message/i2o/Config.in b/drivers/message/i2o/Config.in
--- a/drivers/message/i2o/Config.in	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,16 +0,0 @@
-mainmenu_option next_comment
-comment 'I2O device support'
-
-tristate 'I2O support' CONFIG_I2O
-
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate '  I2O PCI support' CONFIG_I2O_PCI $CONFIG_I2O
-fi
-dep_tristate '  I2O Block OSM' CONFIG_I2O_BLOCK $CONFIG_I2O
-if [ "$CONFIG_NET" = "y" ]; then
-   dep_tristate '  I2O LAN OSM' CONFIG_I2O_LAN $CONFIG_I2O
-fi
-dep_tristate '  I2O SCSI OSM' CONFIG_I2O_SCSI $CONFIG_I2O $CONFIG_SCSI
-dep_tristate '  I2O /proc support' CONFIG_I2O_PROC $CONFIG_I2O
-
-endmenu
diff -Nru a/drivers/message/i2o/Kconfig b/drivers/message/i2o/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/message/i2o/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,93 @@
+
+menu "I2O device support"
+
+config I2O
+	tristate "I2O support"
+	---help---
+	  The Intelligent Input/Output (I2O) architecture allows hardware
+	  drivers to be split into two parts: an operating system specific
+	  module called the OSM and an hardware specific module called the
+	  HDM. The OSM can talk to a whole range of HDM's, and ideally the
+	  HDM's are not OS dependent. This allows for the same HDM driver to
+	  be used under different operating systems if the relevant OSM is in
+	  place. In order for this to work, you need to have an I2O interface
+	  adapter card in your computer. This card contains a special I/O
+	  processor (IOP), thus allowing high speeds since the CPU does not
+	  have to deal with I/O.
+
+	  If you say Y here, you will get a choice of interface adapter
+	  drivers and OSM's with the following questions.
+
+	  This support is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  You will get modules called
+	  i2o_core.o and i2o_config.o.
+
+	  If unsure, say N.
+
+config I2O_PCI
+	tristate "I2O PCI support"
+	depends on PCI && I2O
+	help
+	  Say Y for support of PCI bus I2O interface adapters. Currently this
+	  is the only variety supported, so you should say Y.
+
+	  This support is also available as a module called i2o_pci.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config I2O_BLOCK
+	tristate "I2O Block OSM"
+	depends on I2O
+	help
+	  Include support for the I2O Block OSM. The Block OSM presents disk
+	  and other structured block devices to the operating system.
+
+	  This support is also available as a module called i2o_block.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config I2O_LAN
+	tristate "I2O LAN OSM"
+	depends on NET && I2O
+	help
+	  Include support for the LAN OSM. You will also need to include
+	  support for token ring or FDDI if you wish to use token ring or FDDI
+	  I2O cards with this driver.
+
+	  This support is also available as a module called i2o_lan.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config I2O_SCSI
+	tristate "I2O SCSI OSM"
+	depends on I2O && SCSI
+	help
+	  Allows direct SCSI access to SCSI devices on a SCSI or FibreChannel
+	  I2O controller. You can use both the SCSI and Block OSM together if
+	  you wish.
+
+	  This support is also available as a module called i2o_scsi.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config I2O_PROC
+	tristate "I2O /proc support"
+	depends on I2O
+	help
+	  If you say Y here and to "/proc file system support", you will be
+	  able to read I2O related information from the virtual directory
+	  /proc/i2o.
+
+	  This support is also available as a module called i2o_proc.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+endmenu
+
diff -Nru a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
--- a/drivers/message/i2o/i2o_block.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/message/i2o/i2o_block.c	Wed Oct 30 16:44:30 2002
@@ -55,8 +55,6 @@
  *		Serial number scanning to find duplicates for FC multipathing
  */
 
-#error Please convert me to Documentation/DMA-mapping.txt
-
 #include <linux/major.h>
 
 #include <linux/module.h>
@@ -132,15 +130,12 @@
 #define I2O_BSA_DSC_VOLUME_CHANGED      0x000D
 #define I2O_BSA_DSC_TIMEOUT             0x000E
 
-#define I2O_UNIT(dev)	(i2ob_dev[minor((dev)) & 0xf0])
 #define I2O_LOCK(unit)	(i2ob_dev[(unit)].req_queue->queue_lock)
 
 /*
  *	Some of these can be made smaller later
  */
 
-static int i2ob_blksizes[MAX_I2OB<<4];
-static int i2ob_sizes[MAX_I2OB<<4];
 static int i2ob_media_change_flag[MAX_I2OB];
 static u32 i2ob_max_sectors[MAX_I2OB<<4];
 
@@ -166,6 +161,7 @@
 	int rcache;
 	int wcache;
 	int power;
+	int index;
 };
 
 /*
@@ -179,6 +175,9 @@
 	struct i2ob_request *next;
 	struct request *req;
 	int num;
+	int sg_dma_direction;
+	int sg_nents;
+	struct scatterlist sg_table[16];
 };
 
 /*
@@ -259,6 +258,30 @@
 	struct i2o_controller *c=dev->controller;
    	return I2O_POST_READ32(c);
 }
+
+static int i2ob_build_sglist(struct i2ob_device *dev,  struct i2ob_request *ireq)
+{
+	struct scatterlist *sg = ireq->sg_table;
+	int nents;
+
+	nents = blk_rq_map_sg(dev->req_queue, ireq->req, ireq->sg_table);
+		
+	if (rq_data_dir(ireq->req) == READ)
+		ireq->sg_dma_direction = PCI_DMA_FROMDEVICE;
+	else
+		ireq->sg_dma_direction = PCI_DMA_TODEVICE;
+
+	ireq->sg_nents = pci_map_sg(dev->controller->pdev, sg, nents, ireq->sg_dma_direction);
+	return ireq->sg_nents;
+}
+
+void i2ob_free_sglist(struct i2ob_device *dev, struct i2ob_request *ireq)
+{
+	struct pci_dev *pdev = dev->controller->pdev;
+	struct scatterlist *sg = ireq->sg_table;
+	int nents = ireq->sg_nents;
+	pci_unmap_sg(pdev, sg, nents, ireq->sg_dma_direction);
+}
  
 /**
  *	i2ob_send		-	Turn a request into a message and send it
@@ -273,8 +296,6 @@
  *
  *	No cleanup is done by this interface. It is done on the interrupt side when the
  *	reply arrives
- *
- *	To Fix: Generate PCI maps of the buffers
  */
  
 static int i2ob_send(u32 m, struct i2ob_device *dev, struct i2ob_request *ireq, int unit)
@@ -285,15 +306,21 @@
 	unsigned long mptr;
 	u64 offset;
 	struct request *req = ireq->req;
-	struct bio *bio = req->bio;
 	int count = req->nr_sectors<<9;
-	unsigned long last = 0;
-	unsigned short size = 0;
+	struct scatterlist *sg;
+	int sgnum;
+	int i;
 
 	// printk(KERN_INFO "i2ob_send called\n");
 	/* Map the message to a virtual address */
 	msg = c->mem_offset + m;
 	
+	sgnum = i2ob_build_sglist(dev, ireq);
+	
+	/* FIXME: if we have no resources how should we get out of this */
+	if(sgnum == 0)
+		BUG();
+	
 	/*
 	 * Build the message based on the request.
 	 */
@@ -313,34 +340,21 @@
 	i2o_raw_writel(offset>>32, msg+28);
 	mptr=msg+32;
 	
-	if(req->cmd == READ)
+	sg = ireq->sg_table;
+	if(rq_data_dir(req) == READ)
 	{
 		DEBUG("READ\n");
 		i2o_raw_writel(I2O_CMD_BLOCK_READ<<24|HOST_TID<<12|tid, msg+4);
-		while(bio!=NULL)
+		for(i = sgnum; i > 0; i--)
 		{
-			if(bio_to_phys(bio) == last) {
-				size += bio->bi_size;
-				last += bio->bi_size;
-				if(bio->bi_next)
-					i2o_raw_writel(0x10000000|(size), mptr-8);
-				else
-					__raw_writel(0xD0000000|(size), mptr-8);
-			}
+			if(i != 1)
+				i2o_raw_writel(0x10000000|sg_dma_len(sg), mptr);
 			else
-			{
-				if(bio->bi_next)
-					i2o_raw_writel(0x10000000|bio->bi_size, mptr);
-				else
-					i2o_raw_writel(0xD0000000|bio->bi_size, mptr);
-				i2o_raw_writel(bio_to_phys(bio), mptr+4);
-				mptr += 8;	
-				size = bio->bi_size;
-				last = bio_to_phys(bio) + size;
-			}
-
-			count -= bio->bi_size;
-			bio = bio->bi_next;
+				i2o_raw_writel(0xD0000000|sg_dma_len(sg), mptr);
+			i2o_raw_writel(sg_dma_address(sg), mptr+4);
+			mptr += 8;	
+			count -= sg_dma_len(sg);
+			sg++;
 		}
 		switch(dev->rcache)
 		{
@@ -359,34 +373,20 @@
 //		printk("Reading %d entries %d bytes.\n",
 //			mptr-msg-8, req->nr_sectors<<9);
 	}
-	else if(req->cmd == WRITE)
+	else if(rq_data_dir(req) == WRITE)
 	{
 		DEBUG("WRITE\n");
 		i2o_raw_writel(I2O_CMD_BLOCK_WRITE<<24|HOST_TID<<12|tid, msg+4);
-		while(bio!=NULL)
+		for(i = sgnum; i > 0; i--)
 		{
-			if(bio_to_phys(bio) == last) {
-				size += bio->bi_size;
-				last += bio->bi_size;
-				if(bio->bi_next)
-					i2o_raw_writel(0x14000000|(size), mptr-8);
-				else
-					i2o_raw_writel(0xD4000000|(size), mptr-8);
-			}
+			if(i != 1)
+				i2o_raw_writel(0x14000000|sg_dma_len(sg), mptr);
 			else
-			{
-				if(bio->bi_next)
-					i2o_raw_writel(0x14000000|(bio->bi_size), mptr);
-				else
-					i2o_raw_writel(0xD4000000|(bio->bi_size), mptr);
-				i2o_raw_writel(bio_to_phys(bio), mptr+4);
-				mptr += 8;	
-				size = bio->bi_size;
-				last = bio_to_phys(bio) + bio->bi_size;
-			}
-
-			count -= bio->bi_size;
-			bio = bio->bi_next;
+				i2o_raw_writel(0xD4000000|sg_dma_len(sg), mptr);
+			i2o_raw_writel(sg_dma_address(sg), mptr+4);
+			mptr += 8;	
+			count -= sg_dma_len(sg);
+			sg++;
 		}
 
 		switch(dev->wcache)
@@ -502,7 +502,7 @@
 		/* Now flush the message by making it a NOP */
 		m[0]&=0x00FFFFFF;
 		m[0]|=(I2O_CMD_UTIL_NOP)<<24;
-		i2o_post_message(c,virt_to_bus(m));
+		i2o_post_message(c, ((unsigned long)m) - c->mem_offset);
 
 		return;
 	}
@@ -594,6 +594,7 @@
 	 *	may be running polled controllers from a BH...
 	 */
 	
+	i2ob_free_sglist(dev, ireq);
 	spin_lock_irqsave(I2O_LOCK(c->unit), flags);
 	i2ob_unhook_request(ireq, c->unit);
 	i2ob_end_request(ireq->req);
@@ -715,7 +716,6 @@
 					i2ob_query_device(&i2ob_dev[unit], 0x0000, 4, &size, 8);
 
 				spin_lock_irqsave(I2O_LOCK(unit), flags);	
-				i2ob_sizes[unit] = (int)(size>>10);
 				set_capacity(i2ob_disk[unit>>4], size>>9);
 				spin_unlock_irqrestore(I2O_LOCK(unit), flags);	
 				break;
@@ -782,7 +782,6 @@
 {
 	struct request *req;
 	struct i2ob_request *ireq;
-	int unit;
 	struct i2ob_device *dev;
 	u32 m;
 	
@@ -796,9 +795,8 @@
 
 		if(req->rq_status == RQ_INACTIVE)
 			return;
-			
-		unit = minor(req->rq_dev);
-		dev = &i2ob_dev[(unit&0xF0)];
+
+		dev = req->rq_disk->private_data;
 
 		/* 
 		 *	Queue depths probably belong with some kind of 
@@ -828,7 +826,7 @@
 		i2ob_queues[dev->unit]->i2ob_qhead = ireq->next;
 		ireq->req = req;
 
-		i2ob_send(m, dev, ireq, (unit&0xF0));
+		i2ob_send(m, dev, ireq, (dev->unit&0xF0));
 	}
 }
 
@@ -896,27 +894,19 @@
 static int i2ob_ioctl(struct inode *inode, struct file *file,
 		     unsigned int cmd, unsigned long arg)
 {
-	struct i2ob_device *dev;
-	int minor;
+	struct gendisk *disk = inode->i_bdev->bd_disk;
+	struct i2ob_device *dev = disk->private_data;
 
 	/* Anyone capable of this syscall can do *real bad* things */
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
-	if (!inode)
-		return -EINVAL;
-	minor = minor(inode->i_rdev);
-	if (minor >= (MAX_I2OB<<4))
-		return -ENODEV;
-
-	dev = &i2ob_dev[minor];
 	switch (cmd) {
 		case HDIO_GETGEO:
 		{
 			struct hd_geometry g;
-			int u=minor >> 4;
-			i2o_block_biosparam(get_capacity(i2ob_disk[u]), 
-						&g.cylinders, &g.heads, &g.sectors);
+			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;
 		}
@@ -945,13 +935,8 @@
  
 static int i2ob_release(struct inode *inode, struct file *file)
 {
-	struct i2ob_device *dev;
-	int minor;
-
-	minor = minor(inode->i_rdev);
-	if (minor >= (MAX_I2OB<<4))
-		return -ENODEV;
-	dev = &i2ob_dev[(minor&0xF0)];
+	struct gendisk *disk = inode->i_bdev->bd_disk;
+	struct i2ob_device *dev = disk->private_data;
 
 	/*
 	 * This is to deail with the case of an application
@@ -1022,15 +1007,8 @@
  
 static int i2ob_open(struct inode *inode, struct file *file)
 {
-	int minor;
-	struct i2ob_device *dev;
-	
-	if (!inode)
-		return -EINVAL;
-	minor = minor(inode->i_rdev);
-	if (minor >= MAX_I2OB<<4)
-		return -ENODEV;
-	dev=&i2ob_dev[(minor&0xF0)];
+	struct gendisk *disk = inode->i_bdev->bd_disk;
+	struct i2ob_device *dev = disk->private_data;
 
 	if(!dev->i2odev)	
 		return -ENODEV;
@@ -1133,7 +1111,6 @@
 		power = 0;
 	i2ob_query_device(dev, 0x0000, 5, &flags, 4);
 	i2ob_query_device(dev, 0x0000, 6, &status, 4);
-	i2ob_sizes[unit] = (int)(size>>10);
 	set_capacity(i2ob_disk[unit>>4], size>>9);
 
 	/*
@@ -1146,14 +1123,18 @@
 	for(i=unit;i<=unit+15;i++)
 	{
 		request_queue_t *q = i2ob_dev[unit].req_queue;
-		
+		int segments = (d->controller->status_block->inbound_frame_size - 7) / 2;
+
+		if(segments > 16)
+			segments = 16;
+					
 		i2ob_dev[i].power = power;	/* Save power state */
 		i2ob_dev[unit].flags = flags;	/* Keep the type info */
 		
 		blk_queue_max_sectors(q, 96);	/* 256 might be nicer but many controllers 
 						   explode on 65536 or higher */
-		blk_queue_max_phys_segments(q, (d->controller->status_block->inbound_frame_size - 7) / 2);
-		blk_queue_max_hw_segments(q, (d->controller->status_block->inbound_frame_size - 7) / 2);
+		blk_queue_max_phys_segments(q, segments);
+		blk_queue_max_hw_segments(q, segments);
 		
 		i2ob_dev[i].rcache = CACHE_SMARTFETCH;
 		i2ob_dev[i].wcache = CACHE_WRITETHROUGH;
@@ -1372,7 +1353,7 @@
 					printk(KERN_WARNING "Could not install I2O block device\n");
 				else
 				{
-					add_disk(i2o_disk[scan_unit>>4]);
+					add_disk(i2ob_disk[scan_unit>>4]);
 					scan_unit+=16;
 					i2ob_dev_count++;
 
@@ -1459,7 +1440,7 @@
 		printk(KERN_ERR "i2o_block: Could not install new device\n");
 	else	
 	{
-		add_disk(i2o_disk[unit>>4]);
+		add_disk(i2ob_disk[unit>>4]);
 		i2ob_dev_count++;
 		i2o_device_notify_on(d, &i2o_block_handler);
 	}
@@ -1544,7 +1525,8 @@
  */
 static int i2ob_media_change(struct gendisk *disk)
 {
-	int i = (int)disk->private_data;
+	struct i2ob_device *p = disk->private_data;
+	int i = p->index;
 	if(i2ob_media_change_flag[i])
 	{
 		i2ob_media_change_flag[i]=0;
@@ -1555,9 +1537,8 @@
 
 static int i2ob_revalidate(struct gendisk *disk)
 {
-	int i = (int)disk->private_data;
-	return i2ob_install_device(i2ob_dev[i<<4].controller,
-				   i2ob_dev[i<<4].i2odev, i<<4);
+	struct i2ob_device *p = disk->private_data;
+	return i2ob_install_device(p->controller, p->i2odev, p->index<<4);
 }
 
 /*
@@ -1640,10 +1621,9 @@
 		struct gendisk *disk = alloc_disk(16);
 		if (!disk)
 			goto oom;
-		/* to be cleaned up */
-		disk->private_data = (void*)i;
+		i2ob_dev[i<<4].index = i;
 		disk->queue = i2ob_dev[i<<4].req_queue;
-		i2o_disk[i] = disk;
+		i2ob_disk[i] = disk;
 	}
 #ifdef MODULE
 	printk(KERN_INFO "i2o_block: registered device at major %d\n", MAJOR_NR);
@@ -1662,12 +1642,11 @@
 		i2ob_dev[i].head = NULL;
 		i2ob_dev[i].tail = NULL;
 		i2ob_dev[i].depth = MAX_I2OB_DEPTH;
-		i2ob_blksizes[i] = 1024;
 		i2ob_max_sectors[i] = 2;
 	}
 	
 	for (i = 0; i < MAX_I2OB; i++) {
-		struct gendisk *disk = i2ob_disk + i;
+		struct gendisk *disk = i2ob_disk[i];
 		disk->major = MAJOR_NR;
 		disk->first_minor = i<<4;
 		disk->fops = &i2ob_fops;
@@ -1715,7 +1694,7 @@
 
 oom:
 	while (i--)
-		put_disk(i2o_disk[i]);
+		put_disk(i2ob_disk[i]);
 	unregister_blkdev(MAJOR_NR, "i2o_block");
 	return -ENOMEM;
 }
@@ -1769,7 +1748,7 @@
 	i2o_remove_handler(&i2o_block_handler);
 		 
 	for (i = 0; i < MAX_I2OB; i++)
-		put_disk(i2o_disk[i]);
+		put_disk(i2ob_disk[i]);
 
 	/*
 	 *	Return the block device
diff -Nru a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c
--- a/drivers/message/i2o/i2o_scsi.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/message/i2o/i2o_scsi.c	Wed Oct 30 16:44:26 2002
@@ -37,7 +37,6 @@
  *		Fix the resource management problems.
  */
 
-#error Please convert me to Documentation/DMA-mapping.txt
 
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -55,18 +54,22 @@
 #include <asm/io.h>
 #include <asm/atomic.h>
 #include <linux/blk.h>
-#include <linux/version.h>
 #include <linux/i2o.h>
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
 #include "../../scsi/sd.h"
-#include "i2o_scsi.h"
 
-#define VERSION_STRING        "Version 0.1.1"
+#if BITS_PER_LONG == 64
+#error FIXME: driver does not support 64-bit platforms
+#endif
+
+
+#define VERSION_STRING        "Version 0.1.2"
 
 #define dprintk(x)
 
-#define MAXHOSTS 32
+#define I2O_SCSI_CAN_QUEUE	4
+#define MAXHOSTS		32
 
 struct i2o_scsi_host
 {
@@ -320,6 +323,12 @@
 		 *	It worked maybe ?
 		 */		
 		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));
+
 	lock = current_command->host->host_lock;
 	spin_lock_irqsave(lock, flags);
 	current_command->scsi_done(current_command);
@@ -453,7 +462,6 @@
  
 static int i2o_scsi_detect(Scsi_Host_Template * tpnt)
 {
-	unsigned long flags;
 	struct Scsi_Host *shpnt = NULL;
 	int i;
 	int count;
@@ -680,6 +688,7 @@
 		spin_unlock_irqrestore(host->host_lock, flags);
 		return 0;
 	}
+
 	
 	i2o_raw_writel(I2O_CMD_SCSI_EXEC<<24|HOST_TID<<12|tid, &msg[1]);
 	i2o_raw_writel(scsi_context, &msg[2]);	/* So the I2O layer passes to us */
@@ -752,10 +761,18 @@
 	if(SCpnt->use_sg)
 	{
 		struct scatterlist *sg = (struct scatterlist *)SCpnt->request_buffer;
+		int sg_count;
 		int chain = 0;
 		
 		len = 0;
 
+		sg_count = pci_map_sg(c->pdev, sg, SCpnt->use_sg,
+				      scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+
+		/* FIXME: handle fail */
+		if(!sg_count)
+			BUG();
+		
 		if((sg_max_frags > 11) && (SCpnt->use_sg > 11))
 		{
 			chain = 1;
@@ -775,27 +792,27 @@
 				sg_chain_tag = 0;
 			for(i = 0 ; i < SCpnt->use_sg; i++)
 			{
-				*mptr++=direction|0x10000000|sg->length;
-				len+=sg->length;
-				*mptr++=virt_to_bus(page_address(sg->page)+sg->offset);
+				*mptr++=cpu_to_le32(direction|0x10000000|sg_dma_len(sg));
+				len+=sg_dma_len(sg);
+				*mptr++=cpu_to_le32(sg_dma_address(sg));
 				sg++;
 			}
-			mptr[-2]=direction|0xD0000000|(sg-1)->length;
+			mptr[-2]=cpu_to_le32(direction|0xD0000000|sg_dma_len(sg-1));
 		}
 		else
 		{		
 			for(i = 0 ; i < SCpnt->use_sg; i++)
 			{
-				i2o_raw_writel(direction|0x10000000|sg->length, mptr++);
+				i2o_raw_writel(direction|0x10000000|sg_dma_len(sg), mptr++);
 				len+=sg->length;
-				i2o_raw_writel(virt_to_bus(page_address(sg->page) + sg->offset), mptr++);
+				i2o_raw_writel(sg_dma_address(sg), mptr++);
 				sg++;
 			}
 
 			/* Make this an end of list. Again evade the 920 bug and
 			   unwanted PCI read traffic */
 		
-			i2o_raw_writel(direction|0xD0000000|(sg-1)->length, &mptr[-2]);
+			i2o_raw_writel(direction|0xD0000000|sg_dma_len(sg-1), &mptr[-2]);
 		}
 		
 		if(!chain)
@@ -818,8 +835,16 @@
 		}
 		else
 		{
+			dma_addr_t dma_addr;
+			dma_addr = pci_map_single(c->pdev,
+					       SCpnt->request_buffer,
+					       SCpnt->request_bufflen,
+					       scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+			if(dma_addr == 0)
+				BUG();	/* How to handle ?? */
+			SCpnt->SCp.ptr = (char *)(unsigned long) dma_addr;
 			i2o_raw_writel(0xD0000000|direction|SCpnt->request_bufflen, mptr++);
-			i2o_raw_writel(virt_to_bus(SCpnt->request_buffer), mptr++);
+			i2o_raw_writel(dma_addr, mptr++);
 		}
 	}
 	
@@ -1027,11 +1052,12 @@
  *	else appears to and hope. It seems to work.
  */
  
-static int i2o_scsi_bios_param(Disk * disk, struct block_device *dev, int *ip)
+static int i2o_scsi_bios_param(struct scsi_device * sdev,
+		struct block_device *dev, sector_t capacity, int *ip)
 {
 	int size;
 
-	size = disk->capacity;
+	size = capacity;
 	ip[0] = 64;		/* heads                        */
 	ip[1] = 32;		/* sectors                      */
 	if ((ip[2] = size >> 11) > 1024) {	/* cylinders, test for big disk */
@@ -1046,6 +1072,24 @@
 MODULE_LICENSE("GPL");
 
 
-static Scsi_Host_Template driver_template = I2OSCSI;
+static Scsi_Host_Template driver_template = {
+	.proc_name		= "i2o_scsi",
+	.name			= "I2O SCSI Layer",
+	.detect			= i2o_scsi_detect,
+	.release		= i2o_scsi_release,
+	.info			= i2o_scsi_info,
+	.command		= i2o_scsi_command,
+	.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,
+	.sg_tablesize		= 8,
+	.cmd_per_lun		= 6,
+	.use_clustering		= ENABLE_CLUSTERING,
+};
 
 #include "../../scsi/scsi_module.c"
diff -Nru a/drivers/message/i2o/i2o_scsi.h b/drivers/message/i2o/i2o_scsi.h
--- a/drivers/message/i2o/i2o_scsi.h	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,44 +0,0 @@
-#ifndef _I2O_SCSI_H
-#define _I2O_SCSI_H
-
-#include <linux/types.h>
-#include <linux/kdev_t.h>
-
-#define I2O_SCSI_ID 15
-#define I2O_SCSI_CAN_QUEUE 4
-#define I2O_SCSI_CMD_PER_LUN 6
-
-static int i2o_scsi_detect(Scsi_Host_Template *);
-static const char *i2o_scsi_info(struct Scsi_Host *);
-static int i2o_scsi_command(Scsi_Cmnd *);
-static int i2o_scsi_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int i2o_scsi_abort(Scsi_Cmnd *);
-static int i2o_scsi_bus_reset(Scsi_Cmnd *);
-static int i2o_scsi_host_reset(Scsi_Cmnd *);
-static int i2o_scsi_device_reset(Scsi_Cmnd *);
-static int i2o_scsi_bios_param(Disk *, struct block_device *, int *);
-static int i2o_scsi_release(struct Scsi_Host *host);
-
-#define I2OSCSI {                                       		\
-		  next: NULL,						\
-                  proc_name:         		"i2o_scsi",   		\
-                  name:              		"I2O SCSI Layer", 	\
-                  detect:            		i2o_scsi_detect,	\
-                  release:	     		i2o_scsi_release,	\
-                  info:              		i2o_scsi_info,		\
-                  command:           		i2o_scsi_command,	\
-                  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:           I2O_SCSI_ID,           		\
-                  sg_tablesize:      8,                     		\
-                  cmd_per_lun:       I2O_SCSI_CMD_PER_LUN,  		\
-                  unchecked_isa_dma: 0,                     		\
-                  use_clustering:    ENABLE_CLUSTERING     		\
-                  }
-
-#endif
diff -Nru a/drivers/misc/Config.in b/drivers/misc/Config.in
--- a/drivers/misc/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# Misc strange devices
-#
-mainmenu_option next_comment
-comment 'Misc devices'
-
-endmenu
diff -Nru a/drivers/misc/Kconfig b/drivers/misc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/misc/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,8 @@
+#
+# Misc strange devices
+#
+
+menu "Misc devices"
+
+endmenu
+
diff -Nru a/drivers/mtd/Config.help b/drivers/mtd/Config.help
--- a/drivers/mtd/Config.help	Wed Oct 30 16:44:37 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,160 +0,0 @@
-CONFIG_MTD
-  Memory Technology Devices are flash, RAM and similar chips, often
-  used for solid state file systems on embedded devices. This option
-  will provide the generic support for MTD drivers to register
-  themselves with the kernel and for potential users of MTD devices
-  to enumerate the devices which are present and obtain a handle on
-  them. It will also allow you to select individual drivers for 
-  particular hardware and users of MTD devices. If unsure, say N.
-
-CONFIG_MTD_DEBUG
-  This turns on low-level debugging for the entire MTD sub-system.
-  Normally, you should say 'N'.
-
-CONFIG_MTD_PARTITIONS
-  If you have a device which needs to divide its flash chip(s) up
-  into multiple 'partitions', each of which appears to the user as
-  a separate MTD device, you require this option to be enabled. If
-  unsure, say 'Y'.
-
-  Note, however, that you don't need this option for the DiskOnChip
-  devices. Partitioning on NFTL 'devices' is a different - that's the
-  'normal' form of partitioning used on a block device.
-
-CONFIG_MTD_CONCAT
-  Support for concatenating several MTD devices into a single
-  (virtual) one. This allows you to have -for example- a JFFS(2)
-  file system spanning multiple physical flash chips. If unsure,
-  say 'Y'.
-
-CONFIG_MTD_REDBOOT_PARTS
-  RedBoot is a ROM monitor and bootloader which deals with multiple
-  'images' in flash devices by putting a table in the last erase
-  block of the device, similar to a partition table, which gives
-  the offsets, lengths and names of all the images stored in the
-  flash.
-
-  If you need code which can detect and parse this table, and register
-  MTD 'partitions' corresponding to each image in the table, enable
-  this option. 
-
-  You will still need the parsing functions to be called by the driver
-  for your particular device. It won't happen automatically. The 
-  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 
-  example.
-
-CONFIG_MTD_CMDLINE_PARTS
-  Allow generic configuration of the MTD paritition tables via the kernel
-  command line. Multiple flash resources are supported for hardware where
-  different kinds of flash memory are available. 
-  
-  You will still need the parsing functions to be called by the driver
-  for your particular device. It won't happen automatically. The 
-  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 
-  example.
-
-  The format for the command line is as follows:
-
-  mtdparts=<mtddef>[;<mtddef]
-  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
-  <partdef> := <size>[@offset][<name>][ro]
-  <mtd-id>  := unique id used in mapping driver/device
-  <size>    := standard linux memsize OR "-" to denote all 
-               remaining space
-  <name>    := (NAME)
-
-  Due to the way Linux handles the command line, no spaces are 
-  allowed in the partition definition, including mtd id's and partition 
-  names.
-
-  Examples:
-
-  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
-  mtdparts=sa1100:-
-
-  Same flash, but 2 named partitions, the first one being read-only:
-  mtdparts=sa1100:256k(ARMboot)ro,-(root)
-
-  If unsure, say 'N'.
-
-CONFIG_MTD_AFS_PARTS
-  The ARM Firmware Suite allows the user to divide flash devices into
-  multiple 'images'. Each such image has a header containing its name
-  and offset/size etc.
-
-  If you need code which can detect and parse these tables, and
-  register MTD 'partitions' corresponding to each image detected,
-  enable this option.
-
-  You will still need the parsing functions to be called by the driver
-  for your particular device. It won't happen automatically. The
-  'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example.
-
-CONFIG_MTD_DEBUG_VERBOSE
-  Determines the verbosity level of the MTD debugging messages.
-
-CONFIG_MTD_CHAR
-  This provides a character device for each MTD device present in
-  the system, allowing the user to read and write directly to the
-  memory chips, and also use ioctl() to obtain information about
-  the device, or to erase parts of it.
-
-CONFIG_MTD_BLOCK
-  Although most flash chips have an erase size too large to be useful
-  as block devices, it is possible to use MTD devices which are based
-  on RAM chips in this manner. This block device is a user of MTD
-  devices performing that function.
-
-  At the moment, it is also required for the Journalling Flash File
-  System(s) to obtain a handle on the MTD device when it's mounted
-  (although JFFS and JFFS2 don't actually use any of the functionality
-  of the mtdblock device).
-
-  Later, it may be extended to perform read/erase/modify/write cycles
-  on flash chips to emulate a smaller block size. Needless to say,
-  this is very unsafe, but could be useful for file systems which are
-  almost never written to.
-
-  You do not need this option for use with the DiskOnChip devices. For
-  those, enable NFTL support (CONFIG_NFTL) instead.
-
-CONFIG_MTD_BLOCK_RO
-  This allows you to mount read-only file systems (such as cramfs)
-  from an MTD device, without the overhead (and danger) of the caching
-  driver.
-
-  You do not need this option for use with the DiskOnChip devices. For
-  those, enable NFTL support (CONFIG_NFTL) instead.
-
-CONFIG_FTL
-  This provides support for the original Flash Translation Layer which
-  is part of the PCMCIA specification. It uses a kind of pseudo-
-  file system on a flash device to emulate a block device with
-  512-byte sectors, on top of which you put a 'normal' file system.
-
-  You may find that the algorithms used in this code are patented
-  unless you live in the Free World where software patents aren't
-  legal - in the USA you are only permitted to use this on PCMCIA
-  hardware, although under the terms of the GPL you're obviously
-  permitted to copy, modify and distribute the code as you wish. Just
-  not use it.
-
-CONFIG_NFTL
-  This provides support for the NAND Flash Translation Layer which is
-  used on M-Systems' DiskOnChip devices. It uses a kind of pseudo-
-  file system on a flash device to emulate a block device with
-  512-byte sectors, on top of which you put a 'normal' file system.
-
-  You may find that the algorithms used in this code are patented
-  unless you live in the Free World where software patents aren't
-  legal - in the USA you are only permitted to use this on DiskOnChip
-  hardware, although under the terms of the GPL you're obviously
-  permitted to copy, modify and distribute the code as you wish. Just
-  not use it.
-
-CONFIG_NFTL_RW
-  If you're lucky, this will actually work. Don't whinge if it
-  doesn't.  Send mail to the MTD mailing list
-  <linux-mtd@lists.infradead.org> if you want to help to make it more
-  reliable.
-
diff -Nru a/drivers/mtd/Config.in b/drivers/mtd/Config.in
--- a/drivers/mtd/Config.in	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,44 +0,0 @@
-
-# $Id: Config.in,v 1.74 2002/04/23 13:52:14 mag Exp $
-
-mainmenu_option next_comment
-comment 'Memory Technology Devices (MTD)'
-
-tristate 'Memory Technology Device (MTD) support' CONFIG_MTD
-
-if [ "$CONFIG_MTD" = "y" -o "$CONFIG_MTD" = "m" ]; then
-   bool 'Debugging' CONFIG_MTD_DEBUG
-   if [ "$CONFIG_MTD_DEBUG" = "y" ]; then
-      int '  Debugging verbosity (0 = quiet, 3 = noisy)' CONFIG_MTD_DEBUG_VERBOSE 0
-   fi
-   dep_tristate '  MTD partitioning support' CONFIG_MTD_PARTITIONS $CONFIG_MTD
-   dep_tristate '  MTD concatenating support' CONFIG_MTD_CONCAT $CONFIG_MTD
-   dep_tristate '  RedBoot partition table parsing' CONFIG_MTD_REDBOOT_PARTS $CONFIG_MTD_PARTITIONS
-   dep_tristate '  Command line partition table parsing' CONFIG_MTD_CMDLINE_PARTS $CONFIG_MTD_PARTITIONS
-   if [ "$CONFIG_ARM" = "y" ]; then
-      dep_tristate '  ARM Firmware Suite partition parsing' CONFIG_MTD_AFS_PARTS $CONFIG_MTD_PARTITIONS
-   fi
-
-comment 'User Modules And Translation Layers'
-   dep_tristate '  Direct char device access to MTD devices' CONFIG_MTD_CHAR $CONFIG_MTD
-   dep_tristate '  Caching block device access to MTD devices' CONFIG_MTD_BLOCK $CONFIG_MTD
-   if [ "$CONFIG_MTD_BLOCK" = "n" -o "$CONFIG_MTD_BLOCK" = "m" ]; then
-   	dep_tristate '  Readonly block device access to MTD devices' CONFIG_MTD_BLOCK_RO $CONFIG_MTD
-   fi
-   dep_tristate '  FTL (Flash Translation Layer) support' CONFIG_FTL $CONFIG_MTD
-   dep_tristate '  NFTL (NAND Flash Translation Layer) support' CONFIG_NFTL $CONFIG_MTD
-   if [ "$CONFIG_NFTL" = "y" -o "$CONFIG_NFTL" = "m" ]; then
-      bool '    Write support for NFTL (BETA)' CONFIG_NFTL_RW
-   fi
-
-   source drivers/mtd/chips/Config.in
-
-   source drivers/mtd/maps/Config.in
-
-   source drivers/mtd/devices/Config.in
-
-   source drivers/mtd/nand/Config.in
-
-fi
-
-endmenu
diff -Nru a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/mtd/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,219 @@
+# $Id: Config.in,v 1.74 2002/04/23 13:52:14 mag Exp $
+
+menu "Memory Technology Devices (MTD)"
+
+config MTD
+	tristate "Memory Technology Device (MTD) support"
+	help
+	  Memory Technology Devices are flash, RAM and similar chips, often
+	  used for solid state file systems on embedded devices. This option
+	  will provide the generic support for MTD drivers to register
+	  themselves with the kernel and for potential users of MTD devices
+	  to enumerate the devices which are present and obtain a handle on
+	  them. It will also allow you to select individual drivers for 
+	  particular hardware and users of MTD devices. If unsure, say N.
+
+config MTD_DEBUG
+	bool "Debugging"
+	depends on MTD
+	help
+	  This turns on low-level debugging for the entire MTD sub-system.
+	  Normally, you should say 'N'.
+
+config MTD_DEBUG_VERBOSE
+	int "Debugging verbosity (0 = quiet, 3 = noisy)"
+	depends on MTD_DEBUG
+	default "0"
+	help
+	  Determines the verbosity level of the MTD debugging messages.
+
+config MTD_PARTITIONS
+	tristate "MTD partitioning support"
+	depends on MTD
+	help
+	  If you have a device which needs to divide its flash chip(s) up
+	  into multiple 'partitions', each of which appears to the user as
+	  a separate MTD device, you require this option to be enabled. If
+	  unsure, say 'Y'.
+
+	  Note, however, that you don't need this option for the DiskOnChip
+	  devices. Partitioning on NFTL 'devices' is a different - that's the
+	  'normal' form of partitioning used on a block device.
+
+config MTD_CONCAT
+	tristate "MTD concatenating support"
+	depends on MTD
+	help
+	  Support for concatenating several MTD devices into a single
+	  (virtual) one. This allows you to have -for example- a JFFS(2)
+	  file system spanning multiple physical flash chips. If unsure,
+	  say 'Y'.
+
+config MTD_REDBOOT_PARTS
+	tristate "RedBoot partition table parsing"
+	depends on MTD_PARTITIONS
+	---help---
+	  RedBoot is a ROM monitor and bootloader which deals with multiple
+	  'images' in flash devices by putting a table in the last erase
+	  block of the device, similar to a partition table, which gives
+	  the offsets, lengths and names of all the images stored in the
+	  flash.
+
+	  If you need code which can detect and parse this table, and register
+	  MTD 'partitions' corresponding to each image in the table, enable
+	  this option. 
+
+	  You will still need the parsing functions to be called by the driver
+	  for your particular device. It won't happen automatically. The 
+	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 
+	  example.
+
+config MTD_CMDLINE_PARTS
+	tristate "Command line partition table parsing"
+	depends on MTD_PARTITIONS
+	---help---
+	  Allow generic configuration of the MTD paritition tables via the kernel
+	  command line. Multiple flash resources are supported for hardware where
+	  different kinds of flash memory are available. 
+
+	  You will still need the parsing functions to be called by the driver
+	  for your particular device. It won't happen automatically. The 
+	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 
+	  example.
+
+	  The format for the command line is as follows:
+
+	  mtdparts=<mtddef>[;<mtddef]
+	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
+	  <partdef> := <size>[@offset][<name>][ro]
+	  <mtd-id>  := unique id used in mapping driver/device
+	  <size>    := standard linux memsize OR "-" to denote all 
+	  remaining space
+	  <name>    := (NAME)
+
+	  Due to the way Linux handles the command line, no spaces are 
+	  allowed in the partition definition, including mtd id's and partition 
+	  names.
+
+	  Examples:
+
+	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
+	  mtdparts=sa1100:-
+
+	  Same flash, but 2 named partitions, the first one being read-only:
+	  mtdparts=sa1100:256k(ARMboot)ro,-(root)
+
+	  If unsure, say 'N'.
+
+config MTD_AFS_PARTS
+	tristate "ARM Firmware Suite partition parsing"
+	depends on ARM && MTD_PARTITIONS
+	---help---
+	  The ARM Firmware Suite allows the user to divide flash devices into
+	  multiple 'images'. Each such image has a header containing its name
+	  and offset/size etc.
+
+	  If you need code which can detect and parse these tables, and
+	  register MTD 'partitions' corresponding to each image detected,
+	  enable this option.
+
+	  You will still need the parsing functions to be called by the driver
+	  for your particular device. It won't happen automatically. The
+	  'armflash' map driver (CONFIG_MTD_ARMFLASH) does this, for example.
+
+comment "User Modules And Translation Layers"
+	depends on MTD
+
+config MTD_CHAR
+	tristate "Direct char device access to MTD devices"
+	depends on MTD
+	help
+	  This provides a character device for each MTD device present in
+	  the system, allowing the user to read and write directly to the
+	  memory chips, and also use ioctl() to obtain information about
+	  the device, or to erase parts of it.
+
+config MTD_BLOCK
+	tristate "Caching block device access to MTD devices"
+	depends on MTD
+	---help---
+	  Although most flash chips have an erase size too large to be useful
+	  as block devices, it is possible to use MTD devices which are based
+	  on RAM chips in this manner. This block device is a user of MTD
+	  devices performing that function.
+
+	  At the moment, it is also required for the Journalling Flash File
+	  System(s) to obtain a handle on the MTD device when it's mounted
+	  (although JFFS and JFFS2 don't actually use any of the functionality
+	  of the mtdblock device).
+
+	  Later, it may be extended to perform read/erase/modify/write cycles
+	  on flash chips to emulate a smaller block size. Needless to say,
+	  this is very unsafe, but could be useful for file systems which are
+	  almost never written to.
+
+	  You do not need this option for use with the DiskOnChip devices. For
+	  those, enable NFTL support (CONFIG_NFTL) instead.
+
+config MTD_BLOCK_RO
+	tristate "Readonly block device access to MTD devices"
+	depends on MTD_BLOCK!=y && MTD
+	help
+	  This allows you to mount read-only file systems (such as cramfs)
+	  from an MTD device, without the overhead (and danger) of the caching
+	  driver.
+
+	  You do not need this option for use with the DiskOnChip devices. For
+	  those, enable NFTL support (CONFIG_NFTL) instead.
+
+config FTL
+	tristate "FTL (Flash Translation Layer) support"
+	depends on MTD
+	---help---
+	  This provides support for the original Flash Translation Layer which
+	  is part of the PCMCIA specification. It uses a kind of pseudo-
+	  file system on a flash device to emulate a block device with
+	  512-byte sectors, on top of which you put a 'normal' file system.
+
+	  You may find that the algorithms used in this code are patented
+	  unless you live in the Free World where software patents aren't
+	  legal - in the USA you are only permitted to use this on PCMCIA
+	  hardware, although under the terms of the GPL you're obviously
+	  permitted to copy, modify and distribute the code as you wish. Just
+	  not use it.
+
+config NFTL
+	tristate "NFTL (NAND Flash Translation Layer) support"
+	depends on MTD
+	---help---
+	  This provides support for the NAND Flash Translation Layer which is
+	  used on M-Systems' DiskOnChip devices. It uses a kind of pseudo-
+	  file system on a flash device to emulate a block device with
+	  512-byte sectors, on top of which you put a 'normal' file system.
+
+	  You may find that the algorithms used in this code are patented
+	  unless you live in the Free World where software patents aren't
+	  legal - in the USA you are only permitted to use this on DiskOnChip
+	  hardware, although under the terms of the GPL you're obviously
+	  permitted to copy, modify and distribute the code as you wish. Just
+	  not use it.
+
+config NFTL_RW
+	bool "Write support for NFTL (BETA)"
+	depends on NFTL
+	help
+	  If you're lucky, this will actually work. Don't whinge if it
+	  doesn't.  Send mail to the MTD mailing list
+	  <linux-mtd@lists.infradead.org> if you want to help to make it more
+	  reliable.
+
+source "drivers/mtd/chips/Kconfig"
+
+source "drivers/mtd/maps/Kconfig"
+
+source "drivers/mtd/devices/Kconfig"
+
+source "drivers/mtd/nand/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/mtd/chips/Config.help b/drivers/mtd/chips/Config.help
--- a/drivers/mtd/chips/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,130 +0,0 @@
-CONFIG_MTD_CFI
-  The Common Flash Interface specification was developed by Intel,
-  AMD and other flash manufactures that provides a universal method
-  for probing the capabilities of flash devices. If you wish to
-  support any device that is CFI-compliant, you need to enable this
-  option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
-  for more information on CFI.
-
-CONFIG_MTD_CFI_ADV_OPTIONS
-  If you need to specify a specific endianness for access to flash
-  chips, or if you wish to reduce the size of the kernel by including
-  support for only specific arrangements of flash chips, say 'Y'. This
-  option does not directly affect the code, but will enable other 
-  configuration options which allow you to do so.
-
-  If unsure, say 'N'.
-
-CONFIG_MTD_CFI_GEOMETRY
-  This option does not affect the code directly, but will enable 
-  some other configuration options which would allow you to reduce
-  the size of the kernel by including support for only certain 
-  arrangements of CFI chips. If unsure, say 'N' and all options 
-  which are supported by the current code will be enabled.
-
-CONFIG_MTD_CFI_B1
-  If you wish to support CFI devices on a physical bus which is
-  8 bits wide, say 'Y'.
-
-CONFIG_MTD_CFI_B2
-  If you wish to support CFI devices on a physical bus which is
-  16 bits wide, say 'Y'.
-
-CONFIG_MTD_CFI_B4
-  If you wish to support CFI devices on a physical bus which is
-  32 bits wide, say 'Y'.
-
-CONFIG_MTD_CFI_I1
-  If your flash chips are not interleaved - i.e. you only have one
-  flash chip addressed by each bus cycle, then say 'Y'.
-
-CONFIG_MTD_CFI_I2
-  If your flash chips are interleaved in pairs - i.e. you have two
-  flash chips addressed by each bus cycle, then say 'Y'.
-
-CONFIG_MTD_CFI_I4
-  If your flash chips are interleaved in fours - i.e. you have four
-  flash chips addressed by each bus cycle, then say 'Y'.
-
-CONFIG_MTD_CFI_NOSWAP
-  This option defines the way in which the CPU attempts to arrange
-  data bits when writing the 'magic' commands to the chips. Saying
-  'NO', which is the default when CONFIG_MTD_CFI_ADV_OPTIONS isn't
-  enabled, means that the CPU will not do any swapping; the chips
-  are expected to be wired to the CPU in 'host-endian' form. 
-  Specific arrangements are possible with the BIG_ENDIAN_BYTE and
-  LITTLE_ENDIAN_BYTE, if the bytes are reversed.
-
-  If you have a LART, on which the data (and address) lines were
-  connected in a fashion which ensured that the nets were as short
-  as possible, resulting in a bit-shuffling which seems utterly
-  random to the untrained eye, you need the LART_ENDIAN_BYTE option.
-
-  Yes, there really exists something sicker than PDP-endian :)
-
-CONFIG_MTD_CFI_INTELEXT
-  The Common Flash Interface defines a number of different command
-  sets which a CFI-compliant chip may claim to implement. This code
-  provides support for one of those command sets, used on Intel
-  StrataFlash and other parts.
-
-CONFIG_MTD_CFI_AMDSTD
-  The Common Flash Interface defines a number of different command
-  sets which a CFI-compliant chip may claim to implement. This code
-  provides support for one of those command sets, used on chips 
-  chips including the AMD Am29LV320.
-
-CONFIG_MTD_SHARP
-  This option enables support for flash chips using Sharp-compatible
-  commands, including some which are not CFI-compatible and hence 
-  cannot be used with the CONFIG_MTD_CFI_INTELxxx options.
-
-CONFIG_MTD_AMDSTD
-  This option enables support for flash chips using AMD-compatible
-  commands, including some which are not CFI-compatible and hence 
-  cannot be used with the CONFIG_MTD_CFI_AMDSTD option.
-
-  It also works on AMD compatible chips that do conform to CFI.
-
-CONFIG_MTD_RAM
-  This option enables basic support for RAM chips accessed through 
-  a bus mapping driver.
-
-CONFIG_MTD_ROM
-  This option enables basic support for ROM chips accessed through 
-  a bus mapping driver.
-
-CONFIG_MTD_JEDEC
-  Enable older older JEDEC flash interface devices for self
-  programming flash.  It is commonly used in older AMD chips.  It is
-  only called JEDEC because the JEDEC association
-  <http://www.jedec.org/> distributes the identification codes for the
-  chips. WARNING!!!! This code does not compile and is incomplete as
-  are the specific JEDEC devices drivers.
-
-CONFIG_MTD_ABSENT
-  This option enables support for a dummy probing driver used to
-  allocated placeholder MTD devices on systems that have socketed
-  or removable media.  Use of this driver as a fallback chip probe
-  preserves the expected registration order of MTD device nodes on
-  the system regardless of media presence.  Device nodes created
-  with this driver will return -ENODEV upon access.
-
-CONFIG_MTD_JEDECPROBE
-  This option enables JEDEC-style probing of flash chips which are not
-  compatible with the Common Flash Interface, but will use the common
-  CFI-targetted flash drivers for any chips which are identified which
-  are in fact compatible in all but the probe method. This actually
-  covers most AMD/Fujitsu-compatible chips, and will shortly cover also
-  non-CFI Intel chips (that code is in MTD CVS and should shortly be sent
-  for inclusion in Linus' tree)
-
-CONFIG_MTD_OBSOLETE_CHIPS
-  This option does not enable any code directly, but will allow you to
-  select some other chip drivers which are now considered obsolete,
-  because the generic CONFIG_JEDEC_PROBE code above should now detect
-  the chips which are supported by these drivers, and allow the generic
-  CFI-compatible drivers to drive the chips. Say 'N' here unless you have
-  already tried the CONFIG_JEDEC_PROBE method and reported its failure
-  to the MTD mailing list at <linux-mtd@lists.infradead.org>
-
diff -Nru a/drivers/mtd/chips/Config.in b/drivers/mtd/chips/Config.in
--- a/drivers/mtd/chips/Config.in	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,57 +0,0 @@
-# drivers/mtd/chips/Config.in
-
-# $Id: Config.in,v 1.12 2001/09/23 15:35:21 dwmw2 Exp $
-
-mainmenu_option next_comment
-
-comment 'RAM/ROM/Flash chip drivers'
-
-dep_tristate '  Detect flash chips by Common Flash Interface (CFI) probe' CONFIG_MTD_CFI $CONFIG_MTD
-#dep_tristate '  Detect non-CFI Intel-compatible flash chips' CONFIG_MTD_INTELPROBE $CONFIG_MTD
-dep_tristate '  Detect non-CFI AMD/JEDEC-compatible flash chips' CONFIG_MTD_JEDECPROBE $CONFIG_MTD
-
-if [ "$CONFIG_MTD_CFI" = "y" -o "$CONFIG_MTD_INTELPROBE" = "y" -o "$CONFIG_MTD_JEDECPROBE" = "y" ]; then
-   define_bool CONFIG_MTD_GEN_PROBE y
-else
-   if [ "$CONFIG_MTD_CFI" = "m" -o "$CONFIG_MTD_INTELPROBE" = "m" -o "$CONFIG_MTD_JEDECPROBE" = "m" ]; then
-      define_bool CONFIG_MTD_GEN_PROBE m
-   else
-      define_bool CONFIG_MTD_GEN_PROBE n
-   fi
-fi
-if [ "$CONFIG_MTD_GEN_PROBE" = "y" -o "$CONFIG_MTD_GEN_PROBE" = "m" ]; then
-   bool '  Flash chip driver advanced configuration options' CONFIG_MTD_CFI_ADV_OPTIONS
-   if [ "$CONFIG_MTD_CFI_ADV_OPTIONS" = "y" ]; then
-     choice 'Flash cmd/query data swapping'			\
-	"NO			CONFIG_MTD_CFI_NOSWAP		\
-	 BIG_ENDIAN_BYTE	CONFIG_MTD_CFI_BE_BYTE_SWAP	\
-	 LITTLE_ENDIAN_BYTE	CONFIG_MTD_CFI_LE_BYTE_SWAP"	NO
-     bool '  Specific CFI Flash geometry selection' CONFIG_MTD_CFI_GEOMETRY
-     if [ "$CONFIG_MTD_CFI_GEOMETRY" = "y" ]; then
-       bool '    Support  8-bit buswidth' CONFIG_MTD_CFI_B1
-       bool '    Support 16-bit buswidth' CONFIG_MTD_CFI_B2
-       bool '    Support 32-bit buswidth' CONFIG_MTD_CFI_B4
-	 if [ "$CONFIG_MTD_CFI_B1" = "y" ]; then
-	   define_bool CONFIG_MTD_CFI_I1 y
-         else
-           bool '    Support 1-chip flash interleave' CONFIG_MTD_CFI_I1
-	 fi
-       bool '    Support 2-chip flash interleave' CONFIG_MTD_CFI_I2
-       bool '    Support 4-chip flash interleave' CONFIG_MTD_CFI_I4
-     fi
-  fi
-fi
-dep_tristate '  Support for Intel/Sharp flash chips' CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_GEN_PROBE
-dep_tristate '  Support for AMD/Fujitsu flash chips' CONFIG_MTD_CFI_AMDSTD $CONFIG_MTD_GEN_PROBE
-
-dep_tristate '  Support for RAM chips in bus mapping' CONFIG_MTD_RAM $CONFIG_MTD
-dep_tristate '  Support for ROM chips in bus mapping' CONFIG_MTD_ROM $CONFIG_MTD
-dep_tristate '  Support for absent chips in bus mapping' CONFIG_MTD_ABSENT $CONFIG_MTD
-
-bool '  Older (theoretically obsoleted now) drivers for non-CFI chips' CONFIG_MTD_OBSOLETE_CHIPS
-dep_tristate '  AMD compatible flash chip support (non-CFI)' CONFIG_MTD_AMDSTD $CONFIG_MTD $CONFIG_MTD_OBSOLETE_CHIPS
-dep_tristate '  pre-CFI Sharp chip support' CONFIG_MTD_SHARP $CONFIG_MTD $CONFIG_MTD_OBSOLETE_CHIPS
-dep_tristate '  JEDEC device support' CONFIG_MTD_JEDEC $CONFIG_MTD $CONFIG_MTD_OBSOLETE_CHIPS
-
-
-endmenu
diff -Nru a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/mtd/chips/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,216 @@
+# drivers/mtd/chips/Config.in
+# $Id: Config.in,v 1.12 2001/09/23 15:35:21 dwmw2 Exp $
+
+menu "RAM/ROM/Flash chip drivers"
+	depends on MTD!=n
+
+config MTD_CFI
+	tristate "Detect flash chips by Common Flash Interface (CFI) probe"
+	depends on MTD
+	help
+	  The Common Flash Interface specification was developed by Intel,
+	  AMD and other flash manufactures that provides a universal method
+	  for probing the capabilities of flash devices. If you wish to
+	  support any device that is CFI-compliant, you need to enable this
+	  option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
+	  for more information on CFI.
+
+#dep_tristate '  Detect non-CFI Intel-compatible flash chips' CONFIG_MTD_INTELPROBE $CONFIG_MTD
+config MTD_JEDECPROBE
+	tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
+	depends on MTD
+	help
+	  This option enables JEDEC-style probing of flash chips which are not
+	  compatible with the Common Flash Interface, but will use the common
+	  CFI-targetted flash drivers for any chips which are identified which
+	  are in fact compatible in all but the probe method. This actually
+	  covers most AMD/Fujitsu-compatible chips, and will shortly cover also
+	  non-CFI Intel chips (that code is in MTD CVS and should shortly be sent
+	  for inclusion in Linus' tree)
+
+config MTD_GEN_PROBE
+	tristate
+	default m if MTD_CFI!=y && !MTD_INTELPROBE && MTD_JEDECPROBE!=y && (MTD_CFI=m || MTD_JEDECPROBE=m)
+	default y if MTD_CFI=y || MTD_INTELPROBE || MTD_JEDECPROBE=y
+
+config MTD_CFI_ADV_OPTIONS
+	bool "Flash chip driver advanced configuration options"
+	depends on MTD_GEN_PROBE
+	help
+	  If you need to specify a specific endianness for access to flash
+	  chips, or if you wish to reduce the size of the kernel by including
+	  support for only specific arrangements of flash chips, say 'Y'. This
+	  option does not directly affect the code, but will enable other 
+	  configuration options which allow you to do so.
+
+	  If unsure, say 'N'.
+
+choice
+	prompt "Flash cmd/query data swapping"
+	depends on MTD_CFI_ADV_OPTIONS
+	default MTD_CFI_NOSWAP
+
+config MTD_CFI_NOSWAP
+	bool "NO"
+	---help---
+	  This option defines the way in which the CPU attempts to arrange
+	  data bits when writing the 'magic' commands to the chips. Saying
+	  'NO', which is the default when CONFIG_MTD_CFI_ADV_OPTIONS isn't
+	  enabled, means that the CPU will not do any swapping; the chips
+	  are expected to be wired to the CPU in 'host-endian' form. 
+	  Specific arrangements are possible with the BIG_ENDIAN_BYTE and
+	  LITTLE_ENDIAN_BYTE, if the bytes are reversed.
+
+	  If you have a LART, on which the data (and address) lines were
+	  connected in a fashion which ensured that the nets were as short
+	  as possible, resulting in a bit-shuffling which seems utterly
+	  random to the untrained eye, you need the LART_ENDIAN_BYTE option.
+
+	  Yes, there really exists something sicker than PDP-endian :)
+
+config MTD_CFI_BE_BYTE_SWAP
+	bool "BIG_ENDIAN_BYTE"
+
+config MTD_CFI_LE_BYTE_SWAP
+	bool "LITTLE_ENDIAN_BYTE"
+
+endchoice
+
+config MTD_CFI_GEOMETRY
+	bool "Specific CFI Flash geometry selection"
+	depends on MTD_CFI_ADV_OPTIONS
+	help
+	  This option does not affect the code directly, but will enable 
+	  some other configuration options which would allow you to reduce
+	  the size of the kernel by including support for only certain 
+	  arrangements of CFI chips. If unsure, say 'N' and all options 
+	  which are supported by the current code will be enabled.
+
+config MTD_CFI_B1
+	bool "Support  8-bit buswidth"
+	depends on MTD_CFI_GEOMETRY
+	help
+	  If you wish to support CFI devices on a physical bus which is
+	  8 bits wide, say 'Y'.
+
+config MTD_CFI_B2
+	bool "Support 16-bit buswidth"
+	depends on MTD_CFI_GEOMETRY
+	help
+	  If you wish to support CFI devices on a physical bus which is
+	  16 bits wide, say 'Y'.
+
+config MTD_CFI_B4
+	bool "Support 32-bit buswidth"
+	depends on MTD_CFI_GEOMETRY
+	help
+	  If you wish to support CFI devices on a physical bus which is
+	  32 bits wide, say 'Y'.
+
+config MTD_CFI_I1
+	bool "Support 1-chip flash interleave" if !MTD_CFI_B1
+	depends on MTD_CFI_GEOMETRY
+	default y if MTD_CFI_B1
+	help
+	  If your flash chips are not interleaved - i.e. you only have one
+	  flash chip addressed by each bus cycle, then say 'Y'.
+
+config MTD_CFI_I2
+	bool "Support 2-chip flash interleave"
+	depends on MTD_CFI_GEOMETRY
+	help
+	  If your flash chips are interleaved in pairs - i.e. you have two
+	  flash chips addressed by each bus cycle, then say 'Y'.
+
+config MTD_CFI_I4
+	bool "Support 4-chip flash interleave"
+	depends on MTD_CFI_GEOMETRY
+	help
+	  If your flash chips are interleaved in fours - i.e. you have four
+	  flash chips addressed by each bus cycle, then say 'Y'.
+
+config MTD_CFI_INTELEXT
+	tristate "Support for Intel/Sharp flash chips"
+	depends on MTD_GEN_PROBE
+	help
+	  The Common Flash Interface defines a number of different command
+	  sets which a CFI-compliant chip may claim to implement. This code
+	  provides support for one of those command sets, used on Intel
+	  StrataFlash and other parts.
+
+config MTD_CFI_AMDSTD
+	tristate "Support for AMD/Fujitsu flash chips"
+	depends on MTD_GEN_PROBE
+	help
+	  The Common Flash Interface defines a number of different command
+	  sets which a CFI-compliant chip may claim to implement. This code
+	  provides support for one of those command sets, used on chips 
+	  chips including the AMD Am29LV320.
+
+config MTD_RAM
+	tristate "Support for RAM chips in bus mapping"
+	depends on MTD
+	help
+	  This option enables basic support for RAM chips accessed through 
+	  a bus mapping driver.
+
+config MTD_ROM
+	tristate "Support for ROM chips in bus mapping"
+	depends on MTD
+	help
+	  This option enables basic support for ROM chips accessed through 
+	  a bus mapping driver.
+
+config MTD_ABSENT
+	tristate "Support for absent chips in bus mapping"
+	depends on MTD
+	help
+	  This option enables support for a dummy probing driver used to
+	  allocated placeholder MTD devices on systems that have socketed
+	  or removable media.  Use of this driver as a fallback chip probe
+	  preserves the expected registration order of MTD device nodes on
+	  the system regardless of media presence.  Device nodes created
+	  with this driver will return -ENODEV upon access.
+
+config MTD_OBSOLETE_CHIPS
+	bool "Older (theoretically obsoleted now) drivers for non-CFI chips"
+	help
+	  This option does not enable any code directly, but will allow you to
+	  select some other chip drivers which are now considered obsolete,
+	  because the generic CONFIG_JEDEC_PROBE code above should now detect
+	  the chips which are supported by these drivers, and allow the generic
+	  CFI-compatible drivers to drive the chips. Say 'N' here unless you have
+	  already tried the CONFIG_JEDEC_PROBE method and reported its failure
+	  to the MTD mailing list at <linux-mtd@lists.infradead.org>
+
+config MTD_AMDSTD
+	tristate "AMD compatible flash chip support (non-CFI)"
+	depends on MTD && MTD_OBSOLETE_CHIPS
+	help
+	  This option enables support for flash chips using AMD-compatible
+	  commands, including some which are not CFI-compatible and hence 
+	  cannot be used with the CONFIG_MTD_CFI_AMDSTD option.
+
+	  It also works on AMD compatible chips that do conform to CFI.
+
+config MTD_SHARP
+	tristate "pre-CFI Sharp chip support"
+	depends on MTD && MTD_OBSOLETE_CHIPS
+	help
+	  This option enables support for flash chips using Sharp-compatible
+	  commands, including some which are not CFI-compatible and hence 
+	  cannot be used with the CONFIG_MTD_CFI_INTELxxx options.
+
+config MTD_JEDEC
+	tristate "JEDEC device support"
+	depends on MTD && MTD_OBSOLETE_CHIPS
+	help
+	  Enable older older JEDEC flash interface devices for self
+	  programming flash.  It is commonly used in older AMD chips.  It is
+	  only called JEDEC because the JEDEC association
+	  <http://www.jedec.org/> distributes the identification codes for the
+	  chips. WARNING!!!! This code does not compile and is incomplete as
+	  are the specific JEDEC devices drivers.
+
+endmenu
+
diff -Nru a/drivers/mtd/devices/Config.help b/drivers/mtd/devices/Config.help
--- a/drivers/mtd/devices/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,137 +0,0 @@
-CONFIG_MTD_DOC1000
-  This provides an MTD device driver for the M-Systems DiskOnChip
-  1000 devices, which are obsolete so you probably want to say 'N'.
-
-CONFIG_MTD_DOC2000
-  This provides an MTD device driver for the M-Systems DiskOnChip
-  2000 and Millennium devices.  Originally designed for the DiskOnChip
-  2000, it also now includes support for the DiskOnChip Millennium.
-  If you have problems with this driver and the DiskOnChip Millennium,
-  you may wish to try the alternative Millennium driver below. To use
-  the alternative driver, you will need to undefine DOC_SINGLE_DRIVER
-  in the <file:drivers/mtd/devices/docprobe.c> source code.
-
-  If you use this device, you probably also want to enable the NFTL
-  'NAND Flash Translation Layer' option below, which is used to
-  emulate a block device by using a kind of file system on the flash
-  chips.
-
-CONFIG_MTD_DOC2001
-  This provides an alternative MTD device driver for the M-Systems 
-  DiskOnChip Millennium devices.  Use this if you have problems with
-  the combined DiskOnChip 2000 and Millennium driver above.  To get
-  the DiskOnChip probe code to load and use this driver instead of
-  the other one, you will need to undefine DOC_SINGLE_DRIVER near
-  the beginning of <file:drivers/mtd/devices/docprobe.c>.
-
-  If you use this device, you probably also want to enable the NFTL
-  'NAND Flash Translation Layer' option below, which is used to
-  emulate a block device by using a kind of file system on the flash
-  chips.
-
-CONFIG_MTD_DOCPROBE
-  This isn't a real config option, it's derived.
-
-CONFIG_MTD_DOCPROBE_ADVANCED
-  This option allows you to specify nonstandard address at which to
-  probe for a DiskOnChip, or to change the detection options.  You
-  are unlikely to need any of this unless you are using LinuxBIOS.
-  Say 'N'.
-
-CONFIG_MTD_DOCPROBE_55AA
-  Check for the 0x55 0xAA signature of a DiskOnChip, and do not
-  continue with probing if it is absent.  The signature will always be
-  present for a DiskOnChip 2000 or a normal DiskOnChip Millennium.
-  Only if you have overwritten the first block of a DiskOnChip
-  Millennium will it be  absent.  Enable this option if you are using
-  LinuxBIOS or if you need to recover a DiskOnChip Millennium on which
-  you have managed to wipe the first block.
-
-CONFIG_MTD_DOCPROBE_ADDRESS
-  By default, the probe for DiskOnChip devices will look for a
-  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
-  This option allows you to specify a single address at which to probe
-  for the device, which is useful if you have other devices in that
-  range which get upset when they are probed.
-
-  (Note that on PowerPC, the normal probe will only check at
-  0xE4000000.)
-
-  Normally, you should leave this set to zero, to allow the probe at
-  the normal addresses.
-
-CONFIG_MTD_DOCPROBE_HIGH
-  By default, the probe for DiskOnChip devices will look for a
-  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
-  This option changes to make it probe between 0xFFFC8000 and
-  0xFFFEE000.  Unless you are using LinuxBIOS, this is unlikely to be
-  useful to you.  Say 'N'.
-
-CONFIG_MTD_PMC551
-  This provides a MTD device driver for the Ramix PMC551 RAM PCI card
-  from Ramix Inc. <http://www.ramix.com/products/memory/pmc551.html>.
-  These devices come in memory configurations from 32M - 1G.  If you
-  have one, you probably want to enable this.
-
-  If this driver is compiled as a module you get the ability to select
-  the size of the aperture window pointing into the devices memory.
-  What this means is that if you have a 1G card, normally the kernel
-  will use a 1G memory map as its view of the device.  As a module,
-  you can select a 1M window into the memory and the driver will
-  "slide" the window around the PMC551's memory.  This was
-  particularly useful on the 2.2 kernels on PPC architectures as there
-  was limited kernel space to deal with.
-
-CONFIG_MTD_PMC551_BUGFIX
-  Some of Ramix's PMC551 boards with 256M configurations have invalid
-  column and row mux values.  This option will fix them, but will
-  break other memory configurations.  If unsure say N.
-
-CONFIG_MTD_PMC551_DEBUG
-  This option makes the PMC551 more verbose during its operation and
-  is only really useful if you are developing on this driver or
-  suspect a possible hardware or driver bug.  If unsure say N.
-
-CONFIG_MTD_SLRAM
-  If your CPU cannot cache all of the physical memory in your machine,
-  you can still use it for storage or swap by using this driver to
-  present it to the system as a Memory Technology Device.
-
-CONFIG_MTD_MTDRAM
-  This enables a test MTD device driver which uses vmalloc() to
-  provide storage.  You probably want to say 'N' unless you're
-  testing stuff.
-
-CONFIG_MTDRAM_ERASE_SIZE
-  This allows you to configure the size of the erase blocks in the
-  device emulated by the MTDRAM driver.  If the MTDRAM driver is built
-  as a module, it is also possible to specify this as a parameter when
-  loading the module.
-
-CONFIG_MTDRAM_TOTAL_SIZE
-  This allows you to configure the total size of the MTD device
-  emulated by the MTDRAM driver.  If the MTDRAM driver is built
-  as a module, it is also possible to specify this as a parameter when
-  loading the module.
-
-CONFIG_MTDRAM_ABS_POS
-  If you have system RAM accessible by the CPU but not used by Linux
-  in normal operation, you can give the physical address at which the
-  available RAM starts, and the MTDRAM driver will use it instead of
-  allocating space from Linux's available memory. Otherwise, leave 
-  this set to zero. Most people will want to leave this as zero.
-
-CONFIG_MTD_BLKMTD
-  This driver allows a block device to appear as an MTD. It would
-  generally be used in the following cases:
-
-    Using Compact Flash as an MTD, these usually present themselves to
-    the system as an ATA drive.
-    Testing MTD users (eg JFFS2) on large media and media that might
-    be removed during a write (using the floppy drive).
-
-CONFIG_MTD_LART
-  This enables the flash driver for LART. Please note that you do
-  not need any mapping/chip driver for LART. This one does it all
-  for you, so go disable all of those if you enabled some of them (:
-
diff -Nru a/drivers/mtd/devices/Config.in b/drivers/mtd/devices/Config.in
--- a/drivers/mtd/devices/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,55 +0,0 @@
-# drivers/mtd/maps/Config.in
-
-# $Id: Config.in,v 1.5 2001/09/23 15:33:10 dwmw2 Exp $
-
-mainmenu_option next_comment
-
-comment 'Self-contained MTD device drivers'
-dep_tristate '  Ramix PMC551 PCI Mezzanine RAM card support' CONFIG_MTD_PMC551 $CONFIG_MTD $CONFIG_PCI
-if [ "$CONFIG_MTD_PMC551" = "y" -o  "$CONFIG_MTD_PMC551" = "m" ]; then
-   bool '    PMC551 256M DRAM Bugfix' CONFIG_MTD_PMC551_BUGFIX
-   bool '    PMC551 Debugging' CONFIG_MTD_PMC551_DEBUG
-fi
-dep_tristate '  Uncached system RAM' CONFIG_MTD_SLRAM $CONFIG_MTD
-if [ "$CONFIG_SA1100_LART" = "y" ]; then
-  dep_tristate '  28F160xx flash driver for LART' CONFIG_MTD_LART $CONFIG_MTD
-fi
-dep_tristate '  Test driver using RAM' CONFIG_MTD_MTDRAM $CONFIG_MTD
-if [ "$CONFIG_MTD_MTDRAM" = "y" -o "$CONFIG_MTD_MTDRAM" = "m" ]; then
-   int 'MTDRAM device size in KiB' CONFIG_MTDRAM_TOTAL_SIZE 4096
-   int 'MTDRAM erase block size in KiB' CONFIG_MTDRAM_ERASE_SIZE 128
-   if [ "$CONFIG_MTD_MTDRAM" = "y" ]; then #If not a module (I don't want to test it as a module)
-      hex 'SRAM Hexadecimal Absolute position or 0' CONFIG_MTDRAM_ABS_POS 0
-   fi
-fi
-dep_tristate '  MTD emulation using block device' CONFIG_MTD_BLKMTD $CONFIG_MTD
-
-comment 'Disk-On-Chip Device Drivers'
-   dep_tristate '  M-Systems Disk-On-Chip 1000' CONFIG_MTD_DOC1000 $CONFIG_MTD
-   dep_tristate '  M-Systems Disk-On-Chip 2000 and Millennium' CONFIG_MTD_DOC2000 $CONFIG_MTD
-   dep_tristate '  M-Systems Disk-On-Chip Millennium-only alternative driver (see help)' CONFIG_MTD_DOC2001 $CONFIG_MTD
-   if [ "$CONFIG_MTD_DOC2001" = "y" -o "$CONFIG_MTD_DOC2000" = "y" ]; then
-      define_bool CONFIG_MTD_DOCPROBE y
-   else
-      if [ "$CONFIG_MTD_DOC2001" = "m" -o "$CONFIG_MTD_DOC2000" = "m" ]; then
-	 define_bool CONFIG_MTD_DOCPROBE m
-      else
-	 define_bool CONFIG_MTD_DOCPROBE n
-      fi
-   fi
-
-   if [ "$CONFIG_MTD_DOCPROBE" = "y" -o "$CONFIG_MTD_DOCPROBE" = "m" ]; then
-      bool '    Advanced detection options for DiskOnChip' CONFIG_MTD_DOCPROBE_ADVANCED
-      if [ "$CONFIG_MTD_DOCPROBE_ADVANCED" = "n" ]; then
-         define_hex CONFIG_MTD_DOCPROBE_ADDRESS 0
-         define_bool CONFIG_MTD_DOCPROBE_HIGH n
-         define_bool CONFIG_MTD_DOCPROBE_55AA n
-      else
-         hex  '    Physical address of DiskOnChip' CONFIG_MTD_DOCPROBE_ADDRESS 0x0000
-         bool '    Probe high addresses' CONFIG_MTD_DOCPROBE_HIGH
-         bool '    Probe for 0x55 0xAA BIOS Extension Signature' CONFIG_MTD_DOCPROBE_55AA
-      fi
-   fi
-
-
-endmenu
diff -Nru a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/mtd/devices/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,208 @@
+# drivers/mtd/maps/Config.in
+# $Id: Config.in,v 1.5 2001/09/23 15:33:10 dwmw2 Exp $
+
+menu "Self-contained MTD device drivers"
+	depends on MTD!=n
+
+config MTD_PMC551
+	tristate "Ramix PMC551 PCI Mezzanine RAM card support"
+	depends on MTD && PCI
+	---help---
+	  This provides a MTD device driver for the Ramix PMC551 RAM PCI card
+	  from Ramix Inc. <http://www.ramix.com/products/memory/pmc551.html>.
+	  These devices come in memory configurations from 32M - 1G.  If you
+	  have one, you probably want to enable this.
+
+	  If this driver is compiled as a module you get the ability to select
+	  the size of the aperture window pointing into the devices memory.
+	  What this means is that if you have a 1G card, normally the kernel
+	  will use a 1G memory map as its view of the device.  As a module,
+	  you can select a 1M window into the memory and the driver will
+	  "slide" the window around the PMC551's memory.  This was
+	  particularly useful on the 2.2 kernels on PPC architectures as there
+	  was limited kernel space to deal with.
+
+config MTD_PMC551_BUGFIX
+	bool "PMC551 256M DRAM Bugfix"
+	depends on MTD_PMC551
+	help
+	  Some of Ramix's PMC551 boards with 256M configurations have invalid
+	  column and row mux values.  This option will fix them, but will
+	  break other memory configurations.  If unsure say N.
+
+config MTD_PMC551_DEBUG
+	bool "PMC551 Debugging"
+	depends on MTD_PMC551
+	help
+	  This option makes the PMC551 more verbose during its operation and
+	  is only really useful if you are developing on this driver or
+	  suspect a possible hardware or driver bug.  If unsure say N.
+
+config MTD_SLRAM
+	tristate "Uncached system RAM"
+	depends on MTD
+	help
+	  If your CPU cannot cache all of the physical memory in your machine,
+	  you can still use it for storage or swap by using this driver to
+	  present it to the system as a Memory Technology Device.
+
+config MTD_LART
+	tristate "28F160xx flash driver for LART"
+	depends on SA1100_LART && MTD
+	help
+	  This enables the flash driver for LART. Please note that you do
+	  not need any mapping/chip driver for LART. This one does it all
+	  for you, so go disable all of those if you enabled some of them (:
+
+config MTD_MTDRAM
+	tristate "Test driver using RAM"
+	depends on MTD
+	help
+	  This enables a test MTD device driver which uses vmalloc() to
+	  provide storage.  You probably want to say 'N' unless you're
+	  testing stuff.
+
+config MTDRAM_TOTAL_SIZE
+	int "MTDRAM device size in KiB"
+	depends on MTD_MTDRAM
+	default "4096"
+	help
+	  This allows you to configure the total size of the MTD device
+	  emulated by the MTDRAM driver.  If the MTDRAM driver is built
+	  as a module, it is also possible to specify this as a parameter when
+	  loading the module.
+
+config MTDRAM_ERASE_SIZE
+	int "MTDRAM erase block size in KiB"
+	depends on MTD_MTDRAM
+	default "128"
+	help
+	  This allows you to configure the size of the erase blocks in the
+	  device emulated by the MTDRAM driver.  If the MTDRAM driver is built
+	  as a module, it is also possible to specify this as a parameter when
+	  loading the module.
+
+#If not a module (I don't want to test it as a module)
+config MTDRAM_ABS_POS
+	hex "SRAM Hexadecimal Absolute position or 0"
+	depends on MTD_MTDRAM=y
+	default "0"
+	help
+	  If you have system RAM accessible by the CPU but not used by Linux
+	  in normal operation, you can give the physical address at which the
+	  available RAM starts, and the MTDRAM driver will use it instead of
+	  allocating space from Linux's available memory. Otherwise, leave 
+	  this set to zero. Most people will want to leave this as zero.
+
+config MTD_BLKMTD
+	tristate "MTD emulation using block device"
+	depends on MTD
+	help
+	  This driver allows a block device to appear as an MTD. It would
+	  generally be used in the following cases:
+
+	  Using Compact Flash as an MTD, these usually present themselves to
+	  the system as an ATA drive.
+	  Testing MTD users (eg JFFS2) on large media and media that might
+	  be removed during a write (using the floppy drive).
+
+comment "Disk-On-Chip Device Drivers"
+
+config MTD_DOC1000
+	tristate "M-Systems Disk-On-Chip 1000"
+	depends on MTD
+	help
+	  This provides an MTD device driver for the M-Systems DiskOnChip
+	  1000 devices, which are obsolete so you probably want to say 'N'.
+
+config MTD_DOC2000
+	tristate "M-Systems Disk-On-Chip 2000 and Millennium"
+	depends on MTD
+	---help---
+	  This provides an MTD device driver for the M-Systems DiskOnChip
+	  2000 and Millennium devices.  Originally designed for the DiskOnChip
+	  2000, it also now includes support for the DiskOnChip Millennium.
+	  If you have problems with this driver and the DiskOnChip Millennium,
+	  you may wish to try the alternative Millennium driver below. To use
+	  the alternative driver, you will need to undefine DOC_SINGLE_DRIVER
+	  in the <file:drivers/mtd/devices/docprobe.c> source code.
+
+	  If you use this device, you probably also want to enable the NFTL
+	  'NAND Flash Translation Layer' option below, which is used to
+	  emulate a block device by using a kind of file system on the flash
+	  chips.
+
+config MTD_DOC2001
+	tristate "M-Systems Disk-On-Chip Millennium-only alternative driver (see help)"
+	depends on MTD
+	---help---
+	  This provides an alternative MTD device driver for the M-Systems 
+	  DiskOnChip Millennium devices.  Use this if you have problems with
+	  the combined DiskOnChip 2000 and Millennium driver above.  To get
+	  the DiskOnChip probe code to load and use this driver instead of
+	  the other one, you will need to undefine DOC_SINGLE_DRIVER near
+	  the beginning of <file:drivers/mtd/devices/docprobe.c>.
+
+	  If you use this device, you probably also want to enable the NFTL
+	  'NAND Flash Translation Layer' option below, which is used to
+	  emulate a block device by using a kind of file system on the flash
+	  chips.
+
+config MTD_DOCPROBE
+	tristate
+	default m if MTD_DOC2001!=y && MTD_DOC2000!=y && (MTD_DOC2001=m || MTD_DOC2000=m)
+	default y if MTD_DOC2001=y || MTD_DOC2000=y
+	help
+	  This isn't a real config option, it's derived.
+
+config MTD_DOCPROBE_ADVANCED
+	bool "Advanced detection options for DiskOnChip"
+	depends on MTD_DOCPROBE
+	help
+	  This option allows you to specify nonstandard address at which to
+	  probe for a DiskOnChip, or to change the detection options.  You
+	  are unlikely to need any of this unless you are using LinuxBIOS.
+	  Say 'N'.
+
+config MTD_DOCPROBE_ADDRESS
+	hex "Physical address of DiskOnChip" if MTD_DOCPROBE_ADVANCED
+	depends on MTD_DOCPROBE
+	default "0x0000" if MTD_DOCPROBE_ADVANCED
+	default "0" if !MTD_DOCPROBE_ADVANCED
+	---help---
+	  By default, the probe for DiskOnChip devices will look for a
+	  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
+	  This option allows you to specify a single address at which to probe
+	  for the device, which is useful if you have other devices in that
+	  range which get upset when they are probed.
+
+	  (Note that on PowerPC, the normal probe will only check at
+	  0xE4000000.)
+
+	  Normally, you should leave this set to zero, to allow the probe at
+	  the normal addresses.
+
+config MTD_DOCPROBE_HIGH
+	bool "Probe high addresses"
+	depends on MTD_DOCPROBE_ADVANCED
+	help
+	  By default, the probe for DiskOnChip devices will look for a
+	  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
+	  This option changes to make it probe between 0xFFFC8000 and
+	  0xFFFEE000.  Unless you are using LinuxBIOS, this is unlikely to be
+	  useful to you.  Say 'N'.
+
+config MTD_DOCPROBE_55AA
+	bool "Probe for 0x55 0xAA BIOS Extension Signature"
+	depends on MTD_DOCPROBE_ADVANCED
+	help
+	  Check for the 0x55 0xAA signature of a DiskOnChip, and do not
+	  continue with probing if it is absent.  The signature will always be
+	  present for a DiskOnChip 2000 or a normal DiskOnChip Millennium.
+	  Only if you have overwritten the first block of a DiskOnChip
+	  Millennium will it be  absent.  Enable this option if you are using
+	  LinuxBIOS or if you need to recover a DiskOnChip Millennium on which
+	  you have managed to wipe the first block.
+
+endmenu
+
diff -Nru a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c
--- a/drivers/mtd/devices/blkmtd.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/mtd/devices/blkmtd.c	Wed Oct 30 16:44:19 2002
@@ -1044,7 +1044,7 @@
 }
 
 
-extern kdev_t name_to_kdev_t(char *line) __init;
+extern dev_t name_to_dev_t(char *line) __init;
 
 /* Startup */
 static int __init init_blkmtd(void)
@@ -1059,7 +1059,7 @@
   loff_t size;
   int readonly = 0;
   int erase_size = CONFIG_MTD_BLKDEV_ERASESIZE;
-  kdev_t rdev;
+  dev_t rdev;
   struct block_device *bdev;
   int err;
   int mode;
@@ -1107,17 +1107,17 @@
     filp_close(file, NULL);
     return 1;
   }
-  rdev = inode->i_rdev;
+  rdev = inode->i_bdev->bd_dev;
   filp_close(file, NULL);
 #else
-  rdev = name_to_kdev_t(device);
+  rdev = name_to_dev_t(device);
 #endif
 
-  maj = major(rdev);
-  min = minor(rdev);
+  maj = MAJOR(rdev);
+  min = MINOR(rdev);
   DEBUG(1, "blkmtd: found a block device major = %d, minor = %d\n", maj, min);
 
-  if(kdev_none(rdev)) {
+  if(!rdev) {
     printk("blkmtd: bad block device: `%s'\n", device);
     return 1;
   }
diff -Nru a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
--- a/drivers/mtd/ftl.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/mtd/ftl.c	Wed Oct 30 16:44:26 2002
@@ -1141,7 +1141,7 @@
 		part = req->rq_disk->private_data;
 		if (part) {
 			ret = 0;
-			switch (rq_data_dir(CURRENT)) {
+			switch (rq_data_dir(req)) {
 			case READ:
 				ret = ftl_read(part, req->buffer, req->sector,
 						req->current_nr_sectors);
diff -Nru a/drivers/mtd/maps/Config.help b/drivers/mtd/maps/Config.help
--- a/drivers/mtd/maps/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,220 +0,0 @@
-CONFIG_MTD_CDB89712
-  This enables access to the flash or ROM chips on the CDB89712 board.
-  If you have such a board, say 'Y'.
-
-CONFIG_MTD_CEIVA
-  This enables access to the flash chips on the Ceiva/Polaroid
-  PhotoMax Digital Picture Frame.
-  If you have such a device, say 'Y'.
-
-CONFIG_MTD_FORTUNET
-  This enables access to the Flash on the FortuNet board.  If you
-  have such a board, say 'Y'.
-
-CONFIG_MTD_AUTCPU12
-  This enables access to the NV-RAM on autronix autcpu12 board.
-  If you have such a board, say 'Y'.
-
-CONFIG_MTD_EDB7312
-  This enables access to the CFI Flash on the Cogent EDB7312 board.
-  If you have such a board, say 'Y' here.
-
-CONFIG_MTD_NAND_EDB7312
-  This enables access to the NAND Flash on the Cogent EDB7312 board.
-  If you have such a board, say 'Y' here.
-
-CONFIG_MTD_IMPA7
-  This enables access to the NOR Flash on the impA7 board of
-  implementa GmbH. If you have such a board, say 'Y' here.
-
-CONFIG_MTD_SA1100
-  This enables access to the flash chips on most platforms based on
-  the SA1100 and SA1110, including the Assabet and the Compaq iPAQ.
-  If you have such a board, say 'Y'.
-
-CONFIG_MTD_PHYSMAP
-  This provides a 'mapping' driver which allows the CFI probe and
-  command set driver code to communicate with flash chips which
-  are mapped physically into the CPU's memory. You will need to
-  configure the physical address and size of the flash chips on
-  your particular board as well as the bus width.
-
-CONFIG_MTD_PHYSMAP_START
-  This is the physical memory location at which the flash chips
-  are mapped on your particular target board. Refer to the
-  memory map which should hopefully be in the documentation for
-  your board.
-
-CONFIG_MTD_PHYSMAP_LEN
-  This is the total length of the mapping of the flash chips on
-  your particular board. If there is space, or aliases, in the
-  physical memory map between the chips, this could be larger
-  than the total amount of flash present. Refer to the memory
-  map which should hopefully be in the documentation for your
-  board.
-
-CONFIG_MTD_PHYSMAP_BUSWIDTH
-  This is the total width of the data bus of the flash devices
-  in octets. For example, if you have a data bus width of 32
-  bits, you would set the bus width octect value to 4. This is
-  used internally by the CFI drivers.
-
-CONFIG_MTD_SUN_UFLASH
-  This provides a 'mapping' driver which supports the way in 
-  which user-programmable flash chips are connected on various 
-  Sun Microsystems boardsets.  This driver will require CFI support 
-  in the kernel, so if you did not enable CFI previously, do that now.
-
-CONFIG_MTD_NORA
-  If you had to ask, you don't have one. Say 'N'.
-
-CONFIG_MTD_L440GX
-  Support for treating the BIOS flash chip on Intel L440GX motherboards
-  as an MTD device - with this you can reprogram your BIOS.
-
-  BE VERY CAREFUL.
-
-CONFIG_MTD_PNC2000
-  PNC-2000 is the name of Network Camera product from PHOTRON
-  Ltd. in Japan. It uses CFI-compliant flash.
-
-CONFIG_MTD_RPXLITE
-  The RPXLite PowerPC board has CFI-compliant chips mapped in
-  a strange sparse mapping. This 'mapping' driver supports that
-  arrangement, allowing the CFI probe and command set driver code
-  to communicate with the chips on the RPXLite board. More at
-  <http://www.embeddedplanet.com/rpx_lite_specification_sheet.htm>.
-
-CONFIG_MTD_TQM8XXL
-  The TQM8xxL PowerPC board has up to two banks of CFI-compliant
-  chips, currently uses AMD one. This 'mapping' driver supports
-  that arrangement, allowing the CFI probe and command set driver
-  code to communicate with the chips on the TQM8xxL board. More at
-  <http://www.denx.de/embedded-ppc-en.html>.
-
-CONFIG_MTD_SC520CDP
-  The SC520 CDP board has two banks of CFI-compliant chips and one
-  Dual-in-line JEDEC chip. This 'mapping' driver supports that
-  arrangement, implementing three MTD devices.
-
-CONFIG_MTD_SBC_GXX
-  This provides a driver for the on-board flash of Arcom Control
-  Systems' SBC-GXn family of boards, formerly known as SBC-MediaGX.
-  By default the flash is split into 3 partitions which are accessed
-  as separate MTD devices. This board utilizes Intel StrataFlash.
-  More info at
-  <http://www.arcomcontrols.com/products/icp/pc104/processors/>.
-
-CONFIG_MTD_DBOX2
-  This enables access routines for the flash chips on the Nokia/Sagem
-  D-Box 2 board. If you have one of these boards and would like to use
-  the flash chips on it, say 'Y'.
-
-CONFIG_MTD_IQ80310
-  This enables access routines for the flash chips on the Intel XScale
-  IQ80310 evaluation board. If you have one of these boards and would 
-  like to use the flash chips on it, say 'Y'.
-
-CONFIG_MTD_NETSC520
-  This enables access routines for the flash chips on the AMD NetSc520
-  demonstration board. If you have one of these boards and would like 
-  to use the flash chips on it, say 'Y'.
-
-CONFIG_MTD_OCELOT
-  This enables access routines for the boot flash device and for the
-  NVRAM on the Momenco Ocelot board. If you have one of these boards
-  and would like access to either of these, say 'Y'.
-
-CONFIG_MTD_ELAN_104NC
-  This provides a driver for the on-board flash of the Arcom Control
-  System's ELAN-104NC development board. By default the flash
-  is split into 3 partitions which are accessed as separate MTD
-  devices. This board utilizes Intel StrataFlash. More info at
-  <http://www.arcomcontrols.com/products/icp/pc104/processors/>.
-
-CONFIG_MTD_DC21285
-  This provides a driver for the flash accessed using Intel's
-  21285 bridge used with Intel's StrongARM processors. More info at
-  <http://developer.intel.com/design/bridge/quicklist/dsc-21285.htm>.
-
-CONFIG_MTD_CSTM_MIPS_IXX
-  This provides a mapping driver for the Integrated Tecnology
-  Express, Inc (ITE) QED-4N-S01B eval board and the Globespan IVR
-  Reference Board. It provides the necessary addressing, length,
-  buswidth, vpp code and addition setup of the flash device for
-  these boards. In addition, this mapping driver can be used for
-  other boards via setting of the CONFIG_MTD_CSTM_MIPS_IXX_START/
-  LEN/BUSWIDTH parameters. This mapping will provide one mtd device
-  using one partition. The start address can be offset from the
-  beginning of flash and the len can be less than the total flash
-  device size to allow a window into the flash. Both CFI and JEDEC
-  probes are called.
-
-CONFIG_MTD_CSTM_MIPS_IXX_START
-  This is the physical memory location that the MTD driver will
-  use for the flash chips on your particular target board. 
-  Refer to the memory map which should hopefully be in the 
-  documentation for your board.
-
-CONFIG_MTD_CSTM_MIPS_IXX_LEN
-  This is the total length that the MTD driver will use for the 
-  flash chips on your particular board.  Refer to the memory
-  map which should hopefully be in the documentation for your
-  board.
-
-CONFIG_MTD_CSTM_MIPS_IXX_BUSWIDTH
-  This is the total bus width of the mapping of the flash chips
-  on your particular board.
-
-CONFIG_MTD_MIXMEM
-  This supports the paging arrangement for access to flash chips
-  on the MixCOM piggyback card, allowing the flash chip drivers
-  to get on with their job of driving the flash chips without
-  having to know about the paging. If you have one of these boards,
-  you probably want to enable this mapping driver. More info is at
-  <http://www.itc.hu/>.
-
-CONFIG_MTD_SCx200_DOCFLASH
-  Enable support for a flash chip mapped using the DOCCS signal on a
-  National Semiconductor SCx200 processor.
-
-  If you don't know what to do here, say N.
-
-  If compiled as a module, it will be called scx200_docflash.o.
-
-CONFIG_MTD_OCTAGON
-  This provides a 'mapping' driver which supports the way in which
-  the flash chips are connected in the Octagon-5066 Single Board
-  Computer. More information on the board is available at
-  <http://www.octagonsystems.com/Products/5066/5066.html>.
-
-CONFIG_MTD_PCMCIA
-  Map driver for accessing PCMCIA linear flash memory cards. These
-  cards are usually around 4-16MiB in size. This does not include
-  Compact Flash cards which are treated as IDE devices.
-
-CONFIG_MTD_VMAX
-  This provides a 'mapping' driver which supports the way in which
-  the flash chips are connected in the Tempustech VMAX SBC301 Single
-  Board Computer. More information on the board is available at
-  <http://www.tempustech.com/tt301.htm>.
-
-CONFIG_MTD_CFI_FLAGADM
-  Mapping for the Flaga digital module. If you don´t have one, ignore
-  this setting.
-
-CONFIG_MTD_SOLUTIONENGINE
-  This enables access to the flash chips on the Hitachi SolutionEngine and
-  similar boards. Say 'Y' if you are building a kernel for such a board.
-
-CONFIG_MTD_EPXA10DB
-  This enables support for the flash devices on the Altera
-  Excalibur XA10 Development Board. If you are building a kernel
-  for on of these boards then you should say 'Y' otherwise say 'N'.
-
-CONFIG_MTD_PCI
-  Mapping for accessing flash devices on add-in cards like the Intel XScale
-  IQ80310 card, and the Intel EBSA285 card in blank ROM programming mode
-  (please see the manual for the link settings).
-
-  If you are not sure, say N.
diff -Nru a/drivers/mtd/maps/Config.in b/drivers/mtd/maps/Config.in
--- a/drivers/mtd/maps/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,73 +0,0 @@
-# drivers/mtd/maps/Config.in
-
-# $Id: Config.in,v 1.16 2001/09/19 18:28:37 dwmw2 Exp $
-
-mainmenu_option next_comment
-
-comment 'Mapping drivers for chip access'
-
-dep_tristate '  CFI Flash device in physical memory map' CONFIG_MTD_PHYSMAP $CONFIG_MTD_CFI
-if [ "$CONFIG_MTD_PHYSMAP" = "y" -o "$CONFIG_MTD_PHYSMAP" = "m" ]; then
-   hex '    Physical start address of flash mapping' CONFIG_MTD_PHYSMAP_START 0x8000000
-   hex '    Physical length of flash mapping' CONFIG_MTD_PHYSMAP_LEN 0x4000000
-   int '    Bus width in octets' CONFIG_MTD_PHYSMAP_BUSWIDTH 2
-fi
-
-if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-   dep_tristate '  Sun Microsystems userflash support' CONFIG_MTD_SUN_UFLASH $CONFIG_MTD_CFI
-fi
-
-if [ "$CONFIG_X86" = "y" ]; then
-   dep_tristate '  CFI Flash device mapped on Photron PNC-2000' CONFIG_MTD_PNC2000 $CONFIG_MTD_CFI $CONFIG_MTD_PARTITIONS
-   dep_tristate '  CFI Flash device mapped on AMD SC520 CDP' CONFIG_MTD_SC520CDP $CONFIG_MTD_CFI
-   dep_tristate '  CFI Flash device mapped on AMD NetSc520'  CONFIG_MTD_NETSC520 $CONFIG_MTD_CFI $CONFIG_MTD_PARTITIONS
-   dep_tristate '  CFI Flash device mapped on Arcom SBC-GXx boards' CONFIG_MTD_SBC_GXX $CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_PARTITIONS
-   dep_tristate '  CFI Flash device mapped on Arcom ELAN-104NC' CONFIG_MTD_ELAN_104NC $CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_PARTITIONS
-   dep_tristate '  JEDEC Flash device mapped on Mixcom piggyback card' CONFIG_MTD_MIXMEM $CONFIG_MTD_JEDEC
-   dep_tristate '  JEDEC Flash device mapped on Octagon 5066 SBC' CONFIG_MTD_OCTAGON $CONFIG_MTD_JEDEC
-   dep_tristate '  JEDEC Flash device mapped on Tempustech VMAX SBC301' CONFIG_MTD_VMAX $CONFIG_MTD_JEDEC
-   dep_tristate '  Flash device mapped with DOCCS on NatSemi SCx200' CONFIG_MTD_SCx200_DOCFLASH $CONFIG_MTD_CFI
-   dep_tristate '  BIOS flash chip on Intel L440GX boards' CONFIG_MTD_L440GX $CONFIG_MTD_JEDEC
-fi
-
-if [ "$CONFIG_PPC" = "y" ]; then
-   dep_tristate '  CFI Flash device mapped on TQM8XXL' CONFIG_MTD_TQM8XXL $CONFIG_MTD_CFI $CONFIG_TQM8xxL $CONFIG_PPC
-   dep_tristate '  CFI Flash device mapped on RPX Lite or CLLF' CONFIG_MTD_RPXLITE $CONFIG_MTD_CFI $CONFIG_PPC
-   dep_tristate '  CFI Flash device mapped on D-Box2' CONFIG_MTD_DBOX2 $CONFIG_MTD_CFI_INTELSTD $CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_CFI_AMDSTD
-   dep_tristate '  CFI Flash device mapping on FlagaDM' CONFIG_MTD_CFI_FLAGADM $CONFIG_MTD_CFI
-fi
-
-if [ "$CONFIG_MIPS" = "y" ]; then
-   dep_tristate '  Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board' CONFIG_MTD_CSTM_MIPS_IXX $CONFIG_MTD_CFI $CONFIG_MTD_JEDEC $CONFIG_MTD_PARTITIONS 
-   if [ "$CONFIG_MTD_CSTM_MIPS_IXX" = "y" -o "$CONFIG_MTD_CSTM_MIPS_IXX" = "m" ]; then
-      hex '    Physical start address of flash mapping' CONFIG_MTD_CSTM_MIPS_IXX_START 0x8000000
-      hex '    Physical length of flash mapping' CONFIG_MTD_CSTM_MIPS_IXX_LEN 0x4000000
-      int '    Bus width in octets' CONFIG_MTD_CSTM_MIPS_IXX_BUSWIDTH 2
-   fi
-   dep_tristate '  Momenco Ocelot boot flash device' CONFIG_MTD_OCELOT $CONFIG_MOMENCO_OCELOT
-fi
-
-if [ "$CONFIG_SUPERH" = "y" ]; then
-   dep_tristate '  CFI Flash device mapped on Hitachi SolutionEngine' CONFIG_MTD_SOLUTIONENGINE $CONFIG_MTD_CFI $CONFIG_MTD_REDBOOT_PARTS
-fi
-
-if [ "$CONFIG_ARM" = "y" ]; then
-   dep_tristate '  CFI Flash device mapped on Nora' CONFIG_MTD_NORA $CONFIG_MTD_CFI
-   dep_tristate '  CFI Flash device mapped on ARM Integrator/P720T' CONFIG_MTD_ARM_INTEGRATOR $CONFIG_MTD_CFI
-   dep_tristate '  Cirrus CDB89712 evaluation board mappings' CONFIG_MTD_CDB89712 $CONFIG_MTD_CFI $CONFIG_ARCH_CDB89712
-   dep_tristate '  CFI Flash device mapped on StrongARM SA11x0' CONFIG_MTD_SA1100 $CONFIG_MTD_CFI $CONFIG_ARCH_SA1100 $CONFIG_MTD_PARTITIONS
-   dep_tristate '  CFI Flash device mapped on DC21285 Footbridge' CONFIG_MTD_DC21285 $CONFIG_MTD_CFI $CONFIG_ARCH_FOOTBRIDGE
-   dep_tristate '  CFI Flash device mapped on the XScale IQ80310 board' CONFIG_MTD_IQ80310 $CONFIG_MTD_CFI $CONFIG_ARCH_IQ80310
-   dep_tristate '  CFI Flash device mapped on Epxa10db' CONFIG_MTD_EPXA10DB $CONFIG_MTD_CFI  $CONFIG_MTD_PARTITIONS $CONFIG_ARCH_CAMELOT
-   dep_tristate '  CFI Flash device mapped on the FortuNet board' CONFIG_MTD_FORTUNET $CONFIG_MTD_CFI $CONFIG_MTD_PARTITIONS $CONFIG_SA1100_FORTUNET
-   dep_tristate '  NV-RAM mapping AUTCPU12 board' CONFIG_MTD_AUTCPU12 $CONFIG_ARCH_AUTCPU12
-   dep_tristate '  CFI Flash device mapped on EDB7312' CONFIG_MTD_EDB7312 $CONFIG_MTD_CFI
-   dep_tristate '  JEDEC Flash device mapped on impA7' CONFIG_MTD_IMPA7 $CONFIG_MTD_JEDECPROBE
-   dep_tristate '  JEDEC Flash device mapped on Ceiva/Polaroid PhotoMax Digital Picture Frame' CONFIG_MTD_CEIVA $CONFIG_MTD_JEDECPROBE  $CONFIG_ARCH_CEIVA
-fi
-
-# This needs CFI or JEDEC, depending on the cards found.
-dep_tristate '  PCI MTD driver' CONFIG_MTD_PCI $CONFIG_MTD $CONFIG_PCI
-dep_tristate '  PCMCIA MTD driver' CONFIG_MTD_PCMCIA $CONFIG_MTD $CONFIG_PCMCIA
-
-endmenu
diff -Nru a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/mtd/maps/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,350 @@
+# drivers/mtd/maps/Config.in
+# $Id: Config.in,v 1.16 2001/09/19 18:28:37 dwmw2 Exp $
+
+menu "Mapping drivers for chip access"
+	depends on MTD!=n
+
+config MTD_PHYSMAP
+	tristate "CFI Flash device in physical memory map"
+	depends on MTD_CFI
+	help
+	  This provides a 'mapping' driver which allows the CFI probe and
+	  command set driver code to communicate with flash chips which
+	  are mapped physically into the CPU's memory. You will need to
+	  configure the physical address and size of the flash chips on
+	  your particular board as well as the bus width.
+
+config MTD_PHYSMAP_START
+	hex "Physical start address of flash mapping"
+	depends on MTD_PHYSMAP
+	default "0x8000000"
+	help
+	  This is the physical memory location at which the flash chips
+	  are mapped on your particular target board. Refer to the
+	  memory map which should hopefully be in the documentation for
+	  your board.
+
+config MTD_PHYSMAP_LEN
+	hex "Physical length of flash mapping"
+	depends on MTD_PHYSMAP
+	default "0x4000000"
+	help
+	  This is the total length of the mapping of the flash chips on
+	  your particular board. If there is space, or aliases, in the
+	  physical memory map between the chips, this could be larger
+	  than the total amount of flash present. Refer to the memory
+	  map which should hopefully be in the documentation for your
+	  board.
+
+config MTD_PHYSMAP_BUSWIDTH
+	int "Bus width in octets"
+	depends on MTD_PHYSMAP
+	default "2"
+	help
+	  This is the total width of the data bus of the flash devices
+	  in octets. For example, if you have a data bus width of 32
+	  bits, you would set the bus width octect value to 4. This is
+	  used internally by the CFI drivers.
+
+config MTD_SUN_UFLASH
+	tristate "Sun Microsystems userflash support"
+	depends on (SPARC32 || SPARC64) && MTD_CFI
+	help
+	  This provides a 'mapping' driver which supports the way in 
+	  which user-programmable flash chips are connected on various 
+	  Sun Microsystems boardsets.  This driver will require CFI support 
+	  in the kernel, so if you did not enable CFI previously, do that now.
+
+config MTD_PNC2000
+	tristate "CFI Flash device mapped on Photron PNC-2000"
+	depends on X86 && MTD_CFI && MTD_PARTITIONS
+	help
+	  PNC-2000 is the name of Network Camera product from PHOTRON
+	  Ltd. in Japan. It uses CFI-compliant flash.
+
+config MTD_SC520CDP
+	tristate "CFI Flash device mapped on AMD SC520 CDP"
+	depends on X86 && MTD_CFI
+	help
+	  The SC520 CDP board has two banks of CFI-compliant chips and one
+	  Dual-in-line JEDEC chip. This 'mapping' driver supports that
+	  arrangement, implementing three MTD devices.
+
+config MTD_NETSC520
+	tristate "CFI Flash device mapped on AMD NetSc520"
+	depends on X86 && MTD_CFI && MTD_PARTITIONS
+	help
+	  This enables access routines for the flash chips on the AMD NetSc520
+	  demonstration board. If you have one of these boards and would like 
+	  to use the flash chips on it, say 'Y'.
+
+config MTD_SBC_GXX
+	tristate "CFI Flash device mapped on Arcom SBC-GXx boards"
+	depends on X86 && MTD_CFI_INTELEXT && MTD_PARTITIONS
+	help
+	  This provides a driver for the on-board flash of Arcom Control
+	  Systems' SBC-GXn family of boards, formerly known as SBC-MediaGX.
+	  By default the flash is split into 3 partitions which are accessed
+	  as separate MTD devices. This board utilizes Intel StrataFlash.
+	  More info at
+	  <http://www.arcomcontrols.com/products/icp/pc104/processors/>.
+
+config MTD_ELAN_104NC
+	tristate "CFI Flash device mapped on Arcom ELAN-104NC"
+	depends on X86 && MTD_CFI_INTELEXT && MTD_PARTITIONS
+	help
+	  This provides a driver for the on-board flash of the Arcom Control
+	  System's ELAN-104NC development board. By default the flash
+	  is split into 3 partitions which are accessed as separate MTD
+	  devices. This board utilizes Intel StrataFlash. More info at
+	  <http://www.arcomcontrols.com/products/icp/pc104/processors/>.
+
+config MTD_MIXMEM
+	tristate "JEDEC Flash device mapped on Mixcom piggyback card"
+	depends on X86 && MTD_JEDEC
+	help
+	  This supports the paging arrangement for access to flash chips
+	  on the MixCOM piggyback card, allowing the flash chip drivers
+	  to get on with their job of driving the flash chips without
+	  having to know about the paging. If you have one of these boards,
+	  you probably want to enable this mapping driver. More info is at
+	  <http://www.itc.hu/>.
+
+config MTD_OCTAGON
+	tristate "JEDEC Flash device mapped on Octagon 5066 SBC"
+	depends on X86 && MTD_JEDEC
+	help
+	  This provides a 'mapping' driver which supports the way in which
+	  the flash chips are connected in the Octagon-5066 Single Board
+	  Computer. More information on the board is available at
+	  <http://www.octagonsystems.com/Products/5066/5066.html>.
+
+config MTD_VMAX
+	tristate "JEDEC Flash device mapped on Tempustech VMAX SBC301"
+	depends on X86 && MTD_JEDEC
+	help
+	  This provides a 'mapping' driver which supports the way in which
+	  the flash chips are connected in the Tempustech VMAX SBC301 Single
+	  Board Computer. More information on the board is available at
+	  <http://www.tempustech.com/tt301.htm>.
+
+config MTD_SCx200_DOCFLASH
+	tristate "Flash device mapped with DOCCS on NatSemi SCx200"
+	depends on X86 && MTD_CFI
+	help
+	  Enable support for a flash chip mapped using the DOCCS signal on a
+	  National Semiconductor SCx200 processor.
+
+	  If you don't know what to do here, say N.
+
+	  If compiled as a module, it will be called scx200_docflash.o.
+
+config MTD_L440GX
+	tristate "BIOS flash chip on Intel L440GX boards"
+	depends on X86 && MTD_JEDEC
+	help
+	  Support for treating the BIOS flash chip on Intel L440GX motherboards
+	  as an MTD device - with this you can reprogram your BIOS.
+
+	  BE VERY CAREFUL.
+
+config MTD_TQM8XXL
+	tristate "CFI Flash device mapped on TQM8XXL"
+	depends on MTD_CFI && TQM8xxL && PPC
+	help
+	  The TQM8xxL PowerPC board has up to two banks of CFI-compliant
+	  chips, currently uses AMD one. This 'mapping' driver supports
+	  that arrangement, allowing the CFI probe and command set driver
+	  code to communicate with the chips on the TQM8xxL board. More at
+	  <http://www.denx.de/embedded-ppc-en.html>.
+
+config MTD_RPXLITE
+	tristate "CFI Flash device mapped on RPX Lite or CLLF"
+	depends on MTD_CFI && PPC
+	help
+	  The RPXLite PowerPC board has CFI-compliant chips mapped in
+	  a strange sparse mapping. This 'mapping' driver supports that
+	  arrangement, allowing the CFI probe and command set driver code
+	  to communicate with the chips on the RPXLite board. More at
+	  <http://www.embeddedplanet.com/rpx_lite_specification_sheet.htm>.
+
+config MTD_DBOX2
+	tristate "CFI Flash device mapped on D-Box2"
+	depends on PPC && MTD_CFI_INTELSTD && MTD_CFI_INTELEXT && MTD_CFI_AMDSTD
+	help
+	  This enables access routines for the flash chips on the Nokia/Sagem
+	  D-Box 2 board. If you have one of these boards and would like to use
+	  the flash chips on it, say 'Y'.
+
+config MTD_CFI_FLAGADM
+	tristate "CFI Flash device mapping on FlagaDM"
+	depends on PPC && MTD_CFI
+	help
+	  Mapping for the Flaga digital module. If you don´t have one, ignore
+	  this setting.
+
+config MTD_CSTM_MIPS_IXX
+	tristate "Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board"
+	depends on MIPS && MTD_CFI && MTD_JEDEC && MTD_PARTITIONS
+	---help---
+	  This provides a mapping driver for the Integrated Tecnology
+	  Express, Inc (ITE) QED-4N-S01B eval board and the Globespan IVR
+	  Reference Board. It provides the necessary addressing, length,
+	  buswidth, vpp code and addition setup of the flash device for
+	  these boards. In addition, this mapping driver can be used for
+	  other boards via setting of the CONFIG_MTD_CSTM_MIPS_IXX_START/
+	  LEN/BUSWIDTH parameters. This mapping will provide one mtd device
+	  using one partition. The start address can be offset from the
+	  beginning of flash and the len can be less than the total flash
+	  device size to allow a window into the flash. Both CFI and JEDEC
+	  probes are called.
+
+config MTD_CSTM_MIPS_IXX_START
+	hex "Physical start address of flash mapping"
+	depends on MTD_CSTM_MIPS_IXX
+	default "0x8000000"
+	help
+	  This is the physical memory location that the MTD driver will
+	  use for the flash chips on your particular target board. 
+	  Refer to the memory map which should hopefully be in the 
+	  documentation for your board.
+
+config MTD_CSTM_MIPS_IXX_LEN
+	hex "Physical length of flash mapping"
+	depends on MTD_CSTM_MIPS_IXX
+	default "0x4000000"
+	help
+	  This is the total length that the MTD driver will use for the 
+	  flash chips on your particular board.  Refer to the memory
+	  map which should hopefully be in the documentation for your
+	  board.
+
+config MTD_CSTM_MIPS_IXX_BUSWIDTH
+	int "Bus width in octets"
+	depends on MTD_CSTM_MIPS_IXX
+	default "2"
+	help
+	  This is the total bus width of the mapping of the flash chips
+	  on your particular board.
+
+config MTD_OCELOT
+	tristate "Momenco Ocelot boot flash device"
+	depends on MIPS && MOMENCO_OCELOT
+	help
+	  This enables access routines for the boot flash device and for the
+	  NVRAM on the Momenco Ocelot board. If you have one of these boards
+	  and would like access to either of these, say 'Y'.
+
+config MTD_SOLUTIONENGINE
+	tristate "CFI Flash device mapped on Hitachi SolutionEngine"
+	depends on SUPERH && MTD_CFI && MTD_REDBOOT_PARTS
+	help
+	  This enables access to the flash chips on the Hitachi SolutionEngine and
+	  similar boards. Say 'Y' if you are building a kernel for such a board.
+
+config MTD_NORA
+	tristate "CFI Flash device mapped on Nora"
+	depends on ARM && MTD_CFI
+	help
+	  If you had to ask, you don't have one. Say 'N'.
+
+config MTD_ARM_INTEGRATOR
+	tristate "CFI Flash device mapped on ARM Integrator/P720T"
+	depends on ARM && MTD_CFI
+
+config MTD_CDB89712
+	tristate "Cirrus CDB89712 evaluation board mappings"
+	depends on ARM && MTD_CFI && ARCH_CDB89712
+	help
+	  This enables access to the flash or ROM chips on the CDB89712 board.
+	  If you have such a board, say 'Y'.
+
+config MTD_SA1100
+	tristate "CFI Flash device mapped on StrongARM SA11x0"
+	depends on ARM && MTD_CFI && ARCH_SA1100 && MTD_PARTITIONS
+	help
+	  This enables access to the flash chips on most platforms based on
+	  the SA1100 and SA1110, including the Assabet and the Compaq iPAQ.
+	  If you have such a board, say 'Y'.
+
+config MTD_DC21285
+	tristate "CFI Flash device mapped on DC21285 Footbridge"
+	depends on ARM && MTD_CFI && ARCH_FOOTBRIDGE
+	help
+	  This provides a driver for the flash accessed using Intel's
+	  21285 bridge used with Intel's StrongARM processors. More info at
+	  <http://developer.intel.com/design/bridge/quicklist/dsc-21285.htm>.
+
+config MTD_IQ80310
+	tristate "CFI Flash device mapped on the XScale IQ80310 board"
+	depends on ARM && MTD_CFI && ARCH_IQ80310
+	help
+	  This enables access routines for the flash chips on the Intel XScale
+	  IQ80310 evaluation board. If you have one of these boards and would 
+	  like to use the flash chips on it, say 'Y'.
+
+config MTD_EPXA10DB
+	tristate "CFI Flash device mapped on Epxa10db"
+	depends on ARM && MTD_CFI && MTD_PARTITIONS && ARCH_CAMELOT
+	help
+	  This enables support for the flash devices on the Altera
+	  Excalibur XA10 Development Board. If you are building a kernel
+	  for on of these boards then you should say 'Y' otherwise say 'N'.
+
+config MTD_FORTUNET
+	tristate "CFI Flash device mapped on the FortuNet board"
+	depends on ARM && MTD_CFI && MTD_PARTITIONS && SA1100_FORTUNET
+	help
+	  This enables access to the Flash on the FortuNet board.  If you
+	  have such a board, say 'Y'.
+
+config MTD_AUTCPU12
+	tristate "NV-RAM mapping AUTCPU12 board"
+	depends on ARM && ARCH_AUTCPU12
+	help
+	  This enables access to the NV-RAM on autronix autcpu12 board.
+	  If you have such a board, say 'Y'.
+
+config MTD_EDB7312
+	tristate "CFI Flash device mapped on EDB7312"
+	depends on ARM && MTD_CFI
+	help
+	  This enables access to the CFI Flash on the Cogent EDB7312 board.
+	  If you have such a board, say 'Y' here.
+
+config MTD_IMPA7
+	tristate "JEDEC Flash device mapped on impA7"
+	depends on ARM && MTD_JEDECPROBE
+	help
+	  This enables access to the NOR Flash on the impA7 board of
+	  implementa GmbH. If you have such a board, say 'Y' here.
+
+config MTD_CEIVA
+	tristate "JEDEC Flash device mapped on Ceiva/Polaroid PhotoMax Digital Picture Frame"
+	depends on ARM && MTD_JEDECPROBE && ARCH_CEIVA
+	help
+	  This enables access to the flash chips on the Ceiva/Polaroid
+	  PhotoMax Digital Picture Frame.
+	  If you have such a device, say 'Y'.
+
+# This needs CFI or JEDEC, depending on the cards found.
+config MTD_PCI
+	tristate "PCI MTD driver"
+	depends on MTD && PCI
+	help
+	  Mapping for accessing flash devices on add-in cards like the Intel XScale
+	  IQ80310 card, and the Intel EBSA285 card in blank ROM programming mode
+	  (please see the manual for the link settings).
+
+	  If you are not sure, say N.
+
+config MTD_PCMCIA
+	tristate "PCMCIA MTD driver"
+	depends on MTD && PCMCIA
+	help
+	  Map driver for accessing PCMCIA linear flash memory cards. These
+	  cards are usually around 4-16MiB in size. This does not include
+	  Compact Flash cards which are treated as IDE devices.
+
+endmenu
+
diff -Nru a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
--- a/drivers/mtd/mtdblock.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/mtd/mtdblock.c	Wed Oct 30 16:44:27 2002
@@ -14,6 +14,7 @@
 #include <linux/buffer_head.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/compatmac.h>
+#include <linux/buffer_head.h>
 
 #define MAJOR_NR MTD_BLOCK_MAJOR
 #define DEVICE_NAME "mtdblock"
@@ -23,6 +24,10 @@
 
 #ifdef CONFIG_DEVFS_FS
 #include <linux/devfs_fs_kernel.h>
+static devfs_handle_t devfs_dir_handle = NULL;
+static devfs_handle_t devfs_rw_handle[MAX_MTD_DEVICES];
+#endif
+
 static void mtd_notify_add(struct mtd_info* mtd);
 static void mtd_notify_remove(struct mtd_info* mtd);
 static struct mtd_notifier notifier = {
@@ -30,9 +35,6 @@
         mtd_notify_remove,
         NULL
 };
-static devfs_handle_t devfs_dir_handle = NULL;
-static devfs_handle_t devfs_rw_handle[MAX_MTD_DEVICES];
-#endif
 
 static struct mtdblk_dev {
 	struct mtd_info *mtd; /* Locked */
@@ -42,9 +44,10 @@
 	unsigned long cache_offset;
 	unsigned int cache_size;
 	enum { STATE_EMPTY, STATE_CLEAN, STATE_DIRTY } cache_state;
-	struct gendisk *disk;
 } *mtdblks[MAX_MTD_DEVICES];
 
+static struct gendisk *mtddisk[MAX_MTD_DEVICES];
+
 static spinlock_t mtdblks_lock;
 
 /*
@@ -295,7 +298,7 @@
 	spin_unlock(&mtdblks_lock);
 
 	mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
-	disk = alloc_disk(1);
+	disk = mtddisk[dev];
 	if (!mtdblk || !disk)
 		goto Enomem;
 	memset(mtdblk, 0, sizeof(*mtdblk));
@@ -311,11 +314,6 @@
 		if (!mtdblk->cache_data)
 			goto Enomem;
 	}
-	disk->major = MAJOR_NR;
-	disk->first_minor = dev;
-	disk->fops = &mtd_fops;
-	sprintf(disk->disk_name, "mtd%d", dev);
-	mtdblk->disk = disk;
 
 	/* OK, we've created a new one. Add it to the list. */
 
@@ -328,14 +326,11 @@
 		put_mtd_device(mtdblk->mtd);
 		vfree(mtdblk->cache_data);
 		kfree(mtdblk);
-		put_disk(disk);
 		return 0;
 	}
 
 	mtdblks[dev] = mtdblk;
-	set_capacity(disk, mtdblk->mtd->size/512);
-	add_disk(disk);
-	set_device_ro (inode->i_rdev, !(mtdblk->mtd->flags & MTD_WRITEABLE));
+	set_device_ro(inode->i_bdev, !(mtdblk->mtd->flags & MTD_WRITEABLE));
 
 	spin_unlock(&mtdblks_lock);
 
@@ -344,7 +339,6 @@
 	return 0;
 Enomem:
 	put_mtd_device(mtd);
-	put_disk(disk);
 	kfree(mtdblk);
 	return -ENOMEM;
 }
@@ -370,8 +364,6 @@
 		/* It was the last usage. Free the device */
 		mtdblks[dev] = NULL;
 		spin_unlock(&mtdblks_lock);
-		del_gendisk(mtdblk->disk);
-		put_disk(mtdblk->disk);
 		if (mtdblk->mtd->sync)
 			mtdblk->mtd->sync(mtdblk->mtd);
 		put_mtd_device(mtdblk->mtd);
@@ -394,24 +386,19 @@
  * The head of our request queue is considered active so there is no need 
  * to dequeue requests before we are done.
  */
+static struct request_queue mtd_queue;
 static void handle_mtdblock_request(void)
 {
-	struct request *req;
 	struct mtdblk_dev *mtdblk;
 	unsigned int res;
 
-	for (;;) {
-		if (blk_queue_empty(QUEUE))
-			return;
-
-		req = CURRENT;
-		spin_unlock_irq(QUEUE->queue_lock);
-		mtdblk = mtdblks[minor(req->rq_dev)];
+	while (!blk_queue_empty(&mtd_queue)) {
+		struct request *req = elv_next_request(&mtd_queue);
+		spin_unlock_irq(mtd_queue.queue_lock);
+		struct mtdblk_dev **p = req->rq_disk->private_data;
+		mtdblk = *p;
 		res = 0;
 
-		if (minor(req->rq_dev) >= MAX_MTD_DEVICES)
-			panic("handle_mtdblock_request: minor out of bound");
-
 		if (! (req->flags & REQ_CMD))
 			goto end_req;
 
@@ -419,7 +406,8 @@
 			goto end_req;
 
 		// Handle the request
-		switch (rq_data_dir(CURRENT)) {
+		switch (rq_data_dir(req))
+		{
 			int err;
 
 			case READ:
@@ -449,7 +437,7 @@
 		}
 
 end_req:
-		spin_lock_irq(QUEUE->queue_lock);
+		spin_lock_irq(mtd_queue.queue_lock);
 		if (!end_that_request_first(req, res, req->hard_cur_sectors)) {
 			blkdev_dequeue_request(req);
 			end_that_request_last(req);
@@ -479,16 +467,16 @@
 	while (!leaving) {
 		add_wait_queue(&thr_wq, &wait);
 		set_current_state(TASK_INTERRUPTIBLE);
-		spin_lock_irq(QUEUE->queue_lock);
-		if (blk_queue_empty(QUEUE) || blk_queue_plugged(QUEUE)) {
-			spin_unlock_irq(QUEUE->queue_lock);
+		spin_lock_irq(mtd_queue.queue_lock);
+		if (blk_queue_empty(&mtd_queue) || blk_queue_plugged(&mtd_queue)) {
+			spin_unlock_irq(mtd_queue.queue_lock);
 			schedule();
 			remove_wait_queue(&thr_wq, &wait); 
 		} else {
 			remove_wait_queue(&thr_wq, &wait); 
 			set_current_state(TASK_RUNNING);
 			handle_mtdblock_request();
-			spin_unlock_irq(QUEUE->queue_lock);
+			spin_unlock_irq(mtd_queue.queue_lock);
 		}
 	}
 
@@ -533,28 +521,44 @@
 
 static struct block_device_operations mtd_fops = 
 {
-	owner: THIS_MODULE,
-	open: mtdblock_open,
-	release: mtdblock_release,
-	ioctl: mtdblock_ioctl
+	.owner		= THIS_MODULE,
+	.open		= mtdblock_open,
+	.release	= mtdblock_release,
+	.ioctl		= mtdblock_ioctl
 };
 
-#ifdef CONFIG_DEVFS_FS
 /* Notification that a new device has been added. Create the devfs entry for
  * it. */
 
 static void mtd_notify_add(struct mtd_info* mtd)
 {
+	struct gendisk *disk;
         char name[8];
 
         if (!mtd || mtd->type == MTD_ABSENT)
                 return;
 
+#ifdef CONFIG_DEVFS_FS
         sprintf(name, "%d", mtd->index);
         devfs_rw_handle[mtd->index] = devfs_register(devfs_dir_handle, name,
                         DEVFS_FL_DEFAULT, MTD_BLOCK_MAJOR, mtd->index,
                         S_IFBLK | S_IRUGO | S_IWUGO,
                         &mtd_fops, NULL);
+#endif
+
+	disk = alloc_disk(1);
+	if (disk) {
+		disk->major = MAJOR_NR;
+		disk->first_minor = mtd->index;
+		disk->fops = &mtd_fops;
+		sprintf(disk->disk_name, "mtd%d", mtd->index);
+
+		mtddisk[mtd->index] = disk;
+		set_capacity(disk, mtd->size / 512);
+		disk->private_data = &mtdblks[mtd->index];
+		disk->queue = &mtd_queue;
+		add_disk(disk);
+	}
 }
 
 static void mtd_notify_remove(struct mtd_info* mtd)
@@ -562,10 +566,17 @@
         if (!mtd || mtd->type == MTD_ABSENT)
                 return;
 
+#ifdef CONFIG_DEVFS_FS
         devfs_unregister(devfs_rw_handle[mtd->index]);
-}
 #endif
 
+        if (mtddisk[mtd->index]) {
+		del_gendisk(mtddisk[mtd->index]);
+        	put_disk(mtddisk[mtd->index]);
+        	mtddisk[mtd->index] = NULL;
+        }
+}
+
 static spinlock_t mtddev_lock = SPIN_LOCK_UNLOCKED;
 
 int __init init_mtdblock(void)
@@ -578,11 +589,11 @@
 	}
 #ifdef CONFIG_DEVFS_FS
 	devfs_dir_handle = devfs_mk_dir(NULL, DEVICE_NAME, NULL);
-	register_mtd_user(&notifier);
 #endif
+	register_mtd_user(&notifier);
 	
 	init_waitqueue_head(&thr_wq);
-	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), &mtdblock_request, &mtddev_lock);
+	blk_init_queue(&mtd_queue, &mtdblock_request, &mtddev_lock);
 	kernel_thread (mtdblock_thread, NULL, CLONE_FS|CLONE_FILES|CLONE_SIGHAND);
 	return 0;
 }
@@ -592,12 +603,12 @@
 	leaving = 1;
 	wake_up(&thr_wq);
 	down(&thread_sem);
-#ifdef CONFIG_DEVFS_FS
 	unregister_mtd_user(&notifier);
+#ifdef CONFIG_DEVFS_FS
 	devfs_unregister(devfs_dir_handle);
 #endif
 	unregister_blkdev(MAJOR_NR,DEVICE_NAME);
-	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+	blk_cleanup_queue(&mtd_queue);
 }
 
 module_init(init_mtdblock);
diff -Nru a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
--- a/drivers/mtd/mtdblock_ro.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/mtd/mtdblock_ro.c	Wed Oct 30 16:44:28 2002
@@ -1,8 +1,8 @@
 /*
- * $Id: mtdblock_ro.c,v 1.9 2001/10/02 15:05:11 dwmw2 Exp $
+ * $Id: mtdblock_ro.c,v 1.13 2002/03/11 16:03:29 sioux Exp $
  *
- * Read-only version of the mtdblock device, without the 
- * read/erase/modify/writeback stuff
+ * Read-only flash, read-write RAM version of the mtdblock device,
+ * without caching.
  */
 
 #ifdef MTDBLOCK_DEBUG
@@ -21,216 +21,226 @@
 #define LOCAL_END_REQUEST
 #define MAJOR_NR MTD_BLOCK_MAJOR
 #define DEVICE_NAME "mtdblock"
-#define DEVICE_NR(device) (device)
 #include <linux/blk.h>
 
-#define RQFUNC_ARG request_queue_t *q
-
 #ifdef MTDBLOCK_DEBUG
 static int debug = MTDBLOCK_DEBUG;
 MODULE_PARM(debug, "i");
 #endif
 
-static struct gendisk *mtd_disks[MAX_MTD_DEVICES];
+struct mtdro_dev {
+	struct gendisk *disk;
+	struct mtd_info *mtd;
+	int open;
+};
+
+static struct mtdro_dev mtd_dev[MAX_MTD_DEVICES];
+static DECLARE_MUTEX(mtd_sem);
+
+static struct request_queue mtdro_queue;
+static spinlock_t mtdro_lock = SPIN_LOCK_UNLOCKED;
 
 static int mtdblock_open(struct inode *inode, struct file *file)
 {
-	struct mtd_info *mtd = NULL;
-	int dev = minor(inode->i_rdev);
-	struct gendisk *disk = mtd_disks[dev];
+	struct mtdro_dev *mdev = inode->i_bdev->bd_disk->private_data;
+	int ret = 0;
 
 	DEBUG(1,"mtdblock_open\n");
 
-	mtd = get_mtd_device(NULL, dev);
-	if (!mtd)
-		return -EINVAL;
-	if (MTD_ABSENT == mtd->type) {
-		put_mtd_device(mtd);
-		return -EINVAL;
+	down(&mtd_sem);
+	if (mdev->mtd == NULL) {
+		mdev->mtd = get_mtd_device(NULL, minor(inode->i_rdev));
+		if (!mdev->mtd || mdev->mtd->type == MTD_ABSENT) {
+			if (mdev->mtd)
+				put_mtd_device(mdev->mtd);
+			ret = -ENODEV;
+		}
 	}
 
-	set_capacity(disk, mtd->size>>9);
-	add_disk(disk);
+	if (ret == 0) {
+		set_device_ro(inode->i_bdev, !(mdev->mtd->flags & MTD_CAP_RAM));
+		mdev->open++;
+	}
+	up(&mtd_sem);
 
-	DEBUG(1, "ok\n");
+	DEBUG(1, "%s\n", ret ? "ok" : "nodev");
 
-	return 0;
+	return ret;
 }
 
 static release_t mtdblock_release(struct inode *inode, struct file *file)
 {
-	int dev;
-	struct mtd_info *mtd;
+	struct mtdro_dev *mdev = inode->i_bdev->bd_disk->private_data;
 
    	DEBUG(1, "mtdblock_release\n");
 
-	if (inode == NULL)
-		release_return(-ENODEV);
-   
-	dev = minor(inode->i_rdev);
-	mtd = __get_mtd_device(NULL, dev);
-
-	if (!mtd) {
-		printk(KERN_WARNING "MTD device is absent on mtd_release!\n");
-		release_return(-ENODEV);
-	}
-
-	del_gendisk(mtd_disks[dev]);
-	
-	if (mtd->sync)
-		mtd->sync(mtd);
+   	down(&mtd_sem);
+   	if (mdev->open-- == 0) {
+		struct mtd_info *mtd = mdev->mtd;
+
+		mdev->mtd = NULL;
+		if (mtd->sync)
+			mtd->sync(mtd);
 
-	put_mtd_device(mtd);
+		put_mtd_device(mtd);
+	}
+	up(&mtd_sem);
 
 	DEBUG(1, "ok\n");
 
 	release_return(0);
 }
 
-static inline void mtdblock_end_request(struct request *req, int uptodate)
+static void mtdblock_request(request_queue_t *q)
 {
-	if (end_that_request_first(req, uptodate, req->hard_cur_sectors))
-		return;
-	blkdev_dequeue_request(req);
-	end_that_request_last(req);
-}
-
-static void mtdblock_request(RQFUNC_ARG)
-{
-   struct request *current_request;
-   unsigned int res = 0;
-   struct mtd_info *mtd;
-
-   while (1)
-   {
-      /* Grab the Request and unlink it from the request list, we
-	 will execute a return if we are done. */
-	if (blk_queue_empty(QUEUE))
-		return;
-
-      current_request = CURRENT;
-
-      if (minor(current_request->rq_dev) >= MAX_MTD_DEVICES)
-      {
-	 printk("mtd: Unsupported device!\n");
-	 mtdblock_end_request(current_request, 0);
-	 continue;
-      }
-      
-      // Grab our MTD structure
-
-      mtd = __get_mtd_device(NULL, minor(current_request->rq_dev));
-      if (!mtd) {
-	      printk("MTD device %s doesn't appear to exist any more\n", kdevname(DEVICE_NR(CURRENT->rq_dev)));
-	      mtdblock_end_request(current_request, 0);
-      }
-
-      if (current_request->sector << 9 > mtd->size ||
-	  (current_request->sector + current_request->nr_sectors) << 9 > mtd->size)
-      {
-	 printk("mtd: Attempt to read past end of device!\n");
-	 printk("size: %x, sector: %lx, nr_sectors %lx\n", mtd->size, current_request->sector, current_request->nr_sectors);
-	 mtdblock_end_request(current_request, 0);
-	 continue;
-      }
+	while (!blk_queue_empty(q)) {
+		struct request *req = elv_next_request(q);
+		struct mtdro_dev *mdev = req->rq_disk->private_data;
+		struct mtd_info *mtd = mdev->mtd;
+		unsigned int res;
+
+		if (!(req->flags & REQ_CMD)) {
+			res = 0;
+			goto end_req;
+		}
+
+		if ((req->sector + req->current_nr_sectors) > (mtd->size >> 9)) {
+			printk("mtd: Attempt to read past end of device!\n");
+			printk("size: %x, sector: %lx, nr_sectors: %x\n",
+				mtd->size, req->sector, req->current_nr_sectors);
+			res = 0;
+			goto end_req;
+		}
       
-      /* Remove the request we are handling from the request list so nobody messes
-         with it */
-      /* Now drop the lock that the ll_rw_blk functions grabbed for us
-         and process the request. This is necessary due to the extreme time
-         we spend processing it. */
-      spin_unlock_irq(&io_request_lock);
-
-      // Handle the request
-      switch (current_request->cmd)
-      {
-         size_t retlen;
-
-	 case READ:
-	 if (MTD_READ(mtd,current_request->sector<<9, 
-		      current_request->nr_sectors << 9, 
-		      &retlen, current_request->buffer) == 0)
-	    res = 1;
-	 else
-	    res = 0;
-	 break;
-	 
-	 case WRITE:
-
-	 /* printk("mtdblock_request WRITE sector=%d(%d)\n",current_request->sector,
-		current_request->nr_sectors);
-	 */
-
-	 // Read only device
-	 if ((mtd->flags & MTD_CAP_RAM) == 0)
-	 {
-	    res = 0;
-	    break;
-	 }
-
-	 // Do the write
-	 if (MTD_WRITE(mtd,current_request->sector<<9, 
-		       current_request->nr_sectors << 9, 
-		       &retlen, current_request->buffer) == 0)
-	    res = 1;
-	 else
-	    res = 0;
-	 break;
-	 
-	 // Shouldn't happen
-	 default:
-	 printk("mtd: unknown request\n");
-	 break;
-      }
-
-      // Grab the lock and re-thread the item onto the linked list
-	spin_lock_irq(&io_request_lock);
-	mtdblock_end_request(current_request, res);
-   }
+		/* Now drop the lock that the ll_rw_blk functions grabbed for
+		   us and process the request. This is necessary due to the
+		   extreme time we spend processing it. */
+		spin_unlock_irq(q->queue_lock);
+
+		/* Handle the request */
+		switch (rq_data_dir(req)) {
+			size_t retlen;
+
+			case READ:
+				if (MTD_READ(mtd, req->sector << 9,
+					     req->current_nr_sectors << 9, 
+					     &retlen, req->buffer) == 0)
+					res = 1;
+				else
+					res = 0;
+				break;
+
+			case WRITE:
+				/* printk("mtdblock_request WRITE sector=%d(%d)\n",
+					req->sector, req->current_nr_sectors);
+				 */
+
+				/* Read only device */
+				if ((mtd->flags & MTD_CAP_RAM) == 0) {
+					res = 0;
+					break;
+				}
+
+				/* Do the write */
+				if (MTD_WRITE(mtd, req->sector << 9, 
+					      req->current_nr_sectors << 9, 
+					      &retlen, req->buffer) == 0)
+					res = 1;
+				else
+					res = 0;
+				break;
+
+			/* Shouldn't happen */
+			default:
+				printk("mtd: unknown request\n");
+				res = 0;
+				break;
+		}
+
+		/* Grab the lock and re-thread the item onto the linked list */
+		spin_lock_irq(q->queue_lock);
+ end_req:
+		if (!end_that_request_first(req, res, req->hard_cur_sectors)) {
+			blkdev_dequeue_request(req);
+			end_that_request_last(req);
+		}
+	}
 }
 
-
-
 static int mtdblock_ioctl(struct inode * inode, struct file * file,
 		      unsigned int cmd, unsigned long arg)
 {
-	struct mtd_info *mtd;
-
-	mtd = __get_mtd_device(NULL, minor(inode->i_rdev));
+	struct mtdro_dev *mdev = inode->i_bdev->bd_disk->private_data;
 
-	if (!mtd || cmd != BLKFLSBUF)
+	if (cmd != BLKFLSBUF)
 		return -EINVAL;
 
 	fsync_bdev(inode->i_bdev);
 	invalidate_bdev(inode->i_bdev, 0);
-	if (mtd->sync)
-		mtd->sync(mtd);
+	if (mdev->mtd->sync)
+		mdev->mtd->sync(mdev->mtd);
+
 	return 0;
 }
 
-static struct block_device_operations mtd_fops = 
-{
+static struct block_device_operations mtd_fops = {
 	.owner		= THIS_MODULE,
 	.open		= mtdblock_open,
 	.release	= mtdblock_release,
 	.ioctl		= mtdblock_ioctl
 };
 
-int __init init_mtdblock(void)
+/* Called with mtd_table_mutex held. */
+static void mtd_notify_add(struct mtd_info* mtd)
 {
-	int err = -ENOMEM;
-	int i;
+	struct gendisk *disk;
 
-	for (i = 0; i < MAX_MTD_DEVICES; i++) {
-		struct gendisk *disk = alloc_disk(1);
-		if (!disk)
-			goto out;
+        if (!mtd || mtd->type == MTD_ABSENT || mtd->index >= MAX_MTD_DEVICES)
+                return;
+
+	disk = alloc_disk(1);
+	if (disk) {
 		disk->major = MAJOR_NR;
-		disk->first_minor = i;
-		sprintf(disk->disk_name, "mtdblock%d", i);
+		disk->first_minor = mtd->index;
 		disk->fops = &mtd_fops;
-		mtd_disks[i] = disk;
+		sprintf(disk->disk_name, "mtdblock%d", mtd->index);
+
+		mtd_dev[mtd->index].disk = disk;
+		set_capacity(disk, mtd->size / 512);
+		disk->queue = &mtdro_queue;
+		disk->private_data = &mtd_dev[mtd->index];
+		add_disk(disk);
 	}
+}
+
+/* Called with mtd_table_mutex held. */
+static void mtd_notify_remove(struct mtd_info* mtd)
+{
+	struct mtdro_dev *mdev;
+	struct gendisk *disk;
+
+        if (!mtd || mtd->type == MTD_ABSENT || mtd->index >= MAX_MTD_DEVICES)
+                return;
+
+	mdev = &mtd_dev[mtd->index];
+
+	disk = mdev->disk;
+	mdev->disk = NULL;
+
+	if (disk) {
+		del_gendisk(disk);
+        	put_disk(disk);
+        }
+}
+
+static struct mtd_notifier notifier = {
+	.add	= mtd_notify_add,
+        .remove	= mtd_notify_remove,
+};
+
+int __init init_mtdblock(void)
+{
+	int err;
 
 	if (register_blkdev(MAJOR_NR,DEVICE_NAME,&mtd_fops)) {
 		printk(KERN_NOTICE "Can't allocate major number %d for Memory Technology Devices.\n",
@@ -239,21 +249,18 @@
 		goto out;
 	}
 
-	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), &mtdblock_request);
-	return 0;
-out:
-	while (i--)
-		put_disk(mtd_disks[i]);
+	blk_init_queue(&mtdro_queue, &mtdblock_request, &mtdro_lock);
+	register_mtd_user(&notifier);
+	err = 0;
+ out:
 	return err;
 }
 
 static void __exit cleanup_mtdblock(void)
 {
-	int i;
+	unregister_mtd_user(&notifier);
 	unregister_blkdev(MAJOR_NR,DEVICE_NAME);
-	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
-	for (i = 0; i < MAX_MTD_DEVICES; i++)
-		put_disk(mtd_disks[i]);
+	blk_cleanup_queue(&mtdro_queue);
 }
 
 module_init(init_mtdblock);
@@ -262,4 +269,4 @@
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Erwin Authried <eauth@softsys.co.at> et al.");
-MODULE_DESCRIPTION("Simple read-only block device emulation access to MTD devices");
+MODULE_DESCRIPTION("Simple uncached block device emulation access to MTD devices");
diff -Nru a/drivers/mtd/nand/Config.help b/drivers/mtd/nand/Config.help
--- a/drivers/mtd/nand/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-CONFIG_MTD_NAND
-  This enables support for accessing all type of NAND flash
-  devices.
-
-CONFIG_MTD_NAND_ECC
-  This enables software-based ECC for use with NAND flash chips. It
-  can detect and correct 1 bit errors per 256 byte blocks. This
-  should be used to increase the reliability of the data stored and
-  read on the device.
-
-CONFIG_MTD_NAND_VERIFY_WRITE
-  This adds an extra check when data is written to the flash. The
-  NAND flash device internally checks only bits transitioning
-  from 1 to 0. There is a rare possibility that even though the
-  device thinks the write was successful, a bit could have been
-  flipped accidentaly due to device wear, gamma rays, whatever.
-  Enable this if you are really paranoid.
-
-CONFIG_MTD_NAND_SPIA
-  If you had to ask, you don't have one. Say 'N'.
-
diff -Nru a/drivers/mtd/nand/Config.in b/drivers/mtd/nand/Config.in
--- a/drivers/mtd/nand/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-# drivers/mtd/nand/Config.in
-
-# $Id: Config.in,v 1.4 2001/09/19 09:35:23 dwmw2 Exp $
-
-mainmenu_option next_comment
-
-comment 'NAND Flash Device Drivers'
-
-dep_tristate '  NAND Device Support' CONFIG_MTD_NAND $CONFIG_MTD
-if [ "$CONFIG_MTD_NAND" = "y" -o "$CONFIG_MTD_NAND" = "m" ]; then
-   bool '    Enable ECC correction algorithm'  CONFIG_MTD_NAND_ECC
-   bool '    Verify NAND page writes' CONFIG_MTD_NAND_VERIFY_WRITE
-fi
-if [ "$CONFIG_ARM" = "y" -a "$CONFIG_ARCH_P720T" = "y" ]; then
-   dep_tristate '  NAND Flash device on SPIA board' CONFIG_MTD_NAND_SPIA $CONFIG_MTD_NAND
-fi
-
-endmenu
diff -Nru a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/mtd/nand/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,41 @@
+# drivers/mtd/nand/Config.in
+# $Id: Config.in,v 1.4 2001/09/19 09:35:23 dwmw2 Exp $
+
+menu "NAND Flash Device Drivers"
+	depends on MTD!=n
+
+config MTD_NAND
+	tristate "NAND Device Support"
+	depends on MTD
+	help
+	  This enables support for accessing all type of NAND flash
+	  devices.
+
+config MTD_NAND_ECC
+	bool "Enable ECC correction algorithm"
+	depends on MTD_NAND
+	help
+	  This enables software-based ECC for use with NAND flash chips. It
+	  can detect and correct 1 bit errors per 256 byte blocks. This
+	  should be used to increase the reliability of the data stored and
+	  read on the device.
+
+config MTD_NAND_VERIFY_WRITE
+	bool "Verify NAND page writes"
+	depends on MTD_NAND
+	help
+	  This adds an extra check when data is written to the flash. The
+	  NAND flash device internally checks only bits transitioning
+	  from 1 to 0. There is a rare possibility that even though the
+	  device thinks the write was successful, a bit could have been
+	  flipped accidentaly due to device wear, gamma rays, whatever.
+	  Enable this if you are really paranoid.
+
+config MTD_NAND_SPIA
+	tristate "NAND Flash device on SPIA board"
+	depends on ARM && ARCH_P720T && MTD_NAND
+	help
+	  If you had to ask, you don't have one. Say 'N'.
+
+endmenu
+
diff -Nru a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
--- a/drivers/mtd/nftlcore.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/mtd/nftlcore.c	Wed Oct 30 16:44:19 2002
@@ -49,6 +49,8 @@
 
 struct NFTLrecord *NFTLs[MAX_NFTLS];
 
+static struct request_queue nftl_queue;
+
 static void NFTL_setup(struct mtd_info *mtd)
 {
 	int i;
@@ -134,6 +136,8 @@
 	gd->first_minor = firstfree << NFTL_PARTN_BITS;
 	set_capacity(gd, nftl->nr_sects);
 	nftl->disk = gd;
+	gd->private_data = nftl;
+	gd->queue = &nftl_queue;
 	add_disk(gd);
 }
 
@@ -752,13 +756,7 @@
 
 static int nftl_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg)
 {
-	struct NFTLrecord *nftl;
-	int res;
-
-	nftl = NFTLs[minor(inode->i_rdev) >> NFTL_PARTN_BITS];
-
-	if (!nftl) return -EINVAL;
-
+	struct NFTLrecord *nftl = inode->i_bdev->bd_disk->private_data;
 	switch (cmd) {
 	case HDIO_GETGEO: {
 		struct hd_geometry g;
@@ -780,23 +778,19 @@
 	}
 }
 
-void nftl_request(RQFUNC_ARG)
+void nftl_request(struct request_queue *q)
 {
-	unsigned int dev, unit, block, nsect;
-	struct NFTLrecord *nftl;
-	char *buffer;
-	struct request *req;
-	int res;
-
-	while (1) {
-		if (blk_queue_empty(QUEUE))
-			return;
-
-		req = CURRENT;
+	while (!blk_queue_empty(q)) {
+		struct request *req = elv_next_request(q);
+		unsigned block = req->sector;
+		unsigned nsect = req->current_nr_sectors;
+		char *buffer = req->buffer;
+		struct NFTLrecord *nftl = req->rq_disk->private_data;
+		int res = 1; /* succeed */
 		
 		/* We can do this because the generic code knows not to
 		   touch the request at the head of the queue */
-		spin_unlock_irq(QUEUE->queue_lock);
+		spin_unlock_irq(q->queue_lock);
 
 		DEBUG(MTD_DEBUG_LEVEL2, "NFTL_request\n");
 		DEBUG(MTD_DEBUG_LEVEL3,
@@ -804,29 +798,14 @@
 		      (req->cmd == READ) ? "Read " : "Write",
 		      (unsigned long long)req->sector, req->current_nr_sectors);
 
-		dev = minor(req->rq_dev);
-		block = req->sector;
-		nsect = req->current_nr_sectors;
-		buffer = req->buffer;
-		res = 1; /* succeed */
-
-		unit = dev >> NFTL_PARTN_BITS;
-		if (unit >= MAX_NFTLS || dev != (unit << NFTL_PARTN_BITS)) {
-			printk("nftl: bad minor number: device = %s\n",
-			       kdevname(req->rq_dev));
-			res = 0; /* fail */
-			goto repeat;
-		}
-		
-		nftl = NFTLs[dev / (1<<NFTL_PARTN_BITS)];
 		DEBUG(MTD_DEBUG_LEVEL3, "Waiting for mutex\n");
 		down(&nftl->mutex);
 		DEBUG(MTD_DEBUG_LEVEL3, "Got mutex\n");
 
 		if (block + nsect > get_capacity(nftl->disk)) {
 			/* access past the end of device */
-			printk("nftl%c%d: bad access: block = %d, count = %d\n",
-			       unit+'a', dev & 0xf, block, nsect);
+			printk("%s: bad access: block = %d, count = %d\n",
+			       nftl->disk->disk_name, block, nsect);
 			up(&nftl->mutex);
 			res = 0; /* fail */
 			goto repeat;
@@ -877,30 +856,24 @@
 		}
 	repeat: 
 		DEBUG(MTD_DEBUG_LEVEL3, "end_request(%d)\n", res);
-		spin_lock_irq(QUEUE->queue_lock);
-		end_request(CURRENT, res);
+		spin_lock_irq(q->queue_lock);
+		end_request(req, res);
 	}
 }
 
+static struct gendisk *nftl_probe(dev_t dev, int *part, void *data)
+{
+	request_module("docprobe");
+	return NULL;
+}
+
 static int nftl_open(struct inode *ip, struct file *fp)
 {
-	int nftlnum = minor(ip->i_rdev) >> NFTL_PARTN_BITS;
-	struct NFTLrecord *thisNFTL;
-	thisNFTL = NFTLs[nftlnum];
+	struct NFTLrecord *thisNFTL = ip->i_bdev->bd_disk->private_data;
 
 	DEBUG(MTD_DEBUG_LEVEL2,"NFTL_open\n");
-
-#ifdef CONFIG_KMOD
-	if (!thisNFTL && nftlnum == 0) {
-		request_module("docprobe");
-		thisNFTL = NFTLs[nftlnum];
-	}
-#endif
-	if (!thisNFTL) {
-		DEBUG(MTD_DEBUG_LEVEL2,"ENODEV: thisNFTL = %d, minor = %d, ip = %p, fp = %p\n", 
-		      nftlnum, minor(ip->i_rdev), ip, fp);
+	if (!thisNFTL)
 		return -ENODEV;
-	}
 
 #ifndef CONFIG_NFTL_RW
 	if (fp->f_mode & FMODE_WRITE)
@@ -915,9 +888,7 @@
 
 static int nftl_release(struct inode *inode, struct file *fp)
 {
-	struct NFTLrecord *thisNFTL;
-
-	thisNFTL = NFTLs[minor(inode->i_rdev) / 16];
+	struct NFTLrecord *thisNFTL = inode->i_bdev->bd_disk->private_data;
 
 	DEBUG(MTD_DEBUG_LEVEL2, "NFTL_release\n");
 
@@ -930,10 +901,10 @@
 }
 static struct block_device_operations nftl_fops = 
 {
-	owner:		THIS_MODULE,
-	open:		nftl_open,
-	release:	nftl_release,
-	ioctl: 		nftl_ioctl
+	.owner		= THIS_MODULE,
+	.open		= nftl_open,
+	.release	= nftl_release,
+	.ioctl 		= nftl_ioctl
 };
 
 /****************************************************************************
@@ -957,11 +928,15 @@
 	printk(KERN_INFO "NFTL driver: nftlcore.c $Revision: 1.82 $, nftlmount.c %s\n", nftlmountrev);
 #endif
 
-	if (register_blkdev(MAJOR_NR, "nftl", &nftl_fops)){
+	if (register_blkdev(MAJOR_NR, "nftl", &nftl_fops)) {
 		printk("unable to register NFTL block device on major %d\n", MAJOR_NR);
 		return -EBUSY;
 	}
-	blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), &nftl_request, &nftl_lock);
+
+	blk_register_region(MKDEV(MAJOR_NR, 0), 256,
+			THIS_MODULE, nftl_probe, NULL, NULL);
+
+	blk_init_queue(&nftl_queue, &nftl_request, &nftl_lock);
 	
 	register_mtd_user(&nftl_notifier);
 
@@ -971,8 +946,9 @@
 static void __exit cleanup_nftl(void)
 {
   	unregister_mtd_user(&nftl_notifier);
+	blk_unregister_region(MKDEV(MAJOR_NR, 0), 256);
   	unregister_blkdev(MAJOR_NR, "nftl");
-  	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
+  	blk_cleanup_queue(&nftl_queue);
 }
 
 module_init(init_nftl);
diff -Nru a/drivers/net/3c509.c b/drivers/net/3c509.c
--- a/drivers/net/3c509.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/net/3c509.c	Wed Oct 30 16:44:19 2002
@@ -43,7 +43,7 @@
 		v1.18 12Mar2001 Andrew Morton <andrewm@uow.edu.au>
 			- Avoid bogus detect of 3c590's (Andrzej Krzysztofowicz)
 			- Reviewed against 1.18 from scyld.com
-		v1.18a 17Nov2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+		v1.18a 17Nov2001 Jeff Garzik <jgarzik@pobox.com>
 			- ethtool support
 		v1.18b 1Mar2002 Zwane Mwaikambo <zwane@commfireservices.com>
 			- Power Management support
diff -Nru a/drivers/net/3c515.c b/drivers/net/3c515.c
--- a/drivers/net/3c515.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/net/3c515.c	Wed Oct 30 16:44:24 2002
@@ -1,4 +1,4 @@
-/* 3c515.c: A 3Com ISA EtherLink XL "Corkscrew" ethernet driver for linux. */
+
 /*
 	Written 1997-1998 by Donald Becker.
 
@@ -13,17 +13,19 @@
 	Annapolis MD 21403
 
 
-	2/2/00- Added support for kernel-level ISAPnP 
+	2000/2/2- Added support for kernel-level ISAPnP 
 		by Stephen Frost <sfrost@snowman.net> and Alessandro Zummo
 	Cleaned up for 2.3.x/softnet by Jeff Garzik and Alan Cox.
 	
-	11/17/2001 - Added ethtool support (jgarzik)
+	2001/11/17 - Added ethtool support (jgarzik)
+	
+	2002/10/28 - Locking updates for 2.5 (alan@redhat.com)
 
 */
 
 #define DRV_NAME		"3c515"
-#define DRV_VERSION		"0.99t"
-#define DRV_RELDATE		"17-Nov-2001"
+#define DRV_VERSION		"0.99t-ac"
+#define DRV_RELDATE		"28-Oct-2002"
 
 static char *version =
 DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " becker@scyld.com and others\n";
@@ -84,12 +86,6 @@
 #define NEW_MULTICAST
 #include <linux/delay.h>
 
-/* Kernel version compatibility functions. */
-#define RUN_AT(x) (jiffies + (x))
-
-#define REQUEST_IRQ(i,h,f,n, instance) request_irq(i,h,f,n, instance)
-#define IRQ(irq, dev_id, pt_regs) (irq, dev_id, pt_regs)
-
 MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
 MODULE_DESCRIPTION("3Com 3c515 Corkscrew driver");
 MODULE_LICENSE("GPL");
@@ -202,16 +198,13 @@
 enum corkscrew_cmd {
 	TotalReset = 0 << 11, SelectWindow = 1 << 11, StartCoax = 2 << 11,
 	RxDisable = 3 << 11, RxEnable = 4 << 11, RxReset = 5 << 11,
-	UpStall = 6 << 11, UpUnstall = (6 << 11) + 1,
-	DownStall = (6 << 11) + 2, DownUnstall = (6 << 11) + 3,
-	RxDiscard = 8 << 11, TxEnable = 9 << 11, TxDisable =
-	    10 << 11, TxReset = 11 << 11,
-	FakeIntr = 12 << 11, AckIntr = 13 << 11, SetIntrEnb = 14 << 11,
-	SetStatusEnb = 15 << 11, SetRxFilter = 16 << 11, SetRxThreshold =
-	    17 << 11,
-	SetTxThreshold = 18 << 11, SetTxStart = 19 << 11,
-	StartDMAUp = 20 << 11, StartDMADown = (20 << 11) + 1, StatsEnable =
-	    21 << 11,
+	UpStall = 6 << 11, UpUnstall = (6 << 11) + 1, DownStall = (6 << 11) + 2,
+	DownUnstall = (6 << 11) + 3, RxDiscard = 8 << 11, TxEnable = 9 << 11, 
+	TxDisable = 10 << 11, TxReset = 11 << 11, FakeIntr = 12 << 11, 
+	AckIntr = 13 << 11, SetIntrEnb = 14 << 11, SetStatusEnb = 15 << 11, 
+	SetRxFilter = 16 << 11, SetRxThreshold = 17 << 11,
+	SetTxThreshold = 18 << 11, SetTxStart = 19 << 11, StartDMAUp = 20 << 11,
+	StartDMADown = (20 << 11) + 1, StatsEnable = 21 << 11,
 	StatsDisable = 22 << 11, StopCoax = 23 << 11,
 };
 
@@ -265,11 +258,9 @@
 union wn3_config {
 	int i;
 	struct w3_config_fields {
-		unsigned int ram_size:3, ram_width:1, ram_speed:2,
-		    rom_size:2;
+		unsigned int ram_size:3, ram_width:1, ram_speed:2, rom_size:2;
 		int pad8:8;
-		unsigned int ram_split:2, pad18:2, xcvr:3, pad21:1,
-		    autoselect:1;
+		unsigned int ram_split:2, pad18:2, xcvr:3, pad21:1, autoselect:1;
 		int pad24:7;
 	} u;
 };
@@ -340,14 +331,14 @@
 		full_duplex:1, autoselect:1, bus_master:1,	/* Vortex can only do a fragment bus-m. */
 		full_bus_master_tx:1, full_bus_master_rx:1,	/* Boomerang  */
 		tx_full:1;
+	spinlock_t lock;
 };
 
 /* The action to take with a media selection timer tick.
    Note that we deviate from the 3Com order by checking 10base2 before AUI.
  */
 enum xcvr_types {
-	XCVR_10baseT =
-	    0, XCVR_AUI, XCVR_10baseTOnly, XCVR_10base2, XCVR_100baseTx,
+	XCVR_10baseT = 0, XCVR_AUI, XCVR_10baseTOnly, XCVR_10base2, XCVR_100baseTx,
 	XCVR_100baseFx, XCVR_MII = 6, XCVR_Default = 8,
 };
 
@@ -577,27 +568,23 @@
 
 #ifdef MODULE
 	/* Allocate and fill new device structure. */
-	int dev_size = sizeof(struct net_device) +
-	    sizeof(struct corkscrew_private) + 15;	/* Pad for alignment */
+	int dev_size = sizeof(struct net_device) + sizeof(struct corkscrew_private) + 15;	/* Pad for alignment */
 
 	dev = (struct net_device *) kmalloc(dev_size, GFP_KERNEL);
 	if (!dev)
 		return NULL;
 	memset(dev, 0, dev_size);
 	/* Align the Rx and Tx ring entries.  */
-	dev->priv =
-	    (void *) (((long) dev + sizeof(struct net_device) + 15) & ~15);
+	dev->priv = (void *) (((long) dev + sizeof(struct net_device) + 15) & ~15);
 	vp = (struct corkscrew_private *) dev->priv;
 	dev->base_addr = ioaddr;
 	dev->irq = irq;
-	dev->dma =
-	    (product_index == CORKSCREW_ID ? inw(ioaddr + 0x2000) & 7 : 0);
+	dev->dma = (product_index == CORKSCREW_ID ? inw(ioaddr + 0x2000) & 7 : 0);
 	dev->init = corkscrew_probe1;
 	vp->product_name = "3c515";
 	vp->options = options;
 	if (options >= 0) {
-		vp->media_override =
-		    ((options & 7) == 2) ? 0 : options & 7;
+		vp->media_override = ((options & 7) == 2) ? 0 : options & 7;
 		vp->full_duplex = (options & 8) ? 1 : 0;
 		vp->bus_master = (options & 16) ? 1 : 0;
 	} else {
@@ -615,22 +602,19 @@
 	}
 #else				/* not a MODULE */
 	/* Caution: quad-word alignment required for rings! */
-	dev->priv =
-	    kmalloc(sizeof(struct corkscrew_private), GFP_KERNEL);
+	dev->priv = kmalloc(sizeof(struct corkscrew_private), GFP_KERNEL);
 	if (!dev->priv)
 		return NULL;
 	memset(dev->priv, 0, sizeof(struct corkscrew_private));
 	dev = init_etherdev(dev, sizeof(struct corkscrew_private));
 	dev->base_addr = ioaddr;
 	dev->irq = irq;
-	dev->dma =
-	    (product_index == CORKSCREW_ID ? inw(ioaddr + 0x2000) & 7 : 0);
+	dev->dma = (product_index == CORKSCREW_ID ? inw(ioaddr + 0x2000) & 7 : 0);
 	vp = (struct corkscrew_private *) dev->priv;
 	vp->product_name = "3c515";
 	vp->options = options;
 	if (options >= 0) {
-		vp->media_override =
-		    ((options & 7) == 2) ? 0 : options & 7;
+		vp->media_override = ((options & 7) == 2) ? 0 : options & 7;
 		vp->full_duplex = (options & 8) ? 1 : 0;
 		vp->bus_master = (options & 16) ? 1 : 0;
 	} else {
@@ -647,14 +631,14 @@
 static int corkscrew_probe1(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct corkscrew_private *vp =
-	    (struct corkscrew_private *) dev->priv;
+	struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv;
 	unsigned int eeprom[0x40], checksum = 0;	/* EEPROM contents */
 	int i;
 
-	printk(KERN_INFO "%s: 3Com %s at %#3x,", dev->name,
-	       vp->product_name, ioaddr);
+	printk(KERN_INFO "%s: 3Com %s at %#3x,", dev->name, vp->product_name, ioaddr);
 
+	spin_lock_init(&vp->lock);
+	
 	/* Read the station address from the EEPROM. */
 	EL3WINDOW(0);
 	for (i = 0; i < 0x18; i++) {
@@ -769,7 +753,7 @@
 			       dev->name, media_tbl[dev->if_port].name);
 
 		init_timer(&vp->timer);
-		vp->timer.expires = RUN_AT(media_tbl[dev->if_port].wait);
+		vp->timer.expires = jiffies + media_tbl[dev->if_port].wait;
 		vp->timer.data = (unsigned long) dev;
 		vp->timer.function = &corkscrew_timer;	/* timer handler */
 		add_timer(&vp->timer);
@@ -907,8 +891,7 @@
 {
 #ifdef AUTOMEDIA
 	struct net_device *dev = (struct net_device *) data;
-	struct corkscrew_private *vp =
-	    (struct corkscrew_private *) dev->priv;
+	struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv;
 	int ioaddr = dev->base_addr;
 	unsigned long flags;
 	int ok = 0;
@@ -917,8 +900,9 @@
 		printk("%s: Media selection timer tick happened, %s.\n",
 		       dev->name, media_tbl[dev->if_port].name);
 
-	save_flags(flags);
-	cli(); {
+	spin_lock_irqsave(&vp->lock, flags);
+	
+	{
 		int old_window = inw(ioaddr + EL3_CMD) >> 13;
 		int media_status;
 		EL3WINDOW(4);
@@ -969,7 +953,7 @@
 					printk("%s: Media selection failed, now trying %s port.\n",
 						dev->name,
 						media_tbl[dev->if_port].name);
-				vp->timer.expires = RUN_AT(media_tbl[dev->if_port].wait);
+				vp->timer.expires = jiffies + media_tbl[dev->if_port].wait;
 				add_timer(&vp->timer);
 			}
 			outw((media_status & ~(Media_10TP | Media_SQE)) |
@@ -986,7 +970,8 @@
 		}
 		EL3WINDOW(old_window);
 	}
-	restore_flags(flags);
+	
+	spin_unlock_irqrestore(&vp->lock, flags);
 	if (corkscrew_debug > 1)
 		printk("%s: Media selection timer finished, %s.\n",
 		       dev->name, media_tbl[dev->if_port].name);
@@ -1055,8 +1040,7 @@
 		if (vp->tx_full)	/* No room to transmit with */
 			return 1;
 		if (vp->cur_tx != 0)
-			prev_entry =
-			    &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE];
+			prev_entry = &vp->tx_ring[(vp->cur_tx - 1) % TX_RING_SIZE];
 		else
 			prev_entry = NULL;
 		if (corkscrew_debug > 3)
@@ -1069,23 +1053,21 @@
 		vp->tx_ring[entry].length = skb->len | 0x80000000;
 		vp->tx_ring[entry].status = skb->len | 0x80000000;
 
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&vp->lock, flags);
 		outw(DownStall, ioaddr + EL3_CMD);
 		/* Wait for the stall to complete. */
 		for (i = 20; i >= 0; i--)
-			if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) ==
-			    0) break;
+			if ((inw(ioaddr + EL3_STATUS) & CmdInProgress) == 0) 
+				break;
 		if (prev_entry)
-			prev_entry->next =
-			    isa_virt_to_bus(&vp->tx_ring[entry]);
+			prev_entry->next = isa_virt_to_bus(&vp->tx_ring[entry]);
 		if (inl(ioaddr + DownListPtr) == 0) {
 			outl(isa_virt_to_bus(&vp->tx_ring[entry]),
 			     ioaddr + DownListPtr);
 			queued_packet++;
 		}
 		outw(DownUnstall, ioaddr + EL3_CMD);
-		restore_flags(flags);
+		spin_unlock_irqrestore(&vp->lock, flags);
 
 		vp->cur_tx++;
 		if (vp->cur_tx - vp->dirty_tx > TX_RING_SIZE - 1)
@@ -1179,6 +1161,8 @@
 	latency = inb(ioaddr + Timer);
 	lp = (struct corkscrew_private *) dev->priv;
 
+	spin_lock(&lp->lock);
+	
 	status = inw(ioaddr + EL3_STATUS);
 
 	if (corkscrew_debug > 4)
@@ -1193,6 +1177,7 @@
 			printk(KERN_ERR "%s: Bogus interrupt, bailing. Status %4.4x, start=%d.\n",
 				   dev->name, status, netif_running(dev));
 			free_irq(dev->irq, dev);
+			dev->irq = -1;
 		}
 	}
 
@@ -1205,8 +1190,7 @@
 
 		if (status & TxAvailable) {
 			if (corkscrew_debug > 5)
-				printk
-				    ("	TX room bit was handled.\n");
+				printk("	TX room bit was handled.\n");
 			/* There's room in the FIFO for a full-sized packet. */
 			outw(AckIntr | TxAvailable, ioaddr + EL3_CMD);
 			netif_wake_queue(dev);
@@ -1216,21 +1200,17 @@
 
 			while (lp->cur_tx - dirty_tx > 0) {
 				int entry = dirty_tx % TX_RING_SIZE;
-				if (inl(ioaddr + DownListPtr) ==
-				    isa_virt_to_bus(&lp->tx_ring[entry]))
+				if (inl(ioaddr + DownListPtr) == isa_virt_to_bus(&lp->tx_ring[entry]))
 					break;	/* It still hasn't been processed. */
 				if (lp->tx_skbuff[entry]) {
-					dev_kfree_skb_irq(lp->
-							  tx_skbuff
-							  [entry]);
+					dev_kfree_skb_irq(lp->tx_skbuff[entry]);
 					lp->tx_skbuff[entry] = 0;
 				}
 				dirty_tx++;
 			}
 			lp->dirty_tx = dirty_tx;
 			outw(AckIntr | DownComplete, ioaddr + EL3_CMD);
-			if (lp->tx_full
-			    && (lp->cur_tx - dirty_tx <= TX_RING_SIZE - 1)) {
+			if (lp->tx_full && (lp->cur_tx - dirty_tx <= TX_RING_SIZE - 1)) {
 				lp->tx_full = 0;
 				netif_wake_queue(dev);
 			}
@@ -1255,23 +1235,19 @@
 			if (status & StatsFull) {	/* Empty statistics. */
 				static int DoneDidThat;
 				if (corkscrew_debug > 4)
-					printk("%s: Updating stats.\n",
-					       dev->name);
+					printk("%s: Updating stats.\n", dev->name);
 				update_stats(ioaddr, dev);
 				/* DEBUG HACK: Disable statistics as an interrupt source. */
 				/* This occurs when we have the wrong media type! */
-				if (DoneDidThat == 0 &&
-				    inw(ioaddr + EL3_STATUS) & StatsFull) {
+				if (DoneDidThat == 0 && inw(ioaddr + EL3_STATUS) & StatsFull) {
 					int win, reg;
 					printk("%s: Updating stats failed, disabling stats as an"
-					     " interrupt source.\n",
-					     dev->name);
+					     " interrupt source.\n", dev->name);
 					for (win = 0; win < 8; win++) {
 						EL3WINDOW(win);
 						printk("\n Vortex window %d:", win);
 						for (reg = 0; reg < 16; reg++)
-							printk(" %2.2x",
-							       inb(ioaddr + reg));
+							printk(" %2.2x", inb(ioaddr + reg));
 					}
 					EL3WINDOW(7);
 					outw(SetIntrEnb | TxAvailable |
@@ -1297,20 +1273,19 @@
 			     "Disabling functions (%4.4x).\n", dev->name,
 			     status, SetStatusEnb | ((~status) & 0x7FE));
 			/* Disable all pending interrupts. */
-			outw(SetStatusEnb | ((~status) & 0x7FE),
-			     ioaddr + EL3_CMD);
+			outw(SetStatusEnb | ((~status) & 0x7FE), ioaddr + EL3_CMD);
 			outw(AckIntr | 0x7FF, ioaddr + EL3_CMD);
 			break;
 		}
 		/* Acknowledge the IRQ. */
 		outw(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);
 
-	} while ((status = inw(ioaddr + EL3_STATUS)) &
-		 (IntLatch | RxComplete));
+	} while ((status = inw(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete));
+	
+	spin_unlock(&lp->lock);
 
 	if (corkscrew_debug > 4)
-		printk("%s: exiting interrupt, status %4.4x.\n", dev->name,
-		       status);
+		printk("%s: exiting interrupt, status %4.4x.\n", dev->name, status);
 }
 
 static int corkscrew_rx(struct net_device *dev)
@@ -1529,15 +1504,13 @@
 
 static struct net_device_stats *corkscrew_get_stats(struct net_device *dev)
 {
-	struct corkscrew_private *vp =
-	    (struct corkscrew_private *) dev->priv;
+	struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv;
 	unsigned long flags;
 
 	if (netif_running(dev)) {
-		save_flags(flags);
-		cli();
+		spin_lock_irqsave(&vp->lock, flags);
 		update_stats(dev->base_addr, dev);
-		restore_flags(flags);
+		spin_unlock_irqrestore(&vp->lock, flags);
 	}
 	return &vp->stats;
 }
diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/net/3c59x.c	Wed Oct 30 16:44:17 2002
@@ -20,7 +20,7 @@
 	Linux Kernel Additions:
 	
  	0.99H+lk0.9 - David S. Miller - softnet, PCI DMA updates
- 	0.99H+lk1.0 - Jeff Garzik <jgarzik@mandrakesoft.com>
+ 	0.99H+lk1.0 - Jeff Garzik <jgarzik@pobox.com>
 		Remove compatibility defines for kernel versions < 2.2.x.
 		Update for new 2.3.x module interface
 	LK1.1.2 (March 19, 2000)
@@ -1803,11 +1803,11 @@
 		   dev->name, inb(ioaddr + TxStatus),
 		   inw(ioaddr + EL3_STATUS));
 	EL3WINDOW(4);
-	printk(KERN_ERR "  diagnostics: net %04x media %04x dma %08lx fifo %04x\n",
-			inw(ioaddr + Wn4_NetDiag),
-			inw(ioaddr + Wn4_Media),
-			inl(ioaddr + PktStatus),
-			inw(ioaddr + Wn4_FIFODiag));
+	printk(KERN_ERR "  diagnostics: net %04x media %04x dma %08x fifo %04x\n",
+			(unsigned)inw(ioaddr + Wn4_NetDiag),
+			(unsigned)inw(ioaddr + Wn4_Media),
+			(unsigned)inl(ioaddr + PktStatus),
+			(unsigned)inw(ioaddr + Wn4_FIFODiag));
 	/* Slight code bloat to be user friendly. */
 	if ((inb(ioaddr + TxStatus) & 0x88) == 0x88)
 		printk(KERN_ERR "%s: Transmitter encountered 16 collisions --"
@@ -2643,8 +2643,8 @@
 					vp->full_bus_master_tx,
 					vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE,
 					vp->cur_tx, vp->cur_tx % TX_RING_SIZE);
-			printk(KERN_ERR "  Transmit list %8.8lx vs. %p.\n",
-				   inl(ioaddr + DownListPtr),
+			printk(KERN_ERR "  Transmit list %8.8x vs. %p.\n",
+				   (unsigned)inl(ioaddr + DownListPtr),
 				   &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]);
 			issue_and_wait(dev, DownStall);
 			for (i = 0; i < TX_RING_SIZE; i++) {
diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c
--- a/drivers/net/8139cp.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/8139cp.c	Wed Oct 30 16:44:28 2002
@@ -1,6 +1,6 @@
 /* 8139cp.c: A Linux PCI Ethernet driver for the RealTek 8139C+ chips. */
 /*
-	Copyright 2001,2002 Jeff Garzik <jgarzik@mandrakesoft.com>
+	Copyright 2001,2002 Jeff Garzik <jgarzik@pobox.com>
 
 	Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) [tg3.c]
 	Copyright (C) 2000, 2001 David S. Miller (davem@redhat.com) [sungem.c]
@@ -89,7 +89,7 @@
 static char version[] __devinitdata =
 KERN_INFO DRV_NAME ": 10/100 PCI Ethernet driver v" DRV_VERSION " (" DRV_RELDATE ")\n";
 
-MODULE_AUTHOR("Jeff Garzik <jgarzik@mandrakesoft.com>");
+MODULE_AUTHOR("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION("RealTek RTL-8139C+ series 10/100 PCI Ethernet driver");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c
--- a/drivers/net/8139too.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/net/8139too.c	Wed Oct 30 16:44:17 2002
@@ -2,7 +2,7 @@
 
 	8139too.c: A RealTek RTL-8139 Fast Ethernet driver for Linux.
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000-2002 Jeff Garzik
 
 	Much code comes from Donald Becker's rtl8139.c driver,
@@ -590,7 +590,7 @@
 	unsigned int regs_len;
 };
 
-MODULE_AUTHOR ("Jeff Garzik <jgarzik@mandrakesoft.com>");
+MODULE_AUTHOR ("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/Config.help b/drivers/net/Config.help
--- a/drivers/net/Config.help	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1821 +0,0 @@
-CONFIG_BAGETLANCE
-  Say Y to enable kernel support for AMD Lance Ethernet cards on the
-  MIPS-32-based Baget embedded system.  This chipset is better known
-  via the NE2100 cards.
-
-CONFIG_LASI_82596
-  Say Y here to support the on-board Intel 82596 ethernet controller
-  built into Hewlett-Packard PA-RISC machines.
-
-CONFIG_MIPS_JAZZ_SONIC
-  This is the driver for the onboard card of MIPS Magnum 4000,
-  Acer PICA, Olivetti M700-10 and a few other identical OEM systems.
-
-CONFIG_MIPS_GT96100ETH
-  Say Y here to support the Ethernet subsystem on your GT96100 card.
-
-CONFIG_DUMMY
-  This is essentially a bit-bucket device (i.e. traffic you send to
-  this device is consigned into oblivion) with a configurable IP
-  address. It is most commonly used in order to make your currently
-  inactive SLIP address seem like a real address for local programs.
-  If you use SLIP or PPP, you might want to say Y here. Since this
-  thing often comes in handy, the default is Y. It won't enlarge your
-  kernel either. What a deal. Read about it in the Network
-  Administrator's Guide, available from
-  <http://www.linuxdoc.org/docs.html#guide>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called dummy.o.  If you want to use more than one dummy
-  device at a time, you need to compile this driver as a module.
-  Instead of 'dummy', the devices will then be called 'dummy0',
-  'dummy1' etc.
-
-CONFIG_BONDING
-  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
-  Channels together. This is called 'Etherchannel' by Cisco,
-  'Trunking' by Sun, and 'Bonding' in Linux.
-
-  If you have two Ethernet connections to some other computer, you can
-  make them behave like one double speed connection using this driver.
-  Naturally, this has to be supported at the other end as well, either
-  with a similar Bonding Linux driver, a Cisco 5500 switch or a
-  SunTrunking SunSoft driver.
-
-  This is similar to the EQL driver, but it merges Ethernet segments
-  instead of serial lines.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called bonding.o.
-
-CONFIG_SLIP
-  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
-  connect to your Internet service provider or to connect to some
-  other local Unix box or if you want to configure your Linux box as a
-  Slip/CSlip server for other people to dial in. SLIP (Serial Line
-  Internet Protocol) is a protocol used to send Internet traffic over
-  serial connections such as telephone lines or null modem cables;
-  nowadays, the protocol PPP is more commonly used for this same
-  purpose.
-
-  Normally, your access provider has to support SLIP in order for you
-  to be able to use it, but there is now a SLIP emulator called SLiRP
-  around (available from
-  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-  allows you to use SLIP over a regular dial up shell connection. If
-  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
-  NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, explains how to
-  configure SLIP. Note that you don't need this option if you just
-  want to run term (term is a program which gives you almost full
-  Internet connectivity if you have a regular dial up shell account on
-  some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
-  support will enlarge your kernel by about 4 KB. If unsure, say N.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>. The module will be
-  called slip.o.
-
-CONFIG_SLIP_COMPRESSED
-  This protocol is faster than SLIP because it uses compression on the
-  TCP/IP headers (not on the data itself), but it has to be supported
-  on both ends. Ask your access provider if you are not sure and
-  answer Y, just in case. You will still be able to use plain SLIP. If
-  you plan to use SLiRP, the SLIP emulator (available from
-  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
-  allows you to use SLIP over a regular dial up shell connection, you
-  definitely want to say Y here. The NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
-  CSLIP. This won't enlarge your kernel.
-
-CONFIG_SLIP_SMART
-  Adds additional capabilities to the SLIP driver to support the
-  RELCOM line fill and keepalive monitoring. Ideal on poor quality
-  analogue lines.
-
-CONFIG_SLIP_MODE_SLIP6
-  Just occasionally you may need to run IP over hostile serial
-  networks that don't pass all control characters or are only seven
-  bit. Saying Y here adds an extra mode you can use with SLIP:
-  "slip6". In this mode, SLIP will only send normal ASCII symbols over
-  the serial device. Naturally, this has to be supported at the other
-  end of the link as well. It's good enough, for example, to run IP
-  over the async ports of a Camtec JNT Pad. If unsure, say N.
-
-CONFIG_PPP
-  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
-  the same purpose: sending Internet traffic over telephone (and other
-  serial) lines.  Ask your access provider if they support it, because
-  otherwise you can't use it; most Internet access providers these
-  days support PPP rather than SLIP.
-
-  To use PPP, you need an additional program called pppd as described
-  in the PPP-HOWTO, available at
-  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
-  the version of pppd recommended in <file:Documentation/Changes>.
-  The PPP option enlarges your kernel by about 16 KB.
-
-  There are actually two versions of PPP: the traditional PPP for
-  asynchronous lines, such as regular analog phone lines, and
-  synchronous PPP which can be used over digital ISDN lines for
-  example.  If you want to use PPP over phone lines or other
-  asynchronous serial lines, you need to say Y (or M) here and also to
-  the next option, "PPP support for async serial ports".  For PPP over
-  synchronous lines, you should say Y (or M) here and to "Support
-  synchronous PPP", below.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you said Y to "Version information on all symbols" above, then
-  you cannot compile the PPP driver into the kernel; you can then only
-  compile it as a module.  The module will be called ppp_generic.o.
-  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>.
-
-CONFIG_PPP_MULTILINK
-  PPP multilink is a protocol (defined in RFC 1990) which allows you
-  to combine several (logical or physical) lines into one logical PPP
-  connection, so that you can utilize your full bandwidth.
-
-  This has to be supported at the other end as well and you need a
-  version of the pppd daemon which understands the multilink protocol.
-
-  If unsure, say N.
-
-CONFIG_PPP_FILTER
-  Say Y here if you want to be able to filter the packets passing over
-  PPP interfaces.  This allows you to control which packets count as
-  activity (i.e. which packets will reset the idle timer or bring up
-  a demand-dialled link) and which packets are to be dropped entirely.
-  You need to say Y here if you wish to use the pass-filter and
-  active-filter options to pppd.
-
-  If unsure, say N.
-
-CONFIG_PPP_ASYNC
-  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
-  a modem (not a synchronous or ISDN modem) to contact your ISP, you
-  need this option.
-
-  This code is also available as a module (code which can be inserted
-  into and removed from the running kernel).  If you want to compile
-  it as a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PPP_SYNC_TTY
-  Say Y (or M) here if you want to be able to use PPP over synchronous
-  (HDLC) tty devices, such as the SyncLink adapter. These devices
-  are often used for high-speed leased lines like T1/E1.
-
-  This code is also available as a module (code which can be inserted
-  into and removed from the running kernel).  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_PPP_DEFLATE
-  Support for the Deflate compression method for PPP, which uses the
-  Deflate algorithm (the same algorithm that gzip uses) to compress
-  each PPP packet before it is sent over the wire.  The machine at the
-  other end of the PPP link (usually your ISP) has to support the
-  Deflate compression method as well for this to be useful.  Even if
-  they don't support it, it is safe to say Y here.
-
-  This code is also available as a module (code which can be inserted
-  into and removed from the running kernel).  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_PPP_BSDCOMP
-  Support for the BSD-Compress compression method for PPP, which uses
-  the LZW compression method to compress each PPP packet before it is
-  sent over the wire. The machine at the other end of the PPP link
-  (usually your ISP) has to support the BSD-Compress compression
-  method as well for this to be useful. Even if they don't support it,
-  it is safe to say Y here.
-
-  The PPP Deflate compression method ("PPP Deflate compression",
-  above) is preferable to BSD-Compress, because it compresses better
-  and is patent-free.
-
-  Note that the BSD compression code will always be compiled as a
-  module; it is called bsd_comp.o and will show up in the directory
-  modules once you have said "make modules". If unsure, say N.
-
-CONFIG_PPPOE
-  Support for PPP over Ethernet.
-
-  This driver requires a specially patched pppd daemon.  The patch to
-  pppd, along with binaries of a patched pppd package can be found at:
-  <http://www.shoshin.uwaterloo.ca/~mostrows/>.
-
-CONFIG_PPPOATM
-  Support PPP (Point to Point Protocol) encapsulated in ATM frames.
-  This implementation does not yet comply with section 8 of RFC2364,
-  which can lead to bad results if the ATM peer loses state and
-  changes its encapsulation unilaterally.
-
-CONFIG_NET_RADIO
-  Support for wireless LANs and everything having to do with radio,
-  but not with amateur radio or FM broadcasting.
-
-  Saying Y here also enables the Wireless Extensions (creates
-  /proc/net/wireless and enables ifconfig access). The Wireless
-  Extension is a generic API allowing a driver to expose to the user
-  space configuration and statistics specific to common Wireless LANs.
-  The beauty of it is that a single set of tool can support all the
-  variations of Wireless LANs, regardless of their type (as long as
-  the driver supports Wireless Extension). Another advantage is that
-  these parameters may be changed on the fly without restarting the
-  driver (or Linux). If you wish to use Wireless Extensions with
-  wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch
-  the tools from
-  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
-
-  Some user-level drivers for scarab devices which don't require
-  special kernel support are available from
-  <ftp://shadow.cabi.net/pub/Linux/>.
-
-CONFIG_STRIP
-  Say Y if you have a Metricom radio and intend to use Starmode Radio
-  IP. STRIP is a radio protocol developed for the MosquitoNet project
-  (on the WWW at <http://mosquitonet.stanford.edu/>) to send Internet
-  traffic using Metricom radios.  Metricom radios are small, battery
-  powered, 100kbit/sec packet radio transceivers, about the size and
-  weight of a cellular telephone. (You may also have heard them called
-  "Metricom modems" but we avoid the term "modem" because it misleads
-  many people into thinking that you can plug a Metricom modem into a
-  phone line and use it as a modem.)
-
-  You can use STRIP on any Linux machine with a serial port, although
-  it is obviously most useful for people with laptop computers. If you
-  think you might get a Metricom radio in the future, there is no harm
-  in saying Y to STRIP now, except that it makes the kernel a bit
-  bigger.
-
-  You can also compile this as a module ( = code which can be inserted
-  in and removed from the running kernel whenever you want), say M
-  here and read <file:Documentation/modules.txt>.  The module will be
-  called strip.o.
-
-CONFIG_ARLAN
-  Aironet makes Arlan, a class of wireless LAN adapters. These use the
-  www.Telxon.com chip, which is also used on several similar cards.
-  This driver is tested on the 655 and IC2200 series cards. Look at
-  <http://www.ylenurme.ee/~elmer/655/> for the latest information.
-
-  The driver is built as two modules, arlan and arlan-proc. The latter
-  is the /proc interface and is not needed most of time.
-
-  On some computers the card ends up in non-valid state after some
-  time. Use a ping-reset script to clear it.
-
-CONFIG_AIRONET4500
-  www.aironet.com (recently bought by Cisco) makes these 802.11 DS
-  adapters.  Driver by Elmer Joandi (elmer@ylenurme.ee).
-
-  Say Y here if you have such an adapter, and then say Y below to
-  the option that applies to your particular type of card (PCI, ISA,
-  or PCMCIA).
-
-  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 aironet4500_core.o. 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>.
-
-  quick config parameters:
-	SSID=tsunami - "The Password"
-	adhoc=1  	there are no Access Points around
-	master=1 	Adhoc master (the one who creates network
-                        sync)
-	slave=1		Adhoc slave (btw, it is still forming own net
-			sometimes, and has problems with firmware...
-			change IbssJoinNetTimeout from /proc...)
-	channel=1..? 	meaningful in adhoc mode
-
-  If you have problems with screwing up card, both_bap_lock=1 is a
-  conservative value (performance hit 15%).
-
-  All other parameters can be set via the proc interface.
-
-CONFIG_AIRONET4500_NONCS
-  If you have an ISA, PCI or PCMCIA Aironet 4500/4800 wireless LAN
-  card, say Y here, and then also to the options below that apply
-  to you.
-
-  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 aironet4500_card.o.  If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_AIRONET4500_PNP
-  If you have an ISA Aironet 4500/4800 card which you want to use in
-  PnP (Plug and Play) mode, say Y here. This is the recommended mode
-  for ISA cards. Remember however to enable the PnP jumper on the
-  board if you say Y here.
-
-CONFIG_AIRONET4500_PCI
-  If you have an PCI Aironet 4500/4800 card, say Y here.
-
-CONFIG_AIRONET4500_ISA
-  If you have an ISA Aironet 4500/4800 card which you want to run in
-  non-PnP mode, say Y here. This is not recommended and does not work
-  correctly at this point. Say N.
-
-CONFIG_AIRONET4500_I365
-  If you have a PCMCIA Aironet 4500/4800 card which you want to use
-  without the standard PCMCIA cardservices provided by the pcmcia-cs
-  package, say Y here. This is not recommended, so say N.
-
-CONFIG_AIRONET4500_PROC
-  If you say Y here (and to the "/proc file system" below), you will
-  be able to configure your Aironet card via the
-  /proc/sys/aironet4500 interface.
-
-  Additional info: look in <file:drivers/net/aironet4500_rid.c>.
-
-  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 aironet4500_proc.o. If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  NOTE: the proc interface uses a lot of memory, so it is recommended
-        to compile it as a module and remove the module after
-        configuration.
-
-CONFIG_PLIP
-  PLIP (Parallel Line Internet Protocol) is used to create a
-  reasonably fast mini network consisting of two (or, rarely, more)
-  local machines.  A PLIP link from a Linux box is a popular means to
-  install a Linux distribution on a machine which doesn't have a
-  CD-ROM drive (a minimal system has to be transferred with floppies
-  first). The kernels on both machines need to have this PLIP option
-  enabled for this to work.
-
-  The PLIP driver has two modes, mode 0 and mode 1.  The parallel
-  ports (the connectors at the computers with 25 holes) are connected
-  with "null printer" or "Turbo Laplink" cables which can transmit 4
-  bits at a time (mode 0) or with special PLIP cables, to be used on
-  bidirectional parallel ports only, which can transmit 8 bits at a
-  time (mode 1); you can find the wiring of these cables in
-  <file:Documentation/networking/PLIP.txt>.  The cables can be up to
-  15m long.  Mode 0 works also if one of the machines runs DOS/Windows
-  and has some PLIP software installed, e.g. the Crynwr PLIP packet
-  driver (<http://oak.oakland.edu/simtel.net/msdos/pktdrvr-pre.html>)
-  and winsock or NCSA's telnet.
-
-  If you want to use PLIP, say Y and read the PLIP mini-HOWTO as well
-  as the NET-3-HOWTO, both available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Note that the PLIP
-  protocol has been changed and this PLIP driver won't work together
-  with the PLIP support in Linux versions 1.0.x.  This option enlarges
-  your kernel by about 8 KB.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called plip.o.  If unsure, say Y or M, in case you buy a laptop
-  later.
-
-CONFIG_EQUALIZER
-  If you have two serial connections to some other computer (this
-  usually requires two modems and two telephone lines) and you use
-  SLIP (the protocol for sending Internet traffic over telephone
-  lines) or PPP (a better SLIP) on them, you can make them behave like
-  one double speed connection using this driver.  Naturally, this has
-  to be supported at the other end as well, either with a similar EQL
-  Linux driver or with a Livingston Portmaster 2e.
-
-  Say Y if you want this and read
-  <file:Documentation/networking/eql.txt>.  You may also want to read
-  section 6.2 of the NET-3-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 eql.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_TUN
-  TUN/TAP provides packet reception and transmission for user space
-  programs.  It can be viewed as a simple Point-to-Point or Ethernet
-  device, which instead of receiving packets from a physical media,
-  receives them from user space program and instead of sending packets
-  via physical media writes them to the user space program.
-
-  When a program opens /dev/net/tun, driver creates and registers
-  corresponding net device tunX or tapX.  After a program closed above
-  devices, driver will automatically delete tunXX or tapXX device and
-  all routes corresponding to it.
-
-  Please read <file:Documentation/networking/tuntap.txt> for more
-  information.
-
-  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 tun.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you don't know what to use this for, you don't need it.
-
-CONFIG_ETHERTAP
-  If you say Y here (and have said Y to "Kernel/User network link
-  driver", above) and create a character special file /dev/tap0 with
-  major number 36 and minor number 16 using mknod ("man mknod"), you
-  will be able to have a user space program read and write raw
-  Ethernet frames from/to that special file.  tap0 can be configured
-  with ifconfig and route like any other Ethernet device but it is not
-  connected to any physical LAN; everything written by the user to
-  /dev/tap0 is treated by the kernel as if it had come in from a LAN
-  to the device tap0; everything the kernel wants to send out over the
-  device tap0 can instead be read by the user from /dev/tap0: the user
-  mode program replaces the LAN that would be attached to an ordinary
-  Ethernet device. Please read the file
-  <file:Documentation/networking/ethertap.txt> for more information.
-
-  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 ethertap.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you don't know what to use this for, you don't need it.
-
-CONFIG_NET_FC
-  Fibre Channel is a high speed serial protocol mainly used to connect
-  large storage devices to the computer; it is compatible with and
-  intended to replace SCSI.
-
-  If you intend to use Fibre Channel, you need to have a Fibre channel
-  adaptor card in your computer; say Y here and to the driver for your
-  adaptor below. You also should have said Y to "SCSI support" and
-  "SCSI generic support".
-
-CONFIG_IPHASE5526
-  Say Y here if you have a Fibre Channel adaptor of this kind.
-
-  The 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 iph5526.o. For general information about
-  modules read <file:Documentation/modules.txt>.
-
-CONFIG_RCPCI
-  This is a driver for hardware which provides a Virtual Private
-  Network (VPN). Say Y if you have it.
-
-  This code is also available as a module called rcpci.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_ETHERNET
-  Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common
-  type of Local Area Network (LAN) in universities and companies.
-
-  Common varieties of Ethernet are: 10BASE-2 or Thinnet (10 Mbps over
-  coaxial cable, linking computers in a chain), 10BASE-T or twisted
-  pair (10 Mbps over twisted pair cable, linking computers to central
-  hubs), 10BASE-F (10 Mbps over optical fiber links, using hubs),
-  100BASE-TX (100 Mbps over two twisted pair cables, using hubs),
-  100BASE-T4 (100 Mbps over 4 standard voice-grade twisted pair
-  cables, using hubs), 100BASE-FX (100 Mbps over optical fiber links)
-  [the 100BASE varieties are also known as Fast Ethernet], and Gigabit
-  Ethernet (1 Gbps over optical fiber or short copper links).
-
-  If your Linux machine will be connected to an Ethernet and you have
-  an Ethernet network interface card (NIC) installed in your computer,
-  say Y here and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. You will then also have
-  to say Y to the driver for your particular NIC.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about Ethernet network cards. If unsure, say N.
-
-CONFIG_NET_VENDOR_SMC
-  If you have a network (Ethernet) card belonging to this class, say Y
-  and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about Western Digital cards. If you say Y, you will be
-  asked for your specific card in the following questions.
-
-CONFIG_WD80x3
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 wd.o.  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>.
-
-CONFIG_ULTRAMCA
-  If you have a network (Ethernet) card of this type and are running
-  an MCA based system (PS/2), say Y and read 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 smc-mca.o.  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>.
-
-CONFIG_ULTRA
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Important: There have been many reports that, with some motherboards
-  mixing an SMC Ultra and an Adaptec AHA154x SCSI card (or compatible,
-  such as some BusLogic models) causes corruption problems with many
-  operating systems. The Linux smc-ultra driver has a work-around for
-  this but keep it in mind if you have such a SCSI card and have
-  problems.
-
-  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 smc-ultra.o.  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>.
-
-CONFIG_ULTRA32
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 smc-ultra32.o.  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>.
-
-CONFIG_SMC9194
-  This is support for the SMC9xxx based Ethernet cards. Choose this
-  option if you have a DELL laptop with the docking station, or
-  another SMC9192/9194 based chipset.  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 smc9194.o.  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>.
-
-CONFIG_NE2K_PCI
-  This driver is for NE2000 compatible PCI cards. It will not work
-  with ISA NE2000 cards (they have their own driver, "NE2000/NE1000
-  support" below). If you have a PCI NE2000 network (Ethernet) card,
-  say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver also works for the following NE2000 clone cards:
-    RealTek RTL-8029  Winbond 89C940  Compex RL2000  KTI ET32P2
-    NetVin NV5000SC   Via 86C926      SureCom NE34   Winbond
-    Holtek HT80232    Holtek HT80229
-
-  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 ne2k-pci.o.  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>.
-
-CONFIG_NET_VENDOR_RACAL
-  If you have a network (Ethernet) card belonging to this class, such
-  as the NI5010, NI5210 or NI6210, say Y and read the Ethernet-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about NI cards. If you say Y, you will be asked for
-  your specific card in the following questions.
-
-CONFIG_NI5010
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. Note that this is still
-  experimental code.
-
-  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 ni5010.o.  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>.
-
-CONFIG_NI52
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 ni52.o.  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>.
-
-CONFIG_NI65
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 ni65.o.  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>.
-
-CONFIG_8139CP
-  This is a driver for the Fast Ethernet PCI network cards based on
-  the RTL8139C+ chips. If you have one of those, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read Documentation/modules.txt. This is recommended.
-  The module will be called 8139cp.o.
-
-CONFIG_8139TOO
-  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.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called 8139too.o.
-
-CONFIG_8139TOO_PIO
-  This instructs the driver to use programmed I/O ports (PIO) instead
-  of PCI shared memory (MMIO).  This can possibly solve some problems
-  in case your mainboard has memory consistency issues.  If unsure,
-  say N.
-
-CONFIG_8139TOO_TUNE_TWISTER
-  This implements a function which might come in handy in case you
-  are using low quality on long cabling. It is required for RealTek
-  RTL-8139 revision K boards, and totally unused otherwise.  It tries
-  to match the transceiver to the cable characteristics. This is
-  experimental since hardly documented by the manufacturer.
-  If unsure, say Y.
-
-CONFIG_8139TOO_8129
-  This enables support for the older and uncommon RTL-8129 and
-  RTL-8130 chips, which support MII via an external transceiver,
-  instead of an internal one.  Disabling this option will save some
-  memory by making the code size smaller.  If unsure, say Y.
-
-CONFIG_8139_OLD_RX_RESET
-  The 8139too driver was recently updated to contain a more rapid
-  reset sequence, in the face of severe receive errors.  This "new"
-  RX-reset method should be adequate for all boards.  But if you
-  experience problems, you can enable this option to restore the
-  old RX-reset behavior.  If unsure, say N.
-
-CONFIG_SIS900
-  This is a driver for the Fast Ethernet PCI network cards based on
-  the SiS 900 and SiS 7016 chips. The SiS 900 core is also embedded in
-  SiS 630 and SiS 540 chipsets.  If you have one of those, say Y and
-  read the Ethernet-HOWTO, available at
-  <http://www.linuxdoc.org/docs.html#howto>.  Please read
-  <file:Documentation/networking/sis900.txt> and comments at the
-  beginning of <file:drivers/net/sis900.c> for more information.
-
-  This driver also supports AMD 79C901 HomePNA so that you can use
-  your phone line as a network cable.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called sis900.o.
-
-CONFIG_YELLOWFIN
-  Say Y here if you have a Packet Engines G-NIC PCI Gigabit Ethernet
-  adapter or the SYM53C885 Ethernet controller. The Gigabit adapter is
-  used by the Beowulf Linux cluster project.  See
-  <http://cesdis.gsfc.nasa.gov/linux/drivers/yellowfin.html> for more
-  information about this driver in particular and Beowulf in general.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called yellowfin.o.
-
-CONFIG_NET_SB1000
-  This is a driver for the General Instrument (also known as
-  NextLevel) SURFboard 1000 internal
-  cable modem. This is an ISA card which is used by a number of cable
-  TV companies to provide cable modem access. It's a one-way
-  downstream-only cable modem, meaning that your upstream net link is
-  provided by your regular phone modem.
-
-  At present this driver only compiles as a module, so say M here if
-  you have this card. The module will be called sb1000.o. Then read
-  <file:Documentation/networking/README.sb1000> for information on how
-  to use this module, as it needs special ppp scripts for establishing
-  a connection. Further documentation and the necessary scripts can be
-  found at:
-
-  <http://www.jacksonville.net/~fventuri/>
-  <http://home.adelphia.net/~siglercm/sb1000.html>
-  <http://linuxpower.cx/~cable/>
-
-  If you don't have this card, of course say N.
-
-CONFIG_ADAPTEC_STARFIRE
-  Say Y here if you have an Adaptec Starfire (or DuraLAN) PCI network
-  adapter. The DuraLAN chip is used on the 64 bit PCI boards from
-  Adaptec e.g. the ANA-6922A. The older 32 bit boards use the tulip
-  driver.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called starfire.o.
-
-CONFIG_ACENIC
-  Say Y here if you have an Alteon AceNIC, 3Com 3C985(B), NetGear
-  GA620, SGI Gigabit or Farallon PN9000-SX PCI Gigabit Ethernet
-  adapter. The driver allows for using the Jumbo Frame option (9000
-  bytes/frame) however it requires that your switches can handle this
-  as well. To enable Jumbo Frames, add `mtu 9000' to your ifconfig
-  line.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called acenic.o.
-
-CONFIG_ACENIC_OMIT_TIGON_I
-  Say Y here if you only have Tigon II based AceNICs and want to leave
-  out support for the older Tigon I based cards which are no longer
-  being sold (ie. the original Alteon AceNIC and 3Com 3C985 (non B
-  version)).  This will reduce the size of the driver object by
-  app. 100KB.  If you are not sure whether your card is a Tigon I or a
-  Tigon II, say N here.
-
-  The safe and default value for this is N.
-
-CONFIG_SK98LIN
-  Say Y here if you have a SysKonnect SK-98xx Gigabit Ethernet Server
-  Adapter. The following adapters are supported by this driver:
-  - SK-9841 (single link 1000Base-LX)
-  - SK-9842 (dual link   1000Base-LX)
-  - SK-9843 (single link 1000Base-SX)
-  - SK-9844 (dual link   1000Base-SX)
-  - SK-9821 (single link 1000Base-T)
-  - SK-9822 (dual link   1000Base-T)
-  - SK-9861 (single link Volition connector)
-  - SK-9862 (dual link   Volition connector)
-  The driver also supports the following adapters from Allied Telesyn:
-  - AT2970...
-
-  The dual link adapters support a link-failover feature.  Read
-  <file:Documentation/networking/sk98lin.txt> for information about
-  optional driver parameters.
-  Questions concerning this driver may be addressed to:
-    linux@syskonnect.de
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called sk98lin.o.
-
-CONFIG_SUNGEM
-  Support for the Sun GEM chip, aka Sun GigabitEthernet/P 2.0.  See also
-  <http://www.sun.com/products-n-solutions/hardware/docs/pdf/806-3985-10.pdf>.
-
-CONFIG_TIGON3
-  This driver supports Broadcom Tigon3 based gigabit Ethernet cards.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called tg3.o.
-
-CONFIG_MYRI_SBUS
-  This driver supports MyriCOM Sbus gigabit Ethernet cards.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called myri_sbus.o.
-
-CONFIG_DL2K
-  This driver supports D-Link 2000-based gigabit ethernet cards, which
-  includes
-       D-Link DGE-550T Gigabit Ethernet Adapter.
-       D-Link DL2000-based Gigabit Ethernet Adapter.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called dl2k.o.
-
-CONFIG_E1000
-  This driver supports Intel(R) PRO/1000 gigabit ethernet family of
-  adapters, which includes:
-
-     Controller  Adapter Name                         Board IDs
-     ----------  ------------                         ---------
-     82542       PRO/1000 Gigabit Server Adapter      700262-xxx,
-                                                      717037-xxx
-     82543       PRO/1000 F Server Adapter            738640-xxx,
-                                                      A38888-xxx
-     82543       PRO/1000 T Server Adapter            A19845-xxx,
-                                                      A33948-xxx
-     82544       PRO/1000 XT Server Adapter           A51580-xxx
-     82544       PRO/1000 XF Server Adapter           A50484-xxx
-     82544       PRO/1000 T Desktop Adapter           A62947-xxx
-     82540       PRO/1000 MT Desktop Adapter          A78408-xxx
-     82545       PRO/1000 MT Server Adapter           A92165-xxx
-     82546       PRO/1000 MT Dual Port Server Adapter A92111-xxx
-     82545       PRO/1000 MF Server Adapter           A91622-xxx
-     82545       PRO/1000 MF Server Adapter(LX)       A91624-xxx
-     82546       PRO/1000 MF Dual Port Server Adapter A91620-xxx 
-
-  For more information on how to identify your adapter, go to the
-  Adapter & Driver ID Guide at:
-
-   <http://support.intel.com/support/network/adapter/pro100/21397.htm>
-
-  For general information and support, go to the Intel support
-  website at:
-
-   <http://support.intel.com>
-
-  More specific information on configuring the driver is in 
-  <file:Documentation/networking/e1000.txt>.
-
-  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 e1000.o.  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>.
-
-CONFIG_LANCE
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. Some LinkSys cards are
-  of this type.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called lance.o.
-
-CONFIG_MIPS_AU1000_ENET
-  If you have an Alchemy Semi AU1000 ethernet controller
-  on an SGI MIPS system, say Y.  Otherwise, say N.
-
-CONFIG_SGI_IOC3_ETH
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_STNIC
-  Support for cards based on the National Semiconductor DP83902AV
-  ST-NIC Serial Network Interface Controller for Twisted Pair.  This
-  is a 10Mbit/sec Ethernet controller.  Product overview and specs at
-  <http://www.national.com/pf/DP/DP83902A.html>.
-
-  If unsure, say N.
-
-CONFIG_NET_VENDOR_3COM
-  If you have a network (Ethernet) card belonging to this class, say Y
-  and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about 3COM cards. If you say Y, you will be asked for
-  your specific card in the following questions.
-
-CONFIG_EL1
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Also, consider buying a
-  new card, since the 3c501 is slow, broken, and obsolete: you will
-  have problems.  Some people suggest to ping ("man ping") a nearby
-  machine every minute ("man cron") when using this card.
-
-  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 3c501.o.  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>.
-
-CONFIG_EL2
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 3c503.o.  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>.
-
-CONFIG_ELPLUS
-  Information about this network (Ethernet) card can be found in
-  <file:Documentation/networking/3c505.txt>.  If you have a card of
-  this type, say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called 3c505.o.
-
-CONFIG_EL16
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 3c507.o.  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>.
-
-CONFIG_ELMC
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 3c523.o.  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>.
-
-CONFIG_ELMC_II
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 3c527.o.  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>.
-
-CONFIG_EL3
-  If you have a network (Ethernet) card belonging to the 3Com
-  EtherLinkIII series, say Y and read the Ethernet-HOWTO, available
-  from <http://www.linuxdoc.org/docs.html#howto>.
-
-  If your card is not working you may need to use the DOS
-  setup disk to disable Plug & Play mode, and to select the default
-  media type.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called 3c509.o.
-
-CONFIG_3C515
-  If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet
-  network card, say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called 3c515.o.
-
-CONFIG_VORTEX
-  This option enables driver support for a large number of 10mbps and
-  10/100mbps EISA, PCI and PCMCIA 3Com network cards:
-
-  "Vortex"    (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
-  "Boomerang" (EtherLink XL 3c900 or 3c905)            PCI
-  "Cyclone"   (3c540/3c900/3c905/3c980/3c575/3c656)    PCI and Cardbus
-  "Tornado"   (3c905)                                  PCI
-  "Hurricane" (3c555/3cSOHO)                           PCI
-
-  If you have such a card, say Y and read the Ethernet-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>. More
-  specific information is in
-  <file:Documentation/networking/vortex.txt> and in the comments at
-  the beginning of <file:drivers/net/3c59x.c>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.
-
-CONFIG_NET_ISA
-  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 ISA (as opposed to EISA, VLB or PCI), say Y.
-  Make sure you know the name of your card. Read the Ethernet-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  If unsure, say Y.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the remaining ISA network card questions. If you say Y, you will be
-  asked for your specific card in the following questions.
-
-CONFIG_E2100
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 e2100.o.  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>.
-
-CONFIG_CS89x0
-  Support for CS89x0 chipset based Ethernet cards. If you have a
-  network (Ethernet) card of this type, say Y and read the
-  Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto> as well as
-  <file:Documentation/networking/cs89x0.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called cs89x.o.
-
-CONFIG_DEPCA
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto> as well as
-  <file:drivers/net/depca.c>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called
-  depca.o.
-
-CONFIG_EWRK3
-  This driver supports the DE203, DE204 and DE205 network (Ethernet)
-  cards. If this is for you, say Y and read
-  <file:Documentation/networking/ewrk3.txt> in the kernel source as
-  well as the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called ewrk3.o.
-
-CONFIG_SEEQ8005
-  This is a driver for the SEEQ 8005 network (Ethernet) card.  If this
-  is for you, read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called ewrk3.o.
-
-CONFIG_AT1700
-  If you have a network (Ethernet) card of this type, say Y and read
-  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).
-  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>.  The module will be
-  called at1700.o.
-
-CONFIG_FMV18X
-  If you have a Fujitsu FMV-181/182/183/184 network (Ethernet) card,
-  say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you use an FMV-183 or FMV-184 and it is not working, you may need
-  to disable Plug & Play mode of the card.
-
-  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 fmv18x.o.  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>.
-
-CONFIG_EEXPRESS_PRO
-  If you have a network (Ethernet) card of this type, say Y. This
-  driver supports intel i82595{FX,TX} based boards. Note however
-  that the EtherExpress PRO/100 Ethernet card has its own separate
-  driver.  Please read 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 eepro.o.  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>.
-
-CONFIG_EEXPRESS
-  If you have an EtherExpress16 network (Ethernet) card, say Y and
-  read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Note that the Intel
-  EtherExpress16 card used to be regarded as a very poor choice
-  because the driver was very unreliable. We now have a new driver
-  that should do better.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called eexpress.o.
-
-CONFIG_HAMACHI
-  If you have a Gigabit Ethernet card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called hamachi.o.
-
-CONFIG_HPLAN_PLUS
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 hp-plus.o.  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>.
-
-CONFIG_HPLAN
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 hp.o.  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>.
-
-CONFIG_HP100
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called hp100.o.
-
-CONFIG_NE2000
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Many Ethernet cards
-  without a specific driver are compatible with NE2000.
-
-  If you have a PCI NE2000 card however, say N here and Y to "PCI
-  NE2000 support", above. If you have a NE2000 card and are running on
-  an MCA system (a bus system used on some IBM PS/2 computers and
-  laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
-  below.
-
-  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 ne.o.  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>.
-
-CONFIG_NATSEMI
-  This driver is for the National Semiconductor DP83810 series,
-  which is used in cards from PureData, NetGear, Linksys
-  and others, including the 83815 chip.
-  More specific information and updates are available from
-  <http://www.scyld.com/network/natsemi.html>.
-
-CONFIG_SK_G16
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_NE2_MCA
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 ne2.o.  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>.
-
-CONFIG_SKMC
-  These are Micro Channel Ethernet adapters. You need to say Y to "MCA
-  support" in order to use this driver.  Supported cards are the SKnet
-  Junior MC2 and the SKnet MC2(+).  The driver automatically
-  distinguishes between the two cards. Note that using multiple boards
-  of different type hasn't been tested with this driver.  Say Y if you
-  have one of these Ethernet adapters.
-
-  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 is called sk_mca.o.  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>.
-
-CONFIG_IBMLANA
-  This is a Micro Channel Ethernet adapter.  You need to set
-  CONFIG_MCA to use this driver.  It is both available as an in-kernel
-  driver and as a module ( = code which can be inserted in and removed
-  from the running kernel whenever you want).  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>. The only
-  currently supported card is the IBM LAN Adapter/A for Ethernet.  It
-  will both support 16K and 32K memory windows, however a 32K window
-  gives a better security against packet losses.  Usage of multiple
-  boards with this driver should be possible, but has not been tested
-  up to now due to lack of hardware.
-
-CONFIG_NET_PCI
-  This is another class of network cards which attach directly to the
-  bus. If you have one of those, say Y and read the Ethernet-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about this class of network cards. If you say Y, you
-  will be asked for your specific card in the following questions. If
-  you are unsure, say Y.
-
-CONFIG_PCNET32
-  If you have a PCnet32 or PCnetPCI based network (Ethernet) card,
-  answer Y here and read 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 pcnet32.o.  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>.
-
-CONFIG_AC3200
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 ac3200.o.  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>.
-
-CONFIG_LNE390
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 lne390.o.  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>.
-
-CONFIG_NE3210
-  If you have a network (Ethernet) card of this type, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Note that this driver
-  will NOT WORK for NE3200 cards as they are completely different.
-
-  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 ne3210.o.  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>.
-
-CONFIG_APRICOT
-  If you have a network (Ethernet) controller of this type, say Y and
-  read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> as well as
-  <file:Documentation/networking/net-modules.txt>.  The module will be
-  called apricot.o.
-
-CONFIG_DGRS
-  This is support for the Digi International RightSwitch series of
-  PCI/EISA Ethernet switch cards. These include the SE-4 and the SE-6
-  models.  If you have a network card of this type, say Y and read the
-  Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  More specific
-  information is contained in <file:Documentation/networking/dgrs.txt>.
-
-  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 dgrs.o.  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>.
-
-CONFIG_EEPRO100
-  If you have an Intel EtherExpress PRO/100 PCI network (Ethernet)
-  card, say Y and read 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 eepro100.o.  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>.
-
-CONFIG_E100
-  This driver supports Intel(R) PRO/100 family of adapters, which 
-  includes:
-
-     Controller  Adapter Name                       Board IDs
-     ----------  ------------                       ---------
-
-     82558       PRO/100+ PCI Adapter               668081-xxx, 
-                                                    689661-xxx
-     82558       PRO/100+ Management Adapter        691334-xxx, 
-                                                    701738-xxx,
-                                                    721383-xxx
-     82558       PRO/100+ Dual Port Server Adapter  714303-xxx, 
-                                                    711269-xxx, 
-                                                    A28276-xxx
-     82558       PRO/100+ PCI Server Adapter        710550-xxx
-     82550       PRO/100 S Server Adapter           752438-xxx
-     82559                                          A56831-xxx, 
-                                                    A10563-xxx,
-                                                    A12171-xxx, 
-                                                    A12321-xxx, 
-                                                    A12320-xxx, 
-                                                    A12170-xxx
-                                                    748568-xxx
-                                                    748565-xxx
-     82550       PRO/100 S Desktop Adapter          751767-xxx
-     82559                                          748592-xxx, 
-                                                    A12167-xxx, 
-                                                    A12318-xxx, 
-                                                    A12317-xxx, 
-                                                    A12165-xxx,
-                                                    748569-xxx 
-     82559       PRO/100+ Server Adapter            729757-xxx
-     82559       PRO/100 S Management Adapter       748566-xxx, 
-                                                    748564-xxx
-     82550       PRO/100 S Dual Port Server Adapter A56831-xxx
-     82551       PRO/100 M Desktop Adapter          A80897-xxx
-                 PRO/100 S Advanced Management Adapter 
-                                                    747842-xxx, 
-                                                    745171-xxx
-     CNR         PRO/100 VE Desktop Adapter         A10386-xxx, 
-                                                    A10725-xxx, 
-                                                    A23801-xxx, 
-                                                    A19716-xxx
-                 PRO/100 VM Desktop Adapter         A14323-xxx, 
-                                                    A19725-xxx, 
-                                                    A23801-xxx, 
-                                                    A22220-xxx, 
-                                                    A23796-xxx
-   
-
-  To verify that your adapter is supported, find the board ID number 
-  on the adapter. Look for a label that has a barcode and a number 
-  in the format 123456-001 (six digits hyphen three digits). Match 
-  this to the list of numbers above.
-
-  For more information on how to identify your adapter, go to the 
-  Adapter & Driver ID Guide at:
-
-    http://support.intel.com/support/network/adapter/pro100/21397.htm
-
-  For the latest Intel PRO/100 network driver for Linux, see:
-
-    http://appsr.intel.com/scripts-df/support_intel.asp
-
-  More specific information on configuring the driver is in 
-  <file:Documentation/networking/e100.txt>.
-
-  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 e100.o.  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>.
-
-CONFIG_FEALNX
-  Say Y here to support the Mysom MTD-800 family of PCI-based Ethernet
-  cards. Specifications and data at
-  <http://www.myson.com.hk/mtd/datasheet/>.
-
-CONFIG_LP486E
-  Say Y here to support the 82596-based on-board Ethernet controller
-  for the Panther motherboard, which is one of the two shipped in the
-  Intel Professional Workstation.
-
-CONFIG_ETH16I
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 eth16i.o.  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>.
-
-CONFIG_TLAN
-  If you have a PCI Ethernet network card based on the ThunderLAN chip
-  which is supported by this driver, say Y and read the
-  Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Devices currently supported by this driver are Compaq Netelligent,
-  Compaq NetFlex and Olicom cards.  Please read the file
-  <file:Documentation/networking/tlan.txt> for more details.
-
-  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 tlan.o.  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>.
-
-  Please email feedback to  torben.mathiasen@compaq.com.
-
-CONFIG_VIA_RHINE
-  If you have a VIA "rhine" based network card (Rhine-I (3043) or
-  Rhine-2 (VT86c100A)), say Y here.
-
-  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 via-rhine.o.  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>.
-
-CONFIG_VIA_RHINE_MMIO
-  This instructs the driver to use PCI shared memory (MMIO) instead of
-  programmed I/O ports (PIO). Enabling this gives an improvement in
-  processing time in parts of the driver.
-
-  It is not known if this works reliably on all "rhine" based cards,
-  but it has been tested successfully on some DFE-530TX adapters.
-
-  If unsure, say N.
-
-CONFIG_ES3210
-  If you have a network (Ethernet) card of this type, say Y and read
-  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 es3210.o.  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>.
-
-CONFIG_EPIC100
-  This driver is for the SMC EtherPower II 9432 PCI Ethernet NIC,
-  which is based on the SMC83c17x (EPIC/100).
-  More specific information and updates are available from
-  <http://www.scyld.com/network/epic100.html>.
-
-CONFIG_DECLANCE
-  This driver is for the series of Ethernet controllers produced by
-  DEC (now Compaq) based on the AMD Lance chipset, including the
-  DEPCA series.  (This chipset is better known via the NE2100 cards.)
-
-CONFIG_SGISEEQ
-  Say Y here if you have an Seeq based Ethernet network card. This is
-  used in many Silicon Graphics machines.
-
-CONFIG_SUNDANCE
-  This driver is for the Sundance "Alta" chip.
-  More specific information and updates are available from
-  <http://www.scyld.com/network/sundance.html>.
-
-CONFIG_SUNDANCE_MMIO
-  Enable memory-mapped I/O for interaction with Sundance NIC registers.
-  Do NOT enable this by default, PIO (enabled when MMIO is disabled)
-  is known to solve bugs on certain chips.
-
-  If unsure, say N.
-
-CONFIG_ZNET
-  The Zenith Z-Note notebook computer has a built-in network
-  (Ethernet) card, and this is the Linux driver for it. Note that the
-  IBM Thinkpad 300 is compatible with the Z-Note and is also supported
-  by this driver. Read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_LAN_SAA9730
-  The SAA9730 is a combined multimedia and peripheral controller used
-  in thin clients, Internet access terminals, and diskless
-  workstations.
-  See <http://www.semiconductors.philips.com/pip/SAA9730_flyer_1>.
-
-CONFIG_NET_POCKET
-  Cute little network (Ethernet) devices which attach to the parallel
-  port ("pocket adapters"), commonly used with laptops. If you have
-  one of those, say Y and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to plug a network (or some other) card into the PCMCIA
-  (or PC-card) slot of your laptop instead (PCMCIA is the standard for
-  credit card size extension cards used by all modern laptops), you
-  need the pcmcia-cs package (location contained in the file
-  <file:Documentation/Changes>) and you can say N here.
-
-  Laptop users should read the Linux Laptop home page at
-  <http://www.cs.utexas.edu/users/kharker/linux-laptop/>.
-
-  Note that the answer to this question doesn't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about this class of network devices. If you say Y, you
-  will be asked for your specific device in the following questions.
-
-CONFIG_ATP
-  This is a network (Ethernet) device which attaches to your parallel
-  port. Read <file:drivers/net/atp.c> as well as the Ethernet-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>, if you
-  want to use this.  If you intend to use this driver, you should have
-  said N to the "Parallel printer support", because the two drivers
-  don't like each other.
-
-  If you want to compile this driver as a module however ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called atp.o.
-
-CONFIG_DE600
-  This is a network (Ethernet) device which attaches to your parallel
-  port. Read <file:Documentation/networking/DLINK.txt> as well as the
-  Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, if you want to use
-  this. It is possible to have several devices share a single parallel
-  port and it is safe to compile the corresponding drivers into the
-  kernel.
-
-  If you want to compile this driver as a module however ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called de600.o.
-
-CONFIG_DE620
-  This is a network (Ethernet) device which attaches to your parallel
-  port. Read <file:Documentation/networking/DLINK.txt> as well as the
-  Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, if you want to use
-  this. It is possible to have several devices share a single parallel
-  port and it is safe to compile the corresponding drivers into the
-  kernel.
-
-  If you want to compile this driver as a module however ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called de620.o.
-
-CONFIG_HAPPYMEAL
-  This driver supports the "hme" interface present on most Ultra
-  systems and as an option on older Sbus systems. This driver supports
-  both PCI and Sbus devices. This driver also supports the "qfe" quad
-  100baseT device available in both PCI and Sbus configurations.
-
-  This support is also available as a module called sunhme.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUNLANCE
-  This driver supports the "le" interface present on all 32-bit Sparc
-  systems, on some older Ultra systems and as an Sbus option.  These
-  cards are based on the AMD Lance chipset, which is better known
-  via the NE2100 cards.
-
-  This support is also available as a module called sunlance.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUNBMAC
-  This driver supports the "be" interface available as an Sbus option.
-  This is Sun's older 100baseT Ethernet device.
-
-  This support is also available as a module called sunbmac.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUNQE
-  This driver supports the "qe" 10baseT Ethernet device, available as
-  an Sbus option. Note that this is not the same as Quad FastEthernet
-  "qfe" which is supported by the Happy Meal driver instead.
-
-  This support is also available as a module called sunqe.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SHAPER
-  The traffic shaper is a virtual network device that allows you to
-  limit the rate of outgoing data flow over some other network device.
-  The traffic that you want to slow down can then be routed through
-  these virtual devices. See
-  <file:Documentation/networking/shaper.txt> for more information.
-
-  An alternative to this traffic shaper is the experimental
-  Class-Based Queueing (CBQ) scheduling support which you get if you
-  say Y to "QoS and/or fair queueing" above.
-
-  To set up and configure shaper devices, you need the shapecfg
-  program, available from <ftp://shadow.cabi.net/pub/Linux/> in the
-  shaper package.
-
-  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 shaper.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_FDDI
-  Fiber Distributed Data Interface is a high speed local area network
-  design; essentially a replacement for high speed Ethernet. FDDI can
-  run over copper or fiber. If you are connected to such a network and
-  want a driver for the FDDI card in your computer, say Y here (and
-  then also Y to the driver for your FDDI card, below). Most people
-  will say N.
-
-CONFIG_DEFXX
-  This is support for the DIGITAL series of EISA (DEFEA) and PCI
-  (DEFPA) controllers which can connect you to a local FDDI network.
-
-CONFIG_SKFP
-  Say Y here if you have a SysKonnect FDDI PCI adapter.
-  The following adapters are supported by this driver:
-  - SK-5521 (SK-NET FDDI-UP)
-  - SK-5522 (SK-NET FDDI-UP DAS)
-  - SK-5541 (SK-NET FDDI-FP)
-  - SK-5543 (SK-NET FDDI-LP)
-  - SK-5544 (SK-NET FDDI-LP DAS)
-  - SK-5821 (SK-NET FDDI-UP64)
-  - SK-5822 (SK-NET FDDI-UP64 DAS)
-  - SK-5841 (SK-NET FDDI-FP64)
-  - SK-5843 (SK-NET FDDI-LP64)
-  - SK-5844 (SK-NET FDDI-LP64 DAS)
-  - Netelligent 100 FDDI DAS Fibre SC
-  - Netelligent 100 FDDI SAS Fibre SC
-  - Netelligent 100 FDDI DAS UTP
-  - Netelligent 100 FDDI SAS UTP
-  - Netelligent 100 FDDI SAS Fibre MIC
-
-  Read <file:Documentation/networking/skfp.txt> for information about
-  the driver.
-
-  Questions concerning this driver can be addressed to:
-    linux@syskonnect.de
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called skfp.o.
-
-CONFIG_HIPPI
-  HIgh Performance Parallel Interface (HIPPI) is a 800Mbit/sec and
-  1600Mbit/sec dual-simplex switched or point-to-point network. HIPPI
-  can run over copper (25m) or fiber (300m on multi-mode or 10km on
-  single-mode). HIPPI networks are commonly used for clusters and to
-  connect to super computers. If you are connected to a HIPPI network
-  and have a HIPPI network card in your computer that you want to use
-  under Linux, say Y here (you must also remember to enable the driver
-  for your HIPPI card below). Most people will say N here.
-
-CONFIG_ROADRUNNER
-  Say Y here if this is your PCI HIPPI network card.
-
-  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 rrunner.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_ROADRUNNER_LARGE_RINGS
-  If you say Y here, the RoadRunner driver will preallocate up to 2 MB
-  of additional memory to allow for fastest operation, both for
-  transmitting and receiving. This memory cannot be used by any other
-  kernel code or by user space programs. Say Y here only if you have
-  the memory.
-
-CONFIG_ARM_AM79C961A
-  If you wish to compile a kernel for the EBSA-110, then you should
-  always answer Y to this.
-
-CONFIG_ARIADNE
-  If you have a Village Tronic Ariadne Ethernet adapter, say Y.
-  Otherwise, say N.
-
-  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 is called ariadne.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_A2065
-  If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise,
-  say N.
-
-  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 is called a2065.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_HYDRA
-  If you have a Hydra Ethernet adapter, say Y. Otherwise, say N.
-
-  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 is called hydra.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MACE
-  Power Macintoshes and clones with Ethernet built-in on the
-  motherboard will usually use a MACE (Medium Access Control for
-  Ethernet) interface. Say Y to include support for the MACE chip.
-
-  This driver is also available as a module called mace.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_MACE_AAUI_PORT
-  Some Apple machines (notably the Apple Network Server) which use the
-  MACE ethernet chip have an Apple AUI port (small 15-pin connector),
-  instead of an 8-pin RJ45 connector for twisted-pair ethernet.  Say
-  Y here if you have such a machine.  If unsure, say N.
-  The driver will default to AAUI on ANS anyway, and if you use it as
-  a module, you can provide the port_aaui=0|1 to force the driver.
-
-CONFIG_BMAC
-  Say Y for support of BMAC Ethernet interfaces. These are used on G3
-  computers.
-
-  This driver is also available as a module called bmac.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_GMAC
-  Say Y for support of GMAC Ethernet interfaces. These are used on G4
-  and iBook computers.
-
-  This driver is also available as a module called gmac.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_OAKNET
-  Say Y if your machine has this type of Ethernet network card.
-
-  This driver is also available as a module called oaknet.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NS83820
-  This is a driver for the National Semiconductor DP83820 series
-  of gigabit ethernet MACs.  Cards using this chipset include
-  the D-Link DGE-500T, PureData's PDP8023Z-TG, SMC's SMC9462TX,
-  SOHO-GA2000T, SOHO-GA2500T.  The driver supports the use of
-  zero copy.
-
diff -Nru a/drivers/net/Config.in b/drivers/net/Config.in
--- a/drivers/net/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,328 +0,0 @@
-#
-# Network device configuration
-#
-
-source drivers/net/arcnet/Config.in
-
-tristate 'Dummy net driver support' CONFIG_DUMMY
-tristate 'Bonding driver support' CONFIG_BONDING
-tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
-tristate 'Universal TUN/TAP device driver support' CONFIG_TUN
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP
-fi
-
-if [ "$CONFIG_ISAPNP" = "y" -o "$CONFIG_ISAPNP" = "m" ]; then
-   dep_tristate 'General Instruments Surfboard 1000' CONFIG_NET_SB1000 $CONFIG_ISAPNP
-fi
-
-#
-#	Ethernet
-#
-
-mainmenu_option next_comment
-comment 'Ethernet (10 or 100Mbit)'
-bool 'Ethernet (10 or 100Mbit)' CONFIG_NET_ETHERNET
-if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
-   if [ "$CONFIG_ARM" = "y" ]; then  
-      dep_bool '  ARM EBSA110 AM79C961A support' CONFIG_ARM_AM79C961A $CONFIG_ARCH_EBSA110
-      if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-         source drivers/acorn/net/Config.in
-      fi
-   fi
-   if [ "$CONFIG_PPC" = "y" ]; then
-      dep_tristate '  MACE (Power Mac ethernet) support' CONFIG_MACE $CONFIG_ALL_PPC
-      if [ "$CONFIG_MACE" != "n" ]; then
-        bool '    Use AAUI port instead of TP by default' CONFIG_MACE_AAUI_PORT
-      fi
-      dep_tristate '  BMAC (G3 ethernet) support' CONFIG_BMAC $CONFIG_ALL_PPC
-      tristate '  National DP83902AV (Oak ethernet) support' CONFIG_OAKNET
-   fi
-   if [ "$CONFIG_ZORRO" = "y" ]; then
-      tristate '  Ariadne support' CONFIG_ARIADNE
-      tristate '  Ariadne II and X-Surf support' CONFIG_NE2K_ZORRO
-      tristate '  A2065 support' CONFIG_A2065
-      tristate '  Hydra support' CONFIG_HYDRA
-   fi
-   if [ "$CONFIG_PARISC" = "y" ]; then
-      dep_tristate '  Lasi ethernet' CONFIG_LASI_82596 $CONFIG_GSC_LASI
-   fi
-   if [ "$CONFIG_MIPS_JAZZ" = "y" ]; then
-      tristate '  MIPS JAZZ onboard SONIC Ethernet support' CONFIG_MIPS_JAZZ_SONIC
-   fi
-   if [ "$CONFIG_MIPS_GT96100" = "y" ]; then
-      bool '  MIPS GT96100 Ethernet support' CONFIG_MIPS_GT96100ETH
-   fi
-   if [ "$CONFIG_MIPS_AU1000" = "y" ]; then
-      bool '  MIPS AU1000 Ethernet support' CONFIG_MIPS_AU1000_ENET
-   fi
-   if [ "$CONFIG_SIBYTE_SB1250" = "y" ]; then
-      tristate '  SB1250 Ethernet support' CONFIG_NET_SB1250_MAC
-   fi
-   if [ "$CONFIG_SGI_IP27" = "y" ]; then
-      bool '  SGI IOC3 Ethernet' CONFIG_SGI_IOC3_ETH
-   fi
-   if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then
-      bool '  SGI IOC3 Ethernet' CONFIG_SGI_IOC3_ETH
-   fi
-   if [ "$CONFIG_SUPERH" = "y" ]; then
-      tristate '  National DP83902AV  support' CONFIG_STNIC
-   fi
-   dep_tristate '  Sun LANCE support' CONFIG_SUNLANCE $CONFIG_SBUS
-   if [ "$CONFIG_SBUS" = "y" -o "$CONFIG_PCI" = "y" ]; then
-      tristate '  Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
-   fi
-   dep_tristate '  Sun BigMAC 10/100baseT support (EXPERIMENTAL)' CONFIG_SUNBMAC $CONFIG_SBUS $CONFIG_EXPERIMENTAL
-   dep_tristate '  Sun QuadEthernet support' CONFIG_SUNQE $CONFIG_SBUS
-   dep_tristate '  Sun GEM support' CONFIG_SUNGEM $CONFIG_PCI
-   bool '  3COM cards' CONFIG_NET_VENDOR_3COM
-   if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
-      dep_tristate '    3c501 "EtherLink" support' CONFIG_EL1 $CONFIG_ISA
-      dep_tristate '    3c503 "EtherLink II" support' CONFIG_EL2 $CONFIG_ISA
-      dep_tristate '    3c505 "EtherLink Plus" support' CONFIG_ELPLUS $CONFIG_ISA
-      dep_tristate '    3c507 "EtherLink 16" support (EXPERIMENTAL)' CONFIG_EL16 $CONFIG_ISA $CONFIG_EXPERIMENTAL
-      if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_MCA" = "y" ]; then
-         tristate '    3c509/3c529 (MCA)/3c579 "EtherLink III" support' CONFIG_EL3
-      fi
-      if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" ]; then
-         tristate '    3c515 ISA "Fast EtherLink"' CONFIG_3C515
-      fi
-      dep_tristate '    3c523 "EtherLink/MC" support' CONFIG_ELMC $CONFIG_MCA
-      dep_tristate '    3c527 "EtherLink/MC 32" support (EXPERIMENTAL)' CONFIG_ELMC_II $CONFIG_MCA $CONFIG_EXPERIMENTAL
-      if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" ]; then
-         tristate '    3c590/3c900 series (592/595/597) "Vortex/Boomerang" support' CONFIG_VORTEX
-      fi
-   fi
-   dep_tristate '  AMD LANCE and PCnet (AT1500 and NE2100) support' CONFIG_LANCE $CONFIG_ISA
-   bool '  Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC
-   if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
-      dep_tristate '    WD80*3 support' CONFIG_WD80x3 $CONFIG_ISA
-      dep_tristate '    SMC Ultra MCA support' CONFIG_ULTRAMCA $CONFIG_MCA
-      dep_tristate '    SMC Ultra support' CONFIG_ULTRA $CONFIG_ISA
-      dep_tristate '    SMC Ultra32 EISA support' CONFIG_ULTRA32 $CONFIG_EISA
-      dep_tristate '    SMC 9194 support' CONFIG_SMC9194 $CONFIG_ISA
-   fi
-   bool '  Racal-Interlan (Micom) NI cards' CONFIG_NET_VENDOR_RACAL
-   if [ "$CONFIG_NET_VENDOR_RACAL" = "y" ]; then
-      dep_tristate '    NI5010 support (EXPERIMENTAL)' CONFIG_NI5010 $CONFIG_ISA $CONFIG_EXPERIMENTAL
-      dep_tristate '    NI5210 support' CONFIG_NI52 $CONFIG_ISA
-      dep_tristate '    NI6510 support' CONFIG_NI65 $CONFIG_ISA
-   fi
-   if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_CARDBUS" != "n" ]; then
-      source drivers/net/tulip/Config.in
-   fi
-   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_MCA" = "y" ]; then
-         dep_tristate '  AT1700/1720 support (EXPERIMENTAL)' CONFIG_AT1700 $CONFIG_EXPERIMENTAL
-   fi
-   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_MCA" = "y" ]; then
-      tristate '  DEPCA, DE10x, DE200, DE201, DE202, DE422 support' CONFIG_DEPCA
-   fi
-   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_PCI" = "y" ]; then
-      tristate '  HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100
-   fi
-   dep_bool '  Other ISA cards' CONFIG_NET_ISA $CONFIG_ISA
-   if [ "$CONFIG_NET_ISA" = "y" ]; then
-      tristate '    Cabletron E21xx support' CONFIG_E2100
-      tristate '    EtherWORKS 3 (DE203, DE204, DE205) support' CONFIG_EWRK3
-      tristate '    EtherExpress 16 support' CONFIG_EEXPRESS
-      tristate '    EtherExpressPro support/EtherExpress 10 (i82595) support' CONFIG_EEXPRESS_PRO
-      if [ "$CONFIG_OBSOLETE" = "y" ]; then
-         tristate '    FMV-181/182/183/184 support (OBSOLETE)' CONFIG_FMV18X
-      fi
-      tristate '    HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS
-      tristate '    HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN
-      tristate '    LP486E on board Ethernet' CONFIG_LP486E
-      tristate '    ICL EtherTeam 16i/32 support' CONFIG_ETH16I
-      tristate '    NE2000/NE1000 support' CONFIG_NE2000
-      if [ "$CONFIG_OBSOLETE" = "y" ]; then
-	 dep_tristate '    SEEQ8005 support (EXPERIMENTAL)' CONFIG_SEEQ8005 $CONFIG_EXPERIMENTAL
-      fi
-      if [ "$CONFIG_OBSOLETE" = "y" ]; then
-         tristate '    SK_G16 support (OBSOLETE)' CONFIG_SK_G16
-      fi
-   fi
-   if [ "$CONFIG_MCA" = "y" ]; then
-      tristate '  SKnet MCA support' CONFIG_SKMC
-      tristate '  NE/2 (ne2000 MCA version) support' CONFIG_NE2_MCA
-      tristate '  IBM LAN Adapter/A support' CONFIG_IBMLANA
-   fi
-   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_PCI" = "y" ]; then
-     bool '  EISA, VLB, PCI and on board controllers' CONFIG_NET_PCI
-   else
-     define_bool CONFIG_NET_PCI n
-   fi
-   if [ "$CONFIG_NET_PCI" = "y" ]; then
-      dep_tristate '    AMD PCnet32 PCI support' CONFIG_PCNET32 $CONFIG_PCI
-      dep_tristate '    Adaptec Starfire/DuraLAN support' CONFIG_ADAPTEC_STARFIRE $CONFIG_PCI
-      if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" ]; then
-	 dep_tristate '    Ansel Communications EISA 3200 support (EXPERIMENTAL)' CONFIG_AC3200 $CONFIG_EXPERIMENTAL
-      fi
-
-      dep_tristate '    Apricot Xen-II on board Ethernet' CONFIG_APRICOT $CONFIG_ISA
-      dep_tristate '    CS89x0 support' CONFIG_CS89x0 $CONFIG_ISA
-      if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" ]; then
-         tristate '    Digi Intl. RightSwitch SE-X support' CONFIG_DGRS
-      fi
-      dep_tristate '    EtherExpressPro/100 support (eepro100, original Becker driver)' CONFIG_EEPRO100 $CONFIG_PCI
-      dep_tristate '    EtherExpressPro/100 support (e100, Alternate Intel driver)' CONFIG_E100 $CONFIG_PCI
-      dep_tristate '    Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL
-      dep_tristate '    Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI
-      dep_tristate '    National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI
-      dep_tristate '    PCI NE2000 and clones support (see help)' CONFIG_NE2K_PCI $CONFIG_PCI
-      dep_tristate '    Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL
-      dep_tristate '    Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL
-      dep_tristate '    RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)' CONFIG_8139CP $CONFIG_PCI $CONFIG_EXPERIMENTAL
-      dep_tristate '    RealTek RTL-8139 PCI Fast Ethernet Adapter support' CONFIG_8139TOO $CONFIG_PCI
-      dep_mbool '      Use PIO instead of MMIO' CONFIG_8139TOO_PIO $CONFIG_8139TOO
-      dep_mbool '      Support for uncommon RTL-8139 rev. K (automatic channel equalization)' CONFIG_8139TOO_TUNE_TWISTER $CONFIG_8139TOO
-      dep_mbool '      Support for older RTL-8129/8130 boards' CONFIG_8139TOO_8129 $CONFIG_8139TOO
-      dep_mbool '      Use older RX-reset method' CONFIG_8139_OLD_RX_RESET $CONFIG_8139TOO
-      dep_tristate '    SiS 900/7016 PCI Fast Ethernet Adapter support' CONFIG_SIS900 $CONFIG_PCI
-      dep_tristate '    SMC EtherPower II' CONFIG_EPIC100 $CONFIG_PCI
-      dep_tristate '    Sundance Alta support' CONFIG_SUNDANCE $CONFIG_PCI
-      dep_mbool '      Use MMIO instead of PIO' CONFIG_SUNDANCE_MMIO $CONFIG_SUNDANCE
-      if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" ]; then
-         tristate '    TI ThunderLAN support' CONFIG_TLAN
-      fi
-      dep_tristate '    VIA Rhine support' CONFIG_VIA_RHINE $CONFIG_PCI
-      dep_mbool '      Use MMIO instead of PIO (EXPERIMENTAL)' CONFIG_VIA_RHINE_MMIO $CONFIG_VIA_RHINE $CONFIG_EXPERIMENTAL
-      if [ "$CONFIG_OBSOLETE" = "y" ]; then
-	 dep_bool '    Zenith Z-Note support (OBSOLETE)' CONFIG_ZNET $CONFIG_ISA
-      fi
-      if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_MIPS" = "y" ]; then
-	 bool '    Philips SAA9730 Ethernet support (EXPERIMENTAL)' CONFIG_LAN_SAA9730
-      fi
-   fi
-   bool '  Pocket and portable adapters' CONFIG_NET_POCKET
-   if [ "$CONFIG_NET_POCKET" = "y" ]; then
-      if [ "$CONFIG_ISA" = "y" -a "$CONFIG_X86" = "y" ]; then
-         tristate '    AT-LAN-TEC/RealTek pocket adapter support' CONFIG_ATP
-      fi
-      dep_tristate '    D-Link DE600 pocket adapter support' CONFIG_DE600 $CONFIG_ISA
-      dep_tristate '    D-Link DE620 pocket adapter support' CONFIG_DE620 $CONFIG_ISA
-   fi
-   if [ "$CONFIG_SGI_IP22" = "y" ]; then
-      bool '  SGI Seeq ethernet controller support' CONFIG_SGISEEQ
-   fi
-   if [ "$CONFIG_DECSTATION" = "y" ]; then
-      bool '  DEC LANCE ethernet controller support' CONFIG_DECLANCE
-   fi 
-   if [ "$CONFIG_BAGET_MIPS" = "y" ]; then
-      tristate '  Baget AMD LANCE support' CONFIG_BAGETLANCE
-   fi
-fi
-
-endmenu
-
-#
-#	Gigabit Ethernet
-#
-
-mainmenu_option next_comment
-comment 'Ethernet (1000 Mbit)'
-
-dep_tristate 'Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support' CONFIG_ACENIC $CONFIG_PCI
-if [ "$CONFIG_ACENIC" != "n" ]; then
-   bool '  Omit support for old Tigon I based AceNICs' CONFIG_ACENIC_OMIT_TIGON_I
-fi
-dep_tristate 'D-Link DL2000-based Gigabit Ethernet support' CONFIG_DL2K $CONFIG_PCI
-dep_tristate 'Intel(R) PRO/1000 Gigabit Ethernet support' CONFIG_E1000 $CONFIG_PCI
-dep_mbool '  Use Rx Polling (NAPI) (EXPERIMENTAL)' CONFIG_E1000_NAPI $CONFIG_E1000 $CONFIG_EXPERIMENTAL
-dep_tristate 'MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS $CONFIG_SBUS
-dep_tristate 'National Semiconduct DP83820 support' CONFIG_NS83820 $CONFIG_PCI
-dep_tristate 'Packet Engines Hamachi GNIC-II support' CONFIG_HAMACHI $CONFIG_PCI
-dep_tristate 'Packet Engines Yellowfin Gigabit-NIC support (EXPERIMENTAL)' CONFIG_YELLOWFIN $CONFIG_PCI $CONFIG_EXPERIMENTAL
-dep_tristate 'SysKonnect SK-98xx support' CONFIG_SK98LIN $CONFIG_PCI
-dep_tristate 'Broadcom Tigon3 support' CONFIG_TIGON3 $CONFIG_PCI
-
-endmenu
-
-if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
-   dep_tristate 'iSeries Virtual Ethernet driver support' CONFIG_VETH $CONFIG_PPC_ISERIES
-fi
-
-bool 'FDDI driver support' CONFIG_FDDI
-if [ "$CONFIG_FDDI" = "y" ]; then
-   if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" ]; then
-      tristate '  Digital DEFEA and DEFPA adapter support' CONFIG_DEFXX
-   fi
-   dep_tristate '  SysKonnect FDDI PCI support' CONFIG_SKFP $CONFIG_PCI
-fi
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   if [ "$CONFIG_INET" = "y" ]; then
-      bool 'HIPPI driver support (EXPERIMENTAL)' CONFIG_HIPPI
-      if [ "$CONFIG_HIPPI" = "y" -a "$CONFIG_PCI" = "y" ]; then
-         dep_tristate '  Essential RoadRunner HIPPI PCI adapter support (EXPERIMENTAL)' CONFIG_ROADRUNNER $CONFIG_PCI
-         if [ "$CONFIG_ROADRUNNER" != "n" ]; then
-   	    bool '    Use large TX/RX rings (EXPERIMENTAL)' CONFIG_ROADRUNNER_LARGE_RINGS
-         fi
-      fi
-   fi
-fi
-
-dep_tristate 'PLIP (parallel port) support' CONFIG_PLIP $CONFIG_PARPORT
-
-tristate 'PPP (point-to-point protocol) support' CONFIG_PPP
-if [ ! "$CONFIG_PPP" = "n" ]; then
-   dep_bool '  PPP multilink support (EXPERIMENTAL)' CONFIG_PPP_MULTILINK $CONFIG_EXPERIMENTAL
-   dep_bool '  PPP filtering' CONFIG_PPP_FILTER $CONFIG_FILTER
-   dep_tristate '  PPP support for async serial ports' CONFIG_PPP_ASYNC $CONFIG_PPP
-   dep_tristate '  PPP support for sync tty ports' CONFIG_PPP_SYNC_TTY $CONFIG_PPP
-   dep_tristate '  PPP Deflate compression' CONFIG_PPP_DEFLATE $CONFIG_PPP
-   dep_tristate '  PPP BSD-Compress compression' CONFIG_PPP_BSDCOMP $CONFIG_PPP
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '  PPP over Ethernet (EXPERIMENTAL)' CONFIG_PPPOE $CONFIG_PPP
-   fi
-   if [ ! "$CONFIG_ATM" = "n" ]; then
-      dep_tristate '  PPP over ATM' CONFIG_PPPOATM $CONFIG_PPP
-   fi
-fi
-
-tristate 'SLIP (serial line) support' CONFIG_SLIP
-if [ "$CONFIG_SLIP" != "n" ]; then
-   bool '  CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
-   bool '  Keepalive and linefill' CONFIG_SLIP_SMART
-   bool '  Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
-fi
-
-mainmenu_option next_comment
-comment 'Wireless LAN (non-hamradio)'
-
-bool 'Wireless LAN (non-hamradio)' CONFIG_NET_RADIO
-if [ "$CONFIG_NET_RADIO" = "y" ]; then
-   dep_tristate '  STRIP (Metricom starmode radio IP)' CONFIG_STRIP $CONFIG_INET
-   tristate '  Aironet Arlan 655 & IC2200 DS support' CONFIG_ARLAN
-   tristate '  Aironet 4500/4800 series adapters' CONFIG_AIRONET4500
-   dep_tristate '   Aironet 4500/4800 ISA/PCI/PNP/365 support ' CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500
-   if [ "$CONFIG_AIRONET4500" != "n" -a "$CONFIG_AIRONET4500_NONCS" != "n" ]; then
-      bool '     Aironet 4500/4800 PNP support ' CONFIG_AIRONET4500_PNP
-      dep_bool '     Aironet 4500/4800 PCI support ' CONFIG_AIRONET4500_PCI $CONFIG_PCI
-      dep_bool '     Aironet 4500/4800 ISA broken support (EXPERIMENTAL)' CONFIG_AIRONET4500_ISA $CONFIG_EXPERIMENTAL
-      dep_bool '     Aironet 4500/4800 I365 broken support (EXPERIMENTAL)' CONFIG_AIRONET4500_I365 $CONFIG_EXPERIMENTAL
-   fi
-   dep_tristate '   Aironet 4500/4800 PROC interface ' CONFIG_AIRONET4500_PROC $CONFIG_AIRONET4500 m
-
-# New directory for Wireless LAN devices - cards above will move there
-   source drivers/net/wireless/Config.in
-fi
-
-endmenu
-
-source drivers/net/tokenring/Config.in
-
-bool 'Fibre Channel driver support' CONFIG_NET_FC
-if [ "$CONFIG_NET_FC" = "y" ]; then
-   dep_tristate '  Interphase 5526 Tachyon chipset based adapter support' CONFIG_IPHASE5526 $CONFIG_SCSI $CONFIG_PCI
-fi
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   dep_tristate 'Red Creek Hardware VPN (EXPERIMENTAL)' CONFIG_RCPCI $CONFIG_PCI
-   tristate 'Traffic Shaper (EXPERIMENTAL)' CONFIG_SHAPER
-fi
-
-source drivers/net/wan/Config.in
-
-if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
-   source drivers/net/pcmcia/Config.in
-fi
diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,2309 @@
+#
+# Network device configuration
+#
+source "drivers/net/arcnet/Kconfig"
+
+config DUMMY
+	tristate "Dummy net driver support"
+	depends on NETDEVICES
+	---help---
+	  This is essentially a bit-bucket device (i.e. traffic you send to
+	  this device is consigned into oblivion) with a configurable IP
+	  address. It is most commonly used in order to make your currently
+	  inactive SLIP address seem like a real address for local programs.
+	  If you use SLIP or PPP, you might want to say Y here. Since this
+	  thing often comes in handy, the default is Y. It won't enlarge your
+	  kernel either. What a deal. Read about it in the Network
+	  Administrator's Guide, available from
+	  <http://www.linuxdoc.org/docs.html#guide>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called dummy.o.  If you want to use more than one dummy
+	  device at a time, you need to compile this driver as a module.
+	  Instead of 'dummy', the devices will then be called 'dummy0',
+	  'dummy1' etc.
+
+config BONDING
+	tristate "Bonding driver support"
+	depends on NETDEVICES
+	---help---
+	  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
+	  Channels together. This is called 'Etherchannel' by Cisco,
+	  'Trunking' by Sun, and 'Bonding' in Linux.
+
+	  If you have two Ethernet connections to some other computer, you can
+	  make them behave like one double speed connection using this driver.
+	  Naturally, this has to be supported at the other end as well, either
+	  with a similar Bonding Linux driver, a Cisco 5500 switch or a
+	  SunTrunking SunSoft driver.
+
+	  This is similar to the EQL driver, but it merges Ethernet segments
+	  instead of serial lines.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called bonding.o.
+
+config EQUALIZER
+	tristate "EQL (serial line load balancing) support"
+	depends on NETDEVICES
+	---help---
+	  If you have two serial connections to some other computer (this
+	  usually requires two modems and two telephone lines) and you use
+	  SLIP (the protocol for sending Internet traffic over telephone
+	  lines) or PPP (a better SLIP) on them, you can make them behave like
+	  one double speed connection using this driver.  Naturally, this has
+	  to be supported at the other end as well, either with a similar EQL
+	  Linux driver or with a Livingston Portmaster 2e.
+
+	  Say Y if you want this and read
+	  <file:Documentation/networking/eql.txt>.  You may also want to read
+	  section 6.2 of the NET-3-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 eql.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config TUN
+	tristate "Universal TUN/TAP device driver support"
+	depends on NETDEVICES
+	---help---
+	  TUN/TAP provides packet reception and transmission for user space
+	  programs.  It can be viewed as a simple Point-to-Point or Ethernet
+	  device, which instead of receiving packets from a physical media,
+	  receives them from user space program and instead of sending packets
+	  via physical media writes them to the user space program.
+
+	  When a program opens /dev/net/tun, driver creates and registers
+	  corresponding net device tunX or tapX.  After a program closed above
+	  devices, driver will automatically delete tunXX or tapXX device and
+	  all routes corresponding to it.
+
+	  Please read <file:Documentation/networking/tuntap.txt> for more
+	  information.
+
+	  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 tun.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you don't know what to use this for, you don't need it.
+
+config ETHERTAP
+	tristate "Ethertap network tap (OBSOLETE)"
+	depends on NETDEVICES && EXPERIMENTAL
+	---help---
+	  If you say Y here (and have said Y to "Kernel/User network link
+	  driver", above) and create a character special file /dev/tap0 with
+	  major number 36 and minor number 16 using mknod ("man mknod"), you
+	  will be able to have a user space program read and write raw
+	  Ethernet frames from/to that special file.  tap0 can be configured
+	  with ifconfig and route like any other Ethernet device but it is not
+	  connected to any physical LAN; everything written by the user to
+	  /dev/tap0 is treated by the kernel as if it had come in from a LAN
+	  to the device tap0; everything the kernel wants to send out over the
+	  device tap0 can instead be read by the user from /dev/tap0: the user
+	  mode program replaces the LAN that would be attached to an ordinary
+	  Ethernet device. Please read the file
+	  <file:Documentation/networking/ethertap.txt> for more information.
+
+	  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 ethertap.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you don't know what to use this for, you don't need it.
+
+config NET_SB1000
+	tristate "General Instruments Surfboard 1000"
+	depends on NETDEVICES && ISAPNP
+	---help---
+	  This is a driver for the General Instrument (also known as
+	  NextLevel) SURFboard 1000 internal
+	  cable modem. This is an ISA card which is used by a number of cable
+	  TV companies to provide cable modem access. It's a one-way
+	  downstream-only cable modem, meaning that your upstream net link is
+	  provided by your regular phone modem.
+
+	  At present this driver only compiles as a module, so say M here if
+	  you have this card. The module will be called sb1000.o. Then read
+	  <file:Documentation/networking/README.sb1000> for information on how
+	  to use this module, as it needs special ppp scripts for establishing
+	  a connection. Further documentation and the necessary scripts can be
+	  found at:
+
+	  <http://www.jacksonville.net/~fventuri/>
+	  <http://home.adelphia.net/~siglercm/sb1000.html>
+	  <http://linuxpower.cx/~cable/>
+
+	  If you don't have this card, of course say N.
+
+#
+#	Ethernet
+#
+
+menu "Ethernet (10 or 100Mbit)"
+	depends on NETDEVICES
+
+config NET_ETHERNET
+	bool "Ethernet (10 or 100Mbit)"
+	---help---
+	  Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common
+	  type of Local Area Network (LAN) in universities and companies.
+
+	  Common varieties of Ethernet are: 10BASE-2 or Thinnet (10 Mbps over
+	  coaxial cable, linking computers in a chain), 10BASE-T or twisted
+	  pair (10 Mbps over twisted pair cable, linking computers to central
+	  hubs), 10BASE-F (10 Mbps over optical fiber links, using hubs),
+	  100BASE-TX (100 Mbps over two twisted pair cables, using hubs),
+	  100BASE-T4 (100 Mbps over 4 standard voice-grade twisted pair
+	  cables, using hubs), 100BASE-FX (100 Mbps over optical fiber links)
+	  [the 100BASE varieties are also known as Fast Ethernet], and Gigabit
+	  Ethernet (1 Gbps over optical fiber or short copper links).
+
+	  If your Linux machine will be connected to an Ethernet and you have
+	  an Ethernet network interface card (NIC) installed in your computer,
+	  say Y here and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. You will then also have
+	  to say Y to the driver for your particular NIC.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about Ethernet network cards. If unsure, say N.
+
+config ARM_AM79C961A
+	bool "ARM EBSA110 AM79C961A support"
+	depends on NET_ETHERNET && ARM && ARCH_EBSA110
+	help
+	  If you wish to compile a kernel for the EBSA-110, then you should
+	  always answer Y to this.
+
+source "drivers/acorn/net/Kconfig"
+
+config MACE
+	tristate "MACE (Power Mac ethernet) support"
+	depends on NET_ETHERNET && PPC && ALL_PPC
+	help
+	  Power Macintoshes and clones with Ethernet built-in on the
+	  motherboard will usually use a MACE (Medium Access Control for
+	  Ethernet) interface. Say Y to include support for the MACE chip.
+
+	  This driver is also available as a module called mace.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config MACE_AAUI_PORT
+	bool "Use AAUI port instead of TP by default"
+	depends on MACE
+	help
+	  Some Apple machines (notably the Apple Network Server) which use the
+	  MACE ethernet chip have an Apple AUI port (small 15-pin connector),
+	  instead of an 8-pin RJ45 connector for twisted-pair ethernet.  Say
+	  Y here if you have such a machine.  If unsure, say N.
+	  The driver will default to AAUI on ANS anyway, and if you use it as
+	  a module, you can provide the port_aaui=0|1 to force the driver.
+
+config BMAC
+	tristate "BMAC (G3 ethernet) support"
+	depends on NET_ETHERNET && PPC && ALL_PPC
+	help
+	  Say Y for support of BMAC Ethernet interfaces. These are used on G3
+	  computers.
+
+	  This driver is also available as a module called bmac.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config OAKNET
+	tristate "National DP83902AV (Oak ethernet) support"
+	depends on NET_ETHERNET && PPC
+	help
+	  Say Y if your machine has this type of Ethernet network card.
+
+	  This driver is also available as a module called oaknet.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config ARIADNE
+	tristate "Ariadne support"
+	depends on NET_ETHERNET && ZORRO
+	help
+	  If you have a Village Tronic Ariadne Ethernet adapter, say Y.
+	  Otherwise, say N.
+
+	  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 is called ariadne.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config NE2K_ZORRO
+	tristate "Ariadne II and X-Surf support"
+	depends on NET_ETHERNET && ZORRO
+
+config A2065
+	tristate "A2065 support"
+	depends on NET_ETHERNET && ZORRO
+	help
+	  If you have a Commodore A2065 Ethernet adapter, say Y. Otherwise,
+	  say N.
+
+	  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 is called a2065.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config HYDRA
+	tristate "Hydra support"
+	depends on NET_ETHERNET && ZORRO
+	help
+	  If you have a Hydra Ethernet adapter, say Y. Otherwise, say N.
+
+	  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 is called hydra.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config LASI_82596
+	tristate "Lasi ethernet"
+	depends on NET_ETHERNET && PARISC && GSC_LASI
+	help
+	  Say Y here to support the on-board Intel 82596 ethernet controller
+	  built into Hewlett-Packard PA-RISC machines.
+
+config MIPS_JAZZ_SONIC
+	tristate "MIPS JAZZ onboard SONIC Ethernet support"
+	depends on NET_ETHERNET && MIPS_JAZZ
+	help
+	  This is the driver for the onboard card of MIPS Magnum 4000,
+	  Acer PICA, Olivetti M700-10 and a few other identical OEM systems.
+
+config MIPS_GT96100ETH
+	bool "MIPS GT96100 Ethernet support"
+	depends on NET_ETHERNET && MIPS_GT96100
+	help
+	  Say Y here to support the Ethernet subsystem on your GT96100 card.
+
+config MIPS_AU1000_ENET
+	bool "MIPS AU1000 Ethernet support"
+	depends on NET_ETHERNET && MIPS_AU1000
+	help
+	  If you have an Alchemy Semi AU1000 ethernet controller
+	  on an SGI MIPS system, say Y.  Otherwise, say N.
+
+config NET_SB1250_MAC
+	tristate "SB1250 Ethernet support"
+	depends on NET_ETHERNET && SIBYTE_SB1250
+
+config SGI_IOC3_ETH
+	bool "SGI IOC3 Ethernet"
+	depends on NET_ETHERNET && (IA64_SGI_SN1 || SGI_IP27)
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config STNIC
+	tristate "National DP83902AV  support"
+	depends on NET_ETHERNET && SUPERH
+	help
+	  Support for cards based on the National Semiconductor DP83902AV
+	  ST-NIC Serial Network Interface Controller for Twisted Pair.  This
+	  is a 10Mbit/sec Ethernet controller.  Product overview and specs at
+	  <http://www.national.com/pf/DP/DP83902A.html>.
+
+	  If unsure, say N.
+
+config SUNLANCE
+	tristate "Sun LANCE support"
+	depends on NET_ETHERNET && SBUS
+	help
+	  This driver supports the "le" interface present on all 32-bit Sparc
+	  systems, on some older Ultra systems and as an Sbus option.  These
+	  cards are based on the AMD Lance chipset, which is better known
+	  via the NE2100 cards.
+
+	  This support is also available as a module called sunlance.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config HAPPYMEAL
+	tristate "Sun Happy Meal 10/100baseT support"
+	depends on NET_ETHERNET && (SBUS || PCI)
+	help
+	  This driver supports the "hme" interface present on most Ultra
+	  systems and as an option on older Sbus systems. This driver supports
+	  both PCI and Sbus devices. This driver also supports the "qfe" quad
+	  100baseT device available in both PCI and Sbus configurations.
+
+	  This support is also available as a module called sunhme.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SUNBMAC
+	tristate "Sun BigMAC 10/100baseT support (EXPERIMENTAL)"
+	depends on NET_ETHERNET && SBUS && EXPERIMENTAL
+	help
+	  This driver supports the "be" interface available as an Sbus option.
+	  This is Sun's older 100baseT Ethernet device.
+
+	  This support is also available as a module called sunbmac.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SUNQE
+	tristate "Sun QuadEthernet support"
+	depends on NET_ETHERNET && SBUS
+	help
+	  This driver supports the "qe" 10baseT Ethernet device, available as
+	  an Sbus option. Note that this is not the same as Quad FastEthernet
+	  "qfe" which is supported by the Happy Meal driver instead.
+
+	  This support is also available as a module called sunqe.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SUNGEM
+	tristate "Sun GEM support"
+	depends on NET_ETHERNET && PCI
+	help
+	  Support for the Sun GEM chip, aka Sun GigabitEthernet/P 2.0.  See also
+	  <http://www.sun.com/products-n-solutions/hardware/docs/pdf/806-3985-10.pdf>.
+
+config NET_VENDOR_3COM
+	bool "3COM cards"
+	depends on NET_ETHERNET
+	help
+	  If you have a network (Ethernet) card belonging to this class, say Y
+	  and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about 3COM cards. If you say Y, you will be asked for
+	  your specific card in the following questions.
+
+config EL1
+	tristate "3c501 \"EtherLink\" support"
+	depends on NET_VENDOR_3COM && ISA
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Also, consider buying a
+	  new card, since the 3c501 is slow, broken, and obsolete: you will
+	  have problems.  Some people suggest to ping ("man ping") a nearby
+	  machine every minute ("man cron") when using this card.
+
+	  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 3c501.o.  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>.
+
+config EL2
+	tristate "3c503 \"EtherLink II\" support"
+	depends on NET_VENDOR_3COM && ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 3c503.o.  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>.
+
+config ELPLUS
+	tristate "3c505 \"EtherLink Plus\" support"
+	depends on NET_VENDOR_3COM && ISA
+	---help---
+	  Information about this network (Ethernet) card can be found in
+	  <file:Documentation/networking/3c505.txt>.  If you have a card of
+	  this type, say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called 3c505.o.
+
+config EL16
+	tristate "3c507 \"EtherLink 16\" support (EXPERIMENTAL)"
+	depends on NET_VENDOR_3COM && ISA && EXPERIMENTAL
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 3c507.o.  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>.
+
+config EL3
+	tristate "3c509/3c529 (MCA)/3c579 \"EtherLink III\" support"
+	depends on NET_VENDOR_3COM && (ISA || EISA || MCA)
+	---help---
+	  If you have a network (Ethernet) card belonging to the 3Com
+	  EtherLinkIII series, say Y and read the Ethernet-HOWTO, available
+	  from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If your card is not working you may need to use the DOS
+	  setup disk to disable Plug & Play mode, and to select the default
+	  media type.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called 3c509.o.
+
+config 3C515
+	tristate "3c515 ISA \"Fast EtherLink\""
+	depends on NET_VENDOR_3COM && (ISA || EISA)
+	help
+	  If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet
+	  network card, say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called 3c515.o.
+
+config ELMC
+	tristate "3c523 \"EtherLink/MC\" support"
+	depends on NET_VENDOR_3COM && MCA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 3c523.o.  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>.
+
+config ELMC_II
+	tristate "3c527 \"EtherLink/MC 32\" support (EXPERIMENTAL)"
+	depends on NET_VENDOR_3COM && MCA && EXPERIMENTAL
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 3c527.o.  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>.
+
+config VORTEX
+	tristate "3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" support"
+	depends on NET_VENDOR_3COM && (PCI || EISA)
+	---help---
+	  This option enables driver support for a large number of 10mbps and
+	  10/100mbps EISA, PCI and PCMCIA 3Com network cards:
+
+	  "Vortex"    (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
+	  "Boomerang" (EtherLink XL 3c900 or 3c905)            PCI
+	  "Cyclone"   (3c540/3c900/3c905/3c980/3c575/3c656)    PCI and Cardbus
+	  "Tornado"   (3c905)                                  PCI
+	  "Hurricane" (3c555/3cSOHO)                           PCI
+
+	  If you have such a card, say Y and read the Ethernet-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>. More
+	  specific information is in
+	  <file:Documentation/networking/vortex.txt> and in the comments at
+	  the beginning of <file:drivers/net/3c59x.c>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.
+
+config LANCE
+	tristate "AMD LANCE and PCnet (AT1500 and NE2100) support"
+	depends on NET_ETHERNET && ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. Some LinkSys cards are
+	  of this type.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called lance.o.
+
+config NET_VENDOR_SMC
+	bool "Western Digital/SMC cards"
+	depends on NET_ETHERNET
+	help
+	  If you have a network (Ethernet) card belonging to this class, say Y
+	  and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about Western Digital cards. If you say Y, you will be
+	  asked for your specific card in the following questions.
+
+config WD80x3
+	tristate "WD80*3 support"
+	depends on NET_VENDOR_SMC && ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 wd.o.  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>.
+
+config ULTRAMCA
+	tristate "SMC Ultra MCA support"
+	depends on NET_VENDOR_SMC && MCA
+	help
+	  If you have a network (Ethernet) card of this type and are running
+	  an MCA based system (PS/2), say Y and read 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 smc-mca.o.  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>.
+
+config ULTRA
+	tristate "SMC Ultra support"
+	depends on NET_VENDOR_SMC && ISA
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Important: There have been many reports that, with some motherboards
+	  mixing an SMC Ultra and an Adaptec AHA154x SCSI card (or compatible,
+	  such as some BusLogic models) causes corruption problems with many
+	  operating systems. The Linux smc-ultra driver has a work-around for
+	  this but keep it in mind if you have such a SCSI card and have
+	  problems.
+
+	  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 smc-ultra.o.  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>.
+
+config ULTRA32
+	tristate "SMC Ultra32 EISA support"
+	depends on NET_VENDOR_SMC && EISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 smc-ultra32.o.  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>.
+
+config SMC9194
+	tristate "SMC 9194 support"
+	depends on NET_VENDOR_SMC && ISA
+	---help---
+	  This is support for the SMC9xxx based Ethernet cards. Choose this
+	  option if you have a DELL laptop with the docking station, or
+	  another SMC9192/9194 based chipset.  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 smc9194.o.  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>.
+
+config NET_VENDOR_RACAL
+	bool "Racal-Interlan (Micom) NI cards"
+	depends on NET_ETHERNET
+	help
+	  If you have a network (Ethernet) card belonging to this class, such
+	  as the NI5010, NI5210 or NI6210, say Y and read the Ethernet-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about NI cards. If you say Y, you will be asked for
+	  your specific card in the following questions.
+
+config NI5010
+	tristate "NI5010 support (EXPERIMENTAL)"
+	depends on NET_VENDOR_RACAL && ISA && EXPERIMENTAL
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. Note that this is still
+	  experimental code.
+
+	  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 ni5010.o.  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>.
+
+config NI52
+	tristate "NI5210 support"
+	depends on NET_VENDOR_RACAL && ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 ni52.o.  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>.
+
+config NI65
+	tristate "NI6510 support"
+	depends on NET_VENDOR_RACAL && ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 ni65.o.  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>.
+
+source "drivers/net/tulip/Kconfig"
+
+config AT1700
+	tristate "AT1700/1720 support (EXPERIMENTAL)"
+	depends on NET_ETHERNET && (ISA || MCA) && EXPERIMENTAL
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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).
+	  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>.  The module will be
+	  called at1700.o.
+
+config DEPCA
+	tristate "DEPCA, DE10x, DE200, DE201, DE202, DE422 support"
+	depends on NET_ETHERNET && (ISA || EISA || MCA)
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto> as well as
+	  <file:drivers/net/depca.c>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called
+	  depca.o.
+
+config HP100
+	tristate "HP 10/100VG PCLAN (ISA, EISA, PCI) support"
+	depends on NET_ETHERNET && (ISA || EISA || PCI)
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called hp100.o.
+
+config NET_ISA
+	bool "Other ISA cards"
+	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
+	  of your computer) is ISA (as opposed to EISA, VLB or PCI), say Y.
+	  Make sure you know the name of your card. Read the Ethernet-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If unsure, say Y.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the remaining ISA network card questions. If you say Y, you will be
+	  asked for your specific card in the following questions.
+
+config E2100
+	tristate "Cabletron E21xx support"
+	depends on NET_ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 e2100.o.  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>.
+
+config EWRK3
+	tristate "EtherWORKS 3 (DE203, DE204, DE205) support"
+	depends on NET_ISA
+	---help---
+	  This driver supports the DE203, DE204 and DE205 network (Ethernet)
+	  cards. If this is for you, say Y and read
+	  <file:Documentation/networking/ewrk3.txt> in the kernel source as
+	  well as the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called ewrk3.o.
+
+config EEXPRESS
+	tristate "EtherExpress 16 support"
+	depends on NET_ISA
+	---help---
+	  If you have an EtherExpress16 network (Ethernet) card, say Y and
+	  read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Note that the Intel
+	  EtherExpress16 card used to be regarded as a very poor choice
+	  because the driver was very unreliable. We now have a new driver
+	  that should do better.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called eexpress.o.
+
+config EEXPRESS_PRO
+	tristate "EtherExpressPro support/EtherExpress 10 (i82595) support"
+	depends on NET_ISA
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y. This
+	  driver supports intel i82595{FX,TX} based boards. Note however
+	  that the EtherExpress PRO/100 Ethernet card has its own separate
+	  driver.  Please read 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 eepro.o.  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>.
+
+config FMV18X
+	tristate "FMV-181/182/183/184 support (OBSOLETE)"
+	depends on NET_ISA && OBSOLETE
+	---help---
+	  If you have a Fujitsu FMV-181/182/183/184 network (Ethernet) card,
+	  say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you use an FMV-183 or FMV-184 and it is not working, you may need
+	  to disable Plug & Play mode of the card.
+
+	  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 fmv18x.o.  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>.
+
+config HPLAN_PLUS
+	tristate "HP PCLAN+ (27247B and 27252A) support"
+	depends on NET_ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 hp-plus.o.  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>.
+
+config HPLAN
+	tristate "HP PCLAN (27245 and other 27xxx series) support"
+	depends on NET_ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 hp.o.  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>.
+
+config LP486E
+	tristate "LP486E on board Ethernet"
+	depends on NET_ISA
+	help
+	  Say Y here to support the 82596-based on-board Ethernet controller
+	  for the Panther motherboard, which is one of the two shipped in the
+	  Intel Professional Workstation.
+
+config ETH16I
+	tristate "ICL EtherTeam 16i/32 support"
+	depends on NET_ISA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 eth16i.o.  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>.
+
+config NE2000
+	tristate "NE2000/NE1000 support"
+	depends on NET_ISA
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Many Ethernet cards
+	  without a specific driver are compatible with NE2000.
+
+	  If you have a PCI NE2000 card however, say N here and Y to "PCI
+	  NE2000 support", above. If you have a NE2000 card and are running on
+	  an MCA system (a bus system used on some IBM PS/2 computers and
+	  laptops), say N here and Y to "NE/2 (ne2000 MCA version) support",
+	  below.
+
+	  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 ne.o.  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>.
+
+config ZNET
+	tristate "Zenith Z-Note support (EXPERIMENTAL)"
+	depends on NET_ISA && EXPERIMENTAL
+	help
+	  The Zenith Z-Note notebook computer has a built-in network
+	  (Ethernet) card, and this is the Linux driver for it. Note that the
+	  IBM Thinkpad 300 is compatible with the Z-Note and is also supported
+	  by this driver. Read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config SEEQ8005
+	tristate "SEEQ8005 support (EXPERIMENTAL)"
+	depends on NET_ISA && OBSOLETE && EXPERIMENTAL
+	help
+	  This is a driver for the SEEQ 8005 network (Ethernet) card.  If this
+	  is for you, read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called ewrk3.o.
+
+config SK_G16
+	tristate "SK_G16 support (OBSOLETE)"
+	depends on NET_ISA && OBSOLETE
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config SKMC
+	tristate "SKnet MCA support"
+	depends on NET_ETHERNET && MCA
+	---help---
+	  These are Micro Channel Ethernet adapters. You need to say Y to "MCA
+	  support" in order to use this driver.  Supported cards are the SKnet
+	  Junior MC2 and the SKnet MC2(+).  The driver automatically
+	  distinguishes between the two cards. Note that using multiple boards
+	  of different type hasn't been tested with this driver.  Say Y if you
+	  have one of these Ethernet adapters.
+
+	  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 is called sk_mca.o.  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>.
+
+config NE2_MCA
+	tristate "NE/2 (ne2000 MCA version) support"
+	depends on NET_ETHERNET && MCA
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 ne2.o.  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>.
+
+config IBMLANA
+	tristate "IBM LAN Adapter/A support"
+	depends on NET_ETHERNET && MCA
+	---help---
+	  This is a Micro Channel Ethernet adapter.  You need to set
+	  CONFIG_MCA to use this driver.  It is both available as an in-kernel
+	  driver and as a module ( = code which can be inserted in and removed
+	  from the running kernel whenever you want).  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>. The only
+	  currently supported card is the IBM LAN Adapter/A for Ethernet.  It
+	  will both support 16K and 32K memory windows, however a 32K window
+	  gives a better security against packet losses.  Usage of multiple
+	  boards with this driver should be possible, but has not been tested
+	  up to now due to lack of hardware.
+
+config NET_PCI
+	bool "EISA, VLB, PCI and on board controllers"
+	depends on NET_ETHERNET && (ISA || EISA || PCI)
+	help
+	  This is another class of network cards which attach directly to the
+	  bus. If you have one of those, say Y and read the Ethernet-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about this class of network cards. If you say Y, you
+	  will be asked for your specific card in the following questions. If
+	  you are unsure, say Y.
+
+config PCNET32
+	tristate "AMD PCnet32 PCI support"
+	depends on NET_PCI && PCI
+	help
+	  If you have a PCnet32 or PCnetPCI based network (Ethernet) card,
+	  answer Y here and read 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 pcnet32.o.  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>.
+
+config ADAPTEC_STARFIRE
+	tristate "Adaptec Starfire/DuraLAN support"
+	depends on NET_PCI && PCI
+	help
+	  Say Y here if you have an Adaptec Starfire (or DuraLAN) PCI network
+	  adapter. The DuraLAN chip is used on the 64 bit PCI boards from
+	  Adaptec e.g. the ANA-6922A. The older 32 bit boards use the tulip
+	  driver.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called starfire.o.
+
+config AC3200
+	tristate "Ansel Communications EISA 3200 support (EXPERIMENTAL)"
+	depends on NET_PCI && (ISA || EISA) && EXPERIMENTAL
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 ac3200.o.  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>.
+
+config APRICOT
+	tristate "Apricot Xen-II on board Ethernet"
+	depends on NET_PCI && ISA
+	help
+	  If you have a network (Ethernet) controller of this type, say Y and
+	  read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called apricot.o.
+
+config CS89x0
+	tristate "CS89x0 support"
+	depends on NET_PCI && ISA
+	---help---
+	  Support for CS89x0 chipset based Ethernet cards. If you have a
+	  network (Ethernet) card of this type, say Y and read the
+	  Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto> as well as
+	  <file:Documentation/networking/cs89x0.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called cs89x.o.
+
+config DGRS
+	tristate "Digi Intl. RightSwitch SE-X support"
+	depends on NET_PCI && (PCI || EISA)
+	---help---
+	  This is support for the Digi International RightSwitch series of
+	  PCI/EISA Ethernet switch cards. These include the SE-4 and the SE-6
+	  models.  If you have a network card of this type, say Y and read the
+	  Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  More specific
+	  information is contained in <file:Documentation/networking/dgrs.txt>.
+
+	  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 dgrs.o.  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>.
+
+config EEPRO100
+	tristate "EtherExpressPro/100 support (eepro100, original Becker driver)"
+	depends on NET_PCI && PCI
+	help
+	  If you have an Intel EtherExpress PRO/100 PCI network (Ethernet)
+	  card, say Y and read 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 eepro100.o.  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>.
+
+config E100
+	tristate "EtherExpressPro/100 support (e100, Alternate Intel driver)"
+	depends on NET_PCI && PCI
+	---help---
+	  This driver supports Intel(R) PRO/100 family of adapters, which 
+	  includes:
+
+	  Controller  Adapter Name                       Board IDs
+	  ----------  ------------                       ---------
+
+	  82558       PRO/100+ PCI Adapter               668081-xxx, 
+	  689661-xxx
+	  82558       PRO/100+ Management Adapter        691334-xxx, 
+	  701738-xxx,
+	  721383-xxx
+	  82558       PRO/100+ Dual Port Server Adapter  714303-xxx, 
+	  711269-xxx, 
+	  A28276-xxx
+	  82558       PRO/100+ PCI Server Adapter        710550-xxx
+	  82550       PRO/100 S Server Adapter           752438-xxx
+	  82559                                          A56831-xxx, 
+	  A10563-xxx,
+	  A12171-xxx, 
+	  A12321-xxx, 
+	  A12320-xxx, 
+	  A12170-xxx
+	  748568-xxx
+	  748565-xxx
+	  82550       PRO/100 S Desktop Adapter          751767-xxx
+	  82559                                          748592-xxx, 
+	  A12167-xxx, 
+	  A12318-xxx, 
+	  A12317-xxx, 
+	  A12165-xxx,
+	  748569-xxx 
+	  82559       PRO/100+ Server Adapter            729757-xxx
+	  82559       PRO/100 S Management Adapter       748566-xxx, 
+	  748564-xxx
+	  82550       PRO/100 S Dual Port Server Adapter A56831-xxx
+	  82551       PRO/100 M Desktop Adapter          A80897-xxx
+	  PRO/100 S Advanced Management Adapter 
+	  747842-xxx, 
+	  745171-xxx
+	  CNR         PRO/100 VE Desktop Adapter         A10386-xxx, 
+	  A10725-xxx, 
+	  A23801-xxx, 
+	  A19716-xxx
+	  PRO/100 VM Desktop Adapter         A14323-xxx, 
+	  A19725-xxx, 
+	  A23801-xxx, 
+	  A22220-xxx, 
+	  A23796-xxx
+
+
+	  To verify that your adapter is supported, find the board ID number 
+	  on the adapter. Look for a label that has a barcode and a number 
+	  in the format 123456-001 (six digits hyphen three digits). Match 
+	  this to the list of numbers above.
+
+	  For more information on how to identify your adapter, go to the 
+	  Adapter & Driver ID Guide at:
+
+	  http://support.intel.com/support/network/adapter/pro100/21397.htm
+
+	  For the latest Intel PRO/100 network driver for Linux, see:
+
+	  http://appsr.intel.com/scripts-df/support_intel.asp
+
+	  More specific information on configuring the driver is in 
+	  <file:Documentation/networking/e100.txt>.
+
+	  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 e100.o.  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>.
+
+config LNE390
+	tristate "Mylex EISA LNE390A/B support (EXPERIMENTAL)"
+	depends on NET_PCI && EISA && EXPERIMENTAL
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 lne390.o.  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>.
+
+config FEALNX
+	tristate "Myson MTD-8xx PCI Ethernet support"
+	depends on NET_PCI && PCI
+	help
+	  Say Y here to support the Mysom MTD-800 family of PCI-based Ethernet
+	  cards. Specifications and data at
+	  <http://www.myson.com.hk/mtd/datasheet/>.
+
+config NATSEMI
+	tristate "National Semiconductor DP8381x series PCI Ethernet support"
+	depends on NET_PCI && PCI
+	help
+	  This driver is for the National Semiconductor DP83810 series,
+	  which is used in cards from PureData, NetGear, Linksys
+	  and others, including the 83815 chip.
+	  More specific information and updates are available from
+	  <http://www.scyld.com/network/natsemi.html>.
+
+config NE2K_PCI
+	tristate "PCI NE2000 and clones support (see help)"
+	depends on NET_PCI && PCI
+	---help---
+	  This driver is for NE2000 compatible PCI cards. It will not work
+	  with ISA NE2000 cards (they have their own driver, "NE2000/NE1000
+	  support" below). If you have a PCI NE2000 network (Ethernet) card,
+	  say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver also works for the following NE2000 clone cards:
+	  RealTek RTL-8029  Winbond 89C940  Compex RL2000  KTI ET32P2
+	  NetVin NV5000SC   Via 86C926      SureCom NE34   Winbond
+	  Holtek HT80232    Holtek HT80229
+
+	  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 ne2k-pci.o.  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>.
+
+config NE3210
+	tristate "Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)"
+	depends on NET_PCI && EISA && EXPERIMENTAL
+	---help---
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Note that this driver
+	  will NOT WORK for NE3200 cards as they are completely different.
+
+	  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 ne3210.o.  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>.
+
+config ES3210
+	tristate "Racal-Interlan EISA ES3210 support (EXPERIMENTAL)"
+	depends on NET_PCI && EISA && EXPERIMENTAL
+	help
+	  If you have a network (Ethernet) card of this type, say Y and read
+	  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 es3210.o.  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>.
+
+config 8139CP
+	tristate "RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL)"
+	depends on NET_PCI && PCI && EXPERIMENTAL
+	help
+	  This is a driver for the Fast Ethernet PCI network cards based on
+	  the RTL8139C+ chips. If you have one of those, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read Documentation/modules.txt. This is recommended.
+	  The module will be called 8139cp.o.
+
+config 8139TOO
+	tristate "RealTek RTL-8139 PCI Fast Ethernet Adapter support"
+	depends on NET_PCI && PCI
+	---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.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called 8139too.o.
+
+config 8139TOO_PIO
+	bool "Use PIO instead of MMIO"
+	depends on 8139TOO
+	help
+	  This instructs the driver to use programmed I/O ports (PIO) instead
+	  of PCI shared memory (MMIO).  This can possibly solve some problems
+	  in case your mainboard has memory consistency issues.  If unsure,
+	  say N.
+
+config 8139TOO_TUNE_TWISTER
+	bool "Support for uncommon RTL-8139 rev. K (automatic channel equalization)"
+	depends on 8139TOO
+	help
+	  This implements a function which might come in handy in case you
+	  are using low quality on long cabling. It is required for RealTek
+	  RTL-8139 revision K boards, and totally unused otherwise.  It tries
+	  to match the transceiver to the cable characteristics. This is
+	  experimental since hardly documented by the manufacturer.
+	  If unsure, say Y.
+
+config 8139TOO_8129
+	bool "Support for older RTL-8129/8130 boards"
+	depends on 8139TOO
+	help
+	  This enables support for the older and uncommon RTL-8129 and
+	  RTL-8130 chips, which support MII via an external transceiver,
+	  instead of an internal one.  Disabling this option will save some
+	  memory by making the code size smaller.  If unsure, say Y.
+
+config 8139_OLD_RX_RESET
+	bool "Use older RX-reset method"
+	depends on 8139TOO
+	help
+	  The 8139too driver was recently updated to contain a more rapid
+	  reset sequence, in the face of severe receive errors.  This "new"
+	  RX-reset method should be adequate for all boards.  But if you
+	  experience problems, you can enable this option to restore the
+	  old RX-reset behavior.  If unsure, say N.
+
+config SIS900
+	tristate "SiS 900/7016 PCI Fast Ethernet Adapter support"
+	depends on NET_PCI && PCI
+	---help---
+	  This is a driver for the Fast Ethernet PCI network cards based on
+	  the SiS 900 and SiS 7016 chips. The SiS 900 core is also embedded in
+	  SiS 630 and SiS 540 chipsets.  If you have one of those, say Y and
+	  read the Ethernet-HOWTO, available at
+	  <http://www.linuxdoc.org/docs.html#howto>.  Please read
+	  <file:Documentation/networking/sis900.txt> and comments at the
+	  beginning of <file:drivers/net/sis900.c> for more information.
+
+	  This driver also supports AMD 79C901 HomePNA so that you can use
+	  your phone line as a network cable.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called sis900.o.
+
+config EPIC100
+	tristate "SMC EtherPower II"
+	depends on NET_PCI && PCI
+	help
+	  This driver is for the SMC EtherPower II 9432 PCI Ethernet NIC,
+	  which is based on the SMC83c17x (EPIC/100).
+	  More specific information and updates are available from
+	  <http://www.scyld.com/network/epic100.html>.
+
+config SUNDANCE
+	tristate "Sundance Alta support"
+	depends on NET_PCI && PCI
+	help
+	  This driver is for the Sundance "Alta" chip.
+	  More specific information and updates are available from
+	  <http://www.scyld.com/network/sundance.html>.
+
+config SUNDANCE_MMIO
+	bool "Use MMIO instead of PIO"
+	depends on SUNDANCE
+	help
+	  Enable memory-mapped I/O for interaction with Sundance NIC registers.
+	  Do NOT enable this by default, PIO (enabled when MMIO is disabled)
+	  is known to solve bugs on certain chips.
+
+	  If unsure, say N.
+
+config TLAN
+	tristate "TI ThunderLAN support"
+	depends on NET_PCI && (PCI || EISA)
+	---help---
+	  If you have a PCI Ethernet network card based on the ThunderLAN chip
+	  which is supported by this driver, say Y and read the
+	  Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Devices currently supported by this driver are Compaq Netelligent,
+	  Compaq NetFlex and Olicom cards.  Please read the file
+	  <file:Documentation/networking/tlan.txt> for more details.
+
+	  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 tlan.o.  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>.
+
+	  Please email feedback to  torben.mathiasen@compaq.com.
+
+config VIA_RHINE
+	tristate "VIA Rhine support"
+	depends on NET_PCI && PCI
+	help
+	  If you have a VIA "rhine" based network card (Rhine-I (3043) or
+	  Rhine-2 (VT86c100A)), say Y here.
+
+	  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 via-rhine.o.  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>.
+
+config VIA_RHINE_MMIO
+	bool "Use MMIO instead of PIO (EXPERIMENTAL)"
+	depends on VIA_RHINE && EXPERIMENTAL
+	help
+	  This instructs the driver to use PCI shared memory (MMIO) instead of
+	  programmed I/O ports (PIO). Enabling this gives an improvement in
+	  processing time in parts of the driver.
+
+	  It is not known if this works reliably on all "rhine" based cards,
+	  but it has been tested successfully on some DFE-530TX adapters.
+
+	  If unsure, say N.
+
+config LAN_SAA9730
+	bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)"
+	depends on NET_PCI && EXPERIMENTAL && MIPS
+	help
+	  The SAA9730 is a combined multimedia and peripheral controller used
+	  in thin clients, Internet access terminals, and diskless
+	  workstations.
+	  See <http://www.semiconductors.philips.com/pip/SAA9730_flyer_1>.
+
+config NET_POCKET
+	bool "Pocket and portable adapters"
+	depends on NET_ETHERNET
+	---help---
+	  Cute little network (Ethernet) devices which attach to the parallel
+	  port ("pocket adapters"), commonly used with laptops. If you have
+	  one of those, say Y and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to plug a network (or some other) card into the PCMCIA
+	  (or PC-card) slot of your laptop instead (PCMCIA is the standard for
+	  credit card size extension cards used by all modern laptops), you
+	  need the pcmcia-cs package (location contained in the file
+	  <file:Documentation/Changes>) and you can say N here.
+
+	  Laptop users should read the Linux Laptop home page at
+	  <http://www.cs.utexas.edu/users/kharker/linux-laptop/>.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about this class of network devices. If you say Y, you
+	  will be asked for your specific device in the following questions.
+
+config ATP
+	tristate "AT-LAN-TEC/RealTek pocket adapter support"
+	depends on NET_POCKET && ISA && X86
+	---help---
+	  This is a network (Ethernet) device which attaches to your parallel
+	  port. Read <file:drivers/net/atp.c> as well as the Ethernet-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>, if you
+	  want to use this.  If you intend to use this driver, you should have
+	  said N to the "Parallel printer support", because the two drivers
+	  don't like each other.
+
+	  If you want to compile this driver as a module however ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called atp.o.
+
+config DE600
+	tristate "D-Link DE600 pocket adapter support"
+	depends on NET_POCKET && ISA
+	---help---
+	  This is a network (Ethernet) device which attaches to your parallel
+	  port. Read <file:Documentation/networking/DLINK.txt> as well as the
+	  Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, if you want to use
+	  this. It is possible to have several devices share a single parallel
+	  port and it is safe to compile the corresponding drivers into the
+	  kernel.
+
+	  If you want to compile this driver as a module however ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called de600.o.
+
+config DE620
+	tristate "D-Link DE620 pocket adapter support"
+	depends on NET_POCKET && ISA
+	---help---
+	  This is a network (Ethernet) device which attaches to your parallel
+	  port. Read <file:Documentation/networking/DLINK.txt> as well as the
+	  Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, if you want to use
+	  this. It is possible to have several devices share a single parallel
+	  port and it is safe to compile the corresponding drivers into the
+	  kernel.
+
+	  If you want to compile this driver as a module however ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called de620.o.
+
+config SGISEEQ
+	bool "SGI Seeq ethernet controller support"
+	depends on NET_ETHERNET && SGI_IP22
+	help
+	  Say Y here if you have an Seeq based Ethernet network card. This is
+	  used in many Silicon Graphics machines.
+
+config DECLANCE
+	bool "DEC LANCE ethernet controller support"
+	depends on NET_ETHERNET && DECSTATION
+	help
+	  This driver is for the series of Ethernet controllers produced by
+	  DEC (now Compaq) based on the AMD Lance chipset, including the
+	  DEPCA series.  (This chipset is better known via the NE2100 cards.)
+
+config BAGETLANCE
+	tristate "Baget AMD LANCE support"
+	depends on NET_ETHERNET && BAGET_MIPS
+	help
+	  Say Y to enable kernel support for AMD Lance Ethernet cards on the
+	  MIPS-32-based Baget embedded system.  This chipset is better known
+	  via the NE2100 cards.
+
+endmenu
+
+#
+#	Gigabit Ethernet
+#
+
+menu "Ethernet (1000 Mbit)"
+	depends on NETDEVICES
+
+config ACENIC
+	tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support"
+	depends on PCI
+	---help---
+	  Say Y here if you have an Alteon AceNIC, 3Com 3C985(B), NetGear
+	  GA620, SGI Gigabit or Farallon PN9000-SX PCI Gigabit Ethernet
+	  adapter. The driver allows for using the Jumbo Frame option (9000
+	  bytes/frame) however it requires that your switches can handle this
+	  as well. To enable Jumbo Frames, add `mtu 9000' to your ifconfig
+	  line.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called acenic.o.
+
+config ACENIC_OMIT_TIGON_I
+	bool "Omit support for old Tigon I based AceNICs"
+	depends on ACENIC
+	help
+	  Say Y here if you only have Tigon II based AceNICs and want to leave
+	  out support for the older Tigon I based cards which are no longer
+	  being sold (ie. the original Alteon AceNIC and 3Com 3C985 (non B
+	  version)).  This will reduce the size of the driver object by
+	  app. 100KB.  If you are not sure whether your card is a Tigon I or a
+	  Tigon II, say N here.
+
+	  The safe and default value for this is N.
+
+config DL2K
+	tristate "D-Link DL2000-based Gigabit Ethernet support"
+	depends on PCI
+	help
+	  This driver supports D-Link 2000-based gigabit ethernet cards, which
+	  includes
+	  D-Link DGE-550T Gigabit Ethernet Adapter.
+	  D-Link DL2000-based Gigabit Ethernet Adapter.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called dl2k.o.
+
+config E1000
+	tristate "Intel(R) PRO/1000 Gigabit Ethernet support"
+	depends on PCI
+	---help---
+	  This driver supports Intel(R) PRO/1000 gigabit ethernet family of
+	  adapters, which includes:
+
+	  Controller  Adapter Name                         Board IDs
+	  ----------  ------------                         ---------
+	  82542       PRO/1000 Gigabit Server Adapter      700262-xxx,
+	  717037-xxx
+	  82543       PRO/1000 F Server Adapter            738640-xxx,
+	  A38888-xxx
+	  82543       PRO/1000 T Server Adapter            A19845-xxx,
+	  A33948-xxx
+	  82544       PRO/1000 XT Server Adapter           A51580-xxx
+	  82544       PRO/1000 XF Server Adapter           A50484-xxx
+	  82544       PRO/1000 T Desktop Adapter           A62947-xxx
+	  82540       PRO/1000 MT Desktop Adapter          A78408-xxx
+	  82545       PRO/1000 MT Server Adapter           A92165-xxx
+	  82546       PRO/1000 MT Dual Port Server Adapter A92111-xxx
+	  82545       PRO/1000 MF Server Adapter           A91622-xxx
+	  82545       PRO/1000 MF Server Adapter(LX)       A91624-xxx
+	  82546       PRO/1000 MF Dual Port Server Adapter A91620-xxx 
+
+	  For more information on how to identify your adapter, go to the
+	  Adapter & Driver ID Guide at:
+
+	  <http://support.intel.com/support/network/adapter/pro100/21397.htm>
+
+	  For general information and support, go to the Intel support
+	  website at:
+
+	  <http://support.intel.com>
+
+	  More specific information on configuring the driver is in 
+	  <file:Documentation/networking/e1000.txt>.
+
+	  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 e1000.o.  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>.
+
+config E1000_NAPI
+	bool "Use Rx Polling (NAPI) (EXPERIMENTAL)"
+	depends on E1000 && EXPERIMENTAL
+
+config MYRI_SBUS
+	tristate "MyriCOM Gigabit Ethernet support"
+	depends on SBUS
+	help
+	  This driver supports MyriCOM Sbus gigabit Ethernet cards.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called myri_sbus.o.
+
+config NS83820
+	tristate "National Semiconduct DP83820 support"
+	depends on PCI
+	help
+	  This is a driver for the National Semiconductor DP83820 series
+	  of gigabit ethernet MACs.  Cards using this chipset include
+	  the D-Link DGE-500T, PureData's PDP8023Z-TG, SMC's SMC9462TX,
+	  SOHO-GA2000T, SOHO-GA2500T.  The driver supports the use of
+	  zero copy.
+
+config HAMACHI
+	tristate "Packet Engines Hamachi GNIC-II support"
+	depends on PCI
+	help
+	  If you have a Gigabit Ethernet card of this type, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called hamachi.o.
+
+config YELLOWFIN
+	tristate "Packet Engines Yellowfin Gigabit-NIC support (EXPERIMENTAL)"
+	depends on PCI && EXPERIMENTAL
+	---help---
+	  Say Y here if you have a Packet Engines G-NIC PCI Gigabit Ethernet
+	  adapter or the SYM53C885 Ethernet controller. The Gigabit adapter is
+	  used by the Beowulf Linux cluster project.  See
+	  <http://cesdis.gsfc.nasa.gov/linux/drivers/yellowfin.html> for more
+	  information about this driver in particular and Beowulf in general.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called yellowfin.o.
+
+config SK98LIN
+	tristate "SysKonnect SK-98xx support"
+	depends on PCI
+	---help---
+	  Say Y here if you have a SysKonnect SK-98xx Gigabit Ethernet Server
+	  Adapter. The following adapters are supported by this driver:
+	  - SK-9841 (single link 1000Base-LX)
+	  - SK-9842 (dual link   1000Base-LX)
+	  - SK-9843 (single link 1000Base-SX)
+	  - SK-9844 (dual link   1000Base-SX)
+	  - SK-9821 (single link 1000Base-T)
+	  - SK-9822 (dual link   1000Base-T)
+	  - SK-9861 (single link Volition connector)
+	  - SK-9862 (dual link   Volition connector)
+	  The driver also supports the following adapters from Allied Telesyn:
+	  - AT2970...
+
+	  The dual link adapters support a link-failover feature.  Read
+	  <file:Documentation/networking/sk98lin.txt> for information about
+	  optional driver parameters.
+	  Questions concerning this driver may be addressed to:
+	  linux@syskonnect.de
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called sk98lin.o.
+
+config TIGON3
+	tristate "Broadcom Tigon3 support"
+	depends on PCI
+	help
+	  This driver supports Broadcom Tigon3 based gigabit Ethernet cards.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called tg3.o.
+
+endmenu
+
+config VETH
+	tristate "iSeries Virtual Ethernet driver support"
+	depends on NETDEVICES && PPC_ISERIES
+
+config FDDI
+	bool "FDDI driver support"
+	depends on NETDEVICES
+	help
+	  Fiber Distributed Data Interface is a high speed local area network
+	  design; essentially a replacement for high speed Ethernet. FDDI can
+	  run over copper or fiber. If you are connected to such a network and
+	  want a driver for the FDDI card in your computer, say Y here (and
+	  then also Y to the driver for your FDDI card, below). Most people
+	  will say N.
+
+config DEFXX
+	tristate "Digital DEFEA and DEFPA adapter support"
+	depends on FDDI && (PCI || EISA)
+	help
+	  This is support for the DIGITAL series of EISA (DEFEA) and PCI
+	  (DEFPA) controllers which can connect you to a local FDDI network.
+
+config SKFP
+	tristate "SysKonnect FDDI PCI support"
+	depends on FDDI && PCI
+	---help---
+	  Say Y here if you have a SysKonnect FDDI PCI adapter.
+	  The following adapters are supported by this driver:
+	  - SK-5521 (SK-NET FDDI-UP)
+	  - SK-5522 (SK-NET FDDI-UP DAS)
+	  - SK-5541 (SK-NET FDDI-FP)
+	  - SK-5543 (SK-NET FDDI-LP)
+	  - SK-5544 (SK-NET FDDI-LP DAS)
+	  - SK-5821 (SK-NET FDDI-UP64)
+	  - SK-5822 (SK-NET FDDI-UP64 DAS)
+	  - SK-5841 (SK-NET FDDI-FP64)
+	  - SK-5843 (SK-NET FDDI-LP64)
+	  - SK-5844 (SK-NET FDDI-LP64 DAS)
+	  - Netelligent 100 FDDI DAS Fibre SC
+	  - Netelligent 100 FDDI SAS Fibre SC
+	  - Netelligent 100 FDDI DAS UTP
+	  - Netelligent 100 FDDI SAS UTP
+	  - Netelligent 100 FDDI SAS Fibre MIC
+
+	  Read <file:Documentation/networking/skfp.txt> for information about
+	  the driver.
+
+	  Questions concerning this driver can be addressed to:
+	  linux@syskonnect.de
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called skfp.o.
+
+config HIPPI
+	bool "HIPPI driver support (EXPERIMENTAL)"
+	depends on NETDEVICES && EXPERIMENTAL && INET
+	help
+	  HIgh Performance Parallel Interface (HIPPI) is a 800Mbit/sec and
+	  1600Mbit/sec dual-simplex switched or point-to-point network. HIPPI
+	  can run over copper (25m) or fiber (300m on multi-mode or 10km on
+	  single-mode). HIPPI networks are commonly used for clusters and to
+	  connect to super computers. If you are connected to a HIPPI network
+	  and have a HIPPI network card in your computer that you want to use
+	  under Linux, say Y here (you must also remember to enable the driver
+	  for your HIPPI card below). Most people will say N here.
+
+config ROADRUNNER
+	tristate "Essential RoadRunner HIPPI PCI adapter support (EXPERIMENTAL)"
+	depends on HIPPI && PCI
+	help
+	  Say Y here if this is your PCI HIPPI network card.
+
+	  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 rrunner.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config ROADRUNNER_LARGE_RINGS
+	bool "Use large TX/RX rings (EXPERIMENTAL)"
+	depends on ROADRUNNER
+	help
+	  If you say Y here, the RoadRunner driver will preallocate up to 2 MB
+	  of additional memory to allow for fastest operation, both for
+	  transmitting and receiving. This memory cannot be used by any other
+	  kernel code or by user space programs. Say Y here only if you have
+	  the memory.
+
+config PLIP
+	tristate "PLIP (parallel port) support"
+	depends on NETDEVICES && PARPORT
+	---help---
+	  PLIP (Parallel Line Internet Protocol) is used to create a
+	  reasonably fast mini network consisting of two (or, rarely, more)
+	  local machines.  A PLIP link from a Linux box is a popular means to
+	  install a Linux distribution on a machine which doesn't have a
+	  CD-ROM drive (a minimal system has to be transferred with floppies
+	  first). The kernels on both machines need to have this PLIP option
+	  enabled for this to work.
+
+	  The PLIP driver has two modes, mode 0 and mode 1.  The parallel
+	  ports (the connectors at the computers with 25 holes) are connected
+	  with "null printer" or "Turbo Laplink" cables which can transmit 4
+	  bits at a time (mode 0) or with special PLIP cables, to be used on
+	  bidirectional parallel ports only, which can transmit 8 bits at a
+	  time (mode 1); you can find the wiring of these cables in
+	  <file:Documentation/networking/PLIP.txt>.  The cables can be up to
+	  15m long.  Mode 0 works also if one of the machines runs DOS/Windows
+	  and has some PLIP software installed, e.g. the Crynwr PLIP packet
+	  driver (<http://oak.oakland.edu/simtel.net/msdos/pktdrvr-pre.html>)
+	  and winsock or NCSA's telnet.
+
+	  If you want to use PLIP, say Y and read the PLIP mini-HOWTO as well
+	  as the NET-3-HOWTO, both available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Note that the PLIP
+	  protocol has been changed and this PLIP driver won't work together
+	  with the PLIP support in Linux versions 1.0.x.  This option enlarges
+	  your kernel by about 8 KB.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>.  The module will be
+	  called plip.o.  If unsure, say Y or M, in case you buy a laptop
+	  later.
+
+config PPP
+	tristate "PPP (point-to-point protocol) support"
+	depends on NETDEVICES
+	---help---
+	  PPP (Point to Point Protocol) is a newer and better SLIP.  It serves
+	  the same purpose: sending Internet traffic over telephone (and other
+	  serial) lines.  Ask your access provider if they support it, because
+	  otherwise you can't use it; most Internet access providers these
+	  days support PPP rather than SLIP.
+
+	  To use PPP, you need an additional program called pppd as described
+	  in the PPP-HOWTO, available at
+	  <http://www.linuxdoc.org/docs.html#howto>.  Make sure that you have
+	  the version of pppd recommended in <file:Documentation/Changes>.
+	  The PPP option enlarges your kernel by about 16 KB.
+
+	  There are actually two versions of PPP: the traditional PPP for
+	  asynchronous lines, such as regular analog phone lines, and
+	  synchronous PPP which can be used over digital ISDN lines for
+	  example.  If you want to use PPP over phone lines or other
+	  asynchronous serial lines, you need to say Y (or M) here and also to
+	  the next option, "PPP support for async serial ports".  For PPP over
+	  synchronous lines, you should say Y (or M) here and to "Support
+	  synchronous PPP", below.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you said Y to "Version information on all symbols" above, then
+	  you cannot compile the PPP driver into the kernel; you can then only
+	  compile it as a module.  The module will be called ppp_generic.o.
+	  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>.
+
+config PPP_MULTILINK
+	bool "PPP multilink support (EXPERIMENTAL)"
+	depends on PPP && EXPERIMENTAL
+	help
+	  PPP multilink is a protocol (defined in RFC 1990) which allows you
+	  to combine several (logical or physical) lines into one logical PPP
+	  connection, so that you can utilize your full bandwidth.
+
+	  This has to be supported at the other end as well and you need a
+	  version of the pppd daemon which understands the multilink protocol.
+
+	  If unsure, say N.
+
+config PPP_FILTER
+	bool "PPP filtering"
+	depends on PPP && FILTER
+	help
+	  Say Y here if you want to be able to filter the packets passing over
+	  PPP interfaces.  This allows you to control which packets count as
+	  activity (i.e. which packets will reset the idle timer or bring up
+	  a demand-dialled link) and which packets are to be dropped entirely.
+	  You need to say Y here if you wish to use the pass-filter and
+	  active-filter options to pppd.
+
+	  If unsure, say N.
+
+config PPP_ASYNC
+	tristate "PPP support for async serial ports"
+	depends on PPP
+	---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
+	  a modem (not a synchronous or ISDN modem) to contact your ISP, you
+	  need this option.
+
+	  This code is also available as a module (code which can be inserted
+	  into and removed from the running kernel).  If you want to compile
+	  it as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config PPP_SYNC_TTY
+	tristate "PPP support for sync tty ports"
+	depends on PPP
+	help
+	  Say Y (or M) here if you want to be able to use PPP over synchronous
+	  (HDLC) tty devices, such as the SyncLink adapter. These devices
+	  are often used for high-speed leased lines like T1/E1.
+
+	  This code is also available as a module (code which can be inserted
+	  into and removed from the running kernel).  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config PPP_DEFLATE
+	tristate "PPP Deflate compression"
+	depends on PPP
+	---help---
+	  Support for the Deflate compression method for PPP, which uses the
+	  Deflate algorithm (the same algorithm that gzip uses) to compress
+	  each PPP packet before it is sent over the wire.  The machine at the
+	  other end of the PPP link (usually your ISP) has to support the
+	  Deflate compression method as well for this to be useful.  Even if
+	  they don't support it, it is safe to say Y here.
+
+	  This code is also available as a module (code which can be inserted
+	  into and removed from the running kernel).  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config PPP_BSDCOMP
+	tristate "PPP BSD-Compress compression"
+	depends on PPP
+	---help---
+	  Support for the BSD-Compress compression method for PPP, which uses
+	  the LZW compression method to compress each PPP packet before it is
+	  sent over the wire. The machine at the other end of the PPP link
+	  (usually your ISP) has to support the BSD-Compress compression
+	  method as well for this to be useful. Even if they don't support it,
+	  it is safe to say Y here.
+
+	  The PPP Deflate compression method ("PPP Deflate compression",
+	  above) is preferable to BSD-Compress, because it compresses better
+	  and is patent-free.
+
+	  Note that the BSD compression code will always be compiled as a
+	  module; it is called bsd_comp.o and will show up in the directory
+	  modules once you have said "make modules". If unsure, say N.
+
+config PPPOE
+	tristate "PPP over Ethernet (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && PPP
+	help
+	  Support for PPP over Ethernet.
+
+	  This driver requires a specially patched pppd daemon.  The patch to
+	  pppd, along with binaries of a patched pppd package can be found at:
+	  <http://www.shoshin.uwaterloo.ca/~mostrows/>.
+
+config PPPOATM
+	tristate "PPP over ATM"
+	depends on ATM && PPP
+	help
+	  Support PPP (Point to Point Protocol) encapsulated in ATM frames.
+	  This implementation does not yet comply with section 8 of RFC2364,
+	  which can lead to bad results if the ATM peer loses state and
+	  changes its encapsulation unilaterally.
+
+config SLIP
+	tristate "SLIP (serial line) support"
+	depends on NETDEVICES
+	---help---
+	  Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
+	  connect to your Internet service provider or to connect to some
+	  other local Unix box or if you want to configure your Linux box as a
+	  Slip/CSlip server for other people to dial in. SLIP (Serial Line
+	  Internet Protocol) is a protocol used to send Internet traffic over
+	  serial connections such as telephone lines or null modem cables;
+	  nowadays, the protocol PPP is more commonly used for this same
+	  purpose.
+
+	  Normally, your access provider has to support SLIP in order for you
+	  to be able to use it, but there is now a SLIP emulator called SLiRP
+	  around (available from
+	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
+	  allows you to use SLIP over a regular dial up shell connection. If
+	  you plan to use SLiRP, make sure to say Y to CSLIP, below. The
+	  NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, explains how to
+	  configure SLIP. Note that you don't need this option if you just
+	  want to run term (term is a program which gives you almost full
+	  Internet connectivity if you have a regular dial up shell account on
+	  some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>). SLIP
+	  support will enlarge your kernel by about 4 KB. If unsure, say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> as well as
+	  <file:Documentation/networking/net-modules.txt>. The module will be
+	  called slip.o.
+
+config SLIP_COMPRESSED
+	bool "CSLIP compressed headers"
+	depends on SLIP
+	---help---
+	  This protocol is faster than SLIP because it uses compression on the
+	  TCP/IP headers (not on the data itself), but it has to be supported
+	  on both ends. Ask your access provider if you are not sure and
+	  answer Y, just in case. You will still be able to use plain SLIP. If
+	  you plan to use SLiRP, the SLIP emulator (available from
+	  <ftp://ibiblio.org/pub/Linux/system/network/serial/>) which
+	  allows you to use SLIP over a regular dial up shell connection, you
+	  definitely want to say Y here. The NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, explains how to configure
+	  CSLIP. This won't enlarge your kernel.
+
+config SLIP_SMART
+	bool "Keepalive and linefill"
+	depends on SLIP
+	help
+	  Adds additional capabilities to the SLIP driver to support the
+	  RELCOM line fill and keepalive monitoring. Ideal on poor quality
+	  analogue lines.
+
+config SLIP_MODE_SLIP6
+	bool "Six bit SLIP encapsulation"
+	depends on SLIP
+	help
+	  Just occasionally you may need to run IP over hostile serial
+	  networks that don't pass all control characters or are only seven
+	  bit. Saying Y here adds an extra mode you can use with SLIP:
+	  "slip6". In this mode, SLIP will only send normal ASCII symbols over
+	  the serial device. Naturally, this has to be supported at the other
+	  end of the link as well. It's good enough, for example, to run IP
+	  over the async ports of a Camtec JNT Pad. If unsure, say N.
+
+
+menu "Wireless LAN (non-hamradio)"
+	depends on NETDEVICES
+
+config NET_RADIO
+	bool "Wireless LAN (non-hamradio)"
+	---help---
+	  Support for wireless LANs and everything having to do with radio,
+	  but not with amateur radio or FM broadcasting.
+
+	  Saying Y here also enables the Wireless Extensions (creates
+	  /proc/net/wireless and enables ifconfig access). The Wireless
+	  Extension is a generic API allowing a driver to expose to the user
+	  space configuration and statistics specific to common Wireless LANs.
+	  The beauty of it is that a single set of tool can support all the
+	  variations of Wireless LANs, regardless of their type (as long as
+	  the driver supports Wireless Extension). Another advantage is that
+	  these parameters may be changed on the fly without restarting the
+	  driver (or Linux). If you wish to use Wireless Extensions with
+	  wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch
+	  the tools from
+	  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
+
+	  Some user-level drivers for scarab devices which don't require
+	  special kernel support are available from
+	  <ftp://shadow.cabi.net/pub/Linux/>.
+
+config STRIP
+	tristate "STRIP (Metricom starmode radio IP)"
+	depends on NET_RADIO && INET
+	---help---
+	  Say Y if you have a Metricom radio and intend to use Starmode Radio
+	  IP. STRIP is a radio protocol developed for the MosquitoNet project
+	  (on the WWW at <http://mosquitonet.stanford.edu/>) to send Internet
+	  traffic using Metricom radios.  Metricom radios are small, battery
+	  powered, 100kbit/sec packet radio transceivers, about the size and
+	  weight of a cellular telephone. (You may also have heard them called
+	  "Metricom modems" but we avoid the term "modem" because it misleads
+	  many people into thinking that you can plug a Metricom modem into a
+	  phone line and use it as a modem.)
+
+	  You can use STRIP on any Linux machine with a serial port, although
+	  it is obviously most useful for people with laptop computers. If you
+	  think you might get a Metricom radio in the future, there is no harm
+	  in saying Y to STRIP now, except that it makes the kernel a bit
+	  bigger.
+
+	  You can also compile this as a module ( = code which can be inserted
+	  in and removed from the running kernel whenever you want), say M
+	  here and read <file:Documentation/modules.txt>.  The module will be
+	  called strip.o.
+
+config ARLAN
+	tristate "Aironet Arlan 655 & IC2200 DS support"
+	depends on NET_RADIO
+	---help---
+	  Aironet makes Arlan, a class of wireless LAN adapters. These use the
+	  www.Telxon.com chip, which is also used on several similar cards.
+	  This driver is tested on the 655 and IC2200 series cards. Look at
+	  <http://www.ylenurme.ee/~elmer/655/> for the latest information.
+
+	  The driver is built as two modules, arlan and arlan-proc. The latter
+	  is the /proc interface and is not needed most of time.
+
+	  On some computers the card ends up in non-valid state after some
+	  time. Use a ping-reset script to clear it.
+
+config AIRONET4500
+	tristate "Aironet 4500/4800 series adapters"
+	depends on NET_RADIO
+	---help---
+	  www.aironet.com (recently bought by Cisco) makes these 802.11 DS
+	  adapters.  Driver by Elmer Joandi (elmer@ylenurme.ee).
+
+	  Say Y here if you have such an adapter, and then say Y below to
+	  the option that applies to your particular type of card (PCI, ISA,
+	  or PCMCIA).
+
+	  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 aironet4500_core.o. 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>.
+
+	  quick config parameters:
+	  	SSID=tsunami - "The Password"
+	  	adhoc=1  	there are no Access Points around
+	  	master=1 	Adhoc master (the one who creates network
+	  sync)
+	  	slave=1		Adhoc slave (btw, it is still forming own net
+	  			sometimes, and has problems with firmware...
+	  			change IbssJoinNetTimeout from /proc...)
+	  	channel=1..? 	meaningful in adhoc mode
+
+	  If you have problems with screwing up card, both_bap_lock=1 is a
+	  conservative value (performance hit 15%).
+
+	  All other parameters can be set via the proc interface.
+
+config AIRONET4500_NONCS
+	tristate "Aironet 4500/4800 ISA/PCI/PNP/365 support "
+	depends on AIRONET4500
+	help
+	  If you have an ISA, PCI or PCMCIA Aironet 4500/4800 wireless LAN
+	  card, say Y here, and then also to the options below that apply
+	  to you.
+
+	  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 aironet4500_card.o.  If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config AIRONET4500_PNP
+	bool "Aironet 4500/4800 PNP support "
+	depends on AIRONET4500_NONCS
+	help
+	  If you have an ISA Aironet 4500/4800 card which you want to use in
+	  PnP (Plug and Play) mode, say Y here. This is the recommended mode
+	  for ISA cards. Remember however to enable the PnP jumper on the
+	  board if you say Y here.
+
+config AIRONET4500_PCI
+	bool "Aironet 4500/4800 PCI support "
+	depends on AIRONET4500_NONCS && PCI
+	help
+	  If you have an PCI Aironet 4500/4800 card, say Y here.
+
+config AIRONET4500_ISA
+	bool "Aironet 4500/4800 ISA broken support (EXPERIMENTAL)"
+	depends on AIRONET4500_NONCS && EXPERIMENTAL
+	help
+	  If you have an ISA Aironet 4500/4800 card which you want to run in
+	  non-PnP mode, say Y here. This is not recommended and does not work
+	  correctly at this point. Say N.
+
+config AIRONET4500_I365
+	bool "Aironet 4500/4800 I365 broken support (EXPERIMENTAL)"
+	depends on AIRONET4500_NONCS && EXPERIMENTAL
+	help
+	  If you have a PCMCIA Aironet 4500/4800 card which you want to use
+	  without the standard PCMCIA cardservices provided by the pcmcia-cs
+	  package, say Y here. This is not recommended, so say N.
+
+config AIRONET4500_PROC
+	tristate "Aironet 4500/4800 PROC interface "
+	depends on AIRONET4500 && m
+	---help---
+	  If you say Y here (and to the "/proc file system" below), you will
+	  be able to configure your Aironet card via the
+	  /proc/sys/aironet4500 interface.
+
+	  Additional info: look in <file:drivers/net/aironet4500_rid.c>.
+
+	  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 aironet4500_proc.o. If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  NOTE: the proc interface uses a lot of memory, so it is recommended
+	  to compile it as a module and remove the module after
+	  configuration.
+
+# New directory for Wireless LAN devices - cards above will move there
+source "drivers/net/wireless/Kconfig"
+
+endmenu
+
+source "drivers/net/tokenring/Kconfig"
+
+config NET_FC
+	bool "Fibre Channel driver support"
+	depends on NETDEVICES
+	help
+	  Fibre Channel is a high speed serial protocol mainly used to connect
+	  large storage devices to the computer; it is compatible with and
+	  intended to replace SCSI.
+
+	  If you intend to use Fibre Channel, you need to have a Fibre channel
+	  adaptor card in your computer; say Y here and to the driver for your
+	  adaptor below. You also should have said Y to "SCSI support" and
+	  "SCSI generic support".
+
+config IPHASE5526
+	tristate "Interphase 5526 Tachyon chipset based adapter support"
+	depends on NET_FC && SCSI && PCI
+	help
+	  Say Y here if you have a Fibre Channel adaptor of this kind.
+
+	  The 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 iph5526.o. For general information about
+	  modules read <file:Documentation/modules.txt>.
+
+config RCPCI
+	tristate "Red Creek Hardware VPN (EXPERIMENTAL)"
+	depends on NETDEVICES && EXPERIMENTAL && PCI
+	help
+	  This is a driver for hardware which provides a Virtual Private
+	  Network (VPN). Say Y if you have it.
+
+	  This code is also available as a module called rcpci.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SHAPER
+	tristate "Traffic Shaper (EXPERIMENTAL)"
+	depends on NETDEVICES && EXPERIMENTAL
+	---help---
+	  The traffic shaper is a virtual network device that allows you to
+	  limit the rate of outgoing data flow over some other network device.
+	  The traffic that you want to slow down can then be routed through
+	  these virtual devices. See
+	  <file:Documentation/networking/shaper.txt> for more information.
+
+	  An alternative to this traffic shaper is the experimental
+	  Class-Based Queueing (CBQ) scheduling support which you get if you
+	  say Y to "QoS and/or fair queueing" above.
+
+	  To set up and configure shaper devices, you need the shapecfg
+	  program, available from <ftp://shadow.cabi.net/pub/Linux/> in the
+	  shaper package.
+
+	  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 shaper.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+source "drivers/net/wan/Kconfig"
+
+source "drivers/net/pcmcia/Kconfig"
+
diff -Nru a/drivers/net/Space.c b/drivers/net/Space.c
--- a/drivers/net/Space.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/net/Space.c	Wed Oct 30 16:44:21 2002
@@ -54,7 +54,6 @@
 extern int ne_probe(struct net_device *dev);
 extern int hp_probe(struct net_device *dev);
 extern int hp_plus_probe(struct net_device *dev);
-extern int znet_probe(struct net_device *);
 extern int express_probe(struct net_device *);
 extern int eepro_probe(struct net_device *);
 extern int el3_probe(struct net_device *);
@@ -269,9 +268,6 @@
 #endif
 #ifdef CONFIG_ETH16I
 	{eth16i_probe, 0},	/* ICL EtherTeam 16i/32 */
-#endif
-#ifdef CONFIG_ZNET		/* Zenith Z-Note and some IBM Thinkpads. */
-	{znet_probe, 0},
 #endif
 #ifdef CONFIG_EEXPRESS		/* Intel EtherExpress */
 	{express_probe, 0},
diff -Nru a/drivers/net/appletalk/Config.help b/drivers/net/appletalk/Config.help
--- a/drivers/net/appletalk/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,72 +0,0 @@
-CONFIG_DEV_APPLETALK
-  AppleTalk is the protocol that Apple computers can use to communicate
-  on a network.  If your Linux box is connected to such a network, and wish
-  to do IP over it, or you have a LocalTalk card and wish to use it to
-  connect to the AppleTalk network, say Y.
- 
-CONFIG_IPDDP
-  This allows IP networking for users who only have AppleTalk
-  networking available. This feature is experimental. With this
-  driver, you can encapsulate IP inside AppleTalk (e.g. if your Linux
-  box is stuck on an AppleTalk only network) or decapsulate (e.g. if
-  you want your Linux box to act as an Internet gateway for a zoo of
-  AppleTalk connected Macs). Please see the file
-  <file:Documentation/networking/ipddp.txt> for more information.
-
-  If you say Y here, the AppleTalk-IP support will be compiled into
-  the kernel. In this case, you can either use encapsulation or
-  decapsulation, but not both. With the following two questions, you
-  decide which one you want.
-
-  If you say M here, the AppleTalk-IP support will be compiled as a
-  module ( = code which can be inserted in and removed from the
-  running kernel whenever you want, read
-  <file:Documentation/modules.txt>).  The module is called ipddp.o.
-  In this case, you will be able to use both encapsulation and
-  decapsulation simultaneously, by loading two copies of the module
-  and specifying different values for the module option ipddp_mode.
-
-CONFIG_IPDDP_ENCAP
-  If you say Y here, the AppleTalk-IP code will be able to encapsulate
-  IP packets inside AppleTalk frames; this is useful if your Linux box
-  is stuck on an AppleTalk network (which hopefully contains a
-  decapsulator somewhere). Please see
-  <file:Documentation/networking/ipddp.txt> for more information. If
-  you said Y to "AppleTalk-IP driver support" above and you say Y
-  here, then you cannot say Y to "AppleTalk-IP to IP Decapsulation
-  support", below.
-
-CONFIG_IPDDP_DECAP
-  If you say Y here, the AppleTalk-IP code will be able to decapsulate
-  AppleTalk-IP frames to IP packets; this is useful if you want your
-  Linux box to act as an Internet gateway for an AppleTalk network.
-  Please see <file:Documentation/networking/ipddp.txt> for more
-  information.  If you said Y to "AppleTalk-IP driver support" above
-  and you say Y here, then you cannot say Y to "IP to AppleTalk-IP
-  Encapsulation support", above.
-
-CONFIG_LTPC
-  This allows you to use the AppleTalk PC card to connect to LocalTalk
-  networks. The card is also known as the Farallon PhoneNet PC card.
-  If you are in doubt, this card is the one with the 65C02 chip on it.
-  You also need version 1.3.3 or later of the netatalk package.
-  This driver is experimental, which means that it may not work.
-  See the file <file:Documentation/networking/ltpc.txt>.
-
-CONFIG_COPS
-  This allows you to use COPS AppleTalk cards to connect to LocalTalk
-  networks. You also need version 1.3.3 or later of the netatalk
-  package. This driver is experimental, which means that it may not
-  work. This driver will only work if you choose "AppleTalk DDP"
-  networking support, above.
-  Please read the file <file:Documentation/networking/cops.txt>.
-
-CONFIG_COPS_DAYNA
-  Support COPS compatible cards with Dayna style firmware (Dayna
-  DL2000/ Daynatalk/PC (half length), COPS LT-95, Farallon PhoneNET PC
-  III, Farallon PhoneNET PC II).
-
-CONFIG_COPS_TANGENT
-  Support COPS compatible cards with Tangent style firmware (Tangent
-  ATB_II, Novell NL-1000, Daystar Digital LT-200.
-
diff -Nru a/drivers/net/appletalk/Config.in b/drivers/net/appletalk/Config.in
--- a/drivers/net/appletalk/Config.in	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,19 +0,0 @@
-#
-# Appletalk driver configuration
-#
-
-dep_mbool 'Appletalk interfaces support' CONFIG_DEV_APPLETALK $CONFIG_ATALK
-if [ "$CONFIG_DEV_APPLETALK" = "y" ]; then
-   tristate '  Apple/Farallon LocalTalk PC support' CONFIG_LTPC
-   tristate '  COPS LocalTalk PC support' CONFIG_COPS
-   if [ "$CONFIG_COPS" != "n" ]; then
-      bool '    Dayna firmware support' CONFIG_COPS_DAYNA
-      bool '    Tangent firmware support' CONFIG_COPS_TANGENT
-   fi
-   dep_tristate '  Appletalk-IP driver support' CONFIG_IPDDP $CONFIG_ATALK
-   if [ "$CONFIG_IPDDP" != "n" ]; then
-      bool '    IP to Appletalk-IP Encapsulation support' CONFIG_IPDDP_ENCAP
-      bool '    Appletalk-IP to IP Decapsulation support' CONFIG_IPDDP_DECAP
-   fi
-fi
-
diff -Nru a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/appletalk/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,100 @@
+#
+# Appletalk driver configuration
+#
+config DEV_APPLETALK
+	bool "Appletalk interfaces support"
+	depends on ATALK
+	help
+	  AppleTalk is the protocol that Apple computers can use to communicate
+	  on a network.  If your Linux box is connected to such a network, and wish
+	  to do IP over it, or you have a LocalTalk card and wish to use it to
+	  connect to the AppleTalk network, say Y.
+	  
+
+config LTPC
+	tristate "Apple/Farallon LocalTalk PC support"
+	depends on DEV_APPLETALK
+	help
+	  This allows you to use the AppleTalk PC card to connect to LocalTalk
+	  networks. The card is also known as the Farallon PhoneNet PC card.
+	  If you are in doubt, this card is the one with the 65C02 chip on it.
+	  You also need version 1.3.3 or later of the netatalk package.
+	  This driver is experimental, which means that it may not work.
+	  See the file <file:Documentation/networking/ltpc.txt>.
+
+config COPS
+	tristate "COPS LocalTalk PC support"
+	depends on DEV_APPLETALK
+	help
+	  This allows you to use COPS AppleTalk cards to connect to LocalTalk
+	  networks. You also need version 1.3.3 or later of the netatalk
+	  package. This driver is experimental, which means that it may not
+	  work. This driver will only work if you choose "AppleTalk DDP"
+	  networking support, above.
+	  Please read the file <file:Documentation/networking/cops.txt>.
+
+config COPS_DAYNA
+	bool "Dayna firmware support"
+	depends on COPS
+	help
+	  Support COPS compatible cards with Dayna style firmware (Dayna
+	  DL2000/ Daynatalk/PC (half length), COPS LT-95, Farallon PhoneNET PC
+	  III, Farallon PhoneNET PC II).
+
+config COPS_TANGENT
+	bool "Tangent firmware support"
+	depends on COPS
+	help
+	  Support COPS compatible cards with Tangent style firmware (Tangent
+	  ATB_II, Novell NL-1000, Daystar Digital LT-200.
+
+config IPDDP
+	tristate "Appletalk-IP driver support"
+	depends on DEV_APPLETALK && ATALK
+	---help---
+	  This allows IP networking for users who only have AppleTalk
+	  networking available. This feature is experimental. With this
+	  driver, you can encapsulate IP inside AppleTalk (e.g. if your Linux
+	  box is stuck on an AppleTalk only network) or decapsulate (e.g. if
+	  you want your Linux box to act as an Internet gateway for a zoo of
+	  AppleTalk connected Macs). Please see the file
+	  <file:Documentation/networking/ipddp.txt> for more information.
+
+	  If you say Y here, the AppleTalk-IP support will be compiled into
+	  the kernel. In this case, you can either use encapsulation or
+	  decapsulation, but not both. With the following two questions, you
+	  decide which one you want.
+
+	  If you say M here, the AppleTalk-IP support will be compiled as a
+	  module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want, read
+	  <file:Documentation/modules.txt>).  The module is called ipddp.o.
+	  In this case, you will be able to use both encapsulation and
+	  decapsulation simultaneously, by loading two copies of the module
+	  and specifying different values for the module option ipddp_mode.
+
+config IPDDP_ENCAP
+	bool "IP to Appletalk-IP Encapsulation support"
+	depends on IPDDP
+	help
+	  If you say Y here, the AppleTalk-IP code will be able to encapsulate
+	  IP packets inside AppleTalk frames; this is useful if your Linux box
+	  is stuck on an AppleTalk network (which hopefully contains a
+	  decapsulator somewhere). Please see
+	  <file:Documentation/networking/ipddp.txt> for more information. If
+	  you said Y to "AppleTalk-IP driver support" above and you say Y
+	  here, then you cannot say Y to "AppleTalk-IP to IP Decapsulation
+	  support", below.
+
+config IPDDP_DECAP
+	bool "Appletalk-IP to IP Decapsulation support"
+	depends on IPDDP
+	help
+	  If you say Y here, the AppleTalk-IP code will be able to decapsulate
+	  AppleTalk-IP frames to IP packets; this is useful if you want your
+	  Linux box to act as an Internet gateway for an AppleTalk network.
+	  Please see <file:Documentation/networking/ipddp.txt> for more
+	  information.  If you said Y to "AppleTalk-IP driver support" above
+	  and you say Y here, then you cannot say Y to "IP to AppleTalk-IP
+	  Encapsulation support", above.
+
diff -Nru a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c
--- a/drivers/net/appletalk/cops.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/appletalk/cops.c	Wed Oct 30 16:44:28 2002
@@ -182,6 +182,7 @@
 	int nodeid;			/* Set to 1 once have nodeid. */
         unsigned char node_acquire;	/* Node ID when acquired. */
         struct atalk_addr node_addr;	/* Full node address */
+	spinlock_t lock;		/* RX/TX lock */
 };
 
 /* Index to functions, as function prototypes. */
@@ -322,6 +323,7 @@
 
         lp = (struct cops_local *)dev->priv;
         memset(lp, 0, sizeof(struct cops_local));
+        spinlock_init(&lp->lock);
 
 	/* Copy local board variable to lp struct. */
 	lp->board               = board;
@@ -759,9 +761,8 @@
         unsigned long flags;
 
 
-	save_flags(flags);
-        cli();  /* Disable interrupts. */
-
+	spin_lock_irqsave(&lp->lock, flags);
+	
         if(lp->board==DAYNA)
         {
                 outb(0, ioaddr);                /* Send out Zero length. */
@@ -779,7 +780,7 @@
                 if(boguscount==1000000)
                 {
                         printk(KERN_WARNING "%s: DMA timed out.\n",dev->name);
-			restore_flags(flags);
+			spin_unlock_irqrestore(&lp->lock, flags);
                         return;
                 }
         }
@@ -814,7 +815,7 @@
         if(lp->board==DAYNA)
                 outb(1, ioaddr+DAYNA_INT_CARD);         /* Interrupt the card */
 
-        restore_flags(flags);  /* Restore interrupts. */
+        spin_unlock_irqrestore(&lp->lock, flags);  /* Restore interrupts. */
 
         /* Check for bad response length */
         if(pkt_len < 0 || pkt_len > MAX_LLAP_SIZE)
@@ -890,12 +891,13 @@
 	 
 	netif_stop_queue(dev);
 
-	save_flags(flags);	
-	cli();	/* Disable interrupts. */
+	spin_lock_irqsave(&lp->lock, flags);
 	if(lp->board == DAYNA)	 /* Wait for adapter transmit buffer. */
-		while((inb(ioaddr+DAYNA_CARD_STATUS)&DAYNA_TX_READY)==0);
+		while((inb(ioaddr+DAYNA_CARD_STATUS)&DAYNA_TX_READY)==0)
+			cpu_relax();
 	if(lp->board == TANGENT) /* Wait for adapter transmit buffer. */
-		while((inb(ioaddr+TANG_CARD_STATUS)&TANG_TX_READY)==0);
+		while((inb(ioaddr+TANG_CARD_STATUS)&TANG_TX_READY)==0)
+			cpu_relax();
 
 	/* Output IO length. */
 	outb(skb->len, ioaddr);
@@ -915,7 +917,7 @@
 	if(lp->board==DAYNA)	/* Dayna requires you kick the card */
 		outb(1, ioaddr+DAYNA_INT_CARD);
 
-	restore_flags(flags);	/* Restore interrupts. */
+	spin_unlock_irqrestore(&lp->lock, flags);	/* Restore interrupts. */
 
 	/* Done sending packet, update counters and cleanup. */
 	lp->stats.tx_packets++;
diff -Nru a/drivers/net/arcnet/Config.help b/drivers/net/arcnet/Config.help
--- a/drivers/net/arcnet/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,91 +0,0 @@
-CONFIG_ARCNET
-  If you have a network card of this type, say Y and check out the
-  (arguably) beautiful poetry in
-  <file:Documentation/networking/arcnet.txt>.
-
-  You need both this driver, and the driver for the particular ARCnet
-  chipset of your card. If you don't know, then it's probably a
-  COM90xx type card, so say Y (or M) to "ARCnet COM90xx chipset
-  support" below.
-
-  You might also want to have a look at the Ethernet-HOWTO, available
-  from <http://www.linuxdoc.org/docs.html#howto>(even though ARCnet
-  is not really Ethernet).
-
-  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 arcnet.o.  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>.
-
-CONFIG_ARCNET_1051
-  This allows you to use RFC1051 with your ARCnet card via the virtual
-  arc0s device. You only need arc0s if you want to talk to ARCnet
-  software complying with the "old" standard, specifically, the DOS
-  arcnet.com packet driver, Amigas running AmiTCP, and some variants
-  of NetBSD. You do not need to say Y here to communicate with
-  industry-standard RFC1201 implementations, like the arcether.com
-  packet driver or most DOS/Windows ODI drivers. RFC1201 is included
-  automatically as the arc0 device. Please read the ARCnet
-  documentation in <file:Documentation/networking/arcnet.txt> for more
-  information about using arc0e and arc0s.
-
-CONFIG_ARCNET_1201
-  This allows you to use RFC1201 with your ARCnet card via the virtual
-  arc0 device.  You need to say Y here to communicate with
-  industry-standard RFC1201 implementations, like the arcether.com
-  packet driver or most DOS/Windows ODI drivers.  Please read the
-  ARCnet documentation in <file:Documentation/networking/arcnet.txt>
-  for more information about using arc0.
-
-CONFIG_ARCNET_RAW
-  ARCnet "raw mode" packet encapsulation, no soft headers.  Unlikely
-  to work unless talking to a copy of the same Linux arcnet driver,
-  but perhaps marginally faster in that case.
-
-CONFIG_ARCNET_COM90xx
-  This is the chipset driver for the standard COM90xx cards. If you
-  have always used the old ARCnet driver without knowing what type of
-  card you had, this is probably the one for you.
-
-  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 com90xx.o.  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>.
-
-CONFIG_ARCNET_COM90xxIO
-  This is the chipset driver for the COM90xx cards, using them in
-  IO-mapped mode instead of memory-mapped mode. This is slower than
-  the normal driver. Only use it if your card doesn't support shared
-  memory.
-
-  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 com90io.o.  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>.
-
-CONFIG_ARCNET_RIM_I
-  This is yet another chipset driver for the COM90xx cards, but this
-  time only using memory-mapped mode, and no IO ports at all. This
-  driver is completely untested, so if you have one of these cards,
-  please mail dwmw2@infradead.org, especially if it works!
-
-  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 arc-rimi.o.  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>.
-
-CONFIG_ARCNET_COM20020
-  This is the driver for the new COM20020 chipset. It supports such
-  things as promiscuous mode, so packet sniffing is possible, and
-  extra diagnostic information.
-
-  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 com20020.o.  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 -Nru a/drivers/net/arcnet/Config.in b/drivers/net/arcnet/Config.in
--- a/drivers/net/arcnet/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-#
-# Arcnet configuration
-#
-
-mainmenu_option next_comment
-comment 'ARCnet devices'
-
-tristate 'ARCnet support' CONFIG_ARCNET
-if [ "$CONFIG_ARCNET" != "n" ]; then
-   dep_tristate 'Enable standard ARCNet packet format (RFC 1201)' CONFIG_ARCNET_1201 $CONFIG_ARCNET
-   dep_tristate 'Enable old ARCNet packet format (RFC 1051)' CONFIG_ARCNET_1051 $CONFIG_ARCNET
-   dep_tristate 'Enable raw mode packet interface' CONFIG_ARCNET_RAW $CONFIG_ARCNET
-   dep_tristate 'ARCnet COM90xx (normal) chipset driver' CONFIG_ARCNET_COM90xx $CONFIG_ARCNET
-   dep_tristate 'ARCnet COM90xx (IO mapped) chipset driver' CONFIG_ARCNET_COM90xxIO $CONFIG_ARCNET
-   dep_tristate 'ARCnet COM90xx (RIM I) chipset driver' CONFIG_ARCNET_RIM_I $CONFIG_ARCNET
-   dep_tristate 'ARCnet COM20020 chipset driver' CONFIG_ARCNET_COM20020 $CONFIG_ARCNET
-   dep_tristate '  Support for COM20020 on ISA' CONFIG_ARCNET_COM20020_ISA $CONFIG_ARCNET_COM20020 $CONFIG_ISA
-   dep_tristate '  Support for COM20020 on PCI' CONFIG_ARCNET_COM20020_PCI $CONFIG_ARCNET_COM20020 $CONFIG_PCI
-fi
-
-endmenu
diff -Nru a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/arcnet/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,131 @@
+#
+# Arcnet configuration
+#
+
+menu "ARCnet devices"
+	depends on NETDEVICES
+
+config ARCNET
+	tristate "ARCnet support"
+	---help---
+	  If you have a network card of this type, say Y and check out the
+	  (arguably) beautiful poetry in
+	  <file:Documentation/networking/arcnet.txt>.
+
+	  You need both this driver, and the driver for the particular ARCnet
+	  chipset of your card. If you don't know, then it's probably a
+	  COM90xx type card, so say Y (or M) to "ARCnet COM90xx chipset
+	  support" below.
+
+	  You might also want to have a look at the Ethernet-HOWTO, available
+	  from <http://www.linuxdoc.org/docs.html#howto>(even though ARCnet
+	  is not really Ethernet).
+
+	  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 arcnet.o.  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>.
+
+config ARCNET_1201
+	tristate "Enable standard ARCNet packet format (RFC 1201)"
+	depends on ARCNET
+	help
+	  This allows you to use RFC1201 with your ARCnet card via the virtual
+	  arc0 device.  You need to say Y here to communicate with
+	  industry-standard RFC1201 implementations, like the arcether.com
+	  packet driver or most DOS/Windows ODI drivers.  Please read the
+	  ARCnet documentation in <file:Documentation/networking/arcnet.txt>
+	  for more information about using arc0.
+
+config ARCNET_1051
+	tristate "Enable old ARCNet packet format (RFC 1051)"
+	depends on ARCNET
+	---help---
+	  This allows you to use RFC1051 with your ARCnet card via the virtual
+	  arc0s device. You only need arc0s if you want to talk to ARCnet
+	  software complying with the "old" standard, specifically, the DOS
+	  arcnet.com packet driver, Amigas running AmiTCP, and some variants
+	  of NetBSD. You do not need to say Y here to communicate with
+	  industry-standard RFC1201 implementations, like the arcether.com
+	  packet driver or most DOS/Windows ODI drivers. RFC1201 is included
+	  automatically as the arc0 device. Please read the ARCnet
+	  documentation in <file:Documentation/networking/arcnet.txt> for more
+	  information about using arc0e and arc0s.
+
+config ARCNET_RAW
+	tristate "Enable raw mode packet interface"
+	depends on ARCNET
+	help
+	  ARCnet "raw mode" packet encapsulation, no soft headers.  Unlikely
+	  to work unless talking to a copy of the same Linux arcnet driver,
+	  but perhaps marginally faster in that case.
+
+config ARCNET_COM90xx
+	tristate "ARCnet COM90xx (normal) chipset driver"
+	depends on ARCNET
+	help
+	  This is the chipset driver for the standard COM90xx cards. If you
+	  have always used the old ARCnet driver without knowing what type of
+	  card you had, this is probably the one for you.
+
+	  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 com90xx.o.  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>.
+
+config ARCNET_COM90xxIO
+	tristate "ARCnet COM90xx (IO mapped) chipset driver"
+	depends on ARCNET
+	---help---
+	  This is the chipset driver for the COM90xx cards, using them in
+	  IO-mapped mode instead of memory-mapped mode. This is slower than
+	  the normal driver. Only use it if your card doesn't support shared
+	  memory.
+
+	  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 com90io.o.  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>.
+
+config ARCNET_RIM_I
+	tristate "ARCnet COM90xx (RIM I) chipset driver"
+	depends on ARCNET
+	---help---
+	  This is yet another chipset driver for the COM90xx cards, but this
+	  time only using memory-mapped mode, and no IO ports at all. This
+	  driver is completely untested, so if you have one of these cards,
+	  please mail dwmw2@infradead.org, especially if it works!
+
+	  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 arc-rimi.o.  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>.
+
+config ARCNET_COM20020
+	tristate "ARCnet COM20020 chipset driver"
+	depends on ARCNET
+	help
+	  This is the driver for the new COM20020 chipset. It supports such
+	  things as promiscuous mode, so packet sniffing is possible, and
+	  extra diagnostic information.
+
+	  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 com20020.o.  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>.
+
+config ARCNET_COM20020_ISA
+	tristate "Support for COM20020 on ISA"
+	depends on ARCNET_COM20020 && ISA
+
+config ARCNET_COM20020_PCI
+	tristate "Support for COM20020 on PCI"
+	depends on ARCNET_COM20020 && PCI
+
+endmenu
+
diff -Nru a/drivers/net/de620.c b/drivers/net/de620.c
--- a/drivers/net/de620.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/de620.c	Wed Oct 30 16:44:28 2002
@@ -190,6 +190,8 @@
 
 static unsigned int de620_debug = DE620_DEBUG;
 
+static spinlock_t de620_lock;
+
 MODULE_PARM(bnc, "i");
 MODULE_PARM(utp, "i");
 MODULE_PARM(io, "i");
@@ -519,10 +521,7 @@
  
 static void de620_timeout(struct net_device *dev)
 {
-	printk("%s: transmit timed out, %s?\n",
-		dev->name,
-		"network cable problem"
-		);
+	printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name, "network cable problem");
 	/* Restart the adapter. */
 	if (!adapter_init(dev)) /* maybe close it */
 		netif_wake_queue(dev);
@@ -551,9 +550,8 @@
 		++len;
 
 	/* Start real output */
-	save_flags(flags);
-	cli();
 
+	spin_lock_irqsave(&de620_lock, flags)
 	PRINTK(("de620_start_xmit: len=%d, bufs 0x%02x\n",
 		(int)skb->len, using_txbuf));
 
@@ -572,7 +570,7 @@
 
 	case (TXBF0 | TXBF1): /* NONE!!! */
 		printk(KERN_WARNING "%s: No tx-buffer available!\n", dev->name);
-		restore_flags(flags);
+		spin_unlock_irqrestore(&de620_lock, flags);
 		return 1;
 	}
 	de620_write_block(dev, buffer, len);
@@ -582,7 +580,7 @@
 		netif_wake_queue(dev);
 
 	((struct net_device_stats *)(dev->priv))->tx_packets++;
-	restore_flags(flags); /* interrupts maybe back on */
+	spin_unlock_irqrestore(&de620_lock, flags);
 	dev_kfree_skb (skb);
 	return 0;
 }
@@ -599,12 +597,8 @@
 	int bogus_count = 0;
 	int again = 0;
 
-	/* This might be deleted now, no crummy drivers present :-) Or..? */
-	if ((dev == NULL) || (irq != irq_in)) {
-		printk("%s: bogus interrupt %d\n", dev?dev->name:"de620", irq_in);
-		return;
-	}
-
+	spin_lock(&de620_lock);
+	
 	/* Read the status register (_not_ the status port) */
 	irq_status = de620_get_register(dev, R_STS);
 
@@ -620,6 +614,8 @@
 
 	if(de620_tx_buffs(dev) != (TXBF0 | TXBF1))
 		netif_wake_queue(dev);
+		
+	spin_unlock(&de620_lock);
 }
 
 /**************************************
@@ -694,8 +690,7 @@
 	else { /* Good packet? */
 		skb = dev_alloc_skb(size+2);
 		if (skb == NULL) { /* Yeah, but no place to put it... */
-			printk(KERN_WARNING "%s: Couldn't allocate a sk_buff of size %d.\n",
-				dev->name, size);
+			printk(KERN_WARNING "%s: Couldn't allocate a sk_buff of size %d.\n", dev->name, size);
 			((struct net_device_stats *)(dev->priv))->rx_dropped++;
 		}
 		else { /* Yep! Go get it! */
@@ -824,6 +819,8 @@
 
 	SET_MODULE_OWNER(dev);
 
+	spin_lock_init(&de620_lock);
+	
 	/*
 	 * This is where the base_addr and irq gets set.
 	 * Tunable at compile-time and insmod-time
diff -Nru a/drivers/net/depca.c b/drivers/net/depca.c
--- a/drivers/net/depca.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/depca.c	Wed Oct 30 16:44:28 2002
@@ -938,7 +938,7 @@
 	spin_unlock(&lp->lock);
 }
 
-
+/* Called with lp->lock held */
 static int depca_rx(struct net_device *dev)
 {
 	struct depca_private *lp = (struct depca_private *) dev->priv;
@@ -1036,6 +1036,7 @@
 
 /*
 ** Buffer sent - check for buffer errors.
+** Called with lp->lock held
 */
 static int depca_tx(struct net_device *dev)
 {
@@ -2003,7 +2004,7 @@
 		spin_lock_irqsave(&lp->lock, flags);
 		memcpy(buf, &lp->pktStats, ioc->len);
 		spin_unlock_irqrestore(&lp->lock, flags);
-		if (copy_to_user(ioc->data, &lp->pktStats, ioc->len))
+		if (copy_to_user(ioc->data, buf, ioc->len))
 			status = -EFAULT;
 		kfree(buf);
 		break;
diff -Nru a/drivers/net/dl2k.c b/drivers/net/dl2k.c
--- a/drivers/net/dl2k.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/net/dl2k.c	Wed Oct 30 16:44:27 2002
@@ -535,7 +535,7 @@
 {
 	long ioaddr = dev->base_addr;
 
-	printk (KERN_INFO "%s: Tx timed out (%4.4x), is buffer full?\n",
+	printk (KERN_INFO "%s: Tx timed out (%4.4lx), is buffer full?\n",
 		dev->name, readl (ioaddr + TxStatus));
 	rio_free_tx(dev, 0);
 	dev->if_port = 0;
diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c
--- a/drivers/net/eepro100.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/net/eepro100.c	Wed Oct 30 16:44:29 2002
@@ -17,7 +17,7 @@
 	1998 Apr - 2000 Feb  Andrey V. Savochkin <saw@saw.sw.com.sg>
 		Serious fixes for multicast filter list setting, TX timeout routine;
 		RX ring refilling logic;  other stuff
-	2000 Feb  Jeff Garzik <jgarzik@mandrakesoft.com>
+	2000 Feb  Jeff Garzik <jgarzik@pobox.com>
 		Convert to new PCI driver interface
 	2000 Mar 24  Dragan Stancevic <visitor@valinux.com>
 		Disabled FC and ER, to avoid lockups when when we get FCP interrupts.
@@ -122,8 +122,7 @@
 
 static int debug = -1;
 #define DEBUG_DEFAULT		(NETIF_MSG_DRV		| \
-				 NETIF_MSG_IFDOWN	| \
-				 NETIF_MSG_IFUP		| \
+				 NETIF_MSG_HW		| \
 				 NETIF_MSG_RX_ERR	| \
 				 NETIF_MSG_TX_ERR)
 #define DEBUG			((debug >= 0) ? (1<<debug)-1 : DEBUG_DEFAULT)
@@ -568,10 +567,8 @@
 		r = inb(cmd_ioaddr);
 	} while(r && --wait >= 0);
 
-#ifndef final_version
 	if (wait < 0)
 		printk(KERN_ALERT "%s: wait_for_cmd_done timeout!\n", dev->name);
-#endif
 	return r;
 }
 
@@ -852,7 +849,9 @@
 	sp->phy[0] = eeprom[6];
 	sp->phy[1] = eeprom[7];
 
-	sp->mii_if.phy_id = eeprom[6];
+	sp->mii_if.phy_id = eeprom[6] & 0x1f;
+	sp->mii_if.phy_id_mask = 0x1f;
+	sp->mii_if.reg_num_mask = 0x1f;
 	sp->mii_if.dev = dev;
 	sp->mii_if.mdio_read = mdio_read;
 	sp->mii_if.mdio_write = mdio_write;
@@ -1207,7 +1206,7 @@
 		/* We haven't received a packet in a Long Time.  We might have been
 		   bitten by the receiver hang bug.  This can be cleared by sending
 		   a set multicast list command. */
-		if (netif_msg_rx_err(sp))
+		if (netif_msg_timer(sp))
 			printk(KERN_DEBUG "%s: Sending a multicast list set command"
 				   " from a timer routine,"
 				   " m=%d, j=%ld, l=%ld.\n",
@@ -1224,25 +1223,26 @@
 	struct speedo_private *sp = (struct speedo_private *)dev->priv;
 	int i;
 
-	/* Print a few items for debugging. */
-	printk(KERN_DEBUG "%s: Tx ring dump,  Tx queue %u / %u:\n", dev->name,
-		   sp->cur_tx, sp->dirty_tx);
-	for (i = 0; i < TX_RING_SIZE; i++)
-		printk(KERN_DEBUG "%s:  %c%c%2d %8.8x.\n", dev->name,
-			   i == sp->dirty_tx % TX_RING_SIZE ? '*' : ' ',
-			   i == sp->cur_tx % TX_RING_SIZE ? '=' : ' ',
-			   i, sp->tx_ring[i].status);
-
-	printk(KERN_DEBUG "%s: Printing Rx ring"
-		   " (next to receive into %u, dirty index %u).\n",
-		   dev->name, sp->cur_rx, sp->dirty_rx);
-	for (i = 0; i < RX_RING_SIZE; i++)
-		printk(KERN_DEBUG "%s: %c%c%c%2d %8.8x.\n", dev->name,
-			   sp->rx_ringp[i] == sp->last_rxf ? 'l' : ' ',
-			   i == sp->dirty_rx % RX_RING_SIZE ? '*' : ' ',
-			   i == sp->cur_rx % RX_RING_SIZE ? '=' : ' ',
-			   i, (sp->rx_ringp[i] != NULL) ?
-					   (unsigned)sp->rx_ringp[i]->status : 0);
+	if (netif_msg_pktdata(sp)) {
+		printk(KERN_DEBUG "%s: Tx ring dump,  Tx queue %u / %u:\n", 
+		    dev->name, sp->cur_tx, sp->dirty_tx);
+		for (i = 0; i < TX_RING_SIZE; i++)
+			printk(KERN_DEBUG "%s:  %c%c%2d %8.8x.\n", dev->name,
+			    i == sp->dirty_tx % TX_RING_SIZE ? '*' : ' ',
+			    i == sp->cur_tx % TX_RING_SIZE ? '=' : ' ',
+			    i, sp->tx_ring[i].status);
+
+		printk(KERN_DEBUG "%s: Printing Rx ring"
+		    " (next to receive into %u, dirty index %u).\n",
+		    dev->name, sp->cur_rx, sp->dirty_rx);
+		for (i = 0; i < RX_RING_SIZE; i++)
+			printk(KERN_DEBUG "%s: %c%c%c%2d %8.8x.\n", dev->name,
+			    sp->rx_ringp[i] == sp->last_rxf ? 'l' : ' ',
+			    i == sp->dirty_rx % RX_RING_SIZE ? '*' : ' ',
+			    i == sp->cur_rx % RX_RING_SIZE ? '=' : ' ',
+			    i, (sp->rx_ringp[i] != NULL) ?
+			    (unsigned)sp->rx_ringp[i]->status : 0);
+	}
 
 #if 0
 	{
@@ -1378,8 +1378,8 @@
 		   sp->dirty_tx, sp->cur_tx,
 		   sp->tx_ring[sp->dirty_tx % TX_RING_SIZE].status);
 
-		speedo_show_state(dev);
 	}
+	speedo_show_state(dev);
 #if 0
 	if ((status & 0x00C0) != 0x0080
 		&&  (status & 0x003C) == 0x0010) {
@@ -1564,13 +1564,6 @@
 	long ioaddr, boguscnt = max_interrupt_work;
 	unsigned short status;
 
-#ifndef final_version
-	if (dev == NULL) {
-		printk(KERN_ERR "speedo_interrupt(): irq %d for unknown device.\n", irq);
-		return;
-	}
-#endif
-
 	ioaddr = dev->base_addr;
 	sp = (struct speedo_private *)dev->priv;
 
@@ -1717,9 +1710,9 @@
 			if (netif_msg_rx_err(sp) || !(sp->rx_ring_state & RrOOMReported)) {
 				printk(KERN_WARNING "%s: can't fill rx buffer (force %d)!\n",
 						dev->name, force);
-				speedo_show_state(dev);
 				sp->rx_ring_state |= RrOOMReported;
 			}
+			speedo_show_state(dev);
 			if (!force)
 				return -1;	/* Better luck next time!  */
 			/* Borrow an skb from one of next entries. */
@@ -1792,7 +1785,7 @@
 			break;
 		}
 
-		if (netif_msg_intr(sp))
+		if (netif_msg_rx_status(sp))
 			printk(KERN_DEBUG "  speedo_rx() status %8.8x len %d.\n", status,
 				   pkt_len);
 		if ((status & (RxErrTooBig|RxOK|0x0f90)) != RxOK) {
@@ -1894,10 +1887,7 @@
 	udelay(10);
 
 	free_irq(dev->irq, dev);
-
-	/* Print a few items for debugging. */
-	if (netif_msg_ifdown(sp))
-		speedo_show_state(dev);
+	speedo_show_state(dev);
 
     /* Free all the skbuffs in the Rx and Tx queues. */
 	for (i = 0; i < RX_RING_SIZE; i++) {
diff -Nru a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c
--- a/drivers/net/ewrk3.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/ewrk3.c	Wed Oct 30 16:44:28 2002
@@ -135,8 +135,10 @@
    0.43    16-Aug-96   Update alloc_device() to conform to de4x5.c
    0.44    08-Nov-01   use library crc32 functions <Matt_Domsch@dell.com>
    0.45    19-Jul-02   fix unaligned access on alpha <martin@bruli.net>
-   0.46    10-Oct-02   cli/sti removal <VDA@port.imtp.ilyichevsk.odessa.ua>
-   Multiple NIC support when module <akropel1@rochester.rr.com>
+   0.46    10-Oct-02   Multiple NIC support when module <akropel1@rochester.rr.com>
+   0.47    18-Oct-02   ethtool support <akropel1@rochester.rr.com>
+   0.48    18-Oct-02   cli/sti removal for 2.5 <vda@port.imtp.ilyichevsk.odessa.ua>
+   ioctl locking, signature search cleanup <akropel1@rochester.rr.com>
 
    =========================================================================
  */
@@ -161,6 +163,7 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
+#include <linux/ethtool.h>
 
 #include <linux/time.h>
 #include <linux/types.h>
@@ -169,8 +172,11 @@
 
 #include "ewrk3.h"
 
+#define DRV_NAME	"ewrk3"
+#define DRV_VERSION	"0.48"
+
 static char version[] __initdata =
-"ewrk3.c:v0.46 2002/10/09 davies@maniac.ultranet.com\n";
+DRV_NAME ":v" DRV_VERSION " 2002/10/18 davies@maniac.ultranet.com\n";
 
 #ifdef EWRK3_DEBUG
 static int ewrk3_debug = EWRK3_DEBUG;
@@ -258,26 +264,29 @@
 #define EWRK3_PKT_BIN_SZ  128	/* Should be >=100 unless you
 				   increase EWRK3_PKT_STAT_SZ */
 
+struct ewrk3_stats {
+	u32 bins[EWRK3_PKT_STAT_SZ];
+	u32 unicast;
+	u32 multicast;
+	u32 broadcast;
+	u32 excessive_collisions;
+	u32 tx_underruns;
+	u32 excessive_underruns;
+};
+
 struct ewrk3_private {
 	char adapter_name[80];	/* Name exported to /proc/ioports */
 	u_long shmem_base;	/* Shared memory start address */
 	u_long shmem_length;	/* Shared memory window length */
 	struct net_device_stats stats;	/* Public stats */
-	struct {
-		u32 bins[EWRK3_PKT_STAT_SZ];	/* Private stats counters */
-		u32 unicast;
-		u32 multicast;
-		u32 broadcast;
-		u32 excessive_collisions;
-		u32 tx_underruns;
-		u32 excessive_underruns;
-	} pktStats;
+	struct ewrk3_stats pktStats; /* Private stats counters */
 	u_char irq_mask;	/* Adapter IRQ mask bits */
 	u_char mPage;		/* Maximum 2kB Page number */
 	u_char lemac;		/* Chip rev. level */
 	u_char hard_strapped;	/* Don't allow a full open */
 	u_char txc;		/* Transmit cut through */
 	u_char *mctbl;		/* Pointer to the multicast table */
+	u_char led_mask;	/* Used to reserve LED access for ethtool */
 	spinlock_t hw_lock;
 };
 
@@ -533,6 +542,7 @@
 							lp->shmem_length = shmem_length;
 							lp->lemac = lemac;
 							lp->hard_strapped = hard_strapped;
+							lp->led_mask = CR_LED;
 							spin_lock_init(&lp->hw_lock);
 
 							lp->mPage = 64;
@@ -903,7 +913,7 @@
 	DISABLE_IRQs;
 
 	cr = inb(EWRK3_CR);
-	cr |= CR_LED;
+	cr |= lp->led_mask;
 	outb(cr, EWRK3_CR);
 
 	if (csr & CSR_RNE)	/* Rx interrupt (packet[s] arrived) */
@@ -928,12 +938,13 @@
 	}
 
 	/* Unmask the EWRK3 board interrupts and turn off the LED */
-	cr &= ~CR_LED;
+	cr &= ~(lp->led_mask);
 	outb(cr, EWRK3_CR);
 	ENABLE_IRQs;
 	spin_unlock(&lp->hw_lock);
 }
 
+/* Called with lp->hw_lock held */
 static int ewrk3_rx(struct net_device *dev)
 {
 	struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
@@ -1059,8 +1070,9 @@
 }
 
 /*
-   ** Buffer sent - check for TX buffer errors.
- */
+** Buffer sent - check for TX buffer errors.
+** Called with lp->hw_lock held
+*/
 static int ewrk3_tx(struct net_device *dev)
 {
 	struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
@@ -1468,27 +1480,20 @@
  */
 static void __init EthwrkSignature(char *name, char *eeprom_image)
 {
-	u_long i, j, k;
+	int i;
 	char *signatures[] = EWRK3_SIGNATURE;
 
-	strcpy(name, "");
-	for (i = 0; *signatures[i] != '\0' && *name == '\0'; i++) {
-		for (j = EEPROM_PNAME7, k = 0; j <= EEPROM_PNAME0 && k < strlen(signatures[i]); j++) {
-			if (signatures[i][k] == eeprom_image[j]) {	/* track signature */
-				k++;
-			} else {	/* lost signature; begin search again */
-				k = 0;
-			}
-		}
-		if (k == strlen(signatures[i])) {
-			for (k = 0; k < EWRK3_STRLEN; k++) {
-				name[k] = eeprom_image[EEPROM_PNAME7 + k];
-				name[EWRK3_STRLEN] = '\0';
-			}
-		}
-	}
+	for (i=0; *signatures[i] != '\0'; i++)
+		if( !strncmp(eeprom_image+EEPROM_PNAME7, signatures[i], strlen(signatures[i])) )
+			break;
+
+	if (*signatures[i] != '\0') {
+		memcpy(name, eeprom_image+EEPROM_PNAME7, EWRK3_STRLEN);
+		name[EWRK3_STRLEN] = '\0';
+	} else
+		name[0] = '\0';
 
-	return;			/* return the device name string */
+	return;
 }
 
 /*
@@ -1624,6 +1629,197 @@
 	return status;		/* return the device name string */
 }
 
+static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
+{
+	struct ewrk3_private *lp = (struct ewrk3_private *) dev->priv;
+	u_long iobase = dev->base_addr;
+	u32 ethcmd;
+
+	if (get_user(ethcmd, (u32 *)useraddr))
+		return -EFAULT;
+
+	switch (ethcmd) {
+
+	/* Get driver info */
+	case ETHTOOL_GDRVINFO: {
+		struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
+		int fwrev = Read_EEPROM(dev->base_addr, EEPROM_REVLVL);
+
+		strcpy(info.driver, DRV_NAME);
+		strcpy(info.version, DRV_VERSION);
+		sprintf(info.fw_version, "%d", fwrev);
+		strcpy(info.bus_info, "N/A");
+		info.eedump_len = EEPROM_MAX;
+		if (copy_to_user(useraddr, &info, sizeof(info)))
+			return -EFAULT;
+		return 0;
+	}
+
+	/* Get settings */
+	case ETHTOOL_GSET: {
+		struct ethtool_cmd ecmd = { ETHTOOL_GSET };
+		u_char cr = inb(EWRK3_CR);
+
+		switch (lp->adapter_name[4]) {
+		case '3': /* DE203 */
+			ecmd.supported = SUPPORTED_BNC;
+			ecmd.port = PORT_BNC;
+			break;
+
+		case '4': /* DE204 */
+			ecmd.supported = SUPPORTED_TP;
+			ecmd.port = PORT_TP;
+			break;
+
+		case '5': /* DE205 */
+			ecmd.supported = SUPPORTED_TP | SUPPORTED_BNC | SUPPORTED_AUI;
+			ecmd.autoneg = !(cr & CR_APD);
+			/*
+			** Port is only valid if autoneg is disabled
+			** and even then we don't know if AUI is jumpered.
+			*/
+			if (!ecmd.autoneg)
+				ecmd.port = (cr & CR_PSEL) ? PORT_BNC : PORT_TP;
+			break;
+		}
+
+		ecmd.supported |= SUPPORTED_10baseT_Half;
+		ecmd.speed = SPEED_10;
+		ecmd.duplex = DUPLEX_HALF;
+
+		if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
+			return -EFAULT;
+		return 0;
+	}
+
+	/* Set settings */
+	case ETHTOOL_SSET: {
+		struct ethtool_cmd ecmd;
+		u_char cr;
+		u_long flags;
+
+		/* DE205 is the only card with anything to set */
+		if (lp->adapter_name[4] != '5')
+			return -EOPNOTSUPP;
+
+		if (copy_from_user(&ecmd, useraddr, sizeof(ecmd)))
+			return -EFAULT;
+
+		/* Sanity-check parameters */
+		if (ecmd.speed != SPEED_10)
+			return -EINVAL;
+		if (ecmd.port != PORT_TP && ecmd.port != PORT_BNC)
+			return -EINVAL; /* AUI is not software-selectable */
+		if (ecmd.transceiver != XCVR_INTERNAL)
+			return -EINVAL;
+		if (ecmd.duplex != DUPLEX_HALF)
+			return -EINVAL;
+		if (ecmd.phy_address != 0)
+			return -EINVAL;
+
+		spin_lock_irqsave(&lp->hw_lock, flags);
+		cr = inb(EWRK3_CR);
+
+		/* If Autoneg is set, change to Auto Port mode */
+		/* Otherwise, disable Auto Port and set port explicitly */
+		if (ecmd.autoneg) {
+			cr &= ~CR_APD;
+		} else {
+			cr |= CR_APD;
+			if (ecmd.port == PORT_TP)
+				cr &= ~CR_PSEL;		/* Force TP */
+			else
+				cr |= CR_PSEL;		/* Force BNC */
+		}
+
+		/* Commit the changes */
+		outb(cr, EWRK3_CR);
+
+		spin_unlock_irqrestore(&lp->hw_lock, flags);
+		if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
+			return -EFAULT;
+		return 0;
+	}
+
+	/* Get link status */
+	case ETHTOOL_GLINK: {
+		struct ethtool_value edata = { ETHTOOL_GLINK };
+		u_char cmr = inb(EWRK3_CMR);
+
+		/* DE203 has BNC only and link status does not apply */
+		if (lp->adapter_name[4] == '3')
+			return -EOPNOTSUPP;
+
+		/* On DE204 this is always valid since TP is the only port. */
+		/* On DE205 this reflects TP status even if BNC or AUI is selected. */
+		edata.data = !(cmr & CMR_LINK);
+
+		if (copy_to_user(useraddr, &edata, sizeof(edata)))
+			return -EFAULT;
+		return 0;
+	}
+
+#ifdef BROKEN
+	/* Blink LED for identification */
+	case ETHTOOL_PHYS_ID: {
+		struct ethtool_value edata;
+		u_long flags;
+		long delay, ret;
+		u_char cr;
+		int count;
+		wait_queue_head_t wait;
+
+		init_waitqueue_head(&wait);
+
+		if (copy_from_user(&edata, useraddr, sizeof(edata)))
+			return -EFAULT;
+
+		/* Toggle LED 4x per second */
+		delay = HZ >> 2;
+		count = edata.data << 2;
+
+		spin_lock_irqsave(&lp->hw_lock, flags);
+
+		/* Bail if a PHYS_ID is already in progress */
+		if (lp->led_mask == 0) {
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
+			return -EBUSY;
+		}
+
+		/* Prevent ISR from twiddling the LED */
+		lp->led_mask = 0;
+
+		while (count--) {
+			/* Toggle the LED */
+			cr = inb(EWRK3_CR);
+			outb(cr ^ CR_LED, EWRK3_CR);
+
+			/* Wait a little while */
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
+			ret = delay;
+			__wait_event_interruptible_timeout(wait, 0, ret);
+			spin_lock_irqsave(&lp->hw_lock, flags);
+
+			/* Exit if we got a signal */
+			if (ret == -ERESTARTSYS)
+				goto out;
+		}
+
+		ret = 0;
+out:
+		lp->led_mask = CR_LED;
+		cr = inb(EWRK3_CR);
+		outb(cr & ~CR_LED, EWRK3_CR);
+		spin_unlock_irqrestore(&lp->hw_lock, flags);
+		return ret;
+	}
+#endif /* BROKEN */
+
+	}
+
+	return -EOPNOTSUPP;
+}
+
 /*
    ** Perform IOCTL call functions here. Some are privileged operations and the
    ** effective uid is checked in those cases.
@@ -1635,6 +1831,7 @@
 	u_long iobase = dev->base_addr;
 	int i, j, status = 0;
 	u_char csr;
+	unsigned long flags;
 	union ewrk3_addr {
 		u_char addr[HASH_TABLE_LEN * ETH_ALEN];
 		u_short val[(HASH_TABLE_LEN * ETH_ALEN) >> 1];
@@ -1642,6 +1839,14 @@
 	
 	union ewrk3_addr *tmp;
 
+	/* ethtool IOCTLs are handled elsewhere */
+	if (cmd == SIOCETHTOOL)
+		return ewrk3_ethtool_ioctl(dev, (void *)rq->ifr_data);
+
+	/* Other than ethtool, all we handle are private IOCTLs */
+	if (cmd != EWRK3IOCTL)
+		return -EOPNOTSUPP;
+
 	tmp = kmalloc(sizeof(union ewrk3_addr), GFP_KERNEL);
 	if(tmp==NULL)
 		return -ENOMEM;
@@ -1658,21 +1863,26 @@
 		
 	case EWRK3_SET_HWADDR:	/* Set the hardware address */
 		if (capable(CAP_NET_ADMIN)) {
+			spin_lock_irqsave(&lp->hw_lock, flags);
 			csr = inb(EWRK3_CSR);
 			csr |= (CSR_TXD | CSR_RXD);
 			outb(csr, EWRK3_CSR);	/* Disable the TX and RX */
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
 
 			if (copy_from_user(tmp->addr, ioc->data, ETH_ALEN)) {
 				status = -EFAULT;
 				break;
 			}
+			spin_lock_irqsave(&lp->hw_lock, flags);
 			for (i = 0; i < ETH_ALEN; i++) {
 				dev->dev_addr[i] = tmp->addr[i];
 				outb(tmp->addr[i], EWRK3_PAR0 + i);
 			}
 
+			csr = inb(EWRK3_CSR);
 			csr &= ~(CSR_TXD | CSR_RXD);	/* Enable the TX and RX */
 			outb(csr, EWRK3_CSR);
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
 		} else {
 			status = -EPERM;
 		}
@@ -1680,10 +1890,12 @@
 		break;
 	case EWRK3_SET_PROM:	/* Set Promiscuous Mode */
 		if (capable(CAP_NET_ADMIN)) {
+			spin_lock_irqsave(&lp->hw_lock, flags);
 			csr = inb(EWRK3_CSR);
 			csr |= CSR_PME;
 			csr &= ~CSR_MCE;
 			outb(csr, EWRK3_CSR);
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
 		} else {
 			status = -EPERM;
 		}
@@ -1691,16 +1903,18 @@
 		break;
 	case EWRK3_CLR_PROM:	/* Clear Promiscuous Mode */
 		if (capable(CAP_NET_ADMIN)) {
+			spin_lock_irqsave(&lp->hw_lock, flags);
 			csr = inb(EWRK3_CSR);
 			csr &= ~CSR_PME;
 			outb(csr, EWRK3_CSR);
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
 		} else {
 			status = -EPERM;
 		}
 
 		break;
 	case EWRK3_GET_MCA:	/* Get the multicast address table */
-		spin_lock_irq(&lp->hw_lock);
+		spin_lock_irqsave(&lp->hw_lock, flags);
 		if (lp->shmem_length == IO_ONLY) {
 			outb(0, EWRK3_IOPR);
 			outw(PAGE0_HTE, EWRK3_PIR1);
@@ -1711,7 +1925,7 @@
 			outb(0, EWRK3_MPR);
 			isa_memcpy_fromio(tmp->addr, lp->shmem_base + PAGE0_HTE, (HASH_TABLE_LEN >> 3));
 		}
-		spin_unlock_irq(&lp->hw_lock);
+		spin_unlock_irqrestore(&lp->hw_lock, flags);
 
 		ioc->len = (HASH_TABLE_LEN >> 3);
 		if (copy_to_user(ioc->data, tmp->addr, ioc->len))
@@ -1745,28 +1959,37 @@
 		break;
 	case EWRK3_MCA_EN:	/* Enable multicast addressing */
 		if (capable(CAP_NET_ADMIN)) {
+			spin_lock_irqsave(&lp->hw_lock, flags);
 			csr = inb(EWRK3_CSR);
 			csr |= CSR_MCE;
 			csr &= ~CSR_PME;
 			outb(csr, EWRK3_CSR);
+			spin_unlock_irqrestore(&lp->hw_lock, flags);
 		} else {
 			status = -EPERM;
 		}
 
 		break;
-	case EWRK3_GET_STATS:	/* Get the driver statistics */
-		cli();
-		ioc->len = sizeof(lp->pktStats);
-		if (copy_to_user(ioc->data, &lp->pktStats, ioc->len))
-			status = -EFAULT;
-		sti();
+	case EWRK3_GET_STATS: { /* Get the driver statistics */
+		struct ewrk3_stats *tmp_stats =
+        		kmalloc(sizeof(lp->pktStats), GFP_KERNEL);
+		if (!tmp_stats) return -ENOMEM;
+
+		spin_lock_irqsave(&lp->hw_lock, flags);
+		memcpy(tmp_stats, &lp->pktStats, sizeof(lp->pktStats));
+		spin_unlock_irqrestore(&lp->hw_lock, flags);
 
+		ioc->len = sizeof(lp->pktStats);
+		if (copy_to_user(ioc->data, tmp_stats, sizeof(lp->pktStats)))
+    			status = -EFAULT;
+		kfree(tmp_stats);
 		break;
+	}
 	case EWRK3_CLR_STATS:	/* Zero out the driver statistics */
 		if (capable(CAP_NET_ADMIN)) {
-			cli();
+			spin_lock_irqsave(&lp->hw_lock, flags);
 			memset(&lp->pktStats, 0, sizeof(lp->pktStats));
-			sti();
+			spin_unlock_irqrestore(&lp->hw_lock,flags);
 		} else {
 			status = -EPERM;
 		}
@@ -1854,7 +2077,7 @@
 #ifdef MODULE
 static struct net_device *ewrk3_devs[MAX_NUM_EWRK3S];
 static int ndevs;
-static int io[MAX_NUM_EWRK3S+1] = { 0x300, 0, };		/* <--- EDIT THESE LINES FOR YOUR CONFIGURATION */
+static int io[MAX_NUM_EWRK3S+1] = { 0x300, 0, };	/* <--- EDIT THESE LINES FOR YOUR CONFIGURATION */
 static int irq[MAX_NUM_EWRK3S+1] = { 5, 0, };		/* or use the insmod io= irq= options           */
 
 /* '21' below should really be 'MAX_NUM_EWRK3S' */
@@ -1895,8 +2118,7 @@
 {
 	int i;
 
-	for( i=0; i<ndevs; i++ )
-	{
+	for( i=0; i<ndevs; i++ ) {
 		unregister_netdev(ewrk3_devs[i]);
 		if (ewrk3_devs[i]->priv) {
 			kfree(ewrk3_devs[i]->priv);
diff -Nru a/drivers/net/fc/iph5526.c b/drivers/net/fc/iph5526.c
--- a/drivers/net/fc/iph5526.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/net/fc/iph5526.c	Wed Oct 30 16:44:26 2002
@@ -54,7 +54,6 @@
 #include <linux/fcdevice.h> /* had the declarations for init_fcdev among others + includes if_fcdevice.h */
 
 #include <linux/blk.h>
-#include "../../scsi/sd.h"
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
 #include "../../fc4/fcp.h"
@@ -3891,9 +3890,10 @@
 }
 
 
-int iph5526_biosparam(Disk * disk, struct block_device *n, int ip[])
+int iph5526_biosparam(struct scsi_device *sdev, struct block_device *n,
+		sector_t capacity, int ip[])
 {
-int size = disk->capacity;
+int size = capacity;
 	ip[0] = 64;
 	ip[1] = 32;
 	ip[2] = size >> 11;
diff -Nru a/drivers/net/hamradio/Config.help b/drivers/net/hamradio/Config.help
--- a/drivers/net/hamradio/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,247 +0,0 @@
-CONFIG_MKISS
-  KISS is a protocol used for the exchange of data between a computer
-  and a Terminal Node Controller (a small embedded system commonly
-  used for networking over AX.25 amateur radio connections; it
-  connects the computer's serial port with the radio's microphone
-  input and speaker output).
-
-  Although KISS is less advanced than the 6pack protocol, it has
-  the advantage that it is already supported by most modern TNCs
-  without the need for a firmware upgrade.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called mkiss.o.
-
-CONFIG_6PACK
-  6pack is a transmission protocol for the data exchange between your
-  PC and your TNC (the Terminal Node Controller acts as a kind of
-  modem connecting your computer's serial port to your radio's
-  microphone input and speaker output). This protocol can be used as
-  an alternative to KISS for networking over AX.25 amateur radio
-  connections, but it has some extended functionality.
-
-  Note that this driver is still experimental and might cause
-  problems. For details about the features and the usage of the
-  driver, read <file:Documentation/networking/6pack.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called 6pack.o.
-
-CONFIG_BPQETHER
-  AX.25 is the protocol used for computer communication over amateur
-  radio. If you say Y here, you will be able to send and receive AX.25
-  traffic over Ethernet (also called "BPQ AX.25"), which could be
-  useful if some other computer on your local network has a direct
-  amateur radio connection.
-
-CONFIG_DMASCC
-  This is a driver for high-speed SCC boards, i.e. those supporting
-  DMA on one port. You usually use those boards to connect your
-  computer to an amateur radio modem (such as the WA4DSY 56kbps
-  modem), in order to send and receive AX.25 packet radio network
-  traffic.
-
-  Currently, this driver supports Ottawa PI/PI2, Paccomm/Gracilis
-  PackeTwin, and S5SCC/DMA boards. They are detected automatically.
-  If you have one of these cards, say Y here and read the AX25-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver can operate multiple boards simultaneously. If you
-  compile it as a module (by saying M instead of Y), it will be called
-  dmascc.o. If you don't pass any parameter to the driver, all
-  possible I/O addresses are probed. This could irritate other devices
-  that are currently not in use. You may specify the list of addresses
-  to be probed by "dmascc=addr1,addr2,..." (when compiled into the
-  kernel image) or "io=addr1,addr2,..." (when loaded as a module). The
-  network interfaces will be called dmascc0 and dmascc1 for the board
-  detected first, dmascc2 and dmascc3 for the second one, and so on.
-
-  Before you configure each interface with ifconfig, you MUST set
-  certain parameters, such as channel access timing, clock mode, and
-  DMA channel. This is accomplished with a small utility program,
-  dmascc_cfg, available at
-  <http://www.nt.tuwien.ac.at/~kkudielk/Linux/>. Please be sure to get
-  at least version 1.27 of dmascc_cfg, as older versions will not
-  work with the current driver.
-
-CONFIG_SCC
-  These cards are used to connect your Linux box to an amateur radio
-  in order to communicate with other computers. If you want to use
-  this, read <file:Documentation/networking/z8530drv.txt> and the
-  AX25-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
-  to "Amateur Radio AX.25 Level 2" support.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called scc.o.
-
-CONFIG_SCC_TRXECHO
-  Some transmitters feed the transmitted signal back to the receive
-  line.  Say Y here to foil this by explicitly disabling the receiver
-  during data transmission.  If in doubt, say Y.
-
-CONFIG_SCC_DELAY
-  Say Y here if you experience problems with the SCC driver not
-  working properly; please read
-  <file:Documentation/networking/z8530drv.txt> for details. If unsure,
-  say N.
-
-CONFIG_YAM
-  The YAM is a modem for packet radio which connects to the serial
-  port and includes some of the functions of a Terminal Node
-  Controller. If you have one of those, say Y here.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_BAYCOM_PAR
-  This is a driver for Baycom style simple amateur radio modems that
-  connect to a parallel interface. The driver supports the picpar and
-  par96 designs. To configure the driver, use the sethdlc utility
-  available in the standard ax25 utilities package. For information on
-  the modems, see <http://www.baycom.de/> and the file
-  <file:Documentation/networking/baycom.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called baycom_par.o.
-
-CONFIG_BAYCOM_EPP
-  This is a driver for Baycom style simple amateur radio modems that
-  connect to a parallel interface. The driver supports the EPP
-  designs. To configure the driver, use the sethdlc utility available
-  in the standard ax25 utilities package. For information on the
-  modems, see <http://www.baycom.de/> and the file
-  <file:Documentation/networking/baycom.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called baycom_par.o.
-
-CONFIG_BAYCOM_SER_FDX
-  This is one of two drivers for Baycom style simple amateur radio
-  modems that connect to a serial interface. The driver supports the
-  ser12 design in full-duplex mode. In addition, it allows the
-  baudrate to be set between 300 and 4800 baud (however not all modems
-  support all baudrates). This is the preferred driver. The next
-  driver, "BAYCOM ser12 half-duplex driver for AX.25" is the old
-  driver and still provided in case this driver does not work with
-  your serial interface chip. To configure the driver, use the sethdlc
-  utility available in the standard ax25 utilities package. For
-  information on the modems, see <http://www.baycom.de/> and
-  <file:Documentation/networking/baycom.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called baycom_ser_fdx.o.
-
-CONFIG_BAYCOM_SER_HDX
-  This is one of two drivers for Baycom style simple amateur radio
-  modems that connect to a serial interface. The driver supports the
-  ser12 design in full-duplex mode. This is the old driver.  It is
-  still provided in case your serial interface chip does not work with
-  the full-duplex driver. This driver is depreciated.  To configure
-  the driver, use the sethdlc utility available in the standard ax25
-  utilities package. For information on the modems, see
-  <http://www.baycom.de/> and
-  <file:Documentation/networking/baycom.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called baycom_ser_hdx.o.
-
-CONFIG_SOUNDMODEM
-  This experimental driver allows a standard Sound Blaster or
-  WindowsSoundSystem compatible sound card to be used as a packet
-  radio modem (NOT as a telephone modem!), to send digital traffic
-  over amateur radio.
-
-  To configure the driver, use the sethdlc, smdiag and smmixer
-  utilities available in the standard ax25 utilities package. For
-  information on how to key the transmitter, see
-  <http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html> and
-  <file:Documentation/networking/soundmodem.txt>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  This is
-  recommended.  The module will be called soundmodem.o.
-
-CONFIG_SOUNDMODEM_SBC
-  This option enables the soundmodem driver to use Sound Blaster and
-  compatible cards. If you have a dual mode card (i.e. a WSS cards
-  with a Sound Blaster emulation) you should say N here and Y to
-  "Sound card modem support for WSS and Crystal cards", below, because
-  this usually results in better performance. This option also
-  supports SB16/32/64 in full-duplex mode.
-
-CONFIG_SOUNDMODEM_WSS
-  This option enables the soundmodem driver to use WindowsSoundSystem
-  compatible cards. These cards feature a codec chip from either
-  Analog Devices (such as AD1848, AD1845, AD1812) or Crystal
-  Semiconductors (such as CS4248, CS423x). This option also supports
-  the WSS full-duplex operation which currently works with Crystal
-  CS423x chips. If you don't need full-duplex operation, do not enable
-  it to save performance.
-
-CONFIG_SOUNDMODEM_AFSK1200
-  This option enables the soundmodem driver 1200 baud AFSK modem,
-  compatible to popular modems using TCM3105 or AM7911. The
-  demodulator requires about 12% of the CPU power of a Pentium 75 CPU
-  per channel.
-
-CONFIG_SOUNDMODEM_AFSK2400_7
-  This option enables the soundmodem driver 2400 baud AFSK modem,
-  compatible to TCM3105 modems (over-)clocked with a 7.3728MHz
-  crystal. Note that the availability of this driver does _not_ imply
-  that I recommend building such links. It is only here since users
-  especially in eastern Europe have asked me to do so. In fact this
-  modulation scheme has many disadvantages, mainly its incompatibility
-  with many transceiver designs and the fact that the TCM3105 (if
-  used) is operated widely outside its specifications.
-
-CONFIG_SOUNDMODEM_AFSK2400_8
-  This option enables the soundmodem driver 2400 baud AFSK modem,
-  compatible to TCM3105 modems (over-)clocked with an 8MHz crystal.
-  Note that the availability of this driver does _not_ imply that I
-  recommend building such links. It is only here since users
-  especially in eastern Europe have asked me to do so. In fact this
-  modulation scheme has many disadvantages, mainly its incompatibility
-  with many transceiver designs and the fact that the TCM3105 (if
-  used) is operated widely outside its specifications.
-
-CONFIG_SOUNDMODEM_AFSK2666
-  This option enables the soundmodem driver 2666 baud AFSK modem.
-  This modem is experimental, and not compatible to anything
-  else I know of.
-
-CONFIG_SOUNDMODEM_PSK4800
-  This option enables the soundmodem driver 4800 baud 8PSK modem.
-  This modem is experimental, and not compatible to anything
-  else I know of.
-
-CONFIG_SOUNDMODEM_HAPN4800
-  This option enables the soundmodem driver 4800 baud HAPN-1
-  compatible modem. This modulation seems to be widely used 'down
-  under' and in the Netherlands. Here, nobody uses it, so I could not
-  test if it works. It is compatible to itself, however :-)
-
-CONFIG_SOUNDMODEM_FSK9600
-  This option enables the soundmodem driver 9600 baud FSK modem,
-  compatible to the G3RUH standard. The demodulator requires about 4%
-  of the CPU power of a Pentium 75 CPU per channel. You can say Y to
-  both 1200 baud AFSK and 9600 baud FSK if you want (but obviously you
-  can only use one protocol at a time, depending on what the other end
-  can understand).
-
diff -Nru a/drivers/net/hamradio/Config.in b/drivers/net/hamradio/Config.in
--- a/drivers/net/hamradio/Config.in	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,34 +0,0 @@
-
-dep_tristate 'Serial port KISS driver' CONFIG_MKISS $CONFIG_AX25
-dep_tristate 'Serial port 6PACK driver' CONFIG_6PACK $CONFIG_AX25
-dep_tristate 'BPQ Ethernet driver' CONFIG_BPQETHER $CONFIG_AX25
-    
-if [ "$CONFIG_ISA" = "y" ]; then
-  dep_tristate 'High-speed (DMA) SCC driver for AX.25' CONFIG_DMASCC $CONFIG_AX25
-  dep_tristate 'Z8530 SCC driver' CONFIG_SCC $CONFIG_AX25
-fi
-if [ "$CONFIG_SCC" != "n" ]; then
-   bool '  additional delay for PA0HZP OptoSCC compatible boards' CONFIG_SCC_DELAY
-   bool '  support for TRX that feedback the tx signal to rx' CONFIG_SCC_TRXECHO
-fi
-    
-dep_tristate 'BAYCOM ser12 fullduplex driver for AX.25' CONFIG_BAYCOM_SER_FDX $CONFIG_AX25
-dep_tristate 'BAYCOM ser12 halfduplex driver for AX.25' CONFIG_BAYCOM_SER_HDX $CONFIG_AX25
-dep_tristate 'BAYCOM picpar and par96 driver for AX.25' CONFIG_BAYCOM_PAR $CONFIG_PARPORT $CONFIG_AX25
-dep_tristate 'BAYCOM epp driver for AX.25' CONFIG_BAYCOM_EPP $CONFIG_PARPORT $CONFIG_AX25
-
-dep_tristate 'Soundcard modem driver' CONFIG_SOUNDMODEM $CONFIG_PARPORT $CONFIG_AX25
-if [ "$CONFIG_SOUNDMODEM" != "n" ]; then
-   bool '  soundmodem support for Soundblaster and compatible cards' CONFIG_SOUNDMODEM_SBC
-   bool '  soundmodem support for WSS and Crystal cards' CONFIG_SOUNDMODEM_WSS
-   bool '  soundmodem support for 1200 baud AFSK modulation' CONFIG_SOUNDMODEM_AFSK1200
-   bool '  soundmodem support for 2400 baud AFSK modulation (7.3728MHz crystal)' CONFIG_SOUNDMODEM_AFSK2400_7
-   bool '  soundmodem support for 2400 baud AFSK modulation (8MHz crystal)' CONFIG_SOUNDMODEM_AFSK2400_8
-   bool '  soundmodem support for 2666 baud AFSK modulation' CONFIG_SOUNDMODEM_AFSK2666
-   bool '  soundmodem support for 4800 baud HAPN-1 modulation' CONFIG_SOUNDMODEM_HAPN4800
-   bool '  soundmodem support for 4800 baud PSK modulation' CONFIG_SOUNDMODEM_PSK4800
-   bool '  soundmodem support for 9600 baud FSK G3RUH modulation' CONFIG_SOUNDMODEM_FSK9600
-fi
-
-dep_tristate 'YAM driver for AX.25' CONFIG_YAM $CONFIG_AX25
-
diff -Nru a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/hamradio/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,313 @@
+config MKISS
+	tristate "Serial port KISS driver"
+	depends on AX25
+	---help---
+	  KISS is a protocol used for the exchange of data between a computer
+	  and a Terminal Node Controller (a small embedded system commonly
+	  used for networking over AX.25 amateur radio connections; it
+	  connects the computer's serial port with the radio's microphone
+	  input and speaker output).
+
+	  Although KISS is less advanced than the 6pack protocol, it has
+	  the advantage that it is already supported by most modern TNCs
+	  without the need for a firmware upgrade.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called mkiss.o.
+
+config 6PACK
+	tristate "Serial port 6PACK driver"
+	depends on AX25
+	---help---
+	  6pack is a transmission protocol for the data exchange between your
+	  PC and your TNC (the Terminal Node Controller acts as a kind of
+	  modem connecting your computer's serial port to your radio's
+	  microphone input and speaker output). This protocol can be used as
+	  an alternative to KISS for networking over AX.25 amateur radio
+	  connections, but it has some extended functionality.
+
+	  Note that this driver is still experimental and might cause
+	  problems. For details about the features and the usage of the
+	  driver, read <file:Documentation/networking/6pack.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called 6pack.o.
+
+config BPQETHER
+	tristate "BPQ Ethernet driver"
+	depends on AX25
+	help
+	  AX.25 is the protocol used for computer communication over amateur
+	  radio. If you say Y here, you will be able to send and receive AX.25
+	  traffic over Ethernet (also called "BPQ AX.25"), which could be
+	  useful if some other computer on your local network has a direct
+	  amateur radio connection.
+
+config DMASCC
+	tristate "High-speed (DMA) SCC driver for AX.25"
+	depends on ISA && AX25
+	---help---
+	  This is a driver for high-speed SCC boards, i.e. those supporting
+	  DMA on one port. You usually use those boards to connect your
+	  computer to an amateur radio modem (such as the WA4DSY 56kbps
+	  modem), in order to send and receive AX.25 packet radio network
+	  traffic.
+
+	  Currently, this driver supports Ottawa PI/PI2, Paccomm/Gracilis
+	  PackeTwin, and S5SCC/DMA boards. They are detected automatically.
+	  If you have one of these cards, say Y here and read the AX25-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver can operate multiple boards simultaneously. If you
+	  compile it as a module (by saying M instead of Y), it will be called
+	  dmascc.o. If you don't pass any parameter to the driver, all
+	  possible I/O addresses are probed. This could irritate other devices
+	  that are currently not in use. You may specify the list of addresses
+	  to be probed by "dmascc=addr1,addr2,..." (when compiled into the
+	  kernel image) or "io=addr1,addr2,..." (when loaded as a module). The
+	  network interfaces will be called dmascc0 and dmascc1 for the board
+	  detected first, dmascc2 and dmascc3 for the second one, and so on.
+
+	  Before you configure each interface with ifconfig, you MUST set
+	  certain parameters, such as channel access timing, clock mode, and
+	  DMA channel. This is accomplished with a small utility program,
+	  dmascc_cfg, available at
+	  <http://www.nt.tuwien.ac.at/~kkudielk/Linux/>. Please be sure to get
+	  at least version 1.27 of dmascc_cfg, as older versions will not
+	  work with the current driver.
+
+config SCC
+	tristate "Z8530 SCC driver"
+	depends on ISA && AX25
+	---help---
+	  These cards are used to connect your Linux box to an amateur radio
+	  in order to communicate with other computers. If you want to use
+	  this, read <file:Documentation/networking/z8530drv.txt> and the
+	  AX25-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
+	  to "Amateur Radio AX.25 Level 2" support.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called scc.o.
+
+config SCC_DELAY
+	bool "additional delay for PA0HZP OptoSCC compatible boards"
+	depends on SCC
+	help
+	  Say Y here if you experience problems with the SCC driver not
+	  working properly; please read
+	  <file:Documentation/networking/z8530drv.txt> for details. If unsure,
+	  say N.
+
+config SCC_TRXECHO
+	bool "support for TRX that feedback the tx signal to rx"
+	depends on SCC
+	help
+	  Some transmitters feed the transmitted signal back to the receive
+	  line.  Say Y here to foil this by explicitly disabling the receiver
+	  during data transmission.  If in doubt, say Y.
+
+config BAYCOM_SER_FDX
+	tristate "BAYCOM ser12 fullduplex driver for AX.25"
+	depends on AX25
+	---help---
+	  This is one of two drivers for Baycom style simple amateur radio
+	  modems that connect to a serial interface. The driver supports the
+	  ser12 design in full-duplex mode. In addition, it allows the
+	  baudrate to be set between 300 and 4800 baud (however not all modems
+	  support all baudrates). This is the preferred driver. The next
+	  driver, "BAYCOM ser12 half-duplex driver for AX.25" is the old
+	  driver and still provided in case this driver does not work with
+	  your serial interface chip. To configure the driver, use the sethdlc
+	  utility available in the standard ax25 utilities package. For
+	  information on the modems, see <http://www.baycom.de/> and
+	  <file:Documentation/networking/baycom.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called baycom_ser_fdx.o.
+
+config BAYCOM_SER_HDX
+	tristate "BAYCOM ser12 halfduplex driver for AX.25"
+	depends on AX25
+	---help---
+	  This is one of two drivers for Baycom style simple amateur radio
+	  modems that connect to a serial interface. The driver supports the
+	  ser12 design in full-duplex mode. This is the old driver.  It is
+	  still provided in case your serial interface chip does not work with
+	  the full-duplex driver. This driver is depreciated.  To configure
+	  the driver, use the sethdlc utility available in the standard ax25
+	  utilities package. For information on the modems, see
+	  <http://www.baycom.de/> and
+	  <file:Documentation/networking/baycom.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called baycom_ser_hdx.o.
+
+config BAYCOM_PAR
+	tristate "BAYCOM picpar and par96 driver for AX.25"
+	depends on PARPORT && AX25
+	---help---
+	  This is a driver for Baycom style simple amateur radio modems that
+	  connect to a parallel interface. The driver supports the picpar and
+	  par96 designs. To configure the driver, use the sethdlc utility
+	  available in the standard ax25 utilities package. For information on
+	  the modems, see <http://www.baycom.de/> and the file
+	  <file:Documentation/networking/baycom.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called baycom_par.o.
+
+config BAYCOM_EPP
+	tristate "BAYCOM epp driver for AX.25"
+	depends on PARPORT && AX25
+	---help---
+	  This is a driver for Baycom style simple amateur radio modems that
+	  connect to a parallel interface. The driver supports the EPP
+	  designs. To configure the driver, use the sethdlc utility available
+	  in the standard ax25 utilities package. For information on the
+	  modems, see <http://www.baycom.de/> and the file
+	  <file:Documentation/networking/baycom.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called baycom_par.o.
+
+config SOUNDMODEM
+	tristate "Soundcard modem driver"
+	depends on PARPORT && AX25
+	---help---
+	  This experimental driver allows a standard Sound Blaster or
+	  WindowsSoundSystem compatible sound card to be used as a packet
+	  radio modem (NOT as a telephone modem!), to send digital traffic
+	  over amateur radio.
+
+	  To configure the driver, use the sethdlc, smdiag and smmixer
+	  utilities available in the standard ax25 utilities package. For
+	  information on how to key the transmitter, see
+	  <http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html> and
+	  <file:Documentation/networking/soundmodem.txt>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  This is
+	  recommended.  The module will be called soundmodem.o.
+
+config SOUNDMODEM_SBC
+	bool "soundmodem support for Soundblaster and compatible cards"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver to use Sound Blaster and
+	  compatible cards. If you have a dual mode card (i.e. a WSS cards
+	  with a Sound Blaster emulation) you should say N here and Y to
+	  "Sound card modem support for WSS and Crystal cards", below, because
+	  this usually results in better performance. This option also
+	  supports SB16/32/64 in full-duplex mode.
+
+config SOUNDMODEM_WSS
+	bool "soundmodem support for WSS and Crystal cards"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver to use WindowsSoundSystem
+	  compatible cards. These cards feature a codec chip from either
+	  Analog Devices (such as AD1848, AD1845, AD1812) or Crystal
+	  Semiconductors (such as CS4248, CS423x). This option also supports
+	  the WSS full-duplex operation which currently works with Crystal
+	  CS423x chips. If you don't need full-duplex operation, do not enable
+	  it to save performance.
+
+config SOUNDMODEM_AFSK1200
+	bool "soundmodem support for 1200 baud AFSK modulation"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 1200 baud AFSK modem,
+	  compatible to popular modems using TCM3105 or AM7911. The
+	  demodulator requires about 12% of the CPU power of a Pentium 75 CPU
+	  per channel.
+
+config SOUNDMODEM_AFSK2400_7
+	bool "soundmodem support for 2400 baud AFSK modulation (7.3728MHz crystal)"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 2400 baud AFSK modem,
+	  compatible to TCM3105 modems (over-)clocked with a 7.3728MHz
+	  crystal. Note that the availability of this driver does _not_ imply
+	  that I recommend building such links. It is only here since users
+	  especially in eastern Europe have asked me to do so. In fact this
+	  modulation scheme has many disadvantages, mainly its incompatibility
+	  with many transceiver designs and the fact that the TCM3105 (if
+	  used) is operated widely outside its specifications.
+
+config SOUNDMODEM_AFSK2400_8
+	bool "soundmodem support for 2400 baud AFSK modulation (8MHz crystal)"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 2400 baud AFSK modem,
+	  compatible to TCM3105 modems (over-)clocked with an 8MHz crystal.
+	  Note that the availability of this driver does _not_ imply that I
+	  recommend building such links. It is only here since users
+	  especially in eastern Europe have asked me to do so. In fact this
+	  modulation scheme has many disadvantages, mainly its incompatibility
+	  with many transceiver designs and the fact that the TCM3105 (if
+	  used) is operated widely outside its specifications.
+
+config SOUNDMODEM_AFSK2666
+	bool "soundmodem support for 2666 baud AFSK modulation"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 2666 baud AFSK modem.
+	  This modem is experimental, and not compatible to anything
+	  else I know of.
+
+config SOUNDMODEM_HAPN4800
+	bool "soundmodem support for 4800 baud HAPN-1 modulation"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 4800 baud HAPN-1
+	  compatible modem. This modulation seems to be widely used 'down
+	  under' and in the Netherlands. Here, nobody uses it, so I could not
+	  test if it works. It is compatible to itself, however :-)
+
+config SOUNDMODEM_PSK4800
+	bool "soundmodem support for 4800 baud PSK modulation"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 4800 baud 8PSK modem.
+	  This modem is experimental, and not compatible to anything
+	  else I know of.
+
+config SOUNDMODEM_FSK9600
+	bool "soundmodem support for 9600 baud FSK G3RUH modulation"
+	depends on SOUNDMODEM
+	help
+	  This option enables the soundmodem driver 9600 baud FSK modem,
+	  compatible to the G3RUH standard. The demodulator requires about 4%
+	  of the CPU power of a Pentium 75 CPU per channel. You can say Y to
+	  both 1200 baud AFSK and 9600 baud FSK if you want (but obviously you
+	  can only use one protocol at a time, depending on what the other end
+	  can understand).
+
+config YAM
+	tristate "YAM driver for AX.25"
+	depends on AX25
+	help
+	  The YAM is a modem for packet radio which connects to the serial
+	  port and includes some of the functions of a Terminal Node
+	  Controller. If you have one of those, say Y here.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
--- a/drivers/net/hamradio/baycom_epp.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/net/hamradio/baycom_epp.c	Wed Oct 30 16:44:36 2002
@@ -481,7 +481,7 @@
 ({                                             \
         if (!(notbitstream & (0x1f0 << j)))    \
                 goto stuff##j;                 \
-  encodeend##j:                                \
+  encodeend##j:    	;                      \
 })
 
 #define ENCODEITERB(j)                                          \
@@ -716,7 +716,7 @@
                 goto flgabrt##j;                                              \
         if ((bitstream & (0x1f8 << j)) == (0xf8 << j))   /* stuffed bit */    \
                 goto stuff##j;                                                \
-  enditer##j:                                                                 \
+  enditer##j:      ;                                                           \
 })
 
 #define DECODEITERB(j)                                                                 \
diff -Nru a/drivers/net/hamradio/soundmodem/Makefile b/drivers/net/hamradio/soundmodem/Makefile
--- a/drivers/net/hamradio/soundmodem/Makefile	Wed Oct 30 16:44:19 2002
+++ b/drivers/net/hamradio/soundmodem/Makefile	Wed Oct 30 16:44:19 2002
@@ -38,5 +38,5 @@
 $(obj)/sm_fsk9600.o:    $(obj)/sm_tbl_fsk9600.h
 
 $(obj)/sm_tbl_%: $(obj)/gentbl
-	$(obj)/gentbl
+	cd $(obj) && ./gentbl
 
diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
--- a/drivers/net/ibmlana.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/net/ibmlana.c	Wed Oct 30 16:44:25 2002
@@ -69,6 +69,8 @@
         chars!
   June 1st, 2000
 	corrected version codes, added support for the latest 2.3 changes
+  Oct 28th, 2002
+  	cleaned up for the 2.5 tree <alan@redhat.com>
 
  *************************************************************************/
 
@@ -103,8 +105,9 @@
  * have to pack all state info into the device struct!
  * ------------------------------------------------------------------------ */
 
-static char *MediaNames[Media_Count] =
-    { "10BaseT", "10Base5", "Unknown", "10Base2" };
+static char *MediaNames[Media_Count] = {
+	"10BaseT", "10Base5", "Unknown", "10Base2"
+};
 
 /* ------------------------------------------------------------------------
  * private subfunctions
@@ -113,7 +116,7 @@
 #ifdef DEBUG
   /* dump all registers */
 
-static void dumpregs(struct IBMLANA_NETDEV *dev)
+static void dumpregs(struct net_device *dev)
 {
 	int z;
 
@@ -128,7 +131,7 @@
 
 /* dump parts of shared memory - only needed during debugging */
 
-static void dumpmem(struct IBMLANA_NETDEV *dev, u32 start, u32 len)
+static void dumpmem(struct net_device *dev, u32 start, u32 len)
 {
 	int z;
 
@@ -136,7 +139,7 @@
 	for (z = 0; z < len; z++) {
 		if ((z & 15) == 0)
 			printk("%04x:", z);
-		printk(" %02x", IBMLANA_READB(dev->mem_start + start + z));
+		printk(" %02x", isa_readb(dev->mem_start + start + z));
 		if ((z & 15) == 15)
 			printk("\n");
 	}
@@ -187,12 +190,12 @@
 
 /* wait on register value with mask and timeout */
 
-static int wait_timeout(struct IBMLANA_NETDEV *dev, int regoffs, u16 mask,
+static int wait_timeout(struct net_device *dev, int regoffs, u16 mask,
 			u16 value, int timeout)
 {
 	unsigned long fin = jiffies + timeout;
 
-	while (jiffies != fin)
+	while (time_before(jiffies,fin))
 		if ((inw(dev->base_addr + regoffs) & mask) == value)
 			return 1;
 
@@ -202,7 +205,7 @@
 
 /* reset the whole board */
 
-static void ResetBoard(struct IBMLANA_NETDEV *dev)
+static void ResetBoard(struct net_device *dev)
 {
 	unsigned char bcmval;
 
@@ -226,7 +229,7 @@
 
 /* calculate RAM layout & set up descriptors in RAM */
 
-static void InitDscrs(struct IBMLANA_NETDEV *dev)
+static void InitDscrs(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 	u32 addr, baddr, raddr;
@@ -237,7 +240,7 @@
 
 	/* initialize RAM */
 
-	IBMLANA_SETIO(dev->mem_start, 0xaa,
+	isa_memset_io(dev->mem_start, 0xaa,
 		      dev->mem_start - dev->mem_start);
 
 	/* setup n TX descriptors - independent of RAM size */
@@ -257,29 +260,27 @@
 		else
 			tda.link = addr + sizeof(tda_t);
 		tda.link |= 1;
-		IBMLANA_TOIO(dev->mem_start + addr, &tda, sizeof(tda_t));
+		isa_memcpy_to_io(dev->mem_start + addr, &tda, sizeof(tda_t));
 		addr += sizeof(tda_t);
 		baddr += PKTSIZE;
 	}
 
 	/* calculate how many receive buffers fit into remaining memory */
 
-	priv->rxbufcnt = (dev->mem_end - dev->mem_start - baddr) /
-	    (sizeof(rra_t) + sizeof(rda_t) + PKTSIZE);
+	priv->rxbufcnt = (dev->mem_end - dev->mem_start - baddr) / (sizeof(rra_t) + sizeof(rda_t) + PKTSIZE);
 
 	/* calculate receive addresses */
 
 	priv->rrastart = raddr = priv->txbufstart + (TXBUFCNT * PKTSIZE);
-	priv->rdastart = addr =
-	    priv->rrastart + (priv->rxbufcnt * sizeof(rra_t));
-	priv->rxbufstart = baddr =
-	    priv->rdastart + (priv->rxbufcnt * sizeof(rda_t));
+	priv->rdastart = addr = priv->rrastart + (priv->rxbufcnt * sizeof(rra_t));
+	priv->rxbufstart = baddr = priv->rdastart + (priv->rxbufcnt * sizeof(rda_t));
+	
 	for (z = 0; z < priv->rxbufcnt; z++) {
 		rra.startlo = baddr;
 		rra.starthi = 0;
 		rra.cntlo = PKTSIZE >> 1;
 		rra.cnthi = 0;
-		IBMLANA_TOIO(dev->mem_start + raddr, &rra, sizeof(rra_t));
+		isa_memcpy_to_io(dev->mem_start + raddr, &rra, sizeof(rra_t));
 
 		rda.status = 0;
 		rda.length = 0;
@@ -291,7 +292,7 @@
 		else
 			rda.link = 1;
 		rda.inuse = 1;
-		IBMLANA_TOIO(dev->mem_start + addr, &rda, sizeof(rda_t));
+		isa_memcpy_to_io(dev->mem_start + addr, &rda, sizeof(rda_t));
 
 		baddr += PKTSIZE;
 		raddr += sizeof(rra_t);
@@ -310,7 +311,7 @@
 
 /* set up Rx + Tx descriptors in SONIC */
 
-static int InitSONIC(struct IBMLANA_NETDEV *dev)
+static int InitSONIC(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 
@@ -318,8 +319,7 @@
 
 	outw(0, SONIC_URRA);
 	outw(priv->rrastart, dev->base_addr + SONIC_RSA);
-	outw(priv->rrastart + (priv->rxbufcnt * sizeof(rra_t)),
-	     dev->base_addr + SONIC_REA);
+	outw(priv->rrastart + (priv->rxbufcnt * sizeof(rra_t)), dev->base_addr + SONIC_REA);
 	outw(priv->rrastart, dev->base_addr + SONIC_RRP);
 	outw(priv->rrastart, dev->base_addr + SONIC_RWP);
 
@@ -331,9 +331,7 @@
 
 	outw(CMDREG_RRRA, dev->base_addr + SONIC_CMDREG);
 	if (!wait_timeout(dev, SONIC_CMDREG, CMDREG_RRRA, 0, 2)) {
-		printk
-		    ("%s: SONIC did not respond on RRRA command - giving up.",
-		     dev->name);
+		printk(KERN_ERR "%s: SONIC did not respond on RRRA command - giving up.", dev->name);
 		return 0;
 	}
 
@@ -351,12 +349,11 @@
 
 /* stop SONIC so we can reinitialize it */
 
-static void StopSONIC(struct IBMLANA_NETDEV *dev)
+static void StopSONIC(struct net_device *dev)
 {
 	/* disable interrupts */
 
-	outb(inb(dev->base_addr + BCMREG) & (~BCMREG_IEN),
-	     dev->base_addr + BCMREG);
+	outb(inb(dev->base_addr + BCMREG) & (~BCMREG_IEN), dev->base_addr + BCMREG);
 	outb(0, dev->base_addr + SONIC_IMREG);
 
 	/* reset the SONIC */
@@ -380,7 +377,7 @@
 	(*camcnt)++;
 }
 
-static void InitBoard(struct IBMLANA_NETDEV *dev)
+static void InitBoard(struct net_device *dev)
 {
 	int camcnt;
 	camentry_t cams[16];
@@ -395,14 +392,12 @@
 
 	/* clear all spurious interrupts */
 
-	outw(inw(dev->base_addr + SONIC_ISREG),
-	     dev->base_addr + SONIC_ISREG);
+	outw(inw(dev->base_addr + SONIC_ISREG), dev->base_addr + SONIC_ISREG);
 
 	/* set up the SONIC's bus interface - constant for this adapter -
 	   must be done while the SONIC is in reset */
 
-	outw(DCREG_USR1 | DCREG_USR0 | DCREG_WC1 | DCREG_DW32,
-	     dev->base_addr + SONIC_DCREG);
+	outw(DCREG_USR1 | DCREG_USR0 | DCREG_WC1 | DCREG_DW32, dev->base_addr + SONIC_DCREG);
 	outw(0, dev->base_addr + SONIC_DCREG2);
 
 	/* remove reset form the SONIC */
@@ -434,9 +429,8 @@
 
 	/* feed CDA into SONIC, initialize RCR value (always get broadcasts) */
 
-	IBMLANA_TOIO(dev->mem_start, cams, sizeof(camentry_t) * camcnt);
-	IBMLANA_TOIO(dev->mem_start + (sizeof(camentry_t) * camcnt),
-		     &cammask, sizeof(cammask));
+	isa_memcpy_to_io(dev->mem_start, cams, sizeof(camentry_t) * camcnt);
+	isa_memcpy_to_io(dev->mem_start + (sizeof(camentry_t) * camcnt), &cammask, sizeof(cammask));
 
 #ifdef DEBUG
 	printk("CAM setup:\n");
@@ -447,9 +441,7 @@
 	outw(camcnt, dev->base_addr + SONIC_CAMCNT);
 	outw(CMDREG_LCAM, dev->base_addr + SONIC_CMDREG);
 	if (!wait_timeout(dev, SONIC_CMDREG, CMDREG_LCAM, 0, 2)) {
-		printk
-		    ("%s:SONIC did not respond on LCAM command - giving up.",
-		     dev->name);
+		printk(KERN_ERR "%s:SONIC did not respond on LCAM command - giving up.", dev->name);
 		return;
 	} else {
 		/* clear interrupt condition */
@@ -470,12 +462,9 @@
 			for (z = 0; z < camcnt; z++) {
 				outw(z, dev->base_addr + SONIC_CAMEPTR);
 				printk("Entry %d: %04x %04x %04x\n", z,
-				       inw(dev->base_addr +
-					   SONIC_CAMADDR0),
-				       inw(dev->base_addr +
-					   SONIC_CAMADDR1),
-				       inw(dev->base_addr +
-					   SONIC_CAMADDR2));
+				       inw(dev->base_addr + SONIC_CAMADDR0),
+				       inw(dev->base_addr + SONIC_CAMADDR1),
+				       inw(dev->base_addr + SONIC_CAMADDR2));
 			}
 			outw(0, dev->base_addr + SONIC_CMDREG);
 		}
@@ -515,13 +504,11 @@
 	/* enable transmitter + receiver interrupts */
 
 	outw(CMDREG_RXEN, dev->base_addr + SONIC_CMDREG);
-	outw(IMREG_PRXEN | IMREG_RBEEN | IMREG_PTXEN | IMREG_TXEREN,
-	     dev->base_addr + SONIC_IMREG);
+	outw(IMREG_PRXEN | IMREG_RBEEN | IMREG_PTXEN | IMREG_TXEREN, dev->base_addr + SONIC_IMREG);
 
 	/* turn on card interrupts */
 
-	outb(inb(dev->base_addr + BCMREG) | BCMREG_IEN,
-	     dev->base_addr + BCMREG);
+	outb(inb(dev->base_addr + BCMREG) | BCMREG_IEN, dev->base_addr + BCMREG);
 
 #ifdef DEBUG
 	printk("Register dump after initialization:\n");
@@ -531,7 +518,7 @@
 
 /* start transmission of a descriptor */
 
-static void StartTx(struct IBMLANA_NETDEV *dev, int descr)
+static void StartTx(struct net_device *dev, int descr)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 	int addr;
@@ -554,7 +541,7 @@
 
 /* receive buffer area exhausted */
 
-static void irqrbe_handler(struct IBMLANA_NETDEV *dev)
+static void irqrbe_handler(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 
@@ -566,7 +553,7 @@
 
 /* receive interrupt */
 
-static void irqrx_handler(struct IBMLANA_NETDEV *dev)
+static void irqrx_handler(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 	rda_t rda;
@@ -577,12 +564,9 @@
 	while (1) {
 		/* read descriptor that was next to be filled by SONIC */
 
-		rdaaddr =
-		    priv->rdastart + (priv->nextrxdescr * sizeof(rda_t));
-		lrdaaddr =
-		    priv->rdastart + (priv->lastrxdescr * sizeof(rda_t));
-		IBMLANA_FROMIO(&rda, dev->mem_start + rdaaddr,
-			       sizeof(rda_t));
+		rdaaddr = priv->rdastart + (priv->nextrxdescr * sizeof(rda_t));
+		lrdaaddr = priv->rdastart + (priv->lastrxdescr * sizeof(rda_t));
+		isa_memcpy_fromio(&rda, dev->mem_start + rdaaddr, sizeof(rda_t));
 
 		/* iron out upper word halves of fields we use - SONIC will duplicate 
 		   bits 0..15 to 16..31 */
@@ -609,7 +593,7 @@
 			else {
 				/* copy out data */
 
-				IBMLANA_FROMIO(skb_put(skb, rda.length),
+				isa_memcpy_fromio(skb_put(skb, rda.length),
 					       dev->mem_start +
 					       rda.startlo, rda.length);
 
@@ -620,15 +604,11 @@
 				skb->ip_summed = CHECKSUM_NONE;
 
 				/* bookkeeping */
-
 				dev->last_rx = jiffies;
 				priv->stat.rx_packets++;
-#if (LINUX_VERSION_CODE >= 0x20119)	/* byte counters for kernel >= 2.1.25 */
 				priv->stat.rx_bytes += rda.length;
-#endif
 
 				/* pass to the upper layers */
-
 				netif_rx(skb);
 			}
 		}
@@ -637,10 +617,8 @@
 
 		else {
 			priv->stat.rx_errors++;
-
 			if (rda.status & RCREG_FAER)
 				priv->stat.rx_frame_errors++;
-
 			if (rda.status & RCREG_CRCR)
 				priv->stat.rx_crc_errors++;
 		}
@@ -649,14 +627,14 @@
 
 		rda.link = 1;
 		rda.inuse = 1;
-		IBMLANA_TOIO(dev->mem_start + rdaaddr, &rda,
+		isa_memcpy_to_io(dev->mem_start + rdaaddr, &rda,
 			     sizeof(rda_t));
 
 		/* set up link and EOL = 0 in currently last descriptor. Only write
 		   the link field since the SONIC may currently already access the
 		   other fields. */
 
-		IBMLANA_TOIO(dev->mem_start + lrdaaddr + 20, &rdaaddr, 4);
+		isa_memcpy_to_io(dev->mem_start + lrdaaddr + 20, &rdaaddr, 4);
 
 		/* advance indices */
 
@@ -668,57 +646,39 @@
 
 /* transmit interrupt */
 
-static void irqtx_handler(struct IBMLANA_NETDEV *dev)
+static void irqtx_handler(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 	tda_t tda;
 
 	/* fetch descriptor (we forgot the size ;-) */
-
-	IBMLANA_FROMIO(&tda,
-		       dev->mem_start + priv->tdastart +
-		       (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t));
+	isa_memcpy_fromio(&tda, dev->mem_start + priv->tdastart + (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t));
 
 	/* update statistics */
-
 	priv->stat.tx_packets++;
-#if (LINUX_VERSION_CODE >= 0x020119)
 	priv->stat.tx_bytes += tda.length;
-#endif
 
 	/* update our pointers */
-
 	priv->txused[priv->currtxdescr] = 0;
 	priv->txusedcnt--;
 
 	/* if there are more descriptors present in RAM, start them */
-
 	if (priv->txusedcnt > 0)
 		StartTx(dev, (priv->currtxdescr + 1) % TXBUFCNT);
 
 	/* tell the upper layer we can go on transmitting */
-
-#if LINUX_VERSION_CODE >= 0x02032a
 	netif_wake_queue(dev);
-#else
-	dev->tbusy = 0;
-	mark_bh(NET_BH);
-#endif
 }
 
-static void irqtxerr_handler(struct IBMLANA_NETDEV *dev)
+static void irqtxerr_handler(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 	tda_t tda;
 
 	/* fetch descriptor to check status */
-
-	IBMLANA_FROMIO(&tda,
-		       dev->mem_start + priv->tdastart +
-		       (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t));
+	isa_memcpy_fromio(&tda, dev->mem_start + priv->tdastart + (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t));
 
 	/* update statistics */
-
 	priv->stat.tx_errors++;
 	if (tda.status & (TCREG_NCRS | TCREG_CRSL))
 		priv->stat.tx_carrier_errors++;
@@ -730,47 +690,29 @@
 		priv->stat.tx_fifo_errors++;
 
 	/* update our pointers */
-
 	priv->txused[priv->currtxdescr] = 0;
 	priv->txusedcnt--;
 
 	/* if there are more descriptors present in RAM, start them */
-
 	if (priv->txusedcnt > 0)
 		StartTx(dev, (priv->currtxdescr + 1) % TXBUFCNT);
 
 	/* tell the upper layer we can go on transmitting */
-
-#if LINUX_VERSION_CODE >= 0x02032a
 	netif_wake_queue(dev);
-#else
-	dev->tbusy = 0;
-	mark_bh(NET_BH);
-#endif
 }
 
 /* general interrupt entry */
 
 static void irq_handler(int irq, void *device, struct pt_regs *regs)
 {
-	struct IBMLANA_NETDEV *dev = (struct IBMLANA_NETDEV *) device;
+	struct net_device *dev = (struct net_device *) device;
 	u16 ival;
 
 	/* in case we're not meant... */
-
 	if (!(inb(dev->base_addr + BCMREG) & BCMREG_IPEND))
 		return;
 
-#if (LINUX_VERSION_CODE >= 0x02032a)
-#if 0
-	set_bit(LINK_STATE_RXSEM, &dev->state);
-#endif
-#else
-	dev->interrupt = 1;
-#endif
-
 	/* loop through the interrupt bits until everything is clear */
-
 	while (1) {
 		ival = inw(dev->base_addr + SONIC_ISREG);
 
@@ -778,32 +720,20 @@
 			irqrbe_handler(dev);
 			outw(ISREG_RBE, dev->base_addr + SONIC_ISREG);
 		}
-
 		if (ival & ISREG_PKTRX) {
 			irqrx_handler(dev);
 			outw(ISREG_PKTRX, dev->base_addr + SONIC_ISREG);
 		}
-
 		if (ival & ISREG_TXDN) {
 			irqtx_handler(dev);
 			outw(ISREG_TXDN, dev->base_addr + SONIC_ISREG);
 		}
-
 		if (ival & ISREG_TXER) {
 			irqtxerr_handler(dev);
 			outw(ISREG_TXER, dev->base_addr + SONIC_ISREG);
 		}
-
 		break;
 	}
-
-#if (LINUX_VERSION_CODE >= 0x02032a)
-#if 0
-	clear_bit(LINK_STATE_RXSEM, &dev->state);
-#endif
-#else
-	dev->interrupt = 0;
-#endif
 }
 
 /* ------------------------------------------------------------------------
@@ -815,7 +745,7 @@
 static int ibmlana_getinfo(char *buf, int slot, void *d)
 {
 	int len = 0, i;
-	struct IBMLANA_NETDEV *dev = (struct IBMLANA_NETDEV *) d;
+	struct net_device *dev = (struct net_device *) d;
 	ibmlana_priv *priv;
 
 	/* can't say anything about an uninitialized device... */
@@ -830,11 +760,8 @@
 
 	len += sprintf(buf + len, "IRQ: %d\n", priv->realirq);
 	len += sprintf(buf + len, "I/O: %#lx\n", dev->base_addr);
-	len += sprintf(buf + len, "Memory: %#lx-%#lx\n", dev->mem_start,
-		       dev->mem_end - 1);
-	len +=
-	    sprintf(buf + len, "Transceiver: %s\n",
-		    MediaNames[priv->medium]);
+	len += sprintf(buf + len, "Memory: %#lx-%#lx\n", dev->mem_start, dev->mem_end - 1);
+	len += sprintf(buf + len, "Transceiver: %s\n", MediaNames[priv->medium]);
 	len += sprintf(buf + len, "Device: %s\n", dev->name);
 	len += sprintf(buf + len, "MAC address:");
 	for (i = 0; i < 6; i++)
@@ -847,44 +774,31 @@
 
 /* open driver.  Means also initialization and start of LANCE */
 
-static int ibmlana_open(struct IBMLANA_NETDEV *dev)
+static int ibmlana_open(struct net_device *dev)
 {
 	int result;
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 
 	/* register resources - only necessary for IRQ */
 
-	result =
-	    request_irq(priv->realirq, irq_handler,
-			SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
+	result = request_irq(priv->realirq, irq_handler, SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
 	if (result != 0) {
-		printk("%s: failed to register irq %d\n", dev->name,
-		       dev->irq);
+		printk(KERN_ERR "%s: failed to register irq %d\n", dev->name, dev->irq);
 		return result;
 	}
 	dev->irq = priv->realirq;
 
 	/* set up the card and SONIC */
-
 	InitBoard(dev);
 
 	/* initialize operational flags */
-
-#if (LINUX_VERSION_CODE >= 0x02032a)
 	netif_start_queue(dev);
-#else
-	dev->interrupt = 0;
-	dev->tbusy = 0;
-	dev->start = 1;
-	MOD_INC_USE_COUNT;
-#endif
-
 	return 0;
 }
 
 /* close driver.  Shut down board and free allocated resources */
 
-static int ibmlana_close(struct IBMLANA_NETDEV *dev)
+static int ibmlana_close(struct net_device *dev)
 {
 	/* turn off board */
 
@@ -892,17 +806,12 @@
 	if (dev->irq != 0)
 		free_irq(dev->irq, dev);
 	dev->irq = 0;
-
-#if (LINUX_VERSION_CODE < 0x02032a)
-	MOD_DEC_USE_COUNT;
-#endif
-
 	return 0;
 }
 
 /* transmit a block. */
 
-static int ibmlana_tx(struct sk_buff *skb, struct IBMLANA_NETDEV *dev)
+static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
 	int retval = 0, tmplen, addr;
@@ -910,16 +819,6 @@
 	tda_t tda;
 	int baddr;
 
-	/* if we get called with a NULL descriptor, the Ethernet layer thinks 
-	   our card is stuck an we should reset it.  We'll do this completely: */
-
-	if (skb == NULL) {
-		printk("%s: Resetting SONIC\n", dev->name);
-		StopSONIC(dev);
-		InitBoard(dev);
-		return 0;	/* don't try to free the block here ;-) */
-	}
-
 	/* find out if there are free slots for a frame to transmit. If not,
 	   the upper layer is in deep desperation and we simply ignore the frame. */
 
@@ -930,12 +829,11 @@
 	}
 
 	/* copy the frame data into the next free transmit buffer - fillup missing */
-
 	tmplen = skb->len;
 	if (tmplen < 60)
 		tmplen = 60;
 	baddr = priv->txbufstart + (priv->nexttxdescr * PKTSIZE);
-	IBMLANA_TOIO(dev->mem_start + baddr, skb->data, skb->len);
+	isa_memcpy_to_io(dev->mem_start + baddr, skb->data, skb->len);
 
 	/* copy filler into RAM - in case we're filling up... 
 	   we're filling a bit more than necessary, but that doesn't harm
@@ -947,81 +845,60 @@
 		unsigned int destoffs = skb->len, l = strlen(fill);
 
 		while (destoffs < tmplen) {
-			IBMLANA_TOIO(dev->mem_start + baddr + destoffs,
-				     fill, l);
+			isa_memcpy_to_io(dev->mem_start + baddr + destoffs, fill, l);
 			destoffs += l;
 		}
 	}
 
 	/* set up the new frame descriptor */
-
 	addr = priv->tdastart + (priv->nexttxdescr * sizeof(tda_t));
-	IBMLANA_FROMIO(&tda, dev->mem_start + addr, sizeof(tda_t));
+	isa_memcpy_fromio(&tda, dev->mem_start + addr, sizeof(tda_t));
 	tda.length = tda.fraglength = tmplen;
-	IBMLANA_TOIO(dev->mem_start + addr, &tda, sizeof(tda_t));
+	isa_memcpy_to_io(dev->mem_start + addr, &tda, sizeof(tda_t));
 
 	/* if there were no active descriptors, trigger the SONIC */
-
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&priv->lock, flags);
 
 	priv->txusedcnt++;
 	priv->txused[priv->nexttxdescr] = 1;
 
 	/* are all transmission slots used up ? */
-
 	if (priv->txusedcnt >= TXBUFCNT)
-#if (LINUX_VERSION_CODE >= 0x02032a)
 		netif_stop_queue(dev);
-#else
-		dev->tbusy = 1;
-#endif
 
 	if (priv->txusedcnt == 1)
 		StartTx(dev, priv->nexttxdescr);
 	priv->nexttxdescr = (priv->nexttxdescr + 1) % TXBUFCNT;
 
-	restore_flags(flags);
-
-      tx_done:
-
-	/* When did that change exactly ? */
-
-#if (LINUX_VERSION_CODE >= 0x20200)
+	spin_unlock_irqrestore(&priv->lock, flags);
+tx_done:
 	dev_kfree_skb(skb);
-#else
-	dev_kfree_skb(skb, FREE_WRITE);
-#endif
 	return retval;
 }
 
 /* return pointer to Ethernet statistics */
 
-static struct net_device_stats *ibmlana_stats(struct IBMLANA_NETDEV *dev)
+static struct net_device_stats *ibmlana_stats(struct net_device *dev)
 {
 	ibmlana_priv *priv = (ibmlana_priv *) dev->priv;
-
-	return &(priv->stat);
+	return &priv->stat;
 }
 
 /* we don't support runtime reconfiguration, since am MCA card can
    be unambigously identified by its POS registers. */
 
-static int ibmlana_config(struct IBMLANA_NETDEV *dev, struct ifmap *map)
+static int ibmlana_config(struct net_device *dev, struct ifmap *map)
 {
 	return 0;
 }
 
 /* switch receiver mode. */
 
-static void ibmlana_set_multicast_list(struct IBMLANA_NETDEV *dev)
+static void ibmlana_set_multicast_list(struct net_device *dev)
 {
 	/* first stop the SONIC... */
-
 	StopSONIC(dev);
-
 	/* ...then reinit it with the new flags */
-
 	InitBoard(dev);
 }
 
@@ -1031,7 +908,7 @@
 
 static int startslot;		/* counts through slots when probing multiple devices */
 
-int ibmlana_probe(struct IBMLANA_NETDEV *dev)
+int ibmlana_probe(struct net_device *dev)
 {
 	int force_detect = 0;
 	int slot, z;
@@ -1039,22 +916,17 @@
 	ibmlana_priv *priv;
 	ibmlana_medium medium;
 
-#if (LINUX_VERSION_CODE >= 0x02032a)
 	SET_MODULE_OWNER(dev);
-#endif
 
 	/* can't work without an MCA bus ;-) */
-
 	if (MCA_bus == 0)
 		return -ENODEV;
 
 	/* start address of 1 --> forced detection */
-
 	if (dev->mem_start == 1)
 		force_detect = 1;
 
 	/* search through slots */
-
 	if (dev != NULL) {
 		base = dev->mem_start;
 		irq = dev->irq;
@@ -1063,70 +935,51 @@
 
 	while (slot != -1) {
 		/* deduce card addresses */
-
 		getaddrs(slot, &base, &memlen, &iobase, &irq, &medium);
 
-#if (LINUX_VERSION_CODE >= 0x20300)
 		/* slot already in use ? */
-
 		if (mca_is_adapter_used(slot)) {
 			slot = mca_find_adapter(IBM_LANA_ID, slot + 1);
 			continue;
 		}
-#endif
-
 		/* were we looking for something different ? */
-
-		if ((dev->irq != 0) || (dev->mem_start != 0)) {
-			if ((dev->irq != 0) && (dev->irq != irq)) {
-				slot =
-				    mca_find_adapter(IBM_LANA_ID,
-						     slot + 1);
+		if (dev->irq != 0 || dev->mem_start != 0) {
+			if (dev->irq != 0 && dev->irq != irq) {
+				slot = mca_find_adapter(IBM_LANA_ID, slot + 1);
 				continue;
 			}
-			if ((dev->mem_start != 0)
-			    && (dev->mem_start != base)) {
-				slot =
-				    mca_find_adapter(IBM_LANA_ID,
-						     slot + 1);
+			if (dev->mem_start != 0 && dev->mem_start != base) 
+			{
+				slot = mca_find_adapter(IBM_LANA_ID, slot + 1);
 				continue;
 			}
 		}
-
 		/* found something that matches */
-
 		break;
 	}
 
 	/* nothing found ? */
-
 	if (slot == -1)
-		return ((base != 0) || (irq != 0)) ? -ENXIO : -ENODEV;
+		return (base != 0 || irq != 0) ? -ENXIO : -ENODEV;
 
 	/* announce success */
-	printk("%s: IBM LAN Adapter/A found in slot %d\n", dev->name,
-	       slot + 1);
+	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("%s: cannot allocate I/O range at %#x!\n", dev->name, iobase);
+		printk(KERN_ERR "%s: cannot allocate I/O range at %#x!\n", dev->name, iobase);
 		startslot = slot + 1;
 		return -EBUSY;
 	}
 
 	/* make procfs entries */
-
 	mca_set_adapter_name(slot, "IBM LAN Adapter/A");
 	mca_set_adapter_procfn(slot, (MCA_ProcFn) ibmlana_getinfo, dev);
 
-#if (LINUX_VERSION_CODE >= 0x20200)
 	mca_mark_as_used(slot);
-#endif
 
 	/* allocate structure */
-
-	priv = dev->priv =
-	    (ibmlana_priv *) kmalloc(sizeof(ibmlana_priv), GFP_KERNEL);
+	priv = dev->priv = (ibmlana_priv *) kmalloc(sizeof(ibmlana_priv), GFP_KERNEL);
 	if (!priv) {
 		release_region(iobase, IBM_LANA_IORANGE);
 		return -ENOMEM;
@@ -1134,7 +987,8 @@
 	priv->slot = slot;
 	priv->realirq = irq;
 	priv->medium = medium;
-	memset(&(priv->stat), 0, sizeof(struct net_device_stats));
+	spin_lock_init(&priv->lock);
+	memset(&priv->stat, 0, sizeof(struct net_device_stats));
 
 	/* set base + irq for this device (irq not allocated so far) */
 
@@ -1165,13 +1019,13 @@
 
 	/* print config */
 
-	printk("%s: IRQ %d, I/O %#lx, memory %#lx-%#lx, "
+	printk(KERN_INFO "%s: IRQ %d, I/O %#lx, memory %#lx-%#lx, "
 	       "MAC address %02x:%02x:%02x:%02x:%02x:%02x.\n",
 	       dev->name, priv->realirq, dev->base_addr,
 	       dev->mem_start, dev->mem_end - 1,
 	       dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
 	       dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
-	printk("%s: %s medium\n", dev->name, MediaNames[priv->medium]);
+	printk(KERN_INFO "%s: %s medium\n", dev->name, MediaNames[priv->medium]);
 
 	/* reset board */
 
@@ -1192,9 +1046,10 @@
 
 #define DEVMAX 5
 
-static struct IBMLANA_NETDEV moddevs[DEVMAX];
+static struct net_device moddevs[DEVMAX];
 static int irq;
 static int io;
+
 MODULE_PARM(irq, "i");
 MODULE_PARM(io, "i");
 MODULE_PARM_DESC(irq, "IBM LAN/A IRQ number");
@@ -1214,21 +1069,15 @@
 		if (res != 0)
 			return (z > 0) ? 0 : -EIO;
 	}
-
 	return 0;
 }
 
 void cleanup_module(void)
 {
-	struct IBMLANA_NETDEV *dev;
+	struct net_device *dev;
 	ibmlana_priv *priv;
 	int z;
 
-	if (MOD_IN_USE) {
-		printk("cannot unload, module in use\n");
-		return;
-	}
-
 	for (z = 0; z < DEVMAX; z++) {
 		dev = moddevs + z;
 		if (dev->priv != NULL) {
@@ -1239,9 +1088,7 @@
 			dev->irq = 0;
 			release_region(dev->base_addr, IBM_LANA_IORANGE);
 			unregister_netdev(dev);
-#if (LINUX_VERSION_CODE >= 0x20200)
 			mca_mark_as_unused(priv->slot);
-#endif
 			mca_set_adapter_name(priv->slot, "");
 			mca_set_adapter_procfn(priv->slot, NULL, NULL);
 			kfree(dev->priv);
diff -Nru a/drivers/net/ibmlana.h b/drivers/net/ibmlana.h
--- a/drivers/net/ibmlana.h	Wed Oct 30 16:44:32 2002
+++ b/drivers/net/ibmlana.h	Wed Oct 30 16:44:32 2002
@@ -3,22 +3,6 @@
 
 #ifdef _IBM_LANA_DRIVER_
 
-/* version-dependent functions/structures */
-
-#if LINUX_VERSION_CODE >= 0x020318
-#define IBMLANA_READB(addr) isa_readb(addr)
-#define IBMLANA_TOIO(dest, src, len) isa_memcpy_toio(dest, src, len)
-#define IBMLANA_FROMIO(dest, src, len) isa_memcpy_fromio(dest, src, len)
-#define IBMLANA_SETIO(dest, val, len) isa_memset_io(dest, val, len)
-#define IBMLANA_NETDEV net_device
-#else
-#define IBMLANA_READB(addr) readb(addr)
-#define IBMLANA_TOIO(dest, src, len) memcpy_toio(dest, src, len)
-#define IBMLANA_FROMIO(dest, src, len) memcpy_fromio(dest, src, len)
-#define IBMLANA_SETIO(dest, val, len) memset_io(dest, val, len)
-#define IBMLANA_NETDEV device
-#endif
-
 /* maximum packet size */
 
 #define PKTSIZE 1524
@@ -33,25 +17,27 @@
 /* media enumeration - defined in a way that it fits onto the LAN/A's
    POS registers... */
 
-typedef enum { Media_10BaseT, Media_10Base5,
+typedef enum { 
+	Media_10BaseT, Media_10Base5,
 	Media_Unknown, Media_10Base2, Media_Count
 } ibmlana_medium;
 
 /* private structure */
 
 typedef struct {
-	unsigned int slot;	/* MCA-Slot-#                       */
+	unsigned int slot;		/* MCA-Slot-#                       */
 	struct net_device_stats stat;	/* packet statistics            */
-	int realirq;		/* memorizes actual IRQ, even when 
-				   currently not allocated          */
-	ibmlana_medium medium;	/* physical cannector               */
-	u32 tdastart, txbufstart,	/* addresses                        */
-	 rrastart, rxbufstart, rdastart, rxbufcnt, txusedcnt;
-	int nextrxdescr,	/* next rx descriptor to be used    */
-	 lastrxdescr,		/* last free rx descriptor          */
-	 nexttxdescr,		/* last tx descriptor to be used    */
-	 currtxdescr,		/* tx descriptor currently tx'ed    */
-	 txused[TXBUFCNT];	/* busy flags                       */
+	int realirq;			/* memorizes actual IRQ, even when 
+					   currently not allocated          */
+	ibmlana_medium medium;		/* physical cannector               */
+	u32 	tdastart, txbufstart,	/* addresses                        */
+		rrastart, rxbufstart, rdastart, rxbufcnt, txusedcnt;
+	int 	nextrxdescr,		/* next rx descriptor to be used    */
+		lastrxdescr,		/* last free rx descriptor          */
+		nexttxdescr,		/* last tx descriptor to be used    */
+		currtxdescr,		/* tx descriptor currently tx'ed    */
+		txused[TXBUFCNT];	/* busy flags                       */
+	spinlock_t lock;
 } ibmlana_priv;
 
 /* this card uses quite a lot of I/O ports...luckily the MCA bus decodes 
@@ -289,7 +275,7 @@
 
 #endif				/* _IBM_LANA_DRIVER_ */
 
-extern int ibmlana_probe(struct IBMLANA_NETDEV *);
+extern int ibmlana_probe(struct net_device *);
 
 
 #endif	/* _IBM_LANA_INCLUDE_ */
diff -Nru a/drivers/net/irda/Config.help b/drivers/net/irda/Config.help
--- a/drivers/net/irda/Config.help	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,192 +0,0 @@
-CONFIG_IRTTY_SIR
-  Say Y here if you want to build support for the IrTTY line
-  discipline.  If you want to compile it as a module (irtty.o), say M
-  here and read <file:Documentation/modules.txt>.  IrTTY makes it
-  possible to use Linux's own serial driver for all IrDA ports that
-  are 16550 compatible.  Most IrDA chips are 16550 compatible so you
-  should probably say Y to this option.  Using IrTTY will however
-  limit the speed of the connection to 115200 bps (IrDA SIR mode).
-
-  If unsure, say Y.
-
-CONFIG_IRPORT_SIR
-  Say Y here if you want to build support for the IrPORT IrDA device
-  driver. If you want to compile it as a module (irport.o), say M here
-  and read <file:Documentation/modules.txt>.  IrPORT can be used
-  instead of IrTTY and sometimes this can be better.  One example is
-  if your IrDA port does not have echo-canceling, which will work OK
-  with IrPORT since this driver is working in half-duplex mode only.
-  You don't need to use irattach with IrPORT, but you just insert it
-  the same way as FIR drivers (insmod irport io=0x3e8 irq=11).  Notice
-  that IrPORT is a SIR device driver which means that speed is limited
-  to 115200 bps.
-
-  If unsure, say Y.
-
-CONFIG_USB_IRDA
-  Say Y here if you want to build support for the USB IrDA FIR Dongle
-  device driver.  If you want to compile it as a module (irda-usb.o),
-  say M here and read <file:Documentation/modules.txt>.  IrDA-USB
-  support the various IrDA USB dongles available and most of their
-  pecularities.  Those dongles plug in the USB port of your computer,
-  are plug and play, and support SIR and FIR (4Mbps) speeds.  On the
-  other hand, those dongles tend to be less efficient than a FIR
-  chipset.
-
-  Please note that the driver is still experimental.  And of course,
-  you will need both USB and IrDA support in your kernel...
-
-CONFIG_WINBOND_FIR
-  Say Y here if you want to build IrDA support for the Winbond
-  W83977AF super-io chipset.  This driver should be used for the IrDA
-  chipset in the Corel NetWinder.  The driver supports SIR, MIR and
-  FIR (4Mbps) speeds.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  w83977af_ir.o.
-
-CONFIG_NSC_FIR
-  Say Y here if you want to build support for the NSC PC87108 and
-  PC87338 IrDA chipsets.  This driver supports SIR,
-  MIR and FIR (4Mbps) speeds.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  nsc-ircc.o.
-
-CONFIG_TOSHIBA_OLD
-  Say Y here if you want to build support for the Toshiba Type-O IR
-  chipset.  This chipset is used by the Toshiba Libretto 100CT, and
-  many more laptops. This driver is obsolete, will no more be
-  maintained and will be removed in favor of the new driver.
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called toshoboe.o.
-
-CONFIG_TOSHIBA_FIR
-  Say Y here if you want to build support for the Toshiba Type-O IR
-  and Donau oboe chipsets. These chipsets are used by the Toshiba
-  Libretto 100/110CT, Tecra 8100, Portege 7020 and many more laptops.
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called donauboe.o.
-
-CONFIG_SMC_IRCC_FIR
-  Say Y here if you want to build support for the SMC Infrared
-  Communications Controller.  It is used in the Fujitsu Lifebook 635t
-  and Sony PCG-505TX.  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.  The module will be
-  called smc-ircc.o.
-
-CONFIG_ALI_FIR
-  Say Y here if you want to build support for the ALi M5123 FIR
-  Controller.  The ALi M5123 FIR Controller is embedded in ALi M1543C,
-  M1535, M1535D, M1535+, M1535D Sourth Bridge.  This driver supports
-  SIR, MIR and FIR (4Mbps) speeds.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  ali-ircc.o.
-
-CONFIG_VLSI_FIR
-  Say Y here if you want to build support for the VLSI 82C147
-  PCI-IrDA Controller. This controller is used by the HP OmniBook 800
-  and 5500 notebooks. The driver provides support for SIR, MIR and
-  FIR (4Mbps) speeds.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>. The module will be called vlsi_ir.o.
-
-CONFIG_DONGLE
-  Say Y here if you have an infrared device that connects to your
-  computer's serial port. These devices are called dongles. Then say Y
-  or M to the driver for your particular dongle below.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about serial dongles.
-
-CONFIG_ESI_DONGLE
-  Say Y here if you want to build support for the Extended Systems
-  JetEye PC dongle.  If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.  The ESI dongle attaches
-  to the normal 9-pin serial port connector, and can currently only be
-  used by IrTTY.  To activate support for ESI dongles you will have to
-  start irattach like this: "irattach -d esi".
-
-CONFIG_ACTISYS_DONGLE
-  Say Y here if you want to build support for the ACTiSYS IR-220L and
-  IR220L+ dongles.  If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.  The ACTiSYS dongles
-  attaches to the normal 9-pin serial port connector, and can
-  currently only be used by IrTTY.  To activate support for ACTiSYS
-  dongles you will have to start irattach like this:
-  "irattach -d actisys" or "irattach -d actisys+".
-
-CONFIG_TEKRAM_DONGLE
-  Say Y here if you want to build support for the Tekram IrMate 210B
-  dongle.  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The Tekram dongle attaches to the
-  normal 9-pin serial port connector, and can currently only be used
-  by IrTTY.  To activate support for Tekram dongles you will have to
-  start irattach like this: "irattach -d tekram".
-
-CONFIG_GIRBIL_DONGLE
-  Say Y here if you want to build support for the Greenwich GIrBIL
-  dongle.  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The Greenwich dongle attaches to
-  the normal 9-pin serial port connector, and can currently only be
-  used by IrTTY.  To activate support for Greenwich dongles you will
-  have to insert "irattach -d girbil" in the /etc/irda/drivers script.
-
-CONFIG_LITELINK_DONGLE
-  Say Y here if you want to build support for the Parallax Litelink
-  dongle.  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The Parallax dongle attaches to
-  the normal 9-pin serial port connector, and can currently only be
-  used by IrTTY.  To activate support for Parallax dongles you will
-  have to start irattach like this "irattach -d litelink".
-
-Microchip MCP2120 dongle
-CONFIG_MCP2120_DONGLE
-  Say Y here if you want to build support for the Microchip MCP2120
-  dongle.  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The MCP2120 dongle attaches to
-  the normal 9-pin serial port connector, and can currently only be
-  used by IrTTY.  To activate support for MCP2120 dongles you will
-  have to insert "irattach -d mcp2120" in the /etc/irda/drivers script.
-
-  You must build this dongle yourself.  For more information see:
-  <http://www.eyetap.org/~tangf/irda_sir_linux.html>
-
-CONFIG_OLD_BELKIN_DONGLE
-  Say Y here if you want to build support for the Adaptec Airport 1000
-  and 2000 dongles.  If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.  The module will be
-  called old_belkin.o.  Some information is contained in the comments
-  at the top of <file:drivers/net/irda/old_belkin.c>.
-
-ACTiSYS IR-200L dongle (Experimental)
-CONFIG_ACT200L_DONGLE
-  Say Y here if you want to build support for the ACTiSYS IR-200L
-  dongle. If you want to compile it as a module, say M here and read
-  Documentation/modules.txt. The ACTiSYS IR-200L dongle attaches to
-  the normal 9-pin serial port connector, and can currently only be
-  used by IrTTY. To activate support for ACTiSYS IR-200L dongles
-  you will have to start irattach like this: "irattach -d act200l".
-
-Mobile Action MA600 dongle (Experimental)
-CONFIG_MA600_DONGLE
-  Say Y here if you want to build support for the Mobile Action MA600
-  dongle.  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The MA600 dongle attaches to
-  the normal 9-pin serial port connector, and can currently only be
-  tested on IrCOMM.  To activate support for MA600 dongles you will
-  have to insert "irattach -d ma600" in the /etc/irda/drivers script.
-  Note: irutils 0.9.15 requires no modification. irutils 0.9.9 needs
-  modification. For more information, download the following tar gzip
-  file.
-
-  There is a pre-compiled module on
-  <http://engsvr.ust.hk/~eetwl95/download/ma600-2.4.x.tar.gz>
diff -Nru a/drivers/net/irda/Config.in b/drivers/net/irda/Config.in
--- a/drivers/net/irda/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,42 +0,0 @@
-mainmenu_option next_comment
-comment 'Infrared-port device drivers'
-
-comment 'SIR device drivers'
-dep_tristate 'IrTTY (uses Linux serial driver)' CONFIG_IRTTY_SIR $CONFIG_IRDA
-dep_tristate 'IrPORT (IrDA serial driver)' CONFIG_IRPORT_SIR $CONFIG_IRDA
-
-comment 'Dongle support' 
-bool 'Serial dongle support' CONFIG_DONGLE
-if [ "$CONFIG_DONGLE" != "n" ]; then
-   dep_tristate '  ESI JetEye PC dongle' CONFIG_ESI_DONGLE $CONFIG_IRDA
-   dep_tristate '  ACTiSYS IR-220L and IR220L+ dongle' CONFIG_ACTISYS_DONGLE $CONFIG_IRDA
-   dep_tristate '  Tekram IrMate 210B dongle' CONFIG_TEKRAM_DONGLE $CONFIG_IRDA
-   dep_tristate '  Greenwich GIrBIL dongle' CONFIG_GIRBIL_DONGLE $CONFIG_IRDA
-   dep_tristate '  Parallax LiteLink dongle' CONFIG_LITELINK_DONGLE $CONFIG_IRDA
-   dep_tristate '  Microchip MCP2120' CONFIG_MCP2120_DONGLE $CONFIG_IRDA
-   dep_tristate '  Old Belkin dongle' CONFIG_OLD_BELKIN_DONGLE $CONFIG_IRDA   
-   if [ "$CONFIG_ARCH_EP7211" = "y" ]; then
-      dep_tristate '  EP7211 I/R support' CONFIG_EP7211_IR $CONFIG_IRDA
-   fi
-   if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
-      dep_tristate '  ACTiSYS IR-200L dongle (EXPERIMENTAL)' CONFIG_ACT200L_DONGLE $CONFIG_IRDA
-      dep_tristate '  Mobile Action MA600 dongle (EXPERIMENTAL)' CONFIG_MA600_DONGLE $CONFIG_IRDA
-   fi
-fi
-
-comment 'FIR device drivers'
-dep_tristate 'IrDA USB dongles (EXPERIMENTAL)' CONFIG_USB_IRDA $CONFIG_IRDA $CONFIG_USB $CONFIG_EXPERIMENTAL
-dep_tristate 'NSC PC87108/PC87338' CONFIG_NSC_FIR  $CONFIG_IRDA
-dep_tristate 'Winbond W83977AF (IR)' CONFIG_WINBOND_FIR $CONFIG_IRDA
-dep_tristate 'Toshiba Type-O IR Port (old driver)' CONFIG_TOSHIBA_OLD $CONFIG_IRDA
-dep_tristate 'Toshiba Type-O IR Port' CONFIG_TOSHIBA_FIR $CONFIG_IRDA
-if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
-dep_tristate 'SMC IrCC (EXPERIMENTAL)' CONFIG_SMC_IRCC_FIR $CONFIG_IRDA
-dep_tristate 'ALi M5123 FIR (EXPERIMENTAL)' CONFIG_ALI_FIR $CONFIG_IRDA
-dep_tristate 'VLSI 82C147 SIR/MIR/FIR (EXPERIMENTAL)' CONFIG_VLSI_FIR $CONFIG_IRDA
-fi
-if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
-   dep_tristate 'SA1100 Internal IR' CONFIG_SA1100_FIR $CONFIG_IRDA
-fi
-
-endmenu
diff -Nru a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/irda/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,269 @@
+
+menu "Infrared-port device drivers"
+	depends on IRDA!=n
+
+comment "SIR device drivers"
+
+config IRTTY_SIR
+	tristate "IrTTY (uses Linux serial driver)"
+	depends on IRDA
+	help
+	  Say Y here if you want to build support for the IrTTY line
+	  discipline.  If you want to compile it as a module (irtty.o), say M
+	  here and read <file:Documentation/modules.txt>.  IrTTY makes it
+	  possible to use Linux's own serial driver for all IrDA ports that
+	  are 16550 compatible.  Most IrDA chips are 16550 compatible so you
+	  should probably say Y to this option.  Using IrTTY will however
+	  limit the speed of the connection to 115200 bps (IrDA SIR mode).
+
+	  If unsure, say Y.
+
+config IRPORT_SIR
+	tristate "IrPORT (IrDA serial driver)"
+	depends on IRDA
+	---help---
+	  Say Y here if you want to build support for the IrPORT IrDA device
+	  driver. If you want to compile it as a module (irport.o), say M here
+	  and read <file:Documentation/modules.txt>.  IrPORT can be used
+	  instead of IrTTY and sometimes this can be better.  One example is
+	  if your IrDA port does not have echo-canceling, which will work OK
+	  with IrPORT since this driver is working in half-duplex mode only.
+	  You don't need to use irattach with IrPORT, but you just insert it
+	  the same way as FIR drivers (insmod irport io=0x3e8 irq=11).  Notice
+	  that IrPORT is a SIR device driver which means that speed is limited
+	  to 115200 bps.
+
+	  If unsure, say Y.
+
+comment "Dongle support"
+
+config DONGLE
+	bool "Serial dongle support"
+	help
+	  Say Y here if you have an infrared device that connects to your
+	  computer's serial port. These devices are called dongles. Then say Y
+	  or M to the driver for your particular dongle below.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about serial dongles.
+
+config ESI_DONGLE
+	tristate "ESI JetEye PC dongle"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the Extended Systems
+	  JetEye PC dongle.  If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.  The ESI dongle attaches
+	  to the normal 9-pin serial port connector, and can currently only be
+	  used by IrTTY.  To activate support for ESI dongles you will have to
+	  start irattach like this: "irattach -d esi".
+
+config ACTISYS_DONGLE
+	tristate "ACTiSYS IR-220L and IR220L+ dongle"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the ACTiSYS IR-220L and
+	  IR220L+ dongles.  If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.  The ACTiSYS dongles
+	  attaches to the normal 9-pin serial port connector, and can
+	  currently only be used by IrTTY.  To activate support for ACTiSYS
+	  dongles you will have to start irattach like this:
+	  "irattach -d actisys" or "irattach -d actisys+".
+
+config TEKRAM_DONGLE
+	tristate "Tekram IrMate 210B dongle"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the Tekram IrMate 210B
+	  dongle.  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The Tekram dongle attaches to the
+	  normal 9-pin serial port connector, and can currently only be used
+	  by IrTTY.  To activate support for Tekram dongles you will have to
+	  start irattach like this: "irattach -d tekram".
+
+config GIRBIL_DONGLE
+	tristate "Greenwich GIrBIL dongle"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the Greenwich GIrBIL
+	  dongle.  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The Greenwich dongle attaches to
+	  the normal 9-pin serial port connector, and can currently only be
+	  used by IrTTY.  To activate support for Greenwich dongles you will
+	  have to insert "irattach -d girbil" in the /etc/irda/drivers script.
+
+config LITELINK_DONGLE
+	tristate "Parallax LiteLink dongle"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the Parallax Litelink
+	  dongle.  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The Parallax dongle attaches to
+	  the normal 9-pin serial port connector, and can currently only be
+	  used by IrTTY.  To activate support for Parallax dongles you will
+	  have to start irattach like this "irattach -d litelink".
+
+config MCP2120_DONGLE
+	tristate "Microchip MCP2120"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the Microchip MCP2120
+	  dongle.  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The MCP2120 dongle attaches to
+	  the normal 9-pin serial port connector, and can currently only be
+	  used by IrTTY.  To activate support for MCP2120 dongles you will
+	  have to insert "irattach -d mcp2120" in the /etc/irda/drivers script.
+
+	  You must build this dongle yourself.  For more information see:
+	  <http://www.eyetap.org/~tangf/irda_sir_linux.html>
+
+config OLD_BELKIN_DONGLE
+	tristate "Old Belkin dongle"
+	depends on DONGLE && IRDA
+	help
+	  Say Y here if you want to build support for the Adaptec Airport 1000
+	  and 2000 dongles.  If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.  The module will be
+	  called old_belkin.o.  Some information is contained in the comments
+	  at the top of <file:drivers/net/irda/old_belkin.c>.
+
+config EP7211_IR
+	tristate "EP7211 I/R support"
+	depends on DONGLE && ARCH_EP7211 && IRDA
+
+config ACT200L_DONGLE
+	tristate "ACTiSYS IR-200L dongle (EXPERIMENTAL)"
+	depends on DONGLE && EXPERIMENTAL && IRDA
+	help
+	  Say Y here if you want to build support for the ACTiSYS IR-200L
+	  dongle. If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt. The ACTiSYS IR-200L dongle attaches to
+	  the normal 9-pin serial port connector, and can currently only be
+	  used by IrTTY. To activate support for ACTiSYS IR-200L dongles
+	  you will have to start irattach like this: "irattach -d act200l".
+
+config MA600_DONGLE
+	tristate "Mobile Action MA600 dongle (EXPERIMENTAL)"
+	depends on DONGLE && EXPERIMENTAL && IRDA
+	---help---
+	  Say Y here if you want to build support for the Mobile Action MA600
+	  dongle.  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The MA600 dongle attaches to
+	  the normal 9-pin serial port connector, and can currently only be
+	  tested on IrCOMM.  To activate support for MA600 dongles you will
+	  have to insert "irattach -d ma600" in the /etc/irda/drivers script.
+	  Note: irutils 0.9.15 requires no modification. irutils 0.9.9 needs
+	  modification. For more information, download the following tar gzip
+	  file.
+
+	  There is a pre-compiled module on
+	  <http://engsvr.ust.hk/~eetwl95/download/ma600-2.4.x.tar.gz>
+
+comment "FIR device drivers"
+
+config USB_IRDA
+	tristate "IrDA USB dongles (EXPERIMENTAL)"
+	depends on IRDA && USB && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to build support for the USB IrDA FIR Dongle
+	  device driver.  If you want to compile it as a module (irda-usb.o),
+	  say M here and read <file:Documentation/modules.txt>.  IrDA-USB
+	  support the various IrDA USB dongles available and most of their
+	  pecularities.  Those dongles plug in the USB port of your computer,
+	  are plug and play, and support SIR and FIR (4Mbps) speeds.  On the
+	  other hand, those dongles tend to be less efficient than a FIR
+	  chipset.
+
+	  Please note that the driver is still experimental.  And of course,
+	  you will need both USB and IrDA support in your kernel...
+
+config NSC_FIR
+	tristate "NSC PC87108/PC87338"
+	depends on IRDA
+	help
+	  Say Y here if you want to build support for the NSC PC87108 and
+	  PC87338 IrDA chipsets.  This driver supports SIR,
+	  MIR and FIR (4Mbps) speeds.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  nsc-ircc.o.
+
+config WINBOND_FIR
+	tristate "Winbond W83977AF (IR)"
+	depends on IRDA
+	help
+	  Say Y here if you want to build IrDA support for the Winbond
+	  W83977AF super-io chipset.  This driver should be used for the IrDA
+	  chipset in the Corel NetWinder.  The driver supports SIR, MIR and
+	  FIR (4Mbps) speeds.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  w83977af_ir.o.
+
+config TOSHIBA_OLD
+	tristate "Toshiba Type-O IR Port (old driver)"
+	depends on IRDA
+	help
+	  Say Y here if you want to build support for the Toshiba Type-O IR
+	  chipset.  This chipset is used by the Toshiba Libretto 100CT, and
+	  many more laptops. This driver is obsolete, will no more be
+	  maintained and will be removed in favor of the new driver.
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called toshoboe.o.
+
+config TOSHIBA_FIR
+	tristate "Toshiba Type-O IR Port"
+	depends on IRDA
+	help
+	  Say Y here if you want to build support for the Toshiba Type-O IR
+	  and Donau oboe chipsets. These chipsets are used by the Toshiba
+	  Libretto 100/110CT, Tecra 8100, Portege 7020 and many more laptops.
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called donauboe.o.
+
+config SMC_IRCC_FIR
+	tristate "SMC IrCC (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IRDA
+	help
+	  Say Y here if you want to build support for the SMC Infrared
+	  Communications Controller.  It is used in the Fujitsu Lifebook 635t
+	  and Sony PCG-505TX.  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.  The module will be
+	  called smc-ircc.o.
+
+config ALI_FIR
+	tristate "ALi M5123 FIR (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IRDA
+	help
+	  Say Y here if you want to build support for the ALi M5123 FIR
+	  Controller.  The ALi M5123 FIR Controller is embedded in ALi M1543C,
+	  M1535, M1535D, M1535+, M1535D Sourth Bridge.  This driver supports
+	  SIR, MIR and FIR (4Mbps) speeds.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  ali-ircc.o.
+
+config VLSI_FIR
+	tristate "VLSI 82C147 SIR/MIR/FIR (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IRDA
+	help
+	  Say Y here if you want to build support for the VLSI 82C147
+	  PCI-IrDA Controller. This controller is used by the HP OmniBook 800
+	  and 5500 notebooks. The driver provides support for SIR, MIR and
+	  FIR (4Mbps) speeds.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>. The module will be called vlsi_ir.o.
+
+config SA1100_FIR
+	tristate "SA1100 Internal IR"
+	depends on ARCH_SA1100 && IRDA
+
+endmenu
+
diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
--- a/drivers/net/irda/irda-usb.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/irda/irda-usb.c	Wed Oct 30 16:44:28 2002
@@ -41,7 +41,7 @@
  * This driver has NOT been tested with the following drivers :
  *	o ehci-hcd	(USB 2.0 controllers)
  *
- * Note that all HCD drivers do USB_ZERO_PACKET and timeout properly,
+ * Note that all HCD drivers do URB_ZERO_PACKET and timeout properly,
  * so we don't have to worry about that anymore.
  * One common problem is the failure to set the address on the dongle,
  * but this happens before the driver gets loaded...
@@ -265,12 +265,12 @@
 	irda_usb_build_header(self, frame, 1);
 
 	/* Submit the 0 length IrDA frame to trigger new speed settings */
-        FILL_BULK_URB(urb, self->usbdev,
+        usb_fill_bulk_urb(urb, self->usbdev,
 		      usb_sndbulkpipe(self->usbdev, self->bulk_out_ep),
                       frame, IRDA_USB_SPEED_MTU,
                       speed_bulk_callback, self);
 	urb->transfer_buffer_length = USB_IRDA_HEADER;
-	urb->transfer_flags = USB_ASYNC_UNLINK;
+	urb->transfer_flags = URB_ASYNC_UNLINK;
 	urb->timeout = MSECS_TO_JIFFIES(100);
 
 	/* Irq disabled -> GFP_ATOMIC */
@@ -400,20 +400,20 @@
 	/* FIXME: Make macro out of this one */
 	((struct irda_skb_cb *)skb->cb)->context = self;
 
-        FILL_BULK_URB(urb, self->usbdev, 
+        usb_fill_bulk_urb(urb, self->usbdev, 
 		      usb_sndbulkpipe(self->usbdev, self->bulk_out_ep),
                       skb->data, IRDA_USB_MAX_MTU,
                       write_bulk_callback, skb);
 	urb->transfer_buffer_length = skb->len;
 	/* Note : unlink *must* be Asynchronous because of the code in 
 	 * irda_usb_net_timeout() -> call in irq - Jean II */
-	urb->transfer_flags = USB_ASYNC_UNLINK;
-	/* This flag (USB_ZERO_PACKET) indicates that what we send is not
+	urb->transfer_flags = URB_ASYNC_UNLINK;
+	/* This flag (URB_ZERO_PACKET) indicates that what we send is not
 	 * a continuous stream of data but separate packets.
 	 * In this case, the USB layer will insert an empty USB frame (TD)
 	 * after each of our packets that is exact multiple of the frame size.
 	 * This is how the dongle will detect the end of packet - Jean II */
-	urb->transfer_flags |= USB_ZERO_PACKET;
+	urb->transfer_flags |= URB_ZERO_PACKET;
 	/* Timeout need to be shorter than NET watchdog timer */
 	urb->timeout = MSECS_TO_JIFFIES(200);
 
@@ -634,7 +634,7 @@
 			 * be -ENOENT. We will fix that at the next watchdog,
 			 * leaving more time to USB to recover...
 			 * Also, we are in interrupt, so we need to have
-			 * USB_ASYNC_UNLINK to work properly...
+			 * URB_ASYNC_UNLINK to work properly...
 			 * Jean II */
 			done = 1;
 			break;
@@ -729,7 +729,7 @@
 	cb->context = self;
 
 	/* Reinitialize URB */
-	FILL_BULK_URB(urb, self->usbdev, 
+	usb_fill_bulk_urb(urb, self->usbdev, 
 		      usb_rcvbulkpipe(self->usbdev, self->bulk_in_ep), 
 		      skb->data, skb->truesize,
                       irda_usb_receive, skb);
@@ -1016,9 +1016,9 @@
 		}
 	}
 	/* Cancel Tx and speed URB - need to be synchronous to avoid races */
-	self->tx_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+	self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 	usb_unlink_urb(self->tx_urb);
-	self->speed_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+	self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 	usb_unlink_urb(self->speed_urb);
 
 	/* Stop and remove instance of IrLAP */
@@ -1258,7 +1258,7 @@
  * Most dongle have also an interrupt endpoint, that will be probably
  * documented in the next spec...
  */
-static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_endpoint_descriptor *endpoint, int ennum)
+static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_host_endpoint *endpoint, int ennum)
 {
 	int i;		/* Endpoint index in table */
 		
@@ -1277,10 +1277,10 @@
 		__u16 psize;	/* Endpoint max packet size in bytes */
 
 		/* Get endpoint address, direction and attribute */
-		ep = endpoint[i].bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-		dir = endpoint[i].bEndpointAddress & USB_ENDPOINT_DIR_MASK;
-		attr = endpoint[i].bmAttributes;
-		psize = endpoint[i].wMaxPacketSize;
+		ep = endpoint[i].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+		dir = endpoint[i].desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK;
+		attr = endpoint[i].desc.bmAttributes;
+		psize = endpoint[i].desc.wMaxPacketSize;
 
 		/* Is it a bulk endpoint ??? */
 		if(attr == USB_ENDPOINT_XFER_BULK) {
@@ -1366,7 +1366,7 @@
 	ret = usb_control_msg(dev, usb_rcvctrlpipe(dev,0),
 		IU_REQ_GET_CLASS_DESC,
 		USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-		0, intf->altsetting->bInterfaceNumber, desc,
+		0, intf->altsetting->desc.bInterfaceNumber, desc,
 		sizeof(*desc), MSECS_TO_JIFFIES(500));
 	
 	IRDA_DEBUG(1, "%s(), ret=%d\n", __FUNCTION__, ret);
@@ -1407,7 +1407,7 @@
 {
 	struct usb_device *dev = interface_to_usbdev(intf);
 	struct irda_usb_cb *self = NULL;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct irda_class_desc *irda_desc;
 	int ret;
 	int i;
@@ -1477,7 +1477,7 @@
 	}
 
 	/* Is this really necessary? */
-	if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
+	if (usb_set_configuration (dev, dev->config[0].desc.bConfigurationValue) < 0) {
 		err("set_configuration failed");
 		return -EIO;
 	}
@@ -1486,7 +1486,7 @@
 	/* Note : some driver do hardcode the interface number, some others
 	 * specify an alternate, but very few driver do like this.
 	 * Jean II */
-	ret = usb_set_interface(dev, intf->altsetting->bInterfaceNumber, 0);
+	ret = usb_set_interface(dev, intf->altsetting->desc.bInterfaceNumber, 0);
 	IRDA_DEBUG(1, "usb-irda: set interface %d result %d\n", intf->altsetting->bInterfaceNumber, ret);
 	switch (ret) {
 		case 0:
@@ -1504,7 +1504,7 @@
 	/* Find our endpoints */
 	interface = &intf->altsetting[0];
 	if(!irda_usb_parse_endpoints(self, interface->endpoint,
-				     interface->bNumEndpoints)) {
+				     interface->desc.bNumEndpoints)) {
 		ERROR("%s(), Bogus endpoints...\n", __FUNCTION__);
 		return -EIO;
 	}
@@ -1573,9 +1573,9 @@
 			usb_unlink_urb(self->rx_urb[i]);
 		/* Cancel Tx and speed URB.
 		 * Toggle flags to make sure it's synchronous. */
-		self->tx_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+		self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 		usb_unlink_urb(self->tx_urb);
-		self->speed_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+		self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 		usb_unlink_urb(self->speed_urb);
 	}
 
diff -Nru a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
--- a/drivers/net/lasi_82596.c	Wed Oct 30 16:44:23 2002
+++ b/drivers/net/lasi_82596.c	Wed Oct 30 16:44:23 2002
@@ -1412,8 +1412,7 @@
 	DEB(DEB_INIT,printk("%s: Shutting down ethercard, status was %4.4x.\n",
 		       dev->name, lp->scb.status));
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&lp->lock, flags);
 
 	wait_cmd(dev,lp,100,"close1 timed out");
 	lp->scb.command = CUC_ABORT | RX_ABORT;
@@ -1422,7 +1421,7 @@
 	CA(dev);
 
 	wait_cmd(dev,lp,100,"close2 timed out");
-	restore_flags(flags);
+	spin_unlock_irqrestore(&lp->lock, flags);
 	DEB(DEB_STRUCT,i596_display_data(dev));
 	i596_cleanup_cmd(dev,lp);
 
diff -Nru a/drivers/net/mii.c b/drivers/net/mii.c
--- a/drivers/net/mii.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/net/mii.c	Wed Oct 30 16:44:27 2002
@@ -2,7 +2,7 @@
 
 	mii.c: MII interface library
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2001,2002 Jeff Garzik
 
 	Various code came from myson803.c and other files by
@@ -299,9 +299,9 @@
 			case MII_BMCR: {
 				unsigned int new_duplex = 0;
 				if (val & (BMCR_RESET|BMCR_ANENABLE))
-					mii_if->force_media = 1;
-				else
 					mii_if->force_media = 0;
+				else
+					mii_if->force_media = 1;
 				if (mii_if->force_media &&
 				    (val & BMCR_FULLDPLX))
 					new_duplex = 1;
@@ -336,7 +336,7 @@
 	return rc;
 }
 
-MODULE_AUTHOR ("Jeff Garzik <jgarzik@mandrakesoft.com>");
+MODULE_AUTHOR ("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION ("MII hardware support library");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
--- a/drivers/net/pci-skeleton.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/net/pci-skeleton.c	Wed Oct 30 16:44:19 2002
@@ -2,7 +2,7 @@
 
 	drivers/net/pci-skeleton.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 
 	Original code came from 8139too.c, which in turns was based
 	originally on Donald Becker's rtl8139.c driver, versions 1.11
@@ -483,7 +483,7 @@
 	chip_t chipset;
 };
 
-MODULE_AUTHOR ("Jeff Garzik <jgarzik@mandrakesoft.com>");
+MODULE_AUTHOR ("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION ("Skeleton for a PCI Fast Ethernet driver");
 MODULE_LICENSE("GPL");
 MODULE_PARM (multicast_filter_limit, "i");
diff -Nru a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
--- a/drivers/net/pcmcia/3c589_cs.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/net/pcmcia/3c589_cs.c	Wed Oct 30 16:44:34 2002
@@ -14,11 +14,13 @@
     distributed according to the terms of the GNU General Public License,
     incorporated herein by reference.
     Donald Becker may be reached at becker@scyld.com
+    
+    Updated for 2.5.x by Alan Cox <alan@redhat.com>
 
 ======================================================================*/
 
 #define DRV_NAME	"3c589_cs"
-#define DRV_VERSION	"1.162"
+#define DRV_VERSION	"1.162-ac"
 
 #include <linux/module.h>
 #include <linux/init.h>
@@ -111,9 +113,10 @@
     struct net_device_stats stats;
     /* For transceiver monitoring */
     struct timer_list	media;
-    u_short		media_status;
-    u_short		fast_poll;
-    u_long		last_irq;
+    u16			media_status;
+    u16			fast_poll;
+    unsigned long	last_irq;
+    spinlock_t		lock;
 };
 
 static char *if_names[] = { "auto", "10baseT", "10base2", "AUI" };
@@ -148,13 +151,13 @@
 /*====================================================================*/
 
 static void tc589_config(dev_link_t *link);
-static void tc589_release(u_long arg);
+static void tc589_release(unsigned long arg);
 static int tc589_event(event_t event, int priority,
 		       event_callback_args_t *args);
 
-static u_short read_eeprom(ioaddr_t ioaddr, int index);
+static u16 read_eeprom(ioaddr_t ioaddr, int index);
 static void tc589_reset(struct net_device *dev);
-static void media_check(u_long arg);
+static void media_check(unsigned long arg);
 static int el3_config(struct net_device *dev, struct ifmap *map);
 static int el3_open(struct net_device *dev);
 static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
@@ -223,11 +226,13 @@
     lp = kmalloc(sizeof(*lp), GFP_KERNEL);
     if (!lp) return NULL;
     memset(lp, 0, sizeof(*lp));
+    spin_lock_init(&lp->lock);
+    
     link = &lp->link; dev = &lp->dev;
     link->priv = dev->priv = link->irq.Instance = lp;
     
     link->release.function = &tc589_release;
-    link->release.data = (u_long)link;
+    link->release.data = (unsigned long)link;
     link->io.NumPorts1 = 16;
     link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
     link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
@@ -302,9 +307,9 @@
     if (*linkp == NULL)
 	return;
 
-    del_timer(&link->release);
+    del_timer_sync(&link->release);
     if (link->state & DEV_CONFIG) {
-	tc589_release((u_long)link);
+	tc589_release((unsigned long)link);
 	if (link->state & DEV_STALE_CONFIG) {
 	    link->state |= DEV_STALE_LINK;
 	    return;
@@ -340,14 +345,14 @@
     struct net_device *dev = &lp->dev;
     tuple_t tuple;
     cisparse_t parse;
-    u_short buf[32], *phys_addr;
+    u16 buf[32], *phys_addr;
     int last_fn, last_ret, i, j, multi = 0;
     ioaddr_t ioaddr;
     char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
     
     DEBUG(0, "3c589_config(0x%p)\n", link);
 
-    phys_addr = (u_short *)dev->dev_addr;
+    phys_addr = (u16 *)dev->dev_addr;
     tuple.Attributes = 0;
     tuple.DesiredTuple = CISTPL_CONFIG;
     CS_CHECK(GetFirstTuple, handle, &tuple);
@@ -391,7 +396,7 @@
     dev->irq = link->irq.AssignedIRQ;
     dev->base_addr = link->io.BasePort1;
     if (register_netdev(dev) != 0) {
-	printk(KERN_NOTICE "3c589_cs: register_netdev() failed\n");
+	printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
 	goto failed;
     }
     
@@ -409,7 +414,7 @@
 	for (i = 0; i < 3; i++)
 	    phys_addr[i] = htons(read_eeprom(ioaddr, i));
 	if (phys_addr[0] == 0x6060) {
-	    printk(KERN_NOTICE "3c589_cs: IO port conflict at 0x%03lx"
+	    printk(KERN_ERR "3c589_cs: IO port conflict at 0x%03lx"
 		   "-0x%03lx\n", dev->base_addr, dev->base_addr+15);
 	    goto failed;
 	}
@@ -427,7 +432,7 @@
     if ((if_port >= 0) && (if_port <= 3))
 	dev->if_port = if_port;
     else
-	printk(KERN_NOTICE "3c589_cs: invalid if_port requested\n");
+	printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
     
     printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, hw_addr ",
 	   dev->name, (multi ? "562" : "589"), dev->base_addr,
@@ -443,7 +448,7 @@
 cs_failed:
     cs_error(link->handle, last_fn, last_ret);
 failed:
-    tc589_release((u_long)link);
+    tc589_release((unsigned long)link);
     return;
     
 } /* tc589_config */
@@ -456,7 +461,7 @@
     
 ======================================================================*/
 
-static void tc589_release(u_long arg)
+static void tc589_release(unsigned long arg)
 {
     dev_link_t *link = (dev_link_t *)arg;
 
@@ -545,7 +550,7 @@
     while (--i > 0)
 	if (!(inw(dev->base_addr + EL3_STATUS) & 0x1000)) break;
     if (i == 0)
-	printk(KERN_NOTICE "%s: command 0x%04x did not complete!\n",
+	printk(KERN_WARNING "%s: command 0x%04x did not complete!\n",
 	       dev->name, cmd);
 }
 
@@ -553,7 +558,7 @@
   Read a word from the EEPROM using the regular EEPROM access register.
   Assume that we are in register window zero.
 */
-static u_short read_eeprom(ioaddr_t ioaddr, int index)
+static u16 read_eeprom(ioaddr_t ioaddr, int index)
 {
     int i;
     outw(EEPROM_READ + index, ioaddr + 10);
@@ -741,7 +746,7 @@
     
     tc589_reset(dev);
     lp->media.function = &media_check;
-    lp->media.data = (u_long)lp;
+    lp->media.data = (unsigned long)lp;
     lp->media.expires = jiffies + HZ;
     add_timer(&lp->media);
 
@@ -756,7 +761,7 @@
     struct el3_private *lp = (struct el3_private *)dev->priv;
     ioaddr_t ioaddr = dev->base_addr;
     
-    printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name);
+    printk(KERN_WARNING "%s: Transmit timed out!\n", dev->name);
     dump_status(dev);
     lp->stats.tx_errors++;
     dev->trans_start = jiffies;
@@ -832,7 +837,8 @@
 
     DEBUG(3, "%s: interrupt, status %4.4x.\n",
 	  dev->name, inw(ioaddr + EL3_STATUS));
-    
+
+    spin_lock(&lp->lock);    
     while ((status = inw(ioaddr + EL3_STATUS)) &
 	(IntLatch | RxComplete | StatsFull)) {
 	if (!netif_device_present(dev) ||
@@ -867,7 +873,7 @@
 		EL3WINDOW(4);
 		fifo_diag = inw(ioaddr + 4);
 		EL3WINDOW(1);
-		printk(KERN_NOTICE "%s: adapter failure, FIFO diagnostic"
+		printk(KERN_WARNING "%s: adapter failure, FIFO diagnostic"
 		       " register %04x.\n", dev->name, fifo_diag);
 		if (fifo_diag & 0x0400) {
 		    /* Tx overrun */
@@ -885,7 +891,7 @@
 	}
 	
 	if (++i > 10) {
-	    printk(KERN_NOTICE "%s: infinite loop in interrupt, "
+	    printk(KERN_ERR "%s: infinite loop in interrupt, "
 		   "status %4.4x.\n", dev->name, status);
 	    /* Clear all interrupts */
 	    outw(AckIntr | 0xFF, ioaddr + EL3_CMD);
@@ -896,18 +902,19 @@
     }
 
     lp->last_irq = jiffies;
+    spin_unlock(&lp->lock);    
     DEBUG(3, "%s: exiting interrupt, status %4.4x.\n",
 	  dev->name, inw(ioaddr + EL3_STATUS));
     return;
 }
 
-static void media_check(u_long arg)
+static void media_check(unsigned long arg)
 {
     struct el3_private *lp = (struct el3_private *)(arg);
     struct net_device *dev = &lp->dev;
     ioaddr_t ioaddr = dev->base_addr;
-    u_short media, errs;
-    u_long flags;
+    u16 media, errs;
+    unsigned long flags;
 
     if (!netif_device_present(dev)) goto reschedule;
 
@@ -917,7 +924,7 @@
     if ((inw(ioaddr + EL3_STATUS) & IntLatch) &&
 	(inb(ioaddr + EL3_TIMER) == 0xff)) {
 	if (!lp->fast_poll)
-	    printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+	    printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name);
 	el3_interrupt(dev->irq, lp, NULL);
 	lp->fast_poll = HZ;
     }
@@ -927,9 +934,10 @@
 	add_timer(&lp->media);
 	return;
     }
-    
-    save_flags(flags);
-    cli();
+
+    /* lp->lock guards the EL3 window. Window should always be 1 except
+       when the lock is held */
+    spin_lock_irqsave(&lp->lock, flags);    
     EL3WINDOW(4);
     media = inw(ioaddr+WN4_MEDIA) & 0xc810;
 
@@ -974,7 +982,7 @@
     }
     
     EL3WINDOW(1);
-    restore_flags(flags);
+    spin_unlock_irqrestore(&lp->lock, flags);    
 
 reschedule:
     lp->media.expires = jiffies + HZ;
@@ -988,10 +996,9 @@
     dev_link_t *link = &lp->link;
 
     if (DEV_OK(link)) {
-	save_flags(flags);
-	cli();
+    	spin_lock_irqsave(&lp->lock, flags);
 	update_stats(dev);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&lp->lock, flags);
     }
     return &lp->stats;
 }
@@ -1001,6 +1008,8 @@
   single-threaded if the device is active. This is expected to be a rare
   operation, and it's simpler for the rest of the driver to assume that
   window 1 is always valid rather than use a special window-state variable.
+  
+  Caller must hold the lock for this
 */
 static void update_stats(struct net_device *dev)
 {
@@ -1079,7 +1088,7 @@
 	tc589_wait_for_completion(dev, RxDiscard);
     }
     if (worklimit == 0)
-	printk(KERN_NOTICE "%s: too much work in el3_rx!\n", dev->name);
+	printk(KERN_WARNING "%s: too much work in el3_rx!\n", dev->name);
     return 0;
 }
 
@@ -1088,7 +1097,7 @@
     struct el3_private *lp = dev->priv;
     dev_link_t *link = &lp->link;
     ioaddr_t ioaddr = dev->base_addr;
-    u_short opts = SetRxFilter | RxStation | RxBroadcast;
+    u16 opts = SetRxFilter | RxStation | RxBroadcast;
 
     if (!(DEV_OK(link))) return;
     if (dev->flags & IFF_PROMISC)
@@ -1135,7 +1144,7 @@
 
     link->open--;
     netif_stop_queue(dev);
-    del_timer(&lp->media);
+    del_timer_sync(&lp->media);
     if (link->state & DEV_STALE_CONFIG)
 	mod_timer(&link->release, jiffies + HZ/20);
     
@@ -1152,8 +1161,7 @@
     DEBUG(0, "%s\n", version);
     CardServices(GetCardServicesInfo, &serv);
     if (serv.Revision != CS_RELEASE_CODE) {
-	printk(KERN_NOTICE "3c589_cs: Card Services release "
-	       "does not match!\n");
+	printk(KERN_ERR "3c589_cs: Card Services release does not match!\n");
 	return -1;
     }
     register_pccard_driver(&dev_info, &tc589_attach, &tc589_detach);
diff -Nru a/drivers/net/pcmcia/Config.help b/drivers/net/pcmcia/Config.help
--- a/drivers/net/pcmcia/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,173 +0,0 @@
-CONFIG_AIRONET4500_CS
-  Say Y here if you have a PCMCIA Aironet 4500/4800 card which you
-  want to use with the standard PCMCIA cardservices provided by the
-  pcmcia-cs package.
-
-  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 aironet4500_cs.o. If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_NET_PCMCIA
-  Say Y if you would like to include support for any PCMCIA or CardBus
-  network adapters, then say Y to the driver for your particular card
-  below.  PCMCIA- or PC-cards are credit-card size devices often used
-  with laptops computers; CardBus is the newer and faster version of
-  PCMCIA.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  You also want to check out the PCMCIA-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  If unsure, say N.
-
-CONFIG_PCMCIA_3C589
-  Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
-  (PC-card) Ethernet card to your computer.
-
-  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 3c589_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>. If
-  unsure, say N.
-
-CONFIG_PCMCIA_3C574
-  Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
-  (PC-card) Fast Ethernet card to your computer.
-
-  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 3c574_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_PCMCIA_FMVJ18X
-  Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
-  PCMCIA (PC-card) Ethernet card to your computer.
-
-  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 fmvj18x_cs.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_PCMCIA_PCNET
-  Say Y here if you intend to attach an NE2000 compatible PCMCIA
-  (PC-card) Ethernet or Fast Ethernet card to your computer.
-
-  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 pcnet_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>. If
-  unsure, say N.
-
-CONFIG_PCMCIA_NMCLAN
-  Say Y here if you intend to attach a New Media Ethernet or LiveWire
-  PCMCIA (PC-card) Ethernet card to your computer.
-
-  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 nmclan_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_PCMCIA_SMC91C92
-  Say Y here if you intend to attach an SMC 91Cxx compatible PCMCIA
-  (PC-card) Ethernet or Fast Ethernet card to your computer.
-
-  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 smc91c92_cs.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_PCMCIA_XIRC2PS
-  Say Y here if you intend to attach a Xircom 16-bit PCMCIA (PC-card)
-  Ethernet or Fast Ethernet card to your computer.
-
-  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 xirc2ps_cs.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_PCMCIA_AXNET
-  Say Y here if you intend to attach an Asix AX88190-based PCMCIA
-  (PC-card) Fast Ethernet card to your computer.  These cards are
-  nearly NE2000 compatible but need a separate driver due to a few
-  misfeatures.
-
-  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 axnet_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_ARCNET_COM20020_CS
-  Say Y here if you intend to attach this type of ARCnet PCMCIA card
-  to your computer.
-
-  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 com20020_cs.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_PCMCIA_IBMTR
-  Say Y here if you intend to attach this type of Token Ring PCMCIA
-  card to your computer. You then also need to say Y to "Token Ring
-  driver support".
-
-  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 ibmtr_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_PCMCIA_XIRCOM
-  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
-  It should work with most DEC 21*4*-based chips/ethercards, as well
-  as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
-  ASIX.
-
-  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 xircom_cb.o.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>. If unsure, say N.
-
-CONFIG_PCMCIA_XIRTULIP
-  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
-  It should work with most DEC 21*4*-based chips/ethercards, as well
-  as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
-  ASIX.
-
-  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 xircom_tulip_cb.o.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>. If unsure, say N.
-
-CONFIG_NET_PCMCIA_RADIO
-  Say Y here if you would like to use a PCMCIA (PC-card) device to
-  connect to a wireless local area network. Then say Y to the driver
-  for your particular card below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location). You also want to check out the PCMCIA-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_PCMCIA_RAYCS
-  Say Y here if you intend to attach an Aviator/Raytheon PCMCIA
-  (PC-card) wireless Ethernet networking card to your computer.
-  Please read the file <file:Documentation/networking/ray_cs.txt> for
-  details.
-
-  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 ray_cs.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
diff -Nru a/drivers/net/pcmcia/Config.in b/drivers/net/pcmcia/Config.in
--- a/drivers/net/pcmcia/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,30 +0,0 @@
-#
-# PCMCIA Network device configuration
-#
-
-mainmenu_option next_comment
-comment 'PCMCIA network device support'
-
-bool 'PCMCIA network device support' CONFIG_NET_PCMCIA
-if [ "$CONFIG_NET_PCMCIA" = "y" ]; then
-   dep_tristate '  3Com 3c589 PCMCIA support' CONFIG_PCMCIA_3C589 $CONFIG_PCMCIA
-   dep_tristate '  3Com 3c574 PCMCIA support' CONFIG_PCMCIA_3C574 $CONFIG_PCMCIA
-   dep_tristate '  Fujitsu FMV-J18x PCMCIA support' CONFIG_PCMCIA_FMVJ18X $CONFIG_PCMCIA
-   dep_tristate '  NE2000 compatible PCMCIA support' CONFIG_PCMCIA_PCNET $CONFIG_PCMCIA
-   dep_tristate '  New Media PCMCIA support' CONFIG_PCMCIA_NMCLAN $CONFIG_PCMCIA
-   dep_tristate '  SMC 91Cxx PCMCIA support' CONFIG_PCMCIA_SMC91C92 $CONFIG_PCMCIA
-   dep_tristate '  Xircom 16-bit PCMCIA support' CONFIG_PCMCIA_XIRC2PS $CONFIG_PCMCIA
-   dep_tristate '  broken NS8390-cards support' CONFIG_PCMCIA_AXNET $CONFIG_PCMCIA
-   dep_tristate '  COM20020 ARCnet PCMCIA support' CONFIG_ARCNET_COM20020_CS $CONFIG_ARCNET_COM20020 $CONFIG_ARCNET $CONFIG_PCMCIA
-   if [ "$CONFIG_IBMTR" != "y" ]; then
-      dep_tristate '  IBM PCMCIA tokenring adapter support' CONFIG_PCMCIA_IBMTR $CONFIG_TR $CONFIG_PCMCIA
-   fi
-
-   bool '  Pcmcia Wireless LAN' CONFIG_NET_PCMCIA_RADIO
-   if [ "$CONFIG_NET_PCMCIA_RADIO" = "y" ]; then
-      dep_tristate '    Aviator/Raytheon 2.4MHz wireless support' CONFIG_PCMCIA_RAYCS $CONFIG_PCMCIA
-      dep_tristate '    Aironet 4500/4800 PCMCIA support' CONFIG_AIRONET4500_CS $CONFIG_AIRONET4500 $CONFIG_PCMCIA
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/net/pcmcia/Kconfig b/drivers/net/pcmcia/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/pcmcia/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,199 @@
+#
+# PCMCIA Network device configuration
+#
+
+menu "PCMCIA network device support"
+	depends on NETDEVICES && HOTPLUG && PCMCIA!=n
+
+config NET_PCMCIA
+	bool "PCMCIA network device support"
+	---help---
+	  Say Y if you would like to include support for any PCMCIA or CardBus
+	  network adapters, then say Y to the driver for your particular card
+	  below.  PCMCIA- or PC-cards are credit-card size devices often used
+	  with laptops computers; CardBus is the newer and faster version of
+	  PCMCIA.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  You also want to check out the PCMCIA-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If unsure, say N.
+
+config PCMCIA_3C589
+	tristate "3Com 3c589 PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
+	  (PC-card) Ethernet card to your computer.
+
+	  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 3c589_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>. If
+	  unsure, say N.
+
+config PCMCIA_3C574
+	tristate "3Com 3c574 PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
+	  (PC-card) Fast Ethernet card to your computer.
+
+	  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 3c574_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config PCMCIA_FMVJ18X
+	tristate "Fujitsu FMV-J18x PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
+	  PCMCIA (PC-card) Ethernet card to your computer.
+
+	  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 fmvj18x_cs.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+config PCMCIA_PCNET
+	tristate "NE2000 compatible PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach an NE2000 compatible PCMCIA
+	  (PC-card) Ethernet or Fast Ethernet card to your computer.
+
+	  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 pcnet_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>. If
+	  unsure, say N.
+
+config PCMCIA_NMCLAN
+	tristate "New Media PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach a New Media Ethernet or LiveWire
+	  PCMCIA (PC-card) Ethernet card to your computer.
+
+	  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 nmclan_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config PCMCIA_SMC91C92
+	tristate "SMC 91Cxx PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach an SMC 91Cxx compatible PCMCIA
+	  (PC-card) Ethernet or Fast Ethernet card to your computer.
+
+	  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 smc91c92_cs.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+config PCMCIA_XIRC2PS
+	tristate "Xircom 16-bit PCMCIA support"
+	depends on NET_PCMCIA && PCMCIA
+	help
+	  Say Y here if you intend to attach a Xircom 16-bit PCMCIA (PC-card)
+	  Ethernet or Fast Ethernet card to your computer.
+
+	  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 xirc2ps_cs.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+config PCMCIA_AXNET
+	tristate "broken NS8390-cards support"
+	depends on NET_PCMCIA && PCMCIA
+	---help---
+	  Say Y here if you intend to attach an Asix AX88190-based PCMCIA
+	  (PC-card) Fast Ethernet card to your computer.  These cards are
+	  nearly NE2000 compatible but need a separate driver due to a few
+	  misfeatures.
+
+	  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 axnet_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config ARCNET_COM20020_CS
+	tristate "COM20020 ARCnet PCMCIA support"
+	depends on NET_PCMCIA && ARCNET_COM20020 && PCMCIA
+	help
+	  Say Y here if you intend to attach this type of ARCnet PCMCIA card
+	  to your computer.
+
+	  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 com20020_cs.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+config PCMCIA_IBMTR
+	tristate "IBM PCMCIA tokenring adapter support"
+	depends on NET_PCMCIA && IBMTR!=y && TR && PCMCIA
+	help
+	  Say Y here if you intend to attach this type of Token Ring PCMCIA
+	  card to your computer. You then also need to say Y to "Token Ring
+	  driver support".
+
+	  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 ibmtr_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config NET_PCMCIA_RADIO
+	bool "Pcmcia Wireless LAN"
+	depends on NET_PCMCIA
+	help
+	  Say Y here if you would like to use a PCMCIA (PC-card) device to
+	  connect to a wireless local area network. Then say Y to the driver
+	  for your particular card below.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location). You also want to check out the PCMCIA-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+config PCMCIA_RAYCS
+	tristate "Aviator/Raytheon 2.4MHz wireless support"
+	depends on NET_PCMCIA_RADIO && PCMCIA
+	---help---
+	  Say Y here if you intend to attach an Aviator/Raytheon PCMCIA
+	  (PC-card) wireless Ethernet networking card to your computer.
+	  Please read the file <file:Documentation/networking/ray_cs.txt> for
+	  details.
+
+	  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 ray_cs.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config AIRONET4500_CS
+	tristate "Aironet 4500/4800 PCMCIA support"
+	depends on NET_PCMCIA_RADIO && AIRONET4500 && PCMCIA
+	help
+	  Say Y here if you have a PCMCIA Aironet 4500/4800 card which you
+	  want to use with the standard PCMCIA cardservices provided by the
+	  pcmcia-cs package.
+
+	  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 aironet4500_cs.o. If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+endmenu
+
diff -Nru a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
--- a/drivers/net/pcmcia/axnet_cs.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/net/pcmcia/axnet_cs.c	Wed Oct 30 16:44:29 2002
@@ -1135,27 +1135,6 @@
 }
 
 /**
- * ei_close - shut down network device
- * @dev: network device to close
- *
- * Opposite of ei_open(). Only used when "ifconfig <devname> down" is done.
- */
-static int ei_close(struct net_device *dev)
-{
-	unsigned long flags;
-
-	/*
-	 *	Hold the page lock during close
-	 */
-
-	spin_lock_irqsave(&((struct ei_device *)dev->priv)->page_lock, flags);
-	NS8390_init(dev, 0);
-	spin_unlock_irqrestore(&((struct ei_device *)dev->priv)->page_lock, flags);
-	netif_stop_queue(dev);
-	return 0;
-}
-
-/**
  * ei_tx_timeout - handle transmit time out condition
  * @dev: network device which has apparently fallen asleep
  *
diff -Nru a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
--- a/drivers/net/pcmcia/fmvj18x_cs.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/net/pcmcia/fmvj18x_cs.c	Wed Oct 30 16:44:30 2002
@@ -362,7 +362,7 @@
     if (*linkp == NULL)
 	return;
 
-    del_timer(&link->release);
+    del_timer_sync(&link->release);
     if (link->state & DEV_CONFIG) {
 	fmvj18x_release((u_long)link);
 	if (link->state & DEV_STALE_CONFIG) {
@@ -571,8 +571,7 @@
     case XXX10304:
 	/* Read MACID from Buggy CIS */
 	if (fmvj18x_get_hwinfo(link, tuple.TupleData) == -1) {
-	    printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net 
-		address.");
+	    printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net address.\n");
 	    unregister_netdev(dev);
 	    goto failed;
 	}
diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
--- a/drivers/net/pcnet32.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/net/pcnet32.c	Wed Oct 30 16:44:26 2002
@@ -22,8 +22,8 @@
  *************************************************************************/
 
 #define DRV_NAME	"pcnet32"
-#define DRV_VERSION	"1.27a"
-#define DRV_RELDATE	"10.02.2002"
+#define DRV_VERSION	"1.27b"
+#define DRV_RELDATE	"01.10.2002"
 #define PFX		DRV_NAME ": "
 
 static const char *version =
@@ -96,6 +96,8 @@
 
 #define PCNET32_DMA_MASK 0xffffffff
 
+#define PCNET32_WATCHDOG_TIMEOUT (jiffies + (2 * HZ))
+
 /*
  * table to translate option values from tulip
  * to internal options
@@ -211,6 +213,8 @@
  *	   fix pci probe not increment cards_found
  *	   FD auto negotiate error workaround for xSeries250
  *	   clean up and using new mii module
+ * v1.27b  Sep 30 2002 Kent Yoder <yoder1@us.ibm.com>
+ * 	   Added timer for cable connection state changes.
  */
 
 
@@ -318,6 +322,7 @@
 	mii:1;				/* mii port available */
     struct net_device	*next;
     struct mii_if_info mii_if;
+    struct timer_list	watchdog_timer;
 };
 
 static void pcnet32_probe_vlbus(void);
@@ -333,6 +338,7 @@
 static struct net_device_stats *pcnet32_get_stats(struct net_device *);
 static void pcnet32_set_multicast_list(struct net_device *);
 static int  pcnet32_ioctl(struct net_device *, struct ifreq *, int);
+static void pcnet32_watchdog(struct net_device *);
 static int mdio_read(struct net_device *dev, int phy_id, int reg_num);
 static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val);
 
@@ -777,6 +783,13 @@
 	}
     }
 
+    /* Set the mii phy_id so that we can query the link state */
+    if (lp->mii)
+	lp->mii_if.phy_id = ((lp->a.read_bcr (ioaddr, 33)) >> 5) & 0x1f;
+
+    init_timer (&lp->watchdog_timer);
+    lp->watchdog_timer.data = (unsigned long) dev;
+    lp->watchdog_timer.function = (void *) &pcnet32_watchdog;
     
     /* The PCNET32-specific entries in the device structure. */
     dev->open = &pcnet32_open;
@@ -901,6 +914,12 @@
 
     netif_start_queue(dev);
 
+    /* If we have mii, print the link status and start the watchdog */
+    if (lp->mii) {
+	mii_check_media (&lp->mii_if, 1, 1);
+	mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
+    }
+    
     i = 0;
     while (i++ < 100)
 	if (lp->a.read_csr (ioaddr, 0) & 0x0100)
@@ -1371,6 +1390,8 @@
     struct pcnet32_private *lp = dev->priv;
     int i;
 
+    del_timer_sync(&lp->watchdog_timer);
+
     netif_stop_queue(dev);
 
     lp->stats.rx_missed_errors = lp->a.read_csr (ioaddr, 112);
@@ -1649,6 +1670,17 @@
 	}
     }
     return -EOPNOTSUPP;
+}
+
+static void pcnet32_watchdog(struct net_device *dev)
+{
+    struct pcnet32_private *lp = dev->priv;
+
+    /* Print the link status if it has changed */
+    if (lp->mii)
+	mii_check_media (&lp->mii_if, 1, 0);
+
+    mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
 }
 
 static struct pci_driver pcnet32_driver = {
diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c
--- a/drivers/net/sis900.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/sis900.c	Wed Oct 30 16:44:28 2002
@@ -30,13 +30,13 @@
    Rev 1.07.09 Feb.  9 2001 Dave Jones <davej@suse.de> PCI enable cleanup
    Rev 1.07.08 Jan.  8 2001 Lei-Chun Chang added RTL8201 PHY support
    Rev 1.07.07 Nov. 29 2000 Lei-Chun Chang added kernel-doc extractable documentation and 630 workaround fix
-   Rev 1.07.06 Nov.  7 2000 Jeff Garzik <jgarzik@mandrakesoft.com> some bug fix and cleaning
+   Rev 1.07.06 Nov.  7 2000 Jeff Garzik <jgarzik@pobox.com> some bug fix and cleaning
    Rev 1.07.05 Nov.  6 2000 metapirat<metapirat@gmx.de> contribute media type select by ifconfig
    Rev 1.07.04 Sep.  6 2000 Lei-Chun Chang added ICS1893 PHY support
    Rev 1.07.03 Aug. 24 2000 Lei-Chun Chang (lcchang@sis.com.tw) modified 630E eqaulizer workaround rule
    Rev 1.07.01 Aug. 08 2000 Ollie Lho minor update for SiS 630E and SiS 630E A1
    Rev 1.07    Mar. 07 2000 Ollie Lho bug fix in Rx buffer ring
-   Rev 1.06.04 Feb. 11 2000 Jeff Garzik <jgarzik@mandrakesoft.com> softnet and init for kernel 2.4
+   Rev 1.06.04 Feb. 11 2000 Jeff Garzik <jgarzik@pobox.com> softnet and init for kernel 2.4
    Rev 1.06.03 Dec. 23 1999 Ollie Lho Third release
    Rev 1.06.02 Nov. 23 1999 Ollie Lho bug in mac probing fixed
    Rev 1.06.01 Nov. 16 1999 Ollie Lho CRC calculation provide by Joseph Zbiciak (im14u2c@primenet.com)
diff -Nru a/drivers/net/smc9194.c b/drivers/net/smc9194.c
--- a/drivers/net/smc9194.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/net/smc9194.c	Wed Oct 30 16:44:31 2002
@@ -713,11 +713,6 @@
 	unsigned long cookie;
 
 
-	/* I have to do a STI() here, because this is called from
-	   a routine that does an CLI during this process, making it
-	   rather difficult to get interrupts for auto detection */
-	sti();
-
 	cookie = probe_irq_on();
 
 	/*
@@ -765,10 +760,6 @@
 
 	/* and disable all interrupts again */
 	outb( 0, ioaddr + INT_MASK );
-
-	/* clear hardware interrupts again, because that's how it
-	   was when I was called... */
-	cli();
 
 	/* and return what I found */
 	return probe_irq_off(cookie);
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/net/tg3.c	Wed Oct 30 16:44:29 2002
@@ -2,7 +2,7 @@
  * tg3.c: Broadcom Tigon3 ethernet driver.
  *
  * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com)
- * Copyright (C) 2001, 2002 Jeff Garzik (jgarzik@mandrakesoft.com)
+ * Copyright (C) 2001, 2002 Jeff Garzik (jgarzik@pobox.com)
  */
 
 #include <linux/config.h>
@@ -136,7 +136,7 @@
 static char version[] __devinitdata =
 	DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
 
-MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@mandrakesoft.com)");
+MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)");
 MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver");
 MODULE_LICENSE("GPL");
 MODULE_PARM(tg3_debug, "i");
diff -Nru a/drivers/net/tg3.h b/drivers/net/tg3.h
--- a/drivers/net/tg3.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/net/tg3.h	Wed Oct 30 16:44:24 2002
@@ -2,7 +2,7 @@
  * tg3.h: Definitions for Broadcom Tigon3 ethernet driver.
  *
  * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com)
- * Copyright (C) 2001 Jeff Garzik (jgarzik@mandrakesoft.com)
+ * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com)
  */
 
 #ifndef _T3_H
diff -Nru a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
--- a/drivers/net/tokenring/3c359.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/net/tokenring/3c359.c	Wed Oct 30 16:44:35 2002
@@ -1780,7 +1780,7 @@
 
 static void __devexit xl_remove_one (struct pci_dev *pdev)
 {
-	struct net_device *dev = pdev->driver_data;
+	struct net_device *dev = pci_get_drvdata(pdev);
 	struct xl_private *xl_priv=(struct xl_private *)dev->priv;
 	
 	unregister_trdev(dev);
diff -Nru a/drivers/net/tokenring/Config.help b/drivers/net/tokenring/Config.help
--- a/drivers/net/tokenring/Config.help	Wed Oct 30 16:44:37 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,149 +0,0 @@
-CONFIG_TR
-  Token Ring is IBM's way of communication on a local network; the
-  rest of the world uses Ethernet. To participate on a Token Ring
-  network, you need a special Token ring network card. If you are
-  connected to such a Token Ring network and want to use your Token
-  Ring card under Linux, say Y here and to the driver for your
-  particular card below and read the Token-Ring mini-HOWTO, available
-  from <http://www.linuxdoc.org/docs.html#howto>. Most people can
-  say N here.
-
-CONFIG_IBMTR
-  This is support for all IBM Token Ring cards that don't use DMA. If
-  you have such a beast, say Y and read the Token-Ring mini-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  Warning: this driver will almost definitely fail if more than one
-  active Token Ring card is present.
-
-  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 ibmtr.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_IBMOL
-  This is support for all non-Lanstreamer IBM PCI Token Ring Cards.
-  Specifically this is all IBM PCI, PCI Wake On Lan, PCI II, PCI II
-  Wake On Lan, and PCI 100/16/4 adapters.
-
-  If you have such an adapter, say Y and read the Token-Ring
-  mini-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 olympic.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  Also read <file:Documentation/networking/olympic.txt> or check the
-  Linux Token Ring Project site for the latest information at
-  <http://www.linuxtr.net/>.
-
-CONFIG_IBMLS
-  This is support for IBM Lanstreamer PCI Token Ring Cards.
-
-  If you have such an adapter, say Y and read the Token-Ring
-  mini-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver is also available as a modules ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The modules will be called lanstreamer.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_TMS380TR
-  This driver provides generic support for token ring adapters
-  based on the Texas Instruments TMS380 series chipsets.  This
-  includes the SysKonnect TR4/16(+) ISA (SK-4190), SysKonnect
-  TR4/16(+) PCI (SK-4590), SysKonnect TR4/16 PCI (SK-4591),
-  Compaq 4/16 PCI, Thomas-Conrad TC4048 4/16 PCI, and several
-  Madge adapters.  If you say Y here, you will be asked to select
-  which cards to support below.  If you're using modules, each
-  class of card will be supported by a separate module.
-
-  If you have such an adapter and would like to use it, say Y and
-  read the Token-Ring mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Also read the file <file:Documentation/networking/tms380tr.txt> or
-  check <http://www.auk.cx/tms380tr/>.
-
-  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 tms380tr.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_TMSPCI
-  This tms380 module supports generic TMS380-based PCI cards.
-
-  These cards are known to work:
-     - Compaq 4/16 TR PCI
-     - SysKonnect TR4/16 PCI (SK-4590/SK-4591)
-     - Thomas-Conrad TC4048 PCI 4/16
-     - 3Com Token Link Velocity
-
-  This driver is available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called tmspci.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_TMSISA
-  This tms380 module supports generic TMS380-based ISA cards.
-
-  These cards are known to work:
-     - SysKonnect TR4/16 ISA (SK-4190)
-
-  This driver is available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called tmsisa.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ABYSS
-  This tms380 module supports the Madge Smart 16/4 PCI Mk2
-  cards (51-02).
-
-  This driver is available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called abyss.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_MADGEMC
-  This tms380 module supports the Madge Smart 16/4 MC16 and MC32
-  MicroChannel adapters.
-
-  This driver is available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called madgemc.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SMCTR
-  This is support for the ISA and MCA SMC Token Ring cards,
-  specifically SMC TokenCard Elite (8115T) and SMC TokenCard Elite/A
-  (8115T/A) adapters.
-
-  If you have such an adapter and would like to use it, say Y or M and
-  read the Token-Ring mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto> and the file
-  <file:Documentation/networking/smctr.txt>.
-
-  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 smctr.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-3COM 3C359 Token Link Velocity XL PCI adapter support
-CONFIG_3C359
-  This is support for the 3Com PCI Velocity XL cards, specifically
-  the 3Com 3C359, please note this is not for the 3C339 cards, you
-  should use the tms380 driver instead.
-
-  If you have such an adapter, say Y and read the Token-Ring
-  mini-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 will be called 3c359.o. If you want to compile it
-  as a module, say M here and read Documentation/modules.txt.
-
-  Also read the file <file:Documentation/networking/3c359.txt> or check the 
-  Linux Token Ring Project site for the latest information at
-  <http://www.linuxtr.net>
-
diff -Nru a/drivers/net/tokenring/Config.in b/drivers/net/tokenring/Config.in
--- a/drivers/net/tokenring/Config.in	Wed Oct 30 16:44:25 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,34 +0,0 @@
-#
-# Token Ring driver configuration
-#
-
-mainmenu_option next_comment
-comment 'Token Ring devices'
-
-# So far, we only have PCI, ISA, and MCA token ring devices
-if [ "$CONFIG_PCI" = "y" -o "$CONFIG_ISA" = "y" -o "$CONFIG_MCA" = "y" ]; then
-   bool 'Token Ring driver support' CONFIG_TR
-else
-   define_bool CONFIG_TR n
-fi
-
-if [ "$CONFIG_TR" != "n" ]; then
-   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_MCA" = "y" ]; then
-      tristate '  IBM Tropic chipset based adapter support' CONFIG_IBMTR
-   fi
-   dep_tristate '  IBM Olympic chipset PCI adapter support' CONFIG_IBMOL $CONFIG_TR $CONFIG_PCI
-   dep_tristate '  IBM Lanstreamer chipset PCI adapter support' CONFIG_IBMLS $CONFIG_TR $CONFIG_PCI
-   dep_tristate '  3Com 3C359 Token Link Velocity XL adapter support' CONFIG_3C359 $CONFIG_TR $CONFIG_PCI
-   tristate '  Generic TMS380 Token Ring ISA/PCI adapter support' CONFIG_TMS380TR
-   if [ "$CONFIG_TMS380TR" != "n" ]; then
-      dep_tristate '    Generic TMS380 PCI support' CONFIG_TMSPCI $CONFIG_PCI
-      dep_tristate '    Generic TMS380 ISA support' CONFIG_TMSISA $CONFIG_ISA
-      dep_tristate '    Madge Smart 16/4 PCI Mk2 support' CONFIG_ABYSS $CONFIG_PCI
-      dep_tristate '    Madge Smart 16/4 Ringnode MicroChannel' CONFIG_MADGEMC $CONFIG_MCA
-   fi
-   if [ "$CONFIG_ISA" = "y" -o "$CONFIG_MCA" = "y" ]; then
-      tristate '  SMC ISA/MCA adapter support' CONFIG_SMCTR
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/tokenring/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,191 @@
+#
+# Token Ring driver configuration
+#
+
+menu "Token Ring devices"
+	depends on NETDEVICES
+
+# So far, we only have PCI, ISA, and MCA token ring devices
+config TR
+	bool "Token Ring driver support"
+	depends on PCI || ISA || MCA
+	help
+	  Token Ring is IBM's way of communication on a local network; the
+	  rest of the world uses Ethernet. To participate on a Token Ring
+	  network, you need a special Token ring network card. If you are
+	  connected to such a Token Ring network and want to use your Token
+	  Ring card under Linux, say Y here and to the driver for your
+	  particular card below and read the Token-Ring mini-HOWTO, available
+	  from <http://www.linuxdoc.org/docs.html#howto>. Most people can
+	  say N here.
+
+config IBMTR
+	tristate "IBM Tropic chipset based adapter support"
+	depends on TR && (ISA || MCA)
+	---help---
+	  This is support for all IBM Token Ring cards that don't use DMA. If
+	  you have such a beast, say Y and read the Token-Ring mini-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Warning: this driver will almost definitely fail if more than one
+	  active Token Ring card is present.
+
+	  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 ibmtr.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config IBMOL
+	tristate "IBM Olympic chipset PCI adapter support"
+	depends on TR && PCI
+	---help---
+	  This is support for all non-Lanstreamer IBM PCI Token Ring Cards.
+	  Specifically this is all IBM PCI, PCI Wake On Lan, PCI II, PCI II
+	  Wake On Lan, and PCI 100/16/4 adapters.
+
+	  If you have such an adapter, say Y and read the Token-Ring
+	  mini-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 olympic.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  Also read <file:Documentation/networking/olympic.txt> or check the
+	  Linux Token Ring Project site for the latest information at
+	  <http://www.linuxtr.net/>.
+
+config IBMLS
+	tristate "IBM Lanstreamer chipset PCI adapter support"
+	depends on TR && PCI
+	help
+	  This is support for IBM Lanstreamer PCI Token Ring Cards.
+
+	  If you have such an adapter, say Y and read the Token-Ring
+	  mini-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver is also available as a modules ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The modules will be called lanstreamer.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config 3C359
+	tristate "3Com 3C359 Token Link Velocity XL adapter support"
+	depends on TR && PCI
+	---help---
+	  This is support for the 3Com PCI Velocity XL cards, specifically
+	  the 3Com 3C359, please note this is not for the 3C339 cards, you
+	  should use the tms380 driver instead.
+
+	  If you have such an adapter, say Y and read the Token-Ring
+	  mini-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 will be called 3c359.o. If you want to compile it
+	  as a module, say M here and read Documentation/modules.txt.
+
+	  Also read the file <file:Documentation/networking/3c359.txt> or check the 
+	  Linux Token Ring Project site for the latest information at
+	  <http://www.linuxtr.net>
+
+config TMS380TR
+	tristate "Generic TMS380 Token Ring ISA/PCI adapter support"
+	depends on TR
+	---help---
+	  This driver provides generic support for token ring adapters
+	  based on the Texas Instruments TMS380 series chipsets.  This
+	  includes the SysKonnect TR4/16(+) ISA (SK-4190), SysKonnect
+	  TR4/16(+) PCI (SK-4590), SysKonnect TR4/16 PCI (SK-4591),
+	  Compaq 4/16 PCI, Thomas-Conrad TC4048 4/16 PCI, and several
+	  Madge adapters.  If you say Y here, you will be asked to select
+	  which cards to support below.  If you're using modules, each
+	  class of card will be supported by a separate module.
+
+	  If you have such an adapter and would like to use it, say Y and
+	  read the Token-Ring mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Also read the file <file:Documentation/networking/tms380tr.txt> or
+	  check <http://www.auk.cx/tms380tr/>.
+
+	  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 tms380tr.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config TMSPCI
+	tristate "Generic TMS380 PCI support"
+	depends on TR && TMS380TR!=n && PCI
+	---help---
+	  This tms380 module supports generic TMS380-based PCI cards.
+
+	  These cards are known to work:
+	  - Compaq 4/16 TR PCI
+	  - SysKonnect TR4/16 PCI (SK-4590/SK-4591)
+	  - Thomas-Conrad TC4048 PCI 4/16
+	  - 3Com Token Link Velocity
+
+	  This driver is available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called tmspci.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config TMSISA
+	tristate "Generic TMS380 ISA support"
+	depends on TR && TMS380TR!=n && ISA
+	help
+	  This tms380 module supports generic TMS380-based ISA cards.
+
+	  These cards are known to work:
+	  - SysKonnect TR4/16 ISA (SK-4190)
+
+	  This driver is available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called tmsisa.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config ABYSS
+	tristate "Madge Smart 16/4 PCI Mk2 support"
+	depends on TR && TMS380TR!=n && PCI
+	help
+	  This tms380 module supports the Madge Smart 16/4 PCI Mk2
+	  cards (51-02).
+
+	  This driver is available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called abyss.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config MADGEMC
+	tristate "Madge Smart 16/4 Ringnode MicroChannel"
+	depends on TR && TMS380TR!=n && MCA
+	help
+	  This tms380 module supports the Madge Smart 16/4 MC16 and MC32
+	  MicroChannel adapters.
+
+	  This driver is available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called madgemc.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config SMCTR
+	tristate "SMC ISA/MCA adapter support"
+	depends on TR && (ISA || MCA)
+	---help---
+	  This is support for the ISA and MCA SMC Token Ring cards,
+	  specifically SMC TokenCard Elite (8115T) and SMC TokenCard Elite/A
+	  (8115T/A) adapters.
+
+	  If you have such an adapter and would like to use it, say Y or M and
+	  read the Token-Ring mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto> and the file
+	  <file:Documentation/networking/smctr.txt>.
+
+	  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 smctr.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+endmenu
+
diff -Nru a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
--- a/drivers/net/tokenring/lanstreamer.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/tokenring/lanstreamer.c	Wed Oct 30 16:44:28 2002
@@ -65,6 +65,7 @@
  *  11/05/01 - Restructured the interrupt function, added delays, reduced the 
  *             the number of TX descriptors to 1, which together can prevent 
  *             the card from locking up the box - <yoder1@us.ibm.com>
+ *  09/27/02 - New PCI interface + bug fix. - <yoder1@us.ibm.com>
  *  
  *  To Do:
  *
@@ -136,7 +137,7 @@
  */
 
 static char version[] = "LanStreamer.c v0.4.0 03/08/01 - Mike Sullivan\n"
-                        "              v0.5.1 03/04/02 - Kent Yoder";
+                        "              v0.5.2 09/30/02 - Kent Yoder";
 
 static struct pci_device_id streamer_pci_tbl[] __initdata = {
 	{ PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_TR, PCI_ANY_ID, PCI_ANY_ID,},
@@ -250,6 +251,12 @@
   dev_streamer=streamer_priv;
 #endif
 #endif
+ 
+  if(pci_set_dma_mask(pdev, 0xFFFFFFFF)) {
+    printk(KERN_ERR "%s: No suitable PCI mapping available.\n", dev->name);
+    rc = -ENODEV;
+    goto err_out;
+  }
   
   if (pci_enable_device(pdev)) {
     printk(KERN_ERR "lanstreamer: unable to enable pci device\n");
@@ -481,9 +488,11 @@
 		data=((u8 *)skb->data)+sizeof(struct streamer_rx_desc);
 		rx_ring->forward=0;
 		rx_ring->status=0;
-		rx_ring->buffer=virt_to_bus(data);
+		rx_ring->buffer=cpu_to_le32(pci_map_single(streamer_priv->pci_dev, data, 
+							512, PCI_DMA_FROMDEVICE));
 		rx_ring->framelen_buflen=512; 
-		writel(virt_to_bus(rx_ring),streamer_mmio+RXBDA);
+		writel(cpu_to_le32(pci_map_single(streamer_priv->pci_dev, rx_ring, 512, PCI_DMA_FROMDEVICE)),
+			streamer_mmio+RXBDA);
 	}
 
 #if STREAMER_DEBUG
@@ -499,6 +508,8 @@
 			printk(KERN_ERR
 			       "IBM PCI tokenring card not responding\n");
 			release_region(dev->base_addr, STREAMER_IO_SPACE);
+			if (skb)
+				dev_kfree_skb(skb);
 			return -1;
 		}
 	}
@@ -773,14 +784,19 @@
 
 		skb->dev = dev;
 
-		streamer_priv->streamer_rx_ring[i].forward = virt_to_bus(&streamer_priv->streamer_rx_ring[i + 1]);
+		streamer_priv->streamer_rx_ring[i].forward = 
+			cpu_to_le32(pci_map_single(streamer_priv->pci_dev, &streamer_priv->streamer_rx_ring[i + 1],
+					sizeof(struct streamer_rx_desc), PCI_DMA_FROMDEVICE));
 		streamer_priv->streamer_rx_ring[i].status = 0;
-		streamer_priv->streamer_rx_ring[i].buffer = virt_to_bus(skb->data);
+		streamer_priv->streamer_rx_ring[i].buffer = 
+			cpu_to_le32(pci_map_single(streamer_priv->pci_dev, skb->data,
+					      streamer_priv->pkt_buf_sz, PCI_DMA_FROMDEVICE));
 		streamer_priv->streamer_rx_ring[i].framelen_buflen = streamer_priv->pkt_buf_sz;
 		streamer_priv->rx_ring_skb[i] = skb;
 	}
 	streamer_priv->streamer_rx_ring[STREAMER_RX_RING_SIZE - 1].forward =
-				virt_to_bus(&streamer_priv->streamer_rx_ring[0]);
+				cpu_to_le32(pci_map_single(streamer_priv->pci_dev, &streamer_priv->streamer_rx_ring[0],
+						sizeof(struct streamer_rx_desc), PCI_DMA_FROMDEVICE));
 
 	if (i == 0) {
 		printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled\n", dev->name);
@@ -790,8 +806,12 @@
 
 	streamer_priv->rx_ring_last_received = STREAMER_RX_RING_SIZE - 1;	/* last processed rx status */
 
-	writel(virt_to_bus(&streamer_priv->streamer_rx_ring[0]), streamer_mmio + RXBDA);
-	writel(virt_to_bus(&streamer_priv->streamer_rx_ring[STREAMER_RX_RING_SIZE - 1]), streamer_mmio + RXLBDA);
+	writel(cpu_to_le32(pci_map_single(streamer_priv->pci_dev, &streamer_priv->streamer_rx_ring[0],
+				sizeof(struct streamer_rx_desc), PCI_DMA_TODEVICE)), 
+		streamer_mmio + RXBDA);
+	writel(cpu_to_le32(pci_map_single(streamer_priv->pci_dev, &streamer_priv->streamer_rx_ring[STREAMER_RX_RING_SIZE - 1],
+				sizeof(struct streamer_rx_desc), PCI_DMA_TODEVICE)), 
+		streamer_mmio + RXLBDA);
 
 	/* set bus master interrupt event mask */
 	writew(MISR_RX_NOBUF | MISR_RX_EOF, streamer_mmio + MISR_MASK);
@@ -807,7 +827,10 @@
 
 	writew(~BMCTL_TX2_DIS, streamer_mmio + BMCTL_RUM);	/* Enables TX channel 2 */
 	for (i = 0; i < STREAMER_TX_RING_SIZE; i++) {
-		streamer_priv->streamer_tx_ring[i].forward = virt_to_bus(&streamer_priv->streamer_tx_ring[i + 1]);
+		streamer_priv->streamer_tx_ring[i].forward = cpu_to_le32(pci_map_single(streamer_priv->pci_dev, 
+										&streamer_priv->streamer_tx_ring[i + 1],
+										sizeof(struct streamer_tx_desc),
+										PCI_DMA_TODEVICE));
 		streamer_priv->streamer_tx_ring[i].status = 0;
 		streamer_priv->streamer_tx_ring[i].bufcnt_framelen = 0;
 		streamer_priv->streamer_tx_ring[i].buffer = 0;
@@ -817,7 +840,8 @@
 		streamer_priv->streamer_tx_ring[i].rsvd3 = 0;
 	}
 	streamer_priv->streamer_tx_ring[STREAMER_TX_RING_SIZE - 1].forward =
-					virt_to_bus(&streamer_priv->streamer_tx_ring[0]);
+					cpu_to_le32(pci_map_single(streamer_priv->pci_dev, &streamer_priv->streamer_tx_ring[0],
+							sizeof(struct streamer_tx_desc), PCI_DMA_TODEVICE));
 
 	streamer_priv->free_tx_ring_entries = STREAMER_TX_RING_SIZE;
 	streamer_priv->tx_ring_free = 0;	/* next entry in tx ring to use */
@@ -915,6 +939,11 @@
 				skb->dev = dev;
 
 				if (buffer_cnt == 1) {
+					/* release the DMA mapping */
+					pci_unmap_single(streamer_priv->pci_dev, 
+						le32_to_cpu(streamer_priv->streamer_rx_ring[rx_ring_last_received].buffer),
+						streamer_priv->pkt_buf_sz, 
+						PCI_DMA_FROMDEVICE);
 					skb2 = streamer_priv->rx_ring_skb[rx_ring_last_received];
 #if STREAMER_DEBUG_PACKETS
 					{
@@ -934,20 +963,29 @@
 					/* recycle this descriptor */
 					streamer_priv->streamer_rx_ring[rx_ring_last_received].status = 0;
 					streamer_priv->streamer_rx_ring[rx_ring_last_received].framelen_buflen = streamer_priv->pkt_buf_sz;
-					streamer_priv->streamer_rx_ring[rx_ring_last_received].buffer = virt_to_bus(skb->data);
-					streamer_priv-> rx_ring_skb[rx_ring_last_received] = skb;
+					streamer_priv->streamer_rx_ring[rx_ring_last_received].buffer = 
+						cpu_to_le32(pci_map_single(streamer_priv->pci_dev, skb->data, streamer_priv->pkt_buf_sz,
+								PCI_DMA_FROMDEVICE));
+					streamer_priv->rx_ring_skb[rx_ring_last_received] = skb;
 					/* place recycled descriptor back on the adapter */
-					writel(virt_to_bus(&streamer_priv->streamer_rx_ring[rx_ring_last_received]),streamer_mmio + RXLBDA);
+					writel(cpu_to_le32(pci_map_single(streamer_priv->pci_dev, 
+									&streamer_priv->streamer_rx_ring[rx_ring_last_received],
+									sizeof(struct streamer_rx_desc), PCI_DMA_FROMDEVICE)),
+						streamer_mmio + RXLBDA);
 					/* pass the received skb up to the protocol */
 					netif_rx(skb2);
 				} else {
 					do {	/* Walk the buffers */
-						memcpy(skb_put(skb, length),bus_to_virt(rx_desc->buffer), length);	/* copy this fragment */
+						pci_unmap_single(streamer_priv->pci_dev, le32_to_cpu(rx_desc->buffer), length, PCI_DMA_FROMDEVICE), 
+						memcpy(skb_put(skb, length), (void *)rx_desc->buffer, length);	/* copy this fragment */
 						streamer_priv->streamer_rx_ring[rx_ring_last_received].status = 0;
 						streamer_priv->streamer_rx_ring[rx_ring_last_received].framelen_buflen = streamer_priv->pkt_buf_sz;
 						
 						/* give descriptor back to the adapter */
-						writel(virt_to_bus(&streamer_priv->streamer_rx_ring[rx_ring_last_received]), streamer_mmio + RXLBDA);
+						writel(cpu_to_le32(pci_map_single(streamer_priv->pci_dev, 
+									&streamer_priv->streamer_rx_ring[rx_ring_last_received],
+									length, PCI_DMA_FROMDEVICE)), 
+							streamer_mmio + RXLBDA);
 
 						if (rx_desc->status & 0x80000000)
 							break;	/* this descriptor completes the frame */
@@ -1114,7 +1152,8 @@
 	if (streamer_priv->free_tx_ring_entries) {
 		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].status = 0;
 		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].bufcnt_framelen = 0x00020000 | skb->len;
-		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].buffer = virt_to_bus(skb->data);
+		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].buffer = 
+			cpu_to_le32(pci_map_single(streamer_priv->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE));
 		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].rsvd1 = skb->len;
 		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].rsvd2 = 0;
 		streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free].rsvd3 = 0;
@@ -1135,7 +1174,10 @@
 		}
 #endif
 
-		writel(virt_to_bus (&streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free]),streamer_mmio + TX2LFDA);
+		writel(cpu_to_le32(pci_map_single(streamer_priv->pci_dev, 
+					&streamer_priv->streamer_tx_ring[streamer_priv->tx_ring_free],
+					sizeof(struct streamer_tx_desc), PCI_DMA_TODEVICE)),
+			streamer_mmio + TX2LFDA);
 		(void)readl(streamer_mmio + TX2LFDA);
 
 		streamer_priv->tx_ring_free = (streamer_priv->tx_ring_free + 1) & (STREAMER_TX_RING_SIZE - 1);
diff -Nru a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
--- a/drivers/net/tokenring/smctr.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/tokenring/smctr.c	Wed Oct 30 16:44:28 2002
@@ -24,13 +24,12 @@
  *
  *  To do:
  *    1. Multicast support.
+ *
+ *  Initial 2.5 cleanup Alan Cox <alan@redhat.com>  2002/10/28
  */
 
-#ifdef MODULE
 #include <linux/module.h>
 #include <linux/version.h>
-#endif
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -341,7 +340,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_alloc_shared_memory\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_alloc_shared_memory\n", dev->name);
 
         /* Allocate initial System Control Block pointer.
          * This pointer is located in the last page, last offset - 4.
@@ -456,10 +455,9 @@
         int err;
 
 	if(smctr_debug > 10)
-        	printk("%s: smctr_bypass_state\n", dev->name);
+        	printk(KERN_DEBUG "%s: smctr_bypass_state\n", dev->name);
 
-        err = smctr_setup_single_cmd(dev, ACB_CMD_CHANGE_JOIN_STATE,
-                JS_BYPASS_STATE);
+        err = smctr_setup_single_cmd(dev, ACB_CMD_CHANGE_JOIN_STATE, JS_BYPASS_STATE);
 
         return (err);
 }
@@ -470,7 +468,7 @@
         __u16 i, checksum = 0;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_checksum_firmware\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_checksum_firmware\n", dev->name);
 
         smctr_enable_adapter_ctrl_store(dev);
 
@@ -656,7 +654,7 @@
         int err = 0;
 
         if(smctr_debug > 10)
-		printk("%s: smctr_chg_rx_mask\n", dev->name);
+		printk(KERN_DEBUG "%s: smctr_chg_rx_mask\n", dev->name);
 
         smctr_enable_16bit(dev);
         smctr_set_page(dev, (__u8 *)tp->ram_access);
@@ -787,7 +785,7 @@
         __u16 *mem;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_decode_firmware\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_decode_firmware\n", dev->name);
 
         weight  = *(long *)(tp->ptr_ucode + WEIGHT_OFFSET);
         tsize   = *(__u8 *)(tp->ptr_ucode + TREE_SIZE_OFFSET);
@@ -852,7 +850,7 @@
         int ioaddr = dev->base_addr;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_disable_adapter_ctrl_store\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_disable_adapter_ctrl_store\n", dev->name);
 
         tp->trc_mask |= CSR_WCSS;
         outb(tp->trc_mask, ioaddr + CSR);
@@ -898,7 +896,7 @@
         int ioaddr = dev->base_addr;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_enable_adapter_ctrl_store\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_enable_adapter_ctrl_store\n", dev->name);
 
         smctr_set_trc_reset(ioaddr);
         smctr_enable_adapter_ram(dev);
@@ -915,7 +913,7 @@
         __u8 r;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_enable_adapter_ram\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_enable_adapter_ram\n", dev->name);
 
         r = inb(ioaddr + MSR);
         outb(MSR_MEMB | r, ioaddr + MSR);
@@ -958,7 +956,7 @@
 	int i;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_chk_isa %#4x\n", dev->name, ioaddr);
+                printk(KERN_DEBUG "%s: smctr_chk_isa %#4x\n", dev->name, ioaddr);
 
 	if((ioaddr & 0x1F) != 0)
                 return (-ENODEV);
@@ -979,7 +977,7 @@
         b = inb(ioaddr + BDID);
 	if(b != BRD_ID_8115T)
         {
-                printk("%s: The adapter found is not supported\n", dev->name);
+                printk(KERN_ERR "%s: The adapter found is not supported\n", dev->name);
                 return (-1);
         }
 
@@ -1079,7 +1077,7 @@
                         break;
 
                 default:
-                        printk("%s: No IRQ found aborting\n", dev->name);
+                        printk(KERN_ERR "%s: No IRQ found aborting\n", dev->name);
                         return(-1);
          }
 
@@ -1159,7 +1157,7 @@
                 /* see if the chip is corrupted
                 if(smctr_read_584_chksum(ioaddr))
                 {
-                        printk("%s: EEPROM Checksum Failure\n", dev->name);
+                        printk(KERN_ERR "%s: EEPROM Checksum Failure\n", dev->name);
                         return(-1);
                 }
 		*/
@@ -1412,7 +1410,7 @@
         unsigned short *temp;
 
         if(smctr_debug > 20)
-                printk("smctr_get_tx_fcb\n");
+                printk(KERN_DEBUG "smctr_get_tx_fcb\n");
 
         /* check if there is enough FCB blocks */
         if(tp->num_tx_fcbs_used[queue] >= tp->num_tx_fcbs[queue])
@@ -1481,7 +1479,7 @@
         FCBlock *fcb;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_hardware_send_packet\n", dev->name);
+                printk(KERN_DEBUG"%s: smctr_hardware_send_packet\n", dev->name);
 
         if(tp->status != OPEN)
                 return (-1);
@@ -1533,7 +1531,7 @@
         ACBlock *acb;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_init_acbs\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_init_acbs\n", dev->name);
 
         acb                     = tp->acb_head;
         acb->cmd_done_status    = (ACB_COMMAND_DONE | ACB_COMMAND_SUCCESSFUL);
@@ -1576,7 +1574,7 @@
         int err;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_init_adapter\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_init_adapter\n", dev->name);
 
         tp->status              = CLOSED;
         tp->page_offset_mask    = (tp->ram_usable * 1024) - 1;
@@ -1605,12 +1603,12 @@
 
         if(smctr_checksum_firmware(dev))
 	{
-                printk("%s: Previously loaded firmware is missing\n",dev->name);                return (-ENOENT);
+                printk(KERN_ERR "%s: Previously loaded firmware is missing\n",dev->name);                return (-ENOENT);
         }
 
         if((err = smctr_ram_memory_test(dev)))
 	{
-                printk("%s: RAM memory test failed.\n", dev->name);
+                printk(KERN_ERR "%s: RAM memory test failed.\n", dev->name);
                 return (-EIO);
         }
 
@@ -1621,7 +1619,7 @@
         smctr_reset_adapter(dev);
         if((err = smctr_init_card_real(dev)))
 	{
-                printk("%s: Initialization of card failed (%d)\n",
+                printk(KERN_ERR "%s: Initialization of card failed (%d)\n",
                         dev->name, err);
                 return (-EINVAL);
         }
@@ -1629,7 +1627,7 @@
         /* This routine clobbers the TRC's internal registers. */
         if((err = smctr_internal_self_test(dev)))
 	{
-                printk("%s: Card failed internal self test (%d)\n",
+                printk(KERN_ERR "%s: Card failed internal self test (%d)\n",
                         dev->name, err);
                 return (-EINVAL);
         }
@@ -1638,7 +1636,7 @@
         smctr_reset_adapter(dev);
         if((err = smctr_init_card_real(dev)))
 	{
-                printk("%s: Initialization of card failed (%d)\n",
+                printk(KERN_ERR "%s: Initialization of card failed (%d)\n",
                         dev->name, err);
                 return (-EINVAL);
         }
@@ -1657,7 +1655,7 @@
 static int __init smctr_init_card(struct net_device *dev)
 {
         if(smctr_debug > 10)
-                printk("%s: smctr_init_card\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_init_card\n", dev->name);
 
         return (0);
 }
@@ -1668,7 +1666,7 @@
         int err = 0;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_init_card_real\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_init_card_real\n", dev->name);
 
         tp->sh_mem_used = 0;
         tp->num_acbs    = NUM_OF_ACBS;
@@ -1731,7 +1729,7 @@
 
         if((err = smctr_issue_init_txrx_cmd(dev)))
 	{
-                printk("%s: Hardware failure\n", dev->name);
+                printk(KERN_ERR "%s: Hardware failure\n", dev->name);
                 return (err);
         }
 
@@ -1746,7 +1744,7 @@
         __u16 *buf;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_init_rx_bdbs\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_init_rx_bdbs\n", dev->name);
 
         for(i = 0; i < NUM_RX_QS_USED; i++)
         {
@@ -1847,7 +1845,7 @@
         __u32 *iscpb;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_init_shared_memory\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_init_shared_memory\n", dev->name);
 
         smctr_set_page(dev, (__u8 *)(unsigned int)tp->iscpb_ptr);
 
@@ -2017,16 +2015,19 @@
 
         if(dev == NULL)
         {
-                printk("%s: irq %d for unknown device.\n", dev->name, irq);
+                printk(KERN_CRIT "%s: irq %d for unknown device.\n", dev->name, irq);
                 return;
         }
 
         ioaddr = dev->base_addr;
         tp = (struct net_local *)dev->priv;
+        
 
         if(tp->status == NOT_INITIALIZED)
                 return;
 
+        spin_lock(&tp->lock);
+        
         smctr_disable_bic_int(dev);
         smctr_enable_16bit(dev);
 
@@ -2046,6 +2047,7 @@
                 if(isb_type >= 0x10)
                 {
                         smctr_disable_16bit(dev);
+		        spin_unlock(&tp->lock);
                         return;
                 }
 
@@ -2063,56 +2065,45 @@
                                 switch(isb_subtype)
                                 {
                                         case 0:
-                                                tp->monitor_state
-                                                = MS_MONITOR_FSM_INACTIVE;
-                                                break;
+                                                tp->monitor_state = MS_MONITOR_FSM_INACTIVE;
+                                               break;
 
                                         case 1:
-                                                tp->monitor_state
-                                                = MS_REPEAT_BEACON_STATE;
+                                                tp->monitor_state = MS_REPEAT_BEACON_STATE;
                                                 break;
 
                                         case 2:
-                                                tp->monitor_state
-                                                = MS_REPEAT_CLAIM_TOKEN_STATE;
+                                                tp->monitor_state = MS_REPEAT_CLAIM_TOKEN_STATE;
                                                 break;
 
                                         case 3:
-                                                tp->monitor_state
-                                                = MS_TRANSMIT_CLAIM_TOKEN_STATE;                                                break;
+                                                tp->monitor_state = MS_TRANSMIT_CLAIM_TOKEN_STATE;                                                break;
 
                                         case 4:
-                                                tp->monitor_state
-                                                = MS_STANDBY_MONITOR_STATE;
+                                                tp->monitor_state = MS_STANDBY_MONITOR_STATE;
                                                 break;
 
                                         case 5:
-                                                tp->monitor_state
-                                                = MS_TRANSMIT_BEACON_STATE;
+                                                tp->monitor_state = MS_TRANSMIT_BEACON_STATE;
                                                 break;
 
                                         case 6:
-                                                tp->monitor_state
-                                                = MS_ACTIVE_MONITOR_STATE;
+                                                tp->monitor_state = MS_ACTIVE_MONITOR_STATE;
                                                 break;
 
                                         case 7:
-                                                tp->monitor_state
-                                                = MS_TRANSMIT_RING_PURGE_STATE;
+                                                tp->monitor_state = MS_TRANSMIT_RING_PURGE_STATE;
                                                 break;
 
                                         case 8:   /* diagnostic state */
                                                 break;
 
                                         case 9:
-                                                tp->monitor_state
-                                                = MS_BEACON_TEST_STATE;
+                                                tp->monitor_state = MS_BEACON_TEST_STATE;
                                                 if(smctr_lobe_media_test(dev))
                                                 {
-                                                        tp->ring_status_flags
-                                                        = RING_STATUS_CHANGED;
-                                                        tp->ring_status
-                                                        = AUTO_REMOVAL_ERROR;
+                                                        tp->ring_status_flags = RING_STATUS_CHANGED;
+                                                        tp->ring_status = AUTO_REMOVAL_ERROR;
                                                         smctr_ring_status_chg(dev);
                                                         smctr_bypass_state(dev);
                                                 }
@@ -2162,16 +2153,14 @@
                                 /* BUG QUEUE for TRC stuck receive BUG */
                                 if(isb_subtype & TX_PENDING_PRIORITY_2)
                                 {
-                                        if((err = smctr_tx_complete(dev,
-                                                BUG_QUEUE)) != SUCCESS)
+                                        if((err = smctr_tx_complete(dev, BUG_QUEUE)) != SUCCESS)
                                                 break;
                                 }
 
                                 /* NON-MAC frames only */
                                 if(isb_subtype & TX_PENDING_PRIORITY_1)
                                 {
-                                        if((err = smctr_tx_complete(dev,
-                                                NON_MAC_QUEUE)) != SUCCESS)
+                                        if((err = smctr_tx_complete(dev, NON_MAC_QUEUE)) != SUCCESS)
                                                 break;
                                 }
 
@@ -2189,40 +2178,31 @@
                                          */
                                         interrupt_unmask_bits |= 0x800;
 
-                                        tp->tx_queue_status[BUG_QUEUE]
-                                                = NOT_TRANSMITING;
-                                        if((err = smctr_tx_complete(dev,
-                                                BUG_QUEUE)) != SUCCESS)
+                                        tp->tx_queue_status[BUG_QUEUE] = NOT_TRANSMITING;
+                                        if((err = smctr_tx_complete(dev, BUG_QUEUE)) != SUCCESS)
                                                 break;
-                                        if((err = smctr_restart_tx_chain(dev,
-                                                BUG_QUEUE)) != SUCCESS)
+                                        if((err = smctr_restart_tx_chain(dev, BUG_QUEUE)) != SUCCESS)
                                                 break;
                                 }
 
                                 /* NON-MAC queue only */
                                 if(isb_subtype & TX_PENDING_PRIORITY_1)
                                 {
-                                        tp->tx_queue_status[NON_MAC_QUEUE]
-                                                = NOT_TRANSMITING;
-                                        if((err = smctr_tx_complete(dev,
-                                                NON_MAC_QUEUE)) != SUCCESS)
+                                        tp->tx_queue_status[NON_MAC_QUEUE] = NOT_TRANSMITING;
+                                        if((err = smctr_tx_complete(dev, NON_MAC_QUEUE)) != SUCCESS)
                                                 break;
-                                        if((err = smctr_restart_tx_chain(dev,
-                                                NON_MAC_QUEUE)) != SUCCESS)
+                                        if((err = smctr_restart_tx_chain(dev, NON_MAC_QUEUE)) != SUCCESS)
                                                 break;
                                 }
 
                                 /* MAC queue only */
                                 if(isb_subtype & TX_PENDING_PRIORITY_0)
                                 {
-                                        tp->tx_queue_status[MAC_QUEUE]
-                                                = NOT_TRANSMITING;
-                                        if((err = smctr_tx_complete(dev,
-                                                MAC_QUEUE)) != SUCCESS)
+                                        tp->tx_queue_status[MAC_QUEUE] = NOT_TRANSMITING;
+                                        if((err = smctr_tx_complete(dev, MAC_QUEUE)) != SUCCESS)
                                                 break;
 
-                                        err = smctr_restart_tx_chain(dev,
-                                                MAC_QUEUE);
+                                        err = smctr_restart_tx_chain(dev, MAC_QUEUE);
                                 }
                                 break;
 
@@ -2328,7 +2308,7 @@
                                                  * complete posted
                                                  */
                                                 interrupt_unmask_bits &= (~0x800);
-                                                printk("Jay please send bug\n");//                                              smctr_send_bug(dev);
+                                                printk(KERN_CRIT "Jay please send bug\n");//                                              smctr_send_bug(dev);
                                         }
 
                                         if(tp->ptr_rx_fifo_overruns)
@@ -2346,7 +2326,7 @@
                                 err = SUCCESS;
                                 if(tp->acb_head->cmd == ACB_CMD_HIC_NOP)
                                 {
-                                        printk("i1\n");
+                                        printk(KERN_ERR "i1\n");
                                         smctr_disable_16bit(dev);
 
                                         /* XXXXXXXXXXXXXXXXX */
@@ -2387,8 +2367,7 @@
 
                                                         if(err != SUCCESS)
                                                         {
-                                                                tp->acb_pending
-= 0;
+                                                                tp->acb_pending = 0;
                                                                 break;
                                                         }
                                                 }
@@ -2397,18 +2376,14 @@
                                                 {
                                                         if(tp->ptr_una)
                                                         {
-                                                                tp->ptr_una[0]
-                                                                        = SWAP_BYTES(((SBlock *)tp->misc_command_data)->UNA[0]);
-                                                                tp->ptr_una[1]
-                                                                        = SWAP_BYTES(((SBlock *)tp->misc_command_data)->UNA[1]);
-                                                                tp->ptr_una[2]
-                                                                        = SWAP_BYTES(((SBlock *)tp->misc_command_data)->UNA[2]);
+                                                                tp->ptr_una[0] = SWAP_BYTES(((SBlock *)tp->misc_command_data)->UNA[0]);
+                                                                tp->ptr_una[1] = SWAP_BYTES(((SBlock *)tp->misc_command_data)->UNA[1]);
+                                                                tp->ptr_una[2] = SWAP_BYTES(((SBlock *)tp->misc_command_data)->UNA[2]);
                                                         }
 
                                                 }
 
-                                                if(((SBlock *)tp->misc_command_data)->Status_CHG_Indicate
-                                                        & READY_TO_SEND_RQ_INIT)                                                {
+                                                if(((SBlock *)tp->misc_command_data)->Status_CHG_Indicate & READY_TO_SEND_RQ_INIT)                                                {
                                                         err = smctr_send_rq_init(dev);
                                                 }
                                         }
@@ -2446,45 +2421,37 @@
                                                 break;
 
                                         case 1:
-                                                tp->join_state
-                                                        = JS_LOBE_TEST_STATE;
+                                                tp->join_state = JS_LOBE_TEST_STATE;
                                                 break;
 
                                         case 2:
-                                                tp->join_state
-                                                        = JS_DETECT_MONITOR_PRESENT_STATE;
+                                                tp->join_state = JS_DETECT_MONITOR_PRESENT_STATE;
                                                 break;
 
                                         case 3:
-                                                tp->join_state
-                                                        = JS_AWAIT_NEW_MONITOR_STATE;
+                                                tp->join_state = JS_AWAIT_NEW_MONITOR_STATE;
                                                 break;
 
                                         case 4:
-                                                tp->join_state
-                                                        = JS_DUPLICATE_ADDRESS_TEST_STATE;
+                                                tp->join_state = JS_DUPLICATE_ADDRESS_TEST_STATE;
                                                 break;
 
                                         case 5:
-                                                tp->join_state
-                                                        = JS_NEIGHBOR_NOTIFICATION_STATE;
+                                                tp->join_state = JS_NEIGHBOR_NOTIFICATION_STATE;
                                                 break;
 
                                         case 6:
-                                                tp->join_state
-                                                        = JS_REQUEST_INITIALIZATION_STATE;
+                                                tp->join_state = JS_REQUEST_INITIALIZATION_STATE;
                                                 break;
 
                                         case 7:
-                                                tp->join_state
-                                                        = JS_JOIN_COMPLETE_STATE;
+                                                tp->join_state = JS_JOIN_COMPLETE_STATE;
                                                 tp->status = OPEN;
                                                 err = smctr_status_chg(dev);
                                                 break;
 
                                         case 8:
-                                                tp->join_state
-                                                        = JS_BYPASS_WAIT_STATE;
+                                                tp->join_state = JS_BYPASS_WAIT_STATE;
                                                 break;
                                 }
                                 break ;
@@ -2514,11 +2481,11 @@
          * but we still want to issue ack to ISB
          */
         if(!(interrupt_ack_code & 0xff00))
-                smctr_issue_int_ack(dev, interrupt_ack_code,
-                        interrupt_unmask_bits);
+                smctr_issue_int_ack(dev, interrupt_ack_code, interrupt_unmask_bits);
 
         smctr_disable_16bit(dev);
         smctr_enable_bic_int(dev);
+        spin_unlock(&tp->lock);
 
         return;
 }
@@ -2533,16 +2500,14 @@
                 return (err);
 
         tp->sclb_ptr->int_mask_control  = interrupt_enable_mask;
-        tp->sclb_ptr->valid_command     = SCLB_VALID
-                | SCLB_CMD_CLEAR_INTERRUPT_MASK;
+        tp->sclb_ptr->valid_command     = SCLB_VALID | SCLB_CMD_CLEAR_INTERRUPT_MASK;
 
         smctr_set_ctrl_attention(dev);
 
         return (0);
 }
 
-static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code,
-        __u16 ibits)
+static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ibits)
 {
         struct net_local *tp = (struct net_local *)dev->priv;
 
@@ -2551,9 +2516,7 @@
 
         tp->sclb_ptr->int_mask_control = ibits;
         tp->sclb_ptr->iack_code = iack_code << 1; /* use the offset from base */        tp->sclb_ptr->resume_control = 0;
-        tp->sclb_ptr->valid_command =
-                SCLB_VALID | SCLB_IACK_CODE_VALID
-                | SCLB_CMD_CLEAR_INTERRUPT_MASK;
+        tp->sclb_ptr->valid_command = SCLB_VALID | SCLB_IACK_CODE_VALID | SCLB_CMD_CLEAR_INTERRUPT_MASK;
 
         smctr_set_ctrl_attention(dev);
 
@@ -2729,7 +2692,7 @@
 
         if((err = smctr_wait_cmd(dev)))
 	{
-                printk("%s: Hardware failure\n", dev->name);
+                printk(KERN_ERR "%s: Hardware failure\n", dev->name);
                 return (err);
         }
 
@@ -2864,7 +2827,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_issue_resume_rx_fcb_cmd\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_issue_resume_rx_fcb_cmd\n", dev->name);
 
         if(smctr_wait_while_cbusy(dev))
                 return (-1);
@@ -2886,7 +2849,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_issue_resume_tx_fcb_cmd\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_issue_resume_tx_fcb_cmd\n", dev->name);
 
         if(smctr_wait_while_cbusy(dev))
                 return (-1);
@@ -3035,7 +2998,7 @@
         int err = 0;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_load_firmware\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_load_firmware\n", dev->name);
 
         tp->ptr_ucode           = smctr_code;
         tp->num_of_tx_buffs     = 4;
@@ -3151,7 +3114,7 @@
         unsigned short saved_rcv_mask;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_lobe_media_test\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_lobe_media_test\n", dev->name);
 
         /* Clear receive mask for lobe test. */
         saved_rcv_mask          = tp->receive_mask;
@@ -3225,7 +3188,7 @@
         int err;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_lobe_media_test_cmd\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_lobe_media_test_cmd\n", dev->name);
 
         /* Change to lobe media test state. */
         if(tp->monitor_state != MS_BEACON_TEST_STATE)
@@ -3233,7 +3196,7 @@
                 smctr_lobe_media_test_state(dev);
                 if(smctr_wait_cmd(dev))
                 {
-                        printk("Lobe Failed test state\n");
+                        printk(KERN_ERR "Lobe Failed test state\n");
                         return (LOBE_MEDIA_TEST_FAILED);
                 }
         }
@@ -3548,7 +3511,7 @@
         int err;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_open\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_open\n", dev->name);
 
         err = smctr_init_adapter(dev);
         if(err < 0)
@@ -3569,7 +3532,7 @@
         int err;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_open_tr\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_open_tr\n", dev->name);
 
         /* Now we can actually open the adapter. */
         if(tp->status == OPEN)
@@ -3577,9 +3540,10 @@
         if(tp->status != INITIALIZED)
                 return (-1);
 
-        save_flags(flags);
-        cli();
-
+	/* FIXME: it would work a lot better if we masked the irq sources
+	   on the card here, then we could skip the locking and poll nicely */
+	spin_lock_irqsave(&tp->lock, flags);
+	
         smctr_set_page(dev, (__u8 *)tp->ram_access);
 
         if((err = smctr_issue_resume_rx_fcb_cmd(dev, (short)MAC_QUEUE)))
@@ -3642,14 +3606,14 @@
 				else
                                 {
                                         if(err == LOBE_MEDIA_TEST_FAILED)
-                                                printk("%s: Lobe Media Test Failure - Check cable?\n", dev->name);
+                                                printk(KERN_WARNING "%s: Lobe Media Test Failure - Check cable?\n", dev->name);
                                 }
                         }
                 }
         }
 
 out:
-        restore_flags(flags);
+        spin_unlock_irqrestore(&tp->lock, flags);
 
         return (err);
 }
@@ -3704,6 +3668,8 @@
 		goto out;
 	}
         memset(tp, 0, sizeof(struct net_local));
+        spin_lock_init(&tp->lock);
+        
         dev->priv = tp;
         dev->base_addr = ioaddr;
 
@@ -3727,7 +3693,7 @@
         err = smctr_load_firmware(dev);
         if(err != UCODE_PRESENT && err != SUCCESS)
         {
-                printk("%s: Firmware load failed (%d)\n", dev->name, err);
+                printk(KERN_ERR "%s: Firmware load failed (%d)\n", dev->name, err);
 		err = -EIO;
 		goto out_tp;
         }
@@ -3738,7 +3704,7 @@
 	else
 		tp->media_type = MEDIA_UTP_16;
 
-        printk("%s: %s %s at Io %#4x, Irq %d, Rom %#4x, Ram %#4x.\n",
+        printk(KERN_INFO "%s: %s %s at Io %#4x, Irq %d, Rom %#4x, Ram %#4x.\n",
                 dev->name, smctr_name, smctr_model,
                 (unsigned int)dev->base_addr,
                 dev->irq, tp->rom_base, tp->ram_base);
@@ -3777,8 +3743,7 @@
                 {
                         /* Received MAC Frames Processed by RS. */
                         case INIT:
-                                if((rcode = smctr_rcv_init(dev, rmf,
-                                        &correlator)) == HARDWARE_FAILED)
+                                if((rcode = smctr_rcv_init(dev, rmf, &correlator)) == HARDWARE_FAILED)
                                 {
                                         return (rcode);
                                 }
@@ -3993,7 +3958,7 @@
         __u8 err = 0;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_ram_memory_test\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_ram_memory_test\n", dev->name);
 
         start_pattern   = 0x0001;
         pages_of_ram    = tp->ram_size / tp->ram_usable;
@@ -4401,7 +4366,7 @@
         int err = 0;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_restart_tx_chain\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_restart_tx_chain\n", dev->name);
 
         if(tp->num_tx_fcbs_used[queue] != 0
                 && tp->tx_queue_status[queue] == NOT_TRANSMITING)
@@ -4418,7 +4383,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_ring_status_chg\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_ring_status_chg\n", dev->name);
 
         /* Check for ring_status_flag: whenever MONITOR_STATE_BIT
          * Bit is set, check value of monitor_state, only then we
@@ -4502,7 +4467,7 @@
                         break;
 
                 case SIGNAL_LOSS:
-                        printk(KERN_INFO "%s: Singal Loss\n", dev->name);
+                        printk(KERN_INFO "%s: Signal Loss\n", dev->name);
                         tp->current_ring_status |= SIGNAL_LOSS;
                         break;
 
@@ -4522,9 +4487,8 @@
         __u8 *pbuff;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_rx_frame\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_rx_frame\n", dev->name);
 
-        cli();
         queue = tp->receive_queue_number;
 
         while((status = tp->rx_fcb_curr[queue]->frame_status) != SUCCESS)
@@ -4554,7 +4518,6 @@
                                 	skb_put(skb, rx_size);
 
                                 	memcpy(skb->data, pbuff, rx_size);
-                                	sti();
 
                                 	/* Update Counters */
                                 	tp->MacStat.rx_packets++;
@@ -4566,7 +4529,6 @@
                                 	netif_rx(skb);
 					dev->last_rx = jiffies;
 				} else {
-                                	sti();
 				}
                         }
                         else
@@ -4593,7 +4555,7 @@
         FCBlock *fcb;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_send_dat\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_send_dat\n", dev->name);
 
         if((fcb = smctr_get_tx_fcb(dev, MAC_QUEUE,
                 sizeof(MAC_HEADER))) == (FCBlock *)(-1L))
@@ -4670,7 +4632,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_send_packet\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_send_packet\n", dev->name);
 
         /*
          * Block a transmit overlap
@@ -4700,7 +4662,7 @@
 	int err;
 
         if(smctr_debug > 15)
-                printk("%s: smctr_send_lobe_media_test\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_send_lobe_media_test\n", dev->name);
 
         if((fcb = smctr_get_tx_fcb(dev, MAC_QUEUE, sizeof(struct trh_hdr)
                 + S_WRAP_DATA + S_WRAP_DATA)) == (FCBlock *)(-1L))
@@ -5241,7 +5203,7 @@
 static void smctr_set_multicast_list(struct net_device *dev)
 {
         if(smctr_debug > 10)
-                printk("%s: smctr_set_multicast_list\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_set_multicast_list\n", dev->name);
 
         return;
 }
@@ -5310,7 +5272,7 @@
         __u16 sword, rword;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_set_rx_look_ahead_flag\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_set_rx_look_ahead_flag\n", dev->name);
 
         tp->adapter_flags &= ~(FORCED_16BIT_MODE);
         tp->adapter_flags |= RX_VALID_LOOKAHEAD;
@@ -5353,7 +5315,7 @@
         unsigned int err;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_setup_single_cmd\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_setup_single_cmd\n", dev->name);
 
         if((err = smctr_wait_while_cbusy(dev)))
                 return (err);
@@ -5403,7 +5365,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_status_chg\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_status_chg\n", dev->name);
 
         switch(tp->status)
         {
@@ -5440,7 +5402,7 @@
         int err = 0;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_trc_send_packet\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_trc_send_packet\n", dev->name);
 
         fcb->info = FCB_CHAIN_END | FCB_ENABLE_TFS;
         if(tp->num_tx_fcbs[queue] != 1)
@@ -5462,7 +5424,7 @@
         int cstatus;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_tx_complete\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_tx_complete\n", dev->name);
 
         while((status = tp->tx_fcb_end[queue]->frame_status) != SUCCESS)
         {
@@ -5518,7 +5480,7 @@
         __u8 *frag, *page;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_tx_move_frame\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_tx_move_frame\n", dev->name);
 
         ram_usable = ((unsigned int)tp->ram_usable) << 10;
         frag       = skb->data;
@@ -5636,7 +5598,7 @@
         struct net_local *tp = (struct net_local *)dev->priv;
 
         if(smctr_debug > 20)
-                printk("smctr_update_tx_chain\n");
+                printk(KERN_DEBUG "smctr_update_tx_chain\n");
 
         if(tp->num_tx_fcbs_used[queue] <= 0)
                 return (HARDWARE_FAILED);
@@ -5673,7 +5635,7 @@
         unsigned int loop_count = 0x20000;
 
         if(smctr_debug > 10)
-                printk("%s: smctr_wait_cmd\n", dev->name);
+                printk(KERN_DEBUG "%s: smctr_wait_cmd\n", dev->name);
 
         while(loop_count)
         {
@@ -5764,7 +5726,7 @@
                         dev_smctr[i] = NULL;
                         if(i == 0)
                         {
-                                printk("%s: register_trdev() returned (<0).\n",
+                                printk(KERN_ERR "%s: register_trdev() returned (<0).\n",
                                         cardname);
                                 return (-EIO);
                         }
diff -Nru a/drivers/net/tokenring/smctr.h b/drivers/net/tokenring/smctr.h
--- a/drivers/net/tokenring/smctr.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/net/tokenring/smctr.h	Wed Oct 30 16:44:29 2002
@@ -1050,6 +1050,8 @@
         __u16 QueueSkb;
 
 	struct tr_statistics MacStat;   /* MAC statistics structure */
+	
+	spinlock_t	lock;
 } NET_LOCAL;
 
 /************************************
diff -Nru a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c
--- a/drivers/net/tulip/21142.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/net/tulip/21142.c	Wed Oct 30 16:44:25 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/21142.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
diff -Nru a/drivers/net/tulip/ChangeLog b/drivers/net/tulip/ChangeLog
--- a/drivers/net/tulip/ChangeLog	Wed Oct 30 16:44:24 2002
+++ b/drivers/net/tulip/ChangeLog	Wed Oct 30 16:44:24 2002
@@ -14,12 +14,12 @@
 	* 21142.c (t21142_lnk_change): Revert earlier patch
 	to always reset phy; only conditionally do so now.
 
-2002-05-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2002-05-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core (tulip_pci_tbl): Add new "comet"
 	pci id.  Contributed by Ohta Kyuma.
 
-2002-03-07  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2002-03-07  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core (tulip_mwi_config): Use new PCI API functions
 	for enabling and disabled Memory-Write-Invalidate
@@ -27,7 +27,7 @@
 	Fix bugs in tulip MWI config also.
 
 2002-01-28  Stefan Rompf  <srompf@isg.de>,
-            Jeff Garzik  <jgarzik@mandrakesoft.com>
+            Jeff Garzik  <jgarzik@pobox.com>
 
         * 21142.c (t21142_timer):  Use return value of
         tulip_check_duplex() to indicate to system whether or not
@@ -53,7 +53,7 @@
         * tulip_core (tulip_pci_tbl[]):
         Add PCI id for comet tulip clone.
 
-2001-12-11  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-12-11  Jeff Garzik  <jgarzik@pobox.com>
 
 	* eeprom.c, timer.c, media.c, tulip_core.c:
 	Remove 21040 and 21041 chip support.
@@ -115,30 +115,30 @@
 	Clear status for in-progress Tx's, and count
 	Tx errors for all packets being released.
 
-2001-06-16  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-16  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip.h, tulip_core.c:
 	Integrate MMIO support from devel branch, but default
 	it to off for stable kernel and driver series.
 
-2001-06-16  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-16  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_init_one):
 	Free descriptor rings on error.
 
-2001-06-16  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-16  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_mwi_config, tulip_init_one):
 	Large update to csr0 bus configuration code.  This is not stable
 	yet, so it is only conditionally enabled, via CONFIG_TULIP_MWI.
 
-2001-06-16  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-16  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c:
 	Initialize timer in tulip_init_one and tulip_down,
 	not in tulip_up.
 
-2001-06-14  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-14  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c:
 	- Update tulip_suspend, tulip_resume for new PCI PM API.
@@ -155,14 +155,14 @@
 	* tulip_core (set_rx_mode):  Do not use set_bit
 	on an integer variable.  Also fix endianness issue.
 
-2001-06-04  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-04  Jeff Garzik  <jgarzik@pobox.com>
 
 	* interrupt.c:
 	Simplify rx processing when CONFIG_NET_HW_FLOWCONTROL is
 	active, and in the process fix a bug where flow control
 	and low load caused rx not to be acknowledged properly.
 
-2001-06-01  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-06-01  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip.h:
 	- Remove tulip_outl_csr helper, redundant.
@@ -182,7 +182,7 @@
 	  convert tabs to spaces.
 	- Move tp->stats.rx_missed_errors update outside the ifdef.
 
-2001-05-18  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-18  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Added ethtool support.
 	  ETHTOOL_GDRVINFO ioctl only, for now.
@@ -201,22 +201,22 @@
 
 	* tulip_refill_rx prototype added to tulip.h
 
-2001-05-13  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-13  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Remove HAS_PCI_MWI flag from Comet, untested.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c, tulip.h: Remove Conexant PCI id, no chip
 	docs are available to fix problems with support.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_init_one): Do not call
 	unregister_netdev in error cleanup.  Remnant of old
 	usage of init_etherdev.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* media.c (tulip_find_mii): Simple write the updated BMCR
 	twice, as it seems the best thing to do for both broken and
@@ -227,36 +227,36 @@
 	Fill in tp->advertising for all cases.
 	Just to be safe, clear all unwanted bits.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (private_ioctl):  Fill in tp->advertising
 	when advertising value is changed by the user.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Mark Comet chips as needed the updated MWI
 	csr0 configuration.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* media.c, tulip_core.c:  Move MII scan into
 	from inlined inside tulip_init_one to new function
 	tulip_find_mii in media.c.
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* media.c (tulip_check_duplex):
 	Only restart Rx/Tx engines if they are active
 	(and csr6 changes)
 
-2001-05-12  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-12  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_mwi_config):
 	Clamp values read from PCI cache line size register to
 	values acceptable to tulip chip.  Done for safety and
 	-almost- certainly unneeded.
 
-2001-05-11  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-11  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_init_one):
 	Instead of unconditionally enabling autonegotiation, disable
@@ -270,7 +270,7 @@
 	to BMCR twice, to avoid setting unnecessarily changing
 	phy settings.
 
-2001-05-11  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-11  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip.h, tulip_core.c:  If HAS_PCI_MWI is set for a
 	given chip, adjust the csr0 values not according to
@@ -281,7 +281,7 @@
 	alignment and system cache size.  Currently MWI bit is set
 	only if the MWI bit is present in the PCI command register.
 
-2001-05-11  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-11  Jeff Garzik  <jgarzik@pobox.com>
 
 	* media.c (tulip_select_media):
 	For media types 1 and 3, only use the provided eeprom
@@ -291,7 +291,7 @@
 	ensures that the csr6 value is written if an update
 	is needed.
 
-2001-05-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	Merge PNIC-II-specific stuff from Becker's tulip.c:
 
@@ -301,13 +301,13 @@
 	* tulip_core.c (tulip_tx_timeout): Add specific
 	debugging for PNIC2.
 
-2001-05-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_init_one): Print out
 	tulip%d instead of PCI device number, for
 	consistency.
 
-2001-05-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* Merge changes from Becker's tulip.c:
 	Fix bugs in ioctl.
@@ -316,7 +316,7 @@
 	Set CSR14 autonegotiation bit for media types 2 and 4,
 	where the SIA CSR setup values are not provided.
 
-2001-05-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* media.c (tulip_select_media): Only update MII
 	advertising value if startup arg < 2.
@@ -330,7 +330,7 @@
 	value 2 as 'startup' arg to select_media, to avoid updating
 	MII advertising value.
 
-2001-05-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* pnic.c (pnic_check_duplex): remove
 	pnic.c (pnic_lnk_change, pnic_timer): use
@@ -343,13 +343,13 @@
 
 	(found by Manfred Spraul)
 
-2001-05-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* 21142.c, eeprom.c, tulip.h, tulip_core.c:
 	Remove DPRINTK as another, better method of
 	debug message printing is available.
 
-2001-05-09  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-05-09  Jeff Garzik  <jgarzik@pobox.com>
 
 	* 21142.c (t21142_lnk_change): Pass arg startup==1
 	to tulip_select_media, in order to force csr13 to be
@@ -361,32 +361,32 @@
 
 	* interrupt.c: Better PCI bus error reporting.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Now that dev->name is only available late
 	  in the probe, insert a hack to replace a not-evaluated
 	  "eth%d" string with an evaluated "tulip%d" string.
 	  Also, remove obvious comment and an indentation cleanup.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: If we are a module, always print out the
 	  version string.  If we are built into the kernel, only print
 	  the version string if at least one tulip is detected.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	Merged from Becker's tulip.c 0.92t:
 
 	* tulip_core.c: Add support for Conexant LANfinity.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Only suspend/resume if the interface
 	  is up and running.  Use alloc_etherdev and pci_request_regions.
 	  Spelling fix.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Remove code that existed when one or more of
 	  the following defines existed.  These defines were never used
@@ -399,7 +399,7 @@
 	* media.c: Add barrier() to mdio_read/write's PNIC status check
 	  loops.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	Merged from Becker's tulip.c 0.92t:
 
@@ -416,20 +416,20 @@
 	  they are in mdio_read/write now.  Use mask to limit
 	  phy number in tulip_init_one's MII scan.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	Merged from Becker's tulip.c 0.92t:
 
 	* 21142.c, tulip_core.c: PNIC2 MAC address and NWay fixes.
 	* tulip.h: Add FullDuplex constant, used in above change.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* timer.c: Do not call netif_carrier_{on,off}, it is not used in
 	  the main tree.  Leave code in, disabled, as markers for future
 	  carrier notification.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	Merged from Becker's tulip.c 0.92t, except for the tulip.h
 	whitespace cleanup:
@@ -448,14 +448,14 @@
 	  Prefer COMET_MAC_ADDR flag test to chip_id test in set_rx_mode.
 	  Store built mc_filter for later use in intr handler by Comets.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: Use tp->cur_tx when building the
 	  setup frame, instead of assuming that the setup
 	  frame is always built in slot zero.  This case is
 	  hit during PM resume.
 
-2001-04-03  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-03  Jeff Garzik  <jgarzik@pobox.com>
 
 	* *.c: Update file headers (copyright, urls, etc.)
 	* Makefile: re-order to that chip-specific modules on own line
@@ -463,7 +463,7 @@
 	* tulip_core.c: merge medianame[] update from tulip.c.
 	  Additional arch-specific rx_copybreak, csr0 values. (various)
 
-2001-02-20  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-02-20  Jeff Garzik  <jgarzik@pobox.com>
 
 	* media.c (tulip_select_media): No need to initialize
 	new_csr6, all cases initialize it properly.
@@ -482,7 +482,7 @@
 	interrupt handler, as PNIC doesn't support a h/w timer.
 	* tulip_core.c (tulip_tbl[]): Modify default csr6
 
-2001-02-11  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-02-11  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_init_one): Call pci_enable_device
 	to ensure wakeup/resource assignment before checking those
@@ -491,30 +491,30 @@
 	(tulip_suspend, tulip_resume, tulip_remove_one): Call
 	pci_power_on/off (commented out for now).
 
-2001-02-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-02-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip.h: Add CFDD_xxx bits for Tulip power management
 	* tulip_core.c (tulip_set_power_state): New function,
 	manipulating Tulip chip power state where supported.
 	(tulip_up, tulip_down, tulip_init_one): Use it.
 
-2001-02-10  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-02-10  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_tx_timeout): Call netif_wake_queue
 	to ensure the next Tx is always sent to us.
 
-2001-01-27  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-01-27  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (tulip_remove_one): Fix mem leak by freeing
 	tp->media_tbl.  Add check for !dev, reformat code appropriately.
 
-2001-01-27  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-01-27  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_tbl[]: Comment all entries to make order and chip_id
 	relationship more clear.
 	* tulip_pci_tbl[]: Add new Accton PCI id (COMET chipset).
 
-2001-01-16  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-01-16  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: static vars no longer explicitly
 	initialized to zero.
@@ -549,7 +549,7 @@
 	medianame[] and block_name[] arrays to avoid oops due
 	to bad values returned from hardware.
 
-2000-11-02  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2000-11-02  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c (set_rx_mode): This is synchronized via
 	dev->xmit_lock, so only the queueing of the setup frame needs to
@@ -564,13 +564,13 @@
 	* tulip_core.c (tulip_init_ring, tulip_start_xmit, set_rx_mode):
 	Likewise.
 
-2000-10-18  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2000-10-18  Jeff Garzik  <jgarzik@pobox.com>
 
 	* tulip_core.c: (tulip_init_one) Print out ethernet interface
 	on error.  Print out a message when pci_enable_device fails.
 	Handle DMA alloc failure.
 
-2000-10-18  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2000-10-18  Jeff Garzik  <jgarzik@pobox.com>
 
 	* Makefile: New file.
 	* tulip_core.c (tulip_init_one): Correct error messages
diff -Nru a/drivers/net/tulip/Config.help b/drivers/net/tulip/Config.help
--- a/drivers/net/tulip/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,110 +0,0 @@
-CONFIG_PCMCIA_XIRCOM
-  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
-  It should work with most DEC 21*4*-based chips/ethercards, as well
-  as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
-  ASIX.
-
-  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 xircom_cb.o.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>. If unsure, say N.
-
-CONFIG_PCMCIA_XIRTULIP
-  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
-  It should work with most DEC 21*4*-based chips/ethercards, as well
-  as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
-  ASIX.
-
-  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 xircom_tulip_cb.o.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>. If unsure, say N.
-
-CONFIG_DE2104X
-  This driver is developed for the SMC EtherPower series Ethernet
-  cards and also works with cards based on the DECchip
-  21040 (Tulip series) chips.  Some LinkSys PCI cards are
-  of this type.  (If your card is NOT SMC EtherPower 10/100 PCI
-  (smc9332dst), you can also try the driver for "Generic DECchip"
-  cards, above.  However, most people with a network card of this type
-  will say Y here.) Do read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  More specific
-  information is contained in
-  <file:Documentation/DocBook/tulip-user.tmpl>.
-  
-  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 tulip.o.  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>.
-
-CONFIG_TULIP
-  This driver is developed for the SMC EtherPower series Ethernet
-  cards and also works with cards based on the DECchip 
-  21040/21041/21140 (Tulip series) chips.  Some LinkSys PCI cards are
-  of this type.  (If your card is NOT SMC EtherPower 10/100 PCI
-  (smc9332dst), you can also try the driver for "Generic DECchip"
-  cards, above.  However, most people with a network card of this type
-  will say Y here.) Do read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  More specific
-  information is contained in 
-  <file:Documentation/networking/tulip.txt>.
-  
-  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 tulip.o.  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>.
-
-CONFIG_TULIP_MWI
-  This configures your Tulip card specifically for the card and
-  system cache line size type you are using.
-  
-  This is experimental code, not yet tested on many boards.
-
-  If unsure, say N.
-
-CONFIG_TULIP_MMIO
-  Use PCI shared memory for the NIC registers, rather than going through
-  the Tulip's PIO (programmed I/O ports).  Faster, but could produce
-  obscure bugs if your mainboard has memory controller timing issues.
-  If in doubt, say N.
-
-CONFIG_NET_TULIP
-  This selects the "Tulip" family of EISA/PCI network cards.
-
-CONFIG_DE4X5
-  This is support for the DIGITAL series of PCI/EISA Ethernet cards.
-  These include the DE425, DE434, DE435, DE450 and DE500 models.  If
-  you have a network card of this type, say Y and read the
-  Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. More specific
-  information is contained in
-  <file:Documentation/networking/de4x5.txt>.
-  
-  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 de4x5.o.  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>.
-
-CONFIG_WINBOND_840
-  This driver is for the Winbond W89c840 chip.  It also works with 
-  the TX9882 chip on the Compex RL100-ATX board.
-  More specific information and updates are available from
-  <http://www.scyld.com/network/drivers.html>.
-
-CONFIG_DM9102
-  This driver is for DM9102(A)/DM9132/DM9801 compatible PCI cards from
-  Davicom (<http://www.davicom.com.tw/>).  If you have such a network
-  (Ethernet) card, say Y.  Some information is contained in the file
-  <file:Documentation/networking/dmfe.txt>.
-  
-  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 dmfe.o.  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 -Nru a/drivers/net/tulip/Config.in b/drivers/net/tulip/Config.in
--- a/drivers/net/tulip/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-#
-# Tulip family network device configuration
-#
-
-mainmenu_option next_comment
-comment 'Tulip family network device support'
-
-bool '"Tulip" family network device support' CONFIG_NET_TULIP
-if [ "$CONFIG_NET_TULIP" = "y" ]; then
-   dep_tristate '    Early DECchip Tulip (dc2104x) PCI support (EXPERIMENTAL)' CONFIG_DE2104X $CONFIG_PCI $CONFIG_EXPERIMENTAL
-   dep_tristate '    DECchip Tulip (dc2114x) PCI support' CONFIG_TULIP $CONFIG_PCI
-   if [ "$CONFIG_TULIP" = "y" -o "$CONFIG_TULIP" = "m" ]; then
-      dep_bool '      New bus configuration (EXPERIMENTAL)' CONFIG_TULIP_MWI $CONFIG_EXPERIMENTAL
-      bool '      Use PCI shared mem for NIC registers' CONFIG_TULIP_MMIO
-   fi
-   if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" ]; then
-      tristate '    Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5
-   fi
-   dep_tristate '    Winbond W89c840 Ethernet support' CONFIG_WINBOND_840 $CONFIG_PCI
-   dep_tristate '    Davicom DM910x/DM980x support' CONFIG_DM9102 $CONFIG_PCI
-   if [ "$CONFIG_CARDBUS" = "y" ]; then
-      tristate '  Xircom CardBus support (new driver)' CONFIG_PCMCIA_XIRCOM
-      tristate '  Xircom Tulip-like CardBus support (old driver)' CONFIG_PCMCIA_XIRTULIP
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/tulip/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,148 @@
+#
+# Tulip family network device configuration
+#
+
+menu "Tulip family network device support"
+	depends on NET_ETHERNET && (PCI || EISA || CARDBUS)
+
+config NET_TULIP
+	bool "\"Tulip\" family network device support"
+	help
+	  This selects the "Tulip" family of EISA/PCI network cards.
+
+config DE2104X
+	tristate "Early DECchip Tulip (dc2104x) PCI support (EXPERIMENTAL)"
+	depends on NET_TULIP && PCI && EXPERIMENTAL
+	---help---
+	  This driver is developed for the SMC EtherPower series Ethernet
+	  cards and also works with cards based on the DECchip
+	  21040 (Tulip series) chips.  Some LinkSys PCI cards are
+	  of this type.  (If your card is NOT SMC EtherPower 10/100 PCI
+	  (smc9332dst), you can also try the driver for "Generic DECchip"
+	  cards, above.  However, most people with a network card of this type
+	  will say Y here.) Do read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  More specific
+	  information is contained in
+	  <file:Documentation/DocBook/tulip-user.tmpl>.
+
+	  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 tulip.o.  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>.
+
+config TULIP
+	tristate "DECchip Tulip (dc2114x) PCI support"
+	depends on NET_TULIP && PCI
+	---help---
+	  This driver is developed for the SMC EtherPower series Ethernet
+	  cards and also works with cards based on the DECchip 
+	  21040/21041/21140 (Tulip series) chips.  Some LinkSys PCI cards are
+	  of this type.  (If your card is NOT SMC EtherPower 10/100 PCI
+	  (smc9332dst), you can also try the driver for "Generic DECchip"
+	  cards, above.  However, most people with a network card of this type
+	  will say Y here.) Do read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  More specific
+	  information is contained in 
+	  <file:Documentation/networking/tulip.txt>.
+
+	  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 tulip.o.  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>.
+
+config TULIP_MWI
+	bool "New bus configuration (EXPERIMENTAL)"
+	depends on TULIP && EXPERIMENTAL
+	help
+	  This configures your Tulip card specifically for the card and
+	  system cache line size type you are using.
+
+	  This is experimental code, not yet tested on many boards.
+
+	  If unsure, say N.
+
+config TULIP_MMIO
+	bool "Use PCI shared mem for NIC registers"
+	depends on TULIP
+	help
+	  Use PCI shared memory for the NIC registers, rather than going through
+	  the Tulip's PIO (programmed I/O ports).  Faster, but could produce
+	  obscure bugs if your mainboard has memory controller timing issues.
+	  If in doubt, say N.
+
+config DE4X5
+	tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA"
+	depends on NET_TULIP && (PCI || EISA)
+	---help---
+	  This is support for the DIGITAL series of PCI/EISA Ethernet cards.
+	  These include the DE425, DE434, DE435, DE450 and DE500 models.  If
+	  you have a network card of this type, say Y and read the
+	  Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. More specific
+	  information is contained in
+	  <file:Documentation/networking/de4x5.txt>.
+
+	  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 de4x5.o.  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>.
+
+config WINBOND_840
+	tristate "Winbond W89c840 Ethernet support"
+	depends on NET_TULIP && PCI
+	help
+	  This driver is for the Winbond W89c840 chip.  It also works with 
+	  the TX9882 chip on the Compex RL100-ATX board.
+	  More specific information and updates are available from
+	  <http://www.scyld.com/network/drivers.html>.
+
+config DM9102
+	tristate "Davicom DM910x/DM980x support"
+	depends on NET_TULIP && PCI
+	---help---
+	  This driver is for DM9102(A)/DM9132/DM9801 compatible PCI cards from
+	  Davicom (<http://www.davicom.com.tw/>).  If you have such a network
+	  (Ethernet) card, say Y.  Some information is contained in the file
+	  <file:Documentation/networking/dmfe.txt>.
+
+	  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 dmfe.o.  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>.
+
+config PCMCIA_XIRCOM
+	tristate "Xircom CardBus support (new driver)"
+	depends on NET_TULIP && CARDBUS
+	---help---
+	  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
+	  It should work with most DEC 21*4*-based chips/ethercards, as well
+	  as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
+	  ASIX.
+
+	  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 xircom_cb.o.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>. If unsure, say N.
+
+config PCMCIA_XIRTULIP
+	tristate "Xircom Tulip-like CardBus support (old driver)"
+	depends on NET_TULIP && CARDBUS
+	---help---
+	  This driver is for the Digital "Tulip" Ethernet CardBus adapters.
+	  It should work with most DEC 21*4*-based chips/ethercards, as well
+	  as with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and
+	  ASIX.
+
+	  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 xircom_tulip_cb.o.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>. If unsure, say N.
+
+endmenu
+
diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
--- a/drivers/net/tulip/de2104x.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/net/tulip/de2104x.c	Wed Oct 30 16:44:32 2002
@@ -1,6 +1,6 @@
 /* de2104x.c: A Linux PCI Ethernet driver for Intel/Digital 21040/1 chips. */
 /*
-	Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+	Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
 
 	Copyright 1994, 1995 Digital Equipment Corporation.	    [de4x5.c]
 	Written/copyright 1994-2001 by Donald Becker.		    [tulip.c]
@@ -53,7 +53,7 @@
 static char version[] __initdata =
 KERN_INFO DRV_NAME " PCI Ethernet driver v" DRV_VERSION " (" DRV_RELDATE ")\n";
 
-MODULE_AUTHOR("Jeff Garzik <jgarzik@mandrakesoft.com>");
+MODULE_AUTHOR("Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION("Intel/Digital 21040/1 series PCI Ethernet driver");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
--- a/drivers/net/tulip/dmfe.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/net/tulip/dmfe.c	Wed Oct 30 16:44:33 2002
@@ -29,7 +29,7 @@
     Reformatted, fixing spelling etc as I went
     Removed IRQ 0-15 assumption
 
-    Jeff Garzik <jgarzik@mandrakesoft.com> :
+    Jeff Garzik <jgarzik@pobox.com> :
     Updated to use new PCI driver API.
     Resource usage cleanups.
     Report driver version to user.
diff -Nru a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
--- a/drivers/net/tulip/eeprom.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/net/tulip/eeprom.c	Wed Oct 30 16:44:34 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/eeprom.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
diff -Nru a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
--- a/drivers/net/tulip/interrupt.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/net/tulip/interrupt.c	Wed Oct 30 16:44:26 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/interrupt.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
diff -Nru a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c
--- a/drivers/net/tulip/media.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/net/tulip/media.c	Wed Oct 30 16:44:26 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/media.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
diff -Nru a/drivers/net/tulip/pnic.c b/drivers/net/tulip/pnic.c
--- a/drivers/net/tulip/pnic.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/net/tulip/pnic.c	Wed Oct 30 16:44:30 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/pnic.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
diff -Nru a/drivers/net/tulip/pnic2.c b/drivers/net/tulip/pnic2.c
--- a/drivers/net/tulip/pnic2.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/net/tulip/pnic2.c	Wed Oct 30 16:44:21 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/pnic2.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
         Modified to hep support PNIC_II by Kevin B. Hendricks
diff -Nru a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c
--- a/drivers/net/tulip/timer.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/net/tulip/timer.c	Wed Oct 30 16:44:17 2002
@@ -1,7 +1,7 @@
 /*
 	drivers/net/tulip/timer.c
 
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
--- a/drivers/net/tulip/tulip_core.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/net/tulip/tulip_core.c	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /* tulip_core.c: A DEC 21x4x-family ethernet driver for Linux. */
 
 /*
-	Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
+	Maintained by Jeff Garzik <jgarzik@pobox.com>
 	Copyright 2000,2001  The Linux Kernel Team
 	Written/copyright 1994-2001 by Donald Becker.
 
@@ -210,6 +210,7 @@
 	{ 0x13D1, 0xAB08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x104A, 0x0981, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x104A, 0x2774, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+	{ 0x1259, 0xa120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
 	{ 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 },
 	{ 0x8086, 0x0039, PCI_ANY_ID, PCI_ANY_ID, 0, 0, I21145 },
 	{ 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
@@ -1409,7 +1410,6 @@
 	tp->timer.function = tulip_tbl[tp->chip_id].media_timer;
 
 	dev->base_addr = ioaddr;
-	dev->irq = irq;
 
 #ifdef CONFIG_TULIP_MWI
 	if (!force_csr0 && (tp->flags & HAS_PCI_MWI))
@@ -1553,6 +1553,7 @@
 	for (i = 0; i < 6; i++)
 		last_phys_addr[i] = dev->dev_addr[i];
 	last_irq = irq;
+	dev->irq = irq;
 
 	/* The lower four bits are the media type. */
 	if (board_idx >= 0  &&  board_idx < MAX_UNITS) {
diff -Nru a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
--- a/drivers/net/tulip/xircom_cb.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/net/tulip/xircom_cb.c	Wed Oct 30 16:44:31 2002
@@ -299,7 +299,7 @@
 	dev->get_stats = &xircom_get_stats;
 	dev->priv = private;
 	dev->do_ioctl = &private_ioctl;
-	pdev->driver_data = dev;
+	pci_set_drvdata(pdev, dev);
 
 	
 	/* start the transmitter to get a heartbeat */
@@ -326,7 +326,7 @@
  */
 static void __devexit xircom_remove(struct pci_dev *pdev)
 {
-	struct net_device *dev = pdev->driver_data;
+	struct net_device *dev = pci_get_drvdata(pdev);
 	struct xircom_private *card;
 	enter("xircom_remove");
 	if (dev!=NULL) {
diff -Nru a/drivers/net/wan/Config.help b/drivers/net/wan/Config.help
--- a/drivers/net/wan/Config.help	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,481 +0,0 @@
-CONFIG_LAPBETHER
-  This is a driver for a pseudo device (typically called /dev/lapb0)
-  which allows you to open an LAPB point-to-point connection to some
-  other computer on your Ethernet network.  In order to do this, you
-  need to say Y or M to the driver for your Ethernet card as well as
-  to "LAPB Data Link Driver".
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called lapbether.o.  If unsure, say N.
-
-CONFIG_X25_ASY
-  This is a driver for sending and receiving X.25 frames over regular
-  asynchronous serial lines such as telephone lines equipped with
-  ordinary modems.  Experts should note that this driver doesn't
-  currently comply with the asynchronous HDLS framing protocols in
-  CCITT recommendation X.25.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called x25_asy.o.  If unsure, say N.
-
-CONFIG_SEALEVEL_4021
-  This is a driver for the Sealevel Systems ACB 56 serial I/O adapter.
-
-  This driver can only be compiled as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to do that, say M here. The module will be called
-  sealevel.o.
-
-CONFIG_SYNCLINK_SYNCPPP
-  Enables HDLC/SYNCPPP support for the SyncLink WAN driver.
-  Normally the SyncLink WAN driver works with the main PPP
-  driver (ppp.c) and pppd program. HDLC/SYNCPPP support allows use
-  of the Cisco HDLC/PPP driver (syncppp.c).
-  The SyncLink WAN driver (in character devices) must also be enabled.
-
-CONFIG_FARSYNC
-  This driver supports the FarSync T-Series X.21 (and V.35/V.24) cards
-  from FarSite Communications Ltd.
-  Synchronous communication is supported on all ports at speeds up to
-  8Mb/s (128K on V.24) using synchronous PPP, Cisco HDLC, raw HDLC,
-  Frame Relay or X.25/LAPB.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want)
-  say M here and read <file:Documentation/modules.txt>.
-  The module will be called farsync.o and if you want the module to be
-  automatically loaded when the interface is referenced then you
-  should add "alias hdlcX farsync" to /etc/modules.conf for each
-  interface, where X is 0, 1, 2, ...
-
-CONFIG_DLCI
-  This is support for the frame relay protocol; frame relay is a fast
-  low-cost way to connect to a remote Internet access provider or to
-  form a private wide area network. The one physical line from your
-  box to the local "switch" (i.e. the entry point to the frame relay
-  network, usually at the phone company) can carry several logical
-  point-to-point connections to other computers connected to the frame
-  relay network. For a general explanation of the protocol, check out
-  <http://www.frforum.com/> on the WWW. To use frame relay, you need
-  supporting hardware (called FRAD) and certain programs from the
-  net-tools package as explained in
-  <file:Documentation/networking/framerelay.txt>.
-
-  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 dlci.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_DLCI_COUNT
-  This is the maximal number of logical point-to-point frame relay
-  connections (the identifiers of which are called DCLIs) that
-  the driver can handle. The default is probably fine.
-
-CONFIG_DLCI_MAX
-  You can specify here how many logical point-to-point frame relay
-  connections (the identifiers of which are called DCLIs) should be
-  handled by each of your hardware frame relay access devices. Go with
-  the default.
-
-CONFIG_SDLA
-  Say Y here if you need a driver for the Sangoma S502A, S502E, and
-  S508 Frame Relay Access Devices. These are multi-protocol cards, but
-  only frame relay is supported by the driver at this time. Please
-  read <file:Documentation/framerelay.txt>.
-
-  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 sdla.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_WAN
-  Wide Area Networks (WANs), such as X.25, frame relay and leased
-  lines, are used to interconnect Local Area Networks (LANs) over vast
-  distances with data transfer rates significantly higher than those
-  achievable with commonly used asynchronous modem connections.
-  Usually, a quite expensive external device called a `WAN router' is
-  needed to connect to a WAN.
-
-  As an alternative, a relatively inexpensive WAN interface card can
-  allow your Linux box to directly connect to a WAN. If you have one
-  of those cards and wish to use it under Linux, say Y here and also
-  to the WAN driver for your card, below.
-
-  If unsure, say N.
-
-CONFIG_HOSTESS_SV11
-  This is a network card for low speed synchronous serial links, at
-  up to 256Kbps. It supports both PPP and Cisco HDLC.
-
-  At this point, the driver can only be compiled as a module.
-
-CONFIG_COSA
-  This is a driver for COSA and SRP synchronous serial boards. These
-  boards allow to connect synchronous serial devices (for example
-  base-band modems, or any other device with the X.21, V.24, V.35 or
-  V.36 interface) to your Linux box. The cards can work as the
-  character device, synchronous PPP network device, or the Cisco HDLC
-  network device.
-
-  To actually use the COSA or SRP board, you will need user-space
-  utilities for downloading the firmware to the cards and to set them
-  up. Look at the <http://www.fi.muni.cz/~kas/cosa/> for more
-  information about the cards (including the pointer to the user-space
-  utilities). You can also read the comment at the top of the
-  <file:drivers/net/wan/cosa.c> for details about the cards and the driver
-  itself.
-
-  The driver will be compiled as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cosa.o. For general information about
-  modules read <file:Documentation/modules.txt>.
-
-CONFIG_DSCC4
-  This is a driver for Etinc PCISYNC boards based on the Infineon
-  (ex. Siemens) DSCC4 chipset. It is supposed to work with the four
-  ports card. Take a look at <http://www.cogenit.fr/dscc4/>
-  for further informations about the driver and his configuration.
-
-  The driver will be compiled as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called dscc4.o. For general information about
-  modules read <file:Documentation/modules.txt>.
-
-CONFIG_LANMEDIA
-  This is a driver for the following Lan Media family of serial
-  boards.
-
-  LMC 1000 board allows you to connect synchronous serial devices (for
-  example base-band modems, or any other device with the X.21, V.24,
-  V.35 or V.36 interface) to your Linux box.
-
-  LMC 1200 with on board DSU board allows you to connect your Linux
-  box dirrectly to a T1 or E1 circuit.
-
-  LMC 5200 board provides a HSSI interface capable of running up to
-  52 mbits per second.
-
-  LMC 5245 board connects directly to a T3 circuit saving the
-  additional external hardware.
-
-  To change setting such as syncPPP vs cisco HDLC or clock source you
-  will need lmcctl.  It is available at <ftp://ftp.lanmedia.com/>.
-
-  This code is also available as a module called lmc.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SBNI
-  This is a driver for ISA SBNI12-xx cards which are low cost
-  alternatives to leased line modems. Say Y if you want to insert
-  the driver into the kernel or say M to compile it as a module (the
-  module will be called sbni.o).
-
-  You can find more information and last versions of drivers and
-  utilities at <http://www.granch.ru/>. If you have any question you
-  can send email to sbni@granch.ru.
-
-  Say N if unsure.
-
-CONFIG_SBNI_MULTILINE
-  Schedule traffic for some parallel lines, via SBNI12 adapters.
-  If you have two computers connected with two parallel lines it's
-  possible to increase transfer rate nearly twice. You should have
-  a program named 'sbniconfig' to configure adapters.
-
-  Say N if unsure.
-
-CONFIG_WAN_ROUTER_DRIVERS
-  If you have a WAN interface card and you want your Linux box to act
-  as a WAN router, thereby connecting you Local Area Network to the
-  outside world over the WAN connection, say Y here and then to the
-  driver for your card below. In addition, you need to say Y to "Wan
-  Router".
-
-  You will need the wan-tools package which is available from
-  <ftp://ftp.sangoma.com/>. Read
-  <file:Documentation/networking/wan-router.txt> for more information.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about WAN router drivers. If unsure, say N.
-
-CONFIG_VENDOR_SANGOMA
-  WANPIPE from Sangoma Technologies Inc. (<http://www.sangoma.com/>)
-  is a family of intelligent multiprotocol WAN adapters with data
-  transfer rates up to 4Mbps. They are also known as Synchronous
-  Data Link Adapters (SDLA) and are designated as S514-PCI or
-  S508-ISA.  These cards support
-
-    - X.25, Frame Relay, PPP, Cisco HDLC protocols.
-
-    - API support for protocols like HDLC (LAPB),
-      HDLC Streaming, X.25, Frame Relay and BiSync.
-
-    - Ethernet Bridging over Frame Relay protocol.
-
-    - MULTILINK PPP
-
-    - Async PPP (Modem Dialup)
-
-  If you have one or more of these cards, say M to this option; you
-  may then also want to read the file
-  <file:Documentation/networking/wanpipe.txt>.  The next questions
-  will ask you about the protocols you want the driver to support.
-
-  The driver will be compiled as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called wanpipe.o.  For general information about
-  modules read <file:Documentation/modules.txt>.
-
-CONFIG_WANPIPE_X25
-  Say Y to this option if you are planning to connect a WANPIPE card
-  to an X.25 network.  Note, this feature also includes the X.25 API
-  support used to develope custom applications over the X.25 protocol.
-  If you say N, the X.25 support will not be included in the driver.
-  The X.25 option is supported on S514-PCI and S508-ISA cards.
-
-CONFIG_WANPIPE_FR
-  Say Y to this option if you are planning to connect a WANPIPE card
-  to a frame relay network, or use frame relay API to develope
-  custom applications over the Frame  Relay protocol.
-  This feature also contains the Ethernet Bridging over Frame Relay,
-  where a WANPIPE frame relay link can be directly connected to the
-  Linux kernel bridge.  If you say N, the frame relay support will
-  not be included in the driver. The Frame Relay option is
-  supported on S514-PCI and S508-ISA cards.
-
-CONFIG_WANPIPE_PPP
-  Say Y to this option if you are planning to connect a WANPIPE card
-  to a leased line using Point-to-Point protocol (PPP). If you say N,
-  the PPP support will not be included in the driver. The PPP option
-  is supported on S514-PCI/S508-ISA cards.
-
-CONFIG_WANPIPE_MULTPPP
-  Say Y to this option if you are planning to connect a WANPIPE card
-  to a leased line using Point-to-Point protocol (PPP).  Note, the
-  MultiPort PPP uses the Linux Kernel SyncPPP protocol over the
-  Sangoma HDLC Streaming adapter.  In this case each Sangoma adapter
-  port can support an independent PPP connection.  For example, a
-  single Quad-Port PCI adapter can support up to four independent
-  PPP links. If you say N,the PPP support will not be included in the
-  driver.  The PPP option is supported on S514-PCI/S508-ISA cards.
-
-CONFIG_WANPIPE_CHDLC
-  Say Y to this option if you are planning to connect a WANPIPE card
-  to a leased line using the Cisco HDLC protocol. This now supports
-  Dual Port Cisco HDLC on the S514-PCI/S508-ISA cards.
-  This support also allows user to build applications using the
-  HDLC streaming API.
-
-  CHDLC Streaming driver also supports MULTILINK PPP
-  support that can bind multiple WANPIPE T1 cards into
-  a single logical channel.
-
-  If you say  N, the Cisco HDLC support and
-  HDLC streaming API and MULTILINK PPP will not be
-  included in the driver.
-
-CONFIG_COMX
-  Say Y if you want to use any board from the MultiGate (COMX) family.
-  These boards are synchronous serial adapters for the PC,
-  manufactured by ITConsult-Pro Co, Hungary.
-
-  Read <file:Documentation/networking/comx.txt> for help on
-  configuring and using COMX interfaces.  Further info on these cards
-  can be found at <http://www.itc.hu/> or <info@itc.hu>.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this driver.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called comx.o.
-
-CONFIG_COMX_HW_COMX
-  Hardware driver for the 'CMX', 'COMX' and 'HiCOMX' boards from the
-  MultiGate family. Say Y if you have one of these.
-
-  You will need additional firmware to use these cards, which are
-  downloadable from <ftp://ftp.itc.hu/>.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called
-  comx-hw-comx.o.
-
-CONFIG_COMX_HW_LOCOMX
-  Hardware driver for the 'LoCOMX' board from the MultiGate family.
-  Say Y if you have a board like this.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called
-  comx-hw-locomx.o.
-
-CONFIG_COMX_HW_MIXCOM
-  Hardware driver for the 'MixCOM' board from the MultiGate family.
-  Say Y if you have a board like this.
-
-  If you want to use the watchdog device on this card, you should
-  select it in the Watchdog Cards section of the Character Devices
-  configuration. The ISDN interface of this card is Teles 16.3
-  compatible, you should enable it in the ISDN configuration menu. The
-  driver for the flash ROM of this card is available separately on
-  <ftp://ftp.itc.hu/>.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>. The module will be called
-  comx-hw-mixcom.o.
-
-CONFIG_COMX_PROTO_PPP
-  Cisco-HDLC and synchronous PPP protocol driver for all MultiGate
-  boards. Say Y if you want to use either protocol on your MultiGate
-  boards.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called
-  comx-proto-ppp.o.
-
-CONFIG_COMX_PROTO_LAPB
-  LAPB protocol driver for all MultiGate boards. Say Y if you
-  want to use this protocol on your MultiGate boards.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called
-  comx-proto-lapb.o.
-
-CONFIG_COMX_PROTO_FR
-  Frame Relay protocol driver for all MultiGate boards. Say Y if you
-  want to use this protocol on your MultiGate boards.
-
-  If you want to compile this as a module, say M and read
-  <file:Documentation/modules.txt>.  The module will be called
-  comx-proto-fr.o.
-
-CONFIG_CYCLADES_SYNC
-  Cyclom 2X from Cyclades Corporation (<http://www.cyclades.com/> and
-  <http://www.cyclades.com.br/>) is an intelligent multiprotocol WAN
-  adapter with data transfer rates up to 512 Kbps. These cards support
-  the X.25 and SNA related protocols. If you have one or more of these
-  cards, say Y to this option. The next questions will ask you about
-  the protocols you want the driver to support (for now only X.25 is
-  supported).
-
-  While no documentation is available at this time please grab the
-  wanconfig tarball in
-  <http://www.conectiva.com.br/~acme/cycsyn-devel/> (with minor changes
-  to make it compile with the current wanrouter include files; efforts
-  are being made to use the original package available at
-  <ftp://ftp.sangoma.com/>).
-
-  Feel free to contact me or the cycsyn-devel mailing list at
-  acme@conectiva.com.br and cycsyn-devel@bazar.conectiva.com.br for
-  additional details, I hope to have documentation available as soon
-  as possible. (Cyclades Brazil is writing the Documentation).
-
-  The driver will be compiled as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cyclomx.o. For general information about
-  modules read <file:Documentation/modules.txt>.
-
-CONFIG_CYCLOMX_X25
-  Say Y to this option if you are planning to connect a Cyclom 2X card
-  to an X.25 network.
-
-  If you say N, the X.25 support will not be included in the driver
-  (saves about 11 KB of kernel memory).
-
-CONFIG_HDLC
-  Say Y to this option if your Linux box contains a WAN card supported
-  by this driver and you are planning to connect the box to a WAN
-  ( = Wide Area Network). You will need supporting software from
-  <http://hq.pm.waw.pl/hdlc/>.
-  Generic HDLC driver currently supports raw HDLC, Cisco HDLC, Frame
-  Relay, synchronous Point-to-Point Protocol (PPP) and X.25.
-
-  If unsure, say N here.
-
-CONFIG_COMX_HW_MUNICH
-  Hardware driver for the 'SliceCOM' (channelized E1) and 'PciCOM'
-  boards (X21) from the MultiGate family.
-
-  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 comx-hw-munich.o. If you want to compile it
-  as a module, say M here and read Documentation/modules.txt.
-
-  Read linux/Documentation/networking/slicecom.txt for help on
-  configuring and using SliceCOM interfaces. Further info on these cards
-  can be found at http://www.itc.hu or <info@itc.hu>.
-
-CONFIG_HDLC_RAW
-  Say Y to this option if you want generic HDLC driver to support
-  raw HDLC over WAN (Wide Area Network) connections.
-
-  If unsure, say N here.
-
-CONFIG_HDLC_CISCO
-  Say Y to this option if you want generic HDLC driver to support
-  Cisco HDLC over WAN (Wide Area Network) connections.
-
-  If unsure, say N here.
-
-CONFIG_HDLC_FR
-  Say Y to this option if you want generic HDLC driver to support
-  Frame-Relay protocol over WAN (Wide Area Network) connections.
-
-  If unsure, say N here.
-
-CONFIG_HDLC_PPP
-  Say Y to this option if you want generic HDLC driver to support
-  PPP over WAN (Wide Area Network) connections.
-
-  If unsure, say N here.
-
-CONFIG_HDLC_X25
-  Say Y to this option if you want generic HDLC driver to support
-  X.25 protocol over WAN (Wide Area Network) connections.
-
-  If unsure, say N here.
-
-CONFIG_N2
-  This driver is for RISCom/N2 single or dual channel ISA cards
-  made by SDL Communications Inc.  If you have such a card,
-  say Y here and see <http://hq.pm.waw.pl/pub/hdlc/>.
-
-  Note that N2csu and N2dds cards are not supported by this driver.
-
-  If unsure, say N here.
-
-CONFIG_C101
-  This driver is for C101 SuperSync ISA cards made by Moxa
-  Technologies Co., Ltd. If you have such a card,
-  say Y here and see <http://hq.pm.waw.pl/pub/hdlc/>
-
-  If unsure, say N here.
-
-Cyclades-PC300 support
-CONFIG_PC300
-  This is a driver for the Cyclades-PC300 synchronous communication
-  boards. These boards provide synchronous serial interfaces to your
-  Linux box (interfaces currently available are RS-232/V.35, X.21 and
-  T1/E1). If you wish to support Multilink PPP, please select the
-  option below this one and read the file README.mlppp provided by PC300
-  package.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read Documentation/modules.txt. The module will be
-  called pc300.o.
-
-  If you haven't heard about it, it's safe to say N.
-
-Cyclades-PC300 Sync TTY (to MLPPP) support
-CONFIG_PC300_MLPPP
-  Say 'Y' to this option if you are planning to use Multilink PPP over the
-  PC300 synchronous communication boards.
-
-
diff -Nru a/drivers/net/wan/Config.in b/drivers/net/wan/Config.in
--- a/drivers/net/wan/Config.in	Wed Oct 30 16:44:22 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,136 +0,0 @@
-#
-# wan devices configuration
-#
-
-mainmenu_option next_comment
-comment 'Wan interfaces'
-
-bool 'Wan interfaces support' CONFIG_WAN
-if [ "$CONFIG_WAN" = "y" ]; then
-# There is no way to detect a comtrol sv11 - force it modular for now.
-
-   if [ "$CONFIG_ISA" = "y" ]; then
-   dep_tristate '  Comtrol Hostess SV-11 support' CONFIG_HOSTESS_SV11 m
-# The COSA/SRP driver has not been tested as non-modular yet.
-
-   dep_tristate '  COSA/SRP sync serial boards support' CONFIG_COSA m
-   fi
-
-#
-# COMX drivers
-#
-
-   tristate '  MultiGate (COMX) synchronous serial boards support' CONFIG_COMX
-   if [ "$CONFIG_COMX" != "n" ]; then
-      dep_tristate '    Support for COMX/CMX/HiCOMX boards' CONFIG_COMX_HW_COMX $CONFIG_COMX
-      dep_tristate '    Support for LoCOMX board' CONFIG_COMX_HW_LOCOMX $CONFIG_COMX
-      dep_tristate '    Support for MixCOM board' CONFIG_COMX_HW_MIXCOM $CONFIG_COMX
-      dep_tristate '    Support for MUNICH based boards: SliceCOM, PCICOM (WelCOM)' CONFIG_COMX_HW_MUNICH $CONFIG_COMX
-      dep_tristate '    Support for HDLC and syncPPP protocols on MultiGate boards' CONFIG_COMX_PROTO_PPP $CONFIG_COMX
-      if [ "$CONFIG_LAPB" = "y" ]; then
-	 dep_tristate '    Support for LAPB protocol on MultiGate boards' CONFIG_COMX_PROTO_LAPB $CONFIG_COMX
-      fi
-      if [ "$CONFIG_LAPB" = "m" ]; then
-	 dep_tristate '    Support for LAPB protocol on MultiGate boards' CONFIG_COMX_PROTO_LAPB $CONFIG_LAPB
-      fi
-      dep_tristate '    Support for Frame Relay on MultiGate boards' CONFIG_COMX_PROTO_FR $CONFIG_COMX
-   fi
-#
-# The Etinc driver has not been tested as non-modular yet.
-#
-
-   dep_tristate '  Etinc PCISYNC serial board support' CONFIG_DSCC4 m
-
-
-#
-# Lan Media's board. Currently 1000, 1200, 5200, 5245
-#
-
-   tristate '  LanMedia Corp. SSI/V.35, T1/E1, HSSI, T3 boards' CONFIG_LANMEDIA
-
-# There is no way to detect a Sealevel board. Force it modular
-
-   dep_tristate '  Sealevel Systems 4021 support' CONFIG_SEALEVEL_4021 m
-
-   tristate '  SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP
-
-# Generic HDLC
-
-   tristate '  Generic HDLC layer' CONFIG_HDLC
-   if [ "$CONFIG_HDLC" != "n" ]; then
-      bool '    Raw HDLC support' CONFIG_HDLC_RAW
-      bool '    Cisco HDLC support' CONFIG_HDLC_CISCO
-      bool '    Frame Relay support' CONFIG_HDLC_FR
-      bool '    Synchronous Point-to-Point Protocol (PPP) support' CONFIG_HDLC_PPP
-      if [ "$CONFIG_LAPB" = "m" -a "$CONFIG_HDLC" = "m" -o "$CONFIG_LAPB" = "y" ]; then
-	 bool '    X.25 protocol support' CONFIG_HDLC_X25
-      else
-	 comment '    X.25/LAPB support is disabled'
-      fi
-
-      dep_tristate '    Cyclades-PC300 support (RS-232/V.35, X.21, T1/E1 boards)' CONFIG_PC300 $CONFIG_HDLC $CONFIG_PCI
-      if [ "$CONFIG_PC300" != "n" ]; then
-         if [ "$CONFIG_PPP" != "n" -a "$CONFIG_PPP_MULTILINK" != "n" -a \
-	      "$CONFIG_PPP_SYNC_TTY" != "n" -a "$CONFIG_HDLC_PPP" = "y" ]; then
-	    bool '      Cyclades-PC300 MLPPP support' CONFIG_PC300_MLPPP
-	 else
-	    comment 'Cyclades-PC300 MLPPP support is disabled.'
-	    comment 'Refer to the file README.mlppp, provided by PC300 package.'
-	 fi
-      fi
-
-      dep_tristate '    SDL RISCom/N2 support' CONFIG_N2 $CONFIG_HDLC
-      dep_tristate '    Moxa C101 support' CONFIG_C101 $CONFIG_HDLC
-      dep_tristate '    FarSync T-Series support' CONFIG_FARSYNC $CONFIG_HDLC
-      bool '    Debug received/transmitted packets' CONFIG_HDLC_DEBUG_PKT
-      bool '    Debug hard_header routines' CONFIG_HDLC_DEBUG_HARD_HEADER
-      bool '    Debug FECN/BECN conditions' CONFIG_HDLC_DEBUG_ECN
-      bool '    Debug RX/TX packet rings' CONFIG_HDLC_DEBUG_RINGS
-   fi
-
-   tristate '  Frame relay DLCI support' CONFIG_DLCI
-   if [ "$CONFIG_DLCI" != "n" ]; then
-      int '    Max open DLCI' CONFIG_DLCI_COUNT 24
-      int '    Max DLCI per device' CONFIG_DLCI_MAX 8
-      dep_tristate '    SDLA (Sangoma S502/S508) support' CONFIG_SDLA $CONFIG_DLCI
-   fi
-
-# Wan router core.
-
-   if [ "$CONFIG_WAN_ROUTER" != "n" ]; then
-      bool '  WAN router drivers' CONFIG_WAN_ROUTER_DRIVERS
-      if [ "$CONFIG_WAN_ROUTER_DRIVERS" = "y" ]; then
-	 dep_tristate '    Sangoma WANPIPE(tm) multiprotocol cards' CONFIG_VENDOR_SANGOMA $CONFIG_WAN_ROUTER
-	 if [ "$CONFIG_VENDOR_SANGOMA" != "n" ]; then
-	    bool '      WANPIPE Cisco HDLC support' CONFIG_WANPIPE_CHDLC
-	    bool '      WANPIPE Frame Relay support' CONFIG_WANPIPE_FR
-	    bool '      WANPIPE X.25 support' CONFIG_WANPIPE_X25
-	    bool '      WANPIPE PPP support' CONFIG_WANPIPE_PPP
-	    bool '      WANPIPE Multi-Port PPP support' CONFIG_WANPIPE_MULTPPP
-	 fi
-	 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	    dep_tristate '    Cyclom 2X(tm) cards (EXPERIMENTAL)' CONFIG_CYCLADES_SYNC $CONFIG_WAN_ROUTER_DRIVERS
-	    if [ "$CONFIG_CYCLADES_SYNC" != "n" ]; then
-	       bool '      Cyclom 2X X.25 support (EXPERIMENTAL)' CONFIG_CYCLOMX_X25
-	    fi
-	 fi
-      fi
-   fi
-
-
-# X.25 network drivers
-
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '  LAPB over Ethernet driver (EXPERIMENTAL)' CONFIG_LAPBETHER $CONFIG_LAPB $CONFIG_X25
-      dep_tristate '  X.25 async driver (EXPERIMENTAL)' CONFIG_X25_ASY $CONFIG_LAPB $CONFIG_X25
-   fi
-
-   if [ "$CONFIG_X86" = "y" ]; then
-      tristate '  Granch SBNI12 Leased Line adapter support' CONFIG_SBNI
-      if [ "$CONFIG_SBNI" != "n" ]; then
-         bool '    Multiple line feature support' CONFIG_SBNI_MULTILINE
-      fi
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/wan/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,657 @@
+#
+# wan devices configuration
+#
+
+menu "Wan interfaces"
+	depends on NETDEVICES
+
+config WAN
+	bool "Wan interfaces support"
+	---help---
+	  Wide Area Networks (WANs), such as X.25, frame relay and leased
+	  lines, are used to interconnect Local Area Networks (LANs) over vast
+	  distances with data transfer rates significantly higher than those
+	  achievable with commonly used asynchronous modem connections.
+	  Usually, a quite expensive external device called a `WAN router' is
+	  needed to connect to a WAN.
+
+	  As an alternative, a relatively inexpensive WAN interface card can
+	  allow your Linux box to directly connect to a WAN. If you have one
+	  of those cards and wish to use it under Linux, say Y here and also
+	  to the WAN driver for your card, below.
+
+	  If unsure, say N.
+
+# There is no way to detect a comtrol sv11 - force it modular for now.
+config HOSTESS_SV11
+	tristate "Comtrol Hostess SV-11 support"
+	depends on WAN && ISA && m
+	help
+	  This is a network card for low speed synchronous serial links, at
+	  up to 256Kbps. It supports both PPP and Cisco HDLC.
+
+	  At this point, the driver can only be compiled as a module.
+
+# The COSA/SRP driver has not been tested as non-modular yet.
+config COSA
+	tristate "COSA/SRP sync serial boards support"
+	depends on WAN && ISA && m
+	---help---
+	  This is a driver for COSA and SRP synchronous serial boards. These
+	  boards allow to connect synchronous serial devices (for example
+	  base-band modems, or any other device with the X.21, V.24, V.35 or
+	  V.36 interface) to your Linux box. The cards can work as the
+	  character device, synchronous PPP network device, or the Cisco HDLC
+	  network device.
+
+	  To actually use the COSA or SRP board, you will need user-space
+	  utilities for downloading the firmware to the cards and to set them
+	  up. Look at the <http://www.fi.muni.cz/~kas/cosa/> for more
+	  information about the cards (including the pointer to the user-space
+	  utilities). You can also read the comment at the top of the
+	  <file:drivers/net/wan/cosa.c> for details about the cards and the driver
+	  itself.
+
+	  The driver will be compiled as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called cosa.o. For general information about
+	  modules read <file:Documentation/modules.txt>.
+
+#
+# COMX drivers
+#
+config COMX
+	tristate "MultiGate (COMX) synchronous serial boards support"
+	depends on WAN
+	---help---
+	  Say Y if you want to use any board from the MultiGate (COMX) family.
+	  These boards are synchronous serial adapters for the PC,
+	  manufactured by ITConsult-Pro Co, Hungary.
+
+	  Read <file:Documentation/networking/comx.txt> for help on
+	  configuring and using COMX interfaces.  Further info on these cards
+	  can be found at <http://www.itc.hu/> or <info@itc.hu>.
+
+	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
+	  use this driver.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called comx.o.
+
+config COMX_HW_COMX
+	tristate "Support for COMX/CMX/HiCOMX boards"
+	depends on COMX
+	help
+	  Hardware driver for the 'CMX', 'COMX' and 'HiCOMX' boards from the
+	  MultiGate family. Say Y if you have one of these.
+
+	  You will need additional firmware to use these cards, which are
+	  downloadable from <ftp://ftp.itc.hu/>.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  comx-hw-comx.o.
+
+config COMX_HW_LOCOMX
+	tristate "Support for LoCOMX board"
+	depends on COMX
+	help
+	  Hardware driver for the 'LoCOMX' board from the MultiGate family.
+	  Say Y if you have a board like this.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  comx-hw-locomx.o.
+
+config COMX_HW_MIXCOM
+	tristate "Support for MixCOM board"
+	depends on COMX
+	---help---
+	  Hardware driver for the 'MixCOM' board from the MultiGate family.
+	  Say Y if you have a board like this.
+
+	  If you want to use the watchdog device on this card, you should
+	  select it in the Watchdog Cards section of the Character Devices
+	  configuration. The ISDN interface of this card is Teles 16.3
+	  compatible, you should enable it in the ISDN configuration menu. The
+	  driver for the flash ROM of this card is available separately on
+	  <ftp://ftp.itc.hu/>.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>. The module will be called
+	  comx-hw-mixcom.o.
+
+config COMX_HW_MUNICH
+	tristate "Support for MUNICH based boards: SliceCOM, PCICOM (WelCOM)"
+	depends on COMX
+	---help---
+	  Hardware driver for the 'SliceCOM' (channelized E1) and 'PciCOM'
+	  boards (X21) from the MultiGate family.
+
+	  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 comx-hw-munich.o. If you want to compile it
+	  as a module, say M here and read Documentation/modules.txt.
+
+	  Read linux/Documentation/networking/slicecom.txt for help on
+	  configuring and using SliceCOM interfaces. Further info on these cards
+	  can be found at http://www.itc.hu or <info@itc.hu>.
+
+config COMX_PROTO_PPP
+	tristate "Support for HDLC and syncPPP protocols on MultiGate boards"
+	depends on COMX
+	help
+	  Cisco-HDLC and synchronous PPP protocol driver for all MultiGate
+	  boards. Say Y if you want to use either protocol on your MultiGate
+	  boards.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  comx-proto-ppp.o.
+
+config COMX_PROTO_LAPB
+	tristate "Support for LAPB protocol on MultiGate boards"
+	depends on WAN && (COMX!=n && LAPB=m && LAPB || LAPB=y && COMX)
+	help
+	  LAPB protocol driver for all MultiGate boards. Say Y if you
+	  want to use this protocol on your MultiGate boards.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  comx-proto-lapb.o.
+
+config COMX_PROTO_FR
+	tristate "Support for Frame Relay on MultiGate boards"
+	depends on COMX
+	help
+	  Frame Relay protocol driver for all MultiGate boards. Say Y if you
+	  want to use this protocol on your MultiGate boards.
+
+	  If you want to compile this as a module, say M and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  comx-proto-fr.o.
+
+#
+# The Etinc driver has not been tested as non-modular yet.
+#
+config DSCC4
+	tristate "Etinc PCISYNC serial board support"
+	depends on WAN && m
+	help
+	  This is a driver for Etinc PCISYNC boards based on the Infineon
+	  (ex. Siemens) DSCC4 chipset. It is supposed to work with the four
+	  ports card. Take a look at <http://www.cogenit.fr/dscc4/>
+	  for further informations about the driver and his configuration.
+
+	  The driver will be compiled as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called dscc4.o. For general information about
+	  modules read <file:Documentation/modules.txt>.
+
+#
+# Lan Media's board. Currently 1000, 1200, 5200, 5245
+#
+config LANMEDIA
+	tristate "LanMedia Corp. SSI/V.35, T1/E1, HSSI, T3 boards"
+	depends on WAN
+	---help---
+	  This is a driver for the following Lan Media family of serial
+	  boards.
+
+	  LMC 1000 board allows you to connect synchronous serial devices (for
+	  example base-band modems, or any other device with the X.21, V.24,
+	  V.35 or V.36 interface) to your Linux box.
+
+	  LMC 1200 with on board DSU board allows you to connect your Linux
+	  box dirrectly to a T1 or E1 circuit.
+
+	  LMC 5200 board provides a HSSI interface capable of running up to
+	  52 mbits per second.
+
+	  LMC 5245 board connects directly to a T3 circuit saving the
+	  additional external hardware.
+
+	  To change setting such as syncPPP vs cisco HDLC or clock source you
+	  will need lmcctl.  It is available at <ftp://ftp.lanmedia.com/>.
+
+	  This code is also available as a module called lmc.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+# There is no way to detect a Sealevel board. Force it modular
+config SEALEVEL_4021
+	tristate "Sealevel Systems 4021 support"
+	depends on WAN && m
+	help
+	  This is a driver for the Sealevel Systems ACB 56 serial I/O adapter.
+
+	  This driver can only be compiled as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to do that, say M here. The module will be called
+	  sealevel.o.
+
+config SYNCLINK_SYNCPPP
+	tristate "SyncLink HDLC/SYNCPPP support"
+	depends on WAN
+	help
+	  Enables HDLC/SYNCPPP support for the SyncLink WAN driver.
+	  Normally the SyncLink WAN driver works with the main PPP
+	  driver (ppp.c) and pppd program. HDLC/SYNCPPP support allows use
+	  of the Cisco HDLC/PPP driver (syncppp.c).
+	  The SyncLink WAN driver (in character devices) must also be enabled.
+
+# Generic HDLC
+config HDLC
+	tristate "Generic HDLC layer"
+	depends on WAN
+	help
+	  Say Y to this option if your Linux box contains a WAN card supported
+	  by this driver and you are planning to connect the box to a WAN
+	  ( = Wide Area Network). You will need supporting software from
+	  <http://hq.pm.waw.pl/hdlc/>.
+	  Generic HDLC driver currently supports raw HDLC, Cisco HDLC, Frame
+	  Relay, synchronous Point-to-Point Protocol (PPP) and X.25.
+
+	  If unsure, say N here.
+
+config HDLC_RAW
+	bool "Raw HDLC support"
+	depends on HDLC
+	help
+	  Say Y to this option if you want generic HDLC driver to support
+	  raw HDLC over WAN (Wide Area Network) connections.
+
+	  If unsure, say N here.
+
+config HDLC_CISCO
+	bool "Cisco HDLC support"
+	depends on HDLC
+	help
+	  Say Y to this option if you want generic HDLC driver to support
+	  Cisco HDLC over WAN (Wide Area Network) connections.
+
+	  If unsure, say N here.
+
+config HDLC_FR
+	bool "Frame Relay support"
+	depends on HDLC
+	help
+	  Say Y to this option if you want generic HDLC driver to support
+	  Frame-Relay protocol over WAN (Wide Area Network) connections.
+
+	  If unsure, say N here.
+
+config HDLC_PPP
+	bool "Synchronous Point-to-Point Protocol (PPP) support"
+	depends on HDLC
+	help
+	  Say Y to this option if you want generic HDLC driver to support
+	  PPP over WAN (Wide Area Network) connections.
+
+	  If unsure, say N here.
+
+config HDLC_X25
+	bool "X.25 protocol support"
+	depends on HDLC && (LAPB=m && HDLC=m || LAPB=y)
+	help
+	  Say Y to this option if you want generic HDLC driver to support
+	  X.25 protocol over WAN (Wide Area Network) connections.
+
+	  If unsure, say N here.
+
+comment "X.25/LAPB support is disabled"
+	depends on WAN && HDLC && (LAPB!=m || HDLC!=m) && LAPB!=y
+
+config PC300
+	tristate "Cyclades-PC300 support (RS-232/V.35, X.21, T1/E1 boards)"
+	depends on HDLC && PCI
+	---help---
+	  This is a driver for the Cyclades-PC300 synchronous communication
+	  boards. These boards provide synchronous serial interfaces to your
+	  Linux box (interfaces currently available are RS-232/V.35, X.21 and
+	  T1/E1). If you wish to support Multilink PPP, please select the
+	  option below this one and read the file README.mlppp provided by PC300
+	  package.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read Documentation/modules.txt. The module will be
+	  called pc300.o.
+
+	  If you haven't heard about it, it's safe to say N.
+
+config PC300_MLPPP
+	bool "Cyclades-PC300 MLPPP support"
+	depends on PC300 && PPP_MULTILINK && PPP_SYNC_TTY && HDLC_PPP
+	help
+	  Say 'Y' to this option if you are planning to use Multilink PPP over the
+	  PC300 synchronous communication boards.
+
+comment "Cyclades-PC300 MLPPP support is disabled."
+	depends on WAN && HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP)
+
+comment "Refer to the file README.mlppp, provided by PC300 package."
+	depends on WAN && HDLC && PC300 && (PPP=n || !PPP_MULTILINK || PPP_SYNC_TTY=n || !HDLC_PPP)
+
+config N2
+	tristate "SDL RISCom/N2 support"
+	depends on HDLC
+	help
+	  This driver is for RISCom/N2 single or dual channel ISA cards
+	  made by SDL Communications Inc.  If you have such a card,
+	  say Y here and see <http://hq.pm.waw.pl/pub/hdlc/>.
+
+	  Note that N2csu and N2dds cards are not supported by this driver.
+
+	  If unsure, say N here.
+
+config C101
+	tristate "Moxa C101 support"
+	depends on HDLC
+	help
+	  This driver is for C101 SuperSync ISA cards made by Moxa
+	  Technologies Co., Ltd. If you have such a card,
+	  say Y here and see <http://hq.pm.waw.pl/pub/hdlc/>
+
+	  If unsure, say N here.
+
+config FARSYNC
+	tristate "FarSync T-Series support"
+	depends on HDLC
+	---help---
+	  This driver supports the FarSync T-Series X.21 (and V.35/V.24) cards
+	  from FarSite Communications Ltd.
+	  Synchronous communication is supported on all ports at speeds up to
+	  8Mb/s (128K on V.24) using synchronous PPP, Cisco HDLC, raw HDLC,
+	  Frame Relay or X.25/LAPB.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want)
+	  say M here and read <file:Documentation/modules.txt>.
+	  The module will be called farsync.o and if you want the module to be
+	  automatically loaded when the interface is referenced then you
+	  should add "alias hdlcX farsync" to /etc/modules.conf for each
+	  interface, where X is 0, 1, 2, ...
+
+config HDLC_DEBUG_PKT
+	bool "Debug received/transmitted packets"
+	depends on HDLC
+
+config HDLC_DEBUG_HARD_HEADER
+	bool "Debug hard_header routines"
+	depends on HDLC
+
+config HDLC_DEBUG_ECN
+	bool "Debug FECN/BECN conditions"
+	depends on HDLC
+
+config HDLC_DEBUG_RINGS
+	bool "Debug RX/TX packet rings"
+	depends on HDLC
+
+config DLCI
+	tristate "Frame relay DLCI support"
+	depends on WAN
+	---help---
+	  This is support for the frame relay protocol; frame relay is a fast
+	  low-cost way to connect to a remote Internet access provider or to
+	  form a private wide area network. The one physical line from your
+	  box to the local "switch" (i.e. the entry point to the frame relay
+	  network, usually at the phone company) can carry several logical
+	  point-to-point connections to other computers connected to the frame
+	  relay network. For a general explanation of the protocol, check out
+	  <http://www.frforum.com/> on the WWW. To use frame relay, you need
+	  supporting hardware (called FRAD) and certain programs from the
+	  net-tools package as explained in
+	  <file:Documentation/networking/framerelay.txt>.
+
+	  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 dlci.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config DLCI_COUNT
+	int "Max open DLCI"
+	depends on DLCI
+	default "24"
+	help
+	  This is the maximal number of logical point-to-point frame relay
+	  connections (the identifiers of which are called DCLIs) that
+	  the driver can handle. The default is probably fine.
+
+config DLCI_MAX
+	int "Max DLCI per device"
+	depends on DLCI
+	default "8"
+	help
+	  You can specify here how many logical point-to-point frame relay
+	  connections (the identifiers of which are called DCLIs) should be
+	  handled by each of your hardware frame relay access devices. Go with
+	  the default.
+
+config SDLA
+	tristate "SDLA (Sangoma S502/S508) support"
+	depends on DLCI
+	help
+	  Say Y here if you need a driver for the Sangoma S502A, S502E, and
+	  S508 Frame Relay Access Devices. These are multi-protocol cards, but
+	  only frame relay is supported by the driver at this time. Please
+	  read <file:Documentation/framerelay.txt>.
+
+	  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 sdla.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+# Wan router core.
+config WAN_ROUTER_DRIVERS
+	bool "WAN router drivers"
+	depends on WAN && WAN_ROUTER
+	---help---
+	  If you have a WAN interface card and you want your Linux box to act
+	  as a WAN router, thereby connecting you Local Area Network to the
+	  outside world over the WAN connection, say Y here and then to the
+	  driver for your card below. In addition, you need to say Y to "Wan
+	  Router".
+
+	  You will need the wan-tools package which is available from
+	  <ftp://ftp.sangoma.com/>. Read
+	  <file:Documentation/networking/wan-router.txt> for more information.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about WAN router drivers. If unsure, say N.
+
+config VENDOR_SANGOMA
+	tristate "Sangoma WANPIPE(tm) multiprotocol cards"
+	depends on WAN_ROUTER_DRIVERS && WAN_ROUTER
+	---help---
+	  WANPIPE from Sangoma Technologies Inc. (<http://www.sangoma.com/>)
+	  is a family of intelligent multiprotocol WAN adapters with data
+	  transfer rates up to 4Mbps. They are also known as Synchronous
+	  Data Link Adapters (SDLA) and are designated as S514-PCI or
+	  S508-ISA.  These cards support
+
+	  - X.25, Frame Relay, PPP, Cisco HDLC protocols.
+
+	  - API support for protocols like HDLC (LAPB),
+	  HDLC Streaming, X.25, Frame Relay and BiSync.
+
+	  - Ethernet Bridging over Frame Relay protocol.
+
+	  - MULTILINK PPP
+
+	  - Async PPP (Modem Dialup)
+
+	  If you have one or more of these cards, say M to this option; you
+	  may then also want to read the file
+	  <file:Documentation/networking/wanpipe.txt>.  The next questions
+	  will ask you about the protocols you want the driver to support.
+
+	  The driver will be compiled as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called wanpipe.o.  For general information about
+	  modules read <file:Documentation/modules.txt>.
+
+config WANPIPE_CHDLC
+	bool "WANPIPE Cisco HDLC support"
+	depends on VENDOR_SANGOMA
+	---help---
+	  Say Y to this option if you are planning to connect a WANPIPE card
+	  to a leased line using the Cisco HDLC protocol. This now supports
+	  Dual Port Cisco HDLC on the S514-PCI/S508-ISA cards.
+	  This support also allows user to build applications using the
+	  HDLC streaming API.
+
+	  CHDLC Streaming driver also supports MULTILINK PPP
+	  support that can bind multiple WANPIPE T1 cards into
+	  a single logical channel.
+
+	  If you say  N, the Cisco HDLC support and
+	  HDLC streaming API and MULTILINK PPP will not be
+	  included in the driver.
+
+config WANPIPE_FR
+	bool "WANPIPE Frame Relay support"
+	depends on VENDOR_SANGOMA
+	help
+	  Say Y to this option if you are planning to connect a WANPIPE card
+	  to a frame relay network, or use frame relay API to develope
+	  custom applications over the Frame  Relay protocol.
+	  This feature also contains the Ethernet Bridging over Frame Relay,
+	  where a WANPIPE frame relay link can be directly connected to the
+	  Linux kernel bridge.  If you say N, the frame relay support will
+	  not be included in the driver. The Frame Relay option is
+	  supported on S514-PCI and S508-ISA cards.
+
+config WANPIPE_X25
+	bool "WANPIPE X.25 support"
+	depends on VENDOR_SANGOMA
+	help
+	  Say Y to this option if you are planning to connect a WANPIPE card
+	  to an X.25 network.  Note, this feature also includes the X.25 API
+	  support used to develope custom applications over the X.25 protocol.
+	  If you say N, the X.25 support will not be included in the driver.
+	  The X.25 option is supported on S514-PCI and S508-ISA cards.
+
+config WANPIPE_PPP
+	bool "WANPIPE PPP support"
+	depends on VENDOR_SANGOMA
+	help
+	  Say Y to this option if you are planning to connect a WANPIPE card
+	  to a leased line using Point-to-Point protocol (PPP). If you say N,
+	  the PPP support will not be included in the driver. The PPP option
+	  is supported on S514-PCI/S508-ISA cards.
+
+config WANPIPE_MULTPPP
+	bool "WANPIPE Multi-Port PPP support"
+	depends on VENDOR_SANGOMA
+	help
+	  Say Y to this option if you are planning to connect a WANPIPE card
+	  to a leased line using Point-to-Point protocol (PPP).  Note, the
+	  MultiPort PPP uses the Linux Kernel SyncPPP protocol over the
+	  Sangoma HDLC Streaming adapter.  In this case each Sangoma adapter
+	  port can support an independent PPP connection.  For example, a
+	  single Quad-Port PCI adapter can support up to four independent
+	  PPP links. If you say N,the PPP support will not be included in the
+	  driver.  The PPP option is supported on S514-PCI/S508-ISA cards.
+
+config CYCLADES_SYNC
+	tristate "Cyclom 2X(tm) cards (EXPERIMENTAL)"
+	depends on WAN_ROUTER_DRIVERS
+	---help---
+	  Cyclom 2X from Cyclades Corporation (<http://www.cyclades.com/> and
+	  <http://www.cyclades.com.br/>) is an intelligent multiprotocol WAN
+	  adapter with data transfer rates up to 512 Kbps. These cards support
+	  the X.25 and SNA related protocols. If you have one or more of these
+	  cards, say Y to this option. The next questions will ask you about
+	  the protocols you want the driver to support (for now only X.25 is
+	  supported).
+
+	  While no documentation is available at this time please grab the
+	  wanconfig tarball in
+	  <http://www.conectiva.com.br/~acme/cycsyn-devel/> (with minor changes
+	  to make it compile with the current wanrouter include files; efforts
+	  are being made to use the original package available at
+	  <ftp://ftp.sangoma.com/>).
+
+	  Feel free to contact me or the cycsyn-devel mailing list at
+	  acme@conectiva.com.br and cycsyn-devel@bazar.conectiva.com.br for
+	  additional details, I hope to have documentation available as soon
+	  as possible. (Cyclades Brazil is writing the Documentation).
+
+	  The driver will be compiled as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called cyclomx.o. For general information about
+	  modules read <file:Documentation/modules.txt>.
+
+config CYCLOMX_X25
+	bool "Cyclom 2X X.25 support (EXPERIMENTAL)"
+	depends on CYCLADES_SYNC
+	help
+	  Say Y to this option if you are planning to connect a Cyclom 2X card
+	  to an X.25 network.
+
+	  If you say N, the X.25 support will not be included in the driver
+	  (saves about 11 KB of kernel memory).
+
+# X.25 network drivers
+config LAPBETHER
+	tristate "LAPB over Ethernet driver (EXPERIMENTAL)"
+	depends on WAN && LAPB && X25
+	---help---
+	  This is a driver for a pseudo device (typically called /dev/lapb0)
+	  which allows you to open an LAPB point-to-point connection to some
+	  other computer on your Ethernet network.  In order to do this, you
+	  need to say Y or M to the driver for your Ethernet card as well as
+	  to "LAPB Data Link Driver".
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called lapbether.o.  If unsure, say N.
+
+config X25_ASY
+	tristate "X.25 async driver (EXPERIMENTAL)"
+	depends on WAN && LAPB && X25
+	---help---
+	  This is a driver for sending and receiving X.25 frames over regular
+	  asynchronous serial lines such as telephone lines equipped with
+	  ordinary modems.  Experts should note that this driver doesn't
+	  currently comply with the asynchronous HDLS framing protocols in
+	  CCITT recommendation X.25.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called x25_asy.o.  If unsure, say N.
+
+config SBNI
+	tristate "Granch SBNI12 Leased Line adapter support"
+	depends on WAN && X86
+	---help---
+	  This is a driver for ISA SBNI12-xx cards which are low cost
+	  alternatives to leased line modems. Say Y if you want to insert
+	  the driver into the kernel or say M to compile it as a module (the
+	  module will be called sbni.o).
+
+	  You can find more information and last versions of drivers and
+	  utilities at <http://www.granch.ru/>. If you have any question you
+	  can send email to sbni@granch.ru.
+
+	  Say N if unsure.
+
+config SBNI_MULTILINE
+	bool "Multiple line feature support"
+	depends on SBNI
+	help
+	  Schedule traffic for some parallel lines, via SBNI12 adapters.
+	  If you have two computers connected with two parallel lines it's
+	  possible to increase transfer rate nearly twice. You should have
+	  a program named 'sbniconfig' to configure adapters.
+
+	  Say N if unsure.
+
+endmenu
+
diff -Nru a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
--- a/drivers/net/wan/c101.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/net/wan/c101.c	Wed Oct 30 16:44:25 2002
@@ -175,9 +175,8 @@
 
 static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-	union line_settings *line = &ifr->ifr_settings->ifs_line;
 	const size_t size = sizeof(sync_serial_settings);
-	sync_serial_settings new_line;
+	sync_serial_settings new_line, *line = ifr->ifr_settings.ifs_ifsu.sync;
 	hdlc_device *hdlc = dev_to_hdlc(dev);
 	port_t *port = hdlc_to_port(hdlc);
 
@@ -190,10 +189,14 @@
 	if (cmd != SIOCWANDEV)
 		return hdlc_ioctl(dev, ifr, cmd);
 
-	switch(ifr->ifr_settings->type) {
+	switch(ifr->ifr_settings.type) {
 	case IF_GET_IFACE:
-		ifr->ifr_settings->type = IF_IFACE_SYNC_SERIAL;
-		if (copy_to_user(&line->sync, &port->settings, size))
+		ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL;
+		if (ifr->ifr_settings.size < size) {
+			ifr->ifr_settings.size = size; /* data size wanted */
+			return -ENOBUFS;
+		}
+		if (copy_to_user(line, &port->settings, size))
 			return -EFAULT;
 		return 0;
 
@@ -201,7 +204,7 @@
 		if(!capable(CAP_NET_ADMIN))
 			return -EPERM;
 
-		if (copy_from_user(&new_line, &line->sync, size))
+		if (copy_from_user(&new_line, line, size))
 			return -EFAULT;
 
 		if (new_line.clock_type != CLOCK_EXT &&
diff -Nru a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
--- a/drivers/net/wan/cycx_main.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/wan/cycx_main.c	Wed Oct 30 16:44:28 2002
@@ -44,7 +44,6 @@
 #include <linux/kernel.h>	/* printk(), and other useful stuff */
 #include <linux/module.h>	/* support for loadable modules */
 #include <linux/ioport.h>	/* request_region(), release_region() */
-#include <linux/tqueue.h>	/* for kernel task queues */
 #include <linux/wanrouter.h>	/* WAN router definitions */
 #include <linux/cyclomx.h>	/* cyclomx common user API definitions */
 #include <asm/uaccess.h>	/* kernel <-> user copy */
diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
--- a/drivers/net/wan/dscc4.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/net/wan/dscc4.c	Wed Oct 30 16:44:26 2002
@@ -1144,7 +1144,7 @@
 
 static int dscc4_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-	union line_settings *line = &ifr->ifr_settings->ifs_line;
+	sync_serial_settings *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;
@@ -1155,10 +1155,14 @@
 	if (cmd != SIOCWANDEV)
 		return -EOPNOTSUPP;
 
-	switch(ifr->ifr_settings->type) {
+	switch(ifr->ifr_settings.type) {
 	case IF_GET_IFACE:
-		ifr->ifr_settings->type = IF_IFACE_SYNC_SERIAL;
-		if (copy_to_user(&line->sync, &dpriv->settings, size))
+		ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL;
+		if (ifr->ifr_settings.size < size) {
+			ifr->ifr_settings.size = size; /* data size wanted */
+			return -ENOBUFS;
+		}
+		if (copy_to_user(line, &dpriv->settings, size))
 			return -EFAULT;
 		break;
 
@@ -1166,7 +1170,7 @@
 		if (!capable(CAP_NET_ADMIN))
 			return -EPERM;
 
-		if (copy_from_user(&dpriv->settings, &line->sync, size))
+		if (copy_from_user(&dpriv->settings, line, size))
 			return -EFAULT;
 		ret = dscc4_set_iface(dpriv, dev);
 		break;
diff -Nru a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
--- a/drivers/net/wan/farsync.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/net/wan/farsync.c	Wed Oct 30 16:44:30 2002
@@ -1010,11 +1010,11 @@
 fst_set_iface ( struct fst_card_info *card, struct fst_port_info *port,
                 struct ifreq *ifr )
 {
-	union line_settings *line = &ifr->ifr_settings->ifs_line;
         sync_serial_settings sync;
         int i;
 
-        if ( copy_from_user ( &sync, &line->sync, sizeof ( sync )))
+        if (copy_from_user (&sync, ifr->ifr_settings.ifs_ifsu.sync,
+			    sizeof (sync)))
                 return -EFAULT;
 
         if ( sync.loopback )
@@ -1022,7 +1022,7 @@
 
         i = port->index;
 
-        switch ( ifr->ifr_settings->type )
+        switch (ifr->ifr_settings.type)
         {
         case IF_IFACE_V35:
                 FST_WRW ( card, portConfig[i].lineInterface, V35 );
@@ -1067,7 +1067,6 @@
 fst_get_iface ( struct fst_card_info *card, struct fst_port_info *port,
                 struct ifreq *ifr )
 {
-	union line_settings *line = &ifr->ifr_settings->ifs_line;
         sync_serial_settings sync;
         int i;
 
@@ -1078,24 +1077,30 @@
         switch ( port->hwif )
         {
         case V35:
-                ifr->ifr_settings->type = IF_IFACE_V35;
+                ifr->ifr_settings.type = IF_IFACE_V35;
                 break;
         case V24:
-                ifr->ifr_settings->type = IF_IFACE_V24;
+                ifr->ifr_settings.type = IF_IFACE_V24;
                 break;
         case X21:
         default:
-                ifr->ifr_settings->type = IF_IFACE_X21;
+                ifr->ifr_settings.type = IF_IFACE_X21;
                 break;
         }
 
+	if (ifr->ifr_settings.size < sizeof(sync)) {
+		ifr->ifr_settings.size = sizeof(sync); /* data size wanted */
+		return -ENOBUFS;
+	}
+
         i = port->index;
         sync.clock_rate = FST_RDL ( card, portConfig[i].lineSpeed );
         /* Lucky card and linux use same encoding here */
         sync.clock_type = FST_RDB ( card, portConfig[i].internalClock );
         sync.loopback = 0;
 
-        if ( copy_to_user (&line->sync, &sync, sizeof ( sync )))
+        if (copy_to_user (ifr->ifr_settings.ifs_ifsu.sync, &sync,
+			  sizeof(sync)))
                 return -EFAULT;
 
         return 0;
@@ -1221,7 +1226,7 @@
                 return set_conf_from_info ( card, port, &info );
 
         case SIOCWANDEV:
-                switch ( ifr->ifr_settings->type )
+                switch (ifr->ifr_settings.type)
                 {
                 case IF_GET_IFACE:
                         return fst_get_iface ( card, port, ifr );
diff -Nru a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c
--- a/drivers/net/wan/hdlc_cisco.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/net/wan/hdlc_cisco.c	Wed Oct 30 16:44:27 2002
@@ -247,15 +247,19 @@
 
 int hdlc_cisco_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
 {
-	cisco_proto *cisco_s = &ifr->ifr_settings->ifs_hdlc.cisco;
+	cisco_proto *cisco_s = ifr->ifr_settings.ifs_ifsu.cisco;
 	const size_t size = sizeof(cisco_proto);
 	cisco_proto new_settings;
 	struct net_device *dev = hdlc_to_dev(hdlc);
 	int result;
 
-	switch (ifr->ifr_settings->type) {
+	switch (ifr->ifr_settings.type) {
 	case IF_GET_PROTO:
-		ifr->ifr_settings->type = IF_PROTO_CISCO;
+		ifr->ifr_settings.type = IF_PROTO_CISCO;
+		if (ifr->ifr_settings.size < size) {
+			ifr->ifr_settings.size = size; /* data size wanted */
+			return -ENOBUFS;
+		}
 		if (copy_to_user(cisco_s, &hdlc->state.cisco.settings, size))
 			return -EFAULT;
 		return 0;
diff -Nru a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
--- a/drivers/net/wan/hdlc_fr.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/net/wan/hdlc_fr.c	Wed Oct 30 16:44:26 2002
@@ -778,16 +778,20 @@
 
 int hdlc_fr_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
 {
-	fr_proto *fr_s = &ifr->ifr_settings->ifs_hdlc.fr;
+	fr_proto *fr_s = ifr->ifr_settings.ifs_ifsu.fr;
 	const size_t size = sizeof(fr_proto);
 	fr_proto new_settings;
 	struct net_device *dev = hdlc_to_dev(hdlc);
 	fr_proto_pvc pvc;
 	int result;
 
-	switch (ifr->ifr_settings->type) {
+	switch (ifr->ifr_settings.type) {
 	case IF_GET_PROTO:
-		ifr->ifr_settings->type = IF_PROTO_FR;
+		ifr->ifr_settings.type = IF_PROTO_FR;
+		if (ifr->ifr_settings.size < size) {
+			ifr->ifr_settings.size = size; /* data size wanted */
+			return -ENOBUFS;
+		}
 		if (copy_to_user(fr_s, &hdlc->state.fr.settings, size))
 			return -EFAULT;
 		return 0;
@@ -847,12 +851,12 @@
 		if(!capable(CAP_NET_ADMIN))
 			return -EPERM;
 
-		if (copy_from_user(&pvc, &ifr->ifr_settings->ifs_hdlc.fr_pvc,
+		if (copy_from_user(&pvc, ifr->ifr_settings.ifs_ifsu.fr_pvc,
 				   sizeof(fr_proto_pvc)))
 			return -EFAULT;
 
 		return fr_pvc(hdlc, pvc.dlci,
-			      ifr->ifr_settings->type == IF_PROTO_FR_ADD_PVC);
+			      ifr->ifr_settings.type == IF_PROTO_FR_ADD_PVC);
 	}
 
 	return -EINVAL;
diff -Nru a/drivers/net/wan/hdlc_generic.c b/drivers/net/wan/hdlc_generic.c
--- a/drivers/net/wan/hdlc_generic.c	Wed Oct 30 16:44:22 2002
+++ b/drivers/net/wan/hdlc_generic.c	Wed Oct 30 16:44:22 2002
@@ -38,7 +38,7 @@
 #include <linux/hdlc.h>
 
 
-static const char* version = "HDLC support module revision 1.10";
+static const char* version = "HDLC support module revision 1.11";
 
 
 static int hdlc_change_mtu(struct net_device *dev, int new_mtu)
@@ -95,13 +95,13 @@
 	if (cmd != SIOCWANDEV)
 		return -EINVAL;
 
-	switch(ifr->ifr_settings->type) {
+	switch(ifr->ifr_settings.type) {
 	case IF_PROTO_HDLC:
 	case IF_PROTO_PPP:
 	case IF_PROTO_CISCO:
 	case IF_PROTO_FR:
 	case IF_PROTO_X25:
-		proto = ifr->ifr_settings->type;
+		proto = ifr->ifr_settings.type;
 		break;
 
 	default:
diff -Nru a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
--- a/drivers/net/wan/hdlc_ppp.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/net/wan/hdlc_ppp.c	Wed Oct 30 16:44:20 2002
@@ -82,9 +82,9 @@
 	struct net_device *dev = hdlc_to_dev(hdlc);
 	int result;
 
-	switch (ifr->ifr_settings->type) {
+	switch (ifr->ifr_settings.type) {
 	case IF_GET_PROTO:
-		ifr->ifr_settings->type = IF_PROTO_PPP;
+		ifr->ifr_settings.type = IF_PROTO_PPP;
 		return 0; /* return protocol only, no settable parameters */
 
 	case IF_PROTO_PPP:
diff -Nru a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c
--- a/drivers/net/wan/hdlc_raw.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/net/wan/hdlc_raw.c	Wed Oct 30 16:44:29 2002
@@ -37,15 +37,19 @@
 
 int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
 {
-	raw_hdlc_proto *raw_s = &ifr->ifr_settings->ifs_hdlc.raw_hdlc;
+	raw_hdlc_proto *raw_s = ifr->ifr_settings.ifs_ifsu.raw_hdlc;
 	const size_t size = sizeof(raw_hdlc_proto);
 	raw_hdlc_proto new_settings;
 	struct net_device *dev = hdlc_to_dev(hdlc);
 	int result;
 
-	switch (ifr->ifr_settings->type) {
+	switch (ifr->ifr_settings.type) {
 	case IF_GET_PROTO:
-		ifr->ifr_settings->type = IF_PROTO_HDLC;
+		ifr->ifr_settings.type = IF_PROTO_HDLC;
+		if (ifr->ifr_settings.size < size) {
+			ifr->ifr_settings.size = size; /* data size wanted */
+			return -ENOBUFS;
+		}
 		if (copy_to_user(raw_s, &hdlc->state.raw_hdlc.settings, size))
 			return -EFAULT;
 		return 0;
diff -Nru a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
--- a/drivers/net/wan/hdlc_x25.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/net/wan/hdlc_x25.c	Wed Oct 30 16:44:36 2002
@@ -184,9 +184,9 @@
 	struct net_device *dev = hdlc_to_dev(hdlc);
 	int result;
 
-	switch (ifr->ifr_settings->type) {
+	switch (ifr->ifr_settings.type) {
 	case IF_GET_PROTO:
-		ifr->ifr_settings->type = IF_PROTO_X25;
+		ifr->ifr_settings.type = IF_PROTO_X25;
 		return 0; /* return protocol only, no settable parameters */
 
 	case IF_PROTO_X25:
diff -Nru a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c
--- a/drivers/net/wan/n2.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/net/wan/n2.c	Wed Oct 30 16:44:25 2002
@@ -246,9 +246,8 @@
 
 static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-	union line_settings *line = &ifr->ifr_settings->ifs_line;
 	const size_t size = sizeof(sync_serial_settings);
-	sync_serial_settings new_line;
+	sync_serial_settings new_line, *line = ifr->ifr_settings.ifs_ifsu.sync;
 	hdlc_device *hdlc = dev_to_hdlc(dev);
 	port_t *port = hdlc_to_port(hdlc);
 
@@ -261,10 +260,14 @@
 	if (cmd != SIOCWANDEV)
 		return hdlc_ioctl(dev, ifr, cmd);
 
-	switch(ifr->ifr_settings->type) {
+	switch(ifr->ifr_settings.type) {
 	case IF_GET_IFACE:
-		ifr->ifr_settings->type = IF_IFACE_SYNC_SERIAL;
-		if (copy_to_user(&line->sync, &port->settings, size))
+		ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL;
+		if (ifr->ifr_settings.size < size) {
+			ifr->ifr_settings.size = size; /* data size wanted */
+			return -ENOBUFS;
+		}
+		if (copy_to_user(line, &port->settings, size))
 			return -EFAULT;
 		return 0;
 
@@ -272,7 +275,7 @@
 		if(!capable(CAP_NET_ADMIN))
 			return -EPERM;
 
-		if (copy_from_user(&new_line, &line->sync, size))
+		if (copy_from_user(&new_line, line, size))
 			return -EFAULT;
 
 		if (new_line.clock_type != CLOCK_EXT &&
diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
--- a/drivers/net/wan/pc300_drv.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/net/wan/pc300_drv.c	Wed Oct 30 16:44:34 2002
@@ -2542,7 +2542,7 @@
 	pc300chconf_t *conf = (pc300chconf_t *) & chan->conf;
 	int ch = chan->channel;
 	void *arg = (void *) ifr->ifr_data;
-	union line_settings * line = &ifr->ifr_settings->ifs_line;
+	struct if_settings *settings = &ifr->ifr_settings;
 	uclong scabase = card->hw.scabase;
 
 	if (!capable(CAP_NET_ADMIN))
@@ -2741,13 +2741,19 @@
 			}
 
 		case SIOCWANDEV:
-			switch (ifr->ifr_settings->type) {
+			switch (ifr->ifr_settings.type) {
 				case IF_GET_IFACE:
 				{
 					const size_t size = sizeof(sync_serial_settings);
-					ifr->ifr_settings->type = conf->media;
+					ifr->ifr_settings.type = conf->media;
+					if (ifr->ifr_settings.size < size) {
+						/* data size wanted */
+						ifr->ifr_settings.size = size;
+						return -ENOBUFS;
+					}
 	
-					if (copy_to_user(&line->sync, &conf->phys_settings, size)) {
+					if (copy_to_user(settings->ifs_ifsu.sync,
+							 &conf->phys_settings, size)) {
 						return -EFAULT;
 					}
 					return 0;
@@ -2764,7 +2770,7 @@
 					}
 
 					if (copy_from_user(&conf->phys_settings, 
-									   &line->sync, size)) {
+							   settings->ifs_ifsu.sync, size)) {
 						return -EFAULT;
 					}
 
@@ -2773,7 +2779,7 @@
 							cpc_readb(card->hw.scabase + M_REG(MD2, ch)) | 
 							MD2_LOOP_MIR);
 					}
-					conf->media = ifr->ifr_settings->type;
+					conf->media = ifr->ifr_settings.type;
 					return 0;
 				}
 
@@ -2787,7 +2793,7 @@
 					}
 					
 					if (copy_from_user(&conf->phys_settings, 
-						&line->te1, size)) {
+							   settings->ifs_ifsu.te1, size)) {
 						return -EFAULT;
 					}/* Ignoring HDLC slot_map for a while */
 					
@@ -2796,7 +2802,7 @@
 							cpc_readb(card->hw.scabase + M_REG(MD2, ch)) | 
 							MD2_LOOP_MIR);
 					}
-					conf->media = ifr->ifr_settings->type;
+					conf->media = ifr->ifr_settings.type;
 					return 0;
 				}
 				default:
@@ -3556,7 +3562,7 @@
 #endif
 
 	/* Set PCI drv pointer to the card structure */
-	pdev->driver_data = card;
+	pci_set_drvdata(pdev, card);
 
 	/* Set board type */
 	switch (device_id) {
@@ -3631,7 +3637,7 @@
 
 static void __devexit cpc_remove_one(struct pci_dev *pdev)
 {
-	pc300_t *card = (pc300_t *) pdev->driver_data;
+	pc300_t *card = pci_get_drvdata(pdev);
 
 	if (card->hw.rambase != 0) {
 		int i;
diff -Nru a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
--- a/drivers/net/wan/pc300_tty.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/net/wan/pc300_tty.c	Wed Oct 30 16:44:28 2002
@@ -728,8 +728,8 @@
 															
 				if (cpc_tty->tty && (cpc_tty->tty->ldisc.receive_buf)) { 
 					CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name);
-					cpc_tty->tty->ldisc.receive_buf(cpc_tty->tty, buf->data, 
-													&flags, buf->size);
+					cpc_tty->tty->ldisc.receive_buf(cpc_tty->tty, (char *)(buf->data), 
+					&flags, buf->size);
 				}	
 				cpc_tty->buf_rx.first = cpc_tty->buf_rx.first->next;
 				kfree((unsigned char *)buf);
diff -Nru a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
--- a/drivers/net/wan/sdla.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/net/wan/sdla.c	Wed Oct 30 16:44:36 2002
@@ -1665,7 +1665,10 @@
 }
 
 #ifdef MODULE
-static struct net_device sdla0 = {"sdla0", 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, sdla_init};
+static struct net_device sdla0 = {
+	.name = "sdla0",
+	.init = sdla_init
+};
 
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/net/wireless/Config.help b/drivers/net/wireless/Config.help
--- a/drivers/net/wireless/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,140 +0,0 @@
-CONFIG_WAVELAN
-  The Lucent WaveLAN (formerly NCR and AT&T; or DEC RoamAbout DS) is
-  a Radio LAN (wireless Ethernet-like Local Area Network) using the
-  radio frequencies 900 MHz and 2.4 GHz.
-
-  This driver support the ISA version of the WaveLAN card.  A separate
-  driver for the PCMCIA (PC-card) hardware is available in David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).
-
-  If you want to use an ISA WaveLAN card under Linux, say Y and read
-  the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. Some more specific
-  information is contained in
-  <file:Documentation/networking/wavelan.txt> and in the source code
-  <file:drivers/net/wavelan.p.h>.
-
-  You will also need the wireless tools package available from
-  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
-  Please read the man pages contained therein.
-
-  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 wavelan.o.  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>.
-
-CONFIG_HERMES
-  A driver for 802.11b wireless cards based based on the "Hermes" or
-  Intersil HFA384x (Prism 2) MAC controller.  This includes the vast
-  majority of the PCMCIA 802.11b cards (which are nearly all rebadges)
-  - except for the Cisco/Aironet cards.  Cards supported include the
-  Apple Airport (not a PCMCIA card), WavelanIEEE/Orinoco,
-  Cabletron/EnteraSys Roamabout, ELSA AirLancer, MELCO Buffalo, Avaya,
-  IBM High Rate Wireless, Farralon Syyline, Samsung MagicLAN, Netgear
-  MA401, LinkSys WPC-11, D-Link DWL-650, 3Com AirConnect, Intel
-  PRO/Wireless, and Symbol Spectrum24 High Rate amongst others.
-
-  This option includes the guts of the driver, but in order to
-  actually use a card you will also need to enable support for PCMCIA
-  Hermes cards, PLX9052 based PCI adaptors or the Apple Airport below.
-
-  You will also very likely also need the Wireless Tools in order to
-  configure your card and that /etc/pcmcia/wireless.opts works :
-  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>
-
-CONFIG_PLX_HERMES
-  Enable support for PCMCIA cards supported by the "Hermes" (aka
-  orinoco_cs) driver when used in PLX9052 based PCI adaptors.  These
-  adaptors are not a full PCMCIA controller but act as a more limited
-  PCI <-> PCMCIA bridge.  Several vendors sell such adaptors so that
-  802.11b PCMCIA cards can be used in desktop machines.  The Netgear
-  MA301 is such an adaptor.
-
-  Support for these adaptors is so far still incomplete and buggy.
-  You have been warned.
-
-CONFIG_PCI_HERMES
-  Enable support for PCI and mini-PCI 802.11b wireless NICs based on
-  the Prism 2.5 chipset.  These are true PCI cards, not the 802.11b
-  PCMCIA cards bundled with PCI<->PCMCIA adaptors which are also
-  common.  Some of the built-in wireless adaptors in laptops are of
-  this variety.
-
-CONFIG_PCMCIA_HERMES
-  A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
-  as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/
-  EnteraSys RoamAbout 802.11, ELSA Airlancer, Melco Buffalo and
-  others).  It should also be usable on various Prism II based cards
-  such as the Linksys, D-Link and Farallon Skyline.  It should also
-  work on Symbol cards such as the 3Com AirConnect and Ericsson WLAN.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  You also want to check out the PCMCIA-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  You will also very likely also need the Wireless Tools in order to
-  configure your card and that /etc/pcmcia/wireless.opts works:
-  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
-
-CONFIG_AIRO
-  This is the standard Linux driver to support Cisco/Aironet ISA and
-  PCI 802.11 wireless cards.
-  It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
-  - with or without encryption) as well as card before the Cisco
-  aquisition (Aironet 4500, Aironet 4800, Aironet 4800B).
-
-  This driver support both the standard Linux Wireless Extensions
-  and Cisco proprietary API, so both the Linux Wireless Tools and the
-  Cisco Linux utilities can be used to configure the card.
-
-  The driver can be compiled as a module and will be named "airo.o".
-
-CONFIG_AIRO_CS
-  This is the standard Linux driver to support Cisco/Aironet PCMCIA
-  802.11 wireless cards.  This driver is the same as the Aironet
-  driver part of the Linux Pcmcia package.
-  It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
-  - with or without encryption) as well as card before the Cisco
-  aquisition (Aironet 4500, Aironet 4800, Aironet 4800B). It also
-  supports OEM of Cisco such as the DELL TrueMobile 4800 and Xircom
-  802.11b cards.
-
-  This driver support both the standard Linux Wireless Extensions
-  and Cisco proprietary API, so both the Linux Wireless Tools and the
-  Cisco Linux utilities can be used to configure the card.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  You also want to check out the PCMCIA-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_APPLE_AIRPORT
-  Say Y here to support the Airport 802.11b wireless Ethernet hardware
-  built into the Macintosh iBook and other recent PowerPC-based
-  Macintosh machines. This is essentially a Lucent Orinoco card with 
-  a non-standard interface
-
-CONFIG_PCMCIA_NETWAVE
-  Say Y here if you intend to attach this type of PCMCIA (PC-card)
-  wireless Ethernet networking card to your computer.
-
-  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 netwave_cs.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_PCMCIA_WAVELAN
-  Say Y here if you intend to attach an AT&T/Lucent Wavelan PCMCIA
-  (PC-card) wireless Ethernet networking card to your computer.  This
-  driver is for the non-IEEE-802.11 Wavelan cards.
-
-  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 wavelan_cs.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
diff -Nru a/drivers/net/wireless/Config.in b/drivers/net/wireless/Config.in
--- a/drivers/net/wireless/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,45 +0,0 @@
-#
-# Wireless LAN device configuration
-#
-
-comment 'Wireless ISA/PCI cards support' 
-
-# Good old obsolete Wavelan.
-tristate '  AT&T/Lucent old WaveLAN & DEC RoamAbout DS ISA support' CONFIG_WAVELAN
-
-# 802.11b cards
-if [ "$CONFIG_ISA" = "y" -o "$CONFIG_PCI" = "y" ]; then
-   tristate '  Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards' CONFIG_AIRO
-fi
-
-tristate '  Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)' CONFIG_HERMES
-
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   dep_tristate '    Apple Airport support (built-in)' CONFIG_APPLE_AIRPORT $CONFIG_HERMES
-fi
-
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate '    Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.) (EXPERIMENTAL)' CONFIG_PLX_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL
-   dep_tristate '    Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)' CONFIG_PCI_HERMES $CONFIG_HERMES $CONFIG_EXPERIMENTAL
-fi
-
-# If Pcmcia is compiled in, offer Pcmcia cards...
-if [ "$CONFIG_PCMCIA" != "n" ]; then
-   comment 'Wireless Pcmcia/Cardbus cards support' 
-
-# Obsolete cards
-   dep_tristate '  Xircom Netwave AirSurfer Pcmcia wireless support' CONFIG_PCMCIA_NETWAVE $CONFIG_PCMCIA
-   dep_tristate '  AT&T/Lucent old Wavelan Pcmcia wireless support' CONFIG_PCMCIA_WAVELAN $CONFIG_PCMCIA
-
-# 802.11b cards
-   dep_tristate '  Hermes PCMCIA card support' CONFIG_PCMCIA_HERMES $CONFIG_HERMES
-   dep_tristate '  Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards' CONFIG_AIRO_CS $CONFIG_PCMCIA
-fi
-
-# yes, this works even when no drivers are selected
-if [ "$CONFIG_ISA" = "y" -o "$CONFIG_PCI" = "y" -o \
-     "$CONFIG_ALL_PPC" = "y" -o "$CONFIG_PCMCIA" != "n" ]; then
-   define_bool CONFIG_NET_WIRELESS y
-else
-   define_bool CONFIG_NET_WIRELESS n
-fi
diff -Nru a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/net/wireless/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,190 @@
+#
+# Wireless LAN device configuration
+#
+comment "Wireless ISA/PCI cards support"
+	depends on NET_RADIO
+
+# Good old obsolete Wavelan.
+config WAVELAN
+	tristate "AT&T/Lucent old WaveLAN & DEC RoamAbout DS ISA support"
+	depends on NET_RADIO
+	---help---
+	  The Lucent WaveLAN (formerly NCR and AT&T; or DEC RoamAbout DS) is
+	  a Radio LAN (wireless Ethernet-like Local Area Network) using the
+	  radio frequencies 900 MHz and 2.4 GHz.
+
+	  This driver support the ISA version of the WaveLAN card.  A separate
+	  driver for the PCMCIA (PC-card) hardware is available in David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).
+
+	  If you want to use an ISA WaveLAN card under Linux, say Y and read
+	  the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. Some more specific
+	  information is contained in
+	  <file:Documentation/networking/wavelan.txt> and in the source code
+	  <file:drivers/net/wavelan.p.h>.
+
+	  You will also need the wireless tools package available from
+	  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
+	  Please read the man pages contained therein.
+
+	  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 wavelan.o.  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>.
+
+# 802.11b cards
+config AIRO
+	tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
+	depends on NET_RADIO && (ISA || PCI)
+	---help---
+	  This is the standard Linux driver to support Cisco/Aironet ISA and
+	  PCI 802.11 wireless cards.
+	  It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
+	  - with or without encryption) as well as card before the Cisco
+	  aquisition (Aironet 4500, Aironet 4800, Aironet 4800B).
+
+	  This driver support both the standard Linux Wireless Extensions
+	  and Cisco proprietary API, so both the Linux Wireless Tools and the
+	  Cisco Linux utilities can be used to configure the card.
+
+	  The driver can be compiled as a module and will be named "airo.o".
+
+config HERMES
+	tristate "Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)"
+	depends on NET_RADIO
+	---help---
+	  A driver for 802.11b wireless cards based based on the "Hermes" or
+	  Intersil HFA384x (Prism 2) MAC controller.  This includes the vast
+	  majority of the PCMCIA 802.11b cards (which are nearly all rebadges)
+	  - except for the Cisco/Aironet cards.  Cards supported include the
+	  Apple Airport (not a PCMCIA card), WavelanIEEE/Orinoco,
+	  Cabletron/EnteraSys Roamabout, ELSA AirLancer, MELCO Buffalo, Avaya,
+	  IBM High Rate Wireless, Farralon Syyline, Samsung MagicLAN, Netgear
+	  MA401, LinkSys WPC-11, D-Link DWL-650, 3Com AirConnect, Intel
+	  PRO/Wireless, and Symbol Spectrum24 High Rate amongst others.
+
+	  This option includes the guts of the driver, but in order to
+	  actually use a card you will also need to enable support for PCMCIA
+	  Hermes cards, PLX9052 based PCI adaptors or the Apple Airport below.
+
+	  You will also very likely also need the Wireless Tools in order to
+	  configure your card and that /etc/pcmcia/wireless.opts works :
+	  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>
+
+config APPLE_AIRPORT
+	tristate "Apple Airport support (built-in)"
+	depends on ALL_PPC && HERMES
+	help
+	  Say Y here to support the Airport 802.11b wireless Ethernet hardware
+	  built into the Macintosh iBook and other recent PowerPC-based
+	  Macintosh machines. This is essentially a Lucent Orinoco card with 
+	  a non-standard interface
+
+config PLX_HERMES
+	tristate "Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.) (EXPERIMENTAL)"
+	depends on PCI && HERMES && EXPERIMENTAL
+	help
+	  Enable support for PCMCIA cards supported by the "Hermes" (aka
+	  orinoco_cs) driver when used in PLX9052 based PCI adaptors.  These
+	  adaptors are not a full PCMCIA controller but act as a more limited
+	  PCI <-> PCMCIA bridge.  Several vendors sell such adaptors so that
+	  802.11b PCMCIA cards can be used in desktop machines.  The Netgear
+	  MA301 is such an adaptor.
+
+	  Support for these adaptors is so far still incomplete and buggy.
+	  You have been warned.
+
+config PCI_HERMES
+	tristate "Prism 2.5 PCI 802.11b adaptor support (EXPERIMENTAL)"
+	depends on PCI && HERMES && EXPERIMENTAL
+	help
+	  Enable support for PCI and mini-PCI 802.11b wireless NICs based on
+	  the Prism 2.5 chipset.  These are true PCI cards, not the 802.11b
+	  PCMCIA cards bundled with PCI<->PCMCIA adaptors which are also
+	  common.  Some of the built-in wireless adaptors in laptops are of
+	  this variety.
+
+# If Pcmcia is compiled in, offer Pcmcia cards...
+comment "Wireless Pcmcia/Cardbus cards support"
+	depends on NET_RADIO && PCMCIA
+
+# Obsolete cards
+config PCMCIA_NETWAVE
+	tristate "Xircom Netwave AirSurfer Pcmcia wireless support"
+	depends on NET_RADIO && PCMCIA
+	help
+	  Say Y here if you intend to attach this type of PCMCIA (PC-card)
+	  wireless Ethernet networking card to your computer.
+
+	  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 netwave_cs.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+config PCMCIA_WAVELAN
+	tristate "AT&T/Lucent old Wavelan Pcmcia wireless support"
+	depends on NET_RADIO && PCMCIA
+	help
+	  Say Y here if you intend to attach an AT&T/Lucent Wavelan PCMCIA
+	  (PC-card) wireless Ethernet networking card to your computer.  This
+	  driver is for the non-IEEE-802.11 Wavelan cards.
+
+	  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 wavelan_cs.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+# 802.11b cards
+config PCMCIA_HERMES
+	tristate "Hermes PCMCIA card support"
+	depends on PCMCIA!=n && HERMES
+	---help---
+	  A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
+	  as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/
+	  EnteraSys RoamAbout 802.11, ELSA Airlancer, Melco Buffalo and
+	  others).  It should also be usable on various Prism II based cards
+	  such as the Linksys, D-Link and Farallon Skyline.  It should also
+	  work on Symbol cards such as the 3Com AirConnect and Ericsson WLAN.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  You also want to check out the PCMCIA-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  You will also very likely also need the Wireless Tools in order to
+	  configure your card and that /etc/pcmcia/wireless.opts works:
+	  <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
+
+config AIRO_CS
+	tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards"
+	depends on NET_RADIO && PCMCIA
+	---help---
+	  This is the standard Linux driver to support Cisco/Aironet PCMCIA
+	  802.11 wireless cards.  This driver is the same as the Aironet
+	  driver part of the Linux Pcmcia package.
+	  It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
+	  - with or without encryption) as well as card before the Cisco
+	  aquisition (Aironet 4500, Aironet 4800, Aironet 4800B). It also
+	  supports OEM of Cisco such as the DELL TrueMobile 4800 and Xircom
+	  802.11b cards.
+
+	  This driver support both the standard Linux Wireless Extensions
+	  and Cisco proprietary API, so both the Linux Wireless Tools and the
+	  Cisco Linux utilities can be used to configure the card.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  You also want to check out the PCMCIA-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+# yes, this works even when no drivers are selected
+config NET_WIRELESS
+	bool
+	depends on NET_RADIO && (ISA || PCI || ALL_PPC || PCMCIA)
+	default y
+
diff -Nru a/drivers/net/znet.c b/drivers/net/znet.c
--- a/drivers/net/znet.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/net/znet.c	Wed Oct 30 16:44:17 2002
@@ -1,7 +1,5 @@
 /* znet.c: An Zenith Z-Note ethernet driver for linux. */
 
-static const char version[] = "znet.c:v1.02 9/23/94 becker@cesdis.gsfc.nasa.gov\n";
-
 /*
 	Written by Donald Becker.
 
@@ -62,6 +60,30 @@
 	functionality from the serial subsystem.
  */
 
+/* 10/2002
+
+   o Resurected for Linux 2.5+ by Marc Zyngier <maz@wild-wind.fr.eu.org> :
+
+   - Removed strange DMA snooping in znet_sent_packet, which lead to
+     TX buffer corruption on my laptop.
+   - Use init_etherdev stuff.
+   - Use kmalloc-ed DMA buffers.
+   - Use as few global variables as possible.
+   - Use proper resources management.
+   - Use wireless/i82593.h as much as possible (structure, constants)
+   - Compiles as module or build-in.
+
+   Tested on a vintage Zenith Z-Note 433Lnp+. Probably broken on
+   anything else. Testers (and detailed bug reports) are welcome :-).
+
+   o TODO :
+
+   - Properly handle multicast
+   - Understand why some traffic patterns add a 1s latency...
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
@@ -69,6 +91,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
+#include <linux/delay.h>
 #include <asm/system.h>
 #include <asm/bitops.h>
 #include <asm/io.h>
@@ -79,52 +102,35 @@
 #include <linux/skbuff.h>
 #include <linux/if_arp.h>
 
+/* This include could be elsewhere, since it is not wireless specific */
+#include "wireless/i82593.h"
+
+static const char version[] __initdata = "znet.c:v1.02 9/23/94 becker@cesdis.gsfc.nasa.gov\n";
+
 #ifndef ZNET_DEBUG
 #define ZNET_DEBUG 1
 #endif
 static unsigned int znet_debug = ZNET_DEBUG;
+MODULE_PARM (znet_debug, "i");
+MODULE_PARM_DESC (znet_debug, "ZNet debug level");
+MODULE_LICENSE("GPL");
 
 /* The DMA modes we need aren't in <dma.h>. */
 #define DMA_RX_MODE		0x14	/* Auto init, I/O to mem, ++, demand. */
 #define DMA_TX_MODE		0x18	/* Auto init, Mem to I/O, ++, demand. */
 #define dma_page_eq(ptr1, ptr2) ((long)(ptr1)>>17 == (long)(ptr2)>>17)
-#define DMA_BUF_SIZE 8192
 #define RX_BUF_SIZE 8192
 #define TX_BUF_SIZE 8192
-
-/* Commands to the i82593 channel 0. */
-#define CMD0_CHNL_0			0x00
-#define CMD0_CHNL_1			0x10		/* Switch to channel 1. */
-#define CMD0_NOP (CMD0_CHNL_0)
-#define CMD0_PORT_1	CMD0_CHNL_1
-#define CMD1_PORT_0	1
-#define CMD0_IA_SETUP		1
-#define CMD0_CONFIGURE		2
-#define CMD0_MULTICAST_LIST 3
-#define CMD0_TRANSMIT		4
-#define CMD0_DUMP			6
-#define CMD0_DIAGNOSE		7
-#define CMD0_Rx_ENABLE		8
-#define CMD0_Rx_DISABLE		10
-#define CMD0_Rx_STOP		11
-#define CMD0_RETRANSMIT		12
-#define CMD0_ABORT			13
-#define CMD0_RESET			14
-
-#define CMD0_ACK 0x80
-
-#define CMD0_STAT0 (0 << 5)
-#define CMD0_STAT1 (1 << 5)
-#define CMD0_STAT2 (2 << 5)
-#define CMD0_STAT3 (3 << 5)
+#define DMA_BUF_SIZE (RX_BUF_SIZE + 16)	/* 8k + 16 bytes for trailers */
 
 #define TX_TIMEOUT	10
 
-#define net_local znet_private
 struct znet_private {
 	int rx_dma, tx_dma;
 	struct net_device_stats stats;
 	spinlock_t lock;
+	short sia_base, sia_size, io_size;
+	struct i82593_conf_block i593_init;
 	/* The starting, current, and end pointers for the packet buffers. */
 	ushort *rx_start, *rx_cur, *rx_end;
 	ushort *tx_start, *tx_cur, *tx_end;
@@ -132,40 +138,7 @@
 };
 
 /* Only one can be built-in;-> */
-static struct znet_private zn;
-static ushort dma_buffer1[DMA_BUF_SIZE/2];
-static ushort dma_buffer2[DMA_BUF_SIZE/2];
-static ushort dma_buffer3[DMA_BUF_SIZE/2 + 8];
-
-/* The configuration block.  What an undocumented nightmare.  The first
-   set of values are those suggested (without explanation) for ethernet
-   in the Intel 82586 databook.	 The rest appear to be completely undocumented,
-   except for cryptic notes in the Crynwr packet driver.  This driver uses
-   the Crynwr values verbatim. */
-
-static unsigned char i593_init[] = {
-  0xAA,					/* 0: 16-byte input & 80-byte output FIFO. */
-						/*	  threshold, 96-byte FIFO, 82593 mode. */
-  0x88,					/* 1: Continuous w/interrupts, 128-clock DMA.*/
-  0x2E,					/* 2: 8-byte preamble, NO address insertion, */
-						/*	  6-byte Ethernet address, loopback off.*/
-  0x00,					/* 3: Default priorities & backoff methods. */
-  0x60,					/* 4: 96-bit interframe spacing. */
-  0x00,					/* 5: 512-bit slot time (low-order). */
-  0xF2,					/* 6: Slot time (high-order), 15 COLL retries. */
-  0x00,					/* 7: Promisc-off, broadcast-on, default CRC. */
-  0x00,					/* 8: Default carrier-sense, collision-detect. */
-  0x40,					/* 9: 64-byte minimum frame length. */
-  0x5F,					/* A: Type/length checks OFF, no CRC input,
-						   "jabber" termination, etc. */
-  0x00,					/* B: Full-duplex disabled. */
-  0x3F,					/* C: Default multicast addresses & backoff. */
-  0x07,					/* D: Default IFS retriggering. */
-  0x31,					/* E: Internal retransmit, drop "runt" packets,
-						   synchr. DRQ deassertion, 6 status bytes. */
-  0x22,					/* F: Receive ring-buffer size (8K), 
-						   receive-stop register enable. */
-};
+static struct net_device *znet_dev;
 
 struct netidblk {
 	char magic[8];		/* The magic number (string) "NETIDBLK" */
@@ -182,33 +155,225 @@
 	char pad;
 };
 
-int znet_probe(struct net_device *dev);
 static int	znet_open(struct net_device *dev);
 static int	znet_send_packet(struct sk_buff *skb, struct net_device *dev);
 static void	znet_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static void	znet_rx(struct net_device *dev);
 static int	znet_close(struct net_device *dev);
 static struct net_device_stats *net_get_stats(struct net_device *dev);
-static void set_multicast_list(struct net_device *dev);
 static void hardware_init(struct net_device *dev);
 static void update_stop_hit(short ioaddr, unsigned short rx_stop_offset);
 static void znet_tx_timeout (struct net_device *dev);
 
-#ifdef notdef
-static struct sigaction znet_sigaction = { &znet_interrupt, 0, 0, NULL, };
-#endif
+/* Request needed resources */
+static int znet_request_resources (struct net_device *dev)
+{
+	struct znet_private *znet = dev->priv;
+	unsigned long flags;
+		
+	if (request_irq (dev->irq, &znet_interrupt, 0, "ZNet", dev))
+		goto failed;
+	if (request_dma (znet->rx_dma, "ZNet rx"))
+		goto free_irq;
+	if (request_dma (znet->tx_dma, "ZNet tx"))
+		goto free_rx_dma;
+	if (!request_region (znet->sia_base, znet->sia_size, "ZNet SIA"))
+		goto free_tx_dma;
+	if (!request_region (dev->base_addr, znet->io_size, "ZNet I/O"))
+		goto free_sia;
+
+	return 0;				/* Happy ! */
+
+ free_sia:
+	release_region (znet->sia_base, znet->sia_size);
+ free_tx_dma:
+	flags = claim_dma_lock();
+	free_dma (znet->tx_dma);
+	release_dma_lock (flags);
+ free_rx_dma:
+	flags = claim_dma_lock();
+	free_dma (znet->rx_dma);
+	release_dma_lock (flags);
+ free_irq:
+	free_irq (dev->irq, dev);
+ failed:
+	return -1;
+}
+
+static void znet_release_resources (struct net_device *dev)
+{
+	struct znet_private *znet = dev->priv;
+	unsigned long flags;
+		
+	release_region (znet->sia_base, znet->sia_size);
+	release_region (dev->base_addr, znet->io_size);
+	flags = claim_dma_lock();
+	free_dma (znet->tx_dma);
+	free_dma (znet->rx_dma);
+	release_dma_lock (flags);
+	free_irq (dev->irq, dev);
+}
+
+/* Keep the magical SIA stuff in a single function... */
+static void znet_transceiver_power (struct net_device *dev, int on)
+{
+	struct znet_private *znet = dev->priv;
+	unsigned char v;
+
+	/* Turn on/off the 82501 SIA, using zenith-specific magic. */
+	/* Select LAN control register */
+	outb(0x10, znet->sia_base);
 
+	if (on)
+		v = inb(znet->sia_base + 1) | 0x84;
+	else
+		v = inb(znet->sia_base + 1) & ~0x84;
+		
+	outb(v, znet->sia_base+1); /* Turn on/off LAN power (bit 2). */
+}
+
+/* Init the i82593, with current promisc/mcast configuration.
+   Also used from hardware_init. */
+static void znet_set_multicast_list (struct net_device *dev)
+{
+	struct znet_private *znet = dev->priv;
+	short ioaddr = dev->base_addr;
+	struct i82593_conf_block *cfblk = &znet->i593_init;
+
+	memset(cfblk, 0x00, sizeof(struct i82593_conf_block));
+	
+        /* The configuration block.  What an undocumented nightmare.
+	   The first set of values are those suggested (without explanation)
+	   for ethernet in the Intel 82586 databook.  The rest appear to be
+	   completely undocumented, except for cryptic notes in the Crynwr
+	   packet driver.  This driver uses the Crynwr values verbatim. */
+
+	/* maz : Rewritten to take advantage of the wanvelan includes.
+	   At least we have names, not just blind values */
+	
+	/* Byte 0 */
+	cfblk->fifo_limit = 10;	/* = 16 B rx and 80 B tx fifo thresholds */
+	cfblk->forgnesi = 0;	/* 0=82C501, 1=AMD7992B compatibility */
+	cfblk->fifo_32 = 1;
+	cfblk->d6mod = 0;  	/* Run in i82593 advanced mode */
+	cfblk->throttle_enb = 1;
+
+	/* Byte 1 */
+	cfblk->throttle = 8;	/* Continuous w/interrupts, 128-clock DMA. */
+	cfblk->cntrxint = 0;	/* enable continuous mode receive interrupts */
+	cfblk->contin = 1;	/* enable continuous mode */
+
+	/* Byte 2 */
+	cfblk->addr_len = ETH_ALEN;
+	cfblk->acloc = 1;	/* Disable source addr insertion by i82593 */
+	cfblk->preamb_len = 2;	/* 8 bytes preamble */
+	cfblk->loopback = 0;	/* Loopback off */
+  
+	/* Byte 3 */
+	cfblk->lin_prio = 0;	/* Default priorities & backoff methods. */
+	cfblk->tbofstop = 0;
+	cfblk->exp_prio = 0;
+	cfblk->bof_met = 0;
+  
+	/* Byte 4 */
+	cfblk->ifrm_spc = 6;	/* 96 bit times interframe spacing */
+	
+	/* Byte 5 */
+	cfblk->slottim_low = 0; /* 512 bit times slot time (low) */
+	
+	/* Byte 6 */
+	cfblk->slottim_hi = 2;	/* 512 bit times slot time (high) */
+	cfblk->max_retr = 15;	/* 15 collisions retries */
+	
+	/* Byte 7 */
+	cfblk->prmisc = ((dev->flags & IFF_PROMISC) ? 1 : 0); /* Promiscuous mode */
+	cfblk->bc_dis = 0;	/* Enable broadcast reception */
+	cfblk->crs_1 = 0;	/* Don't transmit without carrier sense */
+	cfblk->nocrc_ins = 0;	/* i82593 generates CRC */
+	cfblk->crc_1632 = 0;	/* 32-bit Autodin-II CRC */
+	cfblk->crs_cdt = 0;	/* CD not to be interpreted as CS */
+	
+	/* Byte 8 */
+	cfblk->cs_filter = 0;  	/* CS is recognized immediately */
+	cfblk->crs_src = 0;	/* External carrier sense */
+	cfblk->cd_filter = 0;  	/* CD is recognized immediately */
+	
+	/* Byte 9 */
+	cfblk->min_fr_len = 64 >> 2; /* Minimum frame length 64 bytes */
+	
+	/* Byte A */
+	cfblk->lng_typ = 1;	/* Type/length checks OFF */
+	cfblk->lng_fld = 1; 	/* Disable 802.3 length field check */
+	cfblk->rxcrc_xf = 1;	/* Don't transfer CRC to memory */
+	cfblk->artx = 1;	/* Disable automatic retransmission */
+	cfblk->sarec = 1;	/* Disable source addr trig of CD */
+	cfblk->tx_jabber = 0;	/* Disable jabber jam sequence */
+	cfblk->hash_1 = 1; 	/* Use bits 0-5 in mc address hash */
+	cfblk->lbpkpol = 0; 	/* Loopback pin active high */
+	
+	/* Byte B */
+	cfblk->fdx = 0;		/* Disable full duplex operation */
+	
+	/* Byte C */
+	cfblk->dummy_6 = 0x3f; 	/* all ones, Default multicast addresses & backoff. */
+	cfblk->mult_ia = 0;	/* No multiple individual addresses */
+	cfblk->dis_bof = 0;	/* Disable the backoff algorithm ?! */
+	
+	/* Byte D */
+	cfblk->dummy_1 = 1; 	/* set to 1 */
+	cfblk->tx_ifs_retrig = 3; /* Hmm... Disabled */
+	cfblk->mc_all = (dev->mc_list || (dev->flags&IFF_ALLMULTI));/* multicast all mode */
+	cfblk->rcv_mon = 0;	/* Monitor mode disabled */
+	cfblk->frag_acpt = 0;	/* Do not accept fragments */
+	cfblk->tstrttrs = 0;	/* No start transmission threshold */
+	
+	/* Byte E */
+	cfblk->fretx = 1;	/* FIFO automatic retransmission */
+	cfblk->runt_eop = 0;	/* drop "runt" packets */
+	cfblk->hw_sw_pin = 0;	/* ?? */
+	cfblk->big_endn = 0;	/* Big Endian ? no... */
+	cfblk->syncrqs = 1;	/* Synchronous DRQ deassertion... */
+	cfblk->sttlen = 1;  	/* 6 byte status registers */
+	cfblk->rx_eop = 0;  	/* Signal EOP on packet reception */
+	cfblk->tx_eop = 0;  	/* Signal EOP on packet transmission */
+
+	/* Byte F */
+	cfblk->rbuf_size = RX_BUF_SIZE >> 12; /* Set receive buffer size */
+	cfblk->rcvstop = 1; 	/* Enable Receive Stop Register */
+
+	if (znet_debug > 2) {
+		int i;
+		unsigned char *c;
+
+		for (i = 0, c = (char *) cfblk; i < sizeof (*cfblk); i++)
+			printk ("%02X ", c[i]);
+		printk ("\n");
+	}
+	
+	*znet->tx_cur++ = sizeof(struct i82593_conf_block);
+	memcpy(znet->tx_cur, cfblk, sizeof(struct i82593_conf_block));
+	znet->tx_cur += sizeof(struct i82593_conf_block)/2;
+	outb(OP0_CONFIGURE | CR0_CHNL, ioaddr);
+
+	/* XXX FIXME maz : Add multicast adresses here, so having a
+	 * multicast address configured isn't equal to IFF_ALLMULTI */
+}
 
 /* The Z-Note probe is pretty easy.  The NETIDBLK exists in the safe-to-probe
    BIOS area.  We just scan for the signature, and pull the vital parameters
    out of the structure. */
 
-int __init znet_probe(struct net_device *dev)
+static int __init znet_probe (void)
 {
 	int i;
 	struct netidblk *netinfo;
+	struct znet_private *znet;
+	struct net_device *dev;
 	char *p;
 
+	if (znet_dev)				/* Only look for a single adaptor */
+		return -ENODEV;
+	
 	/* This code scans the region 0xf0000 to 0xfffff for a "NETIDBLK". */
 	for(p = (char *)phys_to_virt(0xf0000); p < (char *)phys_to_virt(0x100000); p++)
 		if (*p == 'N'  &&  strncmp(p, "NETIDBLK", 8) == 0)
@@ -219,6 +384,13 @@
 			printk(KERN_INFO "No Z-Note ethernet adaptor found.\n");
 		return -ENODEV;
 	}
+
+	if (!(znet_dev = dev = init_etherdev(0, sizeof(struct znet_private))))
+			return -ENOMEM;
+
+	znet = dev->priv;
+
+	SET_MODULE_OWNER (dev);
 	netinfo = (struct netidblk *)p;
 	dev->base_addr = netinfo->iobase1;
 	dev->irq = netinfo->irq1;
@@ -230,62 +402,67 @@
 		printk(" %2.2x", dev->dev_addr[i] = netinfo->netid[i]);
 
 	printk(", using IRQ %d DMA %d and %d.\n", dev->irq, netinfo->dma1,
-		netinfo->dma2);
+	       netinfo->dma2);
 
 	if (znet_debug > 1) {
 		printk(KERN_INFO "%s: vendor '%16.16s' IRQ1 %d IRQ2 %d DMA1 %d DMA2 %d.\n",
-			   dev->name, netinfo->vendor,
-			   netinfo->irq1, netinfo->irq2,
-			   netinfo->dma1, netinfo->dma2);
+		       dev->name, netinfo->vendor,
+		       netinfo->irq1, netinfo->irq2,
+		       netinfo->dma1, netinfo->dma2);
 		printk(KERN_INFO "%s: iobase1 %#x size %d iobase2 %#x size %d net type %2.2x.\n",
-			   dev->name, netinfo->iobase1, netinfo->iosize1,
-			   netinfo->iobase2, netinfo->iosize2, netinfo->nettype);
+		       dev->name, netinfo->iobase1, netinfo->iosize1,
+		       netinfo->iobase2, netinfo->iosize2, netinfo->nettype);
 	}
 
 	if (znet_debug > 0)
-		printk("%s%s", KERN_INFO, version);
+		printk(KERN_INFO "%s", version);
 
-	dev->priv = (void *) &zn;
-	zn.rx_dma = netinfo->dma1;
-	zn.tx_dma = netinfo->dma2;
-	zn.lock = SPIN_LOCK_UNLOCKED;
-
-	/* These should never fail.  You can't add devices to a sealed box! */
-	if (request_irq(dev->irq, &znet_interrupt, 0, "ZNet", dev)
-		|| request_dma(zn.rx_dma,"ZNet rx")
-		|| request_dma(zn.tx_dma,"ZNet tx")) {
-		printk(KERN_WARNING "%s: Not opened -- resource busy?!?\n", dev->name);
-		return -EBUSY;
+	znet->rx_dma = netinfo->dma1;
+	znet->tx_dma = netinfo->dma2;
+	znet->lock = SPIN_LOCK_UNLOCKED;
+	znet->sia_base = 0xe6;	/* Magic address for the 82501 SIA */
+	znet->sia_size = 2;
+	/* maz: Despite the '593 being advertised above as using a
+	 * single 8bits I/O port, this driver does many 16bits
+	 * access. So set io_size accordingly */
+	znet->io_size  = 2;
+
+	if (!(znet->rx_start = kmalloc (DMA_BUF_SIZE, GFP_KERNEL | GFP_DMA)))
+		goto free_netdev;
+	if (!(znet->tx_start = kmalloc (DMA_BUF_SIZE, GFP_KERNEL | GFP_DMA)))
+		goto free_rx;
+
+	if (!dma_page_eq (znet->rx_start, znet->rx_start + (RX_BUF_SIZE/2-1)) ||
+	    !dma_page_eq (znet->tx_start, znet->tx_start + (TX_BUF_SIZE/2-1))) {
+		printk (KERN_WARNING "tx/rx crossing DMA frontiers, giving up\n");
+		goto free_tx;
 	}
-
-	/* Allocate buffer memory.	We can cross a 128K boundary, so we
-	   must be careful about the allocation.  It's easiest to waste 8K. */
-	if (dma_page_eq(dma_buffer1, &dma_buffer1[RX_BUF_SIZE/2-1]))
-	  zn.rx_start = dma_buffer1;
-	else 
-	  zn.rx_start = dma_buffer2;
-
-	if (dma_page_eq(dma_buffer3, &dma_buffer3[RX_BUF_SIZE/2-1]))
-	  zn.tx_start = dma_buffer3;
-	else
-	  zn.tx_start = dma_buffer2;
-	zn.rx_end = zn.rx_start + RX_BUF_SIZE/2;
-	zn.tx_buf_len = TX_BUF_SIZE/2;
-	zn.tx_end = zn.tx_start + zn.tx_buf_len;
+	
+	znet->rx_end = znet->rx_start + RX_BUF_SIZE/2;
+	znet->tx_buf_len = TX_BUF_SIZE/2;
+	znet->tx_end = znet->tx_start + znet->tx_buf_len;
 
 	/* The ZNET-specific entries in the device structure. */
 	dev->open = &znet_open;
 	dev->hard_start_xmit = &znet_send_packet;
 	dev->stop = &znet_close;
 	dev->get_stats	= net_get_stats;
-	dev->set_multicast_list = &set_multicast_list;
+	dev->set_multicast_list = &znet_set_multicast_list;
 	dev->tx_timeout = znet_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
 
-	/* Fill in the 'dev' with ethernet-generic values. */
-	ether_setup(dev);
-
 	return 0;
+
+ free_tx:
+	kfree (znet->tx_start);
+ free_rx:
+	kfree (znet->rx_start);
+ free_netdev:
+	unregister_netdev (dev);
+	kfree (dev);
+	znet_dev = NULL;
+
+	return -ENOMEM;
 }
 
 
@@ -296,9 +473,14 @@
 	if (znet_debug > 2)
 		printk(KERN_DEBUG "%s: znet_open() called.\n", dev->name);
 
-	/* Turn on the 82501 SIA, using zenith-specific magic. */
-	outb(0x10, 0xe6);					/* Select LAN control register */
-	outb(inb(0xe7) | 0x84, 0xe7);		/* Turn on LAN power (bit 2). */
+	/* These should never fail.  You can't add devices to a sealed box! */
+	if (znet_request_resources (dev)) {
+		printk(KERN_WARNING "%s: Not opened -- resource busy?!?\n", dev->name);
+		return -EBUSY;
+	}
+
+	znet_transceiver_power (dev, 1);
+	
 	/* According to the Crynwr driver we should wait 50 msec. for the
 	   LAN clock to stabilize.  My experiments indicates that the '593 can
 	   be initialized immediately.  The delay is probably needed for the
@@ -307,10 +489,17 @@
 	   Until this proves to be a problem we rely on the higher layers for the
 	   delay and save allocating a timer entry. */
 
+	/* maz : Well, I'm getting every time the following message
+	 * without the delay on a 486@33. This machine is much too
+	 * fast... :-) So maybe the Crynwr driver wasn't wrong after
+	 * all, even if the message is completly harmless on my
+	 * setup. */
+	mdelay (50);
+	
 	/* This follows the packet driver's lead, and checks for success. */
 	if (inb(ioaddr) != 0x10 && inb(ioaddr) != 0x00)
 		printk(KERN_WARNING "%s: Problem turning on the transceiver power.\n",
-			   dev->name);
+		       dev->name);
 
 	hardware_init(dev);
 	netif_start_queue (dev);
@@ -324,20 +513,20 @@
 	int ioaddr = dev->base_addr;
 	ushort event, tx_status, rx_offset, state;
 
-	outb (CMD0_STAT0, ioaddr);
+	outb (CR0_STATUS_0, ioaddr);
 	event = inb (ioaddr);
-	outb (CMD0_STAT1, ioaddr);
+	outb (CR0_STATUS_1, ioaddr);
 	tx_status = inw (ioaddr);
-	outb (CMD0_STAT2, ioaddr);
+	outb (CR0_STATUS_2, ioaddr);
 	rx_offset = inw (ioaddr);
-	outb (CMD0_STAT3, ioaddr);
+	outb (CR0_STATUS_3, ioaddr);
 	state = inb (ioaddr);
 	printk (KERN_WARNING "%s: transmit timed out, status %02x %04x %04x %02x,"
 	 " resetting.\n", dev->name, event, tx_status, rx_offset, state);
-	if (tx_status == 0x0400)
+	if (tx_status == TX_LOST_CRS)
 		printk (KERN_WARNING "%s: Tx carrier error, check transceiver cable.\n",
 			dev->name);
-	outb (CMD0_RESET, ioaddr);
+	outb (OP0_RESET, ioaddr);
 	hardware_init (dev);
 	netif_wake_queue (dev);
 }
@@ -345,7 +534,7 @@
 static int znet_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
 	int ioaddr = dev->base_addr;
-	struct net_local *lp = (struct net_local *)dev->priv;
+	struct znet_private *znet = dev->priv;
 	unsigned long flags;
 
 	if (znet_debug > 4)
@@ -354,7 +543,7 @@
 	netif_stop_queue (dev);
 	
 	/* Check that the part hasn't reset itself, probably from suspend. */
-	outb(CMD0_STAT0, ioaddr);
+	outb(CR0_STATUS_0, ioaddr);
 	if (inw(ioaddr) == 0x0010
 		&& inw(ioaddr) == 0x0000
 		&& inw(ioaddr) == 0x0010)
@@ -363,44 +552,33 @@
 	if (1) {
 		short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
 		unsigned char *buf = (void *)skb->data;
-		ushort *tx_link = zn.tx_cur - 1;
+		ushort *tx_link = znet->tx_cur - 1;
 		ushort rnd_len = (length + 1)>>1;
 		
-		lp->stats.tx_bytes+=length;
-
-		{
-			short dma_port = ((zn.tx_dma&3)<<2) + IO_DMA2_BASE;
-			unsigned addr = inb(dma_port);
-			addr |= inb(dma_port) << 8;
-			addr <<= 1;
-			if (((int)zn.tx_cur & 0x1ffff) != addr)
-			  printk(KERN_WARNING "Address mismatch at Tx: %#x vs %#x.\n",
-					 (int)zn.tx_cur & 0xffff, addr);
-			zn.tx_cur = (ushort *)(((int)zn.tx_cur & 0xfe0000) | addr);
-		}
+		znet->stats.tx_bytes+=length;
 
-		if (zn.tx_cur >= zn.tx_end)
-		  zn.tx_cur = zn.tx_start;
-		*zn.tx_cur++ = length;
-		if (zn.tx_cur + rnd_len + 1 > zn.tx_end) {
-			int semi_cnt = (zn.tx_end - zn.tx_cur)<<1; /* Cvrt to byte cnt. */
-			memcpy(zn.tx_cur, buf, semi_cnt);
+		if (znet->tx_cur >= znet->tx_end)
+		  znet->tx_cur = znet->tx_start;
+		*znet->tx_cur++ = length;
+		if (znet->tx_cur + rnd_len + 1 > znet->tx_end) {
+			int semi_cnt = (znet->tx_end - znet->tx_cur)<<1; /* Cvrt to byte cnt. */
+			memcpy(znet->tx_cur, buf, semi_cnt);
 			rnd_len -= semi_cnt>>1;
-			memcpy(zn.tx_start, buf + semi_cnt, length - semi_cnt);
-			zn.tx_cur = zn.tx_start + rnd_len;
+			memcpy(znet->tx_start, buf + semi_cnt, length - semi_cnt);
+			znet->tx_cur = znet->tx_start + rnd_len;
 		} else {
-			memcpy(zn.tx_cur, buf, skb->len);
-			zn.tx_cur += rnd_len;
+			memcpy(znet->tx_cur, buf, skb->len);
+			znet->tx_cur += rnd_len;
 		}
-		*zn.tx_cur++ = 0;
+		*znet->tx_cur++ = 0;
 
-		spin_lock_irqsave(&lp->lock, flags);
+		spin_lock_irqsave(&znet->lock, flags);
 		{
-			*tx_link = CMD0_TRANSMIT + CMD0_CHNL_1;
+			*tx_link = OP0_TRANSMIT | CR0_CHNL;
 			/* Is this always safe to do? */
-			outb(CMD0_TRANSMIT + CMD0_CHNL_1,ioaddr);
+			outb(OP0_TRANSMIT | CR0_CHNL, ioaddr);
 		}
-		spin_unlock_irqrestore (&lp->lock, flags);
+		spin_unlock_irqrestore (&znet->lock, flags);
 
 		dev->trans_start = jiffies;
 		netif_start_queue (dev);
@@ -416,7 +594,7 @@
 static void	znet_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
 	struct net_device *dev = dev_id;
-	struct net_local *lp = (struct net_local *)dev->priv;
+	struct znet_private *znet = dev->priv;
 	int ioaddr;
 	int boguscnt = 20;
 
@@ -425,73 +603,77 @@
 		return;
 	}
 
-	spin_lock (&lp->lock);
+	spin_lock (&znet->lock);
 	
 	ioaddr = dev->base_addr;
 
-	outb(CMD0_STAT0, ioaddr);
+	outb(CR0_STATUS_0, ioaddr);
 	do {
 		ushort status = inb(ioaddr);
 		if (znet_debug > 5) {
 			ushort result, rx_ptr, running;
-			outb(CMD0_STAT1, ioaddr);
+			outb(CR0_STATUS_1, ioaddr);
 			result = inw(ioaddr);
-			outb(CMD0_STAT2, ioaddr);
+			outb(CR0_STATUS_2, ioaddr);
 			rx_ptr = inw(ioaddr);
-			outb(CMD0_STAT3, ioaddr);
+			outb(CR0_STATUS_3, ioaddr);
 			running = inb(ioaddr);
 			printk(KERN_DEBUG "%s: interrupt, status %02x, %04x %04x %02x serial %d.\n",
 				 dev->name, status, result, rx_ptr, running, boguscnt);
 		}
-		if ((status & 0x80) == 0)
+		if ((status & SR0_INTERRUPT) == 0)
 			break;
 
-		if ((status & 0x0F) == 4) {	/* Transmit done. */
+		if ((status & 0x0F) == SR0_TRANSMIT_DONE) {
 			int tx_status;
-			outb(CMD0_STAT1, ioaddr);
+			outb(CR0_STATUS_1, ioaddr);
 			tx_status = inw(ioaddr);
 			/* It's undocumented, but tx_status seems to match the i82586. */
-			if (tx_status & 0x2000) {
-				lp->stats.tx_packets++;
-				lp->stats.collisions += tx_status & 0xf;
+			if (tx_status & TX_OK) {
+				znet->stats.tx_packets++;
+				znet->stats.collisions += tx_status & TX_NCOL_MASK;
 			} else {
-				if (tx_status & 0x0600)  lp->stats.tx_carrier_errors++;
-				if (tx_status & 0x0100)  lp->stats.tx_fifo_errors++;
-				if (!(tx_status & 0x0040)) lp->stats.tx_heartbeat_errors++;
-				if (tx_status & 0x0020)  lp->stats.tx_aborted_errors++;
+				if (tx_status & (TX_LOST_CTS | TX_LOST_CRS))
+					znet->stats.tx_carrier_errors++;
+				if (tx_status & TX_UND_RUN)
+					znet->stats.tx_fifo_errors++;
+				if (!(tx_status & TX_HRT_BEAT))
+					znet->stats.tx_heartbeat_errors++;
+				if (tx_status & TX_MAX_COL)
+					znet->stats.tx_aborted_errors++;
 				/* ...and the catch-all. */
-				if ((tx_status | 0x0760) != 0x0760)
-				  lp->stats.tx_errors++;
+				if ((tx_status | (TX_LOST_CRS | TX_LOST_CTS | TX_UND_RUN | TX_HRT_BEAT | TX_MAX_COL)) != (TX_LOST_CRS | TX_LOST_CTS | TX_UND_RUN | TX_HRT_BEAT | TX_MAX_COL))
+					znet->stats.tx_errors++;
 			}
 			netif_wake_queue (dev);
 		}
 
-		if ((status & 0x40)
-			|| (status & 0x0f) == 11) {
+		if ((status & SR0_RECEPTION) ||
+		    (status & SR0_EVENT_MASK) == SR0_STOP_REG_HIT) {
 			znet_rx(dev);
 		}
 		/* Clear the interrupts we've handled. */
-		outb(CMD0_ACK,ioaddr);
+		outb(CR0_INT_ACK, ioaddr);
 	} while (boguscnt--);
 
-	spin_unlock (&lp->lock);
+	spin_unlock (&znet->lock);
 	
 	return;
 }
 
 static void znet_rx(struct net_device *dev)
 {
-	struct net_local *lp = (struct net_local *)dev->priv;
+	struct znet_private *znet = dev->priv;
 	int ioaddr = dev->base_addr;
 	int boguscount = 1;
 	short next_frame_end_offset = 0; 		/* Offset of next frame start. */
 	short *cur_frame_end;
 	short cur_frame_end_offset;
 
-	outb(CMD0_STAT2, ioaddr);
+	outb(CR0_STATUS_2, ioaddr);
 	cur_frame_end_offset = inw(ioaddr);
 
-	if (cur_frame_end_offset == zn.rx_cur - zn.rx_start) {
+	if (cur_frame_end_offset == znet->rx_cur - znet->rx_start) {
 		printk(KERN_WARNING "%s: Interrupted, but nothing to receive, offset %03x.\n",
 			   dev->name, cur_frame_end_offset);
 		return;
@@ -501,7 +683,7 @@
 	   the same area of the backwards links we now have.  This allows us to
 	   pass packets to the upper layers in the order they were received --
 	   important for fast-path sequential operations. */
-	 while (zn.rx_start + cur_frame_end_offset != zn.rx_cur
+	 while (znet->rx_start + cur_frame_end_offset != znet->rx_cur
 			&& ++boguscount < 5) {
 		unsigned short hi_cnt, lo_cnt, hi_status, lo_status;
 		int count, status;
@@ -510,10 +692,10 @@
 			/* Oh no, we have a special case: the frame trailer wraps around
 			   the end of the ring buffer.  We've saved space at the end of
 			   the ring buffer for just this problem. */
-			memcpy(zn.rx_end, zn.rx_start, 8);
+			memcpy(znet->rx_end, znet->rx_start, 8);
 			cur_frame_end_offset += (RX_BUF_SIZE/2);
 		}
-		cur_frame_end = zn.rx_start + cur_frame_end_offset - 4;
+		cur_frame_end = znet->rx_start + cur_frame_end_offset - 4;
 
 		lo_status = *cur_frame_end++;
 		hi_status = *cur_frame_end++;
@@ -538,7 +720,7 @@
 
 	/* Now step  forward through the list. */
 	do {
-		ushort *this_rfp_ptr = zn.rx_start + next_frame_end_offset;
+		ushort *this_rfp_ptr = znet->rx_start + next_frame_end_offset;
 		int status = this_rfp_ptr[-4];
 		int pkt_len = this_rfp_ptr[-2];
 	  
@@ -547,15 +729,20 @@
 				 " next %04x.\n", next_frame_end_offset<<1, status, pkt_len,
 				 this_rfp_ptr[-3]<<1);
 		/* Once again we must assume that the i82586 docs apply. */
-		if ( ! (status & 0x2000)) {				/* There was an error. */
-			lp->stats.rx_errors++;
-			if (status & 0x0800) lp->stats.rx_crc_errors++;
-			if (status & 0x0400) lp->stats.rx_frame_errors++;
-			if (status & 0x0200) lp->stats.rx_over_errors++; /* Wrong. */
-			if (status & 0x0100) lp->stats.rx_fifo_errors++;
-			if (status & 0x0080) lp->stats.rx_length_errors++;
+		if ( ! (status & RX_RCV_OK)) { /* There was an error. */
+			znet->stats.rx_errors++;
+			if (status & RX_CRC_ERR) znet->stats.rx_crc_errors++;
+			if (status & RX_ALG_ERR) znet->stats.rx_frame_errors++;
+#if 0
+			if (status & 0x0200) znet->stats.rx_over_errors++; /* Wrong. */
+			if (status & 0x0100) znet->stats.rx_fifo_errors++;
+#else
+			/* maz : Wild guess... */
+			if (status & RX_OVRRUN) znet->stats.rx_over_errors++;
+#endif
+			if (status & RX_SRT_FRM) znet->stats.rx_length_errors++;
 		} else if (pkt_len > 1536) {
-			lp->stats.rx_length_errors++;
+			znet->stats.rx_length_errors++;
 		} else {
 			/* Malloc up new buffer. */
 			struct sk_buff *skb;
@@ -564,18 +751,18 @@
 			if (skb == NULL) {
 				if (znet_debug)
 				  printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name);
-				lp->stats.rx_dropped++;
+				znet->stats.rx_dropped++;
 				break;
 			}
 			skb->dev = dev;
 
-			if (&zn.rx_cur[(pkt_len+1)>>1] > zn.rx_end) {
-				int semi_cnt = (zn.rx_end - zn.rx_cur)<<1;
-				memcpy(skb_put(skb,semi_cnt), zn.rx_cur, semi_cnt);
-				memcpy(skb_put(skb,pkt_len-semi_cnt), zn.rx_start,
+			if (&znet->rx_cur[(pkt_len+1)>>1] > znet->rx_end) {
+				int semi_cnt = (znet->rx_end - znet->rx_cur)<<1;
+				memcpy(skb_put(skb,semi_cnt), znet->rx_cur, semi_cnt);
+				memcpy(skb_put(skb,pkt_len-semi_cnt), znet->rx_start,
 					   pkt_len - semi_cnt);
 			} else {
-				memcpy(skb_put(skb,pkt_len), zn.rx_cur, pkt_len);
+				memcpy(skb_put(skb,pkt_len), znet->rx_cur, pkt_len);
 				if (znet_debug > 6) {
 					unsigned int *packet = (unsigned int *) skb->data;
 					printk(KERN_DEBUG "Packet data is %08x %08x %08x %08x.\n", packet[0],
@@ -585,17 +772,17 @@
 		  skb->protocol=eth_type_trans(skb,dev);
 		  netif_rx(skb);
 		  dev->last_rx = jiffies;
-		  lp->stats.rx_packets++;
-		  lp->stats.rx_bytes += pkt_len;
+		  znet->stats.rx_packets++;
+		  znet->stats.rx_bytes += pkt_len;
 		}
-		zn.rx_cur = this_rfp_ptr;
-		if (zn.rx_cur >= zn.rx_end)
-			zn.rx_cur -= RX_BUF_SIZE/2;
-		update_stop_hit(ioaddr, (zn.rx_cur - zn.rx_start)<<1);
+		znet->rx_cur = this_rfp_ptr;
+		if (znet->rx_cur >= znet->rx_end)
+			znet->rx_cur -= RX_BUF_SIZE/2;
+		update_stop_hit(ioaddr, (znet->rx_cur - znet->rx_start)<<1);
 		next_frame_end_offset = this_rfp_ptr[-3];
 		if (next_frame_end_offset == 0)		/* Read all the frames? */
 			break;			/* Done for now */
-		this_rfp_ptr = zn.rx_start + next_frame_end_offset;
+		this_rfp_ptr = znet->rx_start + next_frame_end_offset;
 	} while (--boguscount);
 
 	/* If any worth-while packets have been received, dev_rint()
@@ -607,26 +794,19 @@
 /* The inverse routine to znet_open(). */
 static int znet_close(struct net_device *dev)
 {
-	unsigned long flags;
 	int ioaddr = dev->base_addr;
 
 	netif_stop_queue (dev);
 
-	outb(CMD0_RESET, ioaddr);			/* CMD0_RESET */
-
-	flags=claim_dma_lock();
-	disable_dma(zn.rx_dma);
-	disable_dma(zn.tx_dma);
-	release_dma_lock(flags);
-
-	free_irq(dev->irq, dev);
+	outb(OP0_RESET, ioaddr);			/* CMD0_RESET */
 
 	if (znet_debug > 1)
 		printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
 	/* Turn off transceiver power. */
-	outb(0x10, 0xe6);					/* Select LAN control register */
-	outb(inb(0xe7) & ~0x84, 0xe7);		/* Turn on LAN power (bit 2). */
-
+	znet_transceiver_power (dev, 0);
+	
+	znet_release_resources (dev);
+	
 	return 0;
 }
 
@@ -634,60 +814,30 @@
    closed. */
 static struct net_device_stats *net_get_stats(struct net_device *dev)
 {
-		struct net_local *lp = (struct net_local *)dev->priv;
+	struct znet_private *znet = dev->priv;
 
-		return &lp->stats;
+	return &znet->stats;
 }
 
-/* Set or clear the multicast filter for this adaptor.
-   As a side effect this routine must also initialize the device parameters.
-   This is taken advantage of in open().
-
-   N.B. that we change i593_init[] in place.  This (properly) makes the
-   mode change persistent, but must be changed if this code is moved to
-   a multiple adaptor environment.
- */
-static void set_multicast_list(struct net_device *dev)
+static void show_dma(struct net_device *dev)
 {
 	short ioaddr = dev->base_addr;
-
-	if (dev->flags&IFF_PROMISC) {
-		/* Enable promiscuous mode */
-		i593_init[7] &= ~3;		i593_init[7] |= 1;
-		i593_init[13] &= ~8;	i593_init[13] |= 8;
-	} else if (dev->mc_list || (dev->flags&IFF_ALLMULTI)) {
-		/* Enable accept-all-multicast mode */
-		i593_init[7] &= ~3;		i593_init[7] |= 0;
-		i593_init[13] &= ~8;	i593_init[13] |= 8;
-	} else {					/* Enable normal mode. */
-		i593_init[7] &= ~3;		i593_init[7] |= 0;
-		i593_init[13] &= ~8;	i593_init[13] |= 0;
-	}
-	*zn.tx_cur++ = sizeof(i593_init);
-	memcpy(zn.tx_cur, i593_init, sizeof(i593_init));
-	zn.tx_cur += sizeof(i593_init)/2;
-	outb(CMD0_CONFIGURE+CMD0_CHNL_1, ioaddr);
-#ifdef not_tested
-	if (num_addrs > 0) {
-		int addrs_len = 6*num_addrs;
-		*zn.tx_cur++ = addrs_len;
-		memcpy(zn.tx_cur, addrs, addrs_len);
-		outb(CMD0_MULTICAST_LIST+CMD0_CHNL_1, ioaddr);
-		zn.tx_cur += addrs_len>>1;
-	}
-#endif
-}
-
-void show_dma(void)
-{
+	unsigned char stat = inb (ioaddr);
+	struct znet_private *znet = dev->priv;
 	unsigned long flags;
-	short dma_port = ((zn.tx_dma&3)<<2) + IO_DMA2_BASE;
+	short dma_port = ((znet->tx_dma&3)<<2) + IO_DMA2_BASE;
 	unsigned addr = inb(dma_port);
-	addr |= inb(dma_port) << 8;
+	short residue;
 
-	flags=claim_dma_lock();
-	printk("Addr: %04x cnt:%3x...", addr<<1, get_dma_residue(zn.tx_dma));
-	release_dma_lock(flags);
+	addr |= inb(dma_port) << 8;
+	residue = get_dma_residue(znet->tx_dma);
+		
+	if (znet_debug > 1) {
+		flags=claim_dma_lock();
+		printk(KERN_DEBUG "Stat:%02x Addr: %04x cnt:%3x\n",
+		       stat, addr<<1, residue);
+		release_dma_lock(flags);
+	}
 }
 
 /* Initialize the hardware.  We have to do this when the board is open()ed
@@ -696,72 +846,78 @@
 {
 	unsigned long flags;
 	short ioaddr = dev->base_addr;
+	struct znet_private *znet = dev->priv;
 
-	zn.rx_cur = zn.rx_start;
-	zn.tx_cur = zn.tx_start;
+	znet->rx_cur = znet->rx_start;
+	znet->tx_cur = znet->tx_start;
 
 	/* Reset the chip, and start it up. */
-	outb(CMD0_RESET, ioaddr);
+	outb(OP0_RESET, ioaddr);
 
 	flags=claim_dma_lock();
-	disable_dma(zn.rx_dma); 		/* reset by an interrupting task. */
-	clear_dma_ff(zn.rx_dma);
-	set_dma_mode(zn.rx_dma, DMA_RX_MODE);
-	set_dma_addr(zn.rx_dma, (unsigned int) zn.rx_start);
-	set_dma_count(zn.rx_dma, RX_BUF_SIZE);
-	enable_dma(zn.rx_dma);
+	disable_dma(znet->rx_dma); 		/* reset by an interrupting task. */
+	clear_dma_ff(znet->rx_dma);
+	set_dma_mode(znet->rx_dma, DMA_RX_MODE);
+	set_dma_addr(znet->rx_dma, (unsigned int) znet->rx_start);
+	set_dma_count(znet->rx_dma, RX_BUF_SIZE);
+	enable_dma(znet->rx_dma);
 	/* Now set up the Tx channel. */
-	disable_dma(zn.tx_dma);
-	clear_dma_ff(zn.tx_dma);
-	set_dma_mode(zn.tx_dma, DMA_TX_MODE);
-	set_dma_addr(zn.tx_dma, (unsigned int) zn.tx_start);
-	set_dma_count(zn.tx_dma, zn.tx_buf_len<<1);
-	enable_dma(zn.tx_dma);
+	disable_dma(znet->tx_dma);
+	clear_dma_ff(znet->tx_dma);
+	set_dma_mode(znet->tx_dma, DMA_TX_MODE);
+	set_dma_addr(znet->tx_dma, (unsigned int) znet->tx_start);
+	set_dma_count(znet->tx_dma, znet->tx_buf_len<<1);
+	enable_dma(znet->tx_dma);
 	release_dma_lock(flags);
 	
 	if (znet_debug > 1)
-	  printk(KERN_DEBUG "%s: Initializing the i82593, tx buf %p... ", dev->name,
-			 zn.tx_start);
+	  printk(KERN_DEBUG "%s: Initializing the i82593, rx buf %p tx buf %p\n",
+			 dev->name, znet->rx_start,znet->tx_start);
 	/* Do an empty configure command, just like the Crynwr driver.  This
 	   resets to chip to its default values. */
-	*zn.tx_cur++ = 0;
-	*zn.tx_cur++ = 0;
-	printk("stat:%02x ", inb(ioaddr)); show_dma();
-	outb(CMD0_CONFIGURE+CMD0_CHNL_1, ioaddr);
-	*zn.tx_cur++ = sizeof(i593_init);
-	memcpy(zn.tx_cur, i593_init, sizeof(i593_init));
-	zn.tx_cur += sizeof(i593_init)/2;
-	printk("stat:%02x ", inb(ioaddr)); show_dma();
-	outb(CMD0_CONFIGURE+CMD0_CHNL_1, ioaddr);
-	*zn.tx_cur++ = 6;
-	memcpy(zn.tx_cur, dev->dev_addr, 6);
-	zn.tx_cur += 3;
-	printk("stat:%02x ", inb(ioaddr)); show_dma();
-	outb(CMD0_IA_SETUP + CMD0_CHNL_1, ioaddr);
-	printk("stat:%02x ", inb(ioaddr)); show_dma();
+	*znet->tx_cur++ = 0;
+	*znet->tx_cur++ = 0;
+	show_dma(dev);
+	outb(OP0_CONFIGURE | CR0_CHNL, ioaddr);
+
+	znet_set_multicast_list (dev);
+
+	*znet->tx_cur++ = 6;
+	memcpy(znet->tx_cur, dev->dev_addr, 6);
+	znet->tx_cur += 3;
+	show_dma(dev);
+	outb(OP0_IA_SETUP | CR0_CHNL, ioaddr);
+	show_dma(dev);
 
 	update_stop_hit(ioaddr, 8192);
-	if (znet_debug > 1)  printk("enabling Rx.\n");
-	outb(CMD0_Rx_ENABLE+CMD0_CHNL_0, ioaddr);
+	if (znet_debug > 1)  printk(KERN_DEBUG "enabling Rx.\n");
+	outb(OP0_RCV_ENABLE, ioaddr);
 	netif_start_queue (dev);
 }
 
 static void update_stop_hit(short ioaddr, unsigned short rx_stop_offset)
 {
-	outb(CMD0_PORT_1, ioaddr);
+	outb(OP0_SWIT_TO_PORT_1 | CR0_CHNL, ioaddr);
 	if (znet_debug > 5)
 	  printk(KERN_DEBUG "Updating stop hit with value %02x.\n",
-			 (rx_stop_offset >> 6) | 0x80);
-	outb((rx_stop_offset >> 6) | 0x80, ioaddr);
-	outb(CMD1_PORT_0, ioaddr);
+			 (rx_stop_offset >> 6) | CR1_STOP_REG_UPDATE);
+	outb((rx_stop_offset >> 6) | CR1_STOP_REG_UPDATE, ioaddr);
+	outb(OP1_SWIT_TO_PORT_0, ioaddr);
 }
-
-/*
- * Local variables:
- *  compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/net/inet -Wall -Wstrict-prototypes -O6 -m486 -c znet.c"
- *  version-control: t
- *  kept-new-versions: 5
- *  c-indent-level: 4
- *  tab-width: 4
- * End:
- */
+
+static __exit void znet_cleanup (void)
+{
+#ifdef MODULE
+	if (znet_dev) {
+		struct znet_private *znet = znet_dev->priv;
+
+		kfree (znet->rx_start);
+		kfree (znet->tx_start);
+		unregister_netdev (znet_dev);
+		kfree (znet_dev);
+	}
+#endif
+}
+
+module_init (znet_probe);
+module_exit (znet_cleanup);
diff -Nru a/drivers/parport/ChangeLog b/drivers/parport/ChangeLog
--- a/drivers/parport/ChangeLog	Wed Oct 30 16:44:30 2002
+++ b/drivers/parport/ChangeLog	Wed Oct 30 16:44:30 2002
@@ -269,7 +269,7 @@
 	* parport_pc.c (parport_pc_probe_port): Remove __devinit
 	attribute.  Export unconditionally.
 
-2001-04-14  Jeff Garzik  <jgarzik@mandrakesoft.com>
+2001-04-14  Jeff Garzik  <jgarzik@pobox.com>
 
 	Merged:  2001-03-30  Tim Waugh  <twaugh@redhat.com>
 
diff -Nru a/drivers/parport/Config.help b/drivers/parport/Config.help
--- a/drivers/parport/Config.help	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,99 +0,0 @@
-CONFIG_PARPORT
-  If you want to use devices connected to your machine's parallel port
-  (the connector at the computer with 25 holes), e.g. printer, ZIP
-  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
-  create a mini network by connecting the parallel ports of two local
-  machines) etc., then you need to say Y here; please read
-  <file:Documentation/parport.txt> and
-  <file:drivers/parport/BUGS-parport>.
-
-  For extensive information about drivers for many devices attaching
-  to the parallel port see <http://www.torque.net/linux-pp.html> on
-  the WWW.
-
-  It is possible to share a single parallel port among several devices
-  and it is safe to compile all the corresponding drivers into the
-  kernel.  If you want to compile parallel port support as a module
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport.o.  If you have more than one parallel port and want to
-  specify which port and IRQ to be used by this driver at module load
-  time, take a look at <file:Documentation/parport.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_PC
-  You should say Y here if you have a PC-style parallel port. All IBM
-  PC compatible computers and some Alphas have PC-style parallel
-  ports.
-
-  This code is also available as a module.  If you want to compile it
-  as a module ( = code which can be inserted in and removed from the
-  running kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  parport_pc.o.
-
-  If unsure, say Y.
-
-CONFIG_PARPORT_SERIAL
-  This adds support for multi-IO PCI cards that have parallel and
-  serial ports.  You should say Y or M here.  If you say M, the module
-  will be called parport_serial.o.
-
-CONFIG_PARPORT_PC_FIFO
-  Many parallel port chipsets provide hardware that can speed up
-  printing. Say Y here if you want to take advantage of that.
-
-  As well as actually having a FIFO, or DMA capability, the kernel
-  will need to know which IRQ the parallel port has.  By default,
-  parallel port interrupts will not be used, and so neither will the
-  FIFO.  See <file:Documentation/parport.txt> to find out how to
-  specify which IRQ/DMA to use.
-
-CONFIG_PARPORT_PC_SUPERIO
-  Saying Y here enables some probes for Super-IO chipsets in order to
-  find out things like base addresses, IRQ lines and DMA channels.  It
-  is safe to say N.
-
-CONFIG_PARPORT_PC_PCMCIA
-  Say Y here if you need PCMCIA support for your PC-style parallel
-  ports. If unsure, say N.
-
-CONFIG_PARPORT_OTHER
-  Say Y here if you want to be able to load driver modules to support
-  other non-standard types of parallel ports. This causes a
-  performance loss, so most people say N.
-
-CONFIG_PARPORT_AMIGA
-  Say Y here if you need support for the parallel port hardware on
-  Amiga machines. This code is also available as a module (say M),
-  called parport_amiga.o. If in doubt, saying N is the safe plan.
-
-CONFIG_PARPORT_ATARI
-  Say Y here if you need support for the parallel port hardware on
-  Atari machines. This code is also available as a module (say M),
-  called parport_atari.o. If in doubt, saying N is the safe plan.
-
-CONFIG_PARPORT_MFC3
-  Say Y here if you need parallel port support for the MFC3 card.
-  This code is also available as a module (say M), called
-  parport_mfc3.o. If in doubt, saying N is the safe plan.
-
-CONFIG_PARPORT_1284
-  If you have a printer that supports status readback or device ID, or
-  want to use a device that uses enhanced parallel port transfer modes
-  such as EPP and ECP, say Y here to enable advanced IEEE 1284
-  transfer modes. Also say Y if you want device ID information to
-  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
-
-CONFIG_PARPORT_SUNBPP
-  This driver provides support for the bidirectional parallel port
-  found on many Sun machines. Note that many of the newer Ultras
-  actually have pc style hardware instead.
-
-CONFIG_PARPORT_GSC
-  Say Y here to build in low-level parallel-support for PC-style
-  hardware integrated in the LASI-Controller (on the GSC Bus) for
-  HP-PARISC workstations.
-
diff -Nru a/drivers/parport/Config.in b/drivers/parport/Config.in
--- a/drivers/parport/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,71 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-# Parport configuration.
-#
-
-mainmenu_option next_comment
-comment 'Parallel port support'
-
-tristate 'Parallel port support' CONFIG_PARPORT
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   dep_tristate '  PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
-   if [ "$CONFIG_PARPORT_PC" != "n" -a "$CONFIG_SERIAL" != "n" ]; then
-      if [ "$CONFIG_SERIAL" = "m" ]; then
-         define_tristate CONFIG_PARPORT_PC_CML1 m
-      else
-         define_tristate CONFIG_PARPORT_PC_CML1 $CONFIG_PARPORT_PC
-      fi
-      dep_tristate '    Multi-IO cards (parallel and serial)' CONFIG_PARPORT_SERIAL $CONFIG_PARPORT_PC_CML1
-   fi
-   if [ "$CONFIG_PARPORT_PC" != "n" ]; then
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-         bool '    Use FIFO/DMA if available (EXPERIMENTAL)' CONFIG_PARPORT_PC_FIFO
-         bool '    SuperIO chipset support (EXPERIMENTAL)' CONFIG_PARPORT_PC_SUPERIO
-      fi
-      if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
-         if [ "$CONFIG_PARPORT_PC" = "y" ]; then
-            dep_tristate '    Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA
-         else
-            dep_tristate '    Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PARPORT_PC
-         fi
-      fi
-   fi
-   if [ "$CONFIG_ARM" = "y" ]; then
-      dep_tristate '  Archimedes hardware' CONFIG_PARPORT_ARC $CONFIG_PARPORT
-   fi
-   if [ "$CONFIG_AMIGA" = "y" ]; then
-      dep_tristate '  Amiga builtin port' CONFIG_PARPORT_AMIGA $CONFIG_PARPORT
-      if [ "$CONFIG_ZORRO" != "n" ]; then
-	 dep_tristate '  Multiface III parallel port' CONFIG_PARPORT_MFC3 $CONFIG_PARPORT
-      fi
-   else
-      define_tristate CONFIG_PARPORT_AMIGA n
-      define_tristate CONFIG_PARPORT_MFC3 n
-   fi
-   if [ "$CONFIG_ATARI" = "y" ]; then
-      dep_tristate '  Atari hardware' CONFIG_PARPORT_ATARI $CONFIG_PARPORT
-   else
-      define_tristate CONFIG_PARPORT_ATARI n
-   fi
-   if [ "$CONFIG_GSC_LASI" = "y" ]; then
-      dep_tristate '  LASI/ASP builtin parallel-port' CONFIG_PARPORT_GSC $CONFIG_PARPORT
-   else
-      define_tristate CONFIG_PARPORT_GSC n
-   fi
-
-   if [ "$CONFIG_SBUS" = "y" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '  Sparc hardware (EXPERIMENTAL)' CONFIG_PARPORT_SUNBPP $CONFIG_PARPORT
-   else
-      define_tristate CONFIG_PARPORT_SUNBPP n
-   fi
-
-   # If exactly one hardware type is selected then parport will optimise away
-   # support for loading any others.  Defeat this if the user is keen.
-   bool '  Support foreign hardware' CONFIG_PARPORT_OTHER
-
-   bool '  IEEE 1284 transfer modes' CONFIG_PARPORT_1284
-fi
-
-endmenu
diff -Nru a/drivers/parport/Kconfig b/drivers/parport/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/parport/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,160 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/config-language.txt.
+#
+# Parport configuration.
+#
+
+menu "Parallel port support"
+
+config PARPORT
+	tristate "Parallel port support"
+	---help---
+	  If you want to use devices connected to your machine's parallel port
+	  (the connector at the computer with 25 holes), e.g. printer, ZIP
+	  drive, PLIP link (Parallel Line Internet Protocol is mainly used to
+	  create a mini network by connecting the parallel ports of two local
+	  machines) etc., then you need to say Y here; please read
+	  <file:Documentation/parport.txt> and
+	  <file:drivers/parport/BUGS-parport>.
+
+	  For extensive information about drivers for many devices attaching
+	  to the parallel port see <http://www.torque.net/linux-pp.html> on
+	  the WWW.
+
+	  It is possible to share a single parallel port among several devices
+	  and it is safe to compile all the corresponding drivers into the
+	  kernel.  If you want to compile parallel port support as a module
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport.o.  If you have more than one parallel port and want to
+	  specify which port and IRQ to be used by this driver at module load
+	  time, take a look at <file:Documentation/parport.txt>.
+
+	  If unsure, say Y.
+
+config PARPORT_PC
+	tristate "PC-style hardware"
+	depends on PARPORT
+	---help---
+	  You should say Y here if you have a PC-style parallel port. All IBM
+	  PC compatible computers and some Alphas have PC-style parallel
+	  ports.
+
+	  This code is also available as a module.  If you want to compile it
+	  as a module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  parport_pc.o.
+
+	  If unsure, say Y.
+
+config PARPORT_PC_CML1
+	tristate
+	depends on PARPORT!=n && PARPORT_PC!=n
+	default PARPORT_PC if SERIAL_8250=y
+	default m if SERIAL_8250=m
+
+config PARPORT_SERIAL
+	tristate "Multi-IO cards (parallel and serial)"
+	depends on SERIAL_8250!=n && PARPORT_PC_CML1
+	help
+	  This adds support for multi-IO PCI cards that have parallel and
+	  serial ports.  You should say Y or M here.  If you say M, the module
+	  will be called parport_serial.o.
+
+config PARPORT_PC_FIFO
+	bool "Use FIFO/DMA if available (EXPERIMENTAL)"
+	depends on PARPORT_PC && EXPERIMENTAL
+	help
+	  Many parallel port chipsets provide hardware that can speed up
+	  printing. Say Y here if you want to take advantage of that.
+
+	  As well as actually having a FIFO, or DMA capability, the kernel
+	  will need to know which IRQ the parallel port has.  By default,
+	  parallel port interrupts will not be used, and so neither will the
+	  FIFO.  See <file:Documentation/parport.txt> to find out how to
+	  specify which IRQ/DMA to use.
+
+config PARPORT_PC_SUPERIO
+	bool "SuperIO chipset support (EXPERIMENTAL)"
+	depends on PARPORT_PC && EXPERIMENTAL
+	help
+	  Saying Y here enables some probes for Super-IO chipsets in order to
+	  find out things like base addresses, IRQ lines and DMA channels.  It
+	  is safe to say N.
+
+config PARPORT_PC_PCMCIA
+	tristate "Support for PCMCIA management for PC-style ports"
+	depends on PARPORT!=n && HOTPLUG && (PCMCIA!=n && PARPORT_PC=m && PARPORT_PC || PARPORT_PC=y && PCMCIA)
+	help
+	  Say Y here if you need PCMCIA support for your PC-style parallel
+	  ports. If unsure, say N.
+
+config PARPORT_ARC
+	tristate "Archimedes hardware"
+	depends on ARM && PARPORT
+
+config PARPORT_AMIGA
+	tristate "Amiga builtin port"
+	depends on AMIGA && PARPORT
+	help
+	  Say Y here if you need support for the parallel port hardware on
+	  Amiga machines. This code is also available as a module (say M),
+	  called parport_amiga.o. If in doubt, saying N is the safe plan.
+
+config PARPORT_MFC3
+	tristate "Multiface III parallel port"
+	depends on AMIGA && ZORRO && PARPORT
+	help
+	  Say Y here if you need parallel port support for the MFC3 card.
+	  This code is also available as a module (say M), called
+	  parport_mfc3.o. If in doubt, saying N is the safe plan.
+
+config PARPORT_ATARI
+	tristate "Atari hardware"
+	depends on ATARI && PARPORT
+	help
+	  Say Y here if you need support for the parallel port hardware on
+	  Atari machines. This code is also available as a module (say M),
+	  called parport_atari.o. If in doubt, saying N is the safe plan.
+
+config PARPORT_GSC
+	tristate "LASI/ASP builtin parallel-port"
+	depends on GSC_LASI && PARPORT
+	help
+	  Say Y here to build in low-level parallel-support for PC-style
+	  hardware integrated in the LASI-Controller (on the GSC Bus) for
+	  HP-PARISC workstations.
+
+config PARPORT_SUNBPP
+	tristate "Sparc hardware (EXPERIMENTAL)"
+	depends on SBUS && EXPERIMENTAL && PARPORT
+	help
+	  This driver provides support for the bidirectional parallel port
+	  found on many Sun machines. Note that many of the newer Ultras
+	  actually have pc style hardware instead.
+
+# If exactly one hardware type is selected then parport will optimise away
+# support for loading any others.  Defeat this if the user is keen.
+config PARPORT_OTHER
+	bool "Support foreign hardware"
+	depends on PARPORT
+	help
+	  Say Y here if you want to be able to load driver modules to support
+	  other non-standard types of parallel ports. This causes a
+	  performance loss, so most people say N.
+
+config PARPORT_1284
+	bool "IEEE 1284 transfer modes"
+	depends on PARPORT
+	help
+	  If you have a printer that supports status readback or device ID, or
+	  want to use a device that uses enhanced parallel port transfer modes
+	  such as EPP and ECP, say Y here to enable advanced IEEE 1284
+	  transfer modes. Also say Y if you want device ID information to
+	  appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
+
+endmenu
+
diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
--- a/drivers/parport/parport_pc.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/parport/parport_pc.c	Wed Oct 30 16:44:28 2002
@@ -2529,7 +2529,7 @@
 	return 0;
 }
 
-/* Via support maintained by Jeff Garzik <jgarzik@mandrakesoft.com> */
+/* Via support maintained by Jeff Garzik <jgarzik@pobox.com> */
 static int __devinit sio_via_686a_probe (struct pci_dev *pdev, int autoirq,
 					 int autodma)
 {
diff -Nru a/drivers/pci/Config.help b/drivers/pci/Config.help
--- a/drivers/pci/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-CONFIG_PCI_NAMES
-  By default, the kernel contains a database of all known PCI device
-  names to make the information in /proc/pci, /proc/ioports and
-  similar files comprehensible to the user. This database increases
-  size of the kernel image by about 80KB, but it gets freed after the
-  system boots up, so it doesn't take up kernel memory. Anyway, if you
-  are building an installation floppy or kernel for an embedded system
-  where kernel image size really matters, you can disable this feature
-  and you'll get device ID numbers instead of names.
-
-  When in doubt, say Y.
-
diff -Nru a/drivers/pci/Config.in b/drivers/pci/Config.in
--- a/drivers/pci/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# PCI configuration
-#
-
-if [ "$CONFIG_PCI" = "y" ]; then
-   bool 'PCI device name database' CONFIG_PCI_NAMES
-fi
diff -Nru a/drivers/pci/Kconfig b/drivers/pci/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/pci/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,18 @@
+#
+# PCI configuration
+#
+config PCI_NAMES
+	bool "PCI device name database"
+	depends on PCI
+	---help---
+	  By default, the kernel contains a database of all known PCI device
+	  names to make the information in /proc/pci, /proc/ioports and
+	  similar files comprehensible to the user. This database increases
+	  size of the kernel image by about 80KB, but it gets freed after the
+	  system boots up, so it doesn't take up kernel memory. Anyway, if you
+	  are building an installation floppy or kernel for an embedded system
+	  where kernel image size really matters, you can disable this feature
+	  and you'll get device ID numbers instead of names.
+
+	  When in doubt, say Y.
+
diff -Nru a/drivers/pcmcia/Config.help b/drivers/pcmcia/Config.help
--- a/drivers/pcmcia/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,53 +0,0 @@
-CONFIG_PCMCIA
-  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
-  computer.  These are credit-card size devices such as network cards,
-  modems or hard drives often used with laptops computers.  There are
-  actually two varieties of these cards: the older 16 bit PCMCIA cards
-  and the newer 32 bit CardBus cards.  If you want to use CardBus
-  cards, you need to say Y here and also to "CardBus support" below.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).  Please also read the PCMCIA-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).
-  When compiled this way, there will be modules called pcmcia_core.o
-  and ds.o.  If you want to compile it as a module, say M here and
-  read <file:Documentation/modules.txt>.
-
-CONFIG_CARDBUS
-  CardBus is a bus mastering architecture for PC-cards, which allows
-  for 32 bit PC-cards (the original PCMCIA standard specifies only
-  a 16 bit wide bus). Many newer PC-cards are actually CardBus cards.
-
-  This option enables support for CardBus PC Cards, as well as support
-  for CardBus host bridges.  Virtually all modern PCMCIA bridges are
-  CardBus compatible.  A "bridge" is the hardware inside your computer
-  that PCMCIA cards are plugged into.
-
-  To use your PC-cards, you will need supporting software from David
-  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-  for location).
-
-  If unsure, say Y.
-
-CONFIG_I82092
-  This provides support for the Intel I82092AA PCI-to-PCMCIA bridge device,
-  found in some older laptops and more commonly in evaluation boards for the
-  chip.
-
-CONFIG_I82365
-  Say Y here to include support for ISA-bus PCMCIA host bridges that
-  are register compatible with the Intel i82365.  These are found on
-  older laptops and ISA-bus card readers for desktop systems.  A
-  "bridge" is the hardware inside your computer that PCMCIA cards are
-  plugged into. If unsure, say N.
-
-CONFIG_TCIC
-  Say Y here to include support for the Databook TCIC family of PCMCIA
-  host bridges. These are only found on a handful of old systems.
-  "Bridge" is the name used for the hardware inside your computer that
-  PCMCIA cards are plugged into. If unsure, say N.
-
diff -Nru a/drivers/pcmcia/Config.in b/drivers/pcmcia/Config.in
--- a/drivers/pcmcia/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-#
-# PCMCIA bus subsystem configuration
-#
-# Right now the non-CardBus choices are not supported
-# by the integrated kernel driver.
-#
-mainmenu_option next_comment
-comment 'PCMCIA/CardBus support'
-
-tristate 'PCMCIA/CardBus support' CONFIG_PCMCIA
-if [ "$CONFIG_PCMCIA" != "n" ]; then
-   if [ "$CONFIG_PCI" != "n" ]; then
-      bool '  CardBus support' CONFIG_CARDBUS
-   fi
-   dep_tristate '  i82092 compatible bridge support' CONFIG_I82092 $CONFIG_PCMCIA $CONFIG_PCI
-   dep_tristate '  i82365 compatible bridge support' CONFIG_I82365 $CONFIG_PCMCIA
-   dep_tristate '  Databook TCIC host bridge support' CONFIG_TCIC $CONFIG_PCMCIA
-   if [ "$CONFIG_HD64465" = "y" ]; then
-      dep_tristate '  HD64465 host bridge support' CONFIG_HD64465_PCMCIA $CONFIG_PCMCIA
-   fi
-   if [ "$CONFIG_ARM" = "y" ]; then
-      dep_tristate '  SA1100 support' CONFIG_PCMCIA_SA1100 $CONFIG_ARCH_SA1100 $CONFIG_PCMCIA
-      dep_tristate '  SA1111 support' CONFIG_PCMCIA_SA1111 $CONFIG_PCMCIA_SA1100 $CONFIG_SA1111 $CONFIG_PCMCIA
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/pcmcia/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,91 @@
+#
+# PCMCIA bus subsystem configuration
+#
+# Right now the non-CardBus choices are not supported
+# by the integrated kernel driver.
+#
+
+menu "PCMCIA/CardBus support"
+	depends on HOTPLUG
+
+config PCMCIA
+	tristate "PCMCIA/CardBus support"
+	---help---
+	  Say Y here if you want to attach PCMCIA- or PC-cards to your Linux
+	  computer.  These are credit-card size devices such as network cards,
+	  modems or hard drives often used with laptops computers.  There are
+	  actually two varieties of these cards: the older 16 bit PCMCIA cards
+	  and the newer 32 bit CardBus cards.  If you want to use CardBus
+	  cards, you need to say Y here and also to "CardBus support" below.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  Please also read the PCMCIA-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).
+	  When compiled this way, there will be modules called pcmcia_core.o
+	  and ds.o.  If you want to compile it as a module, say M here and
+	  read <file:Documentation/modules.txt>.
+
+config CARDBUS
+	bool "CardBus support"
+	depends on PCMCIA && PCI
+	---help---
+	  CardBus is a bus mastering architecture for PC-cards, which allows
+	  for 32 bit PC-cards (the original PCMCIA standard specifies only
+	  a 16 bit wide bus). Many newer PC-cards are actually CardBus cards.
+
+	  This option enables support for CardBus PC Cards, as well as support
+	  for CardBus host bridges.  Virtually all modern PCMCIA bridges are
+	  CardBus compatible.  A "bridge" is the hardware inside your computer
+	  that PCMCIA cards are plugged into.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).
+
+	  If unsure, say Y.
+
+config I82092
+	tristate "i82092 compatible bridge support"
+	depends on PCMCIA && PCI
+	help
+	  This provides support for the Intel I82092AA PCI-to-PCMCIA bridge device,
+	  found in some older laptops and more commonly in evaluation boards for the
+	  chip.
+
+config I82365
+	tristate "i82365 compatible bridge support"
+	depends on PCMCIA
+	help
+	  Say Y here to include support for ISA-bus PCMCIA host bridges that
+	  are register compatible with the Intel i82365.  These are found on
+	  older laptops and ISA-bus card readers for desktop systems.  A
+	  "bridge" is the hardware inside your computer that PCMCIA cards are
+	  plugged into. If unsure, say N.
+
+config TCIC
+	tristate "Databook TCIC host bridge support"
+	depends on PCMCIA
+	help
+	  Say Y here to include support for the Databook TCIC family of PCMCIA
+	  host bridges. These are only found on a handful of old systems.
+	  "Bridge" is the name used for the hardware inside your computer that
+	  PCMCIA cards are plugged into. If unsure, say N.
+
+config HD64465_PCMCIA
+	tristate "HD64465 host bridge support"
+	depends on HD64465 && PCMCIA
+
+config PCMCIA_SA1100
+	tristate "SA1100 support"
+	depends on ARM && ARCH_SA1100 && PCMCIA
+
+config PCMCIA_SA1111
+	tristate "SA1111 support"
+	depends on PCMCIA_SA1100 && SA1111
+
+endmenu
+
diff -Nru a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
--- a/drivers/pcmcia/rsrc_mgr.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/pcmcia/rsrc_mgr.c	Wed Oct 30 16:44:29 2002
@@ -124,16 +124,36 @@
 	return &ioport_resource;
 }
 
+/* FIXME: Fundamentally racy. */
 static inline int check_io_resource(unsigned long b, unsigned long n,
 				    struct pci_dev *dev)
 {
-	return check_resource(resource_parent(b, n, IORESOURCE_IO, dev), b, n);
+	struct resource *region;
+
+	region = __request_region(resource_parent(b, n, IORESOURCE_IO, dev),
+				  b, n, "check_io_resource");
+	if (!region)
+		return -EBUSY;
+
+	release_resource(region);
+	kfree(region);
+	return 0;
 }
 
+/* FIXME: Fundamentally racy. */
 static inline int check_mem_resource(unsigned long b, unsigned long n,
 				     struct pci_dev *dev)
 {
-	return check_resource(resource_parent(b, n, IORESOURCE_MEM, dev), b, n);
+	struct resource *region;
+
+	region = __request_region(resource_parent(b, n, IORESOURCE_MEM, dev),
+				  b, n, "check_mem_resource");
+	if (!region)
+		return -EBUSY;
+
+	release_resource(region);
+	kfree(region);
+	return 0;
 }
 
 static struct resource *make_resource(unsigned long b, unsigned long n,
diff -Nru a/drivers/pnp/Config.help b/drivers/pnp/Config.help
--- a/drivers/pnp/Config.help	Wed Oct 30 16:44:25 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,52 +0,0 @@
-CONFIG_PNP
-  Plug and Play (PnP) is a standard for peripherals which allows those
-  peripherals to be configured by software, e.g. assign IRQ's or other
-  parameters. No jumpers on the cards are needed, instead the values
-  are provided to the cards from the BIOS, from the operating system,
-  or using a user-space utility.
-
-  Say Y here if you would like Linux to configure your Plug and Play
-  devices. You should then also say Y to all of the protocols below.
-  Alternatively, you can say N here and configure your PnP devices
-  using user space utilities such as the isapnptools package.
-
-  If unsure, say Y.
-
-CONFIG_PNP_NAMES
-  Select Y if you want the Plug and Play Layer to keep a database of
-  human readable names for your PnP devices.  It will increase the size
-  of the kernel image by around 5 KB and use 16 KB of system memory.
-
-  If unsure, say Y.
-
-CONFIG_PNP_DEBUG
-  Say Y if you want the Plug and Play Layer to print debug messages.  
-  This is useful if you are developing a PnP driver or troubleshooting.
-
-CONFIG_ISAPNP
-  Say Y here if you would like support for ISA Plug and Play devices.
-  Some information is in <file:Documentation/isapnp.txt>.
-
-  This support is also available as a module called isapnp.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-  If unsure, say Y.
-
-CONFIG_PNPBIOS
-  Linux uses the PNPBIOS as defined in "Plug and Play BIOS
-  Specification Version 1.0A May 5, 1994" to autodetect built-in
-  mainboard resources (e.g. parallel port resources).
-
-  Some features (e.g. event notification, docking station information,
-  ISAPNP services) are not used.
-
-  Note: ACPI is expected to supersede PNPBIOS some day, currently it
-  co-exists nicely.
-
-  See latest pcmcia-cs (stand-alone package) for a nice "lspnp" tools,
-  or have a look at /proc/bus/pnp.
-
-  If unsure, say Y.
-
diff -Nru a/drivers/pnp/Config.in b/drivers/pnp/Config.in
--- a/drivers/pnp/Config.in	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-#
-# Plug and Play configuration
-#
-mainmenu_option next_comment
-comment 'Plug and Play configuration'
-
-dep_bool 'Plug and Play support' CONFIG_PNP
-
-   dep_bool '  Plug and Play device name database' CONFIG_PNP_NAMES $CONFIG_PNP
-   dep_bool '  PnP Debug Messages' CONFIG_PNP_DEBUG $CONFIG_PNP
-
-comment 'Protocols' $CONFIG_PNP
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   dep_bool '  ISA Plug and Play support (EXPERIMENTAL)' CONFIG_ISAPNP $CONFIG_PNP
-   dep_bool '  Plug and Play BIOS support (EXPERIMENTAL)' CONFIG_PNPBIOS $CONFIG_PNP
-fi
-endmenu
diff -Nru a/drivers/pnp/Kconfig b/drivers/pnp/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/pnp/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,77 @@
+#
+# Plug and Play configuration
+#
+
+menu "Plug and Play configuration"
+
+config PNP
+	bool "Plug and Play support"
+	---help---
+	  Plug and Play (PnP) is a standard for peripherals which allows those
+	  peripherals to be configured by software, e.g. assign IRQ's or other
+	  parameters. No jumpers on the cards are needed, instead the values
+	  are provided to the cards from the BIOS, from the operating system,
+	  or using a user-space utility.
+
+	  Say Y here if you would like Linux to configure your Plug and Play
+	  devices. You should then also say Y to all of the protocols below.
+	  Alternatively, you can say N here and configure your PnP devices
+	  using user space utilities such as the isapnptools package.
+
+	  If unsure, say Y.
+
+config PNP_NAMES
+	bool "Plug and Play device name database"
+	depends on PNP
+	help
+	  Select Y if you want the Plug and Play Layer to keep a database of
+	  human readable names for your PnP devices.  It will increase the size
+	  of the kernel image by around 5 KB and use 16 KB of system memory.
+
+	  If unsure, say Y.
+
+config PNP_DEBUG
+	bool "PnP Debug Messages"
+	depends on PNP
+	help
+	  Say Y if you want the Plug and Play Layer to print debug messages.  
+	  This is useful if you are developing a PnP driver or troubleshooting.
+
+comment "Protocols"
+	depends on PNP
+
+config ISAPNP
+	bool "ISA Plug and Play support (EXPERIMENTAL)"
+	depends on PNP && EXPERIMENTAL
+	help
+	  Say Y here if you would like support for ISA Plug and Play devices.
+	  Some information is in <file:Documentation/isapnp.txt>.
+
+	  This support is also available as a module called isapnp.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say Y.
+
+config PNPBIOS
+	bool "Plug and Play BIOS support (EXPERIMENTAL)"
+	depends on PNP && EXPERIMENTAL
+	---help---
+	  Linux uses the PNPBIOS as defined in "Plug and Play BIOS
+	  Specification Version 1.0A May 5, 1994" to autodetect built-in
+	  mainboard resources (e.g. parallel port resources).
+
+	  Some features (e.g. event notification, docking station information,
+	  ISAPNP services) are not used.
+
+	  Note: ACPI is expected to supersede PNPBIOS some day, currently it
+	  co-exists nicely.
+
+	  See latest pcmcia-cs (stand-alone package) for a nice "lspnp" tools,
+	  or have a look at /proc/bus/pnp.
+
+	  If unsure, say Y.
+
+endmenu
+
diff -Nru a/drivers/pnp/Makefile b/drivers/pnp/Makefile
--- a/drivers/pnp/Makefile	Wed Oct 30 16:44:17 2002
+++ b/drivers/pnp/Makefile	Wed Oct 30 16:44:17 2002
@@ -2,11 +2,11 @@
 # Makefile for the Linux Plug-and-Play Support.
 #
 
-obj-y		:= core.o driver.o resource.o interface.o quirks.o names.o compat.o system.o
+obj-y		:= core.o driver.o resource.o interface.o quirks.o names.o system.o
 
 obj-$(CONFIG_PNPBIOS)		+= pnpbios/
 obj-$(CONFIG_ISAPNP)		+= isapnp/
 
-export-objs	:= core.o driver.o resource.o compat.o
+export-objs	:= core.o driver.o resource.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/drivers/pnp/base.h b/drivers/pnp/base.h
--- a/drivers/pnp/base.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/pnp/base.h	Wed Oct 30 16:44:24 2002
@@ -4,8 +4,5 @@
 extern int pnp_interface_attach_device(struct pnp_dev *dev);
 extern void pnp_name_device(struct pnp_dev *dev);
 extern void pnp_fixup_device(struct pnp_dev *dev);
-extern int compare_pnp_id(struct list_head * id_list, char * id);
 extern void pnp_free_ids(struct pnp_dev *dev);
 extern void pnp_free_resources(struct pnp_resources *resources);
-
-
diff -Nru a/drivers/pnp/compat.c b/drivers/pnp/compat.c
--- a/drivers/pnp/compat.c	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,94 +0,0 @@
-/*
- * compat.c - A series of functions to make it easier to convert drivers that use
- *            the old isapnp APIs. If possible use the new APIs instead.
- *
- * Copyright 2002 Adam Belay <ambx1@neo.rr.com>
- *
- */
- 
-/* TODO: see if more isapnp functions are needed here */
-
-#include <linux/pnp.h>
-#include <linux/isapnp.h>
-#include <linux/string.h>
-#include <linux/module.h>
-#include "base.h"
-
-static void pnp_convert_id(char *buf, unsigned short vendor, unsigned short device)
-{
-	sprintf(buf, "%c%c%c%x%x%x%x",
-			'A' + ((vendor >> 2) & 0x3f) - 1,
-			'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1,
-			'A' + ((vendor >> 8) & 0x1f) - 1,
-			(device >> 4) & 0x0f,
-			device & 0x0f,
-			(device >> 12) & 0x0f,
-			(device >> 8) & 0x0f);
-	return;
-}
-
-struct pnp_card *pnp_find_card(unsigned short vendor,
-				 unsigned short device,
-				 struct pnp_card *from)
-{
-	char id[7];
-	char any[7];
-	struct list_head *list;
-	pnp_convert_id(id, vendor, device);
-	pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
-	list = isapnp_cards.next;
-	if (from)
-		list = from->node.next;
-
-	while (list != &isapnp_cards) {
-		struct pnp_card *card = to_pnp_card(list);
-		if (compare_pnp_id(&card->ids,id) || (memcmp(id,any,7)==0))
-			return card;
-		list = list->next;
-	}
-	return NULL;
-}
-
-struct pnp_dev *pnp_find_dev(struct pnp_card *card,
-				unsigned short vendor,
-				unsigned short function,
-				struct pnp_dev *from)
-{
-	char id[7];
-	char any[7];
-	pnp_convert_id(id, vendor, function);
-	pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
-	if (card == NULL) {	/* look for a logical device from all cards */
-		struct list_head *list;
-
-		list = pnp_global.next;
-		if (from)
-			list = from->global_list.next;
-
-		while (list != &pnp_global) {
-			struct pnp_dev *dev = global_to_pnp_dev(list);
-			if (compare_pnp_id(&dev->ids,id) || (memcmp(id,any,7)==0))
-				return dev;
-			list = list->next;
-		}
-	} else {
-		struct list_head *list;
-
-		list = card->devices.next;
-		if (from) {
-			list = from->card_list.next;
-			if (from->card != card)	/* something is wrong */
-				return NULL;
-		}
-		while (list != &card->devices) {
-			struct pnp_dev *dev = card_to_pnp_dev(list);
-			if (compare_pnp_id(&dev->ids,id))
-				return dev;
-			list = list->next;
-		}
-	}
-	return NULL;
-}
-
-EXPORT_SYMBOL(pnp_find_card);
-EXPORT_SYMBOL(pnp_find_dev);
diff -Nru a/drivers/pnp/core.c b/drivers/pnp/core.c
--- a/drivers/pnp/core.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/pnp/core.c	Wed Oct 30 16:44:24 2002
@@ -82,7 +82,6 @@
 	list_del_init(&protocol->protocol_list);
 	spin_unlock(&pnp_lock);
 	device_unregister(&protocol->dev);
-	return;
 }
 
 /**
@@ -105,7 +104,6 @@
 		pnp_free_resources(dev->res);
 	pnp_free_ids(dev);
 	kfree(dev);
-	return;
 }
 
 /**
@@ -118,7 +116,7 @@
 int pnp_add_device(struct pnp_dev *dev)
 {
 	int error = 0;
-	if (!dev && !dev->protocol)
+	if (!dev || !dev->protocol)
 		return -EINVAL;
 	if (dev->card)
 		sprintf(dev->dev.bus_id, "%02x:%02x.%02x", dev->protocol->number,
@@ -158,7 +156,6 @@
 	list_del_init(&dev->global_list);
 	list_del_init(&dev->dev_list);
 	spin_unlock(&pnp_lock);
-	return;
 }
 
 static int __init pnp_init(void)
diff -Nru a/drivers/pnp/driver.c b/drivers/pnp/driver.c
--- a/drivers/pnp/driver.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/pnp/driver.c	Wed Oct 30 16:44:31 2002
@@ -93,7 +93,7 @@
 
 	if (pnp_dev->active == 0)
 		if(pnp_activate_dev(pnp_dev)<0)
-			return 0;
+			return -1;
 	if (pnp_drv->probe && pnp_dev->active) {
 		if (pnp_dev->card && pnp_drv->card_id_table){
 			card_id = match_card(pnp_drv, pnp_dev->card);
@@ -150,7 +150,9 @@
 
 int pnp_register_driver(struct pnp_driver *drv)
 {
-	int count = 0;
+	int count;
+	struct list_head *pos;
+
 	pnp_dbg("the driver '%s' has been registered", drv->name);
 
 	drv->driver.name = drv->name;
@@ -159,13 +161,21 @@
 	drv->driver.remove = pnp_device_remove;
 
 	count = driver_register(&drv->driver);
-	return count ? count : 1;
+
+	/* get the number of initial matches */
+	if (count >= 0){
+		count = 0;
+		list_for_each(pos,&drv->driver.devices){
+			count++;
+		}
+	}
+	return count;
 }
 
 void pnp_unregister_driver(struct pnp_driver *drv)
 {
 	pnp_dbg("the driver '%s' has been unregistered", drv->name);
-	remove_driver(&drv->driver);
+	driver_unregister(&drv->driver);
 }
 
 /**
@@ -194,7 +204,6 @@
 		struct pnp_id *pnp_id = to_pnp_id(pos);
 		kfree(pnp_id);
 	}
-	return;
 }
 
 EXPORT_SYMBOL(pnp_register_driver);
diff -Nru a/drivers/pnp/isapnp/Makefile b/drivers/pnp/isapnp/Makefile
--- a/drivers/pnp/isapnp/Makefile	Wed Oct 30 16:44:17 2002
+++ b/drivers/pnp/isapnp/Makefile	Wed Oct 30 16:44:17 2002
@@ -2,10 +2,10 @@
 # Makefile for the kernel ISAPNP driver.
 #
 
-export-objs := core.o
+export-objs := core.o compat.o
 
 isapnp-proc-$(CONFIG_PROC_FS) = proc.o
 
-obj-y := core.o $(isapnp-proc-y)
+obj-y := core.o compat.o $(isapnp-proc-y)
 
 include $(TOPDIR)/Rules.make
diff -Nru a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/pnp/isapnp/compat.c	Wed Oct 30 16:44:33 2002
@@ -0,0 +1,92 @@
+/*
+ * compat.c - A series of functions to make it easier to convert drivers that use
+ *            the old isapnp APIs. If possible use the new APIs instead.
+ *
+ * Copyright 2002 Adam Belay <ambx1@neo.rr.com>
+ *
+ */
+ 
+/* TODO: see if more isapnp functions are needed here */
+
+#include <linux/pnp.h>
+#include <linux/isapnp.h>
+#include <linux/string.h>
+#include <linux/module.h>
+
+static void pnp_convert_id(char *buf, unsigned short vendor, unsigned short device)
+{
+	sprintf(buf, "%c%c%c%x%x%x%x",
+			'A' + ((vendor >> 2) & 0x3f) - 1,
+			'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1,
+			'A' + ((vendor >> 8) & 0x1f) - 1,
+			(device >> 4) & 0x0f,
+			device & 0x0f,
+			(device >> 12) & 0x0f,
+			(device >> 8) & 0x0f);
+}
+
+struct pnp_card *pnp_find_card(unsigned short vendor,
+				 unsigned short device,
+				 struct pnp_card *from)
+{
+	char id[7];
+	char any[7];
+	struct list_head *list;
+	pnp_convert_id(id, vendor, device);
+	pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
+	list = isapnp_cards.next;
+	if (from)
+		list = from->node.next;
+
+	while (list != &isapnp_cards) {
+		struct pnp_card *card = to_pnp_card(list);
+		if (compare_pnp_id(&card->ids,id) || (memcmp(id,any,7)==0))
+			return card;
+		list = list->next;
+	}
+	return NULL;
+}
+
+struct pnp_dev *pnp_find_dev(struct pnp_card *card,
+				unsigned short vendor,
+				unsigned short function,
+				struct pnp_dev *from)
+{
+	char id[7];
+	char any[7];
+	pnp_convert_id(id, vendor, function);
+	pnp_convert_id(any, ISAPNP_ANY_ID, ISAPNP_ANY_ID);
+	if (card == NULL) {	/* look for a logical device from all cards */
+		struct list_head *list;
+
+		list = pnp_global.next;
+		if (from)
+			list = from->global_list.next;
+
+		while (list != &pnp_global) {
+			struct pnp_dev *dev = global_to_pnp_dev(list);
+			if (compare_pnp_id(&dev->ids,id) || (memcmp(id,any,7)==0))
+				return dev;
+			list = list->next;
+		}
+	} else {
+		struct list_head *list;
+
+		list = card->devices.next;
+		if (from) {
+			list = from->card_list.next;
+			if (from->card != card)	/* something is wrong */
+				return NULL;
+		}
+		while (list != &card->devices) {
+			struct pnp_dev *dev = card_to_pnp_dev(list);
+			if (compare_pnp_id(&dev->ids,id))
+				return dev;
+			list = list->next;
+		}
+	}
+	return NULL;
+}
+
+EXPORT_SYMBOL(pnp_find_card);
+EXPORT_SYMBOL(pnp_find_dev);
diff -Nru a/drivers/pnp/names.c b/drivers/pnp/names.c
--- a/drivers/pnp/names.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/pnp/names.c	Wed Oct 30 16:44:17 2002
@@ -37,7 +37,6 @@
 			return;
 		}
 	}
-	return;
 }
 
 #else
diff -Nru a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
--- a/drivers/pnp/pnpbios/core.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/pnp/pnpbios/core.c	Wed Oct 30 16:44:19 2002
@@ -680,7 +680,7 @@
 
 static void add_dmaresource(struct pnp_dev *dev, int dma)
 {
-	int i = 8;
+	int i = 0;
 	while (!(dev->dma_resource[i].flags & IORESOURCE_UNSET) && i < DEVICE_COUNT_DMA) i++;
 	if (i < DEVICE_COUNT_DMA) {
 		dev->dma_resource[i].start = (unsigned long) dma;
@@ -701,7 +701,7 @@
 
 static void add_memresource(struct pnp_dev *dev, int mem, int len)
 {
-	int i = 0;
+	int i = 8;
 	while (!(dev->resource[i].flags & IORESOURCE_UNSET) && i < DEVICE_COUNT_RESOURCE) i++;
 	if (i < DEVICE_COUNT_RESOURCE) {
 		dev->resource[i].start = (unsigned long) mem;
@@ -816,6 +816,7 @@
         } /* while */
 	end:
 	if ((dev->resource[0].start == 0) &&
+	    (dev->resource[8].start == 0) &&
 	    (dev->irq_resource[0].start == -1) &&
 	    (dev->dma_resource[0].start == -1))
 		dev->active = 0;
@@ -927,7 +928,6 @@
 
 static unsigned char *node_possible_resource_data_to_dev(unsigned char *p, struct pnp_bios_node *node, struct pnp_dev *dev)
 {
-	unsigned char *lastp = NULL;
 	int len, depnum, dependent;
 
 	if ((char *)p == NULL)
@@ -963,8 +963,7 @@
 				break;
 			}
 			} /* switch */
-                        lastp = p+3;
-                        p = p + p[1] + p[2]*256 + 3;
+                        p += len + 3;
                         continue;
                 }
 		len = p[0] & 0x07;
@@ -1030,6 +1029,70 @@
         return NULL;
 }
 
+/* pnp EISA ids */
+
+#define HEX(id,a) hex[((id)>>a) & 15]
+#define CHAR(id,a) (0x40 + (((id)>>a) & 31))
+//
+
+static void inline pnpid32_to_pnpid(u32 id, char *str)
+{
+	const char *hex = "0123456789abcdef";
+
+	id = be32_to_cpu(id);
+	str[0] = CHAR(id, 26);
+	str[1] = CHAR(id, 21);
+	str[2] = CHAR(id,16);
+	str[3] = HEX(id, 12);
+	str[4] = HEX(id, 8);
+	str[5] = HEX(id, 4);
+	str[6] = HEX(id, 0);
+	str[7] = '\0';
+
+	return;
+}
+//
+#undef CHAR
+#undef HEX
+
+static void node_id_data_to_dev(unsigned char *p, struct pnp_bios_node *node, struct pnp_dev *dev)
+{
+	int len;
+	struct pnp_id *dev_id;
+
+	if ((char *)p == NULL)
+		return;
+        while ( (char *)p < ((char *)node->data + node->size )) {
+
+                if( p[0] & 0x80 ) {// large item
+			len = (p[2] << 8) | p[1];
+                        p += len + 3;
+                        continue;
+                }
+		len = p[0] & 0x07;
+                switch ((p[0]>>3) & 0x0f) {
+		case 0x0f:
+		{
+        		return;
+			break;
+		}
+                case 0x03: // compatible ID
+                {
+			if (len != 4)
+				goto __skip;
+			dev_id =  pnpbios_kmalloc(sizeof (struct pnp_id), GFP_KERNEL);
+			if (!dev_id)
+				return;
+			pnpid32_to_pnpid(p[1] | p[2] << 8 | p[3] << 16 | p[4] << 24,dev_id->id);
+			pnp_add_id(dev_id, dev);
+			break;
+                }
+                } /* switch */
+		__skip:
+                p += len + 1;
+
+        } /* while */
+}
 
 /* pnp resource writing functions */
 
@@ -1314,31 +1377,6 @@
 	return 0;
 }
 
-#define HEX(id,a) hex[((id)>>a) & 15]
-#define CHAR(id,a) (0x40 + (((id)>>a) & 31))
-//
-
-static void inline pnpid32_to_pnpid(u32 id, char *str)
-{
-	const char *hex = "0123456789abcdef";
-
-	id = be32_to_cpu(id);
-	str[0] = CHAR(id, 26);
-	str[1] = CHAR(id, 21);
-	str[2] = CHAR(id,16);
-	str[3] = HEX(id, 12);
-	str[4] = HEX(id, 8);
-	str[5] = HEX(id, 4);
-	str[6] = HEX(id, 0);
-	str[7] = '\0';
-
-	return;
-}
-//
-#undef CHAR
-#undef HEX
-
-
 static void __init build_devlist(void)
 {
 	u8 nodenum;
@@ -1386,7 +1424,8 @@
 		memcpy(dev_id->id,id,8);
 		pnp_add_id(dev_id, dev);
 		pos = node_current_resource_data_to_dev(node,dev);
-		node_possible_resource_data_to_dev(pos,node,dev);
+		pos = node_possible_resource_data_to_dev(pos,node,dev);
+		node_id_data_to_dev(pos,node,dev);
 
 		dev->protocol = &pnpbios_protocol;
 
diff -Nru a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
--- a/drivers/pnp/quirks.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/pnp/quirks.c	Wed Oct 30 16:44:32 2002
@@ -164,6 +164,5 @@
 		}
 		i++;
 	}
-	return;
 }
 
diff -Nru a/drivers/pnp/resource.c b/drivers/pnp/resource.c
--- a/drivers/pnp/resource.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/pnp/resource.c	Wed Oct 30 16:44:29 2002
@@ -308,7 +308,7 @@
 
 /* resource validity checking functions */
 
-static int pnp_check_port(int port, int size)
+static int pnp_check_port(int port, int size, int idx, struct pnp_cfg *config)
 {
 	int i, tmp, rport, rsize;
 	struct pnp_dev *dev;
@@ -338,10 +338,20 @@
 			}
 		}
 	}
+	for (tmp = 0; tmp < 8 && tmp != idx; tmp++) {
+		if (dev->resource[tmp].flags) {
+			rport = config->request.resource[tmp].start;
+			rsize = (config->request.resource[tmp].end - rport) + 1;
+			if (port >= rport && port < rport + rsize)
+				return 1;
+			if (port + size > rport && port + size < (rport + rsize) - 1)
+				return 1;
+		}
+	}
 	return 0;
 }
 
-static int pnp_check_mem(unsigned int addr, unsigned int size)
+static int pnp_check_mem(unsigned int addr, unsigned int size, int idx, struct pnp_cfg *config)
 {
 	int i, tmp;
 	unsigned int raddr, rsize;
@@ -360,7 +370,7 @@
 	pnp_for_each_dev(dev) {
 		if (dev->active) {
 			for (tmp = 0; tmp < 4; tmp++) {
-				if (dev->resource[tmp].flags) {
+				if (dev->resource[tmp + 8].flags) {
 					raddr = dev->resource[tmp + 8].start;
 					rsize = (dev->resource[tmp + 8].end - raddr) + 1;
 					if (addr >= raddr && addr < raddr + rsize)
@@ -371,6 +381,16 @@
 			}
 		}
 	}
+	for (tmp = 0; tmp < 4 && tmp != idx; tmp++) {
+		if (dev->resource[tmp + 8].flags) {
+			raddr = config->request.resource[tmp + 8].start;
+			rsize = (config->request.resource[tmp + 8].end - raddr) + 1;
+			if (addr >= raddr && addr < raddr + rsize)
+				return 1;
+			if (addr + size > raddr && addr + size < (raddr + rsize) - 1)
+				return 1;
+		}
+	}
 	return 0;
 }
 
@@ -453,10 +473,11 @@
 /* config generation functions */
 static int pnp_generate_port(struct pnp_cfg *config, int num)
 {
-	struct pnp_port *port = config->port[num];
+	struct pnp_port *port;
 	unsigned long *value1, *value2, *value3;
 	if (!config || num < 0 || num > 7)
 		return -EINVAL;
+	port = config->port[num];
 	if (!port)
 		return 0;
 	value1 = &config->request.resource[num].start;
@@ -465,7 +486,7 @@
 	*value1 = port->min;
 	*value2 = *value1 + port->size -1;
 	*value3 = port->flags | IORESOURCE_IO;
-	while (pnp_check_port(*value1, port->size)) {
+	while (pnp_check_port(*value1, port->size, num, config)) {
 		*value1 += port->align;
 		*value2 = *value1 + port->size - 1;
 		if (*value1 > port->max || !port->align)
@@ -476,10 +497,11 @@
 
 static int pnp_generate_mem(struct pnp_cfg *config, int num)
 {
-	struct pnp_mem *mem = config->mem[num];
+	struct pnp_mem *mem;
 	unsigned long *value1, *value2, *value3;
 	if (!config || num < 0 || num > 3)
 		return -EINVAL;
+	mem = config->mem[num];
 	if (!mem)
 		return 0;
 	value1 = &config->request.resource[num + 8].start;
@@ -496,7 +518,7 @@
 		*value3 |= IORESOURCE_RANGELENGTH;
 	if (mem->flags & IORESOURCE_MEM_SHADOWABLE)
 		*value3 |= IORESOURCE_SHADOWABLE;
-	while (pnp_check_mem(*value1, mem->size)) {
+	while (pnp_check_mem(*value1, mem->size, num, config)) {
 		*value1 += mem->align;
 		*value2 = *value1 + mem->size - 1;
 		if (*value1 > mem->max || !mem->align)
@@ -507,7 +529,7 @@
 
 static int pnp_generate_irq(struct pnp_cfg *config, int num)
 {
-	struct pnp_irq *irq = config->irq[num];
+	struct pnp_irq *irq;
 	unsigned long *value1, *value2, *value3;
 	/* IRQ priority: this table is good for i386 */
 	static unsigned short xtab[16] = {
@@ -516,6 +538,7 @@
 	int i;
 	if (!config || num < 0 || num > 1)
 		return -EINVAL;
+	irq = config->irq[num];
 	if (!irq)
 		return 0;
 	value1 = &config->request.irq_resource[num].start;
@@ -536,16 +559,16 @@
 
 static int pnp_generate_dma(struct pnp_cfg *config, int num)
 {
-	struct pnp_dma *dma = config->dma[num];
+	struct pnp_dma *dma;
 	unsigned long *value1, *value2, *value3;
 	/* DMA priority: this table is good for i386 */
 	static unsigned short xtab[16] = {
 		1, 3, 5, 6, 7, 0, 2, 4
 	};
 	int i;
-
 	if (!config || num < 0 || num > 1)
 		return -EINVAL;
+	dma = config->dma[num];
 	if (!dma)
 		return 0;
 	value1 = &config->request.dma_resource[num].start;
@@ -566,10 +589,11 @@
 
 static int pnp_prepare_request(struct pnp_cfg *config)
 {
-	struct pnp_dev *dev = &config->request;
+	struct pnp_dev *dev;
 	int idx;
 	if (!config)
 		return -EINVAL;
+	dev = &config->request;
 	if (dev == NULL)
 		return -EINVAL;
 	if (dev->active || dev->ro)
@@ -629,21 +653,29 @@
 
 static struct pnp_cfg * pnp_generate_config(struct pnp_dev *dev, int depnum)
 {
-	struct pnp_cfg * config = pnp_alloc(sizeof(struct pnp_cfg));
+	struct pnp_cfg * config;
 	int nport = 0, nirq = 0, ndma = 0, nmem = 0;
-	struct pnp_resources * res = dev->res;
-	struct pnp_port * port = res->port;
-	struct pnp_mem * mem = res->mem;
-	struct pnp_irq * irq = res->irq;
-	struct pnp_dma * dma = res->dma;
+	struct pnp_resources * res;
+	struct pnp_port * port;
+	struct pnp_mem * mem;
+	struct pnp_irq * irq;
+	struct pnp_dma * dma;
 	if (!dev)
 		return NULL;
 	if (depnum < 0)
 		return NULL;
+	config = pnp_alloc(sizeof(struct pnp_cfg));
 	if (!config)
 		return NULL;
 
 	/* independent */
+	res = pnp_find_resources(dev, 0);
+	if (!res)
+		goto fail;
+	port = res->port;
+	mem = res->mem;
+	irq = res->irq;
+	dma = res->dma;
 	while (port){
 		config->port[nport] = port;
 		nport++;
@@ -669,6 +701,8 @@
 	if (depnum == 0)
 		return config;
 	res = pnp_find_resources(dev, depnum);
+	if (!res)
+		goto fail;
 	port = res->port;
 	mem = res->mem;
 	irq = res->irq;
@@ -695,6 +729,10 @@
 		dma = dma->next;
 	}
 	return config;
+	
+	fail:
+	kfree(config);
+	return NULL;
 }
 
 /* PnP Device Resource Management */
diff -Nru a/drivers/s390/Config.help b/drivers/s390/Config.help
--- a/drivers/s390/Config.help	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,460 +0,0 @@
-CONFIG_BLK_DEV_RAM
-  Saying Y here will allow you to use a portion of your RAM memory as
-  a block device, so that you can make file systems on it, read and
-  write to it and do all the other things that you can do with normal
-  block devices (such as hard drives). It is usually used to load and
-  store a copy of a minimal root file system off of a floppy into RAM
-  during the initial install of Linux.
-
-  Note that the kernel command line option "ramdisk=XX" is now
-  obsolete. For details, read <file:Documentation/ramdisk.txt>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M and read <file:Documentation/modules.txt>. The module will be
-  called rd.o.
-
-  Most normal users won't need the RAM disk functionality, and can
-  thus say N here.
-
-CONFIG_BLK_DEV_RAM_SIZE
-  The default value is 4096. Only change this if you know what are
-  you doing. If you are using IBM S/390, then set this to 8192.
-
-CONFIG_BLK_DEV_INITRD
-  The initial RAM disk is a RAM disk that is loaded by the boot loader
-  (loadlin or lilo) and that is mounted as root before the normal boot
-  procedure. It is typically used to load modules needed to mount the
-  "real" root file system, etc. See <file:Documentation/initrd.txt>
-  for details.
-
-CONFIG_BLK_DEV_LOOP
-  Saying Y here will allow you to use a regular file as a block
-  device; you can then create a file system on that block device and
-  mount it just as you would mount other block devices such as hard
-  drive partitions, CD-ROM drives or floppy drives. The loop devices
-  are block special device files with major number 7 and typically
-  called /dev/loop0, /dev/loop1 etc.
-
-  This is useful if you want to check an ISO 9660 file system before
-  burning the CD, or if you want to use floppy images without first
-  writing them to floppy. Furthermore, some Linux distributions avoid
-  the need for a dedicated Linux partition by keeping their complete
-  root file system inside a DOS FAT file using this loop device
-  driver.
-
-  The loop device driver can also be used to "hide" a file system in a
-  disk partition, floppy, or regular file, either using encryption
-  (scrambling the data) or steganography (hiding the data in the low
-  bits of, say, a sound file). This is also safe if the file resides
-  on a remote file server. If you want to do this, you will first have
-  to acquire and install a kernel patch from
-  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
-  say Y to this option.
-
-  Note that alternative ways to use encrypted file systems are
-  provided by the cfs package, which can be gotten from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
-  package, available at <http://tcfs.dia.unisa.it/>. You do not need
-  to say Y here if you want to use one of these. However, using cfs
-  requires saying Y to "NFS file system support" below while using
-  tcfs requires applying a kernel patch. An alternative steganography
-  solution is provided by StegFS, also available from
-  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
-
-  To use the loop device, you need the losetup utility and a recent
-  version of the mount program, both contained in the util-linux
-  package. The location and current version number of util-linux is
-  contained in the file <file:Documentation/Changes>.
-
-  Note that this loop device has nothing to do with the loopback
-  device used for network connections from the machine to itself.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called loop.o.
-
-  Most users will answer N here.
-
-CONFIG_BLK_DEV_NBD
-  Saying Y here will allow your computer to be a client for network
-  block devices, i.e. it will be able to use block devices exported by
-  servers (mount file systems on them etc.). Communication between
-  client and server works over TCP/IP networking, but to the client
-  program this is hidden: it looks like a regular local file access to
-  a block device special file such as /dev/nd0.
-
-  Network block devices also allows you to run a block-device in
-  userland (making server and client physically the same computer,
-  communicating using the loopback network device).
-
-  Read <file:Documentation/nbd.txt> for more information, especially
-  about where to find the server code, which runs in user space and
-  does not need special kernel support.
-
-  Note that this has nothing to do with the network file systems NFS
-  or Coda; you can say N here even if you intend to use NFS or Coda.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called nbd.o.
-
-  If unsure, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_DUMMY
-  This is essentially a bit-bucket device (i.e. traffic you send to
-  this device is consigned into oblivion) with a configurable IP
-  address. It is most commonly used in order to make your currently
-  inactive SLIP address seem like a real address for local programs.
-  If you use SLIP or PPP, you might want to say Y here. Since this
-  thing often comes in handy, the default is Y. It won't enlarge your
-  kernel either. What a deal. Read about it in the Network
-  Administrator's Guide, available from
-  <http://www.linuxdoc.org/docs.html#guide>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called dummy.o.  If you want to use more than one dummy
-  device at a time, you need to compile this driver as a module.
-  Instead of 'dummy', the devices will then be called 'dummy0',
-  'dummy1' etc.
-
-CONFIG_BONDING
-  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
-  Channels together. This is called 'Etherchannel' by Cisco,
-  'Trunking' by Sun, and 'Bonding' in Linux.
-
-  If you have two Ethernet connections to some other computer, you can
-  make them behave like one double speed connection using this driver.
-  Naturally, this has to be supported at the other end as well, either
-  with a similar Bonding Linux driver, a Cisco 5500 switch or a
-  SunTrunking SunSoft driver.
-
-  This is similar to the EQL driver, but it merges Ethernet segments
-  instead of serial lines.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called bonding.o.
-
-CONFIG_EQUALIZER
-  If you have two serial connections to some other computer (this
-  usually requires two modems and two telephone lines) and you use
-  SLIP (the protocol for sending Internet traffic over telephone
-  lines) or PPP (a better SLIP) on them, you can make them behave like
-  one double speed connection using this driver.  Naturally, this has
-  to be supported at the other end as well, either with a similar EQL
-  Linux driver or with a Livingston Portmaster 2e.
-
-  Say Y if you want this and read
-  <file:Documentation/networking/eql.txt>.  You may also want to read
-  section 6.2 of the NET-3-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 eql.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CONFIG_TUN
-  TUN/TAP provides packet reception and transmission for user space
-  programs.  It can be viewed as a simple Point-to-Point or Ethernet
-  device, which instead of receiving packets from a physical media,
-  receives them from user space program and instead of sending packets
-  via physical media writes them to the user space program.
-
-  When a program opens /dev/net/tun, driver creates and registers
-  corresponding net device tunX or tapX.  After a program closed above
-  devices, driver will automatically delete tunXX or tapXX device and
-  all routes corresponding to it.
-
-  Please read <file:Documentation/networking/tuntap.txt> for more
-  information.
-
-  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 tun.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you don't know what to use this for, you don't need it.
-
-CONFIG_NET_ETHERNET
-  Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common
-  type of Local Area Network (LAN) in universities and companies.
-
-  Common varieties of Ethernet are: 10BASE-2 or Thinnet (10 Mbps over
-  coaxial cable, linking computers in a chain), 10BASE-T or twisted
-  pair (10 Mbps over twisted pair cable, linking computers to central
-  hubs), 10BASE-F (10 Mbps over optical fiber links, using hubs),
-  100BASE-TX (100 Mbps over two twisted pair cables, using hubs),
-  100BASE-T4 (100 Mbps over 4 standard voice-grade twisted pair
-  cables, using hubs), 100BASE-FX (100 Mbps over optical fiber links)
-  [the 100BASE varieties are also known as Fast Ethernet], and Gigabit
-  Ethernet (1 Gbps over optical fiber or short copper links).
-
-  If your Linux machine will be connected to an Ethernet and you have
-  an Ethernet network interface card (NIC) installed in your computer,
-  say Y here and read the Ethernet-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. You will then also have
-  to say Y to the driver for your particular NIC.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about Ethernet network cards. If unsure, say N.
-
-CONFIG_TR
-  Token Ring is IBM's way of communication on a local network; the
-  rest of the world uses Ethernet. To participate on a Token Ring
-  network, you need a special Token ring network card. If you are
-  connected to such a Token Ring network and want to use your Token
-  Ring card under Linux, say Y here and to the driver for your
-  particular card below and read the Token-Ring mini-HOWTO, available
-  from <http://www.linuxdoc.org/docs.html#howto>. Most people can
-  say N here.
-
-CONFIG_FDDI
-  Fiber Distributed Data Interface is a high speed local area network
-  design; essentially a replacement for high speed Ethernet. FDDI can
-  run over copper or fiber. If you are connected to such a network and
-  want a driver for the FDDI card in your computer, say Y here (and
-  then also Y to the driver for your FDDI card, below). Most people
-  will say N.
-
-CONFIG_UNIX98_PTYS
-  A pseudo terminal (PTY) is a software device consisting of two
-  halves: a master and a slave. The slave device behaves identical to
-  a physical terminal; the master device is used by a process to
-  read data from and write data to the slave, thereby emulating a
-  terminal. Typical programs for the master side are telnet servers
-  and xterms.
-
-  Linux has traditionally used the BSD-like names /dev/ptyxx for
-  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
-  has a number of problems. The GNU C library glibc 2.1 and later,
-  however, supports the Unix98 naming standard: in order to acquire a
-  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
-  terminal is then made available to the process and the pseudo
-  terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The entries in /dev/pts/ are created on the fly by a virtual
-  file system; therefore, if you say Y here you should say Y to
-  "/dev/pts file system for Unix98 PTYs" as well.
-
-  If you want to say Y here, you need to have the C library glibc 2.1
-  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
-  Read the instructions in <file:Documentation/Changes> pertaining to
-  pseudo terminals. It's safe to say N.
-
-CONFIG_UNIX98_PTY_COUNT
-  The maximum number of Unix98 PTYs that can be used at any one time.
-  The default is 256, and should be enough for desktop systems. Server
-  machines which support incoming telnet/rlogin/ssh connections and/or
-  serve several X terminals may want to increase this: every incoming
-  connection and every xterm uses up one PTY.
-
-  When not in use, each additional set of 256 PTYs occupy
-  approximately 8 KB of kernel memory on 32-bit architectures.
-
-CONFIG_DASD
-  Enable this option if you want to access DASDs directly utilizing
-  S/390s channel subsystem commands. This is necessary for running
-  natively on a single image or an LPAR.
-
-CONFIG_DASD_ECKD
-  ECKD devices are the most commonly used devices. you should enable
-  this option unless you are very sure to have no ECKD device.
-
-CONFIG_DASD_CKD
-  CKD devices are currently unsupported.
-
-CONFIG_DASD_FBA
-  FBA devices are currently unsupported.
-
-CONFIG_DASD_AUTO_DIAG
-  Enable this option if you want your DIAG discipline module loaded
-  on DASD driver startup.
-
-CONFIG_DASD_AUTO_ECKD
-  Enable this option if you want your ECKD discipline module loaded
-  on DASD driver startup.
-
-CONFIG_DASD_AUTO_FBA
-  Enable this option if you want your FBA discipline module loaded
-  on DASD driver startup.
-
-CONFIG_TN3215
-  Include support for IBM 3215 line-mode terminals.
-
-CONFIG_TN3215_CONSOLE
-  Include support for using an IBM 3215 line-mode terminal as a
-  Linux system console.
-
-CONFIG_TN3270
-  Include support for IBM 3270 line-mode terminals.
-
-CONFIG_TN3270_CONSOLE
-  Include support for using an IBM 3270 line-mode terminal as a Linux
-  system console.  Available only if 3270 support is compiled in
-  statically.
-
-CONFIG_HWC
-  Include support for IBM HWC line-mode terminals.
-
-CONFIG_HWC_CONSOLE
-  Include support for using an IBM HWC line-mode terminal as the Linux
-  system console.
-
-CONFIG_HWC_CPI
-  This option enables the hardware console interface for system
-  identification This is commonly used for workload management and
-  gives you a nice name for the system on the service element.
-  Please select this option as a module since built-in operation is
-  completely untested.
-  You should only select this option if you know what you are doing,
-  need this feature and intend to run your kernel in LPAR.
-
-CONFIG_S390_TAPE
-  Select this option if you want to access channel-attached tape
-  devices on IBM S/390 or zSeries.
-  If you select this option you will also want to select at
-  least one of the tape interface options and one of the tape
-  hardware options in order to access a tape device.
-  This option is also available as a module. The module will be
-  called tape390.o and include all selected interfaces and
-  hardware drivers.
-
-CONFIG_S390_TAPE_CHAR
-  Select this option if you want to access your channel-attached
-  tape devices using the character device interface.
-  This interface is similar to other Linux tape devices like
-  SCSI-Tapes (st) and the floppy tape device (ftape).
-  If unsure, say "Y".
-
-CONFIG_S390_TAPE_BLOCK
-  Select this option if you want to access your channel-attached tape
-  devices using the block device interface.  This interface is similar
-  to CD-ROM devices on other platforms.  The tapes can only be
-  accessed read-only when using this interface.  Have a look at
-  Documentation/s390/TAPE for further information about creating
-  volumes for and using this interface.  It is safe to say "Y" here.
-
-CONFIG_S390_TAPE_3490
-  Select this option if you want to access IBM 3480 magnetic
-  tape subsystems and 100% compatibles.
-  It is safe to say "Y" here.
-
-CONFIG_S390_TAPE_3480
-  Select this option if you want to access IBM 3490 magnetic
-  tape subsystems and 100% compatibles.
-
-CONFIG_CTC
-  Select this option if you want to use channel-to-channel networking
-  on IBM S/390 or zSeries. This device driver supports real CTC
-  coupling using ESCON. It also supports virtual CTCs when running
-  under VM. It will use the channel device configuration if this is
-  available.  This option is also available as a module which will be
-  called ctc.o.  If you do not know what it is, it's safe to say "Y".
-
-CONFIG_DASD_DIAG
-  Select this option if you want to use CMS reserved Disks under VM
-  with the Diagnose250 command.  If you are not running under VM or
-  unsure what it is, say "N".
-
-CONFIG_BLK_DEV_XPRAM
-  Select this option if you want to use your expanded storage on S/390
-  or zSeries as a disk.  This is useful as a _fast_ swap device if you
-  want to access more than 2G of memory when running in 31 bit mode.
-  This option is also available as a module which will be called
-  xpram.o.  If unsure, say "N".
-
-CONFIG_IUCV
-  Select this option if you want to use inter-user communication
-  vehicle networking under VM or VIF.  This option is also available
-  as a module which will be called iucv.o. If unsure, say "Y".
-
-CONFIG_CHANDEV
-  The channel device layer is a layer to provide a consistent
-  interface for configuration & default machine check (devices
-  appearing & disappearing) handling on Linux for s/390 & z/Series
-  channel devices.
-
-  s/390 & z/Series channel devices include among others
-
-  lcs (the most common ethernet/token ring/fddi standard on
-  zSeries)
-  ctc/escon hi speed like serial link standard on zSeries
-  claw used to talk to cisco routers.
-  qeth gigabit ethernet.
-
-  These devices use two channels one read & one write for
-  configuration & communication (& a third channel, the data
-  channel the case of gigabit ethernet). The motivation
-  behind developing this layer was that there was a lot of
-  duplicate code among the channel device drivers for
-  configuration.
-
-  Also the lcs & ctc drivers tended to fight over
-  3088/08's & 3088/1F's which could be either 2216/3172
-  channel attached lcs compatible devices or escon/ctc pipes
-  had to be configured separately as they couldn't autodetect,
-  this is now simplified by doing the configuration in a single
-  place (the channel device layer).
-
-  This layer isn't invasive & it is quite okay to use channel
-  drivers which don't use the channel device layer in
-  conjunction with drivers which do.
-
-  For more info see the chandev manpage usually distributed in
-  <file:Documentation/s390/chandev.8> in the Linux source tree.
-
diff -Nru a/drivers/s390/Config.in b/drivers/s390/Config.in
--- a/drivers/s390/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,99 +0,0 @@
-mainmenu_option next_comment
-comment 'Block device drivers'
-
-tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
-dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
-  int '   Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 24576
-fi
-dep_bool '   Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
-tristate 'XPRAM disk support' CONFIG_BLK_DEV_XPRAM
-
-comment 'S/390 block device drivers'
-
-tristate 'Support for DASD devices' CONFIG_DASD
-if [ "$CONFIG_DASD" != "n"  ]; then
-  dep_tristate '   Support for ECKD Disks' CONFIG_DASD_ECKD $CONFIG_DASD
-  if [ "$CONFIG_DASD_ECKD" = "m" ]; then
-    bool     '   Automatic activation of ECKD module' CONFIG_DASD_AUTO_ECKD
-  fi
-  dep_tristate '   Support for FBA  Disks' CONFIG_DASD_FBA $CONFIG_DASD
-  if [ "$CONFIG_DASD_FBA" = "m" ]; then
-    bool     '   Automatic activation of FBA  module' CONFIG_DASD_AUTO_FBA
-  fi
-#  dep_tristate '   Support for CKD  Disks' CONFIG_DASD_CKD $CONFIG_DASD
-  if [ "$CONFIG_ARCH_S390X" != "y" ]; then
-    dep_tristate '   Support for DIAG access to CMS reserved Disks' CONFIG_DASD_DIAG $CONFIG_DASD
-    if [ "$CONFIG_DASD_DIAG" = "m" ]; then
-      bool     '   Automatic activation of DIAG module' CONFIG_DASD_AUTO_DIAG
-    fi
-  fi
-fi
-
-endmenu
-
-source drivers/md/Config.in
-
-mainmenu_option next_comment
-comment 'Character device drivers'
-bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
-if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
-  int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
-fi
-
-comment 'S/390 character device drivers'
-
-tristate 'Support for locally attached 3270 tubes' CONFIG_TN3270
-if [ "$CONFIG_TN3270" = "y" ]; then
-  bool 'Support for console on 3270 line mode terminal' CONFIG_TN3270_CONSOLE
-fi
-bool 'Support for 3215 line mode terminal' CONFIG_TN3215
-if [ "$CONFIG_TN3215" = "y" ]; then
-  bool 'Support for console on 3215 line mode terminal' CONFIG_TN3215_CONSOLE
-fi
-bool 'Support for HWC line mode terminal' CONFIG_HWC
-if [ "$CONFIG_HWC" = "y" ]; then
-  bool '   console on HWC line mode terminal' CONFIG_HWC_CONSOLE
-  tristate '   Control-Program Identification' CONFIG_HWC_CPI
-fi
-tristate 'S/390 tape device support' CONFIG_S390_TAPE
-if [ "$CONFIG_S390_TAPE" != "n" ]; then
-  comment 'S/390 tape interface support'
-  bool '   Support for tape character devices' CONFIG_S390_TAPE_CHAR
-  bool '   Support for tape block devices' CONFIG_S390_TAPE_BLOCK
-  comment 'S/390 tape hardware support'
-  dep_tristate '   Support for 3490 tape hardware' CONFIG_S390_TAPE_3490 $CONFIG_S390_TAPE
-  dep_tristate '   Support for 3480 tape hardware' CONFIG_S390_TAPE_3480 $CONFIG_S390_TAPE
-fi
-endmenu
-
-if [ "$CONFIG_NET" = "y" ]; then
-  mainmenu_option next_comment
-  comment 'Network device drivers'
-  bool 'Network device support' CONFIG_NETDEVICES
-
-  if [ "$CONFIG_NETDEVICES" = "y" ]; then
-    tristate 'Dummy net driver support' CONFIG_DUMMY
-    tristate 'Bonding driver support' CONFIG_BONDING
-    tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
-    tristate 'Universal TUN/TAP device driver support' CONFIG_TUN
-    bool 'Ethernet (10 or 100Mbit)' CONFIG_NET_ETHERNET
-    bool 'Token Ring driver support' CONFIG_TR
-    bool 'FDDI driver support' CONFIG_FDDI
-    comment 'S/390 network device drivers'
-    bool 'Channel Device Configuration' CONFIG_CHANDEV
-    if [ "$CONFIG_CHANDEV" = "y" ]; then
-	define_bool CONFIG_HOTPLUG y
-    fi
-
-    if [ "$CONFIG_NET_ETHERNET" != "n" -o "$CONFIG_TR" != "n" ]; then
-      tristate 'Lan Channel Station Interface' CONFIG_LCS
-    fi
-
-    tristate 'CTC device support' CONFIG_CTC
-    tristate 'IUCV device support (VM only)' CONFIG_IUCV
-  fi
-  endmenu
-fi
-
diff -Nru a/drivers/s390/Kconfig b/drivers/s390/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/s390/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,603 @@
+
+menu "Block device drivers"
+
+config BLK_DEV_LOOP
+	tristate "Loopback device support"
+	---help---
+	  Saying Y here will allow you to use a regular file as a block
+	  device; you can then create a file system on that block device and
+	  mount it just as you would mount other block devices such as hard
+	  drive partitions, CD-ROM drives or floppy drives. The loop devices
+	  are block special device files with major number 7 and typically
+	  called /dev/loop0, /dev/loop1 etc.
+
+	  This is useful if you want to check an ISO 9660 file system before
+	  burning the CD, or if you want to use floppy images without first
+	  writing them to floppy. Furthermore, some Linux distributions avoid
+	  the need for a dedicated Linux partition by keeping their complete
+	  root file system inside a DOS FAT file using this loop device
+	  driver.
+
+	  The loop device driver can also be used to "hide" a file system in a
+	  disk partition, floppy, or regular file, either using encryption
+	  (scrambling the data) or steganography (hiding the data in the low
+	  bits of, say, a sound file). This is also safe if the file resides
+	  on a remote file server. If you want to do this, you will first have
+	  to acquire and install a kernel patch from
+	  <ftp://ftp.kerneli.org/pub/kerneli/>, and then you need to
+	  say Y to this option.
+
+	  Note that alternative ways to use encrypted file systems are
+	  provided by the cfs package, which can be gotten from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>, and the newer tcfs
+	  package, available at <http://tcfs.dia.unisa.it/>. You do not need
+	  to say Y here if you want to use one of these. However, using cfs
+	  requires saying Y to "NFS file system support" below while using
+	  tcfs requires applying a kernel patch. An alternative steganography
+	  solution is provided by StegFS, also available from
+	  <ftp://ftp.kerneli.org/pub/kerneli/net-source/>.
+
+	  To use the loop device, you need the losetup utility and a recent
+	  version of the mount program, both contained in the util-linux
+	  package. The location and current version number of util-linux is
+	  contained in the file <file:Documentation/Changes>.
+
+	  Note that this loop device has nothing to do with the loopback
+	  device used for network connections from the machine to itself.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called loop.o.
+
+	  Most users will answer N here.
+
+config BLK_DEV_NBD
+	tristate "Network block device support"
+	depends on NET
+	---help---
+	  Saying Y here will allow your computer to be a client for network
+	  block devices, i.e. it will be able to use block devices exported by
+	  servers (mount file systems on them etc.). Communication between
+	  client and server works over TCP/IP networking, but to the client
+	  program this is hidden: it looks like a regular local file access to
+	  a block device special file such as /dev/nd0.
+
+	  Network block devices also allows you to run a block-device in
+	  userland (making server and client physically the same computer,
+	  communicating using the loopback network device).
+
+	  Read <file:Documentation/nbd.txt> for more information, especially
+	  about where to find the server code, which runs in user space and
+	  does not need special kernel support.
+
+	  Note that this has nothing to do with the network file systems NFS
+	  or Coda; you can say N here even if you intend to use NFS or Coda.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called nbd.o.
+
+	  If unsure, say N.
+
+config BLK_DEV_RAM
+	tristate "RAM disk support"
+	---help---
+	  Saying Y here will allow you to use a portion of your RAM memory as
+	  a block device, so that you can make file systems on it, read and
+	  write to it and do all the other things that you can do with normal
+	  block devices (such as hard drives). It is usually used to load and
+	  store a copy of a minimal root file system off of a floppy into RAM
+	  during the initial install of Linux.
+
+	  Note that the kernel command line option "ramdisk=XX" is now
+	  obsolete. For details, read <file:Documentation/ramdisk.txt>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M and read <file:Documentation/modules.txt>. The module will be
+	  called rd.o.
+
+	  Most normal users won't need the RAM disk functionality, and can
+	  thus say N here.
+
+config BLK_DEV_RAM_SIZE
+	int "Default RAM disk size"
+	depends on BLK_DEV_RAM
+	default "24576"
+	help
+	  The default value is 4096. Only change this if you know what are
+	  you doing. If you are using IBM S/390, then set this to 8192.
+
+config BLK_DEV_INITRD
+	bool "Initial RAM disk (initrd) support"
+	depends on BLK_DEV_RAM=y
+	help
+	  The initial RAM disk is a RAM disk that is loaded by the boot loader
+	  (loadlin or lilo) and that is mounted as root before the normal boot
+	  procedure. It is typically used to load modules needed to mount the
+	  "real" root file system, etc. See <file:Documentation/initrd.txt>
+	  for details.
+
+config BLK_DEV_XPRAM
+	tristate "XPRAM disk support"
+	help
+	  Select this option if you want to use your expanded storage on S/390
+	  or zSeries as a disk.  This is useful as a _fast_ swap device if you
+	  want to access more than 2G of memory when running in 31 bit mode.
+	  This option is also available as a module which will be called
+	  xpram.o.  If unsure, say "N".
+
+comment "S/390 block device drivers"
+
+config DASD
+	tristate "Support for DASD devices"
+	help
+	  Enable this option if you want to access DASDs directly utilizing
+	  S/390s channel subsystem commands. This is necessary for running
+	  natively on a single image or an LPAR.
+
+config DASD_ECKD
+	tristate "Support for ECKD Disks"
+	depends on DASD
+	help
+	  ECKD devices are the most commonly used devices. you should enable
+	  this option unless you are very sure to have no ECKD device.
+
+config DASD_AUTO_ECKD
+	bool "Automatic activation of ECKD module"
+	depends on DASD && DASD_ECKD=m
+	help
+	  Enable this option if you want your ECKD discipline module loaded
+	  on DASD driver startup.
+
+config DASD_FBA
+	tristate "Support for FBA  Disks"
+	depends on DASD
+	help
+	  FBA devices are currently unsupported.
+
+config DASD_AUTO_FBA
+	bool "Automatic activation of FBA  module"
+	depends on DASD && DASD_FBA=m
+	help
+	  Enable this option if you want your FBA discipline module loaded
+	  on DASD driver startup.
+
+#  dep_tristate '   Support for CKD  Disks' CONFIG_DASD_CKD $CONFIG_DASD
+config DASD_DIAG
+	tristate "Support for DIAG access to CMS reserved Disks"
+	depends on !ARCH_S390X && DASD
+	help
+	  Select this option if you want to use CMS reserved Disks under VM
+	  with the Diagnose250 command.  If you are not running under VM or
+	  unsure what it is, say "N".
+
+config DASD_AUTO_DIAG
+	bool "Automatic activation of DIAG module"
+	depends on DASD && !ARCH_S390X && DASD_DIAG=m
+	help
+	  Enable this option if you want your DIAG discipline module loaded
+	  on DASD driver startup.
+
+endmenu
+
+source "drivers/md/Kconfig"
+
+
+menu "Character device drivers"
+
+config UNIX98_PTYS
+	bool "Unix98 PTY support"
+	---help---
+	  A pseudo terminal (PTY) is a software device consisting of two
+	  halves: a master and a slave. The slave device behaves identical to
+	  a physical terminal; the master device is used by a process to
+	  read data from and write data to the slave, thereby emulating a
+	  terminal. Typical programs for the master side are telnet servers
+	  and xterms.
+
+	  Linux has traditionally used the BSD-like names /dev/ptyxx for
+	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
+	  has a number of problems. The GNU C library glibc 2.1 and later,
+	  however, supports the Unix98 naming standard: in order to acquire a
+	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
+	  terminal is then made available to the process and the pseudo
+	  terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The entries in /dev/pts/ are created on the fly by a virtual
+	  file system; therefore, if you say Y here you should say Y to
+	  "/dev/pts file system for Unix98 PTYs" as well.
+
+	  If you want to say Y here, you need to have the C library glibc 2.1
+	  or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*").
+	  Read the instructions in <file:Documentation/Changes> pertaining to
+	  pseudo terminals. It's safe to say N.
+
+config UNIX98_PTY_COUNT
+	int "Maximum number of Unix98 PTYs in use (0-2048)"
+	depends on UNIX98_PTYS
+	default "256"
+	help
+	  The maximum number of Unix98 PTYs that can be used at any one time.
+	  The default is 256, and should be enough for desktop systems. Server
+	  machines which support incoming telnet/rlogin/ssh connections and/or
+	  serve several X terminals may want to increase this: every incoming
+	  connection and every xterm uses up one PTY.
+
+	  When not in use, each additional set of 256 PTYs occupy
+	  approximately 8 KB of kernel memory on 32-bit architectures.
+
+comment "S/390 character device drivers"
+
+config TN3270
+	tristate "Support for locally attached 3270 tubes"
+	help
+	  Include support for IBM 3270 line-mode terminals.
+
+config TN3270_CONSOLE
+	bool "Support for console on 3270 line mode terminal"
+	depends on TN3270=y
+	help
+	  Include support for using an IBM 3270 line-mode terminal as a Linux
+	  system console.  Available only if 3270 support is compiled in
+	  statically.
+
+config TN3215
+	bool "Support for 3215 line mode terminal"
+	help
+	  Include support for IBM 3215 line-mode terminals.
+
+config TN3215_CONSOLE
+	bool "Support for console on 3215 line mode terminal"
+	depends on TN3215
+	help
+	  Include support for using an IBM 3215 line-mode terminal as a
+	  Linux system console.
+
+config HWC
+	bool "Support for HWC line mode terminal"
+	help
+	  Include support for IBM HWC line-mode terminals.
+
+config HWC_CONSOLE
+	bool "console on HWC line mode terminal"
+	depends on HWC
+	help
+	  Include support for using an IBM HWC line-mode terminal as the Linux
+	  system console.
+
+config HWC_CPI
+	tristate "Control-Program Identification"
+	depends on HWC
+	help
+	  This option enables the hardware console interface for system
+	  identification This is commonly used for workload management and
+	  gives you a nice name for the system on the service element.
+	  Please select this option as a module since built-in operation is
+	  completely untested.
+	  You should only select this option if you know what you are doing,
+	  need this feature and intend to run your kernel in LPAR.
+
+config S390_TAPE
+	tristate "S/390 tape device support"
+	help
+	  Select this option if you want to access channel-attached tape
+	  devices on IBM S/390 or zSeries.
+	  If you select this option you will also want to select at
+	  least one of the tape interface options and one of the tape
+	  hardware options in order to access a tape device.
+	  This option is also available as a module. The module will be
+	  called tape390.o and include all selected interfaces and
+	  hardware drivers.
+
+comment "S/390 tape interface support"
+	depends on S390_TAPE
+
+config S390_TAPE_CHAR
+	bool "Support for tape character devices"
+	depends on S390_TAPE
+	help
+	  Select this option if you want to access your channel-attached
+	  tape devices using the character device interface.
+	  This interface is similar to other Linux tape devices like
+	  SCSI-Tapes (st) and the floppy tape device (ftape).
+	  If unsure, say "Y".
+
+config S390_TAPE_BLOCK
+	bool "Support for tape block devices"
+	depends on S390_TAPE
+	help
+	  Select this option if you want to access your channel-attached tape
+	  devices using the block device interface.  This interface is similar
+	  to CD-ROM devices on other platforms.  The tapes can only be
+	  accessed read-only when using this interface.  Have a look at
+	  Documentation/s390/TAPE for further information about creating
+	  volumes for and using this interface.  It is safe to say "Y" here.
+
+comment "S/390 tape hardware support"
+	depends on S390_TAPE
+
+config S390_TAPE_3490
+	tristate "Support for 3490 tape hardware"
+	depends on S390_TAPE
+	help
+	  Select this option if you want to access IBM 3480 magnetic
+	  tape subsystems and 100% compatibles.
+	  It is safe to say "Y" here.
+
+config S390_TAPE_3480
+	tristate "Support for 3480 tape hardware"
+	depends on S390_TAPE
+	help
+	  Select this option if you want to access IBM 3490 magnetic
+	  tape subsystems and 100% compatibles.
+
+endmenu
+
+
+menu "Network device drivers"
+	depends on NET
+
+config NETDEVICES
+	bool "Network device support"
+	---help---
+	  You can say N here if you don't intend to connect your Linux box to
+	  any other computer at all or if all your connections will be over a
+	  telephone line with a modem either via UUCP (UUCP is a protocol to
+	  forward mail and news between unix hosts over telephone lines; read
+	  the UUCP-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
+	  account or a BBS, even using term (term is a program which gives you
+	  almost full Internet connectivity if you have a regular dial up
+	  shell account on some Internet connected Unix computer. Read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  You'll have to say Y if your computer contains a network card that
+	  you want to use under Linux (make sure you know its name because you
+	  will be asked for it and read the Ethernet-HOWTO (especially if you
+	  plan to use more than one network card under Linux)) or if you want
+	  to use SLIP (Serial Line Internet Protocol is the protocol used to
+	  send Internet traffic over telephone lines or null modem cables) or
+	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
+	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
+	  Protocol is mainly used to create a mini network by connecting the
+	  parallel ports of two local machines) or AX.25/KISS (protocol for
+	  sending Internet traffic over amateur radio links).
+
+	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
+	  Olaf Kirch's excellent and free book "Network Administrator's
+	  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
+	  unsure, say Y.
+
+config DUMMY
+	tristate "Dummy net driver support"
+	depends on NETDEVICES
+	---help---
+	  This is essentially a bit-bucket device (i.e. traffic you send to
+	  this device is consigned into oblivion) with a configurable IP
+	  address. It is most commonly used in order to make your currently
+	  inactive SLIP address seem like a real address for local programs.
+	  If you use SLIP or PPP, you might want to say Y here. Since this
+	  thing often comes in handy, the default is Y. It won't enlarge your
+	  kernel either. What a deal. Read about it in the Network
+	  Administrator's Guide, available from
+	  <http://www.linuxdoc.org/docs.html#guide>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called dummy.o.  If you want to use more than one dummy
+	  device at a time, you need to compile this driver as a module.
+	  Instead of 'dummy', the devices will then be called 'dummy0',
+	  'dummy1' etc.
+
+config BONDING
+	tristate "Bonding driver support"
+	depends on NETDEVICES
+	---help---
+	  Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
+	  Channels together. This is called 'Etherchannel' by Cisco,
+	  'Trunking' by Sun, and 'Bonding' in Linux.
+
+	  If you have two Ethernet connections to some other computer, you can
+	  make them behave like one double speed connection using this driver.
+	  Naturally, this has to be supported at the other end as well, either
+	  with a similar Bonding Linux driver, a Cisco 5500 switch or a
+	  SunTrunking SunSoft driver.
+
+	  This is similar to the EQL driver, but it merges Ethernet segments
+	  instead of serial lines.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called bonding.o.
+
+config EQUALIZER
+	tristate "EQL (serial line load balancing) support"
+	depends on NETDEVICES
+	---help---
+	  If you have two serial connections to some other computer (this
+	  usually requires two modems and two telephone lines) and you use
+	  SLIP (the protocol for sending Internet traffic over telephone
+	  lines) or PPP (a better SLIP) on them, you can make them behave like
+	  one double speed connection using this driver.  Naturally, this has
+	  to be supported at the other end as well, either with a similar EQL
+	  Linux driver or with a Livingston Portmaster 2e.
+
+	  Say Y if you want this and read
+	  <file:Documentation/networking/eql.txt>.  You may also want to read
+	  section 6.2 of the NET-3-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 eql.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config TUN
+	tristate "Universal TUN/TAP device driver support"
+	depends on NETDEVICES
+	---help---
+	  TUN/TAP provides packet reception and transmission for user space
+	  programs.  It can be viewed as a simple Point-to-Point or Ethernet
+	  device, which instead of receiving packets from a physical media,
+	  receives them from user space program and instead of sending packets
+	  via physical media writes them to the user space program.
+
+	  When a program opens /dev/net/tun, driver creates and registers
+	  corresponding net device tunX or tapX.  After a program closed above
+	  devices, driver will automatically delete tunXX or tapXX device and
+	  all routes corresponding to it.
+
+	  Please read <file:Documentation/networking/tuntap.txt> for more
+	  information.
+
+	  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 tun.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you don't know what to use this for, you don't need it.
+
+config NET_ETHERNET
+	bool "Ethernet (10 or 100Mbit)"
+	depends on NETDEVICES
+	---help---
+	  Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common
+	  type of Local Area Network (LAN) in universities and companies.
+
+	  Common varieties of Ethernet are: 10BASE-2 or Thinnet (10 Mbps over
+	  coaxial cable, linking computers in a chain), 10BASE-T or twisted
+	  pair (10 Mbps over twisted pair cable, linking computers to central
+	  hubs), 10BASE-F (10 Mbps over optical fiber links, using hubs),
+	  100BASE-TX (100 Mbps over two twisted pair cables, using hubs),
+	  100BASE-T4 (100 Mbps over 4 standard voice-grade twisted pair
+	  cables, using hubs), 100BASE-FX (100 Mbps over optical fiber links)
+	  [the 100BASE varieties are also known as Fast Ethernet], and Gigabit
+	  Ethernet (1 Gbps over optical fiber or short copper links).
+
+	  If your Linux machine will be connected to an Ethernet and you have
+	  an Ethernet network interface card (NIC) installed in your computer,
+	  say Y here and read the Ethernet-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. You will then also have
+	  to say Y to the driver for your particular NIC.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about Ethernet network cards. If unsure, say N.
+
+config TR
+	bool "Token Ring driver support"
+	depends on NETDEVICES
+	help
+	  Token Ring is IBM's way of communication on a local network; the
+	  rest of the world uses Ethernet. To participate on a Token Ring
+	  network, you need a special Token ring network card. If you are
+	  connected to such a Token Ring network and want to use your Token
+	  Ring card under Linux, say Y here and to the driver for your
+	  particular card below and read the Token-Ring mini-HOWTO, available
+	  from <http://www.linuxdoc.org/docs.html#howto>. Most people can
+	  say N here.
+
+config FDDI
+	bool "FDDI driver support"
+	depends on NETDEVICES
+	help
+	  Fiber Distributed Data Interface is a high speed local area network
+	  design; essentially a replacement for high speed Ethernet. FDDI can
+	  run over copper or fiber. If you are connected to such a network and
+	  want a driver for the FDDI card in your computer, say Y here (and
+	  then also Y to the driver for your FDDI card, below). Most people
+	  will say N.
+
+comment "S/390 network device drivers"
+	depends on NETDEVICES
+
+config CHANDEV
+	bool "Channel Device Configuration"
+	depends on NETDEVICES
+	---help---
+	  The channel device layer is a layer to provide a consistent
+	  interface for configuration & default machine check (devices
+	  appearing & disappearing) handling on Linux for s/390 & z/Series
+	  channel devices.
+
+	  s/390 & z/Series channel devices include among others
+
+	  lcs (the most common ethernet/token ring/fddi standard on
+	  zSeries)
+	  ctc/escon hi speed like serial link standard on zSeries
+	  claw used to talk to cisco routers.
+	  qeth gigabit ethernet.
+
+	  These devices use two channels one read & one write for
+	  configuration & communication (& a third channel, the data
+	  channel the case of gigabit ethernet). The motivation
+	  behind developing this layer was that there was a lot of
+	  duplicate code among the channel device drivers for
+	  configuration.
+
+	  Also the lcs & ctc drivers tended to fight over
+	  3088/08's & 3088/1F's which could be either 2216/3172
+	  channel attached lcs compatible devices or escon/ctc pipes
+	  had to be configured separately as they couldn't autodetect,
+	  this is now simplified by doing the configuration in a single
+	  place (the channel device layer).
+
+	  This layer isn't invasive & it is quite okay to use channel
+	  drivers which don't use the channel device layer in
+	  conjunction with drivers which do.
+
+	  For more info see the chandev manpage usually distributed in
+	  <file:Documentation/s390/chandev.8> in the Linux source tree.
+
+config HOTPLUG
+	bool
+	depends on CHANDEV
+	default y
+	---help---
+	  Say Y here if you want to plug devices into your computer while
+	  the system is running, and be able to use them quickly.  In many
+	  cases, the devices can likewise be unplugged at any time too.
+
+	  One well known example of this is PCMCIA- or PC-cards, credit-card
+	  size devices such as network cards, modems or hard drives which are
+	  plugged into slots found on all modern laptop computers.  Another
+	  example, used on modern desktops as well as laptops, is USB.
+
+	  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
+	  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
+	  Then your kernel will automatically call out to a user mode "policy
+	  agent" (/sbin/hotplug) to load modules and set up software needed
+	  to use devices as you hotplug them.
+
+config LCS
+	tristate "Lan Channel Station Interface"
+	depends on NETDEVICES && (NET_ETHERNET || TR)
+
+config CTC
+	tristate "CTC device support"
+	depends on NETDEVICES
+	help
+	  Select this option if you want to use channel-to-channel networking
+	  on IBM S/390 or zSeries. This device driver supports real CTC
+	  coupling using ESCON. It also supports virtual CTCs when running
+	  under VM. It will use the channel device configuration if this is
+	  available.  This option is also available as a module which will be
+	  called ctc.o.  If you do not know what it is, it's safe to say "Y".
+
+config IUCV
+	tristate "IUCV device support (VM only)"
+	depends on NETDEVICES
+	help
+	  Select this option if you want to use inter-user communication
+	  vehicle networking under VM or VIF.  This option is also available
+	  as a module which will be called iucv.o. If unsure, say "Y".
+
+endmenu
+
diff -Nru a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
--- a/drivers/s390/block/dasd.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/s390/block/dasd.c	Wed Oct 30 16:44:28 2002
@@ -337,11 +337,6 @@
 	/* Forget the discipline information. */
 	device->discipline = NULL;
 	device->state = DASD_STATE_NEW;
-
-	/* Forget the block device */
-	bdev = bdget(MKDEV(device->gdp->major, device->gdp->first_minor));
-	bdput(bdev);
-	bdput(bdev);
 }
 
 /*
@@ -428,17 +423,6 @@
 }
 
 /*
- * get the kdev_t of a device 
- * FIXME: remove this when no longer needed
- */
-static inline kdev_t
-dasd_partition_to_kdev_t(dasd_device_t *device, unsigned int partition)
-{
-	return mk_kdev(device->gdp->major, device->gdp->first_minor+partition);
-}
-
-
-/*
  * Setup block device.
  */
 static inline int
@@ -449,8 +433,6 @@
 
 	devmap = dasd_devmap_from_devno(device->devinfo.devno);
 	if (devmap->features & DASD_FEATURE_READONLY) {
-		for (i = 0; i < (1 << DASD_PARTN_BITS); i++)
-			set_device_ro(dasd_partition_to_kdev_t(device, i), 1);
 		device->ro_flag = 1;
 		DEV_MESSAGE (KERN_WARNING, device, "%s",
 			     "setting read-only mode ");
@@ -1496,7 +1478,7 @@
 {
 	if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
 		BUG();
-	add_blkdev_randomness(major(req->rq_dev));
+	add_disk_randomness(req->rq_disk);
 	end_that_request_last(req);
 	return;
 }
@@ -2178,10 +2160,10 @@
 
 struct
 block_device_operations dasd_device_operations = {
-	owner:THIS_MODULE,
-	open:dasd_open,
-	release:dasd_release,
-	ioctl:dasd_ioctl,
+	.owner		= THIS_MODULE,
+	.open		= dasd_open,
+	.release	= dasd_release,
+	.ioctl		= dasd_ioctl,
 };
 
 
diff -Nru a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
--- a/drivers/s390/block/dasd_genhd.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/s390/block/dasd_genhd.c	Wed Oct 30 16:44:31 2002
@@ -36,26 +36,6 @@
 };
 
 /*
- * Returns the queue corresponding to a device behind a kdev.
- */
-static request_queue_t *
-dasd_get_queue(kdev_t kdev)
-{
-	dasd_devmap_t *devmap;
-	dasd_device_t *device;
-	request_queue_t *queue;
-
-	devmap = dasd_devmap_from_kdev(kdev);
-	device = (devmap != NULL) ?
-		dasd_get_device(devmap) : ERR_PTR(-ENODEV);
-	if (IS_ERR(device))
-		return NULL;
-	queue = device->request_queue;
-	dasd_put_device(devmap);
-	return queue;
-}
-
-/*
  * Register major number for the dasd driver. Call with DASD_MAJOR to
  * setup the static dasd device major 94 or with 0 to allocated a major
  * dynamically.
@@ -93,8 +73,6 @@
 	mi->major = new_major;
 
 	/* Setup block device pointers for the new major. */
-	blk_dev[new_major].queue = dasd_get_queue;
-
 	/* Insert the new major info structure into dasd_major_info list. */
 	spin_lock(&dasd_major_lock);
 	list_add_tail(&mi->list, &dasd_major_info);
@@ -116,9 +94,6 @@
 	list_del(&mi->list);
 	spin_unlock(&dasd_major_lock);
 
-	/* Clear block device pointers. */
-	blk_dev[mi->major].queue = NULL;
-
 	rc = unregister_blkdev(mi->major, "dasd");
 	if (rc < 0)
 		MESSAGE(KERN_WARNING,
@@ -273,6 +248,9 @@
 {
 	/* Make the disk known. */
 	set_capacity(device->gdp, device->blocks << device->s2b_shift);
+	device->gdp->queue = device->request_queue;
+	if (device->ro_flag)
+		set_disk_ro(device->gdp, 1);
 	add_disk(device->gdp);
 }
 
diff -Nru a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
--- a/drivers/s390/block/dasd_ioctl.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/s390/block/dasd_ioctl.c	Wed Oct 30 16:44:29 2002
@@ -88,33 +88,17 @@
 dasd_ioctl(struct inode *inp, struct file *filp,
 	   unsigned int no, unsigned long data)
 {
-	dasd_devmap_t *devmap;
-	dasd_device_t *device;
+	struct block_device *bdev = inp->i_bdev;
+	dasd_device_t *device = bdev->bd_disk->private_data;
 	dasd_ioctl_list_t *ioctl;
-	struct block_device *bdev;
 	struct list_head *l;
 	const char *dir;
 	int rc;
 
-	if ((!inp) || kdev_none(inp->i_rdev))
-		return -EINVAL;
 	if ((_IOC_DIR(no) != _IOC_NONE) && (data == 0)) {
 		PRINT_DEBUG("empty data ptr");
 		return -EINVAL;
 	}
-	bdev = bdget(kdev_t_to_nr(inp->i_rdev));
-	if (!bdev)
-		return -EINVAL;
-
-	devmap = dasd_devmap_from_bdev(bdev);
-	device = (devmap != NULL) ?
-		dasd_get_device(devmap) : ERR_PTR(-ENODEV);
-	if (IS_ERR(device)) {
-		MESSAGE(KERN_WARNING,
-			"No device registered as device %s", bdevname(bdev));
-		bdput(bdev);
-		return -EINVAL;
-	}
 	dir = _IOC_DIR (no) == _IOC_NONE ? "0" :
 		_IOC_DIR (no) == _IOC_READ ? "r" :
 		_IOC_DIR (no) == _IOC_WRITE ? "w" : 
@@ -134,8 +118,6 @@
 				__MOD_DEC_USE_COUNT(ioctl->owner);
 			} else
 				rc = ioctl->handler(bdev, no, data);
-			dasd_put_device(devmap);
-			bdput(bdev);
 			return rc;
 		}
 	}
@@ -143,8 +125,6 @@
 	DBF_DEV_EVENT(DBF_INFO, device,
 		      "unknown ioctl 0x%08x=%s'0x%x'%d(%d) data %8lx", no,
 		      dir, _IOC_TYPE(no), _IOC_NR(no), _IOC_SIZE(no), data);
-	dasd_put_device(devmap);
-	bdput(bdev);
 	return -ENOTTY;
 }
 
@@ -462,8 +442,7 @@
 		devmap->features |= DASD_FEATURE_READONLY;
 	else
 		devmap->features &= ~DASD_FEATURE_READONLY;
-	for (i = 0; i < (1 << DASD_PARTN_BITS); i++)
-		set_device_ro(to_kdev_t(bdev->bd_dev + i), intval);
+	set_disk_ro(bdev->bd_disk, intval);
 	device->ro_flag = intval;
 	dasd_put_device(devmap);
 	return 0;
diff -Nru a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
--- a/drivers/s390/block/xpram.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/s390/block/xpram.c	Wed Oct 30 16:44:31 2002
@@ -276,17 +276,13 @@
  */
 static int xpram_make_request(request_queue_t *q, struct bio *bio)
 {
-	xpram_device_t *xdev;
+	xpram_device_t *xdev = bio->bi_bdev->bd_disk->private_data;
 	struct bio_vec *bvec;
 	unsigned long index;
 	unsigned long page_addr;
 	unsigned long bytes;
 	int i;
 
-	if (MINOR(bio->bi_bdev->bd_dev) > xpram_devs)
-		/* No such device. */
-		goto fail;
-	xdev = xpram_devices + MINOR(bio->bi_bdev->bd_dev);
 	if ((bio->bi_sector & 3) != 0 || (bio->bi_size & 4095) != 0)
 		/* Request is not page-aligned. */
 		goto fail;
@@ -348,8 +344,8 @@
 
 static struct block_device_operations xpram_devops =
 {
-	owner:   THIS_MODULE,
-	ioctl:   xpram_ioctl,
+	.owner	= THIS_MODULE,
+	.ioctl	= xpram_ioctl,
 };
 
 /*
@@ -419,9 +415,10 @@
 	return 0;
 }
 
+static struct request_queue xpram_queue;
+
 static int __init xpram_setup_blkdev(void)
 {
-	request_queue_t *q;
 	unsigned long offset;
 	int i, rc = -ENOMEM;
 
@@ -451,9 +448,8 @@
 	 * Assign the other needed values: make request function, sizes and
 	 * hardsect size. All the minor devices feature the same value.
 	 */
-	q = BLK_DEFAULT_QUEUE(XPRAM_MAJOR);
-	blk_queue_make_request(q,xpram_make_request);
-	blk_queue_hardsect_size(q, 4096);
+	blk_queue_make_request(&xpram_queue, xpram_make_request);
+	blk_queue_hardsect_size(&xpram_queue, 4096);
 
 	/*
 	 * Setup device structures.
@@ -467,6 +463,8 @@
 		disk->major = XPRAM_MAJOR;
 		disk->first_minor = i;
 		disk->fops = &xpram_devops;
+		disk->private_data = &xpram_devices[i];
+		disk->queue = &xpram_queue;
 		sprintf(disk->disk_name, "slram%d", i);
 		set_capacity(disk, xpram_sizes[i] << 1);
 		add_disk(disk);
diff -Nru a/drivers/sbus/char/Config.help b/drivers/sbus/char/Config.help
--- a/drivers/sbus/char/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,80 +0,0 @@
-CONFIG_APM_RTC_IS_GMT
-  Say Y here if your RTC (Real Time Clock a.k.a. hardware clock)
-  stores the time in GMT (Greenwich Mean Time). Say N if your RTC
-  stores localtime.
-
-  It is in fact recommended to store GMT in your RTC, because then you
-  don't have to worry about daylight savings time changes. The only
-  reason not to use GMT in your RTC is if you also run a broken OS
-  that doesn't understand GMT.
-
-CONFIG_RTC
-  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
-  into your computer.
-
-  Every PC has such a clock built in. It can be used to generate
-  signals from as low as 1Hz up to 8192Hz, and can also be used
-  as a 24 hour alarm. It reports status information via the file
-  /proc/driver/rtc and its behaviour is set by various ioctls on
-  /dev/rtc.
-
-  If you run Linux on a multiprocessor machine and said Y to
-  "Symmetric Multi Processing" above, you should say Y here to read
-  and set the RTC in an SMP compatible fashion.
-
-  If you think you have a use for such a device (such as periodic data
-  sampling), then say Y here, and read <file:Documentation/rtc.txt>
-  for details.
-
-  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 is called rtc.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SUN_OPENPROMIO
-  This driver provides user programs with an interface to the SPARC
-  PROM device tree. The driver implements a SunOS-compatible
-  interface and a NetBSD-compatible interface.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M and read <file:Documentation/modules.txt>. If unsure, say Y.
-
-CONFIG_SUN_MOSTEK_RTC
-  The Mostek RTC chip is used on all known Sun computers except
-  some JavaStations. For a JavaStation you need to say Y both here
-  and to "Enhanced Real Time Clock Support".
-
-  Say Y here unless you are building a special purpose kernel.
-
-CONFIG_OBP_FLASH
-  The OpenBoot PROM on Ultra systems is flashable. If you want to be
-  able to upgrade the OBP firmware, say Y here.
-
-CONFIG_SUN_JSFLASH
-  If you say Y here, you will be able to boot from your JavaStation's
-  Flash memory.
-
-CONFIG_SUN_VIDEOPIX
-  Say Y here to support the Videopix Frame Grabber from Sun
-  Microsystems, commonly found on SPARCstations.  This card, which is
-  based on the Phillips SAA9051, can handle NTSC and PAL/SECAM and
-  SVIDEO signals.
-
-CONFIG_SUN_BPP
-  Say Y here to support Sun's obsolete variant of IEEE1284
-  bidirectional parallel port protocol as /dev/bppX.  Can be built on
-  x86 machines.
-
-CONFIG_SUN_AURORA
-  The Aurora Multiboard is a multi-port high-speed serial controller.
-  If you have one of these, say Y.
-
-CONFIG_TADPOLE_TS102_UCTRL
-  Say Y here to directly support the TS102 Microcontroller interface
-  on the Tadpole Sparcbook 3.  This device handles power-management
-  events, and can also notice the attachment/detachment of external
-  monitors and mice.
-
diff -Nru a/drivers/sbus/char/Config.in b/drivers/sbus/char/Config.in
--- a/drivers/sbus/char/Config.in	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,25 +0,0 @@
-mainmenu_option next_comment
-comment 'Misc Linux/SPARC drivers'
-tristate '/dev/openprom device support' CONFIG_SUN_OPENPROMIO
-tristate 'Mostek real time clock support' CONFIG_SUN_MOSTEK_RTC
-if [ "$CONFIG_SPARC64" = "y" ]; then
-   tristate 'OBP Flash Device support' CONFIG_OBP_FLASH
-fi
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   tristate 'Bidirectional parallel port support (OBSOLETE)' CONFIG_SUN_BPP
-   tristate 'Videopix Frame Grabber (EXPERIMENTAL)' CONFIG_SUN_VIDEOPIX
-   tristate 'Aurora Multiboard 1600se (EXPERIMENTAL)' CONFIG_SUN_AURORA
-
-   if [ "$CONFIG_SPARC32" = "y" ]; then
-      tristate 'Tadpole TS102 Microcontroller support (EXPERIMENTAL)' CONFIG_TADPOLE_TS102_UCTRL
-
-      tristate 'JavaStation OS Flash SIMM (EXPERIMENTAL)' CONFIG_SUN_JSFLASH
-      # XXX Why don't we do "source drivers/char/Config.in" somewhere?
-      if [ "$CONFIG_PCI" = "y" ]; then
-	 define_bool CONFIG_APM_RTC_IS_GMT y		# no shit
-         tristate 'PC-style Real Time Clock Support' CONFIG_RTC
-      fi
-   fi
-fi
-endmenu
diff -Nru a/drivers/sbus/char/Kconfig b/drivers/sbus/char/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/sbus/char/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,92 @@
+
+menu "Misc Linux/SPARC drivers"
+
+config SUN_OPENPROMIO
+	tristate "/dev/openprom device support"
+	help
+	  This driver provides user programs with an interface to the SPARC
+	  PROM device tree. The driver implements a SunOS-compatible
+	  interface and a NetBSD-compatible interface.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M and read <file:Documentation/modules.txt>. If unsure, say Y.
+
+config SUN_MOSTEK_RTC
+	tristate "Mostek real time clock support"
+	help
+	  The Mostek RTC chip is used on all known Sun computers except
+	  some JavaStations. For a JavaStation you need to say Y both here
+	  and to "Enhanced Real Time Clock Support".
+
+	  Say Y here unless you are building a special purpose kernel.
+
+config OBP_FLASH
+	tristate "OBP Flash Device support"
+	depends on SPARC64
+	help
+	  The OpenBoot PROM on Ultra systems is flashable. If you want to be
+	  able to upgrade the OBP firmware, say Y here.
+
+config SUN_BPP
+	tristate "Bidirectional parallel port support (OBSOLETE)"
+	depends on EXPERIMENTAL
+	help
+	  Say Y here to support Sun's obsolete variant of IEEE1284
+	  bidirectional parallel port protocol as /dev/bppX.  Can be built on
+	  x86 machines.
+
+config SUN_VIDEOPIX
+	tristate "Videopix Frame Grabber (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  Say Y here to support the Videopix Frame Grabber from Sun
+	  Microsystems, commonly found on SPARCstations.  This card, which is
+	  based on the Phillips SAA9051, can handle NTSC and PAL/SECAM and
+	  SVIDEO signals.
+
+config SUN_AURORA
+	tristate "Aurora Multiboard 1600se (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  The Aurora Multiboard is a multi-port high-speed serial controller.
+	  If you have one of these, say Y.
+
+config TADPOLE_TS102_UCTRL
+	tristate "Tadpole TS102 Microcontroller support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && SPARC32
+	help
+	  Say Y here to directly support the TS102 Microcontroller interface
+	  on the Tadpole Sparcbook 3.  This device handles power-management
+	  events, and can also notice the attachment/detachment of external
+	  monitors and mice.
+
+config SUN_JSFLASH
+	tristate "JavaStation OS Flash SIMM (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && SPARC32
+	help
+	  If you say Y here, you will be able to boot from your JavaStation's
+	  Flash memory.
+
+# XXX Why don't we do "source drivers/char/Config.in" somewhere?
+# no shit
+config APM_RTC_IS_GMT
+	bool
+	depends on EXPERIMENTAL && SPARC32 && PCI
+	default y
+	help
+	  Say Y here if your RTC (Real Time Clock a.k.a. hardware clock)
+	  stores the time in GMT (Greenwich Mean Time). Say N if your RTC
+	  stores localtime.
+
+	  It is in fact recommended to store GMT in your RTC, because then you
+	  don't have to worry about daylight savings time changes. The only
+	  reason not to use GMT in your RTC is if you also run a broken OS
+	  that doesn't understand GMT.
+
+config RTC
+	tristate "PC-style Real Time Clock Support"
+	depends on PCI && EXPERIMENTAL && SPARC32
+
+endmenu
+
diff -Nru a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
--- a/drivers/sbus/char/bpp.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/sbus/char/bpp.c	Wed Oct 30 16:44:19 2002
@@ -439,7 +439,7 @@
  */
 static int bpp_open(struct inode *inode, struct file *f)
 {
-      unsigned minor = MINOR(inode->i_rdev);
+      unsigned minor = minor(inode->i_rdev);
       int ret;
 
       spin_lock(&bpp_open_lock);
@@ -469,7 +469,7 @@
  */
 static int bpp_release(struct inode *inode, struct file *f)
 {
-      unsigned minor = MINOR(inode->i_rdev);
+      unsigned minor = minor(inode->i_rdev);
 
       spin_lock(&bpp_open_lock);
       instances[minor].opened = 0;
@@ -633,7 +633,7 @@
 static ssize_t bpp_read(struct file *f, char *c, size_t cnt, loff_t * ppos)
 {
       long rc;
-      const unsigned minor = MINOR(f->f_dentry->d_inode->i_rdev);
+      const unsigned minor = minor(f->f_dentry->d_inode->i_rdev);
       if (minor >= BPP_NO) return -ENODEV;
       if (!instances[minor].present) return -ENODEV;
 
@@ -786,7 +786,7 @@
 static ssize_t bpp_write(struct file *f, const char *c, size_t cnt, loff_t * ppos)
 {
       long errno = 0;
-      const unsigned minor = MINOR(f->f_dentry->d_inode->i_rdev);
+      const unsigned minor = minor(f->f_dentry->d_inode->i_rdev);
       if (minor >= BPP_NO) return -ENODEV;
       if (!instances[minor].present) return -ENODEV;
 
@@ -812,7 +812,7 @@
 {
       int errno = 0;
 
-      unsigned minor = MINOR(inode->i_rdev);
+      unsigned minor = minor(inode->i_rdev);
       if (minor >= BPP_NO) return -ENODEV;
       if (!instances[minor].present) return -ENODEV;
 
diff -Nru a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
--- a/drivers/sbus/char/jsflash.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/sbus/char/jsflash.c	Wed Oct 30 16:44:28 2002
@@ -592,7 +592,7 @@
 		disk->private_data = jdp;
 		disk->queue = &jsf_queue;
 		add_disk(disk);
-		set_device_ro(MKDEV(JSFD_MAJOR, i), 1);
+		set_disk_ro(disk, 1);
 	}
 	return 0;
 out:
diff -Nru a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
--- a/drivers/scsi/3w-xxxx.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/scsi/3w-xxxx.c	Wed Oct 30 16:44:33 2002
@@ -186,7 +186,6 @@
 
 #define __3W_C			/* let 3w-xxxx.h know it is use */
 
-#include "sd.h"
 #include "scsi.h"
 #include "hosts.h"
 
@@ -2092,22 +2091,23 @@
 } /* End tw_reset_sequence() */
 
 /* This funciton returns unit geometry in cylinders/heads/sectors */
-int tw_scsi_biosparam(Disk *disk, struct block_device *dev, int geom[]) 
+int tw_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[]) 
 {
 	int heads, sectors, cylinders;
 	TW_Device_Extension *tw_dev;
 	
 	dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_biosparam()\n");
-	tw_dev = (TW_Device_Extension *)disk->device->host->hostdata;
+	tw_dev = (TW_Device_Extension *)sdev->host->hostdata;
 
 	heads = 64;
 	sectors = 32;
-	cylinders = (unsigned long)disk->capacity / (heads * sectors);
+	cylinders = (unsigned long)capacity / (heads * sectors);
 
-	if (disk->capacity >= 0x200000) {
+	if (capacity >= 0x200000) {
 		heads = 255;
 		sectors = 63;
-		cylinders = (unsigned long)disk->capacity / (heads * sectors);
+		cylinders = (unsigned long)capacity / (heads * sectors);
 	}
 
 	dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_biosparam(): heads = %d, sectors = %d, cylinders = %d\n", heads, sectors, cylinders);
diff -Nru a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h
--- a/drivers/scsi/3w-xxxx.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/3w-xxxx.h	Wed Oct 30 16:44:26 2002
@@ -443,7 +443,8 @@
 int tw_post_command_packet(TW_Device_Extension *tw_dev, int request_id);
 int tw_reset_device_extension(TW_Device_Extension *tw_dev);
 int tw_reset_sequence(TW_Device_Extension *tw_dev);
-int tw_scsi_biosparam(Disk *disk, struct block_device *dev, int geom[]);
+int tw_scsi_biosparam(struct scsi_device *sdev, struct block_device *bev,
+		sector_t capacity, int geom[]);
 int tw_scsi_detect(Scsi_Host_Template *tw_host);
 int tw_scsi_eh_abort(Scsi_Cmnd *SCpnt);
 int tw_scsi_eh_reset(Scsi_Cmnd *SCpnt);
@@ -468,25 +469,14 @@
 
 /* Scsi_Host_Template Initializer */
 #define TWXXXX {					\
-	next : NULL,					\
-	module : NULL,					\
 	proc_name : "3w-xxxx",				\
 	proc_info : tw_scsi_proc_info,			\
 	name : "3ware Storage Controller",		\
 	detect : tw_scsi_detect,			\
 	release : tw_scsi_release,			\
-	info : NULL,					\
-	ioctl : NULL,                  			\
-	command : NULL,					\
 	queuecommand : tw_scsi_queue,			\
-	eh_strategy_handler : NULL,			\
 	eh_abort_handler : tw_scsi_eh_abort,		\
-	eh_device_reset_handler : NULL,			\
-	eh_bus_reset_handler : NULL,			\
 	eh_host_reset_handler : tw_scsi_eh_reset,	\
-	abort : NULL,					\
-	reset : NULL,					\
-	slave_attach : NULL,				\
 	bios_param : tw_scsi_biosparam,			\
 	can_queue : TW_Q_LENGTH-1,			\
 	this_id: -1,					\
diff -Nru a/drivers/scsi/53c7,8xx.c b/drivers/scsi/53c7,8xx.c
--- a/drivers/scsi/53c7,8xx.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/53c7,8xx.c	Wed Oct 30 16:44:19 2002
@@ -241,7 +241,6 @@
 #include "scsi.h"
 #include "hosts.h"
 #include "53c7,8xx.h"
-#include "sd.h"
 #include <linux/stat.h>
 #include <linux/stddef.h>
 
@@ -1153,7 +1152,6 @@
 /* 
  * Function : static int normal_init(Scsi_Host_Template *tpnt, int board, 
  *	int chip, u32 base, int io_port, int irq, int dma, int pcivalid,
- *	unsigned char pci_bus, unsigned char pci_device_fn,
  *      struct pci_dev *pci_dev, long long options);
  *
  * Purpose : initializes a NCR53c7,8x0 based on base addresses,
@@ -1161,7 +1159,7 @@
  *	
  *	Useful where a new NCR chip is backwards compatible with
  *	a supported chip, but the DEVICE ID has changed so it 
- *	doesn't show up when the autoprobe does a pcibios_find_device.
+ *	doesn't show up when the autoprobe does a pci_find_device.
  *
  * Inputs : tpnt - Template for this SCSI adapter, board - board level
  *	product, chip - 810, 820, or 825, bus - PCI bus, device_fn -
@@ -1174,7 +1172,6 @@
 static int  __init 
 normal_init (Scsi_Host_Template *tpnt, int board, int chip, 
     u32 base, int io_port, int irq, int dma, int pci_valid, 
-    unsigned char pci_bus, unsigned char pci_device_fn,
     struct pci_dev *pci_dev, long long options)
 {
     struct Scsi_Host *instance;
@@ -1275,8 +1272,7 @@
     hostdata->board = board;
     hostdata->chip = chip;
     if ((hostdata->pci_valid = pci_valid)) {
-	hostdata->pci_bus = pci_bus;
-	hostdata->pci_device_fn = pci_device_fn;
+	hostdata->pci_dev = pci_dev;
     }
 
     /*
@@ -1377,7 +1373,7 @@
  *	
  *	Useful where a new NCR chip is backwards compatible with
  *	a supported chip, but the DEVICE ID has changed so it 
- *	doesn't show up when the autoprobe does a pcibios_find_device.
+ *	doesn't show up when the autoprobe does a pci_find_device.
  *
  * Inputs : tpnt - Template for this SCSI adapter, board - board level
  *	product, chip - 810, 820, or 825, bus - PCI bus, device_fn -
@@ -1511,7 +1507,7 @@
     }
 
     return normal_init (tpnt, board, chip, (int) base, io_port, 
-	(int) irq, DMA_NONE, 1, bus, device_fn, pdev, options);
+	(int) irq, DMA_NONE, 1, pdev, options);
 }
 
 
@@ -5085,8 +5081,7 @@
     if ((hostdata->chip / 100) == 8) {
 	save_flags (flags);
 	cli();
-	tmp = pcibios_read_config_word (hostdata->pci_bus, 
-	    hostdata->pci_device_fn, PCI_STATUS, &pci_status);
+	tmp = pci_read_config_word (hostdata->pcidev, PCI_STATUS, &pci_status);
 	restore_flags (flags);
 	if (tmp == PCIBIOS_SUCCESSFUL) {
 	    if (pci_status & PCI_STATUS_REC_TARGET_ABORT) {
diff -Nru a/drivers/scsi/53c7,8xx.h b/drivers/scsi/53c7,8xx.h
--- a/drivers/scsi/53c7,8xx.h	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/53c7,8xx.h	Wed Oct 30 16:44:31 2002
@@ -64,7 +64,6 @@
 	  queuecommand:   NCR53c7xx_queue_command,	\
 	  abort:          NCR53c7xx_abort,		\
 	  reset:          NCR53c7xx_reset,		\
-	  bios_param:     scsicam_bios_param,		\
 	  can_queue:      24,				\
 	  this_id:        7,				\
 	  sg_tablesize:   127,				\
@@ -1159,12 +1158,12 @@
 					   700-66, rest are last three
 					   digits of part number */
     /*
-     * PCI bus, device, function, only for NCR53c8x0 chips.
+     * PCI device, only for NCR53c8x0 chips.
      * pci_valid indicates that the PCI configuration information
      * is valid, and we can twiddle MAX_LAT, etc. as recommended
      * for maximum performance in the NCR documentation.
      */
-    unsigned char pci_bus, pci_device_fn;
+    struct pci_dev *pci_dev;
     unsigned pci_valid:1;
 
     u32 *dsp;				/* dsp to restart with after
diff -Nru a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c
--- a/drivers/scsi/53c7xx.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/scsi/53c7xx.c	Wed Oct 30 16:44:36 2002
@@ -281,7 +281,6 @@
 #include "scsi.h"
 #include "hosts.h"
 #include "53c7xx.h"
-#include "sd.h"
 #include <linux/stat.h>
 #include <linux/stddef.h>
 
diff -Nru a/drivers/scsi/AM53C974.c b/drivers/scsi/AM53C974.c
--- a/drivers/scsi/AM53C974.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/AM53C974.c	Wed Oct 30 16:44:28 2002
@@ -17,7 +17,6 @@
 #include "scsi.h"
 #include "hosts.h"
 #include "AM53C974.h"
-#include "sd.h"
 
 /* AM53/79C974 (PCscsi) driver release 0.5
 
diff -Nru a/drivers/scsi/AM53C974.h b/drivers/scsi/AM53C974.h
--- a/drivers/scsi/AM53C974.h	Wed Oct 30 16:44:32 2002
+++ b/drivers/scsi/AM53C974.h	Wed Oct 30 16:44:32 2002
@@ -60,7 +60,6 @@
     queuecommand:   AM53C974_queue_command,	  \
     abort:          AM53C974_abort,    		  \
     reset:          AM53C974_reset,    		  \
-    bios_param:     scsicam_bios_param,		  \
     can_queue:      12,                 	  \
     this_id:        -1,                           \
     sg_tablesize:   SG_ALL,            		  \
diff -Nru a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
--- a/drivers/scsi/BusLogic.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/scsi/BusLogic.c	Wed Oct 30 16:44:34 2002
@@ -49,7 +49,6 @@
 /* #include <scsi/scsicam.h> This include file is currently busted */
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include "BusLogic.h"
 #include "FlashPoint.c"
 
@@ -4219,17 +4218,16 @@
   the BIOS, and a warning may be displayed.
 */
 unsigned char *scsi_bios_ptable(struct block_device *);
-int BusLogic_BIOSDiskParameters(SCSI_Disk_T *Disk, struct block_device *Device,
-				int *Parameters)
+int BusLogic_BIOSDiskParameters(struct scsi_device *sdev, struct block_device *Device,
+				sector_t capacity, int *Parameters)
 {
-  BusLogic_HostAdapter_T *HostAdapter =
-    (BusLogic_HostAdapter_T *) Disk->device->host->hostdata;
+  BusLogic_HostAdapter_T *HostAdapter = (BusLogic_HostAdapter_T *) sdev->host->hostdata;
   BIOS_DiskParameters_T *DiskParameters = (BIOS_DiskParameters_T *) Parameters;
   unsigned char *buf;
   if (HostAdapter->ExtendedTranslationEnabled &&
-      Disk->capacity >= 2*1024*1024 /* 1 GB in 512 byte sectors */)
+      capacity >= 2*1024*1024 /* 1 GB in 512 byte sectors */)
     {
-      if (Disk->capacity >= 4*1024*1024 /* 2 GB in 512 byte sectors */)
+      if (capacity >= 4*1024*1024 /* 2 GB in 512 byte sectors */)
 	{
 	  DiskParameters->Heads = 255;
 	  DiskParameters->Sectors = 63;
@@ -4246,7 +4244,7 @@
       DiskParameters->Sectors = 32;
     }
   DiskParameters->Cylinders =
-    (unsigned long)Disk->capacity / (DiskParameters->Heads * DiskParameters->Sectors);
+    (unsigned long)capacity / (DiskParameters->Heads * DiskParameters->Sectors);
   buf = scsi_bios_ptable(Device);
   if (buf == NULL) return 0;
   /*
@@ -4290,7 +4288,7 @@
 	  PartitionEntryEndSector = FirstPartitionEntry->end_sector & 0x3F;
 	}
       DiskParameters->Cylinders =
-	(unsigned long)Disk->capacity / (DiskParameters->Heads * DiskParameters->Sectors);
+	(unsigned long)capacity / (DiskParameters->Heads * DiskParameters->Sectors);
       if (PartitionNumber < 4 &&
 	  PartitionEntryEndSector == DiskParameters->Sectors)
 	{
diff -Nru a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h
--- a/drivers/scsi/BusLogic.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/BusLogic.h	Wed Oct 30 16:44:28 2002
@@ -41,7 +41,6 @@
 typedef Scsi_Host_Template SCSI_Host_Template_T;
 typedef struct Scsi_Host SCSI_Host_T;
 typedef struct scsi_device SCSI_Device_T;
-typedef struct scsi_disk SCSI_Disk_T;
 typedef struct scsi_cmnd SCSI_Command_T;
 typedef struct scatterlist SCSI_ScatterList_T;
 
@@ -55,10 +54,8 @@
 extern int BusLogic_ReleaseHostAdapter(SCSI_Host_T *);
 extern int BusLogic_QueueCommand(SCSI_Command_T *,
 				 void (*CompletionRoutine)(SCSI_Command_T *));
-extern int BusLogic_AbortCommand(SCSI_Command_T *);
-extern int BusLogic_ResetCommand(SCSI_Command_T *, unsigned int);
-extern int BusLogic_BIOSDiskParameters(SCSI_Disk_T *, struct block_device *,
-				       int *);
+extern int BusLogic_BIOSDiskParameters(struct scsi_device *,
+		struct block_device *, sector_t, int *);
 extern int BusLogic_ProcDirectoryInfo(char *, char **, off_t, int, int, int);
 extern int BusLogic_SlaveAttach(SCSI_Device_T *);
 
@@ -75,8 +72,6 @@
     release:        BusLogic_ReleaseHostAdapter,  /* Release Host Adapter   */ \
     info:           BusLogic_DriverInfo,	  /* Driver Info Function   */ \
     queuecommand:   BusLogic_QueueCommand,	  /* Queue Command Function */ \
-    abort:          BusLogic_AbortCommand,	  /* Abort Command Function */ \
-    reset:          BusLogic_ResetCommand,	  /* Reset Command Function */ \
     slave_attach:   BusLogic_SlaveAttach,	  /* Configure a SCSI_Device*/ \
     bios_param:     BusLogic_BIOSDiskParameters,  /* BIOS Disk Parameters   */ \
     unchecked_isa_dma: 1,			  /* Default Initial Value  */ \
diff -Nru a/drivers/scsi/Config.help b/drivers/scsi/Config.help
--- a/drivers/scsi/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1397 +0,0 @@
-CONFIG_BLK_DEV_3W_XXXX_RAID
-  3ware is the only hardware ATA-Raid product in Linux to date.
-  This card is 2,4, or 8 channel master mode support only.
-  SCSI support required!!!
-
-  <http://www.3ware.com/>
-
-  Please read the comments at the top of
-  <file:drivers/scsi/3w-xxxx.c>.
-
-CONFIG_WARPENGINE_SCSI
-  Support for MacroSystem Development's WarpEngine Amiga SCSI-2
-  controller. Info at
-  <http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>.
-
-CONFIG_JAZZ_ESP
-  This is the driver for the onboard SCSI host adapter of MIPS Magnum
-  4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
-  systems.
-
-CONFIG_BLK_DEV_SD
-  If you want to use a SCSI hard disk or the SCSI or parallel port
-  version of the IOMEGA ZIP drive under Linux, say Y and read the
-  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
-  CD-ROMs.
-
-  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 sd_mod.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  Do not compile this driver as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI disk. In this case, do not compile the driver
-  for your SCSI host adapter (below) as a module either.
-
-CONFIG_SD_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted.  In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional disks that can be loaded after the
-  first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_CHR_DEV_ST
-  If you want to use a SCSI tape drive under Linux, say Y and read the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and
-  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
-  SCSI CD-ROMs.
-
-  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 st.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_CHR_DEV_OSST
-  The OnStream SC-x0 SCSI tape drives can not be driven by the
-  standard st driver, but instead need this special osst driver and
-  use the  /dev/osstX char device nodes (major 206).  Via usb-storage
-  and ide-scsi, you may be able to drive the USB-x0 and DI-x0 drives
-  as well.  Note that there is also a second generation of OnStream
-  tape drives (ADR-x0) that supports the standard SCSI-2 commands for
-  tapes (QIC-157) and can be driven by the standard driver st.
-  For more information, you may have a look at the SCSI-HOWTO
-  <http://www.linuxdoc.org/docs.html#howto>  and
-  <file:drivers/scsi/README.osst>  in the kernel source.
-  More info on the OnStream driver may be found on
-  <http://linux1.onstream.nl/test/>
-  Please also have a look at the standard st docu, as most of it
-  applies to osst as well.
-
-  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 osst.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_BLK_DEV_SR
-  If you want to use a SCSI CD-ROM under Linux, say Y and read the
-  SCSI-HOWTO and the CD-ROM-HOWTO at
-  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
-  or M to "ISO 9660 CD-ROM file system support" later.
-
-  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 sr_mod.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.
-
-CONFIG_SR_EXTRA_DEVS
-  This controls the amount of additional space allocated in tables for
-  drivers that are loaded as modules after the kernel is booted. In
-  the event that the SCSI core itself was loaded as a module, this
-  value is the number of additional CD-ROMs that can be loaded after
-  the first host driver is loaded.
-
-  Admittedly this isn't pretty, but there are tons of race conditions
-  involved with resizing the internal arrays on the fly.  Someday this
-  flag will go away, and everything will work automatically.
-
-  If you don't understand what's going on, go with the default.
-
-CONFIG_BLK_DEV_SR_VENDOR
-  This enables the usage of vendor specific SCSI commands. This is
-  required to support multisession CDs with old NEC/TOSHIBA cdrom
-  drives (and HP Writers). If you have such a drive and get the first
-  session only, try saying Y here; everybody else says N.
-
-CONFIG_CHR_DEV_SG
-  If you want to use SCSI scanners, synthesizers or CD-writers or just
-  about anything having "SCSI" in its name other than hard disks,
-  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
-  directly, so you need some additional software which knows how to
-  talk to these devices using the SCSI protocol:
-
-  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
-  writer software look at Cdrtools
-  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
-  and for burning a "disk at once": CDRDAO
-  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
-  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
-  For other devices, it's possible that you'll have to write the
-  driver software yourself. Please read the file
-  <file:Documentation/scsi-generic.txt> for more information.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
-  say N.
-
-CONFIG_SCSI_MULTI_LUN
-  If you have a SCSI device that supports more than one LUN (Logical
-  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
-  can say Y here to force the SCSI driver to probe for multiple LUNs.
-  A SCSI device with multiple LUNs acts logically like multiple SCSI
-  devices. The vast majority of SCSI devices have only one LUN, and
-  so most people can say N here and should in fact do so, because it
-  is safer.
-
-CONFIG_SCSI_REPORT_LUNS
-  If you want to build with SCSI REPORT LUNS support in the kernel, say Y here.
-  The REPORT LUNS command is useful for devices (such as disk arrays) with
-  large numbers of LUNs where the LUN values are not contiguous (sparse LUN).
-  REPORT LUNS scanning is done only for SCSI-3 devices. Most users can safely
-  answer N here.
-
-CONFIG_SCSI_CONSTANTS
-  The error messages regarding your SCSI hardware will be easier to
-  understand if you say Y here; it will enlarge your kernel by about
-  12 KB. If in doubt, say Y.
-
-CONFIG_SCSI_LOGGING
-  This turns on a logging facility that can be used to debug a number
-  of SCSI related problems.
-
-  If you say Y here, no logging output will appear by default, but you
-  can enable logging by saying Y to "/proc file system support" and
-  "Sysctl support" below and executing the command
-
-     echo "scsi log token [level]" > /proc/scsi/scsi
-
-  at boot time after the /proc file system has been mounted.
-
-  There are a number of things that can be used for 'token' (you can
-  find them in the source: <file:drivers/scsi/scsi.c>), and this
-  allows you to select the types of information you want, and the
-  level allows you to select the level of verbosity.
-
-  If you say N here, it may be harder to track down some types of SCSI
-  problems. If you say Y here your kernel will be somewhat larger, but
-  there should be no noticeable performance impact as long as you have
-  logging turned off.
-
-CONFIG_SCSI_DECNCR
-  Say Y here to support the NCR53C94 SCSI controller chips on IOASIC
-  based TURBOchannel DECstations and TURBOchannel PMAZ-A cards.
-
-CONFIG_SCSI_ADVANSYS
-  This is a driver for all SCSI host adapters manufactured by
-  AdvanSys. It is documented in the kernel source in
-  <file:drivers/scsi/advansys.c>.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  advansys.o.
-
-CONFIG_SCSI_AHA152X
-  This is a driver for the AHA-1510, AHA-1520, AHA-1522, and AHA-2825
-  SCSI host adapters. It also works for the AVA-1505, but the IRQ etc.
-  must be manually specified in this case.
-
-  It is explained in section 3.3 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. You might also want to
-  read the file <file:drivers/scsi/README.aha152x>.
-
-  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 aha152x.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_AHA1542
-  This is support for a SCSI host adapter.  It is explained in section
-  3.4 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Note that Trantor was
-  purchased by Adaptec, and some former Trantor products are being
-  sold under the Adaptec name.  If it doesn't work out of the box, you
-  may have to change some settings in <file:drivers/scsi/aha1542.h>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called aha1542.o.
-
-CONFIG_SCSI_AHA1740
-  This is support for a SCSI host adapter.  It is explained in section
-  3.5 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
-  of the box, you may have to change some settings in
-  <file:drivers/scsi/aha1740.h>.
-
-  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 aha1740.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_DPT_I2O
-  This driver supports all of Adaptec's I2O based RAID controllers as 
-  well as the DPT SmartRaid V cards.  This is an Adaptec maintained
-  driver by Deanna Bonds.  See <file:drivers/scsi/README.dpti>.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  dpt_i2o.o.
-
-CONFIG_SCSI_AIC7XXX_OLD
-  WARNING This driver is an older aic7xxx driver and is no longer
-  under active development.  Adaptec, Inc. is writing a new driver to
-  take the place of this one, and it is recommended that whenever
-  possible, people should use the new Adaptec written driver instead
-  of this one.  This driver will eventually be phased out entirely.
-
-  This is support for the various aic7xxx based Adaptec SCSI
-  controllers. These include the 274x EISA cards; 284x VLB cards;
-  2902, 2910, 293x, 294x, 394x, 3985 and several other PCI and
-  motherboard based SCSI controllers from Adaptec. It does not support
-  the AAA-13x RAID controllers from Adaptec, nor will it likely ever
-  support them. It does not support the 2920 cards from Adaptec that
-  use the Future Domain SCSI controller chip. For those cards, you
-  need the "Future Domain 16xx SCSI support" driver.
-
-  In general, if the controller is based on an Adaptec SCSI controller
-  chip from the aic777x series or the aic78xx series, this driver
-  should work. The only exception is the 7810 which is specifically
-  not supported (that's the RAID controller chip on the AAA-13x
-  cards).
-
-  Note that the AHA2920 SCSI host adapter is *not* supported by this
-  driver; choose "Future Domain 16xx SCSI support" instead if you have
-  one of those.
-
-  Information on the configuration options for this controller can be
-  found by checking the help file for each of the available
-  configuration options. You should read
-  <file:drivers/scsi/aic7xxx_old/README.aic7xxx> at a minimum before
-  contacting the maintainer with any questions.  The SCSI-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>, can also
-  be of great help.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called aic7xxx_old.o.
-
-CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT
-  This option causes the aic7xxx driver to attempt to use Tagged
-  Command Queueing (TCQ) on all devices that claim to support it.
-
-  TCQ is a feature of SCSI-2 which improves performance: the host
-  adapter can send several SCSI commands to a device's queue even if
-  previous commands haven't finished yet.  Because the device is
-  intelligent, it can optimize its operations (like head positioning)
-  based on its own request queue.  Not all devices implement this
-  correctly.
-
-  If you say Y here, you can still turn off TCQ on troublesome devices
-  with the use of the tag_info boot parameter.  See the file
-  <file:drivers/scsi/README.aic7xxx> for more information on that and
-  other aic7xxx setup commands.  If this option is turned off, you may
-  still enable TCQ on known good devices by use of the tag_info boot
-  parameter.
-
-  If you are unsure about your devices then it is safest to say N
-  here.
-
-  However, TCQ can increase performance on some hard drives by as much
-  as 50% or more, so it is recommended that if you say N here, you
-  should at least read the <file:drivers/scsi/README.aic7xxx> file so
-  you will know how to enable this option manually should your drives
-  prove to be safe in regards to TCQ.
-
-  Conversely, certain drives are known to lock up or cause bus resets
-  when TCQ is enabled on them.  If you have a Western Digital
-  Enterprise SCSI drive for instance, then don't even bother to enable
-  TCQ on it as the drive will become unreliable, and it will actually
-  reduce performance.
-
-CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE
-  Specify the number of commands you would like to allocate per SCSI
-  device when Tagged Command Queueing (TCQ) is enabled on that device.
-
-  Reasonable figures are in the range of 8 to 24 commands per device,
-  but depending on hardware could be increased or decreased from that
-  figure. If the number is too high for any particular device, the
-  driver will automatically compensate usually after only 10 minutes
-  of uptime. It will not hinder performance if some of your devices
-  eventually have their command depth reduced, but is a waste of
-  memory if all of your devices end up reducing this number down to a
-  more reasonable figure.
-
-  NOTE: Certain very broken drives are known to lock up when given
-  more commands than they like to deal with. Quantum Fireball drives
-  are the most common in this category. For the Quantum Fireball
-  drives it is suggested to use no more than 8 commands per device.
-
-  Default: 8
-
-CONFIG_AIC7XXX_OLD_PROC_STATS
-  This option tells the driver to keep track of how many commands have
-  been sent to each particular device and report that information to
-  the user via the /proc/scsi/aic7xxx/n file, where n is the number of
-  the aic7xxx controller you want the information on. This adds a
-  small amount of overhead to each and every SCSI command the aic7xxx
-  driver handles, so if you aren't really interested in this
-  information, it is best to leave it disabled. This will only work if
-  you also say Y to "/proc file system support", below.
-
-  If unsure, say N.
-
-CONFIG_SCSI_IPS
-  This is support for the IBM ServeRAID hardware RAID controllers.
-  See <http://www.developer.ibm.com/welcome/netfinity/serveraid.html>
-  for more information.  If this driver does not work correctly
-  without modification please contact the author by email at
-  ipslinux@us.ibm.com.
-
-  You can build this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  but only a single instance may be loaded. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  The module will be called ips.o.
-
-CONFIG_SCSI_BUSLOGIC
-  This is support for BusLogic MultiMaster and FlashPoint SCSI Host
-  Adapters. Consult the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and the files
-  <file:drivers/scsi/README.BusLogic> and
-  <file:drivers/scsi/README.FlashPoint> 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.
-
-  You can also build this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  but only a single instance may be loaded. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-  The module will be called BusLogic.o.
-
-CONFIG_SCSI_OMIT_FLASHPOINT
-  This option allows you to omit the FlashPoint support from the
-  BusLogic SCSI driver. The FlashPoint SCCB Manager code is
-  substantial, so users of MultiMaster Host Adapters may wish to omit
-  it.
-
-CONFIG_SCSI_CPQFCTS
-  Say Y here to compile in support for the Compaq StorageWorks Fibre
-  Channel 64-bit/66Mhz Host Bus Adapter.
-
-CONFIG_SCSI_DMX3191D
-  This is support for Domex DMX3191D SCSI Host Adapters.
-
-  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 dmx3191d.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_DTC3280
-  This is support for DTC 3180/3280 SCSI Host Adapters.  Please read
-  the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, and the file
-  <file:drivers/scsi/README.dtc3x80>.
-
-  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 dtc.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_EATA_DMA
-  This is support for the EATA-DMA protocol compliant SCSI Host
-  Adapters like the SmartCache III/IV, SmartRAID controller families
-  and the DPT PM2011B and PM2012B controllers.
-
-  Note that this driver is obsolete; if you have one of the above
-  SCSI Host Adapters, you should normally say N here and Y to "EATA
-  ISA/EISA/PCI support", below.  Please read the SCSI-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 eata_dma.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_EATA_PIO
-  This driver supports all EATA-PIO protocol compliant SCSI Host
-  Adapters like the DPT PM2001 and the PM2012A.  EATA-DMA compliant
-  host adapters could also use this driver but are discouraged from
-  doing so, since this driver only supports hard disks and lacks
-  numerous features.  You might want to have a look at the SCSI-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called eata_pio.o.
-
-CONFIG_SCSI_U14_34F
-  This is support for the UltraStor 14F and 34F SCSI-2 host adapters.
-  The source at <file:drivers/scsi/u14-34f.c> contains some
-  information about this hardware.  If the driver doesn't work out of
-  the box, you may have to change some settings in
-  <file: drivers/scsi/u14-34f.c>.  Read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  Note that there is also
-  another driver for the same hardware: "UltraStor SCSI support",
-  below.  You should say Y to both only if you want 24F support as
-  well.
-
-  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 u14-34f.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_U14_34F_LINKED_COMMANDS
-  This option enables elevator sorting for all probed SCSI disks and
-  CD-ROMs. It definitely reduces the average seek distance when doing
-  random seeks, but this does not necessarily result in a noticeable
-  performance improvement: your mileage may vary...
-
-  The safe answer is N.
-
-CONFIG_SCSI_U14_34F_MAX_TAGS
-  This specifies how many SCSI commands can be maximally queued for
-  each probed SCSI device. You should reduce the default value of 8
-  only if you have disks with buggy or limited tagged command support.
-  Minimum is 2 and maximum is 14. This value is also the window size
-  used by the elevator sorting option above. The effective value used
-  by the driver for each probed SCSI device is reported at boot time.
-
-CONFIG_SCSI_FUTURE_DOMAIN
-  This is support for Future Domain's 16-bit SCSI host adapters
-  (TMC-1660/1680, TMC-1650/1670, TMC-3260, TMC-1610M/MER/MEX) and
-  other adapters based on the Future Domain chipsets (Quantum
-  ISA-200S, ISA-250MG; Adaptec AHA-2920A; and at least one IBM board).
-  It is explained in section 3.7 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  NOTE: Newer Adaptec AHA-2920C boards use the Adaptec AIC-7850 chip
-  and should use the aic7xxx driver ("Adaptec AIC7xxx chipset SCSI
-  controller support"). This Future Domain driver works with the older
-  Adaptec AHA-2920A boards with a Future Domain chip on them.
-
-  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 fdomain.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_FD_MCS
-  This is support for Future Domain MCS 600/700 MCA SCSI adapters.
-  Some PS/2 computers are equipped with IBM Fast SCSI Adapter/A which
-  is identical to the MCS 700 and hence also supported by this driver.
-  This driver also supports the Reply SB16/SCSI card (the SCSI part).
-  It supports multiple adapters in the same system.
-
-  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 fd_mcs.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_GENERIC_NCR5380
-  This is the generic NCR family of SCSI controllers, not to be
-  confused with the NCR 53c7 or 8xx controllers.  It is explained in
-  section 3.8 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
-  of the box, you may have to change some settings in
-  <file:drivers/scsi/g_NCR5380.h>.
-
-  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 g_NCR5380.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_GENERIC_NCR53C400
-  This enables certain optimizations for the NCR53c400 SCSI cards.
-  You might as well try it out.  Note that this driver will only probe
-  for the Trantor T130B in its default configuration; you might have
-  to pass a command line option to the kernel at boot time if it does
-  not detect your card.  See the file
-  <file:drivers/scsi/README.g_NCR5380> for details.
-
-CONFIG_SCSI_G_NCR5380_PORT
-  The NCR5380 and NCR53c400 SCSI controllers come in two varieties:
-  port or memory mapped. You should know what you have. The most
-  common card, Trantor T130B, uses port mapped mode.
-
-CONFIG_SCSI_NCR_D700
-  This is a driver for the MicroChannel Dual 700 card produced by
-  NCR and commonly used in 345x/35xx/4100 class machines.  It always
-  tries to negotiate sync and uses tag command queueing.
-
-  Unless you have an NCR manufactured machine, the chances are that
-  you do not have this SCSI card, so say N.
-
-CONFIG_SCSI_LASI700
-  This is a driver for the lasi baseboard in some parisc machines
-  which is based on the 53c700 chip.  Will also support LASI subsystems
-  based on the 710 chip using 700 emulation mode.
-
-  Unless you know you have a 53c700 or 53c710 based lasi, say N here
-
-CONFIG_SCSI_NCR53C7xx
-  This is a driver for the 53c7 and 8xx NCR family of SCSI
-  controllers, not to be confused with the NCR 5380 controllers.  It
-  is explained in section 3.8 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
-  of the box, you may have to change some settings in
-  <file:drivers/scsi/53c7,8xx.h>.  Please read
-  <file:drivers/scsi/README.ncr53c7xx> for the available boot time
-  command line options.
-
-  Note: there is another driver for the 53c8xx family of controllers
-  ("NCR53C8XX SCSI support" below).  If you want to use them both, you
-  need to say M to both and build them as modules, but only one may be
-  active at a time. If you have a 53c8xx board, it's better to use the
-  other driver.
-
-  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 53c7,8xx.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_NCR53C7xx_sync
-  In general, this is good; however, it is a bit dangerous since there
-  are some broken SCSI devices out there. Take your chances. Safe bet
-  is N.
-
-CONFIG_SCSI_NCR53C7xx_FAST
-  This will enable 10MHz FAST-SCSI transfers with your host
-  adapter. Some systems have problems with that speed, so it's safest
-  to say N here.
-
-CONFIG_SCSI_NCR53C7xx_DISCONNECT
-  This enables the disconnect/reconnect feature of the NCR SCSI
-  controller. When you say Y here, a slow SCSI device will not lock
-  the SCSI bus while processing a request, allowing simultaneous use
-  of e.g. a SCSI hard disk and SCSI tape or CD-ROM drive, and
-  providing much better performance when using slow and fast SCSI
-  devices at the same time. Some devices, however, do not operate
-  properly with this option enabled, and will cause your SCSI system
-  to hang, which might cause a system crash. The safe answer
-  therefore is to say N.
-
-CONFIG_SCSI_SYM53C8XX_2
-  This driver supports the whole NCR53C8XX/SYM53C8XX family of 
-  PCI-SCSI controllers. It also supports the subset of LSI53C10XX 
-  Ultra-160 controllers that are based on the SYM53C8XX SCRIPTS 
-  language. It does not support LSI53C10XX Ultra-320 PCI-X SCSI 
-  controllers.
-
-  If your system has problems using this new major version of the
-  SYM53C8XX driver, you may switch back to driver version 1.
-
-  Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
-  information.
-
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
-  This option only applies to PCI-SCSI chip that are PCI DAC capable 
-  (875A, 895A, 896, 1010-33, 1010-66, 1000).
-
-  When set to 0, only PCI 32 bit DMA addressing (SAC) will be performed.
-  When set to 1, 40 bit DMA addressing (with upper 24 bits of address 
-  set to zero) is supported. The addressable range is here 1 TB.
-  When set to 2, full 64 bits of address for DMA are supported, but only
-  16 segments of 4 GB can be addressed. The addressable range is so 
-  limited to 64 GB.
-
-  The safest value is 0 (32 bit DMA addressing) that is guessed to still 
-  fit most of real machines.
-
-  The preferred value 1 (40 bit DMA addressing) should make happy 
-  properly engineered PCI DAC capable host bridges. You may configure
-  this option for Intel platforms with more than 4 GB of memory.
-
-  The still experimental value 2 (64 bit DMA addressing with 16 x 4GB 
-  segments limitation) can be used on systems that require PCI address 
-  bits past bit 39 to be set for the addressing of memory using PCI 
-  DAC cycles.
-
-CONFIG_SCSI_SYM53C8XX_IOMAPPED
-  If you say Y here, the driver will preferently use normal IO rather than 
-  memory mapped IO.
-
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS
-  This option allows you to specify the maximum number of commands
-  that can be queued to any device, when tagged command queuing is
-  possible. The driver supports up to 256 queued commands per device.
-  This value is used as a compiled-in hard limit.
-
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS
-  This is the default value of the command queue depth the driver will 
-  announce to the generic SCSI layer for devices that support tagged 
-  command queueing. This value can be changed from the boot command line.
-  This is a soft limit that cannot exceed CONFIG_SCSI_SYM53C8XX_MAX_TAGS.
-
-CONFIG_SCSI_NCR53C8XX
-  This is the BSD ncr driver adapted to Linux for the NCR53C8XX family
-  of PCI-SCSI controllers.  This driver supports parity checking,
-  tagged command queuing and fast synchronous data transfers up to 80
-  MB/s with wide FAST-40 LVD devices and controllers.
-
-  Recent versions of the 53C8XX chips are better supported by the
-  option "SYM53C8XX SCSI support", below.
-
-  Note: there is yet another driver for the 53c8xx family of
-  controllers ("NCR53c7,8xx SCSI support" above).  If you want to use
-  them both, you need to say M to both and build them as modules, but
-  only one may be active at a time.  If you have a 53c8xx board, you
-  probably do not want to use the "NCR53c7,8xx SCSI support".
-
-  Please read <file:drivers/scsi/README.ncr53c8xx> for more
-  information.
-
-CONFIG_SCSI_SYM53C8XX
-  This driver supports all the features of recent 53C8XX chips (used
-  in PCI SCSI controllers), notably the hardware phase mismatch
-  feature of the SYM53C896.
-
-  Older versions of the 53C8XX chips are not supported by this
-  driver.  If your system uses either a 810 rev. < 16, a 815, or a 825
-  rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
-  driver ("NCR53C8XX SCSI support" above) or configure both the
-  NCR53C8XX and this SYM53C8XX drivers either as module or linked to
-  the kernel image.
-
-  When both drivers are linked into the kernel, the SYM53C8XX driver
-  is called first at initialization and you can use the 'excl=ioaddr'
-  driver boot option to exclude attachment of adapters by the
-  SYM53C8XX driver.  For example, entering
-  'sym53c8xx=excl:0xb400,excl=0xc000' at the lilo prompt prevents
-  adapters at io address 0xb400 and 0xc000 from being attached by the
-  SYM53C8XX driver, thus allowing the NCR53C8XX driver to attach them.
-  The 'excl' option is also supported by the NCR53C8XX driver.
-
-  Please read <file:drivers/scsi/README.ncr53c8xx> for more
-  information.
-
-CONFIG_SCSI_NCR53C8XX_SYNC
-  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
-  rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers
-  are respectively the maximum data transfer rates in mega-transfers
-  per second for each class.  For example, a FAST-20 Wide 16 device is
-  able to transfer data at 20 million 16 bit packets per second for a
-  total rate of 40 MB/s.
-
-  You may specify 0 if you want to only use asynchronous data
-  transfers. This is the safest and slowest option. Otherwise, specify
-  a value between 5 and 80, depending on the capability of your SCSI
-  controller.  The higher the number, the faster the data transfer.
-  Note that 80 should normally be ok since the driver decreases the
-  value automatically according to the controller's capabilities.
-
-  Your answer to this question is ignored for controllers with NVRAM,
-  since the driver will get this information from the user set-up.  It
-  also can be overridden using a boot setup option, as follows
-  (example): 'ncr53c8xx=sync:12' will allow the driver to negotiate
-  for FAST-20 synchronous data transfer (20 mega-transfers per
-  second).
-
-  The normal answer therefore is not to go with the default but to
-  select the maximum value 80 allowing the driver to use the maximum
-  value supported by each controller. If this causes problems with
-  your SCSI devices, you should come back and decrease the value.
-
-  There is no safe option other than using good cabling, right
-  terminations and SCSI conformant devices.
-
-CONFIG_SCSI_NCR53C8XX_IOMAPPED
-  If you say Y here, the driver will use normal IO, as opposed to
-  memory mapped IO. Memory mapped IO has less latency than normal IO
-  and works for most Intel-based hardware. Under Linux/Alpha only
-  normal IO is currently supported by the driver and so, this option
-  has no effect on those systems.
-
-  The normal answer therefore is N; try Y only if you encounter SCSI
-  related problems.
-
-CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
-  This option is only provided for safety if you suspect some SCSI
-  device of yours to not support properly the target-disconnect
-  feature. In that case, you would say Y here. In general however, to
-  not allow targets to disconnect is not reasonable if there is more
-  than 1 device on a SCSI bus. The normal answer therefore is N.
-
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS
-  "Tagged command queuing" is a feature of SCSI-2 which improves
-  performance: the host adapter can send several SCSI commands to a
-  device's queue even if previous commands haven't finished yet.
-  Because the device is intelligent, it can optimize its operations
-  (like head positioning) based on its own request queue. Some SCSI
-  devices don't implement this properly; if you want to disable this
-  feature, enter 0 or 1 here (it doesn't matter which).
-
-  The default value is 8 and should be supported by most hard disks.
-  This value can be overridden from the boot command line using the
-  'tags' option as follows (example):
-  'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to
-  4, set queue depth to 16 for target 2 and target 3 on controller 0
-  and set queue depth to 10 for target 0 / lun 2 on controller 1.
-
-  The normal answer therefore is to go with the default 8 and to use
-  a boot command line option for devices that need to use a different
-  command queue depth.
-
-  There is no safe option other than using good SCSI devices.
-
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS
-  This option allows you to specify the maximum number of commands
-  that can be queued to any device, when tagged command queuing is
-  possible. The default value is 32. Minimum is 2, maximum is 64.
-  Modern hard disks are able to support 64 tags and even more, but
-  do not seem to be faster when more than 32 tags are being used.
-
-  So, the normal answer here is to go with the default value 32 unless
-  you are using very large hard disks with large cache (>= 1 MB) that
-  are able to take advantage of more than 32 tagged commands.
-
-  There is no safe option and the default answer is recommended.
-
-CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
-  This option allows you to enable some features depending on GPIO
-  wiring. These General Purpose Input/Output pins can be used for
-  vendor specific features or implementation of the standard SYMBIOS
-  features. Genuine SYMBIOS controllers use GPIO0 in output for
-  controller LED and GPIO3 bit as a flag indicating
-  singled-ended/differential interface. The Tekram DC-390U/F boards
-  uses a different GPIO wiring.
-
-  Your answer to this question is ignored if all your controllers have
-  NVRAM, since the driver is able to detect the board type from the
-  NVRAM format.
-
-  If all the controllers in your system are genuine SYMBIOS boards or
-  use BIOS and drivers from SYMBIOS, you would want to say Y here,
-  otherwise N. N is the safe answer.
-
-CONFIG_SCSI_NCR53C8XX_PROFILE
-  This option allows you to enable profiling information gathering.
-  These statistics are not very accurate due to the low frequency
-  of the kernel clock (100 Hz on i386) and have performance impact
-  on systems that use very fast devices.
-
-  The normal answer therefore is N.
-
-CONFIG_SCSI_NCR53C8XX_PQS_PDS
-  Say Y here if you have a special SCSI adapter produced by NCR
-  corporation called a PCI Quad SCSI or PCI Dual SCSI. You do not need
-  this if you do not have one of these adapters. However, since this
-  device is detected as a specific PCI device, this option is quite
-  safe.
-
-  The common answer here is N, but answering Y is safe.
-
-CONFIG_SCSI_NSP32
-  This is support for the Workbit NinjaSCSI-32Bi/UDE PCI/Cardbus
-  SCSI host adapter. Please read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called nsp32.o.
-
-CONFIG_SCSI_IBMMCA
-  This is support for the IBM SCSI adapter found in many of the PS/2
-  series computers.  These machines have an MCA bus, so you need to
-  answer Y to "MCA support" as well and read
-  <file:Documentation/mca.txt>.
-
-  If the adapter isn't found during boot (a common problem for models
-  56, 57, 76, and 77) you'll need to use the 'ibmmcascsi=<pun>' kernel
-  option, where <pun> is the id of the SCSI subsystem (usually 7, but
-  if that doesn't work check your reference diskette).  Owners of
-  model 95 with a LED-matrix-display can in addition activate some
-  activity info like under OS/2, but more informative, by setting
-  'ibmmcascsi=display' as an additional kernel parameter.  Try "man
-  bootparam" or see the documentation of your boot loader about how to
-  pass options to the kernel.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ibmmca.o.
-
-CONFIG_IBMMCA_SCSI_ORDER_STANDARD
-  In the PC-world and in most modern SCSI-BIOS-setups, SCSI-hard disks
-  are assigned to the drive letters, starting with the lowest SCSI-id
-  (physical number -- pun) to be drive C:, as seen from DOS and
-  similar operating systems. When looking into papers describing the
-  ANSI-SCSI-standard, this assignment of drives appears to be wrong.
-  The SCSI-standard follows a hardware-hierarchy which says that id 7
-  has the highest priority and id 0 the lowest. Therefore, the host
-  adapters are still today everywhere placed as SCSI-id 7 by default.
-  In the SCSI-standard, the drive letters express the priority of the
-  disk. C: should be the hard disk, or a partition on it, with the
-  highest priority. This must therefore be the disk with the highest
-  SCSI-id (e.g. 6) and not the one with the lowest! IBM-BIOS kept the
-  original definition of the SCSI-standard as also industrial- and
-  process-control-machines, like VME-CPUs running under realtime-OSes
-  (e.g. LynxOS, OS9) do.
-
-  If you like to run Linux on your MCA-machine with the same
-  assignment of hard disks as seen from e.g. DOS or OS/2 on your
-  machine, which is in addition conformant to the SCSI-standard, you
-  must say Y here. This is also necessary for MCA-Linux users who want
-  to keep downward compatibility to older releases of the
-  IBM-MCA-SCSI-driver (older than driver-release 2.00 and older than
-  June 1997).
-
-  If you like to have the lowest SCSI-id assigned as drive C:, as
-  modern SCSI-BIOSes do, which does not conform to the standard, but
-  is widespread and common in the PC-world of today, you must say N
-  here. If unsure, say Y.
-
-CONFIG_IBMMCA_SCSI_DEV_RESET
-  By default, SCSI-devices are reset when the machine is powered on.
-  However, some devices exist, like special-control-devices,
-  SCSI-CNC-machines, SCSI-printer or scanners of older type, that do
-  not reset when switched on. If you say Y here, each device connected
-  to your SCSI-bus will be issued a reset-command after it has been
-  probed, while the kernel is booting. This may cause problems with
-  more modern devices, like hard disks, which do not appreciate these
-  reset commands, and can cause your system to hang. So say Y only if
-  you know that one of your older devices needs it; N is the safe
-  answer.
-
-CONFIG_SCSI_MCA_53C9X
-  Some MicroChannel machines, notably the NCR 35xx line, use a SCSI
-  controller based on the NCR 53C94.  This driver will allow use of
-  the controller on the 3550, and very possibly others.
-
-  If you want to compile this as a module (= code which can be
-  inserted and removed from the running kernel whenever you want), say
-  M here and read <file:Documentation/modules.txt>.  The module will
-  be called mca_53c9x.o.
-
-CONFIG_SCSI_IN2000
-  This is support for an ISA bus SCSI host adapter.  You'll find more
-  information in <file:drivers/scsi/README.in2000>. If it doesn't work
-  out of the box, you may have to change the jumpers for IRQ or
-  address selection.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called in2000.o.
-
-CONFIG_SCSI_INITIO
-  This is support for the Initio 91XXU(W) SCSI host adapter.  Please
-  read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called initio.o.
-
-CONFIG_SCSI_PAS16
-  This is support for a SCSI host adapter.  It is explained in section
-  3.10 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
-  of the box, you may have to change some settings in
-  <file:drivers/scsi/pas16.h>.
-
-  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 pas16.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_INIA100
-  This is support for the Initio INI-A100U2W SCSI host adapter.
-  Please read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called a100u2w.o.
-
-CONFIG_SCSI_PCI2000
-  This is support for the PCI2000I EIDE interface card which acts as a
-  SCSI host adapter.  Please read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver is also available as a module called pci2000.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_PCI2220I
-  This is support for the PCI2220i EIDE interface card which acts as a
-  SCSI host adapter.  Please read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver is also available as a module called pci2220i.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_PSI240I
-  This is support for the PSI240i EIDE interface card which acts as a
-  SCSI host adapter.  Please read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This driver is also available as a module called psi240i.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGIC_FAS
-  This is a driver for the ISA, VLB, and PCMCIA versions of the Qlogic
-  FastSCSI! cards as well as any other card based on the FASXX chip
-  (including the Control Concepts SCSI/IDE/SIO/PIO/FDC cards).
-
-  This driver does NOT support the PCI versions of these cards. The
-  PCI versions are supported by the Qlogic ISP driver ("Qlogic ISP
-  SCSI support"), below.
-
-  Information about this driver is contained in
-  <file:drivers/scsi/README.qlogicfas>.  You should also read the
-  SCSI-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 qlogicfas.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGIC_ISP
-  This driver works for all QLogic PCI SCSI host adapters (IQ-PCI,
-  IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card.  (This latter
-  card is supported by the "AM53/79C974 PCI SCSI" driver.)
-
-  If you say Y here, make sure to choose "BIOS" at the question "PCI
-  access mode".
-
-  Please read the file <file:drivers/scsi/README.qlogicisp>.  You
-  should also read the SCSI-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 qlogicisp.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGIC_FC
-  This is a driver for the QLogic ISP2100 SCSI-FCP host adapter.
-
-  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 qlogicfc.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_QLOGIC_1280
-  Say Y if you have a QLogic ISP1x80/1x160 SCSI host adapter.
-
-  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 qla1280.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_SEAGATE
-  These are 8-bit SCSI controllers; the ST-01 is also supported by
-  this driver.  It is explained in section 3.9 of the SCSI-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.  If it
-  doesn't work out of the box, you may have to change some settings in
-  <file:drivers/scsi/seagate.h>.
-
-  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 seagate.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_T128
-  This is support for a SCSI host adapter. It is explained in section
-  3.11 of the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
-  of the box, you may have to change some settings in
-  <file:drivers/scsi/t128.h>.  Note that Trantor was purchased by
-  Adaptec, and some former Trantor products are being sold under the
-  Adaptec name.
-
-  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 t128.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_ULTRASTOR
-  This is support for the UltraStor 14F, 24F and 34F SCSI-2 host
-  adapter family.  This driver is explained in section 3.12 of the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
-  of the box, you may have to change some settings in
-  <file:drivers/scsi/ultrastor.h>.
-
-  Note that there is also another driver for the same hardware:
-  "UltraStor 14F/34F support", above.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ultrastor.o.
-
-CONFIG_SCSI_7000FASST
-  This driver supports the Western Digital 7000 SCSI host adapter
-  family.  Some information is in the source:
-  <file:drivers/scsi/wd7000.c>.
-
-  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 wd7000.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_ACARD
-  This driver supports the ACARD 870U/W SCSI host adapter.
-
-  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 atp870u.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_EATA
-  This driver supports all EATA/DMA-compliant SCSI host adapters.  DPT
-  ISA and all EISA I/O addresses are probed looking for the "EATA"
-  signature.  If you chose "BIOS" at the question "PCI access mode",
-  the addresses of all the PCI SCSI controllers reported by the PCI
-  subsystem are probed as well.
-
-  You want to read the start of <file:drivers/scsi/eata.c> and the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that there is also another driver for the same hardware
-  available: "EATA-DMA [Obsolete] (DPT, NEC, AT&T, SNI, AST, Olivetti,
-  Alphatronix) support". You should say Y to only one of them.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called eata.o.
-
-CONFIG_SCSI_EATA_TAGGED_QUEUE
-  This is a feature of SCSI-2 which improves performance: the host
-  adapter can send several SCSI commands to a device's queue even if
-  previous commands haven't finished yet. Most EATA adapters negotiate
-  this feature automatically with the device, even if your answer is
-  N. The safe answer is N.
-
-CONFIG_SCSI_EATA_LINKED_COMMANDS
-  This option enables elevator sorting for all probed SCSI disks and
-  CD-ROMs. It definitely reduces the average seek distance when doing
-  random seeks, but this does not necessarily result in a noticeable
-  performance improvement: your mileage may vary...
-  The safe answer is N.
-
-CONFIG_SCSI_EATA_MAX_TAGS
-  This specifies how many SCSI commands can be maximally queued for
-  each probed SCSI device. You should reduce the default value of 16
-  only if you have disks with buggy or limited tagged command support.
-  Minimum is 2 and maximum is 62. This value is also the window size
-  used by the elevator sorting option above. The effective value used
-  by the driver for each probed SCSI device is reported at boot time.
-
-CONFIG_SCSI_NCR53C406A
-  This is support for the NCR53c406a SCSI host adapter.  For user
-  configurable parameters, check out <file:drivers/scsi/NCR53c406a.c>
-  in the kernel source.  Also read the SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called NCR53c406.o.
-
-CONFIG_SCSI_SYM53C416
-  This is support for the sym53c416 SCSI host adapter, the SCSI
-  adapter that comes with some HP scanners. This driver requires that
-  the sym53c416 is configured first using some sort of PnP
-  configuration program (e.g. isapnp) or by a PnP aware BIOS. If you
-  are using isapnp then you need to compile this driver as a module
-  and then load it using insmod after isapnp has run. The parameters
-  of the configured card(s) should be passed to the driver. The format
-  is:
-
-    insmod sym53c416 sym53c416=<base>,<irq> [sym53c416_1=<base>,<irq>]
-
-  There is support for up to four adapters. If you want to compile
-  this driver as a module ( = code which can be inserted in and
-  removed from the running kernel whenever you want), say M here and
-  read <file:Documentation/modules.txt>. The module will be called
-  sym53c416.o.
-
-CONFIG_SCSI_SIM710
-  This is a simple driver for NCR53c710 based SCSI host adapters.
-
-  More complex drivers for this chip are available ("NCR53c7,8xx SCSI
-  support", above), but they require that the scsi chip be able to do
-  DMA block moves between memory and on-chip registers, which can
-  cause problems under certain conditions.  This driver is designed to
-  avoid these problems and is intended to work with any Intel machines
-  using 53c710 chips, including various Compaq and NCR machines.
-
-  Please read the comments at the top of the file
-  <file:drivers/scsi/sim710.c> for more information.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called sim710.o.
-
-CONFIG_SCSI_DC390T
-  This driver supports PCI SCSI host adapters based on the Am53C974A
-  chip, e.g. Tekram DC390(T), DawiControl 2974 and some onboard
-  PCscsi/PCnet (Am53/79C974) solutions.
-
-  Documentation can be found in <file:drivers/scsi/README.tmscsim>.
-
-  Note that this driver does NOT support Tekram DC390W/U/F, which are
-  based on NCR/Symbios chips. Use "NCR53C8XX SCSI support" for those.
-  Also note that there is another generic Am53C974 driver,
-  "AM53/79C974 PCI SCSI support" below.  You can pick either one.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called tmscsim.o.
-
-CONFIG_SCSI_DC390T_NOGENSUPP
-  If you say N here, the DC390(T) SCSI driver relies on the DC390
-  EEPROM to get initial values for its settings, such as speed,
-  termination, etc.  If it can't find this EEPROM, it will use
-  defaults or the user supplied boot/module parameters.  For details
-  on driver configuration see <file:drivers/scsi/README.tmscsim>.
-
-  If you say Y here and if no EEPROM is found, the driver gives up and
-  thus only supports Tekram DC390(T) adapters.  This can be useful if
-  you have a DC390(T) and another Am53C974 based adapter, which, for
-  some reason, you want to drive with the other AM53C974 driver.
-
-  If unsure, say N.
-
-CONFIG_SCSI_AM53C974
-  This is support for the AM53/79C974 SCSI host adapters.  Please read
-  <file:drivers/scsi/README.AM53C974> for details.  Also, the
-  SCSI-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, is for you.
-
-  Note that there is another driver for AM53C974 based adapters:
-  "Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support", above.  You
-  can pick either one.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called AM53C974.o.
-
-CONFIG_SCSI_MEGARAID
-  This driver supports the AMI MegaRAID 418, 428, 438, 466, 762, 490
-  and 467 SCSI host adapters.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called megaraid.o.
-
-CONFIG_SCSI_GDTH
-  Formerly called GDT SCSI Disk Array Controller Support.
- 
-  This is a driver for RAID/SCSI Disk Array Controllers (EISA/ISA/PCI) 
-  manufactured by Intel/ICP vortex (an Intel Company). It is documented
-  in the kernel source in <file:drivers/scsi/gdth.c> and
-  <file:drivers/scsi/gdth.h.>
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_PPA
-  This driver supports older versions of IOMEGA's parallel port ZIP
-  drive (a 100 MB removable media device).
-
-  Note that you can say N here if you have the SCSI version of the ZIP
-  drive: it will be supported automatically if you said Y to the
-  generic "SCSI disk support", above.
-
-  If you have the ZIP Plus drive or a more recent parallel port ZIP
-  drive (if the supplied cable with the drive is labeled "AutoDetect")
-  then you should say N here and Y to "IOMEGA parallel port (imm -
-  newer drives)", below.
-
-  For more information about this driver and how to use it you should
-  read the file <file:drivers/scsi/README.ppa>.  You should also read
-  the SCSI-HOWTO, which is available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If you use this driver,
-  you will still be able to use the parallel port for other tasks,
-  such as a printer; it is safe to compile both drivers into the
-  kernel.
-
-  This driver is also available as a module which can be inserted in
-  and removed from the running kernel whenever you want.  To compile
-  this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called ppa.o.
-
-CONFIG_SCSI_IMM
-  This driver supports newer versions of IOMEGA's parallel port ZIP
-  drive (a 100 MB removable media device).
-
-  Note that you can say N here if you have the SCSI version of the ZIP
-  drive: it will be supported automatically if you said Y to the
-  generic "SCSI disk support", above.
-
-  If you have the ZIP Plus drive or a more recent parallel port ZIP
-  drive (if the supplied cable with the drive is labeled "AutoDetect")
-  then you should say Y here; if you have an older ZIP drive, say N
-  here and Y to "IOMEGA Parallel Port (ppa - older drives)", above.
-
-  For more information about this driver and how to use it you should
-  read the file <file:drivers/scsi/README.ppa>.  You should also read
-  the SCSI-HOWTO, which is available from
-  <http://www.linuxdoc.org/docs.html#howto>.  If you use this driver,
-  you will still be able to use the parallel port for other tasks,
-  such as a printer; it is safe to compile both drivers into the
-  kernel.
-
-  This driver is also available as a module which can be inserted in
-  and removed from the running kernel whenever you want.  To compile
-  this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called imm.o.
-
-CONFIG_SCSI_IZIP_EPP16
-  EPP (Enhanced Parallel Port) is a standard for parallel ports which
-  allows them to act as expansion buses that can handle up to 64
-  peripheral devices.
-
-  Some parallel port chipsets are slower than their motherboard, and
-  so we have to control the state of the chipset's FIFO queue every
-  now and then to avoid data loss. This will be done if you say Y
-  here.
-
-  Generally, saying Y is the safe option and slows things down a bit.
-
-CONFIG_SCSI_IZIP_SLOW_CTR
-  Some parallel ports are known to have excessive delays between
-  changing the parallel port control register and good data being
-  available on the parallel port data/status register. This option
-  forces a small delay (1.0 usec to be exact) after changing the
-  control register to let things settle out. Enabling this option may
-  result in a big drop in performance but some very old parallel ports
-  (found in 386 vintage machines) will not work properly.
-
-  Generally, saying N is fine.
-
-CONFIG_SCSI_DEBUG
-  This is a host adapter simulator that can be programmed to simulate
-  a large number of conditions that could occur on a real bus. The
-  advantage is that many hard to reproduce problems can be tested in a
-  controlled environment where there is reduced risk of losing
-  important data. This is primarily of use to people trying to debug
-  the middle and upper layers of the SCSI subsystem. If unsure, say N.
-
-CONFIG_A4000T_SCSI
-  Support for the NCR53C710 SCSI controller on the Amiga 4000T.
-
-CONFIG_A4091_SCSI
-  Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller
-  (1993).  Very obscure -- the 4091 was part of an Amiga 4000 upgrade
-  plan at the time the Amiga business was sold to DKB.
-
-CONFIG_A3000_SCSI
-  If you have an Amiga 3000 and have SCSI devices connected to the
-  built-in SCSI controller, say Y. Otherwise, say N. 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 is
-  called wd33c93.o. If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.
-
-CONFIG_A2091_SCSI
-  If you have a Commodore A2091 SCSI controller, say Y. Otherwise,
-  say N. 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 is called wd33c93.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_GVP11_SCSI
-  If you have a Great Valley Products Series II SCSI controller,
-  answer Y. Also say Y if you have a later model of GVP SCSI
-  controller (such as the GVP A4008 or a Combo board). Otherwise,
-  answer N. This driver does NOT work for the T-Rex series of
-  accelerators from TekMagic and GVP-M.
-
-  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 gvp11.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_CYBERSTORM_SCSI
-  If you have an Amiga with an original (MkI) Phase5 Cyberstorm
-  accelerator board and the optional Cyberstorm SCSI controller,
-  answer Y. Otherwise, say N.
-
-CONFIG_CYBERSTORMII_SCSI
-  If you have an Amiga with a Phase5 Cyberstorm MkII accelerator board
-  and the optional Cyberstorm SCSI controller, say Y. Otherwise,
-  answer N.
-
-CONFIG_BLZ2060_SCSI
-  If you have an Amiga with a Phase5 Blizzard 2060 accelerator board
-  and want to use the onboard SCSI controller, say Y. Otherwise,
-  answer N.
-
-CONFIG_BLZ1230_SCSI
-  If you have an Amiga 1200 with a Phase5 Blizzard 1230IV or Blizzard
-  1260 accelerator, and the optional SCSI module, say Y. Otherwise,
-  say N.
-
-CONFIG_BLZ603EPLUS_SCSI
-  If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+
-  accelerator, say Y. Otherwise, say N.
-
-CONFIG_FASTLANE_SCSI
-  If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
-  one in the near future, say Y to this question. Otherwise, say N.
-
-CONFIG_OKTAGON_SCSI
-  If you have the BSC Oktagon SCSI disk controller for the Amiga, say
-  Y to this question.  If you're in doubt about whether you have one,
-  see the picture at
-  <http://amiga.multigraph.com/photos/oktagon.html>.
-
-CONFIG_SCSI_MESH
-  Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
-  SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the
-  other Power Macintoshes do). Say Y to include support for this SCSI
-  adaptor. This driver is also available as a module called mesh.o
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want). If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SCSI_MESH_SYNC_RATE
-  On Power Macintoshes (and clones) where the MESH SCSI bus adaptor
-  drives a bus which is entirely internal to the machine (such as the
-  7500, 7600, 8500, etc.), the MESH is capable of synchronous
-  operation at up to 10 MB/s. On machines where the SCSI bus
-  controlled by the MESH can have external devices connected, it is
-  usually rated at 5 MB/s. 5 is a safe value here unless you know the
-  MESH SCSI bus is internal only; in that case you can say 10. Say 0
-  to disable synchronous operation.
-
-CONFIG_SCSI_MAC53C94
-  On Power Macintoshes (and clones) with two SCSI buses, the external
-  SCSI bus is usually controlled by a 53C94 SCSI bus adaptor. Older
-  machines which only have one SCSI bus, such as the 7200, also use
-  the 53C94. Say Y to include support for the 53C94.
-
-  This driver is also available as a module called mac53c94.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/scsi/Config.in b/drivers/scsi/Config.in
--- a/drivers/scsi/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,267 +0,0 @@
-comment 'SCSI support type (disk, tape, CD-ROM)'
-
-dep_tristate '  SCSI disk support' CONFIG_BLK_DEV_SD $CONFIG_SCSI
-
-if [ "$CONFIG_BLK_DEV_SD" != "n" ]; then
-   int  'Maximum number of SCSI disks that can be loaded as modules' CONFIG_SD_EXTRA_DEVS 40
-fi
-
-dep_tristate '  SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
-
-dep_tristate '  SCSI OnStream SC-x0 tape support' CONFIG_CHR_DEV_OSST $CONFIG_SCSI
-
-dep_tristate '  SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
-
-if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-   bool '    Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
-   int  'Maximum number of CDROM devices that can be loaded as modules' CONFIG_SR_EXTRA_DEVS 2
-fi
-dep_tristate '  SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
-
-comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
-
-bool '  Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
-bool '  Build with SCSI REPORT LUNS support' CONFIG_SCSI_REPORT_LUNS
-  
-bool '  Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
-bool '  SCSI logging facility' CONFIG_SCSI_LOGGING
-
-mainmenu_option next_comment
-comment 'SCSI low-level drivers'
-
-if [ "$CONFIG_SGI_IP22" = "y" ]; then
-   dep_tristate 'SGI WD93C93 SCSI Driver' CONFIG_SGIWD93_SCSI $CONFIG_SCSI
-fi
-if [ "$CONFIG_DECSTATION" = "y" ]; then
-   if [ "$CONFIG_TC" = "y" ]; then
-      dep_tristate 'DEC NCR53C94 Scsi Driver' CONFIG_SCSI_DECNCR $CONFIG_SCSI
-   fi
-   dep_tristate 'DEC SII Scsi Driver' CONFIG_SCSI_DECSII $CONFIG_SCSI
-fi
-
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate '3ware Hardware ATA-RAID support' CONFIG_BLK_DEV_3W_XXXX_RAID $CONFIG_SCSI
-fi
-dep_tristate '7000FASST SCSI support' CONFIG_SCSI_7000FASST $CONFIG_SCSI $CONFIG_ISA
-dep_tristate 'ACARD SCSI support' CONFIG_SCSI_ACARD $CONFIG_SCSI
-if [ "$CONFIG_ISA" = "y" ]; then
-   dep_tristate 'Adaptec AHA152X/2825 support' CONFIG_SCSI_AHA152X $CONFIG_SCSI
-   dep_tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 $CONFIG_SCSI
-fi
-if [ "$CONFIG_EISA" = "y" ]; then
-  dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 $CONFIG_SCSI
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   dep_tristate 'Adaptec AACRAID support (EXPERIMENTAL)' CONFIG_SCSI_AACRAID $CONFIG_SCSI $CONFIG_PCI
-fi
-source drivers/scsi/aic7xxx/Config.in
-if [ "$CONFIG_SCSI_AIC7XXX" != "y" ]; then
-   dep_tristate 'Old Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX_OLD $CONFIG_SCSI
-fi
-# All the I2O code and drivers do not seem to be 64bit safe.
-if [ "$CONFIG_X86_64" != "y" ]; then
-  dep_tristate 'Adaptec I2O RAID support ' CONFIG_SCSI_DPT_I2O $CONFIG_SCSI
-fi
-dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
-dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI
-# does not use pci dma and seems to be isa/onboard only for old machines
-if [ "$CONFIG_X86_64" != "y" ]; then
-  dep_tristate 'AM53/79C974 PCI SCSI support' CONFIG_SCSI_AM53C974 $CONFIG_SCSI $CONFIG_PCI
-fi
-dep_tristate 'AMI MegaRAID support' CONFIG_SCSI_MEGARAID $CONFIG_SCSI
-
-dep_tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC $CONFIG_SCSI
-if [ "$CONFIG_SCSI_BUSLOGIC" != "n" ]; then
-   bool '  Omit FlashPoint support' CONFIG_SCSI_OMIT_FLASHPOINT
-fi
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate 'Compaq Fibre Channel 64-bit/66Mhz HBA support' CONFIG_SCSI_CPQFCTS $CONFIG_SCSI
-fi
-dep_tristate 'DMX3191D SCSI support' CONFIG_SCSI_DMX3191D $CONFIG_SCSI $CONFIG_PCI
-dep_tristate 'DTC3180/3280 SCSI support' CONFIG_SCSI_DTC3280 $CONFIG_SCSI $CONFIG_ISA
-dep_tristate 'EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support' CONFIG_SCSI_EATA $CONFIG_SCSI
-if [ "$CONFIG_SCSI_EATA" != "n" ]; then
-   bool '  enable tagged command queueing' CONFIG_SCSI_EATA_TAGGED_QUEUE
-   bool '  enable elevator sorting' CONFIG_SCSI_EATA_LINKED_COMMANDS
-   int  '  maximum number of queued commands' CONFIG_SCSI_EATA_MAX_TAGS 16
-fi
-dep_tristate 'EATA-DMA [Obsolete] (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support' CONFIG_SCSI_EATA_DMA $CONFIG_SCSI
-dep_tristate 'EATA-PIO (old DPT PM2001, PM2012A) support' CONFIG_SCSI_EATA_PIO $CONFIG_SCSI
-dep_tristate 'Future Domain 16xx SCSI/AHA-2920A support' CONFIG_SCSI_FUTURE_DOMAIN $CONFIG_SCSI
-if [ "$CONFIG_MCA" = "y" ]; then
-   dep_tristate 'Future Domain MCS-600/700 SCSI support' CONFIG_SCSI_FD_MCS $CONFIG_SCSI
-fi
-dep_tristate 'Intel/ICP (former GDT SCSI Disk Array) RAID Controller support' CONFIG_SCSI_GDTH $CONFIG_SCSI
-dep_tristate 'Generic NCR5380/53c400 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 $CONFIG_SCSI
-if [ "$CONFIG_SCSI_GENERIC_NCR5380" != "n" ]; then
-   bool '  Enable NCR53c400 extensions' CONFIG_SCSI_GENERIC_NCR53C400
-   choice 'NCR5380/53c400 mapping method (use Port for T130B)' \
-		"Port CONFIG_SCSI_G_NCR5380_PORT \
-		 Memory CONFIG_SCSI_G_NCR5380_MEM" Port
-fi
-if [ "$CONFIG_MCA" = "y" ]; then
-   dep_tristate 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_IBMMCA" != "n" ]; then
-      bool '  Standard SCSI-order' CONFIG_IBMMCA_SCSI_ORDER_STANDARD
-      bool '  Reset SCSI-devices at boottime' CONFIG_IBMMCA_SCSI_DEV_RESET
-   fi
-fi
-if [ "$CONFIG_X86" = "y" ]; then
-   dep_tristate 'IBM ServeRAID support' CONFIG_SCSI_IPS $CONFIG_SCSI $CONFIG_PCI
-fi
-dep_tristate 'Initio 9100U(W) support' CONFIG_SCSI_INITIO $CONFIG_SCSI $CONFIG_PCI
-dep_tristate 'Initio INI-A100U2W support' CONFIG_SCSI_INIA100 $CONFIG_SCSI $CONFIG_PCI
-if [ "$CONFIG_PARPORT" != "n" ]; then
-   dep_tristate 'IOMEGA parallel port (ppa - older drives)' CONFIG_SCSI_PPA $CONFIG_SCSI $CONFIG_PARPORT
-   dep_tristate 'IOMEGA parallel port (imm - newer drives)' CONFIG_SCSI_IMM $CONFIG_SCSI $CONFIG_PARPORT
-   if [ "$CONFIG_SCSI_PPA" != "n" -o "$CONFIG_SCSI_IMM" != "n" ]; then
-      bool  '  ppa/imm option - Use slow (but safe) EPP-16' CONFIG_SCSI_IZIP_EPP16
-      bool  '  ppa/imm option - Assume slow parport control register' CONFIG_SCSI_IZIP_SLOW_CTR
-   fi
-fi
-dep_tristate 'NCR53c406a SCSI support' CONFIG_SCSI_NCR53C406A $CONFIG_SCSI $CONFIG_ISA
-if [ "$CONFIG_MCA" = "y" ]; then
-   dep_tristate 'NCR Dual 700 MCA SCSI support' CONFIG_SCSI_NCR_D700 $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_NCR_D700" != "n" ]; then
-      define_bool CONFIG_53C700_IO_MAPPED y
-   fi
-fi
-if [ "$CONFIG_PARISC" = "y" ]; then
-   dep_tristate 'HP LASI SCSI support for 53c700/710' CONFIG_SCSI_LASI700 $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_LASI700" != "n" ]; then
-      define_bool CONFIG_53C700_MEM_MAPPED y
-      define_bool CONFIG_53C700_LE_ON_BE y
-      define_bool CONFIG_53C700_USE_CONSISTENT y
-   fi
-fi
-dep_tristate 'NCR53c7,8xx SCSI support'  CONFIG_SCSI_NCR53C7xx $CONFIG_SCSI $CONFIG_PCI
-if [ "$CONFIG_SCSI_NCR53C7xx" != "n" ]; then
-   bool '  always negotiate synchronous transfers' CONFIG_SCSI_NCR53C7xx_sync
-   bool '  allow FAST-SCSI [10MHz]' CONFIG_SCSI_NCR53C7xx_FAST
-   bool '  allow DISCONNECT' CONFIG_SCSI_NCR53C7xx_DISCONNECT
-fi
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate 'SYM53C8XX Version 2 SCSI support' CONFIG_SCSI_SYM53C8XX_2 $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_SYM53C8XX_2" != "n" ]; then
-      int  '  DMA addressing mode' CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE 1
-      int  '  default tagged command queue depth' CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS 16
-      int  '  maximum number of queued commands' CONFIG_SCSI_SYM53C8XX_MAX_TAGS 64
-      bool '  use normal IO' CONFIG_SCSI_SYM53C8XX_IOMAPPED
-   fi
-fi
-if [ "$CONFIG_PCI" = "y" -a "$CONFIG_SCSI_SYM53C8XX_2" != "y" ]; then
-   dep_tristate 'NCR53C8XX SCSI support' CONFIG_SCSI_NCR53C8XX $CONFIG_SCSI
-   dep_tristate 'SYM53C8XX SCSI support' CONFIG_SCSI_SYM53C8XX $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_NCR53C8XX" != "n" -o "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
-      int  '  default tagged command queue depth' CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS 8
-      int  '  maximum number of queued commands' CONFIG_SCSI_NCR53C8XX_MAX_TAGS 32
-      int  '  synchronous transfers frequency in MHz' CONFIG_SCSI_NCR53C8XX_SYNC 20
-      bool '  enable profiling' CONFIG_SCSI_NCR53C8XX_PROFILE
-      bool '  use normal IO' CONFIG_SCSI_NCR53C8XX_IOMAPPED
-      if [ "$CONFIG_SCSI_SYM53C8XX" != "n" ]; then
-	 bool '  include support for the NCR PQS/PDS SCSI card' CONFIG_SCSI_NCR53C8XX_PQS_PDS
-      fi
-      if [ "$CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS" = "0" ]; then
-	 bool '  not allow targets to disconnect' CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT
-      fi
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	 bool '  assume boards are SYMBIOS compatible (EXPERIMENTAL)' CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
-      fi
-   fi
-fi
-if [ "$CONFIG_MCA" = "y" ]; then
-   dep_tristate 'NCR MCA 53C9x SCSI support' CONFIG_SCSI_MCA_53C9X $CONFIG_SCSI
-fi
-dep_tristate 'PAS16 SCSI support' CONFIG_SCSI_PAS16 $CONFIG_SCSI $CONFIG_ISA
-dep_tristate 'PCI2000 support' CONFIG_SCSI_PCI2000 $CONFIG_SCSI
-dep_tristate 'PCI2220i support' CONFIG_SCSI_PCI2220I $CONFIG_SCSI
-dep_tristate 'PSI240i support' CONFIG_SCSI_PSI240I $CONFIG_SCSI $CONFIG_ISA
-dep_tristate 'Qlogic FAS SCSI support' CONFIG_SCSI_QLOGIC_FAS $CONFIG_SCSI $CONFIG_ISA
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate 'Qlogic ISP SCSI support' CONFIG_SCSI_QLOGIC_ISP $CONFIG_SCSI
-   dep_tristate 'Qlogic ISP FC SCSI support' CONFIG_SCSI_QLOGIC_FC $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_QLOGIC_FC" != "n" ]; then
-      bool '   Include loadable firmware in driver' CONFIG_SCSI_QLOGIC_FC_FIRMWARE
-   fi
-   dep_tristate 'Qlogic QLA 1280 SCSI support' CONFIG_SCSI_QLOGIC_1280 $CONFIG_SCSI
-fi
-if [ "$CONFIG_X86" = "y" -a "$CONFIG_ISA" = "y" ]; then
-   dep_tristate 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE $CONFIG_SCSI
-fi
-# definitely looks note 64bit safe:
-if [ "$CONFIG_ISA" = "y" -o "$CONFIG_MCA" = "y" -a "$CONFIG_X86_64" != "y" ]; then
-  dep_tristate 'Simple 53c710 SCSI support (Compaq, NCR machines)' CONFIG_SCSI_SIM710 $CONFIG_SCSI
-fi
-dep_tristate 'Symbios 53c416 SCSI support' CONFIG_SCSI_SYM53C416 $CONFIG_SCSI $CONFIG_ISA
-if [ "$CONFIG_PCI" = "y" ]; then
-   dep_tristate 'Tekram DC390(T) and Am53/79C974 SCSI support' CONFIG_SCSI_DC390T $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_DC390T" != "n" ]; then
-      bool '  _omit_ support for non-DC390 adapters' CONFIG_SCSI_DC390T_NOGENSUPP
-   fi
-fi
-dep_tristate 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 $CONFIG_SCSI $CONFIG_ISA
-dep_tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F $CONFIG_SCSI
-if [ "$CONFIG_SCSI_U14_34F" != "n" ]; then
-      bool '  enable elevator sorting' CONFIG_SCSI_U14_34F_LINKED_COMMANDS
-      int  '  maximum number of queued commands' CONFIG_SCSI_U14_34F_MAX_TAGS 8
-fi
-if [ "$CONFIG_X86" = "y" -a "$CONFIG_ISA" = "y" ]; then
-   dep_tristate 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR $CONFIG_SCSI
-fi
-dep_tristate 'Workbit NinjaSCSI-32Bi/UDE support' CONFIG_SCSI_NSP32 $CONFIG_SCSI
-#
-# Note - this is a very special 'host' adapter that simulates the presence of some disks.
-# It can come in very handy for troubleshooting.  Anyone else is welcome to use it - all
-# you do is hack it to simulate the condition you want to test for, and then use it.
-#
-# The actual configuration in any kernel release could change at any time as I hack it to
-# simulate various conditions that I am testing.
-#
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   dep_tristate 'SCSI debugging host simulator (EXPERIMENTAL)' CONFIG_SCSI_DEBUG $CONFIG_SCSI
-fi
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   dep_tristate 'MESH (Power Mac internal SCSI) support' CONFIG_SCSI_MESH $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_MESH" != "n" ]; then
-      int '  maximum synchronous transfer rate (MB/s) (0 = async)' CONFIG_SCSI_MESH_SYNC_RATE 5
-      int '  initial bus reset delay (ms) (0 = no reset)' CONFIG_SCSI_MESH_RESET_DELAY_MS 4000
-   fi
-   dep_tristate '53C94 (Power Mac external SCSI) support' CONFIG_SCSI_MAC53C94 $CONFIG_SCSI
-fi
-if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-   source drivers/acorn/scsi/Config.in
-fi
-if [ "$CONFIG_MIPS_JAZZ" = "y" ]; then
-   bool 'MIPS JAZZ FAS216 SCSI support' CONFIG_JAZZ_ESP
-fi
-
-if [ "$CONFIG_AMIGA" = "y" ]; then
-   dep_tristate 'A3000 WD33C93A support' CONFIG_A3000_SCSI $CONFIG_SCSI
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      bool 'A4000T SCSI support (EXPERIMENTAL)' CONFIG_A4000T_SCSI
-   fi
-fi
-if [ "$CONFIG_ZORRO" = "y" ]; then
-   dep_tristate 'A2091/A590 WD33C93A support' CONFIG_A2091_SCSI $CONFIG_SCSI
-   dep_tristate 'GVP Series II WD33C93A support' CONFIG_GVP11_SCSI $CONFIG_SCSI
-   dep_tristate 'CyberStorm SCSI support' CONFIG_CYBERSTORM_SCSI $CONFIG_SCSI
-   dep_tristate 'CyberStorm Mk II SCSI support' CONFIG_CYBERSTORMII_SCSI $CONFIG_SCSI
-   dep_tristate 'Blizzard 2060 SCSI support' CONFIG_BLZ2060_SCSI $CONFIG_SCSI
-   dep_tristate 'Blizzard 1230IV/1260 SCSI support' CONFIG_BLZ1230_SCSI $CONFIG_SCSI
-   dep_tristate 'Fastlane SCSI support' CONFIG_FASTLANE_SCSI $CONFIG_SCSI
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      bool 'A4091 SCSI support (EXPERIMENTAL)' CONFIG_A4091_SCSI
-      bool 'WarpEngine SCSI support (EXPERIMENTAL)' CONFIG_WARPENGINE_SCSI
-      bool 'Blizzard PowerUP 603e+ SCSI (EXPERIMENTAL)' CONFIG_BLZ603EPLUS_SCSI
-      dep_tristate 'BSC Oktagon SCSI support (EXPERIMENTAL)' CONFIG_OKTAGON_SCSI $CONFIG_SCSI
-#      bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI
-#      bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI
-   fi
-fi
-
-endmenu
-
-if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
-   source drivers/scsi/pcmcia/Config.in
-fi
-
diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1754 @@
+comment "SCSI support type (disk, tape, CD-ROM)"
+	depends on SCSI
+
+config BLK_DEV_SD
+	tristate "SCSI disk support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI hard disk or the SCSI or parallel port
+	  version of the IOMEGA ZIP drive under Linux, say Y and read the
+	  SCSI-HOWTO, the Disk-HOWTO and the Multi-Disk-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. This is NOT for SCSI
+	  CD-ROMs.
+
+	  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 sd_mod.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.  Do not compile this driver as a
+	  module if your root file system (the one containing the directory /)
+	  is located on a SCSI disk. In this case, do not compile the driver
+	  for your SCSI host adapter (below) as a module either.
+
+config CHR_DEV_ST
+	tristate "SCSI tape support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI tape drive under Linux, say Y and read the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and
+	  <file:drivers/scsi/README.st> in the kernel source.  This is NOT for
+	  SCSI CD-ROMs.
+
+	  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 st.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config CHR_DEV_OSST
+	tristate "SCSI OnStream SC-x0 tape support"
+	depends on SCSI
+	---help---
+	  The OnStream SC-x0 SCSI tape drives can not be driven by the
+	  standard st driver, but instead need this special osst driver and
+	  use the  /dev/osstX char device nodes (major 206).  Via usb-storage
+	  and ide-scsi, you may be able to drive the USB-x0 and DI-x0 drives
+	  as well.  Note that there is also a second generation of OnStream
+	  tape drives (ADR-x0) that supports the standard SCSI-2 commands for
+	  tapes (QIC-157) and can be driven by the standard driver st.
+	  For more information, you may have a look at the SCSI-HOWTO
+	  <http://www.linuxdoc.org/docs.html#howto>  and
+	  <file:drivers/scsi/README.osst>  in the kernel source.
+	  More info on the OnStream driver may be found on
+	  <http://linux1.onstream.nl/test/>
+	  Please also have a look at the standard st docu, as most of it
+	  applies to osst as well.
+
+	  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 osst.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR
+	tristate "SCSI CDROM support"
+	depends on SCSI
+	---help---
+	  If you want to use a SCSI CD-ROM under Linux, say Y and read the
+	  SCSI-HOWTO and the CD-ROM-HOWTO at
+	  <http://www.linuxdoc.org/docs.html#howto>. Also make sure to say Y
+	  or M to "ISO 9660 CD-ROM file system support" later.
+
+	  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 sr_mod.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>.
+
+config BLK_DEV_SR_VENDOR
+	bool "Enable vendor-specific extensions (for SCSI CDROM)"
+	depends on BLK_DEV_SR
+	help
+	  This enables the usage of vendor specific SCSI commands. This is
+	  required to support multisession CDs with old NEC/TOSHIBA cdrom
+	  drives (and HP Writers). If you have such a drive and get the first
+	  session only, try saying Y here; everybody else says N.
+
+config SR_EXTRA_DEVS
+	int "Maximum number of CDROM devices that can be loaded as modules"
+	depends on BLK_DEV_SR
+	default "2"
+	---help---
+	  This controls the amount of additional space allocated in tables for
+	  drivers that are loaded as modules after the kernel is booted. In
+	  the event that the SCSI core itself was loaded as a module, this
+	  value is the number of additional CD-ROMs that can be loaded after
+	  the first host driver is loaded.
+
+	  Admittedly this isn't pretty, but there are tons of race conditions
+	  involved with resizing the internal arrays on the fly.  Someday this
+	  flag will go away, and everything will work automatically.
+
+	  If you don't understand what's going on, go with the default.
+
+config CHR_DEV_SG
+	tristate "SCSI generic support"
+	depends on SCSI
+	---help---
+	  If you want to use SCSI scanners, synthesizers or CD-writers or just
+	  about anything having "SCSI" in its name other than hard disks,
+	  CD-ROMs or tapes, say Y here. These won't be supported by the kernel
+	  directly, so you need some additional software which knows how to
+	  talk to these devices using the SCSI protocol:
+
+	  For scanners, look at SANE (<http://www.mostang.com/sane/>). For CD
+	  writer software look at Cdrtools
+	  (<http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html>)
+	  and for burning a "disk at once": CDRDAO
+	  (<http://cdrdao.sourceforge.net/>). Cdparanoia is a high
+	  quality digital reader of audio CDs (<http://www.xiph.org/paranoia/>).
+	  For other devices, it's possible that you'll have to write the
+	  driver software yourself. Please read the file
+	  <file:Documentation/scsi-generic.txt> for more information.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt> and
+	  <file:Documentation/scsi.txt>. The module will be called sg.o. If unsure,
+	  say N.
+
+comment "Some SCSI devices (e.g. CD jukebox) support multiple LUNs"
+	depends on SCSI
+
+config SCSI_MULTI_LUN
+	bool "Probe all LUNs on each SCSI device"
+	depends on SCSI
+	help
+	  If you have a SCSI device that supports more than one LUN (Logical
+	  Unit Number), e.g. a CD jukebox, and only one LUN is detected, you
+	  can say Y here to force the SCSI driver to probe for multiple LUNs.
+	  A SCSI device with multiple LUNs acts logically like multiple SCSI
+	  devices. The vast majority of SCSI devices have only one LUN, and
+	  so most people can say N here and should in fact do so, because it
+	  is safer.
+
+config SCSI_REPORT_LUNS
+	bool "Build with SCSI REPORT LUNS support"
+	depends on SCSI
+	help
+	  If you want to build with SCSI REPORT LUNS support in the kernel, say Y here.
+	  The REPORT LUNS command is useful for devices (such as disk arrays) with
+	  large numbers of LUNs where the LUN values are not contiguous (sparse LUN).
+	  REPORT LUNS scanning is done only for SCSI-3 devices. Most users can safely
+	  answer N here.
+
+config SCSI_CONSTANTS
+	bool "Verbose SCSI error reporting (kernel size +=12K)"
+	depends on SCSI
+	help
+	  The error messages regarding your SCSI hardware will be easier to
+	  understand if you say Y here; it will enlarge your kernel by about
+	  12 KB. If in doubt, say Y.
+
+config SCSI_LOGGING
+	bool "SCSI logging facility"
+	depends on SCSI
+	---help---
+	  This turns on a logging facility that can be used to debug a number
+	  of SCSI related problems.
+
+	  If you say Y here, no logging output will appear by default, but you
+	  can enable logging by saying Y to "/proc file system support" and
+	  "Sysctl support" below and executing the command
+
+	  echo "scsi log token [level]" > /proc/scsi/scsi
+
+	  at boot time after the /proc file system has been mounted.
+
+	  There are a number of things that can be used for 'token' (you can
+	  find them in the source: <file:drivers/scsi/scsi.c>), and this
+	  allows you to select the types of information you want, and the
+	  level allows you to select the level of verbosity.
+
+	  If you say N here, it may be harder to track down some types of SCSI
+	  problems. If you say Y here your kernel will be somewhat larger, but
+	  there should be no noticeable performance impact as long as you have
+	  logging turned off.
+
+
+menu "SCSI low-level drivers"
+	depends on SCSI!=n
+
+config SGIWD93_SCSI
+	tristate "SGI WD93C93 SCSI Driver"
+	depends on SGI_IP22 && SCSI
+
+config SCSI_DECNCR
+	tristate "DEC NCR53C94 Scsi Driver"
+	depends on DECSTATION && TC && SCSI
+	help
+	  Say Y here to support the NCR53C94 SCSI controller chips on IOASIC
+	  based TURBOchannel DECstations and TURBOchannel PMAZ-A cards.
+
+config SCSI_DECSII
+	tristate "DEC SII Scsi Driver"
+	depends on DECSTATION && SCSI
+
+config BLK_DEV_3W_XXXX_RAID
+	tristate "3ware Hardware ATA-RAID support"
+	depends on PCI && SCSI
+	help
+	  3ware is the only hardware ATA-Raid product in Linux to date.
+	  This card is 2,4, or 8 channel master mode support only.
+	  SCSI support required!!!
+
+	  <http://www.3ware.com/>
+
+	  Please read the comments at the top of
+	  <file:drivers/scsi/3w-xxxx.c>.
+
+config SCSI_7000FASST
+	tristate "7000FASST SCSI support"
+	depends on SCSI && ISA
+	help
+	  This driver supports the Western Digital 7000 SCSI host adapter
+	  family.  Some information is in the source:
+	  <file:drivers/scsi/wd7000.c>.
+
+	  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 wd7000.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_ACARD
+	tristate "ACARD SCSI support"
+	depends on SCSI
+	help
+	  This driver supports the ACARD 870U/W SCSI host adapter.
+
+	  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 atp870u.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_AHA152X
+	tristate "Adaptec AHA152X/2825 support"
+	depends on ISA && SCSI
+	---help---
+	  This is a driver for the AHA-1510, AHA-1520, AHA-1522, and AHA-2825
+	  SCSI host adapters. It also works for the AVA-1505, but the IRQ etc.
+	  must be manually specified in this case.
+
+	  It is explained in section 3.3 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. You might also want to
+	  read the file <file:drivers/scsi/README.aha152x>.
+
+	  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 aha152x.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_AHA1542
+	tristate "Adaptec AHA1542 support"
+	depends on ISA && SCSI
+	---help---
+	  This is support for a SCSI host adapter.  It is explained in section
+	  3.4 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Note that Trantor was
+	  purchased by Adaptec, and some former Trantor products are being
+	  sold under the Adaptec name.  If it doesn't work out of the box, you
+	  may have to change some settings in <file:drivers/scsi/aha1542.h>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called aha1542.o.
+
+config SCSI_AHA1740
+	tristate "Adaptec AHA1740 support"
+	depends on EISA && SCSI
+	---help---
+	  This is support for a SCSI host adapter.  It is explained in section
+	  3.5 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/aha1740.h>.
+
+	  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 aha1740.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_AACRAID
+	tristate "Adaptec AACRAID support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && SCSI && PCI
+
+choice
+	prompt "Adaptec AIC7xxx support"
+	optional
+	depends on SCSI
+
+source "drivers/scsi/aic7xxx/Kconfig"
+
+config SCSI_AIC7XXX_OLD
+	tristate "Old driver"
+	help
+	  WARNING This driver is an older aic7xxx driver and is no longer
+	  under active development.  Adaptec, Inc. is writing a new driver to
+	  take the place of this one, and it is recommended that whenever
+	  possible, people should use the new Adaptec written driver instead
+	  of this one.  This driver will eventually be phased out entirely.
+
+	  This is support for the various aic7xxx based Adaptec SCSI
+	  controllers. These include the 274x EISA cards; 284x VLB cards;
+	  2902, 2910, 293x, 294x, 394x, 3985 and several other PCI and
+	  motherboard based SCSI controllers from Adaptec. It does not support
+	  the AAA-13x RAID controllers from Adaptec, nor will it likely ever
+	  support them. It does not support the 2920 cards from Adaptec that
+	  use the Future Domain SCSI controller chip. For those cards, you
+	  need the "Future Domain 16xx SCSI support" driver.
+
+	  In general, if the controller is based on an Adaptec SCSI controller
+	  chip from the aic777x series or the aic78xx series, this driver
+	  should work. The only exception is the 7810 which is specifically
+	  not supported (that's the RAID controller chip on the AAA-13x
+	  cards).
+
+	  Note that the AHA2920 SCSI host adapter is *not* supported by this
+	  driver; choose "Future Domain 16xx SCSI support" instead if you have
+	  one of those.
+
+	  Information on the configuration options for this controller can be
+	  found by checking the help file for each of the available
+	  configuration options. You should read
+	  <file:drivers/scsi/aic7xxx_old/README.aic7xxx> at a minimum before
+	  contacting the maintainer with any questions.  The SCSI-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>, can also
+	  be of great help.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called aic7xxx_old.o.
+
+endchoice
+
+
+# All the I2O code and drivers do not seem to be 64bit safe.
+config SCSI_DPT_I2O
+	tristate "Adaptec I2O RAID support "
+	depends on !X86_64 && SCSI
+	help
+	  This driver supports all of Adaptec's I2O based RAID controllers as 
+	  well as the DPT SmartRaid V cards.  This is an Adaptec maintained
+	  driver by Deanna Bonds.  See <file:drivers/scsi/README.dpti>.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  dpt_i2o.o.
+
+config SCSI_ADVANSYS
+	tristate "AdvanSys SCSI support"
+	depends on SCSI
+	help
+	  This is a driver for all SCSI host adapters manufactured by
+	  AdvanSys. It is documented in the kernel source in
+	  <file:drivers/scsi/advansys.c>.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  advansys.o.
+
+config SCSI_IN2000
+	tristate "Always IN2000 SCSI support"
+	depends on SCSI
+	help
+	  This is support for an ISA bus SCSI host adapter.  You'll find more
+	  information in <file:drivers/scsi/README.in2000>. If it doesn't work
+	  out of the box, you may have to change the jumpers for IRQ or
+	  address selection.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called in2000.o.
+
+# does not use pci dma and seems to be isa/onboard only for old machines
+config SCSI_AM53C974
+	tristate "AM53/79C974 PCI SCSI support"
+	depends on !X86_64 && SCSI && PCI
+	---help---
+	  This is support for the AM53/79C974 SCSI host adapters.  Please read
+	  <file:drivers/scsi/README.AM53C974> for details.  Also, the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, is for you.
+
+	  Note that there is another driver for AM53C974 based adapters:
+	  "Tekram DC390(T) and Am53/79C974 (PCscsi) SCSI support", above.  You
+	  can pick either one.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called AM53C974.o.
+
+config SCSI_MEGARAID
+	tristate "AMI MegaRAID support"
+	depends on SCSI
+	help
+	  This driver supports the AMI MegaRAID 418, 428, 438, 466, 762, 490
+	  and 467 SCSI host adapters.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called megaraid.o.
+
+config SCSI_BUSLOGIC
+	tristate "BusLogic SCSI support"
+	depends on SCSI
+	---help---
+	  This is support for BusLogic MultiMaster and FlashPoint SCSI Host
+	  Adapters. Consult the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and the files
+	  <file:drivers/scsi/README.BusLogic> and
+	  <file:drivers/scsi/README.FlashPoint> 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.
+
+	  You can also build this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  but only a single instance may be loaded. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  The module will be called BusLogic.o.
+
+config SCSI_OMIT_FLASHPOINT
+	bool "Omit FlashPoint support"
+	depends on SCSI_BUSLOGIC
+	help
+	  This option allows you to omit the FlashPoint support from the
+	  BusLogic SCSI driver. The FlashPoint SCCB Manager code is
+	  substantial, so users of MultiMaster Host Adapters may wish to omit
+	  it.
+
+config SCSI_CPQFCTS
+	tristate "Compaq Fibre Channel 64-bit/66Mhz HBA support"
+	depends on PCI && SCSI
+	help
+	  Say Y here to compile in support for the Compaq StorageWorks Fibre
+	  Channel 64-bit/66Mhz Host Bus Adapter.
+
+config SCSI_DMX3191D
+	tristate "DMX3191D SCSI support"
+	depends on SCSI && PCI
+	help
+	  This is support for Domex DMX3191D SCSI Host Adapters.
+
+	  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 dmx3191d.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_DTC3280
+	tristate "DTC3180/3280 SCSI support"
+	depends on SCSI && ISA
+	help
+	  This is support for DTC 3180/3280 SCSI Host Adapters.  Please read
+	  the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, and the file
+	  <file:drivers/scsi/README.dtc3x80>.
+
+	  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 dtc.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_EATA
+	tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support"
+	depends on SCSI
+	---help---
+	  This driver supports all EATA/DMA-compliant SCSI host adapters.  DPT
+	  ISA and all EISA I/O addresses are probed looking for the "EATA"
+	  signature.  If you chose "BIOS" at the question "PCI access mode",
+	  the addresses of all the PCI SCSI controllers reported by the PCI
+	  subsystem are probed as well.
+
+	  You want to read the start of <file:drivers/scsi/eata.c> and the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that there is also another driver for the same hardware
+	  available: "EATA-DMA [Obsolete] (DPT, NEC, AT&T, SNI, AST, Olivetti,
+	  Alphatronix) support". You should say Y to only one of them.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called eata.o.
+
+config SCSI_EATA_TAGGED_QUEUE
+	bool "enable tagged command queueing"
+	depends on SCSI_EATA
+	help
+	  This is a feature of SCSI-2 which improves performance: the host
+	  adapter can send several SCSI commands to a device's queue even if
+	  previous commands haven't finished yet. Most EATA adapters negotiate
+	  this feature automatically with the device, even if your answer is
+	  N. The safe answer is N.
+
+config SCSI_EATA_LINKED_COMMANDS
+	bool "enable elevator sorting"
+	depends on SCSI_EATA
+	help
+	  This option enables elevator sorting for all probed SCSI disks and
+	  CD-ROMs. It definitely reduces the average seek distance when doing
+	  random seeks, but this does not necessarily result in a noticeable
+	  performance improvement: your mileage may vary...
+	  The safe answer is N.
+
+config SCSI_EATA_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on SCSI_EATA
+	default "16"
+	help
+	  This specifies how many SCSI commands can be maximally queued for
+	  each probed SCSI device. You should reduce the default value of 16
+	  only if you have disks with buggy or limited tagged command support.
+	  Minimum is 2 and maximum is 62. This value is also the window size
+	  used by the elevator sorting option above. The effective value used
+	  by the driver for each probed SCSI device is reported at boot time.
+
+config SCSI_EATA_DMA
+	tristate "EATA-DMA [Obsolete] (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support"
+	depends on SCSI
+	---help---
+	  This is support for the EATA-DMA protocol compliant SCSI Host
+	  Adapters like the SmartCache III/IV, SmartRAID controller families
+	  and the DPT PM2011B and PM2012B controllers.
+
+	  Note that this driver is obsolete; if you have one of the above
+	  SCSI Host Adapters, you should normally say N here and Y to "EATA
+	  ISA/EISA/PCI support", below.  Please read the SCSI-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 eata_dma.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_EATA_PIO
+	tristate "EATA-PIO (old DPT PM2001, PM2012A) support"
+	depends on SCSI
+	---help---
+	  This driver supports all EATA-PIO protocol compliant SCSI Host
+	  Adapters like the DPT PM2001 and the PM2012A.  EATA-DMA compliant
+	  host adapters could also use this driver but are discouraged from
+	  doing so, since this driver only supports hard disks and lacks
+	  numerous features.  You might want to have a look at the SCSI-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called eata_pio.o.
+
+config SCSI_FUTURE_DOMAIN
+	tristate "Future Domain 16xx SCSI/AHA-2920A support"
+	depends on SCSI
+	---help---
+	  This is support for Future Domain's 16-bit SCSI host adapters
+	  (TMC-1660/1680, TMC-1650/1670, TMC-3260, TMC-1610M/MER/MEX) and
+	  other adapters based on the Future Domain chipsets (Quantum
+	  ISA-200S, ISA-250MG; Adaptec AHA-2920A; and at least one IBM board).
+	  It is explained in section 3.7 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  NOTE: Newer Adaptec AHA-2920C boards use the Adaptec AIC-7850 chip
+	  and should use the aic7xxx driver ("Adaptec AIC7xxx chipset SCSI
+	  controller support"). This Future Domain driver works with the older
+	  Adaptec AHA-2920A boards with a Future Domain chip on them.
+
+	  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 fdomain.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_FD_MCS
+	tristate "Future Domain MCS-600/700 SCSI support"
+	depends on MCA && SCSI
+	---help---
+	  This is support for Future Domain MCS 600/700 MCA SCSI adapters.
+	  Some PS/2 computers are equipped with IBM Fast SCSI Adapter/A which
+	  is identical to the MCS 700 and hence also supported by this driver.
+	  This driver also supports the Reply SB16/SCSI card (the SCSI part).
+	  It supports multiple adapters in the same system.
+
+	  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 fd_mcs.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_GDTH
+	tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support"
+	depends on SCSI
+	---help---
+	  Formerly called GDT SCSI Disk Array Controller Support.
+
+	  This is a driver for RAID/SCSI Disk Array Controllers (EISA/ISA/PCI) 
+	  manufactured by Intel/ICP vortex (an Intel Company). It is documented
+	  in the kernel source in <file:drivers/scsi/gdth.c> and
+	  <file:drivers/scsi/gdth.h.>
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config SCSI_GENERIC_NCR5380
+	tristate "Generic NCR5380/53c400 SCSI PIO support"
+	depends on SCSI
+	---help---
+	  This is a driver for the old NCR 53c80 series of SCSI controllers
+	  on boards using PIO. Most boards such as the Trantor T130 fit this
+	  category, along with a large number of ISA 8bit controllers shipped
+	  for free with SCSI scanners. If you have a PAS16, T128 or DMX3191
+	  you should select the specific driver for that card rather than
+	  generic 5380 support.
+
+	  It is explained in section 3.8 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/g_NCR5380.h>.
+
+	  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 g_NCR5380.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_GENERIC_NCR5380_MMIO
+	tristate "Generic NCR5380/53c400 SCSI MMIO support"
+	depends on SCSI
+	---help---
+	  This is a driver for the old NCR 53c80 series of SCSI controllers
+	  on boards using memory mapped I/O. 
+	  It is explained in section 3.8 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/g_NCR5380.h>.
+
+	  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 g_NCR5380.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_GENERIC_NCR53C400
+	bool "Enable NCR53c400 extensions"
+	depends on SCSI_GENERIC_NCR5380
+	help
+	  This enables certain optimizations for the NCR53c400 SCSI cards.
+	  You might as well try it out.  Note that this driver will only probe
+	  for the Trantor T130B in its default configuration; you might have
+	  to pass a command line option to the kernel at boot time if it does
+	  not detect your card.  See the file
+	  <file:drivers/scsi/README.g_NCR5380> for details.
+
+config SCSI_IBMMCA
+	tristate "IBMMCA SCSI support"
+	depends on MCA && SCSI
+	---help---
+	  This is support for the IBM SCSI adapter found in many of the PS/2
+	  series computers.  These machines have an MCA bus, so you need to
+	  answer Y to "MCA support" as well and read
+	  <file:Documentation/mca.txt>.
+
+	  If the adapter isn't found during boot (a common problem for models
+	  56, 57, 76, and 77) you'll need to use the 'ibmmcascsi=<pun>' kernel
+	  option, where <pun> is the id of the SCSI subsystem (usually 7, but
+	  if that doesn't work check your reference diskette).  Owners of
+	  model 95 with a LED-matrix-display can in addition activate some
+	  activity info like under OS/2, but more informative, by setting
+	  'ibmmcascsi=display' as an additional kernel parameter.  Try "man
+	  bootparam" or see the documentation of your boot loader about how to
+	  pass options to the kernel.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ibmmca.o.
+
+config IBMMCA_SCSI_ORDER_STANDARD
+	bool "Standard SCSI-order"
+	depends on SCSI_IBMMCA
+	---help---
+	  In the PC-world and in most modern SCSI-BIOS-setups, SCSI-hard disks
+	  are assigned to the drive letters, starting with the lowest SCSI-id
+	  (physical number -- pun) to be drive C:, as seen from DOS and
+	  similar operating systems. When looking into papers describing the
+	  ANSI-SCSI-standard, this assignment of drives appears to be wrong.
+	  The SCSI-standard follows a hardware-hierarchy which says that id 7
+	  has the highest priority and id 0 the lowest. Therefore, the host
+	  adapters are still today everywhere placed as SCSI-id 7 by default.
+	  In the SCSI-standard, the drive letters express the priority of the
+	  disk. C: should be the hard disk, or a partition on it, with the
+	  highest priority. This must therefore be the disk with the highest
+	  SCSI-id (e.g. 6) and not the one with the lowest! IBM-BIOS kept the
+	  original definition of the SCSI-standard as also industrial- and
+	  process-control-machines, like VME-CPUs running under realtime-OSes
+	  (e.g. LynxOS, OS9) do.
+
+	  If you like to run Linux on your MCA-machine with the same
+	  assignment of hard disks as seen from e.g. DOS or OS/2 on your
+	  machine, which is in addition conformant to the SCSI-standard, you
+	  must say Y here. This is also necessary for MCA-Linux users who want
+	  to keep downward compatibility to older releases of the
+	  IBM-MCA-SCSI-driver (older than driver-release 2.00 and older than
+	  June 1997).
+
+	  If you like to have the lowest SCSI-id assigned as drive C:, as
+	  modern SCSI-BIOSes do, which does not conform to the standard, but
+	  is widespread and common in the PC-world of today, you must say N
+	  here. If unsure, say Y.
+
+config IBMMCA_SCSI_DEV_RESET
+	bool "Reset SCSI-devices at boottime"
+	depends on SCSI_IBMMCA
+	---help---
+	  By default, SCSI-devices are reset when the machine is powered on.
+	  However, some devices exist, like special-control-devices,
+	  SCSI-CNC-machines, SCSI-printer or scanners of older type, that do
+	  not reset when switched on. If you say Y here, each device connected
+	  to your SCSI-bus will be issued a reset-command after it has been
+	  probed, while the kernel is booting. This may cause problems with
+	  more modern devices, like hard disks, which do not appreciate these
+	  reset commands, and can cause your system to hang. So say Y only if
+	  you know that one of your older devices needs it; N is the safe
+	  answer.
+
+config SCSI_IPS
+	tristate "IBM ServeRAID support"
+	depends on X86 && SCSI && PCI
+	---help---
+	  This is support for the IBM ServeRAID hardware RAID controllers.
+	  See <http://www.developer.ibm.com/welcome/netfinity/serveraid.html>
+	  for more information.  If this driver does not work correctly
+	  without modification please contact the author by email at
+	  ipslinux@us.ibm.com.
+
+	  You can build this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  but only a single instance may be loaded. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+	  The module will be called ips.o.
+
+config SCSI_INITIO
+	tristate "Initio 9100U(W) support"
+	depends on SCSI && PCI
+	help
+	  This is support for the Initio 91XXU(W) SCSI host adapter.  Please
+	  read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called initio.o.
+
+config SCSI_INIA100
+	tristate "Initio INI-A100U2W support"
+	depends on SCSI && PCI
+	help
+	  This is support for the Initio INI-A100U2W SCSI host adapter.
+	  Please read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called a100u2w.o.
+
+config SCSI_PPA
+	tristate "IOMEGA parallel port (ppa - older drives)"
+	depends on SCSI && PARPORT
+	---help---
+	  This driver supports older versions of IOMEGA's parallel port ZIP
+	  drive (a 100 MB removable media device).
+
+	  Note that you can say N here if you have the SCSI version of the ZIP
+	  drive: it will be supported automatically if you said Y to the
+	  generic "SCSI disk support", above.
+
+	  If you have the ZIP Plus drive or a more recent parallel port ZIP
+	  drive (if the supplied cable with the drive is labeled "AutoDetect")
+	  then you should say N here and Y to "IOMEGA parallel port (imm -
+	  newer drives)", below.
+
+	  For more information about this driver and how to use it you should
+	  read the file <file:drivers/scsi/README.ppa>.  You should also read
+	  the SCSI-HOWTO, which is available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If you use this driver,
+	  you will still be able to use the parallel port for other tasks,
+	  such as a printer; it is safe to compile both drivers into the
+	  kernel.
+
+	  This driver is also available as a module which can be inserted in
+	  and removed from the running kernel whenever you want.  To compile
+	  this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called ppa.o.
+
+config SCSI_IMM
+	tristate "IOMEGA parallel port (imm - newer drives)"
+	depends on SCSI && PARPORT
+	---help---
+	  This driver supports newer versions of IOMEGA's parallel port ZIP
+	  drive (a 100 MB removable media device).
+
+	  Note that you can say N here if you have the SCSI version of the ZIP
+	  drive: it will be supported automatically if you said Y to the
+	  generic "SCSI disk support", above.
+
+	  If you have the ZIP Plus drive or a more recent parallel port ZIP
+	  drive (if the supplied cable with the drive is labeled "AutoDetect")
+	  then you should say Y here; if you have an older ZIP drive, say N
+	  here and Y to "IOMEGA Parallel Port (ppa - older drives)", above.
+
+	  For more information about this driver and how to use it you should
+	  read the file <file:drivers/scsi/README.ppa>.  You should also read
+	  the SCSI-HOWTO, which is available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If you use this driver,
+	  you will still be able to use the parallel port for other tasks,
+	  such as a printer; it is safe to compile both drivers into the
+	  kernel.
+
+	  This driver is also available as a module which can be inserted in
+	  and removed from the running kernel whenever you want.  To compile
+	  this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called imm.o.
+
+config SCSI_IZIP_EPP16
+	bool "ppa/imm option - Use slow (but safe) EPP-16"
+	depends on PARPORT && (SCSI_PPA || SCSI_IMM)
+	---help---
+	  EPP (Enhanced Parallel Port) is a standard for parallel ports which
+	  allows them to act as expansion buses that can handle up to 64
+	  peripheral devices.
+
+	  Some parallel port chipsets are slower than their motherboard, and
+	  so we have to control the state of the chipset's FIFO queue every
+	  now and then to avoid data loss. This will be done if you say Y
+	  here.
+
+	  Generally, saying Y is the safe option and slows things down a bit.
+
+config SCSI_IZIP_SLOW_CTR
+	bool "ppa/imm option - Assume slow parport control register"
+	depends on PARPORT && (SCSI_PPA || SCSI_IMM)
+	help
+	  Some parallel ports are known to have excessive delays between
+	  changing the parallel port control register and good data being
+	  available on the parallel port data/status register. This option
+	  forces a small delay (1.0 usec to be exact) after changing the
+	  control register to let things settle out. Enabling this option may
+	  result in a big drop in performance but some very old parallel ports
+	  (found in 386 vintage machines) will not work properly.
+
+	  Generally, saying N is fine.
+
+config SCSI_NCR53C406A
+	tristate "NCR53c406a SCSI support"
+	depends on SCSI && ISA
+	help
+	  This is support for the NCR53c406a SCSI host adapter.  For user
+	  configurable parameters, check out <file:drivers/scsi/NCR53c406a.c>
+	  in the kernel source.  Also read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called NCR53c406.o.
+
+config SCSI_NCR_D700
+	tristate "NCR Dual 700 MCA SCSI support"
+	depends on MCA && SCSI
+	help
+	  This is a driver for the MicroChannel Dual 700 card produced by
+	  NCR and commonly used in 345x/35xx/4100 class machines.  It always
+	  tries to negotiate sync and uses tag command queueing.
+
+	  Unless you have an NCR manufactured machine, the chances are that
+	  you do not have this SCSI card, so say N.
+
+config 53C700_IO_MAPPED
+	bool
+	depends on SCSI_NCR_D700
+	default y
+
+config SCSI_LASI700
+	tristate "HP LASI SCSI support for 53c700/710"
+	depends on PARISC && SCSI
+	help
+	  This is a driver for the lasi baseboard in some parisc machines
+	  which is based on the 53c700 chip.  Will also support LASI subsystems
+	  based on the 710 chip using 700 emulation mode.
+
+	  Unless you know you have a 53c700 or 53c710 based lasi, say N here
+
+config 53C700_MEM_MAPPED
+	bool
+	depends on SCSI_LASI700
+	default y
+
+config 53C700_LE_ON_BE
+	bool
+	depends on SCSI_LASI700
+	default y
+
+config 53C700_USE_CONSISTENT
+	bool
+	depends on SCSI_LASI700
+	default y
+
+config SCSI_NCR53C7xx
+	tristate "NCR53c7,8xx SCSI support"
+	depends on SCSI && PCI
+	---help---
+	  This is a driver for the 53c7 and 8xx NCR family of SCSI
+	  controllers, not to be confused with the NCR 5380 controllers.  It
+	  is explained in section 3.8 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/53c7,8xx.h>.  Please read
+	  <file:drivers/scsi/README.ncr53c7xx> for the available boot time
+	  command line options.
+
+	  Note: there is another driver for the 53c8xx family of controllers
+	  ("NCR53C8XX SCSI support" below).  If you want to use them both, you
+	  need to say M to both and build them as modules, but only one may be
+	  active at a time. If you have a 53c8xx board, it's better to use the
+	  other driver.
+
+	  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 53c7,8xx.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_NCR53C7xx_sync
+	bool "always negotiate synchronous transfers"
+	depends on SCSI_NCR53C7xx
+	help
+	  In general, this is good; however, it is a bit dangerous since there
+	  are some broken SCSI devices out there. Take your chances. Safe bet
+	  is N.
+
+config SCSI_NCR53C7xx_FAST
+	bool "allow FAST-SCSI [10MHz]"
+	depends on SCSI_NCR53C7xx
+	help
+	  This will enable 10MHz FAST-SCSI transfers with your host
+	  adapter. Some systems have problems with that speed, so it's safest
+	  to say N here.
+
+config SCSI_NCR53C7xx_DISCONNECT
+	bool "allow DISCONNECT"
+	depends on SCSI_NCR53C7xx
+	help
+	  This enables the disconnect/reconnect feature of the NCR SCSI
+	  controller. When you say Y here, a slow SCSI device will not lock
+	  the SCSI bus while processing a request, allowing simultaneous use
+	  of e.g. a SCSI hard disk and SCSI tape or CD-ROM drive, and
+	  providing much better performance when using slow and fast SCSI
+	  devices at the same time. Some devices, however, do not operate
+	  properly with this option enabled, and will cause your SCSI system
+	  to hang, which might cause a system crash. The safe answer
+	  therefore is to say N.
+
+config SCSI_SYM53C8XX_2
+	tristate "SYM53C8XX Version 2 SCSI support"
+	depends on PCI && SCSI
+	---help---
+	  This driver supports the whole NCR53C8XX/SYM53C8XX family of 
+	  PCI-SCSI controllers. It also supports the subset of LSI53C10XX 
+	  Ultra-160 controllers that are based on the SYM53C8XX SCRIPTS 
+	  language. It does not support LSI53C10XX Ultra-320 PCI-X SCSI 
+	  controllers.
+
+	  If your system has problems using this new major version of the
+	  SYM53C8XX driver, you may switch back to driver version 1.
+
+	  Please read <file:drivers/scsi/sym53c8xx_2/Documentation.txt> for more
+	  information.
+
+config SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
+	int "DMA addressing mode"
+	depends on SCSI_SYM53C8XX_2
+	default "1"
+	---help---
+	  This option only applies to PCI-SCSI chip that are PCI DAC capable 
+	  (875A, 895A, 896, 1010-33, 1010-66, 1000).
+
+	  When set to 0, only PCI 32 bit DMA addressing (SAC) will be performed.
+	  When set to 1, 40 bit DMA addressing (with upper 24 bits of address 
+	  set to zero) is supported. The addressable range is here 1 TB.
+	  When set to 2, full 64 bits of address for DMA are supported, but only
+	  16 segments of 4 GB can be addressed. The addressable range is so 
+	  limited to 64 GB.
+
+	  The safest value is 0 (32 bit DMA addressing) that is guessed to still 
+	  fit most of real machines.
+
+	  The preferred value 1 (40 bit DMA addressing) should make happy 
+	  properly engineered PCI DAC capable host bridges. You may configure
+	  this option for Intel platforms with more than 4 GB of memory.
+
+	  The still experimental value 2 (64 bit DMA addressing with 16 x 4GB 
+	  segments limitation) can be used on systems that require PCI address 
+	  bits past bit 39 to be set for the addressing of memory using PCI 
+	  DAC cycles.
+
+config SCSI_SYM53C8XX_DEFAULT_TAGS
+	int "default tagged command queue depth"
+	depends on SCSI_SYM53C8XX_2
+	default "16"
+	help
+	  This is the default value of the command queue depth the driver will 
+	  announce to the generic SCSI layer for devices that support tagged 
+	  command queueing. This value can be changed from the boot command line.
+	  This is a soft limit that cannot exceed CONFIG_SCSI_SYM53C8XX_MAX_TAGS.
+
+config SCSI_SYM53C8XX_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on SCSI_SYM53C8XX_2
+	default "64"
+	help
+	  This option allows you to specify the maximum number of commands
+	  that can be queued to any device, when tagged command queuing is
+	  possible. The driver supports up to 256 queued commands per device.
+	  This value is used as a compiled-in hard limit.
+
+config SCSI_SYM53C8XX_IOMAPPED
+	bool "use normal IO"
+	depends on SCSI_SYM53C8XX_2
+	help
+	  If you say Y here, the driver will preferently use normal IO rather than 
+	  memory mapped IO.
+
+config SCSI_NCR53C8XX
+	tristate "NCR53C8XX SCSI support"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && SCSI
+	---help---
+	  This is the BSD ncr driver adapted to Linux for the NCR53C8XX family
+	  of PCI-SCSI controllers.  This driver supports parity checking,
+	  tagged command queuing and fast synchronous data transfers up to 80
+	  MB/s with wide FAST-40 LVD devices and controllers.
+
+	  Recent versions of the 53C8XX chips are better supported by the
+	  option "SYM53C8XX SCSI support", below.
+
+	  Note: there is yet another driver for the 53c8xx family of
+	  controllers ("NCR53c7,8xx SCSI support" above).  If you want to use
+	  them both, you need to say M to both and build them as modules, but
+	  only one may be active at a time.  If you have a 53c8xx board, you
+	  probably do not want to use the "NCR53c7,8xx SCSI support".
+
+	  Please read <file:drivers/scsi/README.ncr53c8xx> for more
+	  information.
+
+config SCSI_SYM53C8XX
+	tristate "SYM53C8XX SCSI support"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && SCSI
+	---help---
+	  This driver supports all the features of recent 53C8XX chips (used
+	  in PCI SCSI controllers), notably the hardware phase mismatch
+	  feature of the SYM53C896.
+
+	  Older versions of the 53C8XX chips are not supported by this
+	  driver.  If your system uses either a 810 rev. < 16, a 815, or a 825
+	  rev. < 16 PCI SCSI processor, you must use the generic NCR53C8XX
+	  driver ("NCR53C8XX SCSI support" above) or configure both the
+	  NCR53C8XX and this SYM53C8XX drivers either as module or linked to
+	  the kernel image.
+
+	  When both drivers are linked into the kernel, the SYM53C8XX driver
+	  is called first at initialization and you can use the 'excl=ioaddr'
+	  driver boot option to exclude attachment of adapters by the
+	  SYM53C8XX driver.  For example, entering
+	  'sym53c8xx=excl:0xb400,excl=0xc000' at the lilo prompt prevents
+	  adapters at io address 0xb400 and 0xc000 from being attached by the
+	  SYM53C8XX driver, thus allowing the NCR53C8XX driver to attach them.
+	  The 'excl' option is also supported by the NCR53C8XX driver.
+
+	  Please read <file:drivers/scsi/README.ncr53c8xx> for more
+	  information.
+
+config SCSI_NCR53C8XX_DEFAULT_TAGS
+	int "default tagged command queue depth"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	default "8"
+	---help---
+	  "Tagged command queuing" is a feature of SCSI-2 which improves
+	  performance: the host adapter can send several SCSI commands to a
+	  device's queue even if previous commands haven't finished yet.
+	  Because the device is intelligent, it can optimize its operations
+	  (like head positioning) based on its own request queue. Some SCSI
+	  devices don't implement this properly; if you want to disable this
+	  feature, enter 0 or 1 here (it doesn't matter which).
+
+	  The default value is 8 and should be supported by most hard disks.
+	  This value can be overridden from the boot command line using the
+	  'tags' option as follows (example):
+	  'ncr53c8xx=tags:4/t2t3q16/t0u2q10' will set default queue depth to
+	  4, set queue depth to 16 for target 2 and target 3 on controller 0
+	  and set queue depth to 10 for target 0 / lun 2 on controller 1.
+
+	  The normal answer therefore is to go with the default 8 and to use
+	  a boot command line option for devices that need to use a different
+	  command queue depth.
+
+	  There is no safe option other than using good SCSI devices.
+
+config SCSI_NCR53C8XX_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	default "32"
+	---help---
+	  This option allows you to specify the maximum number of commands
+	  that can be queued to any device, when tagged command queuing is
+	  possible. The default value is 32. Minimum is 2, maximum is 64.
+	  Modern hard disks are able to support 64 tags and even more, but
+	  do not seem to be faster when more than 32 tags are being used.
+
+	  So, the normal answer here is to go with the default value 32 unless
+	  you are using very large hard disks with large cache (>= 1 MB) that
+	  are able to take advantage of more than 32 tagged commands.
+
+	  There is no safe option and the default answer is recommended.
+
+config SCSI_NCR53C8XX_SYNC
+	int "synchronous transfers frequency in MHz"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	default "20"
+	---help---
+	  The SCSI Parallel Interface-2 Standard defines 5 classes of transfer
+	  rates: FAST-5, FAST-10, FAST-20, FAST-40 and FAST-80.  The numbers
+	  are respectively the maximum data transfer rates in mega-transfers
+	  per second for each class.  For example, a FAST-20 Wide 16 device is
+	  able to transfer data at 20 million 16 bit packets per second for a
+	  total rate of 40 MB/s.
+
+	  You may specify 0 if you want to only use asynchronous data
+	  transfers. This is the safest and slowest option. Otherwise, specify
+	  a value between 5 and 80, depending on the capability of your SCSI
+	  controller.  The higher the number, the faster the data transfer.
+	  Note that 80 should normally be ok since the driver decreases the
+	  value automatically according to the controller's capabilities.
+
+	  Your answer to this question is ignored for controllers with NVRAM,
+	  since the driver will get this information from the user set-up.  It
+	  also can be overridden using a boot setup option, as follows
+	  (example): 'ncr53c8xx=sync:12' will allow the driver to negotiate
+	  for FAST-20 synchronous data transfer (20 mega-transfers per
+	  second).
+
+	  The normal answer therefore is not to go with the default but to
+	  select the maximum value 80 allowing the driver to use the maximum
+	  value supported by each controller. If this causes problems with
+	  your SCSI devices, you should come back and decrease the value.
+
+	  There is no safe option other than using good cabling, right
+	  terminations and SCSI conformant devices.
+
+config SCSI_NCR53C8XX_PROFILE
+	bool "enable profiling"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	help
+	  This option allows you to enable profiling information gathering.
+	  These statistics are not very accurate due to the low frequency
+	  of the kernel clock (100 Hz on i386) and have performance impact
+	  on systems that use very fast devices.
+
+	  The normal answer therefore is N.
+
+config SCSI_NCR53C8XX_IOMAPPED
+	bool "use normal IO"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX)
+	help
+	  If you say Y here, the driver will use normal IO, as opposed to
+	  memory mapped IO. Memory mapped IO has less latency than normal IO
+	  and works for most Intel-based hardware. Under Linux/Alpha only
+	  normal IO is currently supported by the driver and so, this option
+	  has no effect on those systems.
+
+	  The normal answer therefore is N; try Y only if you encounter SCSI
+	  related problems.
+
+config SCSI_NCR53C8XX_PQS_PDS
+	bool "include support for the NCR PQS/PDS SCSI card"
+	depends on (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && SCSI_SYM53C8XX
+	help
+	  Say Y here if you have a special SCSI adapter produced by NCR
+	  corporation called a PCI Quad SCSI or PCI Dual SCSI. You do not need
+	  this if you do not have one of these adapters. However, since this
+	  device is detected as a specific PCI device, this option is quite
+	  safe.
+
+	  The common answer here is N, but answering Y is safe.
+
+config SCSI_NCR53C8XX_NO_DISCONNECT
+	bool "not allow targets to disconnect"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && SCSI_NCR53C8XX_DEFAULT_TAGS=0
+	help
+	  This option is only provided for safety if you suspect some SCSI
+	  device of yours to not support properly the target-disconnect
+	  feature. In that case, you would say Y here. In general however, to
+	  not allow targets to disconnect is not reasonable if there is more
+	  than 1 device on a SCSI bus. The normal answer therefore is N.
+
+config SCSI_NCR53C8XX_SYMBIOS_COMPAT
+	bool "assume boards are SYMBIOS compatible (EXPERIMENTAL)"
+	depends on PCI && SCSI_SYM53C8XX_2!=y && (SCSI_NCR53C8XX || SCSI_SYM53C8XX) && EXPERIMENTAL
+	---help---
+	  This option allows you to enable some features depending on GPIO
+	  wiring. These General Purpose Input/Output pins can be used for
+	  vendor specific features or implementation of the standard SYMBIOS
+	  features. Genuine SYMBIOS controllers use GPIO0 in output for
+	  controller LED and GPIO3 bit as a flag indicating
+	  singled-ended/differential interface. The Tekram DC-390U/F boards
+	  uses a different GPIO wiring.
+
+	  Your answer to this question is ignored if all your controllers have
+	  NVRAM, since the driver is able to detect the board type from the
+	  NVRAM format.
+
+	  If all the controllers in your system are genuine SYMBIOS boards or
+	  use BIOS and drivers from SYMBIOS, you would want to say Y here,
+	  otherwise N. N is the safe answer.
+
+config SCSI_MCA_53C9X
+	tristate "NCR MCA 53C9x SCSI support"
+	depends on MCA && SCSI
+	help
+	  Some MicroChannel machines, notably the NCR 35xx line, use a SCSI
+	  controller based on the NCR 53C94.  This driver will allow use of
+	  the controller on the 3550, and very possibly others.
+
+	  If you want to compile this as a module (= code which can be
+	  inserted and removed from the running kernel whenever you want), say
+	  M here and read <file:Documentation/modules.txt>.  The module will
+	  be called mca_53c9x.o.
+
+config SCSI_PAS16
+	tristate "PAS16 SCSI support"
+	depends on SCSI && ISA
+	---help---
+	  This is support for a SCSI host adapter.  It is explained in section
+	  3.10 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/pas16.h>.
+
+	  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 pas16.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_PCI2000
+	tristate "PCI2000 support"
+	depends on SCSI
+	help
+	  This is support for the PCI2000I EIDE interface card which acts as a
+	  SCSI host adapter.  Please read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver is also available as a module called pci2000.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SCSI_PCI2220I
+	tristate "PCI2220i support"
+	depends on SCSI
+	help
+	  This is support for the PCI2220i EIDE interface card which acts as a
+	  SCSI host adapter.  Please read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver is also available as a module called pci2220i.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SCSI_PSI240I
+	tristate "PSI240i support"
+	depends on SCSI && ISA
+	help
+	  This is support for the PSI240i EIDE interface card which acts as a
+	  SCSI host adapter.  Please read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This driver is also available as a module called psi240i.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGIC_FAS
+	tristate "Qlogic FAS SCSI support"
+	depends on SCSI && ISA
+	---help---
+	  This is a driver for the ISA, VLB, and PCMCIA versions of the Qlogic
+	  FastSCSI! cards as well as any other card based on the FASXX chip
+	  (including the Control Concepts SCSI/IDE/SIO/PIO/FDC cards).
+
+	  This driver does NOT support the PCI versions of these cards. The
+	  PCI versions are supported by the Qlogic ISP driver ("Qlogic ISP
+	  SCSI support"), below.
+
+	  Information about this driver is contained in
+	  <file:drivers/scsi/README.qlogicfas>.  You should also read the
+	  SCSI-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 qlogicfas.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGIC_ISP
+	tristate "Qlogic ISP SCSI support"
+	depends on PCI && SCSI
+	---help---
+	  This driver works for all QLogic PCI SCSI host adapters (IQ-PCI,
+	  IQ-PCI-10, IQ_PCI-D) except for the PCI-basic card.  (This latter
+	  card is supported by the "AM53/79C974 PCI SCSI" driver.)
+
+	  If you say Y here, make sure to choose "BIOS" at the question "PCI
+	  access mode".
+
+	  Please read the file <file:drivers/scsi/README.qlogicisp>.  You
+	  should also read the SCSI-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 qlogicisp.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGIC_FC
+	tristate "Qlogic ISP FC SCSI support"
+	depends on PCI && SCSI
+	help
+	  This is a driver for the QLogic ISP2100 SCSI-FCP host adapter.
+
+	  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 qlogicfc.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_QLOGIC_FC_FIRMWARE
+	bool "Include loadable firmware in driver"
+	depends on SCSI_QLOGIC_FC
+
+config SCSI_QLOGIC_1280
+	tristate "Qlogic QLA 1280 SCSI support"
+	depends on PCI && SCSI
+	help
+	  Say Y if you have a QLogic ISP1x80/1x160 SCSI host adapter.
+
+	  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 qla1280.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_SEAGATE
+	tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support"
+	depends on X86 && ISA && SCSI
+	---help---
+	  These are 8-bit SCSI controllers; the ST-01 is also supported by
+	  this driver.  It is explained in section 3.9 of the SCSI-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.  If it
+	  doesn't work out of the box, you may have to change some settings in
+	  <file:drivers/scsi/seagate.h>.
+
+	  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 seagate.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+# definitely looks note 64bit safe:
+config SCSI_SIM710
+	tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
+	depends on (ISA || MCA && !X86_64) && SCSI
+	---help---
+	  This is a simple driver for NCR53c710 based SCSI host adapters.
+
+	  More complex drivers for this chip are available ("NCR53c7,8xx SCSI
+	  support", above), but they require that the scsi chip be able to do
+	  DMA block moves between memory and on-chip registers, which can
+	  cause problems under certain conditions.  This driver is designed to
+	  avoid these problems and is intended to work with any Intel machines
+	  using 53c710 chips, including various Compaq and NCR machines.
+
+	  Please read the comments at the top of the file
+	  <file:drivers/scsi/sim710.c> for more information.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called sim710.o.
+
+config SCSI_SYM53C416
+	tristate "Symbios 53c416 SCSI support"
+	depends on SCSI && ISA
+	---help---
+	  This is support for the sym53c416 SCSI host adapter, the SCSI
+	  adapter that comes with some HP scanners. This driver requires that
+	  the sym53c416 is configured first using some sort of PnP
+	  configuration program (e.g. isapnp) or by a PnP aware BIOS. If you
+	  are using isapnp then you need to compile this driver as a module
+	  and then load it using insmod after isapnp has run. The parameters
+	  of the configured card(s) should be passed to the driver. The format
+	  is:
+
+	  insmod sym53c416 sym53c416=<base>,<irq> [sym53c416_1=<base>,<irq>]
+
+	  There is support for up to four adapters. If you want to compile
+	  this driver as a module ( = code which can be inserted in and
+	  removed from the running kernel whenever you want), say M here and
+	  read <file:Documentation/modules.txt>. The module will be called
+	  sym53c416.o.
+
+config SCSI_DC390T
+	tristate "Tekram DC390(T) and Am53/79C974 SCSI support"
+	depends on PCI && SCSI
+	---help---
+	  This driver supports PCI SCSI host adapters based on the Am53C974A
+	  chip, e.g. Tekram DC390(T), DawiControl 2974 and some onboard
+	  PCscsi/PCnet (Am53/79C974) solutions.
+
+	  Documentation can be found in <file:drivers/scsi/README.tmscsim>.
+
+	  Note that this driver does NOT support Tekram DC390W/U/F, which are
+	  based on NCR/Symbios chips. Use "NCR53C8XX SCSI support" for those.
+	  Also note that there is another generic Am53C974 driver,
+	  "AM53/79C974 PCI SCSI support" below.  You can pick either one.
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called tmscsim.o.
+
+config SCSI_DC390T_NOGENSUPP
+	bool "_omit_ support for non-DC390 adapters"
+	depends on SCSI_DC390T
+	---help---
+	  If you say N here, the DC390(T) SCSI driver relies on the DC390
+	  EEPROM to get initial values for its settings, such as speed,
+	  termination, etc.  If it can't find this EEPROM, it will use
+	  defaults or the user supplied boot/module parameters.  For details
+	  on driver configuration see <file:drivers/scsi/README.tmscsim>.
+
+	  If you say Y here and if no EEPROM is found, the driver gives up and
+	  thus only supports Tekram DC390(T) adapters.  This can be useful if
+	  you have a DC390(T) and another Am53C974 based adapter, which, for
+	  some reason, you want to drive with the other AM53C974 driver.
+
+	  If unsure, say N.
+
+config SCSI_T128
+	tristate "Trantor T128/T128F/T228 SCSI support"
+	depends on SCSI && ISA
+	---help---
+	  This is support for a SCSI host adapter. It is explained in section
+	  3.11 of the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/t128.h>.  Note that Trantor was purchased by
+	  Adaptec, and some former Trantor products are being sold under the
+	  Adaptec name.
+
+	  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 t128.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_U14_34F
+	tristate "UltraStor 14F/34F support"
+	depends on SCSI
+	---help---
+	  This is support for the UltraStor 14F and 34F SCSI-2 host adapters.
+	  The source at <file:drivers/scsi/u14-34f.c> contains some
+	  information about this hardware.  If the driver doesn't work out of
+	  the box, you may have to change some settings in
+	  <file: drivers/scsi/u14-34f.c>.  Read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  Note that there is also
+	  another driver for the same hardware: "UltraStor SCSI support",
+	  below.  You should say Y to both only if you want 24F support as
+	  well.
+
+	  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 u14-34f.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_U14_34F_LINKED_COMMANDS
+	bool "enable elevator sorting"
+	depends on SCSI_U14_34F
+	help
+	  This option enables elevator sorting for all probed SCSI disks and
+	  CD-ROMs. It definitely reduces the average seek distance when doing
+	  random seeks, but this does not necessarily result in a noticeable
+	  performance improvement: your mileage may vary...
+
+	  The safe answer is N.
+
+config SCSI_U14_34F_MAX_TAGS
+	int "maximum number of queued commands"
+	depends on SCSI_U14_34F
+	default "8"
+	help
+	  This specifies how many SCSI commands can be maximally queued for
+	  each probed SCSI device. You should reduce the default value of 8
+	  only if you have disks with buggy or limited tagged command support.
+	  Minimum is 2 and maximum is 14. This value is also the window size
+	  used by the elevator sorting option above. The effective value used
+	  by the driver for each probed SCSI device is reported at boot time.
+
+config SCSI_ULTRASTOR
+	tristate "UltraStor SCSI support"
+	depends on X86 && ISA && SCSI
+	---help---
+	  This is support for the UltraStor 14F, 24F and 34F SCSI-2 host
+	  adapter family.  This driver is explained in section 3.12 of the
+	  SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  If it doesn't work out
+	  of the box, you may have to change some settings in
+	  <file:drivers/scsi/ultrastor.h>.
+
+	  Note that there is also another driver for the same hardware:
+	  "UltraStor 14F/34F support", above.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ultrastor.o.
+
+config SCSI_NSP32
+	tristate "Workbit NinjaSCSI-32Bi/UDE support"
+	depends on SCSI
+	help
+	  This is support for the Workbit NinjaSCSI-32Bi/UDE PCI/Cardbus
+	  SCSI host adapter. Please read the SCSI-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called nsp32.o.
+
+#
+# Note - this is a very special 'host' adapter that simulates the presence of some disks.
+# It can come in very handy for troubleshooting.  Anyone else is welcome to use it - all
+# you do is hack it to simulate the condition you want to test for, and then use it.
+#
+# The actual configuration in any kernel release could change at any time as I hack it to
+# simulate various conditions that I am testing.
+#
+config SCSI_DEBUG
+	tristate "SCSI debugging host simulator (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && SCSI
+	help
+	  This is a host adapter simulator that can be programmed to simulate
+	  a large number of conditions that could occur on a real bus. The
+	  advantage is that many hard to reproduce problems can be tested in a
+	  controlled environment where there is reduced risk of losing
+	  important data. This is primarily of use to people trying to debug
+	  the middle and upper layers of the SCSI subsystem. If unsure, say N.
+
+config SCSI_MESH
+	tristate "MESH (Power Mac internal SCSI) support"
+	depends on ALL_PPC && SCSI
+	help
+	  Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
+	  SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the
+	  other Power Macintoshes do). Say Y to include support for this SCSI
+	  adaptor. This driver is also available as a module called mesh.o
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want). If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+config SCSI_MESH_SYNC_RATE
+	int "maximum synchronous transfer rate (MB/s) (0 = async)"
+	depends on SCSI_MESH
+	default "5"
+	help
+	  On Power Macintoshes (and clones) where the MESH SCSI bus adaptor
+	  drives a bus which is entirely internal to the machine (such as the
+	  7500, 7600, 8500, etc.), the MESH is capable of synchronous
+	  operation at up to 10 MB/s. On machines where the SCSI bus
+	  controlled by the MESH can have external devices connected, it is
+	  usually rated at 5 MB/s. 5 is a safe value here unless you know the
+	  MESH SCSI bus is internal only; in that case you can say 10. Say 0
+	  to disable synchronous operation.
+
+config SCSI_MESH_RESET_DELAY_MS
+	int "initial bus reset delay (ms) (0 = no reset)"
+	depends on SCSI_MESH
+	default "4000"
+
+config SCSI_MAC53C94
+	tristate "53C94 (Power Mac external SCSI) support"
+	depends on ALL_PPC && SCSI
+	help
+	  On Power Macintoshes (and clones) with two SCSI buses, the external
+	  SCSI bus is usually controlled by a 53C94 SCSI bus adaptor. Older
+	  machines which only have one SCSI bus, such as the 7200, also use
+	  the 53C94. Say Y to include support for the 53C94.
+
+	  This driver is also available as a module called mac53c94.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+source "drivers/acorn/scsi/Kconfig"
+
+config JAZZ_ESP
+	bool "MIPS JAZZ FAS216 SCSI support"
+	depends on MIPS_JAZZ
+	help
+	  This is the driver for the onboard SCSI host adapter of MIPS Magnum
+	  4000, Acer PICA, Olivetti M700-10 and a few other identical OEM
+	  systems.
+
+config A3000_SCSI
+	tristate "A3000 WD33C93A support"
+	depends on AMIGA && SCSI
+	help
+	  If you have an Amiga 3000 and have SCSI devices connected to the
+	  built-in SCSI controller, say Y. Otherwise, say N. 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 is
+	  called wd33c93.o. If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.
+
+config A4000T_SCSI
+	bool "A4000T SCSI support (EXPERIMENTAL)"
+	depends on AMIGA && EXPERIMENTAL
+	help
+	  Support for the NCR53C710 SCSI controller on the Amiga 4000T.
+
+config A2091_SCSI
+	tristate "A2091/A590 WD33C93A support"
+	depends on ZORRO && SCSI
+	help
+	  If you have a Commodore A2091 SCSI controller, say Y. Otherwise,
+	  say N. 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 is called wd33c93.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config GVP11_SCSI
+	tristate "GVP Series II WD33C93A support"
+	depends on ZORRO && SCSI
+	---help---
+	  If you have a Great Valley Products Series II SCSI controller,
+	  answer Y. Also say Y if you have a later model of GVP SCSI
+	  controller (such as the GVP A4008 or a Combo board). Otherwise,
+	  answer N. This driver does NOT work for the T-Rex series of
+	  accelerators from TekMagic and GVP-M.
+
+	  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 gvp11.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config CYBERSTORM_SCSI
+	tristate "CyberStorm SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga with an original (MkI) Phase5 Cyberstorm
+	  accelerator board and the optional Cyberstorm SCSI controller,
+	  answer Y. Otherwise, say N.
+
+config CYBERSTORMII_SCSI
+	tristate "CyberStorm Mk II SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga with a Phase5 Cyberstorm MkII accelerator board
+	  and the optional Cyberstorm SCSI controller, say Y. Otherwise,
+	  answer N.
+
+config BLZ2060_SCSI
+	tristate "Blizzard 2060 SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga with a Phase5 Blizzard 2060 accelerator board
+	  and want to use the onboard SCSI controller, say Y. Otherwise,
+	  answer N.
+
+config BLZ1230_SCSI
+	tristate "Blizzard 1230IV/1260 SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have an Amiga 1200 with a Phase5 Blizzard 1230IV or Blizzard
+	  1260 accelerator, and the optional SCSI module, say Y. Otherwise,
+	  say N.
+
+config FASTLANE_SCSI
+	tristate "Fastlane SCSI support"
+	depends on ZORRO && SCSI
+	help
+	  If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
+	  one in the near future, say Y to this question. Otherwise, say N.
+
+config A4091_SCSI
+	bool "A4091 SCSI support (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL
+	help
+	  Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller
+	  (1993).  Very obscure -- the 4091 was part of an Amiga 4000 upgrade
+	  plan at the time the Amiga business was sold to DKB.
+
+config WARPENGINE_SCSI
+	bool "WarpEngine SCSI support (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL
+	help
+	  Support for MacroSystem Development's WarpEngine Amiga SCSI-2
+	  controller. Info at
+	  <http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>.
+
+config BLZ603EPLUS_SCSI
+	bool "Blizzard PowerUP 603e+ SCSI (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL
+	help
+	  If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+
+	  accelerator, say Y. Otherwise, say N.
+
+config OKTAGON_SCSI
+	tristate "BSC Oktagon SCSI support (EXPERIMENTAL)"
+	depends on ZORRO && EXPERIMENTAL && SCSI
+	help
+	  If you have the BSC Oktagon SCSI disk controller for the Amiga, say
+	  Y to this question.  If you're in doubt about whether you have one,
+	  see the picture at
+	  <http://amiga.multigraph.com/photos/oktagon.html>.
+
+#      bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI
+#      bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI
+endmenu
+
+source "drivers/scsi/pcmcia/Kconfig"
+
diff -Nru a/drivers/scsi/Makefile b/drivers/scsi/Makefile
--- a/drivers/scsi/Makefile	Wed Oct 30 16:44:32 2002
+++ b/drivers/scsi/Makefile	Wed Oct 30 16:44:32 2002
@@ -65,6 +65,7 @@
 obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o
 obj-$(CONFIG_SCSI_IN2000)	+= in2000.o
 obj-$(CONFIG_SCSI_GENERIC_NCR5380) += g_NCR5380.o
+obj-$(CONFIG_SCSI_GENERIC_NCR5380_MMIO) += g_NCR5380_mmio.o
 obj-$(CONFIG_SCSI_NCR53C406A)	+= NCR53c406a.o
 obj-$(CONFIG_SCSI_NCR_D700)	+= NCR_D700.o 53c700.o
 obj-$(CONFIG_SCSI_SYM53C416)	+= sym53c416.o
@@ -122,8 +123,8 @@
 obj-$(CONFIG_CHR_DEV_SG)	+= sg.o
 
 scsi_mod-objs	:= scsi.o hosts.o scsi_ioctl.o constants.o scsicam.o \
-			scsi_proc.o scsi_error.o scsi_lib.o scsi_merge.o \
-			scsi_scan.o scsi_syms.o
+			scsi_proc.o scsi_error.o scsi_lib.o scsi_scan.o \
+			scsi_syms.o
 			
 sd_mod-objs	:= sd.o
 sr_mod-objs	:= sr.o sr_ioctl.o sr_vendor.o
diff -Nru a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
--- a/drivers/scsi/NCR5380.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/NCR5380.c	Wed Oct 30 16:44:26 2002
@@ -1,6 +1,3 @@
-#ifndef NDEBUG
-#define NDEBUG (NDEBUG_RESTART_SELECT | NDEBUG_ABORT)
-#endif
 /* 
  * NCR 5380 generic driver routines.  These should make it *trivial*
  *      to implement 5380 SCSI drivers under Linux with a non-trantor
@@ -316,8 +313,8 @@
 
 static int do_abort(struct Scsi_Host *host);
 static void do_reset(struct Scsi_Host *host);
-static struct Scsi_Host *first_instance = NULL;
-static Scsi_Host_Template *the_template = NULL;
+static struct NCR5380_hostdata *first_host = NULL;
+static struct NCR5380_hostdata *last_host = NULL;
 static struct timer_list usleep_timer;
 
 /*
@@ -348,7 +345,18 @@
 	}
 }
 
-#include <linux/delay.h>
+static struct {
+	unsigned char value;
+	const char *name;
+} phases[] = {
+	{PHASE_DATAOUT, "DATAOUT"}, 
+	{PHASE_DATAIN, "DATAIN"}, 
+	{PHASE_CMDOUT, "CMDOUT"}, 
+	{PHASE_STATIN, "STATIN"}, 
+	{PHASE_MSGOUT, "MSGOUT"}, 
+	{PHASE_MSGIN, "MSGIN"}, 
+	{PHASE_UNKNOWN, "UNKNOWN"}
+};
 
 #ifdef NDEBUG
 static struct {
@@ -430,18 +438,6 @@
 	printk("\n");
 }
 
-static struct {
-	unsigned char value;
-	const char *name;
-} phases[] = {
-	{PHASE_DATAOUT, "DATAOUT"}, 
-	{PHASE_DATAIN, "DATAIN"}, 
-	{PHASE_CMDOUT, "CMDOUT"}, 
-	{PHASE_STATIN, "STATIN"}, 
-	{PHASE_MSGOUT, "MSGOUT"}, 
-	{PHASE_MSGIN, "MSGIN"}, 
-	{PHASE_UNKNOWN, "UNKNOWN"}
-};
 
 /* 
  *	NCR5380_print_phase	-	show SCSI phase
@@ -470,44 +466,6 @@
 #endif
 
 /*
- * We need to have our coroutine active given these constraints : 
- * 1.  The mutex flag, main_running, can only be set when the main 
- *     routine can actually process data, otherwise SCSI commands
- *     will never get issued.
- *
- * 2.  NCR5380_main() shouldn't be called before it has exited, because
- *     other drivers have had kernel stack overflows in similar
- *     situations.
- *
- * 3.  We don't want to inline NCR5380_main() because of space concerns,
- *     even though it is only called in two places.
- *
- * So, the solution is to set the mutex in an inline wrapper for the 
- * main coroutine, and have the main coroutine exit with interrupts 
- * disabled after the final search through the queues so that no race 
- * conditions are possible.
- */
-
-static unsigned long main_running = 0;
-
-/* 
- * Function : run_main(void)
- * 
- * Purpose : insure that the coroutine is running and will process our 
- *      request.  main_running is checked/set here (in an inline function)
- *      rather than in NCR5380_main itself to reduce the chances of stack
- *      overflow.
- * FIXME: NCR5380_main should probably be run with schedule_task or be a
- * thread.
- */
-
-static __inline__ void run_main(void)
-{
-	if (!test_and_set_bit(0, &main_running))
-		NCR5380_main();
-}
-
-/*
  * These need tweaking, and would probably work best as per-device 
  * flags initialized differently for disk, tape, cd, etc devices.
  * People with broken devices are free to experiment as to what gives
@@ -621,13 +579,17 @@
 static void NCR5380_timer_fn(unsigned long unused)
 {
 	struct Scsi_Host *instance;
+	struct NCR5380_hostdata *hostdata;
 	unsigned long flags;
 
 	spin_lock_irqsave(&timer_lock, flags);
-	for (; expires_first && time_before_eq(((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires, jiffies);) {
-		instance = ((struct NCR5380_hostdata *) expires_first->hostdata)->next_timer;
-		((struct NCR5380_hostdata *) expires_first->hostdata)->next_timer = NULL;
-		((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires = 0;
+	for (; expires_first && time_before_eq(((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires, jiffies);) 
+	{
+		hostdata = (struct NCR5380_hostdata *) expires_first->hostdata;
+		schedule_work(&hostdata->coroutine);
+		instance = hostdata->next_timer;
+		hostdata->next_timer = NULL;
+		hostdata->time_expires = 0;
 		expires_first = instance;
 	}
 
@@ -636,10 +598,7 @@
 		usleep_timer.expires = ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires;
 		add_timer(&usleep_timer);
 	}
-
 	spin_unlock_irqrestore(&timer_lock, flags);
-	
-	run_main();
 }
 
 /**
@@ -779,6 +738,22 @@
 }
 
 /**
+ *	NCR5380_coroutine_running	-	coroutine status
+ *	@instance: controller to check
+ *
+ *	Return true if the co-routine for this controller is running
+ *	or scheduled to run
+ *
+ *	FIXME: this test function belongs in the workqueue code!
+ */
+ 
+static int NCR5380_coroutine_running(struct Scsi_Host *instance)
+{
+	struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *)instance->hostdata;
+	return test_bit(0, &hostdata->coroutine.pending);
+}
+
+/**
  *	NCR5380_print_status 	-	dump controller info
  *	@instance: controller to dump
  *
@@ -794,7 +769,7 @@
 	char *start;
 	int len;
 
-	printk("NCR5380 : coroutine is%s running.\n", main_running ? "" : "n't");
+	printk("NCR5380 : coroutine is%s running.\n",  NCR5380_coroutine_running(instance)? "" : "n't");
 
 	NCR5380_dprint(NDEBUG_ANY, instance);
 	NCR5380_dprint_phase(NDEBUG_ANY, instance);
@@ -837,7 +812,7 @@
 	struct NCR5380_hostdata *hostdata;
 	Scsi_Cmnd *ptr;
 
-	for (instance = first_instance; instance && instance->host_no != hostno; instance = instance->next);
+	instance = scsi_host_hn_get(hostno);
 	if (!instance)
 		return (-ESRCH);
 	hostdata = (struct NCR5380_hostdata *) instance->hostdata;
@@ -881,7 +856,7 @@
 	SPRINTF("Highwater I/O busy_spin_counts -- write: %d  read: %d\n", pas_wmaxi, pas_maxi);
 #endif
 	spin_lock_irq(instance->host_lock);
-	SPRINTF("NCR5380 : coroutine is%s running.\n", main_running ? "" : "n't");
+	SPRINTF("NCR5380 : coroutine is%s running.\n", NCR5380_coroutine_running(instance) ? "" : "n't");
 	if (!hostdata->connected)
 		SPRINTF("scsi%d: no currently connected command\n", instance->host_no);
 	else
@@ -904,8 +879,7 @@
 	return length;
 }
 
-static
-char *lprint_Scsi_Cmnd(Scsi_Cmnd * cmd, char *pos, char *buffer, int length)
+static char *lprint_Scsi_Cmnd(Scsi_Cmnd * cmd, char *pos, char *buffer, int length)
 {
 	SPRINTF("scsi%d : destination target %d, lun %d\n", cmd->host->host_no, cmd->target, cmd->lun);
 	SPRINTF("        command = ");
@@ -913,8 +887,7 @@
 	return (pos);
 }
 
-static
-char *lprint_command(unsigned char *command, char *pos, char *buffer, int length)
+static char *lprint_command(unsigned char *command, char *pos, char *buffer, int length)
 {
 	int i, s;
 	pos = lprint_opcode(command[0], pos, buffer, length);
@@ -924,8 +897,7 @@
 	return (pos);
 }
 
-static
-char *lprint_opcode(int opcode, char *pos, char *buffer, int length)
+static char *lprint_opcode(int opcode, char *pos, char *buffer, int length)
 {
 	SPRINTF("%2d (0x%02x)", opcode, opcode);
 	return (pos);
@@ -943,10 +915,12 @@
  *	Notes : I assume that the host, hostno, and id bits have been
  *      set correctly.  I don't care about the irq and other fields. 
  *
+ *	Returns 0 for success
+ *
  *	Locks: interrupts must be enabled when we are called 
  */
 
-static void __init NCR5380_init(struct Scsi_Host *instance, int flags)
+static int __init NCR5380_init(struct Scsi_Host *instance, int flags)
 {
 	NCR5380_local_declare();
 	int i, pass;
@@ -982,6 +956,9 @@
 	hostdata->connected = NULL;
 	hostdata->issue_queue = NULL;
 	hostdata->disconnected_queue = NULL;
+	
+	INIT_WORK(&hostdata->coroutine, NCR5380_main, hostdata);
+	
 #ifdef NCR5380_STATS
 	for (i = 0; i < 8; ++i) {
 		hostdata->time_read[i] = 0;
@@ -1000,10 +977,16 @@
 	else
 		hostdata->flags = FLAG_CHECK_LAST_BYTE_SENT | flags;
 
-	if (!the_template) {
-		the_template = instance->hostt;
-		first_instance = instance;
-	}
+	hostdata->next = NULL;
+	
+	if (!first_host)
+		first_host = hostdata;
+	else
+		last_host->next = hostdata;
+
+	last_host = hostdata;
+	
+	hostdata->host = instance;
 	hostdata->time_expires = 0;
 	hostdata->next_timer = NULL;
 
@@ -1041,22 +1024,28 @@
 		case 1:
 		case 3:
 		case 5:
-			printk("scsi%d: SCSI bus busy, waiting up to five seconds\n", instance->host_no);
+			printk(KERN_INFO "scsi%d: SCSI bus busy, waiting up to five seconds\n", instance->host_no);
 			timeout = jiffies + 5 * HZ;
-			while (time_before(jiffies, timeout) && (NCR5380_read(STATUS_REG) & SR_BSY));
+			while (time_before(jiffies, timeout) && (NCR5380_read(STATUS_REG) & SR_BSY))
+			{
+				set_current_state(TASK_UNINTERRUPTIBLE);
+				schedule_timeout(1);
+			}
 			break;
 		case 2:
-			printk("scsi%d: bus busy, attempting abort\n", instance->host_no);
+			printk(KERN_WARNING "scsi%d: bus busy, attempting abort\n", instance->host_no);
 			do_abort(instance);
 			break;
 		case 4:
-			printk("scsi%d: bus busy, attempting reset\n", instance->host_no);
+			printk(KERN_WARNING "scsi%d: bus busy, attempting reset\n", instance->host_no);
 			do_reset(instance);
 			break;
 		case 6:
-			printk("scsi%d: bus locked solid or invalid override\n", instance->host_no);
+			printk(KERN_ERR "scsi%d: bus locked solid or invalid override\n", instance->host_no);
+			return -ENXIO;
 		}
 	}
+	return 0;
 }
 
 /**
@@ -1072,15 +1061,11 @@
  *	retake this lock. Called functions take dma lock.
  */
 
-/* Only make static if a wrapper function is used */
-#ifndef NCR5380_queue_command
-static
-#endif
-int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) {
+static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) 
+{
 	struct Scsi_Host *instance = cmd->host;
 	struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) instance->hostdata;
 	Scsi_Cmnd *tmp;
-	unsigned long flags;
 
 #if (NDEBUG & NDEBUG_NO_WRITE)
 	switch (cmd->cmnd[0]) {
@@ -1093,7 +1078,6 @@
 	}
 #endif				/* (NDEBUG & NDEBUG_NO_WRITE) */
 
-	spin_lock_irqsave(instance->host_lock, flags);
 #ifdef NCR5380_STATS
 	switch (cmd->cmnd[0]) {
 		case WRITE:
@@ -1141,9 +1125,8 @@
 	dprintk(NDEBUG_QUEUES, ("scsi%d : command added to %s of queue\n", instance->host_no, (cmd->cmnd[0] == REQUEST_SENSE) ? "head" : "tail"));
 
 	/* Run the coroutine if it isn't already running. */
-	spin_unlock_irqrestore(instance->host_lock, flags);
-	
-	run_main();
+	/* Kick off command processing */
+	schedule_work(&hostdata->coroutine);
 	return 0;
 }
 
@@ -1155,21 +1138,22 @@
  *      NCR5380_queue_command() and NCR5380_intr() will try to start it 
  *      in case it is not running.
  * 
- *	Locks; The caller must hold the io_request_lock. The lock will still be
- *	held on return but may be dropped while running. Called functions take
- *	the DMA lock.
+ *	Locks: called as its own thread with no locks held. Takes the
+ *	host lock and called routines may take the isa dma lock.
  */
 
-static void NCR5380_main(void) {
+static void NCR5380_main(void *p)
+{
+	struct NCR5380_hostdata *hostdata = p;
 	Scsi_Cmnd *tmp, *prev;
 	struct Scsi_Host *instance;
-	struct NCR5380_hostdata *hostdata;
 	int done;
-
+	unsigned long flags;
+	
 	/*
 	 * We run (with interrupts disabled) until we're sure that none of 
 	 * the host adapters have anything that can be done, at which point 
-	 * we set main_running to 0 and exit.
+	 * we can exit
 	 *
 	 * Interrupts are enabled before doing various other internal 
 	 * instructions, after we've decided that we need to run through
@@ -1178,113 +1162,112 @@
 	 * this should prevent any race conditions.
 	 */
 
+	instance = hostdata->host;
+
+	spin_lock_irqsave(instance->host_lock, flags);
+
 	do {
 		/* Lock held here */
 		done = 1;
-		for (instance = first_instance; instance && instance->hostt == the_template; instance = instance->next) {
-			hostdata = (struct NCR5380_hostdata *) instance->hostdata;
-			/* Lock held here */
-			if (!hostdata->connected && !hostdata->selecting) {
-				dprintk(NDEBUG_MAIN, ("scsi%d : not connected\n", instance->host_no));
-				/*
-				 * Search through the issue_queue for a command destined
-				 * for a target that's not busy.
-				 */
-				for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble) 
-				{
-					if (prev != tmp)
-						dprintk(NDEBUG_LISTS, ("MAIN tmp=%p   target=%d   busy=%d lun=%d\n", tmp, tmp->target, hostdata->busy[tmp->target], tmp->lun));
-					/*  When we find one, remove it from the issue queue. */
-					if (!(hostdata->busy[tmp->target] & (1 << tmp->lun))) {
-						if (prev) {
-							REMOVE(prev, prev->host_scribble, tmp, tmp->host_scribble);
-							prev->host_scribble = tmp->host_scribble;
-						} else {
-							REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble);
-							hostdata->issue_queue = (Scsi_Cmnd *) tmp->host_scribble;
-						}
-						tmp->host_scribble = NULL;
-
-
-						/* 
-						 * Attempt to establish an I_T_L nexus here. 
-						 * On success, instance->hostdata->connected is set.
-						 * On failure, we must add the command back to the
-						 *   issue queue so we can keep trying. 
-						 */
-						dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, ("scsi%d : main() : command for target %d lun %d removed from issue_queue\n", instance->host_no, tmp->target, tmp->lun));
-
-						/*
-						 * A successful selection is defined as one that 
-						 * leaves us with the command connected and 
-						 * in hostdata->connected, OR has terminated the
-						 * command.
-						 *
-						 * With successful commands, we fall through
-						 * and see if we can do an information transfer,
-						 * with failures we will restart.
-						 */
-						hostdata->selecting = 0;	
-						/* RvC: have to preset this to indicate a new command is being performed */
+		if (!hostdata->connected && !hostdata->selecting) {
+			dprintk(NDEBUG_MAIN, ("scsi%d : not connected\n", instance->host_no));
+			/*
+			 * Search through the issue_queue for a command destined
+			 * for a target that's not busy.
+			 */
+			for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble) 
+			{
+				if (prev != tmp)
+					dprintk(NDEBUG_LISTS, ("MAIN tmp=%p   target=%d   busy=%d lun=%d\n", tmp, tmp->target, hostdata->busy[tmp->target], tmp->lun));
+				/*  When we find one, remove it from the issue queue. */
+				if (!(hostdata->busy[tmp->target] & (1 << tmp->lun))) {
+					if (prev) {
+						REMOVE(prev, prev->host_scribble, tmp, tmp->host_scribble);
+						prev->host_scribble = tmp->host_scribble;
+					} else {
+						REMOVE(-1, hostdata->issue_queue, tmp, tmp->host_scribble);
+						hostdata->issue_queue = (Scsi_Cmnd *) tmp->host_scribble;
+					}
+					tmp->host_scribble = NULL;
 
-						if (!NCR5380_select(instance, tmp,
-								    /* 
-								     * REQUEST SENSE commands are issued without tagged
-								     * queueing, even on SCSI-II devices because the 
-								     * contingent allegiance condition exists for the 
-								     * entire unit.
-								     */
-								    (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
-							break;
-						} else {
-							LIST(tmp, hostdata->issue_queue);
-							tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
-							hostdata->issue_queue = tmp;
-							done = 0;
-							dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, ("scsi%d : main(): select() failed, returned to issue_queue\n", instance->host_no));
-						}
-						/* lock held here still */
-					}	/* if target/lun is not busy */
-				}	/* for */
-				/* exited locked */
-			}	/* if (!hostdata->connected) */
-			if (hostdata->selecting) {
-				tmp = (Scsi_Cmnd *) hostdata->selecting;
-				/* Selection will drop and retake the lock */
-				if (!NCR5380_select(instance, tmp, (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
-					/* Ok ?? */
-				} else {
-					/* RvC: device failed, so we wait a long time
-					   this is needed for Mustek scanners, that
-					   do not respond to commands immediately
-					   after a scan */
-					printk(KERN_DEBUG "scsi%d: device %d did not respond in time\n", instance->host_no, tmp->target);
-					//spin_lock_irq(&io_request_lock);
-					LIST(tmp, hostdata->issue_queue);
-					tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
-					hostdata->issue_queue = tmp;
-					//spin_unlock_irq(&io_request_lock);
-
-					hostdata->time_expires = jiffies + USLEEP_WAITLONG;
-					NCR5380_set_timer(instance);
-				}
-			}	/* if hostdata->selecting */
-			if (hostdata->connected
+					/* 
+					 * Attempt to establish an I_T_L nexus here. 
+					 * On success, instance->hostdata->connected is set.
+					 * On failure, we must add the command back to the
+					 *   issue queue so we can keep trying. 
+					 */
+					dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, ("scsi%d : main() : command for target %d lun %d removed from issue_queue\n", instance->host_no, tmp->target, tmp->lun));
+	
+					/*
+					 * A successful selection is defined as one that 
+					 * leaves us with the command connected and 
+					 * in hostdata->connected, OR has terminated the
+					 * command.
+					 *
+					 * With successful commands, we fall through
+					 * and see if we can do an information transfer,
+					 * with failures we will restart.
+					 */
+					hostdata->selecting = 0;	
+					/* RvC: have to preset this to indicate a new command is being performed */
+
+					if (!NCR5380_select(instance, tmp,
+							    /* 
+							     * REQUEST SENSE commands are issued without tagged
+							     * queueing, even on SCSI-II devices because the 
+							     * contingent allegiance condition exists for the 
+							     * entire unit.
+							     */
+							    (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
+						break;
+					} else {
+						LIST(tmp, hostdata->issue_queue);
+						tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
+						hostdata->issue_queue = tmp;
+						done = 0;
+						dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, ("scsi%d : main(): select() failed, returned to issue_queue\n", instance->host_no));
+					}
+					/* lock held here still */
+				}	/* if target/lun is not busy */
+			}	/* for */
+			/* exited locked */
+		}	/* if (!hostdata->connected) */
+		if (hostdata->selecting) {
+			tmp = (Scsi_Cmnd *) hostdata->selecting;
+			/* Selection will drop and retake the lock */
+			if (!NCR5380_select(instance, tmp, (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : TAG_NEXT)) {
+				/* Ok ?? */
+			} else {
+				/* RvC: device failed, so we wait a long time
+				   this is needed for Mustek scanners, that
+				   do not respond to commands immediately
+				   after a scan */
+				printk(KERN_DEBUG "scsi%d: device %d did not respond in time\n", instance->host_no, tmp->target);
+				//spin_lock_irq(&io_request_lock);
+				LIST(tmp, hostdata->issue_queue);
+				tmp->host_scribble = (unsigned char *) hostdata->issue_queue;
+				hostdata->issue_queue = tmp;
+				//spin_unlock_irq(&io_request_lock);
+
+				hostdata->time_expires = jiffies + USLEEP_WAITLONG;
+				NCR5380_set_timer(instance);
+			}
+		}	/* if hostdata->selecting */
+		if (hostdata->connected
 #ifdef REAL_DMA
-			    && !hostdata->dmalen
+		    && !hostdata->dmalen
 #endif
-			    && (!hostdata->time_expires || time_before_eq(hostdata->time_expires, jiffies))
-			    ) {
-				dprintk(NDEBUG_MAIN, ("scsi%d : main() : performing information transfer\n", instance->host_no));
-				NCR5380_information_transfer(instance);
-				dprintk(NDEBUG_MAIN, ("scsi%d : main() : done set false\n", instance->host_no));
-				done = 0;
-			} else
-				break;
-		}		/* for instance */
+		    && (!hostdata->time_expires || time_before_eq(hostdata->time_expires, jiffies))
+		    ) {
+			dprintk(NDEBUG_MAIN, ("scsi%d : main() : performing information transfer\n", instance->host_no));
+			NCR5380_information_transfer(instance);
+			dprintk(NDEBUG_MAIN, ("scsi%d : main() : done set false\n", instance->host_no));
+			done = 0;
+		} else
+			break;
 	} while (!done);
-	/* Exit lock held */
-	clear_bit(0, &main_running);
+	
+	spin_unlock_irqrestore(instance->host_lock, flags);
 }
 
 #ifndef DONT_USE_INTR
@@ -1308,6 +1291,7 @@
 	struct Scsi_Host *instance;
 	int done;
 	unsigned char basr;
+	struct NCR5380_hostdata *hostdata;
 
 	dprintk(NDEBUG_INTR, ("scsi : NCR5380 irq %d triggered\n", irq));
 
@@ -1315,8 +1299,9 @@
 		done = 1;
 		/* The instance list is constant while the driver is
 		   loaded */
-		for (instance = first_instance; instance && (instance->hostt == the_template); instance = instance->next)
+		for (hostdata = first_host; hostdata != NULL; hostdata = hostdata->next)
 		{
+			instance = hostdata->host;
 			if (instance->irq == irq) {
 				spin_lock_irq(instance->host_lock);
 				/* Look for pending interrupts */
@@ -1385,8 +1370,8 @@
 					}
 				}	/* if BASR_IRQ */
 				spin_unlock_irq(instance->host_lock);
-				if (!done)
-					run_main();
+				if(!done)
+					schedule_work(&hostdata->coroutine);
 			}	/* if (instance->irq == irq) */
 		}
 	} while (!done);
diff -Nru a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
--- a/drivers/scsi/NCR5380.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/NCR5380.h	Wed Oct 30 16:44:29 2002
@@ -248,6 +248,8 @@
 #ifndef ASM
 struct NCR5380_hostdata {
 	NCR5380_implementation_fields;		/* implementation specific */
+	struct Scsi_Host *host;			/* Host backpointer */
+	struct NCR5380_hostdata *next;		/* Next in our hot chain */
 	unsigned char id_mask, id_higher_mask;	/* 1 << id, all bits greater */
 	unsigned char targets_present;		/* targets we have connected
 						   to, so we can call a select
@@ -269,6 +271,7 @@
 	struct Scsi_Host *next_timer;
 	int select_time;			/* timer in select for target response */
 	volatile Scsi_Cmnd *selecting;
+	struct work_struct coroutine;		/* our co-routine */
 #ifdef NCR5380_STATS
 	unsigned timebase;			/* Base for time calcs */
 	long time_read[8];			/* time to do reads */
@@ -281,7 +284,6 @@
 };
 
 #ifdef __KERNEL__
-static struct Scsi_Host *first_instance;	/* linked list of 5380's */
 
 #define dprintk(a,b)			do {} while(0)
 #define NCR5380_dprint(a,b)		do {} while(0)
@@ -290,36 +292,22 @@
 #if defined(AUTOPROBE_IRQ)
 static int NCR5380_probe_irq(struct Scsi_Host *instance, int possible);
 #endif
-static void NCR5380_init(struct Scsi_Host *instance, int flags);
+static int NCR5380_init(struct Scsi_Host *instance, int flags);
 static void NCR5380_information_transfer(struct Scsi_Host *instance);
 #ifndef DONT_USE_INTR
 static void NCR5380_intr(int irq, void *dev_id, struct pt_regs *regs);
-static void do_NCR5380_intr(int irq, void *dev_id, struct pt_regs *regs);
 #endif
-static void NCR5380_main(void);
+static void NCR5380_main(void *ptr);
 static void NCR5380_print_options(struct Scsi_Host *instance);
+#ifdef NDEBUG
 static void NCR5380_print_phase(struct Scsi_Host *instance);
 static void NCR5380_print(struct Scsi_Host *instance);
-#ifndef NCR5380_abort
-static
 #endif
-int NCR5380_abort(Scsi_Cmnd * cmd);
-#ifndef NCR5380_bus_reset
-static
-#endif
-int NCR5380_bus_reset(Scsi_Cmnd * cmd);
-#ifndef NCR5380_host_reset
-static
-#endif
-int NCR5380_host_reset(Scsi_Cmnd * cmd);
-#ifndef NCR5380_device_reset
-static
-#endif
-int NCR5380_device_reset(Scsi_Cmnd * cmd);
-#ifndef NCR5380_queue_command
-static
-#endif
-int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *));
+static int NCR5380_abort(Scsi_Cmnd * cmd);
+static int NCR5380_bus_reset(Scsi_Cmnd * cmd);
+static int NCR5380_host_reset(Scsi_Cmnd * cmd);
+static int NCR5380_device_reset(Scsi_Cmnd * cmd);
+static int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *));
 
 
 static void NCR5380_reselect(struct Scsi_Host *instance);
diff -Nru a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c
--- a/drivers/scsi/NCR53c406a.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/NCR53c406a.c	Wed Oct 30 16:44:28 2002
@@ -26,9 +26,9 @@
 #define USE_PIO 1
 
 #define USE_BIOS 0
-/* #define BIOS_ADDR 0xD8000 */ /* define this if autoprobe fails */
-/* #define PORT_BASE 0x330 */   /* define this if autoprobe fails */
-/* #define IRQ_LEV   0	*/      /* define this if autoprobe fails */
+				/* #define BIOS_ADDR 0xD8000 *//* define this if autoprobe fails */
+				/* #define PORT_BASE 0x330 *//* define this if autoprobe fails */
+				/* #define IRQ_LEV   0	*//* define this if autoprobe fails */
 #define DMA_CHAN  5		/* this is ignored if DMA is disabled */
 
 /* Set this to 0 if you encounter kernel lockups while transferring 
@@ -55,15 +55,13 @@
 #include <linux/spinlock.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
-
 #include "NCR53c406a.h"
 
 /* ============================================================= */
 
 #define WATCHDOG 5000000
 
-#define SYNC_MODE 0 		/* Synchronous transfer mode */
+#define SYNC_MODE 0		/* Synchronous transfer mode */
 
 #if DEBUG
 #undef NCR53C406A_DEBUG
@@ -161,24 +159,24 @@
 /*----------------------------------------------------------------*/
 
 enum Phase {
-    idle,
-    data_out,
-    data_in,
-    command_ph,
-    status_ph,
-    message_out,
-    message_in
+	idle,
+	data_out,
+	data_in,
+	command_ph,
+	status_ph,
+	message_out,
+	message_in
 };
 
 /* Static function prototypes */
-static  void NCR53c406a_intr(int, void *, struct pt_regs *);
-static  void do_NCR53c406a_intr(int, void *, struct pt_regs *);
-static  void internal_done(Scsi_Cmnd *);
-static  void wait_intr(void);
-static  void chip_init(void);
-static  void calc_port_addr(void);
+static void NCR53c406a_intr(int, void *, struct pt_regs *);
+static void do_NCR53c406a_intr(int, void *, struct pt_regs *);
+static void internal_done(Scsi_Cmnd *);
+static void wait_intr(void);
+static void chip_init(void);
+static void calc_port_addr(void);
 #ifndef IRQ_LEV
-static  int  irq_probe(void);
+static int irq_probe(void);
 #endif
 
 /* ================================================================= */
@@ -188,26 +186,26 @@
 #endif
 
 #if PORT_BASE
-static int   port_base = PORT_BASE;
+static int port_base = PORT_BASE;
 #else
-static int   port_base;
+static int port_base;
 #endif
 
 #if IRQ_LEV
-static int   irq_level = IRQ_LEV;
+static int irq_level = IRQ_LEV;
 #else
-static int   irq_level = -1; /* 0 is 'no irq', so use -1 for 'uninitialized'*/
+static int irq_level = -1;	/* 0 is 'no irq', so use -1 for 'uninitialized' */
 #endif
 
 #if USE_DMA
-static int   dma_chan;
+static int dma_chan;
 #endif
 
 #if USE_PIO
-static int   fast_pio = USE_FAST_PIO;
+static int fast_pio = USE_FAST_PIO;
 #endif
 
-static Scsi_Cmnd         *current_SC;
+static Scsi_Cmnd *current_SC;
 static volatile int internal_done_flag;
 static volatile int internal_done_errcode;
 static char info_msg[256];
@@ -217,15 +215,14 @@
 /* possible BIOS locations */
 #if USE_BIOS
 static void *addresses[] = {
-    (void *)0xd8000,
-    (void *)0xc8000
+	(void *) 0xd8000,
+	(void *) 0xc8000
 };
 #define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned ))
-#endif /* USE_BIOS */
-		       
+#endif				/* USE_BIOS */
+
 /* possible i/o port addresses */
-static unsigned short ports[] =
-  { 0x230, 0x330, 0x280, 0x290, 0x330, 0x340, 0x300, 0x310, 0x348, 0x350 };
+static unsigned short ports[] = { 0x230, 0x330, 0x280, 0x290, 0x330, 0x340, 0x300, 0x310, 0x348, 0x350 };
 #define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short ))
 
 /* possible interrupt channels */
@@ -235,847 +232,837 @@
 /* signatures for NCR 53c406a based controllers */
 #if USE_BIOS
 struct signature {
-    char *signature;
-    int  sig_offset;
-    int  sig_length;
+	char *signature;
+	int sig_offset;
+	int sig_length;
 } signatures[] __initdata = {
-    /*          1         2         3         4         5         6 */
-    /* 123456789012345678901234567890123456789012345678901234567890 */
-    { "Copyright (C) Acculogic, Inc.\r\n2.8M Diskette Extension Bios ver 4.04.03 03/01/1993", 61, 82 },
-};
+	/*          1         2         3         4         5         6 */
+	/* 123456789012345678901234567890123456789012345678901234567890 */
+	{
+"Copyright (C) Acculogic, Inc.\r\n2.8M Diskette Extension Bios ver 4.04.03 03/01/1993", 61, 82},};
+
 #define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature ))
-#endif /* USE_BIOS */
+#endif				/* USE_BIOS */
 
 /* ============================================================ */
 
 /* Control Register Set 0 */
-static int TC_LSB;		/* transfer counter lsb 	*/
-static int TC_MSB;		/* transfer counter msb	*/
-static int SCSI_FIFO;		/* scsi fifo register	*/
-static int CMD_REG;		/* command register		*/
-static int STAT_REG;		/* status register		*/
+static int TC_LSB;		/* transfer counter lsb         */
+static int TC_MSB;		/* transfer counter msb */
+static int SCSI_FIFO;		/* scsi fifo register   */
+static int CMD_REG;		/* command register             */
+static int STAT_REG;		/* status register              */
 static int DEST_ID;		/* selection/reselection bus id */
 static int INT_REG;		/* interrupt status register    */
 static int SRTIMOUT;		/* select/reselect timeout reg  */
-static int SEQ_REG;		/* sequence step register	*/
+static int SEQ_REG;		/* sequence step register       */
 static int SYNCPRD;		/* synchronous transfer period  */
 static int FIFO_FLAGS;		/* indicates # of bytes in fifo */
 static int SYNCOFF;		/* synchronous offset register  */
-static int CONFIG1;		/* configuration register	*/
-static int CLKCONV;		/* clock conversion reg	*/
-/*static int TESTREG;*/		/* test mode register		*/
+static int CONFIG1;		/* configuration register       */
+static int CLKCONV;		/* clock conversion reg */
+				/*static int TESTREG;*//* test mode register           */
 static int CONFIG2;		/* Configuration 2 Register     */
-static int CONFIG3;		/* Configuration 3 Register	*/
+static int CONFIG3;		/* Configuration 3 Register     */
 static int CONFIG4;		/* Configuration 4 Register     */
 static int TC_HIGH;		/* Transfer Counter High */
-/*static int FIFO_BOTTOM;*/	/* Reserve FIFO byte register   */
+				/*static int FIFO_BOTTOM;*//* Reserve FIFO byte register   */
 
 /* Control Register Set 1 */
-/*static int JUMPER_SENSE;*/	/* Jumper sense port reg (r/w) */
-/*static int SRAM_PTR;*/	/* SRAM address pointer reg (r/w) */
-/*static int SRAM_DATA;*/	/* SRAM data register (r/w) */
+				/*static int JUMPER_SENSE;*//* Jumper sense port reg (r/w) */
+				/*static int SRAM_PTR;*//* SRAM address pointer reg (r/w) */
+				/*static int SRAM_DATA;*//* SRAM data register (r/w) */
 static int PIO_FIFO;		/* PIO FIFO registers (r/w) */
-/*static int PIO_FIFO1;*/	/*  */
-/*static int PIO_FIFO2;*/	/*  */
-/*static int PIO_FIFO3;*/	/*  */
+				/*static int PIO_FIFO1;*//*  */
+				/*static int PIO_FIFO2;*//*  */
+				/*static int PIO_FIFO3;*//*  */
 static int PIO_STATUS;		/* PIO status (r/w) */
-/*static int ATA_CMD;*/		/* ATA command/status reg (r/w) */
-/*static int ATA_ERR;*/		/* ATA features/error register (r/w)*/
+				/*static int ATA_CMD;*//* ATA command/status reg (r/w) */
+				/*static int ATA_ERR;*//* ATA features/error register (r/w) */
 static int PIO_FLAG;		/* PIO flag interrupt enable (r/w) */
 static int CONFIG5;		/* Configuration 5 register (r/w) */
-/*static int SIGNATURE;*/	/* Signature Register (r) */
-/*static int CONFIG6;*/		/* Configuration 6 register (r) */
+				/*static int SIGNATURE;*//* Signature Register (r) */
+				/*static int CONFIG6;*//* Configuration 6 register (r) */
 
 /* ============================================================== */
 
 #if USE_DMA
-static __inline__ int 
-NCR53c406a_dma_setup (unsigned char *ptr, 
-		      unsigned int count, 
-		      unsigned char mode) {
-    unsigned limit;
-    unsigned long flags = 0;
-    
-    VDEB(printk("dma: before count=%d   ", count));
-    if (dma_chan <=3) {
-        if (count > 65536)
-            count = 65536;
-        limit = 65536 - (((unsigned) ptr) & 0xFFFF);
-    } else {
-        if (count > (65536<<1)) 
-            count = (65536<<1);
-        limit = (65536<<1) - (((unsigned) ptr) & 0x1FFFF);
-    }
-    
-    if (count > limit) count = limit;
-    
-    VDEB(printk("after count=%d\n", count));
-    if ((count & 1) || (((unsigned) ptr) & 1))
-        panic ("NCR53c406a: attempted unaligned DMA transfer\n"); 
-    
-    flags=claim_dma_lock();
-    disable_dma(dma_chan);
-    clear_dma_ff(dma_chan);
-    set_dma_addr(dma_chan, (long) ptr);
-    set_dma_count(dma_chan, count);
-    set_dma_mode(dma_chan, mode);
-    enable_dma(dma_chan);
-    release_dma_lock(flags);    
-    
-    return count;
-}
-
-static __inline__ int 
-NCR53c406a_dma_write(unsigned char *src, unsigned int count) {
-    return NCR53c406a_dma_setup (src, count, DMA_MODE_WRITE);
-}
-
-static __inline__ int 
-NCR53c406a_dma_read(unsigned char *src, unsigned int count) {
-    return NCR53c406a_dma_setup (src, count, DMA_MODE_READ);
-}
-
-static __inline__ int 
-NCR53c406a_dma_residual (void) {
-    register int tmp;
-    unsigned long flags;
-
-    flags=claim_dma_lock();
-    clear_dma_ff(dma_chan);
-    tmp = get_dma_residue(dma_chan);
-    release_dma_lock(flags);
-    
-    return tmp;
+static __inline__ int NCR53c406a_dma_setup(unsigned char *ptr, unsigned int count, unsigned char mode)
+{
+	unsigned limit;
+	unsigned long flags = 0;
+
+	VDEB(printk("dma: before count=%d   ", count));
+	if (dma_chan <= 3) {
+		if (count > 65536)
+			count = 65536;
+		limit = 65536 - (((unsigned) ptr) & 0xFFFF);
+	} else {
+		if (count > (65536 << 1))
+			count = (65536 << 1);
+		limit = (65536 << 1) - (((unsigned) ptr) & 0x1FFFF);
+	}
+
+	if (count > limit)
+		count = limit;
+
+	VDEB(printk("after count=%d\n", count));
+	if ((count & 1) || (((unsigned) ptr) & 1))
+		panic("NCR53c406a: attempted unaligned DMA transfer\n");
+
+	flags = claim_dma_lock();
+	disable_dma(dma_chan);
+	clear_dma_ff(dma_chan);
+	set_dma_addr(dma_chan, (long) ptr);
+	set_dma_count(dma_chan, count);
+	set_dma_mode(dma_chan, mode);
+	enable_dma(dma_chan);
+	release_dma_lock(flags);
+
+	return count;
 }
-#endif /* USE_DMA */
+
+static __inline__ int NCR53c406a_dma_write(unsigned char *src, unsigned int count)
+{
+	return NCR53c406a_dma_setup(src, count, DMA_MODE_WRITE);
+}
+
+static __inline__ int NCR53c406a_dma_read(unsigned char *src, unsigned int count)
+{
+	return NCR53c406a_dma_setup(src, count, DMA_MODE_READ);
+}
+
+static __inline__ int NCR53c406a_dma_residual(void)
+{
+	register int tmp;
+	unsigned long flags;
+
+	flags = claim_dma_lock();
+	clear_dma_ff(dma_chan);
+	tmp = get_dma_residue(dma_chan);
+	release_dma_lock(flags);
+
+	return tmp;
+}
+#endif				/* USE_DMA */
 
 #if USE_PIO
-static __inline__ int NCR53c406a_pio_read(unsigned char *request, 
-					  unsigned int reqlen) 
+static __inline__ int NCR53c406a_pio_read(unsigned char *request, unsigned int reqlen)
 {
-    int	i;
-    int	len;	/* current scsi fifo size */
-    unsigned long flags = 0;
-    
-    REG1;
-    while (reqlen) {
-        i = inb(PIO_STATUS);
-        /*    VDEB(printk("pio_status=%x\n", i)); */
-        if (i & 0x80) 
-            return 0;
-        
-        switch( i & 0x1e ) {
-        default:
-        case 0x10:
-            len=0; break;
-        case 0x0:
-            len=1; break;
-        case 0x8:
-            len=42; break;
-        case 0xc:
-            len=84; break;
-        case 0xe:
-            len=128; break;
-        }
-        
-        if ((i & 0x40) && len == 0) { /* fifo empty and interrupt occurred */
-            return 0;
-        }
-        
-        if (len) {
-            if( len > reqlen ) 
-                len = reqlen;
-            
-            save_flags(flags);
-            cli();
-            if( fast_pio && len > 3 ) { 
-                insl(PIO_FIFO,request,len>>2); 
-                request += len & 0xfc; 
-                reqlen -= len & 0xfc; 
-            } 
-            else { 
-                while(len--) {
-                    *request++ = inb(PIO_FIFO);
-                    reqlen--;
-                }
-            }
-            restore_flags(flags);
-        }
-    }
-    return 0;
-}
-
-static __inline__ int NCR53c406a_pio_write(unsigned char *request,
-					   unsigned int reqlen) 
-{
-    int	i = 0;
-    int	len;	/* current scsi fifo size */
-    unsigned long flags = 0;
-    
-    REG1;
-    while (reqlen && !(i&0x40)) {
-        i = inb(PIO_STATUS);
-        /*    VDEB(printk("pio_status=%x\n", i)); */
-        if (i & 0x80)		/* error */
-            return 0;
-        
-        switch( i & 0x1e ) {
-        case 0x10:
-            len=128; break;
-        case 0x0:
-            len=84; break;
-        case 0x8:
-            len=42; break;
-        case 0xc:
-            len=1; break;
-        default:
-        case 0xe:
-            len=0; break;
-        }
-        
-        if (len) {
-            if( len > reqlen ) 
-                len = reqlen;
-            
-            save_flags(flags);
-            cli();
-            if( fast_pio && len > 3 ) { 
-                outsl(PIO_FIFO,request,len>>2); 
-                request += len & 0xfc; 
-                reqlen -= len & 0xfc; 
-            } 
-            else { 
-                while(len--) {
-                    outb(*request++, PIO_FIFO);
-                    reqlen--;
-                }
-            }
-            restore_flags(flags);
-        }
-    }
-    return 0;
-}
-#endif /* USE_PIO */
-
-int  __init 
-NCR53c406a_detect(Scsi_Host_Template * tpnt){
-    struct Scsi_Host *shpnt = NULL;
+	int i;
+	int len;		/* current scsi fifo size */
+
+	REG1;
+	while (reqlen) {
+		i = inb(PIO_STATUS);
+		/*    VDEB(printk("pio_status=%x\n", i)); */
+		if (i & 0x80)
+			return 0;
+
+		switch (i & 0x1e) {
+		default:
+		case 0x10:
+			len = 0;
+			break;
+		case 0x0:
+			len = 1;
+			break;
+		case 0x8:
+			len = 42;
+			break;
+		case 0xc:
+			len = 84;
+			break;
+		case 0xe:
+			len = 128;
+			break;
+		}
+
+		if ((i & 0x40) && len == 0) {	/* fifo empty and interrupt occurred */
+			return 0;
+		}
+
+		if (len) {
+			if (len > reqlen)
+				len = reqlen;
+
+			if (fast_pio && len > 3) {
+				insl(PIO_FIFO, request, len >> 2);
+				request += len & 0xfc;
+				reqlen -= len & 0xfc;
+			} else {
+				while (len--) {
+					*request++ = inb(PIO_FIFO);
+					reqlen--;
+				}
+			}
+		}
+	}
+	return 0;
+}
+
+static __inline__ int NCR53c406a_pio_write(unsigned char *request, unsigned int reqlen)
+{
+	int i = 0;
+	int len;		/* current scsi fifo size */
+
+	REG1;
+	while (reqlen && !(i & 0x40)) {
+		i = inb(PIO_STATUS);
+		/*    VDEB(printk("pio_status=%x\n", i)); */
+		if (i & 0x80)	/* error */
+			return 0;
+
+		switch (i & 0x1e) {
+		case 0x10:
+			len = 128;
+			break;
+		case 0x0:
+			len = 84;
+			break;
+		case 0x8:
+			len = 42;
+			break;
+		case 0xc:
+			len = 1;
+			break;
+		default:
+		case 0xe:
+			len = 0;
+			break;
+		}
+
+		if (len) {
+			if (len > reqlen)
+				len = reqlen;
+
+			if (fast_pio && len > 3) {
+				outsl(PIO_FIFO, request, len >> 2);
+				request += len & 0xfc;
+				reqlen -= len & 0xfc;
+			} else {
+				while (len--) {
+					outb(*request++, PIO_FIFO);
+					reqlen--;
+				}
+			}
+		}
+	}
+	return 0;
+}
+#endif				/* USE_PIO */
+
+static int __init NCR53c406a_detect(Scsi_Host_Template * tpnt)
+{
+	struct Scsi_Host *shpnt = NULL;
 #ifndef PORT_BASE
-    int i;
+	int i;
 #endif
-    
+
 #if USE_BIOS
-    int ii, jj;
-    bios_base = 0;
-    /* look for a valid signature */
-    for( ii=0; ii < ADDRESS_COUNT && !bios_base; ii++)
-        for( jj=0; (jj < SIGNATURE_COUNT) && !bios_base; jj++)
-            if(!memcmp((void *) addresses[ii]+signatures[jj].sig_offset,
-                       (void *) signatures[jj].signature,
-                       (int) signatures[jj].sig_length))
-                bios_base=addresses[ii];
-    
-    if(!bios_base){
-        printk("NCR53c406a: BIOS signature not found\n");
-        return 0;
-    }
-    
-    DEB(printk("NCR53c406a BIOS found at %X\n", (unsigned int) bios_base););
-#endif /* USE_BIOS */
-    
+	int ii, jj;
+	bios_base = 0;
+	/* look for a valid signature */
+	for (ii = 0; ii < ADDRESS_COUNT && !bios_base; ii++)
+		for (jj = 0; (jj < SIGNATURE_COUNT) && !bios_base; jj++)
+			if (!memcmp((void *) addresses[ii] + signatures[jj].sig_offset, (void *) signatures[jj].signature, (int) signatures[jj].sig_length))
+				bios_base = addresses[ii];
+
+	if (!bios_base) {
+		printk("NCR53c406a: BIOS signature not found\n");
+		return 0;
+	}
+
+	DEB(printk("NCR53c406a BIOS found at %X\n", (unsigned int) bios_base);
+	    );
+#endif				/* USE_BIOS */
+
 #ifdef PORT_BASE
-    if (!request_region(port_base, 0x10, "NCR53c406a")) /* ports already snatched */
-        port_base = 0;
-    
-#else  /* autodetect */
-    if (port_base) {		/* LILO override */
-        if (!request_region(port_base, 0x10, "NCR53c406a"))
-            port_base = 0;
-    }
-    else {
-        for(i=0;  i<PORT_COUNT && !port_base; i++){
-            if(!request_region(ports[i], 0x10, "NCR53c406a")){
-                DEB(printk("NCR53c406a: port %x in use\n", ports[i]));
-            }
-            else {
-                VDEB(printk("NCR53c406a: port %x available\n", ports[i]));
-                outb(C5_IMG, ports[i] + 0x0d); /* reg set 1 */
-                if(   (inb(ports[i] + 0x0e) ^ inb(ports[i] + 0x0e)) == 7
-                   && (inb(ports[i] + 0x0e) ^ inb(ports[i] + 0x0e)) == 7
-                   && (inb(ports[i] + 0x0e) & 0xf8) == 0x58 ) {
-                    port_base = ports[i];
-                    VDEB(printk("NCR53c406a: Sig register valid\n"));
-                    VDEB(printk("port_base=%x\n", port_base));
-                    break;
-                }
-                release_region(ports[i], 0x10);
-            }
-        }
-    }
-#endif /* PORT_BASE */
-    
-    if(!port_base){		/* no ports found */
-        printk("NCR53c406a: no available ports found\n");
-        return 0;
-    }
-    
-    DEB(printk("NCR53c406a detected\n"));
-    
-    calc_port_addr();
-    chip_init();
-    
+	if (!request_region(port_base, 0x10, "NCR53c406a"))	/* ports already snatched */
+		port_base = 0;
+
+#else				/* autodetect */
+	if (port_base) {	/* LILO override */
+		if (!request_region(port_base, 0x10, "NCR53c406a"))
+			port_base = 0;
+	} else {
+		for (i = 0; i < PORT_COUNT && !port_base; i++) {
+			if (!request_region(ports[i], 0x10, "NCR53c406a")) {
+				DEB(printk("NCR53c406a: port %x in use\n", ports[i]));
+			} else {
+				VDEB(printk("NCR53c406a: port %x available\n", ports[i]));
+				outb(C5_IMG, ports[i] + 0x0d);	/* reg set 1 */
+				if ((inb(ports[i] + 0x0e) ^ inb(ports[i] + 0x0e)) == 7 && (inb(ports[i] + 0x0e) ^ inb(ports[i] + 0x0e)) == 7 && (inb(ports[i] + 0x0e) & 0xf8) == 0x58) {
+					port_base = ports[i];
+					VDEB(printk("NCR53c406a: Sig register valid\n"));
+					VDEB(printk("port_base=%x\n", port_base));
+					break;
+				}
+				release_region(ports[i], 0x10);
+			}
+		}
+	}
+#endif				/* PORT_BASE */
+
+	if (!port_base) {	/* no ports found */
+		printk("NCR53c406a: no available ports found\n");
+		return 0;
+	}
+
+	DEB(printk("NCR53c406a detected\n"));
+
+	calc_port_addr();
+	chip_init();
+
 #ifndef IRQ_LEV
-    if (irq_level < 0) {		/* LILO override if >= 0*/
-        irq_level=irq_probe();
-        if (irq_level < 0) {		/* Trouble */
-            printk("NCR53c406a: IRQ problem, irq_level=%d, giving up\n", irq_level);
-            goto err_release;
-        }
-    }
-#endif
-    
-    DEB(printk("NCR53c406a: using port_base %x\n", port_base));
-
-    tpnt->present = 1;
-    tpnt->proc_name = "NCR53c406a";
-    
-    shpnt = scsi_register(tpnt, 0);
-    if (!shpnt) {
-            printk("NCR53c406a: Unable to register host, giving up.\n");
-            goto err_release;
-    }
-    
-    if(irq_level > 0) {
-        if(request_irq(irq_level, do_NCR53c406a_intr, 0, "NCR53c406a", shpnt)){
-            printk("NCR53c406a: unable to allocate IRQ %d\n", irq_level);
-            goto err_free_scsi;
-        }
-        tpnt->can_queue = 1;
-        DEB(printk("NCR53c406a: allocated IRQ %d\n", irq_level));
-    }
-    else if (irq_level == 0) {
-        tpnt->can_queue = 0;
-        DEB(printk("NCR53c406a: No interrupts detected\n"));
+	if (irq_level < 0) {	/* LILO override if >= 0 */
+		irq_level = irq_probe();
+		if (irq_level < 0) {	/* Trouble */
+			printk("NCR53c406a: IRQ problem, irq_level=%d, giving up\n", irq_level);
+			goto err_release;
+		}
+	}
+#endif
+
+	DEB(printk("NCR53c406a: using port_base %x\n", port_base));
+
+	tpnt->present = 1;
+	tpnt->proc_name = "NCR53c406a";
+
+	shpnt = scsi_register(tpnt, 0);
+	if (!shpnt) {
+		printk("NCR53c406a: Unable to register host, giving up.\n");
+		goto err_release;
+	}
+
+	if (irq_level > 0) {
+		if (request_irq(irq_level, do_NCR53c406a_intr, 0, "NCR53c406a", shpnt)) {
+			printk("NCR53c406a: unable to allocate IRQ %d\n", irq_level);
+			goto err_free_scsi;
+		}
+		tpnt->can_queue = 1;
+		DEB(printk("NCR53c406a: allocated IRQ %d\n", irq_level));
+	} else if (irq_level == 0) {
+		tpnt->can_queue = 0;
+		DEB(printk("NCR53c406a: No interrupts detected\n"));
 #if USE_DMA
-        printk("NCR53c406a: No interrupts found and DMA mode defined. Giving up.\n");
-        goto err_free_scsi;
-#endif /* USE_DMA */
-    }
-    else {
-        DEB(printk("NCR53c406a: Shouldn't get here!\n"));
-        goto err_free_scsi;
-    }
-    
+		printk("NCR53c406a: No interrupts found and DMA mode defined. Giving up.\n");
+		goto err_free_scsi;
+#endif				/* USE_DMA */
+	} else {
+		DEB(printk("NCR53c406a: Shouldn't get here!\n"));
+		goto err_free_scsi;
+	}
+
 #if USE_DMA
-    dma_chan = DMA_CHAN;
-    if(request_dma(dma_chan, "NCR53c406a") != 0){
-        printk("NCR53c406a: unable to allocate DMA channel %d\n", dma_chan);
-        goto err_free_irq;
-    }
-    
-    DEB(printk("Allocated DMA channel %d\n", dma_chan));
-#endif /* USE_DMA */
-    
-    shpnt->irq = irq_level;
-    shpnt->io_port = port_base;
-    shpnt->n_io_port = 0x10;
+	dma_chan = DMA_CHAN;
+	if (request_dma(dma_chan, "NCR53c406a") != 0) {
+		printk("NCR53c406a: unable to allocate DMA channel %d\n", dma_chan);
+		goto err_free_irq;
+	}
+
+	DEB(printk("Allocated DMA channel %d\n", dma_chan));
+#endif				/* USE_DMA */
+
+	shpnt->irq = irq_level;
+	shpnt->io_port = port_base;
+	shpnt->n_io_port = 0x10;
 #if USE_DMA
-    shpnt->dma = dma_chan;
+	shpnt->dma = dma_chan;
 #endif
-    
+
 #if USE_DMA
-    sprintf(info_msg, "NCR53c406a at 0x%x, IRQ %d, DMA channel %d.", 
-            port_base, irq_level, dma_chan);
+	sprintf(info_msg, "NCR53c406a at 0x%x, IRQ %d, DMA channel %d.", port_base, irq_level, dma_chan);
 #else
-    sprintf(info_msg, "NCR53c406a at 0x%x, IRQ %d, %s PIO mode.", 
-            port_base, irq_level, fast_pio ? "fast" : "slow");
+	sprintf(info_msg, "NCR53c406a at 0x%x, IRQ %d, %s PIO mode.", port_base, irq_level, fast_pio ? "fast" : "slow");
 #endif
-    
-    return (tpnt->present);
+
+	return (tpnt->present);
 
 #if USE_DMA
- err_free_irq:
-    if(irq_level)
-    	free_irq(irq_level, shpnt);
-#endif    	
- err_free_scsi:
-    scsi_unregister(shpnt);
- err_release:
-    release_region(port_base, 0x10);
-    return 0;
+      err_free_irq:
+	if (irq_level)
+		free_irq(irq_level, shpnt);
+#endif
+      err_free_scsi:
+	scsi_unregister(shpnt);
+      err_release:
+	release_region(port_base, 0x10);
+	return 0;
 }
 
 /* called from init/main.c */
-void __init NCR53c406a_setup(char *str, int *ints)
+static void __init NCR53c406a_setup(char *str, int *ints)
+{
+	static size_t setup_idx = 0;
+	size_t i;
+
+	DEB(printk("NCR53c406a: Setup called\n");
+	    );
+
+	if (setup_idx >= PORT_COUNT - 1) {
+		printk("NCR53c406a: Setup called too many times.  Bad LILO params?\n");
+		return;
+	}
+	if (ints[0] < 1 || ints[0] > 3) {
+		printk("NCR53c406a: Malformed command line\n");
+		printk("NCR53c406a: Usage: ncr53c406a=<PORTBASE>[,<IRQ>[,<FASTPIO>]]\n");
+		return;
+	}
+	for (i = 0; i < PORT_COUNT && !port_base; i++)
+		if (ports[i] == ints[1]) {
+			port_base = ints[1];
+			DEB(printk("NCR53c406a: Specified port_base 0x%X\n", port_base);
+			    )
+		}
+	if (!port_base) {
+		printk("NCR53c406a: Invalid PORTBASE 0x%X specified\n", ints[1]);
+		return;
+	}
+
+	if (ints[0] > 1) {
+		if (ints[2] == 0) {
+			irq_level = 0;
+			DEB(printk("NCR53c406a: Specified irq %d\n", irq_level);
+			    )
+		} else
+			for (i = 0; i < INTR_COUNT && irq_level < 0; i++)
+				if (intrs[i] == ints[2]) {
+					irq_level = ints[2];
+					DEB(printk("NCR53c406a: Specified irq %d\n", port_base);
+					    )
+				}
+		if (irq_level < 0)
+			printk("NCR53c406a: Invalid IRQ %d specified\n", ints[2]);
+	}
+
+	if (ints[0] > 2)
+		fast_pio = ints[3];
+
+	DEB(printk("NCR53c406a: port_base=0x%X, irq=%d, fast_pio=%d\n", port_base, irq_level, fast_pio);)
+}
+
+__setup("ncr53c406a=", NCR53c406a_setup);
+
+static const char *NCR53c406a_info(struct Scsi_Host *SChost)
+{
+	DEB(printk("NCR53c406a_info called\n"));
+	return (info_msg);
+}
+
+static void internal_done(Scsi_Cmnd * SCpnt)
+{
+	internal_done_errcode = SCpnt->result;
+	++internal_done_flag;
+}
+
+
+static void wait_intr(void)
+{
+	int i = jiffies + WATCHDOG;
+
+	while (time_after(i, jiffies) && !(inb(STAT_REG) & 0xe0)) {	/* wait for a pseudo-interrupt */
+		cpu_relax();
+		barrier();
+	}
+
+	if (time_before_eq(i, jiffies)) {	/* Timed out */
+		rtrc(0);
+		current_SC->result = DID_TIME_OUT << 16;
+		current_SC->SCp.phase = idle;
+		current_SC->scsi_done(current_SC);
+		return;
+	}
+
+	NCR53c406a_intr(0, NULL, NULL);
+}
+
+static int NCR53c406a_command(Scsi_Cmnd * SCpnt)
+{
+	DEB(printk("NCR53c406a_command called\n"));
+	NCR53c406a_queue(SCpnt, internal_done);
+	if (irq_level)
+		while (!internal_done_flag)
+			cpu_relax();
+	else			/* interrupts not supported */
+		while (!internal_done_flag)
+			wait_intr();
+
+	internal_done_flag = 0;
+	return internal_done_errcode;
+}
+
+
+static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
 {
-    static size_t setup_idx = 0;
-    size_t i;
-    
-    DEB(printk("NCR53c406a: Setup called\n"););
-    
-    if (setup_idx >= PORT_COUNT - 1) {
-        printk("NCR53c406a: Setup called too many times.  Bad LILO params?\n");
-        return;
-    }
-    if (ints[0] < 1 || ints[0] > 3) {
-        printk("NCR53c406a: Malformed command line\n");
-        printk("NCR53c406a: Usage: ncr53c406a=<PORTBASE>[,<IRQ>[,<FASTPIO>]]\n");
-        return;
-    }
-    for (i = 0; i < PORT_COUNT && !port_base; i++)
-        if (ports[i] == ints[1]) {
-            port_base = ints[1];
-            DEB(printk("NCR53c406a: Specified port_base 0x%X\n", port_base);)
-        }
-    if (!port_base) {
-        printk("NCR53c406a: Invalid PORTBASE 0x%X specified\n", ints[1]);
-        return;
-    }
-    
-    if (ints[0] > 1) {
-        if (ints[2] == 0) {
-            irq_level = 0;
-            DEB(printk("NCR53c406a: Specified irq %d\n", irq_level);)
-        }
-        else
-            for (i = 0; i < INTR_COUNT && irq_level < 0; i++)
-                if (intrs[i] == ints[2]) {
-                    irq_level = ints[2];
-                    DEB(printk("NCR53c406a: Specified irq %d\n", port_base);)
-                }
-        if (irq_level < 0)
-            printk("NCR53c406a: Invalid IRQ %d specified\n", ints[2]);
-    }
-    
-    if (ints[0] > 2)
-        fast_pio = ints[3];
-    
-    DEB(printk("NCR53c406a: port_base=0x%X, irq=%d, fast_pio=%d\n", 
-               port_base, irq_level, fast_pio);)
-}
-
-const char* 
-NCR53c406a_info(struct Scsi_Host *SChost){
-    DEB(printk("NCR53c406a_info called\n"));
-    return (info_msg);
-}
-
-static void internal_done(Scsi_Cmnd *SCpnt) {
-    internal_done_errcode = SCpnt->result;
-    ++internal_done_flag;
-}
-
-
-static void wait_intr(void) {
-    int i = jiffies + WATCHDOG;
-    
-    while(time_after(i,jiffies) && !(inb(STAT_REG)&0xe0)) /* wait for a pseudo-interrupt */
-        barrier();
-    
-    if (time_before_eq(i,jiffies)) {		/* Timed out */
-        rtrc(0);
-        current_SC->result = DID_TIME_OUT << 16;
-        current_SC->SCp.phase = idle;
-        current_SC->scsi_done(current_SC);
-        return;
-    }
-    
-    NCR53c406a_intr(0, NULL, NULL);
-}
-
-int NCR53c406a_command(Scsi_Cmnd *SCpnt){
-    DEB(printk("NCR53c406a_command called\n"));
-    NCR53c406a_queue(SCpnt, internal_done);
-    if(irq_level)
-        while (!internal_done_flag);
-    else                        /* interrupts not supported */
-        while (!internal_done_flag)
-            wait_intr();
-    
-    internal_done_flag = 0;
-    return internal_done_errcode;
-}
-
-
-int 
-NCR53c406a_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)){
-    int i;
-    unsigned long flags = 0;
-
-    VDEB(printk("NCR53c406a_queue called\n"));
-    DEB(printk("cmd=%02x, cmd_len=%02x, target=%02x, lun=%02x, bufflen=%d\n", 
-               SCpnt->cmnd[0],
-               SCpnt->cmd_len,
-               SCpnt->target, 
-               SCpnt->lun,  
-               SCpnt->request_bufflen));
-    
+	int i;
+
+	VDEB(printk("NCR53c406a_queue called\n"));
+	DEB(printk("cmd=%02x, cmd_len=%02x, target=%02x, lun=%02x, bufflen=%d\n", SCpnt->cmnd[0], SCpnt->cmd_len, SCpnt->target, SCpnt->lun, SCpnt->request_bufflen));
+
 #if 0
-    VDEB(for(i=0; i<SCpnt->cmd_len; i++)
-         printk("cmd[%d]=%02x  ", i, SCpnt->cmnd[i]));
-    VDEB(printk("\n"));
-#endif
-    
-    current_SC = SCpnt;
-    current_SC->scsi_done = done;
-    current_SC->SCp.phase = command_ph;
-    current_SC->SCp.Status = 0;
-    current_SC->SCp.Message = 0;
-    
-    save_flags(flags);
-    cli();
-    REG0;
-    outb(SCpnt->target, DEST_ID); /* set destination */
-    outb(FLUSH_FIFO, CMD_REG);	/* reset the fifos */
-    
-    for(i=0; i<SCpnt->cmd_len; i++){
-        outb(SCpnt->cmnd[i], SCSI_FIFO);
-    }
-    outb(SELECT_NO_ATN, CMD_REG);
-    restore_flags(flags);
-    
-    rtrc(1);
-    return 0;
-}
-
-int
-NCR53c406a_abort(Scsi_Cmnd *SCpnt){
-    DEB(printk("NCR53c406a_abort called\n"));
-    return SCSI_ABORT_SNOOZE;	/* Don't know how to abort */
-}
-
-int 
-NCR53c406a_reset(Scsi_Cmnd *SCpnt, unsigned int ignored){
-    DEB(printk("NCR53c406a_reset called\n"));
-    outb(C4_IMG, CONFIG4);      /* Select reg set 0 */
-    outb(CHIP_RESET, CMD_REG);
-    outb(SCSI_NOP, CMD_REG);	/* required after reset */
-    outb(SCSI_RESET, CMD_REG);
-    chip_init();
-    
-    rtrc(2);
-    if (irq_level)
-        return SCSI_RESET_PENDING; /* should get an interrupt */
-    else
-        return SCSI_RESET_WAKEUP; /* won't get any interrupts */
-}
-
-int 
-NCR53c406a_biosparm(Scsi_Disk *disk, struct block_device *dev, int* info_array){
-    int size;
-    
-    DEB(printk("NCR53c406a_biosparm called\n"));
-    
-    size = disk->capacity;
-    info_array[0] = 64;         /* heads */
-    info_array[1] = 32;         /* sectors */
-    info_array[2] = size>>11;   /* cylinders */
-    if (info_array[2] > 1024) {	/* big disk */
-      info_array[0] = 255;
-      info_array[1] = 63;
-      info_array[2] = size / (255*63);
-    }
-    return 0;
-  }
-     
-     static void
-do_NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs){
-    unsigned long flags;
-    struct Scsi_Host * dev = dev_id;
-    
-    spin_lock_irqsave(dev->host_lock, flags);
-    NCR53c406a_intr(0, dev_id, regs);
-    spin_unlock_irqrestore(dev->host_lock, flags);
-}
-
-     static void
-NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs){
-    DEB(unsigned char fifo_size;)
-    DEB(unsigned char seq_reg;)
-    unsigned char status, int_reg;
-    unsigned long flags = 0;
+	VDEB(for (i = 0; i < SCpnt->cmd_len; i++)
+	     printk("cmd[%d]=%02x  ", i, SCpnt->cmnd[i]));
+	VDEB(printk("\n"));
+#endif
+
+	current_SC = SCpnt;
+	current_SC->scsi_done = done;
+	current_SC->SCp.phase = command_ph;
+	current_SC->SCp.Status = 0;
+	current_SC->SCp.Message = 0;
+
+	/* We are locked here already by the mid layer */
+	REG0;
+	outb(SCpnt->target, DEST_ID);	/* set destination */
+	outb(FLUSH_FIFO, CMD_REG);	/* reset the fifos */
+
+	for (i = 0; i < SCpnt->cmd_len; i++) {
+		outb(SCpnt->cmnd[i], SCSI_FIFO);
+	}
+	outb(SELECT_NO_ATN, CMD_REG);
+
+	rtrc(1);
+	return 0;
+}
+
+static int NCR53c406a_abort(Scsi_Cmnd * SCpnt)
+{
+	DEB(printk("NCR53c406a_abort called\n"));
+	return FAILED;		/* Don't know how to abort */
+}
+
+static int NCR53c406a_host_reset(Scsi_Cmnd * SCpnt)
+{
+	DEB(printk("NCR53c406a_reset called\n"));
+	outb(C4_IMG, CONFIG4);	/* Select reg set 0 */
+	outb(CHIP_RESET, CMD_REG);
+	outb(SCSI_NOP, CMD_REG);	/* required after reset */
+	outb(SCSI_RESET, CMD_REG);
+	chip_init();
+
+	rtrc(2);
+	return SUCCESS;
+}
+
+static int NCR53c406a_device_reset(Scsi_Cmnd * SCpnt)
+{
+	return FAILED;
+}
+
+static int NCR53c406a_bus_reset(Scsi_Cmnd * SCpnt)
+{
+	return FAILED;
+}
+
+static int NCR53c406a_biosparm(struct scsi_disk *disk,
+                               struct block_device *dev,
+			       sector_t capacity, int *info_array)
+{
+	int size;
+
+	DEB(printk("NCR53c406a_biosparm called\n"));
+
+	size = capacity;
+	info_array[0] = 64;	/* heads */
+	info_array[1] = 32;	/* sectors */
+	info_array[2] = size >> 11;	/* cylinders */
+	if (info_array[2] > 1024) {	/* big disk */
+		info_array[0] = 255;
+		info_array[1] = 63;
+		info_array[2] = size / (255 * 63);
+	}
+	return 0;
+}
+
+static void do_NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs)
+{
+	unsigned long flags;
+	struct Scsi_Host *dev = dev_id;
+
+	spin_lock_irqsave(dev->host_lock, flags);
+	NCR53c406a_intr(0, dev_id, regs);
+	spin_unlock_irqrestore(dev->host_lock, flags);
+}
+
+static void NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs)
+{
+	DEB(unsigned char fifo_size;
+	    )
+	    DEB(unsigned char seq_reg;
+	    )
+	unsigned char status, int_reg;
 #if USE_PIO
-    unsigned char pio_status; 
-    struct scatterlist *sglist;
-    unsigned int sgcount;
-#endif
-    
-    VDEB(printk("NCR53c406a_intr called\n"));
-    
-    save_flags(flags);
-    cli();
+	unsigned char pio_status;
+	struct scatterlist *sglist;
+	unsigned int sgcount;
+#endif
+
+	VDEB(printk("NCR53c406a_intr called\n"));
+
 #if USE_PIO
-    REG1;
-    pio_status = inb(PIO_STATUS);
+	REG1;
+	pio_status = inb(PIO_STATUS);
 #endif
-    REG0;
-    status = inb(STAT_REG);
-    DEB(seq_reg = inb(SEQ_REG));
-    int_reg = inb(INT_REG);
-    DEB(fifo_size = inb(FIFO_FLAGS) & 0x1f);
-    restore_flags(flags);
-    
+	REG0;
+	status = inb(STAT_REG);
+	DEB(seq_reg = inb(SEQ_REG));
+	int_reg = inb(INT_REG);
+	DEB(fifo_size = inb(FIFO_FLAGS) & 0x1f);
+
 #if NCR53C406A_DEBUG
-    printk("status=%02x, seq_reg=%02x, int_reg=%02x, fifo_size=%02x", 
-           status, seq_reg, int_reg, fifo_size);
+	printk("status=%02x, seq_reg=%02x, int_reg=%02x, fifo_size=%02x", status, seq_reg, int_reg, fifo_size);
 #if (USE_DMA)
-    printk("\n");
+	printk("\n");
 #else
-    printk(", pio=%02x\n", pio_status);
-#endif /* USE_DMA */
-#endif /* NCR53C406A_DEBUG */
-    
-    if(int_reg & 0x80){         /* SCSI reset intr */
-        rtrc(3);
-        DEB(printk("NCR53c406a: reset intr received\n"));
-        current_SC->SCp.phase = idle;
-        current_SC->result = DID_RESET << 16;
-        current_SC->scsi_done(current_SC);
-        return;
-    }
-    
+	printk(", pio=%02x\n", pio_status);
+#endif				/* USE_DMA */
+#endif				/* NCR53C406A_DEBUG */
+
+	if (int_reg & 0x80) {	/* SCSI reset intr */
+		rtrc(3);
+		DEB(printk("NCR53c406a: reset intr received\n"));
+		current_SC->SCp.phase = idle;
+		current_SC->result = DID_RESET << 16;
+		current_SC->scsi_done(current_SC);
+		return;
+	}
 #if USE_PIO
-    if(pio_status & 0x80) {
-        printk("NCR53C406A: Warning: PIO error!\n");
-        current_SC->SCp.phase = idle;
-        current_SC->result = DID_ERROR << 16;
-        current_SC->scsi_done(current_SC);
-        return;
-    }
-#endif /* USE_PIO */
-    
-    if(status & 0x20) {		/* Parity error */
-        printk("NCR53c406a: Warning: parity error!\n");
-        current_SC->SCp.phase = idle;
-        current_SC->result = DID_PARITY << 16;
-        current_SC->scsi_done(current_SC);
-        return;
-    }
-    
-    if(status & 0x40) {		/* Gross error */
-        printk("NCR53c406a: Warning: gross error!\n");
-        current_SC->SCp.phase = idle;
-        current_SC->result = DID_ERROR << 16;
-        current_SC->scsi_done(current_SC);
-        return;
-    }
-    
-    if(int_reg & 0x20){		/* Disconnect */
-        DEB(printk("NCR53c406a: disconnect intr received\n"));
-        if(current_SC->SCp.phase != message_in){ /* Unexpected disconnect */
-            current_SC->result = DID_NO_CONNECT << 16;
-        }
-        else{  /* Command complete, return status and message */
-            current_SC->result = (current_SC->SCp.Status & 0xff) 
-                | ((current_SC->SCp.Message & 0xff) << 8) | (DID_OK << 16);
-        }
-        
-        rtrc(0);
-        current_SC->SCp.phase = idle;
-        current_SC->scsi_done( current_SC );
-        return;
-    }
-    
-    switch(status & 0x07){	/* scsi phase */
-    case 0x00:			/* DATA-OUT */
-        if(int_reg & 0x10){     /* Target requesting info transfer */
-            rtrc(5);
-            current_SC->SCp.phase = data_out;
-            VDEB(printk("NCR53c406a: Data-Out phase\n"));
-            outb(FLUSH_FIFO, CMD_REG);
-            LOAD_DMA_COUNT(current_SC->request_bufflen); /* Max transfer size */
+	if (pio_status & 0x80) {
+		printk("NCR53C406A: Warning: PIO error!\n");
+		current_SC->SCp.phase = idle;
+		current_SC->result = DID_ERROR << 16;
+		current_SC->scsi_done(current_SC);
+		return;
+	}
+#endif				/* USE_PIO */
+
+	if (status & 0x20) {	/* Parity error */
+		printk("NCR53c406a: Warning: parity error!\n");
+		current_SC->SCp.phase = idle;
+		current_SC->result = DID_PARITY << 16;
+		current_SC->scsi_done(current_SC);
+		return;
+	}
+
+	if (status & 0x40) {	/* Gross error */
+		printk("NCR53c406a: Warning: gross error!\n");
+		current_SC->SCp.phase = idle;
+		current_SC->result = DID_ERROR << 16;
+		current_SC->scsi_done(current_SC);
+		return;
+	}
+
+	if (int_reg & 0x20) {	/* Disconnect */
+		DEB(printk("NCR53c406a: disconnect intr received\n"));
+		if (current_SC->SCp.phase != message_in) {	/* Unexpected disconnect */
+			current_SC->result = DID_NO_CONNECT << 16;
+		} else {	/* Command complete, return status and message */
+			current_SC->result = (current_SC->SCp.Status & 0xff)
+			    | ((current_SC->SCp.Message & 0xff) << 8) | (DID_OK << 16);
+		}
+
+		rtrc(0);
+		current_SC->SCp.phase = idle;
+		current_SC->scsi_done(current_SC);
+		return;
+	}
+
+	switch (status & 0x07) {	/* scsi phase */
+	case 0x00:		/* DATA-OUT */
+		if (int_reg & 0x10) {	/* Target requesting info transfer */
+			rtrc(5);
+			current_SC->SCp.phase = data_out;
+			VDEB(printk("NCR53c406a: Data-Out phase\n"));
+			outb(FLUSH_FIFO, CMD_REG);
+			LOAD_DMA_COUNT(current_SC->request_bufflen);	/* Max transfer size */
 #if USE_DMA			/* No s/g support for DMA */
-            NCR53c406a_dma_write(current_SC->request_buffer, 
-                                 current_SC->request_bufflen);
-#endif /* USE_DMA */
-            outb(TRANSFER_INFO | DMA_OP, CMD_REG); 
+			NCR53c406a_dma_write(current_SC->request_buffer, current_SC->request_bufflen);
+#endif				/* USE_DMA */
+			outb(TRANSFER_INFO | DMA_OP, CMD_REG);
 #if USE_PIO
-            if (!current_SC->use_sg) /* Don't use scatter-gather */
-                NCR53c406a_pio_write(current_SC->request_buffer, 
-                                     current_SC->request_bufflen);
-            else {              /* use scatter-gather */
-                sgcount = current_SC->use_sg;
-                sglist = current_SC->request_buffer;
-                while( sgcount-- ) {
-                    NCR53c406a_pio_write(page_address(sglist->page) + sglist->offset, sglist->length);
-                    sglist++;
-                }
-            }
-            REG0;
-#endif /* USE_PIO */
-        }
-        break;
-        
-    case 0x01:			/* DATA-IN */
-        if(int_reg & 0x10){     /* Target requesting info transfer */
-            rtrc(6);
-            current_SC->SCp.phase = data_in;
-            VDEB(printk("NCR53c406a: Data-In phase\n"));
-            outb(FLUSH_FIFO, CMD_REG);
-            LOAD_DMA_COUNT(current_SC->request_bufflen); /* Max transfer size */
+			if (!current_SC->use_sg)	/* Don't use scatter-gather */
+				NCR53c406a_pio_write(current_SC->request_buffer, current_SC->request_bufflen);
+			else {	/* use scatter-gather */
+				sgcount = current_SC->use_sg;
+				sglist = current_SC->request_buffer;
+				while (sgcount--) {
+					NCR53c406a_pio_write(page_address(sglist->page) + sglist->offset, sglist->length);
+					sglist++;
+				}
+			}
+			REG0;
+#endif				/* USE_PIO */
+		}
+		break;
+
+	case 0x01:		/* DATA-IN */
+		if (int_reg & 0x10) {	/* Target requesting info transfer */
+			rtrc(6);
+			current_SC->SCp.phase = data_in;
+			VDEB(printk("NCR53c406a: Data-In phase\n"));
+			outb(FLUSH_FIFO, CMD_REG);
+			LOAD_DMA_COUNT(current_SC->request_bufflen);	/* Max transfer size */
 #if USE_DMA			/* No s/g support for DMA */
-            NCR53c406a_dma_read(current_SC->request_buffer, 
-                                current_SC->request_bufflen);
-#endif /* USE_DMA */
-            outb(TRANSFER_INFO | DMA_OP, CMD_REG); 
+			NCR53c406a_dma_read(current_SC->request_buffer, current_SC->request_bufflen);
+#endif				/* USE_DMA */
+			outb(TRANSFER_INFO | DMA_OP, CMD_REG);
 #if USE_PIO
-            if (!current_SC->use_sg) /* Don't use scatter-gather */
-                NCR53c406a_pio_read(current_SC->request_buffer, 
-                                    current_SC->request_bufflen);
-            else {              /* Use scatter-gather */
-                sgcount = current_SC->use_sg;
-                sglist = current_SC->request_buffer;
-                while( sgcount-- ) {
-                    NCR53c406a_pio_read(page_address(sglist->page) + sglist->offset, sglist->length);
-                    sglist++;
-                }
-            }
-            REG0;
-#endif /* USE_PIO */
-        }
-        break;
-        
-    case 0x02:			/* COMMAND */
-        current_SC->SCp.phase = command_ph;
-        printk("NCR53c406a: Warning: Unknown interrupt occurred in command phase!\n");
-        break;
-        
-    case 0x03:			/* STATUS */
-        rtrc(7);
-        current_SC->SCp.phase = status_ph;
-        VDEB(printk("NCR53c406a: Status phase\n"));
-        outb(FLUSH_FIFO, CMD_REG);
-        outb(INIT_CMD_COMPLETE, CMD_REG);
-        break;
-        
-    case 0x04:			/* Reserved */
-    case 0x05:			/* Reserved */
-        printk("NCR53c406a: WARNING: Reserved phase!!!\n");
-        break;
-        
-    case 0x06:			/* MESSAGE-OUT */
-        DEB(printk("NCR53c406a: Message-Out phase\n"));
-        current_SC->SCp.phase = message_out;
-        outb(SET_ATN, CMD_REG);	/* Reject the message */
-        outb(MSG_ACCEPT, CMD_REG);
-        break;
-        
-    case 0x07:			/* MESSAGE-IN */
-        rtrc(4);
-        VDEB(printk("NCR53c406a: Message-In phase\n"));
-        current_SC->SCp.phase = message_in;
-        
-        current_SC->SCp.Status = inb(SCSI_FIFO);    
-        current_SC->SCp.Message = inb(SCSI_FIFO);
-        
-        VDEB(printk("SCSI FIFO size=%d\n", inb(FIFO_FLAGS) & 0x1f));
-        DEB(printk("Status = %02x  Message = %02x\n", 
-                   current_SC->SCp.Status, current_SC->SCp.Message));
-        
-        if(current_SC->SCp.Message == SAVE_POINTERS || 
-           current_SC->SCp.Message == DISCONNECT) {
-            outb(SET_ATN, CMD_REG); /* Reject message */
-            DEB(printk("Discarding SAVE_POINTERS message\n"));
-        }
-        outb(MSG_ACCEPT, CMD_REG);
-        break;
-    }
+			if (!current_SC->use_sg)	/* Don't use scatter-gather */
+				NCR53c406a_pio_read(current_SC->request_buffer, current_SC->request_bufflen);
+			else {	/* Use scatter-gather */
+				sgcount = current_SC->use_sg;
+				sglist = current_SC->request_buffer;
+				while (sgcount--) {
+					NCR53c406a_pio_read(page_address(sglist->page) + sglist->offset, sglist->length);
+					sglist++;
+				}
+			}
+			REG0;
+#endif				/* USE_PIO */
+		}
+		break;
+
+	case 0x02:		/* COMMAND */
+		current_SC->SCp.phase = command_ph;
+		printk("NCR53c406a: Warning: Unknown interrupt occurred in command phase!\n");
+		break;
+
+	case 0x03:		/* STATUS */
+		rtrc(7);
+		current_SC->SCp.phase = status_ph;
+		VDEB(printk("NCR53c406a: Status phase\n"));
+		outb(FLUSH_FIFO, CMD_REG);
+		outb(INIT_CMD_COMPLETE, CMD_REG);
+		break;
+
+	case 0x04:		/* Reserved */
+	case 0x05:		/* Reserved */
+		printk("NCR53c406a: WARNING: Reserved phase!!!\n");
+		break;
+
+	case 0x06:		/* MESSAGE-OUT */
+		DEB(printk("NCR53c406a: Message-Out phase\n"));
+		current_SC->SCp.phase = message_out;
+		outb(SET_ATN, CMD_REG);	/* Reject the message */
+		outb(MSG_ACCEPT, CMD_REG);
+		break;
+
+	case 0x07:		/* MESSAGE-IN */
+		rtrc(4);
+		VDEB(printk("NCR53c406a: Message-In phase\n"));
+		current_SC->SCp.phase = message_in;
+
+		current_SC->SCp.Status = inb(SCSI_FIFO);
+		current_SC->SCp.Message = inb(SCSI_FIFO);
+
+		VDEB(printk("SCSI FIFO size=%d\n", inb(FIFO_FLAGS) & 0x1f));
+		DEB(printk("Status = %02x  Message = %02x\n", current_SC->SCp.Status, current_SC->SCp.Message));
+
+		if (current_SC->SCp.Message == SAVE_POINTERS || current_SC->SCp.Message == DISCONNECT) {
+			outb(SET_ATN, CMD_REG);	/* Reject message */
+			DEB(printk("Discarding SAVE_POINTERS message\n"));
+		}
+		outb(MSG_ACCEPT, CMD_REG);
+		break;
+	}
 }
 
 #ifndef IRQ_LEV
 static int irq_probe(void)
 {
-    int irqs, irq;
-    int i;
-    
-    inb(INT_REG);               /* clear the interrupt register */
-    irqs = probe_irq_on();
-    
-    /* Invalid command will cause an interrupt */
-    REG0;
-    outb(0xff, CMD_REG);
-    
-    /* Wait for the interrupt to occur */
-    i = jiffies + WATCHDOG;
-    while(time_after(i, jiffies) && !(inb(STAT_REG) & 0x80))
-        barrier();
-    if (time_before_eq(i, jiffies)) {		/* Timed out, must be hardware trouble */
-        probe_irq_off(irqs);
-        return -1;
-    }
-    
-    irq = probe_irq_off(irqs);
-    
-    /* Kick the chip */
-    outb(CHIP_RESET, CMD_REG);
-    outb(SCSI_NOP, CMD_REG);
-    chip_init();
-    
-    return irq;
+	int irqs, irq;
+	int i;
+
+	inb(INT_REG);		/* clear the interrupt register */
+	irqs = probe_irq_on();
+
+	/* Invalid command will cause an interrupt */
+	REG0;
+	outb(0xff, CMD_REG);
+
+	/* Wait for the interrupt to occur */
+	i = jiffies + WATCHDOG;
+	while (time_after(i, jiffies) && !(inb(STAT_REG) & 0x80))
+		barrier();
+	if (time_before_eq(i, jiffies)) {	/* Timed out, must be hardware trouble */
+		probe_irq_off(irqs);
+		return -1;
+	}
+
+	irq = probe_irq_off(irqs);
+
+	/* Kick the chip */
+	outb(CHIP_RESET, CMD_REG);
+	outb(SCSI_NOP, CMD_REG);
+	chip_init();
+
+	return irq;
 }
-#endif /* IRQ_LEV */
+#endif				/* IRQ_LEV */
 
 static void chip_init(void)
 {
-    REG1;
+	REG1;
 #if USE_DMA
-    outb(0x00, PIO_STATUS);
-#else  /* USE_PIO */
-    outb(0x01, PIO_STATUS);
-#endif
-    outb(0x00, PIO_FLAG);
-    
-    outb(C4_IMG, CONFIG4);	/* REG0; */
-    outb(C3_IMG, CONFIG3);
-    outb(C2_IMG, CONFIG2);
-    outb(C1_IMG, CONFIG1);
-    
-    outb(0x05, CLKCONV);        /* clock conversion factor */
-    outb(0x9C, SRTIMOUT);       /* Selection timeout */
-    outb(0x05, SYNCPRD);        /* Synchronous transfer period */
-    outb(SYNC_MODE, SYNCOFF);   /* synchronous mode */  
-}
-
-void __init calc_port_addr(void)
-{
-    /* Control Register Set 0 */
-    TC_LSB		= (port_base+0x00);
-    TC_MSB		= (port_base+0x01);
-    SCSI_FIFO		= (port_base+0x02);
-    CMD_REG		= (port_base+0x03);
-    STAT_REG		= (port_base+0x04);
-    DEST_ID		= (port_base+0x04);
-    INT_REG		= (port_base+0x05);
-    SRTIMOUT		= (port_base+0x05);
-    SEQ_REG		= (port_base+0x06);
-    SYNCPRD		= (port_base+0x06);
-    FIFO_FLAGS		= (port_base+0x07);
-    SYNCOFF		= (port_base+0x07);
-    CONFIG1		= (port_base+0x08);
-    CLKCONV		= (port_base+0x09);
-    /* TESTREG		= (port_base+0x0A); */
-    CONFIG2		= (port_base+0x0B);
-    CONFIG3		= (port_base+0x0C);
-    CONFIG4		= (port_base+0x0D);
-    TC_HIGH		= (port_base+0x0E);
-    /* FIFO_BOTTOM	= (port_base+0x0F); */
-    
-    /* Control Register Set 1 */
-    /* JUMPER_SENSE	= (port_base+0x00);*/
-    /* SRAM_PTR		= (port_base+0x01);*/
-    /* SRAM_DATA	= (port_base+0x02);*/
-    PIO_FIFO		= (port_base+0x04);
-    /* PIO_FIFO1	= (port_base+0x05);*/
-    /* PIO_FIFO2	= (port_base+0x06);*/
-    /* PIO_FIFO3	= (port_base+0x07);*/
-    PIO_STATUS		= (port_base+0x08);
-    /* ATA_CMD		= (port_base+0x09);*/
-    /* ATA_ERR		= (port_base+0x0A);*/
-    PIO_FLAG		= (port_base+0x0B);
-    CONFIG5		= (port_base+0x0D);
-    /* SIGNATURE	= (port_base+0x0E);*/
-    /* CONFIG6		= (port_base+0x0F);*/
+	outb(0x00, PIO_STATUS);
+#else				/* USE_PIO */
+	outb(0x01, PIO_STATUS);
+#endif
+	outb(0x00, PIO_FLAG);
+
+	outb(C4_IMG, CONFIG4);	/* REG0; */
+	outb(C3_IMG, CONFIG3);
+	outb(C2_IMG, CONFIG2);
+	outb(C1_IMG, CONFIG1);
+
+	outb(0x05, CLKCONV);	/* clock conversion factor */
+	outb(0x9C, SRTIMOUT);	/* Selection timeout */
+	outb(0x05, SYNCPRD);	/* Synchronous transfer period */
+	outb(SYNC_MODE, SYNCOFF);	/* synchronous mode */
+}
+
+static void __init calc_port_addr(void)
+{
+	/* Control Register Set 0 */
+	TC_LSB = (port_base + 0x00);
+	TC_MSB = (port_base + 0x01);
+	SCSI_FIFO = (port_base + 0x02);
+	CMD_REG = (port_base + 0x03);
+	STAT_REG = (port_base + 0x04);
+	DEST_ID = (port_base + 0x04);
+	INT_REG = (port_base + 0x05);
+	SRTIMOUT = (port_base + 0x05);
+	SEQ_REG = (port_base + 0x06);
+	SYNCPRD = (port_base + 0x06);
+	FIFO_FLAGS = (port_base + 0x07);
+	SYNCOFF = (port_base + 0x07);
+	CONFIG1 = (port_base + 0x08);
+	CLKCONV = (port_base + 0x09);
+	/* TESTREG          = (port_base+0x0A); */
+	CONFIG2 = (port_base + 0x0B);
+	CONFIG3 = (port_base + 0x0C);
+	CONFIG4 = (port_base + 0x0D);
+	TC_HIGH = (port_base + 0x0E);
+	/* FIFO_BOTTOM      = (port_base+0x0F); */
+
+	/* Control Register Set 1 */
+	/* JUMPER_SENSE     = (port_base+0x00); */
+	/* SRAM_PTR         = (port_base+0x01); */
+	/* SRAM_DATA        = (port_base+0x02); */
+	PIO_FIFO = (port_base + 0x04);
+	/* PIO_FIFO1        = (port_base+0x05); */
+	/* PIO_FIFO2        = (port_base+0x06); */
+	/* PIO_FIFO3        = (port_base+0x07); */
+	PIO_STATUS = (port_base + 0x08);
+	/* ATA_CMD          = (port_base+0x09); */
+	/* ATA_ERR          = (port_base+0x0A); */
+	PIO_FLAG = (port_base + 0x0B);
+	CONFIG5 = (port_base + 0x0D);
+	/* SIGNATURE        = (port_base+0x0E); */
+	/* CONFIG6          = (port_base+0x0F); */
 }
+
 MODULE_LICENSE("GPL");
 
 /* Eventually this will go into an include file, but this will be later */
diff -Nru a/drivers/scsi/NCR53c406a.h b/drivers/scsi/NCR53c406a.h
--- a/drivers/scsi/NCR53c406a.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/NCR53c406a.h	Wed Oct 30 16:44:26 2002
@@ -26,50 +26,33 @@
  * Use SG_NONE if DMA mode is enabled!
  */
 #define NCR53c406a { \
-     proc_name:         "NCR53c406a"		/* proc_name */,        \
-     name:              "NCR53c406a"		/* name */,             \
-     detect:            NCR53c406a_detect	/* detect */,           \
-     info:              NCR53c406a_info		/* info */,             \
-     command:           NCR53c406a_command	/* command */,          \
-     queuecommand:      NCR53c406a_queue	/* queuecommand */,     \
-     abort:             NCR53c406a_abort	/* abort */,            \
-     reset:             NCR53c406a_reset	/* reset */,            \
-     bios_param:        NCR53c406a_biosparm	/* biosparm */,         \
-     can_queue:         1			/* can_queue */,        \
-     this_id:           7			/* SCSI ID of the chip */, \
-     sg_tablesize:      32			/*SG_ALL*/ /*SG_NONE*/, \
-     cmd_per_lun:       1			/* commands per lun */, \
-     unchecked_isa_dma: 1			/* unchecked_isa_dma */, \
-     use_clustering:    ENABLE_CLUSTERING                               \
+     proc_name:         	"NCR53c406a"		/* proc_name */,        \
+     name:              	"NCR53c406a"		/* name */,             \
+     detect:            	NCR53c406a_detect	/* detect */,           \
+     info:              	NCR53c406a_info		/* info */,             \
+     command:           	NCR53c406a_command	/* command */,          \
+     queuecommand:      	NCR53c406a_queue	/* queuecommand */,     \
+     eh_abort_handler:  	NCR53c406a_abort	/* abort */,            \
+     eh_bus_reset_handler:      NCR53c406a_bus_reset	/* reset */,            \
+     eh_device_reset_handler:   NCR53c406a_device_reset	/* reset */,            \
+     eh_host_reset_handler:     NCR53c406a_host_reset	/* reset */,            \
+     bios_param:        	NCR53c406a_biosparm	/* biosparm */,         \
+     can_queue:         	1			/* can_queue */,        \
+     this_id:           	7			/* SCSI ID of the chip */, \
+     sg_tablesize:      	32			/*SG_ALL*/ /*SG_NONE*/, \
+     cmd_per_lun:       	1			/* commands per lun */, \
+     unchecked_isa_dma: 	1			/* unchecked_isa_dma */, \
+     use_clustering:    	ENABLE_CLUSTERING                               \
 }
 
-int NCR53c406a_detect(Scsi_Host_Template *);
-const char* NCR53c406a_info(struct Scsi_Host *);
-
-int NCR53c406a_command(Scsi_Cmnd *);
-int NCR53c406a_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int NCR53c406a_abort(Scsi_Cmnd *);
-int NCR53c406a_reset(Scsi_Cmnd *, unsigned int);
-int NCR53c406a_biosparm(Disk *, struct block_device *, int []);
-
-#endif /* _NCR53C406A_H */
-
-/*
- * Overrides for Emacs so that we get a uniform tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-indent-level: 4
- * c-brace-imaginary-offset: 0
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * c-continued-statement-offset: 4
- * c-continued-brace-offset: 0
- * indent-tabs-mode: nil
- * tab-width: 8
- * End:
- */
+static int NCR53c406a_detect(Scsi_Host_Template *);
+static const char *NCR53c406a_info(struct Scsi_Host *);
+static int NCR53c406a_command(Scsi_Cmnd *);
+static int NCR53c406a_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
+static int NCR53c406a_abort(Scsi_Cmnd *);
+static int NCR53c406a_bus_reset(Scsi_Cmnd *);
+static int NCR53c406a_device_reset(Scsi_Cmnd *);
+static int NCR53c406a_host_reset(Scsi_Cmnd *);
+static int NCR53c406a_biosparm(Disk *, struct block_device *, sector_t, int[]);
 
+#endif				/* _NCR53C406A_H */
diff -Nru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/aacraid/aachba.c	Wed Oct 30 16:44:28 2002
@@ -37,11 +37,12 @@
 #include <linux/blk.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include "aacraid.h"
 
-/* FIXME: We share this with sd.c - wants putting in one spot only */
+#warning this is broken
+#define N_SD_MAJORS	8
+#define SD_MAJOR_MASK	(N_SD_MAJORS - 1)
 #define DEVICE_NR(device) (((major(device) & SD_MAJOR_MASK) << (8 - 4)) + (minor(device) >> 4))
 
 /*	SCSI Commands */
diff -Nru a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/aacraid/linit.c	Wed Oct 30 16:44:27 2002
@@ -56,7 +56,6 @@
 #include <scsi/scsicam.h>
 
 #include "aacraid.h"
-#include "sd.h"
 
 #define AAC_DRIVERNAME	"aacraid"
 
@@ -120,7 +119,8 @@
 static int aac_detect(Scsi_Host_Template *);
 static int aac_release(struct Scsi_Host *);
 static int aac_queuecommand(Scsi_Cmnd *, void (*CompletionRoutine)(Scsi_Cmnd *));
-static int aac_biosparm(Scsi_Disk *, struct block_device *, int *);
+static int aac_biosparm(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 static int aac_procinfo(char *, char **, off_t, int, int, int);
 static int aac_ioctl(Scsi_Device *, int, void *);
 static int aac_eh_abort(Scsi_Cmnd * cmd);
@@ -410,7 +410,8 @@
  *	be displayed.
  */
  
-static int aac_biosparm(Scsi_Disk *disk, struct block_device *bdev, int *geom)
+static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *geom)
 {
 	struct diskparm *param = (struct diskparm *)geom;
 	u8 *buf;
@@ -420,9 +421,9 @@
 	/*
 	 *	Assuming extended translation is enabled - #REVISIT#
 	 */
-	if( disk->capacity >= 2 * 1024 * 1024 ) /* 1 GB in 512 byte sectors */
+	if( capacity >= 2 * 1024 * 1024 ) /* 1 GB in 512 byte sectors */
 	{
-		if( disk->capacity >= 4 * 1024 * 1024 ) /* 2 GB in 512 byte sectors */
+		if( capacity >= 4 * 1024 * 1024 ) /* 2 GB in 512 byte sectors */
 		{
 			param->heads = 255;
 			param->sectors = 63;
@@ -439,7 +440,7 @@
 		param->sectors = 32;
 	}
 
-	param->cylinders = disk->capacity/(param->heads * param->sectors);
+	param->cylinders = capacity/(param->heads * param->sectors);
 
 	/*
 	 *	Read the partition table block
@@ -493,7 +494,7 @@
 			end_sec = first->end_sector & 0x3f;
 		}
 
-		param->cylinders = disk->capacity / (param->heads * param->sectors);
+		param->cylinders = capacity / (param->heads * param->sectors);
 
 		if(num < 4 && end_sec == param->sectors)
 		{
diff -Nru a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
--- a/drivers/scsi/advansys.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/advansys.c	Wed Oct 30 16:44:26 2002
@@ -810,7 +810,6 @@
 #endif
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include "advansys.h"
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
@@ -1570,7 +1569,6 @@
     uchar               isa_dma_speed;
     uchar               isa_dma_channel;
     uchar               chip_version;
-    ushort              pci_device_id;
     ushort              lib_serial_no;
     ushort              lib_version;
     ushort              mcode_date;
@@ -1580,6 +1578,7 @@
     uchar               sdtr_period_offset[ASC_MAX_TID + 1];
     ushort              pci_slot_info;
     uchar               adapter_info[6];
+    struct pci_dev	*pci_dev;
 } ASC_DVC_CFG;
 
 #define ASC_DEF_DVC_CNTL       0xFFFF
@@ -3075,7 +3074,6 @@
   ushort disc_enable;       /* enable disconnection */
   uchar  chip_version;      /* chip version */
   uchar  termination;       /* Term. Ctrl. bits 6-5 of SCSI_CFG1 register */
-  ushort pci_device_id;     /* PCI device code number */
   ushort lib_version;       /* Adv Library version number */
   ushort control_flag;      /* Microcode Control Flag */
   ushort mcode_date;        /* Microcode date */
@@ -3086,6 +3084,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 */
 } ADV_DVC_CFG;
 
 struct adv_dvc_var;
@@ -4957,7 +4956,7 @@
 #ifdef CONFIG_PCI
                 case ASC_IS_PCI:
                     shp->irq = asc_dvc_varp->irq_no = pci_devp->irq;
-                    asc_dvc_varp->cfg->pci_device_id = pci_devp->device;
+                    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),
@@ -4981,7 +4980,7 @@
                  */
 #ifdef CONFIG_PCI
                 shp->irq = adv_dvc_varp->irq_no = pci_devp->irq;
-                adv_dvc_varp->cfg->pci_device_id = pci_devp->device;
+                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),
@@ -6115,16 +6114,17 @@
  * ip[2]: cylinders
  */
 int
-advansys_biosparam(Disk *dp, struct block_device *dep, int ip[])
+advansys_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int ip[])
 {
     asc_board_t     *boardp;
 
     ASC_DBG(1, "advansys_biosparam: begin\n");
-    ASC_STATS(dp->device->host, biosparam);
-    boardp = ASC_BOARDP(dp->device->host);
+    ASC_STATS(sdev->host, biosparam);
+    boardp = ASC_BOARDP(sdev->host);
     if (ASC_NARROW_BOARD(boardp)) {
         if ((boardp->dvc_var.asc_dvc_var.dvc_cntl &
-             ASC_CNTL_BIOS_GT_1GB) && dp->capacity > 0x200000) {
+             ASC_CNTL_BIOS_GT_1GB) && capacity > 0x200000) {
                 ip[0] = 255;
                 ip[1] = 63;
         } else {
@@ -6133,7 +6133,7 @@
         }
     } else {
         if ((boardp->dvc_var.adv_dvc_var.bios_ctrl &
-             BIOS_CTRL_EXTENDED_XLAT) && dp->capacity > 0x200000) {
+             BIOS_CTRL_EXTENDED_XLAT) && capacity > 0x200000) {
                 ip[0] = 255;
                 ip[1] = 63;
         } else {
@@ -6141,7 +6141,7 @@
                 ip[1] = 32;
         }
     }
-    ip[2] = (unsigned long)dp->capacity / (ip[0] * ip[1]);
+    ip[2] = (unsigned long)capacity / (ip[0] * ip[1]);
     ASC_DBG(1, "advansys_biosparam: end\n");
     return 0;
 }
@@ -9040,10 +9040,7 @@
 {
 #ifdef CONFIG_PCI
     uchar byte_data;
-    pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
-        PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),
-            ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
-        offset, &byte_data);
+    pci_read_config_byte(asc_dvc->cfg->pci_dev, offset, &byte_data);
     return byte_data;
 #else /* !defined(CONFIG_PCI) */
     return 0;
@@ -9062,10 +9059,7 @@
 )
 {
 #ifdef CONFIG_PCI
-    pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
-        PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),
-            ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
-        offset, byte_data);
+    pci_write_config_byte(asc_dvc->cfg->pci_dev, offset, byte_data);
 #endif /* CONFIG_PCI */
 }
 
@@ -9163,10 +9157,7 @@
 {
 #ifdef CONFIG_PCI
     uchar byte_data;
-    pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
-        PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),
-            ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
-        offset, &byte_data);
+    pci_read_config_byte(asc_dvc->cfg->pci_dev, offset, &byte_data);
     return byte_data;
 #else /* CONFIG_PCI */
     return 0;
@@ -9185,10 +9176,7 @@
 )
 {
 #ifdef CONFIG_PCI
-    pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
-        PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),
-            ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
-        offset, byte_data);
+    pci_write_config_byte(asc_dvc->cfg->pci_dev, offset, byte_data);
 #else /* CONFIG_PCI */
     return 0;
 #endif /* CONFIG_PCI */
@@ -9548,7 +9536,7 @@
 
     printk(
 " pci_device_id %d, lib_serial_no %u, lib_version %u, mcode_date 0x%x,\n",
-          h->pci_device_id, h->lib_serial_no, h->lib_version, h->mcode_date);
+          h->pci_dev->device, h->lib_serial_no, h->lib_version, h->mcode_date);
 
     printk(
 " mcode_version %d, overrun_buf 0x%lx\n",
@@ -9673,7 +9661,7 @@
 
     printk(
 "  mcode_version 0x%x, pci_device_id 0x%x, lib_version %u\n",
-       h->mcode_version, h->pci_device_id, h->lib_version);
+       h->mcode_version, h->pci_dev->device, h->lib_version);
 
     printk(
 "  control_flag 0x%x, pci_slot_info 0x%x\n",
@@ -12342,7 +12330,7 @@
     ushort              pci_device_id;
 
     iop_base = asc_dvc->iop_base;
-    pci_device_id = asc_dvc->cfg->pci_device_id;
+    pci_device_id = asc_dvc->cfg->pci_dev->device;
     warn_code = 0;
     cfg_msw = AscGetChipCfgMsw(iop_base);
     if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) {
diff -Nru a/drivers/scsi/advansys.h b/drivers/scsi/advansys.h
--- a/drivers/scsi/advansys.h	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/advansys.h	Wed Oct 30 16:44:35 2002
@@ -52,7 +52,8 @@
 const char *advansys_info(struct Scsi_Host *);
 int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 int advansys_reset(Scsi_Cmnd *);
-int advansys_biosparam(Disk *, struct block_device *, int[]);
+int advansys_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 static int advansys_slave_attach(Scsi_Device *);
 #ifdef CONFIG_PROC_FS
 #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28)
diff -Nru a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
--- a/drivers/scsi/aha152x.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/aha152x.c	Wed Oct 30 16:44:19 2002
@@ -232,7 +232,6 @@
 #include <linux/version.h>
 #include <linux/blk.h>
 #include "scsi.h"
-#include "sd.h"
 #include "hosts.h"
 #include <asm/system.h>
 #include <linux/errno.h>
@@ -1831,21 +1830,22 @@
  * Return the "logical geometry"
  *
  */
-int aha152x_biosparam(Scsi_Disk * disk, struct block_device *bdev, int *info_array)
+int aha152x_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *info_array)
 {
-	struct Scsi_Host *shpnt = disk->device->host;
+	struct Scsi_Host *shpnt = sdev->host;
 
 	/* try default translation */
 	info_array[0] = 64;
 	info_array[1] = 32;
-	info_array[2] = (unsigned long)disk->capacity / (64 * 32);
+	info_array[2] = (unsigned long)capacity / (64 * 32);
 
 	/* for disks >1GB do some guessing */
 	if (info_array[2] >= 1024) {
 		int info[3];
 
 		/* try to figure out the geometry from the partition table */
-		if (scsicam_bios_param(disk, bdev, info) < 0 ||
+		if (scsicam_bios_param(bdev, capacity, info) < 0 ||
 		    !((info[0] == 64 && info[1] == 32) || (info[0] == 255 && info[1] == 63))) {
 			if (EXT_TRANS) {
 				printk(KERN_NOTICE
@@ -1853,7 +1853,7 @@
 				       "         using extended translation.\n");
 				info_array[0] = 255;
 				info_array[1] = 63;
-				info_array[2] = (unsigned long)disk->capacity / (255 * 63);
+				info_array[2] = (unsigned long)capacity / (255 * 63);
 			} else {
 				printk(KERN_NOTICE
 				       "aha152x: unable to verify geometry for disk with >1GB.\n"
diff -Nru a/drivers/scsi/aha152x.h b/drivers/scsi/aha152x.h
--- a/drivers/scsi/aha152x.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/aha152x.h	Wed Oct 30 16:44:29 2002
@@ -20,7 +20,8 @@
 int aha152x_device_reset(Scsi_Cmnd *);
 int aha152x_bus_reset(Scsi_Cmnd *);
 int aha152x_host_reset(Scsi_Cmnd *);
-int aha152x_biosparam(Disk *, struct block_device *, int*);
+int aha152x_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int*);
 int aha152x_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout);
 
 /* number of queueable commands
diff -Nru a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
--- a/drivers/scsi/aha1542.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/aha1542.c	Wed Oct 30 16:44:28 2002
@@ -1781,14 +1781,13 @@
 }
 #endif    /* end of big comment block around old_abort + old_reset */
 
-#include "sd.h"
-
-static int aha1542_biosparam(Scsi_Disk * disk, struct block_device *dev, int *ip)
+static int aha1542_biosparam(struct scsi_device *sdev,
+		struct block_device *bdev, sector_t capacity, int *ip)
 {
 	int translation_algorithm;
-	int size = disk->capacity;
+	int size = capacity;
 
-	translation_algorithm = HOSTDATA(disk->device->host)->bios_translation;
+	translation_algorithm = HOSTDATA(sdev->host)->bios_translation;
 
 	if ((size >> 11) > 1024 && translation_algorithm == BIOS_TRANSLATION_25563) {
 		/* Please verify that this is the same as what DOS returns */
diff -Nru a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h
--- a/drivers/scsi/aha1542.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/scsi/aha1542.h	Wed Oct 30 16:44:24 2002
@@ -140,7 +140,8 @@
 static int aha1542_old_abort(Scsi_Cmnd * SCpnt);
 static int aha1542_old_reset(Scsi_Cmnd *, unsigned int);
 #endif
-static int aha1542_biosparam(Disk *, struct block_device *, int*);
+static int aha1542_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 #define AHA1542_MAILBOXES 8
 #define AHA1542_SCATTER 16
diff -Nru a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
--- a/drivers/scsi/aha1740.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/aha1740.c	Wed Oct 30 16:44:26 2002
@@ -36,7 +36,6 @@
 #include <linux/blk.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include "aha1740.h"
 #include<linux/stat.h>
@@ -64,6 +63,8 @@
 
 #define HOSTDATA(host) ((struct aha1740_hostdata *) &host->hostdata)
 
+static spinlock_t aha1740_lock = SPIN_LOCK_UNLOCKED;
+
 /* One for each IRQ level (9-15) */
 static struct Scsi_Host * aha_host[8] = {NULL, };
 
@@ -258,7 +259,7 @@
 		continue;
 	    }
 	    if (SCtmp->host_scribble)
-		scsi_free(SCtmp->host_scribble, 512);
+		kfree(SCtmp->host_scribble);
 	    /* Fetch the sense data, and tuck it away, in the required slot.
 	       The Adaptec automatically fetches it, and there is no
 	       guarantee that we will still have it in the cdb when we come
@@ -346,8 +347,8 @@
 #endif
 
     /* locate an available ecb */
-    save_flags(flags);
-    cli();
+
+    spin_lock_irqsave(&aha1740_lock, flags);
     ecbno = host->last_ecb_used + 1;		/* An optimization */
     if (ecbno >= AHA1740_ECBS)
 	ecbno = 0;
@@ -366,7 +367,7 @@
 						   doubles as reserved flag */
 
     host->last_ecb_used = ecbno;    
-    restore_flags(flags);
+    spin_unlock_irqrestore(&aha1740_lock, flags);
 
 #ifdef DEBUG
     printk("Sending command (%d %x)...", ecbno, done);
@@ -390,14 +391,18 @@
 	DEB(unsigned char * ptr);
 
 	host->ecb[ecbno].sg = 1;  /* SCSI Initiator Command  w/scatter-gather*/
-	SCpnt->host_scribble = (unsigned char *) scsi_malloc(512);
+	SCpnt->host_scribble = (unsigned char *)kmalloc(512, GFP_KERNEL);
+	if(SCpnt->host_scribble == NULL)
+	{
+		printk(KERN_WARNING "aha1740: out of memory in queuecommand!\n");
+		return 1;
+	}
 	sgpnt = (struct scatterlist *) SCpnt->request_buffer;
 	cptr = (struct aha1740_chain *) SCpnt->host_scribble; 
-	if (cptr == NULL) panic("aha1740.c: unable to allocate DMA memory\n");
 	for(i=0; i<SCpnt->use_sg; i++)
 	{
 	    cptr[i].datalen = sgpnt[i].length;
-	    cptr[i].dataptr = isa_virt_to_bus(sgpnt[i].address);
+	    cptr[i].dataptr = isa_virt_to_bus(page_address(sgpnt[i].page) + sgpnt[i].offset);
 	}
 	host->ecb[ecbno].datalen = SCpnt->use_sg * sizeof(struct aha1740_chain);
 	host->ecb[ecbno].dataptr = isa_virt_to_bus(cptr);
@@ -448,13 +453,12 @@
 	int loopcnt;
 	unsigned int base = SCpnt->host->io_port;
 	DEB(printk("aha1740[%d] critical section\n",ecbno));
-	save_flags(flags);
-	cli();
+
+	spin_lock_irqsave(&aha1740_lock, flags);
 	for (loopcnt = 0; ; loopcnt++) {
 	    if (inb(G2STAT(base)) & G2STAT_MBXOUT) break;
 	    if (loopcnt == LOOPCNT_WARN) {
 		printk("aha1740[%d]_mbxout wait!\n",ecbno);
-		cli(); /* printk may have done a sti()! */
 	    }
 	    if (loopcnt == LOOPCNT_MAX)
 		panic("aha1740.c: mbxout busy!\n");
@@ -464,13 +468,12 @@
 	    if (! (inb(G2STAT(base)) & G2STAT_BUSY)) break;
 	    if (loopcnt == LOOPCNT_WARN) {
 		printk("aha1740[%d]_attn wait!\n",ecbno);
-		cli();
 	    }
 	    if (loopcnt == LOOPCNT_MAX)
 		panic("aha1740.c: attn wait failed!\n");
 	}
 	outb(ATTN_START | (target & 7), ATTN(base)); /* Start it up */
-	restore_flags(flags);
+	spin_unlock_irqrestore(&aha1740_lock, flags);
 	DEB(printk("aha1740[%d] request queued.\n",ecbno));
     }
     else
@@ -488,7 +491,10 @@
     aha1740_queuecommand(SCpnt, internal_done);
     SCpnt->SCp.Status = 0;
     while (!SCpnt->SCp.Status)
+    {
+	cpu_relax();
 	barrier();
+    }
     return SCpnt->result;
 }
 
@@ -590,10 +596,11 @@
     return SCSI_RESET_PUNT;
 }
 
-int aha1740_biosparam(Disk * disk, struct block_device *dev, int* ip)
+int aha1740_biosparam(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int* ip)
 {
-    int size = disk->capacity;
-    int extended = HOSTDATA(disk->device->host)->translation;
+    int size = capacity;
+    int extended = HOSTDATA(sdev->host)->translation;
 
     DEB(printk("aha1740_biosparam\n"));
     if (extended && (ip[2] > 1024))
diff -Nru a/drivers/scsi/aha1740.h b/drivers/scsi/aha1740.h
--- a/drivers/scsi/aha1740.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/aha1740.h	Wed Oct 30 16:44:29 2002
@@ -157,7 +157,8 @@
 int aha1740_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 int aha1740_abort(Scsi_Cmnd *);
 int aha1740_reset(Scsi_Cmnd *, unsigned int);
-int aha1740_biosparam(Disk *, struct block_device *, int*);
+int aha1740_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int*);
 int aha1740_proc_info(char *buffer, char **start, off_t offset,
                                int length, int hostno, int inout);
 
diff -Nru a/drivers/scsi/aic7xxx/Config.help b/drivers/scsi/aic7xxx/Config.help
--- a/drivers/scsi/aic7xxx/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,39 +0,0 @@
-CONFIG_SCSI_AIC7XXX
-  This driver supports all of Adaptec's PCI based SCSI controllers
-  (not the hardware RAID controllers though) as well as the aic7770
-  based EISA and VLB SCSI controllers (the 274x and 284x series).
-  This is an Adaptec sponsored driver written by Justin Gibbs.  It is
-  intended to replace the previous aic7xxx driver maintained by Doug
-  Ledford since Doug is no longer maintaining that driver.
-
-CONFIG_AIC7XXX_CMDS_PER_DEVICE
-  Specify the number of commands you would like to allocate per SCSI
-  device when Tagged Command Queueing (TCQ) is enabled on that device.
-
-  This is an upper bound value for the number of tagged transactions
-  to be used for any device.  The aic7xxx driver will automatically
-  vary this number based on device behavior.  For devices with a
-  fixed maximum, the driver will eventually lock to this maximum
-  and display a console message inidicating this value.
-
-  Note: Unless you experience some type of device failure, the default
-	value, no enforced limit, should work for you.
-
-  Default: 253
-
-CONFIG_AIC7XXX_RESET_DELAY_MS
-  The number of milliseconds to delay after an initial bus reset.
-  The bus settle delay following all error recovery actions is
-  dictated by the SCSI layer and is not affected by this value.
-
-  Default: 15000 (15 seconds)
-
-CONFIG_AIC7XXX_BUILD_FIRMWARE
-  This option should only be enabled if you are modifying the firmware
-  source to the aic7xxx driver and wish to have the generated firmware
-  include files updated during a normal kernel build.  The assembler
-  for the firmware requires lex and yacc or their equivalents, as well
-  as the db v1 library.  You may have to install additional packages
-  or modify the assembler make file or the files it includes if your
-  build environment is different than that of the author.
-
diff -Nru a/drivers/scsi/aic7xxx/Config.in b/drivers/scsi/aic7xxx/Config.in
--- a/drivers/scsi/aic7xxx/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-if [ "$CONFIG_SCSI_AIC7XXX_OLD" != "y" ]; then
-   dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
-   if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
-      int  '  Maximum number of TCQ commands per device' CONFIG_AIC7XXX_CMDS_PER_DEVICE 253
-      int  '  Initial bus reset delay in milli-seconds' CONFIG_AIC7XXX_RESET_DELAY_MS 15000
-      bool  '  Build Adapter Firmware with Kernel Build' CONFIG_AIC7XXX_BUILD_FIRMWARE
-   fi
-fi
diff -Nru a/drivers/scsi/aic7xxx/Kconfig b/drivers/scsi/aic7xxx/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/aic7xxx/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,53 @@
+config SCSI_AIC7XXX
+	tristate "New driver"
+	help
+	  This driver supports all of Adaptec's PCI based SCSI controllers
+	  (not the hardware RAID controllers though) as well as the aic7770
+	  based EISA and VLB SCSI controllers (the 274x and 284x series).
+	  This is an Adaptec sponsored driver written by Justin Gibbs.  It is
+	  intended to replace the previous aic7xxx driver maintained by Doug
+	  Ledford since Doug is no longer maintaining that driver.
+
+
+config AIC7XXX_CMDS_PER_DEVICE
+	int "Maximum number of TCQ commands per device"
+	depends on SCSI_AIC7XXX
+	default "253"
+	---help---
+	  Specify the number of commands you would like to allocate per SCSI
+	  device when Tagged Command Queueing (TCQ) is enabled on that device.
+
+	  This is an upper bound value for the number of tagged transactions
+	  to be used for any device.  The aic7xxx driver will automatically
+	  vary this number based on device behavior.  For devices with a
+	  fixed maximum, the driver will eventually lock to this maximum
+	  and display a console message inidicating this value.
+
+	  Note: Unless you experience some type of device failure, the default
+	  	value, no enforced limit, should work for you.
+
+	  Default: 253
+
+config AIC7XXX_RESET_DELAY_MS
+	int "Initial bus reset delay in milli-seconds"
+	depends on SCSI_AIC7XXX
+	default "15000"
+	help
+	  The number of milliseconds to delay after an initial bus reset.
+	  The bus settle delay following all error recovery actions is
+	  dictated by the SCSI layer and is not affected by this value.
+
+	  Default: 15000 (15 seconds)
+
+config AIC7XXX_BUILD_FIRMWARE
+	bool "Build Adapter Firmware with Kernel Build"
+	depends on SCSI_AIC7XXX
+	help
+	  This option should only be enabled if you are modifying the firmware
+	  source to the aic7xxx driver and wish to have the generated firmware
+	  include files updated during a normal kernel build.  The assembler
+	  for the firmware requires lex and yacc or their equivalents, as well
+	  as the db v1 library.  You may have to install additional packages
+	  or modify the assembler make file or the files it includes if your
+	  build environment is different than that of the author.
+
diff -Nru a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
--- a/drivers/scsi/aic7xxx/Makefile	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/aic7xxx/Makefile	Wed Oct 30 16:44:35 2002
@@ -24,8 +24,7 @@
 clean-files := aic7xxx_seq.h aic7xxx_reg.h
 
 # Command to be executed upon make clean
-# Note: Assignment without ':' to force late evaluation of $(src)
-clean-rule = @$(MAKE) -C $(src)/aicasm clean
+clean-rule := $(MAKE) -C $(src)/aicasm clean
 
 include $(TOPDIR)/Rules.make
 
@@ -39,7 +38,7 @@
 
 $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg \
 		      $(obj)/aicasm/aicasm
-	$(obj)/aicasm/aicasm -I. -r $(obj)/aic7xxx_reg.h \
+	$(obj)/aicasm/aicasm -I$(obj) -r $(obj)/aic7xxx_reg.h \
 				 -o $(obj)/aic7xxx_seq.h $(src)/aic7xxx.seq
 
 $(obj)/aic7xxx_reg.h: $(obj)/aix7xxx_seq.h
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_linux.c b/drivers/scsi/aic7xxx/aic7xxx_linux.c
--- a/drivers/scsi/aic7xxx/aic7xxx_linux.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/aic7xxx/aic7xxx_linux.c	Wed Oct 30 16:44:27 2002
@@ -126,8 +126,6 @@
 #include <linux/init.h>		/* __setup */
 #endif
 
-#include "../sd.h"		/* For geometry detection */
-
 #include <linux/mm.h>		/* For fetching system memory size */
 #include <linux/blk.h>
 #include <scsi/scsicam.h>
@@ -398,26 +396,26 @@
 MODULE_LICENSE("Dual BSD/GPL");
 #endif
 MODULE_PARM(aic7xxx, "s");
-MODULE_PARM_DESC(aic7xxx, "period delimited, options string.
-	verbose			Enable verbose/diagnostic logging
-	no_probe		Disable EISA/VLB controller probing
-	no_reset		Supress initial bus resets
-	extended		Enable extended geometry on all controllers
-	periodic_otag		Send an ordered tagged transaction periodically
-				to prevent tag starvation.  This may be
-				required by some older disk drives/RAID arrays. 
-	reverse_scan		Sort PCI devices highest Bus/Slot to lowest
-	tag_info:<tag_str>	Set per-target tag depth
-	seltime:<int>		Selection Timeout(0/256ms,1/128ms,2/64ms,3/32ms)
-
-	Sample /etc/modules.conf line:
-		Enable verbose logging
-		Disable EISA/VLB probing
-		Set tag depth on Controller 2/Target 2 to 10 tags
-		Shorten the selection timeout to 128ms from its default of 256
-
-	options aic7xxx='\"verbose.no_probe.tag_info:{{}.{}.{..10}}.seltime:1\"'
-");
+MODULE_PARM_DESC(aic7xxx, "period delimited, options string.\n" \
+"	verbose			Enable verbose/diagnostic logging\n" \
+"	no_probe		Disable EISA/VLB controller probing\n" \
+"	no_reset		Supress initial bus resets\n" \
+"	extended		Enable extended geometry on all controllers\n" \
+"	periodic_otag		Send an ordered tagged transaction periodically\n" \
+"				to prevent tag starvation.  This may be\n" \
+"				required by some older disk drives/RAID arrays. \n" \
+"	reverse_scan		Sort PCI devices highest Bus/Slot to lowest\n" \
+"	tag_info:<tag_str>	Set per-target tag depth\n" \
+"	seltime:<int>		Selection Timeout(0/256ms,1/128ms,2/64ms,3/32ms)\n" \
+"\n" \
+"	Sample /etc/modules.conf line:\n" \
+"		Enable verbose logging\n" \
+"		Disable EISA/VLB probing\n" \
+"		Set tag depth on Controller 2/Target 2 to 10 tags\n" \
+"		Shorten the selection timeout to 128ms from its default of 256\n" \
+" \n" \
+"	options aic7xxx='\"verbose.no_probe.tag_info:{{}.{}.{..10}}.seltime:1\"'\n"
+);
 #endif
 
 static void ahc_linux_handle_scsi_status(struct ahc_softc *,
@@ -2718,7 +2716,8 @@
  * Return the disk geometry for the given SCSI device.
  */
 int
-ahc_linux_biosparam(Disk *disk, struct block_device *bdev, int geom[])
+ahc_linux_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[])
 {
 	int	heads;
 	int	sectors;
@@ -2728,11 +2727,11 @@
 	struct	ahc_softc *ahc;
 	unsigned char *buf;
 
-	ahc = *((struct ahc_softc **)disk->device->host->hostdata);
+	ahc = *((struct ahc_softc **)sdev->host->hostdata);
 	buf = scsi_bios_ptable(bdev);
 
 	if (buf) {
-		ret = scsi_partsize(buf, disk->capacity,
+		ret = scsi_partsize(buf, capacity,
 				    &geom[2], &geom[0], &geom[1]);
 		kfree(buf);
 		if (ret != -1)
@@ -2740,18 +2739,18 @@
 	}
 	heads = 64;
 	sectors = 32;
-	cylinders = (unsigned long)disk->capacity / (heads * sectors);
+	cylinders = (unsigned long)capacity / (heads * sectors);
 
 	if (aic7xxx_extended != 0)
 		extended = 1;
-	else if (disk->device->channel == 0)
+	else if (sdev->channel == 0)
 		extended = (ahc->flags & AHC_EXTENDED_TRANS_A) != 0;
 	else
 		extended = (ahc->flags & AHC_EXTENDED_TRANS_B) != 0;
 	if (extended && cylinders >= 1024) {
 		heads = 255;
 		sectors = 63;
-		cylinders = (unsigned long)disk->capacity / (heads * sectors);
+		cylinders = (unsigned long)capacity / (heads * sectors);
 	}
 	geom[0] = heads;
 	geom[1] = sectors;
diff -Nru a/drivers/scsi/aic7xxx/aic7xxx_linux_host.h b/drivers/scsi/aic7xxx/aic7xxx_linux_host.h
--- a/drivers/scsi/aic7xxx/aic7xxx_linux_host.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/aic7xxx/aic7xxx_linux_host.h	Wed Oct 30 16:44:27 2002
@@ -47,7 +47,8 @@
 int		 ahc_linux_detect(Scsi_Host_Template *);
 int		 ahc_linux_release(struct Scsi_Host *);
 const char	*ahc_linux_info(struct Scsi_Host *);
-int		 ahc_linux_biosparam(Disk *, struct block_device *, int[]);
+int		 ahc_linux_biosparam(struct scsi_device *,
+			struct block_device *, sector_t, int[]);
 int		 ahc_linux_bus_reset(Scsi_Cmnd *);
 int		 ahc_linux_dev_reset(Scsi_Cmnd *);
 int		 ahc_linux_abort(Scsi_Cmnd *);
@@ -63,22 +64,14 @@
  * to do with card config are filled in after the card is detected.
  */
 #define AIC7XXX	{						\
-	module: NULL,						\
-	proc_dir: NULL,						\
 	proc_info: ahc_linux_proc_info,				\
-	name: NULL,						\
 	detect: ahc_linux_detect,				\
 	release: ahc_linux_release,				\
 	info: ahc_linux_info,					\
-	command: NULL,						\
 	queuecommand: ahc_linux_queue,				\
-	eh_strategy_handler: NULL,				\
 	eh_abort_handler: ahc_linux_abort,			\
 	eh_device_reset_handler: ahc_linux_dev_reset,		\
 	eh_bus_reset_handler: ahc_linux_bus_reset,		\
-	eh_host_reset_handler: NULL,				\
-	abort: NULL,						\
-	reset: NULL,						\
 	slave_attach: ahc_linux_slave_attach,			\
 	bios_param: AIC7XXX_BIOSPARAM,				\
 	can_queue: 253,		/* max simultaneous cmds      */\
diff -Nru a/drivers/scsi/aic7xxx_old/aic7xxx.h b/drivers/scsi/aic7xxx_old/aic7xxx.h
--- a/drivers/scsi/aic7xxx_old/aic7xxx.h	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/aic7xxx_old/aic7xxx.h	Wed Oct 30 16:44:19 2002
@@ -35,13 +35,6 @@
 	release: aic7xxx_release,				\
 	info: aic7xxx_info,					\
 	queuecommand: aic7xxx_queue,				\
-	eh_strategy_handler: NULL,				\
-	eh_abort_handler: NULL,					\
-	eh_device_reset_handler: NULL,				\
-	eh_bus_reset_handler: NULL,				\
-	eh_host_reset_handler: NULL,				\
-	abort: aic7xxx_abort,					\
-	reset: aic7xxx_reset,					\
 	slave_attach: aic7xxx_slave_attach,			\
 	slave_detach: aic7xxx_slave_detach,			\
 	bios_param: aic7xxx_biosparam,				\
@@ -55,11 +48,10 @@
 }
 
 extern int aic7xxx_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
-extern int aic7xxx_biosparam(Disk *, struct block_device *, int[]);
+extern int aic7xxx_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 extern int aic7xxx_detect(Scsi_Host_Template *);
 extern int aic7xxx_command(Scsi_Cmnd *);
-extern int aic7xxx_reset(Scsi_Cmnd *, unsigned int);
-extern int aic7xxx_abort(Scsi_Cmnd *);
 extern int aic7xxx_release(struct Scsi_Host *);
 extern int aic7xxx_slave_attach(Scsi_Device *);
 extern void aic7xxx_slave_detach(Scsi_Device *);
diff -Nru a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c
--- a/drivers/scsi/aic7xxx_old.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/aic7xxx_old.c	Wed Oct 30 16:44:27 2002
@@ -238,7 +238,6 @@
 #include <linux/spinlock.h>
 #include <linux/smp.h>
 #include <linux/blk.h>
-#include "sd.h"
 #include "scsi.h"
 #include "hosts.h"
 #include "aic7xxx_old/aic7xxx.h"
@@ -11179,18 +11178,19 @@
  *   Return the disk geometry for the given SCSI device.
  *-F*************************************************************************/
 int
-aic7xxx_biosparam(Disk *disk, struct block_device *bdev, int geom[])
+aic7xxx_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[])
 {
   int heads, sectors, cylinders, ret;
   struct aic7xxx_host *p;
   unsigned char *buf;
 
-  p = (struct aic7xxx_host *) disk->device->host->hostdata;
+  p = (struct aic7xxx_host *) sdev->host->hostdata;
   buf = scsi_bios_ptable(bdev);
 
   if ( buf )
   {
-    ret = scsi_partsize(buf, disk->capacity, &geom[2], &geom[0], &geom[1]);
+    ret = scsi_partsize(buf, capacity, &geom[2], &geom[0], &geom[1]);
     kfree(buf);
     if ( ret != -1 )
       return(ret);
@@ -11198,13 +11198,13 @@
   
   heads = 64;
   sectors = 32;
-  cylinders = (unsigned long)disk->capacity / (heads * sectors);
+  cylinders = (unsigned long)capacity / (heads * sectors);
 
   if ((p->flags & AHC_EXTEND_TRANS_A) && (cylinders > 1024))
   {
     heads = 255;
     sectors = 63;
-    cylinders = (unsigned long)disk->capacity / (heads * sectors);
+    cylinders = (unsigned long)capacity / (heads * sectors);
   }
 
   geom[0] = heads;
diff -Nru a/drivers/scsi/amiga7xx.h b/drivers/scsi/amiga7xx.h
--- a/drivers/scsi/amiga7xx.h	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/amiga7xx.h	Wed Oct 30 16:44:35 2002
@@ -29,7 +29,6 @@
 		       queuecommand:        NCR53c7xx_queue_command, \
 		       abort:               NCR53c7xx_abort,   \
 		       reset:               NCR53c7xx_reset,   \
-		       bios_param:          scsicam_bios_param,   \
 		       can_queue:           24,       \
 		       this_id:             7,               \
 		       sg_tablesize:        63,          \
diff -Nru a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
--- a/drivers/scsi/atp870u.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/atp870u.c	Wed Oct 30 16:44:27 2002
@@ -2712,20 +2712,19 @@
 	return (len);
 }
 
-#include "sd.h"
-
-static int atp870u_biosparam(Scsi_Disk * disk, struct block_device *dev, int *ip)
+static int atp870u_biosparam(struct scsi_device *sdev,
+		struct block_device *dev, sector_t capacity, int *ip)
 {
 	int heads, sectors, cylinders;
 
 	heads = 64;
 	sectors = 32;
-	cylinders = (unsigned long)disk->capacity / (heads * sectors);
+	cylinders = (unsigned long)capacity / (heads * sectors);
 
 	if (cylinders > 1024) {
 		heads = 255;
 		sectors = 63;
-		cylinders = (unsigned long)disk->capacity / (heads * sectors);
+		cylinders = (unsigned long)capacity / (heads * sectors);
 	}
 	ip[0] = heads;
 	ip[1] = sectors;
diff -Nru a/drivers/scsi/atp870u.h b/drivers/scsi/atp870u.h
--- a/drivers/scsi/atp870u.h	Wed Oct 30 16:44:20 2002
+++ b/drivers/scsi/atp870u.h	Wed Oct 30 16:44:20 2002
@@ -21,7 +21,8 @@
 static int atp870u_command(Scsi_Cmnd *);
 static int atp870u_queuecommand(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 static int atp870u_abort(Scsi_Cmnd *);
-static int atp870u_biosparam(Disk *, struct block_device *, int *);
+static int atp870u_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 static int atp870u_release(struct Scsi_Host *);
 
 #define qcnt		32
@@ -37,18 +38,13 @@
 extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
 
 #define ATP870U {						\
-	next: NULL,						\
-	module: NULL,						\
 	proc_info: atp870u_proc_info,				\
-	name: NULL,						\
 	detect: atp870u_detect, 				\
 	release: atp870u_release,				\
 	info: atp870u_info,					\
 	command: atp870u_command,				\
 	queuecommand: atp870u_queuecommand,			\
-	eh_strategy_handler: NULL,				\
 	eh_abort_handler: atp870u_abort, 			\
-	slave_attach: NULL,					\
 	bios_param: atp870u_biosparam,				\
 	can_queue: qcnt,	 /* max simultaneous cmds      */\
 	this_id: 7,	       /* scsi id of host adapter    */\
diff -Nru a/drivers/scsi/bvme6000.h b/drivers/scsi/bvme6000.h
--- a/drivers/scsi/bvme6000.h	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/bvme6000.h	Wed Oct 30 16:44:31 2002
@@ -30,7 +30,6 @@
 		       queuecommand:        NCR53c7xx_queue_command, \
 		       abort:               NCR53c7xx_abort,   \
 		       reset:               NCR53c7xx_reset,   \
-		       bios_param:          scsicam_bios_param,   \
 		       can_queue:           24,       \
 		       this_id:             7,               \
 		       sg_tablesize:        63,          \
diff -Nru a/drivers/scsi/cpqfcTS.h b/drivers/scsi/cpqfcTS.h
--- a/drivers/scsi/cpqfcTS.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/cpqfcTS.h	Wed Oct 30 16:44:27 2002
@@ -12,7 +12,8 @@
 extern int cpqfcTS_reset(Scsi_Cmnd *, unsigned int);
 extern int cpqfcTS_eh_abort(Scsi_Cmnd *Cmnd);
 extern int cpqfcTS_eh_device_reset(Scsi_Cmnd *);
-extern int cpqfcTS_biosparam(Disk *, struct block_device *, int[]);
+extern int cpqfcTS_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 extern int cpqfcTS_ioctl( Scsi_Device *ScsiDev, int Cmnd, void *arg);
 
 // note: since Tachyon TS supports an extended scatter/gather
@@ -28,8 +29,6 @@
  queuecommand:           cpqfcTS_queuecommand,   \
  eh_device_reset_handler:   cpqfcTS_eh_device_reset,   \
  eh_abort_handler:       cpqfcTS_eh_abort,       \
- reset:                  cpqfcTS_reset,          \
- abort:                  cpqfcTS_abort,		 \
  bios_param:             cpqfcTS_biosparam,      \
  can_queue:              CPQFCTS_REQ_QUEUE_LEN,  \
  this_id:                -1,                     \
diff -Nru a/drivers/scsi/cpqfcTScontrol.c b/drivers/scsi/cpqfcTScontrol.c
--- a/drivers/scsi/cpqfcTScontrol.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/scsi/cpqfcTScontrol.c	Wed Oct 30 16:44:20 2002
@@ -44,7 +44,7 @@
 #include <asm/irq.h>
 #include <linux/spinlock.h>
 
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"   // Scsi_Host definition for INT handler
 #include "cpqfcTSchip.h"
 #include "cpqfcTSstructs.h"
diff -Nru a/drivers/scsi/cpqfcTSinit.c b/drivers/scsi/cpqfcTSinit.c
--- a/drivers/scsi/cpqfcTSinit.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/scsi/cpqfcTSinit.c	Wed Oct 30 16:44:20 2002
@@ -53,9 +53,9 @@
 #include <asm/uaccess.h>   // ioctl related
 #include <asm/irq.h>
 #include <linux/spinlock.h>
-#include "sd.h"
-#include <scsi/scsi_ioctl.h>
+#include "scsi.h"
 #include "hosts.h"
+#include <scsi/scsi_ioctl.h>
 #include "cpqfcTSchip.h"
 #include "cpqfcTSstructs.h"
 #include "cpqfcTStrigger.h"
@@ -1693,9 +1693,10 @@
    (from hosts.h)
 */
 
-int cpqfcTS_biosparam(Disk *disk, struct block_device *n, int ip[])
+int cpqfcTS_biosparam(struct scsi_device *sdev, struct block_device *n,
+		sector_t capacity, int ip[])
 {
-  int size = disk->capacity;
+  int size = capacity;
   
   ENTER("cpqfcTS_biosparam");
   ip[0] = 64;
diff -Nru a/drivers/scsi/cpqfcTSworker.c b/drivers/scsi/cpqfcTSworker.c
--- a/drivers/scsi/cpqfcTSworker.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/cpqfcTSworker.c	Wed Oct 30 16:44:31 2002
@@ -41,9 +41,7 @@
 #include <asm/irq.h>
 #include <asm/dma.h>
 
-
-
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"   // struct Scsi_Host definition for T handler
 #include "cpqfcTSchip.h"
 #include "cpqfcTSstructs.h"
diff -Nru a/drivers/scsi/dc390.h b/drivers/scsi/dc390.h
--- a/drivers/scsi/dc390.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/scsi/dc390.h	Wed Oct 30 16:44:24 2002
@@ -39,7 +39,8 @@
 extern int DC390_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
 extern int DC390_abort(Scsi_Cmnd *cmd);
 extern int DC390_reset(Scsi_Cmnd *cmd, unsigned int resetFlags);
-extern int DC390_bios_param(Disk *disk, struct block_device *dev, int geom[]);
+extern int DC390_bios_param(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int geom[]);
 
 #ifdef MODULE
 static int DC390_release(struct Scsi_Host *);
diff -Nru a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c
--- a/drivers/scsi/dmx3191d.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/dmx3191d.c	Wed Oct 30 16:44:29 2002
@@ -31,10 +31,10 @@
 #include <linux/signal.h>
 #include <linux/stat.h>
 #include <linux/version.h>
+#include <linux/delay.h>
 
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include "dmx3191d.h"
 
@@ -52,7 +52,7 @@
 #include "NCR5380.c"
 
 
-int __init dmx3191d_detect(Scsi_Host_Template *tmpl) {
+static int __init dmx3191d_detect(Scsi_Host_Template *tmpl) {
 	int boards = 0;
 	struct Scsi_Host *instance = NULL;
 	struct pci_dev *pdev = NULL;
@@ -90,7 +90,7 @@
 		instance->irq = pdev->irq;
 		NCR5380_init(instance, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E);
 
-		if (request_irq(pdev->irq, dmx3191d_do_intr, SA_SHIRQ,
+		if (request_irq(pdev->irq, dmx3191d_intr, SA_SHIRQ,
 				DMX3191D_DRIVER_NAME, instance)) {
 			printk(KERN_WARNING "dmx3191: IRQ %d not available - switching to polled mode.\n", pdev->irq);
 			/* Steam powered scsi controllers run without an IRQ
@@ -103,13 +103,13 @@
 	return boards;
 }
 
-const char * dmx3191d_info(struct Scsi_Host *host) {
+static const char * dmx3191d_info(struct Scsi_Host *host) {
 	static const char *info ="Domex DMX3191D";
 
 	return info;
 }
 
-int dmx3191d_release_resources(struct Scsi_Host *instance)
+static int dmx3191d_release_resources(struct Scsi_Host *instance)
 {
 	release_region(instance->io_port, DMX3191D_REGION);
 	if(instance->irq!=IRQ_NONE)
diff -Nru a/drivers/scsi/dmx3191d.h b/drivers/scsi/dmx3191d.h
--- a/drivers/scsi/dmx3191d.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/dmx3191d.h	Wed Oct 30 16:44:28 2002
@@ -20,16 +20,15 @@
 #define PCI_DEVICE_ID_DOMEX_DMX3191D	0x0001
 #endif
 
-#ifndef ASM
-int dmx3191d_abort(Scsi_Cmnd *);
-int dmx3191d_detect(Scsi_Host_Template *);
-const char* dmx3191d_info(struct Scsi_Host *);
-int dmx3191d_proc_info(char *, char **, off_t, int, int, int);
-int dmx3191d_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int dmx3191d_release_resources(struct Scsi_Host *);
-int dmx3191d_bus_reset(Scsi_Cmnd *);
-int dmx3191d_host_reset(Scsi_Cmnd *);
-int dmx3191d_device_reset(Scsi_Cmnd *);
+static int dmx3191d_abort(Scsi_Cmnd *);
+static int dmx3191d_detect(Scsi_Host_Template *);
+static const char* dmx3191d_info(struct Scsi_Host *);
+static int dmx3191d_proc_info(char *, char **, off_t, int, int, int);
+static int dmx3191d_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+static int dmx3191d_release_resources(struct Scsi_Host *);
+static int dmx3191d_bus_reset(Scsi_Cmnd *);
+static int dmx3191d_host_reset(Scsi_Cmnd *);
+static int dmx3191d_device_reset(Scsi_Cmnd *);
 
 
 #define DMX3191D {				\
@@ -64,9 +63,9 @@
 #define NCR5380_intr				dmx3191d_intr
 #define NCR5380_proc_info			dmx3191d_proc_info
 #define NCR5380_queue_command			dmx3191d_queue_command
-#define NCR5380_reset				dmx3191d_reset
-
-#endif	/* ASM */
+#define NCR5380_host_reset			dmx3191d_host_reset
+#define NCR5380_bus_reset			dmx3191d_bus_reset
+#define NCR5380_device_reset			dmx3191d_device_reset
 
 #endif	/* __DMX3191D_H */
 
diff -Nru a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
--- a/drivers/scsi/dpt_i2o.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/dpt_i2o.c	Wed Oct 30 16:44:26 2002
@@ -65,7 +65,6 @@
 
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include "dpt/dptsig.h"
 #include "dpti.h"
@@ -445,7 +444,8 @@
 	return adpt_scsi_to_i2o(pHba, cmd, pDev);
 }
 
-static int adpt_bios_param(Disk* disk, struct block_device *dev, int geom[])
+static int adpt_bios_param(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int geom[])
 {
 	int heads=-1;
 	int sectors=-1;
@@ -454,22 +454,22 @@
 	// *** First lets set the default geometry ****
 	
 	// If the capacity is less than ox2000
-	if (disk->capacity < 0x2000 ) {	// floppy
+	if (capacity < 0x2000 ) {	// floppy
 		heads = 18;
 		sectors = 2;
 	} 
 	// else if between 0x2000 and 0x20000
-	else if (disk->capacity < 0x20000) {
+	else if (capacity < 0x20000) {
 		heads = 64;
 		sectors = 32;
 	}
 	// else if between 0x20000 and 0x40000
-	else if (disk->capacity < 0x40000) {
+	else if (capacity < 0x40000) {
 		heads = 65;
 		sectors = 63;
 	}
 	// else if between 0x4000 and 0x80000
-	else if (disk->capacity < 0x80000) {
+	else if (capacity < 0x80000) {
 		heads = 128;
 		sectors = 63;
 	}
@@ -478,10 +478,10 @@
 		heads = 255;
 		sectors = 63;
 	}
-	cylinders = disk->capacity / (heads * sectors);
+	cylinders = capacity / (heads * sectors);
 
 	// Special case if CDROM
-	if(disk->device->type == 5) {  // CDROM
+	if(sdev->type == 5) {  // CDROM
 		heads = 252;
 		sectors = 63;
 		cylinders = 1111;
diff -Nru a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h
--- a/drivers/scsi/dpti.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/dpti.h	Wed Oct 30 16:44:17 2002
@@ -46,7 +46,8 @@
 static int adpt_slave_attach(Scsi_Device *);
 
 static const char *adpt_info(struct Scsi_Host *pSHost);
-static int adpt_bios_param(Disk * disk, struct block_device *dev, int geom[]);
+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);
diff -Nru a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c
--- a/drivers/scsi/dtc.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/dtc.c	Wed Oct 30 16:44:30 2002
@@ -2,7 +2,7 @@
 #define AUTOSENSE
 #define PSEUDO_DMA
 #define DONT_USE_INTR
-#define UNSAFE		/* Leave interrupts enabled during pseudo-dma I/O */
+#define UNSAFE			/* Leave interrupts enabled during pseudo-dma I/O */
 #define xNDEBUG (NDEBUG_INTR+NDEBUG_RESELECTION+\
 		 NDEBUG_SELECTION+NDEBUG_ARBITRATION)
 #define DMA_WORKS_RIGHT
@@ -77,13 +77,13 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/blk.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 #include "scsi.h"
 #include "hosts.h"
 #include "dtc.h"
 #define AUTOPROBE_IRQ
 #include "NCR5380.h"
-#include "sd.h"
 #include <linux/stat.h>
 #include <linux/string.h>
 #include <linux/init.h>
@@ -101,65 +101,77 @@
  */
 
 /*
- */ 
+ */
 /* Offset from DTC_5380_OFFSET */
 #define DTC_CONTROL_REG		0x100	/* rw */
 #define D_CR_ACCESS		0x80	/* ro set=can access 3280 registers */
 #define CSR_DIR_READ		0x40	/* rw direction, 1 = read 0 = write */
 
-#define CSR_RESET              0x80    /* wo  Resets 53c400 */
-#define CSR_5380_REG           0x80    /* ro  5380 registers can be accessed */
-#define CSR_TRANS_DIR          0x40    /* rw  Data transfer direction */
-#define CSR_SCSI_BUFF_INTR     0x20    /* rw  Enable int on transfer ready */
-#define CSR_5380_INTR          0x10    /* rw  Enable 5380 interrupts */
-#define CSR_SHARED_INTR        0x08    /* rw  Interrupt sharing */
-#define CSR_HOST_BUF_NOT_RDY   0x04    /* ro  Host buffer not ready */
-#define CSR_SCSI_BUF_RDY       0x02    /* ro  SCSI buffer ready */
-#define CSR_GATED_5380_IRQ     0x01    /* ro  Last block xferred */
+#define CSR_RESET              0x80	/* wo  Resets 53c400 */
+#define CSR_5380_REG           0x80	/* ro  5380 registers can be accessed */
+#define CSR_TRANS_DIR          0x40	/* rw  Data transfer direction */
+#define CSR_SCSI_BUFF_INTR     0x20	/* rw  Enable int on transfer ready */
+#define CSR_5380_INTR          0x10	/* rw  Enable 5380 interrupts */
+#define CSR_SHARED_INTR        0x08	/* rw  Interrupt sharing */
+#define CSR_HOST_BUF_NOT_RDY   0x04	/* ro  Host buffer not ready */
+#define CSR_SCSI_BUF_RDY       0x02	/* ro  SCSI buffer ready */
+#define CSR_GATED_5380_IRQ     0x01	/* ro  Last block xferred */
 #define CSR_INT_BASE (CSR_SCSI_BUFF_INTR | CSR_5380_INTR)
 
 
-#define DTC_BLK_CNT		0x101   /* rw 
+#define DTC_BLK_CNT		0x101	/* rw 
 					 * # of 128-byte blocks to transfer */
 
 
-#define D_CR_ACCESS             0x80    /* ro set=can access 3280 registers */
+#define D_CR_ACCESS             0x80	/* ro set=can access 3280 registers */
 
 #define DTC_SWITCH_REG		0x3982	/* ro - DIP switches */
 #define DTC_RESUME_XFER		0x3982	/* wo - resume data xfer 
-					   * after disconnect/reconnect*/
+					 * after disconnect/reconnect*/
 
 #define DTC_5380_OFFSET		0x3880	/* 8 registers here, see NCR5380.h */
 
 /*!!!! for dtc, it's a 128 byte buffer at 3900 !!! */
-#define DTC_DATA_BUF		0x3900  /* rw 128 bytes long */
+#define DTC_DATA_BUF		0x3900	/* rw 128 bytes long */
 
 static struct override {
-   unsigned int address;
-   int irq;
+	unsigned int address;
+	int irq;
 } overrides
 #ifdef OVERRIDE
 [] __initdata = OVERRIDE;
 #else
-[4] __initdata = {{0, IRQ_AUTO}, {0, IRQ_AUTO}, {0, IRQ_AUTO}, {0, IRQ_AUTO}};
+[4] __initdata = { {
+0, IRQ_AUTO}, {
+0, IRQ_AUTO}, {
+0, IRQ_AUTO}, {
+0, IRQ_AUTO}};
 #endif
 
 #define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
 
 static struct base {
-   unsigned long address;
-   int noauto;
-} bases[] __initdata = {{0xcc000, 0}, {0xc8000, 0}, {0xdc000, 0}, {0xd8000, 0}};
+	unsigned long address;
+	int noauto;
+} bases[] __initdata = { 
+	{ 0xcc000, 0 }, 
+	{ 0xc8000, 0 }, 
+	{ 0xdc000, 0 }, 
+	{ 0xd8000, 0 }
+};
 
 #define NO_BASES (sizeof (bases) / sizeof (struct base))
 
 static const struct signature {
-   const char *string;
-   int offset;
-} signatures[] = { {"DATA TECHNOLOGY CORPORATION BIOS", 0x25}, };
+	const char *string;
+	int offset;
+} signatures[] = { 
+	{"DATA TECHNOLOGY CORPORATION BIOS", 0x25},
+};
 
 #define NO_SIGNATURES (sizeof (signatures) /  sizeof (struct signature))
 
+#ifndef MODULE
 /*
  * Function : dtc_setup(char *str, int *ints)
  *
@@ -170,23 +182,24 @@
  *
 */
 
-void __init dtc_setup(char *str, int *ints){
-   static int commandline_current = 0;
-   int i;
-   if (ints[0] != 2)
-      printk("dtc_setup: usage dtc=address,irq\n");
-   else
-      if (commandline_current < NO_OVERRIDES) {
-      overrides[commandline_current].address = ints[1];
-      overrides[commandline_current].irq = ints[2];
-      for (i = 0; i < NO_BASES; ++i)
-	 if (bases[i].address == ints[1]) {
-	 bases[i].noauto = 1;
-	 break;
-      }
-      ++commandline_current;
-   }
+static void __init dtc_setup(char *str, int *ints)
+{
+	static int commandline_current = 0;
+	int i;
+	if (ints[0] != 2)
+		printk("dtc_setup: usage dtc=address,irq\n");
+	else if (commandline_current < NO_OVERRIDES) {
+		overrides[commandline_current].address = ints[1];
+		overrides[commandline_current].irq = ints[2];
+		for (i = 0; i < NO_BASES; ++i)
+			if (bases[i].address == ints[1]) {
+				bases[i].noauto = 1;
+				break;
+			}
+		++commandline_current;
+	}
 }
+#endif
 
 /* 
  * Function : int dtc_detect(Scsi_Host_Template * tpnt)
@@ -201,97 +214,92 @@
  *
 */
 
-int __init dtc_detect(Scsi_Host_Template * tpnt){
-   static int current_override = 0, current_base = 0;
-   struct Scsi_Host *instance;
-   unsigned int base;
-   int sig, count;
-
-   tpnt->proc_name = "dtc3x80";
-   tpnt->proc_info = &dtc_proc_info;
-
-   for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
-      base = 0;
-
-      if (overrides[current_override].address)
-	 base = overrides[current_override].address;
-      else
-	 for (; !base && (current_base < NO_BASES); ++current_base) {
+static int __init dtc_detect(Scsi_Host_Template * tpnt)
+{
+	static int current_override = 0, current_base = 0;
+	struct Scsi_Host *instance;
+	unsigned int base;
+	int sig, count;
+
+	tpnt->proc_name = "dtc3x80";
+	tpnt->proc_info = &dtc_proc_info;
+
+	for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
+		base = 0;
+
+		if (overrides[current_override].address)
+			base = overrides[current_override].address;
+		else
+			for (; !base && (current_base < NO_BASES); ++current_base) {
 #if (DTCDEBUG & DTCDEBUG_INIT)
-	 printk("scsi-dtc : probing address %08x\n", bases[current_base].address);
+				printk("scsi-dtc : probing address %08x\n", bases[current_base].address);
 #endif
-	 for (sig = 0; sig < NO_SIGNATURES; ++sig)
-	    if (!bases[current_base].noauto && 
-		isa_check_signature(bases[current_base].address +
-				signatures[sig].offset,
-	      signatures[sig].string, strlen(signatures[sig].string))) {
-	    base = bases[current_base].address;
+				for (sig = 0; sig < NO_SIGNATURES; ++sig)
+					if (!bases[current_base].noauto && isa_check_signature(bases[current_base].address + signatures[sig].offset, signatures[sig].string, strlen(signatures[sig].string))) {
+						base = bases[current_base].address;
 #if (DTCDEBUG & DTCDEBUG_INIT)
-	    printk("scsi-dtc : detected board.\n");
+						printk("scsi-dtc : detected board.\n");
 #endif
-	    break;
-	 }
-      }
+						break;
+					}
+			}
 
 #if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT)
-      printk("scsi-dtc : base = %08x\n", base);
+		printk("scsi-dtc : base = %08x\n", base);
 #endif
 
-      if (!base)
-	 break;
+		if (!base)
+			break;
 
-      instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
-      if(instance == NULL)
-      	break;
-      	
-      instance->base = base;
-
-      NCR5380_init(instance, 0);
-
-      NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR); /* Enable int's */
-      if (overrides[current_override].irq != IRQ_AUTO)
-	 instance->irq = overrides[current_override].irq;
-      else
-	 instance->irq = NCR5380_probe_irq(instance, DTC_IRQS);
+		instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));
+		if (instance == NULL)
+			break;
+
+		instance->base = base;
+
+		NCR5380_init(instance, 0);
+
+		NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);	/* Enable int's */
+		if (overrides[current_override].irq != IRQ_AUTO)
+			instance->irq = overrides[current_override].irq;
+		else
+			instance->irq = NCR5380_probe_irq(instance, DTC_IRQS);
 
 #ifndef DONT_USE_INTR
-/* With interrupts enabled, it will sometimes hang when doing heavy
- * reads. So better not enable them until I finger it out. */
-      if (instance->irq != IRQ_NONE)
-	 if (request_irq(instance->irq, do_dtc_intr, SA_INTERRUPT, "dtc", instance)) {
-	 printk("scsi%d : IRQ%d not free, interrupts disabled\n",
-	      instance->host_no, instance->irq);
-	 instance->irq = IRQ_NONE;
-      }
-
-      if (instance->irq == IRQ_NONE) {
-	 printk("scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
-	 printk("scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
-      }
+		/* With interrupts enabled, it will sometimes hang when doing heavy
+		 * reads. So better not enable them until I finger it out. */
+		if (instance->irq != IRQ_NONE)
+			if (request_irq(instance->irq, dtc_intr, SA_INTERRUPT, "dtc", instance)) {
+				printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
+				instance->irq = IRQ_NONE;
+			}
+
+		if (instance->irq == IRQ_NONE) {
+			printk(KERN_WARNING "scsi%d : interrupts not enabled. for better interactive performance,\n", instance->host_no);
+			printk(KERN_WARNING "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no);
+		}
 #else
-      if (instance->irq != IRQ_NONE)
-	 printk("scsi%d : interrupts not used. Might as well not jumper it.\n",
-		instance->host_no);
-      instance->irq = IRQ_NONE;
+		if (instance->irq != IRQ_NONE)
+			printk(KERN_WARNING "scsi%d : interrupts not used. Might as well not jumper it.\n", instance->host_no);
+		instance->irq = IRQ_NONE;
 #endif
 #if defined(DTCDEBUG) && (DTCDEBUG & DTCDEBUG_INIT)
-      printk("scsi%d : irq = %d\n", instance->host_no, instance->irq);
+		printk("scsi%d : irq = %d\n", instance->host_no, instance->irq);
 #endif
 
-      printk("scsi%d : at 0x%05X", instance->host_no, (int)instance->base);
-      if (instance->irq == IRQ_NONE)
-	 printk (" interrupts disabled");
-      else
-	 printk (" irq %d", instance->irq);
-      printk(" options CAN_QUEUE=%d  CMD_PER_LUN=%d release=%d",
-	   CAN_QUEUE, CMD_PER_LUN, DTC_PUBLIC_RELEASE);
-      NCR5380_print_options(instance);
-      printk("\n");
-
-      ++current_override;
-      ++count;
-   }
-   return count;
+		printk(KERN_INFO "scsi%d : at 0x%05X", instance->host_no, (int) instance->base);
+		if (instance->irq == IRQ_NONE)
+			printk(" interrupts disabled");
+		else
+			printk(" irq %d", instance->irq);
+		printk(" options CAN_QUEUE=%d  CMD_PER_LUN=%d release=%d", CAN_QUEUE, CMD_PER_LUN, DTC_PUBLIC_RELEASE);
+		NCR5380_print_options(instance);
+		printk("\n");
+
+		++current_override;
+		++count;
+	}
+	return count;
 }
 
 /*
@@ -314,14 +322,15 @@
  * and matching the H_C_S coordinates to what DOS uses.
 */
 
-int dtc_biosparam(Disk * disk, struct block_device *dev, int * ip)
+static int dtc_biosparam(struct scsi_device *sdev, struct block_device *dev,
+			 sector_t capacity, int *ip)
 {
-   int size = disk->capacity;
+	int size = capacity;
 
-   ip[0] = 64;
-   ip[1] = 32;
-   ip[2] = size >> 11;
-   return 0;
+	ip[0] = 64;
+	ip[1] = 32;
+	ip[2] = size >> 11;
+	return 0;
 }
 
 
@@ -341,43 +350,43 @@
 static int dtc_maxi = 0;
 static int dtc_wmaxi = 0;
 
-static inline int NCR5380_pread (struct Scsi_Host *instance,
-     unsigned char *dst, int len)
-     {
-   unsigned char *d = dst;
-   int i;	/* For counting time spent in the poll-loop */
-   NCR5380_local_declare();
-   NCR5380_setup(instance);
-
-   i = 0;
-   NCR5380_read(RESET_PARITY_INTERRUPT_REG);
-   NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
-   if (instance->irq == IRQ_NONE)
-      NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ);
-   else
-      NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ | CSR_INT_BASE);
-   NCR5380_write(DTC_BLK_CNT, len >> 7);        /* Block count */
-   rtrc(1);
-   while (len > 0) {
-      rtrc(2);
-      while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
-	 ++i;
-      rtrc(3);
-      isa_memcpy_fromio(d, base + DTC_DATA_BUF, 128);
-      d += 128;
-      len -= 128;
-      rtrc(7);	/*** with int's on, it sometimes hangs after here.
+static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len)
+{
+	unsigned char *d = dst;
+	int i;			/* For counting time spent in the poll-loop */
+	NCR5380_local_declare();
+	NCR5380_setup(instance);
+
+	i = 0;
+	NCR5380_read(RESET_PARITY_INTERRUPT_REG);
+	NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
+	if (instance->irq == IRQ_NONE)
+		NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ);
+	else
+		NCR5380_write(DTC_CONTROL_REG, CSR_DIR_READ | CSR_INT_BASE);
+	NCR5380_write(DTC_BLK_CNT, len >> 7);	/* Block count */
+	rtrc(1);
+	while (len > 0) {
+		rtrc(2);
+		while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
+			++i;
+		rtrc(3);
+		isa_memcpy_fromio(d, base + DTC_DATA_BUF, 128);
+		d += 128;
+		len -= 128;
+		rtrc(7);
+		/*** with int's on, it sometimes hangs after here.
 		 * Looks like something makes HBNR go away. */
-   }
-   rtrc(4);
-   while ( !(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
-      ++i;
-   NCR5380_write(MODE_REG, 0); /* Clear the operating mode */
-   rtrc(0);
-   NCR5380_read(RESET_PARITY_INTERRUPT_REG);
-   if (i > dtc_maxi)
-      dtc_maxi = i;
-   return(0);
+	}
+	rtrc(4);
+	while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
+		++i;
+	NCR5380_write(MODE_REG, 0);	/* Clear the operating mode */
+	rtrc(0);
+	NCR5380_read(RESET_PARITY_INTERRUPT_REG);
+	if (i > dtc_maxi)
+		dtc_maxi = i;
+	return (0);
 }
 
 /****************************************************************
@@ -393,44 +402,44 @@
  * 	timeout.
 */
 
-static inline int NCR5380_pwrite (struct Scsi_Host *instance,
-     unsigned char *src, int len) {
-   int i;
-   NCR5380_local_declare();
-   NCR5380_setup(instance);
-
-   NCR5380_read(RESET_PARITY_INTERRUPT_REG);
-   NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
-   /* set direction (write) */
-   if (instance->irq == IRQ_NONE)
-      NCR5380_write(DTC_CONTROL_REG, 0);
-   else
-      NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);
-   NCR5380_write(DTC_BLK_CNT, len >> 7);        /* Block count */
-   for (i = 0; len > 0; ++i) {
-      rtrc(5);
-      /* Poll until the host buffer can accept data. */
-      while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
-	 ++i;
-      rtrc(3);
-      isa_memcpy_toio(base + DTC_DATA_BUF, src, 128);
-      src += 128;
-      len -= 128;
-   }
-   rtrc(4);
-   while ( !(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
-      ++i;
-   rtrc(6);
-   /* Wait until the last byte has been sent to the disk */
-   while (!(NCR5380_read(TARGET_COMMAND_REG) & TCR_LAST_BYTE_SENT))
-      ++i;
-   rtrc(7);
-   /* Check for parity error here. fixme. */
-   NCR5380_write(MODE_REG, 0); /* Clear the operating mode */
-   rtrc(0);
-   if (i > dtc_wmaxi)
-      dtc_wmaxi = i;
-   return (0);
+static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, int len)
+{
+	int i;
+	NCR5380_local_declare();
+	NCR5380_setup(instance);
+
+	NCR5380_read(RESET_PARITY_INTERRUPT_REG);
+	NCR5380_write(MODE_REG, MR_ENABLE_EOP_INTR | MR_DMA_MODE);
+	/* set direction (write) */
+	if (instance->irq == IRQ_NONE)
+		NCR5380_write(DTC_CONTROL_REG, 0);
+	else
+		NCR5380_write(DTC_CONTROL_REG, CSR_5380_INTR);
+	NCR5380_write(DTC_BLK_CNT, len >> 7);	/* Block count */
+	for (i = 0; len > 0; ++i) {
+		rtrc(5);
+		/* Poll until the host buffer can accept data. */
+		while (NCR5380_read(DTC_CONTROL_REG) & CSR_HOST_BUF_NOT_RDY)
+			++i;
+		rtrc(3);
+		isa_memcpy_toio(base + DTC_DATA_BUF, src, 128);
+		src += 128;
+		len -= 128;
+	}
+	rtrc(4);
+	while (!(NCR5380_read(DTC_CONTROL_REG) & D_CR_ACCESS))
+		++i;
+	rtrc(6);
+	/* Wait until the last byte has been sent to the disk */
+	while (!(NCR5380_read(TARGET_COMMAND_REG) & TCR_LAST_BYTE_SENT))
+		++i;
+	rtrc(7);
+	/* Check for parity error here. fixme. */
+	NCR5380_write(MODE_REG, 0);	/* Clear the operating mode */
+	rtrc(0);
+	if (i > dtc_wmaxi)
+		dtc_wmaxi = i;
+	return (0);
 }
 
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h
--- a/drivers/scsi/dtc.h	Wed Oct 30 16:44:22 2002
+++ b/drivers/scsi/dtc.h	Wed Oct 30 16:44:22 2002
@@ -28,19 +28,17 @@
 #ifndef DTC3280_H
 #define DTC3280_H
 
-#ifndef ASM
-int dtc_abort(Scsi_Cmnd *);
-int dtc_biosparam(Disk *, struct block_device *, int*);
-int dtc_detect(Scsi_Host_Template *);
-int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int dtc_reset(Scsi_Cmnd *, unsigned int reset_flags);
-int dtc_proc_info (char *buffer, char **start, off_t offset,
+static int dtc_abort(Scsi_Cmnd *);
+static int dtc_biosparam(struct scsi_device *, struct block_device *,
+		         sector_t, int*);
+static int dtc_detect(Scsi_Host_Template *);
+static int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+static int dtc_bus_reset(Scsi_Cmnd *);
+static int dtc_device_reset(Scsi_Cmnd *);
+static int dtc_host_reset(Scsi_Cmnd *);
+static int dtc_proc_info (char *buffer, char **start, off_t offset,
 		   int length, int hostno, int inout);
 
-#ifndef NULL
-#define NULL 0
-#endif
-
 #ifndef CMD_PER_LUN
 #define CMD_PER_LUN 2
 #endif
@@ -55,24 +53,26 @@
  * macros when this is being used solely for the host stub.
  */
 
-#define DTC3x80 {				\
-	name:           "DTC 3180/3280 ",	\
-	detect:         dtc_detect,		\
-	queuecommand:   dtc_queue_command,	\
-	abort:          dtc_abort,		\
-	reset:          dtc_reset,		\
-	bios_param:     dtc_biosparam,		\
-	can_queue:      CAN_QUEUE,		\
-	this_id:        7,			\
-	sg_tablesize:   SG_ALL,			\
-	cmd_per_lun:    CMD_PER_LUN ,		\
+#define DTC3x80 {						\
+	name:				"DTC 3180/3280 ",	\
+	detect:				dtc_detect,		\
+	queuecommand:			dtc_queue_command,	\
+	eh_abort_handler:		dtc_abort,		\
+	eh_bus_reset_handler:		dtc_bus_reset,		\
+	eh_device_reset_handler:	dtc_device_reset,	\
+	eh_host_reset_handler:          dtc_host_reset,		\
+	bios_param:     dtc_biosparam,				\
+	can_queue:      CAN_QUEUE,				\
+	this_id:        7,					\
+	sg_tablesize:   SG_ALL,					\
+	cmd_per_lun:    CMD_PER_LUN ,				\
 	use_clustering: DISABLE_CLUSTERING}
 
 #define NCR5380_implementation_fields \
-    volatile unsigned int base
+    unsigned int base
 
 #define NCR5380_local_declare() \
-    volatile unsigned int base
+    unsigned int base
 
 #define NCR5380_setup(instance) \
     base = (unsigned int)(instance)->base
@@ -105,12 +105,13 @@
     isa_writeb(value, DTC_address(reg));} while(0)
 #endif
 
-#define NCR5380_intr dtc_intr
-#define do_NCR5380_intr do_dtc_intr
-#define NCR5380_queue_command dtc_queue_command
-#define NCR5380_abort dtc_abort
-#define NCR5380_reset dtc_reset
-#define NCR5380_proc_info dtc_proc_info 
+#define NCR5380_intr			dtc_intr
+#define NCR5380_queue_command		dtc_queue_command
+#define NCR5380_abort			dtc_abort
+#define NCR5380_bus_reset		dtc_bus_reset
+#define NCR5380_device_reset		dtc_device_reset
+#define NCR5380_host_reset		dtc_host_reset
+#define NCR5380_proc_info		dtc_proc_info 
 
 /* 15 12 11 10
    1001 1100 0000 0000 */
@@ -118,5 +119,4 @@
 #define DTC_IRQS 0x9c00
 
 
-#endif /* ndef ASM */
 #endif /* DTC3280_H */
diff -Nru a/drivers/scsi/eata.c b/drivers/scsi/eata.c
--- a/drivers/scsi/eata.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/scsi/eata.c	Wed Oct 30 16:44:32 2002
@@ -1,6 +1,31 @@
 /*
  *      eata.c - Low-level driver for EATA/DMA SCSI host adapters.
  *
+ *      10 Oct 2002 Rev. 7.70 for linux 2.5.42
+ *        + Foreport from revision 6.70.
+ *
+ *      25 Jun 2002 Rev. 6.70 for linux 2.4.19
+ *        + This release is the first one tested on a Big Endian platform:
+ *          fixed endian-ness problem due to bitfields;
+ *          fixed endian-ness problem in read_pio.
+ *        + Added new options for selectively probing ISA, EISA and PCI bus:
+ *
+ *          Boot option   Parameter name    Default according to
+ *
+ *          ip:[y|n]      isa_probe=[1|0]   CONFIG_ISA  defined
+ *          ep:[y|n]      eisa_probe=[1|0]  CONFIG_EISA defined
+ *          pp:[y|n]      pci_probe=[1|0]   CONFIG_PCI  defined
+ *
+ *          The default action is to perform probing if the corrisponding
+ *          bus is configured and to skip probing otherwise.
+ *
+ *        + If pci_probe is in effect and a list of I/O  ports is specified
+ *          as parameter or boot option, pci_enable_device() is performed
+ *          on all pci devices matching PCI_CLASS_STORAGE_SCSI.
+ *
+ *      21 Feb 2002 Rev. 6.52 for linux 2.4.18
+ *        + Backport from rev. 7.22 (use io_request_lock).
+ *
  *      20 Feb 2002 Rev. 7.22 for linux 2.5.5
  *        + Remove any reference to virt_to_bus().
  *        + Fix pio hang while detecting multiple HBAs.
@@ -428,6 +453,9 @@
 MODULE_PARM(tag_mode, "i");
 MODULE_PARM(ext_tran, "i");
 MODULE_PARM(rev_scan, "i");
+MODULE_PARM(isa_probe, "i");
+MODULE_PARM(eisa_probe, "i");
+MODULE_PARM(pci_probe, "i");
 MODULE_AUTHOR("Dario Ballabio");
 
 #endif
@@ -444,7 +472,6 @@
 #include <linux/blk.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <asm/dma.h>
 #include <asm/irq.h>
 #include "eata.h"
@@ -455,6 +482,10 @@
 #include <linux/ctype.h>
 #include <linux/spinlock.h>
 
+#if !defined(__BIG_ENDIAN_BITFIELD) && !defined(__LITTLE_ENDIAN_BITFIELD)
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+
 /* Subversion values */
 #define ISA  0
 #define ESA 1
@@ -512,7 +543,7 @@
 #define REG_LM          3
 #define REG_MID         4
 #define REG_MSB         5
-#define REGION_SIZE     9
+#define REGION_SIZE     9UL
 #define MAX_ISA_ADDR    0x03ff
 #define MIN_EISA_ADDR   0x1c88
 #define MAX_EISA_ADDR   0xfc88
@@ -536,7 +567,7 @@
 #define TLDEV(type) ((type) == TYPE_DISK || (type) == TYPE_ROM)
 
 /* "EATA", in Big Endian format */
-#define EATA_SIGNATURE 0x41544145
+#define EATA_SIG_BE 0x45415441
 
 /* Number of valid bytes in the board config structure for EATA 2.0x */
 #define EATA_2_0A_SIZE 28
@@ -547,6 +578,12 @@
 struct eata_info {
    u_int32_t data_len;  /* Number of valid bytes after this field */
    u_int32_t sign;      /* ASCII "EATA" signature */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar version:4, :4;
+   unchar  haaval:1, ata:1, drqvld:1, dmasup:1, morsup:1, trnxfr:1, tarsup:1,
+           ocsena:1;
+#else
    unchar        :4,    /* unused low nibble */
           version:4;    /* EATA version, should be 0x1 */
    unchar  ocsena:1,    /* Overlap Command Support Enabled */
@@ -557,6 +594,8 @@
            drqvld:1,    /* DRQ Index (DRQX) is valid */
               ata:1,    /* This is an ATA device */
            haaval:1;    /* Host Adapter Address Valid */
+#endif
+
    ushort cp_pad_len;   /* Number of pad bytes after cp_len */
    unchar host_addr[4]; /* Host Adapter SCSI ID for channels 3, 2, 1, 0 */
    u_int32_t cp_len;    /* Number of valid bytes in cp */
@@ -564,6 +603,15 @@
    ushort queue_size;   /* Max number of cp that can be queued */
    ushort unused;
    ushort scatt_size;   /* Max number of entries in scatter/gather table */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar    drqx:2, second:1, irq_tr:1, irq:4;
+   unchar  sync;
+   unchar         :4, res1:1, large_sg:1, forcaddr:1, isaena:1;
+   unchar max_chan:3, max_id:5;
+   unchar   max_lun;
+   unchar     eisa:1, pci:1, idquest:1, m1:1, :4;
+#else
    unchar     irq:4,    /* Interrupt Request assigned to this controller */
            irq_tr:1,    /* 0 for edge triggered, 1 for level triggered */
            second:1,    /* 1 if this is a secondary (not primary) controller */
@@ -586,6 +634,8 @@
           idquest:1,    /* RAIDNUM returned is questionable */
               pci:1,    /* This board is PCI */
              eisa:1;    /* This board is EISA */
+#endif
+
    unchar   raidnum;    /* Uniquely identifies this HBA in a system */
    unchar   notused;
 
@@ -595,18 +645,30 @@
 /* Board config structure */
 struct eata_config {
    ushort len;          /* Number of bytes following this field */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar     :4, tarena:1, mdpena:1, ocena:1, edis:1;
+#else
    unchar edis:1,       /* Disable EATA interface after config command */
          ocena:1,       /* Overlapped Commands Enabled */
         mdpena:1,       /* Transfer all Modified Data Pointer Messages */
         tarena:1,       /* Target Mode Enabled for this controller */
               :4;
+#endif
+
    unchar cpad[511];
    };
 
 /* Returned status packet structure */
 struct mssp {
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar            eoc:1, adapter_status:7;
+#else
    unchar adapter_status:7,    /* State related to current command */
                      eoc:1;    /* End Of Command (1 = command completed) */
+#endif
+
    unchar target_status;       /* SCSI status received after data transfer */
    unchar unused[2];
    u_int32_t inv_res_len;      /* Number of bytes not transferred */
@@ -621,6 +683,16 @@
 
 /* MailBox SCSI Command Packet */
 struct mscp {
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar     din:1, dout:1, interp:1, :1, sg:1, reqsen:1, init:1, sreset:1;
+   unchar sense_len;
+   unchar unused[3];
+   unchar        :7, fwnest:1;
+   unchar        :5, hbaci:1, iat:1, phsunit:1;
+   unchar channel:3, target:5;
+   unchar     one:1, dispri:1, luntar:1, lun:5;
+#else
    unchar  sreset:1,     /* SCSI Bus Reset Signal should be asserted */
              init:1,     /* Re-initialize controller and self test */
            reqsen:1,     /* Transfer Request Sense Data to addr using DMA */
@@ -643,6 +715,8 @@
            luntar:1,     /* This cp is for Target (not LUN) */
            dispri:1,     /* Disconnect Privilege granted */
               one:1;     /* 1 */
+#endif
+
    unchar mess[3];       /* Massage to/from Target */
    unchar cdb[12];       /* Command Descriptor Block */
    u_int32_t data_len;   /* If sg=0 Data Length, if sg=1 sglist length */
@@ -719,8 +793,13 @@
 #define BN(board) (HD(board)->board_name)
 
 /* Device is Big Endian */
-#define H2DEV(x) cpu_to_be32(x)
-#define DEV2H(x) be32_to_cpu(x)
+#define H2DEV(x)   cpu_to_be32(x)
+#define DEV2H(x)   be32_to_cpu(x)
+#define H2DEV16(x) cpu_to_be16(x)
+#define DEV2H16(x) be16_to_cpu(x)
+
+/* But transfer orientation from the 16 bit data register is Little Endian */
+#define REG2H(x)   le16_to_cpu(x)
 
 static void do_interrupt_handler(int, void *, struct pt_regs *);
 static void flush_dev(Scsi_Device *, unsigned long, unsigned int, unsigned int);
@@ -750,6 +829,24 @@
 static int max_queue_depth = MAX_CMD_PER_LUN;
 #endif
 
+#if defined(CONFIG_ISA)
+static int isa_probe = TRUE;
+#else
+static int isa_probe = FALSE;
+#endif
+
+#if defined(CONFIG_EISA)
+static int eisa_probe = TRUE;
+#else
+static int eisa_probe = FALSE;
+#endif
+
+#if defined(CONFIG_PCI)
+static int pci_probe = TRUE;
+#else
+static int pci_probe = FALSE;
+#endif
+ 
 static int eata2x_slave_attach(Scsi_Device *dev) {
    int j, tqd, utqd;
    char *link_suffix = "";
@@ -791,14 +888,18 @@
 }
 
 static inline int do_dma(unsigned long iobase, unsigned long addr, unchar cmd) {
+   unsigned char *byaddr;
+   unsigned long devaddr;
 
    if (wait_on_busy(iobase, (addr ? MAXLOOP * 100 : MAXLOOP))) return TRUE;
 
-   if ((addr = H2DEV(addr))) {
-      outb((char) (addr >> 24), iobase + REG_LOW);
-      outb((char) (addr >> 16), iobase + REG_LM);
-      outb((char) (addr >> 8),  iobase + REG_MID);
-      outb((char)  addr,        iobase + REG_MSB);
+   if (addr) {
+      devaddr = H2DEV(addr);
+      byaddr = (unsigned char *) &devaddr;
+      outb(byaddr[3], iobase + REG_LOW);
+      outb(byaddr[2], iobase + REG_LM);
+      outb(byaddr[1], iobase + REG_MID);
+      outb(byaddr[0], iobase + REG_MSB);
       }
 
    outb(cmd, iobase + REG_CMD);
@@ -817,7 +918,7 @@
          }
 
       loop = MAXLOOP;
-      *p = inw(iobase);
+      *p = REG2H(inw(iobase));
       }
 
    return FALSE;
@@ -848,6 +949,29 @@
    return NULL;
 }
 
+static void enable_pci_ports(void) {
+
+#if defined(CONFIG_PCI)
+
+   struct pci_dev *dev = NULL;
+
+   if (!pci_present()) return;
+
+   while((dev = pci_find_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) {
+
+#if defined(DEBUG_PCI_DETECT)
+      printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n",
+             driver_name, dev->bus->number, dev->devfn);
+#endif
+
+      if (pci_enable_device (dev))
+         printk("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n",
+                driver_name, dev->bus->number, dev->devfn);
+      }
+
+#endif /* end CONFIG_PCI */
+}
+
 static inline int port_detect \
       (unsigned long port_base, unsigned int j, Scsi_Host_Template *tpnt) {
    unsigned char irq, dma_channel, subversion, i, is_pci = FALSE;
@@ -871,31 +995,48 @@
       }
 
    if (do_dma(port_base, 0, READ_CONFIG_PIO)) {
+#if defined(DEBUG_DETECT)
+      printk("%s: detect, do_dma failed at 0x%03lx.\n", name, port_base);
+#endif
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
 
    /* Read the info structure */
    if (read_pio(port_base, (ushort *)&info, (ushort *)&info.ipad[0])) {
+#if defined(DEBUG_DETECT)
+      printk("%s: detect, read_pio failed at 0x%03lx.\n", name, port_base);
+#endif
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
 
+   info.data_len = DEV2H(info.data_len);
+   info.sign = DEV2H(info.sign);
+   info.cp_pad_len = DEV2H16(info.cp_pad_len);
+   info.cp_len = DEV2H(info.cp_len);
+   info.sp_len = DEV2H(info.sp_len);
+   info.scatt_size = DEV2H16(info.scatt_size);
+   info.queue_size = DEV2H16(info.queue_size);
+
    /* Check the controller "EATA" signature */
-   if (info.sign != EATA_SIGNATURE) {
+   if (info.sign != EATA_SIG_BE) {
+#if defined(DEBUG_DETECT)
+      printk("%s: signature 0x%04x discarded.\n", name, info.sign);
+#endif
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
 
-   if (DEV2H(info.data_len) < EATA_2_0A_SIZE) {
+   if (info.data_len < EATA_2_0A_SIZE) {
       printk("%s: config structure size (%d bytes) too short, detaching.\n",
-             name, DEV2H(info.data_len));
+             name, info.data_len);
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
-   else if (DEV2H(info.data_len) == EATA_2_0A_SIZE)
+   else if (info.data_len == EATA_2_0A_SIZE)
       protocol_rev = 'A';
-   else if (DEV2H(info.data_len) == EATA_2_0B_SIZE)
+   else if (info.data_len == EATA_2_0B_SIZE)
       protocol_rev = 'B';
    else
       protocol_rev = 'C';
@@ -1007,7 +1148,7 @@
 
    /* Set board configuration */
    memset((char *)cf, 0, sizeof(struct eata_config));
-   cf->len = (ushort) cpu_to_be16((ushort)510);
+   cf->len = (ushort) H2DEV16((ushort)510);
    cf->ocena = TRUE;
 
    if (do_dma(port_base, cf_dma_addr, SET_CONFIG_DMA)) {
@@ -1038,9 +1179,9 @@
    sh[j]->n_io_port = REGION_SIZE;
    sh[j]->dma_channel = dma_channel;
    sh[j]->irq = irq;
-   sh[j]->sg_tablesize = (ushort) be16_to_cpu(info.scatt_size);
+   sh[j]->sg_tablesize = (ushort) info.scatt_size;
    sh[j]->this_id = (ushort) info.host_addr[3];
-   sh[j]->can_queue = (ushort) be16_to_cpu(info.queue_size);
+   sh[j]->can_queue = (ushort) info.queue_size;
    sh[j]->cmd_per_lun = MAX_CMD_PER_LUN;
    memset(HD(j), 0, sizeof(struct hostdata));
    HD(j)->subversion = subversion;
@@ -1137,9 +1278,11 @@
 
    if (j == 0) {
       printk("EATA/DMA 2.0x: Copyright (C) 1994-2002 Dario Ballabio.\n");
-      printk("%s config options -> tc:%c, lc:%c, mq:%d, rs:%c, et:%c.\n",
-             driver_name, tag_type, YESNO(linked_comm), max_queue_depth,
-             YESNO(rev_scan), YESNO(ext_tran));
+      printk("%s config options -> tc:%c, lc:%c, mq:%d, rs:%c, et:%c, "\
+             "ip:%c, ep:%c, pp:%c.\n", driver_name, tag_type,
+             YESNO(linked_comm), max_queue_depth, YESNO(rev_scan),
+             YESNO(ext_tran), YESNO(isa_probe), YESNO(eisa_probe),
+             YESNO(pci_probe));
       }
 
    printk("%s: 2.0%c, %s 0x%03lx, IRQ %u, %s, SG %d, MB %d.\n",
@@ -1158,8 +1301,8 @@
    printk("%s: Vers. 0x%x, ocs %u, tar %u, trnxfr %u, more %u, SYNC 0x%x, "\
           "sec. %u, infol %d, cpl %d spl %d.\n", name, info.version,
           info.ocsena, info.tarsup, info.trnxfr, info.morsup, info.sync,
-          info.second, DEV2H(info.data_len), DEV2H(info.cp_len),
-          DEV2H(info.sp_len));
+          info.second, info.data_len, info.cp_len,
+          info.sp_len);
 
    if (protocol_rev == 'B' || protocol_rev == 'C')
       printk("%s: isaena %u, forcaddr %u, max_id %u, max_chan %u, "\
@@ -1209,6 +1352,9 @@
       else if (!strncmp(cur, "ls:", 3))  link_statistics = val;
       else if (!strncmp(cur, "et:", 3))  ext_tran = val;
       else if (!strncmp(cur, "rs:", 3))  rev_scan = val;
+      else if (!strncmp(cur, "ip:", 3))  isa_probe = val;
+      else if (!strncmp(cur, "ep:", 3))  eisa_probe = val;
+      else if (!strncmp(cur, "pp:", 3))  pci_probe = val;
 
       if ((cur = strchr(cur, ','))) ++cur;
       }
@@ -1293,7 +1439,19 @@
 
    for (k = 0; k < MAX_BOARDS + 1; k++) sh[k] = NULL;
 
-   if (!setup_done) add_pci_ports();
+   for (k = MAX_INT_PARAM; io_port[k]; k++)
+      if (io_port[k] == SKIP) continue;
+      else if (io_port[k] <= MAX_ISA_ADDR) {
+         if (!isa_probe) io_port[k] = SKIP;
+         }
+      else if (io_port[k] >= MIN_EISA_ADDR && io_port[k] <= MAX_EISA_ADDR) {
+         if (!eisa_probe) io_port[k] = SKIP;
+         }
+
+   if (pci_probe) {
+      if (!setup_done) add_pci_ports();
+      else          enable_pci_ports();
+      }
 
    for (k = 0; io_port[k]; k++) {
 
@@ -1772,10 +1930,11 @@
    return do_reset(SCarg);
 }
 
-int eata2x_biosparam(Disk *disk, struct block_device *bdev, int *dkinfo) {
-   int size = disk->capacity;
+int eata2x_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *dkinfo) {
+   int size = capacity;
 
-   if (ext_tran || (scsicam_bios_param(disk, bdev, dkinfo) < 0)) {
+   if (ext_tran || (scsicam_bios_param(bdev, capacity, dkinfo) < 0)) {
       dkinfo[0] = 255;
       dkinfo[1] = 63;
       dkinfo[2] = size / (dkinfo[0] * dkinfo[1]);
@@ -1984,6 +2143,19 @@
 
    /* Read the status register to clear the interrupt indication */
    reg = inb(sh[j]->io_port + REG_STATUS);
+
+#if defined (DEBUG_INTERRUPT)
+   {
+   unsigned char *bytesp;
+   int cnt;
+   bytesp= (unsigned char *) spp;
+   if (HD(j)->iocount < 200) {
+      printk("sp[] =");
+      for (cnt=0; cnt < 15; cnt++) printk(" 0x%x", bytesp[cnt]);
+      printk("\n");
+      }
+   }
+#endif
 
    /* Reject any sp with supspect data */
    if (spp->eoc == FALSE && HD(j)->iocount > 1)
diff -Nru a/drivers/scsi/eata.h b/drivers/scsi/eata.h
--- a/drivers/scsi/eata.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/scsi/eata.h	Wed Oct 30 16:44:24 2002
@@ -11,21 +11,18 @@
 int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 int eata2x_abort(Scsi_Cmnd *);
 int eata2x_reset(Scsi_Cmnd *);
-int eata2x_biosparam(Disk *, struct block_device *, int *);
+int eata2x_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 static int eata2x_slave_attach(Scsi_Device *);
 
-#define EATA_VERSION "7.22.00"
+#define EATA_VERSION "7.70.00"
 
 #define EATA {                                                               \
                 name:              "EATA/DMA 2.0x rev. " EATA_VERSION " ",   \
                 detect:                  eata2x_detect,                      \
                 release:                 eata2x_release,                     \
                 queuecommand:            eata2x_queuecommand,                \
-                abort:                   NULL,                               \
-                reset:                   NULL,                               \
                 eh_abort_handler:        eata2x_abort,                       \
-                eh_device_reset_handler: NULL,                               \
-                eh_bus_reset_handler:    NULL,                               \
                 eh_host_reset_handler:   eata2x_reset,                       \
                 bios_param:              eata2x_biosparam,                   \
 		slave_attach:		 eata2x_slave_attach,		     \
diff -Nru a/drivers/scsi/eata_dma.c b/drivers/scsi/eata_dma.c
--- a/drivers/scsi/eata_dma.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/eata_dma.c	Wed Oct 30 16:44:19 2002
@@ -86,7 +86,6 @@
 #endif
 #include <linux/blk.h>
 #include "scsi.h"
-#include "sd.h"
 #include "hosts.h"
 #include "eata_dma.h"
 #include "eata_dma_proc.h" 
diff -Nru a/drivers/scsi/eata_dma.h b/drivers/scsi/eata_dma.h
--- a/drivers/scsi/eata_dma.h	Wed Oct 30 16:44:34 2002
+++ b/drivers/scsi/eata_dma.h	Wed Oct 30 16:44:34 2002
@@ -88,7 +88,6 @@
 	queuecommand:      eata_queue,                  \
 	abort:             eata_abort,                  \
 	reset:             eata_reset,                  \
-	bios_param:        scsicam_bios_param,          \
 	unchecked_isa_dma: 1,      /* True if ISA  */   \
 	use_clustering:    ENABLE_CLUSTERING }
 
diff -Nru a/drivers/scsi/eata_generic.h b/drivers/scsi/eata_generic.h
--- a/drivers/scsi/eata_generic.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/eata_generic.h	Wed Oct 30 16:44:29 2002
@@ -94,12 +94,6 @@
 #define CD(cmd)	 ((struct eata_ccb *)(cmd->host_scribble))
 #define SD(host) ((hostdata *)&(host->hostdata))
 
-#define DELAY(x) { ulong flags, i;                \
-                   save_flags(flags); sti();      \
-                   i = jiffies + (x * HZ);        \
-                   while (jiffies < i);           \
-                   restore_flags(flags); }
-
 /***********************************************
  *    EATA Command & Register definitions      *
  ***********************************************/
diff -Nru a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c
--- a/drivers/scsi/eata_pio.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/eata_pio.c	Wed Oct 30 16:44:29 2002
@@ -51,7 +51,6 @@
 #include "eata_pio.h"
 #include "eata_dma_proc.h"
 #include "scsi.h"
-#include "sd.h"
 
 #include <linux/stat.h>
 #include <linux/config.h>	/* for CONFIG_PCI */
@@ -99,7 +98,7 @@
 	else
 	{
 	    SCp->buffer++;
-	    SCp->ptr=SCp->buffer->address;
+	    SCp->ptr=page_address(SCp->buffer->page) + SCp->buffer->offset;
 	    SCp->this_residual=SCp->buffer->length;
 	}
     }
@@ -124,15 +123,11 @@
     hostdata *hd;
     struct eata_ccb *cp;
     uint base;
-    ulong flags;
     uint x,z;
     struct Scsi_Host *sh;
     ushort zwickel=0;
     unchar stat,odd;
     
-    save_flags(flags);
-    cli();
-    
     for (x = 1, sh = first_HBA; x <= registered_HBAs; x++, sh = SD(sh)->prev) {
 	if (sh->irq != irq)
 	    continue;
@@ -234,10 +229,8 @@
 	if (cp->status == LOCKED) {
 	    cp->status = FREE;
 	    eata_stat = inb(base + HA_RSTATUS);
-	    printk(KERN_NOTICE "eata_pio: int_handler, freeing locked "
+	    printk(KERN_CRIT "eata_pio: int_handler, freeing locked "
                    "queueslot\n");
-	    DBG(DBG_INTR&&DBG_DELAY,DELAY(1));
-	    restore_flags(flags);
 	    return;
 	}
 	
@@ -245,17 +238,12 @@
 	if (stat != 0x50) 
 	    printk(KERN_DEBUG "stat: %#.2x, result: %#.8x\n", stat, 
                    cmd->result); 
-	DBG(DBG_INTR&&DBG_DELAY,DELAY(1));
 #endif
 	
 	cp->status = FREE;   /* now we can release the slot  */
 	
-	restore_flags(flags);
 	cmd->scsi_done(cmd);
-	save_flags(flags);
-	cli();
     }
-    restore_flags(flags);
     
     return;
 }
@@ -281,16 +269,12 @@
 int eata_pio_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
 {
     uint x, y;
-    long flags;
     uint base;
     
     hostdata *hd;
     struct Scsi_Host *sh;
     struct eata_ccb *cp;
     
-    save_flags(flags);
-    cli();
-    
     queue_counter++;
     
     hd = HD(cmd);
@@ -322,10 +306,10 @@
 
     DBG(DBG_QUEUE, printk(KERN_DEBUG "eata_pio_queue pid %ld, target: %x, lun:"
                           " %x, y %d\n", cmd->pid, cmd->target, cmd->lun, y));
-    DBG(DBG_QUEUE && DBG_DELAY, DELAY(1));
     
     cmd->scsi_done = (void *)done;
     
+    /* FIXME: use passed direction flag !! */
     switch (cmd->cmnd[0]) {
     case CHANGE_DEFINITION: case COMPARE:         case COPY:
     case COPY_VERIFY:       case LOG_SELECT:      case MODE_SELECT:
@@ -372,7 +356,7 @@
     } else {
 	cmd->SCp.buffer = cmd->request_buffer;
 	cmd->SCp.buffers_residual = cmd->use_sg;
-	cmd->SCp.ptr = cmd->SCp.buffer->address;
+	cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset;
 	cmd->SCp.this_residual = cmd->SCp.buffer->length;
     }
     cmd->SCp.Status = (cmd->SCp.this_residual != 0);  /* TRUE as long as bytes 
@@ -385,10 +369,10 @@
                "returning DID_BUS_BUSY, done.\n", cmd->target, cmd->pid);
         done(cmd);
         cp->status = FREE;      
-        restore_flags(flags);
 	return (0);
     }
-    while (!(inb(base + HA_RSTATUS) & HA_SDRQ));
+    while (!(inb(base + HA_RSTATUS) & HA_SDRQ))
+    	cpu_relax();
     outsw(base + HA_RDATA, cp, hd->cplen);
     outb(EATA_CMD_PIO_TRUNC, base + HA_WCOMMAND);
     for (x = 0; x < hd->cppadlen; x++) outw(0, base + HA_RDATA);
@@ -396,9 +380,7 @@
     DBG(DBG_QUEUE,printk(KERN_DEBUG "Queued base %#.4lx pid: %ld target: %x "
                          "lun: %x slot %d irq %d\n", (long)sh->base, cmd->pid, 
 			 cmd->target, cmd->lun, y, sh->irq));
-    DBG(DBG_QUEUE && DBG_DELAY, DELAY(1));
     
-    restore_flags(flags);
     return (0);
 }
 
@@ -407,66 +389,58 @@
     ulong flags;
     uint loop = HZ;
     
-    save_flags(flags);
-    cli();
-    
+    spin_lock_irqsave(cmd->host->host_lock, flags);    
     DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_abort called pid: %ld "
                            "target: %x lun: %x reason %x\n", cmd->pid, 
                            cmd->target, cmd->lun, cmd->abort_reason));
-    DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
     
     
     while (inb((uint)(cmd->host->base) + HA_RAUXSTAT) & HA_ABUSY)
 	if (--loop == 0) {
 	    printk(KERN_WARNING "eata_pio: abort, timeout error.\n");
-	    restore_flags(flags);
-	    DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
+	    spin_unlock_irqrestore(cmd->host->host_lock, flags);    
 	    return (SCSI_ABORT_ERROR);
 	}
     if (CD(cmd)->status == FREE) {
 	DBG(DBG_ABNORM, printk(KERN_WARNING "Returning: SCSI_ABORT_NOT_RUNNING\n")); 
-	restore_flags(flags);
+        spin_unlock_irqrestore(cmd->host->host_lock, flags);    
 	return (SCSI_ABORT_NOT_RUNNING);
     }
     if (CD(cmd)->status == USED) {
 	DBG(DBG_ABNORM, printk(KERN_WARNING "Returning: SCSI_ABORT_BUSY\n"));
-	restore_flags(flags);
+        spin_unlock_irqrestore(cmd->host->host_lock, flags);    
 	return (SCSI_ABORT_BUSY);  /* SNOOZE */ 
     }
     if (CD(cmd)->status == RESET) {
-	restore_flags(flags);
+        spin_unlock_irqrestore(cmd->host->host_lock, flags);    
 	printk(KERN_WARNING "eata_pio: abort, command reset error.\n");
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
 	return (SCSI_ABORT_ERROR);
     }
     if (CD(cmd)->status == LOCKED) {
-	restore_flags(flags);
+        spin_unlock_irqrestore(cmd->host->host_lock, flags);    
 	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio: abort, queue slot "
                                "locked.\n"));
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
 	return (SCSI_ABORT_NOT_RUNNING);
     }
-    restore_flags(flags);
+    spin_unlock_irqrestore(cmd->host->host_lock, flags);    
     panic("eata_pio: abort: invalid slot status\n");
 }
 
 int eata_pio_reset(Scsi_Cmnd * cmd, unsigned int dummy)
 {
-    uint x, time, limit = 0;
+    uint x, limit = 0;
     ulong flags;
     unchar success = FALSE;
     Scsi_Cmnd *sp; 
     
-    save_flags(flags);
-    cli();
     DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:"
                            " %x lun: %x reason %x\n", cmd->pid, cmd->target, 
                            cmd->lun, cmd->abort_reason));
 
+    spin_lock_irqsave(cmd->host->host_lock, flags);    
     if (HD(cmd)->state == RESET) {
 	printk(KERN_WARNING "eata_pio_reset: exit, already in reset.\n");
-	restore_flags(flags);
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
+        spin_unlock_irqrestore(cmd->host->host_lock, flags);    
 	return (SCSI_RESET_ERROR);
     }
     
@@ -481,11 +455,9 @@
 	HD(cmd)->ccb[x].status = RESET;
 	printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x,
                sp->pid);
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
 	
 	if (sp == NULL)
 	    panic("eata_pio_reset: slot %d, sp==NULL.\n", x);
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
     }
     
     /* hard reset the HBA  */
@@ -494,12 +466,11 @@
     DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: board reset done.\n"));
     HD(cmd)->state = RESET;
     
-    time = jiffies;
-    while (time_before(jiffies, time + 3 * HZ) && limit++ < 10000000);
+    set_current_state(TASK_UNINTERRUPTIBLE);
+    schedule_timeout(3*HZ);    	
     
     DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: interrupts disabled, "
                            "loops %d.\n", limit));
-    DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
     
     for (x = 0; x < cmd->host->can_queue; x++) {
 	
@@ -514,21 +485,17 @@
 	printk(KERN_WARNING "eata_pio_reset: reset ccb %d.\n",x);
 	HD(cmd)->ccb[x].status = FREE;
 	
-	restore_flags(flags);
 	sp->scsi_done(sp);
-	cli();
     }
     
     HD(cmd)->state = FALSE;
-    restore_flags(flags);
+    spin_unlock_irqrestore(cmd->host->host_lock, flags);    
     
     if (success) { /* hmmm... */
 	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: exit, success.\n"));
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
 	return (SCSI_RESET_SUCCESS);
     } else {
 	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: exit, wakeup.\n"));
-	DBG(DBG_ABNORM && DBG_DELAY, DELAY(1));
 	return (SCSI_RESET_PUNT);
     }
 }
@@ -643,7 +610,6 @@
     printk("IRQ:%d IRQT:%d FORCADR:%d MCH:%d RIDQ:%d\n",
 	   gc->IRQ, gc->IRQ_TR, gc->FORCADR, 
 	   gc->MAX_CHAN, gc->ID_qest);
-    DBG(DPT_DEBUG, DELAY(14));
 }
 
 static uint print_selftest(uint base)
@@ -949,9 +915,6 @@
     struct get_conf gc;
     int i;
     
-    DBG((DBG_PROBE && DBG_DELAY) || DPT_DEBUG,
-	printk("Using lots of delays to let you read the debugging output\n"));
-    
     tpnt->proc_name = "eata_pio";
 
     find_pio_PCI(&gc, tpnt);
@@ -989,8 +952,6 @@
 	    HBA_ptr = SD(HBA_ptr)->next;
 	}
     }
-    DBG(DPT_DEBUG,DELAY(12));
-    
     return (registered_HBAs);
 }
 
diff -Nru a/drivers/scsi/eata_pio.h b/drivers/scsi/eata_pio.h
--- a/drivers/scsi/eata_pio.h	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/eata_pio.h	Wed Oct 30 16:44:35 2002
@@ -82,7 +82,6 @@
     queuecommand:      eata_pio_queue,				\
     abort:             eata_pio_abort,				\
     reset:             eata_pio_reset,				\
-    bios_param:        scsicam_bios_param,			\
     unchecked_isa_dma: 1,	    /* True if ISA  */		\
     use_clustering:    ENABLE_CLUSTERING }
 
diff -Nru a/drivers/scsi/esp.c b/drivers/scsi/esp.c
--- a/drivers/scsi/esp.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/scsi/esp.c	Wed Oct 30 16:44:34 2002
@@ -1041,6 +1041,8 @@
 	esp->resetting_bus = 0;
 	esp->snip = 0;
 
+	init_waitqueue_head(&esp->reset_queue);
+
 	/* Debugging... */
 	for(i = 0; i < 32; i++)
 		esp->espcmdlog[i] = 0;
@@ -1953,7 +1955,7 @@
 		esp->msgout_ctr = 0;
 		esp_cmd(esp, ESP_CMD_SATN);
 		spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-		return SCSI_ABORT_PENDING;
+		return SUCCESS;
 	}
 
 	/* If it is still in the issue queue then we can safely
@@ -1982,7 +1984,7 @@
 					ESP_INTSON(esp->dregs);
 
 				spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-				return SCSI_ABORT_SUCCESS;
+				return SUCCESS;
 			}
 		}
 	}
@@ -1996,20 +1998,20 @@
 		if (don)
 			ESP_INTSON(esp->dregs);
 		spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-		return SCSI_ABORT_BUSY;
+		return FAILED;
 	}
 
 	/* It's disconnected, we have to reconnect to re-establish
 	 * the nexus and tell the device to abort.  However, we really
-	 * cannot 'reconnect' per se, therefore we tell the upper layer
-	 * the safest thing we can.  This is, wait a bit, if nothing
-	 * happens, we are really hung so reset the bus.
+	 * cannot 'reconnect' per se.  Don't try to be fancy, just
+	 * indicate failure, which causes our caller to reset the whole
+	 * bus.
 	 */
 
 	if (don)
 		ESP_INTSON(esp->dregs);
 	spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-	return SCSI_ABORT_SNOOZE;
+	return FAILED;
 }
 
 /* We've sent ESP_CMD_RS to the ESP, the interrupt had just
@@ -2045,6 +2047,7 @@
 
 	/* SCSI bus reset is complete. */
 	esp->resetting_bus = 0;
+	wake_up(&esp->reset_queue);
 
 	/* Ok, now it is safe to get commands going once more. */
 	if (esp->issue_SC)
@@ -2065,7 +2068,7 @@
 /* Reset ESP chip, reset hanging bus, then kill active and
  * disconnected commands for targets without soft reset.
  */
-int esp_reset(Scsi_Cmnd *SCptr, unsigned int how)
+int esp_reset(Scsi_Cmnd *SCptr)
 {
 	struct esp *esp = (struct esp *) SCptr->host->hostdata;
 	unsigned long flags;
@@ -2074,7 +2077,9 @@
 	(void) esp_do_resetbus(esp);
 	spin_unlock_irqrestore(esp->ehost->host_lock, flags);
 
-	return SCSI_RESET_PENDING;
+	wait_event(esp->reset_queue, (esp->resetting_bus == 0));
+
+	return SUCCESS;
 }
 
 /* Internal ESP done function. */
diff -Nru a/drivers/scsi/esp.h b/drivers/scsi/esp.h
--- a/drivers/scsi/esp.h	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/esp.h	Wed Oct 30 16:44:19 2002
@@ -196,6 +196,7 @@
 	 * cannot be assosciated with any specific command.
 	 */
 	u8			resetting_bus;
+	wait_queue_head_t	reset_queue;
 };
 
 /* Bitfield meanings for the above registers. */
@@ -407,50 +408,36 @@
 extern int esp_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 extern int esp_command(Scsi_Cmnd *);
 extern int esp_abort(Scsi_Cmnd *);
-extern int esp_reset(Scsi_Cmnd *, unsigned int);
+extern int esp_reset(Scsi_Cmnd *);
 extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
 			 int hostno, int inout);
 extern void esp_slave_detach(Scsi_Device* SDptr);
 
 #ifdef CONFIG_SPARC64
-#define SCSI_SPARC_ESP {                                        \
-		proc_name:      "esp",				\
-		proc_info:      &esp_proc_info,			\
-		name:           "Sun ESP 100/100a/200",		\
-		detect:         esp_detect,			\
-		slave_detach:	esp_slave_detach,		\
-		info:           esp_info,			\
-		command:        esp_command,			\
-		queuecommand:   esp_queue,			\
-		abort:          esp_abort,			\
-		reset:          esp_reset,			\
-		can_queue:      7,				\
-		this_id:        7,				\
-		sg_tablesize:   SG_ALL,				\
-		cmd_per_lun:    1,				\
-		use_clustering: ENABLE_CLUSTERING,		\
-		highmem_io:	1,				\
-}
+#define ESP_HIGHMEM_IO	1
 #else
 /* Sparc32's iommu code cannot handle highmem pages yet. */
-#define SCSI_SPARC_ESP {                                        \
-		proc_name:      "esp",				\
-		proc_info:      &esp_proc_info,			\
-		name:           "Sun ESP 100/100a/200",		\
-		detect:         esp_detect,			\
-		slave_detach:	esp_slave_detach,		\
-		info:           esp_info,			\
-		command:        esp_command,			\
-		queuecommand:   esp_queue,			\
-		abort:          esp_abort,			\
-		reset:          esp_reset,			\
-		can_queue:      7,				\
-		this_id:        7,				\
-		sg_tablesize:   SG_ALL,				\
-		cmd_per_lun:    1,				\
-		use_clustering: ENABLE_CLUSTERING,		\
-}
+#define ESP_HIGHMEM_IO	0
 #endif
+
+#define SCSI_SPARC_ESP {					\
+		.proc_name	=	"esp",			\
+		.proc_info	=	&esp_proc_info,		\
+		.name		=	"Sun ESP 100/100a/200",	\
+		.detect		=	esp_detect,		\
+		.slave_detach	=	esp_slave_detach,	\
+		.info		=	esp_info,		\
+		.command	=	esp_command,		\
+		.queuecommand	=	esp_queue,		\
+		.eh_abort_handler =	esp_abort,		\
+		.eh_bus_reset_handler =	esp_reset,		\
+		.can_queue	=	7,			\
+		.this_id	=	7,			\
+		.sg_tablesize	=	SG_ALL,			\
+		.cmd_per_lun	=	1,			\
+		.use_clustering	=	ENABLE_CLUSTERING,	\
+		.highmem_io	=	ESP_HIGHMEM_IO,		\
+}
 
 /* For our interrupt engine. */
 #define for_each_esp(esp) \
diff -Nru a/drivers/scsi/fcal.h b/drivers/scsi/fcal.h
--- a/drivers/scsi/fcal.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/fcal.h	Wed Oct 30 16:44:17 2002
@@ -37,7 +37,6 @@
 	sg_tablesize:		1,				\
 	cmd_per_lun:		1,				\
 	use_clustering:		ENABLE_CLUSTERING,		\
-	abort:			fcp_old_abort,			\
 	eh_abort_handler:	fcp_scsi_abort,			\
 	eh_device_reset_handler:fcp_scsi_dev_reset,		\
 	eh_bus_reset_handler:	fcp_scsi_bus_reset,		\
diff -Nru a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c
--- a/drivers/scsi/fd_mcs.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/fd_mcs.c	Wed Oct 30 16:44:27 2002
@@ -96,7 +96,7 @@
 #include "fd_mcs.h"
 
 #define DRIVER_VERSION "v0.2 by ZP Gu<zpg@castle.net>"
-  
+
 /* START OF USER DEFINABLE OPTIONS */
 
 #define DEBUG            0	/* Enable debugging output */
@@ -112,7 +112,7 @@
 #define DEBUG_MESSAGES   1	/* Debug MESSAGE IN phase */
 #define DEBUG_ABORT      1	/* Debug abort() routine */
 #define DEBUG_RESET      1	/* Debug reset() routine */
-#define DEBUG_RACE       1      /* Debug interrupt-driven race condition */
+#define DEBUG_RACE       1	/* Debug interrupt-driven race condition */
 #else
 #define EVERY_ACCESS     0	/* LEAVE THESE ALONE--CHANGE THE ONES ABOVE */
 #define ERRORS_ONLY      0
@@ -136,86 +136,86 @@
 #endif
 
 enum chip_type {
-  unknown          = 0x00,
-  tmc1800          = 0x01,
-  tmc18c50         = 0x02,
-  tmc18c30         = 0x03,
+	unknown = 0x00,
+	tmc1800 = 0x01,
+	tmc18c50 = 0x02,
+	tmc18c30 = 0x03,
 };
 
 enum {
-  in_arbitration   = 0x02,
-  in_selection     = 0x04,
-  in_other         = 0x08,
-  disconnect       = 0x10,
-  aborted          = 0x20,
-  sent_ident       = 0x40,
+	in_arbitration = 0x02,
+	in_selection = 0x04,
+	in_other = 0x08,
+	disconnect = 0x10,
+	aborted = 0x20,
+	sent_ident = 0x40,
 };
 
 enum in_port_type {
-  Read_SCSI_Data   =  0,
-  SCSI_Status      =  1,
-  TMC_Status       =  2,
-  FIFO_Status      =  3,	/* tmc18c50/tmc18c30 only */
-  Interrupt_Cond   =  4,	/* tmc18c50/tmc18c30 only */
-  LSB_ID_Code      =  5,
-  MSB_ID_Code      =  6,
-  Read_Loopback    =  7,
-  SCSI_Data_NoACK  =  8,
-  Interrupt_Status =  9,
-  Configuration1   = 10,
-  Configuration2   = 11,	/* tmc18c50/tmc18c30 only */
-  Read_FIFO        = 12,
-  FIFO_Data_Count  = 14
+	Read_SCSI_Data = 0,
+	SCSI_Status = 1,
+	TMC_Status = 2,
+	FIFO_Status = 3,	/* tmc18c50/tmc18c30 only */
+	Interrupt_Cond = 4,	/* tmc18c50/tmc18c30 only */
+	LSB_ID_Code = 5,
+	MSB_ID_Code = 6,
+	Read_Loopback = 7,
+	SCSI_Data_NoACK = 8,
+	Interrupt_Status = 9,
+	Configuration1 = 10,
+	Configuration2 = 11,	/* tmc18c50/tmc18c30 only */
+	Read_FIFO = 12,
+	FIFO_Data_Count = 14
 };
 
 enum out_port_type {
-  Write_SCSI_Data  =  0,
-  SCSI_Cntl        =  1,
-  Interrupt_Cntl   =  2,
-  SCSI_Mode_Cntl   =  3,
-  TMC_Cntl         =  4,
-  Memory_Cntl      =  5,	/* tmc18c50/tmc18c30 only */
-  Write_Loopback   =  7,
-  IO_Control       = 11,	/* tmc18c30 only */
-  Write_FIFO       = 12
+	Write_SCSI_Data = 0,
+	SCSI_Cntl = 1,
+	Interrupt_Cntl = 2,
+	SCSI_Mode_Cntl = 3,
+	TMC_Cntl = 4,
+	Memory_Cntl = 5,	/* tmc18c50/tmc18c30 only */
+	Write_Loopback = 7,
+	IO_Control = 11,	/* tmc18c30 only */
+	Write_FIFO = 12
 };
 
 struct fd_hostdata {
-  unsigned long     _bios_base;
-  int               _bios_major;
-  int               _bios_minor;
-  volatile int      _in_command;
-  Scsi_Cmnd         *_current_SC;
-  enum chip_type    _chip;
-  int               _adapter_mask;
-  int               _fifo_count; /* Number of 512 byte blocks before INTR */
+	unsigned long _bios_base;
+	int _bios_major;
+	int _bios_minor;
+	volatile int _in_command;
+	Scsi_Cmnd *_current_SC;
+	enum chip_type _chip;
+	int _adapter_mask;
+	int _fifo_count;	/* Number of 512 byte blocks before INTR */
 
-  char              _adapter_name[64];
+	char _adapter_name[64];
 #if DEBUG_RACE
-  volatile int      _in_interrupt_flag;
+	volatile int _in_interrupt_flag;
 #endif
 
-  int               _SCSI_Mode_Cntl_port;
-  int               _FIFO_Data_Count_port;
-  int               _Interrupt_Cntl_port;
-  int               _Interrupt_Status_port;
-  int               _Interrupt_Cond_port;
-  int               _Read_FIFO_port;
-  int               _Read_SCSI_Data_port;
-  int               _SCSI_Cntl_port;
-  int               _SCSI_Data_NoACK_port;
-  int               _SCSI_Status_port;
-  int               _TMC_Cntl_port;
-  int               _TMC_Status_port;
-  int               _Write_FIFO_port;
-  int               _Write_SCSI_Data_port;
+	int _SCSI_Mode_Cntl_port;
+	int _FIFO_Data_Count_port;
+	int _Interrupt_Cntl_port;
+	int _Interrupt_Status_port;
+	int _Interrupt_Cond_port;
+	int _Read_FIFO_port;
+	int _Read_SCSI_Data_port;
+	int _SCSI_Cntl_port;
+	int _SCSI_Data_NoACK_port;
+	int _SCSI_Status_port;
+	int _TMC_Cntl_port;
+	int _TMC_Status_port;
+	int _Write_FIFO_port;
+	int _Write_SCSI_Data_port;
 
-  int               _FIFO_Size; /* = 0x2000;  8k FIFO for
+	int _FIFO_Size;		/* = 0x2000;  8k FIFO for
 				   pre-tmc18c30 chips */
-  /* simple stats */
-  int               _Bytes_Read;
-  int               _Bytes_Written;
-  int               _INTR_Processed;
+	/* simple stats */
+	int _Bytes_Read;
+	int _Bytes_Written;
+	int _INTR_Processed;
 };
 
 #define FD_MAX_HOSTS 3		/* enough? */
@@ -232,7 +232,7 @@
 #define adapter_name          (HOSTDATA(shpnt)->_adapter_name)
 #if DEBUG_RACE
 #define in_interrupt_flag     (HOSTDATA(shpnt)->_in_interrupt_flag)
-#endif	                     
+#endif
 #define SCSI_Mode_Cntl_port   (HOSTDATA(shpnt)->_SCSI_Mode_Cntl_port)
 #define FIFO_Data_Count_port  (HOSTDATA(shpnt)->_FIFO_Data_Count_port)
 #define Interrupt_Cntl_port   (HOSTDATA(shpnt)->_Interrupt_Cntl_port)
@@ -253,337 +253,324 @@
 #define INTR_Processed        (HOSTDATA(shpnt)->_INTR_Processed)
 
 struct fd_mcs_adapters_struct {
-  char* name;
-  int id;
-  enum chip_type fd_chip;
-  int fifo_size;
-  int fifo_count;
+	char *name;
+	int id;
+	enum chip_type fd_chip;
+	int fifo_size;
+	int fifo_count;
 };
 
 #define REPLY_ID 0x5137
 
 static struct fd_mcs_adapters_struct fd_mcs_adapters[] = {
-  { "Future Domain SCSI Adapter MCS-700(18C50)",
-    0x60e9,
-    tmc18c50,
-    0x2000,
-    4 },
-  { "Future Domain SCSI Adapter MCS-600/700(TMC-1800)",
-    0x6127,
-    tmc1800,
-    0x2000,
-    4 },
-  { "Reply Sound Blaster/SCSI Adapter",
-    REPLY_ID,
-    tmc18c30,
-    0x800,
-    2 },
+	{"Future Domain SCSI Adapter MCS-700(18C50)",
+	 0x60e9,
+	 tmc18c50,
+	 0x2000,
+	 4},
+	{"Future Domain SCSI Adapter MCS-600/700(TMC-1800)",
+	 0x6127,
+	 tmc1800,
+	 0x2000,
+	 4},
+	{"Reply Sound Blaster/SCSI Adapter",
+	 REPLY_ID,
+	 tmc18c30,
+	 0x800,
+	 2},
 };
 
 #define FD_BRDS sizeof(fd_mcs_adapters)/sizeof(struct fd_mcs_adapters_struct)
 
-static void fd_mcs_intr( int irq, void *dev_id, struct pt_regs * regs );
+static void fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs);
 
-static unsigned long addresses[] = {0xc8000, 0xca000, 0xce000, 0xde000};
+static unsigned long addresses[] = { 0xc8000, 0xca000, 0xce000, 0xde000 };
 static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 };
 static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 };
 
 /* host information */
 static int found = 0;
-static struct Scsi_Host *hosts[FD_MAX_HOSTS+1] = { NULL };
+static struct Scsi_Host *hosts[FD_MAX_HOSTS + 1] = { NULL };
 
 static int user_fifo_count = 0;
 static int user_fifo_size = 0;
 
-void fd_mcs_setup( char *str, int *ints )
+static void fd_mcs_setup(char *str, int *ints)
 {
-  static int done_setup = 0;
+	static int done_setup = 0;
 
-  if (done_setup++ || ints[0] < 1 || ints[0] > 2 ||
-      ints[1] < 1 || ints[1] > 16) {
-    printk( "fd_mcs: usage: fd_mcs=FIFO_COUNT, FIFO_SIZE\n" );
-  }
+	if (done_setup++ || ints[0] < 1 || ints[0] > 2 || ints[1] < 1 || ints[1] > 16) {
+		printk("fd_mcs: usage: fd_mcs=FIFO_COUNT, FIFO_SIZE\n");
+	}
 
-  user_fifo_count = ints[0] >= 1 ? ints[1] : 0;
-  user_fifo_size  = ints[0] >= 2 ? ints[2] : 0;
+	user_fifo_count = ints[0] >= 1 ? ints[1] : 0;
+	user_fifo_size = ints[0] >= 2 ? ints[2] : 0;
 }
 
-static void print_banner( struct Scsi_Host *shpnt )
+__setup("fd_mcs=", fd_mcs_setup);
+
+static void print_banner(struct Scsi_Host *shpnt)
 {
-  printk( "scsi%d <fd_mcs>: ", shpnt->host_no);
+	printk("scsi%d <fd_mcs>: ", shpnt->host_no);
 
-  if (bios_base) {
-    printk( "BIOS at 0x%lX", bios_base);
-  } else {
-    printk( "No BIOS");
-  }
-
-  printk( ", HostID %d, %s Chip, IRQ %d, IO 0x%lX\n",
-          shpnt->this_id,
-          chip == tmc18c50 ? "TMC-18C50"
-             : (chip == tmc18c30 ? "TMC-18C30" :
-                (chip == tmc1800 ? "TMC-1800" : "Unknown")),
-          shpnt->irq,
-          shpnt->io_port );
+	if (bios_base) {
+		printk("BIOS at 0x%lX", bios_base);
+	} else {
+		printk("No BIOS");
+	}
+
+	printk(", HostID %d, %s Chip, IRQ %d, IO 0x%lX\n", shpnt->this_id, chip == tmc18c50 ? "TMC-18C50" : (chip == tmc18c30 ? "TMC-18C30" : (chip == tmc1800 ? "TMC-1800" : "Unknown")), shpnt->irq, shpnt->io_port);
 }
 
 
-static void do_pause( unsigned amount )	/* Pause for amount*10 milliseconds */
-{
-  do {
-    udelay(10*1000);
-  } while (--amount);
+static void do_pause(unsigned amount)
+{				/* Pause for amount*10 milliseconds */
+	do {
+		mdelay(10);
+	} while (--amount);
 }
 
-inline static void fd_mcs_make_bus_idle( struct Scsi_Host *shpnt )
+static void fd_mcs_make_bus_idle(struct Scsi_Host *shpnt)
 {
-  outb( 0, SCSI_Cntl_port );
-  outb( 0, SCSI_Mode_Cntl_port );
-  if (chip == tmc18c50 || chip == tmc18c30)
-    outb( 0x21 | PARITY_MASK, TMC_Cntl_port ); /* Clear forced intr. */
-  else
-    outb( 0x01 | PARITY_MASK, TMC_Cntl_port );
+	outb(0, SCSI_Cntl_port);
+	outb(0, SCSI_Mode_Cntl_port);
+	if (chip == tmc18c50 || chip == tmc18c30)
+		outb(0x21 | PARITY_MASK, TMC_Cntl_port);	/* Clear forced intr. */
+	else
+		outb(0x01 | PARITY_MASK, TMC_Cntl_port);
 }
 
-int fd_mcs_detect( Scsi_Host_Template *tpnt )
+static int fd_mcs_detect(Scsi_Host_Template * tpnt)
 {
-  int loop;
-  struct Scsi_Host *shpnt;
-
-  /* get id, port, bios, irq */
-  int slot;
-  u_char pos2, pos3, pos4;
-  int id, port, irq;
-  unsigned long bios;
-
-  /* if not MCA machine, return */
-  if (!MCA_bus)
-    return 0;
-
-  /* changeable? */
-  id = 7;
-
-  for( loop = 0; loop < FD_BRDS; loop++ ) {
-    slot = 0;
-    while ( MCA_NOTFOUND !=
-	    (slot = mca_find_adapter(fd_mcs_adapters[loop].id,
-				     slot)) ) {
-
-      /* if we get this far, an adapter has been detected and is
-	 enabled */
-
-      printk("scsi  <fd_mcs>: %s at slot %d\n",
-	     fd_mcs_adapters[loop].name, slot + 1 );
+	int loop;
+	struct Scsi_Host *shpnt;
 
-      pos2 = mca_read_stored_pos( slot, 2 );
-      pos3 = mca_read_stored_pos( slot, 3 );
-      pos4 = mca_read_stored_pos( slot, 4);
-
-      /* ready for next probe */
-      slot++;
-
-      if (fd_mcs_adapters[loop].id == REPLY_ID) { /* reply card */
-	static int reply_irq[] = {10, 11, 14, 15};
-
-	bios = 0;		/* no bios */
-
-	if (pos2 & 0x2)
-	  port = ports[pos4 & 0x3];
-	else
-	  continue;
-
-	/* can't really disable it, same as irq=10 */
-	irq = reply_irq[((pos4 >> 2) & 0x1) + 2*((pos4 >> 4) & 0x1)];
-      } else {
-	bios = addresses[pos2 >> 6];
-	port = ports[(pos2 >> 4) & 0x03];
-	irq = ints[(pos2 >> 1) & 0x07];
-      }
-
-      if (irq) {
-	/* claim the slot */
-	mca_set_adapter_name( slot-1, fd_mcs_adapters[loop].name );
-
-	/* check irq/region */
-	if (check_region(port, 0x10) ||
-	    request_irq(irq, fd_mcs_intr,
-			SA_SHIRQ, "fd_mcs", hosts)) {
-	  printk( "fd_mcs: check_region() || request_irq() failed, Skip it\n");
-
-	  continue;
-	}
-
-	/* register */
-	if (!(shpnt = scsi_register(tpnt, sizeof(struct fd_hostdata)))) {
-	  printk( "fd_mcs: scsi_register() failed\n");
-	  continue;
-	}
-
-	/* request I/O region */
-	request_region( port, 0x10, "fd_mcs" );
-
-	/* save name */
-	strcpy(adapter_name, fd_mcs_adapters[loop].name);
-
-	/* chip/fifo */
-	chip = fd_mcs_adapters[loop].fd_chip;
-	/* use boot time value if available */
-	FIFO_COUNT =
-	  user_fifo_count?user_fifo_count:fd_mcs_adapters[loop].fifo_count;
-	FIFO_Size =
-	  user_fifo_size?user_fifo_size:fd_mcs_adapters[loop].fifo_size;
+	/* get id, port, bios, irq */
+	int slot;
+	u_char pos2, pos3, pos4;
+	int id, port, irq;
+	unsigned long bios;
+
+	/* if not MCA machine, return */
+	if (!MCA_bus)
+		return 0;
+
+	/* changeable? */
+	id = 7;
+
+	for (loop = 0; loop < FD_BRDS; loop++) {
+		slot = 0;
+		while (MCA_NOTFOUND != (slot = mca_find_adapter(fd_mcs_adapters[loop].id, slot))) {
+
+			/* if we get this far, an adapter has been detected and is
+			   enabled */
+
+			printk(KERN_INFO "scsi  <fd_mcs>: %s at slot %d\n", fd_mcs_adapters[loop].name, slot + 1);
+
+			pos2 = mca_read_stored_pos(slot, 2);
+			pos3 = mca_read_stored_pos(slot, 3);
+			pos4 = mca_read_stored_pos(slot, 4);
+
+			/* ready for next probe */
+			slot++;
+
+			if (fd_mcs_adapters[loop].id == REPLY_ID) {	/* reply card */
+				static int reply_irq[] = { 10, 11, 14, 15 };
+
+				bios = 0;	/* no bios */
+
+				if (pos2 & 0x2)
+					port = ports[pos4 & 0x3];
+				else
+					continue;
+
+				/* can't really disable it, same as irq=10 */
+				irq = reply_irq[((pos4 >> 2) & 0x1) + 2 * ((pos4 >> 4) & 0x1)];
+			} else {
+				bios = addresses[pos2 >> 6];
+				port = ports[(pos2 >> 4) & 0x03];
+				irq = ints[(pos2 >> 1) & 0x07];
+			}
+
+			if (irq) {
+				/* claim the slot */
+				mca_set_adapter_name(slot - 1, fd_mcs_adapters[loop].name);
+
+				/* check irq/region */
+				if (request_irq(irq, fd_mcs_intr, SA_SHIRQ, "fd_mcs", hosts)) {
+					printk(KERN_ERR "fd_mcs: interrupt is not available, skipping...\n");
+					continue;
+				}
+
+				/* request I/O region */
+				if (request_region(port, 0x10, "fd_mcs")) {
+					printk(KERN_ERR "fd_mcs: I/O region is already in use, skipping...\n");
+					continue;
+				}
+				/* register */
+				if (!(shpnt = scsi_register(tpnt, sizeof(struct fd_hostdata)))) {
+					printk(KERN_ERR "fd_mcs: scsi_register() failed\n");
+					release_region(port, 0x10);
+					free_irq(irq, hosts);
+					continue;
+				}
+
+
+				/* save name */
+				strcpy(adapter_name, fd_mcs_adapters[loop].name);
+
+				/* chip/fifo */
+				chip = fd_mcs_adapters[loop].fd_chip;
+				/* use boot time value if available */
+				FIFO_COUNT = user_fifo_count ? user_fifo_count : fd_mcs_adapters[loop].fifo_count;
+				FIFO_Size = user_fifo_size ? user_fifo_size : fd_mcs_adapters[loop].fifo_size;
 
 #ifdef NOT_USED
-	/* *************************************************** */
-	/* Try to toggle 32-bit mode.  This only
-	   works on an 18c30 chip.  (User reports
-	   say this works, so we should switch to
-	   it in the near future.) */
-	outb( 0x80, port + IO_Control );
-	if ((inb( port + Configuration2 ) & 0x80) == 0x80) {
-	  outb( 0x00, port + IO_Control );
-	  if ((inb( port + Configuration2 ) & 0x80) == 0x00) {
-	    chip = tmc18c30;
-	    FIFO_Size = 0x800;	/* 2k FIFO */
-
-	    printk("FIRST: chip=%s, fifo_size=0x%x\n",
-		   (chip == tmc18c30)?"tmc18c30":"tmc18c50", FIFO_Size);
-	  }
-	}
-
-	/* That should have worked, but appears to
-	   have problems.  Let's assume it is an
-	   18c30 if the RAM is disabled. */
-
-	if (inb( port + Configuration2 ) & 0x02) {
-	  chip      = tmc18c30;
-	  FIFO_Size = 0x800;	/* 2k FIFO */
-
-	  printk("SECOND: chip=%s, fifo_size=0x%x\n",
-		 (chip == tmc18c30)?"tmc18c30":"tmc18c50", FIFO_Size);
-	}
-	/* *************************************************** */	    
-#endif
-
-	/* IBM/ANSI scsi scan ordering */
-	/* Stick this back in when the scsi.c changes are there */
-	shpnt->reverse_ordering = 1;
-	
-
-	/* saving info */
-	hosts[found++] = shpnt;
-
-	shpnt->this_id = id;
-	shpnt->irq = irq;
-	shpnt->io_port = port;
-	shpnt->n_io_port = 0x10;
-
-	/* save */
-	bios_base    = bios;
-	adapter_mask = (1 << id);
-
-	/* save more */
-	SCSI_Mode_Cntl_port   = port + SCSI_Mode_Cntl;
-	FIFO_Data_Count_port  = port + FIFO_Data_Count;
-	Interrupt_Cntl_port   = port + Interrupt_Cntl;
-	Interrupt_Status_port = port + Interrupt_Status;
-	Interrupt_Cond_port   = port + Interrupt_Cond;
-	Read_FIFO_port        = port + Read_FIFO;
-	Read_SCSI_Data_port   = port + Read_SCSI_Data;
-	SCSI_Cntl_port        = port + SCSI_Cntl;
-	SCSI_Data_NoACK_port  = port + SCSI_Data_NoACK;
-	SCSI_Status_port      = port + SCSI_Status;
-	TMC_Cntl_port         = port + TMC_Cntl;
-	TMC_Status_port       = port + TMC_Status;
-	Write_FIFO_port       = port + Write_FIFO;
-	Write_SCSI_Data_port  = port + Write_SCSI_Data;
-
-	Bytes_Read     = 0;
-	Bytes_Written  = 0;
-	INTR_Processed = 0;
-
-	/* say something */
-	print_banner( shpnt );
-
-	/* reset */
-	outb( 1, SCSI_Cntl_port );
-	do_pause( 2 );
-	outb( 0, SCSI_Cntl_port );
-	do_pause( 115 );
-	outb( 0, SCSI_Mode_Cntl_port );
-	outb( PARITY_MASK, TMC_Cntl_port );
-	/* done reset */
+				/* *************************************************** */
+				/* Try to toggle 32-bit mode.  This only
+				   works on an 18c30 chip.  (User reports
+				   say this works, so we should switch to
+				   it in the near future.) */
+				outb(0x80, port + IO_Control);
+				if ((inb(port + Configuration2) & 0x80) == 0x80) {
+					outb(0x00, port + IO_Control);
+					if ((inb(port + Configuration2) & 0x80) == 0x00) {
+						chip = tmc18c30;
+						FIFO_Size = 0x800;	/* 2k FIFO */
+
+						printk("FIRST: chip=%s, fifo_size=0x%x\n", (chip == tmc18c30) ? "tmc18c30" : "tmc18c50", FIFO_Size);
+					}
+				}
+
+				/* That should have worked, but appears to
+				   have problems.  Let's assume it is an
+				   18c30 if the RAM is disabled. */
+
+				if (inb(port + Configuration2) & 0x02) {
+					chip = tmc18c30;
+					FIFO_Size = 0x800;	/* 2k FIFO */
+
+					printk("SECOND: chip=%s, fifo_size=0x%x\n", (chip == tmc18c30) ? "tmc18c30" : "tmc18c50", FIFO_Size);
+				}
+				/* *************************************************** */
+#endif
+
+				/* IBM/ANSI scsi scan ordering */
+				/* Stick this back in when the scsi.c changes are there */
+				shpnt->reverse_ordering = 1;
+
+
+				/* saving info */
+				hosts[found++] = shpnt;
+
+				shpnt->this_id = id;
+				shpnt->irq = irq;
+				shpnt->io_port = port;
+				shpnt->n_io_port = 0x10;
+
+				/* save */
+				bios_base = bios;
+				adapter_mask = (1 << id);
+
+				/* save more */
+				SCSI_Mode_Cntl_port = port + SCSI_Mode_Cntl;
+				FIFO_Data_Count_port = port + FIFO_Data_Count;
+				Interrupt_Cntl_port = port + Interrupt_Cntl;
+				Interrupt_Status_port = port + Interrupt_Status;
+				Interrupt_Cond_port = port + Interrupt_Cond;
+				Read_FIFO_port = port + Read_FIFO;
+				Read_SCSI_Data_port = port + Read_SCSI_Data;
+				SCSI_Cntl_port = port + SCSI_Cntl;
+				SCSI_Data_NoACK_port = port + SCSI_Data_NoACK;
+				SCSI_Status_port = port + SCSI_Status;
+				TMC_Cntl_port = port + TMC_Cntl;
+				TMC_Status_port = port + TMC_Status;
+				Write_FIFO_port = port + Write_FIFO;
+				Write_SCSI_Data_port = port + Write_SCSI_Data;
+
+				Bytes_Read = 0;
+				Bytes_Written = 0;
+				INTR_Processed = 0;
+
+				/* say something */
+				print_banner(shpnt);
+
+				/* reset */
+				outb(1, SCSI_Cntl_port);
+				do_pause(2);
+				outb(0, SCSI_Cntl_port);
+				do_pause(115);
+				outb(0, SCSI_Mode_Cntl_port);
+				outb(PARITY_MASK, TMC_Cntl_port);
+				/* done reset */
 
 #if DO_DETECT
-	/* scan devices attached */
-	{
-	  const int     buflen = 255;
-	  int           i, j, retcode;
-	  Scsi_Cmnd     SCinit;
-	  unsigned char do_inquiry[] =       { INQUIRY, 0, 0, 0, buflen, 0 };
-	  unsigned char do_request_sense[] = { REQUEST_SENSE, 
-					       0, 0, 0, buflen, 0 };
-	  unsigned char do_read_capacity[] = { READ_CAPACITY,
-					       0, 0, 0, 0, 0, 0, 0, 0, 0 };
-	  unsigned char buf[buflen];
-
-	  SCinit.request_buffer  = SCinit.buffer = buf;
-	  SCinit.request_bufflen = SCinit.bufflen = sizeof(buf)-1;
-	  SCinit.use_sg          = 0;
-	  SCinit.lun             = 0;
-	  SCinit.host            = shpnt;
-
-	  printk( "fd_mcs: detection routine scanning for devices:\n" );
-	  for (i = 0; i < 8; i++) {
-	    if (i == shpnt->this_id)	/* Skip host adapter */
-	      continue;
-	    SCinit.target = i;
-	    memcpy(SCinit.cmnd, do_request_sense,
-		   sizeof(do_request_sense));
-	    retcode = fd_mcs_command(&SCinit);
-	    if (!retcode) {
-	      memcpy(SCinit.cmnd, do_inquiry, sizeof(do_inquiry));
-	      retcode = fd_mcs_command(&SCinit);
-	      if (!retcode) {
-		printk( "     SCSI ID %d: ", i );
-		for (j = 8; j < (buf[4] < 32 ? buf[4] : 32); j++)
-		  printk( "%c", buf[j] >= 20 ? buf[j] : ' ' );
-		memcpy(SCinit.cmnd, do_read_capacity,
-		       sizeof(do_read_capacity));
-		retcode = fd_mcs_command(&SCinit);
-		if (!retcode) {
-		  unsigned long blocks, size, capacity;
-	       
-		  blocks = (buf[0] << 24) | (buf[1] << 16)
-		    | (buf[2] << 8) | buf[3];
-		  size = (buf[4] << 24) | (buf[5] << 16) | 
-		    (buf[6] << 8) | buf[7];
-		  capacity = +( +(blocks / 1024L) * +(size * 10L)) / 1024L;
-	       
-		  printk( "%lu MB (%lu byte blocks)\n",
-			  ((capacity + 5L) / 10L), size );
+				/* scan devices attached */
+				{
+					const int buflen = 255;
+					int i, j, retcode;
+					Scsi_Cmnd SCinit;
+					unsigned char do_inquiry[] = { INQUIRY, 0, 0, 0, buflen, 0 };
+					unsigned char do_request_sense[] = { REQUEST_SENSE,
+						0, 0, 0, buflen, 0
+					};
+					unsigned char do_read_capacity[] = { READ_CAPACITY,
+						0, 0, 0, 0, 0, 0, 0, 0, 0
+					};
+					unsigned char buf[buflen];
+
+					SCinit.request_buffer = SCinit.buffer = buf;
+					SCinit.request_bufflen = SCinit.bufflen = sizeof(buf) - 1;
+					SCinit.use_sg = 0;
+					SCinit.lun = 0;
+					SCinit.host = shpnt;
+
+					printk("fd_mcs: detection routine scanning for devices:\n");
+					for (i = 0; i < 8; i++) {
+						if (i == shpnt->this_id)	/* Skip host adapter */
+							continue;
+						SCinit.target = i;
+						memcpy(SCinit.cmnd, do_request_sense, sizeof(do_request_sense));
+						retcode = fd_mcs_command(&SCinit);
+						if (!retcode) {
+							memcpy(SCinit.cmnd, do_inquiry, sizeof(do_inquiry));
+							retcode = fd_mcs_command(&SCinit);
+							if (!retcode) {
+								printk("     SCSI ID %d: ", i);
+								for (j = 8; j < (buf[4] < 32 ? buf[4] : 32); j++)
+									printk("%c", buf[j] >= 20 ? buf[j] : ' ');
+								memcpy(SCinit.cmnd, do_read_capacity, sizeof(do_read_capacity));
+								retcode = fd_mcs_command(&SCinit);
+								if (!retcode) {
+									unsigned long blocks, size, capacity;
+
+									blocks = (buf[0] << 24) | (buf[1] << 16)
+									    | (buf[2] << 8) | buf[3];
+									size = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
+									capacity = +(+(blocks / 1024L) * +(size * 10L)) / 1024L;
+
+									printk("%lu MB (%lu byte blocks)\n", ((capacity + 5L) / 10L), size);
+								}
+							}
+						}
+					}
+				}
+#endif
+			}
 		}
-	      }
-	    }
-	  }
-	}
-#endif
-      }
-    }
-
-    if (found == FD_MAX_HOSTS) {
-      printk( "fd_mcs: detecting reached max=%d host adapters.\n",
-	      FD_MAX_HOSTS);
-      break;
-    }
-  }
 
-  return found;
+		if (found == FD_MAX_HOSTS) {
+			printk("fd_mcs: detecting reached max=%d host adapters.\n", FD_MAX_HOSTS);
+			break;
+		}
+	}
+
+	return found;
 }
 
-const char *fd_mcs_info(struct Scsi_Host *shpnt)
+static const char *fd_mcs_info(struct Scsi_Host *shpnt)
 {
-  return adapter_name;
+	return adapter_name;
 }
 
 static int TOTAL_INTR = 0;
@@ -598,869 +585,860 @@
  * length: If inout==FALSE max number of bytes to be written into the buffer 
  *         else number of bytes in the buffer
  */
-int fd_mcs_proc_info( char *buffer, char **start, off_t offset,
-		      int length, int hostno, int inout )
+static int fd_mcs_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout)
 {
-  struct Scsi_Host *shpnt;
-  int    len = 0;
-  int    i;
-
-  if (inout)
-    return(-ENOSYS);
-
-  *start = buffer + offset;
-
-  for (i = 0; hosts[i] && hosts[i]->host_no != hostno; i++);
-  shpnt = hosts[i];
-
-  if (!shpnt) {
-    return(-ENOENT);
-  } else {
-    len += sprintf(buffer+len, "Future Domain MCS-600/700 Driver %s\n",
-		   DRIVER_VERSION);
-
-    len += sprintf(buffer+len, "HOST #%d: %s\n",
-		   hostno, adapter_name);
-
-    len += sprintf(buffer+len, "FIFO Size=0x%x, FIFO Count=%d\n",
-		   FIFO_Size, FIFO_COUNT);
-
-    len += sprintf(buffer+len, "DriverCalls=%d, Interrupts=%d, BytesRead=%d, BytesWrite=%d\n\n",
-		   TOTAL_INTR, INTR_Processed, Bytes_Read, Bytes_Written);
-  }
-
-  if ((len -= offset) <= 0)
-    return 0;
-  if (len > length) 
-    len = length;
-  return len;
+	struct Scsi_Host *shpnt;
+	int len = 0;
+	int i;
+
+	if (inout)
+		return (-ENOSYS);
+
+	*start = buffer + offset;
+
+	for (i = 0; hosts[i] && hosts[i]->host_no != hostno; i++);
+	shpnt = hosts[i];
+
+	if (!shpnt) {
+		return (-ENOENT);
+	} else {
+		len += sprintf(buffer + len, "Future Domain MCS-600/700 Driver %s\n", DRIVER_VERSION);
+
+		len += sprintf(buffer + len, "HOST #%d: %s\n", hostno, adapter_name);
+
+		len += sprintf(buffer + len, "FIFO Size=0x%x, FIFO Count=%d\n", FIFO_Size, FIFO_COUNT);
+
+		len += sprintf(buffer + len, "DriverCalls=%d, Interrupts=%d, BytesRead=%d, BytesWrite=%d\n\n", TOTAL_INTR, INTR_Processed, Bytes_Read, Bytes_Written);
+	}
+
+	if ((len -= offset) <= 0)
+		return 0;
+	if (len > length)
+		len = length;
+	return len;
 }
-   
-static int fd_mcs_select(struct Scsi_Host *shpnt, int target )
+
+static int fd_mcs_select(struct Scsi_Host *shpnt, int target)
 {
-  int           status;
-  unsigned long timeout;
+	int status;
+	unsigned long timeout;
 
-  outb( 0x82, SCSI_Cntl_port ); /* Bus Enable + Select */
-  outb( adapter_mask | (1 << target), SCSI_Data_NoACK_port );
+	outb(0x82, SCSI_Cntl_port);	/* Bus Enable + Select */
+	outb(adapter_mask | (1 << target), SCSI_Data_NoACK_port);
 
-  /* Stop arbitration and enable parity */
-  outb( PARITY_MASK, TMC_Cntl_port ); 
+	/* Stop arbitration and enable parity */
+	outb(PARITY_MASK, TMC_Cntl_port);
 
-  timeout = 350;		/* 350mS -- because of timeouts
+	timeout = 350;		/* 350mS -- because of timeouts
 				   (was 250mS) */
 
-  do {
-    status = inb( SCSI_Status_port ); /* Read adapter status */
-    if (status & 1) {			/* Busy asserted */
-      /* Enable SCSI Bus (on error, should make bus idle with 0) */
-      outb( 0x80, SCSI_Cntl_port );
-      return 0;
-    }
-    udelay(1000);		/* wait one msec */
-  } while (--timeout);
+	do {
+		status = inb(SCSI_Status_port);	/* Read adapter status */
+		if (status & 1) {	/* Busy asserted */
+			/* Enable SCSI Bus (on error, should make bus idle with 0) */
+			outb(0x80, SCSI_Cntl_port);
+			return 0;
+		}
+		udelay(1000);	/* wait one msec */
+	} while (--timeout);
 
-  /* Make bus idle */
-  fd_mcs_make_bus_idle(shpnt);
+	/* Make bus idle */
+	fd_mcs_make_bus_idle(shpnt);
 #if EVERY_ACCESS
-  if (!target) printk( "Selection failed\n" );
+	if (!target)
+		printk("Selection failed\n");
 #endif
 #if ERRORS_ONLY
-  if (!target) {
-    static int flag = 0;
+	if (!target) {
+		static int flag = 0;
 
-    if (!flag) /* Skip first failure for all chips. */
-      ++flag;
-    else
-      printk( "fd_mcs: Selection failed\n" );
-  }
+		if (!flag)	/* Skip first failure for all chips. */
+			++flag;
+		else
+			printk("fd_mcs: Selection failed\n");
+	}
 #endif
-  return 1;
+	return 1;
 }
 
-static void my_done( struct Scsi_Host *shpnt, int error )
+static void my_done(struct Scsi_Host *shpnt, int error)
 {
-  if (in_command) {
-    in_command = 0;
-    outb( 0x00, Interrupt_Cntl_port );
-    fd_mcs_make_bus_idle(shpnt);
-    current_SC->result = error;
-    current_SC->scsi_done( current_SC );
-  } else {
-    panic( "fd_mcs: my_done() called outside of command\n" );
-  }
+	if (in_command) {
+		in_command = 0;
+		outb(0x00, Interrupt_Cntl_port);
+		fd_mcs_make_bus_idle(shpnt);
+		current_SC->result = error;
+		current_SC->scsi_done(current_SC);
+	} else {
+		panic("fd_mcs: my_done() called outside of command\n");
+	}
 #if DEBUG_RACE
-  in_interrupt_flag = 0;
+	in_interrupt_flag = 0;
 #endif
 }
 
 /* only my_done needs to be protected  */
-static void fd_mcs_intr( int irq, void *dev_id, struct pt_regs * regs )
+static void fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
-  unsigned long flags;
-  int      status;
-  int      done = 0;
-  unsigned data_count, tmp_count;
-
-  int i = 0;
-  struct Scsi_Host *shpnt;
-
-  TOTAL_INTR++;
-
-  /* search for one adapter-response on shared interrupt */
-  while ((shpnt = hosts[i++])) {
-    if ((inb(TMC_Status_port)) & 1)
-      break;
-  }
- 
-  /* return if some other device on this IRQ caused the interrupt */
-  if (!shpnt) {
-    return;
-  }
+	unsigned long flags;
+	int status;
+	int done = 0;
+	unsigned data_count, tmp_count;
+
+	int i = 0;
+	struct Scsi_Host *shpnt;
+
+	TOTAL_INTR++;
+
+	/* search for one adapter-response on shared interrupt */
+	while ((shpnt = hosts[i++])) {
+		if ((inb(TMC_Status_port)) & 1)
+			break;
+	}
+
+	/* return if some other device on this IRQ caused the interrupt */
+	if (!shpnt) {
+		return;
+	}
 
-  INTR_Processed++;
+	INTR_Processed++;
 
-  outb( 0x00, Interrupt_Cntl_port );
+	outb(0x00, Interrupt_Cntl_port);
 
-  /* Abort calls my_done, so we do nothing here. */
-  if (current_SC->SCp.phase & aborted) {
+	/* Abort calls my_done, so we do nothing here. */
+	if (current_SC->SCp.phase & aborted) {
 #if DEBUG_ABORT
-    printk( "Interrupt after abort, ignoring\n" );
+		printk("Interrupt after abort, ignoring\n");
 #endif
-    /* return; */
-  }
-
+		/* return; */
+	}
 #if DEBUG_RACE
-  ++in_interrupt_flag;
+	++in_interrupt_flag;
 #endif
 
-  if (current_SC->SCp.phase & in_arbitration) {
-    status = inb( TMC_Status_port );        /* Read adapter status */
-    if (!(status & 0x02)) {
+	if (current_SC->SCp.phase & in_arbitration) {
+		status = inb(TMC_Status_port);	/* Read adapter status */
+		if (!(status & 0x02)) {
 #if EVERY_ACCESS
-      printk( " AFAIL " );
+			printk(" AFAIL ");
 #endif
-      spin_lock_irqsave(shpnt->host_lock, flags);
-      my_done( shpnt, DID_BUS_BUSY << 16 );
-      spin_unlock_irqrestore(shpnt->host_lock, flags);
-      return;
-    }
-    current_SC->SCp.phase = in_selection;
-      
-    outb( 0x40 | FIFO_COUNT, Interrupt_Cntl_port );
-
-    outb( 0x82, SCSI_Cntl_port ); /* Bus Enable + Select */
-    outb( adapter_mask | (1 << current_SC->target), SCSI_Data_NoACK_port );
-      
-    /* Stop arbitration and enable parity */
-    outb( 0x10 | PARITY_MASK, TMC_Cntl_port );
+			spin_lock_irqsave(shpnt->host_lock, flags);
+			my_done(shpnt, DID_BUS_BUSY << 16);
+			spin_unlock_irqrestore(shpnt->host_lock, flags);
+			return;
+		}
+		current_SC->SCp.phase = in_selection;
+
+		outb(0x40 | FIFO_COUNT, Interrupt_Cntl_port);
+
+		outb(0x82, SCSI_Cntl_port);	/* Bus Enable + Select */
+		outb(adapter_mask | (1 << current_SC->target), SCSI_Data_NoACK_port);
+
+		/* Stop arbitration and enable parity */
+		outb(0x10 | PARITY_MASK, TMC_Cntl_port);
 #if DEBUG_RACE
-    in_interrupt_flag = 0;
+		in_interrupt_flag = 0;
 #endif
-    return;
-  } else if (current_SC->SCp.phase & in_selection) {
-    status = inb( SCSI_Status_port );
-    if (!(status & 0x01)) {
-      /* Try again, for slow devices */
-      if (fd_mcs_select(shpnt, current_SC->target )) {
+		return;
+	} else if (current_SC->SCp.phase & in_selection) {
+		status = inb(SCSI_Status_port);
+		if (!(status & 0x01)) {
+			/* Try again, for slow devices */
+			if (fd_mcs_select(shpnt, current_SC->target)) {
 #if EVERY_ACCESS
-	printk( " SFAIL " );
+				printk(" SFAIL ");
 #endif
-	spin_lock_irqsave(shpnt->host_lock, flags);
-	my_done( shpnt, DID_NO_CONNECT << 16 );
-	spin_unlock_irqrestore(shpnt->host_lock, flags);
-	return;
-      } else {
+				spin_lock_irqsave(shpnt->host_lock, flags);
+				my_done(shpnt, DID_NO_CONNECT << 16);
+				spin_unlock_irqrestore(shpnt->host_lock, flags);
+				return;
+			} else {
 #if EVERY_ACCESS
-	printk( " AltSel " );
+				printk(" AltSel ");
 #endif
-	/* Stop arbitration and enable parity */
-	outb( 0x10 | PARITY_MASK, TMC_Cntl_port );
-      }
-    }
-    current_SC->SCp.phase = in_other;
-    outb( 0x90 | FIFO_COUNT, Interrupt_Cntl_port );
-    outb( 0x80, SCSI_Cntl_port );
+				/* Stop arbitration and enable parity */
+				outb(0x10 | PARITY_MASK, TMC_Cntl_port);
+			}
+		}
+		current_SC->SCp.phase = in_other;
+		outb(0x90 | FIFO_COUNT, Interrupt_Cntl_port);
+		outb(0x80, SCSI_Cntl_port);
 #if DEBUG_RACE
-    in_interrupt_flag = 0;
+		in_interrupt_flag = 0;
 #endif
-    return;
-  }
-   
-  /* current_SC->SCp.phase == in_other: this is the body of the routine */
-   
-  status = inb( SCSI_Status_port );
-   
-  if (status & 0x10) {	/* REQ */
-      
-    switch (status & 0x0e) {
-       
-    case 0x08:		/* COMMAND OUT */
-      outb( current_SC->cmnd[current_SC->SCp.sent_command++],
-	    Write_SCSI_Data_port );
+		return;
+	}
+
+	/* current_SC->SCp.phase == in_other: this is the body of the routine */
+
+	status = inb(SCSI_Status_port);
+
+	if (status & 0x10) {	/* REQ */
+
+		switch (status & 0x0e) {
+
+		case 0x08:	/* COMMAND OUT */
+			outb(current_SC->cmnd[current_SC->SCp.sent_command++], Write_SCSI_Data_port);
 #if EVERY_ACCESS
-      printk( "CMD = %x,",
-	      current_SC->cmnd[ current_SC->SCp.sent_command - 1] );
+			printk("CMD = %x,", current_SC->cmnd[current_SC->SCp.sent_command - 1]);
 #endif
-      break;
-    case 0x00:		/* DATA OUT -- tmc18c50/tmc18c30 only */
-      if (chip != tmc1800 && !current_SC->SCp.have_data_in) {
-	current_SC->SCp.have_data_in = -1;
-	outb( 0xd0 | PARITY_MASK, TMC_Cntl_port );
-      }
-      break;
-    case 0x04:		/* DATA IN -- tmc18c50/tmc18c30 only */
-      if (chip != tmc1800 && !current_SC->SCp.have_data_in) {
-	current_SC->SCp.have_data_in = 1;
-	outb( 0x90 | PARITY_MASK, TMC_Cntl_port );
-      }
-      break;
-    case 0x0c:		/* STATUS IN */
-      current_SC->SCp.Status = inb( Read_SCSI_Data_port );
+			break;
+		case 0x00:	/* DATA OUT -- tmc18c50/tmc18c30 only */
+			if (chip != tmc1800 && !current_SC->SCp.have_data_in) {
+				current_SC->SCp.have_data_in = -1;
+				outb(0xd0 | PARITY_MASK, TMC_Cntl_port);
+			}
+			break;
+		case 0x04:	/* DATA IN -- tmc18c50/tmc18c30 only */
+			if (chip != tmc1800 && !current_SC->SCp.have_data_in) {
+				current_SC->SCp.have_data_in = 1;
+				outb(0x90 | PARITY_MASK, TMC_Cntl_port);
+			}
+			break;
+		case 0x0c:	/* STATUS IN */
+			current_SC->SCp.Status = inb(Read_SCSI_Data_port);
 #if EVERY_ACCESS
-      printk( "Status = %x, ", current_SC->SCp.Status );
+			printk("Status = %x, ", current_SC->SCp.Status);
 #endif
 #if ERRORS_ONLY
-      if (current_SC->SCp.Status
-	  && current_SC->SCp.Status != 2
-	  && current_SC->SCp.Status != 8) {
-	printk( "ERROR fd_mcs: target = %d, command = %x, status = %x\n",
-		current_SC->target,
-		current_SC->cmnd[0],
-		current_SC->SCp.Status );
-      }
-#endif
-      break;
-    case 0x0a:		/* MESSAGE OUT */
-      outb( MESSAGE_REJECT, Write_SCSI_Data_port ); /* Reject */
-      break;
-    case 0x0e:		/* MESSAGE IN */
-      current_SC->SCp.Message = inb( Read_SCSI_Data_port );
+			if (current_SC->SCp.Status && current_SC->SCp.Status != 2 && current_SC->SCp.Status != 8) {
+				printk("ERROR fd_mcs: target = %d, command = %x, status = %x\n", current_SC->target, current_SC->cmnd[0], current_SC->SCp.Status);
+			}
+#endif
+			break;
+		case 0x0a:	/* MESSAGE OUT */
+			outb(MESSAGE_REJECT, Write_SCSI_Data_port);	/* Reject */
+			break;
+		case 0x0e:	/* MESSAGE IN */
+			current_SC->SCp.Message = inb(Read_SCSI_Data_port);
 #if EVERY_ACCESS
-      printk( "Message = %x, ", current_SC->SCp.Message );
+			printk("Message = %x, ", current_SC->SCp.Message);
 #endif
-      if (!current_SC->SCp.Message) ++done;
+			if (!current_SC->SCp.Message)
+				++done;
 #if DEBUG_MESSAGES || EVERY_ACCESS
-      if (current_SC->SCp.Message) {
-	printk( "fd_mcs: message = %x\n", current_SC->SCp.Message );
-      }
-#endif
-      break;
-    }
-  }
-
-  if (chip == tmc1800
-      && !current_SC->SCp.have_data_in
-      && (current_SC->SCp.sent_command
-	  >= current_SC->cmd_len)) {
-    /* We have to get the FIFO direction
-       correct, so I've made a table based
-       on the SCSI Standard of which commands
-       appear to require a DATA OUT phase.
-       */
-    /*
-      p. 94: Command for all device types
-      CHANGE DEFINITION            40 DATA OUT
-      COMPARE                      39 DATA OUT
-      COPY                         18 DATA OUT
-      COPY AND VERIFY              3a DATA OUT
-      INQUIRY                      12 
-      LOG SELECT                   4c DATA OUT
-      LOG SENSE                    4d
-      MODE SELECT (6)              15 DATA OUT
-      MODE SELECT (10)             55 DATA OUT
-      MODE SENSE (6)               1a
-      MODE SENSE (10)              5a
-      READ BUFFER                  3c
-      RECEIVE DIAGNOSTIC RESULTS   1c
-      REQUEST SENSE                03
-      SEND DIAGNOSTIC              1d DATA OUT
-      TEST UNIT READY              00
-      WRITE BUFFER                 3b DATA OUT
-
-      p.178: Commands for direct-access devices (not listed on p. 94)
-      FORMAT UNIT                  04 DATA OUT
-      LOCK-UNLOCK CACHE            36
-      PRE-FETCH                    34
-      PREVENT-ALLOW MEDIUM REMOVAL 1e
-      READ (6)/RECEIVE             08
-      READ (10)                    3c
-      READ CAPACITY                25
-      READ DEFECT DATA (10)        37
-      READ LONG                    3e
-      REASSIGN BLOCKS              07 DATA OUT
-      RELEASE                      17
-      RESERVE                      16 DATA OUT
-      REZERO UNIT/REWIND           01
-      SEARCH DATA EQUAL (10)       31 DATA OUT
-      SEARCH DATA HIGH (10)        30 DATA OUT
-      SEARCH DATA LOW (10)         32 DATA OUT
-      SEEK (6)                     0b
-      SEEK (10)                    2b
-      SET LIMITS (10)              33
-      START STOP UNIT              1b
-      SYNCHRONIZE CACHE            35
-      VERIFY (10)                  2f
-      WRITE (6)/PRINT/SEND         0a DATA OUT
-      WRITE (10)/SEND              2a DATA OUT
-      WRITE AND VERIFY (10)        2e DATA OUT
-      WRITE LONG                   3f DATA OUT
-      WRITE SAME                   41 DATA OUT ?
-
-      p. 261: Commands for sequential-access devices (not previously listed)
-      ERASE                        19
-      LOAD UNLOAD                  1b
-      LOCATE                       2b
-      READ BLOCK LIMITS            05
-      READ POSITION                34
-      READ REVERSE                 0f
-      RECOVER BUFFERED DATA        14
-      SPACE                        11
-      WRITE FILEMARKS              10 ?
-
-      p. 298: Commands for printer devices (not previously listed)
-      ****** NOT SUPPORTED BY THIS DRIVER, since 0b is SEEK (6) *****
-      SLEW AND PRINT               0b DATA OUT  -- same as seek
-      STOP PRINT                   1b
-      SYNCHRONIZE BUFFER           10
-
-      p. 315: Commands for processor devices (not previously listed)
-	
-      p. 321: Commands for write-once devices (not previously listed)
-      MEDIUM SCAN                  38
-      READ (12)                    a8
-      SEARCH DATA EQUAL (12)       b1 DATA OUT
-      SEARCH DATA HIGH (12)        b0 DATA OUT
-      SEARCH DATA LOW (12)         b2 DATA OUT
-      SET LIMITS (12)              b3
-      VERIFY (12)                  af
-      WRITE (12)                   aa DATA OUT
-      WRITE AND VERIFY (12)        ae DATA OUT
-
-      p. 332: Commands for CD-ROM devices (not previously listed)
-      PAUSE/RESUME                 4b
-      PLAY AUDIO (10)              45
-      PLAY AUDIO (12)              a5
-      PLAY AUDIO MSF               47
-      PLAY TRACK RELATIVE (10)     49
-      PLAY TRACK RELATIVE (12)     a9
-      READ HEADER                  44
-      READ SUB-CHANNEL             42
-      READ TOC                     43
-
-      p. 370: Commands for scanner devices (not previously listed)
-      GET DATA BUFFER STATUS       34
-      GET WINDOW                   25
-      OBJECT POSITION              31
-      SCAN                         1b
-      SET WINDOW                   24 DATA OUT
-
-      p. 391: Commands for optical memory devices (not listed)
-      ERASE (10)                   2c
-      ERASE (12)                   ac
-      MEDIUM SCAN                  38 DATA OUT
-      READ DEFECT DATA (12)        b7
-      READ GENERATION              29
-      READ UPDATED BLOCK           2d
-      UPDATE BLOCK                 3d DATA OUT
-
-      p. 419: Commands for medium changer devices (not listed)
-      EXCHANGE MEDIUM              46
-      INITIALIZE ELEMENT STATUS    07
-      MOVE MEDIUM                  a5
-      POSITION TO ELEMENT          2b
-      READ ELEMENT STATUS          b8
-      REQUEST VOL. ELEMENT ADDRESS b5
-      SEND VOLUME TAG              b6 DATA OUT
-
-      p. 454: Commands for communications devices (not listed previously)
-      GET MESSAGE (6)              08
-      GET MESSAGE (10)             28
-      GET MESSAGE (12)             a8
-      */
-	
-    switch (current_SC->cmnd[0]) {
-    case CHANGE_DEFINITION: case COMPARE:         case COPY:
-    case COPY_VERIFY:       case LOG_SELECT:      case MODE_SELECT:
-    case MODE_SELECT_10:    case SEND_DIAGNOSTIC: case WRITE_BUFFER:
-
-    case FORMAT_UNIT:       case REASSIGN_BLOCKS: case RESERVE:
-    case SEARCH_EQUAL:      case SEARCH_HIGH:     case SEARCH_LOW:
-    case WRITE_6:           case WRITE_10:        case WRITE_VERIFY:
-    case 0x3f:              case 0x41:
-
-    case 0xb1:              case 0xb0:            case 0xb2:
-    case 0xaa:              case 0xae:
-
-    case 0x24:
-
-    case 0x38:              case 0x3d:
-
-    case 0xb6:
-	 
-    case 0xea:		/* alternate number for WRITE LONG */
-	 
-      current_SC->SCp.have_data_in = -1;
-      outb( 0xd0 | PARITY_MASK, TMC_Cntl_port );
-      break;
-
-    case 0x00:
-    default:
-	 
-      current_SC->SCp.have_data_in = 1;
-      outb( 0x90 | PARITY_MASK, TMC_Cntl_port );
-      break;
-    }
-  }
+			if (current_SC->SCp.Message) {
+				printk("fd_mcs: message = %x\n", current_SC->SCp.Message);
+			}
+#endif
+			break;
+		}
+	}
 
-  if (current_SC->SCp.have_data_in == -1) { /* DATA OUT */
-    while ( (data_count = FIFO_Size - inw( FIFO_Data_Count_port )) > 512 ) {
+	if (chip == tmc1800 && !current_SC->SCp.have_data_in && (current_SC->SCp.sent_command >= current_SC->cmd_len)) {
+		/* We have to get the FIFO direction
+		   correct, so I've made a table based
+		   on the SCSI Standard of which commands
+		   appear to require a DATA OUT phase.
+		 */
+		/*
+		   p. 94: Command for all device types
+		   CHANGE DEFINITION            40 DATA OUT
+		   COMPARE                      39 DATA OUT
+		   COPY                         18 DATA OUT
+		   COPY AND VERIFY              3a DATA OUT
+		   INQUIRY                      12 
+		   LOG SELECT                   4c DATA OUT
+		   LOG SENSE                    4d
+		   MODE SELECT (6)              15 DATA OUT
+		   MODE SELECT (10)             55 DATA OUT
+		   MODE SENSE (6)               1a
+		   MODE SENSE (10)              5a
+		   READ BUFFER                  3c
+		   RECEIVE DIAGNOSTIC RESULTS   1c
+		   REQUEST SENSE                03
+		   SEND DIAGNOSTIC              1d DATA OUT
+		   TEST UNIT READY              00
+		   WRITE BUFFER                 3b DATA OUT
+
+		   p.178: Commands for direct-access devices (not listed on p. 94)
+		   FORMAT UNIT                  04 DATA OUT
+		   LOCK-UNLOCK CACHE            36
+		   PRE-FETCH                    34
+		   PREVENT-ALLOW MEDIUM REMOVAL 1e
+		   READ (6)/RECEIVE             08
+		   READ (10)                    3c
+		   READ CAPACITY                25
+		   READ DEFECT DATA (10)        37
+		   READ LONG                    3e
+		   REASSIGN BLOCKS              07 DATA OUT
+		   RELEASE                      17
+		   RESERVE                      16 DATA OUT
+		   REZERO UNIT/REWIND           01
+		   SEARCH DATA EQUAL (10)       31 DATA OUT
+		   SEARCH DATA HIGH (10)        30 DATA OUT
+		   SEARCH DATA LOW (10)         32 DATA OUT
+		   SEEK (6)                     0b
+		   SEEK (10)                    2b
+		   SET LIMITS (10)              33
+		   START STOP UNIT              1b
+		   SYNCHRONIZE CACHE            35
+		   VERIFY (10)                  2f
+		   WRITE (6)/PRINT/SEND         0a DATA OUT
+		   WRITE (10)/SEND              2a DATA OUT
+		   WRITE AND VERIFY (10)        2e DATA OUT
+		   WRITE LONG                   3f DATA OUT
+		   WRITE SAME                   41 DATA OUT ?
+
+		   p. 261: Commands for sequential-access devices (not previously listed)
+		   ERASE                        19
+		   LOAD UNLOAD                  1b
+		   LOCATE                       2b
+		   READ BLOCK LIMITS            05
+		   READ POSITION                34
+		   READ REVERSE                 0f
+		   RECOVER BUFFERED DATA        14
+		   SPACE                        11
+		   WRITE FILEMARKS              10 ?
+
+		   p. 298: Commands for printer devices (not previously listed)
+		   ****** NOT SUPPORTED BY THIS DRIVER, since 0b is SEEK (6) *****
+		   SLEW AND PRINT               0b DATA OUT  -- same as seek
+		   STOP PRINT                   1b
+		   SYNCHRONIZE BUFFER           10
+
+		   p. 315: Commands for processor devices (not previously listed)
+
+		   p. 321: Commands for write-once devices (not previously listed)
+		   MEDIUM SCAN                  38
+		   READ (12)                    a8
+		   SEARCH DATA EQUAL (12)       b1 DATA OUT
+		   SEARCH DATA HIGH (12)        b0 DATA OUT
+		   SEARCH DATA LOW (12)         b2 DATA OUT
+		   SET LIMITS (12)              b3
+		   VERIFY (12)                  af
+		   WRITE (12)                   aa DATA OUT
+		   WRITE AND VERIFY (12)        ae DATA OUT
+
+		   p. 332: Commands for CD-ROM devices (not previously listed)
+		   PAUSE/RESUME                 4b
+		   PLAY AUDIO (10)              45
+		   PLAY AUDIO (12)              a5
+		   PLAY AUDIO MSF               47
+		   PLAY TRACK RELATIVE (10)     49
+		   PLAY TRACK RELATIVE (12)     a9
+		   READ HEADER                  44
+		   READ SUB-CHANNEL             42
+		   READ TOC                     43
+
+		   p. 370: Commands for scanner devices (not previously listed)
+		   GET DATA BUFFER STATUS       34
+		   GET WINDOW                   25
+		   OBJECT POSITION              31
+		   SCAN                         1b
+		   SET WINDOW                   24 DATA OUT
+
+		   p. 391: Commands for optical memory devices (not listed)
+		   ERASE (10)                   2c
+		   ERASE (12)                   ac
+		   MEDIUM SCAN                  38 DATA OUT
+		   READ DEFECT DATA (12)        b7
+		   READ GENERATION              29
+		   READ UPDATED BLOCK           2d
+		   UPDATE BLOCK                 3d DATA OUT
+
+		   p. 419: Commands for medium changer devices (not listed)
+		   EXCHANGE MEDIUM              46
+		   INITIALIZE ELEMENT STATUS    07
+		   MOVE MEDIUM                  a5
+		   POSITION TO ELEMENT          2b
+		   READ ELEMENT STATUS          b8
+		   REQUEST VOL. ELEMENT ADDRESS b5
+		   SEND VOLUME TAG              b6 DATA OUT
+
+		   p. 454: Commands for communications devices (not listed previously)
+		   GET MESSAGE (6)              08
+		   GET MESSAGE (10)             28
+		   GET MESSAGE (12)             a8
+		 */
+
+		switch (current_SC->cmnd[0]) {
+		case CHANGE_DEFINITION:
+		case COMPARE:
+		case COPY:
+		case COPY_VERIFY:
+		case LOG_SELECT:
+		case MODE_SELECT:
+		case MODE_SELECT_10:
+		case SEND_DIAGNOSTIC:
+		case WRITE_BUFFER:
+
+		case FORMAT_UNIT:
+		case REASSIGN_BLOCKS:
+		case RESERVE:
+		case SEARCH_EQUAL:
+		case SEARCH_HIGH:
+		case SEARCH_LOW:
+		case WRITE_6:
+		case WRITE_10:
+		case WRITE_VERIFY:
+		case 0x3f:
+		case 0x41:
+
+		case 0xb1:
+		case 0xb0:
+		case 0xb2:
+		case 0xaa:
+		case 0xae:
+
+		case 0x24:
+
+		case 0x38:
+		case 0x3d:
+
+		case 0xb6:
+
+		case 0xea:	/* alternate number for WRITE LONG */
+
+			current_SC->SCp.have_data_in = -1;
+			outb(0xd0 | PARITY_MASK, TMC_Cntl_port);
+			break;
+
+		case 0x00:
+		default:
+
+			current_SC->SCp.have_data_in = 1;
+			outb(0x90 | PARITY_MASK, TMC_Cntl_port);
+			break;
+		}
+	}
+
+	if (current_SC->SCp.have_data_in == -1) {	/* DATA OUT */
+		while ((data_count = FIFO_Size - inw(FIFO_Data_Count_port)) > 512) {
 #if EVERY_ACCESS
-      printk( "DC=%d, ", data_count ) ;
+			printk("DC=%d, ", data_count);
 #endif
-      if (data_count > current_SC->SCp.this_residual)
-	data_count = current_SC->SCp.this_residual;
-      if (data_count > 0) {
+			if (data_count > current_SC->SCp.this_residual)
+				data_count = current_SC->SCp.this_residual;
+			if (data_count > 0) {
 #if EVERY_ACCESS
-	printk( "%d OUT, ", data_count );
+				printk("%d OUT, ", data_count);
 #endif
-	if (data_count == 1) {
-	  Bytes_Written++;
+				if (data_count == 1) {
+					Bytes_Written++;
 
-	  outb( *current_SC->SCp.ptr++, Write_FIFO_port );
-	  --current_SC->SCp.this_residual;
-	} else {
-	  data_count >>= 1;
-	  tmp_count = data_count << 1;
-	  outsw( Write_FIFO_port, current_SC->SCp.ptr, data_count );
-	  current_SC->SCp.ptr += tmp_count;
-	  Bytes_Written += tmp_count;
-	  current_SC->SCp.this_residual -= tmp_count;
-	}
-      }
-      if (!current_SC->SCp.this_residual) {
-	if (current_SC->SCp.buffers_residual) {
-	  --current_SC->SCp.buffers_residual;
-	  ++current_SC->SCp.buffer;
-	  current_SC->SCp.ptr = current_SC->SCp.buffer->address;
-	  current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
-	} else
-	  break;
-      }
-    }
-  } else if (current_SC->SCp.have_data_in == 1) { /* DATA IN */
-    while ((data_count = inw( FIFO_Data_Count_port )) > 0) {
+					outb(*current_SC->SCp.ptr++, Write_FIFO_port);
+					--current_SC->SCp.this_residual;
+				} else {
+					data_count >>= 1;
+					tmp_count = data_count << 1;
+					outsw(Write_FIFO_port, current_SC->SCp.ptr, data_count);
+					current_SC->SCp.ptr += tmp_count;
+					Bytes_Written += tmp_count;
+					current_SC->SCp.this_residual -= tmp_count;
+				}
+			}
+			if (!current_SC->SCp.this_residual) {
+				if (current_SC->SCp.buffers_residual) {
+					--current_SC->SCp.buffers_residual;
+					++current_SC->SCp.buffer;
+					current_SC->SCp.ptr = page_address(current_SC->SCp.buffer->page) + current_SC->SCp.buffer->offset;
+					current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
+				} else
+					break;
+			}
+		}
+	} else if (current_SC->SCp.have_data_in == 1) {	/* DATA IN */
+		while ((data_count = inw(FIFO_Data_Count_port)) > 0) {
 #if EVERY_ACCESS
-      printk( "DC=%d, ", data_count );
+			printk("DC=%d, ", data_count);
 #endif
-      if (data_count > current_SC->SCp.this_residual)
-	data_count = current_SC->SCp.this_residual;
-      if (data_count) {
+			if (data_count > current_SC->SCp.this_residual)
+				data_count = current_SC->SCp.this_residual;
+			if (data_count) {
 #if EVERY_ACCESS
-	printk( "%d IN, ", data_count );
+				printk("%d IN, ", data_count);
 #endif
-	if (data_count == 1) {
-	  Bytes_Read++;
-	  *current_SC->SCp.ptr++ = inb( Read_FIFO_port );
-	  --current_SC->SCp.this_residual;
-	} else {
-	  data_count >>= 1; /* Number of words */
-	  tmp_count = data_count << 1;
-	  insw( Read_FIFO_port, current_SC->SCp.ptr, data_count );
-	  current_SC->SCp.ptr += tmp_count;
-	  Bytes_Read += tmp_count;
-	  current_SC->SCp.this_residual -= tmp_count;
-	}
-      }
-      if (!current_SC->SCp.this_residual
-	  && current_SC->SCp.buffers_residual) {
-	--current_SC->SCp.buffers_residual;
-	++current_SC->SCp.buffer;
-	current_SC->SCp.ptr = current_SC->SCp.buffer->address;
-	current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
-      }
-    }
-  }
-   
-  if (done) {
+				if (data_count == 1) {
+					Bytes_Read++;
+					*current_SC->SCp.ptr++ = inb(Read_FIFO_port);
+					--current_SC->SCp.this_residual;
+				} else {
+					data_count >>= 1;	/* Number of words */
+					tmp_count = data_count << 1;
+					insw(Read_FIFO_port, current_SC->SCp.ptr, data_count);
+					current_SC->SCp.ptr += tmp_count;
+					Bytes_Read += tmp_count;
+					current_SC->SCp.this_residual -= tmp_count;
+				}
+			}
+			if (!current_SC->SCp.this_residual && current_SC->SCp.buffers_residual) {
+				--current_SC->SCp.buffers_residual;
+				++current_SC->SCp.buffer;
+				current_SC->SCp.ptr = page_address(current_SC->SCp.buffer->page) + current_SC->SCp.buffer->offset;
+				current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
+			}
+		}
+	}
+
+	if (done) {
 #if EVERY_ACCESS
-    printk( " ** IN DONE %d ** ", current_SC->SCp.have_data_in );
+		printk(" ** IN DONE %d ** ", current_SC->SCp.have_data_in);
 #endif
 
 #if ERRORS_ONLY
-    if (current_SC->cmnd[0] == REQUEST_SENSE && !current_SC->SCp.Status) {
-      if ((unsigned char)(*((char *)current_SC->request_buffer+2)) & 0x0f) {
-	unsigned char key;
-	unsigned char code;
-	unsigned char qualifier;
-
-	key = (unsigned char)(*((char *)current_SC->request_buffer + 2))
-	  & 0x0f;
-	code = (unsigned char)(*((char *)current_SC->request_buffer + 12));
-	qualifier = (unsigned char)(*((char *)current_SC->request_buffer
-				      + 13));
-
-	if (key != UNIT_ATTENTION
-	    && !(key == NOT_READY
-		 && code == 0x04
-		 && (!qualifier || qualifier == 0x02 || qualifier == 0x01))
-	    && !(key == ILLEGAL_REQUEST && (code == 0x25
-					    || code == 0x24
-					    || !code)))
-		  
-	  printk( "fd_mcs: REQUEST SENSE "
-		  "Key = %x, Code = %x, Qualifier = %x\n",
-		  key, code, qualifier );
-      }
-    }
+		if (current_SC->cmnd[0] == REQUEST_SENSE && !current_SC->SCp.Status) {
+			if ((unsigned char) (*((char *) current_SC->request_buffer + 2)) & 0x0f) {
+				unsigned char key;
+				unsigned char code;
+				unsigned char qualifier;
+
+				key = (unsigned char) (*((char *) current_SC->request_buffer + 2)) & 0x0f;
+				code = (unsigned char) (*((char *) current_SC->request_buffer + 12));
+				qualifier = (unsigned char) (*((char *) current_SC->request_buffer + 13));
+
+				if (key != UNIT_ATTENTION && !(key == NOT_READY && code == 0x04 && (!qualifier || qualifier == 0x02 || qualifier == 0x01))
+				    && !(key == ILLEGAL_REQUEST && (code == 0x25 || code == 0x24 || !code)))
+
+					printk("fd_mcs: REQUEST SENSE " "Key = %x, Code = %x, Qualifier = %x\n", key, code, qualifier);
+			}
+		}
 #endif
 #if EVERY_ACCESS
-    printk( "BEFORE MY_DONE. . ." );
+		printk("BEFORE MY_DONE. . .");
 #endif
-    spin_lock_irqsave(shpnt->host_lock, flags);
-    my_done( shpnt,
-	     (current_SC->SCp.Status & 0xff)
-	     | ((current_SC->SCp.Message & 0xff) << 8) | (DID_OK << 16) );
-    spin_unlock_irqrestore(shpnt->host_lock, flags);
+		spin_lock_irqsave(shpnt->host_lock, flags);
+		my_done(shpnt, (current_SC->SCp.Status & 0xff)
+			| ((current_SC->SCp.Message & 0xff) << 8) | (DID_OK << 16));
+		spin_unlock_irqrestore(shpnt->host_lock, flags);
 #if EVERY_ACCESS
-    printk( "RETURNING.\n" );
+		printk("RETURNING.\n");
 #endif
-      
-  } else {
-    if (current_SC->SCp.phase & disconnect) {
-      outb( 0xd0 | FIFO_COUNT, Interrupt_Cntl_port );
-      outb( 0x00, SCSI_Cntl_port );
-    } else {
-      outb( 0x90 | FIFO_COUNT, Interrupt_Cntl_port );
-    }
-  }
+
+	} else {
+		if (current_SC->SCp.phase & disconnect) {
+			outb(0xd0 | FIFO_COUNT, Interrupt_Cntl_port);
+			outb(0x00, SCSI_Cntl_port);
+		} else {
+			outb(0x90 | FIFO_COUNT, Interrupt_Cntl_port);
+		}
+	}
 #if DEBUG_RACE
-  in_interrupt_flag = 0;
+	in_interrupt_flag = 0;
 #endif
-  return;
+	return;
 }
 
-int fd_mcs_release(struct Scsi_Host *shpnt)
+static int fd_mcs_release(struct Scsi_Host *shpnt)
 {
-  int i, this_host, irq_usage;
+	int i, this_host, irq_usage;
 
-  release_region(shpnt->io_port, shpnt->n_io_port);
+	release_region(shpnt->io_port, shpnt->n_io_port);
 
-  this_host = -1;
-  irq_usage = 0;
-  for (i = 0; i < found; i++) {
-    if (shpnt == hosts[i])
-      this_host = i;
-    if (shpnt->irq == hosts[i]->irq)
-      irq_usage++;
-  }
+	this_host = -1;
+	irq_usage = 0;
+	for (i = 0; i < found; i++) {
+		if (shpnt == hosts[i])
+			this_host = i;
+		if (shpnt->irq == hosts[i]->irq)
+			irq_usage++;
+	}
 
-  /* only for the last one */
-  if (1 == irq_usage)
-    free_irq(shpnt->irq, hosts);
+	/* only for the last one */
+	if (1 == irq_usage)
+		free_irq(shpnt->irq, hosts);
 
-  found--;
+	found--;
 
-  for (i = this_host; i < found; i++)
-    hosts[i] = hosts[i+1];
+	for (i = this_host; i < found; i++)
+		hosts[i] = hosts[i + 1];
 
-  hosts[found] = NULL;
+	hosts[found] = NULL;
 
-  return 0;
+	return 0;
 }
 
-int fd_mcs_queue( Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
+static int fd_mcs_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
 {
-  struct Scsi_Host *shpnt = SCpnt->host;
+	struct Scsi_Host *shpnt = SCpnt->host;
 
-  if (in_command) {
-    panic( "fd_mcs: fd_mcs_queue() NOT REENTRANT!\n" );
-  }
+	if (in_command) {
+		panic("fd_mcs: fd_mcs_queue() NOT REENTRANT!\n");
+	}
 #if EVERY_ACCESS
-  printk( "queue: target = %d cmnd = 0x%02x pieces = %d size = %u\n",
-	  SCpnt->target,
-	  *(unsigned char *)SCpnt->cmnd,
-	  SCpnt->use_sg,
-	  SCpnt->request_bufflen );
-#endif
-
-  fd_mcs_make_bus_idle(shpnt);
-
-  SCpnt->scsi_done = done;	/* Save this for the done function */
-  current_SC       = SCpnt;
-
-  /* Initialize static data */
-
-  if (current_SC->use_sg) {
-    current_SC->SCp.buffer =
-      (struct scatterlist *)current_SC->request_buffer;
-    current_SC->SCp.ptr              = current_SC->SCp.buffer->address;
-    current_SC->SCp.this_residual    = current_SC->SCp.buffer->length;
-    current_SC->SCp.buffers_residual = current_SC->use_sg - 1;
-  } else {
-    current_SC->SCp.ptr              = (char *)current_SC->request_buffer;
-    current_SC->SCp.this_residual    = current_SC->request_bufflen;
-    current_SC->SCp.buffer           = NULL;
-    current_SC->SCp.buffers_residual = 0;
-  }
-	 
-   
-  current_SC->SCp.Status              = 0;
-  current_SC->SCp.Message             = 0;
-  current_SC->SCp.have_data_in        = 0;
-  current_SC->SCp.sent_command        = 0;
-  current_SC->SCp.phase               = in_arbitration;
-
-  /* Start arbitration */
-  outb( 0x00, Interrupt_Cntl_port );
-  outb( 0x00, SCSI_Cntl_port );              /* Disable data drivers */
-  outb( adapter_mask, SCSI_Data_NoACK_port ); /* Set our id bit */
-  in_command = 1;
-  outb( 0x20, Interrupt_Cntl_port );
-  outb( 0x14 | PARITY_MASK, TMC_Cntl_port ); /* Start arbitration */
+	printk("queue: target = %d cmnd = 0x%02x pieces = %d size = %u\n", SCpnt->target, *(unsigned char *) SCpnt->cmnd, SCpnt->use_sg, SCpnt->request_bufflen);
+#endif
+
+	fd_mcs_make_bus_idle(shpnt);
 
-  return 0;
+	SCpnt->scsi_done = done;	/* Save this for the done function */
+	current_SC = SCpnt;
+
+	/* Initialize static data */
+
+	if (current_SC->use_sg) {
+		current_SC->SCp.buffer = (struct scatterlist *) current_SC->request_buffer;
+		current_SC->SCp.ptr = page_address(current_SC->SCp.buffer->page) + current_SC->SCp.buffer->offset;
+		current_SC->SCp.this_residual = current_SC->SCp.buffer->length;
+		current_SC->SCp.buffers_residual = current_SC->use_sg - 1;
+	} else {
+		current_SC->SCp.ptr = (char *) current_SC->request_buffer;
+		current_SC->SCp.this_residual = current_SC->request_bufflen;
+		current_SC->SCp.buffer = NULL;
+		current_SC->SCp.buffers_residual = 0;
+	}
+
+
+	current_SC->SCp.Status = 0;
+	current_SC->SCp.Message = 0;
+	current_SC->SCp.have_data_in = 0;
+	current_SC->SCp.sent_command = 0;
+	current_SC->SCp.phase = in_arbitration;
+
+	/* Start arbitration */
+	outb(0x00, Interrupt_Cntl_port);
+	outb(0x00, SCSI_Cntl_port);	/* Disable data drivers */
+	outb(adapter_mask, SCSI_Data_NoACK_port);	/* Set our id bit */
+	in_command = 1;
+	outb(0x20, Interrupt_Cntl_port);
+	outb(0x14 | PARITY_MASK, TMC_Cntl_port);	/* Start arbitration */
+
+	return 0;
 }
 
-static void internal_done( Scsi_Cmnd *SCpnt )
+static void internal_done(Scsi_Cmnd * SCpnt)
 {
-  /* flag it done */
-  SCpnt->host_scribble = (unsigned char *)1;
+	/* flag it done */
+	SCpnt->host_scribble = (unsigned char *) 1;
 }
 
-int fd_mcs_command( Scsi_Cmnd *SCpnt )
+int fd_mcs_command(Scsi_Cmnd * SCpnt)
 {
-  fd_mcs_queue( SCpnt, internal_done );
-  /* host_scribble is used for status here */
-  SCpnt->host_scribble = NULL;
-  while (!SCpnt->host_scribble)
-    barrier();
-  return SCpnt->result;
+	fd_mcs_queue(SCpnt, internal_done);
+	/* host_scribble is used for status here */
+	SCpnt->host_scribble = NULL;
+	while (!SCpnt->host_scribble) {
+		cpu_relax();
+		barrier();
+	}
+	return SCpnt->result;
 }
 
 #if DEBUG_ABORT || DEBUG_RESET
-static void fd_mcs_print_info( Scsi_Cmnd *SCpnt )
+static void fd_mcs_print_info(Scsi_Cmnd * SCpnt)
 {
-  unsigned int imr;
-  unsigned int irr;
-  unsigned int isr;
-  struct Scsi_Host *shpnt = SCpnt->host;
-
-  if (!SCpnt || !SCpnt->host) {
-    printk( "fd_mcs: cannot provide detailed information\n" );
-  }
-   
-  printk( "%s\n", fd_mcs_info( SCpnt->host ) );
-  print_banner( SCpnt->host );
-  switch (SCpnt->SCp.phase) {
-  case in_arbitration: printk( "arbitration " ); break;
-  case in_selection:   printk( "selection " );   break;
-  case in_other:       printk( "other " );       break;
-  default:             printk( "unknown " );     break;
-  }
-
-  printk( "(%d), target = %d cmnd = 0x%02x pieces = %d size = %u\n",
-	  SCpnt->SCp.phase,
-	  SCpnt->target,
-	  *(unsigned char *)SCpnt->cmnd,
-	  SCpnt->use_sg,
-	  SCpnt->request_bufflen );
-  printk( "sent_command = %d, have_data_in = %d, timeout = %d\n",
-	  SCpnt->SCp.sent_command,
-	  SCpnt->SCp.have_data_in,
-	  SCpnt->timeout );
+	unsigned int imr;
+	unsigned int irr;
+	unsigned int isr;
+	struct Scsi_Host *shpnt = SCpnt->host;
+
+	if (!SCpnt || !SCpnt->host) {
+		printk("fd_mcs: cannot provide detailed information\n");
+	}
+
+	printk("%s\n", fd_mcs_info(SCpnt->host));
+	print_banner(SCpnt->host);
+	switch (SCpnt->SCp.phase) {
+	case in_arbitration:
+		printk("arbitration ");
+		break;
+	case in_selection:
+		printk("selection ");
+		break;
+	case in_other:
+		printk("other ");
+		break;
+	default:
+		printk("unknown ");
+		break;
+	}
+
+	printk("(%d), target = %d cmnd = 0x%02x pieces = %d size = %u\n", SCpnt->SCp.phase, SCpnt->target, *(unsigned char *) SCpnt->cmnd, SCpnt->use_sg, SCpnt->request_bufflen);
+	printk("sent_command = %d, have_data_in = %d, timeout = %d\n", SCpnt->SCp.sent_command, SCpnt->SCp.have_data_in, SCpnt->timeout);
 #if DEBUG_RACE
-  printk( "in_interrupt_flag = %d\n", in_interrupt_flag );
+	printk("in_interrupt_flag = %d\n", in_interrupt_flag);
 #endif
 
-  imr = (inb( 0x0a1 ) << 8) + inb( 0x21 );
-  outb( 0x0a, 0xa0 );
-  irr = inb( 0xa0 ) << 8;
-  outb( 0x0a, 0x20 );
-  irr += inb( 0x20 );
-  outb( 0x0b, 0xa0 );
-  isr = inb( 0xa0 ) << 8;
-  outb( 0x0b, 0x20 );
-  isr += inb( 0x20 );
-
-  /* Print out interesting information */
-  printk( "IMR = 0x%04x", imr );
-  if (imr & (1 << shpnt->irq))
-    printk( " (masked)" );
-  printk( ", IRR = 0x%04x, ISR = 0x%04x\n", irr, isr );
-
-  printk( "SCSI Status      = 0x%02x\n", inb( SCSI_Status_port ) );
-  printk( "TMC Status       = 0x%02x", inb( TMC_Status_port ) );
-  if (inb( TMC_Status_port ) & 1)
-    printk( " (interrupt)" );
-  printk( "\n" );
-  printk( "Interrupt Status = 0x%02x", inb( Interrupt_Status_port ) );
-  if (inb( Interrupt_Status_port ) & 0x08)
-    printk( " (enabled)" );
-  printk( "\n" );
-  if (chip == tmc18c50 || chip == tmc18c30) {
-    printk( "FIFO Status      = 0x%02x\n", inb( shpnt->io_port + FIFO_Status ) );
-    printk( "Int. Condition   = 0x%02x\n",
-	    inb( shpnt->io_port + Interrupt_Cond ) );
-  }
-  printk( "Configuration 1  = 0x%02x\n", inb( shpnt->io_port + Configuration1 ) );
-  if (chip == tmc18c50 || chip == tmc18c30)
-    printk( "Configuration 2  = 0x%02x\n",
-	    inb( shpnt->io_port + Configuration2 ) );
+	imr = (inb(0x0a1) << 8) + inb(0x21);
+	outb(0x0a, 0xa0);
+	irr = inb(0xa0) << 8;
+	outb(0x0a, 0x20);
+	irr += inb(0x20);
+	outb(0x0b, 0xa0);
+	isr = inb(0xa0) << 8;
+	outb(0x0b, 0x20);
+	isr += inb(0x20);
+
+	/* Print out interesting information */
+	printk("IMR = 0x%04x", imr);
+	if (imr & (1 << shpnt->irq))
+		printk(" (masked)");
+	printk(", IRR = 0x%04x, ISR = 0x%04x\n", irr, isr);
+
+	printk("SCSI Status      = 0x%02x\n", inb(SCSI_Status_port));
+	printk("TMC Status       = 0x%02x", inb(TMC_Status_port));
+	if (inb(TMC_Status_port) & 1)
+		printk(" (interrupt)");
+	printk("\n");
+	printk("Interrupt Status = 0x%02x", inb(Interrupt_Status_port));
+	if (inb(Interrupt_Status_port) & 0x08)
+		printk(" (enabled)");
+	printk("\n");
+	if (chip == tmc18c50 || chip == tmc18c30) {
+		printk("FIFO Status      = 0x%02x\n", inb(shpnt->io_port + FIFO_Status));
+		printk("Int. Condition   = 0x%02x\n", inb(shpnt->io_port + Interrupt_Cond));
+	}
+	printk("Configuration 1  = 0x%02x\n", inb(shpnt->io_port + Configuration1));
+	if (chip == tmc18c50 || chip == tmc18c30)
+		printk("Configuration 2  = 0x%02x\n", inb(shpnt->io_port + Configuration2));
 }
 #endif
 
-int fd_mcs_abort( Scsi_Cmnd *SCpnt)
+static int fd_mcs_abort(Scsi_Cmnd * SCpnt)
 {
-  struct Scsi_Host *shpnt = SCpnt->host;
+	struct Scsi_Host *shpnt = SCpnt->host;
 
-  unsigned long flags;
+	unsigned long flags;
 #if EVERY_ACCESS || ERRORS_ONLY || DEBUG_ABORT
-  printk( "fd_mcs: abort " );
+	printk("fd_mcs: abort ");
 #endif
 
-  save_flags( flags );
-  cli();
-  if (!in_command) {
+	spin_lock_irqsave(shpnt->host_lock, flags);
+	if (!in_command) {
 #if EVERY_ACCESS || ERRORS_ONLY
-    printk( " (not in command)\n" );
+		printk(" (not in command)\n");
 #endif
-    restore_flags( flags );
-    return SCSI_ABORT_NOT_RUNNING;
-  } else printk( "\n" );
+		spin_unlock_irqrestore(shpnt->host_lock, flags);
+		return FAILED;
+	} else
+		printk("\n");
 
 #if DEBUG_ABORT
-  fd_mcs_print_info( SCpnt );
+	fd_mcs_print_info(SCpnt);
 #endif
 
-  fd_mcs_make_bus_idle(shpnt);
+	fd_mcs_make_bus_idle(shpnt);
 
-  current_SC->SCp.phase |= aborted;
+	current_SC->SCp.phase |= aborted;
 
-  current_SC->result = DID_ABORT << 16;
+	current_SC->result = DID_ABORT << 16;
 
-  restore_flags( flags );
-   
-  /* Aborts are not done well. . . */
-  spin_lock_irqsave(shpnt->host_lock, flags);
-  my_done( shpnt, DID_ABORT << 16 );
-  spin_unlock_irqrestore(shpnt->host_lock, flags);
+	/* Aborts are not done well. . . */
+	my_done(shpnt, DID_ABORT << 16);
 
-  return SCSI_ABORT_SUCCESS;
+	spin_unlock_irqrestore(shpnt->host_lock, flags);
+	return SUCCESS;
 }
 
-int fd_mcs_reset( Scsi_Cmnd *SCpnt, unsigned int reset_flags )
+static int fd_mcs_host_reset(Scsi_Cmnd * SCpnt)
 {
-  struct Scsi_Host *shpnt = SCpnt->host;
+	return FAILED;
+}
+
+static int fd_mcs_device_reset(Scsi_Cmnd * SCpnt) {
+		return FAILED;
+	}
+
+	static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) {
+		struct Scsi_Host *shpnt = SCpnt->host;
+		unsigned long flags;
 
 #if DEBUG_RESET
-  static int called_once = 0;
+		static int called_once = 0;
 #endif
 
 #if ERRORS_ONLY
-  if (SCpnt) printk( "fd_mcs: SCSI Bus Reset\n" );
+		if (SCpnt)
+			printk("fd_mcs: SCSI Bus Reset\n");
 #endif
 
 #if DEBUG_RESET
-  if (called_once) fd_mcs_print_info( current_SC );
-  called_once = 1;
-#endif
-   
-  outb( 1, SCSI_Cntl_port );
-  do_pause( 2 );
-  outb( 0, SCSI_Cntl_port );
-  do_pause( 115 );
-  outb( 0, SCSI_Mode_Cntl_port );
-  outb( PARITY_MASK, TMC_Cntl_port );
-
-  /* Unless this is the very first call (i.e., SCPnt == NULL), everything
-     is probably hosed at this point.  We will, however, try to keep
-     things going by informing the high-level code that we need help. */
+		if (called_once)
+			fd_mcs_print_info(current_SC);
+		called_once = 1;
+#endif
+
+		spin_lock_irqsave(shpnt->host_lock, flags);
+
+		outb(1, SCSI_Cntl_port);
+		do_pause(2);
+		outb(0, SCSI_Cntl_port);
+		do_pause(115);
+		outb(0, SCSI_Mode_Cntl_port);
+		outb(PARITY_MASK, TMC_Cntl_port);
+
+		/* Unless this is the very first call (i.e., SCPnt == NULL), everything
+		   is probably hosed at this point.  We will, however, try to keep
+		   things going by informing the high-level code that we need help. */
 
-  return SCSI_RESET_WAKEUP;
-}
+		spin_unlock_irqrestore(shpnt->host_lock, flags);
+		return SUCCESS;
+	}
 
-#include "sd.h"
 #include <scsi/scsi_ioctl.h>
 
-int fd_mcs_biosparam( Scsi_Disk *disk, struct block_device *bdev, int *info_array )
-{
-  unsigned char    buf[512 + sizeof( int ) * 2];
-  int		    size      = disk->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->device,
-			       SCSI_IOCTL_SEND_COMMAND,
-			       (void *)buf );
-  if (!retcode				    /* SCSI command ok */
-      && data[511] == 0xaa && data[510] == 0x55 /* Partition table valid */
-      && data[0x1c2]) {			    /* Partition type */
-
-    /* The partition table layout is as follows:
-
-	 Start: 0x1b3h
-	 Offset: 0 = partition status
-	 1 = starting head
-	 2 = starting sector and cylinder (word, encoded)
-	 4 = partition type
-	 5 = ending head
-	 6 = ending sector and cylinder (word, encoded)
-	 8 = starting absolute sector (double word)
-	 c = number of sectors (double word)
-	 Signature: 0x1fe = 0x55aa
-
-	 So, this algorithm assumes:
-	 1) the first partition table is in use,
-	 2) the data in the first entry is correct, and
-	 3) partitions never divide cylinders
-
-	 Note that (1) may be FALSE for NetBSD (and other BSD flavors),
-	 as well as for Linux.  Note also, that Linux doesn't pay any
-	 attention to the fields that are used by this algorithm -- it
-	 only uses the absolute sector data.  Recent versions of Linux's
-	 fdisk(1) will fill this data in correctly, and forthcoming
-	 versions will check for consistency.
-
-	 Checking for a non-zero partition type is not part of the
-	 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 */
-  } else {
-
-    /* Note that this new method guarantees that there will always be
-	 less than 1024 cylinders on a platter.  This is good for drives
-	 up to approximately 7.85GB (where 1GB = 1024 * 1024 kB). */
-
-    if ((unsigned int)size >= 0x7e0000U) {
-      info_array[0] = 0xff; /* heads   = 255 */
-      info_array[1] = 0x3f; /* sectors =  63 */
-    } else if ((unsigned int)size >= 0x200000U) {
-      info_array[0] = 0x80; /* heads   = 128 */
-      info_array[1] = 0x3f; /* sectors =  63 */
-    } else {
-      info_array[0] = 0x40; /* heads   =  64 */
-      info_array[1] = 0x20; /* sectors =  32 */
-    }
-  }
-  /* For both methods, compute the cylinders */
-  info_array[2] = (unsigned int)size / (info_array[0] * info_array[1] );
-
-   
-  return 0;
-}
+	static int fd_mcs_biosparam(Scsi_Disk * disk, struct block_device *bdev,
+				    sector_t capacity, int *info_array) {
+		unsigned char buf[512 + sizeof(int) * 2];
+		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->device, SCSI_IOCTL_SEND_COMMAND, (void *) buf);
+		if (!retcode	/* SCSI command ok */
+		    && data[511] == 0xaa && data[510] == 0x55	/* Partition table valid */
+		    && data[0x1c2]) {	/* Partition type */
+
+			/* The partition table layout is as follows:
+
+			   Start: 0x1b3h
+			   Offset: 0 = partition status
+			   1 = starting head
+			   2 = starting sector and cylinder (word, encoded)
+			   4 = partition type
+			   5 = ending head
+			   6 = ending sector and cylinder (word, encoded)
+			   8 = starting absolute sector (double word)
+			   c = number of sectors (double word)
+			   Signature: 0x1fe = 0x55aa
+
+			   So, this algorithm assumes:
+			   1) the first partition table is in use,
+			   2) the data in the first entry is correct, and
+			   3) partitions never divide cylinders
+
+			   Note that (1) may be FALSE for NetBSD (and other BSD flavors),
+			   as well as for Linux.  Note also, that Linux doesn't pay any
+			   attention to the fields that are used by this algorithm -- it
+			   only uses the absolute sector data.  Recent versions of Linux's
+			   fdisk(1) will fill this data in correctly, and forthcoming
+			   versions will check for consistency.
+
+			   Checking for a non-zero partition type is not part of the
+			   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 */
+		} else {
+
+			/* Note that this new method guarantees that there will always be
+			   less than 1024 cylinders on a platter.  This is good for drives
+			   up to approximately 7.85GB (where 1GB = 1024 * 1024 kB). */
+
+			if ((unsigned int) size >= 0x7e0000U) {
+				info_array[0] = 0xff;	/* heads   = 255 */
+				info_array[1] = 0x3f;	/* sectors =  63 */
+			} else if ((unsigned int) size >= 0x200000U) {
+				info_array[0] = 0x80;	/* heads   = 128 */
+				info_array[1] = 0x3f;	/* sectors =  63 */
+			} else {
+				info_array[0] = 0x40;	/* heads   =  64 */
+				info_array[1] = 0x20;	/* sectors =  32 */
+			}
+		}
+		/* For both methods, compute the cylinders */
+		info_array[2] = (unsigned int) size / (info_array[0] * info_array[1]);
 
 /* Eventually this will go into an include file, but this will be later */
-static Scsi_Host_Template driver_template = FD_MCS;
+	static Scsi_Host_Template driver_template = FD_MCS;
 
 #include "scsi_module.c"
diff -Nru a/drivers/scsi/fd_mcs.h b/drivers/scsi/fd_mcs.h
--- a/drivers/scsi/fd_mcs.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/scsi/fd_mcs.h	Wed Oct 30 16:44:24 2002
@@ -22,31 +22,37 @@
 #ifndef _FD_MCS_H
 #define _FD_MCS_H
 
-extern int fd_mcs_detect( Scsi_Host_Template * );
-extern int fd_mcs_release( struct Scsi_Host * );
-extern int fd_mcs_command( Scsi_Cmnd * );
-extern int fd_mcs_abort( Scsi_Cmnd * );
-extern int fd_mcs_reset( Scsi_Cmnd *, unsigned int );
-extern int fd_mcs_queue( Scsi_Cmnd *, void (*done)(Scsi_Cmnd *) );
-extern int fd_mcs_biosparam( Disk *, struct block_device *, int * );
-extern int fd_mcs_proc_info( char *, char **, off_t, int, int, int );
-extern const char *fd_mcs_info(struct Scsi_Host *);
+static int fd_mcs_detect(Scsi_Host_Template *);
+static int fd_mcs_release(struct Scsi_Host *);
+static int fd_mcs_command(Scsi_Cmnd *);
+static int fd_mcs_abort(Scsi_Cmnd *);
+static int fd_mcs_bus_reset(Scsi_Cmnd *);
+static int fd_mcs_device_reset(Scsi_Cmnd *);
+static int fd_mcs_host_reset(Scsi_Cmnd *);
+static int fd_mcs_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
+static int fd_mcs_biosparam(Disk *, struct block_device *,
+			    sector_t, int *);
+static int fd_mcs_proc_info(char *, char **, off_t, int, int, int);
+static const char *fd_mcs_info(struct Scsi_Host *);
 
 #define FD_MCS {\
-                    proc_name:      "fd_mcs",                   \
-                    proc_info:      fd_mcs_proc_info,           \
-		    detect:         fd_mcs_detect,              \
-		    release:        fd_mcs_release,             \
-		    info:           fd_mcs_info,                \
-		    command:        fd_mcs_command,             \
-		    queuecommand:   fd_mcs_queue,               \
-		    abort:          fd_mcs_abort,               \
-		    reset:          fd_mcs_reset,               \
-		    bios_param:     fd_mcs_biosparam,           \
-		    can_queue:      1, 				\
-		    this_id:        7, 				\
-		    sg_tablesize:   64, 			\
-		    cmd_per_lun:    1, 				\
-		    use_clustering: DISABLE_CLUSTERING }
+                    proc_name:			"fd_mcs",		\
+                    proc_info:			fd_mcs_proc_info,	\
+		    detect:			fd_mcs_detect,		\
+		    release:			fd_mcs_release,		\
+		    info:			fd_mcs_info,		\
+		    command:			fd_mcs_command,		\
+		    queuecommand:   		fd_mcs_queue,           \
+		    eh_abort_handler:		fd_mcs_abort,           \
+		    eh_bus_reset_handler:	fd_mcs_bus_reset,       \
+		    eh_host_reset_handler:	fd_mcs_host_reset,      \
+		    eh_device_reset_handler:	fd_mcs_device_reset,    \
+		    bios_param:     		fd_mcs_biosparam,       \
+		    can_queue:      		1, 			\
+		    this_id:        		7, 			\
+		    sg_tablesize:   		64, 			\
+		    cmd_per_lun:    		1, 			\
+		    use_clustering: 		DISABLE_CLUSTERING	\
+		}
 
-#endif /* _FD_MCS_H */
+#endif				/* _FD_MCS_H */
diff -Nru a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
--- a/drivers/scsi/fdomain.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/fdomain.c	Wed Oct 30 16:44:30 2002
@@ -1690,15 +1690,16 @@
   return FAILED;
 }
 
-#include "sd.h"
 #include <scsi/scsi_ioctl.h>
 
-static int fdomain_16x0_biosparam(Scsi_Disk *disk, struct block_device *bdev, int *info_array)
+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      = disk->capacity;
+   int		    size      = capacity;
    unsigned char    *data     = sic->data;
    unsigned char    do_read[] = { READ_6, 0, 0, 0, 1, 0 };
    int              retcode;
@@ -1793,7 +1794,7 @@
       sic->inlen  = 0;		/* zero bytes out */
       sic->outlen = 512;		/* one sector in */
       memcpy( data, do_read, sizeof( do_read ) );
-      retcode = kernel_scsi_ioctl( disk->device,
+      retcode = kernel_scsi_ioctl( sdev,
 				   SCSI_IOCTL_SEND_COMMAND,
 				   sic );
       if (!retcode				    /* SCSI command ok */
diff -Nru a/drivers/scsi/fdomain.h b/drivers/scsi/fdomain.h
--- a/drivers/scsi/fdomain.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/fdomain.h	Wed Oct 30 16:44:26 2002
@@ -33,7 +33,8 @@
 static int        fdomain_16x0_host_reset(Scsi_Cmnd *); 
 static int        fdomain_16x0_device_reset(Scsi_Cmnd *); 
 static int        fdomain_16x0_queue(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-static int        fdomain_16x0_biosparam(Disk *, struct block_device *, int * );
+static int        fdomain_16x0_biosparam(struct scsi_device *,
+		struct block_device *, sector_t, int * );
 static int        fdomain_16x0_proc_info(char *buffer, char **start, off_t offset,
 				   int length, int hostno, int inout );
 static int        fdomain_16x0_release(struct Scsi_Host *shpnt);
diff -Nru a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
--- a/drivers/scsi/g_NCR5380.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/scsi/g_NCR5380.c	Wed Oct 30 16:44:24 2002
@@ -100,12 +100,6 @@
 #define NCR5380_STATS
 #undef NCR5380_STAT_LIMIT
 #endif
-#if defined(CONFIG_SCSI_G_NCR5380_PORT) && defined(CONFIG_SCSI_G_NCR5380_MEM)
-#error You can not configure the Generic NCR 5380 SCSI Driver for memory mapped I/O and port mapped I/O at the same time (yet)
-#endif
-#if !defined(CONFIG_SCSI_G_NCR5380_PORT) && !defined(CONFIG_SCSI_G_NCR5380_MEM)
-#error You must configure the Generic NCR 5380 SCSI Driver for one of memory mapped I/O and port mapped I/O.
-#endif
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -116,11 +110,11 @@
 #include "hosts.h"
 #include "g_NCR5380.h"
 #include "NCR5380.h"
-#include "sd.h"
 #include <linux/stat.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/isapnp.h>
+#include <linux/delay.h>
 
 #define NCR_NOT_SET 0
 static int ncr_irq = NCR_NOT_SET;
@@ -143,8 +137,11 @@
 [1] __initdata = { { 0,},};
 #endif
 
+
 #define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
 
+#ifndef MODULE 
+
 /**
  *	internal_setup		-	handle lilo command string override
  *	@board:	BOARD_* identifier for the board
@@ -199,6 +196,7 @@
 	}
 }
 
+
 /**
  * 	do_NCR53C80_setup		-	set up entry point
  *	@str: unused
@@ -270,6 +268,8 @@
 	return 1;
 }
 
+#endif
+
 /**
  * 	generic_NCR5380_detect	-	look for NCR5380 controllers
  *	@tpnt: the scsi template
@@ -367,7 +367,7 @@
 			break;
 		}
 
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		if (ports) {
 			/* wakeup sequence for the NCR53C400A and DTC3181E */
 
@@ -412,7 +412,7 @@
 #endif
 		instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata));
 		if (instance == NULL) {
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 			release_region(overrides[current_override].NCR5380_map_name, NCR5380_region_size);
 #else
 			release_mem_region(overrides[current_override].NCR5380_map_name, NCR5380_region_size);
@@ -430,7 +430,7 @@
 			instance->irq = NCR5380_probe_irq(instance, 0xffff);
 
 		if (instance->irq != IRQ_NONE)
-			if (request_irq(instance->irq, do_generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", NULL)) {
+			if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", NULL)) {
 				printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
 				instance->irq = IRQ_NONE;
 			}
@@ -482,7 +482,7 @@
 	NCR5380_local_declare();
 	NCR5380_setup(instance);
 
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 	release_region(instance->NCR5380_instance_name, NCR5380_region_size);
 #else
 	release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size);
@@ -512,12 +512,12 @@
  *	Locks: none
  */
 
-int generic_NCR5380_biosparam(Disk * disk, struct block_device *dev, int *ip)
+int generic_NCR5380_biosparam(struct scsi_device *sdev,
+		struct block_device *bdev, sector_t capacity, int *ip)
 {
-	int size = disk->capacity;
 	ip[0] = 64;
 	ip[1] = 32;
-	ip[2] = size >> 11;
+	ip[2] = capacity >> 11;
 	return 0;
 }
 #endif
@@ -555,7 +555,7 @@
 		}
 		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY);
 
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			int i;
 			for (i = 0; i < 128; i++)
@@ -575,7 +575,7 @@
 			// FIXME - no timeout
 		}
 
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			int i;	
 			for (i = 0; i < 128; i++)
@@ -641,7 +641,7 @@
 		}
 		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY)
 			; // FIXME - timeout
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			for (i = 0; i < 128; i++)
 				NCR5380_write(C400_HOST_BUFFER, src[start + i]);
@@ -657,7 +657,7 @@
 		while (NCR5380_read(C400_CONTROL_STATUS_REG) & CSR_HOST_BUF_NOT_RDY)
 			; // FIXME - no timeout
 
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 		{
 			for (i = 0; i < 128; i++)
 				NCR5380_write(C400_HOST_BUFFER, src[start + i]);
@@ -781,9 +781,8 @@
 #endif
 
 	/* For now this is constant so we may walk it */
-	for (scsi_ptr = first_instance; scsi_ptr; scsi_ptr = scsi_ptr->next)
-		if (scsi_ptr->host_no == hostno)
-			break;
+	scsi_ptr = scsi_host_hn_get(hostno);
+	
 	NCR5380_setup(scsi_ptr);
 	hostdata = (struct NCR5380_hostdata *) scsi_ptr->hostdata;
 
diff -Nru a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
--- a/drivers/scsi/g_NCR5380.h	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/g_NCR5380.h	Wed Oct 30 16:44:19 2002
@@ -44,25 +44,18 @@
 #endif
 
 #ifndef ASM
-int generic_NCR5380_abort(Scsi_Cmnd *);
-int generic_NCR5380_detect(Scsi_Host_Template *);
-int generic_NCR5380_release_resources(struct Scsi_Host *);
-int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int generic_NCR5380_bus_reset(Scsi_Cmnd *);
-int generic_NCR5380_host_reset(Scsi_Cmnd *);
-int generic_NCR5380_device_reset(Scsi_Cmnd *);
-int notyet_generic_proc_info (char *buffer ,char **start, off_t offset,
+static int generic_NCR5380_abort(Scsi_Cmnd *);
+static int generic_NCR5380_detect(Scsi_Host_Template *);
+static int generic_NCR5380_release_resources(struct Scsi_Host *);
+static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+static int generic_NCR5380_bus_reset(Scsi_Cmnd *);
+static int generic_NCR5380_host_reset(Scsi_Cmnd *);
+static int generic_NCR5380_device_reset(Scsi_Cmnd *);
+static int notyet_generic_proc_info (char *buffer ,char **start, off_t offset,
                      int length, int hostno, int inout);
-const char* generic_NCR5380_info(struct Scsi_Host *);
-#ifdef BIOSPARAM
-int generic_NCR5380_biosparam(Disk *, struct block_device *, int *);
-#endif
-
-int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int length, int hostno, int inout);
-
-#ifndef NULL
-#define NULL 0
-#endif
+static const char* generic_NCR5380_info(struct Scsi_Host *);
+static int generic_NCR5380_biosparam(Disk *, struct block_device *, sector_t, int *);
+static int generic_NCR5380_proc_info(char* buffer, char** start, off_t offset, int length, int hostno, int inout);
 
 #ifndef CMD_PER_LUN
 #define CMD_PER_LUN 2
@@ -95,18 +88,13 @@
 #define __STRVAL(x) #x
 #define STRVAL(x) __STRVAL(x)
 
-#ifdef CONFIG_SCSI_G_NCR5380_PORT
+#ifndef CONFIG_SCSI_G_NCR5380_MEM
 
 #define NCR5380_map_config port
-
 #define NCR5380_map_type int
-
 #define NCR5380_map_name port
-
 #define NCR5380_instance_name io_port
-
 #define NCR53C400_register_offset 0
-
 #define NCR53C400_address_adjust 8
 
 #ifdef NCR53C400
@@ -122,27 +110,17 @@
 /* therefore CONFIG_SCSI_G_NCR5380_MEM */
 
 #define NCR5380_map_config memory
-
 #define NCR5380_map_type unsigned long
-
 #define NCR5380_map_name base
-
 #define NCR5380_instance_name base
-
 #define NCR53C400_register_offset 0x108
-
 #define NCR53C400_address_adjust 0
-
 #define NCR53C400_mem_base 0x3880
-
 #define NCR53C400_host_buffer 0x3900
-
 #define NCR5380_region_size 0x3a00
 
-
 #define NCR5380_read(reg) isa_readb(NCR5380_map_name + NCR53C400_mem_base + (reg))
 #define NCR5380_write(reg, value) isa_writeb(NCR5380_map_name + NCR53C400_mem_base + (reg), value)
-
 #endif
 
 #define NCR5380_implementation_fields \
@@ -155,7 +133,6 @@
     NCR5380_map_name = (NCR5380_map_type)((instance)->NCR5380_instance_name)
 
 #define NCR5380_intr generic_NCR5380_intr
-#define do_NCR5380_intr do_generic_NCR5380_intr
 #define NCR5380_queue_command generic_NCR5380_queue_command
 #define NCR5380_abort generic_NCR5380_abort
 #define NCR5380_bus_reset generic_NCR5380_bus_reset
diff -Nru a/drivers/scsi/g_NCR5380_mmio.c b/drivers/scsi/g_NCR5380_mmio.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/g_NCR5380_mmio.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,10 @@
+/*
+ *	There is probably a nicer way to do this but this one makes
+ *	pretty obvious what is happening. We rebuild the same file with
+ *	different options for mmio versus pio.
+ */
+
+#define SCSI_G_NCR5380_MEM
+
+#include "g_NCR5380.c"
+
diff -Nru a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/gdth.c	Wed Oct 30 16:44:29 2002
@@ -337,7 +337,6 @@
 #endif
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include "gdth.h"
 
@@ -4512,26 +4511,27 @@
 }
 #endif
 
-int gdth_bios_param(Disk *disk,struct block_device *bdev,int *ip)
+int gdth_bios_param(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *ip)
 {
     unchar b, t;
     int hanum;
     gdth_ha_str *ha;
 
-    hanum = NUMDATA(disk->device->host)->hanum;
-    b = virt_ctr ? NUMDATA(disk->device->host)->busnum : disk->device->channel;
-    t = disk->device->id;
+    hanum = NUMDATA(sdev->host)->hanum;
+    b = virt_ctr ? NUMDATA(sdev->host)->busnum : sdev->channel;
+    t = sdev->id;
     TRACE2(("gdth_bios_param() ha %d bus %d target %d\n", hanum, b, t)); 
     ha = HADATA(gdth_ctr_tab[hanum]);
 
     if (b != ha->virt_bus || ha->hdr[t].heads == 0) {
         /* raw device or host drive without mapping information */
         TRACE2(("Evaluate mapping\n"));
-        gdth_eval_mapping(disk->capacity,&ip[2],&ip[0],&ip[1]);
+        gdth_eval_mapping(capacity,&ip[2],&ip[0],&ip[1]);
     } else {
         ip[0] = ha->hdr[t].heads;
         ip[1] = ha->hdr[t].secs;
-        ip[2] = disk->capacity / ip[0] / ip[1];
+        ip[2] = capacity / ip[0] / ip[1];
     }
 
     TRACE2(("gdth_bios_param(): %d heads, %d secs, %d cyls\n",
diff -Nru a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h
--- a/drivers/scsi/gdth.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/gdth.h	Wed Oct 30 16:44:27 2002
@@ -1031,7 +1031,7 @@
 #endif
 const char *gdth_info(struct Scsi_Host *);
 
-int gdth_bios_param(Disk *,struct block_device *,int *);
+int gdth_bios_param(struct scsi_device *,struct block_device *,sector_t,int *);
 int gdth_proc_info(char *,char **,off_t,int,int,int);
 int gdth_eh_abort(Scsi_Cmnd *scp);
 int gdth_eh_device_reset(Scsi_Cmnd *scp);
diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
--- a/drivers/scsi/hosts.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/hosts.c	Wed Oct 30 16:44:19 2002
@@ -91,8 +91,8 @@
  * @shost: 
  * 
  * Description:
- * 	This is the default case for the release function.  It should do
- * 	the right thing for most correctly written host adapters.
+ * 	This is the default case for the release function.  Its completely
+ *	useless for anything but old ISA adapters
  **/
 static void scsi_host_generic_release(struct Scsi_Host *shost)
 {
@@ -390,8 +390,9 @@
 	 */
 	shost->max_cmd_len = 12;
 	shost->hostt = shost_tp;
-	shost->host_blocked = FALSE;
+	shost->host_blocked = 0;
 	shost->host_self_blocked = FALSE;
+	shost->max_host_blocked = shost_tp->max_host_blocked ? shost_tp->max_host_blocked : SCSI_DEFAULT_HOST_BLOCKED;
 
 #ifdef DEBUG
 	printk("%s: %x %x: %d\n", __FUNCTION_ (int)shost,
@@ -561,25 +562,18 @@
 			shost = list_entry(lh, struct Scsi_Host, sh_list);
 			for (sdev = shost->host_queue; sdev; sdev = sdev->next)
 				if (sdev->host->hostt == shost_tp) {
+					scsi_build_commandblocks(sdev);
+					if (sdev->current_queue_depth == 0)
+						goto out_of_space;
 					for (sdev_tp = scsi_devicelist;
 					     sdev_tp;
 					     sdev_tp = sdev_tp->next)
 						if (sdev_tp->attach)
 							(*sdev_tp->attach) (sdev);
-					if (sdev->attached) {
-						scsi_build_commandblocks(sdev);
-						if (sdev->current_queue_depth == 0)
-							goto out_of_space;
+					if (!sdev->attached) {
+                                                scsi_release_commandblocks(sdev);
 					}
 				}
-		}
-
-		/* This does any final handling that is required. */
-		for (sdev_tp = scsi_devicelist; sdev_tp;
-		     sdev_tp = sdev_tp->next) {
-			if (sdev_tp->finish && sdev_tp->nr_dev) {
-				(*sdev_tp->finish) ();
-			}
 		}
 	}
 
diff -Nru a/drivers/scsi/hosts.h b/drivers/scsi/hosts.h
--- a/drivers/scsi/hosts.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/hosts.h	Wed Oct 30 16:44:27 2002
@@ -26,6 +26,7 @@
 
 #include <linux/config.h>
 #include <linux/proc_fs.h>
+#include <linux/types.h>
 #include <linux/pci.h>
 
 /* It is senseless to set SG_ALL any higher than this - the performance
@@ -141,9 +142,31 @@
      * Host number is the POSITION IN THE hosts array of THIS
      * host adapter.
      *
-     * The done() function must only be called after QueueCommand() 
-     * has returned.
-     */
+     * if queuecommand returns 0, then the HBA has accepted the
+     * command.  The done() function must be called on the command
+     * when the driver has finished with it. (you may call done on the
+     * command before queuecommand returns, but in this case you
+     * *must* return 0 from queuecommand).
+     *
+     * queuecommand may also reject the command, in which case it may
+     * not touch the command and must not call done() for it.
+     *
+     * There are two possible rejection returns:
+     *
+     *   SCSI_MLQUEUE_DEVICE_BUSY: Block this device temporarily, but
+     *   allow commands to other devices serviced by this host.
+     *
+     *   SCSI_MLQUEUE_HOST_BUSY: Block all devices served by this
+     *   host temporarily.
+     *
+     *   for compatibility, any other non-zero return is treated the
+     *   same as SCSI_MLQUEUE_HOST_BUSY.
+     *
+     *   NOTE: "temporarily" means either until the next command for
+     *   this device/host completes, or a period of time determined by
+     *   I/O pressure in the system if there are no other outstanding
+     *   commands.
+     * */
     int (* queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 
     /*
@@ -168,40 +191,6 @@
      int (*eh_host_reset_handler)(Scsi_Cmnd *);
 
     /*
-     * Since the mid level driver handles time outs, etc, we want to
-     * be able to abort the current command.  Abort returns 0 if the
-     * abortion was successful.	 The field SCpnt->abort reason
-     * can be filled in with the appropriate reason why we wanted
-     * the abort in the first place, and this will be used
-     * in the mid-level code instead of the host_byte().
-     * If non-zero, the code passed to it
-     * will be used as the return code, otherwise
-     * DID_ABORT  should be returned.
-     *
-     * Note that the scsi driver should "clean up" after itself,
-     * resetting the bus, etc.	if necessary.
-     *
-     * NOTE - this interface is depreciated, and will go away.  Use
-     * the eh_ routines instead.
-     */
-    int (* abort)(Scsi_Cmnd *);
-
-    /*
-     * The reset function will reset the SCSI bus.  Any executing
-     * commands should fail with a DID_RESET in the host byte.
-     * The Scsi_Cmnd  is passed so that the reset routine can figure
-     * out which host adapter should be reset, and also which command
-     * within the command block was responsible for the reset in
-     * the first place.	 Some hosts do not implement a reset function,
-     * and these hosts must call scsi_request_sense(SCpnt) to keep
-     * the command alive.
-     *
-     * NOTE - this interface is depreciated, and will go away.  Use
-     * the eh_ routines instead.
-     */
-    int (* reset)(Scsi_Cmnd *, unsigned int);
-
-    /*
      * Once the device has responded to an INQUIRY and we know the device
      * is online, call into the low level driver with the Scsi_Device *
      * (so that the low level driver may save it off in a safe location
@@ -262,7 +251,8 @@
      * the host adapter.  Parameters:
      * size, device, list (heads, sectors, cylinders)
      */
-    int (* bios_param)(Disk *, struct block_device *, int []);
+    int (* bios_param)(struct scsi_device *, struct block_device *,
+		    sector_t, int []);
 
     /*
      * This determines if we will use a non-interrupt driven
@@ -551,9 +541,6 @@
 {
 	shost->pci_dev = pdev;
 	shost->host_driverfs_dev.parent=&pdev->dev;
-
-	/* register parent with driverfs */
-	device_register(&shost->host_driverfs_dev);
 }
 
 
@@ -583,7 +570,6 @@
     int (*detect)(Scsi_Device *); /* Returns 1 if we can attach this device */
     int (*init)(void);		  /* Sizes arrays based upon number of devices
 		   *  detected */
-    void (*finish)(void);	  /* Perform initialization after attachment */
     int (*attach)(Scsi_Device *); /* Attach devices to arrays */
     void (*detach)(Scsi_Device *);
     int (*init_command)(Scsi_Cmnd *);     /* Used by new queueing code. 
@@ -631,13 +617,9 @@
  * The generics driver has been updated to resize as required.  So as the tape
  * driver. Two down, two more to go.
  */
-#ifndef CONFIG_SD_EXTRA_DEVS
-#define CONFIG_SD_EXTRA_DEVS 2
-#endif
 #ifndef CONFIG_SR_EXTRA_DEVS
 #define CONFIG_SR_EXTRA_DEVS 2
 #endif
-#define SD_EXTRA_DEVS CONFIG_SD_EXTRA_DEVS
 #define SR_EXTRA_DEVS CONFIG_SR_EXTRA_DEVS
 
 
diff -Nru a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
--- a/drivers/scsi/ibmmca.c	Wed Oct 30 16:44:21 2002
+++ b/drivers/scsi/ibmmca.c	Wed Oct 30 16:44:21 2002
@@ -28,11 +28,11 @@
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
 #include <linux/mca.h>
+#include <linux/string.h>
 #include <asm/system.h>
 #include <linux/spinlock.h>
 #include <asm/io.h>
 #include <linux/init.h>
-#include "sd.h"
 #include "scsi.h"
 #include "hosts.h"
 #include "ibmmca.h"
@@ -504,15 +504,16 @@
    unsigned long flags;
    Scsi_Cmnd *cmd;
    int lastSCSI;
+   struct Scsi_Host *dev = dev_id;
 
-   IBMLOCK(dev_id)
+   IBMLOCK(dev)
    /* search for one adapter-response on shared interrupt */
    for (host_index=0;
 	hosts[host_index] && !(inb(IM_STAT_REG(host_index)) & IM_INTR_REQUEST);
 	host_index++);
    /* return if some other device on this IRQ caused the interrupt */
    if (!hosts[host_index]) {
-      IBMUNLOCK(dev_id)
+      IBMUNLOCK(dev)
       return;
    }
 
@@ -521,15 +522,16 @@
    if ((reset_status(host_index) == IM_RESET_NOT_IN_PROGRESS_NO_INT)||
        (reset_status(host_index) == IM_RESET_FINISHED_OK_NO_INT)) {
       reset_status(host_index) = IM_RESET_NOT_IN_PROGRESS;
-      IBMUNLOCK(dev_id)
+      IBMUNLOCK(dev)
       return;
    }
 
    /*must wait for attention reg not busy, then send EOI to subsystem */
    while (1) {
       if (!(inb (IM_STAT_REG(host_index)) & IM_BUSY)) break;
-      IBMUNLOCK(dev_id) /* cycle interrupt */
-      IBMLOCK(dev_id)
+      IBMUNLOCK(dev) /* cycle interrupt */
+      cpu_relax();
+      IBMLOCK(dev)
    }
    ihost_index=host_index;
    /*get command result and logical device */
@@ -539,7 +541,7 @@
    /* get the last_scsi_command here */
    lastSCSI = last_scsi_command(ihost_index)[ldn];
    outb (IM_EOI | ldn, IM_ATTN_REG(ihost_index));
-   IBMUNLOCK(dev_id)
+   IBMUNLOCK(dev)
    /*these should never happen (hw fails, or a local programming bug) */
    if (!global_command_error_excuse) {
       switch (cmd_result) {
@@ -1435,12 +1437,13 @@
    return;
 }
 
-static int ibmmca_getinfo (char *buf, int slot, void *dev)
+static int ibmmca_getinfo (char *buf, int slot, void *dev_id)
 {
    struct Scsi_Host *shpnt;
    int len, speciale, connectore, k;
    unsigned int pos[8];
    unsigned long flags;
+   struct Scsi_Host *dev = dev_id;
 
    IBMLOCK(dev)
    shpnt = dev; /* assign host-structure to local pointer */
@@ -2382,9 +2385,10 @@
      return SCSI_RESET_SUCCESS;
 }
 
-int ibmmca_biosparam (Disk * disk, struct block_device *dev, int *info)
+int ibmmca_biosparam (struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *info)
 {
-   int size = disk->capacity;
+   int size = capacity;
    info[0] = 64;
    info[1] = 32;
    info[2] = size / (info[0] * info[1]);
diff -Nru a/drivers/scsi/ibmmca.h b/drivers/scsi/ibmmca.h
--- a/drivers/scsi/ibmmca.h	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/ibmmca.h	Wed Oct 30 16:44:30 2002
@@ -17,7 +17,8 @@
 extern int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 extern int ibmmca_abort (Scsi_Cmnd *);
 extern int ibmmca_reset (Scsi_Cmnd *, unsigned int);
-extern int ibmmca_biosparam (Disk *, struct block_device *, int *);
+extern int ibmmca_biosparam (struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 /*structure for /proc filesystem */
 extern struct proc_dir_entry proc_scsi_ibmmca;
diff -Nru a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
--- a/drivers/scsi/ide-scsi.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/ide-scsi.c	Wed Oct 30 16:44:29 2002
@@ -51,7 +51,6 @@
 
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <scsi/sg.h>
 
 #define IDESCSI_DEBUG_LOG		0
@@ -502,23 +501,6 @@
 	return ide_stopped;
 }
 
-static int idescsi_do_ioctl (ide_drive_t *drive, struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
-{
-	/* need to figure out how to parse scsi-atapi media type */
-	return -ENOTTY;
-}
-
-static int idescsi_ide_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	MOD_INC_USE_COUNT;
-	return 0;
-}
-
-static void idescsi_ide_release (struct inode *inode, struct file *filp, ide_drive_t *drive)
-{
-	MOD_DEC_USE_COUNT;
-}
-
 static ide_drive_t *idescsi_drives[MAX_HWIFS * MAX_DRIVES];
 
 static void idescsi_add_settings(ide_drive_t *drive)
@@ -564,6 +546,7 @@
 	if (ide_unregister_subdriver(drive))
 		return 1;
 	drive->driver_data = NULL;
+	drive->disk->fops = ide_fops;
 	kfree(scsi);
 	return 0;
 }
@@ -574,29 +557,46 @@
  *	IDE subdriver functions, registered with ide.c
  */
 static ide_driver_t idescsi_driver = {
-	owner:			THIS_MODULE,
-	name:			"ide-scsi",
-	version:		IDESCSI_VERSION,
-	media:			ide_scsi,
-	busy:			0,
-	supports_dma:		1,
-	supports_dsc_overlap:	0,
-	attach:			idescsi_attach,
-	cleanup:		idescsi_cleanup,
-	standby:		NULL,
-	flushcache:		NULL,
-	do_request:		idescsi_do_request,
-	end_request:		idescsi_end_request,
-	ioctl:			idescsi_do_ioctl,
-	open:			idescsi_ide_open,
-	release:		idescsi_ide_release,
-	media_change:		NULL,
-	revalidate:		NULL,
-	pre_reset:		NULL,
-	capacity:		NULL,
-	special:		NULL,
-	proc:			NULL,
-	drives:			LIST_HEAD_INIT(idescsi_driver.drives),
+	.owner			= THIS_MODULE,
+	.name			= "ide-scsi",
+	.version		= IDESCSI_VERSION,
+	.media			= ide_scsi,
+	.busy			= 0,
+	.supports_dma		= 1,
+	.supports_dsc_overlap	= 0,
+	.attach			= idescsi_attach,
+	.cleanup		= idescsi_cleanup,
+	.do_request		= idescsi_do_request,
+	.end_request		= idescsi_end_request,
+	.drives			= LIST_HEAD_INIT(idescsi_driver.drives),
+};
+
+static int idescsi_ide_open(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	drive->usage++;
+	return 0;
+}
+
+static int idescsi_ide_release(struct inode *inode, struct file *filp)
+{
+	ide_drive_t *drive = inode->i_bdev->bd_disk->private_data;
+	drive->usage--;
+	return 0;
+}
+
+static int idescsi_ide_ioctl(struct inode *inode, struct file *file,
+			unsigned int cmd, unsigned long arg)
+{
+	struct block_device *bdev = inode->i_bdev;
+	return generic_ide_ioctl(bdev, cmd, arg);
+}
+
+static struct block_device_operations idescsi_ops = {
+	.owner		= THIS_MODULE,
+	.open		= idescsi_ide_open,
+	.release	= idescsi_ide_release,
+	.ioctl		= idescsi_ide_ioctl,
 };
 
 static int idescsi_attach(ide_drive_t *drive)
@@ -623,6 +623,7 @@
 	for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++)
 		;
 	idescsi_setup (drive, scsi, id);
+	drive->disk->fops = &idescsi_ops;
 	return 0;
 failed:
 	return 1;
@@ -840,9 +841,10 @@
 	return SCSI_RESET_SUCCESS;
 }
 
-static int idescsi_bios(Disk *disk, struct block_device *dev, int *parm)
+static int idescsi_bios(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *parm)
 {
-	ide_drive_t *drive = idescsi_drives[disk->device->id];
+	ide_drive_t *drive = idescsi_drives[sdev->id];
 
 	if (drive->bios_cyl && drive->bios_head && drive->bios_sect) {
 		parm[0] = drive->bios_head;
@@ -860,8 +862,6 @@
 	info:		idescsi_info,
 	ioctl:		idescsi_ioctl,
 	queuecommand:	idescsi_queue,
-	abort:		idescsi_abort,
-	reset:		idescsi_reset,
 	bios_param:	idescsi_bios,
 	can_queue:	10,
 	this_id:	-1,
diff -Nru a/drivers/scsi/imm.c b/drivers/scsi/imm.c
--- a/drivers/scsi/imm.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/imm.c	Wed Oct 30 16:44:35 2002
@@ -28,7 +28,7 @@
 #include <asm/io.h>
 #include <linux/parport.h>
 #include <linux/workqueue.h>
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"
 
 typedef struct {
@@ -199,6 +199,8 @@
 	    continue;
 	}
 
+	INIT_WORK(&imm_hosts[i].imm_tq, imm_interrupt, &imm_hosts[i]);
+	
 	host->can_queue = IMM_CAN_QUEUE;
 	host->sg_tablesize = imm_sg;
 	hreg = scsi_register(host, 0);
@@ -1115,15 +1117,16 @@
  * be done in sd.c.  Even if it gets fixed there, this will still
  * work.
  */
-int imm_biosparam(Disk * disk, struct block_device *dev, int ip[])
+int imm_biosparam(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int ip[])
 {
     ip[0] = 0x40;
     ip[1] = 0x20;
-    ip[2] = ((unsigned long)disk->capacity + 1) / (ip[0] * ip[1]);
+    ip[2] = ((unsigned long)capacity + 1) / (ip[0] * ip[1]);
     if (ip[2] > 1024) {
 	ip[0] = 0xff;
 	ip[1] = 0x3f;
-	ip[2] = ((unsigned long)disk->capacity + 1) / (ip[0] * ip[1]);
+	ip[2] = ((unsigned long)capacity + 1) / (ip[0] * ip[1]);
     }
     return 0;
 }
diff -Nru a/drivers/scsi/imm.h b/drivers/scsi/imm.h
--- a/drivers/scsi/imm.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/imm.h	Wed Oct 30 16:44:17 2002
@@ -80,7 +80,6 @@
 #include  <linux/interrupt.h>
 
 #include  <asm/io.h>
-#include  "sd.h"
 #include  "hosts.h"
 /* batteries not included :-) */
 
@@ -161,7 +160,8 @@
 int imm_abort(Scsi_Cmnd *);
 int imm_reset(Scsi_Cmnd *);
 int imm_proc_info(char *, char **, off_t, int, int, int);
-int imm_biosparam(Disk *, struct block_device *, int *);
+int imm_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 #define IMM {	proc_name:			"imm",			\
 		proc_info:			imm_proc_info,		\
diff -Nru a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
--- a/drivers/scsi/in2000.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/in2000.c	Wed Oct 30 16:44:30 2002
@@ -119,7 +119,6 @@
 #include <linux/stat.h>
 
 #include "scsi.h"
-#include "sd.h"
 #include "hosts.h"
 
 #define IN2000_VERSION    "1.33"
@@ -832,7 +831,7 @@
 
 static void in2000_intr (int irqnum, void * dev_id, struct pt_regs *ptregs)
 {
-struct Scsi_Host *instance;
+struct Scsi_Host *instance = dev_id;
 struct IN2000_hostdata *hostdata;
 Scsi_Cmnd *patch, *cmd;
 uchar asr, sr, phs, id, lun, *ucp, msg;
@@ -842,14 +841,6 @@
 unsigned short f;
 unsigned long flags;
 
-   for (instance = instance_list; instance; instance = instance->next) {
-      if (instance->irq == irqnum)
-         break;
-      }
-   if (!instance) {
-      printk("*** Hmm... interrupts are screwed up! ***\n");
-      return;
-      }
    hostdata = (struct IN2000_hostdata *)instance->hostdata;
 
 /* Get the spin_lock and disable further ints, for SMP */
@@ -2046,7 +2037,7 @@
       write1_io(0,IO_FIFO_READ);             /* start fifo out in read mode */
       write1_io(0,IO_INTR_MASK);    /* allow all ints */
       x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT];
-      if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", NULL)) {
+      if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", instance)) {
          printk("in2000_detect: Unable to allocate IRQ.\n");
          detect_count--;
          continue;
@@ -2163,17 +2154,28 @@
    return detect_count;
 }
 
+static int in2000_release(struct Scsi_Host *shost)
+{
+	if (shost->irq)
+		free_irq(shost->irq, shost);
+	if (shost->io_port && shost->n_io_port)
+		release_region(shost->io_port, shost->n_io_port);
+	return 0;
+}
+
 
 /* NOTE: I lifted this function straight out of the old driver,
  *       and have not tested it. Presumably it does what it's
  *       supposed to do...
  */
 
-static int in2000_biosparam(Disk *disk, struct block_device *dev, int *iinfo)
+static int in2000_biosparam(struct scsi_device *sdev,
+		struct block_device *bdev,
+		sector_t capacity, int *iinfo)
 {
 int size;
 
-   size  = disk->capacity;
+   size  = capacity;
    iinfo[0] = 64;
    iinfo[1] = 32;
    iinfo[2] = size >> 11;
@@ -2185,17 +2187,17 @@
    if (iinfo[2] > 1024) {
       iinfo[0] = 64;
       iinfo[1] = 63;
-      iinfo[2] = (unsigned long)disk->capacity / (iinfo[0] * iinfo[1]);
+      iinfo[2] = (unsigned long)capacity / (iinfo[0] * iinfo[1]);
       }
    if (iinfo[2] > 1024) {
       iinfo[0] = 128;
       iinfo[1] = 63;
-      iinfo[2] = (unsigned long)disk->capacity / (iinfo[0] * iinfo[1]);
+      iinfo[2] = (unsigned long)capacity / (iinfo[0] * iinfo[1]);
       }
    if (iinfo[2] > 1024) {
       iinfo[0] = 255;
       iinfo[1] = 63;
-      iinfo[2] = (unsigned long)disk->capacity / (iinfo[0] * iinfo[1]);
+      iinfo[2] = (unsigned long)capacity / (iinfo[0] * iinfo[1]);
       }
     return 0;
 }
@@ -2215,10 +2217,7 @@
 int x,i;
 static int stop = 0;
 
-   for (instance=instance_list; instance; instance=instance->next) {
-      if (instance->host_no == hn)
-         break;
-      }
+   instance = scsi_host_hn_get(hn);  
    if (!instance) {
       printk("*** Hmm... Can't find host #%d!\n",hn);
       return (-ESRCH);
diff -Nru a/drivers/scsi/in2000.h b/drivers/scsi/in2000.h
--- a/drivers/scsi/in2000.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/in2000.h	Wed Oct 30 16:44:17 2002
@@ -402,7 +402,8 @@
 static int in2000_abort(Scsi_Cmnd *);
 static void in2000_setup(char *, int *) in2000__INIT;
 static int in2000_proc_info(char *, char **, off_t, int, int, int);
-static int in2000_biosparam(struct scsi_disk *, struct block_device *, int *);
+static int in2000_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 static int in2000_host_reset(Scsi_Cmnd *);
 static int in2000_bus_reset(Scsi_Cmnd *);
 static int in2000_device_reset(Scsi_Cmnd *);
@@ -417,6 +418,7 @@
                   proc_info:       		in2000_proc_info,    /* pointer to proc info function */ \
                   name:            		"Always IN2000",     /* device name */ \
                   detect:          		in2000_detect,       /* returns number of in2000's found */ \
+                  release:			in2000_release,	     /* release the in2000 controller */ \
                   queuecommand:    		in2000_queuecommand, /* queue scsi command, don't wait */ \
                   eh_abort_handler:		in2000_abort,        /* abort current command */ \
                   eh_bus_reset_handler:		in2000_bus_reset,    /* reset scsi bus */ \
diff -Nru a/drivers/scsi/ini9100u.c b/drivers/scsi/ini9100u.c
--- a/drivers/scsi/ini9100u.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/ini9100u.c	Wed Oct 30 16:44:26 2002
@@ -134,7 +134,6 @@
 #include <linux/proc_fs.h>
 #include <asm/io.h>
 #include "scsi.h"
-#include "sd.h"
 #include "hosts.h"
 #include <linux/slab.h>
 #include "ini9100u.h"
@@ -583,27 +582,28 @@
 /*
  * Return the "logical geometry"
  */
-int i91u_biosparam(Scsi_Disk * disk, struct block_device *dev, int *info_array)
+int i91u_biosparam(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int *info_array)
 {
 	HCS *pHcb;		/* Point to Host adapter control block */
 	TCS *pTcb;
 
-	pHcb = (HCS *) disk->device->host->base;
-	pTcb = &pHcb->HCS_Tcs[disk->device->id];
+	pHcb = (HCS *) sdev->host->base;
+	pTcb = &pHcb->HCS_Tcs[sdev->id];
 
 	if (pTcb->TCS_DrvHead) {
 		info_array[0] = pTcb->TCS_DrvHead;
 		info_array[1] = pTcb->TCS_DrvSector;
-		info_array[2] = (unsigned long)disk->capacity / pTcb->TCS_DrvHead / pTcb->TCS_DrvSector;
+		info_array[2] = (unsigned long)capacity / pTcb->TCS_DrvHead / pTcb->TCS_DrvSector;
 	} else {
 		if (pTcb->TCS_DrvFlags & TCF_DRV_255_63) {
 			info_array[0] = 255;
 			info_array[1] = 63;
-			info_array[2] = (unsigned long)disk->capacity / 255 / 63;
+			info_array[2] = (unsigned long)capacity / 255 / 63;
 		} else {
 			info_array[0] = 64;
 			info_array[1] = 32;
-			info_array[2] = (unsigned long)disk->capacity >> 11;
+			info_array[2] = (unsigned long)capacity >> 11;
 		}
 	}
 
diff -Nru a/drivers/scsi/ini9100u.h b/drivers/scsi/ini9100u.h
--- a/drivers/scsi/ini9100u.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/ini9100u.h	Wed Oct 30 16:44:28 2002
@@ -76,15 +76,14 @@
 #endif
 #include <linux/types.h>
 
-#include "sd.h"
-
 extern int i91u_detect(Scsi_Host_Template *);
 extern int i91u_release(struct Scsi_Host *);
 extern int i91u_command(Scsi_Cmnd *);
 extern int i91u_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 extern int i91u_abort(Scsi_Cmnd *);
 extern int i91u_reset(Scsi_Cmnd *, unsigned int);
-extern int i91u_biosparam(Scsi_Disk *, struct block_device *, int *);
+extern int i91u_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 1.03g"
 
diff -Nru a/drivers/scsi/inia100.c b/drivers/scsi/inia100.c
--- a/drivers/scsi/inia100.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/inia100.c	Wed Oct 30 16:44:26 2002
@@ -90,7 +90,6 @@
 #include <linux/proc_fs.h>
 #include <asm/io.h>
 #include "scsi.h"
-#include "sd.h"
 #include "hosts.h"
 #include <linux/slab.h>
 #include "inia100.h"
@@ -653,27 +652,28 @@
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-int inia100_biosparam(Scsi_Disk * disk, struct block_device *dev, int *info_array)
+int inia100_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *info_array)
 {
 	ORC_HCS *pHcb;		/* Point to Host adapter control block */
 	ORC_TCS *pTcb;
 
-	pHcb = (ORC_HCS *) disk->device->host->hostdata;
-	pTcb = &pHcb->HCS_Tcs[disk->device->id];
+	pHcb = (ORC_HCS *) sdev->host->hostdata;
+	pTcb = &pHcb->HCS_Tcs[sdev->id];
 
 	if (pTcb->TCS_DrvHead) {
 		info_array[0] = pTcb->TCS_DrvHead;
 		info_array[1] = pTcb->TCS_DrvSector;
-		info_array[2] = (unsigned long)disk->capacity / pTcb->TCS_DrvHead / pTcb->TCS_DrvSector;
+		info_array[2] = (unsigned long)capacity / pTcb->TCS_DrvHead / pTcb->TCS_DrvSector;
 	} else {
 		if (pTcb->TCS_DrvFlags & TCF_DRV_255_63) {
 			info_array[0] = 255;
 			info_array[1] = 63;
-			info_array[2] = (unsigned long)disk->capacity / 255 / 63;
+			info_array[2] = (unsigned long)capacity / 255 / 63;
 		} else {
 			info_array[0] = 64;
 			info_array[1] = 32;
-			info_array[2] = disk->capacity >> 11;
+			info_array[2] = capacity >> 11;
 		}
 	}
 	return 0;
diff -Nru a/drivers/scsi/inia100.h b/drivers/scsi/inia100.h
--- a/drivers/scsi/inia100.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/inia100.h	Wed Oct 30 16:44:17 2002
@@ -75,38 +75,23 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 
-#include "sd.h"
-
 extern int inia100_detect(Scsi_Host_Template *);
 extern int inia100_release(struct Scsi_Host *);
 extern int inia100_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 extern int inia100_abort(Scsi_Cmnd *);
 extern int inia100_reset(Scsi_Cmnd *, unsigned int);
 
-extern int inia100_biosparam(Scsi_Disk *, struct block_device *, int *);
+extern int inia100_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
-#define inia100_REVID "Initio INI-A100U2W SCSI device driver; Revision: 1.02c"
+#define inia100_REVID "Initio INI-A100U2W SCSI device driver; Revision: 1.02d"
 
 #define INIA100	{ \
-	next:		NULL,						\
-	module:		NULL,						\
 	proc_name:	"inia100", \
-	proc_info:	NULL,				\
 	name:		inia100_REVID, \
 	detect:		inia100_detect, \
 	release:	inia100_release, \
-	info:		NULL,					\
-	command:	NULL, \
 	queuecommand:	inia100_queue, \
- 	eh_strategy_handler: NULL, \
- 	eh_abort_handler: NULL, \
- 	eh_device_reset_handler: NULL, \
- 	eh_bus_reset_handler: NULL, \
- 	eh_host_reset_handler: NULL, \
-	abort:		inia100_abort, \
-	reset:		inia100_reset, \
-	slave_attach:	NULL, \
-	bios_param:	inia100_biosparam, \
 	can_queue:	1, \
 	this_id:	1, \
 	sg_tablesize:	SG_ALL, \
diff -Nru a/drivers/scsi/ips.c b/drivers/scsi/ips.c
--- a/drivers/scsi/ips.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/ips.c	Wed Oct 30 16:44:17 2002
@@ -169,7 +169,6 @@
 
 #include <scsi/sg.h>
 
-#include "sd.h"
 #include "scsi.h"
 #include "hosts.h"
 #include "ips.h"
@@ -248,8 +247,8 @@
 #else
     #define IPS_SG_ADDRESS(sg)      (page_address((sg)->page) ? \
                                      page_address((sg)->page)+(sg)->offset : 0)
-    #define IPS_LOCK_SAVE(lock,flags) spin_lock(lock)
-    #define IPS_UNLOCK_RESTORE(lock,flags) spin_unlock(lock)
+    #define IPS_LOCK_SAVE(lock,flags) do{spin_lock(lock);(void)flags;}while(0)
+    #define IPS_UNLOCK_RESTORE(lock,flags) do{spin_unlock(lock);(void)flags;}while(0)
 #endif
 
 #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \
@@ -432,7 +431,8 @@
 int ips_eh_abort(Scsi_Cmnd *);
 int ips_eh_reset(Scsi_Cmnd *);
 int ips_queue(Scsi_Cmnd *, void (*) (Scsi_Cmnd *));
-int ips_biosparam(Disk *, struct block_device *, int *);
+int ips_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 int ips_slave_attach(Scsi_Device *);
 const char * ips_info(struct Scsi_Host *);
 void do_ipsintr(int, void *, struct pt_regs *);
@@ -1777,7 +1777,8 @@
 /*                                                                          */
 /****************************************************************************/
 int
-ips_biosparam(Disk *disk, struct block_device *dev, int geom[]) {
+ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[]) {
    ips_ha_t         *ha;
    int               heads;
    int               sectors;
@@ -1785,7 +1786,7 @@
 
    METHOD_TRACE("ips_biosparam", 1);
 
-   ha = (ips_ha_t *) disk->device->host->hostdata;
+   ha = (ips_ha_t *) sdev->host->hostdata;
 
    if (!ha)
       /* ?!?! host adater info invalid */
@@ -1798,7 +1799,7 @@
       /* ?!?! Enquiry command failed */
       return (0);
 
-   if ((disk->capacity > 0x400000) &&
+   if ((capacity > 0x400000) &&
        ((ha->enq->ucMiscFlag & 0x8) == 0)) {
       heads = IPS_NORM_HEADS;
       sectors = IPS_NORM_SECTORS;
@@ -1807,7 +1808,7 @@
       sectors = IPS_COMP_SECTORS;
    }
 
-   cylinders = (unsigned long)disk->capacity / (heads * sectors);
+   cylinders = (unsigned long)capacity / (heads * sectors);
 
    DEBUG_VAR(2, "Geometry: heads: %d, sectors: %d, cylinders: %d",
              heads, sectors, cylinders);
@@ -1879,9 +1880,9 @@
    int          min;
 
    ha = IPS_HA(SDptr->host);
-   if (SDptr->tagged_supported) {
+   if (SDptr->tagged_supported && SDptr->type == TYPE_DISK) {
       min = ha->max_cmds / 2;
-      if (min <= 16)
+      if (ha->enq->ucLogDriveCount <= 2)
          min = ha->max_cmds - 1;
       scsi_adjust_queue_depth(SDptr, MSG_ORDERED_TAG, min);
    }
@@ -4761,7 +4762,7 @@
    inquiry.ResponseDataFormat = IPS_SCSI_INQ_RD_REV2;
    inquiry.AdditionalLength = 31;
    inquiry.Flags[0] = IPS_SCSI_INQ_Address16;
-   inquiry.Flags[1] = IPS_SCSI_INQ_WBus16 | IPS_SCSI_INQ_Sync;
+   inquiry.Flags[1] = IPS_SCSI_INQ_WBus16 | IPS_SCSI_INQ_Sync | IPS_SCSI_INQ_CmdQue;
    strncpy(inquiry.VendorId, "IBM     ", 8);
    strncpy(inquiry.ProductId, "SERVERAID       ", 16);
    strncpy(inquiry.ProductRevisionLevel, "1.00", 4);
diff -Nru a/drivers/scsi/ips.h b/drivers/scsi/ips.h
--- a/drivers/scsi/ips.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/ips.h	Wed Oct 30 16:44:26 2002
@@ -59,7 +59,8 @@
    extern int ips_eh_abort(Scsi_Cmnd *);
    extern int ips_eh_reset(Scsi_Cmnd *);
    extern int ips_queue(Scsi_Cmnd *, void (*) (Scsi_Cmnd *));
-   extern int ips_biosparam(Disk *, struct block_device *, int *);
+   extern int ips_biosparam(struct scsi_device *, struct block_device *,
+		   sector_t, int *);
    extern int ips_slave_attach(Scsi_Device *);
    extern const char * ips_info(struct Scsi_Host *);
    extern void do_ips(int, void *, struct pt_regs *);
@@ -464,23 +465,13 @@
 }
 #else
  #define IPS {                            \
-    module : NULL,                        \
-    proc_info : NULL,                     \
-    name : NULL,                          \
     detect : ips_detect,                  \
     release : ips_release,                \
     info : ips_info,                      \
-    command : NULL,                       \
     queuecommand : ips_queue,             \
-    eh_strategy_handler : NULL,           \
     eh_abort_handler : ips_eh_abort,      \
-    eh_device_reset_handler : NULL,       \
-    eh_bus_reset_handler : NULL,          \
     eh_host_reset_handler : ips_eh_reset, \
-    abort : NULL,                         \
-    reset : NULL,                         \
     slave_attach : ips_slave_attach,      \
-    slave_detach : NULL,                  \
     bios_param : ips_biosparam,           \
     can_queue : 0,                        \
     this_id: -1,                          \
diff -Nru a/drivers/scsi/mac_scsi.h b/drivers/scsi/mac_scsi.h
--- a/drivers/scsi/mac_scsi.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/mac_scsi.h	Wed Oct 30 16:44:29 2002
@@ -72,7 +72,6 @@
 queuecommand:		macscsi_queue_command,				\
 abort:			macscsi_abort,			 		\
 reset:			macscsi_reset,					\
-bios_param:		scsicam_bios_param,	/* biosparam */		\
 can_queue:		CAN_QUEUE,		/* can queue */		\
 this_id:		7,			/* id */		\
 sg_tablesize:		SG_ALL,			/* sg_tablesize */	\
diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/megaraid.c	Wed Oct 30 16:44:17 2002
@@ -522,8 +522,6 @@
 #include <linux/notifier.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
-
-#include "sd.h"
 #include "scsi.h"
 #include "hosts.h"
 #include <scsi/scsicam.h>
@@ -4224,25 +4222,26 @@
  *     geom[1] = sectors
  *     geom[2] = cylinders
  *-------------------------------------------------------------*/
-int megaraid_biosparam (Disk * disk, struct block_device *bdev, int *geom)
+int megaraid_biosparam (struct scsi_device *sdev, struct block_device *bdev,
+				sector_t capacity, int *geom)
 {
 	int heads, sectors, cylinders;
 	mega_host_config *megaCfg;
 
 	/* Get pointer to host config structure */
-	megaCfg = (mega_host_config *) disk->device->host->hostdata;
+	megaCfg = (mega_host_config *) sdev->host->hostdata;
 
-	if( IS_RAID_CH(disk->device->channel)) {
+	if( IS_RAID_CH(sdev->channel)) {
 			/* Default heads (64) & sectors (32) */
 			heads = 64;
 			sectors = 32;
-			cylinders = (unsigned long)disk->capacity / (heads * sectors);
+			cylinders = (unsigned long)capacity / (heads * sectors);
 
 			/* Handle extended translation size for logical drives > 1Gb */
-			if (disk->capacity >= 0x200000) {
+			if (capacity >= 0x200000) {
 				heads = 255;
 				sectors = 63;
-				cylinders = (unsigned long)disk->capacity / (heads * sectors);
+				cylinders = (unsigned long)capacity / (heads * sectors);
 			}
 
 			/* return result */
@@ -4251,22 +4250,22 @@
 			geom[2] = cylinders;
 	}
 	else {
-		if( mega_partsize(disk, bdev, geom) == 0 ) return 0;
+		if( mega_partsize(bdev, capacity, geom) == 0 ) return 0;
 
 		printk(KERN_WARNING
 				"megaraid: invalid partition on this disk on channel %d\n",
-				disk->device->channel);
+				sdev->channel);
 
 		/* Default heads (64) & sectors (32) */
 		heads = 64;
 		sectors = 32;
-		cylinders = disk->capacity >> 11;
+		cylinders = capacity >> 11;
 
 		/* Handle extended translation size for logical drives > 1Gb */
-		if (disk->capacity >= 0x200000) {
+		if (capacity >= 0x200000) {
 			heads = 255;
 			sectors = 63;
-			cylinders = (unsigned long)disk->capacity / (heads * sectors);
+			cylinders = (unsigned long)capacity / (heads * sectors);
 		}
 
 		/* return result */
@@ -4289,12 +4288,12 @@
  * Returns : -1 on failure, 0 on success.
  */
 static int
-mega_partsize(Disk * disk, struct block_device *bdev, int *geom)
+mega_partsize(struct block_device *bdev, sector_t capacity, int *geom)
 {
 	struct partition *p, *largest = NULL;
 	int i, largest_cyl;
 	int heads, cyls, sectors;
-	int capacity = disk->capacity;
+	int capacity = capacity;
 	unsigned char *buf;
 
 	if (!(buf = scsi_bios_ptable(bdev)))
diff -Nru a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
--- a/drivers/scsi/megaraid.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/megaraid.h	Wed Oct 30 16:44:29 2002
@@ -950,7 +950,8 @@
 int megaraid_abort (Scsi_Cmnd *);
 int megaraid_reset (Scsi_Cmnd *, unsigned int);
 int megaraid_queue (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
-int megaraid_biosparam (Disk *, struct block_device *, int *);
+int megaraid_biosparam (struct scsi_device *, struct block_device *,
+			sector_t, int *);
 int megaraid_proc_info (char *buffer, char **start, off_t offset,
 			int length, int hostno, int inout);
 
@@ -998,7 +999,7 @@
 static mega_ext_passthru* mega_prepare_extpassthru(mega_host_config *,
 		mega_scb *, Scsi_Cmnd *);
 static void mega_enum_raid_scsi(mega_host_config *);
-static int mega_partsize(Disk *, struct block_device *, int *);
+static int mega_partsize(struct block_device *, sector_t, int *);
 static void mega_get_boot_ldrv(mega_host_config *);
 static int mega_get_lun(mega_host_config *, Scsi_Cmnd *);
 static int mega_support_random_del(mega_host_config *);
diff -Nru a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
--- a/drivers/scsi/mesh.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/mesh.c	Wed Oct 30 16:44:29 2002
@@ -24,7 +24,6 @@
 #include <linux/blk.h>
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
-#include <linux/tqueue.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
 #include <linux/spinlock.h>
diff -Nru a/drivers/scsi/mvme16x.h b/drivers/scsi/mvme16x.h
--- a/drivers/scsi/mvme16x.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/mvme16x.h	Wed Oct 30 16:44:28 2002
@@ -30,7 +30,6 @@
 		       queuecommand:        NCR53c7xx_queue_command, \
 		       abort:               NCR53c7xx_abort,   \
 		       reset:               NCR53c7xx_reset,   \
-		       bios_param:          scsicam_bios_param,   \
 		       can_queue:           24,       \
 		       this_id:             7,               \
 		       sg_tablesize:        63,          \
diff -Nru a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
--- a/drivers/scsi/ncr53c8xx.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/ncr53c8xx.c	Wed Oct 30 16:44:26 2002
@@ -157,7 +157,6 @@
 
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include <linux/types.h>
 
@@ -9125,16 +9124,11 @@
 printk("ncr53c8xx_proc_info: hostno=%d, func=%d\n", hostno, func);
 #endif
 
-	for (host = first_host; host; host = host->next) {
-		if (host->hostt == the_template && host->host_no == hostno) {
-			host_data = (struct host_data *) host->hostdata;
-			ncb = host_data->ncb;
-			break;
-		}
-	}
-
-	if (!ncb)
+	if((host = scsi_host_hn_get(hostno))==NULL)
 		return -EINVAL;
+		
+	host_data = (struct host_data *) host->hostdata;
+	ncb = host_data->ncb;
 
 	if (func) {
 #ifdef	SCSI_NCR_USER_COMMAND_SUPPORT
diff -Nru a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h
--- a/drivers/scsi/ncr53c8xx.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/ncr53c8xx.h	Wed Oct 30 16:44:27 2002
@@ -76,9 +76,6 @@
 			info:           ncr53c8xx_info, 	\
 			queuecommand:   ncr53c8xx_queue_command,\
 			slave_attach:   ncr53c8xx_slave_attach, \
-			abort:          ncr53c8xx_abort,	\
-			reset:          ncr53c8xx_reset,	\
-			bios_param:     scsicam_bios_param,	\
 			can_queue:      SCSI_NCR_CAN_QUEUE,	\
 			this_id:        7,			\
 			sg_tablesize:   SCSI_NCR_SG_TABLESIZE,	\
diff -Nru a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
--- a/drivers/scsi/nsp32.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/nsp32.c	Wed Oct 30 16:44:27 2002
@@ -352,7 +352,6 @@
 	.eh_device_reset_handler =	NULL,
 	.eh_bus_reset_handler =		nsp32_eh_bus_reset,
 	.eh_host_reset_handler =	nsp32_eh_host_reset,
-	.reset =			nsp32_reset,
 	.release =			nsp32_release,
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,2))
 	.use_new_eh_code =        	1,
@@ -1575,11 +1574,9 @@
 	}
 
 	/* search this HBA host */
-	for (host=scsi_hostlist; host; host=host->next) {
-		if (host->host_no == hostno) {
-			break;
-		}
-	}
+	
+	host = scsi_host_hn_get(hostno);
+	
 	if (host == NULL) {
 		return -ESRCH;
 	}
diff -Nru a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c
--- a/drivers/scsi/pas16.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/pas16.c	Wed Oct 30 16:44:19 2002
@@ -118,12 +118,12 @@
 #include <linux/sched.h>
 #include <asm/io.h>
 #include <linux/blk.h>
+#include <linux/delay.h>
 #include "scsi.h"
 #include "hosts.h"
 #include "pas16.h"
 #define AUTOPROBE_IRQ
 #include "NCR5380.h"
-#include "sd.h"
 
 #include <linux/stat.h>
 #include <linux/init.h>
@@ -450,7 +450,7 @@
 	    instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
 
 	if (instance->irq != IRQ_NONE) 
-	    if (request_irq(instance->irq, do_pas16_intr, SA_INTERRUPT, "pas16", instance)) {
+	    if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) {
 		printk("scsi%d : IRQ%d not free, interrupts disabled\n", 
 		    instance->host_no, instance->irq);
 		instance->irq = IRQ_NONE;
@@ -505,9 +505,10 @@
  * and matching the H_C_S coordinates to what DOS uses.
  */
 
-int pas16_biosparam(Disk * disk, struct block_device *dev, int * ip)
+int pas16_biosparam(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int * ip)
 {
-  int size = disk->capacity;
+  int size = capacity;
   ip[0] = 64;
   ip[1] = 32;
   ip[2] = size >> 11;		/* I think I have it as /(32*64) */
diff -Nru a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h
--- a/drivers/scsi/pas16.h	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/pas16.h	Wed Oct 30 16:44:30 2002
@@ -114,14 +114,15 @@
 
 
 #ifndef ASM
-int pas16_abort(Scsi_Cmnd *);
-int pas16_biosparam(Disk *, struct block_device *, int*);
-int pas16_detect(Scsi_Host_Template *);
-int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int pas16_bus_reset(Scsi_Cmnd *);
-int pas16_host_reset(Scsi_Cmnd *);
-int pas16_device_reset(Scsi_Cmnd *);
-int pas16_proc_info (char *buffer ,char **start, off_t offset,
+static int pas16_abort(Scsi_Cmnd *);
+static int pas16_biosparam(struct scsi_device *, struct block_device *,
+			   sector_t, int*);
+static int pas16_detect(Scsi_Host_Template *);
+static int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+static int pas16_bus_reset(Scsi_Cmnd *);
+static int pas16_host_reset(Scsi_Cmnd *);
+static int pas16_device_reset(Scsi_Cmnd *);
+static int pas16_proc_info (char *buffer ,char **start, off_t offset,
 		     int length, int hostno, int inout);
 
 #ifndef NULL
diff -Nru a/drivers/scsi/pci2000.c b/drivers/scsi/pci2000.c
--- a/drivers/scsi/pci2000.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/pci2000.c	Wed Oct 30 16:44:29 2002
@@ -816,7 +816,6 @@
     return 0;
 	}
 
-#include "sd.h"
 /****************************************************************
  *	Name:	Pci2000_BiosParam
  *
@@ -830,15 +829,16 @@
  *	Returns:		zero.
  *
  ****************************************************************/
-int Pci2000_BiosParam (Scsi_Disk *disk, struct block_device *dev, int geom[])
+int Pci2000_BiosParam (struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int geom[])
 	{
 	PADAPTER2000	    padapter;
 
-	padapter = HOSTDATA(disk->device->host);
+	padapter = HOSTDATA(sdev->host);
 
 	if ( WaitReady (padapter) )
 		return 0;
-	outb_p (disk->device->id, padapter->mb0);
+	outb_p (sdev->id, padapter->mb0);
 	outb_p (CMD_GET_PARMS, padapter->cmd);
 	if ( WaitReady (padapter) )
 		return 0;
diff -Nru a/drivers/scsi/pci2000.h b/drivers/scsi/pci2000.h
--- a/drivers/scsi/pci2000.h	Wed Oct 30 16:44:33 2002
+++ b/drivers/scsi/pci2000.h	Wed Oct 30 16:44:33 2002
@@ -193,7 +193,9 @@
 int Pci2000_Abort			(Scsi_Cmnd *SCpnt);
 int Pci2000_Reset			(Scsi_Cmnd *SCpnt, unsigned int flags);
 int Pci2000_Release			(struct Scsi_Host *pshost);
-int Pci2000_BiosParam		(Disk *disk, struct block_device *dev, int geom[]);
+int Pci2000_BiosParam		(struct scsi_device *sdev,
+					struct block_device *bdev,
+					sector_t capacity, int geom[]);
 
 #ifndef NULL
 	#define NULL 0
diff -Nru a/drivers/scsi/pci2220i.c b/drivers/scsi/pci2220i.c
--- a/drivers/scsi/pci2220i.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/scsi/pci2220i.c	Wed Oct 30 16:44:19 2002
@@ -2887,8 +2887,6 @@
     return 0;
 	}
 
-#include "sd.h"
-
 /****************************************************************
  *	Name:	Pci2220i_BiosParam
  *
@@ -2902,13 +2900,14 @@
  *	Returns:		zero.
  *
  ****************************************************************/
-int Pci2220i_BiosParam (Scsi_Disk *disk, struct block_device *dev, int geom[])
+int Pci2220i_BiosParam (struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int geom[])
 	{
 	POUR_DEVICE	pdev;
 
-	if ( !(HOSTDATA(disk->device->host))->atapi )
+	if ( !(HOSTDATA(sdev->host))->atapi )
 		{
-		pdev = &(HOSTDATA(disk->device->host)->device[disk->device->id]);
+		pdev = &(HOSTDATA(sdev->host)->device[sdev->id]);
 
 		geom[0] = pdev->heads;
 		geom[1] = pdev->sectors;
diff -Nru a/drivers/scsi/pci2220i.h b/drivers/scsi/pci2220i.h
--- a/drivers/scsi/pci2220i.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/pci2220i.h	Wed Oct 30 16:44:28 2002
@@ -33,7 +33,9 @@
 int Pci2220i_Abort			(Scsi_Cmnd *SCpnt);
 int Pci2220i_Reset			(Scsi_Cmnd *SCpnt, unsigned int flags);
 int Pci2220i_Release		(struct Scsi_Host *pshost);
-int Pci2220i_BiosParam		(Disk *disk, struct block_device *dev, int geom[]);
+int Pci2220i_BiosParam		(struct scsi_device *sdev,
+					struct block_device *dev,
+					sector_t capacity, int geom[]);
 
 #ifndef NULL
 	#define NULL 0
diff -Nru a/drivers/scsi/pcmcia/Config.help b/drivers/scsi/pcmcia/Config.help
--- a/drivers/scsi/pcmcia/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,46 +0,0 @@
-CONFIG_SCSI_PCMCIA
-  Say Y here if you intend to attach a PCMCIA or CardBus card to your
-  computer which acts as a SCSI host adapter. These are credit card
-  size devices often used with laptops.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions PCMCIA SCSI host adapters.
-
-CONFIG_PCMCIA_NINJA_SCSI
-  If you intend to attach this type of PCMCIA SCSI host adapter to
-  your computer, say Y here and read
-  <file:Documentation/README.nsp_cs.eng>.
-
-  This driver is also available as a module called nsp_cs.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_PCMCIA_AHA152X
-  Say Y here if you intend to attach this type of PCMCIA SCSI host
-  adapter to your computer.
-
-  This driver is also available as a module called aha152x_cs.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_PCMCIA_QLOGIC
-  Say Y here if you intend to attach this type of PCMCIA SCSI host
-  adapter to your computer.
-
-  This driver is also available as a module called qlogic_cs.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_PCMCIA_FDOMAIN
-  Say Y here if you intend to attach this type of PCMCIA SCSI host
-  adapter to your computer.
-
-  This driver is also available as a module called fdomain_cs.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/scsi/pcmcia/Config.in b/drivers/scsi/pcmcia/Config.in
--- a/drivers/scsi/pcmcia/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-#
-# PCMCIA SCSI adapter configuration
-#
-
-mainmenu_option next_comment
-comment 'PCMCIA SCSI adapter support'
-
-bool 'PCMCIA SCSI adapter support' CONFIG_SCSI_PCMCIA
-if [ "$CONFIG_SCSI_PCMCIA" = "y" ]; then
-   dep_tristate '  Adaptec AHA152X PCMCIA support' CONFIG_PCMCIA_AHA152X m
-   dep_tristate '  Future Domain PCMCIA support' CONFIG_PCMCIA_FDOMAIN m
-   dep_tristate	'  NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support' CONFIG_PCMCIA_NINJA_SCSI m
-   dep_tristate '  Qlogic PCMCIA support' CONFIG_PCMCIA_QLOGIC m
-fi
-
-if [ "$CONFIG_PCMCIA_QLOGIC" = "y" -o "$CONFIG_PCMCIA_AHA152X" = "y" -o \
-     "$CONFIG_PCMCIA_FDOMAIN" = "y" -o "$CONFIG_PCMCIA_NINJA_SCSI" = "y" ]; then
-   define_bool CONFIG_PCMCIA_SCSICARD y
-fi
-
-endmenu
diff -Nru a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/scsi/pcmcia/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,74 @@
+#
+# PCMCIA SCSI adapter configuration
+#
+
+menu "PCMCIA SCSI adapter support"
+	depends on SCSI!=n && HOTPLUG && PCMCIA!=n
+
+config SCSI_PCMCIA
+	bool "PCMCIA SCSI adapter support"
+	help
+	  Say Y here if you intend to attach a PCMCIA or CardBus card to your
+	  computer which acts as a SCSI host adapter. These are credit card
+	  size devices often used with laptops.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions PCMCIA SCSI host adapters.
+
+config PCMCIA_AHA152X
+	tristate "Adaptec AHA152X PCMCIA support"
+	depends on SCSI_PCMCIA && m
+	help
+	  Say Y here if you intend to attach this type of PCMCIA SCSI host
+	  adapter to your computer.
+
+	  This driver is also available as a module called aha152x_cs.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config PCMCIA_FDOMAIN
+	tristate "Future Domain PCMCIA support"
+	depends on SCSI_PCMCIA && m
+	help
+	  Say Y here if you intend to attach this type of PCMCIA SCSI host
+	  adapter to your computer.
+
+	  This driver is also available as a module called fdomain_cs.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config PCMCIA_NINJA_SCSI
+	tristate "NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support"
+	depends on SCSI_PCMCIA && m
+	help
+	  If you intend to attach this type of PCMCIA SCSI host adapter to
+	  your computer, say Y here and read
+	  <file:Documentation/README.nsp_cs.eng>.
+
+	  This driver is also available as a module called nsp_cs.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config PCMCIA_QLOGIC
+	tristate "Qlogic PCMCIA support"
+	depends on SCSI_PCMCIA && m
+	help
+	  Say Y here if you intend to attach this type of PCMCIA SCSI host
+	  adapter to your computer.
+
+	  This driver is also available as a module called qlogic_cs.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config PCMCIA_SCSICARD
+	bool
+	depends on PCMCIA_QLOGIC=y || PCMCIA_AHA152X=y || PCMCIA_FDOMAIN=y || PCMCIA_NINJA_SCSI=y
+	default y
+
+endmenu
+
diff -Nru a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
--- a/drivers/scsi/pcmcia/nsp_cs.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/scsi/pcmcia/nsp_cs.c	Wed Oct 30 16:44:35 2002
@@ -1,8 +1,10 @@
 /*======================================================================
 
-    NinjaSCSI-3 / NinjaSCSI-32Bi PCMCIA SCSI hostadapter card driver
+    NinjaSCSI-3 / NinjaSCSI-32Bi PCMCIA SCSI host adapter card driver
       By: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
 
+    Ver.2.8   Support 32bit MMIO mode
+              Support Synchronous Data TRansfer (SDTR) mode
     Ver.2.0   Support 32bit PIO mode
     Ver.1.1.2 Fix for scatter list buffer exceeds
     Ver.1.1   Support scatter list
@@ -23,7 +25,7 @@
 
 ***********************************************************************/
 
-/* $Id: nsp_cs.c,v 1.42 2001/09/10 10:30:58 elca Exp $ */
+/* $Id: nsp_cs.c,v 1.4 2002/10/15 15:57:01 elca Exp $ */
 
 #ifdef NSP_KERNEL_2_2
 #include <pcmcia/config.h>
@@ -39,7 +41,6 @@
 #include <linux/timer.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-#include <linux/tqueue.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/major.h>
@@ -51,7 +52,6 @@
 
 #include <../drivers/scsi/scsi.h>
 #include <../drivers/scsi/hosts.h>
-#include <../drivers/scsi/sd.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_ioctl.h>
@@ -60,20 +60,24 @@
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
+#include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
+#include <pcmcia/bus_ops.h>
 
 #include "nsp_cs.h"
 
 MODULE_AUTHOR("YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>");
-MODULE_DESCRIPTION("WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI host adapter module");
+MODULE_DESCRIPTION("WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI host adapter module $Revision: 1.4 $");
 MODULE_SUPPORTED_DEVICE("sd,sr,sg,st");
+#ifdef MODULE_LICENSE
 MODULE_LICENSE("GPL");
+#endif
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
 MODULE_PARM(pc_debug, "i");
 MODULE_PARM_DESC(pc_debug, "set debug level");
-static char *version = "$Id: nsp_cs.c,v 1.42 2001/09/10 10:30:58 elca Exp $";
+static char *version = "$Id: nsp_cs.c,v 1.4 2002/10/15 15:57:01 elca Exp $";
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 #else
 #define DEBUG(n, args...) /* */
@@ -108,48 +112,56 @@
 
 static unsigned int irq_mask = 0xffff;
 MODULE_PARM(irq_mask, "i");
-MODULE_PARM_DESC(irq_mask, "IRQ mask bits");
+MODULE_PARM_DESC(irq_mask, "IRQ mask bits (default: 0xffff)");
 
 static int irq_list[4] = { -1 };
 MODULE_PARM(irq_list, "1-4i");
-MODULE_PARM_DESC(irq_list, "IRQ number list");
+MODULE_PARM_DESC(irq_list, "Use specified IRQ number. (default: auto select)");
 
-/*----------------------------------------------------------------*/
-/* driver state info, local to driver */
-static char nspinfo[100];     /* description */
+static int nsp_burst_mode = 2;
+MODULE_PARM(nsp_burst_mode, "i");
+MODULE_PARM_DESC(nsp_burst_mode, "Burst transfer mode (0=io8, 1=io32, 2=mem32(default))");
+
+/* Release IO ports after configuration? */
+static int free_ports = 0;
+MODULE_PARM(free_ports, "i");
+MODULE_PARM_DESC(free_ports, "Release IO ports after configuration? (default: 0 (=no))");
 
 /* /usr/src/linux/drivers/scsi/hosts.h */
 static Scsi_Host_Template driver_template = {
-/*	next:			NULL,*/
-#if (KERNEL_VERSION(2,3,99) > LINUX_VERSION_CODE)
-	proc_dir:	       &proc_scsi_nsp, /* kernel 2.2 */
+/*	.next			 = NULL,*/
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
+	.proc_name	         = "nsp_cs",      /* kernel 2.4 */
 #else
-	proc_name:	       "nsp_cs",       /* kernel 2.4 */
+	.proc_dir	         = &proc_scsi_nsp, /* kernel 2.2 */
+#endif
+	.proc_info		 = nsp_proc_info,
+	.name			 = "WorkBit NinjaSCSI-3/32Bi",
+	.detect			 = nsp_detect,
+	.release		 = nsp_release,
+	.info			 = nsp_info,
+/*	.command		 = NULL,*/
+	.queuecommand		 = nsp_queuecommand,
+/*	.eh_strategy_handler	 = nsp_eh_strategy,*/
+/*	.eh_abort_handler	 = nsp_eh_abort,*/
+/*	.eh_device_reset_handler = nsp_eh_device_reset,*/
+	.eh_bus_reset_handler	 = nsp_eh_bus_reset,
+	.eh_host_reset_handler	 = nsp_eh_host_reset,
+	.abort			 = nsp_abort,
+	.reset			 = nsp_reset,
+/*	.slave_attach		 = NULL,*/
+/*	.bios_param		 = NULL,*/
+	.can_queue		 = 1,
+	.this_id		 = NSP_INITIATOR_ID,
+	.sg_tablesize		 = SG_ALL,
+	.cmd_per_lun		 = 1,
+/*	.present		 = 0,*/
+/*	.unchecked_isa_dma	 = 0,*/
+	.use_clustering		 = DISABLE_CLUSTERING,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,2))
+	.use_new_eh_code	 = 1,
 #endif
-/*	proc_info:		NULL,*/
-	name:			"WorkBit NinjaSCSI-3/32Bi",
-	detect:			nsp_detect,
-	release:		nsp_release,
-	info:			nsp_info,
-/*	command:		NULL,*/
-	queuecommand:		nsp_queuecommand,
-/*	eh_strategy_handler:	nsp_eh_strategy,*/
-	eh_abort_handler:	nsp_eh_abort,
-	eh_device_reset_handler: nsp_eh_device_reset,
-	eh_bus_reset_handler:	nsp_eh_bus_reset,
-	eh_host_reset_handler:	nsp_eh_host_reset,
-	abort:			nsp_abort,
-	reset:			nsp_reset,
-/*	slave_attach:		NULL,*/
-/*	bios_param:		NULL,*/
-	can_queue:		1,
-	this_id:		SCSI_INITIATOR_ID,
-	sg_tablesize:		SG_ALL,
-	cmd_per_lun:		1,
-/*	present:		0,*/
-/*	unchecked_isa_dma:	0,*/
-	use_clustering:		DISABLE_CLUSTERING,
-/*	emulated:		0,*/
+/*	.emulated		 = 0,*/
 };
 
 static dev_link_t *dev_list = NULL;
@@ -162,18 +174,18 @@
 static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
 {
 #ifdef PCMCIA_DEBUG
-	//unsigned int host_id = SCpnt->host->this_id;
-	//unsigned int base    = SCpnt->host->io_port;
+	/*unsigned int host_id = SCpnt->host->this_id;*/
+	/*unsigned int base    = SCpnt->host->io_port;*/
 	unsigned char target = SCpnt->target;
 #endif
 	nsp_hw_data *data = &nsp_data;
 
-	DEBUG(0, __FUNCTION__ "() SCpnt=0x%p target=%d lun=%d buff=0x%p bufflen=%d use_sg=%d\n",
-	      SCpnt, target, SCpnt->lun, SCpnt->request_buffer, SCpnt->request_bufflen, SCpnt->use_sg);
+	DEBUG(0, "%s() SCpnt=0x%p target=%d lun=%d buff=0x%p bufflen=%d use_sg=%d\n",
+	      __FUNCTION__,  SCpnt, target, SCpnt->lun, SCpnt->request_buffer, SCpnt->request_bufflen, SCpnt->use_sg);
 	//DEBUG(0, " before CurrentSC=0x%p\n", data->CurrentSC);
 
 	if(data->CurrentSC != NULL) {
-		printk(KERN_DEBUG " " __FUNCTION__ "() CurrentSC!=NULL this can't be happen\n");
+		printk(KERN_DEBUG " %s() CurrentSC!=NULL cannot happen!\n", __FUNCTION__);
 		data->CurrentSC = NULL;
 		SCpnt->result   = DID_BAD_TARGET << 16;
 		done(SCpnt);
@@ -184,13 +196,13 @@
 
 	SCpnt->scsi_done	= done;
 	data->CurrentSC		= SCpnt;
-	RESID		        = SCpnt->request_bufflen;
 
-	SCpnt->SCp.Status	= -1;
-	SCpnt->SCp.Message	= -1;
+	SCpnt->SCp.Status	= CHECK_CONDITION;
+	SCpnt->SCp.Message	= 0;
 	SCpnt->SCp.have_data_in = IO_UNKNOWN;
 	SCpnt->SCp.sent_command = 0;
 	SCpnt->SCp.phase	= PH_UNDETERMINED;
+	RESID		        = SCpnt->request_bufflen;
 
 	/* setup scratch area
 	   SCp.ptr		: buffer pointer
@@ -200,7 +212,7 @@
 	   SCp.phase		: current state of the command */
 	if (SCpnt->use_sg) {
 		SCpnt->SCp.buffer	    = (struct scatterlist *) SCpnt->request_buffer;
-		SCpnt->SCp.ptr		    = SCpnt->SCp.buffer->address;
+		SCpnt->SCp.ptr		    = BUFFER_ADDR;
 		SCpnt->SCp.this_residual    = SCpnt->SCp.buffer->length;
 		SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
 	} else {
@@ -219,7 +231,7 @@
 	}
 
 
-	//DEBUG(0, __FUNCTION__ "() out\n");
+	//DEBUG(0, __func__ "() out\n");
 	return 0;
 }
 
@@ -231,7 +243,7 @@
 	unsigned int  base = data->BaseAddress;
 	unsigned char transfer_mode_reg;
 
-	//DEBUG(0, __FUNCTION__ "() enabled=%d\n", enabled);
+	//DEBUG(0, __func__ "() enabled=%d\n", enabled);
 
 	if (enabled != FALSE) {
 		transfer_mode_reg = TRANSFER_GO | BRAIND;
@@ -244,31 +256,35 @@
 	nsp_index_write(base, TRANSFERMODE, transfer_mode_reg);
 }
 
+static void nsphw_init_sync(nsp_hw_data *data)
+{
+	sync_data tmp_sync = { .SyncNegotiation = SYNC_NOT_YET,
+			       .SyncPeriod      = 0,
+			       .SyncOffset      = 0
+	};
+	int i;
+
+	/* setup sync data */
+	for ( i = 0; i < N_TARGET; i++ ) {
+		data->Sync[i] = tmp_sync;
+	}
+}
+
 /*
  * Initialize Ninja hardware
  */
 static int nsphw_init(nsp_hw_data *data)
 {
 	unsigned int base     = data->BaseAddress;
-	int	     i, j;
-	sync_data    tmp_sync = { SyncNegotiation: SYNC_NOT_YET,
-				  SyncPeriod:	   0,
-				  SyncOffset:	   0
-	};
 
-	DEBUG(0, __FUNCTION__ "() in base=0x%x\n", base);
+	DEBUG(0, "%s() in base=0x%x\n", __FUNCTION__, base);
 
-	data->ScsiClockDiv = CLOCK_40M;
+	data->ScsiClockDiv = CLOCK_40M | FAST_20;
 	data->CurrentSC    = NULL;
 	data->FifoCount    = 0;
 	data->TransferMode = MODE_IO8;
 
-	/* setup sync data */
-	for ( i = 0; i < N_TARGET; i++ ) {
-		for ( j = 0; j < N_LUN; j++ ) {
-			data->Sync[i][j] = tmp_sync;
-		}
-	}
+	nsphw_init_sync(data);
 
 	/* block all interrupts */
 	nsp_write(base,	      IRQCONTROL,   IRQCONTROL_ALLMASK);
@@ -321,10 +337,10 @@
 	unsigned int  host_id	 = SCpnt->host->this_id;
 	unsigned int  base	 = SCpnt->host->io_port;
 	unsigned char target	 = SCpnt->target;
-	int	      wait_count;
+	int	      time_out;
 	unsigned char phase, arbit;
 
-	//DEBUG(0, __FUNCTION__ "()in\n");
+	//DEBUG(0, __func__ "()in\n");
 
 	phase = nsp_index_read(base, SCSIBUSMON);
 	if(phase != BUSMON_BUS_FREE) {
@@ -337,14 +353,14 @@
 	SCpnt->SCp.phase = PH_ARBSTART;
 	nsp_index_write(base, SETARBIT, ARBIT_GO);
 
-	wait_count = jiffies + 10 * HZ;
+	time_out = 1000;
 	do {
 		/* XXX: what a stupid chip! */
 		arbit = nsp_index_read(base, ARBITSTATUS);
 		//DEBUG(0, " arbit=%d, wait_count=%d\n", arbit, wait_count);
 		udelay(1); /* hold 1.2us */
 	} while((arbit & (ARBIT_WIN | ARBIT_FAIL)) == 0 &&
-		time_before(jiffies, wait_count));
+		(time_out-- != 0));
 
 	if((arbit & ARBIT_WIN) == 0) {
 		//DEBUG(0, " arbit fail\n");
@@ -356,13 +372,13 @@
 	//DEBUG(0, " assert SEL line\n");
 	SCpnt->SCp.phase = PH_SELSTART;
 	udelay(3);
-	nsp_index_write(base, SCSIDATALATCH, (1 << host_id) | (1 << target));
-	nsp_index_write(base, SCSIBUSCTRL,   SCSI_SEL | SCSI_BSY | SCSI_ATN);
+	nsp_index_write(base, SCSIDATALATCH, BIT(host_id) | BIT(target));
+	nsp_index_write(base, SCSIBUSCTRL,   SCSI_SEL | SCSI_BSY                    | SCSI_ATN);
 	udelay(3);
 	nsp_index_write(base, SCSIBUSCTRL,   SCSI_SEL | SCSI_BSY | SCSI_DATAOUT_ENB | SCSI_ATN);
 	nsp_index_write(base, SETARBIT,	     ARBIT_FLAG_CLEAR);
 	udelay(3);
-	nsp_index_write(base, SCSIBUSCTRL,   SCSI_SEL | SCSI_DATAOUT_ENB | SCSI_ATN);
+	nsp_index_write(base, SCSIBUSCTRL,   SCSI_SEL            | SCSI_DATAOUT_ENB | SCSI_ATN);
 
 	/* check selection timeout */
 	nsp_start_timer(SCpnt, data, 1000/51);
@@ -399,23 +415,21 @@
 static int nsp_msg(Scsi_Cmnd *SCpnt, nsp_hw_data *data)
 {
 	unsigned char	       target = SCpnt->target;
-	unsigned char	       lun    = SCpnt->lun;
-	sync_data	      *sync   = &(data->Sync[target][lun]);
+//	unsigned char	       lun    = SCpnt->lun;
+	sync_data	      *sync   = &(data->Sync[target]);
 	struct nsp_sync_table *sync_table;
 	unsigned int	       period, offset;
 	int		       i;
 
 
-	DEBUG(0, __FUNCTION__ "()\n");
-
-/**!**/
+	DEBUG(0, "%s()\n", __FUNCTION__);
 
 	period = sync->SyncPeriod;
 	offset = sync->SyncOffset;
 
 	DEBUG(0, " period=0x%x, offset=0x%x\n", period, offset);
 
-	if (data->ScsiClockDiv == CLOCK_20M) {
+	if ((data->ScsiClockDiv & (BIT(0)|BIT(1))) == CLOCK_20M) {
 		sync_table = &nsp_sync_table_20M[0];
 	} else {
 		sync_table = &nsp_sync_table_40M[0];
@@ -438,7 +452,6 @@
 		sync->SyncOffset      = 0;
 		sync->SyncRegister    = 0;
 		sync->AckWidth	      = 0;
-		sync->SyncNegotiation = SYNC_OK;
 
 		return FALSE;
 	}
@@ -446,7 +459,6 @@
 	sync->SyncRegister    = (sync_table->chip_period << SYNCREG_PERIOD_SHIFT) |
 		                (offset & SYNCREG_OFFSET_MASK);
 	sync->AckWidth	      = sync_table->ack_width;
-	sync->SyncNegotiation = SYNC_OK;
 
 	DEBUG(0, " sync_reg=0x%x, ack_width=0x%x\n", sync->SyncRegister, sync->AckWidth);
 
@@ -461,7 +473,7 @@
 {
 	unsigned int base = SCpnt->host->io_port;
 
-	//DEBUG(0, __FUNCTION__ "() in SCpnt=0x%p, time=%d\n", SCpnt, time);
+	//DEBUG(0, __func__ "() in SCpnt=0x%p, time=%d\n", SCpnt, time);
 	data->TimerCount = time;
 	nsp_index_write(base, TIMERCOUNT, time);
 }
@@ -473,21 +485,21 @@
 {
 	unsigned int  base = SCpnt->host->io_port;
 	unsigned char reg;
-	int	      count, i = TRUE;
+	int	      time_out;
 
-	//DEBUG(0, __FUNCTION__ "()\n");
+	//DEBUG(0, __func__ "()\n");
 
-	count = jiffies + HZ;
+	time_out = 100;
 
 	do {
 		reg = nsp_index_read(base, SCSIBUSMON);
 		if (reg == 0xff) {
 			break;
 		}
-	} while ((i = time_before(jiffies, count)) && (reg & mask) != 0);
+	} while ((time_out-- != 0) && (reg & mask) != 0);
 
-	if (!i) {
-		printk(KERN_DEBUG __FUNCTION__ " %s signal off timeut\n", str);
+	if (time_out == 0) {
+		printk(KERN_DEBUG "%s: %s signal off timeut\n", __FUNCTION__, str);
 	}
 
 	return 0;
@@ -501,12 +513,12 @@
 			     unsigned char  mask)
 {
 	unsigned int  base	 = SCpnt->host->io_port;
-	int	      wait_count;
+	int	      time_out;
 	unsigned char phase, i_src;
 
-	//DEBUG(0, __FUNCTION__ "() current_phase=0x%x, mask=0x%x\n", current_phase, mask);
+	//DEBUG(0, __func__ "() current_phase=0x%x, mask=0x%x\n", current_phase, mask);
 
-	wait_count = jiffies + HZ;
+	time_out = 100;
 	do {
 		phase = nsp_index_read(base, SCSIBUSMON);
 		if (phase == 0xff) {
@@ -522,9 +534,9 @@
 			//DEBUG(0, " ret 1 phase=0x%x\n", phase);
 			return 1;
 		}
-	} while(time_before(jiffies, wait_count));
+	} while(time_out-- != 0);
 
-	//DEBUG(0, __FUNCTION__ " : " __FUNCTION__ " timeout\n");
+	//DEBUG(0, __func__ " : " __func__ " timeout\n");
 	return -1;
 }
 
@@ -539,7 +551,7 @@
 	int	      ptr;
 	int	      ret;
 
-	//DEBUG(0, __FUNCTION__ "()\n");
+	//DEBUG(0, __func__ "()\n");
 	for (ptr = 0; len > 0; len --, ptr ++) {
 
 		ret = nsp_expect_signal(SCpnt, phase, BUSMON_REQ);
@@ -574,7 +586,7 @@
 {
 	unsigned int count;
 
-	//DEBUG(0, __FUNCTION__ "()\n");
+	//DEBUG(0, __func__ "()\n");
 
 	if (SCpnt->SCp.have_data_in != IO_IN) {
 		return 0;
@@ -590,11 +602,11 @@
 	 * XXX: NSP_QUIRK
 	 * data phase skip only occures in case of SCSI_LOW_READ
 	 */
+	DEBUG(0, " use bypass quirk\n");
 	SCpnt->SCp.phase = PH_DATA;
 	nsp_pio_read(SCpnt, data);
 	nsp_setup_fifo(data, FALSE);
 
-	DEBUG(0, " use bypass quirk\n");
 	return 0;
 }
 
@@ -606,7 +618,7 @@
 	unsigned int  base = SCpnt->host->io_port;
 	unsigned char reg;
 
-	//DEBUG(0, __FUNCTION__ "()\n");
+	//DEBUG(0, __func__ "()\n");
 
 	nsp_negate_signal(SCpnt, BUSMON_SEL, "reselect<SEL>");
 
@@ -625,17 +637,18 @@
 {
 	unsigned int base = SCpnt->host->io_port;
 	unsigned int count;
-	unsigned int l, m, h;
+	unsigned int l, m, h, dummy;
 
-	nsp_index_write(base, POINTERCLR, POINTER_CLEAR);
+	nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER);
 
-        l = (unsigned int)nsp_read(base, DATAREG);
-        m = (unsigned int)nsp_read(base, DATAREG);
-        h = (unsigned int)nsp_read(base, DATAREG);
+	l     = nsp_index_read(base, TRANSFERCOUNT);
+	m     = nsp_index_read(base, TRANSFERCOUNT);
+	h     = nsp_index_read(base, TRANSFERCOUNT);
+	dummy = nsp_index_read(base, TRANSFERCOUNT);
 
 	count = (h << 16) | (m << 8) | (l << 0);
 
-	//DEBUG(0, __FUNCTION__ "() =0x%x\n", count);
+	//DEBUG(0, __func__ "() =0x%x\n", count);
 
 	return count;
 }
@@ -649,25 +662,27 @@
  */
 static void nsp_pio_read(Scsi_Cmnd *SCpnt, nsp_hw_data *data)
 {
-	unsigned int  base     = SCpnt->host->io_port;
-	int	      time_out, i;
+	unsigned int  base      = SCpnt->host->io_port;
+	unsigned long mmio_base = SCpnt->host->base;
+	long	      time_out;
 	int	      ocount, res;
 	unsigned char stat, fifo_stat;
 
 	ocount = data->FifoCount;
 
-	DEBUG(0, __FUNCTION__ "() in SCpnt=0x%p resid=%d ocount=%d ptr=0x%p this_residual=%d buffers=0x%p nbuf=%d\n", SCpnt, RESID, ocount, SCpnt->SCp.ptr, SCpnt->SCp.this_residual, SCpnt->SCp.buffer, SCpnt->SCp.buffers_residual);
+	DEBUG(0, "%s() in SCpnt=0x%p resid=%d ocount=%d ptr=0x%p this_residual=%d buffers=0x%p nbuf=%d\n", 
+		__FUNCTION__, SCpnt, RESID, ocount, SCpnt->SCp.ptr, SCpnt->SCp.this_residual, SCpnt->SCp.buffer, SCpnt->SCp.buffers_residual);
 
-	time_out = jiffies + 10 * HZ;
+	time_out = 1000;
 
-	while ((i = time_before(jiffies,time_out)) &&
+	while ((time_out-- != 0) &&
 	       (SCpnt->SCp.this_residual > 0 || SCpnt->SCp.buffers_residual > 0 ) ) {
 
 		stat = nsp_index_read(base, SCSIBUSMON);
 		stat &= BUSMON_PHASE_MASK;
 
-		res = nsp_fifo_count(SCpnt) - ocount;
 
+		res = nsp_fifo_count(SCpnt) - ocount;
 		//DEBUG(0, " ptr=0x%p this=0x%x ocount=0x%x res=0x%x\n", SCpnt->SCp.ptr, SCpnt->SCp.this_residual, ocount, res);
 		if (res == 0) { /* if some data avilable ? */
 			if (stat == BUSPHASE_DATA_IN) { /* phase changed? */
@@ -695,9 +710,15 @@
 		case MODE_IO8:
 			nsp_fifo8_read (base, SCpnt->SCp.ptr, res     );
 			break;
+
+		case MODE_MEM32:
+			res &= ~(BIT(1)|BIT(0)); /* align 4 */
+			nsp_mmio_fifo32_read(mmio_base, SCpnt->SCp.ptr, res >> 2);
+			break;
+
 		default:
 			DEBUG(0, "unknown read mode\n");
-			break;
+			return;
 		}
 
 		RESID			 -= res;
@@ -712,17 +733,19 @@
 			//DEBUG(0, " scatterlist next timeout=%d\n", time_out);
 			SCpnt->SCp.buffers_residual--;
 			SCpnt->SCp.buffer++;
-			SCpnt->SCp.ptr		 = SCpnt->SCp.buffer->address;
+			SCpnt->SCp.ptr		 = BUFFER_ADDR;
 			SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
-		}
+			time_out = 1000;
 
-		time_out = jiffies + 10 * HZ;
+			//DEBUG(0, "page: 0x%p, off: 0x%x\n", SCpnt->SCp.buffer->page, SCpnt->SCp.buffer->offset);
+		}
 	}
 
 	data->FifoCount = ocount;
 
-	if (!i) {
-		printk(KERN_DEBUG __FUNCTION__ "() pio read timeout resid=%d this_residual=%d buffers_residual=%d\n", RESID, SCpnt->SCp.this_residual, SCpnt->SCp.buffers_residual);
+	if (time_out == 0) {
+		printk(KERN_DEBUG "%s() pio read timeout resid=%d this_residual=%d buffers_residual=%d\n", 
+			__FUNCTION__, RESID, SCpnt->SCp.this_residual, SCpnt->SCp.buffers_residual);
 	}
 	DEBUG(0, " read ocount=0x%x\n", ocount);
 }
@@ -733,22 +756,32 @@
 static void nsp_pio_write(Scsi_Cmnd *SCpnt, nsp_hw_data *data)
 {
 	unsigned int  base     = SCpnt->host->io_port;
-	int	      time_out, i;
-	unsigned int  ocount, res;
+	unsigned long mmio_base = SCpnt->host->base;
+	int	      time_out;
+	int           ocount, res;
 	unsigned char stat;
 
 	ocount	 = data->FifoCount;
 
-	DEBUG(0, __FUNCTION__ "() in fifocount=%d ptr=0x%p this_residual=%d buffers=0x%p nbuf=%d resid=0x%x\n", data->FifoCount, SCpnt->SCp.ptr, SCpnt->SCp.this_residual, SCpnt->SCp.buffer, SCpnt->SCp.buffers_residual, RESID);
+	DEBUG(0,  "%s() in fifocount=%d ptr=0x%p this_residual=%d buffers=0x%p nbuf=%d resid=0x%x\n", __FUNCTION__, data->FifoCount, SCpnt->SCp.ptr, SCpnt->SCp.this_residual, SCpnt->SCp.buffer, SCpnt->SCp.buffers_residual, RESID);
 
-	time_out = jiffies + 10 * HZ;
+	time_out = 1000;
 
-	while ((i = time_before(jiffies, time_out))                             &&
+	while ((time_out-- != 0) &&
 	       (SCpnt->SCp.this_residual > 0 || SCpnt->SCp.buffers_residual > 0)) {
 		stat = nsp_index_read(base, SCSIBUSMON);
 		stat &= BUSMON_PHASE_MASK;
+
 		if (stat != BUSPHASE_DATA_OUT) {
-			DEBUG(0, " phase changed stat=0x%x\n", stat);
+			res = ocount - nsp_fifo_count(SCpnt);
+
+			DEBUG(0, " phase changed stat=0x%x, res=%d\n", stat, res);
+			/* Put back pointer */
+			RESID			 += res;
+			SCpnt->SCp.ptr		 -= res;
+			SCpnt->SCp.this_residual += res;
+			ocount			 -= res;
+
 			break;
 		}
 
@@ -769,6 +802,12 @@
 		case MODE_IO8:
 			nsp_fifo8_write (base, SCpnt->SCp.ptr, res     );
 			break;
+
+		case MODE_MEM32:
+			res &= ~(BIT(1)|BIT(0)); /* align 4 */
+			nsp_mmio_fifo32_write(mmio_base, SCpnt->SCp.ptr, res >> 2);
+			break;
+
 		default:
 			DEBUG(0, "unknown write mode\n");
 			break;
@@ -785,19 +824,18 @@
 			//DEBUG(0, " scatterlist next\n");
 			SCpnt->SCp.buffers_residual--;
 			SCpnt->SCp.buffer++;
-			SCpnt->SCp.ptr		 = SCpnt->SCp.buffer->address;
+			SCpnt->SCp.ptr		 = BUFFER_ADDR;
 			SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
+			time_out = 1000;
 		}
-
-		time_out = jiffies + 10 * HZ;
 	}
 
 	data->FifoCount = ocount;
 
-	if (!i) {
-		printk(KERN_DEBUG __FUNCTION__ "() pio write timeout resid=%d\n", RESID);
+	if (time_out == 0) {
+		printk(KERN_DEBUG "%s() pio write timeout resid=0x%x\n", __FUNCTION__, RESID);
 	}
-	//DEBUG(0, " write ocount=%d\n", ocount);
+	DEBUG(0, " write ocount=0x%x\n", ocount);
 }
 
 #undef RFIFO_CRIT
@@ -810,20 +848,25 @@
 {
 	unsigned int   base   = SCpnt->host->io_port;
 	unsigned char  target = SCpnt->target;
-	unsigned char  lun    = SCpnt->lun;
-	sync_data     *sync   = &(data->Sync[target][lun]);
+//	unsigned char  lun    = SCpnt->lun;
+	sync_data     *sync   = &(data->Sync[target]);
 
-	//DEBUG(0, __FUNCTION__ "() in SCpnt=0x%p\n", SCpnt);
+	//DEBUG(0, __func__ "() in SCpnt=0x%p\n", SCpnt);
 
 	/* setup synch transfer registers */
 	nsp_index_write(base, SYNCREG,	sync->SyncRegister);
 	nsp_index_write(base, ACKWIDTH, sync->AckWidth);
 
-	if (RESID % 4 != 0   ||
-	    RESID     <= 256 ) {
+	if (SCpnt->use_sg == 0     ||
+	    RESID % 4 != 0         ||
+	    RESID     <= PAGE_SIZE ) {
 		data->TransferMode = MODE_IO8;
-	} else {
+	} else if (nsp_burst_mode == BURST_MEM32) {
+		data->TransferMode = MODE_MEM32;
+	} else if (nsp_burst_mode == BURST_IO32) {
 		data->TransferMode = MODE_IO32;
+	} else {
+		data->TransferMode = MODE_IO8;
 	}
 
 	/* setup pdma fifo */
@@ -848,24 +891,13 @@
 	unsigned int   base;
 	unsigned char  i_src, irq_phase, phase;
 	Scsi_Cmnd     *tmpSC;
-	int            len;
 	unsigned char  target, lun;
 	unsigned int  *sync_neg;
 	int            i, tmp;
-	nsp_hw_data   *data;
+	nsp_hw_data   *data = dev_id;
 
 	//printk("&nsp_data=0x%p, dev_id=0x%p\n", &nsp_data, dev_id);
 
-	/* sanity check */
-	if (&nsp_data != dev_id) {
-		DEBUG(0, " irq conflict? this can't happen\n");
-		return;
-	}
-	data = dev_id;
-	if (irq != data->IrqNumber) {
-		return;
-	}
-
 	base = data->BaseAddress;
 	//DEBUG(0, " base=0x%x\n", base);
 
@@ -874,13 +906,13 @@
 	 */
 	nsp_write(base, IRQCONTROL, IRQCONTROL_IRQDISABLE);
 	i_src = nsp_read(base, IRQSTATUS);
-	if (i_src == 0xff || (i_src & IRQSTATUS_MASK) == 0) {
+	//DEBUG(0, " i_src=0x%x\n", i_src);
+	if ((i_src == 0xff) || ((i_src & IRQSTATUS_MASK) == 0)) {
 		nsp_write(base, IRQCONTROL, 0);
-		//DEBUG(0, " no irq\n");
+		//DEBUG(0, " no irq/shared irq\n");
 		return;
 	}
 
-	//DEBUG(0, " i_src=0x%x\n", i_src);
 
 	/* XXX: IMPORTANT
 	 * Do not read an irq_phase register if no scsi phase interrupt.
@@ -916,13 +948,13 @@
 	nsp_write(base, IRQCONTROL, IRQCONTROL_TIMER_CLEAR | IRQCONTROL_FIFO_CLEAR);
 
 	if (data->CurrentSC == NULL) {
-		printk(KERN_DEBUG __FUNCTION__ " CurrentSC==NULL irq_status=0x%x phase=0x%x irq_phase=0x%x this can't be happen\n", i_src, phase, irq_phase);
+		printk(KERN_DEBUG "%s: CurrentSC==NULL irq_status=0x%x phase=0x%x irq_phase=0x%x cannot happen\n", __FUNCTION__, i_src, phase, irq_phase);
 		return;
 	} else {
 		tmpSC    = data->CurrentSC;
 		target   = tmpSC->target;
 		lun      = tmpSC->lun;
-		sync_neg = &(data->Sync[target][lun].SyncNegotiation);
+		sync_neg = &(data->Sync[target].SyncNegotiation);
 	}
 
 	/*
@@ -930,10 +962,12 @@
 	 */
 	if ((i_src & IRQSTATUS_SCSI) != 0) {
 		if ((irq_phase & SCSI_RESET_IRQ) != 0) {
-			printk(KERN_DEBUG " " __FUNCTION__ "() bus reset (power off?)\n");
+			printk(KERN_DEBUG " %s() bus reset (power off?)\n", __FUNCTION__);
 			*sync_neg          = SYNC_NOT_YET;
 			data->CurrentSC    = NULL;
-			tmpSC->result	   = DID_RESET << 16;
+			tmpSC->result	   = (DID_RESET                   << 16) |
+				             ((tmpSC->SCp.Message & 0xff) <<  8) |
+				             ((tmpSC->SCp.Status  & 0xff) <<  0);
 			tmpSC->scsi_done(tmpSC);
 			return;
 		}
@@ -955,7 +989,7 @@
 
 	switch(tmpSC->SCp.phase) {
 	case PH_SELSTART:
-		*sync_neg = SYNC_NOT_YET;
+		//*sync_neg = SYNC_NOT_YET;
 		if ((phase & BUSMON_BSY) == 0) {
 			//DEBUG(0, " selection count=%d\n", data->SelectionTimeOut);
 			if (data->SelectionTimeOut >= NSP_SELTIMEOUT) {
@@ -987,7 +1021,7 @@
 
 	case PH_RESELECT:
 		//DEBUG(0, " phase reselect\n");
-		*sync_neg = SYNC_NOT_YET;
+		//*sync_neg = SYNC_NOT_YET;
 		if ((phase & BUSMON_PHASE_MASK) != BUSPHASE_MESSAGE_IN) {
 
 			data->CurrentSC = NULL;
@@ -1009,16 +1043,18 @@
 	//DEBUG(0, " start scsi seq\n");
 
 	/* normal disconnect */
-	if ((irq_phase & LATCHED_BUS_FREE) != 0) {
-		//DEBUG(0, " normal disconnect i_src=0x%x, phase=0x%x, irq_phase=0x%x\n", i_src, phase, irq_phase);
+	if (((tmpSC->SCp.phase == PH_MSG_IN) || (tmpSC->SCp.phase == PH_MSG_OUT)) &&
+	    (irq_phase & LATCHED_BUS_FREE) != 0 ) {
+		DEBUG(0, " normal disconnect i_src=0x%x, phase=0x%x, irq_phase=0x%x\n", i_src, phase, irq_phase);
 		if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) {     /* all command complete and return status */
-			*sync_neg       = SYNC_NOT_YET;
+			//*sync_neg       = SYNC_NOT_YET;
 			data->CurrentSC = NULL;
-			tmpSC->result = (DID_OK		    << 16) |
-					(tmpSC->SCp.Message <<	8) |
-					(tmpSC->SCp.Status  <<	0);
+			tmpSC->result = (DID_OK		             << 16) |
+					((tmpSC->SCp.Message & 0xff) <<  8) |
+					((tmpSC->SCp.Status  & 0xff) <<  0);
 			DEBUG(0, " command complete result=0x%x\n", tmpSC->result);
 			tmpSC->scsi_done(tmpSC);
+
 			return;
 		}
 
@@ -1028,7 +1064,7 @@
 
 	/* check unexpected bus free state */
 	if (phase == 0) {
-		printk(KERN_DEBUG " " __FUNCTION__ " unexpected bus free. i_src=0x%x, phase=0x%x, irq_phase=0x%x\n", i_src, phase, irq_phase);
+		printk(KERN_DEBUG "%s: unexpected bus free. i_src=0x%x, phase=0x%x, irq_phase=0x%x\n", __FUNCTION__, i_src, phase, irq_phase);
 
 		*sync_neg       = SYNC_NOT_YET;
 		data->CurrentSC = NULL;
@@ -1050,9 +1086,10 @@
 		nsp_nexus(tmpSC, data);
 
 		/* write scsi command */
+		DEBUG(0, " cmd_len=%d\n", tmpSC->cmd_len);
 		nsp_index_write(base, COMMANDCTRL, CLEAR_COMMAND_POINTER);
-		for (len = 0; len < COMMAND_SIZE(tmpSC->cmnd[0]); len++) {
-			nsp_index_write(base, COMMANDDATA, tmpSC->cmnd[len]);
+		for (i = 0; i < tmpSC->cmd_len; i++) {
+			nsp_index_write(base, COMMANDDATA, tmpSC->cmnd[i]);
 		}
 		nsp_index_write(base, COMMANDCTRL, CLEAR_COMMAND_POINTER | AUTO_COMMAND_GO);
 		break;
@@ -1084,7 +1121,7 @@
 		tmpSC->SCp.phase = PH_STATUS;
 
 		tmpSC->SCp.Status = nsp_index_read(base, SCSIDATAWITHACK);
-		//DEBUG(0, " message=0x%x status=0x%x\n", tmpSC->SCp.Message, tmpSC->SCp.Status);
+		DEBUG(0, " message=0x%x status=0x%x\n", tmpSC->SCp.Message, tmpSC->SCp.Status);
 
 		break;
 
@@ -1096,26 +1133,24 @@
 
 		tmpSC->SCp.phase = PH_MSG_OUT;
 
-		data->MsgLen = len = 0;
+		data->MsgLen = i = 0;
+		data->MsgBuffer[i] = IDENTIFY(TRUE, lun); i++;
+
 		if (*sync_neg == SYNC_NOT_YET) {
-			data->Sync[target][lun].SyncPeriod = 0;
-			data->Sync[target][lun].SyncOffset = 0;
-			nsp_msg(tmpSC, data);
+			data->Sync[target].SyncPeriod = 0;
+			data->Sync[target].SyncOffset = 0;
 
-			data->MsgBuffer[len] = IDENTIFY(TRUE, lun); len++;
-			/*
-			data->MsgBuffer[len] = MSG_EXTENDED;        len++;
-			data->MsgBuffer[len] = 3;                   len++;
-			data->MsgBuffer[len] = MSG_EXT_SDTR;        len++;
-			data->MsgBuffer[len] = 0x0c;                len++;
-			data->MsgBuffer[len] = 15;                  len++;
-			*/
-		}
-		if (len == 0) {
-			data->MsgBuffer[len] = MSG_NO_OPERATION; len++;
+			/**/
+			data->MsgBuffer[i] = MSG_EXTENDED; i++;
+			data->MsgBuffer[i] = 3;            i++;
+			data->MsgBuffer[i] = MSG_EXT_SDTR; i++;
+			data->MsgBuffer[i] = 0x0c;         i++;
+			data->MsgBuffer[i] = 15;           i++;
+			/**/
 		}
-		data->MsgLen = len;
+		data->MsgLen = i;
 
+		nsp_msg(tmpSC, data);
 		show_message(data);
 		nsp_message_out(tmpSC, data);
 		break;
@@ -1130,16 +1165,26 @@
 		tmpSC->SCp.phase = PH_MSG_IN;
 		nsp_message_in(tmpSC, data);
 
-		/*
-		if (data->MsgLen       >= 5            &&
-		    data->MsgBuffer[0] == MSG_EXTENDED &&
-		    data->MsgBuffer[1] == 3            &&
-		    data->MsgBuffer[2] == MSG_EXT_SDTR ) {
-			data->Sync[target][lun].SyncPeriod = data->MsgBuffer[3];
-			data->Sync[target][lun].SyncOffset = data->MsgBuffer[4];
+		/**/
+		if (*sync_neg == SYNC_NOT_YET) {
+			//printk("%d,%d\n",target,lun);
+
+			if (data->MsgLen       >= 5            &&
+			    data->MsgBuffer[0] == MSG_EXTENDED &&
+			    data->MsgBuffer[1] == 3            &&
+			    data->MsgBuffer[2] == MSG_EXT_SDTR ) {
+				data->Sync[target].SyncPeriod = data->MsgBuffer[3];
+				data->Sync[target].SyncOffset = data->MsgBuffer[4];
+				//printk("sync ok, %d %d\n", data->MsgBuffer[3], data->MsgBuffer[4]);
+				*sync_neg = SYNC_OK;
+			} else {
+				data->Sync[target].SyncPeriod = 0;
+				data->Sync[target].SyncOffset = 0;
+				*sync_neg = SYNC_NG;
+			}
 			nsp_msg(tmpSC, data);
 		}
-		*/
+		/**/
 
 		/* search last messeage byte */
 		tmp = -1;
@@ -1163,7 +1208,7 @@
 		break;
 	}
 
-	//DEBUG(0, __FUNCTION__ "() out\n");
+	//DEBUG(0, __func__ "() out\n");
 	return;	
 
 timer_out:
@@ -1183,41 +1228,52 @@
 	struct Scsi_Host *host;	/* registered host structure */
 	nsp_hw_data *data = &nsp_data;
 
-	DEBUG(0, __FUNCTION__ " this_id=%d\n", sht->this_id);
+	DEBUG(0, "%s: this_id=%d\n", __FUNCTION__, sht->this_id);
 
 	request_region(data->BaseAddress, data->NumAddress, "nsp_cs");
 	host		  = scsi_register(sht, 0);
-	host->io_port	  = data->BaseAddress;
 	host->unique_id	  = data->BaseAddress;
+	host->io_port	  = data->BaseAddress;
 	host->n_io_port	  = data->NumAddress;
 	host->irq	  = data->IrqNumber;
-	host->dma_channel = 0xff;             /* not use dms */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
+	host->base        = data->MmioAddress; /* kernel 2.4 */
+#else
+	host->base        = (char *)(data->MmioAddress); /* 2.2 */
+#endif
+
+	spin_lock_init(&(data->Lock));
 
-	sprintf(nspinfo,
-/* Buffer size is 100 bytes */
-/*  0         1         2         3         4         5         6         7         8         9         0*/
-/*  01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890*/
-   "NinjaSCSI-3/32Bi Driver $Revision: 1.42 $, I/O 0x%04lx-0x%04lx IRQ %2d",
-		host->io_port, host->io_port + host->n_io_port,
-		host->irq);
-	sht->name	  = nspinfo;
+	snprintf(data->nspinfo,
+		 sizeof(data->nspinfo),
+		 "NinjaSCSI-3/32Bi Driver $Revision: 1.4 $ IO:0x%04lx-0x%04lx MMIO(virt addr):0x%04lx IRQ:%02d",
+		 host->io_port, host->io_port + host->n_io_port - 1,
+		 host->base,
+		 host->irq);
+	data->nspinfo[sizeof(data->nspinfo) - 1] = '\0';
+	sht->name	  = data->nspinfo;
 
-	DEBUG(0, __FUNCTION__ " end\n");
+	DEBUG(0, "%s: end\n", __FUNCTION__);
+
+	//MOD_INC_USE_COUNT;
 
 	return 1; /* detect done. */
 }
 
-/* nsp_cs requires own release handler because its uses dev_id (=data) */
 static int nsp_release(struct Scsi_Host *shpnt)
 {
-	nsp_hw_data *data = &nsp_data;
+	//nsp_hw_data *data = &nsp_data;
+
+	/* PCMCIA Card Service dose same things */
+	//if (shpnt->irq) {
+	//	free_irq(shpnt->irq, data);
+	//}
+	//if (shpnt->io_port) {
+	//	release_region(shpnt->io_port, shpnt->n_io_port);
+	//}
+
+	//MOD_DEC_USE_COUNT;
 
-        if (shpnt->irq) {
-                free_irq(shpnt->irq, data);
-	}
-        if (shpnt->io_port && shpnt->n_io_port) {
-		release_region(shpnt->io_port, shpnt->n_io_port);
-	}
 	return 0;
 }
 
@@ -1226,25 +1282,152 @@
 /*----------------------------------------------------------------*/
 static const char *nsp_info(struct Scsi_Host *shpnt)
 {
-	return nspinfo;
+	nsp_hw_data *data = &nsp_data;
+
+	return data->nspinfo;
 }
 
+#undef SPRINTF
+#define SPRINTF(args...) \
+        do { if(pos < buffer + length) pos += sprintf(pos, ## args); } while(0)
+static int nsp_proc_info(char  *buffer,
+			 char **start,
+			 off_t  offset,
+			 int    length,
+			 int    hostno,
+			 int    inout)
+{
+	int id;
+	char *pos = buffer;
+	int thislength;
+	int speed;
+	unsigned long flags;
+	nsp_hw_data *data = &nsp_data;
+	struct Scsi_Host *host;
+
+	if (inout) {
+		return -EINVAL;
+	}
+
+	host = scsi_host_hn_get(hostno);
+
+	SPRINTF("NinjaSCSI status\n\n");
+	SPRINTF("Driver version:        $Revision: 1.4 $\n");
+	SPRINTF("SCSI host No.:         %d\n",          hostno);
+	SPRINTF("IRQ:                   %d\n",          host->irq);
+	SPRINTF("IO:                    0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1);
+	SPRINTF("MMIO(virtual address): 0x%lx\n",       host->base);
+	SPRINTF("sg_tablesize:          %d\n",          host->sg_tablesize);
+
+	SPRINTF("burst transfer mode:   ");
+	switch (nsp_burst_mode) {
+	case BURST_IO8:
+		SPRINTF("io8");
+		break;
+	case BURST_IO32:
+		SPRINTF("io32");
+		break;
+	case BURST_MEM32:
+		SPRINTF("mem32");
+		break;
+	default:
+		SPRINTF("???");
+		break;
+	}
+	SPRINTF("\n");
+
+
+	spin_lock_irqsave(&(data->Lock), flags);
+	SPRINTF("CurrentSC:             0x%p\n\n",      data->CurrentSC);
+	spin_unlock_irqrestore(&(data->Lock), flags);
+
+	SPRINTF("SDTR status\n");
+	for(id = 0; id < N_TARGET; id++) {
+
+		SPRINTF("id %d: ", id);
+
+		if (id == host->this_id) {
+			SPRINTF("----- NinjaSCSI-3 host adapter\n");
+			continue;
+		}
+
+		switch(data->Sync[id].SyncNegotiation) {
+		case SYNC_OK:
+			SPRINTF(" sync");
+			break;
+		case SYNC_NG:
+			SPRINTF("async");
+			break;
+		case SYNC_NOT_YET:
+			SPRINTF(" none");
+			break;
+		default:
+			SPRINTF("?????");
+			break;
+		}
+
+		if (data->Sync[id].SyncPeriod != 0) {
+			speed = 1000000 / (data->Sync[id].SyncPeriod * 4);
+
+			SPRINTF(" transfer %d.%dMB/s, offset %d",
+				speed / 1000,
+				speed % 1000,
+				data->Sync[id].SyncOffset
+				);
+		}
+		SPRINTF("\n");
+	}
+
+	thislength = pos - (buffer + offset);
+
+	if(thislength < 0) {
+		*start = 0;
+                return 0;
+        }
+
+
+	thislength = MIN(thislength, length);
+	*start = buffer + offset;
+
+	return thislength;
+}
+#undef SPRINTF
+
 /*---------------------------------------------------------------*/
 /* error handler                                                 */
 /*---------------------------------------------------------------*/
-static int nsp_reset(Scsi_Cmnd *SCpnt, unsigned int why)
+static int nsp_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags)
 {
-	DEBUG(0, __FUNCTION__ " SCpnt=0x%p why=%d\n", SCpnt, why);
+	nsp_hw_data *data = &nsp_data;
+	int ret = 0;
 
-	nsp_eh_bus_reset(SCpnt);
+	DEBUG(0, "%s: SCpnt=0x%p why=%d\n", __FUNCTION__, SCpnt, reset_flags);
 
-	return SCSI_RESET_SUCCESS;
+	if (reset_flags & SCSI_RESET_SUGGEST_BUS_RESET) {
+		nsp_eh_bus_reset(SCpnt);
+
+		ret |= SCSI_RESET_BUS_RESET;
+	}
+
+	if (reset_flags & SCSI_RESET_SUGGEST_HOST_RESET) {
+		nsp_eh_host_reset(SCpnt);
+
+		ret |= SCSI_RESET_HOST_RESET;
+	}
+
+	if (ret != 0) {
+		return SCSI_RESET_SUCCESS | ret;
+	} else {
+		nsphw_init_sync(data);
+		return SCSI_RESET_PUNT;
+	}
 }
 
 static int nsp_abort(Scsi_Cmnd *SCpnt)
 {
-	DEBUG(0, __FUNCTION__ " SCpnt=0x%p\n", SCpnt);
+	DEBUG(0, "%s: SCpnt=0x%p\n", __FUNCTION__, SCpnt);
 
+	nsp_eh_host_reset(SCpnt);
 	nsp_eh_bus_reset(SCpnt);
 
 	return SCSI_ABORT_SUCCESS;
@@ -1255,28 +1438,29 @@
 	return FAILED;
 }*/
 
+/*
 static int nsp_eh_abort(Scsi_Cmnd *SCpnt)
 {
-	DEBUG(0, __FUNCTION__ " SCpnt=0x%p\n", SCpnt);
-
-	nsp_eh_bus_reset(SCpnt);
+	DEBUG(0, "%s: SCpnt=0x%p\n", __FUNCTION__, SCpnt);
 
-	return SUCCESS;
-}
+	return nsp_eh_bus_reset(SCpnt);
+}*/
 
+/*
 static int nsp_eh_device_reset(Scsi_Cmnd *SCpnt)
 {
-	DEBUG(0, __FUNCTION__ " SCpnt=0x%p\n", SCpnt);
+	DEBUG(0, "%s: SCpnt=0x%p\n", __FUNCTION__, SCpnt);
 
 	return FAILED;
-}
+}*/
 
 static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt)
 {
+	nsp_hw_data *data = &nsp_data;
 	unsigned int base = SCpnt->host->io_port;
 	int	     i;
 
-	DEBUG(0, __FUNCTION__ "() SCpnt=0x%p base=0x%x\n", SCpnt, base);
+	DEBUG(0, "%s() SCpnt=0x%p base=0x%x\n", __FUNCTION__, SCpnt, base);
 
 	nsp_write(base, IRQCONTROL, IRQCONTROL_ALLMASK);
 
@@ -1289,6 +1473,8 @@
 
 	nsp_write(base, IRQCONTROL, IRQCONTROL_ALLCLEAR);
 
+	nsphw_init_sync(data);
+
 	return SUCCESS;
 }
 
@@ -1296,17 +1482,17 @@
 {
 	nsp_hw_data *data = &nsp_data;
 
-	DEBUG(0, __FUNCTION__ "\n");
+	DEBUG(0, "%s\n", __FUNCTION__);
 
 	nsphw_init(data);
 
-	return nsp_eh_bus_reset(SCpnt);
+	return SUCCESS;
 }
 
 
 /**********************************************************************
   PCMCIA functions
-  *********************************************************************/
+**********************************************************************/
 
 /*====================================================================*/
 static void cs_error(client_handle_t handle, int func, int ret)
@@ -1331,7 +1517,7 @@
 	dev_link_t   *link;
 	int	      ret, i;
 
-	DEBUG(0, __FUNCTION__ "()\n");
+	DEBUG(0, "%s()\n", __FUNCTION__);
 
 	/* Create new SCSI device */
 	info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -1359,8 +1545,15 @@
 			link->irq.IRQInfo2 |= 1 << irq_list[i];
 		}
 	}
+
+	/* IRQ $B$N3NJ]$O$3$3$G(B PCMCIA $B$N4X?t$rMQ$$$F9T$J$&$N$G(B
+	 * host->hostdata $B$r(B irq.Instance $B$KBeF~$G$-$J$$!#(B
+	 * host->hostdata $B$,;H$($l$PJ#?t$N(B NinjaSCSI $B$,(B
+	 * $B;HMQ$G$-$k$N$@$,!#(B
+	 */
 	link->irq.Handler	 = &nspintr;
 	link->irq.Instance       = &nsp_data;
+	link->irq.Attributes     |= (SA_SHIRQ | SA_SAMPLE_RANDOM);
 
 	/* General socket configuration */
 	link->conf.Attributes	 = CONF_ENABLE_IRQ;
@@ -1402,7 +1595,7 @@
 {
 	dev_link_t **linkp;
 
-	DEBUG(0, __FUNCTION__ "(0x%p)\n", link);
+	DEBUG(0, "%s(0x%p)\n", __FUNCTION__, link);
     
 	/* Locate device structure */
 	for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next) {
@@ -1414,7 +1607,7 @@
 		return;
 	}
 
-	del_timer(&link->release);
+	del_timer_sync(&link->release);
 	if (link->state & DEV_CONFIG) {
 		nsp_cs_release((u_long)link);
 		if (link->state & DEV_STALE_CONFIG) {
@@ -1431,6 +1624,7 @@
 	/* Unlink device structure, free bits */
 	*linkp = link->next;
 	kfree(link->priv);
+	link->priv = NULL;
 
 } /* nsp_cs_detach */
 
@@ -1452,15 +1646,20 @@
 	scsi_info_t	 *info	 = link->priv;
 	tuple_t		  tuple;
 	cisparse_t	  parse;
-	int		  i, last_ret, last_fn;
+	int		  last_ret, last_fn;
 	u_char		  tuple_data[64];
 	config_info_t	  conf;
+	win_req_t         req;
+	memreq_t          map;
+	cistpl_cftable_entry_t dflt = { 0 };
+
 	Scsi_Device	 *dev;
 	dev_node_t	**tail, *node;
 	struct Scsi_Host *host;
 	nsp_hw_data      *data = &nsp_data;
 
-	DEBUG(0, __FUNCTION__ "() in\n");
+
+	DEBUG(0, "%s() in\n", __FUNCTION__);
 
 	tuple.DesiredTuple    = CISTPL_CONFIG;
 	tuple.Attributes      = 0;
@@ -1474,7 +1673,6 @@
 	link->conf.Present    = parse.config.rmask[0];
 
 	/* Configure card */
-	driver_template.module = &__this_module;
 	link->state	      |= DEV_CONFIG;
 
 	/* Look up the current Vcc */
@@ -1484,44 +1682,130 @@
 	tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
 	CS_CHECK(GetFirstTuple, handle, &tuple);
 	while (1) {
+		cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
+
 		CFG_CHECK(GetTupleData, handle, &tuple);
 		CFG_CHECK(ParseTuple,	handle, &tuple, &parse);
-		link->conf.ConfigIndex = parse.cftable_entry.index;
-		link->io.BasePort1     = parse.cftable_entry.io.win[0].base;
-		i = CardServices(RequestIO, handle, &link->io);
-		if (i == CS_SUCCESS) {
-			break;
+
+		if (cfg->flags & CISTPL_CFTABLE_DEFAULT) { dflt = *cfg; }
+		if (cfg->index == 0) { goto next_entry; }
+		link->conf.ConfigIndex = cfg->index;
+
+		/* Does this card need audio output? */
+		if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
+			link->conf.Attributes |= CONF_ENABLE_SPKR;
+			link->conf.Status = CCSR_AUDIO_ENA;
+		}
+
+		/* Use power settings for Vcc and Vpp if present */
+		/*  Note that the CIS values need to be rescaled */
+		if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) {
+			if (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) {
+				goto next_entry;
+			}
+		}
+
+		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)) {
+			link->conf.Vpp1 = link->conf.Vpp2 =
+				dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
+		}
+
+		/* Do we need to allocate an interrupt? */
+		if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1) {
+			link->conf.Attributes |= CONF_ENABLE_IRQ;
+		}
+
+		/* IO window settings */
+		link->io.NumPorts1 = link->io.NumPorts2 = 0;
+		if ((cfg->io.nwin > 0) || (dflt.io.nwin > 0)) {
+			cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt.io;
+			link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
+			if (!(io->flags & CISTPL_IO_8BIT))
+				link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
+			if (!(io->flags & CISTPL_IO_16BIT))
+				link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
+			link->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
+			link->io.BasePort1 = io->win[0].base;
+			link->io.NumPorts1 = io->win[0].len;
+			if (io->nwin > 1) {
+				link->io.Attributes2 = link->io.Attributes1;
+				link->io.BasePort2 = io->win[1].base;
+				link->io.NumPorts2 = io->win[1].len;
+			}
+			/* This reserves IO space but doesn't actually enable it */
+			CFG_CHECK(RequestIO, link->handle, &link->io);
 		}
+
+		if ((cfg->mem.nwin > 0) || (dflt.mem.nwin > 0)) {
+			cistpl_mem_t *mem =
+				(cfg->mem.nwin) ? &cfg->mem : &dflt.mem;
+			req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
+			req.Attributes |= WIN_ENABLE;
+			req.Base = mem->win[0].host_addr;
+			req.Size = mem->win[0].len;
+			if (req.Size < 0x1000)
+				req.Size = 0x1000;
+			req.AccessSpeed = 0;
+			link->win = (window_handle_t)link->handle;
+			CFG_CHECK(RequestWindow, &link->win, &req);
+			map.Page = 0; map.CardOffset = mem->win[0].card_addr;
+			CFG_CHECK(MapMemPage, link->win, &map);
+
+			data->MmioAddress    = (u_long)ioremap_nocache(req.Base, req.Size);
+		}
+		/* If we got this far, we're cool! */
+		break;
+
 	next_entry:
-		DEBUG(0, __FUNCTION__ " next\n");
+		DEBUG(0, "%s next\n", __FUNCTION__);
+
+		if (link->io.NumPorts1)
+			CardServices(ReleaseIO, link->handle, &link->io);
 		CS_CHECK(GetNextTuple, handle, &tuple);
 	}
 
-	CS_CHECK(RequestIRQ,	       handle, &link->irq);
+	if (link->conf.Attributes & CONF_ENABLE_IRQ)
+		CS_CHECK(RequestIRQ, link->handle, &link->irq);
 	CS_CHECK(RequestConfiguration, handle, &link->conf);
 
-	/* A bad hack... */
-	release_region(link->io.BasePort1, link->io.NumPorts1);
+	if (free_ports) {
+		if (link->io.BasePort1)
+			release_region(link->io.BasePort1, link->io.NumPorts1);
+		if (link->io.BasePort2)
+			release_region(link->io.BasePort2, link->io.NumPorts2);
+	}
 
 	/* Set port and IRQ */
-	data->BaseAddress = link->io.BasePort1;
-	data->NumAddress  = link->io.NumPorts1;
-	data->IrqNumber   = link->irq.AssignedIRQ;
+	data->BaseAddress            = link->io.BasePort1;
+	data->NumAddress             = link->io.NumPorts1;
+	data->IrqNumber              = link->irq.AssignedIRQ;
 
-	DEBUG(0, __FUNCTION__ " I/O[0x%x+0x%x] IRQ %d\n",
+	DEBUG(0, "%s I/O[0x%x+0x%x] IRQ %d\n",
+		__FUNCTION__,
 	      data->BaseAddress, data->NumAddress, data->IrqNumber);
 
 	if(nsphw_init(data) == FALSE) {
 		goto cs_failed;
 	}
 
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2))
 	scsi_register_host(&driver_template);
+#else
+	scsi_register_module(MODULE_SCSI_HA, &driver_template);
+#endif
 
 	DEBUG(0, "GET_SCSI_INFO\n");
 	tail = &link->dev;
 	info->ndev = 0;
 	for (host = scsi_host_get_next(NULL); host;
-	     host = scsi_host_get_next(host))
+	     host = scsi_host_get_next(host)) {
 		if (host->hostt == &driver_template) {
 			for (dev = host->host_queue; dev != NULL; dev = dev->next) {
 				u_long arg[2], id;
@@ -1575,6 +1859,12 @@
 		printk(", io 0x%04x-0x%04x", link->io.BasePort1,
 		       link->io.BasePort1+link->io.NumPorts1-1);
 	}
+	if (link->io.NumPorts2)
+		printk(" & 0x%04x-0x%04x", link->io.BasePort2,
+		       link->io.BasePort2+link->io.NumPorts2-1);
+	if (link->win)
+		printk(", mem 0x%06lx-0x%06lx", req.Base,
+		       req.Base+req.Size-1);
 	printk("\n");
 
 	link->state &= ~DEV_CONFIG_PENDING;
@@ -1598,7 +1888,7 @@
 {
 	dev_link_t *link = (dev_link_t *)arg;
 
-	DEBUG(0, __FUNCTION__ "(0x%p)\n", link);
+	DEBUG(0, "%s(0x%p)\n", __FUNCTION__, link);
 
 	/*
 	 * If the device is currently in use, we won't release until it
@@ -1612,10 +1902,15 @@
 	}
 
 	/* Unlink the device chain */
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2))
 	scsi_unregister_host(&driver_template);
+#else
+	scsi_unregister_module(MODULE_SCSI_HA, &driver_template);
+#endif
 	link->dev = NULL;
 
 	if (link->win) {
+		iounmap((void *)(nsp_data.MmioAddress));
 		CardServices(ReleaseWindow, link->win);
 	}
 	CardServices(ReleaseConfiguration,  link->handle);
@@ -1645,14 +1940,15 @@
     the card is still present.
     
 ======================================================================*/
-static int nsp_cs_event(event_t		    event,
-		     int		    priority,
-		     event_callback_args_t *args)
+static int nsp_cs_event(event_t		       event,
+			int		       priority,
+			event_callback_args_t *args)
 {
 	dev_link_t  *link = args->client_data;
 	scsi_info_t *info = link->priv;
+	Scsi_Cmnd tmp;
 
-	DEBUG(1, __FUNCTION__ "(0x%06x)\n", event);
+	DEBUG(1, "%s(0x%06x)\n", __FUNCTION__, event);
 
 	switch (event) {
 	case CS_EVENT_CARD_REMOVAL:
@@ -1688,20 +1984,21 @@
 	case CS_EVENT_CARD_RESET:
 		DEBUG(0, " event: reset\n");
 		if (link->state & DEV_CONFIG) {
-			Scsi_Cmnd tmp;
-
 			CardServices(RequestConfiguration, link->handle, &link->conf);
-			tmp.host = info->host;
-			nsp_eh_host_reset(&tmp);
 		}
 		info->stop = 0;
+
+		tmp.host = info->host;
+		nsp_eh_host_reset(&tmp);
+		nsp_eh_bus_reset(&tmp);
+
 		break;
 
 	default:
 		DEBUG(0, " event: unknown\n");
 		break;
 	}
-	DEBUG(0, __FUNCTION__ " end\n");
+	DEBUG(0, "%s end\n", __FUNCTION__);
 	return 0;
 } /* nsp_cs_event */
 
@@ -1712,7 +2009,7 @@
 {
 	servinfo_t serv;
 
-	DEBUG(0, __FUNCTION__ "() in\n");
+	DEBUG(0, "%s() in\n", __FUNCTION__);
 	DEBUG(0, "%s\n", version);
 	CardServices(GetCardServicesInfo, &serv);
 	if (serv.Revision != CS_RELEASE_CODE) {
@@ -1722,14 +2019,14 @@
 	}
 	register_pcmcia_driver(&dev_info, &nsp_cs_attach, &nsp_cs_detach);
 
-	DEBUG(0, __FUNCTION__ "() out\n");
+	DEBUG(0, "%s() out\n", __FUNCTION__);
 	return 0;
 }
 
 
 static void __exit nsp_cs_cleanup(void)
 {
-	DEBUG(0, __FUNCTION__ "() unloading\n");
+	DEBUG(0, "%s() unloading\n", __FUNCTION__);
 	unregister_pcmcia_driver(&dev_info);
 	while (dev_list != NULL) {
 		if (dev_list->state & DEV_CONFIG) {
@@ -1739,8 +2036,8 @@
 	}
 }
 
-module_init(nsp_cs_init);
-module_exit(nsp_cs_cleanup);
+module_init(nsp_cs_init)
+module_exit(nsp_cs_cleanup)
 
 /*
  *
diff -Nru a/drivers/scsi/pcmcia/nsp_cs.h b/drivers/scsi/pcmcia/nsp_cs.h
--- a/drivers/scsi/pcmcia/nsp_cs.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/pcmcia/nsp_cs.h	Wed Oct 30 16:44:27 2002
@@ -10,13 +10,13 @@
 
 =========================================================*/
 
-/* $Id: nsp_cs.h,v 1.27 2001/09/10 10:31:13 elca Exp $ */
+/* $Id: nsp_cs.h,v 1.3 2002/10/10 11:07:52 elca Exp $ */
 
 #ifndef  __nsp_cs__
 #define  __nsp_cs__
 
 /* for debugging */
-/*#define PCMCIA_DEBUG 9*/
+//#define PCMCIA_DEBUG 9
 
 /*
 #define static
@@ -27,11 +27,11 @@
  * Some useful macros...
  */
 #define Number(arr) ((int) (sizeof(arr) / sizeof(arr[0])))
-#define BIT(x)      (1<<(x))
+#define BIT(x)      (1L << (x))
 #define MIN(a,b)    ((a) > (b) ? (b) : (a))
 
-/* SCSI initiator must be 7 */
-#define SCSI_INITIATOR_ID  7
+/* SCSI initiator must be ID 7 */
+#define NSP_INITIATOR_ID  7
 
 #define NSP_SELTIMEOUT 200
 
@@ -73,6 +73,7 @@
 #define CLOCKDIV	0x11
 #  define CLOCK_40M 0x02
 #  define CLOCK_20M 0x01
+#  define FAST_20   BIT(2)
 
 #define TERMPWRCTRL	0x13
 #  define POWER_ON BIT(0)
@@ -133,6 +134,9 @@
 #  define REQ_COUNTER_CLEAR  BIT(2)
 #  define HOST_COUNTER_CLEAR BIT(3)
 #  define READ_SOURCE        0x30
+#   define ACK_COUNTER       (0)
+#   define REQ_COUNTER       (BIT(4))
+#   define HOST_COUNTER      (BIT(5))
 
 #define TRANSFERCOUNT	0x1E  /* R */
 
@@ -222,11 +226,14 @@
 	unsigned char AckWidth;
 } sync_data;
 
-typedef struct _nsp_data {
+typedef struct _nsp_hw_data {
 	unsigned int  BaseAddress;
 	unsigned int  NumAddress;
 	unsigned int  IrqNumber;
 
+	unsigned long MmioAddress;
+#define NSP_MMIO_OFFSET 0x0800
+
 	unsigned char ScsiClockDiv;
 
 	unsigned char TransferMode;
@@ -238,9 +245,9 @@
 	int           FifoCount;
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
 	int           Residual;
-#define RESID data->Residual
+#define RESID (data->Residual)
 #else
-#define RESID SCpnt->resid
+#define RESID (SCpnt->resid)
 #endif
 
 #define MSGBUF_SIZE 20
@@ -248,10 +255,20 @@
 	int MsgLen;
 
 #define N_TARGET 8
-#define N_LUN    8
-	sync_data     Sync[N_TARGET][N_LUN];
+	sync_data     Sync[N_TARGET];
+
+	char nspinfo[110];     /* description */
+	spinlock_t Lock;
 } nsp_hw_data;
 
+/* scatter-gather table */
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2))
+# define BUFFER_ADDR ((char *)((unsigned int)(SCpnt->SCp.buffer->page) + SCpnt->SCp.buffer->offset))
+#else
+# define BUFFER_ADDR SCpnt->SCp.buffer->address
+#endif
+
+
 
 static void nsp_cs_release(u_long arg);
 static int nsp_cs_event(event_t event, int priority, event_callback_args_t *args);
@@ -263,14 +280,16 @@
 
 static int nsp_detect(Scsi_Host_Template * );
 static int nsp_release(struct Scsi_Host *shpnt);
-static const char * nsp_info(struct Scsi_Host *shpnt);
+static const char *nsp_info(struct Scsi_Host *shpnt);
+static int nsp_proc_info(char *buffer, char **start, off_t offset,
+			 int length, int hostno, int inout);
 static int nsp_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 
 static int nsp_abort(Scsi_Cmnd *);
 static int nsp_reset(Scsi_Cmnd *, unsigned int);
 
-static int nsp_eh_abort(Scsi_Cmnd * SCpnt);
-static int nsp_eh_device_reset(Scsi_Cmnd *SCpnt);
+/*static int nsp_eh_abort(Scsi_Cmnd * SCpnt);*/
+/*static int nsp_eh_device_reset(Scsi_Cmnd *SCpnt);*/
 static int nsp_eh_bus_reset(Scsi_Cmnd *SCpnt);
 static int nsp_eh_host_reset(Scsi_Cmnd *SCpnt);
 
@@ -294,17 +313,19 @@
  * SCSI phase
  */
 enum _scsi_phase {
-	PH_UNDETERMINED,
-	PH_ARBSTART,
-	PH_SELSTART,
-	PH_SELECTED,
-	PH_COMMAND,
-	PH_DATA,
-	PH_STATUS,
-	PH_MSG_IN,
-	PH_MSG_OUT,
-	PH_DISCONNECT,
-	PH_RESELECT
+	PH_UNDETERMINED ,
+	PH_ARBSTART     ,
+	PH_SELSTART     ,
+	PH_SELECTED     ,
+	PH_COMMAND      ,
+	PH_DATA         ,
+	PH_STATUS       ,
+	PH_MSG_IN       ,
+	PH_MSG_OUT      ,
+	PH_DISCONNECT   ,
+	PH_RESELECT     ,
+	PH_ABORT        ,
+	PH_RESET
 };
 
 enum _data_in_out {
@@ -313,11 +334,19 @@
 	IO_OUT
 };
 
+enum _burst_mode {
+	BURST_IO8 = 0,
+	BURST_IO32,
+	BURST_MEM32
+};
+
 
 /* SCSI messaage */
 #define MSG_COMMAND_COMPLETE 0x00
 #define MSG_EXTENDED         0x01
+#define MSG_ABORT            0x06
 #define MSG_NO_OPERATION     0x08
+#define MSG_BUS_DEVICE_RESET 0x0c
 
 #define MSG_EXT_SDTR         0x01
 
diff -Nru a/drivers/scsi/pcmcia/nsp_debug.c b/drivers/scsi/pcmcia/nsp_debug.c
--- a/drivers/scsi/pcmcia/nsp_debug.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/pcmcia/nsp_debug.c	Wed Oct 30 16:44:27 2002
@@ -6,7 +6,7 @@
     the GNU General Public License.
 =========================================================================*/
 
-/* $Id: nsp_debug.c,v 1.8 2001/09/07 04:32:28 elca Exp $ */
+/* $Id: nsp_debug.c,v 1.2 2002/09/20 04:06:58 gotom Exp $ */
 
 /*
  * Show the command data of a command
@@ -87,14 +87,21 @@
 
 static void print_commandk (unsigned char *command)
 {
-	int i,s;
+	int i, s;
 	printk(KERN_DEBUG);
 	print_opcodek(command[0]);
 	/*printk(KERN_DEBUG __FUNCTION__ " ");*/
-	for ( i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) {
+	if ((command[0] >> 5) == 6 ||
+	    (command[0] >> 5) == 7 ) {
+		s = 12; /* vender specific */
+	} else {
+		s = COMMAND_SIZE(command[0]);
+	}
+	for ( i = 1; i < s; ++i) {
 		printk("%02x ", command[i]);
 	}
-	switch (COMMAND_SIZE(command[0])) {
+
+	switch (s) {
 	case 6:
 		printk("LBA=%d len=%d",
 		       (((unsigned int)command[1] & 0x0f) << 16) |
diff -Nru a/drivers/scsi/pcmcia/nsp_io.h b/drivers/scsi/pcmcia/nsp_io.h
--- a/drivers/scsi/pcmcia/nsp_io.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/pcmcia/nsp_io.h	Wed Oct 30 16:44:28 2002
@@ -7,7 +7,7 @@
 
   */
 
-/* $Id: nsp_io.h,v 1.9 2001/09/07 04:32:42 elca Exp $ */
+/* $Id: nsp_io.h,v 1.2 2002/09/20 04:06:58 gotom Exp $ */
 
 #ifndef __NSP_IO_H__
 #define __NSP_IO_H__
@@ -76,7 +76,7 @@
 				  void          *buf,
 				  unsigned long  count)
 {
-	//DEBUG(0, __FUNCTION__ "() buf=0x%p, count=0x%lx\n", buf, count);
+	/*DEBUG(0, __FUNCTION__ "() buf=0x%p, count=0x%lx\n", buf, count);*/
 	nsp_multi_read_1(base, FIFODATA, buf, count);
 }
 
@@ -171,6 +171,104 @@
 {
 	nsp_multi_write_4(base, FIFODATA, buf, count);
 }
+
+
+/*====================================================================*/
+
+static inline void nsp_mmio_write(unsigned long base,
+				  unsigned int  index,
+				  unsigned char val)
+{
+	unsigned char *ptr = (unsigned char *)(base + NSP_MMIO_OFFSET + index);
+
+	writeb(val, ptr);
+}
+
+static inline unsigned char nsp_mmio_read(unsigned long base,
+					  unsigned int  index)
+{
+	unsigned char *ptr = (unsigned char *)(base + NSP_MMIO_OFFSET + index);
+
+	return readb(ptr);
+}
+
+/*-----------*/
+
+static inline unsigned char nsp_mmio_index_read(unsigned long base,
+						unsigned int  reg)
+{
+	unsigned char *index_ptr = (unsigned char *)(base + NSP_MMIO_OFFSET + INDEXREG);
+	unsigned char *data_ptr  = (unsigned char *)(base + NSP_MMIO_OFFSET + DATAREG);
+
+	writeb((unsigned char)reg, index_ptr);
+	return readb(data_ptr);
+}
+
+static inline void nsp_mmio_index_write(unsigned long base,
+					unsigned int  reg,
+					unsigned char val)
+{
+	unsigned char *index_ptr = (unsigned char *)(base + NSP_MMIO_OFFSET + INDEXREG);
+	unsigned char *data_ptr  = (unsigned char *)(base + NSP_MMIO_OFFSET + DATAREG);
+
+	writeb((unsigned char)reg, index_ptr);
+	writeb(val,                data_ptr);
+}
+
+/* read 32bit FIFO */
+static inline void nsp_mmio_multi_read_4(unsigned long  base,
+					 unsigned int   Register,
+					 void          *buf,
+					 unsigned long  count)
+{
+	unsigned long *ptr = (unsigned long *)(base + Register);
+	unsigned long *tmp = (unsigned long *)buf;
+	int i;
+
+	//printk("base 0x%0lx ptr 0x%p\n",base,ptr);
+
+	for (i = 0; i < count; i++) {
+		*tmp = readl(ptr);
+		//printk("<%d,%p,%p,%lx>", i, ptr, tmp, *tmp);
+		tmp++;
+	}
+}
+
+static inline void nsp_mmio_fifo32_read(unsigned int   base,
+					void          *buf,
+					unsigned long  count)
+{
+	//DEBUG(0, __FUNCTION__ "() buf=0x%p, count=0x%lx*4\n", buf, count);
+	nsp_mmio_multi_read_4(base, FIFODATA, buf, count);
+}
+
+static inline void nsp_mmio_multi_write_4(unsigned long  base,
+					  unsigned int   Register,
+					  void          *buf,
+					  unsigned long  count)
+{
+	unsigned long *ptr = (unsigned long *)(base + Register);
+	unsigned long *tmp = (unsigned long *)buf;
+	int i;
+
+	//printk("base 0x%0lx ptr 0x%p\n",base,ptr);
+
+	for (i = 0; i < count; i++) {
+		writel(*tmp, ptr);
+		//printk("<%d,%p,%p,%lx>", i, ptr, tmp, *tmp);
+		tmp++;
+	}
+}
+
+static inline void nsp_mmio_fifo32_write(unsigned int   base,
+					 void          *buf,
+					 unsigned long  count)
+{
+	//DEBUG(0, __FUNCTION__ "() buf=0x%p, count=0x%lx*4\n", buf, count);
+	nsp_mmio_multi_write_4(base, FIFODATA, buf, count);
+}
+
+
 
 #endif
 /* end */
diff -Nru a/drivers/scsi/pcmcia/nsp_message.c b/drivers/scsi/pcmcia/nsp_message.c
--- a/drivers/scsi/pcmcia/nsp_message.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/pcmcia/nsp_message.c	Wed Oct 30 16:44:27 2002
@@ -6,7 +6,7 @@
    the GNU General Public License.
  */
 
-/* $Id: nsp_message.c,v 1.7 2001/09/07 04:33:01 elca Exp $ */
+/* $Id: nsp_message.c,v 1.2 2002/09/20 04:06:58 gotom Exp $ */
 
 static void nsp_message_in(Scsi_Cmnd *SCpnt, nsp_hw_data *data)
 {
@@ -64,7 +64,7 @@
 	DEBUG(0, " msgout loop\n");
 	do {
 		if (nsp_xfer(SCpnt, data, BUSPHASE_MESSAGE_OUT)) {
-			printk(KERN_DEBUG " " __FUNCTION__ " msgout: xfer short\n");
+			printk(KERN_DEBUG " %s msgout: xfer short\n", __FUNCTION__);
 		}
 
 		/* catch a next signal */
diff -Nru a/drivers/scsi/pluto.h b/drivers/scsi/pluto.h
--- a/drivers/scsi/pluto.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/pluto.h	Wed Oct 30 16:44:28 2002
@@ -55,7 +55,6 @@
 	sg_tablesize:		1,				\
 	cmd_per_lun:		1,				\
 	use_clustering:		ENABLE_CLUSTERING,		\
-	abort:			fcp_old_abort,			\
 	eh_abort_handler:	fcp_scsi_abort,			\
 	eh_device_reset_handler:fcp_scsi_dev_reset,		\
 	eh_bus_reset_handler:	fcp_scsi_bus_reset,		\
diff -Nru a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
--- a/drivers/scsi/ppa.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/ppa.c	Wed Oct 30 16:44:29 2002
@@ -19,7 +19,7 @@
 #include <asm/io.h>
 #include <linux/parport.h>
 #include <linux/workqueue.h>
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"
 int ppa_release(struct Scsi_Host *);
 static void ppa_reset_pulse(unsigned int base);
@@ -201,6 +201,8 @@
 	default:		/* Never gets here */
 	    continue;
 	}
+	
+	INIT_WORK(&ppa_hosts[i].ppa_tq, ppa_interrupt, &ppa_hosts[i]);
 
 	host->can_queue = PPA_CAN_QUEUE;
 	host->sg_tablesize = ppa_sg;
@@ -996,15 +998,16 @@
  * be done in sd.c.  Even if it gets fixed there, this will still
  * work.
  */
-int ppa_biosparam(Disk * disk, struct block_device *dev, int ip[])
+int ppa_biosparam(struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int ip[])
 {
     ip[0] = 0x40;
     ip[1] = 0x20;
-    ip[2] = ((unsigned long)disk->capacity + 1) / (ip[0] * ip[1]);
+    ip[2] = ((unsigned long)capacity + 1) / (ip[0] * ip[1]);
     if (ip[2] > 1024) {
 	ip[0] = 0xff;
 	ip[1] = 0x3f;
-	ip[2] = ((unsigned long)disk->capacity + 1) / (ip[0] * ip[1]);
+	ip[2] = ((unsigned long)capacity + 1) / (ip[0] * ip[1]);
 	if (ip[2] > 1023)
 	    ip[2] = 1023;
     }
diff -Nru a/drivers/scsi/ppa.h b/drivers/scsi/ppa.h
--- a/drivers/scsi/ppa.h	Wed Oct 30 16:44:32 2002
+++ b/drivers/scsi/ppa.h	Wed Oct 30 16:44:32 2002
@@ -87,7 +87,6 @@
 #include  <linux/interrupt.h>
 
 #include  <asm/io.h>
-#include  "sd.h"
 #include  "hosts.h"
 /* batteries not included :-) */
 
@@ -169,7 +168,8 @@
 int ppa_abort(Scsi_Cmnd *);
 int ppa_reset(Scsi_Cmnd *);
 int ppa_proc_info(char *, char **, off_t, int, int, int);
-int ppa_biosparam(Disk *, struct block_device *, int *);
+int ppa_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 #define PPA {	proc_name:			"ppa",		\
 		proc_info:			ppa_proc_info,		\
diff -Nru a/drivers/scsi/psi240i.c b/drivers/scsi/psi240i.c
--- a/drivers/scsi/psi240i.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/psi240i.c	Wed Oct 30 16:44:30 2002
@@ -688,8 +688,6 @@
 	return SCSI_RESET_PUNT;
 	}
 
-#include "sd.h"
-
 /****************************************************************
  *	Name:	Psi240i_BiosParam
  *
@@ -703,11 +701,12 @@
  *	Returns:		zero.
  *
  ****************************************************************/
-int Psi240i_BiosParam (Scsi_Disk *disk, struct block_device *dev, int geom[])
+int Psi240i_BiosParam (struct scsi_device *sdev, struct block_device *dev,
+		sector_t capacity, int geom[])
 	{
 	POUR_DEVICE	pdev;
 
-	pdev = &(HOSTDATA(disk->device->host)->device[disk->device->id]);
+	pdev = &(HOSTDATA(sdev->host)->device[sdev->id]);
 
 	geom[0] = pdev->heads;
 	geom[1] = pdev->sectors;
diff -Nru a/drivers/scsi/psi240i.h b/drivers/scsi/psi240i.h
--- a/drivers/scsi/psi240i.h	Wed Oct 30 16:44:32 2002
+++ b/drivers/scsi/psi240i.h	Wed Oct 30 16:44:32 2002
@@ -314,7 +314,8 @@
 int Psi240i_QueueCommand	(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
 int Psi240i_Abort			(Scsi_Cmnd *SCpnt);
 int Psi240i_Reset			(Scsi_Cmnd *SCpnt, unsigned int flags);
-int Psi240i_BiosParam		(Disk *disk, struct block_device * dev, int geom[]);
+int Psi240i_BiosParam		(struct scsi_device *sdev, struct block_device *bdev,
+					sector_t capacity, int geom[]);
 
 #ifndef NULL
 	#define NULL 0
diff -Nru a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
--- a/drivers/scsi/qla1280.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/scsi/qla1280.c	Wed Oct 30 16:44:36 2002
@@ -270,7 +270,6 @@
 #include <linux/pci_ids.h>
 #endif
 
-#include "sd.h"
 #include "scsi.h"
 #include "hosts.h"
 #define UNIQUE_FW_NAME
@@ -1697,17 +1696,18 @@
  *   Return the disk geometry for the given SCSI device.
  **************************************************************************/
 int
-qla1280_biosparam(Disk * disk, struct block_device *dev, int geom[])
+qla1280_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[])
 {
 	int heads, sectors, cylinders;
 
 	heads = 64;
 	sectors = 32;
-	cylinders = (unsigned long)disk->capacity / (heads * sectors);
+	cylinders = (unsigned long)capacity / (heads * sectors);
 	if (cylinders > 1024) {
 		heads = 255;
 		sectors = 63;
-		cylinders = (unsigned long)disk->capacity / (heads * sectors);
+		cylinders = (unsigned long)capacity / (heads * sectors);
 		/* if (cylinders > 1023)
 		   cylinders = 1023; */
 	}
diff -Nru a/drivers/scsi/qla1280.h b/drivers/scsi/qla1280.h
--- a/drivers/scsi/qla1280.h	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/qla1280.h	Wed Oct 30 16:44:35 2002
@@ -1313,7 +1313,8 @@
 int qla1280_queuecommand(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 int qla1280_abort(Scsi_Cmnd *);
 int qla1280_reset(Scsi_Cmnd *, unsigned int);
-int qla1280_biosparam(Disk *, struct block_device *, int[]);
+int qla1280_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 static int qla1280_slave_attach(Scsi_Device *);
 void qla1280_intr_handler(int, void *, struct pt_regs *);
 void qla1280_setup(char *s, int *dummy);
@@ -1324,25 +1325,12 @@
  */
 
 #define QLA1280_LINUX_TEMPLATE {				\
-	next: NULL,						\
-	module: NULL,						\
-	proc_dir: NULL,						\
 	proc_info: qla1280_proc_info,				\
 	name: "Qlogic ISP 1280/12160",				\
 	detect: qla1280_detect,					\
 	release: qla1280_release,				\
 	info: qla1280_info,					\
-	ioctl: NULL,						\
-	command: NULL,						\
 	queuecommand: qla1280_queuecommand,			\
-	eh_strategy_handler: NULL,				\
-	eh_abort_handler: NULL,					\
-	eh_device_reset_handler: NULL,				\
-	eh_bus_reset_handler: NULL,				\
-	eh_host_reset_handler: NULL,				\
-/*	use_new_eh_code: 0, */					\
-	abort: qla1280_abort,					\
-	reset: qla1280_reset,					\
 	slave_attach: qla1280_slave_attach,			\
 	bios_param: qla1280_biosparam,				\
 	can_queue: 255,		/* max simultaneous cmds      */\
diff -Nru a/drivers/scsi/qlogicfas.c b/drivers/scsi/qlogicfas.c
--- a/drivers/scsi/qlogicfas.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/scsi/qlogicfas.c	Wed Oct 30 16:44:36 2002
@@ -22,9 +22,22 @@
 
    Functions as standalone, loadable, and PCMCIA driver, the latter from
    Dave Hinds' PCMCIA package.
+   
+   Cleaned up 26/10/2002 by Alan Cox <alan@redhat.com> as part of the 2.5
+   SCSI driver cleanup and audit. This driver still needs work on the
+   following
+   	-	Non terminating hardware waits
+   	-	Support multiple cards at a time
+   	-	Some layering violations with its pcmcia stub
 
    Redistributable under terms of the GNU General Public License
 
+   For the avoidance of doubt the "preferred form" of this code is one which
+   is in an open non patent encumbered format. Where cryptographic key signing
+   forms part of the process of creating an executable the information
+   including keys needed to generate an equivalently functional executable
+   are deemed to be part of the source code.
+
 */
 /*----------------------------------------------------------------*/
 /* Configuration */
@@ -32,17 +45,21 @@
 /* Set the following to 2 to use normal interrupt (active high/totempole-
    tristate), otherwise use 0 (REQUIRED FOR PCMCIA) for active low, open
    drain */
+
 #define QL_INT_ACTIVE_HIGH 2
 
 /* Set the following to 1 to enable the use of interrupts.  Note that 0 tends
    to be more stable, but slower (or ties up the system more) */
+
 #define QL_USE_IRQ 1
 
 /* Set the following to max out the speed of the PIO PseudoDMA transfers,
    again, 0 tends to be slower, but more stable.  */
+
 #define QL_TURBO_PDMA 1
 
 /* This should be 1 to enable parity detection */
+
 #define QL_ENABLE_PARITY 1
 
 /* This will reset all devices when the driver is initialized (during bootup).
@@ -51,11 +68,13 @@
    without requiring a cold boot.  It does take some time to recover from a
    reset, so it is slower, and I have seen timeouts so that devices weren't
    recognized when this was set. */
+
 #define QL_RESET_AT_START 0
 
 /* crystal frequency in megahertz (for offset 5 and 9)
    Please set this for your card.  Most Qlogic cards are 40 Mhz.  The
    Control Concepts ISA (not VLB) is 24 Mhz */
+
 #define XTALFREQ	40
 
 /**********/
@@ -79,16 +98,14 @@
 #define FASTSCSI 0
 
 /* This when set to 1 will set a faster sync transfer rate */
-#define FASTCLK 0
-/*(XTALFREQ>25?1:0)*/
+#define FASTCLK 0	/*(XTALFREQ>25?1:0)*/
 
 /*****/
 /* offset 6 */
 /* This is the sync transfer divisor, XTALFREQ/X will be the maximum
    achievable data rate (assuming the rest of the system is capable
    and set properly) */
-#define SYNCXFRPD 5
-/*(XTALFREQ/5)*/
+#define SYNCXFRPD 5	/*(XTALFREQ/5)*/
 
 /*****/
 /* offset 7 */
@@ -107,15 +124,15 @@
 #ifdef PCMCIA
 #undef QL_INT_ACTIVE_HIGH
 #define QL_INT_ACTIVE_HIGH 0
-#endif 
+#endif
 
 #include <linux/module.h>
 
 #ifdef PCMCIA
 #undef MODULE
-#endif 
+#endif
 
-#include <linux/blk.h>	/* to get disk capacity */
+#include <linux/blk.h>		/* to get disk capacity */
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/init.h>
@@ -126,26 +143,26 @@
 #include <linux/spinlock.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"
 #include "qlogicfas.h"
 #include <linux/stat.h>
 
 /*----------------------------------------------------------------*/
 /* driver state info, local to driver */
-static int	    qbase;	/* Port */
-static int	    qinitid;	/* initiator ID */
-static int	    qabort;	/* Flag to cause an abort */
-static int	    qlirq = -1;	/* IRQ being used */
-static char	    qinfo[80];	/* description */
-static Scsi_Cmnd   *qlcmd;	/* current command being processed */
-
-static int	    qlcfg5 = ( XTALFREQ << 5 );	/* 15625/512 */
-static int	    qlcfg6 = SYNCXFRPD;
-static int	    qlcfg7 = SYNCOFFST;
-static int	    qlcfg8 = ( SLOWCABLE << 7 ) | ( QL_ENABLE_PARITY << 4 );
-static int	    qlcfg9 = ( ( XTALFREQ + 4 ) / 5 );
-static int	    qlcfgc = ( FASTCLK << 3 ) | ( FASTSCSI << 4 );
+static int qbase;		/* Port */
+static int qinitid;		/* initiator ID */
+static int qabort;		/* Flag to cause an abort */
+static int qlirq = -1;		/* IRQ being used */
+static char qinfo[80];		/* description */
+static Scsi_Cmnd *qlcmd;	/* current command being processed */
+
+static int qlcfg5 = (XTALFREQ << 5);	/* 15625/512 */
+static int qlcfg6 = SYNCXFRPD;
+static int qlcfg7 = SYNCOFFST;
+static int qlcfg8 = (SLOWCABLE << 7) | (QL_ENABLE_PARITY << 4);
+static int qlcfg9 = ((XTALFREQ + 4) / 5);
+static int qlcfgc = (FASTCLK << 3) | (FASTSCSI << 4);
 
 /*----------------------------------------------------------------*/
 /* The qlogic card uses two register maps - These macros select which one */
@@ -168,107 +185,112 @@
 /*----------------------------------------------------------------*/
 /* local functions */
 /*----------------------------------------------------------------*/
-static void	ql_zap(void);
+
 /* error recovery - reset everything */
-void	ql_zap()
+
+static void ql_zap(void)
 {
-int	x;
-unsigned long	flags;
-	save_flags( flags );
-	cli();
+	int x;
+
 	x = inb(qbase + 0xd);
 	REG0;
-	outb(3, qbase + 3);				/* reset SCSI */
-	outb(2, qbase + 3);				/* reset chip */
+	outb(3, qbase + 3);	/* reset SCSI */
+	outb(2, qbase + 3);	/* reset chip */
 	if (x & 0x80)
 		REG1;
-	restore_flags( flags );
 }
 
-/*----------------------------------------------------------------*/
-/* do pseudo-dma */
-static int	ql_pdma(int phase, char *request, int reqlen)
+/*
+ *	Do a pseudo-dma tranfer
+ */
+ 
+static int ql_pdma(int phase, char *request, int reqlen)
 {
-int	j;
+	int j;
 	j = 0;
 	if (phase & 1) {	/* in */
 #if QL_TURBO_PDMA
-rtrc(4)
+		rtrc(4)
 		/* empty fifo in large chunks */
-		if( reqlen >= 128 && (inb( qbase + 8 ) & 2) ) { /* full */
-			insl( qbase + 4, request, 32 );
+		if (reqlen >= 128 && (inb(qbase + 8) & 2)) {	/* full */
+			insl(qbase + 4, request, 32);
 			reqlen -= 128;
 			request += 128;
 		}
-		while( reqlen >= 84 && !( j & 0xc0 ) ) /* 2/3 */
-			if( (j=inb( qbase + 8 )) & 4 ) {
-				insl( qbase + 4, request, 21 );
+		while (reqlen >= 84 && !(j & 0xc0))	/* 2/3 */
+			if ((j = inb(qbase + 8)) & 4) 
+			{
+				insl(qbase + 4, request, 21);
 				reqlen -= 84;
 				request += 84;
 			}
-		if( reqlen >= 44 && (inb( qbase + 8 ) & 8) ) {	/* 1/3 */
-			insl( qbase + 4, request, 11 );
+		if (reqlen >= 44 && (inb(qbase + 8) & 8)) {	/* 1/3 */
+			insl(qbase + 4, request, 11);
 			reqlen -= 44;
 			request += 44;
 		}
 #endif
 		/* until both empty and int (or until reclen is 0) */
-rtrc(7)
+		rtrc(7)
 		j = 0;
-		while( reqlen && !( (j & 0x10) && (j & 0xc0) ) ) {
+		while (reqlen && !((j & 0x10) && (j & 0xc0))) 
+		{
 			/* while bytes to receive and not empty */
 			j &= 0xc0;
-			while ( reqlen && !( (j=inb(qbase + 8)) & 0x10 ) ) {
+			while (reqlen && !((j = inb(qbase + 8)) & 0x10)) 
+			{
 				*request++ = inb(qbase + 4);
 				reqlen--;
 			}
-			if( j & 0x10 )
-				j = inb(qbase+8);
+			if (j & 0x10)
+				j = inb(qbase + 8);
 
 		}
-	}
-	else {	/* out */
+	} else {		/* out */
 #if QL_TURBO_PDMA
-rtrc(4)
-		if( reqlen >= 128 && inb( qbase + 8 ) & 0x10 ) { /* empty */
-			outsl(qbase + 4, request, 32 );
+		rtrc(4)
+		    if (reqlen >= 128 && inb(qbase + 8) & 0x10) {	/* empty */
+			outsl(qbase + 4, request, 32);
 			reqlen -= 128;
 			request += 128;
 		}
-		while( reqlen >= 84 && !( j & 0xc0 ) ) /* 1/3 */
-			if( !((j=inb( qbase + 8 )) & 8) ) {
-				outsl( qbase + 4, request, 21 );
+		while (reqlen >= 84 && !(j & 0xc0))	/* 1/3 */
+			if (!((j = inb(qbase + 8)) & 8)) {
+				outsl(qbase + 4, request, 21);
 				reqlen -= 84;
 				request += 84;
 			}
-		if( reqlen >= 40 && !(inb( qbase + 8 ) & 4 ) ) { /* 2/3 */
-			outsl( qbase + 4, request, 10 );
+		if (reqlen >= 40 && !(inb(qbase + 8) & 4)) {	/* 2/3 */
+			outsl(qbase + 4, request, 10);
 			reqlen -= 40;
 			request += 40;
 		}
 #endif
 		/* until full and int (or until reclen is 0) */
-rtrc(7)
-		j = 0;
-		while( reqlen && !( (j & 2) && (j & 0xc0) ) ) {
+		rtrc(7)
+		    j = 0;
+		while (reqlen && !((j & 2) && (j & 0xc0))) {
 			/* while bytes to send and not full */
-			while ( reqlen && !( (j=inb(qbase + 8)) & 2 ) ) {
+			while (reqlen && !((j = inb(qbase + 8)) & 2)) 
+			{
 				outb(*request++, qbase + 4);
 				reqlen--;
 			}
-			if( j & 2 )
-				j = inb(qbase+8);
+			if (j & 2)
+				j = inb(qbase + 8);
 		}
 	}
-/* maybe return reqlen */
-	return inb( qbase + 8 ) & 0xc0;
+	/* maybe return reqlen */
+	return inb(qbase + 8) & 0xc0;
 }
 
-/*----------------------------------------------------------------*/
-/* wait for interrupt flag (polled - not real hardware interrupt) */
-static int	ql_wai(void)
+/*
+ *	Wait for interrupt flag (polled - not real hardware interrupt) 
+ */
+
+static int ql_wai(void)
 {
-int	i,k;
+	int i, k;
 	k = 0;
 	i = jiffies + WATCHDOG;
 	while (time_before(jiffies, i) && !qabort && !((k = inb(qbase + 4)) & 0xe0)) {
@@ -288,65 +310,68 @@
 	return 0;
 }
 
-/*----------------------------------------------------------------*/
-/* initiate scsi command - queueing handler */
-static void	ql_icmd(Scsi_Cmnd * cmd)
+/*
+ *	Initiate scsi command - queueing handler 
+ *	caller must hold host lock
+ */
+
+static void ql_icmd(Scsi_Cmnd * cmd)
 {
-unsigned int	    i;
-unsigned long	flags;
+	unsigned int i;
 
 	qabort = 0;
 
-	save_flags( flags );
-	cli();
 	REG0;
-/* clearing of interrupts and the fifo is needed */
-	inb(qbase + 5); 			/* clear interrupts */
-	if (inb(qbase + 5))			/* if still interrupting */
-		outb(2, qbase + 3);		/* reset chip */
+	/* clearing of interrupts and the fifo is needed */
+
+	inb(qbase + 5);		/* clear interrupts */
+	if (inb(qbase + 5))	/* if still interrupting */
+		outb(2, qbase + 3);	/* reset chip */
 	else if (inb(qbase + 7) & 0x1f)
-		outb(1, qbase + 3);		/* clear fifo */
-	while (inb(qbase + 5)); 		/* clear ints */
+		outb(1, qbase + 3);	/* clear fifo */
+	while (inb(qbase + 5));	/* clear ints */
 	REG1;
-	outb(1, qbase + 8);			/* set for PIO pseudo DMA */
-	outb(0, qbase + 0xb);			/* disable ints */
-	inb(qbase + 8); 			/* clear int bits */
+	outb(1, qbase + 8);	/* set for PIO pseudo DMA */
+	outb(0, qbase + 0xb);	/* disable ints */
+	inb(qbase + 8);		/* clear int bits */
 	REG0;
-	outb(0x40, qbase + 0xb);		/* enable features */
+	outb(0x40, qbase + 0xb);	/* enable features */
 
-/* configurables */
-	outb( qlcfgc , qbase + 0xc);
-/* config: no reset interrupt, (initiator) bus id */
-	outb( 0x40 | qlcfg8 | qinitid, qbase + 8);
-	outb( qlcfg7 , qbase + 7 );
-	outb( qlcfg6 , qbase + 6 );
-/**/
-	outb(qlcfg5, qbase + 5);		/* select timer */
-	outb(qlcfg9 & 7, qbase + 9);			/* prescaler */
+	/* configurables */
+	outb(qlcfgc, qbase + 0xc);
+	/* config: no reset interrupt, (initiator) bus id */
+	outb(0x40 | qlcfg8 | qinitid, qbase + 8);
+	outb(qlcfg7, qbase + 7);
+	outb(qlcfg6, qbase + 6);
+	 /**/ outb(qlcfg5, qbase + 5);	/* select timer */
+	outb(qlcfg9 & 7, qbase + 9);	/* prescaler */
 /*	outb(0x99, qbase + 5);	*/
 	outb(cmd->target, qbase + 4);
 
 	for (i = 0; i < cmd->cmd_len; i++)
 		outb(cmd->cmnd[i], qbase + 2);
+
 	qlcmd = cmd;
 	outb(0x41, qbase + 3);	/* select and send command */
-	restore_flags( flags );
 }
-/*----------------------------------------------------------------*/
-/* process scsi command - usually after interrupt */
-static unsigned int	ql_pcmd(Scsi_Cmnd * cmd)
-{
-unsigned int	i, j, k;
-unsigned int	result; 		/* ultimate return result */
-unsigned int	status; 		/* scsi returned status */
-unsigned int	message;		/* scsi returned message */
-unsigned int	phase;			/* recorded scsi phase */
-unsigned int	reqlen; 		/* total length of transfer */
-struct scatterlist	*sglist;	/* scatter-gather list pointer */
-unsigned int	sgcount;		/* sg counter */
-char *buf;
 
-rtrc(1)
+/*
+ *	Process scsi command - usually after interrupt 
+ */
+
+static unsigned int ql_pcmd(Scsi_Cmnd * cmd)
+{
+	unsigned int i, j, k;
+	unsigned int result;	/* ultimate return result */
+	unsigned int status;	/* scsi returned status */
+	unsigned int message;	/* scsi returned message */
+	unsigned int phase;	/* recorded scsi phase */
+	unsigned int reqlen;	/* total length of transfer */
+	struct scatterlist *sglist;	/* scatter-gather list pointer */
+	unsigned int sgcount;	/* sg counter */
+	char *buf;
+
+	rtrc(1)
 	j = inb(qbase + 6);
 	i = inb(qbase + 5);
 	if (i == 0x20) {
@@ -354,36 +379,40 @@
 	}
 	i |= inb(qbase + 5);	/* the 0x10 bit can be set after the 0x08 */
 	if (i != 0x18) {
-		printk("Ql:Bad Interrupt status:%02x\n", i);
+		printk(KERN_ERR "Ql:Bad Interrupt status:%02x\n", i);
 		ql_zap();
 		return (DID_BAD_INTR << 16);
 	}
-	j &= 7; /* j = inb( qbase + 7 ) >> 5; */
-/* correct status is supposed to be step 4 */
-/* it sometimes returns step 3 but with 0 bytes left to send */
-/* We can try stuffing the FIFO with the max each time, but we will get a
-   sequence of 3 if any bytes are left (but we do flush the FIFO anyway */
-	if(j != 3 && j != 4) {
-		printk("Ql:Bad sequence for command %d, int %02X, cmdleft = %d\n", j, i, inb( qbase+7 ) & 0x1f );
+	j &= 7;			/* j = inb( qbase + 7 ) >> 5; */
+
+	/* correct status is supposed to be step 4 */
+	/* it sometimes returns step 3 but with 0 bytes left to send */
+	/* We can try stuffing the FIFO with the max each time, but we will get a
+	   sequence of 3 if any bytes are left (but we do flush the FIFO anyway */
+
+	if (j != 3 && j != 4) {
+		printk(KERN_ERR "Ql:Bad sequence for command %d, int %02X, cmdleft = %d\n",
+		     j, i, inb(qbase + 7) & 0x1f);
 		ql_zap();
 		return (DID_ERROR << 16);
 	}
 	result = DID_OK;
 	if (inb(qbase + 7) & 0x1f)	/* if some bytes in fifo */
-		outb(1, qbase + 3);		/* clear fifo */
-/* note that request_bufflen is the total xfer size when sg is used */
+		outb(1, qbase + 3);	/* clear fifo */
+	/* note that request_bufflen is the total xfer size when sg is used */
 	reqlen = cmd->request_bufflen;
-/* note that it won't work if transfers > 16M are requested */
+	/* note that it won't work if transfers > 16M are requested */
 	if (reqlen && !((phase = inb(qbase + 4)) & 6)) {	/* data phase */
-rtrc(2)
-		outb(reqlen, qbase);			/* low-mid xfer cnt */
-		outb(reqlen >> 8, qbase+1);			/* low-mid xfer cnt */
+		rtrc(2)
+		outb(reqlen, qbase);	/* low-mid xfer cnt */
+		outb(reqlen >> 8, qbase + 1);	/* low-mid xfer cnt */
 		outb(reqlen >> 16, qbase + 0xe);	/* high xfer cnt */
-		outb(0x90, qbase + 3);			/* command do xfer */
-/* PIO pseudo DMA to buffer or sglist */
+		outb(0x90, qbase + 3);	/* command do xfer */
+		/* PIO pseudo DMA to buffer or sglist */
 		REG1;
 		if (!cmd->use_sg)
-			ql_pdma(phase, cmd->request_buffer, cmd->request_bufflen);
+			ql_pdma(phase, cmd->request_buffer,
+				cmd->request_bufflen);
 		else {
 			sgcount = cmd->use_sg;
 			sglist = cmd->request_buffer;
@@ -399,74 +428,107 @@
 			}
 		}
 		REG0;
-rtrc(2)
-/* wait for irq (split into second state of irq handler if this can take time) */
+		rtrc(2)
+		/*
+		 *	Wait for irq (split into second state of irq handler
+		 *	if this can take time) 
+		 */
 		if ((k = ql_wai()))
 			return (k << 16);
 		k = inb(qbase + 5);	/* should be 0x10, bus service */
 	}
-/*** Enter Status (and Message In) Phase ***/
+
+	/*
+	 *	Enter Status (and Message In) Phase 
+	 */
+	 
 	k = jiffies + WATCHDOG;
-	while ( time_before(jiffies, k) && !qabort && !(inb(qbase + 4) & 6));	/* wait for status phase */
-	if ( time_after_eq(jiffies, k) ) {
+
+	while (time_before(jiffies, k) && !qabort && !(inb(qbase + 4) & 6))
+		cpu_relax();	/* wait for status phase */
+
+	if (time_after_eq(jiffies, k)) {
 		ql_zap();
 		return (DID_TIME_OUT << 16);
 	}
-	while (inb(qbase + 5)); 				/* clear pending ints */
+
+	/* FIXME: timeout ?? */
+	while (inb(qbase + 5))
+		cpu_relax();	/* clear pending ints */
+
 	if (qabort)
 		return ((qabort == 1 ? DID_ABORT : DID_RESET) << 16);
-	outb(0x11, qbase + 3);					/* get status and message */
+
+	outb(0x11, qbase + 3);	/* get status and message */
 	if ((k = ql_wai()))
 		return (k << 16);
-	i = inb(qbase + 5);					/* get chip irq stat */
-	j = inb(qbase + 7) & 0x1f;				/* and bytes rec'd */
+	i = inb(qbase + 5);	/* get chip irq stat */
+	j = inb(qbase + 7) & 0x1f;	/* and bytes rec'd */
 	status = inb(qbase + 2);
 	message = inb(qbase + 2);
-/* should get function complete int if Status and message, else bus serv if only status */
+
+	/*
+	 *	Should get function complete int if Status and message, else 
+	 *	bus serv if only status 
+	 */
 	if (!((i == 8 && j == 2) || (i == 0x10 && j == 1))) {
-		printk("Ql:Error during status phase, int=%02X, %d bytes recd\n", i, j);
+		printk(KERN_ERR "Ql:Error during status phase, int=%02X, %d bytes recd\n", i, j);
 		result = DID_ERROR;
 	}
 	outb(0x12, qbase + 3);	/* done, disconnect */
-rtrc(1)
+	rtrc(1)
 	if ((k = ql_wai()))
 		return (k << 16);
-/* should get bus service interrupt and disconnect interrupt */
+
+	/*
+	 *	Should get bus service interrupt and disconnect interrupt 
+	 */
+	 
 	i = inb(qbase + 5);	/* should be bus service */
 	while (!qabort && ((i & 0x20) != 0x20)) {
 		barrier();
 		cpu_relax();
 		i |= inb(qbase + 5);
 	}
-rtrc(0)
+	rtrc(0)
+
 	if (qabort)
 		return ((qabort == 1 ? DID_ABORT : DID_RESET) << 16);
+		
 	return (result << 16) | (message << 8) | (status & STATUS_MASK);
 }
 
 #if QL_USE_IRQ
-/*----------------------------------------------------------------*/
-/* interrupt handler */
-static void	    ql_ihandl(int irq, void *dev_id, struct pt_regs * regs)
+
+/*
+ *	Interrupt handler 
+ */
+
+static void ql_ihandl(int irq, void *dev_id, struct pt_regs *regs)
 {
-Scsi_Cmnd	   *icmd;
+	Scsi_Cmnd *icmd;
 	REG0;
+
 	if (!(inb(qbase + 4) & 0x80))	/* false alarm? */
 		return;
-	if (qlcmd == NULL) {		/* no command to process? */
-		int	i;
+
+	if (qlcmd == NULL) {	/* no command to process? */
+		int i;
 		i = 16;
-		while (i-- && inb(qbase + 5)); /* maybe also ql_zap() */
+		while (i-- && inb(qbase + 5));	/* maybe also ql_zap() */
 		return;
 	}
 	icmd = qlcmd;
 	icmd->result = ql_pcmd(icmd);
 	qlcmd = NULL;
-/* if result is CHECK CONDITION done calls qcommand to request sense */
+	/*
+	 *	If result is CHECK CONDITION done calls qcommand to request 
+	 *	sense 
+	 */
 	(icmd->scsi_done) (icmd);
 }
 
-static void	    do_ql_ihandl(int irq, void *dev_id, struct pt_regs * regs)
+static void do_ql_ihandl(int irq, void *dev_id, struct pt_regs *regs)
 {
 	unsigned long flags;
 	struct Scsi_Host *host = dev_id;
@@ -475,28 +537,40 @@
 	ql_ihandl(irq, dev_id, regs);
 	spin_unlock_irqrestore(host->host_lock, flags);
 }
+
 #endif
 
-/*----------------------------------------------------------------*/
-/* global functions */
-/*----------------------------------------------------------------*/
-/* non queued command */
 #if QL_USE_IRQ
-static void	qlidone(Scsi_Cmnd * cmd) {};		/* null function */
+
+static void qlidone(Scsi_Cmnd * cmd)
+{
+}				/* null function */
+
 #endif
 
-/* command process */
-int	qlogicfas_command(Scsi_Cmnd * cmd)
+/*
+ *	Synchronous command processing
+ */
+ 
+static int qlogicfas_command(Scsi_Cmnd * cmd)
 {
-int	k;
+	int k;
 #if QL_USE_IRQ
 	if (qlirq >= 0) {
 		qlogicfas_queuecommand(cmd, qlidone);
-		while (qlcmd != NULL);
+		while (qlcmd != NULL)
+		{
+			cpu_relax();
+			barrier();
+		}
 		return cmd->result;
 	}
 #endif
-/* non-irq version */
+
+	/*
+	 *	Non-irq version
+	 */
+	 
 	if (cmd->target == qinitid)
 		return (DID_BAD_TARGET << 16);
 	ql_icmd(cmd);
@@ -507,18 +581,21 @@
 }
 
 #if QL_USE_IRQ
-/*----------------------------------------------------------------*/
-/* queued command */
-int	qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+
+/*
+ *	Queued command
+ */
+
+int qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
 {
-	if(cmd->target == qinitid) {
+	if (cmd->target == qinitid) {
 		cmd->result = DID_BAD_TARGET << 16;
 		done(cmd);
 		return 0;
 	}
 
 	cmd->scsi_done = done;
-/* wait for the last command's interrupt to finish */
+	/* wait for the last command's interrupt to finish */
 	while (qlcmd != NULL) {
 		barrier();
 		cpu_relax();
@@ -527,121 +604,129 @@
 	return 0;
 }
 #else
-int	qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
+int qlogicfas_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
 {
 	return 1;
 }
 #endif
 
 #ifdef PCMCIA
-/*----------------------------------------------------------------*/
-/* allow PCMCIA code to preset the port */
-/* port should be 0 and irq to -1 respectively for autoprobing */
-void	qlogicfas_preset(int port, int irq)
+
+/*
+ *	Allow PCMCIA code to preset the port */
+ *	port should be 0 and irq to -1 respectively for autoprobing 
+ */
+
+void qlogicfas_preset(int port, int irq)
 {
-	qbase=port;
-	qlirq=irq;
+	qbase = port;
+	qlirq = irq;
 }
+
 #endif
 
-/*----------------------------------------------------------------*/
-/* look for qlogic card and init if found */
-int __QLINIT qlogicfas_detect(Scsi_Host_Template * host)
+/*
+ *	Look for qlogic card and init if found 
+ */
+ 
+int __devinit qlogicfas_detect(Scsi_Host_Template * host)
 {
-int	i, j;			/* these are only used by IRQ detect */
-int	qltyp;			/* type of chip */
-struct	Scsi_Host	*hreg;	/* registered host structure */
-unsigned long	flags;
-
-host->proc_name =  "qlogicfas";
-
-/* Qlogic Cards only exist at 0x230 or 0x330 (the chip itself decodes the
-   address - I check 230 first since MIDI cards are typically at 330
-
-   Theoretically, two Qlogic cards can coexist in the same system.  This
-   should work by simply using this as a loadable module for the second
-   card, but I haven't tested this.
-*/
+	int i, j;		/* these are only used by IRQ detect */
+	int qltyp;		/* type of chip */
+	struct Scsi_Host *hreg;	/* registered host structure */
 
-	if( !qbase ) {
+	host->proc_name = "qlogicfas";
+
+	/*	Qlogic Cards only exist at 0x230 or 0x330 (the chip itself
+	 *	decodes the address - I check 230 first since MIDI cards are
+	 *	typically at 0x330
+	 *
+	 *	Theoretically, two Qlogic cards can coexist in the same system.
+	 *	This should work by simply using this as a loadable module for
+	 *	the second card, but I haven't tested this.
+	 */
+
+	if (!qbase) {
 		for (qbase = 0x230; qbase < 0x430; qbase += 0x100) {
-			if( !request_region( qbase , 0x10, "qlogicfas" ) )
+			if (!request_region(qbase, 0x10, "qlogicfas"))
 				continue;
 			REG1;
-			if ( ( (inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7 )
-			  && ( (inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7 ) )
+			if (((inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7)
+			    && ((inb(qbase + 0xe) ^ inb(qbase + 0xe)) == 7))
 				break;
-			release_region(qbase, 0x10 );
+			release_region(qbase, 0x10);
 		}
 		if (qbase == 0x430)
 			return 0;
-	}
-	else
-		printk( "Ql: Using preset base address of %03x\n", qbase );
+	} else
+		printk(KERN_INFO "Ql: Using preset base address of %03x\n", qbase);
 
 	qltyp = inb(qbase + 0xe) & 0xf8;
 	qinitid = host->this_id;
 	if (qinitid < 0)
-		qinitid = 7;			/* if no ID, use 7 */
-	outb(1, qbase + 8);			/* set for PIO pseudo DMA */
+		qinitid = 7;	/* if no ID, use 7 */
+	outb(1, qbase + 8);	/* set for PIO pseudo DMA */
 	REG0;
 	outb(0x40 | qlcfg8 | qinitid, qbase + 8);	/* (ini) bus id, disable scsi rst */
-	outb(qlcfg5, qbase + 5);		/* select timer */
-	outb(qlcfg9, qbase + 9);			/* prescaler */
+	outb(qlcfg5, qbase + 5);	/* select timer */
+	outb(qlcfg9, qbase + 9);	/* prescaler */
+
 #if QL_RESET_AT_START
-	outb( 3 , qbase + 3 );
+	outb(3, qbase + 3);
 	REG1;
-	while( inb( qbase + 0xf ) & 4 );
+	/* FIXME: timeout */
+	while (inb(qbase + 0xf) & 4)
+		cpu_relax();
 	REG0;
 #endif
+
 #if QL_USE_IRQ
-/* IRQ probe - toggle pin and check request pending */
+	/*
+	 *	IRQ probe - toggle pin and check request pending 
+	 */
 
-	if( qlirq == -1 ) {
-		save_flags( flags );
-		cli();
+	if (qlirq == -1) {
 		i = 0xffff;
 		j = 3;
 		outb(0x90, qbase + 3);	/* illegal command - cause interrupt */
 		REG1;
-		outb(10, 0x20); /* access pending interrupt map */
+		outb(10, 0x20);	/* access pending interrupt map */
 		outb(10, 0xa0);
 		while (j--) {
-			outb(0xb0 | QL_INT_ACTIVE_HIGH , qbase + 0xd);	/* int pin off */
-			i &= ~(inb(0x20) | (inb(0xa0) << 8));	/* find IRQ off */
-			outb(0xb4 | QL_INT_ACTIVE_HIGH , qbase + 0xd);	/* int pin on */
-			i &= inb(0x20) | (inb(0xa0) << 8);	/* find IRQ on */
+			outb(0xb0 | QL_INT_ACTIVE_HIGH, qbase + 0xd);	/* int pin off */
+			i &= ~(inb(0x20) | (inb(0xa0) << 8));		/* find IRQ off */
+			outb(0xb4 | QL_INT_ACTIVE_HIGH, qbase + 0xd);	/* int pin on */
+			i &= inb(0x20) | (inb(0xa0) << 8);		/* find IRQ on */
 		}
 		REG0;
-		while (inb(qbase + 5)); 			/* purge int */
+		while (inb(qbase + 5));	/* purge int */
 		j = -1;
-		while (i)					/* find on bit */
+		while (i)	/* find on bit */
 			i >>= 1, j++;	/* should check for exactly 1 on */
 		qlirq = j;
-		restore_flags( flags );
-	}
-	else
-		printk( "Ql: Using preset IRQ %d\n", qlirq );
+	} else
+		printk(KERN_INFO "Ql: Using preset IRQ %d\n", qlirq);
 
 	if (qlirq >= 0 && !request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", NULL))
 		host->can_queue = 1;
 #endif
-	hreg = scsi_register( host , 0 );	/* no host data */
+	hreg = scsi_register(host, 0);	/* no host data */
 	if (!hreg)
 		goto err_release_mem;
 	hreg->io_port = qbase;
 	hreg->n_io_port = 16;
 	hreg->dma_channel = -1;
-	if( qlirq != -1 )
+	if (qlirq != -1)
 		hreg->irq = qlirq;
 
-	sprintf(qinfo, "Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d",
-	    qltyp, qbase, qlirq, QL_TURBO_PDMA );
+	sprintf(qinfo,
+		"Qlogicfas Driver version 0.46, chip %02X at %03X, IRQ %d, TPdma:%d",
+		qltyp, qbase, qlirq, QL_TURBO_PDMA);
 	host->name = qinfo;
 
 	return 1;
 
- err_release_mem:
+err_release_mem:
 	release_region(qbase, 0x10);
 	if (host->can_queue)
 		free_irq(qlirq, do_ql_ihandl);
@@ -649,18 +734,22 @@
 
 }
 
-/*----------------------------------------------------------------*/
-/* return bios parameters */
-int	qlogicfas_biosparam(Disk * disk, struct block_device *dev, int ip[])
+/* 
+ *	Return bios parameters 
+ */
+
+int qlogicfas_biosparam(struct scsi_device * disk,
+		        struct block_device *dev,
+			sector_t capacity, int ip[])
 {
 /* This should mimic the DOS Qlogic driver's behavior exactly */
 	ip[0] = 0x40;
 	ip[1] = 0x20;
-	ip[2] = (unsigned long)disk->capacity / (ip[0] * ip[1]);
+	ip[2] = (unsigned long) capacity / (ip[0] * ip[1]);
 	if (ip[2] > 1024) {
 		ip[0] = 0xff;
 		ip[1] = 0x3f;
-		ip[2] = (unsigned long)disk->capacity / (ip[0] * ip[1]);
+		ip[2] = (unsigned long) capacity / (ip[0] * ip[1]);
 #if 0
 		if (ip[2] > 1023)
 			ip[2] = 1023;
@@ -669,33 +758,67 @@
 	return 0;
 }
 
-/*----------------------------------------------------------------*/
-/* abort command in progress */
-int	qlogicfas_abort(Scsi_Cmnd * cmd)
+/*
+ *	Abort a command in progress
+ */
+ 
+static int qlogicfas_abort(Scsi_Cmnd * cmd)
 {
 	qabort = 1;
 	ql_zap();
-	return 0;
+	return SUCCESS;
 }
 
-/*----------------------------------------------------------------*/
-/* reset SCSI bus */
-int	qlogicfas_reset(Scsi_Cmnd * cmd, unsigned int ignored)
+/* 
+ *	Reset SCSI bus
+ *	FIXME: This function is invoked with cmd = NULL directly by
+ *	the PCMCIA qlogic_stub code. This wants fixing
+ */
+
+static int qlogicfas_bus_reset(Scsi_Cmnd * cmd)
 {
 	qabort = 2;
 	ql_zap();
-	return 1;
+	return SUCCESS;
 }
 
-/*----------------------------------------------------------------*/
-/* return info string */
-const char	*qlogicfas_info(struct Scsi_Host * host)
+/* 
+ *	Reset SCSI host controller
+ */
+
+static int qlogicfas_host_reset(Scsi_Cmnd * cmd)
+{
+	return FAILED;
+}
+
+/* 
+ *	Reset SCSI device
+ */
+
+static int qlogicfas_device_reset(Scsi_Cmnd * cmd)
+{
+	return FAILED;
+}
+
+/*
+ *	Return info string
+ */
+
+static const char *qlogicfas_info(struct Scsi_Host *host)
 {
 	return qinfo;
 }
+
+MODULE_AUTHOR("Tom Zerucha, Michael Griffith");
+MODULE_DESCRIPTION("Driver for the Qlogic FAS SCSI controllers");
 MODULE_LICENSE("GPL");
 
-/* Eventually this will go into an include file, but this will be later */
-static Scsi_Host_Template driver_template = QLOGICFAS;
+/*
+ *	The driver template is also needed for PCMCIA
+ */
+ 
+Scsi_Host_Template qlogicfas_driver_template = QLOGICFAS;
+#define driver_template qlogicfas_driver_template
+
 #include "scsi_module.c"
 
diff -Nru a/drivers/scsi/qlogicfas.h b/drivers/scsi/qlogicfas.h
--- a/drivers/scsi/qlogicfas.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/qlogicfas.h	Wed Oct 30 16:44:27 2002
@@ -1,39 +1,33 @@
 #ifndef _QLOGICFAS_H
 #define _QLOGICFAS_H
 
-int qlogicfas_detect(Scsi_Host_Template * );
-const char * qlogicfas_info(struct Scsi_Host *);
-int qlogicfas_command(Scsi_Cmnd *);
-int qlogicfas_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
-int qlogicfas_abort(Scsi_Cmnd *);
-int qlogicfas_reset(Scsi_Cmnd *, unsigned int);
-int qlogicfas_biosparam(Disk *, struct block_device *, int[]);
+static int qlogicfas_detect(Scsi_Host_Template * );
+static const char * qlogicfas_info(struct Scsi_Host *);
+static int qlogicfas_command(Scsi_Cmnd *);
+static int qlogicfas_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
+static int qlogicfas_abort(Scsi_Cmnd *);
+static int qlogicfas_bus_reset(Scsi_Cmnd *);
+static int qlogicfas_device_reset(Scsi_Cmnd *);
+static int qlogicfas_host_reset(Scsi_Cmnd *);
+static int qlogicfas_biosparam(struct scsi_device *, struct block_device *,
+			       sector_t, int[]);
 
-#ifndef NULL
-#define NULL (0)
-#endif
-
-#ifdef PCMCIA
-#define __QLINIT __devinit
-#else
-#define __QLINIT __init
-#endif
-
-#define QLOGICFAS {		\
-	detect:         qlogicfas_detect,	\
-	info:           qlogicfas_info,		\
-	command:        qlogicfas_command, 	\
-	queuecommand:   qlogicfas_queuecommand,	\
-	abort:          qlogicfas_abort,	\
-	reset:          qlogicfas_reset,	\
-	bios_param:     qlogicfas_biosparam,	\
-	can_queue:      0,			\
-	this_id:        -1,			\
-	sg_tablesize:   SG_ALL,			\
-	cmd_per_lun:    1,			\
-	use_clustering: DISABLE_CLUSTERING	\
+#define QLOGICFAS {						\
+	detect:         		qlogicfas_detect,	\
+	info:           		qlogicfas_info,		\
+	command:     			qlogicfas_command, 	\
+	queuecommand:			qlogicfas_queuecommand,	\
+	eh_abort_handler:          	qlogicfas_abort,	\
+	eh_bus_reset_handler:		qlogicfas_bus_reset,	\
+	eh_device_reset_handler:        qlogicfas_device_reset,	\
+	eh_host_reset_handler:          qlogicfas_host_reset,	\
+	bios_param:     qlogicfas_biosparam,			\
+	can_queue:      0,					\
+	this_id:        -1,					\
+	sg_tablesize:   SG_ALL,					\
+	cmd_per_lun:    1,					\
+	use_clustering: DISABLE_CLUSTERING			\
 }
-
 #endif /* _QLOGICFAS_H */
 
 
diff -Nru a/drivers/scsi/qlogicfc.c b/drivers/scsi/qlogicfc.c
--- a/drivers/scsi/qlogicfc.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/qlogicfc.c	Wed Oct 30 16:44:30 2002
@@ -62,8 +62,7 @@
 #include <linux/spinlock.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"
 
 #define pci64_dma_hi32(a) ((u32) (0xffffffff & (((u64)(a))>>32)))
@@ -1787,9 +1786,10 @@
 }
 
 
-int isp2x00_biosparam(Disk * disk, struct block_device *n, int ip[])
+int isp2x00_biosparam(struct scsi_device *sdev, struct block_device *n,
+		sector_t capacity, int ip[])
 {
-	int size = disk->capacity;
+	int size = capacity;
 
 	ENTER("isp2x00_biosparam");
 
diff -Nru a/drivers/scsi/qlogicfc.h b/drivers/scsi/qlogicfc.h
--- a/drivers/scsi/qlogicfc.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/qlogicfc.h	Wed Oct 30 16:44:27 2002
@@ -75,7 +75,8 @@
 int isp2x00_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 int isp2x00_abort(Scsi_Cmnd *);
 int isp2x00_reset(Scsi_Cmnd *, unsigned int);
-int isp2x00_biosparam(Disk *, struct block_device *, int[]);
+int isp2x00_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 
 #ifndef NULL
 #define NULL (0)
@@ -87,7 +88,6 @@
         info:                   isp2x00_info,                              \
         queuecommand:           isp2x00_queuecommand,                      \
         eh_abort_handler:       isp2x00_abort,                             \
-        reset:                  isp2x00_reset,                             \
         bios_param:             isp2x00_biosparam,                         \
         can_queue:              QLOGICFC_REQ_QUEUE_LEN,                    \
         this_id:                -1,                                        \
diff -Nru a/drivers/scsi/qlogicisp.c b/drivers/scsi/qlogicisp.c
--- a/drivers/scsi/qlogicisp.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/qlogicisp.c	Wed Oct 30 16:44:28 2002
@@ -34,8 +34,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/byteorder.h>
-
-#include "sd.h"
+#include "scsi.h"
 #include "hosts.h"
 #include "qlogicisp.h"
 
@@ -1237,9 +1236,10 @@
 }
 
 
-int isp1020_biosparam(Disk *disk, struct block_device *n, int ip[])
+int isp1020_biosparam(struct scsi_device *sdev, struct block_device *n,
+		sector_t capacity, int ip[])
 {
-	int size = disk->capacity;
+	int size = capacity;
 
 	ENTER("isp1020_biosparam");
 
diff -Nru a/drivers/scsi/qlogicisp.h b/drivers/scsi/qlogicisp.h
--- a/drivers/scsi/qlogicisp.h	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/qlogicisp.h	Wed Oct 30 16:44:17 2002
@@ -64,7 +64,8 @@
 int isp1020_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 int isp1020_abort(Scsi_Cmnd *);
 int isp1020_reset(Scsi_Cmnd *, unsigned int);
-int isp1020_biosparam(Disk *, struct block_device *, int[]);
+int isp1020_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 
 #ifndef NULL
 #define NULL (0)
@@ -75,8 +76,6 @@
 	release:		isp1020_release,			   \
 	info:			isp1020_info,				   \
 	queuecommand:		isp1020_queuecommand,			   \
-	abort:			isp1020_abort,				   \
-	reset:			isp1020_reset,				   \
 	bios_param:		isp1020_biosparam,			   \
 	can_queue:		QLOGICISP_REQ_QUEUE_LEN,		   \
 	this_id:		-1,					   \
diff -Nru a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
--- a/drivers/scsi/qlogicpti.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/scsi/qlogicpti.c	Wed Oct 30 16:44:30 2002
@@ -1466,7 +1466,7 @@
 	u_short param[6];
 	struct Scsi_Host *host = Cmnd->host;
 	struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
-	int return_status = SCSI_ABORT_SUCCESS;
+	int return_status = SUCCESS;
 	unsigned long flags;
 	u32 cmd_cookie;
 	int i;
@@ -1493,7 +1493,7 @@
 	if (qlogicpti_mbox_command(qpti, param, 0) ||
 	    (param[0] != MBOX_COMMAND_COMPLETE)) {
 		printk(KERN_EMERG "qlogicpti : scsi abort failure: %x\n", param[0]);
-		return_status = SCSI_ABORT_ERROR;
+		return_status = FAILED;
 	}
 
 	qlogicpti_enable_irqs(qpti);
@@ -1503,12 +1503,12 @@
 	return return_status;
 }
 
-int qlogicpti_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags)
+int qlogicpti_reset(Scsi_Cmnd *Cmnd)
 {
 	u_short param[6];
 	struct Scsi_Host *host = Cmnd->host;
 	struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
-	int return_status = SCSI_RESET_SUCCESS;
+	int return_status = SUCCESS;
 	unsigned long flags;
 
 	printk(KERN_WARNING "qlogicpti : Resetting SCSI bus!\n");
@@ -1522,7 +1522,7 @@
 	if (qlogicpti_mbox_command(qpti, param, 0) ||
 	   (param[0] != MBOX_COMMAND_COMPLETE)) {
 		printk(KERN_EMERG "qlogicisp : scsi bus reset failure: %x\n", param[0]);
-		return_status = SCSI_RESET_ERROR;
+		return_status = FAILED;
 	}
 
 	qlogicpti_enable_irqs(qpti);
diff -Nru a/drivers/scsi/qlogicpti.h b/drivers/scsi/qlogicpti.h
--- a/drivers/scsi/qlogicpti.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/scsi/qlogicpti.h	Wed Oct 30 16:44:24 2002
@@ -57,7 +57,7 @@
 int qlogicpti_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 int qlogicpti_queuecommand_slow(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
 int qlogicpti_abort(Scsi_Cmnd *);
-int qlogicpti_reset(Scsi_Cmnd *, unsigned int);
+int qlogicpti_reset(Scsi_Cmnd *);
 
 /* mailbox command complete status codes */
 #define MBOX_COMMAND_COMPLETE		0x4000
@@ -515,36 +515,26 @@
 #define HCCTRL_B0ENAB           0x0004      /* Breakpoint 0 enable              */
 
 #ifdef CONFIG_SPARC64
-#define QLOGICPTI {						   \
-	detect:		qlogicpti_detect,			   \
-	release:	qlogicpti_release,			   \
-	info:		qlogicpti_info,				   \
-	queuecommand:	qlogicpti_queuecommand_slow,		   \
-	abort:		qlogicpti_abort,			   \
-	reset:		qlogicpti_reset,			   \
-	can_queue:	QLOGICPTI_REQ_QUEUE_LEN,		   \
-	this_id:	7,					   \
-	sg_tablesize:	QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
-	cmd_per_lun:	1,					   \
-	use_clustering:	ENABLE_CLUSTERING,			   \
-	highmem_io:	1,			   		   \
-}
+#define QLOGICPTI_HIGHMEM_IO 1
 #else
 /* Sparc32's iommu code cannot handle highmem pages yet. */
-#define QLOGICPTI {						   \
-	detect:		qlogicpti_detect,			   \
-	release:	qlogicpti_release,			   \
-	info:		qlogicpti_info,				   \
-	queuecommand:	qlogicpti_queuecommand_slow,		   \
-	abort:		qlogicpti_abort,			   \
-	reset:		qlogicpti_reset,			   \
-	can_queue:	QLOGICPTI_REQ_QUEUE_LEN,		   \
-	this_id:	7,					   \
-	sg_tablesize:	QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
-	cmd_per_lun:	1,					   \
-	use_clustering:	ENABLE_CLUSTERING,			   \
-}
+#define QLOGICPTI_HIGHMEM_IO 0
 #endif
+
+#define QLOGICPTI {						\
+	.detect		=	qlogicpti_detect,		\
+	.release	=	qlogicpti_release,		\
+	.info		=	qlogicpti_info,			\
+	.queuecommand	=	qlogicpti_queuecommand_slow,	\
+	.eh_abort_handler	=	qlogicpti_abort,	\
+	.eh_bus_reset_handler	=	qlogicpti_reset,	\
+	.can_queue	=	QLOGICPTI_REQ_QUEUE_LEN,	\
+	.this_id	=	7,				\
+	.sg_tablesize	=	QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
+	.cmd_per_lun	=	1,				\
+	.use_clustering	=	ENABLE_CLUSTERING,		\
+	.highmem_io	=	QLOGICPTI_HIGHMEM_IO,		\
+}
 
 /* For our interrupt engine. */
 #define for_each_qlogicpti(qp) \
diff -Nru a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
--- a/drivers/scsi/scsi.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/scsi.c	Wed Oct 30 16:44:28 2002
@@ -123,12 +123,6 @@
  */
 unsigned long scsi_pid;
 Scsi_Cmnd *last_cmnd;
-/* Command group 3 is reserved and should never be used.  */
-const unsigned char scsi_command_size[8] =
-{
-	6, 10, 10, 12,
-	16, 12, 10, 10
-};
 static unsigned long serial_number;
 
 struct softscsi_data {
@@ -658,10 +652,10 @@
  * Notes:       This could be called either from an interrupt context or a
  *              normal process context.
  */
-static int scsi_mlqueue_insert(Scsi_Cmnd * cmd, int reason)
+int scsi_mlqueue_insert(Scsi_Cmnd * cmd, int reason)
 {
 	struct Scsi_Host *host = cmd->host;
-	unsigned long flags;
+	struct scsi_device *device = cmd->device;
 
 	SCSI_LOG_MLQUEUE(1,
 		 printk("Inserting command %p into mlqueue\n", cmd));
@@ -688,7 +682,7 @@
 	if (reason == SCSI_MLQUEUE_HOST_BUSY) {
 		host->host_blocked = host->max_host_blocked;
 	} else {
-                cmd->device->device_blocked = cmd->device->max_device_blocked;
+		device->device_blocked = device->max_device_blocked;
 	}
 
 	/*
@@ -702,14 +696,19 @@
 	 * Decrement the counters, since these commands are no longer
 	 * active on the host/device.
 	 */
-	spin_lock_irqsave(cmd->host->host_lock, flags);
-	cmd->host->host_busy--;
-	cmd->device->device_busy--;
-	spin_unlock_irqrestore(cmd->host->host_lock, flags);
+	scsi_host_busy_dec_and_test(host, device);
 
 	/*
 	 * Insert this command at the head of the queue for it's device.
 	 * It will go before all other commands that are already in the queue.
+	 *
+	 * NOTE: there is magic here about the way the queue is
+	 * plugged if we have no outstanding commands.
+	 * scsi_insert_special_cmd eventually calls
+	 * blk_queue_insert().  Although this *doesn't* plug the
+	 * queue, it does call the request function.  The SCSI request
+	 * function detects the blocked condition and plugs the queue
+	 * appropriately.
 	 */
 	scsi_insert_special_cmd(cmd, 1);
 	return 0;
@@ -1991,6 +1990,11 @@
 	tpnt->next = scsi_devicelist;
 	scsi_devicelist = tpnt;
 
+	tpnt->scsi_driverfs_driver.name = (char *)tpnt->tag;
+	tpnt->scsi_driverfs_driver.bus = &scsi_driverfs_bus_type;
+
+	driver_register(&tpnt->scsi_driverfs_driver);
+
 	/*
 	 * First scan the devices that we know about, and see if we notice them.
 	 */
@@ -2019,33 +2023,33 @@
 	     shpnt = scsi_host_get_next(shpnt)) {
 		for (SDpnt = shpnt->host_queue; SDpnt;
 		     SDpnt = SDpnt->next) {
+			scsi_build_commandblocks(SDpnt);
+			if (SDpnt->current_queue_depth == 0) {
+				out_of_space = 1;
+				continue;
+			}
 			if (tpnt->attach)
 				(*tpnt->attach) (SDpnt);
+
 			/*
 			 * If this driver attached to the device, and don't have any
 			 * command blocks for this device, allocate some.
 			 */
-			if (SDpnt->attached && SDpnt->current_queue_depth == 0) {
+			if (SDpnt->attached)
 				SDpnt->online = TRUE;
-				scsi_build_commandblocks(SDpnt);
-				if (SDpnt->current_queue_depth == 0)
-					out_of_space = 1;
-			}
+			else
+				scsi_release_commandblocks(SDpnt);
 		}
 	}
 
-	/*
-	 * This does any final handling that is required.
-	 */
-	if (tpnt->finish && tpnt->nr_dev)
-		(*tpnt->finish) ();
 	MOD_INC_USE_COUNT;
 
 	if (out_of_space) {
 		scsi_unregister_device(tpnt);	/* easiest way to clean up?? */
 		return 1;
-	} else
-		return 0;
+	}
+
+	return 0;
 }
 
 int scsi_unregister_device(struct Scsi_Device_Template *tpnt)
@@ -2061,6 +2065,8 @@
 	 */
 	if (GET_USE_COUNT(tpnt->module) != 0)
 		goto error_out;
+
+	driver_unregister(&tpnt->scsi_driverfs_driver);
 
 	/*
 	 * Next, detach the devices from the driver.
diff -Nru a/drivers/scsi/scsi.h b/drivers/scsi/scsi.h
--- a/drivers/scsi/scsi.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/scsi.h	Wed Oct 30 16:44:26 2002
@@ -446,20 +446,6 @@
 void scsi_free_sgtable(struct scatterlist *sgl, int index);
 
 /*
- * Prototypes for functions in scsi_dma.c
- */
-void scsi_resize_dma_pool(void);
-int scsi_init_minimal_dma_pool(void);
-void *scsi_malloc(unsigned int);
-int scsi_free(void *, unsigned int);
-
-/*
- * Prototypes for functions in scsi_merge.c
- */
-extern void scsi_initialize_merge_fn(Scsi_Device *SDpnt);
-extern int scsi_init_io(Scsi_Cmnd *SCpnt);
-
-/*
  * Prototypes for functions in scsi_lib.c
  */
 extern int scsi_maybe_unblock_host(Scsi_Device * SDpnt);
@@ -494,6 +480,7 @@
 			void (*done) (struct scsi_cmnd *),
 			int timeout, int retries);
 extern int scsi_dev_init(void);
+extern int scsi_mlqueue_insert(struct scsi_cmnd *, int);
 
 /*
  * Newer request-based interfaces.
diff -Nru a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
--- a/drivers/scsi/scsi_debug.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/scsi_debug.c	Wed Oct 30 16:44:29 2002
@@ -924,12 +924,12 @@
 	return SUCCESS;
 }
 
-static int scsi_debug_biosparam(Disk * disk, struct block_device * bdev, 
-				int *info)
+static int scsi_debug_biosparam(struct scsi_device *sdev,
+		struct block_device * bdev, sector_t capacity, int *info)
 {
 	if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
 		printk(KERN_INFO "scsi_debug: biosparam\n");
-	/* int size = disk->capacity; */
+	/* int size = capacity; */
 	info[0] = N_HEAD;
 	info[1] = N_SECTOR;
 	info[2] = N_CYLINDER;
diff -Nru a/drivers/scsi/scsi_debug.h b/drivers/scsi/scsi_debug.h
--- a/drivers/scsi/scsi_debug.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/scsi_debug.h	Wed Oct 30 16:44:28 2002
@@ -8,7 +8,8 @@
 /* static int scsi_debug_command(Scsi_Cmnd *); */
 static int scsi_debug_queuecommand(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
 static int scsi_debug_ioctl(Scsi_Device *, int, void *);
-static int scsi_debug_biosparam(Disk *, struct block_device *, int[]);
+static int scsi_debug_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int[]);
 static int scsi_debug_abort(Scsi_Cmnd *);
 static int scsi_debug_bus_reset(Scsi_Cmnd *);
 static int scsi_debug_device_reset(Scsi_Cmnd *);
diff -Nru a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
--- a/drivers/scsi/scsi_error.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/scsi/scsi_error.c	Wed Oct 30 16:44:17 2002
@@ -1145,14 +1145,18 @@
 		if (!scsi_eh_eflags_chk(scmd, SCSI_EH_CMD_ERR))
 			continue;
 
-		printk(KERN_INFO "%s: Device offlined - not"
+		printk(KERN_INFO "scsi: Device offlined - not"
 				" ready or command retry failed"
 				" after error recovery: host"
 				" %d channel %d id %d lun %d\n",
-				__FUNCTION__, shost->host_no,
+				shost->host_no,
 				scmd->device->channel,
 				scmd->device->id,
 				scmd->device->lun);
+
+		if (scsi_eh_eflags_chk(scmd, SCSI_EH_CMD_TIMEOUT))
+			scmd->result |= (DRIVER_TIMEOUT << 24);
+
 		scmd->device->online = FALSE;
 		scsi_eh_finish_cmd(scmd, shost);
 	}
diff -Nru a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
--- a/drivers/scsi/scsi_lib.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/scsi_lib.c	Wed Oct 30 16:44:28 2002
@@ -240,7 +240,7 @@
 		SCpnt->request->special = (void *) SCpnt;
 		if(blk_rq_tagged(SCpnt->request))
 			blk_queue_end_tag(q, SCpnt->request);
-		_elv_add_request(q, SCpnt->request, 0, 0);
+		__elv_add_request(q, SCpnt->request, 0, 0);
 	}
 
 	/*
@@ -357,7 +357,7 @@
 		return SCpnt;
 	}
 
-	add_blkdev_randomness(major(req->rq_dev));
+	add_disk_randomness(req->rq_disk);
 
 	spin_lock_irqsave(q->queue_lock, flags);
 
@@ -514,6 +514,12 @@
 		}
 	}
 
+	if (blk_pc_request(req)) {
+		req->errors = result & 0xff;
+		if (!result)
+			req->data_len -= SCpnt->bufflen;
+	}
+
 	/*
 	 * Zero these out.  They now point to freed memory, and it is
 	 * dangerous to hang onto the pointers.
@@ -527,7 +533,7 @@
 	 * Next deal with any sectors which we were able to correctly
 	 * handle.
 	 */
-	if (good_sectors > 0) {
+	if (good_sectors >= 0) {
 		SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, %d sectors done.\n",
 					      req->nr_sectors, good_sectors));
 		SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n ", SCpnt->use_sg));
@@ -730,6 +736,87 @@
 }
 
 /*
+ * Function:    scsi_init_io()
+ *
+ * Purpose:     SCSI I/O initialize function.
+ *
+ * Arguments:   SCpnt   - Command descriptor we wish to initialize
+ *
+ * Returns:     1 on success.
+ */
+static int scsi_init_io(Scsi_Cmnd *SCpnt)
+{
+	struct request     *req = SCpnt->request;
+	struct scatterlist *sgpnt;
+	int count, gfp_mask;
+
+	/*
+	 * if this is a rq->data based REQ_BLOCK_PC, setup for a non-sg xfer
+	 */
+	if ((req->flags & REQ_BLOCK_PC) && !req->bio) {
+		SCpnt->request_bufflen = req->data_len;
+		SCpnt->request_buffer = req->data;
+		req->buffer = req->data;
+		SCpnt->use_sg = 0;
+		return 1;
+	}
+
+	/*
+	 * we used to not use scatter-gather for single segment request,
+	 * but now we do (it makes highmem I/O easier to support without
+	 * kmapping pages)
+	 */
+	SCpnt->use_sg = req->nr_phys_segments;
+
+	gfp_mask = GFP_NOIO;
+	if (in_interrupt()) {
+		gfp_mask &= ~__GFP_WAIT;
+		gfp_mask |= __GFP_HIGH;
+	}
+
+	/*
+	 * if sg table allocation fails, requeue request later.
+	 */
+	sgpnt = scsi_alloc_sgtable(SCpnt, gfp_mask);
+	if (unlikely(!sgpnt))
+		goto out;
+
+	SCpnt->request_buffer = (char *) sgpnt;
+	SCpnt->request_bufflen = req->nr_sectors << 9;
+	if (blk_pc_request(req))
+		SCpnt->request_bufflen = req->data_len;
+	req->buffer = NULL;
+
+	/* 
+	 * Next, walk the list, and fill in the addresses and sizes of
+	 * each segment.
+	 */
+	count = blk_rq_map_sg(req->q, req, SCpnt->request_buffer);
+
+	/*
+	 * mapped well, send it off
+	 */
+	if (unlikely(count > SCpnt->use_sg))
+		goto incorrect;
+	SCpnt->use_sg = count;
+	return 1;
+
+incorrect:
+	printk(KERN_ERR "Incorrect number of segments after building list\n");
+	printk(KERN_ERR "counted %d, received %d\n", count, SCpnt->use_sg);
+	printk(KERN_ERR "req nr_sec %lu, cur_nr_sec %u\n", req->nr_sectors,
+			req->current_nr_sectors);
+
+	/*
+	 * kill it. there should be no leftover blocks in this request
+	 */
+	SCpnt = scsi_end_request(SCpnt, 0, req->nr_sectors);
+	BUG_ON(SCpnt);
+out:
+	return 0;
+}
+
+/*
  * Function:    scsi_request_fn()
  *
  * Purpose:     Generic version of request function for SCSI hosts.
@@ -919,7 +1006,8 @@
 		req = NULL;
 		spin_unlock_irq(q->queue_lock);
 
-		if (SCpnt->request->flags & (REQ_CMD | REQ_BLOCK_PC)) {
+		if (!(SCpnt->request->flags & REQ_DONTPREP)
+		    && (SCpnt->request->flags & (REQ_CMD | REQ_BLOCK_PC))) {
 			/*
 			 * This will do a couple of things:
 			 *  1) Fill in the actual SCSI command.
@@ -940,18 +1028,8 @@
 			 * required).
 			 */
 			if (!scsi_init_io(SCpnt)) {
+				scsi_mlqueue_insert(SCpnt, SCSI_MLQUEUE_DEVICE_BUSY);
 				spin_lock_irq(q->queue_lock);
-				SHpnt->host_busy--;
-				SDpnt->device_busy--;
-				if (SDpnt->device_busy == 0) {
-					SDpnt->starved = 1;
-					SHpnt->some_device_starved = 1;
-				}
-				SCpnt->request->special = SCpnt;
-				SCpnt->request->flags |= REQ_SPECIAL;
-				if(blk_rq_tagged(SCpnt->request))
-					blk_queue_end_tag(q, SCpnt->request);
-				_elv_add_request(q, SCpnt->request, 0, 0);
 				break;
 			}
 
@@ -972,6 +1050,7 @@
 				continue;
 			}
 		}
+		SCpnt->request->flags |= REQ_DONTPREP;
 		/*
 		 * Finally, initialize any error handling parameters, and set up
 		 * the timers for timeouts.
diff -Nru a/drivers/scsi/scsi_merge.c b/drivers/scsi/scsi_merge.c
--- a/drivers/scsi/scsi_merge.c	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,168 +0,0 @@
-/*
- *  scsi_merge.c Copyright (C) 1999 Eric Youngdale
- *
- *  SCSI queueing library.
- *      Initial versions: Eric Youngdale (eric@andante.org).
- *                        Based upon conversations with large numbers
- *                        of people at Linux Expo.
- *	Support for dynamic DMA mapping: Jakub Jelinek (jakub@redhat.com).
- *	Support for highmem I/O: Jens Axboe <axboe@suse.de>
- */
-
-/*
- * This file contains queue management functions that are used by SCSI.
- * We need to ensure that commands do not grow so large that they cannot
- * be handled all at once by a host adapter.
- */
-
-#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/stat.h>
-#include <linux/blk.h>
-#include <linux/interrupt.h>
-#include <linux/delay.h>
-#include <linux/smp_lock.h>
-
-
-#define __KERNEL_SYSCALLS__
-
-#include <linux/unistd.h>
-
-#include <asm/system.h>
-#include <asm/irq.h>
-#include <asm/dma.h>
-#include <asm/io.h>
-
-#include "scsi.h"
-#include "hosts.h"
-#include <scsi/scsi_ioctl.h>
-
-/*
- * Function:    scsi_init_io()
- *
- * Purpose:     SCSI I/O initialize function.
- *
- * Arguments:   SCpnt   - Command descriptor we wish to initialize
- *
- * Returns:     1 on success.
- *
- * Lock status: 
- */
-int scsi_init_io(Scsi_Cmnd *SCpnt)
-{
-	struct request     *req = SCpnt->request;
-	struct scatterlist *sgpnt;
-	int count, gfp_mask;
-
-	/*
-	 * non-sg block request. FIXME: check bouncing for isa hosts!
-	 */
-	if ((req->flags & REQ_BLOCK_PC) && !req->bio) {
-		/*
-		 * FIXME: isa bouncing
-		 */
-		if (SCpnt->host->unchecked_isa_dma)
-			goto fail;
-
-		SCpnt->request_bufflen = req->data_len;
-		SCpnt->request_buffer = req->data;
-		req->buffer = req->data;
-		SCpnt->use_sg = 0;
-		return 1;
-	}
-
-	/*
-	 * we used to not use scatter-gather for single segment request,
-	 * but now we do (it makes highmem I/O easier to support without
-	 * kmapping pages)
-	 */
-	SCpnt->use_sg = req->nr_phys_segments;
-
-	gfp_mask = GFP_NOIO;
-	if (in_interrupt()) {
-		gfp_mask &= ~__GFP_WAIT;
-		gfp_mask |= __GFP_HIGH;
-	}
-
-	/*
-	 * if sg table allocation fails, requeue request later.
-	 */
-	sgpnt = scsi_alloc_sgtable(SCpnt, gfp_mask);
-	if (!sgpnt)
-		return 0;
-
-	SCpnt->request_buffer = (char *) sgpnt;
-	SCpnt->request_bufflen = req->nr_sectors << 9;
-	req->buffer = NULL;
-
-	/* 
-	 * Next, walk the list, and fill in the addresses and sizes of
-	 * each segment.
-	 */
-	count = blk_rq_map_sg(req->q, req, SCpnt->request_buffer);
-
-	/*
-	 * mapped well, send it off
-	 */
-	if (count <= SCpnt->use_sg) {
-		SCpnt->use_sg = count;
-		return 1;
-	}
-
-	printk("Incorrect number of segments after building list\n");
-	printk("counted %d, received %d\n", count, SCpnt->use_sg);
-	printk("req nr_sec %lu, cur_nr_sec %u\n", req->nr_sectors, req->current_nr_sectors);
-
-	/*
-	 * kill it. there should be no leftover blocks in this request
-	 */
-fail:
-	SCpnt = scsi_end_request(SCpnt, 0, req->nr_sectors);
-	BUG_ON(SCpnt);
-	return 0;
-}
-
-/*
- * Function:    scsi_initialize_merge_fn()
- *
- * Purpose:     Initialize merge function for a host
- *
- * Arguments:   SHpnt   - Host descriptor.
- *
- * Returns:     Nothing.
- *
- * Lock status: 
- *
- * Notes:
- */
-void scsi_initialize_merge_fn(Scsi_Device * SDpnt)
-{
-	struct Scsi_Host *SHpnt = SDpnt->host;
-	request_queue_t *q = &SDpnt->request_queue;
-	u64 bounce_limit;
-
-	/*
-	 * The generic merging functions work just fine for us.
-	 * Enable highmem I/O, if appropriate.
-	 */
-	bounce_limit = BLK_BOUNCE_HIGH;
-	if (SHpnt->highmem_io) {
-		if (!PCI_DMA_BUS_IS_PHYS)
-			/* Platforms with virtual-DMA translation
- 			 * hardware have no practical limit.
-			 */
-			bounce_limit = BLK_BOUNCE_ANY;
-		else if (SHpnt->pci_dev)
-			bounce_limit = SHpnt->pci_dev->dma_mask;
-	} else if (SHpnt->unchecked_isa_dma)
-		bounce_limit = BLK_BOUNCE_ISA;
-
-	blk_queue_bounce_limit(q, bounce_limit);
-}
diff -Nru a/drivers/scsi/scsi_mid_low_api.txt b/drivers/scsi/scsi_mid_low_api.txt
--- a/drivers/scsi/scsi_mid_low_api.txt	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/scsi_mid_low_api.txt	Wed Oct 30 16:44:31 2002
@@ -70,8 +70,9 @@
 
 /**
  *      bios_param - fetch head, sector, cylinder info for a disk
- *      @sdkp: pointer to disk structure (defined in sd.h)
+ *      @sdev: pointer to scsi device context (defined in scsi.h)
  *      @bdev: pointer to block device context (defined in fs.h)
+ *	@capacity:  device size
  *      @params: three element array to place output:
  *              params[0] number of heads
  *              params[1] number of sectors
@@ -88,7 +89,8 @@
  *      pre-initialized with made up values just in case this function 
  *      doesn't output anything.
  **/
-    int bios_param(Scsi_Disk * sdkp, struct block_device *bdev, int params[3]);
+    int bios_param(struct scsi_device * sdev, struct block_device *bdev,
+    			sector_t capacity, int params[3]);
 
 
 /**
@@ -459,13 +461,6 @@
 is determined by select_queue_depths (or Scsi_Host::cmd_per_lun). There
 will be at least one instance of Scsi_Cmnd for each scsi device.
 The structure is defined in scsi.h
-
-Scsi_Disk
----------
-It is a bit strange that this structure is exposed to a lower level
-driver in the bios_param() function. It is defined in sd.h and is only
-relevant to the sd upper level driver. The sd driver invokes bios_param()
-is response to the HD_GETGEO and HD_GETGEO_BIG ioctls.
 
 
 Flow of control during initialization
diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
--- a/drivers/scsi/scsi_scan.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/scsi_scan.c	Wed Oct 30 16:44:31 2002
@@ -483,6 +483,35 @@
 }
 
 /**
+ * scsi_initialize_merge_fn() -Æ£initialize merge function for a host
+ * @sd:		host descriptor
+ */
+static void scsi_initialize_merge_fn(struct scsi_device *sd)
+{
+	request_queue_t *q = &sd->request_queue;
+	struct Scsi_Host *sh = sd->host;
+	u64 bounce_limit;
+
+	if (sh->highmem_io) {
+		if (sh->pci_dev && PCI_DMA_BUS_IS_PHYS) {
+			bounce_limit = sh->pci_dev->dma_mask;
+		} else {
+			/*
+			 * Platforms with virtual-DMA translation
+ 			 * hardware have no practical limit.
+			 */
+			bounce_limit = BLK_BOUNCE_ANY;
+		}
+	} else if (sh->unchecked_isa_dma) {
+		bounce_limit = BLK_BOUNCE_ISA;
+	} else {
+		bounce_limit = BLK_BOUNCE_HIGH;
+	}
+
+	blk_queue_bounce_limit(q, bounce_limit);
+}
+
+/**
  * scsi_alloc_sdev - allocate and setup a Scsi_Device
  *
  * Description:
@@ -1995,29 +2024,28 @@
 	sdevscan->scsi_level = scsi_find_scsi_level(channel, id, shost);
 	res = scsi_probe_and_add_lun(sdevscan, &sdev, NULL);
 	scsi_free_sdev(sdevscan);
-	if (res == SCSI_SCAN_LUN_PRESENT) {
-		BUG_ON(sdev == NULL);
 
-		for (sdt = scsi_devicelist; sdt; sdt = sdt->next)
-			if (sdt->init && sdt->dev_noticed)
-				(*sdt->init) ();
-
-		for (sdt = scsi_devicelist; sdt; sdt = sdt->next)
-			if (sdt->attach) {
-				(*sdt->attach) (sdev);
-				if (sdev->attached) {
-					scsi_build_commandblocks(sdev);
-					if (sdev->current_queue_depth == 0)
-						printk(ALLOC_FAILURE_MSG,
-						       __FUNCTION__);
-				}
-			}
+	if (res != SCSI_SCAN_LUN_PRESENT) 
+		return;
 
-		for (sdt = scsi_devicelist; sdt; sdt = sdt->next)
-			if (sdt->finish && sdt->nr_dev)
-				(*sdt->finish) ();
+	BUG_ON(sdev == NULL);
 
+	scsi_build_commandblocks(sdev);
+	if (sdev->current_queue_depth == 0) {
+		printk(ALLOC_FAILURE_MSG, __FUNCTION__);
+		return;
 	}
+
+	for (sdt = scsi_devicelist; sdt; sdt = sdt->next)
+		if (sdt->init && sdt->dev_noticed)
+			(*sdt->init) ();
+
+	for (sdt = scsi_devicelist; sdt; sdt = sdt->next)
+		if (sdt->attach)
+			(*sdt->attach) (sdev);
+
+	if (!sdev->attached)
+		scsi_release_commandblocks(sdev);
 }
 
 /**
diff -Nru a/drivers/scsi/scsi_syms.c b/drivers/scsi/scsi_syms.c
--- a/drivers/scsi/scsi_syms.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/scsi_syms.c	Wed Oct 30 16:44:28 2002
@@ -22,7 +22,6 @@
 #include <scsi/scsi_ioctl.h>
 #include "hosts.h"
 
-#include "sd.h"
 #include <scsi/scsicam.h>
 
 /*
@@ -40,7 +39,6 @@
 EXPORT_SYMBOL(scsi_bios_ptable);
 EXPORT_SYMBOL(scsi_allocate_device);
 EXPORT_SYMBOL(scsi_do_cmd);
-EXPORT_SYMBOL(scsi_command_size);
 EXPORT_SYMBOL(scsi_ioctl);
 EXPORT_SYMBOL(print_command);
 EXPORT_SYMBOL(print_sense);
diff -Nru a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c
--- a/drivers/scsi/scsicam.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/scsicam.c	Wed Oct 30 16:44:29 2002
@@ -20,7 +20,6 @@
 #include <asm/unaligned.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <scsi/scsicam.h>
 
 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds,
@@ -44,7 +43,7 @@
 }
 
 /*
- * Function : int scsicam_bios_param (Disk *disk, struct block_device *bdev, int *ip)
+ * Function : int scsicam_bios_param (struct block_device *bdev, ector_t capacity, int *ip)
  *
  * Purpose : to determine the BIOS mapping used for a drive in a 
  *      SCSI-CAM system, storing the results in ip as required
@@ -54,42 +53,45 @@
  *
  */
 
-int scsicam_bios_param(Disk * disk,	/* SCSI disk */
-		       struct block_device *bdev,
-		  int *ip /* Heads, sectors, cylinders in that order */ )
+int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
 {
-	int ret_code;
-	int size = disk->capacity;
-	unsigned long temp_cyl;
-	unsigned char *p = scsi_bios_ptable(bdev);
+	unsigned char *p;
+	int ret;
 
+	p = scsi_bios_ptable(bdev);
 	if (!p)
 		return -1;
 
 	/* try to infer mapping from partition table */
-	ret_code = scsi_partsize(p, (unsigned long) size, (unsigned int *) ip + 2,
-		       (unsigned int *) ip + 0, (unsigned int *) ip + 1);
+	ret = scsi_partsize(p, (unsigned long)capacity, (unsigned int *)ip + 2,
+			       (unsigned int *)ip + 0, (unsigned int *)ip + 1);
 	kfree(p);
 
-	if (ret_code == -1) {
+	if (ret == -1) {
 		/* pick some standard mapping with at most 1024 cylinders,
 		   and at most 62 sectors per track - this works up to
 		   7905 MB */
-		ret_code = setsize((unsigned long) size, (unsigned int *) ip + 2,
-		       (unsigned int *) ip + 0, (unsigned int *) ip + 1);
+		ret = setsize((unsigned long)capacity, (unsigned int *)ip + 2,
+		       (unsigned int *)ip + 0, (unsigned int *)ip + 1);
 	}
+
 	/* if something went wrong, then apparently we have to return
 	   a geometry with more than 1024 cylinders */
-	if (ret_code || ip[0] > 255 || ip[1] > 63) {
-		ip[0] = 64;
-		ip[1] = 32;
-		temp_cyl = size / (ip[0] * ip[1]);
-		if (temp_cyl > 65534) {
+	if (ret || ip[0] > 255 || ip[1] > 63) {
+		if ((capacity >> 11) > 65534) {
 			ip[0] = 255;
 			ip[1] = 63;
+		} else {
+			ip[0] = 64;
+			ip[1] = 32;
 		}
-		ip[2] = size / (ip[0] * ip[1]);
+
+		if (capacity > 65535*63*255)
+			ip[2] = 65535;
+		else
+			ip[2] = (unsigned long)capacity / (ip[0] * ip[1]);
 	}
+
 	return 0;
 }
 
diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c
--- a/drivers/scsi/sd.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/sd.c	Wed Oct 30 16:44:31 2002
@@ -18,7 +18,7 @@
  *	 - Alex Davis <letmein@erols.com> Fix problem where partition info
  *	   not being read in sd_open. Fix problem where removable media 
  *	   could be ejected after sd_open.
- *	 - Douglas Gilbert <dgilbert@interlog.com> cleanup for lk 2.5 series
+ *	 - Douglas Gilbert <dgilbert@interlog.com> cleanup for lk 2.5.x
  *
  *	Logging policy (needs CONFIG_SCSI_LOGGING defined):
  *	 - setting up transfer: SCSI_LOG_HLQUEUE levels 1 and 2
@@ -29,145 +29,121 @@
  *	than the level indicated above to trigger output.	
  */
 
+#define MAJOR_NR SCSI_DISK0_MAJOR
+
 #include <linux/config.h>
 #include <linux/module.h>
-
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/bio.h>
-#include <linux/string.h>
+#include <linux/genhd.h>
 #include <linux/hdreg.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/reboot.h>
 #include <linux/vmalloc.h>
-#include <linux/smp.h>
-
-#include <asm/uaccess.h>
-#include <asm/io.h>
-
-#define MAJOR_NR SCSI_DISK0_MAJOR
-#define LOCAL_END_REQUEST
 #include <linux/blk.h>
 #include <linux/blkpg.h>
+#include <asm/uaccess.h>
+
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <scsi/scsi_ioctl.h>
-#include <scsi/scsicam.h>	/* must follow "hosts.h" */
+#include <scsi/scsicam.h>
 
-#include <linux/genhd.h>
-
-/* static char sd_version_str[] = "Version: 2.0.3 (20020417)"; */
-
-#define SD_MAJOR(i) (!(i) ? SCSI_DISK0_MAJOR : SCSI_DISK1_MAJOR-1+(i))
-
-#define SCSI_DISKS_PER_MAJOR	16
-#define SD_MAJOR_NUMBER(i)	SD_MAJOR((i) >> 8)
-#define SD_MINOR_NUMBER(i)	((i) & 255)
-#define MKDEV_SD_PARTITION(i)	mk_kdev(SD_MAJOR_NUMBER(i), (i) & 255)
-#define MKDEV_SD(index)		MKDEV_SD_PARTITION((index) << 4)
-#define N_USED_SD_MAJORS	(1 + ((sd_template.dev_max - 1) >> 4))
-
-#define MAX_RETRIES 5
+/*
+ * Remaining dev_t-handling stuff
+ */
+#define SD_MAJORS	8
+#define SD_MAJOR(i)	((i) ? SCSI_DISK1_MAJOR-1+(i) : SCSI_DISK0_MAJOR)
 
 /*
- *  Time out in seconds for disks and Magneto-opticals (which are slower).
+ * Time out in seconds for disks and Magneto-opticals (which are slower).
  */
+#define SD_TIMEOUT		(30 * HZ)
+#define SD_MOD_TIMEOUT		(75 * HZ)
 
-#define SD_TIMEOUT (30 * HZ)
-#define SD_MOD_TIMEOUT (75 * HZ)
+/*
+ * Number of allowed retries
+ */
+#define SD_MAX_RETRIES		5
 
-#define SD_DSK_ARR_LUMP 6 /* amount to over allocate sd_dsk_arr by */
+struct scsi_disk {
+	struct list_head list;		/* list of all scsi_disks */
+	struct scsi_device *device;
+	struct gendisk	*disk;
+	sector_t	capacity;	/* size in 512-byte sectors */
+	u8		media_present;
+	u8		write_prot;
+	unsigned	WCE : 1;	/* state of disk WCE bit */
+	unsigned	RCD : 1;	/* state of disk RCD bit */
+};
 
-static Scsi_Disk ** sd_dsk_arr;
-static rwlock_t sd_dsk_arr_lock = RW_LOCK_UNLOCKED;
+static LIST_HEAD(sd_devlist);
+static spinlock_t sd_devlist_lock = SPIN_LOCK_UNLOCKED;
 
 static int check_scsidisk_media_change(struct gendisk *);
 static int sd_revalidate(struct gendisk *);
 
-static void sd_init_onedisk(Scsi_Disk * sdkp, struct gendisk *disk);
+static void sd_init_onedisk(struct scsi_disk * sdkp, struct gendisk *disk);
+static void sd_rw_intr(struct scsi_cmnd * SCpnt);
 
-static int sd_init(void);
-static void sd_finish(void);
-static int sd_attach(Scsi_Device *);
-static int sd_detect(Scsi_Device *);
-static void sd_detach(Scsi_Device *);
-static int sd_init_command(Scsi_Cmnd *);
-static int sd_synchronize_cache(int, int);
+static int sd_attach(struct scsi_device *);
+static int sd_detect(struct scsi_device *);
+static void sd_detach(struct scsi_device *);
+static int sd_init_command(struct scsi_cmnd *);
+static int sd_synchronize_cache(struct scsi_disk *, int);
 static int sd_notifier(struct notifier_block *, unsigned long, void *);
 
 static struct notifier_block sd_notifier_block = {sd_notifier, NULL, 0}; 
 
 static struct Scsi_Device_Template sd_template = {
-	module:THIS_MODULE,
-	name:"disk",
-	tag:"sd",
-	scsi_type:TYPE_DISK,
-	major:SCSI_DISK0_MAJOR,
-        /*
-         * Secondary range of majors that this driver handles.
-         */
-	min_major:SCSI_DISK1_MAJOR,
-	max_major:SCSI_DISK7_MAJOR,
-	blk:1,
-	detect:sd_detect,
-	init:sd_init,
-	finish:sd_finish,
-	attach:sd_attach,
-	detach:sd_detach,
-	init_command:sd_init_command,
+	.module		= THIS_MODULE,
+	.name		= "disk",
+	.tag		= "sd",
+	.scsi_type	= TYPE_DISK,
+	.major		= SCSI_DISK0_MAJOR,
+	.min_major	= SCSI_DISK1_MAJOR,
+	.max_major	= SCSI_DISK7_MAJOR,
+	.blk		= 1,
+	.detect		= sd_detect,
+	.attach		= sd_attach,
+	.detach		= sd_detach,
+	.init_command	= sd_init_command,
 };
 
-static void sd_rw_intr(Scsi_Cmnd * SCpnt);
-
-static Scsi_Disk * sd_get_sdisk(int index);
-
-#if defined(CONFIG_PPC32)
-/**
- *	sd_find_target - find kdev_t of first scsi disk that matches
- *	given host and scsi_id. 
- *	@host: Scsi_Host object pointer that owns scsi device of interest
- *	@scsi_id: scsi (target) id number of device of interest
- *
- *	Returns kdev_t of first scsi device that matches arguments or
- *	NODEV of no match.
- *
- *	Notes: Looks like a hack, should scan for <host,channel,id,lin>
- *	tuple.
- *	[Architectural dependency: ppc only.] Moved here from 
- *	arch/ppc/pmac_setup.c.
- **/
-kdev_t __init
-sd_find_target(void *hp, int scsi_id)
+static struct scsi_disk *sd_find_by_sdev(Scsi_Device *sd)
 {
-	Scsi_Disk *sdkp;
-	Scsi_Device *sdp;
-	struct Scsi_Host *shp = hp;
-	int dsk_nr;
-	kdev_t retval = NODEV;
-	unsigned long iflags;
+	struct scsi_disk *sdkp;
 
-	SCSI_LOG_HLQUEUE(3, printk("sd_find_target: host_nr=%d, "
-			    "scsi_id=%d\n", shp->host_no, scsi_id));
-	read_lock_irqsave(&sd_dsk_arr_lock, iflags);
-	for (dsk_nr = 0; dsk_nr < sd_template.dev_max; ++dsk_nr) {
-		sdkp = sd_dsk_arr[dsk_nr];
-		if (sdkp == NULL)
-			continue;
-		sdp = sdkp->device;
-		if (sdp && (sdp->host == shp) && (sdp->id == scsi_id)) {
-			retval = MKDEV_SD(dsk_nr);
-			break;
+	spin_lock(&sd_devlist_lock);
+	list_for_each_entry(sdkp, &sd_devlist, list) {
+		if (sdkp->device == sd) {
+			spin_unlock(&sd_devlist_lock);
+			return sdkp;
 		}
 	}
-	read_unlock_irqrestore(&sd_dsk_arr_lock, iflags);
-	return retval;
+
+	spin_unlock(&sd_devlist_lock);
+	return NULL;
+}
+
+static inline void sd_devlist_insert(struct scsi_disk *sdkp)
+{
+	spin_lock(&sd_devlist_lock);
+	list_add(&sdkp->list, &sd_devlist);
+	spin_unlock(&sd_devlist_lock);
+}
+
+static inline void sd_devlist_remove(struct scsi_disk *sdkp)
+{
+	spin_lock(&sd_devlist_lock);
+	list_del(&sdkp->list);
+	spin_unlock(&sd_devlist_lock);
 }
-#endif
 
 /**
  *	sd_ioctl - process an ioctl
@@ -186,9 +162,11 @@
 static int sd_ioctl(struct inode * inode, struct file * filp, 
 		    unsigned int cmd, unsigned long arg)
 {
-	struct gendisk *disk = inode->i_bdev->bd_disk;
-        Scsi_Disk *sdkp = disk->private_data;
-	Scsi_Device *sdp = sdkp->device;
+	struct block_device *bdev = inode->i_bdev;
+	struct gendisk *disk = bdev->bd_disk;
+	struct scsi_disk *sdkp = disk->private_data;
+	struct scsi_device *sdp = sdkp->device;
+	sector_t capacity = sdkp->capacity;
 	struct Scsi_Host *host;
 	int diskinfo[4];
 	int error;
@@ -204,19 +182,19 @@
 	 * access to the device is prohibited.
 	 */
 
-	if( !scsi_block_when_processing_errors(sdp) )
+	if (!scsi_block_when_processing_errors(sdp))
 		return -ENODEV;
 
-	error = scsi_cmd_ioctl(inode->i_bdev, cmd, arg);
+	error = scsi_cmd_ioctl(bdev, cmd, arg);
 	if (error != -ENOTTY)
 		return error;
 
-	switch (cmd) 
-	{
+	switch (cmd) {
 		case HDIO_GETGEO:   /* Return BIOS disk parameters */
 		{
-			struct hd_geometry *loc = (struct hd_geometry *) arg;
-			if(!loc)
+			struct hd_geometry *loc = (struct hd_geometry *)arg;
+
+			if (!loc)
 				return -EINVAL;
 
 			host = sdp->host;
@@ -230,44 +208,28 @@
 			/* override with calculated, extended default, 
 			   or driver values */
 	
-			if(host->hostt->bios_param != NULL)
-				host->hostt->bios_param(sdkp, inode->i_bdev,
-							&diskinfo[0]);
-			else
-				scsicam_bios_param(sdkp, inode->i_bdev, &diskinfo[0]);
-			if (put_user(diskinfo[0], &loc->heads) ||
-				put_user(diskinfo[1], &loc->sectors) ||
-				put_user(diskinfo[2], &loc->cylinders) ||
-				put_user((unsigned) 
-					     get_start_sect(inode->i_bdev),
-					 (unsigned long *) &loc->start))
+			if (host->hostt->bios_param) {
+				host->hostt->bios_param(sdp, bdev,
+							capacity, diskinfo);
+			} else
+				scsicam_bios_param(bdev, capacity, diskinfo);
+
+			if (put_user(diskinfo[0], &loc->heads))
+				return -EFAULT;
+			if (put_user(diskinfo[1], &loc->sectors))
+				return -EFAULT;
+			if (put_user(diskinfo[2], &loc->cylinders))
+				return -EFAULT;
+			if (put_user((unsigned)get_start_sect(bdev),
+				     (unsigned long *)&loc->start))
 				return -EFAULT;
 			return 0;
 		}
 		default:
-			return scsi_ioctl(sdp, cmd, (void *) arg);
-	}
-}
-
-static void sd_dskname(unsigned int dsk_nr, char *buffer)
-{
-	if (dsk_nr < 26)
-		sprintf(buffer, "sd%c", 'a' + dsk_nr);
-	else {
-		unsigned int min1;
-		unsigned int min2;
-		/*
-		 * For larger numbers of disks, we need to go to a new
-		 * naming scheme.
-		 */
-		min1 = dsk_nr / 26;
-		min2 = dsk_nr % 26;
-		sprintf(buffer, "sd%c%c", 'a' + min1 - 1, 'a' + min2);
+			return scsi_ioctl(sdp, cmd, (void *)arg);
 	}
 }
 
-static struct gendisk **sd_disks;
-
 /**
  *	sd_init_command - build a scsi (read or write) command from
  *	information in the request structure.
@@ -276,12 +238,12 @@
  *
  *	Returns 1 if successful and 0 if error (or cannot be done now).
  **/
-static int sd_init_command(Scsi_Cmnd * SCpnt)
+static int sd_init_command(struct scsi_cmnd * SCpnt)
 {
 	int this_count, timeout;
 	struct gendisk *disk;
 	sector_t block;
-	Scsi_Device *sdp = SCpnt->device;
+	struct scsi_device *sdp = SCpnt->device;
 
 	timeout = SD_TIMEOUT;
 	if (SCpnt->device->type != TYPE_DISK)
@@ -308,6 +270,8 @@
 		if (rq->timeout)
 			timeout = rq->timeout;
 
+		SCpnt->transfersize = rq->data_len;
+		SCpnt->underflow = rq->data_len;
 		goto queue;
 	}
 
@@ -431,11 +395,11 @@
 	 * host adapter, it's safe to assume that we can at least transfer
 	 * this many bytes between each connect / disconnect.
 	 */
-queue:
 	SCpnt->transfersize = sdp->sector_size;
 	SCpnt->underflow = this_count << 9;
 
-	SCpnt->allowed = MAX_RETRIES;
+queue:
+	SCpnt->allowed = SD_MAX_RETRIES;
 	SCpnt->timeout_per_command = timeout;
 
 	/*
@@ -467,8 +431,8 @@
 static int sd_open(struct inode *inode, struct file *filp)
 {
 	struct gendisk *disk = inode->i_bdev->bd_disk;
-	Scsi_Disk *sdkp = disk->private_data;
-	Scsi_Device * sdp = sdkp->device;
+	struct scsi_disk *sdkp = disk->private_data;
+	struct scsi_device * sdp = sdkp->device;
 	int retval = -ENXIO;
 
 	SCSI_LOG_HLQUEUE(3, printk("sd_open: disk=%s\n", disk->disk_name));
@@ -552,8 +516,8 @@
 static int sd_release(struct inode *inode, struct file *filp)
 {
 	struct gendisk *disk = inode->i_bdev->bd_disk;
-	Scsi_Disk *sdkp = disk->private_data;
-	Scsi_Device *sdp = sdkp->device;
+	struct scsi_disk *sdkp = disk->private_data;
+	struct scsi_device *sdp = sdkp->device;
 
 	SCSI_LOG_HLQUEUE(3, printk("sd_release: disk=%s\n", disk->disk_name));
 	if (!sdp)
@@ -594,7 +558,7 @@
  *
  *	Note: potentially run from within an ISR. Must not block.
  **/
-static void sd_rw_intr(Scsi_Cmnd * SCpnt)
+static void sd_rw_intr(struct scsi_cmnd * SCpnt)
 {
 	int result = SCpnt->result;
 	int this_count = SCpnt->bufflen >> 9;
@@ -690,7 +654,7 @@
 }
 
 static void
-sd_set_media_not_present(Scsi_Disk *sdkp) {
+sd_set_media_not_present(struct scsi_disk *sdkp) {
 	sdkp->media_present = 0;
 	sdkp->capacity = 0;
 	sdkp->device->changed = 1;
@@ -706,8 +670,8 @@
  **/
 static int check_scsidisk_media_change(struct gendisk *disk)
 {
-	Scsi_Disk *sdkp = disk->private_data;
-	Scsi_Device *sdp = sdkp->device;
+	struct scsi_disk *sdkp = disk->private_data;
+	struct scsi_device *sdp = sdkp->device;
 	int retval;
 	int flag = 0;	/* <<<< what is this for?? */
 
@@ -755,7 +719,7 @@
 	}
 	/*
 	 * For removable scsi disk we have to recognise the presence
-	 * of a disk in the drive. This is kept in the Scsi_Disk
+	 * of a disk in the drive. This is kept in the struct scsi_disk
 	 * struct and tested at open !  Daniel Roche ( dan@lectra.fr )
 	 */
 
@@ -768,7 +732,7 @@
 }
 
 static int
-sd_media_not_present(Scsi_Disk *sdkp, Scsi_Request *SRpnt) {
+sd_media_not_present(struct scsi_disk *sdkp, struct scsi_request *SRpnt) {
 	int the_result = SRpnt->sr_result;
 
 	if (the_result != 0
@@ -786,10 +750,10 @@
  * spinup disk - called only in sd_init_onedisk()
  */
 static void
-sd_spinup_disk(Scsi_Disk *sdkp, char *diskname,
-	       Scsi_Request *SRpnt, unsigned char *buffer) {
+sd_spinup_disk(struct scsi_disk *sdkp, char *diskname,
+	       struct scsi_request *SRpnt, unsigned char *buffer) {
 	unsigned char cmd[10];
-	Scsi_Device *sdp = sdkp->device;
+	struct scsi_device *sdp = sdkp->device;
 	unsigned long spintime_value = 0;
 	int the_result, retries, spintime;
 
@@ -810,7 +774,7 @@
 			SRpnt->sr_data_direction = SCSI_DATA_NONE;
 
 			scsi_wait_req (SRpnt, (void *) cmd, (void *) buffer,
-				       0/*512*/, SD_TIMEOUT, MAX_RETRIES);
+				       0/*512*/, SD_TIMEOUT, SD_MAX_RETRIES);
 
 			the_result = SRpnt->sr_result;
 			retries++;
@@ -846,7 +810,7 @@
 				SRpnt->sr_data_direction = SCSI_DATA_READ;
 				scsi_wait_req(SRpnt, (void *)cmd, 
 					      (void *) buffer, 0/*512*/, 
-					      SD_TIMEOUT, MAX_RETRIES);
+					      SD_TIMEOUT, SD_MAX_RETRIES);
 				spintime_value = jiffies;
 			}
 			spintime = 1;
@@ -873,8 +837,8 @@
  * sd_read_cache_type - called only from sd_init_onedisk()
  */
 static void
-sd_read_cache_type(Scsi_Disk *sdkp, char *diskname,
-		   Scsi_Request *SRpnt, unsigned char *buffer) {
+sd_read_cache_type(struct scsi_disk *sdkp, char *diskname,
+		   struct scsi_request *SRpnt, unsigned char *buffer) {
 
 	unsigned char cmd[10];
 	int the_result, retries;
@@ -896,7 +860,7 @@
 
 		SRpnt->sr_data_direction = SCSI_DATA_READ;
 		scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
-			    128, SD_TIMEOUT, MAX_RETRIES);
+			    128, SD_TIMEOUT, SD_MAX_RETRIES);
 
 		the_result = SRpnt->sr_result;
 		retries--;
@@ -947,10 +911,10 @@
  * read disk capacity - called only in sd_init_onedisk()
  */
 static void
-sd_read_capacity(Scsi_Disk *sdkp, char *diskname,
-		 Scsi_Request *SRpnt, unsigned char *buffer) {
+sd_read_capacity(struct scsi_disk *sdkp, char *diskname,
+		 struct scsi_request *SRpnt, unsigned char *buffer) {
 	unsigned char cmd[10];
-	Scsi_Device *sdp = sdkp->device;
+	struct scsi_device *sdp = sdkp->device;
 	int the_result, retries;
 	int sector_size;
 
@@ -966,7 +930,7 @@
 		SRpnt->sr_data_direction = SCSI_DATA_READ;
 
 		scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
-			      8, SD_TIMEOUT, MAX_RETRIES);
+			      8, SD_TIMEOUT, SD_MAX_RETRIES);
 
 		if (sd_media_not_present(sdkp, SRpnt))
 			return;
@@ -1071,7 +1035,7 @@
 }
 
 static int
-sd_do_mode_sense6(Scsi_Device *sdp, Scsi_Request *SRpnt,
+sd_do_mode_sense6(struct scsi_device *sdp, struct scsi_request *SRpnt,
 		  int modepage, unsigned char *buffer, int len) {
 	unsigned char cmd[8];
 
@@ -1086,7 +1050,7 @@
 	SRpnt->sr_data_direction = SCSI_DATA_READ;
 
 	scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
-		      len, SD_TIMEOUT, MAX_RETRIES);
+		      len, SD_TIMEOUT, SD_MAX_RETRIES);
 
 	return SRpnt->sr_result;
 }
@@ -1095,9 +1059,9 @@
  * read write protect setting, if possible - called only in sd_init_onedisk()
  */
 static void
-sd_read_write_protect_flag(Scsi_Disk *sdkp, char *diskname,
-			   Scsi_Request *SRpnt, unsigned char *buffer) {
-	Scsi_Device *sdp = sdkp->device;
+sd_read_write_protect_flag(struct scsi_disk *sdkp, char *diskname,
+		   struct scsi_request *SRpnt, unsigned char *buffer) {
+	struct scsi_device *sdp = sdkp->device;
 	int res;
 
 	/*
@@ -1136,18 +1100,18 @@
 /**
  *	sd_init_onedisk - called the first time a new disk is seen,
  *	performs disk spin up, read_capacity, etc.
- *	@sdkp: pointer to associated Scsi_Disk object
+ *	@sdkp: pointer to associated struct scsi_disk object
  *	@dsk_nr: disk number within this driver (e.g. 0->/dev/sda,
  *	1->/dev/sdb, etc)
  *
  *	Note: this function is local to this driver.
  **/
 static void
-sd_init_onedisk(Scsi_Disk * sdkp, struct gendisk *disk)
+sd_init_onedisk(struct scsi_disk * sdkp, struct gendisk *disk)
 {
 	unsigned char *buffer;
-	Scsi_Device *sdp;
-	Scsi_Request *SRpnt;
+	struct scsi_device *sdp;
+	struct scsi_request *SRpnt;
 
 	SCSI_LOG_HLQUEUE(3, printk("sd_init_onedisk: disk=%s\n", disk->disk_name));
 
@@ -1197,131 +1161,6 @@
 	kfree(buffer);
 }
 
-/*
- * The sd_init() function looks at all SCSI drives present, determines
- * their size, and reads partition table entries for them.
- */
-
-static int sd_registered;
-
-/**
- *	sd_init- called during driver initialization (after
- *	sd_detect() is called for each scsi device present).
- *
- *	Returns 0 is successful (or already called); 1 if error
- *
- *	Note: this function is invoked from the scsi mid-level.
- **/
-static int sd_init()
-{
-	int k, maxparts;
-	Scsi_Disk * sdkp;
-
-	SCSI_LOG_HLQUEUE(3, printk("sd_init: dev_noticed=%d\n",
-			    sd_template.dev_noticed));
-	if (sd_template.dev_noticed == 0)
-		return 0;
-
-	if (NULL == sd_dsk_arr)
-		sd_template.dev_max = sd_template.dev_noticed + SD_EXTRA_DEVS;
-
-	if (sd_template.dev_max > N_SD_MAJORS * SCSI_DISKS_PER_MAJOR)
-		sd_template.dev_max = N_SD_MAJORS * SCSI_DISKS_PER_MAJOR;
-
-	/* At most 16 partitions on each scsi disk. */
-	maxparts = (sd_template.dev_max << 4);
-	if (maxparts == 0)
-		return 0;
-
-	if (!sd_registered) {
-		for (k = 0; k < N_USED_SD_MAJORS; k++) {
-			if (register_blkdev(SD_MAJOR(k), "sd", &sd_fops)) {
-				printk(KERN_NOTICE "Unable to get major %d "
-				       "for SCSI disk\n", SD_MAJOR(k));
-				return 1;
-			}
-		}
-		sd_registered++;
-	}
-	/* We do not support attaching loadable devices yet. */
-	if (sd_dsk_arr)
-		return 0;
-
-	/* allocate memory */
-#define init_mem_lth(x,n)	x = vmalloc((n) * sizeof(*x))
-#define zero_mem_lth(x,n)	memset(x, 0, (n) * sizeof(*x))
-
-	init_mem_lth(sd_dsk_arr, sd_template.dev_max);
-	if (sd_dsk_arr) {
-		zero_mem_lth(sd_dsk_arr, sd_template.dev_max);
-		for (k = 0; k < sd_template.dev_max; ++k) {
-			sdkp = vmalloc(sizeof(Scsi_Disk));
-			if (NULL == sdkp)
-				goto cleanup_mem;
-			memset(sdkp, 0, sizeof(Scsi_Disk));
-			sd_dsk_arr[k] = sdkp;
-		}
-	}
-	init_mem_lth(sd_disks, sd_template.dev_max);
-	if (sd_disks)
-		zero_mem_lth(sd_disks, sd_template.dev_max);
-
-	if (!sd_dsk_arr || !sd_disks)
-		goto cleanup_mem;
-
-	return 0;
-
-#undef init_mem_lth
-#undef zero_mem_lth
-
-cleanup_mem:
-	vfree(sd_disks);
-	sd_disks = NULL;
-	if (sd_dsk_arr) {
-                for (k = 0; k < sd_template.dev_max; ++k)
-			vfree(sd_dsk_arr[k]);
-		vfree(sd_dsk_arr);
-		sd_dsk_arr = NULL;
-	}
-	for (k = 0; k < N_USED_SD_MAJORS; k++) {
-		unregister_blkdev(SD_MAJOR(k), "sd");
-	}
-	sd_registered--;
-	return 1;
-}
-
-/**
- *	sd_finish - called during driver initialization, after all
- *	the sd_attach() calls are finished.
- *
- *	Note: this function is invoked from the scsi mid-level.
- *	This function is not called after driver initialization has completed.
- *	Specifically later device attachments invoke sd_attach() but not
- *	this function.
- **/
-static void sd_finish()
-{
-	int k;
-	Scsi_Disk * sdkp;
-
-	SCSI_LOG_HLQUEUE(3, printk("sd_finish: \n"));
-
-	for (k = 0; k < sd_template.dev_max; ++k) {
-		sdkp = sd_get_sdisk(k);
-		if (sdkp && (0 == sdkp->capacity) && sdkp->device) {
-			sd_init_onedisk(sdkp, sd_disks[k]);
-			if (sdkp->has_been_registered)
-				continue;
-			set_capacity(sd_disks[k], sdkp->capacity);
-			sd_disks[k]->private_data = sdkp;
-			sd_disks[k]->queue = &sdkp->device->request_queue;
-			add_disk(sd_disks[k]);
-			sdkp->has_been_registered = 1;
-		}
-	}
-	return;
-}
-
 /**
  *	sd_detect - called at the start of driver initialization, once 
  *	for each scsi device (not just disks) present.
@@ -1330,9 +1169,8 @@
  *	1 if this device is of interest (e.g. a disk).
  *
  *	Note: this function is invoked from the scsi mid-level.
- *	This function is called before sd_init() so very little is available.
  **/
-static int sd_detect(Scsi_Device * sdp)
+static int sd_detect(struct scsi_device * sdp)
 {
 	SCSI_LOG_HLQUEUE(3, printk("sd_detect: type=%d\n", sdp->type));
 	if (sdp->type != TYPE_DISK && sdp->type != TYPE_MOD)
@@ -1355,53 +1193,45 @@
  *	<host,channel,id,lun> (found in sdp) and new device name 
  *	(e.g. /dev/sda). More precisely it is the block device major 
  *	and minor number that is chosen here.
+ *
+ *	Assume sd_attach is not re-entrant (for time being)
+ *	Also think about sd_attach() and sd_detach() running coincidentally.
  **/
-static int sd_attach(Scsi_Device * sdp)
+static int sd_attach(struct scsi_device * sdp)
 {
-	Scsi_Disk *sdkp;
+	struct scsi_disk *sdkp = NULL;	/* shut up lame gcc warning */
 	int dsk_nr;
-	unsigned long iflags;
 	struct gendisk *gd;
 
-	if ((NULL == sdp) ||
-	    ((sdp->type != TYPE_DISK) && (sdp->type != TYPE_MOD)))
+	if ((sdp->type != TYPE_DISK) && (sdp->type != TYPE_MOD))
 		return 0;
 
+	SCSI_LOG_HLQUEUE(3, printk("sd_attach: scsi device: <%d,%d,%d,%d>\n", 
+			 sdp->host->host_no, sdp->channel, sdp->id, sdp->lun));
+
+	sdkp = kmalloc(sizeof(*sdkp), GFP_KERNEL);
+	if (!sdkp)
+		goto out;
+
 	gd = alloc_disk(16);
 	if (!gd)
-		return 1;
+		goto out_free;
 
-	SCSI_LOG_HLQUEUE(3, printk("sd_attach: scsi device: <%d,%d,%d,%d>\n", 
-			 sdp->host->host_no, sdp->channel, sdp->id, sdp->lun));
-	if (sd_template.nr_dev >= sd_template.dev_max) {
-		sdp->attached--;
-		printk(KERN_ERR "sd_init: no more room for device\n");
-		put_disk(gd);
-		return 1;
-	}
+	/*
+	 * XXX  This doesn't make us better than the previous code in the
+	 * XXX  end (not worse either, though..).
+	 * XXX  To properly support hotplugging we should have a bitmap and
+	 * XXX  use find_first_zero_bit on it.  This will happen at the
+	 * XXX  same time template->nr_* goes away.		--hch
+	 */
+	dsk_nr = sd_template.nr_dev++;
 
-/* Assume sd_attach is not re-entrant (for time being) */
-/* Also think about sd_attach() and sd_detach() running coincidentally. */
-	write_lock_irqsave(&sd_dsk_arr_lock, iflags);
-	for (dsk_nr = 0; dsk_nr < sd_template.dev_max; dsk_nr++) {
-		sdkp = sd_dsk_arr[dsk_nr];
-		if (!sdkp->device) {
-			memset(sdkp, 0, sizeof(Scsi_Disk));
-			sdkp->device = sdp;
-			break;
-		}
-	}
-	write_unlock_irqrestore(&sd_dsk_arr_lock, iflags);
+	sdkp->device = sdp;
+	sdkp->disk = gd;
 
-	if (dsk_nr >= sd_template.dev_max) {
-		/* panic("scsi_devices corrupt (sd)");  overkill */
-		printk(KERN_ERR "sd_init: sd_dsk_arr corrupted\n");
-		put_disk(gd);
-		return 1;
-	}
+	sd_init_onedisk(sdkp, gd);
 
-	sd_template.nr_dev++;
-        gd->de = sdp->de;
+	gd->de = sdp->de;
 	gd->major = SD_MAJOR(dsk_nr>>4);
 	gd->first_minor = (dsk_nr & 15)<<4;
 	gd->fops = &sd_fops;
@@ -1409,19 +1239,34 @@
 		sprintf(gd->disk_name, "sd%c%c",'a'+dsk_nr/26-1,'a'+dsk_nr%26);
 	else
 		sprintf(gd->disk_name, "sd%c",'a'+dsk_nr%26);
-        gd->flags = sdp->removable ? GENHD_FL_REMOVABLE : 0;
-        gd->driverfs_dev = &sdp->sdev_driverfs_dev;
-        gd->flags |= GENHD_FL_DRIVERFS | GENHD_FL_DEVFS;
-	sd_disks[dsk_nr] = gd;
+	gd->driverfs_dev = &sdp->sdev_driverfs_dev;
+	gd->flags = GENHD_FL_DRIVERFS | GENHD_FL_DEVFS;
+	if (sdp->removable)
+		gd->flags |= GENHD_FL_REMOVABLE;
+	gd->private_data = sdkp;
+	gd->queue = &sdkp->device->request_queue;
+
+	sd_devlist_insert(sdkp);
+	set_capacity(gd, sdkp->capacity);
+	add_disk(gd);
+
 	printk(KERN_NOTICE "Attached scsi %sdisk %s at scsi%d, channel %d, "
 	       "id %d, lun %d\n", sdp->removable ? "removable " : "",
-	       gd->disk_name, sdp->host->host_no, sdp->channel, sdp->id, sdp->lun);
+	       gd->disk_name, sdp->host->host_no, sdp->channel,
+	       sdp->id, sdp->lun);
+
 	return 0;
+
+out_free:
+	kfree(sdkp);
+out:
+	sdp->attached--;
+	return 1;
 }
 
 static int sd_revalidate(struct gendisk *disk)
 {
-	Scsi_Disk *sdkp = disk->private_data;
+	struct scsi_disk *sdkp = disk->private_data;
 
 	if (!sdkp->device)
 		return -ENODEV;
@@ -1442,45 +1287,32 @@
  *	that could be re-used by a subsequent sd_attach().
  *	This function is not called when the built-in sd driver is "exit-ed".
  **/
-static void sd_detach(Scsi_Device * sdp)
+static void sd_detach(struct scsi_device * sdp)
 {
-	Scsi_Disk *sdkp = NULL;
-	int dsk_nr;
-	unsigned long iflags;
+	struct scsi_disk *sdkp;
 
 	SCSI_LOG_HLQUEUE(3, printk("sd_detach: <%d,%d,%d,%d>\n", 
 			    sdp->host->host_no, sdp->channel, sdp->id, 
 			    sdp->lun));
-	write_lock_irqsave(&sd_dsk_arr_lock, iflags);
-	for (dsk_nr = 0; dsk_nr < sd_template.dev_max; dsk_nr++) {
-		sdkp = sd_dsk_arr[dsk_nr];
-		if (sdkp->device == sdp) {
-			break;
-		}
-	}
-	write_unlock_irqrestore(&sd_dsk_arr_lock, iflags);
-	if (dsk_nr >= sd_template.dev_max)
+
+	sdkp = sd_find_by_sdev(sdp);
+	if (!sdkp)
 		return;
 
 	/* check that we actually have a write back cache to synchronize */
-	if(sdkp->WCE) {
+	if (sdkp->WCE) {
 		printk(KERN_NOTICE "Synchronizing SCSI cache: ");
-		sd_synchronize_cache(dsk_nr, 1);
+		sd_synchronize_cache(sdkp, 1);
 		printk("\n");
 	}
-	sdkp->device = NULL;
-	sdkp->capacity = 0;
-	/* sdkp->detaching = 1; */
 
-	if (sdkp->has_been_registered) {
-		sdkp->has_been_registered = 0;
-		del_gendisk(sd_disks[dsk_nr]);
-	}
+	sd_devlist_remove(sdkp);
+	del_gendisk(sdkp->disk);
 	sdp->attached--;
 	sd_template.dev_noticed--;
 	sd_template.nr_dev--;
-	put_disk(sd_disks[dsk_nr]);
-	sd_disks[dsk_nr] = NULL;
+	put_disk(sdkp->disk);
+	kfree(sdkp);
 }
 
 /**
@@ -1491,16 +1323,26 @@
  **/
 static int __init init_sd(void)
 {
-	int rc;
+	int majors = 0, rc = -ENODEV, i;
+
 	SCSI_LOG_HLQUEUE(3, printk("init_sd: sd driver entry point\n"));
-	sd_template.module = THIS_MODULE;
-	rc = scsi_register_device(&sd_template);
-	if (!rc) {
-		sd_template.scsi_driverfs_driver.name = (char *)sd_template.tag;
-		sd_template.scsi_driverfs_driver.bus = &scsi_driverfs_bus_type;
-		driver_register(&sd_template.scsi_driverfs_driver);
-		register_reboot_notifier(&sd_notifier_block);
+
+	for (i = 0; i < SD_MAJORS; i++) {
+		if (register_blkdev(SD_MAJOR(i), "sd", &sd_fops))
+			printk(KERN_NOTICE
+			       "Unable to get major %d for SCSI disk\n",
+			       SD_MAJOR(i));
+		else
+			majors++;
 	}
+
+	if (!majors)
+		return -ENODEV;
+
+	rc = scsi_register_device(&sd_template);
+	if (rc)
+		return rc;
+	register_reboot_notifier(&sd_notifier_block);
 	return rc;
 }
 
@@ -1511,48 +1353,38 @@
  **/
 static void __exit exit_sd(void)
 {
-	int k;
+	int i;
 
 	SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
-	scsi_unregister_device(&sd_template);
-	for (k = 0; k < N_USED_SD_MAJORS; k++)
-		unregister_blkdev(SD_MAJOR(k), "sd");
-
-	sd_registered--;
-	if (sd_dsk_arr != NULL) {
-		for (k = 0; k < sd_template.dev_max; ++k)
-			vfree(sd_dsk_arr[k]);
-		vfree(sd_dsk_arr);
-	}
-	sd_template.dev_max = 0;
-	driver_unregister(&sd_template.scsi_driverfs_driver);
 
 	unregister_reboot_notifier(&sd_notifier_block);
+	scsi_unregister_device(&sd_template);
+	for (i = 0; i < SD_MAJORS; i++)
+		unregister_blkdev(SD_MAJOR(i), "sd");
+	driver_unregister(&sd_template.scsi_driverfs_driver);
 }
 
-static int sd_notifier(struct notifier_block *nbt, unsigned long event, void *buf)
+/*
+ * XXX: this function does not take sd_devlist_lock to synchronize
+ *	access to sd_devlist.  This should be safe as no other reboot
+ *	notifier can access it.
+ */
+static int sd_notifier(struct notifier_block *n, unsigned long event, void *p)
 {
-	int i;
-	char *msg = "Synchronizing SCSI caches: ";
-
-	if (!(event == SYS_RESTART || event == SYS_HALT 
-	      || event == SYS_POWER_OFF))
+	if (event != SYS_RESTART &&
+	    event != SYS_HALT &&
+	    event != SYS_POWER_OFF)
 		return NOTIFY_DONE;
-	for (i = 0; i < sd_template.dev_max; i++) {
-		Scsi_Disk *sdkp = sd_get_sdisk(i);
 
-		if (!sdkp || !sdkp->device)
-			continue;
-		if (sdkp->WCE) {
-			if(msg) {
-				printk(KERN_NOTICE "%s", msg);
-				msg = NULL;
-			}
-			sd_synchronize_cache(i, 1);
-		}
-	}
-	if(!msg)
+	if (!list_empty(&sd_devlist)) {
+		struct scsi_disk *sdkp;
+
+		printk(KERN_NOTICE "Synchronizing SCSI caches: ");
+		list_for_each_entry(sdkp, &sd_devlist, list)
+			if (sdkp->WCE)
+				sd_synchronize_cache(sdkp, 1);
 		printk("\n");
+	}
 
 	return NOTIFY_OK;
 }
@@ -1560,20 +1392,17 @@
 /* send a SYNCHRONIZE CACHE instruction down to the device through the
  * normal SCSI command structure.  Wait for the command to complete (must
  * have user context) */
-static int sd_synchronize_cache(int index, int verbose)
+static int sd_synchronize_cache(struct scsi_disk *sdkp, int verbose)
 {
-	Scsi_Request *SRpnt;
-	Scsi_Disk *sdkp = sd_get_sdisk(index);
-	Scsi_Device *SDpnt = sdkp->device;
+	struct scsi_request *SRpnt;
+	struct scsi_device *SDpnt = sdkp->device;
 	int retries, the_result;
 
-	if(verbose) {
-		char buf[16];
-
-		sd_dskname(index, buf);
+	if (!SDpnt->online)
+		return 0;
 
-		printk("%s ", buf);
-	}
+	if (verbose)
+		printk("%s ", sdkp->disk->disk_name);
 
 	SRpnt = scsi_allocate_request(SDpnt);
 	if(!SRpnt) {
@@ -1590,7 +1419,7 @@
 		/* leave the rest of the command zero to indicate 
 		 * flush everything */
 		scsi_wait_req(SRpnt, (void *)cmd, NULL, 0,
-			      SD_TIMEOUT, MAX_RETRIES);
+			      SD_TIMEOUT, SD_MAX_RETRIES);
 
 		if(SRpnt->sr_result == 0)
 			break;
@@ -1611,18 +1440,6 @@
 	}
 	scsi_release_request(SRpnt);
 	return (the_result == 0);
-}
-
-static Scsi_Disk * sd_get_sdisk(int index)
-{
-	Scsi_Disk * sdkp = NULL;
-	unsigned long iflags;
-
-	read_lock_irqsave(&sd_dsk_arr_lock, iflags);
-	if (sd_dsk_arr && (index >= 0) && (index < sd_template.dev_max))
-		sdkp = sd_dsk_arr[index];
-	read_unlock_irqrestore(&sd_dsk_arr_lock, iflags);
-	return sdkp;
 }
 
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/scsi/sd.h b/drivers/scsi/sd.h
--- a/drivers/scsi/sd.h	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,44 +0,0 @@
-/*
- *    sd.h Copyright (C) 1992 Drew Eckhardt 
- *      SCSI disk driver header file by
- *              Drew Eckhardt 
- *
- *      <drew@colorado.edu>
- *
- *       Modified by Eric Youngdale eric@andante.org to
- *       add scatter-gather, multiple outstanding request, and other
- *       enhancements.
- */
-#ifndef _SD_H
-#define _SD_H
-
-#ifndef _SCSI_H
-#include "scsi.h"
-#endif
-
-#ifndef _GENDISK_H
-#include <linux/genhd.h>
-#endif
-
-typedef struct scsi_disk {
-	sector_t capacity;		/* size in 512-byte sectors */
-	Scsi_Device *device;
-	unsigned char media_present;
-	unsigned char write_prot;
-	unsigned has_been_registered:1;
-	unsigned WCE:1;         /* state of disk WCE bit */
-	unsigned RCD:1;         /* state of disk RCD bit */
-} Scsi_Disk;
-
-extern int revalidate_scsidisk(kdev_t dev, int maxusage);
-
-/*
- * Used by pmac to find the device associated with a target.
- */
-extern kdev_t sd_find_target(void *host, int tgt);
-
-#define N_SD_MAJORS	8
-
-#define SD_MAJOR_MASK	(N_SD_MAJORS - 1)
-
-#endif
diff -Nru a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c
--- a/drivers/scsi/seagate.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/seagate.c	Wed Oct 30 16:44:28 2002
@@ -104,7 +104,6 @@
 #include "seagate.h"
 #include <linux/stat.h>
 #include <asm/uaccess.h>
-#include "sd.h"
 #include <scsi/scsi_ioctl.h>
 
 #ifdef DEBUG
@@ -1687,6 +1686,14 @@
 static int seagate_st0x_device_reset(Scsi_Cmnd *SCpnt)
 {
 	return FAILED;
+}
+
+static int seagate_st0x_release(struct Scsi_Host *shost)
+{
+	if (shost->irq)
+		free_irq(shost->irq, shost);
+	release_region(shost->io_port, shost->n_io_port);
+	return 0;
 }
 
 /* Eventually this will go into an include file, but this will be later */
diff -Nru a/drivers/scsi/seagate.h b/drivers/scsi/seagate.h
--- a/drivers/scsi/seagate.h	Wed Oct 30 16:44:31 2002
+++ b/drivers/scsi/seagate.h	Wed Oct 30 16:44:31 2002
@@ -20,6 +20,7 @@
 static int seagate_st0x_host_reset(Scsi_Cmnd *);
 
 #define SEAGATE_ST0X  {  detect:         seagate_st0x_detect,			\
+			 release:        seagate_st0x_release,			\
 			 info:           seagate_st0x_info,			\
 			 command:        seagate_st0x_command,			\
 			 queuecommand:   seagate_st0x_queue_command,		\
diff -Nru a/drivers/scsi/sg.c b/drivers/scsi/sg.c
--- a/drivers/scsi/sg.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/sg.c	Wed Oct 30 16:44:28 2002
@@ -1607,7 +1607,7 @@
 		sdp->de = NULL;
 		device_remove_file(&sdp->sg_driverfs_dev, &dev_attr_type);
 		device_remove_file(&sdp->sg_driverfs_dev, &dev_attr_kdev);
-		put_device(&sdp->sg_driverfs_dev);
+		device_unregister(&sdp->sg_driverfs_dev);
 		if (NULL == sdp->headfp)
 			vfree((char *) sdp);
 	}
@@ -1629,17 +1629,9 @@
 static int __init
 init_sg(void)
 {
-	int rc;
 	if (def_reserved_size >= 0)
 		sg_big_buff = def_reserved_size;
-	rc = scsi_register_device(&sg_template);
-	if (!rc) {
-		sg_template.scsi_driverfs_driver.name =
-		    (char *) sg_template.tag;
-		sg_template.scsi_driverfs_driver.bus = &scsi_driverfs_bus_type;
-		driver_register(&sg_template.scsi_driverfs_driver);
-	}
-	return rc;
+	return scsi_register_device(&sg_template);
 }
 
 static void __exit
@@ -1655,7 +1647,6 @@
 		sg_dev_arr = NULL;
 	}
 	sg_template.dev_max = 0;
-	driver_unregister(&sg_template.scsi_driverfs_driver);
 }
 
 static int
diff -Nru a/drivers/scsi/sim710.h b/drivers/scsi/sim710.h
--- a/drivers/scsi/sim710.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/sim710.h	Wed Oct 30 16:44:28 2002
@@ -14,7 +14,8 @@
 int sim710_bus_reset(Scsi_Cmnd * SCpnt);
 int sim710_dev_reset(Scsi_Cmnd * SCpnt);
 int sim710_host_reset(Scsi_Cmnd * SCpnt);
-int sim710_biosparam(Disk *, struct block_device *, int*);
+int sim710_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int*);
 #ifdef MODULE
 int sim710_release(struct Scsi_Host *);
 #else
@@ -32,7 +33,6 @@
 		      eh_device_reset_handler:	sim710_dev_reset,	\
 		      eh_bus_reset_handler:	sim710_bus_reset,	\
 		      eh_host_reset_handler:	sim710_host_reset,	\
-		      bios_param:		scsicam_bios_param,	\
 		      can_queue:		8,		 	\
 		      this_id:			7, 			\
 		      sg_tablesize:		128,		 	\
diff -Nru a/drivers/scsi/sr.c b/drivers/scsi/sr.c
--- a/drivers/scsi/sr.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/sr.c	Wed Oct 30 16:44:26 2002
@@ -7,34 +7,34 @@
  *      Linux scsi disk driver by
  *              Drew Eckhardt <drew@colorado.edu>
  *
- *      Modified by Eric Youngdale ericy@andante.org to
- *      add scatter-gather, multiple outstanding request, and other
- *      enhancements.
+ *	Modified by Eric Youngdale ericy@andante.org to
+ *	add scatter-gather, multiple outstanding request, and other
+ *	enhancements.
  *
- *          Modified by Eric Youngdale eric@andante.org to support loadable
- *          low-level scsi drivers.
+ *      Modified by Eric Youngdale eric@andante.org to support loadable
+ *      low-level scsi drivers.
  *
- *       Modified by Thomas Quinot thomas@melchior.cuivre.fdn.fr to
- *       provide auto-eject.
+ *      Modified by Thomas Quinot thomas@melchior.cuivre.fdn.fr to
+ *      provide auto-eject.
  *
- *          Modified by Gerd Knorr <kraxel@cs.tu-berlin.de> to support the
- *          generic cdrom interface
+ *      Modified by Gerd Knorr <kraxel@cs.tu-berlin.de> to support the
+ *      generic cdrom interface
  *
- *       Modified by Jens Axboe <axboe@suse.de> - Uniform sr_packet()
- *       interface, capabilities probe additions, ioctl cleanups, etc.
+ *      Modified by Jens Axboe <axboe@suse.de> - Uniform sr_packet()
+ *      interface, capabilities probe additions, ioctl cleanups, etc.
  *
- *       Modified by Richard Gooch <rgooch@atnf.csiro.au> to support devfs
+ *	Modified by Richard Gooch <rgooch@atnf.csiro.au> to support devfs
  *
- *       Modified by Jens Axboe <axboe@suse.de> - support DVD-RAM
- *	 transparently and loose the GHOST hack
- *
- *	 Modified by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
- *	 check resource allocation in sr_init and some cleanups
+ *	Modified by Jens Axboe <axboe@suse.de> - support DVD-RAM
+ *	transparently and loose the GHOST hack
  *
+ *	Modified by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *	check resource allocation in sr_init and some cleanups
  */
 
-#include <linux/module.h>
+#define MAJOR_NR SCSI_CDROM_MAJOR
 
+#include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -45,59 +45,60 @@
 #include <linux/cdrom.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
-#include <asm/system.h>
-#include <asm/io.h>
+#include <linux/blk.h>
 #include <asm/uaccess.h>
 
-#define MAJOR_NR SCSI_CDROM_MAJOR
-#define LOCAL_END_REQUEST
-#include <linux/blk.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sr.h"
 #include <scsi/scsi_ioctl.h>	/* For the door lock/unlock commands */
 
+#include "sr.h"
+
+
 MODULE_PARM(xa_test, "i");	/* see sr_ioctl.c */
 
 #define MAX_RETRIES	3
 #define SR_TIMEOUT	(30 * HZ)
+#define SR_CAPABILITIES \
+	(CDC_CLOSE_TRAY|CDC_OPEN_TRAY|CDC_LOCK|CDC_SELECT_SPEED| \
+	 CDC_SELECT_DISC|CDC_MULTI_SESSION|CDC_MCN|CDC_MEDIA_CHANGED| \
+	 CDC_PLAY_AUDIO|CDC_RESET|CDC_IOCTLS|CDC_DRIVE_STATUS| \
+	 CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_GENERIC_PACKET)
 
 static int sr_init(void);
-static void sr_finish(void);
-static int sr_attach(Scsi_Device *);
-static int sr_detect(Scsi_Device *);
-static void sr_detach(Scsi_Device *);
-
-static int sr_init_command(Scsi_Cmnd *);
-
-static struct Scsi_Device_Template sr_template =
-{
-	module:THIS_MODULE,
-	name:"cdrom",
-	tag:"sr",
-	scsi_type:TYPE_ROM,
-	major:SCSI_CDROM_MAJOR,
-	blk:1,
-	detect:sr_detect,
-	init:sr_init,
-	finish:sr_finish,
-	attach:sr_attach,
-	detach:sr_detach,
-	init_command:sr_init_command
+static int sr_attach(struct scsi_device *);
+static int sr_detect(struct scsi_device *);
+static void sr_detach(struct scsi_device *);
+
+static int sr_init_command(struct scsi_cmnd *);
+
+static struct Scsi_Device_Template sr_template = {
+	.module		= THIS_MODULE,
+	.name		= "cdrom",
+	.tag		= "sr",
+	.scsi_type	= TYPE_ROM,
+	.major		= SCSI_CDROM_MAJOR,
+	.blk		= 1,
+	.detect		= sr_detect,
+	.init		= sr_init,
+	.attach		= sr_attach,
+	.detach		= sr_detach,
+	.init_command	= sr_init_command
 };
 
-static Scsi_CD *scsi_CDs;
+static struct scsi_cd *scsi_CDs;
 
 static int sr_open(struct cdrom_device_info *, int);
-static void get_sectorsize(Scsi_CD *);
-static void get_capabilities(Scsi_CD *);
+static void get_sectorsize(struct scsi_cd *);
+static void get_capabilities(struct scsi_cd *);
+static int sr_init_one(struct scsi_cd *, int);
 
 static int sr_media_change(struct cdrom_device_info *, int);
 static int sr_packet(struct cdrom_device_info *, struct cdrom_generic_command *);
 
 static void sr_release(struct cdrom_device_info *cdi)
 {
-	Scsi_CD *cd = cdi->handle;
+	struct scsi_cd *cd = cdi->handle;
 
 	if (cd->device->sector_size > 2048)
 		sr_set_blocklength(cd, 2048);
@@ -108,28 +109,21 @@
 		__MOD_DEC_USE_COUNT(sr_template.module);
 }
 
-static struct cdrom_device_ops sr_dops =
-{
-	open:			sr_open,
-	release:		sr_release,
-	drive_status:		sr_drive_status,
-	media_changed:		sr_media_change,
-	tray_move:		sr_tray_move,
-	lock_door:		sr_lock_door,
-	select_speed:		sr_select_speed,
-	get_last_session:	sr_get_last_session,
-	get_mcn:		sr_get_mcn,
-	reset:			sr_reset,
-	audio_ioctl:		sr_audio_ioctl,
-	dev_ioctl:		sr_dev_ioctl,
-	capability:		CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK |
-				CDC_SELECT_SPEED | CDC_SELECT_DISC |
-				CDC_MULTI_SESSION | CDC_MCN |
-				CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO |
-				CDC_RESET | CDC_IOCTLS | CDC_DRIVE_STATUS |
-				CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R |
-				CDC_DVD_RAM | CDC_GENERIC_PACKET,
-	generic_packet:		sr_packet,
+static struct cdrom_device_ops sr_dops = {
+	.open			= sr_open,
+	.release	 	= sr_release,
+	.drive_status	 	= sr_drive_status,
+	.media_changed		= sr_media_change,
+	.tray_move		= sr_tray_move,
+	.lock_door		= sr_lock_door,
+	.select_speed		= sr_select_speed,
+	.get_last_session	= sr_get_last_session,
+	.get_mcn		= sr_get_mcn,
+	.reset			= sr_reset,
+	.audio_ioctl		= sr_audio_ioctl,
+	.dev_ioctl		= sr_dev_ioctl,
+	.capability		= SR_CAPABILITIES,
+	.generic_packet		= sr_packet,
 };
 
 /*
@@ -144,7 +138,7 @@
 
 int sr_media_change(struct cdrom_device_info *cdi, int slot)
 {
-	Scsi_CD *cd = cdi->handle;
+	struct scsi_cd *cd = cdi->handle;
 	int retval;
 
 	if (CDSL_CURRENT != slot) {
@@ -185,28 +179,29 @@
 }
 
 /*
- * rw_intr is the interrupt routine for the device driver.  It will be notified on the
- * end of a SCSI read / write, and will take on of several actions based on success or failure.
+ * rw_intr is the interrupt routine for the device driver.
+ *
+ * It will be notified on the end of a SCSI read / write, and will take on
+ * of several actions based on success or failure.
  */
-
-static void rw_intr(Scsi_Cmnd * SCpnt)
+static void rw_intr(struct scsi_cmnd * SCpnt)
 {
 	int result = SCpnt->result;
 	int this_count = SCpnt->bufflen >> 9;
 	int good_sectors = (result == 0 ? this_count : 0);
 	int block_sectors = 0;
-	Scsi_CD *cd = SCpnt->request->rq_disk->private_data;
+	struct scsi_cd *cd = SCpnt->request->rq_disk->private_data;
 
 #ifdef DEBUG
 	printk("sr.c done: %x %p\n", result, SCpnt->request->bh->b_data);
 #endif
+
 	/*
-	   Handle MEDIUM ERRORs or VOLUME OVERFLOWs that indicate partial success.
-	   Since this is a relatively rare error condition, no care is taken to
-	   avoid unnecessary additional work such as memcpy's that could be avoided.
+	 * Handle MEDIUM ERRORs or VOLUME OVERFLOWs that indicate partial
+	 * success.  Since this is a relatively rare error condition, no
+	 * care is taken to avoid unnecessary additional work such as
+	 * memcpy's that could be avoided.
 	 */
-
-
 	if (driver_byte(result) != 0 &&		/* An error occurred */
 	    SCpnt->sense_buffer[0] == 0xF0 &&	/* Sense data is valid */
 	    (SCpnt->sense_buffer[2] == MEDIUM_ERROR ||
@@ -245,15 +240,17 @@
 	scsi_io_completion(SCpnt, good_sectors, block_sectors);
 }
 
-static int sr_init_command(Scsi_Cmnd * SCpnt)
+static int sr_init_command(struct scsi_cmnd * SCpnt)
 {
 	int block=0, this_count, s_size, timeout = SR_TIMEOUT;
-	Scsi_CD *cd = SCpnt->request->rq_disk->private_data;
+	struct scsi_cd *cd = SCpnt->request->rq_disk->private_data;
 
-	SCSI_LOG_HLQUEUE(1, printk("Doing sr request, dev = %s, block = %d\n", cd->disk->disk_name, block));
+	SCSI_LOG_HLQUEUE(1, printk("Doing sr request, dev = %s, block = %d\n",
+				cd->disk->disk_name, block));
 
 	if (!cd->device || !cd->device->online) {
-		SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n", SCpnt->request->nr_sectors));
+		SCSI_LOG_HLQUEUE(2, printk("Finishing %ld sectors\n",
+					SCpnt->request->nr_sectors));
 		SCSI_LOG_HLQUEUE(2, printk("Retry with 0x%p\n", SCpnt));
 		return 0;
 	}
@@ -287,6 +284,8 @@
 		if (rq->timeout)
 			timeout = rq->timeout;
 
+		SCpnt->transfersize = rq->data_len;
+		SCpnt->underflow = rq->data_len;
 		goto queue;
 	}
 
@@ -328,7 +327,8 @@
 	/*
 	 * request doesn't start on hw block boundary, add scatter pads
 	 */
-	if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) || (SCpnt->request_bufflen % s_size)) {
+	if (((unsigned int)SCpnt->request->sector % (s_size >> 9)) ||
+	    (SCpnt->request_bufflen % s_size)) {
 		printk("sr: unaligned transfer\n");
 		return 0;
 	}
@@ -337,9 +337,10 @@
 
 
 	SCSI_LOG_HLQUEUE(2, printk("%s : %s %d/%ld 512 byte blocks.\n",
-                                   cd->cdi.name,
-		   (rq_data_dir(SCpnt->request) == WRITE) ? "writing" : "reading",
-				 this_count, SCpnt->request->nr_sectors));
+				cd->cdi.name,
+				(rq_data_dir(SCpnt->request) == WRITE) ?
+					"writing" : "reading",
+				this_count, SCpnt->request->nr_sectors));
 
 	SCpnt->cmnd[1] = 0;
 	block = (unsigned int)SCpnt->request->sector / (s_size >> 9);
@@ -360,10 +361,10 @@
 	 * host adapter, it's safe to assume that we can at least transfer
 	 * this many bytes between each connect / disconnect.
 	 */
-queue:
 	SCpnt->transfersize = cd->device->sector_size;
 	SCpnt->underflow = this_count << 9;
 
+queue:
 	SCpnt->allowed = MAX_RETRIES;
 	SCpnt->timeout_per_command = timeout;
 
@@ -394,26 +395,26 @@
 
 static int sr_block_open(struct inode *inode, struct file *file)
 {
-	Scsi_CD *cd = inode->i_bdev->bd_disk->private_data;
+	struct scsi_cd *cd = inode->i_bdev->bd_disk->private_data;
 	return cdrom_open(&cd->cdi, inode, file);
 }
 
 static int sr_block_release(struct inode *inode, struct file *file)
 {
-	Scsi_CD *cd = inode->i_bdev->bd_disk->private_data;
+	struct scsi_cd *cd = inode->i_bdev->bd_disk->private_data;
 	return cdrom_release(&cd->cdi, file);
 }
 
 static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd,
 			  unsigned long arg)
 {
-	Scsi_CD *cd = inode->i_bdev->bd_disk->private_data;
+	struct scsi_cd *cd = inode->i_bdev->bd_disk->private_data;
 	return cdrom_ioctl(&cd->cdi, inode, cmd, arg);
 }
 
 static int sr_block_media_changed(struct gendisk *disk)
 {
-	Scsi_CD *cd = disk->private_data;
+	struct scsi_cd *cd = disk->private_data;
 	return cdrom_media_changed(&cd->cdi);
 }
 
@@ -428,7 +429,7 @@
 
 static int sr_open(struct cdrom_device_info *cdi, int purpose)
 {
-	Scsi_CD *cd = cdi->handle;
+	struct scsi_cd *cd = cdi->handle;
 
 	if (!cd->device)
 		return -ENXIO;	/* No such device */
@@ -456,7 +457,7 @@
 	return 0;
 }
 
-static int sr_detect(Scsi_Device * SDp)
+static int sr_detect(struct scsi_device * SDp)
 {
 
 	if (SDp->type != TYPE_ROM && SDp->type != TYPE_WORM)
@@ -465,18 +466,17 @@
 	return 1;
 }
 
-static int sr_attach(Scsi_Device * SDp)
+static int sr_attach(struct scsi_device * SDp)
 {
-	Scsi_CD *cpnt;
+	struct scsi_cd *cpnt;
 	int i;
 
 	if (SDp->type != TYPE_ROM && SDp->type != TYPE_WORM)
 		return 1;
 
-	if (sr_template.nr_dev >= sr_template.dev_max) {
-		SDp->attached--;
-		return 1;
-	}
+	if (sr_template.nr_dev >= sr_template.dev_max)
+		goto fail;
+
 	for (cpnt = scsi_CDs, i = 0; i < sr_template.dev_max; i++, cpnt++)
 		if (!cpnt->device)
 			break;
@@ -484,26 +484,33 @@
 	if (i >= sr_template.dev_max)
 		panic("scsi_devices corrupt (sr)");
 
-
 	scsi_CDs[i].device = SDp;
 
+	if (sr_init_one(cpnt, i))
+		goto fail;
+
 	sr_template.nr_dev++;
 	if (sr_template.nr_dev > sr_template.dev_max)
 		panic("scsi_devices corrupt (sr)");
 
 	printk("Attached scsi CD-ROM %s at scsi%d, channel %d, id %d, lun %d\n",
-	       scsi_CDs[i].cdi.name, SDp->host->host_no, SDp->channel, SDp->id, SDp->lun);
+	       scsi_CDs[i].cdi.name, SDp->host->host_no, SDp->channel,
+	       SDp->id, SDp->lun);
 	return 0;
+
+fail:
+	SDp->attached--;
+	return 1;
 }
 
 
-static void get_sectorsize(Scsi_CD *cd)
+static void get_sectorsize(struct scsi_cd *cd)
 {
 	unsigned char cmd[10];
 	unsigned char *buffer;
 	int the_result, retries = 3;
 	int sector_size;
-	Scsi_Request *SRpnt = NULL;
+	struct scsi_request *SRpnt = NULL;
 	request_queue_t *queue;
 
 	buffer = kmalloc(512, GFP_DMA);
@@ -516,13 +523,13 @@
 	do {
 		cmd[0] = READ_CAPACITY;
 		memset((void *) &cmd[1], 0, 9);
-		SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;	/* Mark as really busy */
+		/* Mark as really busy */
+		SRpnt->sr_request->rq_status = RQ_SCSI_BUSY;
 		SRpnt->sr_cmd_len = 0;
 
 		memset(buffer, 0, 8);
 
 		/* Do the command and wait.. */
-
 		SRpnt->sr_data_direction = SCSI_DATA_READ;
 		scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
 			      8, SR_TIMEOUT, MAX_RETRIES);
@@ -600,7 +607,7 @@
 	goto out;
 }
 
-void get_capabilities(Scsi_CD *cd)
+void get_capabilities(struct scsi_cd *cd)
 {
 	struct cdrom_generic_command cgc;
 	unsigned char *buffer;
@@ -653,11 +660,11 @@
 	printk("%s: scsi3-mmc drive: %dx/%dx %s%s%s%s%s%s\n", cd->cdi.name,
 	       ((buffer[n + 14] << 8) + buffer[n + 15]) / 176,
 	       cd->cdi.speed,
-	       buffer[n + 3] & 0x01 ? "writer " : "",	/* CD Writer */
+	       buffer[n + 3] & 0x01 ? "writer " : "", /* CD Writer */
 	       buffer[n + 3] & 0x20 ? "dvd-ram " : "",
-	       buffer[n + 2] & 0x02 ? "cd/rw " : "",	/* can read rewriteable */
-	       buffer[n + 4] & 0x20 ? "xa/form2 " : "",		/* can read xa/from2 */
-	       buffer[n + 5] & 0x01 ? "cdda " : "",	/* can read audio data */
+	       buffer[n + 2] & 0x02 ? "cd/rw " : "", /* can read rewriteable */
+	       buffer[n + 4] & 0x20 ? "xa/form2 " : "",	/* can read xa/from2 */
+	       buffer[n + 5] & 0x01 ? "cdda " : "", /* can read audio data */
 	       loadmech[buffer[n + 6] >> 5]);
 	if ((buffer[n + 6] >> 5) == 0)
 		/* caddy drives can't close tray... */
@@ -701,7 +708,8 @@
  * sr_packet() is the entry point for the generic commands generated
  * by the Uniform CD-ROM layer. 
  */
-static int sr_packet(struct cdrom_device_info *cdi, struct cdrom_generic_command *cgc)
+static int sr_packet(struct cdrom_device_info *cdi,
+		struct cdrom_generic_command *cgc)
 {
 	if (cgc->timeout <= 0)
 		cgc->timeout = IOCTL_TIMEOUT;
@@ -721,7 +729,8 @@
 
 	if (!sr_registered) {
 		if (register_blkdev(MAJOR_NR, "sr", &sr_bdops)) {
-			printk("Unable to get major %d for SCSI-CD\n", MAJOR_NR);
+			printk("Unable to get major %d for SCSI-CD\n",
+					MAJOR_NR);
 			return 1;
 		}
 		sr_registered++;
@@ -730,10 +739,10 @@
 		return 0;
 
 	sr_template.dev_max = sr_template.dev_noticed + SR_EXTRA_DEVS;
-	scsi_CDs = kmalloc(sr_template.dev_max * sizeof(Scsi_CD), GFP_ATOMIC);
+	scsi_CDs = kmalloc(sr_template.dev_max * sizeof(struct scsi_cd), GFP_ATOMIC);
 	if (!scsi_CDs)
 		goto cleanup_dev;
-	memset(scsi_CDs, 0, sr_template.dev_max * sizeof(Scsi_CD));
+	memset(scsi_CDs, 0, sr_template.dev_max * sizeof(struct scsi_cd));
 	for (i = 0; i < sr_template.dev_max; i++)
 		sprintf(scsi_CDs[i].cdi.name, "sr%d", i);
 	return 0;
@@ -744,69 +753,61 @@
 	return 1;
 }
 
-void sr_finish()
+static int sr_init_one(struct scsi_cd *cd, int first_minor)
 {
-	int i;
+	struct gendisk *disk;
 
-	for (i = 0; i < sr_template.nr_dev; ++i) {
-		struct gendisk *disk;
-		Scsi_CD *cd = &scsi_CDs[i];
-		/* If we have already seen this, then skip it.  Comes up
-		 * with loadable modules. */
-		if (cd->disk)
-			continue;
-		disk = alloc_disk(1);
-		if (!disk)
-			continue;
-		if (cd->disk) {
-			put_disk(disk);
-			continue;
-		}
-		disk->major = MAJOR_NR;
-		disk->first_minor = i;
-		strcpy(disk->disk_name, cd->cdi.name);
-		disk->fops = &sr_bdops;
-		disk->flags = GENHD_FL_CD;
-		cd->disk = disk;
-		cd->capacity = 0x1fffff;
-		cd->device->sector_size = 2048;/* A guess, just in case */
-		cd->needs_sector_size = 1;
-		cd->device->changed = 1;	/* force recheck CD type */
+	disk = alloc_disk(1);
+	if (!disk)
+		return -ENOMEM;
+
+	disk->major = MAJOR_NR;
+	disk->first_minor = first_minor;
+	strcpy(disk->disk_name, cd->cdi.name);
+	disk->fops = &sr_bdops;
+	disk->flags = GENHD_FL_CD;
+	cd->disk = disk;
+	cd->capacity = 0x1fffff;
+	cd->device->sector_size = 2048;/* A guess, just in case */
+	cd->needs_sector_size = 1;
+	cd->device->changed = 1;	/* force recheck CD type */
 #if 0
-		/* seems better to leave this for later */
-		get_sectorsize(cd);
-		printk("Scd sectorsize = %d bytes.\n", cd->sector_size);
+	/* seems better to leave this for later */
+	get_sectorsize(cd);
+	printk("Scd sectorsize = %d bytes.\n", cd->sector_size);
 #endif
-		cd->use = 1;
+	cd->use = 1;
 
-		cd->device->ten = 1;
-		cd->device->remap = 1;
-		cd->readcd_known = 0;
-		cd->readcd_cdda = 0;
-
-		cd->cdi.ops = &sr_dops;
-		cd->cdi.handle = cd;
-		cd->cdi.mask = 0;
-		cd->cdi.capacity = 1;
-		/*
-		 *	FIXME: someone needs to handle a get_capabilities
-		 *	failure properly ??
-		 */
-		get_capabilities(cd);
-		sr_vendor_init(cd);
-		disk->de = cd->device->de;
-		disk->driverfs_dev = &cd->device->sdev_driverfs_dev;
-		register_cdrom(&cd->cdi);
-		set_capacity(disk, cd->capacity);
-		disk->private_data = cd;
-		disk->queue = &cd->device->request_queue;
-		add_disk(disk);
-	}
+	cd->device->ten = 1;
+	cd->device->remap = 1;
+	cd->readcd_known = 0;
+	cd->readcd_cdda = 0;
+
+	cd->cdi.ops = &sr_dops;
+	cd->cdi.handle = cd;
+	cd->cdi.mask = 0;
+	cd->cdi.capacity = 1;
+
+	/*
+	 *	FIXME: someone needs to handle a get_capabilities
+	 *	failure properly ??
+	 */
+	get_capabilities(cd);
+	sr_vendor_init(cd);
+	disk->de = cd->device->de;
+	disk->driverfs_dev = &cd->device->sdev_driverfs_dev;
+	register_cdrom(&cd->cdi);
+	set_capacity(disk, cd->capacity);
+	disk->private_data = cd;
+	disk->queue = &cd->device->request_queue;
+	add_disk(disk);
+
+	return 0;
 }
 
-static void sr_detach(Scsi_Device * SDp)
+static void sr_detach(struct scsi_device * SDp)
 {
-	Scsi_CD *cpnt;
+	struct scsi_cd *cpnt;
 	int i;
 
 	for (cpnt = scsi_CDs, i = 0; i < sr_template.dev_max; i++, cpnt++) {
@@ -837,14 +838,7 @@
 
 static int __init init_sr(void)
 {
-	int rc;
-	rc = scsi_register_device(&sr_template);
-	if (!rc) {
-		sr_template.scsi_driverfs_driver.name = (char *)sr_template.tag;
-		sr_template.scsi_driverfs_driver.bus = &scsi_driverfs_bus_type;
-		driver_register(&sr_template.scsi_driverfs_driver);
-	}
-	return rc;
+	return scsi_register_device(&sr_template);
 }
 
 static void __exit exit_sr(void)
@@ -856,7 +850,6 @@
 		kfree(scsi_CDs);
 
 	sr_template.dev_max = 0;
-	driver_unregister(&sr_template.scsi_driverfs_driver);
 }
 
 module_init(init_sr);
diff -Nru a/drivers/scsi/sr.h b/drivers/scsi/sr.h
--- a/drivers/scsi/sr.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/sr.h	Wed Oct 30 16:44:27 2002
@@ -24,7 +24,7 @@
 /* In fact, it is very slow if it has to spin up first */
 #define IOCTL_TIMEOUT 30*HZ
 
-typedef struct {
+typedef struct scsi_cd {
 	unsigned capacity;	/* size in blocks                       */
 	Scsi_Device *device;
 	unsigned int vendor;	/* vendor code, see sr_vendor.c         */
diff -Nru a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
--- a/drivers/scsi/sr_ioctl.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/sr_ioctl.c	Wed Oct 30 16:44:29 2002
@@ -5,15 +5,14 @@
 #include <asm/uaccess.h>
 #include <linux/errno.h>
 #include <linux/string.h>
-#include <linux/buffer_head.h>		/* for invalidate_buffers() */
-
 #include <linux/blk.h>
 #include <linux/blkpg.h>
+#include <linux/cdrom.h>
+
 #include "scsi.h"
 #include "hosts.h"
 #include <scsi/scsi_ioctl.h>
 
-#include <linux/cdrom.h>
 #include "sr.h"
 
 #if 0
@@ -76,8 +75,8 @@
 
 int sr_do_ioctl(Scsi_CD *cd, struct cdrom_generic_command *cgc)
 {
-	Scsi_Request *SRpnt;
-	Scsi_Device *SDev;
+	struct scsi_request *SRpnt;
+	struct scsi_device *SDev;
         struct request *req;
 	int result, err = 0, retries = 0;
 	char *bounce_buffer;
@@ -160,13 +159,11 @@
 			if (!cgc->quiet)
 				printk(KERN_ERR "%s: CDROM (ioctl) reports ILLEGAL "
 				       "REQUEST.\n", cd->cdi.name);
+			err = -EIO;
 			if (SRpnt->sr_sense_buffer[12] == 0x20 &&
-			    SRpnt->sr_sense_buffer[13] == 0x00) {
+			    SRpnt->sr_sense_buffer[13] == 0x00)
 				/* sense: Invalid command operation code */
 				err = -EDRIVE_CANT_DO_THIS;
-			} else {
-				err = -EINVAL;
-			}
 #ifdef DEBUG
 			print_command(cgc->cmd);
 			print_req_sense("sr", SRpnt);
@@ -555,21 +552,3 @@
 	Scsi_CD *cd = cdi->handle;
 	return scsi_ioctl(cd->device, cmd, (void *)arg);
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-indent-level: 4
- * c-brace-imaginary-offset: 0
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * c-continued-statement-offset: 4
- * c-continued-brace-offset: 0
- * tab-width: 8
- * End:
- */
diff -Nru a/drivers/scsi/st.c b/drivers/scsi/st.c
--- a/drivers/scsi/st.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/st.c	Wed Oct 30 16:44:29 2002
@@ -3965,14 +3965,8 @@
 		st_max_sg_segs);
 
 	if (register_chrdev(SCSI_TAPE_MAJOR, "st", &st_fops) >= 0) {
-		if (scsi_register_device(&st_template) == 0) {
-			st_template.scsi_driverfs_driver.name = 
-				(char *)st_template.tag;
-			st_template.scsi_driverfs_driver.bus = 
-				&scsi_driverfs_bus_type;
-			driver_register(&st_template.scsi_driverfs_driver);
+		if (scsi_register_device(&st_template) == 0)
 			return 0;
-		}
 	}
 
 	printk(KERN_ERR "Unable to get major %d for SCSI tapes\n", MAJOR_NR);
@@ -3992,7 +3986,6 @@
 		kfree(scsi_tapes);
 	}
 	st_template.dev_max = 0;
-	driver_unregister(&st_template.scsi_driverfs_driver);
 	printk(KERN_INFO "st: Unloaded.\n");
 }
 
diff -Nru a/drivers/scsi/sun3_scsi.h b/drivers/scsi/sun3_scsi.h
--- a/drivers/scsi/sun3_scsi.h	Wed Oct 30 16:44:20 2002
+++ b/drivers/scsi/sun3_scsi.h	Wed Oct 30 16:44:20 2002
@@ -84,7 +84,6 @@
 queuecommand:		sun3scsi_queue_command,				\
 abort:			sun3scsi_abort,			 		\
 reset:			sun3scsi_reset,					\
-bios_param:		scsicam_bios_param,	/* biosparam */		\
 can_queue:		CAN_QUEUE,		/* can queue */		\
 this_id:		7,			/* id */		\
 sg_tablesize:		SG_ALL,			/* sg_tablesize */	\
diff -Nru a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c
--- a/drivers/scsi/sym53c416.c	Wed Oct 30 16:44:23 2002
+++ b/drivers/scsi/sym53c416.c	Wed Oct 30 16:44:23 2002
@@ -45,7 +45,6 @@
 #include <linux/isapnp.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include "sym53c416.h"
 
 #define VERSION_STRING        "Version 1.0.0-ac"
@@ -715,7 +714,6 @@
 				if(shpnt==NULL)
 					continue;
 				spin_lock_irqsave(&sym53c416_lock, flags);
-				/* FIXME: Request_irq with CLI is not safe */
 				/* Request for specified IRQ */
 				if(request_irq(hosts[i].irq, sym53c416_intr_handle, 0, ID, shpnt))
 				{
@@ -800,12 +798,20 @@
 
 static int sym53c416_abort(Scsi_Cmnd *SCpnt)
 {
-	/* printk("sym53c416_abort\n"); */
-	/* We don't know how to abort for the moment */
-	return SCSI_ABORT_SNOOZE;
+	return FAILED;
 }
 
-static int sym53c416_reset(Scsi_Cmnd *SCpnt, unsigned int reset_flags)
+static int sym53c416_bus_reset(Scsi_Cmnd *SCpnt)
+{
+	return FAILED;
+}
+
+static int sym53c416_device_reset(Scsi_Cmnd *SCpnt)
+{
+	return FAILED;
+}
+
+static int sym53c416_host_reset(Scsi_Cmnd *SCpnt)
 {
 	int base;
 	int scsi_id = -1;	
@@ -813,7 +819,7 @@
 
 	/* printk("sym53c416_reset\n"); */
 	base = SCpnt->host->io_port;
-	/* search scsi_id */
+	/* search scsi_id - fixme, we shouldnt need to iterate for this! */
 	for(i = 0; i < host_index && scsi_id != -1; i++)
 		if(hosts[i].base == base)
 			scsi_id = hosts[i].scsi_id;
@@ -821,14 +827,25 @@
 	outb(NOOP | PIO_MODE, base + COMMAND_REG);
 	outb(RESET_SCSI_BUS, base + COMMAND_REG);
 	sym53c416_init(base, scsi_id);
-	return SCSI_RESET_PENDING;
+	return SUCCESS;
+}
+
+static int sym53c416_release(struct Scsi_Host *shost)
+{
+	if (shost->irq)
+		free_irq(shost->irq, shost);
+	if (shost->io_port && shost->n_io_port)
+		release_region(shost->io_port, shost->n_io_port);
+	return 0;
 }
 
-static int sym53c416_bios_param(Disk *disk, struct block_device *dev, int *ip)
+static int sym53c416_bios_param(struct scsi_device *sdev,
+		struct block_device *dev,
+		sector_t capacity, int *ip)
 {
 	int size;
 
-	size = disk->capacity;
+	size = capacity;
 	ip[0] = 64;				/* heads                        */
 	ip[1] = 32;				/* sectors                      */
 	if((ip[2] = size >> 11) > 1024)		/* cylinders, test for big disk */
diff -Nru a/drivers/scsi/sym53c416.h b/drivers/scsi/sym53c416.h
--- a/drivers/scsi/sym53c416.h	Wed Oct 30 16:44:25 2002
+++ b/drivers/scsi/sym53c416.h	Wed Oct 30 16:44:25 2002
@@ -32,28 +32,35 @@
 
 static int sym53c416_detect(Scsi_Host_Template *);
 static const char *sym53c416_info(struct Scsi_Host *);
+static int sym53c416_release(struct Scsi_Host *);
 static int sym53c416_command(Scsi_Cmnd *);
 static int sym53c416_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 static int sym53c416_abort(Scsi_Cmnd *);
-static int sym53c416_reset(Scsi_Cmnd *, unsigned int);
-static int sym53c416_bios_param(Disk *, struct block_device *, int *);
+static int sym53c416_host_reset(Scsi_Cmnd *);
+static int sym53c416_bus_reset(Scsi_Cmnd *);
+static int sym53c416_device_reset(Scsi_Cmnd *);
+static int sym53c416_bios_param(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 static void sym53c416_setup(char *str, int *ints);
 
-#define SYM53C416 {                                          \
-                  proc_name:         "sym53c416",   \
-                  name:              "Symbios Logic 53c416", \
-                  detect:            sym53c416_detect,       \
-                  info:              sym53c416_info,         \
-                  command:           sym53c416_command,      \
-                  queuecommand:      sym53c416_queuecommand, \
-                  abort:             sym53c416_abort,        \
-                  reset:             sym53c416_reset,        \
-                  bios_param:        sym53c416_bios_param,   \
-                  can_queue:         1,                      \
-                  this_id:           SYM53C416_SCSI_ID,      \
-                  sg_tablesize:      32,                     \
-                  cmd_per_lun:       1,                      \
-                  unchecked_isa_dma: 1,                      \
-                  use_clustering:    ENABLE_CLUSTERING       \
-                  }
+#define SYM53C416 {						\
+		.proc_name =		"sym53c416",		\
+		.name =			"Symbios Logic 53c416",	\
+		.detect =		sym53c416_detect,	\
+		.info =			sym53c416_info,		\
+		.command =		sym53c416_command,	\
+		.queuecommand =		sym53c416_queuecommand,	\
+		.eh_abort_handler =	sym53c416_abort,	\
+		.eh_host_reset_handler =sym53c416_host_reset,	\
+		.eh_bus_reset_handler = sym53c416_bus_reset,	\
+		.eh_device_reset_handler =sym53c416_device_reset,\
+		.release = 		sym53c416_release,	\
+		.bios_param =		sym53c416_bios_param,	\
+		.can_queue =		1,			\
+		.this_id =		SYM53C416_SCSI_ID,	\
+		.sg_tablesize =		32,			\
+		.cmd_per_lun =		1,			\
+		.unchecked_isa_dma =	1,			\
+		.use_clustering =	ENABLE_CLUSTERING	\
+		}
 #endif
diff -Nru a/drivers/scsi/sym53c8xx.c b/drivers/scsi/sym53c8xx.c
--- a/drivers/scsi/sym53c8xx.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/scsi/sym53c8xx.c	Wed Oct 30 16:44:29 2002
@@ -143,7 +143,6 @@
 
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 
 #include <linux/types.h>
 
diff -Nru a/drivers/scsi/sym53c8xx.h b/drivers/scsi/sym53c8xx.h
--- a/drivers/scsi/sym53c8xx.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/sym53c8xx.h	Wed Oct 30 16:44:27 2002
@@ -91,9 +91,6 @@
 			info:           sym53c8xx_info, 	\
 			queuecommand:   sym53c8xx_queue_command,\
 			slave_attach:   sym53c8xx_slave_attach, \
-			abort:          sym53c8xx_abort,	\
-			reset:          sym53c8xx_reset,	\
-			bios_param:     scsicam_bios_param,	\
 			can_queue:      SCSI_NCR_CAN_QUEUE,	\
 			this_id:        7,			\
 			sg_tablesize:   SCSI_NCR_SG_TABLESIZE,	\
diff -Nru a/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/drivers/scsi/sym53c8xx_2/sym53c8xx.h
--- a/drivers/scsi/sym53c8xx_2/sym53c8xx.h	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/sym53c8xx_2/sym53c8xx.h	Wed Oct 30 16:44:36 2002
@@ -116,7 +116,6 @@
 	eh_device_reset_handler:sym53c8xx_eh_device_reset_handler,	\
 	eh_bus_reset_handler:	sym53c8xx_eh_bus_reset_handler,		\
 	eh_host_reset_handler:	sym53c8xx_eh_host_reset_handler,	\
-	bios_param:		scsicam_bios_param,			\
 	can_queue:		0,					\
 	this_id:		7,					\
 	sg_tablesize:		0,					\
diff -Nru a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h
--- a/drivers/scsi/sym53c8xx_2/sym_glue.h	Wed Oct 30 16:44:36 2002
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.h	Wed Oct 30 16:44:36 2002
@@ -99,7 +99,6 @@
 
 #include "../scsi.h"
 #include "../hosts.h"
-#include "../sd.h"
 
 #include <linux/types.h>
 
diff -Nru a/drivers/scsi/t128.c b/drivers/scsi/t128.c
--- a/drivers/scsi/t128.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/scsi/t128.c	Wed Oct 30 16:44:33 2002
@@ -116,10 +116,10 @@
 #include "t128.h"
 #define AUTOPROBE_IRQ
 #include "NCR5380.h"
-#include "sd.h"
 #include <linux/stat.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/delay.h>
 
 static struct override {
     unsigned long address;
@@ -247,7 +247,7 @@
 	    instance->irq = NCR5380_probe_irq(instance, T128_IRQS);
 
 	if (instance->irq != IRQ_NONE) 
-	    if (request_irq(instance->irq, do_t128_intr, SA_INTERRUPT, "t128", instance)) {
+	    if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) {
 		printk("scsi%d : IRQ%d not free, interrupts disabled\n", 
 		    instance->host_no, instance->irq);
 		instance->irq = IRQ_NONE;
@@ -298,12 +298,12 @@
  * and matching the H_C_S coordinates to what DOS uses.
  */
 
-int t128_biosparam(Disk * disk, struct block_device *dev, int * ip)
+int t128_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int * ip)
 {
-  int size = disk->capacity;
   ip[0] = 64;
   ip[1] = 32;
-  ip[2] = size >> 11;
+  ip[2] = capacity >> 11;
   return 0;
 }
 
diff -Nru a/drivers/scsi/t128.h b/drivers/scsi/t128.h
--- a/drivers/scsi/t128.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/scsi/t128.h	Wed Oct 30 16:44:26 2002
@@ -91,14 +91,15 @@
 #define T_DATA_REG_OFFSET	0x1e00	/* rw 512 bytes long */
 
 #ifndef ASM
-int t128_abort(Scsi_Cmnd *);
-int t128_biosparam(Disk *, struct block_device *, int*);
-int t128_detect(Scsi_Host_Template *);
-int t128_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int t128_host_reset(Scsi_Cmnd *);
-int t128_bus_reset(Scsi_Cmnd *);
-int t128_device_reset(Scsi_Cmnd *);
-int t128_proc_info (char *buffer, char **start, off_t offset,
+static int t128_abort(Scsi_Cmnd *);
+static int t128_biosparam(struct scsi_device *, struct block_device *,
+			  sector_t, int*);
+static int t128_detect(Scsi_Host_Template *);
+static int t128_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+static int t128_host_reset(Scsi_Cmnd *);
+static int t128_bus_reset(Scsi_Cmnd *);
+static int t128_device_reset(Scsi_Cmnd *);
+static int t128_proc_info (char *buffer, char **start, off_t offset,
 		   int length, int hostno, int inout);
 
 #ifndef NULL
@@ -166,7 +167,7 @@
 #define do_NCR5380_intr do_t128_intr
 #define NCR5380_queue_command t128_queue_command
 #define NCR5380_abort t128_abort
-#define NCR5380_host_reset t128_hostreset
+#define NCR5380_host_reset t128_host_reset
 #define NCR5380_device_reset t128_device_reset
 #define NCR5380_bus_reset t128_bus_reset
 #define NCR5380_proc_info t128_proc_info
diff -Nru a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
--- a/drivers/scsi/tmscsim.c	Wed Oct 30 16:44:37 2002
+++ b/drivers/scsi/tmscsim.c	Wed Oct 30 16:44:37 2002
@@ -228,7 +228,6 @@
 
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <linux/stat.h>
 #include <scsi/scsicam.h>
 
@@ -1439,12 +1438,13 @@
  * Note:
  *   In contrary to other externally callable funcs (DC390_), we don't lock
  ***********************************************************************/
-int DC390_bios_param (Disk *disk, struct block_device *bdev, int geom[])
+int DC390_bios_param (struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[])
 {
     int heads, sectors, cylinders;
-    PACB pACB = (PACB) disk->device->host->hostdata;
+    PACB pACB = (PACB) sdev->host->hostdata;
     int ret_code = -1;
-    int size = disk->capacity;
+    int size = capacity;
     unsigned char *buf;
 
     if ((buf = scsi_bios_ptable(bdev)))
@@ -1475,9 +1475,10 @@
     return (0);
 }
 #else
-int DC390_bios_param (Disk *disk, struct block_device *bdev, int geom[])
+int DC390_bios_param (struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int geom[])
 {
-    return scsicam_bios_param (disk, bdev, geom);
+    return scsicam_bios_param (bdev, capacity, geom);
 };
 #endif
 
diff -Nru a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c
--- a/drivers/scsi/u14-34f.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/u14-34f.c	Wed Oct 30 16:44:27 2002
@@ -1,6 +1,15 @@
 /*
  *      u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters.
  *
+ *      10 Oct 2002 Rev. 7.70 for linux 2.5.42
+ *        + Foreport from revision 6.70.
+ *
+ *      25 Jun 2002 Rev. 6.70 for linux 2.4.19
+ *        + Fixed endian-ness problem due to bitfields.
+ *
+ *      21 Feb 2002 Rev. 6.52 for linux 2.4.18
+ *        + Backport from rev. 7.22 (use io_request_lock).
+ *
  *      20 Feb 2002 Rev. 7.22 for linux 2.5.5
  *        + Remove any reference to virt_to_bus().
  *        + Fix pio hang while detecting multiple HBAs.
@@ -382,7 +391,6 @@
 #include <linux/blk.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <asm/dma.h>
 #include <asm/irq.h>
 #include "u14-34f.h"
@@ -393,6 +401,10 @@
 #include <linux/ctype.h>
 #include <linux/spinlock.h>
 
+#if !defined(__BIG_ENDIAN_BITFIELD) && !defined(__LITTLE_ENDIAN_BITFIELD)
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+
 /* Values for the PRODUCT_ID ports for the 14/34F */
 #define PRODUCT_ID1  0x56
 #define PRODUCT_ID2  0x40        /* NOTE: Only upper nibble is used */
@@ -459,7 +471,7 @@
 #define REG_CONFIG2       7
 #define REG_OGM           8
 #define REG_ICM           12
-#define REGION_SIZE       13
+#define REGION_SIZE       13UL
 #define BSY_ASSERTED      0x01
 #define IRQ_ASSERTED      0x01
 #define CMD_RESET         0xc0
@@ -481,14 +493,21 @@
 
 /* MailBox SCSI Command Packet */
 struct mscp {
-   unsigned char opcode: 3;             /* type of command */
-   unsigned char xdir: 2;               /* data transfer direction */
-   unsigned char dcn: 1;                /* disable disconnect */
-   unsigned char ca: 1;                 /* use cache (if available) */
-   unsigned char sg: 1;                 /* scatter/gather operation */
-   unsigned char target: 3;             /* SCSI target id */
-   unsigned char channel: 2;            /* SCSI channel number */
-   unsigned char lun: 3;                /* SCSI logical unit number */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unsigned char sg:1, ca:1, dcn:1, xdir:2, opcode:3;
+   unsigned char lun: 3, channel:2, target:3;
+#else
+   unsigned char opcode: 3,             /* type of command */
+                 xdir: 2,               /* data transfer direction */
+                 dcn: 1,                /* disable disconnect */
+                 ca: 1,                 /* use cache (if available) */
+                 sg: 1;                 /* scatter/gather operation */
+   unsigned char target: 3,             /* SCSI target id */
+                 channel: 2,            /* SCSI channel number */
+                 lun: 3;                /* SCSI logical unit number */
+#endif
+
    unsigned int data_address PACKED;    /* transfer data pointer */
    unsigned int data_len PACKED;        /* length in bytes */
    unsigned int link_address PACKED;    /* for linking command chains */
@@ -730,17 +749,27 @@
            };
 
    struct config_1 {
-      unsigned char bios_segment: 3;
-      unsigned char removable_disks_as_fixed: 1;
-      unsigned char interrupt: 2;
-      unsigned char dma_channel: 2;
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+      unsigned char dma_channel: 2, interrupt:2,
+                    removable_disks_as_fixed:1, bios_segment: 3;
+#else
+      unsigned char bios_segment: 3, removable_disks_as_fixed: 1,
+                    interrupt: 2, dma_channel: 2;
+#endif
+
       } config_1;
 
    struct config_2 {
-      unsigned char ha_scsi_id: 3;
-      unsigned char mapping_mode: 2;
-      unsigned char bios_drive_number: 1;
-      unsigned char tfr_port: 2;
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+      unsigned char tfr_port: 2, bios_drive_number: 1,
+                    mapping_mode: 2, ha_scsi_id: 3;
+#else
+      unsigned char ha_scsi_id: 3, mapping_mode: 2,
+                    bios_drive_number: 1, tfr_port: 2;
+#endif
+
       } config_2;
 
    char name[16];
@@ -1452,15 +1481,16 @@
    return do_reset(SCarg);
 }
 
-int u14_34f_biosparam(Disk *disk, struct block_device *bdev, int *dkinfo) {
+int u14_34f_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int *dkinfo) {
    unsigned int j = 0;
-   int size = disk->capacity;
+   int size = capacity;
 
    dkinfo[0] = HD(j)->heads;
    dkinfo[1] = HD(j)->sectors;
    dkinfo[2] = size / (HD(j)->heads * HD(j)->sectors);
 
-   if (ext_tran && (scsicam_bios_param(disk, bdev, dkinfo) < 0)) {
+   if (ext_tran && (scsicam_bios_param(bdev, capacity, dkinfo) < 0)) {
       dkinfo[0] = 255;
       dkinfo[1] = 63;
       dkinfo[2] = size / (dkinfo[0] * dkinfo[1]);
diff -Nru a/drivers/scsi/u14-34f.h b/drivers/scsi/u14-34f.h
--- a/drivers/scsi/u14-34f.h	Wed Oct 30 16:44:33 2002
+++ b/drivers/scsi/u14-34f.h	Wed Oct 30 16:44:33 2002
@@ -11,9 +11,10 @@
 int u14_34f_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 int u14_34f_abort(Scsi_Cmnd *);
 int u14_34f_reset(Scsi_Cmnd *);
-int u14_34f_biosparam(Disk *, struct block_device *, int *);
+int u14_34f_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
-#define U14_34F_VERSION "7.22.00"
+#define U14_34F_VERSION "7.70.00"
 
 #define ULTRASTOR_14_34F {                                                   \
                 name:         "UltraStor 14F/34F rev. " U14_34F_VERSION " ", \
diff -Nru a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c
--- a/drivers/scsi/ultrastor.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/scsi/ultrastor.c	Wed Oct 30 16:44:29 2002
@@ -143,7 +143,6 @@
 #include "scsi.h"
 #include "hosts.h"
 #include "ultrastor.h"
-#include "sd.h"
 #include<linux/stat.h>
 
 #define FALSE 0
@@ -1020,9 +1019,10 @@
 
 }
 
-int ultrastor_biosparam(Disk * disk, struct block_device *dev, int * dkinfo)
+int ultrastor_biosparam(struct scsi_device *sdev, struct block_device *bdev,
+		sector_t capacity, int * dkinfo)
 {
-    int size = disk->capacity;
+    int size = capacity;
     unsigned int s = config.heads * config.sectors;
 
     dkinfo[0] = config.heads;
diff -Nru a/drivers/scsi/ultrastor.h b/drivers/scsi/ultrastor.h
--- a/drivers/scsi/ultrastor.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/scsi/ultrastor.h	Wed Oct 30 16:44:27 2002
@@ -18,7 +18,8 @@
 int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 int ultrastor_abort(Scsi_Cmnd *);
 int ultrastor_reset(Scsi_Cmnd *, unsigned int);
-int ultrastor_biosparam(Disk *, struct block_device *, int *);
+int ultrastor_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 
 #define ULTRASTOR_14F_MAX_SG 16
diff -Nru a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c
--- a/drivers/scsi/wd7000.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/scsi/wd7000.c	Wed Oct 30 16:44:35 2002
@@ -179,7 +179,6 @@
 #include <linux/init.h>
 #include "scsi.h"
 #include "hosts.h"
-#include "sd.h"
 #include <scsi/scsicam.h>
 
 #define ANY2SCSI_INLINE		/* undef this to use old macros */
@@ -1692,16 +1691,17 @@
  *  This was borrowed directly from aha1542.c. (Zaga)
  */
 
-static int wd7000_biosparam(Disk * disk, struct block_device *bdev, int *ip)
+static int wd7000_biosparam(struct scsi_device *sdev,
+		struct block_device *bdev, sector_t capacity, int *ip)
 {
-	dprintk("wd7000_biosparam: dev=%s, size=%d, ", bdevname(bdev), disk->capacity);
+	dprintk("wd7000_biosparam: dev=%s, size=%d, ", bdevname(bdev), capacity);
 
 	/*
 	 * try default translation
 	 */
 	ip[0] = 64;
 	ip[1] = 32;
-	ip[2] = disk->capacity >> 11;
+	ip[2] = capacity >> 11;
 
 	/*
 	 * for disks >1GB do some guessing
@@ -1712,12 +1712,12 @@
 		/*
 		 * try to figure out the geometry from the partition table
 		 */
-		if ((scsicam_bios_param(disk, bdev, info) < 0) || !(((info[0] == 64) && (info[1] == 32)) || ((info[0] == 255) && (info[1] == 63)))) {
+		if ((scsicam_bios_param(bdev, capacity, info) < 0) || !(((info[0] == 64) && (info[1] == 32)) || ((info[0] == 255) && (info[1] == 63)))) {
 			printk("wd7000_biosparam: unable to verify geometry for disk with >1GB.\n" "                  using extended translation.\n");
 
 			ip[0] = 255;
 			ip[1] = 63;
-			ip[2] = (unsigned long) disk->capacity / (255 * 63);
+			ip[2] = (unsigned long) capacity / (255 * 63);
 		} else {
 			ip[0] = info[0];
 			ip[1] = info[1];
diff -Nru a/drivers/scsi/wd7000.h b/drivers/scsi/wd7000.h
--- a/drivers/scsi/wd7000.h	Wed Oct 30 16:44:34 2002
+++ b/drivers/scsi/wd7000.h	Wed Oct 30 16:44:34 2002
@@ -22,7 +22,8 @@
 static int wd7000_bus_reset(Scsi_Cmnd *);
 static int wd7000_host_reset(Scsi_Cmnd *);
 static int wd7000_device_reset(Scsi_Cmnd *);
-static int wd7000_biosparam(Disk *, struct block_device *, int *);
+static int wd7000_biosparam(struct scsi_device *, struct block_device *,
+		sector_t, int *);
 
 #ifndef NULL
 #define NULL 0L
@@ -49,7 +50,6 @@
 	detect:			wd7000_detect,			\
 	command:		wd7000_command,			\
 	queuecommand:		wd7000_queuecommand,		\
-	abort:			wd7000_abort,			\
 	eh_bus_reset_handler:	wd7000_bus_reset,		\
 	eh_device_reset_handler:wd7000_device_reset,		\
 	eh_host_reset_handler:	wd7000_host_reset,		\
diff -Nru a/drivers/serial/Config.help b/drivers/serial/Config.help
--- a/drivers/serial/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,231 +0,0 @@
-# $Id: Config.help,v 1.5 2002/07/06 17:16:24 rmk Exp $
-
-CONFIG_SERIAL_8250
-  This selects whether you want to include the driver for the standard
-  serial ports.  The standard answer is Y.  People who might say N
-  here are those that are setting up dedicated Ethernet WWW/FTP
-  servers, or users that have one of the various bus mice instead of a
-  serial mouse and don't intend to use their machine's standard serial
-  port for anything.  (Note that the Cyclades and Stallion multi
-  serial port drivers do not need this driver built in for them to
-  work.)
-
-  If you want to compile this driver as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  serial.o.
-  [WARNING: Do not compile this driver as a module if you are using
-  non-standard serial ports, since the configuration information will
-  be lost when the driver is unloaded.  This limitation may be lifted
-  in the future.]
-
-  BTW1: If you have a mouseman serial mouse which is not recognized by
-  the X window system, try running gpm first.
-
-  BTW2: If you intend to use a software modem (also called Winmodem)
-  under Linux, forget it.  These modems are crippled and require
-  proprietary drivers which are only available under Windows.
-
-  Most people will say Y or M here, so that they can use serial mice,
-  modems and similar devices connecting to the standard serial ports.
-
-CONFIG_SERIAL_8250_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
-CONFIG_SERIAL_8250_CS
-  Say Y here to enable support for 16-bit PCMCIA serial devices,
-  including serial port cards, modems, and the modem functions of
-  multi-function Ethernet/modem cards. (PCMCIA- or PC-cards are
-  credit-card size devices often used with laptops.)
-
-  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 serial_cs.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-  If unsure, say N.
-
-CONFIG_SERIAL_8250_EXTENDED
-  If you wish to use any non-standard features of the standard "dumb"
-  driver, say Y here. This includes HUB6 support, shared serial
-  interrupts, special multiport support, support for more than the
-  four COM 1/2/3/4 boards, etc.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about serial driver options. If unsure, say N.
-
-CONFIG_SERIAL_8250_MANY_PORTS
-  Say Y here if you have dumb serial boards other than the four
-  standard COM 1/2/3/4 ports. This may happen if you have an AST
-  FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available
-  from <http://www.linuxdoc.org/docs.html#howto>), or other custom
-  serial port hardware which acts similar to standard serial port
-  hardware. If you only use the standard COM 1/2/3/4 ports, you can
-  say N here to save some memory. You can also say Y if you have an
-  "intelligent" multiport card such as Cyclades, Digiboards, etc.
-
-CONFIG_SERIAL_8250_SHARE_IRQ
-  Some serial boards have hardware support which allows multiple dumb
-  serial ports on the same board to share a single IRQ. To enable
-  support for this in the serial driver, say Y here.
-
-CONFIG_SERIAL_8250_DETECT_IRQ
-  Say Y here if you want the kernel to try to guess which IRQ
-  to use for your serial port.
-
-  This is considered unsafe; it is far better to configure the IRQ in
-  a boot script using the setserial command.
-
-  If unsure, say N.
-
-CONFIG_SERIAL_8250_MULTIPORT
-  Some multiport serial ports have special ports which are used to
-  signal when there are any serial ports on the board which need
-  servicing. Say Y here to enable the serial driver to take advantage
-  of those special I/O ports.
-
-CONFIG_SERIAL_8250_RSA
-  ::: To be written :::
-
-CONFIG_SERIAL_8250_ACORN
-  If you have an Atomwide Serial card or Serial Port card for an Acorn
-  system, say Y to this option.  The driver can handle 1, 2, or 3 port
-  cards.  If unsure, say N.
-
-CONFIG_SERIAL_ANAKIN
-  ::: To be written :::
-
-CONFIG_SERIAL_ANAKIN_CONSOLE
-  Even if you say Y here, the currently visible virtual 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=ttyAN0". (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_ANAKIN_DEFAULT_BAUDRATE
-  ::: To be written :::
-
-CONFIG_SERIAL_AMBA
-  This selects the ARM(R) AMBA(R) PrimeCell UART.  If you have an
-  Integrator platform, say Y or M here.
-
-  If unsure, say N.
-
-CONFIG_SERIAL_AMBA_CONSOLE
-  Say Y here if you wish to use an AMBA PrimeCell 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=ttyAM0". (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_CLPS711X
-  ::: To be written :::
-
-CONFIG_SERIAL_CLPS711X_CONSOLE
-  Even if you say Y here, the currently visible virtual 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=ttyCL1". (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_CLPS711X_OLD_NAME
-  ::: To be written :::
-
-CONFIG_SERIAL_21285
-  If you have a machine based on a 21285 (Footbridge) StrongARM(R)/
-  PCI bridge you can enable its onboard serial port by enabling this
-  option.
-
-CONFIG_SERIAL_21285_OLD
-  Use the old /dev/ttyS name, major 4 minor 64.  This is obsolete
-  and will be removed during later 2.5 development.
-
-CONFIG_SERIAL_21285_CONSOLE
-  If you have enabled the serial port on the 21285 footbridge you can
-  make it the console by answering Y to this option.
-
-  Even if you say Y here, the currently visible virtual 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=ttyFB". (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_UART00
-  Say Y here if you want to use the hard logic uart on Excalibur. This
-  driver also supports soft logic implentations of this uart core.
-
-CONFIG_SERIAL_UART00_CONSOLE
-  Say Y here if you want to support a serial console on an Excalibur
-  hard logic uart or uart00 IP core.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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_SA1100
-  If you have a machine based on a SA1100/SA1110 StrongARM(R) CPU you
-  can enable its onboard serial port by enabling this option.
-  Please read <file:Documentation/arm/SA1100/serial_UART> for further
-  info.
-
-CONFIG_SERIAL_SA1100_CONSOLE
-  If you have enabled the serial port on the SA1100/SA1110 StrongARM
-  CPU you can make it the console by answering Y to this option.
-
-  Even if you say Y here, the currently visible virtual 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=ttySA0". (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_L7200
-#  If you have a LinkUp Systems L7200 board you can enable its two
-#  onboard serial ports by enabling this option. The device numbers
-#  are major ID 4 with minor 64 and 65 respectively.
-#
-#CONFIG_SERIAL_L7200_CONSOLE
-#  If you have enabled the serial ports on the L7200 development board
-#  you can make the first serial port the console by answering Y to
-#  this option.
-
-CONFIG_SERIAL_SUNZILOG
-  This driver supports the Zilog8530 serial ports found on many Sparc
-  systems.  Say Y or M if you want to be able to these serial ports.
-
-CONFIG_SERIAL_SUNSU
-  This driver supports the 8250 serial ports that run the keyboard and
-  mouse on (PCI) UltraSPARC systems.  Say Y or M if you want to be able
-  to these serial ports.
-
-CONFIG_SERIAL_SUNSAB
-  This driver supports the Siemens SAB82532 DUSCC serial ports on newer
-  (PCI) UltraSPARC systems.  Say Y or M if you want to be able to these
-  serial ports.
diff -Nru a/drivers/serial/Config.in b/drivers/serial/Config.in
--- a/drivers/serial/Config.in	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,86 +0,0 @@
-#
-# Serial device configuration
-#
-# $Id: Config.in,v 1.15 2002/07/06 17:16:24 rmk Exp $
-#
-mainmenu_option next_comment
-comment 'Serial drivers'
-
-#
-# The new 8250/16550 serial drivers
-dep_tristate '8250/16550 and compatible serial support (EXPERIMENTAL)' CONFIG_SERIAL_8250 $CONFIG_EXPERIMENTAL
-dep_bool '  Console on 8250/16550 and compatible serial port (EXPERIMENTAL)' CONFIG_SERIAL_8250_CONSOLE $CONFIG_SERIAL_8250 $CONFIG_EXPERIMENTAL
-dep_tristate '  8250/16550 PCMCIA device support' CONFIG_SERIAL_8250_CS $CONFIG_PCMCIA $CONFIG_SERIAL_8250
-
-dep_mbool 'Extended 8250/16550 serial driver options' CONFIG_SERIAL_8250_EXTENDED $CONFIG_SERIAL_8250
-dep_bool '  Support more than 4 serial ports' CONFIG_SERIAL_8250_MANY_PORTS $CONFIG_SERIAL_8250_EXTENDED
-dep_bool '  Support for sharing serial interrupts' CONFIG_SERIAL_8250_SHARE_IRQ $CONFIG_SERIAL_8250_EXTENDED
-dep_bool '  Autodetect IRQ on standard ports (unsafe)' CONFIG_SERIAL_8250_DETECT_IRQ $CONFIG_SERIAL_8250_EXTENDED
-dep_bool '  Support special multiport boards' CONFIG_SERIAL_8250_MULTIPORT $CONFIG_SERIAL_8250_EXTENDED
-dep_bool '  Support RSA serial ports' CONFIG_SERIAL_8250_RSA $CONFIG_SERIAL_8250_EXTENDED
-
-comment 'Non-8250 serial port support'
-
-if [ "$CONFIG_ARM" = "y" ]; then
-   dep_tristate 'Acorn expansion card serial port support' CONFIG_SERIAL_8250_ACORN $CONFIG_ARCH_ACORN $CONFIG_SERIAL_8250
-   dep_bool 'Anakin serial port support' CONFIG_SERIAL_ANAKIN $CONFIG_ARCH_ANAKIN
-   dep_bool '  Console on Anakin serial port' CONFIG_SERIAL_ANAKIN_CONSOLE $CONFIG_SERIAL_ANAKIN
-   if [ "$CONFIG_SERIAL_ANAKIN" = "y" ]; then
-      int  '  Default Anakin serial baudrate' CONFIG_ANAKIN_DEFAULT_BAUDRATE 9600
-   fi
-
-   dep_tristate 'ARM AMBA serial port support' CONFIG_SERIAL_AMBA $CONFIG_ARCH_INTEGRATOR
-   dep_bool '  Support for console on AMBA serial port' CONFIG_SERIAL_AMBA_CONSOLE $CONFIG_SERIAL_AMBA
-   if [ "$CONFIG_SERIAL_AMBA" = "y" ]; then
-      define_bool CONFIG_SERIAL_INTEGRATOR y
-   fi
-
-   dep_tristate 'CLPS711X serial port support' CONFIG_SERIAL_CLPS711X $CONFIG_ARCH_CLPS711X
-   dep_bool '  Support for console on CLPS711X serial port' CONFIG_SERIAL_CLPS711X_CONSOLE $CONFIG_SERIAL_CLPS711X
-   dep_bool '  Use the old 2.4 names for CLPS711X serial port' CONFIG_SERIAL_CLPS711X_OLD_NAME $CONFIG_SERIAL_CLPS711X
-
-   dep_tristate 'DC21285 serial port support' CONFIG_SERIAL_21285 $CONFIG_FOOTBRIDGE
-   dep_bool '  Use /dev/ttyS0 device (OBSOLETE)' CONFIG_SERIAL_21285_OLD $CONFIG_SERIAL_21285 $CONFIG_OBSOLETE
-   dep_bool '  Console on DC21285 serial port' CONFIG_SERIAL_21285_CONSOLE $CONFIG_SERIAL_21285
-
-   dep_bool 'Excalibur serial port (uart00) support' CONFIG_SERIAL_UART00 $CONFIG_ARCH_CAMELOT
-   dep_bool '  Support for console on Excalibur serial port' CONFIG_SERIAL_UART00_CONSOLE $CONFIG_SERIAL_UART00
-
-   dep_bool 'SA1100 serial port support' CONFIG_SERIAL_SA1100 $CONFIG_ARCH_SA1100
-   dep_bool '  Console on SA1100 serial port' CONFIG_SERIAL_SA1100_CONSOLE $CONFIG_SERIAL_SA1100
-fi
-
-if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-   define_bool CONFIG_SERIAL_SUNCORE y
-   tristate 'Sun Zilog8530 serial support' CONFIG_SERIAL_SUNZILOG
-   dep_tristate 'Sun SU serial support' CONFIG_SERIAL_SUNSU $CONFIG_PCI
-   dep_tristate 'Sun Siemens SAB82532 serial support' CONFIG_SERIAL_SUNSAB $CONFIG_PCI
-fi
-
-if [ "$CONFIG_SERIAL_AMBA" = "y"   -o "$CONFIG_SERIAL_CLPS711X" = "y" -o \
-     "$CONFIG_SERIAL_21285" = "y"  -o "$CONFIG_SERIAL_SA1100" = "y" -o \
-     "$CONFIG_SERIAL_ANAKIN" = "y" -o "$CONFIG_SERIAL_UART00" = "y" -o \
-     "$CONFIG_SERIAL_8250" = "y"   -o "$CONFIG_SERIAL_ROCKETPORT" = "y" -o \
-     "$CONFIG_SERIAL_SUNCORE" = "y" ]; then
-   define_bool CONFIG_SERIAL_CORE y
-else
-   if [ "$CONFIG_SERIAL_AMBA" = "m"   -o "$CONFIG_SERIAL_CLPS711X" = "m" -o \
-        "$CONFIG_SERIAL_21285" = "m"  -o "$CONFIG_SERIAL_SA1100" = "m" -o \
-        "$CONFIG_SERIAL_ANAKIN" = "m" -o "$CONFIG_SERIAL_UART00" = "m" -o \
-        "$CONFIG_SERIAL_8250" = "m"   -o "$CONFIG_SERIAL_ROCKETPORT" = "m" -o \
-        "$CONFIG_SERIAL_SUNCORE" = "m" ]; then
-      define_bool CONFIG_SERIAL_CORE m
-   fi
-fi
-if [ "$CONFIG_SERIAL_AMBA_CONSOLE" = "y" -o \
-     "$CONFIG_SERIAL_CLPS711X_CONSOLE" = "y" -o \
-     "$CONFIG_SERIAL_21285_CONSOLE" = "y" -o \
-     "$CONFIG_SERIAL_SA1100_CONSOLE" = "y" -o \
-     "$CONFIG_SERIAL_ANAKIN_CONSOLE" = "y" -o \
-     "$CONFIG_SERIAL_UART00_CONSOLE" = "y" -o \
-     "$CONFIG_SERIAL_8250_CONSOLE" = "y"  -o \
-     "$CONFIG_SERIAL_SUNCORE" = "y" ]; then
-   define_bool CONFIG_SERIAL_CORE_CONSOLE y
-fi
-
-endmenu
diff -Nru a/drivers/serial/Kconfig b/drivers/serial/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/serial/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,339 @@
+#
+# Serial device configuration
+#
+# $Id: Config.in,v 1.15 2002/07/06 17:16:24 rmk Exp $
+#
+
+menu "Serial drivers"
+
+#
+# The new 8250/16550 serial drivers
+config SERIAL_8250
+	tristate "8250/16550 and compatible serial support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  This selects whether you want to include the driver for the standard
+	  serial ports.  The standard answer is Y.  People who might say N
+	  here are those that are setting up dedicated Ethernet WWW/FTP
+	  servers, or users that have one of the various bus mice instead of a
+	  serial mouse and don't intend to use their machine's standard serial
+	  port for anything.  (Note that the Cyclades and Stallion multi
+	  serial port drivers do not need this driver built in for them to
+	  work.)
+
+	  If you want to compile this driver as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  serial.o.
+	  [WARNING: Do not compile this driver as a module if you are using
+	  non-standard serial ports, since the configuration information will
+	  be lost when the driver is unloaded.  This limitation may be lifted
+	  in the future.]
+
+	  BTW1: If you have a mouseman serial mouse which is not recognized by
+	  the X window system, try running gpm first.
+
+	  BTW2: If you intend to use a software modem (also called Winmodem)
+	  under Linux, forget it.  These modems are crippled and require
+	  proprietary drivers which are only available under Windows.
+
+	  Most people will say Y or M here, so that they can use serial mice,
+	  modems and similar devices connecting to the standard serial ports.
+
+config SERIAL_8250_CONSOLE
+	bool "Console on 8250/16550 and compatible serial port (EXPERIMENTAL)"
+	depends on SERIAL_8250=y
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+config SERIAL_8250_CS
+	tristate "8250/16550 PCMCIA device support"
+	depends on PCMCIA && SERIAL_8250
+	---help---
+	  Say Y here to enable support for 16-bit PCMCIA serial devices,
+	  including serial port cards, modems, and the modem functions of
+	  multi-function Ethernet/modem cards. (PCMCIA- or PC-cards are
+	  credit-card size devices often used with laptops.)
+
+	  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 serial_cs.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+	  If unsure, say N.
+
+config SERIAL_8250_EXTENDED
+	bool "Extended 8250/16550 serial driver options"
+	depends on SERIAL_8250
+	help
+	  If you wish to use any non-standard features of the standard "dumb"
+	  driver, say Y here. This includes HUB6 support, shared serial
+	  interrupts, special multiport support, support for more than the
+	  four COM 1/2/3/4 boards, etc.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about serial driver options. If unsure, say N.
+
+config SERIAL_8250_MANY_PORTS
+	bool "Support more than 4 serial ports"
+	depends on SERIAL_8250_EXTENDED
+	help
+	  Say Y here if you have dumb serial boards other than the four
+	  standard COM 1/2/3/4 ports. This may happen if you have an AST
+	  FourPort, Accent Async, Boca (read the Boca mini-HOWTO, available
+	  from <http://www.linuxdoc.org/docs.html#howto>), or other custom
+	  serial port hardware which acts similar to standard serial port
+	  hardware. If you only use the standard COM 1/2/3/4 ports, you can
+	  say N here to save some memory. You can also say Y if you have an
+	  "intelligent" multiport card such as Cyclades, Digiboards, etc.
+
+config SERIAL_8250_SHARE_IRQ
+	bool "Support for sharing serial interrupts"
+	depends on SERIAL_8250_EXTENDED
+	help
+	  Some serial boards have hardware support which allows multiple dumb
+	  serial ports on the same board to share a single IRQ. To enable
+	  support for this in the serial driver, say Y here.
+
+config SERIAL_8250_DETECT_IRQ
+	bool "Autodetect IRQ on standard ports (unsafe)"
+	depends on SERIAL_8250_EXTENDED
+	help
+	  Say Y here if you want the kernel to try to guess which IRQ
+	  to use for your serial port.
+
+	  This is considered unsafe; it is far better to configure the IRQ in
+	  a boot script using the setserial command.
+
+	  If unsure, say N.
+
+config SERIAL_8250_MULTIPORT
+	bool "Support special multiport boards"
+	depends on SERIAL_8250_EXTENDED
+	help
+	  Some multiport serial ports have special ports which are used to
+	  signal when there are any serial ports on the board which need
+	  servicing. Say Y here to enable the serial driver to take advantage
+	  of those special I/O ports.
+
+config SERIAL_8250_RSA
+	bool "Support RSA serial ports"
+	depends on SERIAL_8250_EXTENDED
+	help
+	  ::: To be written :::
+
+comment "Non-8250 serial port support"
+
+config SERIAL_8250_ACORN
+	tristate "Acorn expansion card serial port support"
+	depends on ARM && ARCH_ACORN && SERIAL_8250
+	help
+	  If you have an Atomwide Serial card or Serial Port card for an Acorn
+	  system, say Y to this option.  The driver can handle 1, 2, or 3 port
+	  cards.  If unsure, say N.
+
+config SERIAL_ANAKIN
+	bool "Anakin serial port support"
+	depends on ARM && ARCH_ANAKIN
+	help
+	  ::: To be written :::
+
+config SERIAL_ANAKIN_CONSOLE
+	bool "Console on Anakin serial port"
+	depends on SERIAL_ANAKIN
+	help
+	  Even if you say Y here, the currently visible virtual 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=ttyAN0". (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 ANAKIN_DEFAULT_BAUDRATE
+	int "Default Anakin serial baudrate"
+	depends on SERIAL_ANAKIN
+	default "9600"
+	help
+	  ::: To be written :::
+
+config SERIAL_AMBA
+	tristate "ARM AMBA serial port support"
+	depends on ARM && ARCH_INTEGRATOR
+	help
+	  This selects the ARM(R) AMBA(R) PrimeCell UART.  If you have an
+	  Integrator platform, say Y or M here.
+
+	  If unsure, say N.
+
+config SERIAL_AMBA_CONSOLE
+	bool "Support for console on AMBA serial port"
+	depends on SERIAL_AMBA=y
+	---help---
+	  Say Y here if you wish to use an AMBA PrimeCell 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=ttyAM0". (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_INTEGRATOR
+	bool
+	depends on SERIAL_AMBA=y
+	default y
+
+config SERIAL_CLPS711X
+	tristate "CLPS711X serial port support"
+	depends on ARM && ARCH_CLPS711X
+	help
+	  ::: To be written :::
+
+config SERIAL_CLPS711X_CONSOLE
+	bool "Support for console on CLPS711X serial port"
+	depends on SERIAL_CLPS711X=y
+	help
+	  Even if you say Y here, the currently visible virtual 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=ttyCL1". (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_CLPS711X_OLD_NAME
+	bool "Use the old 2.4 names for CLPS711X serial port"
+	depends on SERIAL_CLPS711X=y
+	help
+	  ::: To be written :::
+
+config SERIAL_21285
+	tristate "DC21285 serial port support"
+	depends on ARM && FOOTBRIDGE
+	help
+	  If you have a machine based on a 21285 (Footbridge) StrongARM(R)/
+	  PCI bridge you can enable its onboard serial port by enabling this
+	  option.
+
+config SERIAL_21285_OLD
+	bool "Use /dev/ttyS0 device (OBSOLETE)"
+	depends on SERIAL_21285=y && OBSOLETE
+	help
+	  Use the old /dev/ttyS name, major 4 minor 64.  This is obsolete
+	  and will be removed during later 2.5 development.
+
+config SERIAL_21285_CONSOLE
+	bool "Console on DC21285 serial port"
+	depends on SERIAL_21285=y
+	help
+	  If you have enabled the serial port on the 21285 footbridge you can
+	  make it the console by answering Y to this option.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyFB". (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_UART00
+	bool "Excalibur serial port (uart00) support"
+	depends on ARM && ARCH_CAMELOT
+	help
+	  Say Y here if you want to use the hard logic uart on Excalibur. This
+	  driver also supports soft logic implentations of this uart core.
+
+config SERIAL_UART00_CONSOLE
+	bool "Support for console on Excalibur serial port"
+	depends on SERIAL_UART00
+	help
+	  Say Y here if you want to support a serial console on an Excalibur
+	  hard logic uart or uart00 IP core.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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_SA1100
+	bool "SA1100 serial port support"
+	depends on ARM && ARCH_SA1100
+	help
+	  If you have a machine based on a SA1100/SA1110 StrongARM(R) CPU you
+	  can enable its onboard serial port by enabling this option.
+	  Please read <file:Documentation/arm/SA1100/serial_UART> for further
+	  info.
+
+config SERIAL_SA1100_CONSOLE
+	bool "Console on SA1100 serial port"
+	depends on SERIAL_SA1100
+	help
+	  If you have enabled the serial port on the SA1100/SA1110 StrongARM
+	  CPU you can make it the console by answering Y to this option.
+
+	  Even if you say Y here, the currently visible virtual 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=ttySA0". (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_SUNCORE
+	bool
+	depends on SPARC32 || SPARC64
+	default y
+
+config SERIAL_SUNZILOG
+	tristate "Sun Zilog8530 serial support"
+	depends on SPARC32 || SPARC64
+	help
+	  This driver supports the Zilog8530 serial ports found on many Sparc
+	  systems.  Say Y or M if you want to be able to these serial ports.
+
+config SERIAL_SUNSU
+	tristate "Sun SU serial support"
+	depends on (SPARC32 || SPARC64) && PCI
+	help
+	  This driver supports the 8250 serial ports that run the keyboard and
+	  mouse on (PCI) UltraSPARC systems.  Say Y or M if you want to be able
+	  to these serial ports.
+
+config SERIAL_SUNSAB
+	tristate "Sun Siemens SAB82532 serial support"
+	depends on (SPARC32 || SPARC64) && PCI
+	help
+	  This driver supports the Siemens SAB82532 DUSCC serial ports on newer
+	  (PCI) UltraSPARC systems.  Say Y or M if you want to be able to these
+	  serial ports.
+
+config SERIAL_CORE
+	tristate
+	default m if SERIAL_AMBA!=y && SERIAL_CLPS711X!=y && SERIAL_21285!=y && !SERIAL_SA1100 && !SERIAL_ANAKIN && !SERIAL_UART00 && SERIAL_8250!=y && !SERIAL_ROCKETPORT && !SERIAL_SUNCORE && (SERIAL_AMBA=m || SERIAL_CLPS711X=m || SERIAL_21285=m || SERIAL_8250=m)
+	default y if SERIAL_AMBA=y || SERIAL_CLPS711X=y || SERIAL_21285=y || SERIAL_SA1100 || SERIAL_ANAKIN || SERIAL_UART00 || SERIAL_8250=y || SERIAL_ROCKETPORT || SERIAL_SUNCORE
+
+config SERIAL_CORE_CONSOLE
+	bool
+	depends on SERIAL_AMBA_CONSOLE || SERIAL_CLPS711X_CONSOLE || SERIAL_21285_CONSOLE || SERIAL_SA1100_CONSOLE || SERIAL_ANAKIN_CONSOLE || SERIAL_UART00_CONSOLE || SERIAL_8250_CONSOLE || SERIAL_SUNCORE
+	default y
+
+endmenu
+
diff -Nru a/drivers/sgi/Config.help b/drivers/sgi/Config.help
--- a/drivers/sgi/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,38 +0,0 @@
-CONFIG_SGI_SERIAL
-  If you want to use your SGI's built-in serial ports under Linux,
-  answer Y.
-
-CONFIG_SGI_NEWPORT_GFX
-  If you have an SGI machine and you want to compile the graphics
-  drivers, say Y here. This will include the code for the
-  /dev/graphics and /dev/gfx drivers into the kernel for supporting
-  virtualized access to your graphics hardware.
-
-CONFIG_SGI_DS1286
-  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_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
-  to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first serial line, /dev/ttyS0, as
-  system console.
-
-  If unsure, say N.
-
diff -Nru a/drivers/sgi/Config.in b/drivers/sgi/Config.in
--- a/drivers/sgi/Config.in	Wed Oct 30 16:44:23 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,17 +0,0 @@
-#
-# Character device configuration
-#
-mainmenu_option next_comment
-comment 'SGI devices'
-
-bool 'SGI Zilog85C30 serial support' CONFIG_SGI_SERIAL
-if [ "$CONFIG_SGI_SERIAL" = "y" ]; then
-   bool '  Support for console on serial port' CONFIG_SERIAL_CONSOLE
-fi
-bool 'SGI DS1286  RTC support' CONFIG_SGI_DS1286
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then  
-   tristate 'SGI Newport Graphics support (EXPERIMENTAL)' CONFIG_SGI_NEWPORT_GFX
-fi
-
-endmenu
diff -Nru a/drivers/sgi/Kconfig b/drivers/sgi/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/sgi/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,57 @@
+#
+# Character device configuration
+#
+
+menu "SGI devices"
+	depends on SGI_IP22
+
+config SGI_SERIAL
+	bool "SGI Zilog85C30 serial support"
+	help
+	  If you want to use your SGI's built-in serial ports under Linux,
+	  answer Y.
+
+config SERIAL_CONSOLE
+	bool "Support for console on serial port"
+	depends on SGI_SERIAL
+	---help---
+	  If you say Y here, it will be possible to use a serial port 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). This could be useful if some terminal or printer is connected
+	  to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyS1". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first serial line, /dev/ttyS0, as
+	  system console.
+
+	  If unsure, say N.
+
+config SGI_DS1286
+	bool "SGI DS1286  RTC support"
+	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_NEWPORT_GFX
+	tristate "SGI Newport Graphics support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  If you have an SGI machine and you want to compile the graphics
+	  drivers, say Y here. This will include the code for the
+	  /dev/graphics and /dev/gfx drivers into the kernel for supporting
+	  virtualized access to your graphics hardware.
+
+endmenu
+
diff -Nru a/drivers/telephony/Config.help b/drivers/telephony/Config.help
--- a/drivers/telephony/Config.help	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,33 +0,0 @@
-CONFIG_PHONE
-  Say Y here if you have a telephony card, which for example allows
-  you to use a regular phone for voice-over-IP applications.
-
-  Note: this has nothing to do with modems.  You do not need to say Y
-  here in order to be able to use a modem under Linux.
-
-  This support is also available as a module.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  phonedev.o.
-
-CONFIG_PHONE_IXJ
-  Say M if you have a telephony card manufactured by Quicknet
-  Technologies, Inc.  These include the Internet PhoneJACK and
-  Internet LineJACK Telephony Cards. You will get a module called
-  ixj.o.
-
-  For the ISA versions of these products, you can configure the
-  cards using the isapnp tools (pnpdump/isapnp) or you can use the
-  isapnp support.  Please read <file:Documentation/telephony/ixj.txt>.
-
-  For more information on these cards, see Quicknet's web site at:
-  <http://www.quicknet.net/>.
-
-  If you do not have any Quicknet telephony cards, you can safely
-  say N here.
-
-CONFIG_PHONE_IXJ_PCMCIA
-  Say Y here to configure in PCMCIA service support for the Quicknet
-  cards manufactured by Quicknet Technologies, Inc.  This changes the
-  card initialization code to work with the card manager daemon.
-
diff -Nru a/drivers/telephony/Config.in b/drivers/telephony/Config.in
--- a/drivers/telephony/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-#
-# Telephony device configuration
-#
-mainmenu_option next_comment
-comment 'Telephony Support'
-
-tristate 'Linux telephony support' CONFIG_PHONE
-dep_tristate 'QuickNet Internet LineJack/PhoneJack support' CONFIG_PHONE_IXJ $CONFIG_PHONE
-dep_tristate 'QuickNet Internet LineJack/PhoneJack PCMCIA support' CONFIG_PHONE_IXJ_PCMCIA $CONFIG_PHONE_IXJ
-endmenu
diff -Nru a/drivers/telephony/Kconfig b/drivers/telephony/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/telephony/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,49 @@
+#
+# Telephony device configuration
+#
+
+menu "Telephony Support"
+
+config PHONE
+	tristate "Linux telephony support"
+	---help---
+	  Say Y here if you have a telephony card, which for example allows
+	  you to use a regular phone for voice-over-IP applications.
+
+	  Note: this has nothing to do with modems.  You do not need to say Y
+	  here in order to be able to use a modem under Linux.
+
+	  This support is also available as a module.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  phonedev.o.
+
+config PHONE_IXJ
+	tristate "QuickNet Internet LineJack/PhoneJack support"
+	depends on PHONE
+	---help---
+	  Say M if you have a telephony card manufactured by Quicknet
+	  Technologies, Inc.  These include the Internet PhoneJACK and
+	  Internet LineJACK Telephony Cards. You will get a module called
+	  ixj.o.
+
+	  For the ISA versions of these products, you can configure the
+	  cards using the isapnp tools (pnpdump/isapnp) or you can use the
+	  isapnp support.  Please read <file:Documentation/telephony/ixj.txt>.
+
+	  For more information on these cards, see Quicknet's web site at:
+	  <http://www.quicknet.net/>.
+
+	  If you do not have any Quicknet telephony cards, you can safely
+	  say N here.
+
+config PHONE_IXJ_PCMCIA
+	tristate "QuickNet Internet LineJack/PhoneJack PCMCIA support"
+	depends on PHONE_IXJ
+	help
+	  Say Y here to configure in PCMCIA service support for the Quicknet
+	  cards manufactured by Quicknet Technologies, Inc.  This changes the
+	  card initialization code to work with the card manager daemon.
+
+endmenu
+
diff -Nru a/drivers/usb/Config.help b/drivers/usb/Config.help
--- a/drivers/usb/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,84 +0,0 @@
-CONFIG_USB
-  Universal Serial Bus (USB) is a specification for a serial bus
-  subsystem which offers higher speeds and more features than the
-  traditional PC serial port.  The bus supplies power to peripherals
-  and allows for hot swapping.  Up to 127 USB peripherals can be
-  connected to a single USB port in a tree structure.  The USB port is
-  the root of the tree, the peripherals are the leaves and the inner
-  nodes are special USB devices called hubs.  Many newer PC's have USB
-  ports and newer peripherals such as scanners, keyboards, mice,
-  modems, and printers support the USB protocol and can be connected
-  to the PC via those ports.
-
-  Say Y here if your computer has a USB port and you want to use USB
-  devices.  You then need to say Y to at least one of "UHCI HCD support"
-  or "OHCI HCD support" below (the type of interface that the USB hardware
-  in your computer provides to the operating system) and then choose
-  from amongst the drivers for USB peripherals.  You may want to check
-  out the information provided in <file:Documentation/usb/> and
-  especially the links given in <file:Documentation/usb/usb-help.txt>.
-
-  If you have a new USB 2.0 High Speed system, you should also choose
-  "EHCI HCD (USB 2.0) support" as well as at least one of UHCI or OHCI.
-
-  It doesn't normally hurt to select them all if you are not certain.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usbcore.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_DEBUG
-  Say Y here if you want the USB core & hub drivers to produce a bunch
-  of debug messages to the system log. Select this if you are having a
-  problem with USB support and want to see more of what is going on.
-
-CONFIG_USB_LONG_TIMEOUT
-  This option makes the standard time out a bit longer.  Basically,
-  some devices are just slow to respond, so this makes usb more
-  patient.  There should be no harm in selecting this, but it is
-  needed for some MGE Ellipse UPSes.
-
-  If you have an MGE Ellipse UPS, or you see timeouts in HID
-  transactions, say Y; otherwise say N.
-
-CONFIG_USB_DEVICEFS
-  If you say Y here (and to "/proc file system support" in the "File
-  systems" section, above), you will get a file /proc/bus/usb/devices
-  which lists the devices currently connected to your USB bus or
-  busses, a file /proc/bus/usb/drivers which lists the USB kernel
-  client drivers currently loaded, and for every connected device a
-  file named  "/proc/bus/usb/xxx/yyy", where xxx is the bus number and
-  yyy the device number; the latter files can be used by user space
-  programs to talk directly to the device. These files are "virtual",
-  meaning they are generated on the fly and not stored on the hard
-  drive.
-
-  You may need to mount the usbfs file system to see the files, use
-     mount -t usbfs none /proc/bus/usb
-
-  For the format of the various /proc/bus/usb/ files, please read
-  <file:Documentation/usb/proc_usb_info.txt>.
-
-  Please note that this code is completely unrelated to devfs, the
-  "/dev file system support".
-
-  Most users want to say Y here.
-
-CONFIG_USB_BANDWIDTH
-  If you say Y here, the USB subsystem enforces USB bandwidth
-  allocation and will prevent some device opens from succeeding
-  if they would cause USB bandwidth usage to go above 90% of
-  the bus bandwidth.
-
-  If you say N here, these conditions will cause warning messages
-  about USB bandwidth usage to be logged and some devices or
-  drivers may not work correctly.
-
-CONFIG_USB_DYNAMIC_MINORS
-  If you say Y here, the USB subsystem will use dynamic minor
-  allocation for any device that uses the USB major number.
-  This means that you can have more than 16 of a single type
-  of device (like USB printers).
-
-  If you are unsure about this, say N here.
diff -Nru a/drivers/usb/Config.in b/drivers/usb/Config.in
--- a/drivers/usb/Config.in	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,38 +0,0 @@
-#
-# USB device configuration
-#
-mainmenu_option next_comment
-comment 'USB support'
-
-# ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
-if [ "$CONFIG_PCI" = "y" -o "$CONFIG_SA1111" = "y" ]; then
-   tristate 'Support for USB' CONFIG_USB
-else
-   define_bool CONFIG_USB n
-fi
-
-if [ "$CONFIG_USB" = "y" -o  "$CONFIG_USB" = "m" ]; then
-   source drivers/usb/core/Config.in
-
-   source drivers/usb/host/Config.in
-
-   source drivers/usb/class/Config.in
-
-   source drivers/usb/storage/Config.in
-
-   source drivers/usb/input/Config.in
-
-   source drivers/usb/image/Config.in
-
-   source drivers/usb/media/Config.in
-
-   source drivers/usb/net/Config.in
-
-   comment 'USB port drivers'
-   dep_tristate '  USS720 parport driver' CONFIG_USB_USS720 $CONFIG_USB $CONFIG_PARPORT
-
-   source drivers/usb/serial/Config.in
-
-   source drivers/usb/misc/Config.in
-fi
-endmenu
diff -Nru a/drivers/usb/Kconfig b/drivers/usb/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,95 @@
+#
+# USB device configuration
+#
+
+menu "USB support"
+
+# ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
+config USB
+	tristate "Support for USB"
+	depends on PCI || SA1111
+	---help---
+	  Universal Serial Bus (USB) is a specification for a serial bus
+	  subsystem which offers higher speeds and more features than the
+	  traditional PC serial port.  The bus supplies power to peripherals
+	  and allows for hot swapping.  Up to 127 USB peripherals can be
+	  connected to a single USB port in a tree structure.  The USB port is
+	  the root of the tree, the peripherals are the leaves and the inner
+	  nodes are special USB devices called hubs.  Many newer PC's have USB
+	  ports and newer peripherals such as scanners, keyboards, mice,
+	  modems, and printers support the USB protocol and can be connected
+	  to the PC via those ports.
+
+	  Say Y here if your computer has a USB port and you want to use USB
+	  devices.  You then need to say Y to at least one of "UHCI HCD support"
+	  or "OHCI HCD support" below (the type of interface that the USB hardware
+	  in your computer provides to the operating system) and then choose
+	  from amongst the drivers for USB peripherals.  You may want to check
+	  out the information provided in <file:Documentation/usb/> and
+	  especially the links given in <file:Documentation/usb/usb-help.txt>.
+
+	  If you have a new USB 2.0 High Speed system, you should also choose
+	  "EHCI HCD (USB 2.0) support" as well as at least one of UHCI or OHCI.
+
+	  It doesn't normally hurt to select them all if you are not certain.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usbcore.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+source "drivers/usb/core/Kconfig"
+
+source "drivers/usb/host/Kconfig"
+
+source "drivers/usb/class/Kconfig"
+
+source "drivers/usb/storage/Kconfig"
+
+source "drivers/usb/input/Kconfig"
+
+source "drivers/usb/image/Kconfig"
+
+source "drivers/usb/media/Kconfig"
+
+source "drivers/usb/net/Kconfig"
+
+comment "USB port drivers"
+	depends on USB
+
+config USB_USS720
+	tristate "USS720 parport driver"
+	depends on USB && PARPORT
+	---help---
+	  This driver is for USB parallel port adapters that use the Lucent
+	  Technologies USS-720 chip. These cables are plugged into your USB
+	  port and provide USB compatibility to peripherals designed with
+	  parallel port interfaces.
+
+	  The chip has two modes: automatic mode and manual mode. In automatic
+	  mode, it looks to the computer like a standard USB printer. Only
+	  printers may be connected to the USS-720 in this mode. The generic
+	  USB printer driver ("USB Printer support", above) may be used in
+	  that mode, and you can say N here if you want to use the chip only
+	  in this mode.
+
+	  Manual mode is not limited to printers, any parallel port
+	  device should work. This driver utilizes manual mode.
+	  Note however that some operations are three orders of magnitude
+	  slower than on a PCI/ISA Parallel Port, so timing critical
+	  applications might not work.
+
+	  Say Y here if you own an USS-720 USB->Parport cable and intend to
+	  connect anything other than a printer to it.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called uss720.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+source "drivers/usb/serial/Kconfig"
+
+source "drivers/usb/misc/Kconfig"
+
+endmenu
+
diff -Nru a/drivers/usb/class/Config.help b/drivers/usb/class/Config.help
--- a/drivers/usb/class/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,68 +0,0 @@
-CONFIG_USB_ACM
-  This driver supports USB modems and ISDN adapters which support the
-  Communication Device Class Abstract Control Model interface.
-  Please read <file:Documentation/usb/acm.txt> for details.
-
-  If your modem only reports "Cls=ff(vend.)" in the descriptors in
-  /proc/bus/usb/devices, then your modem will not work with this
-  driver.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called acm.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_AUDIO
-  Say Y here if you want to connect USB audio equipment such as
-  speakers to your computer's USB port.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called audio.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_BLUETOOTH_TTY
-  Say Y here if you want to connect a USB Bluetooth device to your
-  computer's USB port. You will need the Bluetooth stack (available
-  at <http://developer.axis.com/software/index.shtml>) to fully use
-  the device.
-
-  This driver implements a tty inteface to a Bluetooth device.  If
-  you want to use a socket based Bluetooth stack (like the BlueZ
-  stack), do not use this driver.
-
-  If in doubt, say N here.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called bluetty.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_MIDI
-  Say Y here if you want to connect a USB MIDI device to your
-  computer's USB port. This driver is for devices that comply with
-  'Universal Serial Bus Device Class Definition for MIDI Device'.
-
-  The following devices are known to work:
-    * Steinberg USB2MIDI
-    * Roland MPU64
-    * Roland PC-300
-    * Roland SC8850
-    * Roland UM-1
-    * Roland UM-2
-    * Roland UA-100
-    * Yamaha MU1000
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usb-midi.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_PRINTER
-  Say Y here if you want to connect a USB printer to your computer's
-  USB port.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called printer.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/usb/class/Config.in b/drivers/usb/class/Config.in
--- a/drivers/usb/class/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,9 +0,0 @@
-#
-# USB Class driver configuration
-#
-comment 'USB Device Class drivers'
-dep_tristate '  USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
-dep_tristate '  USB Bluetooth TTY support' CONFIG_USB_BLUETOOTH_TTY $CONFIG_USB
-dep_tristate '  USB MIDI support' CONFIG_USB_MIDI $CONFIG_USB
-dep_tristate '  USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
-dep_tristate '  USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
diff -Nru a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/class/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,90 @@
+#
+# USB Class driver configuration
+#
+comment "USB Device Class drivers"
+	depends on USB
+
+config USB_AUDIO
+	tristate "USB Audio support"
+	depends on USB && SOUND
+	help
+	  Say Y here if you want to connect USB audio equipment such as
+	  speakers to your computer's USB port.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called audio.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_BLUETOOTH_TTY
+	tristate "USB Bluetooth TTY support"
+	depends on USB
+	---help---
+	  Say Y here if you want to connect a USB Bluetooth device to your
+	  computer's USB port. You will need the Bluetooth stack (available
+	  at <http://developer.axis.com/software/index.shtml>) to fully use
+	  the device.
+
+	  This driver implements a tty inteface to a Bluetooth device.  If
+	  you want to use a socket based Bluetooth stack (like the BlueZ
+	  stack), do not use this driver.
+
+	  If in doubt, say N here.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called bluetty.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_MIDI
+	tristate "USB MIDI support"
+	depends on USB
+	---help---
+	  Say Y here if you want to connect a USB MIDI device to your
+	  computer's USB port. This driver is for devices that comply with
+	  'Universal Serial Bus Device Class Definition for MIDI Device'.
+
+	  The following devices are known to work:
+	  * Steinberg USB2MIDI
+	  * Roland MPU64
+	  * Roland PC-300
+	  * Roland SC8850
+	  * Roland UM-1
+	  * Roland UM-2
+	  * Roland UA-100
+	  * Yamaha MU1000
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usb-midi.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_ACM
+	tristate "USB Modem (CDC ACM) support"
+	depends on USB
+	---help---
+	  This driver supports USB modems and ISDN adapters which support the
+	  Communication Device Class Abstract Control Model interface.
+	  Please read <file:Documentation/usb/acm.txt> for details.
+
+	  If your modem only reports "Cls=ff(vend.)" in the descriptors in
+	  /proc/bus/usb/devices, then your modem will not work with this
+	  driver.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called acm.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_PRINTER
+	tristate "USB Printer support"
+	depends on USB
+	help
+	  Say Y here if you want to connect a USB printer to your computer's
+	  USB port.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called printer.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
--- a/drivers/usb/class/audio.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/usb/class/audio.c	Wed Oct 30 16:44:34 2002
@@ -914,7 +914,7 @@
 	if (!usbin_retire_desc(u, urb) &&
 	    u->flags & FLG_RUNNING &&
 	    !usbin_prepare_desc(u, urb) && 
-	    (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
+	    (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
 		u->flags |= mask;
 	} else {
 		u->flags &= ~(mask | FLG_RUNNING);
@@ -980,7 +980,7 @@
 	if (!usbin_sync_retire_desc(u, urb) &&
 	    u->flags & FLG_RUNNING &&
 	    !usbin_sync_prepare_desc(u, urb) && 
-	    (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
+	    (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
 		u->flags |= mask;
 	} else {
 		u->flags &= ~(mask | FLG_RUNNING);
@@ -1049,7 +1049,7 @@
 		urb = u->durb[0].urb;
 		urb->dev = dev;
 		urb->pipe = u->datapipe;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->number_of_packets = DESCFRAMES;
 		urb->context = as;
 		urb->complete = usbin_completed;
@@ -1062,7 +1062,7 @@
 		urb = u->durb[1].urb;
 		urb->dev = dev;
 		urb->pipe = u->datapipe;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->number_of_packets = DESCFRAMES;
 		urb->context = as;
 		urb->complete = usbin_completed;
@@ -1076,7 +1076,7 @@
 			urb = u->surb[0].urb;
 			urb->dev = dev;
 			urb->pipe = u->syncpipe;
-			urb->transfer_flags = USB_ISO_ASAP;
+			urb->transfer_flags = URB_ISO_ASAP;
 			urb->number_of_packets = SYNCFRAMES;
 			urb->context = as;
 			urb->complete = usbin_sync_completed;
@@ -1090,7 +1090,7 @@
 			urb = u->surb[1].urb;
 			urb->dev = dev;
 			urb->pipe = u->syncpipe;
-			urb->transfer_flags = USB_ISO_ASAP;
+			urb->transfer_flags = URB_ISO_ASAP;
 			urb->number_of_packets = SYNCFRAMES;
 			urb->context = as;
 			urb->complete = usbin_sync_completed;
@@ -1274,7 +1274,7 @@
 	if (!usbout_retire_desc(u, urb) &&
 	    u->flags & FLG_RUNNING &&
 	    !usbout_prepare_desc(u, urb) && 
-	    (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
+	    (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
 		u->flags |= mask;
 	} else {
 		u->flags &= ~(mask | FLG_RUNNING);
@@ -1347,7 +1347,7 @@
 	if (!usbout_sync_retire_desc(u, urb) &&
 	    u->flags & FLG_RUNNING &&
 	    !usbout_sync_prepare_desc(u, urb) && 
-	    (suret = usb_submit_urb(urb, GFP_KERNEL)) == 0) {
+	    (suret = usb_submit_urb(urb, GFP_ATOMIC)) == 0) {
 		u->flags |= mask;
 	} else {
 		u->flags &= ~(mask | FLG_RUNNING);
@@ -1416,7 +1416,7 @@
 		urb = u->durb[0].urb;
 		urb->dev = dev;
 		urb->pipe = u->datapipe;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->number_of_packets = DESCFRAMES;
 		urb->context = as;
 		urb->complete = usbout_completed;
@@ -1429,7 +1429,7 @@
 		urb = u->durb[1].urb;
 		urb->dev = dev;
 		urb->pipe = u->datapipe;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->number_of_packets = DESCFRAMES;
 		urb->context = as;
 		urb->complete = usbout_completed;
@@ -1443,7 +1443,7 @@
 			urb = u->surb[0].urb;
 			urb->dev = dev;
 			urb->pipe = u->syncpipe;
-			urb->transfer_flags = USB_ISO_ASAP;
+			urb->transfer_flags = URB_ISO_ASAP;
 			urb->number_of_packets = SYNCFRAMES;
 			urb->context = as;
 			urb->complete = usbout_sync_completed;
@@ -1457,7 +1457,7 @@
 			urb = u->surb[1].urb;
 			urb->dev = dev;
 			urb->pipe = u->syncpipe;
-			urb->transfer_flags = USB_ISO_ASAP;
+			urb->transfer_flags = URB_ISO_ASAP;
 			urb->number_of_packets = SYNCFRAMES;
 			urb->context = as;
 			urb->complete = usbout_sync_completed;
@@ -1512,8 +1512,8 @@
 static int set_format_in(struct usb_audiodev *as)
 {
 	struct usb_device *dev = as->state->usbdev;
-	struct usb_config_descriptor *config = dev->actconfig;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_config *config = dev->actconfig;
+	struct usb_host_interface *alts;
 	struct usb_interface *iface;
 	struct usbin *u = &as->usbin;
 	struct dmabuf *d = &u->dma;
@@ -1522,7 +1522,7 @@
 	unsigned char data[3];
 	int fmtnr, ret;
 
-	if (u->interface < 0 || u->interface >= config->bNumInterfaces)
+	if (u->interface < 0 || u->interface >= config->desc.bNumInterfaces)
 		return 0;
 	iface = &config->interface[u->interface];
 
@@ -1535,26 +1535,26 @@
 	fmt = as->fmtin + fmtnr;
 	alts = &iface->altsetting[fmt->altsetting];
 	u->format = fmt->format;
-	u->datapipe = usb_rcvisocpipe(dev, alts->endpoint[0].bEndpointAddress & 0xf);
+	u->datapipe = usb_rcvisocpipe(dev, alts->endpoint[0].desc.bEndpointAddress & 0xf);
 	u->syncpipe = u->syncinterval = 0;
-	if ((alts->endpoint[0].bmAttributes & 0x0c) == 0x08) {
-		if (alts->bNumEndpoints < 2 ||
-		    alts->endpoint[1].bmAttributes != 0x01 ||
-		    alts->endpoint[1].bSynchAddress != 0 ||
-		    alts->endpoint[1].bEndpointAddress != (alts->endpoint[0].bSynchAddress & 0x7f)) {
+	if ((alts->endpoint[0].desc.bmAttributes & 0x0c) == 0x08) {
+		if (alts->desc.bNumEndpoints < 2 ||
+		    alts->endpoint[1].desc.bmAttributes != 0x01 ||
+		    alts->endpoint[1].desc.bSynchAddress != 0 ||
+		    alts->endpoint[1].desc.bEndpointAddress != (alts->endpoint[0].desc.bSynchAddress & 0x7f)) {
 			printk(KERN_ERR "usbaudio: device %d interface %d altsetting %d invalid synch pipe\n",
 			       dev->devnum, u->interface, fmt->altsetting);
 			return -1;
 		}
-		u->syncpipe = usb_sndisocpipe(dev, alts->endpoint[1].bEndpointAddress & 0xf);
-		u->syncinterval = alts->endpoint[1].bRefresh;
+		u->syncpipe = usb_sndisocpipe(dev, alts->endpoint[1].desc.bEndpointAddress & 0xf);
+		u->syncinterval = alts->endpoint[1].desc.bRefresh;
 	}
 	if (d->srate < fmt->sratelo)
 		d->srate = fmt->sratelo;
 	if (d->srate > fmt->sratehi)
 		d->srate = fmt->sratehi;
-	dprintk((KERN_DEBUG "usbaudio: set_format_in: usb_set_interface %u %u\n", alts->bInterfaceNumber, fmt->altsetting));
-	if (usb_set_interface(dev, alts->bInterfaceNumber, fmt->altsetting) < 0) {
+	dprintk((KERN_DEBUG "usbaudio: set_format_in: usb_set_interface %u %u\n", alts->desc.bInterfaceNumber, fmt->altsetting));
+	if (usb_set_interface(dev, alts->desc.bInterfaceNumber, fmt->altsetting) < 0) {
 		printk(KERN_WARNING "usbaudio: usb_set_interface failed, device %d interface %d altsetting %d\n",
 		       dev->devnum, u->interface, fmt->altsetting);
 		return -1;
@@ -1600,8 +1600,8 @@
 static int set_format_out(struct usb_audiodev *as)
 {
 	struct usb_device *dev = as->state->usbdev;
-	struct usb_config_descriptor *config = dev->actconfig;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_config *config = dev->actconfig;
+	struct usb_host_interface *alts;
 	struct usb_interface *iface;	
 	struct usbout *u = &as->usbout;
 	struct dmabuf *d = &u->dma;
@@ -1610,7 +1610,7 @@
 	unsigned char data[3];
 	int fmtnr, ret;
 
-	if (u->interface < 0 || u->interface >= config->bNumInterfaces)
+	if (u->interface < 0 || u->interface >= config->desc.bNumInterfaces)
 		return 0;
 	iface = &config->interface[u->interface];
 
@@ -1623,9 +1623,9 @@
 	fmt = as->fmtout + fmtnr;
 	u->format = fmt->format;
 	alts = &iface->altsetting[fmt->altsetting];
-	u->datapipe = usb_sndisocpipe(dev, alts->endpoint[0].bEndpointAddress & 0xf);
+	u->datapipe = usb_sndisocpipe(dev, alts->endpoint[0].desc.bEndpointAddress & 0xf);
 	u->syncpipe = u->syncinterval = 0;
-	if ((alts->endpoint[0].bmAttributes & 0x0c) == 0x04) {
+	if ((alts->endpoint[0].desc.bmAttributes & 0x0c) == 0x04) {
 #if 0
 		printk(KERN_DEBUG "bNumEndpoints 0x%02x endpoint[1].bmAttributes 0x%02x\n"
 		       KERN_DEBUG "endpoint[1].bSynchAddress 0x%02x endpoint[1].bEndpointAddress 0x%02x\n"
@@ -1633,22 +1633,22 @@
 		       alts->endpoint[1].bmAttributes, alts->endpoint[1].bSynchAddress,
 		       alts->endpoint[1].bEndpointAddress, alts->endpoint[0].bSynchAddress);
 #endif
-		if (alts->bNumEndpoints < 2 ||
-		    alts->endpoint[1].bmAttributes != 0x01 ||
-		    alts->endpoint[1].bSynchAddress != 0 ||
-		    alts->endpoint[1].bEndpointAddress != (alts->endpoint[0].bSynchAddress | 0x80)) {
+		if (alts->desc.bNumEndpoints < 2 ||
+		    alts->endpoint[1].desc.bmAttributes != 0x01 ||
+		    alts->endpoint[1].desc.bSynchAddress != 0 ||
+		    alts->endpoint[1].desc.bEndpointAddress != (alts->endpoint[0].desc.bSynchAddress | 0x80)) {
 			printk(KERN_ERR "usbaudio: device %d interface %d altsetting %d invalid synch pipe\n",
 			       dev->devnum, u->interface, fmt->altsetting);
 			return -1;
 		}
-		u->syncpipe = usb_rcvisocpipe(dev, alts->endpoint[1].bEndpointAddress & 0xf);
-		u->syncinterval = alts->endpoint[1].bRefresh;
+		u->syncpipe = usb_rcvisocpipe(dev, alts->endpoint[1].desc.bEndpointAddress & 0xf);
+		u->syncinterval = alts->endpoint[1].desc.bRefresh;
 	}
 	if (d->srate < fmt->sratelo)
 		d->srate = fmt->sratelo;
 	if (d->srate > fmt->sratehi)
 		d->srate = fmt->sratehi;
-	dprintk((KERN_DEBUG "usbaudio: set_format_out: usb_set_interface %u %u\n", alts->bInterfaceNumber, fmt->altsetting));
+	dprintk((KERN_DEBUG "usbaudio: set_format_out: usb_set_interface %u %u\n", alts->desc.bInterfaceNumber, fmt->altsetting));
 	if (usb_set_interface(dev, u->interface, fmt->altsetting) < 0) {
 		printk(KERN_WARNING "usbaudio: usb_set_interface failed, device %d interface %d altsetting %d\n",
 		       dev->devnum, u->interface, fmt->altsetting);
@@ -2705,7 +2705,7 @@
 		usbout_stop(as);
 		if (dev && as->usbout.interface >= 0) {
 			iface = &dev->actconfig->interface[as->usbout.interface];
-			usb_set_interface(dev, iface->altsetting->bInterfaceNumber, 0);
+			usb_set_interface(dev, iface->altsetting->desc.bInterfaceNumber, 0);
 		}
 		dmabuf_release(&as->usbout.dma);
 		usbout_release(as);
@@ -2714,7 +2714,7 @@
 		usbin_stop(as);
 		if (dev && as->usbin.interface >= 0) {
 			iface = &dev->actconfig->interface[as->usbin.interface];
-			usb_set_interface(dev, iface->altsetting->bInterfaceNumber, 0);
+			usb_set_interface(dev, iface->altsetting->desc.bInterfaceNumber, 0);
 		}
 		dmabuf_release(&as->usbin.dma);
 		usbin_release(as);
@@ -2819,8 +2819,8 @@
 {
 	struct usb_device *dev = s->usbdev;
 	struct usb_audiodev *as;
-	struct usb_config_descriptor *config = dev->actconfig;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_config *config = dev->actconfig;
+	struct usb_host_interface *alts;
 	struct usb_interface *iface;
 	struct audioformat *fp;
 	unsigned char *fmt, *csep;
@@ -2868,17 +2868,17 @@
 		iface = &config->interface[asifin];
 		for (i = 0; i < iface->num_altsetting; i++) {
 			alts = &iface->altsetting[i];
-			if (alts->bInterfaceClass != USB_CLASS_AUDIO || alts->bInterfaceSubClass != 2)
+			if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || alts->desc.bInterfaceSubClass != 2)
 				continue;
-			if (alts->bNumEndpoints < 1) {
+			if (alts->desc.bNumEndpoints < 1) {
 				if (i != 0) {  /* altsetting 0 has no endpoints (Section B.3.4.1) */
 					printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u does not have an endpoint\n", 
 					       dev->devnum, asifin, i);
 				}
 				continue;
 			}
-			if ((alts->endpoint[0].bmAttributes & 0x03) != 0x01 ||
-			    !(alts->endpoint[0].bEndpointAddress & 0x80)) {
+			if ((alts->endpoint[0].desc.bmAttributes & 0x03) != 0x01 ||
+			    !(alts->endpoint[0].desc.bEndpointAddress & 0x80)) {
 				printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u first endpoint not isochronous in\n", 
 				       dev->devnum, asifin, i);
 				continue;
@@ -2949,15 +2949,15 @@
 		iface = &config->interface[asifout];
 		for (i = 0; i < iface->num_altsetting; i++) {
 			alts = &iface->altsetting[i];
-			if (alts->bInterfaceClass != USB_CLASS_AUDIO || alts->bInterfaceSubClass != 2)
+			if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || alts->desc.bInterfaceSubClass != 2)
 				continue;
-			if (alts->bNumEndpoints < 1) {
+			if (alts->desc.bNumEndpoints < 1) {
 				printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u does not have an endpoint\n", 
 				       dev->devnum, asifout, i);
 				continue;
 			}
-			if ((alts->endpoint[0].bmAttributes & 0x03) != 0x01 ||
-			    (alts->endpoint[0].bEndpointAddress & 0x80)) {
+			if ((alts->endpoint[0].desc.bmAttributes & 0x03) != 0x01 ||
+			    (alts->endpoint[0].desc.bEndpointAddress & 0x80)) {
 				printk(KERN_ERR "usbaudio: device %u interface %u altsetting %u first endpoint not isochronous out\n", 
 				       dev->devnum, asifout, i);
 				continue;
@@ -3642,10 +3642,13 @@
 	list_add_tail(&ms->list, &s->mixerlist);
 }
 
+/* arbitrary limit, we won't check more interfaces than this */
+#define USB_MAXINTERFACES	32
+
 static struct usb_audio_state *usb_audio_parsecontrol(struct usb_device *dev, unsigned char *buffer, unsigned int buflen, unsigned int ctrlif)
 {
 	struct usb_audio_state *s;
-	struct usb_config_descriptor *config = dev->actconfig;
+	struct usb_host_config *config = dev->actconfig;
 	struct usb_interface *iface;
 	unsigned char ifin[USB_MAXINTERFACES], ifout[USB_MAXINTERFACES];
 	unsigned char *p1;
@@ -3675,23 +3678,23 @@
 		       dev->devnum, ctrlif);
 	for (i = 0; i < p1[7]; i++) {
 		j = p1[8+i];
-		if (j >= config->bNumInterfaces) {
+		if (j >= config->desc.bNumInterfaces) {
 			printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u does not exist\n",
 			       dev->devnum, ctrlif, j);
 			continue;
 		}
 		iface = &config->interface[j];
-		if (iface->altsetting[0].bInterfaceClass != USB_CLASS_AUDIO) {
+		if (iface->altsetting[0].desc.bInterfaceClass != USB_CLASS_AUDIO) {
 			printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u is not an AudioClass interface\n",
 			       dev->devnum, ctrlif, j);
 			continue;
 		}
-		if (iface->altsetting[0].bInterfaceSubClass == 3) {
+		if (iface->altsetting[0].desc.bInterfaceSubClass == 3) {
 			printk(KERN_INFO "usbaudio: device %d audiocontrol interface %u interface %u MIDIStreaming not supported\n",
 			       dev->devnum, ctrlif, j);
 			continue;
 		}
-		if (iface->altsetting[0].bInterfaceSubClass != 2) {
+		if (iface->altsetting[0].desc.bInterfaceSubClass != 2) {
 			printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u invalid AudioClass subtype\n",
 			       dev->devnum, ctrlif, j);
 			continue;
@@ -3704,25 +3707,25 @@
 			printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u has only 1 altsetting.\n", dev->devnum, ctrlif);
 			continue;
 		}
-		if (iface->altsetting[0].bNumEndpoints > 0) {
+		if (iface->altsetting[0].desc.bNumEndpoints > 0) {
 			/* Check all endpoints; should they all have a bandwidth of 0 ? */
-			for (k = 0; k < iface->altsetting[0].bNumEndpoints; k++) {
-				if (iface->altsetting[0].endpoint[k].wMaxPacketSize > 0) {
+			for (k = 0; k < iface->altsetting[0].desc.bNumEndpoints; k++) {
+				if (iface->altsetting[0].endpoint[k].desc.wMaxPacketSize > 0) {
 					printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u endpoint %d does not have 0 bandwidth at alt[0]\n", dev->devnum, ctrlif, k);
 					break;
 				}
 			}
-			if (k < iface->altsetting[0].bNumEndpoints)
+			if (k < iface->altsetting[0].desc.bNumEndpoints)
 				continue;
 		}
-		if (iface->altsetting[1].bNumEndpoints < 1) {
+		if (iface->altsetting[1].desc.bNumEndpoints < 1) {
 			printk(KERN_ERR "usbaudio: device %d audiocontrol interface %u interface %u has no endpoint\n",
 			       dev->devnum, ctrlif, j);
 			continue;
 		}
 		/* note: this requires the data endpoint to be ep0 and the optional sync
 		   ep to be ep1, which seems to be the case */
-		if (iface->altsetting[1].endpoint[0].bEndpointAddress & USB_DIR_IN) {
+		if (iface->altsetting[1].endpoint[0].desc.bEndpointAddress & USB_DIR_IN) {
 			if (numifin < USB_MAXINTERFACES) {
 				ifin[numifin++] = j;
 				usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1);
@@ -3769,7 +3772,7 @@
 			   const struct usb_device_id *id)
 {
 	struct usb_device *dev = interface_to_usbdev (intf);
-	struct usb_config_descriptor *config = dev->actconfig;	
+	struct usb_host_config *config = dev->actconfig;	
 	struct usb_audio_state *s;
 	unsigned char *buffer;
 	unsigned char buf[8];
@@ -3778,8 +3781,8 @@
 
 #if 0
 	printk(KERN_DEBUG "usbaudio: Probing if %i: IC %x, ISC %x\n", ifnum,
-	       config->interface[ifnum].altsetting[0].bInterfaceClass,
-	       config->interface[ifnum].altsetting[0].bInterfaceSubClass);
+	       config->interface[ifnum].altsetting[0].desc.bInterfaceClass,
+	       config->interface[ifnum].altsetting[0].desc.bInterfaceSubClass);
 #endif
 
 	/*
@@ -3788,8 +3791,8 @@
 	 */
 	i = dev->actconfig - config;
 
-	if (usb_set_configuration(dev, config->bConfigurationValue) < 0) {
-		printk(KERN_ERR "usbaudio: set_configuration failed (ConfigValue 0x%x)\n", config->bConfigurationValue);
+	if (usb_set_configuration(dev, config->desc.bConfigurationValue) < 0) {
+		printk(KERN_ERR "usbaudio: set_configuration failed (ConfigValue 0x%x)\n", config->desc.bConfigurationValue);
 		return -EIO;
 	}
 	ret = usb_get_descriptor(dev, USB_DT_CONFIG, i, buf, 8);
@@ -3810,7 +3813,7 @@
 		printk(KERN_ERR "usbaudio: cannot get config descriptor %d of device %d (error %d)\n", i, dev->devnum, ret);
 		return -EIO;
 	}
-	s = usb_audio_parsecontrol(dev, buffer, buflen, intf->altsetting->bInterfaceNumber);
+	s = usb_audio_parsecontrol(dev, buffer, buflen, intf->altsetting->desc.bInterfaceNumber);
 	if (s) {
 		dev_set_drvdata (&intf->dev, s);
 		return 0;
diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c
--- a/drivers/usb/class/bluetty.c	Wed Oct 30 16:44:25 2002
+++ b/drivers/usb/class/bluetty.c	Wed Oct 30 16:44:25 2002
@@ -328,7 +328,7 @@
 	dr->wIndex = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
 	dr->wLength = cpu_to_le16((u16) len);
 	
-	FILL_CONTROL_URB (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
+	usb_fill_control_urb (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
 			  (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
 
 	/* send it down the pipe */
@@ -382,7 +382,7 @@
 
 #ifndef BTBUGGYHARDWARE
 		/* Start reading from the device */
-		FILL_BULK_URB (bluetooth->read_urb, bluetooth->dev, 
+		usb_fill_bulk_urb (bluetooth->read_urb, bluetooth->dev, 
 			       usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
 			       bluetooth->bulk_in_buffer,
 			       bluetooth->bulk_in_buffer_size,
@@ -391,7 +391,7 @@
 		if (result)
 			dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
 #endif
-		FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev,
+		usb_fill_int_urb (bluetooth->interrupt_in_urb, bluetooth->dev,
 			      usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
 			      bluetooth->interrupt_in_buffer,
 			      bluetooth->interrupt_in_buffer_size,
@@ -535,7 +535,7 @@
 				memcpy (urb->transfer_buffer, current_position, buffer_size);
 
 				/* build up our urb */
-				FILL_BULK_URB (urb, bluetooth->dev, usb_sndbulkpipe(bluetooth->dev, bluetooth->bulk_out_endpointAddress),
+				usb_fill_bulk_urb (urb, bluetooth->dev, usb_sndbulkpipe(bluetooth->dev, bluetooth->bulk_out_endpointAddress),
 						urb->transfer_buffer, buffer_size, bluetooth_write_bulk_callback, bluetooth);
 
 				/* send it down the pipe */
@@ -725,7 +725,7 @@
 	}
 
 	if (bluetooth->read_urb) {
-		FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
+		usb_fill_bulk_urb(bluetooth->read_urb, bluetooth->dev, 
 			      usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
 			      bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, 
 			      bluetooth_read_bulk_callback, bluetooth);
@@ -767,6 +767,7 @@
 	unsigned int i;
 	unsigned int count = urb->actual_length;
 	unsigned int packet_size;
+	int status;
 
 	dbg("%s", __FUNCTION__);
 
@@ -775,14 +776,24 @@
 		return;
 	}
 
-	if (urb->status) {
-		dbg("%s - nonzero int status received: %d", __FUNCTION__, urb->status);
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
 	}
 
 	if (!count) {
 		dbg("%s - zero length int", __FUNCTION__);
-		return;
+		goto exit;
 	}
 
 
@@ -803,7 +814,7 @@
 	}
 	if (count == 0) {
 		urb->actual_length = 0;
-		return;
+		goto exit;
 	}
 #endif
 	/* We add  a packet type identifier to the beginning of each
@@ -820,7 +831,7 @@
 	if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) {
 		err("%s - exceeded EVENT_BUFFER_SIZE", __FUNCTION__);
 		bluetooth->int_packet_pos = 0;
-		return;
+		goto exit;
 	}
 
 	memcpy (&bluetooth->int_buffer[bluetooth->int_packet_pos],
@@ -831,12 +842,12 @@
 	if (bluetooth->int_packet_pos >= EVENT_HDR_SIZE)
 		packet_size = bluetooth->int_buffer[2];
 	else
-		return;
+		goto exit;
 
 	if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) {
 		err("%s - packet was too long", __FUNCTION__);
 		bluetooth->int_packet_pos = 0;
-		return;
+		goto exit;
 	}
 
 	if (packet_size + EVENT_HDR_SIZE == bluetooth->int_packet_pos) {
@@ -851,6 +862,12 @@
 
 		bluetooth->int_packet_pos = 0;
 	}
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 
@@ -916,7 +933,7 @@
 	if ((count == 4) && (data[0] == 0x00) && (data[1] == 0x00)
 	    && (data[2] == 0x00) && (data[3] == 0x00)) {
 		urb->actual_length = 0;
-		FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
+		usb_fill_bulk_urb(bluetooth->read_urb, bluetooth->dev, 
 			      usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
 			      bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, 
 			      bluetooth_read_bulk_callback, bluetooth);
@@ -977,7 +994,7 @@
 	if (!bluetooth || !bluetooth->open_count)
 		return;
 
-	FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
+	usb_fill_bulk_urb(bluetooth->read_urb, bluetooth->dev, 
 		      usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
 		      bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, 
 		      bluetooth_read_bulk_callback, bluetooth);
@@ -1036,7 +1053,7 @@
 {
 	struct usb_device *dev = interface_to_usbdev (intf);
 	struct usb_bluetooth *bluetooth = NULL;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_endpoint_descriptor *interrupt_in_endpoint[8];
 	struct usb_endpoint_descriptor *bulk_in_endpoint[8];
@@ -1051,11 +1068,11 @@
 	int num_bulk_out = 0;
 
 	interface = &intf->altsetting[0];
-	control_out_endpoint = interface->bInterfaceNumber;
+	control_out_endpoint = interface->desc.bInterfaceNumber;
 
 	/* find the endpoints that we need */
-	for (i = 0; i < interface->bNumEndpoints; ++i) {
-		endpoint = &interface->endpoint[i];
+	for (i = 0; i < interface->desc.bNumEndpoints; ++i) {
+		endpoint = &interface->endpoint[i].desc;
 
 		if ((endpoint->bEndpointAddress & 0x80) &&
 		    ((endpoint->bmAttributes & 3) == 0x02)) {
@@ -1143,7 +1160,7 @@
 		err("Couldn't allocate bulk_in_buffer");
 		goto probe_error;
 	}
-	FILL_BULK_URB(bluetooth->read_urb, dev, usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
+	usb_fill_bulk_urb(bluetooth->read_urb, dev, usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
 		      bluetooth->bulk_in_buffer, buffer_size, bluetooth_read_bulk_callback, bluetooth);
 
 	endpoint = bulk_out_endpoint[0];
@@ -1179,7 +1196,7 @@
 		err("Couldn't allocate interrupt_in_buffer");
 		goto probe_error;
 	}
-	FILL_INT_URB(bluetooth->interrupt_in_urb, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+	usb_fill_int_urb(bluetooth->interrupt_in_urb, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
 		     bluetooth->interrupt_in_buffer, buffer_size, bluetooth_int_callback,
 		     bluetooth, endpoint->bInterval);
 
diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
--- a/drivers/usb/class/cdc-acm.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/class/cdc-acm.c	Wed Oct 30 16:44:29 2002
@@ -166,7 +166,9 @@
 static int acm_ctrl_msg(struct acm *acm, int request, int value, void *buf, int len)
 {
 	int retval = usb_control_msg(acm->dev, usb_sndctrlpipe(acm->dev, 0),
-		request, USB_RT_ACM, value, acm->iface[0].altsetting[0].bInterfaceNumber, buf, len, HZ * 5);
+		request, USB_RT_ACM, value,
+		acm->iface[0].altsetting[0].desc.bInterfaceNumber,
+		buf, len, HZ * 5);
 	dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d", request, value, len, retval);
 	return retval < 0 ? retval : 0;
 }
@@ -185,20 +187,32 @@
 	struct usb_ctrlrequest *dr = urb->transfer_buffer;
 	unsigned char *data = (unsigned char *)(dr + 1);
 	int newctrl;
+	int status;
 
-	if (!ACM_READY(acm)) return;
-
-	if (urb->status < 0) {
-		dbg("nonzero ctrl irq status received: %d", urb->status);
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
 	}
 
+	if (!ACM_READY(acm))
+		goto exit;
+
 	switch (dr->bRequest) {
 
 		case ACM_IRQ_NETWORK:
 
 			dbg("%s network", data[0] ? "connected to" : "disconnected from");
-			return;
+			break;
 
 		case ACM_IRQ_LINE_STATE:
 
@@ -217,13 +231,18 @@
 				acm->ctrlin & ACM_CTRL_FRAMING ? '+' : '-',	acm->ctrlin & ACM_CTRL_PARITY ? '+' : '-',
 				acm->ctrlin & ACM_CTRL_OVERRUN ? '+' : '-');
 
-			return;
+			break;
 
 		default:
 			dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
 				dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
-			return;
+			break;
 	}
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 static void acm_read_bulk(struct urb *urb)
@@ -511,8 +530,8 @@
 {
 	struct usb_device *dev;
 	struct acm *acm;
-	struct usb_config_descriptor *cfacm;
-	struct usb_interface_descriptor *ifcom, *ifdata;
+	struct usb_host_config *cfacm;
+	struct usb_host_interface *ifcom, *ifdata;
 	struct usb_endpoint_descriptor *epctrl, *epread, *epwrite;
 	int readsize, ctrlsize, minor, i;
 	unsigned char *buf;
@@ -524,7 +543,7 @@
 
 		dbg("probing config %d", cfacm->bConfigurationValue);
 
-		if (cfacm->bNumInterfaces != 2 ||
+		if (cfacm->desc.bNumInterfaces != 2 ||
 		    usb_interface_claimed(cfacm->interface + 0) ||
 		    usb_interface_claimed(cfacm->interface + 1))
 			continue;
@@ -532,20 +551,20 @@
 		ifcom = cfacm->interface[0].altsetting + 0;
 		ifdata = cfacm->interface[1].altsetting + 0;
 
-		if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints < 2) {
+		if (ifdata->desc.bInterfaceClass != 10 || ifdata->desc.bNumEndpoints < 2) {
 			ifcom = cfacm->interface[1].altsetting + 0;
 			ifdata = cfacm->interface[0].altsetting + 0;
-			if (ifdata->bInterfaceClass != 10 || ifdata->bNumEndpoints < 2)
+			if (ifdata->desc.bInterfaceClass != 10 || ifdata->desc.bNumEndpoints < 2)
 				continue;
 		}
 
-		if (ifcom->bInterfaceClass != 2 || ifcom->bInterfaceSubClass != 2 ||
-		    ifcom->bInterfaceProtocol != 1 || ifcom->bNumEndpoints < 1)
+		if (ifcom->desc.bInterfaceClass != 2 || ifcom->desc.bInterfaceSubClass != 2 ||
+		    ifcom->desc.bInterfaceProtocol != 1 || ifcom->desc.bNumEndpoints < 1)
 			continue;
 
-		epctrl = ifcom->endpoint + 0;
-		epread = ifdata->endpoint + 0;
-		epwrite = ifdata->endpoint + 1;
+		epctrl = &ifcom->endpoint[0].desc;
+		epread = &ifdata->endpoint[0].desc;
+		epwrite = &ifdata->endpoint[1].desc;
 
 		if ((epctrl->bEndpointAddress & 0x80) != 0x80 || (epctrl->bmAttributes & 3) != 3 ||
 		   (epread->bmAttributes & 3) != 2 || (epwrite->bmAttributes & 3) != 2 ||
@@ -553,11 +572,11 @@
 			continue;
 
 		if ((epread->bEndpointAddress & 0x80) != 0x80) {
-			epread = ifdata->endpoint + 1;
-			epwrite = ifdata->endpoint + 0;
+			epread = &ifdata->endpoint[1].desc;
+			epwrite = &ifdata->endpoint[0].desc;
 		}
 
-		usb_set_configuration(dev, cfacm->bConfigurationValue);
+		usb_set_configuration(dev, cfacm->desc.bConfigurationValue);
 
 		for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
 		if (acm_table[minor]) {
@@ -613,11 +632,11 @@
 
 		usb_fill_bulk_urb(acm->readurb, dev, usb_rcvbulkpipe(dev, epread->bEndpointAddress),
 			buf += ctrlsize, readsize, acm_read_bulk, acm);
-		acm->readurb->transfer_flags |= USB_NO_FSBR;
+		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 |= USB_NO_FSBR;
+		acm->writeurb->transfer_flags |= URB_NO_FSBR;
 
 		info("ttyACM%d: USB ACM device", minor);
 
diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c
--- a/drivers/usb/class/usb-midi.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/usb/class/usb-midi.c	Wed Oct 30 16:44:19 2002
@@ -330,7 +330,7 @@
 
 	d = ep->usbdev;
 	pipe = usb_sndbulkpipe(d, ep->endpoint);
-	FILL_BULK_URB( ep->urb, d, pipe, (unsigned char*)buf, len,
+	usb_fill_bulk_urb( ep->urb, d, pipe, (unsigned char*)buf, len,
 		       (usb_complete_t)usb_write_callback, ep );
 
 	status = usb_submit_urb(ep->urb, GFP_KERNEL);
@@ -1045,7 +1045,7 @@
 		kfree(ep);
 		return NULL;
 	}
-	FILL_BULK_URB( ep->urb, d, 
+	usb_fill_bulk_urb( ep->urb, d, 
 		       usb_rcvbulkpipe(d, endPoint),
 		       (unsigned char *)ep->recvBuf, bufSize,
 		       (usb_complete_t)usb_bulk_read, ep );
@@ -1519,7 +1519,7 @@
 static int get_alt_setting( struct usb_device *d, int ifnum )
 {
 	int alts, alt=0;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_endpoint_descriptor *ep;
 	int epin, epout;
 	int i;
@@ -1531,8 +1531,8 @@
 		epin = -1;
 		epout = -1;
 
-		for ( i=0 ; i<interface->bNumEndpoints ; i++ ) {
-			ep = &interface->endpoint[i];
+		for ( i=0 ; i<interface->desc.bNumEndpoints ; i++ ) {
+			ep = &interface->endpoint[i].desc;
 			if ( (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ) {
 				continue;
 			}
@@ -1778,8 +1778,8 @@
 
 static int detect_yamaha_device( struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
 {
-	struct usb_config_descriptor    *c = d->actconfig;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_config *c = d->actconfig;
+	struct usb_host_interface *interface;
 	struct usb_midi_device *u;
 	unsigned char buf[USB_DT_CONFIG_SIZE], *buffer;
 	int bufSize;
@@ -1794,8 +1794,8 @@
 	for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) {
 		interface = c->interface[ifnum].altsetting + i;
 
-		if ( interface->bInterfaceClass != 255 ||
-		     interface->bInterfaceSubClass != 0 )
+		if ( interface->desc.bInterfaceClass != 255 ||
+		     interface->desc.bInterfaceSubClass != 0 )
 			continue;
 		alts = i;
 	}
@@ -1817,7 +1817,7 @@
  configfound:
 
 	/* this may not be necessary. */
-	if ( usb_set_configuration( d, c->bConfigurationValue ) < 0 ) {
+	if ( usb_set_configuration( d, c->desc.bConfigurationValue ) < 0 ) {
 		printk(KERN_INFO "usb-midi: Could not set config.\n");
 		return -EINVAL;
 	}
@@ -1892,8 +1892,8 @@
  **/
 static int detect_midi_subclass(struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
 {
-	struct usb_config_descriptor    *c = d->actconfig;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_config *c = d->actconfig;
+	struct usb_host_interface *interface;
 	struct usb_midi_device *u;
 	unsigned char buf[USB_DT_CONFIG_SIZE], *buffer;
 	int bufSize;
@@ -1904,8 +1904,8 @@
 	for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) {
 		interface = c->interface[ifnum].altsetting + i;
 
-		if ( interface->bInterfaceClass != USB_CLASS_AUDIO ||
-		     interface->bInterfaceSubClass != USB_SUBCLASS_MIDISTREAMING )
+		if ( interface->desc.bInterfaceClass != USB_CLASS_AUDIO ||
+		     interface->desc.bInterfaceSubClass != USB_SUBCLASS_MIDISTREAMING )
 			continue;
 		alts = i;
 	}
@@ -1927,7 +1927,7 @@
  configfound:
 
 	/* this may not be necessary. */
-	if ( usb_set_configuration( d, c->bConfigurationValue ) < 0 ) {
+	if ( usb_set_configuration( d, c->desc.bConfigurationValue ) < 0 ) {
 		printk(KERN_INFO "usb-midi: Could not set config.\n");
 		return -EINVAL;
 	}
@@ -2025,7 +2025,7 @@
 {
 	struct usb_midi_state *s;
 	struct usb_device *dev = interface_to_usbdev(intf);
-	int ifnum = intf->altsetting->bInterfaceNumber;
+	int ifnum = intf->altsetting->desc.bInterfaceNumber;
 
 	s = (struct usb_midi_state *)kmalloc(sizeof(struct usb_midi_state), GFP_KERNEL);
 	if ( !s )
diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/usb/class/usblp.c	Wed Oct 30 16:44:24 2002
@@ -814,7 +814,7 @@
 	usblp->dev = dev;
 	init_MUTEX (&usblp->sem);
 	init_waitqueue_head(&usblp->wait);
-	usblp->ifnum = intf->altsetting->bInterfaceNumber;
+	usblp->ifnum = intf->altsetting->desc.bInterfaceNumber;
 
 	retval = usb_register_dev(&usblp_fops, USBLP_MINOR_BASE, 1, &usblp->minor);
 	if (retval) {
@@ -931,7 +931,7 @@
 static int usblp_select_alts(struct usblp *usblp)
 {
 	struct usb_interface *if_alt;
-	struct usb_interface_descriptor *ifd;
+	struct usb_host_interface *ifd;
 	struct usb_endpoint_descriptor *epd, *epwrite, *epread;
 	int p, i, e;
 
@@ -944,17 +944,17 @@
 	for (i = 0; i < if_alt->num_altsetting; i++) {
 		ifd = &if_alt->altsetting[i];
 
-		if (ifd->bInterfaceClass != 7 || ifd->bInterfaceSubClass != 1)
+		if (ifd->desc.bInterfaceClass != 7 || ifd->desc.bInterfaceSubClass != 1)
 			continue;
 
-		if (ifd->bInterfaceProtocol < USBLP_FIRST_PROTOCOL ||
-		    ifd->bInterfaceProtocol > USBLP_LAST_PROTOCOL)
+		if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL ||
+		    ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL)
 			continue;
 
 		/* Look for bulk OUT and IN endpoints. */
 		epwrite = epread = 0;
-		for (e = 0; e < ifd->bNumEndpoints; e++) {
-			epd = &ifd->endpoint[e];
+		for (e = 0; e < ifd->desc.bNumEndpoints; e++) {
+			epd = &ifd->endpoint[e].desc;
 
 			if ((epd->bmAttributes&USB_ENDPOINT_XFERTYPE_MASK)!=
 			    USB_ENDPOINT_XFER_BULK)
@@ -969,12 +969,12 @@
 		}
 
 		/* Ignore buggy hardware without the right endpoints. */
-		if (!epwrite || (ifd->bInterfaceProtocol > 1 && !epread))
+		if (!epwrite || (ifd->desc.bInterfaceProtocol > 1 && !epread))
 			continue;
 
 		/* Turn off reads for 7/1/1 (unidirectional) interfaces
 		 * and buggy bidirectional printers. */
-		if (ifd->bInterfaceProtocol == 1) {
+		if (ifd->desc.bInterfaceProtocol == 1) {
 			epread = NULL;
 		} else if (usblp->quirks & USBLP_QUIRK_BIDIR) {
 			info("Disabling reads from problem bidirectional "
@@ -982,9 +982,9 @@
 			epread = NULL;
 		}
 
-		usblp->protocol[ifd->bInterfaceProtocol].alt_setting = i;
-		usblp->protocol[ifd->bInterfaceProtocol].epwrite = epwrite;
-		usblp->protocol[ifd->bInterfaceProtocol].epread = epread;
+		usblp->protocol[ifd->desc.bInterfaceProtocol].alt_setting = i;
+		usblp->protocol[ifd->desc.bInterfaceProtocol].epwrite = epwrite;
+		usblp->protocol[ifd->desc.bInterfaceProtocol].epread = epread;
 	}
 
 	/* If our requested protocol is supported, then use it. */
@@ -1018,7 +1018,7 @@
 		return r;
 	}
 
-	FILL_BULK_URB(usblp->writeurb, usblp->dev,
+	usb_fill_bulk_urb(usblp->writeurb, usblp->dev,
 		usb_sndbulkpipe(usblp->dev,
 		 usblp->protocol[protocol].epwrite->bEndpointAddress),
 		usblp->buf, 0,
@@ -1026,7 +1026,7 @@
 
 	usblp->bidir = (usblp->protocol[protocol].epread != 0);
 	if (usblp->bidir)
-		FILL_BULK_URB(usblp->readurb, usblp->dev,
+		usb_fill_bulk_urb(usblp->readurb, usblp->dev,
 			usb_rcvbulkpipe(usblp->dev,
 			 usblp->protocol[protocol].epread->bEndpointAddress),
 			usblp->buf + USBLP_BUF_SIZE, USBLP_BUF_SIZE,
diff -Nru a/drivers/usb/core/Config.in b/drivers/usb/core/Config.in
--- a/drivers/usb/core/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,11 +0,0 @@
-#
-# USB Core configuration
-#
-bool '  USB verbose debug messages' CONFIG_USB_DEBUG
-
-comment 'Miscellaneous USB options'
-    bool '  USB device filesystem' CONFIG_USB_DEVICEFS
-    bool '  Long timeout for slow-responding devices (some MGE Ellipse UPSes)' CONFIG_USB_LONG_TIMEOUT
-dep_bool '  Enforce USB bandwidth allocation (EXPERIMENTAL)' CONFIG_USB_BANDWIDTH $CONFIG_EXPERIMENTAL
-dep_bool '  Dynamic USB minor allocation (EXPERIMENTAL)' CONFIG_USB_DYNAMIC_MINORS $CONFIG_EXPERIMENTAL
-
diff -Nru a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/core/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,76 @@
+#
+# USB Core configuration
+#
+config USB_DEBUG
+	bool "USB verbose debug messages"
+	depends on USB
+	help
+	  Say Y here if you want the USB core & hub drivers to produce a bunch
+	  of debug messages to the system log. Select this if you are having a
+	  problem with USB support and want to see more of what is going on.
+
+comment "Miscellaneous USB options"
+	depends on USB
+
+config USB_DEVICEFS
+	bool "USB device filesystem"
+	depends on USB
+	---help---
+	  If you say Y here (and to "/proc file system support" in the "File
+	  systems" section, above), you will get a file /proc/bus/usb/devices
+	  which lists the devices currently connected to your USB bus or
+	  busses, a file /proc/bus/usb/drivers which lists the USB kernel
+	  client drivers currently loaded, and for every connected device a
+	  file named  "/proc/bus/usb/xxx/yyy", where xxx is the bus number and
+	  yyy the device number; the latter files can be used by user space
+	  programs to talk directly to the device. These files are "virtual",
+	  meaning they are generated on the fly and not stored on the hard
+	  drive.
+
+	  You may need to mount the usbfs file system to see the files, use
+	  mount -t usbfs none /proc/bus/usb
+
+	  For the format of the various /proc/bus/usb/ files, please read
+	  <file:Documentation/usb/proc_usb_info.txt>.
+
+	  Please note that this code is completely unrelated to devfs, the
+	  "/dev file system support".
+
+	  Most users want to say Y here.
+
+config USB_LONG_TIMEOUT
+	bool "Long timeout for slow-responding devices (some MGE Ellipse UPSes)"
+	depends on USB
+	help
+	  This option makes the standard time out a bit longer.  Basically,
+	  some devices are just slow to respond, so this makes usb more
+	  patient.  There should be no harm in selecting this, but it is
+	  needed for some MGE Ellipse UPSes.
+
+	  If you have an MGE Ellipse UPS, or you see timeouts in HID
+	  transactions, say Y; otherwise say N.
+
+config USB_BANDWIDTH
+	bool "Enforce USB bandwidth allocation (EXPERIMENTAL)"
+	depends on USB && EXPERIMENTAL
+	help
+	  If you say Y here, the USB subsystem enforces USB bandwidth
+	  allocation and will prevent some device opens from succeeding
+	  if they would cause USB bandwidth usage to go above 90% of
+	  the bus bandwidth.
+
+	  If you say N here, these conditions will cause warning messages
+	  about USB bandwidth usage to be logged and some devices or
+	  drivers may not work correctly.
+
+config USB_DYNAMIC_MINORS
+	bool "Dynamic USB minor allocation (EXPERIMENTAL)"
+	depends on USB && EXPERIMENTAL
+	help
+	  If you say Y here, the USB subsystem will use dynamic minor
+	  allocation for any device that uses the USB major number.
+	  This means that you can have more than 16 of a single type
+	  of device (like USB printers).
+
+	  If you are unsure about this, say N here.
+
diff -Nru a/drivers/usb/core/config.c b/drivers/usb/core/config.c
--- a/drivers/usb/core/config.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/usb/core/config.c	Wed Oct 30 16:44:19 2002
@@ -4,7 +4,16 @@
 #include <linux/slab.h>
 #include <asm/byteorder.h>
 
-static int usb_parse_endpoint(struct usb_endpoint_descriptor *endpoint, unsigned char *buffer, int size)
+
+#define USB_MAXALTSETTING		128	/* Hard limit */
+#define USB_MAXENDPOINTS		30	/* Hard limit */
+
+/* these maximums are arbitrary */
+#define USB_MAXCONFIG			8
+#define USB_ALTSETTINGALLOC		4
+#define USB_MAXINTERFACES		32
+
+static int usb_parse_endpoint(struct usb_host_endpoint *endpoint, unsigned char *buffer, int size)
 {
 	struct usb_descriptor_header *header;
 	unsigned char *begin;
@@ -20,17 +29,17 @@
 	}
 		
 	if (header->bDescriptorType != USB_DT_ENDPOINT) {
-		warn("unexpected descriptor 0x%X, expecting endpoint descriptor, type 0x%X",
-			endpoint->bDescriptorType, USB_DT_ENDPOINT);
+		warn("unexpected descriptor 0x%X, expecting endpoint, 0x%X",
+			header->bDescriptorType, USB_DT_ENDPOINT);
 		return parsed;
 	}
 
 	if (header->bLength == USB_DT_ENDPOINT_AUDIO_SIZE)
-		memcpy(endpoint, buffer, USB_DT_ENDPOINT_AUDIO_SIZE);
+		memcpy(&endpoint->desc, buffer, USB_DT_ENDPOINT_AUDIO_SIZE);
 	else
-		memcpy(endpoint, buffer, USB_DT_ENDPOINT_SIZE);
+		memcpy(&endpoint->desc, buffer, USB_DT_ENDPOINT_SIZE);
 	
-	le16_to_cpus(&endpoint->wMaxPacketSize);
+	le16_to_cpus(&endpoint->desc.wMaxPacketSize);
 
 	buffer += header->bLength;
 	size -= header->bLength;
@@ -93,7 +102,7 @@
 {
 	int i, len, numskipped, retval, parsed = 0;
 	struct usb_descriptor_header *header;
-	struct usb_interface_descriptor *ifp;
+	struct usb_host_interface *ifp;
 	unsigned char *begin;
 
 	interface->act_altsetting = 0;
@@ -108,6 +117,8 @@
 	}
 
 	while (size > 0) {
+		struct usb_interface_descriptor	*d;
+
 		if (interface->num_altsetting >= interface->max_altsetting) {
 			void *ptr;
 			int oldmas;
@@ -141,9 +152,9 @@
 		memcpy(ifp, buffer, USB_DT_INTERFACE_SIZE);
 
 		/* Skip over the interface */
-		buffer += ifp->bLength;
-		parsed += ifp->bLength;
-		size -= ifp->bLength;
+		buffer += ifp->desc.bLength;
+		parsed += ifp->desc.bLength;
+		size -= ifp->desc.bLength;
 
 		begin = buffer;
 		numskipped = 0;
@@ -196,23 +207,23 @@
 		     (header->bDescriptorType == USB_DT_DEVICE)))
 			return parsed;
 
-		if (ifp->bNumEndpoints > USB_MAXENDPOINTS) {
+		if (ifp->desc.bNumEndpoints > USB_MAXENDPOINTS) {
 			warn("too many endpoints");
 			return -1;
 		}
 
-		ifp->endpoint = (struct usb_endpoint_descriptor *)
-			kmalloc(ifp->bNumEndpoints *
-			sizeof(struct usb_endpoint_descriptor), GFP_KERNEL);
+		ifp->endpoint = (struct usb_host_endpoint *)
+			kmalloc(ifp->desc.bNumEndpoints *
+			sizeof(struct usb_host_endpoint), GFP_KERNEL);
 		if (!ifp->endpoint) {
 			err("out of memory");
 			return -1;	
 		}
 
-		memset(ifp->endpoint, 0, ifp->bNumEndpoints *
-			sizeof(struct usb_endpoint_descriptor));
+		memset(ifp->endpoint, 0, ifp->desc.bNumEndpoints *
+			sizeof(struct usb_host_endpoint));
 	
-		for (i = 0; i < ifp->bNumEndpoints; i++) {
+		for (i = 0; i < ifp->desc.bNumEndpoints; i++) {
 			header = (struct usb_descriptor_header *)buffer;
 
 			if (header->bLength > size) {
@@ -230,49 +241,49 @@
 		}
 
 		/* We check to see if it's an alternate to this one */
-		ifp = (struct usb_interface_descriptor *)buffer;
-		if (size < USB_DT_INTERFACE_SIZE ||
-		    ifp->bDescriptorType != USB_DT_INTERFACE ||
-		    !ifp->bAlternateSetting)
+		d = (struct usb_interface_descriptor *)buffer;
+		if (size < USB_DT_INTERFACE_SIZE
+				|| d->bDescriptorType != USB_DT_INTERFACE
+				|| !d->bAlternateSetting)
 			return parsed;
 	}
 
 	return parsed;
 }
 
-int usb_parse_configuration(struct usb_config_descriptor *config, char *buffer)
+int usb_parse_configuration(struct usb_host_config *config, char *buffer)
 {
 	int i, retval, size;
 	struct usb_descriptor_header *header;
 
-	memcpy(config, buffer, USB_DT_CONFIG_SIZE);
-	le16_to_cpus(&config->wTotalLength);
-	size = config->wTotalLength;
+	memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE);
+	le16_to_cpus(&config->desc.wTotalLength);
+	size = config->desc.wTotalLength;
 
-	if (config->bNumInterfaces > USB_MAXINTERFACES) {
+	if (config->desc.bNumInterfaces > USB_MAXINTERFACES) {
 		warn("too many interfaces");
 		return -1;
 	}
 
 	config->interface = (struct usb_interface *)
-		kmalloc(config->bNumInterfaces *
+		kmalloc(config->desc.bNumInterfaces *
 		sizeof(struct usb_interface), GFP_KERNEL);
-	dbg("kmalloc IF %p, numif %i", config->interface, config->bNumInterfaces);
+	dbg("kmalloc IF %p, numif %i", config->interface, config->desc.bNumInterfaces);
 	if (!config->interface) {
 		err("out of memory");
 		return -1;	
 	}
 
 	memset(config->interface, 0,
-	       config->bNumInterfaces * sizeof(struct usb_interface));
+	       config->desc.bNumInterfaces * sizeof(struct usb_interface));
 
-	buffer += config->bLength;
-	size -= config->bLength;
+	buffer += config->desc.bLength;
+	size -= config->desc.bLength;
 	
 	config->extra = NULL;
 	config->extralen = 0;
 
-	for (i = 0; i < config->bNumInterfaces; i++) {
+	for (i = 0; i < config->desc.bNumInterfaces; i++) {
 		int numskipped, len;
 		char *begin;
 
@@ -351,12 +362,12 @@
 	}
 
 	for (c = 0; c < dev->descriptor.bNumConfigurations; c++) {
-		struct usb_config_descriptor *cf = &dev->config[c];
+		struct usb_host_config *cf = &dev->config[c];
 
 		if (!cf->interface)
 			break;
 
-		for (i = 0; i < cf->bNumInterfaces; i++) {
+		for (i = 0; i < cf->desc.bNumInterfaces; i++) {
 			struct usb_interface *ifp =
 				&cf->interface[i];
 				
@@ -364,7 +375,7 @@
 				break;
 
 			for (j = 0; j < ifp->num_altsetting; j++) {
-				struct usb_interface_descriptor *as =
+				struct usb_host_interface *as =
 					&ifp->altsetting[j];
 					
 				if(as->extra) {
@@ -374,7 +385,7 @@
 				if (!as->endpoint)
 					break;
 					
-				for(k = 0; k < as->bNumEndpoints; k++) {
+				for(k = 0; k < as->desc.bNumEndpoints; k++) {
 					if(as->endpoint[k].extra) {
 						kfree(as->endpoint[k].extra);
 					}
@@ -410,15 +421,15 @@
 		return -EINVAL;
 	}
 
-	dev->config = (struct usb_config_descriptor *)
+	dev->config = (struct usb_host_config *)
 		kmalloc(dev->descriptor.bNumConfigurations *
-		sizeof(struct usb_config_descriptor), GFP_KERNEL);
+		sizeof(struct usb_host_config), GFP_KERNEL);
 	if (!dev->config) {
 		err("out of memory");
 		return -ENOMEM;	
 	}
 	memset(dev->config, 0, dev->descriptor.bNumConfigurations *
-		sizeof(struct usb_config_descriptor));
+		sizeof(struct usb_host_config));
 
 	dev->rawdescriptors = (char **)kmalloc(sizeof(char *) *
 		dev->descriptor.bNumConfigurations, GFP_KERNEL);
diff -Nru a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
--- a/drivers/usb/core/devices.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/core/devices.c	Wed Oct 30 16:44:28 2002
@@ -234,7 +234,7 @@
 
 static char *usb_dump_interface_descriptor(char *start, char *end, const struct usb_interface *iface, int setno)
 {
-	struct usb_interface_descriptor *desc = &iface->altsetting[setno];
+	struct usb_interface_descriptor *desc = &iface->altsetting[setno].desc;
 
 	if (start > end)
 		return start;
@@ -259,15 +259,15 @@
 	const struct usb_interface *iface,
 	int setno
 ) {
-	struct usb_interface_descriptor *desc = &iface->altsetting[setno];
+	struct usb_host_interface *desc = &iface->altsetting[setno];
 	int i;
 
 	start = usb_dump_interface_descriptor(start, end, iface, setno);
-	for (i = 0; i < desc->bNumEndpoints; i++) {
+	for (i = 0; i < desc->desc.bNumEndpoints; i++) {
 		if (start > end)
 			return start;
 		start = usb_dump_endpoint_descriptor(speed,
-				start, end, desc->endpoint + i);
+				start, end, &desc->endpoint[i].desc);
 	}
 	return start;
 }
@@ -288,7 +288,7 @@
 			 desc->bNumInterfaces,
 			 desc->bConfigurationValue,
 			 desc->bmAttributes,
-			 desc->MaxPower * 2);
+			 desc->bMaxPower * 2);
 	return start;
 }
 
@@ -296,7 +296,7 @@
 	int speed,
 	char *start,
 	char *end,
-	const struct usb_config_descriptor *config,
+	const struct usb_host_config *config,
 	int active
 )
 {
@@ -307,8 +307,8 @@
 		return start;
 	if (!config)		/* getting these some in 2.3.7; none in 2.3.6 */
 		return start + sprintf(start, "(null Cfg. desc.)\n");
-	start = usb_dump_config_descriptor(start, end, config, active);
-	for (i = 0; i < config->bNumInterfaces; i++) {
+	start = usb_dump_config_descriptor(start, end, &config->desc, active);
+	for (i = 0; i < config->desc.bNumInterfaces; i++) {
 		interface = config->interface + i;
 		if (!interface)
 			break;
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/core/devio.c	Wed Oct 30 16:44:28 2002
@@ -337,7 +337,8 @@
 	struct usb_interface *iface;
 	int err;
 
-	if (intf >= 8*sizeof(ps->ifclaimed) || !dev || intf >= dev->actconfig->bNumInterfaces)
+	if (intf >= 8*sizeof(ps->ifclaimed) || !dev
+			|| intf >= dev->actconfig->desc.bNumInterfaces)
 		return -EINVAL;
 	/* already claimed */
 	if (test_bit(intf, &ps->ifclaimed))
@@ -390,17 +391,17 @@
 {
 	unsigned int i, j, e;
         struct usb_interface *iface;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_interface *alts;
 	struct usb_endpoint_descriptor *endpt;
 
 	if (ep & ~(USB_DIR_IN|0xf))
 		return -EINVAL;
-	for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
+	for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 		iface = &dev->actconfig->interface[i];
 		for (j = 0; j < iface->num_altsetting; j++) {
                         alts = &iface->altsetting[j];
-			for (e = 0; e < alts->bNumEndpoints; e++) {
-				endpt = &alts->endpoint[e];
+			for (e = 0; e < alts->desc.bNumEndpoints; e++) {
+				endpt = &alts->endpoint[e].desc;
 				if (endpt->bEndpointAddress == ep)
 					return i;
 			}
@@ -413,15 +414,15 @@
 {
 	unsigned int i, j;
         struct usb_interface *iface;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_interface *alts;
 
 	if (ifn & ~0xff)
 		return -EINVAL;
-	for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
+	for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 		iface = &dev->actconfig->interface[i];
 		for (j = 0; j < iface->num_altsetting; j++) {
                         alts = &iface->altsetting[j];
-			if (alts->bInterfaceNumber == ifn)
+			if (alts->desc.bInterfaceNumber == ifn)
 				return i;
 		}
 	}
@@ -693,7 +694,7 @@
 	if (ret < 0)
 		return ret;
 
-	for (i = 0; i < ps->dev->actconfig->bNumInterfaces; i++) {
+	for (i = 0; i < ps->dev->actconfig->desc.bNumInterfaces; i++) {
 		struct usb_interface *intf = &ps->dev->actconfig->interface[i];
 
 		/* Don't simulate interfaces we've claimed */
@@ -755,7 +756,7 @@
 	if (copy_from_user(&uurb, arg, sizeof(uurb)))
 		return -EFAULT;
 	if (uurb.flags & ~(USBDEVFS_URB_ISO_ASAP|USBDEVFS_URB_SHORT_NOT_OK|
-			   USB_NO_FSBR|USB_ZERO_PACKET))
+			   URB_NO_FSBR|URB_ZERO_PACKET))
 		return -EINVAL;
 	if (!uurb.buffer)
 		return -EINVAL;
diff -Nru a/drivers/usb/core/driverfs.c b/drivers/usb/core/driverfs.c
--- a/drivers/usb/core/driverfs.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/core/driverfs.c	Wed Oct 30 16:44:26 2002
@@ -33,14 +33,14 @@
 		return 0;						\
 									\
 	udev = to_usb_device (dev);					\
-	return sprintf (buf, format_string, udev->actconfig->field);	\
+	return sprintf (buf, format_string, udev->actconfig->desc.field); \
 }									\
 static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
 
 usb_actconfig_attr (bNumInterfaces, "%2d\n")
 usb_actconfig_attr (bConfigurationValue, "%2d\n")
 usb_actconfig_attr (bmAttributes, "%2x\n")
-usb_actconfig_attr (MaxPower, "%3dmA\n")
+usb_actconfig_attr (bMaxPower, "%3dmA\n")
 
 /* String fields */
 static ssize_t show_product (struct device *dev, char *buf, size_t count, loff_t off)
@@ -157,7 +157,7 @@
 	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_MaxPower);
+	device_create_file (dev, &dev_attr_bMaxPower);
 	device_create_file (dev, &dev_attr_idVendor);
 	device_create_file (dev, &dev_attr_idProduct);
 	device_create_file (dev, &dev_attr_bcdDevice);
@@ -188,7 +188,7 @@
 	intf = to_usb_interface (dev);					\
 	alt = intf->act_altsetting;					\
 									\
-	return sprintf (buf, format_string, intf->altsetting[alt].field);	\
+	return sprintf (buf, format_string, intf->altsetting[alt].desc.field); \
 }									\
 static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
 
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/core/hcd.c	Wed Oct 30 16:44:29 2002
@@ -495,25 +495,17 @@
 			if (length > 0) {
 				urb->actual_length = length;
 				urb->status = 0;
+				urb->hcpriv = 0;
 				urb->complete (urb);
+				return;
 			}
-			spin_lock_irqsave (&hcd_data_lock, flags);
-			urb->status = -EINPROGRESS;
-			if (HCD_IS_RUNNING (hcd->state)
-					&& rh_status_urb (hcd, urb) != 0) {
-				/* another driver snuck in? */
-				dbg ("%s, can't resubmit roothub status urb?",
-					hcd->self.bus_name);
-				spin_unlock_irqrestore (&hcd_data_lock, flags);
-				BUG ();
-			}
-			spin_unlock_irqrestore (&hcd_data_lock, flags);
-		} else {
+		} else
 			spin_unlock_irqrestore (&urb->lock, flags);
-			spin_lock_irqsave (&hcd_data_lock, flags);
-			rh_status_urb (hcd, urb);
-			spin_unlock_irqrestore (&hcd_data_lock, flags);
-		}
+
+		/* retrigger timer until completion:  success or unlink */
+		spin_lock_irqsave (&hcd_data_lock, flags);
+		rh_status_urb (hcd, urb);
+		spin_unlock_irqrestore (&hcd_data_lock, flags);
 	} else {
 		/* this urb's been unlinked */
 		urb->hcpriv = 0;
@@ -967,7 +959,6 @@
 	spin_lock_irqsave (&hcd_data_lock, flags);
 	list_del_init (&urb->urb_list);
 	dev = urb->dev;
-	urb->dev = NULL;
 	usb_put_dev (dev);
 	spin_unlock_irqrestore (&hcd_data_lock, flags);
 }
@@ -1119,7 +1110,7 @@
 	 */
 	spin_lock_irqsave (&urb->lock, flags);
 	spin_lock (&hcd_data_lock);
-	if (!urb->hcpriv || urb->transfer_flags & USB_TIMEOUT_KILLED) {
+	if (!urb->hcpriv || urb->transfer_flags & URB_TIMEOUT_KILLED) {
 		retval = -EINVAL;
 		goto done;
 	}
@@ -1155,10 +1146,13 @@
 		goto done;
 	}
 
-	/* maybe set up to block on completion notification */
-	if ((urb->transfer_flags & USB_TIMEOUT_KILLED))
+	/* maybe set up to block until the urb's completion fires.  the
+	 * lower level hcd code is always async, locking on urb->status
+	 * updates; an intercepted completion unblocks us.
+	 */
+	if ((urb->transfer_flags & URB_TIMEOUT_KILLED))
 		urb->status = -ETIMEDOUT;
-	else if (!(urb->transfer_flags & USB_ASYNC_UNLINK)) {
+	else if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
 		if (in_interrupt ()) {
 			dbg ("non-async unlink in_interrupt");
 			retval = -EWOULDBLOCK;
@@ -1188,13 +1182,13 @@
 	}
 
     	/* block till giveback, if needed */
-	if (!(urb->transfer_flags & (USB_ASYNC_UNLINK|USB_TIMEOUT_KILLED))
+	if (!(urb->transfer_flags & (URB_ASYNC_UNLINK|URB_TIMEOUT_KILLED))
 			&& HCD_IS_RUNNING (hcd->state)
 			&& !retval) {
 		dbg ("%s: wait for giveback urb %p",
 			hcd->self.bus_name, urb);
 		wait_for_completion (&splice.done);
-	} else if ((urb->transfer_flags & USB_ASYNC_UNLINK) && retval == 0) {
+	} else if ((urb->transfer_flags & URB_ASYNC_UNLINK) && retval == 0) {
 		return -EINPROGRESS;
 	}
 	goto bye;
@@ -1290,11 +1284,6 @@
  * (and is done using urb->hcpriv).  It also released all HCD locks;
  * the device driver won't cause problems if it frees, modifies,
  * or resubmits this URB.
- * Bandwidth and other resources will be deallocated.
- *
- * HCDs must not use this for periodic URBs that are still scheduled
- * and will be reissued.  They should just call their completion handlers
- * until the urb is returned to the device driver by unlinking.
  */
 void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb)
 {
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/core/hub.c	Wed Oct 30 16:44:28 2002
@@ -119,6 +119,7 @@
 {
 	struct usb_hub *hub = (struct usb_hub *)urb->context;
 	unsigned long flags;
+	int status;
 
 	switch (urb->status) {
 	case -ENOENT:		/* synchronous unlink */
@@ -131,7 +132,7 @@
 		dbg("hub '%s' status %d for interrupt transfer",
 			urb->dev->devpath, urb->status);
 		if ((++hub->nerrors < 10) || hub->error)
-			return;
+			goto resubmit;
 		hub->error = urb->status;
 		/* FALL THROUGH */
 	
@@ -149,6 +150,12 @@
 		wake_up(&khubd_wait);
 	}
 	spin_unlock_irqrestore(&hub_event_lock, flags);
+
+resubmit:
+	if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0)
+		err ("hub '%s-%s' status %d for interrupt resubmit",
+			urb->dev->bus->bus_name, urb->dev->devpath,
+			status);
 }
 
 /* USB 2.0 spec Section 11.24.2.3 */
@@ -411,7 +418,7 @@
 		return -1;
 	}
 
-	FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
+	usb_fill_int_urb(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
 		hub, endpoint->bInterval);
 	ret = usb_submit_urb(hub->urb, GFP_KERNEL);
 	if (ret) {
@@ -471,7 +478,7 @@
 
 static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
-	struct usb_interface_descriptor *desc;
+	struct usb_host_interface *desc;
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_device *dev;
 	struct usb_hub *hub;
@@ -482,21 +489,21 @@
 
 	/* Some hubs have a subclass of 1, which AFAICT according to the */
 	/*  specs is not defined, but it works */
-	if ((desc->bInterfaceSubClass != 0) &&
-	    (desc->bInterfaceSubClass != 1)) {
+	if ((desc->desc.bInterfaceSubClass != 0) &&
+	    (desc->desc.bInterfaceSubClass != 1)) {
 		err("invalid subclass (%d) for USB hub device #%d",
-			desc->bInterfaceSubClass, dev->devnum);
+			desc->desc.bInterfaceSubClass, dev->devnum);
 		return -EIO;
 	}
 
 	/* Multiple endpoints? What kind of mutant ninja-hub is this? */
-	if (desc->bNumEndpoints != 1) {
+	if (desc->desc.bNumEndpoints != 1) {
 		err("invalid bNumEndpoints (%d) for USB hub device #%d",
-			desc->bNumEndpoints, dev->devnum);
+			desc->desc.bNumEndpoints, dev->devnum);
 		return -EIO;
 	}
 
-	endpoint = &desc->endpoint[0];
+	endpoint = &desc->endpoint[0].desc;
 
 	/* Output endpoint? Curiousier and curiousier.. */
 	if (!(endpoint->bEndpointAddress & USB_DIR_IN)) {
@@ -1237,18 +1244,18 @@
 		return 1;
 	}
 
-	ret = usb_set_configuration(dev, dev->actconfig->bConfigurationValue);
+	ret = usb_set_configuration(dev, dev->actconfig->desc.bConfigurationValue);
 	if (ret < 0) {
 		err("failed to set dev %s active configuration (error=%d)",
 			dev->devpath, ret);
 		return ret;
 	}
 
-	for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
+	for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 		struct usb_interface *intf = &dev->actconfig->interface[i];
 		struct usb_interface_descriptor *as;
 
-		as = &intf->altsetting[intf->act_altsetting];
+		as = &intf->altsetting[intf->act_altsetting].desc;
 		ret = usb_set_interface(dev, as->bInterfaceNumber,
 			as->bAlternateSetting);
 		if (ret < 0) {
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/core/message.c	Wed Oct 30 16:44:26 2002
@@ -92,7 +92,7 @@
 	if (!urb)
 		return -ENOMEM;
   
-	FILL_CONTROL_URB(urb, usb_dev, pipe, (unsigned char*)cmd, data, len,
+	usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char*)cmd, data, len,
 		   usb_api_blocking_completion, 0);
 
 	retv = usb_start_wait_urb(urb, timeout, &length);
@@ -190,7 +190,7 @@
 	if (!urb)
 		return -ENOMEM;
 
-	FILL_BULK_URB(urb, usb_dev, pipe, data, len,
+	usb_fill_bulk_urb(urb, usb_dev, pipe, data, len,
 		    usb_api_blocking_completion, 0);
 
 	return usb_start_wait_urb(urb,timeout,actual_length);
@@ -287,12 +287,6 @@
  *
  * The request may be canceled with usb_sg_cancel(), either before or after
  * usb_sg_wait() is called.
- *
- * NOTE:
- *
- * At this writing, don't use the interrupt transfer mode, since the old old
- * "automagic resubmit" mode hasn't yet been removed.  It should be removed
- * by the time 2.5 finalizes.
  */
 int usb_sg_init (
 	struct usb_sg_request	*io,
@@ -330,7 +324,7 @@
 	if (!io->urbs)
 		goto nomem;
 
-	urb_flags = USB_ASYNC_UNLINK | URB_NO_DMA_MAP | URB_NO_INTERRUPT;
+	urb_flags = URB_ASYNC_UNLINK | URB_NO_DMA_MAP | URB_NO_INTERRUPT;
 	if (usb_pipein (pipe))
 		urb_flags |= URB_SHORT_NOT_OK;
 
@@ -646,31 +640,33 @@
 
 
 // hub-only!! ... and only exported for reset/reinit path.
-// otherwise used internally, for config/altsetting reconfig.
+// otherwise used internally, when setting up a config
 void usb_set_maxpacket(struct usb_device *dev)
 {
 	int i, b;
 
-	for (i=0; i<dev->actconfig->bNumInterfaces; i++) {
+	for (i=0; i<dev->actconfig->desc.bNumInterfaces; i++) {
 		struct usb_interface *ifp = dev->actconfig->interface + i;
-		struct usb_interface_descriptor *as = ifp->altsetting + ifp->act_altsetting;
-		struct usb_endpoint_descriptor *ep = as->endpoint;
+		struct usb_host_interface *as = ifp->altsetting + ifp->act_altsetting;
+		struct usb_host_endpoint *ep = as->endpoint;
 		int e;
 
-		for (e=0; e<as->bNumEndpoints; e++) {
-			b = ep[e].bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-			if ((ep[e].bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
+		for (e=0; e<as->desc.bNumEndpoints; e++) {
+			struct usb_endpoint_descriptor	*d;
+			d = &ep [e].desc;
+			b = d->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+			if ((d->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
 				USB_ENDPOINT_XFER_CONTROL) {	/* Control => bidirectional */
-				dev->epmaxpacketout[b] = ep[e].wMaxPacketSize;
-				dev->epmaxpacketin [b] = ep[e].wMaxPacketSize;
+				dev->epmaxpacketout[b] = d->wMaxPacketSize;
+				dev->epmaxpacketin [b] = d->wMaxPacketSize;
 				}
-			else if (usb_endpoint_out(ep[e].bEndpointAddress)) {
-				if (ep[e].wMaxPacketSize > dev->epmaxpacketout[b])
-					dev->epmaxpacketout[b] = ep[e].wMaxPacketSize;
+			else if (usb_endpoint_out(d->bEndpointAddress)) {
+				if (d->wMaxPacketSize > dev->epmaxpacketout[b])
+					dev->epmaxpacketout[b] = d->wMaxPacketSize;
 			}
 			else {
-				if (ep[e].wMaxPacketSize > dev->epmaxpacketin [b])
-					dev->epmaxpacketin [b] = ep[e].wMaxPacketSize;
+				if (d->wMaxPacketSize > dev->epmaxpacketin [b])
+					dev->epmaxpacketin [b] = d->wMaxPacketSize;
 			}
 		}
 	}
@@ -686,8 +682,9 @@
  * as reported by URB completion status.  Endpoints that are halted are
  * sometimes referred to as being "stalled".  Such endpoints are unable
  * to transmit or receive data until the halt status is cleared.  Any URBs
- * queued queued for such an endpoint should normally be unlinked before
- * clearing the halt condition.
+ * queued for such an endpoint should normally be unlinked by the driver
+ * before clearing the halt condition, as described in sections 5.7.5
+ * and 5.8.5 of the USB 2.0 spec.
  *
  * Note that control and isochronous endpoints don't halt, although control
  * endpoints report "protocol stall" (for unsupported requests) using the
@@ -701,48 +698,34 @@
 int usb_clear_halt(struct usb_device *dev, int pipe)
 {
 	int result;
-	__u16 status;
-	unsigned char *buffer;
-	int endp=usb_pipeendpoint(pipe)|(usb_pipein(pipe)<<7);
-
-/*
-	if (!usb_endpoint_halted(dev, endp & 0x0f, usb_endpoint_out(endp)))
-		return 0;
-*/
+	int endp = usb_pipeendpoint(pipe);
+	
+	if (usb_pipein (pipe))
+		endp |= USB_DIR_IN;
 
+	/* we don't care if it wasn't halted first. in fact some devices
+	 * (like some ibmcam model 1 units) seem to expect hosts to make
+	 * this request for iso endpoints, which can't halt!
+	 */
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 		USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0, endp, NULL, 0,
 		HZ * USB_CTRL_SET_TIMEOUT);
 
-	/* don't clear if failed */
+	/* don't un-halt or force to DATA0 except on success */
 	if (result < 0)
 		return result;
 
-	buffer = kmalloc(sizeof(status), GFP_KERNEL);
-	if (!buffer) {
-		err("unable to allocate memory for configuration descriptors");
-		return -ENOMEM;
-	}
-
-	result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
-		USB_REQ_GET_STATUS, USB_DIR_IN | USB_RECIP_ENDPOINT, 0, endp,
-		// FIXME USB_CTRL_GET_TIMEOUT, yes?  why not usb_get_status() ?
-		buffer, sizeof(status), HZ * USB_CTRL_SET_TIMEOUT);
-
-	memcpy(&status, buffer, sizeof(status));
-	kfree(buffer);
-
-	if (result < 0)
-		return result;
-
-	if (le16_to_cpu(status) & 1)
-		return -EPIPE;		/* still halted */
-
-	usb_endpoint_running(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
-
-	/* toggle is reset on clear */
+	/* NOTE:  seems like Microsoft and Apple don't bother verifying
+	 * the clear "took", so some devices could lock up if you check...
+	 * such as the Hagiwara FlashGate DUAL.  So we won't bother.
+	 *
+	 * NOTE:  make sure the logic here doesn't diverge much from
+	 * the copy in usb-storage, for as long as we need two copies.
+	 */
 
+	/* toggle was reset by the clear, then ep was reactivated */
 	usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), 0);
+	usb_endpoint_running(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
 
 	return 0;
 }
@@ -783,7 +766,7 @@
 int usb_set_interface(struct usb_device *dev, int interface, int alternate)
 {
 	struct usb_interface *iface;
-	struct usb_interface_descriptor *iface_as;
+	struct usb_host_interface *iface_as;
 	int i, ret;
 
 	iface = usb_ifnum_to_if(dev, interface);
@@ -805,7 +788,8 @@
 
 	if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				   USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
-				   iface->altsetting[alternate].bAlternateSetting,
+				   iface->altsetting[alternate]
+				   	.desc.bAlternateSetting,
 				   interface, NULL, 0, HZ * 5)) < 0)
 		return ret;
 
@@ -817,8 +801,8 @@
 
 	/* prevent submissions using previous endpoint settings */
 	iface_as = iface->altsetting + iface->act_altsetting;
-	for (i = 0; i < iface_as->bNumEndpoints; i++) {
-		u8	ep = iface_as->endpoint [i].bEndpointAddress;
+	for (i = 0; i < iface_as->desc.bNumEndpoints; i++) {
+		u8	ep = iface_as->endpoint [i].desc.bEndpointAddress;
 		int	out = !(ep & USB_DIR_IN);
 
 		ep &= USB_ENDPOINT_NUMBER_MASK;
@@ -840,14 +824,14 @@
 	 */
 
 	iface_as = &iface->altsetting[alternate];
-	for (i = 0; i < iface_as->bNumEndpoints; i++) {
-		u8	ep = iface_as->endpoint[i].bEndpointAddress;
+	for (i = 0; i < iface_as->desc.bNumEndpoints; i++) {
+		u8	ep = iface_as->endpoint[i].desc.bEndpointAddress;
 		int	out = !(ep & USB_DIR_IN);
 
 		ep &= USB_ENDPOINT_NUMBER_MASK;
 		usb_settoggle (dev, ep, out, 0);
 		(out ? dev->epmaxpacketout : dev->epmaxpacketin) [ep]
-			= iface_as->endpoint [i].wMaxPacketSize;
+			= iface_as->endpoint [i].desc.wMaxPacketSize;
 	}
 
 	return 0;
@@ -886,10 +870,10 @@
 int usb_set_configuration(struct usb_device *dev, int configuration)
 {
 	int i, ret;
-	struct usb_config_descriptor *cp = NULL;
+	struct usb_host_config *cp = NULL;
 	
 	for (i=0; i<dev->descriptor.bNumConfigurations; i++) {
-		if (dev->config[i].bConfigurationValue == configuration) {
+		if (dev->config[i].desc.bConfigurationValue == configuration) {
 			cp = &dev->config[i];
 			break;
 		}
diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
--- a/drivers/usb/core/urb.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/core/urb.c	Wed Oct 30 16:44:29 2002
@@ -108,45 +108,47 @@
  *
  * Successful submissions return 0; otherwise this routine returns a
  * negative error number.  If the submission is successful, the complete()
- * fuction of the urb will be called when the USB host driver is
- * finished with the urb (either a successful transmission, or some
- * error case.)
- *
- * Unreserved Bandwidth Transfers:
- *
- * Bulk or control requests complete only once.  When the completion
+ * callback from the urb will be called exactly once, when the USB core and
+ * host controller driver are finished with the urb.  When the completion
  * function is called, control of the URB is returned to the device
  * driver which issued the request.  The completion handler may then
  * immediately free or reuse that URB.
  *
- * Bulk URBs may be queued by submitting an URB to an endpoint before
- * previous ones complete.  This can maximize bandwidth utilization by
- * letting the USB controller start work on the next URB without any
- * delay to report completion (scheduling and processing an interrupt)
- * and then submit that next request.
- *
  * For control endpoints, the synchronous usb_control_msg() call is
  * often used (in non-interrupt context) instead of this call.
+ * That is often used through convenience wrappers, for the requests
+ * that are standardized in the USB 2.0 specification.  For bulk
+ * endpoints, a synchronous usb_bulk_msg() call is available.
+ *
+ * Request Queuing:
+ *
+ * URBs may be submitted to endpoints before previous ones complete, to
+ * minimize the impact of interrupt latencies and system overhead on data
+ * throughput.  This is required for continuous isochronous data streams,
+ * and may also be required for some kinds of interrupt transfers. Such
+ * queueing also maximizes bandwidth utilization by letting USB controllers
+ * start work on later requests before driver software has finished the
+ * completion processing for earlier requests.
+ *
+ * Bulk and Isochronous URBs may always be queued.  At this writing, all
+ * mainstream host controller drivers support queueing for control and
+ * interrupt transfer requests.
  *
  * Reserved Bandwidth Transfers:
  *
- * Periodic URBs (interrupt or isochronous) are performed repeatedly.
- *
- * For interrupt requests this is (currently) automagically done
- * until the original request is aborted.  When the completion callback
- * indicates the URB has been unlinked (with a special status code),
- * control of that URB returns to the device driver.  Otherwise, the
- * completion handler does not control the URB, and should not change
- * any of its fields.
- *
- * For isochronous requests, the completion handler is expected to
- * submit an urb, typically resubmitting its parameter, until drivers
- * stop wanting data transfers.  (For example, audio playback might have
- * finished, or a webcam turned off.)
- *
- * If the USB subsystem can't reserve sufficient bandwidth to perform
- * the periodic request, and bandwidth reservation is being done for
- * this controller, submitting such a periodic request will fail.
+ * Periodic transfers (interrupt or isochronous) are performed repeatedly,
+ * using the interval specified in the urb.  Submitting the first urb to
+ * the endpoint reserves the bandwidth necessary to make those transfers.
+ * If the USB subsystem can't allocate sufficient bandwidth to perform
+ * the periodic request, submitting such a periodic request should fail.
+ *
+ * Device drivers must explicitly request that repetition, by ensuring that
+ * some URB is always on the endpoint's queue (except possibly for short
+ * periods during completion callacks).  When there is no longer an urb
+ * queued, the endpoint's bandwidth reservation is canceled.  This means
+ * drivers can use their completion handlers to ensure they keep bandwidth
+ * they need, by reinitializing and resubmitting the just-completed urb
+ * until the driver longer needs that periodic bandwidth.
  *
  * Memory Flags:
  *
@@ -270,23 +272,23 @@
 	unsigned int	allowed;
 
 	/* enforce simple/standard policy */
-	allowed = USB_ASYNC_UNLINK;	// affects later unlinks
+	allowed = URB_ASYNC_UNLINK;	// affects later unlinks
 	allowed |= URB_NO_DMA_MAP;
 	allowed |= URB_NO_INTERRUPT;
 	switch (temp) {
 	case PIPE_BULK:
 		if (is_out)
-			allowed |= USB_ZERO_PACKET;
+			allowed |= URB_ZERO_PACKET;
 		/* FALLTHROUGH */
 	case PIPE_CONTROL:
-		allowed |= USB_NO_FSBR;	/* only affects UHCI */
+		allowed |= URB_NO_FSBR;	/* only affects UHCI */
 		/* FALLTHROUGH */
 	default:			/* all non-iso endpoints */
 		if (!is_out)
 			allowed |= URB_SHORT_NOT_OK;
 		break;
 	case PIPE_ISOCHRONOUS:
-		allowed |= USB_ISO_ASAP;
+		allowed |= URB_ISO_ASAP;
 		break;
 	}
 	urb->transfer_flags &= allowed;
@@ -356,10 +358,9 @@
  * This routine cancels an in-progress request.  The requests's
  * completion handler will be called with a status code indicating
  * that the request has been canceled, and that control of the URB
- * has been returned to that device driver.  This is the only way
- * to stop an interrupt transfer, so long as the device is connected.
+ * has been returned to that device driver.
  *
- * When the USB_ASYNC_UNLINK transfer flag for the URB is clear, this
+ * When the URB_ASYNC_UNLINK transfer flag for the URB is clear, this
  * request is synchronous.  Success is indicated by returning zero,
  * at which time the urb will have been unlinked,
  * and the completion function will see status -ENOENT.  Failure is
@@ -367,7 +368,7 @@
  * when unlinking an urb from an interrupt context, such as a bottom
  * half or a completion handler,
  *
- * When the USB_ASYNC_UNLINK transfer flag for the URB is set, this
+ * When the URB_ASYNC_UNLINK transfer flag for the URB is set, this
  * request is asynchronous.  Success is indicated by returning -EINPROGRESS,
  * at which time the urb will normally not have been unlinked,
  * and the completion function will see status -ECONNRESET.  Failure is
diff -Nru a/drivers/usb/core/usb-debug.c b/drivers/usb/core/usb-debug.c
--- a/drivers/usb/core/usb-debug.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/core/usb-debug.c	Wed Oct 30 16:44:28 2002
@@ -16,28 +16,28 @@
 #endif
 #include <linux/usb.h>
 
-static void usb_show_endpoint(struct usb_endpoint_descriptor *endpoint)
+static void usb_show_endpoint(struct usb_host_endpoint *endpoint)
 {
-	usb_show_endpoint_descriptor(endpoint);
+	usb_show_endpoint_descriptor(&endpoint->desc);
 }
 
-static void usb_show_interface(struct usb_interface_descriptor *altsetting)
+static void usb_show_interface(struct usb_host_interface *altsetting)
 {
 	int i;
 
-	usb_show_interface_descriptor(altsetting);
+	usb_show_interface_descriptor(&altsetting->desc);
 
-	for (i = 0; i < altsetting->bNumEndpoints; i++)
+	for (i = 0; i < altsetting->desc.bNumEndpoints; i++)
 		usb_show_endpoint(altsetting->endpoint + i);
 }
 
-static void usb_show_config(struct usb_config_descriptor *config)
+static void usb_show_config(struct usb_host_config *config)
 {
 	int i, j;
 	struct usb_interface *ifp;
 
-	usb_show_config_descriptor(config);
-	for (i = 0; i < config->bNumInterfaces; i++) {
+	usb_show_config_descriptor(&config->desc);
+	for (i = 0; i < config->desc.bNumInterfaces; i++) {
 		ifp = config->interface + i;
 
 		if (!ifp)
@@ -124,7 +124,7 @@
 	printk("  bConfigurationValue =   %02x\n", desc->bConfigurationValue);
 	printk("  iConfiguration      =   %02x\n", desc->iConfiguration);
 	printk("  bmAttributes        =   %02x\n", desc->bmAttributes);
-	printk("  MaxPower            = %4dmA\n", desc->MaxPower * 2);
+	printk("  bMaxPower            = %4dmA\n", desc->bMaxPower * 2);
 }
 
 void usb_show_interface_descriptor(struct usb_interface_descriptor *desc)
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/core/usb.c	Wed Oct 30 16:44:28 2002
@@ -233,8 +233,9 @@
 {
 	int i;
 
-	for (i = 0; i < dev->actconfig->bNumInterfaces; i++)
-		if (dev->actconfig->interface[i].altsetting[0].bInterfaceNumber == ifnum)
+	for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++)
+		if (dev->actconfig->interface[i].altsetting[0]
+				.desc.bInterfaceNumber == ifnum)
 			return &dev->actconfig->interface[i];
 
 	return NULL;
@@ -254,15 +255,21 @@
  * the first endpoint in that descriptor corresponds to interface zero.
  * This routine helps device drivers avoid such mistakes.
  */
-struct usb_endpoint_descriptor *usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum)
+struct usb_endpoint_descriptor *
+usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum)
 {
 	int i, j, k;
 
-	for (i = 0; i < dev->actconfig->bNumInterfaces; i++)
+	for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++)
 		for (j = 0; j < dev->actconfig->interface[i].num_altsetting; j++)
-			for (k = 0; k < dev->actconfig->interface[i].altsetting[j].bNumEndpoints; k++)
-				if (epnum == dev->actconfig->interface[i].altsetting[j].endpoint[k].bEndpointAddress)
-					return &dev->actconfig->interface[i].altsetting[j].endpoint[k];
+			for (k = 0; k < dev->actconfig->interface[i]
+				.altsetting[j].desc.bNumEndpoints; k++)
+				if (epnum == dev->actconfig->interface[i]
+						.altsetting[j].endpoint[k]
+						.desc.bEndpointAddress)
+					return &dev->actconfig->interface[i]
+						.altsetting[j].endpoint[k]
+						.desc;
 
 	return NULL;
 }
@@ -408,7 +415,7 @@
 const struct usb_device_id *
 usb_match_id(struct usb_interface *interface, const struct usb_device_id *id)
 {
-	struct usb_interface_descriptor *intf;
+	struct usb_host_interface *intf;
 	struct usb_device *dev;
 
 	/* proc_connectinfo in devio.c may call us with id == NULL. */
@@ -457,15 +464,15 @@
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) &&
-		    (id->bInterfaceClass != intf->bInterfaceClass))
+		    (id->bInterfaceClass != intf->desc.bInterfaceClass))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS) &&
-		    (id->bInterfaceSubClass != intf->bInterfaceSubClass))
+		    (id->bInterfaceSubClass != intf->desc.bInterfaceSubClass))
 			continue;
 
 		if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL) &&
-		    (id->bInterfaceProtocol != intf->bInterfaceProtocol))
+		    (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol))
 			continue;
 
 		return id;
@@ -604,10 +611,10 @@
 		 */
 		envp [i++] = scratch;
 		length += snprintf (scratch, buffer_size - length,
-				    "INTERFACE=%d/%d/%d",
-				    intf->altsetting[alt].bInterfaceClass,
-				    intf->altsetting[alt].bInterfaceSubClass,
-				    intf->altsetting[alt].bInterfaceProtocol);
+			    "INTERFACE=%d/%d/%d",
+			    intf->altsetting[alt].desc.bInterfaceClass,
+			    intf->altsetting[alt].desc.bInterfaceSubClass,
+			    intf->altsetting[alt].desc.bInterfaceProtocol);
 		if ((buffer_size - length <= 0) || (i >= num_envp))
 			return -ENOMEM;
 		++length;
@@ -792,7 +799,7 @@
 
 	dbg ("unregistering interfaces on device %d", dev->devnum);
 	if (dev->actconfig) {
-		for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
+		for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 			struct usb_interface *interface = &dev->actconfig->interface[i];
 
 			/* remove this interface */
@@ -942,12 +949,27 @@
 	int i;
 	int j;
 
-	/* USB v1.1 5.5.3 */
-	/* We read the first 8 bytes from the device descriptor to get to */
-	/*  the bMaxPacketSize0 field. Then we set the maximum packet size */
-	/*  for the control pipe, and retrieve the rest */
-	dev->epmaxpacketin [0] = 8;
-	dev->epmaxpacketout[0] = 8;
+	/* USB 2.0 section 5.5.3 talks about ep0 maxpacket ...
+	 * it's fixed size except for full speed devices.
+	 */
+	switch (dev->speed) {
+	case USB_SPEED_HIGH:		/* fixed at 64 */
+		i = 64;
+		break;
+	case USB_SPEED_FULL:		/* 8, 16, 32, or 64 */
+		/* to determine the ep0 maxpacket size, read the first 8
+		 * bytes from the device descriptor to get bMaxPacketSize0;
+		 * then correct our initial (small) guess.
+		 */
+		// FALLTHROUGH
+	case USB_SPEED_LOW:		/* fixed at 8 */
+		i = 8;
+		break;
+	default:
+		return -EINVAL;
+	}
+	dev->epmaxpacketin [0] = i;
+	dev->epmaxpacketout[0] = i;
 
 	for (i = 0; i < NEW_DEVICE_RETRYS; ++i) {
 
@@ -967,6 +989,7 @@
 
 		wait_ms(10);	/* Let the SET_ADDRESS settle */
 
+		/* high and low speed devices don't need this... */
 		err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8);
 		if (err >= 8)
 			break;
@@ -982,8 +1005,10 @@
 		dev->devnum = -1;
 		return 1;
 	}
-	dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0;
-	dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0;
+	if (dev->speed == USB_SPEED_FULL) {
+		dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0;
+		dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0;
+	}
 
 	err = usb_get_device_descriptor(dev);
 	if (err < (signed)sizeof(dev->descriptor)) {
@@ -1008,7 +1033,7 @@
 	}
 
 	/* we set the default configuration here */
-	err = usb_set_configuration(dev, dev->config[0].bConfigurationValue);
+	err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue);
 	if (err) {
 		err("failed to set device %d default configuration (error=%d)",
 			dev->devnum, err);
@@ -1047,16 +1072,17 @@
 
 	/* Register all of the interfaces for this device with the driver core.
 	 * Remember, interfaces get bound to drivers, not devices. */
-	for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
+	for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 		struct usb_interface *interface = &dev->actconfig->interface[i];
-		struct usb_interface_descriptor *desc = interface->altsetting;
+		struct usb_interface_descriptor *desc;
 
+		desc = &interface->altsetting [interface->act_altsetting].desc;
 		interface->dev.parent = &dev->dev;
 		interface->dev.driver = NULL;
 		interface->dev.bus = &usb_bus_type;
 		sprintf (&interface->dev.bus_id[0], "%d-%s:%d",
 			 dev->bus->busnum, dev->devpath,
-			 interface->altsetting->bInterfaceNumber);
+			 desc->bInterfaceNumber);
 		if (!desc->iInterface
 				|| usb_string (dev, desc->iInterface,
 					interface->dev.name,
@@ -1069,7 +1095,7 @@
 			sprintf (&interface->dev.name[0],
 				"usb-%s-%s interface %d",
 				dev->bus->bus_name, dev->devpath,
-				interface->altsetting->bInterfaceNumber);
+				desc->bInterfaceNumber);
 		}
 		dbg ("%s - registering %s", __FUNCTION__, interface->dev.bus_id);
 		device_register (&interface->dev);
diff -Nru a/drivers/usb/host/Config.help b/drivers/usb/host/Config.help
--- a/drivers/usb/host/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,63 +0,0 @@
-CONFIG_USB_EHCI_HCD
-  The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
-  "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
-  If your USB host controller supports USB 2.0, you will likely want to
-  configure this Host Controller Driver.  At this writing, the primary
-  implementation of EHCI is a chip from NEC, widely available in add-on
-  PCI cards, but implementations are in the works from other vendors
-  including Intel and Philips.  Motherboard support is appearing.
-
-  EHCI controllers are packaged with "companion" host controllers (OHCI
-  or UHCI) to handle USB 1.1 devices connected to root hub ports.  Ports
-  will connect to EHCI if it the device is high speed, otherwise they
-  connect to a companion controller.  If you configure EHCI, you should
-  probably configure the OHCI (for NEC and some other vendors) USB Host
-  Controller Driver or UHCI (for Via motherboards) Host Controller
-  Driver too.
-
-  You may want to read <file:Documentation/usb/ehci.txt>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ehci-hcd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_OHCI_HCD
-  The Open Host Controller Interface (OHCI) is a standard for accessing
-  USB 1.1 host controller hardware.  It does more in hardware than Intel's
-  UHCI specification.  If your USB host controller follows the OHCI spec,
-  say Y.  On most non-x86 systems, and on x86 hardware that's not using a
-  USB controller from Intel or VIA, this is appropriate.  If your host
-  controller doesn't use PCI, this is probably appropriate.  For a PCI
-  based system where you're not sure, the "lspci -v" entry will list the
-  right "prog-if" for your USB controller(s):  EHCI, OHCI, or UHCI.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ohci-hcd.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_UHCI_HCD_ALT
-  The Universal Host Controller Interface is a standard by Intel for
-  accessing the USB hardware in the PC (which is also called the USB
-  host controller). If your USB host controller conforms to this
-  standard, you may want to say Y, but see below. All recent boards
-  with Intel PCI chipsets (like intel 430TX, 440FX, 440LX, 440BX,
-  i810, i820) conform to this standard. Also all VIA PCI chipsets
-  (like VIA VP2, VP3, MVP3, Apollo Pro, Apollo Pro II or Apollo Pro
-  133). If unsure, say Y.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called uhci-hcd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SL811HS
-  Say Y here if you have a SL811HS USB host controller in your system.
-
-  If you do not know what this is, please say N.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called hc_sl811.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/usb/host/Config.in b/drivers/usb/host/Config.in
--- a/drivers/usb/host/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-#
-# USB Host Controller Drivers
-#
-comment 'USB Host Controller Drivers'
-dep_tristate '  EHCI HCD (USB 2.0) support' CONFIG_USB_EHCI_HCD $CONFIG_USB
-dep_tristate '  OHCI HCD support' CONFIG_USB_OHCI_HCD $CONFIG_USB
-dep_tristate '  UHCI HCD (most Intel and VIA) support' CONFIG_USB_UHCI_HCD_ALT $CONFIG_USB
-if [ "$CONFIG_ARM" = "y" ]; then
-   dep_tristate '  SL811HS support' CONFIG_USB_SL811HS $CONFIG_USB
-fi
diff -Nru a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/host/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,82 @@
+#
+# USB Host Controller Drivers
+#
+comment "USB Host Controller Drivers"
+	depends on USB
+
+config USB_EHCI_HCD
+	tristate "EHCI HCD (USB 2.0) support"
+	depends on USB
+	---help---
+	  The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
+	  "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
+	  If your USB host controller supports USB 2.0, you will likely want to
+	  configure this Host Controller Driver.  At this writing, the primary
+	  implementation of EHCI is a chip from NEC, widely available in add-on
+	  PCI cards, but implementations are in the works from other vendors
+	  including Intel and Philips.  Motherboard support is appearing.
+
+	  EHCI controllers are packaged with "companion" host controllers (OHCI
+	  or UHCI) to handle USB 1.1 devices connected to root hub ports.  Ports
+	  will connect to EHCI if it the device is high speed, otherwise they
+	  connect to a companion controller.  If you configure EHCI, you should
+	  probably configure the OHCI (for NEC and some other vendors) USB Host
+	  Controller Driver or UHCI (for Via motherboards) Host Controller
+	  Driver too.
+
+	  You may want to read <file:Documentation/usb/ehci.txt>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ehci-hcd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_OHCI_HCD
+	tristate "OHCI HCD support"
+	depends on USB
+	---help---
+	  The Open Host Controller Interface (OHCI) is a standard for accessing
+	  USB 1.1 host controller hardware.  It does more in hardware than Intel's
+	  UHCI specification.  If your USB host controller follows the OHCI spec,
+	  say Y.  On most non-x86 systems, and on x86 hardware that's not using a
+	  USB controller from Intel or VIA, this is appropriate.  If your host
+	  controller doesn't use PCI, this is probably appropriate.  For a PCI
+	  based system where you're not sure, the "lspci -v" entry will list the
+	  right "prog-if" for your USB controller(s):  EHCI, OHCI, or UHCI.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ohci-hcd.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_UHCI_HCD_ALT
+	tristate "UHCI HCD (most Intel and VIA) support"
+	depends on USB
+	---help---
+	  The Universal Host Controller Interface is a standard by Intel for
+	  accessing the USB hardware in the PC (which is also called the USB
+	  host controller). If your USB host controller conforms to this
+	  standard, you may want to say Y, but see below. All recent boards
+	  with Intel PCI chipsets (like intel 430TX, 440FX, 440LX, 440BX,
+	  i810, i820) conform to this standard. Also all VIA PCI chipsets
+	  (like VIA VP2, VP3, MVP3, Apollo Pro, Apollo Pro II or Apollo Pro
+	  133). If unsure, say Y.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called uhci-hcd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SL811HS
+	tristate "SL811HS support"
+	depends on ARM && USB
+	help
+	  Say Y here if you have a SL811HS USB host controller in your system.
+
+	  If you do not know what this is, please say N.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called hc_sl811.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/host/ehci-hcd.c	Wed Oct 30 16:44:29 2002
@@ -106,8 +106,6 @@
 #define EHCI_STATS
 #endif
 
-#define INTR_AUTOMAGIC		/* to be removed later in 2.5 */
-
 /* magic numbers that can affect system performance */
 #define	EHCI_TUNE_CERR		3	/* 0-3 qtd retries; 0 == don't stop */
 #define	EHCI_TUNE_RL_HS		0	/* nak throttle; see 4.9 */
diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/usb/host/ehci-q.c	Wed Oct 30 16:44:32 2002
@@ -160,13 +160,6 @@
 
 static void ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb)
 {
-#ifdef	INTR_AUTOMAGIC
-	struct urb		*resubmit = 0;
-	struct usb_device	*dev = 0;
-
-	static int ehci_urb_enqueue (struct usb_hcd *, struct urb *, int);
-#endif
-
 	if (likely (urb->hcpriv != 0)) {
 		struct ehci_qh	*qh = (struct ehci_qh *) urb->hcpriv;
 
@@ -175,14 +168,6 @@
 
 			/* ... update hc-wide periodic stats (for usbfs) */
 			hcd_to_bus (&ehci->hcd)->bandwidth_int_reqs--;
-
-#ifdef	INTR_AUTOMAGIC
-			if (!((urb->status == -ENOENT)
-					|| (urb->status == -ECONNRESET))) {
-				resubmit = usb_get_urb (urb);
-				dev = urb->dev;
-			}
-#endif
 		}
 		qh_put (ehci, qh);
 		urb->hcpriv = 0;
@@ -207,25 +192,6 @@
 	spin_unlock (&ehci->lock);
 	usb_hcd_giveback_urb (&ehci->hcd, urb);
 
-#ifdef	INTR_AUTOMAGIC
-	if (resubmit && ((urb->status == -ENOENT)
-				|| (urb->status == -ECONNRESET))) {
-		usb_put_urb (resubmit);
-		resubmit = 0;
-	}
-	// device drivers will soon be doing something like this
-	if (resubmit) {
-		int	status;
-
-		resubmit->dev = dev;
-		status = SUBMIT_URB (resubmit, SLAB_KERNEL);
-		if (status != 0)
-			err ("can't resubmit interrupt urb %p: status %d",
-					resubmit, status);
-		usb_put_urb (resubmit);
-	}
-#endif
-
 	spin_lock (&ehci->lock);
 }
 
@@ -497,7 +463,7 @@
 			token ^= 0x0100;	/* "in" <--> "out"  */
 			token |= QTD_TOGGLE;	/* force DATA1 */
 		} else if (usb_pipebulk (urb->pipe)
-				&& (urb->transfer_flags & USB_ZERO_PACKET)
+				&& (urb->transfer_flags & URB_ZERO_PACKET)
 				&& !(urb->transfer_buffer_length % maxpacket)) {
 			one_more = 1;
 		}
@@ -778,10 +744,26 @@
 			qtd = list_entry (qtd_list->next, struct ehci_qtd,
 					qtd_list);
 
-		/* maybe patch the qh used for set_address */
-		if (unlikely (epnum == 0
-				&& le32_to_cpu (qh->hw_info1 & 0x7f) == 0))
-			qh->hw_info1 |= cpu_to_le32 (usb_pipedevice(urb->pipe));
+		/* control qh may need patching after enumeration */
+		if (unlikely (epnum == 0)) {
+			/* set_address changes the address */
+			if (le32_to_cpu (qh->hw_info1 & 0x7f) == 0)
+				qh->hw_info1 |= cpu_to_le32 (
+						usb_pipedevice (urb->pipe));
+
+			/* for full speed, ep0 maxpacket can grow */
+			else if (!(qh->hw_info1 & cpu_to_le32 (0x3 << 12))) {
+				u32	info, max;
+
+				info = le32_to_cpu (qh->hw_info1);
+				max = urb->dev->descriptor.bMaxPacketSize0;
+				if (max > (0x07ff & (info >> 16))) {
+					info &= ~(0x07ff << 16);
+					info |= max << 16;
+					qh->hw_info1 = cpu_to_le32 (info);
+				}
+			}
+		}
 
 		/* append to tds already queued to this qh? */
 		if (unlikely (!list_empty (&qh->qtd_list) && qtd)) {
diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/host/ehci-sched.c	Wed Oct 30 16:44:27 2002
@@ -738,7 +738,7 @@
 	}
 
 	/* explicit start frame? */
-	if (!(urb->transfer_flags & USB_ISO_ASAP)) {
+	if (!(urb->transfer_flags & URB_ISO_ASAP)) {
 		unsigned	temp;
 
 		/* sanity check: must be in range */
diff -Nru a/drivers/usb/host/hc_simple.c b/drivers/usb/host/hc_simple.c
--- a/drivers/usb/host/hc_simple.c	Wed Oct 30 16:44:37 2002
+++ b/drivers/usb/host/hc_simple.c	Wed Oct 30 16:44:37 2002
@@ -219,7 +219,7 @@
 	if (!list_empty (&urb->urb_list) && urb->status == -EINPROGRESS) {
 		/* URB active? */
 
-		if (urb->transfer_flags & (USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED)) {
+		if (urb->transfer_flags & (URB_ASYNC_UNLINK | URB_TIMEOUT_KILLED)) {
 			/* asynchronous with callback */
 			/* relink the urb to the del list */
 			list_move (&urb->urb_list, &hci->del_list);
@@ -251,7 +251,7 @@
 		/* hcd does not own URB but we keep the driver happy anyway */
 		spin_unlock_irqrestore (&usb_urb_lock, flags);
 
-		if (urb->complete && (urb->transfer_flags & USB_ASYNC_UNLINK)) {
+		if (urb->complete && (urb->transfer_flags & URB_ASYNC_UNLINK)) {
 			urb->status = -ENOENT;
 			urb->actual_length = 0;
 			urb->complete (urb);
@@ -388,7 +388,7 @@
 	struct urb *urb = (struct urb *) lurb;
 
 	DBGFUNC ("enter qu_urb_timeout\n");
-	urb->transfer_flags |= USB_TIMEOUT_KILLED;
+	urb->transfer_flags |= URB_TIMEOUT_KILLED;
 	hci_unlink_urb (urb);
 }
 #endif
@@ -472,7 +472,7 @@
 
 	case PIPE_BULK:
 		list_add (&urb->urb_list, &hci->bulk_list);
-		if ((urb->transfer_flags & USB_ZERO_PACKET)
+		if ((urb->transfer_flags & URB_ZERO_PACKET)
 		    && urb->transfer_buffer_length > 0
 		    &&
 		    ((urb->transfer_buffer_length %
@@ -523,7 +523,7 @@
 
 	/* for ISOC transfers calculate start frame index */
 
-	if (usb_pipeisoc (urb->pipe) && urb->transfer_flags & USB_ISO_ASAP) {
+	if (usb_pipeisoc (urb->pipe) && urb->transfer_flags & URB_ISO_ASAP) {
 		urb->start_frame = ((ed->pipe_head) ? (ed->last_iso + 1) : hci_get_current_frame_number (urb-> dev) + 1) & 0xffff;
 	}
 
diff -Nru a/drivers/usb/host/hc_sl811_rh.c b/drivers/usb/host/hc_sl811_rh.c
--- a/drivers/usb/host/hc_sl811_rh.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/host/hc_sl811_rh.c	Wed Oct 30 16:44:29 2002
@@ -534,7 +534,7 @@
 		urb->hcpriv = NULL;
 		usb_put_dev (urb->dev);
 		urb->dev = NULL;
-		if (urb->transfer_flags & USB_ASYNC_UNLINK) {
+		if (urb->transfer_flags & URB_ASYNC_UNLINK) {
 			urb->status = -ECONNRESET;
 			if (urb->complete) {
 				urb->complete (urb);
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/usb/host/ohci-hcd.c	Wed Oct 30 16:44:20 2002
@@ -29,7 +29,7 @@
  *
  * 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes
  *	from post-2.4.5 patches.
- * 2001/09/20 USB_ZERO_PACKET support; hcca_dma portability, OPTi warning
+ * 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning
  * 2001/09/07 match PCI PM changes, errnos from Linus' tree
  * 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify;
  *	pbook pci quirks gone (please fix pbook pci sw!) (db)
@@ -185,7 +185,7 @@
 			/* ... and maybe a zero length packet to wrap it up */
 			if (size == 0)
 				size++;
-			else if ((urb->transfer_flags & USB_ZERO_PACKET) != 0
+			else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0
 				&& (urb->transfer_buffer_length
 					% usb_maxpacket (urb->dev, pipe,
 						usb_pipeout (pipe))) == 0)
@@ -239,7 +239,7 @@
 			frame |= ed->branch;
 			urb->start_frame = frame;
 
-			/* yes, only USB_ISO_ASAP is supported, and
+			/* yes, only URB_ISO_ASAP is supported, and
 			 * urb->start_frame is never used as input.
 			 */
 		}
@@ -383,10 +383,16 @@
 
 	/* SMM owns the HC?  not for long! */
 	if (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
-		temp = 50;	/* arbitrary: half second */
+		dbg ("USB HC TakeOver from BIOS/SMM");
+
+		/* this timeout is arbitrary.  we make it long, so systems
+		 * depending on usb keyboards may be usable even if the
+		 * BIOS/SMM code seems pretty broken.
+		 */
+		temp = 500;	/* arbitrary: five seconds */
+
 		writel (OHCI_INTR_OC, &ohci->regs->intrenable);
 		writel (OHCI_OCR, &ohci->regs->cmdstatus);
-		dbg ("USB HC TakeOver from SMM");
 		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
 			wait_ms (10);
 			if (--temp == 0) {
diff -Nru a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
--- a/drivers/usb/host/ohci-mem.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/host/ohci-mem.c	Wed Oct 30 16:44:29 2002
@@ -176,13 +176,6 @@
 			pci_pool_free (hc->td_cache, td, dma);
 			return NULL;
 		}
-		// DEBUG ONLY want to see if these tds are really getting
-		// allocated.  the last one in a page shouldn't be getting
-		// allocated during these tests!
-		if ((dma & 0x0fff) == 0x0fc0) {
-			dbg ("td = %p", td);
-			dump_stack ();
-		}
 	}
 	return td;
 }
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/usb/host/ohci-q.c	Wed Oct 30 16:44:34 2002
@@ -62,54 +62,6 @@
 	usb_hcd_giveback_urb (&ohci->hcd, urb);
 }
 
-static void td_submit_urb (struct ohci_hcd *ohci, struct urb *urb);
-
-/* Report interrupt transfer completion, maybe reissue */
-static inline void intr_resub (struct ohci_hcd *hc, struct urb *urb)
-{
-	struct urb_priv	*urb_priv = urb->hcpriv;
-	unsigned long	flags;
-
-// FIXME going away along with the rest of interrrupt automagic...
-
-	/* FIXME: MP race.  If another CPU partially unlinks
-	 * this URB (urb->status was updated, hasn't yet told
-	 * us to dequeue) before we call complete() here, an
-	 * extra "unlinked" completion will be reported...
-	 */
-
-	spin_lock_irqsave (&urb->lock, flags);
-	if (likely (urb->status == -EINPROGRESS))
-		urb->status = 0;
-	spin_unlock_irqrestore (&urb->lock, flags);
-
-	if (!(urb->transfer_flags & URB_NO_DMA_MAP)
-			&& usb_pipein (urb->pipe))
-		pci_dma_sync_single (hc->hcd.pdev, urb->transfer_dma,
-				urb->transfer_buffer_length,
-				PCI_DMA_FROMDEVICE);
-
-#ifdef OHCI_VERBOSE_DEBUG
-	urb_print (urb, "INTR", usb_pipeout (urb->pipe));
-#endif
-	urb->complete (urb);
-
-	/* always requeued, but ED_SKIP if complete() unlinks.
-	 * EDs are removed from periodic table only at SOF intr.
-	 */
-	urb->actual_length = 0;
-	spin_lock_irqsave (&urb->lock, flags);
-	if (urb_priv->state != URB_DEL)
-		urb->status = -EINPROGRESS;
-	spin_unlock (&urb->lock);
-
-	/* syncing with PCI_DMA_TODEVICE is evidently trouble... */
-
-	spin_lock (&hc->lock);
-	td_submit_urb (hc, urb);
-	spin_unlock_irqrestore (&hc->lock, flags);
-}
-
 
 /*-------------------------------------------------------------------------*
  * ED handling functions
@@ -623,7 +575,7 @@
 			info |= TD_R;
 		td_fill (info, data, data_len, urb, cnt);
 		cnt++;
-		if ((urb->transfer_flags & USB_ZERO_PACKET)
+		if ((urb->transfer_flags & URB_ZERO_PACKET)
 				&& cnt < urb_priv->length) {
 			td_fill (info, 0, 0, urb, cnt);
 			cnt++;
@@ -784,43 +736,40 @@
 	 */
 	ed->hwINFO |= ED_SKIP;
 	wmb ();
-	td->ed->hwHeadP &= ~ED_H; 
+	ed->hwHeadP &= ~ED_H; 
 
+	/* put any later tds from this urb onto the donelist, after 'td',
+	 * order won't matter here: no errors, and nothing was transferred.
+	 * also patch the ed so it looks as if those tds completed normally.
+	 */
 	while (tmp != &ed->td_list) {
 		struct td	*next;
+		u32		info;
 
 		next = list_entry (tmp, struct td, td_list);
 		tmp = next->td_list.next;
 
-		/* move other tds from this urb to the donelist, after 'td'.
-		 * order won't matter here: no errors, nothing transferred.
-		 *
-		 * NOTE: this "knows" short control reads won't need fixup:
-		 * hc went from the (one) data TD to the status td. that'll
-		 * change if multi-td control DATA segments are supported,
-		 * and we want to send the status packet.
+		if (next->urb != urb)
+			break;
+
+		/* NOTE: if multi-td control DATA segments get supported,
+		 * this urb had one of them, this td wasn't the last td
+		 * in that segment (TD_R clear), this ed halted because
+		 * of a short read, _and_ URB_SHORT_NOT_OK is clear ...
+		 * then we need to leave the control STATUS packet queued
+		 * and clear ED_SKIP.
 		 */
-		if (next->urb == urb) {
-			u32	info = next->hwINFO;
+		info = next->hwINFO;
+		info |= cpu_to_le32 (TD_DONE);
+		info &= ~cpu_to_le32 (TD_CC);
+		next->hwINFO = info;
 
-			info |= cpu_to_le32 (TD_DONE);
-			info &= ~cpu_to_le32 (TD_CC);
-			next->hwINFO = info;
-			next->next_dl_td = rev;	
-			rev = next;
-			continue;
-		}
+		next->next_dl_td = rev;	
+		rev = next;
 
-		/* restart ed with first td of this next urb */
-		ed->hwHeadP = cpu_to_le32 (next->td_dma) | toggle;
-		tmp = 0;
-		break;
+		ed->hwHeadP = next->hwNextTD | toggle;
 	}
 
-	/* no urbs queued? then ED is empty. */
-	if (tmp)
-		ed->hwHeadP = cpu_to_le32 (ed->dummy->td_dma) | toggle;
-
 	/* help for troubleshooting: */
 	dbg ("urb %p usb-%s-%s ep-%d-%s cc %d --> status %d",
 		urb,
@@ -1022,22 +971,10 @@
    		td_done (urb, td);
   		urb_priv->td_cnt++;
 
-		/* If all this urb's TDs are done, call complete().
-		 * Interrupt transfers are the only special case:
-		 * they're reissued, until "deleted" by usb_unlink_urb
-		 * (real work done in a SOF intr, by finish_unlinks).
-		 */
+		/* If all this urb's TDs are done, call complete() */
   		if (urb_priv->td_cnt == urb_priv->length) {
-			int	resubmit;
-
-			resubmit = usb_pipeint (urb->pipe)
-					&& (urb_priv->state != URB_DEL);
-
      			spin_unlock_irqrestore (&ohci->lock, flags);
-			if (resubmit)
-  				intr_resub (ohci, urb);
-  			else
-  				finish_urb (ohci, urb);
+  			finish_urb (ohci, urb);
   			spin_lock_irqsave (&ohci->lock, flags);
   		}
 
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/usb/host/uhci-hcd.c	Wed Oct 30 16:44:33 2002
@@ -739,7 +739,7 @@
 
 	spin_lock_irqsave(&uhci->frame_list_lock, flags);
 
-	if ((!(urb->transfer_flags & USB_NO_FSBR)) && !urbp->fsbr) {
+	if ((!(urb->transfer_flags & URB_NO_FSBR)) && !urbp->fsbr) {
 		urbp->fsbr = 1;
 		if (!uhci->fsbr++ && !uhci->fsbrtimeout)
 			uhci->skel_term_qh->link = cpu_to_le32(uhci->skel_hs_control_qh->dma_handle) | UHCI_PTR_QH;
@@ -755,7 +755,7 @@
 
 	spin_lock_irqsave(&uhci->frame_list_lock, flags);
 
-	if ((!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
+	if ((!(urb->transfer_flags & URB_NO_FSBR)) && urbp->fsbr) {
 		urbp->fsbr = 0;
 		if (!--uhci->fsbr)
 			uhci->fsbrtimeout = jiffies + FSBR_DELAY;
@@ -1124,13 +1124,13 @@
 	} while (len > 0);
 
 	/*
-	 * USB_ZERO_PACKET means adding a 0-length packet, if direction
+	 * URB_ZERO_PACKET means adding a 0-length packet, if direction
 	 * is OUT and the transfer_length was an exact multiple of maxsze,
 	 * hence (len = transfer_length - N * maxsze) == 0
 	 * however, if transfer_length == 0, the zero packet was already
 	 * prepared above.
 	 */
-	if (usb_pipeout(urb->pipe) && (urb->transfer_flags & USB_ZERO_PACKET) &&
+	if (usb_pipeout(urb->pipe) && (urb->transfer_flags & URB_ZERO_PACKET) &&
 	    !len && urb->transfer_buffer_length) {
 		td = uhci_alloc_td(uhci, urb->dev);
 		if (!td)
@@ -1247,10 +1247,11 @@
 
 static inline int uhci_submit_interrupt(struct uhci_hcd *uhci, struct urb *urb, struct urb *eurb)
 {
-	/* Interrupt-IN can't be more than 1 packet */
-	if (usb_pipein(urb->pipe) && urb->transfer_buffer_length > usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)))
-		return -EINVAL;
-
+	/* USB 1.1 interrupt transfers only involve one packet per interval;
+	 * that's the uhci_submit_common() "breadth first" policy.  Drivers
+	 * can submit urbs of any length, but longer ones might need many
+	 * intervals to complete.
+	 */
 	return uhci_submit_common(uhci, urb, eurb, uhci->skelqh[__interval_to_skel(urb->interval)]);
 }
 
@@ -1305,7 +1306,7 @@
 
 	limits = isochronous_find_limits(uhci, urb, &start, &end);
 
-	if (urb->transfer_flags & USB_ISO_ASAP) {
+	if (urb->transfer_flags & URB_ISO_ASAP) {
 		if (limits) {
 			int curframe;
 
@@ -1751,7 +1752,7 @@
 
 		tmp = tmp->next;
 
-		u->transfer_flags |= USB_TIMEOUT_KILLED;
+		u->transfer_flags |= URB_TIMEOUT_KILLED;
 		uhci_urb_dequeue(hcd, u);
 	}
 
@@ -1804,44 +1805,19 @@
 static void uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb)
 {
 	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
-	struct usb_device *dev = urb->dev;
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-	int killed, resubmit_interrupt, status, ret;
+	int status;
 	unsigned long flags;
 
 	spin_lock_irqsave(&urb->lock, flags);
-
- 	killed = (urb->status == -ENOENT || urb->status == -ECONNRESET);
-	resubmit_interrupt = (usb_pipetype(urb->pipe) == PIPE_INTERRUPT &&
-			urb->interval && !killed);
-
 	status = urbp->status;
 	uhci_destroy_urb_priv(uhci, urb);
 
-	if (!killed)
+ 	if (urb->status != -ENOENT && urb->status != -ECONNRESET)
 		urb->status = status;
 	spin_unlock_irqrestore(&urb->lock, flags);
 
-	if (resubmit_interrupt) {
-		urb->complete(urb);
-
-		/* Recheck the status. The completion handler may have */
-		/* unlinked the resubmitting interrupt URB */
-		/* Note that this doesn't do what usb_hcd_giveback_urb() */
-		/* normally does, so that doesn't ever get done. */
-		if (urb->status == -ECONNRESET) {
-			usb_put_urb(urb);
-			return;
-		}
-
-		urb->dev = dev;
-		urb->status = -EINPROGRESS;
-		urb->actual_length = 0;
-		urb->bandwidth = 0;
-		if ((ret = uhci_urb_enqueue(&uhci->hcd, urb, 0)))
-			printk(KERN_ERR __FILE__ ": could not resubmit interrupt URB : %d\n", ret);		  
-	} else
-		usb_hcd_giveback_urb(hcd, urb);
+	usb_hcd_giveback_urb(hcd, urb);
 }
 
 static void uhci_finish_completion(struct usb_hcd *hcd)
diff -Nru a/drivers/usb/image/Config.help b/drivers/usb/image/Config.help
--- a/drivers/usb/image/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,36 +0,0 @@
-CONFIG_USB_MDC800
-  Say Y here if you want to connect this type of still camera to
-  your computer's USB port. This driver can be used with gphoto 0.4.3
-  and higher (look at <http://www.gphoto.org/>).
-  To use it create a device node with "mknod /dev/mustek c 180 32" and
-  configure it in your software.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called mdc800.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_HPUSBSCSI
-  Say Y here if you want support for the HP 53xx series of scanners
-  and the Minolta Scan Dual. This driver is experimental.
-  The scanner will be accessible as a SCSI device.
-  This can be compiled as a module, called hpusbscsi.o.
-
-CONFIG_USB_MICROTEK
-  Say Y here if you want support for the Microtek X6USB and
-  possibly the Phantom 336CX, Phantom C6 and ScanMaker V6U(S)L.
-  Support for anything but the X6 is experimental.
-  Please report failures and successes.
-  The scanner will appear as a scsi generic device to the rest
-  of the system. Scsi support is required.
-  This driver can be compiled as a module, called microtek.o.
-
-CONFIG_USB_SCANNER
-  Say Y here if you want to connect a USB scanner to your computer's
-  USB port. Please read <file:Documentation/usb/scanner.txt> and
-  <file:Documentation/usb/scanner-hp-sane.txt> for more information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called scanner.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/usb/image/Config.in b/drivers/usb/image/Config.in
--- a/drivers/usb/image/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-#
-# USB Imageing devices configuration
-#
-comment 'USB Imaging devices'
-dep_tristate '  USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)' CONFIG_USB_MDC800 $CONFIG_USB $CONFIG_EXPERIMENTAL
-dep_tristate '  USB Scanner support' CONFIG_USB_SCANNER $CONFIG_USB
-dep_tristate '  Microtek X6USB scanner support' CONFIG_USB_MICROTEK $CONFIG_USB $CONFIG_SCSI
-dep_tristate '  HP53xx USB scanner support (EXPERIMENTAL)' CONFIG_USB_HPUSBSCSI $CONFIG_USB $CONFIG_SCSI $CONFIG_EXPERIMENTAL
diff -Nru a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/image/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,55 @@
+#
+# USB Imageing devices configuration
+#
+comment "USB Imaging devices"
+	depends on USB
+
+config USB_MDC800
+	tristate "USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)"
+	depends on USB && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to connect this type of still camera to
+	  your computer's USB port. This driver can be used with gphoto 0.4.3
+	  and higher (look at <http://www.gphoto.org/>).
+	  To use it create a device node with "mknod /dev/mustek c 180 32" and
+	  configure it in your software.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called mdc800.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SCANNER
+	tristate "USB Scanner support"
+	depends on USB
+	help
+	  Say Y here if you want to connect a USB scanner to your computer's
+	  USB port. Please read <file:Documentation/usb/scanner.txt> and
+	  <file:Documentation/usb/scanner-hp-sane.txt> for more information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called scanner.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_MICROTEK
+	tristate "Microtek X6USB scanner support"
+	depends on USB && SCSI
+	help
+	  Say Y here if you want support for the Microtek X6USB and
+	  possibly the Phantom 336CX, Phantom C6 and ScanMaker V6U(S)L.
+	  Support for anything but the X6 is experimental.
+	  Please report failures and successes.
+	  The scanner will appear as a scsi generic device to the rest
+	  of the system. Scsi support is required.
+	  This driver can be compiled as a module, called microtek.o.
+
+config USB_HPUSBSCSI
+	tristate "HP53xx USB scanner support (EXPERIMENTAL)"
+	depends on USB && SCSI && EXPERIMENTAL
+	help
+	  Say Y here if you want support for the HP 53xx series of scanners
+	  and the Minolta Scan Dual. This driver is experimental.
+	  The scanner will be accessible as a SCSI device.
+	  This can be compiled as a module, called hpusbscsi.o.
+
diff -Nru a/drivers/usb/image/hpusbscsi.c b/drivers/usb/image/hpusbscsi.c
--- a/drivers/usb/image/hpusbscsi.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/usb/image/hpusbscsi.c	Wed Oct 30 16:44:35 2002
@@ -12,7 +12,6 @@
 #include <linux/blk.h>
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
-#include "../../scsi/sd.h"
 
 #include "hpusbscsi.h"
 
@@ -31,19 +30,19 @@
 /* USB related parts */
 
 static int
-hpusbscsi_usb_probe (struct usb_interface *intf, 
+hpusbscsi_usb_probe (struct usb_interface *intf,
 		     const struct usb_device_id *id)
 {
 	struct hpusbscsi *new;
 	struct usb_device *dev = interface_to_usbdev (intf);
-	struct usb_interface_descriptor *altsetting =
+	struct usb_host_interface *altsetting =
 		&(intf->altsetting[0]);
 
 	int i, result;
 
 	/* basic check */
 
-	if (altsetting->bNumEndpoints != 3) {
+	if (altsetting->desc.bNumEndpoints != 3) {
 		printk (KERN_ERR "Wrong number of endpoints\n");
 		return -ENODEV;
 	}
@@ -77,43 +76,38 @@
 
 	/* finding endpoints */
 
-	for (i = 0; i < altsetting->bNumEndpoints; i++) {
+	for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
 		if (
-		    (altsetting->endpoint[i].
+		    (altsetting->endpoint[i].desc.
 		     bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
 		    USB_ENDPOINT_XFER_BULK) {
-			if (altsetting->endpoint[i].
+			if (altsetting->endpoint[i].desc.
 			    bEndpointAddress & USB_DIR_IN) {
 				new->ep_in =
-					altsetting->endpoint[i].
+					altsetting->endpoint[i].desc.
 					bEndpointAddress &
 					USB_ENDPOINT_NUMBER_MASK;
 			} else {
 				new->ep_out =
-					altsetting->endpoint[i].
+					altsetting->endpoint[i].desc.
 					bEndpointAddress &
 					USB_ENDPOINT_NUMBER_MASK;
 			}
 		} else {
 			new->ep_int =
-				altsetting->endpoint[i].
+				altsetting->endpoint[i].desc.
 				bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-			new->interrupt_interval= altsetting->endpoint[i].bInterval;
+			new->interrupt_interval= altsetting->endpoint[i].desc.bInterval;
 		}
 	}
 
 	/* USB initialisation magic for the simple case */
 
-	result = usb_set_interface (dev, altsetting->bInterfaceNumber, 0);
+	result = usb_set_interface (dev, altsetting->desc.bInterfaceNumber, 0);
 
 	switch (result) {
 	case 0:		/* no error */
 		break;
-
-	case -EPIPE:
-		usb_clear_halt (dev, usb_sndctrlpipe (dev, 0));
-		break;
-
 	default:
 		printk (KERN_ERR "unknown error %d from usb_set_interface\n",
 			 result);
@@ -250,7 +244,7 @@
 	sht->proc_dir = NULL;
 
 	/* build and submit an interrupt URB for status byte handling */
- 	FILL_INT_URB(desc->controlurb,
+ 	usb_fill_int_urb(desc->controlurb,
 			desc->dev,
 			usb_rcvintpipe(desc->dev,desc->ep_int),
 			&desc->scsi_state_byte,
@@ -327,7 +321,7 @@
 	TRACE_STATE;
 
 	/* We prepare the urb for writing out the scsi command */
-	FILL_BULK_URB(
+	usb_fill_bulk_urb(
 		hpusbscsi->dataurb,
 		hpusbscsi->dev,
 		usb_sndbulkpipe(hpusbscsi->dev,hpusbscsi->ep_out),
@@ -483,7 +477,7 @@
 		hpusbscsi->state = HP_STATE_WORKING;
 	TRACE_STATE;
 
-        FILL_BULK_URB(
+        usb_fill_bulk_urb(
                 u,
                 hpusbscsi->dev,
                 hpusbscsi->current_data_pipe,
@@ -537,7 +531,7 @@
 		return;
         }
 
-	FILL_BULK_URB(
+	usb_fill_bulk_urb(
 		u,
 		hpusbscsi->dev,
 		hpusbscsi->current_data_pipe,
@@ -568,7 +562,7 @@
 		return;
         }
 
-	FILL_BULK_URB(
+	usb_fill_bulk_urb(
 		u,
 		hpusbscsi->dev,
 		hpusbscsi->current_data_pipe,
@@ -588,7 +582,7 @@
 
 static void issue_request_sense (struct hpusbscsi *hpusbscsi)
 {
-	FILL_BULK_URB(
+	usb_fill_bulk_urb(
 		hpusbscsi->dataurb,
 		hpusbscsi->dev,
 		usb_sndbulkpipe(hpusbscsi->dev, hpusbscsi->ep_out),
diff -Nru a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
--- a/drivers/usb/image/mdc800.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/image/mdc800.c	Wed Oct 30 16:44:29 2002
@@ -410,7 +410,7 @@
 			       const struct usb_device_id *id)
 {
 	int i,j;
-	struct usb_interface_descriptor	*intf_desc;
+	struct usb_host_interface *intf_desc;
 	struct usb_device *dev = interface_to_usbdev (intf);
 	int irq_interval=0;
 	int retval;
@@ -432,10 +432,10 @@
 	intf_desc = &intf->altsetting[0];
 
 	if (
-			( intf_desc->bInterfaceClass != 0xff )
-		||	( intf_desc->bInterfaceSubClass != 0 )
-		|| ( intf_desc->bInterfaceProtocol != 0 )
-		|| ( intf_desc->bNumEndpoints != 4)
+			( intf_desc->desc.bInterfaceClass != 0xff )
+		||	( intf_desc->desc.bInterfaceSubClass != 0 )
+		|| ( intf_desc->desc.bInterfaceProtocol != 0 )
+		|| ( intf_desc->desc.bNumEndpoints != 4)
 	)
 	{
 		err ("probe fails -> wrong Interface");
@@ -448,12 +448,12 @@
 		mdc800->endpoint[i]=-1;
 		for (j=0; j<4; j++)
 		{
-			if (mdc800_endpoint_equals (&intf_desc->endpoint [j],&mdc800_ed [i]))
+			if (mdc800_endpoint_equals (&intf_desc->endpoint [j].desc,&mdc800_ed [i]))
 			{
-				mdc800->endpoint[i]=intf_desc->endpoint [j].bEndpointAddress ;
+				mdc800->endpoint[i]=intf_desc->endpoint [j].desc.bEndpointAddress ;
 				if (i==1)
 				{
-					irq_interval=intf_desc->endpoint [j].bInterval;
+					irq_interval=intf_desc->endpoint [j].desc.bInterval;
 				}
 
 				continue;
@@ -468,7 +468,7 @@
 
 
 	usb_driver_claim_interface (&mdc800_usb_driver, intf, mdc800);
-	if (usb_set_interface (dev, intf_desc->bInterfaceNumber, 0) < 0)
+	if (usb_set_interface (dev, intf_desc->desc.bInterfaceNumber, 0) < 0)
 	{
 		err ("MDC800 Configuration fails.");
 		return -ENODEV;
@@ -488,7 +488,7 @@
 	mdc800->open=0;
 
 	/* Setup URB Structs */
-	FILL_INT_URB (
+	usb_fill_int_urb (
 		mdc800->irq_urb,
 		mdc800->dev,
 		usb_rcvintpipe (mdc800->dev,mdc800->endpoint [1]),
@@ -499,7 +499,7 @@
 		irq_interval
 	);
 
-	FILL_BULK_URB (
+	usb_fill_bulk_urb (
 		mdc800->write_urb,
 		mdc800->dev,
 		usb_sndbulkpipe (mdc800->dev, mdc800->endpoint[0]),
@@ -509,7 +509,7 @@
 		mdc800
 	);
 
-	FILL_BULK_URB (
+	usb_fill_bulk_urb (
 		mdc800->download_urb,
 		mdc800->dev,
 		usb_rcvbulkpipe (mdc800->dev, mdc800->endpoint [3]),
diff -Nru a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
--- a/drivers/usb/image/microtek.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/usb/image/microtek.c	Wed Oct 30 16:44:36 2002
@@ -137,7 +137,6 @@
 #include <linux/blk.h>
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
-#include "../../scsi/sd.h"
 
 #include "microtek.h"
 
@@ -488,7 +487,7 @@
 
 	MTS_INT_INIT();
 
-	FILL_BULK_URB(transfer,
+	usb_fill_bulk_urb(transfer,
 		      context->instance->usb_dev,
 		      pipe,
 		      data,
@@ -716,7 +715,7 @@
 	}
 
 	
-	FILL_BULK_URB(desc->urb,
+	usb_fill_bulk_urb(desc->urb,
 		      desc->usb_dev,
 		      usb_sndbulkpipe(desc->usb_dev,desc->ep_out),
 		      srb->cmnd,
@@ -852,7 +851,7 @@
 	struct usb_device *dev = interface_to_usbdev (intf);
 
 	/* the altsettting 0 on the interface we're probing */
-	struct usb_interface_descriptor *altsetting;
+	struct usb_host_interface *altsetting;
 
 	MTS_DEBUG_GOT_HERE();
 	MTS_DEBUG( "usb-device descriptor at %x\n", (int)dev );
@@ -878,23 +877,23 @@
 
 	/* Check if the config is sane */
 
-	if ( altsetting->bNumEndpoints != MTS_EP_TOTAL ) {
+	if ( altsetting->desc.bNumEndpoints != MTS_EP_TOTAL ) {
 		MTS_WARNING( "expecting %d got %d endpoints! Bailing out.\n",
-			     (int)MTS_EP_TOTAL, (int)altsetting->bNumEndpoints );
+			     (int)MTS_EP_TOTAL, (int)altsetting->desc.bNumEndpoints );
 		return -ENODEV;
 	}
 
-	for( i = 0; i < altsetting->bNumEndpoints; i++ ) {
-		if ((altsetting->endpoint[i].bmAttributes &
+	for( i = 0; i < altsetting->desc.bNumEndpoints; i++ ) {
+		if ((altsetting->endpoint[i].desc.bmAttributes &
 		     USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK) {
 
 			MTS_WARNING( "can only deal with bulk endpoints; endpoint %d is not bulk.\n",
-			     (int)altsetting->endpoint[i].bEndpointAddress );
+			     (int)altsetting->endpoint[i].desc.bEndpointAddress );
 		} else {
-			if (altsetting->endpoint[i].bEndpointAddress &
+			if (altsetting->endpoint[i].desc.bEndpointAddress &
 			    USB_DIR_IN)
 				*ep_in_current++
-					= altsetting->endpoint[i].bEndpointAddress &
+					= altsetting->endpoint[i].desc.bEndpointAddress &
 					USB_ENDPOINT_NUMBER_MASK;
 			else {
 				if ( ep_out != -1 ) {
@@ -902,7 +901,7 @@
 					return -ENODEV;
 				}
 
-				ep_out = altsetting->endpoint[i].bEndpointAddress &
+				ep_out = altsetting->endpoint[i].desc.bEndpointAddress &
 					USB_ENDPOINT_NUMBER_MASK;
 			}
 		}
@@ -915,23 +914,14 @@
 		return -ENODEV;
 	}
 
-
-	/* I don't understand the following fully (it's from usb-storage) -- John */
-
-	/* set the interface -- STALL is an acceptable response here */
-	result = usb_set_interface(dev, altsetting->bInterfaceNumber, 0);
+	result = usb_set_interface(dev, altsetting->desc.bInterfaceNumber, 0);
 
 	MTS_DEBUG("usb_set_interface returned %d.\n",result);
 	switch( result )
 	{
 	case 0: /* no error */
 		break;
-		
-	case -EPIPE:
-		usb_clear_halt(dev, usb_sndctrlpipe(dev, 0));
-		MTS_DEBUG( "clearing clearing stall on control interface\n" );
-		break;
-		
+
 	default:
 		MTS_DEBUG( "unknown error %d from usb_set_interface\n",
 			(int)result );
diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c
--- a/drivers/usb/image/scanner.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/image/scanner.c	Wed Oct 30 16:44:26 2002
@@ -364,18 +364,33 @@
 
 	struct scn_usb_data *scn;
 	unsigned char *data;
+	int status;
+
 	scn = urb->context;
 
 	data = &scn->button;
 	data += 0;		/* Keep gcc from complaining about unused var */
 
-	if (urb->status) {
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
 	}
 
 	dbg("irq_scanner(%d): data:%x", scn->scn_minor, *data);
 
-	return;
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 static int
@@ -824,7 +839,7 @@
 {
 	struct usb_device *dev = interface_to_usbdev (intf);
 	struct scn_usb_data *scn;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_endpoint_descriptor *endpoint;
 
 	int ep_cnt;
@@ -890,13 +905,13 @@
 		return -ENODEV;
 	}
 
-	if (dev->config[0].bNumInterfaces != 1) {
+	if (dev->config[0].desc.bNumInterfaces != 1) {
 		info("probe_scanner: Only one device interface is supported.");
 		return -ENODEV;
 	}
 
 	interface = intf->altsetting;
-	endpoint = interface->endpoint;
+	endpoint = &interface->endpoint[0].desc;
 
 /*
  * Start checking for two bulk endpoints OR two bulk endpoints *and* one
@@ -904,16 +919,16 @@
  * setup the handler. FIXME: This is a future enhancement...
  */
 
-	dbg("probe_scanner: Number of Endpoints:%d", (int) interface->bNumEndpoints);
+	dbg("probe_scanner: Number of Endpoints:%d", (int) interface->desc.bNumEndpoints);
 
-	if ((interface->bNumEndpoints != 2) && (interface->bNumEndpoints != 3)) {
+	if ((interface->desc.bNumEndpoints != 2) && (interface->desc.bNumEndpoints != 3)) {
 		info("probe_scanner: Only two or three endpoints supported.");
 		return -ENODEV;
 	}
 
 	ep_cnt = have_bulk_in = have_bulk_out = have_intr = 0;
 
-	while (ep_cnt < interface->bNumEndpoints) {
+	while (ep_cnt < interface->desc.bNumEndpoints) {
 
 		if (!have_bulk_in && IS_EP_BULK_IN(endpoint[ep_cnt])) {
 			ep_cnt++;
@@ -945,7 +960,7 @@
  * should have.
  */
 
-	switch(interface->bNumEndpoints) {
+	switch(interface->desc.bNumEndpoints) {
 	case 2:
 		if (!have_bulk_in || !have_bulk_out) {
 			info("probe_scanner: Two bulk endpoints required.");
@@ -1009,7 +1024,7 @@
 /* Ok, if we detected an interrupt EP, setup a handler for it */
 	if (have_intr) {
 		dbg("probe_scanner(%d): Configuring IRQ handler for intr EP:%d", scn_minor, have_intr);
-		FILL_INT_URB(scn->scn_irq, dev,
+		usb_fill_int_urb(scn->scn_irq, dev,
 			     usb_rcvintpipe(dev, have_intr),
 			     &scn->button, 1, irq_scanner, scn,
 			     // endpoint[(int)have_intr].bInterval);
diff -Nru a/drivers/usb/input/Config.help b/drivers/usb/input/Config.help
--- a/drivers/usb/input/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,139 +0,0 @@
-CONFIG_USB_HID
-  Say Y here if you want full HID support to connect keyboards,
-  mice, joysticks, graphic tablets, or any other HID based devices
-  to your computer via USB. You also need to select HID Input layer
-  support (below) if you want to use keyboards, mice, joysticks and
-  the like.
-
-  You can't use this driver and the HIDBP (Boot Protocol) keyboard
-  and mouse drivers at the same time. More information is available:
-  <file:Documentation/input/input.txt>.
-
-  If unsure, say Y.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called hid.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_HIDINPUT
-  Say Y here if you want to use a USB keyboard, mouse or joystick,
-  or any other HID input device. You also need "Input core support", 
-  (CONFIG_INPUT), which you select under "Input device support", above.
-
-  If unsure, say Y.
-
-CONFIG_HID_FF
-  Say Y here is you want force feedback support for a few HID devices. See
-  below for a list of supported devices.
-  See Documentation/input/ff.txt for a description of the force feedback API.
-
-  If unsure, say N.
-
-CONFIG_LOGITECH_FF
-  Say Y here if you have one of these devices:
-  - Logitech WingMan Cordless RumblePad
-  - Logitech WingMan Force 3D
-  and if you want to enable force feedback for them.
-  Note: if you say N here, this device will still be supported, but without
-  force feedback.
-
-CONFIG_HID_PID
-  Say Y here if you have a PID-compliant joystick and wish to enable force
-  feedback for it. The Microsoft Sidewinder Force Feedback 2 is one such
-  device.
-
-CONFIG_LOGITECH_3D
-  Say Y here if you have a Logitech force feedback device from the
-  *3D family.
-
-CONFIG_USB_HIDDEV
-  Say Y here if you want to support HID devices (from the USB
-  specification standpoint) that aren't strictly user interface
-  devices, like monitor controls and Uninterruptable Power Supplies.
-
-  This module supports these devices separately using a separate
-  event interface on /dev/usb/hiddevX (char 180:96 to 180:111).
-  This driver requires CONFIG_USB_HID.
-
-  If unsure, say Y.
-
-CONFIG_USB_KBD
-  Say Y here only if you are absolutely sure that you don't want
-  to use the generic HID driver for your USB keyboard and prefer
-  to use the keyboard in its limited Boot Protocol mode instead.
-
-  This is almost certainly not what you want.  This is mostly
-  useful for embedded applications or simple keyboards.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usbkbd.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If even remotely unsure, say N.
-
-CONFIG_USB_MOUSE
-  Say Y here only if you are absolutely sure that you don't want
-  to use the generic HID driver for your USB keyboard and prefer
-  to use the keyboard in its limited Boot Protocol mode instead.
-
-  This is almost certainly not what you want.  This is mostly
-  useful for embedded applications or simple mice.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usbmouse.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  If even remotely unsure, say N.
-
-CONFIG_USB_AIPTEK
-  Say Y here if you want to use the USB version of the Aiptek 6000U
-  or Aiptek 8000U tablet.  Make sure to say Y to "Mouse support"
-  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
-  (CONFIG_INPUT_EVDEV) as well.
-
-  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 aiptek.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_WACOM
-  Say Y here if you want to use the USB version of the Wacom Intuos
-  or Graphire tablet.  Make sure to say Y to "Mouse support"
-  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
-  (CONFIG_INPUT_EVDEV) as well.
-
-  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 wacom.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_POWERMATE
-  Say Y here if you want to use  Griffin PowerMate or Contour Jog devices.
-  These are stainless steel dials which can measure clockwise and
-  anticlockwise rotation. The dial also acts as a pushbutton. The base
-  contains an LED which can be instructed to pulse or to switch to a
-  particular intensity.
-
-  You can download userspace tools from http://sowerbutts.com/powermate/
-
-  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 powermate.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_XPAD
-  Say Y here if you want to use the X-Box pad with your computer.
-  Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
-  and/or "Event interface support" (CONFIG_INPUT_EVDEV) as well.
-
-  For information about how to connect the X-Box pad to USB, see
-  Documentation/input/xpad.txt.
-
-  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 wacom.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
diff -Nru a/drivers/usb/input/Config.in b/drivers/usb/input/Config.in
--- a/drivers/usb/input/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,28 +0,0 @@
-#
-# USB Input driver configuration
-#
-comment 'USB Human Interface Devices (HID)'
-dep_tristate '  USB Human Interface Device (full HID) support' CONFIG_USB_HID $CONFIG_USB
-
-if [ "$CONFIG_INPUT" = "n" ]; then
-   comment '    Input core support is needed for USB HID input layer or HIDBP support'
-fi
-
-dep_mbool '    HID input layer support' CONFIG_USB_HIDINPUT $CONFIG_INPUT $CONFIG_USB_HID
-dep_mbool '      Force feedback support (EXPERIMENTAL)' CONFIG_HID_FF $CONFIG_USB_HIDINPUT $CONFIG_EXPERIMENTAL
-dep_mbool '        PID Devices' CONFIG_HID_PID $CONFIG_USB_HID $CONFIG_HID_FF
-dep_mbool '        Logitech WingMan *3D support' CONFIG_LOGITECH_FF $CONFIG_USB_HID $CONFIG_HID_FF
-dep_mbool '    /dev/hiddev raw HID device support' CONFIG_USB_HIDDEV $CONFIG_USB_HID
-
-if [ "$CONFIG_USB_HID" != "y" ]; then
-   mainmenu_option next_comment
-   comment 'USB HID Boot Protocol drivers'
-   dep_tristate '  USB HIDBP Keyboard (simple Boot) support' CONFIG_USB_KBD $CONFIG_USB $CONFIG_INPUT
-   dep_tristate '  USB HIDBP Mouse (simple Boot) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
-   endmenu
-fi
-
-dep_tristate '  Aiptek 6000U/8000U tablet support' CONFIG_USB_AIPTEK $CONFIG_USB $CONFIG_INPUT
-dep_tristate '  Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
-dep_tristate '  Griffin PowerMate and Contour Jog support' CONFIG_USB_POWERMATE $CONFIG_USB $CONFIG_INPUT
-dep_tristate '  X-Box gamepad support' CONFIG_USB_XPAD $CONFIG_USB $CONFIG_INPUT
diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/input/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,186 @@
+#
+# USB Input driver configuration
+#
+comment "USB Human Interface Devices (HID)"
+	depends on USB
+
+config USB_HID
+	tristate "USB Human Interface Device (full HID) support"
+	depends on USB
+	---help---
+	  Say Y here if you want full HID support to connect keyboards,
+	  mice, joysticks, graphic tablets, or any other HID based devices
+	  to your computer via USB. You also need to select HID Input layer
+	  support (below) if you want to use keyboards, mice, joysticks and
+	  the like.
+
+	  You can't use this driver and the HIDBP (Boot Protocol) keyboard
+	  and mouse drivers at the same time. More information is available:
+	  <file:Documentation/input/input.txt>.
+
+	  If unsure, say Y.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called hid.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+comment "Input core support is needed for USB HID input layer or HIDBP support"
+	depends on USB && INPUT=n
+
+config USB_HIDINPUT
+	bool "HID input layer support"
+	depends on INPUT && USB_HID
+	help
+	  Say Y here if you want to use a USB keyboard, mouse or joystick,
+	  or any other HID input device. You also need "Input core support", 
+	  (CONFIG_INPUT), which you select under "Input device support", above.
+
+	  If unsure, say Y.
+
+config HID_FF
+	bool "Force feedback support (EXPERIMENTAL)"
+	depends on USB_HIDINPUT && EXPERIMENTAL
+	help
+	  Say Y here is you want force feedback support for a few HID devices. See
+	  below for a list of supported devices.
+	  See Documentation/input/ff.txt for a description of the force feedback API.
+
+	  If unsure, say N.
+
+config HID_PID
+	bool "PID Devices"
+	depends on HID_FF
+	help
+	  Say Y here if you have a PID-compliant joystick and wish to enable force
+	  feedback for it. The Microsoft Sidewinder Force Feedback 2 is one such
+	  device.
+
+config LOGITECH_FF
+	bool "Logitech WingMan *3D support"
+	depends on HID_FF
+	help
+	  Say Y here if you have one of these devices:
+	  - Logitech WingMan Cordless RumblePad
+	  - Logitech WingMan Force 3D
+	  and if you want to enable force feedback for them.
+	  Note: if you say N here, this device will still be supported, but without
+	  force feedback.
+
+config USB_HIDDEV
+	bool "/dev/hiddev raw HID device support"
+	depends on USB_HID
+	help
+	  Say Y here if you want to support HID devices (from the USB
+	  specification standpoint) that aren't strictly user interface
+	  devices, like monitor controls and Uninterruptable Power Supplies.
+
+	  This module supports these devices separately using a separate
+	  event interface on /dev/usb/hiddevX (char 180:96 to 180:111).
+	  This driver requires CONFIG_USB_HID.
+
+	  If unsure, say Y.
+
+
+menu "USB HID Boot Protocol drivers"
+	depends on USB!=n && USB_HID!=y
+
+config USB_KBD
+	tristate "USB HIDBP Keyboard (simple Boot) support"
+	depends on USB && INPUT
+	---help---
+	  Say Y here only if you are absolutely sure that you don't want
+	  to use the generic HID driver for your USB keyboard and prefer
+	  to use the keyboard in its limited Boot Protocol mode instead.
+
+	  This is almost certainly not what you want.  This is mostly
+	  useful for embedded applications or simple keyboards.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usbkbd.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If even remotely unsure, say N.
+
+config USB_MOUSE
+	tristate "USB HIDBP Mouse (simple Boot) support"
+	depends on USB && INPUT
+	---help---
+	  Say Y here only if you are absolutely sure that you don't want
+	  to use the generic HID driver for your USB keyboard and prefer
+	  to use the keyboard in its limited Boot Protocol mode instead.
+
+	  This is almost certainly not what you want.  This is mostly
+	  useful for embedded applications or simple mice.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usbmouse.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If even remotely unsure, say N.
+
+endmenu
+
+config USB_AIPTEK
+	tristate "Aiptek 6000U/8000U tablet support"
+	depends on USB && INPUT
+	help
+	  Say Y here if you want to use the USB version of the Aiptek 6000U
+	  or Aiptek 8000U tablet.  Make sure to say Y to "Mouse support"
+	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+	  (CONFIG_INPUT_EVDEV) as well.
+
+	  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 aiptek.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_WACOM
+	tristate "Wacom Intuos/Graphire tablet support"
+	depends on USB && INPUT
+	help
+	  Say Y here if you want to use the USB version of the Wacom Intuos
+	  or Graphire tablet.  Make sure to say Y to "Mouse support"
+	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+	  (CONFIG_INPUT_EVDEV) as well.
+
+	  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 wacom.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_POWERMATE
+	tristate "Griffin PowerMate and Contour Jog support"
+	depends on USB && INPUT
+	---help---
+	  Say Y here if you want to use  Griffin PowerMate or Contour Jog devices.
+	  These are stainless steel dials which can measure clockwise and
+	  anticlockwise rotation. The dial also acts as a pushbutton. The base
+	  contains an LED which can be instructed to pulse or to switch to a
+	  particular intensity.
+
+	  You can download userspace tools from http://sowerbutts.com/powermate/
+
+	  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 powermate.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_XPAD
+	tristate "X-Box gamepad support"
+	depends on USB && INPUT
+	---help---
+	  Say Y here if you want to use the X-Box pad with your computer.
+	  Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
+	  and/or "Event interface support" (CONFIG_INPUT_EVDEV) as well.
+
+	  For information about how to connect the X-Box pad to USB, see
+	  Documentation/input/xpad.txt.
+
+	  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 wacom.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
--- a/drivers/usb/input/aiptek.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/usb/input/aiptek.c	Wed Oct 30 16:44:31 2002
@@ -134,9 +134,22 @@
 	int y;
 	int pressure;
 	int proximity;
+	int retval;
 
-	if (urb->status)
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
 	if ((data[0] & 2) == 0) {
 		dbg("received unknown report #%d", data[0]);
@@ -165,6 +178,11 @@
 
 	input_sync(dev);
 
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 struct aiptek_features aiptek_features[] = {
@@ -295,7 +313,7 @@
 	aiptek->dev.id.version = dev->descriptor.bcdDevice;
 	aiptek->usbdev = dev;
 
-	endpoint = intf->altsetting[0].endpoint + 0;
+	endpoint = &intf->altsetting[0].endpoint[0].desc;
 
 	if (aiptek->features->pktlen > 10)
 		BUG();
diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/input/hid-core.c	Wed Oct 30 16:44:29 2002
@@ -900,12 +900,26 @@
 
 static void hid_irq_in(struct urb *urb)
 {
-	if (urb->status) {
-		dbg("nonzero status in input irq %d", urb->status);
+	struct hid_device	*hid = urb->context;
+	int			status;
+
+	switch (urb->status) {
+	case 0:			/* success */
+		hid_input_report(HID_INPUT_REPORT, urb);
+		break;
+	case -ECONNRESET:	/* unlink */
+	case -ENOENT:
+	case -ESHUTDOWN:
 		return;
+	default:		/* error */
+		dbg("nonzero status in input irq %d", urb->status);
 	}
-
-	hid_input_report(HID_INPUT_REPORT, urb);
+	
+	status = usb_submit_urb (urb, SLAB_ATOMIC);
+	if (status)
+		err ("can't resubmit intr, %s-%s/input%d, status %d",
+				hid->dev->bus->bus_name, hid->dev->devpath,
+				hid->ifnum, status);
 }
 
 /*
@@ -1372,7 +1386,7 @@
 
 static struct hid_device *usb_hid_configure(struct usb_interface *intf)
 {
-	struct usb_interface_descriptor *interface = intf->altsetting + intf->act_altsetting;
+	struct usb_host_interface *interface = intf->altsetting + intf->act_altsetting;
 	struct usb_device *dev = interface_to_usbdev (intf);
 	struct hid_descriptor *hdesc;
 	struct hid_device *hid;
@@ -1388,7 +1402,7 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
-	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) && ((!interface->bNumEndpoints) ||
+	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) && ((!interface->desc.bNumEndpoints) ||
 		usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
 			dbg("class descriptor not present\n");
 			return NULL;
@@ -1408,7 +1422,7 @@
 		return NULL;
 	}
 
-	if ((n = hid_get_class_descriptor(dev, interface->bInterfaceNumber, HID_DT_REPORT, rdesc, rsize)) < 0) {
+	if ((n = hid_get_class_descriptor(dev, interface->desc.bInterfaceNumber, HID_DT_REPORT, rdesc, rsize)) < 0) {
 		dbg("reading report descriptor failed");
 		kfree(rdesc);
 		return NULL;
@@ -1435,11 +1449,12 @@
 		goto fail;
 	}
 
-	for (n = 0; n < interface->bNumEndpoints; n++) {
+	for (n = 0; n < interface->desc.bNumEndpoints; n++) {
 
-		struct usb_endpoint_descriptor *endpoint = &interface->endpoint[n];
+		struct usb_endpoint_descriptor *endpoint;
 		int pipe;
 
+		endpoint = &interface->endpoint[n].desc;
 		if ((endpoint->bmAttributes & 3) != 3)		/* Not an interrupt endpoint */
 			continue;
 
@@ -1479,7 +1494,7 @@
 	hid->version = le16_to_cpu(hdesc->bcdHID);
 	hid->country = hdesc->bCountryCode;
 	hid->dev = dev;
-	hid->ifnum = interface->bInterfaceNumber;
+	hid->ifnum = interface->desc.bInterfaceNumber;
 
 	hid->name[0] = 0;
 
@@ -1496,7 +1511,8 @@
 		snprintf(hid->name, 128, "%04x:%04x", dev->descriptor.idVendor, dev->descriptor.idProduct);
 
 	usb_make_path(dev, buf, 64);
-	snprintf(hid->phys, 64, "%s/input%d", buf, intf->altsetting[0].bInterfaceNumber);
+	snprintf(hid->phys, 64, "%s/input%d", buf,
+			intf->altsetting[0].desc.bInterfaceNumber);
 
 	if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0)
 		hid->uniq[0] = 0;
diff -Nru a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
--- a/drivers/usb/input/hiddev.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/input/hiddev.c	Wed Oct 30 16:44:28 2002
@@ -701,7 +701,7 @@
 	init_waitqueue_head(&hiddev->wait);
 
 	hiddev->minor = minor;
-	hiddev_table[minor] = hiddev;
+	hiddev_table[minor - HIDDEV_MINOR_BASE] = hiddev;
 
 	hiddev->hid = hid;
 	hiddev->exist = 1;
diff -Nru a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
--- a/drivers/usb/input/powermate.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/input/powermate.c	Wed Oct 30 16:44:29 2002
@@ -78,14 +78,33 @@
 static void powermate_irq(struct urb *urb)
 {
 	struct powermate_device *pm = urb->context;
+	int retval;
 
-	if (urb->status)
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
 	/* handle updates to device state */
 	input_report_key(&pm->input, BTN_0, pm->data[0] & 0x01);
 	input_report_rel(&pm->input, REL_DIAL, pm->data[1]);
 	input_sync(&pm->input);
+
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 /* Decide if we need to issue a control message and do so. Must be called with pm->lock down */
@@ -271,14 +290,14 @@
 static int powermate_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
 	struct usb_device *udev = interface_to_usbdev (intf);
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_endpoint_descriptor *endpoint;
 	struct powermate_device *pm;
 	int pipe, maxp;
 	char path[64];
 
 	interface = intf->altsetting + 0;
-	endpoint = interface->endpoint + 0;
+	endpoint = &interface->endpoint[0].desc;
 	if (!(endpoint->bEndpointAddress & 0x80))
 		return -EIO;
 	if ((endpoint->bmAttributes & 3) != 3)
@@ -286,7 +305,7 @@
 
 	usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
 		0x0a, USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-		0, interface->bInterfaceNumber, NULL, 0,
+		0, interface->desc.bInterfaceNumber, NULL, 0,
 		HZ * USB_CTRL_SET_TIMEOUT);
 
 	if (!(pm = kmalloc(sizeof(struct powermate_device), GFP_KERNEL)))
diff -Nru a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c
--- a/drivers/usb/input/usbkbd.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/input/usbkbd.c	Wed Oct 30 16:44:27 2002
@@ -87,7 +87,17 @@
 	struct usb_kbd *kbd = urb->context;
 	int i;
 
-	if (urb->status) return;
+	switch (urb->status) {
+	case 0:			/* success */
+		break;
+	case -ECONNRESET:	/* unlink */
+	case -ENOENT:
+	case -ESHUTDOWN:
+		return;
+	/* -EPIPE:  should clear the halt */
+	default:		/* error */
+		goto resubmit;
+	}
 
 	for (i = 0; i < 8; i++)
 		input_report_key(&kbd->dev, usb_kbd_keycode[i + 224], (kbd->new[0] >> i) & 1);
@@ -112,6 +122,13 @@
 	input_sync(&kbd->dev);
 
 	memcpy(kbd->old, kbd->new, 8);
+
+resubmit:
+	i = usb_submit_urb (urb, SLAB_ATOMIC);
+	if (i)
+		err ("can't resubmit intr, %s-%s/input0, status %d",
+				kbd->usbdev->bus->bus_name,
+				kbd->usbdev->devpath, i);
 }
 
 int usb_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
@@ -211,7 +228,7 @@
 			 const struct usb_device_id *id)
 {
 	struct usb_device * dev = interface_to_usbdev(iface);
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_kbd *kbd;
 	int i, pipe, maxp;
@@ -220,10 +237,10 @@
 
 	interface = &iface->altsetting[iface->act_altsetting];
 
-	if (interface->bNumEndpoints != 1)
+	if (interface->desc.bNumEndpoints != 1)
 		return -ENODEV;
 
-	endpoint = interface->endpoint + 0;
+	endpoint = &interface->endpoint[0].desc;
 	if (!(endpoint->bEndpointAddress & 0x80))
 		return -ENODEV;
 	if ((endpoint->bmAttributes & 3) != 3)
@@ -265,7 +282,7 @@
 	kbd->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
 	kbd->cr->bRequest = 0x09;
 	kbd->cr->wValue = cpu_to_le16(0x200);
-	kbd->cr->wIndex = cpu_to_le16(interface->bInterfaceNumber);
+	kbd->cr->wIndex = cpu_to_le16(interface->desc.bInterfaceNumber);
 	kbd->cr->wLength = cpu_to_le16(1);
 
 	usb_make_path(dev, path, 64);
diff -Nru a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c
--- a/drivers/usb/input/usbmouse.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/usb/input/usbmouse.c	Wed Oct 30 16:44:34 2002
@@ -62,8 +62,20 @@
 	struct usb_mouse *mouse = urb->context;
 	signed char *data = mouse->data;
 	struct input_dev *dev = &mouse->dev;
+	int status;
+
+	switch (urb->status) {
+	case 0:			/* success */
+		break;
+	case -ECONNRESET:	/* unlink */
+	case -ENOENT:
+	case -ESHUTDOWN:
+		return;
+	/* -EPIPE:  should clear the halt */
+	default:		/* error */
+		goto resubmit;
+	}
 
-	if (urb->status) return;
 
 	input_report_key(dev, BTN_LEFT,   data[0] & 0x01);
 	input_report_key(dev, BTN_RIGHT,  data[0] & 0x02);
@@ -76,6 +88,12 @@
 	input_report_rel(dev, REL_WHEEL, data[3]);
 
 	input_sync(dev);
+resubmit:
+	status = usb_submit_urb (urb, SLAB_ATOMIC);
+	if (status)
+		err ("can't resubmit intr, %s-%s/input0, status %d",
+				mouse->usbdev->bus->bus_name,
+				mouse->usbdev->devpath, status);
 }
 
 static int usb_mouse_open(struct input_dev *dev)
@@ -103,7 +121,7 @@
 static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_id * id)
 {
 	struct usb_device * dev = interface_to_usbdev(intf);
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_mouse *mouse;
 	int pipe, maxp;
@@ -112,10 +130,10 @@
 
 	interface = &intf->altsetting[intf->act_altsetting];
 
-	if (interface->bNumEndpoints != 1) 
+	if (interface->desc.bNumEndpoints != 1) 
 		return -ENODEV;
 
-	endpoint = interface->endpoint + 0;
+	endpoint = &interface->endpoint[0].desc;
 	if (!(endpoint->bEndpointAddress & 0x80)) 
 		return -ENODEV;
 	if ((endpoint->bmAttributes & 3) != 3) 
diff -Nru a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c
--- a/drivers/usb/input/wacom.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/usb/input/wacom.c	Wed Oct 30 16:44:19 2002
@@ -108,8 +108,22 @@
 	unsigned char *data = wacom->data;
 	struct input_dev *dev = &wacom->dev;
 	int prox, pressure;
+	int retval;
 
-	if (urb->status) return;
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
 	if (data[0] != 2)
 		dbg("received unknown report #%d", data[0]);
@@ -135,6 +149,12 @@
 	}
 	
 	input_sync(dev);
+
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 static void wacom_penpartner_irq(struct urb *urb)
@@ -142,8 +162,22 @@
 	struct wacom *wacom = urb->context;
 	unsigned char *data = wacom->data;
 	struct input_dev *dev = &wacom->dev;
+	int retval;
 
-	if (urb->status) return;
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
 	input_report_key(dev, BTN_TOOL_PEN, 1);
 	input_report_abs(dev, ABS_X, data[2] << 8 | data[1]);
@@ -152,6 +186,12 @@
 	input_report_key(dev, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20));
 	input_report_key(dev, BTN_STYLUS, (data[5] & 0x40));
 	input_sync(dev);
+
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 static void wacom_graphire_irq(struct urb *urb)
@@ -160,8 +200,22 @@
 	unsigned char *data = wacom->data;
 	struct input_dev *dev = &wacom->dev;
 	int x, y;
+	int retval;
 
-	if (urb->status) return;
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
 	if (data[0] != 2)
 		dbg("received unknown report #%d", data[0]);
@@ -191,7 +245,7 @@
 			input_report_abs(dev, ABS_Y, y);
 
 			input_sync(dev);
-			return;
+			goto exit;
 	}
 
 	if (data[1] & 0x80) {
@@ -205,6 +259,12 @@
 	input_report_key(dev, BTN_STYLUS2, data[1] & 0x04);
 
 	input_sync(dev);
+
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 static void wacom_intuos_irq(struct urb *urb)
@@ -214,8 +274,22 @@
 	struct input_dev *dev = &wacom->dev;
 	unsigned int t;
 	int idx;
+	int retval;
 
-	if (urb->status) return;
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
 	if (data[0] != 2)
 		dbg("received unknown report #%d", data[0]);
@@ -253,13 +327,13 @@
 		input_report_key(dev, wacom->tool[idx], 1);
 		input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
 		input_sync(dev);
-		return;
+		goto exit;
 	}
 
 	if ((data[1] & 0xfe) == 0x80) {						/* Exit report */
 		input_report_key(dev, wacom->tool[idx], 0);
 		input_sync(dev);
-		return;
+		goto exit;
 	}
 
 	input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
@@ -323,6 +397,12 @@
 	}
 	
 	input_sync(dev);
+
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 struct wacom_features wacom_features[] = {
@@ -481,7 +561,7 @@
 	wacom->dev.id.version = dev->descriptor.bcdDevice;
 	wacom->usbdev = dev;
 
-	endpoint = intf->altsetting[0].endpoint + 0;
+	endpoint = &intf->altsetting[0].endpoint[0].desc;
 
 	if (wacom->features->pktlen > 10)
 		BUG();
diff -Nru a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
--- a/drivers/usb/input/xpad.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/input/xpad.c	Wed Oct 30 16:44:28 2002
@@ -166,11 +166,30 @@
 static void xpad_irq_in(struct urb *urb)
 {
 	struct usb_xpad *xpad = urb->context;
+	int retval;
 	
-	if (urb->status)
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 	
 	xpad_process_packet(xpad, 0, xpad->idata);
+
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 static int xpad_open (struct input_dev *dev)
@@ -230,7 +249,7 @@
 		return -ENOMEM;
         }
 	
-	ep_irq_in = intf->altsetting[0].endpoint + 0;
+	ep_irq_in = &intf->altsetting[0].endpoint[0].desc;
 	
 	usb_fill_int_urb(xpad->irq_in, udev,
 			 usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress),
diff -Nru a/drivers/usb/media/Config.help b/drivers/usb/media/Config.help
--- a/drivers/usb/media/Config.help	Wed Oct 30 16:44:36 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,148 +0,0 @@
-CONFIG_USB_DABUSB
-  A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
-  brought to you by the DAB-Team (<http://dab.in.tum.de/>).  This
-  driver can be taken as an example for URB-based bulk, control, and
-  isochronous transactions. URB's are explained in
-  <file:Documentation/usb/URB.txt>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called dabusb.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_DSBR
-  Say Y here if you want to connect this type of radio to your
-  computer's USB port. Note that the audio is not digital, and
-  you must connect the line out connector to a sound card or a
-  set of speakers.
-
-  This driver uses the Video For Linux API.  You must enable
-  (Y or M in config) Video For Linux (under Character Devices)
-  to use this driver.  Information on this API and pointers to
-  "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called dsbr100.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_IBMCAM
-  Say Y here if you want to connect a IBM "C-It" camera, also known as
-  "Xirlink PC Camera" to your computer's USB port.  For more
-  information, read <file:Documentation/usb/ibmcam.txt>.
-
-  This driver uses the Video For Linux API.  You must enable
-  (Y or M in config) Video For Linux (under Character Devices)
-  to use this driver.  Information on this API and pointers to
-  "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ibmcam.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>. This
-  camera has several configuration options which can be specified when
-  you load the module.  Read <file:Documentation/usb/ibmcam.txt> to
-  learn more.
-
-CONFIG_USB_KONICAWC
-  Say Y here if you want support for webcams based on a Konica
-  chipset. This is known to work with the Intel YC76 webcam.
-
-  This driver uses the Video For Linux API.  You must enable
-  (Y or M in config) Video For Linux (under Character Devices)
-  to use this driver.  Information on this API and pointers to
-  "v4l" programs may be found on the WWW at
-  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called konicawc.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_OV511
-  Say Y here if you want to connect this type of camera to your
-  computer's USB port. See <file:Documentation/usb/ov511.txt> for more
-  information and for a list of supported cameras.
-
-  This driver uses the Video For Linux API. You must say Y or M to
-  "Video For Linux" (under Character Devices) to use this driver.
-  Information on this API and pointers to "v4l" programs may be found
-  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ov511.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_PWC
-  Say Y or M here if you want to use one of these Philips USB webcams:
-  PCA645, PCA646, PCVC675, PCVC680, PCVC690, PCVC730, PCVC740, or
-  the Askey VC010. The PCA635, PCVC665 and PCVC720 are not supported
-  by this driver and never will be.
-
-  This driver has an optional plugin, which is distributed as a binary
-  module only.  It contains code that allow you to use higher
-  resolutions and framerates but may not be distributed as source.
-  But even without this plugin you can these cams for most
-  applications.
-
-  See <file:Documentation/usb/philips.txt> for more information and
-  installation instructions.
-
-  The built-in microphone is enabled by selecting USB Audio support.
-
-  This driver uses the Video For Linux API. You must say Y or M to
-  "Video For Linux" (under Character Devices) to use this driver.
-  Information on this API and pointers to "v4l" programs may be found
-  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called pwc.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SE401
-  Say Y here if you want to connect this type of camera to your
-  computer's USB port. See <file:Documentation/usb/se401.txt> for more
-  information and for a list of supported cameras.
-
-  This driver uses the Video For Linux API. You must say Y or M to
-  "Video For Linux" (under Multimedia Devices) to use this driver.
-  Information on this API and pointers to "v4l" programs may be found
-  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called se401.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_STV680
-  Say Y here if you want to connect this type of camera to your
-  computer's USB port. This includes the Pencam line of cameras.
-  See <file:Documentation/usb/stv680.txt> for more information and for
-  a list of supported cameras.
-
-  This driver uses the Video For Linux API. You must say Y or M to
-  "Video For Linux" (under Multimedia Devices) to use this driver.
-  Information on this API and pointers to "v4l" programs may be found
-  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called stv680.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_VICAM
-  Say Y here if you have 3com homeconnect camera (vicam).
-
-  This driver uses the Video For Linux API. You must say Y or M to
-  "Video For Linux" (under Multimedia Devices) to use this driver.
-  Information on this API and pointers to "v4l" programs may be found
-  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called vicam.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/usb/media/Config.in b/drivers/usb/media/Config.in
--- a/drivers/usb/media/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,16 +0,0 @@
-#
-# USB Multimedia device configuration
-#
-comment 'USB Multimedia devices'
-dep_tristate '  DABUSB driver' CONFIG_USB_DABUSB $CONFIG_USB
-if [ "$CONFIG_VIDEO_DEV" = "n" ]; then
-   comment '  Video4Linux support is needed for USB Multimedia device support'
-fi
-dep_tristate '  USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)' CONFIG_USB_VICAM $CONFIG_USB $CONFIG_VIDEO_DEV $CONFIG_EXPERIMENTAL
-dep_tristate '  D-Link USB FM radio support (EXPERIMENTAL)' CONFIG_USB_DSBR $CONFIG_USB $CONFIG_VIDEO_DEV $CONFIG_EXPERIMENTAL
-dep_tristate '  USB IBM (Xirlink) C-it Camera support' CONFIG_USB_IBMCAM $CONFIG_USB $CONFIG_VIDEO_DEV
-dep_tristate '  USB Konica Webcam support' CONFIG_USB_KONICAWC $CONFIG_USB $CONFIG_VIDEO_DEV
-dep_tristate '  USB OV511 Camera support' CONFIG_USB_OV511 $CONFIG_USB $CONFIG_VIDEO_DEV
-dep_tristate '  USB Philips Cameras' CONFIG_USB_PWC $CONFIG_USB $CONFIG_VIDEO_DEV
-dep_tristate '  USB SE401 Camera support' CONFIG_USB_SE401 $CONFIG_USB $CONFIG_VIDEO_DEV
-dep_tristate '  USB STV680 (Pencam) Camera support' CONFIG_USB_STV680 $CONFIG_USB $CONFIG_VIDEO_DEV     
diff -Nru a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/media/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,185 @@
+#
+# USB Multimedia device configuration
+#
+comment "USB Multimedia devices"
+	depends on USB
+
+config USB_DABUSB
+	tristate "DABUSB driver"
+	depends on USB
+	---help---
+	  A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
+	  brought to you by the DAB-Team (<http://dab.in.tum.de/>).  This
+	  driver can be taken as an example for URB-based bulk, control, and
+	  isochronous transactions. URB's are explained in
+	  <file:Documentation/usb/URB.txt>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called dabusb.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+comment "Video4Linux support is needed for USB Multimedia device support"
+	depends on USB && VIDEO_DEV=n
+
+config USB_VICAM
+	tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)"
+	depends on USB && VIDEO_DEV && EXPERIMENTAL
+	---help---
+	  Say Y here if you have 3com homeconnect camera (vicam).
+
+	  This driver uses the Video For Linux API. You must say Y or M to
+	  "Video For Linux" (under Multimedia Devices) to use this driver.
+	  Information on this API and pointers to "v4l" programs may be found
+	  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called vicam.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_DSBR
+	tristate "D-Link USB FM radio support (EXPERIMENTAL)"
+	depends on USB && VIDEO_DEV && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to connect this type of radio to your
+	  computer's USB port. Note that the audio is not digital, and
+	  you must connect the line out connector to a sound card or a
+	  set of speakers.
+
+	  This driver uses the Video For Linux API.  You must enable
+	  (Y or M in config) Video For Linux (under Character Devices)
+	  to use this driver.  Information on this API and pointers to
+	  "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called dsbr100.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_IBMCAM
+	tristate "USB IBM (Xirlink) C-it Camera support"
+	depends on USB && VIDEO_DEV
+	---help---
+	  Say Y here if you want to connect a IBM "C-It" camera, also known as
+	  "Xirlink PC Camera" to your computer's USB port.  For more
+	  information, read <file:Documentation/usb/ibmcam.txt>.
+
+	  This driver uses the Video For Linux API.  You must enable
+	  (Y or M in config) Video For Linux (under Character Devices)
+	  to use this driver.  Information on this API and pointers to
+	  "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ibmcam.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>. This
+	  camera has several configuration options which can be specified when
+	  you load the module.  Read <file:Documentation/usb/ibmcam.txt> to
+	  learn more.
+
+config USB_KONICAWC
+	tristate "USB Konica Webcam support"
+	depends on USB && VIDEO_DEV
+	---help---
+	  Say Y here if you want support for webcams based on a Konica
+	  chipset. This is known to work with the Intel YC76 webcam.
+
+	  This driver uses the Video For Linux API.  You must enable
+	  (Y or M in config) Video For Linux (under Character Devices)
+	  to use this driver.  Information on this API and pointers to
+	  "v4l" programs may be found on the WWW at
+	  <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called konicawc.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_OV511
+	tristate "USB OV511 Camera support"
+	depends on USB && VIDEO_DEV
+	---help---
+	  Say Y here if you want to connect this type of camera to your
+	  computer's USB port. See <file:Documentation/usb/ov511.txt> for more
+	  information and for a list of supported cameras.
+
+	  This driver uses the Video For Linux API. You must say Y or M to
+	  "Video For Linux" (under Character Devices) to use this driver.
+	  Information on this API and pointers to "v4l" programs may be found
+	  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ov511.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_PWC
+	tristate "USB Philips Cameras"
+	depends on USB && VIDEO_DEV
+	---help---
+	  Say Y or M here if you want to use one of these Philips USB webcams:
+	  PCA645, PCA646, PCVC675, PCVC680, PCVC690, PCVC730, PCVC740, or
+	  the Askey VC010. The PCA635, PCVC665 and PCVC720 are not supported
+	  by this driver and never will be.
+
+	  This driver has an optional plugin, which is distributed as a binary
+	  module only.  It contains code that allow you to use higher
+	  resolutions and framerates but may not be distributed as source.
+	  But even without this plugin you can these cams for most
+	  applications.
+
+	  See <file:Documentation/usb/philips.txt> for more information and
+	  installation instructions.
+
+	  The built-in microphone is enabled by selecting USB Audio support.
+
+	  This driver uses the Video For Linux API. You must say Y or M to
+	  "Video For Linux" (under Character Devices) to use this driver.
+	  Information on this API and pointers to "v4l" programs may be found
+	  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called pwc.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SE401
+	tristate "USB SE401 Camera support"
+	depends on USB && VIDEO_DEV
+	---help---
+	  Say Y here if you want to connect this type of camera to your
+	  computer's USB port. See <file:Documentation/usb/se401.txt> for more
+	  information and for a list of supported cameras.
+
+	  This driver uses the Video For Linux API. You must say Y or M to
+	  "Video For Linux" (under Multimedia Devices) to use this driver.
+	  Information on this API and pointers to "v4l" programs may be found
+	  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called se401.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_STV680
+	tristate "USB STV680 (Pencam) Camera support"
+	depends on USB && VIDEO_DEV
+	---help---
+	  Say Y here if you want to connect this type of camera to your
+	  computer's USB port. This includes the Pencam line of cameras.
+	  See <file:Documentation/usb/stv680.txt> for more information and for
+	  a list of supported cameras.
+
+	  This driver uses the Video For Linux API. You must say Y or M to
+	  "Video For Linux" (under Multimedia Devices) to use this driver.
+	  Information on this API and pointers to "v4l" programs may be found
+	  on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called stv680.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c
--- a/drivers/usb/media/dabusb.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/media/dabusb.c	Wed Oct 30 16:44:29 2002
@@ -251,7 +251,7 @@
 		b->purb->context = b;
 		b->purb->dev = s->usbdev;
 		b->purb->pipe = pipe;
-		b->purb->transfer_flags = USB_ISO_ASAP;
+		b->purb->transfer_flags = URB_ISO_ASAP;
 
 		for (i = 0; i < packets; i++) {
 			b->purb->iso_frame_desc[i].offset = i * pipesize;
@@ -728,7 +728,7 @@
 	if (usbdev->descriptor.bNumConfigurations != 1)
 		return -ENODEV;
 
-	if (intf->altsetting->bInterfaceNumber != _DABUSB_IF && usbdev->descriptor.idProduct == 0x9999)
+	if (intf->altsetting->desc.bInterfaceNumber != _DABUSB_IF && usbdev->descriptor.idProduct == 0x9999)
 		return -ENODEV;
 
 	retval = usb_register_dev (&dabusb_fops, DABUSB_MINOR, 1, &devnum);
@@ -742,7 +742,7 @@
 	s->usbdev = usbdev;
 	s->devnum = devnum;
 
-	if (usb_set_configuration (usbdev, usbdev->config[0].bConfigurationValue) < 0) {
+	if (usb_set_configuration (usbdev, usbdev->config[0].desc.bConfigurationValue) < 0) {
 		err("set_configuration failed");
 		goto reject;
 	}
diff -Nru a/drivers/usb/media/ibmcam.c b/drivers/usb/media/ibmcam.c
--- a/drivers/usb/media/ibmcam.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/media/ibmcam.c	Wed Oct 30 16:44:26 2002
@@ -3662,7 +3662,7 @@
 	struct uvd *uvd = NULL;
 	int i, nas, model=0, canvasX=0, canvasY=0;
 	int actInterface=-1, inactInterface=-1, maxPS=0;
-	__u8 ifnum = intf->altsetting->bInterfaceNumber;
+	__u8 ifnum = intf->altsetting->desc.bInterfaceNumber;
 	unsigned char video_ep = 0;
 
 	if (debug >= 1)
@@ -3740,16 +3740,16 @@
 	}
 	/* Validate all alternate settings */
 	for (i=0; i < nas; i++) {
-		const struct usb_interface_descriptor *interface;
+		const struct usb_host_interface *interface;
 		const struct usb_endpoint_descriptor *endpoint;
 
 		interface = &dev->actconfig->interface[ifnum].altsetting[i];
-		if (interface->bNumEndpoints != 1) {
+		if (interface->desc.bNumEndpoints != 1) {
 			err("Interface %d. has %u. endpoints!",
-			    ifnum, (unsigned)(interface->bNumEndpoints));
+			    ifnum, (unsigned)(interface->desc.bNumEndpoints));
 			return -ENODEV;
 		}
-		endpoint = &interface->endpoint[0];
+		endpoint = &interface->endpoint[0].desc;
 		if (video_ep == 0)
 			video_ep = endpoint->bEndpointAddress;
 		else if (video_ep != endpoint->bEndpointAddress) {
diff -Nru a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
--- a/drivers/usb/media/konicawc.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/usb/media/konicawc.c	Wed Oct 30 16:44:17 2002
@@ -381,10 +381,10 @@
 	int i, errFlag;
 	struct konicawc *cam = (struct konicawc *)uvd->user_data;
 	int pktsz;
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 
 	interface = &dev->actconfig->interface[uvd->iface].altsetting[spd_to_iface[cam->speed]];
-	pktsz = interface->endpoint[1].wMaxPacketSize;
+	pktsz = interface->endpoint[1].desc.wMaxPacketSize;
 	DEBUG(1, "pktsz = %d", pktsz);
 	if (!CAMERA_IS_OPERATIONAL(uvd)) {
 		err("Camera is not operational");
@@ -408,7 +408,7 @@
 		urb->context = uvd;
 		urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
 		urb->interval = 1;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->transfer_buffer = uvd->sbuf[i].data;
 		urb->complete = konicawc_isoc_irq;
 		urb->number_of_packets = FRAMES_PER_DESC;
@@ -423,7 +423,7 @@
 		urb->context = uvd;
 		urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp-1);
 		urb->interval = 1;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->transfer_buffer = cam->sts_buf[i];
 		urb->complete = konicawc_isoc_irq;
 		urb->number_of_packets = FRAMES_PER_DESC;
@@ -742,17 +742,17 @@
 	}
 	/* Validate all alternate settings */
 	for (i=0; i < nas; i++) {
-		const struct usb_interface_descriptor *interface;
+		const struct usb_host_interface *interface;
 		const struct usb_endpoint_descriptor *endpoint;
 
 		interface = &intf->altsetting[i];
-		if (interface->bNumEndpoints != 2) {
+		if (interface->desc.bNumEndpoints != 2) {
 			err("Interface %d. has %u. endpoints!",
-			    interface->bInterfaceNumber,
-			    (unsigned)(interface->bNumEndpoints));
+			    interface->desc.bInterfaceNumber,
+			    (unsigned)(interface->desc.bNumEndpoints));
 			return -ENODEV;
 		}
-		endpoint = &interface->endpoint[1];
+		endpoint = &interface->endpoint[1].desc;
 		DEBUG(1, "found endpoint: addr: 0x%2.2x maxps = 0x%4.4x",
 		    endpoint->bEndpointAddress, endpoint->wMaxPacketSize);
 		if (video_ep == 0)
@@ -763,12 +763,12 @@
 		}
 		if ((endpoint->bmAttributes & 0x03) != 0x01) {
 			err("Interface %d. has non-ISO endpoint!",
-			    interface->bInterfaceNumber);
+			    interface->desc.bInterfaceNumber);
 			return -ENODEV;
 		}
 		if ((endpoint->bEndpointAddress & 0x80) == 0) {
 			err("Interface %d. has ISO OUT endpoint!",
-			    interface->bInterfaceNumber);
+			    interface->desc.bInterfaceNumber);
 			return -ENODEV;
 		}
 		if (endpoint->wMaxPacketSize == 0) {
@@ -819,7 +819,7 @@
 		uvd->flags = 0;
 		uvd->debug = debug;
 		uvd->dev = dev;
-		uvd->iface = intf->altsetting->bInterfaceNumber;
+		uvd->iface = intf->altsetting->desc.bInterfaceNumber;
 		uvd->ifaceAltInactive = inactInterface;
 		uvd->ifaceAltActive = actInterface;
 		uvd->video_endp = video_ep;
diff -Nru a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c
--- a/drivers/usb/media/ov511.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/media/ov511.c	Wed Oct 30 16:44:27 2002
@@ -3949,7 +3949,7 @@
 		urb->dev = ov->dev;
 		urb->context = &ov->sbuf[n];
 		urb->pipe = usb_rcvisocpipe(ov->dev, OV511_ENDPOINT_ADDRESS);
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->transfer_buffer = ov->sbuf[n].data;
 		urb->complete = ov51x_isoc_irq;
 		urb->number_of_packets = FRAMES_PER_DESC;
@@ -5988,7 +5988,7 @@
 	if (ov->bridge == BRG_OV518)
 	{
 		struct usb_interface *ifp = &ov->dev->config[0].interface[0];
-		__u16 mxps = ifp->altsetting[7].endpoint[0].wMaxPacketSize;
+		__u16 mxps = ifp->altsetting[7].endpoint[0].desc.wMaxPacketSize;
 
 		/* Some OV518s have packet numbering by default, some don't */
 		if (mxps == 897)
@@ -6083,7 +6083,7 @@
 	if (dev->descriptor.bNumConfigurations != 1)
 		return -ENODEV;
 
-	interface = &intf->altsetting[0];
+	interface = &intf->altsetting[0].desc;
 
 	/* Checking vendor/product should be enough, but what the hell */
 	if (interface->bInterfaceClass != 0xFF)
diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
--- a/drivers/usb/media/pwc-if.c	Wed Oct 30 16:44:31 2002
+++ b/drivers/usb/media/pwc-if.c	Wed Oct 30 16:44:31 2002
@@ -761,7 +761,7 @@
 	struct urb *urb;
 	int i, j, ret;
 
-	struct usb_interface_descriptor *idesc;
+	struct usb_host_interface *idesc;
 	int cur_alt;
 
 	if (pdev == NULL)
@@ -781,9 +781,9 @@
 
 	/* Search video endpoint */
 	pdev->vmax_packet_size = -1;
-	for (i = 0; i < idesc->bNumEndpoints; i++)
-		if ((idesc->endpoint[i].bEndpointAddress & 0xF) == pdev->vendpoint) {
-			pdev->vmax_packet_size = idesc->endpoint[i].wMaxPacketSize;
+	for (i = 0; i < idesc->desc.bNumEndpoints; i++)
+		if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) {
+			pdev->vmax_packet_size = idesc->endpoint[i].desc.wMaxPacketSize;
 			break;
 		}
 	
@@ -821,7 +821,7 @@
 		urb->interval = 1; // devik
 		urb->dev = udev;
 	        urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint);
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 	        urb->transfer_buffer = pdev->sbuf[i].data;
 	        urb->transfer_buffer_length = ISO_BUFFER_SIZE;
 	        urb->complete = pwc_isoc_handler;
@@ -1552,13 +1552,15 @@
 	free_mem_leak();
 	
 	/* Check if we can handle this device */
-	Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n", udev->descriptor.idVendor, udev->descriptor.idProduct, intf->altsetting->bInterfaceNumber);
+	Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n",
+			udev->descriptor.idVendor, udev->descriptor.idProduct,
+			intf->altsetting->desc.bInterfaceNumber);
 
 	/* the interfaces are probed one by one. We are only interested in the
 	   video interface (0) now.
 	   Interface 1 is the Audio Control, and interface 2 Audio itself.
 	 */
-	if (intf->altsetting->bInterfaceNumber > 0)
+	if (intf->altsetting->desc.bInterfaceNumber > 0)
 		return -ENODEV;
 
 	vendor_id = udev->descriptor.idVendor;
diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c
--- a/drivers/usb/media/se401.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/media/se401.c	Wed Oct 30 16:44:27 2002
@@ -428,16 +428,37 @@
 static void se401_button_irq(struct urb *urb)
 {
 	struct usb_se401 *se401 = urb->context;
+	int status;
 	
 	if (!se401->dev) {
 		info("ohoh: device vapourished");
 		return;
 	}
 	
-	if (urb->actual_length >=2 && !urb->status) {
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
+
+	if (urb->actual_length >=2) {
 		if (se401->button)
 			se401->buttonpressed=1;
 	}
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 static void se401_video_irq(struct urb *urb)
@@ -588,7 +609,7 @@
 		if(!urb)
 			return -ENOMEM;
 
-		FILL_BULK_URB(urb, se401->dev,
+		usb_fill_bulk_urb(urb, se401->dev,
 			usb_rcvbulkpipe(se401->dev, SE401_VIDEO_ENDPOINT),
 			se401->sbuf[i].data, SE401_PACKETSIZE,
 			se401_video_irq,
@@ -676,7 +697,8 @@
 static inline void enhance_picture(unsigned char *frame, int len)
 {
 	while (len--) {
-		*frame++=(((*frame^255)*(*frame^255))/255)^255;
+		*frame=(((*frame^255)*(*frame^255))/255)^255;
+		frame++;
 	}
 }
 
@@ -910,7 +932,8 @@
 		/* Fix the top line */
 		framedata+=linelength;
 		for (i=0; i<linelength; i++) {
-			*--framedata=*(framedata+linelength);
+			framedata--;
+			*framedata=*(framedata+linelength);
 		}
 		/* Fix the left side (green is already present) */
 		for (i=0; i<se401->cheight; i++) {
@@ -1397,7 +1420,7 @@
 			info("Allocation of inturb failed");
 			return 1;
 		}
-		FILL_INT_URB(se401->inturb, se401->dev,
+		usb_fill_int_urb(se401->inturb, se401->dev,
 		    usb_rcvintpipe(se401->dev, SE401_BUTTON_ENDPOINT),
 		    &se401->button, sizeof(se401->button),
 		    se401_button_irq,
@@ -1433,7 +1456,7 @@
         if (dev->descriptor.bNumConfigurations != 1)
                 return -ENODEV;
 
-        interface = &intf->altsetting[0];
+        interface = &intf->altsetting[0].desc;
 
         /* Is it an se401? */
         if (dev->descriptor.idVendor == 0x03e8 &&
diff -Nru a/drivers/usb/media/stv680.c b/drivers/usb/media/stv680.c
--- a/drivers/usb/media/stv680.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/usb/media/stv680.c	Wed Oct 30 16:44:30 2002
@@ -1451,7 +1451,7 @@
 static int stv680_probe (struct usb_interface *intf, const struct usb_device_id *id)
 {
 	struct usb_device *dev = interface_to_usbdev(intf);
-	struct usb_interface_descriptor *interface;
+	struct usb_host_interface *interface;
 	struct usb_stv *stv680;
 	char *camera_name = NULL;
 
diff -Nru a/drivers/usb/media/ultracam.c b/drivers/usb/media/ultracam.c
--- a/drivers/usb/media/ultracam.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/usb/media/ultracam.c	Wed Oct 30 16:44:24 2002
@@ -569,17 +569,17 @@
 	}
 	/* Validate all alternate settings */
 	for (i=0; i < nas; i++) {
-		const struct usb_interface_descriptor *interface;
+		const struct usb_host_interface *interface;
 		const struct usb_endpoint_descriptor *endpoint;
 
 		interface = &intf->altsetting[i];
-		if (interface->bNumEndpoints != 1) {
+		if (interface->desc.bNumEndpoints != 1) {
 			err("Interface %d. has %u. endpoints!",
-			    interface->bInterfaceNumber,
-			    (unsigned)(interface->bNumEndpoints));
+			    interface->desc.bInterfaceNumber,
+			    (unsigned)(interface->desc.bNumEndpoints));
 			return -ENODEV;
 		}
-		endpoint = &interface->endpoint[0];
+		endpoint = &interface->endpoint[0].desc;
 		if (video_ep == 0)
 			video_ep = endpoint->bEndpointAddress;
 		else if (video_ep != endpoint->bEndpointAddress) {
@@ -588,12 +588,12 @@
 		}
 		if ((endpoint->bmAttributes & 0x03) != 0x01) {
 			err("Interface %d. has non-ISO endpoint!",
-			    interface->bInterfaceNumber);
+			    interface->desc.bInterfaceNumber);
 			return -ENODEV;
 		}
 		if ((endpoint->bEndpointAddress & 0x80) == 0) {
 			err("Interface %d. has ISO OUT endpoint!",
-			    interface->bInterfaceNumber);
+			    interface->desc.bInterfaceNumber);
 			return -ENODEV;
 		}
 		if (endpoint->wMaxPacketSize == 0) {
@@ -636,7 +636,7 @@
 		uvd->flags = flags;
 		uvd->debug = debug;
 		uvd->dev = dev;
-		uvd->iface = intf->altsetting->bInterfaceNumber;
+		uvd->iface = intf->altsetting->desc.bInterfaceNumber;
 		uvd->ifaceAltInactive = inactInterface;
 		uvd->ifaceAltActive = actInterface;
 		uvd->video_endp = video_ep;
diff -Nru a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c
--- a/drivers/usb/media/usbvideo.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/usb/media/usbvideo.c	Wed Oct 30 16:44:36 2002
@@ -1914,7 +1914,7 @@
 		urb->context = uvd;
 		urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
 		urb->interval = 1;
-		urb->transfer_flags = USB_ISO_ASAP;
+		urb->transfer_flags = URB_ISO_ASAP;
 		urb->transfer_buffer = uvd->sbuf[i].data;
 		urb->complete = usbvideo_IsocIrq;
 		urb->number_of_packets = FRAMES_PER_DESC;
diff -Nru a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c
--- a/drivers/usb/media/vicam.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/media/vicam.c	Wed Oct 30 16:44:27 2002
@@ -421,9 +421,6 @@
 	u8 bulkEndpoint;
 	bool needsDummyRead;
 
-	u32 framebuf_size;	// # of valid bytes in framebuf
-	u32 framebuf_read_start;	// position in frame buf that a read is happening at.
-
 #ifdef CONFIG_PROC_FS
 	struct proc_dir_entry *proc_entry;
 #endif
@@ -924,6 +921,11 @@
 	int n;
 	int actual_length;
 
+	if (cam->needsDummyRead) {
+		cam->needsDummyRead = 0;
+		read_frame(cam, framenum);
+	}
+
 	memset(request, 0, 16);
 	request[0] = cam->gain;	// 0 = 0% gain, FF = 100% gain
 
@@ -974,74 +976,37 @@
 	vicam_decode_color(cam->raw_image,
 			 cam->framebuf +
 			 framenum * VICAM_MAX_FRAME_SIZE );
-
-	cam->framebuf_size =
-	    320 * 240 * VICAM_BYTES_PER_PIXEL;
-	cam->framebuf_read_start = 0;
-
-	return;
-
 }
 
 static int
 vicam_read( struct file *file, char *buf, size_t count, loff_t *ppos )
 {
 	struct vicam_camera *cam = file->private_data;
-	DBG("read %d bytes.\n", (int) count);
 
-	if (!buf)
-		return -EINVAL;
+	DBG("read %d bytes.\n", (int) count);
 
-	if (!count)
-		return -EINVAL;
+	down_interruptible(&cam->busy_lock);
 
-	// This is some code that will hopefully allow us to do shell copies from
-	// the /dev/videoX to a file and have it actually work.
-	if (cam->framebuf_size != 0) {
-		if (cam->framebuf_read_start == cam->framebuf_size) {
-			cam->framebuf_size = cam->framebuf_read_start = 0;
-			return 0;
-		} else {
-			if (cam->framebuf_read_start + count <=
-			    cam->framebuf_size) {
-				// count does not exceed available bytes
-				copy_to_user(buf,
-					     (cam->framebuf) +
-					     cam->framebuf_read_start, count);
-				cam->framebuf_read_start += count;
-				return count;
-			} else {
-				count =
-				    cam->framebuf_size -
-				    cam->framebuf_read_start;
-				copy_to_user(buf,
-					     (cam->framebuf) +
-					     cam->framebuf_read_start, count);
-				cam->framebuf_read_start = cam->framebuf_size;
-				return count;
-			}
-		}
+	if (*ppos >= VICAM_MAX_FRAME_SIZE) {
+		*ppos = 0;
+		return 0;
 	}
 
-	down_interruptible(&cam->busy_lock);
-
-	if (cam->needsDummyRead) {
+	if (*ppos == 0) {
 		read_frame(cam, 0);
-		cam->needsDummyRead = 0;
 	}
-	// read_frame twice because the camera doesn't seem to take the shutter speed for the first one.
 
-	read_frame(cam, 0);
+	count = min_t(size_t, count, VICAM_MAX_FRAME_SIZE - *ppos);
 
-	if (count > cam->framebuf_size)
-		count = cam->framebuf_size;
-
-	copy_to_user(buf, cam->framebuf, count);
+	if (copy_to_user(buf, &cam->framebuf[*ppos], count)) {
+		count = -EFAULT;
+	} else {
+		*ppos += count;
+	}
 
-	if (count != cam->framebuf_size)
-		cam->framebuf_read_start = count;
-	else
-		cam->framebuf_size = 0;
+	if (count == VICAM_MAX_FRAME_SIZE) {
+		*ppos = 0;
+	}
 
 	up(&cam->busy_lock);
 
@@ -1288,7 +1253,7 @@
 {
 	struct usb_device *dev = interface_to_usbdev(intf);
 	int bulkEndpoint = 0;
-	const struct usb_interface_descriptor *interface;
+	const struct usb_host_interface *interface;
 	const struct usb_endpoint_descriptor *endpoint;
 	struct vicam_camera *cam;
 	
@@ -1303,8 +1268,8 @@
 	interface = &intf->altsetting[0];
 
 	DBG(KERN_DEBUG "Interface %d. has %u. endpoints!\n",
-	       ifnum, (unsigned) (interface->bNumEndpoints));
-	endpoint = &interface->endpoint[0];
+	       ifnum, (unsigned) (interface->desc.bNumEndpoints));
+	endpoint = &interface->endpoint[0].desc;
 
 	if ((endpoint->bEndpointAddress & 0x80) &&
 	    ((endpoint->bmAttributes & 3) == 0x02)) {
diff -Nru a/drivers/usb/misc/Config.help b/drivers/usb/misc/Config.help
--- a/drivers/usb/misc/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,130 +0,0 @@
-CONFIG_USB_AUERSWALD
-  Say Y here if you want to connect an Auerswald USB ISDN Device
-  to your computer's USB port.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called auerswald.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_BRLVGER
-  Say Y here if you want to use the Voyager USB Braille display from
-  Tieman. See <file:Documentation/usb/brlvger.txt> for more
-  information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called brlvger.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_EMI26
-  This driver loads firmware to Emagic EMI 2|6 low latency USB
-  Audio interface.
-
-  After firmware load the device is handled with standard linux
-  USB Audio driver.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called audio.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_RIO500
-  Say Y here if you want to connect a USB Rio500 mp3 player to your
-  computer's USB port. Please read <file:Documentation/usb/rio.txt>
-  for more information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called rio500.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_TIGL
-  If you own a Texas Instruments graphing calculator and use a 
-  TI-GRAPH LINK USB cable (aka SilverLink), then you might be 
-  interested in this driver.
-
-  If you enable this driver, you will be able to communicate with
-  your calculator through a set of device nodes under /dev.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called tiglusb.o. If you want to compile it as a
-  module, say M here and read Documentation/modules.txt.
-
-  If you don't know what the SilverLink cable is or what a Texas
-  Instruments graphing calculator is, then you probably don't need this
-  driver.
-
-  If unsure, say N.
-
-CONFIG_USB_USS720
-  This driver is for USB parallel port adapters that use the Lucent
-  Technologies USS-720 chip. These cables are plugged into your USB
-  port and provide USB compatibility to peripherals designed with
-  parallel port interfaces.
-
-  The chip has two modes: automatic mode and manual mode. In automatic
-  mode, it looks to the computer like a standard USB printer. Only
-  printers may be connected to the USS-720 in this mode. The generic
-  USB printer driver ("USB Printer support", above) may be used in
-  that mode, and you can say N here if you want to use the chip only
-  in this mode.
-
-  Manual mode is not limited to printers, any parallel port
-  device should work. This driver utilizes manual mode.
-  Note however that some operations are three orders of magnitude
-  slower than on a PCI/ISA Parallel Port, so timing critical
-  applications might not work.
-
-  Say Y here if you own an USS-720 USB->Parport cable and intend to
-  connect anything other than a printer to it.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called uss720.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SPEEDTCH
-
-  This driver provides support for the Alcatel SpeedTouch ADSL USB 
-  modem.
-
-  The driver requires the ATM interface and ATM SAR so you need to 
-  enable ATM (under Networking options) and the ATM SAR option. You 
-  will also need PPP over ATM (under Network device support).
-
-  This driver is a slightly revised version of Johan Verrept's 1.5 
-  SpeedTouch Driver which has been altered to work on the 2.5 series 
-  kernels.
-
-  To use the device you also need a user-mode daemon that downloads
-  the firmware and (re)initializes the modem. The offical version is 
-  a closed source one from Alcatel that you can get at
-  <http://www.alcateldsl.com/support.htm>.
-
-  A piece of code has recently been sent to linux-usb-devel which 
-  allows the open source user space driver's firmware program 
-  modem_run to be used with this driver instead. You will still 
-  need the Alcatel daemon package to extract the modem firmware from 
-  it (or the windows drivers instead).
-
-  For more information, see Johan Verrept's webpages at
-  <http://linux-usb.sourceforge.net/SpeedTouch/>.
-
-CONFIG_USB_TEST
-
-  This driver is for testing host controller software.  It is used
-  with specialized device firmware for regression and stress testing,
-  to help prevent problems from cropping up with 'real" drivers.
-
-CONFIG_USB_LCD
-  Say Y here if you want to connect an USBLCD to your computer's
-  USB port. The USBLCD is a small USB interface board for
-  alphanumeric LCD modules. See <http://www.usblcd.de> for more
-  information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usblcd.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/usb/misc/Config.in b/drivers/usb/misc/Config.in
--- a/drivers/usb/misc/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-#
-# USB Miscellaneous driver configuration
-#
-comment 'USB Miscellaneous drivers'
-dep_tristate '  EMI 2|6 USB Audio interface support' CONFIG_USB_EMI26 $CONFIG_USB_AUDIO
-dep_tristate '  Texas Instruments Graph Link USB (aka SilverLink) cable support' CONFIG_USB_TIGL $CONFIG_USB
-dep_tristate '  USB Auerswald ISDN support (EXPERIMENTAL)' CONFIG_USB_AUERSWALD $CONFIG_USB $CONFIG_EXPERIMENTAL
-dep_tristate '  USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB $CONFIG_EXPERIMENTAL
-dep_tristate '  Tieman Voyager USB Braille display support (EXPERIMENTAL)' CONFIG_USB_BRLVGER $CONFIG_USB $CONFIG_EXPERIMENTAL
-dep_tristate '  USB LCD driver support' CONFIG_USB_LCD $CONFIG_USB
-dep_tristate '  Alcatel Speedtouch ADSL USB Modem' CONFIG_USB_SPEEDTOUCH $CONFIG_USB $CONFIG_ATM
-dep_tristate '  USB testing driver (DEVELOPMENT)' CONFIG_USB_TEST $CONFIG_USB_DEVICEFS $CONFIG_EXPERIMENTAL
diff -Nru a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/misc/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,108 @@
+#
+# USB Miscellaneous driver configuration
+#
+comment "USB Miscellaneous drivers"
+	depends on USB
+
+config USB_EMI26
+	tristate "EMI 2|6 USB Audio interface support"
+	depends on USB_AUDIO
+	---help---
+	  This driver loads firmware to Emagic EMI 2|6 low latency USB
+	  Audio interface.
+
+	  After firmware load the device is handled with standard linux
+	  USB Audio driver.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called audio.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_TIGL
+	tristate "Texas Instruments Graph Link USB (aka SilverLink) cable support"
+	depends on USB
+	---help---
+	  If you own a Texas Instruments graphing calculator and use a 
+	  TI-GRAPH LINK USB cable (aka SilverLink), then you might be 
+	  interested in this driver.
+
+	  If you enable this driver, you will be able to communicate with
+	  your calculator through a set of device nodes under /dev.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called tiglusb.o. If you want to compile it as a
+	  module, say M here and read Documentation/modules.txt.
+
+	  If you don't know what the SilverLink cable is or what a Texas
+	  Instruments graphing calculator is, then you probably don't need this
+	  driver.
+
+	  If unsure, say N.
+
+config USB_AUERSWALD
+	tristate "USB Auerswald ISDN support (EXPERIMENTAL)"
+	depends on USB && EXPERIMENTAL
+	help
+	  Say Y here if you want to connect an Auerswald USB ISDN Device
+	  to your computer's USB port.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called auerswald.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_RIO500
+	tristate "USB Diamond Rio500 support (EXPERIMENTAL)"
+	depends on USB && EXPERIMENTAL
+	help
+	  Say Y here if you want to connect a USB Rio500 mp3 player to your
+	  computer's USB port. Please read <file:Documentation/usb/rio.txt>
+	  for more information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called rio500.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_BRLVGER
+	tristate "Tieman Voyager USB Braille display support (EXPERIMENTAL)"
+	depends on USB && EXPERIMENTAL
+	help
+	  Say Y here if you want to use the Voyager USB Braille display from
+	  Tieman. See <file:Documentation/usb/brlvger.txt> for more
+	  information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called brlvger.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_LCD
+	tristate "USB LCD driver support"
+	depends on USB
+	help
+	  Say Y here if you want to connect an USBLCD to your computer's
+	  USB port. The USBLCD is a small USB interface board for
+	  alphanumeric LCD modules. See <http://www.usblcd.de> for more
+	  information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usblcd.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SPEEDTOUCH
+	tristate "Alcatel Speedtouch ADSL USB Modem"
+	depends on USB && ATM
+
+config USB_TEST
+	tristate "USB testing driver (DEVELOPMENT)"
+	depends on USB_DEVICEFS && EXPERIMENTAL
+	help
+
+	  This driver is for testing host controller software.  It is used
+	  with specialized device firmware for regression and stress testing,
+	  to help prevent problems from cropping up with 'real" drivers.
+
diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
--- a/drivers/usb/misc/auerswald.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/misc/auerswald.c	Wed Oct 30 16:44:27 2002
@@ -445,7 +445,7 @@
 
 /* cancel an urb which is submitted to the chain
    the result is 0 if the urb is cancelled, or -EINPROGRESS if
-   USB_ASYNC_UNLINK is set and the function is successfully started.
+   URB_ASYNC_UNLINK is set and the function is successfully started.
 */
 static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb)
 {
@@ -534,7 +534,7 @@
         acep = acp->active;
         if (acep) {
                 urbp = acep->urbp;
-                urbp->transfer_flags &= ~USB_ASYNC_UNLINK;
+                urbp->transfer_flags &= ~URB_ASYNC_UNLINK;
                 dbg ("unlink active urb");
                 usb_unlink_urb (urbp);
         }
@@ -717,7 +717,7 @@
 	dr->wIndex  = cpu_to_le16 (index);
 	dr->wLength = cpu_to_le16 (size);
 
-	FILL_CONTROL_URB (urb, dev, pipe, (unsigned char*)dr, data, size,    /* build urb */
+	usb_fill_control_urb (urb, dev, pipe, (unsigned char*)dr, data, size,    /* build urb */
 		          (usb_complete_t)auerchain_blocking_completion,0);
 	ret = auerchain_start_wait_urb (acp, urb, timeout, &length);
 
@@ -919,7 +919,7 @@
 	bp->dr->wLength      = bp->dr->wValue;	/* temporary stored */
 	bp->dr->wValue       = cpu_to_le16 (1);	/* Retry Flag */
 	/* bp->dr->index    = channel id;          remains */
-	FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
+	usb_fill_control_urb (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
                           (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->wLength),
 		          (usb_complete_t)auerswald_ctrlread_complete,bp);
 
@@ -967,7 +967,7 @@
 		bp->dr->wValue       = bp->dr->wLength; /* temporary storage */
 		// bp->dr->wIndex    channel ID remains
 		bp->dr->wLength      = cpu_to_le16 (32); /* >= 8 bytes */
-		FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
+		usb_fill_control_urb (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
   			(unsigned char*)bp->dr, bp->bufp, 32,
 	   		(usb_complete_t)auerswald_ctrlread_wretcomplete,bp);
 
@@ -1014,30 +1014,39 @@
         pauerbuf_t   bp = NULL;
         pauerswald_t cp = (pauerswald_t) urb->context;
 
-        dbg ("auerswald_int_complete called");
+        dbg ("%s called", __FUNCTION__);
 
-        /* do not respond to an error condition */
-        if (urb->status != 0) {
-                dbg ("nonzero URB status = %d", urb->status);
-                return;
-        }
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
 
         /* check if all needed data was received */
 	if (urb->actual_length < AU_IRQMINSIZE) {
                 dbg ("invalid data length received: %d bytes", urb->actual_length);
-                return;
+		goto exit;
         }
 
         /* check the command code */
         if (cp->intbufp[0] != AU_IRQCMDID) {
                 dbg ("invalid command received: %d", cp->intbufp[0]);
-                return;
+		goto exit;
         }
 
         /* check the command type */
         if (cp->intbufp[1] != AU_BLOCKRDY) {
                 dbg ("invalid command type received: %d", cp->intbufp[1]);
-                return;
+		goto exit;
         }
 
         /* now extract the information */
@@ -1047,13 +1056,13 @@
         /* check the channel id */
         if (channelid >= AUH_TYPESIZE) {
                 dbg ("invalid channel id received: %d", channelid);
-                return;
+		goto exit;
         }
 
         /* check the byte count */
         if (bytecount > (cp->maxControlLength+AUH_SIZE)) {
                 dbg ("invalid byte count received: %d", bytecount);
-                return;
+		goto exit;
         }
         dbg ("Service Channel = %d", channelid);
         dbg ("Byte Count = %d", bytecount);
@@ -1077,7 +1086,7 @@
 		   The only real solution is: having enought buffers!
 		   Or perhaps temporary disabling the int endpoint?
 		*/
-		return;
+		goto exit;
         }
 
 	/* fill the control message */
@@ -1086,7 +1095,7 @@
 	bp->dr->wValue       = cpu_to_le16 (0);
 	bp->dr->wIndex       = cpu_to_le16 (channelid | AUH_DIRECT | AUH_UNSPLIT);
 	bp->dr->wLength      = cpu_to_le16 (bytecount);
-	FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
+	usb_fill_control_urb (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
                           (unsigned char*)bp->dr, bp->bufp, bytecount,
 		          (usb_complete_t)auerswald_ctrlread_complete,bp);
 
@@ -1098,6 +1107,11 @@
                 auerswald_ctrlread_complete( bp->urbp);
 		/* here applies the same problem as above: device locking! */
         }
+exit:
+	ret = usb_submit_urb (urb, GFP_ATOMIC);
+	if (ret)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, ret);
 }
 
 /* int memory deallocation
@@ -1150,7 +1164,7 @@
                 }
         }
         /* setup urb */
-        FILL_INT_URB (cp->inturbp, cp->usbdev, usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp, irqsize, auerswald_int_complete, cp, ep->bInterval);
+        usb_fill_int_urb (cp->inturbp, cp->usbdev, usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp, irqsize, auerswald_int_complete, cp, ep->bInterval);
         /* start the urb */
 	cp->inturbp->status = 0;	/* needed! */
 	ret = usb_submit_urb (cp->inturbp, GFP_KERNEL);
@@ -1816,7 +1830,7 @@
 	bp->dr->wValue       = cpu_to_le16 (0);
 	bp->dr->wIndex       = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
 	bp->dr->wLength      = cpu_to_le16 (len+AUH_SIZE);
-	FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
+	usb_fill_control_urb (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
                    (unsigned char*)bp->dr, bp->bufp, len+AUH_SIZE,
 		    auerchar_ctrlwrite_complete, bp);
 	/* up we go */
@@ -1929,7 +1943,7 @@
 		return -ENODEV;
 
         /* we use only the first -and only- interface */
-        if (intf->altsetting->bInterfaceNumber != 0)
+        if (intf->altsetting->desc.bInterfaceNumber != 0)
 		return -ENODEV;
 
 	/* prevent module unloading while sleeping */
diff -Nru a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c
--- a/drivers/usb/misc/brlvger.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/misc/brlvger.c	Wed Oct 30 16:44:28 2002
@@ -290,7 +290,7 @@
 	int i;
 	int retval;
 	struct usb_endpoint_descriptor *endpoint;
-	struct usb_interface_descriptor *actifsettings;
+	struct usb_host_interface *actifsettings;
 	/* protects against reentrance: once we've found a free slot
 	   we reserve it.*/
 	static DECLARE_MUTEX(reserve_sem);
@@ -299,13 +299,13 @@
 	actifsettings = dev->actconfig->interface->altsetting;
 
 	if( dev->descriptor.bNumConfigurations != 1
-			|| dev->config->bNumInterfaces != 1 
-			|| actifsettings->bNumEndpoints != 1 ) {
+			|| dev->config->desc.bNumInterfaces != 1 
+			|| actifsettings->desc.bNumEndpoints != 1 ) {
 		err ("Bogus braille display config info");
 		return -ENODEV;
 	}
 
-	endpoint = actifsettings->endpoint;
+	endpoint = &actifsettings->endpoint [0].desc;
 	if (!(endpoint->bEndpointAddress & 0x80) ||
 		((endpoint->bmAttributes & 3) != 0x03)) {
 		err ("Bogus braille display config info, wrong endpoints");
@@ -514,7 +514,7 @@
 		err("Unable to allocate URB");
 		goto error;
 	}
-	FILL_INT_URB( priv->intr_urb, priv->dev,
+	usb_fill_int_urb( priv->intr_urb, priv->dev,
 			usb_rcvintpipe(priv->dev,
 				       priv->in_interrupt->bEndpointAddress),
 			priv->intr_buff, sizeof(priv->intr_buff),
@@ -846,14 +846,21 @@
 {
 	struct brlvger_priv *priv = urb->context;
 	int intr_idx, read_idx;
+	int status;
 
-	if( urb->status ) {
-		if(urb->status == -ETIMEDOUT)
-			dbg2("Status -ETIMEDOUT, "
-			     "probably disconnected");
-		else if(urb->status != -ENOENT)
-			err("Status: %d", urb->status);
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
 	}
 
 	read_idx = atomic_read(&priv->read_idx);
@@ -862,7 +869,7 @@
 	if(read_idx == intr_idx) {
 		dbg2("Queue full, dropping braille display input");
 		spin_unlock(&priv->intr_idx_lock);
-		return;	/* queue full */
+		goto exit;	/* queue full */
 	}
 
 	memcpy(priv->event_queue[intr_idx], urb->transfer_buffer,
@@ -873,6 +880,12 @@
 	spin_unlock(&priv->intr_idx_lock);
 
 	wake_up_interruptible(&priv->read_wait);
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 /* ----------------------------------------------------------------------- */
diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
--- a/drivers/usb/misc/speedtouch.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/usb/misc/speedtouch.c	Wed Oct 30 16:44:36 2002
@@ -592,7 +592,7 @@
 	ctx->skb = skb_dequeue (&(instance->sndqueue));
 	ctx->vcc = ((struct udsl_cb *) (ctx->skb->cb))->vcc;
 	spin_unlock_irqrestore (&instance->sndqlock, flags);
-	FILL_BULK_URB (urb,
+	usb_fill_bulk_urb (urb,
 		       instance->usb_dev,
 		       usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT),
 		       (unsigned char *) ctx->skb->data,
@@ -673,7 +673,7 @@
 	spin_unlock_irqrestore (&instance->sndqlock, flags);
 
 	/* submit packet */
-	FILL_BULK_URB (urb,
+	usb_fill_bulk_urb (urb,
 		       instance->usb_dev,
 		       usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT),
 		       (unsigned char *) skb->data,
@@ -742,7 +742,7 @@
 		return;
 	}
 
-	FILL_BULK_URB (urb,
+	usb_fill_bulk_urb (urb,
 		       instance->usb_dev,
 		       usb_rcvbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_IN),
 		       (unsigned char *) ctx->skb->data,
@@ -790,7 +790,7 @@
 			break;
 		};
 
-		FILL_BULK_URB (ctx->urb,
+		usb_fill_bulk_urb (ctx->urb,
 			       instance->usb_dev,
 			       usb_rcvbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_IN),
 			       (unsigned char *) ctx->skb->data,
@@ -917,7 +917,7 @@
 static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_id *id)
 {
 	struct usb_device *dev = interface_to_usbdev(intf);
-	int ifnum = intf->altsetting->bInterfaceNumber;
+	int ifnum = intf->altsetting->desc.bInterfaceNumber;
 	int i;
 	unsigned char mac[6];
 	unsigned char mac_str[13];
diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c
--- a/drivers/usb/misc/tiglusb.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/usb/misc/tiglusb.c	Wed Oct 30 16:44:17 2002
@@ -64,7 +64,7 @@
 static inline int
 clear_device (struct usb_device *dev)
 {
-	if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
+	if (usb_set_configuration (dev, dev->config[0].desc.bConfigurationValue) < 0) {
 		err ("clear_device failed");
 		return -1;
 	}
@@ -351,7 +351,7 @@
 	    && (dev->descriptor.idVendor != 0x451))
 		return -ENODEV;
 
-	if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
+	if (usb_set_configuration (dev, dev->config[0].desc.bConfigurationValue) < 0) {
 		err ("tiglusb_probe: set_configuration failed");
 		return -ENODEV;
 	}
diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
--- a/drivers/usb/misc/usbtest.c	Wed Oct 30 16:44:34 2002
+++ b/drivers/usb/misc/usbtest.c	Wed Oct 30 16:44:34 2002
@@ -290,7 +290,7 @@
 
 	retval = usb_control_msg (udev, usb_rcvctrlpipe (udev, 0),
 			USB_REQ_GET_INTERFACE, USB_DIR_IN|USB_RECIP_INTERFACE,
-			0, iface->altsetting [0].bInterfaceNumber,
+			0, iface->altsetting [0].desc.bInterfaceNumber,
 			dev->buf, 1, HZ * USB_CTRL_GET_TIMEOUT);
 	switch (retval) {
 	case 1:
@@ -308,7 +308,7 @@
 {
 	struct usb_interface		*iface = dev->intf;
 	struct usb_device		*udev;
-	struct usb_interface_descriptor	*iface_as;
+	struct usb_host_interface	*iface_as;
 	int				i, ret;
 
 	if (alternate < 0 || alternate >= iface->num_altsetting)
@@ -317,8 +317,8 @@
 	udev = interface_to_usbdev (iface);
 	if ((ret = usb_control_msg (udev, usb_sndctrlpipe (udev, 0),
 			USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
-			iface->altsetting [alternate].bAlternateSetting,
-			iface->altsetting [alternate].bInterfaceNumber,
+			alternate,
+			iface->altsetting->desc.bInterfaceNumber,
 			NULL, 0, HZ * USB_CTRL_SET_TIMEOUT)) < 0)
 		return ret;
 
@@ -328,8 +328,8 @@
 
 	/* prevent requests using previous endpoint settings */
 	iface_as = iface->altsetting + iface->act_altsetting;
-	for (i = 0; i < iface_as->bNumEndpoints; i++) {
-		u8	ep = iface_as->endpoint [i].bEndpointAddress;
+	for (i = 0; i < iface_as->desc.bNumEndpoints; i++) {
+		u8	ep = iface_as->endpoint [i].desc.bEndpointAddress;
 		int	out = !(ep & USB_DIR_IN);
 
 		ep &= USB_ENDPOINT_NUMBER_MASK;
@@ -340,14 +340,14 @@
 
 	/* reset toggles and maxpacket for all endpoints affected */
 	iface_as = iface->altsetting + iface->act_altsetting;
-	for (i = 0; i < iface_as->bNumEndpoints; i++) {
-		u8	ep = iface_as->endpoint [i].bEndpointAddress;
+	for (i = 0; i < iface_as->desc.bNumEndpoints; i++) {
+		u8	ep = iface_as->endpoint [i].desc.bEndpointAddress;
 		int	out = !(ep & USB_DIR_IN);
 
 		ep &= USB_ENDPOINT_NUMBER_MASK;
 		usb_settoggle (udev, ep, out, 0);
 		(out ? udev->epmaxpacketout : udev->epmaxpacketin ) [ep]
-			= iface_as->endpoint [i].wMaxPacketSize;
+			= iface_as->endpoint [i].desc.wMaxPacketSize;
 	}
 
 	return 0;
@@ -415,10 +415,10 @@
 		/* 9.2.3 constrains the range here, and Linux ensures
 		 * they're ordered meaningfully in this array
 		 */
-		if (iface->altsetting [i].bAlternateSetting != i) {
+		if (iface->altsetting [i].desc.bAlternateSetting != i) {
 			dbg ("%s, illegal alt [%d].bAltSetting = %d",
 					dev->id, i, 
-					iface->altsetting [i]
+					iface->altsetting [i].desc
 						.bAlternateSetting);
 			return -EDOM;
 		}
@@ -447,9 +447,12 @@
 
 	/* [real world] get_config unimplemented if there's only one */
 	if (udev->descriptor.bNumConfigurations != 1) {
-		int	expected = udev->actconfig->bConfigurationValue;
+		int	expected = udev->actconfig->desc.bConfigurationValue;
 
-		/* [9.4.2] get_configuration always works */
+		/* [9.4.2] get_configuration always works
+		 * ... although some cheap devices (like one TI Hub I've got)
+		 * won't return config descriptors except before set_config.
+		 */
 		retval = usb_control_msg (udev, usb_rcvctrlpipe (udev, 0),
 				USB_REQ_GET_CONFIGURATION, USB_RECIP_DEVICE,
 				0, 0, dev->buf, 1, HZ * USB_CTRL_GET_TIMEOUT);
@@ -531,7 +534,7 @@
 	// the device's remote wakeup feature ... if we can, test that here
 
 	retval = usb_get_status (udev, USB_RECIP_INTERFACE,
-			iface->altsetting [0].bInterfaceNumber, dev->buf);
+			iface->altsetting [0].desc.bInterfaceNumber, dev->buf);
 	if (retval != 2) {
 		dbg ("%s get interface status --> %d", dev->id, retval);
 		return (retval < 0) ? retval : -EDOM;
@@ -543,6 +546,10 @@
 
 /*-------------------------------------------------------------------------*/
 
+// control queueing !!
+
+/*-------------------------------------------------------------------------*/
+
 /* We only have this one interface to user space, through usbfs.
  * User mode code can scan usbfs to find N different devices (maybe on
  * different busses) to use when testing, and allocate one thread per
@@ -584,7 +591,7 @@
 	if (dev->info->alt >= 0) {
 	    	int	res;
 
-		if (intf->altsetting->bInterfaceNumber)
+		if (intf->altsetting->desc.bInterfaceNumber)
 			return -ENODEV;
 		res = set_altsetting (dev, dev->info->alt);
 		if (res) {
@@ -816,7 +823,7 @@
 	/* use the same kind of id the hid driver shows */
 	snprintf (dev->id, sizeof dev->id, "%s-%s:%d",
 			udev->bus->bus_name, udev->devpath,
-			intf->altsetting [0].bInterfaceNumber);
+			intf->altsetting [0].desc.bInterfaceNumber);
 	dev->intf = intf;
 
 	/* cacheline-aligned scratch for i/o */
@@ -839,14 +846,6 @@
 			dev->out_pipe = usb_sndintpipe (udev, info->ep_out);
 			wtest = " intr-out";
 		}
-
-#if 1
-		// FIXME disabling this until we finally get rid of
-		// interrupt "automagic" resubmission
-		dbg ("%s:  no interrupt transfers for now", dev->id);
-		kfree (dev);
-		return -ENODEV;
-#endif
 	} else {
 		if (info->ep_in) {
 			dev->in_pipe = usb_rcvbulkpipe (udev, info->ep_in);
diff -Nru a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
--- a/drivers/usb/misc/uss720.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/usb/misc/uss720.c	Wed Oct 30 16:44:17 2002
@@ -549,8 +549,8 @@
 			const struct usb_device_id *id)
 {
 	struct usb_device *usbdev = interface_to_usbdev(intf);
-	struct usb_interface_descriptor *interface;
-	struct usb_endpoint_descriptor *endpoint;
+	struct usb_host_interface *interface;
+	struct usb_host_endpoint *endpoint;
 	struct parport_uss720_private *priv;
 	struct parport *pp;
 	int i;
@@ -562,7 +562,7 @@
 	if (intf->num_altsetting != 3)
 		return -ENODEV;
 
-	i = usb_set_interface(usbdev, intf->altsetting->bInterfaceNumber, 2);
+	i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
 	printk(KERN_DEBUG "uss720: set inteface result %d\n", i);
 
 	interface = &intf->altsetting[2];
@@ -593,7 +593,7 @@
 	       priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3], priv->reg[4], priv->reg[5], priv->reg[6]);
 
 	endpoint = &interface->endpoint[2];
-	printk(KERN_DEBUG "uss720: epaddr %d interval %d\n", endpoint->bEndpointAddress, endpoint->bInterval);
+	printk(KERN_DEBUG "uss720: epaddr %d interval %d\n", endpoint->desc.bEndpointAddress, endpoint->desc.bInterval);
 #if 0
 	priv->irqpipe = usb_rcvctrlpipe(usbdev, endpoint->bEndpointAddress);
 	i = usb_request_irq(usbdev, priv->irqpipe,
diff -Nru a/drivers/usb/net/Config.help b/drivers/usb/net/Config.help
--- a/drivers/usb/net/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,118 +0,0 @@
-CONFIG_USB_CATC
-  Say Y if you want to use one of the following 10Mbps USB Ethernet
-  device based on the EL1210A chip. Supported devices are:
-    Belkin F5U011
-    Belkin F5U111
-    CATC NetMate
-    CATC NetMate II
-    smartBridges smartNIC
-
-  This driver makes the adapter appear as a normal Ethernet interface,
-  typically on eth0, if it is the only ethernet device, or perhaps on
-  eth1, if you have a PCI or ISA ethernet card installed.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called catc.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_CDCETHER
-  This driver supports devices conforming to the Communication Device
-  Class Ethernet Control Model.  This is used in some cable modems.
-  For more details on the specification, get the Communication Device
-  Class specification from <http://www.usb.org/>.
-
-  This driver should work with the following devices:
-        * Ericsson PipeRider (all variants)
-        * Motorola (DM100 and SB4100)
-        * Broadcom Cable Modem (reference design)
-        * Toshiba PCX1100U and possibly other cable modems
-
-  The device creates a network device (ethX, where X depends on what
-  other networking devices you have in use), as for a normal PCI
-  or ISA based ethernet network card.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cdc-ether.o.  If you want to compile it 
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_KAWETH
-  Say Y here if you want to use one of the following 10Mbps only
-  USB Ethernet adapters based on the KLSI KL5KUSB101B chipset:
-       3Com 3C19250
-       ADS USB-10BT
-       ATEN USB Ethernet
-       ASANTE USB To Ethernet Adapter
-       AOX Endpoints USB Ethernet
-       Correga K.K.
-       D-Link DSB-650C and DU-E10
-       Entrega / Portgear E45
-       I-O DATA USB-ET/T
-       Jaton USB Ethernet Device Adapter
-       Kingston Technology USB Ethernet Adapter
-       Linksys USB10T
-       Mobility USB-Ethernet Adapter
-       NetGear EA-101
-       Peracom Enet and Enet2
-       Portsmith Express Ethernet Adapter
-       Shark Pocket Adapter
-       SMC 2202USB
-       Sony Vaio port extender
-
-  This driver is likely to work with most 10Mbps only USB Ethernet
-  adapters, including some "no brand" devices. It does NOT work on
-  SmartBridges smartNIC or on Belkin F5U111 devices - you should use
-  the CATC NetMate driver for those. If you are not sure which one
-  you need, select both, and the correct one should be selected for
-  you.
-
-  This driver makes the adapter appear as a normal Ethernet interface,
-  typically on eth0, if it is the only ethernet device, or perhaps on
-  eth1, if you have a PCI or ISA ethernet card installed.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called kaweth.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_PEGASUS
-  Say Y here if you know you have Pegasus or Pegasus-II based adapter.
-  If in doubt then look at linux/drivers/usb/pegasus.h for the complete
-  list of supported devices.
-  If your particular adapter is not in the list and you are _sure_ it
-  is Pegasus or Pegasus II based then send me (petkan@users.sourceforge.net)
-  vendor and device IDs.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called pegasus.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_RTL8150
-  Say Y here if you have RTL8150 based usb-ethernet adapter.
-  Send me (petkan@users.sourceforge.net) any comments you may have.
-  You can also check for updates at http://pegasus2.sourceforge.net/
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called rtl8150.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_USBNET
-  This driver supports network links over USB with USB "Network"
-  or "data transfer" cables, often used to network laptops to PCs.
-  Such cables have chips from suppliers such as Belkin/eTEK, GeneSys
-  (GeneLink), NetChip and Prolific. Intelligent USB devices could also
-  use this approach to provide Internet access, using standard USB
-  cabling. You can find these chips also on some motherboards with
-  USB PC2PC support.
-
-  These links will have names like "usb0", "usb1", etc.  They act
-  like two-node Ethernets, so you can use 802.1d Ethernet Bridging
-  (CONFIG_BRIDGE) to simplify your network routing.
-
-  This code is also available as a kernel module (code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usbnet.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
diff -Nru a/drivers/usb/net/Config.in b/drivers/usb/net/Config.in
--- a/drivers/usb/net/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,14 +0,0 @@
-#
-# USB Network devices configuration
-#
-comment 'USB Network adaptors'
-if [ "$CONFIG_NET" = "n" ]; then
-   comment '  Networking support is needed for USB Networking device support'
-else
-   dep_tristate '  USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CATC $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
-   dep_tristate '  USB CDC Ethernet support (EXPERIMENTAL)' CONFIG_USB_CDCETHER $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
-   dep_tristate '  USB KLSI KL5USB101-based ethernet device support' CONFIG_USB_KAWETH $CONFIG_USB $CONFIG_NET
-   dep_tristate '  USB Pegasus/Pegasus-II based ethernet device support' CONFIG_USB_PEGASUS $CONFIG_USB $CONFIG_NET
-   dep_tristate '  USB RTL8150 based ethernet device support (EXPERIMENTAL)' CONFIG_USB_RTL8150 $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
-   dep_tristate '  USB-to-USB Networking cable device support' CONFIG_USB_USBNET $CONFIG_USB $CONFIG_NET
-fi
diff -Nru a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/net/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,146 @@
+#
+# USB Network devices configuration
+#
+comment "USB Network adaptors"
+	depends on USB
+
+comment "Networking support is needed for USB Networking device support"
+	depends on USB && !NET
+
+config USB_CATC
+	tristate "USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)"
+	depends on USB && NET && EXPERIMENTAL
+	---help---
+	  Say Y if you want to use one of the following 10Mbps USB Ethernet
+	  device based on the EL1210A chip. Supported devices are:
+	  Belkin F5U011
+	  Belkin F5U111
+	  CATC NetMate
+	  CATC NetMate II
+	  smartBridges smartNIC
+
+	  This driver makes the adapter appear as a normal Ethernet interface,
+	  typically on eth0, if it is the only ethernet device, or perhaps on
+	  eth1, if you have a PCI or ISA ethernet card installed.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called catc.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_CDCETHER
+	tristate "USB CDC Ethernet support (EXPERIMENTAL)"
+	depends on USB && NET && EXPERIMENTAL
+	---help---
+	  This driver supports devices conforming to the Communication Device
+	  Class Ethernet Control Model.  This is used in some cable modems.
+	  For more details on the specification, get the Communication Device
+	  Class specification from <http://www.usb.org/>.
+
+	  This driver should work with the following devices:
+	  * Ericsson PipeRider (all variants)
+	  * Motorola (DM100 and SB4100)
+	  * Broadcom Cable Modem (reference design)
+	  * Toshiba PCX1100U and possibly other cable modems
+
+	  The device creates a network device (ethX, where X depends on what
+	  other networking devices you have in use), as for a normal PCI
+	  or ISA based ethernet network card.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called cdc-ether.o.  If you want to compile it 
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_KAWETH
+	tristate "USB KLSI KL5USB101-based ethernet device support"
+	depends on USB && NET
+	---help---
+	  Say Y here if you want to use one of the following 10Mbps only
+	  USB Ethernet adapters based on the KLSI KL5KUSB101B chipset:
+	  3Com 3C19250
+	  ADS USB-10BT
+	  ATEN USB Ethernet
+	  ASANTE USB To Ethernet Adapter
+	  AOX Endpoints USB Ethernet
+	  Correga K.K.
+	  D-Link DSB-650C and DU-E10
+	  Entrega / Portgear E45
+	  I-O DATA USB-ET/T
+	  Jaton USB Ethernet Device Adapter
+	  Kingston Technology USB Ethernet Adapter
+	  Linksys USB10T
+	  Mobility USB-Ethernet Adapter
+	  NetGear EA-101
+	  Peracom Enet and Enet2
+	  Portsmith Express Ethernet Adapter
+	  Shark Pocket Adapter
+	  SMC 2202USB
+	  Sony Vaio port extender
+
+	  This driver is likely to work with most 10Mbps only USB Ethernet
+	  adapters, including some "no brand" devices. It does NOT work on
+	  SmartBridges smartNIC or on Belkin F5U111 devices - you should use
+	  the CATC NetMate driver for those. If you are not sure which one
+	  you need, select both, and the correct one should be selected for
+	  you.
+
+	  This driver makes the adapter appear as a normal Ethernet interface,
+	  typically on eth0, if it is the only ethernet device, or perhaps on
+	  eth1, if you have a PCI or ISA ethernet card installed.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called kaweth.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_PEGASUS
+	tristate "USB Pegasus/Pegasus-II based ethernet device support"
+	depends on USB && NET
+	---help---
+	  Say Y here if you know you have Pegasus or Pegasus-II based adapter.
+	  If in doubt then look at linux/drivers/usb/pegasus.h for the complete
+	  list of supported devices.
+	  If your particular adapter is not in the list and you are _sure_ it
+	  is Pegasus or Pegasus II based then send me (petkan@users.sourceforge.net)
+	  vendor and device IDs.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called pegasus.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_RTL8150
+	tristate "USB RTL8150 based ethernet device support (EXPERIMENTAL)"
+	depends on USB && NET && EXPERIMENTAL
+	help
+	  Say Y here if you have RTL8150 based usb-ethernet adapter.
+	  Send me (petkan@users.sourceforge.net) any comments you may have.
+	  You can also check for updates at http://pegasus2.sourceforge.net/
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called rtl8150.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_USBNET
+	tristate "USB-to-USB Networking cable device support"
+	depends on USB && NET
+	---help---
+	  This driver supports network links over USB with USB "Network"
+	  or "data transfer" cables, often used to network laptops to PCs.
+	  Such cables have chips from suppliers such as Belkin/eTEK, GeneSys
+	  (GeneLink), NetChip and Prolific. Intelligent USB devices could also
+	  use this approach to provide Internet access, using standard USB
+	  cabling. You can find these chips also on some motherboards with
+	  USB PC2PC support.
+
+	  These links will have names like "usb0", "usb1", etc.  They act
+	  like two-node Ethernets, so you can use 802.1d Ethernet Bridging
+	  (CONFIG_BRIDGE) to simplify your network routing.
+
+	  This code is also available as a kernel module (code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usbnet.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c
--- a/drivers/usb/net/catc.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/net/catc.c	Wed Oct 30 16:44:28 2002
@@ -308,9 +308,17 @@
 			linksts = LinkBad;
 	}
 
-	if (urb->status) {
-		dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
+	switch (urb->status) {
+	case 0:			/* success */
+		break;
+	case -ECONNRESET:	/* unlink */
+	case -ENOENT:
+	case -ESHUTDOWN:
 		return;
+	/* -EPIPE:  should clear the halt */
+	default:		/* error */
+		dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
+		goto resubmit;
 	}
 
 	if (linksts == LinkGood) {
@@ -334,6 +342,12 @@
 			}
 		} 
 	}
+resubmit:
+	status = usb_submit_urb (urb, SLAB_ATOMIC);
+	if (status)
+		err ("can't resubmit intr, %s-%s, status %d",
+				catc->usbdev->bus->bus_name,
+				catc->usbdev->devpath, status);
 }
 
 /*
@@ -367,7 +381,7 @@
 
 	if (urb->status == -ECONNRESET) {
 		dbg("Tx Reset.");
-		urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+		urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 		urb->status = 0;
 		catc->netdev->trans_start = jiffies;
 		catc->stats.tx_errors++;
@@ -429,7 +443,7 @@
 	struct catc *catc = netdev->priv;
 
 	warn("Transmit timed out.");
-	catc->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+	catc->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
 	usb_unlink_urb(catc->tx_urb);
 }
 
@@ -769,7 +783,8 @@
 	u8 broadcast[6];
 	int i, pktsz;
 
-	if (usb_set_interface(usbdev, intf->altsetting->bInterfaceNumber, 1)) {
+	if (usb_set_interface(usbdev,
+			intf->altsetting->desc.bInterfaceNumber, 1)) {
                 err("Can't set altsetting 1.");
 		return -EIO;
 	}
@@ -833,16 +848,16 @@
 		pktsz = RX_MAX_BURST * (PKT_SZ + 2);
 	}
 	
-	FILL_CONTROL_URB(catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
+	usb_fill_control_urb(catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
 		NULL, NULL, 0, catc_ctrl_done, catc);
 
-	FILL_BULK_URB(catc->tx_urb, usbdev, usb_sndbulkpipe(usbdev, 1),
+	usb_fill_bulk_urb(catc->tx_urb, usbdev, usb_sndbulkpipe(usbdev, 1),
 		NULL, 0, catc_tx_done, catc);
 
-	FILL_BULK_URB(catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
+	usb_fill_bulk_urb(catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
 		catc->rx_buf, pktsz, catc_rx_done, catc);
 
-	FILL_INT_URB(catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
+	usb_fill_int_urb(catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
                 catc->irq_buf, 2, catc_irq_done, catc, 1);
 
 	if (!catc->is_f5u011) {
diff -Nru a/drivers/usb/net/cdc-ether.c b/drivers/usb/net/cdc-ether.c
--- a/drivers/usb/net/cdc-ether.c	Wed Oct 30 16:44:19 2002
+++ b/drivers/usb/net/cdc-ether.c	Wed Oct 30 16:44:19 2002
@@ -125,7 +125,7 @@
 
 goon:
 	// Prep the USB to wait for another frame
-	FILL_BULK_URB( ether_dev->rx_urb, ether_dev->usb,
+	usb_fill_bulk_urb( ether_dev->rx_urb, ether_dev->usb,
 			usb_rcvbulkpipe(ether_dev->usb, ether_dev->data_ep_in),
 			ether_dev->rx_buff, ether_dev->wMaxSegmentSize, 
 			read_bulk_callback, ether_dev );
@@ -259,7 +259,7 @@
 	warn("%s: Tx timed out.", net->name);
 	
 	// Tear the waiting frame off the list
-	ether_dev->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+	ether_dev->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
 	usb_unlink_urb( ether_dev->tx_urb );
 	
 	// Update statistics
@@ -293,7 +293,7 @@
 	memcpy(ether_dev->tx_buff, skb->data, skb->len);
 
 	// Fill in the URB for shipping it out.
-	FILL_BULK_URB( ether_dev->tx_urb, ether_dev->usb,
+	usb_fill_bulk_urb( ether_dev->tx_urb, ether_dev->usb,
 			usb_sndbulkpipe(ether_dev->usb, ether_dev->data_ep_out),
 			ether_dev->tx_buff, ether_dev->wMaxSegmentSize, 
 			write_bulk_callback, ether_dev );
@@ -344,7 +344,7 @@
 	}
 
 	// Prep a receive URB
-	FILL_BULK_URB( ether_dev->rx_urb, ether_dev->usb,
+	usb_fill_bulk_urb( ether_dev->rx_urb, ether_dev->usb,
 			usb_rcvbulkpipe(ether_dev->usb, ether_dev->data_ep_in),
 			ether_dev->rx_buff, ether_dev->wMaxSegmentSize, 
 			read_bulk_callback, ether_dev );
@@ -723,9 +723,9 @@
 
 static int find_and_parse_ethernet_class_information( struct usb_device *device, ether_dev_t *ether_dev )
 {
-	struct usb_config_descriptor *conf = NULL;
+	struct usb_host_config *conf = NULL;
 	struct usb_interface *comm_intf_group = NULL;
-	struct usb_interface_descriptor *comm_intf = NULL;
+	struct usb_host_interface *comm_intf = NULL;
 	int rc = -1;
 	// The assumption here is that find_ethernet_comm_interface
 	// and find_valid_configuration 
@@ -760,9 +760,9 @@
 
 static int get_data_interface_endpoints( struct usb_device *device, ether_dev_t *ether_dev )
 {
-	struct usb_config_descriptor *conf = NULL;
+	struct usb_host_config *conf = NULL;
 	struct usb_interface *data_intf_group = NULL;
-	struct usb_interface_descriptor *data_intf = NULL;
+	struct usb_host_interface *data_intf = NULL;
 	
 	// Walk through and get to the data interface we are checking.
 	conf = &( device->config[ether_dev->configuration_num] );
@@ -774,30 +774,30 @@
 	ether_dev->data_ep_out = 0;
 	
 	// If these are not BULK endpoints, we don't want them
-	if ( data_intf->endpoint[0].bmAttributes != 0x02 ) {
+	if ( data_intf->endpoint[0].desc.bmAttributes != 0x02 ) {
 		return -1;
-	} if ( data_intf->endpoint[1].bmAttributes != 0x02 ) {
+	} if ( data_intf->endpoint[1].desc.bmAttributes != 0x02 ) {
 		return -1;
 	}
 
 	// Check the first endpoint to see if it is IN or OUT
-	if ( data_intf->endpoint[0].bEndpointAddress & 0x80 ) {
+	if ( data_intf->endpoint[0].desc.bEndpointAddress & 0x80 ) {
 		// This endpoint is IN
-		ether_dev->data_ep_in = data_intf->endpoint[0].bEndpointAddress & 0x7F;
+		ether_dev->data_ep_in = data_intf->endpoint[0].desc.bEndpointAddress & 0x7F;
 	} else {
 		// This endpoint is OUT
-		ether_dev->data_ep_out = data_intf->endpoint[0].bEndpointAddress & 0x7F;
-		ether_dev->data_ep_out_size = data_intf->endpoint[0].wMaxPacketSize;
+		ether_dev->data_ep_out = data_intf->endpoint[0].desc.bEndpointAddress & 0x7F;
+		ether_dev->data_ep_out_size = data_intf->endpoint[0].desc.wMaxPacketSize;
 	}
 
 	// Check the second endpoint to see if it is IN or OUT
-	if ( data_intf->endpoint[1].bEndpointAddress & 0x80 ) {
+	if ( data_intf->endpoint[1].desc.bEndpointAddress & 0x80 ) {
 		// This endpoint is IN
-		ether_dev->data_ep_in = data_intf->endpoint[1].bEndpointAddress & 0x7F;
+		ether_dev->data_ep_in = data_intf->endpoint[1].desc.bEndpointAddress & 0x7F;
 	} else	{
 		// This endpoint is OUT
-		ether_dev->data_ep_out = data_intf->endpoint[1].bEndpointAddress & 0x7F;
-		ether_dev->data_ep_out_size = data_intf->endpoint[1].wMaxPacketSize;
+		ether_dev->data_ep_out = data_intf->endpoint[1].desc.bEndpointAddress & 0x7F;
+		ether_dev->data_ep_out_size = data_intf->endpoint[1].desc.wMaxPacketSize;
 	}
 	
 	// Now make sure we got both an IN and an OUT
@@ -811,7 +811,7 @@
 
 static int verify_ethernet_data_interface( struct usb_device *device, ether_dev_t *ether_dev )
 {
-	struct usb_config_descriptor *conf = NULL;
+	struct usb_host_config *conf = NULL;
 	struct usb_interface *data_intf_group = NULL;
 	struct usb_interface_descriptor *data_intf = NULL;
 	int rc = -1;
@@ -834,7 +834,7 @@
 	// Walk through every possible setting for this interface until
 	// we find what makes us happy.
 	for ( altset_num = 0; altset_num < data_intf_group->num_altsetting; altset_num++ ) {
-		data_intf = &( data_intf_group->altsetting[altset_num] );
+		data_intf = &( data_intf_group->altsetting[altset_num].desc );
 
 		// Is this a data interface we like?
 		if ( ( data_intf->bInterfaceClass == 0x0A )
@@ -875,7 +875,7 @@
 
 static int find_ethernet_comm_interface( struct usb_device *device, ether_dev_t *ether_dev )
 {
-	struct usb_config_descriptor *conf = NULL;
+	struct usb_host_config *conf = NULL;
 	struct usb_interface *comm_intf_group = NULL;
 	struct usb_interface_descriptor *comm_intf = NULL;
 	int intf_num;
@@ -886,12 +886,12 @@
 
 	// We need to check and see if any of these interfaces are something we want.
 	// Walk through each interface one at a time
-	for ( intf_num = 0; intf_num < conf->bNumInterfaces; intf_num++ ) {
+	for ( intf_num = 0; intf_num < conf->desc.bNumInterfaces; intf_num++ ) {
 		comm_intf_group = &( conf->interface[intf_num] );
 		// Now for each of those interfaces, check every possible
 		// alternate setting.
 		for ( altset_num = 0; altset_num < comm_intf_group->num_altsetting; altset_num++ ) {
-			comm_intf = &( comm_intf_group->altsetting[altset_num] );
+			comm_intf = &( comm_intf_group->altsetting[altset_num].desc);
 
 			// Is this a communication class of interface of the
 			// ethernet subclass variety.
@@ -944,7 +944,7 @@
 
 static int find_valid_configuration( struct usb_device *device, ether_dev_t *ether_dev )
 {
-	struct usb_config_descriptor *conf = NULL;
+	struct usb_host_config *conf = NULL;
 	int conf_num;
 	int rc;
 
@@ -953,7 +953,7 @@
 		conf = &( device->config[conf_num] );
 
 		// Our first requirement : 2 interfaces
-		if ( conf->bNumInterfaces != 2 ) {
+		if ( conf->desc.bNumInterfaces != 2 ) {
 			// I currently don't know how to handle devices with any number of interfaces
 			// other than 2.
 			continue;
@@ -962,7 +962,7 @@
 		// This one passed our first check, fill in some 
 		// useful data
 		ether_dev->configuration_num = conf_num;
-		ether_dev->bConfigurationValue = conf->bConfigurationValue;
+		ether_dev->bConfigurationValue = conf->desc.bConfigurationValue;
 
 		// Now run it through the ringers and see what comes
 		// out the other side.
@@ -983,14 +983,14 @@
 // has claimed any of the devices interfaces /////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 
-static int check_for_claimed_interfaces( struct usb_config_descriptor *config )
+static int check_for_claimed_interfaces( struct usb_host_config *config )
 {
 	struct usb_interface *comm_intf_group;
 	int intf_num;
 
 	// Go through all the interfaces and make sure none are 
 	// claimed by anybody else.
-	for ( intf_num = 0; intf_num < config->bNumInterfaces; intf_num++ ) {
+	for ( intf_num = 0; intf_num < config->desc.bNumInterfaces; intf_num++ ) {
 		comm_intf_group = &( config->interface[intf_num] );
 		if ( usb_interface_claimed( comm_intf_group ) )	{
 			// Somebody has beat us to this guy.
diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
--- a/drivers/usb/net/kaweth.c	Wed Oct 30 16:44:30 2002
+++ b/drivers/usb/net/kaweth.c	Wed Oct 30 16:44:30 2002
@@ -449,7 +449,7 @@
 				usb_sndctrlpipe(kaweth->dev, 0),
 				USB_REQ_SET_CONFIGURATION,
 				0,
-				kaweth->dev->config[0].bConfigurationValue,
+				kaweth->dev->config[0].desc.bConfigurationValue,
 				0,
 				NULL,
 				0,
@@ -471,12 +471,24 @@
 static void int_callback(struct urb *u)
 {
 	struct kaweth_device *kaweth = u->context;
-	int act_state;
+	int act_state, status;
 
 	/* we abuse the interrupt urb for rebsubmitting under low memory saving a timer */
 	if (kaweth->suspend_lowmem)
 		kaweth_resubmit_rx_urb(kaweth, GFP_ATOMIC);
 
+	switch (u->status) {
+	case 0:			/* success */
+		break;
+	case -ECONNRESET:	/* unlink */
+	case -ENOENT:
+	case -ESHUTDOWN:
+		return;
+	/* -EPIPE:  should clear the halt */
+	default:		/* error */
+		goto resubmit;
+	}
+
 	/* we check the link state to report changes */
 	if (kaweth->linkstate != (act_state = ( kaweth->intbuffer[STATE_OFFSET] | STATE_MASK) >> STATE_SHIFT)) {
 		if (!act_state)
@@ -486,7 +498,12 @@
 
 		kaweth->linkstate = act_state;
 	}
-
+resubmit:
+	status = usb_submit_urb (u, SLAB_ATOMIC);
+	if (status)
+		err ("can't resubmit intr, %s-%s, status %d",
+				kaweth->dev->bus->bus_name,
+				kaweth->dev->devpath, status);
 }
 
 /****************************************************************
@@ -497,7 +514,7 @@
 {
 	int result;
 
-	FILL_BULK_URB(kaweth->rx_urb,
+	usb_fill_bulk_urb(kaweth->rx_urb,
 		      kaweth->dev,
 		      usb_rcvbulkpipe(kaweth->dev, 1),
 		      kaweth->rx_buf,
@@ -603,7 +620,7 @@
 	if (res)
 		return -EIO;
 
-	FILL_INT_URB(
+	usb_fill_int_urb(
 		kaweth->irq_urb,
 		kaweth->dev,
 		usb_rcvintpipe(kaweth->dev, 3),
@@ -735,7 +752,7 @@
 	*private_header = cpu_to_le16(skb->len);
 	kaweth->tx_skb = skb;
 
-	FILL_BULK_URB(kaweth->tx_urb,
+	usb_fill_bulk_urb(kaweth->tx_urb,
 		      kaweth->dev,
 		      usb_sndbulkpipe(kaweth->dev, 2),
 		      private_header,
@@ -743,7 +760,7 @@
 		      kaweth_usb_transmit_complete,
 		      kaweth);
 	kaweth->end = 0;
-	kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+	kaweth->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
 
 	if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC)))
 	{
@@ -1190,7 +1207,7 @@
         if (!urb)
                 return -ENOMEM;
 
-        FILL_CONTROL_URB(urb, usb_dev, pipe, (unsigned char*)cmd, data,
+        usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char*)cmd, data,
 			 len, (usb_complete_t)usb_api_blocking_completion,0);
 
         retv = usb_start_wait_urb(urb, timeout, &length);
diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
--- a/drivers/usb/net/pegasus.c	Wed Oct 30 16:44:35 2002
+++ b/drivers/usb/net/pegasus.c	Wed Oct 30 16:44:35 2002
@@ -143,7 +143,7 @@
 	pegasus->dr.wLength = cpu_to_le16p(&size);
 	pegasus->ctrl_urb->transfer_buffer_length = size;
 
-	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
+	usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
 			 usb_rcvctrlpipe(pegasus->usb, 0),
 			 (char *) &pegasus->dr,
 			 buffer, size, ctrl_callback, pegasus);
@@ -194,7 +194,7 @@
 	pegasus->dr.wLength = cpu_to_le16p(&size);
 	pegasus->ctrl_urb->transfer_buffer_length = size;
 
-	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
+	usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
 			 usb_sndctrlpipe(pegasus->usb, 0),
 			 (char *) &pegasus->dr,
 			 buffer, size, ctrl_callback, pegasus);
@@ -243,7 +243,7 @@
 	pegasus->dr.wLength = cpu_to_le16(1);
 	pegasus->ctrl_urb->transfer_buffer_length = 1;
 
-	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
+	usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
 			 usb_sndctrlpipe(pegasus->usb, 0),
 			 (char *) &pegasus->dr,
 			 buffer, 1, ctrl_callback, pegasus);
@@ -275,7 +275,7 @@
 	pegasus->dr.wLength = cpu_to_le16(3);
 	pegasus->ctrl_urb->transfer_buffer_length = 3;
 
-	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
+	usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
 			 usb_sndctrlpipe(pegasus->usb, 0),
 			 (char *) &pegasus->dr,
 			 pegasus->eth_regs, 3, ctrl_callback, pegasus);
@@ -596,7 +596,7 @@
 	if (pegasus->rx_skb == NULL)
 		goto tl_sched;
 goon:
-	FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
+	usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
 		      usb_rcvbulkpipe(pegasus->usb, 1),
 		      pegasus->rx_skb->data, PEGASUS_MTU + 8,
 		      read_bulk_callback, pegasus);
@@ -635,7 +635,7 @@
 		tasklet_schedule(&pegasus->rx_tl);
 		return;
 	}
-	FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
+	usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
  	              usb_rcvbulkpipe(pegasus->usb, 1),
 	              pegasus->rx_skb->data, PEGASUS_MTU + 8,
 	              read_bulk_callback, pegasus);	
@@ -670,6 +670,7 @@
 	pegasus_t *pegasus = urb->context;
 	struct net_device *net;
 	__u8 *d;
+	int status;
 
 	if (!pegasus)
 		return;
@@ -677,7 +678,9 @@
 	switch (urb->status) {
 	case 0:
 		break;
+	case -ECONNRESET:	/* unlink */
 	case -ENOENT:
+	case -ESHUTDOWN:
 		return;
 	default:
 		info("intr status %d", urb->status);
@@ -700,6 +703,11 @@
 			netif_carrier_on(net);
 		}
 	}
+
+	status = usb_submit_urb (urb, SLAB_ATOMIC);
+	if (status)
+		err ("%s: can't resubmit interrupt urb, %d",
+				net->name, status);
 }
 
 static void pegasus_tx_timeout(struct net_device *net)
@@ -710,7 +718,7 @@
 		return;
 
 	warn("%s: Tx timed out.", net->name);
-	pegasus->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+	pegasus->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
 	usb_unlink_urb(pegasus->tx_urb);
 	pegasus->stats.tx_errors++;
 }
@@ -726,7 +734,7 @@
 
 	((__u16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16);
 	memcpy(pegasus->tx_buff + 2, skb->data, skb->len);
-	FILL_BULK_URB(pegasus->tx_urb, pegasus->usb,
+	usb_fill_bulk_urb(pegasus->tx_urb, pegasus->usb,
 		      usb_sndbulkpipe(pegasus->usb, 2),
 		      pegasus->tx_buff, count,
 		      write_bulk_callback, pegasus);
@@ -844,13 +852,13 @@
 		return -ENOMEM;
 
 	down(&pegasus->sem);
-	FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
+	usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
 		      usb_rcvbulkpipe(pegasus->usb, 1),
 		      pegasus->rx_skb->data, PEGASUS_MTU + 8,
 		      read_bulk_callback, pegasus);
 	if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL)))
 		warn("%s: failed rx_urb %d", __FUNCTION__, res);
-	FILL_INT_URB(pegasus->intr_urb, pegasus->usb,
+	usb_fill_int_urb(pegasus->intr_urb, pegasus->usb,
 		     usb_rcvintpipe(pegasus->usb, 3),
 		     pegasus->intr_buff, sizeof(pegasus->intr_buff),
 		     intr_callback, pegasus, pegasus->intr_interval);
@@ -1053,7 +1061,7 @@
 	pegasus_t *pegasus;
 	int dev_index = id - pegasus_ids;
 
-	if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
+	if (usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue)) {
 		err("usb_set_configuration() failed");
 		return -ENODEV;
 	}
diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
--- a/drivers/usb/net/rtl8150.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/net/rtl8150.c	Wed Oct 30 16:44:29 2002
@@ -174,7 +174,7 @@
 	dev->dr.wIndex = 0;
 	dev->dr.wLength = cpu_to_le16(size);
 	dev->ctrl_urb->transfer_buffer_length = size;
-	FILL_CONTROL_URB(dev->ctrl_urb, dev->udev,
+	usb_fill_control_urb(dev->ctrl_urb, dev->udev,
 			 usb_sndctrlpipe(dev->udev, 0), (char *) &dev->dr,
 			 &dev->rx_creg, size, ctrl_callback, dev);
 	if ((ret = usb_submit_urb(dev->ctrl_urb, GFP_ATOMIC)))
@@ -387,7 +387,7 @@
 
 	dev->rx_skb = skb;
 goon:
-	FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
+	usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
 		      dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
 	if (usb_submit_urb(dev->rx_urb, GFP_ATOMIC)) {
 		set_bit(RX_URB_FAIL, &dev->flags);
@@ -420,7 +420,7 @@
 	if (skb == NULL)
 		goto tlsched;
 	dev->rx_skb = skb;
-	FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
+	usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
 		      dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
 try_again:
 	if (usb_submit_urb(dev->rx_urb, GFP_ATOMIC)) {
@@ -454,18 +454,32 @@
 void intr_callback(struct urb *urb)
 {
 	rtl8150_t *dev;
+	int status;
 
 	dev = urb->context;
 	if (!dev)
 		return;
 	switch (urb->status) {
-	case 0:
+	case 0:			/* success */
 		break;
+	case -ECONNRESET:	/* unlink */
 	case -ENOENT:
+	case -ESHUTDOWN:
 		return;
+	/* -EPIPE:  should clear the halt */
 	default:
 		info("%s: intr status %d", dev->netdev->name, urb->status);
+		goto resubmit;
 	}
+
+	/* FIXME if this doesn't do anything, don't submit the urb! */
+
+resubmit:
+	status = usb_submit_urb (urb, SLAB_ATOMIC);
+	if (status)
+		err ("can't resubmit intr, %s-%s/input0, status %d",
+				dev->udev->bus->bus_name,
+				dev->udev->devpath, status);
 }
 
 /*
@@ -559,7 +573,7 @@
 	if (!dev)
 		return;
 	warn("%s: Tx timeout.", netdev->name);
-	dev->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+	dev->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
 	usb_unlink_urb(dev->tx_urb);
 	dev->stats.tx_errors++;
 }
@@ -596,7 +610,7 @@
 	count = (skb->len < 60) ? 60 : skb->len;
 	count = (count & 0x3f) ? count : count + 1;
 	dev->tx_skb = skb;
-	FILL_BULK_URB(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2),
+	usb_fill_bulk_urb(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2),
 		      skb->data, count, write_bulk_callback, dev);
 	if ((res = usb_submit_urb(dev->tx_urb, GFP_ATOMIC))) {
 		warn("failed tx_urb %d\n", res);
@@ -626,11 +640,11 @@
 		return -ENOMEM;
 
 	down(&dev->sem);
-	FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
+	usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
 		      dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
 	if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL)))
 		warn("%s: rx_urb submit failed: %d", __FUNCTION__, res);
-	FILL_INT_URB(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3),
+	usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3),
 		     dev->intr_buff, sizeof(dev->intr_buff), intr_callback,
 		     dev, dev->intr_interval);
 	if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL)))
@@ -775,7 +789,7 @@
 	rtl8150_t *dev;
 	struct net_device *netdev;
 
-	if (usb_set_configuration(udev, udev->config[0].bConfigurationValue)) {
+	if (usb_set_configuration(udev, udev->config[0].desc.bConfigurationValue)) {
 		err("usb_set_configuration() failed");
 		return -EIO;
 	}
diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/net/usbnet.c	Wed Oct 30 16:44:29 2002
@@ -1,6 +1,21 @@
 /*
  * USB Host-to-Host Links
  * Copyright (C) 2000-2002 by David Brownell <dbrownell@users.sourceforge.net>
+ * Copyright (C) 2002 Pavel Machek <pavel@ucw.cz>
+ *
+ * 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
  */
 
 /*
@@ -18,13 +33,15 @@
  *	- Belkin, eTEK (interops with Win32 drivers)
  *	- EPSON USB clients
  *	- GeneSys GL620USB-A
- *	- "Linux Devices" (like iPaq and similar SA-1100 based PDAs)
  *	- NetChip 1080 (interoperates with NetChip Win32 drivers)
  *	- Prolific PL-2301/2302 (replaces "plusb" driver)
+ *	- SA-1100 based Linux PDAs like iPaq, Yopy, and Zaurus
  *
  * USB devices can implement their side of this protocol at the cost
  * of two bulk endpoints; it's not restricted to "cable" applications.
- * See the LINUXDEV or EPSON device/client support.
+ * See the SA1110, Zaurus, or EPSON device/client support in this driver;
+ * slave/target drivers such as "usb-eth" (on most SA-1100 PDAs) are
+ * used inside USB slave/target devices.
  *
  * 
  * Status:
@@ -37,10 +54,6 @@
  *   handshaking; it'd be worth implementing those as "carrier detect".
  *   Prefer generic hooks, not minidriver-specific hacks.
  *
- * - Linux devices ... the www.handhelds.org SA-1100 support works nicely,
- *   but the Sharp Zaurus uses an incompatible protocol (extra checksums).
- *   No reason not to merge the Zaurus protocol here too (got patch? :)
- *
  * - For Netchip, should use keventd to poll via control requests to detect
  *   hardware level "carrier detect". 
  *
@@ -48,11 +61,14 @@
  *   sheets, sometimes it's not needed and sometimes it hangs.  Prolific has
  *   not responded to repeated support/information requests.
  *
+ * - SA-1100 PDAs ... the www.handhelds.org SA-1100 support works nicely.
+ *   Zaurus support has some problems; it's made UHCI die.
+ *
  * Interop with more Win32 drivers may be a good thing.
  *
  * Seems like reporting "peer connected" (carrier present) events may end
- * up going through the netlink event system, not hotplug ... that may be
- * awkward in terms of automatic configuration though.
+ * up going through the netlink event system, not hotplug ... so new links
+ * would likely be handled with a link monitoring thread in some daemon.
  *
  * There are reports that bridging gives lower-than-usual throughput.
  *
@@ -100,6 +116,7 @@
  * 07-may-2002	Generalize/cleanup keventd support, handling rx stalls (mostly
  *		for USB 2.0 TTs) and memory shortages (potential) too. (db)
  *		Use "locally assigned" IEEE802 address space. (Brad Hards)
+ * 18-oct-2002  Support for Zaurus (Pavel Machek), related cleanup (db).
  *
  *-------------------------------------------------------------------------*/
 
@@ -131,12 +148,13 @@
 #define	CONFIG_USB_BELKIN
 #define	CONFIG_USB_EPSON2888
 #define	CONFIG_USB_GENESYS
-#define	CONFIG_USB_LINUXDEV
 #define	CONFIG_USB_NET1080
 #define	CONFIG_USB_PL2301
+#define	CONFIG_USB_SA1110
+#define	CONFIG_USB_ZAURUS
 
 
-#define DRIVER_VERSION		"17-Jul-2002"
+#define DRIVER_VERSION		"18-Oct-2002"
 
 /*-------------------------------------------------------------------------*/
 
@@ -337,7 +355,7 @@
  *
  * EPSON USB clients
  *
- * This is the same idea as "linuxdev" (below) except the firmware in the
+ * This is the same idea as Linux PDAs (below) except the firmware in the
  * device might not be Tux-powered.  Epson provides reference firmware that
  * implements this interface.  Product developers can reuse or modify that
  * code, such as by using their own product and vendor codes.
@@ -431,10 +449,24 @@
 {
 	int status = urb->status;
 	
+	switch (status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+	}
+
+	status = usb_submit_urb (urb, GFP_ATOMIC);
 	if (status)
-		dbg ("gl_interrupt_complete fail - %X", status);
-	else
-		dbg ("gl_interrupt_complete success...");
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 static int gl_interrupt_read (struct usbnet *dev)
@@ -500,7 +532,7 @@
 	}
 
 	// fill irq urb
-	FILL_INT_URB (priv->irq_urb, dev->udev,
+	usb_fill_int_urb (priv->irq_urb, dev->udev,
 		usb_rcvintpipe (dev->udev, GENELINK_INTERRUPT_PIPE),
 		priv->irq_buf, INTERRUPT_BUFSIZE,
 		gl_interrupt_complete, 0,
@@ -674,34 +706,6 @@
 
 
 
-#ifdef	CONFIG_USB_LINUXDEV
-
-/*-------------------------------------------------------------------------
- *
- * This could talk to a device that uses Linux, such as a PDA or
- * an embedded system, or in fact to any "smart" device using this
- * particular mapping of USB and Ethernet.
- *
- * Such a Linux host would need a "USB Device Controller" hardware
- * (not "USB Host Controller"), and a network driver talking to that
- * hardware.
- *
- * One example is Intel's SA-1100 chip, which integrates basic USB
- * support (arch/arm/sa1100/usb-eth.c); it's used in the iPaq PDA.
- * And others too, like the Yopy.
- *
- *-------------------------------------------------------------------------*/
-
-static const struct driver_info	linuxdev_info = {
-	.description =	"Linux Device",
-
-	.in = 2, .out = 1,
-	.epsize = 64,
-};
-
-#endif	/* CONFIG_USB_LINUXDEV */
-
-
 #ifdef	CONFIG_USB_NET1080
 
 /*-------------------------------------------------------------------------
@@ -1220,6 +1224,146 @@
 
 
 
+#ifdef	CONFIG_USB_SA1100
+
+/*-------------------------------------------------------------------------
+ *
+ * Intel's SA-1100 chip integrates basic USB support, and is used
+ * in PDAs like some iPaqs, the Yopy, some Zaurus models, and more.
+ * When they runs Linux, arch/arm/sa1100/usb-eth.c may be used to
+ * network using minimal USB framing data.
+ *
+ * This describes the driver currently in www.handhelds.org kernels.
+ * The Zaurus uses a different driver (see later).
+ *
+ *-------------------------------------------------------------------------*/
+
+static const struct driver_info	linuxdev_info = {
+	.description =	"SA-1100 Linux Device",
+
+	.in = 2, .out = 1,
+	.epsize = 64,
+};
+
+static const struct driver_info	yopy_info = {
+	.description =	"Yopy",
+
+	.in = 2, .out = 1,
+	.epsize = 64,
+};
+
+#endif	/* CONFIG_USB_SA1100 */
+
+
+#ifdef CONFIG_USB_ZAURUS
+
+/*-------------------------------------------------------------------------
+ *
+ * Zaurus is also a SA-1110 based PDA, but one using a different driver
+ * for its USB slave/target controller than the case above.
+ *
+ * The key differences are that (a) it's got a msft-friendly configuration,
+ * and (b) the linux-friendly framing adds a crc32 to cope with some
+ * memory corruption observed with usb-to-memory DMA in some cases.
+ *
+ *-------------------------------------------------------------------------*/
+
+static const u32 crc32_table [256] = {
+    0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+    0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+    0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+    0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+    0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+    0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+    0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+    0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+    0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+    0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+    0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+    0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+    0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+    0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+    0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+    0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+    0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+    0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+    0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+    0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+    0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+    0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+    0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+    0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+    0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+    0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+    0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+    0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+    0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+    0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+    0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+    0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+};
+
+#define CRC32_INITFCS     0xffffffff  // Initial FCS value 
+#define CRC32_FCS(fcs, c) (((fcs) >> 8) ^ crc32_table[((fcs) ^ (c)) & 0xff])
+
+/* fcs_compute32 - memcpy and calculate fcs
+ * Perform a memcpy and calculate fcs using ppp 32bit CRC algorithm.
+ */
+static inline u32 fcs_compute32 (unsigned char *sp, int len, u32 fcs)
+{
+	for (;len-- > 0; fcs = CRC32_FCS (fcs, *sp++))
+		continue;
+	return fcs;
+}
+
+static struct sk_buff *
+zaurus_tx_fixup (struct usbnet *dev, struct sk_buff *skb, int flags)
+{
+	int			padlen;
+	struct sk_buff		*skb2;
+
+	padlen = 2;
+	if (!skb_cloned (skb)) {
+		int	tailroom = skb_tailroom (skb);
+		if ((padlen + 4) <= tailroom)
+			goto done;
+	}
+	skb2 = skb_copy_expand (skb, 0, 4 + padlen, flags);
+	dev_kfree_skb_any (skb);
+	skb = skb2;
+	if (skb) {
+		u32		fcs;
+done:
+		fcs = fcs_compute32 (skb->data, skb->len, CRC32_INITFCS);
+		fcs = ~fcs;
+
+		// ? add optional byte make addr even ?
+
+		*skb_put (skb, 1) = fcs       & 0xff;
+		*skb_put (skb, 1) = (fcs>> 8) & 0xff;
+		*skb_put (skb, 1) = (fcs>>16) & 0xff;
+		*skb_put (skb, 1) = (fcs>>24) & 0xff;
+	}
+	return skb;
+}
+
+static const struct driver_info	zaurus_sl5x00_info = {
+	.description =	"Sharp Zaurus SL-5x00",
+	.tx_fixup = 	zaurus_tx_fixup,
+
+	.in = 2, .out = 1,
+	.epsize = 64,
+};
+static const struct driver_info	zaurus_sla300_info = {
+	.description =	"Sharp Zaurus SL-A300",
+	.tx_fixup = 	zaurus_tx_fixup,
+
+	.in = 1, .out = 2,
+	.epsize = 64,
+};
+#endif
+
+
 /*-------------------------------------------------------------------------
  *
  * Network Device Driver (peer link to "Host Device", from USB host)
@@ -1328,14 +1472,14 @@
 	entry->state = rx_start;
 	entry->length = 0;
 
-	FILL_BULK_URB (urb, dev->udev,
+	usb_fill_bulk_urb (urb, dev->udev,
 		usb_rcvbulkpipe (dev->udev, dev->driver_info->in),
 		skb->data, size, rx_complete, skb);
-	urb->transfer_flags |= USB_ASYNC_UNLINK;
+	urb->transfer_flags |= URB_ASYNC_UNLINK;
 #if 0
 	// Idle-but-posted reads with UHCI really chew up
 	// PCI bandwidth unless FSBR is disabled
-	urb->transfer_flags |= USB_NO_FSBR;
+	urb->transfer_flags |= URB_NO_FSBR;
 #endif
 
 	spin_lock_irqsave (&dev->rxq.lock, lockflags);
@@ -1654,7 +1798,7 @@
 	/* could also map RINGPARAM to RX/TX QLEN */
 
 	}
-        /* Note that the ethtool user space code requires EOPNOTSUPP */
+	/* Note that the ethtool user space code requires EOPNOTSUPP */
 	return -EOPNOTSUPP;
 }
 
@@ -1810,10 +1954,10 @@
 	if ((length % EP_SIZE (dev)) == 0)
 		skb->len++;
 
-	FILL_BULK_URB (urb, dev->udev,
+	usb_fill_bulk_urb (urb, dev->udev,
 			usb_sndbulkpipe (dev->udev, info->out),
 			skb->data, skb->len, tx_complete, skb);
-	urb->transfer_flags |= USB_ASYNC_UNLINK;
+	urb->transfer_flags |= URB_ASYNC_UNLINK;
 	// FIXME urb->timeout = ... jiffies ... ;
 
 	spin_lock_irqsave (&dev->txq.lock, flags);
@@ -1981,7 +2125,7 @@
 {
 	struct usbnet			*dev;
 	struct net_device 		*net;
-	struct usb_interface_descriptor	*interface;
+	struct usb_host_interface	*interface;
 	struct driver_info		*info;
 	struct usb_device		*xdev;
 
@@ -1991,8 +2135,8 @@
 	interface = &udev->altsetting [udev->act_altsetting];
 
 	if (!(info->flags & FLAG_NO_SETINT)) {
-		if (usb_set_interface (xdev, interface->bInterfaceNumber,
-				interface->bAlternateSetting) < 0) {
+		if (usb_set_interface (xdev, interface->desc.bInterfaceNumber,
+				interface->desc.bAlternateSetting) < 0) {
 			err ("set_interface failed");
 			return -EIO;
 		}
@@ -2043,6 +2187,16 @@
 		xdev->bus->bus_name, xdev->devpath,
 		dev->driver_info->description);
 
+#ifdef CONFIG_USB_ZAURUS
+	if (dev->driver_info == &zaurus_sl5x00_info) {
+		int	status;
+		status = usb_set_configuration (xdev, 1);
+		devinfo (dev, "set config --> %d", status);
+		status = usb_set_interface (xdev, 1, 1);
+		devinfo (dev, "set altsetting --> %d", status);
+	}
+#endif
+
 	// ok, it's ready to go.
 	dev_set_drvdata (&udev->dev, net);
 	mutex_lock (&usbnet_mutex);
@@ -2106,23 +2260,6 @@
 	 */
 #endif
 
-#ifdef	CONFIG_USB_LINUXDEV
-/*
- * for example, this can be a host side talk-to-PDA driver.
- * this driver is NOT what runs _inside_ a Linux device !!
- */
-{
-	// 1183 = 0x049F, both used as hex values?
-	USB_DEVICE (0x049F, 0x505A),	// Compaq "Itsy"
-	.driver_info =	(unsigned long) &linuxdev_info,
-}, {
-	USB_DEVICE (0x0E7E, 0x1001),	// G.Mate "Yopy"
-	.driver_info =	(unsigned long) &linuxdev_info,
-},
-	// NOTE:  the Sharp Zaurus uses a modified version of
-	// this driver, which is not interoperable with this.
-#endif
-
 #ifdef	CONFIG_USB_NET1080
 {
 	USB_DEVICE (0x0525, 0x1080),	// NetChip ref design
@@ -2140,6 +2277,49 @@
 }, {
 	USB_DEVICE (0x067b, 0x0001),	// PL-2302
 	.driver_info =	(unsigned long) &prolific_info,
+},
+#endif
+
+#ifdef	CONFIG_USB_SA1100
+/*
+ * SA-1100 using www.handhelds.org kernels, or compatible.
+ * Often used when talking to Linux PDAs (iPaq, Yopy, etc).
+ * The sa-1100 "usb-eth" driver handles the basic framing.
+ */
+{
+	// 1183 = 0x049F, both used as hex values?
+	USB_DEVICE (0x049F, 0x505A),	// iPaq: Compaq "Itsy"
+	.driver_info =	(unsigned long) &linuxdev_info,
+}, {
+	USB_DEVICE (0x0E7E, 0x1001),	// G.Mate "Yopy"
+	.driver_info =	(unsigned long) &yopy_info,
+}, 
+#endif
+
+#ifdef	CONFIG_USB_ZAURUS
+/*
+ * SA-1100 based Sharp Zaurus ("collie"), or compatible.
+ * Same idea as above, but different framing.
+ */
+{
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8004,
+	.bInterfaceClass	= 0x0a,
+	.bInterfaceSubClass	= 0x00,
+	.bInterfaceProtocol	= 0x00,
+	.driver_info =  (unsigned long) &zaurus_sl5x00_info,
+},
+{
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8005,
+	.bInterfaceClass	= 0x02,
+	.bInterfaceSubClass	= 0x0a,
+	.bInterfaceProtocol	= 0x00,
+	.driver_info =  (unsigned long) &zaurus_sla300_info,
 },
 #endif
 
diff -Nru a/drivers/usb/serial/Config.help b/drivers/usb/serial/Config.help
--- a/drivers/usb/serial/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,299 +0,0 @@
-CONFIG_USB_SERIAL
-  Say Y here if you have a USB device that provides normal serial
-  ports, or acts like a serial device, and you want to connect it to
-  your USB bus.
-
-  Please read <file:Documentation/usb/usb-serial.txt> for more
-  information on the specifics of the different devices that are
-  supported, and on how to use them.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usbserial.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_CONSOLE
-  If you say Y here, it will be possible to use a USB to serial
-  converter port 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). This could be useful if some
-  terminal or printer is connected to that serial port.
-
-  Even if you say Y here, the currently visible virtual 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=ttyUSB0". (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.)
-
-  If you don't have a VGA card installed and you say Y here, the
-  kernel will automatically use the first USB to serial converter
-  port, /dev/ttyUSB0, as system console.
-
-  If unsure, say N.
-
-CONFIG_USB_SERIAL_GENERIC
-  Say Y here if you want to use the generic USB serial driver.  Please
-  read <file:Documentation/usb/usb-serial.txt> for more information on
-  using this driver.  It is recommended that the "USB Serial converter
-  support" be compiled as a module for this driver to be used
-  properly.
-
-CONFIG_USB_SERIAL_WHITEHEAT
-  Say Y here if you want to use a ConnectTech WhiteHEAT 4 port
-  USB to serial converter device.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called whiteheat.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_VISOR
-  Say Y here if you want to connect to your HandSpring Visor, Palm
-  m500 or m505 through its USB docking station. See
-  <http://usbvisor.sourceforge.net/> for more information on using this
-  driver.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called visor.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_IPAQ
-  Say Y here if you want to connect to your Compaq iPAQ, HP Jornada
-  548/568 or Casio EM500 running Windows CE 3.0 or PocketPC 2002
-  using a USB cradle/cable. For information on using the driver,
-  read <file:Documentation/usb/usb-serial.txt>.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ipaq.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_IR
-  Say Y here if you want to enable simple serial support for USB IrDA
-  devices.  This is useful if you do not want to use the full IrDA
-  stack.
-  
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ir-usb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_IR
-  Say Y here if you want to enable simple serial support for USB IrDA
-  devices.  This is useful if you do not want to use the full IrDA
-  stack.
-  
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ir-usb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_BELKIN
-  Say Y here if you want to use a Belkin USB Serial single port
-  adaptor (F5U103 is one of the model numbers) or the Peracom single
-  port USB to serial adapter.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called belkin_sa.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_FTDI_SIO
-  Say Y here if you want to use a FTDI SIO single port USB to serial
-  converter device. The implementation I have is called the USC-1000.
-  This driver has also be tested with the 245 and 232 devices.
-
-  See <http://ftdi-usb-sio.sourceforge.net/> for more
-  information on this driver and the device.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called ftdi_sio.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_KEYSPAN_PDA
-  Say Y here if you want to use a Keyspan PDA single port USB to
-  serial converter device.  This driver makes use of firmware
-  developed from scratch by Brian Warner.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called keyspan_pda.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_XIRCOM
-  Say Y here if you want to use a Xircom or Entregra single port USB to
-  serial converter device.  This driver makes use of firmware
-  developed from scratch by Brian Warner.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called keyspan_pda.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_KEYSPAN
-  Say Y here if you want to use Keyspan USB to serial converter
-  devices.  This driver makes use of Keyspan's official firmware
-  and was developed with their support.  You must also include
-  firmware to support your particular device(s).
-
-  See <http://misc.nu/hugh/keyspan.html> for more information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called keyspan.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA28
-  Say Y here to include firmware for the USA-28 converter.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA28X
-  Say Y here to include firmware for the USA-28X converter.
-  Be sure you have a USA-28X, there are also 28XA and 28XB
-  models, the label underneath has the actual part number.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA
-  Say Y here to include firmware for the USA-28XA converter.
-  Be sure you have a USA-28XA, there are also 28X and 28XB
-  models, the label underneath has the actual part number.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB
-  Say Y here to include firmware for the USA-28XB converter.
-  Be sure you have a USA-28XB, there are also 28X and 28XA
-  models, the label underneath has the actual part number.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA19
-  Say Y here to include firmware for the USA-19 converter.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA18X
-  Say Y here to include firmware for the USA-18X converter.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA19W
-  Say Y here to include firmware for the USA-19W converter.
-
-CONFIG_USB_SERIAL_KEYSPAN_USA49W
-  Say Y here to include firmware for the USA-49W converter.
-
-CONFIG_USB_SERIAL_OMNINET
-  Say Y here if you want to use a ZyXEL omni.net LCD ISDN TA.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called omninet.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT
-  Say Y here if you want to use Digi AccelePort USB 2 or 4 devices,
-  2 port (plus parallel port) and 4 port USB serial converters.  The
-  parallel port on the USB 2 appears as a third serial port on Linux.
-  The Digi Acceleport USB 8 is not yet supported by this driver.
-
-  This driver works under SMP with the usb-uhci driver.  It does not
-  work under SMP with the uhci driver.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called digi_acceleport.o.  If you want to compile
-  it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_EMPEG
-  Say Y here if you want to connect to your Empeg empeg-car Mark I/II
-  mp3 player via USB.  The driver uses a single ttyUSB{0,1,2,...}
-  device node.  See <file:Documentation/usb/usb-serial.txt> for more
-  tidbits of information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called empeg.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_MCT_U232
-  Say Y here if you want to use a USB Serial single port adapter from
-  Magic Control Technology Corp. (U232 is one of the model numbers).
-
-  This driver also works with Sitecom U232-P25 and D-Link DU-H3SP USB
-  BAY devices.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called mct_u232.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_PL2303
-  Say Y here if you want to use the PL2303 USB Serial single port
-  adapter from Prolific.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called pl2303.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_CYBERJACK
-  Say Y here if you want to use a cyberJack pinpad/e-com USB chipcard
-  reader. This is an interface to ISO 7816 compatible contactbased
-  chipcards, e.g. GSM SIMs.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called cyberjack.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_USB_SERIAL_EDGEPORT
-  Say Y here if you want to use any of the following devices from
-  Inside Out Networks (Digi):
-       Edgeport/4
-       Rapidport/4
-       Edgeport/4t
-       Edgeport/2
-       Edgeport/4i
-       Edgeport/2i
-       Edgeport/421
-       Edgeport/21
-       Edgeport/8
-       Edgeport/8 Dual
-       Edgeport/2D8
-       Edgeport/4D8
-       Edgeport/8i
-       Edgeport/2 DIN
-       Edgeport/4 DIN
-       Edgeport/16 Dual
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called io_edgeport.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_EDGEPORT_TI
-  Say Y here if you want to use any of the devices from Inside Out
-  Networks (Digi) that are not supported by the io_edgeport driver.
-  This includes the Edgeport/1 device.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called io_ti.o.  If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_KLSI
-  Say Y here if you want to use a KL5KUSB105 - based single port
-  serial adapter. The most widely known -- and currently the only
-  tested -- device in this category is the PalmConnect USB Serial
-  adapter sold by Palm Inc. for use with their Palm III and Palm V
-  series PDAs.
-
-  Please read <file:Documentation/usb/usb-serial.txt> for more
-  information.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called kl5kusb105.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_SERIAL_DEBUG
-  Say Y here if you want verbose debug messages from the USB Serial
-  Drivers sent to the kernel debug log.
-
diff -Nru a/drivers/usb/serial/Config.in b/drivers/usb/serial/Config.in
--- a/drivers/usb/serial/Config.in	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,44 +0,0 @@
-#
-# USB Serial device configuration
-#
-mainmenu_option next_comment
-comment 'USB Serial Converter support'
-
-dep_tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
-if [ "$CONFIG_USB_SERIAL" = "y" ]; then
-  dep_mbool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
-  dep_mbool '  USB Serial Console device support (EXPERIMENTAL)' CONFIG_USB_SERIAL_CONSOLE $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-fi
-dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
-dep_tristate '  USB Belkin and Peracom Single Port Serial Driver' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL
-dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL
-dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
-dep_tristate '  USB Empeg empeg-car Mark I/II Driver' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL
-dep_tristate '  USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
-dep_tristate '  USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
-dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-dep_tristate '  USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL
-dep_tristate '  USB Inside Out Edgeport Serial Driver (TI devices)' CONFIG_USB_SERIAL_EDGEPORT_TI $CONFIG_USB_SERIAL
-dep_tristate '  USB Keyspan PDA Single Port Serial Driver' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL
-dep_tristate '  USB Keyspan USA-xxx Serial Driver' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL
-   dep_mbool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19 $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-19QW Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QW $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-19QI Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QI $CONFIG_USB_SERIAL_KEYSPAN
-   dep_mbool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W $CONFIG_USB_SERIAL_KEYSPAN
-dep_tristate '  USB KL5KUSB105 (Palmconnect) Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KLSI $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-dep_tristate '  USB MCT Single Port Serial Driver' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL
-dep_tristate '  USB Prolific 2303 Single Port Serial Driver' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL
-dep_tristate '  USB Safe Serial (Encapsulated) Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_SAFE $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-   dep_mbool '  USB Secure Encapsulated Driver - Padded' CONFIG_USB_SERIAL_SAFE_PADDED $CONFIG_USB_SERIAL_SAFE
-dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-dep_tristate '  USB Xircom / Entregra Single Port Serial Driver' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL
-dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
-
-endmenu
diff -Nru a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/serial/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,404 @@
+#
+# USB Serial device configuration
+#
+
+menu "USB Serial Converter support"
+	depends on USB!=n
+
+config USB_SERIAL
+	tristate "USB Serial Converter support"
+	depends on USB
+	---help---
+	  Say Y here if you have a USB device that provides normal serial
+	  ports, or acts like a serial device, and you want to connect it to
+	  your USB bus.
+
+	  Please read <file:Documentation/usb/usb-serial.txt> for more
+	  information on the specifics of the different devices that are
+	  supported, and on how to use them.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usbserial.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_DEBUG
+	bool "USB Serial Converter verbose debug"
+	depends on USB_SERIAL=y
+	help
+	  Say Y here if you want verbose debug messages from the USB Serial
+	  Drivers sent to the kernel debug log.
+
+config USB_SERIAL_CONSOLE
+	bool "USB Serial Console device support (EXPERIMENTAL)"
+	depends on USB_SERIAL=y && EXPERIMENTAL
+	---help---
+	  If you say Y here, it will be possible to use a USB to serial
+	  converter port 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). This could be useful if some
+	  terminal or printer is connected to that serial port.
+
+	  Even if you say Y here, the currently visible virtual 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=ttyUSB0". (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.)
+
+	  If you don't have a VGA card installed and you say Y here, the
+	  kernel will automatically use the first USB to serial converter
+	  port, /dev/ttyUSB0, as system console.
+
+	  If unsure, say N.
+
+config USB_SERIAL_GENERIC
+	bool "USB Generic Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use the generic USB serial driver.  Please
+	  read <file:Documentation/usb/usb-serial.txt> for more information on
+	  using this driver.  It is recommended that the "USB Serial converter
+	  support" be compiled as a module for this driver to be used
+	  properly.
+
+config USB_SERIAL_BELKIN
+	tristate "USB Belkin and Peracom Single Port Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use a Belkin USB Serial single port
+	  adaptor (F5U103 is one of the model numbers) or the Peracom single
+	  port USB to serial adapter.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called belkin_sa.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_WHITEHEAT
+	tristate "USB ConnectTech WhiteHEAT Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use a ConnectTech WhiteHEAT 4 port
+	  USB to serial converter device.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called whiteheat.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_DIGI_ACCELEPORT
+	tristate "USB Digi International AccelePort USB Serial Driver"
+	depends on USB_SERIAL
+	---help---
+	  Say Y here if you want to use Digi AccelePort USB 2 or 4 devices,
+	  2 port (plus parallel port) and 4 port USB serial converters.  The
+	  parallel port on the USB 2 appears as a third serial port on Linux.
+	  The Digi Acceleport USB 8 is not yet supported by this driver.
+
+	  This driver works under SMP with the usb-uhci driver.  It does not
+	  work under SMP with the uhci driver.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called digi_acceleport.o.  If you want to compile
+	  it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config USB_SERIAL_EMPEG
+	tristate "USB Empeg empeg-car Mark I/II Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to connect to your Empeg empeg-car Mark I/II
+	  mp3 player via USB.  The driver uses a single ttyUSB{0,1,2,...}
+	  device node.  See <file:Documentation/usb/usb-serial.txt> for more
+	  tidbits of information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called empeg.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_FTDI_SIO
+	tristate "USB FTDI Single Port Serial Driver (EXPERIMENTAL)"
+	depends on USB_SERIAL && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to use a FTDI SIO single port USB to serial
+	  converter device. The implementation I have is called the USC-1000.
+	  This driver has also be tested with the 245 and 232 devices.
+
+	  See <http://ftdi-usb-sio.sourceforge.net/> for more
+	  information on this driver and the device.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ftdi_sio.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_VISOR
+	tristate "USB Handspring Visor / Palm m50x / Sony Clie Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to connect to your HandSpring Visor, Palm
+	  m500 or m505 through its USB docking station. See
+	  <http://usbvisor.sourceforge.net/> for more information on using this
+	  driver.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called visor.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_IPAQ
+	tristate "USB Compaq iPAQ / HP Jornada / Casio EM500 Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to connect to your Compaq iPAQ, HP Jornada
+	  548/568 or Casio EM500 running Windows CE 3.0 or PocketPC 2002
+	  using a USB cradle/cable. For information on using the driver,
+	  read <file:Documentation/usb/usb-serial.txt>.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ipaq.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_IR
+	tristate "USB IR Dongle Serial Driver (EXPERIMENTAL)"
+	depends on USB_SERIAL && EXPERIMENTAL
+	help
+	  Say Y here if you want to enable simple serial support for USB IrDA
+	  devices.  This is useful if you do not want to use the full IrDA
+	  stack.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called ir-usb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_EDGEPORT
+	tristate "USB Inside Out Edgeport Serial Driver"
+	depends on USB_SERIAL
+	---help---
+	  Say Y here if you want to use any of the following devices from
+	  Inside Out Networks (Digi):
+	  Edgeport/4
+	  Rapidport/4
+	  Edgeport/4t
+	  Edgeport/2
+	  Edgeport/4i
+	  Edgeport/2i
+	  Edgeport/421
+	  Edgeport/21
+	  Edgeport/8
+	  Edgeport/8 Dual
+	  Edgeport/2D8
+	  Edgeport/4D8
+	  Edgeport/8i
+	  Edgeport/2 DIN
+	  Edgeport/4 DIN
+	  Edgeport/16 Dual
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called io_edgeport.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_EDGEPORT_TI
+	tristate "USB Inside Out Edgeport Serial Driver (TI devices)"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use any of the devices from Inside Out
+	  Networks (Digi) that are not supported by the io_edgeport driver.
+	  This includes the Edgeport/1 device.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called io_ti.o.  If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_KEYSPAN_PDA
+	tristate "USB Keyspan PDA Single Port Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use a Keyspan PDA single port USB to
+	  serial converter device.  This driver makes use of firmware
+	  developed from scratch by Brian Warner.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called keyspan_pda.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_KEYSPAN
+	tristate "USB Keyspan USA-xxx Serial Driver"
+	depends on USB_SERIAL
+	---help---
+	  Say Y here if you want to use Keyspan USB to serial converter
+	  devices.  This driver makes use of Keyspan's official firmware
+	  and was developed with their support.  You must also include
+	  firmware to support your particular device(s).
+
+	  See <http://misc.nu/hugh/keyspan.html> for more information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called keyspan.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_KEYSPAN_USA28
+	bool "USB Keyspan USA-28 Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-28 converter.
+
+config USB_SERIAL_KEYSPAN_USA28X
+	bool "USB Keyspan USA-28X Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-28X converter.
+	  Be sure you have a USA-28X, there are also 28XA and 28XB
+	  models, the label underneath has the actual part number.
+
+config USB_SERIAL_KEYSPAN_USA28XA
+	bool "USB Keyspan USA-28XA Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-28XA converter.
+	  Be sure you have a USA-28XA, there are also 28X and 28XB
+	  models, the label underneath has the actual part number.
+
+config USB_SERIAL_KEYSPAN_USA28XB
+	bool "USB Keyspan USA-28XB Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-28XB converter.
+	  Be sure you have a USA-28XB, there are also 28X and 28XA
+	  models, the label underneath has the actual part number.
+
+config USB_SERIAL_KEYSPAN_USA19
+	bool "USB Keyspan USA-19 Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-19 converter.
+
+config USB_SERIAL_KEYSPAN_USA18X
+	bool "USB Keyspan USA-18X Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-18X converter.
+
+config USB_SERIAL_KEYSPAN_USA19W
+	bool "USB Keyspan USA-19W Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-19W converter.
+
+config USB_SERIAL_KEYSPAN_USA19QW
+	bool "USB Keyspan USA-19QW Firmware"
+	depends on USB_SERIAL_KEYSPAN
+
+config USB_SERIAL_KEYSPAN_USA19QI
+	bool "USB Keyspan USA-19QI Firmware"
+	depends on USB_SERIAL_KEYSPAN
+
+config USB_SERIAL_KEYSPAN_USA49W
+	bool "USB Keyspan USA-49W Firmware"
+	depends on USB_SERIAL_KEYSPAN
+	help
+	  Say Y here to include firmware for the USA-49W converter.
+
+config USB_SERIAL_KLSI
+	tristate "USB KL5KUSB105 (Palmconnect) Driver (EXPERIMENTAL)"
+	depends on USB_SERIAL && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to use a KL5KUSB105 - based single port
+	  serial adapter. The most widely known -- and currently the only
+	  tested -- device in this category is the PalmConnect USB Serial
+	  adapter sold by Palm Inc. for use with their Palm III and Palm V
+	  series PDAs.
+
+	  Please read <file:Documentation/usb/usb-serial.txt> for more
+	  information.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called kl5kusb105.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_MCT_U232
+	tristate "USB MCT Single Port Serial Driver"
+	depends on USB_SERIAL
+	---help---
+	  Say Y here if you want to use a USB Serial single port adapter from
+	  Magic Control Technology Corp. (U232 is one of the model numbers).
+
+	  This driver also works with Sitecom U232-P25 and D-Link DU-H3SP USB
+	  BAY devices.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called mct_u232.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_PL2303
+	tristate "USB Prolific 2303 Single Port Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use the PL2303 USB Serial single port
+	  adapter from Prolific.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called pl2303.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_SAFE
+	tristate "USB Safe Serial (Encapsulated) Driver (EXPERIMENTAL)"
+	depends on USB_SERIAL && EXPERIMENTAL
+
+config USB_SERIAL_SAFE_PADDED
+	bool "USB Secure Encapsulated Driver - Padded"
+	depends on USB_SERIAL_SAFE
+
+config USB_SERIAL_CYBERJACK
+	tristate "USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)"
+	depends on USB_SERIAL && EXPERIMENTAL
+	---help---
+	  Say Y here if you want to use a cyberJack pinpad/e-com USB chipcard
+	  reader. This is an interface to ISO 7816 compatible contactbased
+	  chipcards, e.g. GSM SIMs.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called cyberjack.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+config USB_SERIAL_XIRCOM
+	tristate "USB Xircom / Entregra Single Port Serial Driver"
+	depends on USB_SERIAL
+	help
+	  Say Y here if you want to use a Xircom or Entregra single port USB to
+	  serial converter device.  This driver makes use of firmware
+	  developed from scratch by Brian Warner.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called keyspan_pda.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_SERIAL_OMNINET
+	tristate "USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)"
+	depends on USB_SERIAL && EXPERIMENTAL
+	help
+	  Say Y here if you want to use a ZyXEL omni.net LCD ISDN TA.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called omninet.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+endmenu
+
diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
--- a/drivers/usb/serial/belkin_sa.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/serial/belkin_sa.c	Wed Oct 30 16:44:29 2002
@@ -258,11 +258,23 @@
 	struct belkin_sa_private *priv;
 	struct usb_serial *serial;
 	unsigned char *data = urb->transfer_buffer;
+	int retval;
 
-	/* the urb might have been killed. */
-	if (urb->status)
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
-	
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
+
 	if (port_paranoia_check (port, __FUNCTION__)) return;
 
 	serial = port->serial;
@@ -321,8 +333,11 @@
 		}
 	}
 #endif
-
-	/* INT urbs are automatically re-submitted */
+exit:
+	retval = usb_submit_urb (urb, GFP_ATOMIC);
+	if (retval)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, retval);
 }
 
 static void belkin_sa_set_termios (struct usb_serial_port *port, struct termios *old_termios)
diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
--- a/drivers/usb/serial/cyberjack.c	Wed Oct 30 16:44:33 2002
+++ b/drivers/usb/serial/cyberjack.c	Wed Oct 30 16:44:33 2002
@@ -244,7 +244,7 @@
 		priv->wrsent=length;
 
 		/* set up our urb */
-		FILL_BULK_URB(port->write_urb, serial->dev, 
+		usb_fill_bulk_urb(port->write_urb, serial->dev, 
 			      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
 			      port->write_urb->transfer_buffer, length,
 			      ((serial->type->write_bulk_callback) ? 
@@ -422,7 +422,7 @@
 		priv->wrsent+=length;
 
 		/* set up our urb */
-		FILL_BULK_URB(port->write_urb, serial->dev, 
+		usb_fill_bulk_urb(port->write_urb, serial->dev, 
 			      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
 			      port->write_urb->transfer_buffer, length,
 			      ((serial->type->write_bulk_callback) ? 
diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
--- a/drivers/usb/serial/empeg.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/serial/empeg.c	Wed Oct 30 16:44:28 2002
@@ -168,7 +168,7 @@
 	bytes_out = 0;
 
 	/* Start reading from the device */
-	FILL_BULK_URB(
+	usb_fill_bulk_urb(
 		port->read_urb,
 		serial->dev, 
 		usb_rcvbulkpipe(serial->dev,
@@ -265,7 +265,7 @@
 		}
 
 		/* build up our urb */
-		FILL_BULK_URB (
+		usb_fill_bulk_urb (
 			urb,
 			serial->dev,
 			usb_sndbulkpipe(serial->dev,
@@ -413,7 +413,7 @@
 	}
 
 	/* Continue trying to always read  */
-	FILL_BULK_URB(
+	usb_fill_bulk_urb(
 		port->read_urb,
 		serial->dev, 
 		usb_rcvbulkpipe(serial->dev,
diff -Nru a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
--- a/drivers/usb/serial/ftdi_sio.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/serial/ftdi_sio.c	Wed Oct 30 16:44:26 2002
@@ -346,7 +346,7 @@
 	}
 
 	/* Start reading from the device */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
 		      ftdi_sio_read_bulk_callback, port);
@@ -449,7 +449,7 @@
 	usb_serial_debug_data (__FILE__, __FUNCTION__, count, first_byte);
 		
 	/* send the data out the bulk port */
-	FILL_BULK_URB(port->write_urb, serial->dev, 
+	usb_fill_bulk_urb(port->write_urb, serial->dev, 
 		      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
 		      port->write_urb->transfer_buffer, count,
 		      ftdi_sio_write_bulk_callback, port);
@@ -608,7 +608,7 @@
 #endif
 
 	/* Continue trying to always read  */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
 		      ftdi_sio_read_bulk_callback, port);
diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
--- a/drivers/usb/serial/io_edgeport.c	Wed Oct 30 16:44:20 2002
+++ b/drivers/usb/serial/io_edgeport.c	Wed Oct 30 16:44:20 2002
@@ -772,9 +772,19 @@
 		return;
 	}
 
-	if (urb->status) {
-		dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
-		return;
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
 	}
 
 	// process this interrupt-read even if there are no ports open
@@ -826,6 +836,12 @@
 			++portNumber;
 		}
 	}
+
+exit:
+	result = usb_submit_urb (urb, GFP_ATOMIC);
+	if (result) {
+		err("%s - Error %d submitting control urb", __FUNCTION__, result);
+	}
 }
 
 
@@ -1020,21 +1036,22 @@
 		edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
 	
 		/* set up our interrupt urb */
-		FILL_INT_URB(edge_serial->interrupt_read_urb,
-			     serial->dev,
-			     usb_rcvintpipe(serial->dev,
-					    port0->interrupt_in_endpointAddress),
-			     port0->interrupt_in_buffer,
-			     edge_serial->interrupt_read_urb->transfer_buffer_length,
-			     edge_interrupt_callback, edge_serial,
-			     edge_serial->interrupt_read_urb->interval);
+		usb_fill_int_urb(edge_serial->interrupt_read_urb,
+				 serial->dev,
+				 usb_rcvintpipe(serial->dev,
+					        port0->interrupt_in_endpointAddress),
+				 port0->interrupt_in_buffer,
+				 edge_serial->interrupt_read_urb->transfer_buffer_length,
+				 edge_interrupt_callback, edge_serial,
+				 edge_serial->interrupt_read_urb->interval);
 		
 		/* set up our bulk in urb */
-		FILL_BULK_URB(edge_serial->read_urb, serial->dev,
-			      usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
-			      port0->bulk_in_buffer,
-			      edge_serial->read_urb->transfer_buffer_length,
-			      edge_bulk_in_callback, edge_serial);
+		usb_fill_bulk_urb(edge_serial->read_urb, serial->dev,
+				  usb_rcvbulkpipe(serial->dev,
+					  	  port0->bulk_in_endpointAddress),
+				  port0->bulk_in_buffer,
+				  edge_serial->read_urb->transfer_buffer_length,
+				  edge_bulk_in_callback, edge_serial);
 
 		/* start interrupt read for this edgeport
 		 * this interrupt will continue as long as the edgeport is connected */
@@ -1462,7 +1479,7 @@
 	}
 
 	/* fill up the urb with all of our data and submit it */
-	FILL_BULK_URB (urb, edge_serial->serial->dev, 
+	usb_fill_bulk_urb (urb, edge_serial->serial->dev, 
 		       usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
 		       buffer, count+2, edge_bulk_out_data_callback, edge_port);
 
@@ -2487,7 +2504,7 @@
 	CmdUrbs++;
 	dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
 
-	FILL_BULK_URB (urb, edge_serial->serial->dev, 
+	usb_fill_bulk_urb (urb, edge_serial->serial->dev, 
 		       usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
 		       buffer, length, edge_bulk_out_cmd_callback, edge_port);
 
diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
--- a/drivers/usb/serial/io_ti.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/serial/io_ti.c	Wed Oct 30 16:44:28 2002
@@ -588,10 +588,10 @@
 	// we want. However, we just support one config at this point,
 	// configuration # 1, which is Config Descriptor 0.
 
-	dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->bNumInterfaces);
-	dbg ("%s - MAX Power            = %d", __FUNCTION__, dev->config->MaxPower*2);
+	dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->desc.bNumInterfaces);
+	dbg ("%s - MAX Power            = %d", __FUNCTION__, dev->config->desc.bMaxPower*2);
 
-	if (dev->config->bNumInterfaces != 1) {
+	if (dev->config->desc.bNumInterfaces != 1) {
 		err ("%s - bNumInterfaces is not 1, ERROR!", __FUNCTION__);
 		return -ENODEV;
 	}
@@ -980,7 +980,7 @@
 	if (status)
 		return status;
 
-	interface = serial->serial->dev->config->interface->altsetting;
+	interface = &serial->serial->dev->config->interface->altsetting->desc;
 	if (!interface) {
 		err ("%s - no interface set, error!", __FUNCTION__);
 		return -ENODEV;
@@ -1623,6 +1623,7 @@
 	int length = urb->actual_length;
 	int port_number;
 	int function;
+	int status;
 	__u8 lsr;
 	__u8 msr;
 
@@ -1632,21 +1633,31 @@
 		return;
 	}
 
-	if (urb->status) {
-		dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
 	}
 
 	if (!length) {
 		dbg ("%s - no data in urb", __FUNCTION__);
-		return;
+		goto exit;
 	}
 		
 	usb_serial_debug_data (__FILE__, __FUNCTION__, length, data);
 		
 	if (length != 2) {
 		dbg ("%s - expecting packet of size 2, got %d", __FUNCTION__, length);
-		return;
+		goto exit;
 	}
 
 	port_number = TIUMP_GET_PORT_FROM_CODE (data[0]);
@@ -1694,6 +1705,12 @@
 		break;
 		
 	}
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 static void edge_bulk_in_callback (struct urb *urb)
@@ -1758,7 +1775,6 @@
 
 exit:
 	/* continue always trying to read */
-	urb->dev = edge_port->port->serial->dev;
 	status = usb_submit_urb (urb, GFP_ATOMIC);
 	if (status)
 		err ("%s - usb_submit_urb failed with result %d",
diff -Nru a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
--- a/drivers/usb/serial/ipaq.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/serial/ipaq.c	Wed Oct 30 16:44:26 2002
@@ -200,7 +200,7 @@
 	port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
 	
 	/* Start reading from the device */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
 		      ipaq_read_bulk_callback, port);
@@ -308,7 +308,7 @@
 	}
 
 	/* Continue trying to always read  */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
 		      ipaq_read_bulk_callback, port);
@@ -429,7 +429,7 @@
 	}
 
 	count = URBDATA_SIZE - room;
-	FILL_BULK_URB(port->write_urb, serial->dev, 
+	usb_fill_bulk_urb(port->write_urb, serial->dev, 
 		      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
 		      port->write_urb->transfer_buffer, count, ipaq_write_bulk_callback,
 		      port);
diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
--- a/drivers/usb/serial/ir-usb.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/serial/ir-usb.c	Wed Oct 30 16:44:28 2002
@@ -395,7 +395,7 @@
 		ir_write_bulk_callback,
 		port);
 
-	port->write_urb->transfer_flags = USB_ZERO_PACKET;
+	port->write_urb->transfer_flags = URB_ZERO_PACKET;
 
 	result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
 	if (result)
@@ -597,7 +597,7 @@
 			ir_write_bulk_callback,
 			port);
 
-		port->write_urb->transfer_flags = USB_ZERO_PACKET;
+		port->write_urb->transfer_flags = URB_ZERO_PACKET;
 
 		result = usb_submit_urb (port->write_urb, GFP_KERNEL);
 		if (result)
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
--- a/drivers/usb/serial/keyspan.c	Wed Oct 30 16:44:22 2002
+++ b/drivers/usb/serial/keyspan.c	Wed Oct 30 16:44:22 2002
@@ -344,11 +344,11 @@
 		dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip);
 
 		if (this_urb->status == -EINPROGRESS) {
-			if (this_urb->transfer_flags & USB_ASYNC_UNLINK)
+			if (this_urb->transfer_flags & URB_ASYNC_UNLINK)
 				break;
 			if (jiffies - p_priv->tx_start_time[flip] < 10 * HZ)
 				break;
-			this_urb->transfer_flags |= USB_ASYNC_UNLINK;
+			this_urb->transfer_flags |= URB_ASYNC_UNLINK;
 			usb_unlink_urb(this_urb);
 			break;
 		}
@@ -368,7 +368,7 @@
 		/* send the data out the bulk port */
 		this_urb->transfer_buffer_length = todo + 1;
 
-		this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+		this_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 		this_urb->dev = port->serial->dev;
 		if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
 			dbg("usb_submit_urb(write bulk) failed (%d)", err);
@@ -912,7 +912,7 @@
 static inline void stop_urb(struct urb *urb)
 {
 	if (urb && urb->status == -EINPROGRESS) {
-		urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+		urb->transfer_flags &= ~URB_ASYNC_UNLINK;
 		usb_unlink_urb(urb);
 	}
 }
@@ -1085,7 +1085,7 @@
 	}
 
 		/* Fill URB using supplied data. */
-	FILL_BULK_URB(urb, serial->dev,
+	usb_fill_bulk_urb(urb, serial->dev,
 		      usb_sndbulkpipe(serial->dev, endpoint) | dir,
 		      buf, len, callback, ctx);
 
diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
--- a/drivers/usb/serial/keyspan_pda.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/serial/keyspan_pda.c	Wed Oct 30 16:44:29 2002
@@ -229,12 +229,25 @@
        	struct tty_struct *tty;
 	unsigned char *data = urb->transfer_buffer;
 	int i;
+	int status;
 	struct keyspan_pda_private *priv;
 	priv = (struct keyspan_pda_private *)(port->private);
 
-	/* the urb might have been killed. */
-	if (urb->status)
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
+
 	
 	if (port_paranoia_check (port, "keyspan_pda_rx_interrupt")) {
 		return;
@@ -277,7 +290,11 @@
 		break;
 	}
 
-	/* INT urbs are automatically re-submitted */
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 
diff -Nru a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
--- a/drivers/usb/serial/kl5kusb105.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/serial/kl5kusb105.c	Wed Oct 30 16:44:29 2002
@@ -390,7 +390,7 @@
 
 
 	/* READ_ON and urb submission */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev,
 				      port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer,
@@ -534,7 +534,7 @@
 		((__u8 *)urb->transfer_buffer)[1] = (__u8) ((size & 0xFF00)>>8);
 
 		/* set up our urb */
-		FILL_BULK_URB(urb, serial->dev,
+		usb_fill_bulk_urb(urb, serial->dev,
 			      usb_sndbulkpipe(serial->dev,
 					      port->bulk_out_endpointAddress),
 			      urb->transfer_buffer,
@@ -697,7 +697,7 @@
 		priv->bytes_in += bytes_sent;
 	}
 	/* Continue trying to always read  */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev,
 				      port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer,
diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
--- a/drivers/usb/serial/mct_u232.c	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/serial/mct_u232.c	Wed Oct 30 16:44:29 2002
@@ -450,7 +450,7 @@
 		}
 		
 		/* set up our urb */
-		FILL_BULK_URB(port->write_urb, serial->dev,
+		usb_fill_bulk_urb(port->write_urb, serial->dev,
 			      usb_sndbulkpipe(serial->dev,
 					      port->bulk_out_endpointAddress),
 			      port->write_urb->transfer_buffer, size,
@@ -521,15 +521,25 @@
 	struct usb_serial *serial = port->serial;
 	struct tty_struct *tty;
 	unsigned char *data = urb->transfer_buffer;
+	int status;
 
         dbg("%s - port %d", __FUNCTION__, port->number);
 
-	/* The urb might have been killed. */
-        if (urb->status) {
-                dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
-		    urb->status);
-                return;
-        }
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
+	}
+
 	if (!serial) {
 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
 		return;
@@ -549,8 +559,7 @@
 			}
 			tty_flip_buffer_push(tty);
 		}
-		/* INT urbs are automatically re-submitted */
-		return;
+		goto exit;
 	}
 	
 	/*
@@ -587,8 +596,11 @@
 		}
 	}
 #endif
-
-	/* INT urbs are automatically re-submitted */
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 } /* mct_u232_read_int_callback */
 
 
diff -Nru a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
--- a/drivers/usb/serial/omninet.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/usb/serial/omninet.c	Wed Oct 30 16:44:32 2002
@@ -172,7 +172,7 @@
 	wport->tty = port->tty;
 
 	/* Start reading from the device */
-	FILL_BULK_URB(port->read_urb, serial->dev, 
+	usb_fill_bulk_urb(port->read_urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
 		      omninet_read_bulk_callback, port);
@@ -255,7 +255,7 @@
 	}
 
 	/* Continue trying to always read  */
-	FILL_BULK_URB(urb, serial->dev, 
+	usb_fill_bulk_urb(urb, serial->dev, 
 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
 		      urb->transfer_buffer, urb->transfer_buffer_length,
 		      omninet_read_bulk_callback, port);
diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
--- a/drivers/usb/serial/pl2303.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/serial/pl2303.c	Wed Oct 30 16:44:28 2002
@@ -592,25 +592,36 @@
 	struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
 	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
 	//unsigned char *data = urb->transfer_buffer;
-	//int i;
+	int status;
 
-//ints auto restart...
-
-	if (!serial) {
+	switch (urb->status) {
+	case 0:
+		/* success */
+		break;
+	case -ECONNRESET:
+	case -ENOENT:
+	case -ESHUTDOWN:
+		/* this urb is terminated, clean up */
+		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
 		return;
+	default:
+		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+		goto exit;
 	}
 
-	if (urb->status) {
-		urb->status = 0;
+	if (!serial) {
 		return;
 	}
 
 	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
-#if 0
-//FIXME need to update state of terminal lines variable
-#endif
 
-	return;
+	//FIXME need to update state of terminal lines variable
+
+exit:
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 
diff -Nru a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
--- a/drivers/usb/serial/safe_serial.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/serial/safe_serial.c	Wed Oct 30 16:44:26 2002
@@ -270,7 +270,7 @@
 	}
 
 	/* Continue trying to always read  */
-	FILL_BULK_URB (urb, serial->dev,
+	usb_fill_bulk_urb (urb, serial->dev,
 		       usb_rcvbulkpipe (serial->dev, port->bulk_in_endpointAddress),
 		       urb->transfer_buffer, urb->transfer_buffer_length,
 		       safe_read_bulk_callback, port);
@@ -393,7 +393,7 @@
 
 static int safe_startup (struct usb_serial *serial)
 {
-	switch (serial->interface->altsetting->bInterfaceProtocol) {
+	switch (serial->interface->altsetting->desc.bInterfaceProtocol) {
 	case LINEO_SAFESERIAL_CRC:
 		break;
 	case LINEO_SAFESERIAL_CRC_PADDED:
diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/serial/usb-serial.c	Wed Oct 30 16:44:27 2002
@@ -1147,7 +1147,7 @@
 	struct usb_device *dev = interface_to_usbdev (interface);
 	struct usb_serial *serial = NULL;
 	struct usb_serial_port *port;
-	struct usb_interface_descriptor *iface_desc;
+	struct usb_host_interface *iface_desc;
 	struct usb_endpoint_descriptor *endpoint;
 	struct usb_endpoint_descriptor *interrupt_in_endpoint[MAX_NUM_PORTS];
 	struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS];
@@ -1208,8 +1208,8 @@
 	/* descriptor matches, let's find the endpoints needed */
 	/* check out the endpoints */
 	iface_desc = &interface->altsetting[0];
-	for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
-		endpoint = &iface_desc->endpoint[i];
+	for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+		endpoint = &iface_desc->endpoint[i].desc;
 		
 		if ((endpoint->bEndpointAddress & 0x80) &&
 		    ((endpoint->bmAttributes & 3) == 0x02)) {
@@ -1249,8 +1249,8 @@
 			//interface = &dev->actconfig->interface[ifnum ^ 1];
 			interface = &dev->actconfig->interface[0];
 			iface_desc = &interface->altsetting[0];
-			for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
-				endpoint = &iface_desc->endpoint[i];
+			for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
+				endpoint = &iface_desc->endpoint[i].desc;
 				if ((endpoint->bEndpointAddress & 0x80) &&
 				    ((endpoint->bmAttributes & 3) == 0x03)) {
 					/* we found a interrupt in endpoint */
diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
--- a/drivers/usb/serial/visor.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/serial/visor.c	Wed Oct 30 16:44:27 2002
@@ -190,6 +190,7 @@
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
+	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NX60_ID) },
 	{ }					/* Terminating entry */
 };
 
@@ -211,6 +212,7 @@
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
+	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_NX60_ID) },
 	{ }					/* Terminating entry */
 };
 
diff -Nru a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
--- a/drivers/usb/serial/visor.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/serial/visor.h	Wed Oct 30 16:44:26 2002
@@ -34,6 +34,7 @@
 #define SONY_CLIE_4_0_ID		0x0066
 #define SONY_CLIE_S360_ID		0x0095
 #define SONY_CLIE_4_1_ID		0x009A
+#define SONY_CLIE_NX60_ID		0x00DA
 
 /****************************************************************************
  * Handspring Visor Vendor specific request codes (bRequest values)
diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
--- a/drivers/usb/serial/whiteheat.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/serial/whiteheat.c	Wed Oct 30 16:44:27 2002
@@ -446,19 +446,6 @@
 	if (retval)
 		goto exit;
 
-	/* Work around HCD bugs */
-	usb_clear_halt(port->serial->dev, port->read_urb->pipe);
-	usb_clear_halt(port->serial->dev, port->write_urb->pipe);
-
-	/* Start reading from the device */
-	port->read_urb->dev = port->serial->dev;
-	retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
-	if (retval) {
-		err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
-		stop_command_port(port->serial);
-		goto exit;
-	}
-
 	/* send an open port command */
 	retval = firm_open(port);
 	if (retval) {
@@ -477,15 +464,15 @@
 	old_term.c_iflag = ~port->tty->termios->c_iflag;
 	whiteheat_set_termios(port, &old_term);
 
-	retval = firm_set_rts(port, WHITEHEAT_RTS_ON);
-	if (retval) {
-		firm_close(port);
-		stop_command_port(port->serial);
-		goto exit;
-	}
-	retval = firm_set_dtr(port, WHITEHEAT_DTR_ON);
+	/* Work around HCD bugs */
+	usb_clear_halt(port->serial->dev, port->read_urb->pipe);
+	usb_clear_halt(port->serial->dev, port->write_urb->pipe);
+
+	/* Start reading from the device */
+	port->read_urb->dev = port->serial->dev;
+	retval = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (retval) {
-		firm_set_rts(port, WHITEHEAT_RTS_OFF);
+		err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
 		firm_close(port);
 		stop_command_port(port->serial);
 		goto exit;
@@ -525,9 +512,6 @@
 
 	firm_report_tx_done(port);
 
-	firm_set_dtr(port, WHITEHEAT_DTR_OFF);
-	firm_set_rts(port, WHITEHEAT_RTS_OFF);
-
 	firm_close(port);
 
 	/* shutdown our bulk reads and writes */
@@ -711,7 +695,7 @@
 	/* check that they really want us to change something */
 	if (old_termios) {
 		if ((port->tty->termios->c_cflag == old_termios->c_cflag) &&
-		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
+		    (port->tty->termios->c_iflag == old_termios->c_iflag)) {
 			dbg("%s - nothing to change...", __FUNCTION__);
 			goto exit;
 		}
diff -Nru a/drivers/usb/serial/whiteheat_fw.h b/drivers/usb/serial/whiteheat_fw.h
--- a/drivers/usb/serial/whiteheat_fw.h	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/serial/whiteheat_fw.h	Wed Oct 30 16:44:28 2002
@@ -50,7 +50,7 @@
 };
 
 static const struct whiteheat_hex_record whiteheat_firmware[] = {
-{ 0x0000,	3,	{0x02, 0x97, 0xaf} },
+{ 0x0000,	3,	{0x02, 0x97, 0xe3} },
 { 0x0003,	3,	{0x02, 0x13, 0x12} },
 { 0x000b,	3,	{0x02, 0x0b, 0xb5} },
 { 0x0033,	3,	{0x02, 0x08, 0x1c} },
@@ -64,9 +64,9 @@
 { 0x03c0,	16,	{0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x99, 0xea, 0x49, 0x60, 0x0d} },
 { 0x03d0,	16,	{0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} },
 { 0x03e0,	16,	{0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x58, 0xea} },
-{ 0x03f0,	16,	{0x49, 0x60, 0x33, 0x12, 0xa2, 0x07, 0xf5, 0x4e, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4e, 0xd3} },
+{ 0x03f0,	16,	{0x49, 0x60, 0x33, 0x12, 0xa2, 0x3b, 0xf5, 0x4e, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4e, 0xd3} },
 { 0x0400,	16,	{0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x4e, 0xe5, 0x4e, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x4e, 0x40} },
-{ 0x0410,	16,	{0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4e, 0x12, 0x91, 0x03, 0x90, 0x7f, 0xb5} },
+{ 0x0410,	16,	{0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4e, 0x12, 0x91, 0x37, 0x90, 0x7f, 0xb5} },
 { 0x0420,	16,	{0xe5, 0x4e, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5} },
 { 0x0430,	16,	{0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
 { 0x0440,	16,	{0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
@@ -108,7 +108,7 @@
 { 0x066d,	16,	{0x74, 0x01, 0x93, 0x90, 0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff} },
 { 0x067d,	16,	{0xa3, 0xe0, 0xfe, 0xef, 0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90} },
 { 0x068d,	16,	{0x01, 0x1c, 0xe0, 0x6f, 0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x52, 0x10} },
-{ 0x069d,	16,	{0x75, 0x53, 0x02, 0x75, 0x54, 0x12, 0x75, 0x55, 0xac, 0x12, 0x93, 0xf2, 0x75, 0x4c, 0x12, 0x75} },
+{ 0x069d,	16,	{0x75, 0x53, 0x02, 0x75, 0x54, 0x12, 0x75, 0x55, 0xac, 0x12, 0x94, 0x26, 0x75, 0x4c, 0x12, 0x75} },
 { 0x06ad,	16,	{0x4d, 0xb2, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05, 0x4d, 0xe5, 0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05} },
 { 0x06bd,	16,	{0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4d, 0xe5} },
 { 0x06cd,	16,	{0x4d, 0xac, 0x4c, 0x70, 0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f} },
@@ -116,17 +116,17 @@
 { 0x06ed,	16,	{0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4d, 0xe5, 0x4d, 0xae, 0x4c} },
 { 0x06fd,	16,	{0x70, 0x02, 0x05, 0x4c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83} },
 { 0x070d,	16,	{0x01, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12} },
-{ 0x071d,	16,	{0xa3, 0xba, 0x7e, 0x01, 0x7f, 0x18, 0x12, 0x86, 0xbe, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x071d,	16,	{0xa3, 0xee, 0x7e, 0x01, 0x7f, 0x18, 0x12, 0x86, 0xbe, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0} },
 { 0x072d,	16,	{0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x75, 0x52, 0x0a, 0x75, 0x53, 0x06, 0x75, 0x54, 0x12} },
-{ 0x073d,	16,	{0x75, 0x55, 0xb8, 0x12, 0x93, 0xf2, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff} },
+{ 0x073d,	16,	{0x75, 0x55, 0xb8, 0x12, 0x94, 0x26, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff} },
 { 0x074d,	16,	{0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44} },
 { 0x075d,	16,	{0x1f, 0xf0, 0xd2, 0xaf, 0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09} },
 { 0x076d,	16,	{0xc5, 0x75, 0x46, 0x50, 0x75, 0x45, 0x6d, 0x75, 0x44, 0x33, 0x75, 0x43, 0x00, 0x20, 0x01, 0xe4} },
-{ 0x077d,	16,	{0x7f, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x7c, 0xff, 0x78, 0x43, 0x12, 0xa3, 0xa3, 0xec, 0x4d, 0x4e} },
+{ 0x077d,	16,	{0x7f, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x7c, 0xff, 0x78, 0x43, 0x12, 0xa3, 0xd7, 0xec, 0x4d, 0x4e} },
 { 0x078d,	16,	{0x4f, 0x60, 0xd1, 0x80, 0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0a} },
-{ 0x079d,	16,	{0x12, 0x09, 0xfb, 0x50, 0x03, 0x12, 0x0a, 0xe8, 0xc2, 0x06, 0x12, 0x96, 0x2a, 0x90, 0x01, 0xbd} },
-{ 0x07ad,	16,	{0xe0, 0x60, 0x0c, 0x12, 0x91, 0xcd, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90} },
-{ 0x07bd,	16,	{0x02, 0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x99, 0x85, 0x12, 0xa0, 0x61, 0xe4, 0xff, 0x74, 0x01} },
+{ 0x079d,	16,	{0x12, 0x09, 0xfb, 0x50, 0x03, 0x12, 0x0a, 0xe8, 0xc2, 0x06, 0x12, 0x96, 0x5e, 0x90, 0x01, 0xbd} },
+{ 0x07ad,	16,	{0xe0, 0x60, 0x0c, 0x12, 0x92, 0x01, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90} },
+{ 0x07bd,	16,	{0x02, 0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x99, 0xb9, 0x12, 0xa0, 0x95, 0xe4, 0xff, 0x74, 0x01} },
 { 0x07cd,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc, 0xe0, 0x5e, 0x60} },
 { 0x07dd,	16,	{0x14, 0x74, 0x28, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e} },
 { 0x07ed,	16,	{0x00, 0x8e, 0x4b, 0x80, 0x03, 0x75, 0x4b, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x20} },
@@ -176,13 +176,13 @@
 { 0x0a50,	8,	{0x02, 0x0f, 0x4b, 0x00, 0x02, 0x0f, 0x61, 0x00} },
 { 0x0a58,	2,	{0x8f, 0x4f} },
 { 0x0a5a,	16,	{0xe4, 0xf5, 0x50, 0x75, 0x51, 0xff, 0x75, 0x52, 0x12, 0x75, 0x53, 0x6a, 0xab, 0x51, 0xaa, 0x52} },
-{ 0x0a6a,	16,	{0xa9, 0x53, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x20, 0xb4, 0x03, 0x1d, 0xaf, 0x50, 0x05, 0x50, 0xef} },
-{ 0x0a7a,	16,	{0xb5, 0x4f, 0x01, 0x22, 0x12, 0xa2, 0x07, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x0a6a,	16,	{0xa9, 0x53, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0xb4, 0x03, 0x1d, 0xaf, 0x50, 0x05, 0x50, 0xef} },
+{ 0x0a7a,	16,	{0xb5, 0x4f, 0x01, 0x22, 0x12, 0xa2, 0x3b, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
 { 0x0a8a,	14,	{0x51, 0xff, 0xf5, 0x52, 0x89, 0x53, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
 { 0x0a98,	1,	{0x22} },
 { 0x0a99,	16,	{0xe4, 0xfe, 0x75, 0x51, 0xff, 0x75, 0x52, 0x12, 0x75, 0x53, 0x12, 0xab, 0x51, 0xaa, 0x52, 0xa9} },
-{ 0x0aa9,	16,	{0x53, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x20, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
-{ 0x0ab9,	16,	{0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x79, 0x85, 0xf0, 0x4f, 0xf5, 0x50, 0x62, 0x4f} },
+{ 0x0aa9,	16,	{0x53, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0ab9,	16,	{0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0xa2, 0xad, 0x85, 0xf0, 0x4f, 0xf5, 0x50, 0x62, 0x4f} },
 { 0x0ac9,	16,	{0xe5, 0x4f, 0x62, 0x50, 0xe5, 0x50, 0x62, 0x4f, 0x29, 0xfd, 0xe5, 0x4f, 0x3a, 0xa9, 0x05, 0x75} },
 { 0x0ad9,	14,	{0x51, 0xff, 0xf5, 0x52, 0x89, 0x53, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
 { 0x0ae7,	1,	{0x22} },
@@ -194,7 +194,7 @@
 { 0x0af1,	1,	{0x32} },
 { 0x0af2,	1,	{0x32} },
 { 0x0af3,	1,	{0x32} },
-{ 0x0af4,	3,	{0x00, 0x04, 0x06} },
+{ 0x0af4,	3,	{0x00, 0x04, 0x07} },
 { 0x0b00,	9,	{0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
 { 0x0b7d,	16,	{0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
 { 0x0b8d,	16,	{0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
@@ -211,7 +211,7 @@
 { 0x0c13,	15,	{0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
 { 0x0c22,	16,	{0xd2, 0x00, 0x75, 0x8e, 0x10, 0x12, 0x09, 0x30, 0xe5, 0x33, 0xc3, 0x94, 0x01, 0x40, 0x08, 0x90} },
 { 0x0c32,	16,	{0x7f, 0x92, 0x74, 0x02, 0xf0, 0x80, 0x05, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x80, 0x00, 0x12} },
-{ 0x0c42,	12,	{0x0f, 0x7d, 0x12, 0x94, 0xc3, 0x12, 0x1b, 0x0c, 0x12, 0x0b, 0x8d, 0x22} },
+{ 0x0c42,	12,	{0x0f, 0x7d, 0x12, 0x94, 0xf7, 0x12, 0x1b, 0x0c, 0x12, 0x0b, 0x8d, 0x22} },
 { 0x0c4e,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
 { 0x0c5e,	8,	{0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
 { 0x0c66,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
@@ -267,12 +267,12 @@
 { 0x0f5b,	6,	{0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
 { 0x0f61,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} },
 { 0x0f71,	12,	{0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0f7d,	16,	{0x90, 0x01, 0x20, 0x12, 0xa3, 0xc6, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
+{ 0x0f7d,	16,	{0x90, 0x01, 0x20, 0x12, 0xa3, 0xfa, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
 { 0x0f8d,	16,	{0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} },
 { 0x0f9d,	16,	{0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
 { 0x0fad,	16,	{0x04, 0xa3, 0xf0, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0, 0xa8} },
-{ 0x0fbd,	16,	{0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa1} },
-{ 0x0fcd,	16,	{0xde, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x87, 0xa6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} },
+{ 0x0fbd,	16,	{0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa2} },
+{ 0x0fcd,	16,	{0x12, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x87, 0xa6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} },
 { 0x0fdd,	16,	{0x94, 0x04, 0x40, 0xc7, 0xe4, 0xf5, 0x27, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
 { 0x0fed,	16,	{0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
 { 0x0ffd,	16,	{0xf0, 0x74, 0x23, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
@@ -450,9 +450,9 @@
 { 0x1a65,	16,	{0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x59, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
 { 0x1a75,	16,	{0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
 { 0x1a85,	16,	{0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x1a95,	16,	{0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
+{ 0x1a95,	16,	{0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
 { 0x1aa5,	16,	{0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
-{ 0x1ab5,	16,	{0xa2, 0x4d, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
+{ 0x1ab5,	16,	{0xa2, 0x81, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
 { 0x1ac5,	16,	{0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
 { 0x1ad5,	16,	{0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x59, 0x30, 0xe0, 0xf7, 0x30} },
 { 0x1ae5,	16,	{0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
@@ -462,14 +462,14 @@
 { 0x1b0c,	16,	{0xe5, 0x33, 0xc3, 0x94, 0x01, 0x50, 0x1c, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x7f, 0x02} },
 { 0x1b1c,	16,	{0x7d, 0xff, 0x12, 0x82, 0xea, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x7f, 0x03, 0x7d, 0xff} },
 { 0x1b2c,	4,	{0x12, 0x82, 0xea, 0x22} },
-{ 0x8000,	16,	{0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0xa2, 0x20, 0xfd, 0x8b, 0x50, 0x75} },
+{ 0x8000,	16,	{0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0xa2, 0x54, 0xfd, 0x8b, 0x50, 0x75} },
 { 0x8010,	16,	{0x51, 0x12, 0x75, 0x52, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4e} },
 { 0x8020,	16,	{0xf5, 0x4f, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
 { 0x8030,	16,	{0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
 { 0x8040,	16,	{0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
 { 0x8050,	16,	{0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x81, 0xc6, 0xab, 0x50, 0xaa, 0x51, 0xa9, 0x52} },
-{ 0x8060,	16,	{0x90, 0x00, 0x01, 0x12, 0xa2, 0x20, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} },
-{ 0x8070,	16,	{0x12, 0xa2, 0x20, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x20} },
+{ 0x8060,	16,	{0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} },
+{ 0x8070,	16,	{0x12, 0xa2, 0x54, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x54} },
 { 0x8080,	16,	{0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x81, 0x16, 0xec, 0xc3, 0x94, 0x10} },
 { 0x8090,	16,	{0x40, 0x03, 0x02, 0x81, 0x16, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4f, 0xae, 0x4e, 0x78, 0x02, 0xce} },
 { 0x80a0,	16,	{0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
@@ -479,11 +479,11 @@
 { 0x80e0,	16,	{0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
 { 0x80f0,	16,	{0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
 { 0x8100,	16,	{0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
-{ 0x8110,	16,	{0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0xa2, 0x20, 0x25} },
-{ 0x8120,	16,	{0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x90, 0x00, 0x05, 0x12, 0xa2, 0x20, 0xfe, 0xe4} },
+{ 0x8110,	16,	{0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0xa2, 0x54, 0x25} },
+{ 0x8120,	16,	{0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x90, 0x00, 0x05, 0x12, 0xa2, 0x54, 0xfe, 0xe4} },
 { 0x8130,	16,	{0x25, 0x4f, 0xf5, 0x4f, 0xee, 0x35, 0x4e, 0xf5, 0x4e, 0x02, 0x81, 0xb8, 0xab, 0x50, 0xaa, 0x51} },
-{ 0x8140,	16,	{0xa9, 0x52, 0x90, 0x00, 0x03, 0x12, 0xa2, 0x20, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
-{ 0x8150,	16,	{0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x20, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
+{ 0x8140,	16,	{0xa9, 0x52, 0x90, 0x00, 0x03, 0x12, 0xa2, 0x54, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
+{ 0x8150,	16,	{0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0xa2, 0x54, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
 { 0x8160,	16,	{0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
 { 0x8170,	16,	{0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
 { 0x8180,	16,	{0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
@@ -501,10 +501,10 @@
 { 0x821d,	16,	{0x80, 0x6c, 0x85, 0x5a, 0x82, 0x85, 0x59, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
 { 0x822d,	16,	{0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x5b, 0x85, 0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3} },
 { 0x823d,	16,	{0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x5a, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x824d,	16,	{0xe4, 0x35, 0x59, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5} },
+{ 0x824d,	16,	{0xe4, 0x35, 0x59, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5} },
 { 0x825d,	16,	{0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x5a, 0x24} },
-{ 0x826d,	16,	{0x04, 0xf5, 0x82, 0xe4, 0x35, 0x59, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0xa2, 0x4d, 0x85} },
-{ 0x827d,	16,	{0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x4d, 0x90, 0x7f} },
+{ 0x826d,	16,	{0x04, 0xf5, 0x82, 0xe4, 0x35, 0x59, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0xa2, 0x81, 0x85} },
+{ 0x827d,	16,	{0x5a, 0x82, 0x85, 0x59, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x81, 0x90, 0x7f} },
 { 0x828d,	16,	{0xa5, 0xe0, 0xf5, 0x5c, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
 { 0x829d,	16,	{0x22, 0xe5, 0x5c, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
 { 0x82ad,	16,	{0xe5, 0x5b, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0xae, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
@@ -533,8 +533,8 @@
 { 0x83de,	1,	{0x22} },
 { 0x83df,	4,	{0x8f, 0x61, 0x8d, 0x62} },
 { 0x83e3,	16,	{0xe4, 0xf5, 0x67, 0x74, 0x3f, 0x2f, 0xf8, 0x76, 0x08, 0x7f, 0x80, 0x7e, 0x25, 0x7d, 0x00, 0x7c} },
-{ 0x83f3,	16,	{0x00, 0xab, 0x66, 0xaa, 0x65, 0xa9, 0x64, 0xa8, 0x63, 0xd3, 0x12, 0xa3, 0x7f, 0x40, 0x26, 0x7f} },
-{ 0x8403,	16,	{0x00, 0x7e, 0x96, 0x7d, 0x00, 0x7c, 0x00, 0xa8, 0x63, 0xd3, 0x12, 0xa3, 0x7f, 0x50, 0x0c, 0x75} },
+{ 0x83f3,	16,	{0x00, 0xab, 0x66, 0xaa, 0x65, 0xa9, 0x64, 0xa8, 0x63, 0xd3, 0x12, 0xa3, 0xb3, 0x40, 0x26, 0x7f} },
+{ 0x8403,	16,	{0x00, 0x7e, 0x96, 0x7d, 0x00, 0x7c, 0x00, 0xa8, 0x63, 0xd3, 0x12, 0xa3, 0xb3, 0x50, 0x0c, 0x75} },
 { 0x8413,	16,	{0x67, 0x40, 0x74, 0x3f, 0x25, 0x61, 0xf8, 0x76, 0x10, 0x80, 0x0a, 0x75, 0x67, 0x80, 0x74, 0x3f} },
 { 0x8423,	16,	{0x25, 0x61, 0xf8, 0x76, 0x38, 0xe5, 0x67, 0x45, 0x62, 0x44, 0x01, 0xff, 0xe5, 0x61, 0x75, 0xf0} },
 { 0x8433,	13,	{0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xef, 0xf0} },
@@ -605,499 +605,503 @@
 { 0x87ba,	16,	{0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
 { 0x87ca,	16,	{0x5f, 0x8f, 0x60, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
 { 0x87da,	16,	{0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0xa3} },
-{ 0x87ea,	16,	{0x7f, 0x40, 0x10, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0x12, 0xa3, 0xc6, 0x00, 0x00, 0x00} },
+{ 0x87ea,	16,	{0xb3, 0x40, 0x10, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0x12, 0xa3, 0xfa, 0x00, 0x00, 0x00} },
 { 0x87fa,	16,	{0x08, 0x80, 0x2e, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
 { 0x880a,	16,	{0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0xa3} },
-{ 0x881a,	16,	{0x7f, 0x50, 0x0e, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0x12, 0xa3, 0xc6, 0x00, 0x07, 0x08} },
+{ 0x881a,	16,	{0xb3, 0x50, 0x0e, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0x12, 0xa3, 0xfa, 0x00, 0x07, 0x08} },
 { 0x882a,	16,	{0x00, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa} },
-{ 0x883a,	16,	{0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa2, 0xed, 0x8f, 0x5c} },
-{ 0x884a,	16,	{0x8e, 0x5b, 0x8d, 0x5a, 0x8c, 0x59, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa2} },
-{ 0x885a,	16,	{0xed, 0xaf, 0x03, 0x8f, 0x5d, 0xaf, 0x5c, 0xae, 0x5b, 0xad, 0x5a, 0xac, 0x59, 0x7b, 0x0a, 0x7a} },
-{ 0x886a,	16,	{0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa2, 0xed, 0x8f, 0x5c, 0x8e, 0x5b, 0x8d, 0x5a, 0x8c, 0x59} },
+{ 0x883a,	16,	{0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa3, 0x21, 0x8f, 0x5c} },
+{ 0x884a,	16,	{0x8e, 0x5b, 0x8d, 0x5a, 0x8c, 0x59, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa3} },
+{ 0x885a,	16,	{0x21, 0xaf, 0x03, 0x8f, 0x5d, 0xaf, 0x5c, 0xae, 0x5b, 0xad, 0x5a, 0xac, 0x59, 0x7b, 0x0a, 0x7a} },
+{ 0x886a,	16,	{0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa3, 0x21, 0x8f, 0x5c, 0x8e, 0x5b, 0x8d, 0x5a, 0x8c, 0x59} },
 { 0x887a,	16,	{0xe5, 0x5d, 0xc3, 0x94, 0x05, 0x40, 0x15, 0xe5, 0x5c, 0x24, 0x01, 0xf5, 0x5c, 0xe4, 0x35, 0x5b} },
 { 0x888a,	16,	{0xf5, 0x5b, 0xe4, 0x35, 0x5a, 0xf5, 0x5a, 0xe4, 0x35, 0x59, 0xf5, 0x59, 0x85, 0x60, 0x82, 0x85} },
 { 0x889a,	16,	{0x5f, 0x83, 0xa3, 0xe4, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44} },
 { 0x88aa,	16,	{0x80, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xe5, 0x5c, 0xf0, 0xaf, 0x5c, 0xae, 0x5b, 0xad} },
-{ 0x88ba,	16,	{0x5a, 0xac, 0x59, 0x78, 0x08, 0x12, 0xa3, 0x90, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xef} },
+{ 0x88ba,	16,	{0x5a, 0xac, 0x59, 0x78, 0x08, 0x12, 0xa3, 0xc4, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xef} },
 { 0x88ca,	16,	{0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5} },
 { 0x88da,	16,	{0x5d, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe0} },
 { 0x88ea,	16,	{0x23, 0x54, 0x01, 0xf0, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0} },
 { 0x88fa,	16,	{0x54, 0xfd, 0xf0, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc} },
-{ 0x890a,	16,	{0x42, 0x22, 0x80, 0x1f, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0} },
-{ 0x891a,	16,	{0x44, 0x02, 0xf0, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc} },
-{ 0x892a,	16,	{0xf4, 0x52, 0x22, 0xe5, 0x58, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff} },
-{ 0x893a,	16,	{0xb4, 0x62, 0x05, 0x43, 0x5d, 0x0a, 0x80, 0x1a, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5d, 0x08, 0x80} },
-{ 0x894a,	16,	{0x11, 0xef, 0xb4, 0x74, 0x05, 0x43, 0x5d, 0x02, 0x80, 0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f} },
-{ 0x895a,	16,	{0xff, 0x22, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30} },
-{ 0x896a,	16,	{0xe3, 0x03, 0x43, 0x5d, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5d, 0x40, 0xe5, 0x60, 0x24, 0x04} },
-{ 0x897a,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x58, 0x24, 0x0b, 0xf5} },
-{ 0x898a,	16,	{0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x30, 0xe1, 0x20, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07} },
-{ 0x899a,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x32, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4} },
-{ 0x89aa,	16,	{0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x10, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07} },
-{ 0x89ba,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x32, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82} },
-{ 0x89ca,	16,	{0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe4, 0x11, 0xae, 0x5e, 0x74, 0x01, 0xa8, 0x06} },
-{ 0x89da,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x31, 0x80, 0x10, 0xae, 0x5e, 0x74, 0x01, 0xa8} },
-{ 0x89ea,	16,	{0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x31, 0xef, 0x20, 0xe1, 0x03, 0x30} },
-{ 0x89fa,	16,	{0xe4, 0x03, 0xe4, 0xf5, 0x5d, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf} },
-{ 0x8a0a,	16,	{0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5d, 0xf0, 0xe5, 0x58} },
-{ 0x8a1a,	16,	{0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x04, 0xf5} },
-{ 0x8a2a,	16,	{0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x58, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35} },
-{ 0x8a3a,	16,	{0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83} },
-{ 0x8a4a,	16,	{0xef, 0xf0, 0xe5, 0x58, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5} },
-{ 0x8a5a,	16,	{0x60, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x58, 0x24, 0x09} },
-{ 0x8a6a,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x07, 0xf5, 0x82, 0xe4} },
-{ 0x8a7a,	16,	{0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe4} },
-{ 0x8a8a,	16,	{0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
-{ 0x8a9a,	16,	{0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d} },
-{ 0x8aaa,	16,	{0x64, 0x8c, 0x63, 0x7d, 0x06, 0xaf, 0x5e, 0x12, 0x83, 0xdf, 0x75, 0x5d, 0x08, 0xe5, 0x58, 0x24} },
-{ 0x8aba,	16,	{0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x5d, 0x10, 0xe5, 0x60} },
-{ 0x8aca,	16,	{0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x5d, 0xf0, 0xe5} },
-{ 0x8ada,	16,	{0x58, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05, 0x40} },
-{ 0x8aea,	16,	{0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x58, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x8afa,	16,	{0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94, 0x01, 0x40, 0x06, 0xed, 0xd3, 0x94, 0x02} },
-{ 0x8b0a,	16,	{0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24, 0xfb} },
-{ 0x8b1a,	16,	{0x4f, 0xf5, 0x5d, 0xe5, 0x58, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x24} },
-{ 0x8b2a,	16,	{0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60, 0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a, 0x70} },
-{ 0x8b3a,	16,	{0x14, 0x43, 0x5d, 0x18, 0x80, 0x12, 0x43, 0x5d, 0x08, 0x80, 0x0d, 0x43, 0x5d, 0x38, 0x80, 0x08} },
-{ 0x8b4a,	16,	{0x43, 0x5d, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3} },
-{ 0x8b5a,	16,	{0xa3, 0xe5, 0x5d, 0xf0, 0xaf, 0x5e, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0xaa, 0x57, 0xa9, 0x58, 0x7b} },
-{ 0x8b6a,	16,	{0x01, 0xc0, 0x01, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0} },
-{ 0x8b7a,	14,	{0xa8, 0x01, 0xfc, 0xd0, 0x01, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa1, 0xde, 0x7f, 0x00} },
-{ 0x8b88,	1,	{0x22} },
-{ 0x8b89,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
-{ 0x8b99,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} },
-{ 0x8ba9,	16,	{0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} },
-{ 0x8bb9,	16,	{0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} },
-{ 0x8bc9,	16,	{0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} },
-{ 0x8bd9,	16,	{0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2d, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} },
-{ 0x8be9,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x57, 0xe5, 0x33, 0xc3, 0x94, 0x01} },
-{ 0x8bf9,	16,	{0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x58, 0x00, 0xf5, 0x59, 0x80, 0x09, 0x7f} },
-{ 0x8c09,	16,	{0x02, 0x12, 0x11, 0x27, 0x8e, 0x58, 0x8f, 0x59, 0xc3, 0xe5, 0x58, 0x64, 0x80, 0x94, 0x80, 0x40} },
-{ 0x8c19,	16,	{0xda, 0xe5, 0x57, 0x55, 0x59, 0x90, 0x01, 0x32, 0xf0, 0x7e, 0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12} },
-{ 0x8c29,	4,	{0x91, 0x36, 0x7f, 0x00} },
-{ 0x8c2d,	1,	{0x22} },
-{ 0x8c2e,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
-{ 0x8c3e,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} },
-{ 0x8c4e,	16,	{0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
-{ 0x8c5e,	16,	{0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x91} },
-{ 0x8c6e,	3,	{0x36, 0x7f, 0x00} },
-{ 0x8c71,	1,	{0x22} },
-{ 0x8c72,	4,	{0x8e, 0x57, 0x8f, 0x58} },
-{ 0x8c76,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
-{ 0x8c86,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x85, 0x58} },
-{ 0x8c96,	16,	{0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5} },
-{ 0x8ca6,	16,	{0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x43, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x0c, 0xf5, 0x82} },
-{ 0x8cb6,	16,	{0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x20, 0xee, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82} },
-{ 0x8cc6,	16,	{0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x30, 0xe1, 0xf0, 0x7f, 0x60, 0xed, 0x24, 0x05, 0xf5, 0x82} },
-{ 0x8cd6,	16,	{0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0x5f, 0xb5, 0x07, 0xf2, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04} },
-{ 0x8ce6,	12,	{0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} },
-{ 0x8cf2,	1,	{0x22} },
-{ 0x8cf3,	4,	{0xad, 0x07, 0xac, 0x06} },
-{ 0x8cf7,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
-{ 0x8d07,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
-{ 0x8d17,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
-{ 0x8d27,	16,	{0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
-{ 0x8d37,	4,	{0xfe, 0xf0, 0x7f, 0x00} },
-{ 0x8d3b,	1,	{0x22} },
-{ 0x8d3c,	4,	{0xad, 0x07, 0xac, 0x06} },
-{ 0x8d40,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
-{ 0x8d50,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
-{ 0x8d60,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} },
-{ 0x8d70,	16,	{0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
-{ 0x8d80,	1,	{0x22} },
-{ 0x8d81,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} },
-{ 0x8d91,	16,	{0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3e, 0x7f, 0x00} },
-{ 0x8da1,	1,	{0x22} },
-{ 0x8da2,	4,	{0x8e, 0x57, 0x8f, 0x58} },
-{ 0x8da6,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x5c, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x59, 0xd3} },
-{ 0x8db6,	16,	{0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x59, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} },
-{ 0x8dc6,	16,	{0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x5a, 0x7e, 0x75, 0x5b} },
-{ 0x8dd6,	16,	{0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x5a, 0x7e, 0x75, 0x5b, 0x00, 0x80, 0x16, 0x7e} },
-{ 0x8de6,	16,	{0x7d, 0x7f, 0x80, 0x75, 0x5a, 0x7d, 0x75, 0x5b, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} },
-{ 0x8df6,	16,	{0x5a, 0x7d, 0x75, 0x5b, 0x00, 0xe5, 0x5c, 0x70, 0x1b, 0x85, 0x5b, 0x82, 0x85, 0x5a, 0x83, 0x74} },
-{ 0x8e06,	16,	{0xff, 0xf0, 0xe5, 0x59, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} },
-{ 0x8e16,	16,	{0x01, 0xf0, 0x80, 0x48, 0xe5, 0x58, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x57, 0xfe, 0xe5, 0x5c, 0x60} },
-{ 0x8e26,	16,	{0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} },
-{ 0x8e36,	16,	{0x5b, 0xe5, 0x5b, 0xaa, 0x5a, 0x70, 0x02, 0x05, 0x5a, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} },
-{ 0x8e46,	16,	{0x15, 0x5c, 0x80, 0xd9, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x59, 0x25} },
-{ 0x8e56,	14,	{0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
-{ 0x8e64,	1,	{0x22} },
-{ 0x8e65,	16,	{0xef, 0x24, 0x05, 0xf5, 0x58, 0xe4, 0x3e, 0xf5, 0x57, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
-{ 0x8e75,	16,	{0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3} },
-{ 0x8e85,	16,	{0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x59, 0xf5, 0x5a, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
-{ 0x8e95,	16,	{0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8f, 0x46} },
-{ 0x8ea5,	16,	{0x24, 0x14, 0x60, 0x03, 0x02, 0x8f, 0x94, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe} },
-{ 0x8eb5,	16,	{0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x5c, 0x74, 0x01, 0x9e, 0xf5, 0x5b, 0xd3, 0xe5, 0x5c} },
-{ 0x8ec5,	16,	{0x94, 0x3f, 0xe5, 0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x3f, 0xd3, 0xe5} },
-{ 0x8ed5,	16,	{0x5a, 0x95, 0x5c, 0xe5, 0x59, 0x95, 0x5b, 0x50, 0x03, 0x02, 0x8f, 0x97, 0xae, 0x5b, 0xaf, 0x5c} },
-{ 0x8ee5,	16,	{0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
-{ 0x8ef5,	16,	{0x59, 0xf5, 0x5a, 0x02, 0x8f, 0x97, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
-{ 0x8f05,	16,	{0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x5c, 0xe4, 0x9e, 0xf5, 0x5b, 0xd3, 0xe5, 0x5c, 0x94} },
-{ 0x8f15,	16,	{0x10, 0xe5, 0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x10, 0xd3, 0xe5, 0x5a} },
-{ 0x8f25,	16,	{0x95, 0x5c, 0xe5, 0x59, 0x95, 0x5b, 0x40, 0x6a, 0xae, 0x5b, 0xaf, 0x5c, 0x85, 0x58, 0x82, 0x85} },
-{ 0x8f35,	16,	{0x57, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x59, 0xf5, 0x5a, 0x80} },
-{ 0x8f45,	16,	{0x51, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
-{ 0x8f55,	16,	{0xf5, 0x5c, 0xe4, 0x9e, 0xf5, 0x5b, 0x45, 0x5c, 0x60, 0x0b, 0xd3, 0xe5, 0x5c, 0x94, 0x3f, 0xe5} },
-{ 0x8f65,	16,	{0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x3f, 0xd3, 0xe5, 0x5a, 0x95, 0x5c} },
-{ 0x8f75,	16,	{0xe5, 0x59, 0x95, 0x5b, 0x40, 0x1c, 0xae, 0x5b, 0xaf, 0x5c, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
-{ 0x8f85,	16,	{0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x59, 0xf5, 0x5a, 0x80, 0x03, 0x7f} },
-{ 0x8f95,	16,	{0x01, 0x22, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x90, 0x57} },
-{ 0x8fa5,	16,	{0x24, 0xf9, 0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x90, 0xa7, 0x24, 0x14, 0x60, 0x03, 0x02} },
-{ 0x8fb5,	16,	{0x90, 0xeb, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94} },
-{ 0x8fc5,	16,	{0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x90, 0xeb, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x5a} },
-{ 0x8fd5,	16,	{0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e, 0x70, 0x03, 0x02, 0x90, 0xeb, 0x90, 0x01} },
-{ 0x8fe5,	16,	{0x75, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01} },
-{ 0x8ff5,	16,	{0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x58, 0x82, 0x85} },
-{ 0x9005,	16,	{0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03} },
-{ 0x9015,	16,	{0x02, 0x90, 0xeb, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x90, 0xeb, 0x90} },
-{ 0x9025,	16,	{0x01, 0x76, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e, 0x70} },
-{ 0x9035,	16,	{0x03, 0x02, 0x90, 0xeb, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90} },
-{ 0x9045,	16,	{0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0} },
-{ 0x9055,	16,	{0x80, 0xd2, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94} },
-{ 0x9065,	16,	{0x20, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x90, 0xeb, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00} },
-{ 0x9075,	16,	{0x50, 0x74, 0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15} },
-{ 0x9085,	16,	{0x59, 0x4e, 0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90} },
-{ 0x9095,	16,	{0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0} },
-{ 0x90a5,	16,	{0x80, 0xd5, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78} },
-{ 0x90b5,	16,	{0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e} },
-{ 0x90c5,	16,	{0x60, 0x24, 0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5} },
-{ 0x90d5,	16,	{0x83, 0xe0, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82} },
-{ 0x90e5,	16,	{0xf5, 0x83, 0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
-{ 0x90f5,	13,	{0xa3, 0xa3, 0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x91, 0x36, 0x7f, 0x00} },
-{ 0x9102,	1,	{0x22} },
-{ 0x9103,	16,	{0x8e, 0x62, 0x8f, 0x63, 0x8c, 0x64, 0x8d, 0x65, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x63} },
-{ 0x9113,	16,	{0xe5, 0x63, 0xae, 0x62, 0x70, 0x02, 0x05, 0x62, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
-{ 0x9123,	16,	{0x65, 0xe5, 0x65, 0xac, 0x64, 0x70, 0x02, 0x05, 0x64, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
-{ 0x9133,	3,	{0x80, 0xd6, 0x22} },
-{ 0x9136,	6,	{0x8d, 0x5d, 0xab, 0x07, 0xaa, 0x06} },
-{ 0x913c,	16,	{0x75, 0x61, 0x40, 0x75, 0x60, 0x0d, 0x75, 0x5f, 0x03, 0x75, 0x5e, 0x00, 0x90, 0x7f, 0xc2, 0xe0} },
-{ 0x914c,	16,	{0x20, 0xe1, 0xf9, 0xaf, 0x61, 0xae, 0x60, 0xad, 0x5f, 0xac, 0x5e, 0xec, 0x4d, 0x4e, 0x4f, 0x70} },
-{ 0x915c,	16,	{0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} },
-{ 0x916c,	16,	{0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5d, 0x12, 0x91, 0x03, 0x90, 0x7f, 0xc3} },
-{ 0x917c,	8,	{0xe5, 0x5d, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x9184,	1,	{0x22} },
-{ 0x9185,	16,	{0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0x90, 0x0a, 0xf5, 0xe4, 0x93, 0x90} },
-{ 0x9195,	16,	{0x01, 0x86, 0xf0, 0x90, 0x0a, 0xf6, 0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c} },
-{ 0x91a5,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01} },
-{ 0x91b5,	16,	{0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e, 0x01, 0x7f, 0x7c, 0x12, 0x19, 0xc1, 0x7e, 0x01, 0x7f, 0x84} },
-{ 0x91c5,	7,	{0x7d, 0x14, 0x12, 0x91, 0x36, 0x7f, 0x00} },
-{ 0x91cc,	1,	{0x22} },
-{ 0x91cd,	16,	{0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4e, 0x7b, 0x75, 0x4f, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} },
-{ 0x91dd,	16,	{0x4e, 0x51, 0x85, 0x4f, 0x52, 0xe5, 0x52, 0x24, 0x01, 0xf5, 0x56, 0xe4, 0x35, 0x51, 0xf5, 0x55} },
-{ 0x91ed,	16,	{0xe4, 0xf5, 0x50, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} },
-{ 0x91fd,	16,	{0x5b, 0x90, 0x92, 0x05, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x92, 0x29, 0x02, 0x92, 0x29, 0x02, 0x92} },
-{ 0x920d,	16,	{0x33, 0x02, 0x92, 0x3d, 0x02, 0x92, 0x3d, 0x02, 0x92, 0x3d, 0x02, 0x92, 0x51, 0x02, 0x92, 0x29} },
-{ 0x921d,	16,	{0x02, 0x92, 0x47, 0x02, 0x92, 0x29, 0x02, 0x92, 0x59, 0x02, 0x92, 0x29, 0xef, 0x64, 0x02, 0x60} },
-{ 0x922d,	16,	{0x2b, 0x75, 0x50, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x50, 0xff, 0x80, 0x1c} },
-{ 0x923d,	16,	{0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x50, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} },
-{ 0x924d,	16,	{0x50, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x50, 0xff, 0xe5, 0x50, 0x60, 0x15} },
-{ 0x925d,	16,	{0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} },
-{ 0x926d,	16,	{0x91, 0x36, 0xaf, 0x50, 0x22, 0xe4, 0xf5, 0x50, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0x14} },
-{ 0x927d,	16,	{0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x93, 0x9b, 0x90, 0x92, 0x8c, 0xf8, 0x28, 0x28, 0x73, 0x02} },
-{ 0x928d,	16,	{0x92, 0xb9, 0x02, 0x92, 0xc5, 0x02, 0x92, 0xd1, 0x02, 0x93, 0x1f, 0x02, 0x93, 0x2a, 0x02, 0x93} },
-{ 0x929d,	16,	{0x35, 0x02, 0x93, 0x40, 0x02, 0x93, 0x4b, 0x02, 0x93, 0x56, 0x02, 0x93, 0x61, 0x02, 0x93, 0x6c} },
-{ 0x92ad,	16,	{0x02, 0x93, 0x73, 0x02, 0x93, 0x9b, 0x02, 0x93, 0x7e, 0x02, 0x93, 0x89, 0xaf, 0x56, 0xae, 0x55} },
-{ 0x92bd,	16,	{0x12, 0x84, 0x41, 0x8f, 0x50, 0x02, 0x93, 0x9e, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x85, 0x61, 0x8f} },
-{ 0x92cd,	16,	{0x50, 0x02, 0x93, 0x9e, 0x85, 0x55, 0x53, 0x85, 0x56, 0x54, 0xe5, 0x54, 0x24, 0x01, 0xff, 0xe4} },
-{ 0x92dd,	16,	{0x35, 0x53, 0xfe, 0x12, 0x86, 0xbe, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x87, 0x51, 0x8f, 0x50, 0xef} },
-{ 0x92ed,	16,	{0x64, 0x01, 0x60, 0x03, 0x02, 0x93, 0x9e, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x87, 0xa6, 0x8f, 0x50} },
-{ 0x92fd,	16,	{0xe5, 0x50, 0x70, 0x03, 0x02, 0x93, 0x9e, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xe0, 0x75, 0xf0} },
-{ 0x930d,	16,	{0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x87, 0xa6, 0x02} },
-{ 0x931d,	16,	{0x93, 0x9e, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8c, 0x72, 0x8f, 0x50, 0x80, 0x74, 0xaf, 0x56, 0xae} },
-{ 0x932d,	16,	{0x55, 0x12, 0x8c, 0xf3, 0x8f, 0x50, 0x80, 0x69, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0x3c, 0x8f} },
-{ 0x933d,	16,	{0x50, 0x80, 0x5e, 0xaf, 0x4f, 0xae, 0x4e, 0x12, 0x8e, 0x65, 0x8f, 0x50, 0x80, 0x53, 0xaf, 0x56} },
-{ 0x934d,	16,	{0xae, 0x55, 0x12, 0x8b, 0x89, 0x8f, 0x50, 0x80, 0x48, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x86, 0x2d} },
-{ 0x935d,	16,	{0x8f, 0x50, 0x80, 0x3d, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8c, 0x2e, 0x8f, 0x50, 0x80, 0x32, 0x12} },
-{ 0x936d,	16,	{0x91, 0x85, 0x8f, 0x50, 0x80, 0x2b, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0x81, 0x8f, 0x50, 0x80} },
-{ 0x937d,	16,	{0x20, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0xa2, 0x8f, 0x50, 0x80, 0x15, 0xaf, 0x4f, 0xae, 0x4e} },
-{ 0x938d,	16,	{0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x91, 0x03, 0xe4, 0xf5, 0x50, 0x80, 0x03, 0x75, 0x50} },
-{ 0x939d,	16,	{0xff, 0xe5, 0x50, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x52, 0x82, 0x85, 0x51} },
-{ 0x93ad,	16,	{0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x91, 0x36, 0xaf} },
-{ 0x93bd,	16,	{0x50, 0x22, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} },
-{ 0x93cd,	16,	{0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x56, 0x82, 0x85} },
-{ 0x93dd,	16,	{0x55, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x91, 0x36} },
-{ 0x93ed,	4,	{0x8f, 0x50, 0xaf, 0x50} },
-{ 0x93f1,	1,	{0x22} },
-{ 0x93f2,	8,	{0x8f, 0x51, 0x8e, 0x50, 0x8d, 0x4f, 0x8c, 0x4e} },
-{ 0x93fa,	16,	{0x75, 0x58, 0x01, 0x75, 0x59, 0x9c, 0xe4, 0xf5, 0x57, 0xaf, 0x53, 0x15, 0x53, 0xef, 0x70, 0x03} },
-{ 0x940a,	16,	{0x02, 0x94, 0x90, 0xaf, 0x52, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x51} },
-{ 0x941a,	16,	{0xae, 0x50, 0xad, 0x4f, 0xac, 0x4e, 0x12, 0xa2, 0xed, 0xaf, 0x03, 0x8f, 0x56, 0xaf, 0x51, 0xae} },
-{ 0x942a,	16,	{0x50, 0xad, 0x4f, 0xac, 0x4e, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x52, 0xe4} },
-{ 0x943a,	16,	{0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
-{ 0x944a,	16,	{0x12, 0xa2, 0xed, 0x8f, 0x51, 0x8e, 0x50, 0x8d, 0x4f, 0x8c, 0x4e, 0xe5, 0x56, 0x24, 0x30, 0xf5} },
-{ 0x945a,	16,	{0x56, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x56, 0xf5, 0x56, 0x05, 0x59, 0xe5, 0x59} },
-{ 0x946a,	16,	{0xae, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x59, 0xe5} },
-{ 0x947a,	16,	{0x59, 0xae, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x56, 0xf0, 0x05} },
-{ 0x948a,	16,	{0x57, 0x05, 0x57, 0x02, 0x94, 0x03, 0xe5, 0x59, 0x15, 0x59, 0x70, 0x02, 0x15, 0x58, 0xaf, 0x57} },
-{ 0x949a,	16,	{0x15, 0x57, 0xef, 0x60, 0x23, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0xf5} },
-{ 0x94aa,	16,	{0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x55, 0xe5, 0x55, 0xac, 0x54, 0x70, 0x02, 0x05, 0x54, 0x14} },
-{ 0x94ba,	8,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
-{ 0x94c2,	1,	{0x22} },
-{ 0x94c3,	16,	{0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
-{ 0x94d3,	10,	{0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
-{ 0x94dd,	16,	{0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
-{ 0x94ed,	16,	{0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
-{ 0x94fd,	16,	{0xe4, 0xef, 0x55, 0x34, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
-{ 0x950d,	16,	{0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
-{ 0x951d,	16,	{0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa2, 0x4d, 0xfc, 0xd3, 0xe5, 0xf0} },
-{ 0x952d,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
-{ 0x953d,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x954d,	1,	{0x22} },
-{ 0x954e,	16,	{0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
-{ 0x955e,	16,	{0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
-{ 0x956e,	16,	{0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
-{ 0x957e,	16,	{0xa1, 0xde, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa2, 0x4d, 0xfc, 0xd3, 0xe5, 0xf0} },
-{ 0x958e,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
-{ 0x959e,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x95ae,	1,	{0x22} },
-{ 0x95af,	16,	{0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x53, 0x7b, 0x75, 0x54} },
-{ 0x95bf,	16,	{0x80, 0xe5, 0x54, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x53, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x55, 0xf5} },
-{ 0x95cf,	16,	{0x56, 0x89, 0x57, 0xfe, 0x12, 0x95, 0x4e, 0xef, 0x60, 0x50, 0xab, 0x55, 0xaa, 0x56, 0xa9, 0x57} },
-{ 0x95df,	16,	{0x12, 0xa2, 0x07, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x20, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
-{ 0x95ef,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
-{ 0x95ff,	16,	{0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
-{ 0x960f,	16,	{0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x34, 0x60, 0x0f, 0x85, 0x54, 0x82, 0x85, 0x53} },
-{ 0x961f,	10,	{0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} },
-{ 0x9629,	1,	{0x22} },
-{ 0x962a,	16,	{0x12, 0x95, 0xaf, 0xe4, 0xf5, 0x4e, 0x74, 0x3a, 0x25, 0x4e, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4f} },
-{ 0x963a,	16,	{0x74, 0xc5, 0x25, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4f, 0xff, 0xc4} },
-{ 0x964a,	16,	{0x54, 0x0f, 0xf5, 0x50, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
-{ 0x965a,	16,	{0x83, 0xe5, 0x4f, 0xf0, 0xaf, 0x4e, 0x7d, 0x01, 0xe5, 0x4f, 0x45, 0x50, 0xfb, 0x12, 0x94, 0xdd} },
-{ 0x966a,	16,	{0xef, 0x70, 0x05, 0x12, 0x95, 0xaf, 0x80, 0xec, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40} },
-{ 0x967a,	16,	{0xb5, 0x12, 0x95, 0xaf, 0xe5, 0x3e, 0x60, 0x48, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0x74, 0x01, 0xa8} },
-{ 0x968a,	16,	{0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x55, 0x3e, 0x60, 0x29, 0xe5, 0x4e} },
-{ 0x969a,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
-{ 0x96aa,	16,	{0x16, 0xaf, 0x4e, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x94, 0xdd, 0xef, 0x70, 0x05, 0x12, 0x95, 0xaf} },
-{ 0x96ba,	16,	{0x80, 0xef, 0xe5, 0x4f, 0xf4, 0x52, 0x3e, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
-{ 0x96ca,	16,	{0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x97, 0xab, 0x74, 0x19, 0xf0, 0xe5, 0x33, 0xc3, 0x94} },
-{ 0x96da,	16,	{0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x51, 0x00, 0xf5, 0x52, 0x80, 0x09} },
-{ 0x96ea,	16,	{0x7f, 0x02, 0x12, 0x11, 0x27, 0x8e, 0x51, 0x8f, 0x52, 0xc3, 0xe5, 0x51, 0x64, 0x80, 0x94, 0x80} },
-{ 0x96fa,	16,	{0x40, 0xda, 0x90, 0x01, 0xbc, 0xe0, 0x65, 0x52, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e} },
-{ 0x970a,	16,	{0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x90, 0x01, 0xbc} },
-{ 0x971a,	16,	{0xe0, 0x55, 0x4f, 0x60, 0x14, 0xaf, 0x4e, 0x7d, 0x08, 0xe5, 0x4f, 0x55, 0x52, 0xfb, 0x12, 0x94} },
-{ 0x972a,	16,	{0xdd, 0xef, 0x70, 0x05, 0x12, 0x95, 0xaf, 0x80, 0xec, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04} },
-{ 0x973a,	16,	{0x40, 0xcc, 0x90, 0x01, 0xbc, 0xe5, 0x52, 0xf0, 0xe4, 0xf5, 0x4e, 0xc2, 0xaf, 0x74, 0x36, 0x25} },
-{ 0x974a,	16,	{0x4e, 0xf8, 0xe6, 0xf5, 0x4f, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4f, 0x1e, 0xe5, 0x4f, 0x60, 0x11} },
-{ 0x975a,	16,	{0xaf, 0x4e, 0x7d, 0x02, 0xab, 0x4f, 0x12, 0x94, 0xdd, 0xef, 0x70, 0x05, 0x12, 0x95, 0xaf, 0x80} },
-{ 0x976a,	16,	{0xef, 0x74, 0x2d, 0x25, 0x4e, 0xf8, 0xe6, 0xf5, 0x4f, 0x74, 0xfc, 0x25, 0x4e, 0xf5, 0x82, 0xe4} },
-{ 0x977a,	16,	{0x34, 0x02, 0xf5, 0x83, 0xe0, 0x65, 0x4f, 0x60, 0x11, 0xaf, 0x4e, 0x7d, 0x04, 0xab, 0x4f, 0x12} },
-{ 0x978a,	16,	{0x94, 0xdd, 0xef, 0x70, 0x05, 0x12, 0x95, 0xaf, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4e, 0xf5, 0x82} },
-{ 0x979a,	16,	{0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe5, 0x4f, 0xf0, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40} },
-{ 0x97aa,	4,	{0x9a, 0x12, 0x95, 0xaf} },
-{ 0x97ae,	1,	{0x22} },
-{ 0x97af,	12,	{0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x67, 0x02, 0x97, 0xf6} },
-{ 0x97bb,	16,	{0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
-{ 0x97cb,	16,	{0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
-{ 0x97db,	16,	{0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
-{ 0x97eb,	16,	{0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x98, 0x3b, 0xe4, 0x7e} },
-{ 0x97fb,	16,	{0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
-{ 0x980b,	16,	{0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
-{ 0x981b,	16,	{0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
-{ 0x982b,	16,	{0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
-{ 0x983b,	16,	{0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
-{ 0x984b,	16,	{0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
-{ 0x985b,	8,	{0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
-{ 0x9863,	1,	{0x00} },
-{ 0x9864,	8,	{0x8b, 0x59, 0x8a, 0x5a, 0x89, 0x5b, 0x8d, 0x5c} },
-{ 0x986c,	16,	{0xe4, 0xf5, 0x5d, 0xf5, 0x5e, 0xaf, 0x5c, 0x15, 0x5c, 0xef, 0x60, 0x36, 0xab, 0x59, 0x05, 0x5b} },
-{ 0x987c,	16,	{0xe5, 0x5b, 0xaa, 0x5a, 0x70, 0x02, 0x05, 0x5a, 0x14, 0xf9, 0x12, 0xa2, 0x07, 0xff, 0xe5, 0x5d} },
-{ 0x988c,	16,	{0xe5, 0x5e, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0x61, 0x2f, 0xf5, 0x82, 0xee, 0x34} },
-{ 0x989c,	16,	{0x9e, 0xf5, 0x83, 0xe5, 0x5d, 0xff, 0xe4, 0x93, 0xf5, 0x5d, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x5e} },
-{ 0x98ac,	6,	{0x80, 0xc3, 0xae, 0x5d, 0xaf, 0x5e} },
-{ 0x98b2,	1,	{0x22} },
-{ 0x98b3,	11,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
-{ 0x98be,	16,	{0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
-{ 0x98ce,	16,	{0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
-{ 0x98de,	16,	{0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
-{ 0x98ee,	10,	{0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
-{ 0x98f8,	9,	{0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x9901,	2,	{0xa9, 0x03} },
-{ 0x9903,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
-{ 0x9913,	16,	{0x5c, 0x45, 0x5d, 0xf5, 0x5e, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
-{ 0x9923,	16,	{0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
-{ 0x9933,	16,	{0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x5e, 0xeb} },
-{ 0x9943,	16,	{0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x5e, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
-{ 0x9953,	16,	{0x05, 0x22, 0xe5, 0x5c, 0x5c, 0xfe, 0xe5, 0x5d, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
-{ 0x9963,	16,	{0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
-{ 0x9973,	16,	{0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x5c, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x5d, 0x22, 0x7f} },
-{ 0x9983,	1,	{0x00} },
-{ 0x9984,	1,	{0x22} },
-{ 0x9985,	16,	{0x75, 0x55, 0x02, 0x75, 0x56, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x56, 0x82, 0x85} },
-{ 0x9995,	16,	{0x55, 0x83, 0xa3, 0xe0, 0xff, 0x90, 0x03, 0x37, 0xf0, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0} },
-{ 0x99a5,	16,	{0x90, 0x03, 0x36, 0xf0, 0x90, 0x03, 0x38, 0x74, 0xff, 0xf0, 0x75, 0x57, 0x03, 0x75, 0x58, 0x39} },
-{ 0x99b5,	16,	{0xef, 0x14, 0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9e, 0x29, 0x90, 0x99, 0xc6, 0xf8, 0x28, 0x28} },
-{ 0x99c5,	16,	{0x73, 0x02, 0x99, 0xe7, 0x02, 0x9a, 0x86, 0x02, 0x9b, 0x8b, 0x02, 0x9b, 0xaa, 0x02, 0x9b, 0xaa} },
-{ 0x99d5,	16,	{0x02, 0x9c, 0x60, 0x02, 0x9c, 0x9b, 0x02, 0x9c, 0xc0, 0x02, 0x9d, 0x7e, 0x02, 0x9d, 0xae, 0x02} },
-{ 0x99e5,	16,	{0x9d, 0xda, 0xe4, 0xf5, 0x4e, 0xe5, 0x4e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4} },
-{ 0x99f5,	16,	{0x34, 0x20, 0xaf, 0x82, 0xf5, 0x53, 0x8f, 0x54, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74} },
-{ 0x9a05,	16,	{0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4f, 0x80, 0x0d, 0x74} },
-{ 0x9a15,	16,	{0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4f, 0xe5, 0x54, 0x24, 0x07} },
-{ 0x9a25,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x53, 0xf5, 0x83, 0xe5, 0x4f, 0xf0, 0xe0, 0xf5, 0x50, 0x65, 0x4f, 0x60} },
-{ 0x9a35,	16,	{0x38, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xfd, 0x05, 0x58, 0xe5, 0x58, 0xaa, 0x57} },
-{ 0x9a45,	16,	{0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x58, 0xe5, 0x58, 0xac} },
-{ 0x9a55,	16,	{0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4f, 0xf0, 0x85, 0x58, 0x82} },
-{ 0x9a65,	16,	{0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x2f, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64} },
-{ 0x9a75,	16,	{0x02, 0x70, 0x87, 0x05, 0x4e, 0xe5, 0x4e, 0x64, 0x04, 0x60, 0x03, 0x02, 0x99, 0xea, 0x02, 0x9e} },
-{ 0x9a85,	16,	{0x2f, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0x05, 0x4e, 0xe5, 0x4e, 0xd3} },
-{ 0x9a95,	16,	{0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x98, 0xf0, 0xa3, 0x74, 0xb3, 0xf0, 0xe4, 0xf5} },
-{ 0x9aa5,	16,	{0x50, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75, 0x54, 0x00, 0xf5, 0x4e, 0xaf, 0x4e, 0x74} },
-{ 0x9ab5,	16,	{0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x90, 0x01, 0xc4, 0xf0} },
-{ 0x9ac5,	16,	{0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xa3} },
-{ 0x9ad5,	16,	{0x74, 0x02, 0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4f, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02} },
-{ 0x9ae5,	16,	{0xa3, 0xe0, 0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xff, 0x05, 0x58, 0xe5, 0x58} },
-{ 0x9af5,	16,	{0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x58, 0x82} },
-{ 0x9b05,	16,	{0x85, 0x57, 0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x50, 0xff, 0x90, 0x01} },
-{ 0x9b15,	16,	{0xc4, 0xe0, 0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xfe, 0x05, 0x58} },
-{ 0x9b25,	16,	{0xe5, 0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05} },
-{ 0x9b35,	16,	{0x58, 0xe5, 0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
-{ 0x9b45,	16,	{0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe5, 0x4f, 0xf0, 0x75, 0x50, 0xff, 0xe5, 0x50, 0x70, 0x16} },
-{ 0x9b55,	16,	{0x74, 0x08, 0x25, 0x54, 0xf5, 0x54, 0xe4, 0x35, 0x53, 0xf5, 0x53, 0x05, 0x4e, 0xe5, 0x4e, 0x64} },
-{ 0x9b65,	16,	{0x04, 0x60, 0x03, 0x02, 0x9a, 0xb2, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0x7d, 0x01, 0x12, 0x83, 0x5a} },
-{ 0x9b75,	16,	{0x05, 0x4e, 0xe5, 0x4e, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3} },
-{ 0x9b85,	16,	{0x74, 0x12, 0xf0, 0x02, 0x9e, 0x2f, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0, 0x14, 0xff, 0x74} },
-{ 0x9b95,	16,	{0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01} },
-{ 0x9ba5,	16,	{0xc4, 0xf0, 0x02, 0x9e, 0x2f, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4} },
-{ 0x9bb5,	16,	{0xf5, 0x50, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01} },
-{ 0x9bc5,	16,	{0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x58, 0x82, 0x85} },
-{ 0x9bd5,	16,	{0x57, 0x83, 0x74, 0xff, 0xf0, 0xf5, 0x50, 0xe5, 0x50, 0x60, 0x03, 0x02, 0x9e, 0x2f, 0x90, 0x01} },
-{ 0x9be5,	16,	{0xc0, 0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6} },
-{ 0x9bf5,	16,	{0xe5, 0x33, 0xc3, 0x94, 0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x51, 0x00} },
-{ 0x9c05,	16,	{0xf5, 0x52, 0x80, 0x09, 0x7f, 0x02, 0x12, 0x11, 0x27, 0x8e, 0x51, 0x8f, 0x52, 0xc3, 0xe5, 0x51} },
-{ 0x9c15,	16,	{0x64, 0x80, 0x94, 0x80, 0x40, 0xda, 0xe5, 0x52, 0x54, 0x0f, 0xf5, 0x50, 0x90, 0x02, 0xf7, 0xe0} },
-{ 0x9c25,	16,	{0x55, 0x50, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4f, 0x85, 0x56, 0x82, 0x85} },
-{ 0x9c35,	16,	{0x55, 0x83, 0xa3, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4f, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
-{ 0x9c45,	16,	{0x00, 0x8f, 0x4f, 0xe5, 0x4f, 0x70, 0x03, 0x02, 0x9e, 0x2f, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x85} },
-{ 0x9c55,	16,	{0x58, 0x82, 0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x2f, 0xe4, 0xff, 0xfd, 0x12, 0x83} },
-{ 0x9c65,	16,	{0x5a, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75, 0x54, 0x00, 0x85, 0x54, 0x82, 0x85, 0x53} },
-{ 0x9c75,	16,	{0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0x74, 0x01} },
-{ 0x9c85,	16,	{0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f} },
-{ 0x9c95,	16,	{0xf0, 0xd2, 0x04, 0x02, 0x9e, 0x2f, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75} },
-{ 0x9ca5,	16,	{0x54, 0x00, 0xe5, 0x54, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x53, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
-{ 0x9cb5,	16,	{0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0x02, 0x9e, 0x2f, 0xe4, 0xf5, 0x50, 0xf5, 0x4e} },
-{ 0x9cc5,	16,	{0xaf, 0x4e, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0xe5, 0x4e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5} },
-{ 0x9cd5,	16,	{0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x53, 0x8f, 0x54, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04} },
-{ 0x9ce5,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x4e, 0x7d, 0x01, 0x7b} },
-{ 0x9cf5,	16,	{0x01, 0x75, 0x5c, 0x80, 0x75, 0x5d, 0x40, 0x12, 0x99, 0x01, 0x8f, 0x50, 0xe5, 0x50, 0x70, 0x11} },
-{ 0x9d05,	16,	{0xaf, 0x4e, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x5c, 0x10, 0x75, 0x5d, 0x20, 0x12, 0x99, 0x01, 0x8f} },
-{ 0x9d15,	16,	{0x50, 0xe5, 0x50, 0x70, 0x10, 0xaf, 0x4e, 0x7d, 0x01, 0xfb, 0x75, 0x5c, 0x80, 0x75, 0x5d, 0x40} },
-{ 0x9d25,	16,	{0x12, 0x99, 0x01, 0x8f, 0x50, 0xe5, 0x50, 0x70, 0x10, 0xaf, 0x4e, 0x7d, 0x02, 0xfb, 0x75, 0x5c} },
-{ 0x9d35,	16,	{0x10, 0x75, 0x5d, 0x20, 0x12, 0x99, 0x01, 0x8f, 0x50, 0xaf, 0x4e, 0x7d, 0x01, 0x12, 0x83, 0x5a} },
-{ 0x9d45,	16,	{0xe5, 0x50, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xff, 0x05, 0x58, 0xe5} },
-{ 0x9d55,	16,	{0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x58} },
-{ 0x9d65,	16,	{0x82, 0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x2f, 0x05, 0x4e, 0xe5, 0x4e, 0xd3, 0x94} },
-{ 0x9d75,	16,	{0x03, 0x50, 0x03, 0x02, 0x9c, 0xc5, 0x02, 0x9e, 0x2f, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
-{ 0x9d85,	16,	{0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x9e, 0xf0, 0xa3, 0x74} },
-{ 0x9d95,	16,	{0x51, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x81, 0xd9, 0xef, 0x64, 0x08, 0x70, 0x03, 0x02, 0x9e} },
-{ 0x9da5,	16,	{0x2f, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9e, 0x2f, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
-{ 0x9db5,	16,	{0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x57, 0xf0, 0xa3, 0xe5} },
-{ 0x9dc5,	16,	{0x58, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x5c, 0xe4, 0x90} },
-{ 0x9dd5,	16,	{0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x56, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x55, 0xfa, 0xa9, 0x07} },
-{ 0x9de5,	16,	{0x7b, 0x01, 0x7d, 0x10, 0x12, 0x98, 0x64, 0xef, 0x4e, 0x70, 0x32, 0x90, 0x03, 0x59, 0xf0, 0xa3} },
-{ 0x9df5,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x56, 0x24, 0x02, 0x90} },
-{ 0x9e05,	16,	{0x03, 0x60, 0xf0, 0xe4, 0x35, 0x55, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x81} },
-{ 0x9e15,	16,	{0xd9, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x0d, 0xe4, 0x90, 0x03} },
-{ 0x9e25,	16,	{0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3} },
-{ 0x9e35,	16,	{0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7e, 0x03, 0x7f} },
-{ 0x9e45,	11,	{0x35, 0x7d, 0x24, 0x12, 0x91, 0x36, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
-{ 0x9e50,	1,	{0x22} },
-{ 0x9e51,	16,	{0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} },
-{ 0x9e61,	16,	{0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} },
-{ 0x9e71,	16,	{0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} },
-{ 0x9e81,	16,	{0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} },
-{ 0x9e91,	16,	{0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} },
-{ 0x9ea1,	16,	{0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} },
-{ 0x9eb1,	16,	{0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} },
-{ 0x9ec1,	16,	{0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} },
-{ 0x9ed1,	16,	{0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} },
-{ 0x9ee1,	16,	{0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} },
-{ 0x9ef1,	16,	{0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} },
-{ 0x9f01,	16,	{0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} },
-{ 0x9f11,	16,	{0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} },
-{ 0x9f21,	16,	{0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} },
-{ 0x9f31,	16,	{0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} },
-{ 0x9f41,	16,	{0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} },
-{ 0x9f51,	16,	{0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} },
-{ 0x9f61,	16,	{0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} },
-{ 0x9f71,	16,	{0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} },
-{ 0x9f81,	16,	{0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} },
-{ 0x9f91,	16,	{0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} },
-{ 0x9fa1,	16,	{0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} },
-{ 0x9fb1,	16,	{0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} },
-{ 0x9fc1,	16,	{0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} },
-{ 0x9fd1,	16,	{0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} },
-{ 0x9fe1,	16,	{0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} },
-{ 0x9ff1,	16,	{0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} },
-{ 0xa001,	16,	{0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} },
-{ 0xa011,	16,	{0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} },
-{ 0xa021,	16,	{0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} },
-{ 0xa031,	16,	{0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} },
-{ 0xa041,	16,	{0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} },
-{ 0xa051,	16,	{0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} },
-{ 0xa061,	16,	{0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
-{ 0xa071,	16,	{0xa1, 0x04, 0x74, 0x3a, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0xa1, 0x04, 0xef, 0x75, 0xf0} },
-{ 0xa081,	16,	{0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
-{ 0xa091,	16,	{0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
-{ 0xa0a1,	16,	{0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
-{ 0xa0b1,	16,	{0x12, 0xa2, 0x63, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
-{ 0xa0c1,	16,	{0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
-{ 0xa0d1,	16,	{0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
-{ 0xa0e1,	16,	{0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
-{ 0xa0f1,	16,	{0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
-{ 0xa101,	12,	{0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0xa0, 0x63} },
-{ 0xa10d,	1,	{0x22} },
-{ 0xa10e,	16,	{0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
-{ 0xa11e,	16,	{0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
-{ 0xa12e,	16,	{0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
-{ 0xa13e,	16,	{0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
-{ 0xa14e,	16,	{0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
-{ 0xa15e,	16,	{0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
-{ 0xa16e,	16,	{0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
-{ 0xa17e,	16,	{0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
-{ 0xa18e,	16,	{0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
-{ 0xa19e,	16,	{0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
-{ 0xa1ae,	16,	{0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
-{ 0xa1be,	16,	{0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
-{ 0xa1ce,	16,	{0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
-{ 0xa1de,	16,	{0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
-{ 0xa1ee,	16,	{0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
-{ 0xa1fe,	9,	{0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0xa1, 0x5e, 0x73} },
-{ 0xa207,	16,	{0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
-{ 0xa217,	9,	{0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
-{ 0xa220,	16,	{0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
-{ 0xa230,	16,	{0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
-{ 0xa240,	13,	{0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
-{ 0xa24d,	16,	{0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
-{ 0xa25d,	6,	{0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
-{ 0xa263,	16,	{0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
-{ 0xa273,	6,	{0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
-{ 0xa279,	16,	{0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
-{ 0xa289,	16,	{0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
-{ 0xa299,	16,	{0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
-{ 0xa2a9,	8,	{0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
-{ 0xa2b1,	16,	{0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
-{ 0xa2c1,	16,	{0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
-{ 0xa2d1,	16,	{0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
-{ 0xa2e1,	16,	{0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
-{ 0xa2f1,	16,	{0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
-{ 0xa301,	16,	{0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
-{ 0xa311,	16,	{0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
-{ 0xa321,	16,	{0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
-{ 0xa331,	16,	{0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
-{ 0xa341,	16,	{0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
-{ 0xa351,	16,	{0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
-{ 0xa361,	16,	{0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
-{ 0xa371,	14,	{0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
-{ 0xa37f,	16,	{0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
-{ 0xa38f,	1,	{0x22} },
-{ 0xa390,	16,	{0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
-{ 0xa3a0,	3,	{0xd8, 0xf1, 0x22} },
-{ 0xa3a3,	16,	{0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
-{ 0xa3b3,	7,	{0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
-{ 0xa3ba,	12,	{0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
-{ 0xa3c6,	16,	{0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa3, 0xdd, 0x12, 0xa3, 0xdd, 0x12} },
-{ 0xa3d6,	16,	{0xa3, 0xdd, 0x12, 0xa3, 0xdd, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
-{ 0xa3e6,	16,	{0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
-{ 0xa3f6,	1,	{0x22} },
+{ 0x890a,	16,	{0x42, 0x22, 0x80, 0x36, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x5e, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
+{ 0x891a,	16,	{0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x22, 0x60, 0x1f, 0xe5, 0x60, 0x24, 0x04, 0xf5} },
+{ 0x892a,	16,	{0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07} },
+{ 0x893a,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x22, 0xe5, 0x58, 0x24, 0x08, 0xf5, 0x82} },
+{ 0x894a,	16,	{0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62, 0x05, 0x43, 0x5d, 0x0a, 0x80, 0x1a, 0xef} },
+{ 0x895a,	16,	{0xb4, 0x72, 0x05, 0x43, 0x5d, 0x08, 0x80, 0x11, 0xef, 0xb4, 0x74, 0x05, 0x43, 0x5d, 0x02, 0x80} },
+{ 0x896a,	16,	{0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4} },
+{ 0x897a,	16,	{0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03, 0x43, 0x5d, 0x80, 0xef, 0x30, 0xe7, 0x12} },
+{ 0x898a,	16,	{0x43, 0x5d, 0x40, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44} },
+{ 0x899a,	16,	{0x02, 0xf0, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x30, 0xe1} },
+{ 0x89aa,	16,	{0x20, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x32} },
+{ 0x89ba,	16,	{0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80} },
+{ 0x89ca,	16,	{0x10, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52} },
+{ 0x89da,	16,	{0x32, 0xe5, 0x58, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe4} },
+{ 0x89ea,	16,	{0x11, 0xae, 0x5e, 0x74, 0x01, 0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x31} },
+{ 0x89fa,	16,	{0x80, 0x10, 0xae, 0x5e, 0x74, 0x01, 0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4} },
+{ 0x8a0a,	16,	{0x52, 0x31, 0xef, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x03, 0xe4, 0xf5, 0x5d, 0x85, 0x60, 0x82, 0x85} },
+{ 0x8a1a,	16,	{0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3} },
+{ 0x8a2a,	16,	{0xe4, 0xf0, 0xe5, 0x5d, 0xf0, 0xe5, 0x58, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83} },
+{ 0x8a3a,	16,	{0xe0, 0xff, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0xe5} },
+{ 0x8a4a,	16,	{0x58, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x05} },
+{ 0x8a5a,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x58, 0x24, 0x09, 0xf5, 0x82, 0xe4} },
+{ 0x8a6a,	16,	{0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x60, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5} },
+{ 0x8a7a,	16,	{0x83, 0xef, 0xf0, 0xe5, 0x58, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xff} },
+{ 0x8a8a,	16,	{0xe5, 0x60, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xef, 0xf0, 0x85, 0x60, 0x82} },
+{ 0x8a9a,	16,	{0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3} },
+{ 0x8aaa,	16,	{0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x8aba,	16,	{0xa3, 0xe0, 0xf5, 0x66, 0x8e, 0x65, 0x8d, 0x64, 0x8c, 0x63, 0x7d, 0x06, 0xaf, 0x5e, 0x12, 0x83} },
+{ 0x8aca,	16,	{0xdf, 0x75, 0x5d, 0x08, 0xe5, 0x58, 0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0} },
+{ 0x8ada,	16,	{0x60, 0x03, 0x43, 0x5d, 0x10, 0xe5, 0x60, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83} },
+{ 0x8aea,	16,	{0xe0, 0x54, 0x03, 0x45, 0x5d, 0xf0, 0xe5, 0x58, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5} },
+{ 0x8afa,	16,	{0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05, 0x40, 0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff} },
+{ 0x8b0a,	16,	{0x22, 0xe5, 0x58, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94} },
+{ 0x8b1a,	16,	{0x01, 0x40, 0x06, 0xed, 0xd3, 0x94, 0x02, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25} },
+{ 0x8b2a,	16,	{0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24, 0xfb, 0x4f, 0xf5, 0x5d, 0xe5, 0x58, 0x24, 0x07, 0xf5, 0x82} },
+{ 0x8b3a,	16,	{0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x24, 0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60} },
+{ 0x8b4a,	16,	{0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a, 0x70, 0x14, 0x43, 0x5d, 0x18, 0x80, 0x12, 0x43, 0x5d, 0x08} },
+{ 0x8b5a,	16,	{0x80, 0x0d, 0x43, 0x5d, 0x38, 0x80, 0x08, 0x43, 0x5d, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85} },
+{ 0x8b6a,	16,	{0x60, 0x82, 0x85, 0x5f, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5d, 0xf0, 0x74, 0x01, 0x7e, 0x00, 0xa8} },
+{ 0x8b7a,	16,	{0x5e, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x34} },
+{ 0x8b8a,	16,	{0x60, 0x07, 0xaf, 0x5e, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0xaa, 0x57, 0xa9, 0x58, 0x7b, 0x01, 0xc0} },
+{ 0x8b9a,	16,	{0x03, 0xc0, 0x01, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0} },
+{ 0x8baa,	16,	{0xa8, 0x01, 0xfc, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa2, 0x12} },
+{ 0x8bba,	2,	{0x7f, 0x00} },
+{ 0x8bbc,	1,	{0x22} },
+{ 0x8bbd,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8bcd,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} },
+{ 0x8bdd,	16,	{0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} },
+{ 0x8bed,	16,	{0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} },
+{ 0x8bfd,	16,	{0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x8c0d,	16,	{0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2d, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} },
+{ 0x8c1d,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x57, 0xe5, 0x33, 0xc3, 0x94, 0x01} },
+{ 0x8c2d,	16,	{0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x58, 0x00, 0xf5, 0x59, 0x80, 0x09, 0x7f} },
+{ 0x8c3d,	16,	{0x02, 0x12, 0x11, 0x27, 0x8e, 0x58, 0x8f, 0x59, 0xc3, 0xe5, 0x58, 0x64, 0x80, 0x94, 0x80, 0x40} },
+{ 0x8c4d,	16,	{0xda, 0xe5, 0x57, 0x55, 0x59, 0x90, 0x01, 0x32, 0xf0, 0x7e, 0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12} },
+{ 0x8c5d,	4,	{0x91, 0x6a, 0x7f, 0x00} },
+{ 0x8c61,	1,	{0x22} },
+{ 0x8c62,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8c72,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} },
+{ 0x8c82,	16,	{0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
+{ 0x8c92,	16,	{0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x91} },
+{ 0x8ca2,	3,	{0x6a, 0x7f, 0x00} },
+{ 0x8ca5,	1,	{0x22} },
+{ 0x8ca6,	4,	{0x8e, 0x57, 0x8f, 0x58} },
+{ 0x8caa,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8cba,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x85, 0x58} },
+{ 0x8cca,	16,	{0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5} },
+{ 0x8cda,	16,	{0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x43, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x0c, 0xf5, 0x82} },
+{ 0x8cea,	16,	{0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x20, 0xee, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82} },
+{ 0x8cfa,	16,	{0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x30, 0xe1, 0xf0, 0x7f, 0x60, 0xed, 0x24, 0x05, 0xf5, 0x82} },
+{ 0x8d0a,	16,	{0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0x5f, 0xb5, 0x07, 0xf2, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04} },
+{ 0x8d1a,	12,	{0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} },
+{ 0x8d26,	1,	{0x22} },
+{ 0x8d27,	4,	{0xad, 0x07, 0xac, 0x06} },
+{ 0x8d2b,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8d3b,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8d4b,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
+{ 0x8d5b,	16,	{0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x8d6b,	4,	{0xfe, 0xf0, 0x7f, 0x00} },
+{ 0x8d6f,	1,	{0x22} },
+{ 0x8d70,	4,	{0xad, 0x07, 0xac, 0x06} },
+{ 0x8d74,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
+{ 0x8d84,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
+{ 0x8d94,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} },
+{ 0x8da4,	16,	{0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
+{ 0x8db4,	1,	{0x22} },
+{ 0x8db5,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} },
+{ 0x8dc5,	16,	{0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3e, 0x7f, 0x00} },
+{ 0x8dd5,	1,	{0x22} },
+{ 0x8dd6,	4,	{0x8e, 0x57, 0x8f, 0x58} },
+{ 0x8dda,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x5c, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x59, 0xd3} },
+{ 0x8dea,	16,	{0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x59, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} },
+{ 0x8dfa,	16,	{0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x5a, 0x7e, 0x75, 0x5b} },
+{ 0x8e0a,	16,	{0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x5a, 0x7e, 0x75, 0x5b, 0x00, 0x80, 0x16, 0x7e} },
+{ 0x8e1a,	16,	{0x7d, 0x7f, 0x80, 0x75, 0x5a, 0x7d, 0x75, 0x5b, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} },
+{ 0x8e2a,	16,	{0x5a, 0x7d, 0x75, 0x5b, 0x00, 0xe5, 0x5c, 0x70, 0x1b, 0x85, 0x5b, 0x82, 0x85, 0x5a, 0x83, 0x74} },
+{ 0x8e3a,	16,	{0xff, 0xf0, 0xe5, 0x59, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} },
+{ 0x8e4a,	16,	{0x01, 0xf0, 0x80, 0x48, 0xe5, 0x58, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x57, 0xfe, 0xe5, 0x5c, 0x60} },
+{ 0x8e5a,	16,	{0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} },
+{ 0x8e6a,	16,	{0x5b, 0xe5, 0x5b, 0xaa, 0x5a, 0x70, 0x02, 0x05, 0x5a, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} },
+{ 0x8e7a,	16,	{0x15, 0x5c, 0x80, 0xd9, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x59, 0x25} },
+{ 0x8e8a,	14,	{0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
+{ 0x8e98,	1,	{0x22} },
+{ 0x8e99,	16,	{0xef, 0x24, 0x05, 0xf5, 0x58, 0xe4, 0x3e, 0xf5, 0x57, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
+{ 0x8ea9,	16,	{0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3} },
+{ 0x8eb9,	16,	{0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x59, 0xf5, 0x5a, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
+{ 0x8ec9,	16,	{0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8f, 0x7a} },
+{ 0x8ed9,	16,	{0x24, 0x14, 0x60, 0x03, 0x02, 0x8f, 0xc8, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe} },
+{ 0x8ee9,	16,	{0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x5c, 0x74, 0x01, 0x9e, 0xf5, 0x5b, 0xd3, 0xe5, 0x5c} },
+{ 0x8ef9,	16,	{0x94, 0x3f, 0xe5, 0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x3f, 0xd3, 0xe5} },
+{ 0x8f09,	16,	{0x5a, 0x95, 0x5c, 0xe5, 0x59, 0x95, 0x5b, 0x50, 0x03, 0x02, 0x8f, 0xcb, 0xae, 0x5b, 0xaf, 0x5c} },
+{ 0x8f19,	16,	{0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
+{ 0x8f29,	16,	{0x59, 0xf5, 0x5a, 0x02, 0x8f, 0xcb, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
+{ 0x8f39,	16,	{0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x5c, 0xe4, 0x9e, 0xf5, 0x5b, 0xd3, 0xe5, 0x5c, 0x94} },
+{ 0x8f49,	16,	{0x10, 0xe5, 0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x10, 0xd3, 0xe5, 0x5a} },
+{ 0x8f59,	16,	{0x95, 0x5c, 0xe5, 0x59, 0x95, 0x5b, 0x40, 0x6a, 0xae, 0x5b, 0xaf, 0x5c, 0x85, 0x58, 0x82, 0x85} },
+{ 0x8f69,	16,	{0x57, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x59, 0xf5, 0x5a, 0x80} },
+{ 0x8f79,	16,	{0x51, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
+{ 0x8f89,	16,	{0xf5, 0x5c, 0xe4, 0x9e, 0xf5, 0x5b, 0x45, 0x5c, 0x60, 0x0b, 0xd3, 0xe5, 0x5c, 0x94, 0x3f, 0xe5} },
+{ 0x8f99,	16,	{0x5b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x5b, 0x00, 0x75, 0x5c, 0x3f, 0xd3, 0xe5, 0x5a, 0x95, 0x5c} },
+{ 0x8fa9,	16,	{0xe5, 0x59, 0x95, 0x5b, 0x40, 0x1c, 0xae, 0x5b, 0xaf, 0x5c, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
+{ 0x8fb9,	16,	{0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x59, 0xf5, 0x5a, 0x80, 0x03, 0x7f} },
+{ 0x8fc9,	16,	{0x01, 0x22, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x90, 0x8b} },
+{ 0x8fd9,	16,	{0x24, 0xf9, 0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x90, 0xdb, 0x24, 0x14, 0x60, 0x03, 0x02} },
+{ 0x8fe9,	16,	{0x91, 0x1f, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94} },
+{ 0x8ff9,	16,	{0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x91, 0x1f, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x5a} },
+{ 0x9009,	16,	{0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e, 0x70, 0x03, 0x02, 0x91, 0x1f, 0x90, 0x01} },
+{ 0x9019,	16,	{0x75, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01} },
+{ 0x9029,	16,	{0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x58, 0x82, 0x85} },
+{ 0x9039,	16,	{0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03} },
+{ 0x9049,	16,	{0x02, 0x91, 0x1f, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x91, 0x1f, 0x90} },
+{ 0x9059,	16,	{0x01, 0x76, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e, 0x70} },
+{ 0x9069,	16,	{0x03, 0x02, 0x91, 0x1f, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90} },
+{ 0x9079,	16,	{0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x9089,	16,	{0x80, 0xd2, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94} },
+{ 0x9099,	16,	{0x20, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x91, 0x1f, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00} },
+{ 0x90a9,	16,	{0x50, 0x74, 0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15} },
+{ 0x90b9,	16,	{0x59, 0x4e, 0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90} },
+{ 0x90c9,	16,	{0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x90d9,	16,	{0x80, 0xd5, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78} },
+{ 0x90e9,	16,	{0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0xe5, 0x5a, 0x15, 0x5a, 0xae, 0x59, 0x70, 0x02, 0x15, 0x59, 0x4e} },
+{ 0x90f9,	16,	{0x60, 0x24, 0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5} },
+{ 0x9109,	16,	{0x83, 0xe0, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82} },
+{ 0x9119,	16,	{0xf5, 0x83, 0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83} },
+{ 0x9129,	13,	{0xa3, 0xa3, 0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x91, 0x6a, 0x7f, 0x00} },
+{ 0x9136,	1,	{0x22} },
+{ 0x9137,	16,	{0x8e, 0x62, 0x8f, 0x63, 0x8c, 0x64, 0x8d, 0x65, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x63} },
+{ 0x9147,	16,	{0xe5, 0x63, 0xae, 0x62, 0x70, 0x02, 0x05, 0x62, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
+{ 0x9157,	16,	{0x65, 0xe5, 0x65, 0xac, 0x64, 0x70, 0x02, 0x05, 0x64, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x9167,	3,	{0x80, 0xd6, 0x22} },
+{ 0x916a,	6,	{0x8d, 0x5d, 0xab, 0x07, 0xaa, 0x06} },
+{ 0x9170,	16,	{0x75, 0x61, 0x40, 0x75, 0x60, 0x0d, 0x75, 0x5f, 0x03, 0x75, 0x5e, 0x00, 0x90, 0x7f, 0xc2, 0xe0} },
+{ 0x9180,	16,	{0x20, 0xe1, 0xf9, 0xaf, 0x61, 0xae, 0x60, 0xad, 0x5f, 0xac, 0x5e, 0xec, 0x4d, 0x4e, 0x4f, 0x70} },
+{ 0x9190,	16,	{0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} },
+{ 0x91a0,	16,	{0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5d, 0x12, 0x91, 0x37, 0x90, 0x7f, 0xc3} },
+{ 0x91b0,	8,	{0xe5, 0x5d, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x91b8,	1,	{0x22} },
+{ 0x91b9,	16,	{0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0x90, 0x0a, 0xf5, 0xe4, 0x93, 0x90} },
+{ 0x91c9,	16,	{0x01, 0x86, 0xf0, 0x90, 0x0a, 0xf6, 0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c} },
+{ 0x91d9,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01} },
+{ 0x91e9,	16,	{0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e, 0x01, 0x7f, 0x7c, 0x12, 0x19, 0xc1, 0x7e, 0x01, 0x7f, 0x84} },
+{ 0x91f9,	7,	{0x7d, 0x14, 0x12, 0x91, 0x6a, 0x7f, 0x00} },
+{ 0x9200,	1,	{0x22} },
+{ 0x9201,	16,	{0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4e, 0x7b, 0x75, 0x4f, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} },
+{ 0x9211,	16,	{0x4e, 0x51, 0x85, 0x4f, 0x52, 0xe5, 0x52, 0x24, 0x01, 0xf5, 0x56, 0xe4, 0x35, 0x51, 0xf5, 0x55} },
+{ 0x9221,	16,	{0xe4, 0xf5, 0x50, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} },
+{ 0x9231,	16,	{0x5b, 0x90, 0x92, 0x39, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x92, 0x5d, 0x02, 0x92, 0x5d, 0x02, 0x92} },
+{ 0x9241,	16,	{0x67, 0x02, 0x92, 0x71, 0x02, 0x92, 0x71, 0x02, 0x92, 0x71, 0x02, 0x92, 0x85, 0x02, 0x92, 0x5d} },
+{ 0x9251,	16,	{0x02, 0x92, 0x7b, 0x02, 0x92, 0x5d, 0x02, 0x92, 0x8d, 0x02, 0x92, 0x5d, 0xef, 0x64, 0x02, 0x60} },
+{ 0x9261,	16,	{0x2b, 0x75, 0x50, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x50, 0xff, 0x80, 0x1c} },
+{ 0x9271,	16,	{0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x50, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} },
+{ 0x9281,	16,	{0x50, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x50, 0xff, 0xe5, 0x50, 0x60, 0x15} },
+{ 0x9291,	16,	{0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} },
+{ 0x92a1,	16,	{0x91, 0x6a, 0xaf, 0x50, 0x22, 0xe4, 0xf5, 0x50, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0x14} },
+{ 0x92b1,	16,	{0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x93, 0xcf, 0x90, 0x92, 0xc0, 0xf8, 0x28, 0x28, 0x73, 0x02} },
+{ 0x92c1,	16,	{0x92, 0xed, 0x02, 0x92, 0xf9, 0x02, 0x93, 0x05, 0x02, 0x93, 0x53, 0x02, 0x93, 0x5e, 0x02, 0x93} },
+{ 0x92d1,	16,	{0x69, 0x02, 0x93, 0x74, 0x02, 0x93, 0x7f, 0x02, 0x93, 0x8a, 0x02, 0x93, 0x95, 0x02, 0x93, 0xa0} },
+{ 0x92e1,	16,	{0x02, 0x93, 0xa7, 0x02, 0x93, 0xcf, 0x02, 0x93, 0xb2, 0x02, 0x93, 0xbd, 0xaf, 0x56, 0xae, 0x55} },
+{ 0x92f1,	16,	{0x12, 0x84, 0x41, 0x8f, 0x50, 0x02, 0x93, 0xd2, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x85, 0x61, 0x8f} },
+{ 0x9301,	16,	{0x50, 0x02, 0x93, 0xd2, 0x85, 0x55, 0x53, 0x85, 0x56, 0x54, 0xe5, 0x54, 0x24, 0x01, 0xff, 0xe4} },
+{ 0x9311,	16,	{0x35, 0x53, 0xfe, 0x12, 0x86, 0xbe, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x87, 0x51, 0x8f, 0x50, 0xef} },
+{ 0x9321,	16,	{0x64, 0x01, 0x60, 0x03, 0x02, 0x93, 0xd2, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x87, 0xa6, 0x8f, 0x50} },
+{ 0x9331,	16,	{0xe5, 0x50, 0x70, 0x03, 0x02, 0x93, 0xd2, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xe0, 0x75, 0xf0} },
+{ 0x9341,	16,	{0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x87, 0xa6, 0x02} },
+{ 0x9351,	16,	{0x93, 0xd2, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8c, 0xa6, 0x8f, 0x50, 0x80, 0x74, 0xaf, 0x56, 0xae} },
+{ 0x9361,	16,	{0x55, 0x12, 0x8d, 0x27, 0x8f, 0x50, 0x80, 0x69, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0x70, 0x8f} },
+{ 0x9371,	16,	{0x50, 0x80, 0x5e, 0xaf, 0x4f, 0xae, 0x4e, 0x12, 0x8e, 0x99, 0x8f, 0x50, 0x80, 0x53, 0xaf, 0x56} },
+{ 0x9381,	16,	{0xae, 0x55, 0x12, 0x8b, 0xbd, 0x8f, 0x50, 0x80, 0x48, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x86, 0x2d} },
+{ 0x9391,	16,	{0x8f, 0x50, 0x80, 0x3d, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8c, 0x62, 0x8f, 0x50, 0x80, 0x32, 0x12} },
+{ 0x93a1,	16,	{0x91, 0xb9, 0x8f, 0x50, 0x80, 0x2b, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0xb5, 0x8f, 0x50, 0x80} },
+{ 0x93b1,	16,	{0x20, 0xaf, 0x56, 0xae, 0x55, 0x12, 0x8d, 0xd6, 0x8f, 0x50, 0x80, 0x15, 0xaf, 0x4f, 0xae, 0x4e} },
+{ 0x93c1,	16,	{0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x91, 0x37, 0xe4, 0xf5, 0x50, 0x80, 0x03, 0x75, 0x50} },
+{ 0x93d1,	16,	{0xff, 0xe5, 0x50, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x52, 0x82, 0x85, 0x51} },
+{ 0x93e1,	16,	{0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x91, 0x6a, 0xaf} },
+{ 0x93f1,	16,	{0x50, 0x22, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} },
+{ 0x9401,	16,	{0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x56, 0x82, 0x85} },
+{ 0x9411,	16,	{0x55, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x91, 0x6a} },
+{ 0x9421,	4,	{0x8f, 0x50, 0xaf, 0x50} },
+{ 0x9425,	1,	{0x22} },
+{ 0x9426,	8,	{0x8f, 0x51, 0x8e, 0x50, 0x8d, 0x4f, 0x8c, 0x4e} },
+{ 0x942e,	16,	{0x75, 0x58, 0x01, 0x75, 0x59, 0x9c, 0xe4, 0xf5, 0x57, 0xaf, 0x53, 0x15, 0x53, 0xef, 0x70, 0x03} },
+{ 0x943e,	16,	{0x02, 0x94, 0xc4, 0xaf, 0x52, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x51} },
+{ 0x944e,	16,	{0xae, 0x50, 0xad, 0x4f, 0xac, 0x4e, 0x12, 0xa3, 0x21, 0xaf, 0x03, 0x8f, 0x56, 0xaf, 0x51, 0xae} },
+{ 0x945e,	16,	{0x50, 0xad, 0x4f, 0xac, 0x4e, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x52, 0xe4} },
+{ 0x946e,	16,	{0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
+{ 0x947e,	16,	{0x12, 0xa3, 0x21, 0x8f, 0x51, 0x8e, 0x50, 0x8d, 0x4f, 0x8c, 0x4e, 0xe5, 0x56, 0x24, 0x30, 0xf5} },
+{ 0x948e,	16,	{0x56, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x56, 0xf5, 0x56, 0x05, 0x59, 0xe5, 0x59} },
+{ 0x949e,	16,	{0xae, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x59, 0xe5} },
+{ 0x94ae,	16,	{0x59, 0xae, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x56, 0xf0, 0x05} },
+{ 0x94be,	16,	{0x57, 0x05, 0x57, 0x02, 0x94, 0x37, 0xe5, 0x59, 0x15, 0x59, 0x70, 0x02, 0x15, 0x58, 0xaf, 0x57} },
+{ 0x94ce,	16,	{0x15, 0x57, 0xef, 0x60, 0x23, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0xf5} },
+{ 0x94de,	16,	{0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x55, 0xe5, 0x55, 0xac, 0x54, 0x70, 0x02, 0x05, 0x54, 0x14} },
+{ 0x94ee,	8,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
+{ 0x94f6,	1,	{0x22} },
+{ 0x94f7,	16,	{0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
+{ 0x9507,	10,	{0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0x9511,	16,	{0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
+{ 0x9521,	16,	{0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
+{ 0x9531,	16,	{0xe4, 0xef, 0x55, 0x34, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x9541,	16,	{0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
+{ 0x9551,	16,	{0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa2, 0x81, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x9561,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
+{ 0x9571,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x9581,	1,	{0x22} },
+{ 0x9582,	16,	{0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x9592,	16,	{0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
+{ 0x95a2,	16,	{0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
+{ 0x95b2,	16,	{0xa2, 0x12, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa2, 0x81, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x95c2,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
+{ 0x95d2,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x95e2,	1,	{0x22} },
+{ 0x95e3,	16,	{0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x53, 0x7b, 0x75, 0x54} },
+{ 0x95f3,	16,	{0x80, 0xe5, 0x54, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x53, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x55, 0xf5} },
+{ 0x9603,	16,	{0x56, 0x89, 0x57, 0xfe, 0x12, 0x95, 0x82, 0xef, 0x60, 0x50, 0xab, 0x55, 0xaa, 0x56, 0xa9, 0x57} },
+{ 0x9613,	16,	{0x12, 0xa2, 0x3b, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0xa2, 0x54, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
+{ 0x9623,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
+{ 0x9633,	16,	{0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
+{ 0x9643,	16,	{0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x34, 0x60, 0x0f, 0x85, 0x54, 0x82, 0x85, 0x53} },
+{ 0x9653,	10,	{0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} },
+{ 0x965d,	1,	{0x22} },
+{ 0x965e,	16,	{0x12, 0x95, 0xe3, 0xe4, 0xf5, 0x4e, 0x74, 0x3a, 0x25, 0x4e, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4f} },
+{ 0x966e,	16,	{0x74, 0xc5, 0x25, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4f, 0xff, 0xc4} },
+{ 0x967e,	16,	{0x54, 0x0f, 0xf5, 0x50, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
+{ 0x968e,	16,	{0x83, 0xe5, 0x4f, 0xf0, 0xaf, 0x4e, 0x7d, 0x01, 0xe5, 0x4f, 0x45, 0x50, 0xfb, 0x12, 0x95, 0x11} },
+{ 0x969e,	16,	{0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80, 0xec, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40} },
+{ 0x96ae,	16,	{0xb5, 0x12, 0x95, 0xe3, 0xe5, 0x3e, 0x60, 0x48, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0x74, 0x01, 0xa8} },
+{ 0x96be,	16,	{0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x55, 0x3e, 0x60, 0x29, 0xe5, 0x4e} },
+{ 0x96ce,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
+{ 0x96de,	16,	{0x16, 0xaf, 0x4e, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x95, 0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3} },
+{ 0x96ee,	16,	{0x80, 0xef, 0xe5, 0x4f, 0xf4, 0x52, 0x3e, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
+{ 0x96fe,	16,	{0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x97, 0xdf, 0x74, 0x19, 0xf0, 0xe5, 0x33, 0xc3, 0x94} },
+{ 0x970e,	16,	{0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x51, 0x00, 0xf5, 0x52, 0x80, 0x09} },
+{ 0x971e,	16,	{0x7f, 0x02, 0x12, 0x11, 0x27, 0x8e, 0x51, 0x8f, 0x52, 0xc3, 0xe5, 0x51, 0x64, 0x80, 0x94, 0x80} },
+{ 0x972e,	16,	{0x40, 0xda, 0x90, 0x01, 0xbc, 0xe0, 0x65, 0x52, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e} },
+{ 0x973e,	16,	{0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x90, 0x01, 0xbc} },
+{ 0x974e,	16,	{0xe0, 0x55, 0x4f, 0x60, 0x14, 0xaf, 0x4e, 0x7d, 0x08, 0xe5, 0x4f, 0x55, 0x52, 0xfb, 0x12, 0x95} },
+{ 0x975e,	16,	{0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80, 0xec, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04} },
+{ 0x976e,	16,	{0x40, 0xcc, 0x90, 0x01, 0xbc, 0xe5, 0x52, 0xf0, 0xe4, 0xf5, 0x4e, 0xc2, 0xaf, 0x74, 0x36, 0x25} },
+{ 0x977e,	16,	{0x4e, 0xf8, 0xe6, 0xf5, 0x4f, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4f, 0x1e, 0xe5, 0x4f, 0x60, 0x11} },
+{ 0x978e,	16,	{0xaf, 0x4e, 0x7d, 0x02, 0xab, 0x4f, 0x12, 0x95, 0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80} },
+{ 0x979e,	16,	{0xef, 0x74, 0x2d, 0x25, 0x4e, 0xf8, 0xe6, 0xf5, 0x4f, 0x74, 0xfc, 0x25, 0x4e, 0xf5, 0x82, 0xe4} },
+{ 0x97ae,	16,	{0x34, 0x02, 0xf5, 0x83, 0xe0, 0x65, 0x4f, 0x60, 0x11, 0xaf, 0x4e, 0x7d, 0x04, 0xab, 0x4f, 0x12} },
+{ 0x97be,	16,	{0x95, 0x11, 0xef, 0x70, 0x05, 0x12, 0x95, 0xe3, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4e, 0xf5, 0x82} },
+{ 0x97ce,	16,	{0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe5, 0x4f, 0xf0, 0x05, 0x4e, 0xe5, 0x4e, 0xc3, 0x94, 0x04, 0x40} },
+{ 0x97de,	4,	{0x9a, 0x12, 0x95, 0xe3} },
+{ 0x97e2,	1,	{0x22} },
+{ 0x97e3,	12,	{0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x67, 0x02, 0x98, 0x2a} },
+{ 0x97ef,	16,	{0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x97ff,	16,	{0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x980f,	16,	{0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x981f,	16,	{0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x98, 0x6f, 0xe4, 0x7e} },
+{ 0x982f,	16,	{0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x983f,	16,	{0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x984f,	16,	{0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x985f,	16,	{0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x986f,	16,	{0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
+{ 0x987f,	16,	{0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
+{ 0x988f,	8,	{0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
+{ 0x9897,	1,	{0x00} },
+{ 0x9898,	8,	{0x8b, 0x59, 0x8a, 0x5a, 0x89, 0x5b, 0x8d, 0x5c} },
+{ 0x98a0,	16,	{0xe4, 0xf5, 0x5d, 0xf5, 0x5e, 0xaf, 0x5c, 0x15, 0x5c, 0xef, 0x60, 0x36, 0xab, 0x59, 0x05, 0x5b} },
+{ 0x98b0,	16,	{0xe5, 0x5b, 0xaa, 0x5a, 0x70, 0x02, 0x05, 0x5a, 0x14, 0xf9, 0x12, 0xa2, 0x3b, 0xff, 0xe5, 0x5d} },
+{ 0x98c0,	16,	{0xe5, 0x5e, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0x95, 0x2f, 0xf5, 0x82, 0xee, 0x34} },
+{ 0x98d0,	16,	{0x9e, 0xf5, 0x83, 0xe5, 0x5d, 0xff, 0xe4, 0x93, 0xf5, 0x5d, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x5e} },
+{ 0x98e0,	6,	{0x80, 0xc3, 0xae, 0x5d, 0xaf, 0x5e} },
+{ 0x98e6,	1,	{0x22} },
+{ 0x98e7,	11,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
+{ 0x98f2,	16,	{0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
+{ 0x9902,	16,	{0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
+{ 0x9912,	16,	{0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
+{ 0x9922,	10,	{0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
+{ 0x992c,	9,	{0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x9935,	2,	{0xa9, 0x03} },
+{ 0x9937,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
+{ 0x9947,	16,	{0x5c, 0x45, 0x5d, 0xf5, 0x5e, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x9957,	16,	{0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
+{ 0x9967,	16,	{0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x5e, 0xeb} },
+{ 0x9977,	16,	{0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x5e, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
+{ 0x9987,	16,	{0x05, 0x22, 0xe5, 0x5c, 0x5c, 0xfe, 0xe5, 0x5d, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
+{ 0x9997,	16,	{0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
+{ 0x99a7,	16,	{0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x5c, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x5d, 0x22, 0x7f} },
+{ 0x99b7,	1,	{0x00} },
+{ 0x99b8,	1,	{0x22} },
+{ 0x99b9,	16,	{0x75, 0x55, 0x02, 0x75, 0x56, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x56, 0x82, 0x85} },
+{ 0x99c9,	16,	{0x55, 0x83, 0xa3, 0xe0, 0xff, 0x90, 0x03, 0x37, 0xf0, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0} },
+{ 0x99d9,	16,	{0x90, 0x03, 0x36, 0xf0, 0x90, 0x03, 0x38, 0x74, 0xff, 0xf0, 0x75, 0x57, 0x03, 0x75, 0x58, 0x39} },
+{ 0x99e9,	16,	{0xef, 0x14, 0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9e, 0x5d, 0x90, 0x99, 0xfa, 0xf8, 0x28, 0x28} },
+{ 0x99f9,	16,	{0x73, 0x02, 0x9a, 0x1b, 0x02, 0x9a, 0xba, 0x02, 0x9b, 0xbf, 0x02, 0x9b, 0xde, 0x02, 0x9b, 0xde} },
+{ 0x9a09,	16,	{0x02, 0x9c, 0x94, 0x02, 0x9c, 0xcf, 0x02, 0x9c, 0xf4, 0x02, 0x9d, 0xb2, 0x02, 0x9d, 0xe2, 0x02} },
+{ 0x9a19,	16,	{0x9e, 0x0e, 0xe4, 0xf5, 0x4e, 0xe5, 0x4e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4} },
+{ 0x9a29,	16,	{0x34, 0x20, 0xaf, 0x82, 0xf5, 0x53, 0x8f, 0x54, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74} },
+{ 0x9a39,	16,	{0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4f, 0x80, 0x0d, 0x74} },
+{ 0x9a49,	16,	{0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4f, 0xe5, 0x54, 0x24, 0x07} },
+{ 0x9a59,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x53, 0xf5, 0x83, 0xe5, 0x4f, 0xf0, 0xe0, 0xf5, 0x50, 0x65, 0x4f, 0x60} },
+{ 0x9a69,	16,	{0x38, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xfd, 0x05, 0x58, 0xe5, 0x58, 0xaa, 0x57} },
+{ 0x9a79,	16,	{0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x58, 0xe5, 0x58, 0xac} },
+{ 0x9a89,	16,	{0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4f, 0xf0, 0x85, 0x58, 0x82} },
+{ 0x9a99,	16,	{0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x63, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64} },
+{ 0x9aa9,	16,	{0x02, 0x70, 0x87, 0x05, 0x4e, 0xe5, 0x4e, 0x64, 0x04, 0x60, 0x03, 0x02, 0x9a, 0x1e, 0x02, 0x9e} },
+{ 0x9ab9,	16,	{0x63, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0x05, 0x4e, 0xe5, 0x4e, 0xd3} },
+{ 0x9ac9,	16,	{0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x98, 0xf0, 0xa3, 0x74, 0xe7, 0xf0, 0xe4, 0xf5} },
+{ 0x9ad9,	16,	{0x50, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75, 0x54, 0x00, 0xf5, 0x4e, 0xaf, 0x4e, 0x74} },
+{ 0x9ae9,	16,	{0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4f, 0x90, 0x01, 0xc4, 0xf0} },
+{ 0x9af9,	16,	{0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xa3} },
+{ 0x9b09,	16,	{0x74, 0x02, 0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4f, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02} },
+{ 0x9b19,	16,	{0xa3, 0xe0, 0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xff, 0x05, 0x58, 0xe5, 0x58} },
+{ 0x9b29,	16,	{0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x58, 0x82} },
+{ 0x9b39,	16,	{0x85, 0x57, 0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x50, 0xff, 0x90, 0x01} },
+{ 0x9b49,	16,	{0xc4, 0xe0, 0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xfe, 0x05, 0x58} },
+{ 0x9b59,	16,	{0xe5, 0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05} },
+{ 0x9b69,	16,	{0x58, 0xe5, 0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x9b79,	16,	{0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe5, 0x4f, 0xf0, 0x75, 0x50, 0xff, 0xe5, 0x50, 0x70, 0x16} },
+{ 0x9b89,	16,	{0x74, 0x08, 0x25, 0x54, 0xf5, 0x54, 0xe4, 0x35, 0x53, 0xf5, 0x53, 0x05, 0x4e, 0xe5, 0x4e, 0x64} },
+{ 0x9b99,	16,	{0x04, 0x60, 0x03, 0x02, 0x9a, 0xe6, 0xe4, 0xf5, 0x4e, 0xaf, 0x4e, 0x7d, 0x01, 0x12, 0x83, 0x5a} },
+{ 0x9ba9,	16,	{0x05, 0x4e, 0xe5, 0x4e, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3} },
+{ 0x9bb9,	16,	{0x74, 0x12, 0xf0, 0x02, 0x9e, 0x63, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0, 0x14, 0xff, 0x74} },
+{ 0x9bc9,	16,	{0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01} },
+{ 0x9bd9,	16,	{0xc4, 0xf0, 0x02, 0x9e, 0x63, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4} },
+{ 0x9be9,	16,	{0xf5, 0x50, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01} },
+{ 0x9bf9,	16,	{0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x58, 0x82, 0x85} },
+{ 0x9c09,	16,	{0x57, 0x83, 0x74, 0xff, 0xf0, 0xf5, 0x50, 0xe5, 0x50, 0x60, 0x03, 0x02, 0x9e, 0x63, 0x90, 0x01} },
+{ 0x9c19,	16,	{0xc0, 0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6} },
+{ 0x9c29,	16,	{0xe5, 0x33, 0xc3, 0x94, 0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x51, 0x00} },
+{ 0x9c39,	16,	{0xf5, 0x52, 0x80, 0x09, 0x7f, 0x02, 0x12, 0x11, 0x27, 0x8e, 0x51, 0x8f, 0x52, 0xc3, 0xe5, 0x51} },
+{ 0x9c49,	16,	{0x64, 0x80, 0x94, 0x80, 0x40, 0xda, 0xe5, 0x52, 0x54, 0x0f, 0xf5, 0x50, 0x90, 0x02, 0xf7, 0xe0} },
+{ 0x9c59,	16,	{0x55, 0x50, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4f, 0x85, 0x56, 0x82, 0x85} },
+{ 0x9c69,	16,	{0x55, 0x83, 0xa3, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4f, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
+{ 0x9c79,	16,	{0x00, 0x8f, 0x4f, 0xe5, 0x4f, 0x70, 0x03, 0x02, 0x9e, 0x63, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x85} },
+{ 0x9c89,	16,	{0x58, 0x82, 0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x63, 0xe4, 0xff, 0xfd, 0x12, 0x83} },
+{ 0x9c99,	16,	{0x5a, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75, 0x54, 0x00, 0x85, 0x54, 0x82, 0x85, 0x53} },
+{ 0x9ca9,	16,	{0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0x74, 0x01} },
+{ 0x9cb9,	16,	{0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f} },
+{ 0x9cc9,	16,	{0xf0, 0xd2, 0x04, 0x02, 0x9e, 0x63, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x53, 0x20, 0x75} },
+{ 0x9cd9,	16,	{0x54, 0x00, 0xe5, 0x54, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x53, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
+{ 0x9ce9,	16,	{0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x83, 0x5a, 0x02, 0x9e, 0x63, 0xe4, 0xf5, 0x50, 0xf5, 0x4e} },
+{ 0x9cf9,	16,	{0xaf, 0x4e, 0xe4, 0xfd, 0x12, 0x83, 0x5a, 0xe5, 0x4e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5} },
+{ 0x9d09,	16,	{0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x53, 0x8f, 0x54, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04} },
+{ 0x9d19,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x4e, 0x7d, 0x01, 0x7b} },
+{ 0x9d29,	16,	{0x01, 0x75, 0x5c, 0x80, 0x75, 0x5d, 0x40, 0x12, 0x99, 0x35, 0x8f, 0x50, 0xe5, 0x50, 0x70, 0x11} },
+{ 0x9d39,	16,	{0xaf, 0x4e, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x5c, 0x10, 0x75, 0x5d, 0x20, 0x12, 0x99, 0x35, 0x8f} },
+{ 0x9d49,	16,	{0x50, 0xe5, 0x50, 0x70, 0x10, 0xaf, 0x4e, 0x7d, 0x01, 0xfb, 0x75, 0x5c, 0x80, 0x75, 0x5d, 0x40} },
+{ 0x9d59,	16,	{0x12, 0x99, 0x35, 0x8f, 0x50, 0xe5, 0x50, 0x70, 0x10, 0xaf, 0x4e, 0x7d, 0x02, 0xfb, 0x75, 0x5c} },
+{ 0x9d69,	16,	{0x10, 0x75, 0x5d, 0x20, 0x12, 0x99, 0x35, 0x8f, 0x50, 0xaf, 0x4e, 0x7d, 0x01, 0x12, 0x83, 0x5a} },
+{ 0x9d79,	16,	{0xe5, 0x50, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4e, 0x04, 0xff, 0x05, 0x58, 0xe5} },
+{ 0x9d89,	16,	{0x58, 0xac, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x58} },
+{ 0x9d99,	16,	{0x82, 0x85, 0x57, 0x83, 0xe5, 0x50, 0xf0, 0x02, 0x9e, 0x63, 0x05, 0x4e, 0xe5, 0x4e, 0xd3, 0x94} },
+{ 0x9da9,	16,	{0x03, 0x50, 0x03, 0x02, 0x9c, 0xf9, 0x02, 0x9e, 0x63, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
+{ 0x9db9,	16,	{0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x9e, 0xf0, 0xa3, 0x74} },
+{ 0x9dc9,	16,	{0x85, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x81, 0xd9, 0xef, 0x64, 0x08, 0x70, 0x03, 0x02, 0x9e} },
+{ 0x9dd9,	16,	{0x63, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9e, 0x63, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
+{ 0x9de9,	16,	{0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x57, 0xf0, 0xa3, 0xe5} },
+{ 0x9df9,	16,	{0x58, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x5c, 0xe4, 0x90} },
+{ 0x9e09,	16,	{0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x56, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x55, 0xfa, 0xa9, 0x07} },
+{ 0x9e19,	16,	{0x7b, 0x01, 0x7d, 0x10, 0x12, 0x98, 0x98, 0xef, 0x4e, 0x70, 0x32, 0x90, 0x03, 0x59, 0xf0, 0xa3} },
+{ 0x9e29,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x56, 0x24, 0x02, 0x90} },
+{ 0x9e39,	16,	{0x03, 0x60, 0xf0, 0xe4, 0x35, 0x55, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x81} },
+{ 0x9e49,	16,	{0xd9, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x0d, 0xe4, 0x90, 0x03} },
+{ 0x9e59,	16,	{0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3} },
+{ 0x9e69,	16,	{0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7e, 0x03, 0x7f} },
+{ 0x9e79,	11,	{0x35, 0x7d, 0x24, 0x12, 0x91, 0x6a, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
+{ 0x9e84,	1,	{0x22} },
+{ 0x9e85,	16,	{0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} },
+{ 0x9e95,	16,	{0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} },
+{ 0x9ea5,	16,	{0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} },
+{ 0x9eb5,	16,	{0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} },
+{ 0x9ec5,	16,	{0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} },
+{ 0x9ed5,	16,	{0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} },
+{ 0x9ee5,	16,	{0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} },
+{ 0x9ef5,	16,	{0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} },
+{ 0x9f05,	16,	{0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} },
+{ 0x9f15,	16,	{0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} },
+{ 0x9f25,	16,	{0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} },
+{ 0x9f35,	16,	{0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} },
+{ 0x9f45,	16,	{0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} },
+{ 0x9f55,	16,	{0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} },
+{ 0x9f65,	16,	{0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} },
+{ 0x9f75,	16,	{0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} },
+{ 0x9f85,	16,	{0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} },
+{ 0x9f95,	16,	{0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} },
+{ 0x9fa5,	16,	{0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} },
+{ 0x9fb5,	16,	{0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} },
+{ 0x9fc5,	16,	{0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} },
+{ 0x9fd5,	16,	{0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} },
+{ 0x9fe5,	16,	{0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} },
+{ 0x9ff5,	16,	{0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} },
+{ 0xa005,	16,	{0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} },
+{ 0xa015,	16,	{0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} },
+{ 0xa025,	16,	{0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} },
+{ 0xa035,	16,	{0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} },
+{ 0xa045,	16,	{0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} },
+{ 0xa055,	16,	{0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} },
+{ 0xa065,	16,	{0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} },
+{ 0xa075,	16,	{0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} },
+{ 0xa085,	16,	{0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} },
+{ 0xa095,	16,	{0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
+{ 0xa0a5,	16,	{0xa1, 0x38, 0x74, 0x3a, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0xa1, 0x38, 0xef, 0x75, 0xf0} },
+{ 0xa0b5,	16,	{0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
+{ 0xa0c5,	16,	{0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
+{ 0xa0d5,	16,	{0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
+{ 0xa0e5,	16,	{0x12, 0xa2, 0x97, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
+{ 0xa0f5,	16,	{0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
+{ 0xa105,	16,	{0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
+{ 0xa115,	16,	{0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
+{ 0xa125,	16,	{0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
+{ 0xa135,	12,	{0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0xa0, 0x97} },
+{ 0xa141,	1,	{0x22} },
+{ 0xa142,	16,	{0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
+{ 0xa152,	16,	{0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
+{ 0xa162,	16,	{0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
+{ 0xa172,	16,	{0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
+{ 0xa182,	16,	{0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
+{ 0xa192,	16,	{0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
+{ 0xa1a2,	16,	{0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
+{ 0xa1b2,	16,	{0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
+{ 0xa1c2,	16,	{0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
+{ 0xa1d2,	16,	{0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
+{ 0xa1e2,	16,	{0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
+{ 0xa1f2,	16,	{0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
+{ 0xa202,	16,	{0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
+{ 0xa212,	16,	{0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
+{ 0xa222,	16,	{0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
+{ 0xa232,	9,	{0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0xa1, 0x92, 0x73} },
+{ 0xa23b,	16,	{0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0xa24b,	9,	{0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0xa254,	16,	{0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0xa264,	16,	{0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0xa274,	13,	{0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0xa281,	16,	{0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
+{ 0xa291,	6,	{0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
+{ 0xa297,	16,	{0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
+{ 0xa2a7,	6,	{0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
+{ 0xa2ad,	16,	{0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0xa2bd,	16,	{0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0xa2cd,	16,	{0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0xa2dd,	8,	{0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0xa2e5,	16,	{0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
+{ 0xa2f5,	16,	{0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
+{ 0xa305,	16,	{0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
+{ 0xa315,	16,	{0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
+{ 0xa325,	16,	{0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
+{ 0xa335,	16,	{0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
+{ 0xa345,	16,	{0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
+{ 0xa355,	16,	{0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
+{ 0xa365,	16,	{0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
+{ 0xa375,	16,	{0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
+{ 0xa385,	16,	{0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
+{ 0xa395,	16,	{0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
+{ 0xa3a5,	14,	{0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
+{ 0xa3b3,	16,	{0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0xa3c3,	1,	{0x22} },
+{ 0xa3c4,	16,	{0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
+{ 0xa3d4,	3,	{0xd8, 0xf1, 0x22} },
+{ 0xa3d7,	16,	{0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
+{ 0xa3e7,	7,	{0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
+{ 0xa3ee,	12,	{0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0xa3fa,	16,	{0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa4, 0x11, 0x12, 0xa4, 0x11, 0x12} },
+{ 0xa40a,	16,	{0xa4, 0x11, 0x12, 0xa4, 0x11, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
+{ 0xa41a,	16,	{0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
+{ 0xa42a,	1,	{0x22} },
 { 0xffff,	0,	{0x00} }
 };
 
diff -Nru a/drivers/usb/storage/Config.help b/drivers/usb/storage/Config.help
--- a/drivers/usb/storage/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,57 +0,0 @@
-CONFIG_USB_STORAGE
-  Say Y here if you want to connect USB mass storage devices to your
-  computer's USB port. This is the driver you need for USB floppy drives,
-  USB hard disks, USB tape drives and USB CD-ROMs, along with
-  similar devices. This driver may also be used for some cameras and
-  card readers.
-
-  This code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called usb-storage.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_USB_STORAGE_DEBUG
-  Say Y here in order to have the USB Mass Storage code generate
-  verbose debugging messages.
-
-CONFIG_USB_STORAGE_ISD200
-  Say Y here if you want to use USB Mass Store devices based
-  on the In-Systems Design ISD-200 USB/ATA bridge.
-
-  Some of the products that use this chip are:
-
-    - Archos Jukebox 6000
-    - ISD SmartCable for Storage
-    - Taiwan Skymaster CD530U/DEL-0241 IDE bridge
-    - Sony CRX10U CD-R/RW drive
-    - CyQ've CQ8060A CDRW drive
-    - Planex eXtreme Drive RX-25HU USB-IDE cable (not model RX-25U)
-
-CONFIG_USB_STORAGE_FREECOM
-  Support for the Freecom USB to IDE/ATAPI adaptor.
-  Freecom has a web page at <http://www.freecom.de/>.
-
-CONFIG_USB_STORAGE_DATAFAB
-  Support for certain Datafab CompactFlash readers.
-  Datafab has a web page at <http://www.datafabusa.com/>.
-
-CONFIG_USB_STORAGE_DPCM
-  Say Y here to support the Microtech ZiO! CompactFlash reader.
-  There is a web page at <http://www.microtechint.com/zio/index.html>.
-
-CONFIG_USB_STORAGE_SDDR09
-  Say Y here to include additional code to support the Sandisk SDDR-09
-  SmartMedia reader in the USB Mass Storage driver.
-  Also works for the Microtech Zio! SmartMedia reader.
-
-CONFIG_USB_STORAGE_SDDR55
-  Say Y here to include additional code to support the Sandisk SDDR-55
-  SmartMedia reader in the USB Mass Storage driver.
-
-CONFIG_USB_STORAGE_HP8200e
-  Say Y here to include additional code to support Hewlett-Packard
-  8200e/8210e/8230e CD-Writer Plus drives.
-
-CONFIG_USB_STORAGE_JUMPSHOT
-  Say Y here to include additional code to support the Lexar Jumpshot
-  USB CompactFlash reader.
diff -Nru a/drivers/usb/storage/Config.in b/drivers/usb/storage/Config.in
--- a/drivers/usb/storage/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,16 +0,0 @@
-#
-# USB Storage driver configuration
-#
-if [ "$CONFIG_SCSI" = "n" ]; then
-   comment '  SCSI support is needed for USB Storage'
-fi
-dep_tristate '  USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
-   dep_mbool '    USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
-   dep_mbool '    Datafab Compact Flash Reader support (EXPERIMENTAL)' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
-   dep_mbool '    Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM  $CONFIG_USB_STORAGE
-   dep_mbool '    ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
-   dep_mbool '    Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
-   dep_mbool '    HP CD-Writer 82xx support (EXPERIMENTAL)' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
-   dep_mbool '    SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
-   dep_mbool '    SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)' CONFIG_USB_STORAGE_SDDR55 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
-   dep_mbool '    Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
diff -Nru a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/storage/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,94 @@
+#
+# USB Storage driver configuration
+#
+comment "SCSI support is needed for USB Storage"
+	depends on USB && SCSI=n
+
+config USB_STORAGE
+	tristate "USB Mass Storage support"
+	depends on USB && SCSI
+	---help---
+	  Say Y here if you want to connect USB mass storage devices to your
+	  computer's USB port. This is the driver you need for USB floppy drives,
+	  USB hard disks, USB tape drives and USB CD-ROMs, along with
+	  similar devices. This driver may also be used for some cameras and
+	  card readers.
+
+	  This code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module will be called usb-storage.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+config USB_STORAGE_DEBUG
+	bool "USB Mass Storage verbose debug"
+	depends on USB_STORAGE
+	help
+	  Say Y here in order to have the USB Mass Storage code generate
+	  verbose debugging messages.
+
+config USB_STORAGE_DATAFAB
+	bool "Datafab Compact Flash Reader support (EXPERIMENTAL)"
+	depends on USB_STORAGE && EXPERIMENTAL
+	help
+	  Support for certain Datafab CompactFlash readers.
+	  Datafab has a web page at <http://www.datafabusa.com/>.
+
+config USB_STORAGE_FREECOM
+	bool "Freecom USB/ATAPI Bridge support"
+	depends on USB_STORAGE
+	help
+	  Support for the Freecom USB to IDE/ATAPI adaptor.
+	  Freecom has a web page at <http://www.freecom.de/>.
+
+config USB_STORAGE_ISD200
+	bool "ISD-200 USB/ATA Bridge support"
+	depends on USB_STORAGE
+	---help---
+	  Say Y here if you want to use USB Mass Store devices based
+	  on the In-Systems Design ISD-200 USB/ATA bridge.
+
+	  Some of the products that use this chip are:
+
+	  - Archos Jukebox 6000
+	  - ISD SmartCable for Storage
+	  - Taiwan Skymaster CD530U/DEL-0241 IDE bridge
+	  - Sony CRX10U CD-R/RW drive
+	  - CyQ've CQ8060A CDRW drive
+	  - Planex eXtreme Drive RX-25HU USB-IDE cable (not model RX-25U)
+
+config USB_STORAGE_DPCM
+	bool "Microtech CompactFlash/SmartMedia support"
+	depends on USB_STORAGE
+	help
+	  Say Y here to support the Microtech ZiO! CompactFlash reader.
+	  There is a web page at <http://www.microtechint.com/zio/index.html>.
+
+config USB_STORAGE_HP8200e
+	bool "HP CD-Writer 82xx support (EXPERIMENTAL)"
+	depends on USB_STORAGE && EXPERIMENTAL
+	help
+	  Say Y here to include additional code to support Hewlett-Packard
+	  8200e/8210e/8230e CD-Writer Plus drives.
+
+config USB_STORAGE_SDDR09
+	bool "SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)"
+	depends on USB_STORAGE && EXPERIMENTAL
+	help
+	  Say Y here to include additional code to support the Sandisk SDDR-09
+	  SmartMedia reader in the USB Mass Storage driver.
+	  Also works for the Microtech Zio! SmartMedia reader.
+
+config USB_STORAGE_SDDR55
+	bool "SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)"
+	depends on USB_STORAGE && EXPERIMENTAL
+	help
+	  Say Y here to include additional code to support the Sandisk SDDR-55
+	  SmartMedia reader in the USB Mass Storage driver.
+
+config USB_STORAGE_JUMPSHOT
+	bool "Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)"
+	depends on USB_STORAGE && EXPERIMENTAL
+	help
+	  Say Y here to include additional code to support the Lexar Jumpshot
+	  USB CompactFlash reader.
+
diff -Nru a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/storage/scsiglue.c	Wed Oct 30 16:44:28 2002
@@ -249,7 +249,7 @@
 	/* FIXME: This needs to lock out driver probing while it's working
 	 * or we can have race conditions */
 	/* This functionality really should be provided by the khubd thread */
-	for (i = 0; i < pusb_dev_save->actconfig->bNumInterfaces; i++) {
+	for (i = 0; i < pusb_dev_save->actconfig->desc.bNumInterfaces; i++) {
  		struct usb_interface *intf =
 			&pusb_dev_save->actconfig->interface[i];
 
diff -Nru a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
--- a/drivers/usb/storage/shuttle_usbat.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/usb/storage/shuttle_usbat.c	Wed Oct 30 16:44:17 2002
@@ -759,7 +759,7 @@
 
 	US_DEBUGP("INIT 15\n");
 
-	return USB_STOR_TRANSPORT_ERROR;
+	return USB_STOR_TRANSPORT_GOOD;
 }
 
 /*
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/storage/transport.c	Wed Oct 30 16:44:27 2002
@@ -381,7 +381,7 @@
  * before the submission or before setting the CAN_CANCEL bit.  If so, it's
  * essential to abort the URB if it hasn't been cancelled already (i.e.,
  * if the CAN_CANCEL bit is still set).  Either way, the function must then
- * wait for the URB to finish.  Note that because the USB_ASYNC_UNLINK flag
+ * wait for the URB to finish.  Note that because the URB_ASYNC_UNLINK flag
  * is set, the URB can still be in progress even after a call to
  * usb_unlink_urb() returns.
  *
@@ -426,7 +426,7 @@
 	us->current_urb->context = &urb_done;
 	us->current_urb->actual_length = 0;
 	us->current_urb->error_count = 0;
-	us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
+	us->current_urb->transfer_flags = URB_ASYNC_UNLINK;
 
 	/* submit the URB */
 	status = usb_submit_urb(us->current_urb, GFP_NOIO);
@@ -474,7 +474,7 @@
 	us->dr->wLength = cpu_to_le16(size);
 
 	/* fill and submit the URB */
-	FILL_CONTROL_URB(us->current_urb, us->pusb_dev, pipe, 
+	usb_fill_control_urb(us->current_urb, us->pusb_dev, pipe, 
 			 (unsigned char*) us->dr, data, size, 
 			 usb_stor_blocking_completion, NULL);
 	status = usb_stor_msg_common(us);
@@ -494,7 +494,7 @@
 	int status;
 
 	/* fill and submit the URB */
-	FILL_BULK_URB(us->current_urb, us->pusb_dev, pipe, data, len,
+	usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, data, len,
 		      usb_stor_blocking_completion, NULL);
 	status = usb_stor_msg_common(us);
 
@@ -518,7 +518,10 @@
 int usb_stor_clear_halt(struct us_data *us, unsigned int pipe)
 {
 	int result;
-	int endp = usb_pipeendpoint(pipe) | (usb_pipein(pipe) << 7);
+	int endp = usb_pipeendpoint(pipe);
+
+	if (usb_pipein (pipe))
+		endp |= USB_DIR_IN;
 
 	result = usb_stor_control_msg(us, us->send_ctrl_pipe,
 		USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0,
@@ -652,43 +655,107 @@
 }
 
 /*
+ * Transfer a scatter-gather list via bulk transfer
+ *
+ * This function does basically the same thing as usb_stor_bulk_transfer_buf()
+ * above, but it uses the usbcore scatter-gather primitives
+ */
+int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
+		struct scatterlist *sg, int num_sg, unsigned int length,
+		unsigned int *act_len)
+{
+	int result;
+	int partial;
+
+	/* initialize the scatter-gather request block */
+	US_DEBUGP("usb_stor_bulk_transfer_sglist(): xfer %d bytes, "
+			"%d entires\n", length, num_sg);
+	result = usb_sg_init(us->current_sg, us->pusb_dev, pipe, 0,
+			sg, num_sg, length, SLAB_NOIO);
+	if (result) {
+		US_DEBUGP("usb_sg_init returned %d\n", result);
+		return USB_STOR_XFER_ERROR;
+	}
+
+	/* since the block has been initialized successfully, it's now
+	 * okay to cancel it */
+	set_bit(US_FLIDX_CANCEL_SG, &us->flags);
+
+	/* has the current command been aborted? */
+	if (atomic_read(&us->sm_state) == US_STATE_ABORTING) {
+
+		/* cancel the request, if it hasn't been cancelled already */
+		if (test_and_clear_bit(US_FLIDX_CANCEL_SG, &us->flags)) {
+			US_DEBUGP("-- cancelling sg request\n");
+			usb_sg_cancel(us->current_sg);
+		}
+	}
+
+	usb_sg_wait(us->current_sg);
+	clear_bit(US_FLIDX_CANCEL_SG, &us->flags);
+
+	result = us->current_sg->status;
+	partial = us->current_sg->bytes;
+	US_DEBUGP("usb_sg_wait() returned %d xferrerd %d/%d\n",
+			result, partial, length);
+	if (act_len)
+		*act_len = partial;
+
+	/* if we stall, we need to clear it before we go on */
+	if (result == -EPIPE) {
+		US_DEBUGP("clearing endpoint halt for pipe 0x%x,"
+				"stalled at %d bytes\n", pipe, partial);
+		if (usb_stor_clear_halt(us, pipe) < 0)
+			return USB_STOR_XFER_ERROR;
+		return USB_STOR_XFER_STALLED;
+	}
+
+	/* NAK - that means we've tried this a few times already */
+	if (result == -ETIMEDOUT) {
+		US_DEBUGP("-- device NAKed\n");
+		return USB_STOR_XFER_ERROR;
+	}
+
+	/* the catch-all error case */
+	if (result) {
+		US_DEBUGP("-- unknown error\n");
+		return USB_STOR_XFER_ERROR;
+	}
+
+	/* did we send all the data? */
+	if (partial == length) {
+		US_DEBUGP("-- transfer complete\n");
+		return USB_STOR_XFER_GOOD;
+	}
+
+	/* no error code, so we must have transferred some data,
+	 * just not all of it */
+	US_DEBUGP("-- transferred only %d bytes\n", partial);
+	return USB_STOR_XFER_SHORT;
+}
+
+/*
  * Transfer an entire SCSI command's worth of data payload over the bulk
  * pipe.
  *
- * Note that this uses usb_stor_bulk_transfer_buf to achieve its goals --
- * this function simply determines if we're going to use scatter-gather or not,
- * and acts appropriately.
+ * Nore that this uses the usb_stor_bulk_transfer_buf() and
+ * usb_stor_bulk_transfer_sglist() to achieve its goals --
+ * this function simply determines whether we're going to use
+ * scatter-gather or not, and acts apropriately.
  */
 int usb_stor_bulk_transfer_sg(struct us_data* us, unsigned int pipe,
 		char *buf, unsigned int length_left, int use_sg, int *residual)
 {
-	int i;
-	int result = USB_STOR_XFER_ERROR;
-	struct scatterlist *sg;
-	unsigned int amount;
+	int result;
 	unsigned int partial;
 
 	/* are we scatter-gathering? */
 	if (use_sg) {
-
-		/* loop over all the scatter gather structures and 
-		 * make the appropriate requests for each, until done
-		 */
-		sg = (struct scatterlist *) buf;
-		for (i = 0; (i < use_sg) && (length_left > 0); (i++, ++sg)) {
-
-			/* transfer the lesser of the next buffer or the
-			 * remaining data */
-			amount = sg->length < length_left ?
-					sg->length : length_left;
-			result = usb_stor_bulk_transfer_buf(us, pipe,
-					sg_address(*sg), amount, &partial);
-			length_left -= partial;
-
-			/* if we get an error, end the loop here */
-			if (result != USB_STOR_XFER_GOOD)
-				break;
-		}
+		/* use the usb core scatter-gather primitives */
+		result = usb_stor_bulk_transfer_sglist(us, pipe,
+				(struct scatterlist *) buf, use_sg,
+				length_left, &partial);
+		length_left -= partial;
 	} else {
 		/* no scatter-gather, just make the request */
 		result = usb_stor_bulk_transfer_buf(us, pipe, buf, 
@@ -923,6 +990,12 @@
 		usb_unlink_urb(us->current_urb);
 	}
 
+	/* If we are waiting for a scatter-gather operation, cancel it. */
+	if (test_and_clear_bit(US_FLIDX_CANCEL_SG, &us->flags)) {
+		US_DEBUGP("-- cancelling sg request\n");
+		usb_sg_cancel(us->current_sg);
+	}
+
 	/* If we are waiting for an IRQ, simulate it */
 	if (test_bit(US_FLIDX_IP_WANTED, &us->flags)) {
 		US_DEBUGP("-- simulating missing IRQ\n");
@@ -944,6 +1017,7 @@
 void usb_stor_CBI_irq(struct urb *urb)
 {
 	struct us_data *us = (struct us_data *)urb->context;
+	int status;
 
 	US_DEBUGP("USB IRQ received for device on host %d\n", us->host_no);
 	US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length);
@@ -957,13 +1031,13 @@
 		/* was this a wanted interrupt? */
 		if (!test_and_clear_bit(US_FLIDX_IP_WANTED, &us->flags)) {
 			US_DEBUGP("ERROR: Unwanted interrupt received!\n");
-			return;
+			goto exit;
 		}
 		US_DEBUGP("-- command aborted\n");
 
 		/* wake up the command thread */
 		up(&us->ip_waitq);
-		return;
+		goto exit;
 	}
 
 	/* is the device removed? */
@@ -985,19 +1059,19 @@
 	/* reject improper IRQs */
 	if (urb->actual_length != 2) {
 		US_DEBUGP("-- IRQ too short\n");
-		return;
+		goto exit;
 	}
 
 	/* was this a command-completion interrupt? */
 	if (us->irqbuf[0] && (us->subclass != US_SC_UFI)) {
 		US_DEBUGP("-- not a command-completion IRQ\n");
-		return;
+		goto exit;
 	}
 
 	/* was this a wanted interrupt? */
 	if (!test_and_clear_bit(US_FLIDX_IP_WANTED, &us->flags)) {
 		US_DEBUGP("ERROR: Unwanted interrupt received!\n");
-		return;
+		goto exit;
 	}
 		
 	/* copy the valid data */
@@ -1006,6 +1080,13 @@
 
 	/* wake up the command thread */
 	up(&(us->ip_waitq));
+
+exit:
+	/* resubmit the urb */
+	status = usb_submit_urb (urb, GFP_ATOMIC);
+	if (status)
+		err ("%s - usb_submit_urb failed with result %d",
+		     __FUNCTION__, status);
 }
 
 int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us)
diff -Nru a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
--- a/drivers/usb/storage/transport.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/usb/storage/transport.h	Wed Oct 30 16:44:27 2002
@@ -164,6 +164,9 @@
 		void *data, u16 size);
 extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
 		char *buf, unsigned int length, unsigned int *act_len);
+extern int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
+		struct scatterlist *sg, int num_sg, unsigned int length,
+		unsigned int *act_len);
 extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
 		char *buf, unsigned int length, int use_sg, int *residual);
 
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/usb/storage/usb.c	Wed Oct 30 16:44:26 2002
@@ -547,6 +547,13 @@
 		return 2;
 	}
 
+	US_DEBUGP("Allocating scatter-gather request block\n");
+	ss->current_sg = kmalloc(sizeof(*ss->current_sg), GFP_KERNEL);
+	if (!ss->current_sg) {
+		US_DEBUGP("allocation failed\n");
+		return 5;
+	}
+
 	/* allocate the IRQ URB, if it is needed */
 	if (ss->protocol == US_PR_CBI) {
 		US_DEBUGP("Allocating IRQ for CBI transport\n");
@@ -570,7 +577,7 @@
 			maxp = sizeof(ss->irqbuf);
 
 		/* fill in the URB with our data */
-		FILL_INT_URB(ss->irq_urb, ss->pusb_dev, pipe, ss->irqbuf,
+		usb_fill_int_urb(ss->irq_urb, ss->pusb_dev, pipe, ss->irqbuf,
 			maxp, usb_stor_CBI_irq, ss, ss->ep_int->bInterval); 
 
 		/* submit the URB for processing */
@@ -607,6 +614,12 @@
 	}
 	up(&(ss->irq_urb_sem));
 
+	/* free the scatter-gather request block */
+	if (ss->current_sg) {
+		kfree(ss->current_sg);
+		ss->current_sg = NULL;
+	}
+
 	/* free up the main URB for this device */
 	if (ss->current_urb) {
 		US_DEBUGP("-- releasing main URB\n");
@@ -633,7 +646,7 @@
 			 const struct usb_device_id *id)
 {
 	struct usb_device *dev = interface_to_usbdev(intf);
-	int ifnum = intf->altsetting->bInterfaceNumber;
+	int ifnum = intf->altsetting->desc.bInterfaceNumber;
 	int i;
 	const int id_index = id - storage_usb_ids; 
 	char mf[USB_STOR_STRING_LEN];		     /* manufacturer */
@@ -658,7 +671,7 @@
 	/* the altsetting on the interface we're probing that matched our
 	 * usb_match_id table
 	 */
-	struct usb_interface_descriptor *altsetting =
+	struct usb_host_interface *altsetting =
 		intf[ifnum].altsetting + intf[ifnum].act_altsetting;
 	US_DEBUGP("act_altsetting is %d\n", intf[ifnum].act_altsetting);
 
@@ -703,22 +716,25 @@
 	 * An optional interrupt is OK (necessary for CBI protocol).
 	 * We will ignore any others.
 	 */
-	for (i = 0; i < altsetting->bNumEndpoints; i++) {
+	for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
+		struct usb_endpoint_descriptor *ep;
+
+		ep = &altsetting->endpoint[i].desc;
+
 		/* is it an BULK endpoint? */
-		if ((altsetting->endpoint[i].bmAttributes & 
-		     USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
+		if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+				== USB_ENDPOINT_XFER_BULK) {
 			/* BULK in or out? */
-			if (altsetting->endpoint[i].bEndpointAddress & 
-			    USB_DIR_IN)
-				ep_in = &altsetting->endpoint[i];
+			if (ep->bEndpointAddress & USB_DIR_IN)
+				ep_in = ep;
 			else
-				ep_out = &altsetting->endpoint[i];
+				ep_out = ep;
 		}
 
 		/* is it an interrupt endpoint? */
-		if ((altsetting->endpoint[i].bmAttributes & 
-		     USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) {
-			ep_int = &altsetting->endpoint[i];
+		else if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+				== USB_ENDPOINT_XFER_INT) {
+			ep_int = ep;
 		}
 	}
 	US_DEBUGP("Endpoints: In: 0x%p Out: 0x%p Int: 0x%p (Period %d)\n",
diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
--- a/drivers/usb/storage/usb.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/usb/storage/usb.h	Wed Oct 30 16:44:29 2002
@@ -107,6 +107,7 @@
 #define US_FL_DEV_ATTACHED    0x00010000 /* is the device attached?	    */
 #define US_FLIDX_IP_WANTED   17  /* 0x00020000	is an IRQ expected?	    */
 #define US_FLIDX_CAN_CANCEL  18  /* 0x00040000  okay to cancel current_urb? */
+#define US_FLIDX_CANCEL_SG   19  /* 0x00080000	okay to cancel current_sg?  */
 
 
 /* processing state machine states */
@@ -184,6 +185,7 @@
 	/* control and bulk communications data */
 	struct urb		*current_urb;	 /* non-int USB requests */
 	struct usb_ctrlrequest	*dr;		 /* control requests	 */
+	struct usb_sg_request	*current_sg;	 /* scatter-gather USB   */
 
 	/* the semaphore for sleeping the control thread */
 	struct semaphore	sema;		 /* to sleep thread on   */
diff -Nru a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
--- a/drivers/usb/usb-skeleton.c	Wed Oct 30 16:44:28 2002
+++ b/drivers/usb/usb-skeleton.c	Wed Oct 30 16:44:28 2002
@@ -428,7 +428,7 @@
 			     dev->write_urb->transfer_buffer);
 
 	/* set up our urb */
-	FILL_BULK_URB(dev->write_urb, dev->udev, 
+	usb_fill_bulk_urb(dev->write_urb, dev->udev, 
 		      usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr),
 		      dev->write_urb->transfer_buffer, bytes_written,
 		      skel_write_bulk_callback, dev);
@@ -555,7 +555,7 @@
 	/* check out the endpoints */
 	iface_desc = &interface->altsetting[0];
 	for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
-		endpoint = &iface_desc->endpoint[i];
+		endpoint = &iface_desc->endpoint[i].desc;
 
 		if ((endpoint->bEndpointAddress & 0x80) &&
 		    ((endpoint->bmAttributes & 3) == 0x02)) {
@@ -587,7 +587,7 @@
 				err("Couldn't allocate bulk_out_buffer");
 				goto error;
 			}
-			FILL_BULK_URB(dev->write_urb, udev, 
+			usb_fill_bulk_urb(dev->write_urb, udev, 
 				      usb_sndbulkpipe(udev, 
 						      endpoint->bEndpointAddress),
 				      dev->bulk_out_buffer, buffer_size,
diff -Nru a/drivers/video/Config.help b/drivers/video/Config.help
--- a/drivers/video/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,724 +0,0 @@
-CONFIG_FB_SGIVW
-  SGI Visual Workstation support for framebuffer graphics.
-
-CONFIG_VIDEO_SELECT
-  This enables support for text mode selection on kernel startup. If
-  you want to take advantage of some high-resolution text mode your
-  card's BIOS offers, but the traditional Linux utilities like
-  SVGATextMode don't, you can say Y here and set the mode using the
-  "vga=" option from your boot loader (lilo or loadlin) or set
-  "vga=ask" which brings up a video mode menu on kernel startup. (Try
-  "man bootparam" or see the documentation of your boot loader about
-  how to pass options to the kernel.)
-
-  Read the file <file:Documentation/svga.txt> for more information
-  about the Video mode selection support. If unsure, say N.
-
-CONFIG_FB
-  The frame buffer device provides an abstraction for the graphics
-  hardware. It represents the frame buffer of some video hardware and
-  allows application software to access the graphics hardware through
-  a well-defined interface, so the software doesn't need to know
-  anything about the low-level (hardware register) stuff.
-
-  Frame buffer devices work identically across the different
-  architectures supported by Linux and make the implementation of
-  application programs easier and more portable; at this point, an X
-  server exists which uses the frame buffer device exclusively.
-  On several non-X86 architectures, the frame buffer device is the
-  only way to use the graphics hardware.
-
-  The device is accessed through special device nodes, usually located
-  in the /dev directory, i.e. /dev/fb*.
-
-  You need an utility program called fbset to make full use of frame
-  buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
-  and the Framebuffer-HOWTO at
-  <http://www.tahallah.demon.co.uk/programming/prog.html> for more
-  information.
-
-  Say Y here and to the driver for your graphics board below if you
-  are compiling a kernel for a non-x86 architecture.
-
-  If you are compiling for the x86 architecture, you can say Y if you
-  want to play with it, but it is not essential. Please note that
-  running graphical applications that directly touch the hardware
-  (e.g. an accelerated X server) and that are not frame buffer
-  device-aware may cause unexpected results. If unsure, say N.
-
-CONFIG_FB_ACORN
-  This is the frame buffer device driver for the Acorn VIDC graphics
-  hardware found in Acorn RISC PCs and other ARM-based machines.  If
-  unsure, say N.
-
-CONFIG_FB_PM2
-  This is the frame buffer device driver for the Permedia2 AGP frame
-  buffer card from ASK, aka `Graphic Blaster Exxtreme'.  There is a
-  product page at
-  <http://www.ask.com.hk/product/Permedia%202/permedia2.htm>.
-
-CONFIG_FB_PM2_FIFO_DISCONNECT
-  Support the Permedia2 FIFOI disconnect feature (see CONFIG_FB_PM2).
-
-CONFIG_FB_PM2_PCI
-  Say Y to enable support for Permedia2 AGP frame buffer card from
-  3Dlabs (aka `Graphic Blaster Exxtreme') on the PCI bus.
-
-CONFIG_FB_PM2_CVPPC
-  Say Y to enable support for the Amiga Phase 5 CVisionPPC BVisionPPC
-  framebuffer cards.  Phase 5 is no longer with us, alas.
-
-CONFIG_FB_AMIGA
-  This is the frame buffer device driver for the builtin graphics
-  chipset found in Amigas.
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called amifb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_FB_PM3
-  This is the frame buffer device driver for the 3DLabs Permedia3
-  chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 &
-  similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000
-  and maybe other boards.
-
-CONFIG_FB_AMIGA_OCS
-  This enables support for the original Agnus and Denise video chips,
-  found in the Amiga 1000 and most A500's and A2000's. If you intend
-  to run Linux on any of these systems, say Y; otherwise say N.
-
-CONFIG_FB_AMIGA_ECS
-  This enables support for the Enhanced Chip Set, found in later
-  A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If
-  you intend to run Linux on any of these systems, say Y; otherwise
-  say N.
-
-CONFIG_FB_AMIGA_AGA
-  This enables support for the Advanced Graphics Architecture (also
-  known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T
-  and CD32. If you intend to run Linux on any of these systems, say Y;
-  otherwise say N.
-
-CONFIG_FB_CYBER
-  This enables support for the Cybervision 64 graphics card from
-  Phase5. Please note that its use is not all that intuitive (i.e. if
-  you have any questions, be sure to ask!). Say N unless you have a
-  Cybervision 64 or plan to get one before you next recompile the
-  kernel. Please note that this driver DOES NOT support the
-  Cybervision 64 3D card, as they use incompatible video chips.
-
-CONFIG_FB_CYBER2000
-  This enables support for the Integraphics CyberPro 20x0 and 5000
-  VGA chips used in the Rebel.com Netwinder and other machines.
-  Say Y if you have a NetWinder or a graphics card containing this
-  device, otherwise say N.
-
-CONFIG_FB_VIRGE
-  This enables support for the Cybervision 64/3D graphics card from
-  Phase5. Please note that its use is not all that intuitive (i.e. if
-  you have any questions, be sure to ask!). Say N unless you have a
-  Cybervision 64/3D or plan to get one before you next recompile the
-  kernel. Please note that this driver DOES NOT support the older
-  Cybervision 64 card, as they use incompatible video chips.
-
-CONFIG_FB_RETINAZ3
-  This enables support for the Retina Z3 graphics card. Say N unless
-  you have a Retina Z3 or plan to get one before you next recompile
-  the kernel.
-
-CONFIG_FB_CLGEN
-  This enables support for Cirrus Logic GD542x/543x based boards on
-  Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum.
-
-  If you have a PCI-based system, this enables support for these
-  chips: GD-543x, GD-544x, GD-5480.
-
-  Please read the file <file:Documentation/fb/clgenfb.txt>.
-
-  Say N unless you have such a graphics board or plan to get one
-  before you next recompile the kernel.
-
-CONFIG_FB_ATARI
-  This is the frame buffer device driver for the builtin graphics
-  chipset found in Ataris.
-
-CONFIG_FB_FM2
-  This is the frame buffer device driver for the Amiga FrameMaster
-  card from BSC (exhibited 1992 but not shipped as a CBM product).
-
-CONFIG_FB_OF
-  Say Y if you want support with Open Firmware for your graphics
-  board.
-
-CONFIG_FB_S3TRIO
-  If you have a S3 Trio say Y. Say N for S3 Virge.
-
-CONFIG_FB_3DFX
-  This driver supports graphics boards with the 3Dfx Banshee/Voodoo3
-  chips. Say Y if you have such a graphics board.
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called tdfxfb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_FB_RIVA
-  This driver supports graphics boards with the nVidia Riva/Geforce
-  chips.
-  Say Y if you have such a graphics board.
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called rivafb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_FB_ATY
-  This driver supports graphics boards with the ATI Mach64 chips.
-  Say Y if you have such a graphics board.
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called atyfb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_FB_ATY128
-  This driver supports graphics boards with the ATI Rage128 chips.
-  Say Y if you have such a graphics board and read
-  <file:Documentation/fb/aty128fb.txt>.
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called aty128fb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_FB_MAXINE
-  Say Y here to directly support the on-board framebuffer in the
-  Maxine (5000/20, /25, /33) version of the DECstation.  There is a
-  page dedicated to Linux on DECstations at <http://decstation.unix-ag.org/>.
-
-CONFIG_FB_PMAG_BA
-  Say Y here to directly support the on-board PMAG-BA framebuffer in
-  the 5000/1xx versions of the DECstation.  There is a page dedicated
-  to Linux on DECstations at <http://decstation.unix-ag.org/>.
-
-CONFIG_FB_PMAGB_B
-  Say Y here to directly support the on-board PMAGB-B framebuffer in
-  the 5000/1xx versions of the DECstation.  There is a page dedicated
-  to Linux on DECstations at <http://decstation.unix-ag.org/>.
-
-CONFIG_FB_NEOMAGIC
-  This driver supports notebooks with NeoMagic PCI chips.
-  Say Y if you have such a graphics card. 
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called neofb.o. If you want to compile it as a
-  module, say M here and read Documentation/modules.txt.
-
-CONFIG_FB_CONTROL
-  This driver supports a frame buffer for the graphics adapter in the
-  Power Macintosh 7300 and others.
-
-CONFIG_FB_PLATINUM
-  This driver supports a frame buffer for the "platinum" graphics
-  adapter in some Power Macintoshes.
-
-CONFIG_FB_VALKYRIE
-  This driver supports a frame buffer for the "valkyrie" graphics
-  adapter in some Power Macintoshes.
-
-CONFIG_FB_CT65550
-  This is the frame buffer device driver for the Chips & Technologies
-  65550 graphics chip in PowerBooks.
-
-CONFIG_FB_TGA
-  This is the frame buffer device driver for generic TGA graphic
-  cards. Say Y if you have one of those.
-
-CONFIG_FB_VESA
-  This is the frame buffer device driver for generic VESA 2.0
-  compliant graphic cards. The older VESA 1.2 cards are not supported.
-  You will get a boot time penguin logo at no additional cost. Please
-  read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
-
-CONFIG_FBCON_VGA_PLANES
-  This low level frame buffer console driver enable the kernel to use
-  the 16-color planar modes of the old VGA cards where the bits of
-  each pixel are separated into 4 planes.
-
-  Only answer Y here if you have a (very old) VGA card that isn't VESA
-  2 compatible.
-
-CONFIG_FB_VGA16
-  This is the frame buffer device driver for VGA 16 color graphic
-  cards. Say Y if you have such a card.
-
-  This code is also available as a module. If you want to compile it
-  as a module ( = code which can be inserted in and removed from the
-  running kernel whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called
-  vga16fb.o.
-
-CONFIG_FB_STI
-  STI refers to the HP "Standard Text Interface" which is a set of
-  BIOS routines contained in a ROM chip in HP PA-RISC based machines.
-  Enabling this option will implement the linux framebuffer device and
-  an fbcon color text console using calls to the STI BIOS routines.
-  The HP framebuffer device is usually planar, uses a strange memory
-  layout, and changing the plane mask to create colored pixels
-  requires a call to the STI routines, so do not expect /dev/fb to
-  actually be useful.  However, it is the best we have as far as
-  graphics on the HP chipsets due to lack of hardware level
-  documentation for the various on-board HP chipsets used in these
-  systems.  It is sufficient for basic text console functions,
-  including fonts.
-
-  You should probably enable this option, unless you are having
-  trouble getting video when booting the kernel (make sure it isn't
-  just that you are running the console on the serial port, though).
-  Really old HP boxes may not have STI, and must use the PDC BIOS
-  console or the IODC BIOS.
-
-CONFIG_FBCON_FONTS
-  Say Y here if you would like to use fonts other than the default
-  your frame buffer console usually use.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about foreign fonts.
-
-  If unsure, say N (the default choices are safe).
-
-CONFIG_FONT_8x16
-  This is the "high resolution" font for the VGA frame buffer (the one
-  provided by the VGA text console 80x25 mode.
-
-  If unsure, say Y.
-
-CONFIG_FBCON_FONTWIDTH8_ONLY
-  Answer Y here will make the kernel provide only the 8x8 fonts (these
-  are the less readable).
-
-  If unsure, say N.
-
-CONFIG_FONT_SUN8x16
-  This is the high resolution console font for Sun machines. Say Y.
-
-CONFIG_FONT_SUN12x22
-  This is the high resolution console font for Sun machines with very
-  big letters (like the letters used in the SPARC PROM). If the
-  standard font is unreadable for you, say Y, otherwise say N.
-
-CONFIG_FONT_8x8
-  This is the "high resolution" font for the VGA frame buffer (the one
-  provided by the text console 80x50 (and higher) modes).
-
-  Note that this is a poor quality font. The VGA 8x16 font is quite a
-  lot more readable.
-
-  Given the resolution provided by the frame buffer device, answer N
-  here is safe.
-
-CONFIG_FONT_6x11
-  Small console font with Macintosh-style high-half glyphs.  Some Mac
-  framebuffer drivers don't support this one at all.
-
-CONFIG_FONT_PEARL_8x8
-  Small console font with PC-style control-character and high-half
-  glyphs.
-
-CONFIG_FONT_ACORN_8x8
-  Small console font with PC-style control characters and high-half
-  glyphs.
-
-CONFIG_FB_HGA
-  Say Y here if you have a Hercules mono graphics card.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called hgafb.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  As this card technology is 15 years old, most people will answer N
-  here.
-
-CONFIG_FB_E1355
-  Build in support for the SED1355 Epson Research Embedded RAMDAC
-  LCD/CRT Controller (since redesignated as the S1D13505) as a
-  framebuffer.  Product specs at
-  <http://www.erd.epson.com/vdc/html/products.htm>.
-
-CONFIG_E1355_REG_BASE
-  Epson SED1355/S1D13505 LCD/CRT controller register base address.
-  See the manuals at
-  <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for
-  discussion.
-
-CONFIG_E1355_FB_BASE
-  Epson SED1355/S1D13505 LCD/CRT controller memory base address.  See
-  the manuals at
-  <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for
-  discussion.
-
-CONFIG_FB_PVR2
-  Say Y here if you have a PowerVR 2 card in your box.  If you plan to
-  run linux on your Dreamcast, you will have to say Y here.
-  This driver may or may not work on other PowerVR 2 cards, but is
-  totally untested.  Use at your own risk.  If unsure, say N.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called pvr2fb.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  You can pass several parameters to the driver at boot time or at
-  module load time.  The parameters look like "video=pvr2:XXX", where
-  the meaning of XXX can be found at the end of the main source file
-  (<file:drivers/video/pvr2fb.c>). Please see the file
-  <file:Documentation/fb/pvr2fb.txt>.
-
-CONFIG_FB_PVR2_DEBUG
-  Say Y here if you wish for the pvr2fb driver to print out debugging
-  messages. Most people will want to say N here. If unsure, you will
-  also want to say N.
-
-CONFIG_FB_MATROX
-  Say Y here if you have a Matrox Millennium, Matrox Millennium II,
-  Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
-  Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video,
-  Matrox G400, G450 or G550 card in your box.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want).
-  The module will be called matroxfb.o. If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-  You can pass several parameters to the driver at boot time or at
-  module load time. The parameters look like "video=matrox:XXX", and
-  are described in <file:Documentation/fb/matroxfb.txt>.
-
-CONFIG_FB_MATROX_MILLENIUM
-  Say Y here if you have a Matrox Millennium or Matrox Millennium II
-  video card. If you select "Advanced lowlevel driver options" below,
-  you should check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp
-  packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can
-  also use font widths different from 8.
-
-CONFIG_FB_MATROX_MYSTIQUE
-  Say Y here if you have a Matrox Mystique or Matrox Mystique 220
-  video card. If you select "Advanced lowlevel driver options" below,
-  you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp
-  packed pixel and 32 bpp packed pixel. You can also use font widths
-  different from 8.
-
-CONFIG_FB_MATROX_G450
-  Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based
-  video card. If you select "Advanced lowlevel driver options", you
-  should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
-  pixel and 32 bpp packed pixel. You can also use font widths
-  different from 8.
-
-  If you need support for G400 secondary head, you must first say Y to
-  "I2C support" and "I2C bit-banging support" in the character devices
-  section, and then to "Matrox I2C support" and "G400 second head
-  support" here in the framebuffer section. G450/G550 secondary head
-  and digital output are supported without additional modules.
-  
-  The driver starts in monitor mode. You must use the matroxset tool 
-  (available at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to 
-  swap primary and secondary head outputs, or to change output mode.  
-  Secondary head driver always start in 640x480 resolution and you 
-  must use fbset to change it.
-
-  Do not forget that second head supports only 16 and 32 bpp
-  packed pixels, so it is a good idea to compile them into the kernel
-  too. You can use only some font widths, as the driver uses generic
-  painting procedures (the secondary head does not use acceleration
-  engine).
-  
-  G450/G550 hardware can display TV picture only from secondary CRTC,
-  and it performs no scaling, so picture must have 525 or 625 lines.
-
-CONFIG_FB_MATROX_G100A
-  Say Y here if you have a Matrox G100, G200 or G400 based
-  video card. If you select "Advanced lowlevel driver options", you
-  should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
-  pixel and 32 bpp packed pixel. You can also use font widths
-  different from 8.
-
-  If you need support for G400 secondary head, you must first say Y to
-  "I2C support" and "I2C bit-banging support" in the character devices
-  section, and then to "Matrox I2C support" and "G400 second head
-  support" here in the framebuffer section.
-
-CONFIG_FB_MATROX_I2C
-  This drivers creates I2C buses which are needed for accessing the
-  DDC (I2C) bus present on all Matroxes, an I2C bus which
-  interconnects Matrox optional devices, like MGA-TVO on G200 and
-  G400, and the secondary head DDC bus, present on G400 only.
-
-  You can say Y or M here if you want to experiment with monitor
-  detection code. You must say Y or M here if you want to use either
-  second head of G400 or MGA-TVO on G200 or G400.
-
-  If you compile it as module, it will create a module named
-  i2c-matroxfb.o.
-
-CONFIG_FB_MATROX_MAVEN
-  WARNING !!! This support does not work with G450 !!!
-
-  Say Y or M here if you want to use a secondary head (meaning two
-  monitors in parallel) on G400 or MGA-TVO add-on on G200. Secondary
-  head is not compatible with accelerated XFree 3.3.x SVGA servers -
-  secondary head output is blanked while you are in X. With XFree
-  3.9.17 preview you can use both heads if you use SVGA over fbdev or
-  the fbdev driver on first head and the fbdev driver on second head.
-
-  If you compile it as module, two modules are created,
-  matroxfb_crtc2.o and matroxfb_maven.o. Matroxfb_maven is needed for
-  both G200 and G400, matroxfb_crtc2 is needed only by G400. You must
-  also load i2c-matroxfb to get it to run.
-
-  The driver starts in monitor mode and you must use the matroxset
-  tool (available at
-  <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to switch it to
-  PAL or NTSC or to swap primary and secondary head outputs.
-  Secondary head driver also always start in 640x480 resolution, you
-  must use fbset to change it.
-
-  Also do not forget that second head supports only 16 and 32 bpp
-  packed pixels, so it is a good idea to compile them into the kernel
-  too.  You can use only some font widths, as the driver uses generic
-  painting procedures (the secondary head does not use acceleration
-  engine).
-
-CONFIG_FB_MATROX_MULTIHEAD
-  Say Y here if you have more than one (supported) Matrox device in
-  your computer and you want to use all of them for different monitors
-  ("multihead"). If you have only one device, you should say N because
-  the driver compiled with Y is larger and a bit slower, especially on
-  ia32 (ix86).
-
-  If you said M to "Matrox unified accelerated driver" and N here, you
-  will still be able to use several Matrox devices simultaneously:
-  insert several instances of the module matroxfb.o into the kernel
-  with insmod, supplying the parameter "dev=N" where N is 0, 1, etc.
-  for the different Matrox devices. This method is slightly faster but
-  uses 40 KB of kernel memory per Matrox card.
-
-  There is no need for enabling 'Matrox multihead support' if you have
-  only one Matrox card in the box.
-
-CONFIG_FB_VOODOO1
-  Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or 
-  Voodoo2 (cvg) based graphics card.
-
-  This driver is also available as a module ( = code which can be 
-  inserted and removed from the running kernel whenever you want).
-  The module will be called sstfb.o. If you want to compile it as
-  a module, say M here and read Documentation/modules.txt.
-
-  WARNING: Do not use any application that uses the 3D engine
-  (namely glide) while using this driver.
-  Please read the file Documentation/fb/README-sstfb.txt for supported
-  options and other important info  support.
-
-CONFIG_FB_TRIDENT
-  This driver is supposed to support graphics boards with the
-  Trident CyberXXXX/Image/CyberBlade chips mostly found in laptops
-  but also on some motherboards. For more information, read
-  <file:Documentation/fb/tridentfb.txt>
-
-  Say Y if you have such a graphics board.
-
-  The driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called rivafb.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_FB_SBUS
-  Say Y if you want support for SBUS or UPA based frame buffer device.
-
-CONFIG_FB_CREATOR
-  This is the frame buffer device driver for the Creator and Creator3D
-  graphics boards.
-
-CONFIG_FB_CGSIX
-  This is the frame buffer device driver for the CGsix (GX, TurboGX)
-  frame buffer.
-
-CONFIG_FB_BWTWO
-  This is the frame buffer device driver for the BWtwo frame buffer.
-
-CONFIG_FB_CGTHREE
-  This is the frame buffer device driver for the CGthree frame buffer.
-
-CONFIG_FB_CGFOURTEEN
-  This is the frame buffer device driver for the CGfourteen frame
-  buffer on Desktop SPARCsystems with the SX graphics option.
-
-CONFIG_FB_P9100
-  This is the frame buffer device driver for the P9100 card
-  supported on Sparcbook 3 machines.
-
-CONFIG_FB_LEO
-  This is the frame buffer device driver for the SBUS-based Sun ZX
-  (leo) frame buffer cards.
-
-CONFIG_FB_IGA
-  This is the framebuffer device for the INTERGRAPHICS 1680 and
-  successor frame buffer cards.
-
-CONFIG_FB_TCX
-  This is the frame buffer device driver for the TCX 24/8bit frame
-  buffer.
-
-CONFIG_FB_HIT
-  This is the frame buffer device driver for the Hitachi HD64461 LCD
-  frame buffer card.
-
-CONFIG_FB_SIS
-  This is the frame buffer device driver for the SiS 630 and 640 Super
-  Socket 7 UMA cards.  Specs available at <http://www.sis.com.tw/>.
-
-CONFIG_FB_SIS_300
-  This is the frame buffer device driver for the SiS 630 and related
-  Super Socket 7 UMA cards.  Specs available at
-  <http://www.sis.com.tw/>.
-
-CONFIG_FB_SIS_315
-  This is the frame buffer device driver for the SiS 315 graphics
-  card.  Specs available at <http://www.sis.com.tw/>.
-
-CONFIG_FB_IMSTT
-  The IMS Twin Turbo is a PCI-based frame buffer card bundled with
-  many Macintosh and compatible computers.
-
-CONFIG_FB_TX3912
-  The TX3912 is a Toshiba RISC processor based on the MIPS 3900 core
-  see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>.
-
-  Say Y here to enable kernel support for the on-board framebuffer.
-
-CONFIG_FB_VIRTUAL
-  This is a `virtual' frame buffer device. It operates on a chunk of
-  unswappable kernel memory instead of on the memory of a graphics
-  board. This means you cannot see any output sent to this frame
-  buffer device, while it does consume precious memory. The main use
-  of this frame buffer device is testing and debugging the frame
-  buffer subsystem. Do NOT enable it for normal systems! To protect
-  the innocent, it has to be enabled explicitly at boot time using the
-  kernel option `video=vfb:'.
-
-  This driver is also available as a module ( = code which can be
-  inserted and removed from the running kernel whenever you want). The
-  module will be called vfb.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_FB_ATY_CT
-  Say Y here to support use of ATI's 64-bit Rage boards (or other
-  boards based on the Mach64 CT, VT, GT, and LT chipsets) as a
-  framebuffer device.  The ATI product support page for these boards
-  is at <http://support.ati.com/products/pc/mach64/>.
-
-CONFIG_FB_ATY_GX
-  Say Y here to support use of the ATI Mach64 Graphics Expression
-  board (or other boards based on the Mach64 GX chipset) as a
-  framebuffer device.  The ATI product support page for these boards
-  is at
-  <http://support.ati.com/products/pc/mach64/graphics_xpression.html>.
-
-CONFIG_FB_RADEON
-  Choose this option if you want to use an ATI Radeon graphics card as
-  a framebuffer device.  There are both PCI and AGP versions.  You
-  don't need to choose this to run the Radeon in plain VGA mode.
-  There is a product page at
-  <http://www.ati.com/na/pages/products/pc/radeon32/index.html>.
-
-CONFIG_FB_SA1100
-  This is a framebuffer device for the SA-1100 LCD Controller.
-  See <http://www.linux-fbdev.org/> for information on framebuffer
-  devices.
-
-  If you plan to use the LCD display with your SA-1100 system, say
-  Y here.
-
-CONFIG_FBCON_ADVANCED
-  The frame buffer console uses character drawing routines that are
-  tailored to the specific organization of pixels in the memory of
-  your graphics hardware. These are called the low level frame buffer
-  console drivers. Note that they are used for text console output
-  only; they are NOT needed for graphical applications.
-
-  If you say N here, the needed low level drivers are automatically
-  enabled, depending on what frame buffer devices you selected above.
-  This is recommended for most users.
-
-  If you say Y here, you have more fine-grained control over which low
-  level drivers are enabled. You can e.g. leave out low level drivers
-  for color depths you do not intend to use for text consoles.
-
-  Low level frame buffer console drivers can be modules ( = code which
-  can be inserted and removed from the running kernel whenever you
-  want). The modules will be called fbcon-*.o. If you want to compile
-  (some of) them as modules, read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_FBCON_MFB
-  This is the low level frame buffer console driver for monochrome
-  (2 colors) packed pixels.
-
-CONFIG_FBCON_CFB2
-  This is the low level frame buffer console driver for 2 bits per
-  pixel (4 colors) packed pixels.
-
-CONFIG_FBCON_CFB4
-  This is the low level frame buffer console driver for 4 bits per
-  pixel (16 colors) packed pixels.
-
-CONFIG_FBCON_CFB8
-  This is the low level frame buffer console driver for 8 bits per
-  pixel (256 colors) packed pixels.
-
-CONFIG_FBCON_CFB16
-  This is the low level frame buffer console driver for 15 or 16 bits
-  per pixel (32K or 64K colors, also known as `hicolor') packed
-  pixels.
-
-CONFIG_FBCON_CFB24
-  This is the low level frame buffer console driver for 24 bits per
-  pixel (16M colors, also known as `truecolor') packed pixels. It is
-  NOT for `sparse' 32 bits per pixel mode.
-
-CONFIG_FBCON_CFB32
-  This is the low level frame buffer console driver for 32 bits per
-  pixel (16M colors, also known as `truecolor') sparse packed pixels.
-
-CONFIG_FBCON_AFB
-  This is the low level frame buffer console driver for 1 to 8
-  bitplanes (2 to 256 colors) on Amiga.
-
-CONFIG_FBCON_ILBM
-  This is the low level frame buffer console driver for 1 to 8
-  interleaved bitplanes (2 to 256 colors) on Amiga.
-
-CONFIG_FBCON_IPLAN2P2
-  This is the low level frame buffer console driver for 2 interleaved
-  bitplanes (4 colors) on Atari.
-
-CONFIG_FBCON_IPLAN2P4
-  This is the low level frame buffer console driver for 4 interleaved
-  bitplanes (16 colors) on Atari.
-
-CONFIG_FBCON_IPLAN2P8
-  This is the low level frame buffer console driver for 8 interleaved
-  bitplanes (256 colors) on Atari.
-
-CONFIG_FBCON_HGA
-  This is the low level frame buffer console driver for Hercules mono
-  graphics cards.
-
diff -Nru a/drivers/video/Config.in b/drivers/video/Config.in
--- a/drivers/video/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,457 +0,0 @@
-#
-# Video configuration
-#
-
-mainmenu_option next_comment
-comment 'Frame-buffer support'
-
-bool 'Support for frame buffer devices (EXPERIMENTAL)' CONFIG_FB
-
-if [ "$CONFIG_FB" = "y" ]; then
-   define_bool CONFIG_DUMMY_CONSOLE y
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_PCI" = "y" ]; then
-	 tristate '  Cirrus Logic support (EXPERIMENTAL)' CONFIG_FB_CLGEN
-	 tristate '  Permedia2 support (EXPERIMENTAL)' CONFIG_FB_PM2
-	 if [ "$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_PM2" = "m" ]; then
-	    if [ "$CONFIG_PCI" = "y" ]; then
-	       bool '    enable FIFO disconnect feature' CONFIG_FB_PM2_FIFO_DISCONNECT
-	       bool '    generic Permedia2 PCI board support' CONFIG_FB_PM2_PCI
-	    fi
-	    if [ "$CONFIG_AMIGA" = "y" ]; then
-	       bool '    Phase5 CVisionPPC/BVisionPPC support' CONFIG_FB_PM2_CVPPC
-	    fi
-	 fi
-      fi
-   fi
-   if [ "$CONFIG_ARM" = "y" ]; then
-      dep_bool '  Acorn VIDC support' CONFIG_FB_ACORN $CONFIG_ARCH_ACORN
-      dep_bool '  Anakin LCD support' CONFIG_FB_ANAKIN $CONFIG_ARCH_ANAKIN
-      dep_bool '  CLPS711X LCD support' CONFIG_FB_CLPS711X $CONFIG_ARCH_CLPS711X
-      dep_bool '  SA-1100 LCD support' CONFIG_FB_SA1100 $CONFIG_ARCH_SA1100
-      if [ "$CONFIG_FB_SA1100" = "y" -a "$CONFIG_SA1100_CERF" = "y" ]; then
-         choice 'CerfBoard LCD Display Size' \
-		"3.8_Color		CONFIG_CERF_LCD_38_A \
-		 3.8_Mono		CONFIG_CERF_LCD_38_B \
-		 5.7		CONFIG_CERF_LCD_57_A \
-		 7.2		CONFIG_CERF_LCD_72_A" 5.7
-      fi
-      if [ "$CONFIG_FB_SA1100" = "y" -a "$CONFIG_SA1100_CERF_CPLD" = "y" ]; then
-         bool 'Cerfboard Backlight (CerfPDA)' CONFIG_SA1100_CERF_LCD_BACKLIGHT
-      fi
-   fi
-   dep_tristate '  CyberPro 2000/2010/5000 support' CONFIG_FB_CYBER2000 $CONFIG_PCI
-   if [ "$CONFIG_APOLLO" = "y" ]; then
-      define_bool CONFIG_FB_APOLLO y
-   fi
-   if [ "$CONFIG_Q40" = "y" ]; then
-      define_bool CONFIG_FB_Q40 y
-   fi
-   if [ "$CONFIG_AMIGA" = "y" ]; then
-      tristate '  Amiga native chipset support' CONFIG_FB_AMIGA
-      if [ "$CONFIG_FB_AMIGA" != "n" ]; then
-	 bool '    Amiga OCS chipset support' CONFIG_FB_AMIGA_OCS
-	 bool '    Amiga ECS chipset support' CONFIG_FB_AMIGA_ECS
-	 bool '    Amiga AGA chipset support' CONFIG_FB_AMIGA_AGA
-      fi
-   fi
-   if [ "$CONFIG_ZORRO" = "y" ]; then
-      tristate '  Amiga CyberVision support' CONFIG_FB_CYBER
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-	 bool '  Amiga CyberVision3D support (EXPERIMENTAL)' CONFIG_FB_VIRGE
-	 tristate '  Amiga RetinaZ3 support (EXPERIMENTAL)' CONFIG_FB_RETINAZ3
-	 bool '  Amiga FrameMaster II/Rainbow II support (EXPERIMENTAL)' CONFIG_FB_FM2
-      fi
-   fi
-   if [ "$CONFIG_ATARI" = "y" ]; then
-      bool '  Atari native chipset support' CONFIG_FB_ATARI
-      tristate '  ATI Mach64 display support' CONFIG_FB_ATY
-      if [ "$CONFIG_FB_ATY" != "n" ]; then
-	 define_bool CONFIG_FB_ATY_GX y
-      fi
-   fi
-   if [ "$CONFIG_PPC" = "y" ]; then
-      dep_bool '  Open Firmware frame buffer device support' CONFIG_FB_OF $CONFIG_ALL_PPC
-      dep_bool '  Apple "control" display support' CONFIG_FB_CONTROL $CONFIG_ALL_PPC
-      dep_bool '  Apple "platinum" display support' CONFIG_FB_PLATINUM $CONFIG_ALL_PPC
-      dep_bool '  Apple "valkyrie" display support' CONFIG_FB_VALKYRIE $CONFIG_ALL_PPC
-      bool '  Chips 65550 display support' CONFIG_FB_CT65550
-      bool '  IMS Twin Turbo display support' CONFIG_FB_IMSTT
-      bool '  S3 Trio display support' CONFIG_FB_S3TRIO
-      tristate '  VGA 16-color graphics console' CONFIG_FB_VGA16
-   fi
-   if [ "$CONFIG_PARISC" = "y" ]; then
-      bool '  Generic STI frame buffer device support' CONFIG_FB_STI
-   fi
-   if [ "$CONFIG_MAC" = "y" ]; then
-      define_bool CONFIG_FB_MAC y
-      bool '  Apple "valkyrie" display support' CONFIG_FB_VALKYRIE
-#      bool '  Apple DAFB display support' CONFIG_FB_DAFB
-   fi
-   if [ "$CONFIG_HP300" = "y" ]; then
-      define_bool CONFIG_FB_HP300 y
-   fi
-   if [ "$CONFIG_ALPHA" = "y" ]; then
-      tristate '  TGA framebuffer support' CONFIG_FB_TGA
-   fi
-   if [ "$CONFIG_X86" = "y" ]; then
-      bool '  VESA VGA graphics console' CONFIG_FB_VESA
-      tristate '  VGA 16-color graphics console' CONFIG_FB_VGA16
-      tristate '  Hercules mono graphics console (EXPERIMENTAL)' CONFIG_FB_HGA
-      define_bool CONFIG_VIDEO_SELECT y
-   fi
-   if [ "$CONFIG_VISWS" = "y" ]; then
-      tristate '  SGI Visual Workstation framebuffer support' CONFIG_FB_SGIVW
-      define_bool CONFIG_BUS_I2C y
-   fi
-   if [ "$CONFIG_SUN3" = "y" -o "$CONFIG_SUN3X" = "y" ]; then
-      bool '  Sun3 framebuffer support' CONFIG_FB_SUN3
-      if [ "$CONFIG_FB_SUN3" != "n" ]; then
-         bool '    BWtwo support' CONFIG_FB_BWTWO
-         bool '    CGthree support' CONFIG_FB_CGTHREE
-         bool '    CGsix (GX,TurboGX) support' CONFIG_FB_CGSIX
-      fi
-   fi
-   if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then
-      tristate '  NEC PowerVR 2 display support' CONFIG_FB_PVR2
-      dep_bool '    Debug pvr2fb' CONFIG_FB_PVR2_DEBUG $CONFIG_FB_PVR2
-   fi
-   if [ "$CONFIG_SUPERH" = "y" ]; then
-      bool '  Epson 1355 framebuffer support' CONFIG_FB_E1355
-      if [ "$CONFIG_FB_E1355" = "y" ]; then
-         hex '    Register Base Address' CONFIG_E1355_REG_BASE a8000000
-         hex '    Framebuffer Base Address' CONFIG_E1355_FB_BASE a8200000
-      fi
-   fi
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      if [ "$CONFIG_PCI" != "n" ]; then
-	 tristate '  nVidia Riva support (EXPERIMENTAL)' CONFIG_FB_RIVA
-	 tristate '  Matrox acceleration (EXPERIMENTAL)' CONFIG_FB_MATROX
-	 if [ "$CONFIG_FB_MATROX" != "n" ]; then
-	    bool '    Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM
-	    bool '    Mystique support' CONFIG_FB_MATROX_MYSTIQUE
-	    bool '    G100/G200/G400/G450/G550 support' CONFIG_FB_MATROX_G450
-	    if [ "$CONFIG_FB_MATROX_G450" = "n" ]; then
-	       bool '    G100/G200/G400 support' CONFIG_FB_MATROX_G100A
-	    fi
-	    if [ "$CONFIG_FB_MATROX_G450" = "y" -o "$CONFIG_FB_MATROX_G100A" = "y" ]; then
-	       define_bool CONFIG_FB_MATROX_G100 y
-	    fi
-            if [ "$CONFIG_I2C" != "n" ]; then
-	       dep_tristate '      Matrox I2C support' CONFIG_FB_MATROX_I2C $CONFIG_FB_MATROX $CONFIG_I2C_ALGOBIT
-	       if [ "$CONFIG_FB_MATROX_G100" = "y" ]; then
-	          dep_tristate '      G400 second head support' CONFIG_FB_MATROX_MAVEN $CONFIG_FB_MATROX_I2C
-	       fi
-            fi
-	    bool '    Multihead support' CONFIG_FB_MATROX_MULTIHEAD
-	 fi
-	 tristate '  ATI Mach64 display support (EXPERIMENTAL)' CONFIG_FB_ATY
-	 if [ "$CONFIG_FB_ATY" != "n" ]; then
-	    bool '    Mach64 GX support (EXPERIMENTAL)' CONFIG_FB_ATY_GX
-	    bool '    Mach64 CT/VT/GT/LT (incl. 3D RAGE) support' CONFIG_FB_ATY_CT
-	 fi
- 	 tristate '  ATI Radeon display support (EXPERIMENTAL)' CONFIG_FB_RADEON
-	 tristate '  ATI Rage128 display support (EXPERIMENTAL)' CONFIG_FB_ATY128
-	 tristate '  SIS acceleration (EXPERIMENTAL)' CONFIG_FB_SIS
-	 if [ "$CONFIG_FB_SIS" != "n" ]; then
-	    bool '    SIS 630/540/730 support' CONFIG_FB_SIS_300
-	    bool '    SIS 315H/315 support' CONFIG_FB_SIS_315
-	 fi
-	 tristate '  NeoMagic display support (EXPERIMENTAL)' CONFIG_FB_NEOMAGIC
-	 tristate '  3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)' CONFIG_FB_3DFX
-	 tristate '  3Dfx Voodoo Graphics (sst1) support (EXPERIMENTAL)' CONFIG_FB_VOODOO1
-	 tristate '  Trident support (EXPERIMENTAL)' CONFIG_FB_TRIDENT
-	 tristate '  Permedia3 support (EXPERIMENTAL)' CONFIG_FB_PM3
-      fi
-   fi
-   if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-      bool '  SBUS and UPA framebuffers' CONFIG_FB_SBUS
-      if [ "$CONFIG_FB_SBUS" != "n" ]; then
-	 if [ "$CONFIG_SPARC64" = "y" ]; then
-	    bool '    Creator/Creator3D support' CONFIG_FB_CREATOR
-	 fi
-	 bool '    CGsix (GX,TurboGX) support' CONFIG_FB_CGSIX
-	 bool '    BWtwo support' CONFIG_FB_BWTWO
-	 bool '    CGthree support' CONFIG_FB_CGTHREE
-	 if [ "$CONFIG_SPARC32" = "y" ]; then
-	    bool '    TCX (SS4/SS5 only) support' CONFIG_FB_TCX
-	    bool '    CGfourteen (SX) support' CONFIG_FB_CGFOURTEEN
-	    bool '    P9100 (Sparcbook 3 only) support' CONFIG_FB_P9100
-	 fi
-	 bool '    Leo (ZX) support' CONFIG_FB_LEO
-      fi
-   fi
-   if [ "$CONFIG_SPARC32" = "y" ]; then
-      if [ "$CONFIG_PCI" != "n" ]; then
-	 bool '  PCI framebuffers' CONFIG_FB_PCI
-	 if [ "$CONFIG_FB_PCI" != "n" ]; then
-	    bool '    IGA 168x display support' CONFIG_FB_IGA
-	 fi
-      fi
-   fi
-   if [ "$CONFIG_SPARC64" = "y" ]; then
-      if [ "$CONFIG_PCI" != "n" ]; then
-	 bool '  PCI framebuffers' CONFIG_FB_PCI
-	 if [ "$CONFIG_FB_PCI" != "n" ]; then
-	    tristate '    ATI Mach64 display support' CONFIG_FB_ATY
-	    if [ "$CONFIG_FB_ATY" != "n" ]; then
-	       define_bool CONFIG_FB_ATY_CT y
-	    fi
-	 fi
-      fi
-   fi
-   if [ "$CONFIG_HD64461" = "y" ]; then
-      tristate '  HD64461 Frame Buffer support' CONFIG_FB_HIT
-   fi
-   if [ "$CONFIG_DECSTATION" = "y" ]; then
-     if [ "$CONFIG_TC" = "y" ]; then
-       bool '  PMAG-BA TURBOchannel framebuffer support' CONFIG_FB_PMAG_BA
-       bool '  PMAGB-B TURBOchannel framebuffer spport' CONFIG_FB_PMAGB_B
-       bool '  Maxine (Personal DECstation) onboard framebuffer spport' CONFIG_FB_MAXINE
-     fi
-   fi
-   if [ "$CONFIG_NINO" = "y" ]; then
-      bool '  TMPTX3912/PR31700 frame buffer support' CONFIG_FB_TX3912
-   fi
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      tristate '  Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)' CONFIG_FB_VIRTUAL
-   fi
-
-   bool '  Advanced low level driver options' CONFIG_FBCON_ADVANCED
-   if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then
-      tristate '    Monochrome support' CONFIG_FBCON_MFB
-      tristate '    2 bpp packed pixels support' CONFIG_FBCON_CFB2
-      tristate '    4 bpp packed pixels support' CONFIG_FBCON_CFB4
-      tristate '    8 bpp packed pixels support' CONFIG_FBCON_CFB8
-      tristate '    16 bpp packed pixels support' CONFIG_FBCON_CFB16
-      tristate '    24 bpp packed pixels support' CONFIG_FBCON_CFB24
-      tristate '    32 bpp packed pixels support' CONFIG_FBCON_CFB32
-      tristate '    Hardware acceleration support' CONFIG_FBCON_ACCEL
-      tristate '    Amiga bitplanes support' CONFIG_FBCON_AFB
-      tristate '    Amiga interleaved bitplanes support' CONFIG_FBCON_ILBM
-      tristate '    Atari interleaved bitplanes (2 planes) support' CONFIG_FBCON_IPLAN2P2
-      tristate '    Atari interleaved bitplanes (4 planes) support' CONFIG_FBCON_IPLAN2P4
-      tristate '    Atari interleaved bitplanes (8 planes) support' CONFIG_FBCON_IPLAN2P8
-#      tristate '    Atari interleaved bitplanes (16 planes) support' CONFIG_FBCON_IPLAN2P16
-      tristate '    VGA 16-color planar support' CONFIG_FBCON_VGA_PLANES
-      tristate '    HGA monochrome support (EXPERIMENTAL)' CONFIG_FBCON_HGA
-   else
-      # Guess what we need
-      if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_AMIGA" = "y" -o \
-	   "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
-	   "$CONFIG_FB_BWTWO" = "y" -o "$CONFIG_FB_RETINAZ3" = "y" -o \
-	   "$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CLGEN" = "y" ]; then
-	 define_tristate CONFIG_FBCON_MFB y
-      else
-	 if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_AMIGA" = "m" -o \
-	      "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
-	      "$CONFIG_FB_BWTWO" = "m" -o "$CONFIG_FB_RETINAZ3" = "m" -o \
-	      "$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CLGEN" = "m" ]; then 
-	    define_tristate CONFIG_FBCON_MFB m
-	 fi
-      fi
-      if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_SA1100" = "y" ]; then 
-	 define_tristate CONFIG_FBCON_CFB2 y
-	 define_tristate CONFIG_FBCON_CFB4 y
-      else
-	 if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_SA1100" = "m" ]; then 
-	    define_tristate CONFIG_FBCON_CFB2 m
-	    define_tristate CONFIG_FBCON_CFB4 m
-	 fi
-      fi
-      if [ "$CONFIG_FB_ACORN" = "y" -o "$CONFIG_FB_ATARI" = "y" -o \
-	   "$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
-	   "$CONFIG_FB_RADEON" = "y" -o "$CONFIG_FB_TGA" = "y" -o \
-	   "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
-	   "$CONFIG_FB_TCX" = "y" -o "$CONFIG_FB_CGTHREE" = "y" -o \
-	   "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
-	   "$CONFIG_FB_CGFOURTEEN" = "y" -o "$CONFIG_FB_TRIDENT" = "y" -o \
-	   "$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
-	   "$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
-           "$CONFIG_FB_IGA" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
-	   "$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
-	   "$CONFIG_FB_SA1100" = "y" ]; then 
-	 define_tristate CONFIG_FBCON_CFB8 y
-      else
-	 if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
-	      "$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \
-	      "$CONFIG_FB_RADEON" = "m" -o "$CONFIG_FB_TGA" = "m" -o \
-	      "$CONFIG_FB_SIS" = "m" -o "$CONFIG_FB_PM3" = "m" -o \
-	      "$CONFIG_FB_TCX" = "m" -o "$CONFIG_FB_CGTHREE" = "m" -o \
-	      "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
-	      "$CONFIG_FB_CGFOURTEEN" = "m" -o "$CONFIG_FB_TRIDENT" = "m" -o \
-	      "$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
-	      "$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
-              "$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
-	      "$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
-	      "$CONFIG_FB_SA1100" = "m" ]; then
-	    define_tristate CONFIG_FBCON_CFB8 m
-	 fi
-      fi
-      if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
-	   "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
-	   "$CONFIG_FB_TRIDENT" = "y" -o "$CONFIG_FB_TBOX" = "y" -o \
-	   "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
-	   "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
-	   "$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
-	   "$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
-	   "$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
-	   "$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
-	   "$CONFIG_FB_SA1100" = "y" ]; then 
-	 define_tristate CONFIG_FBCON_CFB16 y
-      else
-	 if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_SIS" = "m" -o \
-	      "$CONFIG_FB_RADEON" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
-	      "$CONFIG_FB_TRIDENT" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \
-	      "$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_PM3" = "m" -o \
-	      "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
-	      "$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
-	      "$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
-	      "$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
-	      "$CONFIG_FB_PM2" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \
-	      "$CONFIG_FB_SA1100" = "y" ]; then 
-	    define_tristate CONFIG_FBCON_CFB16 m
-	 fi
-      fi
-      if [ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
-	   "$CONFIG_FB_CLGEN" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
-	   "$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
-           "$CONFIG_FB_ATY128" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
-	   "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
-	   "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_NEOMAGIC" = "y" ]; then
-	 define_tristate CONFIG_FBCON_CFB24 y
-      else
-	 if [ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
-	      "$CONFIG_FB_CLGEN" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
-	      "$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
-	      "$CONFIG_FB_ATY128" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
-	      "$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
-	      "$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_NEOMAGIC" = "y" ]; then
-	    define_tristate CONFIG_FBCON_CFB24 m
-	 fi
-      fi
-      if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
-	   "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_TRIDENT" = "y" -o \
-	   "$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
-	   "$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
-	   "$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
-	   "$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_PM3" = "y" -o \
-	   "$CONFIG_FB_SIS" = "y" ]; then 
-	 define_tristate CONFIG_FBCON_CFB32 y
-      else
-	 if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
-	      "$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_TRIDENT" = "m" -o \
-	      "$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
-	      "$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
-	      "$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
-	      "$CONFIG_FB_SIS" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
-	      "$CONFIG_FB_PM3" = "m" ]; then 
-	    define_tristate CONFIG_FBCON_CFB32 m
-	 fi
-      fi
-      if [ "$CONFIG_FB_NEOMAGIC" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
-	   "$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_HIT" = "y" -o \
-	   "$CONFIG_FB_HP300" = "y" -o "$CONFIG_FB_Q40" = "y" -o \
-	   "$CONFIG_FB_ANAKIN" = "y" -o "$CONFIG_FB_G364" = "y" -o \
-	   "$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \
-	   "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
-	   "$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \
-	   "$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_APOLLO" = "y" -o \
-	   "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_MAC" = "y" -o \
-	   "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_OF" = "y" -o \
-	   "$CONFIG_FB_SGIVW" = "y" ]; then
-	 define_tristate CONFIG_FBCON_ACCEL y
-      else
-	 if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \
-	      "$CONFIG_FB_G364" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
-	      "$CONFIG_FB_CLPS711X" = "m" -o "$CONFIG_FB_3DFX" = "m" -o \
-	      "$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_SGIVW" = "m" ]; then 
-	    define_tristate CONFIG_FBCON_ACCEL m
-         fi       
-      fi
-      if [ "$CONFIG_FB_AMIGA" = "y" ]; then
-	 define_tristate CONFIG_FBCON_AFB y
-	 define_tristate CONFIG_FBCON_ILBM y
-      else
-	 if [ "$CONFIG_FB_AMIGA" = "m" ]; then
-	    define_tristate CONFIG_FBCON_AFB m
-	    define_tristate CONFIG_FBCON_ILBM m
-	 fi
-      fi
-      if [ "$CONFIG_FB_ATARI" = "y" ]; then
-	 define_tristate CONFIG_FBCON_IPLAN2P2 y
-	 define_tristate CONFIG_FBCON_IPLAN2P4 y
-	 define_tristate CONFIG_FBCON_IPLAN2P8 y
-      else
-	 if [ "$CONFIG_FB_ATARI" = "m" ]; then
-	    define_tristate CONFIG_FBCON_IPLAN2P2 m
-	    define_tristate CONFIG_FBCON_IPLAN2P4 m
-	    define_tristate CONFIG_FBCON_IPLAN2P8 m
-	 fi
-      fi
-      if [ "$CONFIG_FB_VGA16" = "y" ]; then
-	 define_tristate CONFIG_FBCON_VGA_PLANES y
-      else
-	 if [ "$CONFIG_FB_VGA16" = "m" ]; then
-	    define_tristate CONFIG_FBCON_VGA_PLANES m
-	 fi
-      fi
-      if [ "$CONFIG_FB_HGA" = "y" ]; then
-	 define_tristate CONFIG_FBCON_HGA y
-      else
-	 if [ "$CONFIG_FB_HGA" = "m" ]; then
-	    define_tristate CONFIG_FBCON_HGA m
-	 fi
-      fi
-      if [ "$CONFIG_FB_STI" = "y" ]; then
-	 define_tristate CONFIG_FBCON_STI y
-      fi
-   fi
-   bool '  Support only 8 pixels wide fonts' CONFIG_FBCON_FONTWIDTH8_ONLY
-   if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-      bool '  Sparc console 8x16 font' CONFIG_FONT_SUN8x16
-      if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
-	 bool '  Sparc console 12x22 font (not supported by all drivers)' CONFIG_FONT_SUN12x22
-      fi
-      bool '  Select other fonts' CONFIG_FBCON_FONTS
-      if [ "$CONFIG_FBCON_FONTS" = "y" ]; then
-	 bool '    VGA 8x8 font' CONFIG_FONT_8x8
-	 bool '    VGA 8x16 font' CONFIG_FONT_8x16
-	 if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
-	    bool '    Mac console 6x11 font (not supported by all drivers)' CONFIG_FONT_6x11
-	 fi
-	 bool '    Pearl (old m68k) console 8x8 font' CONFIG_FONT_PEARL_8x8
-	 bool '    Acorn console 8x8 font' CONFIG_FONT_ACORN_8x8
-      fi
-   else
-      bool '  Select compiled-in fonts' CONFIG_FBCON_FONTS
-      if [ "$CONFIG_FBCON_FONTS" = "y" ]; then
-	 bool '    VGA 8x8 font' CONFIG_FONT_8x8
-	 bool '    VGA 8x16 font' CONFIG_FONT_8x16
-	 bool '    Sparc console 8x16 font' CONFIG_FONT_SUN8x16
-	 if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
-	    bool '    Sparc console 12x22 font (not supported by all drivers)' CONFIG_FONT_SUN12x22
-	    bool '    Mac console 6x11 font (not supported by all drivers)' CONFIG_FONT_6x11
-	 fi
-	 bool '    Pearl (old m68k) console 8x8 font' CONFIG_FONT_PEARL_8x8
-	 bool '    Acorn console 8x8 font' CONFIG_FONT_ACORN_8x8
-	 bool '    Mini 4x6 font' CONFIG_FONT_MINI_4x6
-      else
-	 define_bool CONFIG_FONT_8x8 y
-	 define_bool CONFIG_FONT_8x16 y
-	 if [ "$CONFIG_MAC" = "y" ]; then
-	    if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
-	       define_bool CONFIG_FONT_6x11 y
-	    fi
-	 fi
-	 if [ "$CONFIG_AMIGA" = "y" ]; then
-	    define_bool CONFIG_FONT_PEARL_8x8 y
-	 fi
-	 if [ "$CONFIG_ARM" = "y" -a "$CONFIG_ARCH_ACORN" = "y" ]; then
-	    define_bool CONFIG_FONT_ACORN_8x8 y
-	 fi
-      fi
-   fi
-fi
-
-endmenu
diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/video/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1149 @@
+#
+# Video configuration
+#
+
+menu "Frame-buffer support"
+
+config FB
+	bool "Support for frame buffer devices (EXPERIMENTAL)"
+	---help---
+	  The frame buffer device provides an abstraction for the graphics
+	  hardware. It represents the frame buffer of some video hardware and
+	  allows application software to access the graphics hardware through
+	  a well-defined interface, so the software doesn't need to know
+	  anything about the low-level (hardware register) stuff.
+
+	  Frame buffer devices work identically across the different
+	  architectures supported by Linux and make the implementation of
+	  application programs easier and more portable; at this point, an X
+	  server exists which uses the frame buffer device exclusively.
+	  On several non-X86 architectures, the frame buffer device is the
+	  only way to use the graphics hardware.
+
+	  The device is accessed through special device nodes, usually located
+	  in the /dev directory, i.e. /dev/fb*.
+
+	  You need an utility program called fbset to make full use of frame
+	  buffer devices. Please read <file:Documentation/fb/framebuffer.txt>
+	  and the Framebuffer-HOWTO at
+	  <http://www.tahallah.demon.co.uk/programming/prog.html> for more
+	  information.
+
+	  Say Y here and to the driver for your graphics board below if you
+	  are compiling a kernel for a non-x86 architecture.
+
+	  If you are compiling for the x86 architecture, you can say Y if you
+	  want to play with it, but it is not essential. Please note that
+	  running graphical applications that directly touch the hardware
+	  (e.g. an accelerated X server) and that are not frame buffer
+	  device-aware may cause unexpected results. If unsure, say N.
+
+config DUMMY_CONSOLE
+	bool
+	depends on FB
+	default y
+
+config FB_CLGEN
+	tristate "Cirrus Logic support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && (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.
+
+	  If you have a PCI-based system, this enables support for these
+	  chips: GD-543x, GD-544x, GD-5480.
+
+	  Please read the file <file:Documentation/fb/clgenfb.txt>.
+
+	  Say N unless you have such a graphics board or plan to get one
+	  before you next recompile the kernel.
+
+config FB_PM2
+	tristate "Permedia2 support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && (AMIGA || PCI)
+	help
+	  This is the frame buffer device driver for the Permedia2 AGP frame
+	  buffer card from ASK, aka `Graphic Blaster Exxtreme'.  There is a
+	  product page at
+	  <http://www.ask.com.hk/product/Permedia%202/permedia2.htm>.
+
+config FB_PM2_FIFO_DISCONNECT
+	bool "enable FIFO disconnect feature"
+	depends on FB_PM2 && PCI
+	help
+	  Support the Permedia2 FIFOI disconnect feature (see CONFIG_FB_PM2).
+
+config FB_PM2_PCI
+	bool "generic Permedia2 PCI board support"
+	depends on FB_PM2 && PCI
+	help
+	  Say Y to enable support for Permedia2 AGP frame buffer card from
+	  3Dlabs (aka `Graphic Blaster Exxtreme') on the PCI bus.
+
+config FB_PM2_CVPPC
+	bool "Phase5 CVisionPPC/BVisionPPC support"
+	depends on FB_PM2 && AMIGA
+	help
+	  Say Y to enable support for the Amiga Phase 5 CVisionPPC BVisionPPC
+	  framebuffer cards.  Phase 5 is no longer with us, alas.
+
+config FB_ACORN
+	bool "Acorn VIDC support"
+	depends on FB && ARM && ARCH_ACORN
+	help
+	  This is the frame buffer device driver for the Acorn VIDC graphics
+	  hardware found in Acorn RISC PCs and other ARM-based machines.  If
+	  unsure, say N.
+
+config FB_ANAKIN
+	bool "Anakin LCD support"
+	depends on FB && ARM && ARCH_ANAKIN
+
+config FB_CLPS711X
+	bool "CLPS711X LCD support"
+	depends on FB && ARM && ARCH_CLPS711X
+
+config FB_SA1100
+	bool "SA-1100 LCD support"
+	depends on FB && ARM && ARCH_SA1100
+	help
+	  This is a framebuffer device for the SA-1100 LCD Controller.
+	  See <http://www.linux-fbdev.org/> for information on framebuffer
+	  devices.
+
+	  If you plan to use the LCD display with your SA-1100 system, say
+	  Y here.
+
+choice
+	prompt "CerfBoard LCD Display Size"
+	depends on FB_SA1100 && SA1100_CERF
+	default CERF_LCD_57_A
+
+config CERF_LCD_38_A
+	bool "3.8_Color"
+
+config CERF_LCD_38_B
+	bool "3.8_Mono"
+
+config CERF_LCD_57_A
+	bool "5.7"
+
+config CERF_LCD_72_A
+	bool "7.2"
+
+endchoice
+
+config SA1100_CERF_LCD_BACKLIGHT
+	bool "Cerfboard Backlight (CerfPDA)"
+	depends on FB_SA1100 && SA1100_CERF_CPLD
+
+config FB_CYBER2000
+	tristate "CyberPro 2000/2010/5000 support"
+	depends on FB && PCI
+	help
+	  This enables support for the Integraphics CyberPro 20x0 and 5000
+	  VGA chips used in the Rebel.com Netwinder and other machines.
+	  Say Y if you have a NetWinder or a graphics card containing this
+	  device, otherwise say N.
+
+config FB_APOLLO
+	bool
+	depends on FB && APOLLO
+	default y
+
+config FB_Q40
+	bool
+	depends on FB && Q40
+	default y
+
+config FB_AMIGA
+	tristate "Amiga native chipset support"
+	depends on FB && AMIGA
+	help
+	  This is the frame buffer device driver for the builtin graphics
+	  chipset found in Amigas.
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called amifb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config FB_AMIGA_OCS
+	bool "Amiga OCS chipset support"
+	depends on FB_AMIGA
+	help
+	  This enables support for the original Agnus and Denise video chips,
+	  found in the Amiga 1000 and most A500's and A2000's. If you intend
+	  to run Linux on any of these systems, say Y; otherwise say N.
+
+config FB_AMIGA_ECS
+	bool "Amiga ECS chipset support"
+	depends on FB_AMIGA
+	help
+	  This enables support for the Enhanced Chip Set, found in later
+	  A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If
+	  you intend to run Linux on any of these systems, say Y; otherwise
+	  say N.
+
+config FB_AMIGA_AGA
+	bool "Amiga AGA chipset support"
+	depends on FB_AMIGA
+	help
+	  This enables support for the Advanced Graphics Architecture (also
+	  known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T
+	  and CD32. If you intend to run Linux on any of these systems, say Y;
+	  otherwise say N.
+
+config FB_CYBER
+	tristate "Amiga CyberVision support"
+	depends on FB && ZORRO
+	help
+	  This enables support for the Cybervision 64 graphics card from
+	  Phase5. Please note that its use is not all that intuitive (i.e. if
+	  you have any questions, be sure to ask!). Say N unless you have a
+	  Cybervision 64 or plan to get one before you next recompile the
+	  kernel. Please note that this driver DOES NOT support the
+	  Cybervision 64 3D card, as they use incompatible video chips.
+
+config FB_VIRGE
+	bool "Amiga CyberVision3D support (EXPERIMENTAL)"
+	depends on FB && ZORRO && EXPERIMENTAL
+	help
+	  This enables support for the Cybervision 64/3D graphics card from
+	  Phase5. Please note that its use is not all that intuitive (i.e. if
+	  you have any questions, be sure to ask!). Say N unless you have a
+	  Cybervision 64/3D or plan to get one before you next recompile the
+	  kernel. Please note that this driver DOES NOT support the older
+	  Cybervision 64 card, as they use incompatible video chips.
+
+config FB_RETINAZ3
+	tristate "Amiga RetinaZ3 support (EXPERIMENTAL)"
+	depends on FB && ZORRO && EXPERIMENTAL
+	help
+	  This enables support for the Retina Z3 graphics card. Say N unless
+	  you have a Retina Z3 or plan to get one before you next recompile
+	  the kernel.
+
+config FB_FM2
+	bool "Amiga FrameMaster II/Rainbow II support (EXPERIMENTAL)"
+	depends on FB && ZORRO && EXPERIMENTAL
+	help
+	  This is the frame buffer device driver for the Amiga FrameMaster
+	  card from BSC (exhibited 1992 but not shipped as a CBM product).
+
+config FB_ATARI
+	bool "Atari native chipset support"
+	depends on FB && ATARI
+	help
+	  This is the frame buffer device driver for the builtin graphics
+	  chipset found in Ataris.
+
+config FB_ATY
+	tristate "ATI Mach64 display support (EXPERIMENTAL)" if EXPERIMENTAL && PCI
+	depends on FB
+	help
+	  This driver supports graphics boards with the ATI Mach64 chips.
+	  Say Y if you have such a graphics board.
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called atyfb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config FB_ATY
+	prompt "ATI Mach64 display support"
+	depends on FB && (SPARC64 && PCI && FB_PCI || ATARI)
+
+config FB_ATY_GX
+	bool "Mach64 GX support (EXPERIMENTAL)" if EXPERIMENTAL && PCI
+	depends on FB_ATY
+	default y if ATARI
+	help
+	  Say Y here to support use of the ATI Mach64 Graphics Expression
+	  board (or other boards based on the Mach64 GX chipset) as a
+	  framebuffer device.  The ATI product support page for these boards
+	  is at
+	  <http://support.ati.com/products/pc/mach64/graphics_xpression.html>.
+
+config FB_OF
+	bool "Open Firmware frame buffer device support"
+	depends on FB && PPC && ALL_PPC
+	help
+	  Say Y if you want support with Open Firmware for your graphics
+	  board.
+
+config FB_CONTROL
+	bool "Apple \"control\" display support"
+	depends on FB && PPC && ALL_PPC
+	help
+	  This driver supports a frame buffer for the graphics adapter in the
+	  Power Macintosh 7300 and others.
+
+config FB_PLATINUM
+	bool "Apple \"platinum\" display support"
+	depends on FB && PPC && ALL_PPC
+	help
+	  This driver supports a frame buffer for the "platinum" graphics
+	  adapter in some Power Macintoshes.
+
+config FB_VALKYRIE
+	bool "Apple \"valkyrie\" display support"
+	depends on FB && (MAC || PPC && ALL_PPC)
+	help
+	  This driver supports a frame buffer for the "valkyrie" graphics
+	  adapter in some Power Macintoshes.
+
+config FB_CT65550
+	bool "Chips 65550 display support"
+	depends on FB && PPC
+	help
+	  This is the frame buffer device driver for the Chips & Technologies
+	  65550 graphics chip in PowerBooks.
+
+config FB_IMSTT
+	bool "IMS Twin Turbo display support"
+	depends on FB && PPC
+	help
+	  The IMS Twin Turbo is a PCI-based frame buffer card bundled with
+	  many Macintosh and compatible computers.
+
+config FB_S3TRIO
+	bool "S3 Trio display support"
+	depends on FB && PPC
+	help
+	  If you have a S3 Trio say Y. Say N for S3 Virge.
+
+config FB_VGA16
+	tristate "VGA 16-color graphics console"
+	depends on FB && (X86 || PPC)
+	help
+	  This is the frame buffer device driver for VGA 16 color graphic
+	  cards. Say Y if you have such a card.
+
+	  This code is also available as a module. If you want to compile it
+	  as a module ( = code which can be inserted in and removed from the
+	  running kernel whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called
+	  vga16fb.o.
+
+config FB_STI
+	bool "Generic STI frame buffer device support"
+	depends on FB && PARISC
+	---help---
+	  STI refers to the HP "Standard Text Interface" which is a set of
+	  BIOS routines contained in a ROM chip in HP PA-RISC based machines.
+	  Enabling this option will implement the linux framebuffer device and
+	  an fbcon color text console using calls to the STI BIOS routines.
+	  The HP framebuffer device is usually planar, uses a strange memory
+	  layout, and changing the plane mask to create colored pixels
+	  requires a call to the STI routines, so do not expect /dev/fb to
+	  actually be useful.  However, it is the best we have as far as
+	  graphics on the HP chipsets due to lack of hardware level
+	  documentation for the various on-board HP chipsets used in these
+	  systems.  It is sufficient for basic text console functions,
+	  including fonts.
+
+	  You should probably enable this option, unless you are having
+	  trouble getting video when booting the kernel (make sure it isn't
+	  just that you are running the console on the serial port, though).
+	  Really old HP boxes may not have STI, and must use the PDC BIOS
+	  console or the IODC BIOS.
+
+config FB_MAC
+	bool
+	depends on FB && MAC
+	default y
+
+#      bool '  Apple DAFB display support' CONFIG_FB_DAFB
+config FB_HP300
+	bool
+	depends on FB && HP300
+	default y
+
+config FB_TGA
+	tristate "TGA framebuffer support"
+	depends on FB && ALPHA
+	help
+	  This is the frame buffer device driver for generic TGA graphic
+	  cards. Say Y if you have one of those.
+
+config FB_VESA
+	bool "VESA VGA graphics console"
+	depends on FB && X86
+	help
+	  This is the frame buffer device driver for generic VESA 2.0
+	  compliant graphic cards. The older VESA 1.2 cards are not supported.
+	  You will get a boot time penguin logo at no additional cost. Please
+	  read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
+
+config FB_HGA
+	tristate "Hercules mono graphics console (EXPERIMENTAL)"
+	depends on FB && X86
+	help
+	  Say Y here if you have a Hercules mono graphics card.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called hgafb.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  As this card technology is 15 years old, most people will answer N
+	  here.
+
+config VIDEO_SELECT
+	bool
+	depends on FB && X86
+	default y
+
+config FB_SGIVW
+	tristate "SGI Visual Workstation framebuffer support"
+	depends on FB && VISWS
+	help
+	  SGI Visual Workstation support for framebuffer graphics.
+
+config BUS_I2C
+	bool
+	depends on FB && VISWS
+	default y
+
+config FB_SUN3
+	bool "Sun3 framebuffer support"
+	depends on FB && (SUN3 || SUN3X)
+
+config FB_BWTWO
+	bool "BWtwo support"
+	depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+	help
+	  This is the frame buffer device driver for the BWtwo frame buffer.
+
+config FB_CGTHREE
+	bool "CGthree support"
+	depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+	help
+	  This is the frame buffer device driver for the CGthree frame buffer.
+
+config FB_CGSIX
+	bool "CGsix (GX,TurboGX) support"
+	depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+	help
+	  This is the frame buffer device driver for the CGsix (GX, TurboGX)
+	  frame buffer.
+
+config FB_PVR2
+	tristate "NEC PowerVR 2 display support"
+	depends on FB && SH_DREAMCAST
+	---help---
+	  Say Y here if you have a PowerVR 2 card in your box.  If you plan to
+	  run linux on your Dreamcast, you will have to say Y here.
+	  This driver may or may not work on other PowerVR 2 cards, but is
+	  totally untested.  Use at your own risk.  If unsure, say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called pvr2fb.o.  If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  You can pass several parameters to the driver at boot time or at
+	  module load time.  The parameters look like "video=pvr2:XXX", where
+	  the meaning of XXX can be found at the end of the main source file
+	  (<file:drivers/video/pvr2fb.c>). Please see the file
+	  <file:Documentation/fb/pvr2fb.txt>.
+
+config FB_PVR2_DEBUG
+	bool "Debug pvr2fb"
+	depends on FB_PVR2=y
+	help
+	  Say Y here if you wish for the pvr2fb driver to print out debugging
+	  messages. Most people will want to say N here. If unsure, you will
+	  also want to say N.
+
+config FB_E1355
+	bool "Epson 1355 framebuffer support"
+	depends on FB && SUPERH
+	help
+	  Build in support for the SED1355 Epson Research Embedded RAMDAC
+	  LCD/CRT Controller (since redesignated as the S1D13505) as a
+	  framebuffer.  Product specs at
+	  <http://www.erd.epson.com/vdc/html/products.htm>.
+
+config E1355_REG_BASE
+	hex "Register Base Address"
+	depends on FB_E1355
+	default "a8000000"
+	help
+	  Epson SED1355/S1D13505 LCD/CRT controller register base address.
+	  See the manuals at
+	  <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for
+	  discussion.
+
+config E1355_FB_BASE
+	hex "Framebuffer Base Address"
+	depends on FB_E1355
+	default "a8200000"
+	help
+	  Epson SED1355/S1D13505 LCD/CRT controller memory base address.  See
+	  the manuals at
+	  <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for
+	  discussion.
+
+config FB_RIVA
+	tristate "nVidia Riva support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  This driver supports graphics boards with the nVidia Riva/Geforce
+	  chips.
+	  Say Y if you have such a graphics board.
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called rivafb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config FB_MATROX
+	tristate "Matrox acceleration (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	---help---
+	  Say Y here if you have a Matrox Millennium, Matrox Millennium II,
+	  Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
+	  Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video,
+	  Matrox G400, G450 or G550 card in your box.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called matroxfb.o. If you want to compile it as
+	  a module, say M here and read <file:Documentation/modules.txt>.
+
+	  You can pass several parameters to the driver at boot time or at
+	  module load time. The parameters look like "video=matrox:XXX", and
+	  are described in <file:Documentation/fb/matroxfb.txt>.
+
+config FB_MATROX_MILLENIUM
+	bool "Millennium I/II support"
+	depends on FB_MATROX
+	help
+	  Say Y here if you have a Matrox Millennium or Matrox Millennium II
+	  video card. If you select "Advanced lowlevel driver options" below,
+	  you should check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp
+	  packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can
+	  also use font widths different from 8.
+
+config FB_MATROX_MYSTIQUE
+	bool "Mystique support"
+	depends on FB_MATROX
+	help
+	  Say Y here if you have a Matrox Mystique or Matrox Mystique 220
+	  video card. If you select "Advanced lowlevel driver options" below,
+	  you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp
+	  packed pixel and 32 bpp packed pixel. You can also use font widths
+	  different from 8.
+
+config FB_MATROX_G450
+	bool "G100/G200/G400/G450/G550 support"
+	depends on FB_MATROX
+	---help---
+	  Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based
+	  video card. If you select "Advanced lowlevel driver options", you
+	  should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
+	  pixel and 32 bpp packed pixel. You can also use font widths
+	  different from 8.
+
+	  If you need support for G400 secondary head, you must first say Y to
+	  "I2C support" and "I2C bit-banging support" in the character devices
+	  section, and then to "Matrox I2C support" and "G400 second head
+	  support" here in the framebuffer section. G450/G550 secondary head
+	  and digital output are supported without additional modules.
+
+	  The driver starts in monitor mode. You must use the matroxset tool 
+	  (available at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to 
+	  swap primary and secondary head outputs, or to change output mode.  
+	  Secondary head driver always start in 640x480 resolution and you 
+	  must use fbset to change it.
+
+	  Do not forget that second head supports only 16 and 32 bpp
+	  packed pixels, so it is a good idea to compile them into the kernel
+	  too. You can use only some font widths, as the driver uses generic
+	  painting procedures (the secondary head does not use acceleration
+	  engine).
+
+	  G450/G550 hardware can display TV picture only from secondary CRTC,
+	  and it performs no scaling, so picture must have 525 or 625 lines.
+
+config FB_MATROX_G100A
+	bool "G100/G200/G400 support"
+	depends on FB_MATROX && !FB_MATROX_G450
+	---help---
+	  Say Y here if you have a Matrox G100, G200 or G400 based
+	  video card. If you select "Advanced lowlevel driver options", you
+	  should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed
+	  pixel and 32 bpp packed pixel. You can also use font widths
+	  different from 8.
+
+	  If you need support for G400 secondary head, you must first say Y to
+	  "I2C support" and "I2C bit-banging support" in the character devices
+	  section, and then to "Matrox I2C support" and "G400 second head
+	  support" here in the framebuffer section.
+
+config FB_MATROX_G100
+	bool
+	depends on FB_MATROX && (FB_MATROX_G450 || FB_MATROX_G100A)
+	default y
+
+config FB_MATROX_I2C
+	tristate "Matrox I2C support"
+	depends on FB_MATROX && I2C_ALGOBIT
+	---help---
+	  This drivers creates I2C buses which are needed for accessing the
+	  DDC (I2C) bus present on all Matroxes, an I2C bus which
+	  interconnects Matrox optional devices, like MGA-TVO on G200 and
+	  G400, and the secondary head DDC bus, present on G400 only.
+
+	  You can say Y or M here if you want to experiment with monitor
+	  detection code. You must say Y or M here if you want to use either
+	  second head of G400 or MGA-TVO on G200 or G400.
+
+	  If you compile it as module, it will create a module named
+	  i2c-matroxfb.o.
+
+config FB_MATROX_MAVEN
+	tristate "G400 second head support"
+	depends on FB_MATROX_G100 && FB_MATROX_I2C
+	---help---
+	  WARNING !!! This support does not work with G450 !!!
+
+	  Say Y or M here if you want to use a secondary head (meaning two
+	  monitors in parallel) on G400 or MGA-TVO add-on on G200. Secondary
+	  head is not compatible with accelerated XFree 3.3.x SVGA servers -
+	  secondary head output is blanked while you are in X. With XFree
+	  3.9.17 preview you can use both heads if you use SVGA over fbdev or
+	  the fbdev driver on first head and the fbdev driver on second head.
+
+	  If you compile it as module, two modules are created,
+	  matroxfb_crtc2.o and matroxfb_maven.o. Matroxfb_maven is needed for
+	  both G200 and G400, matroxfb_crtc2 is needed only by G400. You must
+	  also load i2c-matroxfb to get it to run.
+
+	  The driver starts in monitor mode and you must use the matroxset
+	  tool (available at
+	  <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to switch it to
+	  PAL or NTSC or to swap primary and secondary head outputs.
+	  Secondary head driver also always start in 640x480 resolution, you
+	  must use fbset to change it.
+
+	  Also do not forget that second head supports only 16 and 32 bpp
+	  packed pixels, so it is a good idea to compile them into the kernel
+	  too.  You can use only some font widths, as the driver uses generic
+	  painting procedures (the secondary head does not use acceleration
+	  engine).
+
+config FB_MATROX_MULTIHEAD
+	bool "Multihead support"
+	depends on FB_MATROX
+	---help---
+	  Say Y here if you have more than one (supported) Matrox device in
+	  your computer and you want to use all of them for different monitors
+	  ("multihead"). If you have only one device, you should say N because
+	  the driver compiled with Y is larger and a bit slower, especially on
+	  ia32 (ix86).
+
+	  If you said M to "Matrox unified accelerated driver" and N here, you
+	  will still be able to use several Matrox devices simultaneously:
+	  insert several instances of the module matroxfb.o into the kernel
+	  with insmod, supplying the parameter "dev=N" where N is 0, 1, etc.
+	  for the different Matrox devices. This method is slightly faster but
+	  uses 40 KB of kernel memory per Matrox card.
+
+	  There is no need for enabling 'Matrox multihead support' if you have
+	  only one Matrox card in the box.
+
+config FB_ATY_CT
+	bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" if EXPERIMENTAL
+	depends on PCI && FB_ATY
+	default y if SPARC64 && FB_PCI
+	help
+	  Say Y here to support use of ATI's 64-bit Rage boards (or other
+	  boards based on the Mach64 CT, VT, GT, and LT chipsets) as a
+	  framebuffer device.  The ATI product support page for these boards
+	  is at <http://support.ati.com/products/pc/mach64/>.
+
+config FB_RADEON
+	tristate "ATI Radeon display support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  Choose this option if you want to use an ATI Radeon graphics card as
+	  a framebuffer device.  There are both PCI and AGP versions.  You
+	  don't need to choose this to run the Radeon in plain VGA mode.
+	  There is a product page at
+	  <http://www.ati.com/na/pages/products/pc/radeon32/index.html>.
+
+config FB_ATY128
+	tristate "ATI Rage128 display support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  This driver supports graphics boards with the ATI Rage128 chips.
+	  Say Y if you have such a graphics board and read
+	  <file:Documentation/fb/aty128fb.txt>.
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called aty128fb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config FB_SIS
+	tristate "SIS acceleration (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  This is the frame buffer device driver for the SiS 630 and 640 Super
+	  Socket 7 UMA cards.  Specs available at <http://www.sis.com.tw/>.
+
+config FB_SIS_300
+	bool "SIS 630/540/730 support"
+	depends on FB_SIS
+	help
+	  This is the frame buffer device driver for the SiS 630 and related
+	  Super Socket 7 UMA cards.  Specs available at
+	  <http://www.sis.com.tw/>.
+
+config FB_SIS_315
+	bool "SIS 315H/315 support"
+	depends on FB_SIS
+	help
+	  This is the frame buffer device driver for the SiS 315 graphics
+	  card.  Specs available at <http://www.sis.com.tw/>.
+
+config FB_NEOMAGIC
+	tristate "NeoMagic display support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  This driver supports notebooks with NeoMagic PCI chips.
+	  Say Y if you have such a graphics card. 
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called neofb.o. If you want to compile it as a
+	  module, say M here and read Documentation/modules.txt.
+
+config FB_3DFX
+	tristate "3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  This driver supports graphics boards with the 3Dfx Banshee/Voodoo3
+	  chips. Say Y if you have such a graphics board.
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called tdfxfb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config FB_VOODOO1
+	tristate "3Dfx Voodoo Graphics (sst1) support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	---help---
+	  Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or 
+	  Voodoo2 (cvg) based graphics card.
+
+	  This driver is also available as a module ( = code which can be 
+	  inserted and removed from the running kernel whenever you want).
+	  The module will be called sstfb.o. If you want to compile it as
+	  a module, say M here and read Documentation/modules.txt.
+
+	  WARNING: Do not use any application that uses the 3D engine
+	  (namely glide) while using this driver.
+	  Please read the file Documentation/fb/README-sstfb.txt for supported
+	  options and other important info  support.
+
+config FB_TRIDENT
+	tristate "Trident support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	---help---
+	  This driver is supposed to support graphics boards with the
+	  Trident CyberXXXX/Image/CyberBlade chips mostly found in laptops
+	  but also on some motherboards. For more information, read
+	  <file:Documentation/fb/tridentfb.txt>
+
+	  Say Y if you have such a graphics board.
+
+	  The driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called rivafb.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config FB_PM3
+	tristate "Permedia3 support (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL && PCI
+	help
+	  This is the frame buffer device driver for the 3DLabs Permedia3
+	  chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 &
+	  similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000
+	  and maybe other boards.
+
+config FB_SBUS
+	bool "SBUS and UPA framebuffers"
+	depends on FB && (SPARC32 || SPARC64)
+	help
+	  Say Y if you want support for SBUS or UPA based frame buffer device.
+
+config FB_CREATOR
+	bool "Creator/Creator3D support"
+	depends on FB_SBUS && SPARC64
+	help
+	  This is the frame buffer device driver for the Creator and Creator3D
+	  graphics boards.
+
+config FB_TCX
+	bool "TCX (SS4/SS5 only) support"
+	depends on FB_SBUS && SPARC32
+	help
+	  This is the frame buffer device driver for the TCX 24/8bit frame
+	  buffer.
+
+config FB_CGFOURTEEN
+	bool "CGfourteen (SX) support"
+	depends on FB_SBUS && SPARC32
+	help
+	  This is the frame buffer device driver for the CGfourteen frame
+	  buffer on Desktop SPARCsystems with the SX graphics option.
+
+config FB_P9100
+	bool "P9100 (Sparcbook 3 only) support"
+	depends on FB_SBUS && SPARC32
+	help
+	  This is the frame buffer device driver for the P9100 card
+	  supported on Sparcbook 3 machines.
+
+config FB_LEO
+	bool "Leo (ZX) support"
+	depends on FB_SBUS
+	help
+	  This is the frame buffer device driver for the SBUS-based Sun ZX
+	  (leo) frame buffer cards.
+
+config FB_PCI
+	bool "PCI framebuffers"
+	depends on FB && PCI && (SPARC64 || SPARC32)
+
+config FB_IGA
+	bool "IGA 168x display support"
+	depends on SPARC32 && FB_PCI
+	help
+	  This is the framebuffer device for the INTERGRAPHICS 1680 and
+	  successor frame buffer cards.
+
+config FB_HIT
+	tristate "HD64461 Frame Buffer support"
+	depends on FB && HD64461
+	help
+	  This is the frame buffer device driver for the Hitachi HD64461 LCD
+	  frame buffer card.
+
+config FB_PMAG_BA
+	bool "PMAG-BA TURBOchannel framebuffer support"
+	depends on FB && DECSTATION && TC
+	help
+	  Say Y here to directly support the on-board PMAG-BA framebuffer in
+	  the 5000/1xx versions of the DECstation.  There is a page dedicated
+	  to Linux on DECstations at <http://decstation.unix-ag.org/>.
+
+config FB_PMAGB_B
+	bool "PMAGB-B TURBOchannel framebuffer spport"
+	depends on FB && DECSTATION && TC
+	help
+	  Say Y here to directly support the on-board PMAGB-B framebuffer in
+	  the 5000/1xx versions of the DECstation.  There is a page dedicated
+	  to Linux on DECstations at <http://decstation.unix-ag.org/>.
+
+config FB_MAXINE
+	bool "Maxine (Personal DECstation) onboard framebuffer spport"
+	depends on FB && DECSTATION && TC
+	help
+	  Say Y here to directly support the on-board framebuffer in the
+	  Maxine (5000/20, /25, /33) version of the DECstation.  There is a
+	  page dedicated to Linux on DECstations at <http://decstation.unix-ag.org/>.
+
+config FB_TX3912
+	bool "TMPTX3912/PR31700 frame buffer support"
+	depends on FB && NINO
+	help
+	  The TX3912 is a Toshiba RISC processor based on the MIPS 3900 core
+	  see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>.
+
+	  Say Y here to enable kernel support for the on-board framebuffer.
+
+config FB_VIRTUAL
+	tristate "Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)"
+	depends on FB && EXPERIMENTAL
+	---help---
+	  This is a `virtual' frame buffer device. It operates on a chunk of
+	  unswappable kernel memory instead of on the memory of a graphics
+	  board. This means you cannot see any output sent to this frame
+	  buffer device, while it does consume precious memory. The main use
+	  of this frame buffer device is testing and debugging the frame
+	  buffer subsystem. Do NOT enable it for normal systems! To protect
+	  the innocent, it has to be enabled explicitly at boot time using the
+	  kernel option `video=vfb:'.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted and removed from the running kernel whenever you want). The
+	  module will be called vfb.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+config FBCON_ADVANCED
+	bool "Advanced low level driver options"
+	depends on FB
+	---help---
+	  The frame buffer console uses character drawing routines that are
+	  tailored to the specific organization of pixels in the memory of
+	  your graphics hardware. These are called the low level frame buffer
+	  console drivers. Note that they are used for text console output
+	  only; they are NOT needed for graphical applications.
+
+	  If you say N here, the needed low level drivers are automatically
+	  enabled, depending on what frame buffer devices you selected above.
+	  This is recommended for most users.
+
+	  If you say Y here, you have more fine-grained control over which low
+	  level drivers are enabled. You can e.g. leave out low level drivers
+	  for color depths you do not intend to use for text consoles.
+
+	  Low level frame buffer console drivers can be modules ( = code which
+	  can be inserted and removed from the running kernel whenever you
+	  want). The modules will be called fbcon-*.o. If you want to compile
+	  (some of) them as modules, read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+config FBCON_MFB
+	tristate "Monochrome support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && !FB_ACORN && FB_AMIGA!=y && !FB_ATARI && FB_CYBER!=y && !FB_BWTWO && FB_RETINAZ3!=y && !FB_VIRGE && FB_CLGEN!=y && (FB_AMIGA=m || FB_CYBER=m || FB_RETINAZ3=m || FB_CLGEN=m)
+	default y if !FBCON_ADVANCED && (FB_ACORN || FB_AMIGA=y || FB_ATARI || FB_CYBER=y || FB_BWTWO || FB_RETINAZ3=y || FB_VIRGE || FB_CLGEN=y)
+	help
+	  This is the low level frame buffer console driver for monochrome
+	  (2 colors) packed pixels.
+
+config FBCON_CFB2
+	tristate "2 bpp packed pixels support" if FBCON_ADVANCED
+	depends on FB
+	default y if !FBCON_ADVANCED && (FB_ACORN || FB_SA1100)
+	help
+	  This is the low level frame buffer console driver for 2 bits per
+	  pixel (4 colors) packed pixels.
+
+config FBCON_CFB4
+	tristate "4 bpp packed pixels support" if FBCON_ADVANCED
+	depends on FB
+	default y if !FBCON_ADVANCED && (FB_ACORN || FB_SA1100)
+	help
+	  This is the low level frame buffer console driver for 4 bits per
+	  pixel (16 colors) packed pixels.
+
+config FBCON_CFB8
+	tristate "8 bpp packed pixels support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && !FB_ACORN && !FB_ATARI && !FB_P9100 && FB_CYBER2000!=y && FB_RADEON!=y && FB_TGA!=y && FB_SIS!=y && FB_PM3!=y && !FB_TCX && !FB_CGTHREE && !FB_CONTROL && FB_CLGEN!=y && !FB_CGFOURTEEN && FB_TRIDENT!=y && !FB_VIRGE && FB_CYBER!=y && !FB_VALKYRIE && !FB_PLATINUM && !FB_IGA && FB_MATROX!=y && !FB_CT65550 && FB_PM2!=y && !FB_SA1100 && (FB_CYBER2000=m || FB_RADEON=m || FB_TGA=m || FB_SIS=m || FB_PM3=m || FB_CLGEN=m || FB_TRIDENT=m || FB_CYBER=m || FB_MATROX=m || FB_PM2=m)
+	default y if !FBCON_ADVANCED && (FB_ACORN || FB_ATARI || FB_P9100 || FB_CYBER2000=y || FB_RADEON=y || FB_TGA=y || FB_SIS=y || FB_PM3=y || FB_TCX || FB_CGTHREE || FB_CONTROL || FB_CLGEN=y || FB_CGFOURTEEN || FB_TRIDENT=y || FB_VIRGE || FB_CYBER=y || FB_VALKYRIE || FB_PLATINUM || FB_IGA || FB_MATROX=y || FB_CT65550 || FB_PM2=y || FB_SA1100)
+	help
+	  This is the low level frame buffer console driver for 8 bits per
+	  pixel (256 colors) packed pixels.
+
+config FBCON_CFB16
+	tristate "16 bpp packed pixels support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && !FB_ATARI && FB_PM3!=y && FB_SIS!=y && FB_PVR2!=y && FB_TRIDENT!=y && !FB_TBOX && FB_VOODOO1!=y && FB_RADEON!=y && !FB_CONTROL && FB_CLGEN!=y && !FB_VIRGE && FB_CYBER!=y && !FB_VALKYRIE && !FB_PLATINUM && !FB_CT65550 && FB_MATROX!=y && FB_PM2!=y && FB_CYBER2000!=y && !FB_SA1100 && (FB_SIS=m || FB_RADEON=m || FB_PVR2=m || FB_TRIDENT=m || FB_VOODOO1=m || FB_PM3=m || FB_CLGEN=m || FB_CYBER=m || FB_MATROX=m || FB_PM2=m || FB_CYBER2000=m || FB_SA1100)
+	default y if !FBCON_ADVANCED && (FB_ATARI || FB_PM3=y || FB_SIS=y || FB_PVR2=y || FB_TRIDENT=y || FB_TBOX || FB_VOODOO1=y || FB_RADEON=y || FB_CONTROL || FB_CLGEN=y || FB_VIRGE || FB_CYBER=y || FB_VALKYRIE || FB_PLATINUM || FB_CT65550 || FB_MATROX=y || FB_PM2=y || FB_CYBER2000=y || FB_SA1100)
+	help
+	  This is the low level frame buffer console driver for 15 or 16 bits
+	  per pixel (32K or 64K colors, also known as `hicolor') packed
+	  pixels.
+
+config FBCON_CFB24
+	tristate "24 bpp packed pixels support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && FB_ATY!=y && FB_VIRTUAL!=y && FB_CLGEN!=y && !FB_VESA && FB_MATROX!=y && FB_PM2!=y && FB_ATY128!=y && FB_RADEON!=y && FB_CYBER2000!=y && FB_PVR2!=y && FB_VOODOO1!=y && FB_NEOMAGIC!=y && (FB_ATY=m || FB_VIRTUAL=m || FB_CLGEN=m || FB_MATROX=m || FB_PM2=m || FB_ATY128=m || FB_RADEON=m || FB_CYBER2000=m || FB_PVR2=m || FB_VOODOO1=m || FB_NEOMAGIC=y)
+	default y if !FBCON_ADVANCED && (FB_ATY=y || FB_VIRTUAL=y || FB_CLGEN=y || FB_VESA || FB_MATROX=y || FB_PM2=y || FB_ATY128=y || FB_RADEON=y || FB_CYBER2000=y || FB_PVR2=y || FB_VOODOO1=y || FB_NEOMAGIC=y)
+	help
+	  This is the low level frame buffer console driver for 24 bits per
+	  pixel (16M colors, also known as `truecolor') packed pixels. It is
+	  NOT for `sparse' 32 bits per pixel mode.
+
+config FBCON_CFB32
+	tristate "32 bpp packed pixels support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && !FB_ATARI && FB_RADEON!=y && FB_VOODOO1!=y && FB_TRIDENT!=y && !FB_CONTROL && FB_CLGEN!=y && FB_TGA!=y && !FB_PLATINUM && FB_MATROX!=y && FB_PM2!=y && FB_PVR2!=y && FB_PM3!=y && FB_SIS!=y && (FB_RADEON=m || FB_VOODOO1=m || FB_TRIDENT=m || FB_CLGEN=m || FB_TGA=m || FB_MATROX=m || FB_PM2=m || FB_SIS=m || FB_PVR2=m || FB_PM3=m)
+	default y if !FBCON_ADVANCED && (FB_ATARI || FB_RADEON=y || FB_VOODOO1=y || FB_TRIDENT=y || FB_CONTROL || FB_CLGEN=y || FB_TGA=y || FB_PLATINUM || FB_MATROX=y || FB_PM2=y || FB_PVR2=y || FB_PM3=y || FB_SIS=y)
+	help
+	  This is the low level frame buffer console driver for 32 bits per
+	  pixel (16M colors, also known as `truecolor') sparse packed pixels.
+
+config FBCON_ACCEL
+	tristate "Hardware acceleration support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && FB_NEOMAGIC!=y && !FB_VESA && !FB_FM2 && FB_HIT!=y && !FB_HP300 && !FB_Q40 && !FB_ANAKIN && !FB_G364 && FB_VIRTUAL!=y && !FB_CLPS711X && !FB_PMAG_BA && !FB_PMAGB_B && FB_3DFX!=y && !FB_TX3912 && !FB_MAXINE && !FB_APOLLO && FB_ATY!=y && !FB_MAC && FB_RIVA!=y && !FB_OF && FB_SGIVW!=y && (FB_NEOMAGIC=m || FB_HIT=m || FB_VIRTUAL=m || FB_3DFX=m || FB_RIVA=m || FB_SGIVW=m)
+	default y if !FBCON_ADVANCED && (FB_NEOMAGIC=y || FB_VESA || FB_FM2 || FB_HIT=y || FB_HP300 || FB_Q40 || FB_ANAKIN || FB_G364 || FB_VIRTUAL=y || FB_CLPS711X || FB_PMAG_BA || FB_PMAGB_B || FB_3DFX=y || FB_TX3912 || FB_MAXINE || FB_APOLLO || FB_ATY=y || FB_MAC || FB_RIVA=y || FB_OF || FB_SGIVW=y)
+
+config FBCON_AFB
+	tristate "Amiga bitplanes support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && FB_AMIGA=m
+	default y if !FBCON_ADVANCED && FB_AMIGA=y
+	help
+	  This is the low level frame buffer console driver for 1 to 8
+	  bitplanes (2 to 256 colors) on Amiga.
+
+config FBCON_ILBM
+	tristate "Amiga interleaved bitplanes support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && FB_AMIGA=m
+	default y if !FBCON_ADVANCED && FB_AMIGA=y
+	help
+	  This is the low level frame buffer console driver for 1 to 8
+	  interleaved bitplanes (2 to 256 colors) on Amiga.
+
+config FBCON_IPLAN2P2
+	tristate "Atari interleaved bitplanes (2 planes) support" if FBCON_ADVANCED
+	depends on FB
+	default y if !FBCON_ADVANCED && FB_ATARI
+	help
+	  This is the low level frame buffer console driver for 2 interleaved
+	  bitplanes (4 colors) on Atari.
+
+config FBCON_IPLAN2P4
+	tristate "Atari interleaved bitplanes (4 planes) support" if FBCON_ADVANCED
+	depends on FB
+	default y if !FBCON_ADVANCED && FB_ATARI
+	help
+	  This is the low level frame buffer console driver for 4 interleaved
+	  bitplanes (16 colors) on Atari.
+
+config FBCON_IPLAN2P8
+	tristate "Atari interleaved bitplanes (8 planes) support" if FBCON_ADVANCED
+	depends on FB
+	default y if !FBCON_ADVANCED && FB_ATARI
+	help
+	  This is the low level frame buffer console driver for 8 interleaved
+	  bitplanes (256 colors) on Atari.
+
+#      tristate '    Atari interleaved bitplanes (16 planes) support' CONFIG_FBCON_IPLAN2P16
+config FBCON_VGA_PLANES
+	tristate "VGA 16-color planar support" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && FB_VGA16=m
+	default y if !FBCON_ADVANCED && FB_VGA16=y
+	help
+	  This low level frame buffer console driver enable the kernel to use
+	  the 16-color planar modes of the old VGA cards where the bits of
+	  each pixel are separated into 4 planes.
+
+	  Only answer Y here if you have a (very old) VGA card that isn't VESA
+	  2 compatible.
+
+config FBCON_HGA
+	tristate "HGA monochrome support (EXPERIMENTAL)" if FBCON_ADVANCED
+	depends on FB
+	default m if !FBCON_ADVANCED && FB_HGA=m
+	default y if !FBCON_ADVANCED && FB_HGA=y
+	help
+	  This is the low level frame buffer console driver for Hercules mono
+	  graphics cards.
+
+# Guess what we need
+config FBCON_STI
+	tristate
+	depends on !FBCON_ADVANCED && FB_STI
+	default y
+
+config FBCON_FONTWIDTH8_ONLY
+	bool "Support only 8 pixels wide fonts"
+	depends on FB
+	help
+	  Answer Y here will make the kernel provide only the 8x8 fonts (these
+	  are the less readable).
+
+	  If unsure, say N.
+
+config FONT_SUN8x16
+	bool "Sparc console 8x16 font"
+	depends on FB && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64)
+	help
+	  This is the high resolution console font for Sun machines. Say Y.
+
+config FONT_SUN12x22
+	bool "Sparc console 12x22 font (not supported by all drivers)"
+	depends on FB && !FBCON_FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64)
+	help
+	  This is the high resolution console font for Sun machines with very
+	  big letters (like the letters used in the SPARC PROM). If the
+	  standard font is unreadable for you, say Y, otherwise say N.
+
+config FBCON_FONTS
+	bool "Select other fonts" if SPARC32 || SPARC64
+	depends on FB
+	help
+	  Say Y here if you would like to use fonts other than the default
+	  your frame buffer console usually use.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about foreign fonts.
+
+	  If unsure, say N (the default choices are safe).
+
+config FBCON_FONTS
+	prompt "Select compiled-in fonts"
+	depends on FB && !SPARC32 && !SPARC64
+
+config FONT_8x8
+	bool "VGA 8x8 font" if FBCON_FONTS
+	depends on FB
+	default y if !SPARC32 && !SPARC64 && !FBCON_FONTS
+	help
+	  This is the "high resolution" font for the VGA frame buffer (the one
+	  provided by the text console 80x50 (and higher) modes).
+
+	  Note that this is a poor quality font. The VGA 8x16 font is quite a
+	  lot more readable.
+
+	  Given the resolution provided by the frame buffer device, answer N
+	  here is safe.
+
+config FONT_8x16
+	bool "VGA 8x16 font" if FBCON_FONTS
+	depends on FB
+	default y if !SPARC32 && !SPARC64 && !FBCON_FONTS
+	help
+	  This is the "high resolution" font for the VGA frame buffer (the one
+	  provided by the VGA text console 80x25 mode.
+
+	  If unsure, say Y.
+
+config FONT_6x11
+	bool "Mac console 6x11 font (not supported by all drivers)" if FBCON_FONTS
+	depends on FB && !FBCON_FONTWIDTH8_ONLY
+	default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && MAC
+	help
+	  Small console font with Macintosh-style high-half glyphs.  Some Mac
+	  framebuffer drivers don't support this one at all.
+
+config FONT_PEARL_8x8
+	bool "Pearl (old m68k) console 8x8 font" if FBCON_FONTS
+	depends on FB
+	default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && AMIGA
+	help
+	  Small console font with PC-style control-character and high-half
+	  glyphs.
+
+config FONT_ACORN_8x8
+	bool "Acorn console 8x8 font" if FBCON_FONTS
+	depends on FB
+	default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && ARM && ARCH_ACORN
+	help
+	  Small console font with PC-style control characters and high-half
+	  glyphs.
+
+config FONT_MINI_4x6
+	bool "Mini 4x6 font"
+	depends on !SPARC32 && !SPARC64 && FBCON_FONTS
+
+endmenu
+
diff -Nru a/drivers/video/bwtwofb.c b/drivers/video/bwtwofb.c
--- a/drivers/video/bwtwofb.c	Wed Oct 30 16:44:17 2002
+++ b/drivers/video/bwtwofb.c	Wed Oct 30 16:44:17 2002
@@ -113,7 +113,7 @@
 			 int x_margin, int y_margin)
 {
 	fb->info.screen_base += (y_margin - fb->y_margin) *
-		p->line_length + ((x_margin - fb->x_margin) >> 3);
+		p->fb_info->fix.line_length + ((x_margin - fb->x_margin) >> 3);
 }
 
 static u8 bw2regs_1600[] __initdata = {
@@ -155,7 +155,7 @@
 
 char __init *bwtwofb_init(struct fb_info_sbusfb *fb)
 {
-	struct fb_fix_screeninfo *fix = &fb->fix;
+	struct fb_fix_screeninfo *fix = &fb->info.fix;
 	struct display *disp = &fb->disp;
 	struct fbtype *type = &fb->type;
 #ifdef CONFIG_SUN4
@@ -232,7 +232,7 @@
 
 	strcpy(fb->info.modename, "BWtwo");
 	strcpy(fix->id, "BWtwo");
-	fix->line_length = fb->var.xres_virtual >> 3;
+	fix->line_length = fb->info.var.xres_virtual >> 3;
 	fix->accel = FB_ACCEL_SUN_BWTWO;
 	
 	disp->scrollmode = SCROLL_YREDRAW;
diff -Nru a/drivers/video/clgenfb.c b/drivers/video/clgenfb.c
--- a/drivers/video/clgenfb.c	Wed Oct 30 16:44:32 2002
+++ b/drivers/video/clgenfb.c	Wed Oct 30 16:44:32 2002
@@ -1,7 +1,7 @@
 /*
  * drivers/video/clgenfb.c - driver for Cirrus Logic chipsets
  *
- * Copyright 1999-2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+ * Copyright 1999-2001 Jeff Garzik <jgarzik@pobox.com>
  *
  * Contributors (thanks, all!)
  *
@@ -2885,7 +2885,7 @@
      *  Modularization
      */
 
-MODULE_AUTHOR("Copyright 1999,2000 Jeff Garzik <jgarzik@mandrakesoft.com>");
+MODULE_AUTHOR("Copyright 1999,2000 Jeff Garzik <jgarzik@pobox.com>");
 MODULE_DESCRIPTION("Accelerated FBDev driver for Cirrus Logic chips");
 MODULE_LICENSE("GPL");
 
diff -Nru a/drivers/video/clgenfb.h b/drivers/video/clgenfb.h
--- a/drivers/video/clgenfb.h	Wed Oct 30 16:44:29 2002
+++ b/drivers/video/clgenfb.h	Wed Oct 30 16:44:29 2002
@@ -1,7 +1,7 @@
 /*
  * drivers/video/clgenfb.h - Cirrus Logic chipset constants
  *
- * Copyright 1999 Jeff Garzik <jgarzik@mandrakesoft.com>
+ * Copyright 1999 Jeff Garzik <jgarzik@pobox.com>
  *
  * Original clgenfb author:  Frank Neumann
  *
diff -Nru a/drivers/video/leofb.c b/drivers/video/leofb.c
--- a/drivers/video/leofb.c	Wed Oct 30 16:44:36 2002
+++ b/drivers/video/leofb.c	Wed Oct 30 16:44:36 2002
@@ -258,7 +258,7 @@
 	sbus_writel(attr_bgcol(p,c) << 24, &ss->bg);
 	sbus_writel(0xFFFFFFFF<<(32-fontwidth(p)),
 		    &us->fontmsk);
-	u = ((u32 *)p->fb_info.screen_base) + y + x;
+	u = ((u32 *)fb->info.screen_base) + y + x;
 	if (fontwidth(p) <= 8) {
 		for (i = 0; i < fontheight(p); i++, u += 2048) {
 			u32 val = *fd++ << 24;
@@ -304,7 +304,7 @@
 		y = yy << (fontheightlog(p) + 11);
 	else
 		y = (yy * fontheight(p)) << 11;
-	u = ((u32 *)p->fb_info.screen_base) + y + x;
+	u = ((u32 *)fb->info.screen_base) + y + x;
 	if (fontwidth(p) <= 8) {
 		sbus_writel(0xFFFFFFFF<<(32-4*fontwidth(p)), &us->fontmsk);
 		x = 4*fontwidth(p) - fontheight(p)*2048;
@@ -594,7 +594,7 @@
 
 static void leo_margins (struct fb_info_sbusfb *fb, struct display *p, int x_margin, int y_margin)
 {
-	fb->fb_info.screen_base += 8192 * (y_margin - fb->y_margin) + 4 * (x_margin - fb->x_margin);
+	fb->info.screen_base += 8192 * (y_margin - fb->y_margin) + 4 * (x_margin - fb->x_margin);
 }
 
 static void leo_switch_from_graph (struct fb_info_sbusfb *fb)
@@ -640,8 +640,8 @@
 
 char * __init leofb_init(struct fb_info_sbusfb *fb)
 {
-	struct fb_fix_screeninfo *fix = &fb->fix;
-	struct fb_var_screeninfo *var = &fb->var;
+	struct fb_fix_screeninfo *fix = &fb->info.fix;
+	struct fb_var_screeninfo *var = &fb->info.var;
 	struct display *disp = &fb->disp;
 	struct fbtype *type = &fb->type;
 	struct sbus_dev *sdev = fb->sbdp;
diff -Nru a/drivers/video/riva/nv4ref.h b/drivers/video/riva/nv4ref.h
--- a/drivers/video/riva/nv4ref.h	Wed Oct 30 16:44:26 2002
+++ b/drivers/video/riva/nv4ref.h	Wed Oct 30 16:44:26 2002
@@ -41,7 +41,7 @@
  * GPL licensing note -- nVidia is allowing a liberal interpretation of
  * the documentation restriction above, to merely say that this nVidia's
  * copyright and disclaimer should be included with all code derived
- * from this source.  -- Jeff Garzik <jgarzik@mandrakesoft.com>, 01/Nov/99 
+ * from this source.  -- Jeff Garzik <jgarzik@pobox.com>, 01/Nov/99 
  */
 
  /***************************************************************************\
diff -Nru a/drivers/video/riva/riva_hw.c b/drivers/video/riva/riva_hw.c
--- a/drivers/video/riva/riva_hw.c	Wed Oct 30 16:44:26 2002
+++ b/drivers/video/riva/riva_hw.c	Wed Oct 30 16:44:26 2002
@@ -41,7 +41,7 @@
  * GPL licensing note -- nVidia is allowing a liberal interpretation of
  * the documentation restriction above, to merely say that this nVidia's
  * copyright and disclaimer should be included with all code derived
- * from this source.  -- Jeff Garzik <jgarzik@mandrakesoft.com>, 01/Nov/99 
+ * from this source.  -- Jeff Garzik <jgarzik@pobox.com>, 01/Nov/99 
  */
 
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.c,v 1.8 2000/02/08 17:19:11 dawes Exp $ */
diff -Nru a/drivers/video/riva/riva_hw.h b/drivers/video/riva/riva_hw.h
--- a/drivers/video/riva/riva_hw.h	Wed Oct 30 16:44:33 2002
+++ b/drivers/video/riva/riva_hw.h	Wed Oct 30 16:44:33 2002
@@ -41,7 +41,7 @@
  * GPL licensing note -- nVidia is allowing a liberal interpretation of
  * the documentation restriction above, to merely say that this nVidia's
  * copyright and disclaimer should be included with all code derived
- * from this source.  -- Jeff Garzik <jgarzik@mandrakesoft.com>, 01/Nov/99 
+ * from this source.  -- Jeff Garzik <jgarzik@pobox.com>, 01/Nov/99 
  */
 
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.h,v 1.6 2000/02/08 17:19:12 dawes Exp $ */
diff -Nru a/drivers/video/riva/riva_tbl.h b/drivers/video/riva/riva_tbl.h
--- a/drivers/video/riva/riva_tbl.h	Wed Oct 30 16:44:27 2002
+++ b/drivers/video/riva/riva_tbl.h	Wed Oct 30 16:44:27 2002
@@ -41,7 +41,7 @@
  * GPL licensing note -- nVidia is allowing a liberal interpretation of
  * the documentation restriction above, to merely say that this nVidia's
  * copyright and disclaimer should be included with all code derived
- * from this source.  -- Jeff Garzik <jgarzik@mandrakesoft.com>, 01/Nov/99 
+ * from this source.  -- Jeff Garzik <jgarzik@pobox.com>, 01/Nov/99 
  */
 
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_tbl.h,v 1.5 2000/02/08 17:19:12 dawes Exp $ */
diff -Nru a/drivers/video/tcxfb.c b/drivers/video/tcxfb.c
--- a/drivers/video/tcxfb.c	Wed Oct 30 16:44:24 2002
+++ b/drivers/video/tcxfb.c	Wed Oct 30 16:44:24 2002
@@ -253,14 +253,14 @@
 
 static void tcx_margins (struct fb_info_sbusfb *fb, struct display *p, int x_margin, int y_margin)
 {
-	fb->info.screen_base += (y_margin - fb->y_margin) * p->line_length + (x_margin - fb->x_margin);
+	fb->info.screen_base += (y_margin - fb->y_margin) * p->fb_info->fix.line_length + (x_margin - fb->x_margin);
 }
 
 static char idstring[60] __initdata = { 0 };
 
 char __init *tcxfb_init(struct fb_info_sbusfb *fb)
 {
-	struct fb_fix_screeninfo *fix = &fb->fix;
+	struct fb_fix_screeninfo *fix = &fb->info.fix;
 	struct display *disp = &fb->disp;
 	struct fbtype *type = &fb->type;
 	struct sbus_dev *sdev = fb->sbdp;
@@ -280,7 +280,7 @@
 		strcpy(fb->info.modename, "TCX24");
 		strcpy(fix->id, "TCX24");
 	}
-	fix->line_length = fb->var.xres_virtual;
+	fix->line_length = fb->info.var.xres_virtual;
 	fix->accel = FB_ACCEL_SUN_TCX;
 
 	disp->scrollmode = SCROLL_YREDRAW;
diff -Nru a/drivers/video/vga.h b/drivers/video/vga.h
--- a/drivers/video/vga.h	Wed Oct 30 16:44:24 2002
+++ b/drivers/video/vga.h	Wed Oct 30 16:44:24 2002
@@ -1,7 +1,7 @@
 /*
  * linux/include/video/vga.h -- standard VGA chipset interaction
  *
- * Copyright 1999 Jeff Garzik <jgarzik@mandrakesoft.com>
+ * Copyright 1999 Jeff Garzik <jgarzik@pobox.com>
  * 
  * Copyright history from vga16fb.c:
  *	Copyright 1999 Ben Pfaff and Petr Vandrovec
diff -Nru a/drivers/zorro/Config.help b/drivers/zorro/Config.help
--- a/drivers/zorro/Config.help	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-CONFIG_ZORRO_NAMES
-  By default, the kernel contains a database of all known Zorro device
-  names to make the information in /proc/iomem comprehensible to the
-  user. This database increases the size of the kernel image by about
-  15KB, but it gets freed after the system boots up, so it doesn't
-  take up kernel memory. Anyway, if you are building an installation
-  floppy or kernel for an embedded system where kernel image size
-  really matters, you can disable this feature and you'll get device
-  ID numbers instead of names.
-
-  When in doubt, say Y.
-
diff -Nru a/drivers/zorro/Config.in b/drivers/zorro/Config.in
--- a/drivers/zorro/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# Zorro configuration
-#
-
-if [ "$CONFIG_ZORRO" = "y" ]; then
-   bool 'Zorro device name database' CONFIG_ZORRO_NAMES
-fi
diff -Nru a/drivers/zorro/Kconfig b/drivers/zorro/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/zorro/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,18 @@
+#
+# Zorro configuration
+#
+config ZORRO_NAMES
+	bool "Zorro device name database"
+	depends on ZORRO
+	---help---
+	  By default, the kernel contains a database of all known Zorro device
+	  names to make the information in /proc/iomem comprehensible to the
+	  user. This database increases the size of the kernel image by about
+	  15KB, but it gets freed after the system boots up, so it doesn't
+	  take up kernel memory. Anyway, if you are building an installation
+	  floppy or kernel for an embedded system where kernel image size
+	  really matters, you can disable this feature and you'll get device
+	  ID numbers instead of names.
+
+	  When in doubt, say Y.
+
diff -Nru a/fs/Config.help b/fs/Config.help
--- a/fs/Config.help	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1154 +0,0 @@
-CONFIG_QUOTA
-  If you say Y here, you will be able to set per user limits for disk
-  usage (also called disk quotas). Currently, it works for the
-  ext2, ext3, and reiserfs file system. You need additional software
-  in order to use quota support (you can download sources from
-  <http://www.sf.net/projects/linuxquota/>). For further details, read
-  the Quota mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. Probably the quota
-  support is only useful for multi user systems. If unsure, say N.
-
-CONFIG_QFMT_V1
-  This quota format was (is) used by kernels earlier than 2.4.??. If
-  you have quota working and you don't want to convert to new quota
-  format say Y here.
-
-CONFIG_QFMT_V2
-  This quota format allows using quotas with 32-bit UIDs/GIDs. If you
-  need this functionality say Y here. Note that you will need latest
-  quota utilities for new quota format with this kernel.
-
-CONFIG_MINIX_FS
-  Minix is a simple operating system used in many classes about OS's.
-  The minix file system (method to organize files on a hard disk
-  partition or a floppy disk) was the original file system for Linux,
-  but has been superseded by the second extended file system ext2fs.
-  You don't want to use the minix file system on your hard disk
-  because of certain built-in restrictions, but it is sometimes found
-  on older Linux floppy disks.  This option will enlarge your kernel
-  by about 28 KB. If unsure, say N.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called minix.o.  Note that the file system of your root
-  partition (the one containing the directory /) cannot be compiled as
-  a module.
-
-CONFIG_REISERFS_FS
-  Stores not just filenames but the files themselves in a balanced
-  tree.  Uses journaling.
-
-  Balanced trees are more efficient than traditional file system
-  architectural foundations.
-
-  In general, ReiserFS is as fast as ext2, but is very efficient with
-  large directories and small files.  Additional patches are needed
-  for NFS and quotas, please see <http://www.reiserfs.org/> for links.
-
-  It is more easily extended to have features currently found in
-  database and keyword search systems than block allocation based file
-  systems are.  The next version will be so extended, and will support
-  plugins consistent with our motto ``It takes more than a license to
-  make source code open.''
-
-  Read <http://www.reiserfs.org/> to learn more about reiserfs.
-
-  Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com.
-
-  If you like it, you can pay us to add new features to it that you
-  need, buy a support contract, or pay us to port it to another OS.
-
-CONFIG_REISERFS_CHECK
-  If you set this to Y, then ReiserFS will perform every check it can
-  possibly imagine of its internal consistency throughout its
-  operation.  It will also go substantially slower.  More than once we
-  have forgotten that this was on, and then gone despondent over the
-  latest benchmarks.:-) Use of this option allows our team to go all
-  out in checking for consistency when debugging without fear of its
-  effect on end users.  If you are on the verge of sending in a bug
-  report, say Y and you might get a useful error message.  Almost
-  everyone should say N.
-
-CONFIG_REISERFS_PROC_INFO
-  Create under /proc/fs/reiserfs a hierarchy of files, displaying
-  various ReiserFS statistics and internal data at the expense of
-  making your kernel or module slightly larger (+8 KB). This also
-  increases the amount of kernel memory required for each mount.
-  Almost everyone but ReiserFS developers and people fine-tuning
-  reiserfs or tracing problems should say N.
-
-CONFIG_EXT2_FS
-  This is the de facto standard Linux file system (method to organize
-  files on a storage device) for hard disks.
-
-  You want to say Y here, unless you intend to use Linux exclusively
-  from inside a DOS partition using the UMSDOS file system. The
-  advantage of the latter is that you can get away without
-  repartitioning your hard drive (which often implies backing
-  everything up and restoring afterwards); the disadvantage is that
-  Linux becomes susceptible to DOS viruses and that UMSDOS is somewhat
-  slower than ext2fs. Even if you want to run Linux in this fashion,
-  it might be a good idea to have ext2fs around: it enables you to
-  read more floppy disks and facilitates the transition to a *real*
-  Linux partition later. Another (rare) case which doesn't require
-  ext2fs is a diskless Linux box which mounts all files over the
-  network using NFS (in this case it's sufficient to say Y to "NFS
-  file system support" below). Saying Y here will enlarge your kernel
-  by about 44 KB.
-
-  The Ext2fs-Undeletion mini-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, gives information about
-  how to retrieve deleted files on ext2fs file systems.
-
-  To change the behavior of ext2 file systems, you can use the tune2fs
-  utility ("man tune2fs"). To modify attributes of files and
-  directories on ext2 file systems, use chattr ("man chattr").
-
-  Ext2fs partitions can be read from within DOS using the ext2tool
-  command line tool package (available from
-  <ftp://ibiblio.org/pub/Linux/system/filesystems/ext2/>) and from
-  within Windows NT using the ext2nt command line tool package from
-  <ftp://ibiblio.org/pub/Linux/utils/dos/>.  Explore2fs is a
-  graphical explorer for ext2fs partitions which runs on Windows 95
-  and Windows NT and includes experimental write support; it is
-  available from
-  <http://jnewbigin-pc.it.swin.edu.au/Linux/Explore2fs.htm>.
-
-  If you want to compile this file system as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called ext2.o.  Be aware however that the file system
-  of your root partition (the one containing the directory /) cannot
-  be compiled as a module, and so this could be dangerous.  Most
-  everyone wants to say Y here.
-
-CONFIG_EXT3_FS
-  This is the journaling version of the Second extended file system
-  (often called ext3), the de facto standard Linux file system
-  (method to organize files on a storage device) for hard disks.
-
-  The journaling code included in this driver means you do not have
-  to run e2fsck (file system checker) on your file systems after a
-  crash.  The journal keeps track of any changes that were being made
-  at the time the system crashed, and can ensure that your file system
-  is consistent without the need for a lengthy check.
-
-  Other than adding the journal to the file system, the on-disk format
-  of ext3 is identical to ext2.  It is possible to freely switch
-  between using the ext3 driver and the ext2 driver, as long as the
-  file system has been cleanly unmounted, or e2fsck is run on the file
-  system.
-
-  To add a journal on an existing ext2 file system or change the
-  behavior of ext3 file systems, you can use the tune2fs utility ("man
-  tune2fs").  To modify attributes of files and directories on ext3
-  file systems, use chattr ("man chattr").  You need to be using
-  e2fsprogs version 1.20 or later in order to create ext3 journals
-  (available at <http://sourceforge.net/projects/e2fsprogs/>).
-
-  If you want to compile this file system as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called ext3.o.  Be aware however that the file system
-  of your root partition (the one containing the directory /) cannot
-  be compiled as a module, and so this may be dangerous.
-
-CONFIG_JBD
-  This is a generic journaling layer for block devices.  It is
-  currently used by the ext3 file system, but it could also be used to
-  add journal support to other file systems or block devices such as
-  RAID or LVM.
-
-  If you are using the ext3 file system, you need to say Y here. If
-  you are not using ext3 then you will probably want to say N.
-
-  If you want to compile this device as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called jbd.o.  If you are compiling ext3 into the kernel,
-  you cannot compile this code as a module.
-
-CONFIG_JBD_DEBUG
-  If you are using the ext3 journaled file system (or potentially any
-  other file system/device using JBD), this option allows you to
-  enable debugging output while the system is running, in order to
-  help track down any problems you are having.  By default the
-  debugging output will be turned off.
-
-  If you select Y here, then you will be able to turn on debugging
-  with "echo N > /proc/sys/fs/jbd-debug", where N is a number between
-  1 and 5, the higher the number, the more debugging output is
-  generated.  To turn debugging off again, do
-  "echo 0 > /proc/sys/fs/jbd-debug".
-
-CONFIG_BFS_FS
-  Boot File System (BFS) is a file system used under SCO UnixWare to
-  allow the bootloader access to the kernel image and other important
-  files during the boot process.  It is usually mounted under /stand
-  and corresponds to the slice marked as "STAND" in the UnixWare
-  partition.  You should say Y if you want to read or write the files
-  on your /stand slice from within Linux.  You then also need to say Y
-  to "UnixWare slices support", below.  More information about the BFS
-  file system is contained in the file
-  <file:Documentation/filesystems/bfs.txt>.
-
-  If you don't know what this is about, say N.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called bfs.o.  Note that the file system of your root
-  partition (the one containing the directory /) cannot be compiled as
-  a module.
-
-CONFIG_CRAMFS
-  Saying Y here includes support for CramFs (Compressed ROM File
-  System).  CramFs is designed to be a simple, small, and compressed
-  file system for ROM based embedded systems.  CramFs is read-only,
-  limited to 256MB file systems (with 16MB files), and doesn't support
-  16/32 bits uid/gid, hard links and timestamps.
-
-  See <file:Documentation/filesystems/cramfs.txt> and
-  <file:fs/cramfs/README> for further information.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called cramfs.o.  Note that the root file system (the one
-  containing the directory /) cannot be compiled as a module.
-
-  If unsure, say N.
-
-CONFIG_TMPFS
-  Tmpfs is a file system which keeps all files in virtual memory.
-
-  Everything in tmpfs is temporary in the sense that no files will be
-  created on your hard drive. The files live in memory and swap
-  space. If you unmount a tmpfs instance, everything stored therein is
-  lost.
-
-  See <file:Documentation/filesystems/tmpfs.txt> for details.
-
-CONFIG_RAMFS
-  Ramfs is a file system which keeps all files in RAM. It allows
-  read and write access.
-
-  It is more of an programming example than a useable file system.  If
-  you need a file system which lives in RAM with limit checking use
-  tmpfs.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ramfs.o.
-
-CONFIG_ISO9660_FS
-  This is the standard file system used on CD-ROMs.  It was previously
-  known as "High Sierra File System" and is called "hsfs" on other
-  Unix systems.  The so-called Rock-Ridge extensions which allow for
-  long Unix filenames and symbolic links are also supported by this
-  driver.  If you have a CD-ROM drive and want to do more with it than
-  just listen to audio CDs and watch its LEDs, say Y (and read
-  <file:Documentation/filesystems/isofs.txt> and the CD-ROM-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>), thereby
-  enlarging your kernel by about 27 KB; otherwise say N.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called isofs.o.
-
-CONFIG_JOLIET
-  Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
-  which allows for long filenames in unicode format (unicode is the
-  new 16 bit character code, successor to ASCII, which encodes the
-  characters of almost all languages of the world; see
-  <http://www.unicode.org/> for more information).  Say Y here if you
-  want to be able to read Joliet CD-ROMs under Linux.
-
-CONFIG_ZISOFS
-  This is a Linux-specific extension to RockRidge which lets you store
-  data in compressed form on a CD-ROM and have it transparently
-  decompressed when the CD-ROM is accessed.  See
-  <http://www.kernel.org/pub/linux/utils/fs/zisofs/> for the tools
-  necessary to create such a filesystem.  Say Y here if you want to be
-  able to read such compressed CD-ROMs.
-
-CONFIG_UDF_FS
-  This is the new file system used on some CD-ROMs and DVDs. Say Y if
-  you intend to mount DVD discs or CDRW's written in packet mode, or
-  if written to by other UDF utilities, such as DirectCD. This UDF
-  file system support is read-only. If you want to write to UDF
-  file systems on some media, you need to say Y to "UDF read-write
-  support" below in addition. Please read
-  <file:Documentation/filesystems/udf.txt>.
-
-  This file system support is also available as a module ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). The module is called udf.o. If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_UDF_RW
-  Say Y if you want to test write support for UDF file systems.
-  Due to lack of support for writing to CDR/CDRW's, this option
-  is only supported for hard discs, DVD-RAM, and loopback files.
-
-CONFIG_FAT_FS
-  If you want to use one of the FAT-based file systems (the MS-DOS,
-  VFAT (Windows 95) and UMSDOS (used to run Linux on top of an
-  ordinary DOS partition) file systems), then you must say Y or M here
-  to include FAT support. You will then be able to mount partitions or
-  diskettes with FAT-based file systems and transparently access the
-  files on them, i.e. MSDOS files will look and behave just like all
-  other Unix files.
-
-  This FAT support is not a file system in itself, it only provides
-  the foundation for the other file systems. You will have to say Y or
-  M to at least one of "MSDOS fs support" or "VFAT fs support" in
-  order to make use of it.
-
-  Another way to read and write MSDOS floppies and hard drive
-  partitions from within Linux (but not transparently) is with the
-  mtools ("man mtools") program suite. You don't need to say Y here in
-  order to do that.
-
-  If you need to move large files on floppies between a DOS and a
-  Linux box, say Y here, mount the floppy under Linux with an MSDOS
-  file system and use GNU tar's M option. GNU tar is a program
-  available for Unix and DOS ("man tar" or "info tar").
-
-  It is now also becoming possible to read and write compressed FAT
-  file systems; read <file:Documentation/filesystems/fat_cvf.txt> for
-  details.
-
-  The FAT support will enlarge your kernel by about 37 KB. If unsure,
-  say Y.
-
-  If you want to compile this as a module however ( = code which can
-  be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called fat.o.  Note that if you compile the FAT
-  support as a module, you cannot compile any of the FAT-based file
-  systems into the kernel -- they will have to be modules as well.
-  The file system of your root partition (the one containing the
-  directory /) cannot be a module, so don't say M here if you intend
-  to use UMSDOS as your root file system.
-
-CONFIG_MSDOS_FS
-  This allows you to mount MSDOS partitions of your hard drive (unless
-  they are compressed; to access compressed MSDOS partitions under
-  Linux, you can either use the DOS emulator DOSEMU, described in the
-  DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, or try dmsdosfs in
-  <ftp://ibiblio.org/pub/Linux/system/filesystems/dosfs/>. If you
-  intend to use dosemu with a non-compressed MSDOS partition, say Y
-  here) and MSDOS floppies. This means that file access becomes
-  transparent, i.e. the MSDOS files look and behave just like all
-  other Unix files.
-
-  If you want to use UMSDOS, the Unix-like file system on top of a
-  DOS file system, which allows you to run Linux from within a DOS
-  partition without repartitioning, you'll have to say Y or M here.
-
-  If you have Windows 95 or Windows NT installed on your MSDOS
-  partitions, you should use the VFAT file system (say Y to "VFAT fs
-  support" below), or you will not be able to see the long filenames
-  generated by Windows 95 / Windows NT.
-
-  This option will enlarge your kernel by about 7 KB. If unsure,
-  answer Y. This will only work if you said Y to "DOS FAT fs support"
-  as well. If you want to compile this as a module however ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.
-  The module will be called msdos.o.
-
-CONFIG_VFAT_FS
-  This option provides support for normal Windows file systems with
-  long filenames.  That includes non-compressed FAT-based file systems
-  used by Windows 95, Windows 98, Windows NT 4.0, and the Unix
-  programs from the mtools package.
-
-  You cannot use the VFAT file system for your Linux root partition
-  (the one containing the directory /); use UMSDOS instead if you
-  want to run Linux from within a DOS partition (i.e. say Y to
-  "Unix like fs on top of std MSDOS fs", below).
-
-  The VFAT support enlarges your kernel by about 10 KB and it only
-  works if you said Y to the "DOS FAT fs support" above.  Please read
-  the file <file:Documentation/filesystems/vfat.txt> for details.  If
-  unsure, say Y.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called vfat.o.
-
-CONFIG_UMSDOS_FS
-  Say Y here if you want to run Linux from within an existing DOS
-  partition of your hard drive. The advantage of this is that you can
-  get away without repartitioning your hard drive (which often implies
-  backing everything up and restoring afterwards) and hence you're
-  able to quickly try out Linux or show it to your friends; the
-  disadvantage is that Linux becomes susceptible to DOS viruses and
-  that UMSDOS is somewhat slower than ext2fs.  Another use of UMSDOS
-  is to write files with long unix filenames to MSDOS floppies; it
-  also allows Unix-style soft-links and owner/permissions of files on
-  MSDOS floppies.  You will need a program called umssync in order to
-  make use of UMSDOS; read
-  <file:Documentation/filesystems/umsdos.txt>.
-
-  To get utilities for initializing/checking UMSDOS file system, or
-  latest patches and/or information, visit the UMSDOS home page at
-  <http://www.voyager.hr/~mnalis/umsdos/>.
-
-  This option enlarges your kernel by about 28 KB and it only works if
-  you said Y to both "DOS FAT fs support" and "MSDOS fs support"
-  above.  If you want to compile this as a module ( = code which can
-  be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called umsdos.o.  Note that the file system of your
-  root partition (the one containing the directory /) cannot be a
-  module, so saying M could be dangerous.  If unsure, say N.
-
-CONFIG_PROC_FS
-  This is a virtual file system providing information about the status
-  of the system. "Virtual" means that it doesn't take up any space on
-  your hard disk: the files are created on the fly by the kernel when
-  you try to access them. Also, you cannot read the files with older
-  version of the program less: you need to use more or cat.
-
-  It's totally cool; for example, "cat /proc/interrupts" gives
-  information about what the different IRQs are used for at the moment
-  (there is a small number of Interrupt ReQuest lines in your computer
-  that are used by the attached devices to gain the CPU's attention --
-  often a source of trouble if two devices are mistakenly configured
-  to use the same IRQ). The program procinfo to display some
-  information about your system gathered from the /proc file system.
-
-  Before you can use the /proc file system, it has to be mounted,
-  meaning it has to be given a location in the directory hierarchy.
-  That location should be /proc. A command such as "mount -t proc proc
-  /proc" or the equivalent line in /etc/fstab does the job.
-
-  The /proc file system is explained in the file
-  <file:Documentation/filesystems/proc.txt> and on the proc(5) manpage
-  ("man 5 proc").
-
-  This option will enlarge your kernel by about 67 KB. Several
-  programs depend on this, so everyone should say Y here.
-
-CONFIG_DEVFS_FS
-  This is support for devfs, a virtual file system (like /proc) which
-  provides the file system interface to device drivers, normally found
-  in /dev. Devfs does not depend on major and minor number
-  allocations. Device drivers register entries in /dev which then
-  appear automatically, which means that the system administrator does
-  not have to create character and block special device files in the
-  /dev directory using the mknod command (or MAKEDEV script) anymore.
-
-  This is work in progress. If you want to use this, you *must* read
-  the material in <file:Documentation/filesystems/devfs/>, especially
-  the file README there.
-
-  If unsure, say N.
-
-CONFIG_DEVFS_MOUNT
-  This option appears if you have CONFIG_DEVFS_FS enabled. Setting
-  this to 'Y' will make the kernel automatically mount devfs onto /dev
-  when the system is booted, before the init thread is started.
-  You can override this with the "devfs=nomount" boot option.
-
-  If unsure, say N.
-
-CONFIG_DEVFS_DEBUG
-  If you say Y here, then the /dev file system code will generate
-  debugging messages. See the file
-  <file:Documentation/filesystems/devfs/boot-options> for more
-  details.
-
-  If unsure, say N.
-
-CONFIG_NFS_FS
-  If you are connected to some other (usually local) Unix computer
-  (using SLIP, PLIP, PPP or Ethernet) and want to mount files residing
-  on that computer (the NFS server) using the Network File Sharing
-  protocol, say Y. "Mounting files" means that the client can access
-  the files with usual UNIX commands as if they were sitting on the
-  client's hard disk. For this to work, the server must run the
-  programs nfsd and mountd (but does not need to have NFS file system
-  support enabled in its kernel). NFS is explained in the Network
-  Administrator's Guide, available from
-  <http://www.linuxdoc.org/docs.html#guide>, on its man page: "man
-  nfs", and in the NFS-HOWTO.
-
-  A superior but less widely used alternative to NFS is provided by
-  the Coda file system; see "Coda file system support" below.
-
-  If you say Y here, you should have said Y to TCP/IP networking also.
-  This option would enlarge your kernel by about 27 KB.
-
-  This file system is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called nfs.o. If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-  If you are configuring a diskless machine which will mount its root
-  file system over NFS at boot time, say Y here and to "Kernel
-  level IP autoconfiguration" above and to "Root file system on NFS"
-  below. You cannot compile this driver as a module in this case.
-  There are two packages designed for booting diskless machines over
-  the net: netboot, available from
-  <http://ftp1.sourceforge.net/netboot/>, and Etherboot,
-  available from <http://ftp1.sourceforge.net/etherboot/>.
-
-  If you don't know what all this is about, say N.
-
-CONFIG_NFS_V3
-  Say Y here if you want your NFS client to be able to speak the newer
-  version 3 of the NFS protocol.
-
-  If unsure, say N.
-
-CONFIG_NFS_DIRECTIO
-  This option enables applications to perform uncached I/O on files
-  in NFS file systems using the O_DIRECT open() flag.  When O_DIRECT
-  is set for a file, its data is not cached in the system's page
-  cache.  Data is moved to and from user-level application buffers
-  directly.  Unlike local disk-based file systems, NFS O_DIRECT has
-  no alignment restrictions.
-
-  Unless your program is designed to use O_DIRECT properly, you are
-  much better off allowing the NFS client to manage data caching for
-  you.  Misusing O_DIRECT can cause poor server performance or network
-  storms.  This kernel build option defaults OFF to avoid exposing
-  system administrators unwittingly to a potentially hazardous
-  feature.
-
-  For more details on NFS O_DIRECT, see fs/nfs/direct.c.
-
-  If unsure, say N.  This reduces the size of the NFS client, and
-  causes open() to return EINVAL if a file residing in NFS is
-  opened with the O_DIRECT flag.
-
-CONFIG_NFS_V4
-  Say Y here if you want your NFS client to be able to speak the newer
-  version 4 of the NFS protocol.  This feature is experimental, and
-  should only be used if you are interested in helping to test NFSv4.
-
-  If unsure, say N.
-
-CONFIG_ROOT_NFS
-  If you want your Linux box to mount its whole root file system (the
-  one containing the directory /) from some other computer over the
-  net via NFS (presumably because your box doesn't have a hard disk),
-  say Y. Read <file:Documentation/nfsroot.txt> for details. It is
-  likely that in this case, you also want to say Y to "Kernel level IP
-  autoconfiguration" so that your box can discover its network address
-  at boot time.
-
-  Most people say N here.
-
-CONFIG_NFSD
-  If you want your Linux box to act as an NFS *server*, so that other
-  computers on your local network which support NFS can access certain
-  directories on your box transparently, you have two options: you can
-  use the self-contained user space program nfsd, in which case you
-  should say N here, or you can say Y and use the kernel based NFS
-  server. The advantage of the kernel based solution is that it is
-  faster.
-
-  In either case, you will need support software; the respective
-  locations are given in the file <file:Documentation/Changes> in the
-  NFS section.
-
-  If you say Y here, you will get support for version 2 of the NFS
-  protocol (NFSv2). If you also want NFSv3, say Y to the next question
-  as well.
-
-  Please read the NFS-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  The NFS server is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called nfsd.o.  If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.  If unsure,
-  say N.
-
-CONFIG_NFSD_V3
-  If you would like to include the NFSv3 server as well as the NFSv2
-  server, say Y here.  If unsure, say Y.
-
-CONFIG_NFSD_V4
-  If you would like to include the NFSv4 server as well as the NFSv2
-  and NFSv3 servers, say Y here.  This feature is experimental, and
-  should only be used if you are interested in helping to test NFSv4.
-  If unsure, say N.
-
-CONFIG_NFSD_TCP
-  Enable NFS service over TCP connections.  This the officially
-  still experimental, but seems to work well.
-
-CONFIG_HPFS_FS
-  OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS
-  is the file system used for organizing files on OS/2 hard disk
-  partitions. Say Y if you want to be able to read files from and
-  write files to an OS/2 HPFS partition on your hard drive. OS/2
-  floppies however are in regular MSDOS format, so you don't need this
-  option in order to be able to read them. Read
-  <file:Documentation/filesystems/hpfs.txt>.
-
-  This file system is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called hpfs.o.  If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.  If unsure,
-  say N.
-
-CONFIG_NTFS_FS
-  NTFS is the file system of Microsoft Windows NT/2000/XP. For more
-  information see <file:Documentation/filesystems/ntfs.txt>. Saying Y
-  here would allow you to read from NTFS partitions.
-
-  This file system 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 ntfs.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If you are not using Windows NT/2000/XP in addition to Linux on your
-  computer it is safe to say N.
-
-CONFIG_NTFS_DEBUG
-  If you are experiencing any problems with the NTFS file system, say
-  Y here. This will result in additional consistency checks to be
-  performed by the driver as well as additional debugging messages to
-  be written to the system log. Note that debugging messages are
-  disabled by default. To enable them, supply the option debug_msgs=1
-  at the kernel command line when booting the kernel or as an option
-  to insmod when loading the ntfs module. Once the driver is active,
-  you can enable debugging messages by doing (as root):
-    echo 1 > /proc/sys/fs/ntfs-debug
-  Replacing the "1" with "0" would disable debug messages.
-
-  If you leave debugging messages disabled, this results in little
-  overhead, but enabling debug messages results in very significant
-  slowdown of the system.
-
-  When reporting bugs, please try to have available a full dump of
-  debugging messages while the misbehaviour was occurring.
-
-CONFIG_NTFS_RW
-  This enables the experimental write support in the NTFS driver.
-
-  WARNING: Do not use this option unless you are actively developing
-           NTFS as it is currently guaranteed to be broken and you
-           may lose all your data!
-
-  It is strongly recommended and perfectly safe to say N here.
-
-CONFIG_SYSV_FS
-  SCO, Xenix and Coherent are commercial Unix systems for Intel
-  machines, and Version 7 was used on the DEC PDP-11. Saying Y
-  here would allow you to read from their floppies and hard disk
-  partitions.
-
-  If you have floppies or hard disk partitions like that, it is likely
-  that they contain binaries from those other Unix systems; in order
-  to run these binaries, you will want to install linux-abi which is a
-  a set of kernel modules that lets you run SCO, Xenix, Wyse,
-  UnixWare, Dell Unix and System V programs under Linux.  It is
-  available via FTP (user: ftp) from
-  <ftp://ftp.openlinux.org/pub/people/hch/linux-abi/>).
-  NOTE: that will work only for binaries from Intel-based systems;
-  PDP ones will have to wait until somebody ports Linux to -11 ;-)
-
-  If you only intend to mount files from some other Unix over the
-  network using NFS, you don't need the System V file system support
-  (but you need NFS file system support obviously).
-
-  Note that this option is generally not needed for floppies, since a
-  good portable way to transport files and directories between unixes
-  (and even other operating systems) is given by the tar program ("man
-  tar" or preferably "info tar").  Note also that this option has
-  nothing whatsoever to do with the option "System V IPC". Read about
-  the System V file system in
-  <file:Documentation/filesystems/sysv-fs.txt>.
-  Saying Y here will enlarge your kernel by about 27 KB.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called sysv.o.
-
-  If you haven't heard about all of this before, it's safe to say N.
-
-CONFIG_AFFS_FS
-  The Fast File System (FFS) is the common file system used on hard
-  disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20).  Say Y
-  if you want to be able to read and write files from and to an Amiga
-  FFS partition on your hard drive.  Amiga floppies however cannot be
-  read with this driver due to an incompatibility of the floppy
-  controller used in an Amiga and the standard floppy controller in
-  PCs and workstations. Read <file:Documentation/filesystems/affs.txt>
-  and <file:fs/affs/Changes>.
-
-  With this driver you can also mount disk files used by Bernd
-  Schmidt's Un*X Amiga Emulator
-  (<http://www.freiburg.linux.de/~uae/>).
-  If you want to do this, you will also need to say Y or M to "Loop
-  device support", above.
-
-  This file system is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called affs.o.  If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.  If unsure,
-  say N.
-
-CONFIG_HFS_FS
-  If you say Y here, you will be able to mount Macintosh-formatted
-  floppy disks and hard drive partitions with full read-write access.
-  Please read <file:fs/hfs/HFS.txt> to learn about the available mount
-  options.
-
-  This file system support is also available as a module ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). The module is called hfs.o.  If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_ROMFS_FS
-  This is a very small read-only file system mainly intended for
-  initial ram disks of installation disks, but it could be used for
-  other read-only media as well.  Read
-  <file:Documentation/filesystems/romfs.txt> for details.
-
-  This file system support is also available as a module ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). The module is called romfs.o.  If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  Note that the file system of your
-  root partition (the one containing the directory /) cannot be a
-  module.
-
-  If you don't know whether you need it, then you don't need it:
-  answer N.
-
-CONFIG_QNX4FS_FS
-  This is the file system used by the real-time operating systems
-  QNX 4 and QNX 6 (the latter is also called QNX RTP).
-  Further information is available at <http://www.qnx.com/>.
-  Say Y if you intend to mount QNX hard disks or floppies.
-  Unless you say Y to "QNX4FS read-write support" below, you will
-  only be able to read these file systems.
-
-  This file system support is also available as a module ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). The module is called qnx4.o. If you want to
-  compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  If you don't know whether you need it, then you don't need it:
-  answer N.
-
-CONFIG_QNX4FS_RW
-  Say Y if you want to test write support for QNX4 file systems.
-
-  It's currently broken, so for now:
-  answer N.
-
-CONFIG_AUTOFS_FS
-  The automounter is a tool to automatically mount remote file systems
-  on demand. This implementation is partially kernel-based to reduce
-  overhead in the already-mounted case; this is unlike the BSD
-  automounter (amd), which is a pure user space daemon.
-
-  To use the automounter you need the user-space tools from the autofs
-  package; you can find the location in <file:Documentation/Changes>.
-  You also want to answer Y to "NFS file system support", below.
-
-  If you want to use the newer version of the automounter with more
-  features, say N here and say Y to "Kernel automounter v4 support",
-  below.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called autofs.o.
-
-  If you are not a part of a fairly large, distributed network, you
-  probably do not need an automounter, and can say N here.
-
-CONFIG_AUTOFS4_FS
-  The automounter is a tool to automatically mount remote file systems
-  on demand. This implementation is partially kernel-based to reduce
-  overhead in the already-mounted case; this is unlike the BSD
-  automounter (amd), which is a pure user space daemon.
-
-  To use the automounter you need the user-space tools from
-  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/testing-v4/>; you also
-  want to answer Y to "NFS file system support", below.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called autofs4.o.  You will need to add "alias autofs
-  autofs4" to your modules configuration file.
-
-  If you are not a part of a fairly large, distributed network or
-  don't have a laptop which needs to dynamically reconfigure to the
-  local network, you probably do not need an automounter, and can say
-  N here.
-
-CONFIG_EFS_FS
-  EFS is an older file system used for non-ISO9660 CD-ROMs and hard
-  disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer
-  uses the XFS file system for hard disk partitions however).
-
-  This implementation only offers read-only access. If you don't know
-  what all this is about, it's safe to say N. For more information
-  about EFS see its home page at <http://aeschi.ch.eu.org/efs/>.
-
-  If you want to compile the EFS file system support as a module ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>. The module will be called efs.o.
-
-CONFIG_JFFS_FS
-  JFFS is the Journaling Flash File System developed by Axis
-  Communications in Sweden, aimed at providing a crash/powerdown-safe
-  file system for disk-less embedded devices. Further information is
-  available at (<http://developer.axis.com/software/jffs/>).
-
-CONFIG_JFFS_FS_VERBOSE
-  Determines the verbosity level of the JFFS debugging messages.
-
-CONFIG_JFFS2_FS
-  JFFS2 is the second generation of the Journalling Flash File System
-  for use on diskless embedded devices. It provides improved wear
-  levelling, compression and support for hard links. You cannot use
-  this on normal block devices, only on 'MTD' devices.
-
-  Further information should be made available soon at
-  <http://sources.redhat.com/jffs2/>.
-
-CONFIG_JFFS2_FS_DEBUG
-  This controls the amount of debugging messages produced by the JFFS2
-  code. Set it to zero for use in production systems. For evaluation,
-  testing and debugging, it's advisable to set it to one. This will
-  enable a few assertions and will print debugging messages at the
-  KERN_DEBUG loglevel, where they won't normally be visible. Level 2
-  is unlikely to be useful - it enables extra debugging in certain
-  areas which at one point needed debugging, but when the bugs were
-  located and fixed, the detailed messages were relegated to level 2.
-
-  If reporting bugs, please try to have available a full dump of the
-  messages at debug level 1 while the misbehaviour was occurring.
-
-CONFIG_JFFS_PROC_FS
-  Enabling this option will cause statistics from mounted JFFS file systems
-  to be made available to the user in the /proc/fs/jffs/ directory.
-
-CONFIG_UFS_FS
-  BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
-  OpenBSD and NeXTstep) use a file system called UFS. Some System V
-  Unixes can create and mount hard disk partitions and diskettes using
-  this file system as well. Saying Y here will allow you to read from
-  these partitions; if you also want to write to them, say Y to the
-  experimental "UFS file system write support", below. Please read the
-  file <file:Documentation/filesystems/ufs.txt> for more information.
-
-  If you only intend to mount files from some other Unix over the
-  network using NFS, you don't need the UFS file system support (but
-  you need NFS file system support obviously).
-
-  Note that this option is generally not needed for floppies, since a
-  good portable way to transport files and directories between unixes
-  (and even other operating systems) is given by the tar program ("man
-  tar" or preferably "info tar").
-
-  When accessing NeXTstep files, you may need to convert them from the
-  NeXT character set to the Latin1 character set; use the program
-  recode ("info recode") for this purpose.
-
-  If you want to compile the UFS file system support as a module ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>. The module will be called ufs.o.
-
-  If you haven't heard about all of this before, it's safe to say N.
-
-CONFIG_UFS_FS_WRITE
-  Say Y here if you want to try writing to UFS partitions. This is
-  experimental, so you should back up your UFS partitions beforehand.
-
-CONFIG_ADFS_FS
-  The Acorn Disc Filing System is the standard file system of the
-  RiscOS operating system which runs on Acorn's ARM-based Risc PC
-  systems and the Acorn Archimedes range of machines. If you say Y
-  here, Linux will be able to read from ADFS partitions on hard drives
-  and from ADFS-formatted floppy discs. If you also want to be able to
-  write to those devices, say Y to "ADFS write support" below.
-
-  The ADFS partition should be the first partition (i.e.,
-  /dev/[hs]d?1) on each of your drives. Please read the file
-  <file:Documentation/filesystems/adfs.txt> for further details.
-
-  This code is also available as a module called adfs.o ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_ADFS_FS_RW
-  If you say Y here, you will be able to write to ADFS partitions on
-  hard drives and ADFS-formatted floppy disks. This is experimental
-  codes, so if you're unsure, say N.
-
-JFS filesystem support
-CONFIG_JFS_FS
-  This is a port of IBM's Journaled Filesystem .  More information is
-  available in the file Documentation/filesystems/jfs.txt.
-
-  If you do not intend to use the JFS filesystem, say N.
-
-JFS Debugging
-CONFIG_JFS_DEBUG
-  If you are experiencing any problems with the JFS filesystem, say
-  Y here.  This will result in additional debugging messages to be
-  written to the system log.  Under normal circumstances, this
-  results in very little overhead.
-
-JFS Statistics
-CONFIG_JFS_STATISTICS
-  Enabling this option will cause statistics from the JFS file system
-  to be made available to the user in the /proc/fs/jfs/ directory.
-
-CONFIG_DEVPTS_FS
-  You should say Y here if you said Y to "Unix98 PTY support" above.
-  You'll then get a virtual file system which can be mounted on
-  /dev/pts with "mount -t devpts". This, together with the pseudo
-  terminal master multiplexer /dev/ptmx, is used for pseudo terminal
-  support as described in The Open Group's Unix98 standard: in order
-  to acquire a pseudo terminal, a process opens /dev/ptmx; the number
-  of the pseudo terminal is then made available to the process and the
-  pseudo terminal slave can be accessed as /dev/pts/<number>. What was
-  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
-
-  The GNU C library glibc 2.1 contains the requisite support for this
-  mode of operation; you also need client programs that use the Unix98
-  API. Please read <file:Documentation/Changes> for more information
-  about the Unix98 pty devices.
-
-  Note that the experimental "/dev file system support"
-  (CONFIG_DEVFS_FS)  is a more general facility.
-
-CONFIG_VXFS_FS
-  FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
-  file system format.  VERITAS VxFS(TM) is the standard file system
-  of SCO UnixWare (and possibly others) and optionally available
-  for Sunsoft Solaris, HP-UX and many other operating systems.
-  Currently only readonly access is supported.
-
-  NOTE: the file system type as used by mount(1), mount(2) and
-        fstab(5) is 'vxfs' as it describes the file system format, not
-        the actual driver.
-
-  This file system is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called freevxfs.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  If
-  unsure, say N.
-
-CIFS (Common Internet File System) support
-CONFIG_CIFS
-  This is the client VFS module for the Common Internet File System
-  (CIFS) protocol which is the successor to the Server Message Block 
-  (SMB) protocol, the native file sharing mechanism for most early
-  PC operating systems.  CIFS is fully supported by current network
-  file servers such as Windows 2000 (including Windows NT version 4 
-  and Windows XP) as well by Samba (which provides excellent CIFS
-  server support for Linux and many other operating systems).  For
-  production systems the smbfs module may be used instead of this
-  cifs module since smbfs is currently more stable and provides
-  support for older servers.  The intent of this module is to provide the
-  most advanced network file system function for CIFS compliant servers, 
-  including support for dfs (heirarchical name space), secure per-user
-  session establishment, safe distributed caching (oplock), optional
-  packet signing, Unicode and other internationalization improvements, and
-  optional Winbind (nsswitch) integration.  This module is in an early
-  development stage, so unless you are specifically interested in this
-  filesystem, just say N.
-
-CIFS Debugging
-CONFIG_CIFS_DEBUG
-  If you are experiencing any problems with the CIFS filesystem, say
-  Y here.  This will result in additional debugging messages to be
-  written to the system log.  Under normal circumstances, this
-  results in very little overhead.  
-
-CONFIG_SMB_FS
-  SMB (Server Message Block) is the protocol Windows for Workgroups
-  (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share
-  files and printers over local networks.  Saying Y here allows you to
-  mount their file systems (often called "shares" in this context) and
-  access them just like any other Unix directory.  Currently, this
-  works only if the Windows machines use TCP/IP as the underlying
-  transport protocol, and not NetBEUI.  For details, read
-  <file:Documentation/filesystems/smbfs.txt> and the SMB-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note: if you just want your box to act as an SMB *server* and make
-  files and printing services available to Windows clients (which need
-  to have a TCP/IP stack), you don't need to say Y here; you can use
-  the program SAMBA (available from <ftp://ftp.samba.org/pub/samba/>)
-  for that.
-
-  General information about how to connect Linux, Windows machines and
-  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
-
-  If you want to compile the SMB support as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called smbfs.o.  Most people say N, however.
-
-CONFIG_SMB_NLS_DEFAULT
-  Enabling this will make smbfs use nls translations by default. You
-  need to specify the local charset (CONFIG_NLS_DEFAULT) in the nls
-  settings and you need to give the default nls for the SMB server as
-  CONFIG_SMB_NLS_REMOTE.
-
-  The nls settings can be changed at mount time, if your smbmount
-  supports that, using the codepage and iocharset parameters.
-
-  smbmount from samba 2.2.0 or later supports this.
-
-CONFIG_SMB_NLS_REMOTE
-  This setting allows you to specify a default value for which
-  codepage the server uses. If this field is left blank no
-  translations will be done by default. The local codepage/charset
-  default to CONFIG_NLS_DEFAULT.
-
-  The nls settings can be changed at mount time, if your smbmount
-  supports that, using the codepage and iocharset parameters.
-
-  smbmount from samba 2.2.0 or later supports this.
-
-CONFIG_CODA_FS
-  Coda is an advanced network file system, similar to NFS in that it
-  enables you to mount file systems of a remote server and access them
-  with regular Unix commands as if they were sitting on your hard
-  disk.  Coda has several advantages over NFS: support for
-  disconnected operation (e.g. for laptops), read/write server
-  replication, security model for authentication and encryption,
-  persistent client caches and write back caching.
-
-  If you say Y here, your Linux box will be able to act as a Coda
-  *client*.  You will need user level code as well, both for the
-  client and server.  Servers are currently user level, i.e. they need
-  no kernel support.  Please read
-  <file:Documentation/filesystems/coda.txt> and check out the Coda
-  home page <http://www.coda.cs.cmu.edu/>.
-
-  If you want to compile the coda client support as a module ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want), say M here and read
-  <file:Documentation/modules.txt>.  The module will be called coda.o.
-
-CONFIG_INTERMEZZO_FS
-  InterMezzo is a networked file system with disconnected operation
-  and kernel level write back caching.  It is most often used for
-  replicating potentially large trees or keeping laptop/desktop copies
-  in sync.
-
-  If you say Y or M your kernel or module will provide InterMezzo
-  support.  You will also need a file server daemon, which you can get
-  from <http://www.inter-mezzo.org/>.
-
-CONFIG_NCP_FS
-  NCP (NetWare Core Protocol) is a protocol that runs over IPX and is
-  used by Novell NetWare clients to talk to file servers.  It is to
-  IPX what NFS is to TCP/IP, if that helps.  Saying Y here allows you
-  to mount NetWare file server volumes and to access them just like
-  any other Unix directory.  For details, please read the file
-  <file:Documentation/filesystems/ncpfs.txt> in the kernel source and
-  the IPX-HOWTO from <http://www.linuxdoc.org/docs.html#howto>.
-
-  You do not have to say Y here if you want your Linux box to act as a
-  file *server* for Novell NetWare clients.
-
-  General information about how to connect Linux, Windows machines and
-  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called ncpfs.o.  Say N unless you are connected to a Novell
-  network.
-
-CONFIG_NCPFS_NLS
-  Allows you to use codepages and I/O charsets for file name
-  translation between the server file system and input/output. This
-  may be useful, if you want to access the server with other operating
-  systems, e.g. Windows 95. See also NLS for more Information.
-
-  To select codepages and I/O charsets use ncpfs-2.2.0.13 or newer.
-
-CONFIG_XFS_FS
-  XFS is a high performance journaling filesystem which originated
-  on the SGI IRIX platform.  It is completely multi-threaded, can
-  support large files and large filesystems, extended attributes,
-  variable block sizes, is extent based, and makes extensive use of
-  Btrees (directories, extents, free space) to aid both performance
-  and scalability.
-
-  Refer to the documentation at <http://oss.sgi.com/projects/xfs/>
-  for complete details.  This implementation is on-disk compatible
-  with the IRIX version of XFS.
-
-  If you want to compile this file system as a module ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>. The
-  module will be called xfs.o.  Be aware, however, that if the file
-  system of your root partition is compiled as a module, you'll need
-  to use an initial ramdisk (initrd) to boot.
-
-CONFIG_XFS_QUOTA
-  If you say Y here, you will be able to set limits for disk usage on
-  a per user and/or a per group basis under XFS.  XFS considers quota
-  information as filesystem metadata and uses journaling to provide a
-  higher level guarantee of consistency.  The on-disk data format for
-  quota is also compatible with the IRIX version of XFS, allowing a
-  filesystem to be migrated between Linux and IRIX without any need
-  for conversion.
-
-  If unsure, say N.  More comprehensive documentation can be found in
-  README.quota in the xfsprogs package.  XFS quota can be used either
-  with or without the generic quota support enabled (CONFIG_QUOTA) -
-  they are completely independent subsystems.
-
-CONFIG_XFS_RT
-  If you say Y here you will be able to mount and use XFS filesystems
-  which contain a realtime subvolume. The realtime subvolume is a
-  separate area of disk space where only file data is stored. The
-  realtime subvolume is designed to provide very deterministic
-  data rates suitable for media streaming applications.
-
-  See the xfs man page in section 5 for a bit more information.
-
-  This feature is unsupported at this time, is not yet fully
-  functional, and may cause serious problems.
-
-  If unsure, say N.
-
-CONFIG_AFS_FS
-  If you say Y here, you will get an experimental Andrew File System
-  driver. It currently only supports unsecured read-only AFS access.
-
-  See Documentation/filesystems/afs.txt for more intormation.
-
-  If unsure, say N.
-
diff -Nru a/fs/Config.in b/fs/Config.in
--- a/fs/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,190 +0,0 @@
-#
-# File system configuration
-#
-mainmenu_option next_comment
-comment 'File systems'
-
-bool 'Quota support' CONFIG_QUOTA
-dep_tristate '  Old quota format support' CONFIG_QFMT_V1 $CONFIG_QUOTA
-dep_tristate '  Quota format v2 support' CONFIG_QFMT_V2 $CONFIG_QUOTA
-if [ "$CONFIG_QUOTA" = "y" ]; then
-   define_bool CONFIG_QUOTACTL y
-fi
-tristate 'Kernel automounter support' CONFIG_AUTOFS_FS
-tristate 'Kernel automounter version 4 support (also supports v3)' CONFIG_AUTOFS4_FS
-
-tristate 'Reiserfs support' CONFIG_REISERFS_FS
-dep_mbool '  Enable reiserfs debug mode' CONFIG_REISERFS_CHECK $CONFIG_REISERFS_FS
-dep_mbool '  Stats in /proc/fs/reiserfs' CONFIG_REISERFS_PROC_INFO $CONFIG_REISERFS_FS
-
-dep_tristate 'ADFS file system support (EXPERIMENTAL)' CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
-dep_mbool '  ADFS write support (DANGEROUS)' CONFIG_ADFS_FS_RW $CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
-
-dep_tristate 'Amiga FFS file system support (EXPERIMENTAL)' CONFIG_AFFS_FS $CONFIG_EXPERIMENTAL
-
-dep_tristate 'Apple Macintosh file system support (EXPERIMENTAL)' CONFIG_HFS_FS $CONFIG_EXPERIMENTAL
-
-dep_tristate 'BFS file system support (EXPERIMENTAL)' CONFIG_BFS_FS $CONFIG_EXPERIMENTAL
-
-tristate 'Ext3 journalling file system support' CONFIG_EXT3_FS
-# CONFIG_JBD could be its own option (even modular), but until there are
-# other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
-# dep_tristate '  Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
-define_bool CONFIG_JBD $CONFIG_EXT3_FS
-dep_mbool '  JBD (ext3) debugging support' CONFIG_JBD_DEBUG $CONFIG_JBD
-
-# msdos file systems
-tristate 'DOS FAT fs support' CONFIG_FAT_FS
-dep_tristate '  MSDOS fs support' CONFIG_MSDOS_FS $CONFIG_FAT_FS
-#dep_tristate '    UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS
-# UMSDOS is temprory broken
-define_bool CONFIG_UMSDOS_FS n
-
-dep_tristate '  VFAT (Windows-95) fs support' CONFIG_VFAT_FS $CONFIG_FAT_FS
-dep_tristate 'EFS file system support (read only) (EXPERIMENTAL)' CONFIG_EFS_FS $CONFIG_EXPERIMENTAL
-dep_tristate 'Journalling Flash File System (JFFS) support' CONFIG_JFFS_FS $CONFIG_MTD
-if [ "$CONFIG_JFFS_FS" = "y" -o "$CONFIG_JFFS_FS" = "m" ] ; then
-   int 'JFFS debugging verbosity (0 = quiet, 3 = noisy)' CONFIG_JFFS_FS_VERBOSE 0
-   bool 'JFFS stats available in /proc filesystem' CONFIG_JFFS_PROC_FS
-fi
-dep_tristate 'Journalling Flash File System v2 (JFFS2) support' CONFIG_JFFS2_FS $CONFIG_MTD
-if [ "$CONFIG_JFFS2_FS" = "y" -o "$CONFIG_JFFS2_FS" = "m" ] ; then
-   int '  JFFS2 debugging verbosity (0 = quiet, 2 = noisy)' CONFIG_JFFS2_FS_DEBUG 0
-   dep_bool '  JFFS2 support for NAND flash (EXPERIMENTAL)' CONFIG_JFFS2_FS_NAND $CONFIG_EXPERIMENTAL
-fi
-tristate 'Compressed ROM file system support' CONFIG_CRAMFS
-bool 'Virtual memory file system support (former shm fs)' CONFIG_TMPFS
-define_bool CONFIG_RAMFS y
-
-tristate 'ISO 9660 CDROM file system support' CONFIG_ISO9660_FS
-dep_mbool '  Microsoft Joliet CDROM extensions' CONFIG_JOLIET $CONFIG_ISO9660_FS
-dep_mbool '  Transparent decompression extension' CONFIG_ZISOFS $CONFIG_ISO9660_FS
-
-tristate 'JFS filesystem support' CONFIG_JFS_FS
-dep_mbool '  JFS debugging' CONFIG_JFS_DEBUG $CONFIG_JFS_FS
-dep_mbool '  JFS statistics' CONFIG_JFS_STATISTICS $CONFIG_JFS_FS
-
-tristate 'Minix fs support' CONFIG_MINIX_FS
-
-tristate 'FreeVxFS file system support (VERITAS VxFS(TM) compatible)' CONFIG_VXFS_FS
-
-tristate 'NTFS file system support (read only)' CONFIG_NTFS_FS
-dep_mbool '  NTFS debugging support' CONFIG_NTFS_DEBUG $CONFIG_NTFS_FS
-dep_mbool '  NTFS write support (DANGEROUS)' CONFIG_NTFS_RW $CONFIG_NTFS_FS $CONFIG_EXPERIMENTAL
-
-tristate 'OS/2 HPFS file system support' CONFIG_HPFS_FS
-
-bool '/proc file system support' CONFIG_PROC_FS
-
-dep_bool '/dev file system support (EXPERIMENTAL)' CONFIG_DEVFS_FS $CONFIG_EXPERIMENTAL
-dep_bool '  Automatically mount at boot' CONFIG_DEVFS_MOUNT $CONFIG_DEVFS_FS
-dep_bool '  Debug devfs' CONFIG_DEVFS_DEBUG $CONFIG_DEVFS_FS
-
-# It compiles as a module for testing only.  It should not be used
-# as a module in general.  If we make this "tristate", a bunch of people
-# who don't know what they are doing turn it on and complain when it
-# breaks.
-dep_bool '/dev/pts file system for Unix98 PTYs' CONFIG_DEVPTS_FS $CONFIG_UNIX98_PTYS
-
-tristate 'QNX4 file system support (read only)' CONFIG_QNX4FS_FS
-dep_mbool '  QNX4FS write support (DANGEROUS)' CONFIG_QNX4FS_RW $CONFIG_QNX4FS_FS $CONFIG_EXPERIMENTAL
-
-tristate 'ROM file system support' CONFIG_ROMFS_FS
-
-tristate 'Second extended fs support' CONFIG_EXT2_FS
-
-tristate 'System V/Xenix/V7/Coherent file system support' CONFIG_SYSV_FS
-
-tristate 'UDF file system support (read only)' CONFIG_UDF_FS
-dep_mbool '  UDF write support (DANGEROUS)' CONFIG_UDF_RW $CONFIG_UDF_FS $CONFIG_EXPERIMENTAL
-
-tristate 'UFS file system support (read only)' CONFIG_UFS_FS
-dep_mbool '  UFS file system write support (DANGEROUS)' CONFIG_UFS_FS_WRITE $CONFIG_UFS_FS $CONFIG_EXPERIMENTAL
-
-tristate 'XFS filesystem support' CONFIG_XFS_FS
-dep_mbool    '  Realtime support (EXPERIMENTAL)' CONFIG_XFS_RT $CONFIG_XFS_FS $CONFIG_EXPERIMENTAL
-dep_mbool    '  Quota support' CONFIG_XFS_QUOTA $CONFIG_XFS_FS
-if [ "$CONFIG_XFS_QUOTA" = "y" ]; then
-   define_bool CONFIG_QUOTACTL y
-fi
-
-if [ "$CONFIG_NET" = "y" ]; then
-
-   mainmenu_option next_comment
-   comment 'Network File Systems'
-
-   dep_tristate 'Coda file system support (advanced network fs)' CONFIG_CODA_FS $CONFIG_INET
-   dep_tristate 'InterMezzo file system support (replicating fs) (EXPERIMENTAL)' CONFIG_INTERMEZZO_FS $CONFIG_INET $CONFIG_EXPERIMENTAL
-   dep_tristate 'NFS file system support' CONFIG_NFS_FS $CONFIG_INET
-   dep_mbool '  Provide NFSv3 client support' CONFIG_NFS_V3 $CONFIG_NFS_FS
-   dep_mbool '  Provide NFSv4 client support (EXPERIMENTAL)' CONFIG_NFS_V4 $CONFIG_NFS_FS $CONFIG_EXPERIMENTAL
-   dep_bool '  Root file system on NFS' CONFIG_ROOT_NFS $CONFIG_NFS_FS $CONFIG_IP_PNP
-
-   dep_tristate 'NFS server support' CONFIG_NFSD $CONFIG_INET
-   dep_mbool '  Provide NFSv3 server support' CONFIG_NFSD_V3 $CONFIG_NFSD
-   dep_mbool '  Provide NFSv4 server support (EXPERIMENTAL)' CONFIG_NFSD_V4 $CONFIG_NFSD_V3 $CONFIG_EXPERIMENTAL
-   dep_mbool '  Provide NFS server over TCP support (EXPERIMENTAL)' CONFIG_NFSD_TCP $CONFIG_NFSD $CONFIG_EXPERIMENTAL
-
-   if [ "$CONFIG_NFS_FS" = "y" -o "$CONFIG_NFSD" = "y" ]; then
-      define_tristate CONFIG_SUNRPC y
-      define_tristate CONFIG_LOCKD y
-   else
-      if [ "$CONFIG_NFS_FS" = "m" -o "$CONFIG_NFSD" = "m" ]; then
-	 define_tristate CONFIG_SUNRPC m
-	 define_tristate CONFIG_LOCKD m
-   else
-	 define_tristate CONFIG_SUNRPC n
-	 define_tristate CONFIG_LOCKD n
-      fi
-   fi
-   if [ "$CONFIG_NFSD_V3" = "y" -o "$CONFIG_NFS_V3" = "y" ]; then
-     define_bool CONFIG_LOCKD_V4 y
-   fi
-   define_tristate CONFIG_EXPORTFS $CONFIG_NFSD
-
-   dep_tristate 'CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)' CONFIG_CIFS $CONFIG_INET
-
-   dep_tristate 'SMB file system support (to mount Windows shares etc.)' CONFIG_SMB_FS $CONFIG_INET
-   if [ "$CONFIG_SMB_FS" != "n" ]; then
-      bool '  Use a default NLS' CONFIG_SMB_NLS_DEFAULT
-      if [ "$CONFIG_SMB_NLS_DEFAULT" = "y" ]; then
-         string '    Default Remote NLS Option' CONFIG_SMB_NLS_REMOTE "cp437"
-      fi
-   fi
-   if [ "$CONFIG_IPX" != "n" -o "$CONFIG_INET" != "n" ]; then
-      tristate 'NCP file system support (to mount NetWare volumes)' CONFIG_NCP_FS
-      source fs/ncpfs/Config.in
-   else
-      # for fs/nls/Config.in
-      define_bool CONFIG_NCPFS_NLS n
-   fi
-
-   dep_tristate 'Andrew File System support (AFS) (Experimental)' CONFIG_AFS_FS $CONFIG_INET $CONFIG_EXPERIMENTAL
-   if [ "$CONFIG_AFS_FS" = "y" ]; then
-      define_tristate CONFIG_RXRPC y
-   else
-      if [ "$CONFIG_AFS_FS" = "m" ]; then
-	 define_tristate CONFIG_RXRPC m
-      fi
-   fi
-
-   endmenu
-
-else
-   # for fs/nls/Config.in
-   define_bool CONFIG_NCPFS_NLS n
-   define_bool CONFIG_SMB_FS n
-fi
-
-if [ "$CONFIG_ZISOFS" = "y" ]; then
-   define_tristate CONFIG_ZISOFS_FS $CONFIG_ISO9660_FS
-else
-   define_tristate CONFIG_ZISOFS_FS n
-fi
-
-mainmenu_option next_comment
-comment 'Partition Types'
-source fs/partitions/Config.in
-endmenu
-source fs/nls/Config.in
-endmenu
diff -Nru a/fs/Kconfig b/fs/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,1419 @@
+#
+# File system configuration
+#
+
+menu "File systems"
+
+config QUOTA
+	bool "Quota support"
+	help
+	  If you say Y here, you will be able to set per user limits for disk
+	  usage (also called disk quotas). Currently, it works for the
+	  ext2, ext3, and reiserfs file system. You need additional software
+	  in order to use quota support (you can download sources from
+	  <http://www.sf.net/projects/linuxquota/>). For further details, read
+	  the Quota mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. Probably the quota
+	  support is only useful for multi user systems. If unsure, say N.
+
+config QFMT_V1
+	tristate "Old quota format support"
+	depends on QUOTA
+	help
+	  This quota format was (is) used by kernels earlier than 2.4.??. If
+	  you have quota working and you don't want to convert to new quota
+	  format say Y here.
+
+config QFMT_V2
+	tristate "Quota format v2 support"
+	depends on QUOTA
+	help
+	  This quota format allows using quotas with 32-bit UIDs/GIDs. If you
+	  need this functionality say Y here. Note that you will need latest
+	  quota utilities for new quota format with this kernel.
+
+config QUOTACTL
+	bool
+	depends on XFS_QUOTA || QUOTA
+	default y
+
+config AUTOFS_FS
+	tristate "Kernel automounter support"
+	---help---
+	  The automounter is a tool to automatically mount remote file systems
+	  on demand. This implementation is partially kernel-based to reduce
+	  overhead in the already-mounted case; this is unlike the BSD
+	  automounter (amd), which is a pure user space daemon.
+
+	  To use the automounter you need the user-space tools from the autofs
+	  package; you can find the location in <file:Documentation/Changes>.
+	  You also want to answer Y to "NFS file system support", below.
+
+	  If you want to use the newer version of the automounter with more
+	  features, say N here and say Y to "Kernel automounter v4 support",
+	  below.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called autofs.o.
+
+	  If you are not a part of a fairly large, distributed network, you
+	  probably do not need an automounter, and can say N here.
+
+config AUTOFS4_FS
+	tristate "Kernel automounter version 4 support (also supports v3)"
+	---help---
+	  The automounter is a tool to automatically mount remote file systems
+	  on demand. This implementation is partially kernel-based to reduce
+	  overhead in the already-mounted case; this is unlike the BSD
+	  automounter (amd), which is a pure user space daemon.
+
+	  To use the automounter you need the user-space tools from
+	  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/testing-v4/>; you also
+	  want to answer Y to "NFS file system support", below.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called autofs4.o.  You will need to add "alias autofs
+	  autofs4" to your modules configuration file.
+
+	  If you are not a part of a fairly large, distributed network or
+	  don't have a laptop which needs to dynamically reconfigure to the
+	  local network, you probably do not need an automounter, and can say
+	  N here.
+
+config REISERFS_FS
+	tristate "Reiserfs support"
+	---help---
+	  Stores not just filenames but the files themselves in a balanced
+	  tree.  Uses journaling.
+
+	  Balanced trees are more efficient than traditional file system
+	  architectural foundations.
+
+	  In general, ReiserFS is as fast as ext2, but is very efficient with
+	  large directories and small files.  Additional patches are needed
+	  for NFS and quotas, please see <http://www.reiserfs.org/> for links.
+
+	  It is more easily extended to have features currently found in
+	  database and keyword search systems than block allocation based file
+	  systems are.  The next version will be so extended, and will support
+	  plugins consistent with our motto ``It takes more than a license to
+	  make source code open.''
+
+	  Read <http://www.reiserfs.org/> to learn more about reiserfs.
+
+	  Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com.
+
+	  If you like it, you can pay us to add new features to it that you
+	  need, buy a support contract, or pay us to port it to another OS.
+
+config REISERFS_CHECK
+	bool "Enable reiserfs debug mode"
+	depends on REISERFS_FS
+	help
+	  If you set this to Y, then ReiserFS will perform every check it can
+	  possibly imagine of its internal consistency throughout its
+	  operation.  It will also go substantially slower.  More than once we
+	  have forgotten that this was on, and then gone despondent over the
+	  latest benchmarks.:-) Use of this option allows our team to go all
+	  out in checking for consistency when debugging without fear of its
+	  effect on end users.  If you are on the verge of sending in a bug
+	  report, say Y and you might get a useful error message.  Almost
+	  everyone should say N.
+
+config REISERFS_PROC_INFO
+	bool "Stats in /proc/fs/reiserfs"
+	depends on REISERFS_FS
+	help
+	  Create under /proc/fs/reiserfs a hierarchy of files, displaying
+	  various ReiserFS statistics and internal data at the expense of
+	  making your kernel or module slightly larger (+8 KB). This also
+	  increases the amount of kernel memory required for each mount.
+	  Almost everyone but ReiserFS developers and people fine-tuning
+	  reiserfs or tracing problems should say N.
+
+config ADFS_FS
+	tristate "ADFS file system support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  The Acorn Disc Filing System is the standard file system of the
+	  RiscOS operating system which runs on Acorn's ARM-based Risc PC
+	  systems and the Acorn Archimedes range of machines. If you say Y
+	  here, Linux will be able to read from ADFS partitions on hard drives
+	  and from ADFS-formatted floppy discs. If you also want to be able to
+	  write to those devices, say Y to "ADFS write support" below.
+
+	  The ADFS partition should be the first partition (i.e.,
+	  /dev/[hs]d?1) on each of your drives. Please read the file
+	  <file:Documentation/filesystems/adfs.txt> for further details.
+
+	  This code is also available as a module called adfs.o ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+config ADFS_FS_RW
+	bool "ADFS write support (DANGEROUS)"
+	depends on ADFS_FS
+	help
+	  If you say Y here, you will be able to write to ADFS partitions on
+	  hard drives and ADFS-formatted floppy disks. This is experimental
+	  codes, so if you're unsure, say N.
+
+config AFFS_FS
+	tristate "Amiga FFS file system support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  The Fast File System (FFS) is the common file system used on hard
+	  disks by Amiga(tm) systems since AmigaOS Version 1.3 (34.20).  Say Y
+	  if you want to be able to read and write files from and to an Amiga
+	  FFS partition on your hard drive.  Amiga floppies however cannot be
+	  read with this driver due to an incompatibility of the floppy
+	  controller used in an Amiga and the standard floppy controller in
+	  PCs and workstations. Read <file:Documentation/filesystems/affs.txt>
+	  and <file:fs/affs/Changes>.
+
+	  With this driver you can also mount disk files used by Bernd
+	  Schmidt's Un*X Amiga Emulator
+	  (<http://www.freiburg.linux.de/~uae/>).
+	  If you want to do this, you will also need to say Y or M to "Loop
+	  device support", above.
+
+	  This file system is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called affs.o.  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.  If unsure,
+	  say N.
+
+config HFS_FS
+	tristate "Apple Macintosh file system support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  If you say Y here, you will be able to mount Macintosh-formatted
+	  floppy disks and hard drive partitions with full read-write access.
+	  Please read <file:fs/hfs/HFS.txt> to learn about the available mount
+	  options.
+
+	  This file system support is also available as a module ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). The module is called hfs.o.  If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config BEFS_FS
+	tristate "BeOS file systemv(BeFS) support (read only) (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  The BeOS File System (BeFS) is the native file system of Be, Inc's
+	  BeOS. Notable features include support for arbitrary attributes
+	  on files and directories, and database-like indices on selected
+	  attributes. (Also note that this driver doesn't make those features
+	  available at this time). It is a 64 bit filesystem, so it supports
+	  extreemly large volumes and files.
+
+	  If you use this filesystem, you should also say Y to at least one
+	  of the NLS (native language support) options below.
+
+	  If you don't know what this is about, say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read Documentation/modules.txt. The module will be
+	  called befs.o.
+
+config BEFS_DEBUG
+	bool "Debug BeFS"
+	depends on BEFS_FS
+	help
+	  If you say Y here, you can use the 'debug' mount option to enable
+	  debugging output from the driver. 
+
+config BFS_FS
+	tristate "BFS file system support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  Boot File System (BFS) is a file system used under SCO UnixWare to
+	  allow the bootloader access to the kernel image and other important
+	  files during the boot process.  It is usually mounted under /stand
+	  and corresponds to the slice marked as "STAND" in the UnixWare
+	  partition.  You should say Y if you want to read or write the files
+	  on your /stand slice from within Linux.  You then also need to say Y
+	  to "UnixWare slices support", below.  More information about the BFS
+	  file system is contained in the file
+	  <file:Documentation/filesystems/bfs.txt>.
+
+	  If you don't know what this is about, say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called bfs.o.  Note that the file system of your root
+	  partition (the one containing the directory /) cannot be compiled as
+	  a module.
+
+config EXT3_FS
+	tristate "Ext3 journalling file system support"
+	---help---
+	  This is the journaling version of the Second extended file system
+	  (often called ext3), the de facto standard Linux file system
+	  (method to organize files on a storage device) for hard disks.
+
+	  The journaling code included in this driver means you do not have
+	  to run e2fsck (file system checker) on your file systems after a
+	  crash.  The journal keeps track of any changes that were being made
+	  at the time the system crashed, and can ensure that your file system
+	  is consistent without the need for a lengthy check.
+
+	  Other than adding the journal to the file system, the on-disk format
+	  of ext3 is identical to ext2.  It is possible to freely switch
+	  between using the ext3 driver and the ext2 driver, as long as the
+	  file system has been cleanly unmounted, or e2fsck is run on the file
+	  system.
+
+	  To add a journal on an existing ext2 file system or change the
+	  behavior of ext3 file systems, you can use the tune2fs utility ("man
+	  tune2fs").  To modify attributes of files and directories on ext3
+	  file systems, use chattr ("man chattr").  You need to be using
+	  e2fsprogs version 1.20 or later in order to create ext3 journals
+	  (available at <http://sourceforge.net/projects/e2fsprogs/>).
+
+	  If you want to compile this file system as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called ext3.o.  Be aware however that the file system
+	  of your root partition (the one containing the directory /) cannot
+	  be compiled as a module, and so this may be dangerous.
+
+# CONFIG_JBD could be its own option (even modular), but until there are
+# other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
+# dep_tristate '  Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
+config JBD
+	bool
+	default EXT3_FS
+	---help---
+	  This is a generic journaling layer for block devices.  It is
+	  currently used by the ext3 file system, but it could also be used to
+	  add journal support to other file systems or block devices such as
+	  RAID or LVM.
+
+	  If you are using the ext3 file system, you need to say Y here. If
+	  you are not using ext3 then you will probably want to say N.
+
+	  If you want to compile this device as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called jbd.o.  If you are compiling ext3 into the kernel,
+	  you cannot compile this code as a module.
+
+config JBD_DEBUG
+	bool "JBD (ext3) debugging support"
+	depends on JBD
+	---help---
+	  If you are using the ext3 journaled file system (or potentially any
+	  other file system/device using JBD), this option allows you to
+	  enable debugging output while the system is running, in order to
+	  help track down any problems you are having.  By default the
+	  debugging output will be turned off.
+
+	  If you select Y here, then you will be able to turn on debugging
+	  with "echo N > /proc/sys/fs/jbd-debug", where N is a number between
+	  1 and 5, the higher the number, the more debugging output is
+	  generated.  To turn debugging off again, do
+	  "echo 0 > /proc/sys/fs/jbd-debug".
+
+# msdos file systems
+config FAT_FS
+	tristate "DOS FAT fs support"
+	---help---
+	  If you want to use one of the FAT-based file systems (the MS-DOS,
+	  VFAT (Windows 95) and UMSDOS (used to run Linux on top of an
+	  ordinary DOS partition) file systems), then you must say Y or M here
+	  to include FAT support. You will then be able to mount partitions or
+	  diskettes with FAT-based file systems and transparently access the
+	  files on them, i.e. MSDOS files will look and behave just like all
+	  other Unix files.
+
+	  This FAT support is not a file system in itself, it only provides
+	  the foundation for the other file systems. You will have to say Y or
+	  M to at least one of "MSDOS fs support" or "VFAT fs support" in
+	  order to make use of it.
+
+	  Another way to read and write MSDOS floppies and hard drive
+	  partitions from within Linux (but not transparently) is with the
+	  mtools ("man mtools") program suite. You don't need to say Y here in
+	  order to do that.
+
+	  If you need to move large files on floppies between a DOS and a
+	  Linux box, say Y here, mount the floppy under Linux with an MSDOS
+	  file system and use GNU tar's M option. GNU tar is a program
+	  available for Unix and DOS ("man tar" or "info tar").
+
+	  It is now also becoming possible to read and write compressed FAT
+	  file systems; read <file:Documentation/filesystems/fat_cvf.txt> for
+	  details.
+
+	  The FAT support will enlarge your kernel by about 37 KB. If unsure,
+	  say Y.
+
+	  If you want to compile this as a module however ( = code which can
+	  be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called fat.o.  Note that if you compile the FAT
+	  support as a module, you cannot compile any of the FAT-based file
+	  systems into the kernel -- they will have to be modules as well.
+	  The file system of your root partition (the one containing the
+	  directory /) cannot be a module, so don't say M here if you intend
+	  to use UMSDOS as your root file system.
+
+config MSDOS_FS
+	tristate "MSDOS fs support"
+	depends on FAT_FS
+	---help---
+	  This allows you to mount MSDOS partitions of your hard drive (unless
+	  they are compressed; to access compressed MSDOS partitions under
+	  Linux, you can either use the DOS emulator DOSEMU, described in the
+	  DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, or try dmsdosfs in
+	  <ftp://ibiblio.org/pub/Linux/system/filesystems/dosfs/>. If you
+	  intend to use dosemu with a non-compressed MSDOS partition, say Y
+	  here) and MSDOS floppies. This means that file access becomes
+	  transparent, i.e. the MSDOS files look and behave just like all
+	  other Unix files.
+
+	  If you want to use UMSDOS, the Unix-like file system on top of a
+	  DOS file system, which allows you to run Linux from within a DOS
+	  partition without repartitioning, you'll have to say Y or M here.
+
+	  If you have Windows 95 or Windows NT installed on your MSDOS
+	  partitions, you should use the VFAT file system (say Y to "VFAT fs
+	  support" below), or you will not be able to see the long filenames
+	  generated by Windows 95 / Windows NT.
+
+	  This option will enlarge your kernel by about 7 KB. If unsure,
+	  answer Y. This will only work if you said Y to "DOS FAT fs support"
+	  as well. If you want to compile this as a module however ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.
+	  The module will be called msdos.o.
+
+#dep_tristate '    UMSDOS: Unix-like file system on top of standard MSDOS fs' CONFIG_UMSDOS_FS $CONFIG_MSDOS_FS
+# UMSDOS is temprory broken
+config UMSDOS_FS
+	bool
+	---help---
+	  Say Y here if you want to run Linux from within an existing DOS
+	  partition of your hard drive. The advantage of this is that you can
+	  get away without repartitioning your hard drive (which often implies
+	  backing everything up and restoring afterwards) and hence you're
+	  able to quickly try out Linux or show it to your friends; the
+	  disadvantage is that Linux becomes susceptible to DOS viruses and
+	  that UMSDOS is somewhat slower than ext2fs.  Another use of UMSDOS
+	  is to write files with long unix filenames to MSDOS floppies; it
+	  also allows Unix-style soft-links and owner/permissions of files on
+	  MSDOS floppies.  You will need a program called umssync in order to
+	  make use of UMSDOS; read
+	  <file:Documentation/filesystems/umsdos.txt>.
+
+	  To get utilities for initializing/checking UMSDOS file system, or
+	  latest patches and/or information, visit the UMSDOS home page at
+	  <http://www.voyager.hr/~mnalis/umsdos/>.
+
+	  This option enlarges your kernel by about 28 KB and it only works if
+	  you said Y to both "DOS FAT fs support" and "MSDOS fs support"
+	  above.  If you want to compile this as a module ( = code which can
+	  be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called umsdos.o.  Note that the file system of your
+	  root partition (the one containing the directory /) cannot be a
+	  module, so saying M could be dangerous.  If unsure, say N.
+
+config VFAT_FS
+	tristate "VFAT (Windows-95) fs support"
+	depends on FAT_FS
+	---help---
+	  This option provides support for normal Windows file systems with
+	  long filenames.  That includes non-compressed FAT-based file systems
+	  used by Windows 95, Windows 98, Windows NT 4.0, and the Unix
+	  programs from the mtools package.
+
+	  You cannot use the VFAT file system for your Linux root partition
+	  (the one containing the directory /); use UMSDOS instead if you
+	  want to run Linux from within a DOS partition (i.e. say Y to
+	  "Unix like fs on top of std MSDOS fs", below).
+
+	  The VFAT support enlarges your kernel by about 10 KB and it only
+	  works if you said Y to the "DOS FAT fs support" above.  Please read
+	  the file <file:Documentation/filesystems/vfat.txt> for details.  If
+	  unsure, say Y.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called vfat.o.
+
+config EFS_FS
+	tristate "EFS file system support (read only) (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  EFS is an older file system used for non-ISO9660 CD-ROMs and hard
+	  disk partitions by SGI's IRIX operating system (IRIX 6.0 and newer
+	  uses the XFS file system for hard disk partitions however).
+
+	  This implementation only offers read-only access. If you don't know
+	  what all this is about, it's safe to say N. For more information
+	  about EFS see its home page at <http://aeschi.ch.eu.org/efs/>.
+
+	  If you want to compile the EFS file system support as a module ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>. The module will be called efs.o.
+
+config JFFS_FS
+	tristate "Journalling Flash File System (JFFS) support"
+	depends on MTD
+	help
+	  JFFS is the Journaling Flash File System developed by Axis
+	  Communications in Sweden, aimed at providing a crash/powerdown-safe
+	  file system for disk-less embedded devices. Further information is
+	  available at (<http://developer.axis.com/software/jffs/>).
+
+config JFFS_FS_VERBOSE
+	int "JFFS debugging verbosity (0 = quiet, 3 = noisy)"
+	depends on JFFS_FS
+	default "0"
+	help
+	  Determines the verbosity level of the JFFS debugging messages.
+
+config JFFS_PROC_FS
+	bool "JFFS stats available in /proc filesystem"
+	depends on JFFS_FS
+	help
+	  Enabling this option will cause statistics from mounted JFFS file systems
+	  to be made available to the user in the /proc/fs/jffs/ directory.
+
+config JFFS2_FS
+	tristate "Journalling Flash File System v2 (JFFS2) support"
+	depends on MTD
+	help
+	  JFFS2 is the second generation of the Journalling Flash File System
+	  for use on diskless embedded devices. It provides improved wear
+	  levelling, compression and support for hard links. You cannot use
+	  this on normal block devices, only on 'MTD' devices.
+
+	  Further information should be made available soon at
+	  <http://sources.redhat.com/jffs2/>.
+
+config JFFS2_FS_DEBUG
+	int "JFFS2 debugging verbosity (0 = quiet, 2 = noisy)"
+	depends on JFFS2_FS
+	default "0"
+	---help---
+	  This controls the amount of debugging messages produced by the JFFS2
+	  code. Set it to zero for use in production systems. For evaluation,
+	  testing and debugging, it's advisable to set it to one. This will
+	  enable a few assertions and will print debugging messages at the
+	  KERN_DEBUG loglevel, where they won't normally be visible. Level 2
+	  is unlikely to be useful - it enables extra debugging in certain
+	  areas which at one point needed debugging, but when the bugs were
+	  located and fixed, the detailed messages were relegated to level 2.
+
+	  If reporting bugs, please try to have available a full dump of the
+	  messages at debug level 1 while the misbehaviour was occurring.
+
+config JFFS2_FS_NAND
+	bool "JFFS2 support for NAND flash (EXPERIMENTAL)"
+	depends on JFFS2_FS && EXPERIMENTAL
+
+config CRAMFS
+	tristate "Compressed ROM file system support"
+	---help---
+	  Saying Y here includes support for CramFs (Compressed ROM File
+	  System).  CramFs is designed to be a simple, small, and compressed
+	  file system for ROM based embedded systems.  CramFs is read-only,
+	  limited to 256MB file systems (with 16MB files), and doesn't support
+	  16/32 bits uid/gid, hard links and timestamps.
+
+	  See <file:Documentation/filesystems/cramfs.txt> and
+	  <file:fs/cramfs/README> for further information.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called cramfs.o.  Note that the root file system (the one
+	  containing the directory /) cannot be compiled as a module.
+
+	  If unsure, say N.
+
+config TMPFS
+	bool "Virtual memory file system support (former shm fs)"
+	help
+	  Tmpfs is a file system which keeps all files in virtual memory.
+
+	  Everything in tmpfs is temporary in the sense that no files will be
+	  created on your hard drive. The files live in memory and swap
+	  space. If you unmount a tmpfs instance, everything stored therein is
+	  lost.
+
+	  See <file:Documentation/filesystems/tmpfs.txt> for details.
+
+config RAMFS
+	bool
+	default y
+	---help---
+	  Ramfs is a file system which keeps all files in RAM. It allows
+	  read and write access.
+
+	  It is more of an programming example than a useable file system.  If
+	  you need a file system which lives in RAM with limit checking use
+	  tmpfs.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ramfs.o.
+
+config ISO9660_FS
+	tristate "ISO 9660 CDROM file system support"
+	---help---
+	  This is the standard file system used on CD-ROMs.  It was previously
+	  known as "High Sierra File System" and is called "hsfs" on other
+	  Unix systems.  The so-called Rock-Ridge extensions which allow for
+	  long Unix filenames and symbolic links are also supported by this
+	  driver.  If you have a CD-ROM drive and want to do more with it than
+	  just listen to audio CDs and watch its LEDs, say Y (and read
+	  <file:Documentation/filesystems/isofs.txt> and the CD-ROM-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>), thereby
+	  enlarging your kernel by about 27 KB; otherwise say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called isofs.o.
+
+config JOLIET
+	bool "Microsoft Joliet CDROM extensions"
+	depends on ISO9660_FS
+	help
+	  Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
+	  which allows for long filenames in unicode format (unicode is the
+	  new 16 bit character code, successor to ASCII, which encodes the
+	  characters of almost all languages of the world; see
+	  <http://www.unicode.org/> for more information).  Say Y here if you
+	  want to be able to read Joliet CD-ROMs under Linux.
+
+config ZISOFS
+	bool "Transparent decompression extension"
+	depends on ISO9660_FS
+	help
+	  This is a Linux-specific extension to RockRidge which lets you store
+	  data in compressed form on a CD-ROM and have it transparently
+	  decompressed when the CD-ROM is accessed.  See
+	  <http://www.kernel.org/pub/linux/utils/fs/zisofs/> for the tools
+	  necessary to create such a filesystem.  Say Y here if you want to be
+	  able to read such compressed CD-ROMs.
+
+config JFS_FS
+	tristate "JFS filesystem support"
+	help
+	  This is a port of IBM's Journaled Filesystem .  More information is
+	  available in the file Documentation/filesystems/jfs.txt.
+
+	  If you do not intend to use the JFS filesystem, say N.
+
+config JFS_DEBUG
+	bool "JFS debugging"
+	depends on JFS_FS
+	help
+	  If you are experiencing any problems with the JFS filesystem, say
+	  Y here.  This will result in additional debugging messages to be
+	  written to the system log.  Under normal circumstances, this
+	  results in very little overhead.
+
+config JFS_STATISTICS
+	bool "JFS statistics"
+	depends on JFS_FS
+	help
+	  Enabling this option will cause statistics from the JFS file system
+	  to be made available to the user in the /proc/fs/jfs/ directory.
+
+config MINIX_FS
+	tristate "Minix fs support"
+	---help---
+	  Minix is a simple operating system used in many classes about OS's.
+	  The minix file system (method to organize files on a hard disk
+	  partition or a floppy disk) was the original file system for Linux,
+	  but has been superseded by the second extended file system ext2fs.
+	  You don't want to use the minix file system on your hard disk
+	  because of certain built-in restrictions, but it is sometimes found
+	  on older Linux floppy disks.  This option will enlarge your kernel
+	  by about 28 KB. If unsure, say N.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>. The module
+	  will be called minix.o.  Note that the file system of your root
+	  partition (the one containing the directory /) cannot be compiled as
+	  a module.
+
+config VXFS_FS
+	tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
+	---help---
+	  FreeVxFS is a file system driver that support the VERITAS VxFS(TM)
+	  file system format.  VERITAS VxFS(TM) is the standard file system
+	  of SCO UnixWare (and possibly others) and optionally available
+	  for Sunsoft Solaris, HP-UX and many other operating systems.
+	  Currently only readonly access is supported.
+
+	  NOTE: the file system type as used by mount(1), mount(2) and
+	  fstab(5) is 'vxfs' as it describes the file system format, not
+	  the actual driver.
+
+	  This file system is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called freevxfs.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  If
+	  unsure, say N.
+
+config NTFS_FS
+	tristate "NTFS file system support (read only)"
+	---help---
+	  NTFS is the file system of Microsoft Windows NT/2000/XP. For more
+	  information see <file:Documentation/filesystems/ntfs.txt>. Saying Y
+	  here would allow you to read from NTFS partitions.
+
+	  This file system 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 ntfs.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If you are not using Windows NT/2000/XP in addition to Linux on your
+	  computer it is safe to say N.
+
+config NTFS_DEBUG
+	bool "NTFS debugging support"
+	depends on NTFS_FS
+	---help---
+	  If you are experiencing any problems with the NTFS file system, say
+	  Y here. This will result in additional consistency checks to be
+	  performed by the driver as well as additional debugging messages to
+	  be written to the system log. Note that debugging messages are
+	  disabled by default. To enable them, supply the option debug_msgs=1
+	  at the kernel command line when booting the kernel or as an option
+	  to insmod when loading the ntfs module. Once the driver is active,
+	  you can enable debugging messages by doing (as root):
+	  echo 1 > /proc/sys/fs/ntfs-debug
+	  Replacing the "1" with "0" would disable debug messages.
+
+	  If you leave debugging messages disabled, this results in little
+	  overhead, but enabling debug messages results in very significant
+	  slowdown of the system.
+
+	  When reporting bugs, please try to have available a full dump of
+	  debugging messages while the misbehaviour was occurring.
+
+config NTFS_RW
+	bool "NTFS write support (DANGEROUS)"
+	depends on NTFS_FS && EXPERIMENTAL
+	help
+	  This enables the experimental write support in the NTFS driver.
+
+	  WARNING: Do not use this option unless you are actively developing
+	  NTFS as it is currently guaranteed to be broken and you
+	  may lose all your data!
+
+	  It is strongly recommended and perfectly safe to say N here.
+
+config HPFS_FS
+	tristate "OS/2 HPFS file system support"
+	---help---
+	  OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS
+	  is the file system used for organizing files on OS/2 hard disk
+	  partitions. Say Y if you want to be able to read files from and
+	  write files to an OS/2 HPFS partition on your hard drive. OS/2
+	  floppies however are in regular MSDOS format, so you don't need this
+	  option in order to be able to read them. Read
+	  <file:Documentation/filesystems/hpfs.txt>.
+
+	  This file system is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called hpfs.o.  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.  If unsure,
+	  say N.
+
+config PROC_FS
+	bool "/proc file system support"
+	---help---
+	  This is a virtual file system providing information about the status
+	  of the system. "Virtual" means that it doesn't take up any space on
+	  your hard disk: the files are created on the fly by the kernel when
+	  you try to access them. Also, you cannot read the files with older
+	  version of the program less: you need to use more or cat.
+
+	  It's totally cool; for example, "cat /proc/interrupts" gives
+	  information about what the different IRQs are used for at the moment
+	  (there is a small number of Interrupt ReQuest lines in your computer
+	  that are used by the attached devices to gain the CPU's attention --
+	  often a source of trouble if two devices are mistakenly configured
+	  to use the same IRQ). The program procinfo to display some
+	  information about your system gathered from the /proc file system.
+
+	  Before you can use the /proc file system, it has to be mounted,
+	  meaning it has to be given a location in the directory hierarchy.
+	  That location should be /proc. A command such as "mount -t proc proc
+	  /proc" or the equivalent line in /etc/fstab does the job.
+
+	  The /proc file system is explained in the file
+	  <file:Documentation/filesystems/proc.txt> and on the proc(5) manpage
+	  ("man 5 proc").
+
+	  This option will enlarge your kernel by about 67 KB. Several
+	  programs depend on this, so everyone should say Y here.
+
+config DEVFS_FS
+	bool "/dev file system support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  This is support for devfs, a virtual file system (like /proc) which
+	  provides the file system interface to device drivers, normally found
+	  in /dev. Devfs does not depend on major and minor number
+	  allocations. Device drivers register entries in /dev which then
+	  appear automatically, which means that the system administrator does
+	  not have to create character and block special device files in the
+	  /dev directory using the mknod command (or MAKEDEV script) anymore.
+
+	  This is work in progress. If you want to use this, you *must* read
+	  the material in <file:Documentation/filesystems/devfs/>, especially
+	  the file README there.
+
+	  If unsure, say N.
+
+config DEVFS_MOUNT
+	bool "Automatically mount at boot"
+	depends on DEVFS_FS
+	help
+	  This option appears if you have CONFIG_DEVFS_FS enabled. Setting
+	  this to 'Y' will make the kernel automatically mount devfs onto /dev
+	  when the system is booted, before the init thread is started.
+	  You can override this with the "devfs=nomount" boot option.
+
+	  If unsure, say N.
+
+config DEVFS_DEBUG
+	bool "Debug devfs"
+	depends on DEVFS_FS
+	help
+	  If you say Y here, then the /dev file system code will generate
+	  debugging messages. See the file
+	  <file:Documentation/filesystems/devfs/boot-options> for more
+	  details.
+
+	  If unsure, say N.
+
+# It compiles as a module for testing only.  It should not be used
+# as a module in general.  If we make this "tristate", a bunch of people
+# who don't know what they are doing turn it on and complain when it
+# breaks.
+config DEVPTS_FS
+	bool "/dev/pts file system for Unix98 PTYs"
+	depends on UNIX98_PTYS
+	---help---
+	  You should say Y here if you said Y to "Unix98 PTY support" above.
+	  You'll then get a virtual file system which can be mounted on
+	  /dev/pts with "mount -t devpts". This, together with the pseudo
+	  terminal master multiplexer /dev/ptmx, is used for pseudo terminal
+	  support as described in The Open Group's Unix98 standard: in order
+	  to acquire a pseudo terminal, a process opens /dev/ptmx; the number
+	  of the pseudo terminal is then made available to the process and the
+	  pseudo terminal slave can be accessed as /dev/pts/<number>. What was
+	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
+
+	  The GNU C library glibc 2.1 contains the requisite support for this
+	  mode of operation; you also need client programs that use the Unix98
+	  API. Please read <file:Documentation/Changes> for more information
+	  about the Unix98 pty devices.
+
+	  Note that the experimental "/dev file system support"
+	  (CONFIG_DEVFS_FS)  is a more general facility.
+
+config QNX4FS_FS
+	tristate "QNX4 file system support (read only)"
+	---help---
+	  This is the file system used by the real-time operating systems
+	  QNX 4 and QNX 6 (the latter is also called QNX RTP).
+	  Further information is available at <http://www.qnx.com/>.
+	  Say Y if you intend to mount QNX hard disks or floppies.
+	  Unless you say Y to "QNX4FS read-write support" below, you will
+	  only be able to read these file systems.
+
+	  This file system support is also available as a module ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). The module is called qnx4.o. If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  If you don't know whether you need it, then you don't need it:
+	  answer N.
+
+config QNX4FS_RW
+	bool "QNX4FS write support (DANGEROUS)"
+	depends on QNX4FS_FS && EXPERIMENTAL
+	help
+	  Say Y if you want to test write support for QNX4 file systems.
+
+	  It's currently broken, so for now:
+	  answer N.
+
+config ROMFS_FS
+	tristate "ROM file system support"
+	---help---
+	  This is a very small read-only file system mainly intended for
+	  initial ram disks of installation disks, but it could be used for
+	  other read-only media as well.  Read
+	  <file:Documentation/filesystems/romfs.txt> for details.
+
+	  This file system support is also available as a module ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). The module is called romfs.o.  If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  Note that the file system of your
+	  root partition (the one containing the directory /) cannot be a
+	  module.
+
+	  If you don't know whether you need it, then you don't need it:
+	  answer N.
+
+config EXT2_FS
+	tristate "Second extended fs support"
+	---help---
+	  This is the de facto standard Linux file system (method to organize
+	  files on a storage device) for hard disks.
+
+	  You want to say Y here, unless you intend to use Linux exclusively
+	  from inside a DOS partition using the UMSDOS file system. The
+	  advantage of the latter is that you can get away without
+	  repartitioning your hard drive (which often implies backing
+	  everything up and restoring afterwards); the disadvantage is that
+	  Linux becomes susceptible to DOS viruses and that UMSDOS is somewhat
+	  slower than ext2fs. Even if you want to run Linux in this fashion,
+	  it might be a good idea to have ext2fs around: it enables you to
+	  read more floppy disks and facilitates the transition to a *real*
+	  Linux partition later. Another (rare) case which doesn't require
+	  ext2fs is a diskless Linux box which mounts all files over the
+	  network using NFS (in this case it's sufficient to say Y to "NFS
+	  file system support" below). Saying Y here will enlarge your kernel
+	  by about 44 KB.
+
+	  The Ext2fs-Undeletion mini-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, gives information about
+	  how to retrieve deleted files on ext2fs file systems.
+
+	  To change the behavior of ext2 file systems, you can use the tune2fs
+	  utility ("man tune2fs"). To modify attributes of files and
+	  directories on ext2 file systems, use chattr ("man chattr").
+
+	  Ext2fs partitions can be read from within DOS using the ext2tool
+	  command line tool package (available from
+	  <ftp://ibiblio.org/pub/Linux/system/filesystems/ext2/>) and from
+	  within Windows NT using the ext2nt command line tool package from
+	  <ftp://ibiblio.org/pub/Linux/utils/dos/>.  Explore2fs is a
+	  graphical explorer for ext2fs partitions which runs on Windows 95
+	  and Windows NT and includes experimental write support; it is
+	  available from
+	  <http://jnewbigin-pc.it.swin.edu.au/Linux/Explore2fs.htm>.
+
+	  If you want to compile this file system as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called ext2.o.  Be aware however that the file system
+	  of your root partition (the one containing the directory /) cannot
+	  be compiled as a module, and so this could be dangerous.  Most
+	  everyone wants to say Y here.
+
+config SYSV_FS
+	tristate "System V/Xenix/V7/Coherent file system support"
+	---help---
+	  SCO, Xenix and Coherent are commercial Unix systems for Intel
+	  machines, and Version 7 was used on the DEC PDP-11. Saying Y
+	  here would allow you to read from their floppies and hard disk
+	  partitions.
+
+	  If you have floppies or hard disk partitions like that, it is likely
+	  that they contain binaries from those other Unix systems; in order
+	  to run these binaries, you will want to install linux-abi which is a
+	  a set of kernel modules that lets you run SCO, Xenix, Wyse,
+	  UnixWare, Dell Unix and System V programs under Linux.  It is
+	  available via FTP (user: ftp) from
+	  <ftp://ftp.openlinux.org/pub/people/hch/linux-abi/>).
+	  NOTE: that will work only for binaries from Intel-based systems;
+	  PDP ones will have to wait until somebody ports Linux to -11 ;-)
+
+	  If you only intend to mount files from some other Unix over the
+	  network using NFS, you don't need the System V file system support
+	  (but you need NFS file system support obviously).
+
+	  Note that this option is generally not needed for floppies, since a
+	  good portable way to transport files and directories between unixes
+	  (and even other operating systems) is given by the tar program ("man
+	  tar" or preferably "info tar").  Note also that this option has
+	  nothing whatsoever to do with the option "System V IPC". Read about
+	  the System V file system in
+	  <file:Documentation/filesystems/sysv-fs.txt>.
+	  Saying Y here will enlarge your kernel by about 27 KB.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called sysv.o.
+
+	  If you haven't heard about all of this before, it's safe to say N.
+
+config UDF_FS
+	tristate "UDF file system support (read only)"
+	---help---
+	  This is the new file system used on some CD-ROMs and DVDs. Say Y if
+	  you intend to mount DVD discs or CDRW's written in packet mode, or
+	  if written to by other UDF utilities, such as DirectCD. This UDF
+	  file system support is read-only. If you want to write to UDF
+	  file systems on some media, you need to say Y to "UDF read-write
+	  support" below in addition. Please read
+	  <file:Documentation/filesystems/udf.txt>.
+
+	  This file system support is also available as a module ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). The module is called udf.o. If you want to
+	  compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+config UDF_RW
+	bool "UDF write support (DANGEROUS)"
+	depends on UDF_FS && EXPERIMENTAL
+	help
+	  Say Y if you want to test write support for UDF file systems.
+	  Due to lack of support for writing to CDR/CDRW's, this option
+	  is only supported for hard discs, DVD-RAM, and loopback files.
+
+config UFS_FS
+	tristate "UFS file system support (read only)"
+	---help---
+	  BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD,
+	  OpenBSD and NeXTstep) use a file system called UFS. Some System V
+	  Unixes can create and mount hard disk partitions and diskettes using
+	  this file system as well. Saying Y here will allow you to read from
+	  these partitions; if you also want to write to them, say Y to the
+	  experimental "UFS file system write support", below. Please read the
+	  file <file:Documentation/filesystems/ufs.txt> for more information.
+
+	  If you only intend to mount files from some other Unix over the
+	  network using NFS, you don't need the UFS file system support (but
+	  you need NFS file system support obviously).
+
+	  Note that this option is generally not needed for floppies, since a
+	  good portable way to transport files and directories between unixes
+	  (and even other operating systems) is given by the tar program ("man
+	  tar" or preferably "info tar").
+
+	  When accessing NeXTstep files, you may need to convert them from the
+	  NeXT character set to the Latin1 character set; use the program
+	  recode ("info recode") for this purpose.
+
+	  If you want to compile the UFS file system support as a module ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>. The module will be called ufs.o.
+
+	  If you haven't heard about all of this before, it's safe to say N.
+
+config UFS_FS_WRITE
+	bool "UFS file system write support (DANGEROUS)"
+	depends on UFS_FS && EXPERIMENTAL
+	help
+	  Say Y here if you want to try writing to UFS partitions. This is
+	  experimental, so you should back up your UFS partitions beforehand.
+
+config XFS_FS
+	tristate "XFS filesystem support"
+	---help---
+	  XFS is a high performance journaling filesystem which originated
+	  on the SGI IRIX platform.  It is completely multi-threaded, can
+	  support large files and large filesystems, extended attributes,
+	  variable block sizes, is extent based, and makes extensive use of
+	  Btrees (directories, extents, free space) to aid both performance
+	  and scalability.
+
+	  Refer to the documentation at <http://oss.sgi.com/projects/xfs/>
+	  for complete details.  This implementation is on-disk compatible
+	  with the IRIX version of XFS.
+
+	  If you want to compile this file system as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>. The
+	  module will be called xfs.o.  Be aware, however, that if the file
+	  system of your root partition is compiled as a module, you'll need
+	  to use an initial ramdisk (initrd) to boot.
+
+config XFS_RT
+	bool "Realtime support (EXPERIMENTAL)"
+	depends on XFS_FS && EXPERIMENTAL
+	---help---
+	  If you say Y here you will be able to mount and use XFS filesystems
+	  which contain a realtime subvolume. The realtime subvolume is a
+	  separate area of disk space where only file data is stored. The
+	  realtime subvolume is designed to provide very deterministic
+	  data rates suitable for media streaming applications.
+
+	  See the xfs man page in section 5 for a bit more information.
+
+	  This feature is unsupported at this time, is not yet fully
+	  functional, and may cause serious problems.
+
+	  If unsure, say N.
+
+config XFS_QUOTA
+	bool "Quota support"
+	depends on XFS_FS
+	---help---
+	  If you say Y here, you will be able to set limits for disk usage on
+	  a per user and/or a per group basis under XFS.  XFS considers quota
+	  information as filesystem metadata and uses journaling to provide a
+	  higher level guarantee of consistency.  The on-disk data format for
+	  quota is also compatible with the IRIX version of XFS, allowing a
+	  filesystem to be migrated between Linux and IRIX without any need
+	  for conversion.
+
+	  If unsure, say N.  More comprehensive documentation can be found in
+	  README.quota in the xfsprogs package.  XFS quota can be used either
+	  with or without the generic quota support enabled (CONFIG_QUOTA) -
+	  they are completely independent subsystems.
+
+
+menu "Network File Systems"
+	depends on NET
+
+config CODA_FS
+	tristate "Coda file system support (advanced network fs)"
+	depends on INET
+	---help---
+	  Coda is an advanced network file system, similar to NFS in that it
+	  enables you to mount file systems of a remote server and access them
+	  with regular Unix commands as if they were sitting on your hard
+	  disk.  Coda has several advantages over NFS: support for
+	  disconnected operation (e.g. for laptops), read/write server
+	  replication, security model for authentication and encryption,
+	  persistent client caches and write back caching.
+
+	  If you say Y here, your Linux box will be able to act as a Coda
+	  *client*.  You will need user level code as well, both for the
+	  client and server.  Servers are currently user level, i.e. they need
+	  no kernel support.  Please read
+	  <file:Documentation/filesystems/coda.txt> and check out the Coda
+	  home page <http://www.coda.cs.cmu.edu/>.
+
+	  If you want to compile the coda client support as a module ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want), say M here and read
+	  <file:Documentation/modules.txt>.  The module will be called coda.o.
+
+config INTERMEZZO_FS
+	tristate "InterMezzo file system support (replicating fs) (EXPERIMENTAL)"
+	depends on INET && EXPERIMENTAL
+	help
+	  InterMezzo is a networked file system with disconnected operation
+	  and kernel level write back caching.  It is most often used for
+	  replicating potentially large trees or keeping laptop/desktop copies
+	  in sync.
+
+	  If you say Y or M your kernel or module will provide InterMezzo
+	  support.  You will also need a file server daemon, which you can get
+	  from <http://www.inter-mezzo.org/>.
+
+config NFS_FS
+	tristate "NFS file system support"
+	depends on INET
+	---help---
+	  If you are connected to some other (usually local) Unix computer
+	  (using SLIP, PLIP, PPP or Ethernet) and want to mount files residing
+	  on that computer (the NFS server) using the Network File Sharing
+	  protocol, say Y. "Mounting files" means that the client can access
+	  the files with usual UNIX commands as if they were sitting on the
+	  client's hard disk. For this to work, the server must run the
+	  programs nfsd and mountd (but does not need to have NFS file system
+	  support enabled in its kernel). NFS is explained in the Network
+	  Administrator's Guide, available from
+	  <http://www.linuxdoc.org/docs.html#guide>, on its man page: "man
+	  nfs", and in the NFS-HOWTO.
+
+	  A superior but less widely used alternative to NFS is provided by
+	  the Coda file system; see "Coda file system support" below.
+
+	  If you say Y here, you should have said Y to TCP/IP networking also.
+	  This option would enlarge your kernel by about 27 KB.
+
+	  This file system is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called nfs.o. If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  If you are configuring a diskless machine which will mount its root
+	  file system over NFS at boot time, say Y here and to "Kernel
+	  level IP autoconfiguration" above and to "Root file system on NFS"
+	  below. You cannot compile this driver as a module in this case.
+	  There are two packages designed for booting diskless machines over
+	  the net: netboot, available from
+	  <http://ftp1.sourceforge.net/netboot/>, and Etherboot,
+	  available from <http://ftp1.sourceforge.net/etherboot/>.
+
+	  If you don't know what all this is about, say N.
+
+config NFS_V3
+	bool "Provide NFSv3 client support"
+	depends on NFS_FS
+	help
+	  Say Y here if you want your NFS client to be able to speak the newer
+	  version 3 of the NFS protocol.
+
+	  If unsure, say N.
+
+config NFS_V4
+	bool "Provide NFSv4 client support (EXPERIMENTAL)"
+	depends on NFS_FS && EXPERIMENTAL
+	help
+	  Say Y here if you want your NFS client to be able to speak the newer
+	  version 4 of the NFS protocol.  This feature is experimental, and
+	  should only be used if you are interested in helping to test NFSv4.
+
+	  If unsure, say N.
+
+config ROOT_NFS
+	bool "Root file system on NFS"
+	depends on NFS_FS=y && IP_PNP
+	help
+	  If you want your Linux box to mount its whole root file system (the
+	  one containing the directory /) from some other computer over the
+	  net via NFS (presumably because your box doesn't have a hard disk),
+	  say Y. Read <file:Documentation/nfsroot.txt> for details. It is
+	  likely that in this case, you also want to say Y to "Kernel level IP
+	  autoconfiguration" so that your box can discover its network address
+	  at boot time.
+
+	  Most people say N here.
+
+config NFSD
+	tristate "NFS server support"
+	depends on INET
+	---help---
+	  If you want your Linux box to act as an NFS *server*, so that other
+	  computers on your local network which support NFS can access certain
+	  directories on your box transparently, you have two options: you can
+	  use the self-contained user space program nfsd, in which case you
+	  should say N here, or you can say Y and use the kernel based NFS
+	  server. The advantage of the kernel based solution is that it is
+	  faster.
+
+	  In either case, you will need support software; the respective
+	  locations are given in the file <file:Documentation/Changes> in the
+	  NFS section.
+
+	  If you say Y here, you will get support for version 2 of the NFS
+	  protocol (NFSv2). If you also want NFSv3, say Y to the next question
+	  as well.
+
+	  Please read the NFS-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  The NFS server is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called nfsd.o.  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.  If unsure,
+	  say N.
+
+config NFSD_V3
+	bool "Provide NFSv3 server support"
+	depends on NFSD
+	help
+	  If you would like to include the NFSv3 server as well as the NFSv2
+	  server, say Y here.  If unsure, say Y.
+
+config NFSD_V4
+	bool "Provide NFSv4 server support (EXPERIMENTAL)"
+	depends on NFSD_V3 && EXPERIMENTAL
+	help
+	  If you would like to include the NFSv4 server as well as the NFSv2
+	  and NFSv3 servers, say Y here.  This feature is experimental, and
+	  should only be used if you are interested in helping to test NFSv4.
+	  If unsure, say N.
+
+config NFSD_TCP
+	bool "Provide NFS server over TCP support (EXPERIMENTAL)"
+	depends on NFSD && EXPERIMENTAL
+	help
+	  Enable NFS service over TCP connections.  This the officially
+	  still experimental, but seems to work well.
+
+config SUNRPC
+	tristate
+	default m if NFS_FS!=y && NFSD!=y && (NFS_FS=m || NFSD=m)
+	default y if NFS_FS=y || NFSD=y
+
+config LOCKD
+	tristate
+	default m if NFS_FS!=y && NFSD!=y && (NFS_FS=m || NFSD=m)
+	default y if NFS_FS=y || NFSD=y
+
+config LOCKD_V4
+	bool
+	depends on NFSD_V3 || NFS_V3
+	default y
+
+config EXPORTFS
+	tristate
+	default NFSD
+
+config CIFS
+	tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)"
+	depends on INET
+	---help---
+	  This is the client VFS module for the Common Internet File System
+	  (CIFS) protocol which is the successor to the Server Message Block 
+	  (SMB) protocol, the native file sharing mechanism for most early
+	  PC operating systems.  CIFS is fully supported by current network
+	  file servers such as Windows 2000 (including Windows NT version 4 
+	  and Windows XP) as well by Samba (which provides excellent CIFS
+	  server support for Linux and many other operating systems).  For
+	  production systems the smbfs module may be used instead of this
+	  cifs module since smbfs is currently more stable and provides
+	  support for older servers.  The intent of this module is to provide the
+	  most advanced network file system function for CIFS compliant servers, 
+	  including support for dfs (heirarchical name space), secure per-user
+	  session establishment, safe distributed caching (oplock), optional
+	  packet signing, Unicode and other internationalization improvements, and
+	  optional Winbind (nsswitch) integration.  This module is in an early
+	  development stage, so unless you are specifically interested in this
+	  filesystem, just say N.
+
+config SMB_FS
+	tristate "SMB file system support (to mount Windows shares etc.)"
+	depends on INET
+	---help---
+	  SMB (Server Message Block) is the protocol Windows for Workgroups
+	  (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share
+	  files and printers over local networks.  Saying Y here allows you to
+	  mount their file systems (often called "shares" in this context) and
+	  access them just like any other Unix directory.  Currently, this
+	  works only if the Windows machines use TCP/IP as the underlying
+	  transport protocol, and not NetBEUI.  For details, read
+	  <file:Documentation/filesystems/smbfs.txt> and the SMB-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note: if you just want your box to act as an SMB *server* and make
+	  files and printing services available to Windows clients (which need
+	  to have a TCP/IP stack), you don't need to say Y here; you can use
+	  the program SAMBA (available from <ftp://ftp.samba.org/pub/samba/>)
+	  for that.
+
+	  General information about how to connect Linux, Windows machines and
+	  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
+
+	  If you want to compile the SMB support as a module ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called smbfs.o.  Most people say N, however.
+
+config SMB_NLS_DEFAULT
+	bool "Use a default NLS"
+	depends on SMB_FS
+	help
+	  Enabling this will make smbfs use nls translations by default. You
+	  need to specify the local charset (CONFIG_NLS_DEFAULT) in the nls
+	  settings and you need to give the default nls for the SMB server as
+	  CONFIG_SMB_NLS_REMOTE.
+
+	  The nls settings can be changed at mount time, if your smbmount
+	  supports that, using the codepage and iocharset parameters.
+
+	  smbmount from samba 2.2.0 or later supports this.
+
+config SMB_NLS_REMOTE
+	string "Default Remote NLS Option"
+	depends on SMB_NLS_DEFAULT
+	default "cp437"
+	help
+	  This setting allows you to specify a default value for which
+	  codepage the server uses. If this field is left blank no
+	  translations will be done by default. The local codepage/charset
+	  default to CONFIG_NLS_DEFAULT.
+
+	  The nls settings can be changed at mount time, if your smbmount
+	  supports that, using the codepage and iocharset parameters.
+
+	  smbmount from samba 2.2.0 or later supports this.
+
+config NCP_FS
+	tristate "NCP file system support (to mount NetWare volumes)"
+	depends on IPX!=n || INET
+	---help---
+	  NCP (NetWare Core Protocol) is a protocol that runs over IPX and is
+	  used by Novell NetWare clients to talk to file servers.  It is to
+	  IPX what NFS is to TCP/IP, if that helps.  Saying Y here allows you
+	  to mount NetWare file server volumes and to access them just like
+	  any other Unix directory.  For details, please read the file
+	  <file:Documentation/filesystems/ncpfs.txt> in the kernel source and
+	  the IPX-HOWTO from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  You do not have to say Y here if you want your Linux box to act as a
+	  file *server* for Novell NetWare clients.
+
+	  General information about how to connect Linux, Windows machines and
+	  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
+
+	  If you want to compile this as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called ncpfs.o.  Say N unless you are connected to a Novell
+	  network.
+
+source "fs/ncpfs/Kconfig"
+
+# for fs/nls/Config.in
+config AFS_FS
+	tristate "Andrew File System support (AFS) (Experimental)"
+	depends on INET && EXPERIMENTAL
+	help
+	  If you say Y here, you will get an experimental Andrew File System
+	  driver. It currently only supports unsecured read-only AFS access.
+
+	  See Documentation/filesystems/afs.txt for more intormation.
+
+	  If unsure, say N.
+
+config RXRPC
+	tristate
+	default m if AFS_FS=m
+	default y if AFS_FS=y
+
+endmenu
+
+# for fs/nls/Config.in
+config ZISOFS_FS
+	tristate
+	depends on ZISOFS
+	default ISO9660_FS
+
+
+menu "Partition Types"
+
+source "fs/partitions/Kconfig"
+
+endmenu
+
+source "fs/nls/Kconfig"
+
+endmenu
+
diff -Nru a/fs/Makefile b/fs/Makefile
--- a/fs/Makefile	Wed Oct 30 16:44:29 2002
+++ b/fs/Makefile	Wed Oct 30 16:44:29 2002
@@ -6,14 +6,14 @@
 # 
 
 export-objs :=	open.o dcache.o buffer.o bio.o inode.o dquot.o mpage.o aio.o \
-                fcntl.o read_write.o dcookies.o
+                fcntl.o read_write.o dcookies.o fcblist.o
 
 obj-y :=	open.o read_write.o devices.o file_table.o buffer.o \
 		bio.o super.o block_dev.o char_dev.o stat.o exec.o pipe.o \
 		namei.o fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \
 		dcache.o inode.o attr.o bad_inode.o file.o dnotify.o \
 		filesystems.o namespace.o seq_file.o xattr.o libfs.o \
-		fs-writeback.o mpage.o direct-io.o aio.o
+		fs-writeback.o mpage.o direct-io.o aio.o fcblist.o
 
 ifneq ($(CONFIG_NFSD),n)
 ifneq ($(CONFIG_NFSD),)
@@ -87,5 +87,6 @@
 obj-$(CONFIG_JFS_FS)		+= jfs/
 obj-$(CONFIG_XFS_FS)		+= xfs/
 obj-$(CONFIG_AFS_FS)		+= afs/
+obj-$(CONFIG_BEFS_FS)		+= befs/
 
 include $(TOPDIR)/Rules.make
diff -Nru a/fs/aio.c b/fs/aio.c
--- a/fs/aio.c	Wed Oct 30 16:44:28 2002
+++ b/fs/aio.c	Wed Oct 30 16:44:28 2002
@@ -608,7 +608,7 @@
 	}
 
 	if (!kiocbTryKick(iocb)) {
-		long flags;
+		unsigned long flags;
 		spin_lock_irqsave(&ctx->ctx_lock, flags);
 		list_add_tail(&iocb->ki_run_list, &ctx->run_list);
 		spin_unlock_irqrestore(&ctx->ctx_lock, flags);
diff -Nru a/fs/befs/ChangeLog b/fs/befs/ChangeLog
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/ChangeLog	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,417 @@
+Version 0.92 (2002-03-29)
+==========
+* Minor cleanup. Ran Lindent on the sources.
+
+Version 0.92 (2002-03-27)
+==========
+* Fixed module makefile problem. It was not compiling all the correct 
+    source files!
+* Removed duplicated function definition
+* Fixed potential null pointer dereference when reporting an error
+
+Version 0.91 (2002-03-26)
+==========
+* Oy! Fixed stupid bug that would cause an unresolved symbol error.
+	Thanks to Laszlo Boszormenyi for pointing this out to me.
+
+Version 0.9 (2002-03-14)
+==========
+* Added Sergey S. Kostyliov's patch to eliminate memcpy() overhead
+	from b+tree operations. Changes the befs_read_datastream() interface.
+
+* Segregated the functions that interface directly with the linux  vfs 
+	interface into their own file called linuxvfs.c. [WD]
+
+Version 0.64 (2002-02-07)
+==========
+* Did the string comparision really right this time (btree.c) [WD]
+
+* Fixed up some places where I assumed that a long int could hold
+	a pointer value. (btree.c) [WD]
+
+* Andrew Farnham <andrewfarnham@uq.net.au> pointed out that the module
+	wouldn't work on older (<2.4.10) kernels due to an unresolved symbol.
+	This is bad, since 2.4.9 is still the current RedHat kernel. I added
+	a workaround for this problem (compatability.h) [WD]
+
+* Sergey S. Kostyliov made befs_find_key() use a binary search to find 
+	keys within btree nodes, rather than the linear search we were using 
+	before. (btree.c) [Sergey S. Kostyliov <rathamahata@php4.ru>]
+
+* Made a debian package of the source for use with kernel-package. [WD]
+
+
+Version 0.63 (2002-01-31)
+==========
+* Fixed bug in befs_find_brun_indirect() that would result in the wrong
+	block being read. It was introduced when adding byteswapping in 
+	0.61. (datastream.c) [WD]
+
+* Fixed a longstanding bug in befs_find_key() that would result in it 
+	finding the first key that is a substring of the string it is searching
+	for. For example, this would cause files in the same directory with 
+	names like file1 and file2 to mysteriously be duplicates of each other 
+	(because they have the same inode number). Many thanks to Pavel Roskin 
+	for reporting this serious bug!!!
+	(btree.c) [WD]
+
+* Added support for long symlinks, after Axel Dorfler explained up how 
+	they work. I had forgotten all about them. (inode.c, symlink.c) [WD]
+
+* Documentation improvements in source. [WD]
+
+* Makefile fix for independant module when CONFIG_MODVERSION is set in 
+	kernel config [Pavel Roskin <proski@gnu.org>]
+
+* Compile warning fix for namei.c. [Sergey S. Kostyliov <rathamahata@php4.ru>]
+
+
+Version 0.62
+==========
+* Fixed makefile for module install [WD]
+
+
+Version 0.61 (2002-01-20)
+==========
+* Made functions in endian.h to do the correct byteswapping, no matter
+	the arch. [WD]
+
+* Abbandoned silly checks for a NULL superblock pointer in debug.c. [WD]
+
+* Misc code cleanups. Also cleanup of this changelog file. [WD]
+
+* Added byteswapping to all metadata reads from disk.
+	Uses the functions from endian.h [WD]
+
+* Remove the typedef of struct super_block to vfs_sb, as it offended
+	certain peoples' aesthetic sense. [WD]
+
+* Ditto with the befs_read_block() interface. [WD]
+ 
+
+Version 0.6 (2001-12-15)
+==========
+* Cleanup of NLS functions (util.c) [WD]
+
+* Make directory lookup/read use the NLS if an iocharset is provided. [WD]
+
+* Fixed stupid bug where specifying the uid or gid mount options as '0' 
+	would result in the filesystem using the on-disk uid and gid. [WD]
+
+* Added mount option to control debug printing. 
+	The option is, simply enough, 'debug'. 
+	(super.c, debug.c) [WD]
+
+* Removed notion of btree handle from btree.c. It was unessisary, as the 
+	linux VFS doesn't allow us to keep any state between calls. Updated 
+	dir.c, namei.c befs_fs.h to account for it. [WD]
+
+* Improved handleing of overflow nodes when listing directories. 
+	Now works for overflow nodes hanging off of nodes other than the root 
+	node. This is the cleaner solution to Brent Miszalaski's problem. [WD]
+
+* Added new debug/warning/error print functions in debug.c. 
+	More flexible. Will soon be controllable at mount time 
+	(see TODO). [WD]
+
+* Rewrote datastream positon lookups.
+	(datastream.c) [WD]
+
+* Moved the TODO list to it's own file.
+
+
+Version 0.50 (2001-11-13)
+==========
+* Added workaround for mis-understanding of the nature of the b+trees used 
+	in directories. A cleaner solution will come after I've thought about it 
+	for a while. Thanks to Brent Miszalaski for finding and reporting this bug. 
+	(btree.c) [WD]
+
+* Minor cleanups
+
+* Added test for "impossible" condition of empty internal nodes in 
+	seekleaf() in btree.c [WD]
+
+* Implemented the abstracted read_block() in io.c [WD]
+
+* Cleaned up the inode validation in inode.c [WD]
+
+* Anton Altaparmakov figured out (by asking Linus :) ) what was causing the 
+ 	hanging disk io problem. It turns out you need to have the sync_pages 
+	callback defined in your address_space_ops, even if it just uses the 
+	default linux-supplied implementation. Fixed. Works now.
+	(file.c) [WD]
+
+* Anton Altaparmakov and Christoph Hellwig alerted me to the fact that 
+	filesystem code should be using GFP_NOFS instead of GFP_KERNEL as the 
+	priority parameter to kmalloc(). Fixed. 
+	(datastream.c, btree.c super.c inode.c) [WD]
+
+* Anton also told me that the blocksize is not allowed to be larger than 
+	the page size in linux, which is 4k i386. Oops. Added a test for 
+	(blocksize > PAGE_SIZE), and refuse to mount in that case. What this 
+	practicaly means is that 8k blocksize volumes won't work without a major
+	restructuring of the driver (or an alpha or other 64bit hardware). [WD]
+
+* Cleaned up the befs_count_blocks() function. Much smarter now. 
+	And somewhat smaller too. [WD]
+
+* Made inode allocations use a slab cache 
+	(super.c inode.c) [WD]
+
+* Moved the freeing of the private inode section from put_inode() to 
+	clear_inode(). This fixes a potential free twice type bug. Put_inode() 
+	can be called multiple times for each inode struct. [WD]
+
+* Converted all non vfs-callback functions to use befs_sb_info as the 
+	superblock type, rather than struct super_block. This is for 
+	portablity. [WD]
+
+* Fixed a couple of compile warnings due to use of malloc.h, when slab.h 
+	is the new way. (inode.c, super.c) [WD]
+
+* Fixed erronous includes of linux/befs_fs_i.h and linux/befs_fs_sb.h 
+	in inode.c [WD]
+
+Version 0.45 (2001-10-29)
+==========
+* Added functions to get the private superblock and inode structures from 
+	their enclosing public structures. Switched all references to the 
+	private portions to use them. (many files) [WD]
+
+* Made read_super and read_inode allocate the private portions of those 
+	structures into the generic pointer fields of the public structures 
+	with kmalloc(). put_super and put_inode free them. This allows us not 
+	to have to touch the definitions of the public structures in 
+	include/linux/fs.h. Also, befs_inode_info is huge (becuase of the 
+	symlink string). (super.c, inode.c, befs_fs.h) [WD]
+
+* Fixed a thinko that was corrupting file reads after the first block_run 
+	is done being read. (datastream.c) [WD]
+
+* Removed fsync() hooks, since a read-only filesystem doesn't need them. 
+	[Christoph Hellwig].
+
+* Fixed befs_readlink() (symlink.c) [Christoph Hellwig].
+
+* Removed all the Read-Write stuff. I'll redo it when it is time to add 
+	write support (various files) [WD].
+
+* Removed prototypes for functions who's definitions have been removed 
+	(befs_fs.h) [WD].
+
+
+Version 0.4 (2001-10-28)
+==========
+* Made it an option to use the old non-pagecache befs_file_read() for 
+	testing purposes. (fs/Config.in)
+
+* Fixed unused variable warnings when compiling without debugging.
+
+* Fixed a bug where the inode and super_block didn't get their blockbits 
+	fields set (inode.c and super.c). 
+
+* Release patch version 11. AKA befs-driver version 0.4.
+
+* Thats right. New versioning scheme. 
+	I've done some serious testing on it now (on my box anyhow), and it 
+	seems stable and not outragously slow. Existing features are more-or-less 
+	correct (see TODO list). But it isn't 1.0 yet. I think 0.4 gives me some 
+	headroom before the big 1.0.
+
+
+2001-10-26
+==========
+* Fixed date format in this file. Was I smoking crack?
+
+* Removed old datastream code from file.c, since it is nolonger used.
+
+* Generic_read_file() is now used to read regular file data. 
+	It doesn't chew up the buffer cache (it does page io instead), and seems 
+	to be about as fast (even though it has to look up each file block 
+	indivdualy). And it knows about doing readahead, which is a major plus. 
+	So it does i/o in much larger chunks. It is the correct linux way. It 
+	uses befs_get_block() by way of befs_readpage() to find the disk offsets 
+	of blocks, which in turn calls befs_fpos2brun() in datastream.c to do 
+	the hard work of finding the disk block number.
+
+* Changed method of checking for a dirty filesystem in befs_read_super 
+	(super.c). Now we check to see if log_start and log_end differ. If so, 
+	the journal needs to be replayed, and the filesystem cannot be mounted.
+
+* Fixed an extra instance of MOD_DEC_USE_COUNT in super.c
+
+* Fixed a problem with reading the superblock on devices with large sector 
+	sizes (such as cdroms) on linux 2.4.10 and up.
+
+2001-10-24
+==========
+* Fix nasty bug in converting block numbers to struct befs_inode_addr. 
+	Subtle, because the old version was only sometimes wrong. 
+	Probably responsible for lots of problems. (inode.c)
+
+* Fix bug with reading an empty directory. (btree.c and dir.c)
+
+* This one looks good. Release patch version 10
+
+2001-10-23
+==========
+* Added btree searching function.
+
+* Use befs_btree_find in befs_lookup (namei.c)
+
+* Additional comments in btree.c
+
+2001-10-22
+==========
+* Added B+tree reading functions (in btree.c). 
+	Made befs_readdir() use them them instead of the cruft in index.c.
+
+2001-09-11
+==========
+* Converted befs_read_file() to use the new datastream code.
+
+* Finally updated the README file.
+
+* Added many comments.
+
+* Posted version 6
+
+* Removed byte-order conversion code. 
+	I have no intention of supporting it, and it was very ugly. 
+	Flow control with #ifdef (ugh). Maybe I'll redo it once 
+	native byteorder works 100%.
+
+2001-09-10
+==========
+* Finished implementing read_datastream()
+
+* made befs_read_brun() more general
+	Supports an offset to start at and a max bytes to read
+	Added a wrapper function to give the old call
+
+2001-09-30
+==========
+* Discovered that the datastream handleing code in file.c is quite deficient 
+	in several respects. For one thing, it doesn't deal with indirect blocks
+
+* Rewrote datastream handleing.
+
+* Created io.c, for io related functions.
+	Previously, the befs_bread() funtions lived in file.c
+	Created the befs_read_brun() function.
+
+
+2001-09-07
+==========
+* Made a function to actually count the number of fs blocks used by a file.
+	And helper functions.
+	(fs/befs/inode.c)
+
+2001-09-05
+==========
+* Fixed a misunderstanding of the inode fields. 
+	This fixed the problmem with wrong file sizes from du and others.
+	The i_blocks field of the inode struct is not the nuber of blocks for the 
+	inode, it is the number of blocks for the file.	Also, i_blksize is not
+	nessisarily the size of the inode, although in  practice it works out.
+	Changed to blocksize of filesystem.
+	(fs/befs/inode.c)
+
+* Permanently removed code that had been provisionally ifdefed out of befs_fs.h
+
+* Since we don't support access time, make that field zero, instead of 
+	copying m_time.
+	(fs/befs/inode.c)
+
+* Added sanity check for inode reading
+	Make sure inode we got was the one we asked for. 
+	(fs/befs/inode.c)
+
+* Code cleanup
+	Local pointers to commonly used structures in inode.c.
+	Got rid of abominations befs_iaddr2inode() and befs_inode2ino(). 
+	Replaced with single function iaddr2blockno().
+	(fs/befs/super.c) (fs/befs/inode.c)
+
+2001-09-01
+==========
+* Fixed the problem with statfs where it would always claim the disk was 
+	half full, due to improper understanding of the statfs fields.
+	(fs/befs/super.c)
+
+* Posted verion 4 of the patch
+
+2001-09-01
+==========
+* Changed the macros in befs_fs.h to inline functions.
+	More readable. Typesafe. Better
+	(include/linux/befs_fs.h)
+
+* Moved type definitions from befs_fs.h to a new file, befs_fs_types.h 
+	Because befs_fs_i.h and befs_fs_sb.h were including befs_fs.h for the 
+	typedefs, and they are inlcuded in <linux/fs.h>, which has definitions 
+	that I want the inline functions in befs_fs.h to be able to see. Nasty
+	circularity.
+	(include/linux/befs_fs.h)
+
+2001-08-30
+==========
+* Cleaned up some wording.
+
+* Added additional consitency checks on mount
+	Check block_size agrees with block_shift
+	Check flags == BEFS_CLEAN
+	(fs/befs/super.c)
+
+* Tell the kernel to only mount befs read-only. 
+	By setting the MS_RDONLY flag in befs_read_super().
+	Not that it was possible to write before. But now the kernel won't even try.
+	(fs/befs/super.c)
+
+* Got rid of kernel warning on mount.
+	The kernel doesn't like it if you call set_blocksize() on a device when 
+	you have some of its blocks open. Moved the second set_blocksize() to the
+	very end of befs_read_super(), after we are done with the disk superblock.
+	(fs/befs/super.c)
+	
+* Fixed wrong number of args bug in befs_dump_inode
+	(fs/befs/debug.c)
+
+* Solved lots of type mismatches in kprint()s
+	(everwhere)
+
+2001-08-27
+==========
+* Cleaned up the fs/Config.in entries a bit, now slightly more descriptive.
+
+* BeFS depends on NLS, so I made activating BeFS enable the NLS questions
+	(fs/nls/Config.in)
+
+* Added Configure.help entries for CONFIG_BEFS_FS and CONFIG_DEBUG_BEFS
+	(Documentation/Configure.help)
+
+2001-08-??
+==========
+* Removed superblock locking calls in befs_read_super(). In 2.4, the VFS 
+	hands us a super_block struct that is already locked.
+
+2001-08-13
+==========
+* Will Dyson <will_dyson@pobox.com> is now attempting to maintain this module
+	Makoto Kato <m_kato@ga2.so-net.ne.jp> is original author.Daniel Berlin 
+	also did some work on it (fixing it up for the later 2.3.x kernels, IIRC).
+
+* Fixed compile errors on 2.4.1 kernel (WD)
+	Resolve rejected patches
+	Accomodate changed NLS interface (util.h)
+	Needed to include <linux/slab.h> in most files
+	Makefile changes
+	fs/Config.in changes
+
+* Tried to niceify the code using the ext2 fs as a guide
+	Declare befs_fs_type using the DECLARE_FSTYPE_DEV() macro
+
+* Made it a configure option to turn on debugging (fs/Config.in)
+
+* Compiles on 2.4.7
diff -Nru a/fs/befs/Makefile b/fs/befs/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/Makefile	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,15 @@
+#
+# Makefile for the linux BeOS filesystem routines.
+#
+# 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).
+#
+# Note 2! The CFLAGS definitions are now in the main makefile...
+
+ 
+obj-$(CONFIG_BEFS_FS) += befs.o
+
+befs-objs := datastream.o btree.o super.o inode.o debug.o io.o linuxvfs.o
+
+include $(TOPDIR)/Rules.make
diff -Nru a/fs/befs/TODO b/fs/befs/TODO
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/TODO	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,14 @@
+TODO
+==========
+
+* Convert comments to the Kernel-Doc format.
+
+* Befs_fs.h has gotten big and messy. No reason not to break it up into 
+	smaller peices.
+
+* See if Alexander Viro's option parser made it into the kernel tree. 
+	Use that if we can. (include/linux/parser.h)
+
+* See if we really need separate types for on-disk and in-memory 
+	representations of the superblock and inode.
+
diff -Nru a/fs/befs/attribute.c b/fs/befs/attribute.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/attribute.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,117 @@
+/*
+ * linux/fs/befs/attribute.c
+ *
+ * Copyright (C) 2002 Will Dyson <will_dyson@pobox.com>
+ *
+ * Many thanks to Dominic Giampaolo, author of "Practical File System
+ * Design with the Be File System", for such a helpful book.
+ *
+ */
+
+#include <linux/fs.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+
+#include "befs.h"
+#include "endian.h"
+
+#define SD_DATA(sd)\
+	(void*)((char*)sd + sizeof(*sd) + (sd->name_size - sizeof(sd->name)))
+
+#define SD_NEXT(sd)\
+	(befs_small_data*)((char*)sd + sizeof(*sd) + (sd->name_size - \
+	sizeof(sd->name) + sd->data_size))
+
+int
+list_small_data(struct super_block *sb, befs_inode * inode, filldir_t filldir);
+
+befs_small_data *
+find_small_data(struct super_block *sb, befs_inode * inode,
+				 const char *name);
+int
+read_small_data(struct super_block *sb, befs_inode * inode,
+		 befs_small_data * sdata, void *buf, size_t bufsize);
+
+/**
+ *
+ *
+ *
+ *
+ *
+ */
+befs_small_data *
+find_small_data(struct super_block *sb, befs_inode * inode, const char *name)
+{
+	befs_small_data *sdata = inode->small_data;
+
+	while (sdata->type != 0) {
+		if (strcmp(name, sdata->name) != 0) {
+			return sdata;
+		}
+		sdata = SD_NEXT(sdata);
+	}
+	return NULL;
+}
+
+/**
+ *
+ *
+ *
+ *
+ *
+ */
+int
+read_small_data(struct super_block *sb, befs_inode * inode,
+		const char *name, void *buf, size_t bufsize)
+{
+	befs_small_data *sdata;
+
+	sdata = find_small_data(sb, inode, name);
+	if (sdata == NULL)
+		return BEFS_ERR;
+	else if (sdata->data_size > bufsize)
+		return BEFS_ERR;
+
+	memcpy(buf, SD_DATA(sdata), sdata->data_size);
+
+	return BEFS_OK;
+}
+
+/**
+ *
+ *
+ *
+ *
+ *
+ */
+int
+list_small_data(struct super_block *sb, befs_inode * inode)
+{
+
+}
+
+/**
+ *
+ *
+ *
+ *
+ *
+ */
+int
+list_attr(struct super_block *sb, befs_inode * inode)
+{
+
+}
+
+/**
+ *
+ *
+ *
+ *
+ *
+ */
+int
+read_attr(struct super_block *sb, befs_inode * inode)
+{
+
+}
diff -Nru a/fs/befs/befs.h b/fs/befs/befs.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/befs.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,158 @@
+/*
+ * befs.h
+ *
+ * Copyright (C) 2001-2002 Will Dyson <will_dyson@pobox.com>
+ * Copyright (C) 1999 Makoto Kato (m_kato@ga2.so-net.ne.jp)
+ */
+
+#ifndef _LINUX_BEFS_H
+#define _LINUX_BEFS_H
+
+#include "befs_fs_types.h"
+
+/* used in debug.c */
+#define BEFS_VERSION "0.9.3"
+
+
+/* Sector_t makes this sillyness obsolete */
+typedef u64 befs_blocknr_t;
+typedef u32 vfs_blocknr_t;
+
+/*
+ * BeFS in memory structures
+ */
+
+typedef struct befs_mount_options {
+	gid_t gid;
+	uid_t uid;
+	int use_gid;
+	int use_uid;
+	int debug;
+	char *iocharset;
+} befs_mount_options;
+
+typedef struct befs_sb_info {
+	u32 magic1;
+	u32 block_size;
+	u32 block_shift;
+	int byte_order;
+	befs_off_t num_blocks;
+	befs_off_t used_blocks;
+	u32 inode_size;
+	u32 magic2;
+
+	/* Allocation group information */
+	u32 blocks_per_ag;
+	u32 ag_shift;
+	u32 num_ags;
+
+	/* jornal log entry */
+	befs_block_run log_blocks;
+	befs_off_t log_start;
+	befs_off_t log_end;
+
+	befs_inode_addr root_dir;
+	befs_inode_addr indices;
+	u32 magic3;
+
+	befs_mount_options mount_opts;
+	struct nls_table *nls;
+
+} befs_sb_info;
+
+typedef struct befs_inode_info {
+	u32 i_flags;
+	u32 i_type;
+
+	befs_inode_addr i_inode_num;
+	befs_inode_addr i_parent;
+	befs_inode_addr i_attribute;
+
+	union {
+		befs_data_stream ds;
+		char symlink[BEFS_SYMLINK_LEN];
+	} i_data;
+
+	struct inode vfs_inode;
+
+} befs_inode_info;
+
+enum befs_err {
+	BEFS_OK,
+	BEFS_ERR,
+	BEFS_BAD_INODE,
+	BEFS_BT_END,
+	BEFS_BT_EMPTY,
+	BEFS_BT_MATCH,
+	BEFS_BT_PARMATCH,
+	BEFS_BT_NOT_FOUND
+};
+
+
+/****************************/
+/* debug.c */
+void befs_error(const struct super_block *sb, const char *fmt, ...);
+void befs_warning(const struct super_block *sb, const char *fmt, ...);
+void befs_debug(const struct super_block *sb, const char *fmt, ...);
+
+void befs_dump_super_block(const struct super_block *sb, befs_super_block *);
+void befs_dump_inode(const struct super_block *sb, befs_inode *);
+void befs_dump_index_entry(const struct super_block *sb, befs_btree_super *);
+void befs_dump_index_node(const struct super_block *sb, befs_btree_nodehead *);
+void befs_dump_inode_addr(const struct super_block *sb, befs_inode_addr);
+/****************************/
+
+
+/* Gets a pointer to the private portion of the super_block
+ * structure from the public part
+ */
+static inline befs_sb_info *
+BEFS_SB(const struct super_block *super)
+{
+	return (befs_sb_info *) super->s_fs_info;
+}
+
+static inline befs_inode_info *
+BEFS_I(const struct inode *inode)
+{
+	return list_entry(inode, struct befs_inode_info, vfs_inode);
+}
+
+static inline befs_blocknr_t
+iaddr2blockno(struct super_block *sb, befs_inode_addr * iaddr)
+{
+	return ((iaddr->allocation_group << BEFS_SB(sb)->ag_shift) +
+		iaddr->start);
+}
+
+static inline befs_inode_addr
+blockno2iaddr(struct super_block *sb, befs_blocknr_t blockno)
+{
+	befs_inode_addr iaddr;
+	iaddr.allocation_group = blockno >> BEFS_SB(sb)->ag_shift;
+	iaddr.start =
+	    blockno - (iaddr.allocation_group << BEFS_SB(sb)->ag_shift);
+	iaddr.len = 1;
+
+	return iaddr;
+}
+
+static inline unsigned int
+befs_iaddrs_per_block(struct super_block *sb)
+{
+	return BEFS_SB(sb)->block_size / sizeof (befs_inode_addr);
+}
+
+static inline int
+befs_iaddr_is_empty(befs_inode_addr * iaddr)
+{
+	return (!iaddr->allocation_group) && (!iaddr->start) && (!iaddr->len);
+}
+
+static inline size_t
+befs_brun_size(struct super_block *sb, befs_block_run run)
+{
+	return BEFS_SB(sb)->block_size * run.len;
+}
+
+#endif				/* _LINUX_BEFS_H */
diff -Nru a/fs/befs/befs_fs_types.h b/fs/befs/befs_fs_types.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/befs_fs_types.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,213 @@
+/*
+ * include/linux/befs_fs_types.h
+ *
+ * Copyright (C) 2001 Will Dyson (will@cs.earlham.edu)
+ *
+ *
+ *
+ * from linux/include/linux/befs_fs.h
+ *
+ * Copyright (C) 1999 Makoto Kato (m_kato@ga2.so-net.ne.jp)
+ *
+ */
+
+#ifndef _LINUX_BEFS_FS_TYPES
+#define _LINUX_BEFS_FS_TYPES
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif /*__KERNEL__*/
+
+#define PACKED __attribute__ ((__packed__))
+
+/*
+ * Max name lengths of BFS
+ */
+
+#define BEFS_NAME_LEN 255
+
+#define BEFS_SYMLINK_LEN 144
+#define BEFS_NUM_DIRECT_BLOCKS 12
+#define B_OS_NAME_LENGTH 32
+
+/* The datastream blocks mapped by the double-indirect
+ * block are always 4 fs blocks long.
+ * This eliminates the need for linear searches among
+ * the potentially huge number of indirect blocks
+ *
+ * Err. Should that be 4 fs blocks or 4k???
+ * It matters on large blocksize volumes
+ */
+#define BEFS_DBLINDIR_BRUN_LEN 4
+
+/*
+ * Flags of superblock
+ */
+
+enum super_flags {
+	BEFS_BYTESEX_BE,
+	BEFS_BYTESEX_LE,
+	BEFS_CLEAN = 0x434c454e,
+	BEFS_DIRTY = 0x44495254,
+	BEFS_SUPER_MAGIC1 = 0x42465331,	/* BFS1 */
+	BEFS_SUPER_MAGIC2 = 0xdd121031,
+	BEFS_SUPER_MAGIC3 = 0x15b6830e,
+};
+
+#define BEFS_BYTEORDER_NATIVE 0x42494745
+
+#define BEFS_SUPER_MAGIC BEFS_SUPER_MAGIC1
+
+/*
+ * Flags of inode
+ */
+
+#define BEFS_INODE_MAGIC1 0x3bbe0ad9
+
+enum inode_flags {
+	BEFS_INODE_IN_USE = 0x00000001,
+	BEFS_ATTR_INODE = 0x00000004,
+	BEFS_INODE_LOGGED = 0x00000008,
+	BEFS_INODE_DELETED = 0x00000010,
+	BEFS_LONG_SYMLINK = 0x00000040,
+	BEFS_PERMANENT_FLAG = 0x0000ffff,
+	BEFS_INODE_NO_CREATE = 0x00010000,
+	BEFS_INODE_WAS_WRITTEN = 0x00020000,
+	BEFS_NO_TRANSACTION = 0x00040000,
+};
+/* 
+ * On-Disk datastructures of BeFS
+ */
+
+typedef u64 befs_off_t;
+typedef u64 befs_time_t;
+typedef void befs_binode_etc;
+
+/* Block runs */
+typedef struct {
+	u32 allocation_group;
+	u16 start;
+	u16 len;
+} PACKED befs_block_run;
+
+typedef befs_block_run befs_inode_addr;
+
+/*
+ * The Superblock Structure
+ */
+typedef struct {
+	char name[B_OS_NAME_LENGTH];
+	u32 magic1;
+	u32 fs_byte_order;
+
+	u32 block_size;
+	u32 block_shift;
+
+	befs_off_t num_blocks;
+	befs_off_t used_blocks;
+
+	u32 inode_size;
+
+	u32 magic2;
+	u32 blocks_per_ag;
+	u32 ag_shift;
+	u32 num_ags;
+
+	u32 flags;
+
+	befs_block_run log_blocks;
+	befs_off_t log_start;
+	befs_off_t log_end;
+
+	u32 magic3;
+	befs_inode_addr root_dir;
+	befs_inode_addr indices;
+
+} PACKED befs_super_block;
+
+/* 
+ * Note: the indirect and dbl_indir block_runs may
+ * be longer than one block!
+ */
+typedef struct {
+	befs_block_run direct[BEFS_NUM_DIRECT_BLOCKS];
+	befs_off_t max_direct_range;
+	befs_block_run indirect;
+	befs_off_t max_indirect_range;
+	befs_block_run double_indirect;
+	befs_off_t max_double_indirect_range;
+	befs_off_t size;
+} PACKED befs_data_stream;
+
+/* Attribute */
+typedef struct {
+	u32 type;
+	u16 name_size;
+	u16 data_size;
+	char name[1];
+} PACKED befs_small_data;
+
+/* Inode structure */
+typedef struct {
+	u32 magic1;
+	befs_inode_addr inode_num;
+	u32 uid;
+	u32 gid;
+	u32 mode;
+	u32 flags;
+	befs_time_t create_time;
+	befs_time_t last_modified_time;
+	befs_inode_addr parent;
+	befs_inode_addr attributes;
+	u32 type;
+
+	u32 inode_size;
+	u32 etc;		/* not use */
+
+	union {
+		befs_data_stream datastream;
+		char symlink[BEFS_SYMLINK_LEN];
+	} data;
+
+	u32 pad[4];		/* not use */
+	befs_small_data small_data[1];
+} PACKED befs_inode;
+
+/*
+ * B+tree superblock
+ */
+
+#define BEFS_BTREE_MAGIC 0x69f6c2e8
+
+enum btree_types {
+	BTREE_STRING_TYPE = 0,
+	BTREE_INT32_TYPE = 1,
+	BTREE_UINT32_TYPE = 2,
+	BTREE_INT64_TYPE = 3,
+	BTREE_UINT64_TYPE = 4,
+	BTREE_FLOAT_TYPE = 5,
+	BTREE_DOUBLE_TYPE = 6
+};
+
+typedef struct {
+	u32 magic;
+	u32 node_size;
+	u32 max_depth;
+	u32 data_type;
+	befs_off_t root_node_ptr;
+	befs_off_t free_node_ptr;
+	befs_off_t max_size;
+} PACKED befs_btree_super;
+
+/*
+ * Header stucture of each btree node
+ */
+typedef struct {
+	befs_off_t left;
+	befs_off_t right;
+	befs_off_t overflow;
+	u16 all_key_count;
+	u16 all_key_length;
+} PACKED befs_btree_nodehead;
+
+#endif				/* _LINUX_BEFS_FS_TYPES */
diff -Nru a/fs/befs/btree.c b/fs/befs/btree.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/btree.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,786 @@
+/*
+ * linux/fs/befs/btree.c
+ *
+ * Copyright (C) 2001-2002 Will Dyson <will_dyson@pobox.com>
+ *
+ * Licensed under the GNU GPL. See the file COPYING for details.
+ *
+ * 2002-02-05: Sergey S. Kostyliov added binary search withing
+ * 		btree nodes.
+ *
+ * Many thanks to:
+ *
+ * Dominic Giampaolo, author of "Practical File System
+ * Design with the Be File System", for such a helpful book.
+ * 
+ * Marcus J. Ranum, author of the b+tree package in 
+ * comp.sources.misc volume 10. This code is not copied from that
+ * work, but it is partially based on it.
+ *
+ * Makoto Kato, author of the original BeFS for linux filesystem
+ * driver.
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/mm.h>
+#include <linux/buffer_head.h>
+
+#include "befs.h"
+#include "btree.h"
+#include "datastream.h"
+#include "endian.h"
+
+/*
+ * The btree functions in this file are built on top of the
+ * datastream.c interface, which is in turn built on top of the
+ * io.c interface.
+ */
+
+/* Befs B+tree structure:
+ * 
+ * The first thing in the tree is the tree superblock. It tells you
+ * all kinds of usefull things about the tree, like where the rootnode
+ * is located, and the size of the nodes (always 1024 with current version
+ * of BeOS).
+ *
+ * The rest of the tree consists of a series of nodes. Nodes contain a header
+ * (struct befs_btree_nodehead), the packed key data, an array of shorts 
+ * containing the ending offsets for each of the keys, and an array of
+ * befs_off_t values. In interior nodes, the keys are the ending keys for 
+ * the childnode they point to, and the values are offsets into the 
+ * datastream containing the tree. 
+ */
+
+/* Note:
+ * 
+ * The book states 2 confusing things about befs b+trees. First, 
+ * it states that the overflow feild of node headers is used by internal nodes 
+ * to point to another node that "effectivly continues this one". Here is what 
+ * I belive that means. Each key in internal nodes points to another node that
+ * contains key values less than itself. Inspection reveals that the last key 
+ * in the internal node is not the last key in the index. Keys that are 
+ * greater than the last key in the internal node go into the overflow node. 
+ * I imagine there is a performance reason for this.
+ *
+ * Second, it states that the header of a btree node is sufficient to 
+ * distinguish internal nodes from leaf nodes. Without saying exactly how. 
+ * After figuring out the first, it becomes obvious that internal nodes have
+ * overflow nodes and leafnodes do not.
+ */
+
+/* 
+ * Currently, this code is only good for directory B+trees.
+ * In order to be used for other BFS indexes, it needs to be extended to handle
+ * duplicate keys and non-string keytypes (int32, int64, float, double).
+ */
+
+/*
+ * In memory structure of each btree node
+ */
+typedef struct {
+	befs_btree_nodehead head;	/* head of node converted to cpu byteorder */
+	struct buffer_head *bh;
+	befs_btree_nodehead *od_node;	/* on disk node */
+} befs_btree_node;
+
+/* local constants */
+const static befs_off_t befs_bt_inval = 0xffffffffffffffff;
+
+/* local functions */
+static int befs_btree_seekleaf(struct super_block *sb, befs_data_stream * ds,
+			       befs_btree_super * bt_super,
+			       befs_btree_node * this_node,
+			       befs_off_t * node_off);
+
+static int befs_bt_read_super(struct super_block *sb, befs_data_stream * ds,
+			      befs_btree_super * sup);
+
+static int befs_bt_read_node(struct super_block *sb, befs_data_stream * ds,
+			     befs_btree_node * node, befs_off_t node_off);
+
+static int befs_leafnode(befs_btree_node * node);
+
+static u16 *befs_bt_keylen_index(befs_btree_node * node);
+
+static befs_off_t *befs_bt_valarray(befs_btree_node * node);
+
+static char *befs_bt_keydata(befs_btree_node * node);
+
+static int befs_find_key(struct super_block *sb, befs_btree_node * node,
+			 const char *findkey, befs_off_t * value);
+
+static char *befs_bt_get_key(struct super_block *sb, befs_btree_node * node,
+			     int index, u16 * keylen);
+
+static int befs_compare_strings(const void *key1, int keylen1,
+				const void *key2, int keylen2);
+
+/**
+ * befs_bt_read_super - read in btree superblock convert to cpu byteorder
+ * @sb: Filesystem superblock
+ * @ds: Datastream to read from
+ * @sup: Buffer in which to place the btree superblock
+ *
+ * Calls befs_read_datastream to read in the btree superblock and
+ * makes sure it is in cpu byteorder, byteswapping if nessisary.
+ *
+ * On success, returns BEFS_OK and *@sup contains the btree superblock,
+ * in cpu byte order.
+ *
+ * On failure, BEFS_ERR is returned.
+ */
+static int
+befs_bt_read_super(struct super_block *sb, befs_data_stream * ds,
+		   befs_btree_super * sup)
+{
+	struct buffer_head *bh = NULL;
+	befs_btree_super *od_sup = NULL;
+
+	befs_debug(sb, "---> befs_btree_read_super()");
+
+	bh = befs_read_datastream(sb, ds, 0, NULL);
+
+	if (!bh) {
+		befs_error(sb, "Couldn't read index header.");
+		goto error;
+	}
+	od_sup = (befs_btree_super *) bh->b_data;
+	befs_dump_index_entry(sb, od_sup);
+
+	sup->magic = fs32_to_cpu(sb, od_sup->magic);
+	sup->node_size = fs32_to_cpu(sb, od_sup->node_size);
+	sup->max_depth = fs32_to_cpu(sb, od_sup->max_depth);
+	sup->data_type = fs32_to_cpu(sb, od_sup->data_type);
+	sup->root_node_ptr = fs64_to_cpu(sb, od_sup->root_node_ptr);
+	sup->free_node_ptr = fs64_to_cpu(sb, od_sup->free_node_ptr);
+	sup->max_size = fs64_to_cpu(sb, od_sup->max_size);
+
+	brelse(bh);
+	if (sup->magic != BEFS_BTREE_MAGIC) {
+		befs_error(sb, "Index header has bad magic.");
+		goto error;
+	}
+
+	befs_debug(sb, "<--- befs_btree_read_super()");
+	return BEFS_OK;
+
+      error:
+	befs_debug(sb, "<--- befs_btree_read_super() ERROR");
+	return BEFS_ERR;
+}
+
+/**
+ * befs_bt_read_node - read in btree node and convert to cpu byteorder
+ * @sb: Filesystem superblock
+ * @ds: Datastream to read from
+ * @node: Buffer in which to place the btree node
+ * @node_off: Starting offset (in bytes) of the node in @ds
+ *
+ * Calls befs_read_datastream to read in the indicated btree node and
+ * makes sure its header feilds are in cpu byteorder, byteswapping if 
+ * nessisary.
+ * Note: node->bh must be NULL when this function called first
+ * time. Don't forget brelse(node->bh) after last call.
+ *
+ * On success, returns BEFS_OK and *@node contains the btree node that
+ * starts at @node_off, with the node->head fields in cpu byte order.
+ *
+ * On failure, BEFS_ERR is returned.
+ */
+
+static int
+befs_bt_read_node(struct super_block *sb, befs_data_stream * ds,
+		  befs_btree_node * node, befs_off_t node_off)
+{
+	uint off = 0;
+
+	befs_debug(sb, "---> befs_bt_read_node()");
+
+	if (node->bh)
+		brelse(node->bh);
+
+	node->bh = befs_read_datastream(sb, ds, node_off, &off);
+	if (!node->bh) {
+		befs_error(sb, "befs_bt_read_node() failed to read "
+			   "node at %Lu", node_off);
+		befs_debug(sb, "<--- befs_bt_read_node() ERROR");
+
+		return BEFS_ERR;
+	}
+	node->od_node =
+	    (befs_btree_nodehead *) ((void *) node->bh->b_data + off);
+
+	befs_dump_index_node(sb, node->od_node);
+
+	node->head.left = fs64_to_cpu(sb, node->od_node->left);
+	node->head.right = fs64_to_cpu(sb, node->od_node->right);
+	node->head.overflow = fs64_to_cpu(sb, node->od_node->overflow);
+	node->head.all_key_count =
+	    fs16_to_cpu(sb, node->od_node->all_key_count);
+	node->head.all_key_length =
+	    fs16_to_cpu(sb, node->od_node->all_key_length);
+
+	befs_debug(sb, "<--- befs_btree_read_node()");
+	return BEFS_OK;
+}
+
+/**
+ * befs_btree_find - Find a key in a befs B+tree
+ * @sb: Filesystem superblock
+ * @ds: Datastream containing btree
+ * @key: Key string to lookup in btree
+ * @value: Value stored with @key
+ *
+ * On sucess, returns BEFS_OK and sets *@value to the value stored
+ * with @key (usually the disk block number of an inode).
+ *
+ * On failure, returns BEFS_ERR or BEFS_BT_NOT_FOUND.
+ * 
+ * Algorithm: 
+ *   Read the superblock and rootnode of the b+tree.
+ *   Drill down through the interior nodes using befs_find_key().
+ *   Once at the correct leaf node, use befs_find_key() again to get the
+ *   actuall value stored with the key.
+ */
+int
+befs_btree_find(struct super_block *sb, befs_data_stream * ds,
+		const char *key, befs_off_t * value)
+{
+	befs_btree_node *this_node = NULL;
+	befs_btree_super bt_super;
+	befs_off_t node_off;
+	int res;
+
+	befs_debug(sb, "---> befs_btree_find() Key: %s", key);
+
+	if (befs_bt_read_super(sb, ds, &bt_super) != BEFS_OK) {
+		befs_error(sb,
+			   "befs_btree_find() failed to read index superblock");
+		goto error;
+	}
+
+	this_node = (befs_btree_node *) kmalloc(sizeof (befs_btree_node),
+						GFP_NOFS);
+	if (!this_node) {
+		befs_error(sb, "befs_btree_find() failed to allocate %u "
+			   "bytes of memory", sizeof (befs_btree_node));
+		goto error;
+	}
+
+	this_node->bh = NULL;
+
+	/* read in root node */
+	node_off = bt_super.root_node_ptr;
+	if (befs_bt_read_node(sb, ds, this_node, node_off) != BEFS_OK) {
+		befs_error(sb, "befs_btree_find() failed to read "
+			   "node at %Lu", node_off);
+		goto error_alloc;
+	}
+
+	while (!befs_leafnode(this_node)) {
+		res = befs_find_key(sb, this_node, key, &node_off);
+		if (res == BEFS_BT_NOT_FOUND)
+			node_off = this_node->head.overflow;
+		/* if no match, go to overflow node */
+		if (befs_bt_read_node(sb, ds, this_node, node_off) != BEFS_OK) {
+			befs_error(sb, "befs_btree_find() failed to read "
+				   "node at %Lu", node_off);
+			goto error_alloc;
+		}
+	}
+
+	/* at the correct leaf node now */
+
+	res = befs_find_key(sb, this_node, key, value);
+
+	brelse(this_node->bh);
+	kfree(this_node);
+
+	if (res != BEFS_BT_MATCH) {
+		befs_debug(sb, "<--- befs_btree_find() Key %s not found", key);
+		*value = 0;
+		return BEFS_BT_NOT_FOUND;
+	}
+	befs_debug(sb, "<--- befs_btree_find() Found key %s, value %Lu",
+		   key, *value);
+	return BEFS_OK;
+
+      error_alloc:
+	kfree(this_node);
+      error:
+	*value = 0;
+	befs_debug(sb, "<--- befs_btree_find() ERROR");
+	return BEFS_ERR;
+}
+
+/**
+ * befs_find_key - Search for a key within a node
+ * @sb: Filesystem superblock
+ * @node: Node to find the key within
+ * @key: Keystring to search for
+ * @value: If key is found, the value stored with the key is put here
+ *
+ * finds exact match if one exists, and returns BEFS_BT_MATCH
+ * If no exact match, finds first key in node that is greater
+ * (alpabeticly) than the search key and returns BEFS_BT_PARMATCH
+ * (for partial match, I guess). Can you think of something better to
+ * call it?
+ *
+ * If no key was a match or greater than the search key, return
+ * BEFS_BT_NOT_FOUND.
+ *
+ * Use binary search instead of a linear.
+ */
+static int
+befs_find_key(struct super_block *sb, befs_btree_node * node,
+	      const char *findkey, befs_off_t * value)
+{
+	int first, last, mid;
+	int eq;
+	u16 keylen;
+	int findkey_len;
+	char *thiskey;
+	befs_off_t *valarray;
+
+	befs_debug(sb, "---> befs_find_key() %s", findkey);
+
+	*value = 0;
+
+	findkey_len = strlen(findkey);
+
+	/* if node can not contain key, just skeep this node */
+	last = node->head.all_key_count - 1;
+	thiskey = befs_bt_get_key(sb, node, last, &keylen);
+
+	eq = befs_compare_strings(thiskey, keylen, findkey, findkey_len);
+	if (eq < 0) {
+		befs_debug(sb, "<--- befs_find_key() %s not found", findkey);
+		return BEFS_BT_NOT_FOUND;
+	}
+
+	valarray = befs_bt_valarray(node);
+
+	/* simple binary search */
+	first = 0;
+	mid = 0;
+	while (last >= first) {
+		mid = (last + first) / 2;
+		befs_debug(sb, "first: %d, last: %d, mid: %d", first, last,
+			   mid);
+		thiskey = befs_bt_get_key(sb, node, mid, &keylen);
+		eq = befs_compare_strings(thiskey, keylen, findkey,
+					  findkey_len);
+		*value = fs64_to_cpu(sb, valarray[mid]);
+
+		if (eq == 0) {
+			befs_debug(sb, "<--- befs_find_key() found %s at %d",
+				   thiskey, mid);
+
+			return BEFS_BT_MATCH;
+		}
+		if (eq > 0)
+			last = mid - 1;
+		else
+			first = mid + 1;
+	}
+	if (eq < 0)
+		*value = fs64_to_cpu(sb, valarray[mid + 1]);
+	befs_debug(sb, "<--- befs_find_key() found %s at %d", thiskey, mid);
+	return BEFS_BT_PARMATCH;
+}
+
+/**
+ * befs_btree_read - Traverse leafnodes of a btree
+ * @sb: Filesystem superblock
+ * @ds: Datastream containing btree
+ * @key_no: Key number (alphabetical order) of key to read
+ * @bufsize: Size of the buffer to return key in
+ * @keybuf: Pointer to a buffer to put the key in
+ * @keysize: Length of the returned key
+ * @value: Value stored with the returned key
+ *
+ * Heres how it works: Key_no is the index of the key/value pair to 
+ * retun in keybuf/value.
+ * Bufsize is the size of keybuf (BEFS_NAME_LEN+1 is a good size). Keysize is 
+ * the number of charecters in the key (just a convience).
+ *
+ * Algorithm:
+ *   Get the first leafnode of the tree. See if the requested key is in that
+ *   node. If not, follow the node->right link to the next leafnode. Repeat 
+ *   until the (key_no)th key is found or the tree is out of keys.
+ */
+int
+befs_btree_read(struct super_block *sb, befs_data_stream * ds,
+		loff_t key_no, size_t bufsize, char *keybuf, size_t * keysize,
+		befs_off_t * value)
+{
+	befs_btree_node *this_node;
+	befs_btree_super bt_super;
+	befs_off_t node_off = 0;
+	int cur_key;
+	befs_off_t *valarray;
+	char *keystart;
+	u16 keylen;
+	int res;
+
+	uint key_sum = 0;
+
+	befs_debug(sb, "---> befs_btree_read()");
+
+	if (befs_bt_read_super(sb, ds, &bt_super) != BEFS_OK) {
+		befs_error(sb,
+			   "befs_btree_read() failed to read index superblock");
+		goto error;
+	}
+
+	if ((this_node = (befs_btree_node *)
+	     kmalloc(sizeof (befs_btree_node), GFP_NOFS)) == NULL) {
+		befs_error(sb, "befs_btree_read() failed to allocate %u "
+			   "bytes of memory", sizeof (befs_btree_node));
+		goto error;
+	}
+
+	node_off = bt_super.root_node_ptr;
+	this_node->bh = NULL;
+
+	/* seeks down to first leafnode, reads it into this_node */
+	res = befs_btree_seekleaf(sb, ds, &bt_super, this_node, &node_off);
+	if (res == BEFS_BT_EMPTY) {
+		brelse(this_node->bh);
+		kfree(this_node);
+		*value = 0;
+		*keysize = 0;
+		befs_debug(sb, "<--- befs_btree_read() Tree is EMPTY");
+		return BEFS_BT_EMPTY;
+	} else if (res == BEFS_ERR) {
+		goto error_alloc;
+	}
+
+	/* find the leaf node containing the key_no key */
+
+	while (key_sum + this_node->head.all_key_count <= key_no) {
+
+		/* no more nodes to look in: key_no is too large */
+		if (this_node->head.right == befs_bt_inval) {
+			*keysize = 0;
+			*value = 0;
+			befs_debug(sb,
+				   "<--- befs_btree_read() END of keys at %Lu",
+				   key_sum + this_node->head.all_key_count);
+			brelse(this_node->bh);
+			kfree(this_node);
+			return BEFS_BT_END;
+		}
+
+		key_sum += this_node->head.all_key_count;
+		node_off = this_node->head.right;
+
+		if (befs_bt_read_node(sb, ds, this_node, node_off) != BEFS_OK) {
+			befs_error(sb, "befs_btree_read() failed to read "
+				   "node at %Lu", node_off);
+			goto error_alloc;
+		}
+	}
+
+	/* how many keys into this_node is key_no */
+	cur_key = key_no - key_sum;
+
+	/* get pointers to datastructures within the node body */
+	valarray = befs_bt_valarray(this_node);
+
+	keystart = befs_bt_get_key(sb, this_node, cur_key, &keylen);
+
+	befs_debug(sb, "Read [%Lu,%d]: keysize %d", node_off, cur_key, keylen);
+
+	if (bufsize < keylen + 1) {
+		befs_error(sb, "befs_btree_read() keybuf too small (%u) "
+			   "for key of size %d", bufsize, keylen);
+		brelse(this_node->bh);
+		goto error_alloc;
+	};
+
+	strncpy(keybuf, keystart, keylen);
+	*value = fs64_to_cpu(sb, valarray[cur_key]);
+	*keysize = keylen;
+	keybuf[keylen] = '\0';
+
+	befs_debug(sb, "Read [%Lu,%d]: Key \"%.*s\", Value %Lu", node_off,
+		   cur_key, keylen, keybuf, *value);
+
+	brelse(this_node->bh);
+	kfree(this_node);
+
+	befs_debug(sb, "<--- befs_btree_read()");
+
+	return BEFS_OK;
+
+      error_alloc:
+	kfree(this_node);
+
+      error:
+	*keysize = 0;
+	*value = 0;
+	befs_debug(sb, "<--- befs_btree_read() ERROR");
+	return BEFS_ERR;
+}
+
+/**
+ * befs_btree_seekleaf - Find the first leafnode in the btree
+ * @sb: Filesystem superblock
+ * @ds: Datastream containing btree
+ * @bt_super: Pointer to the uperblock of the btree
+ * @this_node: Buffer to return the leafnode in
+ * @node_off: Pointer to offset of current node within datastream. Modified
+ * 		by the function.
+ *
+ *
+ * Helper function for btree traverse. Moves the current position to the 
+ * start of the first leaf node.
+ *
+ * Also checks for an empty tree. If there are no keys, returns BEFS_BT_EMPTY.
+ */
+static int
+befs_btree_seekleaf(struct super_block *sb, befs_data_stream * ds,
+		    befs_btree_super * bt_super, befs_btree_node * this_node,
+		    befs_off_t * node_off)
+{
+
+	befs_debug(sb, "---> befs_btree_seekleaf()");
+
+	if (befs_bt_read_node(sb, ds, this_node, *node_off) != BEFS_OK) {
+		befs_error(sb, "befs_btree_seekleaf() failed to read "
+			   "node at %Lu", *node_off);
+		goto error;
+	}
+	befs_debug(sb, "Seekleaf to root node %Lu", *node_off);
+
+	if (this_node->head.all_key_count == 0 && befs_leafnode(this_node)) {
+		befs_debug(sb, "<--- befs_btree_seekleaf() Tree is EMPTY");
+		return BEFS_BT_EMPTY;
+	}
+
+	while (!befs_leafnode(this_node)) {
+
+		if (this_node->head.all_key_count == 0) {
+			befs_debug(sb, "befs_btree_seekleaf() encountered "
+				   "an empty interior node: %Lu. Using Overflow "
+				   "node: %Lu", *node_off,
+				   this_node->head.overflow);
+			*node_off = this_node->head.overflow;
+		} else {
+			befs_off_t *valarray = befs_bt_valarray(this_node);
+			*node_off = fs64_to_cpu(sb, valarray[0]);
+		}
+		if (befs_bt_read_node(sb, ds, this_node, *node_off) != BEFS_OK) {
+			befs_error(sb, "befs_btree_seekleaf() failed to read "
+				   "node at %Lu", *node_off);
+			goto error;
+		}
+
+		befs_debug(sb, "Seekleaf to child node %Lu", *node_off);
+	}
+	befs_debug(sb, "Node %Lu is a leaf node", *node_off);
+
+	return BEFS_OK;
+
+      error:
+	befs_debug(sb, "<--- befs_btree_seekleaf() ERROR");
+	return BEFS_ERR;
+}
+
+/**
+ * befs_leafnode - Determine if the btree node is a leaf node or an 
+ * interior node
+ * @node: Pointer to node structure to test
+ * 
+ * Return 1 if leaf, 0 if interior
+ */
+static int
+befs_leafnode(befs_btree_node * node)
+{
+	/* all interior nodes (and only interior nodes) have an overflow node */
+	if (node->head.overflow == befs_bt_inval)
+		return 1;
+	else
+		return 0;
+}
+
+/**
+ * befs_bt_keylen_index - Finds start of keylen index in a node
+ * @node: Pointer to the node structure to find the keylen index within
+ *
+ * Returns a pointer to the start of the key length index array
+ * of the B+tree node *@node
+ *
+ * "The length of all the keys in the node is added to the size of the
+ * header and then rounded up to a multiple of four to get the begining
+ * of the key length index" (p.88, practical filesystem design).
+ *
+ * Exept that rounding up to 8 works, and rounding up to 4 doesn't.
+ */
+static u16 *
+befs_bt_keylen_index(befs_btree_node * node)
+{
+	const int keylen_align = 8;
+	unsigned long int off =
+	    (sizeof (befs_btree_nodehead) + node->head.all_key_length);
+	ulong tmp = off % keylen_align;
+
+	if (tmp)
+		off += keylen_align - tmp;
+
+	return (u16 *) ((void *) node->od_node + off);
+}
+
+/**
+ * befs_bt_valarray - Finds the start of value array in a node
+ * @node: Pointer to the node structure to find the value array within
+ *
+ * Returns a pointer to the start of the value array
+ * of the node pointed to by the node header
+ */
+static befs_off_t *
+befs_bt_valarray(befs_btree_node * node)
+{
+	void *keylen_index_start = (void *) befs_bt_keylen_index(node);
+	size_t keylen_index_size = node->head.all_key_count * sizeof (u16);
+
+	return (befs_off_t *) (keylen_index_start + keylen_index_size);
+}
+
+/**
+ * befs_bt_keydata - Finds start of keydata array in a node
+ * @node: Pointer to the node structure to find the keydata array within
+ *
+ * Returns a pointer to the start of the keydata array
+ * of the node pointed to by the node header 
+ */
+static char *
+befs_bt_keydata(befs_btree_node * node)
+{
+	return (char *) ((void *) node->od_node + sizeof (befs_btree_nodehead));
+}
+
+/**
+ * befs_bt_get_key - returns a pointer to the start of a key
+ * @sb: filesystem superblock
+ * @node: node in which to look for the key
+ * @index: the index of the key to get
+ * @keylen: modified to be the length of the key at @index
+ *
+ * Returns a valid pointer into @node on success.
+ * Returns NULL on failure (bad input) and sets *@keylen = 0
+ */
+static char *
+befs_bt_get_key(struct super_block *sb, befs_btree_node * node,
+		int index, u16 * keylen)
+{
+	int prev_key_end;
+	char *keystart;
+	u16 *keylen_index;
+
+	if (index < 0 || index > node->head.all_key_count) {
+		*keylen = 0;
+		return NULL;
+	}
+
+	keystart = befs_bt_keydata(node);
+	keylen_index = befs_bt_keylen_index(node);
+
+	if (index == 0)
+		prev_key_end = 0;
+	else
+		prev_key_end = fs16_to_cpu(sb, keylen_index[index - 1]);
+
+	*keylen = fs16_to_cpu(sb, keylen_index[index]) - prev_key_end;
+
+	return keystart + prev_key_end;
+}
+
+/**
+ * befs_compare_strings - compare two strings
+ * @key1: pointer to the first key to be compared 
+ * @keylen1: length in bytes of key1
+ * @key2: pointer to the second key to be compared
+ * @kelen2: lenght in bytes of key2
+ *
+ * Returns 0 if @key1 and @key2 are equal.
+ * Returns >0 if @key1 is greater.
+ * Returns <0 if @key2 is greater..
+ */
+static int
+befs_compare_strings(const void *key1, int keylen1,
+		     const void *key2, int keylen2)
+{
+	int len = min_t(int, keylen1, keylen2);
+	int result = strncmp(key1, key2, len);
+	if (result == 0)
+		result = keylen1 - keylen2;
+	return result;
+}
+
+/* These will be used for non-string keyed btrees */
+#if 0
+static int
+btree_compare_int32(cont void *key1, int keylen1, const void *key2, int keylen2)
+{
+	return *(int32_t *) key1 - *(int32_t *) key2;
+}
+
+static int
+btree_compare_uint32(cont void *key1, int keylen1,
+		     const void *key2, int keylen2)
+{
+	if (*(u_int32_t *) key1 == *(u_int32_t *) key2)
+		return 0;
+	else if (*(u_int32_t *) key1 > *(u_int32_t *) key2)
+		return 1;
+
+	return -1;
+}
+static int
+btree_compare_int64(cont void *key1, int keylen1, const void *key2, int keylen2)
+{
+	if (*(int64_t *) key1 == *(int64_t *) key2)
+		return 0;
+	else if (*(int64_t *) key1 > *(int64_t *) key2)
+		return 1;
+
+	return -1;
+}
+
+static int
+btree_compare_uint64(cont void *key1, int keylen1,
+		     const void *key2, int keylen2)
+{
+	if (*(u_int64_t *) key1 == *(u_int64_t *) key2)
+		return 0;
+	else if (*(u_int64_t *) key1 > *(u_int64_t *) key2)
+		return 1;
+
+	return -1;
+}
+
+static int
+btree_compare_float(cont void *key1, int keylen1, const void *key2, int keylen2)
+{
+	float result = *(float *) key1 - *(float *) key2;
+	if (result == 0.0f)
+		return 0;
+
+	return (result < 0.0f) ? -1 : 1;
+}
+
+static int
+btree_compare_double(cont void *key1, int keylen1,
+		     const void *key2, int keylen2)
+{
+	double result = *(double *) key1 - *(double *) key2;
+	if (result == 0.0)
+		return 0;
+
+	return (result < 0.0) ? -1 : 1;
+}
+#endif				//0
diff -Nru a/fs/befs/btree.h b/fs/befs/btree.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/btree.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,13 @@
+/*
+ * btree.h
+ * 
+ */
+
+
+int befs_btree_find(struct super_block *sb, befs_data_stream * ds,
+		    const char *key, befs_off_t * value);
+
+int befs_btree_read(struct super_block *sb, befs_data_stream * ds,
+		    loff_t key_no, size_t bufsize, char *keybuf,
+		    size_t * keysize, befs_off_t * value);
+
diff -Nru a/fs/befs/datastream.c b/fs/befs/datastream.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/datastream.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,528 @@
+/*
+ * linux/fs/befs/datastream.c
+ *
+ * Copyright (C) 2001 Will Dyson <will_dyson@pobox.com>
+ *
+ * Based on portions of file.c by Makoto Kato <m_kato@ga2.so-net.ne.jp>
+ *
+ * Many thanks to Dominic Giampaolo, author of "Practical File System
+ * Design with the Be File System", for such a helpful book.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/version.h>
+#include <linux/slab.h>
+#include <linux/buffer_head.h>
+
+#include "befs.h"
+#include "datastream.h"
+#include "io.h"
+#include "endian.h"
+
+const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
+
+static int befs_find_brun_direct(struct super_block *sb,
+				 befs_data_stream * data,
+				 befs_blocknr_t blockno, befs_block_run * run);
+
+static int befs_find_brun_indirect(struct super_block *sb,
+				   befs_data_stream * data,
+				   befs_blocknr_t blockno,
+				   befs_block_run * run);
+
+static int befs_find_brun_dblindirect(struct super_block *sb,
+				      befs_data_stream * data,
+				      befs_blocknr_t blockno,
+				      befs_block_run * run);
+
+/**
+ * befs_read_datastream - get buffer_head containing data, starting from pos.
+ * @sb: Filesystem superblock
+ * @ds: datastrem to find data with
+ * @pos: start of data
+ * @off: offset of data in buffer_head->b_data
+ *
+ * Returns pointer to buffer_head containing data starting with offset @off,
+ * if you don't need to know offset just set @off = NULL.
+ */
+struct buffer_head *
+befs_read_datastream(struct super_block *sb, befs_data_stream * ds,
+		     befs_off_t pos, uint * off)
+{
+	struct buffer_head *bh = NULL;
+	befs_block_run run;
+	befs_blocknr_t block;	/* block coresponding to pos */
+
+	befs_debug(sb, "---> befs_read_datastream() %Lu", pos);
+	block = pos >> BEFS_SB(sb)->block_shift;
+	if (off)
+		*off = pos - (block << BEFS_SB(sb)->block_shift);
+
+	if (befs_fblock2brun(sb, ds, block, &run) != BEFS_OK) {
+		befs_error(sb, "BeFS: Error finding disk addr of block %lu",
+			   block);
+		befs_debug(sb, "<--- befs_read_datastream() ERROR");
+		return NULL;
+	}
+	bh = befs_bread_iaddr(sb, run);
+	if (!bh) {
+		befs_error(sb, "BeFS: Error reading block %lu from datastream",
+			   block);
+		return NULL;
+	}
+
+	befs_debug(sb, "<--- befs_read_datastream() read data, starting at %Lu",
+		   pos);
+
+	return bh;
+}
+
+/*
+ * Takes a file position and gives back a brun who's starting block
+ * is block number fblock of the file.
+ * 
+ * Returns BEFS_OK or BEFS_ERR.
+ * 
+ * Calls specialized functions for each of the three possible
+ * datastream regions.
+ *
+ * 2001-11-15 Will Dyson
+ */
+int
+befs_fblock2brun(struct super_block *sb, befs_data_stream * data,
+		 befs_blocknr_t fblock, befs_block_run * run)
+{
+	int err;
+	befs_off_t pos = fblock << BEFS_SB(sb)->block_shift;
+
+	if (pos < data->max_direct_range) {
+		err = befs_find_brun_direct(sb, data, fblock, run);
+
+	} else if (pos < data->max_indirect_range) {
+		err = befs_find_brun_indirect(sb, data, fblock, run);
+
+	} else if (pos < data->max_double_indirect_range) {
+		err = befs_find_brun_dblindirect(sb, data, fblock, run);
+
+	} else {
+		befs_error(sb,
+			   "befs_fblock2brun() was asked to find block %lu, "
+			   "which is not mapped by the datastream\n", fblock);
+		err = BEFS_ERR;
+	}
+	return err;
+}
+
+/**
+ * befs_read_lsmylink - read long symlink from datastream.
+ * @sb: Filesystem superblock 
+ * @ds: Datastrem to read from
+ * @buf: Buffer in wich to place long symlink data
+ * @len: Length of the long symlink in bytes
+ *
+ * Returns the number of bytes read
+ */
+size_t
+befs_read_lsymlink(struct super_block * sb, befs_data_stream * ds, void *buff,
+		   befs_off_t len)
+{
+	befs_off_t bytes_read = 0;	/* bytes readed */
+	u16 plen;
+	struct buffer_head *bh = NULL;
+	befs_debug(sb, "---> befs_read_lsymlink() length: %Lu", len);
+
+	while (bytes_read < len) {
+		bh = befs_read_datastream(sb, ds, bytes_read, NULL);
+		if (!bh) {
+			befs_error(sb, "BeFS: Error reading datastream block "
+				   "starting from %Lu", bytes_read);
+			befs_debug(sb, "<--- befs_read_lsymlink() ERROR");
+			return bytes_read;
+
+		}
+		plen = ((bytes_read + BEFS_SB(sb)->block_size) < len) ?
+		    BEFS_SB(sb)->block_size : len - bytes_read;
+		memcpy(buff + bytes_read, bh->b_data, plen);
+		brelse(bh);
+		bytes_read += plen;
+	}
+
+	befs_debug(sb, "<--- befs_read_lsymlink() read %u bytes", bytes_read);
+	return bytes_read;
+}
+
+/**
+ * befs_count_blocks - blocks used by a file
+ * @sb: Filesystem superblock
+ * @ds: Datastream of the file
+ *
+ * Counts the number of fs blocks that the file represented by
+ * inode occupies on the filesystem, counting both regular file
+ * data and filesystem metadata (and eventually attribute data
+ * when we support attributes)
+*/
+
+befs_blocknr_t
+befs_count_blocks(struct super_block * sb, befs_data_stream * ds)
+{
+	befs_blocknr_t blocks;
+	befs_blocknr_t datablocks;	/* File data blocks */
+	befs_blocknr_t metablocks;	/* FS metadata blocks */
+	befs_sb_info *befs_sb = BEFS_SB(sb);
+
+	befs_debug(sb, "---> befs_count_blocks()");
+
+	datablocks = ds->size >> befs_sb->block_shift;
+	if (ds->size & (befs_sb->block_size - 1))
+		datablocks += 1;
+
+	metablocks = 1;		/* Start with 1 block for inode */
+
+	/* Size of indirect block */
+	if (ds->size > ds->max_direct_range)
+		metablocks += ds->indirect.len;
+
+	/*
+	   Double indir block, plus all the indirect blocks it mapps
+	   In the double-indirect range, all block runs of data are
+	   BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know 
+	   how many data block runs are in the double-indirect region,
+	   and from that we know how many indirect blocks it takes to
+	   map them. We assume that the indirect blocks are also
+	   BEFS_DBLINDIR_BRUN_LEN blocks long.
+	 */
+	if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
+		uint dbl_bytes;
+		uint dbl_bruns;
+		uint indirblocks;
+
+		dbl_bytes =
+		    ds->max_double_indirect_range - ds->max_indirect_range;
+		dbl_bruns =
+		    dbl_bytes / (befs_sb->block_size * BEFS_DBLINDIR_BRUN_LEN);
+		indirblocks = dbl_bruns / befs_iaddrs_per_block(sb);
+
+		metablocks += ds->double_indirect.len;
+		metablocks += indirblocks;
+	}
+
+	blocks = datablocks + metablocks;
+	befs_debug(sb, "<--- befs_count_blocks() %u blocks", blocks);
+
+	return blocks;
+}
+
+/*
+	Finds the block run that starts at file block number blockno
+	in the file represented by the datastream data, if that 
+	blockno is in the direct region of the datastream.
+	
+	sb: the superblock
+	data: the datastream
+	blockno: the blocknumber to find
+	run: The found run is passed back through this pointer
+	
+	Return value is BEFS_OK if the blockrun is found, BEFS_ERR
+	otherwise.
+	
+	Algorithm:
+	Linear search. Checks each element of array[] to see if it
+	contains the blockno-th filesystem block. This is nessisary
+	because the block runs map variable amounts of data. Simply
+	keeps a count of the number of blocks searched so far (sum),
+	incrementing this by the length of each block run as we come
+	across it. Adds sum to *count before returning (this is so
+	you can search multiple arrays that are logicaly one array,
+	as in the indirect region code).
+	
+	When/if blockno is found, if blockno is inside of a block 
+	run as stored on disk, we offset the start and lenght members 
+	of the block run, so that blockno is the start and len is
+	still valid (the run ends in the same place).
+	
+	2001-11-15 Will Dyson
+*/
+static int
+befs_find_brun_direct(struct super_block *sb, befs_data_stream * data,
+		      befs_blocknr_t blockno, befs_block_run * run)
+{
+	int i;
+	befs_block_run *array = data->direct;
+	befs_blocknr_t sum;
+	befs_blocknr_t max_block =
+	    data->max_direct_range >> BEFS_SB(sb)->block_shift;
+
+	befs_debug(sb, "---> befs_find_brun_direct(), find %lu", blockno);
+
+	if (blockno > max_block) {
+		befs_error(sb, "befs_find_brun_direct() passed block outside of"
+			   "direct region");
+		return BEFS_ERR;
+	}
+
+	for (i = 0, sum = 0; i < BEFS_NUM_DIRECT_BLOCKS;
+	     sum += array[i].len, i++) {
+		if (blockno >= sum && blockno < sum + (array[i].len)) {
+			int offset = blockno - sum;
+			run->allocation_group = array[i].allocation_group;
+			run->start = array[i].start + offset;
+			run->len = array[i].len - offset;
+
+			befs_debug(sb, "---> befs_find_brun_direct(), "
+				   "found %lu at direct[%d]", blockno, i);
+			return BEFS_OK;
+		}
+	}
+
+	befs_debug(sb, "---> befs_find_brun_direct() ERROR");
+	return BEFS_ERR;
+}
+
+/*
+	Finds the block run that starts at file block number blockno
+	in the file represented by the datastream data, if that 
+	blockno is in the indirect region of the datastream.
+	
+	sb: the superblock
+	data: the datastream
+	blockno: the blocknumber to find
+	run: The found run is passed back through this pointer
+	
+	Return value is BEFS_OK if the blockrun is found, BEFS_ERR
+	otherwise.
+	
+	Algorithm:
+	For each block in the indirect run of the datastream, read
+	it in and search through it for	search_blk.
+	
+	XXX:
+	Really should check to make sure blockno is inside indirect
+	region.
+	
+	2001-11-15 Will Dyson
+*/
+static int
+befs_find_brun_indirect(struct super_block *sb,
+			befs_data_stream * data, befs_blocknr_t blockno,
+			befs_block_run * run)
+{
+	int i, j;
+	befs_blocknr_t sum = 0;
+	befs_blocknr_t indir_start_blk;
+	befs_blocknr_t search_blk;
+	struct buffer_head *indirblock;
+	befs_block_run *array;
+
+	befs_block_run indirect = data->indirect;
+	befs_blocknr_t indirblockno = iaddr2blockno(sb, &indirect);
+	int arraylen = befs_iaddrs_per_block(sb);
+
+	befs_debug(sb, "---> befs_find_brun_indirect(), find %lu", blockno);
+
+	indir_start_blk = data->max_direct_range >> BEFS_SB(sb)->block_shift;
+	search_blk = blockno - indir_start_blk;
+
+	/* Examine blocks of the indirect run one at a time */
+	for (i = 0; i < indirect.len; i++) {
+		indirblock = befs_bread(sb, indirblockno + i);
+		if (indirblock == NULL) {
+			befs_debug(sb,
+				   "---> befs_find_brun_indirect() failed to "
+				   "read disk block %lu from the indirect brun",
+				   indirblockno + i);
+			return BEFS_ERR;
+		}
+
+		array = (befs_block_run *) indirblock->b_data;
+
+		for (j = 0; j < arraylen; ++j) {
+			int len = fs16_to_cpu(sb, array[j].len);
+
+			if (search_blk >= sum && search_blk < sum + len) {
+				int offset = search_blk - sum;
+				run->allocation_group =
+				    fs32_to_cpu(sb, array[j].allocation_group);
+				run->start =
+				    fs16_to_cpu(sb, array[j].start) + offset;
+				run->len =
+				    fs16_to_cpu(sb, array[j].len) - offset;
+
+				brelse(indirblock);
+				befs_debug(sb,
+					   "<--- befs_find_brun_indirect() found "
+					   "file block %lu at indirect[%d]",
+					   blockno, j + (i * arraylen));
+				return BEFS_OK;
+			}
+			sum += len;
+		}
+
+		brelse(indirblock);
+	}
+
+	/* Only fallthrough is an error */
+	befs_error(sb, "BeFS: befs_find_brun_indirect() failed to find "
+		   "file block %lu", blockno);
+
+	befs_debug(sb, "<--- befs_find_brun_indirect() ERROR");
+	return BEFS_ERR;
+}
+
+/*
+	Finds the block run that starts at file block number blockno
+	in the file represented by the datastream data, if that 
+	blockno is in the double-indirect region of the datastream.
+	
+	sb: the superblock
+	data: the datastream
+	blockno: the blocknumber to find
+	run: The found run is passed back through this pointer
+	
+	Return value is BEFS_OK if the blockrun is found, BEFS_ERR
+	otherwise.
+	
+	Algorithm:
+	The block runs in the double-indirect region are different.
+	They are always allocated 4 fs blocks at a time, so each
+	block run maps a constant amount of file data. This means
+	that we can directly calculate how many block runs into the
+	double-indirect region we need to go to get to the one that
+	maps a particular filesystem block.
+	
+	We do this in two stages. First we calculate which of the
+	inode addresses in the double-indirect block will point us
+	to the indirect block that contains the mapping for the data,
+	then we calculate which of the inode addresses in that 
+	indirect block maps the data block we are after.
+	
+	Oh, and once we've done that, we actually read in the blocks 
+	that contain the inode addresses we calculated above. Even 
+	though the double-indirect run may be several blocks long, 
+	we can calculate which of those blocks will contain the index
+	we are after and only read that one. We then follow it to 
+	the indirect block and perform a  similar process to find
+	the actual block run that maps the data block we are interested
+	in.
+	
+	Then we offset the run as in befs_find_brun_array() and we are 
+	done.
+	
+	2001-11-15 Will Dyson
+*/
+static int
+befs_find_brun_dblindirect(struct super_block *sb,
+			   befs_data_stream * data, befs_blocknr_t blockno,
+			   befs_block_run * run)
+{
+	int dblindir_indx;
+	int indir_indx;
+	int offset;
+	int dbl_which_block;
+	int which_block;
+	int dbl_block_indx;
+	int block_indx;
+	off_t dblindir_leftover;
+	befs_blocknr_t blockno_at_run_start;
+	struct buffer_head *dbl_indir_block;
+	struct buffer_head *indir_block;
+	befs_block_run indir_run;
+	befs_inode_addr *iaddr_array = NULL;
+	befs_sb_info *befs_sb = BEFS_SB(sb);
+
+	befs_blocknr_t indir_start_blk =
+	    data->max_indirect_range >> befs_sb->block_shift;
+
+	off_t dbl_indir_off = blockno - indir_start_blk;
+
+	/* number of data blocks mapped by each of the iaddrs in
+	 * the indirect block pointed to by the double indirect block
+	 */
+	size_t iblklen = BEFS_DBLINDIR_BRUN_LEN;
+
+	/* number of data blocks mapped by each of the iaddrs in
+	 * the double indirect block
+	 */
+	size_t diblklen = iblklen * befs_iaddrs_per_block(sb)
+	    * BEFS_DBLINDIR_BRUN_LEN;
+
+	befs_debug(sb, "---> befs_find_brun_dblindirect() find %lu", blockno);
+
+	/* First, discover which of the double_indir->indir blocks
+	 * contains pos. Then figure out how much of pos that
+	 * accounted for. Then discover which of the iaddrs in
+	 * the indirect block contains pos.
+	 */
+
+	dblindir_indx = dbl_indir_off / diblklen;
+	dblindir_leftover = dbl_indir_off % diblklen;
+	indir_indx = dblindir_leftover / diblklen;
+
+	/* Read double indirect block */
+	dbl_which_block = dblindir_indx / befs_iaddrs_per_block(sb);
+	if (dbl_which_block > data->double_indirect.len) {
+		befs_error(sb, "The double-indirect index calculated by "
+			   "befs_read_brun_dblindirect(), %d, is outside the range "
+			   "of the double-indirect block", dblindir_indx);
+		return BEFS_ERR;
+	}
+
+	dbl_indir_block =
+	    befs_bread(sb, iaddr2blockno(sb, &data->double_indirect) +
+					dbl_which_block);
+	if (dbl_indir_block == NULL) {
+		befs_error(sb, "befs_read_brun_dblindirect() couldn't read the "
+			   "double-indirect block at blockno %lu",
+			   iaddr2blockno(sb,
+					 &data->double_indirect) +
+			   dbl_which_block);
+		brelse(dbl_indir_block);
+		return BEFS_ERR;
+	}
+
+	dbl_block_indx =
+	    dblindir_indx - (dbl_which_block * befs_iaddrs_per_block(sb));
+	iaddr_array = (befs_inode_addr *) dbl_indir_block->b_data;
+	indir_run = fsrun_to_cpu(sb, iaddr_array[dbl_block_indx]);
+	brelse(dbl_indir_block);
+	iaddr_array = NULL;
+
+	/* Read indirect block */
+	which_block = indir_indx / befs_iaddrs_per_block(sb);
+	if (which_block > indir_run.len) {
+		befs_error(sb, "The indirect index calculated by "
+			   "befs_read_brun_dblindirect(), %d, is outside the range "
+			   "of the indirect block", indir_indx);
+		return BEFS_ERR;
+	}
+
+	indir_block =
+	    befs_bread(sb, iaddr2blockno(sb, &indir_run) + which_block);
+	if (indir_block == NULL) {
+		befs_error(sb, "befs_read_brun_dblindirect() couldn't read the "
+			   "indirect block at blockno %lu",
+			   iaddr2blockno(sb, &indir_run) + which_block);
+		brelse(indir_block);
+		return BEFS_ERR;
+	}
+
+	block_indx = indir_indx - (which_block * befs_iaddrs_per_block(sb));
+	iaddr_array = (befs_inode_addr *) indir_block->b_data;
+	*run = fsrun_to_cpu(sb, iaddr_array[block_indx]);
+	brelse(indir_block);
+	iaddr_array = NULL;
+
+	blockno_at_run_start = indir_start_blk;
+	blockno_at_run_start += diblklen * dblindir_indx;
+	blockno_at_run_start += iblklen * indir_indx;
+	offset = blockno - blockno_at_run_start;
+
+	run->start += offset;
+	run->len -= offset;
+
+	befs_debug(sb, "Found file block %lu in double_indirect[%d][%d],"
+		   " double_indirect_leftover = %lu",
+		   blockno, dblindir_indx, indir_indx, dblindir_leftover);
+
+	return BEFS_OK;
+}
diff -Nru a/fs/befs/datastream.h b/fs/befs/datastream.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/datastream.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,19 @@
+/*
+ * datastream.h
+ *
+ */
+
+struct buffer_head *befs_read_datastream(struct super_block *sb,
+					 befs_data_stream * ds, befs_off_t pos,
+					 uint * off);
+
+int befs_fblock2brun(struct super_block *sb, befs_data_stream * data,
+		     befs_blocknr_t fblock, befs_block_run * run);
+
+size_t befs_read_lsymlink(struct super_block *sb, befs_data_stream * data,
+			  void *buff, befs_off_t len);
+
+befs_blocknr_t befs_count_blocks(struct super_block *sb, befs_data_stream * ds);
+
+extern const befs_inode_addr BAD_IADDR;
+
diff -Nru a/fs/befs/debug.c b/fs/befs/debug.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/debug.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,262 @@
+/*
+ *  linux/fs/befs/debug.c
+ * 
+ * Copyright (C) 2001 Will Dyson (will_dyson at pobox.com)
+ *
+ * With help from the ntfs-tng driver by Anton Altparmakov
+ *
+ * Copyright (C) 1999  Makoto Kato (m_kato@ga2.so-net.ne.jp)
+ *
+ * debug functions
+ */
+
+#ifdef __KERNEL__
+
+#include <stdarg.h>
+#include <linux/string.h>
+#include <linux/spinlock.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+
+#endif				/* __KERNEL__ */
+
+#include "befs.h"
+#include "endian.h"
+
+#define ERRBUFSIZE 1024
+
+void
+befs_error(const struct super_block *sb, const char *fmt, ...)
+{
+	va_list args;
+	char err_buf[ERRBUFSIZE];
+
+	va_start(args, fmt);
+	vsnprintf(err_buf, ERRBUFSIZE, fmt, args);
+	va_end(args);
+
+	printk(KERN_ERR "BeFS(%s): %s\n", sb->s_id, err_buf);
+
+	befs_debug(sb, err_buf);
+}
+
+void
+befs_warning(const struct super_block *sb, const char *fmt, ...)
+{
+	va_list args;
+	char err_buf[ERRBUFSIZE];
+
+	va_start(args, fmt);
+	vsnprintf(err_buf, ERRBUFSIZE, fmt, args);
+	va_end(args);
+
+	printk(KERN_WARNING "BeFS(%s): %s\n", sb->s_id, err_buf);
+
+	befs_debug(sb, err_buf);
+}
+
+void
+befs_debug(const struct super_block *sb, const char *fmt, ...)
+{
+#ifdef CONFIG_BEFS_DEBUG
+
+	va_list args;
+	char err_buf[ERRBUFSIZE];
+
+	if (BEFS_SB(sb)->mount_opts.debug) {
+		va_start(args, fmt);
+		vsnprintf(err_buf, ERRBUFSIZE, fmt, args);
+		va_end(args);
+
+		printk(KERN_DEBUG "BeFS(%s): %s\n", sb->s_id, err_buf);
+	}
+#endif				//CONFIG_BEFS_DEBUG
+}
+
+void
+befs_dump_inode(const struct super_block *sb, befs_inode * inode)
+{
+#ifdef CONFIG_BEFS_DEBUG
+
+	befs_block_run tmp_run;
+
+	befs_debug(sb, "befs_inode infomation");
+
+	befs_debug(sb, "  magic1 %08x", fs32_to_cpu(sb, inode->magic1));
+
+	tmp_run = fsrun_to_cpu(sb, inode->inode_num);
+	befs_debug(sb, "  inode_num %u, %hu, %hu",
+		   tmp_run.allocation_group, tmp_run.start, tmp_run.len);
+
+	befs_debug(sb, "  uid %u", fs32_to_cpu(sb, inode->uid));
+	befs_debug(sb, "  gid %u", fs32_to_cpu(sb, inode->gid));
+	befs_debug(sb, "  mode %08x", fs32_to_cpu(sb, inode->mode));
+	befs_debug(sb, "  flags %08x", fs32_to_cpu(sb, inode->flags));
+	befs_debug(sb, "  create_time %Lu",
+		   fs64_to_cpu(sb, inode->create_time));
+	befs_debug(sb, "  last_modified_time %Lu",
+		   fs64_to_cpu(sb, inode->last_modified_time));
+
+	tmp_run = fsrun_to_cpu(sb, inode->parent);
+	befs_debug(sb, "  parent [%u, %hu, %hu]",
+		   tmp_run.allocation_group, tmp_run.start, tmp_run.len);
+
+	tmp_run = fsrun_to_cpu(sb, inode->attributes);
+	befs_debug(sb, "  attributes [%u, %hu, %hu]",
+		   tmp_run.allocation_group, tmp_run.start, tmp_run.len);
+
+	befs_debug(sb, "  type %08x", fs32_to_cpu(sb, inode->type));
+	befs_debug(sb, "  inode_size %u", fs32_to_cpu(sb, inode->inode_size));
+
+	if (S_ISLNK(inode->mode)) {
+		befs_debug(sb, "  Symbolic link [%s]", inode->data.symlink);
+	} else {
+		int i;
+
+		for (i = 0; i < BEFS_NUM_DIRECT_BLOCKS; i++) {
+			tmp_run =
+			    fsrun_to_cpu(sb, inode->data.datastream.direct[i]);
+			befs_debug(sb, "  direct %d [%u, %hu, %hu]", i,
+				   tmp_run.allocation_group, tmp_run.start,
+				   tmp_run.len);
+		}
+		befs_debug(sb, "  max_direct_range %Lu",
+			   fs64_to_cpu(sb,
+				       inode->data.datastream.
+				       max_direct_range));
+
+		tmp_run = fsrun_to_cpu(sb, inode->data.datastream.indirect);
+		befs_debug(sb, "  indirect [%u, %hu, %hu]",
+			   tmp_run.allocation_group,
+			   tmp_run.start, tmp_run.len);
+
+		befs_debug(sb, "  max_indirect_range %Lu",
+			   fs64_to_cpu(sb,
+				       inode->data.datastream.
+				       max_indirect_range));
+
+		tmp_run =
+		    fsrun_to_cpu(sb, inode->data.datastream.double_indirect);
+		befs_debug(sb, "  double indirect [%u, %hu, %hu]",
+			   tmp_run.allocation_group, tmp_run.start,
+			   tmp_run.len);
+
+		befs_debug(sb, "  max_double_indirect_range %Lu",
+			   fs64_to_cpu(sb,
+				       inode->data.datastream.
+				       max_double_indirect_range));
+
+		befs_debug(sb, "  size %Lu",
+			   fs64_to_cpu(sb, inode->data.datastream.size));
+	}
+
+#endif				//CONFIG_BEFS_DEBUG
+}
+
+/*
+ * Display super block structure for debug.
+ */
+
+void
+befs_dump_super_block(const struct super_block *sb, befs_super_block * sup)
+{
+#ifdef CONFIG_BEFS_DEBUG
+
+	befs_block_run tmp_run;
+
+	befs_debug(sb, "befs_super_block information");
+
+	befs_debug(sb, "  name %s", sup->name);
+	befs_debug(sb, "  magic1 %08x", fs32_to_cpu(sb, sup->magic1));
+	befs_debug(sb, "  fs_byte_order %08x",
+		   fs32_to_cpu(sb, sup->fs_byte_order));
+
+	befs_debug(sb, "  block_size %u", fs32_to_cpu(sb, sup->block_size));
+	befs_debug(sb, "  block_shift %u", fs32_to_cpu(sb, sup->block_shift));
+
+	befs_debug(sb, "  num_blocks %Lu", fs64_to_cpu(sb, sup->num_blocks));
+	befs_debug(sb, "  used_blocks %Lu", fs64_to_cpu(sb, sup->used_blocks));
+
+	befs_debug(sb, "  magic2 %08x", fs32_to_cpu(sb, sup->magic2));
+	befs_debug(sb, "  blocks_per_ag %u",
+		   fs32_to_cpu(sb, sup->blocks_per_ag));
+	befs_debug(sb, "  ag_shift %u", fs32_to_cpu(sb, sup->ag_shift));
+	befs_debug(sb, "  num_ags %u", fs32_to_cpu(sb, sup->num_ags));
+
+	befs_debug(sb, "  flags %08x", fs32_to_cpu(sb, sup->flags));
+
+	tmp_run = fsrun_to_cpu(sb, sup->log_blocks);
+	befs_debug(sb, "  log_blocks %u, %hu, %hu",
+		   tmp_run.allocation_group, tmp_run.start, tmp_run.len);
+
+	befs_debug(sb, "  log_start %Ld", fs64_to_cpu(sb, sup->log_start));
+	befs_debug(sb, "  log_end %Ld", fs64_to_cpu(sb, sup->log_end));
+
+	befs_debug(sb, "  magic3 %08x", fs32_to_cpu(sb, sup->magic3));
+
+	tmp_run = fsrun_to_cpu(sb, sup->root_dir);
+	befs_debug(sb, "  root_dir %u, %hu, %hu",
+		   tmp_run.allocation_group, tmp_run.start, tmp_run.len);
+
+	tmp_run = fsrun_to_cpu(sb, sup->indices);
+	befs_debug(sb, "  indices %u, %hu, %hu",
+		   tmp_run.allocation_group, tmp_run.start, tmp_run.len);
+
+#endif				//CONFIG_BEFS_DEBUG
+}
+
+void
+befs_dump_small_data(const struct super_block *sb, befs_small_data * sd)
+{
+}
+
+void
+befs_dump_run(const struct super_block *sb, befs_block_run run)
+{
+#ifdef CONFIG_BEFS_DEBUG
+
+	run = fsrun_to_cpu(sb, run);
+
+	befs_debug(sb, "[%u, %hu, %hu]",
+		   run.allocation_group, run.start, run.len);
+
+#endif				//CONFIG_BEFS_DEBUG
+}
+
+void
+befs_dump_index_entry(const struct super_block *sb, befs_btree_super * super)
+{
+#ifdef CONFIG_BEFS_DEBUG
+
+	befs_debug(sb, "Btree super structure");
+	befs_debug(sb, "  magic %08x", fs32_to_cpu(sb, super->magic));
+	befs_debug(sb, "  node_size %u", fs32_to_cpu(sb, super->node_size));
+	befs_debug(sb, "  max_depth %08x", fs32_to_cpu(sb, super->max_depth));
+
+	befs_debug(sb, "  data_type %08x", fs32_to_cpu(sb, super->data_type));
+	befs_debug(sb, "  root_node_pointer %016LX",
+		   fs64_to_cpu(sb, super->root_node_ptr));
+	befs_debug(sb, "  free_node_pointer %016LX",
+		   fs64_to_cpu(sb, super->free_node_ptr));
+	befs_debug(sb, "  maximum size %016LX",
+		   fs64_to_cpu(sb, super->max_size));
+
+#endif				//CONFIG_BEFS_DEBUG
+}
+
+void
+befs_dump_index_node(const struct super_block *sb, befs_btree_nodehead * node)
+{
+#ifdef CONFIG_BEFS_DEBUG
+
+	befs_debug(sb, "Btree node structure");
+	befs_debug(sb, "  left %016LX", fs64_to_cpu(sb, node->left));
+	befs_debug(sb, "  right %016LX", fs64_to_cpu(sb, node->right));
+	befs_debug(sb, "  overflow %016LX", fs64_to_cpu(sb, node->overflow));
+	befs_debug(sb, "  all_key_count %hu",
+		   fs16_to_cpu(sb, node->all_key_count));
+	befs_debug(sb, "  all_key_length %hu",
+		   fs16_to_cpu(sb, node->all_key_length));
+
+#endif				//CONFIG_BEFS_DEBUG
+}
diff -Nru a/fs/befs/endian.h b/fs/befs/endian.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/endian.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,126 @@
+/*
+ * linux/fs/befs/endian.h
+ *
+ * Copyright (C) 2001 Will Dyson <will_dyson@pobox.com>
+ *
+ * Partially based on similar funtions in the sysv driver.
+ */
+
+#ifndef LINUX_BEFS_ENDIAN
+#define LINUX_BEFS_ENDIAN
+
+#include <linux/byteorder/generic.h>
+#include "befs.h"
+
+static inline u64
+fs64_to_cpu(const struct super_block *sb, u64 n)
+{
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
+		return le64_to_cpu(n);
+	else
+		return be64_to_cpu(n);
+}
+
+static inline u64
+cpu_to_fs64(const struct super_block *sb, u64 n)
+{
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
+		return cpu_to_le64(n);
+	else
+		return cpu_to_be64(n);
+}
+
+static inline u32
+fs32_to_cpu(const struct super_block *sb, u32 n)
+{
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
+		return le32_to_cpu(n);
+	else
+		return be32_to_cpu(n);
+}
+
+static inline u32
+cpu_to_fs32(const struct super_block *sb, u32 n)
+{
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
+		return cpu_to_le32(n);
+	else
+		return cpu_to_be32(n);
+}
+
+static inline u16
+fs16_to_cpu(const struct super_block *sb, u16 n)
+{
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
+		return le16_to_cpu(n);
+	else
+		return be16_to_cpu(n);
+}
+
+static inline u16
+cpu_to_fs16(const struct super_block *sb, u16 n)
+{
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
+		return cpu_to_le16(n);
+	else
+		return cpu_to_be16(n);
+}
+
+/* Composite types below here */
+
+static inline befs_block_run
+fsrun_to_cpu(const struct super_block *sb, befs_block_run n)
+{
+	befs_block_run run;
+
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE) {
+		run.allocation_group = le32_to_cpu(n.allocation_group);
+		run.start = le16_to_cpu(n.start);
+		run.len = le16_to_cpu(n.len);
+	} else {
+		run.allocation_group = be32_to_cpu(n.allocation_group);
+		run.start = be16_to_cpu(n.start);
+		run.len = be16_to_cpu(n.len);
+	}
+	return run;
+}
+
+static inline befs_block_run
+cpu_to_fsrun(const struct super_block *sb, befs_block_run n)
+{
+	befs_block_run run;
+
+	if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE) {
+		run.allocation_group = cpu_to_le32(n.allocation_group);
+		run.start = cpu_to_le16(n.start);
+		run.len = cpu_to_le16(n.len);
+	} else {
+		run.allocation_group = cpu_to_be32(n.allocation_group);
+		run.start = cpu_to_be16(n.start);
+		run.len = cpu_to_be16(n.len);
+	}
+	return run;
+}
+
+static inline befs_data_stream
+fsds_to_cpu(const struct super_block *sb, befs_data_stream n)
+{
+	befs_data_stream data;
+	int i;
+
+	for (i = 0; i < BEFS_NUM_DIRECT_BLOCKS; ++i)
+		data.direct[i] = fsrun_to_cpu(sb, n.direct[i]);
+
+	data.max_direct_range = fs64_to_cpu(sb, n.max_direct_range);
+	data.indirect = fsrun_to_cpu(sb, n.indirect);
+	data.max_indirect_range = fs64_to_cpu(sb, n.max_indirect_range);
+	data.double_indirect = fsrun_to_cpu(sb, n.double_indirect);
+	data.max_double_indirect_range = fs64_to_cpu(sb,
+						     n.
+						     max_double_indirect_range);
+	data.size = fs64_to_cpu(sb, n.size);
+
+	return data;
+}
+
+#endif				//LINUX_BEFS_ENDIAN
diff -Nru a/fs/befs/inode.c b/fs/befs/inode.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/inode.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,53 @@
+/*
+ * inode.c
+ * 
+ * Copyright (C) 2001 Will Dyson <will_dyson@pobox.com>
+ */
+
+#include <linux/fs.h>
+
+#include "befs.h"
+#include "inode.h"
+#include "endian.h"
+
+/*
+	Validates the correctness of the befs inode
+	Returns BEFS_OK if the inode should be used, otherwise
+	returns BEFS_BAD_INODE
+*/
+int
+befs_check_inode(struct super_block *sb, befs_inode * raw_inode,
+		 befs_blocknr_t inode)
+{
+	u32 magic1 = fs32_to_cpu(sb, raw_inode->magic1);
+	befs_inode_addr ino_num = fsrun_to_cpu(sb, raw_inode->inode_num);
+	u32 flags = fs32_to_cpu(sb, raw_inode->flags);
+
+	/* check magic header. */
+	if (magic1 != BEFS_INODE_MAGIC1) {
+		befs_error(sb,
+			   "Inode has a bad magic header - inode = %lu", inode);
+		return BEFS_BAD_INODE;
+	}
+
+	/*
+	 * Sanity check2: inodes store their own block address. Check it.
+	 */
+	if (inode != iaddr2blockno(sb, &ino_num)) {
+		befs_error(sb, "inode blocknr field disagrees with vfs "
+			   "VFS: %lu, Inode %lu",
+			   inode, iaddr2blockno(sb, &ino_num));
+		return BEFS_BAD_INODE;
+	}
+
+	/*
+	 * check flag
+	 */
+
+	if (!(flags & BEFS_INODE_IN_USE)) {
+		befs_error(sb, "inode is not used - inode = %lu", inode);
+		return BEFS_BAD_INODE;
+	}
+
+	return BEFS_OK;
+}
diff -Nru a/fs/befs/inode.h b/fs/befs/inode.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/inode.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,8 @@
+/*
+ * inode.h
+ * 
+ */
+
+int befs_check_inode(struct super_block *sb, befs_inode * raw_inode,
+		     befs_blocknr_t inode);
+
diff -Nru a/fs/befs/io.c b/fs/befs/io.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/io.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,98 @@
+/*
+ * linux/fs/befs/io.c
+ *
+ * Copyright (C) 2001 Will Dyson <will_dyson@pobox.com
+ *
+ * Based on portions of file.c and inode.c 
+ * by Makoto Kato (m_kato@ga2.so-net.ne.jp)
+ *
+ * Many thanks to Dominic Giampaolo, author of Practical File System
+ * Design with the Be File System, for such a helpful book.
+ *
+ */
+
+#include <linux/buffer_head.h>
+
+#include "befs.h"
+#include "io.h"
+
+/*
+ * Converts befs notion of disk addr to a disk offset and uses
+ * linux kernel function sb_bread() to get the buffer containing
+ * the offset. -Will Dyson
+ *
+ */
+
+struct buffer_head *
+befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr)
+{
+	struct buffer_head *bh = NULL;
+	befs_blocknr_t block = 0;
+	vfs_blocknr_t vfs_block = 0;
+	befs_sb_info *befs_sb = BEFS_SB(sb);
+
+	befs_debug(sb, "---> Enter befs_read_iaddr() "
+		   "[%u, %hu, %hu]",
+		   iaddr.allocation_group, iaddr.start, iaddr.len);
+
+	if (iaddr.allocation_group > befs_sb->num_ags) {
+		befs_error(sb, "BEFS: Invalid allocation group %u, max is %u",
+			   iaddr.allocation_group, befs_sb->num_ags);
+		goto error;
+	}
+
+	block = iaddr2blockno(sb, &iaddr);
+	vfs_block = (vfs_blocknr_t) block;
+
+	if (vfs_block != block) {
+		befs_error(sb, "Error converting to host blocknr_t. %Lu "
+			   "is larger than the host can use", block);
+		goto error;
+	}
+
+	befs_debug(sb, "befs_read_iaddr: offset = %lu", block);
+
+	bh = sb_bread(sb, vfs_block);
+
+	if (bh == NULL) {
+		befs_error(sb, "Failed to read block %lu", block);
+		goto error;
+	}
+
+	befs_debug(sb, "<--- befs_read_iaddr()");
+	return bh;
+
+      error:
+	befs_debug(sb, "<--- befs_read_iaddr() ERROR");
+	return NULL;
+}
+
+struct buffer_head *
+befs_bread(struct super_block *sb, befs_blocknr_t block)
+{
+	struct buffer_head *bh = NULL;
+	vfs_blocknr_t vfs_block = (vfs_blocknr_t) block;
+
+	befs_debug(sb, "---> Enter befs_read() %Lu", block);
+
+	if (vfs_block != block) {
+		befs_error(sb, "Error converting to host blocknr_t. %Lu "
+			   "is larger than the host can use", block);
+		goto error;
+	}
+
+	bh = sb_bread(sb, vfs_block);
+
+	if (bh == NULL) {
+		befs_error(sb, "Failed to read block %lu", vfs_block);
+		goto error;
+	}
+
+	befs_debug(sb, "<--- befs_read()");
+
+	return bh;
+
+      error:
+	befs_debug(sb, "<--- befs_read() ERROR");
+	return NULL;
+}
diff -Nru a/fs/befs/io.h b/fs/befs/io.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/io.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,9 @@
+/*
+ * io.h
+ */
+
+struct buffer_head *befs_bread_iaddr(struct super_block *sb,
+				     befs_inode_addr iaddr);
+
+struct buffer_head *befs_bread(struct super_block *sb, befs_blocknr_t block);
+
diff -Nru a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/linuxvfs.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,956 @@
+/*
+ * linux/fs/befs/linuxvfs.c
+ *
+ * Copyright (C) 2001 Will Dyson <will_dyson@pobox.com
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/errno.h>
+#include <linux/stat.h>
+#include <linux/nls.h>
+#include <linux/buffer_head.h>
+
+#include "befs.h"
+#include "btree.h"
+#include "inode.h"
+#include "datastream.h"
+#include "super.h"
+#include "io.h"
+#include "endian.h"
+
+EXPORT_NO_SYMBOLS;
+MODULE_DESCRIPTION("BeOS File System (BeFS) driver");
+MODULE_AUTHOR("Will Dyson");
+MODULE_LICENSE("GPL");
+
+/* The units the vfs expects inode->i_blocks to be in */
+#define VFS_BLOCK_SIZE 512
+
+static int befs_readdir(struct file *, void *, filldir_t);
+static int befs_get_block(struct inode *, sector_t, struct buffer_head *, int);
+static int befs_readpage(struct file *file, struct page *page);
+static sector_t befs_bmap(struct address_space *mapping, sector_t block);
+static struct dentry *befs_lookup(struct inode *, struct dentry *);
+static void befs_read_inode(struct inode *ino);
+static struct inode *befs_alloc_inode(struct super_block *sb);
+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 *, int);
+static int befs_follow_link(struct dentry *, struct nameidata *nd);
+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,
+			char **out, int *out_len);
+static void befs_put_super(struct super_block *);
+static int befs_remount(struct super_block *, int *, char *);
+static int befs_statfs(struct super_block *, struct statfs *);
+static int parse_options(char *, befs_mount_options *);
+
+static const struct super_operations befs_sops = {
+	.read_inode	= befs_read_inode,	/* initialize & read inode */
+	.alloc_inode	= befs_alloc_inode,	/* allocate a new inode */
+	.destroy_inode	= befs_destroy_inode, /* deallocate an inode */
+	.put_super	= befs_put_super,	/* uninit super */
+	.statfs		= befs_statfs,	/* statfs */
+	.remount_fs	= befs_remount,
+};
+
+/* slab cache for befs_inode_info objects */
+static kmem_cache_t *befs_inode_cachep;
+
+struct file_operations befs_dir_operations = {
+	.read		= generic_read_dir,
+	.readdir	= befs_readdir,
+};
+
+struct inode_operations befs_dir_inode_operations = {
+	.lookup		= befs_lookup,
+};
+
+struct file_operations befs_file_operations = {
+	.llseek		= default_llseek,
+	.read		= generic_file_read,
+	.mmap		= generic_file_mmap,
+};
+
+struct address_space_operations befs_aops = {
+	.readpage	= befs_readpage,
+	.sync_page	= block_sync_page,
+	.bmap		= befs_bmap,
+};
+
+static struct inode_operations befs_symlink_inode_operations = {
+	.readlink	= befs_readlink,
+	.follow_link	= befs_follow_link,
+};
+
+/* 
+ * Called by generic_file_read() to read a page of data
+ * 
+ * In turn, simply calls a generic block read function and
+ * passes it the address of befs_get_block, for mapping file
+ * positions to disk blocks.
+ */
+static int
+befs_readpage(struct file *file, struct page *page)
+{
+	return block_read_full_page(page, befs_get_block);
+}
+
+static sector_t
+befs_bmap(struct address_space *mapping, sector_t block)
+{
+	return generic_block_bmap(mapping, block, befs_get_block);
+}
+
+/* 
+ * Generic function to map a file position (block) to a 
+ * disk offset (passed back in bh_result).
+ *
+ * Used by many higher level functions.
+ *
+ * Calls befs_fblock2brun() in datastream.c to do the real work.
+ *
+ * -WD 10-26-01
+ */
+
+static int
+befs_get_block(struct inode *inode, sector_t block,
+	       struct buffer_head *bh_result, int create)
+{
+	struct super_block *sb = inode->i_sb;
+	befs_data_stream *ds = &BEFS_I(inode)->i_data.ds;
+	befs_block_run run = BAD_IADDR;
+	int res = 0;
+	ulong disk_off;
+
+	befs_debug(sb, "---> befs_get_block() for inode %lu, block %ld",
+		   inode->i_ino, block);
+
+	if (block < 0) {
+		befs_error(sb, "befs_get_block() was asked for a block "
+			   "number less than zero: block %ld in inode %lu",
+			   block, inode->i_ino);
+		return -EIO;
+	}
+
+	if (create) {
+		befs_error(sb, "befs_get_block() was asked to write to "
+			   "block %ld in inode %lu", block, inode->i_ino);
+		return -EPERM;
+	}
+
+	res = befs_fblock2brun(sb, ds, block, &run);
+	if (res != BEFS_OK) {
+		befs_error(sb,
+			   "<--- befs_get_block() for inode %lu, block "
+			   "%ld ERROR", inode->i_ino, block);
+		return -EFBIG;
+	}
+
+	disk_off = (ulong) iaddr2blockno(sb, &run);
+
+	map_bh(bh_result, inode->i_sb, disk_off);
+
+	befs_debug(sb, "<--- befs_get_block() for inode %lu, block %ld, "
+		   "disk address %lu", inode->i_ino, block, disk_off);
+
+	return 0;
+}
+
+static struct dentry *
+befs_lookup(struct inode *dir, struct dentry *dentry)
+{
+	struct inode *inode = NULL;
+	struct super_block *sb = dir->i_sb;
+	befs_data_stream *ds = &BEFS_I(dir)->i_data.ds;
+	befs_off_t offset;
+	int ret;
+	int utfnamelen;
+	char *utfname;
+	const char *name = dentry->d_name.name;
+
+	befs_debug(sb, "---> befs_lookup() "
+		   "name %s inode %ld", dentry->d_name.name, dir->i_ino);
+
+	/* Convert to UTF-8 */
+	if (BEFS_SB(sb)->nls) {
+		ret =
+		    befs_nls2utf(sb, name, strlen(name), &utfname, &utfnamelen);
+		if (ret < 0) {
+			befs_debug(sb, "<--- befs_lookup() ERROR");
+			return ERR_PTR(ret);
+		}
+		ret = befs_btree_find(sb, ds, utfname, &offset);
+		kfree(utfname);
+
+	} else {
+		ret = befs_btree_find(sb, ds, dentry->d_name.name, &offset);
+	}
+
+	if (ret == BEFS_BT_NOT_FOUND) {
+		befs_debug(sb, "<--- befs_lookup() %s not found",
+			   dentry->d_name.name);
+		return ERR_PTR(-ENOENT);
+
+	} else if (ret != BEFS_OK || offset == 0) {
+		befs_warning(sb, "<--- befs_lookup() Error");
+		return ERR_PTR(-ENODATA);
+	}
+
+	inode = iget(dir->i_sb, (ino_t) offset);
+	if (!inode)
+		return ERR_PTR(-EACCES);
+
+	d_add(dentry, inode);
+
+	befs_debug(sb, "<--- befs_lookup()");
+
+	return NULL;
+}
+
+static int
+befs_readdir(struct file *filp, void *dirent, filldir_t filldir)
+{
+	struct inode *inode = filp->f_dentry->d_inode;
+	struct super_block *sb = inode->i_sb;
+	befs_data_stream *ds = &BEFS_I(inode)->i_data.ds;
+	befs_off_t value;
+	int result;
+	size_t keysize;
+	unsigned char d_type;
+	char keybuf[BEFS_NAME_LEN + 1];
+	char *nlsname;
+	int nlsnamelen;
+	const char *dirname = filp->f_dentry->d_name.name;
+
+	befs_debug(sb, "---> befs_readdir() "
+		   "name %s, inode %ld, filp->f_pos %Ld",
+		   dirname, inode->i_ino, filp->f_pos);
+
+	result = befs_btree_read(sb, ds, filp->f_pos, BEFS_NAME_LEN + 1,
+				 keybuf, &keysize, &value);
+
+	if (result == BEFS_ERR) {
+		befs_debug(sb, "<--- befs_readdir() ERROR");
+		befs_error(sb, "IO error reading %s (inode %lu)",
+			   dirname, inode->i_ino);
+		return -EIO;
+
+	} else if (result == BEFS_BT_END) {
+		befs_debug(sb, "<--- befs_readdir() END");
+		return 0;
+
+	} else if (result == BEFS_BT_EMPTY) {
+		befs_debug(sb, "<--- befs_readdir() Empty directory");
+		return 0;
+	}
+
+	d_type = DT_UNKNOWN;
+
+	/* Convert to NLS */
+	if (BEFS_SB(sb)->nls) {
+		result =
+		    befs_utf2nls(sb, keybuf, keysize, &nlsname, &nlsnamelen);
+		if (result < 0) {
+			befs_debug(sb, "<--- befs_readdir() ERROR");
+			return result;
+		}
+		result = filldir(dirent, nlsname, nlsnamelen, filp->f_pos,
+				 (ino_t) value, d_type);
+		kfree(nlsname);
+
+	} else {
+		result = filldir(dirent, keybuf, keysize, filp->f_pos,
+				 (ino_t) value, d_type);
+	}
+
+	filp->f_pos++;
+
+	befs_debug(sb, "<--- befs_readdir() filp->f_pos %Ld", filp->f_pos);
+
+	return 0;
+}
+
+static struct inode *
+befs_alloc_inode(struct super_block *sb)
+{
+        struct befs_inode_info *bi;
+        bi = (struct befs_inode_info *)kmem_cache_alloc(befs_inode_cachep,
+							SLAB_KERNEL);
+        if (!bi)
+                return NULL;
+        return &bi->vfs_inode;
+}
+
+static void
+befs_destroy_inode(struct inode *inode)
+{
+        kmem_cache_free(befs_inode_cachep, BEFS_I(inode));
+}
+
+static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
+{
+        struct befs_inode_info *bi = (struct befs_inode_info *) foo;
+	
+	        if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
+		            SLAB_CTOR_CONSTRUCTOR) {
+			inode_init_once(&bi->vfs_inode);
+		}
+}
+
+static void
+befs_read_inode(struct inode *inode)
+{
+	struct buffer_head *bh = NULL;
+	befs_inode *raw_inode = NULL;
+
+	struct super_block *sb = inode->i_sb;
+	befs_sb_info *befs_sb = BEFS_SB(sb);
+	befs_inode_info *befs_ino = NULL;
+
+	befs_debug(sb, "---> befs_read_inode() " "inode = %lu", inode->i_ino);
+
+	befs_ino = BEFS_I(inode);
+
+	/* convert from vfs's inode number to befs's inode number */
+	befs_ino->i_inode_num = blockno2iaddr(sb, inode->i_ino);
+
+	befs_debug(sb, "  real inode number [%u, %hu, %hu]",
+		   befs_ino->i_inode_num.allocation_group,
+		   befs_ino->i_inode_num.start, befs_ino->i_inode_num.len);
+
+	bh = befs_bread_iaddr(sb, befs_ino->i_inode_num);
+	if (!bh) {
+		befs_error(sb, "unable to read inode block - "
+			   "inode = %lu", inode->i_ino);
+		goto unaquire_none;
+	}
+
+	raw_inode = (befs_inode *) bh->b_data;
+
+	befs_dump_inode(sb, raw_inode);
+
+	if (befs_check_inode(sb, raw_inode, inode->i_ino) != BEFS_OK) {
+		befs_error(sb, "Bad inode: %lu", inode->i_ino);
+		goto unaquire_bh;
+	}
+
+	inode->i_mode = (umode_t) fs32_to_cpu(sb, raw_inode->mode);
+
+	/*
+	 * set uid and gid.  But since current BeOS is single user OS, so
+	 * you can change by "uid" or "gid" options.
+	 */
+
+	inode->i_uid = befs_sb->mount_opts.use_uid ?
+	    befs_sb->mount_opts.uid : (uid_t) fs32_to_cpu(sb, raw_inode->uid);
+	inode->i_gid = befs_sb->mount_opts.use_gid ?
+	    befs_sb->mount_opts.gid : (gid_t) fs32_to_cpu(sb, raw_inode->gid);
+
+	inode->i_nlink = 1;
+
+	/*
+	 * BEFS's time is 64 bits, but current VFS is 32 bits...
+	 * BEFS don't have access time. Nor inode change time. VFS
+	 * doesn't have creation time.
+	 */
+
+	inode->i_mtime =
+	    (time_t) (fs64_to_cpu(sb, raw_inode->last_modified_time) >> 16);
+	inode->i_ctime = inode->i_mtime;
+	inode->i_atime = inode->i_mtime;
+	inode->i_blksize = befs_sb->block_size;
+
+	befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);
+	befs_ino->i_parent = fsrun_to_cpu(sb, raw_inode->parent);
+	befs_ino->i_attribute = fsrun_to_cpu(sb, raw_inode->attributes);
+	befs_ino->i_flags = fs32_to_cpu(sb, raw_inode->flags);
+
+	if (S_ISLNK(inode->i_mode) && !(inode->i_flags & BEFS_LONG_SYMLINK)) {
+		inode->i_size = 0;
+		inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE;
+		strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink,
+			BEFS_SYMLINK_LEN);
+	} else {
+		int num_blks;
+
+		befs_ino->i_data.ds =
+		    fsds_to_cpu(sb, raw_inode->data.datastream);
+
+		num_blks = befs_count_blocks(sb, &befs_ino->i_data.ds);
+		inode->i_blocks =
+		    num_blks * (befs_sb->block_size / VFS_BLOCK_SIZE);
+		inode->i_size = befs_ino->i_data.ds.size;
+	}
+
+	inode->i_mapping->a_ops = &befs_aops;
+
+	if (S_ISREG(inode->i_mode)) {
+		inode->i_fop = &befs_file_operations;
+	} else if (S_ISDIR(inode->i_mode)) {
+		inode->i_op = &befs_dir_inode_operations;
+		inode->i_fop = &befs_dir_operations;
+	} else if (S_ISLNK(inode->i_mode)) {
+		inode->i_op = &befs_symlink_inode_operations;
+	} else {
+		befs_error(sb, "Inode %lu is not a regular file, "
+			   "directory or symlink. THAT IS WRONG! BeFS has no "
+			   "on disk special files", inode->i_ino);
+		goto unaquire_bh;
+	}
+
+	brelse(bh);
+	befs_debug(sb, "<--- befs_read_inode()");
+	return;
+
+      unaquire_bh:
+	brelse(bh);
+
+      unaquire_none:
+	make_bad_inode(inode);
+	befs_debug(sb, "<--- befs_read_inode() - Bad inode");
+	return;
+}
+
+/* Initialize the inode cache. Called at fs setup.
+ * 
+ * Taken from NFS implementation by Al Viro.
+ */
+static int
+befs_init_inodecache(void)
+{
+	befs_inode_cachep = kmem_cache_create("befs_inode_cache",
+					      sizeof (struct befs_inode_info),
+					      0, SLAB_HWCACHE_ALIGN,
+					      init_once, NULL);
+	if (befs_inode_cachep == NULL) {
+		printk(KERN_ERR "befs_init_inodecache: "
+		       "Couldn't initalize inode slabcache\n");
+		return -ENOMEM;
+	}
+
+	return 0;
+}
+
+/* Called at fs teardown.
+ * 
+ * Taken from NFS implementation by Al Viro.
+ */
+static void
+befs_destroy_inodecache(void)
+{
+	if (kmem_cache_destroy(befs_inode_cachep))
+		printk(KERN_ERR "befs_destroy_inodecache: "
+		       "not all structures were freed\n");
+}
+
+/*
+ * The inode of symbolic link is different to data stream.
+ * The data stream become link name. Unless the LONG_SYMLINK
+ * flag is set.
+ */
+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) {
+		befs_data_stream *data = &befs_ino->i_data.ds;
+		befs_off_t linklen = 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) {
+			kfree(link);
+			befs_error(sb, "Failed to read entire long symlink");
+			return -EIO;
+		}
+
+		res = vfs_follow_link(nd, link);
+
+		kfree(link);
+	} else {
+		link = befs_ino->i_data.symlink;
+		res = vfs_follow_link(nd, link);
+	}
+
+	return res;
+}
+
+static int
+befs_readlink(struct dentry *dentry, char *buffer, int buflen)
+{
+	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);
+	}
+
+	return res;
+}
+
+/*
+ * UTF-8 to NLS charset  convert routine
+ *
+ * Changed 8/10/01 by Will Dyson. Now use uni2char() / char2uni() rather than
+ * the nls tables directly
+ */
+
+static int
+befs_utf2nls(struct super_block *sb, const char *in,
+	     int in_len, char **out, int *out_len)
+{
+	struct nls_table *nls = BEFS_SB(sb)->nls;
+	int i, o;
+	wchar_t uni;
+	int unilen, utflen;
+	char *result;
+	int maxlen = in_len; /* The utf8->nls conversion cant make more chars */
+
+	befs_debug(sb, "---> utf2nls()");
+
+	if (!nls) {
+		befs_error(sb, "befs_utf2nls called with no NLS table loaded");
+		return -EINVAL;
+	}
+
+	*out = result = kmalloc(maxlen, GFP_NOFS);
+	if (!*out) {
+		befs_error(sb, "befs_utf2nls() cannot allocate memory");
+		*out_len = 0;
+		return -ENOMEM;
+	}
+
+	for (i = o = 0; i < in_len; i += utflen, o += unilen) {
+
+		/* convert from UTF-8 to Unicode */
+		utflen = utf8_mbtowc(&uni, &in[i], in_len - i);
+		if (utflen < 0) {
+			goto conv_err;
+		}
+
+		/* convert from Unicode to nls */
+		unilen = nls->uni2char(uni, &result[o], 1);
+		if (unilen < 0) {
+			goto conv_err;
+		}
+	}
+	result[o] = '\0';
+
+	befs_debug(sb, "<--- utf2nls()");
+
+	return o;
+	*out_len = o;
+
+      conv_err:
+	befs_error(sb, "Name using charecter set %s contains a charecter that "
+		   "cannot be converted to unicode.", nls->charset);
+	befs_debug(sb, "<--- utf2nls()");
+	kfree(result);
+	return -EILSEQ;
+}
+
+/**
+ * befs_nls2utf - Convert NLS string to utf8 encodeing
+ * @sb: Superblock
+ * @src: Input string buffer in NLS format
+ * @srclen: Length of input string in bytes
+ * @dest: The output string in UTF8 format
+ * @destlen: Length of the output buffer
+ * 
+ * Converts input string @src, which is in the format of the loaded NLS map,
+ * into a utf8 string.
+ * 
+ * The destination string @dest is allocated by this function and the caller is
+ * responsible for freeing it with kfree()
+ * 
+ * On return, *@destlen is the length of @dest in bytes.
+ *
+ * On success, the return value is the number of utf8 charecters written to
+ * the ouput buffer @dest.
+ *  
+ * On Failure, a negative number coresponding to the error code is returned.
+ */
+
+static int
+befs_nls2utf(struct super_block *sb, const char *in,
+	     int in_len, char **out, int *out_len)
+{
+	struct nls_table *nls = BEFS_SB(sb)->nls;
+	int i, o;
+	wchar_t uni;
+	int unilen, utflen;
+	char *result;
+	int maxlen = 3 * in_len;
+
+	befs_debug(sb, "---> nls2utf()\n");
+
+	if (!nls) {
+		befs_error(sb, "befs_nls2utf called with no NLS table loaded.");
+		return -EINVAL;
+	}
+
+	*out = result = kmalloc(maxlen, GFP_NOFS);
+	if (!*out) {
+		befs_error(sb, "befs_nls2utf() cannot allocate memory");
+		*out_len = 0;
+		return -ENOMEM;
+	}
+
+	for (i = o = 0; i < in_len; i += unilen, o += utflen) {
+
+		/* convert from nls to unicode */
+		unilen = nls->char2uni(&in[i], in_len - i, &uni);
+		if (unilen < 0) {
+			goto conv_err;
+		}
+
+		/* convert from unicode to UTF-8 */
+		utflen = utf8_wctomb(&result[o], uni, 3);
+		if (utflen <= 0) {
+			goto conv_err;
+		}
+	}
+
+	result[o] = '\0';
+	*out_len = o;
+
+	befs_debug(sb, "<--- nls2utf()");
+
+	return i;
+
+      conv_err:
+	befs_error(sb, "Name using charecter set %s contains a charecter that "
+		   "cannot be converted to unicode.", nls->charset);
+	befs_debug(sb, "<--- nls2utf()");
+	kfree(result);
+	return -EILSEQ;
+}
+
+static int
+parse_options(char *options, befs_mount_options * opts)
+{
+	char *this_char;
+	char *value;
+	int ret = 1;
+
+	/* Initialize options */
+	opts->uid = 0;
+	opts->gid = 0;
+	opts->use_uid = 0;
+	opts->use_gid = 0;
+	opts->iocharset = NULL;
+	opts->debug = 0;
+
+	if (!options)
+		return ret;
+
+	while ((this_char = strsep(&options, ",")) != NULL) {
+
+		if ((value = strchr(this_char, '=')) != NULL)
+			*value++ = 0;
+
+		if (!strcmp(this_char, "uid")) {
+			if (!value || !*value) {
+				ret = 0;
+			} else {
+				opts->uid = simple_strtoul(value, &value, 0);
+				opts->use_uid = 1;
+				if (*value) {
+					printk(KERN_ERR "BEFS: Invalid uid "
+					       "option: %s\n", value);
+					ret = 0;
+				}
+			}
+		} else if (!strcmp(this_char, "gid")) {
+			if (!value || !*value)
+				ret = 0;
+			else {
+				opts->gid = simple_strtoul(value, &value, 0);
+				opts->use_gid = 1;
+				if (*value) {
+					printk(KERN_ERR
+					       "BEFS: Invalid gid option: "
+					       "%s\n", value);
+					ret = 0;
+				}
+			}
+		} else if (!strcmp(this_char, "iocharset") && value) {
+			char *p = value;
+			int len;
+
+			while (*value && *value != ',')
+				value++;
+			len = value - p;
+			if (len) {
+				char *buffer = kmalloc(len + 1, GFP_NOFS);
+				if (buffer) {
+					opts->iocharset = buffer;
+					memcpy(buffer, p, len);
+					buffer[len] = 0;
+
+				} else {
+					printk(KERN_ERR "BEFS: "
+					       "cannot allocate memory\n");
+					ret = 0;
+				}
+			}
+		} else if (!strcmp(this_char, "debug")) {
+			opts->debug = 1;
+		}
+	}
+
+	return ret;
+}
+
+/* This function has the responsibiltiy of getting the
+ * filesystem ready for unmounting. 
+ * Basicly, we free everything that we allocated in
+ * befs_read_inode
+ */
+static void
+befs_put_super(struct super_block *sb)
+{
+	if (BEFS_SB(sb)->mount_opts.iocharset) {
+		kfree(BEFS_SB(sb)->mount_opts.iocharset);
+		BEFS_SB(sb)->mount_opts.iocharset = NULL;
+	}
+
+	if (BEFS_SB(sb)->nls) {
+		unload_nls(BEFS_SB(sb)->nls);
+		BEFS_SB(sb)->nls = NULL;
+	}
+
+	if (sb->s_fs_info) {
+		kfree(sb->s_fs_info);
+		sb->s_fs_info = NULL;
+	}
+	return;
+}
+
+/* Allocate private field of the superblock, fill it.
+ *
+ * Finish filling the public superblock fields
+ * Make the root directory
+ * Load a set of NLS translations if needed.
+ */
+static int
+befs_fill_super(struct super_block *sb, void *data, int silent)
+{
+	struct buffer_head *bh;
+	befs_sb_info *befs_sb;
+	befs_super_block *disk_sb;
+
+	const unsigned long sb_block = 0;
+	const off_t x86_sb_off = 512;
+
+	sb->s_fs_info = kmalloc(sizeof (*befs_sb), GFP_KERNEL);
+	if (sb->s_fs_info == NULL) {
+		printk(KERN_ERR
+		       "BeFS(%s): Unable to allocate memory for private "
+		       "portion of superblock. Bailing.\n", sb->s_id);
+		goto unaquire_none;
+	}
+	befs_sb = BEFS_SB(sb);
+	memset(befs_sb, 0, sizeof(befs_sb_info));
+
+	if (!parse_options((char *) data, &befs_sb->mount_opts)) {
+		befs_error(sb, "cannot parse mount options");
+		goto unaquire_priv_sbp;
+	}
+
+	befs_debug(sb, "---> befs_fill_super()");
+
+#ifndef CONFIG_BEFS_RW
+	if (!(sb->s_flags & MS_RDONLY)) {
+		befs_warning(sb,
+			     "No write support. Marking filesystem read-only");
+		sb->s_flags |= MS_RDONLY;
+	}
+#endif				/* CONFIG_BEFS_RW */
+
+	/*
+	 * Set dummy blocksize to read super block.
+	 * Will be set to real fs blocksize later.
+	 *
+	 * Linux 2.4.10 and later refuse to read blocks smaller than
+	 * the hardsect size for the device. But we also need to read at 
+	 * least 1k to get the second 512 bytes of the volume.
+	 * -WD 10-26-01
+	 */ 
+	sb_min_blocksize(sb, 1024);
+
+	if (!(bh = sb_bread(sb, sb_block))) {
+		befs_error(sb, "unable to read superblock");
+		goto unaquire_priv_sbp;
+	}
+
+	/* account for offset of super block on x86 */
+	disk_sb = (befs_super_block *) bh->b_data;
+	if ((le32_to_cpu(disk_sb->magic1) == BEFS_SUPER_MAGIC1) ||
+	    (be32_to_cpu(disk_sb->magic1) == BEFS_SUPER_MAGIC1)) {
+		befs_debug(sb, "Using PPC superblock location");
+	} else {
+		befs_debug(sb, "Using x86 superblock location");
+		disk_sb =
+		    (befs_super_block *) ((void *) bh->b_data + x86_sb_off);
+	}
+
+	if (befs_load_sb(sb, disk_sb) != BEFS_OK)
+		goto unaquire_bh;
+
+	befs_dump_super_block(sb, disk_sb);
+
+	brelse(bh);
+
+	if (befs_check_sb(sb) != BEFS_OK)
+		goto unaquire_priv_sbp;
+
+	/*
+	 * set up enough so that it can read an inode
+	 * Fill in kernel superblock fields from private sb
+	 */
+	sb->s_magic = BEFS_SUPER_MAGIC;
+	/* Set real blocksize of fs */
+	sb_set_blocksize(sb, (ulong) befs_sb->block_size);
+	sb->s_op = (struct super_operations *) &befs_sops;
+	sb->s_root =
+	    d_alloc_root(iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir))));
+	if (!sb->s_root) {
+		befs_error(sb, "get root inode failed");
+		goto unaquire_priv_sbp;
+	}
+
+	/* load nls library */
+	if (befs_sb->mount_opts.iocharset) {
+		befs_debug(sb, "Loading nls: %s",
+			   befs_sb->mount_opts.iocharset);
+		befs_sb->nls = load_nls(befs_sb->mount_opts.iocharset);
+		if (!befs_sb->nls) {
+			befs_warning(sb, "Cannot load nls %s"
+				     "loding default nls",
+				     befs_sb->mount_opts.iocharset);
+			befs_sb->nls = load_nls_default();
+		}
+	}
+
+	return 0;
+/*****************/
+      unaquire_bh:
+	brelse(bh);
+
+      unaquire_priv_sbp:
+	kfree(sb->s_fs_info);
+
+      unaquire_none:
+	sb->s_fs_info = NULL;
+	return -EINVAL;
+}
+
+static int
+befs_remount(struct super_block *sb, int *flags, char *data)
+{
+	if (!(*flags & MS_RDONLY))
+		return -EINVAL;
+	return 0;
+}
+
+static int
+befs_statfs(struct super_block *sb, struct statfs *buf)
+{
+
+	befs_debug(sb, "---> befs_statfs()");
+
+	buf->f_type = BEFS_SUPER_MAGIC;
+	buf->f_bsize = sb->s_blocksize;
+	buf->f_blocks = BEFS_SB(sb)->num_blocks;
+	buf->f_bfree = BEFS_SB(sb)->num_blocks - BEFS_SB(sb)->used_blocks;
+	buf->f_bavail = buf->f_bfree;
+	buf->f_files = 0;	/* UNKNOWN */
+	buf->f_ffree = 0;	/* UNKNOWN */
+	buf->f_namelen = BEFS_NAME_LEN;
+
+	befs_debug(sb, "<--- befs_statfs()");
+
+	return 0;
+}
+
+static struct super_block *
+befs_get_sb(struct file_system_type *fs_type, int flags, char *dev_name,
+		void *data)
+{
+	return get_sb_bdev(fs_type, flags, dev_name, data, befs_fill_super);
+}
+
+static struct file_system_type befs_fs_type = {
+	.owner		= THIS_MODULE,
+	.name		= "befs",
+	.get_sb		= befs_get_sb,
+	.kill_sb	= kill_block_super,
+	.fs_flags	= FS_REQUIRES_DEV,	
+};
+
+static int __init
+init_befs_fs(void)
+{
+	int err;
+
+	printk(KERN_INFO "BeFS version: %s\n", BEFS_VERSION);
+
+	err = befs_init_inodecache();
+	if (err)
+		return err;
+
+	return register_filesystem(&befs_fs_type);
+}
+
+static void __exit
+exit_befs_fs(void)
+{
+	befs_destroy_inodecache();
+
+	unregister_filesystem(&befs_fs_type);
+}
+
+/*
+Macros that typecheck the init and exit functions,
+ensures that they are called at init and cleanup,
+and eliminates warnings about unused functions.
+*/
+module_init(init_befs_fs)
+module_exit(exit_befs_fs)
diff -Nru a/fs/befs/super.c b/fs/befs/super.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/super.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,112 @@
+/*
+ * super.c
+ *
+ * Copyright (C) 2001-2002 Will Dyson <will_dyson@pobox.com>
+ *
+ * Licensed under the GNU GPL. See the file COPYING for details.
+ *
+ */
+
+#include <linux/fs.h>
+
+#include "befs.h"
+#include "super.h"
+#include "endian.h"
+
+/**
+ * load_befs_sb -- Read from disk and properly byteswap all the fields
+ * of the befs superblock
+ *
+ *
+ *
+ *
+ */
+int
+befs_load_sb(struct super_block *sb, befs_super_block * disk_sb)
+{
+	befs_sb_info *befs_sb = BEFS_SB(sb);
+
+	/* Check the byte order of the filesystem */
+	if (le32_to_cpu(disk_sb->fs_byte_order) == BEFS_BYTEORDER_NATIVE)
+	    befs_sb->byte_order = BEFS_BYTESEX_LE;
+	else if (be32_to_cpu(disk_sb->fs_byte_order) == BEFS_BYTEORDER_NATIVE)
+	    befs_sb->byte_order = BEFS_BYTESEX_BE;	
+
+	befs_sb->magic1 = fs32_to_cpu(sb, disk_sb->magic1);
+	befs_sb->magic2 = fs32_to_cpu(sb, disk_sb->magic2);
+	befs_sb->magic3 = fs32_to_cpu(sb, disk_sb->magic3);
+	befs_sb->block_size = fs32_to_cpu(sb, disk_sb->block_size);
+	befs_sb->block_shift = fs32_to_cpu(sb, disk_sb->block_shift);
+	befs_sb->num_blocks = fs64_to_cpu(sb, disk_sb->num_blocks);
+	befs_sb->used_blocks = fs64_to_cpu(sb, disk_sb->used_blocks);
+	befs_sb->inode_size = fs32_to_cpu(sb, disk_sb->inode_size);
+
+	befs_sb->blocks_per_ag = fs32_to_cpu(sb, disk_sb->blocks_per_ag);
+	befs_sb->ag_shift = fs32_to_cpu(sb, disk_sb->ag_shift);
+	befs_sb->num_ags = fs32_to_cpu(sb, disk_sb->num_ags);
+
+	befs_sb->log_blocks = fsrun_to_cpu(sb, disk_sb->log_blocks);
+	befs_sb->log_start = fs64_to_cpu(sb, disk_sb->log_start);
+	befs_sb->log_end = fs64_to_cpu(sb, disk_sb->log_end);
+
+	befs_sb->root_dir = fsrun_to_cpu(sb, disk_sb->root_dir);
+	befs_sb->indices = fsrun_to_cpu(sb, disk_sb->indices);
+	befs_sb->nls = NULL;
+
+	return BEFS_OK;
+}
+
+int
+befs_check_sb(struct super_block *sb)
+{
+	befs_sb_info *befs_sb = BEFS_SB(sb);
+
+	/* Check magic headers of super block */
+	if ((befs_sb->magic1 != BEFS_SUPER_MAGIC1)
+	    || (befs_sb->magic2 != BEFS_SUPER_MAGIC2)
+	    || (befs_sb->magic3 != BEFS_SUPER_MAGIC3)) {
+		befs_error(sb, "invalid magic header");
+		return BEFS_ERR;
+	}
+
+	/*
+	 * Check blocksize of BEFS.
+	 *
+	 * Blocksize of BEFS is 1024, 2048, 4096 or 8192.
+	 */
+
+	if ((befs_sb->block_size != 1024)
+	    && (befs_sb->block_size != 2048)
+	    && (befs_sb->block_size != 4096)
+	    && (befs_sb->block_size != 8192)) {
+		befs_error(sb, "invalid blocksize: %u", befs_sb->block_size);
+		return BEFS_ERR;
+	}
+
+	if (befs_sb->block_size > PAGE_SIZE) {
+		befs_error(sb, "blocksize(%u) cannot be larger"
+			   "than system pagesize(%lu)", befs_sb->block_size,
+			   PAGE_SIZE);
+		return BEFS_ERR;
+	}
+
+	/*
+	   * block_shift and block_size encode the same information
+	   * in different ways as a consistency check.
+	 */
+
+	if ((1 << befs_sb->block_shift) != befs_sb->block_size) {
+		befs_error(sb, "block_shift disagrees with block_size. "
+			   "Corruption likely.");
+		return BEFS_ERR;
+	}
+
+	if (befs_sb->log_start != befs_sb->log_end) {
+		befs_error(sb, "Filesystem not clean! There are blocks in the "
+			   "journal. You must boot into BeOS and mount this volume "
+			   "to make it clean.");
+		return BEFS_ERR;
+	}
+
+	return BEFS_OK;
+}
diff -Nru a/fs/befs/super.h b/fs/befs/super.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/befs/super.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,8 @@
+/*
+ * super.h
+ */
+
+int befs_load_sb(struct super_block *sb, befs_super_block * disk_sb);
+
+int befs_check_sb(struct super_block *sb);
+
diff -Nru a/fs/bio.c b/fs/bio.c
--- a/fs/bio.c	Wed Oct 30 16:44:29 2002
+++ b/fs/bio.c	Wed Oct 30 16:44:29 2002
@@ -122,6 +122,7 @@
 	bio->bi_max_vecs = 0;
 	bio->bi_end_io = NULL;
 	atomic_set(&bio->bi_cnt, 1);
+	bio->bi_private = NULL;
 }
 
 /**
@@ -354,7 +355,7 @@
 	request_queue_t *q = bdev_get_queue(bdev);
 	int nr_pages;
 
-	nr_pages = q->max_sectors >> (PAGE_SHIFT - 9);
+	nr_pages = ((q->max_sectors << 9) + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	if (nr_pages > q->max_phys_segments)
 		nr_pages = q->max_phys_segments;
 	if (nr_pages > q->max_hw_segments)
@@ -385,13 +386,13 @@
 	 * cloned bio must not modify vec list
 	 */
 	if (unlikely(bio_flagged(bio, BIO_CLONED)))
-		return 1;
+		return 0;
 
 	if (bio->bi_vcnt >= bio->bi_max_vecs)
-		return 1;
+		return 0;
 
 	if (((bio->bi_size + len) >> 9) > q->max_sectors)
-		return 1;
+		return 0;
 
 	/*
 	 * we might loose a segment or two here, but rather that than
@@ -404,7 +405,7 @@
 
 	if (fail_segments) {
 		if (retried_segments)
-			return 1;
+			return 0;
 
 		bio->bi_flags &= ~(1 << BIO_SEG_VALID);
 		retried_segments = 1;
@@ -425,35 +426,167 @@
 	 * depending on offset), it can specify a merge_bvec_fn in the
 	 * queue to get further control
 	 */
-	if (q->merge_bvec_fn && q->merge_bvec_fn(q, bio, bvec)) {
-		bvec->bv_page = NULL;
-		bvec->bv_len = 0;
-		bvec->bv_offset = 0;
-		return 1;
+	if (q->merge_bvec_fn) {
+		/*
+		 * merge_bvec_fn() returns number of bytes it can accept
+		 * at this offset
+		 */
+		if (q->merge_bvec_fn(q, bio, bvec) < len) {
+			bvec->bv_page = NULL;
+			bvec->bv_len = 0;
+			bvec->bv_offset = 0;
+			return 0;
+		}
 	}
 
 	bio->bi_vcnt++;
 	bio->bi_phys_segments++;
 	bio->bi_hw_segments++;
 	bio->bi_size += len;
-	return 0;
+	return len;
 }
 
 /**
+ *	bio_map_user	-	map user address into bio
+ *	@bdev: destination block device
+ *	@uaddr: start of user address
+ *	@len: length in bytes
+ *	@write_to_vm: bool indicating writing to pages or not
+ *
+ *	Map the user space address into a bio suitable for io to a block
+ *	device. Caller should check the size of the returned bio, we might
+ *	not have mapped the entire range specified.
+ */
+struct bio *bio_map_user(struct block_device *bdev, unsigned long uaddr,
+			 unsigned int len, int write_to_vm)
+{
+	unsigned long end = (uaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
+	unsigned long start = uaddr >> PAGE_SHIFT;
+	const int nr_pages = end - start;
+	request_queue_t *q = bdev_get_queue(bdev);
+	int ret, offset, i;
+	struct page **pages;
+	struct bio *bio;
+
+	/*
+	 * transfer and buffer must be aligned to at least hardsector
+	 * size for now, in the future we can relax this restriction
+	 */
+	if ((uaddr & queue_dma_alignment(q)) || (len & queue_dma_alignment(q)))
+		return NULL;
+
+	bio = bio_alloc(GFP_KERNEL, nr_pages);
+	if (!bio)
+		return NULL;
+
+	pages = kmalloc(nr_pages * sizeof(struct page *), GFP_KERNEL);
+	if (!pages)
+		goto out;
+
+	down_read(&current->mm->mmap_sem);
+	ret = get_user_pages(current, current->mm, uaddr, nr_pages,
+						write_to_vm, 0, pages, NULL);
+	up_read(&current->mm->mmap_sem);
+
+	if (ret < nr_pages)
+		goto out;
+
+	bio->bi_bdev = bdev;
+
+	offset = uaddr & ~PAGE_MASK;
+	for (i = 0; i < nr_pages; i++) {
+		unsigned int bytes = PAGE_SIZE - offset;
+
+		if (len <= 0)
+			break;
+
+		if (bytes > len)
+			bytes = len;
+
+		/*
+		 * sorry...
+		 */
+		if (bio_add_page(bio, pages[i], bytes, offset) < bytes)
+			break;
+
+		len -= bytes;
+		offset = 0;
+	}
+
+	/*
+	 * release the pages we didn't map into the bio, if any
+	 */
+	while (i < nr_pages)
+		page_cache_release(pages[i++]);
+
+	kfree(pages);
+
+	/*
+	 * check if the mapped pages need bouncing for an isa host.
+	 */
+	blk_queue_bounce(q, &bio);
+	return bio;
+out:
+	kfree(pages);
+	bio_put(bio);
+	return NULL;
+}
+
+/**
+ *	bio_unmap_user	-	unmap a bio
+ *	@bio:		the bio being unmapped
+ *	@write_to_vm:	bool indicating whether pages were written to
+ *
+ *	Unmap a bio previously mapped by bio_map_user(). The @write_to_vm
+ *	must be the same as passed into bio_map_user(). Must be called with
+ *	a process context.
+ */
+void bio_unmap_user(struct bio *bio, int write_to_vm)
+{
+	struct bio_vec *bvec;
+	int i;
+
+	/*
+	 * find original bio if it was bounced
+	 */
+	if (bio->bi_private) {
+		/*
+		 * someone stole our bio, must not happen
+		 */
+		BUG_ON(!bio_flagged(bio, BIO_BOUNCED));
+	
+		bio = bio->bi_private;
+	}
+
+	/*
+	 * make sure we dirty pages we wrote to
+	 */
+	__bio_for_each_segment(bvec, bio, i, 0) {
+		if (write_to_vm)
+			set_page_dirty(bvec->bv_page);
+
+		page_cache_release(bvec->bv_page);
+	}
+
+	bio_put(bio);
+ }
+
+/**
  * bio_endio - end I/O on a bio
  * @bio:	bio
  * @bytes_done:	number of bytes completed
  * @error:	error, if any
  *
  * Description:
- *   bio_endio() will end I/O @bytes_done number of bytes. This may be just
- *   a partial part of the bio, or it may be the whole bio. bio_endio() is
- *   the preferred way to end I/O on a bio, it takes care of decrementing
+ *   bio_endio() will end I/O on @bytes_done number of bytes. This may be
+ *   just a partial part of the bio, or it may be the whole bio. bio_endio()
+ *   is the preferred way to end I/O on a bio, it takes care of decrementing
  *   bi_size and clearing BIO_UPTODATE on error. @error is 0 on success, and
  *   and one of the established -Exxxx (-EIO, for instance) error values in
- *   case something went wrong.
+ *   case something went wrong. Noone should call bi_end_io() directly on
+ *   a bio unless they own it and thus know that it has an end_io function.
  **/
-int bio_endio(struct bio *bio, unsigned int bytes_done, int error)
+void bio_endio(struct bio *bio, unsigned int bytes_done, int error)
 {
 	if (error)
 		clear_bit(BIO_UPTODATE, &bio->bi_flags);
@@ -465,7 +598,9 @@
 	}
 
 	bio->bi_size -= bytes_done;
-	return bio->bi_end_io(bio, bytes_done, error);
+
+	if (bio->bi_end_io)
+		bio->bi_end_io(bio, bytes_done, error);
 }
 
 static void __init biovec_init_pools(void)
@@ -537,7 +672,7 @@
 	return 0;
 }
 
-module_init(init_bio);
+subsys_initcall(init_bio);
 
 EXPORT_SYMBOL(bio_alloc);
 EXPORT_SYMBOL(bio_put);
@@ -550,3 +685,5 @@
 EXPORT_SYMBOL(bio_hw_segments);
 EXPORT_SYMBOL(bio_add_page);
 EXPORT_SYMBOL(bio_get_nr_vecs);
+EXPORT_SYMBOL(bio_map_user);
+EXPORT_SYMBOL(bio_unmap_user);
diff -Nru a/fs/block_dev.c b/fs/block_dev.c
--- a/fs/block_dev.c	Wed Oct 30 16:44:36 2002
+++ b/fs/block_dev.c	Wed Oct 30 16:44:36 2002
@@ -120,7 +120,7 @@
 {
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-	return generic_direct_IO(rw, inode, iov, offset,
+	return generic_direct_IO(rw, inode, inode->i_bdev, iov, offset,
 				nr_segs, blkdev_get_blocks);
 }
 
@@ -306,10 +306,9 @@
 
 			atomic_set(&new_bdev->bd_count,1);
 			new_bdev->bd_dev = dev;
-			new_bdev->bd_op = NULL;
-			new_bdev->bd_queue = NULL;
 			new_bdev->bd_contains = NULL;
 			new_bdev->bd_inode = inode;
+			new_bdev->bd_block_size = (1 << inode->i_blkbits);
 			new_bdev->bd_part_count = 0;
 			new_bdev->bd_invalidated = 0;
 			inode->i_mode = S_IFBLK;
@@ -434,10 +433,7 @@
 	spin_unlock(&bdev_lock);
 }
 
-static struct {
-	const char *name;
-	struct block_device_operations *bdops;
-} blkdevs[MAX_BLKDEV];
+static const char *blkdevs[MAX_BLKDEV];
 
 int get_blkdev_list(char * p)
 {
@@ -446,44 +442,20 @@
 
 	len = sprintf(p, "\nBlock devices:\n");
 	for (i = 0; i < MAX_BLKDEV ; i++) {
-		if (blkdevs[i].bdops) {
-			len += sprintf(p+len, "%3d %s\n", i, blkdevs[i].name);
-		}
+		if (blkdevs[i])
+			len += sprintf(p+len, "%3d %s\n", i, blkdevs[i]);
 	}
 	return len;
 }
 
-/*
-	Return the function table of a device.
-	Load the driver if needed.
-*/
-struct block_device_operations * get_blkfops(unsigned int major)
-{
-	struct block_device_operations *ret = NULL;
-
-	/* major 0 is used for non-device mounts */
-	if (major && major < MAX_BLKDEV) {
-#ifdef CONFIG_KMOD
-		if (!blkdevs[major].bdops) {
-			char name[20];
-			sprintf(name, "block-major-%d", major);
-			request_module(name);
-		}
-#endif
-		ret = blkdevs[major].bdops;
-	}
-	return ret;
-}
-
 int register_blkdev(unsigned int major, const char * name, struct block_device_operations *bdops)
 {
 	if (devfs_only())
 		return 0;
 	if (major == 0) {
 		for (major = MAX_BLKDEV-1; major > 0; major--) {
-			if (blkdevs[major].bdops == NULL) {
-				blkdevs[major].name = name;
-				blkdevs[major].bdops = bdops;
+			if (blkdevs[major] == NULL) {
+				blkdevs[major] = name;
 				return major;
 			}
 		}
@@ -491,10 +463,9 @@
 	}
 	if (major >= MAX_BLKDEV)
 		return -EINVAL;
-	if (blkdevs[major].bdops && blkdevs[major].bdops != bdops)
+	if (blkdevs[major])
 		return -EBUSY;
-	blkdevs[major].name = name;
-	blkdevs[major].bdops = bdops;
+	blkdevs[major] = name;
 	return 0;
 }
 
@@ -504,12 +475,11 @@
 		return 0;
 	if (major >= MAX_BLKDEV)
 		return -EINVAL;
-	if (!blkdevs[major].bdops)
+	if (!blkdevs[major])
 		return -EINVAL;
-	if (strcmp(blkdevs[major].name, name))
+	if (strcmp(blkdevs[major], name))
 		return -EINVAL;
-	blkdevs[major].name = NULL;
-	blkdevs[major].bdops = NULL;
+	blkdevs[major] = NULL;
 	return 0;
 }
 
@@ -524,7 +494,8 @@
  */
 int check_disk_change(struct block_device *bdev)
 {
-	struct block_device_operations * bdops = bdev->bd_op;
+	struct gendisk *disk = bdev->bd_disk;
+	struct block_device_operations * bdops = disk->fops;
 	kdev_t dev = to_kdev_t(bdev->bd_dev);
 
 	if (!bdops->media_changed)
@@ -587,125 +558,98 @@
 
 static int do_open(struct block_device *bdev, struct inode *inode, struct file *file)
 {
-	int ret = -ENXIO;
-	kdev_t dev = to_kdev_t(bdev->bd_dev);
 	struct module *owner = NULL;
-	struct block_device_operations *ops, *old;
 	struct gendisk *disk;
+	int ret = -ENXIO;
 	int part;
 
 	lock_kernel();
-	ops = get_blkfops(major(dev));
-	if (ops) {
-		owner = ops->owner;
-		if (owner)
-			__MOD_INC_USE_COUNT(owner);
-	}
 	disk = get_gendisk(bdev->bd_dev, &part);
 	if (!disk) {
-		if (owner)
-			__MOD_DEC_USE_COUNT(owner);
 		bdput(bdev);
 		return ret;
 	}
+	owner = disk->fops->owner;
 
 	down(&bdev->bd_sem);
-	old = bdev->bd_op;
-	if (!old) {
-		if (!ops)
-			goto out;
-		bdev->bd_op = ops;
-	} else {
-		if (owner)
-			__MOD_DEC_USE_COUNT(owner);
-	}
-	if (!bdev->bd_contains) {
+	if (!bdev->bd_openers) {
+		bdev->bd_disk = disk;
 		bdev->bd_contains = bdev;
-		if (part) {
+		if (!part) {
+			struct backing_dev_info *bdi;
+			if (disk->fops->open) {
+				ret = disk->fops->open(inode, file);
+				if (ret)
+					goto out_first;
+			}
+			bdev->bd_offset = 0;
+			if (!bdev->bd_openers) {
+				bd_set_size(bdev,(loff_t)get_capacity(disk)<<9);
+				bdi = blk_get_backing_dev_info(bdev);
+				if (bdi == NULL)
+					bdi = &default_backing_dev_info;
+				bdev->bd_inode->i_data.backing_dev_info = bdi;
+			}
+			if (bdev->bd_invalidated)
+				rescan_partitions(disk, bdev);
+		} else {
+			struct hd_struct *p;
 			struct block_device *whole;
 			whole = bdget(MKDEV(disk->major, disk->first_minor));
 			ret = -ENOMEM;
 			if (!whole)
-				goto out1;
+				goto out_first;
 			ret = blkdev_get(whole, file->f_mode, file->f_flags, BDEV_RAW);
 			if (ret)
-				goto out1;
+				goto out_first;
 			bdev->bd_contains = whole;
-		}
-	}
-	if (bdev->bd_contains == bdev) {
-		if (!bdev->bd_openers)
-			bdev->bd_disk = disk;
-		if (!bdev->bd_queue) {
-			if (disk->queue)
-				bdev->bd_queue = disk->queue;
-			else {
-				struct blk_dev_struct *p = blk_dev + major(dev);
-				bdev->bd_queue = &p->request_queue;
-				if (p->queue)
-					bdev->bd_queue =  p->queue(dev);
-			}
-		}
-		if (bdev->bd_op->open) {
-			ret = bdev->bd_op->open(inode, file);
-			if (ret)
-				goto out2;
-		}
-		if (!bdev->bd_openers) {
-			struct backing_dev_info *bdi;
-			bdev->bd_offset = 0;
-			bd_set_size(bdev, (loff_t)get_capacity(disk) << 9);
-			bdi = blk_get_backing_dev_info(bdev);
-			if (bdi == NULL)
-				bdi = &default_backing_dev_info;
-			bdev->bd_inode->i_data.backing_dev_info = bdi;
-		}
-		if (bdev->bd_invalidated)
-			rescan_partitions(disk, bdev);
-	} else {
-		down(&bdev->bd_contains->bd_sem);
-		bdev->bd_contains->bd_part_count++;
-		if (!bdev->bd_openers) {
-			struct hd_struct *p;
+			down(&whole->bd_sem);
+			whole->bd_part_count++;
 			p = disk->part + part - 1;
 			bdev->bd_inode->i_data.backing_dev_info =
-			   bdev->bd_contains->bd_inode->i_data.backing_dev_info;
+			   whole->bd_inode->i_data.backing_dev_info;
 			if (!(disk->flags & GENHD_FL_UP) || !p->nr_sects) {
-				bdev->bd_contains->bd_part_count--;
-				up(&bdev->bd_contains->bd_sem);
+				whole->bd_part_count--;
+				up(&whole->bd_sem);
 				ret = -ENXIO;
-				goto out2;
+				goto out_first;
 			}
-			bdev->bd_queue = bdev->bd_contains->bd_queue;
 			bdev->bd_offset = p->start_sect;
 			bd_set_size(bdev, (loff_t) p->nr_sects << 9);
-			bdev->bd_disk = disk;
+			up(&whole->bd_sem);
 		}
-		up(&bdev->bd_contains->bd_sem);
-	}
-	if (bdev->bd_openers++)
+	} else {
 		put_disk(disk);
+		if (owner)
+			__MOD_DEC_USE_COUNT(owner);
+		if (bdev->bd_contains == bdev) {
+			if (bdev->bd_disk->fops->open) {
+				ret = bdev->bd_disk->fops->open(inode, file);
+				if (ret)
+					goto out;
+			}
+			if (bdev->bd_invalidated)
+				rescan_partitions(bdev->bd_disk, bdev);
+		} else {
+			down(&bdev->bd_contains->bd_sem);
+			bdev->bd_contains->bd_part_count++;
+			up(&bdev->bd_contains->bd_sem);
+		}
+	}
+	bdev->bd_openers++;
 	up(&bdev->bd_sem);
 	unlock_kernel();
 	return 0;
 
-out2:
-	if (!bdev->bd_openers) {
-		bdev->bd_queue = NULL;
-		bdev->bd_disk = NULL;
-		bdev->bd_inode->i_data.backing_dev_info = &default_backing_dev_info;
-		if (bdev != bdev->bd_contains) {
-			blkdev_put(bdev->bd_contains, BDEV_RAW);
-			bdev->bd_contains = NULL;
-		}
-	}
-out1:
+out_first:
+	bdev->bd_disk = NULL;
+	bdev->bd_inode->i_data.backing_dev_info = &default_backing_dev_info;
+	if (bdev != bdev->bd_contains)
+		blkdev_put(bdev->bd_contains, BDEV_RAW);
+	bdev->bd_contains = NULL;
 	put_disk(disk);
-	if (!old) {
-		bdev->bd_op = NULL;
-		if (owner)
-			__MOD_DEC_USE_COUNT(owner);
-	}
+	if (owner)
+		__MOD_DEC_USE_COUNT(owner);
 out:
 	up(&bdev->bd_sem);
 	unlock_kernel();
@@ -748,12 +692,13 @@
 	bdev = inode->i_bdev;
 
 	return do_open(bdev, inode, filp);
-}	
+}
 
 int blkdev_put(struct block_device *bdev, int kind)
 {
 	int ret = 0;
 	struct inode *bd_inode = bdev->bd_inode;
+	struct gendisk *disk = bdev->bd_disk;
 
 	down(&bdev->bd_sem);
 	lock_kernel();
@@ -766,26 +711,24 @@
 	if (!--bdev->bd_openers)
 		kill_bdev(bdev);
 	if (bdev->bd_contains == bdev) {
-		if (bdev->bd_op->release)
-			ret = bdev->bd_op->release(bd_inode, NULL);
+		if (disk->fops->release)
+			ret = disk->fops->release(bd_inode, NULL);
 	} else {
 		down(&bdev->bd_contains->bd_sem);
 		bdev->bd_contains->bd_part_count--;
 		up(&bdev->bd_contains->bd_sem);
 	}
 	if (!bdev->bd_openers) {
-		struct gendisk *disk = bdev->bd_disk;
-		if (bdev->bd_op->owner)
-			__MOD_DEC_USE_COUNT(bdev->bd_op->owner);
-		bdev->bd_op = NULL;
-		bdev->bd_queue = NULL;
+		struct module *owner = disk->fops->owner;
+		put_disk(disk);
+		if (owner)
+			__MOD_DEC_USE_COUNT(owner);
 		bdev->bd_disk = NULL;
 		bdev->bd_inode->i_data.backing_dev_info = &default_backing_dev_info;
 		if (bdev != bdev->bd_contains) {
 			blkdev_put(bdev->bd_contains, BDEV_RAW);
-			bdev->bd_contains = NULL;
 		}
-		put_disk(disk);
+		bdev->bd_contains = NULL;
 	}
 	unlock_kernel();
 	up(&bdev->bd_sem);
@@ -844,7 +787,7 @@
 const char *__bdevname(kdev_t dev)
 {
 	static char buffer[32];
-	const char * name = blkdevs[major(dev)].name;
+	const char * name = blkdevs[major(dev)];
 
 	if (!name)
 		name = "unknown-block";
diff -Nru a/fs/buffer.c b/fs/buffer.c
--- a/fs/buffer.c	Wed Oct 30 16:44:29 2002
+++ b/fs/buffer.c	Wed Oct 30 16:44:29 2002
@@ -36,6 +36,7 @@
 #include <linux/suspend.h>
 #include <linux/buffer_head.h>
 #include <linux/bio.h>
+#include <linux/notifier.h>
 #include <asm/bitops.h>
 
 static void invalidate_bh_lrus(void);
@@ -1230,9 +1231,11 @@
 
 #define BH_LRU_SIZE	8
 
-static struct bh_lru {
+struct bh_lru {
 	struct buffer_head *bhs[BH_LRU_SIZE];
-} ____cacheline_aligned_in_smp bh_lrus[NR_CPUS];
+};
+
+static DEFINE_PER_CPU(struct bh_lru, bh_lrus) = {{0}};
 
 #ifdef CONFIG_SMP
 #define bh_lru_lock()	local_irq_disable()
@@ -1262,7 +1265,7 @@
 
 	check_irqs_on();
 	bh_lru_lock();
-	lru = &bh_lrus[smp_processor_id()];
+	lru = &per_cpu(bh_lrus, smp_processor_id());
 	if (lru->bhs[0] != bh) {
 		struct buffer_head *bhs[BH_LRU_SIZE];
 		int in;
@@ -1305,7 +1308,7 @@
 
 	check_irqs_on();
 	bh_lru_lock();
-	lru = &bh_lrus[smp_processor_id()];
+	lru = &per_cpu(bh_lrus, smp_processor_id());
 	for (i = 0; i < BH_LRU_SIZE; i++) {
 		struct buffer_head *bh = lru->bhs[i];
 
@@ -1378,11 +1381,12 @@
 static void invalidate_bh_lru(void *arg)
 {
 	const int cpu = get_cpu();
+	struct bh_lru *b = &per_cpu(bh_lrus, cpu);
 	int i;
 
 	for (i = 0; i < BH_LRU_SIZE; i++) {
-		brelse(bh_lrus[cpu].bhs[i]);
-		bh_lrus[cpu].bhs[i] = NULL;
+		brelse(b->bhs[i]);
+		b->bhs[i] = NULL;
 	}
 	put_cpu();
 }
@@ -1395,8 +1399,6 @@
 	preempt_enable();
 }
 
-
-
 void set_bh_page(struct buffer_head *bh,
 		struct page *page, unsigned long offset)
 {
@@ -2576,8 +2578,10 @@
 	if (__get_cpu_var(bh_accounting).ratelimit++ < 4096)
 		return;
 	__get_cpu_var(bh_accounting).ratelimit = 0;
-	for (i = 0; i < NR_CPUS; i++)
-		tot += per_cpu(bh_accounting, i).nr;
+	for (i = 0; i < NR_CPUS; i++) {
+		if (cpu_online(i))
+			tot += per_cpu(bh_accounting, i).nr;
+	}
 	buffer_heads_over_limit = (tot > max_buffer_heads);
 }
 	
@@ -2629,6 +2633,34 @@
 #define NR_RESERVED (10*MAX_BUF_PER_PAGE)
 #define MAX_UNUSED_BUFFERS NR_RESERVED+20
 
+static void buffer_init_cpu(int cpu)
+{
+	struct bh_accounting *bha = &per_cpu(bh_accounting, cpu);
+	struct bh_lru *bhl = &per_cpu(bh_lrus, cpu);
+
+	bha->nr = 0;
+	bha->ratelimit = 0;
+	memset(bhl, 0, sizeof(*bhl));
+}
+	
+static int __devinit buffer_cpu_notify(struct notifier_block *self, 
+				unsigned long action, void *hcpu)
+{
+	long cpu = (long)hcpu;
+	switch(action) {
+	case CPU_UP_PREPARE:
+		buffer_init_cpu(cpu);
+		break;
+	default:
+		break;
+	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block __devinitdata buffer_nb = {
+	.notifier_call	= buffer_cpu_notify,
+};
+
 void __init buffer_init(void)
 {
 	int i;
@@ -2647,4 +2679,7 @@
 	 */
 	nrpages = (nr_free_buffer_pages() * 10) / 100;
 	max_buffer_heads = nrpages * (PAGE_SIZE / sizeof(struct buffer_head));
+	buffer_cpu_notify(&buffer_nb, (unsigned long)CPU_UP_PREPARE,
+				(void *)(long)smp_processor_id());
+	register_cpu_notifier(&buffer_nb);
 }
diff -Nru a/fs/devfs/base.c b/fs/devfs/base.c
--- a/fs/devfs/base.c	Wed Oct 30 16:44:24 2002
+++ b/fs/devfs/base.c	Wed Oct 30 16:44:24 2002
@@ -1570,13 +1570,8 @@
     }
     if (ops == NULL)
     {
-	if ( S_ISBLK (mode) ) ops = (void *) get_blkfops (major);
-	if (ops == NULL)
-	{
-	    PRINTK ("(%s): NULL ops pointer\n", name);
-	    return NULL;
-	}
-	PRINTK ("(%s): NULL ops, got %p from major table\n", name, ops);
+	PRINTK ("(%s): NULL ops pointer\n", name);
+	return NULL;
     }
     if ( S_ISDIR (mode) )
     {
@@ -2378,29 +2373,21 @@
 
 static int check_disc_changed (struct devfs_entry *de)
 {
-    int tmp;
-    int retval = 0;
-    kdev_t dev = mk_kdev (de->u.fcb.u.device.major, de->u.fcb.u.device.minor);
-    struct block_device *bdev;
-    struct block_device_operations *bdops;
-    extern int warn_no_part;
-
-    if ( !S_ISBLK (de->mode) ) return 0;
-    bdev = bdget (kdev_t_to_nr (dev) );
-    if (!bdev) return 0;
-    bdops = devfs_get_ops (de);
-    if (!bdops) return 0;
-    bdev->bd_op = bdops;
-    /*  Ugly hack to disable messages about unable to read partition table  */
-    tmp = warn_no_part;
-    warn_no_part = 0;
-    retval = full_check_disk_change (bdev);
-    warn_no_part = tmp;
-    devfs_put_ops (de);
-    return retval;
+	int tmp;
+	int retval = 0;
+	dev_t dev = MKDEV(de->u.fcb.u.device.major, de->u.fcb.u.device.minor);
+	extern int warn_no_part;
+
+	if (!S_ISBLK(de->mode))
+		return 0;
+	/* Ugly hack to disable messages about unable to read partition table */
+	tmp = warn_no_part;
+	warn_no_part = 0;
+	retval = __check_disk_change(dev);
+	warn_no_part = tmp;
+	return retval;
 }   /*  End Function check_disc_changed  */
 
-
 /**
  *	scan_dir_for_removable - Scan a directory for removable media devices and check media.
  *	@dir: The directory.
@@ -2582,12 +2569,8 @@
     {
 	inode->i_rdev = mk_kdev (de->u.fcb.u.device.major,
 				 de->u.fcb.u.device.minor);
-	if (bd_acquire (inode) == 0)
-	{
-	    if (!inode->i_bdev->bd_op && de->u.fcb.ops)
-		inode->i_bdev->bd_op = de->u.fcb.ops;
-	}
-	else PRINTK ("(%d): no block device from bdget()\n",(int)inode->i_ino);
+	if (bd_acquire (inode) != 0)
+		PRINTK ("(%d): no block device from bdget()\n",(int)inode->i_ino);
 	is_fcb = TRUE;
     }
     else if ( S_ISFIFO (de->mode) ) inode->i_fop = &def_fifo_fops;
@@ -2706,7 +2689,6 @@
     if ( S_ISBLK (inode->i_mode) )
     {
 	file->f_op = &def_blk_fops;
-	if (ops) inode->i_bdev->bd_op = ops;
 	err = def_blk_fops.open (inode, file); /* Module refcount unchanged */
     }
     else
diff -Nru a/fs/direct-io.c b/fs/direct-io.c
--- a/fs/direct-io.c	Wed Oct 30 16:44:29 2002
+++ b/fs/direct-io.c	Wed Oct 30 16:44:29 2002
@@ -29,30 +29,67 @@
  */
 #define DIO_PAGES	64
 
+/*
+ * This code generally works in units of "dio_blocks".  A dio_block is
+ * somewhere between the hard sector size and the filesystem block size.  it
+ * is determined on a per-invokation basis.   When talking to the filesystem
+ * we need to convert dio_blocks to fs_blocks by scaling the dio_block quantity
+ * down by dio->blkfactor.  Similarly, fs-blocksize quantities are converted
+ * to bio_block quantities by shifting left by blkfactor.
+ *
+ * If blkfactor is zero then the user's request was aligned to the filesystem's
+ * blocksize.
+ */
+
 struct dio {
 	/* BIO submission state */
 	struct bio *bio;		/* bio under assembly */
 	struct inode *inode;
 	int rw;
 	unsigned blkbits;		/* doesn't change */
-	sector_t block_in_file;		/* changes */
+	unsigned blkfactor;		/* When we're using an aligment which
+					   is finer than the filesystem's soft
+					   blocksize, this specifies how much
+					   finer.  blkfactor=2 means 1/4-block
+					   alignment.  Does not change */
+	unsigned start_zero_done;	/* flag: sub-blocksize zeroing has
+					   been performed at the start of a
+					   write */
+	int pages_in_io;		/* approximate total IO pages */
+	sector_t block_in_file;		/* Current offset into the underlying
+					   file in dio_block units. */
 	unsigned blocks_available;	/* At block_in_file.  changes */
 	sector_t final_block_in_request;/* doesn't change */
 	unsigned first_block_in_page;	/* doesn't change, Used only once */
 	int boundary;			/* prev block is at a boundary */
 	int reap_counter;		/* rate limit reaping */
 	get_blocks_t *get_blocks;	/* block mapping function */
-	sector_t last_block_in_bio;	/* current final block in bio */
-	sector_t next_block_in_bio;	/* next block to be added to bio */
+	sector_t final_block_in_bio;	/* current final block in bio + 1 */
+	sector_t next_block_for_io;	/* next block to be put under IO,
+					   in dio_blocks units */
 	struct buffer_head map_bh;	/* last get_blocks() result */
 
-	/* Page fetching state */
+	/*
+	 * Deferred addition of a page to the dio.  These variables are
+	 * private to dio_send_cur_page(), submit_page_section() and
+	 * dio_bio_add_page().
+	 */
+	struct page *cur_page;		/* The page */
+	unsigned cur_page_offset;	/* Offset into it, in bytes */
+	unsigned cur_page_len;		/* Nr of bytes at cur_page_offset */
+	sector_t cur_page_block;	/* Where it starts */
+
+	/*
+	 * Page fetching state. These variables belong to dio_refill_pages().
+	 */
 	int curr_page;			/* changes */
 	int total_pages;		/* doesn't change */
-	int pages_left;			/* approximate total IO pages */
 	unsigned long curr_user_address;/* changes */
 
-	/* Page queue */
+	/*
+	 * Page queue.  These variables belong to dio_refill_pages() and
+	 * dio_get_page().
+	 */
 	struct page *pages[DIO_PAGES];	/* page buffer */
 	unsigned head;			/* next page to process */
 	unsigned tail;			/* last valid page + 1 */
@@ -318,74 +355,41 @@
  *
  * In the case of filesystem holes: the fs may return an arbitrarily-large
  * hole by returning an appropriate value in b_size and by clearing
- * buffer_mapped().  This code _should_ handle that case correctly, but it has
- * only been tested against single-block holes (b_size == blocksize).
+ * buffer_mapped().  However the direct-io code will only process holes one
+ * block at a time - it will repeatedly call get_blocks() as it walks the hole.
  */
 static int get_more_blocks(struct dio *dio)
 {
 	int ret;
 	struct buffer_head *map_bh = &dio->map_bh;
-
-	if (dio->blocks_available)
-		return 0;
+	sector_t fs_startblk;	/* Into file, in filesystem-sized blocks */
+	unsigned long fs_count;	/* Number of filesystem-sized blocks */
+	unsigned long dio_count;/* Number of dio_block-sized blocks */
+	unsigned long blkmask;
 
 	/*
 	 * If there was a memory error and we've overwritten all the
 	 * mapped blocks then we can now return that memory error
 	 */
-	if (dio->page_errors) {
-		ret = dio->page_errors;
-		goto out;
-	}
-
-	map_bh->b_state = 0;
-	map_bh->b_size = 0;
-	BUG_ON(dio->block_in_file >= dio->final_block_in_request);
-	ret = (*dio->get_blocks)(dio->inode, dio->block_in_file,
-			dio->final_block_in_request - dio->block_in_file,
-			map_bh, dio->rw == WRITE);
-	if (ret)
-		goto out;
+	ret = dio->page_errors;
+	if (ret == 0) {
+		map_bh->b_state = 0;
+		map_bh->b_size = 0;
+		BUG_ON(dio->block_in_file >= dio->final_block_in_request);
+		fs_startblk = dio->block_in_file >> dio->blkfactor;
+		dio_count = dio->final_block_in_request - dio->block_in_file;
+		fs_count = dio_count >> dio->blkfactor;
+		blkmask = (1 << dio->blkfactor) - 1;
+		if (dio_count & blkmask)	
+			fs_count++;
 
-	if (buffer_mapped(map_bh)) {
-		BUG_ON(map_bh->b_size == 0);
-		BUG_ON((map_bh->b_size & ((1 << dio->blkbits) - 1)) != 0);
-
-		dio->blocks_available = map_bh->b_size >> dio->blkbits;
-
-		/* blockdevs do not set buffer_new */
-		if (buffer_new(map_bh)) {
-			sector_t block = map_bh->b_blocknr;
-			unsigned i;
-
-			for (i = 0; i < dio->blocks_available; i++)
-				unmap_underlying_metadata(map_bh->b_bdev,
-							block++);
-		}
-	} else {
-		BUG_ON(dio->rw != READ);
-		if (dio->bio)
-			dio_bio_submit(dio);
+		ret = (*dio->get_blocks)(dio->inode, fs_startblk, fs_count,
+				map_bh, dio->rw == WRITE);
 	}
-	dio->next_block_in_bio = map_bh->b_blocknr;
-out:
 	return ret;
 }
 
 /*
- * Check to see if we can continue to grow the BIO. If not, then send it.
- */
-static void dio_prep_bio(struct dio *dio)
-{
-	if (dio->bio == NULL)
-		return;
-
-	if (dio->boundary ||
-			dio->last_block_in_bio != dio->next_block_in_bio - 1)
-		dio_bio_submit(dio);
-}
-
-/*
  * There is no bio.  Make one now.
  */
 static int dio_new_bio(struct dio *dio, sector_t blkno)
@@ -397,7 +401,7 @@
 	if (ret)
 		goto out;
 	sector = blkno << (dio->blkbits - 9);
-	nr_pages = min(dio->pages_left, bio_get_nr_vecs(dio->map_bh.b_bdev));
+	nr_pages = min(dio->pages_in_io, bio_get_nr_vecs(dio->map_bh.b_bdev));
 	BUG_ON(nr_pages <= 0);
 	ret = dio_bio_alloc(dio, dio->map_bh.b_bdev, sector, nr_pages);
 	dio->boundary = 0;
@@ -405,37 +409,199 @@
 	return ret;
 }
 
+/*
+ * Attempt tp put the current chunk of 'cur_page' into the current BIO.  If
+ * that was successful then update final_block_in_bio and take a ref against
+ * the just-added page.
+ */
+static int dio_bio_add_page(struct dio *dio)
+{
+	int ret;
 
-static int
-dio_bio_add_page(struct dio *dio, struct page *page,
-		unsigned int bv_len, unsigned int bv_offset, sector_t blkno)
+	ret = bio_add_page(dio->bio, dio->cur_page,
+			dio->cur_page_len, dio->cur_page_offset);
+	if (ret == dio->cur_page_len) {
+		dio->pages_in_io--;
+		page_cache_get(dio->cur_page);
+		dio->final_block_in_bio = dio->cur_page_block +
+			(dio->cur_page_len >> dio->blkbits);
+		ret = 0;
+	}
+	return ret;
+}
+		
+/*
+ * Put cur_page under IO.  The section of cur_page which is described by
+ * cur_page_offset,cur_page_len is put into a BIO.  The section of cur_page
+ * starts on-disk at cur_page_block.
+ *
+ * We take a ref against the page here (on behalf of its presence in the bio).
+ *
+ * The caller of this function is responsible for removing cur_page from the
+ * dio, and for dropping the refcount which came from that presence.
+ */
+static int dio_send_cur_page(struct dio *dio)
 {
 	int ret = 0;
 
-	if (bv_len == 0) 
-		goto out;
+	if (dio->bio) {
+		/*
+		 * See whether this new request is contiguous with the old
+		 */
+		if (dio->final_block_in_bio != dio->cur_page_block)
+			dio_bio_submit(dio);
+		/*
+		 * Submit now if the underlying fs is about to perform a
+		 * metadata read
+		 */
+		if (dio->boundary)
+			dio_bio_submit(dio);
+	}
 
-	/* Take a ref against the page each time it is placed into a BIO */
-	page_cache_get(page);
-	if (bio_add_page(dio->bio, page, bv_len, bv_offset)) {
+	if (dio->bio == NULL) {
+		ret = dio_new_bio(dio, dio->cur_page_block);
+		if (ret)
+			goto out;
+	}
+
+	if (dio_bio_add_page(dio) != 0) {
 		dio_bio_submit(dio);
-		ret = dio_new_bio(dio, blkno);
+		ret = dio_new_bio(dio, dio->cur_page_block);
 		if (ret == 0) {
-			ret = bio_add_page(dio->bio, page, bv_len, bv_offset);
+			ret = dio_bio_add_page(dio);
 			BUG_ON(ret != 0);
-		} else {
-			/* The page didn't make it into a BIO */
-			page_cache_release(page);
 		}
 	}
-	dio->pages_left--;
 out:
 	return ret;
 }
 
+/*
+ * An autonomous function to put a chunk of a page under deferred IO.
+ *
+ * The caller doesn't actually know (or care) whether this piece of page is in
+ * a BIO, or is under IO or whatever.  We just take care of all possible 
+ * situations here.  The separation between the logic of do_direct_IO() and
+ * that of submit_page_section() is important for clarity.  Please don't break.
+ *
+ * The chunk of page starts on-disk at blocknr.
+ *
+ * We perform deferred IO, by recording the last-submitted page inside our
+ * private part of the dio structure.  If possible, we just expand the IO
+ * across that page here.
+ *
+ * If that doesn't work out then we put the old page into the bio and add this
+ * page to the dio instead.
+ */
+static int
+submit_page_section(struct dio *dio, struct page *page,
+		unsigned offset, unsigned len, sector_t blocknr)
+{
+	int ret = 0;
+
+	/*
+	 * Can we just grow the current page's presence in the dio?
+	 */
+	if (	(dio->cur_page == page) &&
+		(dio->cur_page_offset + dio->cur_page_len == offset) &&
+		(dio->cur_page_block +
+			(dio->cur_page_len >> dio->blkbits) == blocknr)) {
+		dio->cur_page_len += len;
+
+		/*
+		 * If dio->boundary then we want to schedule the IO now to
+		 * avoid metadata seeks.
+		 */
+		if (dio->boundary) {
+			ret = dio_send_cur_page(dio);
+			page_cache_release(dio->cur_page);
+			dio->cur_page = NULL;
+		}
+		goto out;
+	}
+
+	/*
+	 * If there's a deferred page already there then send it.
+	 */
+	if (dio->cur_page) {
+		ret = dio_send_cur_page(dio);
+		page_cache_release(dio->cur_page);
+		dio->cur_page = NULL;
+		if (ret)
+			goto out;
+	}
+
+	page_cache_get(page);		/* It is in dio */
+	dio->cur_page = page;
+	dio->cur_page_offset = offset;
+	dio->cur_page_len = len;
+	dio->cur_page_block = blocknr;
+out:
+	return ret;
+}
+
+/*
+ * Clean any dirty buffers in the blockdev mapping which alias newly-created
+ * file blocks.  Only called for S_ISREG files - blockdevs do not set
+ * buffer_new
+ */
+static void clean_blockdev_aliases(struct dio *dio)
+{
+	unsigned i;
+
+	for (i = 0; i < dio->blocks_available; i++) {
+		unmap_underlying_metadata(dio->map_bh.b_bdev,
+					dio->map_bh.b_blocknr + i);
+	}
+}
+
+/*
+ * If we are not writing the entire block and get_block() allocated
+ * the block for us, we need to fill-in the unused portion of the
+ * block with zeros. This happens only if user-buffer, fileoffset or
+ * io length is not filesystem block-size multiple.
+ *
+ * `end' is zero if we're doing the start of the IO, 1 at the end of the
+ * IO.
+ */
+static void dio_zero_block(struct dio *dio, int end)
+{
+	unsigned dio_blocks_per_fs_block;
+	unsigned this_chunk_blocks;	/* In dio_blocks */
+	unsigned this_chunk_bytes;
+	struct page *page;
+
+	dio->start_zero_done = 1;
+	if (!dio->blkfactor || !buffer_new(&dio->map_bh))
+		return;
+
+	dio_blocks_per_fs_block = 1 << dio->blkfactor;
+	this_chunk_blocks = dio->block_in_file & (dio_blocks_per_fs_block - 1);
+
+	if (!this_chunk_blocks)
+		return;
+
+	/*
+	 * We need to zero out part of an fs block.  It is either at the
+	 * beginning or the end of the fs block.
+	 */
+	if (end) 
+		this_chunk_blocks = dio_blocks_per_fs_block - this_chunk_blocks;
+
+	this_chunk_bytes = this_chunk_blocks << dio->blkbits;
+
+	page = ZERO_PAGE(dio->cur_user_address);
+	if (submit_page_section(dio, page, 0, this_chunk_bytes, 
+				dio->next_block_for_io))
+		return;
+
+	dio->next_block_for_io += this_chunk_blocks;
+}
 
 /*
- * Walk the user pages, and the file, mapping blocks to disk and emitting BIOs.
+ * Walk the user pages, and the file, mapping blocks to disk and generating
+ * a sequence of (page,offset,len,block) mappings.  These mappings are injected
+ * into submit_page_section(), which takes care of the next stage of submission
  *
  * Direct IO against a blockdev is different from a file.  Because we can
  * happily perform page-sized but 512-byte aligned IOs.  It is important that
@@ -448,73 +614,101 @@
  * it should set b_size to PAGE_SIZE or more inside get_blocks().  This gives
  * fine alignment but still allows this function to work in PAGE_SIZE units.
  */
-int do_direct_IO(struct dio *dio)
+static int do_direct_IO(struct dio *dio)
 {
 	const unsigned blkbits = dio->blkbits;
 	const unsigned blocks_per_page = PAGE_SIZE >> blkbits;
 	struct page *page;
 	unsigned block_in_page;
+	struct buffer_head *map_bh = &dio->map_bh;
 	int ret = 0;
 
 	/* The I/O can start at any block offset within the first page */
 	block_in_page = dio->first_block_in_page;
 
 	while (dio->block_in_file < dio->final_block_in_request) {
-		int new_page;	/* Need to insert this page into the BIO? */
-		unsigned int bv_offset;
-		unsigned int bv_len;
-		sector_t curr_blkno;
-
 		page = dio_get_page(dio);
 		if (IS_ERR(page)) {
 			ret = PTR_ERR(page);
 			goto out;
 		}
 
-		new_page = 1;
-		bv_offset = 0;
-		bv_len = 0;
-		curr_blkno = 0;
 		while (block_in_page < blocks_per_page) {
+			unsigned offset_in_page = block_in_page << blkbits;
 			unsigned this_chunk_bytes;	/* # of bytes mapped */
 			unsigned this_chunk_blocks;	/* # of blocks */
 			unsigned u;
 
-			ret = get_more_blocks(dio);
-			if (ret)
-				goto fail_release;
-
+			if (dio->blocks_available == 0) {
+				/*
+				 * Need to go and map some more disk
+				 */
+				unsigned long blkmask;
+				unsigned long dio_remainder;
+
+				ret = get_more_blocks(dio);
+				if (ret) {
+					page_cache_release(page);
+					goto out;
+				}
+				if (!buffer_mapped(map_bh))
+					goto do_holes;
+
+				dio->blocks_available =
+						map_bh->b_size >> dio->blkbits;
+				dio->next_block_for_io =
+					map_bh->b_blocknr << dio->blkfactor;
+				if (buffer_new(map_bh))
+					clean_blockdev_aliases(dio);
+
+				if (!dio->blkfactor)
+					goto do_holes;
+
+				blkmask = (1 << dio->blkfactor) - 1;
+				dio_remainder = (dio->block_in_file & blkmask);
+
+				/*
+				 * If we are at the start of IO and that IO
+				 * starts partway into a fs-block,
+				 * dio_remainder will be non-zero.  If the IO
+				 * is a read then we can simply advance the IO
+				 * cursor to the first block which is to be
+				 * read.  But if the IO is a write and the
+				 * block was newly allocated we cannot do that;
+				 * the start of the fs block must be zeroed out
+				 * on-disk
+				 */
+				if (!buffer_new(map_bh))
+					dio->next_block_for_io += dio_remainder;
+				dio->blocks_available -= dio_remainder;
+			}
+do_holes:
 			/* Handle holes */
-			if (!buffer_mapped(&dio->map_bh)) {
+			if (!buffer_mapped(map_bh)) {
 				char *kaddr = kmap_atomic(page, KM_USER0);
 				memset(kaddr + (block_in_page << blkbits),
 						0, 1 << blkbits);
 				flush_dcache_page(page);
 				kunmap_atomic(kaddr, KM_USER0);
 				dio->block_in_file++;
-				dio->next_block_in_bio++;
 				block_in_page++;
 				goto next_block;
 			}
 
-			dio_prep_bio(dio);
-			if (dio->bio == NULL) {
-				ret = dio_new_bio(dio, dio->next_block_in_bio);
-				if (ret)
-					goto fail_release;
-				new_page = 1;
-			}
-
-			if (new_page) {
-				bv_len = 0;
-				bv_offset = block_in_page << blkbits;
-				curr_blkno = dio->next_block_in_bio;
-				new_page = 0;
-			}
-
-			/* Work out how much disk we can add to this page */
+			/*
+			 * If we're performing IO which has an alignment which
+			 * is finer than the underlying fs, go check to see if
+			 * we must zero out the start of this block.
+			 */
+			if (unlikely(dio->blkfactor && !dio->start_zero_done))
+				dio_zero_block(dio, 0);
+
+			/*
+			 * Work out, in this_chunk_blocks, how much disk we
+			 * can add to this page
+			 */
 			this_chunk_blocks = dio->blocks_available;
-			u = (PAGE_SIZE - (bv_len + bv_offset)) >> blkbits;
+			u = (PAGE_SIZE - offset_in_page) >> blkbits;
 			if (this_chunk_blocks > u)
 				this_chunk_blocks = u;
 			u = dio->final_block_in_request - dio->block_in_file;
@@ -523,10 +717,15 @@
 			this_chunk_bytes = this_chunk_blocks << blkbits;
 			BUG_ON(this_chunk_bytes == 0);
 
-			bv_len += this_chunk_bytes;
-			dio->next_block_in_bio += this_chunk_blocks;
-			dio->last_block_in_bio = dio->next_block_in_bio - 1;
-			dio->boundary = buffer_boundary(&dio->map_bh);
+			dio->boundary = buffer_boundary(map_bh);
+			ret = submit_page_section(dio, page, offset_in_page,
+				this_chunk_bytes, dio->next_block_for_io);
+			if (ret) {
+				page_cache_release(page);
+				goto out;
+			}
+			dio->next_block_for_io += this_chunk_blocks;
+
 			dio->block_in_file += this_chunk_blocks;
 			block_in_page += this_chunk_blocks;
 			dio->blocks_available -= this_chunk_blocks;
@@ -536,27 +735,20 @@
 			if (dio->block_in_file == dio->final_block_in_request)
 				break;
 		}
-		ret = dio_bio_add_page(dio, page, bv_len,
-					bv_offset, curr_blkno);
-		if (ret)
-			goto fail_release;
 
 		/* Drop the ref which was taken in get_user_pages() */
 		page_cache_release(page);
 		block_in_page = 0;
 	}
-	goto out;
-fail_release:
-	page_cache_release(page);
 out:
 	return ret;
 }
 
-int
+static int
 direct_io_worker(int rw, struct inode *inode, const struct iovec *iov, 
-	loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks)
+	loff_t offset, unsigned long nr_segs, unsigned blkbits,
+	get_blocks_t get_blocks)
 {
-	const unsigned blkbits = inode->i_blkbits;
 	unsigned long user_addr; 
 	int seg, ret2, ret = 0;
 	struct dio dio;
@@ -566,14 +758,18 @@
 	dio.inode = inode;
 	dio.rw = rw;
 	dio.blkbits = blkbits;
+	dio.blkfactor = inode->i_blkbits - blkbits;
+	dio.start_zero_done = 0;
 	dio.block_in_file = offset >> blkbits;
 	dio.blocks_available = 0;
 
+	dio.cur_page = NULL;
+
 	dio.boundary = 0;
 	dio.reap_counter = 0;
 	dio.get_blocks = get_blocks;
-	dio.last_block_in_bio = -1;
-	dio.next_block_in_bio = -1;
+	dio.final_block_in_bio = -1;
+	dio.next_block_for_io = -1;
 
 	dio.page_errors = 0;
 
@@ -582,10 +778,10 @@
 	spin_lock_init(&dio.bio_list_lock);
 	dio.bio_list = NULL;
 	dio.waiter = NULL;
-	dio.pages_left = 0;
+	dio.pages_in_io = 0;
 
 	for (seg = 0; seg < nr_segs; seg++) 
-		dio.pages_left += (iov[seg].iov_len / PAGE_SIZE) + 2; 
+		dio.pages_in_io += (iov[seg].iov_len >> blkbits) + 2; 
 
 	for (seg = 0; seg < nr_segs; seg++) {
 		user_addr = (unsigned long)iov[seg].iov_base;
@@ -619,6 +815,18 @@
 
 	} /* end iovec loop */
 
+	/*
+	 * There may be some unwritten disk at the end of a part-written
+	 * fs-block-sized block.  Go zero that now.
+	 */
+	dio_zero_block(&dio, 1);
+
+	if (dio.cur_page) {
+		ret2 = dio_send_cur_page(&dio);
+		page_cache_release(dio.cur_page);
+		if (ret == 0)
+			ret = ret2;
+	}
 	ret2 = dio_await_completion(&dio);
 	if (ret == 0)
 		ret = ret2;
@@ -634,27 +842,44 @@
  * This is a library function for use by filesystem drivers.
  */
 int
-generic_direct_IO(int rw, struct inode *inode, const struct iovec *iov, 
-	loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks)
+generic_direct_IO(int rw, struct inode *inode, struct block_device *bdev, 
+	const struct iovec *iov, loff_t offset, unsigned long nr_segs, 
+	get_blocks_t get_blocks)
 {
 	int seg;
 	size_t size;
 	unsigned long addr;
-	unsigned blocksize_mask = (1 << inode->i_blkbits) - 1;
+	unsigned blkbits = inode->i_blkbits;
+	unsigned bdev_blkbits = 0;
+	unsigned blocksize_mask = (1 << blkbits) - 1;
 	ssize_t retval = -EINVAL;
 
-	if (offset & blocksize_mask)
-		goto out;
+	if (bdev)
+		bdev_blkbits = blksize_bits(bdev_hardsect_size(bdev));
+
+	if (offset & blocksize_mask) {
+		if (bdev)
+			 blkbits = bdev_blkbits;
+		blocksize_mask = (1 << blkbits) - 1;
+		if (offset & blocksize_mask)
+			goto out;
+	}
 
 	/* Check the memory alignment.  Blocks cannot straddle pages */
 	for (seg = 0; seg < nr_segs; seg++) {
 		addr = (unsigned long)iov[seg].iov_base;
 		size = iov[seg].iov_len;
-		if ((addr & blocksize_mask) || (size & blocksize_mask)) 
-			goto out;	
+		if ((addr & blocksize_mask) || (size & blocksize_mask))  {
+			if (bdev)
+				 blkbits = bdev_blkbits;
+			blocksize_mask = (1 << blkbits) - 1;
+			if ((addr & blocksize_mask) || (size & blocksize_mask))  
+				goto out;
+		}
 	}
 
-	retval = direct_io_worker(rw, inode, iov, offset, nr_segs, get_blocks);
+	retval = direct_io_worker(rw, inode, iov, offset, 
+				nr_segs, blkbits, get_blocks);
 out:
 	return retval;
 }
@@ -675,7 +900,7 @@
 	}
 
 	retval = mapping->a_ops->direct_IO(rw, file, iov, offset, nr_segs);
-	if (mapping->nrpages)
+	if (rw == WRITE && mapping->nrpages)
 		invalidate_inode_pages2(mapping);
 out:
 	return retval;
diff -Nru a/fs/ext2/inode.c b/fs/ext2/inode.c
--- a/fs/ext2/inode.c	Wed Oct 30 16:44:20 2002
+++ b/fs/ext2/inode.c	Wed Oct 30 16:44:20 2002
@@ -624,7 +624,7 @@
 {
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-	return generic_direct_IO(rw, inode, iov,
+	return generic_direct_IO(rw, inode, inode->i_sb->s_bdev, iov,
 				offset, nr_segs, ext2_get_blocks);
 }
 
diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c
--- a/fs/ext3/inode.c	Wed Oct 30 16:44:29 2002
+++ b/fs/ext3/inode.c	Wed Oct 30 16:44:29 2002
@@ -1431,7 +1431,7 @@
 		}
 	}
 
-	ret = generic_direct_IO(rw, inode, iov, offset,
+	ret = generic_direct_IO(rw, inode, inode->i_sb->s_bdev, iov, offset,
 				nr_segs, ext3_direct_io_get_blocks);
 
 out_stop:
diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c
--- a/fs/ext3/super.c	Wed Oct 30 16:44:33 2002
+++ b/fs/ext3/super.c	Wed Oct 30 16:44:33 2002
@@ -986,6 +986,10 @@
 		goto out_fail;
 
 	blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
+	if (!blocksize) {
+		printk(KERN_ERR "EXT3-fs: unable to set blocksize\n");
+		goto out_fail;
+	}
 
 	/*
 	 * The ext3 superblock will not be buffer aligned for other than 1kB
diff -Nru a/fs/fat/Makefile b/fs/fat/Makefile
--- a/fs/fat/Makefile	Wed Oct 30 16:44:19 2002
+++ b/fs/fat/Makefile	Wed Oct 30 16:44:19 2002
@@ -6,6 +6,6 @@
 
 obj-$(CONFIG_FAT_FS) += fat.o
 
-fat-objs := buffer.o cache.o dir.o file.o inode.o misc.o cvf.o fatfs_syms.o
+fat-objs := cache.o dir.o file.o inode.o misc.o fatfs_syms.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/fs/fat/buffer.c b/fs/fat/buffer.c
--- a/fs/fat/buffer.c	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,97 +0,0 @@
-/*
- * linux/fs/fat/buffer.c
- *
- *
- */
-
-#include <linux/slab.h>
-#include <linux/fs.h>
-#include <linux/msdos_fs.h>
-#include <linux/fat_cvf.h>
-#include <linux/buffer_head.h>
-
-struct buffer_head *fat_bread(struct super_block *sb, int block)
-{
-	return MSDOS_SB(sb)->cvf_format->cvf_bread(sb,block);
-}
-struct buffer_head *fat_getblk(struct super_block *sb, int block)
-{
-	return MSDOS_SB(sb)->cvf_format->cvf_getblk(sb,block);
-}
-void fat_brelse (struct super_block *sb, struct buffer_head *bh)
-{
-	if (bh) 
-		MSDOS_SB(sb)->cvf_format->cvf_brelse(sb,bh);
-}
-void fat_mark_buffer_dirty (
-	struct super_block *sb,
-	struct buffer_head *bh)
-{
-	MSDOS_SB(sb)->cvf_format->cvf_mark_buffer_dirty(sb,bh);
-}
-void fat_set_uptodate (
-	struct super_block *sb,
-	struct buffer_head *bh,
-	int val)
-{
-	MSDOS_SB(sb)->cvf_format->cvf_set_uptodate(sb,bh,val);
-}
-int fat_is_uptodate(struct super_block *sb, struct buffer_head *bh)
-{
-	return MSDOS_SB(sb)->cvf_format->cvf_is_uptodate(sb,bh);
-}
-void fat_ll_rw_block (
-	struct super_block *sb,
-	int opr,
-	int nbreq,
-	struct buffer_head *bh[32])
-{
-	MSDOS_SB(sb)->cvf_format->cvf_ll_rw_block(sb,opr,nbreq,bh);
-}
-
-struct buffer_head *default_fat_bread(struct super_block *sb, int block)
-{
-	return sb_bread(sb, block);
-}
-
-struct buffer_head *default_fat_getblk(struct super_block *sb, int block)
-{
-	return sb_getblk(sb, block);
-}
-
-void default_fat_brelse(struct super_block *sb, struct buffer_head *bh)
-{
-	brelse (bh);
-}
-
-void default_fat_mark_buffer_dirty (
-	struct super_block *sb,
-	struct buffer_head *bh)
-{
-	mark_buffer_dirty (bh);
-}
-
-void default_fat_set_uptodate (
-	struct super_block *sb,
-	struct buffer_head *bh,
-	int val)
-{
-	if (val)
-		set_buffer_uptodate(bh);
-	else
-		clear_buffer_uptodate(bh);
-}
-
-int default_fat_is_uptodate (struct super_block *sb, struct buffer_head *bh)
-{
-	return buffer_uptodate(bh);
-}
-
-void default_fat_ll_rw_block (
-	struct super_block *sb,
-	int opr,
-	int nbreq,
-	struct buffer_head *bh[32])
-{
-	ll_rw_block(opr,nbreq,bh);
-}
diff -Nru a/fs/fat/cache.c b/fs/fat/cache.c
--- a/fs/fat/cache.c	Wed Oct 30 16:44:32 2002
+++ b/fs/fat/cache.c	Wed Oct 30 16:44:32 2002
@@ -10,31 +10,11 @@
 
 #include <linux/fs.h>
 #include <linux/msdos_fs.h>
-#include <linux/fat_cvf.h>
 #include <linux/buffer_head.h>
 
-#if 0
-#  define PRINTK(x) printk x
-#else
-#  define PRINTK(x)
-#endif
-
 static struct fat_cache *fat_cache,cache[FAT_CACHE];
 static spinlock_t fat_cache_lock = SPIN_LOCK_UNLOCKED;
 
-/* Returns the this'th FAT entry, -1 if it is an end-of-file entry. If
-   new_value is != -1, that FAT entry is replaced by it. */
-
-int fat_access(struct super_block *sb,int nr,int new_value)
-{
-	return MSDOS_SB(sb)->cvf_format->fat_access(sb,nr,new_value);
-}
-
-int fat_bmap(struct inode *inode,int sector)
-{
-	return MSDOS_SB(inode->i_sb)->cvf_format->cvf_bmap(inode,sector);
-}
-
 int __fat_access(struct super_block *sb, int nr, int new_value)
 {
 	struct msdos_sb_info *sbi = MSDOS_SB(sb);
@@ -51,17 +31,18 @@
 		last = first+1;
 	}
 	b = sbi->fat_start + (first >> sb->s_blocksize_bits);
-	if (!(bh = fat_bread(sb, b))) {
-		printk("FAT: bread(block %d) in fat_access failed\n", b);
+	if (!(bh = sb_bread(sb, b))) {
+		printk(KERN_ERR "FAT: bread(block %d) in"
+		       " fat_access failed\n", b);
 		return -EIO;
 	}
 	if ((first >> sb->s_blocksize_bits) == (last >> sb->s_blocksize_bits)) {
 		bh2 = bh;
 	} else {
-		if (!(bh2 = fat_bread(sb, b+1))) {
-			fat_brelse(sb, bh);
-			printk("FAT: bread(block %d) in fat_access failed\n",
-			       b + 1);
+		if (!(bh2 = sb_bread(sb, b + 1))) {
+			brelse(bh);
+			printk(KERN_ERR "FAT: bread(block %d) in"
+			       " fat_access failed\n", b + 1);
 			return -EIO;
 		}
 	}
@@ -99,35 +80,39 @@
 				*p_first = new_value & 0xff;
 				*p_last = (*p_last & 0xf0) | (new_value >> 8);
 			}
-			fat_mark_buffer_dirty(sb, bh2);
+			mark_buffer_dirty(bh2);
 		}
-		fat_mark_buffer_dirty(sb, bh);
+		mark_buffer_dirty(bh);
 		for (copy = 1; copy < sbi->fats; copy++) {
 			b = sbi->fat_start + (first >> sb->s_blocksize_bits)
 				+ sbi->fat_length * copy;
-			if (!(c_bh = fat_bread(sb, b)))
+			if (!(c_bh = sb_bread(sb, b)))
 				break;
 			if (bh != bh2) {
-				if (!(c_bh2 = fat_bread(sb, b+1))) {
-					fat_brelse(sb, c_bh);
+				if (!(c_bh2 = sb_bread(sb, b+1))) {
+					brelse(c_bh);
 					break;
 				}
 				memcpy(c_bh2->b_data, bh2->b_data, sb->s_blocksize);
-				fat_mark_buffer_dirty(sb, c_bh2);
-				fat_brelse(sb, c_bh2);
+				mark_buffer_dirty(c_bh2);
+				brelse(c_bh2);
 			}
 			memcpy(c_bh->b_data, bh->b_data, sb->s_blocksize);
-			fat_mark_buffer_dirty(sb, c_bh);
-			fat_brelse(sb, c_bh);
+			mark_buffer_dirty(c_bh);
+			brelse(c_bh);
 		}
 	}
-	fat_brelse(sb, bh);
+	brelse(bh);
 	if (bh != bh2)
-		fat_brelse(sb, bh2);
+		brelse(bh2);
 	return next;
 }
 
-int default_fat_access(struct super_block *sb, int nr, int new_value)
+/* 
+ * Returns the this'th FAT entry, -1 if it is an end-of-file entry. If
+ * new_value is != -1, that FAT entry is replaced by it.
+ */
+int fat_access(struct super_block *sb, int nr, int new_value)
 {
 	int next;
 
@@ -150,7 +135,7 @@
 
 void fat_cache_init(void)
 {
-	static int initialized = 0;
+	static int initialized;
 	int count;
 
 	spin_lock(&fat_cache_lock);
@@ -227,8 +212,8 @@
 		    && walk->start_cluster == first
 		    && walk->file_cluster == f_clu) {
 			if (walk->disk_cluster != d_clu) {
-				printk("FAT: cache corruption inode=%lu\n",
-					inode->i_ino);
+				printk(KERN_ERR "FAT: cache corruption"
+				       " (ino %lu)\n", inode->i_ino);
 				spin_unlock(&fat_cache_lock);
 				fat_cache_inval_inode(inode);
 				return;
@@ -317,7 +302,7 @@
 	return nr;
 }
 
-int default_fat_bmap(struct inode *inode,int sector)
+int fat_bmap(struct inode *inode, int sector)
 {
 	struct super_block *sb = inode->i_sb;
 	struct msdos_sb_info *sbi = MSDOS_SB(sb);
diff -Nru a/fs/fat/cvf.c b/fs/fat/cvf.c
--- a/fs/fat/cvf.c	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,176 +0,0 @@
-/* 
- * CVF extensions for fat-based filesystems
- *
- * written 1997,1998 by Frank Gockel <gockel@sent13.uni-duisburg.de>
- *
- * please do not remove the next line, dmsdos needs it for verifying patches
- * CVF-FAT-VERSION-ID: 1.2.0
- *
- */
- 
-#include <linux/fs.h>
-#include <linux/msdos_fs.h>
-#include <linux/msdos_fs_sb.h>
-#include <linux/fat_cvf.h>
-#include <linux/config.h>
-#include <linux/buffer_head.h>
-#ifdef CONFIG_KMOD
-#include <linux/kmod.h>
-#endif
-
-#define MAX_CVF_FORMATS 3
-
-struct buffer_head *default_fat_bread(struct super_block *,int);
-struct buffer_head *default_fat_getblk(struct super_block *, int);
-void default_fat_brelse(struct super_block *, struct buffer_head *);
-void default_fat_mark_buffer_dirty (struct super_block *, struct buffer_head *);
-void default_fat_set_uptodate (struct super_block *, struct buffer_head *,int);
-int default_fat_is_uptodate(struct super_block *, struct buffer_head *);
-int default_fat_access(struct super_block *sb,int nr,int new_value);
-void default_fat_ll_rw_block (struct super_block *sb, int opr, int nbreq,
-			      struct buffer_head *bh[32]);
-int default_fat_bmap(struct inode *inode,int block);
-ssize_t default_fat_file_write(struct file *filp, const char *buf,
-			       size_t count, loff_t *ppos);
-
-struct cvf_format default_cvf = {
-	cvf_version: 		0,	/* version - who cares? */	
-	cvf_version_text: 	"plain",
-	flags:			0,	/* flags - who cares? */
-	cvf_bread:		default_fat_bread,
-	cvf_getblk:		default_fat_getblk,
-	cvf_brelse:		default_fat_brelse,
-	cvf_mark_buffer_dirty:	default_fat_mark_buffer_dirty,
-	cvf_set_uptodate:	default_fat_set_uptodate,
-	cvf_is_uptodate:	default_fat_is_uptodate,
-	cvf_ll_rw_block:	default_fat_ll_rw_block,
-	fat_access:		default_fat_access,
-	cvf_bmap:		default_fat_bmap,
-	cvf_file_read:		generic_file_read,
-	cvf_file_write:		default_fat_file_write,
-};
-
-struct cvf_format *cvf_formats[MAX_CVF_FORMATS];
-int cvf_format_use_count[MAX_CVF_FORMATS];
-
-int register_cvf_format(struct cvf_format*cvf_format)
-{ int i,j;
-
-  for(i=0;i<MAX_CVF_FORMATS;++i)
-  { if(cvf_formats[i]==NULL)
-    { /* free slot found, now check version */
-      for(j=0;j<MAX_CVF_FORMATS;++j)
-      { if(cvf_formats[j])
-        { if(cvf_formats[j]->cvf_version==cvf_format->cvf_version)
-          { printk("register_cvf_format: version %d already registered\n",
-                   cvf_format->cvf_version);
-            return -1;
-          }
-        }
-      }
-      cvf_formats[i]=cvf_format;
-      cvf_format_use_count[i]=0;
-      printk("CVF format %s (version id %d) successfully registered.\n",
-             cvf_format->cvf_version_text,cvf_format->cvf_version);
-      return 0;
-    }
-  }
-  
-  printk("register_cvf_format: too many formats\n");
-  return -1;
-}
-
-int unregister_cvf_format(struct cvf_format*cvf_format)
-{ int i;
-
-  for(i=0;i<MAX_CVF_FORMATS;++i)
-  { if(cvf_formats[i])
-    { if(cvf_formats[i]->cvf_version==cvf_format->cvf_version)
-      { if(cvf_format_use_count[i])
-        { printk("unregister_cvf_format: format %d in use, cannot remove!\n",
-          cvf_formats[i]->cvf_version);
-          return -1;
-        }
-      
-        printk("CVF format %s (version id %d) successfully unregistered.\n",
-        cvf_formats[i]->cvf_version_text,cvf_formats[i]->cvf_version);
-        cvf_formats[i]=NULL;
-        return 0;
-      }
-    }
-  }
-  
-  printk("unregister_cvf_format: format %d is not registered\n",
-         cvf_format->cvf_version);
-  return -1;
-}
-
-void dec_cvf_format_use_count_by_version(int version)
-{ int i;
-
-  for(i=0;i<MAX_CVF_FORMATS;++i)
-  { if(cvf_formats[i])
-    { if(cvf_formats[i]->cvf_version==version)
-      { --cvf_format_use_count[i];
-        if(cvf_format_use_count[i]<0)
-        { cvf_format_use_count[i]=0;
-          printk(KERN_EMERG "FAT FS/CVF: This is a bug in cvf_version_use_count\n");
-        }
-        return;
-      }
-    }
-  }
-  
-  printk("dec_cvf_format_use_count_by_version: version %d not found ???\n",
-         version);
-}
-
-int detect_cvf(struct super_block*sb,char*force)
-{ int i;
-  int found=0;
-  int found_i=-1;
-
-  if(force)
-    if(strcmp(force,"autoload")==0)
-    {
-#ifdef CONFIG_KMOD
-      request_module("cvf_autoload");
-      force=NULL;
-#else
-      printk("cannot autoload CVF modules: kmod support is not compiled into kernel\n");
-      return -1;
-#endif
-    }
-    
-#ifdef CONFIG_KMOD
-  if(force)
-    if(*force)
-      request_module(force);
-#endif
-
-  if(force)
-  { if(*force)
-    { for(i=0;i<MAX_CVF_FORMATS;++i)
-      { if(cvf_formats[i])
-        { if(!strcmp(cvf_formats[i]->cvf_version_text,force))
-            return i;
-        }
-      }
-      printk("CVF format %s unknown (module not loaded?)\n",force);
-      return -1;
-    }
-  }
-
-  for(i=0;i<MAX_CVF_FORMATS;++i)
-  { if(cvf_formats[i])
-    { if(cvf_formats[i]->detect_cvf(sb))
-      { ++found;
-        found_i=i;
-      }
-    }
-  }
-  
-  if(found==1)return found_i;
-  if(found>1)printk("CVF detection ambiguous, please use cvf_format=xxx option\n"); 
-  return -1;
-}
diff -Nru a/fs/fat/dir.c b/fs/fat/dir.c
--- a/fs/fat/dir.c	Wed Oct 30 16:44:20 2002
+++ b/fs/fat/dir.c	Wed Oct 30 16:44:20 2002
@@ -22,8 +22,6 @@
 
 #include <asm/uaccess.h>
 
-#define PRINTK(X)
-
 struct file_operations fat_dir_operations = {
 	read:		generic_read_dir,
 	readdir:	fat_readdir,
@@ -219,7 +217,7 @@
 				unicode = (wchar_t *)
 					__get_free_page(GFP_KERNEL);
 				if (!unicode) {
-					fat_brelse(sb, bh);
+					brelse(bh);
 					return -ENOMEM;
 				}
 			}
@@ -335,7 +333,7 @@
 	*spos = cpos - sizeof(struct msdos_dir_entry);
 	*lpos = cpos - res*sizeof(struct msdos_dir_entry);
 EODir:
-	fat_brelse(sb, bh);
+	brelse(bh);
 	if (unicode) {
 		free_page((unsigned long) unicode);
 	}
@@ -417,7 +415,7 @@
 				__get_free_page(GFP_KERNEL);
 			if (!unicode) {
 				filp->f_pos = cpos;
-				fat_brelse(sb, bh);
+				brelse(bh);
 				ret = -ENOMEM;
 				goto out;
 			}
@@ -578,7 +576,7 @@
 	filp->f_pos = cpos;
 FillFailed:
 	if (bh)
-		fat_brelse(sb, bh);
+		brelse(bh);
 	if (unicode) {
 		free_page((unsigned long) unicode);
 	}
@@ -636,8 +634,6 @@
 		put_user(0, d1->d_name+len);
 		put_user(len, &d1->d_reclen);
 	}
-	PRINTK(("FAT d1=%p d2=%p len=%d, name_len=%d\n",
-		d1, d2, len, name_len));
 
 	return 0;
 }
@@ -672,11 +668,6 @@
 				    vfat_ioctl_fill, 1, 1);
 	}
 	default:
-		/* forward ioctl to CVF extension */
-	       if (MSDOS_SB(inode->i_sb)->cvf_format &&
-		   MSDOS_SB(inode->i_sb)->cvf_format->cvf_dir_ioctl)
-		       return MSDOS_SB(inode->i_sb)->cvf_format
-			       ->cvf_dir_ioctl(inode,filp,cmd,arg);
 		return -EINVAL;
 	}
 
@@ -704,9 +695,8 @@
 			break;
 		}
 	}
-	if (bh)
-		fat_brelse(dir->i_sb, bh);
 
+	brelse(bh);
 	return result;
 }
 
@@ -726,7 +716,7 @@
 	while (fat_get_entry(dir, &curr, bh, de, ino) > -1) {
 		/* check the maximum size of directory */
 		if (curr >= FAT_MAX_DIR_SIZE) {
-			fat_brelse(sb, *bh);
+			brelse(*bh);
 			return -ENOSPC;
 		}
 
@@ -743,7 +733,7 @@
 	new_bh = fat_extend_dir(dir);
 	if (IS_ERR(new_bh))
 		return PTR_ERR(new_bh);
-	fat_brelse(sb, new_bh);
+	brelse(new_bh);
 	do {
 		fat_get_entry(dir, &curr, bh, de, ino);
 	} while (++row < slots);
@@ -753,7 +743,6 @@
 
 int fat_new_dir(struct inode *dir, struct inode *parent, int is_vfat)
 {
-	struct super_block *sb = dir->i_sb;
 	struct buffer_head *bh;
 	struct msdos_dir_entry *de;
 	__u16 date, time;
@@ -779,8 +768,8 @@
 	de[0].starthi = CT_LE_W(MSDOS_I(dir)->i_logstart>>16);
 	de[1].start = CT_LE_W(MSDOS_I(parent)->i_logstart);
 	de[1].starthi = CT_LE_W(MSDOS_I(parent)->i_logstart>>16);
-	fat_mark_buffer_dirty(sb, bh);
-	fat_brelse(sb, bh);
+	mark_buffer_dirty(bh);
+	brelse(bh);
 	dir->i_atime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
 	mark_inode_dirty(dir);
 
diff -Nru a/fs/fat/fatfs_syms.c b/fs/fat/fatfs_syms.c
--- a/fs/fat/fatfs_syms.c	Wed Oct 30 16:44:24 2002
+++ b/fs/fat/fatfs_syms.c	Wed Oct 30 16:44:24 2002
@@ -10,7 +10,6 @@
 
 #include <linux/mm.h>
 #include <linux/msdos_fs.h>
-#include <linux/fat_cvf.h>
 
 EXPORT_SYMBOL(fat_new_dir);
 EXPORT_SYMBOL(fat_get_block);
@@ -18,7 +17,6 @@
 EXPORT_SYMBOL(fat_date_unix2dos);
 EXPORT_SYMBOL(fat_delete_inode);
 EXPORT_SYMBOL(fat__get_entry);
-EXPORT_SYMBOL(fat_mark_buffer_dirty);
 EXPORT_SYMBOL(fat_notify_change);
 EXPORT_SYMBOL(fat_put_super);
 EXPORT_SYMBOL(fat_attach);
@@ -30,13 +28,10 @@
 EXPORT_SYMBOL(fat_scan);
 EXPORT_SYMBOL(fat_statfs);
 EXPORT_SYMBOL(fat_write_inode);
-EXPORT_SYMBOL(register_cvf_format);
-EXPORT_SYMBOL(unregister_cvf_format);
 EXPORT_SYMBOL(fat_dir_ioctl);
 EXPORT_SYMBOL(fat_add_entries);
 EXPORT_SYMBOL(fat_dir_empty);
 EXPORT_SYMBOL(fat_truncate);
-EXPORT_SYMBOL(fat_brelse);
 
 int __init fat_init_inodecache(void);
 void __exit fat_destroy_inodecache(void);
diff -Nru a/fs/fat/file.c b/fs/fat/file.c
--- a/fs/fat/file.c	Wed Oct 30 16:44:26 2002
+++ b/fs/fat/file.c	Wed Oct 30 16:44:26 2002
@@ -8,16 +8,15 @@
 
 #include <linux/time.h>
 #include <linux/msdos_fs.h>
-#include <linux/fat_cvf.h>
 #include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
 
-#define PRINTK(x)
-#define Printk(x) printk x
+static ssize_t fat_file_write(struct file *filp, const char *buf, size_t count,
+			      loff_t *ppos);
 
 struct file_operations fat_file_operations = {
 	llseek:		generic_file_llseek,
-	read:		fat_file_read,
+	read:		generic_file_read,
 	write:		fat_file_write,
 	mmap:		generic_file_mmap,
 	fsync:		file_fsync,
@@ -29,19 +28,8 @@
 	setattr:	fat_notify_change,
 };
 
-ssize_t fat_file_read(
-	struct file *filp,
-	char *buf,
-	size_t count,
-	loff_t *ppos)
-{
-	struct inode *inode = filp->f_dentry->d_inode;
-	return MSDOS_SB(inode->i_sb)->cvf_format
-			->cvf_file_read(filp,buf,count,ppos);
-}
-
-
-int fat_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create)
+int fat_get_block(struct inode *inode, sector_t iblock,
+		  struct buffer_head *bh_result, int create)
 {
 	struct super_block *sb = inode->i_sb;
 	unsigned long phys;
@@ -77,23 +65,8 @@
 	return 0;
 }
 
-ssize_t fat_file_write(
-	struct file *filp,
-	const char *buf,
-	size_t count,
-	loff_t *ppos)
-{
-	struct inode *inode = filp->f_dentry->d_inode;
-	struct super_block *sb = inode->i_sb;
-	return MSDOS_SB(sb)->cvf_format
-			->cvf_file_write(filp,buf,count,ppos);
-}
-
-ssize_t default_fat_file_write(
-	struct file *filp,
-	const char *buf,
-	size_t count,
-	loff_t *ppos)
+static ssize_t fat_file_write(struct file *filp, const char *buf, size_t count,
+			      loff_t *ppos)
 {
 	struct inode *inode = filp->f_dentry->d_inode;
 	int retval;
diff -Nru a/fs/fat/inode.c b/fs/fat/inode.c
--- a/fs/fat/inode.c	Wed Oct 30 16:44:28 2002
+++ b/fs/fat/inode.c	Wed Oct 30 16:44:28 2002
@@ -16,28 +16,10 @@
 #include <linux/smp_lock.h>
 #include <linux/seq_file.h>
 #include <linux/msdos_fs.h>
-#include <linux/fat_cvf.h>
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
-
-//#include <asm/uaccess.h>
 #include <asm/unaligned.h>
 
-extern struct cvf_format default_cvf;
-
-/* #define FAT_PARANOIA 1 */
-#define DEBUG_LEVEL 0
-#ifdef FAT_DEBUG
-#  define PRINTK(x) printk x
-#else
-#  define PRINTK(x)
-#endif
-#if (DEBUG_LEVEL >= 1)
-#  define PRINTK1(x) printk x
-#else
-#  define PRINTK1(x)
-#endif
-
 /*
  * New FAT inode stuff. We do the following:
  *	a) i_ino is constant and has nothing with on-disk location.
@@ -175,10 +157,6 @@
 {
 	struct msdos_sb_info *sbi = MSDOS_SB(sb);
 
-	if (sbi->cvf_format->cvf_version) {
-		dec_cvf_format_use_count_by_version(sbi->cvf_format->cvf_version);
-		sbi->cvf_format->unmount_cvf(sb);
-	}
 	fat_clusters_flush(sb);
 	fat_cache_inval_dev(sb);
 	if (sbi->nls_disk) {
@@ -255,8 +233,6 @@
 	}
 	if (opts->name_check != 'n')
 		seq_printf(m, ",check=%c", opts->name_check);
-	if (opts->conversion != 'b')
-		seq_printf(m, ",conv=%c", opts->conversion);
 	if (opts->quiet)
 		seq_puts(m, ",quiet");
 	if (opts->showexec)
@@ -281,8 +257,7 @@
 }
 
 static int parse_options(char *options, int is_vfat, int *debug,
-			 struct fat_mount_options *opts,
-			 char *cvf_format, char *cvf_options)
+			 struct fat_mount_options *opts)
 {
 	char *this_char, *value, *p;
 	int ret = 1, val, len;
@@ -299,7 +274,6 @@
 	else
 		opts->shortname = 0;
 	opts->name_check = 'n';
-	opts->conversion = 'b';
 	opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK =  0;
 	opts->utf8 = opts->unicode_xlate = 0;
 	opts->numtail = 1;
@@ -326,15 +300,8 @@
 			else ret = 0;
 		}
 		else if (!strcmp(this_char,"conv") && value) {
-			if (value[0] && !value[1] && strchr("bta",*value))
-				opts->conversion = *value;
-			else if (!strcmp(value,"binary"))
-				opts->conversion = 'b';
-			else if (!strcmp(value,"text"))
-				opts->conversion = 't';
-			else if (!strcmp(value,"auto"))
-				opts->conversion = 'a';
-			else ret = 0;
+			printk(KERN_INFO "FAT: conv option is obsolete, "
+			       "not supported now\n");
 		}
 		else if (!strcmp(this_char,"nocase")) {
 			if (!is_vfat)
@@ -381,7 +348,7 @@
 			else *debug = 1;
 		}
 		else if (!strcmp(this_char,"fat")) {
-			printk("FAT: fat option is obsolete, "
+			printk(KERN_INFO "FAT: fat option is obsolete, "
 			       "not supported now\n");
 		}
 		else if (!strcmp(this_char,"quiet")) {
@@ -389,7 +356,7 @@
 			else opts->quiet = 1;
 		}
 		else if (!strcmp(this_char,"blocksize")) {
-			printk("FAT: blocksize option is obsolete, "
+			printk(KERN_INFO "FAT: blocksize option is obsolete, "
 			       "not supported now\n");
 		}
 		else if (!strcmp(this_char,"sys_immutable")) {
@@ -400,16 +367,6 @@
 			opts->codepage = simple_strtoul(value,&value,0);
 			if (*value) ret = 0;
 		}
-		else if (!strcmp(this_char,"cvf_format")) {
-			if (!value)
-				return 0;
-			strncpy(cvf_format,value,20);
-		}
-		else if (!strcmp(this_char,"cvf_options")) {
-			if (!value)
-				return 0;
-			strncpy(cvf_options,value,100);
-		}
 
 		/* msdos specific */
 		else if (!is_vfat && !strcmp(this_char,"dots")) {
@@ -455,7 +412,7 @@
 			if (ret) opts->unicode_xlate = val;
 		}
 		else if (is_vfat && !strcmp(this_char,"posix")) {
-			printk("FAT: posix option is obsolete, "
+			printk(KERN_INFO "FAT: posix option is obsolete, "
 			       "not supported now\n");
 		}
 		else if (is_vfat && !strcmp(this_char,"nonumtail")) {
@@ -480,7 +437,7 @@
 			else
 				ret = 0;
 		} else {
-			printk("FAT: Unrecognized mount option %s\n",
+			printk(KERN_ERR "FAT: Unrecognized mount option %s\n",
 			       this_char);
 			ret = 0;
 		}
@@ -642,7 +599,6 @@
 	result->d_op = sb->s_root->d_op;
 	result->d_vfs_flags |= DCACHE_REFERENCED;
 	return result;
-		
 }
 
 int fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable)
@@ -692,7 +648,7 @@
 
  out:
 	if(bh)
-		fat_brelse(child->d_sb, bh);
+		brelse(bh);
 	unlock_kernel();
 	if (res)
 		return ERR_PTR(res);
@@ -780,9 +736,6 @@
 	unsigned char media;
 	long error;
 	char buf[50];
-	int i;
-	char cvf_format[21];
-	char cvf_options[101];
 
 	sbi = kmalloc(sizeof(struct msdos_sb_info), GFP_KERNEL);
 	if (!sbi)
@@ -790,19 +743,13 @@
 	sb->s_fs_info = sbi;
 	memset(sbi, 0, sizeof(struct msdos_sb_info));
 
-	cvf_format[0] = '\0';
-	cvf_options[0] = '\0';
-	sbi->private_data = NULL;
-
 	sb->s_magic = MSDOS_SUPER_MAGIC;
 	sb->s_op = &fat_sops;
 	sb->s_export_op = &fat_export_ops;
 	sbi->dir_ops = fs_dir_inode_ops;
-	sbi->cvf_format = &default_cvf;
 
 	error = -EINVAL;
-	if (!parse_options((char *)data, isvfat, &debug, &sbi->options,
-			   cvf_format, cvf_options))
+	if (!parse_options(data, isvfat, &debug, &sbi->options))
 		goto out_fail;
 
 	fat_cache_init();
@@ -813,39 +760,40 @@
 	sb_min_blocksize(sb, 512);
 	bh = sb_bread(sb, 0);
 	if (bh == NULL) {
-		printk("FAT: unable to read boot sector\n");
+		printk(KERN_ERR "FAT: unable to read boot sector\n");
 		goto out_fail;
 	}
 
 	b = (struct fat_boot_sector *) bh->b_data;
 	if (!b->reserved) {
 		if (!silent)
-			printk("FAT: bogus number of reserved sectors\n");
+			printk(KERN_ERR "FAT: bogus number of reserved sectors\n");
 		brelse(bh);
 		goto out_invalid;
 	}
 	if (!b->fats) {
 		if (!silent)
-			printk("FAT: bogus number of FAT structure\n");
+			printk(KERN_ERR "FAT: bogus number of FAT structure\n");
 		brelse(bh);
 		goto out_invalid;
 	}
 	if (!b->secs_track) {
 		if (!silent)
-			printk("FAT: bogus sectors-per-track value\n");
+			printk(KERN_ERR "FAT: bogus sectors-per-track value\n");
 		brelse(bh);
 		goto out_invalid;
 	}
 	if (!b->heads) {
 		if (!silent)
-			printk("FAT: bogus number-of-heads value\n");
+			printk(KERN_ERR "FAT: bogus number-of-heads value\n");
 		brelse(bh);
 		goto out_invalid;
 	}
 	media = b->media;
 	if (!FAT_VALID_MEDIA(media)) {
 		if (!silent)
-			printk("FAT: invalid media value (0x%02x)\n", media);
+			printk(KERN_ERR "FAT: invalid media value (0x%02x)\n",
+			       media);
 		brelse(bh);
 		goto out_invalid;
 	}
@@ -856,7 +804,7 @@
 	    || (logical_sector_size < 512)
 	    || (PAGE_CACHE_SIZE < logical_sector_size)) {
 		if (!silent)
-			printk("FAT: bogus logical sector size %d\n",
+			printk(KERN_ERR "FAT: bogus logical sector size %d\n",
 			       logical_sector_size);
 		brelse(bh);
 		goto out_invalid;
@@ -865,14 +813,14 @@
 	if (!sbi->cluster_size
 	    || (sbi->cluster_size & (sbi->cluster_size - 1))) {
 		if (!silent)
-			printk("FAT: bogus cluster size %d\n",
+			printk(KERN_ERR "FAT: bogus cluster size %d\n",
 			       sbi->cluster_size);
 		brelse(bh);
 		goto out_invalid;
 	}
 
 	if (logical_sector_size < sb->s_blocksize) {
-		printk("FAT: logical sector size too small for device"
+		printk(KERN_ERR "FAT: logical sector size too small for device"
 		       " (logical sector size = %d)\n", logical_sector_size);
 		brelse(bh);
 		goto out_fail;
@@ -881,13 +829,13 @@
 		brelse(bh);
 
 		if (!sb_set_blocksize(sb, logical_sector_size)) {
-			printk("FAT: unable to set blocksize %d\n",
+			printk(KERN_ERR "FAT: unable to set blocksize %d\n",
 			       logical_sector_size);
 			goto out_fail;
 		}
 		bh = sb_bread(sb, 0);
 		if (bh == NULL) {
-			printk("FAT: unable to read boot sector"
+			printk(KERN_ERR "FAT: unable to read boot sector"
 			       " (logical sector size = %lu)\n",
 			       sb->s_blocksize);
 			goto out_fail;
@@ -922,7 +870,7 @@
 
 		fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector);
 		if (fsinfo_bh == NULL) {
-			printk("FAT: bread failed, FSINFO block"
+			printk(KERN_ERR "FAT: bread failed, FSINFO block"
 			       " (sector = %lu)\n", sbi->fsinfo_sector);
 			brelse(bh);
 			goto out_fail;
@@ -930,7 +878,8 @@
 
 		fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;
 		if (!IS_FSINFO(fsinfo)) {
-			printk("FAT: Did not find valid FSINFO signature.\n"
+			printk(KERN_WARNING
+			       "FAT: Did not find valid FSINFO signature.\n"
 			       "     Found signature1 0x%08x signature2 0x%08x"
 			       " (sector = %lu)\n",
 			       CF_LE_L(fsinfo->signature1),
@@ -950,7 +899,7 @@
 	sbi->dir_entries =
 		CF_LE_W(get_unaligned((unsigned short *)&b->dir_entries));
 	if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
-		printk("FAT: bogus directroy-entries per block\n");
+		printk(KERN_ERR "FAT: bogus directroy-entries per block\n");
 		brelse(bh);
 		goto out_invalid;
 	}
@@ -981,7 +930,7 @@
 	}
 	if (FAT_FIRST_ENT(sb, media) != first) {
 		if (!silent) {
-			printk("FAT: invalid first entry of FAT "
+			printk(KERN_ERR "FAT: invalid first entry of FAT "
 			       "(0x%x != 0x%x)\n",
 			       FAT_FIRST_ENT(sb, media), first);
 		}
@@ -989,22 +938,13 @@
 	}
 
 	error = -EINVAL;
-	if (!strcmp(cvf_format, "none"))
-		i = -1;
-	else
-		i = detect_cvf(sb, cvf_format);
-	if (i >= 0) {
-		if (cvf_formats[i]->mount_cvf(sb, cvf_options))
-			goto out_fail;
-	}
-
 	cp = sbi->options.codepage ? sbi->options.codepage : 437;
 	sprintf(buf, "cp%d", cp);
 	sbi->nls_disk = load_nls(buf);
-	if (! sbi->nls_disk) {
+	if (!sbi->nls_disk) {
 		/* Fail only if explicit charset specified */
 		if (sbi->options.codepage != 0) {
-			printk("FAT: codepage %s not found\n", buf);
+			printk(KERN_ERR "FAT: codepage %s not found\n", buf);
 			goto out_fail;
 		}
 		sbi->options.codepage = 0; /* already 0?? */
@@ -1016,7 +956,8 @@
 		if (sbi->options.iocharset != NULL) {
 			sbi->nls_io = load_nls(sbi->options.iocharset);
 			if (!sbi->nls_io) {
-				printk("FAT: IO charset %s not found\n",
+				printk(KERN_ERR
+				       "FAT: IO charset %s not found\n",
 				       sbi->options.iocharset);
 				goto out_fail;
 			}
@@ -1037,13 +978,10 @@
 	insert_inode_hash(root_inode);
 	sb->s_root = d_alloc_root(root_inode);
 	if (!sb->s_root) {
-		printk("FAT: get root inode failed\n");
+		printk(KERN_ERR "FAT: get root inode failed\n");
 		goto out_fail;
 	}
-	if(i >= 0) {
-		sbi->cvf_format = cvf_formats[i];
-		++cvf_format_use_count[i];
-	}
+
 	return 0;
 
 out_invalid:
@@ -1061,12 +999,8 @@
 		unload_nls(sbi->nls_disk);
 	if (sbi->options.iocharset)
 		kfree(sbi->options.iocharset);
-	if (sbi->private_data)
-		kfree(sbi->private_data);
-	sbi->private_data = NULL;
 	sb->s_fs_info = NULL;
 	kfree(sbi);
-
 	return error;
 }
 
@@ -1074,11 +1008,6 @@
 {
 	int free,nr;
        
-	if (MSDOS_SB(sb)->cvf_format &&
-	    MSDOS_SB(sb)->cvf_format->cvf_statfs)
-		return MSDOS_SB(sb)->cvf_format->cvf_statfs(sb,buf,
-						sizeof(struct statfs));
-	  
 	lock_fat(sb);
 	if (MSDOS_SB(sb)->free_clusters != -1)
 		free = MSDOS_SB(sb)->free_clusters;
@@ -1182,13 +1111,6 @@
 		MSDOS_I(inode)->mmu_private = inode->i_size;
 
 		inode->i_nlink = fat_subdirs(inode);
-		    /* includes .., compensating for "self" */
-#ifdef DEBUG
-		if (!inode->i_nlink) {
-			printk("directory %lu: i_nlink == 0\n",inode->i_ino);
-			inode->i_nlink = 1;
-		}
-#endif
 	} else { /* not a directory */
 		inode->i_generation |= 1;
 		inode->i_mode = MSDOS_MKMODE(de->attr,
@@ -1240,16 +1162,16 @@
 		return;
 	}
 	lock_kernel();
-	if (!(bh = fat_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) {
-		printk("dev = %s, ino = %d\n", sb->s_id, i_pos);
-		fat_fs_panic(sb, "msdos_write_inode: unable to read i-node block");
+	if (!(bh = sb_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) {
+		fat_fs_panic(sb, "unable to read i-node block (ino %lu)",
+			     i_pos);
 		unlock_kernel();
 		return;
 	}
 	spin_lock(&fat_inode_lock);
 	if (i_pos != MSDOS_I(inode)->i_location) {
 		spin_unlock(&fat_inode_lock);
-		fat_brelse(sb, bh);
+		brelse(bh);
 		unlock_kernel();
 		goto retry;
 	}
@@ -1278,8 +1200,8 @@
 		raw_entry->cdate = CT_LE_W(raw_entry->cdate);
 	}
 	spin_unlock(&fat_inode_lock);
-	fat_mark_buffer_dirty(sb, bh);
-	fat_brelse(sb, bh);
+	mark_buffer_dirty(bh);
+	brelse(bh);
 	unlock_kernel();
 }
 
diff -Nru a/fs/fat/misc.c b/fs/fat/misc.c
--- a/fs/fat/misc.c	Wed Oct 30 16:44:32 2002
+++ b/fs/fat/misc.c	Wed Oct 30 16:44:32 2002
@@ -10,25 +10,6 @@
 #include <linux/msdos_fs.h>
 #include <linux/buffer_head.h>
 
-#if 0
-#  define PRINTK(x)	printk x
-#else
-#  define PRINTK(x)
-#endif
-#define Printk(x)	printk x
-
-/* Well-known binary file extensions - of course there are many more */
-
-static char ascii_extensions[] =
-  "TXT" "ME " "HTM" "1ST" "LOG" "   " 	/* text files */
-  "C  " "H  " "CPP" "LIS" "PAS" "FOR"  /* programming languages */
-  "F  " "MAK" "INC" "BAS" 		/* programming languages */
-  "BAT" "SH "				/* program code :) */
-  "INI"					/* config files */
-  "PBM" "PGM" "DXF"			/* graphics */
-  "TEX";				/* TeX */
-
-
 /*
  * fat_fs_panic reports a severe file system problem and sets the file system
  * read-only. The file system can be made writable again by remounting it.
@@ -49,36 +30,10 @@
 	if (not_ro)
 		s->s_flags |= MS_RDONLY;
 
-	printk("FAT: Filesystem panic (dev %s)\n"
+	printk(KERN_ERR "FAT: Filesystem panic (dev %s)\n"
 	       "    %s\n", s->s_id, panic_msg);
 	if (not_ro)
-		printk("    File system has been set read-only\n");
-}
-
-
-/*
- * fat_is_binary selects optional text conversion based on the conversion mode
- * and the extension part of the file name.
- */
-
-int fat_is_binary(char conversion,char *extension)
-{
-	char *walk;
-
-	switch (conversion) {
-		case 'b':
-			return 1;
-		case 't':
-			return 0;
-		case 'a':
-			for (walk = ascii_extensions; *walk; walk += 3)
-				if (!strncmp(extension,walk,3)) return 0;
-			return 1;	/* default binary conversion */
-		default:
-			printk("Invalid conversion mode - defaulting to "
-			    "binary.\n");
-			return 1;
-	}
+		printk(KERN_ERR "    File system has been set read-only\n");
 }
 
 void lock_fat(struct super_block *sb)
@@ -103,25 +58,25 @@
 	if (MSDOS_SB(sb)->free_clusters == -1)
 		return;
 
-	bh = fat_bread(sb, MSDOS_SB(sb)->fsinfo_sector);
+	bh = sb_bread(sb, MSDOS_SB(sb)->fsinfo_sector);
 	if (bh == NULL) {
-		printk("FAT bread failed in fat_clusters_flush\n");
+		printk(KERN_ERR "FAT bread failed in fat_clusters_flush\n");
 		return;
 	}
 
 	fsinfo = (struct fat_boot_fsinfo *)bh->b_data;
 	/* Sanity check */
 	if (!IS_FSINFO(fsinfo)) {
-		printk("FAT: Did not find valid FSINFO signature.\n"
+		printk(KERN_ERR "FAT: Did not find valid FSINFO signature.\n"
 		       "     Found signature1 0x%08x signature2 0x%08x"
 		       " (sector = %lu)\n",
 		       CF_LE_L(fsinfo->signature1), CF_LE_L(fsinfo->signature2),
 		       MSDOS_SB(sb)->fsinfo_sector);
 	} else {
 		fsinfo->free_clusters = CF_LE_L(MSDOS_SB(sb)->free_clusters);
-		fat_mark_buffer_dirty(sb, bh);
+		mark_buffer_dirty(bh);
 	}
-	fat_brelse(sb, bh);
+	brelse(bh);
 }
 
 /*
@@ -205,7 +160,7 @@
 		mark_inode_dirty(inode);
 	}
 	if (file_cluster != (inode->i_blocks >> (cluster_bits - 9))) {
-		printk ("file_cluster badly computed!!! %d <> %ld\n",
+		printk (KERN_ERR "file_cluster badly computed!!! %d <> %ld\n",
 			file_cluster, inode->i_blocks >> (cluster_bits - 9));
 		fat_cache_inval_inode(inode);
 	}
@@ -233,27 +188,19 @@
 	
 	sector = MSDOS_SB(sb)->data_start + (nr - 2) * cluster_size;
 	last_sector = sector + cluster_size;
-	if (MSDOS_SB(sb)->cvf_format
-	    && MSDOS_SB(sb)->cvf_format->zero_out_cluster) {
-		res = ERR_PTR(-EIO);
-		MSDOS_SB(sb)->cvf_format->zero_out_cluster(inode, nr);
-	} else {
-		for ( ; sector < last_sector; sector++) {
-			if (!(bh = fat_getblk(sb, sector)))
-				printk("FAT: fat_getblk() failed\n");
-			else {
-				memset(bh->b_data, 0, sb->s_blocksize);
-				fat_set_uptodate(sb, bh, 1);
-				fat_mark_buffer_dirty(sb, bh);
-				if (!res)
-					res = bh;
-				else
-					fat_brelse(sb, bh);
-			}
+	for ( ; sector < last_sector; sector++) {
+		if ((bh = sb_getblk(sb, sector))) {
+			memset(bh->b_data, 0, sb->s_blocksize);
+			set_buffer_uptodate(bh);
+			mark_buffer_dirty(bh);
+			if (!res)
+				res = bh;
+			else
+				brelse(bh);
 		}
-		if (res == NULL)
-			res = ERR_PTR(-EIO);
 	}
+	if (res == NULL)
+		res = ERR_PTR(-EIO);
 	if (inode->i_size & (sb->s_blocksize - 1)) {
 		fat_fs_panic(sb, "Odd directory size");
 		inode->i_size = (inode->i_size + sb->s_blocksize)
@@ -261,7 +208,6 @@
 	}
 	inode->i_size += 1 << MSDOS_SB(sb)->cluster_bits;
 	MSDOS_I(inode)->mmu_private += 1 << MSDOS_SB(sb)->cluster_bits;
-	mark_inode_dirty(inode);
 
 	return res;
 }
@@ -347,7 +293,7 @@
 next:
 	offset = *pos;
 	if (*bh)
-		fat_brelse(sb, *bh);
+		brelse(*bh);
 
 	*bh = NULL;
 	iblock = *pos >> sb->s_blocksize_bits;
@@ -355,9 +301,10 @@
 	if (sector <= 0)
 		return -1;	/* beyond EOF or error */
 
-	*bh = fat_bread(sb, sector);
+	*bh = sb_bread(sb, sector);
 	if (*bh == NULL) {
-		printk("FAT: Directory bread(block %d) failed\n", sector);
+		printk(KERN_ERR "FAT: Directory bread(block %d) failed\n",
+		       sector);
 		/* skip this block */
 		*pos = (iblock + 1) << sb->s_blocksize_bits;
 		goto next;
@@ -430,7 +377,7 @@
 	struct msdos_dir_entry *data;
 	int entry,start,done;
 
-	if (!(bh = fat_bread(sb,sector)))
+	if (!(bh = sb_bread(sb,sector)))
 		return -EIO;
 	data = (struct msdos_dir_entry *) bh->b_data;
 	for (entry = 0; entry < MSDOS_SB(sb)->dir_per_block; entry++) {
@@ -452,7 +399,7 @@
 				start |= (CF_LE_W(data[entry].starthi) << 16);
 			}
 			if (!res_bh)
-				fat_brelse(sb, bh);
+				brelse(bh);
 			else {
 				*res_bh = bh;
 				*res_de = &data[entry];
@@ -460,7 +407,7 @@
 			return start;
 		}
 	}
-	fat_brelse(sb, bh);
+	brelse(bh);
 	return -ENOENT;
 }
 
diff -Nru a/fs/fcblist.c b/fs/fcblist.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/fcblist.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,146 @@
+/*
+ *  linux/fs/fcblist.c ( File event callbacks handling )
+ *  Copyright (C) 2001,...,2002  Davide Libenzi
+ *
+ *  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.
+ *
+ *  Davide Libenzi <davidel@xmailserver.org>
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/poll.h>
+#include <asm/bitops.h>
+#include <linux/fcblist.h>
+
+
+long ion_band_table[NSIGPOLL] = {
+	ION_IN,		/* POLL_IN */
+	ION_OUT,	/* POLL_OUT */
+	ION_IN,		/* POLL_MSG */
+	ION_ERR,	/* POLL_ERR */
+	0,		/* POLL_PRI */
+	ION_HUP		/* POLL_HUP */
+};
+
+long poll_band_table[NSIGPOLL] = {
+	POLLIN | POLLRDNORM,			/* POLL_IN */
+	POLLOUT | POLLWRNORM | POLLWRBAND,	/* POLL_OUT */
+	POLLIN | POLLRDNORM | POLLMSG,		/* POLL_MSG */
+	POLLERR,				/* POLL_ERR */
+	POLLPRI | POLLRDBAND,			/* POLL_PRI */
+	POLLHUP | POLLERR			/* POLL_HUP */
+};
+
+
+
+/*
+ * Walk through the file callback list by calling each registered callback
+ * with the event that happened on the "filep" file. Callbacks are called
+ * by holding a read lock on the callback list lock, and also by keeping
+ * local IRQs disabled.
+ */
+void file_notify_event(struct file *filep, long *event)
+{
+	unsigned long flags;
+	struct list_head *lnk, *lsthead;
+
+	read_lock_irqsave(&filep->f_cblock, flags);
+
+	lsthead = &filep->f_cblist;
+	list_for_each(lnk, lsthead) {
+		struct fcb_struct *fcbp = list_entry(lnk, struct fcb_struct, llink);
+
+		fcbp->cbproc(filep, fcbp->data, fcbp->local, event);
+	}
+
+	read_unlock_irqrestore(&filep->f_cblock, flags);
+}
+
+
+/*
+ * Add a new callback to the list of file callbacks.
+ */
+int file_notify_addcb(struct file *filep,
+		      void (*cbproc)(struct file *, void *, unsigned long *, long *),
+		      void *data)
+{
+	unsigned long flags;
+	struct fcb_struct *fcbp;
+
+	if (!(fcbp = (struct fcb_struct *) kmalloc(sizeof(struct fcb_struct), GFP_KERNEL)))
+		return -ENOMEM;
+
+	memset(fcbp, 0, sizeof(struct fcb_struct));
+	fcbp->cbproc = cbproc;
+	fcbp->data = data;
+
+	write_lock_irqsave(&filep->f_cblock, flags);
+	list_add_tail(&fcbp->llink, &filep->f_cblist);
+	write_unlock_irqrestore(&filep->f_cblock, flags);
+
+	return 0;
+}
+
+
+/*
+ * Removes the callback "cbproc" from the file callback list.
+ */
+int file_notify_delcb(struct file *filep,
+		      void (*cbproc)(struct file *, void *, unsigned long *, long *))
+{
+	unsigned long flags;
+	struct list_head *lnk, *lsthead;
+
+	write_lock_irqsave(&filep->f_cblock, flags);
+
+	lsthead = &filep->f_cblist;
+	list_for_each(lnk, lsthead) {
+		struct fcb_struct *fcbp = list_entry(lnk, struct fcb_struct, llink);
+
+		if (fcbp->cbproc == cbproc) {
+			list_del(lnk);
+			write_unlock_irqrestore(&filep->f_cblock, flags);
+			kfree(fcbp);
+			return 0;
+		}
+	}
+
+	write_unlock_irqrestore(&filep->f_cblock, flags);
+
+	return -ENOENT;
+}
+
+
+/*
+ * It is called at file cleanup time and removes all the registered callbacks.
+ */
+void file_notify_cleanup(struct file *filep)
+{
+	unsigned long flags;
+	struct list_head *lsthead;
+
+	write_lock_irqsave(&filep->f_cblock, flags);
+
+	lsthead = &filep->f_cblist;
+	while (!list_empty(lsthead)) {
+		struct fcb_struct *fcbp = list_entry(lsthead->next, struct fcb_struct, llink);
+
+		list_del(lsthead->next);
+		write_unlock_irqrestore(&filep->f_cblock, flags);
+		kfree(fcbp);
+		write_lock_irqsave(&filep->f_cblock, flags);
+	}
+
+	write_unlock_irqrestore(&filep->f_cblock, flags);
+}
+
diff -Nru a/fs/file_table.c b/fs/file_table.c
--- a/fs/file_table.c	Wed Oct 30 16:44:19 2002
+++ b/fs/file_table.c	Wed Oct 30 16:44:19 2002
@@ -8,6 +8,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/file.h>
+#include <linux/fcblist.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/smp_lock.h>
@@ -58,6 +59,7 @@
 		f->f_gid = current->fsgid;
 		f->f_owner.lock = RW_LOCK_UNLOCKED;
 		list_add(&f->f_list, &anon_list);
+		file_notify_init(f);
 		file_list_unlock();
 		return f;
 	}
@@ -102,6 +104,7 @@
 	filp->f_uid    = current->fsuid;
 	filp->f_gid    = current->fsgid;
 	filp->f_op     = dentry->d_inode->i_fop;
+	file_notify_init(filp);
 	if (filp->f_op->open)
 		return filp->f_op->open(dentry->d_inode, filp);
 	else
@@ -123,6 +126,7 @@
 	struct vfsmount * mnt = file->f_vfsmnt;
 	struct inode * inode = dentry->d_inode;
 
+	file_notify_cleanup(file);
 	locks_remove_flock(file);
 
 	if (file->f_op && file->f_op->release)
diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c
--- a/fs/fs-writeback.c	Wed Oct 30 16:44:28 2002
+++ b/fs/fs-writeback.c	Wed Oct 30 16:44:28 2002
@@ -226,7 +226,7 @@
  * The inodes to be written are parked on sb->s_io.  They are moved back onto
  * sb->s_dirty as they are selected for writing.  This way, none can be missed
  * on the writer throttling path, and we get decent balancing between many
- * throlttled threads: we don't want them all piling up on __wait_on_inode.
+ * throttled threads: we don't want them all piling up on __wait_on_inode.
  */
 static void
 sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
diff -Nru a/fs/intermezzo/cache.c b/fs/intermezzo/cache.c
--- a/fs/intermezzo/cache.c	Wed Oct 30 16:44:27 2002
+++ b/fs/intermezzo/cache.c	Wed Oct 30 16:44:27 2002
@@ -58,16 +58,15 @@
 #define CACHES_MASK CACHES_SIZE - 1
 static struct list_head presto_caches[CACHES_SIZE];
 
-static inline int presto_cache_hash(kdev_t dev)
+static inline int presto_cache_hash(struct super_block *s)
 {
-        return (CACHES_MASK) & ((0x000F & (major(dev)) << 8) + (0x000F & minor(dev)));
+        return (CACHES_MASK) & ((unsigned long)s >> L1_CACHE_SHIFT);
 }
 
-inline void presto_cache_add(struct presto_cache *cache, kdev_t dev)
+inline void presto_cache_add(struct presto_cache *cache)
 {
         list_add(&cache->cache_chain,
-                 &presto_caches[presto_cache_hash(dev)]);
-        cache->cache_dev = dev;
+                 &presto_caches[presto_cache_hash(cache->cache_sb)]);
 }
 
 inline void presto_cache_init_hash(void)
@@ -79,17 +78,16 @@
 }
 
 /* map a device to a cache */
-struct presto_cache *presto_cache_find(kdev_t dev)
+struct presto_cache *presto_cache_find(struct super_block *s)
 {
         struct presto_cache *cache;
         struct list_head *lh, *tmp;
 
-        lh = tmp = &(presto_caches[presto_cache_hash(dev)]);
+        lh = tmp = &(presto_caches[presto_cache_hash(s)]);
         while ( (tmp = lh->next) != lh ) {
                 cache = list_entry(tmp, struct presto_cache, cache_chain);
-                if ( kdev_same(cache->cache_dev, dev) ) {
+                if (cache->cache_sb == s)
                         return cache;
-                }
         }
         return NULL;
 }
@@ -101,10 +99,10 @@
         struct presto_cache *cache;
         ENTRY;
         /* find the correct presto_cache here, based on the device */
-        cache = presto_cache_find(to_kdev_t(inode->i_dev));
+        cache = presto_cache_find(inode->i_sb);
         if ( !cache ) {
-                CERROR("WARNING: no presto cache for dev %x, ino %ld\n",
-                       inode->i_dev, inode->i_ino);
+                CERROR("WARNING: no presto cache for %s, ino %ld\n",
+                       inode->i_sb->s_id, inode->i_ino);
                 EXIT;
                 return NULL;
         }
@@ -122,7 +120,7 @@
         cache = presto_get_cache(inode);
         if ( !cache )
                 return 0;
-        return kdev_same(to_kdev_t(inode->i_dev), cache->cache_dev);
+        return inode->i_sb == cache->cache_sb;
 }
 
 /* setup a cache structure when we need one */
diff -Nru a/fs/intermezzo/inode.c b/fs/intermezzo/inode.c
--- a/fs/intermezzo/inode.c	Wed Oct 30 16:44:19 2002
+++ b/fs/intermezzo/inode.c	Wed Oct 30 16:44:19 2002
@@ -118,7 +118,7 @@
         int err;
 
         ENTRY;
-        cache = presto_cache_find(to_kdev_t(sb->s_dev));
+        cache = presto_cache_find(sb);
         if (!cache) {
                 EXIT;
                 goto exit;
diff -Nru a/fs/intermezzo/super.c b/fs/intermezzo/super.c
--- a/fs/intermezzo/super.c	Wed Oct 30 16:44:35 2002
+++ b/fs/intermezzo/super.c	Wed Oct 30 16:44:35 2002
@@ -285,7 +285,7 @@
         cache->cache_root = dget(sb->s_root);
 
         /* we now know the dev of the cache: hash the cache */
-        presto_cache_add(cache, to_kdev_t(sb->s_dev));
+        presto_cache_add(cache);
         err = izo_prepare_fileset(sb->s_root, fileset); 
 
         filter_setup_journal_ops(cache->cache_filter, cache->cache_type); 
diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c
--- a/fs/jfs/inode.c	Wed Oct 30 16:44:17 2002
+++ b/fs/jfs/inode.c	Wed Oct 30 16:44:17 2002
@@ -315,7 +315,7 @@
 {
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-	return generic_direct_IO(rw, inode, iov,
+	return generic_direct_IO(rw, inode, inode->i_sb->s_bdev, iov,
 				offset, nr_segs, jfs_get_blocks);
 }
 
diff -Nru a/fs/jfs/xattr.c b/fs/jfs/xattr.c
--- a/fs/jfs/xattr.c	Wed Oct 30 16:44:27 2002
+++ b/fs/jfs/xattr.c	Wed Oct 30 16:44:27 2002
@@ -303,7 +303,7 @@
 	}
 
 	ea->flag = DXD_EXTENT;
-	DXDsize(ea, ealist->size);
+	DXDsize(ea, le32_to_cpu(ealist->size));
 	DXDlength(ea, nblocks);
 	DXDaddress(ea, blkno);
 
@@ -342,7 +342,8 @@
 	/* Sanity Check */
 	if ((sizeDXD(&ji->ea) > sizeof (ji->i_inline_ea)))
 		return -EIO;
-	if (((struct jfs_ea_list *) &ji->i_inline_ea)->size != ea_size)
+	if (le32_to_cpu(((struct jfs_ea_list *) &ji->i_inline_ea)->size)
+	    != ea_size)
 		return -EIO;
 
 	memcpy(ealist, ji->i_inline_ea, ea_size);
diff -Nru a/fs/libfs.c b/fs/libfs.c
--- a/fs/libfs.c	Wed Oct 30 16:44:17 2002
+++ b/fs/libfs.c	Wed Oct 30 16:44:17 2002
@@ -260,7 +260,8 @@
 	return 0;
 }
 
-int simple_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry)
+int simple_rename(struct inode *old_dir, struct dentry *old_dentry,
+		struct inode *new_dir, struct dentry *new_dentry)
 {
 	int they_are_dirs = S_ISDIR(old_dentry->d_inode->i_mode);
 
@@ -275,5 +276,50 @@
 		old_dir->i_nlink--;
 		new_dir->i_nlink++;
 	}
+	return 0;
+}
+
+int simple_readpage(struct file *file, struct page *page)
+{
+	void *kaddr;
+
+	if (PageUptodate(page))
+		goto out;
+
+	kaddr = kmap_atomic(page, KM_USER0);
+	memset(kaddr, 0, PAGE_CACHE_SIZE);
+	kunmap_atomic(kaddr, KM_USER0);
+	flush_dcache_page(page);
+	SetPageUptodate(page);
+out:
+	unlock_page(page);
+	return 0;
+}
+
+int simple_prepare_write(struct file *file, struct page *page,
+			unsigned from, unsigned to)
+{
+	if (!PageUptodate(page)) {
+		if (to - from != PAGE_CACHE_SIZE) {
+			void *kaddr = kmap_atomic(page, KM_USER0);
+			memset(kaddr, 0, from);
+			memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
+			flush_dcache_page(page);
+			kunmap_atomic(kaddr, KM_USER0);
+		}
+		SetPageUptodate(page);
+	}
+	return 0;
+}
+
+int simple_commit_write(struct file *file, struct page *page,
+			unsigned offset, unsigned to)
+{
+	struct inode *inode = page->mapping->host;
+	loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
+
+	if (pos > inode->i_size)
+		inode->i_size = pos;
+	set_page_dirty(page);
 	return 0;
 }
diff -Nru a/fs/lockd/xdr.c b/fs/lockd/xdr.c
--- a/fs/lockd/xdr.c	Wed Oct 30 16:44:20 2002
+++ b/fs/lockd/xdr.c	Wed Oct 30 16:44:20 2002
@@ -216,25 +216,6 @@
 	return p;
 }
 
-/*
- * Check buffer bounds after decoding arguments
- */
-static inline int
-xdr_argsize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_argbuf;
-
-	return p - buf->base <= buf->buflen;
-}
-
-static inline int
-xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_resbuf;
-
-	buf->len = p - buf->base;
-	return (buf->len <= buf->buflen);
-}
 
 /*
  * First, the server side XDR functions
diff -Nru a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c
--- a/fs/lockd/xdr4.c	Wed Oct 30 16:44:19 2002
+++ b/fs/lockd/xdr4.c	Wed Oct 30 16:44:19 2002
@@ -223,26 +223,6 @@
 
 
 /*
- * Check buffer bounds after decoding arguments
- */
-static int
-xdr_argsize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_argbuf;
-
-	return p - buf->base <= buf->buflen;
-}
-
-static int
-xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_resbuf;
-
-	buf->len = p - buf->base;
-	return (buf->len <= buf->buflen);
-}
-
-/*
  * First, the server side XDR functions
  */
 int
diff -Nru a/fs/mpage.c b/fs/mpage.c
--- a/fs/mpage.c	Wed Oct 30 16:44:26 2002
+++ b/fs/mpage.c	Wed Oct 30 16:44:26 2002
@@ -176,6 +176,7 @@
 	unsigned first_hole = blocks_per_page;
 	struct block_device *bdev = NULL;
 	struct buffer_head bh;
+	int length;
 
 	if (page_has_buffers(page))
 		goto confused;
@@ -233,7 +234,8 @@
 			goto confused;
 	}
 
-	if (bio_add_page(bio, page, first_hole << blkbits, 0)) {
+	length = first_hole << blkbits;
+	if (bio_add_page(bio, page, length, 0) < length) {
 		bio = mpage_bio_submit(READ, bio);
 		goto alloc_new;
 	}
@@ -261,7 +263,7 @@
 	sector_t last_block_in_bio = 0;
 	struct pagevec lru_pvec;
 
-	pagevec_init(&lru_pvec);
+	pagevec_init(&lru_pvec, 0);
 	for (page_idx = 0; page_idx < nr_pages; page_idx++) {
 		struct page *page = list_entry(pages->prev, struct page, list);
 
@@ -334,6 +336,7 @@
 	int boundary = 0;
 	sector_t boundary_block = 0;
 	struct block_device *boundary_bdev = NULL;
+	int length;
 
 	if (page_has_buffers(page)) {
 		struct buffer_head *head = page_buffers(page);
@@ -467,7 +470,8 @@
 			try_to_free_buffers(page);
 	}
 
-	if (bio_add_page(bio, page, first_unmapped << blkbits, 0)) {
+	length = first_unmapped << blkbits;
+	if (bio_add_page(bio, page, length, 0) < length) {
 		bio = mpage_bio_submit(WRITE, bio);
 		goto alloc_new;
 	}
@@ -556,7 +560,7 @@
 	if (get_block == NULL)
 		writepage = mapping->a_ops->writepage;
 
-	pagevec_init(&pvec);
+	pagevec_init(&pvec, 0);
 	write_lock(&mapping->page_lock);
 
 	list_splice_init(&mapping->dirty_pages, &mapping->io_pages);
@@ -591,6 +595,10 @@
 					test_clear_page_dirty(page)) {
 			if (writepage) {
 				ret = (*writepage)(page);
+				if (ret == -EAGAIN) {
+					__set_page_dirty_nobuffers(page);
+					ret = 0;
+				}
 			} else {
 				bio = mpage_writepage(bio, page, get_block,
 						&last_block_in_bio, &ret);
@@ -600,10 +608,6 @@
 				if (!pagevec_add(&pvec, page))
 					pagevec_deactivate_inactive(&pvec);
 				page = NULL;
-			}
-			if (ret == -EAGAIN && page) {
-				__set_page_dirty_nobuffers(page);
-				ret = 0;
 			}
 			if (ret || (--(wbc->nr_to_write) <= 0))
 				done = 1;
diff -Nru a/fs/msdos/namei.c b/fs/msdos/namei.c
--- a/fs/msdos/namei.c	Wed Oct 30 16:44:28 2002
+++ b/fs/msdos/namei.c	Wed Oct 30 16:44:28 2002
@@ -7,17 +7,13 @@
  */
 
 #include <linux/module.h>
-
 #include <linux/time.h>
 #include <linux/buffer_head.h>
 #include <linux/msdos_fs.h>
 #include <linux/smp_lock.h>
 
-#define MSDOS_DEBUG 0
-#define PRINTK(x)
 
 /* MS-DOS "device special files" */
-
 static const char *reserved_names[] = {
     "CON     ","PRN     ","NUL     ","AUX     ",
     "LPT1    ","LPT2    ","LPT3    ","LPT4    ",
@@ -26,7 +22,6 @@
 };
 
 /* Characters that are undesirable in an MS-DOS file name */
-  
 static char bad_chars[] = "*?<>|\"";
 static char bad_if_strict_pc[] = "+=,; ";
 static char bad_if_strict_atari[] = " "; /* GEMDOS is less restrictive */
@@ -206,8 +201,6 @@
 	struct buffer_head *bh = NULL;
 	int ino,res;
 	
-	PRINTK (("msdos_lookup\n"));
-
 	dentry->d_op = &msdos_dentry_operations;
 
 	lock_kernel();
@@ -227,8 +220,7 @@
 	if (dentry)
 		dentry->d_op = &msdos_dentry_operations;
 out:
-	if (bh)
-		fat_brelse(sb, bh);
+	brelse(bh);
 	unlock_kernel();
 	if (!res)
 		return dentry;
@@ -242,11 +234,12 @@
 			   int *ino,
 			   int is_dir, int is_hid)
 {
-	struct super_block *sb = dir->i_sb;
 	int res;
 
-	if ((res = fat_add_entries(dir, 1, bh, de, ino))<0)
+	res = fat_add_entries(dir, 1, bh, de, ino);
+	if (res < 0)
 		return res;
+
 	/*
 	 * XXX all times should be set by caller upon successful completion.
 	 */
@@ -260,7 +253,7 @@
 	(*de)->starthi = 0;
 	fat_date_unix2dos(dir->i_mtime,&(*de)->time,&(*de)->date);
 	(*de)->size = 0;
-	fat_mark_buffer_dirty(sb, *bh);
+	mark_buffer_dirty(*bh);
 	return 0;
 }
 
@@ -288,7 +281,7 @@
 	is_hid = (dentry->d_name.name[0]=='.') && (msdos_name[0]!='.');
 	/* Have to do it due to foo vs. .foo conflicts */
 	if (fat_scan(dir,msdos_name,&bh,&de,&ino) >= 0) {
-		fat_brelse(sb, bh);
+		brelse(bh);
 		unlock_kernel();
 		return -EINVAL;
  	}
@@ -299,7 +292,7 @@
 		return res;
 	}
 	inode = fat_build_inode(dir->i_sb, de, ino, &res);
-	fat_brelse(sb, bh);
+	brelse(bh);
 	if (!inode) {
 		unlock_kernel();
 		return res;
@@ -314,7 +307,6 @@
 /***** Remove a directory */
 int msdos_rmdir(struct inode *dir, struct dentry *dentry)
 {
-	struct super_block *sb = dir->i_sb;
 	struct inode *inode = dentry->d_inode;
 	int res,ino;
 	struct buffer_head *bh;
@@ -335,7 +327,7 @@
 		goto rmdir_done;
 
 	de->name[0] = DELETED_FLAG;
-	fat_mark_buffer_dirty(sb, bh);
+	mark_buffer_dirty(bh);
 	fat_detach(inode);
 	inode->i_nlink = 0;
 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
@@ -345,7 +337,7 @@
 	res = 0;
 
 rmdir_done:
-	fat_brelse(sb, bh);
+	brelse(bh);
 	unlock_kernel();
 	return res;
 }
@@ -378,7 +370,7 @@
 		goto out_unlock;
 	inode = fat_build_inode(dir->i_sb, de, ino, &res);
 	if (!inode) {
-		fat_brelse(sb, bh);
+		brelse(bh);
 		goto out_unlock;
 	}
 	res = 0;
@@ -390,7 +382,7 @@
 	if (res)
 		goto mkdir_error;
 
-	fat_brelse(sb, bh);
+	brelse(bh);
 	d_instantiate(dentry, inode);
 	res = 0;
 
@@ -406,14 +398,14 @@
 	mark_inode_dirty(inode);
 	mark_inode_dirty(dir);
 	de->name[0] = DELETED_FLAG;
-	fat_mark_buffer_dirty(sb, bh);
-	fat_brelse(sb, bh);
+	mark_buffer_dirty(bh);
+	brelse(bh);
 	fat_detach(inode);
 	iput(inode);
 	goto out_unlock;
 
 out_exist:
-	fat_brelse(sb, bh);
+	brelse(bh);
 	res = -EINVAL;
 	goto out_unlock;
 }
@@ -421,7 +413,6 @@
 /***** Unlink a file */
 int msdos_unlink( struct inode *dir, struct dentry *dentry)
 {
-	struct super_block *sb = dir->i_sb;
 	struct inode *inode = dentry->d_inode;
 	int res,ino;
 	struct buffer_head *bh;
@@ -435,9 +426,9 @@
 		goto unlink_done;
 
 	de->name[0] = DELETED_FLAG;
-	fat_mark_buffer_dirty(sb, bh);
+	mark_buffer_dirty(bh);
 	fat_detach(inode);
-	fat_brelse(sb, bh);
+	brelse(bh);
 	inode->i_nlink = 0;
 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
 	mark_inode_dirty(inode);
@@ -454,7 +445,6 @@
     struct buffer_head *old_bh,
     struct msdos_dir_entry *old_de, int old_ino, int is_hid)
 {
-	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *new_bh=NULL,*dotdot_bh=NULL;
 	struct msdos_dir_entry *new_de,*dotdot_de;
 	struct inode *old_inode,*new_inode;
@@ -497,7 +487,7 @@
 	if (new_inode)
 		fat_detach(new_inode);
 	old_de->name[0] = DELETED_FLAG;
-	fat_mark_buffer_dirty(sb, old_bh);
+	mark_buffer_dirty(old_bh);
 	fat_detach(old_inode);
 	fat_attach(old_inode, new_ino);
 	if (is_hid)
@@ -516,7 +506,7 @@
 	if (dotdot_bh) {
 		dotdot_de->start = CT_LE_W(MSDOS_I(new_dir)->i_logstart);
 		dotdot_de->starthi = CT_LE_W((MSDOS_I(new_dir)->i_logstart) >> 16);
-		fat_mark_buffer_dirty(sb, dotdot_bh);
+		mark_buffer_dirty(dotdot_bh);
 		old_dir->i_nlink--;
 		mark_inode_dirty(old_dir);
 		if (new_inode) {
@@ -529,8 +519,8 @@
 	}
 	error = 0;
 out:
-	fat_brelse(sb, new_bh);
-	fat_brelse(sb, dotdot_bh);
+	brelse(new_bh);
+	brelse(dotdot_bh);
 	return error;
 
 degenerate_case:
@@ -552,7 +542,6 @@
 int msdos_rename(struct inode *old_dir,struct dentry *old_dentry,
 		 struct inode *new_dir,struct dentry *new_dentry)
 {
-	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *old_bh;
 	struct msdos_dir_entry *old_de;
 	int old_ino, error;
@@ -580,7 +569,7 @@
 	error = do_msdos_rename(old_dir, old_msdos_name, old_dentry,
 				new_dir, new_msdos_name, new_dentry,
 				old_bh, old_de, (ino_t)old_ino, is_hid);
-	fat_brelse(sb, old_bh);
+	brelse(old_bh);
 
 rename_done:
 	unlock_kernel();
diff -Nru a/fs/ncpfs/Config.help b/fs/ncpfs/Config.help
--- a/fs/ncpfs/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,59 +0,0 @@
-CONFIG_NCPFS_PACKET_SIGNING
-  NCP allows packets to be signed for stronger security. If you want
-  security, say Y.  Normal users can leave it off.  To be able to use
-  packet signing you must use ncpfs > 2.0.12.
-
-CONFIG_NCPFS_IOCTL_LOCKING
-  Allows locking of records on remote volumes.  Say N unless you have
-  special applications which are able to utilize this locking scheme.
-
-CONFIG_NCPFS_STRONG
-  Allows manipulation of files flagged as Delete or Rename Inhibit.
-  To use this feature you must mount volumes with the ncpmount
-  parameter "-s" (ncpfs-2.0.12 and newer).  Say Y unless you are not
-  mounting volumes with -f 444.
-
-CONFIG_NCPFS_NFS_NS
-  Allows you to utilize NFS namespace on NetWare servers.  It brings
-  you case sensitive filenames.  Say Y.  You can disable it at
-  mount-time with the `-N nfs' parameter of ncpmount.
-
-CONFIG_NCPFS_OS2_NS
-  Allows you to utilize OS2/LONG namespace on NetWare servers.
-  Filenames in this namespace are limited to 255 characters, they are
-  case insensitive, and case in names is preserved.  Say Y.  You can
-  disable it at mount time with the -N os2 parameter of ncpmount.
-
-CONFIG_NCPFS_SMALLDOS
-  If you say Y here, every filename on a NetWare server volume using
-  the OS2/LONG namespace and created under DOS or on a volume using
-  DOS namespace will be converted to lowercase characters.
-  Saying N here will give you these filenames in uppercase.
-
-  This is only a cosmetic option since the OS2/LONG namespace is case
-  insensitive. The only major reason for this option is backward
-  compatibility when moving from DOS to OS2/LONG namespace support.
-  Long filenames (created by Win95) will not be affected.
-
-  This option does not solve the problem that filenames appear
-  differently under Linux and under Windows, since Windows does an
-  additional conversions on the client side. You can achieve similar
-  effects by saying Y to "Allow using of Native Language Support"
-  below.
-
-CONFIG_NCPFS_NLS
-  Allows you to use codepages and I/O charsets for file name
-  translation between the server file system and input/output. This
-  may be useful, if you want to access the server with other operating
-  systems, e.g. Windows 95. See also NLS for more Information.
-
-  To select codepages and I/O charsets use ncpfs-2.2.0.13 or newer.
-
-CONFIG_NCPFS_EXTRAS
-  This enables the use of symbolic links and an execute permission
-  bit on NCPFS. The file server need not have long name space or NFS
-  name space loaded for these to work.
-
-  To use the new attributes, it is recommended to use the flags
-  '-f 600 -d 755' on the ncpmount command line.
-
diff -Nru a/fs/ncpfs/Config.in b/fs/ncpfs/Config.in
--- a/fs/ncpfs/Config.in	Wed Oct 30 16:44:21 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,11 +0,0 @@
-#
-# NCP Filesystem configuration
-#
-dep_mbool '  Packet signatures' CONFIG_NCPFS_PACKET_SIGNING $CONFIG_NCP_FS
-dep_mbool '  Proprietary file locking' CONFIG_NCPFS_IOCTL_LOCKING $CONFIG_NCP_FS
-dep_mbool '  Clear remove/delete inhibit when needed' CONFIG_NCPFS_STRONG $CONFIG_NCP_FS
-dep_mbool '  Use NFS namespace if available' CONFIG_NCPFS_NFS_NS $CONFIG_NCP_FS
-dep_mbool '  Use LONG (OS/2) namespace if available' CONFIG_NCPFS_OS2_NS $CONFIG_NCP_FS
-dep_mbool '  Lowercase DOS filenames' CONFIG_NCPFS_SMALLDOS $CONFIG_NCP_FS
-dep_mbool '  Use Native Language Support' CONFIG_NCPFS_NLS $CONFIG_NCP_FS
-dep_mbool '  Enable symbolic links and execute flags' CONFIG_NCPFS_EXTRAS $CONFIG_NCP_FS
diff -Nru a/fs/ncpfs/Kconfig b/fs/ncpfs/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/ncpfs/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,86 @@
+#
+# NCP Filesystem configuration
+#
+config NCPFS_PACKET_SIGNING
+	bool "Packet signatures"
+	depends on NCP_FS
+	help
+	  NCP allows packets to be signed for stronger security. If you want
+	  security, say Y.  Normal users can leave it off.  To be able to use
+	  packet signing you must use ncpfs > 2.0.12.
+
+config NCPFS_IOCTL_LOCKING
+	bool "Proprietary file locking"
+	depends on NCP_FS
+	help
+	  Allows locking of records on remote volumes.  Say N unless you have
+	  special applications which are able to utilize this locking scheme.
+
+config NCPFS_STRONG
+	bool "Clear remove/delete inhibit when needed"
+	depends on NCP_FS
+	help
+	  Allows manipulation of files flagged as Delete or Rename Inhibit.
+	  To use this feature you must mount volumes with the ncpmount
+	  parameter "-s" (ncpfs-2.0.12 and newer).  Say Y unless you are not
+	  mounting volumes with -f 444.
+
+config NCPFS_NFS_NS
+	bool "Use NFS namespace if available"
+	depends on NCP_FS
+	help
+	  Allows you to utilize NFS namespace on NetWare servers.  It brings
+	  you case sensitive filenames.  Say Y.  You can disable it at
+	  mount-time with the `-N nfs' parameter of ncpmount.
+
+config NCPFS_OS2_NS
+	bool "Use LONG (OS/2) namespace if available"
+	depends on NCP_FS
+	help
+	  Allows you to utilize OS2/LONG namespace on NetWare servers.
+	  Filenames in this namespace are limited to 255 characters, they are
+	  case insensitive, and case in names is preserved.  Say Y.  You can
+	  disable it at mount time with the -N os2 parameter of ncpmount.
+
+config NCPFS_SMALLDOS
+	bool "Lowercase DOS filenames"
+	depends on NCP_FS
+	---help---
+	  If you say Y here, every filename on a NetWare server volume using
+	  the OS2/LONG namespace and created under DOS or on a volume using
+	  DOS namespace will be converted to lowercase characters.
+	  Saying N here will give you these filenames in uppercase.
+
+	  This is only a cosmetic option since the OS2/LONG namespace is case
+	  insensitive. The only major reason for this option is backward
+	  compatibility when moving from DOS to OS2/LONG namespace support.
+	  Long filenames (created by Win95) will not be affected.
+
+	  This option does not solve the problem that filenames appear
+	  differently under Linux and under Windows, since Windows does an
+	  additional conversions on the client side. You can achieve similar
+	  effects by saying Y to "Allow using of Native Language Support"
+	  below.
+
+config NCPFS_NLS
+	bool "Use Native Language Support"
+	depends on NCP_FS
+	help
+	  Allows you to use codepages and I/O charsets for file name
+	  translation between the server file system and input/output. This
+	  may be useful, if you want to access the server with other operating
+	  systems, e.g. Windows 95. See also NLS for more Information.
+
+	  To select codepages and I/O charsets use ncpfs-2.2.0.13 or newer.
+
+config NCPFS_EXTRAS
+	bool "Enable symbolic links and execute flags"
+	depends on NCP_FS
+	help
+	  This enables the use of symbolic links and an execute permission
+	  bit on NCPFS. The file server need not have long name space or NFS
+	  name space loaded for these to work.
+
+	  To use the new attributes, it is recommended to use the flags
+	  '-f 600 -d 755' on the ncpmount command line.
+
diff -Nru a/fs/nfsd/export.c b/fs/nfsd/export.c
--- a/fs/nfsd/export.c	Wed Oct 30 16:44:29 2002
+++ b/fs/nfsd/export.c	Wed Oct 30 16:44:29 2002
@@ -738,23 +738,6 @@
 	exp_fsid_unhash(unexp);
 }
 
-/*
- * Revoke all exports for a given client.
- */
-static void
-exp_unexport_all(svc_client *clp)
-{
-	struct svc_export *exp;
-	int index;
-
-	dprintk("unexporting all fs's for clnt %p\n", clp);
-
-	cache_for_each(exp, &svc_export_cache, index, h)
-		if (exp->ex_client == clp)
-			exp_do_unexport(exp);
-	cache_flush();
-
-}
 
 /*
  * unexport syscall.
@@ -1109,6 +1092,18 @@
 }
 
 /*
+ * Flush exports table - called when last nfsd thread is killed
+ */
+void
+nfsd_export_flush(void)
+{
+	exp_writelock();
+	cache_purge(&svc_expkey_cache);
+	cache_purge(&svc_export_cache);
+	exp_writeunlock();
+}
+
+/*
  * Shutdown the exports module.
  */
 void
@@ -1118,8 +1113,6 @@
 	dprintk("nfsd: shutting down export module.\n");
 
 	exp_writelock();
-
-	exp_unexport_all(NULL);
 
 	if (cache_unregister(&svc_expkey_cache))
 		printk(KERN_ERR "nfsd: failed to unregister expkey cache\n");
diff -Nru a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
--- a/fs/nfsd/nfs3proc.c	Wed Oct 30 16:44:27 2002
+++ b/fs/nfsd/nfs3proc.c	Wed Oct 30 16:44:27 2002
@@ -43,11 +43,11 @@
 /*
  * Reserve room in the send buffer
  */
-static void
-svcbuf_reserve(struct svc_buf *buf, u32 **ptr, int *len, int nr)
+static inline void
+svcbuf_reserve(struct xdr_buf *buf, u32 **ptr, int *len, int nr)
 {
-	*ptr = buf->buf + nr;
-	*len = buf->buflen - buf->len - nr;
+	*ptr = (u32*)(buf->head[0].iov_base+buf->head[0].iov_len) + nr;
+	*len = ((PAGE_SIZE-buf->head[0].iov_len)>>2) - nr;
 }
 
 /*
@@ -150,7 +150,7 @@
 	dprintk("nfsd: READLINK(3) %s\n", SVCFH_fmt(&argp->fh));
 
 	/* Reserve room for status, post_op_attr, and path length */
-	svcbuf_reserve(&rqstp->rq_resbuf, &path, &dummy,
+	svcbuf_reserve(&rqstp->rq_res, &path, &dummy,
 				1 + NFS3_POST_OP_ATTR_WORDS + 1);
 
 	/* Read the symlink. */
@@ -167,8 +167,7 @@
 nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
 				        struct nfsd3_readres  *resp)
 {
-	u32 *	buffer;
-	int	nfserr, avail;
+	int	nfserr;
 
 	dprintk("nfsd: READ(3) %s %lu bytes at %lu\n",
 				SVCFH_fmt(&argp->fh),
@@ -179,18 +178,17 @@
 	 * 1 (status) + 22 (post_op_attr) + 1 (count) + 1 (eof)
 	 * + 1 (xdr opaque byte count) = 26
 	 */
-	svcbuf_reserve(&rqstp->rq_resbuf, &buffer, &avail,
-			1 + NFS3_POST_OP_ATTR_WORDS + 3);
+
 	resp->count = argp->count;
-	if ((avail << 2) < resp->count)
-		resp->count = avail << 2;
+	if (NFSSVC_MAXBLKSIZE < resp->count)
+		resp->count = NFSSVC_MAXBLKSIZE;
 
-	svc_reserve(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + argp->count +4);
+	svc_reserve(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4);
 
 	fh_copy(&resp->fh, &argp->fh);
 	nfserr = nfsd_read(rqstp, &resp->fh,
 				  argp->offset,
-				  (char *) buffer,
+			   	  argp->vec, argp->vlen,
 				  &resp->count);
 	if (nfserr == 0) {
 		struct inode	*inode = resp->fh.fh_dentry->d_inode;
@@ -220,7 +218,7 @@
 	resp->committed = argp->stable;
 	nfserr = nfsd_write(rqstp, &resp->fh,
 				   argp->offset,
-				   argp->data,
+				   argp->vec, argp->vlen,
 				   argp->len,
 				   &resp->committed);
 	resp->count = argp->count;
@@ -447,7 +445,7 @@
 				argp->count, (u32) argp->cookie);
 
 	/* Reserve buffer space for status, attributes and verifier */
-	svcbuf_reserve(&rqstp->rq_resbuf, &buffer, &count,
+	svcbuf_reserve(&rqstp->rq_res, &buffer, &count,
 				1 + NFS3_POST_OP_ATTR_WORDS + 2);
 
 	/* Make sure we've room for the NULL ptr & eof flag, and shrink to
@@ -457,11 +455,18 @@
 
 	/* Read directory and encode entries on the fly */
 	fh_copy(&resp->fh, &argp->fh);
-	nfserr = nfsd_readdir(rqstp, &resp->fh, (loff_t) argp->cookie, 
-					nfs3svc_encode_entry,
-					buffer, &count, argp->verf, NULL);
+
+	resp->buflen = count;
+	resp->common.err = nfs_ok;
+	resp->buffer = buffer;
+	resp->offset = NULL;
+	resp->rqstp = rqstp;
+	nfserr = nfsd_readdir(rqstp, &resp->fh, (loff_t*) &argp->cookie, 
+					&resp->common, nfs3svc_encode_entry);
 	memcpy(resp->verf, argp->verf, 8);
-	resp->count = count;
+	resp->count = resp->buffer - buffer;
+	if (resp->offset)
+		xdr_encode_hyper(resp->offset, argp->cookie);
 
 	RETURN_STATUS(nfserr);
 }
@@ -476,13 +481,14 @@
 {
 	u32 *	buffer;
 	int	nfserr, count, want;
+	loff_t	offset;
 
 	dprintk("nfsd: READDIR+(3) %s %d bytes at %d\n",
 				SVCFH_fmt(&argp->fh),
 				argp->count, (u32) argp->cookie);
 
 	/* Reserve buffer space for status, attributes and verifier */
-	svcbuf_reserve(&rqstp->rq_resbuf, &buffer, &count,
+	svcbuf_reserve(&rqstp->rq_res, &buffer, &count,
 				1 + NFS3_POST_OP_ATTR_WORDS + 2);
 
 	/* Make sure we've room for the NULL ptr & eof flag, and shrink to
@@ -492,11 +498,18 @@
 
 	/* Read directory and encode entries on the fly */
 	fh_copy(&resp->fh, &argp->fh);
-	nfserr = nfsd_readdir(rqstp, &resp->fh, (loff_t) argp->cookie, 
-					nfs3svc_encode_entry_plus,
-					buffer, &count, argp->verf, NULL);
+
+	resp->buflen = count;
+	resp->common.err = nfs_ok;
+	resp->buffer = buffer;
+	resp->rqstp = rqstp;
+	offset = argp->cookie;
+	nfserr = nfsd_readdir(rqstp, &resp->fh, &offset, 
+			      &resp->common, nfs3svc_encode_entry_plus);
 	memcpy(resp->verf, argp->verf, 8);
-	resp->count = count;
+	resp->count = resp->buffer - buffer;
+	if (resp->offset)
+		xdr_encode_hyper(resp->offset, offset);
 
 	RETURN_STATUS(nfserr);
 }
diff -Nru a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
--- a/fs/nfsd/nfs3xdr.c	Wed Oct 30 16:44:17 2002
+++ b/fs/nfsd/nfs3xdr.c	Wed Oct 30 16:44:17 2002
@@ -13,6 +13,7 @@
 #include <linux/spinlock.h>
 #include <linux/dcache.h>
 #include <linux/namei.h>
+#include <linux/mm.h>
 
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/svc.h>
@@ -212,8 +213,8 @@
 		p = xdr_encode_hyper(p, (u64) fhp->fh_post_size);
 	}
 	p = xdr_encode_hyper(p, ((u64)fhp->fh_post_blocks) << 9);
-	*p++ = htonl((u32) major(fhp->fh_post_rdev));
-	*p++ = htonl((u32) minor(fhp->fh_post_rdev));
+	*p++ = fhp->fh_post_rdev[0];
+	*p++ = fhp->fh_post_rdev[1];
 	if (rqstp->rq_reffh->fh_version == 1
 	    && rqstp->rq_reffh->fh_fsid_type == 1
 	    && (fhp->fh_export->ex_flags & NFSEXP_FSID))
@@ -269,27 +270,6 @@
 	return encode_post_op_attr(rqstp, p, fhp);
 }
 
-/*
- * Check buffer bounds after decoding arguments
- */
-static inline int
-xdr_argsize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_argbuf;
-
-	return p - buf->base <= buf->buflen;
-}
-
-static inline int
-xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_resbuf;
-
-	buf->len = p - buf->base;
-	dprintk("nfsd: ressize_check p %p base %p len %d\n",
-			p, buf->base, buf->buflen);
-	return (buf->len <= buf->buflen);
-}
 
 /*
  * XDR decode functions
@@ -342,11 +322,29 @@
 nfs3svc_decode_readargs(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd3_readargs *args)
 {
+	int len;
+	int v,pn;
+
 	if (!(p = decode_fh(p, &args->fh))
 	 || !(p = xdr_decode_hyper(p, &args->offset)))
 		return 0;
 
-	args->count = ntohl(*p++);
+	len = args->count = ntohl(*p++);
+
+	if (len > NFSSVC_MAXBLKSIZE)
+		len = NFSSVC_MAXBLKSIZE;
+
+	/* set up the iovec */
+	v=0;
+	while (len > 0) {
+		pn = rqstp->rq_resused;
+		take_page(rqstp);
+		args->vec[v].iov_base = page_address(rqstp->rq_respages[pn]);
+		args->vec[v].iov_len = len < PAGE_SIZE? len : PAGE_SIZE;
+		v++;
+		len -= PAGE_SIZE;
+	}
+	args->vlen = v;
 	return xdr_argsize_check(rqstp, p);
 }
 
@@ -354,17 +352,33 @@
 nfs3svc_decode_writeargs(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd3_writeargs *args)
 {
+	int len, v;
+
 	if (!(p = decode_fh(p, &args->fh))
 	 || !(p = xdr_decode_hyper(p, &args->offset)))
 		return 0;
 
 	args->count = ntohl(*p++);
 	args->stable = ntohl(*p++);
-	args->len = ntohl(*p++);
-	args->data = (char *) p;
-	p += XDR_QUADLEN(args->len);
+	len = args->len = ntohl(*p++);
 
-	return xdr_argsize_check(rqstp, p);
+	args->vec[0].iov_base = (void*)p;
+	args->vec[0].iov_len = rqstp->rq_arg.head[0].iov_len -
+		(((void*)p) - rqstp->rq_arg.head[0].iov_base);
+
+	if (len > NFSSVC_MAXBLKSIZE)
+		len = NFSSVC_MAXBLKSIZE;
+	v=  0;
+	while (len > args->vec[v].iov_len) {
+		len -= args->vec[v].iov_len;
+		v++;
+		args->vec[v].iov_base = page_address(rqstp->rq_argpages[v]);
+		args->vec[v].iov_len = PAGE_SIZE;
+	}
+	args->vec[v].iov_len = len;
+	args->vlen = v+1;
+
+	return args->count == args->len && args->vec[0].iov_len > 0;
 }
 
 int
@@ -584,9 +598,23 @@
 		*p++ = htonl(resp->count);
 		*p++ = htonl(resp->eof);
 		*p++ = htonl(resp->count);	/* xdr opaque count */
-		p += XDR_QUADLEN(resp->count);
-	}
-	return xdr_ressize_check(rqstp, p);
+		xdr_ressize_check(rqstp, p);
+		/* now update rqstp->rq_res to reflect data aswell */
+		rqstp->rq_res.page_base = 0;
+		rqstp->rq_res.page_len = resp->count;
+		if (resp->count & 3) {
+			/* need to page with tail */
+			rqstp->rq_res.tail[0].iov_base = p;
+			*p = 0;
+			rqstp->rq_res.tail[0].iov_len = 4 - (resp->count & 3);
+		}
+		rqstp->rq_res.len =
+			rqstp->rq_res.head[0].iov_len+
+			rqstp->rq_res.page_len+
+			rqstp->rq_res.tail[0].iov_len;
+		return 1;
+	} else
+		return xdr_ressize_check(rqstp, p);
 }
 
 /* WRITE */
@@ -644,10 +672,13 @@
 					struct nfsd3_readdirres *resp)
 {
 	p = encode_post_op_attr(rqstp, p, &resp->fh);
+
 	if (resp->status == 0) {
 		/* stupid readdir cookie */
 		memcpy(p, resp->verf, 8); p += 2;
-		p += XDR_QUADLEN(resp->count);
+		p = resp->buffer;
+		*p++ = 0;		/* no more entries */
+		*p++ = htonl(resp->common.err == nfserr_eof);
 	}
 
 	return xdr_ressize_check(rqstp, p);
@@ -666,20 +697,16 @@
 #define NFS3_ENTRY_BAGGAGE	(2 + 1 + 2 + 1)
 #define NFS3_ENTRYPLUS_BAGGAGE	(1 + 21 + 1 + (NFS3_FHSIZE >> 2))
 static int
-encode_entry(struct readdir_cd *cd, const char *name,
+encode_entry(struct readdir_cd *ccd, const char *name,
 	     int namlen, off_t offset, ino_t ino, unsigned int d_type, int plus)
 {
+	struct nfsd3_readdirres *cd = container_of(ccd, struct nfsd3_readdirres, common);
 	u32		*p = cd->buffer;
 	int		buflen, slen, elen;
 
 	if (cd->offset)
 		xdr_encode_hyper(cd->offset, (u64) offset);
 
-	/* nfsd_readdir calls us with name == 0 when it wants us to
-	 * set the last offset entry. */
-	if (name == 0)
-		return 0;
-
 	/*
 	dprintk("encode_entry(%.*s @%ld%s)\n",
 		namlen, name, (long) offset, plus? " plus" : "");
@@ -693,7 +720,7 @@
 	elen = slen + NFS3_ENTRY_BAGGAGE
 		+ (plus? NFS3_ENTRYPLUS_BAGGAGE : 0);
 	if ((buflen = cd->buflen - elen) < 0) {
-		cd->eob = 1;
+		cd->common.err = nfserr_readdir_nospc;
 		return -EINVAL;
 	}
 	*p++ = xdr_one;				 /* mark entry present */
@@ -709,8 +736,8 @@
 		struct svc_export	*exp;
 		struct dentry		*dparent, *dchild;
 
-		dparent = cd->dirfh->fh_dentry;
-		exp  = cd->dirfh->fh_export;
+		dparent = cd->fh.fh_dentry;
+		exp  = cd->fh.fh_export;
 
 		fh_init(&fh, NFS3_FHSIZE);
 		if (isdotent(name, namlen)) {
@@ -724,7 +751,7 @@
 			dchild = lookup_one_len(name, dparent,namlen);
 		if (IS_ERR(dchild))
 			goto noexec;
-		if (fh_compose(&fh, exp, dchild, cd->dirfh) != 0 || !dchild->d_inode)
+		if (fh_compose(&fh, exp, dchild, &cd->fh) != 0 || !dchild->d_inode)
 			goto noexec;
 		p = encode_post_op_attr(cd->rqstp, p, &fh);
 		*p++ = xdr_one; /* yes, a file handle follows */
@@ -735,6 +762,7 @@
 out:
 	cd->buflen = buflen;
 	cd->buffer = p;
+	cd->common.err = nfs_ok;
 	return 0;
 
 noexec:
diff -Nru a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
--- a/fs/nfsd/nfs4xdr.c	Wed Oct 30 16:44:26 2002
+++ b/fs/nfsd/nfs4xdr.c	Wed Oct 30 16:44:26 2002
@@ -1313,9 +1313,10 @@
 }
 
 static int
-nfsd4_encode_dirent(struct readdir_cd *cd, const char *name, int namlen,
+nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
 		    loff_t offset, ino_t ino, unsigned int d_type)
 {
+	struct nfsd4_readdir *cd = container_of(ccd, struct nfsd4_readdir, common);
 	int buflen;
 	u32 *p = cd->buffer;
 	u32 *attrlenp;
@@ -1324,17 +1325,14 @@
 	int nfserr = 0;
 
 	/* In nfsv4, "." and ".." never make it onto the wire.. */
-	if (name && isdotent(name, namlen))
+	if (name && isdotent(name, namlen)) {
+		cd->common.err = nfs_ok;
 		return 0;
+	}
 
 	if (cd->offset)
 		xdr_encode_hyper(cd->offset, (u64) offset);
 
-	/* nfsd_readdir calls us with name == 0 when it wants us to
-	 * set the last offset entry. */
-	if (name == 0)
-		return 0;
-
 	buflen = cd->buflen - 4 - XDR_QUADLEN(namlen);
 	if (buflen < 0)
 		goto nospc;
@@ -1347,8 +1345,8 @@
 	/*
 	 * Now we come to the ugly part: writing the fattr for this entry.
 	 */
-	bmval0 = cd->bmval[0];
-	bmval1 = cd->bmval[1];
+	bmval0 = cd->rd_bmval[0];
+	bmval1 = cd->rd_bmval[1];
 	if ((bmval0 & ~(FATTR4_WORD0_RDATTR_ERROR | FATTR4_WORD0_FILEID)) || bmval1)  {
 		/*
 		 * "Heavyweight" case: we have no choice except to
@@ -1356,14 +1354,14 @@
 		 * only Windows clients will trigger this code
 		 * path.
 		 */
-		dentry = lookup_one_len(name, cd->dirfh->fh_dentry, namlen);
+		dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
 		if (IS_ERR(dentry)) {
 			nfserr = nfserrno(PTR_ERR(dentry));
 			goto error;
 		}
 
-		nfserr = nfsd4_encode_fattr(NULL, cd->dirfh->fh_export,
-					    dentry, p, &buflen, cd->bmval);
+		nfserr = nfsd4_encode_fattr(NULL, cd->rd_fhp->fh_export,
+					    dentry, p, &buflen, cd->rd_bmval);
 		dput(dentry);
 
 		if (!nfserr) {
@@ -1384,7 +1382,7 @@
 		 * entire READDIR operation(!)
 		 */
 		if (!(bmval0 & FATTR4_WORD0_RDATTR_ERROR)) {
-			cd->nfserr = nfserr;
+			cd->common.err = nfserr;
 			return -EINVAL;
 		}
 
@@ -1414,10 +1412,11 @@
 out:
 	cd->buflen -= (p - cd->buffer);
 	cd->buffer = p;
+	cd->common.err = nfs_ok;
 	return 0;
 
 nospc:
-	cd->eob = 1;
+	cd->common.err = nfserr_readdir_nospc;
 	return -EINVAL;
 }
 
@@ -1643,6 +1642,7 @@
 nfsd4_encode_readdir(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_readdir *readdir)
 {
 	int maxcount;
+	loff_t offset;
 	ENCODE_HEAD;
 
 	if (nfserr)
@@ -1667,17 +1667,26 @@
 	WRITE32(0);
 	WRITE32(0);
 
+	readdir->common.err = 0;
+	readdir->buflen = maxcount;
+	readdir->buffer = p;
+	readdir->offset = NULL;
+
+	offset = readdir->rd_cookie;
 	nfserr = nfsd_readdir(readdir->rd_rqstp, readdir->rd_fhp,
-			      readdir->rd_cookie, nfsd4_encode_dirent,
-			      p, &maxcount, NULL, readdir->rd_bmval);
+			      &offset,
+			      &readdir->common, nfsd4_encode_dirent);
+	if (nfserr == nfs_ok &&
+	    readdir->common.err == nfserr_readdir_nospc &&
+	    readdir->buffer == p)
+		nfserr = nfserr_readdir_nospc;
 	if (!nfserr) {
-		/*
-		 * nfsd_readdir() expects 'maxcount' to be a count of
-		 * words, but fills it in with a count of bytes at the
-		 * end!
-		 */
-		BUG_ON(maxcount & 3);
-		p += (maxcount >> 2);
+		if (readdir->offset)
+			xdr_encode_hyper(readdir->offset, offset);
+
+		p = readdir->buffer;
+		*p++ = 0;	/* no more entries */
+		*p++ = htonl(readdir->common.err == nfserr_eof);
 		ADJUST_ARGS();
 	}
 	return nfserr;
diff -Nru a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
--- a/fs/nfsd/nfscache.c	Wed Oct 30 16:44:35 2002
+++ b/fs/nfsd/nfscache.c	Wed Oct 30 16:44:35 2002
@@ -41,7 +41,7 @@
 static struct svc_cacherep *	nfscache;
 static int			cache_disabled = 1;
 
-static int	nfsd_cache_append(struct svc_rqst *rqstp, struct svc_buf *data);
+static int	nfsd_cache_append(struct svc_rqst *rqstp, struct iovec *vec);
 
 /* 
  * locking for the reply cache:
@@ -107,7 +107,7 @@
 
 	for (rp = lru_head; rp; rp = rp->c_lru_next) {
 		if (rp->c_state == RC_DONE && rp->c_type == RC_REPLBUFF)
-			kfree(rp->c_replbuf.buf);
+			kfree(rp->c_replvec.iov_base);
 	}
 
 	cache_disabled = 1;
@@ -242,8 +242,8 @@
 
 	/* release any buffer */
 	if (rp->c_type == RC_REPLBUFF) {
-		kfree(rp->c_replbuf.buf);
-		rp->c_replbuf.buf = NULL;
+		kfree(rp->c_replvec.iov_base);
+		rp->c_replvec.iov_base = NULL;
 	}
 	rp->c_type = RC_NOCACHE;
  out:
@@ -272,11 +272,11 @@
 	case RC_NOCACHE:
 		break;
 	case RC_REPLSTAT:
-		svc_putu32(&rqstp->rq_resbuf, rp->c_replstat);
+		svc_putu32(&rqstp->rq_res.head[0], rp->c_replstat);
 		rtn = RC_REPLY;
 		break;
 	case RC_REPLBUFF:
-		if (!nfsd_cache_append(rqstp, &rp->c_replbuf))
+		if (!nfsd_cache_append(rqstp, &rp->c_replvec))
 			goto out;	/* should not happen */
 		rtn = RC_REPLY;
 		break;
@@ -308,13 +308,14 @@
 nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, u32 *statp)
 {
 	struct svc_cacherep *rp;
-	struct svc_buf	*resp = &rqstp->rq_resbuf, *cachp;
+	struct iovec	*resv = &rqstp->rq_res.head[0], *cachv;
 	int		len;
 
 	if (!(rp = rqstp->rq_cacherep) || cache_disabled)
 		return;
 
-	len = resp->len - (statp - resp->base);
+	len = resv->iov_len - ((char*)statp - (char*)resv->iov_base);
+	len >>= 2;
 	
 	/* Don't cache excessive amounts of data and XDR failures */
 	if (!statp || len > (256 >> 2)) {
@@ -329,16 +330,16 @@
 		rp->c_replstat = *statp;
 		break;
 	case RC_REPLBUFF:
-		cachp = &rp->c_replbuf;
-		cachp->buf = (u32 *) kmalloc(len << 2, GFP_KERNEL);
-		if (!cachp->buf) {
+		cachv = &rp->c_replvec;
+		cachv->iov_base = kmalloc(len << 2, GFP_KERNEL);
+		if (!cachv->iov_base) {
 			spin_lock(&cache_lock);
 			rp->c_state = RC_UNUSED;
 			spin_unlock(&cache_lock);
 			return;
 		}
-		cachp->len = len;
-		memcpy(cachp->buf, statp, len << 2);
+		cachv->iov_len = len << 2;
+		memcpy(cachv->iov_base, statp, len << 2);
 		break;
 	}
 	spin_lock(&cache_lock);
@@ -353,19 +354,20 @@
 
 /*
  * Copy cached reply to current reply buffer. Should always fit.
+ * FIXME as reply is in a page, we should just attach the page, and
+ * keep a refcount....
  */
 static int
-nfsd_cache_append(struct svc_rqst *rqstp, struct svc_buf *data)
+nfsd_cache_append(struct svc_rqst *rqstp, struct iovec *data)
 {
-	struct svc_buf	*resp = &rqstp->rq_resbuf;
+	struct iovec	*vec = &rqstp->rq_res.head[0];
 
-	if (resp->len + data->len > resp->buflen) {
+	if (vec->iov_len + data->iov_len > PAGE_SIZE) {
 		printk(KERN_WARNING "nfsd: cached reply too large (%d).\n",
-				data->len);
+				data->iov_len);
 		return 0;
 	}
-	memcpy(resp->buf, data->buf, data->len << 2);
-	resp->buf += data->len;
-	resp->len += data->len;
+	memcpy((char*)vec->iov_base + vec->iov_len, data->iov_base, data->iov_len);
+	vec->iov_len += data->iov_len;
 	return 1;
 }
diff -Nru a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
--- a/fs/nfsd/nfsctl.c	Wed Oct 30 16:44:24 2002
+++ b/fs/nfsd/nfsctl.c	Wed Oct 30 16:44:24 2002
@@ -127,14 +127,16 @@
 static int exports_open(struct inode *inode, struct file *file)
 {
 	int res;
+	char *namebuf = kmalloc(PAGE_SIZE, GFP_KERNEL);
+	if (namebuf == NULL)
+		return -ENOMEM;
+
 	res = seq_open(file, &nfs_exports_op);
-	if (!res) {
-		char *namebuf = kmalloc(PAGE_SIZE, GFP_KERNEL);
-		if (namebuf == NULL)
-			res = -ENOMEM;
-		else
-			((struct seq_file *)file->private_data)->private = namebuf;
-	}
+	if (res)
+		kfree(namebuf);
+	else
+		((struct seq_file *)file->private_data)->private = namebuf;
+
 	return res;
 }
 static int exports_release(struct inode *inode, struct file *file)
diff -Nru a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
--- a/fs/nfsd/nfsproc.c	Wed Oct 30 16:44:27 2002
+++ b/fs/nfsd/nfsproc.c	Wed Oct 30 16:44:27 2002
@@ -30,11 +30,11 @@
 #define NFSDDBG_FACILITY		NFSDDBG_PROC
 
 
-static void
-svcbuf_reserve(struct svc_buf *buf, u32 **ptr, int *len, int nr)
+static inline void
+svcbuf_reserve(struct xdr_buf *buf, u32 **ptr, int *len, int nr)
 {
-	*ptr = buf->buf + nr;
-	*len = buf->buflen - buf->len - nr;
+	*ptr = (u32*)(buf->head[0].iov_base+buf->head[0].iov_len) + nr;
+	*len = ((PAGE_SIZE-buf->head[0].iov_len)>>2) - nr;
 }
 
 static int
@@ -109,7 +109,7 @@
 	dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh));
 
 	/* Reserve room for status and path length */
-	svcbuf_reserve(&rqstp->rq_resbuf, &path, &dummy, 2);
+	svcbuf_reserve(&rqstp->rq_res, &path, &dummy, 2);
 
 	/* Read the symlink. */
 	resp->len = NFS_MAXPATHLEN;
@@ -127,8 +127,7 @@
 nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
 				       struct nfsd_readres  *resp)
 {
-	u32 *	buffer;
-	int	nfserr, avail;
+	int	nfserr;
 
 	dprintk("nfsd: READ    %s %d bytes at %d\n",
 		SVCFH_fmt(&argp->fh),
@@ -137,22 +136,21 @@
 	/* Obtain buffer pointer for payload. 19 is 1 word for
 	 * status, 17 words for fattr, and 1 word for the byte count.
 	 */
-	svcbuf_reserve(&rqstp->rq_resbuf, &buffer, &avail, 19);
 
-	if ((avail << 2) < argp->count) {
+	if (NFSSVC_MAXBLKSIZE < argp->count) {
 		printk(KERN_NOTICE
 			"oversized read request from %08x:%d (%d bytes)\n",
 				ntohl(rqstp->rq_addr.sin_addr.s_addr),
 				ntohs(rqstp->rq_addr.sin_port),
 				argp->count);
-		argp->count = avail << 2;
+		argp->count = NFSSVC_MAXBLKSIZE;
 	}
 	svc_reserve(rqstp, (19<<2) + argp->count + 4);
 
 	resp->count = argp->count;
 	nfserr = nfsd_read(rqstp, fh_copy(&resp->fh, &argp->fh),
 				  argp->offset,
-				  (char *) buffer,
+			   	  argp->vec, argp->vlen,
 				  &resp->count);
 
 	return nfserr;
@@ -175,7 +173,7 @@
 
 	nfserr = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh),
 				   argp->offset,
-				   argp->data,
+				   argp->vec, argp->vlen,
 				   argp->len,
 				   &stable);
 	return nfserr;
@@ -471,13 +469,14 @@
 {
 	u32 *		buffer;
 	int		nfserr, count;
+	loff_t		offset;
 
 	dprintk("nfsd: READDIR  %s %d bytes at %d\n",
 		SVCFH_fmt(&argp->fh),		
 		argp->count, argp->cookie);
 
 	/* Reserve buffer space for status */
-	svcbuf_reserve(&rqstp->rq_resbuf, &buffer, &count, 1);
+	svcbuf_reserve(&rqstp->rq_res, &buffer, &count, 1);
 
 	/* Shrink to the client read size */
 	if (count > (argp->count >> 2))
@@ -488,11 +487,18 @@
 	if (count < 0)
 		count = 0;
 
+	resp->buffer = buffer;
+	resp->offset = NULL;
+	resp->buflen = count;
+	resp->common.err = nfs_ok;
 	/* Read directory and encode entries on the fly */
-	nfserr = nfsd_readdir(rqstp, &argp->fh, (loff_t) argp->cookie, 
-			      nfssvc_encode_entry,
-			      buffer, &count, NULL, NULL);
-	resp->count = count;
+	offset = argp->cookie;
+	nfserr = nfsd_readdir(rqstp, &argp->fh, &offset, 
+			      &resp->common, nfssvc_encode_entry);
+
+	resp->count = resp->buffer - buffer;
+	if (resp->offset)
+		*resp->offset = (u32)offset;
 
 	fh_put(&argp->fh);
 	return nfserr;
diff -Nru a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
--- a/fs/nfsd/nfssvc.c	Wed Oct 30 16:44:19 2002
+++ b/fs/nfsd/nfssvc.c	Wed Oct 30 16:44:19 2002
@@ -238,7 +238,7 @@
 		printk(KERN_WARNING "nfsd: last server has exited\n");
 		if (err != SIG_NOCLEAN) {
 			printk(KERN_WARNING "nfsd: unexporting all filesystems\n");
-			nfsd_export_shutdown();
+			nfsd_export_flush();
 		}
 		nfsd_serv = NULL;
 	        nfsd_racache_shutdown();	/* release read-ahead cache */
@@ -277,7 +277,8 @@
 
 	/* Decode arguments */
 	xdr = proc->pc_decode;
-	if (xdr && !xdr(rqstp, rqstp->rq_argbuf.buf, rqstp->rq_argp)) {
+	if (xdr && !xdr(rqstp, (u32*)rqstp->rq_arg.head[0].iov_base,
+			rqstp->rq_argp)) {
 		dprintk("nfsd: failed to decode arguments!\n");
 		nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
 		*statp = rpc_garbage_args;
@@ -293,14 +294,15 @@
 	}
 		
 	if (rqstp->rq_proc != 0)
-		svc_putu32(&rqstp->rq_resbuf, nfserr);
+		svc_putu32(&rqstp->rq_res.head[0], nfserr);
 
 	/* Encode result.
 	 * For NFSv2, additional info is never returned in case of an error.
 	 */
 	if (!(nfserr && rqstp->rq_vers == 2)) {
 		xdr = proc->pc_encode;
-		if (xdr && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) {
+		if (xdr && !xdr(rqstp, (u32*)(rqstp->rq_res.head[0].iov_base+rqstp->rq_res.head[0].iov_len),
+				rqstp->rq_resp)) {
 			/* Failed to encode result. Release cache entry */
 			dprintk("nfsd: failed to encode result!\n");
 			nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
diff -Nru a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
--- a/fs/nfsd/nfsxdr.c	Wed Oct 30 16:44:19 2002
+++ b/fs/nfsd/nfsxdr.c	Wed Oct 30 16:44:19 2002
@@ -14,6 +14,7 @@
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>
 #include <linux/nfsd/xdr.h>
+#include <linux/mm.h>
 
 #define NFSDDBG_FACILITY		NFSDDBG_XDR
 
@@ -176,27 +177,6 @@
 	return p;
 }
 
-/*
- * Check buffer bounds after decoding arguments
- */
-static inline int
-xdr_argsize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_argbuf;
-
-	return p - buf->base <= buf->buflen;
-}
-
-static inline int
-xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
-{
-	struct svc_buf	*buf = &rqstp->rq_resbuf;
-
-	buf->len = p - buf->base;
-	dprintk("nfsd: ressize_check p %p base %p len %d\n",
-			p, buf->base, buf->buflen);
-	return (buf->len <= buf->buflen);
-}
 
 /*
  * XDR decode functions
@@ -241,13 +221,31 @@
 nfssvc_decode_readargs(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd_readargs *args)
 {
+	int len;
+	int v,pn;
 	if (!(p = decode_fh(p, &args->fh)))
 		return 0;
 
 	args->offset    = ntohl(*p++);
-	args->count     = ntohl(*p++);
-	args->totalsize = ntohl(*p++);
+	len = args->count     = ntohl(*p++);
+	p++; /* totalcount - unused */
+
+	if (len > NFSSVC_MAXBLKSIZE)
+		len = NFSSVC_MAXBLKSIZE;
 
+	/* set up somewhere to store response.
+	 * We take pages, put them on reslist and include in iovec
+	 */
+	v=0;
+	while (len > 0) {
+		pn=rqstp->rq_resused;
+		take_page(rqstp);
+		args->vec[v].iov_base = page_address(rqstp->rq_respages[pn]);
+		args->vec[v].iov_len = len < PAGE_SIZE?len:PAGE_SIZE;
+		v++;
+		len -= PAGE_SIZE;
+	}
+	args->vlen = v;
 	return xdr_argsize_check(rqstp, p);
 }
 
@@ -255,17 +253,30 @@
 nfssvc_decode_writeargs(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd_writeargs *args)
 {
+	int len;
+	int v;
 	if (!(p = decode_fh(p, &args->fh)))
 		return 0;
 
 	p++;				/* beginoffset */
 	args->offset = ntohl(*p++);	/* offset */
 	p++;				/* totalcount */
-	args->len = ntohl(*p++);
-	args->data = (char *) p;
-	p += XDR_QUADLEN(args->len);
-
-	return xdr_argsize_check(rqstp, p);
+	len = args->len = ntohl(*p++);
+	args->vec[0].iov_base = (void*)p;
+	args->vec[0].iov_len = rqstp->rq_arg.head[0].iov_len -
+				(((void*)p) - rqstp->rq_arg.head[0].iov_base);
+	if (len > NFSSVC_MAXBLKSIZE)
+		len = NFSSVC_MAXBLKSIZE;
+	v = 0;
+	while (len > args->vec[v].iov_len) {
+		len -= args->vec[v].iov_len;
+		v++;
+		args->vec[v].iov_base = page_address(rqstp->rq_argpages[v]);
+		args->vec[v].iov_len = PAGE_SIZE;
+	}
+	args->vec[v].iov_len = len;
+	args->vlen = v+1;
+	return args->vec[0].iov_len > 0;
 }
 
 int
@@ -371,16 +382,32 @@
 {
 	p = encode_fattr(rqstp, p, &resp->fh);
 	*p++ = htonl(resp->count);
-	p += XDR_QUADLEN(resp->count);
+	xdr_ressize_check(rqstp, p);
 
-	return xdr_ressize_check(rqstp, p);
+	/* now update rqstp->rq_res to reflect data aswell */
+	rqstp->rq_res.page_base = 0;
+	rqstp->rq_res.page_len = resp->count;
+	if (resp->count & 3) {
+		/* need to pad with tail */
+		rqstp->rq_res.tail[0].iov_base = p;
+		*p = 0;
+		rqstp->rq_res.tail[0].iov_len = 4 - (resp->count&3);
+	}
+	rqstp->rq_res.len = 
+		rqstp->rq_res.head[0].iov_len+
+		rqstp->rq_res.page_len+
+		rqstp->rq_res.tail[0].iov_len;
+	return 1;
 }
 
 int
 nfssvc_encode_readdirres(struct svc_rqst *rqstp, u32 *p,
 					struct nfsd_readdirres *resp)
 {
-	p += XDR_QUADLEN(resp->count);
+	p = resp->buffer;
+	*p++ = 0;			/* no more entries */
+	*p++ = htonl((resp->common.err == nfserr_eof));
+
 	return xdr_ressize_check(rqstp, p);
 }
 
@@ -399,9 +426,10 @@
 }
 
 int
-nfssvc_encode_entry(struct readdir_cd *cd, const char *name,
+nfssvc_encode_entry(struct readdir_cd *ccd, const char *name,
 		    int namlen, loff_t offset, ino_t ino, unsigned int d_type)
 {
+	struct nfsd_readdirres *cd = container_of(ccd, struct nfsd_readdirres, common);
 	u32	*p = cd->buffer;
 	int	buflen, slen;
 
@@ -410,8 +438,10 @@
 			namlen, name, offset, ino);
 	 */
 
-	if (offset > ~((u32) 0))
+	if (offset > ~((u32) 0)) {
+		cd->common.err = nfserr_fbig;
 		return -EINVAL;
+	}
 	if (cd->offset)
 		*cd->offset = htonl(offset);
 	if (namlen > NFS2_MAXNAMLEN)
@@ -419,7 +449,7 @@
 
 	slen = XDR_QUADLEN(namlen);
 	if ((buflen = cd->buflen - slen - 4) < 0) {
-		cd->eob = 1;
+		cd->common.err = nfserr_readdir_nospc;
 		return -EINVAL;
 	}
 	*p++ = xdr_one;				/* mark entry present */
@@ -430,6 +460,7 @@
 
 	cd->buflen = buflen;
 	cd->buffer = p;
+	cd->common.err = nfs_ok;
 	return 0;
 }
 
diff -Nru a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
--- a/fs/nfsd/vfs.c	Wed Oct 30 16:44:27 2002
+++ b/fs/nfsd/vfs.c	Wed Oct 30 16:44:27 2002
@@ -577,7 +577,7 @@
  */
 int
 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
-          char *buf, unsigned long *count)
+          struct iovec *vec, int vlen, unsigned long *count)
 {
 	struct raparms	*ra;
 	mm_segment_t	oldfs;
@@ -603,7 +603,7 @@
 
 	oldfs = get_fs();
 	set_fs(KERNEL_DS);
-	err = vfs_read(&file, buf, *count, &offset);
+	err = vfs_readv(&file, vec, vlen, *count, &offset);
 	set_fs(oldfs);
 
 	/* Write back readahead params */
@@ -629,7 +629,8 @@
  */
 int
 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
-				char *buf, unsigned long cnt, int *stablep)
+				struct iovec *vec, int vlen,
+	   			unsigned long cnt, int *stablep)
 {
 	struct svc_export	*exp;
 	struct file		file;
@@ -677,7 +678,7 @@
 
 	/* Write the data. */
 	oldfs = get_fs(); set_fs(KERNEL_DS);
-	err = vfs_write(&file, buf, cnt, &offset);
+	err = vfs_writev(&file, vec, vlen, cnt, &offset);
 	if (err >= 0)
 		nfsdstats.io_write += cnt;
 	set_fs(oldfs);
@@ -1386,16 +1387,15 @@
 
 /*
  * Read entries from a directory.
- * The verifier is an NFSv3 thing we ignore for now.
+ * The  NFSv3/4 verifier we ignore for now.
  */
 int
-nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset, 
-             encode_dent_fn func, u32 *buffer, int *countp, u32 *verf, u32 *bmval)
+nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, 
+	     struct readdir_cd *cdp, encode_dent_fn func)
 {
-	u32		*p;
-	int		oldlen, eof, err;
+	int		err;
 	struct file	file;
-	struct readdir_cd cd;
+	loff_t		offset = *offsetp;
 
 	err = nfsd_open(rqstp, fhp, S_IFDIR, MAY_READ, &file);
 	if (err)
@@ -1405,17 +1405,6 @@
 
 	file.f_pos = offset;
 
-	/* Set up the readdir context */
-	memset(&cd, 0, sizeof(cd));
-	cd.rqstp  = rqstp;
-	cd.buffer = buffer;
-	cd.buflen = *countp; /* count of words */
-	cd.dirfh  = fhp;
-	if (bmval) {
-		cd.bmval[0] = bmval[0];
-		cd.bmval[1] = bmval[1];
-	}
-
 	/*
 	 * Read the directory entries. This silly loop is necessary because
 	 * readdir() is not guaranteed to fill up the entire buffer, but
@@ -1423,49 +1412,21 @@
 	 */
 
 	do {
-		oldlen = cd.buflen;
-
-		err = vfs_readdir(&file, (filldir_t) func, &cd);
-
-		if (err < 0)
-			goto out_nfserr;
-
-		err = cd.nfserr;
-		if (err)
-			goto out_close;
-	} while (oldlen != cd.buflen && !cd.eob);
-
-	err = nfserr_readdir_nospc;
-	if (rqstp->rq_vers == 4 && cd.eob && cd.buffer == buffer)
-		goto out_close;
-
-	/* If we didn't fill the buffer completely, we're at EOF */
-	eof = !cd.eob;
-
-	if (cd.offset) {
-		if (rqstp->rq_vers > 2)
-			(void)xdr_encode_hyper(cd.offset, file.f_pos);
-		else
-			*cd.offset = htonl(file.f_pos);
-	}
-
-	p = cd.buffer;
-	*p++ = 0;			/* no more entries */
-	*p++ = htonl(eof);		/* end of directory */
-	*countp = (caddr_t) p - (caddr_t) buffer;
+		cdp->err = nfserr_eof; /* will be cleared on successful read */
+		err = vfs_readdir(&file, (filldir_t) func, cdp);
+	} while (err >=0 && cdp->err == nfs_ok);
+	if (err)
+		err = nfserrno(err);
+	else
+		err = cdp->err;
+	*offsetp = file.f_pos;
 
-	dprintk("nfsd: readdir result %d bytes, eof %d offset %d\n",
-				*countp, eof,
-				cd.offset? ntohl(*cd.offset) : -1);
-	err = 0;
+	if (err == nfserr_eof || err == nfserr_readdir_nospc)
+		err = nfs_ok; /* can still be found in ->err */
 out_close:
 	nfsd_close(&file);
 out:
 	return err;
-
-out_nfserr:
-	err = nfserrno(err);
-	goto out_close;
 }
 
 /*
diff -Nru a/fs/nls/Config.help b/fs/nls/Config.help
--- a/fs/nls/Config.help	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,360 +0,0 @@
-CONFIG_NLS_DEFAULT
-  The default NLS used when mounting file system. Note, that this is
-  the NLS used by your console, not the NLS used by a specific file
-  system (if different) to store data (filenames) on a disk.
-  Currently, the valid values are:
-  big5, cp437, cp737, cp775, cp850, cp852, cp855, cp857, cp860, cp861,
-  cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp932, cp936,
-  cp949, cp950, cp1251, cp1255, euc-jp, euc-kr, gb2312, iso8859-1,
-  iso8859-2, iso8859-3, iso8859-4, iso8859-5, iso8859-6, iso8859-7,
-  iso8859-8, iso8859-9, iso8859-13, iso8859-14, iso8859-15,
-  koi8-r, koi8-ru, koi8-u, sjis, tis-620, utf8.
-  If you specify a wrong value, it will use the built-in NLS;
-  compatible with iso8859-1.
-
-  If unsure, specify it as "iso8859-1".
-
-CONFIG_NLS_CODEPAGE_437
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored
-  in so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage that is used in
-  the United States and parts of Canada. This is recommended.
-
-CONFIG_NLS_CODEPAGE_737
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored
-  in so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage that is used for
-  Greek. If unsure, say N.
-
-CONFIG_NLS_CODEPAGE_775
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored
-  in so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage that is used
-  for the Baltic Rim Languages (Latvian and Lithuanian). If unsure,
-  say N.
-
-CONFIG_NLS_CODEPAGE_850
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage that is used for
-  much of Europe -- United Kingdom, Germany, Spain, Italy, and [add
-  more countries here]. It has some characters useful to many European
-  languages that are not part of the US codepage 437.
-
-  If unsure, say Y.
-
-CONFIG_NLS_CODEPAGE_852
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the Latin 2 codepage used by DOS
-  for much of Central and Eastern Europe. It has all the required
-  characters for these languages: Albanian, Croatian, Czech, English,
-  Finnish, Hungarian, Irish, German, Polish, Romanian, Serbian (Latin
-  transcription), Slovak, Slovenian, and Sorbian.
-
-CONFIG_NLS_CODEPAGE_855
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Cyrillic.
-
-CONFIG_NLS_CODEPAGE_857
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Turkish.
-
-CONFIG_NLS_CODEPAGE_860
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Portuguese.
-
-CONFIG_NLS_CODEPAGE_861
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Icelandic.
-
-CONFIG_NLS_CODEPAGE_862
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Hebrew.
-
-CONFIG_NLS_CODEPAGE_863
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Canadian
-  French.
-
-CONFIG_NLS_CODEPAGE_864
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Arabic.
-
-CONFIG_NLS_CODEPAGE_865
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for the Nordic
-  European countries.
-
-CONFIG_NLS_CODEPAGE_866
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for
-  Cyrillic/Russian.
-
-CONFIG_NLS_CODEPAGE_869
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Greek.
-
-CONFIG_NLS_CODEPAGE_874
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Thai.
-
-CONFIG_NLS_CODEPAGE_1251
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Russian and
-  Bulgarian and Belarusian.
-
-CONFIG_NLS_CODEPAGE_932
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Shift-JIS
-  or EUC-JP. To use EUC-JP, you can use 'euc-jp' as mount option or
-  NLS Default value during kernel configuration, instead of 'cp932'.
-
-CONFIG_NLS_CODEPAGE_936
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Simplified
-  Chinese(GBK).
-
-CONFIG_NLS_CODEPAGE_949
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for UHC.
-
-CONFIG_NLS_CODEPAGE_950
-  The Microsoft FAT file system family can deal with filenames in
-  native language character sets. These character sets are stored in
-  so-called DOS codepages. You need to include the appropriate
-  codepage if you want to be able to read/write these filenames on
-  DOS/Windows partitions correctly. This does apply to the filenames
-  only, not to the file contents. You can include several codepages;
-  say Y here if you want to include the DOS codepage for Traditional
-  Chinese(Big5).
-
-CONFIG_NLS_CODEPAGE_1250
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CDROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Windows CP-1250
-  character set, which works for most Latin-written Slavic and Central
-  European languages: Czech, German, Hungarian, Polish, Rumanian, Croatian,
-  Slovak, Slovene.
-
-CONFIG_NLS_ISO8859_1
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 1 character
-  set, which covers most West European languages such as Albanian,
-  Catalan, Danish, Dutch, English, Faeroese, Finnish, French, German,
-  Galician, Irish, Icelandic, Italian, Norwegian, Portuguese, Spanish,
-  and Swedish. It is also the default for the US. If unsure, say Y.
-
-CONFIG_NLS_ISO8859_2
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 2 character
-  set, which works for most Latin-written Slavic and Central European
-  languages: Czech, German, Hungarian, Polish, Rumanian, Croatian,
-  Slovak, Slovene.
-
-CONFIG_NLS_ISO8859_3
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 3 character
-  set, which is popular with authors of Esperanto, Galician, Maltese,
-  and Turkish.
-
-CONFIG_NLS_ISO8859_4
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 4 character
-  set which introduces letters for Estonian, Latvian, and
-  Lithuanian. It is an incomplete predecessor of Latin 7.
-
-CONFIG_NLS_ISO8859_5
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for ISO8859-5, a Cyrillic
-  character set with which you can type Bulgarian, Belarusian,
-  Macedonian, Russian, Serbian, and Ukrainian. Note that the charset
-  KOI8-R is preferred in Russia.
-
-CONFIG_NLS_ISO8859_6
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for ISO8859-6, the Arabic
-  character set.
-
-CONFIG_NLS_ISO8859_7
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for ISO8859-7, the Modern
-  Greek character set.
-
-CONFIG_NLS_ISO8859_8
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for ISO8859-8, the Hebrew
-  character set.
-
-CONFIG_NLS_ISO8859_9
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 5 character
-  set, and it replaces the rarely needed Icelandic letters in Latin 1
-  with the Turkish ones. Useful in Turkey.
-
-CONFIG_NLS_ISO8859_13
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 7 character
-  set, which supports modern Baltic languages including Latvian
-  and Lithuanian.
-
-CONFIG_NLS_ISO8859_14
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 8 character
-  set, which adds the last accented vowels for Welsh (aka Cymraeg)
-  (and Manx Gaelic) that were missing in Latin 1.
-  <http://linux.speech.cymru.org/> has further information.
-
-CONFIG_NLS_ISO8859_15
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the Latin 9 character
-  set, which covers most West European languages such as Albanian,
-  Catalan, Danish, Dutch, English, Estonian, Faeroese, Finnish,
-  French, German, Galician, Irish, Icelandic, Italian, Norwegian,
-  Portuguese, Spanish, and Swedish. Latin 9 is an update to
-  Latin 1 (ISO 8859-1) that removes a handful of rarely used
-  characters and instead adds support for Estonian, corrects the
-  support for French and Finnish, and adds the new Euro character.
-  If unsure, say Y.
-
-CONFIG_NLS_KOI8_R
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the preferred Russian
-  character set.
-
-CONFIG_NLS_KOI8_U
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the preferred Ukrainian
-  (koi8-u) and Belarusian (koi8-ru) character sets.
-
-CONFIG_NLS_UTF8
-  If you want to display filenames with native language characters
-  from the Microsoft FAT file system family or from JOLIET CD-ROMs
-  correctly on the screen, you need to include the appropriate
-  input/output character sets. Say Y here for the UTF-8 encoding of
-  the Unicode/ISO9646 universal character set.
-
diff -Nru a/fs/nls/Config.in b/fs/nls/Config.in
--- a/fs/nls/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,63 +0,0 @@
-#
-# Native language support configuration
-#
-
-# smb wants NLS
-if [ "$CONFIG_SMB_FS" = "m" -o "$CONFIG_SMB_FS" = "y" ]; then
-  define_bool CONFIG_SMB_NLS y
-else
-  define_bool CONFIG_SMB_NLS n
-fi
-
-# msdos and Joliet want NLS
-if [ "$CONFIG_JOLIET" = "y" -o "$CONFIG_FAT_FS" != "n" \
-	-o "$CONFIG_NTFS_FS" != "n" -o "$CONFIG_NCPFS_NLS" = "y" \
-	-o "$CONFIG_SMB_NLS" = "y" -o "$CONFIG_JFS_FS" != "n" -o "$CONFIG_CIFS" != "n" ]; then
-  define_bool CONFIG_NLS y
-else
-  define_bool CONFIG_NLS n
-fi
-
-if [ "$CONFIG_NLS" = "y" ]; then
-  mainmenu_option next_comment
-  comment 'Native Language Support'
-  string 'Default NLS Option' CONFIG_NLS_DEFAULT "iso8859-1"
-  tristate 'Codepage 437 (United States, Canada)'  CONFIG_NLS_CODEPAGE_437
-  tristate 'Codepage 737 (Greek)'                  CONFIG_NLS_CODEPAGE_737
-  tristate 'Codepage 775 (Baltic Rim)'             CONFIG_NLS_CODEPAGE_775
-  tristate 'Codepage 850 (Europe)'                 CONFIG_NLS_CODEPAGE_850
-  tristate 'Codepage 852 (Central/Eastern Europe)' CONFIG_NLS_CODEPAGE_852
-  tristate 'Codepage 855 (Cyrillic)'               CONFIG_NLS_CODEPAGE_855
-  tristate 'Codepage 857 (Turkish)'                CONFIG_NLS_CODEPAGE_857
-  tristate 'Codepage 860 (Portuguese)'             CONFIG_NLS_CODEPAGE_860
-  tristate 'Codepage 861 (Icelandic)'              CONFIG_NLS_CODEPAGE_861
-  tristate 'Codepage 862 (Hebrew)'                 CONFIG_NLS_CODEPAGE_862
-  tristate 'Codepage 863 (Canadian French)'        CONFIG_NLS_CODEPAGE_863
-  tristate 'Codepage 864 (Arabic)'                 CONFIG_NLS_CODEPAGE_864
-  tristate 'Codepage 865 (Norwegian, Danish)'      CONFIG_NLS_CODEPAGE_865
-  tristate 'Codepage 866 (Cyrillic/Russian)'       CONFIG_NLS_CODEPAGE_866
-  tristate 'Codepage 869 (Greek)'                  CONFIG_NLS_CODEPAGE_869
-  tristate 'Simplified Chinese charset (CP936, GB2312)' CONFIG_NLS_CODEPAGE_936
-  tristate 'Traditional Chinese charset (Big5)'    CONFIG_NLS_CODEPAGE_950
-  tristate 'Japanese charsets (Shift-JIS, EUC-JP)' CONFIG_NLS_CODEPAGE_932
-  tristate 'Korean charset (CP949, EUC-KR)'        CONFIG_NLS_CODEPAGE_949
-  tristate 'Thai charset (CP874, TIS-620)'         CONFIG_NLS_CODEPAGE_874
-  tristate 'Hebrew charsets (ISO-8859-8, CP1255)'  CONFIG_NLS_ISO8859_8
-  tristate 'Windows CP1250 (Slavic/Central European Languages)' CONFIG_NLS_CODEPAGE_1250
-  tristate 'Windows CP1251 (Bulgarian, Belarusian)' CONFIG_NLS_CODEPAGE_1251
-  tristate 'NLS ISO 8859-1  (Latin 1; Western European Languages)' CONFIG_NLS_ISO8859_1
-  tristate 'NLS ISO 8859-2  (Latin 2; Slavic/Central European Languages)' CONFIG_NLS_ISO8859_2
-  tristate 'NLS ISO 8859-3  (Latin 3; Esperanto, Galician, Maltese, Turkish)' CONFIG_NLS_ISO8859_3
-  tristate 'NLS ISO 8859-4  (Latin 4; old Baltic charset)' CONFIG_NLS_ISO8859_4
-  tristate 'NLS ISO 8859-5  (Cyrillic)'             CONFIG_NLS_ISO8859_5
-  tristate 'NLS ISO 8859-6  (Arabic)'               CONFIG_NLS_ISO8859_6
-  tristate 'NLS ISO 8859-7  (Modern Greek)'         CONFIG_NLS_ISO8859_7
-  tristate 'NLS ISO 8859-9  (Latin 5; Turkish)'     CONFIG_NLS_ISO8859_9
-  tristate 'NLS ISO 8859-13 (Latin 7; Baltic)'      CONFIG_NLS_ISO8859_13
-  tristate 'NLS ISO 8859-14 (Latin 8; Celtic)'      CONFIG_NLS_ISO8859_14
-  tristate 'NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)' CONFIG_NLS_ISO8859_15
-  tristate 'NLS KOI8-R (Russian)'                   CONFIG_NLS_KOI8_R
-  tristate 'NLS KOI8-U/RU (Ukrainian, Belarusian)' CONFIG_NLS_KOI8_U
-  tristate 'NLS UTF8'                               CONFIG_NLS_UTF8
-  endmenu
-fi
diff -Nru a/fs/nls/Kconfig b/fs/nls/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/nls/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,458 @@
+#
+# Native language support configuration
+#
+# smb wants NLS
+config SMB_NLS
+	bool
+	depends on SMB_FS
+	default y
+
+# msdos and Joliet want NLS
+config NLS
+	bool
+	depends on JOLIET || FAT_FS || NTFS_FS || NCPFS_NLS || SMB_NLS || JFS_FS || CIFS || BEFS_FS
+	default y
+
+
+menu "Native Language Support"
+	depends on NLS
+
+config NLS_DEFAULT
+	string "Default NLS Option"
+	default "iso8859-1"
+	---help---
+	  The default NLS used when mounting file system. Note, that this is
+	  the NLS used by your console, not the NLS used by a specific file
+	  system (if different) to store data (filenames) on a disk.
+	  Currently, the valid values are:
+	  big5, cp437, cp737, cp775, cp850, cp852, cp855, cp857, cp860, cp861,
+	  cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp932, cp936,
+	  cp949, cp950, cp1251, cp1255, euc-jp, euc-kr, gb2312, iso8859-1,
+	  iso8859-2, iso8859-3, iso8859-4, iso8859-5, iso8859-6, iso8859-7,
+	  iso8859-8, iso8859-9, iso8859-13, iso8859-14, iso8859-15,
+	  koi8-r, koi8-ru, koi8-u, sjis, tis-620, utf8.
+	  If you specify a wrong value, it will use the built-in NLS;
+	  compatible with iso8859-1.
+
+	  If unsure, specify it as "iso8859-1".
+
+config NLS_CODEPAGE_437
+	tristate "Codepage 437 (United States, Canada)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored
+	  in so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage that is used in
+	  the United States and parts of Canada. This is recommended.
+
+config NLS_CODEPAGE_737
+	tristate "Codepage 737 (Greek)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored
+	  in so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage that is used for
+	  Greek. If unsure, say N.
+
+config NLS_CODEPAGE_775
+	tristate "Codepage 775 (Baltic Rim)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored
+	  in so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage that is used
+	  for the Baltic Rim Languages (Latvian and Lithuanian). If unsure,
+	  say N.
+
+config NLS_CODEPAGE_850
+	tristate "Codepage 850 (Europe)"
+	---help---
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage that is used for
+	  much of Europe -- United Kingdom, Germany, Spain, Italy, and [add
+	  more countries here]. It has some characters useful to many European
+	  languages that are not part of the US codepage 437.
+
+	  If unsure, say Y.
+
+config NLS_CODEPAGE_852
+	tristate "Codepage 852 (Central/Eastern Europe)"
+	---help---
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the Latin 2 codepage used by DOS
+	  for much of Central and Eastern Europe. It has all the required
+	  characters for these languages: Albanian, Croatian, Czech, English,
+	  Finnish, Hungarian, Irish, German, Polish, Romanian, Serbian (Latin
+	  transcription), Slovak, Slovenian, and Sorbian.
+
+config NLS_CODEPAGE_855
+	tristate "Codepage 855 (Cyrillic)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Cyrillic.
+
+config NLS_CODEPAGE_857
+	tristate "Codepage 857 (Turkish)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Turkish.
+
+config NLS_CODEPAGE_860
+	tristate "Codepage 860 (Portuguese)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Portuguese.
+
+config NLS_CODEPAGE_861
+	tristate "Codepage 861 (Icelandic)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Icelandic.
+
+config NLS_CODEPAGE_862
+	tristate "Codepage 862 (Hebrew)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Hebrew.
+
+config NLS_CODEPAGE_863
+	tristate "Codepage 863 (Canadian French)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Canadian
+	  French.
+
+config NLS_CODEPAGE_864
+	tristate "Codepage 864 (Arabic)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Arabic.
+
+config NLS_CODEPAGE_865
+	tristate "Codepage 865 (Norwegian, Danish)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for the Nordic
+	  European countries.
+
+config NLS_CODEPAGE_866
+	tristate "Codepage 866 (Cyrillic/Russian)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for
+	  Cyrillic/Russian.
+
+config NLS_CODEPAGE_869
+	tristate "Codepage 869 (Greek)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Greek.
+
+config NLS_CODEPAGE_936
+	tristate "Simplified Chinese charset (CP936, GB2312)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Simplified
+	  Chinese(GBK).
+
+config NLS_CODEPAGE_950
+	tristate "Traditional Chinese charset (Big5)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Traditional
+	  Chinese(Big5).
+
+config NLS_CODEPAGE_932
+	tristate "Japanese charsets (Shift-JIS, EUC-JP)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Shift-JIS
+	  or EUC-JP. To use EUC-JP, you can use 'euc-jp' as mount option or
+	  NLS Default value during kernel configuration, instead of 'cp932'.
+
+config NLS_CODEPAGE_949
+	tristate "Korean charset (CP949, EUC-KR)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for UHC.
+
+config NLS_CODEPAGE_874
+	tristate "Thai charset (CP874, TIS-620)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Thai.
+
+config NLS_ISO8859_8
+	tristate "Hebrew charsets (ISO-8859-8, CP1255)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for ISO8859-8, the Hebrew
+	  character set.
+
+config NLS_CODEPAGE_1250
+	tristate "Windows CP1250 (Slavic/Central European Languages)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CDROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Windows CP-1250
+	  character set, which works for most Latin-written Slavic and Central
+	  European languages: Czech, German, Hungarian, Polish, Rumanian, Croatian,
+	  Slovak, Slovene.
+
+config NLS_CODEPAGE_1251
+	tristate "Windows CP1251 (Bulgarian, Belarusian)"
+	help
+	  The Microsoft FAT file system family can deal with filenames in
+	  native language character sets. These character sets are stored in
+	  so-called DOS codepages. You need to include the appropriate
+	  codepage if you want to be able to read/write these filenames on
+	  DOS/Windows partitions correctly. This does apply to the filenames
+	  only, not to the file contents. You can include several codepages;
+	  say Y here if you want to include the DOS codepage for Russian and
+	  Bulgarian and Belarusian.
+
+config NLS_ISO8859_1
+	tristate "NLS ISO 8859-1  (Latin 1; Western European Languages)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 1 character
+	  set, which covers most West European languages such as Albanian,
+	  Catalan, Danish, Dutch, English, Faeroese, Finnish, French, German,
+	  Galician, Irish, Icelandic, Italian, Norwegian, Portuguese, Spanish,
+	  and Swedish. It is also the default for the US. If unsure, say Y.
+
+config NLS_ISO8859_2
+	tristate "NLS ISO 8859-2  (Latin 2; Slavic/Central European Languages)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 2 character
+	  set, which works for most Latin-written Slavic and Central European
+	  languages: Czech, German, Hungarian, Polish, Rumanian, Croatian,
+	  Slovak, Slovene.
+
+config NLS_ISO8859_3
+	tristate "NLS ISO 8859-3  (Latin 3; Esperanto, Galician, Maltese, Turkish)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 3 character
+	  set, which is popular with authors of Esperanto, Galician, Maltese,
+	  and Turkish.
+
+config NLS_ISO8859_4
+	tristate "NLS ISO 8859-4  (Latin 4; old Baltic charset)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 4 character
+	  set which introduces letters for Estonian, Latvian, and
+	  Lithuanian. It is an incomplete predecessor of Latin 7.
+
+config NLS_ISO8859_5
+	tristate "NLS ISO 8859-5  (Cyrillic)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for ISO8859-5, a Cyrillic
+	  character set with which you can type Bulgarian, Belarusian,
+	  Macedonian, Russian, Serbian, and Ukrainian. Note that the charset
+	  KOI8-R is preferred in Russia.
+
+config NLS_ISO8859_6
+	tristate "NLS ISO 8859-6  (Arabic)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for ISO8859-6, the Arabic
+	  character set.
+
+config NLS_ISO8859_7
+	tristate "NLS ISO 8859-7  (Modern Greek)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for ISO8859-7, the Modern
+	  Greek character set.
+
+config NLS_ISO8859_9
+	tristate "NLS ISO 8859-9  (Latin 5; Turkish)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 5 character
+	  set, and it replaces the rarely needed Icelandic letters in Latin 1
+	  with the Turkish ones. Useful in Turkey.
+
+config NLS_ISO8859_13
+	tristate "NLS ISO 8859-13 (Latin 7; Baltic)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 7 character
+	  set, which supports modern Baltic languages including Latvian
+	  and Lithuanian.
+
+config NLS_ISO8859_14
+	tristate "NLS ISO 8859-14 (Latin 8; Celtic)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 8 character
+	  set, which adds the last accented vowels for Welsh (aka Cymraeg)
+	  (and Manx Gaelic) that were missing in Latin 1.
+	  <http://linux.speech.cymru.org/> has further information.
+
+config NLS_ISO8859_15
+	tristate "NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)"
+	---help---
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the Latin 9 character
+	  set, which covers most West European languages such as Albanian,
+	  Catalan, Danish, Dutch, English, Estonian, Faeroese, Finnish,
+	  French, German, Galician, Irish, Icelandic, Italian, Norwegian,
+	  Portuguese, Spanish, and Swedish. Latin 9 is an update to
+	  Latin 1 (ISO 8859-1) that removes a handful of rarely used
+	  characters and instead adds support for Estonian, corrects the
+	  support for French and Finnish, and adds the new Euro character.
+	  If unsure, say Y.
+
+config NLS_KOI8_R
+	tristate "NLS KOI8-R (Russian)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the preferred Russian
+	  character set.
+
+config NLS_KOI8_U
+	tristate "NLS KOI8-U/RU (Ukrainian, Belarusian)"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the preferred Ukrainian
+	  (koi8-u) and Belarusian (koi8-ru) character sets.
+
+config NLS_UTF8
+	tristate "NLS UTF8"
+	help
+	  If you want to display filenames with native language characters
+	  from the Microsoft FAT file system family or from JOLIET CD-ROMs
+	  correctly on the screen, you need to include the appropriate
+	  input/output character sets. Say Y here for the UTF-8 encoding of
+	  the Unicode/ISO9646 universal character set.
+
+endmenu
+
diff -Nru a/fs/open.c b/fs/open.c
--- a/fs/open.c	Wed Oct 30 16:44:19 2002
+++ b/fs/open.c	Wed Oct 30 16:44:19 2002
@@ -643,7 +643,7 @@
 			goto cleanup_file;
 	}
 
-	f->f_ra.ra_pages = inode->i_mapping->backing_dev_info->ra_pages;
+	file_ra_state_init(&f->f_ra, inode->i_mapping);
 	f->f_dentry = dentry;
 	f->f_vfsmnt = mnt;
 	f->f_pos = 0;
diff -Nru a/fs/partitions/Config.help b/fs/partitions/Config.help
--- a/fs/partitions/Config.help	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,148 +0,0 @@
-CONFIG_PARTITION_ADVANCED
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned under an operating system running on a different
-  architecture than your Linux system.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about foreign partitioning schemes.
-
-  If unsure, say N.
-
-CONFIG_ACORN_PARTITION
-  Support hard disks partitioned under Acorn operating systems.
-
-CONFIG_ACORN_PARTITION_ADFS
-  The Acorn Disc Filing System is the standard file system of the
-  RiscOS operating system which runs on Acorn's ARM-based Risc PC
-  systems and the Acorn Archimedes range of machines.  If you say
-  `Y' here, Linux will support disk partitions created under ADFS.
-
-CONFIG_ACORN_PARTITION_POWERTEC
-  Support reading partition tables created on Acorn machines using
-  the PowerTec SCSI drive.
-
-CONFIG_ACORN_PARTITION_RISCIX
-  Once upon a time, there was a native Unix port for the Acorn series
-  of machines called RISCiX.  If you say 'Y' here, Linux will be able
-  to read disks partitioned under RISCiX.
-
-CONFIG_ACORN_PARTITION_ICS
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned using the ICS interface on Acorn machines.
-
-CONFIG_OSF_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned on an Alpha machine.
-
-CONFIG_MAC_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned on a Macintosh.
-
-CONFIG_LDM_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned using Windows 2000's or XP's Logical Disk Manager.
-  They are also known as "Dynamic Disks".
-
-  Windows 2000 introduced the concept of Dynamic Disks to get around
-  the limitations of the PC's partitioning scheme.  The Logical Disk
-  Manager allows the user to repartition a disk and create spanned,
-  mirrored, striped or RAID volumes, all without the need for
-  rebooting.
-
-  Normal partitions are now called Basic Disks under Windows 2000 and
-  XP.
-
-  For a fuller description read <file:Documentation/ldm.txt>.
-
-  If unsure, say N.
-
-CONFIG_LDM_DEBUG
-  Say Y here if you would like LDM to log verbosely.  This could be
-  helpful if the driver doesn't work as expected and you'd like to
-  report a bug.
-
-  If unsure, say N.
-
-CONFIG_MSDOS_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned on an x86 PC (not necessarily by DOS).
-
-CONFIG_AMIGA_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned under AmigaOS.
-
-CONFIG_ATARI_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned under the Atari OS.
-
-CONFIG_BSD_DISKLABEL
-  FreeBSD uses its own hard disk partition scheme on your PC. It
-  requires only one entry in the primary partition table of your disk
-  and manages it similarly to DOS extended partitions, putting in its
-  first sector a new partition table in BSD disklabel format. Saying Y
-  here allows you to read these disklabels and further mount FreeBSD
-  partitions from within Linux if you have also said Y to "UFS
-  file system support", above. If you don't know what all this is
-  about, say N.
-
-CONFIG_MINIX_SUBPARTITION
-  Minix 2.0.0/2.0.2 subpartition table support for Linux.
-  Say Y here if you want to mount and use Minix 2.0.0/2.0.2
-  subpartitions.
-
-CONFIG_SUN_PARTITION
-  Like most systems, SunOS uses its own hard disk partition table
-  format, incompatible with all others. Saying Y here allows you to
-  read these partition tables and further mount SunOS partitions from
-  within Linux if you have also said Y to "UFS file system support",
-  above. This is mainly used to carry data from a SPARC under SunOS to
-  your Linux box via a removable medium like magneto-optical or ZIP
-  drives; note however that a good portable way to transport files and
-  directories between unixes (and even other operating systems) is
-  given by the tar program ("man tar" or preferably "info tar"). If
-  you don't know what all this is about, say N.
-
-CONFIG_SOLARIS_X86_PARTITION
-  Like most systems, Solaris x86 uses its own hard disk partition
-  table format, incompatible with all others. Saying Y here allows you
-  to read these partition tables and further mount Solaris x86
-  partitions from within Linux if you have also said Y to "UFS
-  file system support", above.
-
-CONFIG_SGI_PARTITION
-  Say Y here if you would like to be able to read the hard disk
-  partition table format used by SGI machines.
-
-CONFIG_EFI_PARTITION
-  Say Y here if you would like to use hard disks under Linux which
-  were partitioned using EFI GPT.  Presently only useful on the
-  IA-64 platform.
-
-CONFIG_ULTRIX_PARTITION
-  Say Y here if you would like to be able to read the hard disk
-  partition table format used by DEC (now Compaq) Ultrix machines.
-  Otherwise, say N.
-
-CONFIG_IBM_PARTITION
-  Say Y here if you would like to be able to read the hard disk
-  partition table format used by IBM DASD disks operating under CMS.
-  Otherwise, say N.
-
-CONFIG_UNIXWARE_DISKLABEL
-  Like some systems, UnixWare uses its own slice table inside a
-  partition (VTOC - Virtual Table of Contents). Its format is
-  incompatible with all other OSes. Saying Y here allows you to read
-  VTOC and further mount UnixWare partitions read-only from within
-  Linux if you have also said Y to "UFS file system support" or
-  "System V and Coherent file system support", above.
-
-  This is mainly used to carry data from a UnixWare box to your
-  Linux box via a removable medium like magneto-optical, ZIP or
-  removable IDE drives. Note, however, that a good portable way to
-  transport files and directories between unixes (and even other
-  operating systems) is given by the tar program ("man tar" or
-  preferably "info tar").
-
-  If you don't know what all this is about, say N.
-
diff -Nru a/fs/partitions/Config.in b/fs/partitions/Config.in
--- a/fs/partitions/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,71 +0,0 @@
-#
-# Partition configuration
-#
-bool 'Advanced partition selection' CONFIG_PARTITION_ADVANCED
-if [ "$CONFIG_PARTITION_ADVANCED" = "y" ]; then
-   bool '  Acorn partition support' CONFIG_ACORN_PARTITION
-   if [ "$CONFIG_ACORN_PARTITION" != "n" ]; then
-#      bool '    Cumana partition support' CONFIG_ACORN_PARTITION_CUMANA
-      bool '    ICS partition support' CONFIG_ACORN_PARTITION_ICS
-      bool '    Native filecore partition support' CONFIG_ACORN_PARTITION_ADFS
-      bool '    PowerTec partition support' CONFIG_ACORN_PARTITION_POWERTEC
-      bool '    RISCiX partition support' CONFIG_ACORN_PARTITION_RISCIX
-   fi
-   bool '  Alpha OSF partition support' CONFIG_OSF_PARTITION
-   bool '  Amiga partition table support' CONFIG_AMIGA_PARTITION
-   bool '  Atari partition table support' CONFIG_ATARI_PARTITION
-   if [ "$CONFIG_ARCH_S390" = "y" ]; then
-      bool '  IBM disk label and partition support' CONFIG_IBM_PARTITION
-   fi
-   bool '  Macintosh partition map support' CONFIG_MAC_PARTITION
-   bool '  PC BIOS (MSDOS partition tables) support' CONFIG_MSDOS_PARTITION
-   if [ "$CONFIG_MSDOS_PARTITION" = "y" ]; then
-      bool '    BSD disklabel (FreeBSD partition tables) support' CONFIG_BSD_DISKLABEL
-      bool '    Minix subpartition support' CONFIG_MINIX_SUBPARTITION
-      bool '    Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION
-      bool '    Unixware slices support' CONFIG_UNIXWARE_DISKLABEL
-   fi
-   bool '  Windows Logical Disk Manager (Dynamic Disk) support' CONFIG_LDM_PARTITION
-   if [ "$CONFIG_LDM_PARTITION" = "y" ]; then
-      bool '    Windows LDM extra logging' CONFIG_LDM_DEBUG
-   fi
-   bool '  SGI partition support' CONFIG_SGI_PARTITION
-   bool '  Ultrix partition table support' CONFIG_ULTRIX_PARTITION
-   bool '  Sun partition tables support' CONFIG_SUN_PARTITION
-   bool '  EFI GUID Partition support' CONFIG_EFI_PARTITION
-else
-   if [ "$CONFIG_ALPHA" = "y" ]; then
-      define_bool CONFIG_OSF_PARTITION y
-   fi
-   if [ "$CONFIG_AMIGA" != "y" -a "$CONFIG_ATARI" != "y" -a \
-        "$CONFIG_MAC" != "y" -a "$CONFIG_SGI_IP22" != "y" -a \
-	"$CONFIG_ARM" != "y" -a "$CONFIG_SGI_IP27" != "y" ]; then
-      define_bool CONFIG_MSDOS_PARTITION y
-   fi
-   if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_AFFS_FS" = "y" ]; then
-      define_bool CONFIG_AMIGA_PARTITION y
-   fi
-   if [ "$CONFIG_MAC" = "y" ]; then
-      define_bool CONFIG_MAC_PARTITION y
-   fi
-   if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
-      define_bool CONFIG_ACORN_PARTITION y
-      define_bool CONFIG_ACORN_PARTITION_ADFS y
-#      define_bool CONFIG_ACORN_PARTITION_CUMANA y
-      define_bool CONFIG_ACORN_PARTITION_ICS y
-      define_bool CONFIG_ACORN_PARTITION_POWERTEC y
-      define_bool CONFIG_ACORN_PARTITION_RISCIX y
-   fi
-   if [ "$CONFIG_ATARI" = "y" ]; then
-      define_bool CONFIG_ATARI_PARTITION y
-   fi
-   if [ "$CONFIG_SGI_IP22" = "y" -o "$CONFIG_SGI_IP27" = "y" ]; then
-      define_bool CONFIG_SGI_PARTITION y
-   fi
-   if [ "$CONFIG_DECSTATION" = "y" ]; then
-      define_bool CONFIG_ULTRIX_PARTITION y
-   fi
-   if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-      define_bool CONFIG_SUN_PARTITION y
-   fi
-fi
diff -Nru a/fs/partitions/Kconfig b/fs/partitions/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/partitions/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,218 @@
+#
+# Partition configuration
+#
+config PARTITION_ADVANCED
+	bool "Advanced partition selection"
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned under an operating system running on a different
+	  architecture than your Linux system.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about foreign partitioning schemes.
+
+	  If unsure, say N.
+
+config ACORN_PARTITION
+	bool "Acorn partition support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && ARCH_ACORN
+	help
+	  Support hard disks partitioned under Acorn operating systems.
+
+#      bool '    Cumana partition support' CONFIG_ACORN_PARTITION_CUMANA
+config ACORN_PARTITION_ICS
+	bool "ICS partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+	default y if !PARTITION_ADVANCED && ARCH_ACORN
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned using the ICS interface on Acorn machines.
+
+config ACORN_PARTITION_ADFS
+	bool "Native filecore partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+	default y if !PARTITION_ADVANCED && ARCH_ACORN
+	help
+	  The Acorn Disc Filing System is the standard file system of the
+	  RiscOS operating system which runs on Acorn's ARM-based Risc PC
+	  systems and the Acorn Archimedes range of machines.  If you say
+	  `Y' here, Linux will support disk partitions created under ADFS.
+
+config ACORN_PARTITION_POWERTEC
+	bool "PowerTec partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+	default y if !PARTITION_ADVANCED && ARCH_ACORN
+	help
+	  Support reading partition tables created on Acorn machines using
+	  the PowerTec SCSI drive.
+
+config ACORN_PARTITION_RISCIX
+	bool "RISCiX partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+	default y if !PARTITION_ADVANCED && ARCH_ACORN
+	help
+	  Once upon a time, there was a native Unix port for the Acorn series
+	  of machines called RISCiX.  If you say 'Y' here, Linux will be able
+	  to read disks partitioned under RISCiX.
+
+config OSF_PARTITION
+	bool "Alpha OSF partition support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && ALPHA
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned on an Alpha machine.
+
+config AMIGA_PARTITION
+	bool "Amiga partition table support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && (AMIGA || AFFS_FS=y)
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned under AmigaOS.
+
+config ATARI_PARTITION
+	bool "Atari partition table support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && ATARI
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned under the Atari OS.
+
+config IBM_PARTITION
+	bool "IBM disk label and partition support"
+	depends on PARTITION_ADVANCED && ARCH_S390
+	help
+	  Say Y here if you would like to be able to read the hard disk
+	  partition table format used by IBM DASD disks operating under CMS.
+	  Otherwise, say N.
+
+config MAC_PARTITION
+	bool "Macintosh partition map support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && MAC
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned on a Macintosh.
+
+config MSDOS_PARTITION
+	bool "PC BIOS (MSDOS partition tables) support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && !AMIGA && !ATARI && !MAC && !SGI_IP22 && !ARM && !SGI_IP27
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned on an x86 PC (not necessarily by DOS).
+
+config BSD_DISKLABEL
+	bool "BSD disklabel (FreeBSD partition tables) support"
+	depends on PARTITION_ADVANCED && MSDOS_PARTITION
+	help
+	  FreeBSD uses its own hard disk partition scheme on your PC. It
+	  requires only one entry in the primary partition table of your disk
+	  and manages it similarly to DOS extended partitions, putting in its
+	  first sector a new partition table in BSD disklabel format. Saying Y
+	  here allows you to read these disklabels and further mount FreeBSD
+	  partitions from within Linux if you have also said Y to "UFS
+	  file system support", above. If you don't know what all this is
+	  about, say N.
+
+config MINIX_SUBPARTITION
+	bool "Minix subpartition support"
+	depends on PARTITION_ADVANCED && MSDOS_PARTITION
+	help
+	  Minix 2.0.0/2.0.2 subpartition table support for Linux.
+	  Say Y here if you want to mount and use Minix 2.0.0/2.0.2
+	  subpartitions.
+
+config SOLARIS_X86_PARTITION
+	bool "Solaris (x86) partition table support"
+	depends on PARTITION_ADVANCED && MSDOS_PARTITION
+	help
+	  Like most systems, Solaris x86 uses its own hard disk partition
+	  table format, incompatible with all others. Saying Y here allows you
+	  to read these partition tables and further mount Solaris x86
+	  partitions from within Linux if you have also said Y to "UFS
+	  file system support", above.
+
+config UNIXWARE_DISKLABEL
+	bool "Unixware slices support"
+	depends on PARTITION_ADVANCED && MSDOS_PARTITION
+	---help---
+	  Like some systems, UnixWare uses its own slice table inside a
+	  partition (VTOC - Virtual Table of Contents). Its format is
+	  incompatible with all other OSes. Saying Y here allows you to read
+	  VTOC and further mount UnixWare partitions read-only from within
+	  Linux if you have also said Y to "UFS file system support" or
+	  "System V and Coherent file system support", above.
+
+	  This is mainly used to carry data from a UnixWare box to your
+	  Linux box via a removable medium like magneto-optical, ZIP or
+	  removable IDE drives. Note, however, that a good portable way to
+	  transport files and directories between unixes (and even other
+	  operating systems) is given by the tar program ("man tar" or
+	  preferably "info tar").
+
+	  If you don't know what all this is about, say N.
+
+config LDM_PARTITION
+	bool "Windows Logical Disk Manager (Dynamic Disk) support"
+	depends on PARTITION_ADVANCED
+	---help---
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned using Windows 2000's or XP's Logical Disk Manager.
+	  They are also known as "Dynamic Disks".
+
+	  Windows 2000 introduced the concept of Dynamic Disks to get around
+	  the limitations of the PC's partitioning scheme.  The Logical Disk
+	  Manager allows the user to repartition a disk and create spanned,
+	  mirrored, striped or RAID volumes, all without the need for
+	  rebooting.
+
+	  Normal partitions are now called Basic Disks under Windows 2000 and
+	  XP.
+
+	  For a fuller description read <file:Documentation/ldm.txt>.
+
+	  If unsure, say N.
+
+config LDM_DEBUG
+	bool "Windows LDM extra logging"
+	depends on LDM_PARTITION
+	help
+	  Say Y here if you would like LDM to log verbosely.  This could be
+	  helpful if the driver doesn't work as expected and you'd like to
+	  report a bug.
+
+	  If unsure, say N.
+
+config SGI_PARTITION
+	bool "SGI partition support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && (SGI_IP22 || SGI_IP27)
+	help
+	  Say Y here if you would like to be able to read the hard disk
+	  partition table format used by SGI machines.
+
+config ULTRIX_PARTITION
+	bool "Ultrix partition table support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && DECSTATION
+	help
+	  Say Y here if you would like to be able to read the hard disk
+	  partition table format used by DEC (now Compaq) Ultrix machines.
+	  Otherwise, say N.
+
+config SUN_PARTITION
+	bool "Sun partition tables support" if PARTITION_ADVANCED
+	default y if !PARTITION_ADVANCED && (SPARC32 || SPARC64)
+	---help---
+	  Like most systems, SunOS uses its own hard disk partition table
+	  format, incompatible with all others. Saying Y here allows you to
+	  read these partition tables and further mount SunOS partitions from
+	  within Linux if you have also said Y to "UFS file system support",
+	  above. This is mainly used to carry data from a SPARC under SunOS to
+	  your Linux box via a removable medium like magneto-optical or ZIP
+	  drives; note however that a good portable way to transport files and
+	  directories between unixes (and even other operating systems) is
+	  given by the tar program ("man tar" or preferably "info tar"). If
+	  you don't know what all this is about, say N.
+
+config EFI_PARTITION
+	bool "EFI GUID Partition support"
+	depends on PARTITION_ADVANCED
+	help
+	  Say Y here if you would like to use hard disks under Linux which
+	  were partitioned using EFI GPT.  Presently only useful on the
+	  IA-64 platform.
+
+#      define_bool CONFIG_ACORN_PARTITION_CUMANA y
diff -Nru a/fs/partitions/check.c b/fs/partitions/check.c
--- a/fs/partitions/check.c	Wed Oct 30 16:44:33 2002
+++ b/fs/partitions/check.c	Wed Oct 30 16:44:33 2002
@@ -14,6 +14,7 @@
  */
 
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/blk.h>
 #include <linux/kmod.h>
@@ -297,6 +298,14 @@
 	struct hd_struct *p = dev->driver_data;
 	return off ? 0 : sprintf(page, "%llu\n",(unsigned long long)p->nr_sects);
 }
+static ssize_t part_stat_read(struct device *dev,
+			char *page, size_t count, loff_t off)
+{
+	struct hd_struct *p = dev->driver_data;
+	return off ? 0 : sprintf(page, "%8u %8llu %8u %8llu\n",
+				p->reads, (u64)p->read_sectors,
+				p->writes, (u64)p->write_sectors);
+}
 static struct device_attribute part_attr_dev = {
 	.attr = {.name = "dev", .mode = S_IRUGO },
 	.show	= part_dev_read
@@ -309,6 +318,10 @@
 	.attr = {.name = "size", .mode = S_IRUGO },
 	.show	= part_size_read
 };
+static struct device_attribute part_attr_stat = {
+	.attr = {.name = "stat", .mode = S_IRUGO },
+	.show	= part_stat_read
+};
 
 void delete_partition(struct gendisk *disk, int part)
 {
@@ -318,10 +331,12 @@
 		return;
 	p->start_sect = 0;
 	p->nr_sects = 0;
+	p->reads = p->writes = p->read_sectors = p->write_sectors = 0;
 	devfs_unregister(p->de);
 	dev = p->hd_driverfs_dev;
 	p->hd_driverfs_dev = NULL;
 	if (dev) {
+		device_remove_file(dev, &part_attr_stat);
 		device_remove_file(dev, &part_attr_size);
 		device_remove_file(dev, &part_attr_start);
 		device_remove_file(dev, &part_attr_dev);
@@ -355,6 +370,7 @@
 	device_create_file(dev, &part_attr_dev);
 	device_create_file(dev, &part_attr_start);
 	device_create_file(dev, &part_attr_size);
+	device_create_file(dev, &part_attr_stat);
 	p->hd_driverfs_dev = dev;
 }
 
@@ -377,6 +393,27 @@
 	struct gendisk *disk = dev->driver_data;
 	return off ? 0 : sprintf(page, "%llu\n",(unsigned long long)get_capacity(disk));
 }
+static inline unsigned MSEC(unsigned x)
+{
+	return x * 1000 / HZ;
+}
+static ssize_t disk_stat_read(struct device *dev,
+			char *page, size_t count, loff_t off)
+{
+	struct gendisk *disk = dev->driver_data;
+	disk_round_stats(disk);
+	return off ? 0 : sprintf(page,
+		"%8u %8u %8llu %8u "
+		"%8u %8u %8llu %8u "
+		"%8u %8u %8u"
+		"\n",
+		disk->reads, disk->read_merges, (u64)disk->read_sectors,
+		MSEC(disk->read_ticks),
+		disk->writes, disk->write_merges, (u64)disk->write_sectors,
+		MSEC(disk->write_ticks),
+		disk->in_flight, MSEC(disk->io_ticks),
+		MSEC(disk->time_in_queue));
+}
 static struct device_attribute disk_attr_dev = {
 	.attr = {.name = "dev", .mode = S_IRUGO },
 	.show	= disk_dev_read
@@ -389,6 +426,10 @@
 	.attr = {.name = "size", .mode = S_IRUGO },
 	.show	= disk_size_read
 };
+static struct device_attribute disk_attr_stat = {
+	.attr = {.name = "stat", .mode = S_IRUGO },
+	.show	= disk_stat_read
+};
 
 static void disk_driverfs_symlinks(struct gendisk *disk)
 {
@@ -459,6 +500,7 @@
 	device_create_file(dev, &disk_attr_dev);
 	device_create_file(dev, &disk_attr_range);
 	device_create_file(dev, &disk_attr_size);
+	device_create_file(dev, &disk_attr_stat);
 	disk_driverfs_symlinks(disk);
 
 	if (disk->flags & GENHD_FL_CD)
@@ -511,8 +553,8 @@
 	bdev->bd_invalidated = 0;
 	for (p = 1; p < disk->minors; p++)
 		delete_partition(disk, p);
-	if (bdev->bd_op->revalidate_disk)
-		bdev->bd_op->revalidate_disk(disk);
+	if (disk->fops->revalidate_disk)
+		disk->fops->revalidate_disk(disk);
 	if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
 		return res;
 	for (p = 1; p < state->limit; p++) {
@@ -569,10 +611,19 @@
 	disk->capacity = 0;
 	disk->flags &= ~GENHD_FL_UP;
 	unlink_gendisk(disk);
+	disk->reads = disk->writes = 0;
+	disk->read_sectors = disk->write_sectors = 0;
+	disk->read_merges = disk->write_merges = 0;
+	disk->read_ticks = disk->write_ticks = 0;
+	disk->in_flight = 0;
+	disk->io_ticks = 0;
+	disk->time_in_queue = 0;
+	disk->stamp = disk->stamp_idle = 0;
 	devfs_remove_partitions(disk);
 	device_remove_file(&disk->disk_dev, &disk_attr_dev);
 	device_remove_file(&disk->disk_dev, &disk_attr_range);
 	device_remove_file(&disk->disk_dev, &disk_attr_size);
+	device_remove_file(&disk->disk_dev, &disk_attr_stat);
 	driverfs_remove_file(&disk->disk_dev.dir, "device");
 	if (disk->driverfs_dev) {
 		driverfs_remove_file(&disk->driverfs_dev->dir, "block");
@@ -613,9 +664,12 @@
 	 */
 	hd = get_gendisk(dev, &part);
 	dname->name = NULL;
-	if (hd)
+	if (hd) {
 		dname->name = disk_name(hd, part, dname->namebuf);
-	put_disk(hd);
+		if (hd->fops->owner)
+			__MOD_DEC_USE_COUNT(hd->fops->owner);
+		put_disk(hd);
+	}
 	if (!dname->name) {
 		sprintf(dname->namebuf, "[dev %s]", kdevname(to_kdev_t(dev)));
 		dname->name = dname->namebuf;
diff -Nru a/fs/pipe.c b/fs/pipe.c
--- a/fs/pipe.c	Wed Oct 30 16:44:29 2002
+++ b/fs/pipe.c	Wed Oct 30 16:44:29 2002
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/fs.h>
+#include <linux/fcblist.h>
 
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
@@ -47,7 +48,7 @@
 pipe_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
 {
 	struct inode *inode = filp->f_dentry->d_inode;
-	int do_wakeup;
+	int do_wakeup, pfull;
 	ssize_t ret;
 
 	/* pread is not allowed on pipes. */
@@ -63,6 +64,7 @@
 	down(PIPE_SEM(*inode));
 	for (;;) {
 		int size = PIPE_LEN(*inode);
+		pfull = PIPE_FULL(*inode);
 		if (size) {
 			char *pipebuf = PIPE_BASE(*inode) + PIPE_START(*inode);
 			ssize_t chars = PIPE_MAX_RCHUNK(*inode);
@@ -108,16 +110,22 @@
 			if (!ret) ret = -ERESTARTSYS;
 			break;
 		}
+		/* Send notification message */
+		if (pfull && !PIPE_FULL(*inode) && PIPE_WRITEFILE(*inode))
+			file_send_notify(PIPE_WRITEFILE(*inode), ION_OUT, POLLOUT | POLLWRNORM | POLLWRBAND);
 		if (do_wakeup) {
-			wake_up_interruptible(PIPE_WAIT(*inode));
+			wake_up_interruptible_sync(PIPE_WAIT(*inode));
  			kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 		}
 		pipe_wait(inode);
 	}
+	/* Send notification message */
+	if (pfull && !PIPE_FULL(*inode) && PIPE_WRITEFILE(*inode))
+		file_send_notify(PIPE_WRITEFILE(*inode), ION_OUT, POLLOUT | POLLWRNORM | POLLWRBAND);
 	up(PIPE_SEM(*inode));
 	/* Signal writers asynchronously that there is more room.  */
 	if (do_wakeup) {
-		wake_up_interruptible_sync(PIPE_WAIT(*inode));
+		wake_up_interruptible(PIPE_WAIT(*inode));
 		kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 	}
 	if (ret > 0)
@@ -131,7 +139,7 @@
 	struct inode *inode = filp->f_dentry->d_inode;
 	ssize_t ret;
 	size_t min;
-	int do_wakeup;
+	int do_wakeup, pempty;
 
 	/* pwrite is not allowed on pipes. */
 	if (unlikely(ppos != &filp->f_pos))
@@ -149,6 +157,7 @@
 	down(PIPE_SEM(*inode));
 	for (;;) {
 		int free;
+		pempty = PIPE_EMPTY(*inode);
 		if (!PIPE_READERS(*inode)) {
 			send_sig(SIGPIPE, current, 0);
 			if (!ret) ret = -EPIPE;
@@ -194,6 +203,9 @@
 			if (!ret) ret = -ERESTARTSYS;
 			break;
 		}
+		/* Send notification message */
+		if (pempty && !PIPE_EMPTY(*inode) && PIPE_READFILE(*inode))
+			file_send_notify(PIPE_READFILE(*inode), ION_IN, POLLIN | POLLRDNORM);
 		if (do_wakeup) {
 			wake_up_interruptible_sync(PIPE_WAIT(*inode));
 			kill_fasync(PIPE_FASYNC_READERS(*inode), SIGIO, POLL_IN);
@@ -203,6 +215,9 @@
 		pipe_wait(inode);
 		PIPE_WAITING_WRITERS(*inode)--;
 	}
+	/* Send notification message */
+	if (pempty && !PIPE_EMPTY(*inode) && PIPE_READFILE(*inode))
+		file_send_notify(PIPE_READFILE(*inode), ION_IN, POLLIN | POLLRDNORM);
 	up(PIPE_SEM(*inode));
 	if (do_wakeup) {
 		wake_up_interruptible(PIPE_WAIT(*inode));
@@ -266,9 +281,22 @@
 static int
 pipe_release(struct inode *inode, int decr, int decw)
 {
+	struct file *rdfile, *wrfile;
 	down(PIPE_SEM(*inode));
 	PIPE_READERS(*inode) -= decr;
 	PIPE_WRITERS(*inode) -= decw;
+	rdfile = PIPE_READFILE(*inode);
+	wrfile = PIPE_WRITEFILE(*inode);
+ 	if (decr && !PIPE_READERS(*inode)) {
+		PIPE_READFILE(*inode) = NULL;
+		if (wrfile)
+			file_send_notify(wrfile, ION_HUP, POLLHUP);
+	}
+	if (decw && !PIPE_WRITERS(*inode)) {
+		PIPE_WRITEFILE(*inode) = NULL;
+		if (rdfile)
+			file_send_notify(rdfile, ION_HUP, POLLHUP);
+	}
 	if (!PIPE_READERS(*inode) && !PIPE_WRITERS(*inode)) {
 		struct pipe_inode_info *info = inode->i_pipe;
 		inode->i_pipe = NULL;
@@ -488,6 +516,7 @@
 	PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0;
 	PIPE_WAITING_WRITERS(*inode) = 0;
 	PIPE_RCOUNTER(*inode) = PIPE_WCOUNTER(*inode) = 1;
+	PIPE_READFILE(*inode) = PIPE_WRITEFILE(*inode) = NULL;
 	*PIPE_FASYNC_READERS(*inode) = *PIPE_FASYNC_WRITERS(*inode) = NULL;
 
 	return inode;
@@ -595,6 +624,9 @@
 	f2->f_op = &write_pipe_fops;
 	f2->f_mode = 2;
 	f2->f_version = 0;
+
+	PIPE_READFILE(*inode) = f1;
+	PIPE_WRITEFILE(*inode) = f2;
 
 	fd_install(i, f1);
 	fd_install(j, f2);
diff -Nru a/fs/proc/kcore.c b/fs/proc/kcore.c
--- a/fs/proc/kcore.c	Wed Oct 30 16:44:29 2002
+++ b/fs/proc/kcore.c	Wed Oct 30 16:44:29 2002
@@ -99,6 +99,8 @@
 }
 #else /* CONFIG_KCORE_AOUT */
 
+#define	KCORE_BASE	PAGE_OFFSET
+
 #define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
 
 /* An ELF note in memory */
@@ -118,7 +120,7 @@
 	struct vm_struct *m;
 
 	*num_vma = 0;
-	size = ((size_t)high_memory - PAGE_OFFSET + PAGE_SIZE);
+	size = ((size_t)high_memory - KCORE_BASE + PAGE_SIZE);
 	if (!vmlist) {
 		*elf_buflen = PAGE_SIZE;
 		return (size);
@@ -126,15 +128,15 @@
 
 	for (m=vmlist; m; m=m->next) {
 		try = (size_t)m->addr + m->size;
-		if (try > size)
-			size = try;
+		if (try > KCORE_BASE + size)
+			size = try - KCORE_BASE;
 		*num_vma = *num_vma + 1;
 	}
 	*elf_buflen =	sizeof(struct elfhdr) + 
 			(*num_vma + 2)*sizeof(struct elf_phdr) + 
 			3 * sizeof(struct memelfnote);
 	*elf_buflen = PAGE_ALIGN(*elf_buflen);
-	return (size - PAGE_OFFSET + *elf_buflen);
+	return size + *elf_buflen;
 }
 
 
@@ -237,7 +239,7 @@
 	offset += sizeof(struct elf_phdr);
 	phdr->p_type	= PT_LOAD;
 	phdr->p_flags	= PF_R|PF_W|PF_X;
-	phdr->p_offset	= dataoff;
+	phdr->p_offset	= PAGE_OFFSET - KCORE_BASE + dataoff;
 	phdr->p_vaddr	= PAGE_OFFSET;
 	phdr->p_paddr	= __pa(PAGE_OFFSET);
 	phdr->p_filesz	= phdr->p_memsz = ((unsigned long)high_memory - PAGE_OFFSET);
@@ -254,7 +256,7 @@
 
 		phdr->p_type	= PT_LOAD;
 		phdr->p_flags	= PF_R|PF_W|PF_X;
-		phdr->p_offset	= (size_t)m->addr - PAGE_OFFSET + dataoff;
+		phdr->p_offset	= (size_t)m->addr - KCORE_BASE + dataoff;
 		phdr->p_vaddr	= (size_t)m->addr;
 		phdr->p_paddr	= __pa(m->addr);
 		phdr->p_filesz	= phdr->p_memsz	= m->size;
@@ -385,9 +387,9 @@
 	/*
 	 * Fill the remainder of the buffer from kernel VM space.
 	 * We said in the ELF header that the data which starts
-	 * at 'elf_buflen' is virtual address PAGE_OFFSET. --rmk
+	 * at 'elf_buflen' is virtual address KCORE_BASE. --rmk
 	 */
-	start = PAGE_OFFSET + (*fpos - elf_buflen);
+	start = KCORE_BASE + (*fpos - elf_buflen);
 	if ((tsz = (PAGE_SIZE - (start & ~PAGE_MASK))) > buflen)
 		tsz = buflen;
 		
diff -Nru a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
--- a/fs/proc/proc_misc.c	Wed Oct 30 16:44:23 2002
+++ b/fs/proc/proc_misc.c	Wed Oct 30 16:44:23 2002
@@ -39,6 +39,7 @@
 #include <linux/seq_file.h>
 #include <linux/times.h>
 #include <linux/profile.h>
+#include <linux/blkdev.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -295,6 +296,18 @@
 	.release	= seq_release,
 };
 
+extern struct seq_operations swaps_op;
+static int swaps_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &swaps_op);
+}
+static struct file_operations proc_swaps_operations = {
+	.open		= swaps_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= seq_release,
+};
+
 #ifdef CONFIG_MODULES
 extern struct seq_operations modules_op;
 static int modules_open(struct inode *inode, struct file *file)
@@ -404,10 +417,14 @@
 	len += sprintf(page + len,
 		"\nctxt %lu\n"
 		"btime %lu\n"
-		"processes %lu\n",
+		"processes %lu\n"
+		"procs_running %lu\n"
+		"procs_blocked %u\n",
 		nr_context_switches(),
 		xtime.tv_sec - jif / HZ,
-		total_forks);
+		total_forks,
+		nr_running(),
+		atomic_read(&nr_iowait_tasks));
 
 	return proc_calc_metrics(page, start, off, count, eof, len);
 }
@@ -503,13 +520,6 @@
 	return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
-static int swaps_read_proc(char *page, char **start, off_t off,
-				 int count, int *eof, void *data)
-{
-	int len = get_swaparea_info(page);
-	return proc_calc_metrics(page, start, off, count, eof, len);
-}
-
 static int memory_read_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data)
 {
@@ -616,7 +626,6 @@
 		{"rtc",		ds1286_read_proc},
 #endif
 		{"locks",	locks_read_proc},
-		{"swaps",	swaps_read_proc},
 		{"iomem",	memory_read_proc},
 		{"execdomains",	execdomains_read_proc},
 		{NULL,}
@@ -632,6 +641,7 @@
 		entry->proc_fops = &proc_kmsg_operations;
 	create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
 	create_seq_entry("partitions", 0, &proc_partitions_operations);
+	create_seq_entry("swaps", 0, &proc_swaps_operations);
 #if !defined(CONFIG_ARCH_S390)
 	create_seq_entry("interrupts", 0, &proc_interrupts_operations);
 #endif
diff -Nru a/fs/ramfs/inode.c b/fs/ramfs/inode.c
--- a/fs/ramfs/inode.c	Wed Oct 30 16:44:27 2002
+++ b/fs/ramfs/inode.c	Wed Oct 30 16:44:27 2002
@@ -47,48 +47,6 @@
 	.memory_backed	= 1,	/* Does not contribute to dirty memory */
 };
 
-/*
- * Read a page. Again trivial. If it didn't already exist
- * in the page cache, it is zero-filled.
- */
-static int ramfs_readpage(struct file *file, struct page * page)
-{
-	if (!PageUptodate(page)) {
-		char *kaddr = kmap_atomic(page, KM_USER0);
-
-		memset(kaddr, 0, PAGE_CACHE_SIZE);
-		kunmap_atomic(kaddr, KM_USER0);
-		flush_dcache_page(page);
-		SetPageUptodate(page);
-	}
-	unlock_page(page);
-	return 0;
-}
-
-static int ramfs_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to)
-{
-	if (!PageUptodate(page)) {
-		char *kaddr = kmap_atomic(page, KM_USER0);
-
-		memset(kaddr, 0, PAGE_CACHE_SIZE);
-		flush_dcache_page(page);
-		kunmap_atomic(kaddr, KM_USER0);
-		SetPageUptodate(page);
-	}
-	set_page_dirty(page);
-	return 0;
-}
-
-static int ramfs_commit_write(struct file *file, struct page *page, unsigned offset, unsigned to)
-{
-	struct inode *inode = page->mapping->host;
-	loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
-
-	if (pos > inode->i_size)
-		inode->i_size = pos;
-	return 0;
-}
-
 struct inode *ramfs_get_inode(struct super_block *sb, int mode, int dev)
 {
 	struct inode * inode = new_inode(sb);
@@ -175,10 +133,10 @@
 }
 
 static struct address_space_operations ramfs_aops = {
-	.readpage	= ramfs_readpage,
+	.readpage	= simple_readpage,
 	.writepage	= fail_writepage,
-	.prepare_write	= ramfs_prepare_write,
-	.commit_write	= ramfs_commit_write
+	.prepare_write	= simple_prepare_write,
+	.commit_write	= simple_commit_write
 };
 
 static struct file_operations ramfs_file_operations = {
diff -Nru a/fs/read_write.c b/fs/read_write.c
--- a/fs/read_write.c	Wed Oct 30 16:44:29 2002
+++ b/fs/read_write.c	Wed Oct 30 16:44:29 2002
@@ -207,6 +207,53 @@
 	return ret;
 }
 
+ssize_t vfs_readv(struct file *file, struct iovec *vec, int vlen, size_t count, loff_t *pos)
+{
+	struct inode *inode = file->f_dentry->d_inode;
+	ssize_t ret;
+
+	if (!(file->f_mode & FMODE_READ))
+		return -EBADF;
+	if (!file->f_op || (!file->f_op->read && !file->f_op->aio_read))
+		return -EINVAL;
+
+	ret = locks_verify_area(FLOCK_VERIFY_READ, inode, file, *pos, count);
+	if (!ret) {
+		ret = security_ops->file_permission (file, MAY_READ);
+		if (!ret) {
+			if (file->f_op->readv)
+				ret = file->f_op->readv(file, vec, vlen, pos);
+			else {
+				/* do it by hand */
+				struct iovec *vector = vec;
+				ret = 0;
+				while (vlen > 0) {
+					void * base =  vector->iov_base;
+					size_t len = vector->iov_len;
+					ssize_t nr;
+					vector++;
+					vlen--;
+					if (file->f_op->read)
+						nr = file->f_op->read(file, base, len, pos);
+					else
+						nr = do_sync_read(file, base, len, pos);
+					if (nr < 0) {
+						if (!ret) ret = nr;
+						break;
+					}
+					ret += nr;
+					if (nr != len)
+						break;
+				}
+			}
+			if (ret > 0)
+				dnotify_parent(file->f_dentry, DN_ACCESS);
+		}
+	}
+
+	return ret;
+}
+
 ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos)
 {
 	struct kiocb kiocb;
@@ -239,6 +286,53 @@
 				ret = file->f_op->write(file, buf, count, pos);
 			else
 				ret = do_sync_write(file, buf, count, pos);
+			if (ret > 0)
+				dnotify_parent(file->f_dentry, DN_MODIFY);
+		}
+	}
+
+	return ret;
+}
+
+ssize_t vfs_writev(struct file *file, const struct iovec *vec, int vlen, size_t count, loff_t *pos)
+{
+	struct inode *inode = file->f_dentry->d_inode;
+	ssize_t ret;
+
+	if (!(file->f_mode & FMODE_WRITE))
+		return -EBADF;
+	if (!file->f_op || (!file->f_op->write && !file->f_op->aio_write))
+		return -EINVAL;
+
+	ret = locks_verify_area(FLOCK_VERIFY_WRITE, inode, file, *pos, count);
+	if (!ret) {
+		ret = security_ops->file_permission (file, MAY_WRITE);
+		if (!ret) {
+			if (file->f_op->writev)
+				ret = file->f_op->writev(file, vec, vlen, pos);
+			else {
+				/* do it by hand */
+				const struct iovec *vector = vec;
+				ret = 0;
+				while (vlen > 0) {
+					void * base = vector->iov_base;
+					size_t len = vector->iov_len;
+					ssize_t nr;
+					vector++;
+					vlen--;
+					if (file->f_op->write)
+						nr = file->f_op->write(file, base, len, pos);
+					else
+						nr = do_sync_write(file, base, len, pos);
+					if (nr < 0) {
+						if (!ret) ret = nr;
+						break;
+					}
+					ret += nr;
+					if (nr != len)
+						break;
+				}
+			}
 			if (ret > 0)
 				dnotify_parent(file->f_dentry, DN_MODIFY);
 		}
diff -Nru a/fs/super.c b/fs/super.c
--- a/fs/super.c	Wed Oct 30 16:44:28 2002
+++ b/fs/super.c	Wed Oct 30 16:44:28 2002
@@ -23,7 +23,6 @@
 #include <linux/config.h>
 #include <linux/slab.h>
 #include <linux/smp_lock.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/acct.h>
 #include <linux/blkdev.h>
 #include <linux/quotaops.h>
@@ -465,11 +464,8 @@
 {
 	struct inode *inode;
 	struct block_device *bdev;
-	struct block_device_operations *bdops;
-	devfs_handle_t de;
 	struct super_block * s;
 	struct nameidata nd;
-	kdev_t dev;
 	int error = 0;
 	mode_t mode = FMODE_READ; /* we always need it ;-) */
 
@@ -490,15 +486,10 @@
 	if (error)
 		goto out;
 	bdev = inode->i_bdev;
-	de = devfs_get_handle_from_inode (inode);
-	bdops = devfs_get_ops (de);         /*  Increments module use count  */
-	if (bdops) bdev->bd_op = bdops;
 	/* Done with lookups, semaphore down */
-	dev = to_kdev_t(bdev->bd_dev);
 	if (!(flags & MS_RDONLY))
 		mode |= FMODE_WRITE;
 	error = blkdev_get(bdev, mode, 0, BDEV_FS);
-	devfs_put_ops (de);   /*  Decrement module use count now we're safe  */
 	if (error)
 		goto out;
 	error = -EACCES;
diff -Nru a/fs/sysfs/inode.c b/fs/sysfs/inode.c
--- a/fs/sysfs/inode.c	Wed Oct 30 16:44:32 2002
+++ b/fs/sysfs/inode.c	Wed Oct 30 16:44:32 2002
@@ -33,7 +33,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/backing-dev.h>
-#include <linux/sysfs.h>
+#include <linux/kobject.h>
 
 #include <asm/uaccess.h>
 
@@ -42,7 +42,6 @@
 
 static struct super_operations sysfs_ops;
 static struct file_operations sysfs_file_operations;
-static struct inode_operations sysfs_dir_inode_operations;
 static struct address_space_operations sysfs_aops;
 
 static struct vfsmount *sysfs_mount;
@@ -52,45 +51,6 @@
 	.memory_backed	= 1,	/* Does not contribute to dirty memory */
 };
 
-static int sysfs_readpage(struct file *file, struct page * page)
-{
-	if (!PageUptodate(page)) {
-		void *kaddr = kmap_atomic(page, KM_USER0);
-
-		memset(kaddr, 0, PAGE_CACHE_SIZE);
-		flush_dcache_page(page);
-		kunmap_atomic(kaddr, KM_USER0);
-		SetPageUptodate(page);
-	}
-	unlock_page(page);
-	return 0;
-}
-
-static int sysfs_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to)
-{
-	if (!PageUptodate(page)) {
-		void *kaddr = kmap_atomic(page, KM_USER0);
-
-		memset(kaddr, 0, PAGE_CACHE_SIZE);
-		flush_dcache_page(page);
-		kunmap_atomic(kaddr, KM_USER0);
-		SetPageUptodate(page);
-	}
-	return 0;
-}
-
-static int sysfs_commit_write(struct file *file, struct page *page, unsigned offset, unsigned to)
-{
-	struct inode *inode = page->mapping->host;
-	loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
-
-	set_page_dirty(page);
-	if (pos > inode->i_size)
-		inode->i_size = pos;
-	return 0;
-}
-
-
 static struct inode *sysfs_get_inode(struct super_block *sb, int mode, int dev)
 {
 	struct inode *inode = new_inode(sb);
@@ -113,7 +73,7 @@
 			inode->i_fop = &sysfs_file_operations;
 			break;
 		case S_IFDIR:
-			inode->i_op = &sysfs_dir_inode_operations;
+			inode->i_op = &simple_dir_inode_operations;
 			inode->i_fop = &simple_dir_operations;
 
 			/* directory inodes start off with i_nlink == 2 (for "." entry) */
@@ -182,29 +142,6 @@
 	return error;
 }
 
-static inline int sysfs_positive(struct dentry *dentry)
-{
-	return (dentry->d_inode && !d_unhashed(dentry));
-}
-
-static int sysfs_empty(struct dentry *dentry)
-{
-	struct list_head *list;
-
-	spin_lock(&dcache_lock);
-
-	list_for_each(list, &dentry->d_subdirs) {
-		struct dentry *de = list_entry(list, struct dentry, d_child);
-		if (sysfs_positive(de)) {
-			spin_unlock(&dcache_lock);
-			return 0;
-		}
-	}
-
-	spin_unlock(&dcache_lock);
-	return 1;
-}
-
 static int sysfs_unlink(struct inode *dir, struct dentry *dentry)
 {
 	struct inode *inode = dentry->d_inode;
@@ -217,30 +154,34 @@
 }
 
 /**
- * sysfs_read_file - "read" data from a file.
- * @file:	file pointer
- * @buf:	buffer to fill
- * @count:	number of bytes to read
- * @ppos:	starting offset in file
+ *	sysfs_read_file - read an attribute. 
+ *	@file:	file pointer.
+ *	@buf:	buffer to fill.
+ *	@count:	number of bytes to read.
+ *	@ppos:	starting offset in file.
  *
- * Userspace wants data from a file. It is up to the creator of the file to
- * provide that data.
- * There is a struct device_attribute embedded in file->private_data. We
- * obtain that and check if the read callback is implemented. If so, we call
- * it, passing the data field of the file entry.
- * Said callback is responsible for filling the buffer and returning the number
- * of bytes it put in it. We update @ppos correctly.
+ *	Userspace wants to read an attribute file. The attribute descriptor
+ *	is in the file's ->d_fsdata. The target object is in the directory's
+ *	->d_fsdata. 
+ *
+ *	We allocate a %PAGE_SIZE buffer, and pass it to the object's ->show()
+ *	method (along with the object). We loop doing this until @count is 
+ *	satisfied, or ->show() returns %0. 
  */
+
 static ssize_t
 sysfs_read_file(struct file *file, char *buf, size_t count, loff_t *ppos)
 {
 	struct attribute * attr = file->f_dentry->d_fsdata;
-	struct driver_dir_entry * dir;
+	struct sysfs_ops * ops = NULL;
+	struct kobject * kobj;
 	unsigned char *page;
 	ssize_t retval = 0;
 
-	dir = file->f_dentry->d_parent->d_fsdata;
-	if (!dir->ops->show)
+	kobj = file->f_dentry->d_parent->d_fsdata;
+	if (kobj && kobj->subsys)
+		ops = kobj->subsys->sysfs_ops;
+	if (!ops || !ops->show)
 		return 0;
 
 	if (count > PAGE_SIZE)
@@ -253,7 +194,7 @@
 	while (count > 0) {
 		ssize_t len;
 
-		len = dir->ops->show(dir,attr,page,count,*ppos);
+		len = ops->show(kobj,attr,page,count,*ppos);
 
 		if (len <= 0) {
 			if (len < 0)
@@ -277,27 +218,32 @@
 }
 
 /**
- * sysfs_write_file - "write" to a file
- * @file:	file pointer
- * @buf:	data to write
- * @count:	number of bytes
- * @ppos:	starting offset
+ *	sysfs_write_file - write an attribute.
+ *	@file:	file pointer
+ *	@buf:	data to write
+ *	@count:	number of bytes
+ *	@ppos:	starting offset
  *
- * Similarly to sysfs_read_file, we act essentially as a bit pipe.
- * We check for a "write" callback in file->private_data, and pass
- * @buffer, @count, @ppos, and the file entry's data to the callback.
- * The number of bytes written is returned, and we handle updating
- * @ppos properly.
+ *	Identical to sysfs_read_file(), though going the opposite direction.
+ *	We allocate a %PAGE_SIZE buffer and copy in the userspace buffer. We
+ *	pass that to the object's ->store() method until we reach @count or 
+ *	->store() returns %0 or less.
  */
+
 static ssize_t
 sysfs_write_file(struct file *file, const char *buf, size_t count, loff_t *ppos)
 {
 	struct attribute * attr = file->f_dentry->d_fsdata;
-	struct driver_dir_entry * dir;
+	struct sysfs_ops * ops = NULL;
+	struct kobject * kobj;
 	ssize_t retval = 0;
 	char * page;
 
-	dir = file->f_dentry->d_parent->d_fsdata;
+	kobj = file->f_dentry->d_parent->d_fsdata;
+	if (kobj && kobj->subsys)
+		ops = kobj->subsys->sysfs_ops;
+	if (!ops || !ops->store)
+		return 0;
 
 	page = (char *)__get_free_page(GFP_KERNEL);
 	if (!page)
@@ -312,7 +258,7 @@
 	while (count > 0) {
 		ssize_t len;
 
-		len = dir->ops->store(dir,attr,page + retval,count,*ppos);
+		len = ops->store(kobj,attr,page + retval,count,*ppos);
 
 		if (len <= 0) {
 			if (len < 0)
@@ -329,77 +275,42 @@
 	return retval;
 }
 
-static loff_t
-sysfs_file_lseek(struct file *file, loff_t offset, int orig)
-{
-	loff_t retval = -EINVAL;
-
-	down(&file->f_dentry->d_inode->i_sem);
-	switch(orig) {
-	case 0:
-		if (offset > 0) {
-			file->f_pos = offset;
-			retval = file->f_pos;
-		}
-		break;
-	case 1:
-		if ((offset + file->f_pos) > 0) {
-			file->f_pos += offset;
-			retval = file->f_pos;
-		}
-		break;
-	default:
-		break;
-	}
-	up(&file->f_dentry->d_inode->i_sem);
-	return retval;
-}
-
 static int sysfs_open_file(struct inode * inode, struct file * filp)
 {
-	struct driver_dir_entry * dir;
+	struct kobject * kobj;
 	int error = 0;
 
-	dir = (struct driver_dir_entry *)filp->f_dentry->d_parent->d_fsdata;
-	if (dir) {
+	kobj = filp->f_dentry->d_parent->d_fsdata;
+	if ((kobj = kobject_get(kobj))) {
 		struct attribute * attr = filp->f_dentry->d_fsdata;
-		if (attr && dir->ops) {
-			if (dir->ops->open)
-				error = dir->ops->open(dir);
-			goto Done;
-		}
-	}
-	error = -EINVAL;
- Done:
+		if (!attr)
+			error = -EINVAL;
+	} else
+		error = -EINVAL;
 	return error;
 }
 
 static int sysfs_release(struct inode * inode, struct file * filp)
 {
-	struct driver_dir_entry * dir;
-	dir = (struct driver_dir_entry *)filp->f_dentry->d_parent->d_fsdata;
-	if (dir->ops->close)
-		dir->ops->close(dir);
+	struct kobject * kobj = filp->f_dentry->d_parent->d_fsdata;
+	if (kobj) 
+		kobject_put(kobj);
 	return 0;
 }
 
 static struct file_operations sysfs_file_operations = {
 	.read		= sysfs_read_file,
 	.write		= sysfs_write_file,
-	.llseek		= sysfs_file_lseek,
+	.llseek		= generic_file_llseek,
 	.open		= sysfs_open_file,
 	.release	= sysfs_release,
 };
 
-static struct inode_operations sysfs_dir_inode_operations = {
-	.lookup		= simple_lookup,
-};
-
 static struct address_space_operations sysfs_aops = {
-	.readpage	= sysfs_readpage,
+	.readpage	= simple_readpage,
 	.writepage	= fail_writepage,
-	.prepare_write	= sysfs_prepare_write,
-	.commit_write	= sysfs_commit_write
+	.prepare_write	= simple_prepare_write,
+	.commit_write	= simple_commit_write
 };
 
 static struct super_operations sysfs_ops = {
@@ -464,6 +375,7 @@
 
 core_initcall(sysfs_init);
 
+
 static struct dentry * get_dentry(struct dentry * parent, const char * name)
 {
 	struct qstr qstr;
@@ -474,137 +386,207 @@
 	return lookup_hash(&qstr,parent);
 }
 
+
 /**
- * sysfs_create_dir - create a directory in the filesystem
- * @entry:	directory entry
- * @parent:	parent directory entry
+ *	sysfs_create_dir - create a directory for an object.
+ *	@parent:	parent parent object.
+ *	@kobj:		object we're creating directory for. 
  */
-int
-sysfs_create_dir(struct driver_dir_entry * entry,
-		    struct driver_dir_entry * parent)
+
+int sysfs_create_dir(struct kobject * kobj)
 {
 	struct dentry * dentry = NULL;
-	struct dentry * parent_dentry;
+	struct dentry * parent;
 	int error = 0;
 
-	if (!entry)
+	if (!kobj)
 		return -EINVAL;
 
-	parent_dentry = parent ? parent->dentry : NULL;
-
-	if (!parent_dentry)
-		if (sysfs_mount && sysfs_mount->mnt_sb)
-			parent_dentry = sysfs_mount->mnt_sb->s_root;
-
-	if (!parent_dentry)
+	if (kobj->parent)
+		parent = kobj->parent->dentry;
+	else if (sysfs_mount && sysfs_mount->mnt_sb)
+		parent = sysfs_mount->mnt_sb->s_root;
+	else
 		return -EFAULT;
 
-	down(&parent_dentry->d_inode->i_sem);
-	dentry = get_dentry(parent_dentry,entry->name);
+	down(&parent->d_inode->i_sem);
+	dentry = get_dentry(parent,kobj->name);
 	if (!IS_ERR(dentry)) {
-		dentry->d_fsdata = (void *) entry;
-		entry->dentry = dentry;
-		error = sysfs_mkdir(parent_dentry->d_inode,dentry,entry->mode);
+		dentry->d_fsdata = (void *)kobj;
+		kobj->dentry = dentry;
+		error = sysfs_mkdir(parent->d_inode,dentry,
+				    (S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO));
 	} else
 		error = PTR_ERR(dentry);
-	up(&parent_dentry->d_inode->i_sem);
+	up(&parent->d_inode->i_sem);
 
 	return error;
 }
 
+
 /**
- * sysfs_create_file - create a file
- * @entry:	structure describing the file
- * @parent:	directory to create it in
+ *	sysfs_create_file - create an attribute file for an object.
+ *	@kobj:	object we're creating for. 
+ *	@attr:	atrribute descriptor.
  */
-int
-sysfs_create_file(struct attribute * entry,
-		     struct driver_dir_entry * parent)
+
+int sysfs_create_file(struct kobject * kobj, struct attribute * attr)
 {
 	struct dentry * dentry;
+	struct dentry * parent;
 	int error = 0;
 
-	if (!entry || !parent)
+	if (!kobj || !attr)
 		return -EINVAL;
 
-	if (!parent->dentry)
-		return -EINVAL;
+	parent = kobj->dentry;
 
-	down(&parent->dentry->d_inode->i_sem);
-	dentry = get_dentry(parent->dentry,entry->name);
+	down(&parent->d_inode->i_sem);
+	dentry = get_dentry(parent,attr->name);
 	if (!IS_ERR(dentry)) {
-		dentry->d_fsdata = (void *)entry;
-		error = sysfs_create(parent->dentry->d_inode,dentry,entry->mode);
+		dentry->d_fsdata = (void *)attr;
+		error = sysfs_create(parent->d_inode,dentry,attr->mode);
 	} else
 		error = PTR_ERR(dentry);
-	up(&parent->dentry->d_inode->i_sem);
+	up(&parent->d_inode->i_sem);
 	return error;
 }
 
+
+static int object_depth(struct kobject * kobj)
+{
+	struct kobject * p = kobj;
+	int depth = 0;
+	do { depth++; } while ((p = p->parent));
+	return depth;
+}
+
+static int object_path_length(struct kobject * kobj)
+{
+	struct kobject * p = kobj;
+	int length = 1;
+	do {
+		length += strlen(p->name) + 1;
+		p = p->parent;
+	} while (p);
+	return length;
+}
+
+static void fill_object_path(struct kobject * kobj, char * buffer, int length)
+{
+	struct kobject * p;
+
+	--length;
+	for (p = kobj; p; p = p->parent) {
+		int cur = strlen(p->name);
+
+		/* back up enough to print this bus id with '/' */
+		length -= cur;
+		strncpy(buffer + length,p->name,cur);
+		*(buffer + --length) = '/';
+	}
+}
+
 /**
- * sysfs_create_symlink - make a symlink
- * @parent:	directory we're creating in 
- * @entry:	entry describing link
- * @target:	place we're symlinking to
- * 
+ *	sysfs_create_link - create symlink between two objects.
+ *	@kobj:	object whose directory we're creating the link in.
+ *	@target:	object we're pointing to.
+ *	@name:		name of the symlink.
  */
-int sysfs_create_symlink(struct driver_dir_entry * parent, 
-			    char * name, char * target)
+int sysfs_create_link(struct kobject * kobj, struct kobject * target, char * name)
 {
-	struct dentry * dentry;
+	struct dentry * dentry = kobj->dentry;
+	struct dentry * d;
 	int error = 0;
+	int size;
+	int depth;
+	char * path;
+	char * s;
+
+	depth = object_depth(kobj);
+	size = object_path_length(target) + depth * 3 - 1;
+	if (size > PATH_MAX)
+		return -ENAMETOOLONG;
+	pr_debug("%s: depth = %d, size = %d\n",__FUNCTION__,depth,size);
 
-	if (!parent || !parent->dentry)
-		return -EINVAL;
+	path = kmalloc(size,GFP_KERNEL);
+	if (!path)
+		return -ENOMEM;
+	memset(path,0,size);
 
-	down(&parent->dentry->d_inode->i_sem);
-	dentry = get_dentry(parent->dentry,name);
-	if (!IS_ERR(dentry))
-		error = sysfs_symlink(parent->dentry->d_inode,dentry,target);
+	for (s = path; depth--; s += 3)
+		strcpy(s,"../");
+
+	fill_object_path(target,path,size);
+	pr_debug("%s: path = '%s'\n",__FUNCTION__,path);
+
+	down(&dentry->d_inode->i_sem);
+	d = get_dentry(dentry,name);
+	if (!IS_ERR(d))
+		error = sysfs_symlink(dentry->d_inode,d,path);
 	else
-		error = PTR_ERR(dentry);
-	up(&parent->dentry->d_inode->i_sem);
+		error = PTR_ERR(d);
+	up(&dentry->d_inode->i_sem);
+	kfree(path);
 	return error;
 }
 
+static void hash_and_remove(struct dentry * dir, const char * name)
+{
+	struct dentry * victim;
+
+	down(&dir->d_inode->i_sem);
+	victim = 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)) {
+			sysfs_unlink(dir->d_inode,victim);
+		}
+	}
+	up(&dir->d_inode->i_sem);
+}
+
+
 /**
- * sysfs_remove_file - exported file removal
- * @dir:	directory the file supposedly resides in
- * @name:	name of the file
+ *	sysfs_remove_file - remove an object attribute.
+ *	@kobj:	object we're acting for.
+ *	@attr:	attribute descriptor.
  *
- * Try and find the file in the dir's list.
- * If it's there, call __remove_file() (above) for the dentry.
+ *	Hash the attribute name and kill the victim.
  */
-void sysfs_remove_file(struct driver_dir_entry * dir, const char * name)
+
+void sysfs_remove_file(struct kobject * kobj, struct attribute * attr)
 {
-	struct dentry * dentry;
+	hash_and_remove(kobj->dentry,attr->name);
+}
 
-	if (!dir->dentry)
-		return;
 
-	down(&dir->dentry->d_inode->i_sem);
-	dentry = get_dentry(dir->dentry,name);
-	if (!IS_ERR(dentry)) {
-		/* make sure dentry is really there */
-		if (dentry->d_inode && 
-		    (dentry->d_parent->d_inode == dir->dentry->d_inode)) {
-			sysfs_unlink(dir->dentry->d_inode,dentry);
-		}
-	}
-	up(&dir->dentry->d_inode->i_sem);
+/**
+ *	sysfs_remove_link - remove symlink in object's directory.
+ *	@kobj:	object we're acting for.
+ *	@name:	name of the symlink to remove.
+ */
+
+void sysfs_remove_link(struct kobject * kobj, char * name)
+{
+	hash_and_remove(kobj->dentry,name);
 }
 
+
 /**
- * sysfs_remove_dir - exportable directory removal
- * @dir:	directory to remove
+ *	sysfs_remove_dir - remove an object's directory.
+ *	@kobj:	object. 
  *
- * To make sure we don't orphan anyone, first remove
- * all the children in the list, then do clean up the directory.
+ *	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.
  */
-void sysfs_remove_dir(struct driver_dir_entry * dir)
+
+void sysfs_remove_dir(struct kobject * kobj)
 {
 	struct list_head * node, * next;
-	struct dentry * dentry = dir->dentry;
+	struct dentry * dentry = kobj->dentry;
 	struct dentry * parent;
 
 	if (!dentry)
@@ -622,7 +604,7 @@
 	}
 
 	d_invalidate(dentry);
-	if (sysfs_empty(dentry)) {
+	if (simple_empty(dentry)) {
 		dentry->d_inode->i_nlink -= 2;
 		dentry->d_inode->i_flags |= S_DEAD;
 		parent->d_inode->i_nlink--;
@@ -635,8 +617,9 @@
 }
 
 EXPORT_SYMBOL(sysfs_create_file);
-EXPORT_SYMBOL(sysfs_create_symlink);
-EXPORT_SYMBOL(sysfs_create_dir);
 EXPORT_SYMBOL(sysfs_remove_file);
+EXPORT_SYMBOL(sysfs_create_link);
+EXPORT_SYMBOL(sysfs_remove_link);
+EXPORT_SYMBOL(sysfs_create_dir);
 EXPORT_SYMBOL(sysfs_remove_dir);
 MODULE_LICENSE("GPL");
diff -Nru a/fs/vfat/namei.c b/fs/vfat/namei.c
--- a/fs/vfat/namei.c	Wed Oct 30 16:44:29 2002
+++ b/fs/vfat/namei.c	Wed Oct 30 16:44:29 2002
@@ -319,9 +319,9 @@
 	struct buffer_head *bh = NULL;
 	int ino,res;
 
-	res=fat_scan(dir,name,&bh,&de,&ino);
-	fat_brelse(dir->i_sb, bh);
-	if (res<0)
+	res = fat_scan(dir,name,&bh,&de,&ino);
+	brelse(bh);
+	if (res < 0)
 		return -ENOENT;
 	return 0;
 }
@@ -690,42 +690,39 @@
 	return 0;
 }
 
-static int
-vfat_fill_slots(struct inode *dir, struct msdos_dir_slot *ds, const char *name,
-		int len, int *slots, int is_dir, int uni_xlate)
+static int vfat_build_slots(struct inode *dir, const char *name, int len,
+			    struct msdos_dir_slot *ds, int *slots, int is_dir)
 {
-	struct nls_table *nls_io, *nls_disk;
-	wchar_t *uname;
+	struct msdos_sb_info *sbi = MSDOS_SB(dir->i_sb);
+	struct fat_mount_options *opts = &sbi->options;
 	struct msdos_dir_slot *ps;
 	struct msdos_dir_entry *de;
 	unsigned long page;
 	unsigned char cksum, lcase;
-	char *uniname, msdos_name[MSDOS_NAME];
-	int res, utf8, slot, ulen, unilen, i;
+	char msdos_name[MSDOS_NAME];
+	wchar_t *uname;
+	int res, slot, ulen, usize, i;
 	loff_t offset;
 
 	*slots = 0;
-	utf8 = MSDOS_SB(dir->i_sb)->options.utf8;
-	nls_io = MSDOS_SB(dir->i_sb)->nls_io;
-	nls_disk = MSDOS_SB(dir->i_sb)->nls_disk;
+	res = vfat_valid_longname(name, len, opts->unicode_xlate);
+	if (res < 0)
+		return res;
 
-	if (name[len-1] == '.')
-		len--;
 	if(!(page = __get_free_page(GFP_KERNEL)))
 		return -ENOMEM;
 
-	uniname = (char *) page;
-	res = xlate_to_uni(name, len, uniname, &ulen, &unilen, uni_xlate,
-			   utf8, nls_io);
+	uname = (wchar_t *)page;
+	res = xlate_to_uni(name, len, (char *)uname, &ulen, &usize,
+			   opts->unicode_xlate, opts->utf8, sbi->nls_io);
 	if (res < 0)
 		goto out_free;
 
-	uname = (wchar_t *) page;
 	res = vfat_is_used_badchars(uname, ulen);
 	if (res < 0)
 		goto out_free;
 
-	res = vfat_create_shortname(dir, nls_disk, uname, ulen,
+	res = vfat_create_shortname(dir, sbi->nls_disk, uname, ulen,
 				    msdos_name, &lcase);
 	if (res < 0)
 		goto out_free;
@@ -736,7 +733,7 @@
 	}
 
 	/* build the entry of long file name */
-	*slots = unilen / 13;
+	*slots = usize / 13;
 	for (cksum = i = 0; i < 11; i++) {
 		cksum = (((cksum&1)<<7)|((cksum&0xfe)>>1)) + msdos_name[i];
 	}
@@ -774,26 +771,10 @@
 	return res;
 }
 
-/* We can't get "." or ".." here - VFS takes care of those cases */
-
-static int vfat_build_slots(struct inode *dir, const char *name, int len,
-			    struct msdos_dir_slot *ds, int *slots, int is_dir)
-{
-	int res, xlate;
-
-	xlate = MSDOS_SB(dir->i_sb)->options.unicode_xlate;
-	res = vfat_valid_longname(name, len, xlate);
-	if (res < 0)
-		return res;
-
-	return vfat_fill_slots(dir, ds, name, len, slots, is_dir, xlate);
-}
-
 static int vfat_add_entry(struct inode *dir,struct qstr* qname,
 			  int is_dir, struct vfat_slot_info *sinfo_out,
 			  struct buffer_head **bh, struct msdos_dir_entry **de)
 {
-	struct super_block *sb = dir->i_sb;
 	struct msdos_dir_slot *dir_slots;
 	loff_t offset;
 	int slots, slot;
@@ -821,7 +802,7 @@
 		res = offset;
 		goto cleanup;
 	}
-	fat_brelse(sb, dummy_bh);
+	brelse(dummy_bh);
 
 	/* Now create the new entry */
 	*bh = NULL;
@@ -831,7 +812,7 @@
 			goto cleanup;
 		}
 		memcpy(*de, dir_slots + slot, sizeof(struct msdos_dir_slot));
-		fat_mark_buffer_dirty(sb, *bh);
+		mark_buffer_dirty(*bh);
 	}
 
 	res = 0;
@@ -843,7 +824,7 @@
 	(*de)->ctime = (*de)->time;
 	(*de)->adate = (*de)->cdate = (*de)->date;
 
-	fat_mark_buffer_dirty(sb, *bh);
+	mark_buffer_dirty(*bh);
 
 	/* slots can't be less than 1 */
 	sinfo_out->long_slots = slots - 1;
@@ -902,7 +883,7 @@
 		goto error;
 	}
 	inode = fat_build_inode(dir->i_sb, de, sinfo.ino, &res);
-	fat_brelse(dir->i_sb, bh);
+	brelse(bh);
 	if (res) {
 		unlock_kernel();
 		return ERR_PTR(res);
@@ -946,7 +927,7 @@
 		return res;
 	}
 	inode = fat_build_inode(sb, de, sinfo.ino, &res);
-	fat_brelse(sb, bh);
+	brelse(bh);
 	if (!inode) {
 		unlock_kernel();
 		return res;
@@ -964,7 +945,6 @@
 static void vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo,
      struct buffer_head *bh, struct msdos_dir_entry *de)
 {
-	struct super_block *sb = dir->i_sb;
 	loff_t offset;
 	int i,ino;
 
@@ -974,7 +954,7 @@
 	dir->i_version++;
 	mark_inode_dirty(dir);
 	de->name[0] = DELETED_FLAG;
-	fat_mark_buffer_dirty(sb, bh);
+	mark_buffer_dirty(bh);
 	/* remove the longname */
 	offset = sinfo->longname_offset; de = NULL;
 	for (i = sinfo->long_slots; i > 0; --i) {
@@ -982,9 +962,9 @@
 			continue;
 		de->name[0] = DELETED_FLAG;
 		de->attr = ATTR_NONE;
-		fat_mark_buffer_dirty(sb, bh);
+		mark_buffer_dirty(bh);
 	}
-	if (bh) fat_brelse(sb, bh);
+	brelse(bh);
 }
 
 int vfat_rmdir(struct inode *dir,struct dentry* dentry)
@@ -1075,7 +1055,7 @@
 	dentry->d_time = dentry->d_parent->d_inode->i_version;
 	d_instantiate(dentry,inode);
 out:
-	fat_brelse(sb, bh);
+	brelse(bh);
 	unlock_kernel();
 	return res;
 
@@ -1096,7 +1076,6 @@
 int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
 		struct inode *new_dir,struct dentry *new_dentry)
 {
-	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *old_bh,*new_bh,*dotdot_bh;
 	struct msdos_dir_entry *old_de,*new_de,*dotdot_de;
 	int dotdot_ino;
@@ -1160,7 +1139,7 @@
 		int start = MSDOS_I(new_dir)->i_logstart;
 		dotdot_de->start = CT_LE_W(start);
 		dotdot_de->starthi = CT_LE_W(start>>16);
-		fat_mark_buffer_dirty(sb, dotdot_bh);
+		mark_buffer_dirty(dotdot_bh);
 		old_dir->i_nlink--;
 		if (new_inode) {
 			new_inode->i_nlink--;
@@ -1171,9 +1150,9 @@
 	}
 
 rename_done:
-	fat_brelse(sb, dotdot_bh);
-	fat_brelse(sb, old_bh);
-	fat_brelse(sb, new_bh);
+	brelse(dotdot_bh);
+	brelse(old_bh);
+	brelse(new_bh);
 	unlock_kernel();
 	return res;
 
diff -Nru a/fs/xfs/linux/xfs_aops.c b/fs/xfs/linux/xfs_aops.c
--- a/fs/xfs/linux/xfs_aops.c	Wed Oct 30 16:44:33 2002
+++ b/fs/xfs/linux/xfs_aops.c	Wed Oct 30 16:44:33 2002
@@ -607,8 +607,8 @@
 {
 	struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
 
-        return generic_direct_IO(rw, inode, iov, offset, nr_segs,
-					linvfs_get_blocks_direct);
+        return generic_direct_IO(rw, inode, NULL,
+			iov, offset, nr_segs, linvfs_get_blocks_direct);
 }
 
 
diff -Nru a/fs/xfs/pagebuf/page_buf.c b/fs/xfs/pagebuf/page_buf.c
--- a/fs/xfs/pagebuf/page_buf.c	Wed Oct 30 16:44:19 2002
+++ b/fs/xfs/pagebuf/page_buf.c	Wed Oct 30 16:44:19 2002
@@ -1448,7 +1448,7 @@
 		if (nbytes > size)
 			nbytes = size;
 
-		if (bio_add_page(bio, pb->pb_pages[map_i], nbytes, offset))
+		if (bio_add_page(bio, pb->pb_pages[map_i], nbytes, offset) < nbytes)
 			break;
 
 		offset = 0;
diff -Nru a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
--- a/fs/xfs/xfs_mount.c	Wed Oct 30 16:44:27 2002
+++ b/fs/xfs/xfs_mount.c	Wed Oct 30 16:44:27 2002
@@ -1792,9 +1792,6 @@
 	case EVMS_MAJOR:
 		btp->pbr_flags = PBR_ALIGNED_ONLY;
 		break;
-	case LVM_BLK_MAJOR:
-		btp->pbr_flags = PBR_SECTOR_ONLY;
-		break;
 	}
 
 	return btp;
diff -Nru a/include/asm-alpha/kmap_types.h b/include/asm-alpha/kmap_types.h
--- a/include/asm-alpha/kmap_types.h	Wed Oct 30 16:44:36 2002
+++ b/include/asm-alpha/kmap_types.h	Wed Oct 30 16:44:36 2002
@@ -23,7 +23,9 @@
 D(8)	KM_PTE1,
 D(9)	KM_IRQ0,
 D(10)	KM_IRQ1,
-D(11)	KM_TYPE_NR
+D(11)	KM_CRYPTO_USER,
+D(12)	KM_CRYPTO_SOFTIRQ,
+D(13)	KM_TYPE_NR
 };
 
 #undef D
diff -Nru a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
--- a/include/asm-generic/percpu.h	Wed Oct 30 16:44:26 2002
+++ b/include/asm-generic/percpu.h	Wed Oct 30 16:44:26 2002
@@ -25,10 +25,14 @@
     __typeof__(type) name##__per_cpu
 #endif
 
-#define per_cpu(var, cpu)			var##__per_cpu
+#define per_cpu(var, cpu)			((void)cpu, var##__per_cpu)
 #define __get_cpu_var(var)			var##__per_cpu
-#endif
+
+#endif	/* SMP */
 
 #define DECLARE_PER_CPU(type, name) extern __typeof__(type) name##__per_cpu
+
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var##__per_cpu)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var##__per_cpu)
 
 #endif /* _ASM_GENERIC_PERCPU_H_ */
diff -Nru a/include/asm-i386/edd.h b/include/asm-i386/edd.h
--- a/include/asm-i386/edd.h	Wed Oct 30 16:44:19 2002
+++ b/include/asm-i386/edd.h	Wed Oct 30 16:44:19 2002
@@ -36,6 +36,10 @@
 #define EDDMAXNR 6		/* number of edd_info structs starting at EDDBUF  */
 #define EDDEXTSIZE 4		/* change these if you muck with the structures */
 #define EDDPARMSIZE 74
+#define CHECKEXTENSIONSPRESENT 0x41
+#define GETDEVICEPARAMETERS 0x48
+#define EDDMAGIC1 0x55AA
+#define EDDMAGIC2 0xAA55
 
 #ifndef __ASSEMBLY__
 
diff -Nru a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
--- a/include/asm-i386/fixmap.h	Wed Oct 30 16:44:19 2002
+++ b/include/asm-i386/fixmap.h	Wed Oct 30 16:44:19 2002
@@ -27,7 +27,7 @@
  * 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
+ * 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
@@ -41,13 +41,6 @@
  * 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_X86_LOCAL_APIC
 	FIX_APIC_BASE,	/* local (CPU) APIC) -- required for SMP or not */
@@ -81,6 +74,7 @@
 #define NR_FIX_BTMAPS	16
 	FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
 	FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1,
+	FIX_WP_TEST,
 	__end_of_fixed_addresses
 };
 
@@ -94,6 +88,10 @@
  */
 #define set_fixmap_nocache(idx, phys) \
 		__set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
+
+#define clear_fixmap(idx) \
+		__set_fixmap(idx, 0, __pgprot(0))
+
 /*
  * used by vmalloc.c.
  *
diff -Nru a/include/asm-i386/ide.h b/include/asm-i386/ide.h
--- a/include/asm-i386/ide.h	Wed Oct 30 16:44:21 2002
+++ b/include/asm-i386/ide.h	Wed Oct 30 16:44:21 2002
@@ -70,6 +70,7 @@
 	int index;
 
 	for(index = 0; index < MAX_HWIFS; index++) {
+		memset(&hw, 0, sizeof hw);
 		ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
 		hw.irq = ide_default_irq(ide_default_io_base(index));
 		ide_register_hw(&hw, NULL);
diff -Nru a/include/asm-i386/io.h b/include/asm-i386/io.h
--- a/include/asm-i386/io.h	Wed Oct 30 16:44:35 2002
+++ b/include/asm-i386/io.h	Wed Oct 30 16:44:35 2002
@@ -370,6 +370,6 @@
 
 BUILDIO(b,b,char)
 BUILDIO(w,w,short)
-BUILDIO(l,,long)
+BUILDIO(l,,int)
 
 #endif
diff -Nru a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h
--- a/include/asm-i386/kmap_types.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-i386/kmap_types.h	Wed Oct 30 16:44:30 2002
@@ -22,7 +22,9 @@
 D(9)	KM_PTE2,
 D(10)	KM_IRQ0,
 D(11)	KM_IRQ1,
-D(12)	KM_TYPE_NR
+D(12)	KM_CRYPTO_USER,
+D(13)	KM_CRYPTO_SOFTIRQ,
+D(14)	KM_TYPE_NR
 };
 
 #undef D
diff -Nru a/include/asm-i386/poll.h b/include/asm-i386/poll.h
--- a/include/asm-i386/poll.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-i386/poll.h	Wed Oct 30 16:44:28 2002
@@ -15,6 +15,7 @@
 #define POLLWRNORM	0x0100
 #define POLLWRBAND	0x0200
 #define POLLMSG		0x0400
+#define POLLREMOVE	0x1000
 
 struct pollfd {
 	int fd;
diff -Nru a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h
--- a/include/asm-i386/suspend.h	Wed Oct 30 16:44:26 2002
+++ b/include/asm-i386/suspend.h	Wed Oct 30 16:44:26 2002
@@ -15,22 +15,22 @@
 
 /* image of the saved processor state */
 struct saved_context {
-	u32 eax, ebx, ecx, edx;
-	u32 esp, ebp, esi, edi;
-	u16 es, fs, gs, ss;
-	u32 cr0, cr2, cr3, cr4;
+	unsigned long eax, ebx, ecx, edx;
+	unsigned long esp, ebp, esi, edi;
+  	u16 es, fs, gs, ss;
+	unsigned long cr0, cr2, cr3, cr4;
 	u16 gdt_pad;
 	u16 gdt_limit;
-	u32 gdt_base;
+	unsigned long gdt_base;
 	u16 idt_pad;
 	u16 idt_limit;
-	u32 idt_base;
+	unsigned long idt_base;
 	u16 ldt;
 	u16 tss;
-	u32 tr;
-	u32 safety;
-	u32 return_address;
-	u32 eflags;
+	unsigned long tr;
+	unsigned long safety;
+	unsigned long return_address;
+	unsigned long eflags;
 } __attribute__((packed));
 
 #define loaddebug(thread,register) \
@@ -52,11 +52,11 @@
 static inline void acpi_save_register_state(unsigned long return_point)
 {
 	saved_eip = return_point;
-	asm volatile ("movl %%esp,(%0)" : "=m" (saved_esp));
-	asm volatile ("movl %%ebp,(%0)" : "=m" (saved_ebp));
-	asm volatile ("movl %%ebx,(%0)" : "=m" (saved_ebx));
-	asm volatile ("movl %%edi,(%0)" : "=m" (saved_edi));
-	asm volatile ("movl %%esi,(%0)" : "=m" (saved_esi));
+	asm volatile ("movl %%esp,%0" : "=m" (saved_esp));
+	asm volatile ("movl %%ebp,%0" : "=m" (saved_ebp));
+	asm volatile ("movl %%ebx,%0" : "=m" (saved_ebx));
+	asm volatile ("movl %%edi,%0" : "=m" (saved_edi));
+	asm volatile ("movl %%esi,%0" : "=m" (saved_esi));
 }
 
 #define acpi_restore_register_state()  do {} while (0)
diff -Nru a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
--- a/include/asm-i386/uaccess.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-i386/uaccess.h	Wed Oct 30 16:44:24 2002
@@ -33,7 +33,16 @@
 
 #define segment_eq(a,b)	((a).seg == (b).seg)
 
-extern int __verify_write(const void *, unsigned long);
+/*
+ * movsl can be slow when source and dest are not both 8-byte aligned
+ */
+#ifdef CONFIG_X86_INTEL_USERCOPY
+extern struct movsl_mask {
+	int mask;
+} ____cacheline_aligned_in_smp movsl_mask;
+#endif
+
+int __verify_write(const void *, unsigned long);
 
 #define __addr_ok(addr) ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg))
 
@@ -55,7 +64,6 @@
 
 #define access_ok(type,addr,size) ( (__range_ok(addr,size) == 0) && \
 			 ((type) == VERIFY_READ || boot_cpu_data.wp_works_ok || \
-			 segment_eq(get_fs(),KERNEL_DS) || \
 			  __verify_write((void *)(addr),(size))))
 
 #endif
@@ -248,354 +256,10 @@
 		: "m"(__m(addr)), "i"(-EFAULT), "0"(err))
 
 
-/*
- * Copy To/From Userspace
- */
-
-/* Generic arbitrary sized copy.  */
-#define __copy_user(to,from,size)					\
-do {									\
-	int __d0, __d1;							\
-	__asm__ __volatile__(						\
-		"0:	rep; movsl\n"					\
-		"	movl %3,%0\n"					\
-		"1:	rep; movsb\n"					\
-		"2:\n"							\
-		".section .fixup,\"ax\"\n"				\
-		"3:	lea 0(%3,%0,4),%0\n"				\
-		"	jmp 2b\n"					\
-		".previous\n"						\
-		".section __ex_table,\"a\"\n"				\
-		"	.align 4\n"					\
-		"	.long 0b,3b\n"					\
-		"	.long 1b,2b\n"					\
-		".previous"						\
-		: "=&c"(size), "=&D" (__d0), "=&S" (__d1)		\
-		: "r"(size & 3), "0"(size / 4), "1"(to), "2"(from)	\
-		: "memory");						\
-} while (0)
-
-#define __copy_user_zeroing(to,from,size)				\
-do {									\
-	int __d0, __d1;							\
-	__asm__ __volatile__(						\
-		"0:	rep; movsl\n"					\
-		"	movl %3,%0\n"					\
-		"1:	rep; movsb\n"					\
-		"2:\n"							\
-		".section .fixup,\"ax\"\n"				\
-		"3:	lea 0(%3,%0,4),%0\n"				\
-		"4:	pushl %0\n"					\
-		"	pushl %%eax\n"					\
-		"	xorl %%eax,%%eax\n"				\
-		"	rep; stosb\n"					\
-		"	popl %%eax\n"					\
-		"	popl %0\n"					\
-		"	jmp 2b\n"					\
-		".previous\n"						\
-		".section __ex_table,\"a\"\n"				\
-		"	.align 4\n"					\
-		"	.long 0b,3b\n"					\
-		"	.long 1b,4b\n"					\
-		".previous"						\
-		: "=&c"(size), "=&D" (__d0), "=&S" (__d1)		\
-		: "r"(size & 3), "0"(size / 4), "1"(to), "2"(from)	\
-		: "memory");						\
-} while (0)
-
-/* We let the __ versions of copy_from/to_user inline, because they're often
- * used in fast paths and have only a small space overhead.
- */
-static inline unsigned long
-__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n)
-{
-	__copy_user_zeroing(to,from,n);
-	return n;
-}
-
-static inline unsigned long
-__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
-{
-	__copy_user(to,from,n);
-	return n;
-}
-
-
-/* Optimize just a little bit when we know the size of the move. */
-#define __constant_copy_user(to, from, size)			\
-do {								\
-	int __d0, __d1;						\
-	switch (size & 3) {					\
-	default:						\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"2:	shl $2,%0\n"			\
-			"	jmp 1b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,2b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	case 1:							\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:	movsb\n"			\
-			"2:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"3:	shl $2,%0\n"			\
-			"4:	incl %0\n"			\
-			"	jmp 2b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,3b\n"			\
-			"	.long 1b,4b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	case 2:							\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:	movsw\n"			\
-			"2:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"3:	shl $2,%0\n"			\
-			"4:	addl $2,%0\n"			\
-			"	jmp 2b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,3b\n"			\
-			"	.long 1b,4b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	case 3:							\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:	movsw\n"			\
-			"2:	movsb\n"			\
-			"3:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"4:	shl $2,%0\n"			\
-			"5:	addl $2,%0\n"			\
-			"6:	incl %0\n"			\
-			"	jmp 3b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,4b\n"			\
-			"	.long 1b,5b\n"			\
-			"	.long 2b,6b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	}							\
-} while (0)
-
-/* Optimize just a little bit when we know the size of the move. */
-#define __constant_copy_user_zeroing(to, from, size)		\
-do {								\
-	int __d0, __d1;						\
-	switch (size & 3) {					\
-	default:						\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"2:	pushl %0\n"			\
-			"	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	rep; stosl\n"			\
-			"	popl %%eax\n"			\
-			"	popl %0\n"			\
-			"	shl $2,%0\n"			\
-			"	jmp 1b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,2b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	case 1:							\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:	movsb\n"			\
-			"2:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"3:	pushl %0\n"			\
-			"	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	rep; stosl\n"			\
-			"	stosb\n"			\
-			"	popl %%eax\n"			\
-			"	popl %0\n"			\
-			"	shl $2,%0\n"			\
-			"	incl %0\n"			\
-			"	jmp 2b\n"			\
-			"4:	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	stosb\n"			\
-			"	popl %%eax\n"			\
-			"	incl %0\n"			\
-			"	jmp 2b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,3b\n"			\
-			"	.long 1b,4b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	case 2:							\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:	movsw\n"			\
-			"2:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"3:	pushl %0\n"			\
-			"	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	rep; stosl\n"			\
-			"	stosw\n"			\
-			"	popl %%eax\n"			\
-			"	popl %0\n"			\
-			"	shl $2,%0\n"			\
-			"	addl $2,%0\n"			\
-			"	jmp 2b\n"			\
-			"4:	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	stosw\n"			\
-			"	popl %%eax\n"			\
-			"	addl $2,%0\n"			\
-			"	jmp 2b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,3b\n"			\
-			"	.long 1b,4b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	case 3:							\
-		__asm__ __volatile__(				\
-			"0:	rep; movsl\n"			\
-			"1:	movsw\n"			\
-			"2:	movsb\n"			\
-			"3:\n"					\
-			".section .fixup,\"ax\"\n"		\
-			"4:	pushl %0\n"			\
-			"	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	rep; stosl\n"			\
-			"	stosw\n"			\
-			"	stosb\n"			\
-			"	popl %%eax\n"			\
-			"	popl %0\n"			\
-			"	shl $2,%0\n"			\
-			"	addl $3,%0\n"			\
-			"	jmp 2b\n"			\
-			"5:	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	stosw\n"			\
-			"	stosb\n"			\
-			"	popl %%eax\n"			\
-			"	addl $3,%0\n"			\
-			"	jmp 2b\n"			\
-			"6:	pushl %%eax\n"			\
-			"	xorl %%eax,%%eax\n"		\
-			"	stosb\n"			\
-			"	popl %%eax\n"			\
-			"	incl %0\n"			\
-			"	jmp 3b\n"			\
-			".previous\n"				\
-			".section __ex_table,\"a\"\n"		\
-			"	.align 4\n"			\
-			"	.long 0b,4b\n"			\
-			"	.long 1b,5b\n"			\
-			"	.long 2b,6b\n"			\
-			".previous"				\
-			: "=c"(size), "=&S" (__d0), "=&D" (__d1)\
-			: "1"(from), "2"(to), "0"(size/4)	\
-			: "memory");				\
-		break;						\
-	}							\
-} while (0)
-
-unsigned long __generic_copy_to_user(void *, const void *, unsigned long);
-unsigned long __generic_copy_from_user(void *, const void *, unsigned long);
-
-static inline unsigned long
-__constant_copy_to_user(void *to, const void *from, unsigned long n)
-{
-	prefetch(from);
-	if (access_ok(VERIFY_WRITE, to, n))
-		__constant_copy_user(to,from,n);
-	return n;
-}
-
-static inline unsigned long
-__constant_copy_from_user(void *to, const void *from, unsigned long n)
-{
-	if (access_ok(VERIFY_READ, from, n))
-		__constant_copy_user_zeroing(to,from,n);
-	else
-		memset(to, 0, n);
-	return n;
-}
-
-static inline unsigned long
-__constant_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
-{
-	__constant_copy_user(to,from,n);
-	return n;
-}
-
-static inline unsigned long
-__constant_copy_from_user_nocheck(void *to, const void *from, unsigned long n)
-{
-	__constant_copy_user_zeroing(to,from,n);
-	return n;
-}
-
-#define copy_to_user(to,from,n)				\
-	(__builtin_constant_p(n) ?			\
-	 __constant_copy_to_user((to),(from),(n)) :	\
-	 __generic_copy_to_user((to),(from),(n)))
-
-#define copy_from_user(to,from,n)			\
-	(__builtin_constant_p(n) ?			\
-	 __constant_copy_from_user((to),(from),(n)) :	\
-	 __generic_copy_from_user((to),(from),(n)))
-
-#define __copy_to_user(to,from,n)			\
-	(__builtin_constant_p(n) ?			\
-	 __constant_copy_to_user_nocheck((to),(from),(n)) :	\
-	 __generic_copy_to_user_nocheck((to),(from),(n)))
-
-#define __copy_from_user(to,from,n)			\
-	(__builtin_constant_p(n) ?			\
-	 __constant_copy_from_user_nocheck((to),(from),(n)) :	\
-	 __generic_copy_from_user_nocheck((to),(from),(n)))
+unsigned long copy_to_user(void *to, const void *from, unsigned long n);
+unsigned long copy_from_user(void *to, const void *from, unsigned long n);
+unsigned long __copy_to_user(void *to, const void *from, unsigned long n);
+unsigned long __copy_from_user(void *to, const void *from, unsigned long n);
 
 long strncpy_from_user(char *dst, const char *src, long count);
 long __strncpy_from_user(char *dst, const char *src, long count);
diff -Nru a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
--- a/include/asm-i386/unistd.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-i386/unistd.h	Wed Oct 30 16:44:29 2002
@@ -258,6 +258,9 @@
 #define __NR_free_hugepages	251
 #define __NR_exit_group		252
 #define __NR_lookup_dcookie	253
+#define __NR_sys_epoll_create	254
+#define __NR_sys_epoll_ctl	255
+#define __NR_sys_epoll_wait	256
   
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
diff -Nru a/include/asm-i386/voyager.h b/include/asm-i386/voyager.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-i386/voyager.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,522 @@
+/* Copyright (C) 1999,2001
+ *
+ * Author: J.E.J.Bottomley@HansenPartnership.com
+ *
+ * Standard include definitions for the NCR Voyager system */
+
+#undef	VOYAGER_DEBUG
+#undef	VOYAGER_CAT_DEBUG
+
+#ifdef VOYAGER_DEBUG
+#define VDEBUG(x)	printk x
+#else
+#define VDEBUG(x)
+#endif
+
+/* There are three levels of voyager machine: 3,4 and 5. The rule is
+ * if it's less than 3435 it's a Level 3 except for a 3360 which is
+ * a level 4.  A 3435 or above is a Level 5 */
+#define VOYAGER_LEVEL5_AND_ABOVE	0x3435
+#define VOYAGER_LEVEL4			0x3360
+
+/* The L4 DINO ASIC */
+#define VOYAGER_DINO			0x43
+
+/* voyager ports in standard I/O space */
+#define VOYAGER_MC_SETUP	0x96
+
+
+#define	VOYAGER_CAT_CONFIG_PORT			0x97
+#	define VOYAGER_CAT_DESELECT		0xff
+#define VOYAGER_SSPB_RELOCATION_PORT		0x98
+
+/* Valid CAT controller commands */
+/* start instruction register cycle */
+#define VOYAGER_CAT_IRCYC			0x01
+/* start data register cycle */
+#define VOYAGER_CAT_DRCYC			0x02
+/* move to execute state */
+#define VOYAGER_CAT_RUN				0x0F
+/* end operation */
+#define VOYAGER_CAT_END				0x80
+/* hold in idle state */
+#define VOYAGER_CAT_HOLD			0x90
+/* single step an "intest" vector */
+#define VOYAGER_CAT_STEP			0xE0
+/* return cat controller to CLEMSON mode */
+#define VOYAGER_CAT_CLEMSON			0xFF
+
+/* the default cat command header */
+#define VOYAGER_CAT_HEADER			0x7F
+
+/* the range of possible CAT module ids in the system */
+#define VOYAGER_MIN_MODULE			0x10
+#define VOYAGER_MAX_MODULE			0x1f
+
+/* The voyager registers per asic */
+#define VOYAGER_ASIC_ID_REG			0x00
+#define VOYAGER_ASIC_TYPE_REG			0x01
+/* the sub address registers can be made auto incrementing on reads */
+#define VOYAGER_AUTO_INC_REG			0x02
+#	define VOYAGER_AUTO_INC			0x04
+#	define VOYAGER_NO_AUTO_INC		0xfb
+#define VOYAGER_SUBADDRDATA			0x03
+#define VOYAGER_SCANPATH			0x05
+#	define VOYAGER_CONNECT_ASIC		0x01
+#	define VOYAGER_DISCONNECT_ASIC		0xfe
+#define VOYAGER_SUBADDRLO			0x06
+#define VOYAGER_SUBADDRHI			0x07
+#define VOYAGER_SUBMODSELECT			0x08
+#define VOYAGER_SUBMODPRESENT			0x09
+
+#define VOYAGER_SUBADDR_LO			0xff
+#define VOYAGER_SUBADDR_HI			0xffff
+
+/* the maximum size of a scan path -- used to form instructions */
+#define VOYAGER_MAX_SCAN_PATH			0x100
+/* the biggest possible register size (in bytes) */
+#define VOYAGER_MAX_REG_SIZE			4
+
+/* Total number of possible modules (including submodules) */
+#define VOYAGER_MAX_MODULES			16
+/* Largest number of asics per module */
+#define VOYAGER_MAX_ASICS_PER_MODULE		7
+
+/* the CAT asic of each module is always the first one */
+#define VOYAGER_CAT_ID				0
+#define VOYAGER_PSI				0x1a
+
+/* voyager instruction operations and registers */
+#define VOYAGER_READ_CONFIG			0x1
+#define VOYAGER_WRITE_CONFIG			0x2
+#define VOYAGER_BYPASS				0xff
+
+typedef struct voyager_asic 
+{
+	__u8	asic_addr;	/* ASIC address; Level 4 */
+	__u8	asic_type;      /* ASIC type */
+	__u8	asic_id;	/* ASIC id */
+	__u8	jtag_id[4];	/* JTAG id */
+	__u8	asic_location;	/* Location within scan path; start w/ 0 */
+	__u8	bit_location;	/* Location within bit stream; start w/ 0 */
+	__u8	ireg_length;	/* Instruction register length */
+	__u16	subaddr;	/* Amount of sub address space */
+	struct voyager_asic *next;	/* Next asic in linked list */
+} voyager_asic_t;
+
+typedef struct voyager_module {
+	__u8	module_addr;		/* Module address */
+	__u8	scan_path_connected;	/* Scan path connected */
+	__u16   ee_size;		/* Size of the EEPROM */
+	__u16   num_asics;		/* Number of Asics */
+	__u16   inst_bits;		/* Instruction bits in the scan path */
+	__u16   largest_reg;		/* Largest register in the scan path */
+	__u16   smallest_reg;		/* Smallest register in the scan path */
+	voyager_asic_t   *asic;		/* First ASIC in scan path (CAT_I) */
+	struct   voyager_module *submodule;	/* Submodule pointer */ 
+	struct   voyager_module *next;		/* Next module in linked list */
+} voyager_module_t;
+
+typedef struct voyager_eeprom_hdr {
+	 __u8  module_id[4] __attribute__((packed)); 
+	 __u8  version_id __attribute__((packed));
+	 __u8  config_id __attribute__((packed)); 
+	 __u16 boundry_id __attribute__((packed));	/* boundary scan id */
+	 __u16 ee_size __attribute__((packed));		/* size of EEPROM */
+	 __u8  assembly[11] __attribute__((packed));	/* assembly # */
+	 __u8  assembly_rev __attribute__((packed));	/* assembly rev */
+	 __u8  tracer[4] __attribute__((packed));	/* tracer number */
+	 __u16 assembly_cksum __attribute__((packed));	/* asm checksum */
+	 __u16 power_consump __attribute__((packed));	/* pwr requirements */
+	 __u16 num_asics __attribute__((packed));	/* number of asics */
+	 __u16 bist_time __attribute__((packed));	/* min. bist time */
+	 __u16 err_log_offset __attribute__((packed));	/* error log offset */
+	 __u16 scan_path_offset __attribute__((packed));/* scan path offset */
+	 __u16 cct_offset __attribute__((packed));
+	 __u16 log_length __attribute__((packed));	/* length of err log */
+	 __u16 xsum_end __attribute__((packed));	/* offset to end of
+							   checksum */
+	 __u8  reserved[4] __attribute__((packed));
+	 __u8  sflag __attribute__((packed));		/* starting sentinal */
+	 __u8  part_number[13] __attribute__((packed));	/* prom part number */
+	 __u8  version[10] __attribute__((packed));	/* version number */
+	 __u8  signature[8] __attribute__((packed));
+	 __u16 eeprom_chksum __attribute__((packed));
+	 __u32  data_stamp_offset __attribute__((packed));
+	 __u8  eflag  __attribute__((packed));		 /* ending sentinal */
+} voyager_eprom_hdr_t;
+
+
+
+#define VOYAGER_EPROM_SIZE_OFFSET   ((__u16)(&(((voyager_eprom_hdr_t *)0)->ee_size)))
+#define VOYAGER_XSUM_END_OFFSET		0x2a
+
+/* the following three definitions are for internal table layouts
+ * in the module EPROMs.  We really only care about the IDs and
+ * offsets */
+typedef struct voyager_sp_table {
+	__u8 asic_id __attribute__((packed));
+	__u8 bypass_flag __attribute__((packed));
+	__u16 asic_data_offset __attribute__((packed));
+	__u16 config_data_offset __attribute__((packed));
+} voyager_sp_table_t;
+
+typedef struct voyager_jtag_table {
+	__u8 icode[4] __attribute__((packed));
+	__u8 runbist[4] __attribute__((packed));
+	__u8 intest[4] __attribute__((packed));
+	__u8 samp_preld[4] __attribute__((packed));
+	__u8 ireg_len __attribute__((packed));
+} voyager_jtt_t;
+
+typedef struct voyager_asic_data_table {
+	__u8 jtag_id[4] __attribute__((packed));
+	__u16 length_bsr __attribute__((packed));
+	__u16 length_bist_reg __attribute__((packed));
+	__u32 bist_clk __attribute__((packed));
+	__u16 subaddr_bits __attribute__((packed));
+	__u16 seed_bits __attribute__((packed));
+	__u16 sig_bits __attribute__((packed));
+	__u16 jtag_offset __attribute__((packed));
+} voyager_at_t;
+
+/* Voyager Interrupt Controller (VIC) registers */
+
+/* Base to add to Cross Processor Interrupts (CPIs) when triggering
+ * the CPU IRQ line */
+/* register defines for the WCBICs (one per processor) */
+#define VOYAGER_WCBIC0	0x41		/* bus A node P1 processor 0 */
+#define VOYAGER_WCBIC1	0x49		/* bus A node P1 processor 1 */
+#define VOYAGER_WCBIC2	0x51		/* bus A node P2 processor 0 */
+#define VOYAGER_WCBIC3	0x59		/* bus A node P2 processor 1 */
+#define VOYAGER_WCBIC4	0x61		/* bus B node P1 processor 0 */
+#define VOYAGER_WCBIC5	0x69		/* bus B node P1 processor 1 */
+#define VOYAGER_WCBIC6	0x71		/* bus B node P2 processor 0 */
+#define VOYAGER_WCBIC7	0x79		/* bus B node P2 processor 1 */
+
+
+/* top of memory registers */
+#define VOYAGER_WCBIC_TOM_L	0x4
+#define VOYAGER_WCBIC_TOM_H	0x5
+
+/* register defines for Voyager Memory Contol (VMC) 
+ * these are present on L4 machines only */
+#define	VOYAGER_VMC1		0x81
+#define VOYAGER_VMC2		0x91
+#define VOYAGER_VMC3		0xa1
+#define VOYAGER_VMC4		0xb1
+
+/* VMC Ports */
+#define VOYAGER_VMC_MEMORY_SETUP	0x9
+#	define VMC_Interleaving		0x01
+#	define VMC_4Way			0x02
+#	define VMC_EvenCacheLines	0x04
+#	define VMC_HighLine		0x08
+#	define VMC_Start0_Enable	0x20
+#	define VMC_Start1_Enable	0x40
+#	define VMC_Vremap		0x80
+#define VOYAGER_VMC_BANK_DENSITY	0xa
+#	define	VMC_BANK_EMPTY		0
+#	define	VMC_BANK_4MB		1
+#	define	VMC_BANK_16MB		2
+#	define	VMC_BANK_64MB		3
+#	define	VMC_BANK0_MASK		0x03
+#	define	VMC_BANK1_MASK		0x0C
+#	define	VMC_BANK2_MASK		0x30
+#	define	VMC_BANK3_MASK		0xC0
+
+/* Magellan Memory Controller (MMC) defines - present on L5 */
+#define VOYAGER_MMC_ASIC_ID		1
+/* the two memory modules corresponding to memory cards in the system */
+#define VOYAGER_MMC_MEMORY0_MODULE	0x14
+#define VOYAGER_MMC_MEMORY1_MODULE	0x15
+/* the Magellan Memory Address (MMA) defines */
+#define VOYAGER_MMA_ASIC_ID		2
+
+/* Submodule number for the Quad Baseboard */
+#define VOYAGER_QUAD_BASEBOARD		1
+
+/* ASIC defines for the Quad Baseboard */
+#define VOYAGER_QUAD_QDATA0		1
+#define VOYAGER_QUAD_QDATA1		2
+#define VOYAGER_QUAD_QABC		3
+
+/* Useful areas in extended CMOS */
+#define VOYAGER_PROCESSOR_PRESENT_MASK	0x88a
+#define VOYAGER_MEMORY_CLICKMAP		0xa23
+#define VOYAGER_DUMP_LOCATION		0xb1a
+
+/* SUS In Control bit - used to tell SUS that we don't need to be
+ * babysat anymore */
+#define VOYAGER_SUS_IN_CONTROL_PORT	0x3ff
+#	define VOYAGER_IN_CONTROL_FLAG	0x80
+
+/* Voyager PSI defines */
+#define VOYAGER_PSI_STATUS_REG		0x08
+#	define PSI_DC_FAIL		0x01
+#	define PSI_MON			0x02
+#	define PSI_FAULT		0x04
+#	define PSI_ALARM		0x08
+#	define PSI_CURRENT		0x10
+#	define PSI_DVM			0x20
+#	define PSI_PSCFAULT		0x40
+#	define PSI_STAT_CHG		0x80
+
+#define VOYAGER_PSI_SUPPLY_REG		0x8000
+	/* read */
+#	define PSI_FAIL_DC		0x01
+#	define PSI_FAIL_AC		0x02
+#	define PSI_MON_INT		0x04
+#	define PSI_SWITCH_OFF		0x08
+#	define PSI_HX_OFF		0x10
+#	define PSI_SECURITY		0x20
+#	define PSI_CMOS_BATT_LOW	0x40
+#	define PSI_CMOS_BATT_FAIL	0x80
+	/* write */
+#	define PSI_CLR_SWITCH_OFF	0x13
+#	define PSI_CLR_HX_OFF		0x14
+#	define PSI_CLR_CMOS_BATT_FAIL	0x17
+
+#define VOYAGER_PSI_MASK		0x8001
+#	define PSI_MASK_MASK		0x10
+
+#define VOYAGER_PSI_AC_FAIL_REG		0x8004
+#define	AC_FAIL_STAT_CHANGE		0x80
+
+#define VOYAGER_PSI_GENERAL_REG		0x8007
+	/* read */
+#	define PSI_SWITCH_ON		0x01
+#	define PSI_SWITCH_ENABLED	0x02
+#	define PSI_ALARM_ENABLED	0x08
+#	define PSI_SECURE_ENABLED	0x10
+#	define PSI_COLD_RESET		0x20
+#	define PSI_COLD_START		0x80
+	/* write */
+#	define PSI_POWER_DOWN		0x10
+#	define PSI_SWITCH_DISABLE	0x01
+#	define PSI_SWITCH_ENABLE	0x11
+#	define PSI_CLEAR		0x12
+#	define PSI_ALARM_DISABLE	0x03
+#	define PSI_ALARM_ENABLE		0x13
+#	define PSI_CLEAR_COLD_RESET	0x05
+#	define PSI_SET_COLD_RESET	0x15
+#	define PSI_CLEAR_COLD_START	0x07
+#	define PSI_SET_COLD_START	0x17
+
+
+
+struct voyager_bios_info {
+	__u8	len;
+	__u8	major;
+	__u8	minor;
+	__u8	debug;
+	__u8	num_classes;
+	__u8	class_1;
+	__u8	class_2;
+};
+
+/* The following structures and definitions are for the Kernel/SUS
+ * interface these are needed to find out how SUS initialised any Quad
+ * boards in the system */
+
+#define	NUMBER_OF_MC_BUSSES	2
+#define SLOTS_PER_MC_BUS	8
+#define MAX_CPUS                16      /* 16 way CPU system */
+#define MAX_PROCESSOR_BOARDS	4	/* 4 processor slot system */
+#define MAX_CACHE_LEVELS	4	/* # of cache levels supported */
+#define MAX_SHARED_CPUS		4	/* # of CPUs that can share a LARC */
+#define NUMBER_OF_POS_REGS	8
+
+typedef struct {
+	__u8	MC_Slot __attribute__((packed));
+	__u8	POS_Values[NUMBER_OF_POS_REGS] __attribute__((packed));
+} MC_SlotInformation_t;
+
+struct QuadDescription {
+	__u8  Type __attribute__((packed));	/* for type 0 (DYADIC or MONADIC) all fields
+                         * will be zero except for slot */
+	__u8 StructureVersion __attribute__((packed));
+	__u32 CPI_BaseAddress __attribute__((packed));
+	__u32  LARC_BankSize __attribute__((packed));	
+	__u32 LocalMemoryStateBits __attribute__((packed));
+	__u8  Slot __attribute__((packed)); /* Processor slots 1 - 4 */
+}; 
+
+struct ProcBoardInfo { 
+	__u8 Type __attribute__((packed));    
+	__u8 StructureVersion __attribute__((packed));
+	__u8 NumberOfBoards __attribute__((packed));
+	struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS] __attribute__((packed));
+};
+
+struct CacheDescription {
+	__u8 Level __attribute__((packed));
+	__u32 TotalSize __attribute__((packed));
+	__u16 LineSize __attribute__((packed));
+	__u8  Associativity __attribute__((packed));
+	__u8  CacheType __attribute__((packed));
+	__u8  WriteType __attribute__((packed));
+	__u8  Number_CPUs_SharedBy __attribute__((packed));
+	__u8  Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS] __attribute__((packed));
+
+};
+
+struct CPU_Description {
+	__u8 CPU_HardwareId __attribute__((packed));
+	char *FRU_String __attribute__((packed));
+	__u8 NumberOfCacheLevels __attribute__((packed));
+	struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS] __attribute__((packed));
+};
+
+struct CPU_Info {
+	__u8 Type __attribute__((packed));
+	__u8 StructureVersion __attribute__((packed));
+	__u8 NumberOf_CPUs __attribute__((packed));
+	struct CPU_Description CPU_Data[MAX_CPUS] __attribute__((packed));
+};
+
+
+/*
+ * This structure will be used by SUS and the OS.
+ * The assumption about this structure is that no blank space is
+ * packed in it by our friend the compiler.
+ */
+typedef struct {
+	__u8	Mailbox_SUS;		/* Written to by SUS to give commands/response to the OS */
+	__u8	Mailbox_OS;		/* Written to by the OS to give commands/response to SUS */
+	__u8	SUS_MailboxVersion;	/* Tells the OS which iteration of the interface SUS supports */
+	__u8	OS_MailboxVersion;	/* Tells SUS which iteration of the interface the OS supports */
+	__u32	OS_Flags;		/* Flags set by the OS as info for SUS */
+	__u32	SUS_Flags;		/* Flags set by SUS as info for the OS */
+	__u32	WatchDogPeriod;		/* Watchdog period (in seconds) which the DP uses to see if the OS is dead */
+	__u32	WatchDogCount;		/* Updated by the OS on every tic. */
+	__u32	MemoryFor_SUS_ErrorLog;	/* Flat 32 bit address which tells SUS where to stuff the SUS error log on a dump */
+	MC_SlotInformation_t  MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS];	/* Storage for MCA POS data */
+	/* All new SECOND_PASS_INTERFACE fields added from this point */
+        struct ProcBoardInfo    *BoardData;
+        struct CPU_Info         *CPU_Data;
+	/* All new fields must be added from this point */
+} Voyager_KernelSUS_Mbox_t;
+
+/* structure for finding the right memory address to send a QIC CPI to */
+struct voyager_qic_cpi {
+	/* Each cache line (32 bytes) can trigger a cpi.  The cpi
+	 * read/write may occur anywhere in the cache line---pick the
+	 * middle to be safe */
+	struct  {
+		__u32 pad1[3];
+		__u32 cpi;
+		__u32 pad2[4];
+	} qic_cpi[8];
+};
+
+struct voyager_status {
+	__u32	power_fail:1;
+	__u32	switch_off:1;
+	__u32	request_from_kernel:1;
+};
+
+struct voyager_psi_regs {
+	__u8 cat_id;
+	__u8 cat_dev;
+	__u8 cat_control;
+	__u8 subaddr;
+	__u8 dummy4;
+	__u8 checkbit;
+	__u8 subaddr_low;
+	__u8 subaddr_high;
+	__u8 intstatus;
+	__u8 stat1;
+	__u8 stat3;
+	__u8 fault;
+	__u8 tms;
+	__u8 gen;
+	__u8 sysconf;
+	__u8 dummy15;
+};
+
+struct voyager_psi_subregs {
+	__u8 supply;
+	__u8 mask;
+	__u8 present;
+	__u8 DCfail;
+	__u8 ACfail;
+	__u8 fail;
+	__u8 UPSfail;
+	__u8 genstatus;
+};
+
+struct voyager_psi {
+	struct voyager_psi_regs regs;
+	struct voyager_psi_subregs subregs;
+};
+
+struct voyager_SUS {
+#define	VOYAGER_DUMP_BUTTON_NMI		0x1
+#define VOYAGER_SUS_VALID		0x2
+#define VOYAGER_SYSINT_COMPLETE		0x3
+	__u8	SUS_mbox;
+#define VOYAGER_NO_COMMAND		0x0
+#define VOYAGER_IGNORE_DUMP		0x1
+#define VOYAGER_DO_DUMP			0x2
+#define VOYAGER_SYSINT_HANDSHAKE	0x3
+#define VOYAGER_DO_MEM_DUMP		0x4
+#define VOYAGER_SYSINT_WAS_RECOVERED	0x5
+	__u8	kernel_mbox;
+#define	VOYAGER_MAILBOX_VERSION		0x10
+	__u8	SUS_version;
+	__u8	kernel_version;
+#define VOYAGER_OS_HAS_SYSINT		0x1
+#define VOYAGER_OS_IN_PROGRESS		0x2
+#define VOYAGER_UPDATING_WDPERIOD	0x4
+	__u32	kernel_flags;
+#define VOYAGER_SUS_BOOTING		0x1
+#define VOYAGER_SUS_IN_PROGRESS		0x2
+	__u32	SUS_flags;
+	__u32	watchdog_period;
+	__u32	watchdog_count;
+	__u32	SUS_errorlog;
+	/* lots of system configuration stuff under here */
+};
+	
+/* Variables exported by voyager_smp */
+extern __u32 voyager_extended_vic_processors;
+extern __u32 voyager_allowed_boot_processors;
+extern __u32 voyager_quad_processors;
+extern struct voyager_qic_cpi *voyager_quad_cpi_addr[NR_CPUS];
+extern struct voyager_SUS *voyager_SUS;
+
+/* variables exported always */
+extern int voyager_level;
+extern int kvoyagerd_running;
+extern struct semaphore kvoyagerd_sem;
+extern struct voyager_status voyager_status;
+
+
+
+/* functions exported by the voyager and voyager_smp modules */
+
+extern int voyager_cat_readb(__u8 module, __u8 asic, int reg);
+extern void voyager_cat_init(void);
+extern void voyager_detect(struct voyager_bios_info *);
+extern void voyager_trap_init(void);
+extern void voyager_setup_irqs(void);
+extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length);
+extern void voyager_smp_intr_init(void);
+extern __u8 voyager_extended_cmos_read(__u16 cmos_address);
+extern void voyager_dump(void);
+extern void voyager_smp_dump(void);
+extern void voyager_timer_interrupt(struct pt_regs *regs);
+extern void smp_local_timer_interrupt(struct pt_regs * regs);
+extern void voyager_power_off(void);
+extern void smp_voyager_power_off(void *dummy);
+extern void voyager_restart(void);
+extern void voyager_cat_power_off(void);
+extern void voyager_cat_do_common_interrupt(void);
+extern void voyager_handle_nmi(void);
+/* Commands for the following are */
+#define	VOYAGER_PSI_READ	0
+#define VOYAGER_PSI_WRITE	1
+#define VOYAGER_PSI_SUBREAD	2
+#define VOYAGER_PSI_SUBWRITE	3
+extern void voyager_cat_psi(__u8, __u16, __u8 *);
diff -Nru a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
--- a/include/asm-ia64/acpi.h	Wed Oct 30 16:44:32 2002
+++ b/include/asm-ia64/acpi.h	Wed Oct 30 16:44:32 2002
@@ -97,17 +97,18 @@
 	} while (0)
 
 const char *acpi_get_sysname (void);
-int acpi_boot_init (char *cdline);
 int acpi_request_vector (u32 int_type);
 int acpi_get_prt (struct pci_vector_struct **vectors, int *count);
 int acpi_get_interrupt_model (int *type);
 int acpi_irq_to_vector (u32 irq);
 
-#ifdef CONFIG_DISCONTIGMEM
-#define NODE_ARRAY_INDEX(x)	((x) / 8)	/* 8 bits/char */
-#define NODE_ARRAY_OFFSET(x)	((x) % 8)	/* 8 bits/char */
-#define MAX_PXM_DOMAINS		(256)
-#endif /* CONFIG_DISCONTIGMEM */
+#ifdef CONFIG_ACPI_NUMA
+#include <asm/numa.h>
+/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
+#define MAX_PXM_DOMAINS (256)
+extern int __initdata pxm_to_nid_map[MAX_PXM_DOMAINS];
+extern int __initdata nid_to_pxm_map[NR_NODES];
+#endif
 
 #endif /*__KERNEL__*/
 
diff -Nru a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h
--- a/include/asm-ia64/ia32.h	Wed Oct 30 16:44:35 2002
+++ b/include/asm-ia64/ia32.h	Wed Oct 30 16:44:35 2002
@@ -73,6 +73,17 @@
        unsigned short exponent;
 };
 
+struct _fpxreg_ia32 {
+        unsigned short significand[4];
+        unsigned short exponent;
+        unsigned short padding[3];
+};
+
+struct _xmmreg_ia32 {
+        unsigned int element[4];
+};
+
+
 struct _fpstate_ia32 {
        unsigned int    cw,
 		       sw,
@@ -82,7 +93,16 @@
 		       dataoff,
 		       datasel;
        struct _fpreg_ia32      _st[8];
-       unsigned int    status;
+       unsigned short  status;
+       unsigned short  magic;          /* 0xffff = regular FPU data only */
+
+       /* FXSR FPU environment */
+       unsigned int         _fxsr_env[6];   /* FXSR FPU env is ignored */
+       unsigned int         mxcsr;
+       unsigned int         reserved;
+       struct _fpxreg_ia32  _fxsr_st[8];    /* FXSR FPU reg data is ignored */
+       struct _xmmreg_ia32  _xmm[8];
+       unsigned int         padding[56];
 };
 
 struct sigcontext_ia32 {
@@ -485,6 +505,18 @@
 extern int ia32_intercept (struct pt_regs *regs, unsigned long isr);
 extern unsigned long ia32_do_mmap (struct file *, unsigned long, unsigned long, int, int, loff_t);
 extern void ia32_load_segment_descriptors (struct task_struct *task);
+
+#define ia32f2ia64f(dst,src) \
+	do { \
+	register double f6 asm ("f6"); \
+	asm volatile ("ldfe f6=[%2];; stf.spill [%1]=f6" : "=f"(f6): "r"(dst), "r"(src) : "memory"); \
+	} while(0)
+
+#define ia64f2ia32f(dst,src) \
+	do { \
+	register double f6 asm ("f6"); \
+	asm volatile ("ldf.fill f6=[%2];; stfe [%1]=f6" : "=f"(f6): "r"(dst),  "r"(src) : "memory"); \
+	} while(0)
 
 #endif /* !CONFIG_IA32_SUPPORT */
 
diff -Nru a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h
--- a/include/asm-ia64/iosapic.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-ia64/iosapic.h	Wed Oct 30 16:44:29 2002
@@ -55,6 +55,8 @@
 				    unsigned int gsi_base,
 				    int pcat_compat);
 extern int gsi_to_vector (unsigned int gsi);
+extern int gsi_to_irq (unsigned int gsi);
+extern void iosapic_parse_prt (void);
 extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
 				  unsigned long edge_triggered,
 				  u32 gsi_base, char *iosapic_address);
diff -Nru a/include/asm-ia64/kmap_types.h b/include/asm-ia64/kmap_types.h
--- a/include/asm-ia64/kmap_types.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-ia64/kmap_types.h	Wed Oct 30 16:44:28 2002
@@ -21,7 +21,9 @@
 D(8)	KM_PTE1,
 D(9)	KM_IRQ0,
 D(10)	KM_IRQ1,
-D(11)	KM_TYPE_NR
+D(11)	KM_CRYPTO_USER,
+D(12)	KM_CRYPTO_SOFTIRQ,
+D(13)	KM_TYPE_NR
 };
 
 #undef D
diff -Nru a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ia64/mmzone.h	Wed Oct 30 16:44:40 2002
@@ -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) 2000 Silicon Graphics, Inc.  All rights reserved.
+ * Copyright (c) 2002 NEC Corp.
+ * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
+ * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
+ */
+#ifndef _ASM_IA64_MMZONE_H
+#define _ASM_IA64_MMZONE_H
+
+#include <linux/config.h>
+#include <linux/init.h>
+
+/*
+ * Given a kaddr, find the base mem_map address for the start of the mem_map
+ * entries for the bank containing the kaddr.
+ */
+#define BANK_MEM_MAP_BASE(kaddr) local_node_data->bank_mem_map_base[BANK_MEM_MAP_INDEX(kaddr)]
+
+/*
+ * Given a kaddr, this macro return the relative map number 
+ * within the bank.
+ */
+#define BANK_MAP_NR(kaddr) 	(BANK_OFFSET(kaddr) >> PAGE_SHIFT)
+
+/*
+ * Given a pte, this macro returns a pointer to the page struct for the pte.
+ */
+#define pte_page(pte)	virt_to_page(PAGE_OFFSET | (pte_val(pte)&_PFN_MASK))
+
+/*
+ * Determine if a kaddr is a valid memory address of memory that
+ * actually exists. 
+ *
+ * The check consists of 2 parts:
+ *	- verify that the address is a region 7 address & does not 
+ *	  contain any bits that preclude it from being a valid platform
+ *	  memory address
+ *	- verify that the chunk actually exists.
+ *
+ * Note that IO addresses are NOT considered valid addresses.
+ *
+ * Note, many platforms can simply check if kaddr exceeds a specific size.  
+ *	(However, this wont work on SGI platforms since IO space is embedded 
+ * 	within the range of valid memory addresses & nodes have holes in the 
+ *	address range between banks). 
+ */
+#define kern_addr_valid(kaddr)		({long _kav=(long)(kaddr);	\
+					VALID_MEM_KADDR(_kav);})
+
+/*
+ * Given a kaddr, return a pointer to the page struct for the page.
+ * If the kaddr does not represent RAM memory that potentially exists, return
+ * a pointer the page struct for max_mapnr. IO addresses will
+ * return the page for max_nr. Addresses in unpopulated RAM banks may
+ * return undefined results OR may panic the system.
+ *
+ */
+#define virt_to_page(kaddr)	({long _kvtp=(long)(kaddr);	\
+				(VALID_MEM_KADDR(_kvtp))	\
+					? BANK_MEM_MAP_BASE(_kvtp) + BANK_MAP_NR(_kvtp)	\
+					: NULL;})
+
+/*
+ * Given a page struct entry, return the physical address that the page struct represents.
+ * Since IA64 has all memory in the DMA zone, the following works:
+ */
+#define page_to_phys(page)	__pa(page_address(page))
+
+#define node_mem_map(nid)	(NODE_DATA(nid)->node_mem_map)
+
+#define node_localnr(pfn, nid)	((pfn) - NODE_DATA(nid)->node_start_pfn)
+
+#define pfn_to_page(pfn)	(struct page *)(node_mem_map(pfn_to_nid(pfn)) + node_localnr(pfn, pfn_to_nid(pfn)))
+
+#define pfn_to_nid(pfn)		 local_node_data->node_id_map[(pfn << PAGE_SHIFT) >> DIG_BANKSHIFT]
+
+#define page_to_pfn(page)	(long)((page - page_zone(page)->zone_mem_map) + page_zone(page)->zone_start_pfn)
+
+
+/*
+ * pfn_valid should be made as fast as possible, and the current definition
+ * is valid for machines that are NUMA, but still contiguous, which is what
+ * is currently supported. A more generalised, but slower definition would
+ * be something like this - mbligh:
+ * ( pfn_to_pgdat(pfn) && (pfn < node_end_pfn(pfn_to_nid(pfn))) )
+ */
+#define pfn_valid(pfn)          (pfn < max_low_pfn)
+extern unsigned long max_low_pfn;
+
+
+#ifdef CONFIG_IA64_DIG
+
+/*
+ * Platform definitions for DIG platform with contiguous memory.
+ */
+#define MAX_PHYSNODE_ID	8	/* Maximum node number +1 */
+#define NR_NODES	8	/* Maximum number of nodes in SSI */
+
+#define MAX_PHYS_MEMORY	(1UL << 40)	/* 1 TB */
+
+/*
+ * Bank definitions.
+ * Current settings for DIG: 512MB/bank, 16GB/node.
+ */
+#define NR_BANKS_PER_NODE	32
+#define BANK_OFFSET(addr)	((unsigned long)(addr) & (BANKSIZE-1))
+#define DIG_BANKSHIFT		29
+#define BANKSIZE		(1UL << DIG_BANKSHIFT)
+#define NR_BANKS		(NR_BANKS_PER_NODE * NR_NODES)
+
+/*
+ * VALID_MEM_KADDR returns a boolean to indicate if a kaddr is
+ * potentially a valid cacheable identity mapped RAM memory address.
+ * Note that the RAM may or may not actually be present!!
+ */
+#define VALID_MEM_KADDR(kaddr)	1
+
+/*
+ * Given a nodeid & a bank number, find the address of the mem_map
+ * entry for the first page of the bank.
+ */
+#define BANK_MEM_MAP_INDEX(kaddr) \
+	(((unsigned long)(kaddr) & (MAX_PHYS_MEMORY-1)) >> DIG_BANKSHIFT)
+
+#endif /* CONFIG_IA64_DIG */
+#endif /* _ASM_IA64_MMZONE_H */
diff -Nru a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ia64/nodedata.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,75 @@
+/*
+ * 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.  All rights reserved.
+ * Copyright (c) 2002 NEC Corp.
+ * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
+ * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
+ */
+
+
+#ifndef _ASM_IA64_NODEDATA_H
+#define _ASM_IA64_NODEDATA_H
+
+
+#include <asm/mmzone.h>
+
+/*
+ * Node Data. One of these structures is located on each node of a NUMA system.
+ */
+
+struct pglist_data;
+struct ia64_node_data {
+	short			node;
+        struct pglist_data	*pg_data_ptrs[NR_NODES];
+	struct page		*bank_mem_map_base[NR_BANKS];
+	struct ia64_node_data	*node_data_ptrs[NR_NODES];
+	short			node_id_map[NR_BANKS];
+};
+
+
+/*
+ * Return a pointer to the node_data structure for the executing cpu.
+ */
+#define local_node_data		(local_cpu_data->node_data)
+
+
+/*
+ * Return a pointer to the node_data structure for the specified node.
+ */
+#define node_data(node)	(local_node_data->node_data_ptrs[node])
+
+/*
+ * Get a pointer to the node_id/node_data for the current cpu.
+ *    (boot time only)
+ */
+extern int boot_get_local_nodeid(void);
+extern struct ia64_node_data *get_node_data_ptr(void);
+
+/*
+ * Given a node id, return a pointer to the pg_data_t for the node.
+ * The following 2 macros are similar. 
+ *
+ * NODE_DATA 	- should be used in all code not related to system
+ *		  initialization. It uses pernode data structures to minimize
+ *		  offnode memory references. However, these structure are not 
+ *		  present during boot. This macro can be used once cpu_init
+ *		  completes.
+ *
+ * BOOT_NODE_DATA
+ *		- should be used during system initialization 
+ *		  prior to freeing __initdata. It does not depend on the percpu
+ *		  area being present.
+ *
+ * NOTE:   The names of these macros are misleading but are difficult to change
+ *	   since they are used in generic linux & on other architecures.
+ */
+#define NODE_DATA(nid)		(local_node_data->pg_data_ptrs[nid])
+#define BOOT_NODE_DATA(nid)	boot_get_pg_data_ptr((long)(nid))
+
+struct pglist_data;
+extern struct pglist_data * __init boot_get_pg_data_ptr(long);
+
+#endif /* _ASM_IA64_NODEDATA_H */
diff -Nru a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ia64/numa.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,65 @@
+/*
+ * 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 file contains NUMA specific prototypes and definitions.
+ * 
+ * 2002/08/05 Erich Focht <efocht@ess.nec.de>
+ *
+ */
+#ifndef _ASM_IA64_NUMA_H
+#define _ASM_IA64_NUMA_H
+
+#ifdef CONFIG_NUMA
+
+#ifdef CONFIG_DISCONTIGMEM
+# include <asm/mmzone.h>
+# define NR_MEMBLKS   (NR_BANKS)
+#else
+# define NR_NODES     (8)
+# define NR_MEMBLKS   (NR_NODES * 8)
+#endif
+
+extern char cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+
+/* Stuff below this line could be architecture independent */
+
+extern int num_memblks;		/* total number of memory chunks */
+
+/*
+ * List of node memory chunks. Filled when parsing SRAT table to
+ * obtain information about memory nodes.
+*/
+
+struct node_memblk_s {
+	unsigned long start_paddr;
+	unsigned long size;
+	int nid;		/* which logical node contains this chunk? */
+	int bank;		/* which mem bank on this node */
+};
+
+struct node_cpuid_s {
+	u16	phys_id;	/* id << 8 | eid */
+	int	nid;		/* logical node containing this CPU */
+};
+
+extern struct node_memblk_s node_memblk[NR_MEMBLKS];
+extern struct node_cpuid_s node_cpuid[NR_CPUS];
+
+/*
+ * ACPI 2.0 SLIT (System Locality Information Table)
+ * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
+ *
+ * This is a matrix with "distances" between nodes, they should be
+ * proportional to the memory access latency ratios.
+ */
+
+extern u8 numa_slit[NR_NODES * NR_NODES];
+#define node_distance(from,to) (numa_slit[from * numnodes + to])
+
+extern int paddr_to_nid(unsigned long paddr);
+
+#endif /* CONFIG_NUMA */
+
+#endif /* _ASM_IA64_NUMA_H */
diff -Nru a/include/asm-ia64/numnodes.h b/include/asm-ia64/numnodes.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-ia64/numnodes.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,7 @@
+#ifndef _ASM_MAX_NUMNODES_H
+#define _ASM_MAX_NUMNODES_H
+
+#include <asm/mmzone.h>
+#define MAX_NUMNODES	NR_NODES
+
+#endif /* _ASM_MAX_NUMNODES_H */
diff -Nru a/include/asm-ia64/page.h b/include/asm-ia64/page.h
--- a/include/asm-ia64/page.h	Wed Oct 30 16:44:22 2002
+++ b/include/asm-ia64/page.h	Wed Oct 30 16:44:22 2002
@@ -82,12 +82,15 @@
 	flush_dcache_page(page);		\
 } while (0)
 
-#define pfn_valid(pfn)		((pfn) < max_mapnr)
 #define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+
+#ifndef CONFIG_DISCONTIGMEM
+#define pfn_valid(pfn)		((pfn) < max_mapnr)
 #define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 #define page_to_pfn(page)	((unsigned long) (page - mem_map))
 #define pfn_to_page(pfn)	(mem_map + (pfn))
 #define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)
+#endif
 
 typedef union ia64_va {
 	struct {
diff -Nru a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h
--- a/include/asm-ia64/percpu.h	Wed Oct 30 16:44:25 2002
+++ b/include/asm-ia64/percpu.h	Wed Oct 30 16:44:25 2002
@@ -29,8 +29,11 @@
 #ifdef CONFIG_SMP
 # define per_cpu(var, cpu)	(*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
 #else
-# define per_cpu(var, cpu)	__get_cpu_var(var)
+# define per_cpu(var, cpu)	((void)cpu, __get_cpu_var(var))
 #endif
+
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var##__per_cpu)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var##__per_cpu)
 
 #endif /* !__ASSEMBLY__ */
 
diff -Nru a/include/asm-ia64/perfmon.h b/include/asm-ia64/perfmon.h
--- a/include/asm-ia64/perfmon.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-ia64/perfmon.h	Wed Oct 30 16:44:29 2002
@@ -123,7 +123,7 @@
  * Define the version numbers for both perfmon as a whole and the sampling buffer format.
  */
 #define PFM_VERSION_MAJ		1U
-#define PFM_VERSION_MIN		0U
+#define PFM_VERSION_MIN		1U
 #define PFM_VERSION		(((PFM_VERSION_MAJ&0xffff)<<16)|(PFM_VERSION_MIN & 0xffff))
 
 #define PFM_SMPL_VERSION_MAJ	1U
diff -Nru a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
--- a/include/asm-ia64/processor.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-ia64/processor.h	Wed Oct 30 16:44:27 2002
@@ -89,6 +89,9 @@
 #include <asm/rse.h>
 #include <asm/unwind.h>
 #include <asm/atomic.h>
+#ifdef CONFIG_NUMA
+#include <asm/nodedata.h>
+#endif
 
 /* like above but expressed as bitfields for more efficient access: */
 struct ia64_psr {
@@ -174,6 +177,10 @@
 	__u64 prof_counter;
 	__u64 prof_multiplier;
 #endif
+#ifdef CONFIG_NUMA
+	struct ia64_node_data *node_data;
+	int nodeid;
+#endif
 };
 
 DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
@@ -184,6 +191,10 @@
  */
 #define local_cpu_data		(&__get_cpu_var(cpu_info))
 #define cpu_data(cpu)		(&per_cpu(cpu_info, cpu))
+
+#ifdef CONFIG_NUMA
+#define numa_node_id()		(local_cpu_data->nodeid)
+#endif
 
 extern void identify_cpu (struct cpuinfo_ia64 *);
 extern void print_cpu_info (struct cpuinfo_ia64 *);
diff -Nru a/include/asm-ia64/siginfo.h b/include/asm-ia64/siginfo.h
--- a/include/asm-ia64/siginfo.h	Wed Oct 30 16:44:33 2002
+++ b/include/asm-ia64/siginfo.h	Wed Oct 30 16:44:33 2002
@@ -148,8 +148,8 @@
 	if (from->si_code < 0)
 		memcpy(to, from, sizeof(siginfo_t));
 	else
-		/* _sigchld is currently the largest know union member */
-		memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld));
+		/* _sigprof is currently the largest know union member */
+		memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigprof));
 }
 
 extern int copy_siginfo_from_user(siginfo_t *to, siginfo_t *from);
diff -Nru a/include/asm-ia64/sn/bte_copy.h b/include/asm-ia64/sn/bte_copy.h
--- a/include/asm-ia64/sn/bte_copy.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-ia64/sn/bte_copy.h	Wed Oct 30 16:44:29 2002
@@ -250,7 +250,7 @@
 			 * status register into the notification area.
 			 * This fakes the shub performing the copy.
 			 */
-			if (jiffies > bte->idealTransferTimeout) {
+			if (time_after(jiffies, bte->idealTransferTimeout)) {
 				bte->notify = HUB_L(bte->bte_base_addr);
 				bte->idealTransferTimeoutReached++;
 				bte->idealTransferTimeout = jiffies +
diff -Nru a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
--- a/include/asm-ia64/thread_info.h	Wed Oct 30 16:44:36 2002
+++ b/include/asm-ia64/thread_info.h	Wed Oct 30 16:44:36 2002
@@ -37,11 +37,11 @@
 
 #define INIT_THREAD_INFO(ti)			\
 {						\
-	exec_domain:	&default_exec_domain,	\
-	flags:		0,			\
-	cpu:		0,			\
-	addr_limit:	KERNEL_DS,		\
-	preempt_count:	0,			\
+	.exec_domain	= &default_exec_domain,	\
+	.flags		= 0,			\
+	.cpu		= 0,			\
+	.addr_limit	= KERNEL_DS,		\
+	.preempt_count	= 0,			\
 }
 
 /* how to get the thread information struct from C */
diff -Nru a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h
--- a/include/asm-ia64/tlb.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-ia64/tlb.h	Wed Oct 30 16:44:27 2002
@@ -53,9 +53,10 @@
 
 typedef struct {
 	struct mm_struct	*mm;
-	unsigned int		nr;	/* == ~0U => fast mode */
-	unsigned int		fullmm;	/* non-zero means full mm flush */
-	unsigned long		freed;	/* number of pages freed */
+	unsigned int		nr;		/* == ~0U => fast mode */
+	unsigned char		fullmm;		/* non-zero means full mm flush */
+	unsigned char		need_flush;	/* really unmapped some PTEs? */
+	unsigned long		freed;		/* number of pages freed */
 	unsigned long		start_addr;
 	unsigned long		end_addr;
 	struct page 		*pages[FREE_PTE_NR];
@@ -73,6 +74,10 @@
 {
 	unsigned int nr;
 
+	if (!tlb->need_flush)
+		return;
+	tlb->need_flush = 0;
+
 	if (tlb->fullmm) {
 		/*
 		 * Tearing down the entire address space.  This happens both as a result
@@ -168,18 +173,6 @@
 }
 
 /*
- * Remove TLB entry for PTE mapped at virtual address ADDRESS.  This is called for any
- * PTE, not just those pointing to (normal) physical memory.
- */
-static inline void
-__tlb_remove_tlb_entry (mmu_gather_t *tlb, pte_t *ptep, unsigned long address)
-{
-	if (tlb->start_addr == ~0UL)
-		tlb->start_addr = address;
-	tlb->end_addr = address + PAGE_SIZE;
-}
-
-/*
  * Logically, this routine frees PAGE.  On MP machines, the actual freeing of the page
  * must be delayed until after the TLB has been flushed (see comments at the beginning of
  * this file).
@@ -187,6 +180,8 @@
 static inline void
 tlb_remove_page (mmu_gather_t *tlb, struct page *page)
 {
+	tlb->need_flush = 1;
+
 	if (tlb_fast_mode(tlb)) {
 		free_page_and_swap_cache(page);
 		return;
@@ -196,11 +191,37 @@
 		ia64_tlb_flush_mmu(tlb, tlb->start_addr, tlb->end_addr);
 }
 
+/*
+ * Remove TLB entry for PTE mapped at virtual address ADDRESS.  This is called for any
+ * PTE, not just those pointing to (normal) physical memory.
+ */
+static inline void
+__tlb_remove_tlb_entry (mmu_gather_t *tlb, pte_t *ptep, unsigned long address)
+{
+	if (tlb->start_addr == ~0UL)
+		tlb->start_addr = address;
+	tlb->end_addr = address + PAGE_SIZE;
+}
+
 #define tlb_start_vma(tlb, vma)			do { } while (0)
 #define tlb_end_vma(tlb, vma)			do { } while (0)
 
-#define tlb_remove_tlb_entry(tlb, ptep, addr)	__tlb_remove_tlb_entry(tlb, ptep, addr)
-#define pte_free_tlb(tlb, ptep)			__pte_free_tlb(tlb, ptep)
-#define pmd_free_tlb(tlb, ptep)			__pmd_free_tlb(tlb, ptep)
+#define tlb_remove_tlb_entry(tlb, ptep, addr)		\
+do {							\
+	tlb->need_flush = 1;				\
+	__tlb_remove_tlb_entry(tlb, ptep, addr);	\
+} while (0)
+
+#define pte_free_tlb(tlb, ptep)				\
+do {							\
+	tlb->need_flush = 1;				\
+	__pte_free_tlb(tlb, ptep);			\
+} while (0)
+
+#define pmd_free_tlb(tlb, ptep)				\
+do {							\
+	tlb->need_flush = 1;				\
+	__pmd_free_tlb(tlb, ptep);			\
+} while (0)
 
 #endif /* _ASM_IA64_TLB_H */
diff -Nru a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h
--- a/include/asm-ia64/topology.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-ia64/topology.h	Wed Oct 30 16:44:17 2002
@@ -1,6 +1,79 @@
+/*
+ * linux/include/asm-ia64/topology.h
+ *
+ * Copyright (C) 2002, Erich Focht, NEC
+ *
+ * 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.
+ */
 #ifndef _ASM_IA64_TOPOLOGY_H
 #define _ASM_IA64_TOPOLOGY_H
 
-#include <asm-generic/topology.h>
+#include <asm/acpi.h>
+#include <asm/numa.h>
+
+/* Returns the number of the node containing CPU 'cpu' */
+#ifdef CONFIG_NUMA
+#define __cpu_to_node(cpu) cpu_to_node_map[cpu]
+#else
+#define __cpu_to_node(cpu) (0)
+#endif
+
+/*
+ * Returns the number of the node containing MemBlk 'memblk'
+ */
+#ifdef CONFIG_ACPI_NUMA
+#define __memblk_to_node(memblk) (node_memblk[memblk].nid)
+#else
+#define __memblk_to_node(memblk) (memblk)
+#endif
+
+/*
+ * Returns the number of the node containing Node 'nid'.
+ * Not implemented here. Multi-level hierarchies detected with
+ * the help of node_distance().
+ */
+#define __parent_node(nid) (nid)
+
+/*
+ * Returns the number of the first CPU on Node 'node'.
+ * Slow in the current implementation.
+ * Who needs this?
+ */
+/* #define __node_to_first_cpu(node) pool_cpus[pool_ptr[node]] */
+static inline int __node_to_first_cpu(int node)
+{
+	int i;
+
+	for (i=0; i<NR_CPUS; i++)
+		if (__cpu_to_node(i)==node)
+			return i;
+	BUG(); /* couldn't find a cpu on given node */
+	return -1;
+}
+
+/*
+ * Returns a bitmask of CPUs on Node 'node'.
+ */
+static inline unsigned long __node_to_cpu_mask(int node)
+{
+	int cpu;
+	unsigned long mask = 0UL;
+
+	for(cpu=0; cpu<NR_CPUS; cpu++)
+		if (__cpu_to_node(cpu) == node)
+			mask |= 1UL << cpu;
+	return mask;
+}
+
+/*
+ * Returns the number of the first MemBlk on Node 'node'
+ * Should be fixed when IA64 discontigmem goes in.
+ */
+#define __node_to_memblk(node) (node)
 
 #endif /* _ASM_IA64_TOPOLOGY_H */
diff -Nru a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h
--- a/include/asm-parisc/assembly.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-parisc/assembly.h	Wed Oct 30 16:44:29 2002
@@ -27,7 +27,7 @@
 	.level 2.0w
 #endif
 
-#include <asm/offset.h>
+#include <asm/offsets.h>
 #include <asm/page.h>
 
 #include <asm/asmregs.h>
@@ -36,17 +36,34 @@
 	gp	=	27
 	ipsw	=	22
 
-#if __PAGE_OFFSET == 0xc0000000
-	.macro	tophys	gr
-	zdep	\gr, 31, 30, \gr
+	/*
+	 * We provide two versions of each macro to convert from physical
+	 * to virtual and vice versa. The "_r1" versions take one argument
+	 * register, but trashes r1 to do the conversion. The other
+	 * version takes two arguments: a src and destination register.
+	 * However, the source and destination registers can not be
+	 * the same register.
+	 */
+
+	.macro  tophys  grvirt, grphys
+	ldil    L%(__PAGE_OFFSET), \grphys
+	sub     \grvirt, \grphys, \grphys
 	.endm
 	
-	.macro	tovirt	gr
-	depi	3,1,2,\gr
+	.macro  tovirt  grphys, grvirt
+	ldil    L%(__PAGE_OFFSET), \grvirt
+	add     \grphys, \grvirt, \grvirt
+	.endm
+
+	.macro  tophys_r1  gr
+	ldil    L%(__PAGE_OFFSET), %r1
+	sub     \gr, %r1, \gr
+	.endm
+	
+	.macro  tovirt_r1  gr
+	ldil    L%(__PAGE_OFFSET), %r1
+	add     \gr, %r1, \gr
 	.endm
-#else
-#error	unknown __PAGE_OFFSET
-#endif
 
 	.macro delay value
 	ldil	L%\value, 1
@@ -59,11 +76,21 @@
 	.macro	debug value
 	.endm
 
-#ifdef __LP64__
-# define LDIL_FIXUP(reg) depdi 0,31,32,reg
-#else
-# define LDIL_FIXUP(reg)
-#endif
+
+	/* Shift Left - note the r and t can NOT be the same! */
+	.macro shl r, sa, t
+	dep,z	\r, 31-\sa, 32-\sa, \t
+	.endm
+
+	/* The PA 2.0 shift left */
+	.macro shlw r, sa, t
+	depw,z	\r, 31-\sa, 32-\sa, \t
+	.endm
+
+	/* And the PA 2.0W shift left */
+	.macro shld r, sa, t
+	depd,z	\r, 63-\sa, 64-\sa, \t
+	.endm
 
 	/* load 32-bit 'value' into 'reg' compensating for the ldil
 	 * sign-extension when running in wide mode.
@@ -72,7 +99,6 @@
 	.macro	load32 value, reg
 	ldil	L%\value, \reg
 	ldo	R%\value(\reg), \reg
-	LDIL_FIXUP(\reg)
 	.endm
 
 #ifdef __LP64__
@@ -89,7 +115,6 @@
 #ifdef __LP64__
 	ldil		L%__gp, %r27
 	ldo		R%__gp(%r27), %r27
-	LDIL_FIXUP(%r27)
 #else
 	ldil		L%$global$, %r27
 	ldo		R%$global$(%r27), %r27
@@ -102,6 +127,7 @@
 #define REST_CR(r, where) LDREG where, %r1 ! mtctl %r1, r
 
 	.macro	save_general	regs
+	STREG %r1, PT_GR1 (\regs)
 	STREG %r2, PT_GR2 (\regs)
 	STREG %r3, PT_GR3 (\regs)
 	STREG %r4, PT_GR4 (\regs)
@@ -126,15 +152,16 @@
 	STREG %r23, PT_GR23(\regs)
 	STREG %r24, PT_GR24(\regs)
 	STREG %r25, PT_GR25(\regs)
-	/* r26 is clobbered by cr19 and assumed to be saved before hand */
+	/* r26 is saved in get_stack and used to preserve a value across virt_map */
 	STREG %r27, PT_GR27(\regs)
 	STREG %r28, PT_GR28(\regs)
-	/* r29 is already saved and points to PT_xxx struct */
+	/* r29 is saved in get_stack and used to point to saved registers */
 	/* r30 stack pointer saved in get_stack */
 	STREG %r31, PT_GR31(\regs)
 	.endm
 
 	.macro	rest_general	regs
+	/* r1 used as a temp in rest_stack and is restored there */
 	LDREG PT_GR2 (\regs), %r2
 	LDREG PT_GR3 (\regs), %r3
 	LDREG PT_GR4 (\regs), %r4
@@ -162,6 +189,7 @@
 	LDREG PT_GR26(\regs), %r26
 	LDREG PT_GR27(\regs), %r27
 	LDREG PT_GR28(\regs), %r28
+	/* r29 points to register save area, and is restored in rest_stack */
 	/* r30 stack pointer restored in rest_stack */
 	LDREG PT_GR31(\regs), %r31
 	.endm
@@ -238,8 +266,8 @@
 
 #ifdef __LP64__
 	.macro	callee_save
-	ldo	144(%r30), %r30
-	std	  %r3,	-144(%r30)
+	std,ma	  %r3,	144(%r30)
+	mfctl	  %cr27, %r3
 	std	  %r4,	-136(%r30)
 	std	  %r5,	-128(%r30)
 	std	  %r6,	-120(%r30)
@@ -255,9 +283,11 @@
 	std	 %r16,	 -40(%r30)
 	std	 %r17,	 -32(%r30)
 	std	 %r18,	 -24(%r30)
+	std	  %r3,	 -16(%r30)
 	.endm
 
 	.macro	callee_rest
+	ldd	 -16(%r30),    %r3
 	ldd	 -24(%r30),   %r18
 	ldd	 -32(%r30),   %r17
 	ldd	 -40(%r30),   %r16
@@ -273,52 +303,54 @@
 	ldd	-120(%r30),    %r6
 	ldd	-128(%r30),    %r5
 	ldd	-136(%r30),    %r4
-	ldd	-144(%r30),    %r3
-	ldo	-144(%r30),   %r30
+	mtctl	%r3, %cr27
+	ldd,mb	-144(%r30),    %r3
 	.endm
 
-#else /* __LP64__ */
+#else /* ! __LP64__ */
 
 	.macro	callee_save
-	ldo	128(30), 30
-	stw	 3,	-128(30)
-	stw	 4,	-124(30)
-	stw	 5,	-120(30)
-	stw	 6,	-116(30)
-	stw	 7,	-112(30)
-	stw	 8,	-108(30)
-	stw	 9,	-104(30)
-	stw	 10,	-100(30)
-	stw	 11,	 -96(30)
-	stw	 12,	 -92(30)
-	stw	 13,	 -88(30)
-	stw	 14,	 -84(30)
-	stw	 15,	 -80(30)
-	stw	 16,	 -76(30)
-	stw	 17,	 -72(30)
-	stw	 18,	 -68(30)
+	stw,ma	 %r3,	128(%r30)
+	mfctl	 %cr27, %r3
+	stw	 %r4,	-124(%r30)
+	stw	 %r5,	-120(%r30)
+	stw	 %r6,	-116(%r30)
+	stw	 %r7,	-112(%r30)
+	stw	 %r8,	-108(%r30)
+	stw	 %r9,	-104(%r30)
+	stw	 %r10,	-100(%r30)
+	stw	 %r11,	 -96(%r30)
+	stw	 %r12,	 -92(%r30)
+	stw	 %r13,	 -88(%r30)
+	stw	 %r14,	 -84(%r30)
+	stw	 %r15,	 -80(%r30)
+	stw	 %r16,	 -76(%r30)
+	stw	 %r17,	 -72(%r30)
+	stw	 %r18,	 -68(%r30)
+	stw	  %r3,	 -64(%r30)
 	.endm
 
 	.macro	callee_rest
-	ldw	 -68(30),   18
-	ldw	 -72(30),   17
-	ldw	 -76(30),   16
-	ldw	 -80(30),   15
-	ldw	 -84(30),   14
-	ldw	 -88(30),   13
-	ldw	 -92(30),   12
-	ldw	 -96(30),   11
-	ldw	-100(30),   10
-	ldw	-104(30),    9
-	ldw	-108(30),    8
-	ldw	-112(30),    7
-	ldw	-116(30),    6
-	ldw	-120(30),    5
-	ldw	-124(30),    4
-	ldw	-128(30),    3
-	ldo	-128(30),   30
+	ldw	 -64(%r30),    %r3
+	ldw	 -68(%r30),   %r18
+	ldw	 -72(%r30),   %r17
+	ldw	 -76(%r30),   %r16
+	ldw	 -80(%r30),   %r15
+	ldw	 -84(%r30),   %r14
+	ldw	 -88(%r30),   %r13
+	ldw	 -92(%r30),   %r12
+	ldw	 -96(%r30),   %r11
+	ldw	-100(%r30),   %r10
+	ldw	-104(%r30),   %r9
+	ldw	-108(%r30),   %r8
+	ldw	-112(%r30),   %r7
+	ldw	-116(%r30),   %r6
+	ldw	-120(%r30),   %r5
+	ldw	-124(%r30),   %r4
+	mtctl	%r3, %cr27
+	ldw,mb	-128(%r30),   %r3
 	.endm
-#endif /* __LP64__ */
+#endif /* ! __LP64__ */
 
 	.macro	save_specials	regs
 
@@ -339,14 +371,25 @@
 	mtctl	 %r0,	%cr18
 	SAVE_CR  (%cr18, PT_IAOQ1(\regs))
 
+#ifdef __LP64__
+	/* cr11 (sar) is a funny one.  5 bits on PA1.1 and 6 bit on PA2.0
+	 * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only
+	 * reads 5 bits.  Use mfctl,w to read all six bits.  Otherwise
+	 * we loose the 6th bit on a save/restore over interrupt.
+	 */
+	mfctl,w  %cr11, %r1
+	STREG    %r1, PT_SAR (\regs)
+#else
 	SAVE_CR  (%cr11, PT_SAR  (\regs))
-	SAVE_CR  (%cr22, PT_PSW  (\regs))
+#endif
 	SAVE_CR  (%cr19, PT_IIR  (\regs))
-	SAVE_CR  (%cr28, PT_GR1  (\regs))
-	SAVE_CR  (%cr31, PT_GR29 (\regs))
 
-	STREG	%r26,	PT_GR26 (\regs)
-	mfctl	%cr29,	%r26
+	/*
+	 * Code immediately following this macro (in intr_save) relies
+	 * on r8 containing ipsw.
+	 */
+	mfctl    %cr22, %r8
+	STREG    %r8,   PT_PSW(\regs)
 	.endm
 
 	.macro	rest_specials	regs
diff -Nru a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h
--- a/include/asm-parisc/atomic.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-parisc/atomic.h	Wed Oct 30 16:44:27 2002
@@ -15,10 +15,12 @@
  */
 
 #ifdef CONFIG_SMP
-/* we have an array of spinlocks for our atomic_ts, and a hash function
- * to get the right index */
-#  define ATOMIC_HASH_SIZE 1
-#  define ATOMIC_HASH(a) (&__atomic_hash[0])
+/* Use an array of spinlocks for our atomic_ts.
+** Hash function to index into a different SPINLOCK.
+** Since "a" is usually an address, ">>8" makes one spinlock per 64-bytes.
+*/
+#  define ATOMIC_HASH_SIZE 4
+#  define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long) a)>>8)&(ATOMIC_HASH_SIZE-1)])
 
 extern spinlock_t __atomic_hash[ATOMIC_HASH_SIZE];
 /* copied from <asm/spinlock.h> and modified */
@@ -44,12 +46,101 @@
 /* Note that we need not lock read accesses - aligned word writes/reads
  * are atomic, so a reader never sees unconsistent values.
  *
- * Cache-line alignment would conflict with, for example, linux/module.h */
+ * Cache-line alignment would conflict with, for example, linux/module.h
+ */
 
 typedef struct {
 	volatile int counter;
 } atomic_t;
 
+
+/*
+** xchg/cmpxchg moved from asm/system.h - ggg
+*/
+
+#if 1
+/* This should get optimized out since it's never called.
+** Or get a link error if xchg is used "wrong".
+*/
+extern void __xchg_called_with_bad_pointer(void);
+#else
+static inline void __xchg_called_with_bad_pointer(void)
+{
+	extern void panic(const char * fmt, ...);
+	panic("xchg called with bad pointer");
+}
+#endif
+
+/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
+extern unsigned long __xchg8(char, char *);
+extern unsigned long __xchg32(int, int *);
+#ifdef __LP64__
+extern unsigned long __xchg64(unsigned long, unsigned long *);
+#endif
+
+/* optimizer better get rid of switch since size is a constant */
+static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr,
+                                       int size)
+{
+
+	switch(size) {
+#ifdef __LP64__
+	case 8: return __xchg64(x,(unsigned long *) ptr);
+#endif
+	case 4: return __xchg32((int) x, (int *) ptr);
+	case 1: return __xchg8((char) x, (char *) ptr);
+	}
+	__xchg_called_with_bad_pointer();
+	return x;
+}
+
+
+/*
+** REVISIT - Abandoned use of LDCW in xchg() for now:
+** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
+** o and while we are at it, could __LP64__ code use LDCD too?
+**
+**	if (__builtin_constant_p(x) && (x == NULL))
+**		if (((unsigned long)p & 0xf) == 0)
+**			return __ldcw(p);
+*/
+#define xchg(ptr,x) \
+	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+
+#define __HAVE_ARCH_CMPXCHG	1
+
+/* bug catcher for when unsupported size is used - won't link */
+extern void __cmpxchg_called_with_bad_pointer(void);
+
+/* __cmpxchg_u32/u64 defined in arch/parisc/lib/bitops.c */
+extern unsigned long __cmpxchg_u32(volatile unsigned int *m, unsigned int old, unsigned int new_);
+extern unsigned long __cmpxchg_u64(volatile unsigned long *ptr, unsigned long old, unsigned long new_);
+
+/* don't worry...optimizer will get rid of most of this */
+static __inline__ unsigned long
+__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
+{
+	switch(size) {
+#ifdef __LP64__
+	case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_);
+#endif
+	case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_);
+	}
+	__cmpxchg_called_with_bad_pointer();
+	return old;
+}
+
+#define cmpxchg(ptr,o,n)						 \
+  ({									 \
+     __typeof__(*(ptr)) _o_ = (o);					 \
+     __typeof__(*(ptr)) _n_ = (n);					 \
+     (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,		 \
+				    (unsigned long)_n_, sizeof(*(ptr))); \
+  })
+
+
+
 /* It's possible to reduce all atomic operations to either
  * __atomic_add_return, __atomic_set and __atomic_ret (the latter
  * is there only for consistency). */
@@ -75,7 +166,7 @@
 
 	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(v), flags);
 }
-	
+
 static __inline__ int __atomic_read(atomic_t *v)
 {
 	return v->counter;
@@ -99,5 +190,10 @@
 #define atomic_read(v)		(__atomic_read(v))
 
 #define ATOMIC_INIT(i)	{ (i) }
+
+#define smp_mb__before_atomic_dec()	smp_mb()
+#define smp_mb__after_atomic_dec()	smp_mb()
+#define smp_mb__before_atomic_inc()	smp_mb()
+#define smp_mb__after_atomic_inc()	smp_mb()
 
 #endif
diff -Nru a/include/asm-parisc/bitops.h b/include/asm-parisc/bitops.h
--- a/include/asm-parisc/bitops.h	Wed Oct 30 16:44:19 2002
+++ b/include/asm-parisc/bitops.h	Wed Oct 30 16:44:19 2002
@@ -1,11 +1,17 @@
 #ifndef _PARISC_BITOPS_H
 #define _PARISC_BITOPS_H
 
-#include <linux/spinlock.h>
+#include <linux/compiler.h>
 #include <asm/system.h>
 #include <asm/byteorder.h>
 #include <asm/atomic.h>
 
+/*
+ * HP-PARISC specific bit operations
+ * for a detailed description of the functions please refer
+ * to include/asm-i386/bitops.h or kerneldoc
+ */
+
 #ifdef __LP64__
 #   define SHIFT_PER_LONG 6
 #ifndef BITS_PER_LONG
@@ -20,6 +26,79 @@
 
 #define CHOP_SHIFTCOUNT(x) ((x) & (BITS_PER_LONG - 1))
 
+
+#define smp_mb__before_clear_bit()      smp_mb()
+#define smp_mb__after_clear_bit()       smp_mb()
+
+static __inline__ void set_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+	unsigned long flags;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
+	*addr |= mask;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
+}
+
+static __inline__ void __set_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	*addr |= mask;
+}
+
+static __inline__ void clear_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+	unsigned long flags;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
+	*addr &= ~mask;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
+}
+
+static __inline__ void __clear_bit(unsigned long nr, volatile void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	*addr &= ~mask;
+}
+
+static __inline__ void change_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+	unsigned long flags;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
+	*addr ^= mask;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
+}
+
+static __inline__ void __change_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	*addr ^= mask;
+}
+
 static __inline__ int test_and_set_bit(int nr, void * address)
 {
 	unsigned long mask;
@@ -28,14 +107,26 @@
 	unsigned long flags;
 
 	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
 	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
+	oldbit = (*addr & mask) ? 1 : 0;
+	*addr |= mask;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
 
+	return oldbit;
+}
+
+static __inline__ int __test_and_set_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+	int oldbit;
+
+	addr += (nr >> SHIFT_PER_LONG);
 	mask = 1L << CHOP_SHIFTCOUNT(nr);
 	oldbit = (*addr & mask) ? 1 : 0;
 	*addr |= mask;
 
-	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
-
 	return oldbit;
 }
 
@@ -47,14 +138,26 @@
 	unsigned long flags;
 
 	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
 	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
+	oldbit = (*addr & mask) ? 1 : 0;
+	*addr &= ~mask;
+	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
+
+	return oldbit;
+}
+
+static __inline__ int __test_and_clear_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+	int oldbit;
 
+	addr += (nr >> SHIFT_PER_LONG);
 	mask = 1L << CHOP_SHIFTCOUNT(nr);
 	oldbit = (*addr & mask) ? 1 : 0;
 	*addr &= ~mask;
 
-	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
-
 	return oldbit;
 }
 
@@ -66,20 +169,30 @@
 	unsigned long flags;
 
 	addr += (nr >> SHIFT_PER_LONG);
-	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
-
 	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	SPIN_LOCK_IRQSAVE(ATOMIC_HASH(addr), flags);
 	oldbit = (*addr & mask) ? 1 : 0;
 	*addr ^= mask;
-
 	SPIN_UNLOCK_IRQRESTORE(ATOMIC_HASH(addr), flags);
 
 	return oldbit;
 }
 
-/* again, the read-only case doesn't have to do any locking */
+static __inline__ int __test_and_change_bit(int nr, void * address)
+{
+	unsigned long mask;
+	unsigned long *addr = (unsigned long *) address;
+	int oldbit;
+
+	addr += (nr >> SHIFT_PER_LONG);
+	mask = 1L << CHOP_SHIFTCOUNT(nr);
+	oldbit = (*addr & mask) ? 1 : 0;
+	*addr ^= mask;
 
-static __inline__ int test_bit(int nr, const volatile void *address)
+	return oldbit;
+}
+
+static __inline__ int test_bit(int nr, const void *address)
 {
 	unsigned long mask;
 	unsigned long *addr = (unsigned long *) address;
@@ -90,21 +203,12 @@
 	return !!(*addr & mask);
 }
 
-/* sparc does this, other arch's don't -- what's the right answer? XXX */
-#define smp_mb__before_clear_bit()	do { } while(0)
-#define smp_mb__after_clear_bit()	do { } while(0)
-#define set_bit(nr,addr)	((void)test_and_set_bit(nr,addr))
-#define clear_bit(nr,addr)	((void)test_and_clear_bit(nr,addr))
-#define change_bit(nr,addr)	((void)test_and_change_bit(nr,addr))
-
-/* XXX We'd need some binary search here */
-
 extern __inline__ unsigned long ffz(unsigned long word)
 {
 	unsigned long result;
 
 	result = 0;
-	while(word & 1) {
+	while (word & 1) {
 		result++;
 		word >>= 1;
 	}
@@ -114,13 +218,40 @@
 
 #ifdef __KERNEL__
 
+/**
+ * __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)
+{
+	unsigned long result = 0;
+
+	while (!(word & 1UL)) {
+		result++;
+		word >>= 1;
+	}
+	return result;
+}
+
 /*
  * 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).
  */
+static __inline__ int ffs(int x)
+{
+	if (!x)
+		return 0;
+	return __ffs((unsigned long)x);
+}
+
+/*
+ * fls: find last bit set.
+ */
 
-#define ffs(x) generic_ffs(x)
+#define fls(x) generic_fls(x)
 
 /*
  * hweightN: returns the hamming weight (i.e. the number
@@ -131,6 +262,35 @@
 #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)
+{
+#ifndef __LP64__
+	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;
+#else
+	if (unlikely(b[0]))
+		return __ffs(b[0]);
+	if (unlikely(((unsigned int)b[1])))
+		return __ffs(b[1]) + 64;
+	if (b[1] >> 32)
+		return __ffs(b[1] >> 32) + 96;
+	return __ffs(b[2]) + 128;
+#endif
+}
+
 #endif /* __KERNEL__ */
 
 /*
@@ -175,6 +335,44 @@
 	return result + ffz(tmp);
 }
 
+static __inline__ unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset)
+{
+	unsigned long *p = addr + (offset >> 6);
+	unsigned long result = offset & ~(BITS_PER_LONG-1);
+	unsigned long tmp;
+
+	if (offset >= size)
+		return size;
+	size -= result;
+	offset &= (BITS_PER_LONG-1);
+	if (offset) {
+		tmp = *(p++);
+		tmp &= (~0UL << offset);
+		if (size < BITS_PER_LONG)
+			goto found_first;
+		if (tmp)
+			goto found_middle;
+		size -= BITS_PER_LONG;
+		result += BITS_PER_LONG;
+	}
+	while (size & ~(BITS_PER_LONG-1)) {
+		if ((tmp = *(p++)))
+			goto found_middle;
+		result += BITS_PER_LONG;
+		size -= BITS_PER_LONG;
+	}
+	if (!size)
+		return result;
+	tmp = *p;
+
+found_first:
+	tmp &= (~0UL >> (BITS_PER_LONG - size));
+	if (tmp == 0UL)        /* Are any bits set? */
+		return result + size; /* Nope. */
+found_middle:
+	return result + __ffs(tmp);
+}
+
 #define _EXT2_HAVE_ASM_BITOPS_
 
 #ifdef __KERNEL__
@@ -182,8 +380,13 @@
  * test_and_{set,clear}_bit guarantee atomicity without
  * disabling interrupts.
  */
+#ifdef __LP64__
+#define ext2_set_bit(nr, addr)		test_and_set_bit((nr) ^ 0x38, addr)
+#define ext2_clear_bit(nr, addr)	test_and_clear_bit((nr) ^ 0x38, addr)
+#else
 #define ext2_set_bit(nr, addr)		test_and_set_bit((nr) ^ 0x18, addr)
 #define ext2_clear_bit(nr, addr)	test_and_clear_bit((nr) ^ 0x18, addr)
+#endif
 
 #endif	/* __KERNEL__ */
 
@@ -239,8 +442,9 @@
 }
 
 /* Bitmap functions for the minix filesystem.  */
-#define minix_set_bit(nr,addr) ext2_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) ext2_clear_bit(nr,addr)
+#define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr)
+#define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr))
+#define minix_test_and_clear_bit(nr,addr) ext2_clear_bit(nr,addr)
 #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
 #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
 
diff -Nru a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h
--- a/include/asm-parisc/cache.h	Wed Oct 30 16:44:23 2002
+++ b/include/asm-parisc/cache.h	Wed Oct 30 16:44:23 2002
@@ -5,27 +5,18 @@
 #ifndef __ARCH_PARISC_CACHE_H
 #define __ARCH_PARISC_CACHE_H
 
+#include <linux/config.h>
+
+#ifndef __ASSEMBLY__
 /*
-** XXX FIXME : L1_CACHE_BYTES (cacheline size) should be a boot time thing.
-** 
-** 32-bit on PA2.0 is not covered well by the #ifdef __LP64__ below.
-** PA2.0 processors have 64-byte cachelines.
-**
-** The issue is mostly cacheline ping-ponging on SMP boxes.
-** To avoid this, code should define stuff to be per CPU on cacheline
-** aligned boundaries. This can make a 2x or more difference in perf
-** depending on how badly the thrashing is.
-**
-** We don't need to worry about I/O since all PA2.0 boxes (except T600)
-** are I/O coherent. That means flushing less than you needed to generally
-** doesn't matter - the I/O MMU will read/modify/write the cacheline.
-**
-** (Digression: it is possible to program I/O MMU's to not first read
-** a cacheline for inbound data - ie just grab ownership and start writing.
-** While it improves I/O throughput, you gotta know the device driver
-** is well behaved and can deal with the issues.)
-*/
-#if defined(__LP64__)
+ * PA 2.0 processors have 64-byte cachelines; PA 1.1 processors have
+ * 32-byte cachelines.  The default configuration is not for SMP anyway,
+ * so if you're building for SMP, you should select the appropriate
+ * processor type.  There is a potential livelock danger when running
+ * a machine with this value set too small, but it's more probable you'll
+ * just ruin performance.
+ */
+#ifdef CONFIG_PA20
 #define L1_CACHE_BYTES 64
 #else
 #define L1_CACHE_BYTES 32
@@ -38,22 +29,47 @@
 
 #define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
 
-extern void init_cache(void);		/* initializes cache-flushing */
-extern void flush_data_cache(void);	/* flushes data-cache only */
-extern void flush_instruction_cache(void);/* flushes code-cache only */
-extern void flush_all_caches(void);	/* flushes code and data-cache */
+extern void flush_data_cache_local(void);  /* flushes local data-cache only */
+extern void flush_instruction_cache_local(void); /* flushes local code-cache only */
+#ifdef CONFIG_SMP
+extern void flush_data_cache(void); /* flushes data-cache only (all processors) */
+#else
+#define flush_data_cache flush_data_cache_local
+#define flush_instruction_cache flush_instruction_cache_local
+#endif
 
+extern void parisc_cache_init(void);	/* initializes cache-flushing */
+extern void flush_all_caches(void);     /* flush everything (tlb & cache) */
 extern int get_cache_info(char *);
-
+extern void flush_user_icache_range_asm(unsigned long, unsigned long);
+extern void flush_kernel_icache_range_asm(unsigned long, unsigned long);
+extern void flush_user_dcache_range_asm(unsigned long, unsigned long);
+extern void flush_kernel_dcache_range_asm(unsigned long, unsigned long);
+extern void flush_kernel_dcache_page(void *);
+extern void flush_kernel_icache_page(void *);
+extern void disable_sr_hashing(void);   /* turns off space register hashing */
+extern void disable_sr_hashing_asm(int); /* low level support for above */
+extern void free_sid(unsigned long);
+unsigned long alloc_sid(void);
+
+struct seq_file;
+extern void show_cache_info(struct seq_file *m);
+
+extern int split_tlb;
+extern int dcache_stride;
+extern int icache_stride;
 extern struct pdc_cache_info cache_info;
 
-#define fdce(addr) asm volatile("fdce 0(%0)" : : "r" (addr))
-#define fice(addr) asm volatile("fice 0(%%sr1,%0)" : : "r" (addr))
-
-#define pdtlbe(addr) asm volatile("pdtlbe 0(%%sr1,%0)" : : "r" (addr))
+#define pdtlb(addr)         asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr));
+#define pitlb(addr)         asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr));
 #define pdtlb_kernel(addr)  asm volatile("pdtlb 0(%0)" : : "r" (addr));
-#define pitlbe(addr) asm volatile("pitlbe 0(%%sr1,%0)" : : "r" (addr))
 
-#define kernel_fdc(addr) asm volatile("fdc 0(%%sr0, %0)" : : "r" (addr))
+#endif /* ! __ASSEMBLY__ */
+
+/* Classes of processor wrt: disabling space register hashing */
+
+#define SRHASH_PCXST    0   /* pcxs, pcxt, pcxt_ */
+#define SRHASH_PCXL     1   /* pcxl */
+#define SRHASH_PA20     2   /* pcxu, pcxu_, pcxw, pcxw_ */
 
 #endif
diff -Nru a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/cacheflush.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,130 @@
+#ifndef _PARISC_CACHEFLUSH_H
+#define _PARISC_CACHEFLUSH_H
+
+#include <linux/config.h>
+#include <linux/mm.h>
+
+/* The usual comment is "Caches aren't brain-dead on the <architecture>".
+ * Unfortunately, that doesn't apply to PA-RISC. */
+
+/* Cache flush operations */
+
+#ifdef CONFIG_SMP
+#define flush_cache_mm(mm) flush_cache_all()
+#else
+#define flush_cache_mm(mm) flush_cache_all_local()
+#endif
+
+#define flush_kernel_dcache_range(start,size) \
+	flush_kernel_dcache_range_asm((start), (start)+(size));
+
+static inline void
+flush_page_to_ram(struct page *page)
+{
+}
+
+extern void flush_cache_all_local(void);
+
+#ifdef CONFIG_SMP
+static inline void flush_cache_all(void)
+{
+	smp_call_function((void (*)(void *))flush_cache_all_local, NULL, 1, 1);
+	flush_cache_all_local();
+}
+#else
+#define flush_cache_all flush_cache_all_local
+#endif
+
+
+/* The following value needs to be tuned and probably scaled with the
+ * cache size.
+ */
+
+#define FLUSH_THRESHOLD 0x80000
+
+static inline void
+flush_user_dcache_range(unsigned long start, unsigned long end)
+{
+#ifdef CONFIG_SMP
+	flush_user_dcache_range_asm(start,end);
+#else
+	if ((end - start) < FLUSH_THRESHOLD)
+		flush_user_dcache_range_asm(start,end);
+	else
+		flush_data_cache();
+#endif
+}
+
+static inline void
+flush_user_icache_range(unsigned long start, unsigned long end)
+{
+#ifdef CONFIG_SMP
+	flush_user_icache_range_asm(start,end);
+#else
+	if ((end - start) < FLUSH_THRESHOLD)
+		flush_user_icache_range_asm(start,end);
+	else
+		flush_instruction_cache();
+#endif
+}
+
+static inline void flush_dcache_page(struct page *page)
+{
+	if (page->mapping && list_empty(&page->mapping->i_mmap) &&
+			list_empty(&page->mapping->i_mmap_shared)) {
+		set_bit(PG_dcache_dirty, &page->flags);
+	} else {
+		flush_kernel_dcache_page(page_address(page));
+	}
+}
+
+#define flush_icache_page(vma,page)	do { flush_kernel_dcache_page(page_address(page)); flush_kernel_icache_page(page_address(page)); } while (0)
+
+#define flush_icache_range(s,e)		do { flush_kernel_dcache_range_asm(s,e); flush_kernel_icache_range_asm(s,e); } while (0)
+
+#define flush_icache_user_range(vma, page, addr, len) \
+	flush_icache_page((vma), (page))
+
+static inline void flush_cache_range(struct vm_area_struct *vma,
+		unsigned long start, unsigned long end)
+{
+	int sr3;
+
+	if (!vma->vm_mm->context) {
+		BUG();
+		return;
+	}
+
+	sr3 = mfsp(3);
+	if (vma->vm_mm->context == sr3) {
+		flush_user_dcache_range(start,end);
+		flush_user_icache_range(start,end);
+	} else {
+		flush_cache_all();
+	}
+}
+
+static inline void
+flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr)
+{
+	int sr3;
+
+	if (!vma->vm_mm->context) {
+		BUG();
+		return;
+	}
+
+	sr3 = mfsp(3);
+	if (vma->vm_mm->context == sr3) {
+		flush_user_dcache_range(vmaddr,vmaddr + PAGE_SIZE);
+		if (vma->vm_flags & VM_EXEC)
+			flush_user_icache_range(vmaddr,vmaddr + PAGE_SIZE);
+	} else {
+		if (vma->vm_flags & VM_EXEC)
+			flush_cache_all();
+		else
+			flush_data_cache();
+	}
+}
+#endif
+
diff -Nru a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h
--- a/include/asm-parisc/checksum.h	Wed Oct 30 16:44:23 2002
+++ b/include/asm-parisc/checksum.h	Wed Oct 30 16:44:23 2002
@@ -16,10 +16,9 @@
 extern unsigned int csum_partial(const unsigned char *, int, unsigned int);
 
 /*
- * the same as csum_partial, but copies from src while it
- * checksums
+ * The same as csum_partial, but copies from src while it checksums.
  *
- * here even more important to align src and dst on a 32-bit (or even
+ * Here even more important to align src and dst on a 32-bit (or even
  * better 64-bit) boundary
  */
 extern unsigned int csum_partial_copy_nocheck(const char *, char *, int, unsigned int);
@@ -28,7 +27,7 @@
  * this is a new version of the above that records errors it finds in *errp,
  * but continues and zeros the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp);
+extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp);
 
 /*
  *	Optimized for IP headers, which always checksum on 4 octet boundaries.
@@ -40,32 +39,31 @@
 	unsigned int sum;
 
 
-	__asm__ __volatile__ ("
-	ldws,ma		4(%1), %0
-	addi		-4, %2, %2
-	comib,>=	0, %2, 2f
-	
-	ldws,ma		4(%1), %%r19
-	add		%0, %%r19, %0
-	ldws,ma		4(%1), %%r19
-	addc		%0, %%r19, %0
-	ldws,ma		4(%1), %%r19
-	addc		%0, %%r19, %0
-1:	ldws,ma		4(%1), %%r19
-	addib,<>	-1, %2, 1b
-	addc		%0, %%r19, %0
-	addc		%0, %%r0, %0
-
-	zdepi		-1, 31, 16, %%r19
-	and		%0, %%r19, %%r20
-	extru		%0, 15, 16, %%r21
-	add		%%r20, %%r21, %0
-	and		%0, %%r19, %%r20
-	extru		%0, 15, 16, %%r21
-	add		%%r20, %%r21, %0
-	subi		-1, %0, %0
-2:
-	"
+	__asm__ __volatile__ (
+"	ldws,ma		4(%1), %0\n"
+"	addi		-4, %2, %2\n"
+"	comib,>=	0, %2, 2f\n"
+"\n"
+"	ldws,ma		4(%1), %%r19\n"
+"	add		%0, %%r19, %0\n"
+"	ldws,ma		4(%1), %%r19\n"
+"	addc		%0, %%r19, %0\n"
+"	ldws,ma		4(%1), %%r19\n"
+"	addc		%0, %%r19, %0\n"
+"1:	ldws,ma		4(%1), %%r19\n"
+"	addib,<>	-1, %2, 1b\n"
+"	addc		%0, %%r19, %0\n"
+"	addc		%0, %%r0, %0\n"
+"\n"
+"	zdepi		-1, 31, 16, %%r19\n"
+"	and		%0, %%r19, %%r20\n"
+"	extru		%0, 15, 16, %%r21\n"
+"	add		%%r20, %%r21, %0\n"
+"	and		%0, %%r19, %%r20\n"
+"	extru		%0, 15, 16, %%r21\n"
+"	add		%%r20, %%r21, %0\n"
+"	subi		-1, %0, %0\n"
+"2:\n"
 	: "=r" (sum), "=r" (iph), "=r" (ihl)
 	: "1" (iph), "2" (ihl)
 	: "r19", "r20", "r21" );
@@ -78,9 +76,12 @@
  */
 static inline unsigned int csum_fold(unsigned int sum)
 {
-	sum = (sum & 0xffff) + (sum >> 16);
-	sum = (sum & 0xffff) + (sum >> 16);
-	return ~sum;
+	/* add the swapped two 16-bit halves of sum,
+	   a possible carry from adding the two 16-bit halves,
+	   will carry from the lower half into the upper half,
+	   giving us the correct sum in the upper half. */
+	sum += (sum << 16) + (sum >> 16);
+	return (~sum) >> 16;
 }
  
 static inline unsigned long csum_tcpudp_nofold(unsigned long saddr,
@@ -89,11 +90,11 @@
 					       unsigned short proto,
 					       unsigned int sum) 
 {
-	__asm__("
-		add  %1, %0, %0
-		addc %2, %0, %0
-		addc %3, %0, %0
-		addc %%r0, %0, %0 "
+	__asm__(
+	"	add  %1, %0, %0\n"
+	"	addc %2, %0, %0\n"
+	"	addc %3, %0, %0\n"
+	"	addc %%r0, %0, %0\n"
 		: "=r" (sum)
 		: "r" (daddr), "r"(saddr), "r"((proto<<16)+len), "0"(sum));
     return sum;
@@ -120,6 +121,7 @@
 	 return csum_fold (csum_partial(buf, len, 0));
 }
 
+
 #define _HAVE_ARCH_IPV6_CSUM
 static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
 						     struct in6_addr *daddr,
@@ -127,7 +129,62 @@
 						     unsigned short proto,
 						     unsigned int sum) 
 {
-	BUG();
+	__asm__ __volatile__ (
+
+#if BITS_PER_LONG > 32
+
+	/*
+	** We can execute two loads and two adds per cycle on PA 8000.
+	** But add insn's get serialized waiting for the carry bit.
+	** Try to keep 4 registers with "live" values ahead of the ALU.
+	*/
+
+"	ldd,ma		8(%1), %%r19\n"	/* get 1st saddr word */
+"	ldd,ma		8(%2), %%r20\n"	/* get 1st daddr word */
+"	add		%8, %3, %3\n"/* add 16-bit proto + len */
+"	add		%%r19, %0, %0\n"
+"	ldd,ma		8(%1), %%r21\n"	/* 2cd saddr */
+"	ldd,ma		8(%2), %%r22\n"	/* 2cd daddr */
+"	add,dc		%%r20, %0, %0\n"
+"	add,dc		%%r21, %0, %0\n"
+"	add,dc		%%r22, %0, %0\n"
+"	add,dc		%3, %0, %0\n"  /* fold in proto+len | carry bit */
+"	extrd,u		%0, 31, 32, %%r19\n"	/* copy upper half down */
+"	depdi		0, 31, 32, %0\n"	/* clear upper half */
+"	add		%%r19, %0, %0\n"	/* fold into 32-bits */
+"	addc		0, %0, %0\n"		/* add carry */
+
+#else
+
+	/*
+	** For PA 1.x, the insn order doesn't matter as much.
+	** Insn stream is serialized on the carry bit here too.
+	** result from the previous operation (eg r0 + x)
+	*/
+
+"	ldw,ma		4(%1), %%r19\n"	/* get 1st saddr word */
+"	ldw,ma		4(%2), %%r20\n"	/* get 1st daddr word */
+"	add		%8, %3, %3\n"	/* add 16-bit proto + len */
+"	add		%%r19, %0, %0\n"
+"	ldw,ma		4(%1), %%r21\n"	/* 2cd saddr */
+"	addc		%%r20, %0, %0\n"
+"	ldw,ma		4(%2), %%r22\n"	/* 2cd daddr */
+"	addc		%%r21, %0, %0\n"
+"	ldw,ma		4(%1), %%r19\n"	/* 3rd saddr */
+"	addc		%%r22, %0, %0\n"
+"	ldw,ma		4(%2), %%r20\n"	/* 3rd daddr */
+"	addc		%%r19, %0, %0\n"
+"	ldw,ma		4(%1), %%r21\n"	/* 4th saddr */
+"	addc		%%r20, %0, %0\n"
+"	ldw,ma		4(%2), %%r22\n"	/* 4th daddr */
+"	addc		%%r21, %0, %0\n"
+"	addc		%%r22, %0, %0\n"
+"	addc		%3, %0, %0\n"	/* fold in proto+len, catch carry */
+
+#endif
+	: "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len)
+	: "0" (sum), "1" (saddr), "2" (daddr), "3" (len), "r" (proto)
+	: "r19", "r20", "r21", "r22");
 	return csum_fold(sum);
 }
 
diff -Nru a/include/asm-parisc/current.h b/include/asm-parisc/current.h
--- a/include/asm-parisc/current.h	Wed Oct 30 16:44:36 2002
+++ b/include/asm-parisc/current.h	Wed Oct 30 16:44:36 2002
@@ -1,17 +1,13 @@
 #ifndef _PARISC_CURRENT_H
 #define _PARISC_CURRENT_H
 
-#include <asm/processor.h>
+#include <asm/thread_info.h>
 
 struct task_struct;
 
 static inline struct task_struct * get_current(void)
 {
-	struct task_struct *current;
-
-	asm("copy 30,%0" : "=r" (current));
-	
-	return (struct task_struct *)((long) current & ~(THREAD_SIZE-1));
+	return current_thread_info()->task;
 }
  
 #define current get_current()
diff -Nru a/include/asm-parisc/delay.h b/include/asm-parisc/delay.h
--- a/include/asm-parisc/delay.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-parisc/delay.h	Wed Oct 30 16:44:28 2002
@@ -11,13 +11,11 @@
  * Delay routines
  */
 
-extern unsigned long loops_per_sec;
-
 static __inline__ void __delay(unsigned long loops) {
 	asm volatile(
-	"	.balignl	64,0x34000034
-		addib,UV -1,%0,.
-		nop"
+	"	.balignl	64,0x34000034\n"
+	"	addib,UV -1,%0,.\n"
+	"	nop\n"
 		: "=r" (loops) : "0" (loops));
 }
 
diff -Nru a/include/asm-parisc/dma.h b/include/asm-parisc/dma.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/dma.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,192 @@
+/* $Id: dma.h,v 1.1 2002/07/20 15:52:25 rhirst Exp $
+ * linux/include/asm/dma.h: Defines for using and allocating dma channels.
+ * Written by Hennus Bergman, 1992.
+ * High DMA channel support & info by Hannu Savolainen
+ * and John Boyd, Nov. 1992.
+ * (c) Copyright 2000, Grant Grundler
+ */
+
+#ifndef _ASM_DMA_H
+#define _ASM_DMA_H
+
+#include <linux/config.h>
+#include <asm/io.h>		/* need byte IO */
+#include <asm/system.h>	
+
+#define dma_outb	outb
+#define dma_inb		inb
+
+/*
+** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
+** (or rather not merge) DMA's into managable chunks.
+** On parisc, this is more of the software/tuning constraint
+** rather than the HW. I/O MMU allocation alogorithms can be
+** faster with smaller size is (to some degree).
+*/
+#define DMA_CHUNK_SIZE	(BITS_PER_LONG*PAGE_SIZE)
+
+/* The maximum address that we can perform a DMA transfer to on this platform
+** New dynamic DMA interfaces should obsolete this....
+*/
+#define MAX_DMA_ADDRESS (~0UL)
+
+
+/*
+** We don't have DMA channels... well V-class does but the
+** Dynamic DMA Mapping interface will support them... right? :^)
+** Note: this is not relevant right now for PA-RISC, but we cannot 
+** leave this as undefined because some things (e.g. sound)
+** won't compile :-(
+*/
+#define MAX_DMA_CHANNELS 8
+#define DMA_MODE_READ    1
+#define DMA_MODE_WRITE   2
+#define DMA_AUTOINIT     0x10
+
+/* 8237 DMA controllers */
+#define IO_DMA1_BASE	0x00	/* 8 bit slave DMA, channels 0..3 */
+#define IO_DMA2_BASE	0xC0	/* 16 bit master DMA, ch 4(=slave input)..7 */
+
+/* DMA controller registers */
+#define DMA1_CMD_REG		0x08	/* command register (w) */
+#define DMA1_STAT_REG		0x08	/* status register (r) */
+#define DMA1_REQ_REG            0x09    /* request register (w) */
+#define DMA1_MASK_REG		0x0A	/* single-channel mask (w) */
+#define DMA1_MODE_REG		0x0B	/* mode register (w) */
+#define DMA1_CLEAR_FF_REG	0x0C	/* clear pointer flip-flop (w) */
+#define DMA1_TEMP_REG           0x0D    /* Temporary Register (r) */
+#define DMA1_RESET_REG		0x0D	/* Master Clear (w) */
+#define DMA1_CLR_MASK_REG       0x0E    /* Clear Mask */
+#define DMA1_MASK_ALL_REG       0x0F    /* all-channels mask (w) */
+#define DMA1_EXT_MODE_REG	(0x400 | DMA1_MODE_REG)
+
+#define DMA2_CMD_REG		0xD0	/* command register (w) */
+#define DMA2_STAT_REG		0xD0	/* status register (r) */
+#define DMA2_REQ_REG            0xD2    /* request register (w) */
+#define DMA2_MASK_REG		0xD4	/* single-channel mask (w) */
+#define DMA2_MODE_REG		0xD6	/* mode register (w) */
+#define DMA2_CLEAR_FF_REG	0xD8	/* clear pointer flip-flop (w) */
+#define DMA2_TEMP_REG           0xDA    /* Temporary Register (r) */
+#define DMA2_RESET_REG		0xDA	/* Master Clear (w) */
+#define DMA2_CLR_MASK_REG       0xDC    /* Clear Mask */
+#define DMA2_MASK_ALL_REG       0xDE    /* all-channels mask (w) */
+#define DMA2_EXT_MODE_REG	(0x400 | DMA2_MODE_REG)
+
+extern spinlock_t dma_spin_lock;
+
+static __inline__ unsigned long claim_dma_lock(void)
+{
+	unsigned long flags;
+	spin_lock_irqsave(&dma_spin_lock, flags);
+	return flags;
+}
+
+static __inline__ void release_dma_lock(unsigned long flags)
+{
+	spin_unlock_irqrestore(&dma_spin_lock, flags);
+}
+
+
+/* Get DMA residue count. After a DMA transfer, this
+ * should return zero. Reading this while a DMA transfer is
+ * still in progress will return unpredictable results.
+ * If called before the channel has been used, it may return 1.
+ * Otherwise, it returns the number of _bytes_ left to transfer.
+ *
+ * Assumes DMA flip-flop is clear.
+ */
+static __inline__ int get_dma_residue(unsigned int dmanr)
+{
+	unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE
+					 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE;
+
+	/* using short to get 16-bit wrap around */
+	unsigned short count;
+
+	count = 1 + dma_inb(io_port);
+	count += dma_inb(io_port) << 8;
+	
+	return (dmanr<=3)? count : (count<<1);
+}
+
+/* enable/disable a specific DMA channel */
+static __inline__ void enable_dma(unsigned int dmanr)
+{
+#ifdef CONFIG_SUPERIO
+	if (dmanr<=3)
+		dma_outb(dmanr,  DMA1_MASK_REG);
+	else
+		dma_outb(dmanr & 3,  DMA2_MASK_REG);
+#endif
+}
+
+static __inline__ void disable_dma(unsigned int dmanr)
+{
+#ifdef CONFIG_SUPERIO
+	if (dmanr<=3)
+		dma_outb(dmanr | 4,  DMA1_MASK_REG);
+	else
+		dma_outb((dmanr & 3) | 4,  DMA2_MASK_REG);
+#endif
+}
+
+/* Clear the 'DMA Pointer Flip Flop'.
+ * Write 0 for LSB/MSB, 1 for MSB/LSB access.
+ * Use this once to initialize the FF to a known state.
+ * After that, keep track of it. :-)
+ * --- In order to do that, the DMA routines below should ---
+ * --- only be used while holding the DMA lock ! ---
+ */
+static __inline__ void clear_dma_ff(unsigned int dmanr)
+{
+}
+
+/* set mode (above) for a specific DMA channel */
+static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
+{
+}
+
+/* Set only the page register bits of the transfer address.
+ * This is used for successive transfers when we know the contents of
+ * the lower 16 bits of the DMA current address register, but a 64k boundary
+ * may have been crossed.
+ */
+static __inline__ void set_dma_page(unsigned int dmanr, char pagenr)
+{
+}
+
+
+/* Set transfer address & page bits for specific DMA channel.
+ * Assumes dma flipflop is clear.
+ */
+static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
+{
+}
+
+
+/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
+ * a specific DMA channel.
+ * You must ensure the parameters are valid.
+ * NOTE: from a manual: "the number of transfers is one more
+ * than the initial word count"! This is taken into account.
+ * Assumes dma flip-flop is clear.
+ * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
+ */
+static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
+{
+}
+
+
+
+/* These are in kernel/dma.c: */
+extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
+extern void free_dma(unsigned int dmanr);	/* release it again */
+extern int get_dma_list(char *buf);		/* proc/dma support  */
+
+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
+#define isa_dma_bridge_buggy 	(0)
+#endif
+
+#endif /* _ASM_DMA_H */
diff -Nru a/include/asm-parisc/eisa_bus.h b/include/asm-parisc/eisa_bus.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/eisa_bus.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,23 @@
+/*
+ * eisa_bus.h interface between the eisa BA driver and the bus enumerator
+ *
+ * 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) 2002 Daniel Engstrom <5116@telia.com>
+ *
+ */
+
+#ifndef ASM_EISA_H
+#define ASM_EISA_H
+
+extern void eisa_make_irq_level(int num);
+extern void eisa_make_irq_edge(int num);
+extern int eisa_enumerator(unsigned long eeprom_addr,
+			   struct resource *io_parent, 
+			   struct resource *mem_parent);
+extern int eisa_eeprom_init(unsigned long addr);
+
+#endif
diff -Nru a/include/asm-parisc/eisa_eeprom.h b/include/asm-parisc/eisa_eeprom.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/eisa_eeprom.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,151 @@
+/*
+ * eisa_eeprom.h - provide support for EISA adapters in PA-RISC machines
+ *
+ * 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) 2001, 2002 Daniel Engstrom <5116@telia.com>
+ *
+ */
+
+#ifndef ASM_EISA_EEPROM_H
+#define ASM_EISA_EEPROM_H
+
+#define HPEE_MAX_LENGTH       0x2000	/* maximum eeprom length */
+
+#define HPEE_SLOT_INFO(slot) (20+(48*slot))
+
+struct eeprom_header 
+{
+   
+	u_int32_t num_writes;       /* number of writes */
+ 	u_int8_t  flags;            /* flags, usage? */
+	u_int8_t  ver_maj;
+	u_int8_t  ver_min;
+	u_int8_t  num_slots;        /* number of EISA slots in system */
+	u_int16_t csum;             /* checksum, I dont know how to calulate this */
+	u_int8_t  pad[10];
+} __attribute__ ((packed));
+
+
+struct eeprom_eisa_slot_info
+{
+	u_int32_t eisa_slot_id;
+	u_int32_t config_data_offset;
+	u_int32_t num_writes;
+	u_int16_t csum;
+	u_int16_t num_functions;
+	u_int16_t config_data_length;
+	
+	/* bits 0..3 are the duplicate slot id */ 
+#define HPEE_SLOT_INFO_EMBEDDED  0x10
+#define HPEE_SLOT_INFO_VIRTUAL   0x20
+#define HPEE_SLOT_INFO_NO_READID 0x40
+#define HPEE_SLOT_INFO_DUPLICATE 0x80
+	u_int8_t slot_info;
+	
+#define HPEE_SLOT_FEATURES_ENABLE         0x01
+#define HPEE_SLOT_FEATURES_IOCHK          0x02
+#define HPEE_SLOT_FEATURES_CFG_INCOMPLETE 0x80
+	u_int8_t slot_features;
+	
+	u_int8_t  ver_min;
+	u_int8_t  ver_maj;
+	
+#define HPEE_FUNCTION_INFO_HAVE_TYPE      0x01
+#define HPEE_FUNCTION_INFO_HAVE_MEMORY    0x02
+#define HPEE_FUNCTION_INFO_HAVE_IRQ       0x04
+#define HPEE_FUNCTION_INFO_HAVE_DMA       0x08
+#define HPEE_FUNCTION_INFO_HAVE_PORT      0x10
+#define HPEE_FUNCTION_INFO_HAVE_PORT_INIT 0x20
+/* I think there are two slighty different 
+ * versions of the function_info field 
+ * one int the fixed header and one optional 
+ * in the parsed slot data area */
+#define HPEE_FUNCTION_INFO_HAVE_FUNCTION  0x01
+#define HPEE_FUNCTION_INFO_F_DISABLED     0x80
+#define HPEE_FUNCTION_INFO_CFG_FREE_FORM  0x40
+	u_int8_t  function_info;
+
+#define HPEE_FLAG_BOARD_IS_ISA		  0x01 /* flag and minor version for isa board */
+	u_int8_t  flags;
+	u_int8_t  pad[24];
+} __attribute__ ((packed));
+
+
+#define HPEE_MEMORY_MAX_ENT   9
+/* memory descriptor: byte 0 */
+#define HPEE_MEMORY_WRITABLE  0x01
+#define HPEE_MEMORY_CACHABLE  0x02
+#define HPEE_MEMORY_TYPE_MASK 0x18
+#define HPEE_MEMORY_TYPE_SYS  0x00
+#define HPEE_MEMORY_TYPE_EXP  0x08
+#define HPEE_MEMORY_TYPE_VIR  0x10
+#define HPEE_MEMORY_TYPE_OTH  0x18
+#define HPEE_MEMORY_SHARED    0x20
+#define HPEE_MEMORY_MORE      0x80
+
+/* memory descriptor: byte 1 */
+#define HPEE_MEMORY_WIDTH_MASK 0x03
+#define HPEE_MEMORY_WIDTH_BYTE 0x00
+#define HPEE_MEMORY_WIDTH_WORD 0x01
+#define HPEE_MEMORY_WIDTH_DWORD 0x02
+#define HPEE_MEMORY_DECODE_MASK 0x0c
+#define HPEE_MEMORY_DECODE_20BITS 0x00
+#define HPEE_MEMORY_DECODE_24BITS 0x04
+#define HPEE_MEMORY_DECODE_32BITS 0x08
+/* byte 2 and 3 are a 16bit LE value
+ * containging the memory size in kilobytes */
+/* byte 4,5,6 are a 24bit LE value
+ * containing the memory base address */
+
+
+#define HPEE_IRQ_MAX_ENT      7
+/* Interrupt entry: byte 0 */
+#define HPEE_IRQ_CHANNEL_MASK 0xf
+#define HPEE_IRQ_TRIG_LEVEL   0x20
+#define HPEE_IRQ_MORE         0x80
+/* byte 1 seems to be unused */
+
+#define HPEE_DMA_MAX_ENT     4
+
+/* dma entry: byte 0 */
+#define HPEE_DMA_CHANNEL_MASK 7
+#define HPEE_DMA_SIZE_MASK	0xc
+#define HPEE_DMA_SIZE_BYTE	0x0
+#define HPEE_DMA_SIZE_WORD	0x4
+#define HPEE_DMA_SIZE_DWORD	0x8
+#define HPEE_DMA_SHARED      0x40
+#define HPEE_DMA_MORE        0x80
+
+/* dma entry: byte 1 */
+#define HPEE_DMA_TIMING_MASK 0x30
+#define HPEE_DMA_TIMING_ISA	0x0
+#define HPEE_DMA_TIMING_TYPEA 0x10
+#define HPEE_DMA_TIMING_TYPEB 0x20
+#define HPEE_DMA_TIMING_TYPEC 0x30
+
+#define HPEE_PORT_MAX_ENT 20
+/* port entry byte 0 */
+#define HPEE_PORT_SIZE_MASK 0x1f
+#define HPEE_PORT_SHARED    0x40
+#define HPEE_PORT_MORE      0x80
+/* byte 1 and 2 is a 16bit LE value
+ * conating the start port number */
+
+#define HPEE_PORT_INIT_MAX_LEN     60 /* in bytes here */
+/* port init entry byte 0 */
+#define HPEE_PORT_INIT_WIDTH_MASK  0x3
+#define HPEE_PORT_INIT_WIDTH_BYTE  0x0
+#define HPEE_PORT_INIT_WIDTH_WORD  0x1
+#define HPEE_PORT_INIT_WIDTH_DWORD 0x2
+#define HPEE_PORT_INIT_MASK        0x4
+#define HPEE_PORT_INIT_MORE        0x80
+
+#define HPEE_SELECTION_MAX_ENT 26
+
+#define HPEE_TYPE_MAX_LEN    80
+
+#endif
diff -Nru a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h
--- a/include/asm-parisc/elf.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-parisc/elf.h	Wed Oct 30 16:44:30 2002
@@ -9,19 +9,13 @@
 
 #define EM_PARISC 15
 
-#define ELF_NGREG 32
-#define ELF_NFPREG 32
-
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-typedef double elf_fpreg_t;
-typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
-
-#define ELF_CORE_COPY_REGS(gregs, regs) \
-	memcpy(gregs, regs, \
-	       sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
-	       sizeof(struct pt_regs): sizeof(elf_gregset_t));
+/*
+ * The following definitions are those for 32-bit ELF binaries on a 32-bit kernel
+ * and for 64-bit binaries on a 64-bit kernel.  To run 32-bit binaries on a 64-bit
+ * kernel, arch/parisc64/kernel/binfmt_elf32.c defines these macros appropriately
+ * and then #includes binfmt_elf.c, which then includes this file.
+ */
+#ifndef ELF_CLASS
 
 /*
  * This is used to ensure we don't load something for the wrong architecture.
@@ -30,16 +24,84 @@
  * the following macros are for the default case. However, for the 64
  * bit kernel we also support 32 bit parisc binaries. To do that
  * arch/parisc64/kernel/binfmt_elf32.c defines its own set of these
- * macros, and then if includes fs/binfmt_elf.c to provide an alternate
+ * macros, and then it includes fs/binfmt_elf.c to provide an alternate
  * elf binary handler for 32 bit binaries (on the 64 bit kernel).
  */
-
 #ifdef __LP64__
 #define ELF_CLASS       ELFCLASS64
 #else
 #define ELF_CLASS	ELFCLASS32
 #endif
 
+typedef unsigned long elf_greg_t;
+
+/* 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  ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)
+
+#ifdef __KERNEL__
+#define SET_PERSONALITY(ex, ibcs2) \
+	current->personality = PER_LINUX
+#endif
+
+/*
+ * Fill in general registers in a core dump.  This saves pretty
+ * much the same registers as hp-ux, although in a different order.
+ * Registers marked # below are not currently saved in pt_regs, so
+ * we use their current values here.
+ *
+ * 	gr0..gr31
+ * 	sr0..sr7
+ * 	iaoq0..iaoq1
+ * 	iasq0..iasq1
+ * 	cr11 (sar)
+ * 	cr19 (iir)
+ * 	cr20 (isr)
+ * 	cr21 (ior)
+ *  #	cr22 (ipsw)
+ *  #	cr0 (recovery counter)
+ *  #	cr24..cr31 (temporary registers)
+ *  #	cr8,9,12,13 (protection IDs)
+ *  #	cr10 (scr/ccr)
+ *  #	cr15 (ext int enable mask)
+ *
+ */
+
+#define ELF_CORE_COPY_REGS(dst, pt)	\
+	memset(dst, 0, sizeof(dst));	/* don't leak any "random" bits */ \
+	memcpy(dst + 0, pt->gr, 32 * sizeof(elf_greg_t)); \
+	memcpy(dst + 32, pt->sr, 8 * sizeof(elf_greg_t)); \
+	memcpy(dst + 40, pt->iaoq, 2 * sizeof(elf_greg_t)); \
+	memcpy(dst + 42, pt->iasq, 2 * sizeof(elf_greg_t)); \
+	dst[44] = pt->sar;   dst[45] = pt->iir; \
+	dst[46] = pt->isr;   dst[47] = pt->ior; \
+	dst[48] = mfctl(22); dst[49] = mfctl(0); \
+	dst[50] = mfctl(24); dst[51] = mfctl(25); \
+	dst[52] = mfctl(26); dst[53] = mfctl(27); \
+	dst[54] = mfctl(28); dst[55] = mfctl(29); \
+	dst[56] = mfctl(30); dst[57] = mfctl(31); \
+	dst[58] = mfctl( 8); dst[59] = mfctl( 9); \
+	dst[60] = mfctl(12); dst[61] = mfctl(13); \
+	dst[62] = mfctl(10); dst[63] = mfctl(15);
+
+#endif /* ! ELF_CLASS */
+
+#define ELF_NGREG 80	/* We only need 64 at present, but leave space
+			   for expansion. */
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+#define ELF_NFPREG 32
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+struct pt_regs;	/* forward declaration... */
+
+
 #define elf_check_arch(x) ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS)
 
 /*
@@ -79,19 +141,5 @@
 
 #define ELF_HWCAP	0
 /* (boot_cpu_data.x86_capability) */
-
-/* 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  ("PARISC\0" /*+((boot_cpu_data.x86-3)*5) */)
-
-#ifdef __KERNEL__
-#define SET_PERSONALITY(ex, ibcs2) \
-	current->personality = PER_LINUX
-#endif
 
 #endif
diff -Nru a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h
--- a/include/asm-parisc/fcntl.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-parisc/fcntl.h	Wed Oct 30 16:44:28 2002
@@ -24,6 +24,7 @@
 #define O_DIRECT	00040000 /* direct disk access hint - currently ignored */
 #define O_DIRECTORY	00010000 /* must be a directory */
 #define O_NOFOLLOW	00000200 /* don't follow links */
+#define O_INVISIBLE	04000000 /* invisible I/O, for DMAPI/XDSM */
 
 #define F_DUPFD		0	/* dup */
 #define F_GETFD		1	/* get f_flags */
diff -Nru a/include/asm-parisc/fixmap.h b/include/asm-parisc/fixmap.h
--- a/include/asm-parisc/fixmap.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-parisc/fixmap.h	Wed Oct 30 16:44:29 2002
@@ -1,8 +1,12 @@
 #ifndef _ASM_FIXMAP_H
 #define _ASM_FIXMAP_H
 
-#define FIXADDR_TOP	(0xffffe000UL)
-#define FIXADDR_SIZE	(0 << PAGE_SHIFT)
-#define FIXADDR_START	(FIXADDR_TOP - FIXADDR_SIZE)
+/*
+ * Allocate a 8 Mb temporary mapping area for copy_user_page/clear_user_page.
+ * This area needs to be aligned on a 8 Mb boundary.
+ */
+
+#define TMPALIAS_MAP_START (__PAGE_OFFSET - 0x01000000)
+#define FIXADDR_START   ((unsigned long)TMPALIAS_MAP_START)
 
 #endif
diff -Nru a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/floppy.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,266 @@
+/*
+ * Architecture specific parts of the Floppy driver
+ *
+ * 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
+ */
+#ifndef __ASM_PARISC_FLOPPY_H
+#define __ASM_PARISC_FLOPPY_H
+
+#include <linux/vmalloc.h>
+
+
+/*
+ * The DMA channel used by the floppy controller cannot access data at
+ * addresses >= 16MB
+ *
+ * Went back to the 1MB limit, as some people had problems with the floppy
+ * driver otherwise. It doesn't matter much for performance anyway, as most
+ * floppy accesses go through the track buffer.
+ */
+#define _CROSS_64KB(a,s,vdma) \
+(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
+
+#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
+
+
+#define SW fd_routine[use_virtual_dma&1]
+#define CSW fd_routine[can_use_virtual_dma & 1]
+
+
+#define fd_inb(port)			readb(port)
+#define fd_outb(value, port)		writeb(value, port)
+
+#define fd_request_dma()        CSW._request_dma(FLOPPY_DMA,"floppy")
+#define fd_free_dma()           CSW._free_dma(FLOPPY_DMA)
+#define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
+#define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
+#define fd_free_irq()		free_irq(FLOPPY_IRQ, NULL)
+#define fd_get_dma_residue()    SW._get_dma_residue(FLOPPY_DMA)
+#define fd_dma_mem_alloc(size)	SW._dma_mem_alloc(size)
+#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
+
+#define FLOPPY_CAN_FALLBACK_ON_NODMA
+
+static int virtual_dma_count=0;
+static int virtual_dma_residue=0;
+static char *virtual_dma_addr=0;
+static int virtual_dma_mode=0;
+static int doing_pdma=0;
+
+static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
+{
+	register unsigned char st;
+
+#undef TRACE_FLPY_INT
+
+#ifdef TRACE_FLPY_INT
+	static int calls=0;
+	static int bytes=0;
+	static int dma_wait=0;
+#endif
+	if (!doing_pdma) {
+		floppy_interrupt(irq, dev_id, regs);
+		return;
+	}
+
+#ifdef TRACE_FLPY_INT
+	if(!calls)
+		bytes = virtual_dma_count;
+#endif
+
+	{
+		register int lcount;
+		register char *lptr = virtual_dma_addr;
+
+		for (lcount = virtual_dma_count; lcount; lcount--) {
+			st = fd_inb(virtual_dma_port+4) & 0xa0 ;
+			if (st != 0xa0) 
+				break;
+			if (virtual_dma_mode) {
+				fd_outb(*lptr, virtual_dma_port+5);
+			} else {
+				*lptr = fd_inb(virtual_dma_port+5);
+			}
+			lptr++;
+		}
+		virtual_dma_count = lcount;
+		virtual_dma_addr = lptr;
+		st = fd_inb(virtual_dma_port+4);
+	}
+
+#ifdef TRACE_FLPY_INT
+	calls++;
+#endif
+	if (st == 0x20)
+		return;
+	if (!(st & 0x20)) {
+		virtual_dma_residue += virtual_dma_count;
+		virtual_dma_count = 0;
+#ifdef TRACE_FLPY_INT
+		printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n", 
+		       virtual_dma_count, virtual_dma_residue, calls, bytes,
+		       dma_wait);
+		calls = 0;
+		dma_wait=0;
+#endif
+		doing_pdma = 0;
+		floppy_interrupt(irq, dev_id, regs);
+		return;
+	}
+#ifdef TRACE_FLPY_INT
+	if (!virtual_dma_count)
+		dma_wait++;
+#endif
+}
+
+static void fd_disable_dma(void)
+{
+	if(! (can_use_virtual_dma & 1))
+		disable_dma(FLOPPY_DMA);
+	doing_pdma = 0;
+	virtual_dma_residue += virtual_dma_count;
+	virtual_dma_count=0;
+}
+
+static int vdma_request_dma(unsigned int dmanr, const char * device_id)
+{
+	return 0;
+}
+
+static void vdma_nop(unsigned int dummy)
+{
+}
+
+
+static int vdma_get_dma_residue(unsigned int dummy)
+{
+	return virtual_dma_count + virtual_dma_residue;
+}
+
+
+static int fd_request_irq(void)
+{
+	if(can_use_virtual_dma)
+		return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT,
+						   "floppy", NULL);
+	else
+		return request_irq(FLOPPY_IRQ, floppy_interrupt,
+						   SA_INTERRUPT|SA_SAMPLE_RANDOM,
+						   "floppy", NULL);	
+
+}
+
+static unsigned long dma_mem_alloc(unsigned long size)
+{
+	return __get_dma_pages(GFP_KERNEL, get_order(size));
+}
+
+
+static unsigned long vdma_mem_alloc(unsigned long size)
+{
+	return (unsigned long) vmalloc(size);
+
+}
+
+#define nodma_mem_alloc(size) vdma_mem_alloc(size)
+
+static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
+{
+	if((unsigned int) addr >= (unsigned int) high_memory)
+		return vfree((void *)addr);
+	else
+		free_pages(addr, get_order(size));		
+}
+
+#define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size) 
+
+static void _fd_chose_dma_mode(char *addr, unsigned long size)
+{
+	if(can_use_virtual_dma == 2) {
+		if((unsigned int) addr >= (unsigned int) high_memory ||
+		   virt_to_bus(addr) >= 0x1000000 ||
+		   _CROSS_64KB(addr, size, 0))
+			use_virtual_dma = 1;
+		else
+			use_virtual_dma = 0;
+	} else {
+		use_virtual_dma = can_use_virtual_dma & 1;
+	}
+}
+
+#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
+
+
+static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
+{
+	doing_pdma = 1;
+	virtual_dma_port = io;
+	virtual_dma_mode = (mode  == DMA_MODE_WRITE);
+	virtual_dma_addr = addr;
+	virtual_dma_count = size;
+	virtual_dma_residue = 0;
+	return 0;
+}
+
+static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
+{
+#ifdef FLOPPY_SANITY_CHECK
+	if (CROSS_64KB(addr, size)) {
+		printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
+		return -1;
+	}
+#endif
+	/* actual, physical DMA */
+	doing_pdma = 0;
+	clear_dma_ff(FLOPPY_DMA);
+	set_dma_mode(FLOPPY_DMA,mode);
+	set_dma_addr(FLOPPY_DMA,virt_to_bus(addr));
+	set_dma_count(FLOPPY_DMA,size);
+	enable_dma(FLOPPY_DMA);
+	return 0;
+}
+
+struct fd_routine_l {
+	int (*_request_dma)(unsigned int dmanr, const char * device_id);
+	void (*_free_dma)(unsigned int dmanr);
+	int (*_get_dma_residue)(unsigned int dummy);
+	unsigned long (*_dma_mem_alloc) (unsigned long size);
+	int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
+} fd_routine[] = {
+	{
+		request_dma,
+		free_dma,
+		get_dma_residue,
+		dma_mem_alloc,
+		hard_dma_setup
+	},
+	{
+		vdma_request_dma,
+		vdma_nop,
+		vdma_get_dma_residue,
+		vdma_mem_alloc,
+		vdma_dma_setup
+	}
+};
+
+
+static int FDC1 = 0x3f0; /* Lies.  Floppy controller is memory mapped, not io mapped */
+static int FDC2 = -1;
+
+#define FLOPPY0_TYPE	0
+#define FLOPPY1_TYPE	0
+
+#define N_FDC 1
+#define N_DRIVE 8
+
+#define FLOPPY_MOTOR_MASK 0xf0
+
+#define AUTO_DMA
+
+#define EXTRA_FLOPPY_PARAMS
+
+#endif /* __ASM_PARISC_FLOPPY_H */
diff -Nru a/include/asm-parisc/grfioctl.h b/include/asm-parisc/grfioctl.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/grfioctl.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,95 @@
+/*
+ * Architecture specific parts of HP's STI (framebuffer) driver
+ * structures are HP-UX compatible for XFree86 usage 
+ */ 
+
+#ifndef __ASM_PARISC_GRFIOCTL_H
+#define __ASM_PARISC_GRFIOCTL_H
+
+/* upper 32 bits of graphics id (HP/UX identifier) */
+
+#define GRFGATOR		8
+#define S9000_ID_S300		9
+#define GRFBOBCAT		9
+#define	GRFCATSEYE		9
+#define S9000_ID_98720		10
+#define GRFRBOX			10
+#define S9000_ID_98550		11
+#define GRFFIREEYE		11
+#define S9000_ID_A1096A		12
+#define GRFHYPERION		12
+#define S9000_ID_FRI		13
+#define S9000_ID_98730		14
+#define GRFDAVINCI		14
+#define S9000_ID_98705		0x26C08070	/* Tigershark */
+#define S9000_ID_98736		0x26D148AB
+#define S9000_ID_A1659A		0x26D1482A	/* CRX 8 plane color (=ELK) */
+#define S9000_ID_ELK		S9000_ID_A1659A
+#define S9000_ID_A1439A		0x26D148EE	/* CRX24 = CRX+ (24-plane color) */
+#define S9000_ID_A1924A		0x26D1488C	/* GRX gray-scale */
+#define S9000_ID_ELM		S9000_ID_A1924A
+#define S9000_ID_98765		0x27480DEF
+#define S9000_ID_ELK_768	0x27482101
+#define S9000_ID_STINGER	0x27A4A402
+#define S9000_ID_TIMBER		0x27F12392	/* Bushmaster (710) Graphics */
+#define S9000_ID_TOMCAT		0x27FCCB6D	/* dual-headed ELK (Dual CRX) */
+#define S9000_ID_ARTIST		0x2B4DED6D	/* Artist (Gecko/712 & 715) onboard Graphics */
+#define S9000_ID_HCRX		0x2BCB015A	/* Hyperdrive/Hyperbowl (A4071A) Graphics */
+#define CRX24_OVERLAY_PLANES	0x920825AA	/* Overlay planes on CRX24 */
+
+#define CRT_ID_ELK_1024		S9000_ID_ELK_768 /* Elk 1024x768  CRX */
+#define CRT_ID_ELK_1280		S9000_ID_A1659A	/* Elk 1280x1024 CRX */
+#define CRT_ID_ELK_1024DB	0x27849CA5      /* Elk 1024x768 double buffer */
+#define CRT_ID_ELK_GS		S9000_ID_A1924A	/* Elk 1280x1024 GreyScale    */
+#define CRT_ID_CRX24		S9000_ID_A1439A	/* Piranha */
+#define CRT_ID_VISUALIZE_EG	0x2D08C0A7      /* Graffiti (built-in B132+/B160L) */
+#define CRT_ID_THUNDER		0x2F23E5FC      /* Thunder 1 VISUALIZE 48*/
+#define CRT_ID_THUNDER2		0x2F8D570E      /* Thunder 2 VISUALIZE 48 XP*/
+#define CRT_ID_HCRX		S9000_ID_HCRX	/* Hyperdrive HCRX */
+#define CRT_ID_CRX48Z		S9000_ID_STINGER /* Stinger */
+#define CRT_ID_DUAL_CRX		S9000_ID_TOMCAT	/* Tomcat */
+#define CRT_ID_PVRX		S9000_ID_98705	/* Tigershark */
+#define CRT_ID_TIMBER		S9000_ID_TIMBER	/* Timber (710 builtin) */
+#define CRT_ID_TVRX		S9000_ID_98765	/* TVRX (gto/falcon) */
+#define CRT_ID_ARTIST		S9000_ID_ARTIST	/* Artist */
+#define CRT_ID_SUMMIT		0x2FC1066B      /* Summit FX2, FX4, FX6 ... */
+
+/* structure for ioctl(GCDESCRIBE) */
+
+#define gaddr_t unsigned long	/* FIXME: PA2.0 (64bit) portable ? */
+
+struct	grf_fbinfo {
+	unsigned int	id;		/* upper 32 bits of graphics id */
+	unsigned int	mapsize;	/* mapped size of framebuffer */
+	unsigned int	dwidth, dlength;/* x and y sizes */
+	unsigned int	width, length;	/* total x and total y size */
+	unsigned int	xlen;		/* x pitch size */
+	unsigned int	bpp, bppu;	/* bits per pixel and used bpp */
+	unsigned int	npl, nplbytes;	/* # of planes and bytes per plane */
+	char		name[32];	/* name of the device (from ROM) */
+	unsigned int	attr;		/* attributes */
+	gaddr_t 	fbbase, regbase;/* framebuffer and register base addr */
+	gaddr_t		regions[6];	/* region bases */
+};
+
+#define	GCID		_IOR('G', 0, int)
+#define	GCON		_IO('G', 1)
+#define	GCOFF		_IO('G', 2)
+#define	GCAON		_IO('G', 3)
+#define	GCAOFF		_IO('G', 4)
+#define	GCMAP		_IOWR('G', 5, int)
+#define	GCUNMAP		_IOWR('G', 6, int)
+#define	GCMAP_HPUX	_IO('G', 5)
+#define	GCUNMAP_HPUX	_IO('G', 6)
+#define	GCLOCK		_IO('G', 7)
+#define	GCUNLOCK	_IO('G', 8)
+#define	GCLOCK_MINIMUM	_IO('G', 9)
+#define	GCUNLOCK_MINIMUM _IO('G', 10)
+#define	GCSTATIC_CMAP	_IO('G', 11)
+#define	GCVARIABLE_CMAP _IO('G', 12)
+#define GCTERM		_IOWR('G',20,int)	/* multi-headed Tomcat */ 
+#define GCDESCRIBE	_IOR('G', 21, struct grf_fbinfo)
+#define GCFASTLOCK	_IO('G', 26)
+
+#endif /* __ASM_PARISC_GRFIOCTL_H */
+
diff -Nru a/include/asm-parisc/gsc.h b/include/asm-parisc/gsc.h
--- a/include/asm-parisc/gsc.h	Wed Oct 30 16:44:33 2002
+++ b/include/asm-parisc/gsc.h	Wed Oct 30 16:44:33 2002
@@ -3,49 +3,17 @@
 #ifdef __KERNEL__
 
 #include <linux/types.h>
-#include <asm/hardware.h>	/* for struct hp_device */
+#include <asm/io.h> /* temporary for __raw_{read,write} */
 
-/*
- * The convention used for inb/outb etc. is that names starting with
- * two underscores are the inline versions, names starting with a
- * single underscore are proper functions, and names starting with a
- * letter are macros that map in some way to inline or proper function
- * versions.  Not all that pretty, but before you change it, be sure
- * to convince yourself that it won't break anything (in particular
- * module support).
+/* Please, call ioremap and use {read,write}[bwl] instead.  These functions
+ * are not very fast.
  */
-extern   u8 _gsc_readb(void *);
-extern  u16 _gsc_readw(void *);
-extern  u32 _gsc_readl(void *);
-extern  u64 _gsc_readq(void *);
-extern void _gsc_writeb(u8, void *);
-extern void _gsc_writew(u16,void *);
-extern void _gsc_writel(u32,void *);
-extern void _gsc_writeq(u64,void *);
-
-#define gsc_readb(a)	_gsc_readb((void *)(a))
-#define gsc_readw(a)	_gsc_readw((void *)(a))
-#define gsc_readl(a)	_gsc_readl((void *)(a))
-#define gsc_readq(a)	_gsc_readq((void *)(a))
-#define gsc_writeb(v,a)	_gsc_writeb((v),(void *)(a))
-#define gsc_writew(v,a)	_gsc_writew((v),(void *)(a))
-#define gsc_writel(v,a)	_gsc_writel((v),(void *)(a))
-#define gsc_writeq(v,a)	_gsc_writeq((v),(void *)(a))
-
-struct gsc_dev {
-	struct gsc_bus	*bus;		/* bus this device is on */
-	struct gsc_dev	*next;		/* chain of all devices */
-	struct gsc_dev	*next_bus;	/* chain of all devices on a bus */
-	struct gsc_dev	*next_submod;	/* chain of all devices on a module */
-
-	unsigned	irq;		/* irq generated by this device */
-	void		*hpa;		/* hard physical address */
-
-	u16		hversion;
-	u8		spa;		/* SPA requirements */
-	u8		type;
-	u32		sversion;
-};
+#define gsc_readb(x) __raw_readb((unsigned long)x)
+#define gsc_readw(x) __raw_readw((unsigned long)x)
+#define gsc_readl(x) __raw_readl((unsigned long)x)
+#define gsc_writeb(x, y) __raw_writeb(x, (unsigned long)y)
+#define gsc_writew(x, y) __raw_writew(x, (unsigned long)y)
+#define gsc_writel(x, y) __raw_writel(x, (unsigned long)y)
 
 struct gsc_irq {
 	unsigned long txn_addr;	/* IRQ "target" */
@@ -58,22 +26,6 @@
 
 extern int gsc_alloc_irq(struct gsc_irq *dev);	/* dev needs an irq */
 extern int gsc_claim_irq(struct gsc_irq *dev, int irq);	/* dev needs this irq */
-
-struct gsc_bus {
-	void		*hpa;		/* HPA of device 0, function 0 of this bus */
-};
-
-/*
- * There is one gsc_dev structure for each slot-number/function-number
- * combination:
- */
-
-struct gsc_dev *gsc_find_device(u16 hversion, struct gsc_dev *from);
-
-extern void probe_serial_gsc(void);
-
-/* returns a virtual irq for device at dev->hpa (works for all LASI/ASP/WAX) */
-extern int busdevice_alloc_irq( struct hp_device *dev );
 
 #endif /* __KERNEL__ */
 #endif /* LINUX_GSC_H */
diff -Nru a/include/asm-parisc/hardirq.h b/include/asm-parisc/hardirq.h
--- a/include/asm-parisc/hardirq.h	Wed Oct 30 16:44:33 2002
+++ b/include/asm-parisc/hardirq.h	Wed Oct 30 16:44:33 2002
@@ -1,87 +1,113 @@
-/* hardirq.h: 32-bit Sparc hard IRQ support.
+/* hardirq.h: PA-RISC hard IRQ support.
  *
- * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
- * Copyright (C) 1998-99 Anton Blanchard (anton@progsoc.uts.edu.au)
+ * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
+ *
+ * The locking is really quite interesting.  There's a cpu-local
+ * count of how many interrupts are being handled, and a global
+ * lock.  An interrupt can only be serviced if the global lock
+ * is free.  You can't be sure no more interrupts are being
+ * serviced until you've acquired the lock and then checked
+ * all the per-cpu interrupt counts are all zero.  It's a specialised
+ * br_lock, and that's exactly how Sparc does it.  We don't because
+ * it's more locking for us.  This way is lock-free in the interrupt path.
  */
 
-#ifndef __PARISC_HARDIRQ_H
-#define __PARISC_HARDIRQ_H
+#ifndef _PARISC_HARDIRQ_H
+#define _PARISC_HARDIRQ_H
 
 #include <linux/config.h>
 #include <linux/threads.h>
+#include <linux/cache.h>
 
 typedef struct {
-	unsigned int __softirq_active;
-	unsigned int __softirq_mask;
-	unsigned int __local_irq_count;
-	unsigned int __local_bh_count;
+	unsigned long __softirq_pending; /* set_bit is used on this */
 	unsigned int __syscall_count;
+	struct task_struct * __ksoftirqd_task;
+	unsigned long idle_timestamp;
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
 
 /*
- * Are we in an interrupt context? Either doing bottom half
- * or hardware interrupt processing?
+ * We put the hardirq and softirq counter into the preemption counter. The bitmask has the
+ * following meaning:
+ *
+ * - bits 0-7 are the preemption count (max preemption depth: 256)
+ * - bits 8-15 are the softirq count (max # of softirqs: 256)
+ * - bits 16-31 are the hardirq count (max # of hardirqs: 65536)
+ *
+ * - (bit 63 is the PREEMPT_ACTIVE flag---not currently implemented.)
+ *
+ * PREEMPT_MASK: 0x000000ff
+ * SOFTIRQ_MASK: 0x0000ff00
+ * HARDIRQ_MASK: 0xffff0000
  */
-#define in_interrupt() ({ int __cpu = smp_processor_id(); \
-	(local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
 
-#define in_irq() ({ int __cpu = smp_processor_id(); \
-	(local_irq_count(__cpu) != 0); })
+#define PREEMPT_BITS	8
+#define SOFTIRQ_BITS	8
+#define HARDIRQ_BITS	16
+
+#define PREEMPT_SHIFT	0
+#define SOFTIRQ_SHIFT	(PREEMPT_SHIFT + PREEMPT_BITS)
+#define HARDIRQ_SHIFT	(SOFTIRQ_SHIFT + SOFTIRQ_BITS)
+
+#define __MASK(x)	((1UL << (x))-1)
+
+#define PREEMPT_MASK	(__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
+#define HARDIRQ_MASK	(__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
+#define SOFTIRQ_MASK	(__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
+
+#define hardirq_count()	(preempt_count() & HARDIRQ_MASK)
+#define softirq_count()	(preempt_count() & SOFTIRQ_MASK)
+#define irq_count()	(preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
+
+#define PREEMPT_OFFSET	(1UL << PREEMPT_SHIFT)
+#define SOFTIRQ_OFFSET	(1UL << SOFTIRQ_SHIFT)
+#define HARDIRQ_OFFSET	(1UL << HARDIRQ_SHIFT)
 
-#ifndef CONFIG_SMP
-
-#define hardirq_trylock(cpu)	(local_irq_count(cpu) == 0)
-#define hardirq_endlock(cpu)	do { } while (0)
-
-#define irq_enter(cpu, irq)	(local_irq_count(cpu)++)
-#define irq_exit(cpu, irq)	(local_irq_count(cpu)--)
-
-#define synchronize_irq()	barrier()
+/*
+ * The hardirq mask has to be large enough to have space for potentially all IRQ sources
+ * in the system nesting on a single CPU:
+ */
+#if (1 << HARDIRQ_BITS) < NR_IRQS
+# error HARDIRQ_BITS is too low!
+#endif
 
+/*
+ * Are we doing bottom half or hardware interrupt processing?
+ * Are we in a softirq context?
+ * Interrupt context?
+ */
+#define in_irq()		(hardirq_count())
+#define in_softirq()		(softirq_count())
+#define in_interrupt()		(irq_count())
+
+#define hardirq_trylock()	(!in_interrupt())
+#define hardirq_endlock()	do { } while (0)
+
+#define irq_enter()		(preempt_count() += HARDIRQ_OFFSET)
+
+#if CONFIG_PREEMPT
+# error CONFIG_PREEMT currently not supported.
+# define in_atomic()	 BUG()
+# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
 #else
+# define in_atomic()	(preempt_count() != 0)
+# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
+#endif
+
+#define irq_exit()								\
+do {										\
+		preempt_count() -= IRQ_EXIT_OFFSET;				\
+		if (!in_interrupt() && softirq_pending(smp_processor_id()))	\
+			do_softirq();						\
+		preempt_enable_no_resched();					\
+} while (0)
 
-#include <asm/atomic.h>
-#include <linux/spinlock.h>
-#include <asm/system.h>
-#include <asm/smp.h>
-
-extern unsigned char global_irq_holder;
-extern spinlock_t global_irq_lock;
-extern atomic_t global_irq_count;
-
-static inline void release_irqlock(int cpu)
-{
-	/* if we didn't own the irq lock, just ignore.. */
-	if (global_irq_holder == (unsigned char) cpu) {
-		global_irq_holder = NO_PROC_ID;
-		spin_unlock(&global_irq_lock);
-	}
-}
-
-static inline void irq_enter(int cpu)
-{
-	++local_irq_count(cpu);
-	atomic_inc(&global_irq_count);
-}
-
-static inline void irq_exit(int cpu)
-{
-	atomic_dec(&global_irq_count);
-	--local_irq_count(cpu);
-}
-
-static inline int hardirq_trylock(int cpu)
-{
-	return (! atomic_read(&global_irq_count) &&
-		! spin_is_locked (&global_irq_lock));
-}
-
-#define hardirq_endlock(cpu)	do { } while (0)
-
-extern void synchronize_irq(void);
-
+#ifdef CONFIG_SMP
+  extern void synchronize_irq (unsigned int irq);
+#else
+# define synchronize_irq(irq)	barrier()
 #endif /* CONFIG_SMP */
 
-#endif /* __PARISC_HARDIRQ_H */
+#endif /* _PARISC_HARDIRQ_H */
diff -Nru a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h
--- a/include/asm-parisc/hardware.h	Wed Oct 30 16:44:31 2002
+++ b/include/asm-parisc/hardware.h	Wed Oct 30 16:44:31 2002
@@ -1,35 +1,51 @@
-#ifndef _PARISC_HP_MACHINES_H_ 
-#define _PARISC_HP_MACHINES_H_ 
+#ifndef _PARISC_HARDWARE_H
+#define _PARISC_HARDWARE_H
 
-struct hp_hardware {
-	unsigned short hw_type:5;		/* HPHW_xxx */
-	unsigned short hversion;
-	unsigned long  sversion:28;
-	unsigned short opt;
-	char *name; 
+#include <asm/pdc.h>
+
+struct parisc_device_id {
+	unsigned char	hw_type;	/* 5 bits used */
+	unsigned char	hversion_rev;	/* 4 bits */
+	unsigned short	hversion;	/* 12 bits */
+	unsigned int	sversion;	/* 20 bits */
 };
 
-struct hp_device {
-	unsigned short hw_type:5;	/* HPHW_xxx */
-	unsigned short hversion;	/* HP-UX uses  hv_model:12 */
-	unsigned int   sversion;	/* HP-UX uses sv_model:20 sv_opt:8 */
-	unsigned short opt;
-	unsigned int hversion_rev;
-	unsigned int sversion_rev;
-	struct hp_hardware * reference;  /* This is a pointer to the
-                                            reference */
-	unsigned int managed; /* this is if the device has a driver for it */
-	void * hpa;
+#define HWTYPE_ANY_ID	0xff
+#define HVERSION_REV_ANY_ID	0xff
+#define HVERSION_ANY_ID	0xffff
+#define SVERSION_ANY_ID	0xffffffffU
+
+struct hp_hardware {
+	unsigned short	hw_type:5;	/* HPHW_xxx */
+	unsigned short	hversion;
+	unsigned long	sversion:28;
+	unsigned short	opt;
+	const char	name[80];	/* The hardware description */
+};
 
+struct parisc_device {
+	unsigned long   hpa;		/* Hard Physical Address */
+	struct parisc_device_id id;
+	struct parisc_device *parent;
+	struct parisc_device *sibling;
+	struct parisc_device *child;
+	struct parisc_driver *driver;	/* Driver for this device */
+	void		*sysdata;	/* Driver instance private data */
+	char		name[80];	/* The hardware description */
+	int		irq;
+
+	char		hw_path;        /* The module number on this bus */
+	unsigned int	num_addrs;	/* some devices have additional address ranges. */
+	unsigned long	*addr;          /* which will be stored here */
+ 
 #ifdef __LP64__
 	/* parms for pdc_pat_cell_module() call */
-	unsigned long  pcell_loc;	/* Physical Cell location */
-	unsigned long  mod_index;	/* PAT specific - Misc Module info */
+	unsigned long	pcell_loc;	/* Physical Cell location */
+	unsigned long	mod_index;	/* PAT specific - Misc Module info */
 
 	/* generic info returned from pdc_pat_cell_module() */
-	unsigned long  mod_info;	/* PAT specific - Misc Module info */
-	unsigned long  pmod_loc;	/* physical Module location */
-	unsigned long  mod_path;	/* Module HW path */
+	unsigned long	mod_info;	/* PAT specific - Misc Module info */
+	unsigned long	pmod_loc;	/* physical Module location */
 #endif
 };
 
@@ -43,33 +59,56 @@
 	pcxu	= 6, /* pa8000		pa 2.0  */
 	pcxu_	= 7, /* pa8200	(u+)	pa 2.0  */
 	pcxw	= 8, /* pa8500		pa 2.0  */
-	pcxw_	= 9  /* pa8600	(w+)	pa 2.0  */
+	pcxw_	= 9, /* pa8600	(w+)	pa 2.0  */
+	pcxw2	= 10 /* pa8700		pa 2.0  */
 };
 
 extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
 
-struct pa_iodc_driver {
-	unsigned short hw_type:5;		/* HPHW_xxx */
-	unsigned short hversion;
-	unsigned short hversion_rev;
-	unsigned long  sversion:28;
-	unsigned short sversion_rev;
-	unsigned short opt;
-	unsigned int check;  /* Components that are significant */
+struct parisc_driver {
+	struct parisc_driver *next;
 	char *name; 
-	char *version; 
-	int (* callback)(struct hp_device *d, struct pa_iodc_driver *dri);
+	const struct parisc_device_id *id_table;
+	int (*probe) (struct parisc_device *dev); /* New device discovered */
 };
 
-#define DRIVER_CHECK_HWTYPE          1
-#define DRIVER_CHECK_HVERSION        2
-#define DRIVER_CHECK_SVERSION        4
-#define DRIVER_CHECK_OPT             8
-/* The following two are useless right now */
-#define DRIVER_CHECK_HVERSION_REV   16
-#define DRIVER_CHECK_SVERSION_REV   32
-#define DRIVER_CHECK_EVERYTHING     63
+struct io_module {
+        volatile uint32_t nothing;		/* reg 0 */
+        volatile uint32_t io_eim;
+        volatile uint32_t io_dc_adata;
+        volatile uint32_t io_ii_cdata;
+        volatile uint32_t io_dma_link;		/* reg 4 */
+        volatile uint32_t io_dma_command;
+        volatile uint32_t io_dma_address;
+        volatile uint32_t io_dma_count;
+        volatile uint32_t io_flex;		/* reg 8 */
+        volatile uint32_t io_spa_address;
+        volatile uint32_t reserved1[2];
+        volatile uint32_t io_command;		/* reg 12 */
+        volatile uint32_t io_status;
+        volatile uint32_t io_control;
+        volatile uint32_t io_data;
+        volatile uint32_t reserved2;		/* reg 16 */
+        volatile uint32_t chain_addr;
+        volatile uint32_t sub_mask_clr;
+        volatile uint32_t reserved3[13];
+        volatile uint32_t undefined[480];
+        volatile uint32_t unpriv[512];
+};
 
+struct bc_module {
+        volatile uint32_t unused1[12];
+        volatile uint32_t io_command;
+        volatile uint32_t io_status;
+        volatile uint32_t io_control;
+        volatile uint32_t unused2[1];
+        volatile uint32_t io_err_resp;
+        volatile uint32_t io_err_info;
+        volatile uint32_t io_err_req;
+        volatile uint32_t unused3[11];
+        volatile uint32_t io_io_low;
+        volatile uint32_t io_io_high;
+};
 
 #define HPHW_NPROC     0 
 #define HPHW_MEMORY    1       
@@ -88,16 +127,33 @@
 #define HPHW_FABRIC    14
 #define HPHW_FAULTY    31
 
-extern struct hp_hardware hp_hardware_list[];
-
-char *parisc_getHWtype(	unsigned short hw_type );
 
-/* Attention: first hversion, then sversion...! */
-char *parisc_getHWdescription(	unsigned short hw_type,
-                                unsigned long hversion,  /* have to be long ! */
-				unsigned long sversion );
+/* hardware.c: */
+extern const char *parisc_hardware_description(struct parisc_device_id *id);
+extern enum cpu_type parisc_get_cpu_type(unsigned long hversion);
+
+struct pci_dev;
+
+/* drivers.c: */
+extern struct parisc_device *alloc_pa_dev(unsigned long hpa,
+		struct hardware_path *path);
+extern int register_parisc_device(struct parisc_device *dev);
+extern int register_parisc_driver(struct parisc_driver *driver);
+extern int count_parisc_driver(struct parisc_driver *driver);
+extern int unregister_parisc_driver(struct parisc_driver *driver);
+extern void walk_central_bus(void);
+extern void fixup_child_irqs(struct parisc_device *parent, int irqbase,
+		int (*choose)(struct parisc_device *parent));
+extern void print_subdevices(struct parisc_device *dev);
+extern const struct parisc_device *find_pa_parent_type(const struct parisc_device *, int);
+extern void print_parisc_devices(void);
+extern char *print_pa_hwpath(struct parisc_device *dev, char *path);
+extern char *print_pci_hwpath(struct pci_dev *dev, char *path);
+extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path);
+
+
+/* inventory.c: */
+extern void do_memory_inventory(void);
+extern void do_device_inventory(void);
 
-enum cpu_type parisc_get_cpu_type( unsigned long hversion );
-
-extern int register_driver(struct pa_iodc_driver *driver);
-#endif
+#endif /* _PARISC_HARDWARE_H */
diff -Nru a/include/asm-parisc/hil.h b/include/asm-parisc/hil.h
--- a/include/asm-parisc/hil.h	Wed Oct 30 16:44:31 2002
+++ b/include/asm-parisc/hil.h	Wed Oct 30 16:44:31 2002
@@ -7,7 +7,7 @@
  *	(c) 1999 Matthew Wilcox
  */
 
-extern unsigned long hil_base;	/* declared in drivers/gsc/hil.c */
+extern unsigned long hil_base;	/* declared in drivers/parisc/hil.c */
 extern unsigned int hil_irq;
 
 #define HILBASE			hil_base /* 0xf0821000 (old) or 0xf0201000 (new) */
diff -Nru a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h
--- a/include/asm-parisc/ide.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-parisc/ide.h	Wed Oct 30 16:44:27 2002
@@ -5,29 +5,29 @@
  */
 
 /*
- *  This file contains the i386 architecture specific IDE code.
+ *  This file contains the PARISC architecture specific IDE code.
  */
 
-#ifndef __ASMi386_IDE_H
-#define __ASMi386_IDE_H
+#ifndef __ASM_PARISC_IDE_H
+#define __ASM_PARISC_IDE_H
 
 #ifdef __KERNEL__
 
 #include <linux/config.h>
+#include <asm/superio.h>
 
 #ifndef MAX_HWIFS
-#define MAX_HWIFS	10
+#define MAX_HWIFS	2
 #endif
 
 static __inline__ int ide_default_irq(ide_ioreg_t base)
 {
 	switch (base) {
-		case 0x1f0: return 14;
-		case 0x170: return 15;
-		case 0x1e8: return 11;
-		case 0x168: return 10;
-		case 0x1e0: return 8;
-		case 0x160: return 12;
+#ifdef CONFIG_SUPERIO
+		case 0x1f0: 
+		case 0x170:
+			return superio_get_ide_irq();
+#endif /* CONFIG_SUPERIO */
 		default:
 			return 0;
 	}
@@ -36,12 +36,10 @@
 static __inline__ ide_ioreg_t ide_default_io_base(int index)
 {
 	switch (index) {
-		case 0:	return 0x1f0;
-		case 1:	return 0x170;
-		case 2: return 0x1e8;
-		case 3: return 0x168;
-		case 4: return 0x1e0;
-		case 5: return 0x160;
+#ifdef CONFIG_SUPERIO 
+		case 0:	return (superio_get_ide_irq() ? 0x1f0 : 0);
+		case 1:	return (superio_get_ide_irq() ? 0x170 : 0);
+#endif /* CONFIG_SUPERIO */
 		default:
 			return 0;
 	}
@@ -63,6 +61,7 @@
 	}
 	if (irq != NULL)
 		*irq = 0;
+	hw->io_ports[IDE_IRQ_OFFSET] = 0;
 }
 
 static __inline__ void ide_init_default_hwifs(void)
@@ -79,6 +78,19 @@
 #endif
 }
 
+#define ide_request_irq(irq,hand,flg,dev,id)	request_irq((irq),(hand),(flg),(dev),(id))
+#define ide_free_irq(irq,dev_id)		free_irq((irq), (dev_id))
+#define ide_check_region(from,extent)		check_region((from), (extent))
+#define ide_request_region(from,extent,name)	request_region((from), (extent), (name))
+#define ide_release_region(from,extent)		release_region((from), (extent))
+
+/*
+ * The following are not needed for the non-m68k ports
+ */
+#define ide_ack_intr(hwif)		(1)
+#define ide_release_lock(lock)		do {} while (0)
+#define ide_get_lock(lock, hdlr, data)	do {} while (0)
+
 #endif /* __KERNEL__ */
 
-#endif /* __ASMi386_IDE_H */
+#endif /* __ASM_PARISC_IDE_H */
diff -Nru a/include/asm-parisc/io.h b/include/asm-parisc/io.h
--- a/include/asm-parisc/io.h	Wed Oct 30 16:44:23 2002
+++ b/include/asm-parisc/io.h	Wed Oct 30 16:44:23 2002
@@ -1,15 +1,200 @@
 #ifndef _ASM_IO_H
 #define _ASM_IO_H
 
+/* USE_HPPA_IOREMAP IS THE MAGIC FLAG TO ENABLE OR DISABLE REAL IOREMAP() FUNCTIONALITY */
+/* FOR 712 or 715 MACHINES THIS SHOULD BE ENABLED, 
+   NEWER MACHINES STILL HAVE SOME ISSUES IN THE SCSI AND/OR NETWORK DRIVERS AND 
+   BECAUSE OF THAT I WILL LEAVE IT DISABLED FOR NOW <deller@gmx.de> */
+/* WHEN THOSE ISSUES ARE SOLVED, USE_HPPA_IOREMAP WILL GO AWAY */
+#define USE_HPPA_IOREMAP 0
+
+
 #include <linux/config.h>
 #include <linux/types.h>
-#include <asm/gsc.h>
+#include <asm/pgtable.h>
 
 #define virt_to_phys(a) ((unsigned long)__pa(a))
 #define phys_to_virt(a) __va(a)
 #define virt_to_bus virt_to_phys
 #define bus_to_virt phys_to_virt
 
+/*
+ * Change "struct page" to physical address.
+ */
+#define page_to_phys(page)	((page - mem_map) << PAGE_SHIFT)
+
+/* Memory mapped IO */
+
+extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
+
+extern inline void * ioremap(unsigned long offset, unsigned long size)
+{
+	return __ioremap(offset, size, 0);
+}
+
+/*
+ * This one maps high address device memory and turns off caching for that area.
+ * it's useful if some control registers are in such an area and write combining
+ * or read caching is not desirable:
+ */
+extern inline void * ioremap_nocache (unsigned long offset, unsigned long size)
+{
+        return __ioremap(offset, size, _PAGE_NO_CACHE /* _PAGE_PCD */);
+}
+
+extern void iounmap(void *addr);
+
+/*
+ * __raw_ variants have no defined meaning.  on hppa, it means `i was
+ * too lazy to ioremap first'.  kind of like isa_, except that there's
+ * no additional base address to add on.
+ */
+extern __inline__ unsigned char __raw_readb(unsigned long addr)
+{
+	long flags;
+	unsigned char ret;
+
+	__asm__ __volatile__(
+	"	rsm	2,%0\n"
+	"	ldbx	0(%2),%1\n"
+	"	mtsm	%0\n"
+	: "=&r" (flags), "=r" (ret) : "r" (addr) );
+
+	return ret;
+}
+
+extern __inline__ unsigned short __raw_readw(unsigned long addr)
+{
+	long flags;
+	unsigned short ret;
+
+	__asm__ __volatile__(
+	"	rsm	2,%0\n"
+	"	ldhx	0(%2),%1\n"
+	"	mtsm	%0\n"
+	: "=&r" (flags), "=r" (ret) : "r" (addr) );
+
+	return ret;
+}
+
+extern __inline__ unsigned int __raw_readl(unsigned long addr)
+{
+	u32 ret;
+
+	__asm__ __volatile__(
+	"	ldwax	0(%1),%0\n"
+	: "=r" (ret) : "r" (addr) );
+
+	return ret;
+}
+
+extern __inline__ unsigned long long __raw_readq(unsigned long addr)
+{
+	unsigned long long ret;
+#ifdef __LP64__
+	__asm__ __volatile__(
+	"	ldda	0(%1),%0\n"
+	:  "=r" (ret) : "r" (addr) );
+#else
+	/* two reads may have side effects.. */
+	ret = ((u64) __raw_readl(addr)) << 32;
+	ret |= __raw_readl(addr+4);
+#endif
+	return ret;
+}
+
+extern __inline__ void __raw_writeb(unsigned char val, unsigned long addr)
+{
+	long flags;
+	__asm__ __volatile__(
+	"	rsm	2,%0\n"
+	"	stbs	%1,0(%2)\n"
+	"	mtsm	%0\n"
+	: "=&r" (flags) :  "r" (val), "r" (addr) );
+}
+
+extern __inline__ void __raw_writew(unsigned short val, unsigned long addr)
+{
+	long flags;
+	__asm__ __volatile__(
+	"	rsm	2,%0\n"
+	"	sths	%1,0(%2)\n"
+	"	mtsm	%0\n"
+	: "=&r" (flags) :  "r" (val), "r" (addr) );
+}
+
+extern __inline__ void __raw_writel(unsigned int val, unsigned long addr)
+{
+	__asm__ __volatile__(
+	"	stwas	%0,0(%1)\n"
+	: :  "r" (val), "r" (addr) );
+}
+
+extern __inline__ void __raw_writeq(unsigned long long val, unsigned long addr)
+{
+#ifdef __LP64__
+	__asm__ __volatile__(
+	"	stda	%0,0(%1)\n"
+	: :  "r" (val), "r" (addr) );
+#else
+	/* two writes may have side effects.. */
+	__raw_writel(val >> 32, addr);
+	__raw_writel(val, addr+4);
+#endif
+}
+
+#if USE_HPPA_IOREMAP
+#define readb(addr) (*(volatile unsigned char *) (addr))
+#define readw(addr) (*(volatile unsigned short *) (addr))
+#define readl(addr) (*(volatile unsigned int *) (addr))
+#define readq(addr) (*(volatile u64 *) (addr))
+#define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b))
+#define writew(b,addr) (*(volatile unsigned short *) (addr) = (b))
+#define writel(b,addr) (*(volatile unsigned int *) (addr) = (b))
+#define writeq(b,addr) (*(volatile u64 *) (addr) = (b))
+#else /* !USE_HPPA_IOREMAP */
+#define readb(addr) __raw_readb((unsigned long)(addr))
+#define readw(addr) le16_to_cpu(__raw_readw((unsigned long)(addr)))
+#define readl(addr) le32_to_cpu(__raw_readl((unsigned long)(addr)))
+#define readq(addr) le64_to_cpu(__raw_readq((unsigned long)(addr)))
+#define writeb(b,addr) __raw_writeb(b,(unsigned long)(addr))
+#define writew(b,addr) __raw_writew(cpu_to_le16(b),(unsigned long)(addr))
+#define writel(b,addr) __raw_writel(cpu_to_le32(b),(unsigned long)(addr))
+#define writeq(b,addr) __raw_writeq(cpu_to_le64(b),(unsigned long)(addr))
+#endif /* !USE_HPPA_IOREMAP */
+
+extern void memcpy_fromio(void *dest, unsigned long src, int count);
+extern void memcpy_toio(unsigned long dest, const void *src, int count);
+extern void memset_io(unsigned long dest, char fill, int count);
+
+/* Support old drivers which don't ioremap.
+ * NB this interface is scheduled to disappear in 2.5
+ */
+
+#define EISA_BASE 0xfffffffffc000000UL
+#define isa_readb(a) readb(EISA_BASE | (a))
+#define isa_readw(a) readw(EISA_BASE | (a))
+#define isa_readl(a) readl(EISA_BASE | (a))
+#define isa_writeb(b,a) writeb((b), EISA_BASE | (a))
+#define isa_writew(b,a) writew((b), EISA_BASE | (a))
+#define isa_writel(b,a) writel((b), EISA_BASE | (a))
+#define isa_memset_io(a,b,c) memset_io(EISA_BASE | (a), (b), (c))
+#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), EISA_BASE | (b), (c))
+#define isa_memcpy_toio(a,b,c) memcpy_toio(EISA_BASE | (a), (b), (c))
+
+/*
+ * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and 
+ * just copy it. The net code will then do the checksum later. Presently 
+ * only used by some shared memory 8390 Ethernet cards anyway.
+ */
+
+#define eth_io_copy_and_sum(skb,src,len,unused) \
+  memcpy_fromio((skb)->data,(src),(len))
+#define isa_eth_io_copy_and_sum(skb,src,len,unused) \
+  isa_memcpy_fromio((skb)->data,(src),(len))
+
+/* Port-space IO */
+
 #define inb_p inb
 #define inw_p inw
 #define inl_p inl
@@ -17,42 +202,66 @@
 #define outw_p outw
 #define outl_p outl
 
-#define readb gsc_readb
-#define readw gsc_readw
-#define readl gsc_readl
-#define writeb gsc_writeb
-#define writew gsc_writew
-#define writel gsc_writel
-
-
-#if defined(CONFIG_PCI) || defined(CONFIG_ISA)
-/*
- *	So we get clear link errors 
- */
-extern u8 inb(unsigned long addr);
-extern u16 inw(unsigned long addr);
-extern u32 inl(unsigned long addr);
+extern unsigned char eisa_in8(unsigned short port);
+extern unsigned short eisa_in16(unsigned short port);
+extern unsigned int eisa_in32(unsigned short port);
+extern void eisa_out8(unsigned char data, unsigned short port);
+extern void eisa_out16(unsigned short data, unsigned short port);
+extern void eisa_out32(unsigned int data, unsigned short port);
+
+#if defined(CONFIG_PCI)
+extern unsigned char inb(int addr);
+extern unsigned short inw(int addr);
+extern unsigned int inl(int addr);
+
+extern void outb(unsigned char b, int addr);
+extern void outw(unsigned short b, int addr);
+extern void outl(unsigned int b, int addr);
+#elif defined(CONFIG_EISA)
+#define inb eisa_in8
+#define inw eisa_in16
+#define inl eisa_in32
+#define outb eisa_out8
+#define outw eisa_out16
+#define outl eisa_out32
+#else
+static inline char inb(unsigned long addr)
+{
+	BUG();
+	return -1;
+}
 
-extern void outb(unsigned char b, unsigned long addr);
-extern void outw(unsigned short b, unsigned long addr);
-extern void outl(u32 b, unsigned long addr);
+static inline short inw(unsigned long addr)
+{
+	BUG();
+	return -1;
+}
 
-static inline void memcpy_toio(void *dest, void *src, int count) 
+static inline int inl(unsigned long addr)
 {
-	while(count--)
-		writeb(*((char *)src)++, (char *)dest++);
+	BUG();
+	return -1;
 }
 
+#define outb(x, y)	BUG()
+#define outw(x, y)	BUG()
+#define outl(x, y)	BUG()
 #endif
 
+/*
+ * String versions of in/out ops:
+ */
+extern void insb (unsigned long port, void *dst, unsigned long count);
+extern void insw (unsigned long port, void *dst, unsigned long count);
+extern void insl (unsigned long port, void *dst, unsigned long count);
+extern void outsb (unsigned long port, const void *src, unsigned long count);
+extern void outsw (unsigned long port, const void *src, unsigned long count);
+extern void outsl (unsigned long port, const void *src, unsigned long count);
+
+
 /* IO Port space is :      BBiiii   where BB is HBA number. */
 #define IO_SPACE_LIMIT 0x00ffffff
 
-/* Right now we don't support Dino-on-a-card and V class which do PCI MMIO
- * through address/data registers. */
-
-#define ioremap(__offset, __size)	((void *)(__offset))
-#define iounmap(__addr)
 
 #define dma_cache_inv(_start,_size)		do { flush_kernel_dcache_range(_start,_size); } while(0)
 #define dma_cache_wback(_start,_size)		do { flush_kernel_dcache_range(_start,_size); } while (0)
diff -Nru a/include/asm-parisc/ioctls.h b/include/asm-parisc/ioctls.h
--- a/include/asm-parisc/ioctls.h	Wed Oct 30 16:44:22 2002
+++ b/include/asm-parisc/ioctls.h	Wed Oct 30 16:44:22 2002
@@ -69,6 +69,10 @@
 #define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
 #define FIOQSIZE	0x5460	/* Get exact space used by quota */
 
+#define TIOCSTART	0x5461
+#define TIOCSTOP	0x5462
+#define TIOCSLTC	0x5462
+
 /* Used for packet mode */
 #define TIOCPKT_DATA		 0
 #define TIOCPKT_FLUSHREAD	 1
diff -Nru a/include/asm-parisc/iosapic.h b/include/asm-parisc/iosapic.h
--- a/include/asm-parisc/iosapic.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-parisc/iosapic.h	Wed Oct 30 16:44:27 2002
@@ -15,7 +15,7 @@
 ** fixup_irq is to initialize PCI IRQ line support and
 ** virtualize pcidev->irq value. To be called by pci_fixup_bus().
 */
-extern void *iosapic_register(void *hpa);
+extern void *iosapic_register(unsigned long hpa);
 extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);
 
 
diff -Nru a/include/asm-parisc/ipcbuf.h b/include/asm-parisc/ipcbuf.h
--- a/include/asm-parisc/ipcbuf.h	Wed Oct 30 16:44:32 2002
+++ b/include/asm-parisc/ipcbuf.h	Wed Oct 30 16:44:32 2002
@@ -2,10 +2,26 @@
 #define __PARISC_IPCBUF_H__
 
 /*
- * The ipc64_perm structure for PA-RISC is identical to kern_ipc_perm
- * as we have always had 32-bit UIDs and GIDs in the kernel.
+ * The ipc64_perm structure for PA-RISC is almost identical to
+ * kern_ipc_perm as we have always had 32-bit UIDs and GIDs in the kernel.
+ * 'seq' has been changed from long to int so that it's the same size
+ * on 64-bit kernels as on 32-bit ones.
  */
 
-#define ipc64_perm	kern_ipc_perm
+struct ipc64_perm
+{
+	key_t           key;
+	uid_t           uid;
+	gid_t           gid;
+	uid_t           cuid;
+	gid_t           cgid;
+	unsigned short int	__pad1;
+	mode_t          mode;
+	unsigned short int	__pad2;
+	unsigned short int	seq;
+	unsigned int	__pad3;
+	unsigned long long int __unused1;
+	unsigned long long int __unused2;
+};
 
 #endif /* __PARISC_IPCBUF_H__ */
diff -Nru a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h
--- a/include/asm-parisc/irq.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-parisc/irq.h	Wed Oct 30 16:44:27 2002
@@ -1,13 +1,5 @@
-#ifndef _ASM_IRQ_H
-#define _ASM_IRQ_H
-
-#include <linux/string.h>
-#include <asm/ptrace.h>
-#include <linux/interrupt.h>
-
-#include <asm/types.h>
 /*
- *	linux/include/asm/irq.h
+ *	linux/include/asm-parisc/irq.h
  *
  *	(C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar,
  *		Copyright 1999 SuSE GmbH
@@ -16,33 +8,39 @@
  *	<tomsoft@informatik.tu-chemnitz.de>
  */
 
-#define CPU_IRQ_REGION	 1
-#define TIMER_IRQ	 (IRQ_FROM_REGION(CPU_IRQ_REGION) | 0)
-#define	IPI_IRQ		 (IRQ_FROM_REGION(CPU_IRQ_REGION) | 1)
-
-/* This should be 31 for PA1.1 binaries and 63 for PA-2.0 wide mode) */
-#define MAX_CPU_IRQ	(BITS_PER_LONG - 1)
-
-#if 1    /* set to 1 to get the new irq offsets, or ...   */
-# if BITS_PER_LONG == 32
-#  define IRQ_REGION_SHIFT 5
-# else
-#  define IRQ_REGION_SHIFT 6
-# endif
-#else   /* 256 irq-entries per region (wastes memory, maybe gains speed? :-))*/
-# define IRQ_REGION_SHIFT 8
-#endif 
-
-#define IRQ_PER_REGION  (1 << IRQ_REGION_SHIFT)
-#define NR_IRQ_REGS	8
-#define NR_IRQS		(NR_IRQ_REGS * IRQ_PER_REGION)
+#ifndef _ASM_PARISC_IRQ_H
+#define _ASM_PARISC_IRQ_H
+
+#include <asm/ptrace.h>
+#include <asm/types.h>
+
+#include <linux/string.h>
+#include <linux/interrupt.h>
+
+
+#define CPU_IRQ_REGION		1
+#define TIMER_IRQ		(IRQ_FROM_REGION(CPU_IRQ_REGION) | 0)
+#define	IPI_IRQ			(IRQ_FROM_REGION(CPU_IRQ_REGION) | 1)
+
+/* This should be 31 for PA1.1 binaries and 63 for PA-2.0 wide mode */
+#define MAX_CPU_IRQ		(BITS_PER_LONG - 1)
+
+#if BITS_PER_LONG == 32
+#  define IRQ_REGION_SHIFT 	5
+#else
+#  define IRQ_REGION_SHIFT 	6
+#endif
+
+#define IRQ_PER_REGION		(1 << IRQ_REGION_SHIFT)
+#define NR_IRQ_REGS		16
+#define NR_IRQS			(NR_IRQ_REGS * IRQ_PER_REGION)
 
 #define IRQ_REGION(irq) 	((irq) >> IRQ_REGION_SHIFT)
 #define IRQ_OFFSET(irq)		((irq) & ((1<<IRQ_REGION_SHIFT)-1))
 #define	IRQ_FROM_REGION(reg)	((reg) << IRQ_REGION_SHIFT)
 
-#define IRQ_REG_DIS	   1	/* support disable_irq / enable_irq */
-#define IRQ_REG_MASK	   2	/* require IRQs to be masked */
+#define EISA_IRQ_REGION		0 /* region 0 needs to be reserved for EISA */
+#define EISA_MAX_IRQS		16 /* max. (E)ISA irq line */
 
 struct irq_region_ops {
 	void (*disable_irq)(void *dev, int irq);
@@ -54,8 +52,8 @@
 struct irq_region_data {
 	void *dev;
 	const char *name;
-	unsigned flags;
 	int irqbase;
+	unsigned int status[IRQ_PER_REGION]; /* IRQ status */
 };
 
 struct irq_region {
@@ -69,21 +67,31 @@
 
 static __inline__ int irq_cannonicalize(int irq)
 {
+#ifdef CONFIG_EISA
+	return (irq == (IRQ_FROM_REGION(EISA_IRQ_REGION)+2) 
+		? (IRQ_FROM_REGION(EISA_IRQ_REGION)+9) : irq);
+#else
 	return irq;
+#endif
 }
 
 extern void disable_irq(int);
+#define disable_irq_nosync(i) disable_irq(i)
 extern void enable_irq(int);
 
+extern void do_irq(struct irqaction *a, int i, struct pt_regs *p);
 extern void do_irq_mask(unsigned long mask, struct irq_region *region,
 	struct pt_regs *regs);
 
 extern struct irq_region *alloc_irq_region(int count, struct irq_region_ops *ops,
-	unsigned long flags, const char *name, void *dev);
+	const char *name, void *dev);
 
 extern int txn_alloc_irq(void);
 extern int txn_claim_irq(int);
 extern unsigned int txn_alloc_data(int, unsigned int);
 extern unsigned long txn_alloc_addr(int);
 
-#endif /* _ASM_IRQ_H */
+/* soft power switch support (power.c) */
+extern struct tasklet_struct power_tasklet;
+
+#endif	/* _ASM_PARISC_IRQ_H */
diff -Nru a/include/asm-parisc/keyboard.h b/include/asm-parisc/keyboard.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/keyboard.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,99 @@
+/*
+ *  WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ *  ---------------------------------------------------------------
+ *  This file will be removed as soon as we have converted
+ *  hp_psaux.c and hp_keyb.c to the input layer !
+ *  
+ */
+
+
+/*
+ *  linux/include/asm-parisc/keyboard.h
+ *
+ *  Original by Geert Uytterhoeven
+ *  updates by Alex deVries <adevries@thepuffingroup.com>
+ *  portions copyright (1999) The Puffin Group
+ *  mostly rewritten by Philipp Rumpf <prumpf@tux.org>,
+ *   Copyright 2000 Philipp Rumpf
+ */
+
+/*
+ *  We try to keep the amount of generic code as low as possible -
+ *  we want to support all HIL, PS/2, and untranslated USB keyboards
+ */
+
+#ifndef _PARISC_KEYBOARD_H
+#define _PARISC_KEYBOARD_H
+
+#include <linux/config.h>
+
+#ifdef __KERNEL__
+#ifdef CONFIG_VT
+
+#include <linux/kernel.h>
+#include <linux/kd.h>
+
+/*  These are basically the generic functions / variables.  The only
+ *  unexpected detail is the initialization sequence for the keyboard
+ *  driver is something like this:
+ *
+ *  detect keyboard port
+ *  detect keyboard
+ *  call register_kbd_ops 
+ *  wait for init_hw
+ *
+ *  only after init_hw has been called you're allowed to call
+ *  handle_scancode.  This means you either have to be extremely
+ *  careful or use a global flag or something - I strongly suggest
+ *  the latter.    prumpf */
+
+extern struct kbd_ops {
+	int (*setkeycode)(unsigned int, unsigned int);
+	int (*getkeycode)(unsigned int);
+	int (*translate)(unsigned char, unsigned char *, char);
+	char (*unexpected_up)(unsigned char);
+	void (*leds)(unsigned char);
+	void (*init_hw)(void);
+
+	/* Keyboard driver resource allocation  */
+	void (*kbd_request_region)(void);
+	int (*kbd_request_irq)(void (*handler)(int, void *, struct pt_regs *));
+
+	/* Methods to access the keyboard processor's I/O registers  */
+	unsigned char (*kbd_read_input)(void);
+	void (*kbd_write_output)(unsigned char val);
+	void (*kbd_write_command)(unsigned char val);
+	unsigned char (*kbd_read_status)(void);
+
+	unsigned char sysrq_key;
+	unsigned char *sysrq_xlate;
+} *kbd_ops;
+
+#define kbd_setkeycode		(*kbd_ops->setkeycode)
+#define kbd_getkeycode		(*kbd_ops->getkeycode)
+#define kbd_translate		(*kbd_ops->translate)
+#define kbd_unexpected_up	(*kbd_ops->unexpected_up)
+#define kbd_leds		(*kbd_ops->leds)
+#define kbd_init_hw		(*kbd_ops->init_hw)
+
+#define SYSRQ_KEY		(kbd_ops->sysrq_key)
+#define	kbd_sysrq_xlate		(kbd_ops->sysrq_xlate)
+
+/* Do the actual calls via kbd_ops vector  */
+#define kbd_request_region() 	kbd_ops->kbd_request_region()
+#define kbd_request_irq(handler) kbd_ops->kbd_request_irq(handler)
+#define kbd_read_input() 	kbd_ops->kbd_read_input()
+#define kbd_write_output(val) 	kbd_ops->kbd_write_output(val)
+#define kbd_write_command(val) 	kbd_ops->kbd_write_command(val)
+#define kbd_read_status() 	kbd_ops->kbd_read_status()
+
+extern unsigned char hp_ps2kbd_sysrq_xlate[128]; 	/* from drivers/char/hp_keyb.c */
+
+extern void unregister_kbd_ops(void);
+extern void register_kbd_ops(struct kbd_ops *ops);
+
+#endif /* CONFIG_VT */
+
+#endif /* __KERNEL__ */
+
+#endif /* __ASMPARISC_KEYBOARD_H */
diff -Nru a/include/asm-parisc/kmap_types.h b/include/asm-parisc/kmap_types.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/kmap_types.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,29 @@
+#ifndef _ASM_KMAP_TYPES_H
+#define _ASM_KMAP_TYPES_H
+
+#include <linux/config.h>
+
+#if CONFIG_DEBUG_HIGHMEM
+# define D(n) __KM_FENCE_##n ,
+#else
+# define D(n)
+#endif
+
+enum km_type {
+D(0)	KM_BOUNCE_READ,
+D(1)	KM_SKB_SUNRPC_DATA,
+D(2)	KM_SKB_DATA_SOFTIRQ,
+D(3)	KM_USER0,
+D(4)	KM_USER1,
+D(5)	KM_BIO_SRC_IRQ,
+D(6)	KM_BIO_DST_IRQ,
+D(7)	KM_PTE0,
+D(8)	KM_PTE1,
+D(9)	KM_IRQ0,
+D(10)	KM_IRQ1,
+D(11)	KM_TYPE_NR
+};
+
+#undef D
+
+#endif
diff -Nru a/include/asm-parisc/led.h b/include/asm-parisc/led.h
--- a/include/asm-parisc/led.h	Wed Oct 30 16:44:33 2002
+++ b/include/asm-parisc/led.h	Wed Oct 30 16:44:33 2002
@@ -1,7 +1,6 @@
 #ifndef LED_H
 #define LED_H
 
-
 #define	LED7		0x80		/* top (or furthest right) LED */
 #define	LED6		0x40
 #define	LED5		0x20
@@ -16,18 +15,27 @@
 #define	LED_DISK_IO	LED2		/* for disk activity */
 #define	LED_HEARTBEAT	LED3		/* heartbeat */
 
+/* values for pdc_chassis_lcd_info_ret_block.model: */
+#define DISPLAY_MODEL_LCD  0		/* KittyHawk LED or LCD */
+#define DISPLAY_MODEL_NONE 1		/* no LED or LCD */
+#define DISPLAY_MODEL_LASI 2		/* LASI style 8 bit LED */
+#define DISPLAY_MODEL_OLD_ASP 0x7F	/* faked: ASP style 8 x 1 bit LED (only very old ASP versions) */
+
+#define LED_CMD_REG_NONE NULL		/* NULL == no addr for the cmd register */
 
-/* irq function */
-extern void led_interrupt_func(void);
+/* led tasklet struct */
+extern struct tasklet_struct led_tasklet;
 
-/* LASI & ASP specific LED initialization funcs */
-extern void __init lasi_led_init( unsigned long lasi_hpa );
-extern void __init asp_led_init( unsigned long led_ptr );
+/* register_led_driver() */
+int __init register_led_driver( int model, char *cmd_reg, char *data_reg );
 
 /* registers the LED regions for procfs */
-extern void __init register_led_regions(void);
+void __init register_led_regions(void);
+
+/* writes a string to the LCD display (if possible on this h/w) */
+int lcd_print(char *str);
 
-/* main LED initialization function (uses the PDC) */ 
-extern int __init led_init(void);
+/* main LED initialization function (uses PDC) */ 
+int __init led_init(void);
 
 #endif /* LED_H */
diff -Nru a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
--- a/include/asm-parisc/mman.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-parisc/mman.h	Wed Oct 30 16:44:29 2002
@@ -4,6 +4,7 @@
 #define PROT_READ	0x1		/* page can be read */
 #define PROT_WRITE	0x2		/* page can be written */
 #define PROT_EXEC	0x4		/* page can be executed */
+#define PROT_SEM	0x8		/* page may be used for atomic ops */
 #define PROT_NONE	0x0		/* page can not be accessed */
 
 #define MAP_SHARED	0x01		/* Share changes */
diff -Nru a/include/asm-parisc/mmu.h b/include/asm-parisc/mmu.h
--- a/include/asm-parisc/mmu.h	Wed Oct 30 16:44:31 2002
+++ b/include/asm-parisc/mmu.h	Wed Oct 30 16:44:31 2002
@@ -1,68 +1,7 @@
-/*
- * parisc mmu structures 
- */
-
 #ifndef _PARISC_MMU_H_
 #define _PARISC_MMU_H_
 
-#ifndef __ASSEMBLY__
-
-/* Default "unsigned long" context */
+/* On parisc, we store the space id here */
 typedef unsigned long mm_context_t;
-
-/* Hardware Page Table Entry */
-typedef struct _PTE {
-	unsigned long v:1;	/* Entry is valid */
-	unsigned long tag:31;	/* Unique Tag */
-
-	unsigned long r:1;	/* referenced */
-	unsigned long os_1:1;	/*  */
-	unsigned long t:1;	/* page reference trap */
-	unsigned long d:1;	/* dirty */
-	unsigned long b:1;	/* break */
-	unsigned long type:3;	/* access type */
-	unsigned long pl1:2;	/* PL1 (execute) */
-	unsigned long pl2:2;	/* PL2 (write) */
-	unsigned long u:1;	/* uncacheable */
-	unsigned long id:1;	/* access id */
-	unsigned long os_2:1;	/*  */
-
-	unsigned long os_3:3;	/*  */
-	unsigned long res_1:4;	/*  */
-	unsigned long phys:20;	/* physical page number */
-	unsigned long os_4:2;	/*  */
-	unsigned long res_2:3;	/*  */
-
-	unsigned long next;	/* pointer to next page */
-} PTE; 
-
-/*
- * Simulated two-level MMU.  This structure is used by the kernel
- * to keep track of MMU mappings and is used to update/maintain
- * the hardware HASH table which is really a cache of mappings.
- *
- * The simulated structures mimic the hardware available on other
- * platforms, notably the 80x86 and 680x0.
- */
-
-typedef struct _pte {
-   	unsigned long page_num:20;
-   	unsigned long flags:12;		/* Page flags (some unused bits) */
-} pte;
-
-#define PD_SHIFT (10+12)		/* Page directory */
-#define PD_MASK  0x02FF
-#define PT_SHIFT (12)			/* Page Table */
-#define PT_MASK  0x02FF
-#define PG_SHIFT (12)			/* Page Entry */
-
-/* MMU context */
-
-typedef struct _MMU_context {
-	long	pid[4];
-	pte	**pmap;		/* Two-level page-map structure */
-} MMU_context;
-
-#endif /* __ASSEMBLY__ */
 
 #endif /* _PARISC_MMU_H_ */
diff -Nru a/include/asm-parisc/mmu_context.h b/include/asm-parisc/mmu_context.h
--- a/include/asm-parisc/mmu_context.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-parisc/mmu_context.h	Wed Oct 30 16:44:24 2002
@@ -1,6 +1,11 @@
 #ifndef __PARISC_MMU_CONTEXT_H
 #define __PARISC_MMU_CONTEXT_H
 
+#include <linux/mm.h>
+#include <asm/atomic.h>
+#include <asm/pgalloc.h>
+#include <asm/pgtable.h>
+
 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
 {
 }
@@ -14,17 +19,10 @@
 static inline int
 init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
-	/*
-	 * Init_new_context can be called for a cloned mm, so we
-	 * only allocate a space id if one hasn't been allocated
-	 * yet AND mm != &init_mm (cloned kernel thread which
-	 * will run in the kernel space with spaceid 0).
-	 */
-
-	if ((mm != &init_mm) && (mm->context == 0)) {
-		mm->context = alloc_sid();
-	}
+	if (atomic_read(&mm->mm_users) != 1)
+	    BUG();
 
+	mm->context = alloc_sid();
 	return 0;
 }
 
@@ -35,15 +33,22 @@
 	mm->context = 0;
 }
 
+static inline void load_context(mm_context_t context)
+{
+	mtsp(context, 3);
+#if SPACEID_SHIFT == 0
+	mtctl(context << 1,8);
+#else
+	mtctl(context >> (SPACEID_SHIFT - 1),8);
+#endif
+}
+
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
 {
 
 	if (prev != next) {
-		/* Re-load page tables */
-		tsk->thread.pg_tables = __pa(next->pgd);
-
-		mtctl(tsk->thread.pg_tables, 25);
-		mtsp(next->context,3);
+		mtctl(__pa(next->pgd), 25);
+		load_context(next->context);
 	}
 }
 
diff -Nru a/include/asm-parisc/mmzone.h b/include/asm-parisc/mmzone.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/mmzone.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,31 @@
+#ifndef _PARISC_MMZONE_H
+#define _PARISC_MMZONE_H
+
+struct node_map_data {
+    pg_data_t pg_data;
+    struct page *adj_node_mem_map;
+};
+
+extern struct node_map_data node_data[];
+extern unsigned char *chunkmap;
+
+#define BADCHUNK                ((unsigned char)0xff)
+#define CHUNKSZ                 (256*1024*1024)
+#define CHUNKSHIFT              28
+#define CHUNKMASK               (~(CHUNKSZ - 1))
+#define CHUNKNUM(paddr)         ((paddr) >> CHUNKSHIFT)
+
+#define NODE_DATA(nid)          (&node_data[nid].pg_data)
+#define NODE_MEM_MAP(nid)       (NODE_DATA(nid)->node_mem_map)
+#define ADJ_NODE_MEM_MAP(nid)   (node_data[nid].adj_node_mem_map)
+
+#define phys_to_page(paddr) \
+	(ADJ_NODE_MEM_MAP(chunkmap[CHUNKNUM((paddr))]) \
+	+ ((paddr) >> PAGE_SHIFT))
+
+#define virt_to_page(kvaddr) phys_to_page(__pa(kvaddr))
+
+/* This is kind of bogus, need to investigate performance of doing it right */
+#define VALID_PAGE(page)	((page - mem_map) < max_mapnr)
+
+#endif /* !_PARISC_MMZONE_H */
diff -Nru a/include/asm-parisc/module.h b/include/asm-parisc/module.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/module.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,12 @@
+#ifndef _ASM_PARISC_MODULE_H
+#define _ASM_PARISC_MODULE_H
+/*
+ * This file contains the parisc 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_PARISC_MODULE_H */
diff -Nru a/include/asm-parisc/msgbuf.h b/include/asm-parisc/msgbuf.h
--- a/include/asm-parisc/msgbuf.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-parisc/msgbuf.h	Wed Oct 30 16:44:30 2002
@@ -13,11 +13,17 @@
 
 struct msqid64_ds {
 	struct ipc64_perm msg_perm;
+#ifndef __LP64__
 	unsigned int   __pad1;
+#endif
 	__kernel_time_t msg_stime;	/* last msgsnd time */
+#ifndef __LP64__
 	unsigned int   __pad2;
+#endif
 	__kernel_time_t msg_rtime;	/* last msgrcv time */
+#ifndef __LP64__
 	unsigned int   __pad3;
+#endif
 	__kernel_time_t msg_ctime;	/* last change time */
 	unsigned int  msg_cbytes;	/* current number of bytes on queue */
 	unsigned int  msg_qnum;	/* number of messages in queue */
diff -Nru a/include/asm-parisc/page.h b/include/asm-parisc/page.h
--- a/include/asm-parisc/page.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-parisc/page.h	Wed Oct 30 16:44:24 2002
@@ -9,11 +9,31 @@
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
 
+#include <asm/cache.h>
+
 #define clear_page(page)	memset((void *)(page), 0, PAGE_SIZE)
-#define copy_page(to,from)	memcpy((void *)(to), (void *)(from), PAGE_SIZE)
+#define copy_page(to,from)      copy_user_page_asm((void *)(to), (void *)(from))
+
+struct page;
 
-#define clear_user_page(page, vaddr) clear_page(page)
-#define copy_user_page(to, from, vaddr) copy_page(to, from)
+extern void purge_kernel_dcache_page(unsigned long);
+extern void copy_user_page_asm(void *to, void *from);
+extern void clear_user_page_asm(void *page, unsigned long vaddr);
+
+static inline void
+copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg)
+{
+	copy_user_page_asm(vto, vfrom);
+	flush_kernel_dcache_page(vto);
+	/* XXX: ppc flushes icache too, should we? */
+}
+
+static inline void
+clear_user_page(void *page, unsigned long vaddr, struct page *pg)
+{
+	purge_kernel_dcache_page((unsigned long)page);
+	clear_user_page_asm(page, vaddr);
+}
 
 /*
  * These are used to make use of C type-checking..
@@ -47,6 +67,20 @@
 	return order;
 }
 
+#ifdef __LP64__
+#define MAX_PHYSMEM_RANGES 8 /* Fix the size for now (current known max is 3) */
+#else
+#define MAX_PHYSMEM_RANGES 1 /* First range is only range that fits in 32 bits */
+#endif
+
+typedef struct __physmem_range {
+	unsigned long start_pfn;
+	unsigned long pages;       /* PAGE_SIZE pages */
+} physmem_range_t;
+
+extern physmem_range_t pmem_ranges[];
+extern int npmem_ranges;
+
 #endif /* !__ASSEMBLY__ */
 
 /* to align the pointer to the (next) page boundary */
@@ -68,7 +102,7 @@
 
 
 #define LINUX_GATEWAY_SPACE     0
-#define __PAGE_OFFSET		(0xc0000000)
+#define __PAGE_OFFSET           (0x10000000)
 
 #define PAGE_OFFSET		((unsigned long)__PAGE_OFFSET)
 /* These macros don't work for 64-bit C code -- don't allow in C at all */
@@ -78,8 +112,16 @@
 #endif
 #define __pa(x)			((unsigned long)(x)-PAGE_OFFSET)
 #define __va(x)			((void *)((unsigned long)(x)+PAGE_OFFSET))
-#define	virt_to_page(kaddr)	(mem_map + (__pa(kaddr) >> PAGE_SHIFT))
+
+#define pfn_to_page(pfn)	(mem_map + (pfn))
+#define page_to_pfn(page)	((unsigned long)((page) - mem_map))
+#define pfn_valid(pfn)		((pfn) < max_mapnr)
+#define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+
+#ifndef CONFIG_DISCONTIGMEM
+#define virt_to_page(kaddr)     (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
 #define VALID_PAGE(page)	((page - mem_map) < max_mapnr)
+#endif  /* !CONFIG_DISCONTIGMEM */
 
 #define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
diff -Nru a/include/asm-parisc/param.h b/include/asm-parisc/param.h
--- a/include/asm-parisc/param.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-parisc/param.h	Wed Oct 30 16:44:28 2002
@@ -1,6 +1,16 @@
 #ifndef _ASMPARISC_PARAM_H
 #define _ASMPARISC_PARAM_H
 
+#ifdef __KERNEL__
+# ifdef CONFIG_PA20
+#  define HZ		1000		/* Faster machines */
+# else
+#  define HZ		100		/* Internal kernel timer frequency */
+# endif
+# define USER_HZ	100		/* .. some user interfaces are in "ticks" */
+# define CLOCKS_PER_SEC	(USER_HZ)	/* like times() */
+#endif
+
 #ifndef HZ
 #define HZ 100
 #endif
@@ -16,9 +26,5 @@
 #endif
 
 #define MAXHOSTNAMELEN	64	/* max length of hostname */
-
-#ifdef __KERNEL__
-# define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-#endif
 
 #endif
diff -Nru a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h
--- a/include/asm-parisc/pci.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-parisc/pci.h	Wed Oct 30 16:44:24 2002
@@ -3,9 +3,6 @@
 
 #include <asm/scatterlist.h>
 
-#define MIN_PCI_PORT 0x000000
-#define MAX_PCI_PORT 0xffffff
-
 /*
 ** HP PCI platforms generally support multiple bus adapters.
 **    (workstations 1-~4, servers 2-~32)
@@ -19,7 +16,7 @@
 #define PCI_MAX_BUSSES	256
 
 /* [soapbox on]
-** Who the hell can develope stuff without ASSERT or VASSERT?
+** Who the hell can develop stuff without ASSERT or VASSERT?
 ** No one understands all the modules across all platforms.
 ** For linux add another dimension - processor architectures.
 **
@@ -49,18 +46,40 @@
 ** Data needed by pcibios layer belongs here.
 */
 struct pci_hba_data {
-	struct pci_hba_data *next;	/* global chain of HBAs */
-	char           *base_addr;	/* aka Host Physical Address */
-	struct hp_device *iodc_info;	/* Info from PA bus walk */
+	unsigned long	base_addr;	/* aka Host Physical Address */
+	const struct parisc_device *dev; /* device from PA bus walk */
 	struct pci_bus *hba_bus;	/* primary PCI bus below HBA */
 	int		hba_num;	/* I/O port space access "key" */
 	struct resource bus_num;	/* PCI bus numbers */
 	struct resource io_space;	/* PIOP */
-	struct resource mem_space;	/* LMMIO */
-	unsigned long   mem_space_offset;  /* VCLASS support */
+	struct resource lmmio_space;	/* bus addresses < 4Gb */
+	struct resource elmmio_space;	/* additional bus addresses < 4Gb */
+	unsigned long   lmmio_space_offset;  /* CPU view - PCI view */
+	void *          iommu;          /* IOMMU this device is under */
 	/* REVISIT - spinlock to protect resources? */
 };
 
+#define HBA_DATA(d)		((struct pci_hba_data *) (d))
+
+/* 
+** We support 2^16 I/O ports per HBA.  These are set up in the form
+** 0xbbxxxx, where bb is the bus number and xxxx is the I/O port
+** space address.
+*/
+#define HBA_PORT_SPACE_BITS	16
+
+#define HBA_PORT_BASE(h)	((h) << HBA_PORT_SPACE_BITS)
+#define HBA_PORT_SPACE_SIZE	(1UL << HBA_PORT_SPACE_BITS)
+
+#define PCI_PORT_HBA(a)		((a) >> HBA_PORT_SPACE_BITS)
+#define PCI_PORT_ADDR(a)	((a) & (HBA_PORT_SPACE_SIZE - 1))
+
+/*
+** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses.
+** Note that we currently support only LMMIO.
+*/
+#define PCI_BUS_ADDR(hba,a)	((a) - hba->lmmio_space_offset)
+#define PCI_HOST_ADDR(hba,a)	((a) + hba->lmmio_space_offset)
 
 /*
 ** KLUGE: linux/pci.h include asm/pci.h BEFORE declaring struct pci_bus
@@ -69,6 +88,12 @@
 struct pci_bus;
 struct pci_dev;
 
+/* 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)
+
 /*
 ** Most PCI devices (eg Tulip, NCR720) also export the same registers
 ** to both MMIO and I/O port space.  Due to poor performance of I/O Port
@@ -106,9 +131,6 @@
 	void (*fixup_bus)(struct pci_bus *bus);
 };
 
-extern void pcibios_size_bridge(struct pci_bus *, struct pbus_set_ranges_data *);
-
-
 /*
 ** See Documentation/DMA-mapping.txt
 */
@@ -127,8 +149,8 @@
 
 /*
 ** We could live without the hppa_dma_ops indirection if we didn't want
-** to support 4 different dma models with one binary or they were
-** all loadable modules:
+** to support 4 different coherent dma models with one binary (they will
+** someday be loadable modules):
 **     I/O MMU        consistent method           dma_sync behavior
 **  =============   ======================       =======================
 **  a) PA-7x00LC    uncachable host memory          flush/purge
@@ -144,8 +166,11 @@
 */
 
 extern struct pci_dma_ops *hppa_dma_ops;
+
+#ifdef CONFIG_PA11
 extern struct pci_dma_ops pcxl_dma_ops;
 extern struct pci_dma_ops pcx_dma_ops;
+#endif
 
 /*
 ** Oops hard if we haven't setup hppa_dma_ops by the time the first driver
@@ -155,7 +180,9 @@
 */
 static inline int pci_dma_panic(char *msg)
 {
+	extern void panic(const char *, ...);	/* linux/kernel.h */
 	panic(msg);
+	/* NOTREACHED */
 	return -1;
 }
 
@@ -196,16 +223,32 @@
 	hppa_dma_ops->dma_sync_sg(p, sg, n, d); \
 	}
 
+/* No highmem on parisc, plus we have an IOMMU, so mapping pages is easy. */
+#define pci_map_page(dev, page, off, size, dir) \
+	pci_map_single(dev, (page_address(page) + (off)), size, dir)
+#define pci_unmap_page(dev,addr,sz,dir) pci_unmap_single(dev,addr,sz,dir)
+
+/* Don't support DAC yet. */
+#define pci_dac_dma_supported(pci_dev, mask)	(0)
+
 /*
 ** Stuff declared in arch/parisc/kernel/pci.c
 */
 extern struct pci_port_ops *pci_port;
 extern struct pci_bios_ops *pci_bios;
 extern int pci_post_reset_delay;	/* delay after de-asserting #RESET */
+extern int pci_hba_count;
+extern struct pci_hba_data *parisc_pci_hba[];
 
+#ifdef CONFIG_PCI
 extern void pcibios_register_hba(struct pci_hba_data *);
+extern void pcibios_set_master(struct pci_dev *);
 extern void pcibios_assign_unassigned_resources(struct pci_bus *);
-
+#else
+extern inline void pcibios_register_hba(struct pci_hba_data *x)
+{
+}
+#endif
 
 /*
 ** used by drivers/pci/pci.c:pci_do_scan_bus()
@@ -216,17 +259,40 @@
 **   To date, only alpha sets this to one. We'll need to set this
 **   to zero for legacy platforms and one for PAT platforms.
 */
-#ifdef __LP64__
-extern int pdc_pat;  /* arch/parisc/kernel/inventory.c */
-#define pcibios_assign_all_busses()	pdc_pat
-#else
-#define pcibios_assign_all_busses()	0
-#endif
+#define pcibios_assign_all_busses()     (pdc_type == PDC_TYPE_PAT)
 
 #define PCIBIOS_MIN_IO          0x10
 #define PCIBIOS_MIN_MEM         0x1000 /* NBPG - but pci/setup-res.c dies */
 
 /* Return the index of the PCI controller for device PDEV. */
 #define pci_controller_num(PDEV)	(0)
+
+#define GET_IOC(dev) ((struct ioc *)(HBA_DATA(dev->sysdata)->iommu))
+
+#ifdef CONFIG_IOMMU_CCIO
+struct parisc_device;
+struct ioc;
+void * ccio_get_iommu(const struct parisc_device *dev);
+struct pci_dev * ccio_get_fake(const struct parisc_device *dev);
+int ccio_request_resource(const struct parisc_device *dev,
+		struct resource *res);
+int ccio_allocate_resource(const struct parisc_device *dev,
+		struct resource *res, unsigned long size,
+		unsigned long min, unsigned long max, unsigned long align,
+		void (*alignf)(void *, struct resource *, unsigned long, unsigned long),
+		void *alignf_data);
+#else /* !CONFIG_IOMMU_CCIO */
+#define ccio_get_iommu(dev) NULL
+#define ccio_get_fake(dev) NULL
+#define ccio_request_resource(dev, res) request_resource(&iomem_resource, res)
+#define ccio_allocate_resource(dev, res, size, min, max, align, alignf, data) \
+		allocate_resource(&iomem_resource, res, size, min, max, \
+				align, alignf, data)
+#endif /* !CONFIG_IOMMU_CCIO */
+
+#ifdef CONFIG_IOMMU_SBA
+struct parisc_device;
+void * sba_get_iommu(struct parisc_device *dev);
+#endif
 
 #endif /* __ASM_PARISC_PCI_H */
diff -Nru a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h
--- a/include/asm-parisc/pdc.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-parisc/pdc.h	Wed Oct 30 16:44:17 2002
@@ -2,8 +2,27 @@
 #define _PARISC_PDC_H
 
 /*
-    PDC entry points...
-*/
+ *	PDC return values ...
+ *	All PDC calls return a subset of these errors. 
+ */
+
+#define PDC_WARN		  3	/* Call completed with a warning */
+#define PDC_REQ_ERR_1		  2	/* See above			 */
+#define PDC_REQ_ERR_0		  1	/* Call would generate a requestor error */
+#define PDC_OK			  0	/* Call completed successfully	*/
+#define PDC_BAD_PROC		 -1	/* Called non-existent procedure*/
+#define PDC_BAD_OPTION		 -2	/* Called with non-existent option */
+#define PDC_ERROR		 -3	/* Call could not complete without an error */
+#define PDC_NE_MOD		 -5	/* Module not found		*/
+#define PDC_NE_CELL_MOD		 -7	/* Cell module not found	*/
+#define PDC_INVALID_ARG		-10	/* Called with an invalid argument */
+#define PDC_BUS_POW_WARN	-12	/* Call could not complete in allowed power budget */
+#define PDC_NOT_NARROW		-17	/* Narrow mode not supported	*/
+
+
+/*
+ *	PDC entry points...
+ */
 
 #define PDC_POW_FAIL	1		/* perform a power-fail		*/
 #define PDC_POW_FAIL_PREPARE	0	/* prepare for powerfail	*/
@@ -12,7 +31,7 @@
 #define PDC_CHASSIS_DISP	0	/* update chassis display	*/
 #define PDC_CHASSIS_WARN	1	/* return chassis warnings	*/
 #define PDC_CHASSIS_DISPWARN	2	/* update&return chassis status */
-#define PDC_RETURN_CHASSIS_INFO 128	/* HVERSION dependend: return chassis LED/LCD info  */
+#define PDC_RETURN_CHASSIS_INFO 128	/* HVERSION dependent: return chassis LED/LCD info  */
 
 #define PDC_PIM         3               /* Get PIM data                 */
 #define PDC_PIM_HPMC            0       /* Transfer HPMC data           */
@@ -26,52 +45,74 @@
 #define PDC_MODEL_BOOTID	1	/* set the BOOT_ID		*/
 #define PDC_MODEL_VERSIONS	2	/* returns cpu-internal versions*/
 #define PDC_MODEL_SYSMODEL	3	/* return system model info	*/
-#define PDC_MODEL_ENSPEC	4	/* ??? */
-#define PDC_MODEL_DISPEC	5	/* ??? */
+#define PDC_MODEL_ENSPEC	4	/* enable specific option	*/
+#define PDC_MODEL_DISPEC	5	/* disable specific option	*/
 #define PDC_MODEL_CPU_ID	6	/* returns cpu-id (only newer machines!) */
 #define PDC_MODEL_CAPABILITIES	7	/* returns OS32/OS64-flags	*/
 #define PDC_MODEL_GET_BOOT__OP	8	/* returns boot test options	*/
 #define PDC_MODEL_SET_BOOT__OP	9	/* set boot test options	*/
 
+#define PA89_INSTRUCTION_SET	0x4	/* capatibilies returned	*/
+#define PA90_INSTRUCTION_SET	0x8
+
 #define PDC_CACHE	5		/* return/set cache (& TLB) info*/
 #define PDC_CACHE_INFO		0	/* returns information 		*/
 #define PDC_CACHE_SET_COH	1	/* set coherence state		*/
 #define PDC_CACHE_RET_SPID	2	/* returns space-ID bits	*/
 
-#define PDC_HPA	 6       	/* return HPA of processor */
-#define PDC_HPA_PROCESSOR       0
-#define PDC_HPA_MODULES	 1
-
-#define PDC_IODC	8       /* talk to IODC */
-#define PDC_IODC_READ	   0       /* read IODC entry point */
-/*      PDC_IODC_RI_*		      INDEX parameter of PDC_IODC_READ   */
-#define PDC_IODC_RI_DATA_BYTES	0	/* IODC Data Bytes		    */
-/*				1, 2	   obsolete - HVERSION dependent      */
-#define PDC_IODC_RI_INIT	3	/* Initialize module		  */
+#define PDC_HPA		6		/* return HPA of processor	*/
+#define PDC_HPA_PROCESSOR	0
+#define PDC_HPA_MODULES		1
+
+#define PDC_COPROC	7		/* Co-Processor (usually FP unit(s)) */
+#define PDC_COPROC_CFG		0	/* Co-Processor Cfg (FP unit(s) enabled?) */
+
+#define PDC_IODC	8		/* talk to IODC			*/
+#define PDC_IODC_READ		0	/* read IODC entry point	*/
+/*      PDC_IODC_RI_			 * INDEX parameter of PDC_IODC_READ */
+#define PDC_IODC_RI_DATA_BYTES	0	/* IODC Data Bytes		*/
+/*				1, 2	   obsolete - HVERSION dependent*/
+#define PDC_IODC_RI_INIT	3	/* Initialize module		*/
 #define PDC_IODC_RI_IO		4	/* Module input/output		*/
 #define PDC_IODC_RI_SPA		5	/* Module input/output		*/
 #define PDC_IODC_RI_CONFIG	6	/* Module input/output		*/
-/*				7	  obsolete - HVERSION dependent      */
+/*				7	  obsolete - HVERSION dependent */
 #define PDC_IODC_RI_TEST	8	/* Module input/output		*/
 #define PDC_IODC_RI_TLB		9	/* Module input/output		*/
-#define PDC_IODC_NINIT	  2       /* non-destructive init */
-#define PDC_IODC_DINIT	  3       /* destructive init */
-#define PDC_IODC_MEMERR	 4       /* check for memory errors */
-#define PDC_IODC_INDEX_DATA     0       /* get first 16 bytes from mod IODC */
-#define PDC_IODC_BUS_ERROR      -4      /* bus error return value */
-#define PDC_IODC_INVALID_INDEX  -5      /* invalid index return value */
-#define PDC_IODC_COUNT	  -6      /* count is too small */
-
-#define	PDC_TOD		9		/* time-of-day clock (TOD) */
-#define	PDC_TOD_READ		0	/* read TOD  */
-#define	PDC_TOD_WRITE		1	/* write TOD */
-#define	PDC_TOD_ITIMER		2	/* calibrate Interval Timer (CR16) */
+#define PDC_IODC_NINIT		2	/* non-destructive init		*/
+#define PDC_IODC_DINIT		3	/* destructive init		*/
+#define PDC_IODC_MEMERR		4	/* check for memory errors	*/
+#define PDC_IODC_INDEX_DATA	0	/* get first 16 bytes from mod IODC */
+#define PDC_IODC_BUS_ERROR	-4	/* bus error return value	*/
+#define PDC_IODC_INVALID_INDEX	-5	/* invalid index return value	*/
+#define PDC_IODC_COUNT		-6	/* count is too small		*/
+
+#define PDC_TOD		9		/* time-of-day clock (TOD)	*/
+#define PDC_TOD_READ		0	/* read TOD			*/
+#define PDC_TOD_WRITE		1	/* write TOD			*/
+#define PDC_TOD_ITIMER		2	/* calibrate Interval Timer (CR16) */
+
+#define PDC_STABLE	10		/* stable storage (sprockets)	*/
+#define PDC_STABLE_READ		0
+#define PDC_STABLE_WRITE	1
+#define PDC_STABLE_RETURN_SIZE	2
+#define PDC_STABLE_VERIFY_CONTENTS 3
+#define PDC_STABLE_INITIALIZE	4
 
-#define PDC_ADD_VALID	12    		/* Memory validation PDC call */
-#define PDC_ADD_VALID_VERIFY  0    	/* Make PDC_ADD_VALID verify region */
+#define PDC_NVOLATILE	11		/* often not implemented	*/
+
+#define PDC_ADD_VALID	12		/* Memory validation PDC call	*/
+#define PDC_ADD_VALID_VERIFY	0	/* Make PDC_ADD_VALID verify region */
 
 #define PDC_INSTR	15		/* get instr to invoke PDCE_CHECK() */
 
+#define PDC_PROC	16		/* (sprockets)			*/
+
+#define PDC_CONFIG	16		/* (sprockets)			*/
+#define PDC_CONFIG_DECONFIG	0
+#define PDC_CONFIG_DRECONFIG	1
+#define PDC_CONFIG_DRETURN_CONFIG 2
+
 #define PDC_BLOCK_TLB	18		/* manage hardware block-TLB	*/
 #define PDC_BTLB_INFO		0	/* returns parameter 		*/
 #define PDC_BTLB_INSERT		1	/* insert BTLB entry		*/
@@ -82,92 +123,373 @@
 #define PDC_TLB_INFO		0	/* returns parameter 		*/
 #define PDC_TLB_SETUP		1	/* set up miss handling 	*/
 
-#define PDC_SYSTEM_MAP	22		/* find system modules */
+#define PDC_MEM		20		/* Manage memory		*/
+#define PDC_MEM_MEMINFO		0
+#define PDC_MEM_ADD_PAGE	1
+#define PDC_MEM_CLEAR_PDT	2
+#define PDC_MEM_READ_PDT	3
+#define PDC_MEM_RESET_CLEAR	4
+#define PDC_MEM_GOODMEM		5
+#define PDC_MEM_TABLE		128	/* Non contig mem map (sprockets) */
+#define PDC_MEM_RETURN_ADDRESS_TABLE	PDC_MEM_TABLE
+#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE	131
+#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES	132
+#define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133
+
+#define PDC_MEM_RET_SBE_REPLACED	5	/* PDC_MEM return values */
+#define PDC_MEM_RET_DUPLICATE_ENTRY	4
+#define PDC_MEM_RET_BUF_SIZE_SMALL	1
+#define PDC_MEM_RET_PDT_FULL		-11
+#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL
+
+#ifndef __ASSEMBLY__
+typedef struct {
+    unsigned long long	baseAddr;
+    unsigned int	pages;
+    unsigned int	reserved;
+} MemAddrTable_t;
+#endif
+
+
+#define PDC_PSW		21		/* Get/Set default System Mask  */
+#define PDC_PSW_MASK		0	/* Return mask                  */
+#define PDC_PSW_GET_DEFAULTS	1	/* Return defaults              */
+#define PDC_PSW_SET_DEFAULTS	2	/* Set default                  */
+#define PDC_PSW_ENDIAN_BIT	1	/* set for big endian           */
+#define PDC_PSW_WIDE_BIT	2	/* set for wide mode            */ 
+
+#define PDC_SYSTEM_MAP	22		/* find system modules		*/
 #define PDC_FIND_MODULE 	0
+#define PDC_FIND_ADDRESS	1
+#define PDC_TRANSLATE_PATH	2
+
+#define PDC_SOFT_POWER	23		/* soft power switch		*/
+#define PDC_SOFT_POWER_INFO	0	/* return info about the soft power switch */
+#define PDC_SOFT_POWER_ENABLE	1	/* enable/disable soft power switch */
 
 
 /* HVERSION dependent */
 
-#define PDC_IO			135	/* log error info, reset IO system  */
+/* The PDC_MEM_MAP calls */
+#define PDC_MEM_MAP	128		/* on s700: return page info	*/
+#define PDC_MEM_MAP_HPA		0	/* returns hpa of a module	*/
 
-#define PDC_BROADCAST_RESET	136	/* reset all processors	     */
-#define PDC_DO_RESET            0UL	/* option: perform a broadcast reset */
-#define PDC_DO_FIRM_TEST_RESET  1UL	/* Do broadcast reset with bitmap */
-#define PDC_BR_RECONFIGURATION  2UL	/* reset w/reconfiguration */
-#define PDC_FIRM_TEST_MAGIC 	0xab9ec36fUL    /* for this reboot only */
+#define PDC_EEPROM	129		/* EEPROM access		*/
+#define PDC_EEPROM_READ_WORD	0
+#define PDC_EEPROM_WRITE_WORD	1
+#define PDC_EEPROM_READ_BYTE	2
+#define PDC_EEPROM_WRITE_BYTE	3
+#define PDC_EEPROM_EEPROM_PASSWORD -1000
+
+#define PDC_NVM		130		/* NVM (non-volatile memory) access */
+#define PDC_NVM_READ_WORD	0
+#define PDC_NVM_WRITE_WORD	1
+#define PDC_NVM_READ_BYTE	2
+#define PDC_NVM_WRITE_BYTE	3
+
+#define PDC_SEED_ERROR	132		/* (sprockets)			*/
+
+#define PDC_IO		135		/* log error info, reset IO system */
+#define PDC_IO_READ_AND_CLEAR_ERRORS	0
+#define PDC_IO_READ_AND_LOG_ERRORS	1
+#define PDC_IO_SUSPEND_USB		2
+/* sets bits 6&7 (little endian) of the HcControl Register */
+#define PDC_IO_USB_SUSPEND	0xC000000000000000
+#define PDC_IO_EEPROM_IO_ERR_TABLE_FULL	-5	/* return value */
+#define PDC_IO_NO_SUSPEND		-6	/* return value */
+
+#define PDC_BROADCAST_RESET 136		/* reset all processors		*/
+#define PDC_DO_RESET		0	/* option: perform a broadcast reset */
+#define PDC_DO_FIRM_TEST_RESET	1	/* Do broadcast reset with bitmap */
+#define PDC_BR_RECONFIGURATION	2	/* reset w/reconfiguration	*/
+#define PDC_FIRM_TEST_MAGIC	0xab9ec36fUL    /* for this reboot only	*/
 
-#define PDC_LAN_STATION_ID      138     /* Hversion dependent mechanism for */
-#define PDC_LAN_STATION_ID_READ 0       /* getting the lan station address  */
+#define PDC_LAN_STATION_ID 138		/* Hversion dependent mechanism for */
+#define PDC_LAN_STATION_ID_READ	0	/* getting the lan station address  */
 
 #define	PDC_LAN_STATION_ID_SIZE	6
 
-/* Legacy PDC definitions for same stuff */
-#define PDC_PCI_INDEX		   147UL
-#define PDC_PCI_GET_INT_TBL_SIZE	13UL
-#define PDC_PCI_GET_INT_TBL	     14UL
-
-/* generic error codes returned by all PDC-functions */
-
-#define PDC_WARN	    3  /* Call completed with a warning */
-#define PDC_REQ_ERR_1       2  /* See above */
-#define PDC_REQ_ERR_0       1  /* Call would generate a requestor error */
-#define PDC_OK	      0  /* Call completed successfully */
-#define PDC_BAD_PROC	   -1  /* Called non-existant procedure */
-#define PDC_BAD_OPTION     -2  /* Called with non-existant option */
-#define PDC_ERROR	  -3  /* Call could not complete without an error */
-#define PDC_INVALID_ARG   -10  /* Called with an invalid argument */
-#define PDC_BUS_POW_WARN  -12  /* Call could not complete in allowed power budget */
-
-
-/* The following are from the HPUX .h files, and are just for
-compatibility */
-
-#define PDC_RET_OK       0L	/* Call completed successfully */
-#define PDC_RET_NE_PROC -1L	/* Non-existent procedure */
-#define PDC_RET_NE_OPT  -2L	/* non-existant option - arg1 */
-#define PDC_RET_NE_MOD  -5L	/* Module not found */
-#define PDC_RET_NE_CELL_MOD -7L	/* Cell module not found */
-#define PDC_RET_INV_ARG	-10L	/* Invalid argument */
-#define PDC_RET_NOT_NARROW -17L /* Narrow mode not supported */
-
-
-/* Error codes for PDC_ADD_VALID */
-
-#define PDC_ADD_VALID_WARN	    3  /* Call completed with a warning */
-#define PDC_ADD_VALID_REQ_ERR_1       2  /* See above */
-#define PDC_ADD_VALID_REQ_ERR_0       1  /* Call would generate a requestor error */
-#define PDC_ADD_VALID_OK	      0  /* Call completed successfully */
-#define PDC_ADD_VALID_BAD_OPTION     -2  /* Called with non-existant option */
-#define PDC_ADD_VALID_ERROR	  -3  /* Call could not complete without an error */
-#define PDC_ADD_VALID_INVALID_ARG   -10  /* Called with an invalid argument */
-#define PDC_ADD_VALID_BUS_POW_WARN  -12  /* Call could not complete in allowed power budget */
+#define PDC_CHECK_RANGES 139		/* (sprockets)			*/
 
-/* The PDC_MEM_MAP calls */
+#define PDC_NV_SECTIONS	141		/* (sprockets)			*/
+
+#define PDC_PERFORMANCE	142		/* performance monitoring	*/
+
+#define PDC_SYSTEM_INFO	143		/* system information		*/
+#define PDC_SYSINFO_RETURN_INFO_SIZE	0
+#define PDC_SYSINFO_RRETURN_SYS_INFO	1
+#define PDC_SYSINFO_RRETURN_ERRORS	2
+#define PDC_SYSINFO_RRETURN_WARNINGS	3
+#define PDC_SYSINFO_RETURN_REVISIONS	4
+#define PDC_SYSINFO_RRETURN_DIAGNOSE	5
+#define PDC_SYSINFO_RRETURN_HV_DIAGNOSE	1005
+
+#define PDC_RDR		144		/* (sprockets)			*/
+#define PDC_RDR_READ_BUFFER	0
+#define PDC_RDR_READ_SINGLE	1
+#define PDC_RDR_WRITE_SINGLE	2
+
+#define PDC_INTRIGUE	145 		/* (sprockets)			*/
+#define PDC_INTRIGUE_WRITE_BUFFER 	 0
+#define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1
+#define PDC_INTRIGUE_START_CPU_COUNTERS	 2
+#define PDC_INTRIGUE_STOP_CPU_COUNTERS	 3
+
+#define PDC_STI		146 		/* STI access			*/
+/* same as PDC_PCI_XXX values (see below) */
+
+/* Legacy PDC definitions for same stuff */
+#define PDC_PCI_INDEX	147
+#define PDC_PCI_INTERFACE_INFO		0
+#define PDC_PCI_SLOT_INFO		1
+#define PDC_PCI_INFLIGHT_BYTES		2
+#define PDC_PCI_READ_CONFIG		3
+#define PDC_PCI_WRITE_CONFIG		4
+#define PDC_PCI_READ_PCI_IO		5
+#define PDC_PCI_WRITE_PCI_IO		6
+#define PDC_PCI_READ_CONFIG_DELAY	7
+#define PDC_PCI_UPDATE_CONFIG_DELAY	8
+#define PDC_PCI_PCI_PATH_TO_PCI_HPA	9
+#define PDC_PCI_PCI_HPA_TO_PCI_PATH	10
+#define PDC_PCI_PCI_PATH_TO_PCI_BUS	11
+#define PDC_PCI_PCI_RESERVED		12
+#define PDC_PCI_PCI_INT_ROUTE_SIZE	13
+#define PDC_PCI_GET_INT_TBL_SIZE	PDC_PCI_PCI_INT_ROUTE_SIZE
+#define PDC_PCI_PCI_INT_ROUTE		14
+#define PDC_PCI_GET_INT_TBL		PDC_PCI_PCI_INT_ROUTE 
+#define PDC_PCI_READ_MON_TYPE		15
+#define PDC_PCI_WRITE_MON_TYPE		16
+
+
+/* Get SCSI Interface Card info:  SDTR, SCSI ID, mode (SE vs LVD) */
+#define PDC_INITIATOR	163
+#define PDC_GET_INITIATOR	0
+#define PDC_SET_INITIATOR	1
+#define PDC_DELETE_INITIATOR	2
+#define PDC_RETURN_TABLE_SIZE	3
+#define PDC_RETURN_TABLE	4
+
+#define PDC_LINK	165 		/* (sprockets)			*/
+#define PDC_LINK_PCI_ENTRY_POINTS	0  /* list (Arg1) = 0 */
+#define PDC_LINK_USB_ENTRY_POINTS	1  /* list (Arg1) = 1 */
 
-#define PDC_MEM_MAP	    128
-#define PDC_MEM_MAP_HPA		0
 
 /* constants for OS (NVM...) */
-#define OS_ID_NONE	0
-#define OS_ID_HPUX	1
-#define OS_ID_MPEXL	2
-#define OS_ID_OSF	3
-#define OS_ID_LINUX	OS_ID_HPUX
+#define OS_ID_NONE		0	/* Undefined OS ID	*/
+#define OS_ID_HPUX		1	/* HP-UX OS		*/
+#define OS_ID_LINUX		OS_ID_HPUX /* just use the same value as hpux */
+#define OS_ID_MPEXL		2	/* MPE XL OS		*/
+#define OS_ID_OSF		3	/* OSF OS		*/
+#define OS_ID_HPRT		4	/* HP-RT OS		*/
+#define OS_ID_NOVEL		5	/* NOVELL OS		*/
+#define OS_ID_NT		6	/* NT OS		*/
+
 
 /* constants for PDC_CHASSIS */
-#define OSTAT_OFF		      0
-#define OSTAT_FLT		      1 
-#define OSTAT_TEST		     2
-#define OSTAT_INIT		     3
-#define OSTAT_SHUT		     4
-#define OSTAT_WARN		     5
-#define OSTAT_RUN		      6
-#define OSTAT_ON		       7
+#define OSTAT_OFF		0
+#define OSTAT_FLT		1 
+#define OSTAT_TEST		2
+#define OSTAT_INIT		3
+#define OSTAT_SHUT		4
+#define OSTAT_WARN		5
+#define OSTAT_RUN		6
+#define OSTAT_ON		7
+
+#ifdef __LP64__
+/* PDC PAT CELL */
+#define PDC_PAT_CELL	64L		/* Interface for gaining and 
+					 * manipulating cell state within PD */
+#define PDC_PAT_CELL_GET_NUMBER	   0L	/* Return Cell number		*/
+#define PDC_PAT_CELL_GET_INFO      1L	/* Returns info about Cell	*/
+#define PDC_PAT_CELL_MODULE        2L	/* Returns info about Module	*/
+#define PDC_PAT_CELL_SET_ATTENTION 9L	/* Set Cell Attention indicator	*/
+#define PDC_PAT_CELL_NUMBER_TO_LOC 10L	/* Cell Number -> Location	*/
+#define PDC_PAT_CELL_WALK_FABRIC   11L	/* Walk the Fabric		*/
+#define PDC_PAT_CELL_GET_RDT_SIZE  12L	/* Return Route Distance Table Sizes */
+#define PDC_PAT_CELL_GET_RDT       13L	/* Return Route Distance Tables	*/
+#define PDC_PAT_CELL_GET_LOCAL_PDH_SZ  14L /* Read Local PDH Buffer Size*/
+#define PDC_PAT_CELL_SET_LOCAL_PDH     15L /* Write Local PDH Buffer	*/
+#define PDC_PAT_CELL_GET_REMOTE_PDH_SZ 16L /* Return Remote PDH Buffer Size */
+#define PDC_PAT_CELL_GET_REMOTE_PDH    17L /* Read Remote PDH Buffer	*/
+#define PDC_PAT_CELL_GET_DBG_INFO  128L	/* Return DBG Buffer Info	*/
+#define PDC_PAT_CELL_CHANGE_ALIAS  129L	/* Change Non-Equivalent Alias Checking */
+
+/*
+** Arg to PDC_PAT_CELL_MODULE memaddr[4]
+**
+** Addresses on the Merced Bus != all Runway Bus addresses.
+** This is intended for programming SBA/LBA chips range registers.
+*/
+#define IO_VIEW			0UL
+#define PA_VIEW			1UL
+
+/* PDC_PAT_CELL_MODULE entity type values */
+#define PAT_ENTITY_CA		0	/* central agent	*/
+#define PAT_ENTITY_PROC		1	/* processor		*/
+#define PAT_ENTITY_MEM		2	/* memory controller	*/
+#define PAT_ENTITY_SBA		3	/* system bus adapter	*/
+#define PAT_ENTITY_LBA		4	/* local bus adapter	*/
+#define PAT_ENTITY_PBC		5	/* processor bus converter */
+#define PAT_ENTITY_XBC		6	/* crossbar fabric connect */
+#define PAT_ENTITY_RC		7	/* fabric interconnect	*/
+
+/* PDC_PAT_CELL_MODULE address range type values */
+#define PAT_PBNUM		0	/* PCI Bus Number	*/
+#define PAT_LMMIO		1	/* < 4G MMIO Space	*/
+#define PAT_GMMIO		2	/* > 4G MMIO Space	*/
+#define PAT_NPIOP		3	/* Non Postable I/O Port Space */
+#define PAT_PIOP		4	/* Postable I/O Port Space */
+#define PAT_AHPA		5	/* Additional HPA Space	*/
+#define PAT_UFO			6	/* HPA Space (UFO for Mariposa) */
+#define PAT_GNIP		7	/* GNI Reserved Space	*/
+
+
+/* PDC PAT CHASSIS LOG */
+#define PDC_PAT_CHASSIS_LOG	65L	/* Platform logging & forward
+					 ** progress functions	*/
+#define PDC_PAT_CHASSIS_WRITE_LOG	0L /* Write Log Entry	*/
+#define PDC_PAT_CHASSIS_READ_LOG	1L /* Read  Log Entry	*/
+
+
+/* PDC PAT CPU  */
+#define PDC_PAT_CPU		67L	/* Interface to CPU configuration
+					 * within the protection domain */
+#define PDC_PAT_CPU_INFO		0L /* Return CPU config info	*/
+#define PDC_PAT_CPU_DELETE		1L /* Delete CPU		*/
+#define PDC_PAT_CPU_ADD			2L /* Add    CPU		*/
+#define PDC_PAT_CPU_GET_NUMBER		3L /* Return CPU Number		*/
+#define PDC_PAT_CPU_GET_HPA		4L /* Return CPU HPA		*/
+#define PDC_PAT_CPU_STOP            	5L /* Stop   CPU		*/
+#define PDC_PAT_CPU_RENDEZVOUS      	6L /* Rendezvous CPU		*/
+#define PDC_PAT_CPU_GET_CLOCK_INFO  	7L /* Return CPU Clock info	*/
+#define PDC_PAT_CPU_GET_RENDEZVOUS_STATE 8L /* Return Rendezvous State	*/
+#define PDC_PAT_CPU_PLUNGE_FABRIC	128L /* Plunge Fabric		*/
+#define PDC_PAT_CPU_UPDATE_CACHE_CLEANSING 129L /* Manipulate Cache 
+                                                 * Cleansing Mode	*/
+
+/*  PDC PAT EVENT */
+#define PDC_PAT_EVENT		68L	/* Interface to Platform Events */
+#define PDC_PAT_EVENT_GET_CAPS		0L /* Get Capabilities		*/
+#define PDC_PAT_EVENT_SET_MODE		1L /* Set Notification Mode	*/
+#define PDC_PAT_EVENT_SCAN		2L /* Scan Event		*/
+#define PDC_PAT_EVENT_HANDLE		3L /* Handle Event		*/
+#define PDC_PAT_EVENT_GET_NB_CALL	4L /* Get Non-Blocking call Args*/
+
+/*  PDC PAT HPMC */
+#define PDC_PAT_HPMC		70L	/* Cause processor to go into spin
+					 ** loop, and wait for wake up from
+					 ** Monarch Processor		*/
+#define PDC_PAT_HPMC_RENDEZ_CPU		0L /* go into spin loop		*/
+#define PDC_PAT_HPMC_SET_PARAMS		1L /* Allows OS to specify intr which PDC 
+                                        * will use to interrupt OS during machine
+                                        * check rendezvous		*/
+
+/* parameters for PDC_PAT_HPMC_SET_PARAMS */
+#define HPMC_SET_PARAMS_INTR		1L /* Rendezvous Interrupt	*/
+#define HPMC_SET_PARAMS_WAKE		2L /* Wake up processor		*/
+
+/*  PDC PAT IO */
+#define PDC_PAT_IO		71L	/* On-line services for I/O modules */
+#define PDC_PAT_IO_GET_SLOT_STATUS	 5L /* Get Slot Status Info	*/
+#define PDC_PAT_IO_GET_LOC_FROM_HARDWARE 6L /* Get Physical Location from */
+                                            /* Hardware Path		*/
+#define PDC_PAT_IO_GET_HARDWARE_FROM_LOC 7L /* Get Hardware Path from 
+                                             * Physical Location	*/
+#define PDC_PAT_IO_GET_PCI_CONFIG_FROM_HW 11L /* Get PCI Configuration
+                                               * Address from Hardware Path */
+#define PDC_PAT_IO_GET_HW_FROM_PCI_CONFIG 12L /* Get Hardware Path 
+                                               * from PCI Configuration Address */
+#define PDC_PAT_IO_READ_HOST_BRIDGE_INFO  13L /* Read Host Bridge State Info */
+#define PDC_PAT_IO_CLEAR_HOST_BRIDGE_INFO 14L /* Clear Host Bridge State Info*/
+#define PDC_PAT_IO_GET_PCI_ROUTING_TABLE_SIZE 15L /* Get PCI INT Routing Table 
+                                                   * Size		*/
+#define PDC_PAT_IO_GET_PCI_ROUTING_TABLE  16L /* Get PCI INT Routing Table */
+#define PDC_PAT_IO_GET_HINT_TABLE_SIZE    17L /* Get Hint Table Size	*/
+#define PDC_PAT_IO_GET_HINT_TABLE	18L /* Get Hint Table		*/
+#define PDC_PAT_IO_PCI_CONFIG_READ	19L /* PCI Config Read		*/
+#define PDC_PAT_IO_PCI_CONFIG_WRITE	20L /* PCI Config Write		*/
+#define PDC_PAT_IO_GET_NUM_IO_SLOTS	21L /* Get Number of I/O Bay Slots in 
+                                       		  * Cabinet		*/
+#define PDC_PAT_IO_GET_LOC_IO_SLOTS	22L /* Get Physical Location of I/O */
+                                   	    /* Bay Slots in Cabinet	*/
+#define PDC_PAT_IO_BAY_STATUS_INFO	28L /* Get I/O Bay Slot Status Info */
+#define PDC_PAT_IO_GET_PROC_VIEW	29L /* Get Processor view of IO address */
+#define PDC_PAT_IO_PROG_SBA_DIR_RANGE	30L /* Program directed range	*/
+
+/* PDC PAT MEM */
+#define PDC_PAT_MEM		72L  /* Manage memory page deallocation */
+#define PDC_PAT_MEM_PD_INFO     	0L /* Return PDT info for PD	*/
+#define PDC_PAT_MEM_PD_CLEAR    	1L /* Clear PDT for PD		*/
+#define PDC_PAT_MEM_PD_READ     	2L /* Read PDT entries for PD	*/
+#define PDC_PAT_MEM_PD_RESET    	3L /* Reset clear bit for PD	*/
+#define PDC_PAT_MEM_CELL_INFO   	5L /* Return PDT info For Cell	*/
+#define PDC_PAT_MEM_CELL_CLEAR  	6L /* Clear PDT For Cell	*/
+#define PDC_PAT_MEM_CELL_READ   	7L /* Read PDT entries For Cell	*/
+#define PDC_PAT_MEM_CELL_RESET  	8L /* Reset clear bit For Cell	*/
+#define PDC_PAT_MEM_SETGM	  	9L /* Set Golden Memory value	*/
+#define PDC_PAT_MEM_ADD_PAGE    	10L /* ADDs a page to the cell	*/
+#define PDC_PAT_MEM_ADDRESS     	11L /* Get Physical Location From*/
+					    /* Memory Address		*/
+#define PDC_PAT_MEM_GET_TXT_SIZE   	12L /* Get Formatted Text Size	*/
+#define PDC_PAT_MEM_GET_PD_TXT     	13L /* Get PD Formatted Text	*/
+#define PDC_PAT_MEM_GET_CELL_TXT   	14L /* Get Cell Formatted Text	*/
+#define PDC_PAT_MEM_RD_STATE_INFO  	15L /* Read Mem Module State Info*/
+#define PDC_PAT_MEM_CLR_STATE_INFO 	16L /*Clear Mem Module State Info*/
+#define PDC_PAT_MEM_CLEAN_RANGE    	128L /*Clean Mem in specific range*/
+#define PDC_PAT_MEM_GET_TBL_SIZE   	131L /* Get Memory Table Size	*/
+#define PDC_PAT_MEM_GET_TBL        	132L /* Get Memory Table	*/
+
+/* PDC PAT NVOLATILE */
+#define PDC_PAT_NVOLATILE	73L	   /* Access Non-Volatile Memory*/
+#define PDC_PAT_NVOLATILE_READ		0L /* Read Non-Volatile Memory	*/
+#define PDC_PAT_NVOLATILE_WRITE		1L /* Write Non-Volatile Memory	*/
+#define PDC_PAT_NVOLATILE_GET_SIZE	2L /* Return size of NVM	*/
+#define PDC_PAT_NVOLATILE_VERIFY	3L /* Verify contents of NVM	*/
+#define PDC_PAT_NVOLATILE_INIT		4L /* Initialize NVM		*/
+
+/* PDC PAT PD */
+#define PDC_PAT_PD		74L	    /* Protection Domain Info	*/
+#define PDC_PAT_PD_GET_ADDR_MAP		0L  /* Get Address Map		*/
+
+/* PDC_PAT_PD_GET_ADDR_MAP entry types */
+#define PAT_MEMORY_DESCRIPTOR		1
+
+/* PDC_PAT_PD_GET_ADDR_MAP memory types */
+#define PAT_MEMTYPE_MEMORY		0
+#define PAT_MEMTYPE_FIRMWARE		4
+
+/* PDC_PAT_PD_GET_ADDR_MAP memory usage */
+#define PAT_MEMUSE_GENERAL		0
+#define PAT_MEMUSE_GI			128
+#define PAT_MEMUSE_GNI			129
+#endif /* __LP64__ */
 
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
 
+extern int pdc_type;
+
+/* Values for pdc_type */
+#define PDC_TYPE_ILLEGAL	-1
+#define PDC_TYPE_PAT		 0 /* 64-bit PAT-PDC */
+#define PDC_TYPE_SYSTEM_MAP	 1 /* 32-bit, but supports PDC_SYSTEM_MAP */
+#define PDC_TYPE_SNAKE		 2 /* Doesn't support SYSTEM_MAP */
+
+#define is_pdc_pat()    (pdc_type == PDC_TYPE_PAT)
+
+struct pdc_chassis_info {       /* for PDC_CHASSIS_INFO */
+	unsigned long actcnt;   /* actual number of bytes returned */
+	unsigned long maxcnt;   /* maximum number of bytes that could be returned */
+};
+
+struct pdc_coproc_cfg {         /* for PDC_COPROC_CFG */
+        unsigned long ccr_functional;
+        unsigned long ccr_present;
+        unsigned long revision;
+        unsigned long model;
+};
+
 struct pdc_model {		/* for PDC_MODEL */
 	unsigned long hversion;
 	unsigned long sversion;
@@ -178,33 +500,22 @@
 	unsigned long arch_rev;
 	unsigned long pot_key;
 	unsigned long curr_key;
-	unsigned long pad[32-9];
-} __attribute__((aligned(8))) ;
-
-
-#if 0
-struct pdc_chassis_warn {		/* for PDC_CHASSIS */
-	unsigned long warn;
-	unsigned long pad[32-1];
-} __attribute__((aligned(8))) ;
-#endif
+};
 
-struct pdc_model_sysmodel {	/* for PDC_MODEL_SYSMODEL */
-	unsigned long mod_len;
-	unsigned long pad[32-1];
-} __attribute__((aligned(8))) ;
+/* Values for PDC_MODEL_CAPABILITES non-equivalent virtual aliasing support */
 
-struct pdc_model_cpuid	 {	/* for PDC_MODEL_CPU_ID */
-	unsigned long cpuid;
-	unsigned long pad[32-1];
-} __attribute__((aligned(8))) ;
+#define PDC_MODEL_IOPDIR_FDC            (1 << 2)        /* see sba_iommu.c */
+#define PDC_MODEL_NVA_MASK		(3 << 4)
+#define PDC_MODEL_NVA_SUPPORTED		(0 << 4)
+#define PDC_MODEL_NVA_SLOW		(1 << 4)
+#define PDC_MODEL_NVA_UNSUPPORTED	(3 << 4)
 
 struct pdc_cache_cf {		/* for PDC_CACHE  (I/D-caches) */
     unsigned long
 #ifdef __LP64__
 		cc_padW:32,
 #endif
-		cc_alias:4,	/* alias boundaries for virtual adresses   */
+		cc_alias:4,	/* alias boundaries for virtual addresses   */
 		cc_block: 4,	/* to determine most efficient stride */
 		cc_line	: 3,	/* maximum amount written back as a result of store (multiple of 16 bytes) */
 		cc_pad0 : 2,	/* reserved */
@@ -263,14 +574,7 @@
 	unsigned long	dt_off_stride;
 	unsigned long	dt_off_count;
 	unsigned long	dt_loop;
-	/* padded to 32 entries... */
-	unsigned long 	pad[32-30];
-} __attribute__((aligned(8))) ;
-
-struct pdc_hpa {      /* PDC_HPA */
-	unsigned long	hpa;
-	unsigned long	filler[31];
-} __attribute__((aligned(8))) ;
+};
 
 #if 0
 /* If you start using the next struct, you'll have to adjust it to
@@ -287,14 +591,14 @@
 	unsigned char	rev;
 	unsigned char	dep;
 	unsigned char	features;
-	unsigned char	filler1;
+	unsigned char	pad1;
 	unsigned int	checksum:16;
 	unsigned int	length:16;
-	unsigned int    filler[15];
+	unsigned int    pad[15];
 } __attribute__((aligned(8))) ;
 #endif
 
-#ifndef __LP64__
+#ifndef CONFIG_PA20
 /* no BLTBs in pa2.0 processors */
 struct pdc_btlb_info_range {
 	__u8 res00;
@@ -308,53 +612,95 @@
 	unsigned int max_size;	/* maximum size of BTLB in pages */
 	struct pdc_btlb_info_range fixed_range_info;
 	struct pdc_btlb_info_range variable_range_info;
-	unsigned int pad[32-4];
-} __attribute__((aligned(8))) ;
-#endif
+};
 
-struct pdc_tlb {		/* for PDC_TLB */
-	unsigned long min_size;
-	unsigned long max_size;
-	unsigned long pad[32-2];
-} __attribute__((aligned(8))) ;
+#endif /* !CONFIG_PA20 */
+
+#ifdef __LP64__
+struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */
+	unsigned long entries_returned;
+	unsigned long entries_total;
+};
+
+struct pdc_memory_table {       /* PDC_MEM/PDC_MEM_TABLE (arguments) */
+	unsigned long paddr;
+	unsigned int  pages;
+	unsigned int  reserved;
+};
+#endif /* __LP64__ */
 
-struct pdc_system_map { /* PDC_SYTEM_MAP/FIND_MODULE */
-	void * mod_addr;
+struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */
+	unsigned long mod_addr;
 	unsigned long mod_pgs;
 	unsigned long add_addrs;
-	unsigned long filler[29];
-} __attribute__((aligned(8))) ;
+};
 
-/*
- * Device path specifications used by PDC.
- */
-struct pdc_module_path {
+struct pdc_system_map_addr_info { /* PDC_SYSTEM_MAP/FIND_ADDRESS */
+	unsigned long mod_addr;
+	unsigned long mod_pgs;
+};
+
+struct hardware_path {
 	char  flags;	/* see bit definitions below */
 	char  bc[6];	/* Bus Converter routing info to a specific */
 			/* I/O adaptor (< 0 means none, > 63 resvd) */
 	char  mod;	/* fixed field of specified module */
-	unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */
-} __attribute__((aligned(8))) ;
+};
 
-#ifndef __LP64__
-/* Probably needs 64-bit porting -PB */
-struct pdc_memory_map {	/* PDC_MEMORY_MAP */
-	unsigned int hpa;	/* mod's register set address */
-	unsigned int more_pgs;	/* number of additional I/O pgs */
-} __attribute__((aligned(8))) ;
+/*
+ * Device path specifications used by PDC.
+ */
+struct pdc_module_path {
+	struct hardware_path path;
+	unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */
+};
 
-struct pdc_lan_station_id {	/* PDC_LAN_STATION_ID */
-	unsigned char addr[PDC_LAN_STATION_ID_SIZE];
-	unsigned char pad0[2];
-	int pad1[30];
+#ifndef CONFIG_PA20
+/* Only used on some pre-PA2.0 boxes */
+struct pdc_memory_map {		/* PDC_MEMORY_MAP */
+	unsigned long hpa;	/* mod's register set address */
+	unsigned long more_pgs;	/* number of additional I/O pgs */
 };
 #endif
 
 struct pdc_tod {
 	unsigned long tod_sec; 
 	unsigned long tod_usec;
-	long pad[30];
-} __attribute__((aligned(8))) ;
+};
+
+#ifdef __LP64__
+struct pdc_pat_cell_num {
+	unsigned long cell_num;
+	unsigned long cell_loc;
+};
+
+struct pdc_pat_cpu_num {
+	unsigned long cpu_num;
+	unsigned long cpu_loc;
+};
+
+struct pdc_pat_pd_addr_map_entry {
+	unsigned char entry_type;       /* 1 = Memory Descriptor Entry Type */
+	unsigned char reserve1[5];
+	unsigned char memory_type;
+	unsigned char memory_usage;
+	unsigned long paddr;
+	unsigned int  pages;            /* Length in 4K pages */
+	unsigned int  reserve2;
+	unsigned long cell_map;
+};
+
+/* FIXME: mod[508] should really be a union of the various mod components */
+struct pdc_pat_cell_mod_maddr_block {	/* PDC_PAT_CELL_MODULE */
+	unsigned long cba;              /* function 0 configuration space address */
+	unsigned long mod_info;         /* module information */
+	unsigned long mod_location;     /* physical location of the module */
+	struct hardware_path mod_path;	/* hardware path */
+	unsigned long mod[508];		/* PAT cell module components */
+};
+
+typedef struct pdc_pat_cell_mod_maddr_block pdc_pat_cell_mod_maddr_block_t;
+#endif /* __LP64__ */
 
 /* architected results from PDC_PIM/transfer hpmc on a PA1.1 machine */
 
@@ -471,10 +817,13 @@
 
 /* IODC ENTRY_IO() */
 #define ENTRY_IO_BOOTIN		0
+#define ENTRY_IO_BOOTOUT	1
 #define ENTRY_IO_CIN		2
 #define ENTRY_IO_COUT		3
 #define ENTRY_IO_CLOSE		4
 #define ENTRY_IO_GETMSG		9
+#define ENTRY_IO_BBLOCK_IN	16
+#define ENTRY_IO_BBLOCK_OUT	17
 
 /* IODC ENTRY_SPA() */
 
@@ -490,7 +839,7 @@
 
 #ifndef __ASSEMBLY__
 
-#define	PAGE0	((struct zeropage *)0xc0000000)
+#define PAGE0   ((struct zeropage *)__PAGE_OFFSET)
 
 struct zeropage {
 	/* [0x000] initialize vectors (VEC) */
@@ -557,71 +906,107 @@
 #define BOOT_CONSOLE_PATH_OFFSET 0x3a8
 
 #ifndef __ASSEMBLY__
+void pdc_console_init(void);	/* in pdc_console.c */
+void pdc_console_restart(void);
 
-struct pdc_pat_io_num {
-	unsigned long num;
-	unsigned long reserved[31];
-};
-
-
-
-extern void pdc_console_init(void);
-extern int  pdc_getc(void);	/* wait for char */
-extern void pdc_putc(unsigned char);	/* print char */
-
+void setup_pdc(void);		/* in inventory.c */
 
 /* wrapper-functions from pdc.c */
 
-int pdc_add_valid(void *address);
-int pdc_hpa_processor(void *address);
-#if 0
-int pdc_hpa_modules(void *address);
-#endif
-int pdc_iodc_read(void *address, void *hpa, unsigned int index,
+int pdc_add_valid(unsigned long address);
+int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
+int pdc_chassis_disp(unsigned long disp);
+int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info);
+int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
 		  void *iodc_data, unsigned int iodc_data_size);
-int pdc_system_map_find_mods(void *pdc_mod_info, void *mod_path, int index);
+int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
+			     struct pdc_module_path *mod_path, long mod_index);
+int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info, 
+			      long mod_index, long addr_index);
 int pdc_model_info(struct pdc_model *model);
-int pdc_model_sysmodel(char  *name);
-int pdc_model_cpuid(struct pdc_model_cpuid *cpu_id);
-int pdc_model_versions(struct pdc_model_cpuid *cpu_id, int id);
+int pdc_model_sysmodel(char *name);
+int pdc_model_cpuid(unsigned long *cpu_id);
+int pdc_model_versions(unsigned long *versions, int id);
+int pdc_model_capabilities(unsigned long *capabilities);
 int pdc_cache_info(struct pdc_cache_info *cache);
-#ifndef __LP64__
-int pdc_btlb_info( struct pdc_btlb_info *btlb);
-int pdc_lan_station_id( char *lan_addr, void *net_hpa);
-#endif
-int pdc_mem_map_hpa(void *r_addr, void *mod_path);
-
-extern int pdc_chassis_disp(unsigned long disp);
-extern int pdc_chassis_info(void *pdc_result, void *chassis_info, unsigned long len);
+#ifndef CONFIG_PA20
+int pdc_btlb_info(struct pdc_btlb_info *btlb);
+int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
+#endif /* !CONFIG_PA20 */
+int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa);
 
-#ifdef __LP64__
-int pdc_pat_get_irt_size(void *r_addr, unsigned long cell_num);
-int pdc_pat_get_irt(void *r_addr, unsigned long cell_num);
-#else
-/* No PAT support for 32-bit kernels...sorry */
-#define pdc_pat_get_irt_size(r_addr, cell_numn)	PDC_RET_NE_PROC
-#define pdc_pat_get_irt(r_addr, cell_num)	PDC_RET_NE_PROC
-#endif
-int pdc_pci_irt_size(void *r_addr, void *hpa);
-int pdc_pci_irt(void *r_addr, void *hpa, void *tbl);
+int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa);
+int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl);
 
+int pdc_get_initiator(struct hardware_path *hwpath, unsigned char *scsi_id, unsigned long *period, char *width, char *mode);
 int pdc_tod_read(struct pdc_tod *tod);
 int pdc_tod_set(unsigned long sec, unsigned long usec);
 
-/* on all currently-supported platforms, IODC I/O calls are always
- * 32-bit calls, and MEM_PDC calls are always the same width as the OS.
- * This means Cxxx boxes can't run wide kernels right now. -PB
- *
- * Note that some PAT boxes may have 64-bit IODC I/O...
- */
 #ifdef __LP64__
-#   define mem_pdc_call(args...) real64_call(0L, ##args)
-#else
-#   define mem_pdc_call(args...) real32_call(0L, ##args)
+int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
+		struct pdc_memory_table *tbl, unsigned long entries);
 #endif
-/* yes 'int', not 'long' -- IODC I/O is always 32-bit stuff */
-extern long real64_call(unsigned long function, ...);
-extern long real32_call(unsigned long function, ...);
+
+int pdc_do_firm_test_reset(unsigned long ftc_bitmap);
+int pdc_do_reset(void);
+int pdc_soft_power_info(unsigned long *power_reg);
+int pdc_soft_power_button(int sw_control);
+void pdc_suspend_usb(void);
+int pdc_iodc_getc(void);
+void pdc_iodc_putc(unsigned char c);
+void pdc_iodc_outc(unsigned char c);
+
+void pdc_emergency_unlock(void);
+int pdc_sti_call(unsigned long func, unsigned long flags,
+                 unsigned long inptr, unsigned long outputr,
+                 unsigned long glob_cfg);
+
+#ifdef __LP64__
+int pdc_pat_chassis_send_log(unsigned long status, unsigned long data);
+int pdc_pat_cell_get_number(struct pdc_pat_cell_num *cell_info);
+int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long mod,
+			unsigned long view_type, void *mem_addr);
+int pdc_pat_cpu_get_number(struct pdc_pat_cpu_num *cpu_info, void *hpa);
+int pdc_pat_get_irt_size(unsigned long *num_entries, unsigned long cell_num);
+int pdc_pat_get_irt(void *r_addr, unsigned long cell_num);
+int pdc_pat_pd_get_addr_map(unsigned long *actual_len, void *mem_addr, 
+			    unsigned long count, unsigned long offset);
+
+/********************************************************************
+* PDC_PAT_CELL[Return Cell Module] memaddr[0] conf_base_addr
+* ----------------------------------------------------------
+* Bit  0 to 51 - conf_base_addr
+* Bit 52 to 62 - reserved
+* Bit       63 - endianess bit
+********************************************************************/
+#define PAT_GET_CBA(value) ((value) & 0xfffffffffffff000UL)
+
+/********************************************************************
+* PDC_PAT_CELL[Return Cell Module] memaddr[1] mod_info
+* ----------------------------------------------------
+* Bit  0 to  7 - entity type
+*    0 = central agent,            1 = processor,
+*    2 = memory controller,        3 = system bus adapter,
+*    4 = local bus adapter,        5 = processor bus converter,
+*    6 = crossbar fabric connect,  7 = fabric interconnect,
+*    8 to 254 reserved,            255 = unknown.
+* Bit  8 to 15 - DVI
+* Bit 16 to 23 - IOC functions
+* Bit 24 to 39 - reserved
+* Bit 40 to 63 - mod_pages
+*    number of 4K pages a module occupies starting at conf_base_addr
+********************************************************************/
+#define PAT_GET_ENTITY(value)	(((value) >> 56) & 0xffUL)
+#define PAT_GET_DVI(value)	(((value) >> 48) & 0xffUL)
+#define PAT_GET_IOC(value)	(((value) >> 40) & 0xffUL)
+#define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL)
+
+#else /* !__LP64__ */
+/* No PAT support for 32-bit kernels...sorry */
+#define pdc_pat_get_irt_size(num_entries, cell_numn)	PDC_BAD_PROC
+#define pdc_pat_get_irt(r_addr, cell_num)	PDC_BAD_PROC
+#endif /* !__LP64__ */
+
 extern void pdc_init(void);
 
 #endif /* __ASSEMBLY__ */
diff -Nru a/include/asm-parisc/pdc_chassis.h b/include/asm-parisc/pdc_chassis.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/pdc_chassis.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,382 @@
+/*
+ *		include/asm-parisc/pdc_chassis.h
+ *
+ *		Copyright (C) 2002 Laurent Canet <canetl@esiee.fr>
+ *		Copyright (C) 2002 Thibaut Varene <varenet@esiee.fr>
+ *
+ *
+ *      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.
+ *
+ *      TODO:	- handle processor number on SMP systems (Reporting Entity ID)
+ *      	- handle message ID
+ *      	- handle timestamps
+ */
+ 
+
+#ifndef _PARISC_PDC_CHASSIS_H
+#define _PARISC_PDC_CHASSIS_H
+
+/*
+ * ----------
+ * Prototypes
+ * ----------
+ */
+
+int pdc_chassis_send_status(int message);
+void __init parisc_pdc_chassis_init(void);
+
+
+/*
+ * -----------------
+ * Direct call names
+ * -----------------
+ * They setup everything for you, the Log message and the corresponding LED state
+ */
+
+#define PDC_CHASSIS_DIRECT_BSTART	0
+#define PDC_CHASSIS_DIRECT_BCOMPLETE	1
+#define PDC_CHASSIS_DIRECT_SHUTDOWN	2
+#define PDC_CHASSIS_DIRECT_PANIC	3
+#define PDC_CHASSIS_DIRECT_HPMC		4
+#define PDC_CHASSIS_DIRECT_LPMC		5
+#define PDC_CHASSIS_DIRECT_DUMP		6	/* not yet implemented */
+#define PDC_CHASSIS_DIRECT_OOPS		7	/* not yet implemented */
+
+
+/*
+ * ------------
+ * LEDs control
+ * ------------
+ * Set the three LEDs -- Run, Attn, and Fault.
+ */
+
+/* Old PDC LED control */
+#define PDC_CHASSIS_DISP_DATA(v)	((unsigned long)(v) << 17)
+
+/* 
+ * Available PDC PAT LED states
+ */
+
+#define PDC_CHASSIS_LED_RUN_OFF		(0ULL << 4)
+#define PDC_CHASSIS_LED_RUN_FLASH	(1ULL << 4)
+#define PDC_CHASSIS_LED_RUN_ON		(2ULL << 4)
+#define PDC_CHASSIS_LED_RUN_NC		(3ULL << 4)
+#define PDC_CHASSIS_LED_ATTN_OFF	(0ULL << 6)
+#define PDC_CHASSIS_LED_ATTN_FLASH	(1ULL << 6)
+#define PDC_CHASSIS_LED_ATTN_NC		(3ULL << 6)	/* ATTN ON is invalid */
+#define PDC_CHASSIS_LED_FAULT_OFF	(0ULL << 8)
+#define PDC_CHASSIS_LED_FAULT_FLASH	(1ULL << 8)
+#define PDC_CHASSIS_LED_FAULT_ON	(2ULL << 8)
+#define PDC_CHASSIS_LED_FAULT_NC	(3ULL << 8)
+#define PDC_CHASSIS_LED_VALID		(1ULL << 10)
+
+/* 
+ * Valid PDC PAT LED states combinations
+ */
+
+/* System running normally */
+#define PDC_CHASSIS_LSTATE_RUN_NORMAL	(PDC_CHASSIS_LED_RUN_ON		| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_OFF	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* System crashed and rebooted itself successfully */
+#define PDC_CHASSIS_LSTATE_RUN_CRASHREC	(PDC_CHASSIS_LED_RUN_ON		| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_FLASH	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* There was a system interruption that did not take the system down */
+#define PDC_CHASSIS_LSTATE_RUN_SYSINT	(PDC_CHASSIS_LED_RUN_ON		| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_OFF	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* System running and unexpected reboot or non-critical error detected */
+#define PDC_CHASSIS_LSTATE_RUN_NCRIT	(PDC_CHASSIS_LED_RUN_ON		| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_FLASH	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Executing non-OS code */
+#define PDC_CHASSIS_LSTATE_NONOS	(PDC_CHASSIS_LED_RUN_FLASH	| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_OFF	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Boot failed - Executing non-OS code */
+#define PDC_CHASSIS_LSTATE_NONOS_BFAIL	(PDC_CHASSIS_LED_RUN_FLASH	| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_ON	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Unexpected reboot occured - Executing non-OS code */
+#define PDC_CHASSIS_LSTATE_NONOS_UNEXP	(PDC_CHASSIS_LED_RUN_FLASH	| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_FLASH	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Executing non-OS code - Non-critical error detected */
+#define PDC_CHASSIS_LSTATE_NONOS_NCRIT	(PDC_CHASSIS_LED_RUN_FLASH	| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_OFF	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Boot failed - Executing non-OS code - Non-critical error detected */
+#define PDC_CHASSIS_LSTATE_BFAIL_NCRIT	(PDC_CHASSIS_LED_RUN_FLASH	| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_ON	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Unexpected reboot/recovering - Executing non-OS code - Non-critical error detected */
+#define PDC_CHASSIS_LSTATE_UNEXP_NCRIT	(PDC_CHASSIS_LED_RUN_FLASH	| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_FLASH	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Cannot execute PDC */
+#define PDC_CHASSIS_LSTATE_CANNOT_PDC	(PDC_CHASSIS_LED_RUN_OFF	| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_OFF	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Boot failed - OS not up - PDC has detected a failure that prevents boot */
+#define PDC_CHASSIS_LSTATE_FATAL_BFAIL	(PDC_CHASSIS_LED_RUN_OFF	| \
+					 PDC_CHASSIS_LED_ATTN_OFF	| \
+					 PDC_CHASSIS_LED_FAULT_ON	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* No code running - Non-critical error detected (double fault situation) */
+#define PDC_CHASSIS_LSTATE_NOCODE_NCRIT	(PDC_CHASSIS_LED_RUN_OFF	| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_OFF	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* Boot failed - OS not up - Fatal failure detected - Non-critical error detected */
+#define PDC_CHASSIS_LSTATE_FATAL_NCRIT	(PDC_CHASSIS_LED_RUN_OFF	| \
+					 PDC_CHASSIS_LED_ATTN_FLASH	| \
+					 PDC_CHASSIS_LED_FAULT_ON	| \
+					 PDC_CHASSIS_LED_VALID		)
+/* All other states are invalid */
+
+
+/*
+ * --------------
+ * PDC Log events
+ * --------------
+ * Here follows bits needed to fill up the log event sent to PDC_CHASSIS
+ * The log message contains: Alert level, Source, Source detail,
+ * Source ID, Problem detail, Caller activity, Activity status, 
+ * Caller subactivity, Reporting entity type, Reporting entity ID,
+ * Data type, Unique message ID and EOM. 
+ */
+
+/* Alert level */
+#define PDC_CHASSIS_ALERT_FORWARD	(0ULL << 36)	/* no failure detected */
+#define PDC_CHASSIS_ALERT_SERPROC	(1ULL << 36)	/* service proc - no failure */
+#define PDC_CHASSIS_ALERT_NURGENT	(2ULL << 36)	/* non-urgent operator attn */
+#define PDC_CHASSIS_ALERT_BLOCKED	(3ULL << 36)	/* system blocked */
+#define PDC_CHASSIS_ALERT_CONF_CHG	(4ULL << 36)	/* unexpected configuration change */
+#define PDC_CHASSIS_ALERT_ENV_PB	(5ULL << 36)	/* boot possible, environmental pb */
+#define PDC_CHASSIS_ALERT_PENDING	(6ULL << 36)	/* boot possible, pending failure */
+#define PDC_CHASSIS_ALERT_PERF_IMP	(8ULL << 36)	/* boot possible, performance impaired */
+#define PDC_CHASSIS_ALERT_FUNC_IMP	(10ULL << 36)	/* boot possible, functionality impaired */
+#define PDC_CHASSIS_ALERT_SOFT_FAIL	(12ULL << 36)	/* software failure */
+#define PDC_CHASSIS_ALERT_HANG		(13ULL << 36)	/* system hang */
+#define PDC_CHASSIS_ALERT_ENV_FATAL	(14ULL << 36)	/* fatal power or environmental pb */
+#define PDC_CHASSIS_ALERT_HW_FATAL	(15ULL << 36)	/* fatal hardware problem */
+
+/* Source */
+#define PDC_CHASSIS_SRC_NONE		(0ULL << 28)	/* unknown, no source stated */
+#define PDC_CHASSIS_SRC_PROC		(1ULL << 28)	/* processor */
+/* For later use ? */
+#define PDC_CHASSIS_SRC_PROC_CACHE	(2ULL << 28)	/* processor cache*/
+#define PDC_CHASSIS_SRC_PDH		(3ULL << 28)	/* processor dependent hardware */
+#define PDC_CHASSIS_SRC_PWR		(4ULL << 28)	/* power */
+#define PDC_CHASSIS_SRC_FAB		(5ULL << 28)	/* fabric connector */
+#define PDC_CHASSIS_SRC_PLATi		(6ULL << 28)	/* platform */
+#define PDC_CHASSIS_SRC_MEM		(7ULL << 28)	/* memory */
+#define PDC_CHASSIS_SRC_IO		(8ULL << 28)	/* I/O */
+#define PDC_CHASSIS_SRC_CELL		(9ULL << 28)	/* cell */
+#define PDC_CHASSIS_SRC_PD		(10ULL << 28)	/* protected domain */
+
+/* Source detail field */
+#define PDC_CHASSIS_SRC_D_PROC		(1ULL << 24)	/* processor general */
+
+/* Source ID - platform dependent */
+#define PDC_CHASSIS_SRC_ID_UNSPEC	(0ULL << 16)
+
+/* Problem detail - problem source dependent */
+#define PDC_CHASSIS_PB_D_PROC_NONE	(0ULL << 32)	/* no problem detail */
+#define PDC_CHASSIS_PB_D_PROC_TIMEOUT	(4ULL << 32)	/* timeout */
+
+/* Caller activity */
+#define PDC_CHASSIS_CALL_ACT_HPUX_BL	(7ULL << 12)	/* Boot Loader */
+#define PDC_CHASSIS_CALL_ACT_HPUX_PD	(8ULL << 12)	/* SAL_PD activities */
+#define PDC_CHASSIS_CALL_ACT_HPUX_EVENT	(9ULL << 12)	/* SAL_EVENTS activities */
+#define PDC_CHASSIS_CALL_ACT_HPUX_IO	(10ULL << 12)	/* SAL_IO activities */
+#define PDC_CHASSIS_CALL_ACT_HPUX_PANIC	(11ULL << 12)	/* System panic */
+#define PDC_CHASSIS_CALL_ACT_HPUX_INIT	(12ULL << 12)	/* System initialization */
+#define PDC_CHASSIS_CALL_ACT_HPUX_SHUT	(13ULL << 12)	/* System shutdown */
+#define PDC_CHASSIS_CALL_ACT_HPUX_WARN	(14ULL << 12)	/* System warning */
+#define PDC_CHASSIS_CALL_ACT_HPUX_DU	(15ULL << 12)	/* Display_Activity() update */
+
+/* Activity status - implementation dependent */
+#define PDC_CHASSIS_ACT_STATUS_UNSPEC	(0ULL << 0)
+
+/* Caller subactivity - implementation dependent */
+/* FIXME: other subactivities ? */
+#define PDC_CHASSIS_CALL_SACT_UNSPEC	(0ULL << 4)	/* implementation dependent */
+
+/* Reporting entity type */
+#define PDC_CHASSIS_RET_GENERICOS	(12ULL << 52)	/* generic OSes */
+#define PDC_CHASSIS_RET_IA64_NT		(13ULL << 52)	/* IA-64 NT */
+#define PDC_CHASSIS_RET_HPUX		(14ULL << 52)	/* HP-UX */
+#define PDC_CHASSIS_RET_DIAG		(15ULL << 52)	/* offline diagnostics & utilities */
+
+/* Reporting entity ID */
+#define PDC_CHASSIS_REID_UNSPEC		(0ULL << 44)
+
+/* Data type */
+#define PDC_CHASSIS_DT_NONE		(0ULL << 59)	/* data field unused */
+/* For later use ? Do we need these ? */
+#define PDC_CHASSIS_DT_PHYS_ADDR	(1ULL << 59)	/* physical address */
+#define PDC_CHASSIS_DT_DATA_EXPECT	(2ULL << 59)	/* expected data */
+#define PDC_CHASSIS_DT_ACTUAL		(3ULL << 59)	/* actual data */
+#define PDC_CHASSIS_DT_PHYS_LOC		(4ULL << 59)	/* physical location */
+#define PDC_CHASSIS_DT_PHYS_LOC_EXT	(5ULL << 59)	/* physical location extension */
+#define PDC_CHASSIS_DT_TAG		(6ULL << 59)	/* tag */
+#define PDC_CHASSIS_DT_SYNDROME		(7ULL << 59)	/* syndrome */
+#define PDC_CHASSIS_DT_CODE_ADDR	(8ULL << 59)	/* code address */
+#define PDC_CHASSIS_DT_ASCII_MSG	(9ULL << 59)	/* ascii message */
+#define PDC_CHASSIS_DT_POST		(10ULL << 59)	/* POST code */
+#define PDC_CHASSIS_DT_TIMESTAMP	(11ULL << 59)	/* timestamp */
+#define PDC_CHASSIS_DT_DEV_STAT		(12ULL << 59)	/* device status */
+#define PDC_CHASSIS_DT_DEV_TYPE		(13ULL << 59)	/* device type */
+#define PDC_CHASSIS_DT_PB_DET		(14ULL << 59)	/* problem detail */
+#define PDC_CHASSIS_DT_ACT_LEV		(15ULL << 59)	/* activity level/timeout */
+#define PDC_CHASSIS_DT_SER_NUM		(16ULL << 59)	/* serial number */
+#define PDC_CHASSIS_DT_REV_NUM		(17ULL << 59)	/* revision number */
+#define PDC_CHASSIS_DT_INTERRUPT	(18ULL << 59)	/* interruption information */
+#define PDC_CHASSIS_DT_TEST_NUM		(19ULL << 59)	/* test number */
+#define PDC_CHASSIS_DT_STATE_CHG	(20ULL << 59)	/* major changes in system state */
+#define PDC_CHASSIS_DT_PROC_DEALLOC	(21ULL << 59)	/* processor deallocate */
+#define PDC_CHASSIS_DT_RESET		(30ULL << 59)	/* reset type and cause */
+#define PDC_CHASSIS_DT_PA_LEGACY	(31ULL << 59)	/* legacy PA hex chassis code */
+
+/* System states - part of major changes in system state data field */
+#define PDC_CHASSIS_SYSTATE_BSTART	(0ULL << 0)	/* boot start */
+#define PDC_CHASSIS_SYSTATE_BCOMP	(1ULL << 0)	/* boot complete */
+#define PDC_CHASSIS_SYSTATE_CHANGE	(2ULL << 0)	/* major change */
+#define PDC_CHASSIS_SYSTATE_LED		(3ULL << 0)	/* LED change */
+#define PDC_CHASSIS_SYSTATE_PANIC	(9ULL << 0)	/* OS Panic */
+#define PDC_CHASSIS_SYSTATE_DUMP	(10ULL << 0)	/* memory dump */
+#define PDC_CHASSIS_SYSTATE_HPMC	(11ULL << 0)	/* processing HPMC */
+#define PDC_CHASSIS_SYSTATE_HALT	(15ULL << 0)	/* system halted */
+
+/* Message ID */
+#define PDC_CHASSIS_MSG_ID		(0ULL << 40)	/* we do not handle msg IDs atm */
+
+/* EOM - separates log entries */
+#define PDC_CHASSIS_EOM_CLEAR		(0ULL << 43)
+#define PDC_CHASSIS_EOM_SET		(1ULL << 43)
+
+/*
+ * Preformated well known messages
+ */
+
+/* Boot started */
+#define PDC_CHASSIS_PMSG_BSTART		(PDC_CHASSIS_ALERT_SERPROC	| \
+					 PDC_CHASSIS_SRC_PROC		| \
+					 PDC_CHASSIS_SRC_D_PROC		| \
+					 PDC_CHASSIS_SRC_ID_UNSPEC	| \
+					 PDC_CHASSIS_PB_D_PROC_NONE	| \
+					 PDC_CHASSIS_CALL_ACT_HPUX_INIT	| \
+					 PDC_CHASSIS_ACT_STATUS_UNSPEC	| \
+					 PDC_CHASSIS_CALL_SACT_UNSPEC	| \
+					 PDC_CHASSIS_RET_HPUX		| \
+					 PDC_CHASSIS_REID_UNSPEC	| \
+					 PDC_CHASSIS_DT_STATE_CHG	| \
+					 PDC_CHASSIS_SYSTATE_BSTART	| \
+					 PDC_CHASSIS_MSG_ID		| \
+					 PDC_CHASSIS_EOM_SET		)
+
+/* Boot complete */
+#define PDC_CHASSIS_PMSG_BCOMPLETE	(PDC_CHASSIS_ALERT_SERPROC	| \
+					 PDC_CHASSIS_SRC_PROC		| \
+					 PDC_CHASSIS_SRC_D_PROC		| \
+					 PDC_CHASSIS_SRC_ID_UNSPEC	| \
+					 PDC_CHASSIS_PB_D_PROC_NONE	| \
+					 PDC_CHASSIS_CALL_ACT_HPUX_INIT	| \
+					 PDC_CHASSIS_ACT_STATUS_UNSPEC	| \
+					 PDC_CHASSIS_CALL_SACT_UNSPEC	| \
+					 PDC_CHASSIS_RET_HPUX		| \
+					 PDC_CHASSIS_REID_UNSPEC	| \
+					 PDC_CHASSIS_DT_STATE_CHG	| \
+					 PDC_CHASSIS_SYSTATE_BCOMP	| \
+					 PDC_CHASSIS_MSG_ID		| \
+					 PDC_CHASSIS_EOM_SET		)
+
+/* Shutdown */
+#define PDC_CHASSIS_PMSG_SHUTDOWN	(PDC_CHASSIS_ALERT_SERPROC	| \
+					 PDC_CHASSIS_SRC_PROC		| \
+					 PDC_CHASSIS_SRC_D_PROC		| \
+					 PDC_CHASSIS_SRC_ID_UNSPEC	| \
+					 PDC_CHASSIS_PB_D_PROC_NONE	| \
+					 PDC_CHASSIS_CALL_ACT_HPUX_SHUT	| \
+					 PDC_CHASSIS_ACT_STATUS_UNSPEC	| \
+					 PDC_CHASSIS_CALL_SACT_UNSPEC	| \
+					 PDC_CHASSIS_RET_HPUX		| \
+					 PDC_CHASSIS_REID_UNSPEC	| \
+					 PDC_CHASSIS_DT_STATE_CHG	| \
+					 PDC_CHASSIS_SYSTATE_HALT	| \
+					 PDC_CHASSIS_MSG_ID		| \
+					 PDC_CHASSIS_EOM_SET		)
+
+/* Panic */
+#define PDC_CHASSIS_PMSG_PANIC		(PDC_CHASSIS_ALERT_SOFT_FAIL	| \
+					 PDC_CHASSIS_SRC_PROC		| \
+					 PDC_CHASSIS_SRC_D_PROC		| \
+					 PDC_CHASSIS_SRC_ID_UNSPEC	| \
+					 PDC_CHASSIS_PB_D_PROC_NONE	| \
+					 PDC_CHASSIS_CALL_ACT_HPUX_PANIC| \
+					 PDC_CHASSIS_ACT_STATUS_UNSPEC	| \
+					 PDC_CHASSIS_CALL_SACT_UNSPEC	| \
+					 PDC_CHASSIS_RET_HPUX		| \
+					 PDC_CHASSIS_REID_UNSPEC	| \
+					 PDC_CHASSIS_DT_STATE_CHG	| \
+					 PDC_CHASSIS_SYSTATE_PANIC	| \
+					 PDC_CHASSIS_MSG_ID		| \
+					 PDC_CHASSIS_EOM_SET		)
+
+// FIXME: extrapolated data
+/* HPMC */
+#define PDC_CHASSIS_PMSG_HPMC		(PDC_CHASSIS_ALERT_CONF_CHG /*?*/	| \
+					 PDC_CHASSIS_SRC_PROC		| \
+					 PDC_CHASSIS_SRC_D_PROC		| \
+					 PDC_CHASSIS_SRC_ID_UNSPEC	| \
+					 PDC_CHASSIS_PB_D_PROC_NONE	| \
+					 PDC_CHASSIS_CALL_ACT_HPUX_WARN	| \
+					 PDC_CHASSIS_RET_HPUX		| \
+					 PDC_CHASSIS_DT_STATE_CHG	| \
+					 PDC_CHASSIS_SYSTATE_HPMC	| \
+					 PDC_CHASSIS_MSG_ID		| \
+					 PDC_CHASSIS_EOM_SET		)
+
+/* LPMC */
+#define PDC_CHASSIS_PMSG_LPMC		(PDC_CHASSIS_ALERT_BLOCKED /*?*/| \
+					 PDC_CHASSIS_SRC_PROC		| \
+					 PDC_CHASSIS_SRC_D_PROC		| \
+					 PDC_CHASSIS_SRC_ID_UNSPEC	| \
+					 PDC_CHASSIS_PB_D_PROC_NONE	| \
+					 PDC_CHASSIS_CALL_ACT_HPUX_WARN	| \
+					 PDC_CHASSIS_ACT_STATUS_UNSPEC	| \
+					 PDC_CHASSIS_CALL_SACT_UNSPEC	| \
+					 PDC_CHASSIS_RET_HPUX		| \
+					 PDC_CHASSIS_REID_UNSPEC	| \
+					 PDC_CHASSIS_DT_STATE_CHG	| \
+					 PDC_CHASSIS_SYSTATE_CHANGE	| \
+					 PDC_CHASSIS_MSG_ID		| \
+					 PDC_CHASSIS_EOM_SET		)
+
+#endif /* _PARISC_PDC_CHASSIS_H */
+/* vim: set ts=8 */
diff -Nru a/include/asm-parisc/percpu.h b/include/asm-parisc/percpu.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/percpu.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,7 @@
+#ifndef _PARISC_PERCPU_H
+#define _PARISC_PERCPU_H
+
+#include <asm-generic/percpu.h>
+
+#endif 
+
diff -Nru a/include/asm-parisc/perf.h b/include/asm-parisc/perf.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/perf.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,74 @@
+#ifndef _ASM_PERF_H_
+#define _ASM_PERF_H_
+
+/* ioctls */
+#define PA_PERF_ON	_IO('p', 1)
+#define PA_PERF_OFF	_IOR('p', 2, unsigned int)
+#define PA_PERF_VERSION	_IOR('p', 3, int)
+
+#define PA_PERF_DEV	"perf"
+#define PA_PERF_MINOR	146
+
+/* Interface types */
+#define UNKNOWN_INTF    255
+#define ONYX_INTF         0
+#define CUDA_INTF         1
+
+/* Common Onyx and Cuda images */
+#define CPI                 0
+#define BUSUTIL             1
+#define TLBMISS             2
+#define TLBHANDMISS         3
+#define PTKN                4
+#define PNTKN               5
+#define IMISS               6
+#define DMISS               7
+#define DMISS_ACCESS        8 
+#define BIG_CPI 	    9
+#define BIG_LS		   10  
+#define BR_ABORT	   11
+#define ISNT		   12 
+#define QUADRANT           13
+#define RW_PDFET           14
+#define RW_WDFET           15
+#define SHLIB_CPI          16
+
+/* Cuda only Images */
+#define FLOPS              17
+#define CACHEMISS          18 
+#define BRANCHES           19             
+#define CRSTACK            20 
+#define I_CACHE_SPEC       21 
+#define MAX_CUDA_IMAGES    22 
+
+/* Onyx only Images */
+#define ADDR_INV_ABORT_ALU 17
+#define BRAD_STALL	   18 
+#define CNTL_IN_PIPEL	   19 
+#define DSNT_XFH	   20 
+#define FET_SIG1	   21 
+#define FET_SIG2	   22 
+#define G7_1		   23 
+#define G7_2		   24 
+#define G7_3 		   25
+#define G7_4		   26
+#define MPB_LABORT         27
+#define PANIC              28
+#define RARE_INST          29 
+#define RW_DFET            30 
+#define RW_IFET            31 
+#define RW_SDFET           32 
+#define SPEC_IFET          33 
+#define ST_COND0           34 
+#define ST_COND1           35 
+#define ST_COND2           36
+#define ST_COND3           37
+#define ST_COND4           38
+#define ST_UNPRED0         39 
+#define ST_UNPRED1         40 
+#define UNPRED             41 
+#define GO_STORE           42
+#define SHLIB_CALL         43
+#define MAX_ONYX_IMAGES    44
+
+#endif
diff -Nru a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h
--- a/include/asm-parisc/pgalloc.h	Wed Oct 30 16:44:34 2002
+++ b/include/asm-parisc/pgalloc.h	Wed Oct 30 16:44:34 2002
@@ -1,407 +1,101 @@
 #ifndef _ASM_PGALLOC_H
 #define _ASM_PGALLOC_H
 
-/* The usual comment is "Caches aren't brain-dead on the <architecture>".
- * Unfortunately, that doesn't apply to PA-RISC. */
-
+#include <linux/config.h>
+#include <linux/gfp.h>
+#include <linux/mm.h>
+#include <linux/threads.h>
 #include <asm/processor.h>
 #include <asm/fixmap.h>
-#include <linux/threads.h>
 
 #include <asm/pgtable.h>
 #include <asm/cache.h>
 
-
-/* Internal use D/I cache flushing routines... */
-/* XXX: these functions must not access memory between f[di]ce instructions. */
-
-static inline void __flush_dcache_range(unsigned long start, unsigned long size)
-{
-#if 0
-	register unsigned long count = (size / L1_CACHE_BYTES);
-	register unsigned long loop = cache_info.dc_loop;
-	register unsigned long i, j;
-
-	if (size > 64 * 1024) {
-		/* Just punt and clear the whole damn thing */
-		flush_data_cache();
-		return;
-	}
-
-	for(i = 0; i <= count; i++, start += L1_CACHE_BYTES)
-		for(j = 0; j < loop; j++)
-			fdce(start);
-#else
-	flush_data_cache();
-#endif
-}
-
-
-static inline void __flush_icache_range(unsigned long start, unsigned long size)
-{
-#if 0
-	register unsigned long count = (size / L1_CACHE_BYTES);
-	register unsigned long loop = cache_info.ic_loop;
-	register unsigned long i, j;
-
-	if (size > 64 * 1024) {
-		/* Just punt and clear the whole damn thing */
-		flush_instruction_cache();
-		return;
-	}
-
-	for(i = 0; i <= count; i++, start += L1_CACHE_BYTES)
-		for(j = 0; j < loop; j++)
-			fice(start);
-#else
-	flush_instruction_cache();
-#endif
-}
-
-static inline void
-flush_kernel_dcache_range(unsigned long start, unsigned long size)
-{
-	register unsigned long end = start + size;
-	register unsigned long i;
-
-	start &= ~(L1_CACHE_BYTES - 1);
-	for (i = start; i < end; i += L1_CACHE_BYTES) {
-		kernel_fdc(i);
-	}
-	asm volatile("sync" : : );
-	asm volatile("syncdma" : : );
-}
-
-extern void __flush_page_to_ram(unsigned long address);
-
-#define flush_cache_all()			flush_all_caches()
-#define flush_cache_mm(foo)			flush_all_caches()
-
-#if 0
-/* This is how I think the cache flushing should be done -- mrw */
-extern inline void flush_cache_mm(struct mm_struct *mm) {
-	if (mm == current->mm) {
-		flush_user_dcache_range(mm->start_data, mm->end_data);
-		flush_user_icache_range(mm->start_code, mm->end_code);
-	} else {
-		flush_other_dcache_range(mm->context, mm->start_data, mm->end_data);
-		flush_other_icache_range(mm->context, mm->start_code, mm->end_code);
-	}
-}
-#endif
-
-#define flush_cache_range(vma, start, end) do { \
-                __flush_dcache_range(start, (unsigned long)end - (unsigned long)start); \
-                __flush_icache_range(start, (unsigned long)end - (unsigned long)start); \
-} while(0)
-
-#define flush_cache_page(vma, vmaddr) do { \
-                __flush_dcache_range(vmaddr, PAGE_SIZE); \
-                __flush_icache_range(vmaddr, PAGE_SIZE); \
-} while(0)
-
-#define flush_page_to_ram(page)	\
-        __flush_page_to_ram((unsigned long)page_address(page))
-
-#define flush_icache_range(start, end) \
-        __flush_icache_range(start, end - start)
-
-#define flush_icache_user_range(vma, page, addr, len) \
-	flush_icache_page((vma), (page))
-
-#define flush_icache_page(vma, page) \
-	__flush_icache_range(page_address(page), PAGE_SIZE)
-
-#define flush_dcache_page(page) \
-	__flush_dcache_range(page_address(page), PAGE_SIZE)
-
-/* TLB flushing routines.... */
-
-extern void flush_data_tlb(void);
-extern void flush_instruction_tlb(void);
-
-#define flush_tlb() do { \
-        flush_data_tlb(); \
-	flush_instruction_tlb(); \
-} while(0)
-
-#define flush_tlb_all() 	flush_tlb()	/* XXX p[id]tlb */
-
-extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end)
-{
-}
- 
-static inline void flush_instruction_tlb_range(unsigned long start,
-					unsigned long size)
-{
-#if 0
-	register unsigned long count = (size / PAGE_SIZE);
-	register unsigned long loop = cache_info.it_loop;
-	register unsigned long i, j;
-	
-	for(i = 0; i <= count; i++, start += PAGE_SIZE)
-		for(j = 0; j < loop; j++)
-			pitlbe(start);
-#else
-	flush_instruction_tlb();
-#endif
-}
-
-static inline void flush_data_tlb_range(unsigned long start,
-					unsigned long size)
-{
-#if 0
-	register unsigned long count = (size / PAGE_SIZE);
-	register unsigned long loop = cache_info.dt_loop;
-	register unsigned long i, j;
-	
-	for(i = 0; i <= count; i++, start += PAGE_SIZE)
-		for(j = 0; j < loop; j++)
-			pdtlbe(start);
-#else
-	flush_data_tlb();
-#endif
-}
-
-
-
-static inline void __flush_tlb_range(unsigned long space, unsigned long start,
-		       unsigned long size)
-{
-	unsigned long old_sr1;
-
-	if(!size)
-		return;
-
-	old_sr1 = mfsp(1);
-	mtsp(space, 1);
-	
-	flush_data_tlb_range(start, size);
-	flush_instruction_tlb_range(start, size);
-
-	mtsp(old_sr1, 1);
-}
-
-extern void __flush_tlb_space(unsigned long space);
-
-static inline void flush_tlb_mm(struct mm_struct *mm)
-{
-#if 0
-	__flush_tlb_space(mm->context);
-#else
-	flush_tlb();
-#endif
-}
-
-static inline void flush_tlb_page(struct vm_area_struct *vma,
-	unsigned long addr)
-{
-	__flush_tlb_range(vma->vm_mm->context, addr, PAGE_SIZE);
-		
-}
-
-static inline void flush_tlb_range(struct vm_area_struct *vma,
-	unsigned long start, unsigned long end)
-{
-	__flush_tlb_range(vma->vm_mm->context, start, end - start);
-}
-
-/*
- * NOTE: Many of the below macros use PT_NLEVELS because
- *       it is convenient that PT_NLEVELS == LOG2(pte size in bytes),
- *       i.e. we use 3 level page tables when we use 8 byte pte's
- *       (for 64 bit) and 2 level page tables when we use 4 byte pte's
- */
-
-#ifdef __LP64__
-#define PT_NLEVELS 3
-#define PT_INITIAL 4 /* Number of initial page tables */
-#else
-#define PT_NLEVELS 2
-#define PT_INITIAL 2 /* Number of initial page tables */
-#endif
-
-/* Definitions for 1st level */
-
-#define PGDIR_SHIFT  (PAGE_SHIFT + (PT_NLEVELS - 1)*(PAGE_SHIFT - PT_NLEVELS))
-#define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
-#define PGDIR_MASK	(~(PGDIR_SIZE-1))
-#define PTRS_PER_PGD    (1UL << (PAGE_SHIFT - PT_NLEVELS))
-#define USER_PTRS_PER_PGD	(TASK_SIZE/PGDIR_SIZE)
-
-/* Definitions for 2nd level */
-
-#define PMD_SHIFT       (PAGE_SHIFT + (PAGE_SHIFT - PT_NLEVELS))
-#define PMD_SIZE	(1UL << PMD_SHIFT)
-#define PMD_MASK	(~(PMD_SIZE-1))
-#if PT_NLEVELS == 3
-#define PTRS_PER_PMD    (1UL << (PAGE_SHIFT - PT_NLEVELS))
-#else
-#define PTRS_PER_PMD    1
-#endif
-
-/* Definitions for 3rd level */
-
-#define PTRS_PER_PTE    (1UL << (PAGE_SHIFT - PT_NLEVELS))
-
-
-#define get_pgd_fast get_pgd_slow
-#define free_pgd_fast free_pgd_slow
-
-extern __inline__ pgd_t *get_pgd_slow(void)
+static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 {
-	extern unsigned long gateway_pgd_offset;
-	extern unsigned long gateway_pgd_entry;
-	pgd_t *ret = (pgd_t *)__get_free_page(GFP_KERNEL);
-
-	if (ret) {
-	    memset (ret, 0, PTRS_PER_PGD * sizeof(pgd_t));
-
-	    /* Install HP-UX and Linux gateway page translations */
-
-	    pgd_val(*(ret + gateway_pgd_offset)) = gateway_pgd_entry;
-	}
-	return ret;
+	pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
+	if (likely(pgd != NULL))
+		clear_page(pgd);
+	return pgd;
 }
 
-extern __inline__ void free_pgd_slow(pgd_t *pgd)
+static inline void pgd_free(pgd_t *pgd)
 {
 	free_page((unsigned long)pgd);
 }
 
-#if PT_NLEVELS == 3
+#ifdef __LP64__
 
 /* Three Level Page Table Support for pmd's */
 
-extern __inline__ pmd_t *get_pmd_fast(void)
+static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd)
 {
-	return NULL; /* la la */
+	pgd_val(*pgd) = _PAGE_TABLE + __pa((unsigned long)pmd);
 }
 
-#if 0
-extern __inline__ void free_pmd_fast(pmd_t *pmd)
-{
-}
-#else
-#define free_pmd_fast free_pmd_slow
-#endif
-
-extern __inline__ pmd_t *get_pmd_slow(void)
+static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
 {
 	pmd_t *pmd = (pmd_t *) __get_free_page(GFP_KERNEL);
-
 	if (pmd)
 		clear_page(pmd);
 	return pmd;
 }
 
-extern __inline__ void free_pmd_slow(pmd_t *pmd)
+static inline void pmd_free(pmd_t *pmd)
 {
 	free_page((unsigned long)pmd);
 }
 
-extern void __bad_pgd(pgd_t *pgd);
-
-extern inline pmd_t * pmd_alloc(pgd_t *pgd, unsigned long address)
-{
-	address = (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
-
-	if (pgd_none(*pgd))
-		goto getnew;
-	if (pgd_bad(*pgd))
-		goto fix;
-	return (pmd_t *) pgd_page(*pgd) + address;
-getnew:
-{
-	pmd_t *page = get_pmd_fast();
-	
-	if (!page)
-		page = get_pmd_slow();
-	if (page) {
-		if (pgd_none(*pgd)) {
-		    pgd_val(*pgd) = _PAGE_TABLE + __pa((unsigned long)page);
-		    return page + address;
-		}
-		else
-		    free_pmd_fast(page);
-	}
-	else {
-		return NULL;
-	}
-}
-fix:
-	__bad_pgd(pgd);
-	return NULL;
-}
-
 #else
 
 /* Two Level Page Table Support for pmd's */
 
-extern inline pmd_t * pmd_alloc(pgd_t * pgd, unsigned long address)
-{
-	return (pmd_t *) pgd;
-}
+/*
+ * allocating and freeing a pmd is trivial: the 1-entry pmd is
+ * inside the pgd, so has no extra memory associated with it.
+ */
 
-extern inline void free_pmd_fast(pmd_t * pmd)
-{
-}
+#define pmd_alloc_one(mm, addr)		({ BUG(); ((pmd_t *)2); })
+#define pmd_free(x)			do { } while (0)
+#define pgd_populate(mm, pmd, pte)	BUG()
 
 #endif
 
-extern __inline__ pte_t *get_pte_fast(void)
+static inline void
+pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
 {
-	return NULL; /* la la */
+	pmd_val(*pmd) = _PAGE_TABLE + __pa((unsigned long)pte);
 }
 
-#if 0
-extern __inline__ void free_pte_fast(pte_t *pte)
-{
-}
-#else
-#define free_pte_fast free_pte_slow
-#endif
-
-extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
+#define pmd_populate(mm, pmd, pte_page) \
+	pmd_populate_kernel(mm, pmd, page_address(pte_page))
 
-extern __inline__ void free_pte_slow(pte_t *pte)
+static inline struct page *
+pte_alloc_one(struct mm_struct *mm, unsigned long address)
 {
-	free_page((unsigned long)pte);
+	struct page *page = alloc_page(GFP_KERNEL);
+	if (likely(page != NULL))
+		clear_page(page_address(page));
+	return page;
 }
 
-#define pmd_alloc_kernel	pmd_alloc
-#define pte_alloc_kernel	pte_alloc
-
-#define pte_free(pte)		free_pte_fast(pte)
-#define pmd_free(pmd)           free_pmd_fast(pmd)
-#define pgd_free(pgd)		free_pgd_fast(pgd)
-#define pgd_alloc(mm)		get_pgd_fast()
-
-extern void __bad_pmd(pmd_t *pmd);
-
-extern inline pte_t * pte_alloc(pmd_t * pmd, unsigned long address)
+static inline pte_t *
+pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
 {
-	address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
+	pte_t *pte = (pte_t *) __get_free_page(GFP_KERNEL);
+	if (likely(pte != NULL))
+		clear_page(pte);
+	return pte;
+}
 
-	if (pmd_none(*pmd))
-		goto getnew;
-	if (pmd_bad(*pmd))
-		goto fix;
-	return (pte_t *) pmd_page(*pmd) + address;
-getnew:
+static inline void pte_free_kernel(pte_t *pte)
 {
-	pte_t *page = get_pte_fast();
-	
-	if (!page)
-		return get_pte_slow(pmd, address);
-	pmd_val(*pmd) = _PAGE_TABLE + __pa((unsigned long)page);
-	return page + address;
-}
-fix:
-	__bad_pmd(pmd);
-	return NULL;
+	free_page((unsigned long)pte);
 }
 
+#define pte_free(page)	pte_free_kernel(page_address(page))
+
 extern int do_check_pgt_cache(int, int);
+#define check_pgt_cache()	do { } while (0)
 
 #endif
diff -Nru a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h
--- a/include/asm-parisc/pgtable.h	Wed Oct 30 16:44:32 2002
+++ b/include/asm-parisc/pgtable.h	Wed Oct 30 16:44:32 2002
@@ -1,43 +1,19 @@
 #ifndef _PARISC_PGTABLE_H
 #define _PARISC_PGTABLE_H
 
+#include <asm/fixmap.h>
+
 #ifndef __ASSEMBLY__
 /*
  * we simulate an x86-style page table for the linux mm code
  */
 
+#include <linux/spinlock.h>
 #include <asm/processor.h>
-#include <asm/fixmap.h>
 #include <asm/cache.h>
+#include <asm/bitops.h>
 
-/* To make 53c7xx.c happy */
-
-#define IOMAP_FULL_CACHING	2		/* used for 'what' below */
-#define IOMAP_NOCACHE_SER	3
-
-extern void kernel_set_cachemode(unsigned long addr,
-				    unsigned long size, int what);
-
-/*
- * cache_clear() semantics: Clear any cache entries for the area in question,
- * without writing back dirty entries first. This is useful if the data will
- * be overwritten anyway, e.g. by DMA to memory. The range is defined by a
- * _physical_ address.
- */
-#define cache_clear(paddr, len)			do { } while (0)
-/*
- * cache_push() semantics: Write back any dirty cache data in the given area,
- * and invalidate the range in the instruction cache. It needs not (but may)
- * invalidate those entries also in the data cache. The range is defined by a
- * _physical_ address.
- */
-#define cache_push(paddr, len) \
-	do { \
-		unsigned long vaddr = phys_to_virt(paddr); \
-		flush_cache_range(0, vaddr, vaddr + len); \
-	} while(0)
-#define cache_push_v(vaddr, len) \
-			flush_cache_range(0, vaddr, vaddr + len)
+#define ARCH_STACK_GROWSUP
 
 /*
  * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
@@ -63,8 +39,6 @@
                 *(pteptr) = (pteval);                           \
         } while(0)
 
-
-
 #endif /* !__ASSEMBLY__ */
 
 #define pte_ERROR(e) \
@@ -74,11 +48,62 @@
 #define pgd_ERROR(e) \
 	printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
 
+ /* Note: If you change ISTACK_SIZE, you need to change the corresponding
+  * values in vmlinux.lds and vmlinux64.lds (init_istack section). Also,
+  * the "order" and size need to agree.
+  */
+
+#define  ISTACK_SIZE  32768 /* Interrupt Stack Size */
+#define  ISTACK_ORDER 3
+
+/*
+ * NOTE: Many of the below macros use PT_NLEVELS because
+ *       it is convenient that PT_NLEVELS == LOG2(pte size in bytes),
+ *       i.e. we use 3 level page tables when we use 8 byte pte's
+ *       (for 64 bit) and 2 level page tables when we use 4 byte pte's
+ */
+
+#ifdef __LP64__
+#define PT_NLEVELS 3
+#define PT_INITIAL 4 /* Number of initial page tables */
+#else
+#define PT_NLEVELS 2
+#define PT_INITIAL 2 /* Number of initial page tables */
+#endif
+
+#define MAX_ADDRBITS (PAGE_SHIFT + (PT_NLEVELS)*(PAGE_SHIFT - PT_NLEVELS))
+#define MAX_ADDRESS (1UL << MAX_ADDRBITS)
+
+#define SPACEID_SHIFT (MAX_ADDRBITS - 32)
+
+/* Definitions for 1st level */
+
+#define PGDIR_SHIFT  (PAGE_SHIFT + (PT_NLEVELS - 1)*(PAGE_SHIFT - PT_NLEVELS))
+#define PGDIR_SIZE	(1UL << PGDIR_SHIFT)
+#define PGDIR_MASK	(~(PGDIR_SIZE-1))
+#define PTRS_PER_PGD    (1UL << (PAGE_SHIFT - PT_NLEVELS))
+#define USER_PTRS_PER_PGD       PTRS_PER_PGD
+
+/* Definitions for 2nd level */
+#define pgtable_cache_init()	do { } while (0)
+
+#define PMD_SHIFT       (PAGE_SHIFT + (PAGE_SHIFT - PT_NLEVELS))
+#define PMD_SIZE	(1UL << PMD_SHIFT)
+#define PMD_MASK	(~(PMD_SIZE-1))
+#if PT_NLEVELS == 3
+#define PTRS_PER_PMD    (1UL << (PAGE_SHIFT - PT_NLEVELS))
+#else
+#define PTRS_PER_PMD    1
+#endif
+
+/* Definitions for 3rd level */
+
+#define PTRS_PER_PTE    (1UL << (PAGE_SHIFT - PT_NLEVELS))
+
 /*
  * pgd entries used up by user/kernel:
  */
 
-#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
 #define FIRST_USER_PGD_NR	0
 
 #ifndef __ASSEMBLY__
@@ -89,35 +114,43 @@
 #define VMALLOC_END	(FIXADDR_START)
 #endif
 
-#define _PAGE_READ	0x001	/* read access allowed */
-#define _PAGE_WRITE	0x002	/* write access allowed */
-#define _PAGE_EXEC	0x004	/* execute access allowed */
-#define _PAGE_GATEWAY	0x008	/* privilege promotion allowed */
-#define _PAGE_GATEWAY_BIT 28	/* _PAGE_GATEWAY & _PAGE_GATEWAY_BIT need */
-				/* to agree. One could be defined in relation */
-				/* to the other, but that's kind of ugly. */
-
-				/* 0x010 reserved (B bit) */
-#define _PAGE_DIRTY	0x020	/* D: dirty */
-				/* 0x040 reserved (T bit) */
-#define _PAGE_NO_CACHE  0x080   /* Software: Uncacheable */
-#define _PAGE_NO_CACHE_BIT 24   /* Needs to agree with _PAGE_NO_CACHE above */
-#define _PAGE_ACCESSED	0x100	/* R: page cache referenced */
-#define _PAGE_PRESENT   0x200   /* Software: pte contains a translation */
-#define _PAGE_PRESENT_BIT  22   /* Needs to agree with _PAGE_PRESENT above */
-#define _PAGE_USER      0x400   /* Software: User accessable page */
-#define _PAGE_USER_BIT     21   /* Needs to agree with _PAGE_USER above */
-				/* 0x800 still available */
-
-#ifdef __ASSEMBLY__
-#define _PGB_(x)	(1 << (63 - (x)))
-#define __PAGE_O	_PGB_(13)
-#define __PAGE_U	_PGB_(12)
-#define __PAGE_T	_PGB_(2)
-#define __PAGE_D	_PGB_(3)
-#define __PAGE_B	_PGB_(4)
-#define __PAGE_P	_PGB_(14)
-#endif
+/* NB: The tlb miss handlers make certain assumptions about the order */
+/*     of the following bits, so be careful (One example, bits 25-31  */
+/*     are moved together in one instruction).                        */
+
+#define _PAGE_READ_BIT     31   /* (0x001) read access allowed */
+#define _PAGE_WRITE_BIT    30   /* (0x002) write access allowed */
+#define _PAGE_EXEC_BIT     29   /* (0x004) execute access allowed */
+#define _PAGE_GATEWAY_BIT  28   /* (0x008) privilege promotion allowed */
+#define _PAGE_DMB_BIT      27   /* (0x010) Data Memory Break enable (B bit) */
+#define _PAGE_DIRTY_BIT    26   /* (0x020) Page Dirty (D bit) */
+#define _PAGE_REFTRAP_BIT  25   /* (0x040) Page Ref. Trap enable (T bit) */
+#define _PAGE_NO_CACHE_BIT 24   /* (0x080) Uncached Page (U bit) */
+#define _PAGE_ACCESSED_BIT 23   /* (0x100) Software: Page Accessed */
+#define _PAGE_PRESENT_BIT  22   /* (0x200) Software: translation valid */
+#define _PAGE_FLUSH_BIT    21   /* (0x400) Software: translation valid */
+				/*             for cache flushing only */
+#define _PAGE_USER_BIT     20   /* (0x800) Software: User accessable page */
+
+/* N.B. The bits are defined in terms of a 32 bit word above, so the */
+/*      following macro is ok for both 32 and 64 bit.                */
+
+#define xlate_pabit(x) (31 - x)
+
+#define _PAGE_READ     (1 << xlate_pabit(_PAGE_READ_BIT))
+#define _PAGE_WRITE    (1 << xlate_pabit(_PAGE_WRITE_BIT))
+#define _PAGE_RW       (_PAGE_READ | _PAGE_WRITE)
+#define _PAGE_EXEC     (1 << xlate_pabit(_PAGE_EXEC_BIT))
+#define _PAGE_GATEWAY  (1 << xlate_pabit(_PAGE_GATEWAY_BIT))
+#define _PAGE_DMB      (1 << xlate_pabit(_PAGE_DMB_BIT))
+#define _PAGE_DIRTY    (1 << xlate_pabit(_PAGE_DIRTY_BIT))
+#define _PAGE_REFTRAP  (1 << xlate_pabit(_PAGE_REFTRAP_BIT))
+#define _PAGE_NO_CACHE (1 << xlate_pabit(_PAGE_NO_CACHE_BIT))
+#define _PAGE_ACCESSED (1 << xlate_pabit(_PAGE_ACCESSED_BIT))
+#define _PAGE_PRESENT  (1 << xlate_pabit(_PAGE_PRESENT_BIT))
+#define _PAGE_FLUSH    (1 << xlate_pabit(_PAGE_FLUSH_BIT))
+#define _PAGE_USER     (1 << xlate_pabit(_PAGE_USER_BIT))
+
 #define _PAGE_TABLE	(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE |  _PAGE_DIRTY | _PAGE_ACCESSED)
 #define _PAGE_CHG_MASK	(PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
 #define _PAGE_KERNEL	(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_WRITE | _PAGE_DIRTY | _PAGE_ACCESSED)
@@ -138,6 +171,7 @@
 #define PAGE_KERNEL_RO	__pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_DIRTY | _PAGE_ACCESSED)
 #define PAGE_KERNEL_UNC	__pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
 #define PAGE_GATEWAY    __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ)
+#define PAGE_FLUSH      __pgprot(_PAGE_FLUSH)
 
 
 /*
@@ -167,7 +201,7 @@
 #define __S110  PAGE_RWX
 #define __S111  PAGE_RWX
 
-extern unsigned long swapper_pg_dir[]; /* declared in init_task.c */
+extern pgd_t swapper_pg_dir[]; /* declared in init_task.c */
 
 /* initial page tables for 0-8MB for kernel */
 
@@ -178,23 +212,15 @@
 extern unsigned long *empty_zero_page;
 
 /*
- * BAD_PAGETABLE is used when we need a bogus page-table, while
- * BAD_PAGE is used for a bogus page.
- *
  * ZERO_PAGE is a global shared page that is always zero: used
  * for zero-mapped memory areas etc..
  */
-extern pte_t __bad_page(void);
-extern pte_t * __bad_pagetable(void);
 
-#define BAD_PAGETABLE __bad_pagetable()
-#define BAD_PAGE __bad_page()
 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
 
-#define pte_none(x)	(!pte_val(x))
+#define pte_none(x)     ((pte_val(x) == 0) || (pte_val(x) & _PAGE_FLUSH))
 #define pte_present(x)	(pte_val(x) & _PAGE_PRESENT)
 #define pte_clear(xp)	do { pte_val(*(xp)) = 0; } while (0)
-#define pte_pagenr(x)	((unsigned long)((pte_val(x) >> PAGE_SHIFT)))
 
 #define pmd_none(x)	(!pmd_val(x))
 #define pmd_bad(x)	((pmd_val(x) & ~PAGE_MASK) != _PAGE_TABLE)
@@ -255,14 +281,14 @@
 	__pte;								\
 })
 
-#define mk_pte(page,pgprot) \
-({									\
-	pte_t __pte;							\
-									\
-	pte_val(__pte) = ((page)-mem_map)*PAGE_SIZE +			\
-				pgprot_val(pgprot);			\
-	__pte;								\
-})
+#define mk_pte(page, pgprot)	pfn_pte(page_to_pfn(page), (pgprot))
+
+static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
+{
+	pte_t pte;
+	pte_val(pte) = (pfn << PAGE_SHIFT) | pgprot_val(pgprot);
+	return pte;
+}
 
 /* This takes a physical page address that is used by the remapping functions */
 #define mk_pte_phys(physpage, pgprot) \
@@ -271,15 +297,20 @@
 extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
 
-/*
- * Permanent address of a page. Obviously must never be
- * called on a highmem page.
- */
-#define __page_address(page) ({ if (PageHighMem(page)) BUG(); PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT); })
-#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
-#define pte_page(x) (mem_map+pte_pagenr(x))
+/* Permanent address of a page.  On parisc we don't have highmem. */
+
+#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)
+
+#ifdef CONFIG_DISCONTIGMEM
+#define pte_page(x) (phys_to_page(pte_val(x)))
+#else
+#define pte_page(x) (mem_map+(pte_val(x) >> PAGE_SHIFT))
+#endif
+
+#define pmd_page_kernel(pmd)	((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
 
-#define pmd_page(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+#define __pmd_page(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+#define pmd_page(pmd)	virt_to_page((void *)__pmd_page(pmd))
 
 #define pgd_index(address) ((address) >> PGDIR_SHIFT)
 
@@ -300,31 +331,110 @@
 #endif
 
 /* Find an entry in the third-level page table.. */ 
-#define pte_offset(pmd, address) \
-((pte_t *) pmd_page(*(pmd)) + (((address)>>PAGE_SHIFT) & (PTRS_PER_PTE-1)))
+#define __pte_offset(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE-1))
+#define pte_offset_kernel(pmd, address) \
+	((pte_t *) pmd_page_kernel(*(pmd)) + __pte_offset(address))
+#define pte_offset_map(pmd, address) pte_offset_kernel(pmd, address)
+#define pte_offset_map_nested(pmd, address) pte_offset_kernel(pmd, address)
+#define pte_unmap(pte) do { } while (0)
+#define pte_unmap_nested(pte) do { } while (0)
+
+#define pte_unmap(pte)			do { } while (0)
+#define pte_unmap_nested(pte)		do { } while (0)
 
 extern void paging_init (void);
 
-extern inline void update_mmu_cache(struct vm_area_struct * vma,
-	unsigned long address, pte_t pte)
-{
-}
+/* Used for deferring calls to flush_dcache_page() */
+
+#define PG_dcache_dirty         PG_arch_1
+
+struct vm_area_struct; /* forward declaration (include/linux/mm.h) */
+extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
 
 /* Encode and de-code a swap entry */
 
-#define __swp_type(x)                     ((x).val & 0x3f)
-#define __swp_offset(x)                   ( (((x).val >> 6) &  0x7) | \
-					  (((x).val >> 7) & ~0x7) )
+#define __swp_type(x)                     ((x).val & 0x1f)
+#define __swp_offset(x)                   ( (((x).val >> 5) &  0xf) | \
+					  (((x).val >> 7) & ~0xf) )
 #define __swp_entry(type, offset)         ((swp_entry_t) { (type) | \
-					    ((offset &  0x7) << 6) | \
-					    ((offset & ~0x7) << 7) })
+					    ((offset &  0xf) << 5) | \
+					    ((offset & ~0xf) << 7) })
 #define __pte_to_swp_entry(pte)		((swp_entry_t) { pte_val(pte) })
 #define __swp_entry_to_pte(x)		((pte_t) { (x).val })
 
-#define module_map	vmalloc
-#define module_unmap	vfree
+static inline int ptep_test_and_clear_young(pte_t *ptep)
+{
+#ifdef CONFIG_SMP
+	return test_and_clear_bit(xlate_pabit(_PAGE_ACCESSED_BIT), ptep);
+#else
+	pte_t pte = *ptep;
+	if (!pte_young(pte))
+		return 0;
+	set_pte(ptep, pte_mkold(pte));
+	return 1;
+#endif
+}
 
-#include <asm-generic/pgtable.h>
+static inline int ptep_test_and_clear_dirty(pte_t *ptep)
+{
+#ifdef CONFIG_SMP
+	return test_and_clear_bit(xlate_pabit(_PAGE_DIRTY_BIT), ptep);
+#else
+	pte_t pte = *ptep;
+	if (!pte_dirty(pte))
+		return 0;
+	set_pte(ptep, pte_mkclean(pte));
+	return 1;
+#endif
+}
+
+#ifdef CONFIG_SMP
+extern spinlock_t pa_dbit_lock;
+#else
+static int pa_dbit_lock; /* dummy to keep the compilers happy */
+#endif
+
+static inline pte_t ptep_get_and_clear(pte_t *ptep)
+{
+	pte_t old_pte;
+	pte_t pte;
+
+	spin_lock(&pa_dbit_lock);
+	pte = old_pte = *ptep;
+	pte_val(pte) &= ~_PAGE_PRESENT;
+	pte_val(pte) |= _PAGE_FLUSH;
+	set_pte(ptep,pte);
+	spin_unlock(&pa_dbit_lock);
+
+	return old_pte;
+}
+
+static inline void ptep_set_wrprotect(pte_t *ptep)
+{
+#ifdef CONFIG_SMP
+	unsigned long new, old;
+
+	do {
+		old = pte_val(*ptep);
+		new = pte_val(pte_wrprotect(__pte (old)));
+	} while (cmpxchg((unsigned long *) ptep, old, new) != old);
+#else
+	pte_t old_pte = *ptep;
+	set_pte(ptep, pte_wrprotect(old_pte));
+#endif
+}
+
+static inline void ptep_mkdirty(pte_t *ptep)
+{
+#ifdef CONFIG_SMP
+	set_bit(xlate_pabit(_PAGE_DIRTY_BIT), ptep);
+#else
+	pte_t old_pte = *ptep;
+	set_pte(ptep, pte_mkdirty(old_pte));
+#endif
+}
+
+#define pte_same(A,B)	(pte_val(A) == pte_val(B))
 
 typedef pte_t *pte_addr_t;
 
@@ -332,9 +442,8 @@
 
 #define io_remap_page_range remap_page_range
 
-/*
- * No page table caches to initialise
- */
-#define pgtable_cache_init()	do { } while (0)
+/* We provide our own get_unmapped_area to provide cache coherency */
+
+#define HAVE_ARCH_UNMAPPED_AREA
 
-#endif /* _PARISC_PAGE_H */
+#endif /* _PARISC_PGTABLE_H */
diff -Nru a/include/asm-parisc/posix_types.h b/include/asm-parisc/posix_types.h
--- a/include/asm-parisc/posix_types.h	Wed Oct 30 16:44:32 2002
+++ b/include/asm-parisc/posix_types.h	Wed Oct 30 16:44:32 2002
@@ -19,10 +19,17 @@
 typedef int			__kernel_clock_t;
 typedef int			__kernel_daddr_t;
 /* Note these change from narrow to wide kernels */
+#ifdef __LP64__
 typedef unsigned long		__kernel_size_t;
 typedef long			__kernel_ssize_t;
 typedef long			__kernel_ptrdiff_t;
 typedef long			__kernel_time_t;
+#else
+typedef unsigned int		__kernel_size_t;
+typedef int			__kernel_ssize_t;
+typedef int			__kernel_ptrdiff_t;
+typedef int			__kernel_time_t;
+#endif
 typedef char *			__kernel_caddr_t;
 
 typedef unsigned short		__kernel_uid16_t;
@@ -43,6 +50,10 @@
 	int	__val[2];
 #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
 } __kernel_fsid_t;
+
+/* compatibility stuff */
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
 
 #if defined(__KERNEL__) && defined(__LP64__)
 /* Now 32bit compatibility types */
diff -Nru a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
--- a/include/asm-parisc/processor.h	Wed Oct 30 16:44:36 2002
+++ b/include/asm-parisc/processor.h	Wed Oct 30 16:44:36 2002
@@ -2,12 +2,14 @@
  * include/asm-parisc/processor.h
  *
  * Copyright (C) 1994 Linus Torvalds
+ * Copyright (C) 2001 Grant Grundler
  */
 
 #ifndef __ASM_PARISC_PROCESSOR_H
 #define __ASM_PARISC_PROCESSOR_H
 
 #ifndef __ASSEMBLY__
+#include <linux/config.h>
 #include <linux/threads.h>
 
 #include <asm/hardware.h>
@@ -15,8 +17,11 @@
 #include <asm/pdc.h>
 #include <asm/ptrace.h>
 #include <asm/types.h>
+#include <asm/system.h>
 #endif /* __ASSEMBLY__ */
 
+#define KERNEL_STACK_SIZE 	(4*PAGE_SIZE)
+
 /*
  * Default implementation of macro that returns current
  * instruction pointer ("program counter").
@@ -30,8 +35,11 @@
 
 #define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; })
 
-#define TASK_SIZE	    (PAGE_OFFSET)
-#define TASK_UNMAPPED_BASE  (TASK_SIZE / 3)
+#define TASK_SIZE               (current->thread.task_size)
+#define DEFAULT_TASK_SIZE       (0xFFF00000UL)
+
+#define TASK_UNMAPPED_BASE      (current->thread.map_base)
+#define DEFAULT_MAP_BASE        (0x40000000UL)
 
 #ifndef __ASSEMBLY__
 
@@ -50,17 +58,14 @@
 
 	struct {
 		struct pdc_model model;
-		struct pdc_model_cpuid /* ARGH */ versions;
-		struct pdc_model_cpuid cpuid;
-#if 0
-		struct pdc_model_caps caps;
-#endif
+		unsigned long versions;
+		unsigned long cpuid;
+		unsigned long capabilities;
 		char   sys_model_name[81]; /* PDC-ROM returnes this model name */
 	} pdc;
 
-	char	 	*model_name;
-	char		*cpu_name;
-	char		*family_name;
+	char		*cpu_name;	/* e.g. "PA7300LC (PCX-L2)" */
+	char		*family_name;	/* e.g. "1.1e" */
 };
 
 
@@ -68,29 +73,41 @@
 ** Per CPU data structure - ie varies per CPU.
 */
 struct cpuinfo_parisc {
-	unsigned cpuid;
 
 	struct irq_region *region;
-
-	unsigned long it_value; /* Interval Timer value at last timer interrupt */
-	unsigned long it_delta; /* Interval Timer delta (tic_10ms / HZ * 100) */
-
-	unsigned long hpa;	/* Host Physical address */
-	unsigned long txn_addr;	/* External Interrupt Register or id_eid */
-
-	unsigned long bh_count;		/* number of times bh was invoked */
-	unsigned long irq_count;	/* number of IRQ's since boot */
-	unsigned long irq_max_cr16;	/* longest time to handle a single IRQ */
+	unsigned long it_value;     /* Interval Timer value at last timer Intr */
+	unsigned long it_delta;     /* Interval Timer delta (tic_10ms / HZ * 100) */
+	unsigned long irq_count;    /* number of IRQ's since boot */
+	unsigned long irq_max_cr16; /* longest time to handle a single IRQ */
+	unsigned long cpuid;        /* aka slot_number or set to NO_PROC_ID */
+	unsigned long hpa;          /* Host Physical address */
+	unsigned long txn_addr;     /* MMIO addr of EIR or id_eid */
+#ifdef CONFIG_SMP
+	spinlock_t lock;            /* synchronization for ipi's */
+	unsigned long pending_ipi;  /* bitmap of type ipi_message_type */
+	unsigned long ipi_count;    /* number ipi Interrupts */
+#endif
+	unsigned long bh_count;     /* number of times bh was invoked */
+	unsigned long prof_counter; /* per CPU profiling support */
+	unsigned long prof_multiplier;	/* per CPU profiling support */
+	unsigned long fp_rev;
+	unsigned long fp_model;
+	unsigned int state;
+	struct parisc_device *dev;
 };
 
 extern struct system_cpuinfo_parisc boot_cpu_data;
 extern struct cpuinfo_parisc cpu_data[NR_CPUS];
 #define current_cpu_data cpu_data[smp_processor_id()]
 
-extern void identify_cpu(struct cpuinfo_parisc *);
+#define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF)
+
+#ifdef CONFIG_EISA
+extern int EISA_bus;
+#else
+#define EISA_bus 0
+#endif
 
-#define EISA_bus 0 /* we don't have ISA support yet */
-#define EISA_bus__is_a_macro /* for versions in ksyms.c */
 #define MCA_bus 0
 #define MCA_bus__is_a_macro /* for versions in ksyms.c */
 
@@ -100,31 +117,32 @@
 
 struct thread_struct {
 	struct pt_regs regs;
-	unsigned long  pg_tables;
+	unsigned long  task_size;
+	unsigned long  map_base;
 	unsigned long  flags;
 }; 
 
 /* Thread struct flags. */
 #define PARISC_KERNEL_DEATH	(1UL << 31)	/* see die_if_kernel()... */
 
-#define INIT_THREAD { {			\
-	{ 0, 0, 0, 0, 0, 0, 0, 0,	\
-	  0, 0, 0, 0, 0, 0, 0, 0,	\
-	  0, 0, 0, 0, 0, 0, 0, 0,	\
-	  0, 0, 0, 0, 0, 0, 0, 0 },	\
-	{ 0, 0, 0, 0, 0, 0, 0, 0,	\
-	  0, 0, 0, 0, 0, 0, 0, 0,	\
-	  0, 0, 0, 0, 0, 0, 0, 0,	\
-	  0, 0, 0, 0, 0, 0, 0, 0 },	\
-	{ 0, 0, 0, 0, 0, 0, 0, 0 },	\
-	{ 0, 0}, { 0, 0}, 0, 0, 0, 0	\
-	}, __pa((unsigned long) swapper_pg_dir) }
+#define INIT_THREAD { \
+	regs:	{	gr: { 0, }, \
+			fr: { 0, }, \
+			sr: { 0, }, \
+			iasq: { 0, }, \
+			iaoq: { 0, }, \
+			cr27: 0, \
+		}, \
+	task_size:      DEFAULT_TASK_SIZE, \
+	map_base:       DEFAULT_MAP_BASE, \
+	flags:          0 \
+	}
 
 /*
  * Return saved PC of a blocked thread.  This is used by ps mostly.
  */
 
-extern inline unsigned long thread_saved_pc(struct thread_struct *t)
+static inline unsigned long thread_saved_pc(struct task_struct *t)
 {
 	return 0xabcdef;
 }
@@ -144,6 +162,35 @@
  * We also initialize sr3 to an illegal value (illegal for our
  * implementation, not for the architecture).
  */
+typedef unsigned int elf_caddr_t;
+
+#define start_thread_som(regs, new_pc, new_sp) do {	\
+	unsigned long *sp = (unsigned long *)new_sp;	\
+	__u32 spaceid = (__u32)current->mm->context;	\
+	unsigned long pc = (unsigned long)new_pc;	\
+	/* offset pc for priv. level */			\
+	pc |= 3;					\
+							\
+	set_fs(USER_DS);				\
+	regs->iasq[0] = spaceid;			\
+	regs->iasq[1] = spaceid;			\
+	regs->iaoq[0] = pc;				\
+	regs->iaoq[1] = pc + 4;                         \
+	regs->sr[2] = LINUX_GATEWAY_SPACE;              \
+	regs->sr[3] = 0xffff;				\
+	regs->sr[4] = spaceid;				\
+	regs->sr[5] = spaceid;				\
+	regs->sr[6] = spaceid;				\
+	regs->sr[7] = spaceid;				\
+	regs->gr[ 0] = USER_PSW;                        \
+	regs->gr[30] = ((new_sp)+63)&~63;		\
+	regs->gr[31] = pc;				\
+							\
+	get_user(regs->gr[26],&sp[0]);			\
+	get_user(regs->gr[25],&sp[-1]); 		\
+	get_user(regs->gr[24],&sp[-2]); 		\
+	get_user(regs->gr[23],&sp[-3]); 		\
+} while(0)
 
 /* The ELF abi wants things done a "wee bit" differently than
  * som does.  Supporting this behavior here avoids
@@ -163,22 +210,44 @@
    |         32 bytes of magic       |
    |---------------------------------|
    | 32 bytes argument/sp save area  |
-   |---------------------------------|  ((current->mm->env_end) + 63 & ~63)
-   |         N bytes of slack        |
-   |---------------------------------|
-   |      envvar and arg strings     |
-   |---------------------------------|
+   |---------------------------------| (bprm->p)
    |	    ELF auxiliary info	     |
    |         (up to 28 words)        |
    |---------------------------------|
-   |  Environment variable pointers  |
-   |         upwards to NULL	     |
+   |		   NULL		     |
    |---------------------------------|
-   |        Argument pointers        |
-   |         upwards to NULL	     |
+   |	   Environment pointers	     |
+   |---------------------------------|
+   |		   NULL		     |
    |---------------------------------|
+   |        Argument pointers        |
+   |---------------------------------| <- argv
    |          argc (1 word)          |
-   -----------------------------------
+   |---------------------------------| <- bprm->exec (HACK!)
+   |         N bytes of slack        |
+   |---------------------------------|
+   |	filename passed to execve    |
+   |---------------------------------| (mm->env_end)
+   |           env strings           |
+   |---------------------------------| (mm->env_start, mm->arg_end)
+   |           arg strings           |
+   |---------------------------------|
+   | additional faked arg strings if |
+   | we're invoked via binfmt_script |
+   |---------------------------------| (mm->arg_start)
+   stack base is at TASK_SIZE - rlim_max.
+
+on downward growing arches, it looks like this:
+   stack base at TASK_SIZE
+   | filename passed to execve
+   | env strings
+   | arg strings
+   | faked arg strings
+   | slack
+   | ELF
+   | envps
+   | argvs
+   | argc
 
  *  The pleasant part of this is that if we need to skip arguments we
  *  can just decrement argc and move argv, because the stack pointer
@@ -186,154 +255,78 @@
  *  argument vectors.
  *
  * Note that the S/390 people took the easy way out and hacked their
- * GCC to make the stack grow downwards.  */
-
-#define start_thread_som(regs, new_pc, new_sp) do {		\
-	unsigned long *sp = (unsigned long *)new_sp;	\
-	__u32 spaceid = (__u32)current->mm->context;	\
-	unsigned long pc = (unsigned long)new_pc;	\
-	/* offset pc for priv. level */			\
-	pc |= 3;					\
-							\
-	set_fs(USER_DS);				\
-	regs->iasq[0] = spaceid;			\
-	regs->iasq[1] = spaceid;			\
-	regs->iaoq[0] = pc;				\
-	regs->iaoq[1] = pc;				\
-	regs->sr[2] = LINUX_GATEWAY_SPACE;              \
-	regs->sr[3] = 0xffff;				\
-	regs->sr[4] = spaceid;				\
-	regs->sr[5] = spaceid;				\
-	regs->sr[6] = spaceid;				\
-	regs->sr[7] = spaceid;				\
-	regs->gr[ 0] = USER_INIT_PSW;			\
-	regs->gr[30] = ((new_sp)+63)&~63;		\
-	regs->gr[31] = pc;				\
-							\
-	get_user(regs->gr[26],&sp[0]);			\
-	get_user(regs->gr[25],&sp[-1]); 		\
-	get_user(regs->gr[24],&sp[-2]); 		\
-	get_user(regs->gr[23],&sp[-3]); 		\
-							\
-	regs->cr30 = (u32) current;			\
-} while(0)
-
-
-#define start_thread(regs, new_pc, new_sp) do {		\
-	unsigned long *sp = (unsigned long *)new_sp;	\
-	__u32 spaceid = (__u32)current->mm->context;	\
-        unsigned long pc = (unsigned long)new_pc;       \
-        /* offset pc for priv. level */                 \
-        pc |= 3;                                        \
-							\
-							\
-	set_fs(USER_DS);				\
-	regs->iasq[0] = spaceid;			\
-	regs->iasq[1] = spaceid;			\
-	regs->iaoq[0] = pc;				\
-	regs->iaoq[1] = pc; 	               		\
-	regs->sr[2] = LINUX_GATEWAY_SPACE;              \
-	regs->sr[3] = 0xffff;				\
-	regs->sr[4] = spaceid;				\
-	regs->sr[5] = spaceid;				\
-	regs->sr[6] = spaceid;				\
-	regs->sr[7] = spaceid;				\
-	regs->gr[ 0] = USER_INIT_PSW;			\
-	regs->fr[ 0] = 0LL;                            	\
-	regs->fr[ 1] = 0LL;                            	\
-	regs->fr[ 2] = 0LL;                            	\
-	regs->fr[ 3] = 0LL;                            	\
-	regs->gr[30] = ((current->mm->env_end)+63)&~63;	\
-	regs->gr[31] = pc;				\
-							\
-	get_user(regs->gr[25],&sp[0]);			\
-	regs->gr[24] = (unsigned long) &sp[1];		\
-	regs->gr[23] = 0;                            	\
-							\
-	regs->cr30 = (u32) current;			\
-} while(0)
-
-#ifdef __LP64__
-
-/*
- * For 64 bit kernels we need a version of start thread for 32 bit
- * elf files.
- *
- * FIXME: It should be possible to not duplicate the above code
- *        by playing games with concatenation to form both
- *        macros at compile time. The only difference between
- *        this macro and the above is the name and the types
- *        for sp and pc.
+ * GCC to make the stack grow downwards.
  */
 
-#define start_thread32(regs, new_pc, new_sp) do {         \
-	__u32 *sp = (__u32 *)new_sp;                    \
+#define start_thread(regs, new_pc, new_sp) do {		\
+	elf_addr_t *sp = (elf_addr_t *)new_sp;		\
 	__u32 spaceid = (__u32)current->mm->context;	\
-	__u32 pc = (__u32)new_pc;                       \
-        /* offset pc for priv. level */                 \
-        pc |= 3;                                        \
+	elf_addr_t pc = (elf_addr_t)new_pc | 3;		\
+	elf_caddr_t *argv = (elf_caddr_t *)bprm->exec + 1;	\
 							\
 	set_fs(USER_DS);				\
 	regs->iasq[0] = spaceid;			\
 	regs->iasq[1] = spaceid;			\
 	regs->iaoq[0] = pc;				\
-	regs->iaoq[1] = pc; 	               		\
+	regs->iaoq[1] = pc + 4;                         \
 	regs->sr[2] = LINUX_GATEWAY_SPACE;              \
 	regs->sr[3] = 0xffff;				\
 	regs->sr[4] = spaceid;				\
 	regs->sr[5] = spaceid;				\
 	regs->sr[6] = spaceid;				\
 	regs->sr[7] = spaceid;				\
-	regs->gr[ 0] = USER_INIT_PSW;			\
+	regs->gr[ 0] = USER_PSW;                        \
 	regs->fr[ 0] = 0LL;                            	\
 	regs->fr[ 1] = 0LL;                            	\
 	regs->fr[ 2] = 0LL;                            	\
 	regs->fr[ 3] = 0LL;                            	\
-	regs->gr[30] = ((current->mm->env_end)+63)&~63;	\
+	regs->gr[30] = ((unsigned long)sp + 63) &~ 63;	\
 	regs->gr[31] = pc;				\
 							\
-	get_user(regs->gr[25],&sp[0]);			\
-	regs->gr[24] = (unsigned long) &sp[1];		\
-	regs->gr[23] = 0;                            	\
-							\
-	regs->cr30 = (u32) current;			\
+	get_user(regs->gr[25], (argv - 1));		\
+	regs->gr[24] = (long) argv;			\
+	regs->gr[23] = 0;				\
 } while(0)
 
-#endif
-
 struct task_struct;
+struct mm_struct;
 
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 
-#define copy_segments(tsk, mm)	do { } while (0)
+extern void map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm);
+
+#define copy_segments(tsk, mm)  do { \
+					if (tsk->personality == PER_HPUX)  \
+					    map_hpux_gateway_page(tsk,mm); \
+				} while (0)
 #define release_segments(mm)	do { } while (0)
 
-extern inline unsigned long get_wchan(struct task_struct *p)
+static inline unsigned long get_wchan(struct task_struct *p)
 {
 	return 0xdeadbeef; /* XXX */
 }
 
-#define KSTK_EIP(tsk)	(0xdeadbeef)
-#define KSTK_ESP(tsk)	(0xdeadbeef)
-
-/* Be sure to hunt all references to this down when you change the size of
- * the kernel stack */
+#define KSTK_EIP(tsk)	((tsk)->thread.regs.iaoq[0])
+#define KSTK_ESP(tsk)	((tsk)->thread.regs.gr[30])
 
 #endif /* __ASSEMBLY__ */
 
-#define THREAD_SIZE	(4*PAGE_SIZE)
-
-#define alloc_task_struct() \
-	((struct task_struct *) __get_free_pages(GFP_KERNEL,2))
-#define free_task_struct(p)     free_pages((unsigned long)(p),2)
-#define get_task_struct(tsk)      atomic_inc(&virt_to_page(tsk)->count)
+#ifdef  CONFIG_PA20
+#define ARCH_HAS_PREFETCH
+extern inline void prefetch(const void *addr)
+{
+	__asm__("ldw 0(%0), %%r0" : : "r" (addr));
+}
 
-#define init_task (init_task_union.task) 
-#define init_stack (init_task_union.stack)
+#define ARCH_HAS_PREFETCHW
+extern inline void prefetchw(const void *addr)
+{
+	__asm__("ldd 0(%0), %%r0" : : "r" (addr));
+}
+#endif
 
 #define cpu_relax()	barrier()
-
 
 #endif /* __ASM_PARISC_PROCESSOR_H */
diff -Nru a/include/asm-parisc/psw.h b/include/asm-parisc/psw.h
--- a/include/asm-parisc/psw.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-parisc/psw.h	Wed Oct 30 16:44:17 2002
@@ -9,6 +9,8 @@
 #define	PSW_G	0x00000040	/* PA1.x only */
 #define PSW_O	0x00000080	/* PA2.0 only */
 
+#define PSW_CB	0x0000ff00
+
 #define	PSW_M	0x00010000
 #define	PSW_V	0x00020000
 #define	PSW_C	0x00040000
@@ -23,10 +25,15 @@
 #define	PSW_S	0x02000000
 #define	PSW_E	0x04000000
 #define PSW_W	0x08000000	/* PA2.0 only */
+#define PSW_W_BIT       36      /* PA2.0 only */
 
 #define	PSW_Z	0x40000000	/* PA1.x only */
 #define	PSW_Y	0x80000000	/* PA1.x only */
 
+#ifdef __LP64__
+#define PSW_HI_CB 0x000000ff    /* PA2.0 only */
+#endif
+
 /* PSW bits to be used with ssm/rsm */
 #define PSW_SM_I        0x1
 #define PSW_SM_D        0x2
@@ -40,15 +47,16 @@
 #define PSW_SM_W        0x200
 
 #ifdef __LP64__
-#  define USER_PSW	(PSW_C | PSW_D | PSW_Q | PSW_I)
-#  define USER_INIT_PSW	(PSW_C | PSW_D | PSW_Q | PSW_I | PSW_N)
-#  define KERNEL_PSW	(PSW_C | PSW_D | PSW_Q | PSW_W)
-#  define PDC_PSW	(PSW_Q | PSW_W)
+#  define USER_PSW      (PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I)
+#  define KERNEL_PSW    (PSW_W | PSW_C | PSW_Q | PSW_P | PSW_D)
+#  define REAL_MODE_PSW (PSW_W | PSW_Q)
+#  define USER_PSW_MASK (PSW_W | PSW_T | PSW_N | PSW_X | PSW_B | PSW_V | PSW_CB)
+#  define USER_PSW_HI_MASK (PSW_HI_CB)
 #else
-#  define USER_PSW	(PSW_C | PSW_D | PSW_Q | PSW_I | PSW_P)
-#  define USER_INIT_PSW	(PSW_C | PSW_D | PSW_Q | PSW_I | PSW_N)
-#  define KERNEL_PSW	(PSW_C | PSW_D | PSW_Q)
-#  define PDC_PSW	(PSW_Q)
+#  define USER_PSW      (PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I)
+#  define KERNEL_PSW    (PSW_C | PSW_Q | PSW_P | PSW_D)
+#  define REAL_MODE_PSW (PSW_Q)
+#  define USER_PSW_MASK (PSW_T | PSW_N | PSW_X | PSW_B | PSW_V | PSW_CB)
 #endif
 
 #endif
diff -Nru a/include/asm-parisc/ptrace.h b/include/asm-parisc/ptrace.h
--- a/include/asm-parisc/ptrace.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-parisc/ptrace.h	Wed Oct 30 16:44:28 2002
@@ -8,7 +8,12 @@
 #include <linux/types.h>
 
 /* This struct defines the way the registers are stored on the 
-   stack during a system call. */
+ * stack during a system call.
+ *
+ * N.B. gdb/strace care about the size and offsets within this
+ * structure. If you change things, you may break object compatibility
+ * for those applications.
+ */
 
 struct pt_regs {
 	unsigned long gr[32];	/* PSW is in gr[0] */
@@ -16,11 +21,8 @@
 	unsigned long sr[ 8];
 	unsigned long iasq[2];
 	unsigned long iaoq[2];
-	unsigned long cr24;
-	unsigned long cr25;
-	unsigned long cr26;
 	unsigned long cr27;
-	unsigned long cr30;
+	unsigned long pad0;     /* available for other uses */
 	unsigned long orig_r28;
 	unsigned long ksp;
 	unsigned long kpc;
@@ -29,7 +31,6 @@
 	unsigned long isr;	/* CR20 */
 	unsigned long ior;	/* CR21 */
 	unsigned long ipsw;	/* CR22 */
-	unsigned long cr_pid[4]; /* CR8,9,12,13 */
 };
 
 #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
diff -Nru a/include/asm-parisc/rt_sigframe.h b/include/asm-parisc/rt_sigframe.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/rt_sigframe.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,19 @@
+#ifndef _ASM_PARISC_RT_SIGFRAME_H
+#define _ASM_PARISC_RT_SIGFRAME_H
+
+struct rt_sigframe {
+	unsigned int tramp[4];
+	struct siginfo info;
+	struct ucontext uc;
+};
+
+/*
+ * The 32-bit ABI wants at least 48 bytes for a function call frame:
+ * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
+ * which Linux/parisc uses is sp-20 for the saved return pointer...)
+ * Then, the stack pointer must be rounded to a cache line (64 bytes).
+ */
+#define PARISC_RT_SIGFRAME_SIZE					\
+	(((sizeof(struct rt_sigframe) + 48) + 63) & -64)
+
+#endif
diff -Nru a/include/asm-parisc/runway.h b/include/asm-parisc/runway.h
--- a/include/asm-parisc/runway.h	Wed Oct 30 16:44:35 2002
+++ b/include/asm-parisc/runway.h	Wed Oct 30 16:44:35 2002
@@ -5,5 +5,8 @@
 /* declared in arch/parisc/kernel/setup.c */
 extern struct proc_dir_entry * proc_runway_root;
 
+#define RUNWAY_STATUS	0x10
+#define RUNWAY_DEBUG	0x40
+
 #endif /* __KERNEL__ */
 #endif /* ASM_PARISC_RUNWAY_H */
diff -Nru a/include/asm-parisc/scatterlist.h b/include/asm-parisc/scatterlist.h
--- a/include/asm-parisc/scatterlist.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-parisc/scatterlist.h	Wed Oct 30 16:44:29 2002
@@ -1,9 +1,12 @@
 #ifndef _ASM_PARISC_SCATTERLIST_H
 #define _ASM_PARISC_SCATTERLIST_H
 
+#include <asm/page.h>
+
 struct scatterlist {
 	struct page *page;
 	unsigned int offset;
+
 	unsigned int length;
 
 	/* an IOVA can be 64-bits on some PA-Risc platforms. */
@@ -11,6 +14,7 @@
 	__u32      iova_length; /* bytes mapped */
 };
 
+#define sg_virt_addr(sg) ((unsigned long)(page_address(sg->page) + sg->offset))
 #define sg_dma_address(sg) ((sg)->iova)
 #define sg_dma_len(sg)     ((sg)->iova_length)
 
diff -Nru a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h
--- a/include/asm-parisc/semaphore.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-parisc/semaphore.h	Wed Oct 30 16:44:17 2002
@@ -1,26 +1,30 @@
 #ifndef _ASM_PARISC_SEMAPHORE_H
 #define _ASM_PARISC_SEMAPHORE_H
 
-#include <linux/linkage.h>
-
 /*
  * SMP- and interrupt-safe semaphores.
  *
  * (C) Copyright 1996 Linus Torvalds
  *
- * SuperH verison by Niibe Yutaka
+ * PA-RISC version by Matthew Wilcox
  *
  */
 
 #include <linux/spinlock.h>
+#include <linux/wait.h>
 #include <linux/rwsem.h>
 
 #include <asm/system.h>
-#include <asm/atomic.h>
 
+/*
+ * The `count' is initialised to the number of people who are allowed to
+ * take the lock.  (Normally we want a mutex, so this is `1').  if
+ * `count' is positive, the lock can be taken.  if it's 0, no-one is
+ * waiting on it.  if it's -1, at least one task is waiting.
+ */
 struct semaphore {
-	atomic_t count;
-	int waking;
+	spinlock_t	sentry;
+	int		count;
 	wait_queue_head_t wait;
 #if WAITQUEUE_DEBUG
 	long __magic;
@@ -35,7 +39,7 @@
 #endif
 
 #define __SEMAPHORE_INITIALIZER(name,count) \
-{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
+{ SPIN_LOCK_UNLOCKED, count, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
 	__SEM_DEBUG_INIT(name) }
 
 #define __MUTEX_INITIALIZER(name) \
@@ -49,18 +53,7 @@
 
 extern 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 doesn't. Oh well.
- */
-	atomic_set(&sem->count, val);
-	sem->waking = 0;
-	init_waitqueue_head(&sem->wait);
-#if WAITQUEUE_DEBUG
-	sem->__magic = (long)&sem->__magic;
-#endif
+	*sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
 }
 
 static inline void init_MUTEX (struct semaphore *sem)
@@ -73,17 +66,18 @@
 	sema_init(sem, 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 */);
+static inline int sem_getcount(struct semaphore *sem)
+{
+	return sem->count;
+}
 
 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;
+/* Semaphores can be `tried' from irq context.  So we have to disable
+ * interrupts while we're messing with the semaphore.  Sorry.
+ */
 
 extern __inline__ void down(struct semaphore * sem)
 {
@@ -91,8 +85,13 @@
 	CHECK_MAGIC(sem->__magic);
 #endif
 
-	if (atomic_dec_return(&sem->count) < 0)
+	spin_lock_irq(&sem->sentry);
+	if (sem->count > 0) {
+		sem->count--;
+	} else {
 		__down(sem);
+	}
+	spin_unlock_irq(&sem->sentry);
 }
 
 extern __inline__ int down_interruptible(struct semaphore * sem)
@@ -102,21 +101,33 @@
 	CHECK_MAGIC(sem->__magic);
 #endif
 
-	if (atomic_dec_return(&sem->count) < 0)
+	spin_lock_irq(&sem->sentry);
+	if (sem->count > 0) {
+		sem->count--;
+	} else {
 		ret = __down_interruptible(sem);
+	}
+	spin_unlock_irq(&sem->sentry);
 	return ret;
 }
 
+/*
+ * down_trylock returns 0 on success, 1 if we failed to get the lock.
+ * May not sleep, but must preserve irq state
+ */
 extern __inline__ int down_trylock(struct semaphore * sem)
 {
-	int ret = 0;
+	int flags, count;
 #if WAITQUEUE_DEBUG
 	CHECK_MAGIC(sem->__magic);
 #endif
 
-	if (atomic_dec_return(&sem->count) < 0)
-		ret = __down_trylock(sem);
-	return ret;
+	spin_lock_irqsave(&sem->sentry, flags);
+	count = sem->count - 1;
+	if (count >= 0)
+		sem->count = count;
+	spin_unlock_irqrestore(&sem->sentry, flags);
+	return (count < 0);
 }
 
 /*
@@ -125,11 +136,17 @@
  */
 extern __inline__ void up(struct semaphore * sem)
 {
+	int flags;
 #if WAITQUEUE_DEBUG
 	CHECK_MAGIC(sem->__magic);
 #endif
-	if (atomic_inc_return(&sem->count) <= 0)
+	spin_lock_irqsave(&sem->sentry, flags);
+	if (sem->count < 0) {
 		__up(sem);
+	} else {
+		sem->count++;
+	}
+	spin_unlock_irqrestore(&sem->sentry, flags);
 }
 
 #endif /* _ASM_PARISC_SEMAPHORE_H */
diff -Nru a/include/asm-parisc/sembuf.h b/include/asm-parisc/sembuf.h
--- a/include/asm-parisc/sembuf.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-parisc/sembuf.h	Wed Oct 30 16:44:17 2002
@@ -13,9 +13,13 @@
 
 struct semid64_ds {
 	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
+#ifndef __LP64__
 	unsigned int	__pad1;
+#endif
 	__kernel_time_t	sem_otime;		/* last semop time */
+#ifndef __LP64__
 	unsigned int	__pad2;
+#endif
 	__kernel_time_t	sem_ctime;		/* last change time */
 	unsigned int	sem_nsems;		/* no. of semaphores in array */
 	unsigned int	__unused1;
diff -Nru a/include/asm-parisc/serial.h b/include/asm-parisc/serial.h
--- a/include/asm-parisc/serial.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-parisc/serial.h	Wed Oct 30 16:44:27 2002
@@ -3,7 +3,6 @@
  */
 
 #include <linux/config.h>
-#include <asm/gsc.h>
 
 /*
  * This assumes you have a 7.272727 MHz clock for your UART.
@@ -27,20 +26,27 @@
 #define ACCENT_FLAGS 0
 #define BOCA_FLAGS 0
 #define HUB6_FLAGS 0
-#define RS_TABLE_SIZE  64
-#else
-#define RS_TABLE_SIZE  4
 #endif
 	
 /*
- *	The base is relative to the LASI base. We can fix that
- *	up later. We could also virtually map LASI so that we get
- *	nice constants all over our kernel...
+ * We don't use the ISA probing code, so these entries are just to reserve
+ * space.  Some example (maximal) configurations:
+ * - 712 w/ additional Lasi & RJ16 ports: 4
+ * - J5k w/ PCI serial cards: 2 + 4 * card ~= 34
+ * A500 w/ PCI serial cards: 5 + 4 * card ~= 17
  */
  
 #define STD_SERIAL_PORT_DEFNS			\
-	/* UART CLK   PORT IRQ     FLAGS        */			\
-	{ 0, LASI_BASE_BAUD, -1, 4, ASYNC_SKIP_TEST, 0, PORT_UNKNOWN,}, /* ttyS0 */
+	{ 0, },		/* ttyS0 */	\
+	{ 0, },		/* ttyS1 */	\
+	{ 0, },		/* ttyS2 */	\
+	{ 0, },		/* ttyS3 */	\
+	{ 0, },		/* ttyS4 */	\
+	{ 0, },		/* ttyS5 */	\
+	{ 0, },		/* ttyS6 */	\
+	{ 0, },		/* ttyS7 */	\
+	{ 0, },		/* ttyS8 */
+
 
 #define SERIAL_PORT_DFNS		\
 	STD_SERIAL_PORT_DEFNS
diff -Nru a/include/asm-parisc/shmbuf.h b/include/asm-parisc/shmbuf.h
--- a/include/asm-parisc/shmbuf.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-parisc/shmbuf.h	Wed Oct 30 16:44:17 2002
@@ -13,12 +13,21 @@
 
 struct shmid64_ds {
 	struct ipc64_perm	shm_perm;	/* operation perms */
+#ifndef __LP64__
 	unsigned int		__pad1;
+#endif
 	__kernel_time_t		shm_atime;	/* last attach time */
+#ifndef __LP64__
 	unsigned int		__pad2;
+#endif
 	__kernel_time_t		shm_dtime;	/* last detach time */
+#ifndef __LP64__
 	unsigned int		__pad3;
+#endif
 	__kernel_time_t		shm_ctime;	/* last change time */
+#ifndef __LP64__
+	unsigned int		__pad4;
+#endif
 	size_t			shm_segsz;	/* size of segment (bytes) */
 	__kernel_pid_t		shm_cpid;	/* pid of creator */
 	__kernel_pid_t		shm_lpid;	/* pid of last operator */
@@ -28,11 +37,10 @@
 };
 
 #ifdef __LP64__
-#warning shminfo64 is an undocumented struct
 /* The 'unsigned int' (formerly 'unsigned long') data types below will
  * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on
  * a wide kernel, but if some of these values are meant to contain pointers
- * they may need to be 'long long' instead. -PB
+ * they may need to be 'long long' instead. -PB XXX FIXME
  */
 #endif
 struct shminfo64 {
diff -Nru a/include/asm-parisc/shmparam.h b/include/asm-parisc/shmparam.h
--- a/include/asm-parisc/shmparam.h	Wed Oct 30 16:44:25 2002
+++ b/include/asm-parisc/shmparam.h	Wed Oct 30 16:44:25 2002
@@ -1,6 +1,6 @@
 #ifndef _ASMPARISC_SHMPARAM_H
 #define _ASMPARISC_SHMPARAM_H
 
-#define	SHMLBA PAGE_SIZE		 /* attach addr a multiple of this */
+#define SHMLBA 0x00400000   /* attach addr needs to be 4 Mb aligned */
 
 #endif /* _ASMPARISC_SHMPARAM_H */
diff -Nru a/include/asm-parisc/smp.h b/include/asm-parisc/smp.h
--- a/include/asm-parisc/smp.h	Wed Oct 30 16:44:31 2002
+++ b/include/asm-parisc/smp.h	Wed Oct 30 16:44:31 2002
@@ -3,8 +3,72 @@
 
 #include <linux/config.h>
 
-#ifdef CONFIG_SMP
-extern volatile unsigned long cpu_online_map;  /* Bitmap of available cpu's */
-#endif
+#if defined(CONFIG_SMP)
+
+/* Page Zero Location PDC will look for the address to branch to when we poke
+** slave CPUs still in "Icache loop".
+*/
+#define PDC_OS_BOOT_RENDEZVOUS     0x10
+#define PDC_OS_BOOT_RENDEZVOUS_HI  0x28
+
+#ifndef ASSEMBLY
+#include <linux/threads.h>	/* for NR_CPUS */
+typedef unsigned long address_t;
+
+extern volatile unsigned long cpu_online_map;
+
+
+/*
+ *	Private routines/data
+ *
+ *	physical and logical are equivalent until we support CPU hotplug.
+ */
+#define cpu_number_map(cpu)	(cpu)
+#define cpu_logical_map(cpu)	(cpu)
+
+extern void smp_send_reschedule(int cpu);
+
+#endif /* !ASSEMBLY */
 
+/*
+ *	This magic constant controls our willingness to transfer
+ *      a process across CPUs. Such a transfer incurs cache and tlb
+ *      misses. The current value is inherited from i386. Still needs
+ *      to be tuned for parisc.
+ */
+ 
+#define PROC_CHANGE_PENALTY	15		/* Schedule penalty */
+
+#undef ENTRY_SYS_CPUS
+#ifdef ENTRY_SYS_CPUS
+#define STATE_RENDEZVOUS			0
+#define STATE_STOPPED 				1 
+#define STATE_RUNNING				2
+#define STATE_HALTED				3
 #endif
+
+extern unsigned long cpu_present_mask;
+
+#define smp_processor_id()	(current_thread_info()->cpu)
+#define cpu_online(cpu) (cpu_online_map & (1<<(cpu)))
+
+#define cpu_possible(cpu)       (cpu_present_mask & (1<<(cpu)))
+	
+extern inline unsigned int num_online_cpus(void)
+{
+	return hweight32(cpu_online_map);
+}
+
+extern inline int any_online_cpu(unsigned int mask)
+{
+	if (mask & cpu_online_map)
+		return __ffs(mask & cpu_online_map);
+
+	return -1;
+}
+#endif /* CONFIG_SMP */
+
+#define NO_PROC_ID		0xFF		/* No processor magic marker */
+#define ANY_PROC_ID		0xFF		/* Any processor magic marker */
+
+#endif /*  __ASM_SMP_H */
diff -Nru a/include/asm-parisc/softirq.h b/include/asm-parisc/softirq.h
--- a/include/asm-parisc/softirq.h	Wed Oct 30 16:44:35 2002
+++ b/include/asm-parisc/softirq.h	Wed Oct 30 16:44:35 2002
@@ -4,12 +4,17 @@
 #include <asm/atomic.h>
 #include <asm/hardirq.h>
 
-#define cpu_bh_disable(cpu)	do { local_bh_count(cpu)++; barrier(); } while (0)
-#define cpu_bh_enable(cpu)	do { barrier(); local_bh_count(cpu)--; } while (0)
+#define local_bh_disable() \
+		do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
+#define __local_bh_enable() \
+		do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
 
-#define local_bh_disable()	cpu_bh_disable(smp_processor_id())
-#define local_bh_enable()	cpu_bh_enable(smp_processor_id())
-
-#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
+#define local_bh_enable()						\
+do {									\
+	__local_bh_enable();						\
+	if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
+		do_softirq();						\
+	preempt_check_resched();					\
+} while (0)
 
 #endif	/* __ASM_SOFTIRQ_H */
diff -Nru a/include/asm-parisc/spinlock.h b/include/asm-parisc/spinlock.h
--- a/include/asm-parisc/spinlock.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-parisc/spinlock.h	Wed Oct 30 16:44:27 2002
@@ -3,23 +3,35 @@
 
 #include <asm/system.h>
 
-/* we seem to be the only architecture that uses 0 to mean locked - but we
- * have to.  prumpf */
+/* Note that PA-RISC has to use `1' to mean unlocked and `0' to mean locked
+ * since it only has load-and-zero.
+ */
 
 #undef SPIN_LOCK_UNLOCKED
 #define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 }
 
 #define spin_lock_init(x)	do { (x)->lock = 1; } while(0)
 
-#define spin_unlock_wait(x)	do { barrier(); } while(((volatile spinlock_t *)(x))->lock == 1)
+#define spin_is_locked(x) ((x)->lock == 0)
+
+#define spin_unlock_wait(x)	do { barrier(); } while(((volatile spinlock_t *)(x))->lock == 0)
 
-#define spin_lock(x) \
+#if 1
+#define _raw_spin_lock(x) do { \
+	while (__ldcw (&(x)->lock) == 0) \
+		while (((x)->lock) == 0) ; } while (0)
+
+#else
+#define _raw_spin_lock(x) \
 	do { while(__ldcw(&(x)->lock) == 0); } while(0)
+#endif
 	
-#define spin_unlock(x) \
+#define _raw_spin_unlock(x) \
 	do { (x)->lock = 1; } while(0)
 
-#define spin_trylock(x) (__ldcw(&(x)->lock) == 1)
+#define _raw_spin_trylock(x) (__ldcw(&(x)->lock) != 0)
+
+
 
 /*
  * Read-write spinlocks, allowing multiple readers
@@ -30,29 +42,37 @@
 	volatile int counter;
 } rwlock_t;
 
-#define RW_LOCK_UNLOCKED (rwlock_t) { SPIN_LOCK_UNLOCKED, 0 }
+#define RW_LOCK_UNLOCKED (rwlock_t) { {1}, 0 }
+
+#define rwlock_init(lp)	do { *(lp) = RW_LOCK_UNLOCKED; } while (0)
+
+#define rwlock_is_locked(lp) ((lp)->counter != 0)
 
 /* read_lock, read_unlock are pretty straightforward.  Of course it somehow
  * sucks we end up saving/restoring flags twice for read_lock_irqsave aso. */
 
-static inline void read_lock(rwlock_t *rw)
+static  __inline__ void _raw_read_lock(rwlock_t *rw)
 {
 	unsigned long flags;
-	spin_lock_irqsave(&rw->lock, flags);
+	local_irq_save(flags);
+	_raw_spin_lock(&rw->lock); 
 
 	rw->counter++;
 
-	spin_unlock_irqrestore(&rw->lock, flags);
+	_raw_spin_unlock(&rw->lock);
+	local_irq_restore(flags);
 }
 
-static inline void read_unlock(rwlock_t *rw)
+static  __inline__ void _raw_read_unlock(rwlock_t *rw)
 {
 	unsigned long flags;
-	spin_lock_irqsave(&rw->lock, flags);
+	local_irq_save(flags);
+	_raw_spin_lock(&rw->lock); 
 
 	rw->counter--;
 
-	spin_unlock_irqrestore(&rw->lock, flags);
+	_raw_spin_unlock(&rw->lock);
+	local_irq_restore(flags);
 }
 
 /* write_lock is less trivial.  We optimistically grab the lock and check
@@ -64,14 +84,14 @@
  * writers) in interrupt handlers someone fucked up and we'd dead-lock
  * sooner or later anyway.   prumpf */
 
-static inline void write_lock(rwlock_t *rw)
+static  __inline__ void _raw_write_lock(rwlock_t *rw)
 {
 retry:
-	spin_lock(&rw->lock);
+	_raw_spin_lock(&rw->lock);
 
 	if(rw->counter != 0) {
 		/* this basically never happens */
-		spin_unlock(&rw->lock);
+		_raw_spin_unlock(&rw->lock);
 
 		while(rw->counter != 0);
 
@@ -79,13 +99,25 @@
 	}
 
 	/* got it.  now leave without unlocking */
+	rw->counter = -1; /* remember we are locked */
 }
 
 /* write_unlock is absolutely trivial - we don't have to wait for anything */
 
-static inline void write_unlock(rwlock_t *rw)
+static  __inline__ void _raw_write_unlock(rwlock_t *rw)
+{
+	rw->counter = 0;
+	_raw_spin_unlock(&rw->lock);
+}
+
+static __inline__ int is_read_locked(rwlock_t *rw)
+{
+	return rw->counter > 0;
+}
+
+static __inline__ int is_write_locked(rwlock_t *rw)
 {
-	spin_unlock(&rw->lock);
+	return rw->counter < 0;
 }
 
 #endif /* __ASM_SPINLOCK_H */
diff -Nru a/include/asm-parisc/stat.h b/include/asm-parisc/stat.h
--- a/include/asm-parisc/stat.h	Wed Oct 30 16:44:19 2002
+++ b/include/asm-parisc/stat.h	Wed Oct 30 16:44:19 2002
@@ -66,6 +66,33 @@
 	gid_t		st_gid;
 	unsigned int	st_spare4[3];
 };
-#define stat64	hpux_stat64
+
+/* This is the struct that 32-bit userspace applications are expecting.
+ * How 64-bit apps are going to be compiled, I have no idea.  But at least
+ * this way, we don't have a wrapper in the kernel.
+ */
+struct stat64 {
+	unsigned long long	st_dev;
+	unsigned int		__pad1;
+
+	unsigned int		__st_ino;	/* Not actually filled in */
+	unsigned int		st_mode;
+	unsigned int		st_nlink;
+	unsigned int		st_uid;
+	unsigned int		st_gid;
+	unsigned long long	st_rdev;
+	unsigned int		__pad2;
+	signed long long	st_size;
+	signed int		st_blksize;
+
+	signed long long	st_blocks;
+	signed int		st_atime;
+	unsigned int		__unused1;
+	signed int		st_mtime;
+	unsigned int		__unused2;
+	signed int		st_ctime;
+	unsigned int		__unused3;
+	unsigned long long	st_ino;
+};
 
 #endif
diff -Nru a/include/asm-parisc/string.h b/include/asm-parisc/string.h
--- a/include/asm-parisc/string.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-parisc/string.h	Wed Oct 30 16:44:30 2002
@@ -1,2 +1,3 @@
 
-/* This left blank until we do parisc optimizations */
+#define __HAVE_ARCH_MEMSET
+extern void * memset(void *, int, size_t);
diff -Nru a/include/asm-parisc/superio.h b/include/asm-parisc/superio.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/superio.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,81 @@
+#ifndef _PARISC_SUPERIO_H
+#define _PARISC_SUPERIO_H
+
+/* Offsets to configuration and base address registers */
+#define IC_PIC1    0x20		/* PCI I/O address of master 8259 */
+#define IC_PIC2    0xA0		/* PCI I/O address of slave */
+#define SIO_CR     0x5A		/* Configuration Register */
+#define SIO_ACPIBAR 0x88		/* ACPI BAR */
+#define SIO_FDCBAR 0x90		/* Floppy Disk Controller BAR */
+#define SIO_SP1BAR 0x94		/* Serial 1 BAR */
+#define SIO_SP2BAR 0x98		/* Serial 2 BAR */
+#define SIO_PPBAR  0x9C		/* Parallel BAR */
+
+/* Interrupt triggers and routing */
+#define TRIGGER_1  0x67		/* Edge/level trigger register 1 */
+#define TRIGGER_2  0x68		/* Edge/level trigger register 2 */
+#define IR_SER     0x69		/* Serial 1 [0:3] and Serial 2 [4:7] */
+#define IR_PFD     0x6a		/* Parallel [0:3] and Floppy [4:7] */
+#define IR_IDE     0x6b		/* IDE1 [0:3] and IDE2 [4:7] */
+#define IR_USB     0x6d         /* USB [4:7] */
+#define IR_LOW     0x69		/* Lowest interrupt routing reg */
+#define IR_HIGH    0x71		/* Highest interrupt routing reg */
+
+/* 8259 operational control words */
+#define OCW2_EOI   0x20		/* Non-specific EOI */
+#define OCW2_SEOI  0x60		/* Specific EOI */
+#define OCW3_IIR   0x0A		/* Read request register */
+#define OCW3_ISR   0x0B		/* Read service register */
+#define OCW3_POLL  0x0C		/* Poll the PIC for an interrupt vector */
+
+/* Interrupt lines. Only PIC1 is used */
+#define USB_IRQ    1		/* USB */
+#define SP1_IRQ    3		/* Serial port 1 */
+#define SP2_IRQ    4		/* Serial port 2 */
+#define PAR_IRQ    5		/* Parallel port */
+#define FDC_IRQ    6		/* Floppy controller */
+#define IDE_IRQ    7		/* IDE (pri+sec) */
+
+/* ACPI registers */
+#define USB_REG_CR	0x1f	/* USB Regulator Control Register */
+
+#define SUPERIO_NIRQS   8
+
+struct superio_device {
+	u16 fdc_base;
+	u16 sp1_base;
+	u16 sp2_base;
+	u16 pp_base;
+	u16 acpi_base;
+	int iosapic_irq;
+	int iosapic_irq_enabled;
+	struct irq_region *irq_region;
+	struct pci_dev *lio_pdev;       /* pci device for legacy IO fn */
+};
+
+/*
+ * Does NS make a 87415 based plug in PCI card? If so, because of this
+ * macro we currently don't support it being plugged into a machine
+ * that contains a SuperIO chip AND has CONFIG_SUPERIO enabled.
+ *
+ * This could be fixed by checking to see if function 1 exists, and
+ * if it is SuperIO Legacy IO; but really now, is this combination
+ * going to EVER happen?
+ */
+
+#define SUPERIO_IDE_FN 0 /* Function number of IDE controller */
+#define SUPERIO_LIO_FN 1 /* Function number of Legacy IO controller */
+#define SUPERIO_USB_FN 2 /* Function number of USB controller */
+
+#define is_superio_device(x) \
+	(((x)->vendor == PCI_VENDOR_ID_NS) && \
+	(  ((x)->device == PCI_DEVICE_ID_NS_87415) \
+	|| ((x)->device == PCI_DEVICE_ID_NS_87560_LIO) \
+	|| ((x)->device == PCI_DEVICE_ID_NS_87560_USB) ) )
+
+extern void superio_inform_irq(int irq);
+extern void superio_serial_init(void);		/* called by rs_init() */
+extern int superio_fixup_irq(struct pci_dev *pcidev); /* called by iosapic */
+extern int superio_get_ide_irq(void);
+
+#endif /* _PARISC_SUPERIO_H */
diff -Nru a/include/asm-parisc/system.h b/include/asm-parisc/system.h
--- a/include/asm-parisc/system.h	Wed Oct 30 16:44:29 2002
+++ b/include/asm-parisc/system.h	Wed Oct 30 16:44:29 2002
@@ -35,37 +35,24 @@
 	unsigned int i:1;
 };
 
+#ifdef __LP64__
+#define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4))
+#else
 #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW))
+#endif
 
 struct task_struct;
 
 extern struct task_struct *_switch_to(struct task_struct *, struct task_struct *);
 
-#define prepare_to_switch()	do { } while(0)
 #define switch_to(prev, next, last) do {			\
 	(last) = _switch_to(prev, next);			\
 } while(0)
 
-/* borrowed this from sparc64 -- probably the SMP case is hosed for us */
-#ifdef CONFIG_SMP
-#define smp_mb()	mb()
-#define smp_rmb()	rmb()
-#define smp_wmb()	wmb()
-#define smp_read_barrier_depends()	do { } while(0)
-#else
-/* This is simply the barrier() macro from linux/kernel.h but when serial.c
- * uses tqueue.h uses smp_mb() defined using barrier(), linux/kernel.h
- * hasn't yet been included yet so it fails, thus repeating the macro here.
- */
-#define smp_mb()	__asm__ __volatile__("":::"memory");
-#define smp_rmb()	__asm__ __volatile__("":::"memory");
-#define smp_wmb()	__asm__ __volatile__("":::"memory");
-#define smp_read_barrier_depends()	do { } while(0)
-#endif
+
 
 /* interrupt control */
 #define local_save_flags(x)	__asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory")
-#define local_irq_restore(x)	__asm__ __volatile__("mtsm %0" : : "r" (x) : "memory")
 #define local_irq_disable()	__asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" )
 #define local_irq_enable()	__asm__ __volatile__("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory" )
 
@@ -74,14 +61,12 @@
 #define local_irq_restore(x) \
 	__asm__ __volatile__("mtsm %0" : : "r" (x) : "memory" )
 
-#ifdef CONFIG_SMP
-#else
-#define cli() local_irq_disable()
-#define sti() local_irq_enable()
-#define save_flags(x) local_save_flags(x)
-#define restore_flags(x) local_irq_restore(x)
-#endif
-
+#define irqs_disabled()			\
+({					\
+	unsigned long flags;		\
+	local_save_flags(flags);	\
+	(flags & PSW_I) == 0;		\
+})
 
 #define mfctl(reg)	({		\
 	unsigned long cr;		\
@@ -120,23 +105,45 @@
 		: "r" (gr), "i" (cr))
 
 
-#define mb()  __asm__ __volatile__ ("sync" : : :"memory")
-#define wmb() mb()
-#define read_barrier_depends()	do { } while(0)
-#define set_mb(var, value)  do { var = value; mb(); } while (0)
-#define set_wmb(var, value) do { var = value; wmb(); } while (0)
+/*
+** This is simply the barrier() macro from linux/kernel.h but when serial.c
+** uses tqueue.h uses smp_mb() defined using barrier(), linux/kernel.h
+** hasn't yet been included yet so it fails, thus repeating the macro here.
+**
+** PA-RISC architecture allows for weakly ordered memory accesses although
+** none of the processors use it. There is a strong ordered bit that is
+** set in the O-bit of the page directory entry. Operating systems that
+** can not tolerate out of order accesses should set this bit when mapping
+** pages. The O-bit of the PSW should also be set to 1 (I don't believe any
+** of the processor implemented the PSW O-bit). The PCX-W ERS states that
+** the TLB O-bit is not implemented so the page directory does not need to
+** have the O-bit set when mapping pages (section 3.1). This section also
+** states that the PSW Y, Z, G, and O bits are not implemented.
+** So it looks like nothing needs to be done for parisc-linux (yet).
+** (thanks to chada for the above comment -ggg)
+**
+** The __asm__ op below simple prevents gcc/ld from reordering
+** instructions across the mb() "call".
+*/
+#define mb()		__asm__ __volatile__("":::"memory");	/* barrier() */
+#define rmb()		mb()
+#define wmb()		mb()
+#define smp_mb()	mb()
+#define smp_wmb()	mb()
+#define smp_read_barrier_depends()	do { } while(0)
+#define read_barrier_depends()		do { } while(0)
 
-extern unsigned long __xchg(unsigned long, unsigned long *, int);
+#define set_mb(var, value)		do { var = value; mb(); } while (0)
+#define set_wmb(var, value)		do { var = value; wmb(); } while (0)
 
-#define xchg(ptr,x) \
- (__typeof__(*(ptr)))__xchg((unsigned long)(x),(unsigned long*)(ptr),sizeof(*(ptr)))
 
-/* LDCW, the only atomic read-write operation PA-RISC has.  Sigh. */
+/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*.  */
 #define __ldcw(a) ({ \
 	unsigned __ret; \
 	__asm__ __volatile__("ldcw 0(%1),%0" : "=r" (__ret) : "r" (a)); \
 	__ret; \
 })
+
 
 #ifdef CONFIG_SMP
 /*
diff -Nru a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h
--- a/include/asm-parisc/termios.h	Wed Oct 30 16:44:21 2002
+++ b/include/asm-parisc/termios.h	Wed Oct 30 16:44:21 2002
@@ -53,6 +53,8 @@
 #define N_PROFIBUS_FDL	10	/* Reserved for Profibus <Dave@mvhi.com> */
 #define N_IRDA		11	/* Linux IR - http://irda.sourceforge.net/ */
 #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__
diff -Nru a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/thread_info.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,78 @@
+#ifndef _ASM_PARISC_THREAD_INFO_H
+#define _ASM_PARISC_THREAD_INFO_H
+
+#ifdef __KERNEL__
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+
+struct thread_info {
+	struct task_struct *task;	/* main task structure */
+	struct exec_domain *exec_domain;/* execution domain */
+	__u32 flags;			/* thread_info flags (see TIF_*) */
+	__u32 cpu;			/* current CPU */
+	mm_segment_t addr_limit;	/* user-level address space limit */
+	__s32 preempt_count;		/* 0=premptable, <0=BUG; will also serve as bh-counter */
+};
+
+#define INIT_THREAD_INFO(tsk)			\
+{						\
+	task:		&tsk,			\
+	exec_domain:	&default_exec_domain,	\
+	flags:		0,			\
+	cpu:		0,			\
+	addr_limit:	KERNEL_DS,		\
+	preempt_count:	0,			\
+}
+
+#define init_thread_info        (init_thread_union.thread_info)
+#define init_stack              (init_thread_union.stack)
+
+/* thread information allocation */
+
+#define THREAD_ORDER            2
+/* Be sure to hunt all references to this down when you change the size of
+ * the kernel stack */
+#define THREAD_SIZE             (PAGE_SIZE << THREAD_ORDER)
+#define THREAD_SHIFT            (PAGE_SHIFT + THREAD_ORDER)
+
+#define alloc_thread_info() ((struct thread_info *) \
+			__get_free_pages(GFP_KERNEL, THREAD_ORDER))
+#define free_thread_info(ti)    free_pages((unsigned long) (ti), THREAD_ORDER)
+#define get_thread_info(ti)     get_task_struct((ti)->task)
+#define put_thread_info(ti)     put_task_struct((ti)->task)
+
+
+/* how to get the thread information struct from C */
+#define current_thread_info()	((struct thread_info *)mfctl(30))
+
+#endif /* !__ASSEMBLY */
+
+#define PREEMPT_ACTIVE          0x4000000
+
+/*
+ * thread information flags
+ */
+#define TIF_SYSCALL_TRACE	0	/* syscall trace active */
+#define TIF_NOTIFY_RESUME	1	/* resumption notification requested */
+#define TIF_SIGPENDING		2	/* signal pending */
+#define TIF_NEED_RESCHED	3	/* rescheduling necessary */
+#define TIF_POLLING_NRFLAG	4	/* true if poll_idle() is polling TIF_NEED_RESCHED */
+#define TIF_32BIT               5       /* 32 bit binary */
+
+#define TIF_WORK_MASK		0x7	/* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE */
+#define TIF_ALLWORK_MASK	0xf	/* bits 0..3 are "work to do on user-return" bits */
+
+#define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
+#define _TIF_NOTIFY_RESUME	(1 << TIF_NOTIFY_RESUME)
+#define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
+#define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
+#define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG)
+#define _TIF_32BIT		(1 << TIF_32BIT)
+
+#define _TIF_USER_WORK_MASK     (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
+                                 _TIF_NEED_RESCHED)
+
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_PARISC_THREAD_INFO_H */
diff -Nru a/include/asm-parisc/timex.h b/include/asm-parisc/timex.h
--- a/include/asm-parisc/timex.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-parisc/timex.h	Wed Oct 30 16:44:28 2002
@@ -9,6 +9,8 @@
 #include <asm/system.h>
 #include <linux/time.h>
 
+#define CLOCK_TICK_RATE	1193180 /* Underlying HZ */
+
 typedef unsigned long cycles_t;
 
 extern cycles_t cacheflush_time;
diff -Nru a/include/asm-parisc/tlb.h b/include/asm-parisc/tlb.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/tlb.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,27 @@
+#ifndef _PARISC_TLB_H
+#define _PARISC_TLB_H
+
+#define tlb_flush(tlb)			\
+do {	if ((tlb)->fullmm)		\
+		flush_tlb_mm((tlb)->mm);\
+} while (0)
+
+#define tlb_start_vma(tlb, vma) \
+do {	if (!(tlb)->fullmm)	\
+		flush_cache_range(vma, vma->vm_start, vma->vm_end); \
+} while (0)
+
+#define tlb_end_vma(tlb, vma)	\
+do {	if (!(tlb)->fullmm)	\
+		flush_tlb_range(vma, vma->vm_start, vma->vm_end); \
+} while (0)
+
+#define __tlb_remove_tlb_entry(tlb, pte, address) \
+	do { } while (0)
+
+#include <asm-generic/tlb.h>
+
+#define __pmd_free_tlb(tlb, pmd)	pmd_free(pmd)
+#define __pte_free_tlb(tlb, pte)	pte_free(pte)
+
+#endif
diff -Nru a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/tlbflush.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,86 @@
+#ifndef _PARISC_TLBFLUSH_H
+#define _PARISC_TLBFLUSH_H
+
+/* TLB flushing routines.... */
+
+#include <linux/mm.h>
+#include <asm/mmu_context.h>
+
+extern void flush_tlb_all(void);
+
+/*
+ * flush_tlb_mm()
+ *
+ * XXX This code is NOT valid for HP-UX compatibility processes,
+ * (although it will probably work 99% of the time). HP-UX
+ * processes are free to play with the space id's and save them
+ * over long periods of time, etc. so we have to preserve the
+ * space and just flush the entire tlb. We need to check the
+ * personality in order to do that, but the personality is not
+ * currently being set correctly.
+ *
+ * Of course, Linux processes could do the same thing, but
+ * we don't support that (and the compilers, dynamic linker,
+ * etc. do not do that).
+ */
+
+static inline void flush_tlb_mm(struct mm_struct *mm)
+{
+	if (mm == &init_mm) BUG(); /* Should never happen */
+
+#ifdef CONFIG_SMP
+	flush_tlb_all();
+#else
+	if (mm) {
+		if (mm->context != 0)
+			free_sid(mm->context);
+		mm->context = alloc_sid();
+		if (mm == current->active_mm)
+			load_context(mm->context);
+	}
+#endif
+}
+
+extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end)
+{
+}
+ 
+static inline void flush_tlb_page(struct vm_area_struct *vma,
+	unsigned long addr)
+{
+	/* For one page, it's not worth testing the split_tlb variable */
+
+	mtsp(vma->vm_mm->context,1);
+	pdtlb(addr);
+	pitlb(addr);
+}
+
+static inline void flush_tlb_range(struct vm_area_struct *vma,
+	unsigned long start, unsigned long end)
+{
+	unsigned long npages;
+
+	npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
+	if (npages >= 512)  /* XXX arbitrary, should be tuned */
+		flush_tlb_all();
+	else {
+
+		mtsp(vma->vm_mm->context,1);
+		if (split_tlb) {
+			while (npages--) {
+				pdtlb(start);
+				pitlb(start);
+				start += PAGE_SIZE;
+			}
+		} else {
+			while (npages--) {
+				pdtlb(start);
+				start += PAGE_SIZE;
+			}
+		}
+	}
+}
+
+#define flush_tlb_kernel_range(start, end) flush_tlb_all()
+
+#endif
diff -Nru a/include/asm-parisc/traps.h b/include/asm-parisc/traps.h
--- a/include/asm-parisc/traps.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-parisc/traps.h	Wed Oct 30 16:44:30 2002
@@ -1,4 +1,16 @@
 #ifndef __ASM_TRAPS_H
 #define __ASM_TRAPS_H
 
+#ifdef __KERNEL__
+struct pt_regs;
+
+/* traps.c */
+void parisc_terminate(char *msg, struct pt_regs *regs,
+		int code, unsigned long offset);
+
+/* mm/fault.c */
+void do_page_fault(struct pt_regs *regs, unsigned long code,
+		unsigned long address);
+#endif
+
 #endif
diff -Nru a/include/asm-parisc/types.h b/include/asm-parisc/types.h
--- a/include/asm-parisc/types.h	Wed Oct 30 16:44:23 2002
+++ b/include/asm-parisc/types.h	Wed Oct 30 16:44:23 2002
@@ -48,6 +48,7 @@
 /* Dma addresses are 32-bits wide.  */
 
 typedef u32 dma_addr_t;
+typedef u64 dma64_addr_t;
 
 #endif /* __KERNEL__ */
 
diff -Nru a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h
--- a/include/asm-parisc/uaccess.h	Wed Oct 30 16:44:26 2002
+++ b/include/asm-parisc/uaccess.h	Wed Oct 30 16:44:26 2002
@@ -18,8 +18,8 @@
 #define segment_eq(a,b)	((a).seg == (b).seg)
 
 #define get_ds()	(KERNEL_DS)
-#define get_fs()	(current->addr_limit)
-#define set_fs(x)	(current->addr_limit = (x))
+#define get_fs()	(current_thread_info()->addr_limit)
+#define set_fs(x)	(current_thread_info()->addr_limit = (x))
 
 /*
  * Note that since kernel addresses are in a separate address space on
@@ -34,6 +34,18 @@
 #define put_user __put_user
 #define get_user __get_user
 
+#if BITS_PER_LONG == 32
+#define LDD_KERNEL(ptr)		BUG()
+#define LDD_USER(ptr)		BUG()
+#define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr)
+#define STD_USER(x, ptr) __put_user_asm64(x,ptr)
+#else
+#define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr)
+#define LDD_USER(ptr) __get_user_asm("ldd",ptr)
+#define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr)
+#define STD_USER(x, ptr) __put_user_asm("std",x,ptr)
+#endif
+
 /*
  * The exception table contains two values: the first is an address
  * for an instruction that is allowed to fault, and the second is
@@ -46,7 +58,7 @@
 
 struct exception_table_entry {
 	unsigned long addr;  /* address of insn that is allowed to fault.   */
-	int skip;            /* pcoq skip | r9 clear flag | r8 -EFAULT flag */
+	long skip;           /* pcoq skip | r9 clear flag | r8 -EFAULT flag */
 };
 
 extern const struct exception_table_entry 
@@ -62,7 +74,7 @@
 	    case 1: __get_kernel_asm("ldb",ptr); break; \
 	    case 2: __get_kernel_asm("ldh",ptr); break; \
 	    case 4: __get_kernel_asm("ldw",ptr); break; \
-	    case 8: __get_kernel_asm("ldd",ptr); break; \
+	    case 8: LDD_KERNEL(ptr); break;		\
 	    default: BUG(); break;                      \
 	    }                                           \
 	}                                               \
@@ -71,7 +83,7 @@
 	    case 1: __get_user_asm("ldb",ptr); break;   \
 	    case 2: __get_user_asm("ldh",ptr); break;   \
 	    case 4: __get_user_asm("ldw",ptr); break;   \
-	    case 8: __get_user_asm("ldd",ptr); break;   \
+	    case 8: LDD_USER(ptr);  break;		\
 	    default: BUG(); break;                      \
 	    }                                           \
 	}                                               \
@@ -80,6 +92,27 @@
 	__gu_err;                                       \
 })
 
+#ifdef __LP64__
+#define __get_kernel_asm(ldx,ptr)                       \
+	__asm__("\n1:\t" ldx "\t0(%2),%0\n"             \
+		"2:\n"					\
+		"\t.section __ex_table,\"a\"\n"         \
+		 "\t.dword\t1b\n"                       \
+		 "\t.dword\t(2b-1b)+3\n"                \
+		 "\t.previous"                          \
+		: "=r"(__gu_val), "=r"(__gu_err)        \
+		: "r"(ptr), "1"(__gu_err));
+
+#define __get_user_asm(ldx,ptr)                         \
+	__asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n"       \
+		"2:\n"					\
+		"\t.section __ex_table,\"a\"\n"         \
+		 "\t.dword\t1b\n"                       \
+		 "\t.dword\t(2b-1b)+3\n"                \
+		 "\t.previous"                          \
+		: "=r"(__gu_val), "=r"(__gu_err)        \
+		: "r"(ptr), "1"(__gu_err));
+#else
 #define __get_kernel_asm(ldx,ptr)                       \
 	__asm__("\n1:\t" ldx "\t0(%2),%0\n"             \
 		"2:\n"					\
@@ -99,7 +132,7 @@
 		 "\t.previous"                          \
 		: "=r"(__gu_val), "=r"(__gu_err)        \
 		: "r"(ptr), "1"(__gu_err));
-
+#endif
 
 #define __put_user(x,ptr)                                       \
 ({								\
@@ -110,7 +143,7 @@
 	    case 1: __put_kernel_asm("stb",x,ptr); break;       \
 	    case 2: __put_kernel_asm("sth",x,ptr); break;       \
 	    case 4: __put_kernel_asm("stw",x,ptr); break;       \
-	    case 8: __put_kernel_asm("std",x,ptr); break;       \
+	    case 8: STD_KERNEL(x,ptr); break;			\
 	    default: BUG(); break;                              \
 	    }                                                   \
 	}                                                       \
@@ -119,7 +152,7 @@
 	    case 1: __put_user_asm("stb",x,ptr); break;         \
 	    case 2: __put_user_asm("sth",x,ptr); break;         \
 	    case 4: __put_user_asm("stw",x,ptr); break;         \
-	    case 8: __put_user_asm("std",x,ptr); break;         \
+	    case 8: STD_USER(x,ptr); break;			\
 	    default: BUG(); break;                              \
 	    }                                                   \
 	}                                                       \
@@ -133,6 +166,29 @@
  * gcc knows about, so there are no aliasing issues.
  */
 
+#ifdef __LP64__
+#define __put_kernel_asm(stx,x,ptr)                         \
+	__asm__ __volatile__ (                              \
+		"\n1:\t" stx "\t%2,0(%1)\n"                 \
+		"2:\n"					    \
+		"\t.section __ex_table,\"a\"\n"             \
+		 "\t.dword\t1b\n"                           \
+		 "\t.dword\t(2b-1b)+1\n"                    \
+		 "\t.previous"                              \
+		: "=r"(__pu_err)                            \
+		: "r"(ptr), "r"(x), "0"(__pu_err))
+
+#define __put_user_asm(stx,x,ptr)                           \
+	__asm__ __volatile__ (                              \
+		"\n1:\t" stx "\t%2,0(%%sr3,%1)\n"           \
+		"2:\n"					    \
+		"\t.section __ex_table,\"a\"\n"             \
+		 "\t.dword\t1b\n"                           \
+		 "\t.dword\t(2b-1b)+1\n"                    \
+		 "\t.previous"                              \
+		: "=r"(__pu_err)                            \
+		: "r"(ptr), "r"(x), "0"(__pu_err))
+#else
 #define __put_kernel_asm(stx,x,ptr)                         \
 	__asm__ __volatile__ (                              \
 		"\n1:\t" stx "\t%2,0(%1)\n"                 \
@@ -155,6 +211,44 @@
 		: "=r"(__pu_err)                            \
 		: "r"(ptr), "r"(x), "0"(__pu_err))
 
+static inline void __put_kernel_asm64(u64 x, void *ptr)
+{
+	u32 hi = x>>32;
+	u32 lo = x&0xffffffff;
+	__asm__ __volatile__ (
+		"\n1:\tstw %1,0(%0)\n"
+		"\n2:\tstw %2,4(%0)\n"
+		"3:\n"
+		"\t.section __ex_table,\"a\"\n"
+		 "\t.word\t1b\n"
+		 "\t.word\t(3b-1b)+1\n"
+		 "\t.word\t2b\n"
+		 "\t.word\t(3b-2b)+1\n"
+		 "\t.previous"
+		: : "r"(ptr), "r"(hi), "r"(lo));
+
+}
+
+static inline void __put_user_asm64(u64 x, void *ptr)
+{
+	u32 hi = x>>32;
+	u32 lo = x&0xffffffff;
+	__asm__ __volatile__ (
+		"\n1:\tstw %1,0(%%sr3,%0)\n"
+		"\n2:\tstw %2,4(%%sr3,%0)\n"
+		"3:\n"
+		"\t.section __ex_table,\"a\"\n"
+		 "\t.word\t1b\n"
+		 "\t.word\t(3b-1b)+1\n"
+		 "\t.word\t2b\n"
+		 "\t.word\t(3b-2b)+1\n"
+		 "\t.previous"
+		: : "r"(ptr), "r"(hi), "r"(lo));
+
+}
+
+#endif
+
 
 /*
  * Complex access routines -- external declarations
@@ -174,16 +268,11 @@
 #define strnlen_user lstrnlen_user
 #define strlen_user(str) lstrnlen_user(str, 0x7fffffffL)
 #define clear_user lclear_user
+#define __clear_user lclear_user
 
 #define copy_from_user lcopy_from_user
 #define __copy_from_user lcopy_from_user
 #define copy_to_user lcopy_to_user
 #define __copy_to_user lcopy_to_user
-
-#define copy_to_user_ret(to,from,n,retval) \
-    ({ if (lcopy_to_user(to,from,n)) return retval; })
-
-#define copy_from_user_ret(to,from,n,retval) \
-    ({ if (lcopy_from_user(to,from,n)) return retval; })
 
 #endif /* __PARISC_UACCESS_H */
diff -Nru a/include/asm-parisc/unaligned.h b/include/asm-parisc/unaligned.h
--- a/include/asm-parisc/unaligned.h	Wed Oct 30 16:44:31 2002
+++ b/include/asm-parisc/unaligned.h	Wed Oct 30 16:44:31 2002
@@ -17,4 +17,11 @@
      memmove((ptr), &__tmp, sizeof(*(ptr)));		\
      (void)0; })
 
-#endif /* _ASM_PARISC_UNALIGNED_H */
+
+#ifdef __KERNEL__
+struct pt_regs;
+void handle_unaligned(struct pt_regs *regs);
+int check_unaligned(struct pt_regs *regs);
+#endif
+
+#endif /* _ASM_PARISC_UNALIGNED_H_ */
diff -Nru a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h
--- a/include/asm-parisc/unistd.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-parisc/unistd.h	Wed Oct 30 16:44:17 2002
@@ -579,7 +579,7 @@
 #define __NR_uselib              (__NR_Linux + 86)
 #define __NR_swapon              (__NR_Linux + 87)
 #define __NR_reboot              (__NR_Linux + 88)
-#define __NR_readdir             (__NR_Linux + 89)
+#define __NR_mmap2             (__NR_Linux + 89)
 #define __NR_mmap                (__NR_Linux + 90)
 #define __NR_munmap              (__NR_Linux + 91)
 #define __NR_truncate            (__NR_Linux + 92)
@@ -591,8 +591,8 @@
 #define __NR_recv                (__NR_Linux + 98)
 #define __NR_statfs              (__NR_Linux + 99)
 #define __NR_fstatfs            (__NR_Linux + 100)
-#define __NR_ioperm             (__NR_Linux + 101)
-#define __NR_socketcall         (__NR_Linux + 102)
+#define __NR_stat64           (__NR_Linux + 101)
+/* #define __NR_socketcall         (__NR_Linux + 102) */
 #define __NR_syslog             (__NR_Linux + 103)
 #define __NR_setitimer          (__NR_Linux + 104)
 #define __NR_getitimer          (__NR_Linux + 105)
@@ -602,7 +602,7 @@
 #define __NR_pwrite64           (__NR_Linux + 109)
 #define __NR_getcwd             (__NR_Linux + 110)
 #define __NR_vhangup            (__NR_Linux + 111)
-#define __NR_idle               (__NR_Linux + 112)
+#define __NR_fstat64            (__NR_Linux + 112)
 #define __NR_vfork              (__NR_Linux + 113)
 #define __NR_wait4              (__NR_Linux + 114)
 #define __NR_swapoff            (__NR_Linux + 115)
@@ -689,14 +689,25 @@
 
 #define __NR_getpmsg            (__NR_Linux + 196)      /* some people actually want streams */
 #define __NR_putpmsg            (__NR_Linux + 197)      /* some people actually want streams */
-#define __NR_gettid             (__NR_Linux + 198)
-#define __NR_tkill              (__NR_Linux + 199)
 
-#define __NR_Linux_syscalls     199
+#define __NR_lstat64            (__NR_Linux + 198)
+#define __NR_truncate64         (__NR_Linux + 199)
+#define __NR_ftruncate64        (__NR_Linux + 200)
+#define __NR_getdents64         (__NR_Linux + 201)
+#define __NR_fcntl64            (__NR_Linux + 202)
+#define __NR_attrctl            (__NR_Linux + 203)
+#define __NR_acl_get            (__NR_Linux + 204)
+#define __NR_acl_set            (__NR_Linux + 205)
+#define __NR_gettid             (__NR_Linux + 206)
+#define __NR_readahead          (__NR_Linux + 207)
+#define __NR_tkill		(__NR_Linux + 208)
+
+#define __NR_Linux_syscalls     208
 
 #define HPUX_GATEWAY_ADDR       0xC0000004
 #define LINUX_GATEWAY_ADDR      0x100
-#define LINUX_GATEWAY_STR       "0x100"
+
+#ifndef __ASSEMBLY__
 
 /* The old syscall code here didn't work, and it looks like it's only used
  * by applications such as fdisk which for some reason need to produce
@@ -725,7 +736,7 @@
         }                                                       \
         if (__sys_res >= (unsigned long)-4095) {                \
 		errno = -__sys_res;				\
-                __sys_res == (unsigned long)-1;                 \
+                __sys_res = (unsigned long)-1;                 \
         }                                                       \
         __sys_res;                                              \
 })
@@ -796,7 +807,7 @@
 }
 
 
-/* mmap takes 6 arguments */
+/* mmap & mmap2 take 6 arguments */
 
 #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) \
@@ -804,8 +815,11 @@
     return K_INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6);	\
 }
 
+
 #ifdef __KERNEL_SYSCALLS__
 
+#include <asm/current.h>
+
 static inline pid_t setsid(void)
 {
 	extern int sys_setsid(void);
@@ -836,6 +850,13 @@
 	return sys_dup(fd);
 }
 
+static inline int execve(char *filename, char * argv [],
+	char * envp[])
+{
+	extern int __execve(char *, char **, char **, struct task_struct *);
+	return __execve(filename, argv, envp, current);
+}
+
 static inline int open(const char *file, int flag, int mode)
 {
 	extern long sys_open(const char *, int, int);
@@ -844,6 +865,7 @@
 
 static inline int close(int fd)
 {
+	extern asmlinkage long sys_close(unsigned int);
 	return sys_close(fd);
 }
 
@@ -853,20 +875,17 @@
 	return sys_exit(exitcode);
 }
 
+struct rusage;
+extern asmlinkage long sys_wait4(pid_t, unsigned int *, int, struct rusage *);
+
 static inline pid_t waitpid(pid_t pid, int *wait_stat, int options)
 {
-	extern int sys_wait4(int, int *, int, struct rusage *);
-	return sys_wait4((int)pid, wait_stat, options, NULL);
+	return sys_wait4(pid, wait_stat, options, NULL);
 }
 
-static inline int execve(char *filename, char * argv [],
-	char * envp[])
-{
-	extern int __execve(char *, char **, char **, struct task_struct *);
-	return __execve(filename, argv, envp, current);
-}
+#endif	/* __KERNEL_SYSCALLS__ */
 
-#endif
+#endif /* __ASSEMBLY__ */
 
 #undef STR
 
diff -Nru a/include/asm-parisc/xor.h b/include/asm-parisc/xor.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-parisc/xor.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1 @@
+#include <asm-generic/xor.h>
diff -Nru a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h
--- a/include/asm-ppc/kmap_types.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-ppc/kmap_types.h	Wed Oct 30 16:44:30 2002
@@ -14,6 +14,8 @@
 	KM_PTE1,
 	KM_IRQ0,
 	KM_IRQ1,
+	KM_CRYPTO_USER,
+	KM_CRYPTO_SOFTIRQ,
 	KM_TYPE_NR
 };
 
diff -Nru a/include/asm-ppc64/kmap_types.h b/include/asm-ppc64/kmap_types.h
--- a/include/asm-ppc64/kmap_types.h	Wed Oct 30 16:44:28 2002
+++ b/include/asm-ppc64/kmap_types.h	Wed Oct 30 16:44:28 2002
@@ -14,6 +14,8 @@
 	KM_PTE1,
 	KM_IRQ0,
 	KM_IRQ1,
+	KM_CRYPTO_USER,
+	KM_CRYPTO_SOFTIRQ,	
 	KM_TYPE_NR
 };
 
diff -Nru a/include/asm-s390/kmap_types.h b/include/asm-s390/kmap_types.h
--- a/include/asm-s390/kmap_types.h	Wed Oct 30 16:44:19 2002
+++ b/include/asm-s390/kmap_types.h	Wed Oct 30 16:44:19 2002
@@ -14,6 +14,8 @@
 	KM_PTE1,
 	KM_IRQ0,
 	KM_IRQ1,
+	KM_CRYPTO_USER,
+	KM_CRYPTO_SOFTIRQ,	
 	KM_TYPE_NR
 };
 
diff -Nru a/include/asm-sparc/kmap_types.h b/include/asm-sparc/kmap_types.h
--- a/include/asm-sparc/kmap_types.h	Wed Oct 30 16:44:25 2002
+++ b/include/asm-sparc/kmap_types.h	Wed Oct 30 16:44:25 2002
@@ -13,6 +13,8 @@
 	KM_PTE1,
 	KM_IRQ0,
 	KM_IRQ1,
+	KM_CRYPTO_USER,
+	KM_CRYPTO_SOFTIRQ,
 	KM_TYPE_NR
 };
 
diff -Nru a/include/asm-sparc64/kmap_types.h b/include/asm-sparc64/kmap_types.h
--- a/include/asm-sparc64/kmap_types.h	Wed Oct 30 16:44:33 2002
+++ b/include/asm-sparc64/kmap_types.h	Wed Oct 30 16:44:33 2002
@@ -17,6 +17,8 @@
 	KM_PTE1,
 	KM_IRQ0,
 	KM_IRQ1,
+	KM_CRYPTO_USER,
+	KM_CRYPTO_SOFTIRQ,
 	KM_TYPE_NR
 };
 
diff -Nru a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h
--- a/include/asm-sparc64/page.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-sparc64/page.h	Wed Oct 30 16:44:27 2002
@@ -39,6 +39,7 @@
 #define clear_page(X)	_clear_page((void *)(X))
 struct page;
 extern void clear_user_page(void *addr, unsigned long vaddr, struct page *page);
+#define copy_page(X,Y)	__memcpy((void *)(X), (void *)(Y), PAGE_SIZE)
 extern void copy_user_page(void *to, void *from, unsigned long vaddr, struct page *topage);
 
 /* GROSS, defining this makes gcc pass these types as aggregates,
diff -Nru a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
--- a/include/asm-sparc64/system.h	Wed Oct 30 16:44:17 2002
+++ b/include/asm-sparc64/system.h	Wed Oct 30 16:44:17 2002
@@ -84,6 +84,7 @@
 	membar("#LoadLoad | #LoadStore | #StoreStore | #StoreLoad");
 #define rmb()		membar("#LoadLoad")
 #define wmb()		membar("#StoreStore")
+#define read_barrier_depends()		do { } while(0)
 #define set_mb(__var, __value) \
 	do { __var = __value; membar("#StoreLoad | #StoreStore"); } while(0)
 #define set_wmb(__var, __value) \
@@ -93,10 +94,12 @@
 #define smp_mb()	mb()
 #define smp_rmb()	rmb()
 #define smp_wmb()	wmb()
+#define smp_read_barrier_depends()	read_barrier_depends()
 #else
 #define smp_mb()	__asm__ __volatile__("":::"memory");
 #define smp_rmb()	__asm__ __volatile__("":::"memory");
 #define smp_wmb()	__asm__ __volatile__("":::"memory");
+#define smp_read_barrier_depends()	do { } while(0)
 #endif
 
 #define flushi(addr)	__asm__ __volatile__ ("flush %0" : : "r" (addr) : "memory")
diff -Nru a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h
--- a/include/asm-x86_64/e820.h	Wed Oct 30 16:44:22 2002
+++ b/include/asm-x86_64/e820.h	Wed Oct 30 16:44:22 2002
@@ -54,8 +54,7 @@
 
 extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end);
 
-extern void __init parse_memopt(char *p);
-extern void __init print_user_map(void);
+extern void __init parse_memopt(char *p, char **end);
 
 extern struct e820map e820;
 #endif/*!__ASSEMBLY__*/
diff -Nru a/include/asm-x86_64/kmap_types.h b/include/asm-x86_64/kmap_types.h
--- a/include/asm-x86_64/kmap_types.h	Wed Oct 30 16:44:30 2002
+++ b/include/asm-x86_64/kmap_types.h	Wed Oct 30 16:44:30 2002
@@ -11,6 +11,8 @@
 	KM_BIO_DST_IRQ,
 	KM_IRQ0,
 	KM_IRQ1,
+	KM_CRYPTO_USER,
+	KM_CRYPTO_SOFTIRQ,
 	KM_TYPE_NR
 };
 
diff -Nru a/include/asm-x86_64/mtrr.h b/include/asm-x86_64/mtrr.h
--- a/include/asm-x86_64/mtrr.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-x86_64/mtrr.h	Wed Oct 30 16:44:24 2002
@@ -107,12 +107,7 @@
 }
 #endif
 
-/*  The following functions are for initialisation: don't use them!  */
-extern int mtrr_init (void);
-#if defined(CONFIG_SMP) && defined(CONFIG_MTRR)
-extern void mtrr_init_boot_cpu (void);
-extern void mtrr_init_secondary_cpu (void);
-#endif
+extern void mtrr_init_cpu(int cpu);
 
 #endif
 
diff -Nru a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h
--- a/include/asm-x86_64/pci.h	Wed Oct 30 16:44:27 2002
+++ b/include/asm-x86_64/pci.h	Wed Oct 30 16:44:27 2002
@@ -44,7 +44,7 @@
 
 struct pci_dev;
 
-extern int iommu_setup(char *opt);
+extern int iommu_setup(char *opt, char **end);
 
 extern void pci_iommu_init(void);
 
diff -Nru a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h
--- a/include/asm-x86_64/percpu.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-x86_64/percpu.h	Wed Oct 30 16:44:24 2002
@@ -1,45 +1,6 @@
-#ifndef _ASM_X8664_PERCPU_H_
-#define _ASM_X8664_PERCPU_H_
-#include <linux/compiler.h>
-#include <linux/config.h>
+#ifndef __ARCH_I386_PERCPU__
+#define __ARCH_I386_PERCPU__
 
-#ifdef CONFIG_SMP
+#include <asm-generic/percpu.h>
 
-#include <asm/pda.h>
-
-extern unsigned long __per_cpu_offset[NR_CPUS];
-
-/* Separate out the type, so (int[3], foo) works. */
-#ifndef MODULE
-#define DEFINE_PER_CPU(type, name) \
-    __attribute__((__section__(".percpu"))) __typeof__(type) name##__per_cpu
-#endif
-
-/* Completely hide the relocation from the compiler to avoid problems with 
-   the optimizer */ 
-#define __per_cpu(offset,base) \
-	({ typeof(base) ptr = (void *)base; \
-	   asm("addq %1,%0" : "=r" (ptr) : "r" (offset), "0" (ptr)); ptr; })
-
-/* var is in discarded region: offset to particular copy we want */
-
-#define per_cpu(var,cpu) (*__per_cpu(__per_cpu_offset[cpu], &var##__per_cpu)) 
-#define __get_cpu_var(var) (*__per_cpu(read_pda(cpudata_offset), &var##__per_cpu))
-
-#else /* ! SMP */
-
-/* Can't define per-cpu variables in modules.  Sorry --RR */
-#ifndef MODULE
-#define DEFINE_PER_CPU(type, name) \
-    __typeof__(type) name##__per_cpu
-#endif
-
-#define per_cpu(var, cpu)			var##__per_cpu
-#define __get_cpu_var(var)			var##__per_cpu
-#endif
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) name##__per_cpu
-
-extern void setup_per_cpu_areas(void);
-
-#endif /* _ASM_X8664_PERCPU_H_ */
+#endif /* __ARCH_I386_PERCPU__ */
diff -Nru a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
--- a/include/asm-x86_64/pgtable.h	Wed Oct 30 16:44:24 2002
+++ b/include/asm-x86_64/pgtable.h	Wed Oct 30 16:44:24 2002
@@ -274,24 +274,40 @@
 #define level3_offset_k(dir, address) ((pgd_t *) pml4_page(*(dir)) + pgd_index(address))
 
 /* PGD - Level3 access */
-
-#define __pgd_offset_k(pgd, address) ((pgd) + pgd_index(address))
 /* to find an entry in a page-table-directory. */
 #define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
-#define current_pgd_offset_k(address) \
-       __pgd_offset_k((pgd_t *)read_pda(level4_pgt), address)
+static inline pgd_t *__pgd_offset_k(pgd_t *pgd, unsigned long address)
+{ 
+	return pgd + pgd_index(address);
+} 
+
+/* Find correct pgd via the hidden fourth level page level: */
 
 /* This accesses the reference page table of the boot cpu. 
    Other CPUs get synced lazily via the page fault handler. */
 static inline pgd_t *pgd_offset_k(unsigned long address)
 {
-	pml4_t pml4;
+	unsigned long addr;
 
-	pml4 = init_level4_pgt[pml4_index(address)];
-	return __pgd_offset_k(__va(pml4_val(pml4) & PTE_MASK), address);
+	addr = pml4_val(init_level4_pgt[pml4_index(address)]);
+	addr &= PHYSICAL_PAGE_MASK;
+	return __pgd_offset_k((pgd_t *)__va(addr), address);
 }
 
+/* Access the pgd of the page table as seen by the current CPU. */ 
+static inline pgd_t *current_pgd_offset_k(unsigned long address)
+{
+	unsigned long addr;
+
+	addr = read_pda(level4_pgt)[pml4_index(address)];
+	addr &= PHYSICAL_PAGE_MASK;
+	return __pgd_offset_k((pgd_t *)__va(addr), address);
+}
+
+#if 0 /* disabled because of confusing/wrong naming. */
 #define __pgd_offset(address) pgd_index(address)
+#endif
+
 #define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
 
 /* PMD  - Level 2 access */
diff -Nru a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
--- a/include/asm-x86_64/processor.h	Wed Oct 30 16:44:34 2002
+++ b/include/asm-x86_64/processor.h	Wed Oct 30 16:44:34 2002
@@ -258,7 +258,7 @@
 #define TASK_UNMAPPED_32 0x40000000
 #define TASK_UNMAPPED_64 (TASK_SIZE/3) 
 #define TASK_UNMAPPED_BASE	\
-	(test_thread_flags(TIF_IA32) ? TASK_UNMAPPED_32 : TASK_UNMAPPED_64)  
+	(test_thread_flag(TIF_IA32) ? TASK_UNMAPPED_32 : TASK_UNMAPPED_64)  
 
 /*
  * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
diff -Nru a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h
--- a/include/asm-x86_64/proto.h	Wed Oct 30 16:44:32 2002
+++ b/include/asm-x86_64/proto.h	Wed Oct 30 16:44:32 2002
@@ -34,15 +34,13 @@
 extern void reserve_bootmem_generic(unsigned long phys, unsigned len);
 extern void free_bootmem_generic(unsigned long phys, unsigned len);
 
-extern unsigned long start_pfn, end_pfn; 
+extern unsigned long start_pfn, end_pfn, end_pfn_map; 
 
 extern void show_stack(unsigned long * rsp);
 
 extern void exception_table_check(void);
 
-extern void acpi_boot_init(char *);
-
-int iommu_setup(char *opt);
+extern int acpi_boot_init(char *);
 
 #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1))
 #define round_down(x,y) ((x) & ~((y)-1))
diff -Nru a/include/linux/acpi.h b/include/linux/acpi.h
--- a/include/linux/acpi.h	Wed Oct 30 16:44:17 2002
+++ b/include/linux/acpi.h	Wed Oct 30 16:44:17 2002
@@ -90,7 +90,7 @@
 typedef struct {
 	u8			type;
 	u8			length;
-} acpi_table_entry_header __attribute__ ((packed));
+} __attribute__ ((packed)) acpi_table_entry_header;
 
 /* Root System Description Table (RSDT) */
 
@@ -143,7 +143,7 @@
 	u16			polarity:2;
 	u16			trigger:2;
 	u16			reserved:12;
-} acpi_interrupt_flags __attribute__ ((packed));
+} __attribute__ ((packed)) acpi_interrupt_flags;
 
 struct acpi_table_lapic {
 	acpi_table_entry_header	header;
@@ -330,7 +330,7 @@
 	acpi_generic_address	ec_data;
 	u32			uid;
 	u8			gpe_bit;
-	char			*ec_id;
+	char			ec_id[0];
 } __attribute__ ((packed));
 
 /* Table Handlers */
diff -Nru a/include/linux/bio.h b/include/linux/bio.h
--- a/include/linux/bio.h	Wed Oct 30 16:44:31 2002
+++ b/include/linux/bio.h	Wed Oct 30 16:44:31 2002
@@ -101,6 +101,7 @@
 #define BIO_EOF		2	/* out-out-bounds error */
 #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_flagged(bio, flag)	((bio)->bi_flags & (1 << (flag)))
 
 /*
@@ -131,6 +132,7 @@
 #define bio_page(bio)		bio_iovec((bio))->bv_page
 #define bio_offset(bio)		bio_iovec((bio))->bv_offset
 #define bio_sectors(bio)	((bio)->bi_size >> 9)
+#define bio_cur_sectors(bio)	(bio_iovec(bio)->bv_len >> 9)
 #define bio_data(bio)		(page_address(bio_page((bio))) + bio_offset((bio)))
 #define bio_barrier(bio)	((bio)->bi_rw & (1 << BIO_RW_BARRIER))
 
@@ -201,7 +203,7 @@
 extern struct bio *bio_alloc(int, int);
 extern void bio_put(struct bio *);
 
-extern int bio_endio(struct bio *, unsigned int, int);
+extern void bio_endio(struct bio *, unsigned int, int);
 struct request_queue;
 extern inline int bio_phys_segments(struct request_queue *, struct bio *);
 extern inline int bio_hw_segments(struct request_queue *, struct bio *);
@@ -214,6 +216,9 @@
 
 extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
 extern int bio_get_nr_vecs(struct block_device *);
+extern struct bio *bio_map_user(struct block_device *, unsigned long,
+				unsigned int, int);
+extern void bio_unmap_user(struct bio *, int);
 
 #ifdef CONFIG_HIGHMEM
 /*
diff -Nru a/include/linux/blk.h b/include/linux/blk.h
--- a/include/linux/blk.h	Wed Oct 30 16:44:32 2002
+++ b/include/linux/blk.h	Wed Oct 30 16:44:32 2002
@@ -7,8 +7,10 @@
 #include <linux/spinlock.h>
 #include <linux/compiler.h>
 
-extern void set_device_ro(kdev_t dev,int flag);
-extern void add_blkdev_randomness(int major);
+extern void set_device_ro(struct block_device *bdev, int flag);
+extern void set_disk_ro(struct gendisk *disk, int flag);
+extern void add_disk_randomness(struct gendisk *disk);
+extern void rand_initialize_disk(struct gendisk *disk);
 
 #ifdef CONFIG_BLK_DEV_RAM
 
@@ -39,46 +41,20 @@
  */
 
 extern int end_that_request_first(struct request *, int, int);
+extern int end_that_request_chunk(struct request *, int, int);
 extern void end_that_request_last(struct request *);
 struct request *elv_next_request(request_queue_t *q);
 
 static inline void blkdev_dequeue_request(struct request *req)
 {
-	list_del(&req->queuelist);
+	BUG_ON(list_empty(&req->queuelist));
+
+	list_del_init(&req->queuelist);
 
 	if (req->q)
 		elv_remove_request(req->q, req);
 }
 
-#define _elv_add_request_core(q, rq, where, plug)			\
-	do {								\
-		if ((plug))						\
-			blk_plug_device((q));				\
-		(q)->elevator.elevator_add_req_fn((q), (rq), (where));	\
-	} while (0)
-
-#define _elv_add_request(q, rq, back, p) do {				      \
-	if ((back))							      \
-		_elv_add_request_core((q), (rq), (q)->queue_head.prev, (p));  \
-	else								      \
-		_elv_add_request_core((q), (rq), &(q)->queue_head, (p));      \
-} while (0)
-
-#define elv_add_request(q, rq, back) _elv_add_request((q), (rq), (back), 1)
-
-#if defined(MAJOR_NR) || defined(IDE_DRIVER)
-#if (MAJOR_NR != SCSI_TAPE_MAJOR) && (MAJOR_NR != OSST_MAJOR)
-#if !defined(IDE_DRIVER)
-
-#ifndef QUEUE
-# define QUEUE (&blk_dev[MAJOR_NR].request_queue)
-#endif
-#ifndef CURRENT
-# define CURRENT elv_next_request(QUEUE)
-#endif
-
-#endif /* !defined(IDE_DRIVER) */
-
 /*
  * If we have our own end_request, we do not want to include this mess
  */
@@ -88,12 +64,10 @@
 	if (end_that_request_first(req, uptodate, req->hard_cur_sectors))
 		return;
 
-	add_blkdev_randomness(major(req->rq_dev));
+	add_disk_randomness(req->rq_disk);
 	blkdev_dequeue_request(req);
 	end_that_request_last(req);
 }
 #endif /* !LOCAL_END_REQUEST */
-#endif /* (MAJOR_NR != SCSI_TAPE_MAJOR) */
-#endif /* defined(MAJOR_NR) || defined(IDE_DRIVER) */
 
 #endif /* _BLK_H */
diff -Nru a/include/linux/blkdev.h b/include/linux/blkdev.h
--- a/include/linux/blkdev.h	Wed Oct 30 16:44:25 2002
+++ b/include/linux/blkdev.h	Wed Oct 30 16:44:25 2002
@@ -22,27 +22,35 @@
 	wait_queue_head_t wait;
 };
 
+/*
+ * try to put the fields that are referenced together in the same cacheline
+ */
 struct request {
 	struct list_head queuelist; /* looking for ->queue? you must _not_
 				     * access it directly, use
 				     * blkdev_dequeue_request! */
-	void *elevator_private;
+	unsigned long flags;		/* see REQ_ bits below */
 
-	unsigned char cmd[16];
+	kdev_t rq_dev;
+	sector_t sector;
+	unsigned long nr_sectors;
+	unsigned int current_nr_sectors;
 
-	unsigned long flags;		/* see REQ_ bits below */
+	void *elevator_private;
 
 	int rq_status;	/* should split this into a few status bits */
-	kdev_t rq_dev;
 	struct gendisk *rq_disk;
 	int errors;
-	sector_t sector;
-	unsigned long nr_sectors;
+	unsigned long start_time;
 	sector_t hard_sector;		/* the hard_* are block layer
 					 * internals, no driver should
 					 * touch them
 					 */
 	unsigned long hard_nr_sectors;
+	unsigned int hard_cur_sectors;
+
+	struct bio *bio;
+	struct bio *biotail;
 
 	/* Number of scatter-gather DMA addr+len pairs after
 	 * physical address coalescing is performed.
@@ -56,21 +64,28 @@
 	 */
 	unsigned short nr_hw_segments;
 
-	unsigned int current_nr_sectors;
-	unsigned int hard_cur_sectors;
 	int tag;
-	void *special;
 	char *buffer;
 
-	/* For packet commands */
+	int ref_count;
+	request_queue_t *q;
+	struct request_list *rl;
+
+	struct completion *waiting;
+	void *special;
+
+	/*
+	 * when request is used as a packet command carrier
+	 */
+	unsigned char cmd[16];
+
 	unsigned int data_len;
-	void *data, *sense;
+	void *data;
+
+	unsigned int sense_len;
+	void *sense;
 
 	unsigned int timeout;
-	struct completion *waiting;
-	struct bio *bio, *biotail;
-	request_queue_t *q;
-	struct request_list *rl;
 };
 
 /*
@@ -126,7 +141,6 @@
 typedef int (merge_requests_fn) (request_queue_t *, struct request *,
 				 struct request *);
 typedef void (request_fn_proc) (request_queue_t *q);
-typedef request_queue_t * (queue_proc) (kdev_t dev);
 typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
 typedef int (prep_rq_fn) (request_queue_t *, struct request *);
 typedef void (unplug_fn) (void *q);
@@ -150,12 +164,6 @@
 	int max_depth;
 };
 
-/*
- * Default nr free requests per queue, ll_rw_blk will scale it down
- * according to available RAM at init time
- */
-#define QUEUE_NR_REQUESTS	8192
-
 struct request_queue
 {
 	/*
@@ -215,10 +223,17 @@
 	unsigned int		max_segment_size;
 
 	unsigned long		seg_boundary_mask;
+	unsigned int		dma_alignment;
 
 	wait_queue_head_t	queue_wait;
 
 	struct blk_queue_tag	*queue_tags;
+
+	/*
+	 * sg stuff
+	 */
+	unsigned int		sg_timeout;
+	unsigned int		sg_reserved_size;
 };
 
 #define RQ_INACTIVE		(-1)
@@ -254,6 +269,13 @@
  */
 #define blk_queue_headactive(q, head_active)
 
+/*
+ * q->prep_rq_fn return values
+ */
+#define BLKPREP_OK		0	/* serve it */
+#define BLKPREP_KILL		1	/* fatal error, kill */
+#define BLKPREP_DEFER		2	/* leave on queue */
+
 extern unsigned long blk_max_low_pfn, blk_max_pfn;
 
 /*
@@ -268,39 +290,19 @@
 #define BLK_BOUNCE_ISA		(ISA_DMA_THRESHOLD)
 
 extern int init_emergency_isa_pool(void);
-void blk_queue_bounce(request_queue_t *q, struct bio **bio);
+inline void blk_queue_bounce(request_queue_t *q, struct bio **bio);
 
 #define rq_for_each_bio(bio, rq)	\
 	if ((rq->bio))			\
 		for (bio = (rq)->bio; bio; bio = bio->bi_next)
 
-struct blk_dev_struct {
-	/*
-	 * queue_proc has to be atomic
-	 */
-	request_queue_t		request_queue;
-	queue_proc		*queue;
-	void			*data;
-};
-
 struct sec_size {
 	unsigned block_size;
 	unsigned block_size_bits;
 };
 
-/*
- * Used to indicate the default queue for drivers that don't bother
- * to implement multiple queues.  We have this access macro here
- * so as to eliminate the need for each and every block device
- * driver to know about the internal structure of blk_dev[].
- */
-#define BLK_DEFAULT_QUEUE(_MAJOR)  &blk_dev[_MAJOR].request_queue
-
-extern struct sec_size * blk_sec[MAX_BLKDEV];
-extern struct blk_dev_struct blk_dev[MAX_BLKDEV];
 extern void register_disk(struct gendisk *dev);
 extern void generic_make_request(struct bio *bio);
-extern inline request_queue_t *bdev_get_queue(struct block_device *bdev);
 extern void blk_put_request(struct request *);
 extern void blk_attempt_remerge(request_queue_t *, struct request *);
 extern void __blk_attempt_remerge(request_queue_t *, struct request *);
@@ -318,6 +320,11 @@
 extern void blk_stop_queue(request_queue_t *q);
 extern void __blk_stop_queue(request_queue_t *q);
 
+static inline request_queue_t *bdev_get_queue(struct block_device *bdev)
+{
+	return bdev->bd_disk->queue;
+}
+
 /*
  * get ready for proper ref counting
  */
@@ -339,6 +346,7 @@
 extern void blk_queue_assign_lock(request_queue_t *, spinlock_t *);
 extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn);
 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 int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *);
@@ -383,6 +391,21 @@
 static inline int bdev_hardsect_size(struct block_device *bdev)
 {
 	return queue_hardsect_size(bdev_get_queue(bdev));
+}
+
+static inline int queue_dma_alignment(request_queue_t *q)
+{
+	int retval = 511;
+
+	if (q && q->dma_alignment)
+		retval = q->dma_alignment;
+
+	return retval;
+}
+
+static inline int bdev_dma_aligment(struct block_device *bdev)
+{
+	return queue_dma_alignment(bdev_get_queue(bdev));
 }
 
 #define blk_finished_io(nsects)	do { } while (0)
diff -Nru a/include/linux/crypto.h b/include/linux/crypto.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/crypto.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,316 @@
+/*
+ * Scatterlist Cryptographic API.
+ *
+ * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ * Copyright (c) 2002 David S. Miller (davem@redhat.com)
+ *
+ * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
+ * and Nettle, by Niels Möller.
+ * 
+ * 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_CRYPTO_H
+#define _LINUX_CRYPTO_H
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/string.h>
+
+/*
+ * Algorithm masks and types.
+ */
+#define CRYPTO_ALG_TYPE_MASK		0x000000ff
+#define CRYPTO_ALG_TYPE_CIPHER		0x00000001
+#define CRYPTO_ALG_TYPE_DIGEST		0x00000002
+#define CRYPTO_ALG_TYPE_COMP		0x00000004
+
+
+/*
+ * Transform masks and values (for crt_flags).
+ */
+#define CRYPTO_TFM_MODE_MASK		0x000000ff
+#define CRYPTO_TFM_REQ_MASK		0x000fff00
+#define CRYPTO_TFM_RES_MASK		0xfff00000
+
+#define CRYPTO_TFM_MODE_ECB		0x00000001
+#define CRYPTO_TFM_MODE_CBC		0x00000002
+#define CRYPTO_TFM_MODE_CFB		0x00000004
+#define CRYPTO_TFM_MODE_CTR		0x00000008
+
+#define CRYPTO_TFM_REQ_WEAK_KEY		0x00000100
+
+#define CRYPTO_TFM_RES_WEAK_KEY		0x00100000
+#define CRYPTO_TFM_RES_BAD_KEY_LEN   	0x00200000
+#define CRYPTO_TFM_RES_BAD_KEY_SCHED 	0x00400000
+#define CRYPTO_TFM_RES_BAD_BLOCK_LEN 	0x00800000
+#define CRYPTO_TFM_RES_BAD_FLAGS 	0x01000000
+
+
+/*
+ * Miscellaneous stuff.
+ */
+#define CRYPTO_UNSPEC			0
+#define CRYPTO_MAX_ALG_NAME		64
+#define CRYPTO_MAX_CIPHER_BLOCK_SIZE	16
+
+struct scatterlist;
+
+/*
+ * Algorithms: modular crypto algorithm implementations, managed
+ * via crypto_register_alg() and crypto_unregister_alg().
+ */
+struct cipher_alg {
+	unsigned int cia_keysize;
+	unsigned int cia_ivsize;
+	int (*cia_setkey)(void *ctx, const u8 *key,
+	                  unsigned int keylen, u32 *flags);
+	void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src);
+	void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src);
+};
+
+struct digest_alg {
+	unsigned int dia_digestsize;
+	void (*dia_init)(void *ctx);
+	void (*dia_update)(void *ctx, const u8 *data, unsigned int len);
+	void (*dia_final)(void *ctx, u8 *out);
+};
+
+struct compress_alg {
+	void (*coa_compress)(void);
+	void (*coa_decompress)(void);
+};
+
+#define cra_cipher	cra_u.cipher
+#define cra_digest	cra_u.digest
+#define cra_compress	cra_u.compress
+
+struct crypto_alg {
+	struct list_head cra_list;
+	u32 cra_flags;
+	unsigned int cra_blocksize;
+	unsigned int cra_ctxsize;
+	const char cra_name[CRYPTO_MAX_ALG_NAME];
+
+	union {
+		struct cipher_alg cipher;
+		struct digest_alg digest;
+		struct compress_alg compress;
+	} cra_u;
+	
+	struct module *cra_module;
+};
+
+/*
+ * Algorithm registration interface.
+ */
+int crypto_register_alg(struct crypto_alg *alg);
+int crypto_unregister_alg(struct crypto_alg *alg);
+
+/*
+ * Transforms: user-instantiated objects which encapsulate algorithms
+ * and core processing logic.  Managed via crypto_alloc_tfm() and
+ * crypto_free_tfm(), as well as the various helpers below.
+ */
+struct crypto_tfm;
+
+struct cipher_tfm {
+	void *cit_iv;
+	u32 cit_mode;
+	int (*cit_setkey)(struct crypto_tfm *tfm,
+	                  const u8 *key, unsigned int keylen);
+	int (*cit_encrypt)(struct crypto_tfm *tfm,
+	                   struct scatterlist *sg, unsigned int nsg);
+	int (*cit_decrypt)(struct crypto_tfm *tfm,
+	                   struct scatterlist *sg, unsigned int nsg);
+};
+
+struct digest_tfm {
+	void (*dit_init)(struct crypto_tfm *tfm);
+	void (*dit_update)(struct crypto_tfm *tfm,
+	                   struct scatterlist *sg, unsigned int nsg);
+	void (*dit_final)(struct crypto_tfm *tfm, u8 *out);
+	void (*dit_digest)(struct crypto_tfm *tfm, struct scatterlist *sg,
+	                   unsigned int nsg, u8 *out);
+	void (*dit_hmac)(struct crypto_tfm *tfm, u8 *key,
+	                 unsigned int keylen, struct scatterlist *sg,
+	                 unsigned int nsg, u8 *out);
+};
+
+struct compress_tfm {
+	void (*cot_compress)(struct crypto_tfm *tfm);
+	void (*cot_decompress)(struct crypto_tfm *tfm);
+};
+
+#define crt_cipher	crt_u.cipher
+#define crt_digest	crt_u.digest
+#define crt_compress	crt_u.compress
+
+struct crypto_tfm {
+
+	void *crt_ctx;
+	u32 crt_flags;
+	
+	union {
+		struct cipher_tfm cipher;
+		struct digest_tfm digest;
+		struct compress_tfm compress;
+	} crt_u;
+	
+	struct crypto_alg *__crt_alg;
+};
+
+/* 
+ * Transform user interface.
+ */
+ 
+/*
+ * crypto_alloc_tfm() will first attempt to locate an already loaded algorithm.
+ * If that fails and the kernel supports dynamically loadable modules, it
+ * will then attempt to load a module of the same name or alias.  A refcount
+ * is grabbed on the algorithm which is then associated with the new transform.
+ *
+ * crypto_free_tfm() frees up the transform and any associated resources,
+ * then drops the refcount on the associated algorithm.
+ */
+struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, u32 tfm_flags);
+void crypto_free_tfm(struct crypto_tfm *tfm);
+
+/*
+ * Transform helpers which query the underlying algorithm.
+ */
+static inline const char *crypto_tfm_alg_name(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_name;
+}
+
+static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm)
+{
+	struct crypto_alg *alg = tfm->__crt_alg;
+	
+	if (alg->cra_module)
+		return alg->cra_module->name;
+	else
+		return NULL;
+}
+
+static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
+}
+
+static inline unsigned int crypto_tfm_alg_keysize(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_cipher.cia_keysize;
+}
+
+static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_cipher.cia_ivsize;
+}
+
+static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_blocksize;
+}
+
+static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_digest.dia_digestsize;
+}
+
+/*
+ * API wrappers.
+ */
+static inline void crypto_digest_init(struct crypto_tfm *tfm)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);
+	tfm->crt_digest.dit_init(tfm);
+}
+
+static inline void crypto_digest_update(struct crypto_tfm *tfm,
+                                        struct scatterlist *sg,
+                                        unsigned int nsg)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);
+	tfm->crt_digest.dit_update(tfm, sg, nsg);
+}
+
+static inline void crypto_digest_final(struct crypto_tfm *tfm, u8 *out)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);
+	tfm->crt_digest.dit_final(tfm, out);
+}
+
+static inline void crypto_digest_digest(struct crypto_tfm *tfm,
+                                        struct scatterlist *sg,
+                                        unsigned int nsg, u8 *out)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);
+	tfm->crt_digest.dit_digest(tfm, sg, nsg, out);
+}
+
+static inline void crypto_digest_hmac(struct crypto_tfm *tfm,
+                                      u8 *key, unsigned int keylen,
+                                      struct scatterlist *sg,
+                                      unsigned int nsg, u8 *out)
+                                      
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);
+	tfm->crt_digest.dit_hmac(tfm, key, keylen, sg, nsg, out);
+}
+
+static inline int crypto_cipher_setkey(struct crypto_tfm *tfm,
+                                       const u8 *key, unsigned int keylen)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
+	return tfm->crt_cipher.cit_setkey(tfm, key, keylen);
+}
+
+static inline int crypto_cipher_encrypt(struct crypto_tfm *tfm,
+                                        struct scatterlist *sg,
+                                        unsigned int nsg)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
+	return tfm->crt_cipher.cit_encrypt(tfm, sg, nsg);
+}                                        
+
+static inline int crypto_cipher_decrypt(struct crypto_tfm *tfm,
+                                        struct scatterlist *sg,
+                                        unsigned int nsg)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
+	return tfm->crt_cipher.cit_decrypt(tfm, sg, nsg);
+}
+
+static inline void crypto_cipher_set_iv(struct crypto_tfm *tfm,
+                                        const u8 *src, unsigned int len)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
+	memcpy(tfm->crt_cipher.cit_iv, src, len);
+}
+
+static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm,
+                                        u8 *dst, unsigned int len)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
+	memcpy(dst, tfm->crt_cipher.cit_iv, len);
+}
+
+static inline void crypto_comp_compress(struct crypto_tfm *tfm)
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP);
+	tfm->crt_compress.cot_compress(tfm);
+}
+
+static inline void crypto_comp_decompress(struct crypto_tfm *tfm) 
+{
+	BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP);
+	tfm->crt_compress.cot_decompress(tfm);
+}
+
+#endif	/* _LINUX_CRYPTO_H */
diff -Nru a/include/linux/device-mapper.h b/include/linux/device-mapper.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/device-mapper.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the LGPL.
+ */
+
+#ifndef _LINUX_DEVICE_MAPPER_H
+#define _LINUX_DEVICE_MAPPER_H
+
+#define DM_DIR "mapper"	/* Slashes not supported */
+#define DM_MAX_TYPE_NAME 16
+#define DM_NAME_LEN 128
+#define DM_UUID_LEN 129
+
+#ifdef __KERNEL__
+
+struct dm_target;
+struct dm_table;
+struct dm_dev;
+
+typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
+
+/*
+ * In the constructor the target parameter will already have the
+ * table, type, begin and len fields filled in.
+ */
+typedef int (*dm_ctr_fn) (struct dm_target *target, int argc, char **argv);
+
+/*
+ * The destructor doesn't need to free the dm_target, just
+ * anything hidden ti->private.
+ */
+typedef void (*dm_dtr_fn) (struct dm_target *ti);
+
+/*
+ * The map function must return:
+ * < 0: error
+ * = 0: The target will handle the io by resubmitting it later
+ * > 0: simple remap complete
+ */
+typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio);
+typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
+			     char *result, int maxlen);
+
+void dm_error(const char *message);
+
+/*
+ * Constructors should call these functions to ensure destination devices
+ * are opened/closed correctly.
+ * FIXME: too many arguments.
+ */
+int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
+		  sector_t len, int mode, struct dm_dev **result);
+void dm_put_device(struct dm_target *ti, struct dm_dev *d);
+
+/*
+ * Information about a target type
+ */
+struct target_type {
+	const char *name;
+	struct module *module;
+	dm_ctr_fn ctr;
+	dm_dtr_fn dtr;
+	dm_map_fn map;
+	dm_status_fn status;
+};
+
+struct io_restrictions {
+	unsigned short		max_sectors;
+	unsigned short		max_phys_segments;
+	unsigned short		max_hw_segments;
+	unsigned short		hardsect_size;
+	unsigned int		max_segment_size;
+	unsigned long		seg_boundary_mask;
+};
+
+struct dm_target {
+	struct dm_table *table;
+	struct target_type *type;
+
+	/* target limits */
+	sector_t begin;
+	sector_t len;
+
+	/* FIXME: turn this into a mask, and merge with io_restrictions */
+	sector_t split_io;
+
+	/*
+	 * These are automaticall filled in by
+	 * dm_table_get_device.
+	 */
+	struct io_restrictions limits;
+
+	/* target specific data */
+	void *private;
+
+	/* Used to provide an error string from the ctr */
+	char *error;
+};
+
+int dm_register_target(struct target_type *t);
+int dm_unregister_target(struct target_type *t);
+
+#endif				/* __KERNEL__ */
+
+#endif				/* _LINUX_DEVICE_MAPPER_H */
diff -Nru a/include/linux/device.h b/include/linux/device.h
--- a/include/linux/device.h	Wed Oct 30 16:44:33 2002
+++ b/include/linux/device.h	Wed Oct 30 16:44:33 2002
@@ -187,6 +187,8 @@
 
 	int	(*add_device)(struct device *);
 	void	(*remove_device)(struct device *);
+	int	(*hotplug)(struct device *dev, char **envp, 
+			   int num_envp, char *buffer, int buffer_size);
 };
 
 extern int devclass_register(struct device_class *);
diff -Nru a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dm-ioctl.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2001 Sistina Software (UK) Limited.
+ *
+ * This file is released under the LGPL.
+ */
+
+#ifndef _LINUX_DM_IOCTL_H
+#define _LINUX_DM_IOCTL_H
+
+#include <linux/device-mapper.h>
+#include <linux/types.h>
+
+/*
+ * Implements a traditional ioctl interface to the device mapper.
+ */
+
+/*
+ * All ioctl arguments consist of a single chunk of memory, with
+ * this structure at the start.  If a uuid is specified any
+ * lookup (eg. for a DM_INFO) will be done on that, *not* the
+ * name.
+ */
+struct dm_ioctl {
+	/*
+	 * The version number is made up of three parts:
+	 * major - no backward or forward compatibility,
+	 * minor - only backwards compatible,
+	 * patch - both backwards and forwards compatible.
+	 *
+	 * All clients of the ioctl interface should fill in the
+	 * version number of the interface that they were
+	 * compiled with.
+	 *
+	 * All recognised ioctl commands (ie. those that don't
+	 * return -ENOTTY) fill out this field, even if the
+	 * command failed.
+	 */
+	uint32_t version[3];	/* in/out */
+	uint32_t data_size;	/* total size of data passed in
+				 * including this struct */
+
+	uint32_t data_start;	/* offset to start of data
+				 * relative to start of this struct */
+
+	uint32_t target_count;	/* in/out */
+	uint32_t open_count;	/* out */
+	uint32_t flags;		/* in/out */
+
+	__kernel_dev_t dev;	/* in/out */
+
+	char name[DM_NAME_LEN];	/* device name */
+	char uuid[DM_UUID_LEN];	/* unique identifier for
+				 * the block device */
+};
+
+/*
+ * Used to specify tables.  These structures appear after the
+ * dm_ioctl.
+ */
+struct dm_target_spec {
+	int32_t status;		/* used when reading from kernel only */
+	uint64_t sector_start;
+	uint32_t length;
+
+	/*
+	 * Offset in bytes (from the start of this struct) to
+	 * next target_spec.
+	 */
+	uint32_t next;
+
+	char target_type[DM_MAX_TYPE_NAME];
+
+	/*
+	 * Parameter string starts immediately after this object.
+	 * Be careful to add padding after string to ensure correct
+	 * alignment of subsequent dm_target_spec.
+	 */
+};
+
+/*
+ * Used to retrieve the target dependencies.
+ */
+struct dm_target_deps {
+	uint32_t count;
+
+	__kernel_dev_t dev[0];	/* out */
+};
+
+/*
+ * If you change this make sure you make the corresponding change
+ * to dm-ioctl.c:lookup_ioctl()
+ */
+enum {
+	/* Top level cmds */
+	DM_VERSION_CMD = 0,
+	DM_REMOVE_ALL_CMD,
+
+	/* device level cmds */
+	DM_DEV_CREATE_CMD,
+	DM_DEV_REMOVE_CMD,
+	DM_DEV_RELOAD_CMD,
+	DM_DEV_RENAME_CMD,
+	DM_DEV_SUSPEND_CMD,
+	DM_DEV_DEPS_CMD,
+	DM_DEV_STATUS_CMD,
+
+	/* target level cmds */
+	DM_TARGET_STATUS_CMD,
+	DM_TARGET_WAIT_CMD
+};
+
+#define DM_IOCTL 0xfd
+
+#define DM_VERSION       _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
+#define DM_REMOVE_ALL    _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
+
+#define DM_DEV_CREATE    _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
+#define DM_DEV_REMOVE    _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
+#define DM_DEV_RELOAD    _IOWR(DM_IOCTL, DM_DEV_RELOAD_CMD, struct dm_ioctl)
+#define DM_DEV_SUSPEND   _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
+#define DM_DEV_RENAME    _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
+#define DM_DEV_DEPS      _IOWR(DM_IOCTL, DM_DEV_DEPS_CMD, struct dm_ioctl)
+#define DM_DEV_STATUS    _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
+
+#define DM_TARGET_STATUS _IOWR(DM_IOCTL, DM_TARGET_STATUS_CMD, struct dm_ioctl)
+#define DM_TARGET_WAIT   _IOWR(DM_IOCTL, DM_TARGET_WAIT_CMD, struct dm_ioctl)
+
+#define DM_VERSION_MAJOR	1
+#define DM_VERSION_MINOR	0
+#define DM_VERSION_PATCHLEVEL	6
+#define DM_VERSION_EXTRA	"-ioctl (2002-10-15)"
+
+/* Status bits */
+#define DM_READONLY_FLAG	0x00000001
+#define DM_SUSPEND_FLAG		0x00000002
+#define DM_EXISTS_FLAG		0x00000004
+#define DM_PERSISTENT_DEV_FLAG	0x00000008
+
+/*
+ * Flag passed into ioctl STATUS command to get table information
+ * rather than current status.
+ */
+#define DM_STATUS_TABLE_FLAG	0x00000010
+
+#endif				/* _LINUX_DM_IOCTL_H */
diff -Nru a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/audio.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,124 @@
+/* 
+ * audio.h
+ *
+ * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Lesser Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVBAUDIO_H_
+#define _DVBAUDIO_H_
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
+
+typedef enum {
+        AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ 
+	AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */ 
+} audio_stream_source_t;
+
+
+typedef enum { 
+	AUDIO_STOPPED,      /* Device is stopped */ 
+        AUDIO_PLAYING,      /* Device is currently playing */ 
+	AUDIO_PAUSED        /* Device is paused */ 
+} audio_play_state_t;
+
+
+typedef enum {
+        AUDIO_STEREO,
+        AUDIO_MONO_LEFT, 
+	AUDIO_MONO_RIGHT, 
+} audio_channel_select_t;
+
+
+typedef struct audio_status { 
+        int                    AV_sync_state;  /* sync audio and video? */
+        int                    mute_state;     /* audio is muted */ 
+        audio_play_state_t     play_state;     /* current playback state */
+        audio_stream_source_t  stream_source;  /* current stream source */
+        audio_channel_select_t channel_select; /* currently selected channel */
+        int                    bypass_mode;    /* pass on audio data to */
+} audio_status_t;                              /* separate decoder hardware */
+
+
+typedef struct audio_mixer { 
+        unsigned int volume_left;
+        unsigned int volume_right;
+  // what else do we need? bass, pass-through, ...
+} audio_mixer_t;
+
+
+typedef
+struct audio_karaoke{  /* if Vocal1 or Vocal2 are non-zero, they get mixed  */
+	int vocal1;    /* into left and right t at 70% each */
+	int vocal2;    /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
+	int melody;    /* mixed into the left channel and */
+                       /* Vocal2 into the right channel at 100% each. */
+                       /* if Melody is non-zero, the melody channel gets mixed*/
+} audio_karaoke_t;     /* into left and right  */
+
+
+typedef uint16_t audio_attributes_t;
+/*   bits: descr. */
+/*   15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
+/*   12    multichannel extension */
+/*   11-10 audio type (0=not spec, 1=language included) */
+/*    9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
+/*    7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit,  */
+/*    5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
+/*    2- 0 number of audio channels (n+1 channels) */
+ 
+
+/* for GET_CAPABILITIES and SET_FORMAT, the latter should only set one bit */
+#define AUDIO_CAP_DTS    1
+#define AUDIO_CAP_LPCM   2
+#define AUDIO_CAP_MP1    4
+#define AUDIO_CAP_MP2    8
+#define AUDIO_CAP_MP3   16
+#define AUDIO_CAP_AAC   32
+#define AUDIO_CAP_OGG   64
+#define AUDIO_CAP_SDDS 128
+#define AUDIO_CAP_AC3  256
+
+#define AUDIO_STOP                 _IO('o', 1) 
+#define AUDIO_PLAY                 _IO('o', 2)
+#define AUDIO_PAUSE                _IO('o', 3)
+#define AUDIO_CONTINUE             _IO('o', 4)
+#define AUDIO_SELECT_SOURCE        _IO('o', 5)
+#define AUDIO_SET_MUTE             _IO('o', 6)
+#define AUDIO_SET_AV_SYNC          _IO('o', 7)
+#define AUDIO_SET_BYPASS_MODE      _IO('o', 8)
+#define AUDIO_CHANNEL_SELECT       _IO('o', 9)
+#define AUDIO_GET_STATUS           _IOR('o', 10, audio_status_t)
+
+#define AUDIO_GET_CAPABILITIES     _IOR('o', 11, unsigned int)
+#define AUDIO_CLEAR_BUFFER         _IO('o',  12)
+#define AUDIO_SET_ID               _IO('o', 13)
+#define AUDIO_SET_MIXER            _IOW('o', 14, audio_mixer_t)
+#define AUDIO_SET_STREAMTYPE       _IO('o', 15)
+#define AUDIO_SET_EXT_ID           _IO('o', 16)
+#define AUDIO_SET_ATTRIBUTES       _IOW('o', 17, audio_attributes_t)
+#define AUDIO_SET_KARAOKE          _IOW('o', 18, audio_karaoke_t)
+
+#endif /* _DVBAUDIO_H_ */
+
diff -Nru a/include/linux/dvb/ca.h b/include/linux/dvb/ca.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/ca.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,84 @@
+/* 
+ * ca.h
+ *
+ * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Lesser Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _CA_H_
+#define _CA_H_
+
+/* slot interface types and info */
+
+typedef struct ca_slot_info_s {
+        int num;               /* slot number */
+
+        int type;              /* CA interface this slot supports */
+#define CA_CI            1     /* CI high level interface */
+#define CA_CI_LINK       2     /* CI link layer level interface */
+#define CA_CI_PHYS       4     /* CI physical layer level interface */
+#define CA_SC          128     /* simple smart card interface */
+
+        unsigned int flags;
+#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
+#define CA_CI_MODULE_READY   2
+} ca_slot_info_t;
+
+
+/* descrambler types and info */
+
+typedef struct ca_descr_info_s {
+        unsigned int num;          /* number of available descramblers (keys) */ 
+        unsigned int type;         /* type of supported scrambling system */
+#define CA_ECD           1
+#define CA_NDS           2
+#define CA_DSS           4
+} ca_descr_info_t;
+
+typedef struct ca_cap_s {
+        unsigned int slot_num;     /* total number of CA card and module slots */
+        unsigned int slot_type;    /* OR of all supported types */
+        unsigned int descr_num;    /* total number of descrambler slots (keys) */
+        unsigned int descr_type;   /* OR of all supported types */
+} ca_cap_t;
+
+/* a message to/from a CI-CAM */
+typedef struct ca_msg_s {   
+        unsigned int index;         
+        unsigned int type;
+        unsigned int length;
+        unsigned char msg[256];
+} ca_msg_t;
+
+typedef struct ca_descr_s {
+        unsigned int index;    
+        unsigned int parity;
+        unsigned char cw[8];
+} ca_descr_t;
+
+#define CA_RESET          _IO('o', 128)
+#define CA_GET_CAP        _IOR('o', 129, ca_cap_t)
+#define CA_GET_SLOT_INFO  _IOR('o', 130, ca_slot_info_t)
+#define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
+#define CA_GET_MSG        _IOR('o', 132, ca_msg_t)
+#define CA_SEND_MSG       _IOW('o', 133, ca_msg_t)
+#define CA_SET_DESCR      _IOW('o', 134, ca_descr_t)
+
+#endif
+
diff -Nru a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/dmx.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,172 @@
+/* 
+ * dmx.h
+ *
+ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+ *                  & Ralph  Metzler <ralph@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DMX_H_
+#define _DMX_H_
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
+#define DMX_FILTER_SIZE 16
+
+typedef enum
+{
+	DMX_OUT_DECODER, /* Streaming directly to decoder. */
+	DMX_OUT_TAP,     /* Output going to a memory buffer */
+	                 /* (to be retrieved via the read command).*/
+	DMX_OUT_TS_TAP   /* Output multiplexed into a new TS  */
+	                 /* (to be retrieved by reading from the */
+	                 /* logical DVR device).                 */
+} dmx_output_t;
+
+
+typedef enum
+{
+	DMX_IN_FRONTEND, /* Input from a front-end device.  */
+	DMX_IN_DVR       /* Input from the logical DVR device.  */
+} dmx_input_t;
+
+
+typedef enum
+{
+        DMX_PES_AUDIO0,
+	DMX_PES_VIDEO0,
+	DMX_PES_TELETEXT0,
+	DMX_PES_SUBTITLE0,
+	DMX_PES_PCR0,
+
+        DMX_PES_AUDIO1,
+	DMX_PES_VIDEO1,
+	DMX_PES_TELETEXT1,
+	DMX_PES_SUBTITLE1,
+	DMX_PES_PCR1,
+
+        DMX_PES_AUDIO2,
+	DMX_PES_VIDEO2,
+	DMX_PES_TELETEXT2,
+	DMX_PES_SUBTITLE2,
+	DMX_PES_PCR2,
+
+        DMX_PES_AUDIO3,
+	DMX_PES_VIDEO3,
+	DMX_PES_TELETEXT3,
+	DMX_PES_SUBTITLE3,
+	DMX_PES_PCR3,
+
+	DMX_PES_OTHER
+} dmx_pes_type_t;
+
+#define DMX_PES_AUDIO    DMX_PES_AUDIO0
+#define DMX_PES_VIDEO    DMX_PES_VIDEO0
+#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
+#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
+#define DMX_PES_PCR      DMX_PES_PCR0
+
+
+typedef enum
+{
+        DMX_SCRAMBLING_EV,
+        DMX_FRONTEND_EV
+} dmx_event_t;
+
+
+typedef enum
+{
+	DMX_SCRAMBLING_OFF,
+	DMX_SCRAMBLING_ON
+} dmx_scrambling_status_t;
+
+
+typedef struct dmx_filter
+{
+	uint8_t         filter[DMX_FILTER_SIZE];
+	uint8_t         mask[DMX_FILTER_SIZE];
+	uint8_t         mode[DMX_FILTER_SIZE];
+} dmx_filter_t;
+
+
+struct dmx_sct_filter_params
+{
+	uint16_t            pid;
+	dmx_filter_t        filter;
+	uint32_t            timeout;
+	uint32_t            flags;
+#define DMX_CHECK_CRC       1
+#define DMX_ONESHOT         2
+#define DMX_IMMEDIATE_START 4
+#define DMX_KERNEL_CLIENT   0x8000
+};
+
+
+struct dmx_pes_filter_params
+{
+	uint16_t            pid;
+	dmx_input_t         input;
+	dmx_output_t        output;
+	dmx_pes_type_t      pes_type;
+	uint32_t            flags;
+};
+
+
+struct dmx_event
+{
+	dmx_event_t         event;
+	time_t              timeStamp;
+	union
+	{
+		dmx_scrambling_status_t scrambling;
+	} u;
+};
+
+typedef struct dmx_caps {
+	uint32_t caps;
+	int num_decoders; 
+} dmx_caps_t;
+
+typedef enum {
+	DMX_SOURCE_FRONT0 = 0,
+	DMX_SOURCE_FRONT1,
+	DMX_SOURCE_FRONT2,
+	DMX_SOURCE_FRONT3,
+	DMX_SOURCE_DVR0   = 16,
+	DMX_SOURCE_DVR1,
+	DMX_SOURCE_DVR2,
+	DMX_SOURCE_DVR3,
+} dmx_source_t;
+
+
+#define DMX_START                _IO('o',41) 
+#define DMX_STOP                 _IO('o',42)
+#define DMX_SET_FILTER           _IOW('o',43,struct dmx_sct_filter_params)
+#define DMX_SET_PES_FILTER       _IOW('o',44,struct dmx_pes_filter_params)
+#define DMX_SET_BUFFER_SIZE      _IO('o',45)
+#define DMX_GET_EVENT            _IOR('o',46,struct dmx_event)
+#define DMX_GET_PES_PIDS         _IOR('o',47,uint16_t)
+#define DMX_GET_CAPS             _IOR('o',48,dmx_caps_t)
+#define DMX_SET_SOURCE           _IOW('o',49,dmx_source_t)
+
+#endif /*_DMX_H_*/
+
diff -Nru a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/frontend.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,261 @@
+/*
+ * frontend.h
+ *
+ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+ *                    Ralph  Metzler <ralph@convergence.de>
+ *                    Holger Waechtler <holger@convergence.de>
+ *                    Andre Draszik <ad@convergence.de>
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _FRONTEND_H_
+#define _FRONTEND_H_
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
+
+typedef enum {
+        FE_QPSK,
+        FE_QAM,
+        FE_OFDM
+} fe_type_t;
+
+
+typedef enum {
+	FE_IS_STUPID                  = 0,
+	FE_CAN_INVERSION_AUTO         = 0x1,
+	FE_CAN_FEC_1_2                = 0x2,
+	FE_CAN_FEC_2_3                = 0x4,
+	FE_CAN_FEC_3_4                = 0x8,
+	FE_CAN_FEC_4_5                = 0x10,
+	FE_CAN_FEC_5_6                = 0x20,
+	FE_CAN_FEC_6_7                = 0x40,
+	FE_CAN_FEC_7_8                = 0x80,
+	FE_CAN_FEC_8_9                = 0x100,
+	FE_CAN_FEC_AUTO               = 0x200,
+	FE_CAN_QPSK                   = 0x400,
+	FE_CAN_QAM_16                 = 0x800,
+	FE_CAN_QAM_32                 = 0x1000,
+	FE_CAN_QAM_64                 = 0x2000,
+	FE_CAN_QAM_128                = 0x4000,
+	FE_CAN_QAM_256                = 0x8000,
+	FE_CAN_QAM_AUTO               = 0x10000,
+	FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
+	FE_CAN_BANDWIDTH_AUTO         = 0x40000,
+	FE_CAN_GUARD_INTERVAL_AUTO    = 0x80000,
+	FE_CAN_HIERARCHY_AUTO         = 0x100000,
+	FE_CAN_MUTE_TS                = 0x80000000
+} fe_caps_t;
+
+
+struct dvb_frontend_info {
+	char       name[128];
+        fe_type_t  type;
+        uint32_t   frequency_min;
+        uint32_t   frequency_max;
+	uint32_t   frequency_stepsize;
+	uint32_t   frequency_tolerance;
+	uint32_t   symbol_rate_min;
+        uint32_t   symbol_rate_max;
+	uint32_t   symbol_rate_tolerance;     /* ppm */
+	uint32_t   notifier_delay;            /* ms */
+	fe_caps_t  caps;
+};
+
+
+/**
+ *  Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
+ *  the meaning of this struct...
+ */
+struct dvb_diseqc_master_cmd {
+        uint8_t msg [6];        /*  { framing, address, command, data [3] } */
+        uint8_t msg_len;        /*  valid values are 3...6  */
+};
+
+
+struct dvb_diseqc_slave_reply {
+	uint8_t msg [4];        /*  { framing, data [3] } */
+	uint8_t msg_len;        /*  valid values are 0...4, 0 means no msg  */
+	int     timeout;        /*  return from ioctl after timeout ms with */
+};                              /*  errorcode when no message was received  */
+
+
+typedef enum {
+        SEC_VOLTAGE_13,
+        SEC_VOLTAGE_18
+} fe_sec_voltage_t;
+
+
+typedef enum {
+        SEC_TONE_ON,
+        SEC_TONE_OFF
+} fe_sec_tone_mode_t;
+
+
+typedef enum {
+        SEC_MINI_A,
+        SEC_MINI_B
+} fe_sec_mini_cmd_t;
+
+
+typedef enum {
+	FE_HAS_SIGNAL     = 0x01,   /*  found something above the noise level */
+	FE_HAS_CARRIER    = 0x02,   /*  found a DVB signal  */
+	FE_HAS_VITERBI    = 0x04,   /*  FEC is stable  */
+	FE_HAS_SYNC       = 0x08,   /*  found sync bytes  */
+	FE_HAS_LOCK       = 0x10,   /*  everything's working... */
+	FE_TIMEDOUT       = 0x20,   /*  no lock within the last ~2 seconds */
+	FE_REINIT         = 0x40    /*  frontend was reinitialized,  */
+} fe_status_t;                      /*  application is recommned to reset */
+                                    /*  DiSEqC, tone and parameters */
+
+typedef enum {
+        INVERSION_OFF,
+        INVERSION_ON,
+        INVERSION_AUTO
+} fe_spectral_inversion_t;
+
+
+typedef enum {
+        FEC_NONE = 0,
+        FEC_1_2,
+        FEC_2_3,
+        FEC_3_4,
+        FEC_4_5,
+        FEC_5_6,
+        FEC_6_7,
+        FEC_7_8,
+        FEC_8_9,
+        FEC_AUTO
+} fe_code_rate_t;
+
+
+typedef enum {
+        QPSK,
+        QAM_16,
+        QAM_32,
+        QAM_64,
+        QAM_128,
+        QAM_256,
+	QAM_AUTO
+} fe_modulation_t;
+
+
+typedef enum {
+	TRANSMISSION_MODE_2K,
+	TRANSMISSION_MODE_8K,
+	TRANSMISSION_MODE_AUTO
+} fe_transmit_mode_t;
+
+typedef enum {
+	BANDWIDTH_8_MHZ,
+	BANDWIDTH_7_MHZ,
+	BANDWIDTH_6_MHZ,
+	BANDWIDTH_AUTO
+} fe_bandwidth_t;
+
+
+typedef enum {
+	GUARD_INTERVAL_1_32,
+	GUARD_INTERVAL_1_16,
+	GUARD_INTERVAL_1_8,
+	GUARD_INTERVAL_1_4,
+	GUARD_INTERVAL_AUTO
+} fe_guard_interval_t;
+
+
+typedef enum {
+	HIERARCHY_NONE,
+	HIERARCHY_1,
+	HIERARCHY_2,
+	HIERARCHY_4,
+	HIERARCHY_AUTO
+} fe_hierarchy_t;
+
+
+struct dvb_qpsk_parameters {
+        uint32_t        symbol_rate;  /* symbol rate in Symbols per second */
+        fe_code_rate_t  fec_inner;    /* forward error correction (see above) */
+};
+
+
+struct dvb_qam_parameters {
+        uint32_t         symbol_rate; /* symbol rate in Symbols per second */
+        fe_code_rate_t   fec_inner;   /* forward error correction (see above) */
+        fe_modulation_t  modulation;  /* modulation type (see above) */
+};
+
+
+struct dvb_ofdm_parameters {
+        fe_bandwidth_t      bandwidth;
+        fe_code_rate_t      code_rate_HP;  /* high priority stream code rate */
+        fe_code_rate_t      code_rate_LP;  /* low priority stream code rate */
+        fe_modulation_t     constellation; /* modulation type (see above) */
+        fe_transmit_mode_t  transmission_mode;
+        fe_guard_interval_t guard_interval;
+        fe_hierarchy_t      hierarchy_information;
+};
+
+
+struct dvb_frontend_parameters {
+        uint32_t frequency;       /* (absolute) frequency in Hz for QAM/OFDM */
+                                  /* intermediate frequency in kHz for QPSK */
+	fe_spectral_inversion_t inversion;
+	union {
+		struct dvb_qpsk_parameters qpsk;
+		struct dvb_qam_parameters  qam;
+		struct dvb_ofdm_parameters ofdm;
+	} u;
+};
+
+
+struct dvb_frontend_event {
+	fe_status_t status;
+	struct dvb_frontend_parameters parameters;
+};
+
+
+
+#define FE_GET_INFO                _IOR('o', 61, struct dvb_frontend_info)
+
+#define FE_DISEQC_RESET_OVERLOAD   _IO('o', 62)
+#define FE_DISEQC_SEND_MASTER_CMD  _IOW('o', 63, struct dvb_diseqc_master_cmd)
+#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
+#define FE_DISEQC_SEND_BURST       _IO('o', 65)  /* fe_sec_mini_cmd_t */
+
+#define FE_SET_TONE                _IO('o', 66)  /* fe_sec_tone_mode_t */
+#define FE_SET_VOLTAGE             _IO('o', 67)  /* fe_sec_voltage_t */
+#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68)  /* int */
+
+#define FE_READ_STATUS             _IOR('o', 69, fe_status_t)
+#define FE_READ_BER                _IOR('o', 70, uint32_t)
+#define FE_READ_SIGNAL_STRENGTH    _IOR('o', 71, uint16_t)
+#define FE_READ_SNR                _IOR('o', 72, uint16_t)
+#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, uint32_t)
+
+#define FE_SET_FRONTEND            _IOW('o', 76, struct dvb_frontend_parameters)
+#define FE_GET_FRONTEND            _IOR('o', 77, struct dvb_frontend_parameters)
+#define FE_GET_EVENT               _IOR('o', 78, struct dvb_frontend_event)
+
+
+#endif /*_FRONTEND_H_*/
+
diff -Nru a/include/linux/dvb/net.h b/include/linux/dvb/net.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/net.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,44 @@
+/* 
+ * net.h
+ *
+ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+ *                  & Ralph  Metzler <ralph@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVBNET_H_
+#define _DVBNET_H_
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
+
+struct dvb_net_if {
+	uint16_t pid;
+	uint16_t if_num;
+};
+
+
+#define NET_ADD_IF                 _IOWR('o', 52, struct dvb_net_if)
+#define NET_REMOVE_IF              _IO('o', 53)
+
+#endif /*_DVBNET_H_*/
+
diff -Nru a/include/linux/dvb/osd.h b/include/linux/dvb/osd.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/osd.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,110 @@
+/* 
+ * osd.h
+ *
+ * Copyright (C) 2001 Ralph  Metzler <ralph@convergence.de>
+ *                  & Marcus Metzler <marcus@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Lesser Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVBOSD_H_
+#define _DVBOSD_H_
+
+typedef enum {
+	// All functions return -2 on "not open"
+	OSD_Close = 1,		// ()
+	// Disables OSD and releases the buffers
+	// returns 0 on success
+	OSD_Open,		// (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0))
+	// Opens OSD with this size and bit depth
+	// returns 0 on success, -1 on DRAM allocation error, -2 on "already open"
+	OSD_Show,		// ()
+	// enables OSD mode
+	// returns 0 on success
+	OSD_Hide,		// ()
+	// disables OSD mode
+	// returns 0 on success
+	OSD_Clear,		// ()
+	// Sets all pixel to color 0
+	// returns 0 on success
+	OSD_Fill,		// (color)
+	// Sets all pixel to color <col>
+	// returns 0 on success
+	OSD_SetColor,		// (color,R{x0},G{y0},B{x1},opacity{y1})
+	// set palette entry <num> to <r,g,b>, <mix> and <trans> apply
+	// R,G,B: 0..255
+	// R=Red, G=Green, B=Blue
+	// opacity=0:      pixel opacity 0% (only video pixel shows)
+	// opacity=1..254: pixel opacity as specified in header
+	// opacity=255:    pixel opacity 100% (only OSD pixel shows)
+	// returns 0 on success, -1 on error
+	OSD_SetPalette,		// (firstcolor{color},lastcolor{x0},data)
+	// Set a number of entries in the palette
+	// sets the entries "firstcolor" through "lastcolor" from the array "data"
+	// data has 4 byte for each color:
+	// R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel
+	OSD_SetTrans,		// (transparency{color})
+	// Sets transparency of mixed pixel (0..15)
+	// returns 0 on success
+	OSD_SetPixel,		// (x0,y0,color)
+	// sets pixel <x>,<y> to color number <col>
+	// returns 0 on success, -1 on error
+	OSD_GetPixel,		// (x0,y0)
+	// returns color number of pixel <x>,<y>,  or -1
+	OSD_SetRow,		// (x0,y0,x1,data)
+	// fills pixels x0,y through  x1,y with the content of data[]
+	// returns 0 on success, -1 on clipping all pixel (no pixel drawn)
+	OSD_SetBlock,		// (x0,y0,x1,y1,increment{color},data)
+	// fills pixels x0,y0 through  x1,y1 with the content of data[]
+	// inc contains the width of one line in the data block,
+	// inc<=0 uses blockwidth as linewidth
+	// returns 0 on success, -1 on clipping all pixel
+	OSD_FillRow,		// (x0,y0,x1,color)
+	// fills pixels x0,y through  x1,y with the color <col>
+	// returns 0 on success, -1 on clipping all pixel
+	OSD_FillBlock,		// (x0,y0,x1,y1,color)
+	// fills pixels x0,y0 through  x1,y1 with the color <col>
+	// returns 0 on success, -1 on clipping all pixel
+	OSD_Line,		// (x0,y0,x1,y1,color)
+	// draw a line from x0,y0 to x1,y1 with the color <col>
+	// returns 0 on success
+	OSD_Query,		// (x0,y0,x1,y1,xasp{color}}), yasp=11
+	// fills parameters with the picture dimensions and the pixel aspect ratio
+	// returns 0 on success
+	OSD_Test,		// ()
+	// draws a test picture. for debugging purposes only
+	// returns 0 on success
+// TODO: remove "test" in final version
+	OSD_Text,		// (x0,y0,size,color,text)
+	OSD_SetWindow,		//  (x0) set window with number 0<x0<8 as current
+	OSD_MoveWindow,		//  move current window to (x0, y0)  
+} OSD_Command;
+
+typedef struct osd_cmd_s {
+	OSD_Command cmd;
+	int x0;
+	int y0;
+	int x1;
+	int y1;
+	int color;
+	void *data;
+} osd_cmd_t;
+
+
+#define OSD_SEND_CMD       _IOW('o', 160, osd_cmd_t)
+
+#endif
diff -Nru a/include/linux/dvb/video.h b/include/linux/dvb/video.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/dvb/video.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,190 @@
+/* 
+ * video.h
+ *
+ * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
+ *                  & Ralph  Metzler <ralph@convergence.de>
+                      for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * 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 Lesser 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 _DVBVIDEO_H_
+#define _DVBVIDEO_H_
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
+
+typedef enum {
+	VIDEO_FORMAT_4_3,     /* Select 4:3 format */ 
+        VIDEO_FORMAT_16_9     /* Select 16:9 format. */ 
+} video_format_t;
+
+
+typedef enum {
+	 VIDEO_SYSTEM_PAL, 
+	 VIDEO_SYSTEM_NTSC, 
+	 VIDEO_SYSTEM_PALN, 
+	 VIDEO_SYSTEM_PALNc, 
+	 VIDEO_SYSTEM_PALM, 
+	 VIDEO_SYSTEM_NTSC60, 
+	 VIDEO_SYSTEM_PAL60,
+	 VIDEO_SYSTEM_PALM60
+} video_system_t;
+
+
+typedef enum {   
+        VIDEO_PAN_SCAN,       /* use pan and scan format */
+	VIDEO_LETTER_BOX,     /* use letterbox format */
+	VIDEO_CENTER_CUT_OUT  /* use center cut out format */
+} video_displayformat_t;
+
+
+typedef enum {
+        VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ 
+	VIDEO_SOURCE_MEMORY /* If this source is selected, the stream 
+			       comes from the user through the write 
+			       system call */ 
+} video_stream_source_t;
+
+
+typedef enum {
+	VIDEO_STOPPED, /* Video is stopped */ 
+        VIDEO_PLAYING, /* Video is currently playing */ 
+	VIDEO_FREEZED  /* Video is freezed */ 
+} video_play_state_t; 
+
+
+struct video_event { 
+        int32_t type; 
+        time_t timestamp;
+	union { 
+	        video_format_t video_format;
+	} u; 
+};
+
+
+struct video_status { 
+        int                   video_blank;   /* blank video on freeze? */
+        video_play_state_t    play_state;    /* current state of playback */  
+        video_stream_source_t stream_source; /* current source (demux/memory) */
+        video_format_t        video_format;  /* current aspect ratio of stream*/
+        video_displayformat_t display_format;/* selected cropping mode */
+};
+
+
+struct video_still_picture {
+        char *iFrame;        /* pointer to a single iframe in memory */
+        int32_t size; 
+};
+
+
+typedef 
+struct video_highlight {
+	int     active;      /*    1=show highlight, 0=hide highlight */
+	uint8_t contrast1;   /*    7- 4  Pattern pixel contrast */
+                             /*    3- 0  Background pixel contrast */
+	uint8_t contrast2;   /*    7- 4  Emphasis pixel-2 contrast */
+                             /*    3- 0  Emphasis pixel-1 contrast */
+	uint8_t color1;      /*    7- 4  Pattern pixel color */
+                             /*    3- 0  Background pixel color */
+	uint8_t color2;      /*    7- 4  Emphasis pixel-2 color */
+                             /*    3- 0  Emphasis pixel-1 color */
+ 	uint32_t ypos;       /*   23-22  auto action mode */
+                             /*   21-12  start y */
+                             /*    9- 0  end y */
+	uint32_t xpos;       /*   23-22  button color number */
+                             /*   21-12  start x */
+                             /*    9- 0  end x */
+} video_highlight_t;
+
+
+typedef struct video_spu {
+	int active;
+	int stream_id;
+} video_spu_t;
+
+
+typedef struct video_spu_palette {      /* SPU Palette information */
+	int length;
+	uint8_t *palette;
+} video_spu_palette_t;
+
+
+typedef struct video_navi_pack {
+	int length;          /* 0 ... 1024 */
+	uint8_t data[1024];
+} video_navi_pack_t;
+
+
+typedef uint16_t video_attributes_t;
+/*   bits: descr. */
+/*   15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
+/*   13-12 TV system (0=525/60, 1=625/50) */
+/*   11-10 Aspect ratio (0=4:3, 3=16:9) */
+/*    9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
+/*    7    line 21-1 data present in GOP (1=yes, 0=no) */
+/*    6    line 21-2 data present in GOP (1=yes, 0=no) */
+/*    5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
+/*    2    source letterboxed (1=yes, 0=no) */
+/*    0    film/camera mode (0=camera, 1=film (625/50 only)) */
+
+
+/* bit definitions for capabilities: */
+/* can the hardware decode MPEG1 and/or MPEG2? */
+#define VIDEO_CAP_MPEG1   1 
+#define VIDEO_CAP_MPEG2   2
+/* can you send a system and/or program stream to video device?
+   (you still have to open the video and the audio device but only 
+    send the stream to the video device) */
+#define VIDEO_CAP_SYS     4
+#define VIDEO_CAP_PROG    8
+/* can the driver also handle SPU, NAVI and CSS encoded data? 
+   (CSS API is not present yet) */
+#define VIDEO_CAP_SPU    16
+#define VIDEO_CAP_NAVI   32
+#define VIDEO_CAP_CSS    64
+
+
+#define VIDEO_STOP                 _IO('o', 21) 
+#define VIDEO_PLAY                 _IO('o', 22)
+#define VIDEO_FREEZE               _IO('o', 23)
+#define VIDEO_CONTINUE             _IO('o', 24)
+#define VIDEO_SELECT_SOURCE        _IO('o', 25)
+#define VIDEO_SET_BLANK            _IO('o', 26)
+#define VIDEO_GET_STATUS           _IOR('o', 27, struct video_status)
+#define VIDEO_GET_EVENT            _IOR('o', 28, struct video_event)
+#define VIDEO_SET_DISPLAY_FORMAT   _IO('o', 29)
+#define VIDEO_STILLPICTURE         _IOW('o', 30, struct video_still_picture)
+#define VIDEO_FAST_FORWARD         _IO('o', 31)
+#define VIDEO_SLOWMOTION           _IO('o', 32)
+#define VIDEO_GET_CAPABILITIES     _IOR('o', 33, unsigned int)
+#define VIDEO_CLEAR_BUFFER         _IO('o',  34)
+#define VIDEO_SET_ID               _IO('o', 35)
+#define VIDEO_SET_STREAMTYPE       _IO('o', 36)
+#define VIDEO_SET_FORMAT           _IO('o', 37)
+#define VIDEO_SET_SYSTEM           _IO('o', 38)
+#define VIDEO_SET_HIGHLIGHT        _IOW('o', 39, video_highlight_t)
+#define VIDEO_SET_SPU              _IOW('o', 50, video_spu_t)
+#define VIDEO_SET_SPU_PALETTE      _IOW('o', 51, video_spu_palette_t)
+#define VIDEO_GET_NAVI             _IOR('o', 52, video_navi_pack_t)
+#define VIDEO_SET_ATTRIBUTES       _IO('o', 53)
+
+#endif /*_DVBVIDEO_H_*/
+
diff -Nru a/include/linux/elevator.h b/include/linux/elevator.h
--- a/include/linux/elevator.h	Wed Oct 30 16:44:19 2002
+++ b/include/linux/elevator.h	Wed Oct 30 16:44:19 2002
@@ -40,8 +40,8 @@
 /*
  * block elevator interface
  */
-extern void __elv_add_request(request_queue_t *, struct request *,
-			      struct list_head *);
+extern void elv_add_request(request_queue_t *, struct request *, int, int);
+extern void __elv_add_request(request_queue_t *, struct request *, int, int);
 extern int elv_merge(request_queue_t *, struct list_head **, struct bio *);
 extern void elv_merge_requests(request_queue_t *, struct request *,
 			       struct request *);
@@ -49,6 +49,9 @@
 extern void elv_remove_request(request_queue_t *, struct request *);
 extern int elv_queue_empty(request_queue_t *);
 extern inline struct list_head *elv_get_sort_head(request_queue_t *, struct request *);
+
+#define __elv_add_request_pos(q, rq, pos)	\
+	(q)->elevator.elevator_add_req_fn((q), (rq), (pos))
 
 /*
  * noop I/O scheduler. always merges, always inserts new request at tail
diff -Nru a/include/linux/ethtool.h b/include/linux/ethtool.h
--- a/include/linux/ethtool.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/ethtool.h	Wed Oct 30 16:44:26 2002
@@ -2,7 +2,7 @@
  * ethtool.h: Defines for Linux ethtool.
  *
  * Copyright (C) 1998 David S. Miller (davem@redhat.com)
- * Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com>
+ * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
  * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
  * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
  *                                christopher.leech@intel.com,
diff -Nru a/include/linux/eventpoll.h b/include/linux/eventpoll.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/eventpoll.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,51 @@
+/*
+ *  include/linux/eventpoll.h ( Efficent event polling implementation )
+ *  Copyright (C) 2001,...,2002  Davide Libenzi
+ *
+ *  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.
+ *
+ *  Davide Libenzi <davidel@xmailserver.org>
+ *
+ */
+
+#ifndef _LINUX_EVENTPOLL_H
+#define _LINUX_EVENTPOLL_H
+
+
+#define EVENTPOLL_MINOR	124
+#define POLLFD_X_PAGE (PAGE_SIZE / sizeof(struct pollfd))
+#define MAX_FDS_IN_EVENTPOLL (1024 * 128)
+#define MAX_EVENTPOLL_PAGES (MAX_FDS_IN_EVENTPOLL / POLLFD_X_PAGE)
+#define EVENT_PAGE_INDEX(n) ((n) / POLLFD_X_PAGE)
+#define EVENT_PAGE_REM(n) ((n) % POLLFD_X_PAGE)
+#define EVENT_PAGE_OFFSET(n) (((n) % POLLFD_X_PAGE) * sizeof(struct pollfd))
+#define EP_FDS_PAGES(n) (((n) + POLLFD_X_PAGE - 1) / POLLFD_X_PAGE)
+#define EP_MAP_SIZE(n) (EP_FDS_PAGES(n) * PAGE_SIZE * 2)
+
+
+struct evpoll {
+	int ep_timeout;
+	unsigned long ep_resoff;
+};
+
+#define EP_ALLOC _IOR('P', 1, int)
+#define EP_POLL _IOWR('P', 2, struct evpoll)
+#define EP_FREE _IO('P', 3)
+#define EP_ISPOLLED _IOWR('P', 4, struct pollfd)
+
+#define EP_CTL_ADD 1
+#define EP_CTL_DEL 2
+#define EP_CTL_MOD 3
+
+
+asmlinkage int sys_epoll_create(int maxfds);
+asmlinkage int sys_epoll_ctl(int epfd, int op, int fd, unsigned int events);
+asmlinkage int sys_epoll_wait(int epfd, struct pollfd const **events, int timeout);
+
+
+
+#endif
+
diff -Nru a/include/linux/fat_cvf.h b/include/linux/fat_cvf.h
--- a/include/linux/fat_cvf.h	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,47 +0,0 @@
-#ifndef _FAT_CVF
-#define _FAT_CVF
-
-#define CVF_USE_READPAGE  0x0001
-
-struct cvf_format
-{ int cvf_version;
-  char* cvf_version_text;
-  unsigned long flags;
-  int (*detect_cvf) (struct super_block*sb);
-  int (*mount_cvf) (struct super_block*sb,char*options);
-  int (*unmount_cvf) (struct super_block*sb);
-  struct buffer_head* (*cvf_bread) (struct super_block*sb,int block);
-  struct buffer_head* (*cvf_getblk) (struct super_block*sb,int block);
-  void (*cvf_brelse) (struct super_block *sb,struct buffer_head *bh);
-  void (*cvf_mark_buffer_dirty) (struct super_block *sb,
-                              struct buffer_head *bh);
-  void (*cvf_set_uptodate) (struct super_block *sb,
-                         struct buffer_head *bh,
-                         int val);
-  int (*cvf_is_uptodate) (struct super_block *sb,struct buffer_head *bh);
-  void (*cvf_ll_rw_block) (struct super_block *sb,
-                        int opr,
-                        int nbreq,
-                        struct buffer_head *bh[32]);
-  int (*fat_access) (struct super_block *sb,int nr,int new_value);
-  int (*cvf_statfs) (struct super_block *sb,struct statfs *buf, int bufsiz);
-  int (*cvf_bmap) (struct inode *inode,int block);
-  ssize_t (*cvf_file_read) ( struct file *, char *, size_t, loff_t *);
-  ssize_t (*cvf_file_write) ( struct file *, const char *, size_t, loff_t *);
-  int (*cvf_mmap) (struct file *, struct vm_area_struct *);
-  int (*cvf_readpage) (struct inode *, struct page *);
-  int (*cvf_writepage) (struct inode *, struct page *);
-  int (*cvf_dir_ioctl) (struct inode * inode, struct file * filp,
-                        unsigned int cmd, unsigned long arg);
-  void (*zero_out_cluster) (struct inode*, int clusternr);
-};
-
-int register_cvf_format(struct cvf_format*cvf_format);
-int unregister_cvf_format(struct cvf_format*cvf_format);
-void dec_cvf_format_use_count_by_version(int version);
-int detect_cvf(struct super_block*sb,char*force);
-
-extern struct cvf_format *cvf_formats[];
-extern int cvf_format_use_count[];
-
-#endif
diff -Nru a/include/linux/fcblist.h b/include/linux/fcblist.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/fcblist.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,71 @@
+/*
+ *  include/linux/fcblist.h ( File event callbacks handling )
+ *  Copyright (C) 2001,...,2002  Davide Libenzi
+ *
+ *  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.
+ *
+ *  Davide Libenzi <davidel@xmailserver.org>
+ *
+ */
+
+#ifndef __LINUX_FCBLIST_H
+#define __LINUX_FCBLIST_H
+
+#include <linux/config.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+
+
+
+/* file callback notification events */
+#define ION_IN		1
+#define ION_OUT		2
+#define ION_HUP		3
+#define ION_ERR		4
+
+#define FCB_LOCAL_SIZE	4
+
+
+struct fcb_struct {
+	struct list_head llink;
+	void (*cbproc)(struct file *, void *, unsigned long *, long *);
+	void *data;
+	unsigned long local[FCB_LOCAL_SIZE];
+};
+
+
+extern long ion_band_table[];
+extern long poll_band_table[];
+
+
+void file_notify_event(struct file *filep, long *event);
+
+int file_notify_addcb(struct file *filep,
+		      void (*cbproc)(struct file *, void *, unsigned long *, long *),
+		      void *data);
+
+int file_notify_delcb(struct file *filep,
+		      void (*cbproc)(struct file *, void *, unsigned long *, long *));
+
+void file_notify_cleanup(struct file *filep);
+
+
+static inline void file_notify_init(struct file *filep)
+{
+	rwlock_init(&filep->f_cblock);
+	INIT_LIST_HEAD(&filep->f_cblist);
+}
+
+static inline void file_send_notify(struct file *filep, long ioevt, long plevt)
+{
+	long event[] = { ioevt, plevt, -1 };
+
+	file_notify_event(filep, event);
+}
+
+#endif
diff -Nru a/include/linux/fs.h b/include/linux/fs.h
--- a/include/linux/fs.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/fs.h	Wed Oct 30 16:44:26 2002
@@ -348,8 +348,6 @@
 	struct inode *		bd_inode;
 	dev_t			bd_dev;  /* not a kdev_t - it's a search key */
 	int			bd_openers;
-	struct block_device_operations *bd_op;
-	struct request_queue	*bd_queue;
 	struct semaphore	bd_sem;	/* open/close mutex */
 	struct list_head	bd_inodes;
 	void *			bd_holder;
@@ -506,6 +504,10 @@
 
 	/* needed for tty driver, and maybe others */
 	void			*private_data;
+
+	/* file callback list */
+	rwlock_t f_cblock;
+	struct list_head f_cblist;
 };
 extern spinlock_t files_lock;
 #define file_list_lock() spin_lock(&files_lock);
@@ -793,6 +795,8 @@
 
 extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *);
 extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *);
+extern ssize_t vfs_readv(struct file *, struct iovec *, int, size_t, loff_t *);
+extern ssize_t vfs_writev(struct file *, const struct iovec *, int, size_t, loff_t *);
 
 /*
  * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called
@@ -1096,7 +1100,6 @@
 extern void blk_run_queues(void);
 
 /* fs/devices.c */
-extern struct block_device_operations *get_blkfops(unsigned int);
 extern int register_chrdev(unsigned int, const char *, struct file_operations *);
 extern int unregister_chrdev(unsigned int, const char *);
 extern int chrdev_open(struct inode *, struct file *);
@@ -1242,6 +1245,7 @@
 
 extern int generic_file_mmap(struct file *, struct vm_area_struct *);
 extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
+extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
 extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
 extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
 extern ssize_t generic_file_aio_read(struct kiocb *, char *, size_t, loff_t);
@@ -1253,10 +1257,12 @@
 extern ssize_t generic_file_sendfile(struct file *, struct file *, loff_t *, size_t);
 extern void do_generic_mapping_read(struct address_space *, struct file_ra_state *, struct file *,
 				    loff_t *, read_descriptor_t *, read_actor_t);
+extern void
+file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
 extern ssize_t generic_file_direct_IO(int rw, struct file *file,
 	const struct iovec *iov, loff_t offset, unsigned long nr_segs);
-extern int generic_direct_IO(int rw, struct inode *inode, const struct iovec 
-	*iov, loff_t offset, unsigned long nr_segs, get_blocks_t *get_blocks);
+extern int generic_direct_IO(int rw, struct inode *inode, struct block_device *bdev,
+	const struct iovec *iov, loff_t offset, unsigned long nr_segs, get_blocks_t *get_blocks);
 extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, 
 	unsigned long nr_segs, loff_t *ppos);
 ssize_t generic_file_writev(struct file *filp, const struct iovec *iov, 
@@ -1314,6 +1320,12 @@
 extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
 extern int simple_sync_file(struct file *, struct dentry *, int);
 extern int simple_empty(struct dentry *);
+extern int simple_readpage(struct file *file, struct page *page);
+extern int simple_prepare_write(struct file *file, struct page *page,
+			unsigned offset, unsigned to);
+extern int simple_commit_write(struct file *file, struct page *page,
+				unsigned offset, unsigned to);
+
 extern struct dentry *simple_lookup(struct inode *, struct dentry *);
 extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
 extern struct file_operations simple_dir_operations;
diff -Nru a/include/linux/genhd.h b/include/linux/genhd.h
--- a/include/linux/genhd.h	Wed Oct 30 16:44:24 2002
+++ b/include/linux/genhd.h	Wed Oct 30 16:44:24 2002
@@ -63,6 +63,8 @@
 	sector_t nr_sects;
 	devfs_handle_t de;              /* primary (master) devfs entry  */
 	struct device *hd_driverfs_dev;  /* support driverfs hiearchy     */
+	unsigned reads, read_sectors, writes, write_sectors;
+	int policy;
 };
 
 #define GENHD_FL_REMOVABLE  1
@@ -93,11 +95,23 @@
 	struct device *driverfs_dev;
 	struct device disk_dev;
 
+	struct timer_rand_state *random;
+	int policy;
+
 	unsigned sync_io;		/* RAID */
+	unsigned read_sectors, write_sectors;
 	unsigned reads, writes;
-	unsigned rio, wio;
+	unsigned read_merges, write_merges;
+	unsigned read_ticks, write_ticks;
+	unsigned io_ticks;
+	int in_flight;
+	unsigned long stamp, stamp_idle;
+	unsigned time_in_queue;
 };
 
+/* drivers/block/ll_rw_blk.c */
+extern void disk_round_stats(struct gendisk *disk);
+
 /* drivers/block/genhd.c */
 extern void add_disk(struct gendisk *disk);
 extern void del_gendisk(struct gendisk *gp);
@@ -278,7 +292,7 @@
 extern void blk_register_region(dev_t dev, unsigned long range,
 			struct module *module,
 			struct gendisk *(*probe)(dev_t, int *, void *),
-			void (*lock)(dev_t, void *),
+			int (*lock)(dev_t, void *),
 			void *data);
 extern void blk_unregister_region(dev_t dev, unsigned long range);
 
diff -Nru a/include/linux/gfp.h b/include/linux/gfp.h
--- a/include/linux/gfp.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/gfp.h	Wed Oct 30 16:44:26 2002
@@ -17,6 +17,7 @@
 #define __GFP_IO	0x40	/* Can start low memory physical IO? */
 #define __GFP_HIGHIO	0x80	/* Can start high mem physical IO? */
 #define __GFP_FS	0x100	/* Can call down to low-level FS? */
+#define __GFP_COLD	0x200	/* Cache-cold page required */
 
 #define GFP_NOHIGHIO	(             __GFP_WAIT | __GFP_IO)
 #define GFP_NOIO	(             __GFP_WAIT)
@@ -32,6 +33,7 @@
 
 #define GFP_DMA		__GFP_DMA
 
+
 /*
  * There is only one page-allocator function, and two main namespaces to
  * it. The alloc_page*() variants return 'struct page *' and as such
@@ -77,13 +79,14 @@
 #define __get_dma_pages(gfp_mask, order) \
 		__get_free_pages((gfp_mask) | GFP_DMA,(order))
 
-/*
- * There is only one 'core' page-freeing function.
- */
 extern void FASTCALL(__free_pages(struct page *page, unsigned int order));
 extern void FASTCALL(free_pages(unsigned long addr, unsigned int order));
+extern void FASTCALL(free_hot_page(struct page *page));
+extern void FASTCALL(free_cold_page(struct page *page));
 
 #define __free_page(page) __free_pages((page), 0)
 #define free_page(addr) free_pages((addr),0)
+
+void page_alloc_init(void);
 
 #endif /* __LINUX_GFP_H */
diff -Nru a/include/linux/hdlc.h b/include/linux/hdlc.h
--- a/include/linux/hdlc.h	Wed Oct 30 16:44:36 2002
+++ b/include/linux/hdlc.h	Wed Oct 30 16:44:36 2002
@@ -12,7 +12,7 @@
 #ifndef __HDLC_H
 #define __HDLC_H
 
-#define GENERIC_HDLC_VERSION 3	/* For synchronization with sethdlc utility */
+#define GENERIC_HDLC_VERSION 4	/* For synchronization with sethdlc utility */
 
 #define CLOCK_DEFAULT   0	/* Default setting */
 #define CLOCK_EXT	1	/* External TX and RX clock - DTE */
diff -Nru a/include/linux/hdreg.h b/include/linux/hdreg.h
--- a/include/linux/hdreg.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/hdreg.h	Wed Oct 30 16:44:28 2002
@@ -707,9 +707,9 @@
 					 * 12
 					 * 11:0
 					 */
-	unsigned short	words161_175[14];/* Reserved for CFA */
-	unsigned short	words176_205[31];/* Current Media Serial Number */
-	unsigned short	words206_254[48];/* reserved words 206-254 */
+	unsigned short	words161_175[15];/* Reserved for CFA */
+	unsigned short	words176_205[30];/* Current Media Serial Number */
+	unsigned short	words206_254[49];/* reserved words 206-254 */
 	unsigned short	integrity_word;	/* (word 255)
 					 * 15:8 Checksum
 					 *  7:0 Signature
diff -Nru a/include/linux/highmem.h b/include/linux/highmem.h
--- a/include/linux/highmem.h	Wed Oct 30 16:44:31 2002
+++ b/include/linux/highmem.h	Wed Oct 30 16:44:31 2002
@@ -73,4 +73,15 @@
 	kunmap_atomic(vto, KM_USER1);
 }
 
+static inline void copy_highpage(struct page *to, struct page *from)
+{
+	char *vfrom, *vto;
+
+	vfrom = kmap_atomic(from, KM_USER0);
+	vto = kmap_atomic(to, KM_USER1);
+	copy_page(vto, vfrom);
+	kunmap_atomic(vfrom, KM_USER0);
+	kunmap_atomic(vto, KM_USER1);
+}
+
 #endif /* _LINUX_HIGHMEM_H */
diff -Nru a/include/linux/ide.h b/include/linux/ide.h
--- a/include/linux/ide.h	Wed Oct 30 16:44:27 2002
+++ b/include/linux/ide.h	Wed Oct 30 16:44:27 2002
@@ -1189,10 +1189,6 @@
 	u8		(*sense)(ide_drive_t *, const char *, u8);
 	ide_startstop_t	(*error)(ide_drive_t *, const char *, u8);
 	int		(*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
-	int		(*open)(struct inode *, struct file *, ide_drive_t *);
-	void		(*release)(struct inode *, struct file *, ide_drive_t *);
-	int		(*media_change)(ide_drive_t *);
-	void		(*revalidate)(ide_drive_t *);
 	void		(*pre_reset)(ide_drive_t *);
 	unsigned long	(*capacity)(ide_drive_t *);
 	ide_startstop_t	(*special)(ide_drive_t *);
@@ -1207,6 +1203,8 @@
 
 #define DRIVER(drive)		((drive)->driver)
 
+extern int generic_ide_ioctl(struct block_device *, unsigned, unsigned long);
+
 /*
  * IDE modules.
  */
@@ -1322,8 +1320,6 @@
  */
 extern unsigned long current_capacity (ide_drive_t *drive);
 
-extern void ide_revalidate_drive (ide_drive_t *drive);
-
 /*
  * Start a reset operation for an IDE interface.
  * The caller should return immediately after invoking this.
@@ -1483,9 +1479,9 @@
 /* Expects args is a full set of TF registers and parses the command type */
 extern int ide_cmd_type_parser(ide_task_t *);
 
-int ide_taskfile_ioctl(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
-int ide_cmd_ioctl(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
-int ide_task_ioctl(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long);
+int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long);
+int ide_cmd_ioctl(ide_drive_t *, unsigned int, unsigned long);
+int ide_task_ioctl(ide_drive_t *, unsigned int, unsigned long);
 
 #if 0
 
diff -Nru a/include/linux/if.h b/include/linux/if.h
--- a/include/linux/if.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/if.h	Wed Oct 30 16:44:28 2002
@@ -96,16 +96,20 @@
 struct if_settings
 {
 	unsigned int type;	/* Type of physical device or protocol */
+	unsigned int size;	/* Size of the data allocated by the caller */
 	union {
 		/* {atm/eth/dsl}_settings anyone ? */
-		union hdlc_settings ifsu_hdlc;
-		union line_settings ifsu_line;
+		raw_hdlc_proto		*raw_hdlc;
+		cisco_proto		*cisco;
+		fr_proto		*fr;
+		fr_proto_pvc		*fr_pvc;
+
+		/* interface settings */
+		sync_serial_settings	*sync;
+		te1_settings		*te1;
 	} ifs_ifsu;
 };
 
-#define ifs_hdlc	ifs_ifsu.ifsu_hdlc
-#define ifs_line	ifs_ifsu.ifsu_line
-
 /*
  * Interface request structure used for socket
  * ioctl's.  All interface ioctl's must have parameter
@@ -135,7 +139,7 @@
 		char	ifru_slave[IFNAMSIZ];	/* Just fits the size */
 		char	ifru_newname[IFNAMSIZ];
 		char *	ifru_data;
-		struct	if_settings *ifru_settings;
+		struct	if_settings ifru_settings;
 	} ifr_ifru;
 };
 
diff -Nru a/include/linux/in6.h b/include/linux/in6.h
--- a/include/linux/in6.h	Wed Oct 30 16:44:29 2002
+++ b/include/linux/in6.h	Wed Oct 30 16:44:29 2002
@@ -156,6 +156,7 @@
 #define IPV6_MTU_DISCOVER	23
 #define IPV6_MTU		24
 #define IPV6_RECVERR		25
+#define IPV6_V6ONLY		26
 
 /* IPV6_MTU_DISCOVER values */
 #define IPV6_PMTUDISC_DONT		0
diff -Nru a/include/linux/intermezzo_fs.h b/include/linux/intermezzo_fs.h
--- a/include/linux/intermezzo_fs.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/intermezzo_fs.h	Wed Oct 30 16:44:28 2002
@@ -223,8 +223,6 @@
 
         int   cache_flags;
 
-        kdev_t cache_dev;            /* underlying block device */
-
         char *cache_type;            /* filesystem type of cache */
         struct filter_fs *cache_filter;
 
@@ -425,10 +423,10 @@
                        struct presto_file_set **);
 /* cache.c */
 extern struct presto_cache *presto_cache_init(void);
-extern inline void presto_cache_add(struct presto_cache *cache, kdev_t dev);
+extern inline void presto_cache_add(struct presto_cache *cache);
 extern inline void presto_cache_init_hash(void);
 
-struct presto_cache *presto_cache_find(kdev_t dev);
+struct presto_cache *presto_cache_find(struct super_block *sb);
 
 #define PRESTO_REQLOW  (3 * 4096)
 #define PRESTO_REQHIGH (6 * 4096)
diff -Nru a/include/linux/ioport.h b/include/linux/ioport.h
--- a/include/linux/ioport.h	Wed Oct 30 16:44:24 2002
+++ b/include/linux/ioport.h	Wed Oct 30 16:44:24 2002
@@ -85,7 +85,6 @@
 
 extern int get_resource_list(struct resource *, char *buf, int size);
 
-extern int check_resource(struct resource *root, unsigned long, unsigned long);
 extern int request_resource(struct resource *root, struct resource *new);
 extern int release_resource(struct resource *new);
 extern int allocate_resource(struct resource *root, struct resource *new,
diff -Nru a/include/linux/ip.h b/include/linux/ip.h
--- a/include/linux/ip.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/ip.h	Wed Oct 30 16:44:26 2002
@@ -192,4 +192,19 @@
 	/*The options start here. */
 };
 
+struct ip_auth_hdr {
+	__u8  nexthdr;
+	__u8  hdrlen;		/* This one is measured in 32 bit units! */
+	__u16 reserved;
+	__u32 spi;
+	__u32 seq_no;		/* Sequence number */
+	__u8  auth_data[4];	/* Variable len but >=4. Mind the 64 bit alignment! */
+};
+
+struct ip_esp_hdr {
+	__u32 spi;
+	__u32 seq_no;		/* Sequence number */
+	__u8  enc_data[8];	/* Variable len but >=8. Mind the 64 bit alignment! */
+};
+
 #endif	/* _LINUX_IP_H */
diff -Nru a/include/linux/ipv6.h b/include/linux/ipv6.h
--- a/include/linux/ipv6.h	Wed Oct 30 16:44:30 2002
+++ b/include/linux/ipv6.h	Wed Oct 30 16:44:30 2002
@@ -1,6 +1,7 @@
 #ifndef _IPV6_H
 #define _IPV6_H
 
+#include <linux/config.h>
 #include <linux/in6.h>
 #include <asm/byteorder.h>
 
@@ -152,7 +153,8 @@
 	__u8			mc_loop:1,
 	                        recverr:1,
 	                        sndflow:1,
-	                        pmtudisc:2;
+				pmtudisc:2,
+				ipv6only:1;
 
 	struct ipv6_mc_socklist	*ipv6_mc_list;
 	struct ipv6_fl_socklist *ipv6_fl_list;
@@ -195,6 +197,15 @@
 
 #define inet6_sk(__sk) ((struct raw6_sock *)__sk)->pinet6
 #define raw6_sk(__sk) (&((struct raw6_sock *)__sk)->raw6)
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+#define __ipv6_only_sock(sk)	(inet6_sk(sk)->ipv6only)
+#define ipv6_only_sock(sk)	((sk)->family == PF_INET6 && __ipv6_only_sock(sk))
+#else
+#define __ipv6_only_sock(sk)	0
+#define ipv6_only_sock(sk)	0
+#endif
+
 #endif
 
 #endif
diff -Nru a/include/linux/isdn/fsm.h b/include/linux/isdn/fsm.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/isdn/fsm.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,58 @@
+/* Linux ISDN subsystem, finite state machine
+ *
+ * Author       Karsten Keil
+ * Copyright              by Karsten Keil      <keil@isdn4linux.de>
+ *              2001-2002 by Kai Germaschewski <kai@germaschewski.name>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#ifndef __ISDN_FSM_H__
+#define __ISDN_FSM_H__
+
+#include <linux/kernel.h>
+#include <linux/timer.h>
+
+struct fsm_inst;
+
+typedef int (*fsm_fn)(struct fsm_inst *, int, void *);
+
+struct fsm {
+	fsm_fn *jumpmatrix;
+	int st_cnt, ev_cnt, fn_cnt;
+	char **st_str, **ev_str;
+	struct fsm_node *fn_tbl;
+};
+
+struct fsm_inst {
+	struct fsm *fsm;
+	int state;
+	int debug;
+	void *userdata;
+	int userint;
+	void (*printdebug) (struct fsm_inst *, char *, ...);
+};
+
+struct fsm_node {
+	int st, ev;
+	fsm_fn fn;
+};
+
+struct fsm_timer {
+	struct fsm_inst *fi;
+	struct timer_list tl;
+	int ev;
+	void *arg;
+};
+
+int  fsm_new(struct fsm *fsm);
+void fsm_free(struct fsm *fsm);
+int  fsm_event(struct fsm_inst *fi, int event, void *arg);
+void fsm_change_state(struct fsm_inst *fi, int newstate);
+void fsm_init_timer(struct fsm_inst *fi, struct fsm_timer *ft);
+int  fsm_add_timer(struct fsm_timer *ft, int timeout, int event);
+void fsm_mod_timer(struct fsm_timer *ft, int timeout, int event);
+void fsm_del_timer(struct fsm_timer *ft);
+
+#endif
diff -Nru a/include/linux/isdn.h b/include/linux/isdn.h
--- a/include/linux/isdn.h	Wed Oct 30 16:44:36 2002
+++ b/include/linux/isdn.h	Wed Oct 30 16:44:36 2002
@@ -1,10 +1,9 @@
-/* $Id: isdn.h,v 1.111.6.9 2001/09/23 22:25:05 kai Exp $
- *
- * Main header for the Linux ISDN subsystem (linklevel).
+/* Linux ISDN subsystem, main header
  *
  * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 2000-2002  by Kai Germaschewski (kai@germaschewski.name)
  * 
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
@@ -15,9 +14,7 @@
 #define __ISDN_H__
 
 #include <linux/ioctl.h>
-
-// FIXME!!!
-#include <../drivers/isdn/i4l/isdn_fsm.h>
+#include <linux/isdn/fsm.h>
 
 #ifdef CONFIG_COBALT_MICRO_SERVER
 /* Save memory */
@@ -238,210 +235,9 @@
 #define USG_MODEMORVOICE(x) (((x & ISDN_USAGE_MASK)==ISDN_USAGE_MODEM) || \
                              ((x & ISDN_USAGE_MASK)==ISDN_USAGE_VOICE)     )
 
-/* Timer-delays and scheduling-flags */
-#define ISDN_TIMER_RES         4                         /* Main Timer-Resolution   */
-#define ISDN_TIMER_02SEC       (HZ/ISDN_TIMER_RES/5)     /* Slow-Timer1 .2 sec      */
-#define ISDN_TIMER_1SEC        (HZ/ISDN_TIMER_RES)       /* Slow-Timer2 1 sec       */
-#define ISDN_TIMER_RINGING     5 /* tty RINGs = ISDN_TIMER_1SEC * this factor       */
-#define ISDN_TIMER_KEEPINT    10 /* Cisco-Keepalive = ISDN_TIMER_1SEC * this factor */
-#define ISDN_TIMER_MODEMREAD   1
-#define ISDN_TIMER_MODEMPLUS   2
-#define ISDN_TIMER_MODEMRING   4
-#define ISDN_TIMER_MODEMXMIT   8
-#define ISDN_TIMER_CARRIER   256 /* Wait for Carrier */
-#define ISDN_TIMER_FAST      (ISDN_TIMER_MODEMREAD | ISDN_TIMER_MODEMPLUS | \
-                              ISDN_TIMER_MODEMXMIT)
-#define ISDN_TIMER_SLOW      (ISDN_TIMER_MODEMRING | ISDN_TIMER_CARRIER)
-
 /* GLOBAL_FLAGS */
 #define ISDN_GLOBAL_STOPPED 1
 
-/*=================== Start of ip-over-ISDN stuff =========================*/
-
-/* Feature- and status-flags for a net-interface */
-#define ISDN_NET_SECURE     0x02       /* Accept calls from phonelist only  */
-#define ISDN_NET_CALLBACK   0x04       /* activate callback                 */
-#define ISDN_NET_CBHUP      0x08       /* hangup before callback            */
-#define ISDN_NET_CBOUT      0x10       /* remote machine does callback      */
-
-#define ISDN_NET_MAGIC      0x49344C02 /* for paranoia-checking             */
-
-/* Phone-list-element */
-struct isdn_net_phone {
-	struct list_head list;
-	char num[ISDN_MSNLEN];
-};
-
-/*
-   Principles when extending structures for generic encapsulation protocol
-   ("concap") support:
-   - Stuff which is hardware specific (here i4l-specific) goes in 
-     the netdev -> local structure (here: isdn_net_local)
-   - Stuff which is encapsulation protocol specific goes in the structure
-     which holds the linux device structure (here: isdn_net_device)
-*/
-
-struct isdn_net_dev_s;
-struct isdn_net_local_s;
-
-struct isdn_netif_ops {
-	int			(*hard_start_xmit) (struct sk_buff *skb,
-						    struct net_device *dev);
-	int			(*hard_header) (struct sk_buff *skb,
-						struct net_device *dev,
-						unsigned short type,
-						void *daddr,
-						void *saddr,
-						unsigned len);
-	int			(*do_ioctl)(struct net_device *dev,
-					    struct ifreq *ifr, int cmd);
-
-	unsigned short		flags;	/* interface flags (a la BSD)	*/
-	unsigned short		type;	/* interface hardware type	*/
-	unsigned char		addr_len;/* hardware address length	*/
-	void                    (*receive)(struct isdn_net_local_s *,
-					   struct isdn_net_dev_s *,
-					   struct sk_buff *);
-	void                    (*connected)(struct isdn_net_dev_s *);
-	void                    (*disconnected)(struct isdn_net_dev_s *);
-	int                     (*bind)(struct isdn_net_dev_s *);
-	void                    (*unbind)(struct isdn_net_dev_s *);
-	int                     (*init)(struct isdn_net_local_s *);
-	void                    (*cleanup)(struct isdn_net_local_s *);
-	int                     (*open)(struct isdn_net_local_s *);
-	void                    (*close)(struct isdn_net_local_s *);
-};
-
-/* Local interface-data */
-typedef struct isdn_net_local_s {
-  ulong                  magic;
-  struct net_device_stats stats;       /* Ethernet Statistics              */
-  int                    flags;        /* Connection-flags                 */
-  int                    dialmax;      /* Max. Number of Dial-retries      */
-  int	        	 dialtimeout;  /* How long shall we try on dialing */
-  int			 dialwait;     /* wait after failed attempt        */
-
-  int                    cbdelay;      /* Delay before Callback starts     */
-  char                   msn[ISDN_MSNLEN]; /* MSNs/EAZs for this interface */
-
-  u_char                 cbhup;        /* Flag: Reject Call before Callback*/
-  int                    hupflags;     /* Flags for charge-unit-hangup:    */
-  int                    onhtime;      /* Time to keep link up             */
-
-  u_char                 p_encap;      /* Packet encapsulation             */
-  u_char                 l2_proto;     /* Layer-2-protocol                 */
-  u_char                 l3_proto;     /* Layer-3-protocol                 */
-
-  ulong                  slavedelay;   /* Dynamic bundling delaytime       */
-  int                    triggercps;   /* BogoCPS needed for trigger slave */
-  struct list_head       phone[2];     /* List of remote-phonenumbers      */
-				       /* phone[0] = Incoming Numbers      */
-				       /* phone[1] = Outgoing Numbers      */
-
-  struct list_head       slaves;       /* list of all bundled channels    
-					  protected by serializing config
-					  ioctls / no change allowed when
-					  interface is running             */
-  struct list_head       online;       /* list of all bundled channels 
-					  which can be used for actual
-					  data (IP) transfer              
-					  protected by xmit_lock           */
-
-  spinlock_t             xmit_lock;    /* used to protect the xmit path of 
-					  a net_device, including all
-					  associated channels's frame_cnt  */
-  struct list_head       running_devs; /* member of global running_devs    */
-  atomic_t               refcnt;       /* references held by ISDN code     */
-
-#ifdef CONFIG_ISDN_X25
-  struct concap_device_ops *dops;      /* callbacks used by encapsulator   */
-#endif
-#ifdef CONFIG_ISDN_PPP
-  unsigned int           mpppcfg;
-  long                   mp_seqno;
-  struct ippp_ccp        *ccp;
-  unsigned long          debug;
-#ifdef CONFIG_ISDN_PPP_VJ
-  unsigned char         *cbuf;
-  struct slcompress     *slcomp;
-#endif
-#endif
-
-  /* use an own struct for that in later versions */
-  ulong cisco_myseq;                   /* Local keepalive seq. for Cisco   */
-  ulong cisco_mineseen;                /* returned keepalive seq. from remote */
-  ulong cisco_yourseq;                 /* Remote keepalive seq. for Cisco  */
-  int cisco_keepalive_period;		/* keepalive period */
-  ulong cisco_last_slarp_in;		/* jiffie of last keepalive packet we received */
-  char cisco_line_state;		/* state of line according to keepalive packets */
-  char cisco_debserint;			/* debugging flag of cisco hdlc with slarp */
-
-  struct timer_list       cisco_timer;
-
-  struct isdn_netif_ops  *ops;
-
-  struct net_device       dev;          /* interface to upper levels        */
-} isdn_net_local;
-
-/* the interface itself */
-typedef struct isdn_net_dev_s {
-  int                    isdn_slot;    /* Index to isdn device/channel     */
-  int                    pre_device;   /* Preselected isdn-device          */
-  int                    pre_channel;  /* Preselected isdn-channel         */
-  int                    exclusive;    /* -1 if non excl./idx to excl chan */
-
-  struct timer_list      dial_timer;   /* dial events timer                */
-  struct fsm_inst        fi;           /* call control state machine       */
-  int                    dial_event;   /* event in case of timer expiry    */
-  int                    dial;         /* # of phone number just dialed    */
-  int                    outgoing;     /* Flag: outgoing call              */
-  int                    dialretry;    /* Counter for Dialout-retries      */
-
-  int                    cps;          /* current speed of this interface  */
-  int                    transcount;   /* byte-counter for cps-calculation */
-  int                    last_jiffies; /* when transcount was reset        */
-  int                    sqfull;       /* Flag: netdev-queue overloaded    */
-  ulong                  sqfull_stamp; /* Start-Time of overload           */
-
-  int                    huptimer;     /* Timeout-counter for auto-hangup  */
-  int                    charge;       /* Counter for charging units       */
-  int                    charge_state; /* ChargeInfo state machine         */
-  unsigned long          chargetime;   /* Timer for Charging info          */
-  int                    chargeint;    /* Interval between charge-infos    */
-
-  int                    pppbind;      /* ippp device for bindings         */
-  struct ipppd          *ipppd;        /* /dev/ipppX which controls us     */
-
-  struct sk_buff_head    super_tx_queue; /* List of supervisory frames to  */
-	                               /* be transmitted asap              */
-  int                    frame_cnt;    /* number of frames currently       */
-                        	       /* queued in HL driver              */
-  struct tasklet_struct  tlet;
-
-  isdn_net_local        *mlp;          /* Ptr to master device for all devs*/
-
-  struct list_head       slaves;       /* member of local->slaves          */
-  struct list_head       online;       /* member of local->online          */
-
-  char                   name[10];     /* Name of device                   */
-  struct list_head       global_list;  /* global list of all isdn_net_devs */
-#ifdef CONFIG_ISDN_PPP
-  unsigned int           pppcfg;
-  unsigned int           pppseq;       /* last seq no seen                 */
-  struct ippp_ccp        *ccp;
-  unsigned long          debug;
-
-  ippp_bundle * pb;		/* pointer to the common bundle structure
-   			         * with the per-bundle data */
-#endif
-#ifdef CONFIG_ISDN_X25
-  struct concap_proto  *cprot; /* connection oriented encapsulation protocol */
-#endif
-
-} isdn_net_dev;
-
-/*===================== End of ip-over-ISDN stuff ===========================*/
-
 /*======================= Start of ISDN-tty stuff ===========================*/
 
 #define ISDN_ASYNC_MAGIC          0x49344C01 /* for paranoia-checking        */
@@ -494,7 +290,6 @@
 	int          mdmcmdl;                    /* Length of Modem-Commandbuffer      */
 	int          pluscount;                  /* Counter for +++ sequence           */
 	int          lastplus;                   /* Timestamp of last +                */
-	int	     carrierwait;                /* Seconds of carrier waiting         */
 	char         mdmcmd[255];                /* Modem-Commandbuffer                */
 	unsigned int charge;                     /* Charge units of current connection */
 } atemu;
@@ -516,7 +311,9 @@
 					 /* 2 = B-Channel is up, deliver d.*/
   int                   dialing;         /* Dial in progress or ATA        */
   int                   rcvsched;        /* Receive needs schedule         */
-  int                   isdn_slot;	 /* Index to isdn-driver/channel   */
+  struct isdn_slot     *isdn_slot;	 /* Ptr to isdn-driver/channel     */
+  struct sk_buff_head   rpqueue;         /* Queue of recv'd packets        */
+  int                   rcvcount;        /* Byte-counters for B rx         */
   int                   ncarrier;        /* Flag: schedule NO CARRIER      */
   unsigned char         last_cause[8];   /* Last cause message             */
   unsigned char         last_num[ISDN_MSNLEN];
@@ -533,6 +330,7 @@
   struct sk_buff_head   xmit_queue;      /* transmit queue                 */
   atomic_t              xmit_lock;       /* Semaphore for isdn_tty_write   */
 #ifdef CONFIG_ISDN_AUDIO
+  unsigned long         DLEflag;         /* Insert DLE at next read     */
   int                   vonline;         /* Voice-channel status           */
 					 /* Bit 0 = recording              */
 					 /* Bit 1 = playback               */
@@ -549,6 +347,10 @@
 #endif
   struct tty_struct 	*tty;            /* Pointer to corresponding tty   */
   atemu                 emu;             /* AT-emulator data               */
+  struct timer_list     escape_timer;    /* to recognize +++ escape        */
+  struct timer_list     ring_timer;      /* for writing 'RING' responses   */
+  struct timer_list     connect_timer;   /* waiting for CONNECT            */
+  struct timer_list     read_timer;      /* read incoming data             */
   struct termios	normal_termios;  /* For saving termios structs     */
   struct termios	callout_termios;
   wait_queue_head_t	open_wait, close_wait;
@@ -557,17 +359,6 @@
 
 #define ISDN_MODEM_WINSIZE 8
 
-/* Description of one ISDN-tty */
-typedef struct {
-  int                refcount;			   /* Number of opens        */
-  struct tty_driver  tty_modem;			   /* tty-device             */
-  struct tty_driver  cua_modem;			   /* cua-device             */
-  struct tty_struct  *modem_table[ISDN_MAX_CHANNELS]; /* ?? copied from Orig */
-  struct termios     *modem_termios[ISDN_MAX_CHANNELS];
-  struct termios     *modem_termios_locked[ISDN_MAX_CHANNELS];
-  modem_info         info[ISDN_MAX_CHANNELS];	   /* Private data           */
-} modem;
-
 /*======================= End of ISDN-tty stuff ============================*/
 
 /*======================== Start of V.110 stuff ============================*/
@@ -602,37 +393,10 @@
 	char *private;
 } infostruct;
 
-#define DRV_FLAG_RUNNING 1
-#define DRV_FLAG_REJBUS  2
-#define DRV_FLAG_LOADED  4
-
-/* Description of hardware-level-driver */
-typedef struct {
-	ulong               online;           /* Channel-Online flags             */
-	ulong               flags;            /* Misc driver Flags                */
-	int                 locks;            /* Number of locks for this driver  */
-	int                 channels;         /* Number of channels               */
-	wait_queue_head_t   st_waitq;         /* Wait-Queue for status-read's     */
-	int                 maxbufsize;       /* Maximum Buffersize supported     */
-	unsigned long       pktcount;         /* Until now: unused                */
-	int                 stavail;          /* Chars avail on Status-device     */
-	isdn_if            *interface;        /* Interface to driver              */
-	int                *rcverr;           /* Error-counters for B-Ch.-receive */
-	int                *rcvcount;         /* Byte-counters for B-Ch.-receive  */
-#ifdef CONFIG_ISDN_AUDIO
-	unsigned long      DLEflag;           /* Flags: Insert DLE at next read   */
-#endif
-	struct sk_buff_head *rpqueue;         /* Pointers to start of Rcv-Queue   */
-	wait_queue_head_t  *rcv_waitq;       /* Wait-Queues for B-Channel-Reads  */
-	wait_queue_head_t  *snd_waitq;       /* Wait-Queue for B-Channel-Send's  */
-	char               msn2eaz[10][ISDN_MSNLEN];  /* Mapping-Table MSN->EAZ   */
-} driver;
-
 /* Main driver-data */
 typedef struct isdn_devt {
 	unsigned short    flags;		       /* Bitmapped Flags:           */
 	/*                            */
-	int               drivers;		       /* Current number of drivers  */
 	int               channels;		       /* Current number of channels */
 	int               net_verbose;               /* Verbose-Flag               */
 	int               modempoll;		       /* Flag: tty-read active      */
@@ -641,11 +405,7 @@
 	int               global_flags;
 	infostruct        *infochain;                /* List of open info-devs.    */
 	wait_queue_head_t info_waitq;               /* Wait-Queue for isdninfo    */
-	struct timer_list timer;		       /* Misc.-function Timer       */
-	driver            *drv[ISDN_MAX_DRIVERS];    /* Array of drivers           */
-	char              drvid[ISDN_MAX_DRIVERS][20];/* Driver-ID                 */
 	struct task_struct *profd;                   /* For iprofd                 */
-	modem             mdm;		       /* tty-driver-data            */
 	struct semaphore  sem;                       /* serialize list access*/
 	unsigned long     global_features;
 #ifdef CONFIG_DEVFS_FS
diff -Nru a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h
--- a/include/linux/isdn_ppp.h	Wed Oct 30 16:44:25 2002
+++ b/include/linux/isdn_ppp.h	Wed Oct 30 16:44:25 2002
@@ -1,10 +1,15 @@
-/*
+/* Linux ISDN subsystem, sync PPP, interface to ipppd
+ *
+ * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
+ * Copyright 1995,96    Thinking Objects Software GmbH Wuerzburg
+ * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
+ * Copyright 2000-2002  by Kai Germaschewski (kai@germaschewski.name)
+ *
  * This software may be used and distributed according to the terms
  * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-
 #ifndef _LINUX_ISDN_PPP_H
 #define _LINUX_ISDN_PPP_H
 
@@ -16,22 +21,21 @@
 
 struct pppcallinfo
 {
-  int calltype;
-  unsigned char local_num[64];
-  unsigned char remote_num[64];
-  int charge_units;
+	int calltype;
+	unsigned char local_num[64];
+	unsigned char remote_num[64];
+	int charge_units;
 };
 
-#define PPPIOCGCALLINFO _IOWR('t',128,struct pppcallinfo)
-#define PPPIOCBUNDLE   _IOW('t',129,int)
-#define PPPIOCGMPFLAGS _IOR('t',130,int)
-#define PPPIOCSMPFLAGS _IOW('t',131,int)
-#define PPPIOCSMPMTU   _IOW('t',132,int)
-#define PPPIOCSMPMRU   _IOW('t',133,int)
-#define PPPIOCGCOMPRESSORS _IOR('t',134,unsigned long [8])
-#define PPPIOCSCOMPRESSOR _IOW('t',135,int)
-#define PPPIOCGIFNAME      _IOR('t',136, char [IFNAMSIZ] )
-
+#define PPPIOCGCALLINFO    _IOWR('t',128,struct pppcallinfo)
+#define PPPIOCBUNDLE       _IOW('t',129,int)
+#define PPPIOCGMPFLAGS     _IOR('t',130,int)
+#define PPPIOCSMPFLAGS     _IOW('t',131,int)
+#define PPPIOCSMPMTU       _IOW('t',132,int)
+#define PPPIOCSMPMRU       _IOW('t',133,int)
+#define PPPIOCGCOMPRESSORS _IOR('t',134,unsigned long[8])
+#define PPPIOCSCOMPRESSOR  _IOW('t',135,int)
+#define PPPIOCGIFNAME      _IOR('t',136,char[IFNAMSIZ])
 
 #define SC_MP_PROT       0x00000200
 #define SC_REJ_MP_PROT   0x00000400
@@ -44,26 +48,19 @@
 #define IPPP_COMP_FLAG_LINK 0x2
 
 struct isdn_ppp_comp_data {
-  int num;
-  unsigned char options[ISDN_PPP_COMP_MAX_OPTIONS];
-  int optlen;
-  int flags;
+	int num;
+	unsigned char options[ISDN_PPP_COMP_MAX_OPTIONS];
+	int optlen;
+	int flags;
 };
 
 #ifdef __KERNEL__
 
-
-#include <linux/config.h>
 #include <linux/skbuff.h>
 #include <linux/ppp_defs.h>
 
 #define DECOMP_ERR_NOMEM	(-10)
 
-#define MP_END_FRAG    0x40
-#define MP_BEGIN_FRAG  0x80
-
-#define MP_MAX_QUEUE_LEN	16
-
 /*
  * We need a way for the decompressor to influence the generation of CCP
  * Reset-Requests in a variety of ways. The decompressor is already returning
@@ -82,15 +79,15 @@
 #define IPPP_RESET_MAXDATABYTES	32
 
 struct isdn_ppp_resetparams {
-  unsigned char valid:1;	/* rw Is this structure filled at all ? */
-  unsigned char rsend:1;	/* rw Should we send one at all ? */
-  unsigned char idval:1;	/* rw Is the id field valid ? */
-  unsigned char dtval:1;	/* rw Is the data field valid ? */
-  unsigned char expra:1;	/* rw Is an Ack expected for this Req ? */
-  unsigned char id;		/* wo Send CCP ResetReq with this id */
-  unsigned short maxdlen;	/* ro Max bytes to be stored in data field */
-  unsigned short dlen;		/* rw Bytes stored in data field */
-  unsigned char *data;		/* wo Data for ResetReq info field */
+	unsigned char valid:1;	/* rw Is this structure filled at all ? */
+	unsigned char rsend:1;	/* rw Should we send one at all ? */
+	unsigned char idval:1;	/* rw Is the id field valid ? */
+	unsigned char dtval:1;	/* rw Is the data field valid ? */
+	unsigned char expra:1;	/* rw Is an Ack expected for this Req ? */
+	unsigned char id;		/* wo Send CCP ResetReq with this id */
+	unsigned short maxdlen;	/* ro Max bytes to be stored in data field */
+	unsigned short dlen;		/* rw Bytes stored in data field */
+	unsigned char *data;		/* wo Data for ResetReq info field */
 };
 
 /*
@@ -98,89 +95,37 @@
  * check the original include for more information
  */
 struct isdn_ppp_compressor {
-  struct isdn_ppp_compressor *next, *prev;
-  int num; /* CCP compression protocol number */
+	struct isdn_ppp_compressor *next, *prev;
+	int num; /* CCP compression protocol number */
   
-  void *(*alloc) (struct isdn_ppp_comp_data *);
-  void (*free) (void *state);
-  int  (*init) (void *state, struct isdn_ppp_comp_data *,
-		int unit,int debug);
-  
-  /* The reset entry needs to get more exact information about the
-     ResetReq or ResetAck it was called with. The parameters are
-     obvious. If reset is called without a Req or Ack frame which
-     could be handed into it, code MUST be set to 0. Using rsparm,
-     the reset entry can control if and how a ResetAck is returned. */
-  
-  void (*reset) (void *state, unsigned char code, unsigned char id,
-		 unsigned char *data, unsigned len,
-		 struct isdn_ppp_resetparams *rsparm);
+	void *(*alloc) (struct isdn_ppp_comp_data *);
+	void (*free) (void *state);
+	int  (*init) (void *state, struct isdn_ppp_comp_data *,
+		      int unit,int debug);
+  
+	/* The reset entry needs to get more exact information about the
+	   ResetReq or ResetAck it was called with. The parameters are
+	   obvious. If reset is called without a Req or Ack frame which
+	   could be handed into it, code MUST be set to 0. Using rsparm,
+	   the reset entry can control if and how a ResetAck is returned. */
+  
+	void (*reset) (void *state, unsigned char code, unsigned char id,
+		       unsigned char *data, unsigned len,
+		       struct isdn_ppp_resetparams *rsparm);
   
-  int  (*compress) (void *state, struct sk_buff *in,
-		    struct sk_buff *skb_out, int proto);
+	int  (*compress) (void *state, struct sk_buff *in,
+			  struct sk_buff *skb_out, int proto);
   
 	int  (*decompress) (void *state,struct sk_buff *in,
 			    struct sk_buff *skb_out,
 			    struct isdn_ppp_resetparams *rsparm);
   
-  void (*incomp) (void *state, struct sk_buff *in,int proto);
-  void (*stat) (void *state, struct compstat *stats);
+	void (*incomp) (void *state, struct sk_buff *in,int proto);
+	void (*stat) (void *state, struct compstat *stats);
 };
 
 extern int isdn_ppp_register_compressor(struct isdn_ppp_compressor *);
 extern int isdn_ppp_unregister_compressor(struct isdn_ppp_compressor *);
-
-typedef struct {
-  unsigned long seqerrs;
-  unsigned long frame_drops;
-  unsigned long overflows;
-  unsigned long max_queue_len;
-} isdn_mppp_stats;
-
-typedef struct {
-  int mp_mrru;                        /* unused                             */
-  struct sk_buff * frags;	/* fragments sl list -- use skb->next */
-  long frames;			/* number of frames in the frame list */
-  unsigned int seq;		/* last processed packet seq #: any packets
-  				 * with smaller seq # will be dropped
-				 * unconditionally */
-  spinlock_t lock;
-  int ref_ct;				 
-  /* statistics */
-  isdn_mppp_stats stats;
-} ippp_bundle;
-
-#define IPPP_MAX_RQ_LEN     8
-
-/* The data structure for one CCP reset transaction */
-enum ippp_ccp_reset_states {
-  CCPResetIdle,
-  CCPResetSentReq,
-  CCPResetRcvdReq,
-  CCPResetSentAck,
-  CCPResetRcvdAck
-};
-
-struct ippp_ccp_reset_state {
-  enum ippp_ccp_reset_states state;	/* State of this transaction */
-  struct ippp_ccp *ccp;                 /* Backlink */
-  unsigned char id;			/* id index */
-  unsigned char ta:1;			/* The timer is active (flag) */
-  unsigned char expra:1;		/* We expect a ResetAck at all */
-  int dlen;				/* Databytes stored in data */
-  struct timer_list timer;		/* For timeouts/retries */
-  /* This is a hack but seems sufficient for the moment. We do not want
-     to have this be yet another allocation for some bytes, it is more
-     memory management overhead than the whole mess is worth. */
-  unsigned char data[IPPP_RESET_MAXDATABYTES];
-};
-
-/* The data structure keeping track of the currently outstanding CCP Reset
-   transactions. */
-struct ippp_ccp_reset {
-  struct ippp_ccp_reset_state *rs[256];	/* One per possible id */
-  unsigned char lastid;			/* Last id allocated by the engine */
-};
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_ISDN_PPP_H */
diff -Nru a/include/linux/isdnif.h b/include/linux/isdnif.h
--- a/include/linux/isdnif.h	Wed Oct 30 16:44:17 2002
+++ b/include/linux/isdnif.h	Wed Oct 30 16:44:17 2002
@@ -202,14 +202,12 @@
 #define ISDN_STAT_LOAD    265    /* Signal new lowlevel-driver is loaded  */
 #define ISDN_STAT_UNLOAD  266    /* Signal unload of lowlevel-driver      */
 #define ISDN_STAT_BSENT   267    /* Signal packet sent                    */
-#define ISDN_STAT_NODCH   268    /* Signal no D-Channel                   */
 #define ISDN_STAT_ADDCH   269    /* Add more Channels                     */
 #define ISDN_STAT_CAUSE   270    /* Cause-Message                         */
 #define ISDN_STAT_ICALLW  271    /* Incoming call without B-chan waiting  */
 #define ISDN_STAT_REDIR   272    /* Redir result                          */
 #define ISDN_STAT_PROT    273    /* protocol IO specific callback         */
 #define ISDN_STAT_DISPLAY 274    /* deliver a received display message    */
-#define ISDN_STAT_L1ERR   275    /* Signal Layer-1 Error                  */
 #define ISDN_STAT_FAXIND  276    /* FAX indications from HL-driver        */
 #define ISDN_STAT_AUDIO   277    /* DTMF, DSP indications                 */
 #define ISDN_STAT_DISCH   278    /* Disable/Enable channel usage          */
@@ -219,12 +217,6 @@
  */
 #define ISDN_AUDIO_SETDD	0	/* Set DTMF detection           */
 #define ISDN_AUDIO_DTMF		1	/* Rx/Tx DTMF                   */
-
-/*
- * Values for errcode field
- */
-#define ISDN_STAT_L1ERR_SEND 1
-#define ISDN_STAT_L1ERR_RECV 2
 
 /*
  * Values for feature-field of interface-struct.
diff -Nru a/include/linux/kdev_t.h b/include/linux/kdev_t.h
--- a/include/linux/kdev_t.h	Wed Oct 30 16:44:32 2002
+++ b/include/linux/kdev_t.h	Wed Oct 30 16:44:32 2002
@@ -1,6 +1,6 @@
 #ifndef _LINUX_KDEV_T_H
 #define _LINUX_KDEV_T_H
-#if defined(__KERNEL__) || defined(_LVM_H_INCLUDE)
+#ifdef __KERNEL__
 /*
 As a preparation for the introduction of larger device numbers,
 we introduce a type kdev_t to hold them. No information about
@@ -136,7 +136,7 @@
 	return mk_kdev(MAJOR(dev),MINOR(dev));
 }
 
-#else /* __KERNEL__ || _LVM_H_INCLUDE */
+#else /* __KERNEL__ */
 
 /*
 Some programs want their definitions of MAJOR and MINOR and MKDEV
@@ -145,5 +145,5 @@
 #define MAJOR(dev)	((dev)>>8)
 #define MINOR(dev)	((dev) & 0xff)
 #define MKDEV(ma,mi)	((ma)<<8 | (mi))
-#endif /* __KERNEL__ || _LVM_H_INCLUDE */
+#endif /* __KERNEL__ */
 #endif
diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/kobject.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,57 @@
+/*
+ * kobject.h - generic kernel object infrastructure.
+ *
+ */
+
+#ifndef _KOBJECT_H_
+#define _KOBJECT_H_
+
+#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/sysfs.h>
+#include <linux/rwsem.h>
+#include <asm/atomic.h>
+
+struct kobject {
+	char			name[16];
+	atomic_t		refcount;
+	struct list_head	entry;
+	struct kobject		* parent;
+	struct subsystem	* subsys;
+	struct dentry		* dentry;
+};
+
+extern void kobject_init(struct kobject *);
+
+extern int kobject_register(struct kobject *);
+extern void kobject_unregister(struct kobject *);
+
+extern struct kobject * kobject_get(struct kobject *);
+extern void kobject_put(struct kobject *);
+
+
+struct subsystem {
+	struct kobject		kobj;
+	struct list_head	list;
+	struct rw_semaphore	rwsem;
+	struct subsystem	* parent;
+	void (*release)(struct kobject *);
+	struct sysfs_ops	* sysfs_ops;
+	struct attribute	** default_attrs;
+};
+
+extern void subsystem_init(struct subsystem *);
+extern int subsystem_register(struct subsystem *);
+extern void subsystem_unregister(struct subsystem *);
+
+static inline struct subsystem * subsys_get(struct subsystem * s)
+{
+	return container_of(kobject_get(&s->kobj),struct subsystem,kobj);
+}
+
+static inline void subsys_put(struct subsystem * s)
+{
+	kobject_put(&s->kobj);
+}
+
+#endif /* _KOBJECT_H_ */
diff -Nru a/include/linux/list.h b/include/linux/list.h
--- a/include/linux/list.h	Wed Oct 30 16:44:17 2002
+++ b/include/linux/list.h	Wed Oct 30 16:44:17 2002
@@ -1,7 +1,7 @@
 #ifndef _LINUX_LIST_H
 #define _LINUX_LIST_H
 
-#if defined(__KERNEL__) || defined(_LVM_H_INCLUDE)
+#ifdef __KERNEL__
 
 #include <linux/prefetch.h>
 #include <asm/system.h>
@@ -319,6 +319,7 @@
 	for (pos = (head)->next, n = pos->next; pos != (head); \
 		pos = n, ({ read_barrier_depends(); 0;}), n = pos->next)
 
-#endif /* __KERNEL__ || _LVM_H_INCLUDE */
-
+#else
+#warning "don't include kernel headers in userspace"
+#endif /* __KERNEL__ */
 #endif
diff -Nru a/include/linux/loop.h b/include/linux/loop.h
--- a/include/linux/loop.h	Wed Oct 30 16:44:36 2002
+++ b/include/linux/loop.h	Wed Oct 30 16:44:36 2002
@@ -43,6 +43,7 @@
 
 	struct file *	lo_backing_file;
 	struct block_device *lo_device;
+	unsigned	lo_blocksize;
 	void		*key_data; 
 	char		key_reserved[48]; /* for use by the filter modules */
 
diff -Nru a/include/linux/lvm.h b/include/linux/lvm.h
--- a/include/linux/lvm.h	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,710 +0,0 @@
-/*
- * include/linux/lvm.h
- * kernel/lvm.h
- * tools/lib/lvm.h
- *
- * Copyright (C) 1997 - 2000  Heinz Mauelshagen, Sistina Software
- *
- * February-November 1997
- * May-July 1998
- * January-March,July,September,October,Dezember 1999
- * January,February,July,November 2000
- * January 2001
- *
- * lvm 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.
- * 
- * lvm 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 GNU CC; see the file COPYING.  If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA. 
- *
- */
-
-/*
- * Changelog
- *
- *    10/10/1997 - beginning of new structure creation
- *    12/05/1998 - incorporated structures from lvm_v1.h and deleted lvm_v1.h
- *    07/06/1998 - avoided LVM_KMALLOC_MAX define by using vmalloc/vfree
- *                 instead of kmalloc/kfree
- *    01/07/1998 - fixed wrong LVM_MAX_SIZE
- *    07/07/1998 - extended pe_t structure by ios member (for statistic)
- *    02/08/1998 - changes for official char/block major numbers
- *    07/08/1998 - avoided init_module() and cleanup_module() to be static
- *    29/08/1998 - seprated core and disk structure type definitions
- *    01/09/1998 - merged kernel integration version (mike)
- *    20/01/1999 - added LVM_PE_DISK_OFFSET macro for use in
- *                 vg_read_with_pv_and_lv(), pv_move_pe(), pv_show_pe_text()...
- *    18/02/1999 - added definition of time_disk_t structure for;
- *                 keeps time stamps on disk for nonatomic writes (future)
- *    15/03/1999 - corrected LV() and VG() macro definition to use argument
- *                 instead of minor
- *    03/07/1999 - define for genhd.c name handling
- *    23/07/1999 - implemented snapshot part
- *    08/12/1999 - changed LVM_LV_SIZE_MAX macro to reflect current 1TB limit
- *    01/01/2000 - extended lv_v2 core structure by wait_queue member
- *    12/02/2000 - integrated Andrea Arcagnelli's snapshot work
- *    14/02/2001 - changed LVM_SNAPSHOT_MIN_CHUNK to 1 page
- *    18/02/2000 - seperated user and kernel space parts by 
- *                 #ifdef them with __KERNEL__
- *    08/03/2000 - implemented cluster/shared bits for vg_access
- *    26/06/2000 - implemented snapshot persistency and resizing support
- *    02/11/2000 - added hash table size member to lv structure
- *    12/11/2000 - removed unneeded timestamp definitions
- *    24/12/2000 - removed LVM_TO_{CORE,DISK}*, use cpu_{from, to}_le*
- *                 instead - Christoph Hellwig
- *    01/03/2001 - Rename VG_CREATE to VG_CREATE_OLD and add new VG_CREATE
- *    08/03/2001 - new lv_t (in core) version number 5: changed page member
- *                 to (struct kiobuf *) to use for COW exception table io
- *    23/03/2001 - Change a (presumably) mistyped pv_t* to an lv_t*
- *    26/03/2001 - changed lv_v4 to lv_v5 in structure definition [HM]
- *
- */
-
-
-#ifndef _LVM_H_INCLUDE
-#define _LVM_H_INCLUDE
-
-#define LVM_RELEASE_NAME "1.0.1-rc4(ish)"
-#define LVM_RELEASE_DATE "03/10/2001"
-
-#define _LVM_KERNEL_H_VERSION   "LVM "LVM_RELEASE_NAME" ("LVM_RELEASE_DATE")"
-
-#include <linux/version.h>
-
-/*
- * preprocessor definitions
- */
-/* if you like emergency reset code in the driver */
-#define	LVM_TOTAL_RESET
-
-#ifdef __KERNEL__
-#undef LVM_HD_NAME /* display nice names in /proc/partitions */
-
-/* lots of debugging output (see driver source)
-   #define DEBUG_LVM_GET_INFO
-   #define DEBUG
-   #define DEBUG_MAP
-   #define DEBUG_MAP_SIZE
-   #define DEBUG_IOCTL
-   #define DEBUG_READ
-   #define DEBUG_GENDISK
-   #define DEBUG_VG_CREATE
-   #define DEBUG_LVM_BLK_OPEN
-   #define DEBUG_KFREE
- */
-#endif				/* #ifdef __KERNEL__ */
-
-#include <linux/kdev_t.h>
-#include <linux/list.h>
-
-#include <asm/types.h>
-#include <linux/major.h>
-
-#ifdef __KERNEL__
-#include <linux/spinlock.h>
-
-#include <asm/semaphore.h>
-#endif				/* #ifdef __KERNEL__ */
-
-#include <asm/page.h>
-
-#if !defined ( LVM_BLK_MAJOR) || !defined ( LVM_CHAR_MAJOR)
-#error Bad include/linux/major.h - LVM MAJOR undefined
-#endif
-
-#ifdef	BLOCK_SIZE
-#undef	BLOCK_SIZE
-#endif
-
-#ifdef CONFIG_ARCH_S390 
-#define BLOCK_SIZE	4096
-#else
-#define BLOCK_SIZE	1024
-#endif
-
-#ifndef	SECTOR_SIZE
-#define SECTOR_SIZE	512
-#endif
-
-/* structure version */
-#define LVM_STRUCT_VERSION 1
-
-#define	LVM_DIR_PREFIX	"/dev/"
-
-/*
- * i/o protocol version
- *
- * defined here for the driver and defined seperate in the
- * user land tools/lib/liblvm.h
- *
- */
-#define	LVM_DRIVER_IOP_VERSION	        10
-
-#define LVM_NAME        "lvm"
-#define LVM_GLOBAL	"global"
-#define LVM_DIR		"lvm"
-#define LVM_VG_SUBDIR	"VGs"
-#define LVM_LV_SUBDIR	"LVs"
-#define LVM_PV_SUBDIR	"PVs"
-
-/*
- * VG/LV indexing macros
- */
-/* character minor maps directly to volume group */
-#define	VG_CHR(a) ( a)
-
-/* block minor indexes into a volume group/logical volume indirection table */
-#define	VG_BLK(a)	( vg_lv_map[a].vg_number)
-#define LV_BLK(a)	( vg_lv_map[a].lv_number)
-
-/*
- * absolute limits for VGs, PVs per VG and LVs per VG
- */
-#define ABS_MAX_VG	99
-#define ABS_MAX_PV	256
-#define ABS_MAX_LV	256	/* caused by 8 bit minor */
-
-#define MAX_VG  ABS_MAX_VG
-#define MAX_LV	ABS_MAX_LV
-#define	MAX_PV	ABS_MAX_PV
-
-#if ( MAX_VG > ABS_MAX_VG)
-#undef MAX_VG
-#define MAX_VG ABS_MAX_VG
-#endif
-
-#if ( MAX_LV > ABS_MAX_LV)
-#undef MAX_LV
-#define MAX_LV ABS_MAX_LV
-#endif
-
-
-/*
- * LVM_PE_T_MAX corresponds to:
- *
- * 8KB PE size can map a ~512 MB logical volume at the cost of 1MB memory,
- *
- * 128MB PE size can map a 8TB logical volume at the same cost of memory.
- *
- * Default PE size of 4 MB gives a maximum logical volume size of 256 GB.
- *
- * Maximum PE size of 16GB gives a maximum logical volume size of 1024 TB.
- *
- * AFAIK, the actual kernels limit this to 1 TB.
- *
- * Should be a sufficient spectrum ;*)
- */
-
-/* This is the usable size of pe_disk_t.le_num !!!        v     v */
-#define	LVM_PE_T_MAX		( ( 1 << ( sizeof ( uint16_t) * 8)) - 2)
-
-#define	LVM_LV_SIZE_MAX(a)	( ( long long) LVM_PE_T_MAX * (a)->pe_size > ( long long) 1024*1024/SECTOR_SIZE*1024*1024 ? ( long long) 1024*1024/SECTOR_SIZE*1024*1024 : ( long long) LVM_PE_T_MAX * (a)->pe_size)
-#define	LVM_MIN_PE_SIZE		( 8192L / SECTOR_SIZE) /* 8 KB in sectors */
-#define	LVM_MAX_PE_SIZE		( 16L * 1024L * 1024L / SECTOR_SIZE * 1024)	/* 16GB in sectors */
-#define	LVM_DEFAULT_PE_SIZE	( 4096L * 1024 / SECTOR_SIZE)	/* 4 MB in sectors */
-#define	LVM_DEFAULT_STRIPE_SIZE	16L	/* 16 KB  */
-#define	LVM_MIN_STRIPE_SIZE	( PAGE_SIZE/SECTOR_SIZE)	/* PAGESIZE in sectors */
-#define	LVM_MAX_STRIPE_SIZE	( 512L * 1024 / SECTOR_SIZE)	/* 512 KB in sectors */
-#define	LVM_MAX_STRIPES		128	/* max # of stripes */
-#define	LVM_MAX_SIZE            ( 1024LU * 1024 / SECTOR_SIZE * 1024 * 1024)	/* 1TB[sectors] */
-#define	LVM_MAX_MIRRORS    	2	/* future use */
-#define	LVM_MIN_READ_AHEAD	2	/* minimum read ahead sectors */
-#define	LVM_MAX_READ_AHEAD	120	/* maximum read ahead sectors */
-#define	LVM_MAX_LV_IO_TIMEOUT	60	/* seconds I/O timeout (future use) */
-#define	LVM_PARTITION           0xfe	/* LVM partition id */
-#define	LVM_NEW_PARTITION       0x8e	/* new LVM partition id (10/09/1999) */
-#define	LVM_PE_SIZE_PV_SIZE_REL	5	/* max relation PV size and PE size */
-
-#define	LVM_SNAPSHOT_MAX_CHUNK	1024	/* 1024 KB */
-#define	LVM_SNAPSHOT_DEF_CHUNK	64	/* 64  KB */
-#define	LVM_SNAPSHOT_MIN_CHUNK	(PAGE_SIZE/1024)	/* 4 or 8 KB */
-
-#define	UNDEF	-1
-
-/*
- * ioctls
- * FIXME: the last parameter to _IO{W,R,WR} is a data type.  The macro will
- *	  expand this using sizeof(), so putting "1" there is misleading
- *	  because sizeof(1) = sizeof(int) = sizeof(2) = 4 on a 32-bit machine!
- */
-/* volume group */
-#define	VG_CREATE_OLD           _IOW ( 0xfe, 0x00, 1)
-#define	VG_REMOVE               _IOW ( 0xfe, 0x01, 1)
-
-#define	VG_EXTEND               _IOW ( 0xfe, 0x03, 1)
-#define	VG_REDUCE               _IOW ( 0xfe, 0x04, 1)
-
-#define	VG_STATUS               _IOWR ( 0xfe, 0x05, 1)
-#define	VG_STATUS_GET_COUNT     _IOWR ( 0xfe, 0x06, 1)
-#define	VG_STATUS_GET_NAMELIST  _IOWR ( 0xfe, 0x07, 1)
-
-#define	VG_SET_EXTENDABLE       _IOW ( 0xfe, 0x08, 1)
-#define	VG_RENAME		_IOW ( 0xfe, 0x09, 1)
-
-/* Since 0.9beta6 */
-#define	VG_CREATE               _IOW ( 0xfe, 0x0a, 1)
-
-/* logical volume */
-#define	LV_CREATE               _IOW ( 0xfe, 0x20, 1)
-#define	LV_REMOVE               _IOW ( 0xfe, 0x21, 1)
-
-#define	LV_ACTIVATE             _IO ( 0xfe, 0x22)
-#define	LV_DEACTIVATE           _IO ( 0xfe, 0x23)
-
-#define	LV_EXTEND               _IOW ( 0xfe, 0x24, 1)
-#define	LV_REDUCE               _IOW ( 0xfe, 0x25, 1)
-
-#define	LV_STATUS_BYNAME        _IOWR ( 0xfe, 0x26, 1)
-#define	LV_STATUS_BYINDEX       _IOWR ( 0xfe, 0x27, 1)
-
-#define LV_SET_ACCESS           _IOW ( 0xfe, 0x28, 1)
-#define LV_SET_ALLOCATION       _IOW ( 0xfe, 0x29, 1)
-#define LV_SET_STATUS           _IOW ( 0xfe, 0x2a, 1)
-
-#define LE_REMAP                _IOW ( 0xfe, 0x2b, 1)
-
-#define LV_SNAPSHOT_USE_RATE    _IOWR ( 0xfe, 0x2c, 1)
-
-#define	LV_STATUS_BYDEV		_IOWR ( 0xfe, 0x2e, 1)
-
-#define	LV_RENAME		_IOW ( 0xfe, 0x2f, 1)
-
-#define	LV_BMAP			_IOWR ( 0xfe, 0x30, 1)
-
-
-/* physical volume */
-#define	PV_STATUS               _IOWR ( 0xfe, 0x40, 1)
-#define	PV_CHANGE               _IOWR ( 0xfe, 0x41, 1)
-#define	PV_FLUSH                _IOW ( 0xfe, 0x42, 1)
-
-/* physical extent */
-#define	PE_LOCK_UNLOCK          _IOW ( 0xfe, 0x50, 1)
-
-/* i/o protocol version */
-#define	LVM_GET_IOP_VERSION     _IOR ( 0xfe, 0x98, 1)
-
-#ifdef LVM_TOTAL_RESET
-/* special reset function for testing purposes */
-#define	LVM_RESET               _IO ( 0xfe, 0x99)
-#endif
-
-/* lock the logical volume manager */
-#define	LVM_LOCK_LVM            _IO ( 0xfe, 0x100)
-/* END ioctls */
-
-
-/*
- * Status flags
- */
-/* volume group */
-#define	VG_ACTIVE            0x01	/* vg_status */
-#define	VG_EXPORTED          0x02	/*     "     */
-#define	VG_EXTENDABLE        0x04	/*     "     */
-
-#define	VG_READ              0x01	/* vg_access */
-#define	VG_WRITE             0x02	/*     "     */
-#define	VG_CLUSTERED         0x04	/*     "     */
-#define	VG_SHARED            0x08	/*     "     */
-
-/* logical volume */
-#define	LV_ACTIVE            0x01	/* lv_status */
-#define	LV_SPINDOWN          0x02	/*     "     */
-
-#define	LV_READ              0x01	/* lv_access */
-#define	LV_WRITE             0x02	/*     "     */
-#define	LV_SNAPSHOT          0x04	/*     "     */
-#define	LV_SNAPSHOT_ORG      0x08	/*     "     */
-
-#define	LV_BADBLOCK_ON       0x01	/* lv_badblock */
-
-#define	LV_STRICT            0x01	/* lv_allocation */
-#define	LV_CONTIGUOUS        0x02	/*       "       */
-
-/* physical volume */
-#define	PV_ACTIVE            0x01	/* pv_status */
-#define	PV_ALLOCATABLE       0x02	/* pv_allocatable */
-
-
-/* misc */
-#define LVM_SNAPSHOT_DROPPED_SECTOR 1
-
-/*
- * Structure definitions core/disk follow
- *
- * conditional conversion takes place on big endian architectures
- * in functions * pv_copy_*(), vg_copy_*() and lv_copy_*()
- *
- */
-
-#define	NAME_LEN		128	/* don't change!!! */
-#define	UUID_LEN		32	/* don't change!!! */
-
-/* copy on write tables in disk format */
-typedef struct lv_COW_table_disk_v1 {
-	uint64_t pv_org_number;
-	uint64_t pv_org_rsector;
-	uint64_t pv_snap_number;
-	uint64_t pv_snap_rsector;
-} lv_COW_table_disk_t;
-
-/* remap physical sector/rdev pairs including hash */
-typedef struct lv_block_exception_v1 {
-	struct list_head hash;
-	uint32_t rsector_org;
-	kdev_t   rdev_org;
-	uint32_t rsector_new;
-	kdev_t   rdev_new;
-} lv_block_exception_t;
-
-/* disk stored pe information */
-typedef struct {
-	uint16_t lv_num;
-	uint16_t le_num;
-} pe_disk_t;
-
-/* disk stored PV, VG, LV and PE size and offset information */
-typedef struct {
-	uint32_t base;
-	uint32_t size;
-} lvm_disk_data_t;
-
-
-/*
- * physical volume structures
- */
-
-/* core */
-typedef struct pv_v2 {
-	char id[2];		/* Identifier */
-	unsigned short version;	/* HM lvm version */
-	lvm_disk_data_t pv_on_disk;
-	lvm_disk_data_t vg_on_disk;
-	lvm_disk_data_t pv_uuidlist_on_disk;
-	lvm_disk_data_t lv_on_disk;
-	lvm_disk_data_t pe_on_disk;
-	char pv_name[NAME_LEN];
-	char vg_name[NAME_LEN];
-	char system_id[NAME_LEN];	/* for vgexport/vgimport */
-	kdev_t pv_dev;
-	uint pv_number;
-	uint pv_status;
-	uint pv_allocatable;
-	uint pv_size;		/* HM */
-	uint lv_cur;
-	uint pe_size;
-	uint pe_total;
-	uint pe_allocated;
-	uint pe_stale;		/* for future use */
-	pe_disk_t *pe;		/* HM */
-	struct block_device *bd;
-	char pv_uuid[UUID_LEN+1];
-
-#ifndef __KERNEL__
-	uint32_t pe_start;	/* in sectors */
-#endif
-} pv_t;
-
-
-/* disk */
-typedef struct pv_disk_v2 {
-	uint8_t id[2];		/* Identifier */
-	uint16_t version;		/* HM lvm version */
-	lvm_disk_data_t pv_on_disk;
-	lvm_disk_data_t vg_on_disk;
-	lvm_disk_data_t pv_uuidlist_on_disk;
-	lvm_disk_data_t lv_on_disk;
-	lvm_disk_data_t pe_on_disk;
-	uint8_t pv_uuid[NAME_LEN];
-	uint8_t vg_name[NAME_LEN];
-	uint8_t system_id[NAME_LEN];	/* for vgexport/vgimport */
-	uint32_t pv_major;
-	uint32_t pv_number;
-	uint32_t pv_status;
-	uint32_t pv_allocatable;
-	uint32_t pv_size;		/* HM */
-	uint32_t lv_cur;
-	uint32_t pe_size;
-	uint32_t pe_total;
-	uint32_t pe_allocated;
-	
-	/* new in struct version 2 */
-	uint32_t pe_start;	        /* in sectors */
-
-} pv_disk_t;
-
-
-/*
- * Structures for Logical Volume (LV)
- */
-
-/* core PE information */
-typedef struct {
-	kdev_t dev;
-	uint32_t pe;		/* to be changed if > 2TB */
-	uint32_t reads;
-	uint32_t writes;
-} pe_t;
-
-typedef struct {
-	char lv_name[NAME_LEN];
-	kdev_t old_dev;
-	kdev_t new_dev;
-	uint32_t old_pe;
-	uint32_t new_pe;
-} le_remap_req_t;
-
-typedef struct lv_bmap {
-	uint32_t lv_block;
-	dev_t lv_dev;
-} lv_bmap_t;
-
-/*
- * fixme...
- */
-#define LVM_MAX_ATOMIC_IO	512
-#define LVM_MAX_SECTORS		(LVM_MAX_ATOMIC_IO * 2)
-
-/*
- * Structure Logical Volume (LV) Version 3
- */
-
-struct kern_lv_v5;
-struct user_lv_v5;
-typedef struct user_lv_v5 userlv_t;
-#ifdef __KERNEL__
-typedef struct kern_lv_v5 lv_t;
-#else
-typedef struct user_lv_v5 lv_t;
-#endif
-
-struct user_lv_v5 {
-	char lv_name[NAME_LEN];
-	char vg_name[NAME_LEN];
-	uint lv_access;
-	uint lv_status;
-	uint lv_open;		/* HM */
-	kdev_t lv_dev;		/* HM */
-	uint lv_number;		/* HM */
-	uint lv_mirror_copies;	/* for future use */
-	uint lv_recovery;	/*       "        */
-	uint lv_schedule;	/*       "        */
-	uint lv_size;
-	pe_t *lv_current_pe;	/* HM */
-	uint lv_current_le;	/* for future use */
-	uint lv_allocated_le;
-	uint lv_stripes;
-	uint lv_stripesize;
-	uint lv_badblock;	/* for future use */
-	uint lv_allocation;
-	uint lv_io_timeout;	/* for future use */
-	uint lv_read_ahead;
-
-	/* delta to version 1 starts here */
-	lv_t *lv_snapshot_org;
-	lv_t *lv_snapshot_prev;
-	lv_t *lv_snapshot_next;
-	lv_block_exception_t *lv_block_exception;
-	uint lv_remap_ptr;
-	uint lv_remap_end;
-	uint lv_chunk_size;
-	uint lv_snapshot_minor;
-};
-
-struct kern_lv_v5{
-	struct user_lv_v5 u;
-	struct kiobuf *lv_iobuf;
-	sector_t blocks[LVM_MAX_SECTORS];
-	struct kiobuf *lv_COW_table_iobuf;
-	struct rw_semaphore lv_lock;
-	struct list_head *lv_snapshot_hash_table;
-	uint32_t lv_snapshot_hash_table_size;
-	uint32_t lv_snapshot_hash_mask;
-	wait_queue_head_t lv_snapshot_wait;
-	int	lv_snapshot_use_rate;
-	struct vg_v3	*vg;
-	uint lv_allocated_snapshot_le;
-};
-
-/* disk */
-typedef struct lv_disk_v3 {
-	uint8_t lv_name[NAME_LEN];
-	uint8_t vg_name[NAME_LEN];
-	uint32_t lv_access;
-	uint32_t lv_status;
-	uint32_t lv_open;		/* HM */
-	uint32_t lv_dev;		/* HM */
-	uint32_t lv_number;	/* HM */
-	uint32_t lv_mirror_copies;	/* for future use */
-	uint32_t lv_recovery;	/*       "        */
-	uint32_t lv_schedule;	/*       "        */
-	uint32_t lv_size;
-	uint32_t lv_snapshot_minor;/* minor number of original */
-	uint16_t lv_chunk_size;	/* chunk size of snapshot */
-	uint16_t dummy;
-	uint32_t lv_allocated_le;
-	uint32_t lv_stripes;
-	uint32_t lv_stripesize;
-	uint32_t lv_badblock;	/* for future use */
-	uint32_t lv_allocation;
-	uint32_t lv_io_timeout;	/* for future use */
-	uint32_t lv_read_ahead;	/* HM */
-} lv_disk_t;
-
-/*
- * Structure Volume Group (VG) Version 1
- */
-
-/* core */
-typedef struct vg_v3 {
-	char vg_name[NAME_LEN];	/* volume group name */
-	uint vg_number;		/* volume group number */
-	uint vg_access;		/* read/write */
-	uint vg_status;		/* active or not */
-	uint lv_max;		/* maximum logical volumes */
-	uint lv_cur;		/* current logical volumes */
-	uint lv_open;		/* open    logical volumes */
-	uint pv_max;		/* maximum physical volumes */
-	uint pv_cur;		/* current physical volumes FU */
-	uint pv_act;		/* active physical volumes */
-	uint dummy;		/* was obsolete max_pe_per_pv */
-	uint vgda;		/* volume group descriptor arrays FU */
-	uint pe_size;		/* physical extent size in sectors */
-	uint pe_total;		/* total of physical extents */
-	uint pe_allocated;	/* allocated physical extents */
-	uint pvg_total;		/* physical volume groups FU */
-	struct proc_dir_entry *proc;
-	pv_t *pv[ABS_MAX_PV + 1];	/* physical volume struct pointers */
-	lv_t *lv[ABS_MAX_LV + 1];	/* logical  volume struct pointers */
-	char vg_uuid[UUID_LEN+1];	/* volume group UUID */
-#ifdef __KERNEL__
-	struct proc_dir_entry *vg_dir_pde;
-	struct proc_dir_entry *lv_subdir_pde;
-	struct proc_dir_entry *pv_subdir_pde;
-#else
-	char dummy1[200];
-#endif
-} vg_t;
-
-
-/* disk */
-typedef struct vg_disk_v2 {
-	uint8_t vg_uuid[UUID_LEN];	/* volume group UUID */
-	uint8_t vg_name_dummy[NAME_LEN-UUID_LEN];	/* rest of v1 VG name */
-	uint32_t vg_number;	/* volume group number */
-	uint32_t vg_access;	/* read/write */
-	uint32_t vg_status;	/* active or not */
-	uint32_t lv_max;		/* maximum logical volumes */
-	uint32_t lv_cur;		/* current logical volumes */
-	uint32_t lv_open;		/* open    logical volumes */
-	uint32_t pv_max;		/* maximum physical volumes */
-	uint32_t pv_cur;		/* current physical volumes FU */
-	uint32_t pv_act;		/* active physical volumes */
-	uint32_t dummy;
-	uint32_t vgda;		/* volume group descriptor arrays FU */
-	uint32_t pe_size;		/* physical extent size in sectors */
-	uint32_t pe_total;		/* total of physical extents */
-	uint32_t pe_allocated;	/* allocated physical extents */
-	uint32_t pvg_total;	/* physical volume groups FU */
-} vg_disk_t;
-
-
-/*
- * Request structures for ioctls
- */
-
-/* Request structure PV_STATUS_BY_NAME... */
-typedef struct {
-	char pv_name[NAME_LEN];
-	pv_t *pv;
-} pv_status_req_t, pv_change_req_t;
-
-/* Request structure PV_FLUSH */
-typedef struct {
-	char pv_name[NAME_LEN];
-	kdev_t pv_dev;
-} pv_flush_req_t;
-
-
-/* Request structure PE_MOVE */
-typedef struct {
-	enum {
-		LOCK_PE, UNLOCK_PE
-	} lock;
-	struct {
-		kdev_t lv_dev;
-		kdev_t pv_dev;
-		uint32_t pv_offset;
-	} data;
-} pe_lock_req_t;
-
-
-/* Request structure LV_STATUS_BYNAME */
-typedef struct {
-	char lv_name[NAME_LEN];
-	lv_t *lv;
-} lv_status_byname_req_t, lv_req_t;
-
-/* Request structure LV_STATUS_BYINDEX */
-typedef struct {
-	uint32_t lv_index;
-	lv_t *lv;
-	/* Transfer size because user space and kernel space differ */
-	ushort size;
-} lv_status_byindex_req_t;
-
-/* Request structure LV_STATUS_BYDEV... */
-typedef struct {
-	dev_t dev;
-	lv_t *lv;
-} lv_status_bydev_req_t;
-
-
-/* Request structure LV_SNAPSHOT_USE_RATE */
-typedef struct {
-	int	block;
-	int	rate;
-} lv_snapshot_use_rate_req_t;
-
-
-/* useful inlines */
-static inline ulong round_up(ulong n, ulong size) {
-	size--;
-	return (n + size) & ~size;
-}
-
-static inline ulong div_up(ulong n, ulong size) {
-	return round_up(n, size) / size;
-}
-
-static int inline LVM_GET_COW_TABLE_CHUNKS_PER_PE(vg_t *vg, lv_t *lv) {
-	return vg->pe_size / lv->u.lv_chunk_size;
-}
-
-static int inline LVM_GET_COW_TABLE_ENTRIES_PER_PE(vg_t *vg, lv_t *lv) {
-	ulong chunks = vg->pe_size / lv->u.lv_chunk_size;
-	ulong entry_size = sizeof(lv_COW_table_disk_t);
-	ulong chunk_size = lv->u.lv_chunk_size * SECTOR_SIZE;
-	ulong entries = (vg->pe_size * SECTOR_SIZE) /
-		(entry_size + chunk_size);
-
-	if(chunks < 2)
-		return 0;
-
-	for(; entries; entries--)
-		if((div_up(entries * entry_size, chunk_size) + entries) <=
-		   chunks)
-			break;
-
-	return entries;
-}
-
-#endif				/* #ifndef _LVM_H_INCLUDE */
diff -Nru a/include/linux/major.h b/include/linux/major.h
--- a/include/linux/major.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/major.h	Wed Oct 30 16:44:26 2002
@@ -85,8 +85,6 @@
 #define IDE4_MAJOR	56
 #define IDE5_MAJOR	57
 
-#define LVM_BLK_MAJOR	58	/* Logical Volume Manager */
-
 #define SCSI_DISK1_MAJOR	65
 #define SCSI_DISK2_MAJOR	66
 #define SCSI_DISK3_MAJOR	67
@@ -137,8 +135,6 @@
 #define JSFD_MAJOR	99
 
 #define PHONE_MAJOR	100
-
-#define LVM_CHAR_MAJOR	109	/* Logical Volume Manager */
 
 #define RTF_MAJOR	150
 #define RAW_MAJOR	162
diff -Nru a/include/linux/mempool.h b/include/linux/mempool.h
--- a/include/linux/mempool.h	Wed Oct 30 16:44:17 2002
+++ b/include/linux/mempool.h	Wed Oct 30 16:44:17 2002
@@ -27,4 +27,11 @@
 extern void * mempool_alloc(mempool_t *pool, int gfp_mask);
 extern void mempool_free(void *element, mempool_t *pool);
 
+/*
+ * A mempool_alloc_t and mempool_free_t that get the memory from
+ * a slab that is passed in through pool_data.
+ */
+void *mempool_alloc_slab(int gfp_mask, void *pool_data);
+void mempool_free_slab(void *element, void *pool_data);
+
 #endif /* _LINUX_MEMPOOL_H */
diff -Nru a/include/linux/mm.h b/include/linux/mm.h
--- a/include/linux/mm.h	Wed Oct 30 16:44:19 2002
+++ b/include/linux/mm.h	Wed Oct 30 16:44:19 2002
@@ -211,7 +211,6 @@
 #define set_page_count(p,v) 	atomic_set(&(p)->count, v)
 
 extern void FASTCALL(__page_cache_release(struct page *));
-void FASTCALL(__free_pages_ok(struct page *page, unsigned int order));
 
 static inline void put_page(struct page *page)
 {
diff -Nru a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h	Wed Oct 30 16:44:19 2002
+++ b/include/linux/mmzone.h	Wed Oct 30 16:44:19 2002
@@ -9,6 +9,7 @@
 #include <linux/list.h>
 #include <linux/wait.h>
 #include <linux/cache.h>
+#include <linux/threads.h>
 #include <asm/atomic.h>
 #ifdef CONFIG_DISCONTIGMEM
 #include <asm/numnodes.h>
@@ -46,6 +47,18 @@
 #define ZONE_PADDING(name)
 #endif
 
+struct per_cpu_pages {
+	int count;		/* number of pages in the list */
+	int low;		/* low watermark, refill needed */
+	int high;		/* high watermark, emptying needed */
+	int batch;		/* chunk size for buddy add/remove */
+	struct list_head list;	/* the list of pages */
+};
+
+struct per_cpu_pageset {
+	struct per_cpu_pages pcp[2];	/* 0: hot.  1: cold */
+} ____cacheline_aligned_in_smp;
+
 /*
  * On machines where it is needed (eg PCs) we divide physical memory
  * into multiple physical zones. On a PC we have 3 zones:
@@ -106,6 +119,10 @@
 	wait_queue_head_t	* wait_table;
 	unsigned long		wait_table_size;
 	unsigned long		wait_table_bits;
+
+	ZONE_PADDING(_pad3_)
+
+	struct per_cpu_pageset	pageset[NR_CPUS];
 
 	/*
 	 * Discontig memory support fields.
diff -Nru a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
--- a/include/linux/msdos_fs.h	Wed Oct 30 16:44:31 2002
+++ b/include/linux/msdos_fs.h	Wed Oct 30 16:44:31 2002
@@ -235,17 +235,6 @@
 #endif
 }
 
-/* fat/buffer.c */
-extern struct buffer_head *fat_bread(struct super_block *sb, int block);
-extern struct buffer_head *fat_getblk(struct super_block *sb, int block);
-extern void fat_brelse(struct super_block *sb, struct buffer_head *bh);
-extern void fat_mark_buffer_dirty(struct super_block *sb, struct buffer_head *bh);
-extern void fat_set_uptodate(struct super_block *sb, struct buffer_head *bh,
-			     int val);
-extern int fat_is_uptodate(struct super_block *sb, struct buffer_head *bh);
-extern void fat_ll_rw_block(struct super_block *sb, int opr, int nbreq,
-			    struct buffer_head *bh[32]);
-
 /* fat/cache.c */
 extern int fat_access(struct super_block *sb, int nr, int new_value);
 extern int __fat_access(struct super_block *sb, int nr, int new_value);
@@ -273,12 +262,8 @@
 /* fat/file.c */
 extern struct file_operations fat_file_operations;
 extern struct inode_operations fat_file_inode_operations;
-extern ssize_t fat_file_read(struct file *filp, char *buf, size_t count,
-			     loff_t *ppos);
 extern int fat_get_block(struct inode *inode, sector_t iblock,
 			 struct buffer_head *bh_result, int create);
-extern ssize_t fat_file_write(struct file *filp, const char *buf, size_t count,
-			      loff_t *ppos);
 extern void fat_truncate(struct inode *inode);
 
 /* fat/inode.c */
@@ -299,7 +284,6 @@
 
 /* fat/misc.c */
 extern void fat_fs_panic(struct super_block *s, const char *fmt, ...);
-extern int fat_is_binary(char conversion, char *extension);
 extern void lock_fat(struct super_block *sb);
 extern void unlock_fat(struct super_block *sb);
 extern void fat_clusters_flush(struct super_block *sb);
diff -Nru a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
--- a/include/linux/msdos_fs_sb.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/msdos_fs_sb.h	Wed Oct 30 16:44:28 2002
@@ -1,6 +1,5 @@
 #ifndef _MSDOS_FS_SB
 #define _MSDOS_FS_SB
-#include<linux/fat_cvf.h>
 
 /*
  * MS-DOS file system in-core superblock data
@@ -15,7 +14,6 @@
 	char *iocharset;          /* Charset used for filename input/display */
 	unsigned short shortname; /* flags for shortname display/create rule */
 	unsigned char name_check; /* r = relaxed, n = normal, s = strict */
-	unsigned char conversion; /* b = binary, t = text, a = auto */
 	unsigned quiet:1,         /* set = fake successful chmods and chowns */
 		 showexec:1,      /* set = only set x bit for com/exe/bat */
 		 sys_immutable:1, /* set = system files are immutable */
@@ -46,9 +44,7 @@
 	struct fat_mount_options options;
 	struct nls_table *nls_disk;  /* Codepage used on disk */
 	struct nls_table *nls_io;    /* Charset used for input and display */
-	struct cvf_format* cvf_format;
 	void *dir_ops;		     /* Opaque; default directory operations */
-	void *private_data;
 	int dir_per_block;	     /* dir entries per block */
 	int dir_per_block_bits;	     /* log2(dir_per_block) */
 };
diff -Nru a/include/linux/netfilter.h b/include/linux/netfilter.h
--- a/include/linux/netfilter.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/netfilter.h	Wed Oct 30 16:44:28 2002
@@ -117,17 +117,23 @@
 /* This is gross, but inline doesn't cut it for avoiding the function
    call in fast path: gcc doesn't inline (needs value tracking?). --RR */
 #ifdef CONFIG_NETFILTER_DEBUG
-#define NF_HOOK nf_hook_slow
+#define NF_HOOK(pf, hook, skb, indev, outdev, okfn)			\
+ nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN)
+#define NF_HOOK_THRESH nf_hook_slow
 #else
 #define NF_HOOK(pf, hook, skb, indev, outdev, okfn)			\
 (list_empty(&nf_hooks[(pf)][(hook)])					\
  ? (okfn)(skb)								\
- : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn)))
+ : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), INT_MIN))
+#define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh)	\
+(list_empty(&nf_hooks[(pf)][(hook)])					\
+ ? (okfn)(skb)								\
+ : nf_hook_slow((pf), (hook), (skb), (indev), (outdev), (okfn), (thresh)))
 #endif
 
 int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
 		 struct net_device *indev, struct net_device *outdev,
-		 int (*okfn)(struct sk_buff *));
+		 int (*okfn)(struct sk_buff *), int thresh);
 
 /* Call setsockopt() */
 int nf_setsockopt(struct sock *sk, int pf, int optval, char *opt, 
diff -Nru a/include/linux/netfilter_bridge/ebt_ip.h b/include/linux/netfilter_bridge/ebt_ip.h
--- a/include/linux/netfilter_bridge/ebt_ip.h	Wed Oct 30 16:44:30 2002
+++ b/include/linux/netfilter_bridge/ebt_ip.h	Wed Oct 30 16:44:30 2002
@@ -1,3 +1,17 @@
+/*
+ *  ebt_ip
+ *
+ *	Authors:
+ *	Bart De Schuymer <bart.de.schuymer@pandora.be>
+ *
+ *  April, 2002
+ *
+ *  Changes:
+ *    added ip-sport and ip-dport
+ *    Innominate Security Technologies AG <mhopf@innominate.com>
+ *    September, 2002
+ */
+
 #ifndef __LINUX_BRIDGE_EBT_IP_H
 #define __LINUX_BRIDGE_EBT_IP_H
 
@@ -5,7 +19,10 @@
 #define EBT_IP_DEST 0x02
 #define EBT_IP_TOS 0x04
 #define EBT_IP_PROTO 0x08
-#define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO)
+#define EBT_IP_SPORT 0x10
+#define EBT_IP_DPORT 0x20
+#define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\
+ EBT_IP_SPORT | EBT_IP_DPORT )
 #define EBT_IP_MATCH "ip"
 
 // the same values are used for the invflags
@@ -19,6 +36,8 @@
 	uint8_t  protocol;
 	uint8_t  bitmask;
 	uint8_t  invflags;
+	uint16_t sport[2];
+	uint16_t dport[2];
 };
 
 #endif
diff -Nru a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h
--- a/include/linux/netfilter_bridge/ebtables.h	Wed Oct 30 16:44:34 2002
+++ b/include/linux/netfilter_bridge/ebtables.h	Wed Oct 30 16:44:34 2002
@@ -20,19 +20,6 @@
 #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN
 #define EBT_FUNCTION_MAXNAMELEN EBT_TABLE_MAXNAMELEN
 
-// [gs]etsockopt numbers
-#define EBT_BASE_CTL            128
-
-#define EBT_SO_SET_ENTRIES      (EBT_BASE_CTL)
-#define EBT_SO_SET_COUNTERS     (EBT_SO_SET_ENTRIES+1)
-#define EBT_SO_SET_MAX          (EBT_SO_SET_COUNTERS+1)
-
-#define EBT_SO_GET_INFO         (EBT_BASE_CTL)
-#define EBT_SO_GET_ENTRIES      (EBT_SO_GET_INFO+1)
-#define EBT_SO_GET_INIT_INFO    (EBT_SO_GET_ENTRIES+1)
-#define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO+1)
-#define EBT_SO_GET_MAX          (EBT_SO_GET_INIT_ENTRIES+1)
-
 // verdicts >0 are "branches"
 #define EBT_ACCEPT   -1
 #define EBT_DROP     -2
@@ -40,13 +27,10 @@
 #define EBT_RETURN   -4
 #define NUM_STANDARD_TARGETS   4
 
-// return values for match() functions
-#define EBT_MATCH 0
-#define EBT_NOMATCH 1
-
 struct ebt_counter
 {
 	uint64_t pcnt;
+	uint64_t bcnt;
 };
 
 struct ebt_entries {
@@ -178,7 +162,24 @@
 	char *entries;
 };
 
+// [gs]etsockopt numbers
+#define EBT_BASE_CTL            128
+
+#define EBT_SO_SET_ENTRIES      (EBT_BASE_CTL)
+#define EBT_SO_SET_COUNTERS     (EBT_SO_SET_ENTRIES+1)
+#define EBT_SO_SET_MAX          (EBT_SO_SET_COUNTERS+1)
+
+#define EBT_SO_GET_INFO         (EBT_BASE_CTL)
+#define EBT_SO_GET_ENTRIES      (EBT_SO_GET_INFO+1)
+#define EBT_SO_GET_INIT_INFO    (EBT_SO_GET_ENTRIES+1)
+#define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO+1)
+#define EBT_SO_GET_MAX          (EBT_SO_GET_INIT_ENTRIES+1)
+
 #ifdef __KERNEL__
+
+// return values for match() functions
+#define EBT_MATCH 0
+#define EBT_NOMATCH 1
 
 struct ebt_match
 {
diff -Nru a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
--- a/include/linux/netfilter_bridge.h	Wed Oct 30 16:44:29 2002
+++ b/include/linux/netfilter_bridge.h	Wed Oct 30 16:44:29 2002
@@ -6,6 +6,7 @@
 
 #include <linux/config.h>
 #include <linux/netfilter.h>
+#include <asm/atomic.h>
 
 /* Bridge Hooks */
 /* After promisc drops, checksum checks. */
@@ -22,14 +23,39 @@
 #define NF_BR_BROUTING		5
 #define NF_BR_NUMHOOKS		6
 
+#define BRNF_PKT_TYPE			0x01
+#define BRNF_BRIDGED_DNAT		0x02
+#define BRNF_DONT_TAKE_PARENT		0x04
+
 enum nf_br_hook_priorities {
 	NF_BR_PRI_FIRST = INT_MIN,
-	NF_BR_PRI_FILTER_BRIDGED = -200,
-	NF_BR_PRI_FILTER_OTHER = 200,
 	NF_BR_PRI_NAT_DST_BRIDGED = -300,
+	NF_BR_PRI_FILTER_BRIDGED = -200,
+	NF_BR_PRI_BRNF = 0,
 	NF_BR_PRI_NAT_DST_OTHER = 100,
+	NF_BR_PRI_FILTER_OTHER = 200,
 	NF_BR_PRI_NAT_SRC = 300,
 	NF_BR_PRI_LAST = INT_MAX,
+};
+
+static inline
+struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb)
+{
+	struct nf_bridge_info **nf_bridge = &(skb->nf_bridge);
+
+	if ((*nf_bridge = kmalloc(sizeof(**nf_bridge), GFP_ATOMIC)) != NULL) {
+		atomic_set(&(*nf_bridge)->use, 1);
+		(*nf_bridge)->mask = 0;
+		(*nf_bridge)->physindev = (*nf_bridge)->physoutdev = NULL;
+	}
+
+	return *nf_bridge;
+}
+
+struct bridge_skb_cb {
+	union {
+		__u32 ipv4;
+	} daddr;
 };
 
 #endif
diff -Nru a/include/linux/netfilter_ipv4/ipt_physdev.h b/include/linux/netfilter_ipv4/ipt_physdev.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/netfilter_ipv4/ipt_physdev.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,19 @@
+#ifndef _IPT_PHYSDEV_H
+#define _IPT_PHYSDEV_H
+
+#ifdef __KERNEL__
+#include <linux/if.h>
+#endif
+
+#define IPT_PHYSDEV_OP_MATCH_IN 0x01
+#define IPT_PHYSDEV_OP_MATCH_OUT 0x02
+
+struct ipt_physdev_info {
+	u_int8_t invert;
+	char physindev[IFNAMSIZ];
+	char in_mask[IFNAMSIZ];
+	char physoutdev[IFNAMSIZ];
+	char out_mask[IFNAMSIZ];
+};
+
+#endif /*_IPT_PHYSDEV_H*/
diff -Nru a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h
--- a/include/linux/netfilter_ipv4.h	Wed Oct 30 16:44:32 2002
+++ b/include/linux/netfilter_ipv4.h	Wed Oct 30 16:44:32 2002
@@ -52,8 +52,10 @@
 enum nf_ip_hook_priorities {
 	NF_IP_PRI_FIRST = INT_MIN,
 	NF_IP_PRI_CONNTRACK = -200,
+	NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
 	NF_IP_PRI_MANGLE = -150,
 	NF_IP_PRI_NAT_DST = -100,
+	NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
 	NF_IP_PRI_FILTER = 0,
 	NF_IP_PRI_NAT_SRC = 100,
 	NF_IP_PRI_LAST = INT_MAX,
diff -Nru a/include/linux/netlink.h b/include/linux/netlink.h
--- a/include/linux/netlink.h	Wed Oct 30 16:44:32 2002
+++ b/include/linux/netlink.h	Wed Oct 30 16:44:32 2002
@@ -162,6 +162,10 @@
 			      int (*done)(struct netlink_callback*));
 
 
+#define NL_NONROOT_RECV 0x1
+#define NL_NONROOT_SEND 0x2
+extern void netlink_set_nonroot(int protocol, unsigned flag);
+
 #endif /* __KERNEL__ */
 
 #endif	/* __LINUX_NETLINK_H */
diff -Nru a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h
--- a/include/linux/nfsd/cache.h	Wed Oct 30 16:44:19 2002
+++ b/include/linux/nfsd/cache.h	Wed Oct 30 16:44:19 2002
@@ -32,12 +32,12 @@
 	u32			c_vers;
 	unsigned long		c_timestamp;
 	union {
-		struct svc_buf	u_buffer;
+		struct iovec	u_vec;
 		u32		u_status;
 	}			c_u;
 };
 
-#define c_replbuf		c_u.u_buffer
+#define c_replvec		c_u.u_vec
 #define c_replstat		c_u.u_status
 
 /* cache entry states */
diff -Nru a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
--- a/include/linux/nfsd/export.h	Wed Oct 30 16:44:29 2002
+++ b/include/linux/nfsd/export.h	Wed Oct 30 16:44:29 2002
@@ -83,6 +83,7 @@
  */
 void			nfsd_export_init(void);
 void			nfsd_export_shutdown(void);
+void			nfsd_export_flush(void);
 void			exp_readlock(void);
 void			exp_readunlock(void);
 struct svc_expkey *	exp_find_key(struct auth_domain *clp, 
diff -Nru a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
--- a/include/linux/nfsd/nfsd.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/nfsd/nfsd.h	Wed Oct 30 16:44:28 2002
@@ -48,16 +48,7 @@
  * Callback function for readdir
  */
 struct readdir_cd {
-	struct svc_rqst *	rqstp;
-	struct svc_fh *		dirfh;
-	u32 *			buffer;
-	int			buflen;
-	u32 *			offset;		/* previous dirent->d_next */
-	char			plus;		/* readdirplus */
-	char			eob;		/* end of buffer */
-	char			dotonly;
-	int			nfserr;		/* v4 only */
-	u32			bmval[2];	/* v4 only */
+	int			err;	/* 0, nfserr, or nfserr_eof */
 };
 typedef int		(*encode_dent_fn)(struct readdir_cd *, const char *,
 						int, loff_t, ino_t, unsigned int);
@@ -97,9 +88,9 @@
 				int, struct file *);
 void		nfsd_close(struct file *);
 int		nfsd_read(struct svc_rqst *, struct svc_fh *,
-				loff_t, char *, unsigned long *);
+				loff_t, struct iovec *,int, unsigned long *);
 int		nfsd_write(struct svc_rqst *, struct svc_fh *,
-				loff_t, char *, unsigned long, int *);
+				loff_t, struct iovec *,int, unsigned long, int *);
 int		nfsd_readlink(struct svc_rqst *, struct svc_fh *,
 				char *, int *);
 int		nfsd_symlink(struct svc_rqst *, struct svc_fh *,
@@ -117,9 +108,7 @@
 int		nfsd_truncate(struct svc_rqst *, struct svc_fh *,
 				unsigned long size);
 int		nfsd_readdir(struct svc_rqst *, struct svc_fh *,
-				loff_t, encode_dent_fn,
-				u32 *buffer, int *countp, u32 *verf,
-				u32 *bmval);
+			     loff_t *, struct readdir_cd *, encode_dent_fn);
 int		nfsd_statfs(struct svc_rqst *, struct svc_fh *,
 				struct statfs *);
 
@@ -180,10 +169,13 @@
 #define	nfserr_readdir_nospc	__constant_htonl(NFSERR_READDIR_NOSPC)
 #define	nfserr_bad_xdr		__constant_htonl(NFSERR_BAD_XDR)
 
-/* error code for internal use - if a request fails due to
- * kmalloc failure, it gets dropped.  Client should resend eventually
+/* error codes for internal use */
+/* if a request fails due to kmalloc failure, it gets dropped.
+ *  Client should resend eventually
  */
 #define	nfserr_dropit		__constant_htonl(30000)
+/* end-of-file indicator in readdir */
+#define	nfserr_eof		__constant_htonl(30001)
 
 /* Check for dir entries '.' and '..' */
 #define isdotent(n, l)	(l < 3 && n[0] == '.' && (l == 1 || n[1] == '.'))
diff -Nru a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
--- a/include/linux/nfsd/nfsfh.h	Wed Oct 30 16:44:29 2002
+++ b/include/linux/nfsd/nfsfh.h	Wed Oct 30 16:44:29 2002
@@ -127,21 +127,6 @@
  * The high 16 bits contain the rest (4 bits major
  * and 12 bits minor),
  */
-static inline __u32 kdev_t_to_u32(kdev_t dev)
-{
-	unsigned int minor = minor(dev);
-	unsigned int major = major(dev);
-	__u32 udev;
-
-	/* Create the low 16 bits.. */
-	udev = ((major & 0xff) << 8) + (minor & 0xff);
-
-	/* ..and then the rest. */
-	major >>= 8; minor >>= 8;
-	udev |= (major << 28) | (minor << 16);
-
-	return udev;
-}
 
 static inline dev_t u32_to_dev_t(__u32 udev)
 {
@@ -191,7 +176,7 @@
 	__u64			fh_post_size;	/* i_size */
 	unsigned long		fh_post_blocks; /* i_blocks */
 	unsigned long		fh_post_blksize;/* i_blksize */
-	kdev_t			fh_post_rdev;	/* i_rdev */
+	__u32			fh_post_rdev[2];/* i_rdev */
 	time_t			fh_post_atime;	/* i_atime */
 	time_t			fh_post_mtime;	/* i_mtime */
 	time_t			fh_post_ctime;	/* i_ctime */
@@ -309,7 +294,8 @@
 		/* how much do we care for accuracy with MinixFS? */
 		fhp->fh_post_blocks     = (inode->i_size+511) >> 9;
 	}
-	fhp->fh_post_rdev       = inode->i_rdev;
+	fhp->fh_post_rdev[0]    = htonl((u32)major(inode->i_rdev));
+	fhp->fh_post_rdev[1]    = htonl((u32)minor(inode->i_rdev));
 	fhp->fh_post_atime      = inode->i_atime;
 	fhp->fh_post_mtime      = inode->i_mtime;
 	fhp->fh_post_ctime      = inode->i_ctime;
diff -Nru a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h
--- a/include/linux/nfsd/xdr.h	Wed Oct 30 16:44:31 2002
+++ b/include/linux/nfsd/xdr.h	Wed Oct 30 16:44:31 2002
@@ -29,16 +29,16 @@
 	struct svc_fh		fh;
 	__u32			offset;
 	__u32			count;
-	__u32			totalsize;
+	struct iovec		vec[RPCSVC_MAXPAGES];
+	int			vlen;
 };
 
 struct nfsd_writeargs {
 	svc_fh			fh;
-	__u32			beginoffset;
 	__u32			offset;
-	__u32			totalcount;
-	__u8 *			data;
 	int			len;
+	struct iovec		vec[RPCSVC_MAXPAGES];
+	int			vlen;
 };
 
 struct nfsd_createargs {
@@ -98,6 +98,11 @@
 
 struct nfsd_readdirres {
 	int			count;
+
+	struct readdir_cd	common;
+	u32 *			buffer;
+	int			buflen;
+	u32 *			offset;
 };
 
 struct nfsd_statfsres {
diff -Nru a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h
--- a/include/linux/nfsd/xdr3.h	Wed Oct 30 16:44:27 2002
+++ b/include/linux/nfsd/xdr3.h	Wed Oct 30 16:44:27 2002
@@ -33,6 +33,8 @@
 	struct svc_fh		fh;
 	__u64			offset;
 	__u32			count;
+	struct iovec		vec[RPCSVC_MAXPAGES];
+	int			vlen;
 };
 
 struct nfsd3_writeargs {
@@ -40,8 +42,9 @@
 	__u64			offset;
 	__u32			count;
 	int			stable;
-	__u8 *			data;
 	int			len;
+	struct iovec		vec[RPCSVC_MAXPAGES];
+	int			vlen;
 };
 
 struct nfsd3_createargs {
@@ -156,6 +159,13 @@
 	struct svc_fh		fh;
 	int			count;
 	__u32			verf[2];
+
+	struct readdir_cd	common;
+	u32 *			buffer;
+	int			buflen;
+	u32 *			offset;
+	struct svc_rqst *	rqstp;
+
 };
 
 struct nfsd3_fsstatres {
diff -Nru a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
--- a/include/linux/nfsd/xdr4.h	Wed Oct 30 16:44:24 2002
+++ b/include/linux/nfsd/xdr4.h	Wed Oct 30 16:44:24 2002
@@ -185,6 +185,11 @@
 	u32		rd_bmval[2];        /* request */
 	struct svc_rqst *rd_rqstp;          /* response */
 	struct svc_fh * rd_fhp;             /* response */
+
+	struct readdir_cd	common;
+	u32 *			buffer;
+	int			buflen;
+	u32 *			offset;
 };
 
 struct nfsd4_readlink {
diff -Nru a/include/linux/notifier.h b/include/linux/notifier.h
--- a/include/linux/notifier.h	Wed Oct 30 16:44:20 2002
+++ b/include/linux/notifier.h	Wed Oct 30 16:44:20 2002
@@ -60,7 +60,11 @@
 
 #define NETLINK_URELEASE	0x0001	/* Unicast netlink socket released */
 
-#define CPU_ONLINE	0x0002 /* CPU (unsigned)v coming up */
+#define CPU_ONLINE	0x0002 /* CPU (unsigned)v is up */
+#define CPU_UP_PREPARE	0x0003 /* CPU (unsigned)v coming up */
+#define CPU_UP_CANCELED	0x0004 /* CPU (unsigned)v NOT coming up */
+#define CPU_OFFLINE	0x0005 /* CPU (unsigned)v offline (still scheduling) */
+#define CPU_DEAD	0x0006 /* CPU (unsigned)v dead */
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_NOTIFIER_H */
diff -Nru a/include/linux/page-flags.h b/include/linux/page-flags.h
--- a/include/linux/page-flags.h	Wed Oct 30 16:44:30 2002
+++ b/include/linux/page-flags.h	Wed Oct 30 16:44:30 2002
@@ -5,6 +5,8 @@
 #ifndef PAGE_FLAGS_H
 #define PAGE_FLAGS_H
 
+#include <linux/percpu.h>
+
 /*
  * Various page->flags bits:
  *
@@ -73,7 +75,7 @@
  * Global page accounting.  One instance per CPU.  Only unsigned longs are
  * allowed.
  */
-extern struct page_state {
+struct page_state {
 	unsigned long nr_dirty;
 	unsigned long nr_writeback;
 	unsigned long nr_pagecache;
@@ -103,7 +105,9 @@
 	unsigned long kswapd_steal;
 	unsigned long pageoutrun;
 	unsigned long allocstall;
-} ____cacheline_aligned_in_smp page_states[NR_CPUS];
+};
+
+DECLARE_PER_CPU(struct page_state, page_states);
 
 extern void get_page_state(struct page_state *ret);
 extern void get_full_page_state(struct page_state *ret);
@@ -111,7 +115,7 @@
 #define mod_page_state(member, delta)					\
 	do {								\
 		int cpu = get_cpu();					\
-		page_states[cpu].member += (delta);			\
+		per_cpu(page_states, cpu).member += (delta);		\
 		put_cpu();						\
 	} while (0)
 
diff -Nru a/include/linux/pagemap.h b/include/linux/pagemap.h
--- a/include/linux/pagemap.h	Wed Oct 30 16:44:19 2002
+++ b/include/linux/pagemap.h	Wed Oct 30 16:44:19 2002
@@ -24,11 +24,16 @@
 
 #define page_cache_get(page)		get_page(page)
 #define page_cache_release(page)	put_page(page)
-void release_pages(struct page **pages, int nr);
+void release_pages(struct page **pages, int nr, int cold);
 
 static inline struct page *page_cache_alloc(struct address_space *x)
 {
 	return alloc_pages(x->gfp_mask, 0);
+}
+
+static inline struct page *page_cache_alloc_cold(struct address_space *x)
+{
+	return alloc_pages(x->gfp_mask|__GFP_COLD, 0);
 }
 
 typedef int filler_t(void *, struct page *);
diff -Nru a/include/linux/pagevec.h b/include/linux/pagevec.h
--- a/include/linux/pagevec.h	Wed Oct 30 16:44:35 2002
+++ b/include/linux/pagevec.h	Wed Oct 30 16:44:35 2002
@@ -12,6 +12,7 @@
 
 struct pagevec {
 	unsigned nr;
+	int cold;
 	struct page *pages[PAGEVEC_SIZE];
 };
 
@@ -25,7 +26,13 @@
 unsigned int pagevec_lookup(struct pagevec *pvec, struct address_space *mapping,
 		pgoff_t start, unsigned int nr_pages);
 
-static inline void pagevec_init(struct pagevec *pvec)
+static inline void pagevec_init(struct pagevec *pvec, int cold)
+{
+	pvec->nr = 0;
+	pvec->cold = cold;
+}
+
+static inline void pagevec_reinit(struct pagevec *pvec)
 {
 	pvec->nr = 0;
 }
@@ -48,6 +55,7 @@
 	pvec->pages[pvec->nr++] = page;
 	return pagevec_space(pvec);
 }
+
 
 static inline void pagevec_release(struct pagevec *pvec)
 {
diff -Nru a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/pfkeyv2.h	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,287 @@
+/* PF_KEY user interface, this is defined by rfc2367 so
+ * do not make arbitrary modifications or else this header
+ * file will not be compliant.
+ */
+
+#ifndef _LINUX_PFKEY2_H
+#define _LINUX_PFKEY2_H
+
+#include <linux/types.h>
+
+#define PF_KEY_V2		2
+#define PFKEYV2_REVISION	199806L
+
+struct sadb_msg {
+	uint8_t		sadb_msg_version;
+	uint8_t		sadb_msg_type;
+	uint8_t		sadb_msg_errno;
+	uint8_t		sadb_msg_satype;
+	uint16_t	sadb_msg_len;
+	uint16_t	sadb_msg_reserved;
+	uint32_t	sadb_msg_seq;
+	uint32_t	sadb_msg_pid;
+} __attribute__((packed));
+/* sizeof(struct sadb_msg) == 16 */
+
+struct sadb_ext {
+	uint16_t	sadb_ext_len;
+	uint16_t	sadb_ext_type;
+} __attribute__((packed));
+/* sizeof(struct sadb_ext) == 4 */
+
+struct sadb_sa {
+	uint16_t	sadb_sa_len;
+	uint16_t	sadb_sa_exttype;
+	uint32_t	sadb_sa_spi;
+	uint8_t		sadb_sa_replay;
+	uint8_t		sadb_sa_state;
+	uint8_t		sadb_sa_auth;
+	uint8_t		sadb_sa_encrypt;
+	uint32_t	sadb_sa_flags;
+} __attribute__((packed));
+/* sizeof(struct sadb_sa) == 16 */
+
+struct sadb_lifetime {
+	uint16_t	sadb_lifetime_len;
+	uint16_t	sadb_lifetime_exttype;
+	uint32_t	sadb_lifetime_allocations;
+	uint64_t	sadb_lifetime_bytes;
+	uint64_t	sadb_lifetime_addtime;
+	uint64_t	sadb_lifetime_usetime;
+} __attribute__((packed));
+/* sizeof(struct sadb_lifetime) == 32 */
+
+struct sadb_address {
+	uint16_t	sadb_address_len;
+	uint16_t	sadb_address_exttype;
+	uint8_t		sadb_address_proto;
+	uint8_t		sadb_address_prefixlen;
+	uint16_t	sadb_address_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_address) == 8 */
+
+struct sadb_key {
+	uint16_t	sadb_key_len;
+	uint16_t	sadb_key_exttype;
+	uint16_t	sadb_key_bits;
+	uint16_t	sadb_key_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_key) == 8 */
+
+struct sadb_ident {
+	uint16_t	sadb_ident_len;
+	uint16_t	sadb_ident_exttype;
+	uint16_t	sadb_ident_type;
+	uint16_t	sadb_ident_reserved;
+	uint64_t	sadb_ident_id;
+} __attribute__((packed));
+/* sizeof(struct sadb_ident) == 16 */
+
+struct sadb_sens {
+	uint16_t	sadb_sens_len;
+	uint16_t	sadb_sens_exttype;
+	uint32_t	sadb_sens_dpd;
+	uint8_t		sadb_sens_sens_level;
+	uint8_t		sadb_sens_sens_len;
+	uint8_t		sadb_sens_integ_level;
+	uint8_t		sadb_sens_integ_len;
+	uint32_t	sadb_sens_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_sens) == 16 */
+
+/* followed by:
+	uint64_t	sadb_sens_bitmap[sens_len];
+	uint64_t	sadb_integ_bitmap[integ_len];  */
+
+struct sadb_prop {
+	uint16_t	sadb_prop_len;
+	uint16_t	sadb_prop_exttype;
+	uint8_t		sadb_prop_replay;
+	uint8_t		sadb_prop_reserved[3];
+} __attribute__((packed));
+/* sizeof(struct sadb_prop) == 8 */
+
+/* followed by:
+	struct sadb_comb sadb_combs[(sadb_prop_len +
+		sizeof(uint64_t) - sizeof(struct sadb_prop)) /
+		sizeof(strut sadb_comb)]; */
+
+struct sadb_comb {
+	uint8_t		sadb_comb_auth;
+	uint8_t		sadb_comb_encrypt;
+	uint16_t	sadb_comb_flags;
+	uint16_t	sadb_comb_auth_minbits;
+	uint16_t	sadb_comb_auth_maxbits;
+	uint16_t	sadb_comb_encrypt_minbits;
+	uint16_t	sadb_comb_encrypt_maxbits;
+	uint32_t	sadb_comb_reserved;
+	uint32_t	sadb_comb_soft_allocations;
+	uint32_t	sadb_comb_hard_allocations;
+	uint64_t	sadb_comb_soft_bytes;
+	uint64_t	sadb_comb_hard_bytes;
+	uint64_t	sadb_comb_soft_addtime;
+	uint64_t	sadb_comb_hard_addtime;
+	uint64_t	sadb_comb_soft_usetime;
+	uint64_t	sadb_comb_hard_usetime;
+} __attribute__((packed));
+/* sizeof(struct sadb_comb) == 72 */
+
+struct sadb_supported {
+	uint16_t	sadb_supported_len;
+	uint16_t	sadb_supported_exttype;
+	uint32_t	sadb_supported_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_supported) == 8 */
+
+/* followed by:
+	struct sadb_alg sadb_algs[(sadb_supported_len +
+		sizeof(uint64_t) - sizeof(struct sadb_supported)) /
+		sizeof(struct sadb_alg)]; */
+
+struct sadb_alg {
+	uint8_t		sadb_alg_id;
+	uint8_t		sadb_alg_ivlen;
+	uint16_t	sadb_alg_minbits;
+	uint16_t	sadb_alg_maxbits;
+	uint16_t	sadb_alg_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_alg) == 8 */
+
+struct sadb_spirange {
+	uint16_t	sadb_spirange_len;
+	uint16_t	sadb_spirange_exttype;
+	uint32_t	sadb_spirange_min;
+	uint32_t	sadb_spirange_max;
+	uint32_t	sadb_spirange_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_spirange) == 16 */
+
+struct sadb_x_kmprivate {
+	uint16_t	sadb_x_kmprivate_len;
+	uint16_t	sadb_x_kmprivate_exttype;
+	u_int32_t	sadb_x_kmprivate_reserved;
+} __attribute__((packed));
+/* sizeof(struct sadb_x_kmprivate) == 8 */
+
+struct sadb_x_sa2 {
+	uint16_t	sadb_x_sa2_len;
+	uint16_t	sadb_x_sa2_exttype;
+	uint8_t		sadb_x_sa2_mode;
+	uint8_t		sadb_x_sa2_reserved1;
+	uint16_t	sadb_x_sa2_reserved2;
+	uint32_t	sadb_x_sa2_sequence;
+	uint32_t	sadb_x_sa2_reqid;
+} __attribute__((packed));
+/* sizeof(struct sadb_x_sa2) == 16 */
+
+struct sadb_x_policy {
+	uint16_t	sadb_x_policy_len;
+	uint16_t	sadb_x_policy_exttype;
+	uint16_t	sadb_x_policy_type;
+	uint8_t		sadb_x_policy_dir;
+	uint8_t		sadb_x_policy_reserved;
+	uint32_t	sadb_x_policy_id;
+	uint32_t	sadb_x_policy_reserved2;
+} __attribute__((packed));
+/* sizeof(struct sadb_x_policy) == 16 */
+
+struct sadb_x_ipsecrequest {
+	uint16_t	sadb_x_ipsecrequest_len;
+	uint16_t	sadb_x_ipsecrequest_exttype;
+	uint8_t		sadb_x_ipsecrequest_mode;
+	uint8_t		sadb_x_ipsecrequest_level;
+	uint16_t	sadb_x_ipsecrequest_reqid;
+} __attribute__((packed));
+/* sizeof(struct sadb_x_ipsecrequest) == 16 */
+
+/* Message types */
+#define SADB_RESERVED		0
+#define SADB_GETSPI		1
+#define SADB_UPDATE		2
+#define SADB_ADD		3
+#define SADB_DELETE		4
+#define SADB_GET		5
+#define SADB_ACQUIRE		6
+#define SADB_REGISTER		7
+#define SADB_EXPIRE		8
+#define SADB_FLUSH		9
+#define SADB_DUMP		10
+#define SADB_X_PROMISC		11
+#define SADB_X_PCHANGE		12
+#define SADB_X_SPDUPDATE	13
+#define SADB_X_SPDADD		14
+#define SADB_X_SPDDELETE	15
+#define SADB_X_SPDGET		16
+#define SADB_X_SPDACQUIRE	17
+#define SADB_X_SPDDUMP		18
+#define SADB_X_SPDFLUSH		19
+#define SADB_X_SPDSETIDX	20
+#define SADB_X_SPDEXPIRE	21
+#define SADB_X_SPDDELETE2	22
+#define SADB_MAX		22
+
+/* Security Association flags */
+#define SADB_SAFLAGS_PFS	1
+
+/* Security Association states */
+#define SADB_SASTATE_LARVAL	0
+#define SADB_SASTATE_MATURE	1
+#define SADB_SASTATE_DYING	2
+#define SADB_SASTATE_DEAD	3
+#define SADB_SASTATE_MAX	3
+
+/* Security Association types */
+#define SADB_SATYPE_UNSPEC	0
+#define SADB_SATYPE_AH		2
+#define SADB_SATYPE_ESP		3
+#define SADB_SATYPE_RSVP	5
+#define SADB_SATYPE_OSPFV2	6
+#define SADB_SATYPE_RIPV2	7
+#define SADB_SATYPE_MIP		8
+#define SADB_X_SATYPE_IPCOMP	9
+#define SADB_SATYPE_MAX		9
+
+/* Authentication algorithms */
+#define SADB_AALG_NONE		0
+#define SADB_AALG_MD5HMAC	2
+#define SADB_AALG_SHA1HMAC	3
+#define SADB_AALG_MAX		3
+
+/* Encryption algorithms */
+#define SADB_EALG_NONE		0
+#define SADB_EALG_DESCBC	2
+#define SADB_EALG_3DESCBC	3
+#define SADB_EALG_NULL		11
+#define SADB_EALG_MAX		11
+
+/* Extension Header values */
+#define SADB_EXT_RESERVED		0
+#define SADB_EXT_SA			1
+#define SADB_EXT_LIFETIME_CURRENT	2
+#define SADB_EXT_LIFETIME_HARD		3
+#define SADB_EXT_LIFETIME_SOFT		4
+#define SADB_EXT_ADDRESS_SRC		5
+#define SADB_EXT_ADDRESS_DST		6
+#define SADB_EXT_ADDRESS_PROXY		7
+#define SADB_EXT_KEY_AUTH		8
+#define SADB_EXT_KEY_ENCRYPT		9
+#define SADB_EXT_IDENTITY_SRC		10
+#define SADB_EXT_IDENTITY_DST		11
+#define SADB_EXT_SENSITIVITY		12
+#define SADB_EXT_PROPOSAL		13
+#define SADB_EXT_SUPPORTED_AUTH		14
+#define SADB_EXT_SUPPORTED_ENCRYPT	15
+#define SADB_EXT_SPIRANGE		16
+#define SADB_X_EXT_KMPRIVATE		17
+#define SADB_X_EXT_POLICY		18
+#define SADB_X_EXT_SA2			19
+#define SADB_EXT_MAX			19
+
+/* Identity Extension values */
+#define SADB_IDENTTYPE_RESERVED	0
+#define SADB_IDENTTYPE_PREFIX	1
+#define SADB_IDENTTYPE_FQDN	2
+#define SADB_IDENTTYPE_USERFQDN	3
+#define SADB_IDENTTYPE_MAX	3
+
+#endif /* !(_LINUX_PFKEY2_H) */
diff -Nru a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
--- a/include/linux/pipe_fs_i.h	Wed Oct 30 16:44:30 2002
+++ b/include/linux/pipe_fs_i.h	Wed Oct 30 16:44:30 2002
@@ -12,6 +12,8 @@
 	unsigned int waiting_writers;
 	unsigned int r_counter;
 	unsigned int w_counter;
+	struct file *rdfile;
+	struct file *wrfile;
 	struct fasync_struct *fasync_readers;
 	struct fasync_struct *fasync_writers;
 };
@@ -30,6 +32,8 @@
 #define PIPE_WAITING_WRITERS(inode)	((inode).i_pipe->waiting_writers)
 #define PIPE_RCOUNTER(inode)	((inode).i_pipe->r_counter)
 #define PIPE_WCOUNTER(inode)	((inode).i_pipe->w_counter)
+#define PIPE_READFILE(inode)	((inode).i_pipe->rdfile)
+#define PIPE_WRITEFILE(inode)	((inode).i_pipe->wrfile)
 #define PIPE_FASYNC_READERS(inode)     (&((inode).i_pipe->fasync_readers))
 #define PIPE_FASYNC_WRITERS(inode)     (&((inode).i_pipe->fasync_writers))
 
diff -Nru a/include/linux/pnp.h b/include/linux/pnp.h
--- a/include/linux/pnp.h	Wed Oct 30 16:44:34 2002
+++ b/include/linux/pnp.h	Wed Oct 30 16:44:34 2002
@@ -94,7 +94,6 @@
 	int  (*probe)  (struct pnp_dev *dev, const struct pnp_id *card_id,
 		 	const struct pnp_id *dev_id);
 	void (*remove) (struct pnp_dev *dev);
-	struct device * (*legacy) (void);
 	struct device_driver	driver;
 };
 
@@ -227,28 +226,19 @@
 int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, int mode);
 
 /* driver */
+int compare_pnp_id(struct list_head * id_list, const char * id);
 int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev);
 int pnp_register_driver(struct pnp_driver *drv);
 void pnp_unregister_driver(struct pnp_driver *drv);
 
-/* compat */
-struct pnp_card *pnp_find_card(unsigned short vendor,
-				 unsigned short device,
-				 struct pnp_card *from);
-struct pnp_dev *pnp_find_dev(struct pnp_card *card,
-				unsigned short vendor,
-				unsigned short function,
-				struct pnp_dev *from);
-
-
 #else
 
 /* just in case anyone decides to call these without PnP Support Enabled */
 static inline int pnp_protocol_register(struct pnp_protocol *protocol) { return -ENODEV; }
-static inline void pnp_protocol_unregister(struct pnp_protocol *protocol) { ; )
+static inline void pnp_protocol_unregister(struct pnp_protocol *protocol) { }
 static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; }
-static inline void pnp_remove_device(struct pnp_dev *dev) { ; }
+static inline void pnp_remove_device(struct pnp_dev *dev) { }
 static inline struct pnp_resources * pnp_build_resource(struct pnp_dev *dev, int dependent) { return NULL; }
 static inline struct pnp_resources * pnp_find_resources(struct pnp_dev *dev, int depnum) { return NULL; }
 static inline int pnp_get_max_depnum(struct pnp_dev *dev) { return -ENODEV; }
@@ -260,9 +250,25 @@
 static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, int mode) { return -ENODEV; }
+static inline int compare_pnp_id(struct list_head * id_list, char * id) { return -ENODEV; }
 static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; }
 static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; }
+
+#endif /* CONFIG_PNP */
+
+#if defined(CONFIG_ISAPNP)
+/* compat */
+struct pnp_card *pnp_find_card(unsigned short vendor,
+				 unsigned short device,
+				 struct pnp_card *from);
+struct pnp_dev *pnp_find_dev(struct pnp_card *card,
+				unsigned short vendor,
+				unsigned short function,
+				struct pnp_dev *from);
+
+#else
+
 static inline struct pnp_card *pnp_find_card(unsigned short vendor,
 				 unsigned short device,
 				 struct pnp_card *from) { return NULL; }
@@ -271,7 +277,7 @@
 				unsigned short function,
 				struct pnp_dev *from) { return NULL; }
 
-#endif /* CONFIG_PNP */
+#endif /* CONFIG_ISAPNP */
 
 
 #ifdef DEBUG
diff -Nru a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
--- a/include/linux/raid/md_k.h	Wed Oct 30 16:44:19 2002
+++ b/include/linux/raid/md_k.h	Wed Oct 30 16:44:19 2002
@@ -151,8 +151,9 @@
 	struct block_device *bdev;	/* block device handle */
 
 	struct page	*sb_page;
-	mdp_super_t	*sb;
+	int		sb_loaded;
 	sector_t	sb_offset;
+	int		preferred_minor;	/* autorun support */
 
 	/* A device can be in one of three states based on two flags:
 	 * Not working:   faulty==1 in_sync==0
@@ -196,6 +197,7 @@
 	time_t				ctime, utime;
 	int				level, layout;
 	int				raid_disks;
+	int				max_disks;
 	unsigned long			state;
 	sector_t			size; /* used size of component devices */
 	__u64				events;
@@ -256,11 +258,6 @@
 static inline int mdidx (mddev_t * mddev)
 {
 	return mddev->__minor;
-}
-
-static inline kdev_t mddev_to_kdev(mddev_t * mddev)
-{
-	return mk_kdev(MD_MAJOR, mdidx(mddev));
 }
 
 extern mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr);
diff -Nru a/include/linux/random.h b/include/linux/random.h
--- a/include/linux/random.h	Wed Oct 30 16:44:35 2002
+++ b/include/linux/random.h	Wed Oct 30 16:44:35 2002
@@ -44,14 +44,12 @@
 
 extern void rand_initialize(void);
 extern void rand_initialize_irq(int irq);
-extern void rand_initialize_blkdev(int irq, int mode);
 
 extern void batch_entropy_store(u32 a, u32 b, int num);
 
 extern void add_keyboard_randomness(unsigned char scancode);
 extern void add_mouse_randomness(__u32 mouse_data);
 extern void add_interrupt_randomness(int irq);
-extern void add_blkdev_randomness(int major);
 
 extern void get_random_bytes(void *buf, int nbytes);
 void generate_random_uuid(unsigned char uuid_out[16]);
diff -Nru a/include/linux/rcupdate.h b/include/linux/rcupdate.h
--- a/include/linux/rcupdate.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/rcupdate.h	Wed Oct 30 16:44:26 2002
@@ -39,6 +39,7 @@
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/threads.h>
+#include <linux/percpu.h>
 
 /**
  * struct rcu_head - callback structure for use with RCU
@@ -94,16 +95,16 @@
         long  	       	batch;           /* Batch # for current RCU batch */
         struct list_head  nxtlist;
         struct list_head  curlist;
-} ____cacheline_aligned_in_smp;
+};
 
-extern struct rcu_data rcu_data[NR_CPUS];
+DECLARE_PER_CPU(struct rcu_data, rcu_data);
 extern struct rcu_ctrlblk rcu_ctrlblk;
 
-#define RCU_qsctr(cpu) 		(rcu_data[(cpu)].qsctr)
-#define RCU_last_qsctr(cpu) 	(rcu_data[(cpu)].last_qsctr)
-#define RCU_batch(cpu) 		(rcu_data[(cpu)].batch)
-#define RCU_nxtlist(cpu) 	(rcu_data[(cpu)].nxtlist)
-#define RCU_curlist(cpu) 	(rcu_data[(cpu)].curlist)
+#define RCU_qsctr(cpu) 		(per_cpu(rcu_data, (cpu)).qsctr)
+#define RCU_last_qsctr(cpu) 	(per_cpu(rcu_data, (cpu)).last_qsctr)
+#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
 
diff -Nru a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
--- a/include/linux/rtnetlink.h	Wed Oct 30 16:44:31 2002
+++ b/include/linux/rtnetlink.h	Wed Oct 30 16:44:31 2002
@@ -198,10 +198,11 @@
 	RTA_MULTIPATH,
 	RTA_PROTOINFO,
 	RTA_FLOW,
-	RTA_CACHEINFO
+	RTA_CACHEINFO,
+	RTA_SESSION,
 };
 
-#define RTA_MAX RTA_CACHEINFO
+#define RTA_MAX RTA_SESSION
 
 #define RTM_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
 #define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
@@ -284,6 +285,25 @@
 
 #define RTAX_MAX RTAX_REORDERING
 
+struct rta_session
+{
+	__u8	proto;
+
+	union {
+		struct {
+			__u16	sport;
+			__u16	dport;
+		} ports;
+
+		struct {
+			__u8	type;
+			__u8	code;
+			__u16	ident;
+		} icmpt;
+
+		__u32		spi;
+	} u;
+};
 
 
 /*********************************************************
@@ -559,7 +579,7 @@
 extern struct rtnetlink_link * rtnetlink_links[NPROTO];
 extern int rtnetlink_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb);
 extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo);
-extern int rtnetlink_put_metrics(struct sk_buff *skb, unsigned *metrics);
+extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
 
 extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
 
diff -Nru a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h	Wed Oct 30 16:44:21 2002
+++ b/include/linux/sched.h	Wed Oct 30 16:44:21 2002
@@ -293,9 +293,6 @@
 	struct list_head ptrace_list;
 
 	struct mm_struct *mm, *active_mm;
-	struct list_head local_pages;
-
-	unsigned int allocation_order, nr_local_pages;
 
 /* task state */
 	struct linux_binfmt *binfmt;
@@ -411,16 +408,15 @@
 #define PF_SIGNALED	0x00000400	/* killed by a signal */
 #define PF_MEMALLOC	0x00000800	/* Allocating memory */
 #define PF_MEMDIE	0x00001000	/* Killed for out-of-memory */
-#define PF_FREE_PAGES	0x00002000	/* per process page freeing */
-#define PF_FLUSHER	0x00004000	/* responsible for disk writeback */
-#define PF_NOWARN	0x00008000	/* debug: don't warn if alloc fails */
-
-#define PF_FREEZE	0x00010000	/* this task should be frozen for suspend */
-#define PF_IOTHREAD	0x00020000	/* this thread is needed for doing I/O to swap */
-#define PF_FROZEN	0x00040000	/* frozen for system suspend */
-#define PF_SYNC		0x00080000	/* performing fsync(), etc */
-#define PF_FSTRANS	0x00100000	/* inside a filesystem transaction */
-#define PF_KSWAPD	0x00200000	/* I am kswapd */
+#define PF_FLUSHER	0x00002000	/* responsible for disk writeback */
+#define PF_NOWARN	0x00004000	/* debug: don't warn if alloc fails */
+
+#define PF_FREEZE	0x00008000	/* this task should be frozen for suspend */
+#define PF_IOTHREAD	0x00010000	/* this thread is needed for doing I/O to swap */
+#define PF_FROZEN	0x00020000	/* frozen for system suspend */
+#define PF_SYNC		0x00040000	/* performing fsync(), etc */
+#define PF_FSTRANS	0x00080000	/* inside a filesystem transaction */
+#define PF_KSWAPD	0x00100000	/* I am kswapd */
 
 /*
  * Ptrace flags
diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h
--- a/include/linux/skbuff.h	Wed Oct 30 16:44:29 2002
+++ b/include/linux/skbuff.h	Wed Oct 30 16:44:29 2002
@@ -96,6 +96,17 @@
 struct nf_ct_info {
 	struct nf_conntrack *master;
 };
+
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+struct nf_bridge_info {
+	atomic_t use;
+	struct net_device *physindev;
+	struct net_device *physoutdev;
+	unsigned int mask;
+	unsigned long hh[16 / sizeof(unsigned long)];
+};
+#endif
+
 #endif
 
 struct sk_buff_head {
@@ -166,6 +177,7 @@
  *	@nfcache: Cache info
  *	@nfct: Associated connection, if any
  *	@nf_debug: Netfilter debugging
+ *	@nf_bridge: Saved data about a bridged frame - see br_netfilter.c
  *	@tc_index: Traffic control index
  */
 
@@ -201,6 +213,7 @@
 	} mac;
 
 	struct  dst_entry	*dst;
+	struct	sec_path	*sp;
 
 	/*
 	 * This is the control buffer. It is free to use for every
@@ -236,6 +249,9 @@
 #ifdef CONFIG_NETFILTER_DEBUG
         unsigned int		nf_debug;
 #endif
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	struct nf_bridge_info	*nf_bridge;
+#endif
 #endif /* CONFIG_NETFILTER */
 #if defined(CONFIG_HIPPI)
 	union {
@@ -1146,6 +1162,20 @@
 	if (nfct)
 		atomic_inc(&nfct->master->use);
 }
+
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge)
+{
+	if (nf_bridge && atomic_dec_and_test(&nf_bridge->use))
+		kfree(nf_bridge);
+}
+static inline void nf_bridge_get(struct nf_bridge_info *nf_bridge)
+{
+	if (nf_bridge)
+		atomic_inc(&nf_bridge->use);
+}
+#endif
+
 #endif
 
 #endif	/* __KERNEL__ */
diff -Nru a/include/linux/sonypi.h b/include/linux/sonypi.h
--- a/include/linux/sonypi.h	Wed Oct 30 16:44:27 2002
+++ b/include/linux/sonypi.h	Wed Oct 30 16:44:27 2002
@@ -75,6 +75,16 @@
 #define SONYPI_EVENT_LID_OPENED			37
 #define SONYPI_EVENT_BLUETOOTH_ON		38
 #define SONYPI_EVENT_BLUETOOTH_OFF		39
+#define SONYPI_EVENT_HELP_PRESSED		40
+#define SONYPI_EVENT_FNKEY_ONLY			41
+#define SONYPI_EVENT_JOGDIAL_FAST_DOWN		42
+#define SONYPI_EVENT_JOGDIAL_FAST_UP		43
+#define SONYPI_EVENT_JOGDIAL_FAST_DOWN_PRESSED	44
+#define SONYPI_EVENT_JOGDIAL_FAST_UP_PRESSED	45
+#define SONYPI_EVENT_JOGDIAL_VFAST_DOWN		46
+#define SONYPI_EVENT_JOGDIAL_VFAST_UP		47
+#define SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED	48
+#define SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED	49
 
 /* get/set brightness */
 #define SONYPI_IOCGBRT		_IOR('v', 0, __u8)
diff -Nru a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
--- a/include/linux/sunrpc/svc.h	Wed Oct 30 16:44:29 2002
+++ b/include/linux/sunrpc/svc.h	Wed Oct 30 16:44:29 2002
@@ -48,43 +48,49 @@
  * This is use to determine the max number of pages nfsd is
  * willing to return in a single READ operation.
  */
-#define RPCSVC_MAXPAYLOAD	16384u
+#define RPCSVC_MAXPAYLOAD	(64*1024u)
 
 /*
- * Buffer to store RPC requests or replies in.
- * Each server thread has one of these beasts.
+ * RPC Requsts and replies are stored in one or more pages.
+ * We maintain an array of pages for each server thread.
+ * Requests are copied into these pages as they arrive.  Remaining
+ * pages are available to write the reply into.
  *
- * Area points to the allocated memory chunk currently owned by the
- * buffer. Base points to the buffer containing the request, which is
- * different from area when directly reading from an sk_buff. buf is
- * the current read/write position while processing an RPC request.
+ * Currently pages are all re-used by the same server.  Later we 
+ * will use ->sendpage to transmit pages with reduced copying.  In
+ * that case we will need to give away the page and allocate new ones.
+ * In preparation for this, we explicitly move pages off the recv
+ * list onto the transmit list, and back.
  *
- * The array of iovecs can hold additional data that the server process
- * may not want to copy into the RPC reply buffer, but pass to the 
- * network sendmsg routines directly. The prime candidate for this
- * will of course be NFS READ operations, but one might also want to
- * do something about READLINK and READDIR. It might be worthwhile
- * to implement some generic readdir cache in the VFS layer...
+ * We use xdr_buf for holding responses as it fits well with NFS
+ * read responses (that have a header, and some data pages, and possibly
+ * a tail) and means we can share some client side routines.
  *
- * On the receiving end of the RPC server, the iovec may be used to hold
- * the list of IP fragments once we get to process fragmented UDP
- * datagrams directly.
+ * The xdr_buf.head iovec always points to the first page in the rq_*pages
+ * list.  The xdr_buf.pages pointer points to the second page on that
+ * list.  xdr_buf.tail points to the end of the first page.
+ * This assumes that the non-page part of an rpc reply will fit
+ * in a page - NFSd ensures this.  lockd also has no trouble.
  */
-#define RPCSVC_MAXIOV		((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 1)
-struct svc_buf {
-	u32 *			area;	/* allocated memory */
-	u32 *			base;	/* base of RPC datagram */
-	int			buflen;	/* total length of buffer */
-	u32 *			buf;	/* read/write pointer */
-	int			len;	/* current end of buffer */
-
-	/* iovec for zero-copy NFS READs */
-	struct iovec		iov[RPCSVC_MAXIOV];
-	int			nriov;
-};
-#define svc_getu32(argp, val)	{ (val) = *(argp)->buf++; (argp)->len--; }
-#define svc_putu32(resp, val)	{ *(resp)->buf++ = (val); (resp)->len++; }
+#define RPCSVC_MAXPAGES		((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 1)
+
+static inline u32 svc_getu32(struct iovec *iov)
+{
+	u32 val, *vp;
+	vp = iov->iov_base;
+	val = *vp++;
+	iov->iov_base = (void*)vp;
+	iov->iov_len -= sizeof(u32);
+	return val;
+}
+static inline void svc_putu32(struct iovec *iov, u32 val)
+{
+	u32 *vp = iov->iov_base + iov->iov_len;
+	*vp = val;
+	iov->iov_len += sizeof(u32);
+}
 
+	
 /*
  * The context of a single thread, including the request currently being
  * processed.
@@ -102,9 +108,15 @@
 	struct svc_cred		rq_cred;	/* auth info */
 	struct sk_buff *	rq_skbuff;	/* fast recv inet buffer */
 	struct svc_deferred_req*rq_deferred;	/* deferred request we are replaying */
-	struct svc_buf		rq_defbuf;	/* default buffer */
-	struct svc_buf		rq_argbuf;	/* argument buffer */
-	struct svc_buf		rq_resbuf;	/* result buffer */
+
+	struct xdr_buf		rq_arg;
+	struct xdr_buf		rq_res;
+	struct page *		rq_argpages[RPCSVC_MAXPAGES];
+	struct page *		rq_respages[RPCSVC_MAXPAGES];
+	short			rq_argused;	/* pages used for argument */
+	short			rq_arghi;	/* pages available in argument page list */
+	short			rq_resused;	/* pages used for result */
+
 	u32			rq_xid;		/* transmission id */
 	u32			rq_prog;	/* program number */
 	u32			rq_vers;	/* program version */
@@ -135,6 +147,38 @@
 
 	wait_queue_head_t	rq_wait;	/* synchronization */
 };
+
+/*
+ * Check buffer bounds after decoding arguments
+ */
+static inline int
+xdr_argsize_check(struct svc_rqst *rqstp, u32 *p)
+{
+	char *cp = (char *)p;
+	struct iovec *vec = &rqstp->rq_arg.head[0];
+	return cp - (char*)vec->iov_base <= vec->iov_len;
+}
+
+static inline int
+xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
+{
+	struct iovec *vec = &rqstp->rq_res.head[0];
+	char *cp = (char*)p;
+
+	vec->iov_len = cp - (char*)vec->iov_base;
+	rqstp->rq_res.len = vec->iov_len;
+
+	return vec->iov_len <= PAGE_SIZE;
+}
+
+static int inline take_page(struct svc_rqst *rqstp)
+{
+	if (rqstp->rq_arghi <= rqstp->rq_argused)
+		return -ENOMEM;
+	rqstp->rq_respages[rqstp->rq_resused++] =
+		rqstp->rq_argpages[--rqstp->rq_arghi];
+	return 0;
+}
 
 struct svc_deferred_req {
 	struct svc_serv		*serv;
diff -Nru a/include/linux/sys.h b/include/linux/sys.h
--- a/include/linux/sys.h	Wed Oct 30 16:44:27 2002
+++ b/include/linux/sys.h	Wed Oct 30 16:44:27 2002
@@ -4,7 +4,7 @@
 /*
  * system call entry points ... but not all are defined
  */
-#define NR_syscalls 256
+#define NR_syscalls 260
 
 /*
  * These are system calls that will be removed at some time
diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
--- a/include/linux/sysctl.h	Wed Oct 30 16:44:17 2002
+++ b/include/linux/sysctl.h	Wed Oct 30 16:44:17 2002
@@ -357,7 +357,9 @@
 enum {
 	NET_IPV6_CONF=16,
 	NET_IPV6_NEIGH=17,
-	NET_IPV6_ROUTE=18
+	NET_IPV6_ROUTE=18,
+	NET_IPV6_ICMP=19,
+	NET_IPV6_BINDV6ONLY=20
 };
 
 enum {
@@ -383,6 +385,11 @@
 	NET_IPV6_RTR_SOLICITS=8,
 	NET_IPV6_RTR_SOLICIT_INTERVAL=9,
 	NET_IPV6_RTR_SOLICIT_DELAY=10
+};
+
+/* /proc/sys/net/ipv6/icmp */
+enum {
+	NET_IPV6_ICMP_RATELIMIT=1
 };
 
 /* /proc/sys/net/<protocol>/neigh/<dev> */
diff -Nru a/include/linux/sysfs.h b/include/linux/sysfs.h
--- a/include/linux/sysfs.h	Wed Oct 30 16:44:27 2002
+++ b/include/linux/sysfs.h	Wed Oct 30 16:44:27 2002
@@ -11,19 +11,11 @@
 
 struct driver_dir_entry;
 struct attribute;
+struct kobject;
 
 struct sysfs_ops {
-	int	(*open)(struct driver_dir_entry *);
-	int	(*close)(struct driver_dir_entry *);
-	ssize_t	(*show)(struct driver_dir_entry *, struct attribute *,char *, size_t, loff_t);
-	ssize_t	(*store)(struct driver_dir_entry *,struct attribute *,const char *, size_t, loff_t);
-};
-
-struct driver_dir_entry {
-	char			* name;
-	struct dentry		* dentry;
-	mode_t			mode;
-	struct sysfs_ops	* ops;
+	ssize_t	(*show)(struct kobject *, struct attribute *,char *, size_t, loff_t);
+	ssize_t	(*store)(struct kobject *,struct attribute *,const char *, size_t, loff_t);
 };
 
 struct attribute {
@@ -32,20 +24,21 @@
 };
 
 extern int
-sysfs_create_dir(struct driver_dir_entry *, struct driver_dir_entry *);
+sysfs_create_dir(struct kobject *);
 
 extern void
-sysfs_remove_dir(struct driver_dir_entry * entry);
+sysfs_remove_dir(struct kobject *);
 
 extern int
-sysfs_create_file(struct attribute * attr,
-		     struct driver_dir_entry * parent);
+sysfs_create_file(struct kobject *, struct attribute *);
+
+extern void
+sysfs_remove_file(struct kobject *, struct attribute *);
 
 extern int 
-sysfs_create_symlink(struct driver_dir_entry * parent, 
-			char * name, char * target);
+sysfs_create_link(struct kobject * kobj, struct kobject * target, char * name);
 
 extern void
-sysfs_remove_file(struct driver_dir_entry *, const char * name);
+sysfs_remove_link(struct kobject *, char * name);
 
 #endif /* _SYSFS_H_ */
diff -Nru a/include/linux/timer.h b/include/linux/timer.h
--- a/include/linux/timer.h	Wed Oct 30 16:44:30 2002
+++ b/include/linux/timer.h	Wed Oct 30 16:44:30 2002
@@ -44,6 +44,7 @@
 }
 
 extern void add_timer(struct timer_list * timer);
+extern void add_timer_on(struct timer_list *timer, int cpu);
 extern int del_timer(struct timer_list * timer);
 extern int mod_timer(struct timer_list *timer, unsigned long expires);
   
diff -Nru a/include/linux/udp.h b/include/linux/udp.h
--- a/include/linux/udp.h	Wed Oct 30 16:44:26 2002
+++ b/include/linux/udp.h	Wed Oct 30 16:44:26 2002
@@ -57,4 +57,7 @@
 
 #define udp_sk(__sk) (&((struct udp_sock *)__sk)->udp)
 
+extern int udp_proc_init(void);
+extern void udp_proc_exit(void);
+
 #endif	/* _LINUX_UDP_H */
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h	Wed Oct 30 16:44:28 2002
+++ b/include/linux/usb.h	Wed Oct 30 16:44:28 2002
@@ -1,76 +1,7 @@
 #ifndef __LINUX_USB_H
 #define __LINUX_USB_H
 
-/* USB constants */
-
-/*
- * Device and/or Interface Class codes
- */
-#define USB_CLASS_PER_INTERFACE		0	/* for DeviceClass */
-#define USB_CLASS_AUDIO			1
-#define USB_CLASS_COMM			2
-#define USB_CLASS_HID			3
-#define USB_CLASS_PHYSICAL		5
-#define USB_CLASS_STILL_IMAGE		6
-#define USB_CLASS_PRINTER		7
-#define USB_CLASS_MASS_STORAGE		8
-#define USB_CLASS_HUB			9
-#define USB_CLASS_CDC_DATA		0x0a
-#define USB_CLASS_CSCID			0x0b	/* chip+ smart card */
-#define USB_CLASS_CONTENT_SEC		0x0d	/* content security */
-#define USB_CLASS_APP_SPEC		0xfe
-#define USB_CLASS_VENDOR_SPEC		0xff
-
-/*
- * USB types
- */
-#define USB_TYPE_MASK			(0x03 << 5)
-#define USB_TYPE_STANDARD		(0x00 << 5)
-#define USB_TYPE_CLASS			(0x01 << 5)
-#define USB_TYPE_VENDOR			(0x02 << 5)
-#define USB_TYPE_RESERVED		(0x03 << 5)
-
-/*
- * USB recipients
- */
-#define USB_RECIP_MASK			0x1f
-#define USB_RECIP_DEVICE		0x00
-#define USB_RECIP_INTERFACE		0x01
-#define USB_RECIP_ENDPOINT		0x02
-#define USB_RECIP_OTHER			0x03
-
-/*
- * USB directions
- */
-#define USB_DIR_OUT			0		/* to device */
-#define USB_DIR_IN			0x80		/* to host */
-
-/*
- * Endpoints
- */
-#define USB_ENDPOINT_NUMBER_MASK	0x0f	/* in bEndpointAddress */
-#define USB_ENDPOINT_DIR_MASK		0x80
-
-#define USB_ENDPOINT_XFERTYPE_MASK	0x03	/* in bmAttributes */
-#define USB_ENDPOINT_XFER_CONTROL	0
-#define USB_ENDPOINT_XFER_ISOC		1
-#define USB_ENDPOINT_XFER_BULK		2
-#define USB_ENDPOINT_XFER_INT		3
-
-/*
- * Standard requests
- */
-#define USB_REQ_GET_STATUS		0x00
-#define USB_REQ_CLEAR_FEATURE		0x01
-#define USB_REQ_SET_FEATURE		0x03
-#define USB_REQ_SET_ADDRESS		0x05
-#define USB_REQ_GET_DESCRIPTOR		0x06
-#define USB_REQ_SET_DESCRIPTOR		0x07
-#define USB_REQ_GET_CONFIGURATION	0x08
-#define USB_REQ_SET_CONFIGURATION	0x09
-#define USB_REQ_GET_INTERFACE		0x0A
-#define USB_REQ_SET_INTERFACE		0x0B
-#define USB_REQ_SYNCH_FRAME		0x0C
+#include <linux/usb_ch9.h>
 
 #define USB_MAJOR			180
 
@@ -97,27 +28,6 @@
 		mdelay(ms);
 }
 
-/**
- * struct usb_ctrlrequest - structure used to make USB device control requests easier to create and decode
- * @bRequestType: matches the USB bmRequestType field
- * @bRequest: matches the USB bRequest field
- * @wValue: matches the USB wValue field
- * @wIndex: matches the USB wIndex field
- * @wLength: matches the USB wLength field
- *
- * This structure is used to send control requests to a USB device.  It matches
- * the different fields of the USB 2.0 Spec section 9.3, table 9-2.  See the
- * USB spec for a fuller description of the different fields, and what they are
- * used for.
- */
-struct usb_ctrlrequest {
-	__u8 bRequestType;
-	__u8 bRequest;
-	__u16 wValue;
-	__u16 wIndex;
-	__u16 wLength;
-} __attribute__ ((packed));
-
 /*
  * USB device number allocation bitmap. There's one bitmap
  * per USB tree.
@@ -131,92 +41,36 @@
 /*-------------------------------------------------------------------------*/
 
 /*
- * Standard USB Descriptor support.
+ * Host-side wrappers for standard USB descriptors ... these are parsed
+ * from the data provided by devices.  Parsing turns them from a flat
+ * sequence of descriptors into a hierarchy:
+ *
+ *  - devices have one (usually) or more configs;
+ *  - configs have one (often) or more interfaces;
+ *  - interfaces have one (usually) or more settings;
+ *  - each interface setting has zero or (usually) more endpoints.
+ *
+ * And there might be other descriptors mixed in with those.
+ *
  * Devices may also have class-specific or vendor-specific descriptors.
  */
 
-/*
- * Descriptor types ... USB 2.0 spec table 9.5
- */
-#define USB_DT_DEVICE			0x01
-#define USB_DT_CONFIG			0x02
-#define USB_DT_STRING			0x03
-#define USB_DT_INTERFACE		0x04
-#define USB_DT_ENDPOINT			0x05
-#define USB_DT_DEVICE_QUALIFIER		0x06
-#define USB_DT_OTHER_SPEED_CONFIG	0x07
-#define USB_DT_INTERFACE_POWER		0x08
-
-/*
- * Descriptor sizes per descriptor type
- */
-#define USB_DT_DEVICE_SIZE		18
-#define USB_DT_CONFIG_SIZE		9
-#define USB_DT_INTERFACE_SIZE		9
-#define USB_DT_ENDPOINT_SIZE		7
-#define USB_DT_ENDPOINT_AUDIO_SIZE	9	/* Audio extension */
-
-/* most of these maximums are arbitrary */
-#define USB_MAXCONFIG			8
-#define USB_ALTSETTINGALLOC		4
-#define USB_MAXALTSETTING		128	/* Hard limit */
-#define USB_MAXINTERFACES		32
-#define USB_MAXENDPOINTS		32	/* Hard limit */
-
-/* All standard descriptors have these 2 fields in common */
-struct usb_descriptor_header {
-	__u8  bLength;
-	__u8  bDescriptorType;
-} __attribute__ ((packed));
-
-/* USB_DT_DEVICE: Device descriptor */
-struct usb_device_descriptor {
-	__u8  bLength;
-	__u8  bDescriptorType;
-	__u16 bcdUSB;
-	__u8  bDeviceClass;
-	__u8  bDeviceSubClass;
-	__u8  bDeviceProtocol;
-	__u8  bMaxPacketSize0;
-	__u16 idVendor;
-	__u16 idProduct;
-	__u16 bcdDevice;
-	__u8  iManufacturer;
-	__u8  iProduct;
-	__u8  iSerialNumber;
-	__u8  bNumConfigurations;
-} __attribute__ ((packed));
-
-/* USB_DT_ENDPOINT: Endpoint descriptor */
-struct usb_endpoint_descriptor {
-	__u8  bLength		__attribute__ ((packed));
-	__u8  bDescriptorType	__attribute__ ((packed));
-	__u8  bEndpointAddress	__attribute__ ((packed));
-	__u8  bmAttributes	__attribute__ ((packed));
-	__u16 wMaxPacketSize	__attribute__ ((packed));
-	__u8  bInterval		__attribute__ ((packed));
-	__u8  bRefresh		__attribute__ ((packed));
-	__u8  bSynchAddress	__attribute__ ((packed));
+/* host-side wrapper for parsed endpoint descriptors */
+struct usb_host_endpoint {
+	struct usb_endpoint_descriptor	desc;
 
-	/* the rest is internal to the Linux implementation */
 	unsigned char *extra;   /* Extra descriptors */
 	int extralen;
 };
 
-/* USB_DT_INTERFACE: Interface descriptor */
-struct usb_interface_descriptor {
-	__u8  bLength		__attribute__ ((packed));
-	__u8  bDescriptorType	__attribute__ ((packed));
-	__u8  bInterfaceNumber	__attribute__ ((packed));
-	__u8  bAlternateSetting	__attribute__ ((packed));
-	__u8  bNumEndpoints	__attribute__ ((packed));
-	__u8  bInterfaceClass	__attribute__ ((packed));
-	__u8  bInterfaceSubClass __attribute__ ((packed));
-	__u8  bInterfaceProtocol __attribute__ ((packed));
-	__u8  iInterface	__attribute__ ((packed));
+/* host-side wrapper for one interface setting's parsed descriptors */
+struct usb_host_interface {
+	struct usb_interface_descriptor	desc;
 
-	/* the rest is internal to the Linux implementation */
-	struct usb_endpoint_descriptor *endpoint;
+	/* array of desc.bNumEndpoint endpoints associated with this
+	 * interface setting.  these will be in no particular order.
+	 */
+	struct usb_host_endpoint *endpoint;
 
 	unsigned char *extra;   /* Extra descriptors */
 	int extralen;
@@ -253,7 +107,10 @@
  * will use them in non-default settings.
  */
 struct usb_interface {
-	struct usb_interface_descriptor *altsetting;
+	/* array of alternate settings for this interface.
+	 * these will be in numeric order, 0..num_altsettting
+	 */
+	struct usb_host_interface *altsetting;
 
 	unsigned act_altsetting;	/* active alternate setting */
 	unsigned num_altsetting;	/* number of alternate settings */
@@ -274,43 +131,18 @@
  * different depending on what speed they're currently running.  Only
  * devices with a USB_DT_DEVICE_QUALIFIER have an OTHER_SPEED_CONFIG.
  */
-struct usb_config_descriptor {
-	__u8  bLength		__attribute__ ((packed));
-	__u8  bDescriptorType	__attribute__ ((packed));
-	__u16 wTotalLength	__attribute__ ((packed));
-	__u8  bNumInterfaces	__attribute__ ((packed));
-	__u8  bConfigurationValue __attribute__ ((packed));
-	__u8  iConfiguration	__attribute__ ((packed));
-	__u8  bmAttributes	__attribute__ ((packed));
-	__u8  MaxPower		__attribute__ ((packed));
+struct usb_host_config {
+	struct usb_config_descriptor	desc;
 
-	/* the rest is internal to the Linux implementation */
+	/* the interfaces associated with this configuration
+	 * these will be in numeric order, 0..desc.bNumInterfaces
+	 */
 	struct usb_interface *interface;
 
 	unsigned char *extra;   /* Extra descriptors */
 	int extralen;
 };
 
-/* USB_DT_STRING: String descriptor */
-struct usb_string_descriptor {
-	__u8  bLength;
-	__u8  bDescriptorType;
-	__u16 wData[1];		/* UTF-16LE encoded */
-} __attribute__ ((packed));
-
-/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */
-struct usb_qualifier_descriptor {
-	__u8  bLength;
-	__u8  bDescriptorType;
-	__u16 bcdUSB;
-	__u8  bDeviceClass;
-	__u8  bDeviceSubClass;
-	__u8  bDeviceProtocol;
-	__u8  bMaxPacketSize0;
-	__u8  bNumConfigurations;
-	__u8  bRESERVED;
-} __attribute__ ((packed));
-
 // FIXME remove; exported only for drivers/usb/misc/auserwald.c
 // prefer usb_device->epnum[0..31]
 extern struct usb_endpoint_descriptor *
@@ -324,8 +156,6 @@
 
 /* -------------------------------------------------------------------------- */
 
-/* Host Controller Driver (HCD) support */
-
 struct usb_operations;
 
 /*
@@ -374,11 +204,7 @@
 	int		devnum;		/* Address on USB bus */
 	char		devpath [16];	/* Use in messages: /port/port/... */
 
-	enum {
-		USB_SPEED_UNKNOWN = 0,			/* enumerating */
-		USB_SPEED_LOW, USB_SPEED_FULL,		/* usb 1.1 */
-		USB_SPEED_HIGH				/* usb 2.0 */
-	} speed;
+	enum usb_device_speed	speed;	/* high/full/low (or error) */
 
 	struct usb_tt	*tt; 		/* low/full speed dev, highspeed hub */
 	int		ttport;		/* device port on that tt hub */
@@ -398,8 +224,8 @@
 	struct device dev;		/* Generic device interface */
 
 	struct usb_device_descriptor descriptor;/* Descriptor */
-	struct usb_config_descriptor *config;	/* All of the configs */
-	struct usb_config_descriptor *actconfig;/* the active configuration */
+	struct usb_host_config *config;	/* All of the configs */
+	struct usb_host_config *actconfig;/* the active configuration */
 
 	char **rawdescriptors;		/* Raw descriptors for each config */
 
@@ -710,17 +536,15 @@
 
 /*
  * urb->transfer_flags:
- *
- * FIXME should _all_ be URB_* flags
  */
 #define URB_SHORT_NOT_OK	0x0001	/* report short reads as errors */
-#define USB_ISO_ASAP		0x0002	/* iso-only, urb->start_frame ignored */
+#define URB_ISO_ASAP		0x0002	/* iso-only, urb->start_frame ignored */
 #define URB_NO_DMA_MAP		0x0004	/* urb->*_dma are valid on submit */
-#define USB_ASYNC_UNLINK	0x0008	/* usb_unlink_urb() returns asap */
-#define USB_NO_FSBR		0x0020	/* UHCI-specific */
-#define USB_ZERO_PACKET		0x0040	/* Finish bulk OUTs with short packet */
+#define URB_ASYNC_UNLINK	0x0008	/* usb_unlink_urb() returns asap */
+#define URB_NO_FSBR		0x0020	/* UHCI-specific */
+#define URB_ZERO_PACKET		0x0040	/* Finish bulk OUTs with short packet */
 #define URB_NO_INTERRUPT	0x0080	/* HINT: no non-error interrupt needed */
-#define USB_TIMEOUT_KILLED	0x1000	/* only set by HCD! */
+#define URB_TIMEOUT_KILLED	0x1000	/* only set by HCD! */
 
 struct usb_iso_packet_descriptor {
 	unsigned int offset;
@@ -791,8 +615,7 @@
  * @context: For use in completion functions.  This normally points to
  *	request-specific driver context.
  * @complete: Completion handler. This URB is passed as the parameter to the
- *	completion function.  Except for interrupt or isochronous transfers
- *	that aren't being unlinked, the completion function may then do what
+ *	completion function.  The completion function may then do what
  *	it likes with the URB, including resubmitting or freeing it.
  * @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to 
  *	collect the transfer status for each buffer.
@@ -825,7 +648,7 @@
  *
  * All URBs submitted must initialize dev, pipe,
  * transfer_flags (may be zero), complete, timeout (may be zero).
- * The USB_ASYNC_UNLINK transfer flag affects later invocations of
+ * The URB_ASYNC_UNLINK transfer flag affects later invocations of
  * the usb_unlink_urb() routine.
  *
  * All URBs must also initialize 
@@ -834,7 +657,7 @@
  * to be treated as errors; that flag is invalid for write requests.
  *
  * Bulk URBs may
- * use the USB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
+ * use the URB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
  * should always terminate with a short packet, even if it means adding an
  * extra zero length packet.
  *
@@ -851,7 +674,7 @@
  * endpoints, as well as high speed interrupt endpoints, the encoding of
  * the transfer interval in the endpoint descriptor is logarithmic.)
  *
- * Isochronous URBs normally use the USB_ISO_ASAP transfer flag, telling
+ * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling
  * the host controller to schedule the transfer as soon as bandwidth
  * utilization allows, and then set start_frame to reflect the actual frame
  * selected during submission.  Otherwise drivers must specify the start_frame
@@ -885,11 +708,6 @@
  * When completion callback is invoked for non-isochronous URBs, the
  * actual_length field tells how many bytes were transferred.
  *
- * For interrupt URBs, the URB provided to the callback
- * function is still "owned" by the USB core subsystem unless the status
- * indicates that the URB has been unlinked.  Completion handlers should
- * not modify such URBs until they have been unlinked.
- *
  * ISO transfer status is reported in the status and actual_length fields
  * of the iso_frame_desc array, and the number of errors is reported in
  * error_count.  Completion callbacks for ISO transfers will normally
@@ -1027,17 +845,6 @@
 		urb->interval = interval;
 	urb->start_frame = -1;
 }
-
-/*
- * old style macros to enable 2.4 and 2.2 drivers to build
- * properly.  Please do not use these for new USB drivers.
- */
-#define FILL_CONTROL_URB(URB,DEV,PIPE,SETUP_PACKET,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT) \
-    usb_fill_control_urb(URB,DEV,PIPE,SETUP_PACKET,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT)
-#define FILL_BULK_URB(URB,DEV,PIPE,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT) \
-    usb_fill_bulk_urb(URB,DEV,PIPE,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT)
-#define FILL_INT_URB(URB,DEV,PIPE,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT,INTERVAL) \
-    usb_fill_int_urb(URB,DEV,PIPE,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT,INTERVAL)
 
 extern struct urb *usb_alloc_urb(int iso_packets, int mem_flags);
 extern void usb_free_urb(struct urb *urb);
diff -Nru a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/usb_ch9.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,294 @@
+/*
+ * This file holds USB constants and structures that are needed for USB
+ * device APIs.  These are used by the USB device model, which is defined
+ * in chapter 9 of the USB 2.0 specification.  Linux has several APIs in C
+ * that need these:
+ *
+ * - the master/host side Linux-USB kernel driver API;
+ * - the "usbfs" user space API; and
+ * - (eventually) a Linux "gadget" slave/device side driver API.
+ *
+ * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems
+ * act either as a USB master/host or as a USB slave/device.  That means
+ * the master and slave side APIs will benefit from working well together.
+ */
+
+#ifndef __LINUX_USB_CH9_H
+#define __LINUX_USB_CH9_H
+
+#include <asm/types.h>		/* __u8 etc */
+
+/*-------------------------------------------------------------------------*/
+
+/* CONTROL REQUEST SUPPORT */
+
+/*
+ * USB directions
+ *
+ * This bit flag is used in endpoint descriptors' bEndpointAddress field.
+ * It's also one of three fields in control requests bRequestType.
+ */
+#define USB_DIR_OUT			0		/* to device */
+#define USB_DIR_IN			0x80		/* to host */
+
+/*
+ * USB types, the second of three bRequestType fields
+ */
+#define USB_TYPE_MASK			(0x03 << 5)
+#define USB_TYPE_STANDARD		(0x00 << 5)
+#define USB_TYPE_CLASS			(0x01 << 5)
+#define USB_TYPE_VENDOR			(0x02 << 5)
+#define USB_TYPE_RESERVED		(0x03 << 5)
+
+/*
+ * USB recipients, the third of three bRequestType fields
+ */
+#define USB_RECIP_MASK			0x1f
+#define USB_RECIP_DEVICE		0x00
+#define USB_RECIP_INTERFACE		0x01
+#define USB_RECIP_ENDPOINT		0x02
+#define USB_RECIP_OTHER			0x03
+
+/*
+ * Standard requests, for the bRequest field of a SETUP packet.
+ *
+ * These are qualified by the bRequestType field, so that for example
+ * TYPE_CLASS or TYPE_VENDOR specific feature flags could be retrieved
+ * by a GET_STATUS request.
+ */
+#define USB_REQ_GET_STATUS		0x00
+#define USB_REQ_CLEAR_FEATURE		0x01
+#define USB_REQ_SET_FEATURE		0x03
+#define USB_REQ_SET_ADDRESS		0x05
+#define USB_REQ_GET_DESCRIPTOR		0x06
+#define USB_REQ_SET_DESCRIPTOR		0x07
+#define USB_REQ_GET_CONFIGURATION	0x08
+#define USB_REQ_SET_CONFIGURATION	0x09
+#define USB_REQ_GET_INTERFACE		0x0A
+#define USB_REQ_SET_INTERFACE		0x0B
+#define USB_REQ_SYNCH_FRAME		0x0C
+
+
+/**
+ * struct usb_ctrlrequest - SETUP data for a USB device control request
+ * @bRequestType: matches the USB bmRequestType field
+ * @bRequest: matches the USB bRequest field
+ * @wValue: matches the USB wValue field (le16 byte order)
+ * @wIndex: matches the USB wIndex field (le16 byte order)
+ * @wLength: matches the USB wLength field (le16 byte order)
+ *
+ * This structure is used to send control requests to a USB device.  It matches
+ * the different fields of the USB 2.0 Spec section 9.3, table 9-2.  See the
+ * USB spec for a fuller description of the different fields, and what they are
+ * used for.
+ *
+ * Note that the driver for any interface can issue control requests.
+ * For most devices, interfaces don't coordinate with each other, so
+ * such requests may be made at any time.
+ */
+struct usb_ctrlrequest {
+	__u8 bRequestType;
+	__u8 bRequest;
+	__u16 wValue;
+	__u16 wIndex;
+	__u16 wLength;
+} __attribute__ ((packed));
+
+/*-------------------------------------------------------------------------*/
+
+/*
+ * STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or
+ * (rarely) accepted by SET_DESCRIPTOR.
+ *
+ * Note that all multi-byte values here are encoded in little endian
+ * byte order "on the wire".  But when exposed through Linux-USB APIs,
+ * they've been converted to cpu byte order.
+ */
+
+/*
+ * Descriptor types ... USB 2.0 spec table 9.5
+ */
+#define USB_DT_DEVICE			0x01
+#define USB_DT_CONFIG			0x02
+#define USB_DT_STRING			0x03
+#define USB_DT_INTERFACE		0x04
+#define USB_DT_ENDPOINT			0x05
+#define USB_DT_DEVICE_QUALIFIER		0x06
+#define USB_DT_OTHER_SPEED_CONFIG	0x07
+#define USB_DT_INTERFACE_POWER		0x08
+
+/* All standard descriptors have these 2 fields at the beginning */
+struct usb_descriptor_header {
+	__u8  bLength;
+	__u8  bDescriptorType;
+} __attribute__ ((packed));
+
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_DEVICE: Device descriptor */
+struct usb_device_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u16 bcdUSB;
+	__u8  bDeviceClass;
+	__u8  bDeviceSubClass;
+	__u8  bDeviceProtocol;
+	__u8  bMaxPacketSize0;
+	__u16 idVendor;
+	__u16 idProduct;
+	__u16 bcdDevice;
+	__u8  iManufacturer;
+	__u8  iProduct;
+	__u8  iSerialNumber;
+	__u8  bNumConfigurations;
+} __attribute__ ((packed));
+
+#define USB_DT_DEVICE_SIZE		18
+
+
+/*
+ * Device and/or Interface Class codes
+ * as found in bDeviceClass or bInterfaceClass
+ * and defined by www.usb.org documents
+ */
+#define USB_CLASS_PER_INTERFACE		0	/* for DeviceClass */
+#define USB_CLASS_AUDIO			1
+#define USB_CLASS_COMM			2
+#define USB_CLASS_HID			3
+#define USB_CLASS_PHYSICAL		5
+#define USB_CLASS_STILL_IMAGE		6
+#define USB_CLASS_PRINTER		7
+#define USB_CLASS_MASS_STORAGE		8
+#define USB_CLASS_HUB			9
+#define USB_CLASS_CDC_DATA		0x0a
+#define USB_CLASS_CSCID			0x0b	/* chip+ smart card */
+#define USB_CLASS_CONTENT_SEC		0x0d	/* content security */
+#define USB_CLASS_APP_SPEC		0xfe
+#define USB_CLASS_VENDOR_SPEC		0xff
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_CONFIG: Configuration descriptor information.
+ *
+ * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the
+ * descriptor type is different.  Highspeed-capable devices can look
+ * different depending on what speed they're currently running.  Only
+ * devices with a USB_DT_DEVICE_QUALIFIER have any OTHER_SPEED_CONFIG
+ * descriptors.
+ */
+struct usb_config_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u16 wTotalLength;
+	__u8  bNumInterfaces;
+	__u8  bConfigurationValue;
+	__u8  iConfiguration;
+	__u8  bmAttributes;
+	__u8  bMaxPower;
+} __attribute__ ((packed));
+
+#define USB_DT_CONFIG_SIZE		9
+
+/* from config descriptor bmAttributes */
+#define USB_CONFIG_ATT_ONE		(1 << 7)	/* must be set */
+#define USB_CONFIG_ATT_SELFPOWER	(1 << 6)	/* self powered */
+#define USB_CONFIG_ATT_WAKEUP		(1 << 5)	/* can wakeup */
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_STRING: String descriptor */
+struct usb_string_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u16 wData[1];		/* UTF-16LE encoded */
+} __attribute__ ((packed));
+
+/* note that "string" zero is special, it holds language codes that
+ * the device supports, not Unicode characters.
+ */
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_INTERFACE: Interface descriptor */
+struct usb_interface_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u8  bInterfaceNumber;
+	__u8  bAlternateSetting;
+	__u8  bNumEndpoints;
+	__u8  bInterfaceClass;
+	__u8  bInterfaceSubClass;
+	__u8  bInterfaceProtocol;
+	__u8  iInterface;
+} __attribute__ ((packed));
+
+#define USB_DT_INTERFACE_SIZE		9
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_ENDPOINT: Endpoint descriptor */
+struct usb_endpoint_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u8  bEndpointAddress;
+	__u8  bmAttributes;
+	__u16 wMaxPacketSize;
+	__u8  bInterval;
+
+	// NOTE:  these two are _only_ in audio endpoints.
+	// use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof.
+	__u8  bRefresh;
+	__u8  bSynchAddress;
+} __attribute__ ((packed));
+
+#define USB_DT_ENDPOINT_SIZE		7
+#define USB_DT_ENDPOINT_AUDIO_SIZE	9	/* Audio extension */
+
+
+/*
+ * Endpoints
+ */
+#define USB_ENDPOINT_NUMBER_MASK	0x0f	/* in bEndpointAddress */
+#define USB_ENDPOINT_DIR_MASK		0x80
+
+#define USB_ENDPOINT_XFERTYPE_MASK	0x03	/* in bmAttributes */
+#define USB_ENDPOINT_XFER_CONTROL	0
+#define USB_ENDPOINT_XFER_ISOC		1
+#define USB_ENDPOINT_XFER_BULK		2
+#define USB_ENDPOINT_XFER_INT		3
+
+
+/*-------------------------------------------------------------------------*/
+
+/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */
+struct usb_qualifier_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u16 bcdUSB;
+	__u8  bDeviceClass;
+	__u8  bDeviceSubClass;
+	__u8  bDeviceProtocol;
+	__u8  bMaxPacketSize0;
+	__u8  bNumConfigurations;
+	__u8  bRESERVED;
+} __attribute__ ((packed));
+
+
+/*-------------------------------------------------------------------------*/
+
+/* USB 2.0 defines three speeds, here's how Linux identifies them */
+
+enum usb_device_speed {
+	USB_SPEED_UNKNOWN = 0,			/* enumerating */
+	USB_SPEED_LOW, USB_SPEED_FULL,		/* usb 1.1 */
+	USB_SPEED_HIGH				/* usb 2.0 */
+};
+
+#endif	/* __LINUX_USB_CH9_H */
diff -Nru a/include/net/arp.h b/include/net/arp.h
--- a/include/net/arp.h	Wed Oct 30 16:44:25 2002
+++ b/include/net/arp.h	Wed Oct 30 16:44:25 2002
@@ -18,7 +18,6 @@
 extern int	arp_bind_neighbour(struct dst_entry *dst);
 extern int	arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir);
 extern void	arp_ifdown(struct net_device *dev);
-extern unsigned arp_state_to_flags(struct neighbour *neigh);
 
 extern struct neigh_ops arp_broken_ops;
 
diff -Nru a/include/net/dst.h b/include/net/dst.h
--- a/include/net/dst.h	Wed Oct 30 16:44:33 2002
+++ b/include/net/dst.h	Wed Oct 30 16:44:33 2002
@@ -9,6 +9,7 @@
 #define _NET_DST_H
 
 #include <linux/config.h>
+#include <linux/rtnetlink.h>
 #include <net/neighbour.h>
 
 /*
@@ -22,6 +23,13 @@
 #define DST_GC_INC	(5*HZ)
 #define DST_GC_MAX	(120*HZ)
 
+/* Each dst_entry has reference count and sits in some parent list(s).
+ * When it is removed from parent list, it is "freed" (dst_free).
+ * After this it enters dead state (dst->obsolete > 0) and if its refcnt
+ * is zero, it can be destroyed immediately, otherwise it is added
+ * to gc list and garbage collector periodically checks the refcnt.
+ */
+
 struct sk_buff;
 
 struct dst_entry
@@ -34,20 +42,15 @@
 	int			obsolete;
 	int			flags;
 #define DST_HOST		1
+#define DST_NOXFRM		2
+#define DST_NOPOLICY		4
 	unsigned long		lastuse;
 	unsigned long		expires;
 
 	unsigned		header_len;	/* more space at head required */
 
-	unsigned		mxlock;
-	unsigned		pmtu;
-	unsigned		window;
-	unsigned		rtt;
-	unsigned		rttvar;
-	unsigned		ssthresh;
-	unsigned		cwnd;
-	unsigned		advmss;
-	unsigned		reordering;
+	u32			metrics[RTAX_MAX];
+	struct dst_entry	*path;
 
 	unsigned long		rate_last;	/* rate limiting for ICMP */
 	unsigned long		rate_tokens;
@@ -56,6 +59,7 @@
 
 	struct neighbour	*neighbour;
 	struct hh_cache		*hh;
+	struct xfrm_state	*xfrm;
 
 	int			(*input)(struct sk_buff*);
 	int			(*output)(struct sk_buff*);
@@ -78,11 +82,11 @@
 
 	int			(*gc)(void);
 	struct dst_entry *	(*check)(struct dst_entry *, __u32 cookie);
-	struct dst_entry *	(*reroute)(struct dst_entry *,
-					   struct sk_buff *);
 	void			(*destroy)(struct dst_entry *);
 	struct dst_entry *	(*negative_advice)(struct dst_entry *);
 	void			(*link_failure)(struct sk_buff *);
+	void			(*update_pmtu)(struct dst_entry *dst, u32 mtu);
+	int			(*get_mss)(struct dst_entry *dst, u32 mtu);
 	int			entry_size;
 
 	atomic_t		entries;
@@ -91,6 +95,33 @@
 
 #ifdef __KERNEL__
 
+static inline u32
+dst_metric(struct dst_entry *dst, int metric)
+{
+	return dst->metrics[metric-1];
+}
+
+static inline u32
+dst_path_metric(struct dst_entry *dst, int metric)
+{
+	return dst->path->metrics[metric-1];
+}
+
+static inline u32
+dst_pmtu(struct dst_entry *dst)
+{
+	u32 mtu = dst_path_metric(dst, RTAX_MTU);
+	/* Yes, _exactly_. This is paranoia. */
+	barrier();
+	return mtu;
+}
+
+static inline int
+dst_metric_locked(struct dst_entry *dst, int metric)
+{
+	return dst_metric(dst, RTAX_LOCK) & (1<<metric);
+}
+
 static inline void dst_hold(struct dst_entry * dst)
 {
 	atomic_inc(&dst->__refcnt);
@@ -202,6 +233,11 @@
 }
 
 extern void		dst_init(void);
+
+struct flowi;
+extern int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
+		       struct sock *sk, int flags);
+
 
 #endif
 
diff -Nru a/include/net/ip.h b/include/net/ip.h
--- a/include/net/ip.h	Wed Oct 30 16:44:30 2002
+++ b/include/net/ip.h	Wed Oct 30 16:44:30 2002
@@ -162,14 +162,6 @@
 extern int sysctl_ip_default_ttl;
 
 #ifdef CONFIG_INET
-static inline int ip_send(struct sk_buff *skb)
-{
-	if (skb->len > skb->dst->pmtu)
-		return ip_fragment(skb, ip_finish_output);
-	else
-		return ip_finish_output(skb);
-}
-
 /* The function in 2.2 was invalid, producing wrong result for
  * check=0xFEFF. It was noticed by Arthur Skawina _year_ ago. --ANK(000625) */
 static inline
@@ -186,7 +178,7 @@
 {
 	return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO ||
 		(inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT &&
-		 !(dst->mxlock&(1<<RTAX_MTU))));
+		 !(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU))));
 }
 
 extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more);
@@ -282,6 +274,7 @@
 extern void	ip_local_error(struct sock *sk, int err, u32 daddr, u16 dport,
 			       u32 info);
 
+extern int ip_seq_release(struct inode *inode, struct file *file);
 extern int ipv4_proc_init(void);
 
 #endif	/* _IP_H */
diff -Nru a/include/net/ip_fib.h b/include/net/ip_fib.h
--- a/include/net/ip_fib.h	Wed Oct 30 16:44:33 2002
+++ b/include/net/ip_fib.h	Wed Oct 30 16:44:33 2002
@@ -67,7 +67,7 @@
 	int			fib_protocol;
 	u32			fib_prefsrc;
 	u32			fib_priority;
-	unsigned		fib_metrics[RTAX_MAX];
+	u32			fib_metrics[RTAX_MAX];
 #define fib_mtu fib_metrics[RTAX_MTU-1]
 #define fib_window fib_metrics[RTAX_WINDOW-1]
 #define fib_rtt fib_metrics[RTAX_RTT-1]
@@ -129,7 +129,6 @@
 	int		(*tb_dump)(struct fib_table *table, struct sk_buff *skb,
 				     struct netlink_callback *cb);
 	int		(*tb_flush)(struct fib_table *table);
-	int		(*tb_seq_show)(struct fib_table *table, struct seq_file *seq);
 	void		(*tb_select_default)(struct fib_table *table,
 					     const struct flowi *flp, struct fib_result *res);
 
@@ -277,5 +276,7 @@
 #endif
 }
 
+extern int fib_proc_init(void);
+extern void fib_proc_exit(void);
 
 #endif  /* _NET_FIB_H */
diff -Nru a/include/net/ipip.h b/include/net/ipip.h
--- a/include/net/ipip.h	Wed Oct 30 16:44:34 2002
+++ b/include/net/ipip.h	Wed Oct 30 16:44:34 2002
@@ -34,7 +34,7 @@
 	ip_select_ident(iph, &rt->u.dst, NULL);				\
 	ip_send_check(iph);						\
 									\
-	err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, do_ip_send); \
+	err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, dst_output);\
 	if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) {		\
 		stats->tx_bytes += pkt_len;				\
 		stats->tx_packets++;					\
diff -Nru a/include/net/ipv6.h b/include/net/ipv6.h
--- a/include/net/ipv6.h	Wed Oct 30 16:44:32 2002
+++ b/include/net/ipv6.h	Wed Oct 30 16:44:32 2002
@@ -102,6 +102,9 @@
 
 #include <net/sock.h>
 
+/* sysctls */
+extern int sysctl_ipv6_bindv6only;
+
 extern struct ipv6_mib		ipv6_statistics[NR_CPUS*2];
 #define IP6_INC_STATS(field)		SNMP_INC_STATS(ipv6_statistics, field)
 #define IP6_INC_STATS_BH(field)		SNMP_INC_STATS_BH(ipv6_statistics, field)
diff -Nru a/include/net/route.h b/include/net/route.h
--- a/include/net/route.h	Wed Oct 30 16:44:17 2002
+++ b/include/net/route.h	Wed Oct 30 16:44:17 2002
@@ -112,10 +112,10 @@
 				       u32 src, u8 tos, struct net_device *dev);
 extern void		ip_rt_advice(struct rtable **rp, int advice);
 extern void		rt_cache_flush(int how);
-extern int		ip_route_output_key(struct rtable **, const struct flowi *flp);
+extern int		__ip_route_output_key(struct rtable **, const struct flowi *flp);
+extern int		ip_route_output_key(struct rtable **, struct flowi *flp);
 extern int		ip_route_input(struct sk_buff*, u32 dst, u32 src, u8 tos, struct net_device *devin);
 extern unsigned short	ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
-extern void		ip_rt_update_pmtu(struct dst_entry *dst, unsigned mtu);
 extern void		ip_rt_send_redirect(struct sk_buff *skb);
 
 extern unsigned		inet_addr_type(u32 addr);
@@ -139,22 +139,44 @@
 	return ip_tos2prio[IPTOS_TOS(tos)>>1];
 }
 
-static inline int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 tos, int oif)
+static inline int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 tos, int oif, u8 protocol, u16 sport, u16 dport)
 {
-	struct flowi fl = { .nl_u = { .ip4_u = { .daddr = dst,
+	struct flowi fl = { .oif = oif,
+			    .nl_u = { .ip4_u = { .daddr = dst,
 						 .saddr = src,
 						 .tos   = tos } },
-			    .oif = oif };
+			    .proto = protocol,
+			    .uli_u = { .ports =
+				       { .sport = sport,
+					 .dport = dport } } };
 
 	int err;
-	err = ip_route_output_key(rp, &fl);
-	if (err || (dst && src))
-		return err;
-	fl.fl4_dst = (*rp)->rt_dst;
-	fl.fl4_src = (*rp)->rt_src;
-	ip_rt_put(*rp);
-	*rp = NULL;
+	if (!dst || !src) {
+		err = __ip_route_output_key(rp, &fl);
+		if (err)
+			return err;
+		fl.fl4_dst = (*rp)->rt_dst;
+		fl.fl4_src = (*rp)->rt_src;
+		ip_rt_put(*rp);
+		*rp = NULL;
+	}
 	return ip_route_output_key(rp, &fl);
+}
+
+static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport)
+{
+	if (sport != (*rp)->fl.uli_u.ports.sport ||
+	    dport != (*rp)->fl.uli_u.ports.dport) {
+		struct flowi fl;
+
+		memcpy(&fl, &(*rp)->fl, sizeof(fl));
+		fl.uli_u.ports.sport = sport;
+		fl.uli_u.ports.dport = dport;
+		ip_rt_put(*rp);
+		*rp = NULL;
+		return ip_route_output_key(rp, &fl);
+	}
+	return 0;
 }
 
 extern void rt_bind_peer(struct rtable *rt, int create);
diff -Nru a/include/net/sock.h b/include/net/sock.h
--- a/include/net/sock.h	Wed Oct 30 16:44:30 2002
+++ b/include/net/sock.h	Wed Oct 30 16:44:30 2002
@@ -52,6 +52,9 @@
 #include <asm/atomic.h>
 #include <net/dst.h>
 #include <net/scm.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+#include <linux/fcblist.h>
 
 /*
  * This structure really needs to be cleaned up.
@@ -766,8 +769,13 @@
 
 static inline void sk_wake_async(struct sock *sk, int how, int band)
 {
-	if (sk->socket && sk->socket->fasync_list)
-		sock_wake_async(sk->socket, how, band);
+	if (sk->socket) {
+		if (sk->socket->file)
+			file_send_notify(sk->socket->file, ion_band_table[band - POLL_IN],
+					 poll_band_table[band - POLL_IN]);
+		if (sk->socket->fasync_list)
+			sock_wake_async(sk->socket, how, band);
+	}
 }
 
 #define SOCK_MIN_SNDBUF 2048
diff -Nru a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h	Wed Oct 30 16:44:22 2002
+++ b/include/net/tcp.h	Wed Oct 30 16:44:22 2002
@@ -921,9 +921,11 @@
 	int mss_now = large && (sk->route_caps&NETIF_F_TSO) && !tp->urg_mode ?
 		tp->mss_cache : tp->mss_cache_std;
 
-	if (dst && dst->pmtu != tp->pmtu_cookie)
- 		mss_now = tcp_sync_mss(sk, dst->pmtu);
-
+	if (dst) {
+		u32 mtu = dst_pmtu(dst);
+		if (mtu != tp->pmtu_cookie)
+			mss_now = tcp_sync_mss(sk, mtu);
+	}
 	if (tp->eff_sacks)
 		mss_now -= (TCPOLEN_SACK_BASE_ALIGNED +
 			    (tp->eff_sacks * TCPOLEN_SACK_PERBLOCK));
diff -Nru a/include/net/udp.h b/include/net/udp.h
--- a/include/net/udp.h	Wed Oct 30 16:44:31 2002
+++ b/include/net/udp.h	Wed Oct 30 16:44:31 2002
@@ -76,4 +76,6 @@
 #define UDP_INC_STATS_BH(field)		SNMP_INC_STATS_BH(udp_statistics, field)
 #define UDP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(udp_statistics, field)
 
+extern int udp_proc_init(void);
+
 #endif	/* _UDP_H */
diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/net/xfrm.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,386 @@
+#include <linux/types.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+
+#include <net/dst.h>
+#include <net/route.h>
+
+/* Organization of SPD aka "XFRM rules"
+   ------------------------------------
+
+   Basic objects:
+   - policy rule, struct xfrm_policy (=SPD entry)
+   - bundle of transformations, struct dst_entry == struct xfrm_dst (=SA bundle)
+   - instance of a transformer, struct xfrm_state (=SA)
+   - template to clone xfrm_state, struct xfrm_tmpl
+
+   SPD is plain linear list of xfrm_policy rules, ordered by priority.
+   (To be compatible with existing pfkeyv2 implementations,
+   many rules with priority of 0x7fffffff are allowed to exist and
+   such rules are ordered in an unpredictable way, thanks to bsd folks.)
+
+   Lookup is plain linear search until the first match with selector.
+
+   If "action" is "block", then we prohibit the flow, otherwise:
+   if "xfrms_nr" is zero, the flow passes untransformed. Otherwise,
+   policy entry has list of up to XFRM_MAX_DEPTH transformations,
+   described by templates xfrm_tmpl. Each template is resolved
+   to a complete xfrm_state (see below) and we pack bundle of transformations
+   to a dst_entry returned to requestor.
+
+   dst -. xfrm  .-> xfrm_state #1
+    |---. child .-> dst -. xfrm .-> xfrm_state #2
+                     |---. child .-> dst -. xfrm .-> xfrm_state #3
+                                      |---. child .-> NULL
+
+   Bundles are cached at xrfm_policy struct (field ->bundles).
+
+
+   Resolution of xrfm_tmpl
+   -----------------------
+   Template contains:
+   1. ->mode		Mode: transport or tunnel
+   2. ->id.proto	Protocol: AH/ESP/IPCOMP
+   3. ->id.daddr	Remote tunnel endpoint, ignored for transport mode.
+      Q: allow to resolve security gateway?
+   4. ->id.spi          If not zero, static SPI.
+   5. ->saddr		Local tunnel endpoint, ignored for transport mode.
+   6. ->algos		List of allowed algos. Plain bitmask now.
+      Q: ealgos, aalgos, calgos. What a mess...
+   7. ->share		Sharing mode.
+      Q: how to implement private sharing mode? To add struct sock* to
+      flow id?
+   8. ->resolved	If template uniquely resolves to a static xfrm_state,
+                        the reference is stores here.
+
+   Having this template we search through SAD searching for entries
+   with appropriate mode/proto/algo, permitted by selector.
+   If no appropriate entry found, it is requested from key manager.
+
+   PROBLEMS:
+   Q: How to find all the bundles referring to a physical path for
+      PMTU discovery? Seems, dst should contain list of all parents...
+      and enter to infinite locking hierarchy disaster.
+      No! It is easier, we will not search for them, let them find us.
+      We add genid to each dst plus pointer to genid of raw IP route,
+      pmtu disc will update pmtu on raw IP route and increase its genid.
+      dst_check() will see this for top level and trigger resyncing
+      metrics. Plus, it will be made via sk->dst_cache. Solved.
+ */
+
+/* Structure to encapsulate addresses. I do not want to use
+ * "standard" structure. My apologies. */
+
+typedef union
+{
+	struct {
+		u32	addr;
+		u32	mask;	/* Use unused bits to cache mask. */
+	} a4;
+#define xfrm4_addr a4.addr
+#define xfrm4_mask a4.mask
+	u32		a6[4];
+} xfrm_address_t;
+
+/* Ident of a specific xfrm_state. It is used on input to lookup
+ * the state by (spi,daddr,ah/esp) or to store information about
+ * spi, protocol and tunnel address on output. */
+
+struct xfrm_id
+{
+	xfrm_address_t	daddr;
+	__u32		spi;
+	__u8		proto;
+};
+
+/* Selector, used as selector both on policy rules (SPD) and SAs. */
+
+struct xfrm_selector
+{
+	xfrm_address_t	daddr;
+	xfrm_address_t	saddr;
+	__u16	dport;
+	__u16	dport_mask;
+	__u16	sport;
+	__u16	sport_mask;
+	__u8	prefixlen_d;
+	__u8	prefixlen_s;
+	__u8	proto;
+	int	ifindex;
+	uid_t	user;
+	void	*owner;
+};
+
+
+/* Full description of state of transformer. */
+struct xfrm_state
+{
+	struct list_head	bydst;
+	struct list_head	byspi;
+
+	atomic_t		refcnt;
+	spinlock_t		lock;
+
+	struct xfrm_id		id;
+	struct xfrm_selector	sel;
+
+	/* Key manger bits */
+	struct {
+		int		state;
+		u32		seq;
+		u32		warn_bytes;
+	} km;
+
+	/* Parameters of this state. */
+	struct {
+		u8		mode;
+		u8		algo;
+		xfrm_address_t	saddr;
+		int		header_len;
+		int		trailer_len;
+		u32		hard_byte_limit;
+		u32		soft_byte_limit;
+		u32		replay_window;
+		/* More... */
+	} props;
+
+	/* State for replay detection */
+	struct {
+		u32		oseq;
+		u32		seq;
+		u32		bitmap;
+	} replay;
+
+	/* Statistics */
+	struct {
+		unsigned long	lastuse;
+		unsigned long	expires;
+		u32		bytes;
+		u32		replay_window;
+		u32		replay;
+		u32		integrity_failed;
+		/* More... */
+	} stats;
+
+	/* Reference to data common to all the instances of this
+	 * transformer. */
+	struct xfrm_type	*type;
+
+	/* Private data of this transformer, format is opaque,
+	 * interpreted by xfrm_type methods. */
+	void			*data;
+};
+
+enum {
+	XFRM_STATE_VOID,
+	XFRM_STATE_ACQ,
+	XFRM_STATE_VALID,
+	XFRM_STATE_ERROR,
+	XFRM_STATE_EXPIRED,
+	XFRM_STATE_DEAD
+};
+
+#define XFRM_DST_HSIZE		1024
+
+struct xfrm_type
+{
+	char			*description;
+	atomic_t		refcnt;
+	__u8			proto;
+	__u8			algo;
+
+	int			(*init_state)(struct xfrm_state *x, void *args);
+	void			(*destructor)(struct xfrm_state *);
+	int			(*input)(struct xfrm_state *, struct sk_buff *skb);
+	int			(*output)(struct sk_buff *skb);
+	/* Estimate maximal size of result of transformation of a dgram */
+	u32			(*get_max_size)(struct xfrm_state *, int size);
+};
+
+struct xfrm_tmpl
+{
+/* id in template is interpreted as:
+ * daddr - destination of tunnel, may be zero for transport mode.
+ * spi   - zero to acquire spi. Not zero if spi is static, then
+ *	   daddr must be fixed too.
+ * proto - AH/ESP/IPCOMP
+ */
+	struct xfrm_id		id;
+
+/* Source address of tunnel. Ignored, if it is not a tunnel. */
+	xfrm_address_t		saddr;
+
+/* Mode: transport/tunnel */
+	__u8			mode;
+
+/* Sharing mode: unique, this session only, this user only etc. */
+	__u8			share;
+
+/* Bit mask of algos allowed for acquisition */
+	__u32			algos;
+
+/* If template statically resolved, hold ref here */
+	struct xfrm_state      *resolved;
+};
+
+#define XFRM_MAX_DEPTH		3
+
+enum
+{
+	XFRM_SHARE_ANY,		/* No limitations */
+	XFRM_SHARE_SESSION,	/* For this session only */
+	XFRM_SHARE_USER,	/* For this user only */
+	XFRM_SHARE_UNIQUE	/* Use once */
+};
+
+enum
+{
+	XFRM_POLICY_IN	= 0,
+	XFRM_POLICY_FWD	= 1,
+	XFRM_POLICY_OUT	= 2,
+	XFRM_POLICY_MAX	= 3
+};
+
+struct xfrm_policy
+{
+	struct xfrm_policy	*next;
+
+	/* This lock only affects elements except for entry. */
+	rwlock_t		lock;
+	atomic_t		refcnt;
+
+	u32			priority;
+	u32			index;
+	struct xfrm_selector	selector;
+	unsigned long		expires;
+	unsigned long		lastuse;
+	struct dst_entry       *bundles;
+	__u8			action;
+#define XFRM_POLICY_ALLOW	0
+#define XFRM_POLICY_BLOCK	1
+	__u8			flags;
+#define XFRM_POLICY_LOCALOK	1	/* Allow user to override global policy */
+	__u8			dead;
+	__u8			xfrm_nr;
+	struct xfrm_tmpl       	xfrm_vec[XFRM_MAX_DEPTH];
+};
+
+extern struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX];
+
+static inline void xfrm_pol_hold(struct xfrm_policy *policy)
+{
+	if (policy)
+		atomic_inc(&policy->refcnt);
+}
+
+extern void __xfrm_policy_destroy(struct xfrm_policy *policy);
+
+static inline void xfrm_pol_put(struct xfrm_policy *policy)
+{
+	if (atomic_dec_and_test(&policy->refcnt))
+		__xfrm_policy_destroy(policy);
+}
+
+extern void __xfrm_state_destroy(struct xfrm_state *);
+
+static inline void xfrm_state_put(struct xfrm_state *x)
+{
+	if (atomic_dec_and_test(&x->refcnt))
+		__xfrm_state_destroy(x);
+}
+
+static inline int
+xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)
+{
+	return	!((fl->fl4_dst^sel->daddr.xfrm4_addr)&sel->daddr.xfrm4_mask) &&
+		!((fl->uli_u.ports.dport^sel->dport)&sel->dport_mask) &&
+		!((fl->uli_u.ports.sport^sel->sport)&sel->sport_mask) &&
+		(fl->proto == sel->proto || !sel->proto) &&
+		(fl->oif == sel->ifindex || !sel->ifindex) &&
+		!((fl->fl4_src^sel->saddr.xfrm4_addr)&sel->saddr.xfrm4_mask);
+}
+
+/* A struct encoding bundle of transformations to apply to some set of flow.
+ *
+ * dst->child points to the next element of bundle.
+ * dst->xfrm  points to an instanse of transformer.
+ *
+ * Due to unfortunate limitations of current routing cache, which we
+ * have no time to fix, it mirrors struct rtable and bound to the same
+ * routing key, including saddr,daddr. However, we can have many of
+ * bundles differing by session id. All the bundles grow from a parent
+ * policy rule.
+ */
+struct xfrm_dst
+{
+	union {
+		struct xfrm_dst		*next;
+		struct dst_entry	dst;
+		struct rtable		rt;
+	} u;
+};
+
+struct sec_path
+{
+	atomic_t		refcnt;
+	int			len;
+	struct xfrm_state	*xvec[XFRM_MAX_DEPTH];
+};
+
+static inline struct sec_path *
+secpath_get(struct sec_path *sp)
+{
+	if (sp)
+		atomic_inc(&sp->refcnt);
+	return sp;
+}
+
+extern void __secpath_destroy(struct sec_path *sp);
+
+static inline void
+secpath_put(struct sec_path *sp)
+{
+	if (sp && atomic_dec_and_test(&sp->refcnt))
+		__secpath_destroy(sp);
+}
+
+extern int __xfrm_policy_check(int dir, struct sk_buff *skb);
+
+static inline int xfrm_policy_check(int dir, struct sk_buff *skb)
+{
+	return	!xfrm_policy_list[dir] ||
+		(skb->dst->flags & DST_NOPOLICY) ||
+		__xfrm_policy_check(dir, skb);
+}
+
+extern int __xfrm_route_forward(struct sk_buff *skb);
+
+static inline int xfrm_route_forward(struct sk_buff *skb)
+{
+	return	!xfrm_policy_list[XFRM_POLICY_OUT] ||
+		(skb->dst->flags & DST_NOXFRM) ||
+		__xfrm_route_forward(skb);
+}
+
+extern void xfrm_state_init(void);
+extern void xfrm_input_init(void);
+extern struct xfrm_state *xfrm_state_alloc(void);
+extern struct xfrm_state *xfrm_state_find(u32 daddr, struct flowi *fl, struct xfrm_tmpl *tmpl);
+extern int xfrm_state_check_expire(struct xfrm_state *x);
+extern void xfrm_state_insert(struct xfrm_state *x);
+extern int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb);
+extern struct xfrm_state * xfrm_state_lookup(u32 daddr, u32 spi, u8 proto);
+extern struct xfrm_policy *xfrm_policy_lookup(int dir, struct flowi *fl);
+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 xfrm4_rcv(struct sk_buff *skb);
+
+
+extern wait_queue_head_t *km_waitq;
+extern void km_notify(struct xfrm_state *x, int event);
+extern int km_query(struct xfrm_state *x);
+
+extern int ah4_init(void);
diff -Nru a/include/scsi/scsicam.h b/include/scsi/scsicam.h
--- a/include/scsi/scsicam.h	Wed Oct 30 16:44:27 2002
+++ b/include/scsi/scsicam.h	Wed Oct 30 16:44:27 2002
@@ -12,7 +12,7 @@
 
 #ifndef SCSICAM_H
 #define SCSICAM_H
-extern int scsicam_bios_param (Disk *disk, struct block_device *bdev, int *ip);
+extern int scsicam_bios_param (struct block_device *bdev, sector_t capacity, int *ip);
 extern int scsi_partsize(unsigned char *buf, unsigned long capacity,
            unsigned int  *cyls, unsigned int *hds, unsigned int *secs);
 extern unsigned char *scsi_bios_ptable(struct block_device *bdev);
diff -Nru a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
--- a/include/sound/ac97_codec.h	Wed Oct 30 16:44:29 2002
+++ b/include/sound/ac97_codec.h	Wed Oct 30 16:44:29 2002
@@ -89,7 +89,7 @@
 #define AC97_BC_BASS_TREBLE	0x0004	/* Bass & Treble Control */
 #define AC97_BC_SIM_STEREO	0x0008	/* Simulated stereo */
 #define AC97_BC_HEADPHONE	0x0010	/* Headphone Out Support */
-#define AC97_BC_LOUDNESS	0x0020	/* Loudness (bass boost) Supporqt */
+#define AC97_BC_LOUDNESS	0x0020	/* Loudness (bass boost) Support */
 #define AC97_BC_16BIT_DAC	0x0000	/* 16-bit DAC resolution */
 #define AC97_BC_18BIT_DAC	0x0040	/* 18-bit DAC resolution */
 #define AC97_BC_20BIT_DAC	0x0080	/* 20-bit DAC resolution */
@@ -194,6 +194,10 @@
 #define AC97_CXR_SPDIF_MASK	(3<<0)
 #define AC97_CXR_SPDIF_PCM	0x0
 #define AC97_CXR_SPDIF_AC3	0x2
+
+/* specific - ALC */
+#define AC97_ALC650_MULTICH	0x6a
+#define AC97_ALC650_CLOCK	0x7a
 
 /* ac97->scaps */
 #define AC97_SCAP_AUDIO		(1<<0)	/* audio AC'97 codec */
diff -Nru a/include/sound/core.h b/include/sound/core.h
--- a/include/sound/core.h	Wed Oct 30 16:44:35 2002
+++ b/include/sound/core.h	Wed Oct 30 16:44:35 2002
@@ -200,9 +200,9 @@
 /* sound.c */
 
 extern int snd_ecards_limit;
-extern int snd_device_mode;
-extern int snd_device_gid;
-extern int snd_device_uid;
+extern int device_mode;
+extern int device_gid;
+extern int device_uid;
 
 void snd_request_card(int card);
 
diff -Nru a/include/sound/sb.h b/include/sound/sb.h
--- a/include/sound/sb.h	Wed Oct 30 16:44:28 2002
+++ b/include/sound/sb.h	Wed Oct 30 16:44:28 2002
@@ -99,6 +99,7 @@
 	snd_rawmidi_t *rmidi;
 	snd_rawmidi_substream_t *midi_substream_input;
 	snd_rawmidi_substream_t *midi_substream_output;
+	void (*rmidi_callback)(int irq, void *dev_id, struct pt_regs *regs);
 
 	spinlock_t reg_lock;
 	spinlock_t open_lock;
diff -Nru a/include/sound/version.h b/include/sound/version.h
--- a/include/sound/version.h	Wed Oct 30 16:44:27 2002
+++ b/include/sound/version.h	Wed Oct 30 16:44:27 2002
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated automatically by configure.  */
-#define CONFIG_SND_VERSION "0.9.0rc3"
-#define CONFIG_SND_DATE " (Mon Oct 14 16:41:26 2002 UTC)"
+#define CONFIG_SND_VERSION "0.9.0rc5"
+#define CONFIG_SND_DATE " (Tue Oct 29 09:19:27 2002 UTC)"
diff -Nru a/init/Config.help b/init/Config.help
--- a/init/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,117 +0,0 @@
-CONFIG_EXPERIMENTAL
-  Some of the various things that Linux supports (such as network
-  drivers, file systems, network protocols, etc.) can be in a state
-  of development where the functionality, stability, or the level of
-  testing is not yet high enough for general use. This is usually
-  known as the "alpha-test" phase among developers. If a feature is
-  currently in alpha-test, then the developers usually discourage
-  uninformed widespread use of this feature by the general public to
-  avoid "Why doesn't this work?" type mail messages. However, active
-  testing and use of these systems is welcomed. Just be aware that it
-  may not meet the normal level of reliability or it may fail to work
-  in some special cases. Detailed bug reports from people familiar
-  with the kernel internals are usually welcomed by the developers
-  (before submitting bug reports, please read the documents
-  <file:README>, <file:MAINTAINERS>, <file:REPORTING-BUGS>,
-  <file:Documentation/BUG-HUNTING>, and
-  <file:Documentation/oops-tracing.txt> in the kernel source).
-
-  This option will also make obsoleted drivers available. These are
-  drivers that have been replaced by something else, and/or are
-  scheduled to be removed in a future kernel release.
-
-  Unless you intend to help test and develop a feature or driver that
-  falls into this category, or you have a situation that requires
-  using these features, you should probably say N here, which will
-  cause the configurator to present you with fewer choices. If
-  you say Y here, you will be offered the choice of using features or
-  drivers that are currently considered to be in the alpha-test phase.
-
-CONFIG_NET
-  Unless you really know what you are doing, you should say Y here.
-  The reason is that some programs need kernel networking support even
-  when running on a stand-alone machine that isn't connected to any
-  other computer. If you are upgrading from an older kernel, you
-  should consider updating your networking tools too because changes
-  in the kernel and the tools often go hand in hand. The tools are
-  contained in the package net-tools, the location and version number
-  of which are given in <file:Documentation/Changes>.
-
-  For a general introduction to Linux networking, it is highly
-  recommended to read the NET-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-CONFIG_SYSVIPC
-  Inter Process Communication is a suite of library functions and
-  system calls which let processes (running programs) synchronize and
-  exchange information. It is generally considered to be a good thing,
-  and some programs won't run unless you say Y here. In particular, if
-  you want to run the DOS emulator dosemu under Linux (read the
-  DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>), you'll need to say Y
-  here.
-
-  You can find documentation about IPC with "info ipc" and also in
-  section 6.4 of the Linux Programmer's Guide, available from
-  <http://www.linuxdoc.org/docs.html#guide>.
-
-CONFIG_BSD_PROCESS_ACCT
-  If you say Y here, a user level program will be able to instruct the
-  kernel (via a special system call) to write process accounting
-  information to a file: whenever a process exits, information about
-  that process will be appended to the file by the kernel.  The
-  information includes things such as creation time, owning user,
-  command name, memory usage, controlling terminal etc. (the complete
-  list is in the struct acct in <file:include/linux/acct.h>).  It is
-  up to the user level program to do useful things with this
-  information.  This is generally a good idea, so say Y.
-
-CONFIG_SYSCTL
-  The sysctl interface provides a means of dynamically changing
-  certain kernel parameters and variables on the fly without requiring
-  a recompile of the kernel or reboot of the system.  The primary
-  interface consists of a system call, but if you say Y to "/proc
-  file system support", a tree of modifiable sysctl entries will be
-  generated beneath the /proc/sys directory. They are explained in the
-  files in <file:Documentation/sysctl/>.  Note that enabling this
-  option will enlarge the kernel by at least 8 KB.
-
-  As it is generally a good thing, you should say Y here unless
-  building a kernel for install/rescue disks or your system is very
-  limited in memory.
-
-CONFIG_MODULES
-  Kernel modules are small pieces of compiled code which can be
-  inserted in or removed from the running kernel, using the programs
-  insmod and rmmod. This is described in the file
-  <file:Documentation/modules.txt>, including the fact that you have
-  to say "make modules" in order to compile the modules that you chose
-  during kernel configuration.  Modules can be device drivers, file
-  systems, binary executable formats, and so on. If you think that you
-  may want to make use of modules with this kernel in the future, then
-  say Y here.  If unsure, say Y.
-
-CONFIG_MODVERSIONS
-  Usually, modules have to be recompiled whenever you switch to a new
-  kernel.  Saying Y here makes it possible, and safe, to use the
-  same modules even after compiling a new kernel; this requires the
-  program modprobe. All the software needed for module support is in
-  the modutils package (check the file <file:Documentation/Changes>
-  for location and latest version).  NOTE: if you say Y here but don't
-  have the program genksyms (which is also contained in the above
-  mentioned modutils package), then the building of your kernel will
-  fail.  If you are going to use modules that are generated from
-  non-kernel sources, you would benefit from this option.  Otherwise
-  it's not that important.  So, N ought to be a safe bet.
-
-CONFIG_KMOD
-  Normally when you have selected some drivers and/or file systems to
-  be created as loadable modules, you also have the responsibility to
-  load the corresponding modules (using the programs insmod or
-  modprobe) before you can use them. If you say Y here however, the
-  kernel will be able to load modules for itself: when a part of the
-  kernel needs a module, it runs modprobe with the appropriate
-  arguments, thereby loading the module if it is available. (This is a
-  replacement for kerneld.) Say Y here and read about configuring it
-  in <file:Documentation/kmod.txt>.
-
diff -Nru a/init/Config.in b/init/Config.in
--- a/init/Config.in	Wed Oct 30 16:44:22 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-mainmenu_option next_comment
-comment 'Code maturity level options'
-bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-bool 'Networking support' CONFIG_NET
-bool 'System V IPC' CONFIG_SYSVIPC
-bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
-bool 'Sysctl support' CONFIG_SYSCTL
-endmenu
-
-mainmenu_option next_comment
-comment 'Loadable module support'
-bool 'Enable loadable module support' CONFIG_MODULES
-if [ "$CONFIG_MODULES" = "y" ]; then
-   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
-   bool '  Kernel module loader' CONFIG_KMOD
-fi
-endmenu
diff -Nru a/init/Kconfig b/init/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/init/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,150 @@
+
+menu "Code maturity level options"
+
+config EXPERIMENTAL
+	bool "Prompt for development and/or incomplete code/drivers"
+	---help---
+	  Some of the various things that Linux supports (such as network
+	  drivers, file systems, network protocols, etc.) can be in a state
+	  of development where the functionality, stability, or the level of
+	  testing is not yet high enough for general use. This is usually
+	  known as the "alpha-test" phase among developers. If a feature is
+	  currently in alpha-test, then the developers usually discourage
+	  uninformed widespread use of this feature by the general public to
+	  avoid "Why doesn't this work?" type mail messages. However, active
+	  testing and use of these systems is welcomed. Just be aware that it
+	  may not meet the normal level of reliability or it may fail to work
+	  in some special cases. Detailed bug reports from people familiar
+	  with the kernel internals are usually welcomed by the developers
+	  (before submitting bug reports, please read the documents
+	  <file:README>, <file:MAINTAINERS>, <file:REPORTING-BUGS>,
+	  <file:Documentation/BUG-HUNTING>, and
+	  <file:Documentation/oops-tracing.txt> in the kernel source).
+
+	  This option will also make obsoleted drivers available. These are
+	  drivers that have been replaced by something else, and/or are
+	  scheduled to be removed in a future kernel release.
+
+	  Unless you intend to help test and develop a feature or driver that
+	  falls into this category, or you have a situation that requires
+	  using these features, you should probably say N here, which will
+	  cause the configurator to present you with fewer choices. If
+	  you say Y here, you will be offered the choice of using features or
+	  drivers that are currently considered to be in the alpha-test phase.
+
+endmenu
+
+
+menu "General setup"
+
+config NET
+	bool "Networking support"
+	---help---
+	  Unless you really know what you are doing, you should say Y here.
+	  The reason is that some programs need kernel networking support even
+	  when running on a stand-alone machine that isn't connected to any
+	  other computer. If you are upgrading from an older kernel, you
+	  should consider updating your networking tools too because changes
+	  in the kernel and the tools often go hand in hand. The tools are
+	  contained in the package net-tools, the location and version number
+	  of which are given in <file:Documentation/Changes>.
+
+	  For a general introduction to Linux networking, it is highly
+	  recommended to read the NET-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+config SYSVIPC
+	bool "System V IPC"
+	---help---
+	  Inter Process Communication is a suite of library functions and
+	  system calls which let processes (running programs) synchronize and
+	  exchange information. It is generally considered to be a good thing,
+	  and some programs won't run unless you say Y here. In particular, if
+	  you want to run the DOS emulator dosemu under Linux (read the
+	  DOSEMU-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>), you'll need to say Y
+	  here.
+
+	  You can find documentation about IPC with "info ipc" and also in
+	  section 6.4 of the Linux Programmer's Guide, available from
+	  <http://www.linuxdoc.org/docs.html#guide>.
+
+config BSD_PROCESS_ACCT
+	bool "BSD Process Accounting"
+	help
+	  If you say Y here, a user level program will be able to instruct the
+	  kernel (via a special system call) to write process accounting
+	  information to a file: whenever a process exits, information about
+	  that process will be appended to the file by the kernel.  The
+	  information includes things such as creation time, owning user,
+	  command name, memory usage, controlling terminal etc. (the complete
+	  list is in the struct acct in <file:include/linux/acct.h>).  It is
+	  up to the user level program to do useful things with this
+	  information.  This is generally a good idea, so say Y.
+
+config SYSCTL
+	bool "Sysctl support"
+	---help---
+	  The sysctl interface provides a means of dynamically changing
+	  certain kernel parameters and variables on the fly without requiring
+	  a recompile of the kernel or reboot of the system.  The primary
+	  interface consists of a system call, but if you say Y to "/proc
+	  file system support", a tree of modifiable sysctl entries will be
+	  generated beneath the /proc/sys directory. They are explained in the
+	  files in <file:Documentation/sysctl/>.  Note that enabling this
+	  option will enlarge the kernel by at least 8 KB.
+
+	  As it is generally a good thing, you should say Y here unless
+	  building a kernel for install/rescue disks or your system is very
+	  limited in memory.
+
+endmenu
+
+
+menu "Loadable module support"
+
+config MODULES
+	bool "Enable loadable module support"
+	help
+	  Kernel modules are small pieces of compiled code which can be
+	  inserted in or removed from the running kernel, using the programs
+	  insmod and rmmod. This is described in the file
+	  <file:Documentation/modules.txt>, including the fact that you have
+	  to say "make modules" in order to compile the modules that you chose
+	  during kernel configuration.  Modules can be device drivers, file
+	  systems, binary executable formats, and so on. If you think that you
+	  may want to make use of modules with this kernel in the future, then
+	  say Y here.  If unsure, say Y.
+
+config MODVERSIONS
+	bool "Set version information on all module symbols"
+	depends on MODULES
+	---help---
+	  Usually, modules have to be recompiled whenever you switch to a new
+	  kernel.  Saying Y here makes it possible, and safe, to use the
+	  same modules even after compiling a new kernel; this requires the
+	  program modprobe. All the software needed for module support is in
+	  the modutils package (check the file <file:Documentation/Changes>
+	  for location and latest version).  NOTE: if you say Y here but don't
+	  have the program genksyms (which is also contained in the above
+	  mentioned modutils package), then the building of your kernel will
+	  fail.  If you are going to use modules that are generated from
+	  non-kernel sources, you would benefit from this option.  Otherwise
+	  it's not that important.  So, N ought to be a safe bet.
+
+config KMOD
+	bool "Kernel module loader"
+	depends on MODULES
+	help
+	  Normally when you have selected some drivers and/or file systems to
+	  be created as loadable modules, you also have the responsibility to
+	  load the corresponding modules (using the programs insmod or
+	  modprobe) before you can use them. If you say Y here however, the
+	  kernel will be able to load modules for itself: when a part of the
+	  kernel needs a module, it runs modprobe with the appropriate
+	  arguments, thereby loading the module if it is available. (This is a
+	  replacement for kerneld.) Say Y here and read about configuring it
+	  in <file:Documentation/kmod.txt>.
+
+endmenu
+
diff -Nru a/init/Makefile b/init/Makefile
--- a/init/Makefile	Wed Oct 30 16:44:27 2002
+++ b/init/Makefile	Wed Oct 30 16:44:27 2002
@@ -11,13 +11,13 @@
 
 # dependencies on generated files need to be listed explicitly
 
-$(obj)/version.o: $(obj)/../include/linux/compile.h
+$(obj)/version.o: include/linux/compile.h
 
 # compile.h changes depending on hostname, generation number, etc,
 # so we regenerate it always.
 # mkcompile_h will make sure to only update the
 # actual file if its content has changed.
 
-$(obj)/../include/linux/compile.h: FORCE
-	@echo -n '  Generating $(echo_target)'
-	@sh $(srctree)/scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
+include/linux/compile.h: FORCE
+	@echo -n '  Generating $@'
+	@sh $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
diff -Nru a/init/do_mounts.c b/init/do_mounts.c
--- a/init/do_mounts.c	Wed Oct 30 16:44:27 2002
+++ b/init/do_mounts.c	Wed Oct 30 16:44:27 2002
@@ -27,6 +27,7 @@
 extern asmlinkage long sys_mount(char *dev_name, char *dir_name, char *type,
 	 unsigned long flags, void *data);
 extern asmlinkage long sys_mkdir(const char *name, int mode);
+extern asmlinkage long sys_rmdir(const char *name);
 extern asmlinkage long sys_chdir(const char *name);
 extern asmlinkage long sys_fchdir(int fd);
 extern asmlinkage long sys_chroot(const char *name);
@@ -55,6 +56,7 @@
 
 int root_mountflags = MS_RDONLY | MS_VERBOSE;
 static char root_device_name[64];
+static char saved_root_name[64];
 
 /* this is initialized in init/main.c */
 dev_t ROOT_DEV;
@@ -87,169 +89,135 @@
 __setup("ro", readonly);
 __setup("rw", readwrite);
 
-static struct dev_name_struct {
-	const char *name;
-	const int num;
-} root_dev_names[] __initdata = {
-	{ "nfs",     0x00ff },
-	{ "hda",     0x0300 },
-	{ "hdb",     0x0340 },
-	{ "loop",    0x0700 },
-	{ "hdc",     0x1600 },
-	{ "hdd",     0x1640 },
-	{ "hde",     0x2100 },
-	{ "hdf",     0x2140 },
-	{ "hdg",     0x2200 },
-	{ "hdh",     0x2240 },
-	{ "hdi",     0x3800 },
-	{ "hdj",     0x3840 },
-	{ "hdk",     0x3900 },
-	{ "hdl",     0x3940 },
-	{ "hdm",     0x5800 },
-	{ "hdn",     0x5840 },
-	{ "hdo",     0x5900 },
-	{ "hdp",     0x5940 },
-	{ "hdq",     0x5A00 },
-	{ "hdr",     0x5A40 },
-	{ "hds",     0x5B00 },
-	{ "hdt",     0x5B40 },
-	{ "sda",     0x0800 },
-	{ "sdb",     0x0810 },
-	{ "sdc",     0x0820 },
-	{ "sdd",     0x0830 },
-	{ "sde",     0x0840 },
-	{ "sdf",     0x0850 },
-	{ "sdg",     0x0860 },
-	{ "sdh",     0x0870 },
-	{ "sdi",     0x0880 },
-	{ "sdj",     0x0890 },
-	{ "sdk",     0x08a0 },
-	{ "sdl",     0x08b0 },
-	{ "sdm",     0x08c0 },
-	{ "sdn",     0x08d0 },
-	{ "sdo",     0x08e0 },
-	{ "sdp",     0x08f0 },
-	{ "ada",     0x1c00 },
-	{ "adb",     0x1c10 },
-	{ "adc",     0x1c20 },
-	{ "add",     0x1c30 },
-	{ "ade",     0x1c40 },
-	{ "fd",      0x0200 },
-	{ "md",      0x0900 },	     
-	{ "xda",     0x0d00 },
-	{ "xdb",     0x0d40 },
-	{ "ram",     0x0100 },
-	{ "scd",     0x0b00 },
-	{ "mcd",     0x1700 },
-	{ "cdu535",  0x1800 },
-	{ "sonycd",  0x1800 },
-	{ "aztcd",   0x1d00 },
-	{ "cm206cd", 0x2000 },
-	{ "gscd",    0x1000 },
-	{ "sbpcd",   0x1900 },
-	{ "eda",     0x2400 },
-	{ "edb",     0x2440 },
-	{ "pda",	0x2d00 },
-	{ "pdb",	0x2d10 },
-	{ "pdc",	0x2d20 },
-	{ "pdd",	0x2d30 },
-	{ "pcd",	0x2e00 },
-	{ "pf",		0x2f00 },
-	{ "apblock", APBLOCK_MAJOR << 8},
-	{ "ddv", DDV_MAJOR << 8},
-	{ "jsfd",    JSFD_MAJOR << 8},
-#if defined(CONFIG_ARCH_S390)
-	{ "dasda", (DASD_MAJOR << MINORBITS) },
-	{ "dasdb", (DASD_MAJOR << MINORBITS) + (1 << 2) },
-	{ "dasdc", (DASD_MAJOR << MINORBITS) + (2 << 2) },
-	{ "dasdd", (DASD_MAJOR << MINORBITS) + (3 << 2) },
-	{ "dasde", (DASD_MAJOR << MINORBITS) + (4 << 2) },
-	{ "dasdf", (DASD_MAJOR << MINORBITS) + (5 << 2) },
-	{ "dasdg", (DASD_MAJOR << MINORBITS) + (6 << 2) },
-	{ "dasdh", (DASD_MAJOR << MINORBITS) + (7 << 2) },
-#endif
-#if defined(CONFIG_BLK_CPQ_DA) || defined(CONFIG_BLK_CPQ_DA_MODULE)
-	{ "ida/c0d0p",0x4800 },
-	{ "ida/c0d1p",0x4810 },
-	{ "ida/c0d2p",0x4820 },
-	{ "ida/c0d3p",0x4830 },
-	{ "ida/c0d4p",0x4840 },
-	{ "ida/c0d5p",0x4850 },
-	{ "ida/c0d6p",0x4860 },
-	{ "ida/c0d7p",0x4870 },
-	{ "ida/c0d8p",0x4880 },
-	{ "ida/c0d9p",0x4890 },
-	{ "ida/c0d10p",0x48A0 },
-	{ "ida/c0d11p",0x48B0 },
-	{ "ida/c0d12p",0x48C0 },
-	{ "ida/c0d13p",0x48D0 },
-	{ "ida/c0d14p",0x48E0 },
-	{ "ida/c0d15p",0x48F0 },
-#endif
-#if defined(CONFIG_BLK_CPQ_CISS_DA) || defined(CONFIG_BLK_CPQ_CISS_DA_MODULE)
-	{ "cciss/c0d0p",0x6800 },
-	{ "cciss/c0d1p",0x6810 },
-	{ "cciss/c0d2p",0x6820 },
-	{ "cciss/c0d3p",0x6830 },
-	{ "cciss/c0d4p",0x6840 },
-	{ "cciss/c0d5p",0x6850 },
-	{ "cciss/c0d6p",0x6860 },
-	{ "cciss/c0d7p",0x6870 },
-	{ "cciss/c0d8p",0x6880 },
-	{ "cciss/c0d9p",0x6890 },
-	{ "cciss/c0d10p",0x68A0 },
-	{ "cciss/c0d11p",0x68B0 },
-	{ "cciss/c0d12p",0x68C0 },
-	{ "cciss/c0d13p",0x68D0 },
-	{ "cciss/c0d14p",0x68E0 },
-	{ "cciss/c0d15p",0x68F0 },
-#endif
-	{ "nftla", 0x5d00 },
-	{ "nftlb", 0x5d10 },
-	{ "nftlc", 0x5d20 },
-	{ "nftld", 0x5d30 },
-	{ "ftla", 0x2c00 },
-	{ "ftlb", 0x2c08 },
-	{ "ftlc", 0x2c10 },
-	{ "ftld", 0x2c18 },
-	{ "mtdblock", 0x1f00 },
-	{ NULL, 0 }
-};
-
-kdev_t __init name_to_kdev_t(char *line)
-{
-	int base = 0;
-
-	if (strncmp(line,"/dev/",5) == 0) {
-		struct dev_name_struct *dev = root_dev_names;
-		line += 5;
-		do {
-			int len = strlen(dev->name);
-			if (strncmp(line,dev->name,len) == 0) {
-				line += len;
-				base = dev->num;
-				break;
-			}
-			dev++;
-		} while (dev->name);
-	}
-	return to_kdev_t(base + simple_strtoul(line,NULL,base?10:16));
+static __init dev_t try_name(char *name, int part)
+{
+	char path[64];
+	char buf[32];
+	int range;
+	dev_t res;
+	char *s;
+	int len;
+	int fd;
+
+	/* read device number from .../dev */
+
+	sprintf(path, "/sys/bus/block/devices/%s/dev", name);
+	fd = open(path, 0, 0);
+	if (fd < 0)
+		goto fail;
+	len = read(fd, buf, 32);
+	close(fd);
+	if (len <= 0 || len == 32 || buf[len - 1] != '\n')
+		goto fail;
+	buf[len - 1] = '\0';
+	res = (dev_t) simple_strtoul(buf, &s, 16);
+	if (*s)
+		goto fail;
+
+	/* if it's there and we are not looking for a partition - that's it */
+	if (!part)
+		return res;
+
+	/* otherwise read range from .../range */
+	sprintf(path, "/sys/bus/block/devices/%s/range", name);
+	fd = open(path, 0, 0);
+	if (fd < 0)
+		goto fail;
+	len = read(fd, buf, 32);
+	close(fd);
+	if (len <= 0 || len == 32 || buf[len - 1] != '\n')
+		goto fail;
+	buf[len - 1] = '\0';
+	range = simple_strtoul(buf, &s, 10);
+	if (*s)
+		goto fail;
+
+	/* if partition is within range - we got it */
+	if (part < range)
+		return res + part;
+fail:
+	return (dev_t) 0;
 }
 
-static int __init root_dev_setup(char *line)
+/*
+ *	Convert a name into device number.  We accept the following variants:
+ *
+ *	1) device number in hexadecimal	represents itself
+ *	2) /dev/nfs represents Root_NFS (0xff)
+ *	3) /dev/<disk_name> represents the device number of disk
+ *	4) /dev/<disk_name><decimal> represents the device number
+ *         of partition - device number of disk plus the partition number
+ *	5) /dev/<disk_name>p<decimal> - same as the above, that form is
+ *	   used when disk name of partitioned disk ends on a digit.
+ *
+ *	If name doesn't have fall into the categories above, we return 0.
+ *	Driverfs is used to check if something is a disk name - it has
+ *	all known disks under bus/block/devices.  If the disk name
+ *	contains slashes, name of driverfs node has them replaced with
+ *	dots.  try_name() does the actual checks, assuming that driverfs
+ *	is mounted on rootfs /sys.
+ */
+
+__init dev_t name_to_dev_t(char *name)
 {
-	int i;
-	char ch;
+	char s[32];
+	char *p;
+	dev_t res = 0;
+	int part;
+
+	sys_mkdir("/sys", 0700);
+	if (sys_mount("driverfs", "/sys", "driverfs", 0, NULL) < 0)
+		goto out;
 
-	ROOT_DEV = kdev_t_to_nr(name_to_kdev_t(line));
-	memset (root_device_name, 0, sizeof root_device_name);
-	if (strncmp (line, "/dev/", 5) == 0) line += 5;
-	for (i = 0; i < sizeof root_device_name - 1; ++i)
-	{
-	    ch = line[i];
-	    if ( isspace (ch) || (ch == ',') || (ch == '\0') ) break;
-	    root_device_name[i] = ch;
+	if (strncmp(name, "/dev/", 5) != 0) {
+		res = (dev_t) simple_strtoul(name, &p, 16);
+		if (*p)
+			goto fail;
+		goto done;
 	}
+	name += 5;
+	res = Root_NFS;
+	if (strcmp(name, "nfs") == 0)
+		goto done;
+
+	if (strlen(name) > 31)
+		goto fail;
+	strcpy(s, name);
+	for (p = s; *p; p++)
+		if (*p == '/')
+			*p = '.';
+	res = try_name(s, 0);
+	if (res)
+		goto done;
+
+	while (p > s && isdigit(p[-1]))
+		p--;
+	if (p == s || !*p || *p == '0')
+		goto fail;
+	part = simple_strtoul(p, NULL, 10);
+	*p = '\0';
+	res = try_name(s, part);
+	if (res)
+		goto done;
+
+	if (p < s + 2 || !isdigit(p[-2]) || p[-1] != 'p')
+		goto fail;
+	p[-1] = '\0';
+	res = try_name(s, part);
+done:
+	sys_umount("/sys", 0);
+out:
+	sys_rmdir("/sys");
+	return res;
+fail:
+	res = (dev_t) 0;
+	goto done;
+}
+
+static int __init root_dev_setup(char *line)
+{
+	strncpy(saved_root_name, line, 64);
+	saved_root_name[63] = '\0';
 	return 1;
 }
 
@@ -768,6 +736,13 @@
 void prepare_namespace(void)
 {
 	int is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
+	if (saved_root_name[0]) {
+		char *p = saved_root_name;
+		ROOT_DEV = name_to_dev_t(p);
+		if (strncmp(p, "/dev/", 5) == 0)
+			p += 5;
+		strcpy(root_device_name, p);
+	}
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (!initrd_start)
 		mount_initrd = 0;
diff -Nru a/init/main.c b/init/main.c
--- a/init/main.c	Wed Oct 30 16:44:24 2002
+++ b/init/main.c	Wed Oct 30 16:44:24 2002
@@ -26,6 +26,7 @@
 #include <linux/hdreg.h>
 #include <linux/bootmem.h>
 #include <linux/tty.h>
+#include <linux/gfp.h>
 #include <linux/percpu.h>
 #include <linux/kernel_stat.h>
 #include <linux/security.h>
@@ -388,6 +389,7 @@
 	setup_arch(&command_line);
 	setup_per_cpu_areas();
 	build_all_zonelists();
+	page_alloc_init();
 	printk("Kernel command line: %s\n", saved_command_line);
 	parse_options(command_line);
 	trap_init();
diff -Nru a/kernel/cpu.c b/kernel/cpu.c
--- a/kernel/cpu.c	Wed Oct 30 16:44:33 2002
+++ b/kernel/cpu.c	Wed Oct 30 16:44:33 2002
@@ -29,26 +29,38 @@
 int __devinit cpu_up(unsigned int cpu)
 {
 	int ret;
+	void *hcpu = (void *)(long)cpu;
 
-	if ((ret = down_interruptible(&cpucontrol)) != 0) 
+	if ((ret = down_interruptible(&cpucontrol)) != 0)
 		return ret;
 
 	if (cpu_online(cpu)) {
 		ret = -EINVAL;
 		goto out;
 	}
+	ret = notifier_call_chain(&cpu_chain, CPU_UP_PREPARE, hcpu);
+	if (ret == NOTIFY_BAD) {
+		printk("%s: attempt to bring up CPU %u failed\n",
+				__FUNCTION__, cpu);
+		ret = -EINVAL;
+		goto out_notify;
+	}
 
 	/* Arch-specific enabling code. */
 	ret = __cpu_up(cpu);
-	if (ret != 0) goto out;
+	if (ret != 0)
+		goto out_notify;
 	if (!cpu_online(cpu))
 		BUG();
 
 	/* Now call notifier in preparation. */
 	printk("CPU %u IS NOW UP!\n", cpu);
-	notifier_call_chain(&cpu_chain, CPU_ONLINE, (void *)(long)cpu);
+	notifier_call_chain(&cpu_chain, CPU_ONLINE, hcpu);
 
- out:
+out_notify:
+	if (ret != 0)
+		notifier_call_chain(&cpu_chain, CPU_UP_CANCELED, hcpu);
+out:
 	up(&cpucontrol);
 	return ret;
 }
diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c	Wed Oct 30 16:44:21 2002
+++ b/kernel/fork.c	Wed Oct 30 16:44:21 2002
@@ -769,8 +769,6 @@
 	p->start_time = jiffies;
 	p->security = NULL;
 
-	INIT_LIST_HEAD(&p->local_pages);
-
 	retval = -ENOMEM;
 	if (security_ops->task_alloc_security(p))
 		goto bad_fork_cleanup;
@@ -863,6 +861,14 @@
 
 	/* Need tasklist lock for parent etc handling! */
 	write_lock_irq(&tasklist_lock);
+	/*
+	 * Check for pending SIGKILL! The new thread should not be allowed
+	 * to slip out of an OOM kill. (or normal SIGKILL.)
+	 */
+	if (sigismember(&current->pending.signal, SIGKILL)) {
+		write_unlock_irq(&tasklist_lock);
+		goto bad_fork_cleanup_namespace;
+	}
 
 	/* CLONE_PARENT re-uses the old parent */
 	if (clone_flags & CLONE_PARENT)
diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
--- a/kernel/ksyms.c	Wed Oct 30 16:44:19 2002
+++ b/kernel/ksyms.c	Wed Oct 30 16:44:19 2002
@@ -62,8 +62,6 @@
 #include <linux/kmod.h>
 #endif
 
-extern void set_device_ro(kdev_t dev,int flag);
-
 extern struct timezone sys_tz;
 
 #ifdef CONFIG_MODVERSIONS
@@ -230,6 +228,7 @@
 EXPORT_SYMBOL(generic_file_read);
 EXPORT_SYMBOL(generic_file_sendfile);
 EXPORT_SYMBOL(do_generic_mapping_read);
+EXPORT_SYMBOL(file_ra_state_init);
 EXPORT_SYMBOL(generic_file_write);
 EXPORT_SYMBOL(generic_file_write_nolock);
 EXPORT_SYMBOL(generic_file_mmap);
@@ -254,7 +253,9 @@
 EXPORT_SYMBOL(is_subdir);
 EXPORT_SYMBOL(get_unused_fd);
 EXPORT_SYMBOL(vfs_read);
+EXPORT_SYMBOL(vfs_readv);
 EXPORT_SYMBOL(vfs_write);
+EXPORT_SYMBOL(vfs_writev);
 EXPORT_SYMBOL(vfs_create);
 EXPORT_SYMBOL(vfs_mkdir);
 EXPORT_SYMBOL(vfs_mknod);
@@ -308,6 +309,9 @@
 EXPORT_SYMBOL(simple_rmdir);
 EXPORT_SYMBOL(simple_rename);
 EXPORT_SYMBOL(simple_sync_file);
+EXPORT_SYMBOL(simple_readpage);
+EXPORT_SYMBOL(simple_prepare_write);
+EXPORT_SYMBOL(simple_commit_write);
 EXPORT_SYMBOL(simple_empty);
 EXPORT_SYMBOL(fd_install);
 EXPORT_SYMBOL(put_unused_fd);
@@ -341,9 +345,6 @@
 EXPORT_SYMBOL(tty_std_termios);
 
 /* block device driver support */
-EXPORT_SYMBOL(blk_dev);
-EXPORT_SYMBOL(bdev_read_only);
-EXPORT_SYMBOL(set_device_ro);
 EXPORT_SYMBOL(bmap);
 EXPORT_SYMBOL(blkdev_open);
 EXPORT_SYMBOL(blkdev_get);
@@ -446,7 +447,6 @@
 EXPORT_SYMBOL(request_resource);
 EXPORT_SYMBOL(release_resource);
 EXPORT_SYMBOL(allocate_resource);
-EXPORT_SYMBOL(check_resource);
 EXPORT_SYMBOL(__request_region);
 EXPORT_SYMBOL(__check_region);
 EXPORT_SYMBOL(__release_region);
diff -Nru a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c	Wed Oct 30 16:44:24 2002
+++ b/kernel/module.c	Wed Oct 30 16:44:24 2002
@@ -1165,7 +1165,7 @@
 	if (!p)
 		return ERR_PTR(-ENOMEM);
 	lock_kernel();
-	for (v = module_list, n = *pos; v; n -= v->nsyms, v = v->next) {
+	for (v = module_list; v; n -= v->nsyms, v = v->next) {
 		if (n < v->nsyms) {
 			p->mod = v;
 			p->index = n;
diff -Nru a/kernel/rcupdate.c b/kernel/rcupdate.c
--- a/kernel/rcupdate.c	Wed Oct 30 16:44:17 2002
+++ b/kernel/rcupdate.c	Wed Oct 30 16:44:17 2002
@@ -41,13 +41,14 @@
 #include <linux/module.h>
 #include <linux/completion.h>
 #include <linux/percpu.h>
+#include <linux/notifier.h>
 #include <linux/rcupdate.h>
 
 /* Definition for rcupdate control block. */
 struct rcu_ctrlblk rcu_ctrlblk = 
 	{ .mutex = SPIN_LOCK_UNLOCKED, .curbatch = 1, 
 	  .maxbatch = 1, .rcu_cpu_mask = 0 };
-struct rcu_data rcu_data[NR_CPUS] __cacheline_aligned;
+DEFINE_PER_CPU(struct rcu_data, rcu_data) = { 0L };
 
 /* Fake initialization required by compiler */
 static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
@@ -192,11 +193,39 @@
 void rcu_check_callbacks(int cpu, int user)
 {
 	if (user || 
-	    (idle_cpu(cpu) && !in_softirq() && hardirq_count() <= 1))
+	    (idle_cpu(cpu) && !in_softirq() && 
+				hardirq_count() <= (1 << HARDIRQ_SHIFT)))
 		RCU_qsctr(cpu)++;
 	tasklet_schedule(&RCU_tasklet(cpu));
 }
 
+static void __devinit rcu_online_cpu(int cpu)
+{
+	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));
+}
+
+static int __devinit rcu_cpu_notify(struct notifier_block *self, 
+				unsigned long action, void *hcpu)
+{
+	long cpu = (long)hcpu;
+	switch (action) {
+	case CPU_UP_PREPARE:
+		rcu_online_cpu(cpu);
+		break;
+	/* Space reserved for CPU_OFFLINE :) */
+	default:
+		break;
+	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block __devinitdata rcu_nb = {
+	.notifier_call	= rcu_cpu_notify,
+};
+
 /*
  * Initializes rcu mechanism.  Assumed to be called early.
  * That is before local timer(SMP) or jiffie timer (uniproc) is setup.
@@ -205,15 +234,12 @@
  */
 void __init rcu_init(void)
 {
-	int i;
-
-	memset(&rcu_data[0], 0, sizeof(rcu_data));
-	for (i = 0; i < NR_CPUS; i++) {
-		tasklet_init(&RCU_tasklet(i), rcu_process_callbacks, 0UL);
-		INIT_LIST_HEAD(&RCU_nxtlist(i));
-		INIT_LIST_HEAD(&RCU_curlist(i));
-	}
+	rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE,
+			(void *)(long)smp_processor_id());
+	/* Register notifier for non-boot CPUs */
+	register_cpu_notifier(&rcu_nb);
 }
+
 
 /* Because of FASTCALL declaration of complete, we use this wrapper */
 static void wakeme_after_rcu(void *completion)
diff -Nru a/kernel/resource.c b/kernel/resource.c
--- a/kernel/resource.c	Wed Oct 30 16:44:29 2002
+++ b/kernel/resource.c	Wed Oct 30 16:44:29 2002
@@ -131,20 +131,6 @@
 	return retval;
 }
 
-int check_resource(struct resource *root, unsigned long start, unsigned long len)
-{
-	struct resource *conflict, tmp;
-
-	tmp.start = start;
-	tmp.end = start + len - 1;
-	write_lock(&resource_lock);
-	conflict = __request_resource(root, &tmp);
-	if (!conflict)
-		__release_resource(&tmp);
-	write_unlock(&resource_lock);
-	return conflict ? -EBUSY : 0;
-}
-
 /*
  * Find empty slot in the resource tree given range and alignment.
  */
diff -Nru a/kernel/softirq.c b/kernel/softirq.c
--- a/kernel/softirq.c	Wed Oct 30 16:44:26 2002
+++ b/kernel/softirq.c	Wed Oct 30 16:44:26 2002
@@ -12,6 +12,7 @@
 #include <linux/percpu.h>
 #include <linux/init.h>
 #include <linux/mm.h>
+#include <linux/notifier.h>
 
 /*
    - No shared variables, all the data are CPU local.
@@ -260,10 +261,39 @@
 	clear_bit(TASKLET_STATE_SCHED, &t->state);
 }
 
+
+static void tasklet_init_cpu(int cpu)
+{
+	per_cpu(tasklet_vec, cpu).list = NULL;
+	per_cpu(tasklet_hi_vec, cpu).list = NULL;
+}
+	
+static int tasklet_cpu_notify(struct notifier_block *self, 
+				unsigned long action, void *hcpu)
+{
+	long cpu = (long)hcpu;
+	switch(action) {
+	case CPU_UP_PREPARE:
+		tasklet_init_cpu(cpu);
+		break;
+	default:
+		break;
+	}
+	return 0;
+}
+
+static struct notifier_block tasklet_nb = {
+	.notifier_call	= tasklet_cpu_notify,
+	.next		= NULL,
+};
+
 void __init softirq_init()
 {
 	open_softirq(TASKLET_SOFTIRQ, tasklet_action, NULL);
 	open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL);
+	tasklet_cpu_notify(&tasklet_nb, (unsigned long)CPU_UP_PREPARE,
+				(void *)(long)smp_processor_id());
+	register_cpu_notifier(&tasklet_nb);
 }
 
 static int ksoftirqd(void * __bind_cpu)
@@ -316,12 +346,13 @@
 
 		while (!ksoftirqd_task(hotcpu))
 			yield();
-		return NOTIFY_OK;
  	}
-	return NOTIFY_BAD;
+	return NOTIFY_OK;
 }
 
-static struct notifier_block cpu_nfb = { &cpu_callback, NULL, 0 };
+static struct notifier_block __devinitdata cpu_nfb = {
+	.notifier_call = cpu_callback
+};
 
 __init int spawn_ksoftirqd(void)
 {
diff -Nru a/kernel/suspend.c b/kernel/suspend.c
--- a/kernel/suspend.c	Wed Oct 30 16:44:26 2002
+++ b/kernel/suspend.c	Wed Oct 30 16:44:26 2002
@@ -57,12 +57,13 @@
 #include <linux/pm.h>
 #include <linux/device.h>
 #include <linux/buffer_head.h>
+#include <linux/swapops.h>
+#include <linux/bootmem.h>
 
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
-#include <linux/swapops.h>
 
 extern void signal_wake_up(struct task_struct *t);
 extern int sys_sync(void);
@@ -225,7 +226,7 @@
 			todo++;
 		} while_each_thread(g, p);
 		read_unlock(&tasklist_lock);
-		yield();
+		yield();			/* Yield is okay here */
 		if (time_after(jiffies, start_time + TIMEOUT)) {
 			printk( "\n" );
 			printk(KERN_ERR " stopping tasks failed (%d tasks remaining)\n", todo );
@@ -309,6 +310,9 @@
 	union diskpage *cur;
 	struct page *page;
 
+	if (root_swap == 0xFFFF)  /* ignored */
+		return;
+
 	page = alloc_page(GFP_ATOMIC);
 	if (!page)
 		panic("Out of memory in mark_swapfiles");
@@ -474,9 +478,9 @@
 #ifdef CONFIG_DISCONTIGMEM
 	panic("Discontingmem not supported");
 #else
-	BUG_ON (max_mapnr != num_physpages);
+	BUG_ON (max_pfn != num_physpages);
 #endif
-	for (pfn = 0; pfn < max_mapnr; pfn++) {
+	for (pfn = 0; pfn < max_pfn; pfn++) {
 		page = pfn_to_page(pfn);
 		if (PageHighMem(page))
 			panic("Swsusp not supported on highmem boxes. Send 1GB of RAM to <pavel@ucw.cz> and try again ;-).");
@@ -686,6 +690,7 @@
 	if(nr_free_pages() < nr_needed_pages) {
 		printk(KERN_CRIT "%sCouldn't get enough free pages, on %d pages short\n",
 		       name_suspend, nr_needed_pages-nr_free_pages());
+		root_swap = 0xFFFF;
 		spin_unlock_irq(&suspend_pagedir_lock);
 		return 1;
 	}
@@ -1042,7 +1047,7 @@
 	return 0;
 }
 
-extern kdev_t __init name_to_kdev_t(const char *line);
+extern dev_t __init name_to_dev_t(const char *line);
 
 static int __read_suspend_image(struct block_device *bdev, union diskpage *cur, int noresume)
 {
@@ -1138,7 +1143,7 @@
 	unsigned long scratch_page = 0;
 	int error;
 
-	resume_device = name_to_kdev_t(specialfile);
+	resume_device = to_kdev_t(name_to_dev_t(specialfile));
 	scratch_page = get_zeroed_page(GFP_ATOMIC);
 	cur = (void *) scratch_page;
 	if (cur) {
diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c	Wed Oct 30 16:44:26 2002
+++ b/kernel/timer.c	Wed Oct 30 16:44:26 2002
@@ -24,6 +24,7 @@
 #include <linux/percpu.h>
 #include <linux/init.h>
 #include <linux/mm.h>
+#include <linux/notifier.h>
 
 #include <asm/uaccess.h>
 
@@ -62,7 +63,8 @@
 
 typedef struct tvec_t_base_s tvec_base_t;
 
-static tvec_base_t tvec_bases[NR_CPUS] __cacheline_aligned;
+/* Fake initialization */
+static DEFINE_PER_CPU(tvec_base_t, tvec_bases) = { SPIN_LOCK_UNLOCKED };
 
 /* Fake initialization needed to avoid compiler breakage */
 static DEFINE_PER_CPU(struct tasklet_struct, timer_tasklet) = { NULL };
@@ -122,7 +124,7 @@
 void add_timer(timer_t *timer)
 {
 	int cpu = get_cpu();
-	tvec_base_t *base = tvec_bases + cpu;
+	tvec_base_t *base = &per_cpu(tvec_bases, cpu);
   	unsigned long flags;
   
   	BUG_ON(timer_pending(timer) || !timer->function);
@@ -135,6 +137,26 @@
 }
 
 /***
+ * add_timer_on - start a timer on a particular CPU
+ * @timer: the timer to be added
+ * @cpu: the CPU to start it on
+ *
+ * This is not very scalable on SMP.
+ */
+void add_timer_on(struct timer_list *timer, int cpu)
+{
+	tvec_base_t *base = &per_cpu(tvec_bases, cpu);
+  	unsigned long flags;
+  
+  	BUG_ON(timer_pending(timer) || !timer->function);
+
+	spin_lock_irqsave(&base->lock, flags);
+	internal_add_timer(base, timer);
+	timer->base = base;
+	spin_unlock_irqrestore(&base->lock, flags);
+}
+
+/***
  * mod_timer - modify a timer's timeout
  * @timer: the timer to be modified
  *
@@ -169,7 +191,7 @@
 		return 1;
 
 	local_irq_save(flags);
-	new_base = tvec_bases + smp_processor_id();
+	new_base = &per_cpu(tvec_bases, smp_processor_id());
 repeat:
 	old_base = timer->base;
 
@@ -265,15 +287,17 @@
  */
 int del_timer_sync(timer_t *timer)
 {
-	tvec_base_t *base = tvec_bases;
+	tvec_base_t *base;
 	int i, ret = 0;
 
 del_again:
 	ret += del_timer(timer);
 
-	for (i = 0; i < NR_CPUS; i++, base++) {
+	for (i = 0; i < NR_CPUS; i++) {
 		if (!cpu_online(i))
 			continue;
+
+		base = &per_cpu(tvec_bases, i);
 		if (base->running_timer == timer) {
 			while (base->running_timer == timer) {
 				cpu_relax();
@@ -711,7 +735,7 @@
  */
 static void run_timer_tasklet(unsigned long data)
 {
-	tvec_base_t *base = tvec_bases + smp_processor_id();
+	tvec_base_t *base = &per_cpu(tvec_bases, smp_processor_id());
 
 	if ((long)(jiffies - base->timer_jiffies) >= 0)
 		__run_timers(base);
@@ -1066,23 +1090,46 @@
 	return 0;
 }
 
-void __init init_timers(void)
+static void __devinit init_timers_cpu(int cpu)
 {
-	int i, j;
-
-	for (i = 0; i < NR_CPUS; i++) {
-		tvec_base_t *base;
-	       
-		base = tvec_bases + i;
-		spin_lock_init(&base->lock);
-		for (j = 0; j < TVN_SIZE; j++) {
-			INIT_LIST_HEAD(base->tv5.vec + j);
-			INIT_LIST_HEAD(base->tv4.vec + j);
-			INIT_LIST_HEAD(base->tv3.vec + j);
-			INIT_LIST_HEAD(base->tv2.vec + j);
-		}
-		for (j = 0; j < TVR_SIZE; j++)
-			INIT_LIST_HEAD(base->tv1.vec + j);
-		tasklet_init(&per_cpu(timer_tasklet, i), run_timer_tasklet, 0);
+	int j;
+	tvec_base_t *base;
+       
+	base = &per_cpu(tvec_bases, cpu);
+	spin_lock_init(&base->lock);
+	for (j = 0; j < TVN_SIZE; j++) {
+		INIT_LIST_HEAD(base->tv5.vec + j);
+		INIT_LIST_HEAD(base->tv4.vec + j);
+		INIT_LIST_HEAD(base->tv3.vec + j);
+		INIT_LIST_HEAD(base->tv2.vec + j);
+	}
+	for (j = 0; j < TVR_SIZE; j++)
+		INIT_LIST_HEAD(base->tv1.vec + j);
+	tasklet_init(&per_cpu(timer_tasklet, cpu), run_timer_tasklet, 0UL);
+}
+	
+static int __devinit timer_cpu_notify(struct notifier_block *self, 
+				unsigned long action, void *hcpu)
+{
+	long cpu = (long)hcpu;
+	switch(action) {
+	case CPU_UP_PREPARE:
+		init_timers_cpu(cpu);
+		break;
+	default:
+		break;
 	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block __devinitdata timers_nb = {
+	.notifier_call	= timer_cpu_notify,
+};
+
+
+void __init init_timers(void)
+{
+	timer_cpu_notify(&timers_nb, (unsigned long)CPU_UP_PREPARE,
+				(void *)(long)smp_processor_id());
+	register_cpu_notifier(&timers_nb);
 }
diff -Nru a/lib/Config.help b/lib/Config.help
--- a/lib/Config.help	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,6 +0,0 @@
-CONFIG_CRC32
-  This option is provided for the case where no in-kernel-tree
-  modules require CRC32 functions, but a module built outside the
-  kernel tree does. Such modules that use library CRC32 functions
-  require M here.
-
diff -Nru a/lib/Config.in b/lib/Config.in
--- a/lib/Config.in	Wed Oct 30 16:44:21 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,40 +0,0 @@
-#
-# Library configuration
-#
-mainmenu_option next_comment
-comment 'Library routines'
-
-tristate 'CRC32 functions' CONFIG_CRC32
-
-#
-# Do we need the compression support?
-#
-if [ "$CONFIG_CRAMFS" = "y" -o \
-     "$CONFIG_PPP_DEFLATE" = "y" -o \
-     "$CONFIG_JFFS2_FS" = "y" -o \
-     "$CONFIG_ZISOFS_FS" = "y" ]; then
-   define_tristate CONFIG_ZLIB_INFLATE y
-else
-  if [ "$CONFIG_CRAMFS" = "m" -o \
-       "$CONFIG_PPP_DEFLATE" = "m" -o \
-       "$CONFIG_JFFS2_FS" = "m" -o \
-       "$CONFIG_ZISOFS_FS" = "m" ]; then
-     define_tristate CONFIG_ZLIB_INFLATE m
-  else
-     define_tristate CONFIG_ZLIB_INFLATE n
-  fi
-fi
-
-if [ "$CONFIG_PPP_DEFLATE" = "y" -o \
-     "$CONFIG_JFFS2_FS" = "y" ]; then
-   define_tristate CONFIG_ZLIB_DEFLATE y
-else
-  if [ "$CONFIG_PPP_DEFLATE" = "m" -o \
-       "$CONFIG_JFFS2_FS" = "m" ]; then
-     define_tristate CONFIG_ZLIB_DEFLATE m
-  else
-     define_tristate CONFIG_ZLIB_DEFLATE n
-  fi
-fi
-
-endmenu
diff -Nru a/lib/Kconfig b/lib/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/lib/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,29 @@
+#
+# Library configuration
+#
+
+menu "Library routines"
+
+config CRC32
+	tristate "CRC32 functions"
+	help
+	  This option is provided for the case where no in-kernel-tree
+	  modules require CRC32 functions, but a module built outside the
+	  kernel tree does. Such modules that use library CRC32 functions
+	  require M here.
+
+#
+# Do we need the compression support?
+#
+config ZLIB_INFLATE
+	tristate
+	default m if CRAMFS!=y && PPP_DEFLATE!=y && JFFS2_FS!=y && ZISOFS_FS!=y && (CRAMFS=m || PPP_DEFLATE=m || JFFS2_FS=m || ZISOFS_FS=m)
+	default y if CRAMFS=y || PPP_DEFLATE=y || JFFS2_FS=y || ZISOFS_FS=y
+
+config ZLIB_DEFLATE
+	tristate
+	default m if PPP_DEFLATE!=y && JFFS2_FS!=y && (PPP_DEFLATE=m || JFFS2_FS=m)
+	default y if PPP_DEFLATE=y || JFFS2_FS=y
+
+endmenu
+
diff -Nru a/lib/Makefile b/lib/Makefile
--- a/lib/Makefile	Wed Oct 30 16:44:19 2002
+++ b/lib/Makefile	Wed Oct 30 16:44:19 2002
@@ -9,10 +9,11 @@
 L_TARGET := lib.a
 
 export-objs := cmdline.o dec_and_lock.o rwsem-spinlock.o rwsem.o \
-	       crc32.o rbtree.o radix-tree.o
+	       crc32.o rbtree.o radix-tree.o kobject.o
 
 obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o \
-	 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o
+	 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
+	 kobject.o
 
 obj-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
 obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
diff -Nru a/lib/kobject.c b/lib/kobject.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/lib/kobject.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,201 @@
+/*
+ * kobject.c - library routines for handling generic kernel objects
+ */
+
+#define DEBUG 1
+
+#include <linux/kobject.h>
+#include <linux/module.h>
+#include <linux/stat.h>
+
+/**
+ *	kobject_populate_dir - populate directory with attributes.
+ *	@kobj:	object we're working on.
+ *
+ *	Most subsystems have a set of default attributes that 
+ *	are associated with an object that registers with them.
+ *	This is a helper called during object registration that 
+ *	loops through the default attributes of the subsystem 
+ *	and creates attributes files for them in sysfs.
+ *
+ */
+
+static int kobject_populate_dir(struct kobject * kobj)
+{
+	struct subsystem * s = kobj->subsys;
+	struct attribute * attr;
+	int error = 0;
+	int i;
+	
+	if (s && s->default_attrs) {
+		for (i = 0; (attr = s->default_attrs[i]); i++) {
+			if ((error = sysfs_create_file(kobj,attr)))
+				break;
+		}
+	}
+	return error;
+}
+
+/**
+ *	kobject_init - initialize object.
+ *	@kobj:	object in question.
+ */
+
+void kobject_init(struct kobject * kobj)
+{
+	atomic_set(&kobj->refcount,1);
+	INIT_LIST_HEAD(&kobj->entry);
+}
+
+/**
+ *	kobject_register - register an object.
+ *	@kobj:	object in question.
+ *
+ *	For now, fill in the replicated fields in the object's
+ *	directory entry, and create a dir in sysfs. 
+ *	This stuff should go away in the future, as we move
+ *	more implicit things to sysfs.
+ */
+
+int kobject_register(struct kobject * kobj)
+{
+	int error = 0;
+	struct subsystem * s = subsys_get(kobj->subsys);
+	struct kobject * parent = kobject_get(kobj->parent);
+
+	pr_debug("kobject %s: registering\n",kobj->name);
+	if (parent)
+		pr_debug("  parent is %s\n",parent->name);
+	if (s) {
+		down_write(&s->rwsem);
+		if (parent) 
+			list_add_tail(&kobj->entry,&parent->entry);
+		else {
+			list_add_tail(&kobj->entry,&s->list);
+			kobj->parent = &s->kobj;
+		}
+		up_write(&s->rwsem);
+	}
+	error = sysfs_create_dir(kobj);
+	if (!error) {
+		error = kobject_populate_dir(kobj);
+		if (error)
+			sysfs_remove_dir(kobj);
+	}
+	return error;
+}
+
+/**
+ *	kobject_unregister - unlink an object.
+ *	@kobj:	object going away.
+ *
+ *	The device has been told to be removed, but may
+ *	not necessarily be disappearing from the kernel.
+ *	So, we remove the directory and decrement the refcount
+ *	that we set with kobject_register().
+ *
+ *	Eventually (maybe now), the refcount will hit 0, and 
+ *	put_device() will clean the device up.
+ */
+
+void kobject_unregister(struct kobject * kobj)
+{
+	pr_debug("kobject %s: unregistering\n",kobj->name);
+	sysfs_remove_dir(kobj);
+	if (kobj->subsys) {
+		down_write(&kobj->subsys->rwsem);
+		list_del_init(&kobj->entry);
+		up_write(&kobj->subsys->rwsem);
+	}
+	kobject_put(kobj);
+}
+
+/**
+ *	kobject_get - increment refcount for object.
+ *	@kobj:	object.
+ */
+
+struct kobject * kobject_get(struct kobject * kobj)
+{
+	struct kobject * ret = kobj;
+	if (kobj && atomic_read(&kobj->refcount) > 0)
+		atomic_inc(&kobj->refcount);
+	else
+		ret = NULL;
+	return ret;
+}
+
+/**
+ *	kobject_put - decrement refcount for object.
+ *	@kobj:	object.
+ *
+ *	Decrement the refcount, and check if 0. If it is, then 
+ *	we're gonna need to clean it up, and decrement the refcount
+ *	of its parent.
+ *
+ *	@kobj->parent could point to its subsystem, which we also 
+ *	want to decrement the reference count for. We always dec 
+ *	the refcount for the parent, but only do so for the subsystem
+ *	if it points to a different place than the parent.
+ */
+
+void kobject_put(struct kobject * kobj)
+{
+	struct kobject * parent = kobj->parent;
+	struct subsystem * s = kobj->subsys;
+
+	if (!atomic_dec_and_test(&kobj->refcount))
+		return;
+
+	pr_debug("kobject %s: cleaning up\n",kobj->name);
+	if (s) {
+		if (s->release)
+			s->release(kobj);
+		if (&s->kobj != parent)
+			subsys_put(s);
+	} 
+
+	if (parent) 
+		kobject_put(parent);
+}
+
+
+void subsystem_init(struct subsystem * s)
+{
+	kobject_init(&s->kobj);
+	init_rwsem(&s->rwsem);
+	INIT_LIST_HEAD(&s->list);
+}
+
+/**
+ *	subsystem_register - register a subsystem.
+ *	@s:	the subsystem we're registering.
+ */
+
+int subsystem_register(struct subsystem * s)
+{
+	subsystem_init(s);
+	if (s->parent)
+		s->kobj.parent = &s->parent->kobj;
+	pr_debug("subsystem %s: registering\n",s->kobj.name);
+	if (s->parent)
+		pr_debug("  parent is %s\n",s->parent->kobj.name);
+	return kobject_register(&s->kobj);
+}
+
+void subsystem_unregister(struct subsystem * s)
+{
+	pr_debug("subsystem %s: unregistering\n",s->kobj.name);
+	kobject_unregister(&s->kobj);
+}
+
+
+EXPORT_SYMBOL(kobject_init);
+EXPORT_SYMBOL(kobject_register);
+EXPORT_SYMBOL(kobject_unregister);
+EXPORT_SYMBOL(kobject_get);
+EXPORT_SYMBOL(kobject_put);
+
+EXPORT_SYMBOL(subsystem_init);
+EXPORT_SYMBOL(subsystem_register);
+EXPORT_SYMBOL(subsystem_unregister);
diff -Nru a/lib/radix-tree.c b/lib/radix-tree.c
--- a/lib/radix-tree.c	Wed Oct 30 16:44:25 2002
+++ b/lib/radix-tree.c	Wed Oct 30 16:44:25 2002
@@ -282,17 +282,9 @@
 			break;
 		nr_found = __lookup(root, results + ret, cur_index,
 				max_items - ret, &next_index, max_index);
-		if (nr_found == 0) {
-			 if (!(cur_index & RADIX_TREE_MAP_MASK))
-				break;
-			/*
-			 * It could be that there simply were no items to the
-			 * right of `cur_index' in the leaf node.  So we still
-			 * need to search for additional nodes to the right of
-			 * this one.
-			 */
-		}
 		ret += nr_found;
+		if (next_index == max_index)
+			break;
 		cur_index = next_index;
 	}
 out:
diff -Nru a/mm/filemap.c b/mm/filemap.c
--- a/mm/filemap.c	Wed Oct 30 16:44:27 2002
+++ b/mm/filemap.c	Wed Oct 30 16:44:27 2002
@@ -61,6 +61,10 @@
  *          ->mapping->page_lock
  *  ->inode_lock
  *    ->sb_lock			(fs/fs-writeback.c)
+ *  ->page_table_lock
+ *    ->swap_device_lock	(try_to_unmap_one)
+ *    ->private_lock		(try_to_unmap_one)
+ *    ->page_lock		(try_to_unmap_one)
  */
 
 /*
@@ -254,7 +258,7 @@
 	struct page *page; 
 	int error;
 
-	page = page_cache_alloc(mapping);
+	page = page_cache_alloc_cold(mapping);
 	if (!page)
 		return -ENOMEM;
 
@@ -701,7 +705,7 @@
 		 * page..
 		 */
 		if (!cached_page) {
-			cached_page = page_cache_alloc(mapping);
+			cached_page = page_cache_alloc_cold(mapping);
 			if (!cached_page) {
 				desc->error = -ENOMEM;
 				break;
@@ -912,7 +916,7 @@
 	return ret;
 }
 
-static int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
+int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
 {
 	ssize_t written;
 	unsigned long count = desc->count;
@@ -1195,7 +1199,7 @@
 	page = find_get_page(mapping, index);
 	if (!page) {
 		if (!cached_page) {
-			cached_page = page_cache_alloc(mapping);
+			cached_page = page_cache_alloc_cold(mapping);
 			if (!cached_page)
 				return ERR_PTR(-ENOMEM);
 		}
@@ -1445,7 +1449,7 @@
 	/* We can write back this queue in page reclaim */
 	current->backing_dev_info = mapping->backing_dev_info;
 
-	pagevec_init(&lru_pvec);
+	pagevec_init(&lru_pvec, 0);
 
 	if (unlikely(file->f_error)) {
 		err = file->f_error;
diff -Nru a/mm/highmem.c b/mm/highmem.c
--- a/mm/highmem.c	Wed Oct 30 16:44:29 2002
+++ b/mm/highmem.c	Wed Oct 30 16:44:29 2002
@@ -366,34 +366,13 @@
 	return 0;
 }
 
-void blk_queue_bounce(request_queue_t *q, struct bio **bio_orig)
+void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig, int bio_gfp,
+			mempool_t *pool)
 {
 	struct page *page;
 	struct bio *bio = NULL;
-	int i, rw = bio_data_dir(*bio_orig), bio_gfp;
+	int i, rw = bio_data_dir(*bio_orig);
 	struct bio_vec *to, *from;
-	mempool_t *pool;
-	unsigned long pfn = q->bounce_pfn;
-	int gfp = q->bounce_gfp;
-
-	BUG_ON((*bio_orig)->bi_idx);
-
-	/*
-	 * for non-isa bounce case, just check if the bounce pfn is equal
-	 * to or bigger than the highest pfn in the system -- in that case,
-	 * don't waste time iterating over bio segments
-	 */
-	if (!(gfp & GFP_DMA)) {
-		if (pfn >= blk_max_pfn)
-			return;
-
-		bio_gfp = GFP_NOHIGHIO;
-		pool = page_pool;
-	} else {
-		BUG_ON(!isa_page_pool);
-		bio_gfp = GFP_NOIO;
-		pool = isa_page_pool;
-	}
 
 	bio_for_each_segment(from, *bio_orig, i) {
 		page = from->bv_page;
@@ -401,7 +380,7 @@
 		/*
 		 * is destination page below bounce pfn?
 		 */
-		if ((page - page_zone(page)->zone_mem_map) + (page_zone(page)->zone_start_pfn) < pfn)
+		if ((page - page_zone(page)->zone_mem_map) + (page_zone(page)->zone_start_pfn) < q->bounce_pfn)
 			continue;
 
 		/*
@@ -412,11 +391,11 @@
 
 		to = bio->bi_io_vec + i;
 
-		to->bv_page = mempool_alloc(pool, gfp);
+		to->bv_page = mempool_alloc(pool, q->bounce_gfp);
 		to->bv_len = from->bv_len;
 		to->bv_offset = from->bv_offset;
 
-		if (rw & WRITE) {
+		if (rw == WRITE) {
 			char *vto, *vfrom;
 
 			vto = page_address(to->bv_page) + to->bv_offset;
@@ -437,15 +416,16 @@
 	 * pages
 	 */
 	bio_for_each_segment(from, *bio_orig, i) {
-		to = &bio->bi_io_vec[i];
+		to = bio_iovec_idx(bio, i);
 		if (!to->bv_page) {
 			to->bv_page = from->bv_page;
 			to->bv_len = from->bv_len;
-			to->bv_offset = to->bv_offset;
+			to->bv_offset = from->bv_offset;
 		}
 	}
 
 	bio->bi_bdev = (*bio_orig)->bi_bdev;
+	bio->bi_flags |= (1 << BIO_BOUNCED);
 	bio->bi_sector = (*bio_orig)->bi_sector;
 	bio->bi_rw = (*bio_orig)->bi_rw;
 
@@ -454,19 +434,48 @@
 	bio->bi_size = (*bio_orig)->bi_size;
 
 	if (pool == page_pool) {
-		if (rw & WRITE)
-			bio->bi_end_io = bounce_end_io_write;
-		else
+		bio->bi_end_io = bounce_end_io_write;
+		if (rw == READ)
 			bio->bi_end_io = bounce_end_io_read;
 	} else {
-		if (rw & WRITE)
-			bio->bi_end_io = bounce_end_io_write_isa;
-		else
+		bio->bi_end_io = bounce_end_io_write_isa;
+		if (rw == READ)
 			bio->bi_end_io = bounce_end_io_read_isa;
 	}
 
 	bio->bi_private = *bio_orig;
 	*bio_orig = bio;
+}
+
+inline void blk_queue_bounce(request_queue_t *q, struct bio **bio_orig)
+{
+	mempool_t *pool;
+	int bio_gfp;
+
+	BUG_ON((*bio_orig)->bi_idx);
+
+	/*
+	 * for non-isa bounce case, just check if the bounce pfn is equal
+	 * to or bigger than the highest pfn in the system -- in that case,
+	 * don't waste time iterating over bio segments
+	 */
+	if (!(q->bounce_gfp & GFP_DMA)) {
+		if (q->bounce_pfn >= blk_max_pfn)
+			return;
+
+		bio_gfp = GFP_NOHIGHIO;
+		pool = page_pool;
+	} else {
+		BUG_ON(!isa_page_pool);
+
+		bio_gfp = GFP_NOIO;
+		pool = isa_page_pool;
+	}
+
+	/*
+	 * slow path
+	 */
+	__blk_queue_bounce(q, bio_orig, bio_gfp, pool);
 }
 
 #if defined(CONFIG_DEBUG_HIGHMEM) && defined(CONFIG_HIGHMEM)
diff -Nru a/mm/mempool.c b/mm/mempool.c
--- a/mm/mempool.c	Wed Oct 30 16:44:29 2002
+++ b/mm/mempool.c	Wed Oct 30 16:44:29 2002
@@ -259,8 +259,25 @@
 	pool->free(element, pool->pool_data);
 }
 
+/*
+ * A commonly used alloc and free fn.
+ */
+void *mempool_alloc_slab(int gfp_mask, void *pool_data)
+{
+	kmem_cache_t *mem = (kmem_cache_t *) pool_data;
+	return kmem_cache_alloc(mem, gfp_mask);
+}
+
+void mempool_free_slab(void *element, void *pool_data)
+{
+	kmem_cache_t *mem = (kmem_cache_t *) pool_data;
+	kmem_cache_free(mem, element);
+}
+
 EXPORT_SYMBOL(mempool_create);
 EXPORT_SYMBOL(mempool_resize);
 EXPORT_SYMBOL(mempool_destroy);
 EXPORT_SYMBOL(mempool_alloc);
 EXPORT_SYMBOL(mempool_free);
+EXPORT_SYMBOL(mempool_alloc_slab);
+EXPORT_SYMBOL(mempool_free_slab);
diff -Nru a/mm/mmap.c b/mm/mmap.c
--- a/mm/mmap.c	Wed Oct 30 16:44:29 2002
+++ b/mm/mmap.c	Wed Oct 30 16:44:29 2002
@@ -399,6 +399,10 @@
 	return 0;
 }
 
+/*
+ * The caller must hold down_write(current->mm->mmap_sem).
+ */
+
 unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
 			unsigned long len, unsigned long prot,
 			unsigned long flags, unsigned long pgoff)
diff -Nru a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c	Wed Oct 30 16:44:29 2002
+++ b/mm/oom_kill.c	Wed Oct 30 16:44:29 2002
@@ -175,9 +175,13 @@
 	if (p == NULL)
 		panic("Out of memory and no killable processes...\n");
 
-	/* kill all processes that share the ->mm (i.e. all threads) */
+	oom_kill_task(p);
+	/*
+	 * kill all processes that share the ->mm (i.e. all threads),
+	 * but are in a different thread group
+	 */
 	do_each_thread(g, q)
-		if (q->mm == p->mm)
+		if (q->mm == p->mm && q->tgid != p->tgid)
 			oom_kill_task(q);
 	while_each_thread(g, q);
 
diff -Nru a/mm/page-writeback.c b/mm/page-writeback.c
--- a/mm/page-writeback.c	Wed Oct 30 16:44:30 2002
+++ b/mm/page-writeback.c	Wed Oct 30 16:44:30 2002
@@ -23,6 +23,7 @@
 #include <linux/backing-dev.h>
 #include <linux/blkdev.h>
 #include <linux/mpage.h>
+#include <linux/percpu.h>
 #include <linux/notifier.h>
 #include <linux/smp.h>
 
@@ -182,9 +183,7 @@
  */
 void balance_dirty_pages_ratelimited(struct address_space *mapping)
 {
-	static struct rate_limit_struct {
-		int count;
-	} ____cacheline_aligned_in_smp ratelimits[NR_CPUS];
+	static DEFINE_PER_CPU(int, ratelimits) = 0;
 	int cpu;
 	long ratelimit;
 
@@ -193,8 +192,8 @@
 		ratelimit = 8;
 
 	cpu = get_cpu();
-	if (ratelimits[cpu].count++ >= ratelimit) {
-		ratelimits[cpu].count = 0;
+	if (per_cpu(ratelimits, cpu)++ >= ratelimit) {
+		per_cpu(ratelimits, cpu) = 0;
 		put_cpu();
 		balance_dirty_pages(mapping);
 		return;
diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c	Wed Oct 30 16:44:20 2002
+++ b/mm/page_alloc.c	Wed Oct 30 16:44:20 2002
@@ -10,6 +10,8 @@
  *  Reshaped it to be a zoned allocator, Ingo Molnar, Red Hat, 1999
  *  Discontiguous memory support, Kanoj Sarcar, SGI, Nov 1999
  *  Zone balancing, Kanoj Sarcar, SGI, Jan 2000
+ *  Per cpu hot/cold page lists, bulk allocation, Martin J. Bligh, Sept 2002
+ *          (lots of bits borrowed from Ingo Molnar & Andrew Morton)
  */
 
 #include <linux/config.h>
@@ -25,6 +27,7 @@
 #include <linux/pagevec.h>
 #include <linux/blkdev.h>
 #include <linux/slab.h>
+#include <linux/notifier.h>
 
 struct pglist_data *pgdat_list;
 unsigned long totalram_pages;
@@ -59,6 +62,14 @@
 	return 0;
 }
 
+static void bad_page(const char *function, struct page *page)
+{
+	printk("Bad page state at %s\n", function);
+	printk("flags:0x%08lx mapping:%p mapped:%d count:%d\n",
+		page->flags, page->mapping,
+		page_mapped(page), page_count(page));
+}
+
 /*
  * Freeing function for a buddy system allocator.
  *
@@ -82,46 +93,17 @@
  * -- wli
  */
 
-void __free_pages_ok (struct page *page, unsigned int order)
+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)
 {
-	unsigned long index, page_idx, mask, flags;
-	struct free_area *area;
-	struct page *base;
-	struct zone *zone;
-
-	mod_page_state(pgfree, 1<<order);
-
-	BUG_ON(PageLRU(page));
-	BUG_ON(PagePrivate(page));
-	BUG_ON(page->mapping != NULL);
-	BUG_ON(PageLocked(page));
-	BUG_ON(PageActive(page));
-	BUG_ON(PageWriteback(page));
-	BUG_ON(page->pte.direct != 0);
-	if (PageDirty(page))
-		ClearPageDirty(page);
-	BUG_ON(page_count(page) != 0);
+	unsigned long page_idx, index;
 
-	if (unlikely(current->flags & PF_FREE_PAGES)) {
-		if (!current->nr_local_pages && !in_interrupt()) {
-			list_add(&page->list, &current->local_pages);
-			page->index = order;
-			current->nr_local_pages++;
-			goto out;
-		}
-	}
-
-	zone = page_zone(page);
-
-	mask = (~0UL) << order;
-	base = zone->zone_mem_map;
 	page_idx = page - base;
 	if (page_idx & ~mask)
 		BUG();
 	index = page_idx >> (1 + order);
-	area = zone->free_area + order;
 
-	spin_lock_irqsave(&zone->lock, flags);
 	zone->free_pages -= mask;
 	while (mask + (1 << (MAX_ORDER-1))) {
 		struct page *buddy1, *buddy2;
@@ -148,9 +130,61 @@
 		page_idx &= mask;
 	}
 	list_add(&(base + page_idx)->list, &area->free_list);
+}
+
+static inline void free_pages_check(const char *function, struct page *page)
+{
+	if (	page_mapped(page) ||
+		page->mapping != NULL ||
+		page_count(page) != 0 ||
+		(page->flags & (
+			1 << PG_lru	|
+			1 << PG_private |
+			1 << PG_locked	|
+			1 << PG_active	|
+			1 << PG_writeback )))
+		bad_page(function, page);
+	if (PageDirty(page))
+		ClearPageDirty(page);
+}
+
+/*
+ * Frees a list of pages. 
+ * Assumes all pages on list are in same zone, and of same order.
+ * count is the number of pages to free, or 0 for all on the list.
+ */
+static int
+free_pages_bulk(struct zone *zone, int count,
+		struct list_head *list, unsigned int order)
+{
+	unsigned long mask, 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);
+	while (!list_empty(list) && count--) {
+		page = list_entry(list->prev, struct page, list);
+		/* have to delete it as __free_pages_bulk list manipulates */
+		list_del(&page->list);
+		__free_pages_bulk(page, base, zone, area, mask, order);
+		mod_page_state(pgfree, count<<order);
+		ret++;
+	}
 	spin_unlock_irqrestore(&zone->lock, flags);
-out:
-	return;
+	return ret;
+}
+
+void __free_pages_ok(struct page *page, unsigned int order)
+{
+	LIST_HEAD(list);
+
+	free_pages_check(__FUNCTION__, page);
+	list_add(&page->list, &list);
+	free_pages_bulk(page_zone(page), 1, &list, order);
 }
 
 #define MARK_USED(index, order, area) \
@@ -172,67 +206,99 @@
 		index += size;
 		page += size;
 	}
-	BUG_ON(bad_range(zone, page));
 	return page;
 }
 
 /*
  * This page is about to be returned from the page allocator
  */
-static inline void prep_new_page(struct page *page)
+static void prep_new_page(struct page *page)
 {
-	BUG_ON(page->mapping);
-	BUG_ON(PagePrivate(page));
-	BUG_ON(PageLocked(page));
-	BUG_ON(PageLRU(page));
-	BUG_ON(PageActive(page));
-	BUG_ON(PageDirty(page));
-	BUG_ON(PageWriteback(page));
-	BUG_ON(page->pte.direct != 0);
+	if (	page->mapping ||
+		page_mapped(page) ||
+		(page->flags & (
+			1 << PG_private	|
+			1 << PG_locked	|
+			1 << PG_lru	|
+			1 << PG_active	|
+			1 << PG_dirty	|
+			1 << PG_writeback )))
+		bad_page(__FUNCTION__, page);
+
 	page->flags &= ~(1 << PG_uptodate | 1 << PG_error |
 			1 << PG_referenced | 1 << PG_arch_1 |
 			1 << PG_checked);
 	set_page_count(page, 1);
 }
 
-static struct page *rmqueue(struct zone *zone, unsigned int order)
+/* 
+ * Do the hard work of removing an element from the buddy allocator.
+ * Call me with the zone->lock already held.
+ */
+static struct page *__rmqueue(struct zone *zone, unsigned int order)
 {
-	struct free_area *area = zone->free_area + order;
-	unsigned int curr_order = order;
+	struct free_area * area;
+	unsigned int current_order = order;
 	struct list_head *head, *curr;
-	unsigned long flags;
 	struct page *page;
+	unsigned int index;
 
-	spin_lock_irqsave(&zone->lock, flags);
-	do {
+	for (current_order=order; current_order < MAX_ORDER; ++current_order) {
+		area = zone->free_area + current_order;
 		head = &area->free_list;
 		curr = head->next;
 
-		if (curr != head) {
-			unsigned int index;
+		if (list_empty(&area->free_list))
+			continue;
 
-			page = list_entry(curr, struct page, list);
-			BUG_ON(bad_range(zone, page));
-			list_del(curr);
-			index = page - zone->zone_mem_map;
-			if (curr_order != MAX_ORDER-1)
-				MARK_USED(index, curr_order, area);
-			zone->free_pages -= 1UL << order;
+		page = list_entry(curr, struct page, list);
+		list_del(curr);
+		index = page - zone->zone_mem_map;
+		if (current_order != MAX_ORDER-1)
+			MARK_USED(index, current_order, area);
+		zone->free_pages -= 1UL << order;
+		return expand(zone, page, index, order, current_order, area);
+	}
 
-			page = expand(zone, page, index, order, curr_order, area);
-			spin_unlock_irqrestore(&zone->lock, flags);
+	return NULL;
+}
 
-			if (bad_range(zone, page))
-				BUG();
-			prep_new_page(page);
-			return page;	
-		}
-		curr_order++;
-		area++;
-	} while (curr_order < MAX_ORDER);
+/* 
+ * Obtain a specified number of elements from the buddy allocator, all under
+ * a single hold of the lock, for efficiency.  Add them to the supplied list.
+ * Returns the number of new pages which were placed at *list.
+ */
+static int rmqueue_bulk(struct zone *zone, unsigned int order, 
+			unsigned long count, struct list_head *list)
+{
+	unsigned long flags;
+	int i, allocated = 0;
+	struct page *page;
+	struct list_head *curr;
+	LIST_HEAD(temp);
+	
+	spin_lock_irqsave(&zone->lock, flags);
+	for (i = 0; i < count; ++i) {
+		page = __rmqueue(zone, order);
+		if (page == NULL)
+			break;
+		++allocated;
+		list_add(&page->list, &temp);
+	}
 	spin_unlock_irqrestore(&zone->lock, flags);
 
-	return NULL;
+	/*
+	 * This may look inefficient because we're walking the list again,
+	 * but the cachelines are hot, so it's very cheap, and this way we
+	 * can drop the zone lock much earlier
+	 */
+	list_for_each(curr, &temp) {
+		page = list_entry(curr, struct page, list);
+		BUG_ON(bad_range(zone, page));
+		prep_new_page(page);
+	}
+	list_splice(&temp, list->prev);
+	return allocated;
 }
 
 #ifdef CONFIG_SOFTWARE_SUSPEND
@@ -259,56 +325,69 @@
 }
 #endif /* CONFIG_SOFTWARE_SUSPEND */
 
-static /* inline */ struct page *
-balance_classzone(struct zone* classzone, unsigned int gfp_mask,
-			unsigned int order, int * freed)
-{
-	struct page * page = NULL;
-	int __freed = 0;
-
-	BUG_ON(in_interrupt());
-
-	current->allocation_order = order;
-	current->flags |= PF_MEMALLOC | PF_FREE_PAGES;
-
-	__freed = try_to_free_pages(classzone, gfp_mask, order);
-
-	current->flags &= ~(PF_MEMALLOC | PF_FREE_PAGES);
-
-	if (current->nr_local_pages) {
-		struct list_head * entry, * local_pages;
-		struct page * tmp;
-		int nr_pages;
-
-		local_pages = &current->local_pages;
-
-		if (likely(__freed)) {
-			/* pick from the last inserted so we're lifo */
-			entry = local_pages->next;
-			do {
-				tmp = list_entry(entry, struct page, list);
-				if (tmp->index == order && memclass(page_zone(tmp), classzone)) {
-					list_del(entry);
-					page = tmp;
-					current->nr_local_pages--;
-					prep_new_page(page);
-					break;
-				}
-			} while ((entry = entry->next) != local_pages);
-		}
+/*
+ * Free a 0-order page
+ */
+static void FASTCALL(free_hot_cold_page(struct page *page, int cold));
+static void free_hot_cold_page(struct page *page, int cold)
+{
+	struct zone *zone = page_zone(page);
+	struct per_cpu_pages *pcp;
+	unsigned long flags;
 
-		nr_pages = current->nr_local_pages;
-		/* free in reverse order so that the global order will be lifo */
-		while ((entry = local_pages->prev) != local_pages) {
-			list_del(entry);
-			tmp = list_entry(entry, struct page, list);
-			__free_pages_ok(tmp, tmp->index);
-			if (!nr_pages--)
-				BUG();
+	free_pages_check(__FUNCTION__, page);
+	pcp = &zone->pageset[get_cpu()].pcp[cold];
+	local_irq_save(flags);
+	if (pcp->count >= pcp->high)
+		pcp->count -= free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+	list_add(&page->list, &pcp->list);
+	pcp->count++;
+	local_irq_restore(flags);
+	put_cpu();
+}
+
+void free_hot_page(struct page *page)
+{
+	free_hot_cold_page(page, 0);
+}
+	
+void free_cold_page(struct page *page)
+{
+	free_hot_cold_page(page, 1);
+}
+
+static struct page *buffered_rmqueue(struct zone *zone, int order, int cold)
+{
+	unsigned long flags;
+	struct page *page = NULL;
+
+	if (order == 0) {
+		struct per_cpu_pages *pcp;
+
+		pcp = &zone->pageset[get_cpu()].pcp[cold];
+		local_irq_save(flags);
+		if (pcp->count <= pcp->low)
+			pcp->count += rmqueue_bulk(zone, 0,
+						pcp->batch, &pcp->list);
+		if (pcp->count) {
+			page = list_entry(pcp->list.next, struct page, list);
+			list_del(&page->list);
+			pcp->count--;
 		}
-		current->nr_local_pages = 0;
+		local_irq_restore(flags);
+		put_cpu();
+	}
+
+	if (page == NULL) {
+		spin_lock_irqsave(&zone->lock, flags);
+		page = __rmqueue(zone, order);
+		spin_unlock_irqrestore(&zone->lock, flags);
+	}
+
+	if (page != NULL) {
+		BUG_ON(bad_range(zone, page));
+		prep_new_page(page);
 	}
-	*freed = __freed;
 	return page;
 }
 
@@ -321,12 +400,18 @@
 {
 	unsigned long min;
 	struct zone **zones, *classzone;
-	struct page * page;
-	int freed, i;
+	struct page *page;
+	int cflags;
+	int i;
+	int cold;
 
 	if (gfp_mask & __GFP_WAIT)
 		might_sleep();
 
+	cold = 0;
+	if (gfp_mask & __GFP_COLD)
+		cold = 1;
+
 	mod_page_state(pgalloc, 1<<order);
 
 	zones = zonelist->zones;  /* the list of zones suitable for gfp_mask */
@@ -342,7 +427,7 @@
 		/* the incremental min is allegedly to discourage fallback */
 		min += z->pages_low;
 		if (z->free_pages > min || z->free_pages >= z->pages_high) {
-			page = rmqueue(z, order);
+			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
@@ -367,7 +452,7 @@
 			local_min >>= 2;
 		min += local_min;
 		if (z->free_pages > min || z->free_pages >= z->pages_high) {
-			page = rmqueue(z, order);
+			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
@@ -381,7 +466,7 @@
 		for (i = 0; zones[i] != NULL; i++) {
 			struct zone *z = zones[i];
 
-			page = rmqueue(z, order);
+			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
@@ -399,9 +484,10 @@
 		goto nopage;
 
 	inc_page_state(allocstall);
-	page = balance_classzone(classzone, gfp_mask, order, &freed);
-	if (page)
-		return page;
+	cflags = current->flags;
+	current->flags |= PF_MEMALLOC;
+	try_to_free_pages(classzone, gfp_mask, order);
+	current->flags = cflags;
 
 	/* go through the zonelist yet one more time */
 	min = 1UL << order;
@@ -410,7 +496,7 @@
 
 		min += z->pages_min;
 		if (z->free_pages > min || z->free_pages >= z->pages_high) {
-			page = rmqueue(z, order);
+			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
@@ -462,13 +548,17 @@
 	int i = pagevec_count(pvec);
 
 	while (--i >= 0)
-		__free_pages_ok(pvec->pages[i], 0);
+		free_hot_cold_page(pvec->pages[i], pvec->cold);
 }
 
 void __free_pages(struct page *page, unsigned int order)
 {
-	if (!PageReserved(page) && put_page_testzero(page))
-		__free_pages_ok(page, order);
+	if (!PageReserved(page) && put_page_testzero(page)) {
+		if (order == 0)
+			free_hot_page(page);
+		else
+			__free_pages_ok(page, order);
+	}
 }
 
 void free_pages(unsigned long addr, unsigned int order)
@@ -559,8 +649,8 @@
  * The result is unavoidably approximate - it can change
  * during and after execution of this function.
  */
-struct page_state page_states[NR_CPUS] __cacheline_aligned;
-EXPORT_SYMBOL(page_states);
+DEFINE_PER_CPU(struct page_state, page_states) = {0};
+EXPORT_PER_CPU_SYMBOL(page_states);
 
 void __get_page_state(struct page_state *ret, int nr)
 {
@@ -573,7 +663,7 @@
 		if (!cpu_online(cpu))
 			continue;
 
-		in = (unsigned long *)(page_states + cpu);
+		in = (unsigned long *)&per_cpu(page_states, cpu);
 		out = (unsigned long *)ret;
 		for (off = 0; off < nr; off++)
 			*out++ += *in++;
@@ -869,7 +959,7 @@
 	unsigned long i, j;
 	unsigned long local_offset;
 	const unsigned long zone_required_alignment = 1UL << (MAX_ORDER-1);
-	int nid = pgdat->node_id;
+	int cpu, nid = pgdat->node_id;
 	struct page *lmem_map = pgdat->node_mem_map;
 	unsigned long zone_start_pfn = pgdat->node_start_pfn;
 
@@ -881,13 +971,13 @@
 		struct zone *zone = pgdat->node_zones + j;
 		unsigned long mask;
 		unsigned long size, realsize;
+		unsigned long batch;
 
 		zone_table[nid * MAX_NR_ZONES + j] = zone;
 		realsize = size = zones_size[j];
 		if (zholes_size)
 			realsize -= zholes_size[j];
 
-		printk("  %s zone: %lu pages\n", zone_names[j], realsize);
 		zone->spanned_pages = size;
 		zone->present_pages = realsize;
 		zone->name = zone_names[j];
@@ -895,6 +985,40 @@
 		spin_lock_init(&zone->lru_lock);
 		zone->zone_pgdat = pgdat;
 		zone->free_pages = 0;
+
+		/*
+		 * The per-cpu-pages pools are set to around 1000th of the
+		 * size of the zone.  But no more than 1/4 of a meg - there's
+		 * no point in going beyond the size of L2 cache.
+		 *
+		 * OK, so we don't know how big the cache is.  So guess.
+		 */
+		batch = zone->present_pages / 1024;
+		if (batch * PAGE_SIZE > 256 * 1024)
+			batch = (256 * 1024) / PAGE_SIZE;
+		batch /= 4;		/* We effectively *= 4 below */
+		if (batch < 1)
+			batch = 1;
+
+		for (cpu = 0; cpu < NR_CPUS; cpu++) {
+			struct per_cpu_pages *pcp;
+
+			pcp = &zone->pageset[cpu].pcp[0];	/* hot */
+			pcp->count = 0;
+			pcp->low = 2 * batch;
+			pcp->high = 6 * batch;
+			pcp->batch = 1 * batch;
+			INIT_LIST_HEAD(&pcp->list);
+
+			pcp = &zone->pageset[cpu].pcp[1];	/* cold */
+			pcp->count = 0;
+			pcp->low = 0;
+			pcp->high = 2 * batch;
+			pcp->batch = 1 * batch;
+			INIT_LIST_HEAD(&pcp->list);
+		}
+		printk("  %s zone: %lu pages, LIFO batch:%lu\n",
+				zone_names[j], realsize, batch);
 		INIT_LIST_HEAD(&zone->active_list);
 		INIT_LIST_HEAD(&zone->inactive_list);
 		atomic_set(&zone->refill_counter, 0);
@@ -1183,3 +1307,33 @@
 };
 
 #endif /* CONFIG_PROC_FS */
+
+static void __devinit init_page_alloc_cpu(int cpu)
+{
+	struct page_state *ps = &per_cpu(page_states, cpu);
+	memset(ps, 0, sizeof(*ps));
+}
+	
+static int __devinit page_alloc_cpu_notify(struct notifier_block *self, 
+				unsigned long action, void *hcpu)
+{
+	int cpu = (unsigned long)hcpu;
+	switch(action) {
+	case CPU_UP_PREPARE:
+		init_page_alloc_cpu(cpu);
+		break;
+	default:
+		break;
+	}
+	return NOTIFY_OK;
+}
+
+static struct notifier_block __devinitdata page_alloc_nb = {
+	.notifier_call	= page_alloc_cpu_notify,
+};
+
+void __init page_alloc_init(void)
+{
+	init_page_alloc_cpu(smp_processor_id());
+	register_cpu_notifier(&page_alloc_nb);
+}
diff -Nru a/mm/readahead.c b/mm/readahead.c
--- a/mm/readahead.c	Wed Oct 30 16:44:20 2002
+++ b/mm/readahead.c	Wed Oct 30 16:44:20 2002
@@ -20,6 +20,16 @@
 };
 
 /*
+ * Initialise a struct file's readahead state
+ */
+void
+file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
+{
+	memset(ra, 0, sizeof(*ra));
+	ra->ra_pages = mapping->backing_dev_info->ra_pages;
+}
+
+/*
  * Return max readahead size for this inode in number-of-pages.
  */
 static inline unsigned long get_max_readahead(struct file_ra_state *ra)
@@ -39,7 +49,7 @@
 	unsigned page_idx;
 	struct pagevec lru_pvec;
 
-	pagevec_init(&lru_pvec);
+	pagevec_init(&lru_pvec, 0);
 
 	if (mapping->a_ops->readpages)
 		return mapping->a_ops->readpages(mapping, pages, nr_pages);
@@ -166,7 +176,7 @@
 			continue;
 
 		read_unlock(&mapping->page_lock);
-		page = page_cache_alloc(mapping);
+		page = page_cache_alloc_cold(mapping);
 		read_lock(&mapping->page_lock);
 		if (!page)
 			break;
diff -Nru a/mm/shmem.c b/mm/shmem.c
--- a/mm/shmem.c	Wed Oct 30 16:44:27 2002
+++ b/mm/shmem.c	Wed Oct 30 16:44:27 2002
@@ -51,6 +51,16 @@
 /* Keep swapped page count in private field of indirect struct page */
 #define nr_swapped		private
 
+/* Flag allocation requirements to shmem_getpage and shmem_swp_alloc */
+enum sgp_type {
+	SGP_READ,	/* don't exceed i_size, don't allocate page */
+	SGP_CACHE,	/* don't exceed i_size, may allocate page */
+	SGP_WRITE,	/* may exceed i_size, may allocate page */
+};
+
+static int shmem_getpage(struct inode *inode, unsigned long idx,
+			 struct page **pagep, enum sgp_type sgp);
+
 static inline struct page *shmem_dir_alloc(unsigned int gfp_mask)
 {
 	/*
@@ -132,8 +142,7 @@
  * @inode: inode to recalc
  *
  * We have to calculate the free blocks since the mm can drop
- * undirtied hole pages behind our back.  Later we should be
- * able to use the releasepage method to handle this better.
+ * undirtied hole pages behind our back.
  *
  * But normally   info->alloced == inode->i_mapping->nrpages + info->swapped
  * So mm freed is info->alloced - (inode->i_mapping->nrpages + info->swapped)
@@ -200,8 +209,6 @@
 	struct page **dir;
 	struct page *subdir;
 
-	if (index >= info->next_index)
-		return NULL;
 	if (index < SHMEM_NR_DIRECT)
 		return info->i_direct+index;
 	if (!info->i_indirect) {
@@ -274,20 +281,23 @@
  *
  * @info:	info structure for the inode
  * @index:	index of the page to find
+ * @sgp:	check and recheck i_size? skip allocation?
  */
-static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long index)
+static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long index, enum sgp_type sgp)
 {
 	struct inode *inode = &info->vfs_inode;
 	struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
 	struct page *page = NULL;
 	swp_entry_t *entry;
+	static const swp_entry_t unswapped = {0};
 
-	while (!(entry = shmem_swp_entry(info, index, &page))) {
-		if (index >= info->next_index) {
-			entry = ERR_PTR(-EFAULT);
-			break;
-		}
+	if (sgp != SGP_WRITE &&
+	    ((loff_t) index << PAGE_CACHE_SHIFT) >= inode->i_size)
+		return ERR_PTR(-EINVAL);
 
+	while (!(entry = shmem_swp_entry(info, index, &page))) {
+		if (sgp == SGP_READ)
+			return (swp_entry_t *) &unswapped;
 		/*
 		 * Test free_blocks against 1 not 0, since we have 1 data
 		 * page (and perhaps indirect index pages) yet to allocate:
@@ -314,12 +324,21 @@
 			shmem_free_block(inode);
 			return ERR_PTR(-ENOMEM);
 		}
+		if (sgp != SGP_WRITE &&
+		    ((loff_t) index << PAGE_CACHE_SHIFT) >= inode->i_size) {
+			entry = ERR_PTR(-EINVAL);
+			break;
+		}
+		if (info->next_index <= index)
+			info->next_index = index + 1;
 	}
 	if (page) {
 		/* another task gave its page, or truncated the file */
 		shmem_free_block(inode);
 		shmem_dir_free(page);
 	}
+	if (info->next_index <= index && !IS_ERR(entry))
+		info->next_index = index + 1;
 	return entry;
 }
 
@@ -470,7 +489,6 @@
 
 static int shmem_notify_change(struct dentry *dentry, struct iattr *attr)
 {
-	static struct page *shmem_holdpage(struct inode *, unsigned long);
 	struct inode *inode = dentry->d_inode;
 	struct page *page = NULL;
 	long change = 0;
@@ -495,8 +513,9 @@
 			 * it assigned to swap.
 			 */
 			if (attr->ia_size & (PAGE_CACHE_SIZE-1)) {
-				page = shmem_holdpage(inode,
-					attr->ia_size >> PAGE_CACHE_SHIFT);
+				(void) shmem_getpage(inode,
+					attr->ia_size>>PAGE_CACHE_SHIFT,
+						&page, SGP_READ);
 			}
 		}
 	}
@@ -672,6 +691,7 @@
 
 	spin_lock(&info->lock);
 	shmem_recalc_inode(inode);
+	BUG_ON(index >= info->next_index);
 	entry = shmem_swp_entry(info, index, NULL);
 	BUG_ON(!entry);
 	BUG_ON(entry->val);
@@ -710,57 +730,55 @@
  * vm. If we swap it in we mark it dirty since we also free the swap
  * entry since a page cannot live in both the swap and page cache
  */
-static int shmem_getpage(struct inode *inode, unsigned long idx, struct page **pagep)
+static int shmem_getpage(struct inode *inode, unsigned long idx, struct page **pagep, enum sgp_type sgp)
 {
 	struct address_space *mapping = inode->i_mapping;
 	struct shmem_inode_info *info = SHMEM_I(inode);
 	struct shmem_sb_info *sbinfo;
-	struct page *page;
+	struct page *filepage = *pagep;
+	struct page *swappage;
 	swp_entry_t *entry;
 	swp_entry_t swap;
-	int error = 0;
+	int error;
 
 	if (idx >= SHMEM_MAX_INDEX)
 		return -EFBIG;
-
 	/*
-	 * When writing, i_sem is held against truncation and other
-	 * writing, so next_index will remain as set here; but when
-	 * reading, idx must always be checked against next_index
-	 * after sleeping, lest truncation occurred meanwhile.
+	 * Normally, filepage is NULL on entry, and either found
+	 * uptodate immediately, or allocated and zeroed, or read
+	 * in under swappage, which is then assigned to filepage.
+	 * But shmem_readpage and shmem_prepare_write pass in a locked
+	 * filepage, which may be found not uptodate by other callers
+	 * too, and may need to be copied from the swappage read in.
 	 */
-	spin_lock(&info->lock);
-	if (info->next_index <= idx)
-		info->next_index = idx + 1;
-	spin_unlock(&info->lock);
-
 repeat:
-	page = find_lock_page(mapping, idx);
-	if (page) {
-		*pagep = page;
-		return 0;
-	}
+	if (!filepage)
+		filepage = find_lock_page(mapping, idx);
+	if (filepage && PageUptodate(filepage))
+		goto done;
+	error = 0;
 
 	spin_lock(&info->lock);
 	shmem_recalc_inode(inode);
-	entry = shmem_swp_alloc(info, idx);
+	entry = shmem_swp_alloc(info, idx, sgp);
 	if (IS_ERR(entry)) {
 		spin_unlock(&info->lock);
-		return PTR_ERR(entry);
+		error = PTR_ERR(entry);
+		goto failed;
 	}
 	swap = *entry;
 
 	if (swap.val) {
 		/* Look it up and read it in.. */
-		page = lookup_swap_cache(swap);
-		if (!page) {
+		swappage = lookup_swap_cache(swap);
+		if (!swappage) {
 			shmem_swp_unmap(entry);
 			spin_unlock(&info->lock);
 			swapin_readahead(swap);
-			page = read_swap_cache_async(swap);
-			if (!page) {
+			swappage = read_swap_cache_async(swap);
+			if (!swappage) {
 				spin_lock(&info->lock);
-				entry = shmem_swp_alloc(info, idx);
+				entry = shmem_swp_alloc(info, idx, sgp);
 				if (IS_ERR(entry))
 					error = PTR_ERR(entry);
 				else {
@@ -770,125 +788,152 @@
 				}
 				spin_unlock(&info->lock);
 				if (error)
-					return error;
+					goto failed;
 				goto repeat;
 			}
-			wait_on_page_locked(page);
-			page_cache_release(page);
+			wait_on_page_locked(swappage);
+			page_cache_release(swappage);
 			goto repeat;
 		}
 
 		/* We have to do this with page locked to prevent races */
-		if (TestSetPageLocked(page)) {
+		if (TestSetPageLocked(swappage)) {
 			shmem_swp_unmap(entry);
 			spin_unlock(&info->lock);
-			wait_on_page_locked(page);
-			page_cache_release(page);
+			wait_on_page_locked(swappage);
+			page_cache_release(swappage);
 			goto repeat;
 		}
-		if (PageWriteback(page)) {
+		if (PageWriteback(swappage)) {
 			shmem_swp_unmap(entry);
 			spin_unlock(&info->lock);
-			wait_on_page_writeback(page);
-			unlock_page(page);
-			page_cache_release(page);
+			wait_on_page_writeback(swappage);
+			unlock_page(swappage);
+			page_cache_release(swappage);
 			goto repeat;
 		}
-
-		error = PageUptodate(page)?
-			move_from_swap_cache(page, idx, mapping): -EIO;
-		if (error) {
+		if (!PageUptodate(swappage)) {
 			shmem_swp_unmap(entry);
 			spin_unlock(&info->lock);
-			unlock_page(page);
-			page_cache_release(page);
-			return error;
+			unlock_page(swappage);
+			page_cache_release(swappage);
+			error = -EIO;
+			goto failed;
 		}
 
-		shmem_swp_set(info, entry, 0);
+		if (filepage) {
+			shmem_swp_set(info, entry, 0);
+			shmem_swp_unmap(entry);
+			delete_from_swap_cache(swappage);
+			spin_unlock(&info->lock);
+			flush_page_to_ram(swappage);
+			copy_highpage(filepage, swappage);
+			unlock_page(swappage);
+			page_cache_release(swappage);
+			flush_dcache_page(filepage);
+			SetPageUptodate(filepage);
+			set_page_dirty(filepage);
+			swap_free(swap);
+		} else if (!(error = move_from_swap_cache(
+				swappage, idx, mapping))) {
+			shmem_swp_set(info, entry, 0);
+			shmem_swp_unmap(entry);
+			spin_unlock(&info->lock);
+			filepage = swappage;
+			swap_free(swap);
+		} else {
+			shmem_swp_unmap(entry);
+			spin_unlock(&info->lock);
+			unlock_page(swappage);
+			page_cache_release(swappage);
+			if (error != -EEXIST)
+				goto failed;
+			goto repeat;
+		}
+	} else if (sgp == SGP_READ && !filepage) {
 		shmem_swp_unmap(entry);
+		filepage = find_get_page(mapping, idx);
+		if (filepage &&
+		    (!PageUptodate(filepage) || TestSetPageLocked(filepage))) {
+			spin_unlock(&info->lock);
+			wait_on_page_locked(filepage);
+			page_cache_release(filepage);
+			filepage = NULL;
+			goto repeat;
+		}
 		spin_unlock(&info->lock);
-		swap_free(swap);
 	} else {
 		shmem_swp_unmap(entry);
-		spin_unlock(&info->lock);
 		sbinfo = SHMEM_SB(inode->i_sb);
 		spin_lock(&sbinfo->stat_lock);
 		if (sbinfo->free_blocks == 0) {
 			spin_unlock(&sbinfo->stat_lock);
-			return -ENOSPC;
+			spin_unlock(&info->lock);
+			error = -ENOSPC;
+			goto failed;
 		}
 		sbinfo->free_blocks--;
 		inode->i_blocks += BLOCKS_PER_PAGE;
 		spin_unlock(&sbinfo->stat_lock);
 
-		page = page_cache_alloc(mapping);
-		if (!page) {
-			shmem_free_block(inode);
-			return -ENOMEM;
-		}
-
-		spin_lock(&info->lock);
-		entry = shmem_swp_alloc(info, idx);
-		if (IS_ERR(entry))
-			error = PTR_ERR(entry);
-		else {
-			swap = *entry;
-			shmem_swp_unmap(entry);
-		}
-		if (error || swap.val ||
-		    add_to_page_cache_lru(page, mapping, idx) < 0) {
+		if (!filepage) {
 			spin_unlock(&info->lock);
-			page_cache_release(page);
-			shmem_free_block(inode);
-			if (error)
-				return error;
-			goto repeat;
+			filepage = page_cache_alloc(mapping);
+			if (!filepage) {
+				shmem_free_block(inode);
+				error = -ENOMEM;
+				goto failed;
+			}
+
+			spin_lock(&info->lock);
+			entry = shmem_swp_alloc(info, idx, sgp);
+			if (IS_ERR(entry))
+				error = PTR_ERR(entry);
+			else {
+				swap = *entry;
+				shmem_swp_unmap(entry);
+			}
+			if (error || swap.val ||
+			    (error = add_to_page_cache_lru(
+					filepage, mapping, idx))) {
+				spin_unlock(&info->lock);
+				page_cache_release(filepage);
+				shmem_free_block(inode);
+				filepage = NULL;
+				if (error != -EEXIST)
+					goto failed;
+				goto repeat;
+			}
 		}
+
 		info->alloced++;
 		spin_unlock(&info->lock);
-		clear_highpage(page);
-		SetPageUptodate(page);
+		clear_highpage(filepage);
+		flush_dcache_page(filepage);
+		SetPageUptodate(filepage);
+	}
+done:
+	if (!*pagep) {
+		if (filepage) {
+			unlock_page(filepage);
+			*pagep = filepage;
+		} else
+			*pagep = ZERO_PAGE(0);
 	}
-
-	/* We have the page */
-	*pagep = page;
 	return 0;
-}
-
-static struct page *shmem_holdpage(struct inode *inode, unsigned long idx)
-{
-	struct shmem_inode_info *info = SHMEM_I(inode);
-	struct page *page;
-	swp_entry_t *entry;
-	swp_entry_t swap = {0};
 
-	/*
-	 * Somehow, it feels wrong for truncation down to cause any
-	 * allocation: so instead of a blind shmem_getpage, check that
-	 * the page has actually been instantiated before holding it.
-	 */
-	spin_lock(&info->lock);
-	page = find_get_page(inode->i_mapping, idx);
-	if (!page) {
-		entry = shmem_swp_entry(info, idx, NULL);
-		if (entry) {
-			swap = *entry;
-			shmem_swp_unmap(entry);
-		}
-	}
-	spin_unlock(&info->lock);
-	if (swap.val) {
-		if (shmem_getpage(inode, idx, &page) == 0)
-			unlock_page(page);
+failed:
+	if (*pagep != filepage) {
+		unlock_page(filepage);
+		page_cache_release(filepage);
 	}
-	return page;
+	return error;
 }
 
 struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int unused)
 {
 	struct inode *inode = vma->vm_file->f_dentry->d_inode;
-	struct page *page;
+	struct page *page = NULL;
 	unsigned long idx;
 	int error;
 
@@ -896,14 +941,10 @@
 	idx += vma->vm_pgoff;
 	idx >>= PAGE_CACHE_SHIFT - PAGE_SHIFT;
 
-	if (((loff_t) idx << PAGE_CACHE_SHIFT) >= inode->i_size)
-		return NOPAGE_SIGBUS;
-
-	error = shmem_getpage(inode, idx, &page);
+	error = shmem_getpage(inode, idx, &page, SGP_CACHE);
 	if (error)
 		return (error == -ENOMEM)? NOPAGE_OOM: NOPAGE_SIGBUS;
 
-	unlock_page(page);
 	flush_page_to_ram(page);
 	return page;
 }
@@ -1017,13 +1058,33 @@
 static struct inode_operations shmem_symlink_inode_operations;
 static struct inode_operations shmem_symlink_inline_operations;
 
+/*
+ * tmpfs itself makes no use of generic_file_read, generic_file_mmap
+ * or generic_file_write; but shmem_readpage, shmem_prepare_write and
+ * simple_commit_write let a tmpfs file be used below the loop driver.
+ */
+static int
+shmem_readpage(struct file *file, struct page *page)
+{
+	struct inode *inode = page->mapping->host;
+	int error = shmem_getpage(inode, page->index, &page, SGP_CACHE);
+	unlock_page(page);
+	return error;
+}
+
+static int
+shmem_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to)
+{
+	struct inode *inode = page->mapping->host;
+	return shmem_getpage(inode, page->index, &page, SGP_WRITE);
+}
+
 static ssize_t
 shmem_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
 {
 	struct inode	*inode = file->f_dentry->d_inode;
 	unsigned long	limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
 	loff_t		pos;
-	struct page	*page;
 	unsigned long	written;
 	long		status;
 	int		err;
@@ -1073,11 +1134,45 @@
 			send_sig(SIGXFSZ, current, 0);
 			goto out;
 		}
-		if (count > limit - pos) {
+		if (pos > 0xFFFFFFFFULL || count > limit - (u32)pos) {
+			/* send_sig(SIGXFSZ, current, 0); */
+			count = limit - (u32)pos;
+		}
+	}
+
+	/*
+	 *	LFS rule
+	 */
+	if (pos + count > MAX_NON_LFS && !(file->f_flags&O_LARGEFILE)) {
+		if (pos >= MAX_NON_LFS) {
 			send_sig(SIGXFSZ, current, 0);
-			count = limit - pos;
+			goto out;
 		}
+		if (count > MAX_NON_LFS - (u32)pos) {
+			/* send_sig(SIGXFSZ, current, 0); */
+			count = MAX_NON_LFS - (u32)pos;
+		}
+	}
+
+	/*
+	 *	Are we about to exceed the fs block limit ?
+	 *
+	 *	If we have written data it becomes a short write
+	 *	If we have exceeded without writing data we send
+	 *	a signal and give them an EFBIG.
+	 *
+	 *	Linus frestrict idea will clean these up nicely..
+	 */
+	if (pos >= SHMEM_MAX_BYTES) {
+		if (count || pos > SHMEM_MAX_BYTES) {
+			send_sig(SIGXFSZ, current, 0);
+			err = -EFBIG;
+			goto out;
+		}
+		/* zero-length writes at ->s_maxbytes are OK */
 	}
+	if (pos + count > SHMEM_MAX_BYTES)
+		count = SHMEM_MAX_BYTES - pos;
 
 	status	= 0;
 	if (count) {
@@ -1086,61 +1181,65 @@
 	}
 
 	while (count) {
+		struct page *page = NULL;
 		unsigned long bytes, index, offset;
 		char *kaddr;
+		int left;
 
-		/*
-		 * Try to find the page in the cache. If it isn't there,
-		 * allocate a free page.
-		 */
 		offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */
 		index = pos >> PAGE_CACHE_SHIFT;
 		bytes = PAGE_CACHE_SIZE - offset;
-		if (bytes > count) {
+		if (bytes > count)
 			bytes = count;
-		}
 
 		/*
-		 * Bring in the user page that we will copy from _first_.
-		 * Otherwise there's a nasty deadlock on copying from the
-		 * same page as we're writing to, without it being marked
-		 * up-to-date.
+		 * We don't hold page lock across copy from user -
+		 * what would it guard against? - so no deadlock here.
+		 * But it still may be a good idea to prefault below.
 		 */
-		{ volatile unsigned char dummy;
-			__get_user(dummy, buf);
-			__get_user(dummy, buf+bytes-1);
-		}
 
-		status = shmem_getpage(inode, index, &page);
+		status = shmem_getpage(inode, index, &page, SGP_WRITE);
 		if (status)
 			break;
 
-		kaddr = kmap(page);
-		status = __copy_from_user(kaddr+offset, buf, bytes);
-		kunmap(page);
-		if (status)
-			goto fail_write;
+		left = bytes;
+		if (PageHighMem(page)) {
+			volatile unsigned char dummy;
+			__get_user(dummy, buf);
+			__get_user(dummy, buf + bytes - 1);
 
+			kaddr = kmap_atomic(page, KM_USER0);
+			left = __copy_from_user(kaddr + offset, buf, bytes);
+			kunmap_atomic(kaddr, KM_USER0);
+		}
+		if (left) {
+			kaddr = kmap(page);
+			left = __copy_from_user(kaddr + offset, buf, bytes);
+			kunmap(page);
+		}
 		flush_dcache_page(page);
-		if (bytes > 0) {
-			set_page_dirty(page);
-			written += bytes;
-			count -= bytes;
-			pos += bytes;
-			buf += bytes;
-			if (pos > inode->i_size)
-				inode->i_size = pos;
+		if (left) {
+			page_cache_release(page);
+			status = -EFAULT;
+			break;
 		}
-unlock:
-		/* Mark it unlocked again and drop the page.. */
-		unlock_page(page);
+
+		set_page_dirty(page);
 		page_cache_release(page);
 
-		if (status < 0)
-			break;
+		/*
+		 * Balance dirty pages??
+		 */
+
+		written += bytes;
+		count -= bytes;
+		pos += bytes;
+		buf += bytes;
+		if (pos > inode->i_size)
+			inode->i_size = pos;
 	}
-	*ppos = pos;
 
+	*ppos = pos;
 	err = written ? written : status;
 out:
 	/* Short writes give back address space */
@@ -1149,25 +1248,20 @@
 out_nc:
 	up(&inode->i_sem);
 	return err;
-fail_write:
-	status = -EFAULT;
-	ClearPageUptodate(page);
-	goto unlock;
 }
 
-static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc)
+static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor)
 {
 	struct inode *inode = filp->f_dentry->d_inode;
 	struct address_space *mapping = inode->i_mapping;
 	unsigned long index, offset;
-	int nr = 1;
 
 	index = *ppos >> PAGE_CACHE_SHIFT;
 	offset = *ppos & ~PAGE_CACHE_MASK;
 
-	while (nr && desc->count) {
-		struct page *page;
-		unsigned long end_index, nr;
+	for (;;) {
+		struct page *page = NULL;
+		unsigned long end_index, nr, ret;
 
 		end_index = inode->i_size >> PAGE_CACHE_SHIFT;
 		if (index > end_index)
@@ -1178,9 +1272,9 @@
 				break;
 		}
 
-		desc->error = shmem_getpage(inode, index, &page);
+		desc->error = shmem_getpage(inode, index, &page, SGP_READ);
 		if (desc->error) {
-			if (desc->error == -EFAULT)
+			if (desc->error == -EINVAL)
 				desc->error = 0;
 			break;
 		}
@@ -1194,15 +1288,18 @@
 		if (index == end_index) {
 			nr = inode->i_size & ~PAGE_CACHE_MASK;
 			if (nr <= offset) {
-				unlock_page(page);
 				page_cache_release(page);
 				break;
 			}
 		}
-		unlock_page(page);
 		nr -= offset;
 
-		if (!list_empty(&mapping->i_mmap_shared))
+		/* 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.
+		 */
+		if (!list_empty(&mapping->i_mmap_shared) &&
+		    page != ZERO_PAGE(0))
 			flush_dcache_page(page);
 
 		/*
@@ -1215,12 +1312,14 @@
 		 * "pos" here (the actor routine has to update the user buffer
 		 * pointers and the remaining count).
 		 */
-		nr = file_read_actor(desc, page, offset, nr);
-		offset += nr;
+		ret = actor(desc, page, offset, nr);
+		offset += ret;
 		index += offset >> PAGE_CACHE_SHIFT;
 		offset &= ~PAGE_CACHE_MASK;
 
 		page_cache_release(page);
+		if (ret != nr || !desc->count)
+			break;
 	}
 
 	*ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
@@ -1229,27 +1328,43 @@
 
 static ssize_t shmem_file_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
 {
-	ssize_t retval;
+	read_descriptor_t desc;
 
-	retval = -EFAULT;
-	if (access_ok(VERIFY_WRITE, buf, count)) {
-		retval = 0;
+	if ((ssize_t) count < 0)
+		return -EINVAL;
+	if (!access_ok(VERIFY_WRITE, buf, count))
+		return -EFAULT;
+	if (!count)
+		return 0;
 
-		if (count) {
-			read_descriptor_t desc;
+	desc.written = 0;
+	desc.count = count;
+	desc.buf = buf;
+	desc.error = 0;
 
-			desc.written = 0;
-			desc.count = count;
-			desc.buf = buf;
-			desc.error = 0;
-			do_shmem_file_read(filp, ppos, &desc);
+	do_shmem_file_read(filp, ppos, &desc, file_read_actor);
+	if (desc.written)
+		return desc.written;
+	return desc.error;
+}
 
-			retval = desc.written;
-			if (!retval)
-				retval = desc.error;
-		}
-	}
-	return retval;
+static ssize_t shmem_file_sendfile(struct file *out_file,
+	struct file *in_file, loff_t *ppos, size_t count)
+{
+	read_descriptor_t desc;
+
+	if (!count)
+		return 0;
+
+	desc.written = 0;
+	desc.count = count;
+	desc.buf = (char *)out_file;
+	desc.error = 0;
+
+	do_shmem_file_read(in_file, ppos, &desc, file_send_actor);
+	if (desc.written)
+		return desc.written;
+	return desc.error;
 }
 
 static int shmem_statfs(struct super_block *sb, struct statfs *buf)
@@ -1317,39 +1432,6 @@
 	return 0;
 }
 
-static inline int shmem_positive(struct dentry *dentry)
-{
-	return dentry->d_inode && !d_unhashed(dentry);
-}
-
-/*
- * Check that a directory is empty (this works
- * for regular files too, they'll just always be
- * considered empty..).
- *
- * Note that an empty directory can still have
- * children, they just all have to be negative..
- */
-static int shmem_empty(struct dentry *dentry)
-{
-	struct list_head *list;
-
-	spin_lock(&dcache_lock);
-	list = dentry->d_subdirs.next;
-
-	while (list != &dentry->d_subdirs) {
-		struct dentry *de = list_entry(list, struct dentry, d_child);
-
-		if (shmem_positive(de)) {
-			spin_unlock(&dcache_lock);
-			return 0;
-		}
-		list = list->next;
-	}
-	spin_unlock(&dcache_lock);
-	return 1;
-}
-
 static int shmem_unlink(struct inode *dir, struct dentry *dentry)
 {
 	struct inode *inode = dentry->d_inode;
@@ -1363,7 +1445,7 @@
 
 static int shmem_rmdir(struct inode *dir, struct dentry *dentry)
 {
-	if (!shmem_empty(dentry))
+	if (!simple_empty(dentry))
 		return -ENOTEMPTY;
 
 	dir->i_nlink--;
@@ -1381,7 +1463,7 @@
 	struct inode *inode = old_dentry->d_inode;
 	int they_are_dirs = S_ISDIR(inode->i_mode);
 
-	if (!shmem_empty(new_dentry))
+	if (!simple_empty(new_dentry))
 		return -ENOTEMPTY;
 
 	if (new_dentry->d_inode) {
@@ -1406,7 +1488,7 @@
 	int error;
 	int len;
 	struct inode *inode;
-	struct page *page;
+	struct page *page = NULL;
 	char *kaddr;
 	struct shmem_inode_info *info;
 
@@ -1429,7 +1511,7 @@
 			iput(inode);
 			return -ENOMEM;
 		}
-		error = shmem_getpage(inode, 0, &page);
+		error = shmem_getpage(inode, 0, &page, SGP_WRITE);
 		if (error) {
 			vm_unacct_memory(VM_ACCT(1));
 			iput(inode);
@@ -1439,11 +1521,10 @@
 		spin_lock(&shmem_ilock);
 		list_add_tail(&info->list, &shmem_inodes);
 		spin_unlock(&shmem_ilock);
-		kaddr = kmap(page);
+		kaddr = kmap_atomic(page, KM_USER0);
 		memcpy(kaddr, symname, len);
-		kunmap(page);
+		kunmap_atomic(kaddr, KM_USER0);
 		set_page_dirty(page);
-		unlock_page(page);
 		page_cache_release(page);
 	}
 	dir->i_size += BOGO_DIRENT_SIZE;
@@ -1465,26 +1546,24 @@
 
 static int shmem_readlink(struct dentry *dentry, char *buffer, int buflen)
 {
-	struct page *page;
-	int res = shmem_getpage(dentry->d_inode, 0, &page);
+	struct page *page = NULL;
+	int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ);
 	if (res)
 		return res;
 	res = vfs_readlink(dentry, buffer, buflen, kmap(page));
 	kunmap(page);
-	unlock_page(page);
 	page_cache_release(page);
 	return res;
 }
 
 static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	struct page *page;
-	int res = shmem_getpage(dentry->d_inode, 0, &page);
+	struct page *page = NULL;
+	int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ);
 	if (res)
 		return res;
 	res = vfs_follow_link(nd, kmap(page));
 	kunmap(page);
-	unlock_page(page);
 	page_cache_release(page);
 	return res;
 }
@@ -1569,15 +1648,10 @@
 	unsigned long max_blocks = sbinfo->max_blocks;
 	unsigned long max_inodes = sbinfo->max_inodes;
 
-	if (shmem_parse_options (data, NULL, NULL, NULL, &max_blocks, &max_inodes))
+	if (shmem_parse_options(data, NULL, NULL, NULL, &max_blocks, &max_inodes))
 		return -EINVAL;
 	return shmem_set_size(sbinfo, max_blocks, max_inodes);
 }
-
-int shmem_sync_file(struct file *file, struct dentry *dentry, int datasync)
-{
-	return 0;
-}
 #endif
 
 static int shmem_fill_super(struct super_block *sb, void *data, int silent)
@@ -1590,7 +1664,7 @@
 	gid_t gid = current->fsgid;
 	struct shmem_sb_info *sbinfo;
 	struct sysinfo si;
-	int err;
+	int err = -ENOMEM;
 
 	sbinfo = kmalloc(sizeof(struct shmem_sb_info), GFP_KERNEL);
 	if (!sbinfo)
@@ -1606,7 +1680,7 @@
 	blocks = inodes = si.totalram / 2;
 
 #ifdef CONFIG_TMPFS
-	if (shmem_parse_options (data, &mode, &uid, &gid, &blocks, &inodes)) {
+	if (shmem_parse_options(data, &mode, &uid, &gid, &blocks, &inodes)) {
 		err = -EINVAL;
 		goto failed;
 	}
@@ -1625,18 +1699,13 @@
 	sb->s_magic = TMPFS_MAGIC;
 	sb->s_op = &shmem_ops;
 	inode = shmem_get_inode(sb, S_IFDIR | mode, 0);
-	if (!inode) {
-		err = -ENOMEM;
+	if (!inode)
 		goto failed;
-	}
-
 	inode->i_uid = uid;
 	inode->i_gid = gid;
 	root = d_alloc_root(inode);
-	if (!root) {
-		err = -ENOMEM;
+	if (!root)
 		goto failed_iput;
-	}
 	sb->s_root = root;
 	return 0;
 
@@ -1702,6 +1771,11 @@
 	.writepages	= shmem_writepages,
 	.vm_writeback	= shmem_vm_writeback,
 	.set_page_dirty	= __set_page_dirty_nobuffers,
+#ifdef CONFIG_TMPFS
+	.readpage	= shmem_readpage,
+	.prepare_write	= shmem_prepare_write,
+	.commit_write	= simple_commit_write,
+#endif
 };
 
 static struct file_operations shmem_file_operations = {
@@ -1709,7 +1783,8 @@
 #ifdef CONFIG_TMPFS
 	.read		= shmem_file_read,
 	.write		= shmem_file_write,
-	.fsync		= shmem_sync_file,
+	.fsync		= simple_sync_file,
+	.sendfile	= shmem_file_sendfile,
 #endif
 };
 
@@ -1754,15 +1829,6 @@
 	return get_sb_nodev(fs_type, flags, data, shmem_fill_super);
 }
 
-#ifdef CONFIG_TMPFS
-/* type "shm" will be tagged obsolete in 2.5 */
-static struct file_system_type shmem_fs_type = {
-	.owner		= THIS_MODULE,
-	.name		= "shmem",
-	.get_sb		= shmem_get_sb,
-	.kill_sb	= kill_litter_super,
-};
-#endif
 static struct file_system_type tmpfs_fs_type = {
 	.owner		= THIS_MODULE,
 	.name		= "tmpfs",
@@ -1771,10 +1837,9 @@
 };
 static struct vfsmount *shm_mnt;
 
-static int __init init_shmem_fs(void)
+static int __init init_tmpfs(void)
 {
 	int error;
-	struct vfsmount *res;
 
 	error = init_inodecache();
 	if (error)
@@ -1786,52 +1851,31 @@
 		goto out2;
 	}
 #ifdef CONFIG_TMPFS
-	error = register_filesystem(&shmem_fs_type);
-	if (error) {
-		printk(KERN_ERR "Could not register shm fs\n");
-		goto out1;
-	}
 	devfs_mk_dir(NULL, "shm", NULL);
 #endif
-	res = kern_mount(&tmpfs_fs_type);
-	if (IS_ERR (res)) {
-		error = PTR_ERR(res);
-		printk(KERN_ERR "could not kern_mount tmpfs\n");
-		goto out;
+	shm_mnt = kern_mount(&tmpfs_fs_type);
+	if (IS_ERR(shm_mnt)) {
+		error = PTR_ERR(shm_mnt);
+		printk(KERN_ERR "Could not kern_mount tmpfs\n");
+		goto out1;
 	}
-	shm_mnt = res;
 
 	/* The internal instance should not do size checking */
-	shmem_set_size(SHMEM_SB(res->mnt_sb), ULONG_MAX, ULONG_MAX);
+	shmem_set_size(SHMEM_SB(shm_mnt->mnt_sb), ULONG_MAX, ULONG_MAX);
 	return 0;
 
-out:
-#ifdef CONFIG_TMPFS
-	unregister_filesystem(&shmem_fs_type);
 out1:
-#endif
 	unregister_filesystem(&tmpfs_fs_type);
 out2:
 	destroy_inodecache();
 out3:
+	shm_mnt = ERR_PTR(error);
 	return error;
 }
-
-static void __exit exit_shmem_fs(void)
-{
-#ifdef CONFIG_TMPFS
-	unregister_filesystem(&shmem_fs_type);
-#endif
-	unregister_filesystem(&tmpfs_fs_type);
-	mntput(shm_mnt);
-	destroy_inodecache();
-}
-
-module_init(init_shmem_fs)
-module_exit(exit_shmem_fs)
+module_init(init_tmpfs)
 
 /*
- * shmem_file_setup - get an unlinked file living in shmem fs
+ * shmem_file_setup - get an unlinked file living in tmpfs
  *
  * @name: name for dentry (to be seen in /proc/<pid>/maps
  * @size: size to be set for the file
@@ -1844,6 +1888,9 @@
 	struct inode *inode;
 	struct dentry *dentry, *root;
 	struct qstr this;
+
+	if (IS_ERR(shm_mnt))
+		return (void *)shm_mnt;
 
 	if (size > SHMEM_MAX_BYTES)
 		return ERR_PTR(-EINVAL);
diff -Nru a/mm/slab.c b/mm/slab.c
--- a/mm/slab.c	Wed Oct 30 16:44:31 2002
+++ b/mm/slab.c	Wed Oct 30 16:44:31 2002
@@ -8,6 +8,9 @@
  * Major cleanup, different bufctl logic, per-cpu arrays
  *	(c) 2000 Manfred Spraul
  *
+ * Cleanup, make the head arrays unconditional, preparation for NUMA
+ * 	(c) 2002 Manfred Spraul
+ *
  * An implementation of the Slab Allocator as described in outline in;
  *	UNIX Internals: The New Frontiers by Uresh Vahalia
  *	Pub: Prentice Hall	ISBN 0-13-101908-2
@@ -16,7 +19,6 @@
  *	Jeff Bonwick (Sun Microsystems).
  *	Presented at: USENIX Summer 1994 Technical Conference
  *
- *
  * The memory is organized in caches, one cache for each object type.
  * (e.g. inode_cache, dentry_cache, buffer_head, vm_area_struct)
  * Each cache consists out of many slabs (they are small (usually one
@@ -38,21 +40,27 @@
  * kmem_cache_destroy() CAN CRASH if you try to allocate from the cache
  * during kmem_cache_destroy(). The caller must prevent concurrent allocs.
  *
- * On SMP systems, each cache has a short per-cpu head array, most allocs
+ * Each cache has a short per-cpu head array, most allocs
  * and frees go into that array, and if that array overflows, then 1/2
  * of the entries in the array are given back into the global cache.
- * This reduces the number of spinlock operations.
+ * The head array is strictly LIFO and should improve the cache hit rates.
+ * On SMP, it additionally reduces the spinlock operations.
  *
- * The c_cpuarray may not be read with enabled local interrupts.
+ * The c_cpuarray may not be read with enabled local interrupts - 
+ * it's changed with a smp_call_function().
  *
  * SMP synchronization:
  *  constructors and destructors are called without any locking.
- *  Several members in kmem_cache_t and slab_t never change, they
+ *  Several members in kmem_cache_t and struct slab never change, they
  *	are accessed without any locking.
  *  The per-cpu arrays are never accessed from the wrong cpu, no locking,
  *  	and local interrupts are disabled so slab code is preempt-safe.
  *  The non-constant members are protected with a per-cache irq spinlock.
  *
+ * Many thanks to Mark Hemment, who wrote another per-cpu slab patch
+ * in 2000 - many ideas in the current implementation are derived from
+ * his patch.
+ *
  * Further notes from the original documentation:
  *
  * 11 April '97.  Started multi-threading - markhe
@@ -61,10 +69,6 @@
  *	can never happen inside an interrupt (kmem_cache_create(),
  *	kmem_cache_shrink() and kmem_cache_reap()).
  *
- *	To prevent kmem_cache_shrink() trying to shrink a 'growing' cache (which
- *	maybe be sleeping and therefore not holding the semaphore/lock), the
- *	growing field is used.  This also prevents reaping from a cache.
- *
  *	At present, each engine can be growing a cache.  This should be blocked.
  *
  */
@@ -77,6 +81,7 @@
 #include	<linux/init.h>
 #include	<linux/compiler.h>
 #include	<linux/seq_file.h>
+#include	<linux/notifier.h>
 #include	<asm/uaccess.h>
 
 /*
@@ -100,11 +105,6 @@
 #define	FORCED_DEBUG	0
 #endif
 
-/*
- * Parameters for kmem_cache_reap
- */
-#define REAP_SCANLEN	10
-#define REAP_PERFECT	10
 
 /* Shouldn't this be in a header file somewhere? */
 #define	BYTES_PER_WORD		sizeof(void *)
@@ -144,65 +144,104 @@
 typedef unsigned int kmem_bufctl_t;
 
 /* Max number of objs-per-slab for caches which use off-slab slabs.
- * Needed to avoid a possible looping condition in kmem_cache_grow().
+ * Needed to avoid a possible looping condition in cache_grow().
  */
 static unsigned long offslab_limit;
 
 /*
- * slab_t
+ * struct slab
  *
  * Manages the objs in a slab. Placed either at the beginning of mem allocated
  * for a slab, or allocated from an general cache.
  * Slabs are chained into three list: fully used, partial, fully free slabs.
  */
-typedef struct slab_s {
+struct slab {
 	struct list_head	list;
 	unsigned long		colouroff;
 	void			*s_mem;		/* including colour offset */
 	unsigned int		inuse;		/* num of objs active in slab */
 	kmem_bufctl_t		free;
-} slab_t;
-
-#define slab_bufctl(slabp) \
-	((kmem_bufctl_t *)(((slab_t*)slabp)+1))
+};
 
 /*
- * cpucache_t
+ * struct array_cache
  *
  * Per cpu structures
+ * Purpose:
+ * - LIFO ordering, to hand out cache-warm objects from _alloc
+ * - reduce the number of linked list operations
+ * - reduce spinlock operations
+ *
  * The limit is stored in the per-cpu structure to reduce the data cache
  * footprint.
+ *
  */
-typedef struct cpucache_s {
+struct array_cache {
 	unsigned int avail;
 	unsigned int limit;
-} cpucache_t;
+	unsigned int batchcount;
+	unsigned int touched;
+};
+
+/* bootstrap: The caches do not work without cpuarrays anymore,
+ * but the cpuarrays are allocated from the generic caches...
+ */
+#define BOOT_CPUCACHE_ENTRIES	1
+struct arraycache_init {
+	struct array_cache cache;
+	void * entries[BOOT_CPUCACHE_ENTRIES];
+};
+
+/*
+ * The slab lists of all objects.
+ * Hopefully reduce the internal fragmentation
+ * NUMA: The spinlock could be moved from the kmem_cache_t
+ * into this structure, too. Figure out what causes
+ * fewer cross-node spinlock operations.
+ */
+struct kmem_list3 {
+	struct list_head	slabs_partial;	/* partial list first, better asm code */
+	struct list_head	slabs_full;
+	struct list_head	slabs_free;
+	unsigned long	free_objects;
+	int		free_touched;
+	unsigned long	next_reap;
+};
+
+#define LIST3_INIT(parent) \
+	{ \
+		.slabs_full	= LIST_HEAD_INIT(parent.slabs_full), \
+		.slabs_partial	= LIST_HEAD_INIT(parent.slabs_partial), \
+		.slabs_free	= LIST_HEAD_INIT(parent.slabs_free) \
+	}
+#define list3_data(cachep) \
+	(&(cachep)->lists)
+
+/* NUMA: per-node */
+#define list3_data_ptr(cachep, ptr) \
+		list3_data(cachep)
 
-#define cc_entry(cpucache) \
-	((void **)(((cpucache_t*)(cpucache))+1))
-#define cc_data(cachep) \
-	((cachep)->cpudata[smp_processor_id()])
 /*
  * kmem_cache_t
  *
  * manages a cache.
  */
-
+	
 struct kmem_cache_s {
-/* 1) each alloc & free */
-	/* full, partial first, then free */
-	struct list_head	slabs_full;
-	struct list_head	slabs_partial;
-	struct list_head	slabs_free;
+/* 1) per-cpu data, touched during every alloc/free */
+	struct array_cache	*array[NR_CPUS];
+	unsigned int		batchcount;
+	unsigned int		limit;
+/* 2) touched by every alloc & free from the backend */
+	struct kmem_list3	lists;
+	/* NUMA: kmem_3list_t	*nodelists[NR_NODES] */
 	unsigned int		objsize;
 	unsigned int	 	flags;	/* constant flags */
 	unsigned int		num;	/* # of objs per slab */
+	unsigned int		free_limit; /* upper limit of objects in the lists */
 	spinlock_t		spinlock;
-#ifdef CONFIG_SMP
-	unsigned int		batchcount;
-#endif
 
-/* 2) slab additions /removals */
+/* 3) cache_grow/shrink */
 	/* order of pgs per slab (2^n) */
 	unsigned int		gfporder;
 
@@ -213,7 +252,6 @@
 	unsigned int		colour_off;	/* colour offset */
 	unsigned int		colour_next;	/* cache colouring */
 	kmem_cache_t		*slabp_cache;
-	unsigned int		growing;
 	unsigned int		dflags;		/* dynamic flags */
 
 	/* constructor func */
@@ -222,15 +260,11 @@
 	/* de-constructor func */
 	void (*dtor)(void *, kmem_cache_t *, unsigned long);
 
-	unsigned long		failures;
-
-/* 3) cache creation/removal */
+/* 4) cache creation/removal */
 	const char		*name;
 	struct list_head	next;
-#ifdef CONFIG_SMP
-/* 4) per-cpu data */
-	cpucache_t		*cpudata[NR_CPUS];
-#endif
+
+/* 5) statistics */
 #if STATS
 	unsigned long		num_active;
 	unsigned long		num_allocations;
@@ -238,25 +272,28 @@
 	unsigned long		grown;
 	unsigned long		reaped;
 	unsigned long 		errors;
-#ifdef CONFIG_SMP
+	unsigned long		max_freeable;
 	atomic_t		allochit;
 	atomic_t		allocmiss;
 	atomic_t		freehit;
 	atomic_t		freemiss;
 #endif
-#endif
 };
 
 /* internal c_flags */
 #define	CFLGS_OFF_SLAB	0x010000UL	/* slab management in own cache */
-#define	CFLGS_OPTIMIZE	0x020000UL	/* optimized slab lookup */
-
-/* c_dflags (dynamic flags). Need to hold the spinlock to access this member */
-#define	DFLGS_GROWN	0x000001UL	/* don't reap a recently grown */
 
 #define	OFF_SLAB(x)	((x)->flags & CFLGS_OFF_SLAB)
-#define	OPTIMIZE(x)	((x)->flags & CFLGS_OPTIMIZE)
-#define	GROWN(x)	((x)->dlags & DFLGS_GROWN)
+
+#define BATCHREFILL_LIMIT	16
+/* Optimization question: fewer reaps means less 
+ * probability for unnessary cpucache drain/refill cycles.
+ *
+ * OTHO the cpuarrays can contain lots of objects,
+ * which could lock up otherwise freeable slabs.
+ */
+#define REAPTIMEOUT_CPUC	(2*HZ)
+#define REAPTIMEOUT_LIST3	(4*HZ)
 
 #if STATS
 #define	STATS_INC_ACTIVE(x)	((x)->num_active++)
@@ -268,6 +305,15 @@
 					(x)->high_mark = (x)->num_active; \
 				} while (0)
 #define	STATS_INC_ERR(x)	((x)->errors++)
+#define	STATS_SET_FREEABLE(x, i) \
+				do { if ((x)->max_freeable < i) \
+					(x)->max_freeable = i; \
+				} while (0)
+
+#define STATS_INC_ALLOCHIT(x)	atomic_inc(&(x)->allochit)
+#define STATS_INC_ALLOCMISS(x)	atomic_inc(&(x)->allocmiss)
+#define STATS_INC_FREEHIT(x)	atomic_inc(&(x)->freehit)
+#define STATS_INC_FREEMISS(x)	atomic_inc(&(x)->freemiss)
 #else
 #define	STATS_INC_ACTIVE(x)	do { } while (0)
 #define	STATS_DEC_ACTIVE(x)	do { } while (0)
@@ -276,14 +322,9 @@
 #define	STATS_INC_REAPED(x)	do { } while (0)
 #define	STATS_SET_HIGH(x)	do { } while (0)
 #define	STATS_INC_ERR(x)	do { } while (0)
-#endif
+#define	STATS_SET_FREEABLE(x, i) \
+				do { } while (0)
 
-#if STATS && defined(CONFIG_SMP)
-#define STATS_INC_ALLOCHIT(x)	atomic_inc(&(x)->allochit)
-#define STATS_INC_ALLOCMISS(x)	atomic_inc(&(x)->allocmiss)
-#define STATS_INC_FREEHIT(x)	atomic_inc(&(x)->freehit)
-#define STATS_INC_FREEMISS(x)	atomic_inc(&(x)->freemiss)
-#else
 #define STATS_INC_ALLOCHIT(x)	do { } while (0)
 #define STATS_INC_ALLOCMISS(x)	do { } while (0)
 #define STATS_INC_FREEHIT(x)	do { } while (0)
@@ -326,24 +367,28 @@
 #define	SET_PAGE_CACHE(pg,x)  ((pg)->list.next = (struct list_head *)(x))
 #define	GET_PAGE_CACHE(pg)    ((kmem_cache_t *)(pg)->list.next)
 #define	SET_PAGE_SLAB(pg,x)   ((pg)->list.prev = (struct list_head *)(x))
-#define	GET_PAGE_SLAB(pg)     ((slab_t *)(pg)->list.prev)
+#define	GET_PAGE_SLAB(pg)     ((struct slab *)(pg)->list.prev)
 
 /* Size description struct for general caches. */
-typedef struct cache_sizes {
+struct cache_sizes {
 	size_t		 cs_size;
 	kmem_cache_t	*cs_cachep;
 	kmem_cache_t	*cs_dmacachep;
-} cache_sizes_t;
+};
 
 /* These are the default caches for kmalloc. Custom caches can have other sizes. */
-static cache_sizes_t cache_sizes[] = {
+static struct cache_sizes malloc_sizes[] = {
 #if PAGE_SIZE == 4096
 	{    32,	NULL, NULL},
 #endif
 	{    64,	NULL, NULL},
+#if L1_CACHE_BYTES < 64
 	{    96,	NULL, NULL},
+#endif
 	{   128,	NULL, NULL},
+#if L1_CACHE_BYTES < 128
 	{   192,	NULL, NULL},
+#endif
 	{   256,	NULL, NULL},
 	{   512,	NULL, NULL},
 	{  1024,	NULL, NULL},
@@ -357,7 +402,7 @@
 	{     0,	NULL, NULL}
 };
 /* Must match cache_sizes above. Out of line to keep cache footprint low. */
-#define CN(x) { x, x " (DMA)" }
+#define CN(x) { x, x "(DMA)" }
 static struct { 
 	char *name; 
 	char *name_dma;
@@ -366,9 +411,13 @@
 	CN("size-32"),
 #endif
 	CN("size-64"),
+#if L1_CACHE_BYTES < 64
 	CN("size-96"),
+#endif
 	CN("size-128"),
+#if L1_CACHE_BYTES < 128
 	CN("size-192"),
+#endif
 	CN("size-256"),
 	CN("size-512"),
 	CN("size-1024"),
@@ -382,11 +431,15 @@
 }; 
 #undef CN
 
+struct arraycache_init initarray_cache __initdata = { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} };
+struct arraycache_init initarray_generic __initdata = { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} };
+
 /* internal cache of cache description objs */
 static kmem_cache_t cache_cache = {
-	.slabs_full	= LIST_HEAD_INIT(cache_cache.slabs_full),
-	.slabs_partial	= LIST_HEAD_INIT(cache_cache.slabs_partial),
-	.slabs_free	= LIST_HEAD_INIT(cache_cache.slabs_free),
+	.lists		= LIST3_INIT(cache_cache.lists),
+	.array		= { [0] = &initarray_cache.cache },
+	.batchcount	= 1,
+	.limit		= BOOT_CPUCACHE_ENTRIES,
 	.objsize	= sizeof(kmem_cache_t),
 	.flags		= SLAB_NO_REAP,
 	.spinlock	= SPIN_LOCK_UNLOCKED,
@@ -397,24 +450,26 @@
 /* Guard access to the cache-chain. */
 static struct semaphore	cache_chain_sem;
 
-/* Place maintainer for reaping. */
-static kmem_cache_t *clock_searchp = &cache_cache;
-
-#define cache_chain (cache_cache.next)
+struct list_head cache_chain;
 
-#ifdef CONFIG_SMP
 /*
  * chicken and egg problem: delay the per-cpu array allocation
  * until the general caches are up.
  */
-static int g_cpucache_up;
+enum {
+	NONE,
+	PARTIAL,
+	FULL
+} g_cpucache_up;
+
+static struct timer_list reap_timers[NR_CPUS];
+
+static void reap_timer_fnc(unsigned long data);
 
 static void enable_cpucache (kmem_cache_t *cachep);
-static void enable_all_cpucaches (void);
-#endif
 
 /* Cal the num objs, wastage, and bytes left over for a given slab size. */
-static void kmem_cache_estimate (unsigned long gfporder, size_t size,
+static void cache_estimate (unsigned long gfporder, size_t size,
 		 int flags, size_t *left_over, unsigned int *num)
 {
 	int i;
@@ -423,7 +478,7 @@
 	size_t base = 0;
 
 	if (!(flags & CFLGS_OFF_SLAB)) {
-		base = sizeof(slab_t);
+		base = sizeof(struct slab);
 		extra = sizeof(kmem_bufctl_t);
 	}
 	i = 0;
@@ -441,6 +496,99 @@
 	*left_over = wastage;
 }
 
+/*
+ * Start the reap timer running on the target CPU.  We run at around 1 to 2Hz.
+ * Add the CPU number into the expiry time to minimize the possibility of the
+ * CPUs getting into lockstep and contending for the global cache chain lock.
+ */
+static void start_cpu_timer(int cpu)
+{
+	struct timer_list *rt = &reap_timers[cpu];
+
+	if (rt->function == NULL) {
+		printk(KERN_INFO "slab: reap timer started for cpu %d\n", cpu);
+		init_timer(rt);
+		rt->expires = jiffies + HZ + 3*cpu;
+		rt->function = reap_timer_fnc;
+		add_timer_on(rt, cpu);
+	}
+}
+
+/*
+ * Note: if someone calls kmem_cache_alloc() on the new
+ * cpu before the cpuup callback had a chance to allocate
+ * the head arrays, it will oops.
+ * Is CPU_ONLINE early enough?
+ */
+static int __devinit cpuup_callback(struct notifier_block *nfb,
+				  unsigned long action,
+				  void *hcpu)
+{
+	long cpu = (long)hcpu;
+	struct list_head *p;
+
+	switch (action) {
+	case CPU_UP_PREPARE:
+		down(&cache_chain_sem);
+		list_for_each(p, &cache_chain) {
+			int memsize;
+			struct array_cache *nc;
+
+			kmem_cache_t* cachep = list_entry(p, kmem_cache_t, next);
+			memsize = sizeof(void*)*cachep->limit+sizeof(struct array_cache);
+			nc = kmalloc(memsize, GFP_KERNEL);
+			if (!nc)
+				goto bad;
+			nc->avail = 0;
+			nc->limit = cachep->limit;
+			nc->batchcount = cachep->batchcount;
+			nc->touched = 0;
+
+			spin_lock_irq(&cachep->spinlock);
+			cachep->array[cpu] = nc;
+			cachep->free_limit = (1+num_online_cpus())*cachep->batchcount
+						+ cachep->num;
+			spin_unlock_irq(&cachep->spinlock);
+
+		}
+		up(&cache_chain_sem);
+		break;
+	case CPU_ONLINE:
+		if (g_cpucache_up == FULL)
+			start_cpu_timer(cpu);
+		break;
+	case CPU_UP_CANCELED:
+		down(&cache_chain_sem);
+
+		list_for_each(p, &cache_chain) {
+			struct array_cache *nc;
+			kmem_cache_t* cachep = list_entry(p, kmem_cache_t, next);
+
+			nc = cachep->array[cpu];
+			cachep->array[cpu] = NULL;
+			kfree(nc);
+		}
+		up(&cache_chain_sem);
+		break;
+	}
+	return NOTIFY_OK;
+bad:
+	up(&cache_chain_sem);
+	return NOTIFY_BAD;
+}
+
+static struct notifier_block cpucache_notifier = { &cpuup_callback, NULL, 0 };
+
+static inline void ** ac_entry(struct array_cache *ac)
+{
+	return (void**)(ac+1);
+}
+
+static inline struct array_cache *ac_data(kmem_cache_t *cachep)
+{
+	return cachep->array[smp_processor_id()];
+}
+
 /* Initialisation - setup the `cache' cache. */
 void __init kmem_cache_init(void)
 {
@@ -448,14 +596,20 @@
 
 	init_MUTEX(&cache_chain_sem);
 	INIT_LIST_HEAD(&cache_chain);
+	list_add(&cache_cache.next, &cache_chain);
 
-	kmem_cache_estimate(0, cache_cache.objsize, 0,
+	cache_estimate(0, cache_cache.objsize, 0,
 			&left_over, &cache_cache.num);
 	if (!cache_cache.num)
 		BUG();
 
 	cache_cache.colour = left_over/cache_cache.colour_off;
 	cache_cache.colour_next = 0;
+
+	/* Register a cpu startup notifier callback
+	 * that initializes ac_data for all new cpus
+	 */
+	register_cpu_notifier(&cpucache_notifier);
 }
 
 
@@ -464,7 +618,7 @@
  */
 void __init kmem_cache_sizes_init(void)
 {
-	cache_sizes_t *sizes = cache_sizes;
+	struct cache_sizes *sizes = malloc_sizes;
 	/*
 	 * Fragmentation resistance on low memory - only use bigger
 	 * page orders on machines with more than 32MB of memory.
@@ -478,7 +632,7 @@
 		 * Note for systems short on memory removing the alignment will
 		 * allow tighter packing of the smaller caches. */
 		if (!(sizes->cs_cachep =
-			kmem_cache_create(cache_names[sizes-cache_sizes].name, 
+			kmem_cache_create(cache_names[sizes-malloc_sizes].name, 
 					  sizes->cs_size,
 					0, SLAB_HWCACHE_ALIGN, NULL, NULL))) {
 			BUG();
@@ -486,29 +640,67 @@
 
 		/* Inc off-slab bufctl limit until the ceiling is hit. */
 		if (!(OFF_SLAB(sizes->cs_cachep))) {
-			offslab_limit = sizes->cs_size-sizeof(slab_t);
+			offslab_limit = sizes->cs_size-sizeof(struct slab);
 			offslab_limit /= sizeof(kmem_bufctl_t);
 		}
 		sizes->cs_dmacachep = kmem_cache_create(
-		    cache_names[sizes-cache_sizes].name_dma, 
+		    cache_names[sizes-malloc_sizes].name_dma, 
 			sizes->cs_size, 0,
 			SLAB_CACHE_DMA|SLAB_HWCACHE_ALIGN, NULL, NULL);
 		if (!sizes->cs_dmacachep)
 			BUG();
 		sizes++;
 	} while (sizes->cs_size);
+	/*
+	 * The generic caches are running - time to kick out the
+	 * bootstrap cpucaches.
+	 */
+	{
+		void * ptr;
+		
+		ptr = kmalloc(sizeof(struct arraycache_init), GFP_KERNEL);
+		local_irq_disable();
+		BUG_ON(ac_data(&cache_cache) != &initarray_cache.cache);
+		memcpy(ptr, ac_data(&cache_cache), sizeof(struct arraycache_init));
+		cache_cache.array[smp_processor_id()] = ptr;
+		local_irq_enable();
+	
+		ptr = kmalloc(sizeof(struct arraycache_init), GFP_KERNEL);
+		local_irq_disable();
+		BUG_ON(ac_data(malloc_sizes[0].cs_cachep) != &initarray_generic.cache);
+		memcpy(ptr, ac_data(malloc_sizes[0].cs_cachep),
+				sizeof(struct arraycache_init));
+		malloc_sizes[0].cs_cachep->array[smp_processor_id()] = ptr;
+		local_irq_enable();
+	}
 }
 
-int __init kmem_cpucache_init(void)
+int __init cpucache_init(void)
 {
-#ifdef CONFIG_SMP
-	g_cpucache_up = 1;
-	enable_all_cpucaches();
-#endif
+	kmem_cache_t *cachep;
+	int cpu;
+
+	down(&cache_chain_sem);
+	g_cpucache_up = FULL;
+
+	list_for_each_entry(cachep, &cache_chain, next)
+		enable_cpucache(cachep);
+	
+	/* 
+	 * Register the timers that return unneeded
+	 * pages to gfp.
+	 */
+
+	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+		if (cpu_online(cpu))
+			start_cpu_timer(cpu);
+	}
+	up(&cache_chain_sem);
+
 	return 0;
 }
 
-__initcall(kmem_cpucache_init);
+__initcall(cpucache_init);
 
 /* Interface to system's page allocator. No need to hold the cache-lock.
  */
@@ -552,7 +744,7 @@
 }
 
 #if DEBUG
-static inline void kmem_poison_obj (kmem_cache_t *cachep, void *addr)
+static void poison_obj (kmem_cache_t *cachep, void *addr)
 {
 	int size = cachep->objsize;
 	if (cachep->flags & SLAB_RED_ZONE) {
@@ -563,7 +755,7 @@
 	*(unsigned char *)(addr+size-1) = POISON_END;
 }
 
-static inline int kmem_check_poison_obj (kmem_cache_t *cachep, void *addr)
+static int check_poison_obj (kmem_cache_t *cachep, void *addr)
 {
 	int size = cachep->objsize;
 	void *end;
@@ -582,39 +774,36 @@
  * Before calling the slab must have been unlinked from the cache.
  * The cache-lock is not held/needed.
  */
-static void kmem_slab_destroy (kmem_cache_t *cachep, slab_t *slabp)
+static void slab_destroy (kmem_cache_t *cachep, struct slab *slabp)
 {
-	if (cachep->dtor
 #if DEBUG
-		|| cachep->flags & (SLAB_POISON | SLAB_RED_ZONE)
-#endif
-	) {
+	int i;
+	for (i = 0; i < cachep->num; i++) {
+		void* objp = slabp->s_mem+cachep->objsize*i;
+		if (cachep->flags & SLAB_POISON)
+			check_poison_obj(cachep, objp);
+
+		if (cachep->flags & SLAB_RED_ZONE) {
+			if (*((unsigned long*)(objp)) != RED_MAGIC1)
+				BUG();
+			if (*((unsigned long*)(objp + cachep->objsize -
+					BYTES_PER_WORD)) != RED_MAGIC1)
+				BUG();
+			objp += BYTES_PER_WORD;
+		}
+		if (cachep->dtor && !(cachep->flags & SLAB_POISON))
+			(cachep->dtor)(objp, cachep, 0);
+	}
+#else
+	if (cachep->dtor) {
 		int i;
 		for (i = 0; i < cachep->num; i++) {
 			void* objp = slabp->s_mem+cachep->objsize*i;
-#if DEBUG
-			if (cachep->flags & SLAB_RED_ZONE) {
-				if (*((unsigned long*)(objp)) != RED_MAGIC1)
-					BUG();
-				if (*((unsigned long*)(objp + cachep->objsize
-						-BYTES_PER_WORD)) != RED_MAGIC1)
-					BUG();
-				objp += BYTES_PER_WORD;
-			}
-#endif
-			if (cachep->dtor)
-				(cachep->dtor)(objp, cachep, 0);
-#if DEBUG
-			if (cachep->flags & SLAB_RED_ZONE) {
-				objp -= BYTES_PER_WORD;
-			}	
-			if ((cachep->flags & SLAB_POISON)  &&
-				kmem_check_poison_obj(cachep, objp))
-				BUG();
-#endif
+			(cachep->dtor)(objp, cachep, 0);
 		}
 	}
-
+#endif
+	
 	kmem_freepages(cachep, slabp->s_mem-slabp->colouroff);
 	if (OFF_SLAB(cachep))
 		kmem_cache_free(cachep->slabp_cache, slabp);
@@ -680,11 +869,6 @@
 		flags &= ~SLAB_DEBUG_INITIAL;
 	}
 
-	if ((flags & SLAB_POISON) && ctor) {
-		/* request for poisoning, but we can't do that with a constructor */
-		printk("%sPoisoning requested, but con given - %s\n", func_nm, name);
-		flags &= ~SLAB_POISON;
-	}
 #if FORCED_DEBUG
 	if ((size < (PAGE_SIZE>>3)) && !(flags & SLAB_MUST_HWCACHE_ALIGN))
 		/*
@@ -692,8 +876,7 @@
 		 * fragmentation.
 		 */
 		flags |= SLAB_RED_ZONE;
-	if (!ctor)
-		flags |= SLAB_POISON;
+	flags |= SLAB_POISON;
 #endif
 #endif
 
@@ -745,7 +928,6 @@
 	if (flags & SLAB_HWCACHE_ALIGN) {
 		/* Need to adjust size so that objs are cache aligned. */
 		/* Small obj size, can get at least two per cache line. */
-		/* FIXME: only power of 2 supported, was better */
 		while (size < align/2)
 			align /= 2;
 		size = (size+align-1)&(~(align-1));
@@ -759,7 +941,7 @@
 	do {
 		unsigned int break_flag = 0;
 cal_wastage:
-		kmem_cache_estimate(cachep->gfporder, size, flags,
+		cache_estimate(cachep->gfporder, size, flags,
 						&left_over, &cachep->num);
 		if (break_flag)
 			break;
@@ -793,7 +975,7 @@
 		cachep = NULL;
 		goto opps;
 	}
-	slab_size = L1_CACHE_ALIGN(cachep->num*sizeof(kmem_bufctl_t)+sizeof(slab_t));
+	slab_size = L1_CACHE_ALIGN(cachep->num*sizeof(kmem_bufctl_t)+sizeof(struct slab));
 
 	/*
 	 * If the slab has been placed off-slab, and we have enough space then
@@ -812,19 +994,16 @@
 	cachep->colour_off = offset;
 	cachep->colour = left_over/offset;
 
-	/* init remaining fields */
-	if (!cachep->gfporder && !(flags & CFLGS_OFF_SLAB))
-		flags |= CFLGS_OPTIMIZE;
-
 	cachep->flags = flags;
 	cachep->gfpflags = 0;
 	if (flags & SLAB_CACHE_DMA)
 		cachep->gfpflags |= GFP_DMA;
 	spin_lock_init(&cachep->spinlock);
 	cachep->objsize = size;
-	INIT_LIST_HEAD(&cachep->slabs_full);
-	INIT_LIST_HEAD(&cachep->slabs_partial);
-	INIT_LIST_HEAD(&cachep->slabs_free);
+	/* NUMA */
+	INIT_LIST_HEAD(&cachep->lists.slabs_full);
+	INIT_LIST_HEAD(&cachep->lists.slabs_partial);
+	INIT_LIST_HEAD(&cachep->lists.slabs_free);
 
 	if (flags & CFLGS_OFF_SLAB)
 		cachep->slabp_cache = kmem_find_general_cachep(slab_size,0);
@@ -832,10 +1011,33 @@
 	cachep->dtor = dtor;
 	cachep->name = name;
 
-#ifdef CONFIG_SMP
-	if (g_cpucache_up)
+	if (g_cpucache_up == FULL) {
 		enable_cpucache(cachep);
-#endif
+	} else {
+		if (g_cpucache_up == NONE) {
+			/* Note: the first kmem_cache_create must create
+			 * the cache that's used by kmalloc(24), otherwise
+			 * the creation of further caches will BUG().
+			 */
+			cachep->array[smp_processor_id()] = &initarray_generic.cache;
+			g_cpucache_up = PARTIAL;
+		} else {
+			cachep->array[smp_processor_id()] = kmalloc(sizeof(struct arraycache_init),GFP_KERNEL);
+		}
+		BUG_ON(!ac_data(cachep));
+		ac_data(cachep)->avail = 0;
+		ac_data(cachep)->limit = BOOT_CPUCACHE_ENTRIES;
+		ac_data(cachep)->batchcount = 1;
+		ac_data(cachep)->touched = 0;
+		cachep->batchcount = 1;
+		cachep->limit = BOOT_CPUCACHE_ENTRIES;
+		cachep->free_limit = (1+num_online_cpus())*cachep->batchcount
+					+ cachep->num;
+	} 
+
+	cachep->lists.next_reap = jiffies + REAPTIMEOUT_LIST3 +
+					((unsigned long)cachep)%REAPTIMEOUT_LIST3;
+
 	/* Need the semaphore to access the chain. */
 	down(&cache_chain_sem);
 	{
@@ -864,48 +1066,41 @@
 		set_fs(old_fs);
 	}
 
-	/* There is no reason to lock our new cache before we
-	 * link it in - no one knows about it yet...
-	 */
+	/* cache setup completed, link it into the list */
 	list_add(&cachep->next, &cache_chain);
 	up(&cache_chain_sem);
 opps:
 	return cachep;
 }
 
-
-#if DEBUG
-/*
- * This check if the kmem_cache_t pointer is chained in the cache_cache
- * list. -arca
- */
-static int is_chained_kmem_cache(kmem_cache_t * cachep)
+static inline void check_irq_off(void)
 {
-	struct list_head *p;
-	int ret = 0;
-
-	/* Find the cache in the chain of caches. */
-	down(&cache_chain_sem);
-	list_for_each(p, &cache_chain) {
-		if (p == &cachep->next) {
-			ret = 1;
-			break;
-		}
-	}
-	up(&cache_chain_sem);
-
-	return ret;
+#if DEBUG
+	BUG_ON(!irqs_disabled());
+#endif
 }
-#else
-#define is_chained_kmem_cache(x) 1
+
+static inline void check_irq_on(void)
+{
+#if DEBUG
+	BUG_ON(irqs_disabled());
 #endif
+}
 
+static inline void check_spinlock_acquired(kmem_cache_t *cachep)
+{
 #ifdef CONFIG_SMP
+	check_irq_off();
+	BUG_ON(spin_trylock(&cachep->spinlock));
+#endif
+}
+
 /*
  * Waits for all CPUs to execute func().
  */
 static void smp_call_function_all_cpus(void (*func) (void *arg), void *arg)
 {
+	check_irq_on();
 	local_irq_disable();
 	func(arg);
 	local_irq_enable();
@@ -913,81 +1108,58 @@
 	if (smp_call_function(func, arg, 1, 1))
 		BUG();
 }
-typedef struct ccupdate_struct_s
-{
-	kmem_cache_t *cachep;
-	cpucache_t *new[NR_CPUS];
-} ccupdate_struct_t;
-
-static void do_ccupdate_local(void *info)
-{
-	ccupdate_struct_t *new = (ccupdate_struct_t *)info;
-	cpucache_t *old = cc_data(new->cachep);
-	
-	cc_data(new->cachep) = new->new[smp_processor_id()];
-	new->new[smp_processor_id()] = old;
-}
 
 static void free_block (kmem_cache_t* cachep, void** objpp, int len);
 
-static void drain_cpu_caches(kmem_cache_t *cachep)
+static void do_drain(void *arg)
 {
-	ccupdate_struct_t new;
-	int i;
-
-	memset(&new.new,0,sizeof(new.new));
-
-	new.cachep = cachep;
+	kmem_cache_t *cachep = (kmem_cache_t*)arg;
+	struct array_cache *ac;
 
-	down(&cache_chain_sem);
-	smp_call_function_all_cpus(do_ccupdate_local, (void *)&new);
+	check_irq_off();
+	ac = ac_data(cachep);
+	free_block(cachep, &ac_entry(ac)[0], ac->avail);
+	ac->avail = 0;
+}
 
-	for (i = 0; i < NR_CPUS; i++) {
-		cpucache_t* ccold = new.new[i];
-		if (!ccold || (ccold->avail == 0))
-			continue;
-		local_irq_disable();
-		free_block(cachep, cc_entry(ccold), ccold->avail);
-		local_irq_enable();
-		ccold->avail = 0;
-	}
-	smp_call_function_all_cpus(do_ccupdate_local, (void *)&new);
-	up(&cache_chain_sem);
+static void drain_cpu_caches(kmem_cache_t *cachep)
+{
+	smp_call_function_all_cpus(do_drain, cachep);
 }
 
-#else
-#define drain_cpu_caches(cachep)	do { } while (0)
-#endif
 
-static int __kmem_cache_shrink(kmem_cache_t *cachep)
+/* NUMA shrink all list3s */
+static int __cache_shrink(kmem_cache_t *cachep)
 {
-	slab_t *slabp;
+	struct slab *slabp;
 	int ret;
 
 	drain_cpu_caches(cachep);
 
+	check_irq_on();
 	spin_lock_irq(&cachep->spinlock);
 
-	/* If the cache is growing, stop shrinking. */
-	while (!cachep->growing) {
+	for(;;) {
 		struct list_head *p;
 
-		p = cachep->slabs_free.prev;
-		if (p == &cachep->slabs_free)
+		p = cachep->lists.slabs_free.prev;
+		if (p == &cachep->lists.slabs_free)
 			break;
 
-		slabp = list_entry(cachep->slabs_free.prev, slab_t, list);
+		slabp = list_entry(cachep->lists.slabs_free.prev, struct slab, list);
 #if DEBUG
 		if (slabp->inuse)
 			BUG();
 #endif
 		list_del(&slabp->list);
 
+		cachep->lists.free_objects -= cachep->num;
 		spin_unlock_irq(&cachep->spinlock);
-		kmem_slab_destroy(cachep, slabp);
+		slab_destroy(cachep, slabp);
 		spin_lock_irq(&cachep->spinlock);
 	}
-	ret = !list_empty(&cachep->slabs_full) || !list_empty(&cachep->slabs_partial);
+	ret = !list_empty(&cachep->lists.slabs_full) ||
+		!list_empty(&cachep->lists.slabs_partial);
 	spin_unlock_irq(&cachep->spinlock);
 	return ret;
 }
@@ -1001,10 +1173,10 @@
  */
 int kmem_cache_shrink(kmem_cache_t *cachep)
 {
-	if (!cachep || in_interrupt() || !is_chained_kmem_cache(cachep))
+	if (!cachep || in_interrupt())
 		BUG();
 
-	return __kmem_cache_shrink(cachep);
+	return __cache_shrink(cachep);
 }
 
 /**
@@ -1024,19 +1196,18 @@
  */
 int kmem_cache_destroy (kmem_cache_t * cachep)
 {
-	if (!cachep || in_interrupt() || cachep->growing)
+	if (!cachep || in_interrupt())
 		BUG();
 
 	/* Find the cache in the chain of caches. */
 	down(&cache_chain_sem);
-	/* the chain is never empty, cache_cache is never destroyed */
-	if (clock_searchp == cachep)
-		clock_searchp = list_entry(cachep->next.next,
-						kmem_cache_t, next);
+	/*
+	 * the chain is never empty, cache_cache is never destroyed
+	 */
 	list_del(&cachep->next);
 	up(&cache_chain_sem);
 
-	if (__kmem_cache_shrink(cachep)) {
+	if (__cache_shrink(cachep)) {
 		printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n",
 		       cachep);
 		down(&cache_chain_sem);
@@ -1044,23 +1215,22 @@
 		up(&cache_chain_sem);
 		return 1;
 	}
-#ifdef CONFIG_SMP
 	{
 		int i;
 		for (i = 0; i < NR_CPUS; i++)
-			kfree(cachep->cpudata[i]);
+			kfree(cachep->array[i]);
+		/* NUMA: free the list3 structures */
 	}
-#endif
 	kmem_cache_free(&cache_cache, cachep);
 
 	return 0;
 }
 
 /* Get the memory for a slab management obj. */
-static inline slab_t * kmem_cache_slabmgmt (kmem_cache_t *cachep,
+static inline struct slab* alloc_slabmgmt (kmem_cache_t *cachep,
 			void *objp, int colour_off, int local_flags)
 {
-	slab_t *slabp;
+	struct slab *slabp;
 	
 	if (OFF_SLAB(cachep)) {
 		/* Slab management obj is off-slab. */
@@ -1068,13 +1238,9 @@
 		if (!slabp)
 			return NULL;
 	} else {
-		/* FIXME: change to
-			slabp = objp
-		 * if you enable OPTIMIZE
-		 */
 		slabp = objp+colour_off;
 		colour_off += L1_CACHE_ALIGN(cachep->num *
-				sizeof(kmem_bufctl_t) + sizeof(slab_t));
+				sizeof(kmem_bufctl_t) + sizeof(struct slab));
 	}
 	slabp->inuse = 0;
 	slabp->colouroff = colour_off;
@@ -1083,42 +1249,48 @@
 	return slabp;
 }
 
-static inline void kmem_cache_init_objs (kmem_cache_t * cachep,
-			slab_t * slabp, unsigned long ctor_flags)
+static inline kmem_bufctl_t *slab_bufctl(struct slab *slabp)
+{
+	return (kmem_bufctl_t *)(slabp+1);
+}
+
+static void cache_init_objs (kmem_cache_t * cachep,
+			struct slab * slabp, unsigned long ctor_flags)
 {
 	int i;
 
 	for (i = 0; i < cachep->num; i++) {
 		void* objp = slabp->s_mem+cachep->objsize*i;
 #if DEBUG
+		/* need to poison the objs? */
+		if (cachep->flags & SLAB_POISON)
+			poison_obj(cachep, objp);
+
 		if (cachep->flags & SLAB_RED_ZONE) {
 			*((unsigned long*)(objp)) = RED_MAGIC1;
 			*((unsigned long*)(objp + cachep->objsize -
 					BYTES_PER_WORD)) = RED_MAGIC1;
 			objp += BYTES_PER_WORD;
 		}
-#endif
-
 		/*
 		 * Constructors are not allowed to allocate memory from
 		 * the same cache which they are a constructor for.
 		 * Otherwise, deadlock. They must also be threaded.
 		 */
-		if (cachep->ctor)
+		if (cachep->ctor && !(cachep->flags & SLAB_POISON))
 			cachep->ctor(objp, cachep, ctor_flags);
-#if DEBUG
-		if (cachep->flags & SLAB_RED_ZONE)
-			objp -= BYTES_PER_WORD;
-		if (cachep->flags & SLAB_POISON)
-			/* need to poison the objs */
-			kmem_poison_obj(cachep, objp);
+
 		if (cachep->flags & SLAB_RED_ZONE) {
+			objp -= BYTES_PER_WORD;
 			if (*((unsigned long*)(objp)) != RED_MAGIC1)
 				BUG();
 			if (*((unsigned long*)(objp + cachep->objsize -
 					BYTES_PER_WORD)) != RED_MAGIC1)
 				BUG();
 		}
+#else
+		if (cachep->ctor)
+			cachep->ctor(objp, cachep, ctor_flags);
 #endif
 		slab_bufctl(slabp)[i] = i+1;
 	}
@@ -1126,19 +1298,32 @@
 	slabp->free = 0;
 }
 
+static void kmem_flagcheck(kmem_cache_t *cachep, int flags)
+{
+	if (flags & __GFP_WAIT)
+		might_sleep();
+
+	if (flags & SLAB_DMA) {
+		if (!(cachep->gfpflags & GFP_DMA))
+			BUG();
+	} else {
+		if (cachep->gfpflags & GFP_DMA)
+			BUG();
+	}
+}
+
 /*
  * Grow (by 1) the number of slabs within a cache.  This is called by
  * kmem_cache_alloc() when there are no active objs left in a cache.
  */
-static int kmem_cache_grow (kmem_cache_t * cachep, int flags)
+static int cache_grow (kmem_cache_t * cachep, int flags)
 {
-	slab_t	*slabp;
+	struct slab	*slabp;
 	struct page	*page;
 	void		*objp;
 	size_t		 offset;
 	unsigned int	 i, local_flags;
 	unsigned long	 ctor_flags;
-	unsigned long	 save_flags;
 
 	/* Be lazy and only check for valid flags here,
  	 * keeping it out of the critical path in kmem_cache_alloc().
@@ -1148,15 +1333,6 @@
 	if (flags & SLAB_NO_GROW)
 		return 0;
 
-	/*
-	 * The test for missing atomic flag is performed here, rather than
-	 * the more obvious place, simply to reduce the critical path length
-	 * in kmem_cache_alloc(). If a caller is seriously mis-behaving they
-	 * will eventually be caught here (where it matters).
-	 */
-	if (in_interrupt() && (flags & __GFP_WAIT))
-		BUG();
-
 	ctor_flags = SLAB_CTOR_CONSTRUCTOR;
 	local_flags = (flags & SLAB_LEVEL_MASK);
 	if (!(local_flags & __GFP_WAIT))
@@ -1167,7 +1343,8 @@
 		ctor_flags |= SLAB_CTOR_ATOMIC;
 
 	/* About to mess with non-constant members - lock. */
-	spin_lock_irqsave(&cachep->spinlock, save_flags);
+	check_irq_off();
+	spin_lock(&cachep->spinlock);
 
 	/* Get colour for the slab, and cal the next value. */
 	offset = cachep->colour_next;
@@ -1175,26 +1352,27 @@
 	if (cachep->colour_next >= cachep->colour)
 		cachep->colour_next = 0;
 	offset *= cachep->colour_off;
-	cachep->dflags |= DFLGS_GROWN;
 
-	cachep->growing++;
-	spin_unlock_irqrestore(&cachep->spinlock, save_flags);
+	spin_unlock(&cachep->spinlock);
+
+	if (local_flags & __GFP_WAIT)
+		local_irq_enable();
 
-	/* A series of memory allocations for a new slab.
-	 * Neither the cache-chain semaphore, or cache-lock, are
-	 * held, but the incrementing c_growing prevents this
-	 * cache from being reaped or shrunk.
-	 * Note: The cache could be selected in for reaping in
-	 * kmem_cache_reap(), but when the final test is made the
-	 * growing value will be seen.
+	/*
+	 * The test for missing atomic flag is performed here, rather than
+	 * the more obvious place, simply to reduce the critical path length
+	 * in kmem_cache_alloc(). If a caller is seriously mis-behaving they
+	 * will eventually be caught here (where it matters).
 	 */
+	kmem_flagcheck(cachep, flags);
+
 
 	/* Get mem for the objs. */
 	if (!(objp = kmem_getpages(cachep, flags)))
 		goto failed;
 
 	/* Get slab management. */
-	if (!(slabp = kmem_cache_slabmgmt(cachep, objp, offset, local_flags)))
+	if (!(slabp = alloc_slabmgmt(cachep, objp, offset, local_flags)))
 		goto opps1;
 
 	/* Nasty!!!!!! I hope this is OK. */
@@ -1208,71 +1386,129 @@
 		page++;
 	} while (--i);
 
-	kmem_cache_init_objs(cachep, slabp, ctor_flags);
+	cache_init_objs(cachep, slabp, ctor_flags);
 
-	spin_lock_irqsave(&cachep->spinlock, save_flags);
-	cachep->growing--;
+	if (local_flags & __GFP_WAIT)
+		local_irq_disable();
+	check_irq_off();
+	spin_lock(&cachep->spinlock);
 
 	/* Make slab active. */
-	list_add_tail(&slabp->list, &cachep->slabs_free);
+	list_add_tail(&slabp->list, &(list3_data(cachep)->slabs_free));
 	STATS_INC_GROWN(cachep);
-	cachep->failures = 0;
-
-	spin_unlock_irqrestore(&cachep->spinlock, save_flags);
+	list3_data(cachep)->free_objects += cachep->num;
+	spin_unlock(&cachep->spinlock);
 	return 1;
 opps1:
 	kmem_freepages(cachep, objp);
 failed:
-	spin_lock_irqsave(&cachep->spinlock, save_flags);
-	cachep->growing--;
-	spin_unlock_irqrestore(&cachep->spinlock, save_flags);
 	return 0;
 }
 
 /*
  * Perform extra freeing checks:
- * - detect double free
  * - detect bad pointers.
- * Called with the cache-lock held.
+ * - POISON/RED_ZONE checking
+ * - destructor calls, for caches with POISON+dtor
  */
-
-#if DEBUG
-static int kmem_extra_free_checks (kmem_cache_t * cachep,
-			slab_t *slabp, void * objp)
+static inline void kfree_debugcheck(const void *objp)
 {
-	int i;
-	unsigned int objnr = (objp-slabp->s_mem)/cachep->objsize;
+#if DEBUG
+	struct page *page;
 
-	if (objnr >= cachep->num)
-		BUG();
-	if (objp != slabp->s_mem + objnr*cachep->objsize)
+	if (!virt_addr_valid(objp)) {
+		printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n",
+			(unsigned long)objp);	
+		BUG();	
+	}
+	page = virt_to_page(objp);
+	if (!PageSlab(page)) {
+		printk(KERN_ERR "kfree_debugcheck: bad ptr %lxh.\n", (unsigned long)objp);
 		BUG();
-
-	/* Check slab's freelist to see if this obj is there. */
-	for (i = slabp->free; i != BUFCTL_END; i = slab_bufctl(slabp)[i]) {
-		if (i == objnr)
-			BUG();
 	}
-	return 0;
+#endif 
 }
-#endif
 
-static inline void kmem_cache_alloc_head(kmem_cache_t *cachep, int flags)
+static inline void *cache_free_debugcheck (kmem_cache_t * cachep, void * objp)
 {
-	if (flags & SLAB_DMA) {
-		if (!(cachep->gfpflags & GFP_DMA))
+#if DEBUG
+	struct page *page;
+	unsigned int objnr;
+	struct slab *slabp;
+
+	kfree_debugcheck(objp);
+	page = virt_to_page(objp);
+
+	BUG_ON(GET_PAGE_CACHE(page) != cachep);
+	slabp = GET_PAGE_SLAB(page);
+
+	if (cachep->flags & SLAB_RED_ZONE) {
+		objp -= BYTES_PER_WORD;
+		if (xchg((unsigned long *)objp, RED_MAGIC1) != RED_MAGIC2)
+			/* Either write before start, or a double free. */
 			BUG();
-	} else {
-		if (cachep->gfpflags & GFP_DMA)
+		if (xchg((unsigned long *)(objp+cachep->objsize -
+				BYTES_PER_WORD), RED_MAGIC1) != RED_MAGIC2)
+			/* Either write past end, or a double free. */
 			BUG();
 	}
+
+	objnr = (objp-slabp->s_mem)/cachep->objsize;
+
+	BUG_ON(objnr >= cachep->num);
+	BUG_ON(objp != slabp->s_mem + objnr*cachep->objsize);
+
+	if (cachep->flags & SLAB_DEBUG_INITIAL) {
+		/* Need to call the slab's constructor so the
+		 * caller can perform a verify of its state (debugging).
+		 * Called without the cache-lock held.
+		 */
+		if (cachep->flags & SLAB_RED_ZONE) {
+			cachep->ctor(objp+BYTES_PER_WORD,
+					cachep, SLAB_CTOR_CONSTRUCTOR|SLAB_CTOR_VERIFY);
+		} else {
+			cachep->ctor(objp, cachep, SLAB_CTOR_CONSTRUCTOR|SLAB_CTOR_VERIFY);
+		}
+	}
+	if (cachep->flags & SLAB_POISON && cachep->dtor) {
+		/* we want to cache poison the object,
+		 * call the destruction callback
+		 */
+		if (cachep->flags & SLAB_RED_ZONE)
+			cachep->dtor(objp+BYTES_PER_WORD, cachep, 0);
+		else
+			cachep->dtor(objp, cachep, 0);
+	}
+	if (cachep->flags & SLAB_POISON) {
+		poison_obj(cachep, objp);
+	}
+#endif
+	return objp;
+}
+
+static inline void check_slabp(kmem_cache_t *cachep, struct slab *slabp)
+{
+#if DEBUG
+	int i;
+	int entries = 0;
+	
+	check_spinlock_acquired(cachep);
+	/* Check slab's freelist to see if this obj is there. */
+	for (i = slabp->free; i != BUFCTL_END; i = slab_bufctl(slabp)[i]) {
+		entries++;
+		BUG_ON(entries > cachep->num);
+	}
+	BUG_ON(entries != cachep->num - slabp->inuse);
+#endif
 }
 
-static inline void * kmem_cache_alloc_one_tail (kmem_cache_t *cachep,
-						slab_t *slabp)
+static inline void * cache_alloc_one_tail (kmem_cache_t *cachep,
+						struct slab *slabp)
 {
 	void *objp;
 
+	check_spinlock_acquired(cachep);
+
 	STATS_INC_ALLOCED(cachep);
 	STATS_INC_ACTIVE(cachep);
 	STATS_SET_HIGH(cachep);
@@ -1282,13 +1518,95 @@
 	objp = slabp->s_mem + slabp->free*cachep->objsize;
 	slabp->free=slab_bufctl(slabp)[slabp->free];
 
-	if (unlikely(slabp->free == BUFCTL_END)) {
-		list_del(&slabp->list);
-		list_add(&slabp->list, &cachep->slabs_full);
+	return objp;
+}
+
+static inline void cache_alloc_listfixup(struct kmem_list3 *l3, struct slab *slabp)
+{
+	list_del(&slabp->list);
+	if (slabp->free == BUFCTL_END) {
+		list_add(&slabp->list, &l3->slabs_full);
+	} else {
+		list_add(&slabp->list, &l3->slabs_partial);
+	}
+}
+
+static void* cache_alloc_refill(kmem_cache_t* cachep, int flags)
+{
+	int batchcount;
+	struct kmem_list3 *l3;
+	struct array_cache *ac;
+
+	check_irq_off();
+	ac = ac_data(cachep);
+retry:
+	batchcount = ac->batchcount;
+	if (!ac->touched && batchcount > BATCHREFILL_LIMIT) {
+		/* if there was little recent activity on this
+		 * cache, then perform only a partial refill.
+		 * Otherwise we could generate refill bouncing.
+		 */
+		batchcount = BATCHREFILL_LIMIT;
+	}
+	l3 = list3_data(cachep);
+
+	BUG_ON(ac->avail > 0);
+	spin_lock(&cachep->spinlock);
+	while (batchcount > 0) {
+		struct list_head *entry;
+		struct slab *slabp;
+		/* Get slab alloc is to come from. */
+		entry = l3->slabs_partial.next;
+		if (entry == &l3->slabs_partial) {
+			l3->free_touched = 1;
+			entry = l3->slabs_free.next;
+			if (entry == &l3->slabs_free)
+				goto must_grow;
+		}
+
+		slabp = list_entry(entry, struct slab, list);
+		check_slabp(cachep, slabp);
+		while (slabp->inuse < cachep->num && batchcount--)
+			ac_entry(ac)[ac->avail++] =
+				cache_alloc_one_tail(cachep, slabp);
+		check_slabp(cachep, slabp);
+		cache_alloc_listfixup(l3, slabp);
+	}
+
+must_grow:
+	l3->free_objects -= ac->avail;
+	spin_unlock(&cachep->spinlock);
+
+	if (unlikely(!ac->avail)) {
+		int x;
+		x = cache_grow(cachep, flags);
+		
+		// cache_grow can reenable interrupts, then ac could change.
+		ac = ac_data(cachep);
+		if (!x && ac->avail == 0)	// no objects in sight? abort
+			return NULL;
+
+		if (!ac->avail)		// objects refilled by interrupt?
+			goto retry;
 	}
+	ac->touched = 1;
+	return ac_entry(ac)[--ac->avail];
+}
+
+static inline void cache_alloc_debugcheck_before(kmem_cache_t *cachep, int flags)
+{
+#if DEBUG
+	kmem_flagcheck(cachep, flags);
+#endif
+}
+
+static inline void *cache_alloc_debugcheck_after (kmem_cache_t *cachep, unsigned long flags, void *objp)
+{
 #if DEBUG
+	if (!objp)	
+		return objp;
 	if (cachep->flags & SLAB_POISON)
-		if (kmem_check_poison_obj(cachep, objp))
+		if (check_poison_obj(cachep, objp))
 			BUG();
 	if (cachep->flags & SLAB_RED_ZONE) {
 		/* Set alloc red-zone, and check old one. */
@@ -1300,263 +1618,156 @@
 			BUG();
 		objp += BYTES_PER_WORD;
 	}
+	if (cachep->ctor && cachep->flags & SLAB_POISON) {
+		unsigned long	ctor_flags = SLAB_CTOR_CONSTRUCTOR;
+
+		if (!flags & __GFP_WAIT)
+			ctor_flags |= SLAB_CTOR_ATOMIC;
+
+		cachep->ctor(objp, cachep, ctor_flags);
+	}	
 #endif
 	return objp;
 }
 
-/*
- * Returns a ptr to an obj in the given cache.
- * caller must guarantee synchronization
- * #define for the goto optimization 8-)
- */
-#define kmem_cache_alloc_one(cachep)				\
-({								\
-	struct list_head * slabs_partial, * entry;		\
-	slab_t *slabp;						\
-								\
-	slabs_partial = &(cachep)->slabs_partial;		\
-	entry = slabs_partial->next;				\
-	if (unlikely(entry == slabs_partial)) {			\
-		struct list_head * slabs_free;			\
-		slabs_free = &(cachep)->slabs_free;		\
-		entry = slabs_free->next;			\
-		if (unlikely(entry == slabs_free))		\
-			goto alloc_new_slab;			\
-		list_del(entry);				\
-		list_add(entry, slabs_partial);			\
-	}							\
-								\
-	slabp = list_entry(entry, slab_t, list);		\
-	kmem_cache_alloc_one_tail(cachep, slabp);		\
-})
-
-#ifdef CONFIG_SMP
-void* kmem_cache_alloc_batch(kmem_cache_t* cachep, int flags)
-{
-	int batchcount = cachep->batchcount;
-	cpucache_t* cc = cc_data(cachep);
-
-	spin_lock(&cachep->spinlock);
-	while (batchcount--) {
-		struct list_head * slabs_partial, * entry;
-		slab_t *slabp;
-		/* Get slab alloc is to come from. */
-		slabs_partial = &(cachep)->slabs_partial;
-		entry = slabs_partial->next;
-		if (unlikely(entry == slabs_partial)) {
-			struct list_head * slabs_free;
-			slabs_free = &(cachep)->slabs_free;
-			entry = slabs_free->next;
-			if (unlikely(entry == slabs_free))
-				break;
-			list_del(entry);
-			list_add(entry, slabs_partial);
-		}
-
-		slabp = list_entry(entry, slab_t, list);
-		cc_entry(cc)[cc->avail++] =
-				kmem_cache_alloc_one_tail(cachep, slabp);
-	}
-	spin_unlock(&cachep->spinlock);
-
-	if (cc->avail)
-		return cc_entry(cc)[--cc->avail];
-	return NULL;
-}
-#endif
 
-static inline void * __kmem_cache_alloc (kmem_cache_t *cachep, int flags)
+static inline void * __cache_alloc (kmem_cache_t *cachep, int flags)
 {
 	unsigned long save_flags;
 	void* objp;
+	struct array_cache *ac;
 
-	if (flags & __GFP_WAIT)
-		might_sleep();
+	cache_alloc_debugcheck_before(cachep, flags);
 
-	kmem_cache_alloc_head(cachep, flags);
-try_again:
 	local_irq_save(save_flags);
-#ifdef CONFIG_SMP
-	{
-		cpucache_t *cc = cc_data(cachep);
-
-		if (cc) {
-			if (cc->avail) {
-				STATS_INC_ALLOCHIT(cachep);
-				objp = cc_entry(cc)[--cc->avail];
-			} else {
-				STATS_INC_ALLOCMISS(cachep);
-				objp = kmem_cache_alloc_batch(cachep,flags);
-				local_irq_restore(save_flags);
-				if (!objp)
-					goto alloc_new_slab_nolock;
-				return objp;
-			}
-		} else {
-			spin_lock(&cachep->spinlock);
-			objp = kmem_cache_alloc_one(cachep);
-			spin_unlock(&cachep->spinlock);
-		}
+	ac = ac_data(cachep);
+	if (likely(ac->avail)) {
+		STATS_INC_ALLOCHIT(cachep);
+		ac->touched = 1;
+		objp = ac_entry(ac)[--ac->avail];
+	} else {
+		STATS_INC_ALLOCMISS(cachep);
+		objp = cache_alloc_refill(cachep, flags);
 	}
-#else
-	objp = kmem_cache_alloc_one(cachep);
-#endif
 	local_irq_restore(save_flags);
+	objp = cache_alloc_debugcheck_after(cachep, flags, objp);
 	return objp;
-alloc_new_slab:
-#ifdef CONFIG_SMP
-	spin_unlock(&cachep->spinlock);
-#endif
-	local_irq_restore(save_flags);
-#ifdef CONFIG_SMP
-alloc_new_slab_nolock:
-#endif
-	if (kmem_cache_grow(cachep, flags))
-		/* Someone may have stolen our objs.  Doesn't matter, we'll
-		 * just come back here again.
-		 */
-		goto try_again;
-	return NULL;
 }
 
-/*
- * Release an obj back to its cache. If the obj has a constructed
- * state, it should be in this state _before_ it is released.
- * - caller is responsible for the synchronization
+/* 
+ * NUMA: different approach needed if the spinlock is moved into
+ * the l3 structure
  */
 
-#if DEBUG
-# define CHECK_NR(pg)						\
-	do {							\
-		if (!virt_addr_valid(pg)) {			\
-			printk(KERN_ERR "kfree: out of range ptr %lxh.\n", \
-				(unsigned long)objp);		\
-			BUG();					\
-		} \
-	} while (0)
-# define CHECK_PAGE(addr)					\
-	do {							\
-		struct page *page = virt_to_page(addr);		\
-		CHECK_NR(addr);					\
-		if (!PageSlab(page)) {				\
-			printk(KERN_ERR "kfree: bad ptr %lxh.\n", \
-				(unsigned long)objp);		\
-			BUG();					\
-		}						\
-	} while (0)
-
-#else
-# define CHECK_PAGE(pg)	do { } while (0)
-#endif
-
-static inline void kmem_cache_free_one(kmem_cache_t *cachep, void *objp)
+static inline void
+__free_block(kmem_cache_t *cachep, void **objpp, int nr_objects)
 {
-	slab_t* slabp;
+	int i;
 
-	CHECK_PAGE(objp);
-	/* reduces memory footprint
-	 *
-	if (OPTIMIZE(cachep))
-		slabp = (void*)((unsigned long)objp&(~(PAGE_SIZE-1)));
-	 else
-	 */
-	slabp = GET_PAGE_SLAB(virt_to_page(objp));
+	check_irq_off();
+	spin_lock(&cachep->spinlock);
 
-#if DEBUG
-	if (cachep->flags & SLAB_DEBUG_INITIAL)
-		/* Need to call the slab's constructor so the
-		 * caller can perform a verify of its state (debugging).
-		 * Called without the cache-lock held.
-		 */
-		cachep->ctor(objp, cachep, SLAB_CTOR_CONSTRUCTOR|SLAB_CTOR_VERIFY);
+	/* NUMA: move add into loop */
+	cachep->lists.free_objects += nr_objects;
 
-	if (cachep->flags & SLAB_RED_ZONE) {
-		objp -= BYTES_PER_WORD;
-		if (xchg((unsigned long *)objp, RED_MAGIC1) != RED_MAGIC2)
-			/* Either write before start, or a double free. */
-			BUG();
-		if (xchg((unsigned long *)(objp+cachep->objsize -
-				BYTES_PER_WORD), RED_MAGIC1) != RED_MAGIC2)
-			/* Either write past end, or a double free. */
-			BUG();
-	}
-	if (cachep->flags & SLAB_POISON)
-		kmem_poison_obj(cachep, objp);
-	if (kmem_extra_free_checks(cachep, slabp, objp))
-		return;
-#endif
-	{
-		unsigned int objnr = (objp-slabp->s_mem)/cachep->objsize;
+	for (i = 0; i < nr_objects; i++) {
+		void *objp = objpp[i];
+		struct slab *slabp;
+		unsigned int objnr;
 
+		slabp = GET_PAGE_SLAB(virt_to_page(objp));
+		list_del(&slabp->list);
+		objnr = (objp - slabp->s_mem) / cachep->objsize;
 		slab_bufctl(slabp)[objnr] = slabp->free;
 		slabp->free = objnr;
-	}
-	STATS_DEC_ACTIVE(cachep);
-	
-	/* fixup slab chains */
-	{
-		int inuse = slabp->inuse;
-		if (unlikely(!--slabp->inuse)) {
-			/* Was partial or full, now empty. */
-			list_del(&slabp->list);
-			/* We only buffer a single page */
-			if (list_empty(&cachep->slabs_free))
-				list_add(&slabp->list, &cachep->slabs_free);
-			else
-				kmem_slab_destroy(cachep, slabp);
-		} else if (unlikely(inuse == cachep->num)) {
-			/* Was full. */
-			list_del(&slabp->list);
-			list_add(&slabp->list, &cachep->slabs_partial);
+		STATS_DEC_ACTIVE(cachep);
+		slabp->inuse--;
+
+		/* fixup slab chains */
+		if (slabp->inuse == 0) {
+			if (cachep->lists.free_objects > cachep->free_limit) {
+				cachep->lists.free_objects -= cachep->num;
+				slab_destroy(cachep, slabp);
+			} else {
+				list_add(&slabp->list,
+				&list3_data_ptr(cachep, objp)->slabs_free);
+			}
+		} else {
+			/* Unconditionally move a slab to the end of the
+			 * partial list on free - maximum time for the
+			 * other objects to be freed, too.
+			 */
+			list_add_tail(&slabp->list,
+				&list3_data_ptr(cachep, objp)->slabs_partial);
 		}
 	}
+	spin_unlock(&cachep->spinlock);
 }
 
-#ifdef CONFIG_SMP
-static inline void __free_block (kmem_cache_t* cachep,
-							void** objpp, int len)
+static void free_block(kmem_cache_t* cachep, void** objpp, int len)
 {
-	for ( ; len > 0; len--, objpp++)
-		kmem_cache_free_one(cachep, *objpp);
+	__free_block(cachep, objpp, len);
 }
 
-static void free_block (kmem_cache_t* cachep, void** objpp, int len)
+static void cache_flusharray (kmem_cache_t* cachep, struct array_cache *ac)
 {
-	spin_lock(&cachep->spinlock);
-	__free_block(cachep, objpp, len);
-	spin_unlock(&cachep->spinlock);
-}
+	int batchcount;
+
+	batchcount = ac->batchcount;
+#if DEBUG
+	BUG_ON(!batchcount || batchcount > ac->avail);
 #endif
+	check_irq_off();
+	__free_block(cachep, &ac_entry(ac)[0], batchcount);
+
+#if STATS
+	{
+		int i = 0;
+		struct list_head *p;
+
+		spin_lock(&cachep->spinlock);
+		p = list3_data(cachep)->slabs_free.next;
+		while (p != &(list3_data(cachep)->slabs_free)) {
+			struct slab *slabp;
+
+			slabp = list_entry(p, struct slab, list);
+			BUG_ON(slabp->inuse);
+
+			i++;
+			p = p->next;
+		}
+		STATS_SET_FREEABLE(cachep, i);
+		spin_unlock(&cachep->spinlock);
+	}
+#endif
+	ac->avail -= batchcount;
+	memmove(&ac_entry(ac)[0], &ac_entry(ac)[batchcount],
+			sizeof(void*)*ac->avail);
+}
 
 /*
- * __kmem_cache_free
- * called with disabled ints
+ * __cache_free
+ * Release an obj back to its cache. If the obj has a constructed
+ * state, it must be in this state _before_ it is released.
+ *
+ * Called with disabled ints.
  */
-static inline void __kmem_cache_free (kmem_cache_t *cachep, void* objp)
+static inline void __cache_free (kmem_cache_t *cachep, void* objp)
 {
-#ifdef CONFIG_SMP
-	cpucache_t *cc = cc_data(cachep);
+	struct array_cache *ac = ac_data(cachep);
 
-	CHECK_PAGE(objp);
-	if (cc) {
-		int batchcount;
-		if (cc->avail < cc->limit) {
-			STATS_INC_FREEHIT(cachep);
-			cc_entry(cc)[cc->avail++] = objp;
-			return;
-		}
-		STATS_INC_FREEMISS(cachep);
-		batchcount = cachep->batchcount;
-		cc->avail -= batchcount;
-		free_block(cachep, &cc_entry(cc)[cc->avail], batchcount);
-		cc_entry(cc)[cc->avail++] = objp;
+	check_irq_off();
+	objp = cache_free_debugcheck(cachep, objp);
+
+	if (likely(ac->avail < ac->limit)) {
+		STATS_INC_FREEHIT(cachep);
+		ac_entry(ac)[ac->avail++] = objp;
 		return;
 	} else {
-		free_block(cachep, &objp, 1);
+		STATS_INC_FREEMISS(cachep);
+		cache_flusharray(cachep, ac);
+		ac_entry(ac)[ac->avail++] = objp;
 	}
-#else
-	kmem_cache_free_one(cachep, objp);
-#endif
 }
 
 /**
@@ -1569,7 +1780,7 @@
  */
 void * kmem_cache_alloc (kmem_cache_t *cachep, int flags)
 {
-	return __kmem_cache_alloc(cachep, flags);
+	return __cache_alloc(cachep, flags);
 }
 
 /**
@@ -1595,12 +1806,19 @@
  */
 void * kmalloc (size_t size, int flags)
 {
-	cache_sizes_t *csizep = cache_sizes;
+	struct cache_sizes *csizep = malloc_sizes;
 
 	for (; csizep->cs_size; csizep++) {
 		if (size > csizep->cs_size)
 			continue;
-		return __kmem_cache_alloc(flags & GFP_DMA ?
+#if DEBUG
+		/* This happens if someone tries to call
+		 * kmem_cache_create(), or kmalloc(), before
+		 * the generic caches are initialized.
+		 */
+		BUG_ON(csizep->cs_cachep == NULL);
+#endif
+		return __cache_alloc(flags & GFP_DMA ?
 			 csizep->cs_dmacachep : csizep->cs_cachep, flags);
 	}
 	return NULL;
@@ -1617,14 +1835,9 @@
 void kmem_cache_free (kmem_cache_t *cachep, void *objp)
 {
 	unsigned long flags;
-#if DEBUG
-	CHECK_PAGE(objp);
-	if (cachep != GET_PAGE_CACHE(virt_to_page(objp)))
-		BUG();
-#endif
 
 	local_irq_save(flags);
-	__kmem_cache_free(cachep, objp);
+	__cache_free(cachep, objp);
 	local_irq_restore(flags);
 }
 
@@ -1643,9 +1856,9 @@
 	if (!objp)
 		return;
 	local_irq_save(flags);
-	CHECK_PAGE(objp);
+	kfree_debugcheck(objp);
 	c = GET_PAGE_CACHE(virt_to_page(objp));
-	__kmem_cache_free(c, (void*)objp);
+	__cache_free(c, (void*)objp);
 	local_irq_restore(flags);
 }
 
@@ -1660,7 +1873,7 @@
 
 kmem_cache_t * kmem_find_general_cachep (size_t size, int gfpflags)
 {
-	cache_sizes_t *csizep = cache_sizes;
+	struct cache_sizes *csizep = malloc_sizes;
 
 	/* This function could be moved to the header file, and
 	 * made inline so consumers can quickly determine what
@@ -1674,234 +1887,194 @@
 	return (gfpflags & GFP_DMA) ? csizep->cs_dmacachep : csizep->cs_cachep;
 }
 
-#ifdef CONFIG_SMP
+struct ccupdate_struct {
+	kmem_cache_t *cachep;
+	struct array_cache *new[NR_CPUS];
+};
 
-/* called with cache_chain_sem acquired.  */
-static int kmem_tune_cpucache (kmem_cache_t* cachep, int limit, int batchcount)
+static void do_ccupdate_local(void *info)
 {
-	ccupdate_struct_t new;
-	int i;
+	struct ccupdate_struct *new = (struct ccupdate_struct *)info;
+	struct array_cache *old;
 
-	/*
-	 * These are admin-provided, so we are more graceful.
-	 */
-	if (limit < 0)
-		return -EINVAL;
-	if (batchcount < 0)
-		return -EINVAL;
-	if (batchcount > limit)
-		return -EINVAL;
-	if (limit != 0 && !batchcount)
-		return -EINVAL;
+	check_irq_off();
+	old = ac_data(new->cachep);
+	
+	new->cachep->array[smp_processor_id()] = new->new[smp_processor_id()];
+	new->new[smp_processor_id()] = old;
+}
+
+
+static int do_tune_cpucache (kmem_cache_t* cachep, int limit, int batchcount)
+{
+	struct ccupdate_struct new;
+	int i;
 
 	memset(&new.new,0,sizeof(new.new));
-	if (limit) {
-		for (i = 0; i < NR_CPUS; i++) {
-			cpucache_t* ccnew;
-
-			ccnew = kmalloc(sizeof(void*)*limit+
-					sizeof(cpucache_t), GFP_KERNEL);
-			if (!ccnew) {
-				for (i--; i >= 0; i--) kfree(new.new[i]);
-				return -ENOMEM;
-			}
-			ccnew->limit = limit;
-			ccnew->avail = 0;
-			new.new[i] = ccnew;
+	for (i = 0; i < NR_CPUS; i++) {
+		struct array_cache *ccnew;
+
+		ccnew = kmalloc(sizeof(void*)*limit+
+				sizeof(struct array_cache), GFP_KERNEL);
+		if (!ccnew) {
+			for (i--; i >= 0; i--) kfree(new.new[i]);
+			return -ENOMEM;
 		}
+		ccnew->avail = 0;
+		ccnew->limit = limit;
+		ccnew->batchcount = batchcount;
+		ccnew->touched = 0;
+		new.new[i] = ccnew;
 	}
 	new.cachep = cachep;
+
+	smp_call_function_all_cpus(do_ccupdate_local, (void *)&new);
+	
+	check_irq_on();
 	spin_lock_irq(&cachep->spinlock);
 	cachep->batchcount = batchcount;
+	cachep->limit = limit;
+	cachep->free_limit = (1+num_online_cpus())*cachep->batchcount + cachep->num;
 	spin_unlock_irq(&cachep->spinlock);
 
-	smp_call_function_all_cpus(do_ccupdate_local, (void *)&new);
-
 	for (i = 0; i < NR_CPUS; i++) {
-		cpucache_t* ccold = new.new[i];
+		struct array_cache *ccold = new.new[i];
 		if (!ccold)
 			continue;
 		local_irq_disable();
-		free_block(cachep, cc_entry(ccold), ccold->avail);
+		free_block(cachep, ac_entry(ccold), ccold->avail);
 		local_irq_enable();
 		kfree(ccold);
 	}
 	return 0;
 }
 
-/* 
- * If slab debugging is enabled, don't batch slabs
- * on the per-cpu lists by defaults.
- */
+
 static void enable_cpucache (kmem_cache_t *cachep)
 {
-#ifndef CONFIG_DEBUG_SLAB
 	int err;
 	int limit;
 
-	/* FIXME: optimize */
 	if (cachep->objsize > PAGE_SIZE)
-		return;
-	if (cachep->objsize > 1024)
-		limit = 60;
+		limit = 8;
+	else if (cachep->objsize > 1024)
+		limit = 54;
 	else if (cachep->objsize > 256)
-		limit = 124;
+		limit = 120;
 	else
-		limit = 252;
+		limit = 248;
 
-	err = kmem_tune_cpucache(cachep, limit, limit/2);
+	err = do_tune_cpucache(cachep, limit, limit/2);
 	if (err)
 		printk(KERN_ERR "enable_cpucache failed for %s, error %d.\n",
 					cachep->name, -err);
-#endif
 }
 
-static void enable_all_cpucaches (void)
-{
-	struct list_head* p;
-
-	down(&cache_chain_sem);
-
-	p = &cache_cache.next;
-	do {
-		kmem_cache_t* cachep = list_entry(p, kmem_cache_t, next);
-
-		enable_cpucache(cachep);
-		p = cachep->next.next;
-	} while (p != &cache_cache.next);
-
-	up(&cache_chain_sem);
-}
-#endif
-
 /**
- * kmem_cache_reap - Reclaim memory from caches.
- * @gfp_mask: the type of memory required.
+ * cache_reap - Reclaim memory from caches.
+ *
+ * Called from a timer, every few seconds
+ * Purpose:
+ * - clear the per-cpu caches for this CPU.
+ * - return freeable pages to the main free memory pool.
  *
- * Called from do_try_to_free_pages() and __alloc_pages()
+ * If we cannot acquire the cache chain semaphore then just give up - we'll
+ * try again next timer interrupt.
  */
-int kmem_cache_reap (int gfp_mask)
+static inline void cache_reap (void)
 {
-	slab_t *slabp;
-	kmem_cache_t *searchp;
-	kmem_cache_t *best_cachep;
-	unsigned int best_pages;
-	unsigned int best_len;
-	unsigned int scan;
-	int ret = 0;
+	struct list_head *walk;
 
-	if (gfp_mask & __GFP_WAIT)
-		down(&cache_chain_sem);
-	else
-		if (down_trylock(&cache_chain_sem))
-			return 0;
+#if DEBUG
+	BUG_ON(!in_interrupt());
+	BUG_ON(in_irq());
+#endif
+	if (down_trylock(&cache_chain_sem))
+		return;
 
-	scan = REAP_SCANLEN;
-	best_len = 0;
-	best_pages = 0;
-	best_cachep = NULL;
-	searchp = clock_searchp;
-	do {
-		unsigned int pages;
+	list_for_each(walk, &cache_chain) {
+		kmem_cache_t *searchp;
 		struct list_head* p;
-		unsigned int full_free;
+		int tofree;
+		struct array_cache *ac;
+		struct slab *slabp;
+
+		searchp = list_entry(walk, kmem_cache_t, next);
 
-		/* It's safe to test this without holding the cache-lock. */
 		if (searchp->flags & SLAB_NO_REAP)
 			goto next;
-		spin_lock_irq(&searchp->spinlock);
-		if (searchp->growing)
-			goto next_unlock;
-		if (searchp->dflags & DFLGS_GROWN) {
-			searchp->dflags &= ~DFLGS_GROWN;
-			goto next_unlock;
-		}
-#ifdef CONFIG_SMP
-		{
-			cpucache_t *cc = cc_data(searchp);
-			if (cc && cc->avail) {
-				__free_block(searchp, cc_entry(cc), cc->avail);
-				cc->avail = 0;
+
+		check_irq_on();
+		local_irq_disable();
+		ac = ac_data(searchp);
+		if (ac->touched) {
+			ac->touched = 0;
+		} else if (ac->avail) {
+			tofree = (ac->limit+4)/5;
+			if (tofree > ac->avail) {
+				tofree = (ac->avail+1)/2;
 			}
+			free_block(searchp, ac_entry(ac), tofree);
+			ac->avail -= tofree;
+			memmove(&ac_entry(ac)[0], &ac_entry(ac)[tofree],
+					sizeof(void*)*ac->avail);
 		}
-#endif
+		if(time_after(searchp->lists.next_reap, jiffies))
+			goto next_irqon;
 
-		full_free = 0;
-		p = searchp->slabs_free.next;
-		while (p != &searchp->slabs_free) {
-			slabp = list_entry(p, slab_t, list);
-#if DEBUG
-			if (slabp->inuse)
-				BUG();
-#endif
-			full_free++;
-			p = p->next;
+		spin_lock(&searchp->spinlock);
+		if(time_after(searchp->lists.next_reap, jiffies)) {
+			goto next_unlock;
 		}
-
-		/*
-		 * Try to avoid slabs with constructors and/or
-		 * more than one page per slab (as it can be difficult
-		 * to get high orders from gfp()).
-		 */
-		pages = full_free * (1<<searchp->gfporder);
-		if (searchp->ctor)
-			pages = (pages*4+1)/5;
-		if (searchp->gfporder)
-			pages = (pages*4+1)/5;
-		if (pages > best_pages) {
-			best_cachep = searchp;
-			best_len = full_free;
-			best_pages = pages;
-			if (pages >= REAP_PERFECT) {
-				clock_searchp = list_entry(searchp->next.next,
-							kmem_cache_t,next);
-				goto perfect;
-			}
+		searchp->lists.next_reap = jiffies + REAPTIMEOUT_LIST3;
+		if (searchp->lists.free_touched) {
+			searchp->lists.free_touched = 0;
+			goto next_unlock;
 		}
-next_unlock:
-		spin_unlock_irq(&searchp->spinlock);
-next:
-		searchp = list_entry(searchp->next.next,kmem_cache_t,next);
-	} while (--scan && searchp != clock_searchp);
-
-	clock_searchp = searchp;
 
-	if (!best_cachep)
-		/* couldn't find anything to reap */
-		goto out;
-
-	spin_lock_irq(&best_cachep->spinlock);
-perfect:
-	/* free only 50% of the free slabs */
-	best_len = (best_len + 1)/2;
-	for (scan = 0; scan < best_len; scan++) {
-		struct list_head *p;
+		tofree = (searchp->free_limit+5*searchp->num-1)/(5*searchp->num);
+		do {
+			p = list3_data(searchp)->slabs_free.next;
+			if (p == &(list3_data(searchp)->slabs_free))
+				break;
 
-		if (best_cachep->growing)
-			break;
-		p = best_cachep->slabs_free.prev;
-		if (p == &best_cachep->slabs_free)
-			break;
-		slabp = list_entry(p,slab_t,list);
-#if DEBUG
-		if (slabp->inuse)
-			BUG();
-#endif
-		list_del(&slabp->list);
-		STATS_INC_REAPED(best_cachep);
+			slabp = list_entry(p, struct slab, list);
+			BUG_ON(slabp->inuse);
+			list_del(&slabp->list);
+			STATS_INC_REAPED(searchp);
 
-		/* Safe to drop the lock. The slab is no longer linked to the
-		 * cache.
-		 */
-		spin_unlock_irq(&best_cachep->spinlock);
-		kmem_slab_destroy(best_cachep, slabp);
-		spin_lock_irq(&best_cachep->spinlock);
-	}
-	spin_unlock_irq(&best_cachep->spinlock);
-	ret = scan * (1 << best_cachep->gfporder);
-out:
+			/* Safe to drop the lock. The slab is no longer
+			 * linked to the cache.
+			 * searchp cannot disappear, we hold
+			 * cache_chain_lock
+			 */
+			searchp->lists.free_objects -= searchp->num;
+			spin_unlock_irq(&searchp->spinlock);
+			slab_destroy(searchp, slabp);
+			spin_lock_irq(&searchp->spinlock);
+		} while(--tofree > 0);
+next_unlock:
+		spin_unlock(&searchp->spinlock);
+next_irqon:
+		local_irq_enable();
+next:
+	}
+	check_irq_on();
 	up(&cache_chain_sem);
-	return ret;
+}
+
+/*
+ * This is a timer handler.  There is on per CPU.  It is called periodially
+ * to shrink this CPU's caches.  Otherwise there could be memory tied up
+ * for long periods (or for ever) due to load changes.
+ */
+static void reap_timer_fnc(unsigned long data)
+{
+	int cpu = smp_processor_id();
+	struct timer_list *rt = &reap_timers[cpu];
+
+	cache_reap();
+	mod_timer(rt, jiffies + REAPTIMEOUT_CPUC + cpu);
 }
 
 #ifdef CONFIG_PROC_FS
@@ -1914,10 +2087,10 @@
 	down(&cache_chain_sem);
 	if (!n)
 		return (void *)1;
-	p = &cache_cache.next;
+	p = cache_chain.next;
 	while (--n) {
 		p = p->next;
-		if (p == &cache_cache.next)
+		if (p == &cache_chain)
 			return NULL;
 	}
 	return list_entry(p, kmem_cache_t, next);
@@ -1928,9 +2101,9 @@
 	kmem_cache_t *cachep = p;
 	++*pos;
 	if (p == (void *)1)
-		return &cache_cache;
-	cachep = list_entry(cachep->next.next, kmem_cache_t, next);
-	return cachep == &cache_cache ? NULL : cachep;
+		return list_entry(cache_chain.next, kmem_cache_t, next);
+	return cachep->next.next == &cache_chain ? NULL
+		: list_entry(cachep->next.next, kmem_cache_t, next);
 }
 
 static void s_stop(struct seq_file *m, void *p)
@@ -1942,7 +2115,7 @@
 {
 	kmem_cache_t *cachep = p;
 	struct list_head *q;
-	slab_t		*slabp;
+	struct slab	*slabp;
 	unsigned long	active_objs;
 	unsigned long	num_objs;
 	unsigned long	active_slabs = 0;
@@ -1954,41 +2127,40 @@
 		 * Output format version, so at least we can change it
 		 * without _too_ many complaints.
 		 */
-		seq_puts(m, "slabinfo - version: 1.1"
+		seq_puts(m, "slabinfo - version: 1.2"
 #if STATS
 				" (statistics)"
 #endif
-#ifdef CONFIG_SMP
-				" (SMP)"
-#endif
 				"\n");
 		return 0;
 	}
 
+	check_irq_on();
 	spin_lock_irq(&cachep->spinlock);
 	active_objs = 0;
 	num_slabs = 0;
-	list_for_each(q,&cachep->slabs_full) {
-		slabp = list_entry(q, slab_t, list);
+	list_for_each(q,&cachep->lists.slabs_full) {
+		slabp = list_entry(q, struct slab, list);
 		if (slabp->inuse != cachep->num)
 			BUG();
 		active_objs += cachep->num;
 		active_slabs++;
 	}
-	list_for_each(q,&cachep->slabs_partial) {
-		slabp = list_entry(q, slab_t, list);
+	list_for_each(q,&cachep->lists.slabs_partial) {
+		slabp = list_entry(q, struct slab, list);
 		BUG_ON(slabp->inuse == cachep->num || !slabp->inuse);
 		active_objs += slabp->inuse;
 		active_slabs++;
 	}
-	list_for_each(q,&cachep->slabs_free) {
-		slabp = list_entry(q, slab_t, list);
+	list_for_each(q,&cachep->lists.slabs_free) {
+		slabp = list_entry(q, struct slab, list);
 		if (slabp->inuse)
 			BUG();
 		num_slabs++;
 	}
 	num_slabs+=active_slabs;
 	num_objs = num_slabs*cachep->num;
+	BUG_ON(num_objs - active_objs != cachep->lists.free_objects);
 
 	name = cachep->name; 
 	{
@@ -2006,36 +2178,27 @@
 		name, active_objs, num_objs, cachep->objsize,
 		active_slabs, num_slabs, (1<<cachep->gfporder));
 
+	seq_printf(m, " : %4u %4u", cachep->limit, cachep->batchcount);
 #if STATS
-	{
-		unsigned long errors = cachep->errors;
+	{	// list3 stats
 		unsigned long high = cachep->high_mark;
+		unsigned long allocs = cachep->num_allocations;
 		unsigned long grown = cachep->grown;
 		unsigned long reaped = cachep->reaped;
-		unsigned long allocs = cachep->num_allocations;
-
-		seq_printf(m, " : %6lu %7lu %5lu %4lu %4lu",
-				high, allocs, grown, reaped, errors);
-	}
-#endif
-#ifdef CONFIG_SMP
-	{
-		unsigned int batchcount = cachep->batchcount;
-		unsigned int limit;
+		unsigned long errors = cachep->errors;
+		unsigned long max_freeable = cachep->max_freeable;
+		unsigned long free_limit = cachep->free_limit;
 
-		if (cc_data(cachep))
-			limit = cc_data(cachep)->limit;
-		 else
-			limit = 0;
-		seq_printf(m, " : %4u %4u", limit, batchcount);
+		seq_printf(m, " : %6lu %7lu %5lu %4lu %4lu %4lu %4lu",
+				high, allocs, grown, reaped, errors, 
+				max_freeable, free_limit);
 	}
-#endif
-#if STATS && defined(CONFIG_SMP)
-	{
+	{	// cpucache stats
 		unsigned long allochit = atomic_read(&cachep->allochit);
 		unsigned long allocmiss = atomic_read(&cachep->allocmiss);
 		unsigned long freehit = atomic_read(&cachep->freehit);
 		unsigned long freemiss = atomic_read(&cachep->freemiss);
+
 		seq_printf(m, " : %6lu %6lu %6lu %6lu",
 				allochit, allocmiss, freehit, freemiss);
 	}
@@ -2077,7 +2240,6 @@
 ssize_t slabinfo_write(struct file *file, const char *buffer,
 				size_t count, loff_t *ppos)
 {
-#ifdef CONFIG_SMP
 	char kbuf[MAX_SLABINFO_WRITE+1], *tmp;
 	int limit, batchcount, res;
 	struct list_head *p;
@@ -2105,7 +2267,13 @@
 		kmem_cache_t *cachep = list_entry(p, kmem_cache_t, next);
 
 		if (!strcmp(cachep->name, kbuf)) {
-			res = kmem_tune_cpucache(cachep, limit, batchcount);
+			if (limit < 1 ||
+			    batchcount < 1 ||
+			    batchcount > limit) {
+				res = -EINVAL;
+			} else {
+				res = do_tune_cpucache(cachep, limit, batchcount);
+			}
 			break;
 		}
 	}
@@ -2113,8 +2281,5 @@
 	if (res >= 0)
 		res = count;
 	return res;
-#else
-	return -EINVAL;
-#endif
 }
 #endif
diff -Nru a/mm/swap.c b/mm/swap.c
--- a/mm/swap.c	Wed Oct 30 16:44:27 2002
+++ b/mm/swap.c	Wed Oct 30 16:44:27 2002
@@ -69,7 +69,8 @@
 }
 
 /*
- * This path almost never happens - pages are normally freed via pagevecs.
+ * This path almost never happens for VM activity - pages are normally
+ * freed via pagevecs.  But it gets used by networking.
  */
 void __page_cache_release(struct page *page)
 {
@@ -83,7 +84,7 @@
 		page = NULL;
 	spin_unlock_irqrestore(&zone->lru_lock, flags);
 	if (page)
-		__free_pages_ok(page, 0);
+		free_hot_page(page);
 }
 
 /*
@@ -98,13 +99,13 @@
  * page count inside the lock to see whether shrink_cache grabbed the page
  * via the LRU.  If it did, give up: shrink_cache will free it.
  */
-void release_pages(struct page **pages, int nr)
+void release_pages(struct page **pages, int nr, int cold)
 {
 	int i;
 	struct pagevec pages_to_free;
 	struct zone *zone = NULL;
 
-	pagevec_init(&pages_to_free);
+	pagevec_init(&pages_to_free, cold);
 	for (i = 0; i < nr; i++) {
 		struct page *page = pages[i];
 		struct zone *pagezone;
@@ -125,7 +126,7 @@
 			if (!pagevec_add(&pages_to_free, page)) {
 				spin_unlock_irq(&zone->lru_lock);
 				__pagevec_free(&pages_to_free);
-				pagevec_init(&pages_to_free);
+				pagevec_reinit(&pages_to_free);
 				zone = NULL;	/* No lock is held */
 			}
 		}
@@ -138,8 +139,8 @@
 
 void __pagevec_release(struct pagevec *pvec)
 {
-	release_pages(pvec->pages, pagevec_count(pvec));
-	pagevec_init(pvec);
+	release_pages(pvec->pages, pagevec_count(pvec), pvec->cold);
+	pagevec_reinit(pvec);
 }
 
 /*
@@ -152,7 +153,8 @@
 	int i;
 	struct pagevec pages_to_free;
 
-	pagevec_init(&pages_to_free);
+	pagevec_init(&pages_to_free, pvec->cold);
+	pages_to_free.cold = pvec->cold;
 	for (i = 0; i < pagevec_count(pvec); i++) {
 		struct page *page = pvec->pages[i];
 
@@ -161,7 +163,7 @@
 			pagevec_add(&pages_to_free, page);
 	}
 	pagevec_free(&pages_to_free);
-	pagevec_init(pvec);
+	pagevec_reinit(pvec);
 }
 
 /*
diff -Nru a/mm/swap_state.c b/mm/swap_state.c
--- a/mm/swap_state.c	Wed Oct 30 16:44:28 2002
+++ b/mm/swap_state.c	Wed Oct 30 16:44:28 2002
@@ -301,7 +301,7 @@
 
 		for (i = 0; i < todo; i++)
 			free_swap_cache(pagep[i]);
-		release_pages(pagep, todo);
+		release_pages(pagep, todo, 0);
 		pagep += todo;
 		nr -= todo;
 	}
diff -Nru a/mm/swapfile.c b/mm/swapfile.c
--- a/mm/swapfile.c	Wed Oct 30 16:44:24 2002
+++ b/mm/swapfile.c	Wed Oct 30 16:44:24 2002
@@ -5,6 +5,7 @@
  *  Swap reorganised 29.12.95, Stephen Tweedie
  */
 
+#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/kernel_stat.h>
@@ -15,6 +16,7 @@
 #include <linux/shm.h>
 #include <linux/blkdev.h>
 #include <linux/buffer_head.h>
+#include <linux/seq_file.h>
 
 #include <asm/pgtable.h>
 #include <linux/swapops.h>
@@ -1041,45 +1043,91 @@
 	return err;
 }
 
-int get_swaparea_info(char *buf)
+#ifdef CONFIG_PROC_FS
+/* iterator */
+static void *swap_start(struct seq_file *swap, loff_t *pos)
 {
-	char * page = (char *) __get_free_page(GFP_KERNEL);
 	struct swap_info_struct *ptr = swap_info;
-	int i, len;
+	int i;
+	loff_t l = *pos;
+	char * page = (char *) __get_free_page(GFP_KERNEL);
 
-	if (!page)
-		return -ENOMEM;
+	swap->private = page;	/* save for swap_show */
+	swap_list_lock();
 
-	len = sprintf(buf, "Filename\t\t\t\tType\t\tSize\tUsed\tPriority\n");
-	for (i = 0 ; i < nr_swapfiles ; i++, ptr++) {
-		int j, usedswap;
-		struct file *file;
-		char *path;
+	if (!page)
+		return ERR_PTR(-ENOMEM);
 
+	for (i = 0; i < nr_swapfiles; i++, ptr++) {
 		if (!(ptr->flags & SWP_USED) || !ptr->swap_map)
 			continue;
+		if (!l--)
+			return ptr;
+	}
 
-		file = ptr->swap_file;
-		path = d_path(file->f_dentry, file->f_vfsmnt, page, PAGE_SIZE);
-		for (j = 0,usedswap = 0; j < ptr->max; ++j)
-			switch (ptr->swap_map[j]) {
-				case SWAP_MAP_BAD:
-				case 0:
-					continue;
-				default:
-					usedswap++;
-			}
-		len += sprintf(buf + len, "%-39s %s\t%d\t%d\t%d\n",
-			       path,
-			       S_ISBLK(file->f_dentry->d_inode->i_mode) ?
-					"partition" : "file\t",
-			       ptr->pages << (PAGE_SHIFT - 10),
-			       usedswap << (PAGE_SHIFT - 10),
-			       ptr->prio);
+	return NULL;
+}
+
+static void *swap_next(struct seq_file *swap, void *v, loff_t *pos)
+{
+	struct swap_info_struct *ptr = v;
+	void *endptr = (void *) swap_info + nr_swapfiles * sizeof(struct swap_info_struct);
+
+	for (++ptr; ptr < (struct swap_info_struct *) endptr; ptr++) {
+		if (!(ptr->flags & SWP_USED) || !ptr->swap_map)
+			continue;
+		++*pos;
+		return ptr;
 	}
-	free_page((unsigned long) page);
-	return len;
+
+	return NULL;
+}
+
+static void swap_stop(struct seq_file *swap, void *v)
+{
+	swap_list_unlock();
+	free_page((unsigned long) swap->private);
+	swap->private = NULL;
 }
+
+static int swap_show(struct seq_file *swap, void *v)
+{
+	struct swap_info_struct *ptr = v;
+	int j, usedswap;
+	struct file *file;
+	char *path;
+
+	if (v == swap_info)
+		seq_puts(swap, "Filename\t\t\t\tType\t\tSize\tUsed\tPriority\n");
+
+	file = ptr->swap_file;
+	path = d_path(file->f_dentry, file->f_vfsmnt, swap->private, PAGE_SIZE);
+
+	for (j = 0, usedswap = 0; j < ptr->max; ++j)
+		switch (ptr->swap_map[j]) {
+			case SWAP_MAP_BAD:
+			case 0:
+				continue;
+			default:
+				usedswap++;
+		}
+	seq_printf(swap, "%-39s %s\t%d\t%d\t%d\n",
+		       path,
+		       S_ISBLK(file->f_dentry->d_inode->i_mode) ?
+				"partition" : "file\t",
+		       ptr->pages << (PAGE_SHIFT - 10),
+		       usedswap << (PAGE_SHIFT - 10),
+		       ptr->prio);
+	return 0;
+}
+
+struct seq_operations swaps_op = {
+	.start =	swap_start,
+	.next =		swap_next,
+	.stop =		swap_stop,
+	.show =		swap_show
+};
+#endif /* CONFIG_PROC_FS */
 
 /*
  * Written 01/25/92 by Simmule Turner, heavily changed by Linus.
diff -Nru a/mm/truncate.c b/mm/truncate.c
--- a/mm/truncate.c	Wed Oct 30 16:44:34 2002
+++ b/mm/truncate.c	Wed Oct 30 16:44:34 2002
@@ -53,7 +53,34 @@
 	clear_page_dirty(page);
 	ClearPageUptodate(page);
 	remove_from_page_cache(page);
-	page_cache_release(page);
+	page_cache_release(page);	/* pagecache ref */
+}
+
+/*
+ * This is for invalidate_inode_pages().  That function can be called at
+ * any time, and is not supposed to throw away dirty pages.  But pages can
+ * be marked dirty at any time too.  So we re-check the dirtiness inside
+ * ->page_lock.  That provides exclusion against the __set_page_dirty
+ * functions.
+ */
+static void
+invalidate_complete_page(struct address_space *mapping, struct page *page)
+{
+	if (page->mapping != mapping)
+		return;
+
+	if (PagePrivate(page) && !try_to_release_page(page, 0))
+		return;
+
+	write_lock(&mapping->page_lock);
+	if (PageDirty(page)) {
+		write_unlock(&mapping->page_lock);
+	} else {
+		__remove_from_page_cache(page);
+		write_unlock(&mapping->page_lock);
+		ClearPageUptodate(page);
+		page_cache_release(page);	/* pagecache ref */
+	}
 }
 
 /**
@@ -73,6 +100,10 @@
  * When looking at page->index outside the page lock we need to be careful to
  * copy it into a local to avoid races (it could change at any time).
  *
+ * We pass down the cache-hot hint to the page freeing code.  Even if the
+ * mapping is large, it is probably the case that the final pages are the most
+ * recently touched, and freeing happens in ascending file offset order.
+ *
  * Called under (and serialised by) inode->i_sem.
  */
 void truncate_inode_pages(struct address_space *mapping, loff_t lstart)
@@ -83,7 +114,7 @@
 	pgoff_t next;
 	int i;
 
-	pagevec_init(&pvec);
+	pagevec_init(&pvec, 0);
 	next = start;
 	while (pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
 		for (i = 0; i < pagevec_count(&pvec); i++) {
@@ -158,7 +189,7 @@
 	pgoff_t next = 0;
 	int i;
 
-	pagevec_init(&pvec);
+	pagevec_init(&pvec, 0);
 	while (pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
 		for (i = 0; i < pagevec_count(&pvec); i++) {
 			struct page *page = pvec.pages[i];
@@ -172,11 +203,9 @@
 			next++;
 			if (PageDirty(page) || PageWriteback(page))
 				goto unlock;
-			if (PagePrivate(page) && !try_to_release_page(page, 0))
-				goto unlock;
 			if (page_mapped(page))
 				goto unlock;
-			truncate_complete_page(mapping, page);
+			invalidate_complete_page(mapping, page);
 unlock:
 			unlock_page(page);
 		}
@@ -201,7 +230,7 @@
 	pgoff_t next = 0;
 	int i;
 
-	pagevec_init(&pvec);
+	pagevec_init(&pvec, 0);
 	while (pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
 		for (i = 0; i < pagevec_count(&pvec); i++) {
 			struct page *page = pvec.pages[i];
@@ -213,7 +242,7 @@
 				if (page_mapped(page))
 					clear_page_dirty(page);
 				else
-					truncate_complete_page(mapping, page);
+					invalidate_complete_page(mapping, page);
 			}
 			unlock_page(page);
 		}
diff -Nru a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c	Wed Oct 30 16:44:23 2002
+++ b/mm/vmscan.c	Wed Oct 30 16:44:23 2002
@@ -31,6 +31,7 @@
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <asm/topology.h>
+#include <asm/div64.h>
 
 #include <linux/swapops.h>
 
@@ -85,7 +86,7 @@
 	shrinker_t		shrinker;
 	struct list_head	list;
 	int			seeks;	/* seeks to recreate an obj */
-	int			nr;	/* objs pending delete */
+	long			nr;	/* objs pending delete */
 };
 
 static LIST_HEAD(shrinker_list);
@@ -121,7 +122,7 @@
 	kfree(shrinker);
 }
  
-#define SHRINK_BATCH 32
+#define SHRINK_BATCH 128
 /*
  * Call the shrink functions to age shrinkable caches
  *
@@ -134,29 +135,27 @@
  * slab to avoid swapping.
  *
  * FIXME: do not do for zone highmem
+ *
+ * We do weird things to avoid (scanned*seeks*entries) overflowing 32 bits.
  */
-static int shrink_slab(int scanned,  unsigned int gfp_mask)
+static int shrink_slab(long scanned,  unsigned int gfp_mask)
 {
-	struct list_head *lh;
-	int pages;
+	struct shrinker *shrinker;
+	long pages;
 
 	if (down_trylock(&shrinker_sem))
 		return 0;
 
 	pages = nr_used_zone_pages();
-	list_for_each(lh, &shrinker_list) {
-		struct shrinker *shrinker;
-		int entries;
-		unsigned long delta;
-
-		shrinker = list_entry(lh, struct shrinker, list);
-		entries = (*shrinker->shrinker)(0, gfp_mask);
-		if (!entries)
-			continue;
-		delta = scanned * shrinker->seeks * entries;
-		shrinker->nr += delta / (pages + 1);
+	list_for_each_entry(shrinker, &shrinker_list, list) {
+		long long delta;
+
+		delta = scanned * shrinker->seeks;
+		delta *= (*shrinker->shrinker)(0, gfp_mask);
+		do_div(delta, pages + 1);
+		shrinker->nr += delta;
 		if (shrinker->nr > SHRINK_BATCH) {
-			int nr = shrinker->nr;
+			long nr = shrinker->nr;
 
 			shrinker->nr = 0;
 			(*shrinker->shrinker)(nr, gfp_mask);
@@ -204,7 +203,7 @@
 	int pgactivate = 0;
 	int ret = 0;
 
-	pagevec_init(&freed_pvec);
+	pagevec_init(&freed_pvec, 1);
 	while (!list_empty(page_list)) {
 		struct page *page;
 		int may_enter_fs;
@@ -434,7 +433,7 @@
 	if (nr_to_process < SWAP_CLUSTER_MAX)
 		nr_to_process = SWAP_CLUSTER_MAX;
 
-	pagevec_init(&pvec);
+	pagevec_init(&pvec, 1);
 
 	lru_add_drain();
 	spin_lock_irq(&zone->lru_lock);
@@ -618,7 +617,7 @@
 		pgdeactivate++;
 	}
 
-	pagevec_init(&pvec);
+	pagevec_init(&pvec, 1);
 	spin_lock_irq(&zone->lru_lock);
 	while (!list_empty(&l_inactive)) {
 		page = list_entry(l_inactive.prev, struct page, lru);
@@ -824,7 +823,7 @@
 	int i;
 
 	for (priority = DEF_PRIORITY; priority; priority--) {
-		int success = 1;
+		int all_zones_ok = 1;
 
 		for (i = 0; i < pgdat->nr_zones; i++) {
 			struct zone *zone = pgdat->node_zones + i;
@@ -832,20 +831,24 @@
 			int max_scan;
 			int to_reclaim;
 
-			to_reclaim = zone->pages_high - zone->free_pages;
-			if (nr_pages && to_free > 0)
+			if (nr_pages && to_free > 0) {	/* Software suspend */
 				to_reclaim = min(to_free, SWAP_CLUSTER_MAX*8);
-			if (to_reclaim <= 0)
-				continue;
-			success = 0;
+			} else {			/* Zone balancing */
+				to_reclaim = zone->pages_high-zone->free_pages;
+				if (to_reclaim <= 0)
+					continue;
+			}
+			all_zones_ok = 0;
 			max_scan = zone->nr_inactive >> priority;
 			if (max_scan < to_reclaim * 2)
 				max_scan = to_reclaim * 2;
+			if (max_scan < SWAP_CLUSTER_MAX)
+				max_scan = SWAP_CLUSTER_MAX;
 			to_free -= shrink_zone(zone, max_scan, GFP_KSWAPD,
 					to_reclaim, &nr_mapped, ps, priority);
 			shrink_slab(max_scan + nr_mapped, GFP_KSWAPD);
 		}
-		if (success)
+		if (all_zones_ok)
 			break;
 		blk_congestion_wait(WRITE, HZ/4);
 	}
diff -Nru a/net/802/psnap.c b/net/802/psnap.c
--- a/net/802/psnap.c	Wed Oct 30 16:44:36 2002
+++ b/net/802/psnap.c	Wed Oct 30 16:44:36 2002
@@ -91,12 +91,15 @@
 EXPORT_SYMBOL(register_snap_client);
 EXPORT_SYMBOL(unregister_snap_client);
 
+static char snap_err_msg[] __initdata =
+	KERN_CRIT "SNAP - unable to register with 802.2\n";
+
 static int __init snap_init(void)
 {
 	snap_sap = llc_sap_open(0xAA, snap_rcv);
 
 	if (!snap_sap)
-		printk(KERN_CRIT "SNAP - unable to register with 802.2\n");
+		printk(snap_err_msg);
 
 	return 0;
 }
diff -Nru a/net/Config.help b/net/Config.help
--- a/net/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,514 +0,0 @@
-CONFIG_FILTER
-  The Linux Socket Filter is derived from the Berkeley Packet Filter.
-  If you say Y here, user-space programs can attach a filter to any
-  socket and thereby tell the kernel that it should allow or disallow
-  certain types of data to get through the socket.  Linux Socket
-  Filtering works on all socket types except TCP for now.  See the
-  text file <file:Documentation/networking/filter.txt> for more
-  information.
-
-  You need to say Y here if you want to use PPP packet filtering
-  (see the CONFIG_PPP_FILTER option below).
-
-  If unsure, say N.
-
-CONFIG_NETFILTER
-  Netfilter is a framework for filtering and mangling network packets
-  that pass through your Linux box.
-
-  The most common use of packet filtering is to run your Linux box as
-  a firewall protecting a local network from the Internet. The type of
-  firewall provided by this kernel support is called a "packet
-  filter", which means that it can reject individual network packets
-  based on type, source, destination etc. The other kind of firewall,
-  a "proxy-based" one, is more secure but more intrusive and more
-  bothersome to set up; it inspects the network traffic much more
-  closely, modifies it and has knowledge about the higher level
-  protocols, which a packet filter lacks. Moreover, proxy-based
-  firewalls often require changes to the programs running on the local
-  clients. Proxy-based firewalls don't need support by the kernel, but
-  they are often combined with a packet filter, which only works if
-  you say Y here.
-
-  You should also say Y here if you intend to use your Linux box as
-  the gateway to the Internet for a local network of machines without
-  globally valid IP addresses. This is called "masquerading": if one
-  of the computers on your local network wants to send something to
-  the outside, your box can "masquerade" as that computer, i.e. it
-  forwards the traffic to the intended outside destination, but
-  modifies the packets to make it look like they came from the
-  firewall box itself. It works both ways: if the outside host
-  replies, the Linux box will silently forward the traffic to the
-  correct local computer. This way, the computers on your local net
-  are completely invisible to the outside world, even though they can
-  reach the outside and can receive replies. It is even possible to
-  run globally visible servers from within a masqueraded local network
-  using a mechanism called portforwarding. Masquerading is also often
-  called NAT (Network Address Translation).
-
-  Another use of Netfilter is in transparent proxying: if a machine on
-  the local network tries to connect to an outside host, your Linux
-  box can transparently forward the traffic to a local server,
-  typically a caching proxy server.
-
-  Various modules exist for netfilter which replace the previous
-  masquerading (ipmasqadm), packet filtering (ipchains), transparent
-  proxying, and portforwarding mechanisms. Please see
-  <file:Documentation/Changes> under "iptables" for the location of
-  these packages.
-
-  Make sure to say N to "Fast switching" below if you intend to say Y
-  here, as Fast switching currently bypasses netfilter.
-
-  Chances are that you should say Y here if you compile a kernel which
-  will run as a router and N for regular hosts. If unsure, say N.
-
-CONFIG_NETFILTER_DEBUG
-  You can say Y here if you want to get additional messages useful in
-  debugging the netfilter code.
-
-CONFIG_INET
-  These are the protocols used on the Internet and on most local
-  Ethernets. It is highly recommended to say Y here (this will enlarge
-  your kernel by about 144 KB), since some programs (e.g. the X window
-  system) use TCP/IP even if your machine is not connected to any
-  other computer. You will get the so-called loopback device which
-  allows you to ping yourself (great fun, that!).
-
-  For an excellent introduction to Linux networking, please read the
-  NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  This option is also necessary if you want to use the full power of
-  term (term is a program which gives you almost full Internet
-  connectivity if you have a regular dial up shell account on some
-  Internet connected Unix computer; for more information, read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  If you say Y here and also to "/proc file system support" and
-  "Sysctl support" below, you can change various aspects of the
-  behavior of the TCP/IP code by writing to the (virtual) files in
-  /proc/sys/net/ipv4/*; the options are explained in the file
-  <file:Documentation/networking/ip-sysctl.txt>.
-
-  Short answer: say Y.
-
-CONFIG_UNIX
-  If you say Y here, you will include support for Unix domain sockets;
-  sockets are the standard Unix mechanism for establishing and
-  accessing network connections.  Many commonly used programs such as
-  the X Window system and syslog use these sockets even if your
-  machine is not connected to any network.  Unless you are working on
-  an embedded system or something similar, you therefore definitely
-  want to say Y here.
-
-  However, the socket support is also available as a module ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>. The module will be
-  called unix.o.  If you try building this as a module and you have
-  said Y to "Kernel module loader support" above, be sure to add
-  'alias net-pf-1 unix' to your /etc/modules.conf file. Note that
-  several important services won't work correctly if you say M here
-  and then neglect to load the module.
-
-  Say Y unless you know what you are doing.
-
-CONFIG_IPV6
-  This is experimental support for the next version of the Internet
-  Protocol: IP version 6 (also called IPng "IP next generation").
-  Features of this new protocol include: expanded address space,
-  authentication and privacy, and seamless interoperability with the
-  current version of IP (IP version 4). For general information about
-  IPv6, see <http://playground.sun.com/pub/ipng/html/ipng-main.html>;
-  for specific information about IPv6 under Linux read the HOWTO at
-  <http://www.bieringer.de/linux/IPv6/> and the file net/ipv6/README
-  in the kernel source.
-
-  If you want to use IPv6, please upgrade to the newest net-tools as
-  given in <file:Documentation/Changes>. You will still be able to do
-  regular IPv4 networking as well.
-
-  This protocol support 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 ipv6.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  It is safe to say N here for now.
-
-CONFIG_IPX
-  This is support for the Novell networking protocol, IPX, commonly
-  used for local networks of Windows machines.  You need it if you
-  want to access Novell NetWare file or print servers using the Linux
-  Novell client ncpfs (available from
-  <ftp://platan.vc.cvut.cz/pub/linux/ncpfs/>) or from
-  within the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO,
-  available from <http://www.linuxdoc.org/docs.html#howto>).  In order
-  to do the former, you'll also have to say Y to "NCP file system
-  support", below.
-
-  IPX is similar in scope to IP, while SPX, which runs on top of IPX,
-  is similar to TCP. There is also experimental support for SPX in
-  Linux (see "SPX networking", below).
-
-  To turn your Linux box into a fully featured NetWare file server and
-  IPX router, say Y here and fetch either lwared from
-  <ftp://ibiblio.org/pub/Linux/system/network/daemons/> or
-  mars_nwe from <ftp://www.compu-art.de/mars_nwe/>. For more
-  information, read the IPX-HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  General information about how to connect Linux, Windows machines and
-  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
-
-  The IPX driver would enlarge your kernel by about 16 KB. 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 ipx.o.  If you want to compile it as a module, say M here
-  and read <file:Documentation/modules.txt>.  Unless you want to
-  integrate your Linux box with a local Novell network, say N.
-
-CONFIG_DECNET
-  The DECnet networking protocol was used in many products made by
-  Digital (now Compaq).  It provides reliable stream and sequenced
-  packet communications over which run a variety of services similar
-  to those which run over TCP/IP.
-
-  To find some tools to use with the kernel layer support, please
-  look at Patrick Caulfield's web site:
-  <http://linux.dreamtime.org/decnet/>.
-
-  More detailed documentation is available in
-  <file:Documentation/networking/decnet.txt>.
-
-  Be sure to say Y to "/proc file system support" and "Sysctl support"
-  below when using DECnet, since you will need sysctl support to aid
-  in configuration at run time.
-
-  The DECnet code is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module is called decnet.o.
-
-CONFIG_ATALK
-  AppleTalk is the protocol that Apple computers can use to communicate
-  on a network.  If your Linux box is connected to such a network and you
-  wish to connect to it, say Y.  You will need to use the netatalk package
-  so that your Linux box can act as a print and file server for Macs as
-  well as access AppleTalk printers.  Check out
-  <http://www.zettabyte.net/netatalk/> on the WWW for details.
-  EtherTalk is the name used for AppleTalk over Ethernet and the
-  cheaper and slower LocalTalk is AppleTalk over a proprietary Apple
-  network using serial links.  EtherTalk and LocalTalk are fully
-  supported by Linux.
-
-  General information about how to connect Linux, Windows machines and
-  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.  The
-  NET-3-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>, contains valuable
-  information as well.
-
-  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 is called appletalk.o.  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.  You
-  almost certainly want to compile it as a module so you can restart
-  your AppleTalk stack without rebooting your machine.  I hear that
-  the GNU boycott of Apple is over, so even politically correct people
-  are allowed to say Y here.
-
-CONFIG_X25
-  X.25 is a set of standardized network protocols, similar in scope to
-  frame relay; the one physical line from your box to the X.25 network
-  entry point can carry several logical point-to-point connections
-  (called "virtual circuits") to other computers connected to the X.25
-  network. Governments, banks, and other organizations tend to use it
-  to connect to each other or to form Wide Area Networks (WANs). Many
-  countries have public X.25 networks. X.25 consists of two
-  protocols: the higher level Packet Layer Protocol (PLP) (say Y here
-  if you want that) and the lower level data link layer protocol LAPB
-  (say Y to "LAPB Data Link Driver" below if you want that).
-
-  You can read more about X.25 at <http://www.sangoma.com/x25.htm> and
-  <http://www.cisco.com/univercd/data/doc/software/11_0/rpcg/cx25.htm>.
-  Information about X.25 for Linux is contained in the files
-  <file:Documentation/networking/x25.txt> and
-  <file:Documentation/networking/x25-iface.txt>.
-
-  One connects to an X.25 network either with a dedicated network card
-  using the X.21 protocol (not yet supported by Linux) or one can do
-  X.25 over a standard telephone line using an ordinary modem (say Y
-  to "X.25 async driver" below) or over Ethernet using an ordinary
-  Ethernet card and either the 802.2 LLC protocol (say Y to "802.2
-  LLC" below) or LAPB over Ethernet (say Y to "LAPB Data Link Driver"
-  and "LAPB over Ethernet driver" below).
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called x25.o. If unsure, say N.
-
-CONFIG_LAPB
-  Link Access Procedure, Balanced (LAPB) is the data link layer (i.e.
-  the lower) part of the X.25 protocol. It offers a reliable
-  connection service to exchange data frames with one other host, and
-  it is used to transport higher level protocols (mostly X.25 Packet
-  Layer, the higher part of X.25, but others are possible as well).
-  Usually, LAPB is used with specialized X.21 network cards, but Linux
-  currently supports LAPB only over Ethernet connections. If you want
-  to use LAPB connections over Ethernet, say Y here and to "LAPB over
-  Ethernet driver" below. Read
-  <file:Documentation/networking/lapb-module.txt> for technical
-  details.
-
-  If you want to compile this driver as a module though ( = code which
-  can be inserted in and removed from the running kernel whenever you
-  want), say M here and read <file:Documentation/modules.txt>.  The
-  module will be called lapb.o.  If unsure, say N.
-
-CONFIG_LLC
-  This is a Logical Link Layer protocol used for Appletalk, IPX and in
-  the future by NetBEUI and by the linux-sna project. It originally
-  came from Procom Inc. that released the code for 2.0.36 and was
-  ported to 2.{4,5}. Select this if you want to have support for
-  those protocols or if you want to have the sockets interface for
-  LLC.
-  
-
-CONFIG_NET_DIVERT
-  The Frame Diverter allows you to divert packets from the
-  network, that are not aimed at the interface receiving it (in
-  promisc. mode). Typically, a Linux box setup as an Ethernet bridge
-  with the Frames Diverter on, can do some *really* transparent www
-  caching using a Squid proxy for example.
-
-  This is very useful when you don't want to change your router's
-  config (or if you simply don't have access to it).
-
-  The other possible usages of diverting Ethernet Frames are
-  numberous:
-   - reroute smtp traffic to another interface
-   - traffic-shape certain network streams
-   - transparently proxy smtp connections
-   - etc...
-
-  For more informations, please refer to:
-    <http://diverter.sourceforge.net/>
-    <http://perso.wanadoo.fr/magpie/EtherDivert.html>
-
-  If unsure, say N.
-
-CONFIG_BRIDGE
-  If you say Y here, then your Linux box will be able to act as an
-  Ethernet bridge, which means that the different Ethernet segments it
-  is connected to will appear as one Ethernet to the participants.
-  Several such bridges can work together to create even larger
-  networks of Ethernets using the IEEE 802.1 spanning tree algorithm.
-  As this is a standard, Linux bridges will cooperate properly with
-  other third party bridge products.
-
-  In order to use the Ethernet bridge, you'll need the bridge
-  configuration tools; see <file:Documentation/networking/bridge.txt>
-  for location. Please read the Bridge mini-HOWTO for more
-  information.
-
-  Note that if your box acts as a bridge, it probably contains several
-  Ethernet devices, but the kernel is not able to recognize more than
-  one at boot time without help; for details read the Ethernet-HOWTO,
-  available from in <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to compile this code as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called bridge.o.
-
-  If unsure, say N.
-
-CONFIG_PACKET
-  The Packet protocol is used by applications which communicate
-  directly with network devices without an intermediate network
-  protocol implemented in the kernel, e.g. tcpdump.  If you want them
-  to work, choose Y.
-
-  This driver is also available as a module called af_packet.o ( =
-  code which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>; if you use modprobe
-  or kmod, you may also want to add "alias net-pf-17 af_packet" to
-  /etc/modules.conf.
-
-  If unsure, say Y.
-
-CONFIG_PACKET_MMAP
-  If you say Y here, the Packet protocol driver will use an IO
-  mechanism that results in faster communication.
-
-  If unsure, say N.
-
-CONFIG_NETLINK_DEV
-  This option will be removed soon. Any programs that want to use
-  character special nodes like /dev/tap0 or /dev/route (all with major
-  number 36) need this option, and need to be rewritten soon to use
-  the real netlink socket.
-  This is a backward compatibility option, choose Y for now.
-
-CONFIG_ATM
-  ATM is a high-speed networking technology for Local Area Networks
-  and Wide Area Networks.  It uses a fixed packet size and is
-  connection oriented, allowing for the negotiation of minimum
-  bandwidth requirements.
-
-  In order to participate in an ATM network, your Linux box needs an
-  ATM networking card. If you have that, say Y here and to the driver
-  of your ATM card below.
-
-  Note that you need a set of user-space programs to actually make use
-  of ATM.  See the file <file:Documentation/networking/atm.txt> for
-  further details.
-
-CONFIG_ATM_CLIP
-  Classical IP over ATM for PVCs and SVCs, supporting InARP and
-  ATMARP. If you want to communication with other IP hosts on your ATM
-  network, you will typically either say Y here or to "LAN Emulation
-  (LANE)" below.
-
-CONFIG_ATM_CLIP_NO_ICMP
-  Normally, an "ICMP host unreachable" message is sent if a neighbour
-  cannot be reached because there is no VC to it in the kernel's
-  ATMARP table. This may cause problems when ATMARP table entries are
-  briefly removed during revalidation. If you say Y here, packets to
-  such neighbours are silently discarded instead.
-
-CONFIG_ATM_LANE
-  LAN Emulation emulates services of existing LANs across an ATM
-  network. Besides operating as a normal ATM end station client, Linux
-  LANE client can also act as an proxy client bridging packets between
-  ELAN and Ethernet segments. You need LANE if you want to try MPOA.
-
-CONFIG_ATM_MPOA
-  Multi-Protocol Over ATM allows ATM edge devices such as routers,
-  bridges and ATM attached hosts establish direct ATM VCs across
-  subnetwork boundaries. These shortcut connections bypass routers
-  enhancing overall network performance.
-
-CONFIG_ECONET
-  Econet is a fairly old and slow networking protocol mainly used by
-  Acorn computers to access file and print servers. It uses native
-  Econet network cards. AUN is an implementation of the higher level
-  parts of Econet that runs over ordinary Ethernet connections, on
-  top of the UDP packet protocol, which in turn runs on top of the
-  Internet protocol IP.
-
-  If you say Y here, you can choose with the next two options whether
-  to send Econet/AUN traffic over a UDP Ethernet connection or over
-  a native Econet network card.
-
-  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 econet.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ECONET_AUNUDP
-  Say Y here if you want to send Econet/AUN traffic over a UDP
-  connection (UDP is a packet based protocol that runs on top of the
-  Internet protocol IP) using an ordinary Ethernet network card.
-
-CONFIG_ECONET_NATIVE
-  Say Y here if you have a native Econet network card installed in
-  your computer.
-
-CONFIG_WAN_ROUTER
-  Wide Area Networks (WANs), such as X.25, frame relay and leased
-  lines, are used to interconnect Local Area Networks (LANs) over vast
-  distances with data transfer rates significantly higher than those
-  achievable with commonly used asynchronous modem connections.
-  Usually, a quite expensive external device called a `WAN router' is
-  needed to connect to a WAN.
-
-  As an alternative, WAN routing can be built into the Linux kernel.
-  With relatively inexpensive WAN interface cards available on the
-  market, a perfectly usable router can be built for less than half
-  the price of an external router.  If you have one of those cards and
-  wish to use your Linux box as a WAN router, say Y here and also to
-  the WAN driver for your card, below.  You will then need the
-  wan-tools package which is available from <ftp://ftp.sangoma.com/>.
-  Read <file:Documentation/networking/wan-router.txt> for more
-  information.
-
-  The WAN routing support is also available as a module called
-  wanrouter.o ( = code which can be inserted in and removed from the
-  running kernel whenever you want).  If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-  If unsure, say N.
-
-CONFIG_NET_FASTROUTE
-  Saying Y here enables direct NIC-to-NIC (NIC = Network Interface
-  Card) data transfers on the local network, which is fast.
-
-  IMPORTANT NOTE: This option is NOT COMPATIBLE with "Network packet
-  filtering" (CONFIG_NETFILTER). Say N here if you say Y there.
-
-  However, it will work with all options in the "Advanced router"
-  section (except for "Use TOS value as routing key" and
-  "Use FWMARK value as routing key").
-
-  At the moment, few devices support fast switching (tulip is one of
-  them, a modified 8390 driver can be found at
-  <ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz>).
-
-  If unsure, say N.
-
-CONFIG_NET_HW_FLOWCONTROL
-  This option enables NIC (Network Interface Card) hardware throttling
-  during periods of extremal congestion. At the moment only a couple
-  of device drivers support it (really only one -- tulip, a modified
-  8390 driver can be found at
-  <ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz>).
-
-  Really, this option is applicable to any machine attached to a fast
-  enough network, and even a 10 Mb NIC is able to kill a not very slow
-  box, such as a 120MHz Pentium.
-
-  However, do not say Y here if you did not experience any serious
-  problems.
-
-CONFIG_NET_SCHED
-  When the kernel has several packets to send out over a network
-  device, it has to decide which ones to send first, which ones to
-  delay, and which ones to drop. This is the job of the packet
-  scheduler, and several different algorithms for how to do this
-  "fairly" have been proposed.
-
-  If you say N here, you will get the standard packet scheduler, which
-  is a FIFO (first come, first served). If you say Y here, you will be
-  able to choose from among several alternative algorithms which can
-  then be attached to different network devices. This is useful for
-  example if some of your network devices are real time devices that
-  need a certain minimum data flow rate, or if you need to limit the
-  maximum data flow rate for traffic which matches specified criteria.
-  This code is considered to be experimental.
-
-  To administer these schedulers, you'll need the user-level utilities
-  from the package iproute2+tc at <ftp://ftp.inr.ac.ru/ip-routing/>.
-  That package also contains some documentation; for more, check out
-  <http://snafu.freedom.org/linux2.2/iproute-notes.html>.
-
-  This Quality of Service (QoS) support will enable you to use
-  Differentiated Services (diffserv) and Resource Reservation Protocol
-  (RSVP) on your Linux router if you also say Y to "QoS support",
-  "Packet classifier API" and to some classifiers below. Documentation
-  and software is at <http://icawww1.epfl.ch/linux-diffserv/>.
-
-  If you say Y here and to "/proc file system" below, you will be able
-  to read status information about packet schedulers from the file
-  /proc/net/psched.
-
-  The available schedulers are listed in the following questions; you
-  can say Y to as many as you like. If unsure, say N now.
-
-CONFIG_NET_PROFILE
-  If you say Y here and to "/proc file system support" below, some
-  obscure and undocumented information about the network code's
-  performance will be written to /proc/net/profile. If you don't know
-  what it is about, you don't need it: say N.
-
diff -Nru a/net/Config.in b/net/Config.in
--- a/net/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,96 +0,0 @@
-#
-# Network configuration
-#
-mainmenu_option next_comment
-comment 'Networking options'
-tristate 'Packet socket' CONFIG_PACKET
-if [ "$CONFIG_PACKET" != "n" ]; then
-   bool '  Packet socket: mmapped IO' CONFIG_PACKET_MMAP
-fi
-
-tristate 'Netlink device emulation' CONFIG_NETLINK_DEV
-
-bool 'Network packet filtering (replaces ipchains)' CONFIG_NETFILTER
-if [ "$CONFIG_NETFILTER" = "y" ]; then
-   bool '  Network packet filtering debugging' CONFIG_NETFILTER_DEBUG
-fi
-bool 'Socket Filtering'  CONFIG_FILTER
-tristate 'Unix domain sockets' CONFIG_UNIX
-bool 'TCP/IP networking' CONFIG_INET
-if [ "$CONFIG_INET" = "y" ]; then
-   source net/ipv4/Config.in
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-#   IPv6 as module will cause a CRASH if you try to unload it
-      tristate '  The IPv6 protocol (EXPERIMENTAL)' CONFIG_IPV6
-      if [ "$CONFIG_IPV6" != "n" ]; then
-	 source net/ipv6/Config.in
-      fi
-   fi
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      source net/sctp/Config.in
-   fi
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool 'Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)' CONFIG_ATM
-   if [ "$CONFIG_ATM" = "y" ]; then
-      if [ "$CONFIG_INET" = "y" ]; then
-	 bool '  Classical IP over ATM (EXPERIMENTAL)' CONFIG_ATM_CLIP
-	 if [ "$CONFIG_ATM_CLIP" = "y" ]; then
-	    bool '    Do NOT send ICMP if no neighbour (EXPERIMENTAL)' CONFIG_ATM_CLIP_NO_ICMP
-	 fi
-      fi
-      tristate '  LAN Emulation (LANE) support (EXPERIMENTAL)' CONFIG_ATM_LANE
-      if [ "$CONFIG_INET" = "y" -a "$CONFIG_ATM_LANE" != "n" ]; then
-	 tristate '    Multi-Protocol Over ATM (MPOA) support (EXPERIMENTAL)' CONFIG_ATM_MPOA
-      fi
-   fi
-fi
-tristate '802.1Q VLAN Support' CONFIG_VLAN_8021Q
-
-tristate 'ANSI/IEEE 802.2 Data link layer protocol (IPX, Appletalk)' CONFIG_LLC
-if [ "$CONFIG_LLC" != "n" ]; then
-   bool '  LLC sockets interface' CONFIG_LLC_UI
-fi
-
-dep_tristate 'The IPX protocol' CONFIG_IPX $CONFIG_LLC
-if [ "$CONFIG_IPX" != "n" ]; then
-   source net/ipx/Config.in
-fi
-
-dep_tristate 'Appletalk protocol support' CONFIG_ATALK $CONFIG_LLC
-source drivers/net/appletalk/Config.in
-
-tristate 'DECnet Support' CONFIG_DECNET
-if [ "$CONFIG_DECNET" != "n" ]; then
-   source net/decnet/Config.in
-fi
-dep_tristate '802.1d Ethernet Bridging' CONFIG_BRIDGE $CONFIG_INET
-if [ "$CONFIG_BRIDGE" != "n" -a "$CONFIG_NETFILTER" != "n" ]; then
-   source net/bridge/netfilter/Config.in
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   tristate 'CCITT X.25 Packet Layer (EXPERIMENTAL)' CONFIG_X25
-   tristate 'LAPB Data Link Driver (EXPERIMENTAL)' CONFIG_LAPB
-   bool 'Frame Diverter (EXPERIMENTAL)' CONFIG_NET_DIVERT
-   if [ "$CONFIG_INET" = "y" ]; then
-      tristate 'Acorn Econet/AUN protocols (EXPERIMENTAL)' CONFIG_ECONET
-      if [ "$CONFIG_ECONET" != "n" ]; then
-	 bool '  AUN over UDP' CONFIG_ECONET_AUNUDP
-	 bool '  Native Econet' CONFIG_ECONET_NATIVE
-      fi
-   fi
-   tristate 'WAN router' CONFIG_WAN_ROUTER
-   bool 'Fast switching (read help!)' CONFIG_NET_FASTROUTE
-   bool 'Forwarding between high speed interfaces' CONFIG_NET_HW_FLOWCONTROL
-fi
-
-mainmenu_option next_comment
-comment 'QoS and/or fair queueing'
-bool 'QoS and/or fair queueing' CONFIG_NET_SCHED
-if [ "$CONFIG_NET_SCHED" = "y" ]; then
-   source net/sched/Config.in
-fi
-#bool 'Network code profiler' CONFIG_NET_PROFILE
-endmenu
-
-endmenu
diff -Nru a/net/Kconfig b/net/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,625 @@
+#
+# Network configuration
+#
+
+menu "Networking options"
+	depends on NET
+
+config PACKET
+	tristate "Packet socket"
+	---help---
+	  The Packet protocol is used by applications which communicate
+	  directly with network devices without an intermediate network
+	  protocol implemented in the kernel, e.g. tcpdump.  If you want them
+	  to work, choose Y.
+
+	  This driver is also available as a module called af_packet.o ( =
+	  code which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>; if you use modprobe
+	  or kmod, you may also want to add "alias net-pf-17 af_packet" to
+	  /etc/modules.conf.
+
+	  If unsure, say Y.
+
+config PACKET_MMAP
+	bool "Packet socket: mmapped IO"
+	depends on PACKET
+	help
+	  If you say Y here, the Packet protocol driver will use an IO
+	  mechanism that results in faster communication.
+
+	  If unsure, say N.
+
+config NETLINK_DEV
+	tristate "Netlink device emulation"
+	help
+	  This option will be removed soon. Any programs that want to use
+	  character special nodes like /dev/tap0 or /dev/route (all with major
+	  number 36) need this option, and need to be rewritten soon to use
+	  the real netlink socket.
+	  This is a backward compatibility option, choose Y for now.
+
+config NETFILTER
+	bool "Network packet filtering (replaces ipchains)"
+	---help---
+	  Netfilter is a framework for filtering and mangling network packets
+	  that pass through your Linux box.
+
+	  The most common use of packet filtering is to run your Linux box as
+	  a firewall protecting a local network from the Internet. The type of
+	  firewall provided by this kernel support is called a "packet
+	  filter", which means that it can reject individual network packets
+	  based on type, source, destination etc. The other kind of firewall,
+	  a "proxy-based" one, is more secure but more intrusive and more
+	  bothersome to set up; it inspects the network traffic much more
+	  closely, modifies it and has knowledge about the higher level
+	  protocols, which a packet filter lacks. Moreover, proxy-based
+	  firewalls often require changes to the programs running on the local
+	  clients. Proxy-based firewalls don't need support by the kernel, but
+	  they are often combined with a packet filter, which only works if
+	  you say Y here.
+
+	  You should also say Y here if you intend to use your Linux box as
+	  the gateway to the Internet for a local network of machines without
+	  globally valid IP addresses. This is called "masquerading": if one
+	  of the computers on your local network wants to send something to
+	  the outside, your box can "masquerade" as that computer, i.e. it
+	  forwards the traffic to the intended outside destination, but
+	  modifies the packets to make it look like they came from the
+	  firewall box itself. It works both ways: if the outside host
+	  replies, the Linux box will silently forward the traffic to the
+	  correct local computer. This way, the computers on your local net
+	  are completely invisible to the outside world, even though they can
+	  reach the outside and can receive replies. It is even possible to
+	  run globally visible servers from within a masqueraded local network
+	  using a mechanism called portforwarding. Masquerading is also often
+	  called NAT (Network Address Translation).
+
+	  Another use of Netfilter is in transparent proxying: if a machine on
+	  the local network tries to connect to an outside host, your Linux
+	  box can transparently forward the traffic to a local server,
+	  typically a caching proxy server.
+
+	  Various modules exist for netfilter which replace the previous
+	  masquerading (ipmasqadm), packet filtering (ipchains), transparent
+	  proxying, and portforwarding mechanisms. Please see
+	  <file:Documentation/Changes> under "iptables" for the location of
+	  these packages.
+
+	  Make sure to say N to "Fast switching" below if you intend to say Y
+	  here, as Fast switching currently bypasses netfilter.
+
+	  Chances are that you should say Y here if you compile a kernel which
+	  will run as a router and N for regular hosts. If unsure, say N.
+
+config NETFILTER_DEBUG
+	bool "Network packet filtering debugging"
+	depends on NETFILTER
+	help
+	  You can say Y here if you want to get additional messages useful in
+	  debugging the netfilter code.
+
+config FILTER
+	bool "Socket Filtering"
+	---help---
+	  The Linux Socket Filter is derived from the Berkeley Packet Filter.
+	  If you say Y here, user-space programs can attach a filter to any
+	  socket and thereby tell the kernel that it should allow or disallow
+	  certain types of data to get through the socket.  Linux Socket
+	  Filtering works on all socket types except TCP for now.  See the
+	  text file <file:Documentation/networking/filter.txt> for more
+	  information.
+
+	  You need to say Y here if you want to use PPP packet filtering
+	  (see the CONFIG_PPP_FILTER option below).
+
+	  If unsure, say N.
+
+config UNIX
+	tristate "Unix domain sockets"
+	---help---
+	  If you say Y here, you will include support for Unix domain sockets;
+	  sockets are the standard Unix mechanism for establishing and
+	  accessing network connections.  Many commonly used programs such as
+	  the X Window system and syslog use these sockets even if your
+	  machine is not connected to any network.  Unless you are working on
+	  an embedded system or something similar, you therefore definitely
+	  want to say Y here.
+
+	  However, the socket support is also available as a module ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>. The module will be
+	  called unix.o.  If you try building this as a module and you have
+	  said Y to "Kernel module loader support" above, be sure to add
+	  'alias net-pf-1 unix' to your /etc/modules.conf file. Note that
+	  several important services won't work correctly if you say M here
+	  and then neglect to load the module.
+
+	  Say Y unless you know what you are doing.
+
+config INET
+	bool "TCP/IP networking"
+	---help---
+	  These are the protocols used on the Internet and on most local
+	  Ethernets. It is highly recommended to say Y here (this will enlarge
+	  your kernel by about 144 KB), since some programs (e.g. the X window
+	  system) use TCP/IP even if your machine is not connected to any
+	  other computer. You will get the so-called loopback device which
+	  allows you to ping yourself (great fun, that!).
+
+	  For an excellent introduction to Linux networking, please read the
+	  NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  This option is also necessary if you want to use the full power of
+	  term (term is a program which gives you almost full Internet
+	  connectivity if you have a regular dial up shell account on some
+	  Internet connected Unix computer; for more information, read
+	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
+
+	  If you say Y here and also to "/proc file system support" and
+	  "Sysctl support" below, you can change various aspects of the
+	  behavior of the TCP/IP code by writing to the (virtual) files in
+	  /proc/sys/net/ipv4/*; the options are explained in the file
+	  <file:Documentation/networking/ip-sysctl.txt>.
+
+	  Short answer: say Y.
+
+source "net/ipv4/Kconfig"
+
+#   IPv6 as module will cause a CRASH if you try to unload it
+config IPV6
+	tristate "The IPv6 protocol (EXPERIMENTAL)"
+	depends on INET && EXPERIMENTAL
+	---help---
+	  This is experimental support for the next version of the Internet
+	  Protocol: IP version 6 (also called IPng "IP next generation").
+	  Features of this new protocol include: expanded address space,
+	  authentication and privacy, and seamless interoperability with the
+	  current version of IP (IP version 4). For general information about
+	  IPv6, see <http://playground.sun.com/pub/ipng/html/ipng-main.html>;
+	  for specific information about IPv6 under Linux read the HOWTO at
+	  <http://www.bieringer.de/linux/IPv6/> and the file net/ipv6/README
+	  in the kernel source.
+
+	  If you want to use IPv6, please upgrade to the newest net-tools as
+	  given in <file:Documentation/Changes>. You will still be able to do
+	  regular IPv4 networking as well.
+
+	  This protocol support 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 ipv6.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  It is safe to say N here for now.
+
+source "net/ipv6/Kconfig"
+
+source "net/sctp/Kconfig"
+
+config ATM
+	bool "Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  ATM is a high-speed networking technology for Local Area Networks
+	  and Wide Area Networks.  It uses a fixed packet size and is
+	  connection oriented, allowing for the negotiation of minimum
+	  bandwidth requirements.
+
+	  In order to participate in an ATM network, your Linux box needs an
+	  ATM networking card. If you have that, say Y here and to the driver
+	  of your ATM card below.
+
+	  Note that you need a set of user-space programs to actually make use
+	  of ATM.  See the file <file:Documentation/networking/atm.txt> for
+	  further details.
+
+config ATM_CLIP
+	bool "Classical IP over ATM (EXPERIMENTAL)"
+	depends on ATM && INET
+	help
+	  Classical IP over ATM for PVCs and SVCs, supporting InARP and
+	  ATMARP. If you want to communication with other IP hosts on your ATM
+	  network, you will typically either say Y here or to "LAN Emulation
+	  (LANE)" below.
+
+config ATM_CLIP_NO_ICMP
+	bool "Do NOT send ICMP if no neighbour (EXPERIMENTAL)"
+	depends on ATM_CLIP
+	help
+	  Normally, an "ICMP host unreachable" message is sent if a neighbour
+	  cannot be reached because there is no VC to it in the kernel's
+	  ATMARP table. This may cause problems when ATMARP table entries are
+	  briefly removed during revalidation. If you say Y here, packets to
+	  such neighbours are silently discarded instead.
+
+config ATM_LANE
+	tristate "LAN Emulation (LANE) support (EXPERIMENTAL)"
+	depends on ATM
+	help
+	  LAN Emulation emulates services of existing LANs across an ATM
+	  network. Besides operating as a normal ATM end station client, Linux
+	  LANE client can also act as an proxy client bridging packets between
+	  ELAN and Ethernet segments. You need LANE if you want to try MPOA.
+
+config ATM_MPOA
+	tristate "Multi-Protocol Over ATM (MPOA) support (EXPERIMENTAL)"
+	depends on ATM && INET && ATM_LANE!=n
+	help
+	  Multi-Protocol Over ATM allows ATM edge devices such as routers,
+	  bridges and ATM attached hosts establish direct ATM VCs across
+	  subnetwork boundaries. These shortcut connections bypass routers
+	  enhancing overall network performance.
+
+config VLAN_8021Q
+	tristate "802.1Q VLAN Support"
+
+config LLC
+	tristate "ANSI/IEEE 802.2 Data link layer protocol (IPX, Appletalk)"
+	help
+	  This is a Logical Link Layer protocol used for Appletalk, IPX and in
+	  the future by NetBEUI and by the linux-sna project. It originally
+	  came from Procom Inc. that released the code for 2.0.36 and was
+	  ported to 2.{4,5}. Select this if you want to have support for
+	  those protocols or if you want to have the sockets interface for
+	  LLC.
+	  
+
+config LLC_UI
+	bool "LLC sockets interface"
+	depends on LLC
+
+config IPX
+	tristate "The IPX protocol"
+	depends on LLC
+	---help---
+	  This is support for the Novell networking protocol, IPX, commonly
+	  used for local networks of Windows machines.  You need it if you
+	  want to access Novell NetWare file or print servers using the Linux
+	  Novell client ncpfs (available from
+	  <ftp://platan.vc.cvut.cz/pub/linux/ncpfs/>) or from
+	  within the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO,
+	  available from <http://www.linuxdoc.org/docs.html#howto>).  In order
+	  to do the former, you'll also have to say Y to "NCP file system
+	  support", below.
+
+	  IPX is similar in scope to IP, while SPX, which runs on top of IPX,
+	  is similar to TCP. There is also experimental support for SPX in
+	  Linux (see "SPX networking", below).
+
+	  To turn your Linux box into a fully featured NetWare file server and
+	  IPX router, say Y here and fetch either lwared from
+	  <ftp://ibiblio.org/pub/Linux/system/network/daemons/> or
+	  mars_nwe from <ftp://www.compu-art.de/mars_nwe/>. For more
+	  information, read the IPX-HOWTO available from
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  General information about how to connect Linux, Windows machines and
+	  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.
+
+	  The IPX driver would enlarge your kernel by about 16 KB. 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 ipx.o.  If you want to compile it as a module, say M here
+	  and read <file:Documentation/modules.txt>.  Unless you want to
+	  integrate your Linux box with a local Novell network, say N.
+
+source "net/ipx/Kconfig"
+
+config ATALK
+	tristate "Appletalk protocol support"
+	depends on LLC
+	---help---
+	  AppleTalk is the protocol that Apple computers can use to communicate
+	  on a network.  If your Linux box is connected to such a network and you
+	  wish to connect to it, say Y.  You will need to use the netatalk package
+	  so that your Linux box can act as a print and file server for Macs as
+	  well as access AppleTalk printers.  Check out
+	  <http://www.zettabyte.net/netatalk/> on the WWW for details.
+	  EtherTalk is the name used for AppleTalk over Ethernet and the
+	  cheaper and slower LocalTalk is AppleTalk over a proprietary Apple
+	  network using serial links.  EtherTalk and LocalTalk are fully
+	  supported by Linux.
+
+	  General information about how to connect Linux, Windows machines and
+	  Macs is on the WWW at <http://www.eats.com/linux_mac_win.html>.  The
+	  NET-3-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>, contains valuable
+	  information as well.
+
+	  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 is called appletalk.o.  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.  You
+	  almost certainly want to compile it as a module so you can restart
+	  your AppleTalk stack without rebooting your machine.  I hear that
+	  the GNU boycott of Apple is over, so even politically correct people
+	  are allowed to say Y here.
+
+source "drivers/net/appletalk/Kconfig"
+
+config DECNET
+	tristate "DECnet Support"
+	---help---
+	  The DECnet networking protocol was used in many products made by
+	  Digital (now Compaq).  It provides reliable stream and sequenced
+	  packet communications over which run a variety of services similar
+	  to those which run over TCP/IP.
+
+	  To find some tools to use with the kernel layer support, please
+	  look at Patrick Caulfield's web site:
+	  <http://linux.dreamtime.org/decnet/>.
+
+	  More detailed documentation is available in
+	  <file:Documentation/networking/decnet.txt>.
+
+	  Be sure to say Y to "/proc file system support" and "Sysctl support"
+	  below when using DECnet, since you will need sysctl support to aid
+	  in configuration at run time.
+
+	  The DECnet code is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want).
+	  The module is called decnet.o.
+
+source "net/decnet/Kconfig"
+
+config BRIDGE
+	tristate "802.1d Ethernet Bridging"
+	depends on INET
+	---help---
+	  If you say Y here, then your Linux box will be able to act as an
+	  Ethernet bridge, which means that the different Ethernet segments it
+	  is connected to will appear as one Ethernet to the participants.
+	  Several such bridges can work together to create even larger
+	  networks of Ethernets using the IEEE 802.1 spanning tree algorithm.
+	  As this is a standard, Linux bridges will cooperate properly with
+	  other third party bridge products.
+
+	  In order to use the Ethernet bridge, you'll need the bridge
+	  configuration tools; see <file:Documentation/networking/bridge.txt>
+	  for location. Please read the Bridge mini-HOWTO for more
+	  information.
+
+	  Note that if your box acts as a bridge, it probably contains several
+	  Ethernet devices, but the kernel is not able to recognize more than
+	  one at boot time without help; for details read the Ethernet-HOWTO,
+	  available from in <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to compile this code as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called bridge.o.
+
+	  If unsure, say N.
+
+source "net/bridge/netfilter/Kconfig"
+
+config X25
+	tristate "CCITT X.25 Packet Layer (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  X.25 is a set of standardized network protocols, similar in scope to
+	  frame relay; the one physical line from your box to the X.25 network
+	  entry point can carry several logical point-to-point connections
+	  (called "virtual circuits") to other computers connected to the X.25
+	  network. Governments, banks, and other organizations tend to use it
+	  to connect to each other or to form Wide Area Networks (WANs). Many
+	  countries have public X.25 networks. X.25 consists of two
+	  protocols: the higher level Packet Layer Protocol (PLP) (say Y here
+	  if you want that) and the lower level data link layer protocol LAPB
+	  (say Y to "LAPB Data Link Driver" below if you want that).
+
+	  You can read more about X.25 at <http://www.sangoma.com/x25.htm> and
+	  <http://www.cisco.com/univercd/data/doc/software/11_0/rpcg/cx25.htm>.
+	  Information about X.25 for Linux is contained in the files
+	  <file:Documentation/networking/x25.txt> and
+	  <file:Documentation/networking/x25-iface.txt>.
+
+	  One connects to an X.25 network either with a dedicated network card
+	  using the X.21 protocol (not yet supported by Linux) or one can do
+	  X.25 over a standard telephone line using an ordinary modem (say Y
+	  to "X.25 async driver" below) or over Ethernet using an ordinary
+	  Ethernet card and either the 802.2 LLC protocol (say Y to "802.2
+	  LLC" below) or LAPB over Ethernet (say Y to "LAPB Data Link Driver"
+	  and "LAPB over Ethernet driver" below).
+
+	  If you want to compile this driver as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you want),
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called x25.o. If unsure, say N.
+
+config LAPB
+	tristate "LAPB Data Link Driver (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  Link Access Procedure, Balanced (LAPB) is the data link layer (i.e.
+	  the lower) part of the X.25 protocol. It offers a reliable
+	  connection service to exchange data frames with one other host, and
+	  it is used to transport higher level protocols (mostly X.25 Packet
+	  Layer, the higher part of X.25, but others are possible as well).
+	  Usually, LAPB is used with specialized X.21 network cards, but Linux
+	  currently supports LAPB only over Ethernet connections. If you want
+	  to use LAPB connections over Ethernet, say Y here and to "LAPB over
+	  Ethernet driver" below. Read
+	  <file:Documentation/networking/lapb-module.txt> for technical
+	  details.
+
+	  If you want to compile this driver as a module though ( = code which
+	  can be inserted in and removed from the running kernel whenever you
+	  want), say M here and read <file:Documentation/modules.txt>.  The
+	  module will be called lapb.o.  If unsure, say N.
+
+config NET_DIVERT
+	bool "Frame Diverter (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	---help---
+	  The Frame Diverter allows you to divert packets from the
+	  network, that are not aimed at the interface receiving it (in
+	  promisc. mode). Typically, a Linux box setup as an Ethernet bridge
+	  with the Frames Diverter on, can do some *really* transparent www
+	  caching using a Squid proxy for example.
+
+	  This is very useful when you don't want to change your router's
+	  config (or if you simply don't have access to it).
+
+	  The other possible usages of diverting Ethernet Frames are
+	  numberous:
+	  - reroute smtp traffic to another interface
+	  - traffic-shape certain network streams
+	  - transparently proxy smtp connections
+	  - etc...
+
+	  For more informations, please refer to:
+	  <http://diverter.sourceforge.net/>
+	  <http://perso.wanadoo.fr/magpie/EtherDivert.html>
+
+	  If unsure, say N.
+
+config ECONET
+	tristate "Acorn Econet/AUN protocols (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && INET
+	---help---
+	  Econet is a fairly old and slow networking protocol mainly used by
+	  Acorn computers to access file and print servers. It uses native
+	  Econet network cards. AUN is an implementation of the higher level
+	  parts of Econet that runs over ordinary Ethernet connections, on
+	  top of the UDP packet protocol, which in turn runs on top of the
+	  Internet protocol IP.
+
+	  If you say Y here, you can choose with the next two options whether
+	  to send Econet/AUN traffic over a UDP Ethernet connection or over
+	  a native Econet network card.
+
+	  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 econet.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config ECONET_AUNUDP
+	bool "AUN over UDP"
+	depends on ECONET
+	help
+	  Say Y here if you want to send Econet/AUN traffic over a UDP
+	  connection (UDP is a packet based protocol that runs on top of the
+	  Internet protocol IP) using an ordinary Ethernet network card.
+
+config ECONET_NATIVE
+	bool "Native Econet"
+	depends on ECONET
+	help
+	  Say Y here if you have a native Econet network card installed in
+	  your computer.
+
+config WAN_ROUTER
+	tristate "WAN router"
+	depends on EXPERIMENTAL
+	---help---
+	  Wide Area Networks (WANs), such as X.25, frame relay and leased
+	  lines, are used to interconnect Local Area Networks (LANs) over vast
+	  distances with data transfer rates significantly higher than those
+	  achievable with commonly used asynchronous modem connections.
+	  Usually, a quite expensive external device called a `WAN router' is
+	  needed to connect to a WAN.
+
+	  As an alternative, WAN routing can be built into the Linux kernel.
+	  With relatively inexpensive WAN interface cards available on the
+	  market, a perfectly usable router can be built for less than half
+	  the price of an external router.  If you have one of those cards and
+	  wish to use your Linux box as a WAN router, say Y here and also to
+	  the WAN driver for your card, below.  You will then need the
+	  wan-tools package which is available from <ftp://ftp.sangoma.com/>.
+	  Read <file:Documentation/networking/wan-router.txt> for more
+	  information.
+
+	  The WAN routing support is also available as a module called
+	  wanrouter.o ( = code which can be inserted in and removed from the
+	  running kernel whenever you want).  If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+	  If unsure, say N.
+
+config NET_FASTROUTE
+	bool "Fast switching (read help!)"
+	depends on EXPERIMENTAL
+	---help---
+	  Saying Y here enables direct NIC-to-NIC (NIC = Network Interface
+	  Card) data transfers on the local network, which is fast.
+
+	  IMPORTANT NOTE: This option is NOT COMPATIBLE with "Network packet
+	  filtering" (CONFIG_NETFILTER). Say N here if you say Y there.
+
+	  However, it will work with all options in the "Advanced router"
+	  section (except for "Use TOS value as routing key" and
+	  "Use FWMARK value as routing key").
+
+	  At the moment, few devices support fast switching (tulip is one of
+	  them, a modified 8390 driver can be found at
+	  <ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz>).
+
+	  If unsure, say N.
+
+config NET_HW_FLOWCONTROL
+	bool "Forwarding between high speed interfaces"
+	depends on EXPERIMENTAL
+	---help---
+	  This option enables NIC (Network Interface Card) hardware throttling
+	  during periods of extremal congestion. At the moment only a couple
+	  of device drivers support it (really only one -- tulip, a modified
+	  8390 driver can be found at
+	  <ftp://ftp.inr.ac.ru/ip-routing/fastroute/fastroute-8390.tar.gz>).
+
+	  Really, this option is applicable to any machine attached to a fast
+	  enough network, and even a 10 Mb NIC is able to kill a not very slow
+	  box, such as a 120MHz Pentium.
+
+	  However, do not say Y here if you did not experience any serious
+	  problems.
+
+
+menu "QoS and/or fair queueing"
+
+config NET_SCHED
+	bool "QoS and/or fair queueing"
+	---help---
+	  When the kernel has several packets to send out over a network
+	  device, it has to decide which ones to send first, which ones to
+	  delay, and which ones to drop. This is the job of the packet
+	  scheduler, and several different algorithms for how to do this
+	  "fairly" have been proposed.
+
+	  If you say N here, you will get the standard packet scheduler, which
+	  is a FIFO (first come, first served). If you say Y here, you will be
+	  able to choose from among several alternative algorithms which can
+	  then be attached to different network devices. This is useful for
+	  example if some of your network devices are real time devices that
+	  need a certain minimum data flow rate, or if you need to limit the
+	  maximum data flow rate for traffic which matches specified criteria.
+	  This code is considered to be experimental.
+
+	  To administer these schedulers, you'll need the user-level utilities
+	  from the package iproute2+tc at <ftp://ftp.inr.ac.ru/ip-routing/>.
+	  That package also contains some documentation; for more, check out
+	  <http://snafu.freedom.org/linux2.2/iproute-notes.html>.
+
+	  This Quality of Service (QoS) support will enable you to use
+	  Differentiated Services (diffserv) and Resource Reservation Protocol
+	  (RSVP) on your Linux router if you also say Y to "QoS support",
+	  "Packet classifier API" and to some classifiers below. Documentation
+	  and software is at <http://icawww1.epfl.ch/linux-diffserv/>.
+
+	  If you say Y here and to "/proc file system" below, you will be able
+	  to read status information about packet schedulers from the file
+	  /proc/net/psched.
+
+	  The available schedulers are listed in the following questions; you
+	  can say Y to as many as you like. If unsure, say N now.
+
+source "net/sched/Kconfig"
+
+#bool 'Network code profiler' CONFIG_NET_PROFILE
+endmenu
+
+endmenu
+
diff -Nru a/net/appletalk/Makefile b/net/appletalk/Makefile
--- a/net/appletalk/Makefile	Wed Oct 30 16:44:29 2002
+++ b/net/appletalk/Makefile	Wed Oct 30 16:44:29 2002
@@ -8,7 +8,6 @@
 
 appletalk-y			:= aarp.o ddp.o atalk_proc.o
 appletalk-$(CONFIG_SYSCTL)	+= sysctl_net_atalk.o
-appletalk-objs			:= $(appletalk-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/net/ax25/Config.help b/net/ax25/Config.help
--- a/net/ax25/Config.help	Wed Oct 30 16:44:22 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,88 +0,0 @@
-CONFIG_HAMRADIO
-  If you want to connect your Linux box to an amateur radio, answer Y
-  here. You want to read <http://www.tapr.org/tapr/html/pkthome.html> and
-  the AX25-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about amateur radio.
-
-CONFIG_AX25
-  This is the protocol used for computer communication over amateur
-  radio. It is either used by itself for point-to-point links, or to
-  carry other protocols such as tcp/ip. To use it, you need a device
-  that connects your Linux box to your amateur radio. You can either
-  use a low speed TNC (a Terminal Node Controller acts as a kind of
-  modem connecting your computer's serial port to your radio's
-  microphone input and speaker output) supporting the KISS protocol or
-  one of the various SCC cards that are supported by the generic Z8530
-  or the DMA SCC driver. Another option are the Baycom modem serial
-  and parallel port hacks or the sound card modem (supported by their
-  own drivers). If you say Y here, you also have to say Y to one of
-  those drivers.
-
-  Information about where to get supporting software for Linux amateur
-  radio as well as information about how to configure an AX.25 port is
-  contained in the AX25-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. You might also want to
-  check out the file <file:Documentation/networking/ax25.txt> in the
-  kernel source. More information about digital amateur radio in
-  general is on the WWW at
-  <http://www.tapr.org/tapr/html/pkthome.html>.
-
-  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 ax25.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_AX25_DAMA_SLAVE
-  DAMA is a mechanism to prevent collisions when doing AX.25
-  networking. A DAMA server (called "master") accepts incoming traffic
-  from clients (called "slaves") and redistributes it to other slaves.
-  If you say Y here, your Linux box will act as a DAMA slave; this is
-  transparent in that you don't have to do any special DAMA
-  configuration. (Linux cannot yet act as a DAMA server.) If unsure,
-  say N.
-
-CONFIG_AX25_DAMA_MASTER
-  DAMA is a mechanism to prevent collisions when doing AX.25
-  networking. A DAMA server (called "master") accepts incoming traffic
-  from clients (called "slaves") and redistributes it to other
-  slaves. If you say Y here, your Linux box will act as a DAMA server.
-  If unsure, say N.
-
-CONFIG_NETROM
-  NET/ROM is a network layer protocol on top of AX.25 useful for
-  routing.
-
-  A comprehensive listing of all the software for Linux amateur radio
-  users as well as information about how to configure an AX.25 port is
-  contained in the AX25-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. You also might want to
-  check out the file <file:Documentation/networking/ax25.txt>. More
-  information about digital amateur radio in general is on the WWW at
-  <http://www.tapr.org/tapr/html/pkthome.html>.
-
-  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 netrom.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_ROSE
-  The Packet Layer Protocol (PLP) is a way to route packets over X.25
-  connections in general and amateur radio AX.25 connections in
-  particular, essentially an alternative to NET/ROM.
-
-  A comprehensive listing of all the software for Linux amateur radio
-  users as well as information about how to configure an AX.25 port is
-  contained in the AX25-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>.  You also might want to
-  check out the file <file:Documentation/networking/ax25.txt>. More
-  information about digital amateur radio in general is on the WWW at
-  <http://www.tapr.org/tapr/html/pkthome.html>.
-
-  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 rose.o. If you want to compile it as a
-  module, say M here and read <file:Documentation/modules.txt>.
-
diff -Nru a/net/ax25/Config.in b/net/ax25/Config.in
--- a/net/ax25/Config.in	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,36 +0,0 @@
-#
-# Amateur Radio protocols and AX.25 device configuration
-#
-# 19971130	Now in an own category to make correct compilation of the
-#		AX.25 stuff easier...
-#		Joerg Reuter DL1BKE <jreuter@yaina.de>
-# 19980129	Moved to net/ax25/Config.in, sourcing device drivers.
-
-mainmenu_option next_comment
-comment 'Amateur Radio support'
-bool 'Amateur Radio support' CONFIG_HAMRADIO
-
-if [ "$CONFIG_HAMRADIO" != "n" ]; then
-   if [ "$CONFIG_NET" != "n" ]; then
-      comment 'Packet Radio protocols'
-      tristate '  Amateur Radio AX.25 Level 2 protocol' CONFIG_AX25
-      if [ "$CONFIG_AX25" != "n" ]; then
-	 bool '    AX.25 DAMA Slave support' CONFIG_AX25_DAMA_SLAVE
-#	 bool '    AX.25 DAMA Master support' CONFIG_AX25_DAMA_MASTER
-	 dep_tristate '    Amateur Radio NET/ROM protocol' CONFIG_NETROM $CONFIG_AX25
-	 dep_tristate '    Amateur Radio X.25 PLP (Rose)' CONFIG_ROSE $CONFIG_AX25
-      fi
-
-      if [ "$CONFIG_AX25" != "n" ]; then
-	 mainmenu_option next_comment
-	 comment 'AX.25 network device drivers'
-
-	 source drivers/net/hamradio/Config.in
-
-	 endmenu
-      fi
-   fi
-
-fi
-
-endmenu
diff -Nru a/net/ax25/Kconfig b/net/ax25/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ax25/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,119 @@
+#
+# Amateur Radio protocols and AX.25 device configuration
+#
+# 19971130	Now in an own category to make correct compilation of the
+#		AX.25 stuff easier...
+#		Joerg Reuter DL1BKE <jreuter@yaina.de>
+# 19980129	Moved to net/ax25/Config.in, sourcing device drivers.
+
+menu "Amateur Radio support"
+
+config HAMRADIO
+	bool "Amateur Radio support"
+	help
+	  If you want to connect your Linux box to an amateur radio, answer Y
+	  here. You want to read <http://www.tapr.org/tapr/html/pkthome.html> and
+	  the AX25-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about amateur radio.
+
+comment "Packet Radio protocols"
+	depends on HAMRADIO && NET
+
+config AX25
+	tristate "Amateur Radio AX.25 Level 2 protocol"
+	depends on HAMRADIO && NET
+	---help---
+	  This is the protocol used for computer communication over amateur
+	  radio. It is either used by itself for point-to-point links, or to
+	  carry other protocols such as tcp/ip. To use it, you need a device
+	  that connects your Linux box to your amateur radio. You can either
+	  use a low speed TNC (a Terminal Node Controller acts as a kind of
+	  modem connecting your computer's serial port to your radio's
+	  microphone input and speaker output) supporting the KISS protocol or
+	  one of the various SCC cards that are supported by the generic Z8530
+	  or the DMA SCC driver. Another option are the Baycom modem serial
+	  and parallel port hacks or the sound card modem (supported by their
+	  own drivers). If you say Y here, you also have to say Y to one of
+	  those drivers.
+
+	  Information about where to get supporting software for Linux amateur
+	  radio as well as information about how to configure an AX.25 port is
+	  contained in the AX25-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. You might also want to
+	  check out the file <file:Documentation/networking/ax25.txt> in the
+	  kernel source. More information about digital amateur radio in
+	  general is on the WWW at
+	  <http://www.tapr.org/tapr/html/pkthome.html>.
+
+	  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 ax25.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config AX25_DAMA_SLAVE
+	bool "AX.25 DAMA Slave support"
+	depends on AX25
+	help
+	  DAMA is a mechanism to prevent collisions when doing AX.25
+	  networking. A DAMA server (called "master") accepts incoming traffic
+	  from clients (called "slaves") and redistributes it to other slaves.
+	  If you say Y here, your Linux box will act as a DAMA slave; this is
+	  transparent in that you don't have to do any special DAMA
+	  configuration. (Linux cannot yet act as a DAMA server.) If unsure,
+	  say N.
+
+#	 bool '    AX.25 DAMA Master support' CONFIG_AX25_DAMA_MASTER
+config NETROM
+	tristate "Amateur Radio NET/ROM protocol"
+	depends on AX25
+	---help---
+	  NET/ROM is a network layer protocol on top of AX.25 useful for
+	  routing.
+
+	  A comprehensive listing of all the software for Linux amateur radio
+	  users as well as information about how to configure an AX.25 port is
+	  contained in the AX25-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>. You also might want to
+	  check out the file <file:Documentation/networking/ax25.txt>. More
+	  information about digital amateur radio in general is on the WWW at
+	  <http://www.tapr.org/tapr/html/pkthome.html>.
+
+	  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 netrom.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+config ROSE
+	tristate "Amateur Radio X.25 PLP (Rose)"
+	depends on AX25
+	---help---
+	  The Packet Layer Protocol (PLP) is a way to route packets over X.25
+	  connections in general and amateur radio AX.25 connections in
+	  particular, essentially an alternative to NET/ROM.
+
+	  A comprehensive listing of all the software for Linux amateur radio
+	  users as well as information about how to configure an AX.25 port is
+	  contained in the AX25-HOWTO, available from
+	  <http://www.linuxdoc.org/docs.html#howto>.  You also might want to
+	  check out the file <file:Documentation/networking/ax25.txt>. More
+	  information about digital amateur radio in general is on the WWW at
+	  <http://www.tapr.org/tapr/html/pkthome.html>.
+
+	  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 rose.o. If you want to compile it as a
+	  module, say M here and read <file:Documentation/modules.txt>.
+
+
+menu "AX.25 network device drivers"
+	depends on HAMRADIO && NET && AX25!=n
+
+source "drivers/net/hamradio/Kconfig"
+
+endmenu
+
+endmenu
+
diff -Nru a/net/ax25/Makefile b/net/ax25/Makefile
--- a/net/ax25/Makefile	Wed Oct 30 16:44:19 2002
+++ b/net/ax25/Makefile	Wed Oct 30 16:44:19 2002
@@ -11,7 +11,6 @@
 	    ax25_subr.o ax25_timer.o ax25_uid.o af_ax25.o
 ax25-$(CONFIG_AX25_DAMA_SLAVE) += ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o
 ax25-$(CONFIG_SYSCTL) += sysctl_net_ax25.o
-ax25-objs := $(ax25-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/net/bluetooth/Config.help b/net/bluetooth/Config.help
--- a/net/bluetooth/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,43 +0,0 @@
-Bluetooth subsystem support
-CONFIG_BT
-  Bluetooth is low-cost, low-power, short-range wireless technology.
-  It was designed as a replacement for cables and other short-range
-  technologies like IrDA.  Bluetooth operates in personal area range
-  that typically extends up to 10 meters.  More information about
-  Bluetooth can be found at <http://www.bluetooth.com/>.
-
-  Linux Bluetooth subsystem consist of several layers:
-               Bluetooth Core (HCI device and connection manager, scheduler)
-               HCI Device drivers (interface to the hardware)
-               L2CAP Module (L2CAP protocol)
-               SCO Module (SCO links)
-               RFCOMM Module (RFCOMM protocol)  
-               BNEP Module (BNEP protocol)
-
-  Say Y here to enable Linux Bluetooth support and to build Bluetooth Core
-  layer.
-
-  To use Linux Bluetooth subsystem, you will need several user-space
-  utilities like hciconfig and hcid.  These utilities and updates to
-  Bluetooth kernel modules are provided in the BlueZ packages.
-  For more information, see <http://bluez.sourceforge.net/>.
-
-  If you want to compile Bluetooth Core as module (bluetooth.o) say M here.
-
-L2CAP protocol support
-CONFIG_BT_L2CAP
-  L2CAP (Logical Link Control and Adaptation Protocol) provides
-  connection oriented and connection-less data transport.  L2CAP
-  support is required for most Bluetooth applications.
-
-  Say Y here to compile L2CAP support into the kernel or say M to
-  compile it as module (l2cap.o).
-
-SCO links support
-CONFIG_BT_SCO
-  SCO link provides voice transport over Bluetooth. SCO support is
-  required for voice applications like Headset and Audio.
-
-  Say Y here to compile SCO support into the kernel or say M to
-  compile it as module (sco.o).
-
diff -Nru a/net/bluetooth/Config.in b/net/bluetooth/Config.in
--- a/net/bluetooth/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-#
-# Bluetooth subsystem configuration
-#
-
-if [ "$CONFIG_NET" != "n" ]; then
-
-   mainmenu_option next_comment
-   comment 'Bluetooth support'
-   dep_tristate 'Bluetooth subsystem support' CONFIG_BT $CONFIG_NET
-
-   if [ "$CONFIG_BT" != "n" ]; then
-      dep_tristate 'L2CAP protocol support' CONFIG_BT_L2CAP $CONFIG_BT
-      dep_tristate 'SCO links support' CONFIG_BT_SCO $CONFIG_BT
-      source net/bluetooth/rfcomm/Config.in
-      source net/bluetooth/bnep/Config.in
-      source drivers/bluetooth/Config.in
-   fi
-
-   endmenu
-fi
-
diff -Nru a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/bluetooth/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,63 @@
+#
+# Bluetooth subsystem configuration
+#
+
+menu "Bluetooth support"
+	depends on NET
+
+config BT
+	tristate "Bluetooth subsystem support"
+	---help---
+	  Bluetooth is low-cost, low-power, short-range wireless technology.
+	  It was designed as a replacement for cables and other short-range
+	  technologies like IrDA.  Bluetooth operates in personal area range
+	  that typically extends up to 10 meters.  More information about
+	  Bluetooth can be found at <http://www.bluetooth.com/>.
+
+	  Linux Bluetooth subsystem consist of several layers:
+	  Bluetooth Core (HCI device and connection manager, scheduler)
+	  HCI Device drivers (interface to the hardware)
+	  L2CAP Module (L2CAP protocol)
+	  SCO Module (SCO links)
+	  RFCOMM Module (RFCOMM protocol)  
+	  BNEP Module (BNEP protocol)
+
+	  Say Y here to enable Linux Bluetooth support and to build Bluetooth Core
+	  layer.
+
+	  To use Linux Bluetooth subsystem, you will need several user-space
+	  utilities like hciconfig and hcid.  These utilities and updates to
+	  Bluetooth kernel modules are provided in the BlueZ packages.
+	  For more information, see <http://bluez.sourceforge.net/>.
+
+	  If you want to compile Bluetooth Core as module (bluetooth.o) say M here.
+
+config BT_L2CAP
+	tristate "L2CAP protocol support"
+	depends on BT
+	help
+	  L2CAP (Logical Link Control and Adaptation Protocol) provides
+	  connection oriented and connection-less data transport.  L2CAP
+	  support is required for most Bluetooth applications.
+
+	  Say Y here to compile L2CAP support into the kernel or say M to
+	  compile it as module (l2cap.o).
+
+config BT_SCO
+	tristate "SCO links support"
+	depends on BT
+	help
+	  SCO link provides voice transport over Bluetooth. SCO support is
+	  required for voice applications like Headset and Audio.
+
+	  Say Y here to compile SCO support into the kernel or say M to
+	  compile it as module (sco.o).
+
+source "net/bluetooth/rfcomm/Kconfig"
+
+source "net/bluetooth/bnep/Kconfig"
+
+source "drivers/bluetooth/Kconfig"
+
+endmenu
+
diff -Nru a/net/bluetooth/bnep/Config.help b/net/bluetooth/bnep/Config.help
--- a/net/bluetooth/bnep/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,21 +0,0 @@
-BNEP protocol support
-CONFIG_BT_BNEP
-  BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
-  emulation layer on top of Bluetooth. BNEP is required for Bluetooth
-  PAN (Personal Area Network).
-
-  To use BNEP, you will need user-space utilities provided in the 
-  BlueZ-PAN package.
-  For more information, see <http://bluez.sourceforge.net>.
-
-  Say Y here to compile BNEP support into the kernel or say M to
-  compile it as module (bnep.o).
-
-BNEP multicast filter support
-CONFIG_BT_BNEP_MC_FILTER
-  This option enables the multicast filter support for BNEP.
-
-BNEP protocol filter support
-CONFIG_BT_BNEP_PROTO_FILTER
-  This option enables the protocol filter support for BNEP.
-
diff -Nru a/net/bluetooth/bnep/Config.in b/net/bluetooth/bnep/Config.in
--- a/net/bluetooth/bnep/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-
-dep_tristate 'BNEP protocol support' CONFIG_BT_BNEP $CONFIG_BT_L2CAP
-
-if [ "$CONFIG_BT_BNEP" != "n" ]; then
-   bool '  Multicast filter support' CONFIG_BT_BNEP_MC_FILTER
-   bool '  Protocol filter support'  CONFIG_BT_BNEP_PROTO_FILTER
-fi
-
diff -Nru a/net/bluetooth/bnep/Kconfig b/net/bluetooth/bnep/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/bluetooth/bnep/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,27 @@
+config BT_BNEP
+	tristate "BNEP protocol support"
+	depends on BT_L2CAP
+	---help---
+	  BNEP (Bluetooth Network Encapsulation Protocol) is Ethernet
+	  emulation layer on top of Bluetooth. BNEP is required for Bluetooth
+	  PAN (Personal Area Network).
+
+	  To use BNEP, you will need user-space utilities provided in the 
+	  BlueZ-PAN package.
+	  For more information, see <http://bluez.sourceforge.net>.
+
+	  Say Y here to compile BNEP support into the kernel or say M to
+	  compile it as module (bnep.o).
+
+config BT_BNEP_MC_FILTER
+	bool "Multicast filter support"
+	depends on BT_BNEP
+	help
+	  This option enables the multicast filter support for BNEP.
+
+config BT_BNEP_PROTO_FILTER
+	bool "Protocol filter support"
+	depends on BT_BNEP
+	help
+	  This option enables the protocol filter support for BNEP.
+
diff -Nru a/net/bluetooth/rfcomm/Config.help b/net/bluetooth/rfcomm/Config.help
--- a/net/bluetooth/rfcomm/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-RFCOMM protocol support
-CONFIG_BT_RFCOMM
-  RFCOMM provides connection oriented stream transport. RFCOMM
-  support is required for Dialup Networking, OBEX and other Bluetooth
-  applications.
-
-  Say Y here to compile RFCOMM support into the kernel or say M to
-  compile it as module (rfcomm.o).
-
-RFCOMM TTY emulation support
-CONFIG_BT_RFCOMM_TTY
-  This option enables TTY emulation support for RFCOMM channels.
diff -Nru a/net/bluetooth/rfcomm/Config.in b/net/bluetooth/rfcomm/Config.in
--- a/net/bluetooth/rfcomm/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-
-dep_tristate 'RFCOMM protocol support' CONFIG_BT_RFCOMM $CONFIG_BT_L2CAP
-
-if [ "$CONFIG_BT_RFCOMM" != "n" ]; then
-   bool '  RFCOMM TTY support' CONFIG_BT_RFCOMM_TTY
-fi
-
diff -Nru a/net/bluetooth/rfcomm/Kconfig b/net/bluetooth/rfcomm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/bluetooth/rfcomm/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,17 @@
+config BT_RFCOMM
+	tristate "RFCOMM protocol support"
+	depends on BT_L2CAP
+	help
+	  RFCOMM provides connection oriented stream transport. RFCOMM
+	  support is required for Dialup Networking, OBEX and other Bluetooth
+	  applications.
+
+	  Say Y here to compile RFCOMM support into the kernel or say M to
+	  compile it as module (rfcomm.o).
+
+config BT_RFCOMM_TTY
+	bool "RFCOMM TTY support"
+	depends on BT_RFCOMM
+	help
+	  This option enables TTY emulation support for RFCOMM channels.
+
diff -Nru a/net/bluetooth/rfcomm/Makefile b/net/bluetooth/rfcomm/Makefile
--- a/net/bluetooth/rfcomm/Makefile	Wed Oct 30 16:44:31 2002
+++ b/net/bluetooth/rfcomm/Makefile	Wed Oct 30 16:44:31 2002
@@ -4,8 +4,7 @@
 
 obj-$(CONFIG_BT_RFCOMM) += rfcomm.o
 
-rfcomm-y				:= core.o sock.o crc.o
+rfcomm-y			:= core.o sock.o crc.o
 rfcomm-$(CONFIG_BT_RFCOMM_TTY)	+= tty.o
-rfcomm-objs				:= $(rfcomm-y)
 
 include $(TOPDIR)/Rules.make
diff -Nru a/net/bridge/Makefile b/net/bridge/Makefile
--- a/net/bridge/Makefile	Wed Oct 30 16:44:34 2002
+++ b/net/bridge/Makefile	Wed Oct 30 16:44:34 2002
@@ -9,6 +9,11 @@
 bridge-objs	:= br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \
 			br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o \
 			br_stp_if.o br_stp_timer.o
+
+ifeq ($(CONFIG_NETFILTER),y)
+bridge-objs	+= br_netfilter.o
+endif
+
 obj-$(CONFIG_BRIDGE_NF_EBTABLES) += netfilter/
 
 include $(TOPDIR)/Rules.make
diff -Nru a/net/bridge/br.c b/net/bridge/br.c
--- a/net/bridge/br.c	Wed Oct 30 16:44:24 2002
+++ b/net/bridge/br.c	Wed Oct 30 16:44:24 2002
@@ -45,6 +45,10 @@
 {
 	printk(KERN_INFO "NET4: Ethernet Bridge 008 for NET4.0\n");
 
+#ifdef CONFIG_NETFILTER
+	if (br_netfilter_init())
+		return 1;
+#endif
 	br_handle_frame_hook = br_handle_frame;
 	br_ioctl_hook = br_ioctl_deviceless_stub;
 #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
@@ -63,6 +67,9 @@
 
 static void __exit br_deinit(void)
 {
+#ifdef CONFIG_NETFILTER
+	br_netfilter_fini();
+#endif
 	unregister_netdevice_notifier(&br_device_notifier);
 	br_call_ioctl_atomic(__br_clear_ioctl_hook);
 
diff -Nru a/net/bridge/br_forward.c b/net/bridge/br_forward.c
--- a/net/bridge/br_forward.c	Wed Oct 30 16:44:27 2002
+++ b/net/bridge/br_forward.c	Wed Oct 30 16:44:27 2002
@@ -30,18 +30,23 @@
 	return 1;
 }
 
-static int __dev_queue_push_xmit(struct sk_buff *skb)
+int br_dev_queue_push_xmit(struct sk_buff *skb)
 {
+#ifdef CONFIG_NETFILTER
+	if (skb->nf_bridge)
+		memcpy(skb->data - 16, skb->nf_bridge->hh, 16);
+#endif
 	skb_push(skb, ETH_HLEN);
+
 	dev_queue_xmit(skb);
 
 	return 0;
 }
 
-static int __br_forward_finish(struct sk_buff *skb)
+int br_forward_finish(struct sk_buff *skb)
 {
 	NF_HOOK(PF_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev,
-			__dev_queue_push_xmit);
+			br_dev_queue_push_xmit);
 
 	return 0;
 }
@@ -53,7 +58,7 @@
 	skb->nf_debug = 0;
 #endif
 	NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
-			__br_forward_finish);
+			br_forward_finish);
 }
 
 static void __br_forward(struct net_bridge_port *to, struct sk_buff *skb)
@@ -64,7 +69,7 @@
 	skb->dev = to->dev;
 
 	NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev,
-			__br_forward_finish);
+			br_forward_finish);
 }
 
 /* called under bridge lock */
diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c
--- a/net/bridge/br_input.c	Wed Oct 30 16:44:26 2002
+++ b/net/bridge/br_input.c	Wed Oct 30 16:44:26 2002
@@ -49,7 +49,7 @@
 			br_pass_frame_up_finish);
 }
 
-static int br_handle_frame_finish(struct sk_buff *skb)
+int br_handle_frame_finish(struct sk_buff *skb)
 {
 	struct net_bridge *br;
 	unsigned char *dest;
diff -Nru a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/bridge/br_netfilter.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,614 @@
+/*
+ *	Handle firewalling
+ *	Linux ethernet bridge
+ *
+ *	Authors:
+ *	Lennert Buytenhek               <buytenh@gnu.org>
+ *	Bart De Schuymer		<bart.de.schuymer@pandora.be>
+ *
+ *	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.
+ *
+ *	Lennert dedicates this file to Kerstin Wurdinger.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/ip.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/if_ether.h>
+#include <linux/netfilter_bridge.h>
+#include <linux/netfilter_ipv4.h>
+#include <linux/in_route.h>
+#include <net/ip.h>
+#include <asm/uaccess.h>
+#include <asm/checksum.h>
+#include "br_private.h"
+
+
+#define skb_origaddr(skb)	 (((struct bridge_skb_cb *) \
+				 (skb->cb))->daddr.ipv4)
+#define store_orig_dstaddr(skb)	 (skb_origaddr(skb) = (skb)->nh.iph->daddr)
+#define dnat_took_place(skb)	 (skb_origaddr(skb) != (skb)->nh.iph->daddr)
+#define clear_cb(skb)		 (memset(&skb_origaddr(skb), 0, \
+				 sizeof(struct bridge_skb_cb)))
+
+#define has_bridge_parent(device)	((device)->br_port != NULL)
+#define bridge_parent(device)		(&((device)->br_port->br->dev))
+
+/* We need these fake structures to make netfilter happy --
+ * lots of places assume that skb->dst != NULL, which isn't
+ * all that unreasonable.
+ *
+ * Currently, we fill in the PMTU entry because netfilter
+ * refragmentation needs it, and the rt_flags entry because
+ * ipt_REJECT needs it.  Future netfilter modules might
+ * require us to fill additional fields.
+ */
+static struct net_device __fake_net_device = {
+	hard_header_len:	ETH_HLEN
+};
+
+static struct rtable __fake_rtable = {
+	u: {
+		dst: {
+			__refcnt:		ATOMIC_INIT(1),
+			dev:			&__fake_net_device,
+			pmtu:			1500
+		}
+	},
+
+	rt_flags:	0
+};
+
+
+/* PF_BRIDGE/PRE_ROUTING *********************************************/
+static void __br_dnat_complain(void)
+{
+	static unsigned long last_complaint = 0;
+
+	if (jiffies - last_complaint >= 5 * HZ) {
+		printk(KERN_WARNING "Performing cross-bridge DNAT requires IP "
+			"forwarding to be enabled\n");
+		last_complaint = jiffies;
+	}
+}
+
+
+/* This requires some explaining. If DNAT has taken place,
+ * we will need to fix up the destination Ethernet address,
+ * and this is a tricky process.
+ *
+ * There are two cases to consider:
+ * 1. The packet was DNAT'ed to a device in the same bridge
+ *    port group as it was received on. We can still bridge
+ *    the packet.
+ * 2. The packet was DNAT'ed to a different device, either
+ *    a non-bridged device or another bridge port group.
+ *    The packet will need to be routed.
+ *
+ * The correct way of distinguishing between these two cases is to
+ * call ip_route_input() and to look at skb->dst->dev, which is
+ * changed to the destination device if ip_route_input() succeeds.
+ *
+ * Let us first consider the case that ip_route_input() succeeds:
+ *
+ * If skb->dst->dev equals the logical bridge device the packet
+ * came in on, we can consider this bridging. We then call
+ * skb->dst->output() which will make the packet enter br_nf_local_out()
+ * not much later. In that function it is assured that the iptables
+ * FORWARD chain is traversed for the packet.
+ *
+ * Otherwise, the packet is considered to be routed and we just
+ * change the destination MAC address so that the packet will
+ * later be passed up to the IP stack to be routed.
+ *
+ * Let us now consider the case that ip_route_input() fails:
+ *
+ * After a "echo '0' > /proc/sys/net/ipv4/ip_forward" ip_route_input()
+ * will fail, while ip_route_output() will return success. The source
+ * address for ip_route_output() is set to zero, so ip_route_output()
+ * thinks we're handling a locally generated packet and won't care
+ * if IP forwarding is allowed. We send a warning message to the users's
+ * log telling her to put IP forwarding on.
+ *
+ * ip_route_input() will also fail if there is no route available.
+ * In that case we just drop the packet.
+ *
+ * --Lennert, 20020411
+ * --Bart, 20020416 (updated)
+ * --Bart, 20021007 (updated)
+ */
+
+static int br_nf_pre_routing_finish_bridge(struct sk_buff *skb)
+{
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug |= (1 << NF_BR_PRE_ROUTING) | (1 << NF_BR_FORWARD);
+#endif
+
+	if (skb->pkt_type == PACKET_OTHERHOST) {
+		skb->pkt_type = PACKET_HOST;
+		skb->nf_bridge->mask |= BRNF_PKT_TYPE;
+	}
+
+	skb->dev = bridge_parent(skb->dev);
+	skb->dst->output(skb);
+	return 0;
+}
+
+static int br_nf_pre_routing_finish(struct sk_buff *skb)
+{
+	struct net_device *dev = skb->dev;
+	struct iphdr *iph = skb->nh.iph;
+	struct nf_bridge_info *nf_bridge = skb->nf_bridge;
+
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug ^= (1 << NF_BR_PRE_ROUTING);
+#endif
+
+	if (nf_bridge->mask & BRNF_PKT_TYPE) {
+		skb->pkt_type = PACKET_OTHERHOST;
+		nf_bridge->mask ^= BRNF_PKT_TYPE;
+	}
+
+	if (dnat_took_place(skb)) {
+		if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos,
+		    dev)) {
+			struct rtable *rt;
+
+			if (!ip_route_output(&rt, iph->daddr, 0, iph->tos, 0)) {
+				/* Bridged-and-DNAT'ed traffic doesn't
+				 * require ip_forwarding.
+				 */
+				if (((struct dst_entry *)rt)->dev == dev) {
+					skb->dst = (struct dst_entry *)rt;
+					goto bridged_dnat;
+				}
+				__br_dnat_complain();
+				dst_release((struct dst_entry *)rt);
+			}
+			kfree_skb(skb);
+			return 0;
+		} else {
+			if (skb->dst->dev == dev) {
+bridged_dnat:
+				/* Tell br_nf_local_out this is a
+				 * bridged frame
+				 */
+				nf_bridge->mask |= BRNF_BRIDGED_DNAT;
+				skb->dev = nf_bridge->physindev;
+				clear_cb(skb);
+				NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING,
+					       skb, skb->dev, NULL,
+					       br_nf_pre_routing_finish_bridge,
+					       1);
+				return 0;
+			}
+			memcpy(skb->mac.ethernet->h_dest, dev->dev_addr,
+			       ETH_ALEN);
+		}
+	} else {
+		skb->dst = (struct dst_entry *)&__fake_rtable;
+		dst_hold(skb->dst);
+	}
+
+	clear_cb(skb);
+	skb->dev = nf_bridge->physindev;
+	NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL,
+		       br_handle_frame_finish, 1);
+
+	return 0;
+}
+
+/* Replicate the checks that IPv4 does on packet reception.
+ * Set skb->dev to the bridge device (i.e. parent of the
+ * receiving device) to make netfilter happy, the REDIRECT
+ * target in particular.  Save the original destination IP
+ * address to be able to detect DNAT afterwards.
+ */
+static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+	struct iphdr *iph;
+	__u32 len;
+	struct sk_buff *skb;
+	struct nf_bridge_info *nf_bridge;
+
+	if ((*pskb)->protocol != __constant_htons(ETH_P_IP))
+		return NF_ACCEPT;
+
+	if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL)
+		goto out;
+
+	if (!pskb_may_pull(skb, sizeof(struct iphdr)))
+		goto inhdr_error;
+
+	iph = skb->nh.iph;
+	if (iph->ihl < 5 || iph->version != 4)
+		goto inhdr_error;
+
+	if (!pskb_may_pull(skb, 4*iph->ihl))
+		goto inhdr_error;
+
+	iph = skb->nh.iph;
+	if (ip_fast_csum((__u8 *)iph, iph->ihl) != 0)
+		goto inhdr_error;
+
+	len = ntohs(iph->tot_len);
+	if (skb->len < len || len < 4*iph->ihl)
+		goto inhdr_error;
+
+	if (skb->len > len) {
+		__pskb_trim(skb, len);
+		if (skb->ip_summed == CHECKSUM_HW)
+			skb->ip_summed = CHECKSUM_NONE;
+	}
+
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug ^= (1 << NF_IP_PRE_ROUTING);
+#endif
+ 	if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
+		return NF_DROP;
+
+	if (skb->pkt_type == PACKET_OTHERHOST) {
+		skb->pkt_type = PACKET_HOST;
+		nf_bridge->mask |= BRNF_PKT_TYPE;
+	}
+
+	nf_bridge->physindev = skb->dev;
+	skb->dev = bridge_parent(skb->dev);
+	store_orig_dstaddr(skb);
+
+	NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL,
+		br_nf_pre_routing_finish);
+
+	return NF_STOLEN;
+
+inhdr_error:
+//	IP_INC_STATS_BH(IpInHdrErrors);
+out:
+	return NF_DROP;
+}
+
+
+/* PF_BRIDGE/LOCAL_IN ************************************************/
+/* The packet is locally destined, which requires a real
+ * dst_entry, so detach the fake one.  On the way up, the
+ * packet would pass through PRE_ROUTING again (which already
+ * took place when the packet entered the bridge), but we
+ * register an IPv4 PRE_ROUTING 'sabotage' hook that will
+ * prevent this from happening.
+ */
+static unsigned int br_nf_local_in(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+	struct sk_buff *skb = *pskb;
+
+	if (skb->protocol != __constant_htons(ETH_P_IP))
+		return NF_ACCEPT;
+
+	if (skb->dst == (struct dst_entry *)&__fake_rtable) {
+		dst_release(skb->dst);
+		skb->dst = NULL;
+	}
+
+	return NF_ACCEPT;
+}
+
+
+/* PF_BRIDGE/FORWARD *************************************************/
+static int br_nf_forward_finish(struct sk_buff *skb)
+{
+	struct nf_bridge_info *nf_bridge = skb->nf_bridge;
+
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug ^= (1 << NF_BR_FORWARD);
+#endif
+
+	if (nf_bridge->mask & BRNF_PKT_TYPE) {
+		skb->pkt_type = PACKET_OTHERHOST;
+		nf_bridge->mask ^= BRNF_PKT_TYPE;
+	}
+
+	NF_HOOK_THRESH(PF_BRIDGE, NF_BR_FORWARD, skb, nf_bridge->physindev,
+			skb->dev, br_forward_finish, 1);
+
+	return 0;
+}
+
+/* This is the 'purely bridged' case.  We pass the packet to
+ * netfilter with indev and outdev set to the bridge device,
+ * but we are still able to filter on the 'real' indev/outdev
+ * because another bit of the bridge-nf patch overloads the
+ * '-i' and '-o' iptables interface checks to take
+ * skb->phys{in,out}dev into account as well (so both the real
+ * device and the bridge device will match).
+ */
+static unsigned int br_nf_forward(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+	struct sk_buff *skb = *pskb;
+	struct nf_bridge_info *nf_bridge;
+
+	if (skb->protocol != __constant_htons(ETH_P_IP))
+		return NF_ACCEPT;
+
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug ^= (1 << NF_BR_FORWARD);
+#endif
+
+	nf_bridge = skb->nf_bridge;
+	if (skb->pkt_type == PACKET_OTHERHOST) {
+		skb->pkt_type = PACKET_HOST;
+		nf_bridge->mask |= BRNF_PKT_TYPE;
+	}
+
+	nf_bridge->physoutdev = skb->dev;
+
+	NF_HOOK(PF_INET, NF_IP_FORWARD, skb, bridge_parent(nf_bridge->physindev),
+			bridge_parent(skb->dev), br_nf_forward_finish);
+
+	return NF_STOLEN;
+}
+
+
+/* PF_BRIDGE/LOCAL_OUT ***********************************************/
+static int br_nf_local_out_finish(struct sk_buff *skb)
+{
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug &= ~(1 << NF_BR_LOCAL_OUT);
+#endif
+
+	NF_HOOK_THRESH(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
+			br_forward_finish, NF_BR_PRI_FIRST + 1);
+
+	return 0;
+}
+
+
+/* This function sees both locally originated IP packets and forwarded
+ * IP packets (in both cases the destination device is a bridge
+ * device). It also sees bridged-and-DNAT'ed packets.
+ * For the sake of interface transparency (i.e. properly
+ * overloading the '-o' option), we steal packets destined to
+ * a bridge device away from the PF_INET/FORWARD and PF_INET/OUTPUT hook
+ * functions, and give them back later, when we have determined the real
+ * output device. This is done in here.
+ *
+ * If (nf_bridge->mask & BRNF_BRIDGED_DNAT) then the packet is bridged
+ * and we fake the PF_BRIDGE/FORWARD hook. The function br_nf_forward()
+ * will then fake the PF_INET/FORWARD hook. br_nf_local_out() has priority
+ * NF_BR_PRI_FIRST, so no relevant PF_BRIDGE/INPUT functions have been nor
+ * will be executed.
+ * Otherwise, if nf_bridge->physindev is NULL, the bridge-nf code never touched
+ * this packet before, and so the packet was locally originated. We fake
+ * the PF_INET/LOCAL_OUT hook.
+ * Finally, if nf_bridge->physindev isn't NULL, then the packet was IP routed,
+ * so we fake the PF_INET/FORWARD hook. ipv4_sabotage_out() makes sure
+ * even routed packets that didn't arrive on a bridge interface have their
+ * nf_bridge->physindev set.
+ */
+
+static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*_okfn)(struct sk_buff *))
+{
+	int (*okfn)(struct sk_buff *skb);
+	struct net_device *realindev;
+	struct sk_buff *skb = *pskb;
+	struct nf_bridge_info *nf_bridge;
+
+	if (skb->protocol != __constant_htons(ETH_P_IP))
+		return NF_ACCEPT;
+
+	/* Sometimes we get packets with NULL ->dst here (for example,
+	 * running a dhcp client daemon triggers this).
+	 */
+	if (skb->dst == NULL)
+		return NF_ACCEPT;
+
+	nf_bridge = skb->nf_bridge;
+	nf_bridge->physoutdev = skb->dev;
+
+	realindev = nf_bridge->physindev;
+
+	/* Bridged, take PF_BRIDGE/FORWARD.
+	 * (see big note in front of br_nf_pre_routing_finish)
+	 */
+	if (nf_bridge->mask & BRNF_BRIDGED_DNAT) {
+		okfn = br_forward_finish;
+
+		if (nf_bridge->mask & BRNF_PKT_TYPE) {
+			skb->pkt_type = PACKET_OTHERHOST;
+			nf_bridge->mask ^= BRNF_PKT_TYPE;
+		}
+
+		NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, realindev,
+			skb->dev, okfn);
+	} else {
+		okfn = br_nf_local_out_finish;
+		/* IP forwarded traffic has a physindev, locally
+		 * generated traffic hasn't.
+		 */
+		if (realindev != NULL) {
+			if (((nf_bridge->mask & BRNF_DONT_TAKE_PARENT) == 0) &&
+			    has_bridge_parent(realindev))
+				realindev = bridge_parent(realindev);
+
+			NF_HOOK_THRESH(PF_INET, NF_IP_FORWARD, skb, realindev,
+				       bridge_parent(skb->dev), okfn,
+				       NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD + 1);
+		} else {
+#ifdef CONFIG_NETFILTER_DEBUG
+			skb->nf_debug ^= (1 << NF_IP_LOCAL_OUT);
+#endif
+
+			NF_HOOK_THRESH(PF_INET, NF_IP_LOCAL_OUT, skb, realindev,
+				       bridge_parent(skb->dev), okfn,
+				       NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT + 1);
+		}
+	}
+
+	return NF_STOLEN;
+}
+
+
+/* PF_BRIDGE/POST_ROUTING ********************************************/
+static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+	struct sk_buff *skb = *pskb;
+	struct nf_bridge_info *nf_bridge = (*pskb)->nf_bridge;
+
+	/* Be very paranoid.  */
+	if (skb->mac.raw < skb->head || skb->mac.raw + ETH_HLEN > skb->data) {
+		printk(KERN_CRIT "br_netfilter: Argh!! br_nf_post_routing: "
+				 "bad mac.raw pointer.");
+		if (skb->dev != NULL) {
+			printk("[%s]", skb->dev->name);
+			if (has_bridge_parent(skb->dev))
+				printk("[%s]", bridge_parent(skb->dev)->name);
+		}
+		printk("\n");
+		return NF_ACCEPT;
+	}
+
+	if (skb->protocol != __constant_htons(ETH_P_IP))
+		return NF_ACCEPT;
+
+	/* Sometimes we get packets with NULL ->dst here (for example,
+	 * running a dhcp client daemon triggers this).
+	 */
+	if (skb->dst == NULL)
+		return NF_ACCEPT;
+
+#ifdef CONFIG_NETFILTER_DEBUG
+	skb->nf_debug ^= (1 << NF_IP_POST_ROUTING);
+#endif
+
+	/* We assume any code from br_dev_queue_push_xmit onwards doesn't care
+	 * about the value of skb->pkt_type.
+	 */
+	if (skb->pkt_type == PACKET_OTHERHOST) {
+		skb->pkt_type = PACKET_HOST;
+		nf_bridge->mask |= BRNF_PKT_TYPE;
+	}
+
+	memcpy(nf_bridge->hh, skb->data - 16, 16);
+
+	NF_HOOK(PF_INET, NF_IP_POST_ROUTING, skb, NULL,
+		bridge_parent(skb->dev), br_dev_queue_push_xmit);
+
+	return NF_STOLEN;
+}
+
+
+/* IPv4/SABOTAGE *****************************************************/
+
+/* Don't hand locally destined packets to PF_INET/PRE_ROUTING
+ * for the second time.
+ */
+static unsigned int ipv4_sabotage_in(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+	if (in->hard_start_xmit == br_dev_xmit &&
+	    okfn != br_nf_pre_routing_finish) {
+		okfn(*pskb);
+		return NF_STOLEN;
+	}
+
+	return NF_ACCEPT;
+}
+
+/* Postpone execution of PF_INET/FORWARD, PF_INET/LOCAL_OUT
+ * and PF_INET/POST_ROUTING until we have done the forwarding
+ * decision in the bridge code and have determined skb->physoutdev.
+ */
+static unsigned int ipv4_sabotage_out(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+	if (out->hard_start_xmit == br_dev_xmit &&
+	    okfn != br_nf_forward_finish &&
+	    okfn != br_nf_local_out_finish &&
+	    okfn != br_dev_queue_push_xmit) {
+		struct sk_buff *skb = *pskb;
+		struct nf_bridge_info *nf_bridge;
+
+		if (!skb->nf_bridge && !nf_bridge_alloc(skb))
+			return NF_DROP;
+
+		nf_bridge = skb->nf_bridge;
+
+		/* This frame will arrive on PF_BRIDGE/LOCAL_OUT and we
+		 * will need the indev then. For a brouter, the real indev
+		 * can be a bridge port, so we make sure br_nf_local_out()
+		 * doesn't use the bridge parent of the indev by using
+		 * the BRNF_DONT_TAKE_PARENT mask.
+		 */
+		if (hook == NF_IP_FORWARD && nf_bridge->physindev == NULL) {
+			nf_bridge->mask &= BRNF_DONT_TAKE_PARENT;
+			nf_bridge->physindev = (struct net_device *)in;
+		}
+		okfn(skb);
+		return NF_STOLEN;
+	}
+
+	return NF_ACCEPT;
+}
+
+/* For br_nf_local_out we need (prio = NF_BR_PRI_FIRST), to insure that innocent
+ * PF_BRIDGE/NF_BR_LOCAL_OUT functions don't get bridged traffic as input.
+ * For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
+ * ip_refrag() can return NF_STOLEN.
+ */
+static struct nf_hook_ops br_nf_ops[] = {
+	{ { NULL, NULL }, br_nf_pre_routing, PF_BRIDGE, NF_BR_PRE_ROUTING, NF_BR_PRI_BRNF },
+	{ { NULL, NULL }, br_nf_local_in, PF_BRIDGE, NF_BR_LOCAL_IN, NF_BR_PRI_BRNF },
+	{ { NULL, NULL }, br_nf_forward, PF_BRIDGE, NF_BR_FORWARD, NF_BR_PRI_BRNF },
+	{ { NULL, NULL }, br_nf_local_out, PF_BRIDGE, NF_BR_LOCAL_OUT, NF_BR_PRI_FIRST },
+	{ { NULL, NULL }, br_nf_post_routing, PF_BRIDGE, NF_BR_POST_ROUTING, NF_BR_PRI_LAST },
+	{ { NULL, NULL }, ipv4_sabotage_in, PF_INET, NF_IP_PRE_ROUTING, NF_IP_PRI_FIRST },
+	{ { NULL, NULL }, ipv4_sabotage_out, PF_INET, NF_IP_FORWARD, NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD },
+	{ { NULL, NULL }, ipv4_sabotage_out, PF_INET, NF_IP_LOCAL_OUT, NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT },
+	{ { NULL, NULL }, ipv4_sabotage_out, PF_INET, NF_IP_POST_ROUTING, NF_IP_PRI_FIRST }
+};
+
+#define NUMHOOKS (sizeof(br_nf_ops)/sizeof(br_nf_ops[0]))
+
+int br_netfilter_init(void)
+{
+	int i;
+
+	for (i = 0; i < NUMHOOKS; i++) {
+		int ret;
+
+		if ((ret = nf_register_hook(&br_nf_ops[i])) >= 0)
+			continue;
+
+		while (i--)
+			nf_unregister_hook(&br_nf_ops[i]);
+
+		return ret;
+	}
+
+	printk(KERN_NOTICE "Bridge firewalling registered\n");
+
+	return 0;
+}
+
+void br_netfilter_fini(void)
+{
+	int i;
+
+	for (i = NUMHOOKS - 1; i >= 0; i--)
+		nf_unregister_hook(&br_nf_ops[i]);
+}
diff -Nru a/net/bridge/br_private.h b/net/bridge/br_private.h
--- a/net/bridge/br_private.h	Wed Oct 30 16:44:25 2002
+++ b/net/bridge/br_private.h	Wed Oct 30 16:44:25 2002
@@ -144,8 +144,10 @@
 /* br_forward.c */
 extern void br_deliver(struct net_bridge_port *to,
 		struct sk_buff *skb);
+extern int br_dev_queue_push_xmit(struct sk_buff *skb);
 extern void br_forward(struct net_bridge_port *to,
 		struct sk_buff *skb);
+extern int br_forward_finish(struct sk_buff *skb);
 extern void br_flood_deliver(struct net_bridge *br,
 		      struct sk_buff *skb,
 		      int clone);
@@ -166,6 +168,7 @@
 			   int *ifindices);
 
 /* br_input.c */
+extern int br_handle_frame_finish(struct sk_buff *skb);
 extern int br_handle_frame(struct sk_buff *skb);
 
 /* br_ioctl.c */
@@ -176,6 +179,10 @@
 	     unsigned long arg1,
 	     unsigned long arg2);
 extern int br_ioctl_deviceless_stub(unsigned long arg);
+
+/* br_netfilter.c */
+extern int br_netfilter_init(void);
+extern void br_netfilter_fini(void);
 
 /* br_stp.c */
 extern int br_is_root_bridge(struct net_bridge *br);
diff -Nru a/net/bridge/netfilter/Config.help b/net/bridge/netfilter/Config.help
--- a/net/bridge/netfilter/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,105 +0,0 @@
-CONFIG_BRIDGE_EBT
-  ebtables is an extendable frame filtering system for the Linux
-  Ethernet bridge. Its usage and implementation is very similar to that
-  of iptables.
-  The difference is that ebtables works on the Link Layer, while iptables
-  works on the Network Layer. ebtables can filter all frames that come
-  into contact with a logical bridge device.
-  Apart from filtering, ebtables also allows MAC source and destination
-  alterations (we call it MAC SNAT and MAC DNAT) and also provides
-  functionality for making Linux a brouter.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_T_FILTER
-  The ebtables filter table is used to define frame filtering rules at
-  local input, forwarding and local output. See the man page for
-  ebtables(8).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_T_NAT
-  The ebtables nat table is used to define rules that alter the MAC
-  source address (MAC SNAT) or the MAC destination address (MAC DNAT).
-  See the man page for ebtables(8).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_BROUTE
-  The ebtables broute table is used to define rules that decide between
-  bridging and routing frames, giving Linux the functionality of a
-  brouter. See the man page for ebtables(8) and examples on the ebtables
-  website.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_LOG
-  This option adds the log target, that you can use in any rule in
-  any ebtables table. It records the frame header to the syslog.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_IPF
-  This option adds the IP match, which allows basic IP header field
-  filtering.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_ARPF
-  This option adds the ARP match, which allows ARP and RARP header field
-  filtering.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_VLANF
-  This option adds the 802.1Q vlan match, which allows the filtering of
-  802.1Q vlan fields.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_MARKF
-  This option adds the mark match, which allows matching frames based on
-  the 'nfmark' value in the frame. This can be set by the mark target.
-  This value is the same as the one used in the iptables mark match and
-  target.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_SNAT
-  This option adds the MAC SNAT target, which allows altering the MAC
-  source address of frames.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_DNAT
-  This option adds the MAC DNAT target, which allows altering the MAC
-  destination address of frames.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_REDIRECT
-  This option adds the MAC redirect target, which allows altering the MAC
-  destination address of a frame to that of the device it arrived on.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_BRIDGE_EBT_MARK_T
-  This option adds the mark target, which allows marking frames by
-  setting the 'nfmark' value in the frame.
-  This value is the same as the one used in the iptables mark match and
-  target.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
diff -Nru a/net/bridge/netfilter/Config.in b/net/bridge/netfilter/Config.in
--- a/net/bridge/netfilter/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,17 +0,0 @@
-#
-# Bridge netfilter configuration
-#
-dep_tristate '  Bridge: ebtables' CONFIG_BRIDGE_NF_EBTABLES $CONFIG_BRIDGE
-dep_tristate '    ebt: filter table support' CONFIG_BRIDGE_EBT_T_FILTER $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: nat table support' CONFIG_BRIDGE_EBT_T_NAT $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: broute table support' CONFIG_BRIDGE_EBT_BROUTE $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: log support' CONFIG_BRIDGE_EBT_LOG $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: IP filter support' CONFIG_BRIDGE_EBT_IPF $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: ARP filter support' CONFIG_BRIDGE_EBT_ARPF $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: 802.1Q VLAN filter support (EXPERIMENTAL)' CONFIG_BRIDGE_EBT_VLANF $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: mark filter support' CONFIG_BRIDGE_EBT_MARKF $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: snat target support' CONFIG_BRIDGE_EBT_SNAT $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: dnat target support' CONFIG_BRIDGE_EBT_DNAT $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: redirect target support' CONFIG_BRIDGE_EBT_REDIRECT $CONFIG_BRIDGE_NF_EBTABLES
-dep_tristate '    ebt: mark target support' CONFIG_BRIDGE_EBT_MARK_T $CONFIG_BRIDGE_NF_EBTABLES
-
diff -Nru a/net/bridge/netfilter/Kconfig b/net/bridge/netfilter/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/bridge/netfilter/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,135 @@
+#
+# Bridge netfilter configuration
+#
+config BRIDGE_NF_EBTABLES
+	tristate "Bridge: ebtables"
+	depends on NETFILTER && BRIDGE
+
+config BRIDGE_EBT_T_FILTER
+	tristate "ebt: filter table support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  The ebtables filter table is used to define frame filtering rules at
+	  local input, forwarding and local output. See the man page for
+	  ebtables(8).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_T_NAT
+	tristate "ebt: nat table support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  The ebtables nat table is used to define rules that alter the MAC
+	  source address (MAC SNAT) or the MAC destination address (MAC DNAT).
+	  See the man page for ebtables(8).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_BROUTE
+	tristate "ebt: broute table support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  The ebtables broute table is used to define rules that decide between
+	  bridging and routing frames, giving Linux the functionality of a
+	  brouter. See the man page for ebtables(8) and examples on the ebtables
+	  website.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_LOG
+	tristate "ebt: log support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the log target, that you can use in any rule in
+	  any ebtables table. It records the frame header to the syslog.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_IPF
+	tristate "ebt: IP filter support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the IP match, which allows basic IP header field
+	  filtering.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_ARPF
+	tristate "ebt: ARP filter support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the ARP match, which allows ARP and RARP header field
+	  filtering.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_VLANF
+	tristate "ebt: 802.1Q VLAN filter support (EXPERIMENTAL)"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the 802.1Q vlan match, which allows the filtering of
+	  802.1Q vlan fields.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_MARKF
+	tristate "ebt: mark filter support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the mark match, which allows matching frames based on
+	  the 'nfmark' value in the frame. This can be set by the mark target.
+	  This value is the same as the one used in the iptables mark match and
+	  target.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_SNAT
+	tristate "ebt: snat target support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the MAC SNAT target, which allows altering the MAC
+	  source address of frames.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_DNAT
+	tristate "ebt: dnat target support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the MAC DNAT target, which allows altering the MAC
+	  destination address of frames.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_REDIRECT
+	tristate "ebt: redirect target support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the MAC redirect target, which allows altering the MAC
+	  destination address of a frame to that of the device it arrived on.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config BRIDGE_EBT_MARK_T
+	tristate "ebt: mark target support"
+	depends on BRIDGE_NF_EBTABLES
+	help
+	  This option adds the mark target, which allows marking frames by
+	  setting the 'nfmark' value in the frame.
+	  This value is the same as the one used in the iptables mark match and
+	  target.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
diff -Nru a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
--- a/net/bridge/netfilter/ebt_ip.c	Wed Oct 30 16:44:28 2002
+++ b/net/bridge/netfilter/ebt_ip.c	Wed Oct 30 16:44:28 2002
@@ -6,13 +6,28 @@
  *
  *  April, 2002
  *
+ *  Changes:
+ *    added ip-sport and ip-dport
+ *    Innominate Security Technologies AG <mhopf@innominate.com>
+ *    September, 2002
  */
 
 #include <linux/netfilter_bridge/ebtables.h>
 #include <linux/netfilter_bridge/ebt_ip.h>
 #include <linux/ip.h>
+#include <linux/in.h>
 #include <linux/module.h>
 
+struct tcpudphdr {
+	uint16_t src;
+	uint16_t dst;
+};
+
+union h_u {
+	unsigned char *raw;
+	struct tcpudphdr *tuh;
+};
+
 static int ebt_filter_ip(const struct sk_buff *skb, const struct net_device *in,
    const struct net_device *out, const void *data,
    unsigned int datalen)
@@ -22,9 +37,31 @@
 	if (info->bitmask & EBT_IP_TOS &&
 	   FWINV(info->tos != ((*skb).nh.iph)->tos, EBT_IP_TOS))
 		return EBT_NOMATCH;
-	if (info->bitmask & EBT_IP_PROTO && FWINV(info->protocol !=
-	   ((*skb).nh.iph)->protocol, EBT_IP_PROTO))
-		return EBT_NOMATCH;
+	if (info->bitmask & EBT_IP_PROTO) {
+		if (FWINV(info->protocol != ((*skb).nh.iph)->protocol,
+		          EBT_IP_PROTO))
+			return EBT_NOMATCH;
+		if ( info->protocol == IPPROTO_TCP ||
+		     info->protocol == IPPROTO_UDP )
+		{
+			union h_u h;
+			h.raw = skb->data + skb->nh.iph->ihl*4;
+			if (info->bitmask & EBT_IP_DPORT) {
+				uint16_t port = ntohs(h.tuh->dst);
+				if (FWINV(port < info->dport[0] ||
+				          port > info->dport[1],
+				          EBT_IP_DPORT))
+				return EBT_NOMATCH;
+			}
+			if (info->bitmask & EBT_IP_SPORT) {
+				uint16_t port = ntohs(h.tuh->src);
+				if (FWINV(port < info->sport[0] ||
+				          port > info->sport[1],
+				          EBT_IP_SPORT))
+				return EBT_NOMATCH;
+			}
+		}
+	}
 	if (info->bitmask & EBT_IP_SOURCE &&
 	   FWINV((((*skb).nh.iph)->saddr & info->smsk) !=
 	   info->saddr, EBT_IP_SOURCE))
@@ -47,6 +84,17 @@
 	   e->invflags & EBT_IPROTO)
 		return -EINVAL;
 	if (info->bitmask & ~EBT_IP_MASK || info->invflags & ~EBT_IP_MASK)
+		return -EINVAL;
+	if (info->bitmask & (EBT_IP_DPORT | EBT_IP_SPORT)) {
+		if (!info->bitmask & EBT_IPROTO)
+			return -EINVAL;
+		if (info->protocol != IPPROTO_TCP &&
+		    info->protocol != IPPROTO_UDP)
+			 return -EINVAL;
+	}
+	if (info->bitmask & EBT_IP_DPORT && info->dport[0] > info->dport[1])
+		return -EINVAL;
+	if (info->bitmask & EBT_IP_SPORT && info->sport[0] > info->sport[1])
 		return -EINVAL;
 	return 0;
 }
diff -Nru a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
--- a/net/bridge/netfilter/ebtables.c	Wed Oct 30 16:44:27 2002
+++ b/net/bridge/netfilter/ebtables.c	Wed Oct 30 16:44:27 2002
@@ -194,6 +194,7 @@
 
 		// increase counter
 		(*(counter_base + i)).pcnt++;
+		(*(counter_base + i)).bcnt+=(**pskb).len;
 
 		// these should only watch: not modify, nor tell us
 		// what to do with the packet
@@ -885,8 +886,10 @@
 	// add other counters to those of cpu 0
 	for (cpu = 1; cpu < NR_CPUS; cpu++) {
 		counter_base = COUNTER_BASE(oldcounters, nentries, cpu);
-		for (i = 0; i < nentries; i++)
+		for (i = 0; i < nentries; i++) {
 			counters[i].pcnt += counter_base[i].pcnt;
+			counters[i].bcnt += counter_base[i].bcnt;
+		}
 	}
 }
 
@@ -1245,8 +1248,10 @@
 	write_lock_bh(&t->lock);
 
 	// we add to the counters of the first cpu
-	for (i = 0; i < hlp.num_counters; i++)
+	for (i = 0; i < hlp.num_counters; i++) {
 		t->private->counters[i].pcnt += tmp[i].pcnt;
+		t->private->counters[i].bcnt += tmp[i].bcnt;
+	}
 
 	write_unlock_bh(&t->lock);
 	ret = 0;
diff -Nru a/net/core/dst.c b/net/core/dst.c
--- a/net/core/dst.c	Wed Oct 30 16:44:29 2002
+++ b/net/core/dst.c	Wed Oct 30 16:44:29 2002
@@ -110,6 +110,7 @@
 	memset(dst, 0, ops->entry_size);
 	dst->ops = ops;
 	dst->lastuse = jiffies;
+	dst->path = dst;
 	dst->input = dst_discard;
 	dst->output = dst_blackhole;
 #if RT_CACHE_DEBUG >= 2 
diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c
--- a/net/core/netfilter.c	Wed Oct 30 16:44:28 2002
+++ b/net/core/netfilter.c	Wed Oct 30 16:44:28 2002
@@ -342,10 +342,15 @@
 			       const struct net_device *indev,
 			       const struct net_device *outdev,
 			       struct list_head **i,
-			       int (*okfn)(struct sk_buff *))
+			       int (*okfn)(struct sk_buff *),
+			       int hook_thresh)
 {
 	for (*i = (*i)->next; *i != head; *i = (*i)->next) {
 		struct nf_hook_ops *elem = (struct nf_hook_ops *)*i;
+
+		if (hook_thresh > elem->priority)
+			continue;
+
 		switch (elem->hook(hook, skb, indev, outdev, okfn)) {
 		case NF_QUEUE:
 			return NF_QUEUE;
@@ -413,6 +418,10 @@
 {
 	int status;
 	struct nf_info *info;
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	struct net_device *physindev = NULL;
+	struct net_device *physoutdev = NULL;
+#endif
 
 	if (!queue_handler[pf].outfn) {
 		kfree_skb(skb);
@@ -435,11 +444,24 @@
 	if (indev) dev_hold(indev);
 	if (outdev) dev_hold(outdev);
 
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	if (skb->nf_bridge) {
+		physindev = skb->nf_bridge->physindev;
+		if (physindev) dev_hold(physindev);
+		physoutdev = skb->nf_bridge->physoutdev;
+		if (physoutdev) dev_hold(physoutdev);
+	}
+#endif
+
 	status = queue_handler[pf].outfn(skb, info, queue_handler[pf].data);
 	if (status < 0) {
 		/* James M doesn't say fuck enough. */
 		if (indev) dev_put(indev);
 		if (outdev) dev_put(outdev);
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+		if (physindev) dev_put(physindev);
+		if (physoutdev) dev_put(physoutdev);
+#endif
 		kfree(info);
 		kfree_skb(skb);
 		return;
@@ -449,7 +471,8 @@
 int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
 		 struct net_device *indev,
 		 struct net_device *outdev,
-		 int (*okfn)(struct sk_buff *))
+		 int (*okfn)(struct sk_buff *),
+		 int hook_thresh)
 {
 	struct list_head *elem;
 	unsigned int verdict;
@@ -481,7 +504,7 @@
 
 	elem = &nf_hooks[pf][hook];
 	verdict = nf_iterate(&nf_hooks[pf][hook], &skb, hook, indev,
-			     outdev, &elem, okfn);
+			     outdev, &elem, okfn, hook_thresh);
 	if (verdict == NF_QUEUE) {
 		NFDEBUG("nf_hook: Verdict = QUEUE.\n");
 		nf_queue(skb, elem, pf, hook, indev, outdev, okfn);
@@ -530,7 +553,7 @@
 		verdict = nf_iterate(&nf_hooks[info->pf][info->hook],
 				     &skb, info->hook, 
 				     info->indev, info->outdev, &elem,
-				     info->okfn);
+				     info->okfn, INT_MIN);
 	}
 
 	switch (verdict) {
diff -Nru a/net/core/rtnetlink.c b/net/core/rtnetlink.c
--- a/net/core/rtnetlink.c	Wed Oct 30 16:44:37 2002
+++ b/net/core/rtnetlink.c	Wed Oct 30 16:44:37 2002
@@ -128,7 +128,7 @@
 	return err;
 }
 
-int rtnetlink_put_metrics(struct sk_buff *skb, unsigned *metrics)
+int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
 {
 	struct rtattr *mx = (struct rtattr*)skb->tail;
 	int i;
@@ -136,7 +136,7 @@
 	RTA_PUT(skb, RTA_METRICS, 0, NULL);
 	for (i=0; i<RTAX_MAX; i++) {
 		if (metrics[i])
-			RTA_PUT(skb, i+1, sizeof(unsigned), metrics+i);
+			RTA_PUT(skb, i+1, sizeof(u32), metrics+i);
 	}
 	mx->rta_len = skb->tail - (u8*)mx;
 	if (mx->rta_len == RTA_LENGTH(0))
@@ -523,6 +523,7 @@
 	rtnl = netlink_kernel_create(NETLINK_ROUTE, rtnetlink_rcv);
 	if (rtnl == NULL)
 		panic("rtnetlink_init: cannot initialize rtnetlink\n");
+	netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV);
 	register_netdevice_notifier(&rtnetlink_dev_notifier);
 	rtnetlink_links[PF_UNSPEC] = link_rtnetlink_table;
 	rtnetlink_links[PF_PACKET] = link_rtnetlink_table;
diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c
--- a/net/core/skbuff.c	Wed Oct 30 16:44:24 2002
+++ b/net/core/skbuff.c	Wed Oct 30 16:44:24 2002
@@ -58,6 +58,7 @@
 #include <net/dst.h>
 #include <net/sock.h>
 #include <net/checksum.h>
+#include <net/xfrm.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
@@ -235,6 +236,7 @@
 	skb->stamp.tv_sec = 0;	/* No idea about time */
 	skb->dev	  = NULL;
 	skb->dst	  = NULL;
+	skb->sp		  = NULL;
 	memset(skb->cb, 0, sizeof(skb->cb));
 	skb->pkt_type	  = PACKET_HOST;	/* Default type */
 	skb->ip_summed	  = 0;
@@ -248,6 +250,9 @@
 #ifdef CONFIG_NETFILTER_DEBUG
 	skb->nf_debug	  = 0;
 #endif
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	skb->nf_bridge	  = NULL;
+#endif
 #endif
 #ifdef CONFIG_NET_SCHED
 	skb->tc_index	  = 0;
@@ -319,6 +324,7 @@
 	}
 
 	dst_release(skb->dst);
+	secpath_put(skb->sp);
 	if(skb->destructor) {
 		if (in_irq())
 			printk(KERN_WARNING "Warning: kfree_skb on "
@@ -327,6 +333,9 @@
 	}
 #ifdef CONFIG_NETFILTER
 	nf_conntrack_put(skb->nfct);
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	nf_bridge_put(skb->nf_bridge);
+#endif
 #endif
 	skb_headerinit(skb, NULL, 0);  /* clean state */
 	kfree_skbmem(skb);
@@ -368,6 +377,8 @@
 	C(mac);
 	C(dst);
 	dst_clone(n->dst);
+	C(sp);
+	secpath_get(n->sp);
 	memcpy(n->cb, skb->cb, sizeof(skb->cb));
 	C(len);
 	C(data_len);
@@ -392,6 +403,9 @@
 #ifdef CONFIG_NETFILTER_DEBUG
 	C(nf_debug);
 #endif
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	C(nf_bridge);
+#endif
 #endif /*CONFIG_NETFILTER*/
 #if defined(CONFIG_HIPPI)
 	C(private);
@@ -404,6 +418,9 @@
 	skb->cloned = 1;
 #ifdef CONFIG_NETFILTER
 	nf_conntrack_get(skb->nfct);
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	nf_bridge_get(skb->nf_bridge);
+#endif
 #endif
 	return n;
 }
@@ -421,6 +438,7 @@
 	new->priority	= old->priority;
 	new->protocol	= old->protocol;
 	new->dst	= dst_clone(old->dst);
+	new->sp		= secpath_get(old->sp);
 	new->h.raw	= old->h.raw + offset;
 	new->nh.raw	= old->nh.raw + offset;
 	new->mac.raw	= old->mac.raw + offset;
@@ -437,6 +455,10 @@
 	nf_conntrack_get(new->nfct);
 #ifdef CONFIG_NETFILTER_DEBUG
 	new->nf_debug	= old->nf_debug;
+#endif
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	new->nf_bridge	= old->nf_bridge;
+	nf_bridge_get(new->nf_bridge);
 #endif
 #endif
 #ifdef CONFIG_NET_SCHED
diff -Nru a/net/decnet/Config.help b/net/decnet/Config.help
--- a/net/decnet/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,25 +0,0 @@
-CONFIG_DECNET_SIOCGIFCONF
-  This option should only be turned on if you are really sure that
-  you know what you are doing. It can break other applications which
-  use this system call and the proper way to get the information
-  provided by this call is to use rtnetlink.
-
-  If unsure, say N.
-
-CONFIG_DECNET_ROUTER
-  Add support for turning your DECnet Endnode into a level 1 or 2
-  router.  This is an unfinished option for developers only.  If you
-  do say Y here, then make sure that you also say Y to "Kernel/User
-  network link driver", "Routing messages" and "Network packet
-  filtering".  The first two are required to allow configuration via
-  rtnetlink (currently you need Alexey Kuznetsov's iproute2 package
-  from <ftp://ftp.inr.ac.ru/>). The "Network packet filtering" option
-  will be required for the forthcoming routing daemon to work.
-
-  See <file:Documentation/networking/decnet.txt> for more information.
-
-CONFIG_DECNET_ROUTE_FWMARK
-  If you say Y here, you will be able to specify different routes for
-  packets with different FWMARK ("firewalling mark") values
-  (see ipchains(8), "-m" argument).
-
diff -Nru a/net/decnet/Config.in b/net/decnet/Config.in
--- a/net/decnet/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-#
-# DECnet configuration
-#
-bool '  DECnet: SIOCGIFCONF support' CONFIG_DECNET_SIOCGIFCONF 
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool '  DECnet: router support (EXPERIMENTAL)' CONFIG_DECNET_ROUTER
-   if [ "$CONFIG_DECNET_ROUTER"  = "y" ]; then
-      if [ "$CONFIG_NETFILTER" = "y" ]; then
-         bool '    DECnet: use FWMARK value as routing key (EXPERIMENTAL)' CONFIG_DECNET_ROUTE_FWMARK
-      fi
-   fi
-fi
diff -Nru a/net/decnet/Kconfig b/net/decnet/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/decnet/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,37 @@
+#
+# DECnet configuration
+#
+config DECNET_SIOCGIFCONF
+	bool "DECnet: SIOCGIFCONF support"
+	depends on DECNET
+	help
+	  This option should only be turned on if you are really sure that
+	  you know what you are doing. It can break other applications which
+	  use this system call and the proper way to get the information
+	  provided by this call is to use rtnetlink.
+
+	  If unsure, say N.
+
+config DECNET_ROUTER
+	bool "DECnet: router support (EXPERIMENTAL)"
+	depends on DECNET && EXPERIMENTAL
+	---help---
+	  Add support for turning your DECnet Endnode into a level 1 or 2
+	  router.  This is an unfinished option for developers only.  If you
+	  do say Y here, then make sure that you also say Y to "Kernel/User
+	  network link driver", "Routing messages" and "Network packet
+	  filtering".  The first two are required to allow configuration via
+	  rtnetlink (currently you need Alexey Kuznetsov's iproute2 package
+	  from <ftp://ftp.inr.ac.ru/>). The "Network packet filtering" option
+	  will be required for the forthcoming routing daemon to work.
+
+	  See <file:Documentation/networking/decnet.txt> for more information.
+
+config DECNET_ROUTE_FWMARK
+	bool "DECnet: use FWMARK value as routing key (EXPERIMENTAL)"
+	depends on DECNET_ROUTER && NETFILTER
+	help
+	  If you say Y here, you will be able to specify different routes for
+	  packets with different FWMARK ("firewalling mark") values
+	  (see ipchains(8), "-m" argument).
+
diff -Nru a/net/decnet/Makefile b/net/decnet/Makefile
--- a/net/decnet/Makefile	Wed Oct 30 16:44:26 2002
+++ b/net/decnet/Makefile	Wed Oct 30 16:44:26 2002
@@ -5,7 +5,6 @@
 decnet-$(CONFIG_DECNET_ROUTER) += dn_fib.o dn_rules.o dn_table.o
 decnet-$(CONFIG_DECNET_FW) += dn_fw.o
 decnet-y += sysctl_net_decnet.o
-decnet-objs := $(decnet-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/net/decnet/dn_route.c b/net/decnet/dn_route.c
--- a/net/decnet/dn_route.c	Wed Oct 30 16:44:34 2002
+++ b/net/decnet/dn_route.c	Wed Oct 30 16:44:34 2002
@@ -100,7 +100,6 @@
 
 static int dn_dst_gc(void);
 static struct dst_entry *dn_dst_check(struct dst_entry *, __u32);
-static struct dst_entry *dn_dst_reroute(struct dst_entry *, struct sk_buff *skb);
 static struct dst_entry *dn_dst_negative_advice(struct dst_entry *);
 static void dn_dst_link_failure(struct sk_buff *);
 static int dn_route_input(struct sk_buff *);
@@ -119,7 +118,6 @@
 	.gc_thresh =		128,
 	.gc =			dn_dst_gc,
 	.check =		dn_dst_check,
-	.reroute =		dn_dst_reroute,
 	.negative_advice =	dn_dst_negative_advice,
 	.link_failure =		dn_dst_link_failure,
 	.entry_size =		sizeof(struct dn_route),
@@ -202,12 +200,6 @@
 	return NULL;
 }
 
-static struct dst_entry *dn_dst_reroute(struct dst_entry *dst,
-					struct sk_buff *skb)
-{
-	return NULL;
-}
-
 /*
  * This is called through sendmsg() when you specify MSG_TRYHARD
  * and there is already a route in cache.
@@ -1066,10 +1058,12 @@
 	RTA_PUT(skb, RTA_SRC, 2, &rt->rt_saddr);
 	if (rt->u.dst.dev)
 		RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->u.dst.dev->ifindex);
-	if (rt->u.dst.window)
-		RTA_PUT(skb, RTAX_WINDOW, sizeof(unsigned), &rt->u.dst.window);
-	if (rt->u.dst.rtt)
-		RTA_PUT(skb, RTAX_RTT, sizeof(unsigned), &rt->u.dst.rtt);
+	if (dst_metric(&rt->u.dst, RTAX_WINDOW))
+		RTA_PUT(skb, RTAX_WINDOW, sizeof(unsigned),
+			&rt->u.dst.metrics[RTAX_WINDOW - 1]);
+	if (dst_metric(&rt->u.dst, RTAX_RTT))
+		RTA_PUT(skb, RTAX_RTT, sizeof(unsigned),
+			&rt->u.dst.metrics[RTAX_RTT]);
 
 	nlh->nlmsg_len = skb->tail - b;
 	return skb->len;
@@ -1225,7 +1219,7 @@
 					dn_addr2asc(dn_ntohs(rt->rt_saddr), buf2),
 					atomic_read(&rt->u.dst.__refcnt),
 					rt->u.dst.__use,
-					(int)rt->u.dst.rtt
+					(int) dst_metric(&rt->u.dst, RTAX_RTT)
 					);
 
 
diff -Nru a/net/ipv4/Config.help b/net/ipv4/Config.help
--- a/net/ipv4/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,279 +0,0 @@
-CONFIG_INET_ECN
-  Explicit Congestion Notification (ECN) allows routers to notify
-  clients about network congestion, resulting in fewer dropped packets
-  and increased network performance.  This option adds ECN support to
-  the Linux kernel, as well as a sysctl (/proc/sys/net/ipv4/tcp_ecn)
-  which allows ECN support to be disabled at runtime.
-
-  Note that, on the Internet, there are many broken firewalls which
-  refuse connections from ECN-enabled machines, and it may be a while
-  before these firewalls are fixed.  Until then, to access a site
-  behind such a firewall (some of which are major sites, at the time
-  of this writing) you will have to disable this option, either by
-  saying N now or by using the sysctl.
-
-  If in doubt, say N.
-
-CONFIG_SYN_COOKIES
-  Normal TCP/IP networking is open to an attack known as "SYN
-  flooding". This denial-of-service attack prevents legitimate remote
-  users from being able to connect to your computer during an ongoing
-  attack and requires very little work from the attacker, who can
-  operate from anywhere on the Internet.
-
-  SYN cookies provide protection against this type of attack. If you
-  say Y here, the TCP/IP stack will use a cryptographic challenge
-  protocol known as "SYN cookies" to enable legitimate users to
-  continue to connect, even when your machine is under attack. There
-  is no need for the legitimate users to change their TCP/IP software;
-  SYN cookies work transparently to them. For technical information
-  about SYN cookies, check out <http://cr.yp.to/syncookies.html>.
-
-  If you are SYN flooded, the source address reported by the kernel is
-  likely to have been forged by the attacker; it is only reported as
-  an aid in tracing the packets to their actual source and should not
-  be taken as absolute truth.
-
-  SYN cookies may prevent correct error reporting on clients when the
-  server is really overloaded. If this happens frequently better turn
-  them off.
-
-  If you say Y here, note that SYN cookies aren't enabled by default;
-  you can enable them by saying Y to "/proc file system support" and
-  "Sysctl support" below and executing the command
-
-    echo 1 >/proc/sys/net/ipv4/tcp_syncookies
-
-  at boot time after the /proc file system has been mounted.
-
-  If unsure, say N.
-
-CONFIG_ARPD
-  Normally, the kernel maintains an internal cache which maps IP
-  addresses to hardware addresses on the local network, so that
-  Ethernet/Token Ring/ etc. frames are sent to the proper address on
-  the physical networking layer. For small networks having a few
-  hundred directly connected hosts or less, keeping this address
-  resolution (ARP) cache inside the kernel works well. However,
-  maintaining an internal ARP cache does not work well for very large
-  switched networks, and will use a lot of kernel memory if TCP/IP
-  connections are made to many machines on the network.
-
-  If you say Y here, the kernel's internal ARP cache will never grow
-  to more than 256 entries (the oldest entries are expired in a LIFO
-  manner) and communication will be attempted with the user space ARP
-  daemon arpd. Arpd then answers the address resolution request either
-  from its own cache or by asking the net.
-
-  This code is experimental and also obsolete. If you want to use it,
-  you need to find a version of the daemon arpd on the net somewhere,
-  and you should also say Y to "Kernel/User network link driver",
-  below. If unsure, say N.
-
-CONFIG_IP_MULTICAST
-  This is code for addressing several networked computers at once,
-  enlarging your kernel by about 2 KB. You need multicasting if you
-  intend to participate in the MBONE, a high bandwidth network on top
-  of the Internet which carries audio and video broadcasts. More
-  information about the MBONE is on the WWW at
-  <http://www-itg.lbl.gov/mbone/>. Information about the multicast
-  capabilities of the various network cards is contained in
-  <file:Documentation/networking/multicast.txt>. For most people, it's
-  safe to say N.
-
-CONFIG_IP_ADVANCED_ROUTER
-  If you intend to run your Linux box mostly as a router, i.e. as a
-  computer that forwards and redistributes network packets, say Y; you
-  will then be presented with several options that allow more precise
-  control about the routing process.
-
-  The answer to this question won't directly affect the kernel:
-  answering N will just cause the configurator to skip all the
-  questions about advanced routing.
-
-  Note that your box can only act as a router if you enable IP
-  forwarding in your kernel; you can do that by saying Y to "/proc
-  file system support" and "Sysctl support" below and executing the
-  line
-
-    echo "1" > /proc/sys/net/ipv4/ip_forward
-
-  at boot time after the /proc file system has been mounted.
-
-  If you turn on IP forwarding, you will also get the rp_filter, which
-  automatically rejects incoming packets if the routing table entry
-  for their source address doesn't match the network interface they're
-  arriving on. This has security advantages because it prevents the
-  so-called IP spoofing, however it can pose problems if you use
-  asymmetric routing (packets from you to a host take a different path
-  than packets from that host to you) or if you operate a non-routing
-  host which has several IP addresses on different interfaces. To turn
-  rp_filter off use:
-
-        echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter
-  or
-        echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
-
-  If unsure, say N here.
-
-CONFIG_IP_MULTIPLE_TABLES
-  Normally, a router decides what to do with a received packet based
-  solely on the packet's final destination address. If you say Y here,
-  the Linux router will also be able to take the packet's source
-  address into account. Furthermore, if you also say Y to "Use TOS
-  value as routing key" below, the TOS (Type-Of-Service) field of the
-  packet can be used for routing decisions as well. In addition, if
-  you say Y here and to "Fast network address translation" below,
-  the router will also be able to modify source and destination
-  addresses of forwarded packets.
-
-  If you are interested in this, please see the preliminary
-  documentation at <http://www.compendium.com.ar/policy-routing.txt>
-  and <ftp://post.tepkom.ru/pub/vol2/Linux/docs/advanced-routing.tex>.
-  You will need supporting software from
-  <ftp://ftp.inr.ac.ru/ip-routing/>.
-
-  If unsure, say N.
-
-CONFIG_IP_ROUTE_MULTIPATH
-  Normally, the routing tables specify a single action to be taken in
-  a deterministic manner for a given packet. If you say Y here
-  however, it becomes possible to attach several actions to a packet
-  pattern, in effect specifying several alternative paths to travel
-  for those packets. The router considers all these paths to be of
-  equal "cost" and chooses one of them in a non-deterministic fashion
-  if a matching packet arrives.
-
-CONFIG_IP_ROUTE_TOS
-  The header of every IP packet carries a TOS (Type Of Service) value
-  with which the packet requests a certain treatment, e.g. low
-  latency (for interactive traffic), high throughput, or high
-  reliability.  If you say Y here, you will be able to specify
-  different routes for packets with different TOS values.
-
-CONFIG_IP_ROUTE_FWMARK
-  If you say Y here, you will be able to specify different routes for
-  packets with different mark values (see iptables(8), MARK target).
-
-CONFIG_IP_ROUTE_VERBOSE
-  If you say Y here, which is recommended, then the kernel will print
-  verbose messages regarding the routing, for example warnings about
-  received packets which look strange and could be evidence of an
-  attack or a misconfigured system somewhere. The information is
-  handled by the klogd daemon which is responsible for kernel messages
-  ("man klogd").
-
-CONFIG_IP_ROUTE_LARGE_TABLES
-  If you have routing zones that grow to more than about 64 entries,
-  you may want to say Y here to speed up the routing process.
-
-CONFIG_IP_ROUTE_NAT
-  If you say Y here, your router will be able to modify source and
-  destination addresses of packets that pass through it, in a manner
-  you specify.  General information about Network Address Translation
-  can be gotten from the document
-  <http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/nat.html>.
-
-CONFIG_IP_PNP
-  This enables automatic configuration of IP addresses of devices and
-  of the routing table during kernel boot, based on either information
-  supplied on the kernel command line or by BOOTP or RARP protocols.
-  You need to say Y only for diskless machines requiring network
-  access to boot (in which case you want to say Y to "Root file system
-  on NFS" as well), because all other machines configure the network
-  in their startup scripts.
-
-CONFIG_IP_PNP_BOOTP
-  If you want your Linux box to mount its whole root file system (the
-  one containing the directory /) from some other computer over the
-  net via NFS and you want the IP address of your computer to be
-  discovered automatically at boot time using the BOOTP protocol (a
-  special protocol designed for doing this job), say Y here. In case
-  the boot ROM of your network card was designed for booting Linux and
-  does BOOTP itself, providing all necessary information on the kernel
-  command line, you can say N here. If unsure, say Y. Note that if you
-  want to use BOOTP, a BOOTP server must be operating on your network.
-  Read <file:Documentation/nfsroot.txt> for details.
-
-CONFIG_IP_PNP_DHCP
-  If you want your Linux box to mount its whole root file system (the
-  one containing the directory /) from some other computer over the
-  net via NFS and you want the IP address of your computer to be
-  discovered automatically at boot time using the DHCP protocol (a
-  special protocol designed for doing this job), say Y here. In case
-  the boot ROM of your network card was designed for booting Linux and
-  does DHCP itself, providing all necessary information on the kernel
-  command line, you can say N here.
-
-  If unsure, say Y. Note that if you want to use DHCP, a DHCP server
-  must be operating on your network.  Read
-  <file:Documentation/nfsroot.txt> for details.
-
-CONFIG_IP_PNP_RARP
-  If you want your Linux box to mount its whole root file system (the
-  one containing the directory /) from some other computer over the
-  net via NFS and you want the IP address of your computer to be
-  discovered automatically at boot time using the RARP protocol (an
-  older protocol which is being obsoleted by BOOTP and DHCP), say Y
-  here. Note that if you want to use RARP, a RARP server must be
-  operating on your network. Read <file:Documentation/nfsroot.txt> for
-  details.
-
-CONFIG_NET_IPIP
-  Tunneling means encapsulating data of one protocol type within
-  another protocol and sending it over a channel that understands the
-  encapsulating protocol. This particular tunneling driver implements
-  encapsulation of IP within IP, which sounds kind of pointless, but
-  can be useful if you want to make your (or some other) machine
-  appear on a different network than it physically is, or to use
-  mobile-IP facilities (allowing laptops to seamlessly move between
-  networks without changing their IP addresses; check out
-  <http://anchor.cs.binghamton.edu/~mobileip/LJ/index.html>).
-
-  Saying Y to this option will produce two modules ( = code which can
-  be inserted in and removed from the running kernel whenever you
-  want). Most people won't need this and can say N.
-
-CONFIG_NET_IPGRE
-  Tunneling means encapsulating data of one protocol type within
-  another protocol and sending it over a channel that understands the
-  encapsulating protocol. This particular tunneling driver implements
-  GRE (Generic Routing Encapsulation) and at this time allows
-  encapsulating of IPv4 or IPv6 over existing IPv4 infrastructure.
-  This driver is useful if the other endpoint is a Cisco router: Cisco
-  likes GRE much better than the other Linux tunneling driver ("IP
-  tunneling" above). In addition, GRE allows multicast redistribution
-  through the tunnel.
-
-CONFIG_NET_IPGRE_BROADCAST
-  One application of GRE/IP is to construct a broadcast WAN (Wide Area
-  Network), which looks like a normal Ethernet LAN (Local Area
-  Network), but can be distributed all over the Internet. If you want
-  to do that, say Y here and to "IP multicast routing" below.
-
-CONFIG_IP_MROUTE
-  This is used if you want your machine to act as a router for IP
-  packets that have several destination addresses. It is needed on the
-  MBONE, a high bandwidth network on top of the Internet which carries
-  audio and video broadcasts. In order to do that, you would most
-  likely run the program mrouted. Information about the multicast
-  capabilities of the various network cards is contained in
-  <file:Documentation/networking/multicast.txt>. If you haven't heard
-  about it, you don't need it.
-
-CONFIG_IP_PIMSM_V1
-  Kernel side support for Sparse Mode PIM (Protocol Independent
-  Multicast) version 1. This multicast routing protocol is used widely
-  because Cisco supports it. You need special software to use it
-  (pimd-v1). Please see <http://netweb.usc.edu/pim/> for more
-  information about PIM.
-
-  Say Y if you want to use PIM-SM v1. Note that you can say N here if
-  you just want to use Dense Mode PIM.
-
-CONFIG_IP_PIMSM_V2
-  Kernel side support for Sparse Mode PIM version 2. In order to use
-  this, you need an experimental routing daemon supporting it (pimd or
-  gated-5). This routing protocol is not used widely, so say N unless
-  you want to play with it.
-
diff -Nru a/net/ipv4/Config.in b/net/ipv4/Config.in
--- a/net/ipv4/Config.in	Wed Oct 30 16:44:21 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,46 +0,0 @@
-#
-# IP configuration
-#
-bool '  IP: multicasting' CONFIG_IP_MULTICAST
-bool '  IP: advanced router' CONFIG_IP_ADVANCED_ROUTER
-if [ "$CONFIG_IP_ADVANCED_ROUTER" = "y" ]; then
-   bool '    IP: policy routing' CONFIG_IP_MULTIPLE_TABLES
-   if [ "$CONFIG_IP_MULTIPLE_TABLES" = "y" ]; then
-      if [ "$CONFIG_NETFILTER" = "y" ]; then
-         bool '      IP: use netfilter MARK value as routing key' CONFIG_IP_ROUTE_FWMARK
-      fi
-      bool '      IP: fast network address translation' CONFIG_IP_ROUTE_NAT
-   fi
-   bool '    IP: equal cost multipath' CONFIG_IP_ROUTE_MULTIPATH
-   bool '    IP: use TOS value as routing key' CONFIG_IP_ROUTE_TOS
-   bool '    IP: verbose route monitoring' CONFIG_IP_ROUTE_VERBOSE
-   bool '    IP: large routing tables' CONFIG_IP_ROUTE_LARGE_TABLES
-fi
-bool '  IP: kernel level autoconfiguration' CONFIG_IP_PNP
-if [ "$CONFIG_IP_PNP" = "y" ]; then
-   bool '    IP: DHCP support' CONFIG_IP_PNP_DHCP
-   bool '    IP: BOOTP support' CONFIG_IP_PNP_BOOTP
-   bool '    IP: RARP support' CONFIG_IP_PNP_RARP
-# not yet ready..
-#   bool '    IP: ARP support' CONFIG_IP_PNP_ARP		
-fi
-tristate '  IP: tunneling' CONFIG_NET_IPIP
-tristate '  IP: GRE tunnels over IP' CONFIG_NET_IPGRE
-if [ "$CONFIG_IP_MULTICAST" = "y" ]; then
-   if [ "$CONFIG_NET_IPGRE" != "n" ]; then
-      bool '    IP: broadcast GRE over IP' CONFIG_NET_IPGRE_BROADCAST
-   fi
-   bool '  IP: multicast routing' CONFIG_IP_MROUTE
-   if [ "$CONFIG_IP_MROUTE" = "y" ]; then
-      bool '    IP: PIM-SM version 1 support' CONFIG_IP_PIMSM_V1
-      bool '    IP: PIM-SM version 2 support' CONFIG_IP_PIMSM_V2
-   fi
-fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-   bool '  IP: ARP daemon support (EXPERIMENTAL)' CONFIG_ARPD
-fi
-bool '  IP: TCP Explicit Congestion Notification support' CONFIG_INET_ECN
-bool '  IP: TCP syncookie support (disabled per default)' CONFIG_SYN_COOKIES
-if [ "$CONFIG_NETFILTER" != "n" ]; then
-   source net/ipv4/netfilter/Config.in
-fi
diff -Nru a/net/ipv4/Kconfig b/net/ipv4/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,352 @@
+#
+# IP configuration
+#
+config IP_MULTICAST
+	bool "IP: multicasting"
+	depends on INET
+	help
+	  This is code for addressing several networked computers at once,
+	  enlarging your kernel by about 2 KB. You need multicasting if you
+	  intend to participate in the MBONE, a high bandwidth network on top
+	  of the Internet which carries audio and video broadcasts. More
+	  information about the MBONE is on the WWW at
+	  <http://www-itg.lbl.gov/mbone/>. Information about the multicast
+	  capabilities of the various network cards is contained in
+	  <file:Documentation/networking/multicast.txt>. For most people, it's
+	  safe to say N.
+
+config IP_ADVANCED_ROUTER
+	bool "IP: advanced router"
+	depends on INET
+	---help---
+	  If you intend to run your Linux box mostly as a router, i.e. as a
+	  computer that forwards and redistributes network packets, say Y; you
+	  will then be presented with several options that allow more precise
+	  control about the routing process.
+
+	  The answer to this question won't directly affect the kernel:
+	  answering N will just cause the configurator to skip all the
+	  questions about advanced routing.
+
+	  Note that your box can only act as a router if you enable IP
+	  forwarding in your kernel; you can do that by saying Y to "/proc
+	  file system support" and "Sysctl support" below and executing the
+	  line
+
+	  echo "1" > /proc/sys/net/ipv4/ip_forward
+
+	  at boot time after the /proc file system has been mounted.
+
+	  If you turn on IP forwarding, you will also get the rp_filter, which
+	  automatically rejects incoming packets if the routing table entry
+	  for their source address doesn't match the network interface they're
+	  arriving on. This has security advantages because it prevents the
+	  so-called IP spoofing, however it can pose problems if you use
+	  asymmetric routing (packets from you to a host take a different path
+	  than packets from that host to you) or if you operate a non-routing
+	  host which has several IP addresses on different interfaces. To turn
+	  rp_filter off use:
+
+	  echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter
+	  or
+	  echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
+
+	  If unsure, say N here.
+
+config IP_MULTIPLE_TABLES
+	bool "IP: policy routing"
+	depends on IP_ADVANCED_ROUTER
+	---help---
+	  Normally, a router decides what to do with a received packet based
+	  solely on the packet's final destination address. If you say Y here,
+	  the Linux router will also be able to take the packet's source
+	  address into account. Furthermore, if you also say Y to "Use TOS
+	  value as routing key" below, the TOS (Type-Of-Service) field of the
+	  packet can be used for routing decisions as well. In addition, if
+	  you say Y here and to "Fast network address translation" below,
+	  the router will also be able to modify source and destination
+	  addresses of forwarded packets.
+
+	  If you are interested in this, please see the preliminary
+	  documentation at <http://www.compendium.com.ar/policy-routing.txt>
+	  and <ftp://post.tepkom.ru/pub/vol2/Linux/docs/advanced-routing.tex>.
+	  You will need supporting software from
+	  <ftp://ftp.inr.ac.ru/ip-routing/>.
+
+	  If unsure, say N.
+
+config IP_ROUTE_FWMARK
+	bool "IP: use netfilter MARK value as routing key"
+	depends on IP_MULTIPLE_TABLES && NETFILTER
+	help
+	  If you say Y here, you will be able to specify different routes for
+	  packets with different mark values (see iptables(8), MARK target).
+
+config IP_ROUTE_NAT
+	bool "IP: fast network address translation"
+	depends on IP_MULTIPLE_TABLES
+	help
+	  If you say Y here, your router will be able to modify source and
+	  destination addresses of packets that pass through it, in a manner
+	  you specify.  General information about Network Address Translation
+	  can be gotten from the document
+	  <http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/nat.html>.
+
+config IP_ROUTE_MULTIPATH
+	bool "IP: equal cost multipath"
+	depends on IP_ADVANCED_ROUTER
+	help
+	  Normally, the routing tables specify a single action to be taken in
+	  a deterministic manner for a given packet. If you say Y here
+	  however, it becomes possible to attach several actions to a packet
+	  pattern, in effect specifying several alternative paths to travel
+	  for those packets. The router considers all these paths to be of
+	  equal "cost" and chooses one of them in a non-deterministic fashion
+	  if a matching packet arrives.
+
+config IP_ROUTE_TOS
+	bool "IP: use TOS value as routing key"
+	depends on IP_ADVANCED_ROUTER
+	help
+	  The header of every IP packet carries a TOS (Type Of Service) value
+	  with which the packet requests a certain treatment, e.g. low
+	  latency (for interactive traffic), high throughput, or high
+	  reliability.  If you say Y here, you will be able to specify
+	  different routes for packets with different TOS values.
+
+config IP_ROUTE_VERBOSE
+	bool "IP: verbose route monitoring"
+	depends on IP_ADVANCED_ROUTER
+	help
+	  If you say Y here, which is recommended, then the kernel will print
+	  verbose messages regarding the routing, for example warnings about
+	  received packets which look strange and could be evidence of an
+	  attack or a misconfigured system somewhere. The information is
+	  handled by the klogd daemon which is responsible for kernel messages
+	  ("man klogd").
+
+config IP_ROUTE_LARGE_TABLES
+	bool "IP: large routing tables"
+	depends on IP_ADVANCED_ROUTER
+	help
+	  If you have routing zones that grow to more than about 64 entries,
+	  you may want to say Y here to speed up the routing process.
+
+config IP_PNP
+	bool "IP: kernel level autoconfiguration"
+	depends on INET
+	help
+	  This enables automatic configuration of IP addresses of devices and
+	  of the routing table during kernel boot, based on either information
+	  supplied on the kernel command line or by BOOTP or RARP protocols.
+	  You need to say Y only for diskless machines requiring network
+	  access to boot (in which case you want to say Y to "Root file system
+	  on NFS" as well), because all other machines configure the network
+	  in their startup scripts.
+
+config IP_PNP_DHCP
+	bool "IP: DHCP support"
+	depends on IP_PNP
+	---help---
+	  If you want your Linux box to mount its whole root file system (the
+	  one containing the directory /) from some other computer over the
+	  net via NFS and you want the IP address of your computer to be
+	  discovered automatically at boot time using the DHCP protocol (a
+	  special protocol designed for doing this job), say Y here. In case
+	  the boot ROM of your network card was designed for booting Linux and
+	  does DHCP itself, providing all necessary information on the kernel
+	  command line, you can say N here.
+
+	  If unsure, say Y. Note that if you want to use DHCP, a DHCP server
+	  must be operating on your network.  Read
+	  <file:Documentation/nfsroot.txt> for details.
+
+config IP_PNP_BOOTP
+	bool "IP: BOOTP support"
+	depends on IP_PNP
+	---help---
+	  If you want your Linux box to mount its whole root file system (the
+	  one containing the directory /) from some other computer over the
+	  net via NFS and you want the IP address of your computer to be
+	  discovered automatically at boot time using the BOOTP protocol (a
+	  special protocol designed for doing this job), say Y here. In case
+	  the boot ROM of your network card was designed for booting Linux and
+	  does BOOTP itself, providing all necessary information on the kernel
+	  command line, you can say N here. If unsure, say Y. Note that if you
+	  want to use BOOTP, a BOOTP server must be operating on your network.
+	  Read <file:Documentation/nfsroot.txt> for details.
+
+config IP_PNP_RARP
+	bool "IP: RARP support"
+	depends on IP_PNP
+	help
+	  If you want your Linux box to mount its whole root file system (the
+	  one containing the directory /) from some other computer over the
+	  net via NFS and you want the IP address of your computer to be
+	  discovered automatically at boot time using the RARP protocol (an
+	  older protocol which is being obsoleted by BOOTP and DHCP), say Y
+	  here. Note that if you want to use RARP, a RARP server must be
+	  operating on your network. Read <file:Documentation/nfsroot.txt> for
+	  details.
+
+# not yet ready..
+#   bool '    IP: ARP support' CONFIG_IP_PNP_ARP		
+config NET_IPIP
+	tristate "IP: tunneling"
+	depends on INET
+	---help---
+	  Tunneling means encapsulating data of one protocol type within
+	  another protocol and sending it over a channel that understands the
+	  encapsulating protocol. This particular tunneling driver implements
+	  encapsulation of IP within IP, which sounds kind of pointless, but
+	  can be useful if you want to make your (or some other) machine
+	  appear on a different network than it physically is, or to use
+	  mobile-IP facilities (allowing laptops to seamlessly move between
+	  networks without changing their IP addresses; check out
+	  <http://anchor.cs.binghamton.edu/~mobileip/LJ/index.html>).
+
+	  Saying Y to this option will produce two modules ( = code which can
+	  be inserted in and removed from the running kernel whenever you
+	  want). Most people won't need this and can say N.
+
+config NET_IPGRE
+	tristate "IP: GRE tunnels over IP"
+	depends on INET
+	help
+	  Tunneling means encapsulating data of one protocol type within
+	  another protocol and sending it over a channel that understands the
+	  encapsulating protocol. This particular tunneling driver implements
+	  GRE (Generic Routing Encapsulation) and at this time allows
+	  encapsulating of IPv4 or IPv6 over existing IPv4 infrastructure.
+	  This driver is useful if the other endpoint is a Cisco router: Cisco
+	  likes GRE much better than the other Linux tunneling driver ("IP
+	  tunneling" above). In addition, GRE allows multicast redistribution
+	  through the tunnel.
+
+config NET_IPGRE_BROADCAST
+	bool "IP: broadcast GRE over IP"
+	depends on IP_MULTICAST && NET_IPGRE
+	help
+	  One application of GRE/IP is to construct a broadcast WAN (Wide Area
+	  Network), which looks like a normal Ethernet LAN (Local Area
+	  Network), but can be distributed all over the Internet. If you want
+	  to do that, say Y here and to "IP multicast routing" below.
+
+config IP_MROUTE
+	bool "IP: multicast routing"
+	depends on IP_MULTICAST
+	help
+	  This is used if you want your machine to act as a router for IP
+	  packets that have several destination addresses. It is needed on the
+	  MBONE, a high bandwidth network on top of the Internet which carries
+	  audio and video broadcasts. In order to do that, you would most
+	  likely run the program mrouted. Information about the multicast
+	  capabilities of the various network cards is contained in
+	  <file:Documentation/networking/multicast.txt>. If you haven't heard
+	  about it, you don't need it.
+
+config IP_PIMSM_V1
+	bool "IP: PIM-SM version 1 support"
+	depends on IP_MROUTE
+	help
+	  Kernel side support for Sparse Mode PIM (Protocol Independent
+	  Multicast) version 1. This multicast routing protocol is used widely
+	  because Cisco supports it. You need special software to use it
+	  (pimd-v1). Please see <http://netweb.usc.edu/pim/> for more
+	  information about PIM.
+
+	  Say Y if you want to use PIM-SM v1. Note that you can say N here if
+	  you just want to use Dense Mode PIM.
+
+config IP_PIMSM_V2
+	bool "IP: PIM-SM version 2 support"
+	depends on IP_MROUTE
+	help
+	  Kernel side support for Sparse Mode PIM version 2. In order to use
+	  this, you need an experimental routing daemon supporting it (pimd or
+	  gated-5). This routing protocol is not used widely, so say N unless
+	  you want to play with it.
+
+config ARPD
+	bool "IP: ARP daemon support (EXPERIMENTAL)"
+	depends on INET && EXPERIMENTAL
+	---help---
+	  Normally, the kernel maintains an internal cache which maps IP
+	  addresses to hardware addresses on the local network, so that
+	  Ethernet/Token Ring/ etc. frames are sent to the proper address on
+	  the physical networking layer. For small networks having a few
+	  hundred directly connected hosts or less, keeping this address
+	  resolution (ARP) cache inside the kernel works well. However,
+	  maintaining an internal ARP cache does not work well for very large
+	  switched networks, and will use a lot of kernel memory if TCP/IP
+	  connections are made to many machines on the network.
+
+	  If you say Y here, the kernel's internal ARP cache will never grow
+	  to more than 256 entries (the oldest entries are expired in a LIFO
+	  manner) and communication will be attempted with the user space ARP
+	  daemon arpd. Arpd then answers the address resolution request either
+	  from its own cache or by asking the net.
+
+	  This code is experimental and also obsolete. If you want to use it,
+	  you need to find a version of the daemon arpd on the net somewhere,
+	  and you should also say Y to "Kernel/User network link driver",
+	  below. If unsure, say N.
+
+config INET_ECN
+	bool "IP: TCP Explicit Congestion Notification support"
+	depends on INET
+	---help---
+	  Explicit Congestion Notification (ECN) allows routers to notify
+	  clients about network congestion, resulting in fewer dropped packets
+	  and increased network performance.  This option adds ECN support to
+	  the Linux kernel, as well as a sysctl (/proc/sys/net/ipv4/tcp_ecn)
+	  which allows ECN support to be disabled at runtime.
+
+	  Note that, on the Internet, there are many broken firewalls which
+	  refuse connections from ECN-enabled machines, and it may be a while
+	  before these firewalls are fixed.  Until then, to access a site
+	  behind such a firewall (some of which are major sites, at the time
+	  of this writing) you will have to disable this option, either by
+	  saying N now or by using the sysctl.
+
+	  If in doubt, say N.
+
+config SYN_COOKIES
+	bool "IP: TCP syncookie support (disabled per default)"
+	depends on INET
+	---help---
+	  Normal TCP/IP networking is open to an attack known as "SYN
+	  flooding". This denial-of-service attack prevents legitimate remote
+	  users from being able to connect to your computer during an ongoing
+	  attack and requires very little work from the attacker, who can
+	  operate from anywhere on the Internet.
+
+	  SYN cookies provide protection against this type of attack. If you
+	  say Y here, the TCP/IP stack will use a cryptographic challenge
+	  protocol known as "SYN cookies" to enable legitimate users to
+	  continue to connect, even when your machine is under attack. There
+	  is no need for the legitimate users to change their TCP/IP software;
+	  SYN cookies work transparently to them. For technical information
+	  about SYN cookies, check out <http://cr.yp.to/syncookies.html>.
+
+	  If you are SYN flooded, the source address reported by the kernel is
+	  likely to have been forged by the attacker; it is only reported as
+	  an aid in tracing the packets to their actual source and should not
+	  be taken as absolute truth.
+
+	  SYN cookies may prevent correct error reporting on clients when the
+	  server is really overloaded. If this happens frequently better turn
+	  them off.
+
+	  If you say Y here, note that SYN cookies aren't enabled by default;
+	  you can enable them by saying Y to "/proc file system support" and
+	  "Sysctl support" below and executing the command
+
+	  echo 1 >/proc/sys/net/ipv4/tcp_syncookies
+
+	  at boot time after the /proc file system has been mounted.
+
+	  If unsure, say N.
+
+source "net/ipv4/netfilter/Kconfig"
+
diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile
--- a/net/ipv4/Makefile	Wed Oct 30 16:44:26 2002
+++ b/net/ipv4/Makefile	Wed Oct 30 16:44:26 2002
@@ -2,13 +2,14 @@
 # Makefile for the Linux TCP/IP (INET) layer.
 #
 
-obj-y     := utils.o route.o inetpeer.o proc.o protocol.o \
+obj-y     := utils.o route.o inetpeer.o protocol.o \
 	     ip_input.o ip_fragment.o ip_forward.o ip_options.o \
-	     ip_output.o ip_sockglue.o ip_proc.o \
+	     ip_output.o ip_sockglue.o \
 	     tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o tcp_minisocks.o \
 	     tcp_diag.o raw.o udp.o arp.o icmp.o devinet.o af_inet.o igmp.o \
 	     sysctl_net_ipv4.o fib_frontend.o fib_semantics.o fib_hash.o
 
+obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o
 obj-$(CONFIG_IP_ROUTE_NAT) += ip_nat_dumb.o
 obj-$(CONFIG_IP_MROUTE) += ipmr.o
@@ -17,5 +18,7 @@
 obj-$(CONFIG_SYN_COOKIES) += syncookies.o
 obj-$(CONFIG_IP_PNP) += ipconfig.o
 obj-$(CONFIG_NETFILTER)	+= netfilter/
+
+obj-y += xfrm_policy.o xfrm_state.o xfrm_input.o ah.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
--- a/net/ipv4/af_inet.c	Wed Oct 30 16:44:23 2002
+++ b/net/ipv4/af_inet.c	Wed Oct 30 16:44:23 2002
@@ -99,9 +99,12 @@
 #include <net/protocol.h>
 #include <net/arp.h>
 #include <net/route.h>
+#include <net/ip_fib.h>
 #include <net/tcp.h>
 #include <net/udp.h>
 #include <linux/skbuff.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 #include <net/sock.h>
 #include <net/raw.h>
 #include <net/icmp.h>
@@ -110,13 +113,6 @@
 #ifdef CONFIG_IP_MROUTE
 #include <linux/mroute.h>
 #endif
-#include <linux/if_bridge.h>
-#ifdef CONFIG_KMOD
-#include <linux/kmod.h>
-#endif
-#ifdef CONFIG_NET_DIVERT
-#include <linux/divert.h>
-#endif /* CONFIG_NET_DIVERT */
 
 struct linux_mib net_statistics[NR_CPUS * 2];
 
@@ -126,22 +122,6 @@
 
 extern void ip_mc_drop_socket(struct sock *sk);
 
-#ifdef CONFIG_DLCI
-extern int dlci_ioctl(unsigned int, void *);
-#endif
-
-#ifdef CONFIG_DLCI_MODULE
-int (*dlci_ioctl_hook)(unsigned int, void *);
-#endif
-
-#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
-int (*br_ioctl_hook)(unsigned long);
-#endif
-
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-int (*vlan_ioctl_hook)(unsigned long arg);
-#endif
-
 /* Per protocol sock slabcache */
 kmem_cache_t *tcp_sk_cachep;
 static kmem_cache_t *udp_sk_cachep;
@@ -889,60 +869,6 @@
 		case SIOCSIFFLAGS:
 			err = devinet_ioctl(cmd, (void *)arg);
 			break;
-		case SIOCGIFBR:
-		case SIOCSIFBR:
-#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
-#ifdef CONFIG_KMOD
-			if (!br_ioctl_hook)
-				request_module("bridge");
-#endif
-			if (br_ioctl_hook)
-				err = br_ioctl_hook(arg);
-			else
-#endif
-			err = -ENOPKG;
-			break;
-		case SIOCGIFVLAN:
-		case SIOCSIFVLAN:
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-#ifdef CONFIG_KMOD
-			if (!vlan_ioctl_hook)
-				request_module("8021q");
-#endif
-			if (vlan_ioctl_hook)
-				err = vlan_ioctl_hook(arg);
-			else
-#endif
-			err = -ENOPKG;
-			break;
-		case SIOCGIFDIVERT:
-		case SIOCSIFDIVERT:
-#ifdef CONFIG_NET_DIVERT
-			err = divert_ioctl(cmd, (struct divert_cf *)arg);
-#else
-			err = -ENOPKG;
-#endif	/* CONFIG_NET_DIVERT */
-			break;
-		case SIOCADDDLCI:
-		case SIOCDELDLCI:
-#ifdef CONFIG_DLCI
-			lock_kernel();
-			err = dlci_ioctl(cmd, (void *)arg);
-			unlock_kernel();
-			break;
-#elif CONFIG_DLCI_MODULE
-#ifdef CONFIG_KMOD
-			if (!dlci_ioctl_hook)
-				request_module("dlci");
-#endif
-			if (dlci_ioctl_hook) {
-				lock_kernel();
-				err = (*dlci_ioctl_hook)(cmd, (void *)arg);
-				unlock_kernel();
-			} else
-#endif
-			err = -ENOPKG;
-			break;
 		default:
 			if (!sk->prot->ioctl ||
 			    (err = sk->prot->ioctl(sk, cmd, arg)) ==
@@ -1123,6 +1049,8 @@
 	.handler =	icmp_rcv,
 };
 
+int ipv4_proc_init(void);
+
 static int __init inet_init(void)
 {
 	struct sk_buff *dummy_skb;
@@ -1222,3 +1150,47 @@
 }
 
 module_init(inet_init);
+
+/* ------------------------------------------------------------------------ */
+
+#ifdef CONFIG_PROC_FS
+
+extern int ip_misc_proc_init(void);
+extern int raw_get_info(char *, char **, off_t, int);
+extern int tcp_get_info(char *, char **, off_t, int);
+
+int __init ipv4_proc_init(void)
+{
+	int rc = 0;
+
+	if (!proc_net_create("raw", 0, raw_get_info))
+		goto out_raw;
+	if (!proc_net_create("tcp", 0, tcp_get_info))
+		goto out_tcp;
+	if (udp_proc_init())
+		goto out_udp;
+	if (fib_proc_init())
+		goto out_fib;
+	if (ip_misc_proc_init())
+		goto out_misc;
+out:
+	return rc;
+out_misc:
+	fib_proc_exit();
+out_fib:
+	udp_proc_exit();
+out_udp:
+	proc_net_remove("tcp");
+out_tcp:
+	proc_net_remove("raw");
+out_raw:
+	rc = -ENOMEM;
+	goto out;
+}
+
+#else /* CONFIG_PROC_FS */
+int __init ipv4_proc_init(void)
+{
+	return 0;
+}
+#endif /* CONFIG_PROC_FS */
diff -Nru a/net/ipv4/ah.c b/net/ipv4/ah.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/ah.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,317 @@
+#include <net/ip.h>
+#include <net/xfrm.h>
+#include <linux/crypto.h>
+#include <net/icmp.h>
+
+struct ah_data
+{
+	u8			*key;
+	int			key_len;
+	int			digest_len;
+
+	void			(*digest)(struct xfrm_state*,
+					  struct sk_buff *skb,
+					  u8 *digest);
+
+	struct crypto_tfm	*tfm;
+};
+
+
+/* Clear mutable options and find final destination to substitute
+ * into IP header for digest calculation. Options are already checked
+ * for validity, so paranoia is not required. */
+
+int ip_clear_mutable_options(struct iphdr *iph, u32 *daddr)
+{
+	unsigned char * optptr = (unsigned char*)(iph+1);
+	int  l = iph->ihl*4 - 20;
+	int  optlen;
+
+	while (l > 0) {
+		switch (*optptr) {
+		case IPOPT_END:
+			return 0;
+		case IPOPT_NOOP:
+			l--;
+			optptr++;
+			continue;
+		}
+		optlen = optptr[1];
+		if (optlen<2 || optlen>l)
+			return -EINVAL;
+		switch (*optptr) {
+		case IPOPT_SEC:
+		case 0x85:	/* Some "Extended Security" crap. */
+		case 0x86:	/* Another "Commercial Security" crap. */
+		case IPOPT_RA:
+		case 0x80|21:	/* RFC1770 */
+			break;
+		case IPOPT_LSRR:
+		case IPOPT_SSRR:
+			if (optlen < 6)
+				return -EINVAL;
+			memcpy(daddr, optptr+optlen-4, 4);
+			/* Fall through */
+		default:
+			memset(optptr+2, 0, optlen-2);
+		}
+		l -= optlen;
+		optptr += optlen;
+	}
+	return 0;
+}
+
+void skb_ah_walk(const struct sk_buff *skb, struct crypto_tfm *tfm)
+{
+	int offset = 0;
+	int len = skb->len;
+	int start = skb->len - skb->data_len;
+	int i, copy = start - offset;
+
+	/* Checksum header. */
+	if (copy > 0) {
+		if (copy > len)
+			copy = len;
+		tfm->__crt_alg->cra_digest.dia_update(tfm->crt_ctx, skb->data+offset, copy);
+		if ((len -= copy) == 0)
+			return;
+		offset += copy;
+	}
+
+	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
+		int end;
+
+		BUG_TRAP(start <= offset + len);
+
+		end = start + skb_shinfo(skb)->frags[i].size;
+		if ((copy = end - offset) > 0) {
+			u8 *vaddr;
+			skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+
+			if (copy > len)
+				copy = len;
+			vaddr = kmap_skb_frag(frag);
+			tfm->__crt_alg->cra_digest.dia_update(tfm->crt_ctx, vaddr+frag->page_offset+offset-start, copy);
+			kunmap_skb_frag(vaddr);
+			if (!(len -= copy))
+				return;
+			offset += copy;
+		}
+		start = end;
+	}
+
+	if (skb_shinfo(skb)->frag_list) {
+		struct sk_buff *list = skb_shinfo(skb)->frag_list;
+
+		for (; list; list = list->next) {
+			int end;
+
+			BUG_TRAP(start <= offset + len);
+
+			end = start + list->len;
+			if ((copy = end - offset) > 0) {
+				if (copy > len)
+					copy = len;
+				skb_ah_walk(list, tfm);
+				if ((len -= copy) == 0)
+					return;
+				offset += copy;
+			}
+			start = end;
+		}
+	}
+	if (len)
+		BUG();
+}
+
+int ah_output(struct sk_buff *skb)
+{
+	int err;
+	struct dst_entry *dst = skb->dst;
+	struct xfrm_state *x  = dst->xfrm;
+	struct iphdr *iph, *top_iph;
+	struct ip_auth_hdr *ah;
+	struct ah_data *ahp;
+	union {
+		struct iphdr	iph;
+		char 		buf[60];
+	} tmp_iph;
+
+	if (skb->ip_summed == CHECKSUM_HW && skb_checksum_help(skb) == NULL)
+		return -EINVAL;
+
+	spin_lock_bh(&x->lock);
+	if ((err = xfrm_state_check_expire(x)) != 0)
+		goto error;
+	if ((err = xfrm_state_check_space(x, skb)) != 0)
+		goto error;
+
+	iph = skb->nh.iph;
+	if (x->props.mode) {
+		top_iph = (struct iphdr*)skb_push(skb, x->props.header_len);
+		top_iph->ihl = 4;
+		top_iph->version = 5;
+		top_iph->tos = 0;
+		top_iph->tot_len = htons(skb->len);
+		top_iph->id = inet_getid(((struct rtable*)dst)->peer, 0);
+		top_iph->frag_off = 0;
+		top_iph->ttl = 0;
+		top_iph->protocol = IPPROTO_AH;
+		top_iph->check = 0;
+		top_iph->saddr = x->props.saddr.xfrm4_addr;
+		top_iph->daddr = x->id.daddr.xfrm4_addr;
+		ah = (struct ip_auth_hdr*)(top_iph+1);
+		ah->nexthdr = IPPROTO_IP;
+	} else {
+		memcpy(&tmp_iph, skb->data, iph->ihl*4);
+		top_iph = (struct iphdr*)skb_push(skb, x->props.header_len);
+		memcpy(top_iph, &tmp_iph, iph->ihl*4);
+		iph = &tmp_iph.iph;
+		top_iph->tos = 0;
+		top_iph->tot_len = htons(skb->len);
+		top_iph->frag_off = 0;
+		top_iph->ttl = 0;
+		top_iph->protocol = IPPROTO_AH;
+		top_iph->check = 0;
+		if (top_iph->ihl != 5) {
+			err = ip_clear_mutable_options(top_iph, &top_iph->daddr);
+			if (err)
+				goto error;
+		}
+		ah = (struct ip_auth_hdr*)((char*)top_iph+iph->ihl*4);
+		ah->nexthdr = iph->protocol;
+	}
+	ahp = x->data;
+	ah->hdrlen  = (((ahp->digest_len + 12 + 7)&~7)>>2)-2;
+	ah->reserved = 0;
+	ah->spi = x->id.spi;
+	ah->seq_no = htonl(++x->replay.oseq);
+	ahp->digest(x, skb, ah->auth_data);
+	top_iph->tos = iph->tos;
+	top_iph->ttl = iph->ttl;
+	if (x->props.mode) {
+		top_iph->frag_off = iph->frag_off&~htons(IP_MF|IP_OFFSET);
+		memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
+	} else {
+		top_iph->frag_off = iph->frag_off;
+		top_iph->daddr = iph->daddr;
+		if (iph->ihl != 5)
+			memcpy(top_iph+1, iph+1, iph->ihl*5 - 20);
+	}
+	ip_send_check(top_iph);
+
+	skb->nh.raw = skb->data;
+
+	x->stats.bytes += skb->len;
+	spin_unlock_bh(&x->lock);
+	if ((skb->dst = dst_pop(dst)) == NULL)
+		goto error;
+	return NET_XMIT_BYPASS;
+
+error:
+	spin_unlock_bh(&x->lock);
+	kfree_skb(skb);
+	return err;
+}
+
+int ah_input(struct xfrm_state *x, struct sk_buff *skb)
+{
+	struct iphdr *iph;
+	struct ip_auth_hdr *ah;
+	struct ah_data *ahp;
+	char work_buf[60];
+
+	if (!pskb_may_pull(skb, sizeof(struct ip_auth_hdr)))
+		goto out;
+
+	ah = (struct ip_auth_hdr*)skb->data;
+
+	ahp = x->data;
+
+	if (((ah->hdrlen+2)<<2) != ((ahp->digest_len + 12 + 7)&~7))
+		goto out;
+
+	if (!pskb_may_pull(skb, (ah->hdrlen+2)<<2))
+		goto out;
+
+	/* We are going to _remove_ AH header to keep sockets happy,
+	 * so... Later this can change. */
+	if (skb_cloned(skb) &&
+	    pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
+		goto out;
+
+	ah = (struct ip_auth_hdr*)skb->data;
+	iph = skb->nh.iph;
+
+	memcpy(work_buf, iph, iph->ihl*4);
+
+	iph->ttl = 0;
+	iph->tos = 0;
+	iph->frag_off = 0;
+	iph->check = 0;
+	if (iph->ihl != 5) {
+		u32 dummy;
+		if (ip_clear_mutable_options(iph, &dummy))
+			goto out;
+	}
+        {
+		u8 auth_data[ahp->digest_len];
+		memcpy(auth_data, ah->auth_data, ahp->digest_len);
+		skb_push(skb, skb->data - skb->nh.raw);
+		ahp->digest(x, skb, ah->auth_data);
+		if (memcmp(ah->auth_data, auth_data, ahp->digest_len)) {
+			x->stats.integrity_failed++;
+			goto out;
+		}
+	}
+	((struct iphdr*)work_buf)->protocol = ah->nexthdr;
+	skb->nh.raw = skb_pull(skb, (ah->hdrlen+2)<<2);
+	memcpy(skb->nh.raw, work_buf, iph->ihl*4);
+	skb->nh.iph->tot_len = htons(skb->len);
+	skb_pull(skb, skb->nh.iph->ihl*4);
+	skb->h.raw = skb->data;
+
+	return 0;
+
+out:
+	return -EINVAL;
+}
+
+void ah4_err(struct sk_buff *skb, u32 info)
+{
+	struct iphdr *iph = (struct iphdr*)skb->data;
+	struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+(iph->ihl<<2));
+	struct xfrm_state *x;
+
+	if (skb->h.icmph->type != ICMP_DEST_UNREACH ||
+	    skb->h.icmph->code != ICMP_FRAG_NEEDED)
+		return;
+
+	x = xfrm_state_lookup(iph->daddr, ah->spi, IPPROTO_AH);
+	if (!x)
+		return;
+	printk(KERN_DEBUG "pmtu discvovery on SA AH/%08x/%08x\n",
+	       ntohl(ah->spi), ntohl(iph->daddr));
+	xfrm_state_put(x);
+}
+
+static struct inet_protocol ah4_protocol = {
+	.handler	=	xfrm4_rcv,
+	.err_handler	=	ah4_err,
+};
+
+
+int __init ah4_init(void)
+{
+	if (inet_add_protocol(&ah4_protocol, IPPROTO_AH) < 0) {
+		printk(KERN_INFO "ip ah init: can't add protocol\n");
+		return -EAGAIN;
+	}
+	return 0;
+}
+
+static void __exit ah4_fini(void)
+{
+	if (inet_del_protocol(&ah4_protocol, IPPROTO_AH) < 0)
+		printk(KERN_INFO "ip ah close: can't remove protocol\n");
+}
diff -Nru a/net/ipv4/arp.c b/net/ipv4/arp.c
--- a/net/ipv4/arp.c	Wed Oct 30 16:44:32 2002
+++ b/net/ipv4/arp.c	Wed Oct 30 16:44:32 2002
@@ -66,8 +66,7 @@
  *		Alexey Kuznetsov:	new arp state machine;
  *					now it is in net/core/neighbour.c.
  *		Krzysztof Halasa:	Added Frame Relay ARP support.
- *		Arnaldo C. Melo :	move proc stuff to seq_file and
- *					net/ipv4/ip_proc.c
+ *		Arnaldo C. Melo :	convert /proc/net/arp to seq_file
  */
 
 #include <linux/types.h>
@@ -87,6 +86,8 @@
 #include <linux/if_arp.h>
 #include <linux/trdevice.h>
 #include <linux/skbuff.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 #include <linux/stat.h>
 #include <linux/init.h>
 #ifdef CONFIG_SYSCTL
@@ -919,7 +920,7 @@
 	return err;
 }
 
-unsigned arp_state_to_flags(struct neighbour *neigh)
+static unsigned arp_state_to_flags(struct neighbour *neigh)
 {
 	unsigned flags = 0;
 	if (neigh->nud_state&NUD_PERMANENT)
@@ -1087,13 +1088,293 @@
 	.data =	(void*) 1, /* understand shared skbs */
 };
 
+static int arp_proc_init(void);
+
 void __init arp_init(void)
 {
 	neigh_table_init(&arp_tbl);
 
 	dev_add_pack(&arp_packet_type);
+	arp_proc_init();
 #ifdef CONFIG_SYSCTL
 	neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4,
 			      NET_IPV4_NEIGH, "ipv4");
 #endif
 }
+
+#ifdef CONFIG_PROC_FS
+#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+
+/* ------------------------------------------------------------------------ */
+/*
+ *	ax25 -> ASCII conversion
+ */
+static char *ax2asc2(ax25_address *a, char *buf)
+{
+	char c, *s;
+	int n;
+
+	for (n = 0, s = buf; n < 6; n++) {
+		c = (a->ax25_call[n] >> 1) & 0x7F;
+
+		if (c != ' ') *s++ = c;
+	}
+	
+	*s++ = '-';
+
+	if ((n = ((a->ax25_call[6] >> 1) & 0x0F)) > 9) {
+		*s++ = '1';
+		n -= 10;
+	}
+	
+	*s++ = n + '0';
+	*s++ = '\0';
+
+	if (*buf == '\0' || *buf == '-')
+	   return "*";
+
+	return buf;
+
+}
+#endif /* CONFIG_AX25 */
+
+struct arp_iter_state {
+	int is_pneigh, bucket;
+};
+
+static __inline__ struct neighbour *neigh_get_bucket(struct seq_file *seq,
+						     loff_t *pos)
+{
+	struct neighbour *n = NULL;
+	struct arp_iter_state* state = seq->private;
+	loff_t l = *pos;
+	int i;
+
+	for (; state->bucket <= NEIGH_HASHMASK; ++state->bucket)
+		for (i = 0, n = arp_tbl.hash_buckets[state->bucket]; n;
+		     ++i, n = n->next)
+			/* Do not confuse users "arp -a" with magic entries */
+			if ((n->nud_state & ~NUD_NOARP) && !l--) {
+				*pos = i;
+				goto out;
+			}
+out:
+	return n;
+}
+
+static __inline__ struct pneigh_entry *pneigh_get_bucket(struct seq_file *seq,
+							 loff_t *pos)
+{
+	struct pneigh_entry *n = NULL;
+	struct arp_iter_state* state = seq->private;
+	loff_t l = *pos;
+	int i;
+
+	for (; state->bucket <= PNEIGH_HASHMASK; ++state->bucket)
+		for (i = 0, n = arp_tbl.phash_buckets[state->bucket]; n;
+		     ++i, n = n->next)
+			if (!l--) {
+				*pos = i;
+				goto out;
+			}
+out:
+	return n;
+}
+
+static __inline__ void *arp_get_bucket(struct seq_file *seq, loff_t *pos)
+{
+	void *rc = neigh_get_bucket(seq, pos);
+
+	if (!rc) {
+		struct arp_iter_state* state = seq->private;
+
+		read_unlock_bh(&arp_tbl.lock);
+		state->is_pneigh = 1;
+		state->bucket	 = 0;
+		*pos		 = 0;
+		rc = pneigh_get_bucket(seq, pos);
+	}
+	return rc;
+}
+
+static void *arp_seq_start(struct seq_file *seq, loff_t *pos)
+{
+	read_lock_bh(&arp_tbl.lock);
+	return *pos ? arp_get_bucket(seq, pos) : (void *)1;
+}
+
+static void *arp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+	void *rc;
+	struct arp_iter_state* state;
+
+	if (v == (void *)1) {
+		rc = arp_get_bucket(seq, pos);
+		goto out;
+	}
+
+	state = seq->private;
+	if (!state->is_pneigh) {
+		struct neighbour *n = v;
+
+		rc = n = n->next;
+		if (n)
+			goto out;
+		*pos = 0;
+		++state->bucket;
+		rc = neigh_get_bucket(seq, pos);
+		if (rc)
+			goto out;
+		read_unlock_bh(&arp_tbl.lock);
+		state->is_pneigh = 1;
+		state->bucket	 = 0;
+		*pos		 = 0;
+		rc = pneigh_get_bucket(seq, pos);
+	} else {
+		struct pneigh_entry *pn = v;
+
+		pn = pn->next;
+		if (!pn) {
+			++state->bucket;
+			*pos = 0;
+			pn   = pneigh_get_bucket(seq, pos);
+		}
+		rc = pn;
+	}
+out:
+	++*pos;
+	return rc;
+}
+
+static void arp_seq_stop(struct seq_file *seq, void *v)
+{
+	struct arp_iter_state* state = seq->private;
+
+	if (!state->is_pneigh)
+		read_unlock_bh(&arp_tbl.lock);
+}
+
+#define HBUFFERLEN 30
+
+static __inline__ void arp_format_neigh_entry(struct seq_file *seq,
+					      struct neighbour *n)
+{
+	char hbuffer[HBUFFERLEN];
+	const char hexbuf[] = "0123456789ABCDEF";
+	int k, j;
+	char tbuf[16];
+	struct net_device *dev = n->dev;
+	int hatype = dev->type;
+
+	read_lock(&n->lock);
+	/* Convert hardware address to XX:XX:XX:XX ... form. */
+#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+	if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM)
+		ax2asc2((ax25_address *)n->ha, hbuffer);
+	else {
+#endif
+	for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) {
+		hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15];
+		hbuffer[k++] = hexbuf[n->ha[j] & 15];
+		hbuffer[k++] = ':';
+	}
+	hbuffer[--k] = 0;
+#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+	}
+#endif
+	sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key));
+	seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
+		   tbuf, hatype, arp_state_to_flags(n), hbuffer, dev->name);
+	read_unlock(&n->lock);
+}
+
+static __inline__ void arp_format_pneigh_entry(struct seq_file *seq,
+					       struct pneigh_entry *n)
+{
+
+	struct net_device *dev = n->dev;
+	int hatype = dev ? dev->type : 0;
+	char tbuf[16];
+
+	sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key));
+	seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
+		   tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00",
+		   dev ? dev->name : "*");
+}
+
+static int arp_seq_show(struct seq_file *seq, void *v)
+{
+	if (v == (void *)1)
+		seq_puts(seq, "IP address       HW type     Flags       "
+			      "HW address            Mask     Device\n");
+	else {
+		struct arp_iter_state* state = seq->private;
+
+		if (state->is_pneigh)
+			arp_format_pneigh_entry(seq, v);
+		else
+			arp_format_neigh_entry(seq, v);
+	}
+
+	return 0;
+}
+
+/* ------------------------------------------------------------------------ */
+
+static struct seq_operations arp_seq_ops = {
+	.start  = arp_seq_start,
+	.next   = arp_seq_next,
+	.stop   = arp_seq_stop,
+	.show   = arp_seq_show,
+};
+
+static int arp_seq_open(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq;
+	int rc = -ENOMEM;
+	struct arp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+       
+	if (!s)
+		goto out;
+
+	rc = seq_open(file, &arp_seq_ops);
+	if (rc)
+		goto out_kfree;
+
+	seq	     = file->private_data;
+	seq->private = s;
+	memset(s, 0, sizeof(*s));
+out:
+	return rc;
+out_kfree:
+	kfree(s);
+	goto out;
+}
+
+static struct file_operations arp_seq_fops = {
+	.open           = arp_seq_open,
+	.read           = seq_read,
+	.llseek         = seq_lseek,
+	.release	= ip_seq_release,
+};
+
+static int __init arp_proc_init(void)
+{
+	int rc = 0;
+	struct proc_dir_entry *p = create_proc_entry("arp", S_IRUGO, proc_net);
+
+        if (p)
+		p->proc_fops = &arp_seq_fops;
+	else
+		rc = -ENOMEM;
+	return rc;
+}
+
+#else /* CONFIG_PROC_FS */
+
+static int __init arp_proc_init(void)
+{
+	return 0;
+}
+
+#endif /* CONFIG_PROC_FS */
diff -Nru a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
--- a/net/ipv4/fib_hash.c	Wed Oct 30 16:44:28 2002
+++ b/net/ipv4/fib_hash.c	Wed Oct 30 16:44:28 2002
@@ -745,37 +745,6 @@
 }
 
 
-#ifdef CONFIG_PROC_FS
-
-static int fn_hash_seq_show(struct fib_table *tb, struct seq_file *seq)
-{
-	struct fn_hash *table = (struct fn_hash *)tb->tb_data;
-	struct fn_zone *fz;
-
-	read_lock(&fib_hash_lock);
-	for (fz = table->fn_zone_list; fz; fz = fz->fz_next) {
-		int i;
-		struct fib_node *f;
-		int maxslot = fz->fz_divisor;
-		struct fib_node **fp = fz->fz_hash;
-
-		if (!fz->fz_nent)
-			continue;
-
-		for (i = 0; i < maxslot; i++, fp++)
-			for (f = *fp; f; f = f->fn_next)
-				fib_node_seq_show(seq, f->fn_type,
-						  f->fn_state & FN_S_ZOMBIE,
-						  FIB_INFO(f),
-						  fz_prefix(f->fn_key, fz),
-						  FZ_MASK(fz));
-	}
-	read_unlock(&fib_hash_lock);
-  	return 0;
-}
-#endif
-
-
 static __inline__ int
 fn_hash_dump_bucket(struct sk_buff *skb, struct netlink_callback *cb,
 		     struct fib_table *tb,
@@ -897,9 +866,241 @@
 	tb->tb_flush = fn_hash_flush;
 	tb->tb_select_default = fn_hash_select_default;
 	tb->tb_dump = fn_hash_dump;
-#ifdef CONFIG_PROC_FS
-	tb->tb_seq_show = fn_hash_seq_show;
-#endif
 	memset(tb->tb_data, 0, sizeof(struct fn_hash));
 	return tb;
 }
+
+/* ------------------------------------------------------------------------ */
+#ifdef CONFIG_PROC_FS
+
+struct fib_iter_state {
+	struct fn_zone	*zone;
+	int		bucket;
+	struct fib_node **hash;
+	struct fib_node *node;
+};
+
+static __inline__ struct fib_node *fib_get_first(struct seq_file *seq)
+{
+	struct fib_iter_state* iter = seq->private;
+	struct fn_hash *table = (struct fn_hash *)ip_fib_main_table->tb_data;
+
+	iter->bucket = 0;
+	iter->hash   = NULL;
+	iter->node   = NULL;
+
+	for (iter->zone = table->fn_zone_list; iter->zone;
+	     iter->zone = iter->zone->fz_next) {
+		int maxslot;
+
+		if (!iter->zone->fz_next)
+			continue;
+
+		iter->hash = iter->zone->fz_hash;
+		maxslot = iter->zone->fz_divisor;
+
+		for (iter->bucket = 0; iter->bucket < maxslot;
+		     ++iter->bucket, ++iter->hash) {
+			iter->node = *iter->hash;
+
+			if (iter->node)
+				goto out;
+		}
+	}
+out:
+	return iter->node;
+}
+
+static __inline__ struct fib_node *fib_get_next(struct seq_file *seq)
+{
+	struct fib_iter_state* iter = seq->private;
+
+	if (iter->node)
+		iter->node = iter->node->fn_next;
+
+	if (iter->node)
+		goto out;
+
+	if (!iter->zone)
+		goto out;
+
+	for (;;) {
+		int maxslot;
+
+		maxslot = iter->zone->fz_divisor;
+
+		while (++iter->bucket < maxslot) {
+			iter->node = *++iter->hash;
+
+			if (iter->node)
+				goto out;
+		}
+
+		for (;;) {
+			iter->zone = iter->zone->fz_next;
+
+			if (!iter->zone)
+				goto out;
+			if (iter->zone->fz_next);
+				break;
+		}
+		
+		iter->hash = iter->zone->fz_hash;
+		iter->bucket = 0;
+		iter->node = *iter->hash;
+		if (iter->node)
+			break;
+	}
+out:
+	return iter->node;
+}
+
+static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
+{
+	void *v = NULL;
+
+	read_lock(&fib_hash_lock);
+	if (ip_fib_main_table)
+		v = *pos ? fib_get_next(seq) : (void *)1;
+	return v;
+}
+
+static void *fib_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+	++*pos;
+	return v == (void *)1 ? fib_get_first(seq) : fib_get_next(seq);
+}
+
+static void fib_seq_stop(struct seq_file *seq, void *v)
+{
+	read_unlock(&fib_hash_lock);
+}
+
+static unsigned fib_flag_trans(int type, int dead, u32 mask, struct fib_info *fi)
+{
+	static unsigned type2flags[RTN_MAX + 1] = {
+		[7] = RTF_REJECT, [8] = RTF_REJECT,
+	};
+	unsigned flags = type2flags[type];
+
+	if (fi && fi->fib_nh->nh_gw)
+		flags |= RTF_GATEWAY;
+	if (mask == 0xFFFFFFFF)
+		flags |= RTF_HOST;
+	if (!dead)
+		flags |= RTF_UP;
+	return flags;
+}
+
+/* 
+ *	This outputs /proc/net/route.
+ *
+ *	It always works in backward compatibility mode.
+ *	The format of the file is not supposed to be changed.
+ */
+static int fib_seq_show(struct seq_file *seq, void *v)
+{
+	struct fib_iter_state* iter;
+	char bf[128];
+	u32 prefix, mask;
+	unsigned flags;
+	struct fib_node *f;
+	struct fib_info *fi;
+
+	if (v == (void *)1) {
+		seq_printf(seq, "%-127s\n", "Iface\tDestination\tGateway "
+			   "\tFlags\tRefCnt\tUse\tMetric\tMask\t\tMTU"
+			   "\tWindow\tIRTT");
+		goto out;
+	}
+
+	f	= v;
+	fi	= FIB_INFO(f);
+	iter	= seq->private;
+	prefix	= fz_prefix(f->fn_key, iter->zone);
+	mask	= FZ_MASK(iter->zone);
+	flags	= fib_flag_trans(f->fn_type, f->fn_state & FN_S_ZOMBIE,
+				 mask, fi);
+	if (fi)
+		snprintf(bf, sizeof(bf),
+			 "%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u",
+			 fi->fib_dev ? fi->fib_dev->name : "*", prefix,
+			 fi->fib_nh->nh_gw, flags, 0, 0, fi->fib_priority,
+			 mask, fi->fib_advmss + 40, fi->fib_window,
+			 fi->fib_rtt >> 3);
+	else
+		snprintf(bf, sizeof(bf),
+			 "*\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u",
+			 prefix, 0, flags, 0, 0, 0, mask, 0, 0, 0);
+	seq_printf(seq, "%-127s\n", bf);
+out:
+	return 0;
+}
+
+static struct seq_operations fib_seq_ops = {
+	.start  = fib_seq_start,
+	.next   = fib_seq_next,
+	.stop   = fib_seq_stop,
+	.show   = fib_seq_show,
+};
+
+static int fib_seq_open(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq;
+	int rc = -ENOMEM;
+	struct fib_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+       
+	if (!s)
+		goto out;
+
+	rc = seq_open(file, &fib_seq_ops);
+	if (rc)
+		goto out_kfree;
+
+	seq	     = file->private_data;
+	seq->private = s;
+	memset(s, 0, sizeof(*s));
+out:
+	return rc;
+out_kfree:
+	kfree(s);
+	goto out;
+}
+
+static struct file_operations fib_seq_fops = {
+	.open           = fib_seq_open,
+	.read           = seq_read,
+	.llseek         = seq_lseek,
+	.release	= ip_seq_release,
+};
+
+int __init fib_proc_init(void)
+{
+	struct proc_dir_entry *p;
+	int rc = 0;
+
+	p = create_proc_entry("route", S_IRUGO, proc_net);
+	if (p)
+		p->proc_fops = &fib_seq_fops;
+	else
+		rc = -ENOMEM;
+	return rc;
+}
+
+void __init fib_proc_exit(void)
+{
+	remove_proc_entry("route", proc_net);
+}
+
+#else /* CONFIG_PROC_FS */
+
+int __init fib_proc_init(void)
+{
+	return 0;
+}
+
+void __init fib_proc_exit(void)
+{
+	return 0;
+}
+#endif /* CONFIG_PROC_FS */
diff -Nru a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
--- a/net/ipv4/fib_semantics.c	Wed Oct 30 16:44:24 2002
+++ b/net/ipv4/fib_semantics.c	Wed Oct 30 16:44:24 2002
@@ -997,44 +997,3 @@
 	spin_unlock_bh(&fib_multipath_lock);
 }
 #endif
-
-
-#ifdef CONFIG_PROC_FS
-
-static unsigned fib_flag_trans(int type, int dead, u32 mask, struct fib_info *fi)
-{
-	static unsigned type2flags[RTN_MAX+1] = {
-		0, 0, 0, 0, 0, 0, 0, RTF_REJECT, RTF_REJECT, 0, 0, 0
-	};
-	unsigned flags = type2flags[type];
-
-	if (fi && fi->fib_nh->nh_gw)
-		flags |= RTF_GATEWAY;
-	if (mask == 0xFFFFFFFF)
-		flags |= RTF_HOST;
-	if (!dead)
-		flags |= RTF_UP;
-	return flags;
-}
-
-void fib_node_seq_show(struct seq_file *seq, int type, int dead,
-		       struct fib_info *fi, u32 prefix, u32 mask)
-{
-	char bf[128];
-	unsigned flags = fib_flag_trans(type, dead, mask, fi);
-
-	if (fi)
-		snprintf(bf, sizeof(bf),
-			 "%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u",
-			 fi->fib_dev ? fi->fib_dev->name : "*", prefix,
-			 fi->fib_nh->nh_gw, flags, 0, 0, fi->fib_priority,
-			 mask, fi->fib_advmss + 40, fi->fib_window,
-			 fi->fib_rtt >> 3);
-	else
-		snprintf(bf, sizeof(bf),
-			 "*\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u",
-			 prefix, 0, flags, 0, 0, 0, mask, 0, 0, 0);
-	seq_printf(seq, "%-127s\n", bf);
-}
-
-#endif
diff -Nru a/net/ipv4/icmp.c b/net/ipv4/icmp.c
--- a/net/ipv4/icmp.c	Wed Oct 30 16:44:34 2002
+++ b/net/ipv4/icmp.c	Wed Oct 30 16:44:34 2002
@@ -428,7 +428,8 @@
 		struct flowi fl = { .nl_u = { .ip4_u =
 					      { .daddr = daddr,
 						.saddr = rt->rt_spec_dst,
-						.tos = RT_TOS(skb->nh.iph->tos) } } };
+						.tos = RT_TOS(skb->nh.iph->tos) } },
+				    .proto = IPPROTO_ICMP };
 		if (ip_route_output_key(&rt, &fl))
 			goto out_unlock;
 	}
@@ -550,7 +551,8 @@
 	{
 		struct flowi fl = { .nl_u = { .ip4_u = { .daddr = iph->saddr,
 							 .saddr = saddr,
-							 .tos = RT_TOS(tos) } } };
+							 .tos = RT_TOS(tos) } },
+				    .proto = IPPROTO_ICMP };
 		if (ip_route_output_key(&rt, &fl))
 		    goto out_unlock;
 	}
@@ -577,7 +579,8 @@
 		struct flowi fl = { .nl_u = { .ip4_u =
 					      { .daddr = icmp_param.replyopts.faddr,
 						.saddr = saddr,
-						.tos = RT_TOS(tos) } } };
+						.tos = RT_TOS(tos) } },
+				    .proto = IPPROTO_ICMP };
 		ip_rt_put(rt);
 		if (ip_route_output_key(&rt, &fl))
 			goto out_unlock;
@@ -588,7 +591,7 @@
 
 	/* RFC says return as much as we can without exceeding 576 bytes. */
 
-	room = rt->u.dst.pmtu;
+	room = dst_pmtu(&rt->u.dst);
 	if (room > 576)
 		room = 576;
 	room -= sizeof(struct iphdr) + icmp_param.replyopts.optlen;
diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c
--- a/net/ipv4/igmp.c	Wed Oct 30 16:44:35 2002
+++ b/net/ipv4/igmp.c	Wed Oct 30 16:44:35 2002
@@ -208,8 +208,9 @@
 		dst = IGMP_ALL_ROUTER;
 
 	{
-		struct flowi fl = { .nl_u = { .ip4_u = { .daddr = dst } },
-				    .oif = dev->ifindex };
+		struct flowi fl = { .oif = dev->ifindex,
+				    .nl_u = { .ip4_u = { .daddr = dst } },
+				    .proto = IPPROTO_IGMP };
 		if (ip_route_output_key(&rt, &fl))
 			return -1;
 	}
diff -Nru a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
--- a/net/ipv4/ip_forward.c	Wed Oct 30 16:44:17 2002
+++ b/net/ipv4/ip_forward.c	Wed Oct 30 16:44:17 2002
@@ -40,6 +40,7 @@
 #include <net/checksum.h>
 #include <linux/route.h>
 #include <net/route.h>
+#include <net/xfrm.h>
 
 static inline int ip_forward_finish(struct sk_buff *skb)
 {
@@ -47,36 +48,20 @@
 
 	IP_INC_STATS_BH(IpForwDatagrams);
 
-	if (opt->optlen == 0) {
-#ifdef CONFIG_NET_FASTROUTE
-		struct rtable *rt = (struct rtable*)skb->dst;
-
-		if (rt->rt_flags&RTCF_FAST && !netdev_fastroute_obstacles) {
-			struct dst_entry *old_dst;
-			unsigned h = ((*(u8*)&rt->fl.fl4_dst)^(*(u8*)&rt->fl.fl4_src))&NETDEV_FASTROUTE_HMASK;
-
-			write_lock_irq(&skb->dev->fastpath_lock);
-			old_dst = skb->dev->fastpath[h];
-			skb->dev->fastpath[h] = dst_clone(&rt->u.dst);
-			write_unlock_irq(&skb->dev->fastpath_lock);
-
-			dst_release(old_dst);
-		}
-#endif
-		return (ip_send(skb));
-	}
+	if (unlikely(opt->optlen))
+		ip_forward_options(skb);
 
-	ip_forward_options(skb);
-	return (ip_send(skb));
+	return dst_output(skb);
 }
 
 int ip_forward(struct sk_buff *skb)
 {
-	struct net_device *dev2;	/* Output device */
 	struct iphdr *iph;	/* Our header */
 	struct rtable *rt;	/* Route we use */
 	struct ip_options * opt	= &(IPCB(skb)->opt);
-	unsigned short mtu;
+
+	if (!xfrm_policy_check(XFRM_POLICY_FWD, skb))
+		goto drop;
 
 	if (IPCB(skb)->opt.router_alert && ip_call_ra_chain(skb))
 		return NET_RX_SUCCESS;
@@ -93,32 +78,21 @@
 	 */
 
 	iph = skb->nh.iph;
-	rt = (struct rtable*)skb->dst;
 
 	if (iph->ttl <= 1)
                 goto too_many_hops;
 
-	if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
-                goto sr_failed;
-
-	/*
-	 *	Having picked a route we can now send the frame out
-	 *	after asking the firewall permission to do so.
-	 */
+	if (!xfrm_route_forward(skb))
+		goto drop;
 
-	skb->priority = rt_tos2priority(iph->tos);
-	dev2 = rt->u.dst.dev;
-	mtu = rt->u.dst.pmtu;
+	iph = skb->nh.iph;
+	rt = (struct rtable*)skb->dst;
 
-	/*
-	 *	We now generate an ICMP HOST REDIRECT giving the route
-	 *	we calculated.
-	 */
-	if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr)
-		ip_rt_send_redirect(skb);
+	if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
+		goto sr_failed;
 
 	/* We are about to mangle packet. Copy it! */
-	if (skb_cow(skb, dev2->hard_header_len))
+	if (skb_cow(skb, rt->u.dst.dev->hard_header_len+rt->u.dst.header_len))
 		goto drop;
 	iph = skb->nh.iph;
 
@@ -126,29 +100,16 @@
 	ip_decrease_ttl(iph);
 
 	/*
-	 * We now may allocate a new buffer, and copy the datagram into it.
-	 * If the indicated interface is up and running, kick it.
+	 *	We now generate an ICMP HOST REDIRECT giving the route
+	 *	we calculated.
 	 */
+	if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr)
+		ip_rt_send_redirect(skb);
 
-	if (skb->len > mtu && (ntohs(iph->frag_off) & IP_DF))
-		goto frag_needed;
-
-#ifdef CONFIG_IP_ROUTE_NAT
-	if (rt->rt_flags & RTCF_NAT) {
-		if (ip_do_nat(skb)) {
-			kfree_skb(skb);
-			return NET_RX_BAD;
-		}
-	}
-#endif
+	skb->priority = rt_tos2priority(iph->tos);
 
-	return NF_HOOK(PF_INET, NF_IP_FORWARD, skb, skb->dev, dev2,
+	return NF_HOOK(PF_INET, NF_IP_FORWARD, skb, skb->dev, rt->u.dst.dev,
 		       ip_forward_finish);
-
-frag_needed:
-	IP_INC_STATS_BH(IpFragFails);
-	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
-        goto drop;
 
 sr_failed:
         /*
diff -Nru a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
--- a/net/ipv4/ip_gre.c	Wed Oct 30 16:44:31 2002
+++ b/net/ipv4/ip_gre.c	Wed Oct 30 16:44:31 2002
@@ -492,6 +492,7 @@
 	memset(&fl, 0, sizeof(fl));
 	fl.fl4_dst = eiph->saddr;
 	fl.fl4_tos = RT_TOS(eiph->tos);
+	fl.proto = IPPROTO_GRE;
 	if (ip_route_output_key(&rt, &fl)) {
 		kfree_skb(skb2);
 		return;
@@ -674,12 +675,6 @@
 	return(0);
 }
 
-/* Need this wrapper because NF_HOOK takes the function address */
-static inline int do_ip_send(struct sk_buff *skb)
-{
-	return ip_send(skb);
-}
-
 static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
@@ -757,11 +752,12 @@
 	}
 
 	{
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = tunnel->parms.link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = dst,
 						.saddr = tiph->saddr,
 						.tos = RT_TOS(tos) } },
-				    .oif = tunnel->parms.link };
+				    .proto = IPPROTO_GRE };
 		if (ip_route_output_key(&rt, &fl)) {
 			tunnel->stat.tx_carrier_errors++;
 			goto tx_error;
@@ -777,13 +773,16 @@
 
 	df = tiph->frag_off;
 	if (df)
-		mtu = rt->u.dst.pmtu - tunnel->hlen;
+		mtu = dst_pmtu(&rt->u.dst) - tunnel->hlen;
 	else
-		mtu = skb->dst ? skb->dst->pmtu : dev->mtu;
+		mtu = skb->dst ? dst_pmtu(skb->dst) : dev->mtu;
+
+	if (skb->dst)
+		skb->dst->ops->update_pmtu(skb->dst, mtu);
 
 	if (skb->protocol == htons(ETH_P_IP)) {
-		if (skb->dst && mtu < skb->dst->pmtu && mtu >= 68)
-			skb->dst->pmtu = mtu;
+		if (skb->dst)
+			skb->dst->ops->update_pmtu(skb->dst, mtu);
 
 		df |= (old_iph->frag_off&htons(IP_DF));
 
@@ -798,11 +797,11 @@
 	else if (skb->protocol == htons(ETH_P_IPV6)) {
 		struct rt6_info *rt6 = (struct rt6_info*)skb->dst;
 
-		if (rt6 && mtu < rt6->u.dst.pmtu && mtu >= IPV6_MIN_MTU) {
+		if (rt6 && mtu < dst_pmtu(skb->dst) && mtu >= IPV6_MIN_MTU) {
 			if ((tunnel->parms.iph.daddr && !MULTICAST(tunnel->parms.iph.daddr)) ||
 			    rt6->rt6i_dst.plen == 128) {
 				rt6->rt6i_flags |= RTF_MODIFIED;
-				skb->dst->pmtu = mtu;
+				skb->dst->metrics[RTAX_MTU-1] = mtu;
 			}
 		}
 
@@ -1118,11 +1117,12 @@
 
 	MOD_INC_USE_COUNT;
 	if (MULTICAST(t->parms.iph.daddr)) {
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = t->parms.link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = t->parms.iph.daddr,
 						.saddr = t->parms.iph.saddr,
 						.tos = RT_TOS(t->parms.iph.tos) } },
-				    .oif = t->parms.link };
+				    .proto = IPPROTO_GRE };
 		struct rtable *rt;
 		if (ip_route_output_key(&rt, &fl)) {
 			MOD_DEC_USE_COUNT;
@@ -1194,11 +1194,12 @@
 	/* Guess output device to choose reasonable mtu and hard_header_len */
 
 	if (iph->daddr) {
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = tunnel->parms.link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = iph->daddr,
 						.saddr = iph->saddr,
 						.tos = RT_TOS(iph->tos) } },
-				    .oif = tunnel->parms.link };
+				    .proto = IPPROTO_GRE };
 		struct rtable *rt;
 		if (!ip_route_output_key(&rt, &fl)) {
 			tdev = rt->u.dst.dev;
diff -Nru a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
--- a/net/ipv4/ip_input.c	Wed Oct 30 16:44:20 2002
+++ b/net/ipv4/ip_input.c	Wed Oct 30 16:44:20 2002
@@ -141,6 +141,7 @@
 #include <net/raw.h>
 #include <net/checksum.h>
 #include <linux/netfilter_ipv4.h>
+#include <net/xfrm.h>
 #include <linux/mroute.h>
 #include <linux/netlink.h>
 
@@ -222,6 +223,15 @@
 		struct inet_protocol *ipprot;
 
 	resubmit:
+
+		/* Fuck... This IS ugly. */
+		if (protocol != IPPROTO_AH &&
+		    protocol != IPPROTO_ESP &&
+		    !xfrm_policy_check(XFRM_POLICY_IN, skb)) {
+			kfree_skb(skb);
+			return 0;
+		}
+
 		hash = protocol & (MAX_INET_PROTOS - 1);
 		raw_sk = raw_v4_htable[hash];
 
@@ -237,11 +247,14 @@
 				protocol = -ret;
 				goto resubmit;
 			}
+			IP_INC_STATS_BH(IpInDelivers);
 		} else {
 			if (!raw_sk) {
+				IP_INC_STATS_BH(IpInUnknownProtos);
 				icmp_send(skb, ICMP_DEST_UNREACH,
 					  ICMP_PROT_UNREACH, 0);
-			}
+			} else
+				IP_INC_STATS_BH(IpInDelivers);
 			kfree_skb(skb);
 		}
 	}
@@ -304,8 +317,10 @@
 		                                      --ANK (980813)
 		*/
 
-		if (skb_cow(skb, skb_headroom(skb)))
+		if (skb_cow(skb, skb_headroom(skb))) {
+			IP_INC_STATS_BH(IpInDiscards);
 			goto drop;
+		}
 		iph = skb->nh.iph;
 
 		if (ip_options_compile(NULL, skb))
@@ -353,8 +368,10 @@
 
 	IP_INC_STATS_BH(IpInReceives);
 
-	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
+	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
+		IP_INC_STATS_BH(IpInDiscards);
 		goto out;
+	}
 
 	if (!pskb_may_pull(skb, sizeof(struct iphdr)))
 		goto inhdr_error;
diff -Nru a/net/ipv4/ip_nat_dumb.c b/net/ipv4/ip_nat_dumb.c
--- a/net/ipv4/ip_nat_dumb.c	Wed Oct 30 16:44:31 2002
+++ b/net/ipv4/ip_nat_dumb.c	Wed Oct 30 16:44:31 2002
@@ -118,15 +118,17 @@
 				if (ciph->daddr != osaddr) {
 					struct   fib_result res;
 					unsigned flags = 0;
-					struct flowi fl = { .nl_u =
-							    { .ip4_u =
-							      { .daddr = ciph->saddr,
-								.saddr = ciph->daddr,
+					struct flowi fl = {
+						.iif = skb->dev->ifindex,
+						.nl_u =
+						{ .ip4_u =
+						  { .daddr = ciph->saddr,
+						    .saddr = ciph->daddr,
 #ifdef CONFIG_IP_ROUTE_TOS
-								.tos = RT_TOS(ciph->tos)
+						    .tos = RT_TOS(ciph->tos)
 #endif
-							      } },
-							    .iif = skb->dev->ifindex };
+						  } },
+						.proto = ciph->protocol };
 
 					/* Use fib_lookup() until we get our own
 					 * hash table of NATed hosts -- Rani
diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
--- a/net/ipv4/ip_output.c	Wed Oct 30 16:44:34 2002
+++ b/net/ipv4/ip_output.c	Wed Oct 30 16:44:34 2002
@@ -287,6 +287,7 @@
 	struct ip_options *opt = inet->opt;
 	struct rtable *rt;
 	struct iphdr *iph;
+	u32 mtu;
 
 	/* Skip all of this if the packet is already routed,
 	 * f.e. by something like SCTP.
@@ -306,15 +307,19 @@
 			daddr = opt->faddr;
 
 		{
-			struct flowi fl = { .nl_u = { .ip4_u =
+			struct flowi fl = { .oif = sk->bound_dev_if,
+					    .nl_u = { .ip4_u =
 						      { .daddr = daddr,
 							.saddr = inet->saddr,
 							.tos = RT_CONN_FLAGS(sk) } },
-					    .oif = sk->bound_dev_if };
+					    .proto = sk->protocol,
+					    .uli_u = { .ports =
+						       { .sport = inet->sport,
+							 .dport = inet->dport } } };
 
 			/* If this fails, retransmit mechanism of transport layer will
-			 * keep trying until route appears or the connection times itself
-			 * out.
+			 * keep trying until route appears or the connection times
+			 * itself out.
 			 */
 			if (ip_route_output_key(&rt, &fl))
 				goto no_route;
@@ -348,12 +353,13 @@
 		ip_options_build(skb, opt, inet->daddr, rt, 0);
 	}
 
-	if (skb->len > rt->u.dst.pmtu && (sk->route_caps&NETIF_F_TSO)) {
+	mtu = dst_pmtu(&rt->u.dst);
+	if (skb->len > mtu && (sk->route_caps&NETIF_F_TSO)) {
 		unsigned int hlen;
 
 		/* Hack zone: all this must be done by TCP. */
 		hlen = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
-		skb_shinfo(skb)->tso_size = rt->u.dst.pmtu - hlen;
+		skb_shinfo(skb)->tso_size = mtu - hlen;
 		skb_shinfo(skb)->tso_segs =
 			(skb->len - hlen + skb_shinfo(skb)->tso_size - 1)/
 				skb_shinfo(skb)->tso_size - 1;
@@ -396,6 +402,10 @@
 	/* Connection association is same as pre-frag packet */
 	to->nfct = from->nfct;
 	nf_conntrack_get(to->nfct);
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	to->nf_bridge = from->nf_bridge;
+	nf_bridge_get(to->nf_bridge);
+#endif
 #ifdef CONFIG_NETFILTER_DEBUG
 	to->nf_debug = from->nf_debug;
 #endif
@@ -432,7 +442,7 @@
 
 	if (unlikely(iph->frag_off & htons(IP_DF))) {
 		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
-			  htonl(rt->u.dst.pmtu));
+			  htonl(dst_pmtu(&rt->u.dst)));
 		kfree_skb(skb);
 		return -EMSGSIZE;
 	}
@@ -442,7 +452,7 @@
 	 */
 
 	hlen = iph->ihl * 4;
-	mtu = rt->u.dst.pmtu - hlen;	/* Size of data space */
+	mtu = dst_pmtu(&rt->u.dst) - hlen;	/* Size of data space */
 
 	/* When frag_list is given, use it. First, check its validity:
 	 * some transformers could create wrong frag_list or break existing
@@ -743,7 +753,7 @@
 			inet->cork.addr = ipc->addr;
 		}
 		dst_hold(&rt->u.dst);
-		inet->cork.fragsize = mtu = rt->u.dst.pmtu;
+		inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
 		inet->cork.rt = rt;
 		inet->cork.length = 0;
 		inet->sndmsg_page = NULL;
@@ -830,7 +840,7 @@
 			 *	Find where to start putting bytes.
 			 */
 			data = skb_put(skb, fraglen);
-			skb->nh.raw = __skb_pull(skb, exthdrlen);
+			skb->nh.raw = data + exthdrlen;
 			data += fragheaderlen;
 			skb->h.raw = data + exthdrlen;
 
@@ -1059,6 +1069,9 @@
 		goto out;
 	tail_skb = &(skb_shinfo(skb)->frag_list);
 
+	/* move skb->data to ip header from ext header */
+	if (skb->data < skb->nh.raw)
+		__skb_pull(skb, skb->nh.raw - skb->data);
 	while ((tmp_skb = __skb_dequeue(&sk->write_queue)) != NULL) {
 		__skb_pull(tmp_skb, skb->h.raw - skb->nh.raw);
 		*tail_skb = tmp_skb;
@@ -1206,7 +1219,8 @@
 		struct flowi fl = { .nl_u = { .ip4_u =
 					      { .daddr = daddr,
 						.saddr = rt->rt_spec_dst,
-						.tos = RT_TOS(skb->nh.iph->tos) } } };
+						.tos = RT_TOS(skb->nh.iph->tos) } },
+				    .proto = sk->protocol };
 		if (ip_route_output_key(&rt, &fl))
 			return;
 	}
diff -Nru a/net/ipv4/ip_proc.c b/net/ipv4/ip_proc.c
--- a/net/ipv4/ip_proc.c	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,554 +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.
- *
- *		ipv4 proc support
- *
- *		Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2002/10/10
- *
- *		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
- */
-
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/netdevice.h>
-#include <net/neighbour.h>
-#include <net/arp.h>
-#include <net/udp.h>
-#include <linux/rtnetlink.h>
-#include <linux/route.h>
-#include <net/ip_fib.h>
-#include <linux/seq_file.h>
-#include <linux/proc_fs.h>
-
-extern int raw_get_info(char *, char **, off_t, int);
-extern int snmp_get_info(char *, char **, off_t, int);
-extern int netstat_get_info(char *, char **, off_t, int);
-extern int afinet_get_info(char *, char **, off_t, int);
-extern int tcp_get_info(char *, char **, off_t, int);
-
-#ifdef CONFIG_PROC_FS
-#ifdef CONFIG_AX25
-
-/* ------------------------------------------------------------------------ */
-/*
- *	ax25 -> ASCII conversion
- */
-static char *ax2asc2(ax25_address *a, char *buf)
-{
-	char c, *s;
-	int n;
-
-	for (n = 0, s = buf; n < 6; n++) {
-		c = (a->ax25_call[n] >> 1) & 0x7F;
-
-		if (c != ' ') *s++ = c;
-	}
-	
-	*s++ = '-';
-
-	if ((n = ((a->ax25_call[6] >> 1) & 0x0F)) > 9) {
-		*s++ = '1';
-		n -= 10;
-	}
-	
-	*s++ = n + '0';
-	*s++ = '\0';
-
-	if (*buf == '\0' || *buf == '-')
-	   return "*";
-
-	return buf;
-
-}
-#endif /* CONFIG_AX25 */
-
-struct arp_iter_state {
-	int is_pneigh, bucket;
-};
-
-static __inline__ struct neighbour *neigh_get_bucket(struct seq_file *seq,
-						     loff_t *pos)
-{
-	struct neighbour *n = NULL;
-	struct arp_iter_state* state = seq->private;
-	loff_t l = *pos;
-	int i;
-
-	for (; state->bucket <= NEIGH_HASHMASK; ++state->bucket)
-		for (i = 0, n = arp_tbl.hash_buckets[state->bucket]; n;
-		     ++i, n = n->next)
-			/* Do not confuse users "arp -a" with magic entries */
-			if ((n->nud_state & ~NUD_NOARP) && !l--) {
-				*pos = i;
-				goto out;
-			}
-out:
-	return n;
-}
-
-static __inline__ struct pneigh_entry *pneigh_get_bucket(struct seq_file *seq,
-							 loff_t *pos)
-{
-	struct pneigh_entry *n = NULL;
-	struct arp_iter_state* state = seq->private;
-	loff_t l = *pos;
-	int i;
-
-	for (; state->bucket <= PNEIGH_HASHMASK; ++state->bucket)
-		for (i = 0, n = arp_tbl.phash_buckets[state->bucket]; n;
-		     ++i, n = n->next)
-			if (!l--) {
-				*pos = i;
-				goto out;
-			}
-out:
-	return n;
-}
-
-static __inline__ void *arp_get_bucket(struct seq_file *seq, loff_t *pos)
-{
-	void *rc = neigh_get_bucket(seq, pos);
-
-	if (!rc) {
-		struct arp_iter_state* state = seq->private;
-
-		read_unlock_bh(&arp_tbl.lock);
-		state->is_pneigh = 1;
-		state->bucket	 = 0;
-		*pos		 = 0;
-		rc = pneigh_get_bucket(seq, pos);
-	}
-	return rc;
-}
-
-static void *arp_seq_start(struct seq_file *seq, loff_t *pos)
-{
-	read_lock_bh(&arp_tbl.lock);
-	return *pos ? arp_get_bucket(seq, pos) : (void *)1;
-}
-
-static void *arp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
-{
-	void *rc;
-	struct arp_iter_state* state;
-
-	if (v == (void *)1) {
-		rc = arp_get_bucket(seq, pos);
-		goto out;
-	}
-
-	state = seq->private;
-	if (!state->is_pneigh) {
-		struct neighbour *n = v;
-
-		rc = n = n->next;
-		if (n)
-			goto out;
-		*pos = 0;
-		++state->bucket;
-		rc = neigh_get_bucket(seq, pos);
-		if (rc)
-			goto out;
-		read_unlock_bh(&arp_tbl.lock);
-		state->is_pneigh = 1;
-		state->bucket	 = 0;
-		*pos		 = 0;
-		rc = pneigh_get_bucket(seq, pos);
-	} else {
-		struct pneigh_entry *pn = v;
-
-		pn = pn->next;
-		if (!pn) {
-			++state->bucket;
-			*pos = 0;
-			pn   = pneigh_get_bucket(seq, pos);
-		}
-		rc = pn;
-	}
-out:
-	++*pos;
-	return rc;
-}
-
-static void arp_seq_stop(struct seq_file *seq, void *v)
-{
-	struct arp_iter_state* state = seq->private;
-
-	if (!state->is_pneigh)
-		read_unlock_bh(&arp_tbl.lock);
-}
-
-#define HBUFFERLEN 30
-
-static __inline__ void arp_format_neigh_entry(struct seq_file *seq,
-					      struct neighbour *n)
-{
-	char hbuffer[HBUFFERLEN];
-	const char hexbuf[] = "0123456789ABCDEF";
-	int k, j;
-	char tbuf[16];
-	struct net_device *dev = n->dev;
-	int hatype = dev->type;
-
-	read_lock(&n->lock);
-	/* Convert hardware address to XX:XX:XX:XX ... form. */
-#ifdef CONFIG_AX25
-	if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM)
-		ax2asc2((ax25_address *)n->ha, hbuffer);
-	else {
-#endif
-	for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) {
-		hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15];
-		hbuffer[k++] = hexbuf[n->ha[j] & 15];
-		hbuffer[k++] = ':';
-	}
-	hbuffer[--k] = 0;
-#ifdef CONFIG_AX25
-	}
-#endif
-	sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key));
-	seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
-		   tbuf, hatype, arp_state_to_flags(n), hbuffer, dev->name);
-	read_unlock(&n->lock);
-}
-
-static __inline__ void arp_format_pneigh_entry(struct seq_file *seq,
-					       struct pneigh_entry *n)
-{
-
-	struct net_device *dev = n->dev;
-	int hatype = dev ? dev->type : 0;
-	char tbuf[16];
-
-	sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key));
-	seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
-		   tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00",
-		   dev ? dev->name : "*");
-}
-
-static int arp_seq_show(struct seq_file *seq, void *v)
-{
-	if (v == (void *)1)
-		seq_puts(seq, "IP address       HW type     Flags       "
-			      "HW address            Mask     Device\n");
-	else {
-		struct arp_iter_state* state = seq->private;
-
-		if (state->is_pneigh)
-			arp_format_pneigh_entry(seq, v);
-		else
-			arp_format_neigh_entry(seq, v);
-	}
-
-	return 0;
-}
-
-/* ------------------------------------------------------------------------ */
-
-static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
-{
-	return *pos ? NULL : (void *)1;
-}
-
-static void *fib_seq_next(struct seq_file *seq, void *v, loff_t *pos)
-{
-	return NULL;
-}
-
-static void fib_seq_stop(struct seq_file *seq, void *v)
-{
-}
-/* 
- *	This outputs /proc/net/route.
- *
- *	It always works in backward compatibility mode.
- *	The format of the file is not supposed to be changed.
- */
-static int fib_seq_show(struct seq_file *seq, void *v)
-{
-	seq_printf(seq, "%-127s\n", "Iface\tDestination\tGateway "
-			"\tFlags\tRefCnt\tUse\tMetric\tMask\t\tMTU"
-			"\tWindow\tIRTT");
-	if (ip_fib_main_table)
-		ip_fib_main_table->tb_seq_show(ip_fib_main_table, seq);
-
-	return 0;
-}
-
-/* ------------------------------------------------------------------------ */
-
-struct udp_iter_state {
-	int bucket;
-};
-
-static __inline__ struct sock *udp_get_bucket(struct seq_file *seq, loff_t *pos)
-{
-	int i;
-	struct sock *sk = NULL;
-	loff_t l = *pos;
-	struct udp_iter_state *state = seq->private;
-
-	for (; state->bucket < UDP_HTABLE_SIZE; ++state->bucket)
-		for (i = 0, sk = udp_hash[state->bucket]; sk; ++i, sk = sk->next) {
-			if (sk->family != PF_INET)
-				continue;
-			if (l--)
-				continue;
-			*pos = i;
-			goto out;
-		}
-out:
-	return sk;
-}
-
-static void *udp_seq_start(struct seq_file *seq, loff_t *pos)
-{
-	read_lock(&udp_hash_lock);
-	return *pos ? udp_get_bucket(seq, pos) : (void *)1;
-}
-
-static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
-{
-	struct sock *sk;
-	struct udp_iter_state *state;
-
-	if (v == (void *)1) {
-		sk = udp_get_bucket(seq, pos);
-		goto out;
-	}
-
-	sk = v;
-	sk = sk->next;
-	if (sk) 
-		goto out;
-
-	state = seq->private;
-	if (++state->bucket >= UDP_HTABLE_SIZE) 
-		goto out;
-
-	*pos = 0;
-	sk = udp_get_bucket(seq, pos);
-out:
-	++*pos;
-	return sk;
-}
-
-static void udp_seq_stop(struct seq_file *seq, void *v)
-{
-	read_unlock(&udp_hash_lock);
-}
-
-static void udp_format_sock(struct sock *sp, char *tmpbuf, int bucket)
-{
-	struct inet_opt *inet = inet_sk(sp);
-	unsigned int dest = inet->daddr;
-	unsigned int src  = inet->rcv_saddr;
-	__u16 destp	  = ntohs(inet->dport);
-	__u16 srcp	  = ntohs(inet->sport);
-
-	sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
-		" %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
-		bucket, src, srcp, dest, destp, sp->state, 
-		atomic_read(&sp->wmem_alloc), atomic_read(&sp->rmem_alloc),
-		0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
-		atomic_read(&sp->refcnt), sp);
-}
-
-static int udp_seq_show(struct seq_file *seq, void *v)
-{
-	if (v == (void *)1)
-		seq_printf(seq, "%-127s\n",
-			   "  sl  local_address rem_address   st tx_queue "
-			   "rx_queue tr tm->when retrnsmt   uid  timeout "
-			   "inode");
-	else {
-		char tmpbuf[129];
-		struct udp_iter_state *state = seq->private;
-
-		udp_format_sock(v, tmpbuf, state->bucket);
-		seq_printf(seq, "%-127s\n", tmpbuf);
-	}
-	return 0;
-}
-/* ------------------------------------------------------------------------ */
-
-static struct seq_operations arp_seq_ops = {
-	.start  = arp_seq_start,
-	.next   = arp_seq_next,
-	.stop   = arp_seq_stop,
-	.show   = arp_seq_show,
-};
-
-static struct seq_operations fib_seq_ops = {
-	.start  = fib_seq_start,
-	.next   = fib_seq_next,
-	.stop   = fib_seq_stop,
-	.show   = fib_seq_show,
-};
-
-static struct seq_operations udp_seq_ops = {
-	.start  = udp_seq_start,
-	.next   = udp_seq_next,
-	.stop   = udp_seq_stop,
-	.show   = udp_seq_show,
-};
-
-static int arp_seq_open(struct inode *inode, struct file *file)
-{
-	struct seq_file *seq;
-	int rc = -ENOMEM;
-	struct arp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-       
-	if (!s)
-		goto out;
-
-	rc = seq_open(file, &arp_seq_ops);
-	if (rc)
-		goto out_kfree;
-
-	seq	     = file->private_data;
-	seq->private = s;
-	memset(s, 0, sizeof(*s));
-out:
-	return rc;
-out_kfree:
-	kfree(s);
-	goto out;
-}
-
-static int arp_seq_release(struct inode *inode, struct file *file)
-{
-	struct seq_file *seq = (struct seq_file *)file->private_data;
-
-	kfree(seq->private);
-	seq->private = NULL;
-
-	return seq_release(inode, file);
-}
-
-static int fib_seq_open(struct inode *inode, struct file *file)
-{
-	return seq_open(file, &fib_seq_ops);
-}
-
-static int udp_seq_open(struct inode *inode, struct file *file)
-{
-	struct seq_file *seq;
-	int rc = -ENOMEM;
-	struct udp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-       
-	if (!s)
-		goto out;
-
-	rc = seq_open(file, &udp_seq_ops);
-	if (rc)
-		goto out_kfree;
-
-	seq	     = file->private_data;
-	seq->private = s;
-	memset(s, 0, sizeof(*s));
-out:
-	return rc;
-out_kfree:
-	kfree(s);
-	goto out;
-}
-
-static int udp_seq_release(struct inode *inode, struct file *file)
-{
-	struct seq_file *seq = (struct seq_file *)file->private_data;
-
-	kfree(seq->private);
-	seq->private = NULL;
-
-	return seq_release(inode, file);
-}
-
-static struct file_operations arp_seq_fops = {
-	.open           = arp_seq_open,
-	.read           = seq_read,
-	.llseek         = seq_lseek,
-	.release	= arp_seq_release,
-};
-
-static struct file_operations fib_seq_fops = {
-	.open           = fib_seq_open,
-	.read           = seq_read,
-	.llseek         = seq_lseek,
-	.release	= seq_release,
-};
-
-static struct file_operations udp_seq_fops = {
-	.open           = udp_seq_open,
-	.read           = seq_read,
-	.llseek         = seq_lseek,
-	.release	= udp_seq_release,
-};
-
-/* ------------------------------------------------------------------------ */
-
-int __init ipv4_proc_init(void)
-{
-	struct proc_dir_entry *p;
-	int rc = 0;
-
-	if (!proc_net_create("raw", 0, raw_get_info))
-		goto out_raw;
-
-	if (!proc_net_create("netstat", 0, netstat_get_info))
-		goto out_netstat;
-
-	if (!proc_net_create("snmp", 0, snmp_get_info))
-		goto out_snmp;
-
-	if (!proc_net_create("sockstat", 0, afinet_get_info))
-		goto out_sockstat;
-
-	if (!proc_net_create("tcp", 0, tcp_get_info))
-		goto out_tcp;
-
-	p = create_proc_entry("udp", S_IRUGO, proc_net);
-	if (!p)
-		goto out_udp;
-	p->proc_fops = &udp_seq_fops;
-
-	p = create_proc_entry("arp", S_IRUGO, proc_net);
-	if (!p)
-		goto out_arp;
-	p->proc_fops = &arp_seq_fops;
-
-	p = create_proc_entry("route", S_IRUGO, proc_net);
-	if (!p)
-		goto out_route;
-	p->proc_fops = &fib_seq_fops;
-out:
-	return rc;
-out_route:
-	remove_proc_entry("route", proc_net);
-out_arp:
-	remove_proc_entry("udp", proc_net);
-out_udp:
-	proc_net_remove("tcp");
-out_tcp:
-	proc_net_remove("sockstat");
-out_sockstat:
-	proc_net_remove("snmp");
-out_snmp:
-	proc_net_remove("netstat");
-out_netstat:
-	proc_net_remove("raw");
-out_raw:
-	rc = -ENOMEM;
-	goto out;
-}
-#else /* CONFIG_PROC_FS */
-int __init ipv4_proc_init(void)
-{
-	return 0;
-}
-#endif /* CONFIG_PROC_FS */
diff -Nru a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
--- a/net/ipv4/ip_sockglue.c	Wed Oct 30 16:44:26 2002
+++ b/net/ipv4/ip_sockglue.c	Wed Oct 30 16:44:26 2002
@@ -726,7 +726,7 @@
 			val = 0;
 			dst = sk_dst_get(sk);
 			if (dst) {
-				val = dst->pmtu;
+				val = dst_pmtu(dst) - dst->header_len;
 				dst_release(dst);
 			}
 			if (!val) {
diff -Nru a/net/ipv4/ipip.c b/net/ipv4/ipip.c
--- a/net/ipv4/ipip.c	Wed Oct 30 16:44:36 2002
+++ b/net/ipv4/ipip.c	Wed Oct 30 16:44:36 2002
@@ -421,6 +421,7 @@
 	memset(&fl, 0, sizeof(fl));
 	fl.fl4_daddr = eiph->saddr;
 	fl.fl4_tos = RT_TOS(eiph->tos);
+	fl.proto = IPPROTO_IPIP;
 	if (ip_route_output_key(&rt, &key)) {
 		kfree_skb(skb2);
 		return;
@@ -520,12 +521,6 @@
 	return 0;
 }
 
-/* Need this wrapper because NF_HOOK takes the function address */
-static inline int do_ip_send(struct sk_buff *skb)
-{
-	return ip_send(skb);
-}
-
 /*
  *	This function assumes it is being called from dev_queue_xmit()
  *	and that skb is filled properly by that function.
@@ -568,11 +563,12 @@
 	}
 
 	{
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = tunnel->parms.link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = dst,
 						.saddr = tiph->saddr,
 						.tos = RT_TOS(tos) } },
-				    .oif = tunnel->parms.link };
+				    .proto = IPPROTO_IPIP };
 		if (ip_route_output_key(&rt, &fl)) {
 			tunnel->stat.tx_carrier_errors++;
 			goto tx_error_icmp;
@@ -587,17 +583,17 @@
 	}
 
 	if (tiph->frag_off)
-		mtu = rt->u.dst.pmtu - sizeof(struct iphdr);
+		mtu = dst_pmtu(&rt->u.dst) - sizeof(struct iphdr);
 	else
-		mtu = skb->dst ? skb->dst->pmtu : dev->mtu;
+		mtu = skb->dst ? dst_pmtu(skb->dst) : dev->mtu;
 
 	if (mtu < 68) {
 		tunnel->stat.collisions++;
 		ip_rt_put(rt);
 		goto tx_error;
 	}
-	if (skb->dst && mtu < skb->dst->pmtu)
-		skb->dst->pmtu = mtu;
+	if (skb->dst)
+		skb->dst->ops->update_pmtu(skb->dst, mtu);
 
 	df |= (old_iph->frag_off&htons(IP_DF));
 
@@ -836,11 +832,12 @@
 	ipip_tunnel_init_gen(dev);
 
 	if (iph->daddr) {
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = tunnel->parms.link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = iph->daddr,
 						.saddr = iph->saddr,
 						.tos = RT_TOS(iph->tos) } },
-				    .oif = tunnel->parms.link };
+				    .proto = IPPROTO_IPIP };
 		struct rtable *rt;
 		if (!ip_route_output_key(&rt, &fl)) {
 			tdev = rt->u.dst.dev;
diff -Nru a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
--- a/net/ipv4/ipmr.c	Wed Oct 30 16:44:28 2002
+++ b/net/ipv4/ipmr.c	Wed Oct 30 16:44:28 2002
@@ -1146,19 +1146,21 @@
 #endif
 
 	if (vif->flags&VIFF_TUNNEL) {
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = vif->link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = vif->remote,
 						.saddr = vif->local,
 						.tos = RT_TOS(iph->tos) } },
-				    .oif = vif->link };
+				    .proto = IPPROTO_IPIP };
 		if (ip_route_output_key(&rt, &fl))
 			return;
 		encap = sizeof(struct iphdr);
 	} else {
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = vif->link,
+				    .nl_u = { .ip4_u =
 					      { .daddr = iph->daddr,
 						.tos = RT_TOS(iph->tos) } },
-				    .oif = vif->link };
+				    .proto = IPPROTO_IPIP };
 		if (ip_route_output_key(&rt, &fl))
 			return;
 	}
diff -Nru a/net/ipv4/netfilter/Config.help b/net/ipv4/netfilter/Config.help
--- a/net/ipv4/netfilter/Config.help	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,370 +0,0 @@
-CONFIG_IP_NF_CONNTRACK
-  Connection tracking keeps a record of what packets have passed
-  through your machine, in order to figure out how they are related
-  into connections.
-
-  This is required to do Masquerading or other kinds of Network
-  Address Translation (except for Fast NAT).  It can also be used to
-  enhance packet filtering (see `Connection state match support'
-  below).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_IRC
-  There is a commonly-used extension to IRC called
-  Direct Client-to-Client Protocol (DCC).  This enables users to send
-  files to each other, and also chat to each other without the need
-  of a server.  DCC Sending is used anywhere you send files over IRC,
-  and DCC Chat is most commonly used by Eggdrop bots.  If you are
-  using NAT, this extension will enable you to send files and initiate
-  chats.  Note that you do NOT need this extension to get files or
-  have others initiate chats, or everything else in IRC.
-
-  If you want to compile it as a module, say 'M' here and read
-  Documentation/modules.txt.  If unsure, say 'N'.
-
-CONFIG_IP_NF_FTP
-  Tracking FTP connections is problematic: special helpers are
-  required for tracking them, and doing masquerading and other forms
-  of Network Address Translation on them.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `Y'.
-
-CONFIG_IP_NF_QUEUE
-  Netfilter has the ability to queue packets to user space: the
-  netlink device can be used to access them using this driver.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_IPTABLES
-  iptables is a general, extensible packet identification framework.
-  The packet filtering and full NAT (masquerading, port forwarding,
-  etc) subsystems now use this: say `Y' or `M' here if you want to use
-  either of those.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_LIMIT
-  limit matching allows you to control the rate at which a rule can be
-  matched: mainly useful in combination with the LOG target ("LOG
-  target support", below) and to avoid some Denial of Service attacks.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_PKTTYPE
-  This patch allows you to match packet in accrodance
-  to its "class", eg. BROADCAST, MULTICAST, ...
-  
-  Typical usage:
-  iptables -A INPUT -m pkttype --pkt-type broadcast -j LOG
-  
-  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_MAC
-  MAC matching allows you to match packets based on the source
-  Ethernet address of the packet.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_MARK
-  Netfilter mark matching allows you to match packets based on the
-  `nfmark' value in the packet.  This can be set by the MARK target
-  (see below).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_MULTIPORT
-  Multiport matching allows you to match TCP or UDP packets based on
-  a series of source or destination ports: normally a rule can only
-  match a single range of ports.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_TTL
-  This adds CONFIG_IP_NF_MATCH_TTL option, which enabled the user
-  to match packets by their TTL value.
-
-  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_LENGTH
-  This option allows you to match the length of a packet against a
-  specific value or range of values.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_AH_ESP
-  These two match extensions (`ah' and `esp') allow you to match a
-  range of SPIs inside AH or ESP headers of IPSec packets.
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_DSCP
-  This option adds a `DSCP' match, which allows you to match against
-  the IPv4 header DSCP field (DSCP codepoint).
-
-  The DSCP codepoint can have any value between 0x0 and 0x4f.
-
-  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_ECN
-  This option adds a `ECN' match, which allows you to match against
-  the IPv4 and TCP header ECN fields.
-
-  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_TOS
-  TOS matching allows you to match packets based on the Type Of
-  Service fields of the IP packet.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_CONNTRACK
-  This is a general conntrack match module, a superset of the state match.
-
-  It allows matching on additional conntrack information, which is
-  useful in complex configurations, such as NAT gateways with multiple
-  internet links or tunnels.
-
-  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_STATE
-  Connection state matching allows you to match packets based on their
-  relationship to a tracked connection (ie. previous packets).  This
-  is a powerful tool for packet classification.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_UNCLEAN
-  Unclean packet matching matches any strange or invalid packets, by
-  looking at a series of fields in the IP, TCP, UDP and ICMP headers.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_OWNER
-  Packet owner matching allows you to match locally-generated packets
-  based on who created them: the user, group, process or session.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_FILTER
-  Packet filtering defines a table `filter', which has a series of
-  rules for simple packet filtering at local input, forwarding and
-  local output.  See the man page for iptables(8).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_REJECT
-  The REJECT target allows a filtering rule to specify that an ICMP
-  error should be issued in response to an incoming packet, rather
-  than silently being dropped.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_MIRROR
-  The MIRROR target allows a filtering rule to specify that an
-  incoming packet should be bounced back to the sender.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_NAT
-  The Full NAT option allows masquerading, port forwarding and other
-  forms of full Network Address Port Translation.  It is controlled by
-  the `nat' table in iptables: see the man page for iptables(8).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_NAT_LOCAL
-  This option enables support for NAT of locally originated connections. 
-  Enable this if you need to use destination NAT on connections
-  originating from local processes on the nat box itself.
-
-  Please note that you will need a recent version (>= 1.2.6a)
-  of the iptables userspace program in order to use this feature.
-  See http://www.iptables.org/ for download instructions.
-
-  If unsure, say 'N'.
-
-CONFIG_IP_NF_TARGET_MASQUERADE
-  Masquerading is a special case of NAT: all outgoing connections are
-  changed to seem to come from a particular interface's address, and
-  if the interface goes down, those connections are lost.  This is
-  only useful for dialup accounts with dynamic IP address (ie. your IP
-  address will be different on next dialup).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_NAT_SNMP_BASIC
-
-  This module implements an Application Layer Gateway (ALG) for
-  SNMP payloads.  In conjunction with NAT, it allows a network
-  management system to access multiple private networks with
-  conflicting addresses.  It works by modifying IP addresses
-  inside SNMP payloads to match IP-layer NAT mapping.
-
-  This is the "basic" form of SNMP-ALG, as described in RFC 2962
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_REDIRECT
-  REDIRECT is a special case of NAT: all incoming connections are
-  mapped onto the incoming interface's address, causing the packets to
-  come to the local machine instead of passing through.  This is
-  useful for transparent proxies.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MANGLE
-  This option adds a `mangle' table to iptables: see the man page for
-  iptables(8).  This table is used for various packet alterations
-  which can effect how the packet is routed.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_DSCP
-  This option adds a `DSCP' target, which allows you to create rules in
-  the iptables mangle table. The selected packet has the DSCP field set
-  to the hex value provided on the command line; unlike the TOS target
-  which will only set the legal values within ip.h.
-
-  The DSCP field can be set to any value between 0x0 and 0x4f. It does
-  take into account that bits 6 and 7 are used by ECN.
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_ECN
-  This option adds a `ECN' target, which can be used in the iptables mangle
-  table.  
-
-  You can use this target to remove the ECN bits from the IPv4 header of
-  an IP packet.  This is particularly useful, if you need to work around
-  existing ECN blackholes on the internet, but don't want to disable
-  ECN support in general.
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_TOS
-  This option adds a `TOS' target, which allows you to create rules in
-  the `mangle' table which alter the Type Of Service field of an IP
-  packet prior to routing.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_MARK
-  This option adds a `MARK' target, which allows you to create rules
-  in the `mangle' table which alter the netfilter mark (nfmark) field
-  associated with the packet prior to routing. This can change
-  the routing method (see `Use netfilter MARK value as routing
-  key') and can also be used by other subsystems to change their
-  behavior.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_HELPER
-  Helper matching allows you to match packets in dynamic connections
-  tracked by a conntrack-helper, ie. ip_conntrack_ftp
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `Y'.
-
-CONFIG_IP_NF_TARGET_TCPMSS
-  This option adds a `TCPMSS' target, which allows you to alter the
-  MSS value of TCP SYN packets, to control the maximum size for that
-  connection (usually limiting it to your outgoing interface's MTU
-  minus 40).
-
-  This is used to overcome criminally braindead ISPs or servers which
-  block ICMP Fragmentation Needed packets.  The symptoms of this
-  problem are that everything works fine from your Linux
-  firewall/router, but machines behind it can never exchange large
-  packets:
-	1) Web browsers connect, then hang with no data received.
-	2) Small mail works fine, but large emails hang.
-	3) ssh works fine, but scp hangs after initial handshaking.
-
-  Workaround: activate this option and add a rule to your firewall
-  configuration like:
-
-        iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
-		 -j TCPMSS --clamp-mss-to-pmtu
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_MATCH_TCPMSS
-  This option adds a `tcpmss' match, which allows you to examine the
-  MSS value of TCP SYN packets, which control the maximum packet size
-  for that connection.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_ULOG
-  This option adds a `ULOG' target, which allows you to create rules in
-  any iptables table. The packet is passed to a userspace logging
-  daemon using netlink multicast sockets; unlike the LOG target
-  which can only be viewed through syslog.
-
-  The apropriate userspace logging daemon (ulogd) may be obtained from
-  http://www.gnumonks.org/projects/ulogd
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `N'.
-
-CONFIG_IP_NF_TARGET_LOG
-  This option adds a `LOG' target, which allows you to create rules in
-  any iptables table which records the packet header to the syslog.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_COMPAT_IPCHAINS
-  This option places ipchains (with masquerading and redirection
-  support) back into the kernel, using the new netfilter
-  infrastructure.  It is not recommended for new installations (see
-  `Packet filtering').  With this enabled, you should be able to use
-  the ipchains tool exactly as in 2.2 kernels.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP_NF_COMPAT_IPFWADM
-  This option places ipfwadm (with masquerading and redirection
-  support) back into the kernel, using the new netfilter
-  infrastructure.  It is not recommended for new installations (see
-  `Packet filtering').  With this enabled, you should be able to use
-  the ipfwadm tool exactly as in 2.0 kernels.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
diff -Nru a/net/ipv4/netfilter/Config.in b/net/ipv4/netfilter/Config.in
--- a/net/ipv4/netfilter/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,116 +0,0 @@
-#
-# IP netfilter configuration
-#
-mainmenu_option next_comment
-comment '  IP: Netfilter Configuration'
-
-tristate 'Connection tracking (required for masq/NAT)' CONFIG_IP_NF_CONNTRACK
-if [ "$CONFIG_IP_NF_CONNTRACK" != "n" ]; then
-  dep_tristate '  FTP protocol support' CONFIG_IP_NF_FTP $CONFIG_IP_NF_CONNTRACK
-  dep_tristate '  IRC protocol support' CONFIG_IP_NF_IRC $CONFIG_IP_NF_CONNTRACK
-fi
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Userspace queueing via NETLINK (EXPERIMENTAL)' CONFIG_IP_NF_QUEUE
-fi
-tristate 'IP tables support (required for filtering/masq/NAT)' CONFIG_IP_NF_IPTABLES
-if [ "$CONFIG_IP_NF_IPTABLES" != "n" ]; then
-# The simple matches.
-  dep_tristate '  limit match support' CONFIG_IP_NF_MATCH_LIMIT $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  MAC address match support' CONFIG_IP_NF_MATCH_MAC $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  Packet type match support' CONFIG_IP_NF_MATCH_PKTTYPE $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  netfilter MARK match support' CONFIG_IP_NF_MATCH_MARK $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  Multiple port match support' CONFIG_IP_NF_MATCH_MULTIPORT $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  TOS match support' CONFIG_IP_NF_MATCH_TOS $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  ECN match support' CONFIG_IP_NF_MATCH_ECN $CONFIG_IP_NF_IPTABLES
- 
-  dep_tristate '  DSCP match support' CONFIG_IP_NF_MATCH_DSCP $CONFIG_IP_NF_IPTABLES
- 
-  dep_tristate '  AH/ESP match support' CONFIG_IP_NF_MATCH_AH_ESP $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  LENGTH match support' CONFIG_IP_NF_MATCH_LENGTH $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  TTL match support' CONFIG_IP_NF_MATCH_TTL $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  tcpmss match support' CONFIG_IP_NF_MATCH_TCPMSS $CONFIG_IP_NF_IPTABLES
-  if [ "$CONFIG_IP_NF_CONNTRACK" != "n" ]; then
-    dep_tristate '  Helper match support' CONFIG_IP_NF_MATCH_HELPER $CONFIG_IP_NF_IPTABLES
-  fi
-  if [ "$CONFIG_IP_NF_CONNTRACK" != "n" ]; then
-    dep_tristate '  Connection state match support' CONFIG_IP_NF_MATCH_STATE $CONFIG_IP_NF_CONNTRACK $CONFIG_IP_NF_IPTABLES 
-    dep_tristate '  Connection tracking match support' CONFIG_IP_NF_MATCH_CONNTRACK $CONFIG_IP_NF_CONNTRACK $CONFIG_IP_NF_IPTABLES 
-  fi
-  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-    dep_tristate '  Unclean match support (EXPERIMENTAL)' CONFIG_IP_NF_MATCH_UNCLEAN $CONFIG_IP_NF_IPTABLES
-    dep_tristate '  Owner match support (EXPERIMENTAL)' CONFIG_IP_NF_MATCH_OWNER $CONFIG_IP_NF_IPTABLES
-  fi
-# The targets
-  dep_tristate '  Packet filtering' CONFIG_IP_NF_FILTER $CONFIG_IP_NF_IPTABLES 
-  if [ "$CONFIG_IP_NF_FILTER" != "n" ]; then
-    dep_tristate '    REJECT target support' CONFIG_IP_NF_TARGET_REJECT $CONFIG_IP_NF_FILTER
-    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '    MIRROR target support (EXPERIMENTAL)' CONFIG_IP_NF_TARGET_MIRROR $CONFIG_IP_NF_FILTER
-    fi
-  fi
-
-  if [ "$CONFIG_IP_NF_CONNTRACK" != "n" ]; then
-    dep_tristate '  Full NAT' CONFIG_IP_NF_NAT $CONFIG_IP_NF_IPTABLES $CONFIG_IP_NF_CONNTRACK
-    if [ "$CONFIG_IP_NF_NAT" != "n" ]; then
-      define_bool CONFIG_IP_NF_NAT_NEEDED y
-      dep_tristate '    MASQUERADE target support' CONFIG_IP_NF_TARGET_MASQUERADE $CONFIG_IP_NF_NAT
-      dep_tristate '    REDIRECT target support' CONFIG_IP_NF_TARGET_REDIRECT $CONFIG_IP_NF_NAT
-      bool '    NAT of local connections (READ HELP)' CONFIG_IP_NF_NAT_LOCAL
-      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-        dep_tristate '    Basic SNMP-ALG support (EXPERIMENTAL)' CONFIG_IP_NF_NAT_SNMP_BASIC $CONFIG_IP_NF_NAT
-      fi
-      if [ "$CONFIG_IP_NF_IRC" = "m" ]; then
-        define_tristate CONFIG_IP_NF_NAT_IRC m
-      else
-        if [ "$CONFIG_IP_NF_IRC" = "y" ]; then
-          define_tristate CONFIG_IP_NF_NAT_IRC $CONFIG_IP_NF_NAT
-        fi
-      fi
-      # If they want FTP, set to $CONFIG_IP_NF_NAT (m or y), 
-      # or $CONFIG_IP_NF_FTP (m or y), whichever is weaker.  Argh.
-      if [ "$CONFIG_IP_NF_FTP" = "m" ]; then
-	define_tristate CONFIG_IP_NF_NAT_FTP m
-      else
-        if [ "$CONFIG_IP_NF_FTP" = "y" ]; then
-          define_tristate CONFIG_IP_NF_NAT_FTP $CONFIG_IP_NF_NAT
-        fi
-      fi
-    fi
-  fi
-
-  dep_tristate '  Packet mangling' CONFIG_IP_NF_MANGLE $CONFIG_IP_NF_IPTABLES 
-  if [ "$CONFIG_IP_NF_MANGLE" != "n" ]; then
-    dep_tristate '    TOS target support' CONFIG_IP_NF_TARGET_TOS $CONFIG_IP_NF_MANGLE
-    dep_tristate '    ECN target support' CONFIG_IP_NF_TARGET_ECN $CONFIG_IP_NF_MANGLE
- 
-    dep_tristate '    DSCP target support' CONFIG_IP_NF_TARGET_DSCP $CONFIG_IP_NF_MANGLE
- 
-    dep_tristate '    MARK target support' CONFIG_IP_NF_TARGET_MARK $CONFIG_IP_NF_MANGLE
-  fi
-  dep_tristate '  LOG target support' CONFIG_IP_NF_TARGET_LOG $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  ULOG target support' CONFIG_IP_NF_TARGET_ULOG $CONFIG_IP_NF_IPTABLES
-  dep_tristate '  TCPMSS target support' CONFIG_IP_NF_TARGET_TCPMSS $CONFIG_IP_NF_IPTABLES
-fi
-
-tristate 'ARP tables support' CONFIG_IP_NF_ARPTABLES
-if [ "$CONFIG_IP_NF_ARPTABLES" != "n" ]; then
-  dep_tristate '  ARP packet filtering' CONFIG_IP_NF_ARPFILTER $CONFIG_IP_NF_ARPTABLES 
-fi
-
-# Backwards compatibility modules: only if you don't build in the others.
-if [ "$CONFIG_IP_NF_CONNTRACK" != "y" ]; then
-  if [ "$CONFIG_IP_NF_IPTABLES" != "y" ]; then
-    tristate 'ipchains (2.2-style) support' CONFIG_IP_NF_COMPAT_IPCHAINS
-    if [ "$CONFIG_IP_NF_COMPAT_IPCHAINS" != "n" ]; then
-      define_bool CONFIG_IP_NF_NAT_NEEDED y
-    fi
-    if [ "$CONFIG_IP_NF_COMPAT_IPCHAINS" != "y" ]; then
-      tristate 'ipfwadm (2.0-style) support' CONFIG_IP_NF_COMPAT_IPFWADM
-      if [ "$CONFIG_IP_NF_COMPAT_IPFWADM" != "n" ]; then
-	define_bool CONFIG_IP_NF_NAT_NEEDED y
-      fi
-    fi
-  fi
-fi
-endmenu
diff -Nru a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/netfilter/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,525 @@
+#
+# IP netfilter configuration
+#
+
+menu "IP: Netfilter Configuration"
+	depends on INET && NETFILTER
+
+config IP_NF_CONNTRACK
+	tristate "Connection tracking (required for masq/NAT)"
+	---help---
+	  Connection tracking keeps a record of what packets have passed
+	  through your machine, in order to figure out how they are related
+	  into connections.
+
+	  This is required to do Masquerading or other kinds of Network
+	  Address Translation (except for Fast NAT).  It can also be used to
+	  enhance packet filtering (see `Connection state match support'
+	  below).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_FTP
+	tristate "FTP protocol support"
+	depends on IP_NF_CONNTRACK
+	help
+	  Tracking FTP connections is problematic: special helpers are
+	  required for tracking them, and doing masquerading and other forms
+	  of Network Address Translation on them.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `Y'.
+
+config IP_NF_IRC
+	tristate "IRC protocol support"
+	depends on IP_NF_CONNTRACK
+	---help---
+	  There is a commonly-used extension to IRC called
+	  Direct Client-to-Client Protocol (DCC).  This enables users to send
+	  files to each other, and also chat to each other without the need
+	  of a server.  DCC Sending is used anywhere you send files over IRC,
+	  and DCC Chat is most commonly used by Eggdrop bots.  If you are
+	  using NAT, this extension will enable you to send files and initiate
+	  chats.  Note that you do NOT need this extension to get files or
+	  have others initiate chats, or everything else in IRC.
+
+	  If you want to compile it as a module, say 'M' here and read
+	  Documentation/modules.txt.  If unsure, say 'N'.
+
+config IP_NF_QUEUE
+	tristate "Userspace queueing via NETLINK (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  Netfilter has the ability to queue packets to user space: the
+	  netlink device can be used to access them using this driver.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_IPTABLES
+	tristate "IP tables support (required for filtering/masq/NAT)"
+	help
+	  iptables is a general, extensible packet identification framework.
+	  The packet filtering and full NAT (masquerading, port forwarding,
+	  etc) subsystems now use this: say `Y' or `M' here if you want to use
+	  either of those.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+# The simple matches.
+config IP_NF_MATCH_LIMIT
+	tristate "limit match support"
+	depends on IP_NF_IPTABLES
+	help
+	  limit matching allows you to control the rate at which a rule can be
+	  matched: mainly useful in combination with the LOG target ("LOG
+	  target support", below) and to avoid some Denial of Service attacks.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_MAC
+	tristate "MAC address match support"
+	depends on IP_NF_IPTABLES
+	help
+	  MAC matching allows you to match packets based on the source
+	  Ethernet address of the packet.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_PKTTYPE
+	tristate "Packet type match support"
+	depends on IP_NF_IPTABLES
+	help
+	  This patch allows you to match packet in accrodance
+	  to its "class", eg. BROADCAST, MULTICAST, ...
+
+	  Typical usage:
+	  iptables -A INPUT -m pkttype --pkt-type broadcast -j LOG
+
+	  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_MARK
+	tristate "netfilter MARK match support"
+	depends on IP_NF_IPTABLES
+	help
+	  Netfilter mark matching allows you to match packets based on the
+	  `nfmark' value in the packet.  This can be set by the MARK target
+	  (see below).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_MULTIPORT
+	tristate "Multiple port match support"
+	depends on IP_NF_IPTABLES
+	help
+	  Multiport matching allows you to match TCP or UDP packets based on
+	  a series of source or destination ports: normally a rule can only
+	  match a single range of ports.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_TOS
+	tristate "TOS match support"
+	depends on IP_NF_IPTABLES
+	help
+	  TOS matching allows you to match packets based on the Type Of
+	  Service fields of the IP packet.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_ECN
+	tristate "ECN match support"
+	depends on IP_NF_IPTABLES
+	help
+	  This option adds a `ECN' match, which allows you to match against
+	  the IPv4 and TCP header ECN fields.
+
+	  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_DSCP
+	tristate "DSCP match support"
+	depends on IP_NF_IPTABLES
+
+config IP_NF_MATCH_AH_ESP
+	tristate "AH/ESP match support"
+	depends on IP_NF_IPTABLES
+	help
+	  These two match extensions (`ah' and `esp') allow you to match a
+	  range of SPIs inside AH or ESP headers of IPSec packets.
+
+	  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_LENGTH
+	tristate "LENGTH match support"
+	depends on IP_NF_IPTABLES
+	help
+	  This option allows you to match the length of a packet against a
+	  specific value or range of values.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_TTL
+	tristate "TTL match support"
+	depends on IP_NF_IPTABLES
+	help
+	  This adds CONFIG_IP_NF_MATCH_TTL option, which enabled the user
+	  to match packets by their TTL value.
+
+	  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_TCPMSS
+	tristate "tcpmss match support"
+	depends on IP_NF_IPTABLES
+	help
+	  This option adds a `tcpmss' match, which allows you to examine the
+	  MSS value of TCP SYN packets, which control the maximum packet size
+	  for that connection.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_HELPER
+	tristate "Helper match support"
+	depends on IP_NF_CONNTRACK!=n && IP_NF_IPTABLES
+	help
+	  Helper matching allows you to match packets in dynamic connections
+	  tracked by a conntrack-helper, ie. ip_conntrack_ftp
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `Y'.
+
+config IP_NF_MATCH_STATE
+	tristate "Connection state match support"
+	depends on IP_NF_CONNTRACK && IP_NF_IPTABLES
+	help
+	  Connection state matching allows you to match packets based on their
+	  relationship to a tracked connection (ie. previous packets).  This
+	  is a powerful tool for packet classification.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_CONNTRACK
+	tristate "Connection tracking match support"
+	depends on IP_NF_CONNTRACK && IP_NF_IPTABLES
+	help
+	  This is a general conntrack match module, a superset of the state match.
+
+	  It allows matching on additional conntrack information, which is
+	  useful in complex configurations, such as NAT gateways with multiple
+	  internet links or tunnels.
+
+	  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_UNCLEAN
+	tristate "Unclean match support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IP_NF_IPTABLES
+	help
+	  Unclean packet matching matches any strange or invalid packets, by
+	  looking at a series of fields in the IP, TCP, UDP and ICMP headers.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_OWNER
+	tristate "Owner match support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IP_NF_IPTABLES
+	help
+	  Packet owner matching allows you to match locally-generated packets
+	  based on who created them: the user, group, process or session.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_MATCH_PHYSDEV
+	tristate "Physdev match support"
+	depends on IP_NF_IPTABLES!=n && BRIDGE!=n
+	help
+	  Physdev packet matching matches against the physical bridge ports
+	  the IP packet arrived on or will leave by.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+# The targets
+config IP_NF_FILTER
+	tristate "Packet filtering"
+	depends on IP_NF_IPTABLES
+	help
+	  Packet filtering defines a table `filter', which has a series of
+	  rules for simple packet filtering at local input, forwarding and
+	  local output.  See the man page for iptables(8).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_REJECT
+	tristate "REJECT target support"
+	depends on IP_NF_FILTER
+	help
+	  The REJECT target allows a filtering rule to specify that an ICMP
+	  error should be issued in response to an incoming packet, rather
+	  than silently being dropped.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_MIRROR
+	tristate "MIRROR target support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IP_NF_FILTER
+	help
+	  The MIRROR target allows a filtering rule to specify that an
+	  incoming packet should be bounced back to the sender.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_NAT
+	tristate "Full NAT"
+	depends on IP_NF_IPTABLES && IP_NF_CONNTRACK
+	help
+	  The Full NAT option allows masquerading, port forwarding and other
+	  forms of full Network Address Port Translation.  It is controlled by
+	  the `nat' table in iptables: see the man page for iptables(8).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_NAT_NEEDED
+	bool
+	depends on IP_NF_CONNTRACK!=y && IP_NF_IPTABLES!=y && (IP_NF_COMPAT_IPCHAINS!=y && IP_NF_COMPAT_IPFWADM || IP_NF_COMPAT_IPCHAINS) || IP_NF_IPTABLES && IP_NF_CONNTRACK && IP_NF_NAT
+	default y
+
+config IP_NF_TARGET_MASQUERADE
+	tristate "MASQUERADE target support"
+	depends on IP_NF_NAT
+	help
+	  Masquerading is a special case of NAT: all outgoing connections are
+	  changed to seem to come from a particular interface's address, and
+	  if the interface goes down, those connections are lost.  This is
+	  only useful for dialup accounts with dynamic IP address (ie. your IP
+	  address will be different on next dialup).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_REDIRECT
+	tristate "REDIRECT target support"
+	depends on IP_NF_NAT
+	help
+	  REDIRECT is a special case of NAT: all incoming connections are
+	  mapped onto the incoming interface's address, causing the packets to
+	  come to the local machine instead of passing through.  This is
+	  useful for transparent proxies.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_NAT_LOCAL
+	bool "NAT of local connections (READ HELP)"
+	depends on IP_NF_NAT
+	help
+	  This option enables support for NAT of locally originated connections. 
+	  Enable this if you need to use destination NAT on connections
+	  originating from local processes on the nat box itself.
+
+	  Please note that you will need a recent version (>= 1.2.6a)
+	  of the iptables userspace program in order to use this feature.
+	  See http://www.iptables.org/ for download instructions.
+
+	  If unsure, say 'N'.
+
+config IP_NF_NAT_SNMP_BASIC
+	tristate "Basic SNMP-ALG support (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && IP_NF_NAT
+	---help---
+
+	  This module implements an Application Layer Gateway (ALG) for
+	  SNMP payloads.  In conjunction with NAT, it allows a network
+	  management system to access multiple private networks with
+	  conflicting addresses.  It works by modifying IP addresses
+	  inside SNMP payloads to match IP-layer NAT mapping.
+
+	  This is the "basic" form of SNMP-ALG, as described in RFC 2962
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_NAT_IRC
+	tristate
+	depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
+	default IP_NF_NAT if IP_NF_IRC=y
+	default m if IP_NF_IRC=m
+
+# If they want FTP, set to $CONFIG_IP_NF_NAT (m or y), 
+# or $CONFIG_IP_NF_FTP (m or y), whichever is weaker.  Argh.
+config IP_NF_NAT_FTP
+	tristate
+	depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
+	default IP_NF_NAT if IP_NF_FTP=y
+	default m if IP_NF_FTP=m
+
+config IP_NF_MANGLE
+	tristate "Packet mangling"
+	depends on IP_NF_IPTABLES
+	help
+	  This option adds a `mangle' table to iptables: see the man page for
+	  iptables(8).  This table is used for various packet alterations
+	  which can effect how the packet is routed.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_TOS
+	tristate "TOS target support"
+	depends on IP_NF_MANGLE
+	help
+	  This option adds a `TOS' target, which allows you to create rules in
+	  the `mangle' table which alter the Type Of Service field of an IP
+	  packet prior to routing.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_ECN
+	tristate "ECN target support"
+	depends on IP_NF_MANGLE
+	---help---
+	  This option adds a `ECN' target, which can be used in the iptables mangle
+	  table.  
+
+	  You can use this target to remove the ECN bits from the IPv4 header of
+	  an IP packet.  This is particularly useful, if you need to work around
+	  existing ECN blackholes on the internet, but don't want to disable
+	  ECN support in general.
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
+config IP_NF_TARGET_DSCP
+	tristate "DSCP target support"
+	depends on IP_NF_MANGLE
+	help
+	  This option adds a `DSCP' match, which allows you to match against
+	  the IPv4 header DSCP field (DSCP codepoint).
+
+	  The DSCP codepoint can have any value between 0x0 and 0x4f.
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
+config IP_NF_TARGET_MARK
+	tristate "MARK target support"
+	depends on IP_NF_MANGLE
+	help
+	  This option adds a `MARK' target, which allows you to create rules
+	  in the `mangle' table which alter the netfilter mark (nfmark) field
+	  associated with the packet prior to routing. This can change
+	  the routing method (see `Use netfilter MARK value as routing
+	  key') and can also be used by other subsystems to change their
+	  behavior.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_LOG
+	tristate "LOG target support"
+	depends on IP_NF_IPTABLES
+	help
+	  This option adds a `LOG' target, which allows you to create rules in
+	  any iptables table which records the packet header to the syslog.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_TARGET_ULOG
+	tristate "ULOG target support"
+	depends on IP_NF_IPTABLES
+	---help---
+	  This option adds a `ULOG' target, which allows you to create rules in
+	  any iptables table. The packet is passed to a userspace logging
+	  daemon using netlink multicast sockets; unlike the LOG target
+	  which can only be viewed through syslog.
+
+	  The apropriate userspace logging daemon (ulogd) may be obtained from
+	  http://www.gnumonks.org/projects/ulogd
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
+config IP_NF_TARGET_TCPMSS
+	tristate "TCPMSS target support"
+	depends on IP_NF_IPTABLES
+	---help---
+	  This option adds a `TCPMSS' target, which allows you to alter the
+	  MSS value of TCP SYN packets, to control the maximum size for that
+	  connection (usually limiting it to your outgoing interface's MTU
+	  minus 40).
+
+	  This is used to overcome criminally braindead ISPs or servers which
+	  block ICMP Fragmentation Needed packets.  The symptoms of this
+	  problem are that everything works fine from your Linux
+	  firewall/router, but machines behind it can never exchange large
+	  packets:
+	  	1) Web browsers connect, then hang with no data received.
+	  	2) Small mail works fine, but large emails hang.
+	  	3) ssh works fine, but scp hangs after initial handshaking.
+
+	  Workaround: activate this option and add a rule to your firewall
+	  configuration like:
+
+	  iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN \
+	  		 -j TCPMSS --clamp-mss-to-pmtu
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_ARPTABLES
+	tristate "ARP tables support"
+
+config IP_NF_ARPFILTER
+	tristate "ARP packet filtering"
+	depends on IP_NF_ARPTABLES
+
+# Backwards compatibility modules: only if you don't build in the others.
+config IP_NF_COMPAT_IPCHAINS
+	tristate "ipchains (2.2-style) support"
+	depends on IP_NF_CONNTRACK!=y && IP_NF_IPTABLES!=y
+	help
+	  This option places ipchains (with masquerading and redirection
+	  support) back into the kernel, using the new netfilter
+	  infrastructure.  It is not recommended for new installations (see
+	  `Packet filtering').  With this enabled, you should be able to use
+	  the ipchains tool exactly as in 2.2 kernels.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP_NF_COMPAT_IPFWADM
+	tristate "ipfwadm (2.0-style) support"
+	depends on IP_NF_CONNTRACK!=y && IP_NF_IPTABLES!=y && IP_NF_COMPAT_IPCHAINS!=y
+	help
+	  This option places ipfwadm (with masquerading and redirection
+	  support) back into the kernel, using the new netfilter
+	  infrastructure.  It is not recommended for new installations (see
+	  `Packet filtering').  With this enabled, you should be able to use
+	  the ipfwadm tool exactly as in 2.0 kernels.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+endmenu
+
diff -Nru a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
--- a/net/ipv4/netfilter/Makefile	Wed Oct 30 16:44:25 2002
+++ b/net/ipv4/netfilter/Makefile	Wed Oct 30 16:44:25 2002
@@ -66,6 +66,8 @@
 obj-$(CONFIG_IP_NF_MATCH_UNCLEAN) += ipt_unclean.o
 obj-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_tcpmss.o
 
+obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o
+
 # targets
 obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
 obj-$(CONFIG_IP_NF_TARGET_MIRROR) += ipt_MIRROR.o
diff -Nru a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c	Wed Oct 30 16:44:28 2002
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c	Wed Oct 30 16:44:28 2002
@@ -201,7 +201,7 @@
 	/* Local packets are never produced too large for their
 	   interface.  We degfragment them at LOCAL_OUT, however,
 	   so we have to refragment them here. */
-	if ((*pskb)->len > rt->u.dst.pmtu) {
+	if ((*pskb)->len > dst_pmtu(&rt->u.dst)) {
 		/* No hook can be after us, so this should be OK. */
 		ip_fragment(*pskb, okfn);
 		return NF_STOLEN;
diff -Nru a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
--- a/net/ipv4/netfilter/ipt_LOG.c	Wed Oct 30 16:44:27 2002
+++ b/net/ipv4/netfilter/ipt_LOG.c	Wed Oct 30 16:44:27 2002
@@ -289,6 +289,18 @@
 	       loginfo->prefix,
 	       in ? in->name : "",
 	       out ? out->name : "");
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	if ((*pskb)->nf_bridge) {
+		struct net_device *physindev = (*pskb)->nf_bridge->physindev;
+		struct net_device *physoutdev = (*pskb)->nf_bridge->physoutdev;
+
+		if (physindev && in != physindev)
+			printk("PHYSIN=%s ", physindev->name);
+		if (physoutdev && out != physoutdev)
+			printk("PHYSOUT=%s ", physoutdev->name);
+	}
+#endif
+
 	if (in && !out) {
 		/* MAC logging for input chain only. */
 		printk("MAC=");
diff -Nru a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
--- a/net/ipv4/netfilter/ipt_REJECT.c	Wed Oct 30 16:44:32 2002
+++ b/net/ipv4/netfilter/ipt_REJECT.c	Wed Oct 30 16:44:32 2002
@@ -148,7 +148,7 @@
 	nskb->dst = &rt->u.dst;
 
 	/* "Never happens" */
-	if (nskb->len > nskb->dst->pmtu)
+	if (nskb->len > dst_pmtu(nskb->dst))
 		goto free_nskb;
 
 	connection_attach(nskb, oldskb->nfct);
@@ -225,8 +225,8 @@
 	/* RFC says return as much as we can without exceeding 576 bytes. */
 	length = skb_in->len + sizeof(struct iphdr) + sizeof(struct icmphdr);
 
-	if (length > rt->u.dst.pmtu)
-		length = rt->u.dst.pmtu;
+	if (length > dst_pmtu(&rt->u.dst))
+		length = dst_pmtu(&rt->u.dst);
 	if (length > 576)
 		length = 576;
 
diff -Nru a/net/ipv4/netfilter/ipt_physdev.c b/net/ipv4/netfilter/ipt_physdev.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/netfilter/ipt_physdev.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,81 @@
+/* Kernel module to match the bridge port in and
+ * out device for IP packets coming into contact with a bridge. */
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/netfilter_ipv4/ipt_physdev.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+
+static int
+match(const struct sk_buff *skb,
+      const struct net_device *in,
+      const struct net_device *out,
+      const void *matchinfo,
+      int offset,
+      const void *hdr,
+      u_int16_t datalen,
+      int *hotdrop)
+{
+	int i;
+	static const char nulldevname[IFNAMSIZ] = { 0 };
+	const struct ipt_physdev_info *info = matchinfo;
+	unsigned long ret;
+	const char *indev, *outdev;
+	struct nf_bridge_info *nf_bridge;
+
+	/* Not a bridged IP packet or no info available yet:
+	 * LOCAL_OUT/mangle and LOCAL_OUT/nat don't know if
+	 * the destination device will be a bridge. */
+	if (!(nf_bridge = skb->nf_bridge))
+		return 1;
+
+	indev = nf_bridge->physindev ? nf_bridge->physindev->name : nulldevname;
+	outdev = nf_bridge->physoutdev ?
+		 nf_bridge->physoutdev->name : nulldevname;
+
+	for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) {
+		ret |= (((const unsigned long *)indev)[i]
+			^ ((const unsigned long *)info->physindev)[i])
+			& ((const unsigned long *)info->in_mask)[i];
+	}
+
+	if ((ret != 0) ^ !(info->invert & IPT_PHYSDEV_OP_MATCH_IN))
+		return 1;
+
+	for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) {
+		ret |= (((const unsigned long *)outdev)[i]
+			^ ((const unsigned long *)info->physoutdev)[i])
+			& ((const unsigned long *)info->out_mask)[i];
+	}
+
+	return (ret != 0) ^ !(info->invert & IPT_PHYSDEV_OP_MATCH_OUT);
+}
+
+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_physdev_info)))
+		return 0;
+
+	return 1;
+}
+
+static struct ipt_match physdev_match
+= { { NULL, NULL }, "physdev", &match, &checkentry, NULL, THIS_MODULE };
+
+static int __init init(void)
+{
+	return ipt_register_match(&physdev_match);
+}
+
+static void __exit fini(void)
+{
+	ipt_unregister_match(&physdev_match);
+}
+
+module_init(init);
+module_exit(fini);
+MODULE_LICENSE("GPL");
diff -Nru a/net/ipv4/netfilter/ipt_unclean.c b/net/ipv4/netfilter/ipt_unclean.c
--- a/net/ipv4/netfilter/ipt_unclean.c	Wed Oct 30 16:44:29 2002
+++ b/net/ipv4/netfilter/ipt_unclean.c	Wed Oct 30 16:44:29 2002
@@ -521,6 +521,16 @@
 		return 0;
 	}
 
+	/* CHECK: Do not use what is unused.
+	 * First bit of fragmentation flags should be unused.
+	 * May be used by OS fingerprinting tools.
+	 * 04 Jun 2002, Maciej Soltysiak, solt@dns.toxicfilms.tv
+	 */
+	if (ntohs(iph->frag_off)>>15) {
+		limpk("IP unused bit set\n");
+		return 0;
+	}
+
 	/* Per-protocol checks. */
 	switch (iph->protocol) {
 	case IPPROTO_ICMP:
diff -Nru a/net/ipv4/proc.c b/net/ipv4/proc.c
--- a/net/ipv4/proc.c	Wed Oct 30 16:44:19 2002
+++ b/net/ipv4/proc.c	Wed Oct 30 16:44:19 2002
@@ -47,6 +47,8 @@
 #include <net/tcp.h>
 #include <net/udp.h>
 #include <linux/skbuff.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 #include <net/sock.h>
 #include <net/raw.h>
 
@@ -211,4 +213,34 @@
 	if (len < 0)
 		len = 0; 
 	return len;
+}
+
+int __init ip_misc_proc_init(void)
+{
+	int rc = 0;
+
+	if (!proc_net_create("netstat", 0, netstat_get_info))
+		goto out_netstat;
+	if (!proc_net_create("snmp", 0, snmp_get_info))
+		goto out_snmp;
+	if (!proc_net_create("sockstat", 0, afinet_get_info))
+		goto out_sockstat;
+out:
+	return rc;
+out_sockstat:
+	proc_net_remove("snmp");
+out_snmp:
+	proc_net_remove("netstat");
+out_netstat:
+	rc = -ENOMEM;
+	goto out;
+}
+
+int ip_seq_release(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq = (struct seq_file *)file->private_data;
+
+	kfree(seq->private);
+	seq->private = NULL;
+	return seq_release(inode, file);
 }
diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c
--- a/net/ipv4/raw.c	Wed Oct 30 16:44:17 2002
+++ b/net/ipv4/raw.c	Wed Oct 30 16:44:17 2002
@@ -64,7 +64,7 @@
 #include <net/raw.h>
 #include <net/inet_common.h>
 #include <net/checksum.h>
-#include <linux/netfilter.h>
+#include <linux/netfilter_ipv4.h>
 
 struct sock *raw_v4_htable[RAWV4_HTABLE_SIZE];
 rwlock_t raw_v4_lock = RW_LOCK_UNLOCKED;
@@ -227,12 +227,11 @@
 	/* Charge it to the socket. */
 	
 	if (sock_queue_rcv_skb(sk, skb) < 0) {
-		IP_INC_STATS(IpInDiscards);
+		/* FIXME: increment a raw drops counter here */
 		kfree_skb(skb);
 		return NET_RX_DROP;
 	}
 
-	IP_INC_STATS(IpInDelivers);
 	return NET_RX_SUCCESS;
 }
 
@@ -420,11 +419,12 @@
 	}
 
 	{
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = ipc.oif,
+				    .nl_u = { .ip4_u =
 					      { .daddr = daddr,
 						.saddr = saddr,
 						.tos = tos } },
-				    .oif = ipc.oif };
+				    .proto = IPPROTO_RAW };
 		err = ip_route_output_key(&rt, &fl);
 	}
 	if (err)
diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c
--- a/net/ipv4/route.c	Wed Oct 30 16:44:35 2002
+++ b/net/ipv4/route.c	Wed Oct 30 16:44:35 2002
@@ -130,11 +130,10 @@
  */
 
 static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie);
-static struct dst_entry *ipv4_dst_reroute(struct dst_entry *dst,
-					   struct sk_buff *skb);
 static void		 ipv4_dst_destroy(struct dst_entry *dst);
 static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst);
 static void		 ipv4_link_failure(struct sk_buff *skb);
+static void		 ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu);
 static int rt_garbage_collect(void);
 
 
@@ -143,10 +142,10 @@
 	.protocol =		__constant_htons(ETH_P_IP),
 	.gc =			rt_garbage_collect,
 	.check =		ipv4_dst_check,
-	.reroute =		ipv4_dst_reroute,
 	.destroy =		ipv4_dst_destroy,
 	.negative_advice =	ipv4_negative_advice,
 	.link_failure =		ipv4_link_failure,
+	.update_pmtu =		ip_rt_update_pmtu,
 	.entry_size =		sizeof(struct rtable),
 };
 
@@ -248,9 +247,11 @@
 				r->u.dst.__use,
 				0,
 				(unsigned long)r->rt_src,
-				(int)r->u.dst.advmss + 40,
-				r->u.dst.window,
-				(int)((r->u.dst.rtt >> 3) + r->u.dst.rttvar),
+				(dst_metric(&r->u.dst, RTAX_ADVMSS) ?
+				 (int) dst_metric(&r->u.dst, RTAX_ADVMSS) + 40 : 0),
+				dst_metric(&r->u.dst, RTAX_WINDOW),
+				(int)((dst_metric(&r->u.dst, RTAX_RTT) >> 3)
+				      + dst_metric(&r->u.dst, RTAX_RTTVAR)),
 				r->fl.fl4_tos,
 				r->u.dst.hh ?
 					atomic_read(&r->u.dst.hh->hh_refcnt) :
@@ -610,6 +611,13 @@
 out:	return 0;
 }
 
+static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
+{
+	return memcmp(&fl1->nl_u.ip4_u, &fl2->nl_u.ip4_u, sizeof(fl1->nl_u.ip4_u)) == 0 &&
+	       fl1->oif     == fl2->oif &&
+	       fl1->iif     == fl2->iif;
+}
+
 static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
 {
 	struct rtable	*rth, **rthp;
@@ -621,7 +629,7 @@
 
 	write_lock_bh(&rt_hash_table[hash].lock);
 	while ((rth = *rthp) != NULL) {
-		if (memcmp(&rth->fl, &rt->fl, sizeof(rt->fl)) == 0) {
+		if (compare_keys(&rth->fl, &rt->fl)) {
 			/* Put it first */
 			*rthp = rth->u.rt_next;
 			rth->u.rt_next = rt_hash_table[hash].chain;
@@ -1058,28 +1066,28 @@
 			    rth->rt_src  == iph->saddr &&
 			    rth->fl.fl4_tos == tos &&
 			    rth->fl.iif == 0 &&
-			    !(rth->u.dst.mxlock & (1 << RTAX_MTU))) {
+			    !(dst_metric_locked(&rth->u.dst, RTAX_MTU))) {
 				unsigned short mtu = new_mtu;
 
 				if (new_mtu < 68 || new_mtu >= old_mtu) {
 
 					/* BSD 4.2 compatibility hack :-( */
 					if (mtu == 0 &&
-					    old_mtu >= rth->u.dst.pmtu &&
+					    old_mtu >= rth->u.dst.metrics[RTAX_MTU-1] &&
 					    old_mtu >= 68 + (iph->ihl << 2))
 						old_mtu -= iph->ihl << 2;
 
 					mtu = guess_mtu(old_mtu);
 				}
-				if (mtu <= rth->u.dst.pmtu) {
-					if (mtu < rth->u.dst.pmtu) { 
+				if (mtu <= rth->u.dst.metrics[RTAX_MTU-1]) {
+					if (mtu < rth->u.dst.metrics[RTAX_MTU-1]) { 
 						dst_confirm(&rth->u.dst);
 						if (mtu < ip_rt_min_pmtu) {
 							mtu = ip_rt_min_pmtu;
-							rth->u.dst.mxlock |=
+							rth->u.dst.metrics[RTAX_LOCK-1] |=
 								(1 << RTAX_MTU);
 						}
-						rth->u.dst.pmtu = mtu;
+						rth->u.dst.metrics[RTAX_MTU-1] = mtu;
 						dst_set_expires(&rth->u.dst,
 							ip_rt_mtu_expires);
 					}
@@ -1092,15 +1100,15 @@
 	return est_mtu ? : new_mtu;
 }
 
-void ip_rt_update_pmtu(struct dst_entry *dst, unsigned mtu)
+static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
 {
-	if (dst->pmtu > mtu && mtu >= 68 &&
-	    !(dst->mxlock & (1 << RTAX_MTU))) {
+	if (dst->metrics[RTAX_MTU-1] > mtu && mtu >= 68 &&
+	    !(dst_metric_locked(dst, RTAX_MTU))) {
 		if (mtu < ip_rt_min_pmtu) {
 			mtu = ip_rt_min_pmtu;
-			dst->mxlock |= (1 << RTAX_MTU);
+			dst->metrics[RTAX_LOCK-1] |= (1 << RTAX_MTU);
 		}
-		dst->pmtu = mtu;
+		dst->metrics[RTAX_MTU-1] = mtu;
 		dst_set_expires(dst, ip_rt_mtu_expires);
 	}
 }
@@ -1111,12 +1119,6 @@
 	return NULL;
 }
 
-static struct dst_entry *ipv4_dst_reroute(struct dst_entry *dst,
-					  struct sk_buff *skb)
-{
-	return NULL;
-}
-
 static void ipv4_dst_destroy(struct dst_entry *dst)
 {
 	struct rtable *rt = (struct rtable *) dst;
@@ -1197,28 +1199,28 @@
 		if (FIB_RES_GW(*res) &&
 		    FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK)
 			rt->rt_gateway = FIB_RES_GW(*res);
-		memcpy(&rt->u.dst.mxlock, fi->fib_metrics,
-			sizeof(fi->fib_metrics));
+		memcpy(rt->u.dst.metrics, fi->fib_metrics,
+		       sizeof(rt->u.dst.metrics));
 		if (fi->fib_mtu == 0) {
-			rt->u.dst.pmtu = rt->u.dst.dev->mtu;
-			if (rt->u.dst.mxlock & (1 << RTAX_MTU) &&
+			rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu;
+			if (rt->u.dst.metrics[RTAX_LOCK-1] & (1 << RTAX_MTU) &&
 			    rt->rt_gateway != rt->rt_dst &&
-			    rt->u.dst.pmtu > 576)
-				rt->u.dst.pmtu = 576;
+			    rt->u.dst.dev->mtu > 576)
+				rt->u.dst.metrics[RTAX_MTU-1] = 576;
 		}
 #ifdef CONFIG_NET_CLS_ROUTE
 		rt->u.dst.tclassid = FIB_RES_NH(*res).nh_tclassid;
 #endif
 	} else
-		rt->u.dst.pmtu	= rt->u.dst.dev->mtu;
+		rt->u.dst.metrics[RTAX_MTU-1]= rt->u.dst.dev->mtu;
 
-	if (rt->u.dst.pmtu > IP_MAX_MTU)
-		rt->u.dst.pmtu = IP_MAX_MTU;
-	if (rt->u.dst.advmss == 0)
-		rt->u.dst.advmss = max_t(unsigned int, rt->u.dst.dev->mtu - 40,
+	if (rt->u.dst.metrics[RTAX_MTU-1] > IP_MAX_MTU)
+		rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU;
+	if (rt->u.dst.metrics[RTAX_ADVMSS-1] == 0)
+		rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40,
 				       ip_rt_min_advmss);
-	if (rt->u.dst.advmss > 65535 - 40)
-		rt->u.dst.advmss = 65535 - 40;
+	if (rt->u.dst.metrics[RTAX_ADVMSS-1] > 65535 - 40)
+		rt->u.dst.metrics[RTAX_ADVMSS-1] = 65535 - 40;
 
 #ifdef CONFIG_NET_CLS_ROUTE
 #ifdef CONFIG_IP_MULTIPLE_TABLES
@@ -1991,7 +1993,7 @@
 	goto done;
 }
 
-int ip_route_output_key(struct rtable **rp, const struct flowi *flp)
+int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
 {
 	unsigned hash;
 	struct rtable *rth;
@@ -2021,7 +2023,16 @@
 	read_unlock_bh(&rt_hash_table[hash].lock);
 
 	return ip_route_output_slow(rp, flp);
-}	
+}
+
+int ip_route_output_key(struct rtable **rp, struct flowi *flp)
+{
+	int err;
+
+	if ((err = __ip_route_output_key(rp, flp)) != 0)
+		return err;
+	return flp->proto ? xfrm_lookup((struct dst_entry**)rp, flp, NULL, 0) : 0;
+}
 
 static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
 			int nowait)
@@ -2065,7 +2076,7 @@
 		RTA_PUT(skb, RTA_PREFSRC, 4, &rt->rt_src);
 	if (rt->rt_dst != rt->rt_gateway)
 		RTA_PUT(skb, RTA_GATEWAY, 4, &rt->rt_gateway);
-	if (rtnetlink_put_metrics(skb, &rt->u.dst.mxlock) < 0)
+	if (rtnetlink_put_metrics(skb, rt->u.dst.metrics) < 0)
 		goto rtattr_failure;
 	ci.rta_lastuse	= jiffies - rt->u.dst.lastuse;
 	ci.rta_used	= rt->u.dst.__use;
@@ -2530,4 +2541,5 @@
 #ifdef CONFIG_NET_CLS_ROUTE
 	create_proc_read_entry("net/rt_acct", 0, 0, ip_rt_acct_read, NULL);
 #endif
+	xfrm_init();
 }
diff -Nru a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
--- a/net/ipv4/syncookies.c	Wed Oct 30 16:44:17 2002
+++ b/net/ipv4/syncookies.c	Wed Oct 30 16:44:17 2002
@@ -177,7 +177,11 @@
 							  opt->faddr :
 							  req->af.v4_req.rmt_addr),
 						.saddr = req->af.v4_req.loc_addr,
-						.tos = RT_CONN_FLAGS(sk) } } };
+						.tos = RT_CONN_FLAGS(sk) } },
+				    .proto = IPPROTO_TCP,
+				    .uli_u = { .ports =
+					       { .sport = skb->h.th->dest,
+						 .dport = skb->h.th->source } } };
 		if (ip_route_output_key(&rt, &fl)) {
 			tcp_openreq_free(req);
 			goto out; 
@@ -185,7 +189,7 @@
 	}
 
 	/* Try to redo what tcp_v4_send_synack did. */
-	req->window_clamp = rt->u.dst.window;  
+	req->window_clamp = dst_metric(&rt->u.dst, RTAX_WINDOW);
 	tcp_select_initial_window(tcp_full_space(sk), req->mss,
 				  &req->rcv_wnd, &req->window_clamp, 
 				  0, &rcv_wscale);
diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c
--- a/net/ipv4/tcp.c	Wed Oct 30 16:44:26 2002
+++ b/net/ipv4/tcp.c	Wed Oct 30 16:44:26 2002
@@ -476,8 +476,8 @@
 		if (sk->sleep && waitqueue_active(sk->sleep))
 			wake_up_interruptible(sk->sleep);
 
-		if (sock->fasync_list && !(sk->shutdown & SEND_SHUTDOWN))
-			sock_wake_async(sock, 2, POLL_OUT);
+		if (!(sk->shutdown & SEND_SHUTDOWN))
+			sk_wake_async(sk, 2, POLL_OUT);
 	}
 }
 
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	Wed Oct 30 16:44:24 2002
+++ b/net/ipv4/tcp_input.c	Wed Oct 30 16:44:24 2002
@@ -526,25 +526,25 @@
 			 * Probably, no packets returned in time.
 			 * Reset our results.
 			 */
-			if (!(dst->mxlock&(1<<RTAX_RTT)))
-				dst->rtt = 0;
+			if (!(dst_metric_locked(dst, RTAX_RTT)))
+				dst->metrics[RTAX_RTT-1] = 0;
 			return;
 		}
 
-		m = dst->rtt - tp->srtt;
+		m = dst_metric(dst, RTAX_RTT) - tp->srtt;
 
 		/* If newly calculated rtt larger than stored one,
 		 * store new one. Otherwise, use EWMA. Remember,
 		 * rtt overestimation is always better than underestimation.
 		 */
-		if (!(dst->mxlock&(1<<RTAX_RTT))) {
+		if (!(dst_metric_locked(dst, RTAX_RTT))) {
 			if (m <= 0)
-				dst->rtt = tp->srtt;
+				dst->metrics[RTAX_RTT-1] = tp->srtt;
 			else
-				dst->rtt -= (m>>3);
+				dst->metrics[RTAX_RTT-1] -= (m>>3);
 		}
 
-		if (!(dst->mxlock&(1<<RTAX_RTTVAR))) {
+		if (!(dst_metric_locked(dst, RTAX_RTTVAR))) {
 			if (m < 0)
 				m = -m;
 
@@ -553,45 +553,46 @@
 			if (m < tp->mdev)
 				m = tp->mdev;
 
-			if (m >= dst->rttvar)
-				dst->rttvar = m;
+			if (m >= dst_metric(dst, RTAX_RTTVAR))
+				dst->metrics[RTAX_RTTVAR-1] = m;
 			else
-				dst->rttvar -= (dst->rttvar - m)>>2;
+				dst->metrics[RTAX_RTT-1] -=
+					(dst->metrics[RTAX_RTT-1] - m)>>2;
 		}
 
 		if (tp->snd_ssthresh >= 0xFFFF) {
 			/* Slow start still did not finish. */
-			if (dst->ssthresh &&
-			    !(dst->mxlock&(1<<RTAX_SSTHRESH)) &&
-			    (tp->snd_cwnd >> 1) > dst->ssthresh)
-				dst->ssthresh = tp->snd_cwnd >> 1;
-			if (!(dst->mxlock&(1<<RTAX_CWND)) &&
-			    tp->snd_cwnd > dst->cwnd)
-				dst->cwnd = tp->snd_cwnd;
+			if (dst_metric(dst, RTAX_SSTHRESH) &&
+			    !dst_metric_locked(dst, RTAX_SSTHRESH) &&
+			    (tp->snd_cwnd >> 1) > dst_metric(dst, RTAX_SSTHRESH))
+				dst->metrics[RTAX_SSTHRESH-1] = tp->snd_cwnd >> 1;
+			if (!dst_metric_locked(dst, RTAX_CWND) &&
+			    tp->snd_cwnd > dst_metric(dst, RTAX_CWND))
+				dst->metrics[RTAX_CWND-1] = tp->snd_cwnd;
 		} else if (tp->snd_cwnd > tp->snd_ssthresh &&
 			   tp->ca_state == TCP_CA_Open) {
 			/* Cong. avoidance phase, cwnd is reliable. */
-			if (!(dst->mxlock&(1<<RTAX_SSTHRESH)))
-				dst->ssthresh = max(tp->snd_cwnd >> 1,
-						    tp->snd_ssthresh);
-			if (!(dst->mxlock&(1<<RTAX_CWND)))
-				dst->cwnd = (dst->cwnd + tp->snd_cwnd) >> 1;
+			if (!dst_metric_locked(dst, RTAX_SSTHRESH))
+				dst->metrics[RTAX_SSTHRESH-1] =
+					max(tp->snd_cwnd >> 1, tp->snd_ssthresh);
+			if (!dst_metric_locked(dst, RTAX_CWND))
+				dst->metrics[RTAX_CWND-1] = (dst->metrics[RTAX_CWND-1] + tp->snd_cwnd) >> 1;
 		} else {
 			/* Else slow start did not finish, cwnd is non-sense,
 			   ssthresh may be also invalid.
 			 */
-			if (!(dst->mxlock&(1<<RTAX_CWND)))
-				dst->cwnd = (dst->cwnd + tp->snd_ssthresh) >> 1;
-			if (dst->ssthresh &&
-			    !(dst->mxlock&(1<<RTAX_SSTHRESH)) &&
-			    tp->snd_ssthresh > dst->ssthresh)
-				dst->ssthresh = tp->snd_ssthresh;
+			if (!dst_metric_locked(dst, RTAX_CWND))
+				dst->metrics[RTAX_CWND-1] = (dst->metrics[RTAX_CWND-1] + tp->snd_ssthresh) >> 1;
+			if (dst->metrics[RTAX_SSTHRESH-1] &&
+			    !dst_metric_locked(dst, RTAX_SSTHRESH) &&
+			    tp->snd_ssthresh > dst->metrics[RTAX_SSTHRESH-1])
+				dst->metrics[RTAX_SSTHRESH-1] = tp->snd_ssthresh;
 		}
 
-		if (!(dst->mxlock&(1<<RTAX_REORDERING))) {
-			if (dst->reordering < tp->reordering &&
+		if (!dst_metric_locked(dst, RTAX_REORDERING)) {
+			if (dst->metrics[RTAX_REORDERING-1] < tp->reordering &&
 			    tp->reordering != sysctl_tcp_reordering)
-				dst->reordering = tp->reordering;
+				dst->metrics[RTAX_REORDERING-1] = tp->reordering;
 		}
 	}
 }
@@ -630,22 +631,23 @@
 
 	dst_confirm(dst);
 
-	if (dst->mxlock&(1<<RTAX_CWND))
-		tp->snd_cwnd_clamp = dst->cwnd;
-	if (dst->ssthresh) {
-		tp->snd_ssthresh = dst->ssthresh;
+	if (dst_metric_locked(dst, RTAX_CWND))
+		tp->snd_cwnd_clamp = dst_metric(dst, RTAX_CWND);
+	if (dst_metric(dst, RTAX_SSTHRESH)) {
+		tp->snd_ssthresh = dst_metric(dst, RTAX_SSTHRESH);
 		if (tp->snd_ssthresh > tp->snd_cwnd_clamp)
 			tp->snd_ssthresh = tp->snd_cwnd_clamp;
 	}
-	if (dst->reordering && tp->reordering != dst->reordering) {
+	if (dst_metric(dst, RTAX_REORDERING) &&
+	    tp->reordering != dst_metric(dst, RTAX_REORDERING)) {
 		tp->sack_ok &= ~2;
-		tp->reordering = dst->reordering;
+		tp->reordering = dst_metric(dst, RTAX_REORDERING);
 	}
 
-	if (dst->rtt == 0)
+	if (dst_metric(dst, RTAX_RTT) == 0)
 		goto reset;
 
-	if (!tp->srtt && dst->rtt < (TCP_TIMEOUT_INIT << 3))
+	if (!tp->srtt && dst_metric(dst, RTAX_RTT) < (TCP_TIMEOUT_INIT << 3))
 		goto reset;
 
 	/* Initial rtt is determined from SYN,SYN-ACK.
@@ -662,10 +664,10 @@
 	 * to low value, and then abruptly stops to do it and starts to delay
 	 * ACKs, wait for troubles.
 	 */
-	if (dst->rtt > tp->srtt)
-		tp->srtt = dst->rtt;
-	if (dst->rttvar > tp->mdev) {
-		tp->mdev = dst->rttvar;
+	if (dst_metric(dst, RTAX_RTT) > tp->srtt)
+		tp->srtt = dst_metric(dst, RTAX_RTT);
+	if (dst_metric(dst, RTAX_RTTVAR) > tp->mdev) {
+		tp->mdev = dst_metric(dst, RTAX_RTTVAR);
 		tp->mdev_max = tp->rttvar = max(tp->mdev, TCP_RTO_MIN);
 	}
 	tcp_set_rto(tp);
@@ -3844,6 +3846,9 @@
 	case TCP_LISTEN:
 		if(th->ack)
 			return 1;
+
+		if(th->rst)
+			goto discard;
 
 		if(th->syn) {
 			if(tp->af_specific->conn_request(sk, skb) < 0)
diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
--- a/net/ipv4/tcp_ipv4.c	Wed Oct 30 16:44:27 2002
+++ b/net/ipv4/tcp_ipv4.c	Wed Oct 30 16:44:27 2002
@@ -47,9 +47,13 @@
  *					coma.
  *	Andi Kleen		:	Fix new listen.
  *	Andi Kleen		:	Fix accept error reporting.
+ *	YOSHIFUJI Hideaki @USAGI and:	Support IPV6_V6ONLY socket option, which
+ *	Alexey Kuznetsov		allow both IPv4 and IPv6 sockets to bind
+ *					a single port at the same time.
  */
 
 #include <linux/config.h>
+
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/random.h>
@@ -62,6 +66,7 @@
 #include <net/inet_common.h>
 
 #include <linux/inet.h>
+#include <linux/ipv6.h>
 #include <linux/stddef.h>
 #include <linux/ipsec.h>
 
@@ -176,7 +181,9 @@
 	int sk_reuse = sk->reuse;
 
 	for ( ; sk2; sk2 = sk2->bind_next) {
-		if (sk != sk2 && sk->bound_dev_if == sk2->bound_dev_if) {
+		if (sk != sk2 &&
+		    !ipv6_only_sock(sk2) &&
+		    sk->bound_dev_if == sk2->bound_dev_if) {
 			if (!sk_reuse || !sk2->reuse ||
 			    sk2->state == TCP_LISTEN) {
 				struct inet_opt *inet2 = inet_sk(sk2);
@@ -412,25 +419,25 @@
 	struct sock *result = NULL;
 	int score, hiscore;
 
-	hiscore=0;
+	hiscore=-1;
 	for (; sk; sk = sk->next) {
 		struct inet_opt *inet = inet_sk(sk);
 
-		if (inet->num == hnum) {
+		if (inet->num == hnum && !ipv6_only_sock(sk)) {
 			__u32 rcv_saddr = inet->rcv_saddr;
 
-			score = 1;
+			score = (sk->family == PF_INET ? 1 : 0);
 			if (rcv_saddr) {
 				if (rcv_saddr != daddr)
 					continue;
-				score++;
+				score+=2;
 			}
 			if (sk->bound_dev_if) {
 				if (sk->bound_dev_if != dif)
 					continue;
-				score++;
+				score+=2;
 			}
-			if (score == 3)
+			if (score == 5)
 				return sk;
 			if (score > hiscore) {
 				hiscore = score;
@@ -454,6 +461,7 @@
 
 		if (inet->num == hnum && !sk->next &&
 		    (!inet->rcv_saddr || inet->rcv_saddr == daddr) &&
+		    (sk->family == PF_INET || !ipv6_only_sock(sk)) &&
 		    !sk->bound_dev_if)
 			goto sherry_cache;
 		sk = __tcp_v4_lookup_listener(sk, daddr, hnum, dif);
@@ -770,7 +778,9 @@
 	}
 
 	tmp = ip_route_connect(&rt, nexthop, inet->saddr,
-			       RT_CONN_FLAGS(sk), sk->bound_dev_if);
+			       RT_CONN_FLAGS(sk), sk->bound_dev_if,
+			       IPPROTO_TCP,
+			       inet->sport, usin->sin_port);
 	if (tmp < 0)
 		return tmp;
 
@@ -779,10 +789,6 @@
 		return -ENETUNREACH;
 	}
 
-	__sk_dst_set(sk, &rt->u.dst);
-	tcp_v4_setup_caps(sk, &rt->u.dst);
-	tp->ext_header_len += rt->u.dst.header_len;
-
 	if (!inet->opt || !inet->opt->srr)
 		daddr = rt->rt_dst;
 
@@ -831,6 +837,19 @@
 	if (err)
 		goto failure;
 
+	err = ip_route_newports(&rt, inet->sport, inet->dport);
+	if (err)
+		goto failure;
+
+	/* OK, now commit destination to socket.  */
+	__sk_dst_set(sk, &rt->u.dst);
+	tcp_v4_setup_caps(sk, &rt->u.dst);
+
+	/* DAVEM REDPEN: This used to sit above forced ext_header_len = 0
+	 *               above, it was real bug.  Is this one correct?
+	 */
+	tp->ext_header_len += rt->u.dst.header_len;
+
 	if (!tp->write_seq)
 		tp->write_seq = secure_tcp_sequence_number(inet->saddr,
 							   inet->daddr,
@@ -846,8 +865,9 @@
 	return 0;
 
 failure:
+	/* This unhashes the socket and releases the local port, if necessary. */
 	tcp_set_state(sk, TCP_CLOSE);
-	__sk_dst_reset(sk);
+	ip_rt_put(rt);
 	sk->route_caps = 0;
 	inet->dport = 0;
 	return err;
@@ -913,7 +933,7 @@
  * This routine does path mtu discovery as defined in RFC1191.
  */
 static inline void do_pmtu_discovery(struct sock *sk, struct iphdr *iph,
-				     unsigned mtu)
+				     u32 mtu)
 {
 	struct dst_entry *dst;
 	struct inet_opt *inet = inet_sk(sk);
@@ -935,17 +955,19 @@
 	if ((dst = __sk_dst_check(sk, 0)) == NULL)
 		return;
 
-	ip_rt_update_pmtu(dst, mtu);
+	dst->ops->update_pmtu(dst, mtu);
 
 	/* Something is about to be wrong... Remember soft error
 	 * for the case, if this connection will not able to recover.
 	 */
-	if (mtu < dst->pmtu && ip_dont_fragment(sk, dst))
+	if (mtu < dst_pmtu(dst) && ip_dont_fragment(sk, dst))
 		sk->err_soft = EMSGSIZE;
 
+	mtu = dst_pmtu(dst);
+
 	if (inet->pmtudisc != IP_PMTUDISC_DONT &&
-	    tp->pmtu_cookie > dst->pmtu) {
-		tcp_sync_mss(sk, dst->pmtu);
+	    tp->pmtu_cookie > mtu) {
+		tcp_sync_mss(sk, mtu);
 
 		/* Resend the TCP packet because it's
 		 * clear that the old packet has been
@@ -1265,13 +1287,17 @@
 {
 	struct rtable *rt;
 	struct ip_options *opt = req->af.v4_req.opt;
-	struct flowi fl = { .nl_u = { .ip4_u =
+	struct flowi fl = { .oif = sk->bound_dev_if,
+			    .nl_u = { .ip4_u =
 				      { .daddr = ((opt && opt->srr) ?
 						  opt->faddr :
 						  req->af.v4_req.rmt_addr),
 					.saddr = req->af.v4_req.loc_addr,
 					.tos = RT_CONN_FLAGS(sk) } },
-			    .oif = sk->bound_dev_if };
+			    .proto = IPPROTO_TCP,
+			    .uli_u = { .ports =
+				       { .sport = inet_sk(sk)->sport,
+					 .dport = req->rmt_port } } };
 
 	if (ip_route_output_key(&rt, &fl)) {
 		IP_INC_STATS_BH(IpOutNoRoutes);
@@ -1499,7 +1525,7 @@
 			 (sysctl_max_syn_backlog - tcp_synq_len(sk) <
 			  (sysctl_max_syn_backlog >> 2)) &&
 			 (!peer || !peer->tcp_ts_stamp) &&
-			 (!dst || !dst->rtt)) {
+			 (!dst || !dst_metric(dst, RTAX_RTT))) {
 			/* Without syncookies last quarter of
 			 * backlog is filled with destinations,
 			 * proven to be alive.
@@ -1579,8 +1605,8 @@
 	newtp->ext_header_len += dst->header_len;
 	newinet->id = newtp->write_seq ^ jiffies;
 
-	tcp_sync_mss(newsk, dst->pmtu);
-	newtp->advmss = dst->advmss;
+	tcp_sync_mss(newsk, dst_pmtu(dst));
+	newtp->advmss = dst_metric(dst, RTAX_ADVMSS);;
 	tcp_initialize_rcv_mss(newsk);
 
 	__tcp_v4_hash(newsk, 0);
@@ -1674,8 +1700,6 @@
 		goto discard;
 #endif /* CONFIG_FILTER */
 
-  	IP_INC_STATS_BH(IpInDelivers);
-
 	if (sk->state == TCP_ESTABLISHED) { /* Fast path */
 		TCP_CHECK_TIMER(sk);
 		if (tcp_rcv_established(sk, skb, skb->h.th, skb->len))
@@ -1864,7 +1888,9 @@
 	/* Query new route. */
 	err = ip_route_connect(&rt, daddr, 0,
 			       RT_TOS(inet->tos) | sk->localroute,
-			       sk->bound_dev_if);
+			       sk->bound_dev_if,
+			       IPPROTO_TCP,
+			       inet->sport, inet->dport);
 	if (err)
 		return err;
 
@@ -1914,11 +1940,15 @@
 		daddr = inet->opt->faddr;
 
 	{
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = sk->bound_dev_if,
+				    .nl_u = { .ip4_u =
 					      { .daddr = daddr,
 						.saddr = inet->saddr,
 						.tos = RT_CONN_FLAGS(sk) } },
-				    .oif = sk->bound_dev_if };
+				    .proto = IPPROTO_TCP,
+				    .uli_u = { .ports =
+					       { .sport = inet->sport,
+						 .dport = inet->dport } } };
 						
 		err = ip_route_output_key(&rt, &fl);
 	}
diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c	Wed Oct 30 16:44:30 2002
+++ b/net/ipv4/tcp_output.c	Wed Oct 30 16:44:30 2002
@@ -89,8 +89,8 @@
 	struct dst_entry *dst = __sk_dst_get(sk);
 	int mss = tp->advmss;
 
-	if (dst && dst->advmss < mss) {
-		mss = dst->advmss;
+	if (dst && dst_metric(dst, RTAX_ADVMSS) < mss) {
+		mss = dst_metric(dst, RTAX_ADVMSS);
 		tp->advmss = mss;
 	}
 
@@ -554,13 +554,17 @@
 int tcp_sync_mss(struct sock *sk, u32 pmtu)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
+	struct dst_entry *dst = __sk_dst_get(sk);
 	int mss_now;
 
+	if (dst && dst->ops->get_mss)
+		pmtu = dst->ops->get_mss(dst, pmtu);
+
 	/* Calculate base mss without TCP options:
 	   It is MMS_S - sizeof(tcphdr) of rfc1122
 	 */
-
 	mss_now = pmtu - tp->af_specific->net_header_len - sizeof(struct tcphdr);
+
 	/* Clamp it (mss_clamp does not include tcp options) */
 	if (mss_now > tp->mss_clamp)
 		mss_now = tp->mss_clamp;
@@ -1211,10 +1215,10 @@
 	if (req->rcv_wnd == 0) { /* ignored for retransmitted syns */
 		__u8 rcv_wscale; 
 		/* Set this up on the first call only */
-		req->window_clamp = tp->window_clamp ? : dst->window;
+		req->window_clamp = tp->window_clamp ? : dst_metric(dst, RTAX_WINDOW);
 		/* tcp_full_space because it is guaranteed to be the first packet */
 		tcp_select_initial_window(tcp_full_space(sk), 
-			dst->advmss - (req->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0),
+			dst_metric(dst, RTAX_ADVMSS) - (req->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0),
 			&req->rcv_wnd,
 			&req->window_clamp,
 			req->wscale_ok,
@@ -1226,7 +1230,7 @@
 	th->window = htons(req->rcv_wnd);
 
 	TCP_SKB_CB(skb)->when = tcp_time_stamp;
-	tcp_syn_build_options((__u32 *)(th + 1), dst->advmss, req->tstamp_ok,
+	tcp_syn_build_options((__u32 *)(th + 1), dst_metric(dst, RTAX_ADVMSS), req->tstamp_ok,
 			      req->sack_ok, req->wscale_ok, req->rcv_wscale,
 			      TCP_SKB_CB(skb)->when,
 			      req->ts_recent);
@@ -1255,11 +1259,11 @@
 	if (tp->user_mss)
 		tp->mss_clamp = tp->user_mss;
 	tp->max_window = 0;
-	tcp_sync_mss(sk, dst->pmtu);
+	tcp_sync_mss(sk, dst_pmtu(dst));
 
 	if (!tp->window_clamp)
-		tp->window_clamp = dst->window;
-	tp->advmss = dst->advmss;
+		tp->window_clamp = dst_metric(dst, RTAX_WINDOW);
+	tp->advmss = dst_metric(dst, RTAX_ADVMSS);
 	tcp_initialize_rcv_mss(sk);
 
 	tcp_select_initial_window(tcp_full_space(sk),
diff -Nru a/net/ipv4/udp.c b/net/ipv4/udp.c
--- a/net/ipv4/udp.c	Wed Oct 30 16:44:24 2002
+++ b/net/ipv4/udp.c	Wed Oct 30 16:44:24 2002
@@ -62,10 +62,13 @@
  *					return ENOTCONN for unconnected sockets (POSIX)
  *		Janos Farkas	:	don't deliver multi/broadcasts to a different
  *					bound-to-device socket
- *		Arnaldo C. Melo :	move proc routines to ip_proc.c.
  *	Hirokazu Takahashi	:	HW checksumming for outgoing UDP
  *					datagrams.
  *	Hirokazu Takahashi	:	sendfile() on UDP works now.
+ *		Arnaldo C. Melo :	convert /proc/net/udp to seq_file
+ *	YOSHIFUJI Hideaki @USAGI and:	Support IPV6_V6ONLY socket option, which
+ *	Alexey Kuznetsov:		allow both IPv4 and IPv6 sockets to bind
+ *					a single port at the same time.
  *
  *
  *		This program is free software; you can redistribute it and/or
@@ -87,11 +90,14 @@
 #include <linux/mm.h>
 #include <linux/config.h>
 #include <linux/inet.h>
+#include <linux/ipv6.h>
 #include <linux/netdevice.h>
 #include <net/snmp.h>
 #include <net/tcp.h>
 #include <net/protocol.h>
 #include <linux/skbuff.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
 #include <net/sock.h>
 #include <net/udp.h>
 #include <net/icmp.h>
@@ -168,6 +174,7 @@
 
 			if (inet2->num == snum &&
 			    sk2 != sk &&
+			    !ipv6_only_sock(sk2) &&
 			    sk2->bound_dev_if == sk->bound_dev_if &&
 			    (!inet2->rcv_saddr ||
 			     !inet->rcv_saddr ||
@@ -226,29 +233,29 @@
 	for(sk = udp_hash[hnum & (UDP_HTABLE_SIZE - 1)]; sk != NULL; sk = sk->next) {
 		struct inet_opt *inet = inet_sk(sk);
 
-		if (inet->num == hnum) {
-			int score = 0;
+		if (inet->num == hnum && !ipv6_only_sock(sk)) {
+			int score = (sk->family == PF_INET ? 1 : 0);
 			if (inet->rcv_saddr) {
 				if (inet->rcv_saddr != daddr)
 					continue;
-				score++;
+				score+=2;
 			}
 			if (inet->daddr) {
 				if (inet->daddr != saddr)
 					continue;
-				score++;
+				score+=2;
 			}
 			if (inet->dport) {
 				if (inet->dport != sport)
 					continue;
-				score++;
+				score+=2;
 			}
 			if(sk->bound_dev_if) {
 				if(sk->bound_dev_if != dif)
 					continue;
-				score++;
+				score+=2;
 			}
-			if(score == 4) {
+			if(score == 9) {
 				result = sk;
 				break;
 			} else if(score > badness) {
@@ -286,6 +293,7 @@
 		    (inet->daddr && inet->daddr != rmt_addr)		||
 		    (inet->dport != rmt_port && inet->dport)		||
 		    (inet->rcv_saddr && inet->rcv_saddr != loc_addr)	||
+		    ipv6_only_sock(s)					||
 		    (s->bound_dev_if && s->bound_dev_if != dif))
 			continue;
 		break;
@@ -512,9 +520,6 @@
 		if (likely(up->pending))
  			goto do_append_data;
 		release_sock(sk);
-
-		NETDEBUG(if (net_ratelimit()) printk(KERN_DEBUG "udp cork app bug 1\n"));
-		return -EINVAL;
 	}
 	ulen += sizeof(struct udphdr);
 
@@ -586,11 +591,15 @@
 		rt = (struct rtable*)sk_dst_check(sk, 0);
 
 	if (rt == NULL) {
-		struct flowi fl = { .nl_u = { .ip4_u =
+		struct flowi fl = { .oif = ipc.oif,
+				    .nl_u = { .ip4_u =
 					      { .daddr = faddr,
 						.saddr = saddr,
 						.tos = tos } },
-				    .oif = ipc.oif };
+				    .proto = IPPROTO_UDP,
+				    .uli_u = { .ports =
+					       { .sport = inet->sport,
+						 .dport = dport } } };
 		err = ip_route_output_key(&rt, &fl);
 		if (err)
 			goto out;
@@ -872,7 +881,9 @@
 			saddr = inet->mc_addr;
 	}
 	err = ip_route_connect(&rt, usin->sin_addr.s_addr, saddr,
-			       RT_CONN_FLAGS(sk), oif);
+			       RT_CONN_FLAGS(sk), oif,
+			       IPPROTO_UDP,
+			       inet->sport, usin->sin_port);
 	if (err)
 		return err;
 	if ((rt->rt_flags&RTCF_BROADCAST) && !sk->broadcast) {
@@ -937,8 +948,6 @@
 	if (sk->filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
 		if (__udp_checksum_complete(skb)) {
 			UDP_INC_STATS_BH(UdpInErrors);
-			IP_INC_STATS_BH(IpInDiscards);
-			ip_statistics[smp_processor_id()*2].IpInDelivers--;
 			kfree_skb(skb);
 			return -1;
 		}
@@ -948,8 +957,6 @@
 
 	if (sock_queue_rcv_skb(sk,skb)<0) {
 		UDP_INC_STATS_BH(UdpInErrors);
-		IP_INC_STATS_BH(IpInDiscards);
-		ip_statistics[smp_processor_id()*2].IpInDelivers--;
 		kfree_skb(skb);
 		return -1;
 	}
@@ -1033,8 +1040,6 @@
 	u32 daddr = skb->nh.iph->daddr;
 	int len = skb->len;
 
-  	IP_INC_STATS_BH(IpInDelivers);
-
 	/*
 	 *	Validate the packet and the UDP length.
 	 */
@@ -1208,3 +1213,171 @@
 	.unhash =	udp_v4_unhash,
 	.get_port =	udp_v4_get_port,
 };
+
+/* ------------------------------------------------------------------------ */
+#ifdef CONFIG_PROC_FS
+
+struct udp_iter_state {
+	int bucket;
+};
+
+static __inline__ struct sock *udp_get_bucket(struct seq_file *seq, loff_t *pos)
+{
+	int i;
+	struct sock *sk = NULL;
+	loff_t l = *pos;
+	struct udp_iter_state *state = seq->private;
+
+	for (; state->bucket < UDP_HTABLE_SIZE; ++state->bucket)
+		for (i = 0, sk = udp_hash[state->bucket]; sk; ++i, sk = sk->next) {
+			if (sk->family != PF_INET)
+				continue;
+			if (l--)
+				continue;
+			*pos = i;
+			goto out;
+		}
+out:
+	return sk;
+}
+
+static void *udp_seq_start(struct seq_file *seq, loff_t *pos)
+{
+	read_lock(&udp_hash_lock);
+	return *pos ? udp_get_bucket(seq, pos) : (void *)1;
+}
+
+static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+	struct sock *sk;
+	struct udp_iter_state *state;
+
+	if (v == (void *)1) {
+		sk = udp_get_bucket(seq, pos);
+		goto out;
+	}
+
+	sk = v;
+	sk = sk->next;
+	if (sk) 
+		goto out;
+
+	state = seq->private;
+	if (++state->bucket >= UDP_HTABLE_SIZE) 
+		goto out;
+
+	*pos = 0;
+	sk = udp_get_bucket(seq, pos);
+out:
+	++*pos;
+	return sk;
+}
+
+static void udp_seq_stop(struct seq_file *seq, void *v)
+{
+	read_unlock(&udp_hash_lock);
+}
+
+static void udp_format_sock(struct sock *sp, char *tmpbuf, int bucket)
+{
+	struct inet_opt *inet = inet_sk(sp);
+	unsigned int dest = inet->daddr;
+	unsigned int src  = inet->rcv_saddr;
+	__u16 destp	  = ntohs(inet->dport);
+	__u16 srcp	  = ntohs(inet->sport);
+
+	sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
+		" %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
+		bucket, src, srcp, dest, destp, sp->state, 
+		atomic_read(&sp->wmem_alloc), atomic_read(&sp->rmem_alloc),
+		0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
+		atomic_read(&sp->refcnt), sp);
+}
+
+static int udp_seq_show(struct seq_file *seq, void *v)
+{
+	if (v == (void *)1)
+		seq_printf(seq, "%-127s\n",
+			   "  sl  local_address rem_address   st tx_queue "
+			   "rx_queue tr tm->when retrnsmt   uid  timeout "
+			   "inode");
+	else {
+		char tmpbuf[129];
+		struct udp_iter_state *state = seq->private;
+
+		udp_format_sock(v, tmpbuf, state->bucket);
+		seq_printf(seq, "%-127s\n", tmpbuf);
+	}
+	return 0;
+}
+/* ------------------------------------------------------------------------ */
+
+static struct seq_operations udp_seq_ops = {
+	.start  = udp_seq_start,
+	.next   = udp_seq_next,
+	.stop   = udp_seq_stop,
+	.show   = udp_seq_show,
+};
+
+static int udp_seq_open(struct inode *inode, struct file *file)
+{
+	struct seq_file *seq;
+	int rc = -ENOMEM;
+	struct udp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+       
+	if (!s)
+		goto out;
+
+	rc = seq_open(file, &udp_seq_ops);
+	if (rc)
+		goto out_kfree;
+
+	seq	     = file->private_data;
+	seq->private = s;
+	memset(s, 0, sizeof(*s));
+out:
+	return rc;
+out_kfree:
+	kfree(s);
+	goto out;
+}
+
+static struct file_operations udp_seq_fops = {
+	.open           = udp_seq_open,
+	.read           = seq_read,
+	.llseek         = seq_lseek,
+	.release	= ip_seq_release,
+};
+
+/* ------------------------------------------------------------------------ */
+
+int __init udp_proc_init(void)
+{
+	struct proc_dir_entry *p;
+	int rc = 0;
+
+	p = create_proc_entry("udp", S_IRUGO, proc_net);
+	if (p)
+		p->proc_fops = &udp_seq_fops;
+	else
+		rc = -ENOMEM;
+	return rc;
+}
+
+void __init udp_proc_exit(void)
+{
+	remove_proc_entry("udp", proc_net);
+}
+
+#else /* CONFIG_PROC_FS */
+
+int __init udp_proc_init(void)
+{
+	return 0;
+}
+
+void __init udp_proc_exit(void)
+{
+	return 0;
+}
+#endif /* CONFIG_PROC_FS */
diff -Nru a/net/ipv4/xfrm_input.c b/net/ipv4/xfrm_input.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/xfrm_input.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,154 @@
+#include <net/ip.h>
+#include <net/xfrm.h>
+
+static kmem_cache_t *secpath_cachep;
+
+void __secpath_destroy(struct sec_path *sp)
+{
+	int i;
+	for (i = 0; i < sp->len; i++)
+		xfrm_state_put(sp->xvec[i]);
+	kmem_cache_free(secpath_cachep, sp);
+}
+
+/* Fetch spi and seq frpm ipsec header */
+
+static int xfrm_parse_spi(struct sk_buff *skb, u32 *spi, u32 *seq)
+{
+	int offset, offset_seq;
+
+	switch (skb->nh.iph->protocol) {
+	case IPPROTO_AH:
+		offset = offsetof(struct ip_auth_hdr, spi);
+		offset_seq = offsetof(struct ip_auth_hdr, seq_no);
+		break;
+	case IPPROTO_ESP:
+		offset = offsetof(struct ip_esp_hdr, spi);
+		offset_seq = offsetof(struct ip_esp_hdr, seq_no);
+		break;
+	case IPPROTO_COMP:
+		if (!pskb_may_pull(skb, 4))
+			return -EINVAL;
+		*spi = *(u16*)(skb->h.raw + 2);
+		*seq = 0;
+		return 0;
+	default:
+		return 1;
+	}
+
+	if (!pskb_may_pull(skb, 16))
+		return -EINVAL;
+
+	*spi = *(u32*)(skb->h.raw + offset);
+	*seq = *(u32*)(skb->h.raw + offset_seq);
+	return 0;
+}
+
+
+
+int xfrm4_rcv(struct sk_buff *skb)
+{
+	int err;
+	u32 spi, seq;
+	struct xfrm_state *xfrm_vec[XFRM_MAX_DEPTH];
+	struct xfrm_state *x;
+	int xfrm_nr = 0;
+	int decaps = 0;
+
+	if ((err = xfrm_parse_spi(skb, &spi, &seq)) != 0)
+		goto drop;
+
+	do {
+		struct iphdr *iph = skb->nh.iph;
+
+		if (xfrm_nr == XFRM_MAX_DEPTH)
+			goto drop;
+
+		x = xfrm_state_lookup(iph->daddr, spi, iph->protocol);
+		if (x == NULL)
+			goto drop;
+
+		spin_lock(&x->lock);
+		if (unlikely(x->km.state != XFRM_STATE_VALID))
+			goto drop_unlock;
+
+		if (x->props.replay_window && xfrm_replay_check(x, seq))
+			goto drop_unlock;
+
+		if (x->type->input(x, skb))
+			goto drop_unlock;
+
+		if (x->props.replay_window)
+			xfrm_replay_advance(x, seq);
+
+		spin_unlock(&x->lock);
+
+		xfrm_vec[xfrm_nr++] = x;
+
+		iph = skb->nh.iph;
+
+		if (x->props.mode) {
+			if (iph->protocol != IPPROTO_IP)
+				goto drop;
+			skb->nh.raw = skb->data;
+			iph = skb->nh.iph;
+			memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
+			decaps = 1;
+			break;
+		}
+
+		if ((err = xfrm_parse_spi(skb, &spi, &seq)) < 0)
+			goto drop;
+	} while (!err);
+
+	/* Allocate new secpath or COW existing one. */
+
+	if (!skb->sp || atomic_read(&skb->sp->refcnt) != 1) {
+		struct sec_path *sp;
+		sp = kmem_cache_alloc(secpath_cachep, SLAB_ATOMIC);
+		if (!sp)
+			goto drop;
+		if (skb->sp) {
+			memcpy(sp, skb->sp, sizeof(struct sec_path));
+			secpath_put(skb->sp);
+		} else
+			sp->len = 0;
+		atomic_set(&sp->refcnt, 1);
+		skb->sp = sp;
+	}
+	if (xfrm_nr + skb->sp->len > XFRM_MAX_DEPTH)
+		goto drop;
+
+	memcpy(skb->sp->xvec+skb->sp->len, xfrm_vec, xfrm_nr*sizeof(void*));
+	skb->sp->len += xfrm_nr;
+
+	if (decaps) {
+		dst_release(skb->dst);
+		skb->dst = NULL;
+		netif_rx(skb);
+		return 0;
+	} else {
+		return -skb->nh.iph->protocol;
+	}
+
+drop_unlock:
+	spin_unlock(&x->lock);
+	xfrm_state_put(x);
+drop:
+	while (--xfrm_nr >= 0)
+		xfrm_state_put(xfrm_vec[xfrm_nr]);
+	kfree_skb(skb);
+	return 0;
+}
+
+
+void __init xfrm_input_init(void)
+{
+	secpath_cachep = kmem_cache_create("secpath_cache",
+					   sizeof(struct sec_path),
+					   0, SLAB_HWCACHE_ALIGN,
+					   NULL, NULL);
+
+	if (!secpath_cachep)
+		panic("IP: failed to allocate secpath_cache\n");
+}
diff -Nru a/net/ipv4/xfrm_policy.c b/net/ipv4/xfrm_policy.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/xfrm_policy.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,802 @@
+#include <net/xfrm.h>
+#include <net/ip.h>
+
+static u32      xfrm_policy_genid;
+static rwlock_t xfrm_policy_lock = RW_LOCK_UNLOCKED;
+
+struct xfrm_policy *xfrm_policy_list[XFRM_POLICY_MAX];
+
+extern struct dst_ops xfrm4_dst_ops;
+
+/* Limited flow cache. Its function now is to accelerate search for
+ * policy rules.
+ *
+ * Flow cache is private to cpus, at the moment this is important
+ * mostly for flows which do not match any rule, so that flow lookups
+ * are absolultely cpu-local. When a rule exists we do some updates
+ * to rule (refcnt, stats), so that locality is broken. Later this
+ * can be repaired.
+ */
+
+struct flow_entry
+{
+	struct flow_entry	*next;
+	struct flowi		fl;
+	u8			dir;
+	u32			genid;
+	struct xfrm_policy	*pol;
+};
+
+static kmem_cache_t *flow_cachep;
+
+struct flow_entry **flow_table;
+
+#define FLOWCACHE_HASH_SIZE	1024
+
+static inline u32 flow_hash(struct flowi *fl)
+{
+	u32 hash = fl->fl4_src ^ fl->uli_u.ports.sport;
+
+	hash = ((hash & 0xF0F0F0F0) >> 4) | ((hash & 0x0F0F0F0F) << 4);
+
+	hash ^= fl->fl4_dst ^ fl->uli_u.ports.dport;
+	hash ^= (hash >> 10);
+	hash ^= (hash >> 20);
+	return hash & (FLOWCACHE_HASH_SIZE-1);
+}
+
+static int flow_lwm = 2*FLOWCACHE_HASH_SIZE;
+static int flow_hwm = 4*FLOWCACHE_HASH_SIZE;
+
+static int flow_number[NR_CPUS] __cacheline_aligned;
+
+#define flow_count(cpu)		(flow_number[cpu])
+
+static void flow_cache_shrink(int cpu)
+{
+	int i;
+	struct flow_entry *fle, **flp;
+	int shrink_to = flow_lwm/FLOWCACHE_HASH_SIZE;
+
+	for (i=0; i<FLOWCACHE_HASH_SIZE; i++) {
+		int k = 0;
+		flp = &flow_table[cpu*FLOWCACHE_HASH_SIZE+i];
+		while ((fle=*flp) != NULL && k<shrink_to) {
+			k++;
+			flp = &fle->next;
+		}
+		while ((fle=*flp) != NULL) {
+			*flp = fle->next;
+			if (fle->pol)
+				xfrm_pol_put(fle->pol);
+			kmem_cache_free(flow_cachep, fle);
+		}
+	}
+}
+
+struct xfrm_policy *flow_lookup(int dir, struct flowi *fl)
+{
+	struct xfrm_policy *pol;
+	struct flow_entry *fle;
+	u32 hash = flow_hash(fl);
+	int cpu;
+
+	local_bh_disable();
+	cpu = smp_processor_id();
+
+	for (fle = flow_table[cpu*FLOWCACHE_HASH_SIZE+hash];
+	     fle; fle = fle->next) {
+		if (memcmp(fl, &fle->fl, sizeof(fle->fl)) == 0 &&
+		    fle->dir == dir) {
+			if (fle->genid == xfrm_policy_genid) {
+				if ((pol = fle->pol) != NULL)
+					atomic_inc(&pol->refcnt);
+				local_bh_enable();
+				return pol;
+			}
+			break;
+		}
+	}
+
+	pol = xfrm_policy_lookup(dir, fl);
+
+	if (fle) {
+		/* Stale flow entry found. Update it. */
+		fle->genid = xfrm_policy_genid;
+
+		if (fle->pol)
+			xfrm_pol_put(fle->pol);
+		fle->pol = pol;
+		if (pol)
+			atomic_inc(&pol->refcnt);
+	} else {
+		if (flow_count(cpu) > flow_hwm)
+			flow_cache_shrink(cpu);
+
+		fle = kmem_cache_alloc(flow_cachep, SLAB_ATOMIC);
+		if (fle) {
+			flow_count(cpu)++;
+			fle->fl = *fl;
+			fle->genid = xfrm_policy_genid;
+			fle->dir = dir;
+			fle->pol = pol;
+			if (pol)
+				atomic_inc(&pol->refcnt);
+			fle->next = flow_table[cpu*FLOWCACHE_HASH_SIZE+hash];
+			flow_table[cpu*FLOWCACHE_HASH_SIZE+hash] = fle;
+		}
+	}
+	local_bh_enable();
+	return pol;
+}
+
+void __init flow_cache_init(void)
+{
+	int order;
+
+	flow_cachep = kmem_cache_create("flow_cache",
+					sizeof(struct flow_entry),
+					0, SLAB_HWCACHE_ALIGN,
+					NULL, NULL);
+
+	if (!flow_cachep)
+		panic("NET: failed to allocate flow cache slab\n");
+
+	for (order = 0;
+	     (PAGE_SIZE<<order) < (NR_CPUS*sizeof(struct flow_entry *)*FLOWCACHE_HASH_SIZE);
+	     order++)
+		/* NOTHING */;
+
+	flow_table = (struct flow_entry **)__get_free_pages(GFP_ATOMIC, order);
+
+	if (!flow_table)
+		panic("Failed to allocate flow cache hash table\n");
+
+	memset(flow_table, 0, PAGE_SIZE<<order);
+}
+
+
+/* Allocate xfrm_policy. Not used here, it is supposed to be used by pfkeyv2
+ * SPD calls.
+ */
+
+struct xfrm_policy *xfrm_policy_alloc(void)
+{
+	struct xfrm_policy *policy;
+
+	policy = kmalloc(sizeof(struct xfrm_policy), GFP_KERNEL);
+
+	if (policy) {
+		memset(policy, 0, sizeof(struct xfrm_policy));
+		atomic_set(&policy->refcnt, 1);
+		policy->lock = RW_LOCK_UNLOCKED;
+	}
+	return policy;
+}
+
+/* Destroy xfrm_policy: descendant resources must be released to this moment. */
+
+void __xfrm_policy_destroy(struct xfrm_policy *policy)
+{
+	int i;
+
+	if (!policy->dead)
+		BUG();
+
+	for (i=0; i<policy->xfrm_nr; i++) {
+		if (policy->xfrm_vec[i].resolved)
+			BUG();
+	}
+
+	if (policy->bundles)
+		BUG();
+
+	kfree(policy);
+}
+
+/* Rule must be locked. Release descentant resources, announce
+ * entry dead. The rule must be unlinked from lists to the moment.
+ */
+
+void xfrm_policy_kill(struct xfrm_policy *policy)
+{
+	struct dst_entry *dst;
+	int i;
+
+	policy->dead = 1;
+
+	for (i=0; i<policy->xfrm_nr; i++) {
+		if (policy->xfrm_vec[i].resolved) {
+			xfrm_state_put(policy->xfrm_vec[i].resolved);
+			policy->xfrm_vec[i].resolved = NULL;
+		}
+	}
+
+	while ((dst = policy->bundles) != NULL) {
+		policy->bundles = dst->next;
+		dst_free(dst);
+	}
+}
+
+
+/* Find policy to apply to this flow. */
+
+struct xfrm_policy *xfrm_policy_lookup(int dir, struct flowi *fl)
+{
+	struct xfrm_policy *pol;
+	unsigned long now = xtime.tv_sec;
+
+	read_lock(&xfrm_policy_lock);
+	for (pol = xfrm_policy_list[dir]; pol; pol = pol->next) {
+		struct xfrm_selector *sel = &pol->selector;
+
+		if (xfrm4_selector_match(sel, fl) && now < pol->expires) {
+			pol->lastuse = now;
+			atomic_inc(&pol->refcnt);
+			break;
+		}
+	}
+	read_unlock(&xfrm_policy_lock);
+	return pol;
+}
+
+/* Resolve list of templates for the flow, given policy. */
+
+static int
+xfrm_tmpl_resolve(struct xfrm_policy *policy, struct flowi *fl,
+		  struct xfrm_state **xfrm)
+{
+	int i, error;
+	u32 daddr = fl->fl4_dst;
+
+	for (i = 0; i < policy->xfrm_nr; i++) {
+		struct xfrm_tmpl *tmpl = &policy->xfrm_vec[i];
+		if (tmpl->mode)
+			daddr = tmpl->id.daddr.xfrm4_addr;
+		if (tmpl->resolved) {
+			if (tmpl->resolved->km.state != XFRM_STATE_VALID) {
+				error = -EINVAL;
+				goto fail;
+			}
+			xfrm[i] = tmpl->resolved;
+			atomic_inc(&tmpl->resolved->refcnt);
+		} else {
+			xfrm[i] = xfrm_state_find(daddr, fl, tmpl);
+			if (xfrm[i] == NULL) {
+				error = -ENOMEM;
+				goto fail;
+			}
+			if (xfrm[i]->km.state == XFRM_STATE_VALID)
+				continue;
+
+			i++;
+			if (xfrm[i]->km.state == XFRM_STATE_ERROR)
+				error = -EINVAL;
+			else
+				error = -EAGAIN;
+			goto fail;
+		}
+	}
+	return 0;
+
+fail:
+	for (i--; i>=0; i--)
+		xfrm_state_put(xfrm[i]);
+	return error;
+}
+
+/* Check that the bundle accepts the flow and its components are
+ * still valid.
+ */
+
+static int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl)
+{
+	do {
+		if (xdst->u.dst.ops != &xfrm4_dst_ops)
+			return 1;
+
+		if (!xfrm4_selector_match(&xdst->u.dst.xfrm->sel, fl))
+			return 0;
+		if (xdst->u.dst.xfrm->km.state != XFRM_STATE_VALID ||
+		    xdst->u.dst.path->obsolete > 0)
+			return 0;
+		xdst = (struct xfrm_dst*)xdst->u.dst.child;
+	} while (xdst);
+	return 0;
+}
+
+
+/* Allocate chain of dst_entry's, attach known xfrm's, calculate
+ * all the metrics... Shortly, bundle a bundle.
+ */
+
+int
+xfrm_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm,
+		   struct flowi *fl, struct dst_entry **dst_p)
+{
+	struct dst_entry *dst, *dst_prev;
+	struct rtable *rt = (struct rtable*)(*dst_p);
+	u32 remote = fl->fl4_dst;
+	u32 local  = fl->fl4_src;
+	int i;
+	int err;
+	int header_len = 0;
+
+	dst = dst_prev = NULL;
+
+	for (i = 0; i < policy->xfrm_nr; i++) {
+		struct dst_entry *dst1 = dst_alloc(&xfrm4_dst_ops);
+
+		if (unlikely(dst1 == NULL)) {
+			err = -ENOBUFS;
+			goto error;
+		}
+
+		dst1->xfrm = xfrm[i];
+		if (!dst)
+			dst = dst1;
+		else
+			dst_prev->child = dst1;
+		dst_prev = dst1;
+		if (xfrm[i]->props.mode) {
+			remote = xfrm[i]->id.daddr.xfrm4_addr;
+			local  = xfrm[i]->props.saddr.xfrm4_addr;
+		}
+		header_len += xfrm[i]->props.header_len;
+	}
+
+	if (remote != fl->fl4_dst) {
+		struct flowi fl_tunnel = { .nl_u = { .ip4_u =
+						     { .daddr = remote,
+						       .saddr = local }
+					           }
+				         };
+		err = ip_route_output_key(&rt, &fl_tunnel);
+		if (err)
+			goto error;
+		dst_release(*dst_p);
+		*dst_p = &rt->u.dst;
+	}
+	dst_prev->child = &rt->u.dst;
+	for (dst_prev = dst; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) {
+		struct xfrm_dst *x = (struct xfrm_dst*)dst_prev;
+		x->u.rt.fl = *fl;
+
+		dst_prev->dev = rt->u.dst.dev;
+		if (rt->u.dst.dev)
+			dev_hold(rt->u.dst.dev);
+		dst_prev->flags		= DST_HOST;
+		dst_prev->lastuse	= jiffies;
+		dst_prev->header_len	= header_len;
+		memcpy(&dst_prev->metrics, &rt->u.dst.metrics, sizeof(&dst_prev->metrics));
+		dst_prev->path		= &rt->u.dst;
+
+		/* Copy neighbout for reachability confirmation */
+		dst_prev->neighbour	= neigh_clone(rt->u.dst.neighbour);
+		dst_prev->input		= rt->u.dst.input;
+		dst_prev->output	= dst_prev->xfrm->type->output;
+		if (rt->peer)
+			atomic_inc(&rt->peer->refcnt);
+		x->u.rt.peer = rt->peer;
+		x->u.rt.rt_flags = rt->rt_flags;
+		x->u.rt.rt_type = rt->rt_type;
+		x->u.rt.rt_src = rt->rt_src;
+		x->u.rt.rt_src = rt->rt_src;
+		x->u.rt.rt_dst = rt->rt_dst;
+		x->u.rt.rt_gateway = rt->rt_gateway;
+		x->u.rt.rt_spec_dst = rt->rt_spec_dst;
+		header_len -= x->u.dst.xfrm->props.header_len;
+	}
+	*dst_p = dst;
+	return 0;
+
+error:
+	if (dst)
+		dst_free(dst);
+	return err;
+}
+
+/* Main function: finds/creates a bundle for given flow.
+ *
+ * At the moment we eat a raw IP route. Mostly to speed up lookups
+ * on interfaces with disabled IPsec.
+ */
+int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
+		struct sock *sk, int flags)
+{
+	struct xfrm_policy *policy;
+	struct xfrm_state *xfrm[XFRM_MAX_DEPTH];
+	struct rtable *rt = (struct rtable*)*dst_p;
+	struct dst_entry *dst;
+	int err;
+	u32 genid;
+
+	/* To accelerate a bit...  */
+	if ((rt->u.dst.flags & DST_NOXFRM) || !xfrm_policy_list[XFRM_POLICY_OUT])
+		return 0;
+
+	fl->oif = rt->u.dst.dev->ifindex;
+	fl->fl4_src = rt->rt_src;
+
+restart:
+	genid = xfrm_policy_genid;
+	policy = flow_lookup(XFRM_POLICY_OUT, fl);
+	if (!policy)
+		return 0;
+
+	switch (policy->action) {
+	case XFRM_POLICY_BLOCK:
+		/* Prohibit the flow */
+		xfrm_pol_put(policy);
+		return -EPERM;
+
+	case XFRM_POLICY_ALLOW:
+		if (policy->xfrm_nr == 0) {
+			/* Flow passes not transformed. */
+			xfrm_pol_put(policy);
+			return 0;
+		}
+
+		/* Try to find matching bundle.
+		 *
+		 * LATER: help from flow cache. It is optional, this
+		 * is required only for output policy.
+		 */
+		read_lock_bh(&policy->lock);
+		for (dst = policy->bundles; dst; dst = dst->next) {
+			struct xfrm_dst *xdst = (struct xfrm_dst*)dst;
+			if (xdst->u.rt.fl.fl4_dst == fl->fl4_dst &&
+			    xdst->u.rt.fl.fl4_src == fl->fl4_src &&
+			    xdst->u.rt.fl.oif == fl->oif &&
+			    xfrm_bundle_ok(xdst, fl)) {
+				dst_clone(dst);
+				break;
+			}
+		}
+		read_unlock_bh(&policy->lock);
+
+		if (dst)
+			break;
+
+		err = xfrm_tmpl_resolve(policy, fl, xfrm);
+		if (unlikely(err)) {
+			if (err == -EAGAIN) {
+				struct task_struct *tsk = current;
+				DECLARE_WAITQUEUE(wait, tsk);
+				if (!flags)
+					goto error;
+
+				__set_task_state(tsk, TASK_INTERRUPTIBLE);
+				add_wait_queue(km_waitq, &wait);
+				err = xfrm_tmpl_resolve(policy, fl, xfrm);
+				if (err == -EAGAIN)
+					schedule();
+				__set_task_state(tsk, TASK_RUNNING);
+				remove_wait_queue(km_waitq, &wait);
+
+				if (err == -EAGAIN && signal_pending(current)) {
+					err = -ERESTART;
+					goto error;
+				}
+				if (err == -EAGAIN ||
+				    genid != xfrm_policy_genid)
+					goto restart;
+			}
+			if (err)
+				goto error;
+		}
+
+		dst = &rt->u.dst;
+		err = xfrm_bundle_create(policy, xfrm, fl, &dst);
+		if (unlikely(err)) {
+			int i;
+			for (i=0; i<policy->xfrm_nr; i++)
+				xfrm_state_put(xfrm[i]);
+			err = -EPERM;
+			goto error;
+		}
+
+		write_lock_bh(&policy->lock);
+		if (unlikely(policy->dead)) {
+			/* Wow! While we worked on resolving, this
+			 * policy has gone. Retry. It is not paranoia,
+			 * we just cannot enlist new bundle to dead object.
+			 */
+			write_unlock_bh(&policy->lock);
+
+			xfrm_pol_put(policy);
+			if (dst) {
+				dst_release(dst);
+				dst_free(dst);
+			}
+			goto restart;
+		}
+		dst->next = policy->bundles;
+		policy->bundles = dst;
+		write_unlock_bh(&policy->lock);
+	}
+	*dst_p = dst;
+	ip_rt_put(rt);
+	xfrm_pol_put(policy);
+	return 0;
+
+error:
+	ip_rt_put(rt);
+	xfrm_pol_put(policy);
+	*dst_p = NULL;
+	return err;
+}
+
+/* When skb is transformed back to its "native" form, we have to
+ * check policy restrictions. At the moment we make this in maximally
+ * stupid way. Shame on me. :-) Of course, connected sockets must
+ * have policy cached at them.
+ */
+
+static inline int
+xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x)
+{
+	return	x->id.proto == tmpl->id.proto &&
+		(x->id.spi == tmpl->id.spi || !tmpl->id.spi) &&
+		x->props.mode == tmpl->mode &&
+		(tmpl->algos & (1<<x->props.algo)) &&
+		(!x->props.mode || !tmpl->saddr.xfrm4_addr ||
+		 tmpl->saddr.xfrm4_addr == x->props.saddr.xfrm4_addr);
+}
+
+static inline int
+xfrm_policy_ok(struct xfrm_tmpl *tmpl, struct sec_path *sp, int idx)
+{
+	for (; idx < sp->len; idx++) {
+		if (xfrm_state_ok(tmpl, sp->xvec[idx]))
+			return ++idx;
+	}
+	return -1;
+}
+
+static inline void
+_decode_session(struct sk_buff *skb, struct flowi *fl)
+{
+	struct iphdr *iph = skb->nh.iph;
+	u8 *xprth = skb->nh.raw + iph->ihl*4;
+
+	if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) {
+		switch (iph->protocol) {
+		case IPPROTO_UDP:
+		case IPPROTO_TCP:
+		case IPPROTO_SCTP:
+			if (pskb_may_pull(skb, xprth + 4 - skb->data)) {
+				u16 *ports = (u16 *)xprth;
+
+				fl->uli_u.ports.sport = ports[0];
+				fl->uli_u.ports.dport = ports[1];
+			}
+			break;
+
+		case IPPROTO_ESP:
+			if (pskb_may_pull(skb, xprth + 4 - skb->data)) {
+				u32 *ehdr = (u32 *)xprth;
+
+				fl->uli_u.spi = ehdr[0];
+			}
+			break;
+
+		case IPPROTO_AH:
+			if (pskb_may_pull(skb, xprth + 8 - skb->data)) {
+				u32 *ah_hdr = (u32*)xprth;
+
+				fl->uli_u.spi = ah_hdr[1];
+			}
+			break;
+
+		default:
+			fl->uli_u.spi = 0;
+			break;
+		};
+	} else {
+		memset(fl, 0, sizeof(struct flowi));
+	}
+	fl->proto = iph->protocol;
+	fl->fl4_dst = iph->daddr;
+	fl->fl4_src = iph->saddr;
+}
+
+int __xfrm_policy_check(int dir, struct sk_buff *skb)
+{
+	struct xfrm_policy *pol;
+	struct flowi fl;
+
+	_decode_session(skb, &fl);
+
+	/* First, check used SA against their selectors. */
+	if (skb->sp) {
+		int i;
+		for (i=skb->sp->len-1; i>=0; i++) {
+			if (!xfrm4_selector_match(&skb->sp->xvec[i]->sel, &fl))
+				return 0;
+		}
+	}
+
+	pol = flow_lookup(dir, &fl);
+
+	if (!pol)
+		return 1;
+
+	if (pol->action == XFRM_POLICY_ALLOW) {
+		if (pol->xfrm_nr != 0) {
+			struct sec_path *sp;
+			int i, k;
+
+			if ((sp = skb->sp) == NULL)
+				goto reject;
+
+			/* For each tmpl search corresponding xfrm.
+			 * Order is _important_. Later we will implement
+			 * some barriers, but at the moment barriers
+			 * are implied between each two transformations.
+			 */
+			for (i = pol->xfrm_nr-1, k = 0; i >= 0; i--) {
+				k = xfrm_policy_ok(pol->xfrm_vec+i, sp, k);
+				if (k < 0)
+					goto reject;
+			}
+		}
+		xfrm_pol_put(pol);
+		return 1;
+	}
+
+reject:
+	xfrm_pol_put(pol);
+	return 0;
+}
+
+int __xfrm_route_forward(struct sk_buff *skb)
+{
+	struct flowi fl;
+
+	_decode_session(skb, &fl);
+
+	return xfrm_lookup(&skb->dst, &fl, NULL, 0) == 0;
+}
+
+static struct dst_entry *xfrm4_dst_check(struct dst_entry *dst, u32 cookie)
+{
+	dst_release(dst);
+	return NULL;
+}
+
+static void xfrm4_dst_destroy(struct dst_entry *dst)
+{
+	xfrm_state_put(dst->xfrm);
+	dst->xfrm = NULL;
+}
+
+static void xfrm4_link_failure(struct sk_buff *skb)
+{
+	/* Impossible. Such dst must be popped before reaches point of failure. */
+	return;
+}
+
+static struct dst_entry *xfrm4_negative_advice(struct dst_entry *dst)
+{
+	if (dst) {
+		if (dst->obsolete) {
+			dst_release(dst);
+			dst = NULL;
+		}
+	}
+	return dst;
+}
+
+
+static int xfrm4_garbage_collect(void)
+{
+	int i;
+	struct xfrm_policy *pol;
+	struct dst_entry *dst, **dstp, *gc_list = NULL;
+
+	read_lock_bh(&xfrm_policy_lock);
+	for (i=0; i<XFRM_POLICY_MAX; i++) {
+		for (pol = xfrm_policy_list[i]; pol; pol = pol->next) {
+			write_lock(&pol->lock);
+			dstp = &pol->bundles;
+			while ((dst=*dstp) != NULL) {
+				if (atomic_read(&dst->__refcnt) == 0) {
+					*dstp = dst->next;
+					dst->next = gc_list;
+					gc_list = dst;
+				} else {
+					dstp = &dst->next;
+				}
+			}
+			write_unlock(&pol->lock);
+		}
+	}
+	read_unlock_bh(&xfrm_policy_lock);
+
+	while (gc_list) {
+		dst = gc_list;
+		gc_list = dst->next;
+		dst_destroy(dst);
+	}
+
+	return (atomic_read(&xfrm4_dst_ops.entries) > xfrm4_dst_ops.gc_thresh*2);
+}
+
+static void xfrm4_update_pmtu(struct dst_entry *dst, u32 mtu)
+{
+	struct dst_entry *path = dst->path;
+
+	if (mtu < 68 + dst->header_len)
+		return;
+
+	path->ops->update_pmtu(path, mtu);
+}
+
+/* Well... that's _TASK_. We need to scan through transformation
+ * list and figure out what mss tcp should generate in order to
+ * final datagram fit to mtu. Mama mia... :-)
+ *
+ * Apparently, some easy way exists, but we used to choose the most
+ * bizarre ones. :-) So, raising Kalashnikov... tra-ta-ta.
+ *
+ * Consider this function as something like dark humour. :-)
+ */
+static int xfrm4_get_mss(struct dst_entry *dst, u32 mtu)
+{
+	int res = mtu - dst->header_len;
+
+	for (;;) {
+		struct dst_entry *d = dst;
+		int m = res;
+
+		do {
+			struct xfrm_state *x = d->xfrm;
+			if (x) {
+				if (x->type->get_max_size)
+					m = x->type->get_max_size(d->xfrm, m);
+				else
+					m += x->props.header_len;
+			}
+		} while ((d = d->child) != NULL);
+
+		if (m <= mtu)
+			break;
+		res -= (m - mtu);
+		if (res < 88)
+			return mtu;
+	}
+
+	return res + dst->header_len;
+}
+
+struct dst_ops xfrm4_dst_ops = {
+	.family =		AF_INET,
+	.protocol =		__constant_htons(ETH_P_IP),
+	.gc =			xfrm4_garbage_collect,
+	.check =		xfrm4_dst_check,
+	.destroy =		xfrm4_dst_destroy,
+	.negative_advice =	xfrm4_negative_advice,
+	.link_failure =		xfrm4_link_failure,
+	.update_pmtu =		xfrm4_update_pmtu,
+	.get_mss =		xfrm4_get_mss,
+	.gc_thresh =		1024,
+	.entry_size =		sizeof(struct xfrm_dst),
+};
+
+void __init xfrm_init(void)
+{
+	xfrm4_dst_ops.kmem_cachep = kmem_cache_create("xfrm4_dst_cache",
+						      sizeof(struct xfrm_dst),
+						      0, SLAB_HWCACHE_ALIGN,
+						      NULL, NULL);
+
+	if (!xfrm4_dst_ops.kmem_cachep)
+		panic("IP: failed to allocate xfrm4_dst_cache\n");
+
+	flow_cache_init();
+
+	xfrm_state_init();
+	xfrm_input_init();
+	ah4_init();
+}
diff -Nru a/net/ipv4/xfrm_state.c b/net/ipv4/xfrm_state.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv4/xfrm_state.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,273 @@
+#include <net/xfrm.h>
+#include <linux/pfkeyv2.h>
+
+/* Each xfrm_state is linked to three tables:
+
+   1. Hash table by (spi,daddr,ah/esp) to find SA by SPI. (input,ctl)
+   2. Hash table by daddr to find what SAs exist for given
+      destination/tunnel endpoint. (output)
+   3. (optional, NI) Radix tree by _selector_ for the case,
+      when we have to find a tunnel mode SA appropriate for given flow,
+      but do not know tunnel endpoint. At the moment we do
+      not support this and assume that tunnel endpoint is given
+      by policy. (output)
+ */
+
+spinlock_t xfrm_state_lock = SPIN_LOCK_UNLOCKED;
+
+/* Hash table to find appropriate SA towards given target (endpoint
+ * of tunnel or destination of transport mode) allowed by selector.
+ *
+ * Main use is finding SA after policy selected tunnel or transport mode.
+ * Also, it can be used by ah/esp icmp error handler to find offending SA.
+ */
+struct list_head xfrm_state_bydst[XFRM_DST_HSIZE];
+struct list_head xfrm_state_byspi[XFRM_DST_HSIZE];
+
+wait_queue_head_t *km_waitq;
+
+struct xfrm_state *xfrm_state_alloc(void)
+{
+	struct xfrm_state *x;
+
+	x = kmalloc(sizeof(struct xfrm_state), GFP_ATOMIC);
+
+	if (x) {
+		memset(x, 0, sizeof(struct xfrm_state));
+		atomic_set(&x->refcnt, 1);
+		INIT_LIST_HEAD(&x->bydst);
+		INIT_LIST_HEAD(&x->byspi);
+		x->lock = SPIN_LOCK_UNLOCKED;
+	}
+	return x;
+}
+
+void __xfrm_state_destroy(struct xfrm_state *x)
+{
+	BUG_TRAP(x->km.state == XFRM_STATE_DEAD);
+	if (x->type)
+		x->type->destructor(x);
+	kfree(x);
+}
+
+struct xfrm_state *
+xfrm_state_find(u32 daddr, struct flowi *fl, struct xfrm_tmpl *tmpl)
+{
+	unsigned h = ntohl(daddr);
+	struct xfrm_state *x;
+	int acquire_in_progress = 0;
+	int error = 0;
+
+	h = (h ^ (h>>16)) % XFRM_DST_HSIZE;
+
+	spin_lock_bh(&xfrm_state_lock);
+	list_for_each_entry(x, xfrm_state_bydst+h, bydst) {
+		if (daddr == x->id.daddr.xfrm4_addr &&
+		    tmpl->mode == x->props.mode &&
+		    tmpl->id.proto == x->id.proto) {
+			/* Resolution logic:
+			   1. There is a valid state with matching selector.
+			      Done.
+			   2. Valid state with inappropriate selector. Skip.
+
+			   Entering area of "sysdeps".
+
+			   3. If state is not valid, selector is temporary,
+			      it selects only session which triggered
+			      previous resolution. Key manager will do
+			      something to install a state with proper
+			      selector.
+			 */
+			if (x->km.state == XFRM_STATE_VALID) {
+				if (!xfrm4_selector_match(&x->sel, fl))
+					continue;
+				atomic_inc(&x->refcnt);
+				spin_unlock_bh(&xfrm_state_lock);
+				return x;
+			} else if (x->km.state == XFRM_STATE_ACQ) {
+				acquire_in_progress = 1;
+			} else if (x->km.state == XFRM_STATE_ERROR) {
+				if (xfrm4_selector_match(&x->sel, fl))
+					error = 1;
+			}
+		}
+	}
+
+	x = NULL;
+	if (!error && !acquire_in_progress &&
+	    ((x = xfrm_state_alloc()) != NULL)) {
+		/* Initialize temporary selector matching only
+		 * to current session. */
+
+		x->sel.daddr.xfrm4_addr = fl->fl4_dst;
+		x->sel.daddr.xfrm4_mask = ~0;
+		x->sel.saddr.xfrm4_addr = fl->fl4_src;
+		x->sel.saddr.xfrm4_mask = ~0;
+		x->sel.dport = fl->uli_u.ports.dport;
+		x->sel.dport_mask = ~0;
+		x->sel.sport = fl->uli_u.ports.sport;
+		x->sel.sport_mask = ~0;
+		x->sel.prefixlen_d = 32;
+		x->sel.prefixlen_s = 32;
+		x->sel.proto = fl->proto;
+		x->sel.ifindex = fl->oif;
+		x->id = tmpl->id;
+
+		if (km_query(x) == 0) {
+			list_add_tail(&x->bydst, xfrm_state_bydst+h);
+			atomic_inc(&x->refcnt);
+		} else {
+			x->km.state = XFRM_STATE_DEAD;
+			xfrm_state_put(x);
+			x = NULL;
+		}
+	}
+	spin_unlock_bh(&xfrm_state_lock);
+	return x;
+}
+
+void xfrm_state_insert(struct xfrm_state *x)
+{
+	unsigned h = ntohl(x->id.daddr.xfrm4_addr);
+
+	h = (h ^ (h>>16)) % XFRM_DST_HSIZE;
+
+	spin_lock_bh(&xfrm_state_lock);
+	list_add(&x->bydst, xfrm_state_bydst+h);
+	atomic_inc(&x->refcnt);
+
+	h = ntohl(x->id.daddr.xfrm4_addr^x->id.spi^x->id.proto);
+	h = (h ^ (h>>10) ^ (h>>20)) % XFRM_DST_HSIZE;
+	list_add(&x->byspi, xfrm_state_byspi+h);
+	atomic_inc(&x->refcnt);
+
+	spin_unlock_bh(&xfrm_state_lock);
+}
+
+int xfrm_state_check_expire(struct xfrm_state *x)
+{
+	if (x->km.state != XFRM_STATE_VALID)
+		return -EINVAL;
+
+	if (x->props.hard_byte_limit &&
+	    x->stats.bytes >= x->props.hard_byte_limit) {
+		km_notify(x, SADB_EXT_LIFETIME_HARD);
+		return -EINVAL;
+	}
+
+	if (x->km.warn_bytes &&
+	    x->stats.bytes >= x->km.warn_bytes) {
+		x->km.warn_bytes = 0;
+		km_notify(x, SADB_EXT_LIFETIME_SOFT);
+	}
+	return 0;
+}
+
+int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb)
+{
+	int nhead = x->props.header_len + skb->dst->dev->hard_header_len
+		- skb_headroom(skb);
+
+	if (nhead > 0)
+		return pskb_expand_head(skb, nhead, 0, GFP_ATOMIC);
+
+	/* Check tail too... */
+	return 0;
+}
+
+struct xfrm_state *
+xfrm_state_lookup(u32 daddr, u32 spi, u8 proto)
+{
+	unsigned h = ntohl(daddr^spi^proto);
+	struct xfrm_state *x;
+
+	h = (h ^ (h>>10) ^ (h>>20)) % XFRM_DST_HSIZE;
+
+	spin_lock_bh(&xfrm_state_lock);
+	list_for_each_entry(x, xfrm_state_byspi+h, byspi) {
+		if (spi == x->id.spi &&
+		    daddr == x->id.daddr.xfrm4_addr &&
+		    proto == x->id.proto) {
+			atomic_inc(&x->refcnt);
+			x->stats.lastuse = xtime.tv_sec;
+			spin_unlock_bh(&xfrm_state_lock);
+			return x;
+		}
+	}
+	spin_unlock_bh(&xfrm_state_lock);
+	return NULL;
+}
+
+int xfrm_replay_check(struct xfrm_state *x, u32 seq)
+{
+	u32 diff;
+
+	seq = ntohl(seq);
+
+	if (unlikely(seq == 0))
+		return -EINVAL;
+
+	if (likely(seq > x->replay.seq))
+		return 0;
+
+	diff = x->replay.seq - seq;
+	if (diff >= x->props.replay_window) {
+		x->stats.replay_window++;
+		return -EINVAL;
+	}
+
+	if (x->replay.bitmap & (1U << diff)) {
+		x->stats.replay++;
+		return -EINVAL;
+	}
+	return 0;
+}
+
+void xfrm_replay_advance(struct xfrm_state *x, u32 seq)
+{
+	u32 diff;
+
+	seq = ntohl(seq);
+
+	if (seq > x->replay.seq) {
+		diff = seq - x->replay.seq;
+		if (diff < x->props.replay_window)
+			x->replay.bitmap = ((x->replay.bitmap) << diff) | 1;
+		else
+			x->replay.bitmap = 1;
+		x->replay.seq = seq;
+	} else {
+		diff = x->replay.seq - seq;
+		x->replay.bitmap |= (1U << diff);
+	}
+}
+
+int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl)
+{
+	int i;
+
+	for (i=0; i<n; i++) {
+		if (!xfrm4_selector_match(&x[i]->sel, fl))
+			return -EINVAL;
+	}
+	return 0;
+}
+
+void km_notify(struct xfrm_state *x, int event)
+{
+}
+
+int km_query(struct xfrm_state *x)
+{
+	return -EINVAL;
+}
+
+void __init xfrm_state_init(void)
+{
+	int i;
+
+	for (i=0; i<XFRM_DST_HSIZE; i++) {
+		INIT_LIST_HEAD(&xfrm_state_bydst[i]);
+		INIT_LIST_HEAD(&xfrm_state_byspi[i]);
+	}
+}
diff -Nru a/net/ipv6/Config.in b/net/ipv6/Config.in
--- a/net/ipv6/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# IPv6 configuration
-# 
-
-if [ "$CONFIG_NETFILTER" != "n" ]; then
-   source net/ipv6/netfilter/Config.in
-fi
diff -Nru a/net/ipv6/Kconfig b/net/ipv6/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv6/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,5 @@
+#
+# IPv6 configuration
+# 
+source "net/ipv6/netfilter/Kconfig"
+
diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
--- a/net/ipv6/addrconf.c	Wed Oct 30 16:44:33 2002
+++ b/net/ipv6/addrconf.c	Wed Oct 30 16:44:33 2002
@@ -947,6 +947,7 @@
 				ipv6_ifa_notify((flags&IFA_F_DEPRECATED) ?
 						0 : RTM_NEWADDR, ifp);
 			in6_ifa_put(ifp);
+			addrconf_verify(0);
 		}
 	}
 	in6_dev_put(in6_dev);
@@ -1273,9 +1274,8 @@
 int addrconf_notify(struct notifier_block *this, unsigned long event, 
 		    void * data)
 {
-	struct net_device *dev;
-
-	dev = (struct net_device *) data;
+	struct net_device *dev = (struct net_device *) data;
+	struct inet6_dev *idev = __in6_dev_get(dev);
 
 	switch(event) {
 	case NETDEV_UP:
@@ -1292,16 +1292,27 @@
 			addrconf_dev_config(dev);
 			break;
 		};
+		if (idev) {
+			/* If the MTU changed during the interface down, when the
+			   interface up, the changed MTU must be reflected in the
+			   idev as well as routers.
+			 */
+			if (idev->cnf.mtu6 != dev->mtu && dev->mtu >= IPV6_MIN_MTU) {
+				rt6_mtu_change(dev, dev->mtu);
+				idev->cnf.mtu6 = dev->mtu;
+			}
+			/* If the changed mtu during down is lower than IPV6_MIN_MTU
+			   stop IPv6 on this interface.
+			 */
+			if (dev->mtu < IPV6_MIN_MTU)
+				addrconf_ifdown(dev, event != NETDEV_DOWN);
+		}
 		break;
 
 	case NETDEV_CHANGEMTU:
-		if (dev->mtu >= IPV6_MIN_MTU) {
-			struct inet6_dev *idev;
-
-			if ((idev = __in6_dev_get(dev)) == NULL)
-				break;
-			idev->cnf.mtu6 = dev->mtu;
+		if ( idev && dev->mtu >= IPV6_MIN_MTU) {
 			rt6_mtu_change(dev, dev->mtu);
+			idev->cnf.mtu6 = dev->mtu;
 			break;
 		}
 
diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c	Wed Oct 30 16:44:29 2002
+++ b/net/ipv6/af_inet6.c	Wed Oct 30 16:44:29 2002
@@ -88,6 +88,8 @@
 extern void ipv6_sysctl_unregister(void);
 #endif
 
+int sysctl_ipv6_bindv6only;
+
 #ifdef INET_REFCNT_DEBUG
 atomic_t inet6_sock_nr;
 #endif
@@ -218,7 +220,8 @@
 	np->mcast_hops	= -1;
 	np->mc_loop	= 1;
 	np->pmtudisc	= IPV6_PMTUDISC_WANT;
-
+	np->ipv6only	= sysctl_ipv6_bindv6only;
+	
 	/* Init the ipv4 part of the socket since we can have sockets
 	 * using v6 API for ipv4.
 	 */
diff -Nru a/net/ipv6/datagram.c b/net/ipv6/datagram.c
--- a/net/ipv6/datagram.c	Wed Oct 30 16:44:21 2002
+++ b/net/ipv6/datagram.c	Wed Oct 30 16:44:21 2002
@@ -161,6 +161,7 @@
 	if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {
 		sin->sin6_family = AF_INET6;
 		sin->sin6_flowinfo = 0;
+		sin->sin6_scope_id = 0;
 		if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) {
 			memcpy(&sin->sin6_addr, &skb->nh.ipv6h->saddr, 16);
 			if (np->rxopt.all)
diff -Nru a/net/ipv6/icmp.c b/net/ipv6/icmp.c
--- a/net/ipv6/icmp.c	Wed Oct 30 16:44:26 2002
+++ b/net/ipv6/icmp.c	Wed Oct 30 16:44:26 2002
@@ -25,6 +25,7 @@
  *					add more length checks and other fixes.
  *	yoshfuji		:	ensure to sent parameter problem for
  *					fragments.
+ *	YOSHIFUJI Hideaki @USAGI:	added sysctl for icmp rate limit.
  */
 
 #define __NO_VERSION__
@@ -40,6 +41,10 @@
 #include <linux/skbuff.h>
 #include <linux/init.h>
 
+#ifdef CONFIG_SYSCTL
+#include <linux/sysctl.h>
+#endif
+
 #include <linux/inet.h>
 #include <linux/netdevice.h>
 #include <linux/icmpv6.h>
@@ -697,3 +702,12 @@
 
 	return fatal;
 }
+
+#ifdef CONFIG_SYSCTL
+ctl_table ipv6_icmp_table[] = {
+	{NET_IPV6_ICMP_RATELIMIT, "ratelimit",
+	&sysctl_icmpv6_time, sizeof(int), 0644, NULL, &proc_dointvec},
+	{0},
+};
+#endif
+
diff -Nru a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
--- a/net/ipv6/ip6_fib.c	Wed Oct 30 16:44:32 2002
+++ b/net/ipv6/ip6_fib.c	Wed Oct 30 16:44:32 2002
@@ -1168,27 +1168,24 @@
 {
 	unsigned long now = jiffies;
 
-	/* Age clones. Note, that clones are aged out
-	   only if they are not in use now.
-	 */
-
-	if (rt->rt6i_flags & RTF_CACHE) {
-		if (atomic_read(&rt->u.dst.__refcnt) == 0 &&
-		    (long)(now - rt->u.dst.lastuse) >= gc_args.timeout) {
-			RT6_TRACE("aging clone %p\n", rt);
-			return -1;
-		}
-		gc_args.more++;
-	}
-
 	/*
 	 *	check addrconf expiration here.
-	 *	They are expired even if they are in use.
+	 *	Routes are expired even if they are in use.
+	 *
+	 *	Also age clones. Note, that clones are aged out
+	 *	only if they are not in use now.
 	 */
 
 	if (rt->rt6i_flags&RTF_EXPIRES && rt->rt6i_expires) {
 		if ((long)(now - rt->rt6i_expires) > 0) {
 			RT6_TRACE("expiring %p\n", rt);
+			return -1;
+		}
+		gc_args.more++;
+	} else if (rt->rt6i_flags & RTF_CACHE) {
+		if (atomic_read(&rt->u.dst.__refcnt) == 0 &&
+		    (long)(now - rt->u.dst.lastuse) >= gc_args.timeout) {
+			RT6_TRACE("aging clone %p\n", rt);
 			return -1;
 		}
 		gc_args.more++;
diff -Nru a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
--- a/net/ipv6/ip6_input.c	Wed Oct 30 16:44:30 2002
+++ b/net/ipv6/ip6_input.c	Wed Oct 30 16:44:30 2002
@@ -60,8 +60,10 @@
 
 	IP6_INC_STATS_BH(Ip6InReceives);
 
-	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
+	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
+		IP6_INC_STATS_BH(Ip6InDiscards);
 		goto out;
+	}
 
 	/* Store incoming device index. When the packet will
 	   be queued, we cannot refer to skb->dev anymore.
@@ -175,11 +177,13 @@
 			nexthdr = -ret;
 			goto resubmit;
 		}
+		IP6_INC_STATS_BH(Ip6InDelivers);
 	} else {
 		if (!raw_sk) {
 			IP6_INC_STATS_BH(Ip6InUnknownProtos);
 			icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff);
-		}
+		} else
+			IP6_INC_STATS_BH(Ip6InDelivers);
 		kfree_skb(skb);
 	}
 
diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
--- a/net/ipv6/ip6_output.c	Wed Oct 30 16:44:20 2002
+++ b/net/ipv6/ip6_output.c	Wed Oct 30 16:44:20 2002
@@ -191,6 +191,7 @@
 	u8  proto = fl->proto;
 	int seg_len = skb->len;
 	int hlimit;
+	u32 mtu;
 
 	if (opt) {
 		int head_room;
@@ -237,14 +238,15 @@
 	ipv6_addr_copy(&hdr->saddr, fl->nl_u.ip6_u.saddr);
 	ipv6_addr_copy(&hdr->daddr, first_hop);
 
-	if (skb->len <= dst->pmtu) {
+	mtu = dst_pmtu(dst);
+	if (skb->len <= mtu) {
 		IP6_INC_STATS(Ip6OutRequests);
 		return NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, ip6_maybe_reroute);
 	}
 
 	if (net_ratelimit())
 		printk(KERN_DEBUG "IPv6: sending pkt_too_big to self\n");
-	icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst->pmtu, skb->dev);
+	icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, skb->dev);
 	kfree_skb(skb);
 	return -EMSGSIZE;
 }
@@ -600,7 +602,7 @@
 		}
 	}
 
-	mtu = dst->pmtu;
+	mtu = dst_pmtu(dst);
 	if (np->frag_size < mtu) {
 		if (np->frag_size)
 			mtu = np->frag_size;
@@ -796,10 +798,10 @@
 		goto error;
 	}
 
-	if (skb->len > dst->pmtu) {
+	if (skb->len > dst_pmtu(dst)) {
 		/* Again, force OUTPUT device used as source address */
 		skb->dev = dst->dev;
-		icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst->pmtu, skb->dev);
+		icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_pmtu(dst), skb->dev);
 		IP6_INC_STATS_BH(Ip6InTooBigErrors);
 		kfree_skb(skb);
 		return -EMSGSIZE;
diff -Nru a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
--- a/net/ipv6/ipv6_sockglue.c	Wed Oct 30 16:44:20 2002
+++ b/net/ipv6/ipv6_sockglue.c	Wed Oct 30 16:44:20 2002
@@ -157,7 +157,8 @@
 				break;
 			}
 
-			if (!(ipv6_addr_type(&np->daddr) & IPV6_ADDR_MAPPED)) {
+			if (ipv6_only_sock(sk) ||
+			    !(ipv6_addr_type(&np->daddr) & IPV6_ADDR_MAPPED)) {
 				retv = -EADDRNOTAVAIL;
 				break;
 			}
@@ -203,6 +204,13 @@
 		}
 		goto e_inval;
 
+	case IPV6_V6ONLY:
+		if (inet_sk(sk)->num)
+			goto e_inval;
+		np->ipv6only = valbool;
+		retv = 0;
+		break;
+
 	case IPV6_PKTINFO:
 		np->rxopt.bits.rxinfo = valbool;
 		retv = 0;
@@ -466,7 +474,7 @@
 		lock_sock(sk);
 		dst = sk_dst_get(sk);
 		if (dst) {
-			val = dst->pmtu;
+			val = dst_pmtu(dst) - dst->header_len;
 			dst_release(dst);
 		}
 		release_sock(sk);
@@ -474,6 +482,10 @@
 			return -ENOTCONN;
 		break;
 	}
+
+	case IPV6_V6ONLY:
+		val = np->ipv6only;
+		break;
 
 	case IPV6_PKTINFO:
 		val = np->rxopt.bits.rxinfo;
diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
--- a/net/ipv6/ndisc.c	Wed Oct 30 16:44:29 2002
+++ b/net/ipv6/ndisc.c	Wed Oct 30 16:44:29 2002
@@ -588,6 +588,249 @@
 	}
 }
 
+void ndisc_recv_ns(struct sk_buff *skb)
+{
+	struct nd_msg *msg = (struct nd_msg *)skb->h.raw;
+	struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+	struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+	u8 *lladdr = NULL;
+	int lladdrlen = 0;
+	u32 ndoptlen = skb->tail - msg->opt;
+	struct ndisc_options ndopts;
+	struct net_device *dev = skb->dev;
+	struct inet6_ifaddr *ifp;
+	struct neighbour *neigh;
+
+	if (skb->len < sizeof(struct nd_msg)) {
+		if (net_ratelimit())
+			printk(KERN_WARNING "ICMP NS: packet too short\n");
+		return;
+	}
+
+	if (ipv6_addr_type(&msg->target)&IPV6_ADDR_MULTICAST) {
+		if (net_ratelimit())
+			printk(KERN_WARNING "ICMP NS: target address is multicast\n");
+		return;
+	}
+
+	if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) {
+		if (net_ratelimit())
+			printk(KERN_WARNING "ICMP NS: invalid ND option, ignored.\n");
+		return;
+	}
+
+	if (ndopts.nd_opts_src_lladdr) {
+		lladdr = (u8*)(ndopts.nd_opts_src_lladdr + 1);
+		lladdrlen = ndopts.nd_opts_src_lladdr->nd_opt_len << 3;
+		if (lladdrlen != NDISC_OPT_SPACE(dev->addr_len)) {
+			if (net_ratelimit())
+				printk(KERN_WARNING "ICMP NS: bad lladdr length.\n");
+			return;
+		}
+	}
+
+	/* XXX: RFC2461 7.1.1:
+	 * 	If the IP source address is the unspecified address, there
+	 *	MUST NOT be source link-layer address option in the message.
+	 *
+	 *	NOTE! Linux kernel < 2.4.4 broke this rule.
+	 */
+		 	
+	/* XXX: RFC2461 7.1.1:
+	 *	If the IP source address is the unspecified address, the IP
+      	 *	destination address MUST be a solicited-node multicast address.
+	 */
+
+	if ((ifp = ipv6_get_ifaddr(&msg->target, dev)) != NULL) {
+		int addr_type = ipv6_addr_type(saddr);
+
+		if (ifp->flags & IFA_F_TENTATIVE) {
+			/* Address is tentative. If the source
+			   is unspecified address, it is someone
+			   does DAD, otherwise we ignore solicitations
+			   until DAD timer expires.
+			 */
+			if (addr_type == IPV6_ADDR_ANY) {
+				if (dev->type == ARPHRD_IEEE802_TR) { 
+					unsigned char *sadr = skb->mac.raw ;
+					if (((sadr[8] &0x7f) != (dev->dev_addr[0] & 0x7f)) ||
+					(sadr[9] != dev->dev_addr[1]) ||
+					(sadr[10] != dev->dev_addr[2]) ||
+					(sadr[11] != dev->dev_addr[3]) ||
+					(sadr[12] != dev->dev_addr[4]) ||
+					(sadr[13] != dev->dev_addr[5])) 
+					{
+						addrconf_dad_failure(ifp) ; 
+					}
+				} else {
+					addrconf_dad_failure(ifp);
+				}
+			} else
+				in6_ifa_put(ifp);
+			return;
+		}
+	
+		if (addr_type == IPV6_ADDR_ANY) {
+			struct in6_addr maddr;
+
+			ipv6_addr_all_nodes(&maddr);
+			ndisc_send_na(dev, NULL, &maddr, &ifp->addr, 
+				      ifp->idev->cnf.forwarding, 0, 
+				      ipv6_addr_type(&ifp->addr)&IPV6_ADDR_ANYCAST ? 0 : 1, 
+				      1);
+			in6_ifa_put(ifp);
+			return;
+		}
+
+		if (addr_type & IPV6_ADDR_UNICAST) {
+			int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
+
+			if (inc)
+				nd_tbl.stats.rcv_probes_mcast++;
+			else
+				nd_tbl.stats.rcv_probes_ucast++;
+
+			/* 
+			 *	update / create cache entry
+			 *	for the source adddress
+			 */
+
+			neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, dev);
+
+			if (neigh || !dev->hard_header) {
+				ndisc_send_na(dev, neigh, saddr, &ifp->addr, 
+					      ifp->idev->cnf.forwarding, 1, 
+					      ipv6_addr_type(&ifp->addr)&IPV6_ADDR_ANYCAST ? 0 : 1, 
+					      1);
+				if (neigh)
+					neigh_release(neigh);
+			}
+		}
+		in6_ifa_put(ifp);
+	} else {
+		struct inet6_dev *in6_dev = in6_dev_get(dev);
+		int addr_type = ipv6_addr_type(saddr);
+
+		if (in6_dev && in6_dev->cnf.forwarding &&
+		    (addr_type & IPV6_ADDR_UNICAST) &&
+		    pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) {
+			int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
+
+			if (skb->stamp.tv_sec == 0 ||
+			    skb->pkt_type == PACKET_HOST ||
+			    inc == 0 ||
+			    in6_dev->nd_parms->proxy_delay == 0) {
+				if (inc)
+					nd_tbl.stats.rcv_probes_mcast++;
+				else
+					nd_tbl.stats.rcv_probes_ucast++;
+					
+				neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, dev);
+
+				if (neigh) {
+					ndisc_send_na(dev, neigh, saddr, &msg->target,
+						      0, 1, 0, 1);
+					neigh_release(neigh);
+				}
+			} else {
+				struct sk_buff *n = skb_clone(skb, GFP_ATOMIC);
+				if (n)
+					pneigh_enqueue(&nd_tbl, in6_dev->nd_parms, n);
+				in6_dev_put(in6_dev);
+				return;
+			}
+		}
+		if (in6_dev)
+			in6_dev_put(in6_dev);
+	}
+	return;
+}
+
+void ndisc_recv_na(struct sk_buff *skb)
+{
+	struct nd_msg *msg = (struct nd_msg *)skb->h.raw;
+	struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
+	struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
+	u8 *lladdr = NULL;
+	int lladdrlen = 0;
+	u32 ndoptlen = skb->tail - msg->opt;
+	struct ndisc_options ndopts;
+	struct net_device *dev = skb->dev;
+	struct inet6_ifaddr *ifp;
+	struct neighbour *neigh;
+
+	if (skb->len < sizeof(struct nd_msg)) {
+		if (net_ratelimit())
+			printk(KERN_WARNING "ICMP NA: packet too short\n");
+		return;
+	}
+
+	if (ipv6_addr_type(&msg->target)&IPV6_ADDR_MULTICAST) {
+		if (net_ratelimit())
+			printk(KERN_WARNING "NDISC NA: target address is multicast\n");
+		return;
+	}
+
+	if ((ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST) &&
+	    msg->icmph.icmp6_solicited) {
+		ND_PRINTK0("NDISC: solicited NA is multicasted\n");
+		return;
+	}
+		
+	if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) {
+		if (net_ratelimit())
+			printk(KERN_WARNING "ICMP NS: invalid ND option, ignored.\n");
+		return;
+	}
+	if (ndopts.nd_opts_tgt_lladdr) {
+		lladdr = (u8*)(ndopts.nd_opts_tgt_lladdr + 1);
+		lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;
+		if (lladdrlen != NDISC_OPT_SPACE(dev->addr_len)) {
+			if (net_ratelimit())
+				printk(KERN_WARNING "NDISC NA: invalid lladdr length.\n");
+			return;
+		}
+	}
+	if ((ifp = ipv6_get_ifaddr(&msg->target, dev))) {
+		if (ifp->flags & IFA_F_TENTATIVE) {
+			addrconf_dad_failure(ifp);
+			return;
+		}
+		/* What should we make now? The advertisement
+		   is invalid, but ndisc specs say nothing
+		   about it. It could be misconfiguration, or
+		   an smart proxy agent tries to help us :-)
+		 */
+		ND_PRINTK0("%s: someone advertises our address!\n",
+			   ifp->idev->dev->name);
+		in6_ifa_put(ifp);
+		return;
+	}
+	neigh = neigh_lookup(&nd_tbl, &msg->target, dev);
+
+	if (neigh) {
+		if (neigh->flags & NTF_ROUTER) {
+			if (msg->icmph.icmp6_router == 0) {
+				/*
+				 *	Change: router to host
+				 */
+				struct rt6_info *rt;
+				rt = rt6_get_dflt_router(saddr, dev);
+				if (rt)
+					ip6_del_rt(rt);
+			}
+		} else {
+			if (msg->icmph.icmp6_router)
+				neigh->flags |= NTF_ROUTER;
+		}
+
+		neigh_update(neigh, lladdr,
+			     msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE,
+			     msg->icmph.icmp6_override, 1);
+		neigh_release(neigh);
+	}
+}
+
 static void ndisc_router_discovery(struct sk_buff *skb)
 {
         struct ra_msg *ra_msg = (struct ra_msg *) skb->h.raw;
@@ -759,7 +1002,7 @@
 			in6_dev->cnf.mtu6 = mtu;
 
 			if (rt)
-				rt->u.dst.pmtu = mtu;
+				rt->u.dst.metrics[RTAX_MTU-1] = mtu;
 
 			rt6_mtu_change(skb->dev, mtu);
 		}
@@ -995,12 +1238,7 @@
 
 int ndisc_rcv(struct sk_buff *skb)
 {
-	struct net_device *dev = skb->dev;
-	struct in6_addr *saddr = &skb->nh.ipv6h->saddr;
-	struct in6_addr *daddr = &skb->nh.ipv6h->daddr;
 	struct nd_msg *msg = (struct nd_msg *) skb->h.raw;
-	struct neighbour *neigh;
-	struct inet6_ifaddr *ifp;
 
 	__skb_push(skb, skb->data-skb->h.raw);
 
@@ -1020,244 +1258,12 @@
 
 	switch (msg->icmph.icmp6_type) {
 	case NDISC_NEIGHBOUR_SOLICITATION:
-	    {
-		struct nd_msg *msg = (struct nd_msg *)skb->h.raw;
-		u8 *lladdr = NULL;
-		int lladdrlen = 0;
-		u32 ndoptlen = skb->tail - msg->opt;
-		struct ndisc_options ndopts;
-
-		if (skb->len < sizeof(struct nd_msg)) {
-			if (net_ratelimit())
-				printk(KERN_WARNING "ICMP NS: packet too short\n");
-			return 0;
-		}
-
-		if (ipv6_addr_type(&msg->target)&IPV6_ADDR_MULTICAST) {
-			if (net_ratelimit())
-				printk(KERN_WARNING "ICMP NS: target address is multicast\n");
-			return 0;
-		}
-
-		if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) {
-			if (net_ratelimit())
-				printk(KERN_WARNING "ICMP NS: invalid ND option, ignored.\n");
-			return 0;
-		}
-
-		if (ndopts.nd_opts_src_lladdr) {
-			lladdr = (u8*)(ndopts.nd_opts_src_lladdr + 1);
-			lladdrlen = ndopts.nd_opts_src_lladdr->nd_opt_len << 3;
-			if (lladdrlen != NDISC_OPT_SPACE(skb->dev->addr_len)) {
-				if (net_ratelimit())
-					printk(KERN_WARNING "ICMP NS: bad lladdr length.\n");
-				return 0;
-			}
-		}
-
-		/* XXX: RFC2461 7.1.1:
-		 * 	If the IP source address is the unspecified address, there
-		 *	MUST NOT be source link-layer address option in the message.
-		 *
-		 *	NOTE! Linux kernel < 2.4.4 broke this rule.
-		 */
-		 	
-		/* XXX: RFC2461 7.1.1:
-		 *	If the IP source address is the unspecified address, the IP
-      		 *	destination address MUST be a solicited-node multicast address.
-		 */
-
-		if ((ifp = ipv6_get_ifaddr(&msg->target, dev)) != NULL) {
-			int addr_type = ipv6_addr_type(saddr);
-
-			if (ifp->flags & IFA_F_TENTATIVE) {
-				/* Address is tentative. If the source
-				   is unspecified address, it is someone
-				   does DAD, otherwise we ignore solicitations
-				   until DAD timer expires.
-				 */
-				if (addr_type == IPV6_ADDR_ANY) {
-					if (dev->type == ARPHRD_IEEE802_TR) { 
-						unsigned char *sadr = skb->mac.raw ;
-						if (((sadr[8] &0x7f) != (dev->dev_addr[0] & 0x7f)) ||
-						(sadr[9] != dev->dev_addr[1]) ||
-						(sadr[10] != dev->dev_addr[2]) ||
-						(sadr[11] != dev->dev_addr[3]) ||
-						(sadr[12] != dev->dev_addr[4]) ||
-						(sadr[13] != dev->dev_addr[5])) 
-						{
-							addrconf_dad_failure(ifp) ; 
-						}
-					} else {
-						addrconf_dad_failure(ifp);
-					}
-				} else
-					in6_ifa_put(ifp);
-				return 0;
-			}
-
-			if (addr_type == IPV6_ADDR_ANY) {
-				struct in6_addr maddr;
-
-				ipv6_addr_all_nodes(&maddr);
-				ndisc_send_na(dev, NULL, &maddr, &ifp->addr, 
-					      ifp->idev->cnf.forwarding, 0, 
-					      ipv6_addr_type(&ifp->addr)&IPV6_ADDR_ANYCAST ? 0 : 1, 
-					      1);
-				in6_ifa_put(ifp);
-				return 0;
-			}
-
-			if (addr_type & IPV6_ADDR_UNICAST) {
-				int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
-
-				if (inc)
-					nd_tbl.stats.rcv_probes_mcast++;
-				else
-					nd_tbl.stats.rcv_probes_ucast++;
-
-				/* 
-				 *	update / create cache entry
-				 *	for the source adddress
-				 */
-
-				neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, skb->dev);
-
-				if (neigh || !dev->hard_header) {
-					ndisc_send_na(dev, neigh, saddr, &ifp->addr, 
-						      ifp->idev->cnf.forwarding, 1, 
-						      ipv6_addr_type(&ifp->addr)&IPV6_ADDR_ANYCAST ? 0 : 1, 
-						      1);
-					if (neigh)
-						neigh_release(neigh);
-				}
-			}
-			in6_ifa_put(ifp);
-		} else {
-			struct inet6_dev *in6_dev = in6_dev_get(dev);
-			int addr_type = ipv6_addr_type(saddr);
-
-			if (in6_dev && in6_dev->cnf.forwarding &&
-			    (addr_type & IPV6_ADDR_UNICAST) &&
-			    pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) {
-				int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST;
-
-				if (skb->stamp.tv_sec == 0 ||
-				    skb->pkt_type == PACKET_HOST ||
-				    inc == 0 ||
-				    in6_dev->nd_parms->proxy_delay == 0) {
-					if (inc)
-						nd_tbl.stats.rcv_probes_mcast++;
-					else
-						nd_tbl.stats.rcv_probes_ucast++;
-
-					
-					neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, skb->dev);
-
-					if (neigh) {
-						ndisc_send_na(dev, neigh, saddr, &msg->target,
-							      0, 1, 0, 1);
-						neigh_release(neigh);
-					}
-				} else {
-					struct sk_buff *n = skb_clone(skb, GFP_ATOMIC);
-					if (n)
-						pneigh_enqueue(&nd_tbl, in6_dev->nd_parms, n);
-					in6_dev_put(in6_dev);
-					return 0;
-				}
-			}
-			if (in6_dev)
-				in6_dev_put(in6_dev);
-			
-		}
-		return 0;
-	    }
+		ndisc_recv_ns(skb);
+		break;
 
 	case NDISC_NEIGHBOUR_ADVERTISEMENT:
-	    {
-		struct nd_msg *msg = (struct nd_msg *)skb->h.raw;
-		u8 *lladdr = NULL;
-		int lladdrlen = 0;
-		u32 ndoptlen = skb->tail - msg->opt;
-		struct ndisc_options ndopts;
-
-		if (skb->len < sizeof(struct nd_msg)) {
-			if (net_ratelimit())
-				printk(KERN_WARNING "ICMP NA: packet too short\n");
-			return 0;
-		}
-
-		if (ipv6_addr_type(&msg->target)&IPV6_ADDR_MULTICAST) {
-			if (net_ratelimit())
-				printk(KERN_WARNING "NDISC NA: target address is multicast\n");
-			return 0;
-		}
-
-		if ((ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST) &&
-		    msg->icmph.icmp6_solicited) {
-			ND_PRINTK0("NDISC: solicited NA is multicasted\n");
-			return 0;
-		}
-		
-		if (!ndisc_parse_options(msg->opt, ndoptlen, &ndopts)) {
-			if (net_ratelimit())
-				printk(KERN_WARNING "ICMP NS: invalid ND option, ignored.\n");
-			return 0;
-		}
-		if (ndopts.nd_opts_tgt_lladdr) {
-			lladdr = (u8*)(ndopts.nd_opts_tgt_lladdr + 1);
-			lladdrlen = ndopts.nd_opts_tgt_lladdr->nd_opt_len << 3;
-			if (lladdrlen != NDISC_OPT_SPACE(skb->dev->addr_len)) {
-				if (net_ratelimit())
-					printk(KERN_WARNING "NDISC NA: invalid lladdr length.\n");
-				return 0;
-			}
-		}
-		if ((ifp = ipv6_get_ifaddr(&msg->target, dev))) {
-			if (ifp->flags & IFA_F_TENTATIVE) {
-				addrconf_dad_failure(ifp);
-				return 0;
-			}
-			/* What should we make now? The advertisement
-			   is invalid, but ndisc specs say nothing
-			   about it. It could be misconfiguration, or
-			   an smart proxy agent tries to help us :-)
-			 */
-			ND_PRINTK0("%s: someone advertises our address!\n",
-				   ifp->idev->dev->name);
-			in6_ifa_put(ifp);
-			return 0;
-		}
-		neigh = neigh_lookup(&nd_tbl, &msg->target, skb->dev);
-
-		if (neigh) {
-			if (neigh->flags & NTF_ROUTER) {
-				if (msg->icmph.icmp6_router == 0) {
-					/*
-					 *	Change: router to host
-					 */
-					struct rt6_info *rt;
-					rt = rt6_get_dflt_router(saddr, skb->dev);
-					if (rt) {
-						/* It is safe only because
-						   we aer in BH */
-						dst_release(&rt->u.dst);
-						ip6_del_rt(rt);
-					}
-				}
-			} else {
-				if (msg->icmph.icmp6_router)
-					neigh->flags |= NTF_ROUTER;
-			}
-
-			neigh_update(neigh, lladdr,
-				     msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE,
-				     msg->icmph.icmp6_override, 1);
-			neigh_release(neigh);
-		}
+		ndisc_recv_na(skb);
 		break;
-	    }
 
 	case NDISC_ROUTER_ADVERTISEMENT:
 		ndisc_router_discovery(skb);
diff -Nru a/net/ipv6/netfilter/Config.help b/net/ipv6/netfilter/Config.help
--- a/net/ipv6/netfilter/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,112 +0,0 @@
-CONFIG_IP6_NF_MATCH_EUI64
-  This module performs checking on the IPv6 source address
-  Compares the last 64 bits with the EUI64 (delivered
-  from the MAC address) address
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `N'.
-
-CONFIG_IP6_NF_MATCH_MAC
-  mac matching allows you to match packets based on the source
-  Ethernet address of the packet.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_MATCH_LENGTH
-  This option allows you to match the length of a packet against a
-  specific value or range of values.
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt.  If unsure, say `N'.
-
-CONFIG_IP6_NF_MATCH_MARK
-  Netfilter mark matching allows you to match packets based on the
-  `nfmark' value in the packet.  This can be set by the MARK target
-  (see below).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_MATCH_MULTIPORT
-  Multiport matching allows you to match TCP or UDP packets based on
-  a series of source or destination ports: normally a rule can only
-  match a single range of ports.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_QUEUE
-
-  This option adds a queue handler to the kernel for IPv6
-  packets which lets us to receive the filtered packets
-  with QUEUE target using libiptc as we can do with
-  the IPv4 now.
-
-  (C) Fernando Anton 2001
-  IPv64 Project - Work based in IPv64 draft by Arturo Azcorra.
-  Universidad Carlos III de Madrid
-  Universidad Politecnica de Alcala de Henares
-  email: fanton@it.uc3m.es
-
-  If you want to compile it as a module, say M here and read
-  Documentation/modules.txt. If unsure, say `N'.
-
-CONFIG_IP6_NF_MATCH_OWNER
-  Packet owner matching allows you to match locally-generated packets
-  based on who created them: the user, group, process or session.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_FILTER
-  Packet filtering defines a table `filter', which has a series of
-  rules for simple packet filtering at local input, forwarding and
-  local output.  See the man page for iptables(8).
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_MANGLE
-  This option adds a `mangle' table to iptables: see the man page for
-  iptables(8).  This table is used for various packet alterations
-  which can effect how the packet is routed.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_TARGET_MARK
-  This option adds a `MARK' target, which allows you to create rules
-  in the `mangle' table which alter the netfilter mark (nfmark) field
-  associated with the packet packet prior to routing. This can change
-  the routing method (see `Use netfilter MARK value as routing
-  key') and can also be used by other subsystems to change their
-  behavior.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_IPTABLES
-  ip6tables is a general, extensible packet identification framework.
-  Currently only the packet filtering and packet mangling subsystem
-  for IPv6 use this, but connection tracking is going to follow.
-  Say 'Y' or 'M' here if you want to use either of those.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_MATCH_LIMIT
-  limit matching allows you to control the rate at which a rule can be
-  matched: mainly useful in combination with the LOG target ("LOG
-  target support", below) and to avoid some Denial of Service attacks.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
-CONFIG_IP6_NF_TARGET_LOG
-  This option adds a `LOG' target, which allows you to create rules in
-  any iptables table which records the packet header to the syslog.
-
-  If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.  If unsure, say `N'.
-
diff -Nru a/net/ipv6/netfilter/Config.in b/net/ipv6/netfilter/Config.in
--- a/net/ipv6/netfilter/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,62 +0,0 @@
-#
-# IP netfilter configuration
-#
-mainmenu_option next_comment
-comment '  IPv6: Netfilter Configuration'
-
-#tristate 'Connection tracking (required for masq/NAT)' CONFIG_IP6_NF_CONNTRACK
-#if [ "$CONFIG_IP6_NF_CONNTRACK" != "n" ]; then
-#  dep_tristate '  FTP protocol support' CONFIG_IP6_NF_FTP $CONFIG_IP6_NF_CONNTRACK
-#fi
-
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-  tristate 'Userspace queueing via NETLINK (EXPERIMENTAL)' CONFIG_IP6_NF_QUEUE
-fi
-
-tristate 'IP6 tables support (required for filtering/masq/NAT)' CONFIG_IP6_NF_IPTABLES
-if [ "$CONFIG_IP6_NF_IPTABLES" != "n" ]; then
-# The simple matches.
-  dep_tristate '  limit match support' CONFIG_IP6_NF_MATCH_LIMIT $CONFIG_IP6_NF_IPTABLES
-  dep_tristate '  MAC address match support' CONFIG_IP6_NF_MATCH_MAC $CONFIG_IP6_NF_IPTABLES
-  dep_tristate '  Multiple port match support' CONFIG_IP6_NF_MATCH_MULTIPORT $CONFIG_IP6_NF_IPTABLES
-  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-    dep_tristate '  Owner match support (EXPERIMENTAL)' CONFIG_IP6_NF_MATCH_OWNER $CONFIG_IP6_NF_IPTABLES
-  fi
-#  dep_tristate '  MAC address match support' CONFIG_IP6_NF_MATCH_MAC $CONFIG_IP6_NF_IPTABLES
-  dep_tristate '  netfilter MARK match support' CONFIG_IP6_NF_MATCH_MARK $CONFIG_IP6_NF_IPTABLES
-  dep_tristate '  Packet Length match support' CONFIG_IP6_NF_MATCH_LENGTH $CONFIG_IP6_NF_IPTABLES
-  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-    dep_tristate '  EUI64 address check (EXPERIMENTAL)' CONFIG_IP6_NF_MATCH_EUI64 $CONFIG_IP6_NF_IPTABLES
-  fi
-#  dep_tristate '  Multiple port match support' CONFIG_IP6_NF_MATCH_MULTIPORT $CONFIG_IP6_NF_IPTABLES
-#  dep_tristate '  TOS match support' CONFIG_IP6_NF_MATCH_TOS $CONFIG_IP6_NF_IPTABLES
-#  if [ "$CONFIG_IP6_NF_CONNTRACK" != "n" ]; then
-#    dep_tristate '  Connection state match support' CONFIG_IP6_NF_MATCH_STATE $CONFIG_IP6_NF_CONNTRACK $CONFIG_IP6_NF_IPTABLES 
-#  fi
-#  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-#    dep_tristate '  Unclean match support (EXPERIMENTAL)' CONFIG_IP6_NF_MATCH_UNCLEAN $CONFIG_IP6_NF_IPTABLES
-#    dep_tristate '  Owner match support (EXPERIMENTAL)' CONFIG_IP6_NF_MATCH_OWNER $CONFIG_IP6_NF_IPTABLES
-#  fi
-
-# The targets
-  dep_tristate '  Packet filtering' CONFIG_IP6_NF_FILTER $CONFIG_IP6_NF_IPTABLES 
-  if [ "$CONFIG_IP6_NF_FILTER" != "n" ]; then
-    dep_tristate '    LOG target support' CONFIG_IP6_NF_TARGET_LOG $CONFIG_IP6_NF_FILTER
-  fi
-
-#  if [ "$CONFIG_IP6_NF_FILTER" != "n" ]; then
-#    dep_tristate '    REJECT target support' CONFIG_IP6_NF_TARGET_REJECT $CONFIG_IP6_NF_FILTER
-#    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-#      dep_tristate '    MIRROR target support (EXPERIMENTAL)' CONFIG_IP6_NF_TARGET_MIRROR $CONFIG_IP6_NF_FILTER
-#    fi
-#  fi
-
-  dep_tristate '  Packet mangling' CONFIG_IP6_NF_MANGLE $CONFIG_IP6_NF_IPTABLES 
-  if [ "$CONFIG_IP6_NF_MANGLE" != "n" ]; then
-#    dep_tristate '    TOS target support' CONFIG_IP6_NF_TARGET_TOS $CONFIG_IP_NF_MANGLE
-    dep_tristate '    MARK target support' CONFIG_IP6_NF_TARGET_MARK $CONFIG_IP6_NF_MANGLE
-  fi
-  #dep_tristate '  LOG target support' CONFIG_IP6_NF_TARGET_LOG $CONFIG_IP6_NF_IPTABLES
-fi
-
-endmenu
diff -Nru a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipv6/netfilter/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,182 @@
+#
+# IP netfilter configuration
+#
+
+menu "IPv6: Netfilter Configuration"
+	depends on INET && EXPERIMENTAL && IPV6!=n && NETFILTER
+
+#tristate 'Connection tracking (required for masq/NAT)' CONFIG_IP6_NF_CONNTRACK
+#if [ "$CONFIG_IP6_NF_CONNTRACK" != "n" ]; then
+#  dep_tristate '  FTP protocol support' CONFIG_IP6_NF_FTP $CONFIG_IP6_NF_CONNTRACK
+#fi
+config IP6_NF_QUEUE
+	tristate "Userspace queueing via NETLINK (EXPERIMENTAL)"
+	---help---
+
+	  This option adds a queue handler to the kernel for IPv6
+	  packets which lets us to receive the filtered packets
+	  with QUEUE target using libiptc as we can do with
+	  the IPv4 now.
+
+	  (C) Fernando Anton 2001
+	  IPv64 Project - Work based in IPv64 draft by Arturo Azcorra.
+	  Universidad Carlos III de Madrid
+	  Universidad Politecnica de Alcala de Henares
+	  email: fanton@it.uc3m.es
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt. If unsure, say `N'.
+
+config IP6_NF_IPTABLES
+	tristate "IP6 tables support (required for filtering/masq/NAT)"
+	help
+	  ip6tables is a general, extensible packet identification framework.
+	  Currently only the packet filtering and packet mangling subsystem
+	  for IPv6 use this, but connection tracking is going to follow.
+	  Say 'Y' or 'M' here if you want to use either of those.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+# The simple matches.
+config IP6_NF_MATCH_LIMIT
+	tristate "limit match support"
+	depends on IP6_NF_IPTABLES
+	help
+	  limit matching allows you to control the rate at which a rule can be
+	  matched: mainly useful in combination with the LOG target ("LOG
+	  target support", below) and to avoid some Denial of Service attacks.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP6_NF_MATCH_MAC
+	tristate "MAC address match support"
+	depends on IP6_NF_IPTABLES
+	help
+	  mac matching allows you to match packets based on the source
+	  Ethernet address of the packet.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP6_NF_MATCH_MULTIPORT
+	tristate "Multiple port match support"
+	depends on IP6_NF_IPTABLES
+	help
+	  Multiport matching allows you to match TCP or UDP packets based on
+	  a series of source or destination ports: normally a rule can only
+	  match a single range of ports.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP6_NF_MATCH_OWNER
+	tristate "Owner match support (EXPERIMENTAL)"
+	depends on IP6_NF_IPTABLES
+	help
+	  Packet owner matching allows you to match locally-generated packets
+	  based on who created them: the user, group, process or session.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+#  dep_tristate '  MAC address match support' CONFIG_IP6_NF_MATCH_MAC $CONFIG_IP6_NF_IPTABLES
+config IP6_NF_MATCH_MARK
+	tristate "netfilter MARK match support"
+	depends on IP6_NF_IPTABLES
+	help
+	  Netfilter mark matching allows you to match packets based on the
+	  `nfmark' value in the packet.  This can be set by the MARK target
+	  (see below).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP6_NF_MATCH_LENGTH
+	tristate "Packet Length match support"
+	depends on IP6_NF_IPTABLES
+	help
+	  This option allows you to match the length of a packet against a
+	  specific value or range of values.
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
+config IP6_NF_MATCH_EUI64
+	tristate "EUI64 address check (EXPERIMENTAL)"
+	depends on IP6_NF_IPTABLES
+	help
+	  This module performs checking on the IPv6 source address
+	  Compares the last 64 bits with the EUI64 (delivered
+	  from the MAC address) address
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt.  If unsure, say `N'.
+
+#  dep_tristate '  Multiple port match support' CONFIG_IP6_NF_MATCH_MULTIPORT $CONFIG_IP6_NF_IPTABLES
+#  dep_tristate '  TOS match support' CONFIG_IP6_NF_MATCH_TOS $CONFIG_IP6_NF_IPTABLES
+#  if [ "$CONFIG_IP6_NF_CONNTRACK" != "n" ]; then
+#    dep_tristate '  Connection state match support' CONFIG_IP6_NF_MATCH_STATE $CONFIG_IP6_NF_CONNTRACK $CONFIG_IP6_NF_IPTABLES 
+#  fi
+#  if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+#    dep_tristate '  Unclean match support (EXPERIMENTAL)' CONFIG_IP6_NF_MATCH_UNCLEAN $CONFIG_IP6_NF_IPTABLES
+#    dep_tristate '  Owner match support (EXPERIMENTAL)' CONFIG_IP6_NF_MATCH_OWNER $CONFIG_IP6_NF_IPTABLES
+#  fi
+# The targets
+config IP6_NF_FILTER
+	tristate "Packet filtering"
+	depends on IP6_NF_IPTABLES
+	help
+	  Packet filtering defines a table `filter', which has a series of
+	  rules for simple packet filtering at local input, forwarding and
+	  local output.  See the man page for iptables(8).
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+config IP6_NF_TARGET_LOG
+	tristate "LOG target support"
+	depends on IP6_NF_FILTER
+	help
+	  This option adds a `LOG' target, which allows you to create rules in
+	  any iptables table which records the packet header to the syslog.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+#  if [ "$CONFIG_IP6_NF_FILTER" != "n" ]; then
+#    dep_tristate '    REJECT target support' CONFIG_IP6_NF_TARGET_REJECT $CONFIG_IP6_NF_FILTER
+#    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+#      dep_tristate '    MIRROR target support (EXPERIMENTAL)' CONFIG_IP6_NF_TARGET_MIRROR $CONFIG_IP6_NF_FILTER
+#    fi
+#  fi
+config IP6_NF_MANGLE
+	tristate "Packet mangling"
+	depends on IP6_NF_IPTABLES
+	help
+	  This option adds a `mangle' table to iptables: see the man page for
+	  iptables(8).  This table is used for various packet alterations
+	  which can effect how the packet is routed.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+#    dep_tristate '    TOS target support' CONFIG_IP6_NF_TARGET_TOS $CONFIG_IP_NF_MANGLE
+config IP6_NF_TARGET_MARK
+	tristate "MARK target support"
+	depends on IP6_NF_MANGLE
+	help
+	  This option adds a `MARK' target, which allows you to create rules
+	  in the `mangle' table which alter the netfilter mark (nfmark) field
+	  associated with the packet packet prior to routing. This can change
+	  the routing method (see `Use netfilter MARK value as routing
+	  key') and can also be used by other subsystems to change their
+	  behavior.
+
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `N'.
+
+#dep_tristate '  LOG target support' CONFIG_IP6_NF_TARGET_LOG $CONFIG_IP6_NF_IPTABLES
+endmenu
+
diff -Nru a/net/ipv6/raw.c b/net/ipv6/raw.c
--- a/net/ipv6/raw.c	Wed Oct 30 16:44:27 2002
+++ b/net/ipv6/raw.c	Wed Oct 30 16:44:27 2002
@@ -275,7 +275,7 @@
 #if defined(CONFIG_FILTER)
 	if (sk->filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
 		if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
-			IP6_INC_STATS_BH(Ip6InDiscards);
+			/* FIXME: increment a raw6 drops counter here */
 			kfree_skb(skb);
 			return 0;
 		}
@@ -284,12 +284,11 @@
 #endif
 	/* Charge it to the socket. */
 	if (sock_queue_rcv_skb(sk,skb)<0) {
-		IP6_INC_STATS_BH(Ip6InDiscards);
+		/* FIXME: increment a raw6 drops counter here */
 		kfree_skb(skb);
 		return 0;
 	}
 
-	IP6_INC_STATS_BH(Ip6InDelivers);
 	return 0;
 }
 
@@ -327,7 +326,7 @@
 	if (inet->hdrincl) {
 		if (skb->ip_summed != CHECKSUM_UNNECESSARY &&
 		    (unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
-			IP6_INC_STATS_BH(Ip6InDiscards);
+			/* FIXME: increment a raw6 drops counter here */
 			kfree_skb(skb);
 			return 0;
 		}
@@ -427,7 +426,7 @@
 	   as some normal condition.
 	 */
 	err = (flags&MSG_DONTWAIT) ? -EAGAIN : -EHOSTUNREACH;
-	IP6_INC_STATS_USER(Ip6InDiscards);
+	/* FIXME: increment a raw6 drops counter here */
 	goto out_free;
 }
 
diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c
--- a/net/ipv6/route.c	Wed Oct 30 16:44:24 2002
+++ b/net/ipv6/route.c	Wed Oct 30 16:44:24 2002
@@ -78,26 +78,23 @@
 
 static struct rt6_info * ip6_rt_copy(struct rt6_info *ort);
 static struct dst_entry	*ip6_dst_check(struct dst_entry *dst, u32 cookie);
-static struct dst_entry	*ip6_dst_reroute(struct dst_entry *dst,
-					 struct sk_buff *skb);
 static struct dst_entry *ip6_negative_advice(struct dst_entry *);
 static int		 ip6_dst_gc(void);
 
 static int		ip6_pkt_discard(struct sk_buff *skb);
 static void		ip6_link_failure(struct sk_buff *skb);
+static void		ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu);
 
 static struct dst_ops ip6_dst_ops = {
-	AF_INET6,
-	__constant_htons(ETH_P_IPV6),
-	1024,
-
-        ip6_dst_gc,
-	ip6_dst_check,
-	ip6_dst_reroute,
-	NULL,
-	ip6_negative_advice,
-	ip6_link_failure,
-	sizeof(struct rt6_info),
+	.family			=	AF_INET6,
+	.protocol		=	__constant_htons(ETH_P_IPV6),
+	.gc			=	ip6_dst_gc,
+	.gc_thresh		=	1024,
+	.check			=	ip6_dst_check,
+	.negative_advice	=	ip6_negative_advice,
+	.link_failure		=	ip6_link_failure,
+	.update_pmtu		=	ip6_rt_update_pmtu,
+	.entry_size		=	sizeof(struct rt6_info),
 };
 
 struct rt6_info ip6_null_entry = {
@@ -510,16 +507,6 @@
 	return NULL;
 }
 
-static struct dst_entry *ip6_dst_reroute(struct dst_entry *dst, struct sk_buff *skb)
-{
-	/*
-	 *	FIXME
-	 */
-	RDBG(("ip6_dst_reroute(%p,%p)[%p] (AIEEE)\n", dst, skb,
-	      __builtin_return_address(0)));
-	return NULL;
-}
-
 static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
 {
 	struct rt6_info *rt = (struct rt6_info *) dst;
@@ -549,6 +536,16 @@
 	}
 }
 
+static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
+{
+	struct rt6_info *rt6 = (struct rt6_info*)dst;
+
+	if (mtu < dst_pmtu(dst) && rt6->rt6i_dst.plen == 128) {
+		rt6->rt6i_flags |= RTF_MODIFIED;
+		dst->metrics[RTAX_MTU-1] = mtu;
+	}
+}
+
 static int ip6_dst_gc()
 {
 	static unsigned expire = 30*HZ;
@@ -755,14 +752,14 @@
 	rt->rt6i_flags = rtmsg->rtmsg_flags;
 
 install_route:
-	rt->u.dst.pmtu = ipv6_get_mtu(dev);
-	rt->u.dst.advmss = max_t(unsigned int, rt->u.dst.pmtu - 60, ip6_rt_min_advmss);
+	rt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(dev);
+	rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, dst_pmtu(&rt->u.dst) - 60, ip6_rt_min_advmss);
 	/* Maximal non-jumbo IPv6 payload is 65535 and corresponding
 	   MSS is 65535 - tcp_header_size. 65535 is also valid and
 	   means: "any MSS, rely only on pmtu discovery"
 	 */
-	if (rt->u.dst.advmss > 65535-20)
-		rt->u.dst.advmss = 65535;
+	if (dst_metric(&rt->u.dst, RTAX_ADVMSS) > 65535-20)
+		rt->u.dst.metrics[RTAX_ADVMSS-1] = 65535;
 	rt->u.dst.dev = dev;
 	return rt6_ins(rt);
 
@@ -914,10 +911,10 @@
 	ipv6_addr_copy(&nrt->rt6i_gateway, (struct in6_addr*)neigh->primary_key);
 	nrt->rt6i_nexthop = neigh_clone(neigh);
 	/* Reset pmtu, it may be better */
-	nrt->u.dst.pmtu = ipv6_get_mtu(neigh->dev);
-	nrt->u.dst.advmss = max_t(unsigned int, nrt->u.dst.pmtu - 60, ip6_rt_min_advmss);
-	if (rt->u.dst.advmss > 65535-20)
-		rt->u.dst.advmss = 65535;
+	nrt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(neigh->dev);
+	nrt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, dst_pmtu(&nrt->u.dst) - 60, ip6_rt_min_advmss);
+	if (nrt->u.dst.metrics[RTAX_ADVMSS-1] > 65535-20)
+		nrt->u.dst.metrics[RTAX_ADVMSS-1] = 65535;
 	nrt->rt6i_hoplimit = ipv6_get_hoplimit(neigh->dev);
 
 	if (rt6_ins(nrt))
@@ -947,7 +944,11 @@
 		if (net_ratelimit())
 			printk(KERN_DEBUG "rt6_pmtu_discovery: invalid MTU value %d\n",
 			       pmtu);
-		return;
+		/* According to RFC1981, the PMTU is set to the IPv6 minimum
+		   link MTU if the node receives a Packet Too Big message
+		   reporting next-hop MTU that is less than the IPv6 minimum MTU.
+		   */
+		pmtu = IPV6_MIN_MTU;
 	}
 
 	rt = rt6_lookup(daddr, saddr, dev->ifindex, 0);
@@ -955,7 +956,7 @@
 	if (rt == NULL)
 		return;
 
-	if (pmtu >= rt->u.dst.pmtu)
+	if (pmtu >= dst_pmtu(&rt->u.dst))
 		goto out;
 
 	/* New mtu received -> path was valid.
@@ -970,7 +971,7 @@
 	   would return automatically.
 	 */
 	if (rt->rt6i_flags & RTF_CACHE) {
-		rt->u.dst.pmtu = pmtu;
+		rt->u.dst.metrics[RTAX_MTU-1] = pmtu;
 		dst_set_expires(&rt->u.dst, ip6_rt_mtu_expires);
 		rt->rt6i_flags |= RTF_MODIFIED|RTF_EXPIRES;
 		goto out;
@@ -984,8 +985,14 @@
 	if (!rt->rt6i_nexthop && !(rt->rt6i_flags & RTF_NONEXTHOP)) {
 		nrt = rt6_cow(rt, daddr, saddr);
 		if (!nrt->u.dst.error) {
-			nrt->u.dst.pmtu = pmtu;
-			dst_set_expires(&rt->u.dst, ip6_rt_mtu_expires);
+			nrt->u.dst.metrics[RTAX_MTU-1] = pmtu;
+			/* According to RFC 1981, detecting PMTU increase shouldn't be
+			   happened within 5 mins, the recommended timer is 10 mins.
+			   Here this route expiration time is set to ip6_rt_mtu_expires
+			   which is 10 mins. After 10 mins the decreased pmtu is expired
+			   and detecting PMTU increase will be automatically happened.
+			 */
+			dst_set_expires(&nrt->u.dst, ip6_rt_mtu_expires);
 			nrt->rt6i_flags |= RTF_DYNAMIC|RTF_EXPIRES;
 			dst_release(&nrt->u.dst);
 		}
@@ -997,9 +1004,9 @@
 		nrt->rt6i_dst.plen = 128;
 		nrt->u.dst.flags |= DST_HOST;
 		nrt->rt6i_nexthop = neigh_clone(rt->rt6i_nexthop);
-		dst_set_expires(&rt->u.dst, ip6_rt_mtu_expires);
+		dst_set_expires(&nrt->u.dst, ip6_rt_mtu_expires);
 		nrt->rt6i_flags |= RTF_DYNAMIC|RTF_CACHE|RTF_EXPIRES;
-		nrt->u.dst.pmtu = pmtu;
+		nrt->u.dst.metrics[RTAX_MTU-1] = pmtu;
 		rt6_ins(nrt);
 	}
 
@@ -1021,7 +1028,7 @@
 		rt->u.dst.input = ort->u.dst.input;
 		rt->u.dst.output = ort->u.dst.output;
 
-		memcpy(&rt->u.dst.mxlock, &ort->u.dst.mxlock, RTAX_MAX*sizeof(unsigned));
+		memcpy(rt->u.dst.metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32));
 		rt->u.dst.dev = ort->u.dst.dev;
 		if (rt->u.dst.dev)
 			dev_hold(rt->u.dst.dev);
@@ -1169,10 +1176,10 @@
 	rt->u.dst.input = ip6_input;
 	rt->u.dst.output = ip6_output;
 	rt->rt6i_dev = dev_get_by_name("lo");
-	rt->u.dst.pmtu = ipv6_get_mtu(rt->rt6i_dev);
-	rt->u.dst.advmss = max_t(unsigned int, rt->u.dst.pmtu - 60, ip6_rt_min_advmss);
-	if (rt->u.dst.advmss > 65535-20)
-		rt->u.dst.advmss = 65535;
+	rt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(rt->rt6i_dev);
+	rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, dst_pmtu(&rt->u.dst) - 60, ip6_rt_min_advmss);
+	if (rt->u.dst.metrics[RTAX_ADVMSS-1] > 65535-20)
+		rt->u.dst.metrics[RTAX_ADVMSS-1] = 65535;
 	rt->rt6i_hoplimit = ipv6_get_hoplimit(rt->rt6i_dev);
 	rt->u.dst.obsolete = -1;
 
@@ -1236,19 +1243,38 @@
 static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg)
 {
 	struct rt6_mtu_change_arg *arg = (struct rt6_mtu_change_arg *) p_arg;
+	struct inet6_dev *idev;
 
 	/* In IPv6 pmtu discovery is not optional,
 	   so that RTAX_MTU lock cannot disable it.
 	   We still use this lock to block changes
 	   caused by addrconf/ndisc.
 	*/
+
+	idev = __in6_dev_get(arg->dev);
+	/* For administrative MTU increase, there is no way to discover
+	   IPv6 PMTU increase, so PMTU increase should be updated here.
+	   Since RFC 1981 doesn't include administrative MTU increase
+	   update PMTU increase is a MUST. (i.e. jumbo frame)
+	 */
+	/*
+	   If new MTU is less than route PMTU, this new MTU will be the
+	   lowest MTU in the path, update the route PMTU to refect PMTU
+	   decreases; if new MTU is greater than route PMTU, and the
+	   old MTU is the lowest MTU in the path, update the route PMTU
+	   to refect the increase. In this case if the other nodes' MTU
+	   also have the lowest MTU, TOO BIG MESSAGE will be lead to
+	   PMTU discouvery.
+	 */
 	if (rt->rt6i_dev == arg->dev &&
-	    rt->u.dst.pmtu > arg->mtu &&
-	    !(rt->u.dst.mxlock&(1<<RTAX_MTU)))
-		rt->u.dst.pmtu = arg->mtu;
-	rt->u.dst.advmss = max_t(unsigned int, arg->mtu - 60, ip6_rt_min_advmss);
-	if (rt->u.dst.advmss > 65535-20)
-		rt->u.dst.advmss = 65535;
+	    !dst_metric_locked(&rt->u.dst, RTAX_MTU) &&
+            (dst_pmtu(&rt->u.dst) > arg->mtu ||
+             (dst_pmtu(&rt->u.dst) < arg->mtu &&
+	      dst_pmtu(&rt->u.dst) == idev->cnf.mtu6)))
+		rt->u.dst.metrics[RTAX_MTU-1] = arg->mtu;
+	rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, arg->mtu - 60, ip6_rt_min_advmss);
+	if (rt->u.dst.metrics[RTAX_ADVMSS-1] > 65535-20)
+		rt->u.dst.metrics[RTAX_ADVMSS-1] = 65535;
 	return 0;
 }
 
@@ -1385,7 +1411,7 @@
 		if (ipv6_get_saddr(&rt->u.dst, dst, &saddr_buf) == 0)
 			RTA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf);
 	}
-	if (rtnetlink_put_metrics(skb, &rt->u.dst.mxlock) < 0)
+	if (rtnetlink_put_metrics(skb, rt->u.dst.metrics) < 0)
 		goto rtattr_failure;
 	if (rt->u.dst.neighbour)
 		RTA_PUT(skb, RTA_GATEWAY, 16, &rt->u.dst.neighbour->primary_key);
diff -Nru a/net/ipv6/sit.c b/net/ipv6/sit.c
--- a/net/ipv6/sit.c	Wed Oct 30 16:44:33 2002
+++ b/net/ipv6/sit.c	Wed Oct 30 16:44:33 2002
@@ -423,13 +423,6 @@
 	return 0;
 }
 
-/* Need this wrapper because NF_HOOK takes the function address */
-static inline int do_ip_send(struct sk_buff *skb)
-{
-	return ip_send(skb);
-}
-
-
 /* Returns the embedded IPv4 address if the IPv6 address
    comes from 6to4 (draft-ietf-ngtrans-6to4-04) addr space */
 
@@ -526,9 +519,9 @@
 	}
 
 	if (tiph->frag_off)
-		mtu = rt->u.dst.pmtu - sizeof(struct iphdr);
+		mtu = dst_pmtu(&rt->u.dst) - sizeof(struct iphdr);
 	else
-		mtu = skb->dst ? skb->dst->pmtu : dev->mtu;
+		mtu = skb->dst ? dst_pmtu(skb->dst) : dev->mtu;
 
 	if (mtu < 68) {
 		tunnel->stat.collisions++;
@@ -537,15 +530,9 @@
 	}
 	if (mtu < IPV6_MIN_MTU)
 		mtu = IPV6_MIN_MTU;
-	if (skb->dst && mtu < skb->dst->pmtu) {
-		struct rt6_info *rt6 = (struct rt6_info*)skb->dst;
-		if (mtu < rt6->u.dst.pmtu) {
-			if (tunnel->parms.iph.daddr || rt6->rt6i_dst.plen == 128) {
-				rt6->rt6i_flags |= RTF_MODIFIED;
-				rt6->u.dst.pmtu = mtu;
-			}
-		}
-	}
+	if (tunnel->parms.iph.daddr && skb->dst)
+		skb->dst->ops->update_pmtu(skb->dst, mtu);
+
 	if (skb->len > mtu) {
 		icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev);
 		ip_rt_put(rt);
diff -Nru a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
--- a/net/ipv6/sysctl_net_ipv6.c	Wed Oct 30 16:44:20 2002
+++ b/net/ipv6/sysctl_net_ipv6.c	Wed Oct 30 16:44:20 2002
@@ -1,5 +1,8 @@
 /*
  * sysctl_net_ipv6.c: sysctl interface to net IPV6 subsystem.
+ *
+ * Changes:
+ * YOSHIFUJI Hideaki @USAGI:	added icmp sysctl table.
  */
 
 #include <linux/mm.h>
@@ -12,11 +15,15 @@
 #include <net/addrconf.h>
 
 extern ctl_table ipv6_route_table[];
+extern ctl_table ipv6_icmp_table[];
 
 #ifdef CONFIG_SYSCTL
 
 ctl_table ipv6_table[] = {
 	{NET_IPV6_ROUTE, "route", NULL, 0, 0555, ipv6_route_table},
+	{NET_IPV6_ICMP, "icmp", NULL, 0, 0500, ipv6_icmp_table},
+	{NET_IPV6_BINDV6ONLY, "bindv6only",
+	 &sysctl_ipv6_bindv6only, sizeof(int), 0644, NULL, &proc_dointvec},
 	{0}
 };
 
diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
--- a/net/ipv6/tcp_ipv6.c	Wed Oct 30 16:44:29 2002
+++ b/net/ipv6/tcp_ipv6.c	Wed Oct 30 16:44:29 2002
@@ -14,6 +14,9 @@
  *
  *	Fixes:
  *	Hideaki YOSHIFUJI	:	sin6_scope_id support
+ *	YOSHIFUJI Hideaki @USAGI and:	Support IPV6_V6ONLY socket option, which
+ *	Alexey Kuznetsov		allow both IPv4 and IPv6 sockets to bind
+ *					a single port at the same time.
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -90,14 +93,35 @@
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	int addr_type = ipv6_addr_type(&np->rcv_saddr);
 
-	return !inet_sk(sk2)->rcv_saddr || addr_type == IPV6_ADDR_ANY ||
-	       (sk2->family == AF_INET6 &&
-	        !ipv6_addr_cmp(&np->rcv_saddr,
-			       sk2->state != TCP_TIME_WAIT ?
-			       &inet6_sk(sk2)->rcv_saddr :
-			       &((struct tcp_tw_bucket *)sk)->v6_rcv_saddr)) ||
-	       (addr_type == IPV6_ADDR_MAPPED && sk2->family == AF_INET &&
-		inet_sk(sk)->rcv_saddr == inet_sk(sk2)->rcv_saddr);
+	if (!inet_sk(sk2)->rcv_saddr && !ipv6_only_sock(sk))
+		return 1;
+
+	if (sk2->family == AF_INET6 &&
+	    ipv6_addr_any(&inet6_sk(sk2)->rcv_saddr) &&
+	    !(ipv6_only_sock(sk2) && addr_type == IPV6_ADDR_MAPPED))
+		return 1;
+
+	if (addr_type == IPV6_ADDR_ANY &&
+	    (!ipv6_only_sock(sk) ||
+	     !(sk2->family == AF_INET6 ?
+	       ipv6_addr_type(&inet6_sk(sk2)->rcv_saddr) == IPV6_ADDR_MAPPED : 1)))
+		return 1;
+
+	if (sk2->family == AF_INET6 &&
+	    !ipv6_addr_cmp(&np->rcv_saddr,
+			   (sk2->state != TCP_TIME_WAIT ?
+			    &inet6_sk(sk2)->rcv_saddr :
+			    &((struct tcp_tw_bucket *)sk)->v6_rcv_saddr)))
+		return 1;
+
+	if (addr_type == IPV6_ADDR_MAPPED &&
+	    !ipv6_only_sock(sk2) &&
+	    (!inet_sk(sk2)->rcv_saddr ||
+	     !inet_sk(sk)->rcv_saddr ||
+	     inet_sk(sk)->rcv_saddr == inet_sk(sk2)->rcv_saddr))
+		return 1;
+
+	return 0;
 }
 
 static inline int tcp_v6_bind_conflict(struct sock *sk,
@@ -612,6 +636,9 @@
 
 		SOCK_DEBUG(sk, "connect: ipv4 mapped\n");
 
+		if (__ipv6_only_sock(sk))
+			return -ENETUNREACH;
+
 		sin.sin_family = AF_INET;
 		sin.sin_port = usin->sin6_port;
 		sin.sin_addr.s_addr = usin->sin6_addr.s6_addr32[3];
@@ -778,8 +805,8 @@
 
 		if (dst->error) {
 			sk->err_soft = -dst->error;
-		} else if (tp->pmtu_cookie > dst->pmtu) {
-			tcp_sync_mss(sk, dst->pmtu);
+		} else if (tp->pmtu_cookie > dst_pmtu(dst)) {
+			tcp_sync_mss(sk, dst_pmtu(dst));
 			tcp_simple_retransmit(sk);
 		} /* else let the usual retransmit timer handle it */
 		dst_release(dst);
@@ -1389,8 +1416,8 @@
 		newtp->ext_header_len = newnp->opt->opt_nflen +
 					newnp->opt->opt_flen;
 
-	tcp_sync_mss(newsk, dst->pmtu);
-	newtp->advmss = dst->advmss;
+	tcp_sync_mss(newsk, dst_pmtu(dst));
+	newtp->advmss = dst_metric(dst, RTAX_ADVMSS);
 	tcp_initialize_rcv_mss(newsk);
 
 	newinet->daddr = newinet->saddr = newinet->rcv_saddr = LOOPBACK4_IPV6;
@@ -1469,8 +1496,6 @@
 	 *	socket locking is here for SMP purposes as backlog rcv
 	 *	is currently called with bh processing disabled.
 	 */
-
-  	IP6_INC_STATS_BH(Ip6InDelivers);
 
 	/* Do Stevens' IPV6_PKTOPTIONS.
 
diff -Nru a/net/ipv6/udp.c b/net/ipv6/udp.c
--- a/net/ipv6/udp.c	Wed Oct 30 16:44:26 2002
+++ b/net/ipv6/udp.c	Wed Oct 30 16:44:26 2002
@@ -11,6 +11,9 @@
  *
  *	Fixes:
  *	Hideaki YOSHIFUJI	:	sin6_scope_id support
+ *	YOSHIFUJI Hideaki @USAGI and:	Support IPV6_V6ONLY socket option, which
+ *	Alexey Kuznetsov		allow both IPv4 and IPv6 sockets to bind
+ *					a single port at the same time.
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -50,16 +53,41 @@
 
 struct udp_mib udp_stats_in6[NR_CPUS*2];
 
+/* XXX This is identical to tcp_ipv6.c:ipv6_rcv_saddr_equal, put
+ * XXX it somewhere common. -DaveM
+ */
 static __inline__ int udv6_rcv_saddr_equal(struct sock *sk, struct sock *sk2)
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	int addr_type = ipv6_addr_type(&np->rcv_saddr);
 
-	return !inet_sk(sk2)->rcv_saddr || addr_type == IPV6_ADDR_ANY ||
-	       (sk2->family == AF_INET6 &&
-	        !ipv6_addr_cmp(&np->rcv_saddr, &inet6_sk(sk2)->rcv_saddr)) ||
-	       (addr_type == IPV6_ADDR_MAPPED && sk2->family == AF_INET &&
-		inet_sk(sk)->rcv_saddr == inet_sk(sk2)->rcv_saddr);
+	if (!inet_sk(sk2)->rcv_saddr && !ipv6_only_sock(sk))
+		return 1;
+
+	if (sk2->family == AF_INET6 && 
+	    ipv6_addr_any(&inet6_sk(sk2)->rcv_saddr) &&
+	    !(ipv6_only_sock(sk2) && addr_type == IPV6_ADDR_MAPPED))
+		return 1;
+
+	if (addr_type == IPV6_ADDR_ANY && 
+	    (!ipv6_only_sock(sk) || 
+	     !(sk2->family == AF_INET6 ?
+	       (ipv6_addr_type(&inet6_sk(sk2)->rcv_saddr) == IPV6_ADDR_MAPPED) : 1)))
+		return 1;
+
+	if (sk2->family == AF_INET6 && 
+	    !ipv6_addr_cmp(&inet6_sk(sk)->rcv_saddr,
+			   &inet6_sk(sk2)->rcv_saddr))
+		return 1;
+
+	if (addr_type == IPV6_ADDR_MAPPED &&
+	    !ipv6_only_sock(sk2) &&
+	    (!inet_sk(sk2)->rcv_saddr || 
+	     !inet_sk(sk)->rcv_saddr ||
+	     inet_sk(sk)->rcv_saddr == inet_sk(sk2)->rcv_saddr))
+		return 1;
+
+	return 0;
 }
 
 /* Grrr, addr_type already calculated by caller, but I don't want
@@ -228,6 +256,8 @@
 	int			err;
 
 	if (usin->sin6_family == AF_INET) {
+		if (__ipv6_only_sock(sk))
+			return -EAFNOSUPPORT;
 		err = udp_connect(sk, uaddr, addr_len);
 		goto ipv4_connected;
 	}
@@ -263,6 +293,9 @@
 	if (addr_type == IPV6_ADDR_MAPPED) {
 		struct sockaddr_in sin;
 
+		if (__ipv6_only_sock(sk))
+			return -ENETUNREACH;
+
 		sin.sin_family = AF_INET;
 		sin.sin_addr.s_addr = daddr->s6_addr32[3];
 		sin.sin_port = usin->sin6_port;
@@ -512,7 +545,6 @@
 	if (sk->filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
 		if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
 			UDP6_INC_STATS_BH(UdpInErrors);
-			IP6_INC_STATS_BH(Ip6InDiscards);
 			kfree_skb(skb);
 			return 0;
 		}
@@ -521,11 +553,9 @@
 #endif
 	if (sock_queue_rcv_skb(sk,skb)<0) {
 		UDP6_INC_STATS_BH(UdpInErrors);
-		IP6_INC_STATS_BH(Ip6InDiscards);
 		kfree_skb(skb);
 		return 0;
 	}
-  	IP6_INC_STATS_BH(Ip6InDelivers);
 	UDP6_INC_STATS_BH(UdpInDatagrams);
 	return 0;
 }
@@ -793,8 +823,11 @@
 	fl.oif = 0;
 
 	if (sin6) {
-		if (sin6->sin6_family == AF_INET)
+		if (sin6->sin6_family == AF_INET) {
+			if (__ipv6_only_sock(sk))
+				return -ENETUNREACH;
 			return udp_sendmsg(iocb, sk, msg, ulen);
+		}
 
 		if (addr_len < SIN6_LEN_RFC2133)
 			return -EINVAL;
@@ -840,6 +873,9 @@
 
 	if (addr_type == IPV6_ADDR_MAPPED) {
 		struct sockaddr_in sin;
+
+		if (__ipv6_only_sock(sk))
+			return -ENETUNREACH;
 
 		sin.sin_family = AF_INET;
 		sin.sin_addr.s_addr = daddr->s6_addr32[3];
diff -Nru a/net/ipx/Config.help b/net/ipx/Config.help
--- a/net/ipx/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,25 +0,0 @@
-CONFIG_IPX_INTERN
-  Every IPX network has an address that identifies it. Sometimes it is
-  useful to give an IPX "network" address to your Linux box as well
-  (for example if your box is acting as a file server for different
-  IPX networks: it will then be accessible from everywhere using the
-  same address). The way this is done is to create a virtual internal
-  "network" inside your box and to assign an IPX address to this
-  network. Say Y here if you want to do this; read the IPX-HOWTO at
-  <http://www.linuxdoc.org/docs.html#howto> for details.
-
-  The full internal IPX network enables you to allocate sockets on
-  different virtual nodes of the internal network. This is done by
-  evaluating the field sipx_node of the socket address given to the
-  bind call. So applications should always initialize the node field
-  to 0 when binding a socket on the primary network. In this case the
-  socket is assigned the default node that has been given to the
-  kernel when the internal network was created. By enabling the full
-  internal IPX network the cross-forwarding of packets targeted at
-  'special' sockets to sockets listening on the primary network is
-  disabled. This might break existing applications, especially RIP/SAP
-  daemons. A RIP/SAP daemon that works well with the full internal net
-  can be found on <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/>.
-
-  If you don't know what you are doing, say N.
-
diff -Nru a/net/ipx/Config.in b/net/ipx/Config.in
--- a/net/ipx/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,5 +0,0 @@
-#
-# IPX configuration
-#
-
-bool '  IPX: Full internal IPX network' CONFIG_IPX_INTERN
diff -Nru a/net/ipx/Kconfig b/net/ipx/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/ipx/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,31 @@
+#
+# IPX configuration
+#
+config IPX_INTERN
+	bool "IPX: Full internal IPX network"
+	depends on IPX
+	---help---
+	  Every IPX network has an address that identifies it. Sometimes it is
+	  useful to give an IPX "network" address to your Linux box as well
+	  (for example if your box is acting as a file server for different
+	  IPX networks: it will then be accessible from everywhere using the
+	  same address). The way this is done is to create a virtual internal
+	  "network" inside your box and to assign an IPX address to this
+	  network. Say Y here if you want to do this; read the IPX-HOWTO at
+	  <http://www.linuxdoc.org/docs.html#howto> for details.
+
+	  The full internal IPX network enables you to allocate sockets on
+	  different virtual nodes of the internal network. This is done by
+	  evaluating the field sipx_node of the socket address given to the
+	  bind call. So applications should always initialize the node field
+	  to 0 when binding a socket on the primary network. In this case the
+	  socket is assigned the default node that has been given to the
+	  kernel when the internal network was created. By enabling the full
+	  internal IPX network the cross-forwarding of packets targeted at
+	  'special' sockets to sockets listening on the primary network is
+	  disabled. This might break existing applications, especially RIP/SAP
+	  daemons. A RIP/SAP daemon that works well with the full internal net
+	  can be found on <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/>.
+
+	  If you don't know what you are doing, say N.
+
diff -Nru a/net/ipx/Makefile b/net/ipx/Makefile
--- a/net/ipx/Makefile	Wed Oct 30 16:44:30 2002
+++ b/net/ipx/Makefile	Wed Oct 30 16:44:31 2002
@@ -6,6 +6,5 @@
 
 ipx-y			:= af_ipx.o ipx_proc.o
 ipx-$(CONFIG_SYSCTL)	+= sysctl_net_ipx.o
-ipx-objs		:= $(ipx-y)
 
 include $(TOPDIR)/Rules.make
diff -Nru a/net/irda/Config.help b/net/irda/Config.help
--- a/net/irda/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,63 +0,0 @@
-CONFIG_IRDA
-  Say Y here if you want to build support for the IrDA (TM) protocols.
-  The Infrared Data Associations (tm) specifies standards for wireless
-  infrared communication and is supported by most laptops and PDA's.
-
-  To use Linux support for the IrDA (tm) protocols, you will also need
-  some user-space utilities like irattach.  For more information, see
-  the file <file:Documentation/networking/irda.txt>.  You also want to
-  read the IR-HOWTO, available at
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you want to exchange bits of data (vCal, vCard) with a PDA, you
-  will need to install some OBEX application, such as OpenObex :
-  <http://sourceforge.net/projects/openobex/>
-
-  This support is also available as a module called irda.o.  If you
-  want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_IRDA_ULTRA
-  Say Y here to support the connectionless Ultra IRDA protocol.
-  Ultra allows to exchange data over IrDA with really simple devices
-  (watch, beacon) without the overhead of the IrDA protocol (no handshaking,
-  no management frames, simple fixed header).
-  Ultra is available as a special socket : socket(AF_IRDA, SOCK_DGRAM, 1);
-
-CONFIG_IRDA_CACHE_LAST_LSAP
-  Say Y here if you want IrLMP to cache the last LSAP used.  This
-  makes sense since most frames will be sent/received on the same
-  connection.  Enabling this option will save a hash-lookup per frame.
-
-  If unsure, say Y.
-
-CONFIG_IRDA_FAST_RR
-  Say Y here is you want IrLAP to send fast RR (Receive Ready) frames
-  when acting as a primary station.
-  Disabling this option will make latency over IrDA very bad. Enabling
-  this option will make the IrDA stack send more packet than strictly
-  necessary, thus reduce your battery life (but not that much).
-
-  Fast RR will make IrLAP send out a RR frame immediately when
-  receiving a frame if its own transmit queue is currently empty. This
-  will give a lot of speed improvement when receiving much data since
-  the secondary station will not have to wait the max. turn around
-  time (usually 500ms) before it is allowed to transmit the next time.
-  If the transmit queue of the secondary is also empty, the primary will
-  start backing-off before sending another RR frame, waiting longer
-  each time until the back-off reaches the max. turn around time.
-  This back-off increase in controlled via
-  /proc/sys/net/irda/fast_poll_increase
-
-  If unsure, say Y.
-
-CONFIG_IRDA_DEBUG
-  Say Y here if you want the IrDA subsystem to write debug information
-  to your syslog. You can change the debug level in
-  /proc/sys/net/irda/debug .
-  When this option is enabled, the IrDA also perform many extra internal
-  verifications which will usually prevent the kernel to crash in case of
-  bugs.
-
-  If unsure, say Y (since it makes it easier to find the bugs).
-
diff -Nru a/net/irda/Config.in b/net/irda/Config.in
--- a/net/irda/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,28 +0,0 @@
-#
-# IrDA protocol configuration
-#
-
-if [ "$CONFIG_NET" != "n" ]; then
-
-   mainmenu_option next_comment
-   comment 'IrDA (infrared) support'
-   dep_tristate 'IrDA subsystem support' CONFIG_IRDA $CONFIG_NET
-
-   if [ "$CONFIG_IRDA" != "n" ]; then
-      comment 'IrDA protocols'
-      source net/irda/irlan/Config.in
-      source net/irda/irnet/Config.in
-      source net/irda/ircomm/Config.in
-      bool '  Ultra (connectionless) protocol' CONFIG_IRDA_ULTRA
-      comment 'IrDA options'
-      bool '  Cache last LSAP' CONFIG_IRDA_CACHE_LAST_LSAP
-      bool '  Fast RRs (low latency)' CONFIG_IRDA_FAST_RR
-      bool '  Debug information' CONFIG_IRDA_DEBUG
-   fi
-
-   if [ "$CONFIG_IRDA" != "n" ]; then
-      source drivers/net/irda/Config.in
-   fi
-   endmenu
-fi
-
diff -Nru a/net/irda/Kconfig b/net/irda/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/irda/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,100 @@
+#
+# IrDA protocol configuration
+#
+
+menu "IrDA (infrared) support"
+	depends on NET
+
+config IRDA
+	tristate "IrDA subsystem support"
+	---help---
+	  Say Y here if you want to build support for the IrDA (TM) protocols.
+	  The Infrared Data Associations (tm) specifies standards for wireless
+	  infrared communication and is supported by most laptops and PDA's.
+
+	  To use Linux support for the IrDA (tm) protocols, you will also need
+	  some user-space utilities like irattach.  For more information, see
+	  the file <file:Documentation/networking/irda.txt>.  You also want to
+	  read the IR-HOWTO, available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you want to exchange bits of data (vCal, vCard) with a PDA, you
+	  will need to install some OBEX application, such as OpenObex :
+	  <http://sourceforge.net/projects/openobex/>
+
+	  This support is also available as a module called irda.o.  If you
+	  want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+comment "IrDA protocols"
+	depends on IRDA
+
+source "net/irda/irlan/Kconfig"
+
+source "net/irda/irnet/Kconfig"
+
+source "net/irda/ircomm/Kconfig"
+
+config IRDA_ULTRA
+	bool "Ultra (connectionless) protocol"
+	depends on IRDA
+	help
+	  Say Y here to support the connectionless Ultra IRDA protocol.
+	  Ultra allows to exchange data over IrDA with really simple devices
+	  (watch, beacon) without the overhead of the IrDA protocol (no handshaking,
+	  no management frames, simple fixed header).
+	  Ultra is available as a special socket : socket(AF_IRDA, SOCK_DGRAM, 1);
+
+comment "IrDA options"
+	depends on IRDA
+
+config IRDA_CACHE_LAST_LSAP
+	bool "Cache last LSAP"
+	depends on IRDA
+	help
+	  Say Y here if you want IrLMP to cache the last LSAP used.  This
+	  makes sense since most frames will be sent/received on the same
+	  connection.  Enabling this option will save a hash-lookup per frame.
+
+	  If unsure, say Y.
+
+config IRDA_FAST_RR
+	bool "Fast RRs (low latency)"
+	depends on IRDA
+	---help---
+	  Say Y here is you want IrLAP to send fast RR (Receive Ready) frames
+	  when acting as a primary station.
+	  Disabling this option will make latency over IrDA very bad. Enabling
+	  this option will make the IrDA stack send more packet than strictly
+	  necessary, thus reduce your battery life (but not that much).
+
+	  Fast RR will make IrLAP send out a RR frame immediately when
+	  receiving a frame if its own transmit queue is currently empty. This
+	  will give a lot of speed improvement when receiving much data since
+	  the secondary station will not have to wait the max. turn around
+	  time (usually 500ms) before it is allowed to transmit the next time.
+	  If the transmit queue of the secondary is also empty, the primary will
+	  start backing-off before sending another RR frame, waiting longer
+	  each time until the back-off reaches the max. turn around time.
+	  This back-off increase in controlled via
+	  /proc/sys/net/irda/fast_poll_increase
+
+	  If unsure, say Y.
+
+config IRDA_DEBUG
+	bool "Debug information"
+	depends on IRDA
+	help
+	  Say Y here if you want the IrDA subsystem to write debug information
+	  to your syslog. You can change the debug level in
+	  /proc/sys/net/irda/debug .
+	  When this option is enabled, the IrDA also perform many extra internal
+	  verifications which will usually prevent the kernel to crash in case of
+	  bugs.
+
+	  If unsure, say Y (since it makes it easier to find the bugs).
+
+source "drivers/net/irda/Kconfig"
+
+endmenu
+
diff -Nru a/net/irda/Makefile b/net/irda/Makefile
--- a/net/irda/Makefile	Wed Oct 30 16:44:33 2002
+++ b/net/irda/Makefile	Wed Oct 30 16:44:33 2002
@@ -15,6 +15,5 @@
 	  discovery.o parameters.o irsyms.o
 irda-$(CONFIG_PROC_FS) += irproc.o
 irda-$(CONFIG_SYSCTL) += irsysctl.o
-irda-objs := $(irda-y)
 
 include $(TOPDIR)/Rules.make
diff -Nru a/net/irda/ircomm/Config.help b/net/irda/ircomm/Config.help
--- a/net/irda/ircomm/Config.help	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-CONFIG_IRCOMM
-  Say Y here if you want to build support for the IrCOMM protocol.  If
-  you want to compile it as a module (you will get ircomm.o and
-  ircomm-tty.o), say M here and read <file:Documentation/modules.txt>.
-  IrCOMM implements serial port emulation, and makes it possible to
-  use all existing applications that understands TTY's with an
-  infrared link.  Thus you should be able to use application like PPP,
-  minicom and others.  Enabling this option will create two modules
-  called ircomm and ircomm_tty.
-
diff -Nru a/net/irda/ircomm/Config.in b/net/irda/ircomm/Config.in
--- a/net/irda/ircomm/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,3 +0,0 @@
-
-dep_tristate '  IrCOMM protocol' CONFIG_IRCOMM $CONFIG_IRDA
-
diff -Nru a/net/irda/ircomm/Kconfig b/net/irda/ircomm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/irda/ircomm/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,13 @@
+config IRCOMM
+	tristate "IrCOMM protocol"
+	depends on IRDA
+	help
+	  Say Y here if you want to build support for the IrCOMM protocol.  If
+	  you want to compile it as a module (you will get ircomm.o and
+	  ircomm-tty.o), say M here and read <file:Documentation/modules.txt>.
+	  IrCOMM implements serial port emulation, and makes it possible to
+	  use all existing applications that understands TTY's with an
+	  infrared link.  Thus you should be able to use application like PPP,
+	  minicom and others.  Enabling this option will create two modules
+	  called ircomm and ircomm_tty.
+
diff -Nru a/net/irda/irlan/Config.help b/net/irda/irlan/Config.help
--- a/net/irda/irlan/Config.help	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,11 +0,0 @@
-CONFIG_IRLAN
-  Say Y here if you want to build support for the IrLAN protocol.  If
-  you want to compile it as a module (irlan.o), say M here and read
-  <file:Documentation/modules.txt>.  IrLAN emulates an Ethernet and
-  makes it possible to put up a wireless LAN using infrared beams.
-
-  The IrLAN protocol can be used to talk with infrared access points
-  like the HP NetbeamIR, or the ESI JetEye NET.  You can also connect
-  to another Linux machine running the IrLAN protocol for ad-hoc
-  networking!
-
diff -Nru a/net/irda/irlan/Config.in b/net/irda/irlan/Config.in
--- a/net/irda/irlan/Config.in	Wed Oct 30 16:44:24 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1 +0,0 @@
-dep_tristate '  IrLAN protocol' CONFIG_IRLAN $CONFIG_IRDA
diff -Nru a/net/irda/irlan/Kconfig b/net/irda/irlan/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/irda/irlan/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,14 @@
+config IRLAN
+	tristate "IrLAN protocol"
+	depends on IRDA
+	help
+	  Say Y here if you want to build support for the IrLAN protocol.  If
+	  you want to compile it as a module (irlan.o), say M here and read
+	  <file:Documentation/modules.txt>.  IrLAN emulates an Ethernet and
+	  makes it possible to put up a wireless LAN using infrared beams.
+
+	  The IrLAN protocol can be used to talk with infrared access points
+	  like the HP NetbeamIR, or the ESI JetEye NET.  You can also connect
+	  to another Linux machine running the IrLAN protocol for ad-hoc
+	  networking!
+
diff -Nru a/net/irda/irnet/Config.help b/net/irda/irnet/Config.help
--- a/net/irda/irnet/Config.help	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,11 +0,0 @@
-CONFIG_IRNET
-  Say Y here if you want to build support for the IrNET protocol.  If
-  you want to compile it as a module (irnet.o), say M here and read
-  <file:Documentation/modules.txt>.  IrNET is a PPP driver, so you
-  will also need a working PPP subsystem (driver, daemon and
-  config)...
-
-  IrNET is an alternate way to tranfer TCP/IP traffic over IrDA.  It
-  uses synchronous PPP over a set of point to point IrDA sockets.  You
-  can use it between Linux machine or with W2k.
-
diff -Nru a/net/irda/irnet/Config.in b/net/irda/irnet/Config.in
--- a/net/irda/irnet/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,4 +0,0 @@
-if [ "$CONFIG_NETDEVICES" != "n" ]; then
-   dep_tristate '  IrNET protocol' CONFIG_IRNET $CONFIG_IRDA $CONFIG_PPP
-fi
-
diff -Nru a/net/irda/irnet/Kconfig b/net/irda/irnet/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/irda/irnet/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,14 @@
+config IRNET
+	tristate "IrNET protocol"
+	depends on IRDA && PPP
+	help
+	  Say Y here if you want to build support for the IrNET protocol.  If
+	  you want to compile it as a module (irnet.o), say M here and read
+	  <file:Documentation/modules.txt>.  IrNET is a PPP driver, so you
+	  will also need a working PPP subsystem (driver, daemon and
+	  config)...
+
+	  IrNET is an alternate way to tranfer TCP/IP traffic over IrDA.  It
+	  uses synchronous PPP over a set of point to point IrDA sockets.  You
+	  can use it between Linux machine or with W2k.
+
diff -Nru a/net/llc/Makefile b/net/llc/Makefile
--- a/net/llc/Makefile	Wed Oct 30 16:44:32 2002
+++ b/net/llc/Makefile	Wed Oct 30 16:44:32 2002
@@ -18,7 +18,6 @@
 	 llc_main.o llc_s_ac.o llc_conn.o llc_c_st.o llc_stat.o llc_actn.o \
 	 llc_s_ev.o llc_evnt.o llc_pdu.o llc_proc.o
 llc-$(CONFIG_LLC_UI)	+= af_llc.o
-llc-objs	 	:= $(llc-y)
 
 # Objects that export symbols.
 export-objs := llc_if.o
diff -Nru a/net/llc/llc_proc.c b/net/llc/llc_proc.c
--- a/net/llc/llc_proc.c	Wed Oct 30 16:44:21 2002
+++ b/net/llc/llc_proc.c	Wed Oct 30 16:44:21 2002
@@ -13,10 +13,11 @@
  */
 
 #include <linux/config.h>
+#include <linux/init.h>
+#ifdef CONFIG_PROC_FS
 #include <linux/kernel.h>
 #include <linux/proc_fs.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/seq_file.h>
 #include <net/sock.h>
 #include <net/llc_c_ac.h>
@@ -27,14 +28,13 @@
 #include <net/llc_main.h>
 #include <net/llc_sap.h>
 
-#ifdef CONFIG_PROC_FS
 static void llc_ui_format_mac(struct seq_file *seq, unsigned char *mac)
 {
 	seq_printf(seq, "%02X:%02X:%02X:%02X:%02X:%02X",
 		   mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 }
 
-static __inline__ struct sock *llc_get_sk_idx(loff_t pos)
+static struct sock *llc_get_sk_idx(loff_t pos)
 {
 	struct list_head *sap_entry;
 	struct llc_sap *sap;
@@ -44,15 +44,15 @@
 		sap = list_entry(sap_entry, struct llc_sap, node);
 
 		read_lock_bh(&sap->sk_list.lock);
-		for (sk = sap->sk_list.list; pos && sk; sk = sk->next)
-			--pos;
-		if (!pos) {
-			if (!sk)
-				read_unlock_bh(&sap->sk_list.lock);
-			break;
-		}
+		for (sk = sap->sk_list.list; sk; sk = sk->next)
+			if (!pos--) {
+				if (!sk)
+					read_unlock_bh(&sap->sk_list.lock);
+				goto out;
+			}
 		read_unlock_bh(&sap->sk_list.lock);
 	}
+out:
 	return sk;
 }
 
@@ -72,15 +72,7 @@
 
 	++*pos;
 	if (v == (void *)1) {
-		if (list_empty(&llc_main_station.sap_list.list)) {
-			sk = NULL;
-			goto out;
-		}
-		sap = list_entry(llc_main_station.sap_list.list.next,
-				 struct llc_sap, node);
-
-		read_lock_bh(&sap->sk_list.lock);
-		sk = sap->sk_list.list;
+		sk = llc_get_sk_idx(0);
 		goto out;
 	}
 	sk = v;
@@ -109,6 +101,13 @@
 
 static void llc_seq_stop(struct seq_file *seq, void *v)
 {
+	if (v) {
+		struct sock *sk = v;
+		struct llc_opt *llc = llc_sk(sk);
+		struct llc_sap *sap = llc->sap;
+
+		read_unlock_bh(&sap->sk_list.lock);
+	}
 	read_unlock_bh(&llc_main_station.sap_list.lock);
 }
 
diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
--- a/net/netlink/af_netlink.c	Wed Oct 30 16:44:28 2002
+++ b/net/netlink/af_netlink.c	Wed Oct 30 16:44:28 2002
@@ -69,6 +69,7 @@
 
 static struct sock *nl_table[MAX_LINKS];
 static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait);
+static unsigned nl_nonroot[MAX_LINKS];
 
 #ifdef NL_EMULATE_DEV
 static struct socket *netlink_kernel[MAX_LINKS];
@@ -317,6 +318,11 @@
 	return 0;
 }
 
+static inline int netlink_capable(struct socket *sock, unsigned flag) 
+{ 
+	return (nl_nonroot[sock->sk->protocol] & flag) || capable(CAP_NET_ADMIN);
+} 
+
 static int netlink_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
 {
 	struct sock *sk = sock->sk;
@@ -328,7 +334,7 @@
 		return -EINVAL;
 
 	/* Only superuser is allowed to listen multicasts */
-	if (nladdr->nl_groups && !capable(CAP_NET_ADMIN))
+	if (nladdr->nl_groups && !netlink_capable(sock, NL_NONROOT_RECV))
 		return -EPERM;
 
 	if (nlk->pid) {
@@ -368,7 +374,7 @@
 		return -EINVAL;
 
 	/* Only superuser is allowed to send multicasts */
-	if (nladdr->nl_groups && !capable(CAP_NET_ADMIN))
+	if (nladdr->nl_groups && !netlink_capable(sock, NL_NONROOT_SEND))
 		return -EPERM;
 
 	if (!nlk->pid)
@@ -590,7 +596,7 @@
 			return -EINVAL;
 		dst_pid = addr->nl_pid;
 		dst_groups = addr->nl_groups;
-		if (dst_groups && !capable(CAP_NET_ADMIN))
+		if (dst_groups && !netlink_capable(sock, NL_NONROOT_SEND))
 			return -EPERM;
 	} else {
 		dst_pid = nlk->dst_pid;
@@ -742,6 +748,12 @@
 	netlink_insert(sk, 0);
 	return sk;
 }
+
+void netlink_set_nonroot(int protocol, unsigned flags)
+{ 
+	if ((unsigned)protocol < MAX_LINKS) 
+		nl_nonroot[protocol] = flags;
+} 
 
 static void netlink_destroy_callback(struct netlink_callback *cb)
 {
diff -Nru a/net/netrom/Makefile b/net/netrom/Makefile
--- a/net/netrom/Makefile	Wed Oct 30 16:44:28 2002
+++ b/net/netrom/Makefile	Wed Oct 30 16:44:28 2002
@@ -7,7 +7,6 @@
 netrom-y		:= af_netrom.o nr_dev.o nr_in.o nr_loopback.o \
 			   nr_out.o nr_route.o nr_subr.o nr_timer.o
 netrom-$(CONFIG_SYSCTL)	+= sysctl_net_netrom.o
-netrom-objs		:= $(netrom-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/net/netsyms.c b/net/netsyms.c
--- a/net/netsyms.c	Wed Oct 30 16:44:27 2002
+++ b/net/netsyms.c	Wed Oct 30 16:44:27 2002
@@ -221,22 +221,19 @@
 /* for 801q VLAN support */
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 EXPORT_SYMBOL(dev_change_flags);
-EXPORT_SYMBOL(vlan_ioctl_hook);
 #endif
+EXPORT_SYMBOL(vlan_ioctl_hook);
 
 EXPORT_SYMBOL(scm_detach_fds);
 
 #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
 EXPORT_SYMBOL(br_handle_frame_hook);
-#ifdef CONFIG_INET
-EXPORT_SYMBOL(br_ioctl_hook);
-#endif
 #endif
+EXPORT_SYMBOL(br_ioctl_hook);
 
 #ifdef CONFIG_NET_DIVERT
 EXPORT_SYMBOL(alloc_divert_blk);
 EXPORT_SYMBOL(free_divert_blk);
-EXPORT_SYMBOL(divert_ioctl);
 #endif /* CONFIG_NET_DIVERT */
 
 #ifdef CONFIG_INET
@@ -411,6 +408,7 @@
 EXPORT_SYMBOL(netlink_kernel_create);
 EXPORT_SYMBOL(netlink_dump_start);
 EXPORT_SYMBOL(netlink_ack);
+EXPORT_SYMBOL(netlink_set_nonroot);
 EXPORT_SYMBOL(netlink_register_notifier);
 EXPORT_SYMBOL(netlink_unregister_notifier);
 #if defined(CONFIG_NETLINK_DEV) || defined(CONFIG_NETLINK_DEV_MODULE)
diff -Nru a/net/packet/af_packet.c b/net/packet/af_packet.c
--- a/net/packet/af_packet.c	Wed Oct 30 16:44:30 2002
+++ b/net/packet/af_packet.c	Wed Oct 30 16:44:30 2002
@@ -67,20 +67,11 @@
 #include <linux/poll.h>
 #include <linux/module.h>
 #include <linux/init.h>
-#include <linux/if_bridge.h>
-
-#ifdef CONFIG_NET_DIVERT
-#include <linux/divert.h>
-#endif /* CONFIG_NET_DIVERT */
 
 #ifdef CONFIG_INET
 #include <net/inet_common.h>
 #endif
 
-#ifdef CONFIG_DLCI
-extern int dlci_ioctl(unsigned int, void*);
-#endif
-
 #define CONFIG_SOCK_PACKET	1
 
 /*
@@ -1491,28 +1482,6 @@
 		case SIOCSIFHWBROADCAST:
 			return(dev_ioctl(cmd,(void *) arg));
 
-		case SIOCGIFBR:
-		case SIOCSIFBR:
-#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
-#ifdef CONFIG_INET
-#ifdef CONFIG_KMOD
-			if (br_ioctl_hook == NULL)
-				request_module("bridge");
-#endif
-			if (br_ioctl_hook != NULL)
-				return br_ioctl_hook(arg);
-#endif
-#endif				
-			return -ENOPKG;
-
-		case SIOCGIFDIVERT:
-		case SIOCSIFDIVERT:
-#ifdef CONFIG_NET_DIVERT
-			return divert_ioctl(cmd, (struct divert_cf *) arg);
-#else
-			return -ENOPKG;
-#endif /* CONFIG_NET_DIVERT */
-			
 #ifdef CONFIG_INET
 		case SIOCADDRT:
 		case SIOCDELRT:
@@ -1528,8 +1497,6 @@
 		case SIOCGIFDSTADDR:
 		case SIOCSIFDSTADDR:
 		case SIOCSIFFLAGS:
-		case SIOCADDDLCI:
-		case SIOCDELDLCI:
 			return inet_dgram_ops.ioctl(sock, cmd, arg);
 #endif
 
diff -Nru a/net/rose/Makefile b/net/rose/Makefile
--- a/net/rose/Makefile	Wed Oct 30 16:44:32 2002
+++ b/net/rose/Makefile	Wed Oct 30 16:44:32 2002
@@ -7,7 +7,6 @@
 rose-y	  := af_rose.o rose_dev.o rose_in.o rose_link.o rose_loopback.o \
 	     rose_out.o rose_route.o rose_subr.o rose_timer.o
 rose-$(CONFIG_SYSCTL) += sysctl_net_rose.o
-rose-objs := $(rose-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/net/sched/Config.help b/net/sched/Config.help
--- a/net/sched/Config.help	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,252 +0,0 @@
-CONFIG_NET_SCH_CBQ
-  Say Y here if you want to use the Class-Based Queueing (CBQ) packet
-  scheduling algorithm for some of your network devices.  This
-  algorithm classifies the waiting packets into a tree-like hierarchy
-  of classes; the leaves of this tree are in turn scheduled by
-  separate algorithms (called "disciplines" in this context).
-
-  See the top of <file:net/sched/sch_cbq.c> for references about the
-  CBQ algorithm.
-
-  CBQ is a commonly used scheduler, so if you're unsure, you should
-  say Y here. Then say Y to all the queueing algorithms below that you
-  want to use as CBQ disciplines.  Then say Y to "Packet classifier
-  API" and say Y to all the classifiers you want to use; a classifier
-  is a routine that allows you to sort your outgoing traffic into
-  classes based on a certain criterion.
-
-  This code is also available as a module called sch_cbq.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_HTB
-  Say Y here if you want to use the Hierarchical Token Buckets (HTB)
-  packet scheduling algorithm for some of your network devices. See
-  URL http://luxik.cdi.cz/~devik/qos/htb/ for complete manual and
-  in-depth articles.
-
-  HTB is very similar to the CBQ regarding its goals however is has 
-  different properties and different algorithm.
-
-  This code is also available as a module called sch_htb.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_CSZ
-  Say Y here if you want to use the Clark-Shenker-Zhang (CSZ) packet
-  scheduling algorithm for some of your network devices.  At the
-  moment, this is the only algorithm that can guarantee service for
-  real-time applications (see the top of <file:net/sched/sch_csz.c>
-  for details and references about the algorithm).
-
-  Note: this scheduler is currently broken.
-
-  This code is also available as a module called sch_csz.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_ATM
-  Say Y here if you want to use the ATM pseudo-scheduler.  This
-  provides a framework for invoking classifiers (aka "filters"), which
-  in turn select classes of this queuing discipline.  Each class maps
-  the flow(s) it is handling to a given virtual circuit (see the top of
-  <file:net/sched/sch_atm.c>).
-
-  This code is also available as a module called sch_atm.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_PRIO
-  Say Y here if you want to use an n-band priority queue packet
-  "scheduler" for some of your network devices or as a leaf discipline
-  for the CBQ scheduling algorithm. If unsure, say Y.
-
-  This code is also available as a module called sch_prio.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_DSMARK
-  Say Y if you want to schedule packets avccording to the
-  Differentiated Services architecture proposed in RFC 2475.
-  Technical information on this method, with pointers to associated
-  RFCs, is available at <http://www.gta.ufrj.br/diffserv/>.
-
-  This code is also available as a module called sch_dsmark.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_GRED
-  Say Y here if you want to use the Generic Random Early Detection
-  (RED) packet scheduling algorithm for some of your network devices
-  (see the top of <file:net/sched/sch_red.c> for details and
-  references about the algorithm).
-
-  This code is also available as a module called sch_gred.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_RED
-  Say Y here if you want to use the Random Early Detection (RED)
-  packet scheduling algorithm for some of your network devices (see
-  the top of <file:net/sched/sch_red.c> for details and references
-  about the algorithm).
-
-  This code is also available as a module called sch_red.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_SFQ
-  Say Y here if you want to use the Stochastic Fairness Queueing (SFQ)
-  packet scheduling algorithm for some of your network devices or as a
-  leaf discipline for the CBQ scheduling algorithm (see the top of
-  <file:net/sched/sch_sfq.c> for details and references about the SFQ
-  algorithm).
-
-  This code is also available as a module called sch_sfq.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_TEQL
-  Say Y here if you want to use the True Link Equalizer (TLE) packet
-  scheduling algorithm for some of your network devices or as a leaf
-  discipline for the CBQ scheduling algorithm. This queueing
-  discipline allows the combination of several physical devices into
-  one virtual device. (see the top of <file:net/sched/sch_teql.c> for
-  details).
-
-  This code is also available as a module called sch_teql.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_TBF
-  Say Y here if you want to use the Simple Token Bucket Filter (TBF)
-  packet scheduling algorithm for some of your network devices or as a
-  leaf discipline for the CBQ scheduling algorithm (see the top of
-  <file:net/sched/sch_tbf.c> for a description of the TBF algorithm).
-
-  This code is also available as a module called sch_tbf.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_SCH_INGRESS
-  If you say Y here, you will be able to police incoming bandwidth
-  and drop packets when this bandwidth exceeds your desired rate.
-  If unsure, say Y.
-
-  This code is also available as a module called cls_ingress.o
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want).  If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_QOS
-  Say Y here if you want to include Quality Of Service scheduling
-  features, which means that you will be able to request certain
-  rate-of-flow limits for your network devices.
-
-  This Quality of Service (QoS) support will enable you to use
-  Differentiated Services (diffserv) and Resource Reservation Protocol
-  (RSVP) on your Linux router if you also say Y to "Packet classifier
-  API" and to some classifiers below. Documentation and software is at
-  <http://icawww1.epfl.ch/linux-diffserv/>.
-
-  Note that the answer to this question won't directly affect the
-  kernel: saying N will just cause the configurator to skip all
-  the questions about QoS support.
-
-CONFIG_NET_ESTIMATOR
-  In order for Quality of Service scheduling to work, the current
-  rate-of-flow for a network device has to be estimated; if you say Y
-  here, the kernel will do just that.
-
-CONFIG_NET_CLS
-  The CBQ scheduling algorithm requires that network packets which are
-  scheduled to be sent out over a network device be classified
-  according to some criterion. If you say Y here, you will get a
-  choice of several different packet classifiers with the following
-  questions.
-
-  This will enable you to use Differentiated Services (diffserv) and
-  Resource Reservation Protocol (RSVP) on your Linux router.
-  Documentation and software is at
-  <http://icawww1.epfl.ch/linux-diffserv/>.
-
-CONFIG_NET_CLS_POLICE
-  Say Y to support traffic policing (bandwidth limits).  Needed for
-  ingress and egress rate limiting.
-
-CONFIG_NET_CLS_TCINDEX
-  If you say Y here, you will be able to classify outgoing packets
-  according to the tc_index field of the skb. You will want this
-  feature if you want to implement Differentiated Services using
-  sch_dsmark. If unsure, say Y.
-
-  This code is also available as a module called cls_tcindex.o
-  ( = code which can be inserted in and removed from the running
-  kernel whenever you want). If you want to compile it as a module,
-  say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_CLS_ROUTE4
-  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.
-
-  This code is also available as a module called cls_route.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_CLS_FW
-  If you say Y here, you will be able to classify outgoing packets
-  according to firewall criteria you specified.
-
-  This code is also available as a module called cls_fw.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_CLS_U32
-  If you say Y here, you will be able to classify outgoing packets
-  according to their destination address. If unsure, say Y.
-
-  This code is also available as a module called cls_u32.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_CLS_RSVP
-  The Resource Reservation Protocol (RSVP) permits end systems to
-  request a minimum and maximum data flow rate for a connection; this
-  is important for real time data such as streaming sound or video.
-
-  Say Y here if you want to be able to classify outgoing packets based
-  on their RSVP requests.
-
-  This code is also available as a module called cls_rsvp.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
-CONFIG_NET_CLS_RSVP6
-  The Resource Reservation Protocol (RSVP) permits end systems to
-  request a minimum and maximum data flow rate for a connection; this
-  is important for real time data such as streaming sound or video.
-
-  Say Y here if you want to be able to classify outgoing packets based
-  on their RSVP requests and you are using the new Internet Protocol
-  IPv6 as opposed to the older and more common IPv4.
-
-  This code is also available as a module called cls_rsvp6.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want).  If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
diff -Nru a/net/sched/Config.in b/net/sched/Config.in
--- a/net/sched/Config.in	Wed Oct 30 16:44:17 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,41 +0,0 @@
-#
-# Traffic control configuration.
-# 
-tristate '  CBQ packet scheduler' CONFIG_NET_SCH_CBQ
-tristate '  HTB packet scheduler' CONFIG_NET_SCH_HTB
-tristate '  CSZ packet scheduler' CONFIG_NET_SCH_CSZ
-#tristate '  H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ
-#tristate '  H-FSC packet scheduler' CONFIG_NET_SCH_HFCS
-if [ "$CONFIG_ATM" = "y" ]; then
-   bool '  ATM pseudo-scheduler' CONFIG_NET_SCH_ATM
-fi
-tristate '  The simplest PRIO pseudoscheduler' CONFIG_NET_SCH_PRIO
-tristate '  RED queue' CONFIG_NET_SCH_RED
-tristate '  SFQ queue' CONFIG_NET_SCH_SFQ
-tristate '  TEQL queue' CONFIG_NET_SCH_TEQL
-tristate '  TBF queue' CONFIG_NET_SCH_TBF
-tristate '  GRED queue' CONFIG_NET_SCH_GRED
-tristate '  Diffserv field marker' CONFIG_NET_SCH_DSMARK
-if [ "$CONFIG_NETFILTER" = "y" ]; then
-   tristate '  Ingress Qdisc' CONFIG_NET_SCH_INGRESS
-fi
-bool '  QoS support' CONFIG_NET_QOS
-if [ "$CONFIG_NET_QOS" = "y" ]; then
-   bool '    Rate estimator' CONFIG_NET_ESTIMATOR
-fi
-bool '  Packet classifier API' CONFIG_NET_CLS
-if [ "$CONFIG_NET_CLS" = "y" ]; then
-   tristate '    TC index classifier' CONFIG_NET_CLS_TCINDEX
-   tristate '    Routing table based classifier' CONFIG_NET_CLS_ROUTE4
-   if [ "$CONFIG_NET_CLS_ROUTE4" != "n" ]; then
-      define_bool CONFIG_NET_CLS_ROUTE y
-   fi
-   tristate '    Firewall based classifier' CONFIG_NET_CLS_FW
-   tristate '    U32 classifier' CONFIG_NET_CLS_U32
-   if [ "$CONFIG_NET_QOS" = "y" ]; then
-      tristate '    Special RSVP classifier' CONFIG_NET_CLS_RSVP
-      tristate '    Special RSVP classifier for IPv6' CONFIG_NET_CLS_RSVP6
-      bool '    Traffic policing (needed for in/egress)' CONFIG_NET_CLS_POLICE
-   fi
-fi
-
diff -Nru a/net/sched/Kconfig b/net/sched/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/sched/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,328 @@
+#
+# Traffic control configuration.
+# 
+config NET_SCH_CBQ
+	tristate "CBQ packet scheduler"
+	depends on NET_SCHED
+	---help---
+	  Say Y here if you want to use the Class-Based Queueing (CBQ) packet
+	  scheduling algorithm for some of your network devices.  This
+	  algorithm classifies the waiting packets into a tree-like hierarchy
+	  of classes; the leaves of this tree are in turn scheduled by
+	  separate algorithms (called "disciplines" in this context).
+
+	  See the top of <file:net/sched/sch_cbq.c> for references about the
+	  CBQ algorithm.
+
+	  CBQ is a commonly used scheduler, so if you're unsure, you should
+	  say Y here. Then say Y to all the queueing algorithms below that you
+	  want to use as CBQ disciplines.  Then say Y to "Packet classifier
+	  API" and say Y to all the classifiers you want to use; a classifier
+	  is a routine that allows you to sort your outgoing traffic into
+	  classes based on a certain criterion.
+
+	  This code is also available as a module called sch_cbq.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_HTB
+	tristate "HTB packet scheduler"
+	depends on NET_SCHED
+	---help---
+	  Say Y here if you want to use the Hierarchical Token Buckets (HTB)
+	  packet scheduling algorithm for some of your network devices. See
+	  URL http://luxik.cdi.cz/~devik/qos/htb/ for complete manual and
+	  in-depth articles.
+
+	  HTB is very similar to the CBQ regarding its goals however is has 
+	  different properties and different algorithm.
+
+	  This code is also available as a module called sch_htb.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_CSZ
+	tristate "CSZ packet scheduler"
+	depends on NET_SCHED
+	---help---
+	  Say Y here if you want to use the Clark-Shenker-Zhang (CSZ) packet
+	  scheduling algorithm for some of your network devices.  At the
+	  moment, this is the only algorithm that can guarantee service for
+	  real-time applications (see the top of <file:net/sched/sch_csz.c>
+	  for details and references about the algorithm).
+
+	  Note: this scheduler is currently broken.
+
+	  This code is also available as a module called sch_csz.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+#tristate '  H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ
+#tristate '  H-FSC packet scheduler' CONFIG_NET_SCH_HFCS
+config NET_SCH_ATM
+	bool "ATM pseudo-scheduler"
+	depends on NET_SCHED && ATM
+	---help---
+	  Say Y here if you want to use the ATM pseudo-scheduler.  This
+	  provides a framework for invoking classifiers (aka "filters"), which
+	  in turn select classes of this queuing discipline.  Each class maps
+	  the flow(s) it is handling to a given virtual circuit (see the top of
+	  <file:net/sched/sch_atm.c>).
+
+	  This code is also available as a module called sch_atm.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_PRIO
+	tristate "The simplest PRIO pseudoscheduler"
+	depends on NET_SCHED
+	help
+	  Say Y here if you want to use an n-band priority queue packet
+	  "scheduler" for some of your network devices or as a leaf discipline
+	  for the CBQ scheduling algorithm. If unsure, say Y.
+
+	  This code is also available as a module called sch_prio.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_RED
+	tristate "RED queue"
+	depends on NET_SCHED
+	help
+	  Say Y here if you want to use the Random Early Detection (RED)
+	  packet scheduling algorithm for some of your network devices (see
+	  the top of <file:net/sched/sch_red.c> for details and references
+	  about the algorithm).
+
+	  This code is also available as a module called sch_red.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_SFQ
+	tristate "SFQ queue"
+	depends on NET_SCHED
+	---help---
+	  Say Y here if you want to use the Stochastic Fairness Queueing (SFQ)
+	  packet scheduling algorithm for some of your network devices or as a
+	  leaf discipline for the CBQ scheduling algorithm (see the top of
+	  <file:net/sched/sch_sfq.c> for details and references about the SFQ
+	  algorithm).
+
+	  This code is also available as a module called sch_sfq.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_TEQL
+	tristate "TEQL queue"
+	depends on NET_SCHED
+	---help---
+	  Say Y here if you want to use the True Link Equalizer (TLE) packet
+	  scheduling algorithm for some of your network devices or as a leaf
+	  discipline for the CBQ scheduling algorithm. This queueing
+	  discipline allows the combination of several physical devices into
+	  one virtual device. (see the top of <file:net/sched/sch_teql.c> for
+	  details).
+
+	  This code is also available as a module called sch_teql.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_TBF
+	tristate "TBF queue"
+	depends on NET_SCHED
+	help
+	  Say Y here if you want to use the Simple Token Bucket Filter (TBF)
+	  packet scheduling algorithm for some of your network devices or as a
+	  leaf discipline for the CBQ scheduling algorithm (see the top of
+	  <file:net/sched/sch_tbf.c> for a description of the TBF algorithm).
+
+	  This code is also available as a module called sch_tbf.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_GRED
+	tristate "GRED queue"
+	depends on NET_SCHED
+	help
+	  Say Y here if you want to use the Generic Random Early Detection
+	  (RED) packet scheduling algorithm for some of your network devices
+	  (see the top of <file:net/sched/sch_red.c> for details and
+	  references about the algorithm).
+
+	  This code is also available as a module called sch_gred.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_DSMARK
+	tristate "Diffserv field marker"
+	depends on NET_SCHED
+	help
+	  Say Y if you want to schedule packets avccording to the
+	  Differentiated Services architecture proposed in RFC 2475.
+	  Technical information on this method, with pointers to associated
+	  RFCs, is available at <http://www.gta.ufrj.br/diffserv/>.
+
+	  This code is also available as a module called sch_dsmark.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_SCH_INGRESS
+	tristate "Ingress Qdisc"
+	depends on NET_SCHED && NETFILTER
+	help
+	  If you say Y here, you will be able to police incoming bandwidth
+	  and drop packets when this bandwidth exceeds your desired rate.
+	  If unsure, say Y.
+
+	  This code is also available as a module called cls_ingress.o
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want).  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+config NET_QOS
+	bool "QoS support"
+	depends on NET_SCHED
+	---help---
+	  Say Y here if you want to include Quality Of Service scheduling
+	  features, which means that you will be able to request certain
+	  rate-of-flow limits for your network devices.
+
+	  This Quality of Service (QoS) support will enable you to use
+	  Differentiated Services (diffserv) and Resource Reservation Protocol
+	  (RSVP) on your Linux router if you also say Y to "Packet classifier
+	  API" and to some classifiers below. Documentation and software is at
+	  <http://icawww1.epfl.ch/linux-diffserv/>.
+
+	  Note that the answer to this question won't directly affect the
+	  kernel: saying N will just cause the configurator to skip all
+	  the questions about QoS support.
+
+config NET_ESTIMATOR
+	bool "Rate estimator"
+	depends on NET_QOS
+	help
+	  In order for Quality of Service scheduling to work, the current
+	  rate-of-flow for a network device has to be estimated; if you say Y
+	  here, the kernel will do just that.
+
+config NET_CLS
+	bool "Packet classifier API"
+	depends on NET_SCHED
+	---help---
+	  The CBQ scheduling algorithm requires that network packets which are
+	  scheduled to be sent out over a network device be classified
+	  according to some criterion. If you say Y here, you will get a
+	  choice of several different packet classifiers with the following
+	  questions.
+
+	  This will enable you to use Differentiated Services (diffserv) and
+	  Resource Reservation Protocol (RSVP) on your Linux router.
+	  Documentation and software is at
+	  <http://icawww1.epfl.ch/linux-diffserv/>.
+
+config NET_CLS_TCINDEX
+	tristate "TC index classifier"
+	depends on NET_CLS
+	help
+	  If you say Y here, you will be able to classify outgoing packets
+	  according to the tc_index field of the skb. You will want this
+	  feature if you want to implement Differentiated Services using
+	  sch_dsmark. If unsure, say Y.
+
+	  This code is also available as a module called cls_tcindex.o
+	  ( = code which can be inserted in and removed from the running
+	  kernel whenever you want). If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+config NET_CLS_ROUTE4
+	tristate "Routing table based classifier"
+	depends on NET_CLS
+	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.
+
+	  This code is also available as a module called cls_route.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_CLS_ROUTE
+	bool
+	depends on NET_CLS_ROUTE4
+	default y
+
+config NET_CLS_FW
+	tristate "Firewall based classifier"
+	depends on NET_CLS
+	help
+	  If you say Y here, you will be able to classify outgoing packets
+	  according to firewall criteria you specified.
+
+	  This code is also available as a module called cls_fw.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_CLS_U32
+	tristate "U32 classifier"
+	depends on NET_CLS
+	help
+	  If you say Y here, you will be able to classify outgoing packets
+	  according to their destination address. If unsure, say Y.
+
+	  This code is also available as a module called cls_u32.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_CLS_RSVP
+	tristate "Special RSVP classifier"
+	depends on NET_CLS && NET_QOS
+	---help---
+	  The Resource Reservation Protocol (RSVP) permits end systems to
+	  request a minimum and maximum data flow rate for a connection; this
+	  is important for real time data such as streaming sound or video.
+
+	  Say Y here if you want to be able to classify outgoing packets based
+	  on their RSVP requests.
+
+	  This code is also available as a module called cls_rsvp.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_CLS_RSVP6
+	tristate "Special RSVP classifier for IPv6"
+	depends on NET_CLS && NET_QOS
+	---help---
+	  The Resource Reservation Protocol (RSVP) permits end systems to
+	  request a minimum and maximum data flow rate for a connection; this
+	  is important for real time data such as streaming sound or video.
+
+	  Say Y here if you want to be able to classify outgoing packets based
+	  on their RSVP requests and you are using the new Internet Protocol
+	  IPv6 as opposed to the older and more common IPv4.
+
+	  This code is also available as a module called cls_rsvp6.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want).  If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config NET_CLS_POLICE
+	bool "Traffic policing (needed for in/egress)"
+	depends on NET_CLS && NET_QOS
+	help
+	  Say Y to support traffic policing (bandwidth limits).  Needed for
+	  ingress and egress rate limiting.
+
diff -Nru a/net/sctp/Config.help b/net/sctp/Config.help
--- a/net/sctp/Config.help	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,49 +0,0 @@
-CONFIG_IP_SCTP 
-  Stream Control Transmission Protocol
-
-  From RFC 2960 (http://www.ietf.org/rfc/rfc2960.txt)
-   
-  "SCTP is a reliable transport protocol operating on top of a
-   connectionless packet network such as IP.  It offers the following
-   services to its users:
-
-   -- acknowledged error-free non-duplicated transfer of user data,
-   -- data fragmentation to conform to discovered path MTU size,
-   -- sequenced delivery of user messages within multiple streams,
-      with an option for order-of-arrival delivery of individual user
-      messages,
-   -- optional bundling of multiple user messages into a single SCTP
-      packet, and
-   -- network-level fault tolerance through supporting of multi-
-      homing at either or both ends of an association."
-
-  This protocol support 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 sctp.o. If you want to compile it
-  as a module, say M here and read <file:Documentation/modules.txt>.
-
-  If in doubt, say N.
-
-CONFIG_SCTP_ADLER32
-  RCF2960 currently specifies the Adler-32 checksum algorithm for SCTP.  
-  This has been deprecated and replaced by an algorithm now referred
-  to as crc32c.
-
-  If you say Y, this will use the Adler-32 algorithm, this might be useful
-  for interoperation with downlevel peers. 
-
-  If unsure, say N.  
-
-CONFIG_SCTP_DBG_MSG
-  If you say Y, this will enable verbose debugging messages. 
-
-  If unsure, say N.  However, if you are running into problems, use this
-  option to gather detailed trace information
-
-CONFIG_SCTP_DBG_OBJCNT
-  If you say Y, this will enable debugging support for counting the types
-  of objects that are currently allocated.  This is useful for identifying
-  memory leaks.   If the /proc filesystem is enabled this debug information
-  can be viewed by 'cat /proc/net/sctp/sctp_dbg_objcnt'
-
-  If unsure, say N
diff -Nru a/net/sctp/Config.in b/net/sctp/Config.in
--- a/net/sctp/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,20 +0,0 @@
-#
-# SCTP configuration
-#
-mainmenu_option next_comment
-comment '   SCTP Configuration (EXPERIMENTAL)'
-
-if [ "$CONFIG_IPV6" != "n" ]; then
-   define_bool CONFIG_IPV6_SCTP__ $CONFIG_IPV6
-else
-   define_bool CONFIG_IPV6_SCTP__ y
-fi
-
-dep_tristate '  The SCTP Protocol (EXPERIMENTAL)' CONFIG_IP_SCTP $CONFIG_IPV6_SCTP__
-if [ "$CONFIG_IP_SCTP" != "n" ]; then
-   bool '    SCTP: Use old checksum (Adler-32)' CONFIG_SCTP_ADLER32
-   bool '    SCTP: Debug messages' CONFIG_SCTP_DBG_MSG
-   bool '    SCTP: Debug object counts' CONFIG_SCTP_DBG_OBJCNT
-fi
-
-endmenu
diff -Nru a/net/sctp/Kconfig b/net/sctp/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/net/sctp/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,76 @@
+#
+# SCTP configuration
+#
+
+menu "SCTP Configuration (EXPERIMENTAL)"
+	depends on INET && EXPERIMENTAL
+
+config IPV6_SCTP__
+	bool
+	default y if IPV6=n
+	default IPV6 if IPV6
+
+config IP_SCTP
+	tristate "The SCTP Protocol (EXPERIMENTAL)"
+	depends on IPV6_SCTP__
+	---help---
+	  Stream Control Transmission Protocol
+
+	  From RFC 2960 (http://www.ietf.org/rfc/rfc2960.txt)
+
+	  "SCTP is a reliable transport protocol operating on top of a
+	  connectionless packet network such as IP.  It offers the following
+	  services to its users:
+
+	  -- acknowledged error-free non-duplicated transfer of user data,
+	  -- data fragmentation to conform to discovered path MTU size,
+	  -- sequenced delivery of user messages within multiple streams,
+	  with an option for order-of-arrival delivery of individual user
+	  messages,
+	  -- optional bundling of multiple user messages into a single SCTP
+	  packet, and
+	  -- network-level fault tolerance through supporting of multi-
+	  homing at either or both ends of an association."
+
+	  This protocol support 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 sctp.o. If you want to compile it
+	  as a module, say M here and read <file:Documentation/modules.txt>.
+
+	  If in doubt, say N.
+
+config SCTP_ADLER32
+	bool "SCTP: Use old checksum (Adler-32)"
+	depends on IP_SCTP
+	help
+	  RCF2960 currently specifies the Adler-32 checksum algorithm for SCTP.  
+	  This has been deprecated and replaced by an algorithm now referred
+	  to as crc32c.
+
+	  If you say Y, this will use the Adler-32 algorithm, this might be useful
+	  for interoperation with downlevel peers. 
+
+	  If unsure, say N.  
+
+config SCTP_DBG_MSG
+	bool "SCTP: Debug messages"
+	depends on IP_SCTP
+	help
+	  If you say Y, this will enable verbose debugging messages. 
+
+	  If unsure, say N.  However, if you are running into problems, use this
+	  option to gather detailed trace information
+
+config SCTP_DBG_OBJCNT
+	bool "SCTP: Debug object counts"
+	depends on IP_SCTP
+	help
+	  If you say Y, this will enable debugging support for counting the types
+	  of objects that are currently allocated.  This is useful for identifying
+	  memory leaks.   If the /proc filesystem is enabled this debug information
+	  can be viewed by 'cat /proc/net/sctp/sctp_dbg_objcnt'
+
+	  If unsure, say N
+
+endmenu
+
diff -Nru a/net/sctp/Makefile b/net/sctp/Makefile
--- a/net/sctp/Makefile	Wed Oct 30 16:44:36 2002
+++ b/net/sctp/Makefile	Wed Oct 30 16:44:36 2002
@@ -23,6 +23,4 @@
 
 sctp-$(subst m,y,$(CONFIG_IPV6))	+= ipv6.o
 
-sctp-objs := $(sctp-y)
-
 include $(TOPDIR)/Rules.make
diff -Nru a/net/sctp/ipv6.c b/net/sctp/ipv6.c
--- a/net/sctp/ipv6.c	Wed Oct 30 16:44:29 2002
+++ b/net/sctp/ipv6.c	Wed Oct 30 16:44:29 2002
@@ -175,7 +175,7 @@
 
 	dst = ip6_route_output(NULL, &fl);
 	if (dst) {
-		dst_mtu = dst->pmtu;
+		dst_mtu = dst_pmtu(dst);
 		SCTP_DEBUG_PRINTK("sctp_v6_get_dst_mtu: "
 				  "ip6_route_output: dev:%s pmtu:%d\n",
 				  dst->dev->name, dst_mtu);
diff -Nru a/net/sctp/protocol.c b/net/sctp/protocol.c
--- a/net/sctp/protocol.c	Wed Oct 30 16:44:29 2002
+++ b/net/sctp/protocol.c	Wed Oct 30 16:44:29 2002
@@ -268,7 +268,7 @@
 				  " failed, returning %d as dst_mtu\n",
 				  dst_mtu);
 	} else {
-		dst_mtu = rt->u.dst.pmtu;
+		dst_mtu = dst_pmtu(&rt->u.dst);
 		SCTP_DEBUG_PRINTK("sctp_v4_get_dst_mtu: "
 				  "ip_route_output_key: dev:%s pmtu:%d\n",
 				  rt->u.dst.dev->name, dst_mtu);
diff -Nru a/net/socket.c b/net/socket.c
--- a/net/socket.c	Wed Oct 30 16:44:27 2002
+++ b/net/socket.c	Wed Oct 30 16:44:27 2002
@@ -74,6 +74,8 @@
 #include <linux/cache.h>
 #include <linux/module.h>
 #include <linux/highmem.h>
+#include <linux/wireless.h>
+#include <linux/divert.h>
 
 #if defined(CONFIG_KMOD) && defined(CONFIG_NET)
 #include <linux/kmod.h>
@@ -708,6 +710,15 @@
 				 file, vector, count, tot_len);
 }
 
+int (*br_ioctl_hook)(unsigned long arg);
+int (*vlan_ioctl_hook)(unsigned long arg);
+
+#ifdef CONFIG_DLCI
+extern int dlci_ioctl(unsigned int, void *);
+#else
+int (*dlci_ioctl_hook)(unsigned int, void *);
+#endif
+
 /*
  *	With an ioctl, arg may well be a user mode pointer, but we don't know
  *	what to do with it - that's up to the protocol still.
@@ -742,6 +753,56 @@
 		case FIOGETOWN:
 		case SIOCGPGRP:
 			err = put_user(sock->file->f_owner.pid, (int *)arg);
+			break;
+		case SIOCGIFBR:
+		case SIOCSIFBR:
+			err = -ENOPKG;
+#ifdef CONFIG_KMOD
+			if (!br_ioctl_hook)
+				request_module("bridge");
+#endif
+			if (br_ioctl_hook)
+				err = br_ioctl_hook(arg);
+			break;
+		case SIOCGIFVLAN:
+		case SIOCSIFVLAN:
+			err = -ENOPKG;
+#ifdef CONFIG_KMOD
+			if (!vlan_ioctl_hook)
+				request_module("8021q");
+#endif
+			if (vlan_ioctl_hook)
+				err = vlan_ioctl_hook(arg);
+			break;
+		case SIOCGIFDIVERT:
+		case SIOCSIFDIVERT:
+		/* Convert this to call through a hook */
+#ifdef CONFIG_NET_DIVERT
+			err = divert_ioctl(cmd, (struct divert_cf *)arg);
+#else
+			err = -ENOPKG;
+#endif	/* CONFIG_NET_DIVERT */
+			break;
+		case SIOCADDDLCI:
+		case SIOCDELDLCI:
+		/* Convert this to always call through a hook */
+#ifdef CONFIG_DLCI
+			lock_kernel();
+			err = dlci_ioctl(cmd, (void *)arg);
+			unlock_kernel();
+			break;
+#else
+			err = -ENOPKG;
+#ifdef CONFIG_KMOD
+			if (!dlci_ioctl_hook)
+				request_module("dlci");
+#endif
+			if (dlci_ioctl_hook) {
+				lock_kernel();
+				err = dlci_ioctl_hook(cmd, (void *)arg);
+				unlock_kernel();
+			}
+#endif
 			break;
 		default:
 			err = sock->ops->ioctl(sock, cmd, arg);
diff -Nru a/net/sunrpc/Makefile b/net/sunrpc/Makefile
--- a/net/sunrpc/Makefile	Wed Oct 30 16:44:19 2002
+++ b/net/sunrpc/Makefile	Wed Oct 30 16:44:19 2002
@@ -13,6 +13,5 @@
 	    sunrpc_syms.o cache.o
 sunrpc-$(CONFIG_PROC_FS) += stats.o
 sunrpc-$(CONFIG_SYSCTL) += sysctl.o
-sunrpc-objs := $(sunrpc-y)
 
 include $(TOPDIR)/Rules.make
diff -Nru a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
--- a/net/sunrpc/sunrpc_syms.c	Wed Oct 30 16:44:32 2002
+++ b/net/sunrpc/sunrpc_syms.c	Wed Oct 30 16:44:32 2002
@@ -101,6 +101,7 @@
 EXPORT_SYMBOL(cache_check);
 EXPORT_SYMBOL(cache_clean);
 EXPORT_SYMBOL(cache_flush);
+EXPORT_SYMBOL(cache_purge);
 EXPORT_SYMBOL(cache_fresh);
 EXPORT_SYMBOL(cache_init);
 EXPORT_SYMBOL(cache_register);
diff -Nru a/net/sunrpc/svc.c b/net/sunrpc/svc.c
--- a/net/sunrpc/svc.c	Wed Oct 30 16:44:33 2002
+++ b/net/sunrpc/svc.c	Wed Oct 30 16:44:33 2002
@@ -13,6 +13,7 @@
 #include <linux/net.h>
 #include <linux/in.h>
 #include <linux/unistd.h>
+#include <linux/mm.h>
 
 #include <linux/sunrpc/types.h>
 #include <linux/sunrpc/xdr.h>
@@ -35,7 +36,6 @@
 
 	if (!(serv = (struct svc_serv *) kmalloc(sizeof(*serv), GFP_KERNEL)))
 		return NULL;
-
 	memset(serv, 0, sizeof(*serv));
 	serv->sv_program   = prog;
 	serv->sv_nrthreads = 1;
@@ -105,35 +105,42 @@
 }
 
 /*
- * Allocate an RPC server buffer
- * Later versions may do nifty things by allocating multiple pages
- * of memory directly and putting them into the bufp->iov.
+ * Allocate an RPC server's buffer space.
+ * We allocate pages and place them in rq_argpages.
  */
-int
-svc_init_buffer(struct svc_buf *bufp, unsigned int size)
+static int
+svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
 {
-	if (!(bufp->area = (u32 *) kmalloc(size, GFP_KERNEL)))
-		return 0;
-	bufp->base   = bufp->area;
-	bufp->buf    = bufp->area;
-	bufp->len    = 0;
-	bufp->buflen = size >> 2;
-
-	bufp->iov[0].iov_base = bufp->area;
-	bufp->iov[0].iov_len  = size;
-	bufp->nriov = 1;
-
-	return 1;
+	int pages = 2 + (size+ PAGE_SIZE -1) / PAGE_SIZE;
+	int arghi;
+	
+	rqstp->rq_argused = 0;
+	rqstp->rq_resused = 0;
+	arghi = 0;
+	if (pages > RPCSVC_MAXPAGES)
+		BUG();
+	while (pages) {
+		struct page *p = alloc_page(GFP_KERNEL);
+		if (!p)
+			break;
+		rqstp->rq_argpages[arghi++] = p;
+		pages--;
+	}
+	rqstp->rq_arghi = arghi;
+	return ! pages;
 }
 
 /*
  * Release an RPC server buffer
  */
-void
-svc_release_buffer(struct svc_buf *bufp)
+static void
+svc_release_buffer(struct svc_rqst *rqstp)
 {
-	kfree(bufp->area);
-	bufp->area = 0;
+	while (rqstp->rq_arghi)
+		put_page(rqstp->rq_argpages[--rqstp->rq_arghi]);
+	while (rqstp->rq_resused)
+		put_page(rqstp->rq_respages[--rqstp->rq_resused]);
+	rqstp->rq_argused = 0;
 }
 
 /*
@@ -154,7 +161,7 @@
 
 	if (!(rqstp->rq_argp = (u32 *) kmalloc(serv->sv_xdrsize, GFP_KERNEL))
 	 || !(rqstp->rq_resp = (u32 *) kmalloc(serv->sv_xdrsize, GFP_KERNEL))
-	 || !svc_init_buffer(&rqstp->rq_defbuf, serv->sv_bufsz))
+	 || !svc_init_buffer(rqstp, serv->sv_bufsz))
 		goto out_thread;
 
 	serv->sv_nrthreads++;
@@ -180,7 +187,7 @@
 {
 	struct svc_serv	*serv = rqstp->rq_server;
 
-	svc_release_buffer(&rqstp->rq_defbuf);
+	svc_release_buffer(rqstp);
 	if (rqstp->rq_resp)
 		kfree(rqstp->rq_resp);
 	if (rqstp->rq_argp)
@@ -242,37 +249,51 @@
 	struct svc_program	*progp;
 	struct svc_version	*versp = NULL;	/* compiler food */
 	struct svc_procedure	*procp = NULL;
-	struct svc_buf *	argp = &rqstp->rq_argbuf;
-	struct svc_buf *	resp = &rqstp->rq_resbuf;
+	struct iovec *		argv = &rqstp->rq_arg.head[0];
+	struct iovec *		resv = &rqstp->rq_res.head[0];
 	kxdrproc_t		xdr;
-	u32			*bufp, *statp;
+	u32			*statp;
 	u32			dir, prog, vers, proc,
 				auth_stat, rpc_stat;
 
 	rpc_stat = rpc_success;
-	bufp = argp->buf;
 
-	if (argp->len < 5)
+	if (argv->iov_len < 6*4)
 		goto err_short_len;
 
-	dir  = ntohl(*bufp++);
-	vers = ntohl(*bufp++);
+	/* setup response xdr_buf.
+	 * Initially it has just one page 
+	 */
+	take_page(rqstp); /* must succeed */
+	resv->iov_base = page_address(rqstp->rq_respages[0]);
+	resv->iov_len = 0;
+	rqstp->rq_res.pages = rqstp->rq_respages+1;
+	rqstp->rq_res.len = 0;
+	rqstp->rq_res.page_base = 0;
+	rqstp->rq_res.page_len = 0;
+	/* tcp needs a space for the record length... */
+	if (rqstp->rq_prot == IPPROTO_TCP)
+		svc_putu32(resv, 0);
+
+	rqstp->rq_xid = svc_getu32(argv);
+	svc_putu32(resv, rqstp->rq_xid);
+
+	dir  = ntohl(svc_getu32(argv));
+	vers = ntohl(svc_getu32(argv));
 
 	/* First words of reply: */
-	svc_putu32(resp, xdr_one);		/* REPLY */
-	svc_putu32(resp, xdr_zero);		/* ACCEPT */
+	svc_putu32(resv, xdr_one);		/* REPLY */
 
 	if (dir != 0)		/* direction != CALL */
 		goto err_bad_dir;
 	if (vers != 2)		/* RPC version number */
 		goto err_bad_rpc;
 
-	rqstp->rq_prog = prog = ntohl(*bufp++);	/* program number */
-	rqstp->rq_vers = vers = ntohl(*bufp++);	/* version number */
-	rqstp->rq_proc = proc = ntohl(*bufp++);	/* procedure number */
+	svc_putu32(resv, xdr_zero);		/* ACCEPT */
 
-	argp->buf += 5;
-	argp->len -= 5;
+	rqstp->rq_prog = prog = ntohl(svc_getu32(argv));	/* program number */
+	rqstp->rq_vers = vers = ntohl(svc_getu32(argv));	/* version number */
+	rqstp->rq_proc = proc = ntohl(svc_getu32(argv));	/* procedure number */
 
 	/*
 	 * Decode auth data, and add verifier to reply buffer.
@@ -307,8 +328,8 @@
 	serv->sv_stats->rpccnt++;
 
 	/* Build the reply header. */
-	statp = resp->buf;
-	svc_putu32(resp, rpc_success);		/* RPC_SUCCESS */
+	statp = resv->iov_base +resv->iov_len;
+	svc_putu32(resv, rpc_success);		/* RPC_SUCCESS */
 
 	/* Bump per-procedure stats counter */
 	procp->pc_count++;
@@ -327,14 +348,14 @@
 	if (!versp->vs_dispatch) {
 		/* Decode arguments */
 		xdr = procp->pc_decode;
-		if (xdr && !xdr(rqstp, rqstp->rq_argbuf.buf, rqstp->rq_argp))
+		if (xdr && !xdr(rqstp, argv->iov_base, rqstp->rq_argp))
 			goto err_garbage;
 
 		*statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
 
 		/* Encode reply */
 		if (*statp == rpc_success && (xdr = procp->pc_encode)
-		 && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) {
+		 && !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) {
 			dprintk("svc: failed to encode reply\n");
 			/* serv->sv_stats->rpcsystemerr++; */
 			*statp = rpc_system_err;
@@ -347,7 +368,7 @@
 
 	/* Check RPC status result */
 	if (*statp != rpc_success)
-		resp->len = statp + 1 - resp->base;
+		resv->iov_len = ((void*)statp)  - resv->iov_base + 4;
 
 	/* Release reply info */
 	if (procp->pc_release)
@@ -369,7 +390,7 @@
 
 err_short_len:
 #ifdef RPC_PARANOIA
-	printk("svc: short len %d, dropping request\n", argp->len);
+	printk("svc: short len %d, dropping request\n", argv->iov_len);
 #endif
 	goto dropit;			/* drop request */
 
@@ -382,18 +403,19 @@
 
 err_bad_rpc:
 	serv->sv_stats->rpcbadfmt++;
-	resp->buf[-1] = xdr_one;	/* REJECT */
-	svc_putu32(resp, xdr_zero);	/* RPC_MISMATCH */
-	svc_putu32(resp, xdr_two);	/* Only RPCv2 supported */
-	svc_putu32(resp, xdr_two);
+	svc_putu32(resv, xdr_one);	/* REJECT */
+	svc_putu32(resv, xdr_zero);	/* RPC_MISMATCH */
+	svc_putu32(resv, xdr_two);	/* Only RPCv2 supported */
+	svc_putu32(resv, xdr_two);
 	goto sendit;
 
 err_bad_auth:
 	dprintk("svc: authentication failed (%d)\n", ntohl(auth_stat));
 	serv->sv_stats->rpcbadauth++;
-	resp->buf[-1] = xdr_one;	/* REJECT */
-	svc_putu32(resp, xdr_one);	/* AUTH_ERROR */
-	svc_putu32(resp, auth_stat);	/* status */
+	resv->iov_len -= 4;
+	svc_putu32(resv, xdr_one);	/* REJECT */
+	svc_putu32(resv, xdr_one);	/* AUTH_ERROR */
+	svc_putu32(resv, auth_stat);	/* status */
 	goto sendit;
 
 err_bad_prog:
@@ -403,7 +425,7 @@
 	/* else it is just a Solaris client seeing if ACLs are supported */
 #endif
 	serv->sv_stats->rpcbadfmt++;
-	svc_putu32(resp, rpc_prog_unavail);
+	svc_putu32(resv, rpc_prog_unavail);
 	goto sendit;
 
 err_bad_vers:
@@ -411,9 +433,9 @@
 	printk("svc: unknown version (%d)\n", vers);
 #endif
 	serv->sv_stats->rpcbadfmt++;
-	svc_putu32(resp, rpc_prog_mismatch);
-	svc_putu32(resp, htonl(progp->pg_lovers));
-	svc_putu32(resp, htonl(progp->pg_hivers));
+	svc_putu32(resv, rpc_prog_mismatch);
+	svc_putu32(resv, htonl(progp->pg_lovers));
+	svc_putu32(resv, htonl(progp->pg_hivers));
 	goto sendit;
 
 err_bad_proc:
@@ -421,7 +443,7 @@
 	printk("svc: unknown procedure (%d)\n", proc);
 #endif
 	serv->sv_stats->rpcbadfmt++;
-	svc_putu32(resp, rpc_proc_unavail);
+	svc_putu32(resv, rpc_proc_unavail);
 	goto sendit;
 
 err_garbage:
@@ -429,6 +451,6 @@
 	printk("svc: failed to decode args\n");
 #endif
 	serv->sv_stats->rpcbadfmt++;
-	svc_putu32(resp, rpc_garbage_args);
+	svc_putu32(resv, rpc_garbage_args);
 	goto sendit;
 }
diff -Nru a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c
--- a/net/sunrpc/svcauth.c	Wed Oct 30 16:44:31 2002
+++ b/net/sunrpc/svcauth.c	Wed Oct 30 16:44:31 2002
@@ -40,8 +40,7 @@
 	*statp = rpc_success;
 	*authp = rpc_auth_ok;
 
-	svc_getu32(&rqstp->rq_argbuf, flavor);
-	flavor = ntohl(flavor);
+	flavor = ntohl(svc_getu32(&rqstp->rq_arg.head[0]));
 
 	dprintk("svc: svc_authenticate (%d)\n", flavor);
 	if (flavor >= RPC_AUTH_MAXFLAVOR || !(aops = authtab[flavor])) {
diff -Nru a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
--- a/net/sunrpc/svcauth_unix.c	Wed Oct 30 16:44:29 2002
+++ b/net/sunrpc/svcauth_unix.c	Wed Oct 30 16:44:29 2002
@@ -68,6 +68,14 @@
 	return rv;
 }
 
+static void svcauth_unix_domain_release(struct auth_domain *dom)
+{
+	struct unix_domain *ud = container_of(dom, struct unix_domain, h);
+
+	kfree(dom->name);
+	kfree(ud);
+}
+
 
 /**************************************************
  * cache for IP address to unix_domain
@@ -287,20 +295,20 @@
 static int
 svcauth_null_accept(struct svc_rqst *rqstp, u32 *authp, int proc)
 {
-	struct svc_buf	*argp = &rqstp->rq_argbuf;
-	struct svc_buf	*resp = &rqstp->rq_resbuf;
+	struct iovec	*argv = &rqstp->rq_arg.head[0];
+	struct iovec	*resv = &rqstp->rq_res.head[0];
 	int		rv=0;
 	struct ip_map key, *ipm;
 
-	if ((argp->len -= 3) < 0) {
+	if (argv->iov_len < 3*4)
 		return SVC_GARBAGE;
-	}
-	if (*(argp->buf)++ != 0) {	/* we already skipped the flavor */
+
+	if (svc_getu32(argv) != 0) { 
 		dprintk("svc: bad null cred\n");
 		*authp = rpc_autherr_badcred;
 		return SVC_DENIED;
 	}
-	if (*(argp->buf)++ != RPC_AUTH_NULL || *(argp->buf)++ != 0) {
+	if (svc_getu32(argv) != RPC_AUTH_NULL || svc_getu32(argv) != 0) {
 		dprintk("svc: bad null verf\n");
 		*authp = rpc_autherr_badverf;
 		return SVC_DENIED;
@@ -312,8 +320,8 @@
 	rqstp->rq_cred.cr_groups[0] = NOGROUP;
 
 	/* Put NULL verifier */
-	svc_putu32(resp, RPC_AUTH_NULL);
-	svc_putu32(resp, 0);
+	svc_putu32(resv, RPC_AUTH_NULL);
+	svc_putu32(resv, 0);
 
 	key.m_class = rqstp->rq_server->sv_program->pg_class;
 	key.m_addr = rqstp->rq_addr.sin_addr;
@@ -368,55 +376,54 @@
 int
 svcauth_unix_accept(struct svc_rqst *rqstp, u32 *authp, int proc)
 {
-	struct svc_buf	*argp = &rqstp->rq_argbuf;
-	struct svc_buf	*resp = &rqstp->rq_resbuf;
+	struct iovec	*argv = &rqstp->rq_arg.head[0];
+	struct iovec	*resv = &rqstp->rq_res.head[0];
 	struct svc_cred	*cred = &rqstp->rq_cred;
-	u32		*bufp = argp->buf, slen, i;
-	int		len   = argp->len;
+	u32		slen, i;
+	int		len   = argv->iov_len;
 	int		rv=0;
 	struct ip_map key, *ipm;
 
-	if ((len -= 3) < 0)
+	if ((len -= 3*4) < 0)
 		return SVC_GARBAGE;
 
-	bufp++;					/* length */
-	bufp++;					/* time stamp */
-	slen = XDR_QUADLEN(ntohl(*bufp++));	/* machname length */
-	if (slen > 64 || (len -= slen + 3) < 0)
+	svc_getu32(argv);			/* length */
+	svc_getu32(argv);			/* time stamp */
+	slen = XDR_QUADLEN(ntohl(svc_getu32(argv)));	/* machname length */
+	if (slen > 64 || (len -= (slen + 3)*4) < 0)
 		goto badcred;
-	bufp += slen;				/* skip machname */
-
-	cred->cr_uid = ntohl(*bufp++);		/* uid */
-	cred->cr_gid = ntohl(*bufp++);		/* gid */
+	argv->iov_base = (void*)((u32*)argv->iov_base + slen);	/* skip machname */
+	argv->iov_len -= slen*4;
 
-	slen = ntohl(*bufp++);			/* gids length */
-	if (slen > 16 || (len -= slen + 2) < 0)
+	cred->cr_uid = ntohl(svc_getu32(argv));		/* uid */
+	cred->cr_gid = ntohl(svc_getu32(argv));		/* gid */
+	slen = ntohl(svc_getu32(argv));			/* gids length */
+	if (slen > 16 || (len -= (slen + 2)*4) < 0)
 		goto badcred;
-	for (i = 0; i < NGROUPS && i < slen; i++)
-		cred->cr_groups[i] = ntohl(*bufp++);
+	for (i = 0; i < slen; i++)
+		if (i < NGROUPS)
+			cred->cr_groups[i] = ntohl(svc_getu32(argv));
+		else
+			svc_getu32(argv);
 	if (i < NGROUPS)
 		cred->cr_groups[i] = NOGROUP;
-	bufp += (slen - i);
 
-	if (*bufp++ != RPC_AUTH_NULL || *bufp++ != 0) {
+	if (svc_getu32(argv) != RPC_AUTH_NULL || svc_getu32(argv) != 0) {
 		*authp = rpc_autherr_badverf;
 		return SVC_DENIED;
 	}
 
-	argp->buf = bufp;
-	argp->len = len;
-
 	/* Put NULL verifier */
-	svc_putu32(resp, RPC_AUTH_NULL);
-	svc_putu32(resp, 0);
+	svc_putu32(resv, RPC_AUTH_NULL);
+	svc_putu32(resv, 0);
 
 	key.m_class = rqstp->rq_server->sv_program->pg_class;
 	key.m_addr = rqstp->rq_addr.sin_addr;
 
+
 	ipm = ip_map_lookup(&key, 0);
 
 	rqstp->rq_client = NULL;
-
 	if (ipm)
 		switch (cache_check(&ip_map_cache, &ipm->h, &rqstp->rq_chandle)) {
 		case -EAGAIN:
@@ -462,5 +469,6 @@
 	.flavour	= RPC_AUTH_UNIX,
 	.accept 	= svcauth_unix_accept,
 	.release	= svcauth_unix_release,
+	.domain_release	= svcauth_unix_domain_release,
 };
 
diff -Nru a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
--- a/net/sunrpc/svcsock.c	Wed Oct 30 16:44:21 2002
+++ b/net/sunrpc/svcsock.c	Wed Oct 30 16:44:21 2002
@@ -234,7 +234,7 @@
  */
 void svc_reserve(struct svc_rqst *rqstp, int space)
 {
-	space += rqstp->rq_resbuf.len<<2;
+	space += rqstp->rq_res.head[0].iov_len;
 
 	if (space < rqstp->rq_reserved) {
 		struct svc_sock *svsk = rqstp->rq_sock;
@@ -278,13 +278,12 @@
 	 * But first, check that enough space was reserved
 	 * for the reply, otherwise we have a bug!
 	 */
-	if ((rqstp->rq_resbuf.len<<2) >  rqstp->rq_reserved)
+	if ((rqstp->rq_res.len) >  rqstp->rq_reserved)
 		printk(KERN_ERR "RPC request reserved %d but used %d\n",
 		       rqstp->rq_reserved,
-		       rqstp->rq_resbuf.len<<2);
+		       rqstp->rq_res.len);
 
-	rqstp->rq_resbuf.buf = rqstp->rq_resbuf.base;
-	rqstp->rq_resbuf.len = 0;
+	rqstp->rq_res.head[0].iov_len = 0;
 	svc_reserve(rqstp, 0);
 	rqstp->rq_sock = NULL;
 
@@ -348,8 +347,9 @@
 	len = sock_sendmsg(sock, &msg, buflen);
 	set_fs(oldfs);
 
-	dprintk("svc: socket %p sendto([%p %Zu... ], %d, %d) = %d\n",
-			rqstp->rq_sock, iov[0].iov_base, iov[0].iov_len, nr, buflen, len);
+	dprintk("svc: socket %p sendto([%p %Zu... ], %d, %d) = %d (addr %x)\n",
+			rqstp->rq_sock, iov[0].iov_base, iov[0].iov_len, nr, buflen, len,
+		rqstp->rq_addr.sin_addr.s_addr);
 
 	return len;
 }
@@ -480,13 +480,15 @@
 /*
  * Receive a datagram from a UDP socket.
  */
+extern int
+csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb);
+
 static int
 svc_udp_recvfrom(struct svc_rqst *rqstp)
 {
 	struct svc_sock	*svsk = rqstp->rq_sock;
 	struct svc_serv	*serv = svsk->sk_server;
 	struct sk_buff	*skb;
-	u32		*data;
 	int		err, len;
 
 	if (test_and_clear_bit(SK_CHNGBUF, &svsk->sk_flags))
@@ -512,33 +514,19 @@
 	}
 	set_bit(SK_DATA, &svsk->sk_flags); /* there may be more data... */
 
-	/* Sorry. */
-	if (skb_is_nonlinear(skb)) {
-		if (skb_linearize(skb, GFP_KERNEL) != 0) {
-			kfree_skb(skb);
-			svc_sock_received(svsk);
-			return 0;
-		}
-	}
+	len  = skb->len - sizeof(struct udphdr);
 
-	if (skb->ip_summed != CHECKSUM_UNNECESSARY) {
-		if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
-			skb_free_datagram(svsk->sk_sk, skb);
-			svc_sock_received(svsk);
-			return 0;
-		}
+	if (csum_partial_copy_to_xdr(&rqstp->rq_arg, skb)) {
+		/* checksum error */
+		skb_free_datagram(svsk->sk_sk, skb);
+		svc_sock_received(svsk);
+		return 0;
 	}
 
 
-	len  = skb->len - sizeof(struct udphdr);
-	data = (u32 *) (skb->data + sizeof(struct udphdr));
-
-	rqstp->rq_skbuff      = skb;
-	rqstp->rq_argbuf.base = data;
-	rqstp->rq_argbuf.buf  = data;
-	rqstp->rq_argbuf.len  = (len >> 2);
-	rqstp->rq_argbuf.buflen = (len >> 2);
-	/* rqstp->rq_resbuf      = rqstp->rq_defbuf; */
+	rqstp->rq_arg.len = len;
+	rqstp->rq_arg.page_len = len - rqstp->rq_arg.head[0].iov_len;
+	rqstp->rq_argused += (rqstp->rq_arg.page_len + PAGE_SIZE - 1)/ PAGE_SIZE;
 	rqstp->rq_prot        = IPPROTO_UDP;
 
 	/* Get sender address */
@@ -546,6 +534,8 @@
 	rqstp->rq_addr.sin_port = skb->h.uh->source;
 	rqstp->rq_addr.sin_addr.s_addr = skb->nh.iph->saddr;
 
+	skb_free_datagram(svsk->sk_sk, skb);
+
 	if (serv->sv_stats)
 		serv->sv_stats->netudpcnt++;
 
@@ -559,21 +549,36 @@
 static int
 svc_udp_sendto(struct svc_rqst *rqstp)
 {
-	struct svc_buf	*bufp = &rqstp->rq_resbuf;
 	int		error;
+	struct iovec vec[RPCSVC_MAXPAGES];
+	int v;
+	int base, len;
 
 	/* Set up the first element of the reply iovec.
 	 * Any other iovecs that may be in use have been taken
 	 * care of by the server implementation itself.
 	 */
-	/* bufp->base = bufp->area; */
-	bufp->iov[0].iov_base = bufp->base;
-	bufp->iov[0].iov_len  = bufp->len << 2;
-
-	error = svc_sendto(rqstp, bufp->iov, bufp->nriov);
+	vec[0] = rqstp->rq_res.head[0];
+	v=1;
+	base=rqstp->rq_res.page_base;
+	len = rqstp->rq_res.page_len;
+	while (len) {
+		vec[v].iov_base = page_address(rqstp->rq_res.pages[v-1]) + base;
+		vec[v].iov_len = PAGE_SIZE-base;
+		if (len <= vec[v].iov_len)
+			vec[v].iov_len = len;
+		len -= vec[v].iov_len;
+		base = 0;
+		v++;
+	}
+	if (rqstp->rq_res.tail[0].iov_len) {
+		vec[v] = rqstp->rq_res.tail[0];
+		v++;
+	}
+	error = svc_sendto(rqstp, vec, v);
 	if (error == -ECONNREFUSED)
 		/* ICMP error on earlier request. */
-		error = svc_sendto(rqstp, bufp->iov, bufp->nriov);
+		error = svc_sendto(rqstp, vec, v);
 
 	return error;
 }
@@ -785,8 +790,9 @@
 {
 	struct svc_sock	*svsk = rqstp->rq_sock;
 	struct svc_serv	*serv = svsk->sk_server;
-	struct svc_buf	*bufp = &rqstp->rq_argbuf;
 	int		len;
+	struct iovec vec[RPCSVC_MAXPAGES];
+	int pnum, vlen;
 
 	dprintk("svc: tcp_recv %p data %d conn %d close %d\n",
 		svsk, test_bit(SK_DATA, &svsk->sk_flags),
@@ -851,7 +857,7 @@
 		}
 		svsk->sk_reclen &= 0x7fffffff;
 		dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen);
-		if (svsk->sk_reclen > (bufp->buflen<<2)) {
+		if (svsk->sk_reclen > serv->sv_bufsz) {
 			printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (large)\n",
 			       (unsigned long) svsk->sk_reclen);
 			goto err_delete;
@@ -869,30 +875,35 @@
 		svc_sock_received(svsk);
 		return -EAGAIN;	/* record not complete */
 	}
+	len = svsk->sk_reclen;
 	set_bit(SK_DATA, &svsk->sk_flags);
 
-	/* Frob argbuf */
-	bufp->iov[0].iov_base += 4;
-	bufp->iov[0].iov_len  -= 4;
+	vec[0] = rqstp->rq_arg.head[0];
+	vlen = PAGE_SIZE;
+	pnum = 1;
+	while (vlen < len) {
+		vec[pnum].iov_base = page_address(rqstp->rq_argpages[rqstp->rq_argused++]);
+		vec[pnum].iov_len = PAGE_SIZE;
+		pnum++;
+		vlen += PAGE_SIZE;
+	}
 
 	/* Now receive data */
-	len = svc_recvfrom(rqstp, bufp->iov, bufp->nriov, svsk->sk_reclen);
+	len = svc_recvfrom(rqstp, vec, pnum, len);
 	if (len < 0)
 		goto error;
 
 	dprintk("svc: TCP complete record (%d bytes)\n", len);
-
-	/* Position reply write pointer immediately args,
-	 * allowing for record length */
-	rqstp->rq_resbuf.base = rqstp->rq_argbuf.base + (len>>2);
-	rqstp->rq_resbuf.buf  = rqstp->rq_resbuf.base + 1;
-	rqstp->rq_resbuf.len  = 1;
-	rqstp->rq_resbuf.buflen= rqstp->rq_argbuf.buflen - (len>>2) - 1;
+	rqstp->rq_arg.len = len;
+	rqstp->rq_arg.page_base = 0;
+	if (len <= rqstp->rq_arg.head[0].iov_len) {
+		rqstp->rq_arg.head[0].iov_len = len;
+		rqstp->rq_arg.page_len = 0;
+	} else {
+		rqstp->rq_arg.page_len = len - rqstp->rq_arg.head[0].iov_len;
+	}
 
 	rqstp->rq_skbuff      = 0;
-	rqstp->rq_argbuf.buf += 1;
-	rqstp->rq_argbuf.len  = (len >> 2);
-	rqstp->rq_argbuf.buflen = (len >> 2);
 	rqstp->rq_prot	      = IPPROTO_TCP;
 
 	/* Reset TCP read info */
@@ -928,23 +939,44 @@
 static int
 svc_tcp_sendto(struct svc_rqst *rqstp)
 {
-	struct svc_buf	*bufp = &rqstp->rq_resbuf;
+	struct xdr_buf	*xbufp = &rqstp->rq_res;
+	struct iovec vec[RPCSVC_MAXPAGES];
+	int v;
+	int base, len;
 	int sent;
+	u32 reclen;
 
 	/* Set up the first element of the reply iovec.
 	 * Any other iovecs that may be in use have been taken
 	 * care of by the server implementation itself.
 	 */
-	bufp->iov[0].iov_base = bufp->base;
-	bufp->iov[0].iov_len  = bufp->len << 2;
-	bufp->base[0] = htonl(0x80000000|((bufp->len << 2) - 4));
+	reclen = htonl(0x80000000|((xbufp->len ) - 4));
+	memcpy(xbufp->head[0].iov_base, &reclen, 4);
 
-	sent = svc_sendto(rqstp, bufp->iov, bufp->nriov);
-	if (sent != bufp->len<<2) {
+	vec[0] = rqstp->rq_res.head[0];
+	v=1;
+	base= xbufp->page_base;
+	len = xbufp->page_len;
+	while (len) {
+		vec[v].iov_base = page_address(xbufp->pages[v-1]) + base;
+		vec[v].iov_len = PAGE_SIZE-base;
+		if (len <= vec[v].iov_len)
+			vec[v].iov_len = len;
+		len -= vec[v].iov_len;
+		base = 0;
+		v++;
+	}
+	if (xbufp->tail[0].iov_len) {
+		vec[v] = xbufp->tail[0];
+		v++;
+	}
+
+	sent = svc_sendto(rqstp, vec, v);
+	if (sent != xbufp->len) {
 		printk(KERN_NOTICE "rpc-srv/tcp: %s: %s %d when sending %d bytes - shutting down socket\n",
 		       rqstp->rq_sock->sk_server->sv_name,
 		       (sent<0)?"got error":"sent only",
-		       sent, bufp->len << 2);
+		       sent, xbufp->len);
 		svc_delete_socket(rqstp->rq_sock);
 		sent = -EAGAIN;
 	}
@@ -1016,6 +1048,8 @@
 {
 	struct svc_sock		*svsk =NULL;
 	int			len;
+	int 			pages;
+	struct xdr_buf		*arg;
 	DECLARE_WAITQUEUE(wait, current);
 
 	dprintk("svc: server %p waiting for data (to = %ld)\n",
@@ -1031,9 +1065,35 @@
 			 rqstp);
 
 	/* Initialize the buffers */
-	rqstp->rq_argbuf = rqstp->rq_defbuf;
-	rqstp->rq_resbuf = rqstp->rq_defbuf;
+	/* first reclaim pages that were moved to response list */
+	while (rqstp->rq_resused) 
+		rqstp->rq_argpages[rqstp->rq_arghi++] =
+			rqstp->rq_respages[--rqstp->rq_resused];
+	/* now allocate needed pages.  If we get a failure, sleep briefly */
+	pages = 2 + (serv->sv_bufsz + PAGE_SIZE -1) / PAGE_SIZE;
+	while (rqstp->rq_arghi < pages) {
+		struct page *p = alloc_page(GFP_KERNEL);
+		if (!p) {
+			set_current_state(TASK_UNINTERRUPTIBLE);
+			schedule_timeout(HZ/2);
+			current->state = TASK_RUNNING;
+			continue;
+		}
+		rqstp->rq_argpages[rqstp->rq_arghi++] = p;
+	}
 
+	/* Make arg->head point to first page and arg->pages point to rest */
+	arg = &rqstp->rq_arg;
+	arg->head[0].iov_base = page_address(rqstp->rq_argpages[0]);
+	arg->head[0].iov_len = PAGE_SIZE;
+	rqstp->rq_argused = 1;
+	arg->pages = rqstp->rq_argpages + 1;
+	arg->page_base = 0;
+	/* save at least one page for response */
+	arg->page_len = (pages-2)*PAGE_SIZE;
+	arg->len = (pages-1)*PAGE_SIZE;
+	arg->tail[0].iov_len = 0;
+	
 	if (signalled())
 		return -EINTR;
 
@@ -1109,12 +1169,6 @@
 	rqstp->rq_userset = 0;
 	rqstp->rq_chandle.defer = svc_defer;
 
-	svc_getu32(&rqstp->rq_argbuf, rqstp->rq_xid);
-	svc_putu32(&rqstp->rq_resbuf, rqstp->rq_xid);
-
-	/* Assume that the reply consists of a single buffer. */
-	rqstp->rq_resbuf.nriov = 1;
-
 	if (serv->sv_stats)
 		serv->sv_stats->netcnt++;
 	return len;
@@ -1354,23 +1408,25 @@
 svc_defer(struct cache_req *req)
 {
 	struct svc_rqst *rqstp = container_of(req, struct svc_rqst, rq_chandle);
-	int size = sizeof(struct svc_deferred_req) + (rqstp->rq_argbuf.buflen << 2);
+	int size = sizeof(struct svc_deferred_req) + (rqstp->rq_arg.head[0].iov_len);
 	struct svc_deferred_req *dr;
 
+	if (rqstp->rq_arg.page_len)
+		return NULL; /* if more than a page, give up FIXME */
 	if (rqstp->rq_deferred) {
 		dr = rqstp->rq_deferred;
 		rqstp->rq_deferred = NULL;
 	} else {
 		/* FIXME maybe discard if size too large */
-		dr = kmalloc(size<<2, GFP_KERNEL);
+		dr = kmalloc(size, GFP_KERNEL);
 		if (dr == NULL)
 			return NULL;
 
 		dr->serv = rqstp->rq_server;
 		dr->prot = rqstp->rq_prot;
 		dr->addr = rqstp->rq_addr;
-		dr->argslen = rqstp->rq_argbuf.buflen;
-		memcpy(dr->args, rqstp->rq_argbuf.base, dr->argslen<<2);
+		dr->argslen = rqstp->rq_arg.head[0].iov_len >> 2;
+		memcpy(dr->args, rqstp->rq_arg.head[0].iov_base, dr->argslen<<2);
 	}
 	spin_lock(&rqstp->rq_server->sv_lock);
 	rqstp->rq_sock->sk_inuse++;
@@ -1388,10 +1444,10 @@
 {
 	struct svc_deferred_req *dr = rqstp->rq_deferred;
 
-	rqstp->rq_argbuf.base = dr->args;
-	rqstp->rq_argbuf.buf  = dr->args;
-	rqstp->rq_argbuf.len  = dr->argslen;
-	rqstp->rq_argbuf.buflen = dr->argslen;
+	rqstp->rq_arg.head[0].iov_base = dr->args;
+	rqstp->rq_arg.head[0].iov_len = dr->argslen<<2;
+	rqstp->rq_arg.page_len = 0;
+	rqstp->rq_arg.len = dr->argslen<<2;
 	rqstp->rq_prot        = dr->prot;
 	rqstp->rq_addr        = dr->addr;
 	return dr->argslen<<2;
diff -Nru a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
--- a/net/sunrpc/xprt.c	Wed Oct 30 16:44:30 2002
+++ b/net/sunrpc/xprt.c	Wed Oct 30 16:44:30 2002
@@ -655,7 +655,7 @@
  * We have set things up such that we perform the checksum of the UDP
  * packet in parallel with the copies into the RPC client iovec.  -DaveM
  */
-static int
+int
 csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
 {
 	skb_reader_t desc;
diff -Nru a/net/unix/Makefile b/net/unix/Makefile
--- a/net/unix/Makefile	Wed Oct 30 16:44:25 2002
+++ b/net/unix/Makefile	Wed Oct 30 16:44:25 2002
@@ -6,7 +6,6 @@
 
 unix-y			:= af_unix.o garbage.o
 unix-$(CONFIG_SYSCTL)	+= sysctl_net_unix.o
-unix-objs		:= $(unix-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c
--- a/net/wanrouter/af_wanpipe.c	Wed Oct 30 16:44:34 2002
+++ b/net/wanrouter/af_wanpipe.c	Wed Oct 30 16:44:34 2002
@@ -1964,8 +1964,6 @@
 		case SIOCGIFDSTADDR:
 		case SIOCSIFDSTADDR:
 		case SIOCSIFFLAGS:
-		case SIOCADDDLCI:
-		case SIOCDELDLCI:
 			return inet_dgram_ops.ioctl(sock, cmd, arg);
 #endif
 
diff -Nru a/net/x25/Makefile b/net/x25/Makefile
--- a/net/x25/Makefile	Wed Oct 30 16:44:24 2002
+++ b/net/x25/Makefile	Wed Oct 30 16:44:24 2002
@@ -8,7 +8,6 @@
 			   x25_link.o x25_out.o x25_route.o x25_subr.o \
 			   x25_timer.o x25_proc.o
 x25-$(CONFIG_SYSCTL)	+= sysctl_net_x25.o
-x25-objs		:= $(x25-y)
 
 include $(TOPDIR)/Rules.make
 
diff -Nru a/scripts/Makefile b/scripts/Makefile
--- a/scripts/Makefile	Wed Oct 30 16:44:29 2002
+++ b/scripts/Makefile	Wed Oct 30 16:44:29 2002
@@ -11,7 +11,7 @@
 
 EXTRA_TARGETS := fixdep split-include docproc conmakehash
 
-subdir-	:= lxdialog
+subdir-	:= lxdialog kconfig
 
 # Yikes. We need to build this stuff here even if the user only wants
 # modules.
diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/Makefile.build	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,291 @@
+# ==========================================================================
+# Building
+# ==========================================================================
+
+src := $(obj)
+
+.PHONY: __build
+__build:
+
+ifdef include-config
+include .config
+endif
+
+include $(obj)/Makefile
+
+include scripts/Makefile.lib
+
+ifdef O_TARGET
+$(error kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.5. Please fix!)
+endif
+
+ifdef L_TARGET
+ifneq ($(L_TARGET),lib.a)
+$(warning kbuild: $(obj)/Makefile - L_TARGET := $(L_TARGET) target shall be renamed to lib.a. Please fix!)
+endif
+endif
+
+ifdef list-multi
+$(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.5. Please fix!)
+endif
+
+ifndef obj
+$(warning kbuild: Makefile.build is included improperly)
+endif
+
+# ===========================================================================
+
+# If a Makefile does not define a L_TARGET, link an object called "built-in.o"
+
+ifdef L_TARGET
+L_TARGET := $(obj)/$(L_TARGET)
+else
+O_TARGET := $(obj)/built-in.o
+endif
+
+__build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
+	 $(if $(KBUILD_MODULES),$(obj-m)) \
+	 $(subdir-ym)
+	@:
+
+# Compile C sources (.c)
+# ---------------------------------------------------------------------------
+
+# Default is built-in, unless we know otherwise
+modkern_cflags := $(CFLAGS_KERNEL)
+
+$(real-objs-m)        : modkern_cflags := $(CFLAGS_MODULE)
+$(real-objs-m:.o=.i)  : modkern_cflags := $(CFLAGS_MODULE)
+$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE)
+
+$(export-objs)        : export_flags   := $(EXPORT_FLAGS)
+$(export-objs:.o=.i)  : export_flags   := $(EXPORT_FLAGS)
+$(export-objs:.o=.s)  : export_flags   := $(EXPORT_FLAGS)
+$(export-objs:.o=.lst): export_flags   := $(EXPORT_FLAGS)
+
+c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
+	  $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \
+	  -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \
+	  $(export_flags) 
+
+quiet_cmd_cc_s_c = CC      $@
+cmd_cc_s_c       = $(CC) $(c_flags) -S -o $@ $< 
+
+%.s: %.c FORCE
+	$(call if_changed_dep,cc_s_c)
+
+quiet_cmd_cc_i_c = CPP     $@
+cmd_cc_i_c       = $(CPP) $(c_flags)   -o $@ $<
+
+%.i: %.c FORCE
+	$(call if_changed_dep,cc_i_c)
+
+quiet_cmd_cc_o_c = CC      $@
+cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
+
+%.o: %.c FORCE
+	$(call if_changed_dep,cc_o_c)
+
+quiet_cmd_cc_lst_c = MKLST   $@
+cmd_cc_lst_c       = $(CC) $(c_flags) -g -c -o $*.o $< && sh scripts/makelst $*.o System.map $(OBJDUMP) > $@
+
+%.lst: %.c FORCE
+	$(call if_changed_dep,cc_lst_c)
+
+# Compile assembler sources (.S)
+# ---------------------------------------------------------------------------
+
+modkern_aflags := $(AFLAGS_KERNEL)
+
+$(real-objs-m)      : modkern_aflags := $(AFLAGS_MODULE)
+$(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
+
+a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \
+	  $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
+
+quiet_cmd_as_s_S = CPP     $@
+cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
+
+%.s: %.S FORCE
+	$(call if_changed_dep,as_s_S)
+
+quiet_cmd_as_o_S = AS      $@
+cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
+
+%.o: %.S FORCE
+	$(call if_changed_dep,as_o_S)
+
+targets += $(real-objs-y) $(real-objs-m) $(EXTRA_TARGETS) $(MAKECMDGOALS)
+
+# Build the compiled-in targets
+# ---------------------------------------------------------------------------
+
+# To build objects in subdirs, we need to descend into the directories
+$(sort $(subdir-obj-y)): $(subdir-ym) ;
+
+#
+# Rule to compile a set of .o files into one .o file
+#
+ifdef O_TARGET
+quiet_cmd_link_o_target = LD      $@
+# If the list of objects to link is empty, just create an empty O_TARGET
+cmd_link_o_target = $(if $(strip $(obj-y)),\
+		      $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^),\
+		      rm -f $@; $(AR) rcs $@)
+
+$(O_TARGET): $(obj-y) FORCE
+	$(call if_changed,link_o_target)
+
+targets += $(O_TARGET)
+endif # O_TARGET
+
+#
+# Rule to compile a set of .o files into one .a file
+#
+ifdef L_TARGET
+quiet_cmd_link_l_target = AR      $@
+cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(obj-y)
+
+$(L_TARGET): $(obj-y) FORCE
+	$(call if_changed,link_l_target)
+
+targets += $(L_TARGET)
+endif
+
+#
+# Rule to link composite objects
+#
+
+quiet_cmd_link_multi = LD      $@
+cmd_link_multi = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(addprefix $(obj)/,$($(subst $(obj)/,,$(@:.o=-objs))) $($(subst $(obj)/,,$(@:.o=-y)))),$^)
+
+# We would rather have a list of rules like
+# 	foo.o: $(foo-objs)
+# but that's not so easy, so we rather make all composite objects depend
+# on the set of all their parts
+$(multi-used-y) : %.o: $(multi-objs-y) FORCE
+	$(call if_changed,link_multi)
+
+$(multi-used-m) : %.o: $(multi-objs-m) FORCE
+	$(call if_changed,link_multi)
+
+targets += $(multi-used-y) $(multi-used-m)
+
+# Compile programs on the host
+# ===========================================================================
+# host-progs := bin2hex
+# Will compile bin2hex.c and create an executable named bin2hex
+#
+# host-progs    := lxdialog
+# lxdialog-objs := checklist.o lxdialog.o
+# Will compile lxdialog.c and checklist.c, and then link the executable
+# lxdialog, based on checklist.o and lxdialog.o
+#
+# host-progs      := qconf
+# qconf-cxxobjs   := qconf.o
+# qconf-objs      := menu.o
+# Will compile qconf as a C++ program, and menu as a C program.
+# They are linked as C++ code to the executable qconf
+
+# host-progs := conf
+# conf-objs  := conf.o libkconfig.so
+# libkconfig-objs := expr.o type.o
+# Will create a shared library named libkconfig.so that consist of
+# expr.o and type.o (they are both compiled as C code and the object file
+# are made as position independent code).
+# conf.c is compiled as a c program, and conf.o is linked together with
+# libkconfig.so as the executable conf.
+# Note: Shared libraries consisting of C++ files are not supported  
+#
+
+# Create executable from a single .c file
+# host-csingle -> Executable
+quiet_cmd_host-csingle 	= HOSTCC  $@
+      cmd_host-csingle	= $(HOSTCC) -Wp,-MD,$(depfile) \
+			  $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
+			  $(HOST_LOADLIBES) -o $@ $<
+$(host-csingle): %: %.c FORCE
+	$(call if_changed_dep,host-csingle)
+
+# Link an executable based on list of .o files, all plain c
+# host-cmulti -> executable
+quiet_cmd_host-cmulti	= HOSTLD  $@
+      cmd_host-cmulti	= $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
+			  $(addprefix $(obj)/,$($(@F)-objs)) \
+			  $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
+$(host-cmulti): %: $(host-cobjs) $(host-cshlib) FORCE
+	$(call if_changed,host-cmulti)
+
+# Create .o file from a single .c file
+# host-cobjs -> .o
+quiet_cmd_host-cobjs	= HOSTCC  $@
+      cmd_host-cobjs	= $(HOSTCC) -Wp,-MD,$(depfile) \
+			  $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
+			  $(HOSTCFLAGS_$(@F)) -c -o $@ $<
+$(host-cobjs): %.o: %.c FORCE
+	$(call if_changed_dep,host-cobjs)
+
+# Link an executable based on list of .o files, a mixture of .c and .cc
+# host-cxxmulti -> executable
+quiet_cmd_host-cxxmulti	= HOSTLD  $@
+      cmd_host-cxxmulti	= $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \
+			  $(foreach o,objs cxxobjs,\
+			  $(addprefix $(obj)/,$($(@F)-$(o)))) \
+			  $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
+$(host-cxxmulti): %: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE
+	$(call if_changed,host-cxxmulti)
+
+# Create .o file from a single .cc (C++) file
+quiet_cmd_host-cxxobjs	= HOSTCXX $@
+      cmd_host-cxxobjs	= $(HOSTCXX) -Wp,-MD,$(depfile) \
+			  $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
+			  $(HOSTCXXFLAGS_$(@F)) -c -o $@ $<
+$(host-cxxobjs): %.o: %.cc FORCE
+	$(call if_changed_dep,host-cxxobjs)
+
+# Compile .c file, create position independent .o file
+# host-cshobjs -> .o
+quiet_cmd_host-cshobjs	= HOSTCC  -fPIC $@
+      cmd_host-cshobjs	= $(HOSTCC) -Wp,-MD,$(depfile) -fPIC\
+			  $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
+			  $(HOSTCFLAGS_$(@F)) -c -o $@ $<
+$(host-cshobjs): %.o: %.c FORCE
+	$(call if_changed_dep,host-cshobjs)
+
+# Link a shared library, based on position independent .o files
+# *.o -> .so shared library (host-cshlib)
+quiet_cmd_host-cshlib	= HOSTLLD -shared $@
+      cmd_host-cshlib	= $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \
+			  $(addprefix $(obj)/,$($(@F:.so=-objs))) \
+			  $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
+$(host-cshlib): %: $(host-cshobjs) FORCE
+	$(call if_changed,host-cshlib)
+
+targets += $(host-csingle)  $(host-cmulti) $(host-cobjs)\
+	   $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) 
+
+# Descending
+# ---------------------------------------------------------------------------
+
+.PHONY: $(subdir-ym)
+$(subdir-ym):
+	$(Q)$(MAKE) -f scripts/Makefile.build obj=$@
+
+# Add FORCE to the prequisites of a target to force it to be always rebuilt.
+# ---------------------------------------------------------------------------
+
+.PHONY: FORCE
+
+FORCE:
+
+# Read all saved command lines and dependencies for the $(targets) we
+# may be building above, using $(if_changed{,_dep}). As an
+# optimization, we don't need to read them if the target does not
+# exist, we will rebuild anyway in that case.
+
+targets := $(wildcard $(sort $(targets)))
+cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
+
+ifneq ($(cmd_files),)
+  include $(cmd_files)
+endif
diff -Nru a/scripts/Makefile.clean b/scripts/Makefile.clean
--- a/scripts/Makefile.clean	Wed Oct 30 16:44:17 2002
+++ b/scripts/Makefile.clean	Wed Oct 30 16:44:17 2002
@@ -1,13 +1,17 @@
+# ==========================================================================
+# Cleaning up
+# ==========================================================================
 
 src := $(obj)
 
-no-rules.make := 1
-
 .PHONY: __clean
 __clean:
 
 include $(obj)/Makefile
 
+# Figure out what we need to build from the various variables
+# ==========================================================================
+
 __subdir-y	:= $(patsubst %/,%,$(filter %/, $(obj-y)))
 subdir-y	+= $(__subdir-y)
 __subdir-m	:= $(patsubst %/,%,$(filter %/, $(obj-m)))
@@ -17,26 +21,43 @@
 __subdir-	:= $(patsubst %/,%,$(filter %/, $(obj-)))
 subdir-		+= $(__subdir-)
 
+# Subdirectories we need to descend into
+
 subdir-ym	:= $(sort $(subdir-y) $(subdir-m))
 subdir-ymn      := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
 
+# Add subdir path
+
 EXTRA_TARGETS	:= $(addprefix $(obj)/,$(EXTRA_TARGETS))
 clean-files	:= $(addprefix $(obj)/,$(clean-files))
 host-progs	:= $(addprefix $(obj)/,$(host-progs))
 subdir-ymn	:= $(addprefix $(obj)/,$(subdir-ymn))
 
+# ==========================================================================
+
 __clean-files := $(wildcard $(EXTRA_TARGETS) $(host-progs) $(clean-files))
 
+quiet_cmd_clean = CLEAN   $(obj)
+      cmd_clean = rm -f $(__clean-files); $(clean-rule)
+
 __clean: $(subdir-ymn)
 ifneq ($(strip $(__clean-files) $(clean-rule)),)
-	rm -f $(__clean-files)
-	$(clean-rule)
+	+$(call cmd,clean)
 else
 	@:
 endif
 
-.PHONY: $(subdir-ymn)
+# ===========================================================================
+# Generic stuff
+# ===========================================================================
+
+# Descending
+# ---------------------------------------------------------------------------
 
+.PHONY: $(subdir-ymn)
 $(subdir-ymn):
-	$(MAKE) -rR -f scripts/Makefile.clean obj=$@
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=$@
+
+# If quiet is set, only print short version of command
 
+cmd = @$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
diff -Nru a/scripts/Makefile.lib b/scripts/Makefile.lib
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/Makefile.lib	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,218 @@
+# ===========================================================================
+# kbuild: Generic definitions
+# ===========================================================================
+
+# Standard vars
+
+comma   := ,
+
+# Figure out what we need to build from the various variables
+# ===========================================================================
+
+# When an object is listed to be built compiled-in and modular,
+# only build the compiled-in version
+
+obj-m := $(filter-out $(obj-y),$(obj-m))
+
+# Handle objects in subdirs
+# ---------------------------------------------------------------------------
+# o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o
+#   and add the directory to the list of dirs to descend into: $(subdir-y)
+# o if we encounter foo/ in $(obj-m), remove it from $(obj-m) 
+#   and add the directory to the list of dirs to descend into: $(subdir-m)
+
+__subdir-y	:= $(patsubst %/,%,$(filter %/, $(obj-y)))
+subdir-y	+= $(__subdir-y)
+__subdir-m	:= $(patsubst %/,%,$(filter %/, $(obj-m)))
+subdir-m	+= $(__subdir-m)
+obj-y		:= $(patsubst %/, %/built-in.o, $(obj-y))
+obj-m		:= $(filter-out %/, $(obj-m))
+
+# Subdirectories we need to descend into
+
+subdir-ym	:= $(sort $(subdir-y) $(subdir-m))
+
+# export.o is never a composite object, since $(export-objs) has a
+# fixed meaning (== objects which EXPORT_SYMBOL())
+__obj-y = $(filter-out export.o,$(obj-y))
+__obj-m = $(filter-out export.o,$(obj-m))
+
+# if $(foo-objs) exists, foo.o is a composite object 
+multi-used-y := $(sort $(foreach m,$(__obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
+multi-used-m := $(sort $(foreach m,$(__obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
+
+# Build list of the parts of our composite objects, our composite
+# objects depend on those (obviously)
+multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
+multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
+
+# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live
+# in the local directory
+subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
+
+# Replace multi-part objects by their individual parts, look at local dir only
+real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(EXTRA_TARGETS)
+real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m)))
+
+# Only build module versions for files which are selected to be built
+export-objs := $(filter $(export-objs),$(real-objs-y) $(real-objs-m))
+
+# C code
+# Executables compiled from a single .c file
+host-csingle	:= $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m)))
+
+# C executables linked based on several .o files
+host-cmulti	:= $(foreach m,$(host-progs),\
+		   $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
+
+# Object (.o) files compiled from .c files
+host-cobjs	:= $(sort $(foreach m,$(host-progs),$($(m)-objs)))
+
+# C++ code
+# C++ executables compiled from at least on .cc file
+# and zero or more .c files
+host-cxxmulti	:= $(foreach m,$(host-progs),$(if $($(m)-cxxobjs),$(m)))
+
+# C++ Object (.o) files compiled from .cc files
+host-cxxobjs	:= $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs)))
+
+# Shared libaries (only .c supported)
+# Shared libraries (.so) - all .so files referenced in "xxx-objs"
+host-cshlib	:= $(sort $(filter %.so, $(host-cobjs)))
+# Remove .so files from "xxx-objs"
+host-cobjs	:= $(filter-out %.so,$(host-cobjs))
+
+#Object (.o) files used by the shared libaries
+host-cshobjs	:= $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs))))
+
+# Add subdir path
+
+EXTRA_TARGETS	:= $(addprefix $(obj)/,$(EXTRA_TARGETS))
+obj-y		:= $(addprefix $(obj)/,$(obj-y))
+obj-m		:= $(addprefix $(obj)/,$(obj-m))
+export-objs	:= $(addprefix $(obj)/,$(export-objs))
+subdir-obj-y	:= $(addprefix $(obj)/,$(subdir-obj-y))
+real-objs-y	:= $(addprefix $(obj)/,$(real-objs-y))
+real-objs-m	:= $(addprefix $(obj)/,$(real-objs-m))
+multi-used-y	:= $(addprefix $(obj)/,$(multi-used-y))
+multi-used-m	:= $(addprefix $(obj)/,$(multi-used-m))
+multi-objs-y	:= $(addprefix $(obj)/,$(multi-objs-y))
+multi-objs-m	:= $(addprefix $(obj)/,$(multi-objs-m))
+subdir-ym	:= $(addprefix $(obj)/,$(subdir-ym))
+host-progs      := $(addprefix $(obj)/,$(host-progs))
+host-csingle	:= $(addprefix $(obj)/,$(host-csingle))
+host-cmulti	:= $(addprefix $(obj)/,$(host-cmulti))
+host-cobjs	:= $(addprefix $(obj)/,$(host-cobjs))
+host-cxxmulti	:= $(addprefix $(obj)/,$(host-cxxmulti))
+host-cxxobjs	:= $(addprefix $(obj)/,$(host-cxxobjs))
+host-cshlib	:= $(addprefix $(obj)/,$(host-cshlib))
+host-cshobjs	:= $(addprefix $(obj)/,$(host-cshobjs))
+
+# The temporary file to save gcc -MD generated dependencies must not
+# contain a comma
+depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
+
+# Shipped files
+# ===========================================================================
+
+quiet_cmd_shipped = SHIPPED $@
+cmd_shipped = cat $< > $@
+
+%:: %_shipped
+	$(call cmd,shipped)
+
+# Commands useful for building a boot image
+# ===========================================================================
+# 
+#	Use as following:
+#
+#	target: source(s) FORCE
+#		$(if_changed,ld/objcopy/gzip)
+#
+#	and add target to EXTRA_TARGETS so that we know we have to
+#	read in the saved command line
+
+# Linking
+# ---------------------------------------------------------------------------
+
+quiet_cmd_ld = LD      $@
+cmd_ld = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) \
+	       $(filter-out FORCE,$^) -o $@ 
+
+# Objcopy
+# ---------------------------------------------------------------------------
+
+quiet_cmd_objcopy = OBJCOPY $@
+cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@
+
+# Gzip
+# ---------------------------------------------------------------------------
+
+quiet_cmd_gzip = GZIP    $@
+cmd_gzip = gzip -f -9 < $< > $@
+
+# ===========================================================================
+# Generic stuff
+# ===========================================================================
+
+# function to only execute the passed command if necessary
+
+if_changed = $(if $(strip $? \
+		          $(filter-out $(cmd_$(1)),$(cmd_$@))\
+			  $(filter-out $(cmd_$@),$(cmd_$(1)))),\
+	@set -e; \
+	$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))';) \
+	$(cmd_$(1)); \
+	echo 'cmd_$@ := $(cmd_$(1))' > $(@D)/.$(@F).cmd)
+
+
+# execute the command and also postprocess generated .d dependencies
+# file
+
+if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
+		          $(filter-out $(cmd_$(1)),$(cmd_$@))\
+			  $(filter-out $(cmd_$@),$(cmd_$(1)))),\
+	@set -e; \
+	$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))';) \
+	$(cmd_$(1)); \
+	scripts/fixdep $(depfile) $@ '$(cmd_$(1))' > $(@D)/.$(@F).tmp; \
+	rm -f $(depfile); \
+	mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
+
+# Usage: $(call if_changed_rule,foo)
+# will check if $(cmd_foo) changed, or any of the prequisites changed,
+# and if so will execute $(rule_foo)
+
+if_changed_rule = $(if $(strip $? \
+		               $(filter-out $(cmd_$(1)),$(cmd_$@))\
+			       $(filter-out $(cmd_$@),$(cmd_$(1)))),\
+			@set -e; \
+			mkdir -p $(dir $@); \
+			$(rule_$(1)))
+
+# If quiet is set, only print short version of command
+
+cmd = @$(if $($(quiet)cmd_$(1)),echo '  $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
+
+# do_cmd is a shorthand used to support both compressed, verbose
+# and silent output in a single line.
+# Compared to cmd described avobe, do_cmd does no rely on any variables 
+# previously assigned a value.
+#
+# Usage $(call do_cmd,CMD   $@,cmd_to_execute bla bla)
+# Example:
+# $(call do_cmd,CP $@,cp -b $< $@)
+# make -s => nothing will be printed
+# make KBUILD_VERBOSE=1 => cp -b path/to/src.file path/to/dest.file
+# make KBUILD_VERBOSE=0 =>   CP path/to/dest.file
+define do_cmd
+	@$(if $(filter quiet_,$(quiet)), echo '  $(1)' &&,
+           $(if $(filter silent_,$(quiet)),,
+             echo "$(2)" &&)) \
+        $(2)
+endef
+
+#	$(call descend,<dir>,<target>)
+#	Recursively call a sub-make in <dir> with target <target> 
+
+descend = $(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2)
diff -Nru a/scripts/Makefile.modinst b/scripts/Makefile.modinst
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/Makefile.modinst	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,34 @@
+# ==========================================================================
+# Installing modules
+# ==========================================================================
+
+src := $(obj)
+
+.PHONY: modules_install
+modules_install:
+
+include .config
+
+include $(obj)/Makefile
+
+include scripts/Makefile.lib
+
+# ==========================================================================
+
+quiet_cmd_modules_install = INSTALL $(obj-m)
+      cmd_modules_install = mkdir -p $(MODLIB)/kernel/$(obj); \
+			    cp $(obj-m) $(MODLIB)/kernel/$(obj)
+
+modules_install: $(subdir-ym)
+ifneq ($(obj-m),)
+	$(call cmd,modules_install)
+else
+	@:
+endif
+
+# Descending
+# ---------------------------------------------------------------------------
+
+.PHONY: $(subdir-ym)
+$(subdir-ym):
+	$(Q)$(MAKE) -rR -f scripts/Makefile.modinst obj=$@
diff -Nru a/scripts/Makefile.modver b/scripts/Makefile.modver
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/Makefile.modver	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,123 @@
+# ===========================================================================
+# Module versions
+# ===========================================================================
+
+src := $(obj)
+
+MODVERDIR := include/linux/modules
+
+.PHONY: modver
+modver:
+
+include .config
+
+include $(obj)/Makefile
+
+include scripts/Makefile.lib
+
+# ===========================================================================
+
+ifeq ($(strip $(export-objs)),)
+
+# If we don't export any symbols in this dir, just descend
+# ---------------------------------------------------------------------------
+
+modver: $(subdir-ym)
+	@:
+
+else
+
+# This sets version suffixes on exported symbols
+# ---------------------------------------------------------------------------
+
+#
+# Added the SMP separator to stop module accidents between uniprocessor
+# and SMP Intel boxes - AC - from bits by Michael Chastain
+#
+
+ifdef CONFIG_SMP
+	genksyms_smp_prefix := -p smp_
+else
+	genksyms_smp_prefix := 
+endif
+
+#	Don't include modversions.h, we're just about to generate it here.
+
+CFLAGS_MODULE := $(filter-out -include include/linux/modversions.h,$(CFLAGS_MODULE))
+
+$(addprefix $(MODVERDIR)/,$(real-objs-y:.o=.ver)): modkern_cflags := $(CFLAGS_KERNEL)
+$(addprefix $(MODVERDIR)/,$(real-objs-m:.o=.ver)): modkern_cflags := $(CFLAGS_MODULE)
+$(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver)): export_flags   := -D__GENKSYMS__
+
+c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
+	  $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \
+	  -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) \
+	  $(export_flags) 
+
+# Our objects only depend on modversions.h, not on the individual .ver
+# files (fix-dep filters them), so touch modversions.h if any of the .ver
+# files changes
+
+quiet_cmd_cc_ver_c = MKVER   include/linux/modules/$*.ver
+cmd_cc_ver_c = $(CPP) $(c_flags) $< | $(GENKSYMS) $(genksyms_smp_prefix) \
+		 -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp
+
+# Okay, let's explain what's happening in rule_make_cc_ver_c:
+# o echo the command
+# o execute the command
+# o If the $(CPP) fails, we won't notice because it's output is piped
+#   to $(GENKSYMS) which does not fail. We recognize this case by
+#   looking if the generated $(depfile) exists, though.
+# o If the .ver file changed, touch modversions.h, which is our marker
+#   of any changed .ver files.
+# o Move command line and deps into their normal .*.cmd place.  
+
+define rule_cc_ver_c
+	$(if $($(quiet)cmd_cc_ver_c),echo '  $($(quiet)cmd_cc_ver_c)';) \
+	$(cmd_cc_ver_c); \
+	if [ ! -r $(depfile) ]; then exit 1; fi; \
+	scripts/fixdep $(depfile) $@ '$(cmd_cc_ver_c)' > $(@D)/.$(@F).tmp; \
+	rm -f $(depfile); \
+	if [ ! -r $@ ] || cmp -s $@ $@.tmp; then \
+	  touch include/linux/modversions.h; \
+	fi; \
+	mv -f $@.tmp $@
+	mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd
+endef
+
+targets := $(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver))
+
+$(MODVERDIR)/%.ver: %.c FORCE
+	@$(call if_changed_rule,cc_ver_c)
+
+modver: $(targets) $(subdir-ym)
+	@mkdir -p $(dir $(addprefix .tmp_export-objs/modules/,$(export-objs:.o=.ver)))
+	@touch $(addprefix .tmp_export-objs/modules/,$(export-objs:.o=.ver))
+
+endif # export-objs 
+
+# Descending
+# ---------------------------------------------------------------------------
+
+.PHONY: $(subdir-ym)
+$(subdir-ym):
+	$(Q)$(MAKE) -f scripts/Makefile.modver obj=$@
+
+# Add FORCE to the prequisites of a target to force it to be always rebuilt.
+# ---------------------------------------------------------------------------
+
+.PHONY: FORCE
+
+FORCE:
+
+# Read all saved command lines and dependencies for the $(targets) we
+# may be building above, using $(if_changed{,_dep}). As an
+# optimization, we don't need to read them if the target does not
+# exist, we will rebuild anyway in that case.
+
+targets := $(wildcard $(sort $(targets)))
+cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
+
+ifneq ($(cmd_files),)
+  include $(cmd_files)
+endif
diff -Nru a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/Makefile	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,86 @@
+#################
+#
+# Shared Makefile for the various lkc executables:
+# conf:	  Used for defconfig, oldconfig and related targets
+# mconf:  Used for the mconfig target.
+#         Utilizes the lxdialog package
+# qconf:  Used for the xconfig target
+#         Based on QT which needs to be installed to compile it
+#
+
+# object files used by all lkc flavours
+libkconfig-objs := zconf.tab.o
+
+host-progs	:= conf mconf qconf
+conf-objs	:= conf.o  libkconfig.so
+mconf-objs	:= mconf.o libkconfig.so
+
+qconf-objs	:= kconfig_load.o
+qconf-cxxobjs	:= qconf.o
+
+clean-files	:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
+		   zconf.tab.c zconf.tab.h lex.zconf.c
+
+include $(TOPDIR)/Rules.make
+
+# generated files seem to need this to find local include files
+HOSTCFLAGS_lex.zconf.o	:= -I$(src)
+HOSTCFLAGS_zconf.tab.o	:= -I$(src)
+
+HOSTLOADLIBES_qconf	= -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -l$(QTLIB) -ldl
+HOSTCXXFLAGS_qconf.o	= -I$(QTDIR)/include 
+
+$(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h
+
+$(obj)/qconf.o: $(obj)/.tmp_qtcheck
+
+-include $(obj)/.tmp_qtcheck
+
+# QT needs some extra effort...
+$(obj)/.tmp_qtcheck:
+	@set -e; for d in $$QTDIR /usr/share/qt /usr/lib/qt3; do \
+	  if [ -x $$d/bin/moc ]; then DIR=$$d; break; fi; \
+	done; \
+	if [ -z "$$DIR" ]; then \
+	  echo "*"; \
+	  echo "* Unable to find the QT installation. Please make sure that the"; \
+	  echo "* QT development package is correctly installed and the QTDIR"; \
+	  echo "* environment variable is set to the correct location."; \
+	  echo "*"; \
+	  false; \
+	fi; \
+	LIB=qt; \
+	if [ -f $$DIR/lib/libqt-mt.so ]; then LIB=qt-mt; fi; \
+	echo "QTDIR=$$DIR" > $@; echo "QTLIB=$$LIB" >> $@
+
+$(obj)/zconf.tab.o: $(obj)/lex.zconf.c
+
+$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
+
+$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
+
+$(obj)/%.moc: $(src)/%.h
+	$(QTDIR)/bin/moc -i $< -o $@
+
+$(obj)/lkc_defs.h: $(src)/lkc_proto.h
+	sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
+
+
+###
+# The following requires flex/bison
+# By default we use the _shipped versions, uncomment the following line if
+# you are modifying the flex/bison src.
+# LKC_GENPARSER := 1
+
+ifdef LKC_GENPARSER
+
+$(obj)/zconf.tab.c: $(obj)/zconf.y 
+$(obj)/zconf.tab.h: $(obj)/zconf.tab.c
+
+%.tab.c: %.y
+	bison -t -d -v -b $* -p $(notdir $*) $<
+
+lex.%.c: %.l
+	flex -P$(notdir $*) -o$@ $<
+
+endif
diff -Nru a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/conf.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,567 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/stat.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+static void conf(struct menu *menu);
+static void check_conf(struct menu *menu);
+
+enum {
+	ask_all,
+	ask_new,
+	ask_silent,
+	set_default,
+	set_yes,
+	set_mod,
+	set_no,
+	set_random
+} input_mode = ask_all;
+
+static int indent = 1;
+static int valid_stdin = 1;
+static int conf_cnt;
+static char line[128];
+static struct menu *rootEntry;
+
+static char nohelp_text[] = "Sorry, no help available for this option yet.\n";
+
+#if 0
+static void printc(int ch)
+{
+	static int sep = 0;
+
+	if (!sep) {
+		putchar('[');
+		sep = 1;
+	} else if (ch)
+		putchar('/');
+	if (!ch) {
+		putchar(']');
+		putchar(' ');
+		sep = 0;
+	} else
+		putchar(ch);
+}
+#endif
+
+static void printo(const char *o)
+{
+	static int sep = 0;
+
+	if (!sep) {
+		putchar('(');
+		sep = 1;
+	} else if (o) {
+		putchar(',');
+		putchar(' ');
+	}
+	if (!o) {
+		putchar(')');
+		putchar(' ');
+		sep = 0;
+	} else
+		printf("%s", o);
+}
+
+static void strip(char *str)
+{
+	char *p = str;
+	int l;
+
+	while ((isspace(*p)))
+		p++;
+	l = strlen(p);
+	if (p != str)
+		memmove(str, p, l + 1);
+	if (!l)
+		return;
+	p = str + l - 1;
+	while ((isspace(*p)))
+		*p-- = 0;
+}
+
+static void conf_askvalue(struct symbol *sym, const char *def)
+{
+	enum symbol_type type = sym_get_type(sym);
+	tristate val;
+
+	if (!sym_has_value(sym))
+		printf("(NEW) ");
+
+	line[0] = '\n';
+	line[1] = 0;
+
+	switch (input_mode) {
+	case ask_new:
+	case ask_silent:
+		if (sym_has_value(sym)) {
+			printf("%s\n", def);
+			return;
+		}
+		if (!valid_stdin && input_mode == ask_silent) {
+			printf("aborted!\n\n");
+			printf("Console input/output is redirected. ");
+			printf("Run 'make oldconfig' to update configuration.\n\n");
+			exit(1);
+		}
+	case ask_all:
+		fgets(line, 128, stdin);
+		return;
+	case set_default:
+		printf("%s\n", def);
+		return;
+	default:
+		break;
+	}
+
+	switch (type) {
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+		printf("%s\n", def);
+		return;
+	default:
+		;
+	}
+	switch (input_mode) {
+	case set_yes:
+		if (sym_tristate_within_range(sym, yes)) {
+			line[0] = 'y';
+			line[1] = '\n';
+			line[2] = 0;
+			break;
+		}
+	case set_mod:
+		if (type == S_TRISTATE) {
+			if (sym_tristate_within_range(sym, mod)) {
+				line[0] = 'm';
+				line[1] = '\n';
+				line[2] = 0;
+				break;
+			}
+		} else {
+			if (sym_tristate_within_range(sym, yes)) {
+				line[0] = 'y';
+				line[1] = '\n';
+				line[2] = 0;
+				break;
+			}
+		}
+	case set_no:
+		if (sym_tristate_within_range(sym, no)) {
+			line[0] = 'n';
+			line[1] = '\n';
+			line[2] = 0;
+			break;
+		}
+	case set_random:
+		do {
+			val = (tristate)(random() % 3);
+		} while (!sym_tristate_within_range(sym, val));
+		switch (val) {
+		case no: line[0] = 'n'; break;
+		case mod: line[0] = 'm'; break;
+		case yes: line[0] = 'y'; break;
+		}
+		line[1] = '\n';
+		line[2] = 0;
+		break;
+	default:
+		break;
+	}
+	printf("%s", line);
+}
+
+int conf_string(struct menu *menu)
+{
+	struct symbol *sym = menu->sym;
+	const char *def, *help;
+
+	while (1) {
+		printf("%*s%s ", indent - 1, "", menu->prompt->text);
+		printf("(%s) ", sym->name);
+		def = sym_get_string_value(sym);
+		if (sym_get_string_value(sym))
+			printf("[%s] ", def);
+		conf_askvalue(sym, def);
+		switch (line[0]) {
+		case '\n':
+			break;
+		case '?':
+			/* print help */
+			if (line[1] == 0) {
+				help = nohelp_text;
+				if (menu->sym->help)
+					help = menu->sym->help;
+				printf("\n%s\n", menu->sym->help);
+				def = NULL;
+				break;
+			}
+		default:
+			line[strlen(line)-1] = 0;
+			def = line;
+		}
+		if (def && sym_set_string_value(sym, def))
+			return 0;
+	}
+}
+
+static int conf_sym(struct menu *menu)
+{
+	struct symbol *sym = menu->sym;
+	int type;
+	tristate oldval, newval;
+	const char *help;
+
+	while (1) {
+		printf("%*s%s ", indent - 1, "", menu->prompt->text);
+		if (sym->name)
+			printf("(%s) ", sym->name);
+		type = sym_get_type(sym);
+		putchar('[');
+		oldval = sym_get_tristate_value(sym);
+		switch (oldval) {
+		case no:
+			putchar('N');
+			break;
+		case mod:
+			putchar('M');
+			break;
+		case yes:
+			putchar('Y');
+			break;
+		}
+		if (oldval != no && sym_tristate_within_range(sym, no))
+			printf("/n");
+		if (oldval != mod && sym_tristate_within_range(sym, mod))
+			printf("/m");
+		if (oldval != yes && sym_tristate_within_range(sym, yes))
+			printf("/y");
+		if (sym->help)
+			printf("/?");
+		printf("] ");
+		conf_askvalue(sym, sym_get_string_value(sym));
+		strip(line);
+
+		switch (line[0]) {
+		case 'n':
+		case 'N':
+			newval = no;
+			if (!line[1] || !strcmp(&line[1], "o"))
+				break;
+			continue;
+		case 'm':
+		case 'M':
+			newval = mod;
+			if (!line[1])
+				break;
+			continue;
+		case 'y':
+		case 'Y':
+			newval = yes;
+			if (!line[1] || !strcmp(&line[1], "es"))
+				break;
+			continue;
+		case 0:
+			newval = oldval;
+			break;
+		case '?':
+			goto help;
+		default:
+			continue;
+		}
+		if (sym_set_tristate_value(sym, newval))
+			return 0;
+help:
+		help = nohelp_text;
+		if (sym->help)
+			help = sym->help;
+		printf("\n%s\n", help);
+	}
+}
+
+static int conf_choice(struct menu *menu)
+{
+	struct symbol *sym, *def_sym;
+	struct menu *cmenu, *def_menu;
+	const char *help;
+	int type, len;
+	bool is_new;
+
+	sym = menu->sym;
+	type = sym_get_type(sym);
+	is_new = !sym_has_value(sym);
+	if (sym_is_changable(sym)) {
+		conf_sym(menu);
+		sym_calc_value(sym);
+		switch (sym_get_tristate_value(sym)) {
+		case no:
+			return 1;
+		case mod:
+			return 0;
+		case yes:
+			break;
+		}
+	} else {
+		sym->def = sym->curr;
+		if (S_TRI(sym->curr) == mod) {
+			printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
+			return 0;
+		}
+	}
+
+	while (1) {
+		printf("%*s%s ", indent - 1, "", menu_get_prompt(menu));
+		def_sym = sym_get_choice_value(sym);
+		def_menu = NULL;
+		for (cmenu = menu->list; cmenu; cmenu = cmenu->next) {
+			if (!menu_is_visible(cmenu))
+				continue;
+			printo(menu_get_prompt(cmenu));
+			if (cmenu->sym == def_sym)
+				def_menu = cmenu;
+		}
+		printo(NULL);
+		if (def_menu)
+			printf("[%s] ", menu_get_prompt(def_menu));
+		else {
+			printf("\n");
+			return 1;
+		}
+		switch (input_mode) {
+		case ask_new:
+		case ask_silent:
+		case ask_all:
+			if (is_new)
+				sym->flags |= SYMBOL_NEW;
+			conf_askvalue(sym, menu_get_prompt(def_menu));
+			strip(line);
+			break;
+		default:
+			line[0] = 0;
+			printf("\n");
+		}
+		if (line[0] == '?' && !line[1]) {
+			help = nohelp_text;
+			if (menu->sym->help)
+				help = menu->sym->help;
+			printf("\n%s\n", help);
+			continue;
+		}
+		if (line[0]) {
+			len = strlen(line) - 1;
+			line[len] = 0;
+
+			def_menu = NULL;
+			for (cmenu = menu->list; cmenu; cmenu = cmenu->next) {
+				if (!cmenu->sym || !menu_is_visible(cmenu))
+					continue;
+				if (!strncmp(line, menu_get_prompt(cmenu), len)) {
+					def_menu = cmenu;
+					break;
+				}
+			}
+		}
+		if (def_menu) {
+			sym_set_choice_value(sym, def_menu->sym);
+			if (def_menu->list) {
+				indent += 2;
+				conf(def_menu->list);
+				indent -= 2;
+			}
+			return 1;
+		}
+	}
+}
+
+static void conf(struct menu *menu)
+{
+	struct symbol *sym;
+	struct property *prop;
+	struct menu *child;
+
+	if (!menu_is_visible(menu))
+		return;
+
+	sym = menu->sym;
+	prop = menu->prompt;
+	if (prop) {
+		const char *prompt;
+
+		switch (prop->type) {
+		case P_MENU:
+			if (input_mode == ask_silent && rootEntry != menu) {
+				check_conf(menu);
+				return;
+			}
+		case P_COMMENT:
+			prompt = menu_get_prompt(menu);
+			if (prompt)
+				printf("%*c\n%*c %s\n%*c\n",
+					indent, '*',
+					indent, '*', prompt,
+					indent, '*');
+		default:
+			;
+		}
+	}
+
+	if (!sym)
+		goto conf_childs;
+
+	if (sym_is_choice(sym)) {
+		conf_choice(menu);
+		if (S_TRI(sym->curr) != mod)
+			return;
+		goto conf_childs;
+	}
+
+	switch (sym->type) {
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+		conf_string(menu);
+		break;
+	default:
+		conf_sym(menu);
+		break;
+	}
+
+conf_childs:
+	if (sym)
+		indent += 2;
+	for (child = menu->list; child; child = child->next)
+		conf(child);
+	if (sym)
+		indent -= 2;
+}
+
+static void check_conf(struct menu *menu)
+{
+	struct symbol *sym;
+	struct menu *child;
+
+	if (!menu_is_visible(menu))
+		return;
+
+	sym = menu->sym;
+	if (!sym)
+		goto conf_childs;
+
+	if (sym_is_choice(sym)) {
+		if (!sym_has_value(sym)) {
+			if (!conf_cnt++)
+				printf("*\n* Restart config...\n*\n");
+			rootEntry = menu_get_parent_menu(menu);
+			conf(rootEntry);
+		}
+		if (sym_get_tristate_value(sym) != mod)
+			return;
+		goto conf_childs;
+	}
+
+	if (!sym_has_value(sym)) {
+		if (!conf_cnt++)
+			printf("*\n* Restart config...\n*\n");
+		rootEntry = menu_get_parent_menu(menu);
+		conf(rootEntry);
+	}
+
+conf_childs:
+	for (child = menu->list; child; child = child->next)
+		check_conf(child);
+}
+
+int main(int ac, char **av)
+{
+	const char *name;
+	struct stat tmpstat;
+
+	if (ac > 1 && av[1][0] == '-') {
+		switch (av[1][1]) {
+		case 'o':
+			input_mode = ask_new;
+			break;
+		case 's':
+			input_mode = ask_silent;
+			valid_stdin = isatty(0) && isatty(1) && isatty(2);
+			break;
+		case 'd':
+			input_mode = set_default;
+			break;
+		case 'n':
+			input_mode = set_no;
+			break;
+		case 'm':
+			input_mode = set_mod;
+			break;
+		case 'y':
+			input_mode = set_yes;
+			break;
+		case 'r':
+			input_mode = set_random;
+			srandom(time(NULL));
+			break;
+		case 'h':
+		case '?':
+			printf("%s [-o|-s] config\n", av[0]);
+			exit(0);
+		}
+		name = av[2];
+	} else
+		name = av[1];
+	conf_parse(name);
+	//zconfdump(stdout);
+	switch (input_mode) {
+	case set_default:
+		name = conf_get_default_confname();
+		if (conf_read(name)) {
+			printf("***\n"
+				"*** Can't find default configuration \"%s\"!\n"
+				"***\n", name);
+			exit(1);
+		}
+		break;
+	case ask_silent:
+		if (stat(".config", &tmpstat)) {
+			printf("***\n"
+				"*** You have not yet configured your kernel!\n"
+				"***\n"
+				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
+				"*** \"make menuconfig\" or \"make xconfig\").\n"
+				"***\n");
+			exit(1);
+		}
+	case ask_all:
+	case ask_new:
+		conf_read(NULL);
+		break;
+	default:
+		break;
+	}
+
+	if (input_mode != ask_silent) {
+		rootEntry = &rootmenu;
+		conf(&rootmenu);
+		if (input_mode == ask_all) {
+			input_mode = ask_silent;
+			valid_stdin = 1;
+		}
+	}
+	do {
+		conf_cnt = 0;
+		check_conf(&rootmenu);
+	} while (conf_cnt);
+	conf_write(NULL);
+	return 0;
+}
diff -Nru a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/confdata.c	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,360 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+const char conf_def_filename[] = ".config";
+char conf_filename[PATH_MAX+1];
+
+const char conf_defname[] = "arch/$ARCH/defconfig";
+
+const char *conf_confnames[] = {
+	".config",
+	"/lib/modules/$UNAME_RELEASE/.config",
+	"/etc/kernel-config",
+	"/boot/config-$UNAME_RELEASE",
+	conf_defname,
+	NULL,
+};
+
+static char *conf_expand_value(const char *in)
+{
+	struct symbol *sym;
+	const char *src;
+	static char res_value[SYMBOL_MAXLENGTH];
+	char *dst, name[SYMBOL_MAXLENGTH];
+
+	res_value[0] = 0;
+	dst = name;
+	while ((src = strchr(in, '$'))) {
+		strncat(res_value, in, src - in);
+		src++;
+		dst = name;
+		while (isalnum(*src) || *src == '_')
+			*dst++ = *src++;
+		*dst = 0;
+		sym = sym_lookup(name, 0);
+		sym_calc_value(sym);
+		strcat(res_value, sym_get_string_value(sym));
+		in = src;
+	}
+	strcat(res_value, in);
+
+	return res_value;
+}
+
+char *conf_get_default_confname(void)
+{
+	return conf_expand_value(conf_defname);
+}
+
+int conf_read(const char *name)
+{
+	FILE *in = NULL;
+	char line[128];
+	char *p, *p2;
+	int lineno = 0;
+	struct symbol *sym;
+	struct property *prop;
+	struct expr *e;
+	int i;
+
+	if (name) {
+		in = fopen(name, "r");
+		if (in)
+			strcpy(conf_filename, name);
+	} else {
+		const char **names = conf_confnames;
+		while ((name = *names++)) {
+			name = conf_expand_value(name);
+			in = fopen(name, "r");
+			if (in) {
+				printf("#\n"
+				       "# using defaults found in %s\n"
+				       "#\n", name);
+				break;
+			}
+		}
+	}
+
+	if (!in)
+		return 1;
+
+	for_all_symbols(i, sym) {
+		sym->flags |= SYMBOL_NEW;
+		switch (sym->type) {
+		case S_INT:
+		case S_HEX:
+		case S_STRING:
+			if (S_VAL(sym->def)) {
+				free(S_VAL(sym->def));
+				S_VAL(sym->def) = NULL;
+			}
+		default:
+			;
+		}
+	}
+
+	while (fgets(line, 128, in)) {
+		lineno++;
+		switch (line[0]) {
+		case '#':
+			if (memcmp(line + 2, "CONFIG_", 7))
+				continue;
+			p = strchr(line + 9, ' ');
+			if (!p)
+				continue;
+			*p++ = 0;
+			if (strncmp(p, "is not set", 10))
+				continue;
+			//printf("%s -> n\n", line + 9);
+			sym = sym_lookup(line + 9, 0);
+			switch (sym->type) {
+			case S_BOOLEAN:
+			case S_TRISTATE:
+				sym->def = symbol_no.curr;
+				sym->flags &= ~SYMBOL_NEW;
+				break;
+			default:
+				;
+			}
+			break;
+		case 'C':
+			if (memcmp(line, "CONFIG_", 7))
+				continue;
+			p = strchr(line + 7, '=');
+			if (!p)
+				continue;
+			*p++ = 0;
+			p2 = strchr(p, '\n');
+			if (p2)
+				*p2 = 0;
+			//printf("%s -> %s\n", line + 7, p);
+			sym = sym_find(line + 7);
+			if (!sym) {
+				fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 7);
+				break;
+			}
+			switch (sym->type) {
+			case S_BOOLEAN:
+				sym->def = symbol_yes.curr;
+				sym->flags &= ~SYMBOL_NEW;
+				break;
+			case S_TRISTATE:
+				if (p[0] == 'm')
+					sym->def = symbol_mod.curr;
+				else
+					sym->def = symbol_yes.curr;
+				sym->flags &= ~SYMBOL_NEW;
+				break;
+			case S_STRING:
+				if (*p++ != '"')
+					break;
+				for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
+					if (*p2 == '"') {
+						*p2 = 0;
+						break;
+					}
+					memmove(p2, p2 + 1, strlen(p2));
+				}
+			case S_INT:
+			case S_HEX:
+				if (sym_string_valid(sym, p)) {
+					S_VAL(sym->def) = strdup(p);
+					sym->flags &= ~SYMBOL_NEW;
+				} else
+					fprintf(stderr, "%s:%d:symbol value '%s' invalid for %s\n", name, lineno, p, sym->name);
+				break;
+			default:
+				;
+			}
+			if (sym_is_choice_value(sym)) {
+				prop = sym_get_choice_prop(sym);
+				switch (S_TRI(sym->def)) {
+				case mod:
+					if (S_TRI(prop->def->def) == yes)
+						/* warn? */;
+					break;
+				case yes:
+					if (S_TRI(prop->def->def) != no)
+						/* warn? */;
+					S_VAL(prop->def->def) = sym;
+					break;
+				case no:
+					break;
+				}
+				S_TRI(prop->def->def) = S_TRI(sym->def);
+			}
+			break;
+		case '\n':
+			break;
+		default:
+			continue;
+		}
+	}
+	fclose(in);
+
+	for_all_symbols(i, sym) {
+		if (!sym_is_choice(sym))
+			continue;
+		prop = sym_get_choice_prop(sym);
+		sym->flags &= ~SYMBOL_NEW;
+		for (e = prop->dep; e; e = e->left.expr)
+			sym->flags |= e->right.sym->flags & SYMBOL_NEW;
+	}
+
+	sym_change_count = 1;
+
+	return 0;
+}
+
+int conf_write(const char *name)
+{
+	FILE *out, *out_h;
+	struct symbol *sym;
+	struct menu *menu;
+	char oldname[128];
+	int type, l;
+	const char *str;
+
+	out = fopen(".tmpconfig", "w");
+	if (!out)
+		return 1;
+	out_h = fopen(".tmpconfig.h", "w");
+	if (!out_h)
+		return 1;
+	fprintf(out, "#\n"
+		     "# Automatically generated make config: don't edit\n"
+		     "#\n");
+	fprintf(out_h, "/*\n"
+		       " * Automatically generated C config: don't edit\n"
+		       " */\n"
+		       "#define AUTOCONF_INCLUDED\n");
+
+	if (!sym_change_count)
+		sym_clear_all_valid();
+
+	menu = rootmenu.list;
+	while (menu) {
+		sym = menu->sym;
+		if (!sym) {
+			if (!menu_is_visible(menu))
+				goto next;
+			str = menu_get_prompt(menu);
+			fprintf(out, "\n"
+				     "#\n"
+				     "# %s\n"
+				     "#\n", str);
+			fprintf(out_h, "\n"
+				       "/*\n"
+				       " * %s\n"
+				       " */\n", str);
+		} else if (!(sym->flags & SYMBOL_CHOICE)) {
+			sym_calc_value(sym);
+			if (!(sym->flags & SYMBOL_WRITE))
+				goto next;
+			sym->flags &= ~SYMBOL_WRITE;
+			type = sym->type;
+			if (type == S_TRISTATE) {
+				sym_calc_value(modules_sym);
+				if (S_TRI(modules_sym->curr) == no)
+					type = S_BOOLEAN;
+			}
+			switch (type) {
+			case S_BOOLEAN:
+			case S_TRISTATE:
+				switch (sym_get_tristate_value(sym)) {
+				case no:
+					fprintf(out, "# CONFIG_%s is not set\n", sym->name);
+					fprintf(out_h, "#undef CONFIG_%s\n", sym->name);
+					break;
+				case mod:
+					fprintf(out, "CONFIG_%s=m\n", sym->name);
+					fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
+					break;
+				case yes:
+					fprintf(out, "CONFIG_%s=y\n", sym->name);
+					fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
+					break;
+				}
+				break;
+			case S_STRING:
+				// fix me
+				str = sym_get_string_value(sym);
+				fprintf(out, "CONFIG_%s=\"", sym->name);
+				fprintf(out_h, "#define CONFIG_%s \"", sym->name);
+				do {
+					l = strcspn(str, "\"\\");
+					if (l) {
+						fwrite(str, l, 1, out);
+						fwrite(str, l, 1, out_h);
+					}
+					str += l;
+					while (*str == '\\' || *str == '"') {
+						fprintf(out, "\\%c", *str);
+						fprintf(out_h, "\\%c", *str);
+						str++;
+					}
+				} while (*str);
+				fputs("\"\n", out);
+				fputs("\"\n", out_h);
+				break;
+			case S_HEX:
+				str = sym_get_string_value(sym);
+				if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
+					fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+					fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
+					break;
+				}
+			case S_INT:
+				str = sym_get_string_value(sym);
+				fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+				fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
+				break;
+			}
+		}
+
+	next:
+		if (menu->list) {
+			menu = menu->list;
+			continue;
+		}
+		if (menu->next)
+			menu = menu->next;
+		else while ((menu = menu->parent)) {
+			if (menu->next) {
+				menu = menu->next;
+				break;
+			}
+		}
+	}
+	fclose(out);
+	fclose(out_h);
+
+	if (!name) {
+		rename(".tmpconfig.h", "include/linux/autoconf.h");
+		name = conf_def_filename;
+		file_write_dep(NULL);
+	} else
+		unlink(".tmpconfig.h");
+
+	sprintf(oldname, "%s.old", name);
+	rename(name, oldname);
+	if (rename(".tmpconfig", name))
+		return 1;
+	strcpy(conf_filename, name);
+
+	sym_change_count = 0;
+
+	return 0;
+}
diff -Nru a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/expr.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1054 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+struct expr *expr_alloc_symbol(struct symbol *sym)
+{
+	struct expr *e = malloc(sizeof(*e));
+	memset(e, 0, sizeof(*e));
+	e->type = E_SYMBOL;
+	e->left.sym = sym;
+	return e;
+}
+
+struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
+{
+	struct expr *e = malloc(sizeof(*e));
+	memset(e, 0, sizeof(*e));
+	e->type = type;
+	e->left.expr = ce;
+	return e;
+}
+
+struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
+{
+	struct expr *e = malloc(sizeof(*e));
+	memset(e, 0, sizeof(*e));
+	e->type = type;
+	e->left.expr = e1;
+	e->right.expr = e2;
+	return e;
+}
+
+struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
+{
+	struct expr *e = malloc(sizeof(*e));
+	memset(e, 0, sizeof(*e));
+	e->type = type;
+	e->left.sym = s1;
+	e->right.sym = s2;
+	return e;
+}
+
+struct expr *expr_alloc_and(struct expr *e1, struct expr *e2)
+{
+	if (!e1)
+		return e2;
+	return e2 ? expr_alloc_two(E_AND, e1, e2) : e1;
+}
+
+struct expr *expr_copy(struct expr *org)
+{
+	struct expr *e;
+
+	if (!org)
+		return NULL;
+
+	e = malloc(sizeof(*org));
+	memcpy(e, org, sizeof(*org));
+	switch (org->type) {
+	case E_SYMBOL:
+		e->left = org->left;
+		break;
+	case E_NOT:
+		e->left.expr = expr_copy(org->left.expr);
+		break;
+	case E_EQUAL:
+	case E_UNEQUAL:
+		e->left.sym = org->left.sym;
+		e->right.sym = org->right.sym;
+		break;
+	case E_AND:
+	case E_OR:
+	case E_CHOICE:
+		e->left.expr = expr_copy(org->left.expr);
+		e->right.expr = expr_copy(org->right.expr);
+		break;
+	default:
+		printf("can't copy type %d\n", e->type);
+		free(e);
+		e = NULL;
+		break;
+	}
+
+	return e;
+}
+
+void expr_free(struct expr *e)
+{
+	if (!e)
+		return;
+
+	switch (e->type) {
+	case E_SYMBOL:
+		break;
+	case E_NOT:
+		expr_free(e->left.expr);
+		return;
+	case E_EQUAL:
+	case E_UNEQUAL:
+		break;
+	case E_OR:
+	case E_AND:
+		expr_free(e->left.expr);
+		expr_free(e->right.expr);
+		break;
+	default:
+		printf("how to free type %d?\n", e->type);
+		break;
+	}
+	free(e);
+}
+
+static int trans_count;
+
+#define e1 (*ep1)
+#define e2 (*ep2)
+
+static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2)
+{
+	if (e1->type == type) {
+		__expr_eliminate_eq(type, &e1->left.expr, &e2);
+		__expr_eliminate_eq(type, &e1->right.expr, &e2);
+		return;
+	}
+	if (e2->type == type) {
+		__expr_eliminate_eq(type, &e1, &e2->left.expr);
+		__expr_eliminate_eq(type, &e1, &e2->right.expr);
+		return;
+	}
+	if (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
+	    e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO)))
+		return;
+	if (!expr_eq(e1, e2))
+		return;
+	trans_count++;
+	expr_free(e1); expr_free(e2);
+	switch (type) {
+	case E_OR:
+		e1 = expr_alloc_symbol(&symbol_no);
+		e2 = expr_alloc_symbol(&symbol_no);
+		break;
+	case E_AND:
+		e1 = expr_alloc_symbol(&symbol_yes);
+		e2 = expr_alloc_symbol(&symbol_yes);
+		break;
+	default:
+		;
+	}
+}
+
+void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
+{
+	if (!e1 || !e2 || e1->type != e2->type)
+		return;
+	__expr_eliminate_eq(e1->type, ep1, ep2);
+	e1 = expr_eliminate_yn(e1);
+	e2 = expr_eliminate_yn(e2);
+}
+
+#undef e1
+#undef e2
+
+int expr_eq(struct expr *e1, struct expr *e2)
+{
+	int res, old_count;
+
+	if (e1->type != e2->type)
+		return 0;
+	switch (e1->type) {
+	case E_EQUAL:
+	case E_UNEQUAL:
+		return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym;
+	case E_SYMBOL:
+		return e1->left.sym == e2->left.sym;
+	case E_NOT:
+		return expr_eq(e1->left.expr, e2->left.expr);
+	case E_AND:
+	case E_OR:
+		e1 = expr_copy(e1);
+		e2 = expr_copy(e2);
+		old_count = trans_count;
+		expr_eliminate_eq(&e1, &e2);
+		res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
+		       e1->left.sym == e2->left.sym);
+		expr_free(e1);
+		expr_free(e2);
+		trans_count = old_count;
+		return res;
+	case E_CHOICE:
+	case E_NONE:
+		/* panic */;
+	}
+
+	print_expr(0, e1, 0);
+	printf(" = ");
+	print_expr(0, e2, 0);
+	printf(" ?\n");
+
+	return 0;
+}
+
+struct expr *expr_eliminate_yn(struct expr *e)
+{
+	struct expr *tmp;
+
+	if (e) switch (e->type) {
+	case E_AND:
+		e->left.expr = expr_eliminate_yn(e->left.expr);
+		e->right.expr = expr_eliminate_yn(e->right.expr);
+		if (e->left.expr->type == E_SYMBOL) {
+			if (e->left.expr->left.sym == &symbol_no) {
+				expr_free(e->left.expr);
+				expr_free(e->right.expr);
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_no;
+				e->right.expr = NULL;
+				return e;
+			} else if (e->left.expr->left.sym == &symbol_yes) {
+				free(e->left.expr);
+				tmp = e->right.expr;
+				*e = *(e->right.expr);
+				free(tmp);
+				return e;
+			}
+		}
+		if (e->right.expr->type == E_SYMBOL) {
+			if (e->right.expr->left.sym == &symbol_no) {
+				expr_free(e->left.expr);
+				expr_free(e->right.expr);
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_no;
+				e->right.expr = NULL;
+				return e;
+			} else if (e->right.expr->left.sym == &symbol_yes) {
+				free(e->right.expr);
+				tmp = e->left.expr;
+				*e = *(e->left.expr);
+				free(tmp);
+				return e;
+			}
+		}
+		break;
+	case E_OR:
+		e->left.expr = expr_eliminate_yn(e->left.expr);
+		e->right.expr = expr_eliminate_yn(e->right.expr);
+		if (e->left.expr->type == E_SYMBOL) {
+			if (e->left.expr->left.sym == &symbol_no) {
+				free(e->left.expr);
+				tmp = e->right.expr;
+				*e = *(e->right.expr);
+				free(tmp);
+				return e;
+			} else if (e->left.expr->left.sym == &symbol_yes) {
+				expr_free(e->left.expr);
+				expr_free(e->right.expr);
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_yes;
+				e->right.expr = NULL;
+				return e;
+			}
+		}
+		if (e->right.expr->type == E_SYMBOL) {
+			if (e->right.expr->left.sym == &symbol_no) {
+				free(e->right.expr);
+				tmp = e->left.expr;
+				*e = *(e->left.expr);
+				free(tmp);
+				return e;
+			} else if (e->right.expr->left.sym == &symbol_yes) {
+				expr_free(e->left.expr);
+				expr_free(e->right.expr);
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_yes;
+				e->right.expr = NULL;
+				return e;
+			}
+		}
+		break;
+	default:
+		;
+	}
+	return e;
+}
+
+/*
+ * bool FOO!=n => FOO
+ */
+struct expr *expr_trans_bool(struct expr *e)
+{
+	if (!e)
+		return NULL;
+	switch (e->type) {
+	case E_AND:
+	case E_OR:
+	case E_NOT:
+		e->left.expr = expr_trans_bool(e->left.expr);
+		e->right.expr = expr_trans_bool(e->right.expr);
+		break;
+	case E_UNEQUAL:
+		// FOO!=n -> FOO
+		if (e->left.sym->type == S_TRISTATE) {
+			if (e->right.sym == &symbol_no) {
+				e->type = E_SYMBOL;
+				e->right.sym = NULL;
+			}
+		}
+		break;
+	default:
+		;
+	}
+	return e;
+}
+
+/*
+ * e1 || e2 -> ?
+ */
+struct expr *expr_join_or(struct expr *e1, struct expr *e2)
+{
+	struct expr *tmp;
+	struct symbol *sym1, *sym2;
+
+	if (expr_eq(e1, e2))
+		return expr_copy(e1);
+	if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
+		return NULL;
+	if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
+		return NULL;
+	if (e1->type == E_NOT) {
+		tmp = e1->left.expr;
+		if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
+			return NULL;
+		sym1 = tmp->left.sym;
+	} else
+		sym1 = e1->left.sym;
+	if (e2->type == E_NOT) {
+		if (e2->left.expr->type != E_SYMBOL)
+			return NULL;
+		sym2 = e2->left.expr->left.sym;
+	} else
+		sym2 = e2->left.sym;
+	if (sym1 != sym2)
+		return NULL;
+	if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
+		return NULL;
+	if (sym1->type == S_TRISTATE) {
+		if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
+		    ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
+		     (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) {
+			// (a='y') || (a='m') -> (a!='n')
+			return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no);
+		}
+		if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
+		    ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
+		     (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) {
+			// (a='y') || (a='n') -> (a!='m')
+			return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod);
+		}
+		if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
+		    ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
+		     (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) {
+			// (a='m') || (a='n') -> (a!='y')
+			return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
+		}
+	}
+	if (sym1->type == S_BOOLEAN && sym1 == sym2) {
+		if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
+		    (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
+			return expr_alloc_symbol(&symbol_yes);
+	}
+
+	printf("optimize ");
+	print_expr(0, e1, 0);
+	printf(" || ");
+	print_expr(0, e2, 0);
+	printf(" ?\n");
+	return NULL;
+}
+
+struct expr *expr_join_and(struct expr *e1, struct expr *e2)
+{
+	struct expr *tmp;
+	struct symbol *sym1, *sym2;
+
+	if (expr_eq(e1, e2))
+		return expr_copy(e1);
+	if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
+		return NULL;
+	if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
+		return NULL;
+	if (e1->type == E_NOT) {
+		tmp = e1->left.expr;
+		if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
+			return NULL;
+		sym1 = tmp->left.sym;
+	} else
+		sym1 = e1->left.sym;
+	if (e2->type == E_NOT) {
+		if (e2->left.expr->type != E_SYMBOL)
+			return NULL;
+		sym2 = e2->left.expr->left.sym;
+	} else
+		sym2 = e2->left.sym;
+	if (sym1 != sym2)
+		return NULL;
+	if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
+		return NULL;
+
+	if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
+	    (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes))
+		// (a) && (a='y') -> (a='y')
+		return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
+
+	if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) ||
+	    (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no))
+		// (a) && (a!='n') -> (a)
+		return expr_alloc_symbol(sym1);
+
+	if (sym1->type == S_TRISTATE) {
+		if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
+			// (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
+			sym2 = e1->right.sym;
+			if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
+				return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
+							     : expr_alloc_symbol(&symbol_no);
+		}
+		if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
+			// (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
+			sym2 = e2->right.sym;
+			if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
+				return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
+							     : expr_alloc_symbol(&symbol_no);
+		}
+		if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
+			   ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
+			    (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes)))
+			// (a!='y') && (a!='n') -> (a='m')
+			return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod);
+
+		if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
+			   ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
+			    (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes)))
+			// (a!='y') && (a!='m') -> (a='n')
+			return expr_alloc_comp(E_EQUAL, sym1, &symbol_no);
+
+		if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
+			   ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
+			    (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod)))
+			// (a!='m') && (a!='n') -> (a='m')
+			return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
+
+		if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) ||
+		    (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) ||
+		    (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) ||
+		    (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes))
+			return NULL;
+	}
+	printf("optimize ");
+	print_expr(0, e1, 0);
+	printf(" && ");
+	print_expr(0, e2, 0);
+	printf(" ?\n");
+	return NULL;
+}
+
+static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2)
+{
+#define e1 (*ep1)
+#define e2 (*ep2)
+	struct expr *tmp;
+
+	if (e1->type == type) {
+		expr_eliminate_dups1(type, &e1->left.expr, &e2);
+		expr_eliminate_dups1(type, &e1->right.expr, &e2);
+		return;
+	}
+	if (e2->type == type) {
+		expr_eliminate_dups1(type, &e1, &e2->left.expr);
+		expr_eliminate_dups1(type, &e1, &e2->right.expr);
+		return;
+	}
+	if (e1 == e2)
+		return;
+
+	switch (e1->type) {
+	case E_OR: case E_AND:
+		expr_eliminate_dups1(e1->type, &e1, &e1);
+	default:
+		;
+	}
+
+	switch (type) {
+	case E_OR:
+		tmp = expr_join_or(e1, e2);
+		if (tmp) {
+			expr_free(e1); expr_free(e2);
+			e1 = expr_alloc_symbol(&symbol_no);
+			e2 = tmp;
+			trans_count++;
+		}
+		break;
+	case E_AND:
+		tmp = expr_join_and(e1, e2);
+		if (tmp) {
+			expr_free(e1); expr_free(e2);
+			e1 = expr_alloc_symbol(&symbol_yes);
+			e2 = tmp;
+			trans_count++;
+		}
+		break;
+	default:
+		;
+	}
+#undef e1
+#undef e2
+}
+
+static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2)
+{
+#define e1 (*ep1)
+#define e2 (*ep2)
+	struct expr *tmp, *tmp1, *tmp2;
+
+	if (e1->type == type) {
+		expr_eliminate_dups2(type, &e1->left.expr, &e2);
+		expr_eliminate_dups2(type, &e1->right.expr, &e2);
+		return;
+	}
+	if (e2->type == type) {
+		expr_eliminate_dups2(type, &e1, &e2->left.expr);
+		expr_eliminate_dups2(type, &e1, &e2->right.expr);
+	}
+	if (e1 == e2)
+		return;
+
+	switch (e1->type) {
+	case E_OR:
+		expr_eliminate_dups2(e1->type, &e1, &e1);
+		// (FOO || BAR) && (!FOO && !BAR) -> n
+		tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
+		tmp2 = expr_copy(e2);
+		tmp = expr_extract_eq_and(&tmp1, &tmp2);
+		if (expr_is_yes(tmp1)) {
+			expr_free(e1);
+			e1 = expr_alloc_symbol(&symbol_no);
+			trans_count++;
+		}
+		expr_free(tmp2);
+		expr_free(tmp1);
+		expr_free(tmp);
+		break;
+	case E_AND:
+		expr_eliminate_dups2(e1->type, &e1, &e1);
+		// (FOO && BAR) || (!FOO || !BAR) -> y
+		tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
+		tmp2 = expr_copy(e2);
+		tmp = expr_extract_eq_or(&tmp1, &tmp2);
+		if (expr_is_no(tmp1)) {
+			expr_free(e1);
+			e1 = expr_alloc_symbol(&symbol_yes);
+			trans_count++;
+		}
+		expr_free(tmp2);
+		expr_free(tmp1);
+		expr_free(tmp);
+		break;
+	default:
+		;
+	}
+#undef e1
+#undef e2
+}
+
+struct expr *expr_eliminate_dups(struct expr *e)
+{
+	int oldcount;
+	if (!e)
+		return e;
+
+	oldcount = trans_count;
+	while (1) {
+		trans_count = 0;
+		switch (e->type) {
+		case E_OR: case E_AND:
+			expr_eliminate_dups1(e->type, &e, &e);
+			expr_eliminate_dups2(e->type, &e, &e);
+		default:
+			;
+		}
+		if (!trans_count)
+			break;
+		e = expr_eliminate_yn(e);
+	}
+	trans_count = oldcount;
+	return e;
+}
+
+struct expr *expr_transform(struct expr *e)
+{
+	struct expr *tmp;
+
+	if (!e)
+		return NULL;
+	switch (e->type) {
+	case E_EQUAL:
+	case E_UNEQUAL:
+	case E_SYMBOL:
+	case E_CHOICE:
+		break;
+	default:
+		e->left.expr = expr_transform(e->left.expr);
+		e->right.expr = expr_transform(e->right.expr);
+	}
+
+	switch (e->type) {
+	case E_EQUAL:
+		if (e->left.sym->type != S_BOOLEAN)
+			break;
+		if (e->right.sym == &symbol_no) {
+			e->type = E_NOT;
+			e->left.expr = expr_alloc_symbol(e->left.sym);
+			e->right.sym = NULL;
+			break;
+		}
+		if (e->right.sym == &symbol_mod) {
+			printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name);
+			e->type = E_SYMBOL;
+			e->left.sym = &symbol_no;
+			e->right.sym = NULL;
+			break;
+		}
+		if (e->right.sym == &symbol_yes) {
+			e->type = E_SYMBOL;
+			e->right.sym = NULL;
+			break;
+		}
+		break;
+	case E_UNEQUAL:
+		if (e->left.sym->type != S_BOOLEAN)
+			break;
+		if (e->right.sym == &symbol_no) {
+			e->type = E_SYMBOL;
+			e->right.sym = NULL;
+			break;
+		}
+		if (e->right.sym == &symbol_mod) {
+			printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name);
+			e->type = E_SYMBOL;
+			e->left.sym = &symbol_yes;
+			e->right.sym = NULL;
+			break;
+		}
+		if (e->right.sym == &symbol_yes) {
+			e->type = E_NOT;
+			e->left.expr = expr_alloc_symbol(e->left.sym);
+			e->right.sym = NULL;
+			break;
+		}
+		break;
+	case E_NOT:
+		switch (e->left.expr->type) {
+		case E_NOT:
+			// !!a -> a
+			tmp = e->left.expr->left.expr;
+			free(e->left.expr);
+			free(e);
+			e = tmp;
+			e = expr_transform(e);
+			break;
+		case E_EQUAL:
+		case E_UNEQUAL:
+			// !a='x' -> a!='x'
+			tmp = e->left.expr;
+			free(e);
+			e = tmp;
+			e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL;
+			break;
+		case E_OR:
+			// !(a || b) -> !a && !b
+			tmp = e->left.expr;
+			e->type = E_AND;
+			e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
+			tmp->type = E_NOT;
+			tmp->right.expr = NULL;
+			e = expr_transform(e);
+			break;
+		case E_AND:
+			// !(a && b) -> !a || !b
+			tmp = e->left.expr;
+			e->type = E_OR;
+			e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
+			tmp->type = E_NOT;
+			tmp->right.expr = NULL;
+			e = expr_transform(e);
+			break;
+		case E_SYMBOL:
+			if (e->left.expr->left.sym == &symbol_yes) {
+				// !'y' -> 'n'
+				tmp = e->left.expr;
+				free(e);
+				e = tmp;
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_no;
+				break;
+			}
+			if (e->left.expr->left.sym == &symbol_mod) {
+				// !'m' -> 'm'
+				tmp = e->left.expr;
+				free(e);
+				e = tmp;
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_mod;
+				break;
+			}
+			if (e->left.expr->left.sym == &symbol_no) {
+				// !'n' -> 'y'
+				tmp = e->left.expr;
+				free(e);
+				e = tmp;
+				e->type = E_SYMBOL;
+				e->left.sym = &symbol_yes;
+				break;
+			}
+			break;
+		default:
+			;
+		}
+		break;
+	default:
+		;
+	}
+	return e;
+}
+
+int expr_contains_symbol(struct expr *dep, struct symbol *sym)
+{
+	if (!dep)
+		return 0;
+
+	switch (dep->type) {
+	case E_AND:
+	case E_OR:
+		return expr_contains_symbol(dep->left.expr, sym) ||
+		       expr_contains_symbol(dep->right.expr, sym);
+	case E_SYMBOL:
+		return dep->left.sym == sym;
+	case E_EQUAL:
+	case E_UNEQUAL:
+		return dep->left.sym == sym ||
+		       dep->right.sym == sym;
+	case E_NOT:
+		return expr_contains_symbol(dep->left.expr, sym);
+	default:
+		;
+	}
+	return 0;
+}
+
+bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
+{
+	if (!dep)
+		return false;
+
+	switch (dep->type) {
+	case E_AND:
+		return expr_depends_symbol(dep->left.expr, sym) ||
+		       expr_depends_symbol(dep->right.expr, sym);
+	case E_SYMBOL:
+		return dep->left.sym == sym;
+	case E_EQUAL:
+		if (dep->left.sym == sym) {
+			if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod)
+				return true;
+		}
+		break;
+	case E_UNEQUAL:
+		if (dep->left.sym == sym) {
+			if (dep->right.sym == &symbol_no)
+				return true;
+		}
+		break;
+	default:
+		;
+	}
+ 	return false;
+}
+
+struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
+{
+	struct expr *tmp = NULL;
+	expr_extract_eq(E_AND, &tmp, ep1, ep2);
+	if (tmp) {
+		*ep1 = expr_eliminate_yn(*ep1);
+		*ep2 = expr_eliminate_yn(*ep2);
+	}
+	return tmp;
+}
+
+struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
+{
+	struct expr *tmp = NULL;
+	expr_extract_eq(E_OR, &tmp, ep1, ep2);
+	if (tmp) {
+		*ep1 = expr_eliminate_yn(*ep1);
+		*ep2 = expr_eliminate_yn(*ep2);
+	}
+	return tmp;
+}
+
+void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
+{
+#define e1 (*ep1)
+#define e2 (*ep2)
+	if (e1->type == type) {
+		expr_extract_eq(type, ep, &e1->left.expr, &e2);
+		expr_extract_eq(type, ep, &e1->right.expr, &e2);
+		return;
+	}
+	if (e2->type == type) {
+		expr_extract_eq(type, ep, ep1, &e2->left.expr);
+		expr_extract_eq(type, ep, ep1, &e2->right.expr);
+		return;
+	}
+	if (expr_eq(e1, e2)) {
+		*ep = *ep ? expr_alloc_two(type, *ep, e1) : e1;
+		expr_free(e2);
+		if (type == E_AND) {
+			e1 = expr_alloc_symbol(&symbol_yes);
+			e2 = expr_alloc_symbol(&symbol_yes);
+		} else if (type == E_OR) {
+			e1 = expr_alloc_symbol(&symbol_no);
+			e2 = expr_alloc_symbol(&symbol_no);
+		}
+	}
+#undef e1
+#undef e2
+}
+
+struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym)
+{
+	struct expr *e1, *e2;
+
+	if (!e) {
+		e = expr_alloc_symbol(sym);
+		if (type == E_UNEQUAL)
+			e = expr_alloc_one(E_NOT, e);
+		return e;
+	}
+	switch (e->type) {
+	case E_AND:
+		e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
+		e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
+		if (sym == &symbol_yes)
+			e = expr_alloc_two(E_AND, e1, e2);
+		if (sym == &symbol_no)
+			e = expr_alloc_two(E_OR, e1, e2);
+		if (type == E_UNEQUAL)
+			e = expr_alloc_one(E_NOT, e);
+		return e;
+	case E_OR:
+		e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
+		e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
+		if (sym == &symbol_yes)
+			e = expr_alloc_two(E_OR, e1, e2);
+		if (sym == &symbol_no)
+			e = expr_alloc_two(E_AND, e1, e2);
+		if (type == E_UNEQUAL)
+			e = expr_alloc_one(E_NOT, e);
+		return e;
+	case E_NOT:
+		return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym);
+	case E_UNEQUAL:
+	case E_EQUAL:
+		if (type == E_EQUAL) {
+			if (sym == &symbol_yes)
+				return expr_copy(e);
+			if (sym == &symbol_mod)
+				return expr_alloc_symbol(&symbol_no);
+			if (sym == &symbol_no)
+				return expr_alloc_one(E_NOT, expr_copy(e));
+		} else {
+			if (sym == &symbol_yes)
+				return expr_alloc_one(E_NOT, expr_copy(e));
+			if (sym == &symbol_mod)
+				return expr_alloc_symbol(&symbol_yes);
+			if (sym == &symbol_no)
+				return expr_copy(e);
+		}
+		break;
+	case E_SYMBOL:
+		return expr_alloc_comp(type, e->left.sym, sym);
+	case E_CHOICE:
+	case E_NONE:
+		/* panic */;
+	}
+	return NULL;
+}
+
+tristate expr_calc_value(struct expr *e)
+{
+	tristate val1, val2;
+	const char *str1, *str2;
+
+	if (!e)
+		return yes;
+
+	switch (e->type) {
+	case E_SYMBOL:
+		sym_calc_value(e->left.sym);
+		return S_TRI(e->left.sym->curr);
+	case E_AND:
+		val1 = expr_calc_value(e->left.expr);
+		val2 = expr_calc_value(e->right.expr);
+		return E_AND(val1, val2);
+	case E_OR:
+		val1 = expr_calc_value(e->left.expr);
+		val2 = expr_calc_value(e->right.expr);
+		return E_OR(val1, val2);
+	case E_NOT:
+		val1 = expr_calc_value(e->left.expr);
+		return E_NOT(val1);
+	case E_EQUAL:
+		sym_calc_value(e->left.sym);
+		sym_calc_value(e->right.sym);
+		str1 = sym_get_string_value(e->left.sym);
+		str2 = sym_get_string_value(e->right.sym);
+		return !strcmp(str1, str2) ? yes : no;
+	case E_UNEQUAL:
+		sym_calc_value(e->left.sym);
+		sym_calc_value(e->right.sym);
+		str1 = sym_get_string_value(e->left.sym);
+		str2 = sym_get_string_value(e->right.sym);
+		return !strcmp(str1, str2) ? no : yes;
+	default:
+		printf("expr_calc_value: %d?\n", e->type);
+		return no;
+	}
+}
+
+int expr_compare_type(enum expr_type t1, enum expr_type t2)
+{
+#if 0
+	return 1;
+#else
+	if (t1 == t2)
+		return 0;
+	switch (t1) {
+	case E_EQUAL:
+	case E_UNEQUAL:
+		if (t2 == E_NOT)
+			return 1;
+	case E_NOT:
+		if (t2 == E_AND)
+			return 1;
+	case E_AND:
+		if (t2 == E_OR)
+			return 1;
+	case E_OR:
+		if (t2 == E_CHOICE)
+			return 1;
+	case E_CHOICE:
+		if (t2 == 0)
+			return 1;
+	default:
+		return -1;
+	}
+	printf("[%dgt%d?]", t1, t2);
+	return 0;
+#endif
+}
+
+void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)
+{
+	if (!e) {
+		fn(data, "y");
+		return;
+	}
+
+	if (expr_compare_type(prevtoken, e->type) > 0)
+		fn(data, "(");
+	switch (e->type) {
+	case E_SYMBOL:
+		if (e->left.sym->name)
+			fn(data, e->left.sym->name);
+		else
+			fn(data, "<choice>");
+		break;
+	case E_NOT:
+		fn(data, "!");
+		expr_print(e->left.expr, fn, data, E_NOT);
+		break;
+	case E_EQUAL:
+		fn(data, e->left.sym->name);
+		fn(data, "=");
+		fn(data, e->right.sym->name);
+		break;
+	case E_UNEQUAL:
+		fn(data, e->left.sym->name);
+		fn(data, "!=");
+		fn(data, e->right.sym->name);
+		break;
+	case E_OR:
+		expr_print(e->left.expr, fn, data, E_OR);
+		fn(data, " || ");
+		expr_print(e->right.expr, fn, data, E_OR);
+		break;
+	case E_AND:
+		expr_print(e->left.expr, fn, data, E_AND);
+		fn(data, " && ");
+		expr_print(e->right.expr, fn, data, E_AND);
+		break;
+	case E_CHOICE:
+		if (e->left.expr) {
+			expr_print(e->left.expr, fn, data, E_CHOICE);
+			fn(data, " ^ ");
+		}
+		fn(data, e->right.sym->name);
+		break;
+	default:
+	  {
+		char buf[32];
+		sprintf(buf, "<unknown type %d>", e->type);
+		fn(data, buf);
+		break;
+	  }
+	}
+	if (expr_compare_type(prevtoken, e->type) > 0)
+		fn(data, ")");
+}
+
+static void expr_print_file_helper(void *data, const char *str)
+{
+	fwrite(str, strlen(str), 1, data);
+}
+
+void expr_fprint(struct expr *e, FILE *out)
+{
+	expr_print(e, expr_print_file_helper, out, E_NONE);
+}
+
+void print_expr(int mask, struct expr *e, int prevtoken)
+{
+	if (!(cdebug & mask))
+		return;
+	expr_fprint(e, stdout);
+}
+
diff -Nru a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/expr.h	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#ifndef EXPR_H
+#define EXPR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#ifndef __cplusplus
+#include <stdbool.h>
+#endif
+
+struct file {
+	struct file *next;
+	struct file *parent;
+#ifdef CML1
+	struct statement *stmt;
+	struct statement *last_stmt;
+#endif
+	char *name;
+	int lineno;
+	int flags;
+};
+
+#define FILE_BUSY		0x0001
+#define FILE_SCANNED		0x0002
+#define FILE_PRINTED		0x0004
+
+typedef enum tristate {
+	no, mod, yes
+} tristate;
+
+enum expr_type {
+	E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL
+};
+
+union expr_data {
+	struct expr *expr;
+	struct symbol *sym;
+};
+
+struct expr {
+#ifdef CML1
+	int token;
+#else
+	enum expr_type type;
+#endif
+	union expr_data left, right;
+};
+
+#define E_TRI(ev)	((ev).tri)
+#define E_EXPR(ev)	((ev).expr)
+#define E_CALC(ev)	(E_TRI(ev) = expr_calc_value(E_EXPR(ev)))
+
+#define E_OR(dep1, dep2)	(((dep1)>(dep2))?(dep1):(dep2))
+#define E_AND(dep1, dep2)	(((dep1)<(dep2))?(dep1):(dep2))
+#define E_NOT(dep)		(2-(dep))
+
+struct expr_value {
+	struct expr *expr;
+	tristate tri;
+};
+
+#define S_VAL(sv)	((sv).value)
+#define S_TRI(sv)	((sv).tri)
+#define S_EQ(sv1, sv2)	(S_VAL(sv1) == S_VAL(sv2) || !strcmp(S_VAL(sv1), S_VAL(sv2)))
+
+struct symbol_value {
+	void *value;
+	tristate tri;
+};
+
+enum symbol_type {
+	S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
+};
+
+struct symbol {
+	struct symbol *next;
+	char *name;
+	char *help;
+#ifdef CML1
+	int type;
+#else
+	enum symbol_type type;
+#endif
+	struct symbol_value curr, def;
+	tristate visible;
+	int flags;
+	struct property *prop;
+	struct expr *dep, *dep2;
+	struct menu *menu;
+};
+
+#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
+
+#ifdef CML1
+#define SYMBOL_UNKNOWN		S_UNKNOWN
+#define SYMBOL_BOOLEAN		S_BOOLEAN
+#define SYMBOL_TRISTATE		S_TRISTATE
+#define SYMBOL_INT		S_INT
+#define SYMBOL_HEX		S_HEX
+#define SYMBOL_STRING		S_STRING
+#define SYMBOL_OTHER		S_OTHER
+#endif
+
+#define SYMBOL_YES		0x0001
+#define SYMBOL_MOD		0x0002
+#define SYMBOL_NO		0x0004
+#define SYMBOL_CONST		0x0007
+#define SYMBOL_CHECK		0x0008
+#define SYMBOL_CHOICE		0x0010
+#define SYMBOL_CHOICEVAL	0x0020
+#define SYMBOL_PRINTED		0x0040
+#define SYMBOL_VALID		0x0080
+#define SYMBOL_OPTIONAL		0x0100
+#define SYMBOL_WRITE		0x0200
+#define SYMBOL_CHANGED		0x0400
+#define SYMBOL_NEW		0x0800
+#define SYMBOL_AUTO		0x1000
+
+#define SYMBOL_MAXLENGTH	256
+#define SYMBOL_HASHSIZE		257
+#define SYMBOL_HASHMASK		0xff
+
+enum prop_type {
+	P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_ROOTMENU, P_DEFAULT, P_CHOICE
+};
+
+struct property {
+	struct property *next;
+	struct symbol *sym;
+#ifdef CML1
+	int token;
+#else
+	enum prop_type type;
+#endif
+	const char *text;
+	struct symbol *def;
+	struct expr_value visible;
+	struct expr *dep;
+	struct expr *dep2;
+	struct menu *menu;
+	struct file *file;
+	int lineno;
+#ifdef CML1
+	struct property *next_pos;
+#endif
+};
+
+#define for_all_properties(sym, st, tok) \
+	for (st = sym->prop; st; st = st->next) \
+		if (st->type == (tok))
+#define for_all_prompts(sym, st) for_all_properties(sym, st, P_PROMPT)
+#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT)
+#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE)
+
+struct menu {
+	struct menu *next;
+	struct menu *parent;
+	struct menu *list;
+	struct symbol *sym;
+	struct property *prompt;
+	struct expr *dep;
+	//char *help;
+	struct file *file;
+	int lineno;
+	//void *data;
+};
+
+#ifndef SWIG
+
+extern struct file *file_list;
+extern struct file *current_file;
+struct file *lookup_file(const char *name);
+
+extern struct symbol symbol_yes, symbol_no, symbol_mod;
+extern struct symbol *modules_sym;
+extern int cdebug;
+extern int print_type;
+struct expr *expr_alloc_symbol(struct symbol *sym);
+#ifdef CML1
+struct expr *expr_alloc_one(int token, struct expr *ce);
+struct expr *expr_alloc_two(int token, struct expr *e1, struct expr *e2);
+struct expr *expr_alloc_comp(int token, struct symbol *s1, struct symbol *s2);
+#else
+struct expr *expr_alloc_one(enum expr_type type, struct expr *ce);
+struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2);
+struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
+#endif
+struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
+struct expr *expr_copy(struct expr *org);
+void expr_free(struct expr *e);
+int expr_eq(struct expr *e1, struct expr *e2);
+void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
+tristate expr_calc_value(struct expr *e);
+struct expr *expr_eliminate_yn(struct expr *e);
+struct expr *expr_trans_bool(struct expr *e);
+struct expr *expr_eliminate_dups(struct expr *e);
+struct expr *expr_transform(struct expr *e);
+int expr_contains_symbol(struct expr *dep, struct symbol *sym);
+bool expr_depends_symbol(struct expr *dep, struct symbol *sym);
+struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
+struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
+void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
+struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
+
+void expr_fprint(struct expr *e, FILE *out);
+void print_expr(int mask, struct expr *e, int prevtoken);
+
+#ifdef CML1
+static inline int expr_is_yes(struct expr *e)
+{
+	return !e || (e->token == WORD && e->left.sym == &symbol_yes);
+}
+
+static inline int expr_is_no(struct expr *e)
+{
+	return e && (e->token == WORD && e->left.sym == &symbol_no);
+}
+#else
+static inline int expr_is_yes(struct expr *e)
+{
+	return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes);
+}
+
+static inline int expr_is_no(struct expr *e)
+{
+	return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
+}
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EXPR_H */
diff -Nru a/scripts/kconfig/images.c b/scripts/kconfig/images.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/images.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,292 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+static const char *xpm_load[] = {
+"22 22 5 1",
+". c None",
+"# c #000000",
+"c c #838100",
+"a c #ffff00",
+"b c #ffffff",
+"......................",
+"......................",
+"......................",
+"............####....#.",
+"...........#....##.##.",
+"..................###.",
+".................####.",
+".####...........#####.",
+"#abab##########.......",
+"#babababababab#.......",
+"#ababababababa#.......",
+"#babababababab#.......",
+"#ababab###############",
+"#babab##cccccccccccc##",
+"#abab##cccccccccccc##.",
+"#bab##cccccccccccc##..",
+"#ab##cccccccccccc##...",
+"#b##cccccccccccc##....",
+"###cccccccccccc##.....",
+"##cccccccccccc##......",
+"###############.......",
+"......................"};
+
+static const char *xpm_save[] = {
+"22 22 5 1",
+". c None",
+"# c #000000",
+"a c #838100",
+"b c #c5c2c5",
+"c c #cdb6d5",
+"......................",
+".####################.",
+".#aa#bbbbbbbbbbbb#bb#.",
+".#aa#bbbbbbbbbbbb#bb#.",
+".#aa#bbbbbbbbbcbb####.",
+".#aa#bbbccbbbbbbb#aa#.",
+".#aa#bbbccbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aa#bbbbbbbbbbbb#aa#.",
+".#aaa############aaa#.",
+".#aaaaaaaaaaaaaaaaaa#.",
+".#aaaaaaaaaaaaaaaaaa#.",
+".#aaa#############aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+".#aaa#########bbb#aa#.",
+"..##################..",
+"......................"};
+
+static const char *xpm_back[] = {
+"22 22 3 1",
+". c None",
+"# c #000083",
+"a c #838183",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................",
+"...........######a....",
+"..#......##########...",
+"..##...####......##a..",
+"..###.###.........##..",
+"..######..........##..",
+"..#####...........##..",
+"..######..........##..",
+"..#######.........##..",
+"..########.......##a..",
+"...............a###...",
+"...............###....",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................"};
+
+static const char *xpm_tree_view[] = {
+"22 22 2 1",
+". c None",
+"# c #000000",
+"......................",
+"......................",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......########........",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......########........",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......#...............",
+"......########........",
+"......................",
+"......................"};
+
+static const char *xpm_single_view[] = {
+"22 22 2 1",
+". c None",
+"# c #000000",
+"......................",
+"......................",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"..........#...........",
+"......................",
+"......................"};
+
+static const char *xpm_split_view[] = {
+"22 22 2 1",
+". c None",
+"# c #000000",
+"......................",
+"......................",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......#......#........",
+"......................",
+"......................"};
+
+static const char *xpm_symbol_no[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_symbol_mod[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .        . ",
+" .   ..   . ",
+" .  ....  . ",
+" .  ....  . ",
+" .   ..   . ",
+" .        . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_symbol_yes[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" .        . ",
+" .      . . ",
+" .     .. . ",
+" . .  ..  . ",
+" . ....   . ",
+" .  ..    . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_choice_no[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+"    ....    ",
+"  ..    ..  ",
+"  .      .  ",
+" .        . ",
+" .        . ",
+" .        . ",
+" .        . ",
+"  .      .  ",
+"  ..    ..  ",
+"    ....    ",
+"            "};
+
+static const char *xpm_choice_yes[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+"    ....    ",
+"  ..    ..  ",
+"  .      .  ",
+" .   ..   . ",
+" .  ....  . ",
+" .  ....  . ",
+" .   ..   . ",
+"  .      .  ",
+"  ..    ..  ",
+"    ....    ",
+"            "};
+
+static const char *xpm_menu[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .        . ",
+" . ..     . ",
+" . ....   . ",
+" . ...... . ",
+" . ...... . ",
+" . ....   . ",
+" . ..     . ",
+" .        . ",
+" .......... ",
+"            "};
+
+static const char *xpm_menu_inv[] = {
+"12 12 2 1",
+"  c white",
+". c black",
+"            ",
+" .......... ",
+" .......... ",
+" ..  ...... ",
+" ..    .... ",
+" ..      .. ",
+" ..      .. ",
+" ..    .... ",
+" ..  ...... ",
+" .......... ",
+" .......... ",
+"            "};
diff -Nru a/scripts/kconfig/kconfig_load.c b/scripts/kconfig/kconfig_load.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/kconfig_load.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,35 @@
+#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "lkc.h"
+
+#define P(name,type,arg)	type (*name ## _p) arg
+#include "lkc_proto.h"
+#undef P
+
+void kconfig_load(void)
+{
+	void *handle;
+	char *error;
+
+	handle = dlopen("./libkconfig.so", RTLD_LAZY);
+	if (!handle) {
+		handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
+		if (!handle) {
+			fprintf(stderr, "%s\n", dlerror());
+			exit(1);
+		}
+	}
+
+#define P(name,type,arg)			\
+{						\
+	name ## _p = dlsym(handle, #name);	\
+        if ((error = dlerror()))  {		\
+                fprintf(stderr, "%s\n", error);	\
+		exit(1);			\
+	}					\
+}
+#include "lkc_proto.h"
+#undef P
+}
diff -Nru a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/lex.zconf.c_shipped	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,3270 @@
+#define yy_create_buffer zconf_create_buffer
+#define yy_delete_buffer zconf_delete_buffer
+#define yy_scan_buffer zconf_scan_buffer
+#define yy_scan_string zconf_scan_string
+#define yy_scan_bytes zconf_scan_bytes
+#define yy_flex_debug zconf_flex_debug
+#define yy_init_buffer zconf_init_buffer
+#define yy_flush_buffer zconf_flush_buffer
+#define yy_load_buffer_state zconf_load_buffer_state
+#define yy_switch_to_buffer zconf_switch_to_buffer
+#define yyin zconfin
+#define yyleng zconfleng
+#define yylex zconflex
+#define yyout zconfout
+#define yyrestart zconfrestart
+#define yytext zconftext
+
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <errno.h>
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+static yyconst short yy_nxt[][37] =
+    {
+    {
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0
+    },
+
+    {
+       11,   12,   13,   14,   12,   12,   15,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12
+    },
+
+    {
+       11,   12,   13,   14,   12,   12,   15,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12
+    },
+
+    {
+       11,   16,   16,   17,   16,   16,   16,   16,   16,   16,
+       16,   16,   16,   18,   16,   16,   18,   19,   20,   21,
+       22,   18,   18,   23,   24,   18,   25,   18,   26,   27,
+       18,   28,   29,   30,   18,   18,   16
+    },
+
+    {
+       11,   16,   16,   17,   16,   16,   16,   16,   16,   16,
+       16,   16,   16,   18,   16,   16,   18,   19,   20,   21,
+       22,   18,   18,   23,   24,   18,   25,   18,   26,   27,
+       18,   28,   29,   30,   18,   18,   16
+
+    },
+
+    {
+       11,   31,   32,   33,   31,   31,   31,   31,   31,   31,
+       31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
+       31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
+       31,   31,   31,   31,   31,   31,   31
+    },
+
+    {
+       11,   31,   32,   33,   31,   31,   31,   31,   31,   31,
+       31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
+       31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
+       31,   31,   31,   31,   31,   31,   31
+    },
+
+    {
+       11,   34,   34,   35,   34,   36,   34,   34,   36,   34,
+       34,   34,   34,   34,   34,   37,   34,   34,   34,   34,
+
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34
+    },
+
+    {
+       11,   34,   34,   35,   34,   36,   34,   34,   36,   34,
+       34,   34,   34,   34,   34,   37,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
+       34,   34,   34,   34,   34,   34,   34
+    },
+
+    {
+       11,   38,   38,   39,   40,   41,   38,   42,   41,   43,
+       44,   45,   46,   46,   47,   38,   46,   46,   46,   46,
+       46,   46,   46,   46,   48,   46,   46,   46,   49,   46,
+       46,   46,   46,   46,   46,   46,   50
+
+    },
+
+    {
+       11,   38,   38,   39,   40,   41,   38,   42,   41,   43,
+       44,   45,   46,   46,   47,   38,   46,   46,   46,   46,
+       46,   46,   46,   46,   48,   46,   46,   46,   49,   46,
+       46,   46,   46,   46,   46,   46,   50
+    },
+
+    {
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
+      -11,  -11,  -11,  -11,  -11,  -11,  -11
+    },
+
+    {
+       11,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+
+      -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
+      -12,  -12,  -12,  -12,  -12,  -12,  -12
+    },
+
+    {
+       11,  -13,   51,   52,  -13,  -13,   53,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
+      -13,  -13,  -13,  -13,  -13,  -13,  -13
+    },
+
+    {
+       11,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
+      -14,  -14,  -14,  -14,  -14,  -14,  -14
+
+    },
+
+    {
+       11,   54,   54,   55,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54
+    },
+
+    {
+       11,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
+      -16,  -16,  -16,  -16,  -16,  -16,  -16
+    },
+
+    {
+       11,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+
+      -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
+      -17,  -17,  -17,  -17,  -17,  -17,  -17
+    },
+
+    {
+       11,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
+      -18,  -18,  -18,   56,  -18,  -18,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -18
+    },
+
+    {
+       11,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
+      -19,  -19,  -19,   56,  -19,  -19,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   57,   56,
+       56,   56,   56,   56,   56,   56,  -19
+
+    },
+
+    {
+       11,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,
+      -20,  -20,  -20,   56,  -20,  -20,   56,   56,   56,   56,
+       56,   56,   56,   58,   56,   56,   56,   56,   59,   56,
+       56,   56,   56,   56,   56,   56,  -20
+    },
+
+    {
+       11,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
+      -21,  -21,  -21,   56,  -21,  -21,   56,   56,   56,   56,
+       60,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -21
+    },
+
+    {
+       11,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
+      -22,  -22,  -22,   56,  -22,  -22,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   61,   56,   56,
+       56,   56,   56,   56,   56,   56,  -22
+    },
+
+    {
+       11,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
+      -23,  -23,  -23,   56,  -23,  -23,   56,   56,   56,   56,
+       62,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -23
+    },
+
+    {
+       11,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
+      -24,  -24,  -24,   56,  -24,  -24,   56,   56,   56,   56,
+       56,   63,   56,   56,   56,   56,   56,   64,   56,   56,
+       56,   56,   56,   56,   56,   56,  -24
+
+    },
+
+    {
+       11,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
+      -25,  -25,  -25,   56,  -25,  -25,   65,   56,   56,   56,
+       66,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -25
+    },
+
+    {
+       11,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
+      -26,  -26,  -26,   56,  -26,  -26,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   67,
+       56,   56,   56,   56,   56,   56,  -26
+    },
+
+    {
+       11,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
+      -27,  -27,  -27,   56,  -27,  -27,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   68,   56,   56,   56,   56,  -27
+    },
+
+    {
+       11,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
+      -28,  -28,  -28,   56,  -28,  -28,   56,   56,   56,   56,
+       69,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -28
+    },
+
+    {
+       11,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
+      -29,  -29,  -29,   56,  -29,  -29,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   70,   56,
+       56,   56,   56,   71,   56,   56,  -29
+
+    },
+
+    {
+       11,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
+      -30,  -30,  -30,   56,  -30,  -30,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   72,   56,   56,   56,   56,  -30
+    },
+
+    {
+       11,   73,   73,  -31,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73
+    },
+
+    {
+       11,  -32,   74,   75,  -32,  -32,  -32,  -32,  -32,  -32,
+      -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
+
+      -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
+      -32,  -32,  -32,  -32,  -32,  -32,  -32
+    },
+
+    {
+       11,   76,  -33,  -33,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76
+    },
+
+    {
+       11,   77,   77,  -34,   77,  -34,   77,   77,  -34,   77,
+       77,   77,   77,   77,   77,  -34,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77
+
+    },
+
+    {
+       11,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
+      -35,  -35,  -35,  -35,  -35,  -35,  -35
+    },
+
+    {
+       11,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
+      -36,  -36,  -36,  -36,  -36,  -36,  -36
+    },
+
+    {
+       11,   78,   79,   80,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78
+    },
+
+    {
+       11,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
+      -38,  -38,  -38,  -38,  -38,  -38,  -38
+    },
+
+    {
+       11,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,
+      -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,
+      -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,  -39,
+      -39,  -39,  -39,  -39,  -39,  -39,  -39
+
+    },
+
+    {
+       11,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,
+      -40,  -40,  -40,  -40,   81,  -40,  -40,  -40,  -40,  -40,
+      -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,
+      -40,  -40,  -40,  -40,  -40,  -40,  -40
+    },
+
+    {
+       11,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,
+      -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,
+      -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,  -41,
+      -41,  -41,  -41,  -41,  -41,  -41,  -41
+    },
+
+    {
+       11,  -42,  -42,  -42,  -42,  -42,  -42,   82,  -42,  -42,
+      -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,
+
+      -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,
+      -42,  -42,  -42,  -42,  -42,  -42,  -42
+    },
+
+    {
+       11,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
+      -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
+      -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
+      -43,  -43,  -43,  -43,  -43,  -43,  -43
+    },
+
+    {
+       11,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,
+      -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,
+      -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,
+      -44,  -44,  -44,  -44,  -44,  -44,  -44
+
+    },
+
+    {
+       11,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,
+      -45,   83,   84,   84,  -45,  -45,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -45
+    },
+
+    {
+       11,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,
+      -46,   84,   84,   84,  -46,  -46,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -46
+    },
+
+    {
+       11,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,
+      -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,
+
+      -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,  -47,
+      -47,  -47,  -47,  -47,  -47,  -47,  -47
+    },
+
+    {
+       11,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,
+      -48,   84,   84,   84,  -48,  -48,   84,   84,   84,   84,
+       84,   85,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -48
+    },
+
+    {
+       11,  -49,  -49,  -49,  -49,  -49,  -49,  -49,  -49,  -49,
+      -49,   84,   84,   84,  -49,  -49,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   86,   84,   84,
+       84,   84,   84,   84,   84,   84,  -49
+
+    },
+
+    {
+       11,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
+      -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
+      -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
+      -50,  -50,  -50,  -50,  -50,  -50,   87
+    },
+
+    {
+       11,  -51,   51,   52,  -51,  -51,   53,  -51,  -51,  -51,
+      -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,
+      -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,
+      -51,  -51,  -51,  -51,  -51,  -51,  -51
+    },
+
+    {
+       11,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
+      -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
+
+      -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
+      -52,  -52,  -52,  -52,  -52,  -52,  -52
+    },
+
+    {
+       11,   54,   54,   55,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54
+    },
+
+    {
+       11,   54,   54,   55,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
+       54,   54,   54,   54,   54,   54,   54
+
+    },
+
+    {
+       11,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
+      -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
+      -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
+      -55,  -55,  -55,  -55,  -55,  -55,  -55
+    },
+
+    {
+       11,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,
+      -56,  -56,  -56,   56,  -56,  -56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -56
+    },
+
+    {
+       11,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,
+      -57,  -57,  -57,   56,  -57,  -57,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   88,   56,
+       56,   56,   56,   56,   56,   56,  -57
+    },
+
+    {
+       11,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,
+      -58,  -58,  -58,   56,  -58,  -58,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   89,   56,
+       56,   56,   56,   56,   56,   56,  -58
+    },
+
+    {
+       11,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,
+      -59,  -59,  -59,   56,  -59,  -59,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   90,   91,   56,   56,
+       56,   56,   56,   56,   56,   56,  -59
+
+    },
+
+    {
+       11,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,
+      -60,  -60,  -60,   56,  -60,  -60,   56,   56,   56,   56,
+       56,   92,   56,   56,   56,   56,   56,   56,   56,   93,
+       56,   56,   56,   56,   56,   56,  -60
+    },
+
+    {
+       11,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,
+      -61,  -61,  -61,   56,  -61,  -61,   56,   56,   56,   94,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -61
+    },
+
+    {
+       11,  -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62,
+      -62,  -62,  -62,   56,  -62,  -62,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   95,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   96,  -62
+    },
+
+    {
+       11,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,
+      -63,  -63,  -63,   56,  -63,  -63,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -63
+    },
+
+    {
+       11,  -64,  -64,  -64,  -64,  -64,  -64,  -64,  -64,  -64,
+      -64,  -64,  -64,   56,  -64,  -64,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   97,   56,   56,  -64
+
+    },
+
+    {
+       11,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,
+      -65,  -65,  -65,   56,  -65,  -65,   56,   56,   56,   56,
+       56,   56,   56,   56,   98,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -65
+    },
+
+    {
+       11,  -66,  -66,  -66,  -66,  -66,  -66,  -66,  -66,  -66,
+      -66,  -66,  -66,   56,  -66,  -66,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   99,   56,   56,
+       56,   56,   56,   56,   56,   56,  -66
+    },
+
+    {
+       11,  -67,  -67,  -67,  -67,  -67,  -67,  -67,  -67,  -67,
+      -67,  -67,  -67,   56,  -67,  -67,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,  100,   56,   56,  -67
+    },
+
+    {
+       11,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,
+      -68,  -68,  -68,   56,  -68,  -68,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,  101,   56,
+       56,   56,   56,   56,   56,   56,  -68
+    },
+
+    {
+       11,  -69,  -69,  -69,  -69,  -69,  -69,  -69,  -69,  -69,
+      -69,  -69,  -69,   56,  -69,  -69,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+      102,   56,   56,   56,   56,   56,  -69
+
+    },
+
+    {
+       11,  -70,  -70,  -70,  -70,  -70,  -70,  -70,  -70,  -70,
+      -70,  -70,  -70,   56,  -70,  -70,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,  103,   56,  -70
+    },
+
+    {
+       11,  -71,  -71,  -71,  -71,  -71,  -71,  -71,  -71,  -71,
+      -71,  -71,  -71,   56,  -71,  -71,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,  104,   56,   56,   56,   56,  -71
+    },
+
+    {
+       11,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,
+      -72,  -72,  -72,   56,  -72,  -72,   56,   56,   56,   56,
+
+       56,   56,   56,   56,  105,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -72
+    },
+
+    {
+       11,   73,   73,  -73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73
+    },
+
+    {
+       11,  -74,   74,   75,  -74,  -74,  -74,  -74,  -74,  -74,
+      -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
+      -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
+      -74,  -74,  -74,  -74,  -74,  -74,  -74
+
+    },
+
+    {
+       11,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
+      -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
+      -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
+      -75,  -75,  -75,  -75,  -75,  -75,  -75
+    },
+
+    {
+       11,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,
+      -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,
+      -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,  -76,
+      -76,  -76,  -76,  -76,  -76,  -76,  -76
+    },
+
+    {
+       11,   77,   77,  -77,   77,  -77,   77,   77,  -77,   77,
+       77,   77,   77,   77,   77,  -77,   77,   77,   77,   77,
+
+       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77
+    },
+
+    {
+       11,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
+      -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
+      -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
+      -78,  -78,  -78,  -78,  -78,  -78,  -78
+    },
+
+    {
+       11,  -79,  106,   80,  -79,  -79,  -79,  -79,  -79,  -79,
+      -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
+      -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
+      -79,  -79,  -79,  -79,  -79,  -79,  -79
+
+    },
+
+    {
+       11,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
+      -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
+      -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
+      -80,  -80,  -80,  -80,  -80,  -80,  -80
+    },
+
+    {
+       11,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,
+      -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,
+      -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,  -81,
+      -81,  -81,  -81,  -81,  -81,  -81,  -81
+    },
+
+    {
+       11,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,
+      -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,
+
+      -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,  -82,
+      -82,  -82,  -82,  -82,  -82,  -82,  -82
+    },
+
+    {
+       11,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
+      -83,  107,   84,   84,  -83,  -83,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -83
+    },
+
+    {
+       11,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
+      -84,   84,   84,   84,  -84,  -84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -84
+
+    },
+
+    {
+       11,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,
+      -85,   84,   84,   84,  -85,  -85,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -85
+    },
+
+    {
+       11,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,
+      -86,   84,   84,   84,  -86,  -86,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84,  -86
+    },
+
+    {
+       11,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
+      -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
+
+      -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
+      -87,  -87,  -87,  -87,  -87,  -87,  -87
+    },
+
+    {
+       11,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,
+      -88,  -88,  -88,   56,  -88,  -88,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,  108,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -88
+    },
+
+    {
+       11,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
+      -89,  -89,  -89,   56,  -89,  -89,   56,   56,   56,   56,
+       56,   56,   56,   56,  109,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -89
+
+    },
+
+    {
+       11,  -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,
+      -90,  -90,  -90,   56,  -90,  -90,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  110,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -90
+    },
+
+    {
+       11,  -91,  -91,  -91,  -91,  -91,  -91,  -91,  -91,  -91,
+      -91,  -91,  -91,   56,  -91,  -91,   56,   56,   56,   56,
+       56,  111,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -91
+    },
+
+    {
+       11,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,
+      -92,  -92,  -92,   56,  -92,  -92,  112,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -92
+    },
+
+    {
+       11,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,
+      -93,  -93,  -93,   56,  -93,  -93,   56,   56,   56,   56,
+      113,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -93
+    },
+
+    {
+       11,  -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,
+      -94,  -94,  -94,   56,  -94,  -94,   56,   56,  114,   56,
+       56,   56,   56,   56,  115,   56,  116,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -94
+
+    },
+
+    {
+       11,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,
+      -95,  -95,  -95,   56,  -95,  -95,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,  117,
+       56,   56,   56,   56,   56,   56,  -95
+    },
+
+    {
+       11,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,
+      -96,  -96,  -96,   56,  -96,  -96,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -96
+    },
+
+    {
+       11,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,
+      -97,  -97,  -97,   56,  -97,  -97,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  -97
+    },
+
+    {
+       11,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,
+      -98,  -98,  -98,   56,  -98,  -98,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  118,   56,   56,
+       56,   56,   56,   56,   56,   56,  -98
+    },
+
+    {
+       11,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,
+      -99,  -99,  -99,   56,  -99,  -99,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,  119,   56,  -99
+
+    },
+
+    {
+       11, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+     -100, -100, -100,   56, -100, -100,   56,   56,   56,   56,
+       56,   56,   56,   56,  120,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -100
+    },
+
+    {
+       11, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+     -101, -101, -101,   56, -101, -101,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  121,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -101
+    },
+
+    {
+       11, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+     -102, -102, -102,   56, -102, -102,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,  122,   56, -102
+    },
+
+    {
+       11, -103, -103, -103, -103, -103, -103, -103, -103, -103,
+     -103, -103, -103,   56, -103, -103,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,  123,   56,   56,   56,   56, -103
+    },
+
+    {
+       11, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+     -104, -104, -104,   56, -104, -104,   56,   56,   56,   56,
+       56,   56,   56,   56,  124,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -104
+
+    },
+
+    {
+       11, -105, -105, -105, -105, -105, -105, -105, -105, -105,
+     -105, -105, -105,   56, -105, -105,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,  125,   56,   56,   56, -105
+    },
+
+    {
+       11, -106,  106,   80, -106, -106, -106, -106, -106, -106,
+     -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+     -106, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+     -106, -106, -106, -106, -106, -106, -106
+    },
+
+    {
+       11, -107, -107, -107, -107, -107, -107, -107, -107, -107,
+     -107,   84,   84,   84, -107, -107,   84,   84,   84,   84,
+
+       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
+       84,   84,   84,   84,   84,   84, -107
+    },
+
+    {
+       11, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+     -108, -108, -108,   56, -108, -108,   56,   56,   56,   56,
+      126,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -108
+    },
+
+    {
+       11, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+     -109, -109, -109,   56, -109, -109,   56,   56,  127,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -109
+
+    },
+
+    {
+       11, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+     -110, -110, -110,   56, -110, -110,   56,   56,   56,   56,
+      128,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -110
+    },
+
+    {
+       11, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+     -111, -111, -111,   56, -111, -111,   56,   56,   56,   56,
+       56,   56,   56,   56,  129,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -111
+    },
+
+    {
+       11, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+     -112, -112, -112,   56, -112, -112,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,  130,   56, -112
+    },
+
+    {
+       11, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+     -113, -113, -113,   56, -113, -113,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  131,   56,   56,
+       56,   56,   56,   56,   56,   56, -113
+    },
+
+    {
+       11, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+     -114, -114, -114,   56, -114, -114,   56,   56,   56,   56,
+       56,   56,   56,  132,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -114
+
+    },
+
+    {
+       11, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+     -115, -115, -115,   56, -115, -115,   56,   56,   56,   56,
+       56,  133,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -115
+    },
+
+    {
+       11, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+     -116, -116, -116,   56, -116, -116,   56,   56,   56,   56,
+      134,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -116
+    },
+
+    {
+       11, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+     -117, -117, -117,   56, -117, -117,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -117
+    },
+
+    {
+       11, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+     -118, -118, -118,   56, -118, -118,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,  135,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -118
+    },
+
+    {
+       11, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+     -119, -119, -119,   56, -119, -119,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -119
+
+    },
+
+    {
+       11, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+     -120, -120, -120,   56, -120, -120,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,  136,   56,
+       56,   56,   56,   56,   56,   56, -120
+    },
+
+    {
+       11, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+     -121, -121, -121,   56, -121, -121,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,  137,
+       56,   56,   56,   56,   56,   56, -121
+    },
+
+    {
+       11, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+     -122, -122, -122,   56, -122, -122,   56,   56,   56,   56,
+
+       56,   56,   56,   56,  138,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -122
+    },
+
+    {
+       11, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+     -123, -123, -123,   56, -123, -123,   56,   56,  139,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -123
+    },
+
+    {
+       11, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+     -124, -124, -124,   56, -124, -124,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  140,   56,   56,
+       56,   56,   56,   56,   56,   56, -124
+
+    },
+
+    {
+       11, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+     -125, -125, -125,   56, -125, -125,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,  141,   56,   56, -125
+    },
+
+    {
+       11, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+     -126, -126, -126,   56, -126, -126,  142,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -126
+    },
+
+    {
+       11, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+     -127, -127, -127,   56, -127, -127,   56,   56,   56,   56,
+
+      143,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -127
+    },
+
+    {
+       11, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+     -128, -128, -128,   56, -128, -128,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  144,   56,   56,
+       56,   56,   56,   56,   56,   56, -128
+    },
+
+    {
+       11, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+     -129, -129, -129,   56, -129, -129,   56,   56,   56,   56,
+       56,   56,  145,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -129
+
+    },
+
+    {
+       11, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+     -130, -130, -130,   56, -130, -130,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,  146,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -130
+    },
+
+    {
+       11, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+     -131, -131, -131,   56, -131, -131,   56,   56,   56,  147,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -131
+    },
+
+    {
+       11, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+     -132, -132, -132,   56, -132, -132,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,  148,   56,
+       56,   56,   56,   56,   56,   56, -132
+    },
+
+    {
+       11, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+     -133, -133, -133,   56, -133, -133,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -133
+    },
+
+    {
+       11, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+     -134, -134, -134,   56, -134, -134,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  149,   56,   56,
+       56,   56,   56,   56,   56,   56, -134
+
+    },
+
+    {
+       11, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+     -135, -135, -135,   56, -135, -135,   56,   56,   56,   56,
+      150,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -135
+    },
+
+    {
+       11, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+     -136, -136, -136,   56, -136, -136,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  151,   56,   56,
+       56,   56,   56,   56,   56,   56, -136
+    },
+
+    {
+       11, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+     -137, -137, -137,   56, -137, -137,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,  152,   56,   56, -137
+    },
+
+    {
+       11, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+     -138, -138, -138,   56, -138, -138,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,  153,   56,   56,   56,   56, -138
+    },
+
+    {
+       11, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+     -139, -139, -139,   56, -139, -139,   56,   56,   56,   56,
+      154,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -139
+
+    },
+
+    {
+       11, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+     -140, -140, -140,   56, -140, -140,   56,   56,   56,   56,
+       56,   56,  155,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -140
+    },
+
+    {
+       11, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+     -141, -141, -141,   56, -141, -141,  156,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -141
+    },
+
+    {
+       11, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+     -142, -142, -142,   56, -142, -142,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,  157,   56,   56,
+       56,   56,   56,   56,   56,   56, -142
+    },
+
+    {
+       11, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+     -143, -143, -143,   56, -143, -143,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -143
+    },
+
+    {
+       11, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+     -144, -144, -144,   56, -144, -144,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,  158,   56,   56, -144
+
+    },
+
+    {
+       11, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+     -145, -145, -145,   56, -145, -145,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -145
+    },
+
+    {
+       11, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+     -146, -146, -146,   56, -146, -146,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,  159,   56,   56, -146
+    },
+
+    {
+       11, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+     -147, -147, -147,   56, -147, -147,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,  160,   56,   56,   56, -147
+    },
+
+    {
+       11, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+     -148, -148, -148,   56, -148, -148,   56,   56,   56,   56,
+       56,   56,   56,   56,  161,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -148
+    },
+
+    {
+       11, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+     -149, -149, -149,   56, -149, -149,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,  162,   56, -149
+
+    },
+
+    {
+       11, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+     -150, -150, -150,   56, -150, -150,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,  163,   56,   56,
+       56,   56,   56,   56,   56,   56, -150
+    },
+
+    {
+       11, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+     -151, -151, -151,   56, -151, -151,  164,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -151
+    },
+
+    {
+       11, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+     -152, -152, -152,   56, -152, -152,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -152
+    },
+
+    {
+       11, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+     -153, -153, -153,   56, -153, -153,   56,   56,   56,   56,
+      165,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -153
+    },
+
+    {
+       11, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+     -154, -154, -154,   56, -154, -154,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -154
+
+    },
+
+    {
+       11, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+     -155, -155, -155,   56, -155, -155,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -155
+    },
+
+    {
+       11, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+     -156, -156, -156,   56, -156, -156,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,  166,   56,   56, -156
+    },
+
+    {
+       11, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+     -157, -157, -157,   56, -157, -157,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -157
+    },
+
+    {
+       11, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+     -158, -158, -158,   56, -158, -158,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -158
+    },
+
+    {
+       11, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+     -159, -159, -159,   56, -159, -159,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -159
+
+    },
+
+    {
+       11, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+     -160, -160, -160,   56, -160, -160,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -160
+    },
+
+    {
+       11, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+     -161, -161, -161,   56, -161, -161,   56,   56,  167,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -161
+    },
+
+    {
+       11, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+     -162, -162, -162,   56, -162, -162,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -162
+    },
+
+    {
+       11, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+     -163, -163, -163,   56, -163, -163,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,  168,   56, -163
+    },
+
+    {
+       11, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+     -164, -164, -164,   56, -164, -164,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,  169,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -164
+
+    },
+
+    {
+       11, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+     -165, -165, -165,   56, -165, -165,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,  170,   56,   56,   56, -165
+    },
+
+    {
+       11, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+     -166, -166, -166,   56, -166, -166,   56,   56,   56,   56,
+      171,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -166
+    },
+
+    {
+       11, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+     -167, -167, -167,   56, -167, -167,   56,   56,   56,   56,
+
+      172,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -167
+    },
+
+    {
+       11, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+     -168, -168, -168,   56, -168, -168,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -168
+    },
+
+    {
+       11, -169, -169, -169, -169, -169, -169, -169, -169, -169,
+     -169, -169, -169,   56, -169, -169,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -169
+
+    },
+
+    {
+       11, -170, -170, -170, -170, -170, -170, -170, -170, -170,
+     -170, -170, -170,   56, -170, -170,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -170
+    },
+
+    {
+       11, -171, -171, -171, -171, -171, -171, -171, -171, -171,
+     -171, -171, -171,   56, -171, -171,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -171
+    },
+
+    {
+       11, -172, -172, -172, -172, -172, -172, -172, -172, -172,
+     -172, -172, -172,   56, -172, -172,   56,   56,   56,   56,
+
+       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
+       56,   56,   56,   56,   56,   56, -172
+    },
+
+    } ;
+
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 55
+#define YY_END_OF_BUFFER 56
+static yyconst short int yy_accept[173] =
+    {   0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+       56,    5,    4,    3,    2,   29,   30,   28,   28,   28,
+       28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
+       54,   51,   53,   45,   50,   46,   48,   44,   41,   35,
+       40,   44,   33,   34,   43,   43,   36,   43,   43,   44,
+        4,    3,    2,    2,    1,   28,   28,   28,   28,   28,
+       28,   28,   15,   28,   28,   28,   28,   28,   28,   28,
+       28,   28,   54,   51,   53,   52,   45,   49,   48,   47,
+       37,   31,   43,   43,   38,   39,   32,   28,   28,   28,
+       28,   28,   28,   28,   28,   26,   25,   28,   28,   28,
+
+       28,   28,   28,   28,   28,   48,   42,   23,   28,   28,
+       28,   28,   28,   28,   28,   28,   14,   28,    7,   28,
+       28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
+       28,   28,   16,   28,   28,   28,   28,   28,   28,   28,
+       28,   28,   10,   28,   13,   28,   28,   28,   28,   28,
+       28,   21,   28,    9,   27,   28,   24,   12,   20,   17,
+       28,    8,   28,   28,   28,   28,   28,    6,   19,   18,
+       22,   11
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    4,    5,    6,    1,    1,    7,    8,    9,
+       10,    1,    1,    1,   11,   12,   12,   13,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,    1,    1,    1,
+       14,    1,    1,    1,   13,   13,   13,   13,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
+       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
+        1,   15,    1,    1,   13,    1,   16,   17,   18,   19,
+
+       20,   21,   22,   23,   24,   13,   13,   25,   26,   27,
+       28,   29,   30,   31,   32,   33,   34,   13,   13,   35,
+       13,   13,    1,   36,    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,    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,    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,    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,    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,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "zconf.l"
+#define INITIAL 0
+#define COMMAND 1
+#define HELP 2
+#define STRING 3
+#define PARAM 4
+
+#line 5 "zconf.l"
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+#include "zconf.tab.h"
+
+#define START_STRSIZE	16
+
+char *text;
+static char *text_ptr;
+static int text_size, text_asize;
+
+struct buffer {
+        struct buffer *parent;
+        YY_BUFFER_STATE state;
+};
+
+struct buffer *current_buf;
+
+static int last_ts, first_ts;
+
+static void zconf_endhelp(void);
+static struct buffer *zconf_endfile(void);
+
+void new_string(void)
+{
+	text = malloc(START_STRSIZE);
+	text_asize = START_STRSIZE;
+	text_ptr = text;
+	text_size = 0;
+	*text_ptr = 0;
+}
+
+void append_string(const char *str, int size)
+{
+	int new_size = text_size + size + 1;
+	if (new_size > text_asize) {
+		text = realloc(text, new_size);
+		text_asize = new_size;
+		text_ptr = text + text_size;
+	}
+	memcpy(text_ptr, str, size);
+	text_ptr += size;
+	text_size += size;
+	*text_ptr = 0;
+}
+
+void alloc_string(const char *str, int size)
+{
+	text = malloc(size + 1);
+	memcpy(text, str, size);
+	text[size] = 0;
+}
+#line 1726 "lex.zconf.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	errno=0; \
+	while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
+	{ \
+		if( errno != EINTR) \
+		{ \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+			break; \
+		} \
+		errno=0; \
+		clearerr(yyin); \
+	}
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+
+#line 71 "zconf.l"
+
+	int str = 0;
+	int ts, i;
+
+#line 1878 "lex.zconf.c"
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+yy_match:
+		while ( (yy_current_state = yy_nxt[yy_current_state][yy_ec[YY_SC_TO_UI(*yy_cp)]]) > 0 )
+			++yy_cp;
+
+		yy_current_state = -yy_current_state;
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+
+		YY_DO_BEFORE_ACTION;
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+#line 75 "zconf.l"
+current_file->lineno++;
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 76 "zconf.l"
+
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 78 "zconf.l"
+current_file->lineno++; return T_EOL;
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 80 "zconf.l"
+{
+	BEGIN(COMMAND);
+}
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 84 "zconf.l"
+{
+	unput(yytext[0]);
+	//printf("new config: ");
+	//symbol_end(NULL);
+	BEGIN(COMMAND);
+}
+	YY_BREAK
+
+case 6:
+YY_RULE_SETUP
+#line 93 "zconf.l"
+BEGIN(PARAM); return T_MAINMENU;
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 94 "zconf.l"
+BEGIN(PARAM); return T_MENU;
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 95 "zconf.l"
+BEGIN(PARAM); return T_ENDMENU;
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 96 "zconf.l"
+BEGIN(PARAM); return T_SOURCE;
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 97 "zconf.l"
+BEGIN(PARAM); return T_CHOICE;
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 98 "zconf.l"
+BEGIN(PARAM); return T_ENDCHOICE;
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 99 "zconf.l"
+BEGIN(PARAM); return T_COMMENT;
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 100 "zconf.l"
+BEGIN(PARAM); return T_CONFIG;
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 101 "zconf.l"
+BEGIN(PARAM); return T_HELP;
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 102 "zconf.l"
+BEGIN(PARAM); return T_IF;
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 103 "zconf.l"
+BEGIN(PARAM); return T_ENDIF;
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 104 "zconf.l"
+BEGIN(PARAM); return T_DEPENDS;
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 105 "zconf.l"
+BEGIN(PARAM); return T_REQUIRES;
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 106 "zconf.l"
+BEGIN(PARAM); return T_OPTIONAL;
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 107 "zconf.l"
+BEGIN(PARAM); return T_DEFAULT;
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 108 "zconf.l"
+BEGIN(PARAM); return T_PROMPT;
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 109 "zconf.l"
+BEGIN(PARAM); return T_TRISTATE;
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 110 "zconf.l"
+BEGIN(PARAM); return T_BOOLEAN;
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 111 "zconf.l"
+BEGIN(PARAM); return T_BOOLEAN;
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 112 "zconf.l"
+BEGIN(PARAM); return T_INT;
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 113 "zconf.l"
+BEGIN(PARAM); return T_HEX;
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 114 "zconf.l"
+BEGIN(PARAM); return T_STRING;
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 115 "zconf.l"
+{
+		alloc_string(yytext, yyleng);
+		zconflval.string = text;
+		return T_WORD;
+	}
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 120 "zconf.l"
+
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 121 "zconf.l"
+current_file->lineno++; BEGIN(INITIAL);
+	YY_BREAK
+
+
+case 31:
+YY_RULE_SETUP
+#line 125 "zconf.l"
+return T_AND;
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 126 "zconf.l"
+return T_OR;
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 127 "zconf.l"
+return T_OPEN_PAREN;
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 128 "zconf.l"
+return T_CLOSE_PAREN;
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 129 "zconf.l"
+return T_NOT;
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 130 "zconf.l"
+return T_EQUAL;
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 131 "zconf.l"
+return T_UNEQUAL;
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 132 "zconf.l"
+return T_IF;
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 133 "zconf.l"
+return T_ON;
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 134 "zconf.l"
+{
+		str = yytext[0];
+		new_string();
+		BEGIN(STRING);
+	}
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 139 "zconf.l"
+BEGIN(INITIAL); current_file->lineno++; return T_EOL;
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 140 "zconf.l"
+/* ignore */
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 141 "zconf.l"
+{
+		alloc_string(yytext, yyleng);
+		zconflval.string = text;
+		return T_WORD;
+	}
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 146 "zconf.l"
+
+	YY_BREAK
+
+
+case 45:
+YY_RULE_SETUP
+#line 150 "zconf.l"
+{
+		append_string(yytext, yyleng);
+	}
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 153 "zconf.l"
+{
+		if (str == yytext[0]) {
+			BEGIN(PARAM);
+			zconflval.string = text;
+			//printf("s:%s\n", text);
+			return T_STRING;
+		} else
+			append_string(yytext, 1);
+	}
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 162 "zconf.l"
+append_string(yytext+yyleng-1, 1); current_file->lineno++;
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 163 "zconf.l"
+append_string(yytext+1, yyleng-1);
+	YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 164 "zconf.l"
+append_string(yytext+1, 1);
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 165 "zconf.l"
+{
+		//printf(":%d: open string!\n", current_file->lineno+1);
+		exit(0);
+	}
+	YY_BREAK
+case YY_STATE_EOF(STRING):
+#line 169 "zconf.l"
+{
+		//printf(":%d: open string!\n", current_file->lineno+1);
+		exit(0);
+	}
+	YY_BREAK
+
+
+case 51:
+YY_RULE_SETUP
+#line 176 "zconf.l"
+{
+		ts = 0;
+		for (i = 0; i < yyleng; i++) {
+			if (yytext[i] == '\t')
+				ts = (ts & ~7) + 8;
+			else
+				ts++;
+		}
+		last_ts = ts;
+		if (first_ts) {
+			if (ts < first_ts) {
+				zconf_endhelp();
+				return T_HELPTEXT;
+			}
+			ts -= first_ts;
+			while (ts > 8) {
+				append_string("        ", 8);
+				ts -= 8;
+			}
+			append_string("        ", ts);
+		}
+		
+	}
+	YY_BREAK
+case 52:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+#line 199 "zconf.l"
+{
+		current_file->lineno++;
+		zconf_endhelp();
+		return T_HELPTEXT;
+	}
+	YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 204 "zconf.l"
+{
+		current_file->lineno++;
+		append_string("\n", 1);
+	}
+	YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 208 "zconf.l"
+{
+		append_string(yytext, yyleng);
+		if (!first_ts)
+			first_ts = last_ts;
+	}
+	YY_BREAK
+case YY_STATE_EOF(HELP):
+#line 213 "zconf.l"
+{
+		zconf_endhelp();
+		return T_HELPTEXT;
+	}
+	YY_BREAK
+
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(COMMAND):
+case YY_STATE_EOF(PARAM):
+#line 219 "zconf.l"
+{
+	if (current_buf) {
+		zconf_endfile();
+		return T_EOF;
+	}
+	yyterminate();
+}
+	YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 227 "zconf.l"
+YY_FATAL_ERROR( "flex scanner jammed" );
+	YY_BREAK
+#line 2311 "lex.zconf.c"
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
+	register int yy_is_jam;
+
+	yy_current_state = yy_nxt[yy_current_state][1];
+	yy_is_jam = (yy_current_state <= 0);
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						return EOF;
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+
+	return c;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+#ifndef _WIN32
+#include <unistd.h>
+#else
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer( b );
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
+
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 227 "zconf.l"
+
+void zconf_starthelp(void)
+{
+	new_string();
+	last_ts = first_ts = 0;
+	BEGIN(HELP);
+}
+
+static void zconf_endhelp(void)
+{
+	zconflval.string = text;
+	BEGIN(INITIAL); 
+}
+
+void zconf_initscan(const char *name)
+{
+	yyin = fopen(name, "r");
+	if (!yyin) {
+		printf("can't find file %s\n", name);
+		exit(1);
+	}
+	//fprintf(stderr, "zconf_initscan: %s\n", name);
+
+	current_buf = malloc(sizeof(*current_buf));
+	memset(current_buf, 0, sizeof(*current_buf));
+
+	current_file = file_lookup(name);
+	current_file->lineno = 1;
+	current_file->flags = FILE_BUSY;
+}
+
+void zconf_nextfile(const char *name)
+{
+	struct file *file = file_lookup(name);
+	struct buffer *buf = malloc(sizeof(*buf));
+	memset(buf, 0, sizeof(*buf));
+
+	current_buf->state = YY_CURRENT_BUFFER;
+	yyin = fopen(name, "r");
+	if (!yyin) {
+		printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
+		exit(1);
+	}
+	yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
+	buf->parent = current_buf;
+	current_buf = buf;
+
+	//fprintf(stderr, "zconf_nextfile: %s\n", name);
+
+	if (file->flags & FILE_BUSY) {
+		printf("recursive scan (%s)?\n", name);
+		exit(1);
+	}
+	if (file->flags & FILE_SCANNED) {
+		printf("file %s already scanned?\n", name);
+		exit(1);
+	}
+	file->flags |= FILE_BUSY;
+	file->lineno = 1;
+	file->parent = current_file;
+	current_file = file;
+}
+
+static struct buffer *zconf_endfile(void)
+{
+	struct buffer *parent;
+
+	current_file->flags |= FILE_SCANNED;
+	current_file->flags &= ~FILE_BUSY;
+	current_file = current_file->parent;
+
+	parent = current_buf->parent;
+	if (parent) {
+		yy_delete_buffer(YY_CURRENT_BUFFER);
+		yy_switch_to_buffer(parent->state);
+	}
+	free(current_buf);
+	current_buf = parent;
+
+	return parent;
+}
+
+int zconf_lineno(void)
+{
+	if (current_buf)
+		return current_file->lineno;
+	else
+		return 0;
+}
+
+char *zconf_curname(void)
+{
+	if (current_buf)
+		return current_file->name;
+	else
+		return "<none>";
+}
diff -Nru a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/lkc.h	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#ifndef LKC_H
+#define LKC_H
+
+#include "expr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef LKC_DIRECT_LINK
+#define P(name,type,arg)	extern type name arg
+#else
+#include "lkc_defs.h"
+#define P(name,type,arg)	extern type (*name ## _p) arg
+#endif
+#include "lkc_proto.h"
+#undef P
+
+void symbol_end(char *help);
+int zconfparse(void);
+void zconfdump(FILE *out);
+
+extern int zconfdebug;
+void zconf_starthelp(void);
+void zconf_initscan(const char *name);
+void zconf_nextfile(const char *name);
+int zconf_lineno(void);
+char *zconf_curname(void);
+
+/* confdata.c */
+extern const char conf_def_filename[];
+extern char conf_filename[];
+
+char *conf_get_default_confname(void);
+
+/* kconfig_load.c */
+void kconfig_load(void);
+
+/* menu.c */
+void menu_init(void);
+void menu_add_menu(void);
+void menu_end_menu(void);
+void menu_add_entry(struct symbol *sym);
+void menu_end_entry(void);
+struct property *create_prop(enum prop_type type);
+void menu_add_dep(struct expr *dep);
+struct property *menu_add_prop(int token, char *prompt, struct symbol *def, struct expr *dep);
+void menu_finalize(struct menu *parent);
+void menu_set_type(int type);
+struct file *file_lookup(const char *name);
+int file_write_dep(const char *name);
+
+extern struct menu *current_entry;
+extern struct menu *current_menu;
+
+/* symbol.c */
+void sym_init(void);
+void sym_clear_all_valid(void);
+
+static inline tristate sym_get_tristate_value(struct symbol *sym)
+{
+	return S_TRI(sym->curr);
+}
+
+
+static inline struct symbol *sym_get_choice_value(struct symbol *sym)
+{
+	return (struct symbol *)S_VAL(sym->curr);
+}
+
+static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
+{
+	return sym_set_tristate_value(chval, yes);
+}
+
+static inline bool sym_is_choice(struct symbol *sym)
+{
+	return sym->flags & SYMBOL_CHOICE ? true : false;
+}
+
+static inline bool sym_is_choice_value(struct symbol *sym)
+{
+	return sym->flags & SYMBOL_CHOICEVAL ? true : false;
+}
+
+static inline bool sym_is_optional(struct symbol *sym)
+{
+	return sym->flags & SYMBOL_OPTIONAL ? true : false;
+}
+
+static inline bool sym_has_value(struct symbol *sym)
+{
+	//return S_VAL(sym->def) != NULL;
+	return sym->flags & SYMBOL_NEW ? false : true;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LKC_H */
diff -Nru a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/lkc_proto.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,38 @@
+
+/* confdata.c */
+P(conf_parse,void,(const char *name));
+P(conf_read,int,(const char *name));
+P(conf_write,int,(const char *name));
+
+/* menu.c */
+P(rootmenu,struct menu,);
+
+P(menu_is_visible,bool,(struct menu *menu));
+P(menu_get_prompt,const char *,(struct menu *menu));
+P(menu_get_root_menu,struct menu *,(struct menu *menu));
+P(menu_get_parent_menu,struct menu *,(struct menu *menu));
+
+/* symbol.c */
+P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
+P(sym_change_count,int,);
+
+P(sym_lookup,struct symbol *,(const char *name, int isconst));
+P(sym_find,struct symbol *,(const char *name));
+P(sym_type_name,const char *,(int type));
+P(sym_calc_value,void,(struct symbol *sym));
+P(sym_get_type,int,(struct symbol *sym));
+P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri));
+P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri));
+P(sym_toggle_tristate_value,tristate,(struct symbol *sym));
+P(sym_string_valid,bool,(struct symbol *sym, const char *newval));
+P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
+P(sym_is_changable,bool,(struct symbol *sym));
+P(sym_get_choice_prop,struct property *,(struct symbol *sym));
+P(sym_get_default_prop,struct property *,(struct symbol *sym));
+P(sym_get_string_value,const char *,(struct symbol *sym));
+
+P(prop_get_type_name,const char *,(enum prop_type type));
+
+/* expr.c */
+P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2));
+P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken));
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/mconf.c	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,714 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <sys/ioctl.h>
+#include <sys/wait.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+static char menu_backtitle[128];
+static const char menu_instructions[] =
+	"Arrow keys navigate the menu.  "
+	"<Enter> selects submenus --->.  "
+	"Highlighted letters are hotkeys.  "
+	"Pressing <Y> includes, <N> excludes, <M> modularizes features.  "
+	"Press <Esc><Esc> to exit, <?> for Help.  "
+	"Legend: [*] built-in  [ ] excluded  <M> module  < > module capable",
+radiolist_instructions[] =
+	"Use the arrow keys to navigate this window or "
+	"press the hotkey of the item you wish to select "
+	"followed by the <SPACE BAR>. "
+	"Press <?> for additional information about this option.",
+inputbox_instructions_int[] =
+	"Please enter a decimal value. "
+	"Fractions will not be accepted.  "
+	"Use the <TAB> key to move from the input field to the buttons below it.",
+inputbox_instructions_hex[] =
+	"Please enter a hexadecimal value. "
+	"Use the <TAB> key to move from the input field to the buttons below it.",
+inputbox_instructions_string[] =
+	"Please enter a string value. "
+	"Use the <TAB> key to move from the input field to the buttons below it.",
+setmod_text[] =
+	"This feature depends on another which has been configured as a module.\n"
+	"As a result, this feature will be built as a module.",
+nohelp_text[] =
+	"There is no help available for this kernel option.\n",
+load_config_text[] =
+	"Enter the name of the configuration file you wish to load.  "
+	"Accept the name shown to restore the configuration you "
+	"last retrieved.  Leave blank to abort.",
+load_config_help[] =
+	"\n"
+	"For various reasons, one may wish to keep several different kernel\n"
+	"configurations available on a single machine.\n"
+	"\n"
+	"If you have saved a previous configuration in a file other than the\n"
+	"kernel's default, entering the name of the file here will allow you\n"
+	"to modify that configuration.\n"
+	"\n"
+	"If you are uncertain, then you have probably never used alternate\n"
+	"configuration files.  You should therefor leave this blank to abort.\n",
+save_config_text[] =
+	"Enter a filename to which this configuration should be saved "
+	"as an alternate.  Leave blank to abort.",
+save_config_help[] =
+	"\n"
+	"For various reasons, one may wish to keep different kernel\n"
+	"configurations available on a single machine.\n"
+	"\n"
+	"Entering a file name here will allow you to later retrieve, modify\n"
+	"and use the current configuration as an alternate to whatever\n"
+	"configuration options you have selected at that time.\n"
+	"\n"
+	"If you are uncertain what all this means then you should probably\n"
+	"leave this blank.\n"
+;
+
+static char buf[4096], *bufptr = buf;
+static char input_buf[4096];
+static char *args[1024], **argptr = args;
+static int indent = 0;
+static int rows, cols;
+static struct menu *current_menu;
+static int child_count;
+static int do_resize;
+
+static void conf(struct menu *menu);
+static void conf_choice(struct menu *menu);
+static void conf_string(struct menu *menu);
+static void conf_load(void);
+static void conf_save(void);
+static void show_textbox(const char *title, const char *text, int r, int c);
+static void show_helptext(const char *title, const char *text);
+static void show_help(struct menu *menu);
+static void show_readme(void);
+
+static void cprint_init(void);
+static int cprint1(const char *fmt, ...);
+static void cprint_done(void);
+static int cprint(const char *fmt, ...);
+
+static void init_wsize(void)
+{
+	struct winsize ws;
+
+	if (ioctl(1, TIOCGWINSZ, &ws) == -1) {
+		rows = 24;
+		cols = 80;
+	} else {
+		rows = ws.ws_row;
+		cols = ws.ws_col;
+	}
+
+	if (rows < 19 || cols < 80) {
+		fprintf(stderr, "Your display is too small to run Menuconfig!\n");
+		fprintf(stderr, "It must be at least 19 lines by 80 columns.\n");
+		exit(1);
+	}
+
+	rows -= 4;
+	cols -= 5;
+}
+
+static void cprint_init(void)
+{
+	bufptr = buf;
+	argptr = args;
+	memset(args, 0, sizeof(args));
+	indent = 0;
+	child_count = 0;
+	cprint("./scripts/lxdialog/lxdialog");
+	cprint("--backtitle");
+	cprint(menu_backtitle);
+}
+
+static int cprint1(const char *fmt, ...)
+{
+	va_list ap;
+	int res;
+
+	if (!*argptr)
+		*argptr = bufptr;
+	va_start(ap, fmt);
+	res = vsprintf(bufptr, fmt, ap);
+	va_end(ap);
+	bufptr += res;
+
+	return res;
+}
+
+static void cprint_done(void)
+{
+	*bufptr++ = 0;
+	argptr++;
+}
+
+static int cprint(const char *fmt, ...)
+{
+	va_list ap;
+	int res;
+
+	*argptr++ = bufptr;
+	va_start(ap, fmt);
+	res = vsprintf(bufptr, fmt, ap);
+	va_end(ap);
+	bufptr += res;
+	*bufptr++ = 0;
+
+	return res;
+}
+
+pid_t pid;
+
+static void winch_handler(int sig)
+{
+	if (!do_resize) {
+		kill(pid, SIGINT);
+		do_resize = 1;
+	}
+}
+
+static int exec_conf(void)
+{
+	int pipefd[2], stat, size;
+	struct sigaction sa;
+	sigset_t sset, osset;
+
+	sigemptyset(&sset);
+	sigaddset(&sset, SIGINT);
+	sigprocmask(SIG_BLOCK, &sset, &osset);
+
+	signal(SIGINT, SIG_DFL);
+
+	sa.sa_handler = winch_handler;
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = SA_RESTART;
+	sigaction(SIGWINCH, &sa, NULL);
+
+	*argptr++ = NULL;
+
+	pipe(pipefd);
+	pid = fork();
+	if (pid == 0) {
+		sigprocmask(SIG_SETMASK, &osset, NULL);
+		dup2(pipefd[1], 2);
+		close(pipefd[0]);
+		close(pipefd[1]);
+		execv(args[0], args);
+		_exit(EXIT_FAILURE);
+	}
+
+	close(pipefd[1]);
+	bufptr = input_buf;
+	while (1) {
+		size = input_buf + sizeof(input_buf) - bufptr;
+		size = read(pipefd[0], bufptr, size);
+		if (size <= 0) {
+			if (size < 0) {
+				if (errno == EINTR || errno == EAGAIN)
+					continue;
+				perror("read");
+			}
+			break;
+		}
+		bufptr += size;
+	}
+	*bufptr++ = 0;
+	close(pipefd[0]);
+	waitpid(pid, &stat, 0);
+
+	if (do_resize) {
+		init_wsize();
+		do_resize = 0;
+		sigprocmask(SIG_SETMASK, &osset, NULL);
+		return -1;
+	}
+	if (WIFSIGNALED(stat)) {
+		printf("\finterrupted(%d)\n", WTERMSIG(stat));
+		exit(1);
+	}
+#if 0
+	printf("\fexit state: %d\nexit data: '%s'\n", WEXITSTATUS(stat), input_buf);
+	sleep(1);
+#endif
+	sigpending(&sset);
+	if (sigismember(&sset, SIGINT)) {
+		printf("\finterrupted\n");
+		exit(1);
+	}
+	sigprocmask(SIG_SETMASK, &osset, NULL);
+
+	return WEXITSTATUS(stat);
+}
+
+static void build_conf(struct menu *menu)
+{
+	struct symbol *sym;
+	struct property *prop;
+	struct menu *child;
+	int type, tmp, doint = 2;
+	tristate val;
+	char ch;
+
+	if (!menu_is_visible(menu))
+		return;
+
+	sym = menu->sym;
+	prop = menu->prompt;
+	if (!sym) {
+		if (prop && menu != current_menu) {
+			const char *prompt = menu_get_prompt(menu);
+			switch (prop->type) {
+			case P_MENU:
+				child_count++;
+				cprint("m%p", menu);
+				if (menu->parent != &rootmenu)
+					cprint1("   %*c", indent + 1, ' ');
+				cprint1("%s  --->", prompt);
+				cprint_done();
+				return;
+			default:
+				if (prompt) {
+					child_count++;
+					cprint(":%p", menu);
+					cprint("---%*c%s", indent + 1, ' ', prompt);
+				}
+			}
+		} else
+			doint = 0;
+		goto conf_childs;
+	}
+
+	type = sym_get_type(sym);
+	if (sym_is_choice(sym)) {
+		struct symbol *def_sym = sym_get_choice_value(sym);
+		struct menu *def_menu = NULL;
+
+		child_count++;
+		for (child = menu->list; child; child = child->next) {
+			if (menu_is_visible(child) && child->sym == def_sym)
+				def_menu = child;
+		}
+
+		val = sym_get_tristate_value(sym);
+		if (sym_is_changable(sym)) {
+			cprint("t%p", menu);
+			switch (type) {
+			case S_BOOLEAN:
+				cprint1("[%c]", val == no ? ' ' : '*');
+				break;
+			case S_TRISTATE:
+				switch (val) {
+				case yes: ch = '*'; break;
+				case mod: ch = 'M'; break;
+				default:  ch = ' '; break;
+				}
+				cprint1("<%c>", ch);
+				break;
+			}
+		} else {
+			cprint("%c%p", def_menu ? 't' : ':', menu);
+			cprint1("   ");
+		}
+
+		cprint1("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+		if (val == yes) {
+			if (def_menu) {
+				cprint1(" (%s)", menu_get_prompt(def_menu));
+				cprint1("  --->");
+				cprint_done();
+				if (def_menu->list) {
+					indent += 2;
+					build_conf(def_menu);
+					indent -= 2;
+				}
+			} else
+				cprint_done();
+			return;
+		}
+		cprint_done();
+	} else {
+		child_count++;
+		val = sym_get_tristate_value(sym);
+		if (sym_is_choice_value(sym) && val == yes) {
+			cprint(":%p", menu);
+			cprint1("   ");
+		} else {
+			switch (type) {
+			case S_BOOLEAN:
+				cprint("t%p", menu);
+				cprint1("[%c]", val == no ? ' ' : '*');
+				break;
+			case S_TRISTATE:
+				cprint("t%p", menu);
+				switch (val) {
+				case yes: ch = '*'; break;
+				case mod: ch = 'M'; break;
+				default:  ch = ' '; break;
+				}
+				cprint1("<%c>", ch);
+				break;
+			default:
+				cprint("s%p", menu);
+				tmp = cprint1("(%s)", sym_get_string_value(sym));
+				tmp = indent - tmp + 4;
+				if (tmp < 0)
+					tmp = 0;
+				cprint1("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
+					sym_has_value(sym) ? "" : " (NEW)");
+				cprint_done();
+				goto conf_childs;
+			}
+		}
+		cprint1("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
+			sym_has_value(sym) ? "" : " (NEW)");
+		cprint_done();
+	}
+
+conf_childs:
+	indent += doint;
+	for (child = menu->list; child; child = child->next)
+		build_conf(child);
+	indent -= doint;
+}
+
+static void conf(struct menu *menu)
+{
+	struct menu *submenu;
+	const char *prompt = menu_get_prompt(menu);
+	struct symbol *sym;
+	char active_entry[40];
+	int stat, type, i;
+
+	active_entry[0] = 0;
+	while (1) {
+		cprint_init();
+		cprint("--title");
+		cprint("%s", prompt ? prompt : "Main Menu");
+		cprint("--menu");
+		cprint(menu_instructions);
+		cprint("%d", rows);
+		cprint("%d", cols);
+		cprint("%d", rows - 10);
+		cprint("%s", active_entry);
+		current_menu = menu;
+		build_conf(menu);
+		if (!child_count)
+			break;
+		if (menu == &rootmenu) {
+			cprint(":");
+			cprint("--- ");
+			cprint("L");
+			cprint("Load an Alternate Configuration File");
+			cprint("S");
+			cprint("Save Configuration to an Alternate File");
+		}
+		stat = exec_conf();
+		if (stat < 0)
+			continue;
+
+		if (stat == 1 || stat == 255)
+			break;
+
+		type = input_buf[0];
+		if (!type)
+			continue;
+
+		for (i = 0; input_buf[i] && !isspace(input_buf[i]); i++)
+			;
+		if (i >= sizeof(active_entry))
+			i = sizeof(active_entry) - 1;
+		input_buf[i] = 0;
+		strcpy(active_entry, input_buf);
+
+		sym = NULL;
+		submenu = NULL;
+		if (sscanf(input_buf + 1, "%p", &submenu) == 1)
+			sym = submenu->sym;
+
+		switch (stat) {
+		case 0:
+			switch (type) {
+			case 'm':
+				conf(submenu);
+				break;
+			case 't':
+				if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
+					conf_choice(submenu);
+				break;
+			case 's':
+				conf_string(submenu);
+				break;
+			case 'L':
+				conf_load();
+				break;
+			case 'S':
+				conf_save();
+				break;
+			}
+			break;
+		case 2:
+			if (sym)
+				show_help(submenu);
+			else
+				show_readme();
+			break;
+		case 3:
+			if (type == 't') {
+				if (sym_set_tristate_value(sym, yes))
+					break;
+				if (sym_set_tristate_value(sym, mod))
+					show_textbox(NULL, setmod_text, 6, 74);
+			}
+			break;
+		case 4:
+			if (type == 't')
+				sym_set_tristate_value(sym, no);
+			break;
+		case 5:
+			if (type == 't')
+				sym_set_tristate_value(sym, mod);
+			break;
+		case 6:
+			if (type == 't')
+				sym_toggle_tristate_value(sym);
+			break;
+		}
+	}
+}
+
+static void show_textbox(const char *title, const char *text, int r, int c)
+{
+	int fd;
+
+	fd = creat(".help.tmp", 0777);
+	write(fd, text, strlen(text));
+	close(fd);
+	do {
+		cprint_init();
+		if (title) {
+			cprint("--title");
+			cprint("%s", title);
+		}
+		cprint("--textbox");
+		cprint(".help.tmp");
+		cprint("%d", r);
+		cprint("%d", c);
+	} while (exec_conf() < 0);
+	unlink(".help.tmp");
+}
+
+static void show_helptext(const char *title, const char *text)
+{
+	show_textbox(title, text, rows, cols);
+}
+
+static void show_help(struct menu *menu)
+{
+	const char *help;
+
+	help = menu->sym->help;
+	if (!help)
+		help = nohelp_text;
+	show_helptext(menu_get_prompt(menu), help);
+}
+
+static void show_readme(void)
+{
+	do {
+		cprint_init();
+		cprint("--textbox");
+		cprint("scripts/README.Menuconfig");
+		cprint("%d", rows);
+		cprint("%d", cols);
+	} while (exec_conf() == -1);
+}
+
+static void conf_choice(struct menu *menu)
+{
+	const char *prompt = menu_get_prompt(menu);
+	struct menu *child;
+	struct symbol *active;
+	int stat;
+
+	while (1) {
+		cprint_init();
+		cprint("--title");
+		cprint("%s", prompt ? prompt : "Main Menu");
+		cprint("--radiolist");
+		cprint(radiolist_instructions);
+		cprint("15");
+		cprint("70");
+		cprint("6");
+
+		current_menu = menu;
+		active = sym_get_choice_value(menu->sym);
+		for (child = menu->list; child; child = child->next) {
+			if (!menu_is_visible(child))
+				continue;
+			cprint("%p", child);
+			cprint("%s", menu_get_prompt(child));
+			cprint(child->sym == active ? "ON" : "OFF");
+		}
+
+		stat = exec_conf();
+		switch (stat) {
+		case 0:
+			if (sscanf(input_buf, "%p", &menu) != 1)
+				break;
+			sym_set_tristate_value(menu->sym, yes);
+			return;
+		case 1:
+			show_help(menu);
+			break;
+		case 255:
+			return;
+		}
+	}
+}
+
+static void conf_string(struct menu *menu)
+{
+	const char *prompt = menu_get_prompt(menu);
+	int stat;
+
+	while (1) {
+		cprint_init();
+		cprint("--title");
+		cprint("%s", prompt ? prompt : "Main Menu");
+		cprint("--inputbox");
+		switch (sym_get_type(menu->sym)) {
+		case S_INT:
+			cprint(inputbox_instructions_int);
+			break;
+		case S_HEX:
+			cprint(inputbox_instructions_hex);
+			break;
+		case S_STRING:
+			cprint(inputbox_instructions_string);
+			break;
+		default:
+			/* panic? */;
+		}
+		cprint("10");
+		cprint("75");
+		cprint("%s", sym_get_string_value(menu->sym));
+		stat = exec_conf();
+		switch (stat) {
+		case 0:
+			if (sym_set_string_value(menu->sym, input_buf))
+				return;
+			show_textbox(NULL, "You have made an invalid entry.", 5, 43);
+			break;
+		case 1:
+			show_help(menu);
+			break;
+		case 255:
+			return;
+		}
+	}
+}
+
+static void conf_load(void)
+{
+	int stat;
+
+	while (1) {
+		cprint_init();
+		cprint("--inputbox");
+		cprint(load_config_text);
+		cprint("11");
+		cprint("55");
+		cprint("%s", conf_filename);
+		stat = exec_conf();
+		switch(stat) {
+		case 0:
+			if (!input_buf[0])
+				return;
+			if (!conf_read(input_buf))
+				return;
+			show_textbox(NULL, "File does not exist!", 5, 38);
+			break;
+		case 1:
+			show_helptext("Load Alternate Configuration", load_config_help);
+			break;
+		case 255:
+			return;
+		}
+	}
+}
+
+static void conf_save(void)
+{
+	int stat;
+
+	while (1) {
+		cprint_init();
+		cprint("--inputbox");
+		cprint(save_config_text);
+		cprint("11");
+		cprint("55");
+		cprint("%s", conf_filename);
+		stat = exec_conf();
+		switch(stat) {
+		case 0:
+			if (!input_buf[0])
+				return;
+			if (!conf_write(input_buf))
+				return;
+			show_textbox(NULL, "Can't create file!  Probably a nonexistent directory.", 5, 60);
+			break;
+		case 1:
+			show_helptext("Save Alternate Configuration", save_config_help);
+			break;
+		case 255:
+			return;
+		}
+	}
+}
+
+int main(int ac, char **av)
+{
+	int stat;
+	conf_parse(av[1]);
+	conf_read(NULL);
+
+	sprintf(menu_backtitle, "Linux Kernel v%s.%s.%s%s Configuration",
+		getenv("VERSION"), getenv("PATCHLEVEL"),
+		getenv("SUBLEVEL"), getenv("EXTRAVERSION"));
+
+	init_wsize();
+	conf(&rootmenu);
+
+	do {
+		cprint_init();
+		cprint("--yesno");
+		cprint("Do you wish to save your new kernel configuration?");
+		cprint("5");
+		cprint("60");
+		stat = exec_conf();
+	} while (stat < 0);
+
+	if (stat == 0) {
+		conf_write(NULL);
+		printf("\n\n"
+			"*** End of Linux kernel configuration.\n"
+			"*** Check the top-level Makefile for additional configuration.\n"
+			"*** Next, you may run 'make bzImage', 'make bzdisk', or 'make install'.\n\n");
+	} else
+		printf("\n\nYour kernel configuration changes were NOT saved.\n\n");
+
+	return 0;
+}
diff -Nru a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/menu.c	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,309 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+struct menu rootmenu;
+struct menu *current_menu, *current_entry;
+static struct menu **last_entry_ptr;
+
+struct file *file_list;
+struct file *current_file;
+
+void menu_init(void)
+{
+	current_entry = current_menu = &rootmenu;
+	last_entry_ptr = &rootmenu.list;
+}
+
+void menu_add_entry(struct symbol *sym)
+{
+	struct menu *menu;
+
+	menu = malloc(sizeof(*menu));
+	memset(menu, 0, sizeof(*menu));
+	menu->sym = sym;
+	menu->parent = current_menu;
+	menu->file = current_file;
+	menu->lineno = zconf_lineno();
+
+	*last_entry_ptr = menu;
+	last_entry_ptr = &menu->next;
+	current_entry = menu;
+}
+
+void menu_end_entry(void)
+{
+}
+
+void menu_add_menu(void)
+{
+	current_menu = current_entry;
+	last_entry_ptr = &current_entry->list;
+}
+
+void menu_end_menu(void)
+{
+	last_entry_ptr = &current_menu->next;
+	current_menu = current_menu->parent;
+}
+
+void menu_add_dep(struct expr *dep)
+{
+	current_entry->dep = expr_alloc_and(current_entry->dep, dep);
+}
+
+void menu_set_type(int type)
+{
+	struct symbol *sym = current_entry->sym;
+
+	if (sym->type == type)
+		return;
+	if (sym->type == S_UNKNOWN) {
+		sym->type = type;
+		return;
+	}
+	fprintf(stderr, "%s:%d: type of '%s' redefined from '%s' to '%s'\n",
+		current_entry->file->name, current_entry->lineno,
+		sym->name ? sym->name : "<choice>", sym_type_name(sym->type), sym_type_name(type));
+}
+
+struct property *create_prop(enum prop_type type)
+{
+	struct property *prop;
+
+	prop = malloc(sizeof(*prop));
+	memset(prop, 0, sizeof(*prop));
+	prop->type = type;
+	prop->file = current_file;
+	prop->lineno = zconf_lineno();
+
+	return prop;
+}
+
+struct property *menu_add_prop(int token, char *prompt, struct symbol *def, struct expr *dep)
+{
+	struct property *prop = create_prop(token);
+	struct property **propp;
+
+	prop->sym = current_entry->sym;
+	prop->menu = current_entry;
+	prop->text = prompt;
+	prop->def = def;
+	E_EXPR(prop->visible) = dep;
+
+	if (prompt)
+		current_entry->prompt = prop;
+
+	/* append property to the prop list of symbol */
+	if (prop->sym) {
+		for (propp = &prop->sym->prop; *propp; propp = &(*propp)->next)
+			;
+		*propp = prop;
+	}
+
+	return prop;
+}
+
+void menu_add_prompt(int token, char *prompt, struct expr *dep)
+{
+	current_entry->prompt = menu_add_prop(token, prompt, NULL, dep);
+}
+
+void menu_add_default(int token, struct symbol *def, struct expr *dep)
+{
+	current_entry->prompt = menu_add_prop(token, NULL, def, dep);
+}
+
+void menu_finalize(struct menu *parent)
+{
+	struct menu *menu, *last_menu;
+	struct symbol *sym;
+	struct property *prop;
+	struct expr *parentdep, *basedep, *dep, *dep2;
+
+	sym = parent->sym;
+	if (parent->list) {
+		if (sym && sym_is_choice(sym)) {
+			/* find the first choice value and find out choice type */
+			for (menu = parent->list; menu; menu = menu->next) {
+				if (menu->sym) {
+					current_entry = parent;
+					menu_set_type(menu->sym->type);
+					current_entry = menu;
+					menu_set_type(sym->type);
+					break;
+				}
+			}
+			parentdep = expr_alloc_symbol(sym);
+		} else if (parent->prompt)
+			parentdep = E_EXPR(parent->prompt->visible);
+		else
+			parentdep = parent->dep;
+
+		for (menu = parent->list; menu; menu = menu->next) {
+			basedep = expr_transform(menu->dep);
+			basedep = expr_alloc_and(expr_copy(parentdep), basedep);
+			basedep = expr_eliminate_dups(basedep);
+			menu->dep = basedep;
+			if (menu->sym)
+				prop = menu->sym->prop;
+			else
+				prop = menu->prompt;
+			for (; prop; prop = prop->next) {
+				if (prop->menu != menu)
+					continue;
+				dep = expr_transform(E_EXPR(prop->visible));
+				dep = expr_alloc_and(expr_copy(basedep), dep);
+				dep = expr_eliminate_dups(dep);
+				if (menu->sym && menu->sym->type != S_TRISTATE)
+					dep = expr_trans_bool(dep);
+				E_EXPR(prop->visible) = dep;
+			}
+		}
+		for (menu = parent->list; menu; menu = menu->next)
+			menu_finalize(menu);
+	} else if (sym && parent->prompt) {
+		basedep = E_EXPR(parent->prompt->visible);
+		basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no);
+		basedep = expr_eliminate_dups(expr_transform(basedep));
+		last_menu = NULL;
+		for (menu = parent->next; menu; menu = menu->next) {
+			dep = menu->prompt ? E_EXPR(menu->prompt->visible) : menu->dep;
+			if (!expr_contains_symbol(dep, sym))
+				break;
+			if (expr_depends_symbol(dep, sym))
+				goto next;
+			dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no);
+			dep = expr_eliminate_dups(expr_transform(dep));
+			dep2 = expr_copy(basedep);
+			expr_eliminate_eq(&dep, &dep2);
+			expr_free(dep);
+			if (!expr_is_yes(dep2)) {
+				expr_free(dep2);
+				break;
+			}
+			expr_free(dep2);
+		next:
+			menu_finalize(menu);
+			menu->parent = parent;
+			last_menu = menu;
+		}
+		if (last_menu) {
+			parent->list = parent->next;
+			parent->next = last_menu->next;
+			last_menu->next = NULL;
+		}
+	}
+	for (menu = parent->list; menu; menu = menu->next) {
+		if (sym && sym_is_choice(sym) && menu->sym) {
+			menu->sym->flags |= SYMBOL_CHOICEVAL;
+			current_entry = menu;
+			menu_set_type(sym->type);
+			menu_add_prop(P_CHOICE, NULL, parent->sym, NULL);
+			prop = sym_get_choice_prop(parent->sym);
+			//dep = expr_alloc_one(E_CHOICE, dep);
+			//dep->right.sym = menu->sym;
+			prop->dep = expr_alloc_one(E_CHOICE, prop->dep);
+			prop->dep->right.sym = menu->sym;
+		}
+		if (menu->list && (!menu->prompt || !menu->prompt->text)) {
+			for (last_menu = menu->list; ; last_menu = last_menu->next) {
+				last_menu->parent = parent;
+				if (!last_menu->next)
+					break;
+			}
+			last_menu->next = menu->next;
+			menu->next = menu->list;
+			menu->list = NULL;
+		}
+	}
+}
+
+bool menu_is_visible(struct menu *menu)
+{
+	tristate visible;
+
+	if (!menu->prompt)
+		return false;
+	if (menu->sym) {
+		sym_calc_value(menu->sym);
+		visible = E_TRI(menu->prompt->visible);
+	} else
+		visible = E_CALC(menu->prompt->visible);
+	return visible != no;
+}
+
+const char *menu_get_prompt(struct menu *menu)
+{
+	if (menu->prompt)
+		return menu->prompt->text;
+	else if (menu->sym)
+		return menu->sym->name;
+	return NULL;
+}
+
+struct menu *menu_get_root_menu(struct menu *menu)
+{
+	return &rootmenu;
+}
+
+struct menu *menu_get_parent_menu(struct menu *menu)
+{
+	enum prop_type type;
+
+	while (menu != &rootmenu) {
+		menu = menu->parent;
+		type = menu->prompt ? menu->prompt->type : 0;
+		if (type == P_MENU || type == P_ROOTMENU)
+			break;
+	}
+	return menu;
+}
+
+struct file *file_lookup(const char *name)
+{
+	struct file *file;
+
+	for (file = file_list; file; file = file->next) {
+		if (!strcmp(name, file->name))
+			return file;
+	}
+
+	file = malloc(sizeof(*file));
+	memset(file, 0, sizeof(*file));
+	file->name = strdup(name);
+	file->next = file_list;
+	file_list = file;
+	return file;
+}
+
+int file_write_dep(const char *name)
+{
+	struct file *file;
+	FILE *out;
+
+	if (!name)
+		name = "..config.cmd";
+	out = fopen("..config.tmp", "w");
+	if (!out)
+		return 1;
+	fprintf(out, "deps_config := \\\n");
+	for (file = file_list; file; file = file->next) {
+		if (file->next)
+			fprintf(out, "\t%s \\\n", file->name);
+		else
+			fprintf(out, "\t%s\n", file->name);
+	}
+	fprintf(out, "\n.config include/linux/autoconf.h: $(deps_config)\n\n$(deps_config):\n");
+	fclose(out);
+	rename("..config.tmp", name);
+	return 0;
+}
+
diff -Nru a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/qconf.cc	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,1073 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <qapplication.h>
+#include <qmainwindow.h>
+#include <qtoolbar.h>
+#include <qvbox.h>
+#include <qsplitter.h>
+#include <qlistview.h>
+#include <qtextview.h>
+#include <qlineedit.h>
+#include <qmenubar.h>
+#include <qmessagebox.h>
+#include <qaction.h>
+#include <qheader.h>
+#include <qfiledialog.h>
+#include <qregexp.h>
+#include <stdlib.h>
+
+#include "lkc.h"
+#include "qconf.h"
+
+#include "qconf.moc"
+#include "images.c"
+
+static QApplication *configApp;
+
+/*
+ * update all the children of a menu entry
+ *   removes/adds the entries from the parent widget as necessary
+ *
+ * parent: either the menu list widget or a menu entry widget
+ * menu: entry to be updated
+ */
+template <class P>
+static void updateMenuList(P* parent, struct menu* menu)
+{
+	struct menu* child;
+	ConfigList* list = parent->listView();
+	ConfigItem* item;
+	ConfigItem* last;
+	bool visible;
+	bool showAll = list->showAll;
+	enum listMode mode = list->mode;
+	enum prop_type type;
+
+	if (!menu) {
+		while ((item = parent->firstChild()))
+			delete item;
+		return;
+	}
+
+	last = 0;
+	for (child = menu->list; child; child = child->next) {
+		item = last ? last->nextSibling() : parent->firstChild();
+		type = child->prompt ? child->prompt->type : P_UNKNOWN;
+
+		switch (mode) {
+		case menuMode:
+			if (type != P_ROOTMENU)
+				goto hide;
+			break;
+		case symbolMode:
+			if (type == P_ROOTMENU)
+				goto hide;
+			break;
+		default:
+			break;
+		}
+
+		visible = menu_is_visible(child);
+		if (showAll || visible) {
+			if (!item || item->menu != child)
+				item = new ConfigItem(parent, last, child);
+			item->visible = visible;
+			item->updateMenu();
+
+			if (mode == fullMode || mode == menuMode ||
+			    (type != P_MENU && type != P_ROOTMENU))
+				updateMenuList(item, child);
+			else
+				updateMenuList(item, 0);
+			last = item;
+			continue;
+		}
+	hide:	
+		if (item && item->menu == child) {
+			last = parent->firstChild();
+			if (last == item)
+				last = 0;
+			else while (last->nextSibling() != item)
+				last = last->nextSibling();
+			delete item;
+		}
+	}
+}
+
+#if QT_VERSION >= 300
+/*
+ * set the new data
+ * TODO check the value
+ */
+void ConfigItem::okRename(int col)
+{
+	Parent::okRename(col);
+	sym_set_string_value(menu->sym, text(dataColIdx).latin1());
+}
+#endif
+
+/*
+ * update the displayed of a menu entry
+ */
+void ConfigItem::updateMenu(void)
+{
+	ConfigList* list;
+	struct symbol* sym;
+	QString prompt;
+	int type;
+	enum prop_type ptype;
+	tristate expr;
+	bool update;
+
+	list = listView();
+	update = doInit;
+	if (update)
+		doInit = false;
+	else
+		update = list->updateAll;
+
+	sym = menu->sym;
+	if (!sym) {
+		if (update) {
+			setText(promptColIdx, menu_get_prompt(menu));
+			ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+			if ((ptype == P_ROOTMENU || ptype == P_MENU) &&
+			    (list->mode == singleMode || list->mode == symbolMode))
+				setPixmap(promptColIdx, list->menuPix);
+			else
+				setPixmap(promptColIdx, 0);
+		}
+		return;
+	}
+
+	sym_calc_value(sym);
+	if (!(sym->flags & SYMBOL_CHANGED) && !update)
+		return;
+
+	sym->flags &= ~SYMBOL_CHANGED;
+
+	setText(nameColIdx, menu->sym->name);
+
+	type = sym_get_type(sym);
+	switch (type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		char ch;
+
+		prompt = menu_get_prompt(menu);
+		if (!sym_is_changable(sym) && !list->showAll) {
+			setText(noColIdx, 0);
+			setText(modColIdx, 0);
+			setText(yesColIdx, 0);
+			break;
+		}
+		expr = sym_get_tristate_value(sym);
+		switch (expr) {
+		case yes:
+			if (sym_is_choice_value(sym) && type == S_BOOLEAN)
+				setPixmap(promptColIdx, list->choiceYesPix);
+			else
+				setPixmap(promptColIdx, list->symbolYesPix);
+			setText(yesColIdx, "Y");
+			ch = 'Y';
+			break;
+		case mod:
+			setPixmap(promptColIdx, list->symbolModPix);
+			setText(modColIdx, "M");
+			ch = 'M';
+			break;
+		default:
+			if (sym_is_choice_value(sym) && type == S_BOOLEAN)
+				setPixmap(promptColIdx, list->choiceNoPix);
+			else
+				setPixmap(promptColIdx, list->symbolNoPix);
+			setText(noColIdx, "N");
+			ch = 'N';
+			break;
+		}
+		if (expr != no)
+			setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0);
+		if (expr != mod)
+			setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0);
+		if (expr != yes)
+			setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0);
+
+		setText(dataColIdx, QChar(ch));
+		break;
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+		const char* data;
+
+		data = sym_get_string_value(sym);
+#if QT_VERSION >= 300
+		setRenameEnabled(list->mapIdx(dataColIdx), TRUE);
+#endif
+		setText(dataColIdx, data);
+		if (type == S_STRING)
+			prompt.sprintf("%s: %s", menu_get_prompt(menu), data);
+		else
+			prompt.sprintf("(%s) %s", data, menu_get_prompt(menu));
+		break;
+	}
+	if (!sym_has_value(sym) && visible)
+		prompt += " (NEW)";
+	setText(promptColIdx, prompt);
+}
+
+void ConfigItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
+{
+	ConfigList* list = listView();
+
+	if (visible) {
+		if (isSelected() && !list->hasFocus() && list->mode == menuMode)
+			Parent::paintCell(p, list->inactivedColorGroup, column, width, align);
+		else
+			Parent::paintCell(p, cg, column, width, align);
+	} else
+		Parent::paintCell(p, list->disabledColorGroup, column, width, align);
+}
+
+/*
+ * construct a menu entry
+ */
+void ConfigItem::init(void)
+{
+	ConfigList* list = listView();
+#if QT_VERSION < 300
+	visible = TRUE;
+#endif
+	//menu->data = this;
+	if (list->mode != fullMode)
+		setOpen(TRUE);
+	doInit= true;
+}
+
+/*
+ * destruct a menu entry
+ */
+ConfigItem::~ConfigItem(void)
+{
+	//menu->data = 0;
+}
+
+void ConfigLineEdit::show(ConfigItem* i)
+{
+	item = i;
+	if (sym_get_string_value(item->menu->sym))
+		setText(sym_get_string_value(item->menu->sym));
+	else
+		setText(0);
+	Parent::show();
+	setFocus();
+}
+
+void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
+{
+	switch (e->key()) {
+	case Key_Escape:
+		break;
+	case Key_Return:
+	case Key_Enter:
+		sym_set_string_value(item->menu->sym, text().latin1());
+		emit lineChanged(item);
+		break;
+	default:
+		Parent::keyPressEvent(e);
+		return;
+	}
+	e->accept();
+	hide();
+}
+
+ConfigList::ConfigList(QWidget* p, ConfigView* cv)
+	: Parent(p), cview(cv),
+	  updateAll(false),
+	  symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
+	  choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), menuPix(xpm_menu), menuInvPix(xpm_menu_inv),
+	  showAll(false), showName(false), showRange(false), showData(false),
+	  rootEntry(0)
+{
+	int i;
+
+	setSorting(-1);
+	setRootIsDecorated(TRUE);
+	disabledColorGroup = palette().active();
+	disabledColorGroup.setColor(QColorGroup::Text, palette().disabled().text());
+	inactivedColorGroup = palette().active();
+	inactivedColorGroup.setColor(QColorGroup::Highlight, palette().disabled().highlight());
+
+	connect(this, SIGNAL(selectionChanged(void)),
+		SLOT(updateSelection(void)));
+
+	for (i = 0; i < colNr; i++)
+		colMap[i] = colRevMap[i] = -1;
+	addColumn(promptColIdx, "Option");
+
+	reinit();
+}
+
+void ConfigList::reinit(void)
+{
+	removeColumn(dataColIdx);
+	removeColumn(yesColIdx);
+	removeColumn(modColIdx);
+	removeColumn(noColIdx);
+	removeColumn(nameColIdx);
+
+	if (showName)
+		addColumn(nameColIdx, "Name");
+	if (showRange) {
+		addColumn(noColIdx, "N");
+		addColumn(modColIdx, "M");
+		addColumn(yesColIdx, "Y");
+	}
+	if (showData)
+		addColumn(dataColIdx, "Value");
+
+	updateListAll();
+}
+
+void ConfigList::updateSelection(void)
+{
+	struct menu *menu;
+	enum prop_type type;
+
+	ConfigItem* item = (ConfigItem*)selectedItem();
+	if (!item)
+		return;
+
+	cview->setHelp(item);
+
+	menu = item->menu;
+	type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+	if (mode == menuMode && (type == P_MENU || type == P_ROOTMENU))
+		emit menuSelected(menu);
+}
+
+void ConfigList::updateList(ConfigItem* item)
+{
+	(void)item;	// unused so far
+	updateMenuList(this, rootEntry);
+}
+
+void ConfigList::setAllOpen(bool open)
+{
+	QListViewItemIterator it(this);
+
+	for (; it.current(); it++)
+		it.current()->setOpen(open);
+}
+
+void ConfigList::setValue(ConfigItem* item, tristate val)
+{
+	struct symbol* sym;
+	int type;
+	tristate oldval;
+
+	sym = item->menu->sym;
+	if (!sym)
+		return;
+
+	type = sym_get_type(sym);
+	switch (type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		oldval = sym_get_tristate_value(sym);
+
+		if (!sym_set_tristate_value(sym, val))
+			return;
+		if (oldval == no && item->menu->list)
+			item->setOpen(TRUE);
+		emit symbolChanged(item);
+		break;
+	}
+}
+
+void ConfigList::changeValue(ConfigItem* item)
+{
+	struct symbol* sym;
+	struct menu* menu;
+	int type, oldexpr, newexpr;
+
+	menu = item->menu;
+	sym = menu->sym;
+	if (!sym) {
+		if (item->menu->list)
+			item->setOpen(!item->isOpen());
+		return;
+	}
+
+	type = sym_get_type(sym);
+	switch (type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		oldexpr = sym_get_tristate_value(sym);
+		newexpr = sym_toggle_tristate_value(sym);
+		if (item->menu->list) {
+			if (oldexpr == newexpr)
+				item->setOpen(!item->isOpen());
+			else if (oldexpr == no)
+				item->setOpen(TRUE);
+		}
+		if (oldexpr != newexpr)
+			emit symbolChanged(item);
+		break;
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+#if QT_VERSION >= 300
+		if (colMap[dataColIdx] >= 0)
+			item->startRename(colMap[dataColIdx]);
+		else
+#endif
+			lineEdit->show(item);
+		break;
+	}
+}
+
+void ConfigList::setRootMenu(struct menu *menu)
+{
+	enum prop_type type;
+
+	if (rootEntry == menu)
+		return;
+	type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
+	if (type != P_MENU && type != P_ROOTMENU)
+		return;
+	updateMenuList(this, 0);
+	rootEntry = menu;
+	updateListAll();
+	setSelected(currentItem(), hasFocus());
+}
+
+void ConfigList::setParentMenu(void)
+{
+	ConfigItem* item;
+	struct menu *oldroot, *newroot;
+
+	oldroot = rootEntry;
+	newroot = menu_get_parent_menu(oldroot);
+	if (newroot == oldroot)
+		return;
+	setRootMenu(newroot);
+
+	QListViewItemIterator it(this);
+	for (; (item = (ConfigItem*)it.current()); it++) {
+		if (item->menu == oldroot) {
+			setCurrentItem(item);
+			ensureItemVisible(item);
+			break;
+		}
+	}
+}
+
+void ConfigList::keyPressEvent(QKeyEvent* ev)
+{
+	QListViewItem* i = currentItem();
+	ConfigItem* item;
+	struct menu *menu;
+	enum prop_type type;
+
+	if (ev->key() == Key_Escape && mode != fullMode) {
+		emit parentSelected();
+		ev->accept();
+		return;
+	}
+
+	if (!i) {
+		Parent::keyPressEvent(ev);
+		return;
+	}
+	item = (ConfigItem*)i;
+
+	switch (ev->key()) {
+	case Key_Return:
+	case Key_Enter:
+		menu = item->menu;
+		type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+		if ((type == P_MENU || type == P_ROOTMENU) && mode != fullMode) {
+			emit menuSelected(menu);
+			break;
+		}
+	case Key_Space:
+		changeValue(item);
+		break;
+	case Key_N:
+		setValue(item, no);
+		break;
+	case Key_M:
+		setValue(item, mod);
+		break;
+	case Key_Y:
+		setValue(item, yes);
+		break;
+	default:
+		Parent::keyPressEvent(ev);
+		return;
+	}
+	ev->accept();
+}
+
+void ConfigList::contentsMousePressEvent(QMouseEvent* e)
+{
+	//QPoint p(contentsToViewport(e->pos()));
+	//printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y());
+	QListView::contentsMousePressEvent(e);
+}
+
+void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e)
+{
+	QPoint p(contentsToViewport(e->pos()));
+	ConfigItem* item = (ConfigItem*)itemAt(p);
+	struct menu *menu;
+	const QPixmap* pm;
+	int idx, x;
+
+	if (!item)
+		goto skip;
+
+	menu = item->menu;
+	x = header()->offset() + p.x();
+	idx = colRevMap[header()->sectionAt(x)];
+	switch (idx) {
+	case promptColIdx:
+		pm = item->pixmap(promptColIdx);
+		if (pm) {
+			int off = header()->sectionPos(0) + itemMargin() +
+				treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0));
+			if (x >= off && x < off + pm->width()) {
+				if (menu->sym)
+					changeValue(item);
+				else
+					emit menuSelected(menu);
+			}
+		}
+		break;
+	case noColIdx:
+		setValue(item, no);
+		break;
+	case modColIdx:
+		setValue(item, mod);
+		break;
+	case yesColIdx:
+		setValue(item, yes);
+		break;
+	case dataColIdx:
+		changeValue(item);
+		break;
+	}
+
+skip:
+	//printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y());
+	QListView::contentsMouseReleaseEvent(e);
+}
+
+void ConfigList::contentsMouseMoveEvent(QMouseEvent* e)
+{
+	//QPoint p(contentsToViewport(e->pos()));
+	//printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y());
+	QListView::contentsMouseMoveEvent(e);
+}
+
+void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e)
+{
+	QPoint p(contentsToViewport(e->pos()));
+	ConfigItem* item = (ConfigItem*)itemAt(p);
+	struct menu *menu;
+	enum prop_type ptype;
+
+	if (!item)
+		goto skip;
+	menu = item->menu;
+	ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+	if ((ptype == P_ROOTMENU || ptype == P_MENU) &&
+	    (mode == singleMode || mode == symbolMode))
+		emit menuSelected(menu);
+
+skip:
+	//printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y());
+	QListView::contentsMouseDoubleClickEvent(e);
+}
+
+void ConfigList::focusInEvent(QFocusEvent *e)
+{
+	Parent::focusInEvent(e);
+
+	QListViewItem* item = currentItem();
+	if (!item)
+		return;
+
+	setSelected(item, TRUE);
+	emit gotFocus();
+}
+
+/*
+ * Construct the complete config widget
+ */
+ConfigView::ConfigView(void)
+{
+	QMenuBar* menu;
+	QSplitter* split1;
+	QSplitter* split2;
+
+	showDebug = false;
+
+	split1 = new QSplitter(this);
+	split1->setOrientation(QSplitter::Horizontal);
+	setCentralWidget(split1);
+
+	menuList = new ConfigList(split1, this);
+
+	split2 = new QSplitter(split1);
+	split2->setOrientation(QSplitter::Vertical);
+
+	// create config tree
+	QVBox* box = new QVBox(split2);
+	configList = new ConfigList(box, this);
+	configList->lineEdit = new ConfigLineEdit(box);
+	configList->lineEdit->hide();
+	configList->connect(configList, SIGNAL(symbolChanged(ConfigItem*)),
+			    configList, SLOT(updateList(ConfigItem*)));
+	configList->connect(configList, SIGNAL(symbolChanged(ConfigItem*)),
+			    menuList, SLOT(updateList(ConfigItem*)));
+	configList->connect(configList->lineEdit, SIGNAL(lineChanged(ConfigItem*)),
+			    SLOT(updateList(ConfigItem*)));
+
+	helpText = new QTextView(split2);
+	helpText->setTextFormat(Qt::RichText);
+
+	setTabOrder(configList, helpText);
+	configList->setFocus();
+
+	menu = menuBar();
+	toolBar = new QToolBar("Tools", this);
+
+	backAction = new QAction("Back", QPixmap(xpm_back), "Back", 0, this);
+	  connect(backAction, SIGNAL(activated()), SLOT(goBack()));
+	  backAction->setEnabled(FALSE);
+	QAction *quitAction = new QAction("Quit", "&Quit", CTRL+Key_Q, this);
+	  connect(quitAction, SIGNAL(activated()), SLOT(close()));
+	QAction *loadAction = new QAction("Load", QPixmap(xpm_load), "&Load", CTRL+Key_L, this);
+	  connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
+	QAction *saveAction = new QAction("Save", QPixmap(xpm_save), "&Save", CTRL+Key_S, this);
+	  connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
+	QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, this);
+	  connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
+	QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), "Split View", 0, this);
+	  connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
+	QAction *splitViewAction = new QAction("Split View", QPixmap(xpm_split_view), "Split View", 0, this);
+	  connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
+	QAction *fullViewAction = new QAction("Full View", QPixmap(xpm_tree_view), "Full View", 0, this);
+	  connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
+
+	QAction *showNameAction = new QAction(NULL, "Show Name", 0, this);
+	  showNameAction->setToggleAction(TRUE);
+	  showNameAction->setOn(configList->showName);
+	  connect(showNameAction, SIGNAL(toggled(bool)), SLOT(setShowName(bool)));
+	QAction *showRangeAction = new QAction(NULL, "Show Range", 0, this);
+	  showRangeAction->setToggleAction(TRUE);
+	  showRangeAction->setOn(configList->showRange);
+	  connect(showRangeAction, SIGNAL(toggled(bool)), SLOT(setShowRange(bool)));
+	QAction *showDataAction = new QAction(NULL, "Show Data", 0, this);
+	  showDataAction->setToggleAction(TRUE);
+	  showDataAction->setOn(configList->showData);
+	  connect(showDataAction, SIGNAL(toggled(bool)), SLOT(setShowData(bool)));
+	QAction *showAllAction = new QAction(NULL, "Show All Options", 0, this);
+	  showAllAction->setToggleAction(TRUE);
+	  showAllAction->setOn(configList->showAll);
+	  connect(showAllAction, SIGNAL(toggled(bool)), SLOT(setShowAll(bool)));
+	QAction *showDebugAction = new QAction(NULL, "Show Debug Info", 0, this);
+	  showDebugAction->setToggleAction(TRUE);
+	  showDebugAction->setOn(showDebug);
+	  connect(showDebugAction, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
+
+	// init tool bar
+	backAction->addTo(toolBar);
+	toolBar->addSeparator();
+	loadAction->addTo(toolBar);
+	saveAction->addTo(toolBar);
+	toolBar->addSeparator();
+	singleViewAction->addTo(toolBar);
+	splitViewAction->addTo(toolBar);
+	fullViewAction->addTo(toolBar);
+
+	// create config menu
+	QPopupMenu* config = new QPopupMenu(this);
+	menu->insertItem("&File", config);
+	loadAction->addTo(config);
+	saveAction->addTo(config);
+	saveAsAction->addTo(config);
+	config->insertSeparator();
+	quitAction->addTo(config);
+
+	// create options menu
+	QPopupMenu* optionMenu = new QPopupMenu(this);
+	menu->insertItem("&Option", optionMenu);
+	showNameAction->addTo(optionMenu);
+	showRangeAction->addTo(optionMenu);
+	showDataAction->addTo(optionMenu);
+	optionMenu->insertSeparator();
+	showAllAction->addTo(optionMenu);
+	showDebugAction->addTo(optionMenu);
+
+	connect(configList, SIGNAL(menuSelected(struct menu *)),
+		SLOT(changeMenu(struct menu *)));
+	connect(configList, SIGNAL(parentSelected()),
+		SLOT(goBack()));
+	connect(menuList, SIGNAL(menuSelected(struct menu *)),
+		SLOT(changeMenu(struct menu *)));
+
+	connect(configList, SIGNAL(gotFocus(void)),
+		SLOT(listFocusChanged(void)));
+	connect(menuList, SIGNAL(gotFocus(void)),
+		SLOT(listFocusChanged(void)));
+
+	//showFullView();
+	showSplitView();
+}
+
+static QString print_filter(const char *str)
+{
+	QRegExp re("[<>&\"\\n]");
+	QString res = str;
+	for (int i = 0; (i = res.find(re, i)) >= 0;) {
+		switch (res[i].latin1()) {
+		case '<':
+			res.replace(i, 1, "&lt;");
+			i += 4;
+			break;
+		case '>':
+			res.replace(i, 1, "&gt;");
+			i += 4;
+			break;
+		case '&':
+			res.replace(i, 1, "&amp;");
+			i += 5;
+			break;
+		case '"':
+			res.replace(i, 1, "&quot;");
+			i += 6;
+			break;
+		case '\n':
+			res.replace(i, 1, "<br>");
+			i += 4;
+			break;
+		}
+	}
+	return res;
+}
+
+static void expr_print_help(void *data, const char *str)
+{
+	((QString*)data)->append(print_filter(str));
+}
+
+/*
+ * display a new help entry as soon as a new menu entry is selected
+ */
+void ConfigView::setHelp(QListViewItem* item)
+{
+	struct symbol* sym;
+	struct menu* menu;
+
+	configList->lineEdit->hide();
+	if (item) {
+		QString head, debug, help;
+		menu = ((ConfigItem*)item)->menu;
+		sym = menu->sym;
+		if (sym) {
+			if (menu->prompt) {
+				head += "<big><b>";
+				head += print_filter(menu->prompt->text);
+				head += "</b></big>";
+				if (sym->name) {
+					head += " (";
+					head += print_filter(sym->name);
+					head += ")";
+				}
+			} else if (sym->name) {
+				head += "<big><b>";
+				head += print_filter(sym->name);
+				head += "</b></big>";
+			}
+			head += "<br><br>";
+
+			if (showDebug) {
+				debug += "type: ";
+				debug += print_filter(sym_type_name(sym->type));
+				debug += "<br>";
+				for (struct property *prop = sym->prop; prop; prop = prop->next) {
+					switch (prop->type) {
+					case P_PROMPT:
+						debug += "prompt: ";
+						debug += print_filter(prop->text);
+						debug += "<br>";
+						if (prop->visible.expr) {
+							debug += "&nbsp;&nbsp;dep: ";
+							expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE);
+							debug += "<br>";
+						}
+						break;
+					case P_DEFAULT:
+						debug += "default: ";
+						if (sym_is_choice(sym))
+							debug += print_filter(prop->def->name);
+						else {
+							sym_calc_value(prop->def);
+							debug += print_filter(sym_get_string_value(prop->def));
+						}
+						debug += "<br>";
+						if (prop->visible.expr) {
+							debug += "&nbsp;&nbsp;dep: ";
+							expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE);
+							debug += "<br>";
+						}
+						break;
+					case P_CHOICE:
+						break;
+					default:
+						debug += "unknown property: ";
+						debug += prop_get_type_name(prop->type);
+						debug += "<br>";
+					}
+				}
+				debug += "<br>";
+			}
+
+			help = print_filter(sym->help);
+		} else if (menu->prompt) {
+			head += "<big><b>";
+			head += print_filter(menu->prompt->text);
+			head += "</b></big><br><br>";
+			if (showDebug) {
+				if (menu->prompt->visible.expr) {
+					debug += "&nbsp;&nbsp;dep: ";
+					expr_print(menu->prompt->visible.expr, expr_print_help, &debug, E_NONE);
+					debug += "<br>";
+				}
+			}
+		}
+		helpText->setText(head + debug + help);
+		return;
+	}
+	helpText->setText(NULL);
+}
+
+void ConfigView::loadConfig(void)
+{
+	QString s = QFileDialog::getOpenFileName(".config", NULL, this);
+	if (s.isNull())
+		return;
+	if (conf_read(s.latin1()))
+		QMessageBox::information(this, "qconf", "Unable to load configuration!");
+}
+
+void ConfigView::saveConfig(void)
+{
+	if (conf_write(NULL))
+		QMessageBox::information(this, "qconf", "Unable to save configuration!");
+}
+
+void ConfigView::saveConfigAs(void)
+{
+	QString s = QFileDialog::getSaveFileName(".config", NULL, this);
+	if (s.isNull())
+		return;
+	if (conf_write(s.latin1()))
+		QMessageBox::information(this, "qconf", "Unable to save configuration!");
+}
+
+void ConfigView::changeMenu(struct menu *menu)
+{
+	configList->setRootMenu(menu);
+	backAction->setEnabled(TRUE);
+}
+
+void ConfigView::listFocusChanged(void)
+{
+	if (menuList->hasFocus()) {
+		if (menuList->mode == menuMode)
+			configList->clearSelection();
+		setHelp(menuList->selectedItem());
+	} else if (configList->hasFocus()) {
+		setHelp(configList->selectedItem());
+	}
+}
+
+void ConfigView::goBack(void)
+{
+	ConfigItem* item;
+
+	configList->setParentMenu();
+	if (configList->rootEntry == &rootmenu)
+		backAction->setEnabled(FALSE);
+	item = (ConfigItem*)menuList->selectedItem();
+	while (item) {
+		if (item->menu == configList->rootEntry) {
+			menuList->setSelected(item, TRUE);
+			break;
+		}
+		item = (ConfigItem*)item->parent();
+	}
+}
+
+void ConfigView::showSingleView(void)
+{
+	menuList->hide();
+	menuList->setRootMenu(0);
+	configList->mode = singleMode;
+	if (configList->rootEntry == &rootmenu)
+		configList->updateListAll();
+	else
+		configList->setRootMenu(&rootmenu);
+	configList->setAllOpen(TRUE);
+	configList->setFocus();
+}
+
+void ConfigView::showSplitView(void)
+{
+	configList->mode = symbolMode;
+	if (configList->rootEntry == &rootmenu)
+		configList->updateListAll();
+	else
+		configList->setRootMenu(&rootmenu);
+	configList->setAllOpen(TRUE);
+	configApp->processEvents();
+	menuList->mode = menuMode;
+	menuList->setRootMenu(&rootmenu);
+	menuList->show();
+	menuList->setAllOpen(TRUE);
+	menuList->setFocus();
+}
+
+void ConfigView::showFullView(void)
+{
+	menuList->hide();
+	menuList->setRootMenu(0);
+	configList->mode = fullMode;
+	if (configList->rootEntry == &rootmenu)
+		configList->updateListAll();
+	else
+		configList->setRootMenu(&rootmenu);
+	configList->setAllOpen(FALSE);
+	configList->setFocus();
+}
+
+void ConfigView::setShowAll(bool b)
+{
+	if (configList->showAll == b)
+		return;
+	configList->showAll = b;
+	configList->updateListAll();
+	menuList->showAll = b;
+	menuList->updateListAll();
+}
+
+void ConfigView::setShowDebug(bool b)
+{
+	if (showDebug == b)
+		return;
+	showDebug = b;
+}
+
+void ConfigView::setShowName(bool b)
+{
+	if (configList->showName == b)
+		return;
+	configList->showName = b;
+	configList->reinit();
+}
+
+void ConfigView::setShowRange(bool b)
+{
+	if (configList->showRange == b)
+		return;
+	configList->showRange = b;
+	configList->reinit();
+}
+
+void ConfigView::setShowData(bool b)
+{
+	if (configList->showData == b)
+		return;
+	configList->showData = b;
+	configList->reinit();
+}
+
+/*
+ * ask for saving configuration before quitting
+ * TODO ask only when something changed
+ */
+void ConfigView::closeEvent(QCloseEvent* e)
+{
+	if (!sym_change_count) {
+		e->accept();
+		return;
+	}
+	QMessageBox mb("qconf", "Save configuration?", QMessageBox::Warning,
+			QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape);
+	mb.setButtonText(QMessageBox::Yes, "&Save Changes");
+	mb.setButtonText(QMessageBox::No, "&Discard Changes");
+	mb.setButtonText(QMessageBox::Cancel, "Cancel Exit");
+	switch (mb.exec()) {
+	case QMessageBox::Yes:
+		conf_write(NULL);
+	case QMessageBox::No:
+		e->accept();
+		break;
+	case QMessageBox::Cancel:
+		e->ignore();
+		break;
+	}
+}
+
+void fixup_rootmenu(struct menu *menu)
+{
+	struct menu *child;
+
+	if (!menu->prompt || menu->prompt->type != P_MENU)
+		return;
+	menu->prompt->type = P_ROOTMENU;
+	for (child = menu->list; child; child = child->next)
+		fixup_rootmenu(child);
+}
+
+int main(int ac, char** av)
+{
+	ConfigView* v;
+	const char *name;
+
+#ifndef LKC_DIRECT_LINK
+	kconfig_load();
+#endif
+
+	configApp = new QApplication(ac, av);
+	if (ac > 1 && av[1][0] == '-') {
+		switch (av[1][1]) {
+		case 'a':
+			//showAll = 1;
+			break;
+		case 'h':
+		case '?':
+			printf("%s <config>\n", av[0]);
+			exit(0);
+		}
+		name = av[2];
+	} else
+		name = av[1];
+	conf_parse(name);
+	fixup_rootmenu(&rootmenu);
+	conf_read(NULL);
+	//zconfdump(stdout);
+	v = new ConfigView();
+
+	//zconfdump(stdout);
+	v->show();
+	configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
+	configApp->exec();
+	return 0;
+}
diff -Nru a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/qconf.h	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,201 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <qlistview.h>
+
+class ConfigLineEdit;
+class ConfigItem;
+class ConfigView;
+
+enum colIdx {
+	promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr
+};
+enum listMode {
+	singleMode, menuMode, symbolMode, fullMode
+};
+
+class ConfigList : public QListView {
+	Q_OBJECT
+	typedef class QListView Parent;
+public:
+	ConfigList(QWidget* p, ConfigView* cview);
+	void reinit(void);
+
+	ConfigLineEdit* lineEdit;
+protected:
+	ConfigView* cview;
+
+	void keyPressEvent(QKeyEvent *e);
+	void contentsMousePressEvent(QMouseEvent *e);
+	void contentsMouseReleaseEvent(QMouseEvent *e);
+	void contentsMouseMoveEvent(QMouseEvent *e);
+	void contentsMouseDoubleClickEvent(QMouseEvent *e);
+	void focusInEvent(QFocusEvent *e);
+public slots:
+	void setRootMenu(struct menu *menu);
+
+	void updateList(ConfigItem *item);
+	void setValue(ConfigItem* item, tristate val);
+	void changeValue(ConfigItem* item);
+	void updateSelection(void);
+signals:
+	void menuSelected(struct menu *menu);
+	void parentSelected(void);
+	void symbolChanged(ConfigItem* item);
+	void gotFocus(void);
+
+public:
+	void updateListAll(void)
+	{
+		updateAll = true;
+		updateList(NULL);
+		updateAll = false;
+	}
+	ConfigList* listView()
+	{
+		return this;
+	}
+	ConfigItem* firstChild() const
+	{
+		return (ConfigItem *)Parent::firstChild();
+	}
+	int mapIdx(colIdx idx)
+	{
+		return colMap[idx];
+	}
+	void addColumn(colIdx idx, const QString& label)
+	{
+		colMap[idx] = Parent::addColumn(label);
+		colRevMap[colMap[idx]] = idx;
+	}
+	void removeColumn(colIdx idx)
+	{
+		int col = colMap[idx];
+		if (col >= 0) {
+			Parent::removeColumn(col);
+			colRevMap[col] = colMap[idx] = -1;
+		}
+	}
+	void setAllOpen(bool open);
+	void setParentMenu(void);
+
+	bool updateAll;
+
+	QPixmap symbolYesPix, symbolModPix, symbolNoPix;
+	QPixmap choiceYesPix, choiceNoPix, menuPix, menuInvPix;
+
+	bool showAll, showName, showRange, showData;
+	enum listMode mode;
+	struct menu *rootEntry;
+	QColorGroup disabledColorGroup;
+	QColorGroup inactivedColorGroup;
+
+private:
+	int colMap[colNr];
+	int colRevMap[colNr];
+};
+
+class ConfigItem : public QListViewItem {
+	typedef class QListViewItem Parent;
+public:
+	ConfigItem(QListView *parent, ConfigItem *after, struct menu *m)
+	: Parent(parent, after), menu(m)
+	{
+		init();
+	}
+	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m)
+	: Parent(parent, after), menu(m)
+	{
+		init();
+	}
+	~ConfigItem(void);
+	void init(void);
+#if QT_VERSION >= 300
+	void okRename(int col);
+#endif
+	void updateMenu(void);
+	ConfigList* listView() const
+	{
+		return (ConfigList*)Parent::listView();
+	}
+	ConfigItem* firstChild() const
+	{
+		return (ConfigItem *)Parent::firstChild();
+	}
+	ConfigItem* nextSibling() const
+	{
+		return (ConfigItem *)Parent::nextSibling();
+	}
+	void setText(colIdx idx, const QString& text)
+	{
+		Parent::setText(listView()->mapIdx(idx), text);
+	}
+	QString text(colIdx idx) const
+	{
+		return Parent::text(listView()->mapIdx(idx));
+	}
+	void setPixmap(colIdx idx, const QPixmap& pm)
+	{
+		Parent::setPixmap(listView()->mapIdx(idx), pm);
+	}
+	const QPixmap* pixmap(colIdx idx) const
+	{
+		return Parent::pixmap(listView()->mapIdx(idx));
+	}
+	void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
+
+	struct menu *menu;
+	bool visible;
+	bool doInit;
+};
+
+class ConfigLineEdit : public QLineEdit {
+	Q_OBJECT
+	typedef class QLineEdit Parent;
+public:
+	ConfigLineEdit(QWidget * parent)
+	: QLineEdit(parent)
+	{ }
+	void show(ConfigItem *i);
+	void keyPressEvent(QKeyEvent *e);
+signals:
+	void lineChanged(ConfigItem *item);
+
+public:
+	ConfigItem *item;
+};
+
+class ConfigView : public QMainWindow {
+	Q_OBJECT
+public:
+	ConfigView(void);
+public slots:
+	void setHelp(QListViewItem* item);
+	void changeMenu(struct menu *);
+	void listFocusChanged(void);
+	void goBack(void);
+	void loadConfig(void);
+	void saveConfig(void);
+	void saveConfigAs(void);
+	void showSingleView(void);
+	void showSplitView(void);
+	void showFullView(void);
+	void setShowAll(bool);
+	void setShowDebug(bool);
+	void setShowRange(bool);
+	void setShowName(bool);
+	void setShowData(bool);
+
+protected:
+	void closeEvent(QCloseEvent *e);
+
+	ConfigList *menuList;
+	ConfigList *configList;
+	QTextView *helpText;
+	QToolBar *toolBar;
+	QAction *backAction;
+
+	bool showDebug;
+};
diff -Nru a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/symbol.c	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,619 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/utsname.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+struct symbol symbol_yes = {
+	name: "y",
+	curr: { "y", yes },
+	flags: SYMBOL_YES|SYMBOL_VALID,
+}, symbol_mod = {
+	name: "m",
+	curr: { "m", mod },
+	flags: SYMBOL_MOD|SYMBOL_VALID,
+}, symbol_no = {
+	name: "n",
+	curr: { "n", no },
+	flags: SYMBOL_NO|SYMBOL_VALID,
+}, symbol_empty = {
+	name: "",
+	curr: { "", no },
+	flags: SYMBOL_VALID,
+};
+
+int sym_change_count;
+struct symbol *modules_sym;
+
+void sym_add_default(struct symbol *sym, const char *def)
+{
+	struct property *prop = create_prop(P_DEFAULT);
+	struct property **propp;
+
+	prop->sym = sym;
+	prop->def = sym_lookup(def, 1);
+
+	/* append property to the prop list of symbol */
+	if (prop->sym) {
+		for (propp = &prop->sym->prop; *propp; propp = &(*propp)->next)
+			;
+		*propp = prop;
+	}
+}
+
+void sym_init(void)
+{
+	struct symbol *sym;
+	struct utsname uts;
+	char *p;
+	static bool inited = false;
+
+	if (inited)
+		return;
+	inited = true;
+
+	uname(&uts);
+
+	sym = sym_lookup("ARCH", 0);
+	sym->type = S_STRING;
+	sym->flags |= SYMBOL_AUTO;
+	p = getenv("ARCH");
+	if (p)
+		sym_add_default(sym, p);
+
+	sym = sym_lookup("KERNELRELEASE", 0);
+	sym->type = S_STRING;
+	sym->flags |= SYMBOL_AUTO;
+	p = getenv("KERNELRELEASE");
+	if (p)
+		sym_add_default(sym, p);
+
+	sym = sym_lookup("UNAME_RELEASE", 0);
+	sym->type = S_STRING;
+	sym->flags |= SYMBOL_AUTO;
+	sym_add_default(sym, uts.release);
+}
+
+int sym_get_type(struct symbol *sym)
+{
+	int type = sym->type;
+	if (type == S_TRISTATE) {
+		if (sym_is_choice_value(sym) && sym->visible == yes)
+			type = S_BOOLEAN;
+		else {
+			sym_calc_value(modules_sym);
+			if (S_TRI(modules_sym->curr) == no)
+				type = S_BOOLEAN;
+		}
+	}
+	return type;
+}
+
+const char *sym_type_name(int type)
+{
+	switch (type) {
+	case S_BOOLEAN:
+		return "boolean";
+	case S_TRISTATE:
+		return "tristate";
+	case S_INT:
+		return "integer";
+	case S_HEX:
+		return "hex";
+	case S_STRING:
+		return "string";
+	case S_UNKNOWN:
+		return "unknown";
+	}
+	return "???";
+}
+
+struct property *sym_get_choice_prop(struct symbol *sym)
+{
+	struct property *prop;
+
+	for_all_choices(sym, prop)
+		return prop;
+	return NULL;
+}
+
+struct property *sym_get_default_prop(struct symbol *sym)
+{
+	struct property *prop;
+	tristate visible;
+
+	for_all_defaults(sym, prop) {
+		visible = E_CALC(prop->visible);
+		if (visible != no)
+			return prop;
+	}
+	return NULL;
+}
+
+void sym_calc_visibility(struct symbol *sym)
+{
+	struct property *prop;
+	tristate visible, oldvisible;
+
+	/* any prompt visible? */
+	oldvisible = sym->visible;
+	visible = no;
+	for_all_prompts(sym, prop)
+		visible = E_OR(visible, E_CALC(prop->visible));
+	if (oldvisible != visible) {
+		sym->visible = visible;
+		sym->flags |= SYMBOL_CHANGED;
+	}
+}
+
+void sym_calc_value(struct symbol *sym)
+{
+	struct symbol_value newval, oldval;
+	struct property *prop, *def_prop;
+	struct symbol *def_sym;
+	struct expr *e;
+
+	if (sym->flags & SYMBOL_VALID)
+		return;
+
+	oldval = sym->curr;
+
+	switch (sym->type) {
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+		newval = symbol_empty.curr;
+		break;
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		newval = symbol_no.curr;
+		break;
+	default:
+		S_VAL(newval) = sym->name;
+		S_TRI(newval) = no;
+		if (sym->flags & SYMBOL_CONST) {
+			goto out;
+		}
+		//newval = symbol_empty.curr;
+		// generate warning somewhere here later
+		//S_TRI(newval) = yes;
+		goto out;
+	}
+	sym->flags |= SYMBOL_VALID;
+	if (!sym_is_choice_value(sym))
+		sym->flags &= ~SYMBOL_WRITE;
+
+	sym_calc_visibility(sym);
+
+	/* set default if recursively called */
+	sym->curr = newval;
+
+	if (sym->visible != no) {
+		sym->flags |= SYMBOL_WRITE;
+		if (!sym_has_value(sym)) {
+			if (!sym_is_choice(sym)) {
+				prop = sym_get_default_prop(sym);
+				if (prop) {
+					sym_calc_value(prop->def);
+					newval = prop->def->curr;
+				}
+			} else
+				S_TRI(newval) = S_TRI(sym->def);
+		} else
+			newval = sym->def;
+
+		S_TRI(newval) = E_AND(S_TRI(newval), sym->visible);
+		/* if the symbol is visible and not optionial,
+		 * possibly ignore old user choice. */
+		if (!sym_is_optional(sym) && S_TRI(newval) == no)
+			S_TRI(newval) = sym->visible;
+		if (sym_is_choice_value(sym) && sym->visible == yes) {
+			prop = sym_get_choice_prop(sym);
+			S_TRI(newval) = (S_VAL(prop->def->curr) == sym) ? yes : no;
+		}
+	} else {
+		prop = sym_get_default_prop(sym);
+		if (prop) {
+			sym->flags |= SYMBOL_WRITE;
+			sym_calc_value(prop->def);
+			newval = prop->def->curr;
+		}
+	}
+
+	switch (sym_get_type(sym)) {
+	case S_TRISTATE:
+		if (S_TRI(newval) != mod)
+			break;
+		sym_calc_value(modules_sym);
+		if (S_TRI(modules_sym->curr) == no)
+			S_TRI(newval) = yes;
+		break;
+	case S_BOOLEAN:
+		if (S_TRI(newval) == mod)
+			S_TRI(newval) = yes;
+	}
+
+out:
+	sym->curr = newval;
+
+	if (sym_is_choice(sym) && S_TRI(newval) == yes) {
+		def_sym = S_VAL(sym->def);
+		if (def_sym) {
+			sym_calc_visibility(def_sym);
+			if (def_sym->visible == no)
+				def_sym = NULL;
+		}
+		if (!def_sym) {
+			for_all_defaults(sym, def_prop) {
+				if (E_CALC(def_prop->visible) == no)
+					continue;
+				sym_calc_visibility(def_prop->def);
+				if (def_prop->def->visible != no) {
+					def_sym = def_prop->def;
+					break;
+				}
+			}
+		}
+
+		if (!def_sym) {
+			prop = sym_get_choice_prop(sym);
+			for (e = prop->dep; e; e = e->left.expr) {
+				sym_calc_visibility(e->right.sym);
+				if (e->right.sym->visible != no) {
+					def_sym = e->right.sym;
+					break;
+				}
+			}
+		}
+
+		S_VAL(newval) = def_sym;
+	}
+
+	if (memcmp(&oldval, &newval, sizeof(newval)))
+		sym->flags |= SYMBOL_CHANGED;
+	sym->curr = newval;
+
+	if (sym_is_choice(sym)) {
+		int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
+		prop = sym_get_choice_prop(sym);
+		for (e = prop->dep; e; e = e->left.expr)
+			e->right.sym->flags |= flags;
+	}
+}
+
+void sym_clear_all_valid(void)
+{
+	struct symbol *sym;
+	int i;
+
+	for_all_symbols(i, sym)
+		sym->flags &= ~SYMBOL_VALID;
+	sym_change_count++;
+}
+
+void sym_set_all_changed(void)
+{
+	struct symbol *sym;
+	int i;
+
+	for_all_symbols(i, sym)
+		sym->flags |= SYMBOL_CHANGED;
+}
+
+bool sym_tristate_within_range(struct symbol *sym, tristate val)
+{
+	int type = sym_get_type(sym);
+
+	if (sym->visible == no)
+		return false;
+
+	if (type != S_BOOLEAN && type != S_TRISTATE)
+		return false;
+
+	switch (val) {
+	case no:
+		if (sym_is_choice_value(sym) && sym->visible == yes)
+			return false;
+		return sym_is_optional(sym);
+	case mod:
+		if (sym_is_choice_value(sym) && sym->visible == yes)
+			return false;
+		return type == S_TRISTATE;
+	case yes:
+		return type == S_BOOLEAN || sym->visible == yes;
+	}
+	return false;
+}
+
+bool sym_set_tristate_value(struct symbol *sym, tristate val)
+{
+	tristate oldval = sym_get_tristate_value(sym);
+
+	if (oldval != val && !sym_tristate_within_range(sym, val))
+		return false;
+
+	if (sym->flags & SYMBOL_NEW) {
+		sym->flags &= ~SYMBOL_NEW;
+		sym->flags |= SYMBOL_CHANGED;
+	}
+	if (sym_is_choice_value(sym) && val == yes) {
+		struct property *prop = sym_get_choice_prop(sym);
+
+		S_VAL(prop->def->def) = sym;
+		prop->def->flags &= ~SYMBOL_NEW;
+	}
+
+	S_TRI(sym->def) = val;
+	if (oldval != val) {
+		sym_clear_all_valid();
+		if (sym == modules_sym)
+			sym_set_all_changed();
+	}
+
+	return true;
+}
+
+tristate sym_toggle_tristate_value(struct symbol *sym)
+{
+	tristate oldval, newval;
+
+	oldval = newval = sym_get_tristate_value(sym);
+	do {
+		switch (newval) {
+		case no:
+			newval = mod;
+			break;
+		case mod:
+			newval = yes;
+			break;
+		case yes:
+			newval = no;
+			break;
+		}
+		if (sym_set_tristate_value(sym, newval))
+			break;
+	} while (oldval != newval);
+	return newval;
+}
+
+bool sym_string_valid(struct symbol *sym, const char *str)
+{
+	char ch;
+
+	switch (sym->type) {
+	case S_STRING:
+		return true;
+	case S_INT:
+		ch = *str++;
+		if (ch == '-')
+			ch = *str++;
+		if (!isdigit(ch))
+			return false;
+		if (ch == '0' && *str != 0)
+			return false;
+		while ((ch = *str++)) {
+			if (!isdigit(ch))
+				return false;
+		}
+		return true;
+	case S_HEX:
+		if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
+			str += 2;
+		ch = *str++;
+		do {
+			if (!isxdigit(ch))
+				return false;
+		} while ((ch = *str++));
+		return true;
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		switch (str[0]) {
+		case 'y':
+		case 'Y':
+			return sym_tristate_within_range(sym, yes);
+		case 'm':
+		case 'M':
+			return sym_tristate_within_range(sym, mod);
+		case 'n':
+		case 'N':
+			return sym_tristate_within_range(sym, no);
+		}
+		return false;
+	default:
+		return false;
+	}
+}
+
+bool sym_set_string_value(struct symbol *sym, const char *newval)
+{
+	const char *oldval;
+	char *val;
+	int size;
+
+	switch (sym->type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		switch (newval[0]) {
+		case 'y':
+		case 'Y':
+			return sym_set_tristate_value(sym, yes);
+		case 'm':
+		case 'M':
+			return sym_set_tristate_value(sym, mod);
+		case 'n':
+		case 'N':
+			return sym_set_tristate_value(sym, no);
+		}
+		return false;
+	default:
+		;
+	}
+
+	if (!sym_string_valid(sym, newval))
+		return false;
+
+	if (sym->flags & SYMBOL_NEW) {
+		sym->flags &= ~SYMBOL_NEW;
+		sym->flags |= SYMBOL_CHANGED;
+	}
+
+	oldval = S_VAL(sym->def);
+	size = strlen(newval) + 1;
+	if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
+		size += 2;
+		S_VAL(sym->def) = val = malloc(size);
+		*val++ = '0';
+		*val++ = 'x';
+	} else if (!oldval || strcmp(oldval, newval))
+		S_VAL(sym->def) = val = malloc(size);
+	else
+		return true;
+
+	strcpy(val, newval);
+	free((void *)oldval);
+	sym_clear_all_valid();
+
+	return true;
+}
+
+const char *sym_get_string_value(struct symbol *sym)
+{
+	tristate val;
+
+	switch (sym->type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		val = sym_get_tristate_value(sym);
+		switch (val) {
+		case no:
+			return "n";
+		case mod:
+			return "m";
+		case yes:
+			return "y";
+		}
+		break;
+	default:
+		;
+	}
+	return (const char *)S_VAL(sym->curr);
+}
+
+bool sym_is_changable(struct symbol *sym)
+{
+	if (sym->visible == no)
+		return false;
+	/* at least 'n' and 'y'/'m' is selectable */
+	if (sym_is_optional(sym))
+		return true;
+	/* no 'n', so 'y' and 'm' must be selectable */
+	if (sym_get_type(sym) == S_TRISTATE && sym->visible == yes)
+		return true;
+	return false;
+}
+
+struct symbol *sym_lookup(const char *name, int isconst)
+{
+	struct symbol *symbol;
+	const char *ptr;
+	char *new_name;
+	int hash = 0;
+
+	//printf("lookup: %s -> ", name);
+	if (name) {
+		if (name[0] && !name[1]) {
+			switch (name[0]) {
+			case 'y': return &symbol_yes;
+			case 'm': return &symbol_mod;
+			case 'n': return &symbol_no;
+			}
+		}
+		for (ptr = name; *ptr; ptr++)
+			hash += *ptr;
+		hash &= 0xff;
+
+		for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
+			if (!strcmp(symbol->name, name)) {
+				if ((isconst && symbol->flags & SYMBOL_CONST) ||
+				    (!isconst && !(symbol->flags & SYMBOL_CONST))) {
+					//printf("h:%p\n", symbol);
+					return symbol;
+				}
+			}
+		}
+		new_name = strdup(name);
+	} else {
+		new_name = NULL;
+		hash = 256;
+	}
+
+	symbol = malloc(sizeof(*symbol));
+	memset(symbol, 0, sizeof(*symbol));
+	symbol->name = new_name;
+	symbol->type = S_UNKNOWN;
+	symbol->flags = SYMBOL_NEW;
+	if (isconst)
+		symbol->flags |= SYMBOL_CONST;
+
+	symbol->next = symbol_hash[hash];
+	symbol_hash[hash] = symbol;
+
+	//printf("n:%p\n", symbol);
+	return symbol;
+}
+
+struct symbol *sym_find(const char *name)
+{
+	struct symbol *symbol = NULL;
+	const char *ptr;
+	int hash = 0;
+
+	if (!name)
+		return NULL;
+
+	if (name[0] && !name[1]) {
+		switch (name[0]) {
+		case 'y': return &symbol_yes;
+		case 'm': return &symbol_mod;
+		case 'n': return &symbol_no;
+		}
+	}
+	for (ptr = name; *ptr; ptr++)
+		hash += *ptr;
+	hash &= 0xff;
+
+	for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
+		if (!strcmp(symbol->name, name) &&
+		    !(symbol->flags & SYMBOL_CONST))
+				break;
+	}
+
+	return symbol;
+}
+
+const char *prop_get_type_name(enum prop_type type)
+{
+	switch (type) {
+	case P_PROMPT:
+		return "prompt";
+	case P_COMMENT:
+		return "comment";
+	case P_MENU:
+		return "menu";
+	case P_ROOTMENU:
+		return "rootmenu";
+	case P_DEFAULT:
+		return "default";
+	case P_CHOICE:
+		return "choice";
+	default:
+		return "unknown";
+	}
+}
diff -Nru a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/zconf.l	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,323 @@
+%option backup nostdinit noyywrap full ecs
+%option 8bit backup nodefault perf-report perf-report
+%x COMMAND HELP STRING PARAM
+%{
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+#include "zconf.tab.h"
+
+#define START_STRSIZE	16
+
+char *text;
+static char *text_ptr;
+static int text_size, text_asize;
+
+struct buffer {
+        struct buffer *parent;
+        YY_BUFFER_STATE state;
+};
+
+struct buffer *current_buf;
+
+static int last_ts, first_ts;
+
+static void zconf_endhelp(void);
+static struct buffer *zconf_endfile(void);
+
+void new_string(void)
+{
+	text = malloc(START_STRSIZE);
+	text_asize = START_STRSIZE;
+	text_ptr = text;
+	text_size = 0;
+	*text_ptr = 0;
+}
+
+void append_string(const char *str, int size)
+{
+	int new_size = text_size + size + 1;
+	if (new_size > text_asize) {
+		text = realloc(text, new_size);
+		text_asize = new_size;
+		text_ptr = text + text_size;
+	}
+	memcpy(text_ptr, str, size);
+	text_ptr += size;
+	text_size += size;
+	*text_ptr = 0;
+}
+
+void alloc_string(const char *str, int size)
+{
+	text = malloc(size + 1);
+	memcpy(text, str, size);
+	text[size] = 0;
+}
+%}
+
+ws	[ \n\t]
+n	[A-Za-z0-9_]
+
+%%
+	int str = 0;
+	int ts, i;
+
+[ \t]*#.*\n	current_file->lineno++;
+[ \t]*#.*
+
+[ \t]*\n	current_file->lineno++; return T_EOL;
+
+[ \t]+	{
+	BEGIN(COMMAND);
+}
+
+.	{
+	unput(yytext[0]);
+	//printf("new config: ");
+	//symbol_end(NULL);
+	BEGIN(COMMAND);
+}
+
+
+<COMMAND>{
+	"mainmenu"		BEGIN(PARAM); return T_MAINMENU;
+	"menu"			BEGIN(PARAM); return T_MENU;
+	"endmenu"		BEGIN(PARAM); return T_ENDMENU;
+	"source"		BEGIN(PARAM); return T_SOURCE;
+	"choice"		BEGIN(PARAM); return T_CHOICE;
+	"endchoice"		BEGIN(PARAM); return T_ENDCHOICE;
+	"comment"		BEGIN(PARAM); return T_COMMENT;
+	"config"		BEGIN(PARAM); return T_CONFIG;
+	"help"			BEGIN(PARAM); return T_HELP;
+	"if"			BEGIN(PARAM); return T_IF;
+	"endif"			BEGIN(PARAM); return T_ENDIF;
+	"depends"		BEGIN(PARAM); return T_DEPENDS;
+	"requires"		BEGIN(PARAM); return T_REQUIRES;
+	"optional"		BEGIN(PARAM); return T_OPTIONAL;
+	"default"		BEGIN(PARAM); return T_DEFAULT;
+	"prompt"		BEGIN(PARAM); return T_PROMPT;
+	"tristate"		BEGIN(PARAM); return T_TRISTATE;
+	"bool"			BEGIN(PARAM); return T_BOOLEAN;
+	"boolean"		BEGIN(PARAM); return T_BOOLEAN;
+	"int"			BEGIN(PARAM); return T_INT;
+	"hex"			BEGIN(PARAM); return T_HEX;
+	"string"		BEGIN(PARAM); return T_STRING;
+	{n}+	{
+		alloc_string(yytext, yyleng);
+		zconflval.string = text;
+		return T_WORD;
+	}
+	.
+	\n	current_file->lineno++; BEGIN(INITIAL);
+}
+
+<PARAM>{
+	"&&"	return T_AND;
+	"||"	return T_OR;
+	"("	return T_OPEN_PAREN;
+	")"	return T_CLOSE_PAREN;
+	"!"	return T_NOT;
+	"="	return T_EQUAL;
+	"!="	return T_UNEQUAL;
+	"if"	return T_IF;
+	"on"	return T_ON;
+	\"|\'	{
+		str = yytext[0];
+		new_string();
+		BEGIN(STRING);
+	}
+	\n	BEGIN(INITIAL); current_file->lineno++; return T_EOL;
+	---	/* ignore */
+	({n}|[-/.])+	{
+		alloc_string(yytext, yyleng);
+		zconflval.string = text;
+		return T_WORD;
+	}
+	.
+}
+
+<STRING>{
+	[^'"\n\\]+	{
+		append_string(yytext, yyleng);
+	}
+	\'|\"	{
+		if (str == yytext[0]) {
+			BEGIN(PARAM);
+			zconflval.string = text;
+			//printf("s:%s\n", text);
+			return T_STRING;
+		} else
+			append_string(yytext, 1);
+	}
+	\\[ \t]*\n	append_string(yytext+yyleng-1, 1); current_file->lineno++;
+	\\[ \t]*	append_string(yytext+1, yyleng-1);
+	\\.		append_string(yytext+1, 1);
+	\n	{
+		//printf(":%d: open string!\n", current_file->lineno+1);
+		exit(0);
+	}
+	<<EOF>>	{
+		//printf(":%d: open string!\n", current_file->lineno+1);
+		exit(0);
+	}
+}
+
+<HELP>{
+	[ \t]+	{
+		ts = 0;
+		for (i = 0; i < yyleng; i++) {
+			if (yytext[i] == '\t')
+				ts = (ts & ~7) + 8;
+			else
+				ts++;
+		}
+		last_ts = ts;
+		if (first_ts) {
+			if (ts < first_ts) {
+				zconf_endhelp();
+				return T_HELPTEXT;
+			}
+			ts -= first_ts;
+			while (ts > 8) {
+				append_string("        ", 8);
+				ts -= 8;
+			}
+			append_string("        ", ts);
+		}
+		
+	}
+	\n/[^ \t\n] {
+		current_file->lineno++;
+		zconf_endhelp();
+		return T_HELPTEXT;
+	}
+	[ \t]*\n	{
+		current_file->lineno++;
+		append_string("\n", 1);
+	}
+	[^ \t\n].* {
+		append_string(yytext, yyleng);
+		if (!first_ts)
+			first_ts = last_ts;
+	}
+	<<EOF>>	{
+		zconf_endhelp();
+		return T_HELPTEXT;
+	}
+}
+
+<<EOF>>	{
+	if (current_buf) {
+		zconf_endfile();
+		return T_EOF;
+	}
+	yyterminate();
+}
+
+%%
+void zconf_starthelp(void)
+{
+	new_string();
+	last_ts = first_ts = 0;
+	BEGIN(HELP);
+}
+
+static void zconf_endhelp(void)
+{
+	zconflval.string = text;
+	BEGIN(INITIAL); 
+}
+
+void zconf_initscan(const char *name)
+{
+	yyin = fopen(name, "r");
+	if (!yyin) {
+		printf("can't find file %s\n", name);
+		exit(1);
+	}
+	//fprintf(stderr, "zconf_initscan: %s\n", name);
+
+	current_buf = malloc(sizeof(*current_buf));
+	memset(current_buf, 0, sizeof(*current_buf));
+
+	current_file = file_lookup(name);
+	current_file->lineno = 1;
+	current_file->flags = FILE_BUSY;
+}
+
+void zconf_nextfile(const char *name)
+{
+	struct file *file = file_lookup(name);
+	struct buffer *buf = malloc(sizeof(*buf));
+	memset(buf, 0, sizeof(*buf));
+
+	current_buf->state = YY_CURRENT_BUFFER;
+	yyin = fopen(name, "r");
+	if (!yyin) {
+		printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
+		exit(1);
+	}
+	yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
+	buf->parent = current_buf;
+	current_buf = buf;
+
+	//fprintf(stderr, "zconf_nextfile: %s\n", name);
+
+	if (file->flags & FILE_BUSY) {
+		printf("recursive scan (%s)?\n", name);
+		exit(1);
+	}
+	if (file->flags & FILE_SCANNED) {
+		printf("file %s already scanned?\n", name);
+		exit(1);
+	}
+	file->flags |= FILE_BUSY;
+	file->lineno = 1;
+	file->parent = current_file;
+	current_file = file;
+}
+
+static struct buffer *zconf_endfile(void)
+{
+	struct buffer *parent;
+
+	current_file->flags |= FILE_SCANNED;
+	current_file->flags &= ~FILE_BUSY;
+	current_file = current_file->parent;
+
+	parent = current_buf->parent;
+	if (parent) {
+		yy_delete_buffer(YY_CURRENT_BUFFER);
+		yy_switch_to_buffer(parent->state);
+	}
+	free(current_buf);
+	current_buf = parent;
+
+	return parent;
+}
+
+int zconf_lineno(void)
+{
+	if (current_buf)
+		return current_file->lineno;
+	else
+		return 0;
+}
+
+char *zconf_curname(void)
+{
+	if (current_buf)
+		return current_file->name;
+	else
+		return "<none>";
+}
diff -Nru a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/zconf.tab.c_shipped	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,1866 @@
+/* A Bison parser, made from zconf.y
+   by GNU bison 1.35.  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define yyparse zconfparse
+#define yylex zconflex
+#define yyerror zconferror
+#define yylval zconflval
+#define yychar zconfchar
+#define yydebug zconfdebug
+#define yynerrs zconfnerrs
+# define	T_MAINMENU	257
+# define	T_MENU	258
+# define	T_ENDMENU	259
+# define	T_SOURCE	260
+# define	T_CHOICE	261
+# define	T_ENDCHOICE	262
+# define	T_COMMENT	263
+# define	T_CONFIG	264
+# define	T_HELP	265
+# define	T_HELPTEXT	266
+# define	T_IF	267
+# define	T_ENDIF	268
+# define	T_DEPENDS	269
+# define	T_REQUIRES	270
+# define	T_OPTIONAL	271
+# define	T_PROMPT	272
+# define	T_DEFAULT	273
+# define	T_TRISTATE	274
+# define	T_BOOLEAN	275
+# define	T_INT	276
+# define	T_HEX	277
+# define	T_WORD	278
+# define	T_STRING	279
+# define	T_UNEQUAL	280
+# define	T_EOF	281
+# define	T_EOL	282
+# define	T_CLOSE_PAREN	283
+# define	T_OPEN_PAREN	284
+# define	T_ON	285
+# define	T_OR	286
+# define	T_AND	287
+# define	T_EQUAL	288
+# define	T_NOT	289
+
+#line 1 "zconf.y"
+
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
+
+#define PRINTD		0x0001
+#define DEBUG_PARSE	0x0002
+
+int cdebug = PRINTD;
+
+extern int zconflex(void);
+static void zconfprint(const char *err, ...);
+static void zconferror(const char *err);
+static bool zconf_endtoken(int token, int starttoken, int endtoken);
+
+struct symbol *symbol_hash[257];
+
+#define YYERROR_VERBOSE
+
+#line 32 "zconf.y"
+#ifndef YYSTYPE
+typedef union
+{
+	int token;
+	char *string;
+	struct symbol *symbol;
+	struct expr *expr;
+	struct menu *menu;
+} yystype;
+# define YYSTYPE yystype
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+#line 83 "zconf.y"
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+
+
+#define	YYFINAL		145
+#define	YYFLAG		-32768
+#define	YYNTBASE	36
+
+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
+#define YYTRANSLATE(x) ((unsigned)(x) <= 289 ? yytranslate[x] : 74)
+
+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
+static const char yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    32,    33,    34,    35
+};
+
+#if YYDEBUG
+static const short yyprhs[] =
+{
+       0,     0,     1,     4,     6,     8,    10,    14,    16,    18,
+      20,    23,    25,    27,    29,    31,    33,    36,    40,    41,
+      45,    49,    52,    55,    58,    61,    64,    67,    70,    74,
+      78,    80,    84,    86,    91,    94,    95,    99,   103,   106,
+     109,   113,   115,   118,   119,   122,   125,   127,   133,   137,
+     138,   141,   144,   147,   150,   154,   156,   161,   164,   165,
+     168,   171,   174,   178,   181,   184,   187,   191,   194,   197,
+     198,   202,   205,   209,   212,   215,   216,   218,   222,   224,
+     226,   228,   230,   232,   234,   236,   237,   240,   242,   246,
+     250,   254,   257,   261,   265,   267
+};
+static const short yyrhs[] =
+{
+      -1,    36,    37,     0,    38,     0,    46,     0,    57,     0,
+       3,    68,    70,     0,     5,     0,    14,     0,     8,     0,
+       1,    70,     0,    52,     0,    62,     0,    40,     0,    60,
+       0,    70,     0,    10,    24,     0,    39,    28,    41,     0,
+       0,    41,    42,    28,     0,    41,    66,    28,     0,    41,
+      64,     0,    41,    28,     0,    20,    67,     0,    21,    67,
+       0,    22,    67,     0,    23,    67,     0,    25,    67,     0,
+      18,    68,    71,     0,    19,    73,    71,     0,     7,     0,
+      43,    28,    47,     0,    69,     0,    44,    49,    45,    28,
+       0,    44,    49,     0,     0,    47,    48,    28,     0,    47,
+      66,    28,     0,    47,    64,     0,    47,    28,     0,    18,
+      68,    71,     0,    17,     0,    19,    73,     0,     0,    49,
+      38,     0,    13,    72,     0,    69,     0,    50,    28,    53,
+      51,    28,     0,    50,    28,    53,     0,     0,    53,    38,
+       0,    53,    57,     0,    53,    46,     0,     4,    68,     0,
+      54,    28,    65,     0,    69,     0,    55,    58,    56,    28,
+       0,    55,    58,     0,     0,    58,    38,     0,    58,    57,
+       0,    58,    46,     0,    58,     1,    28,     0,     6,    68,
+       0,    59,    28,     0,     9,    68,     0,    61,    28,    65,
+       0,    11,    28,     0,    63,    12,     0,     0,    65,    66,
+      28,     0,    65,    28,     0,    15,    31,    72,     0,    15,
+      72,     0,    16,    72,     0,     0,    68,     0,    68,    13,
+      72,     0,    24,     0,    25,     0,     5,     0,     8,     0,
+      14,     0,    28,     0,    27,     0,     0,    13,    72,     0,
+      73,     0,    73,    34,    73,     0,    73,    26,    73,     0,
+      30,    72,    29,     0,    35,    72,     0,    72,    32,    72,
+       0,    72,    33,    72,     0,    24,     0,    25,     0
+};
+
+#endif
+
+#if YYDEBUG
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const short yyrline[] =
+{
+       0,    88,    89,    92,    93,    94,    95,    96,    97,    98,
+      99,   102,   104,   105,   106,   107,   113,   121,   127,   129,
+     130,   131,   132,   135,   141,   147,   153,   159,   165,   171,
+     179,   188,   194,   202,   204,   210,   212,   213,   214,   215,
+     218,   224,   230,   237,   239,   244,   254,   262,   264,   270,
+     272,   273,   274,   279,   286,   292,   300,   302,   308,   310,
+     311,   312,   313,   316,   322,   329,   336,   343,   349,   356,
+     357,   358,   361,   366,   371,   379,   381,   385,   390,   391,
+     394,   395,   396,   399,   400,   402,   403,   406,   407,   408,
+     409,   410,   411,   412,   415,   416
+};
+#endif
+
+
+#if (YYDEBUG) || defined YYERROR_VERBOSE
+
+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+static const char *const yytname[] =
+{
+  "$", "error", "$undefined.", "T_MAINMENU", "T_MENU", "T_ENDMENU", 
+  "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 
+  "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_REQUIRES", 
+  "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", "T_BOOLEAN", 
+  "T_INT", "T_HEX", "T_WORD", "T_STRING", "T_UNEQUAL", "T_EOF", "T_EOL", 
+  "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_OR", "T_AND", "T_EQUAL", 
+  "T_NOT", "input", "block", "common_block", "config_entry_start", 
+  "config_stmt", "config_option_list", "config_option", "choice", 
+  "choice_entry", "choice_end", "choice_stmt", "choice_option_list", 
+  "choice_option", "choice_block", "if", "if_end", "if_stmt", "if_block", 
+  "menu", "menu_entry", "menu_end", "menu_stmt", "menu_block", "source", 
+  "source_stmt", "comment", "comment_stmt", "help_start", "help", 
+  "depends_list", "depends", "prompt_stmt_opt", "prompt", "end", 
+  "nl_or_eof", "if_expr", "expr", "symbol", 0
+};
+#endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const short yyr1[] =
+{
+       0,    36,    36,    37,    37,    37,    37,    37,    37,    37,
+      37,    38,    38,    38,    38,    38,    39,    40,    41,    41,
+      41,    41,    41,    42,    42,    42,    42,    42,    42,    42,
+      43,    44,    45,    46,    46,    47,    47,    47,    47,    47,
+      48,    48,    48,    49,    49,    50,    51,    52,    52,    53,
+      53,    53,    53,    54,    55,    56,    57,    57,    58,    58,
+      58,    58,    58,    59,    60,    61,    62,    63,    64,    65,
+      65,    65,    66,    66,    66,    67,    67,    67,    68,    68,
+      69,    69,    69,    70,    70,    71,    71,    72,    72,    72,
+      72,    72,    72,    72,    73,    73
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const short yyr2[] =
+{
+       0,     0,     2,     1,     1,     1,     3,     1,     1,     1,
+       2,     1,     1,     1,     1,     1,     2,     3,     0,     3,
+       3,     2,     2,     2,     2,     2,     2,     2,     3,     3,
+       1,     3,     1,     4,     2,     0,     3,     3,     2,     2,
+       3,     1,     2,     0,     2,     2,     1,     5,     3,     0,
+       2,     2,     2,     2,     3,     1,     4,     2,     0,     2,
+       2,     2,     3,     2,     2,     2,     3,     2,     2,     0,
+       3,     2,     3,     2,     2,     0,     1,     3,     1,     1,
+       1,     1,     1,     1,     1,     0,     2,     1,     3,     3,
+       3,     2,     3,     3,     1,     1
+};
+
+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+   doesn't specify something else to do.  Zero means the default is an
+   error. */
+static const short yydefact[] =
+{
+       1,     0,     0,     0,     0,     7,     0,    30,     9,     0,
+       0,     0,     8,    84,    83,     2,     3,     0,    13,     0,
+      43,     4,     0,    11,     0,    58,     5,     0,    14,     0,
+      12,    15,    10,    78,    79,     0,    53,    63,    65,    16,
+      94,    95,     0,     0,    45,    87,    18,    35,    34,    49,
+      69,     0,    64,    69,     6,     0,    91,     0,     0,     0,
+       0,    17,    31,    80,    81,    82,    44,     0,    32,    48,
+      54,     0,    59,    61,     0,    60,    55,    66,    90,    92,
+      93,    89,    88,     0,     0,     0,     0,     0,    75,    75,
+      75,    75,    75,    22,     0,     0,    21,     0,    41,     0,
+       0,    39,     0,    38,     0,    33,    50,    52,     0,    51,
+      46,    71,     0,    62,    56,    67,     0,    73,    74,    85,
+      85,    23,    76,    24,    25,    26,    27,    19,    68,    20,
+      85,    42,    36,    37,    47,    70,    72,     0,    28,    29,
+       0,    40,    86,    77,     0,     0
+};
+
+static const short yydefgoto[] =
+{
+       1,    15,    16,    17,    18,    61,    94,    19,    20,    67,
+      21,    62,   102,    48,    22,   108,    23,    69,    24,    25,
+      74,    26,    51,    27,    28,    29,    30,    95,    96,    70,
+     112,   121,   122,    68,    31,   138,    44,    45
+};
+
+static const short yypact[] =
+{
+  -32768,    17,    41,    65,    65,-32768,    65,-32768,-32768,    65,
+     -11,    40,-32768,-32768,-32768,-32768,-32768,    13,-32768,    23,
+  -32768,-32768,    66,-32768,    72,-32768,-32768,    77,-32768,    81,
+  -32768,-32768,-32768,-32768,-32768,    41,-32768,-32768,-32768,-32768,
+  -32768,-32768,    40,    40,    64,    59,-32768,-32768,    98,-32768,
+  -32768,    49,-32768,-32768,-32768,     7,-32768,    40,    40,    67,
+      67,    99,   117,-32768,-32768,-32768,-32768,    85,-32768,    74,
+      18,    88,-32768,-32768,    95,-32768,-32768,    18,-32768,    96,
+  -32768,-32768,-32768,   102,    36,    40,    65,    67,    65,    65,
+      65,    65,    65,-32768,   103,   129,-32768,   114,-32768,    65,
+      67,-32768,   115,-32768,   116,-32768,-32768,-32768,   118,-32768,
+  -32768,-32768,   119,-32768,-32768,-32768,    40,    64,    64,   135,
+     135,-32768,   136,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+     135,-32768,-32768,-32768,-32768,-32768,    64,    40,-32768,-32768,
+      40,-32768,    64,    64,   150,-32768
+};
+
+static const short yypgoto[] =
+{
+  -32768,-32768,   -37,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+     -41,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+  -32768,   -32,-32768,-32768,-32768,-32768,-32768,-32768,    89,   100,
+      11,    48,     0,   -22,     3,  -118,   -42,   -52
+};
+
+
+#define	YYLAST		153
+
+
+static const short yytable[] =
+{
+      55,    56,   139,    35,    36,    32,    37,    81,    82,    38,
+      73,    66,   141,    39,    72,    79,    80,   144,     2,    75,
+       3,     4,     5,     6,     7,     8,     9,    10,   107,    76,
+      11,    12,   106,    84,    85,   120,    78,   109,    54,    57,
+      58,    46,   117,   118,    13,    14,   111,   110,   131,   -57,
+      71,    47,   -57,     4,    63,     6,     7,    64,     9,    10,
+      40,    41,    11,    65,    40,    41,    42,   116,    13,    14,
+      42,    43,    97,   104,   136,    43,    13,    14,     4,    63,
+       6,     7,    64,     9,    10,    59,   119,    11,    65,    33,
+      34,    40,    41,    60,    49,   142,    57,    58,   143,   130,
+      50,    13,    14,    63,     6,    52,    64,     9,    10,    53,
+      83,    11,    65,   105,    84,    85,   113,    86,    87,    88,
+      89,    90,    91,   114,    92,    13,    14,    93,    83,    58,
+     115,   127,    84,    85,    98,    99,   100,   123,   124,   125,
+     126,   128,   129,   132,   133,   101,   134,   135,   137,   140,
+     145,   103,     0,    77
+};
+
+static const short yycheck[] =
+{
+      42,    43,   120,     3,     4,     2,     6,    59,    60,     9,
+      51,    48,   130,    24,    51,    57,    58,     0,     1,    51,
+       3,     4,     5,     6,     7,     8,     9,    10,    69,    51,
+      13,    14,    69,    15,    16,    87,    29,    69,    35,    32,
+      33,    28,    84,    85,    27,    28,    28,    69,   100,     0,
+       1,    28,     3,     4,     5,     6,     7,     8,     9,    10,
+      24,    25,    13,    14,    24,    25,    30,    31,    27,    28,
+      30,    35,    61,    62,   116,    35,    27,    28,     4,     5,
+       6,     7,     8,     9,    10,    26,    86,    13,    14,    24,
+      25,    24,    25,    34,    28,   137,    32,    33,   140,    99,
+      28,    27,    28,     5,     6,    28,     8,     9,    10,    28,
+      11,    13,    14,    28,    15,    16,    28,    18,    19,    20,
+      21,    22,    23,    28,    25,    27,    28,    28,    11,    33,
+      28,    28,    15,    16,    17,    18,    19,    89,    90,    91,
+      92,    12,    28,    28,    28,    28,    28,    28,    13,    13,
+       0,    62,    -1,    53
+};
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/share/bison/bison.simple"
+
+/* Skeleton output parser for bison,
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
+   Foundation, 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.
+
+   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.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser when
+   the %semantic_parser declaration is not specified in the grammar.
+   It was written by Richard Stallman by simplifying the hairy parser
+   used when %semantic_parser is specified.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# if YYSTACK_USE_ALLOCA
+#  define YYSTACK_ALLOC alloca
+# else
+#  ifndef YYSTACK_USE_ALLOCA
+#   if defined (alloca) || defined (_ALLOCA_H)
+#    define YYSTACK_ALLOC alloca
+#   else
+#    ifdef __GNUC__
+#     define YYSTACK_ALLOC __builtin_alloca
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning. */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+#  if defined (__STDC__) || defined (__cplusplus)
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   define YYSIZE_T size_t
+#  endif
+#  define YYSTACK_ALLOC malloc
+#  define YYSTACK_FREE free
+# endif
+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
+
+
+#if (! defined (yyoverflow) \
+     && (! defined (__cplusplus) \
+	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  short yyss;
+  YYSTYPE yyvs;
+# if YYLSP_NEEDED
+  YYLTYPE yyls;
+# endif
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# if YYLSP_NEEDED
+#  define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
+      + 2 * YYSTACK_GAP_MAX)
+# else
+#  define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
+      + YYSTACK_GAP_MAX)
+# endif
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  register YYSIZE_T yyi;		\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (0)
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (0)
+
+#endif
+
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { 								\
+      yyerror ("syntax error: cannot back up");			\
+      YYERROR;							\
+    }								\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+   are run).
+
+   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
+   first token.  By default, to implement support for ranges, extend
+   its range to the last symbol.  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)       	\
+   Current.last_line   = Rhs[N].last_line;	\
+   Current.last_column = Rhs[N].last_column;
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#if YYPURE
+# if YYLSP_NEEDED
+#  ifdef YYLEX_PARAM
+#   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
+#  else
+#   define YYLEX		yylex (&yylval, &yylloc)
+#  endif
+# else /* !YYLSP_NEEDED */
+#  ifdef YYLEX_PARAM
+#   define YYLEX		yylex (&yylval, YYLEX_PARAM)
+#  else
+#   define YYLEX		yylex (&yylval)
+#  endif
+# endif /* !YYLSP_NEEDED */
+#else /* !YYPURE */
+# define YYLEX			yylex ()
+#endif /* !YYPURE */
+
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (0)
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+#endif /* !YYDEBUG */
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#if YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+#ifdef YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined (__GLIBC__) && defined (_STRING_H)
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+static YYSIZE_T
+#   if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+#   else
+yystrlen (yystr)
+     const char *yystr;
+#   endif
+{
+  register const char *yys = yystr;
+
+  while (*yys++ != '\0')
+    continue;
+
+  return yys - yystr - 1;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+#   if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+#   else
+yystpcpy (yydest, yysrc)
+     char *yydest;
+     const char *yysrc;
+#   endif
+{
+  register char *yyd = yydest;
+  register const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+#endif
+
+#line 315 "/usr/share/bison/bison.simple"
+
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#  define YYPARSE_PARAM_DECL
+# else
+#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+# endif
+#else /* !YYPARSE_PARAM */
+# define YYPARSE_PARAM_ARG
+# define YYPARSE_PARAM_DECL
+#endif /* !YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+# ifdef YYPARSE_PARAM
+int yyparse (void *);
+# else
+int yyparse (void);
+# endif
+#endif
+
+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
+   variables are global, or local to YYPARSE.  */
+
+#define YY_DECL_NON_LSP_VARIABLES			\
+/* The lookahead symbol.  */				\
+int yychar;						\
+							\
+/* The semantic value of the lookahead symbol. */	\
+YYSTYPE yylval;						\
+							\
+/* Number of parse errors so far.  */			\
+int yynerrs;
+
+#if YYLSP_NEEDED
+# define YY_DECL_VARIABLES			\
+YY_DECL_NON_LSP_VARIABLES			\
+						\
+/* Location data for the lookahead symbol.  */	\
+YYLTYPE yylloc;
+#else
+# define YY_DECL_VARIABLES			\
+YY_DECL_NON_LSP_VARIABLES
+#endif
+
+
+/* If nonreentrant, generate the variables here. */
+
+#if !YYPURE
+YY_DECL_VARIABLES
+#endif  /* !YYPURE */
+
+int
+yyparse (YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  /* If reentrant, generate the variables here. */
+#if YYPURE
+  YY_DECL_VARIABLES
+#endif  /* !YYPURE */
+
+  register int yystate;
+  register int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yychar1 = 0;
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack. */
+  short	yyssa[YYINITDEPTH];
+  short *yyss = yyssa;
+  register short *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  register YYSTYPE *yyvsp;
+
+#if YYLSP_NEEDED
+  /* The location stack.  */
+  YYLTYPE yylsa[YYINITDEPTH];
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+#endif
+
+#if YYLSP_NEEDED
+# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+# define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+#if YYLSP_NEEDED
+  YYLTYPE yyloc;
+#endif
+
+  /* When reducing, the number of symbols on the RHS of the reduced
+     rule. */
+  int yylen;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+#if YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed. so pushing a state here evens the stacks.
+     */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack. Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	short *yyss1 = yyss;
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  */
+# if YYLSP_NEEDED
+	YYLTYPE *yyls1 = yyls;
+	/* This used to be a conditional around just the two extra args,
+	   but that might be undefined if yyoverflow is a macro.  */
+	yyoverflow ("parser stack overflow",
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yyls1, yysize * sizeof (*yylsp),
+		    &yystacksize);
+	yyls = yyls1;
+# else
+	yyoverflow ("parser stack overflow",
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+		    &yystacksize);
+# endif
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyoverflowlab;
+# else
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	goto yyoverflowlab;
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	short *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyoverflowlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+# if YYLSP_NEEDED
+	YYSTACK_RELOCATE (yyls);
+# endif
+# undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+#if YYLSP_NEEDED
+      yylsp = yyls + yysize - 1;
+#endif
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE (yychar);
+
+#if YYDEBUG
+     /* We have to keep this `#if YYDEBUG', since we use variables
+	which are defined only if `YYDEBUG' is set.  */
+      if (yydebug)
+	{
+	  YYFPRINTF (stderr, "Next token is %d (%s",
+		     yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise
+	     meaning of a token, for further debugging info.  */
+# ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+# endif
+	  YYFPRINTF (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
+	      yychar, yytname[yychar1]));
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#if YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to the semantic value of
+     the lookahead token.  This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+#if YYLSP_NEEDED
+  /* Similarly for the default location.  Let the user run additional
+     commands if for instance locations are ranges.  */
+  yyloc = yylsp[1-yylen];
+  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+#endif
+
+#if YYDEBUG
+  /* We have to keep this `#if YYDEBUG', since we use variables which
+     are defined only if `YYDEBUG' is set.  */
+  if (yydebug)
+    {
+      int yyi;
+
+      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
+		 yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
+	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+  switch (yyn) {
+
+case 7:
+#line 96 "zconf.y"
+{ zconfprint("unexpected 'endmenu' statement"); ;
+    break;}
+case 8:
+#line 97 "zconf.y"
+{ zconfprint("unexpected 'endif' statement"); ;
+    break;}
+case 9:
+#line 98 "zconf.y"
+{ zconfprint("unexpected 'endchoice' statement"); ;
+    break;}
+case 10:
+#line 99 "zconf.y"
+{ zconfprint("syntax error"); yyerrok; ;
+    break;}
+case 16:
+#line 114 "zconf.y"
+{
+	struct symbol *sym = sym_lookup(yyvsp[0].string, 0);
+	sym->flags |= SYMBOL_OPTIONAL;
+	menu_add_entry(sym);
+	printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[0].string);
+;
+    break;}
+case 17:
+#line 122 "zconf.y"
+{
+	menu_end_entry();
+	printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 22:
+#line 133 "zconf.y"
+{ ;
+    break;}
+case 23:
+#line 136 "zconf.y"
+{
+	menu_set_type(S_TRISTATE);
+	printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 24:
+#line 142 "zconf.y"
+{
+	menu_set_type(S_BOOLEAN);
+	printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 25:
+#line 148 "zconf.y"
+{
+	menu_set_type(S_INT);
+	printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 26:
+#line 154 "zconf.y"
+{
+	menu_set_type(S_HEX);
+	printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 27:
+#line 160 "zconf.y"
+{
+	menu_set_type(S_STRING);
+	printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 28:
+#line 166 "zconf.y"
+{
+	menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);
+	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 29:
+#line 172 "zconf.y"
+{
+	menu_add_prop(P_DEFAULT, NULL, yyvsp[-1].symbol, yyvsp[0].expr);
+	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 30:
+#line 180 "zconf.y"
+{
+	struct symbol *sym = sym_lookup(NULL, 0);
+	sym->flags |= SYMBOL_CHOICE;
+	menu_add_entry(sym);
+	menu_add_prop(P_CHOICE, NULL, NULL, NULL);
+	printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 31:
+#line 189 "zconf.y"
+{
+	menu_end_entry();
+	menu_add_menu();
+;
+    break;}
+case 32:
+#line 195 "zconf.y"
+{
+	if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) {
+		menu_end_menu();
+		printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
+	}
+;
+    break;}
+case 34:
+#line 205 "zconf.y"
+{
+	printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno);
+	zconfnerrs++;
+;
+    break;}
+case 40:
+#line 219 "zconf.y"
+{
+	menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);
+	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 41:
+#line 225 "zconf.y"
+{
+	current_entry->sym->flags |= SYMBOL_OPTIONAL;
+	printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 42:
+#line 231 "zconf.y"
+{
+	menu_add_prop(P_DEFAULT, NULL, yyvsp[0].symbol, NULL);
+	//current_choice->prop->def = $2;
+	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 45:
+#line 245 "zconf.y"
+{
+	printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
+	menu_add_entry(NULL);
+	//current_entry->prompt = menu_add_prop(T_IF, NULL, NULL, $2);
+	menu_add_dep(yyvsp[0].expr);
+	menu_end_entry();
+	menu_add_menu();
+;
+    break;}
+case 46:
+#line 255 "zconf.y"
+{
+	if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) {
+		menu_end_menu();
+		printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
+	}
+;
+    break;}
+case 48:
+#line 265 "zconf.y"
+{
+	printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno);
+	zconfnerrs++;
+;
+    break;}
+case 53:
+#line 280 "zconf.y"
+{
+	menu_add_entry(NULL);
+	menu_add_prop(P_MENU, yyvsp[0].string, NULL, NULL);
+	printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 54:
+#line 287 "zconf.y"
+{
+	menu_end_entry();
+	menu_add_menu();
+;
+    break;}
+case 55:
+#line 293 "zconf.y"
+{
+	if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) {
+		menu_end_menu();
+		printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
+	}
+;
+    break;}
+case 57:
+#line 303 "zconf.y"
+{
+	printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno);
+	zconfnerrs++;
+;
+    break;}
+case 62:
+#line 313 "zconf.y"
+{ zconfprint("invalid menu option"); yyerrok; ;
+    break;}
+case 63:
+#line 317 "zconf.y"
+{
+	yyval.string = yyvsp[0].string;
+	printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[0].string);
+;
+    break;}
+case 64:
+#line 323 "zconf.y"
+{
+	zconf_nextfile(yyvsp[-1].string);
+;
+    break;}
+case 65:
+#line 330 "zconf.y"
+{
+	menu_add_entry(NULL);
+	menu_add_prop(P_COMMENT, yyvsp[0].string, NULL, NULL);
+	printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 66:
+#line 337 "zconf.y"
+{
+	menu_end_entry();
+;
+    break;}
+case 67:
+#line 344 "zconf.y"
+{
+	printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
+	zconf_starthelp();
+;
+    break;}
+case 68:
+#line 350 "zconf.y"
+{
+	current_entry->sym->help = yyvsp[0].string;
+;
+    break;}
+case 71:
+#line 359 "zconf.y"
+{ ;
+    break;}
+case 72:
+#line 362 "zconf.y"
+{
+	menu_add_dep(yyvsp[0].expr);
+	printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 73:
+#line 367 "zconf.y"
+{
+	menu_add_dep(yyvsp[0].expr);
+	printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 74:
+#line 372 "zconf.y"
+{
+	menu_add_dep(yyvsp[0].expr);
+	printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
+;
+    break;}
+case 76:
+#line 382 "zconf.y"
+{
+	menu_add_prop(P_PROMPT, yyvsp[0].string, NULL, NULL);
+;
+    break;}
+case 77:
+#line 386 "zconf.y"
+{
+	menu_add_prop(P_PROMPT, yyvsp[-2].string, NULL, yyvsp[0].expr);
+;
+    break;}
+case 80:
+#line 394 "zconf.y"
+{ yyval.token = T_ENDMENU; ;
+    break;}
+case 81:
+#line 395 "zconf.y"
+{ yyval.token = T_ENDCHOICE; ;
+    break;}
+case 82:
+#line 396 "zconf.y"
+{ yyval.token = T_ENDIF; ;
+    break;}
+case 85:
+#line 402 "zconf.y"
+{ yyval.expr = NULL; ;
+    break;}
+case 86:
+#line 403 "zconf.y"
+{ yyval.expr = yyvsp[0].expr; ;
+    break;}
+case 87:
+#line 406 "zconf.y"
+{ yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;
+    break;}
+case 88:
+#line 407 "zconf.y"
+{ yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;
+    break;}
+case 89:
+#line 408 "zconf.y"
+{ yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;
+    break;}
+case 90:
+#line 409 "zconf.y"
+{ yyval.expr = yyvsp[-1].expr; ;
+    break;}
+case 91:
+#line 410 "zconf.y"
+{ yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;
+    break;}
+case 92:
+#line 411 "zconf.y"
+{ yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;
+    break;}
+case 93:
+#line 412 "zconf.y"
+{ yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;
+    break;}
+case 94:
+#line 415 "zconf.y"
+{ yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;
+    break;}
+case 95:
+#line 416 "zconf.y"
+{ yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;
+    break;}
+}
+
+#line 705 "/usr/share/bison/bison.simple"
+
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#if YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG
+  if (yydebug)
+    {
+      short *yyssp1 = yyss - 1;
+      YYFPRINTF (stderr, "state stack now");
+      while (yyssp1 != yyssp)
+	YYFPRINTF (stderr, " %d", *++yyssp1);
+      YYFPRINTF (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+#if YYLSP_NEEDED
+  *++yylsp = yyloc;
+#endif
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  YYSIZE_T yysize = 0;
+	  char *yymsg;
+	  int yyx, yycount;
+
+	  yycount = 0;
+	  /* Start YYX at -YYN if negative to avoid negative indexes in
+	     YYCHECK.  */
+	  for (yyx = yyn < 0 ? -yyn : 0;
+	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+	    if (yycheck[yyx + yyn] == yyx)
+	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+	  yysize += yystrlen ("parse error, unexpected ") + 1;
+	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
+	  yymsg = (char *) YYSTACK_ALLOC (yysize);
+	  if (yymsg != 0)
+	    {
+	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
+	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
+
+	      if (yycount < 5)
+		{
+		  yycount = 0;
+		  for (yyx = yyn < 0 ? -yyn : 0;
+		       yyx < (int) (sizeof (yytname) / sizeof (char *));
+		       yyx++)
+		    if (yycheck[yyx + yyn] == yyx)
+		      {
+			const char *yyq = ! yycount ? ", expecting " : " or ";
+			yyp = yystpcpy (yyp, yyq);
+			yyp = yystpcpy (yyp, yytname[yyx]);
+			yycount++;
+		      }
+		}
+	      yyerror (yymsg);
+	      YYSTACK_FREE (yymsg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exhausted");
+	}
+      else
+#endif /* defined (YYERROR_VERBOSE) */
+	yyerror ("parse error");
+    }
+  goto yyerrlab1;
+
+
+/*--------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action |
+`--------------------------------------------------*/
+yyerrlab1:
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+	 error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
+		  yychar, yytname[yychar1]));
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+
+/*-------------------------------------------------------------------.
+| yyerrdefault -- current state does not do anything special for the |
+| error token.                                                       |
+`-------------------------------------------------------------------*/
+yyerrdefault:
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+
+  /* If its default is to accept any token, ok.  Otherwise pop it.  */
+  yyn = yydefact[yystate];
+  if (yyn)
+    goto yydefault;
+#endif
+
+
+/*---------------------------------------------------------------.
+| yyerrpop -- pop the current state because it cannot handle the |
+| error token                                                    |
+`---------------------------------------------------------------*/
+yyerrpop:
+  if (yyssp == yyss)
+    YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#if YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG
+  if (yydebug)
+    {
+      short *yyssp1 = yyss - 1;
+      YYFPRINTF (stderr, "Error: state stack now");
+      while (yyssp1 != yyssp)
+	YYFPRINTF (stderr, " %d", *++yyssp1);
+      YYFPRINTF (stderr, "\n");
+    }
+#endif
+
+/*--------------.
+| yyerrhandle.  |
+`--------------*/
+yyerrhandle:
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  YYDPRINTF ((stderr, "Shifting error token, "));
+
+  *++yyvsp = yylval;
+#if YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+/*---------------------------------------------.
+| yyoverflowab -- parser overflow comes here.  |
+`---------------------------------------------*/
+yyoverflowlab:
+  yyerror ("parser stack overflow");
+  yyresult = 2;
+  /* Fall through.  */
+
+yyreturn:
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+  return yyresult;
+}
+#line 419 "zconf.y"
+
+
+void conf_parse(const char *name)
+{
+	zconf_initscan(name);
+
+	sym_init();
+	menu_init();
+	rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL);
+
+	//zconfdebug = 1;
+	zconfparse();
+	if (zconfnerrs)
+		exit(1);
+	menu_finalize(&rootmenu);
+
+	modules_sym = sym_lookup("MODULES", 0);
+
+	sym_change_count = 1;
+}
+
+const char *zconf_tokenname(int token)
+{
+	switch (token) {
+	case T_MENU:		return "menu";
+	case T_ENDMENU:		return "endmenu";
+	case T_CHOICE:		return "choice";
+	case T_ENDCHOICE:	return "endchoice";
+	case T_IF:		return "if";
+	case T_ENDIF:		return "endif";
+	}
+	return "<token>";
+} 
+
+static bool zconf_endtoken(int token, int starttoken, int endtoken)
+{
+	if (token != endtoken) {
+		zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken));
+		zconfnerrs++;
+		return false;
+	}
+	if (current_menu->file != current_file) {
+		zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken));
+		zconfprint("location of the '%s'", zconf_tokenname(starttoken));
+		zconfnerrs++;
+		return false;
+	}
+	return true;
+}
+
+static void zconfprint(const char *err, ...)
+{
+	va_list ap;
+
+	fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
+	va_start(ap, err);
+	vfprintf(stderr, err, ap);
+	va_end(ap);
+	fprintf(stderr, "\n");
+}
+
+static void zconferror(const char *err)
+{
+	fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno(), err);
+}
+
+void print_quoted_string(FILE *out, const char *str)
+{
+	const char *p;
+	int len;
+
+	putc('"', out);
+	while ((p = strchr(str, '"'))) {
+		len = p - str;
+		if (len)
+			fprintf(out, "%.*s", len, str);
+		fputs("\\\"", out);
+		str = p + 1;
+	}
+	fputs(str, out);
+	putc('"', out);
+}
+
+void print_symbol(FILE *out, struct menu *menu)
+{
+	struct symbol *sym = menu->sym;
+	struct property *prop;
+
+	//sym->flags |= SYMBOL_PRINTED;
+
+	if (sym_is_choice(sym))
+		fprintf(out, "choice\n");
+	else
+		fprintf(out, "config %s\n", sym->name);
+	switch (sym->type) {
+	case S_BOOLEAN:
+		fputs("  boolean\n", out);
+		break;
+	case S_TRISTATE:
+		fputs("  tristate\n", out);
+		break;
+	case S_STRING:
+		fputs("  string\n", out);
+		break;
+	case S_INT:
+		fputs("  integer\n", out);
+		break;
+	case S_HEX:
+		fputs("  hex\n", out);
+		break;
+	default:
+		fputs("  ???\n", out);
+		break;
+	}
+#if 0
+	if (!expr_is_yes(sym->dep)) {
+		fputs("  depends ", out);
+		expr_fprint(sym->dep, out);
+		fputc('\n', out);
+	}
+#endif
+	for (prop = sym->prop; prop; prop = prop->next) {
+		if (prop->menu != menu)
+			continue;
+		switch (prop->type) {
+		case P_PROMPT:
+			fputs("  prompt ", out);
+			print_quoted_string(out, prop->text);
+			if (prop->def) {
+				fputc(' ', out);
+				if (prop->def->flags & SYMBOL_CONST)
+					print_quoted_string(out, prop->def->name);
+				else
+					fputs(prop->def->name, out);
+			}
+			if (!expr_is_yes(E_EXPR(prop->visible))) {
+				fputs(" if ", out);
+				expr_fprint(E_EXPR(prop->visible), out);
+			}
+			fputc('\n', out);
+			break;
+		case P_DEFAULT:
+			fputs( "  default ", out);
+			print_quoted_string(out, prop->def->name);
+			if (!expr_is_yes(E_EXPR(prop->visible))) {
+				fputs(" if ", out);
+				expr_fprint(E_EXPR(prop->visible), out);
+			}
+			fputc('\n', out);
+			break;
+		case P_CHOICE:
+			fputs("  #choice value\n", out);
+			break;
+		default:
+			fprintf(out, "  unknown prop %d!\n", prop->type);
+			break;
+		}
+	}
+	if (sym->help) {
+		int len = strlen(sym->help);
+		while (sym->help[--len] == '\n')
+			sym->help[len] = 0;
+		fprintf(out, "  help\n%s\n", sym->help);
+	}
+	fputc('\n', out);
+}
+
+void zconfdump(FILE *out)
+{
+	//struct file *file;
+	struct property *prop;
+	struct symbol *sym;
+	struct menu *menu;
+
+	menu = rootmenu.list;
+	while (menu) {
+		if ((sym = menu->sym))
+			print_symbol(out, menu);
+		else if ((prop = menu->prompt)) {
+			switch (prop->type) {
+			//case T_MAINMENU:
+			//	fputs("\nmainmenu ", out);
+			//	print_quoted_string(out, prop->text);
+			//	fputs("\n", out);
+			//	break;
+			case P_COMMENT:
+				fputs("\ncomment ", out);
+				print_quoted_string(out, prop->text);
+				fputs("\n", out);
+				break;
+			case P_MENU:
+				fputs("\nmenu ", out);
+				print_quoted_string(out, prop->text);
+				fputs("\n", out);
+				break;
+			//case T_SOURCE:
+			//	fputs("\nsource ", out);
+			//	print_quoted_string(out, prop->text);
+			//	fputs("\n", out);
+			//	break;
+			//case T_IF:
+			//	fputs("\nif\n", out);
+			default:
+				;
+			}
+			if (!expr_is_yes(E_EXPR(prop->visible))) {
+				fputs("  depends ", out);
+				expr_fprint(E_EXPR(prop->visible), out);
+				fputc('\n', out);
+			}
+			fputs("\n", out);
+		}
+
+		if (menu->list)
+			menu = menu->list;
+		else if (menu->next)
+			menu = menu->next;
+		else while ((menu = menu->parent)) {
+			if (menu->prompt && menu->prompt->type == P_MENU)
+				fputs("\nendmenu\n", out);
+			if (menu->next) {
+				menu = menu->next;
+				break;
+			}
+		}
+	}
+}
+
+#include "lex.zconf.c"
+#include "confdata.c"
+#include "expr.c"
+#include "symbol.c"
+#include "menu.c"
diff -Nru a/scripts/kconfig/zconf.tab.h_shipped b/scripts/kconfig/zconf.tab.h_shipped
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/zconf.tab.h_shipped	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,53 @@
+#ifndef BISON_ZCONF_TAB_H
+# define BISON_ZCONF_TAB_H
+
+#ifndef YYSTYPE
+typedef union
+{
+	int token;
+	char *string;
+	struct symbol *symbol;
+	struct expr *expr;
+	struct menu *menu;
+} yystype;
+# define YYSTYPE yystype
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+# define	T_MAINMENU	257
+# define	T_MENU	258
+# define	T_ENDMENU	259
+# define	T_SOURCE	260
+# define	T_CHOICE	261
+# define	T_ENDCHOICE	262
+# define	T_COMMENT	263
+# define	T_CONFIG	264
+# define	T_HELP	265
+# define	T_HELPTEXT	266
+# define	T_IF	267
+# define	T_ENDIF	268
+# define	T_DEPENDS	269
+# define	T_REQUIRES	270
+# define	T_OPTIONAL	271
+# define	T_PROMPT	272
+# define	T_DEFAULT	273
+# define	T_TRISTATE	274
+# define	T_BOOLEAN	275
+# define	T_INT	276
+# define	T_HEX	277
+# define	T_WORD	278
+# define	T_STRING	279
+# define	T_UNEQUAL	280
+# define	T_EOF	281
+# define	T_EOL	282
+# define	T_CLOSE_PAREN	283
+# define	T_OPEN_PAREN	284
+# define	T_ON	285
+# define	T_OR	286
+# define	T_AND	287
+# define	T_EQUAL	288
+# define	T_NOT	289
+
+
+extern YYSTYPE zconflval;
+
+#endif /* not BISON_ZCONF_TAB_H */
diff -Nru a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/scripts/kconfig/zconf.y	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,651 @@
+%{
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
+
+#define PRINTD		0x0001
+#define DEBUG_PARSE	0x0002
+
+int cdebug = PRINTD;
+
+extern int zconflex(void);
+static void zconfprint(const char *err, ...);
+static void zconferror(const char *err);
+static bool zconf_endtoken(int token, int starttoken, int endtoken);
+
+struct symbol *symbol_hash[257];
+
+#define YYERROR_VERBOSE
+%}
+%expect 36
+
+%union
+{
+	int token;
+	char *string;
+	struct symbol *symbol;
+	struct expr *expr;
+	struct menu *menu;
+}
+
+%token T_MAINMENU
+%token T_MENU
+%token T_ENDMENU
+%token T_SOURCE
+%token T_CHOICE
+%token T_ENDCHOICE
+%token T_COMMENT
+%token T_CONFIG
+%token T_HELP
+%token <string> T_HELPTEXT
+%token T_IF
+%token T_ENDIF
+%token T_DEPENDS
+%token T_REQUIRES
+%token T_OPTIONAL
+%token T_PROMPT
+%token T_DEFAULT
+%token T_TRISTATE
+%token T_BOOLEAN
+%token T_INT
+%token T_HEX
+%token <string> T_WORD
+%token <string> T_STRING
+%token T_UNEQUAL
+%token T_EOF
+%token T_EOL
+%token T_CLOSE_PAREN
+%token T_OPEN_PAREN
+%token T_ON
+
+%left T_OR
+%left T_AND
+%left T_EQUAL T_UNEQUAL
+%nonassoc T_NOT
+
+%type <string> prompt
+%type <string> source
+%type <symbol> symbol
+%type <expr> expr
+%type <expr> if_expr
+%type <token> end
+
+%{
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+%}
+%%
+input:	  /* empty */
+	| input block
+;
+
+block:	  common_block
+	| choice_stmt
+	| menu_stmt
+	| T_MAINMENU prompt nl_or_eof
+	| T_ENDMENU		{ zconfprint("unexpected 'endmenu' statement"); }
+	| T_ENDIF		{ zconfprint("unexpected 'endif' statement"); }
+	| T_ENDCHOICE		{ zconfprint("unexpected 'endchoice' statement"); }
+	| error nl_or_eof	{ zconfprint("syntax error"); yyerrok; }
+;
+
+common_block:
+	  if_stmt
+	| comment_stmt
+	| config_stmt
+	| source_stmt
+	| nl_or_eof
+;
+
+
+/* config entry */
+
+config_entry_start: T_CONFIG T_WORD
+{
+	struct symbol *sym = sym_lookup($2, 0);
+	sym->flags |= SYMBOL_OPTIONAL;
+	menu_add_entry(sym);
+	printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2);
+};
+
+config_stmt: config_entry_start T_EOL config_option_list
+{
+	menu_end_entry();
+	printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
+};
+
+config_option_list:
+	  /* empty */
+	| config_option_list config_option T_EOL
+	| config_option_list depends T_EOL
+	| config_option_list help
+	| config_option_list T_EOL
+{ };
+
+config_option: T_TRISTATE prompt_stmt_opt
+{
+	menu_set_type(S_TRISTATE);
+	printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_BOOLEAN prompt_stmt_opt
+{
+	menu_set_type(S_BOOLEAN);
+	printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_INT prompt_stmt_opt
+{
+	menu_set_type(S_INT);
+	printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_HEX prompt_stmt_opt
+{
+	menu_set_type(S_HEX);
+	printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_STRING prompt_stmt_opt
+{
+	menu_set_type(S_STRING);
+	printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_PROMPT prompt if_expr
+{
+	menu_add_prop(P_PROMPT, $2, NULL, $3);
+	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_DEFAULT symbol if_expr
+{
+	menu_add_prop(P_DEFAULT, NULL, $2, $3);
+	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+};
+
+/* choice entry */
+
+choice: T_CHOICE
+{
+	struct symbol *sym = sym_lookup(NULL, 0);
+	sym->flags |= SYMBOL_CHOICE;
+	menu_add_entry(sym);
+	menu_add_prop(P_CHOICE, NULL, NULL, NULL);
+	printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
+};
+
+choice_entry: choice T_EOL choice_option_list
+{
+	menu_end_entry();
+	menu_add_menu();
+};
+
+choice_end: end
+{
+	if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) {
+		menu_end_menu();
+		printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
+	}
+};
+
+choice_stmt:
+	  choice_entry choice_block choice_end T_EOL
+	| choice_entry choice_block
+{
+	printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno);
+	zconfnerrs++;
+};
+
+choice_option_list:
+	  /* empty */
+	| choice_option_list choice_option T_EOL
+	| choice_option_list depends T_EOL
+	| choice_option_list help
+	| choice_option_list T_EOL
+;
+
+choice_option: T_PROMPT prompt if_expr
+{
+	menu_add_prop(P_PROMPT, $2, NULL, $3);
+	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+};
+
+choice_option: T_OPTIONAL
+{
+	current_entry->sym->flags |= SYMBOL_OPTIONAL;
+	printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
+};
+
+choice_option: T_DEFAULT symbol
+{
+	menu_add_prop(P_DEFAULT, NULL, $2, NULL);
+	//current_choice->prop->def = $2;
+	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+};
+
+choice_block:
+	  /* empty */
+	| choice_block common_block
+;
+
+/* if entry */
+
+if: T_IF expr
+{
+	printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
+	menu_add_entry(NULL);
+	//current_entry->prompt = menu_add_prop(T_IF, NULL, NULL, $2);
+	menu_add_dep($2);
+	menu_end_entry();
+	menu_add_menu();
+};
+
+if_end: end
+{
+	if (zconf_endtoken($1, T_IF, T_ENDIF)) {
+		menu_end_menu();
+		printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
+	}
+};
+
+if_stmt:
+	  if T_EOL if_block if_end T_EOL
+	| if T_EOL if_block
+{
+	printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno);
+	zconfnerrs++;
+};
+
+if_block:
+	  /* empty */
+	| if_block common_block
+	| if_block menu_stmt
+	| if_block choice_stmt
+;
+
+/* menu entry */
+
+menu: T_MENU prompt
+{
+	menu_add_entry(NULL);
+	menu_add_prop(P_MENU, $2, NULL, NULL);
+	printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
+};
+
+menu_entry: menu T_EOL depends_list
+{
+	menu_end_entry();
+	menu_add_menu();
+};
+
+menu_end: end
+{
+	if (zconf_endtoken($1, T_MENU, T_ENDMENU)) {
+		menu_end_menu();
+		printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
+	}
+};
+
+menu_stmt:
+	  menu_entry menu_block menu_end T_EOL
+	| menu_entry menu_block
+{
+	printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno);
+	zconfnerrs++;
+};
+
+menu_block:
+	  /* empty */
+	| menu_block common_block
+	| menu_block menu_stmt
+	| menu_block choice_stmt
+	| menu_block error T_EOL		{ zconfprint("invalid menu option"); yyerrok; }
+;
+
+source: T_SOURCE prompt
+{
+	$$ = $2;
+	printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2);
+};
+
+source_stmt: source T_EOL
+{
+	zconf_nextfile($1);
+};
+
+/* comment entry */
+
+comment: T_COMMENT prompt
+{
+	menu_add_entry(NULL);
+	menu_add_prop(P_COMMENT, $2, NULL, NULL);
+	printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
+};
+
+comment_stmt: comment T_EOL depends_list
+{
+	menu_end_entry();
+};
+
+/* help option */
+
+help_start: T_HELP T_EOL
+{
+	printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
+	zconf_starthelp();
+};
+
+help: help_start T_HELPTEXT
+{
+	current_entry->sym->help = $2;
+};
+
+/* depends option */
+
+depends_list:	  /* empty */
+		| depends_list depends T_EOL
+		| depends_list T_EOL
+{ };
+
+depends: T_DEPENDS T_ON expr
+{
+	menu_add_dep($3);
+	printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
+}
+	| T_DEPENDS expr
+{
+	menu_add_dep($2);
+	printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
+}
+	| T_REQUIRES expr
+{
+	menu_add_dep($2);
+	printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
+};
+
+/* prompt statement */
+
+prompt_stmt_opt:
+	  /* empty */
+	| prompt
+{
+	menu_add_prop(P_PROMPT, $1, NULL, NULL);
+}
+	| prompt T_IF expr
+{
+	menu_add_prop(P_PROMPT, $1, NULL, $3);
+};
+
+prompt:	  T_WORD
+	| T_STRING
+;
+
+end:	  T_ENDMENU		{ $$ = T_ENDMENU; }
+	| T_ENDCHOICE		{ $$ = T_ENDCHOICE; }
+	| T_ENDIF		{ $$ = T_ENDIF; }
+;
+
+nl_or_eof:
+	T_EOL | T_EOF;
+
+if_expr:  /* empty */			{ $$ = NULL; }
+	| T_IF expr			{ $$ = $2; }
+;
+
+expr:	  symbol				{ $$ = expr_alloc_symbol($1); }
+	| symbol T_EQUAL symbol			{ $$ = expr_alloc_comp(E_EQUAL, $1, $3); }
+	| symbol T_UNEQUAL symbol		{ $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); }
+	| T_OPEN_PAREN expr T_CLOSE_PAREN	{ $$ = $2; }
+	| T_NOT expr				{ $$ = expr_alloc_one(E_NOT, $2); }
+	| expr T_OR expr			{ $$ = expr_alloc_two(E_OR, $1, $3); }
+	| expr T_AND expr			{ $$ = expr_alloc_two(E_AND, $1, $3); }
+;
+
+symbol:	  T_WORD	{ $$ = sym_lookup($1, 0); free($1); }
+	| T_STRING	{ $$ = sym_lookup($1, 1); free($1); }
+;
+
+%%
+
+void conf_parse(const char *name)
+{
+	zconf_initscan(name);
+
+	sym_init();
+	menu_init();
+	rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL);
+
+	//zconfdebug = 1;
+	zconfparse();
+	if (zconfnerrs)
+		exit(1);
+	menu_finalize(&rootmenu);
+
+	modules_sym = sym_lookup("MODULES", 0);
+
+	sym_change_count = 1;
+}
+
+const char *zconf_tokenname(int token)
+{
+	switch (token) {
+	case T_MENU:		return "menu";
+	case T_ENDMENU:		return "endmenu";
+	case T_CHOICE:		return "choice";
+	case T_ENDCHOICE:	return "endchoice";
+	case T_IF:		return "if";
+	case T_ENDIF:		return "endif";
+	}
+	return "<token>";
+} 
+
+static bool zconf_endtoken(int token, int starttoken, int endtoken)
+{
+	if (token != endtoken) {
+		zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken));
+		zconfnerrs++;
+		return false;
+	}
+	if (current_menu->file != current_file) {
+		zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken));
+		zconfprint("location of the '%s'", zconf_tokenname(starttoken));
+		zconfnerrs++;
+		return false;
+	}
+	return true;
+}
+
+static void zconfprint(const char *err, ...)
+{
+	va_list ap;
+
+	fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
+	va_start(ap, err);
+	vfprintf(stderr, err, ap);
+	va_end(ap);
+	fprintf(stderr, "\n");
+}
+
+static void zconferror(const char *err)
+{
+	fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno(), err);
+}
+
+void print_quoted_string(FILE *out, const char *str)
+{
+	const char *p;
+	int len;
+
+	putc('"', out);
+	while ((p = strchr(str, '"'))) {
+		len = p - str;
+		if (len)
+			fprintf(out, "%.*s", len, str);
+		fputs("\\\"", out);
+		str = p + 1;
+	}
+	fputs(str, out);
+	putc('"', out);
+}
+
+void print_symbol(FILE *out, struct menu *menu)
+{
+	struct symbol *sym = menu->sym;
+	struct property *prop;
+
+	//sym->flags |= SYMBOL_PRINTED;
+
+	if (sym_is_choice(sym))
+		fprintf(out, "choice\n");
+	else
+		fprintf(out, "config %s\n", sym->name);
+	switch (sym->type) {
+	case S_BOOLEAN:
+		fputs("  boolean\n", out);
+		break;
+	case S_TRISTATE:
+		fputs("  tristate\n", out);
+		break;
+	case S_STRING:
+		fputs("  string\n", out);
+		break;
+	case S_INT:
+		fputs("  integer\n", out);
+		break;
+	case S_HEX:
+		fputs("  hex\n", out);
+		break;
+	default:
+		fputs("  ???\n", out);
+		break;
+	}
+#if 0
+	if (!expr_is_yes(sym->dep)) {
+		fputs("  depends ", out);
+		expr_fprint(sym->dep, out);
+		fputc('\n', out);
+	}
+#endif
+	for (prop = sym->prop; prop; prop = prop->next) {
+		if (prop->menu != menu)
+			continue;
+		switch (prop->type) {
+		case P_PROMPT:
+			fputs("  prompt ", out);
+			print_quoted_string(out, prop->text);
+			if (prop->def) {
+				fputc(' ', out);
+				if (prop->def->flags & SYMBOL_CONST)
+					print_quoted_string(out, prop->def->name);
+				else
+					fputs(prop->def->name, out);
+			}
+			if (!expr_is_yes(E_EXPR(prop->visible))) {
+				fputs(" if ", out);
+				expr_fprint(E_EXPR(prop->visible), out);
+			}
+			fputc('\n', out);
+			break;
+		case P_DEFAULT:
+			fputs( "  default ", out);
+			print_quoted_string(out, prop->def->name);
+			if (!expr_is_yes(E_EXPR(prop->visible))) {
+				fputs(" if ", out);
+				expr_fprint(E_EXPR(prop->visible), out);
+			}
+			fputc('\n', out);
+			break;
+		case P_CHOICE:
+			fputs("  #choice value\n", out);
+			break;
+		default:
+			fprintf(out, "  unknown prop %d!\n", prop->type);
+			break;
+		}
+	}
+	if (sym->help) {
+		int len = strlen(sym->help);
+		while (sym->help[--len] == '\n')
+			sym->help[len] = 0;
+		fprintf(out, "  help\n%s\n", sym->help);
+	}
+	fputc('\n', out);
+}
+
+void zconfdump(FILE *out)
+{
+	//struct file *file;
+	struct property *prop;
+	struct symbol *sym;
+	struct menu *menu;
+
+	menu = rootmenu.list;
+	while (menu) {
+		if ((sym = menu->sym))
+			print_symbol(out, menu);
+		else if ((prop = menu->prompt)) {
+			switch (prop->type) {
+			//case T_MAINMENU:
+			//	fputs("\nmainmenu ", out);
+			//	print_quoted_string(out, prop->text);
+			//	fputs("\n", out);
+			//	break;
+			case P_COMMENT:
+				fputs("\ncomment ", out);
+				print_quoted_string(out, prop->text);
+				fputs("\n", out);
+				break;
+			case P_MENU:
+				fputs("\nmenu ", out);
+				print_quoted_string(out, prop->text);
+				fputs("\n", out);
+				break;
+			//case T_SOURCE:
+			//	fputs("\nsource ", out);
+			//	print_quoted_string(out, prop->text);
+			//	fputs("\n", out);
+			//	break;
+			//case T_IF:
+			//	fputs("\nif\n", out);
+			default:
+				;
+			}
+			if (!expr_is_yes(E_EXPR(prop->visible))) {
+				fputs("  depends ", out);
+				expr_fprint(E_EXPR(prop->visible), out);
+				fputc('\n', out);
+			}
+			fputs("\n", out);
+		}
+
+		if (menu->list)
+			menu = menu->list;
+		else if (menu->next)
+			menu = menu->next;
+		else while ((menu = menu->parent)) {
+			if (menu->prompt && menu->prompt->type == P_MENU)
+				fputs("\nendmenu\n", out);
+			if (menu->next) {
+				menu = menu->next;
+				break;
+			}
+		}
+	}
+}
+
+#include "lex.zconf.c"
+#include "confdata.c"
+#include "expr.c"
+#include "symbol.c"
+#include "menu.c"
diff -Nru a/scripts/ver_linux b/scripts/ver_linux
--- a/scripts/ver_linux	Wed Oct 30 16:44:29 2002
+++ b/scripts/ver_linux	Wed Oct 30 16:44:29 2002
@@ -4,7 +4,7 @@
 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
 # differ on your system.
 #
-PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:$PATH
 echo 'If some fields are empty or look unusual you may have an old version.'
 echo 'Compare to the current minimal requirements in Documentation/Changes.'
 echo ' '
@@ -12,7 +12,11 @@
 uname -a
 echo ' '
 
-echo "Gnu C                 " `gcc --version`
+gcc --version 2>&1| head -n 1 | grep -v gcc | awk \
+'NR==1{print "Gnu C                 ", $1}'
+
+gcc --version 2>&1| grep gcc | awk \
+'NR==1{print "Gnu C                 ", $3}'
 
 make --version 2>&1 | awk -F, '{print $1}' | awk \
       '/GNU Make/{print "Gnu make              ",$NF}'
@@ -29,8 +33,14 @@
 tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
 'NR==1 {print "e2fsprogs             ", $2}'
 
-reiserfsck 2>&1 | grep reiserfsprogs | awk \
+fsck.jfs -V 2>&1 | grep version | sed 's/,//' |  awk \
+'NR==1 {print "jfsutils              ", $3}'
+
+reiserfsck -V 2>&1 | grep reiserfsprogs | awk \
 'NR==1{print "reiserfsprogs         ", $NF}'
+
+xfs_db -V 2>&1 | grep version | awk \
+'NR==1{print "xfsprogs              ", $3}'
 
 cardmgr -V 2>&1| grep version | awk \
 'NR==1{print "pcmcia-cs             ", $3}'
diff -Nru a/security/Config.help b/security/Config.help
--- a/security/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,4 +0,0 @@
-CONFIG_SECURITY_CAPABILITIES
-  This enables the "default" Linux capabilities functionality.
-  If you are unsure how to answer this question, answer Y.
-
diff -Nru a/security/Config.in b/security/Config.in
--- a/security/Config.in	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# Security configuration
-#
-mainmenu_option next_comment
-comment 'Security options'
-define_bool CONFIG_SECURITY_CAPABILITIES y
-endmenu
diff -Nru a/security/Kconfig b/security/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/security/Kconfig	Wed Oct 30 16:44:37 2002
@@ -0,0 +1,15 @@
+#
+# Security configuration
+#
+
+menu "Security options"
+
+config SECURITY_CAPABILITIES
+	bool
+	default y
+	help
+	  This enables the "default" Linux capabilities functionality.
+	  If you are unsure how to answer this question, answer Y.
+
+endmenu
+
diff -Nru a/sound/Config.help b/sound/Config.help
--- a/sound/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-CONFIG_SOUND_PRIME
-  Say 'Y' or 'M' to enable Open Sound System drivers.
-
-CONFIG_SOUND_SND
-  Say 'Y' or 'M' to enable Advanced Linux Sound Architecture (ALSA) drivers.
-  You need to install also alsa-lib and alsa-utils packages available on
-  the ALSA website at <http://www.alsa-project.org>.
diff -Nru a/sound/Config.in b/sound/Config.in
--- a/sound/Config.in	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,45 +0,0 @@
-# sound/Config.in
-#
-
-mainmenu_option next_comment
-comment 'Open Sound System'
-
-dep_tristate 'Open Sound System' CONFIG_SOUND_PRIME $CONFIG_SOUND
-if [ "$CONFIG_SOUND_PRIME" != "n" ]; then
-  source sound/oss/Config.in
-fi
-
-endmenu
-
-mainmenu_option next_comment
-comment 'Advanced Linux Sound Architecture'
-
-dep_tristate 'Advanced Linux Sound Architecture' CONFIG_SND $CONFIG_SOUND
-if [ "$CONFIG_SND" != "n" ]; then
-  source sound/core/Config.in
-  source sound/drivers/Config.in
-fi
-if [ "$CONFIG_SND" != "n" -a "$CONFIG_ISA" = "y" ]; then
-  source sound/isa/Config.in
-fi
-if [ "$CONFIG_SND" != "n" -a "$CONFIG_PCI" = "y" ]; then
-  source sound/pci/Config.in
-fi
-if [ "$CONFIG_SND" != "n" -a "$CONFIG_PPC" = "y" ]; then
-  source sound/ppc/Config.in
-fi
-if [ "$CONFIG_SND" != "n" -a "$CONFIG_ARM" = "y" ]; then
-  source sound/arm/Config.in
-fi
-# the following will depenend on the order of config.
-# here assuming USB is defined before ALSA
-if [ "$CONFIG_SND" != "n" -a "$CONFIG_USB" != "n" ]; then
-  source sound/usb/Config.in
-fi
-if [ "$CONFIG_SND" != "n" ]; then
-  if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
-    source sound/sparc/Config.in
-  fi
-fi
-
-endmenu
diff -Nru a/sound/Kconfig b/sound/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,44 @@
+# sound/Config.in
+#
+
+menu "Open Sound System"
+	depends on SOUND!=n
+
+config SOUND_PRIME
+	tristate "Open Sound System"
+	depends on SOUND
+	help
+	  Say 'Y' or 'M' to enable Open Sound System drivers.
+
+source "sound/oss/Kconfig"
+
+endmenu
+
+
+menu "Advanced Linux Sound Architecture"
+	depends on SOUND!=n
+
+config SND
+	tristate "Advanced Linux Sound Architecture"
+	depends on SOUND
+
+source "sound/core/Kconfig"
+
+source "sound/drivers/Kconfig"
+
+source "sound/isa/Kconfig"
+
+source "sound/pci/Kconfig"
+
+source "sound/ppc/Kconfig"
+
+source "sound/arm/Kconfig"
+
+# the following will depenend on the order of config.
+# here assuming USB is defined before ALSA
+source "sound/usb/Kconfig"
+
+source "sound/sparc/Kconfig"
+
+endmenu
+
diff -Nru a/sound/arm/Config.help b/sound/arm/Config.help
--- a/sound/arm/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,3 +0,0 @@
-CONFIG_SND_SA11XX_UDA1341
-  Say Y or M if you have a Compaq iPaq H3x00 handheld computer and want
-  to use its Philips UDA 1341 audio chip.
diff -Nru a/sound/arm/Config.in b/sound/arm/Config.in
--- a/sound/arm/Config.in	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,10 +0,0 @@
-# ALSA ARM drivers
-
-mainmenu_option next_comment
-comment 'ALSA ARM devices'
-
-if [ "$CONFIG_ARCH_SA1100" = "y" ]; then
-  dep_tristate 'SA11xx UDA1341TS driver (H3600)' CONFIG_SND_SA11XX_UDA1341 $CONFIG_SND $CONFIG_L3
-fi
-
-endmenu
diff -Nru a/sound/arm/Kconfig b/sound/arm/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/arm/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,14 @@
+# ALSA ARM drivers
+
+menu "ALSA ARM devices"
+	depends on SND!=n && ARM
+
+config SND_SA11XX_UDA1341
+	tristate "SA11xx UDA1341TS driver (H3600)"
+	depends on ARCH_SA1100 && SND && L3
+	help
+	  Say Y or M if you have a Compaq iPaq H3x00 handheld computer and want
+	  to use its Philips UDA 1341 audio chip.
+
+endmenu
+
diff -Nru a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
--- a/sound/arm/sa11xx-uda1341.c	Wed Oct 30 16:44:20 2002
+++ b/sound/arm/sa11xx-uda1341.c	Wed Oct 30 16:44:20 2002
@@ -15,7 +15,7 @@
  * 2002-04-04   Tomas Kasparek  better rates handling (allow non-standard rates)
  */
 
-/* $Id: sa11xx-uda1341.c,v 1.4 2002/08/06 18:03:25 perex Exp $ */
+/* $Id: sa11xx-uda1341.c,v 1.5 2002/10/21 18:28:19 perex Exp $ */
 
 #include <sound/driver.h>
 #include <linux/module.h>
@@ -46,10 +46,10 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{UDA1341,iPAQ H3600 UDA1341TS}}");
 
-static char *snd_id = NULL;	/* ID for this card */
+static char *id = NULL;	/* ID for this card */
 
-MODULE_PARM(snd_id, "s");
-MODULE_PARM_DESC(snd_id, "ID string for SA1100/SA1111 + UDA1341TS soundcard.");
+MODULE_PARM(id, "s");
+MODULE_PARM_DESC(id, "ID string for SA1100/SA1111 + UDA1341TS soundcard.");
 
 #define chip_t sa11xx_uda1341_t
 
@@ -884,7 +884,7 @@
 		return -ENODEV;
 
 	/* register the soundcard */
-	card = snd_card_new(-1, snd_id, THIS_MODULE, 0);
+	card = snd_card_new(-1, id, THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	sa11xx_uda1341 = snd_magic_kcalloc(sa11xx_uda1341_t, 0, GFP_KERNEL);
diff -Nru a/sound/core/Config.help b/sound/core/Config.help
--- a/sound/core/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,40 +0,0 @@
-CONFIG_SND_SEQUENCER
-  Say 'Y' or 'M' to enable MIDI sequencer and router support. This feature
-  allows routing and enqueing MIDI events. Events can be processed at given
-  time.
-
-CONFIG_SND_SEQ_DUMMY
-  Say 'Y' or 'M' to enable dummy sequencer client. This client is a simple
-  midi-through client. All normal input events are redirected to output port
-  immediately.
-
-CONFIG_SND_OSSEMUL
-  Say 'Y' to enable OSS (Open Sound System) API emulation code.
-
-CONFIG_SND_MIXER_OSS
-  Say 'Y' or 'M' to enable mixer OSS API emulation (/dev/mixer*).
-
-CONFIG_SND_PCM_OSS
-  Say 'Y' or 'M' to enable digital audio (PCM) OSS API emulation (/dev/dsp*).
-
-CONFIG_SND_SEQUENCER_OSS
-  Say 'Y' or 'M' to enable OSS sequencer emulation (both /dev/sequencer and
-  /dev/music interfaces).
-
-CONFIG_SND_RTCTIMER
-  Say 'Y' or 'M' to enable RTC timer support for ALSA. ALSA code uses RTC
-  timer as precise timing source and maps the RTC timer to the ALSA's timer
-  interface. ALSA sequencer code can also use this timing source.
-
-CONFIG_SND_VERBOSE_PRINTK
-  Say 'Y' to enable verbose log messages. These messages will help to
-  identify source file and position containing printed messages.
-
-CONFIG_SND_DEBUG
-  Say 'Y' to enable ALSA debug code.
-
-CONFIG_SND_DEBUG_MEMORY
-  Say 'Y' to enable debugging of memory allocation.
-
-CONFIG_SND_DEBUG_DETECTION
-  Say 'Y' to enable debugging of hardware detection.
diff -Nru a/sound/core/Config.in b/sound/core/Config.in
--- a/sound/core/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,26 +0,0 @@
-# ALSA soundcard-configuration
-
-if [ "$CONFIG_X86_64" = "y" -a "$CONFIG_IA32_EMULATION" = "y" ]; then
-  dep_tristate '  Emulation for 32-bit applications' CONFIG_SND_BIT32_EMUL $CONFIG_SND
-fi
-if [ "$CONFIG_PPC64" = "y" ]; then
-  dep_tristate '  Emulation for 32-bit applications' CONFIG_SND_BIT32_EMUL $CONFIG_SND
-fi
-if [ "$CONFIG_SPARC64" = "y" ]; then
-  dep_tristate '  Emulation for 32-bit applications' CONFIG_SND_BIT32_EMUL $CONFIG_SND
-fi
-dep_tristate '  Sequencer support' CONFIG_SND_SEQUENCER $CONFIG_SND
-if [ "$CONFIG_SND_SEQUENCER" != "n" ]; then
-  dep_tristate '  Sequencer dummy client' CONFIG_SND_SEQ_DUMMY $CONFIG_SND_SEQUENCER
-fi
-dep_mbool '  OSS API emulation' CONFIG_SND_OSSEMUL $CONFIG_SND
-if [ "$CONFIG_SND_OSSEMUL" = "y" ]; then
-  dep_tristate '    OSS Mixer API' CONFIG_SND_MIXER_OSS $CONFIG_SND
-  dep_tristate '    OSS PCM (digital audio) API' CONFIG_SND_PCM_OSS $CONFIG_SND
-  dep_mbool '    OSS Sequencer API' CONFIG_SND_SEQUENCER_OSS $CONFIG_SND_SEQUENCER
-fi
-dep_tristate '  RTC Timer support' CONFIG_SND_RTCTIMER $CONFIG_SND $CONFIG_RTC
-bool '  Verbose printk' CONFIG_SND_VERBOSE_PRINTK
-bool '  Debug' CONFIG_SND_DEBUG
-dep_bool '    Debug memory' CONFIG_SND_DEBUG_MEMORY $CONFIG_SND_DEBUG
-dep_bool '    Debug detection' CONFIG_SND_DEBUG_DETECT $CONFIG_SND_DEBUG
diff -Nru a/sound/core/Kconfig b/sound/core/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/core/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,77 @@
+# ALSA soundcard-configuration
+config SND_BIT32_EMUL
+	tristate "Emulation for 32-bit applications"
+	depends on SND && (SPARC64 || PPC64 || X86_64 && IA32_EMULATION)
+
+config SND_SEQUENCER
+	tristate "Sequencer support"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to enable MIDI sequencer and router support. This feature
+	  allows routing and enqueing MIDI events. Events can be processed at given
+	  time.
+
+config SND_SEQ_DUMMY
+	tristate "Sequencer dummy client"
+	depends on SND_SEQUENCER
+	help
+	  Say 'Y' or 'M' to enable dummy sequencer client. This client is a simple
+	  midi-through client. All normal input events are redirected to output port
+	  immediately.
+
+config SND_OSSEMUL
+	bool "OSS API emulation"
+	depends on SND
+	help
+	  Say 'Y' to enable OSS (Open Sound System) API emulation code.
+
+config SND_MIXER_OSS
+	tristate "OSS Mixer API"
+	depends on SND_OSSEMUL && SND
+	help
+	  Say 'Y' or 'M' to enable mixer OSS API emulation (/dev/mixer*).
+
+config SND_PCM_OSS
+	tristate "OSS PCM (digital audio) API"
+	depends on SND_OSSEMUL && SND
+	help
+	  Say 'Y' or 'M' to enable digital audio (PCM) OSS API emulation (/dev/dsp*).
+
+config SND_SEQUENCER_OSS
+	bool "OSS Sequencer API"
+	depends on SND_OSSEMUL && SND_SEQUENCER
+	help
+	  Say 'Y' or 'M' to enable OSS sequencer emulation (both /dev/sequencer and
+	  /dev/music interfaces).
+
+config SND_RTCTIMER
+	tristate "RTC Timer support"
+	depends on SND && RTC
+	help
+	  Say 'Y' or 'M' to enable RTC timer support for ALSA. ALSA code uses RTC
+	  timer as precise timing source and maps the RTC timer to the ALSA's timer
+	  interface. ALSA sequencer code can also use this timing source.
+
+config SND_VERBOSE_PRINTK
+	bool "Verbose printk"
+	depends on SND
+	help
+	  Say 'Y' to enable verbose log messages. These messages will help to
+	  identify source file and position containing printed messages.
+
+config SND_DEBUG
+	bool "Debug"
+	depends on SND
+	help
+	  Say 'Y' to enable ALSA debug code.
+
+config SND_DEBUG_MEMORY
+	bool "Debug memory"
+	depends on SND_DEBUG
+	help
+	  Say 'Y' to enable debugging of memory allocation.
+
+config SND_DEBUG_DETECT
+	bool "Debug detection"
+	depends on SND_DEBUG
+
diff -Nru a/sound/core/Makefile b/sound/core/Makefile
--- a/sound/core/Makefile	Wed Oct 30 16:44:24 2002
+++ b/sound/core/Makefile	Wed Oct 30 16:44:24 2002
@@ -91,7 +91,7 @@
 obj-$(CONFIG_SND_KORG1212) += snd-pcm.o snd-timer.o snd.o
 obj-$(CONFIG_SND_NM256) += snd-pcm.o snd-timer.o snd.o
 obj-$(CONFIG_SND_RME9652) += snd-pcm.o snd-timer.o snd.o
-obj-$(CONFIG_SND_HDSP) += snd-pcm.o snd-timer.o snd.o
+obj-$(CONFIG_SND_HDSP) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o
 obj-$(CONFIG_SND_TRIDENT) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o
 obj-$(CONFIG_SND_YMFPCI) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o
 obj-$(CONFIG_SND_POWERMAC) += snd-pcm.o snd-timer.o snd.o
@@ -100,10 +100,7 @@
   obj-$(CONFIG_SND_SB16) += snd-hwdep.o
   obj-$(CONFIG_SND_SBAWE) += snd-hwdep.o
 endif
-obj-$(CONFIG_SND_USB_AUDIO) += snd-pcm.o snd-timer.o snd.o
-ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
-obj-$(CONFIG_SND_USB_AUDIO) += snd-rawmidi.o
-endif
+obj-$(CONFIG_SND_USB_AUDIO) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o
 
 obj-m := $(sort $(obj-m))
 
diff -Nru a/sound/core/info.c b/sound/core/info.c
--- a/sound/core/info.c	Wed Oct 30 16:44:27 2002
+++ b/sound/core/info.c	Wed Oct 30 16:44:27 2002
@@ -76,7 +76,7 @@
 
 #ifdef CONFIG_PROC_FS
 
-extern int snd_major;
+extern int major;
 extern struct file_operations snd_fops;
 
 static DECLARE_MUTEX(info_mutex);
@@ -885,8 +885,8 @@
 	entry = (snd_info_entry_t *) de->data;
 	if (entry == NULL)
 		return;
-	inode->i_gid = snd_device_gid;
-	inode->i_uid = snd_device_uid;
+	inode->i_gid = device_gid;
+	inode->i_uid = device_uid;
 	inode->i_rdev = MKDEV(entry->c.device.major, entry->c.device.minor);
 }
 
@@ -907,16 +907,16 @@
 #ifdef CONFIG_DEVFS_FS
 	char dname[32];
 #endif
-	unsigned short major = number >> 16;
+	unsigned short _major = number >> 16;
 	unsigned short minor = (unsigned short) number;
 	snd_info_entry_t *entry;
 	struct proc_dir_entry *p = NULL;
 
-	if (!major)
-		major = snd_major;
+	if (!_major)
+		_major = major;
 	if (!mode)
 		mode = S_IFCHR | S_IRUGO | S_IWUGO;
-	mode &= (snd_device_mode & (S_IRUGO | S_IWUGO)) | S_IFCHR | S_IFBLK;
+	mode &= (device_mode & (S_IRUGO | S_IWUGO)) | S_IFCHR | S_IFBLK;
 	entry = snd_info_create_module_entry(THIS_MODULE, name, NULL);
 	if (entry == NULL)
 		return NULL;
@@ -940,8 +940,8 @@
 		snd_info_free_entry(entry);
 		return NULL;
 	}
-	p->gid = snd_device_gid;
-	p->uid = snd_device_uid;
+	p->gid = device_gid;
+	p->uid = device_uid;
 	p->data = (void *) entry;
 	entry->p = p;
 	up(&info_mutex);
diff -Nru a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
--- a/sound/core/oss/pcm_oss.c	Wed Oct 30 16:44:32 2002
+++ b/sound/core/oss/pcm_oss.c	Wed Oct 30 16:44:32 2002
@@ -37,22 +37,22 @@
 #include <linux/soundcard.h>
 #include <sound/initval.h>
 
-static int snd_dsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
-static int snd_adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
-static int snd_nonblock_open;
+static int dsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
+static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
+static int nonblock_open;
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Abramo Bagnara <abramo@alsa-project.org>");
 MODULE_DESCRIPTION("PCM OSS emulation for ALSA.");
 MODULE_LICENSE("GPL");
-MODULE_PARM(snd_dsp_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dsp_map, "PCM device number assigned to 1st OSS device.");
-MODULE_PARM_SYNTAX(snd_dsp_map, "default:0,skill:advanced");
-MODULE_PARM(snd_adsp_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_adsp_map, "PCM device number assigned to 2nd OSS device.");
-MODULE_PARM_SYNTAX(snd_adsp_map, "default:1,skill:advanced");
-MODULE_PARM(snd_nonblock_open, "i");
-MODULE_PARM_DESC(snd_nonblock_open, "Don't block opening busy PCM devices.");
-MODULE_PARM_SYNTAX(snd_nonblock_open, "default:0,skill:advanced");
+MODULE_PARM(dsp_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dsp_map, "PCM device number assigned to 1st OSS device.");
+MODULE_PARM_SYNTAX(dsp_map, "default:0,skill:advanced");
+MODULE_PARM(adsp_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(adsp_map, "PCM device number assigned to 2nd OSS device.");
+MODULE_PARM_SYNTAX(adsp_map, "default:1,skill:advanced");
+MODULE_PARM(nonblock_open, "i");
+MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices.");
+MODULE_PARM_SYNTAX(nonblock_open, "default:0,skill:advanced");
 
 extern int snd_mixer_oss_ioctl_card(snd_card_t *card, unsigned int cmd, unsigned long arg);
 static int snd_pcm_oss_get_rate(snd_pcm_oss_file_t *pcm_oss_file);
@@ -1536,7 +1536,7 @@
 
 	snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
 	device = SNDRV_MINOR_OSS_DEVICE(minor) == SNDRV_MINOR_OSS_PCM1 ?
-		snd_adsp_map[cardnum] : snd_dsp_map[cardnum];
+		adsp_map[cardnum] : dsp_map[cardnum];
 
 #ifdef LINUX_2_2
 	MOD_INC_USE_COUNT;
@@ -1572,7 +1572,7 @@
 			nonblock = 0;
 	}
 	if (!nonblock)
-		nonblock = snd_nonblock_open;
+		nonblock = nonblock_open;
 
 	init_waitqueue_entry(&wait, current);
 	add_wait_queue(&pcm->open_wait, &wait);
@@ -2115,7 +2115,7 @@
 				      snd_pcm_t * pcm)
 {
 	pcm->oss.reg = 0;
-	if (snd_dsp_map[pcm->card->number] == pcm->device) {
+	if (dsp_map[pcm->card->number] == pcm->device) {
 		char name[128];
 		int duplex;
 		register_oss_dsp(native_minor, pcm, 0);
@@ -2130,7 +2130,7 @@
 #endif
 		pcm->oss.reg++;
 	}
-	if (snd_adsp_map[pcm->card->number] == pcm->device) {
+	if (adsp_map[pcm->card->number] == pcm->device) {
 		register_oss_dsp(native_minor, pcm, 1);
 		pcm->oss.reg++;
 	}
@@ -2145,14 +2145,14 @@
 				        snd_pcm_t * pcm)
 {
 	if (pcm->oss.reg) {
-		if (snd_dsp_map[pcm->card->number] == pcm->device) {
+		if (dsp_map[pcm->card->number] == pcm->device) {
 			snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
 						  pcm->card, 0);
 #ifdef SNDRV_OSS_INFO_DEV_AUDIO
 			snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_AUDIO, pcm->card->number);
 #endif
 		}
-		if (snd_adsp_map[pcm->card->number] == pcm->device)
+		if (adsp_map[pcm->card->number] == pcm->device)
 			snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
 						  pcm->card, 1);
 		pcm->oss.reg = 0;
@@ -2176,13 +2176,13 @@
 		return err;
 	/* check device map table */
 	for (i = 0; i < SNDRV_CARDS; i++) {
-		if (snd_dsp_map[i] < 0 || snd_dsp_map[i] >= SNDRV_PCM_DEVICES) {
-			snd_printk("invalid dsp_map[%d] = %d\n", i, snd_dsp_map[i]);
-			snd_dsp_map[i] = 0;
-		}
-		if (snd_adsp_map[i] < 0 || snd_adsp_map[i] >= SNDRV_PCM_DEVICES) {
-			snd_printk("invalid adsp_map[%d] = %d\n", i, snd_adsp_map[i]);
-			snd_adsp_map[i] = 1;
+		if (dsp_map[i] < 0 || dsp_map[i] >= SNDRV_PCM_DEVICES) {
+			snd_printk("invalid dsp_map[%d] = %d\n", i, dsp_map[i]);
+			dsp_map[i] = 0;
+		}
+		if (adsp_map[i] < 0 || adsp_map[i] >= SNDRV_PCM_DEVICES) {
+			snd_printk("invalid adsp_map[%d] = %d\n", i, adsp_map[i]);
+			adsp_map[i] = 1;
 		}
 	}
 	return 0;
diff -Nru a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
--- a/sound/core/pcm_memory.c	Wed Oct 30 16:44:30 2002
+++ b/sound/core/pcm_memory.c	Wed Oct 30 16:44:30 2002
@@ -27,15 +27,15 @@
 #include <sound/info.h>
 #include <sound/initval.h>
 
-static int snd_preallocate_dma = 1;
-MODULE_PARM(snd_preallocate_dma, "i");
-MODULE_PARM_DESC(snd_preallocate_dma, "Preallocate DMA memory when the PCM devices are initialized.");
-MODULE_PARM_SYNTAX(snd_preallocate_dma, SNDRV_BOOLEAN_TRUE_DESC);
-
-static int snd_maximum_substreams = 4;
-MODULE_PARM(snd_maximum_substreams, "i");
-MODULE_PARM_DESC(snd_maximum_substreams, "Maximum substreams with preallocated DMA memory.");
-MODULE_PARM_SYNTAX(snd_maximum_substreams, SNDRV_BOOLEAN_TRUE_DESC);
+static int preallocate_dma = 1;
+MODULE_PARM(preallocate_dma, "i");
+MODULE_PARM_DESC(preallocate_dma, "Preallocate DMA memory when the PCM devices are initialized.");
+MODULE_PARM_SYNTAX(preallocate_dma, SNDRV_BOOLEAN_TRUE_DESC);
+
+static int maximum_substreams = 4;
+MODULE_PARM(maximum_substreams, "i");
+MODULE_PARM_DESC(maximum_substreams, "Maximum substreams with preallocated DMA memory.");
+MODULE_PARM_SYNTAX(maximum_substreams, SNDRV_BOOLEAN_TRUE_DESC);
 
 static int snd_minimum_buffer = 16384;
 
@@ -168,7 +168,7 @@
 	dma_addr_t dma_addr = 0UL;
 	snd_info_entry_t *entry;
 
-	if (!size || !snd_preallocate_dma || substream->number >= snd_maximum_substreams) {
+	if (!size || !preallocate_dma || substream->number >= maximum_substreams) {
 		size = 0;
 	} else {
 		switch (substream->dma_type) {
diff -Nru a/sound/core/rawmidi.c b/sound/core/rawmidi.c
--- a/sound/core/rawmidi.c	Wed Oct 30 16:44:24 2002
+++ b/sound/core/rawmidi.c	Wed Oct 30 16:44:24 2002
@@ -38,14 +38,14 @@
 MODULE_LICENSE("GPL");
 
 #ifdef CONFIG_SND_OSSEMUL
-static int snd_midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
-static int snd_amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
-MODULE_PARM(snd_midi_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_midi_map, "Raw MIDI device number assigned to 1st OSS device.");
-MODULE_PARM_SYNTAX(snd_midi_map, "default:0,skill:advanced");
-MODULE_PARM(snd_amidi_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_amidi_map, "Raw MIDI device number assigned to 2nd OSS device.");
-MODULE_PARM_SYNTAX(snd_amidi_map, "default:1,skill:advanced");
+static int midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
+static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
+MODULE_PARM(midi_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device.");
+MODULE_PARM_SYNTAX(midi_map, "default:0,skill:advanced");
+MODULE_PARM(amidi_map, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device.");
+MODULE_PARM_SYNTAX(amidi_map, "default:1,skill:advanced");
 #endif /* CONFIG_SND_OSSEMUL */
 
 static int snd_rawmidi_free(snd_rawmidi_t *rawmidi);
@@ -379,7 +379,7 @@
 		cardnum = SNDRV_MINOR_OSS_CARD(minor(inode->i_rdev));
 		cardnum %= SNDRV_CARDS;
 		device = SNDRV_MINOR_OSS_DEVICE(minor(inode->i_rdev)) == SNDRV_MINOR_OSS_MIDI ?
-			snd_midi_map[cardnum] : snd_amidi_map[cardnum];
+			midi_map[cardnum] : amidi_map[cardnum];
 		break;
 #endif
 	default:
@@ -518,7 +518,11 @@
 
 int snd_rawmidi_info(snd_rawmidi_substream_t *substream, snd_rawmidi_info_t *info)
 {
-	snd_rawmidi_t *rmidi = substream->rmidi;
+	snd_rawmidi_t *rmidi;
+	
+	if (substream == NULL)
+		return -ENODEV;
+	rmidi = substream->rmidi;
 	memset(info, 0, sizeof(*info));
 	info->card = rmidi->card->number;
 	info->device = rmidi->device;
@@ -1419,7 +1423,7 @@
 	}
 #ifdef CONFIG_SND_OSSEMUL
 	rmidi->ossreg = 0;
-	if (rmidi->device == snd_midi_map[rmidi->card->number]) {
+	if (rmidi->device == midi_map[rmidi->card->number]) {
 		if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
 					    rmidi->card, 0, &snd_rawmidi_reg, name) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 0);
@@ -1430,7 +1434,7 @@
 #endif
 		}
 	}
-	if (rmidi->device == snd_amidi_map[rmidi->card->number]) {
+	if (rmidi->device == amidi_map[rmidi->card->number]) {
 		if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
 					    rmidi->card, 1, &snd_rawmidi_reg, name) < 0) {
 			snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 1);
@@ -1484,13 +1488,13 @@
 	}
 #ifdef CONFIG_SND_OSSEMUL
 	if (rmidi->ossreg) {
-		if (rmidi->device == snd_midi_map[rmidi->card->number]) {
+		if (rmidi->device == midi_map[rmidi->card->number]) {
 			snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI, rmidi->card, 0);
 #ifdef SNDRV_OSS_INFO_DEV_MIDI
 			snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_MIDI, rmidi->card->number);
 #endif
 		}
-		if (rmidi->device == snd_amidi_map[rmidi->card->number])
+		if (rmidi->device == amidi_map[rmidi->card->number])
 			snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI, rmidi->card, 1);
 		rmidi->ossreg = 0;
 	}
@@ -1532,13 +1536,13 @@
 #ifdef CONFIG_SND_OSSEMUL
 	/* check device map table */
 	for (i = 0; i < SNDRV_CARDS; i++) {
-		if (snd_midi_map[i] < 0 || snd_midi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
-			snd_printk(KERN_ERR "invalid midi_map[%d] = %d\n", i, snd_midi_map[i]);
-			snd_midi_map[i] = 0;
-		}
-		if (snd_amidi_map[i] < 0 || snd_amidi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
-			snd_printk(KERN_ERR "invalid amidi_map[%d] = %d\n", i, snd_amidi_map[i]);
-			snd_amidi_map[i] = 1;
+		if (midi_map[i] < 0 || midi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
+			snd_printk(KERN_ERR "invalid midi_map[%d] = %d\n", i, midi_map[i]);
+			midi_map[i] = 0;
+		}
+		if (amidi_map[i] < 0 || amidi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
+			snd_printk(KERN_ERR "invalid amidi_map[%d] = %d\n", i, amidi_map[i]);
+			amidi_map[i] = 1;
 		}
 	}
 #endif /* CONFIG_SND_OSSEMUL */
diff -Nru a/sound/core/seq/Makefile b/sound/core/seq/Makefile
--- a/sound/core/seq/Makefile	Wed Oct 30 16:44:33 2002
+++ b/sound/core/seq/Makefile	Wed Oct 30 16:44:33 2002
@@ -73,7 +73,7 @@
 obj-$(CONFIG_SND_EMU10K1) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-virmidi.o
 obj-$(CONFIG_SND_TRIDENT) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
 obj-$(CONFIG_SND_YMFPCI) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
-obj-$(CONFIG_SND_USB_AUDIO) += snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-virmidi.o
+obj-$(CONFIG_SND_USB_AUDIO) += snd-seq.o snd-seq-device.o snd-seq-midi-event.o
 
 obj-m := $(sort $(obj-m))
 
diff -Nru a/sound/core/seq/seq.c b/sound/core/seq/seq.c
--- a/sound/core/seq/seq.c	Wed Oct 30 16:44:30 2002
+++ b/sound/core/seq/seq.c	Wed Oct 30 16:44:30 2002
@@ -34,13 +34,13 @@
 #include "seq_info.h"
 #include <sound/seq_device.h>
 
-int snd_seq_client_load[64] = {[0 ... 63] = -1};
-int snd_seq_default_timer_class = SNDRV_TIMER_CLASS_GLOBAL;
-int snd_seq_default_timer_sclass = SNDRV_TIMER_SCLASS_NONE;
-int snd_seq_default_timer_card = -1;
-int snd_seq_default_timer_device = SNDRV_TIMER_GLOBAL_SYSTEM;
-int snd_seq_default_timer_subdevice = 0;
-int snd_seq_default_timer_resolution = 0;	/* Hz */
+int seq_client_load[64] = {[0 ... 63] = -1};
+int seq_default_timer_class = SNDRV_TIMER_CLASS_GLOBAL;
+int seq_default_timer_sclass = SNDRV_TIMER_SCLASS_NONE;
+int seq_default_timer_card = -1;
+int seq_default_timer_device = SNDRV_TIMER_GLOBAL_SYSTEM;
+int seq_default_timer_subdevice = 0;
+int seq_default_timer_resolution = 0;	/* Hz */
 
 MODULE_AUTHOR("Frank van de Pol <fvdpol@home.nl>, Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer.");
@@ -48,20 +48,20 @@
 MODULE_CLASSES("{sound}");
 MODULE_SUPPORTED_DEVICE("sound");
 
-MODULE_PARM(snd_seq_client_load, "1-64i");
-MODULE_PARM_DESC(snd_seq_client_load, "The numbers of global (system) clients to load through kmod.");
-MODULE_PARM(snd_seq_default_timer_class, "i");
-MODULE_PARM_DESC(snd_seq_default_timer_class, "The default timer class.");
-MODULE_PARM(snd_seq_default_timer_sclass, "i");
-MODULE_PARM_DESC(snd_seq_default_timer_sclass, "The default timer slave class.");
-MODULE_PARM(snd_seq_default_timer_card, "i");
-MODULE_PARM_DESC(snd_seq_default_timer_card, "The default timer card number.");
-MODULE_PARM(snd_seq_default_timer_device, "i");
-MODULE_PARM_DESC(snd_seq_default_timer_device, "The default timer device number.");
-MODULE_PARM(snd_seq_default_timer_subdevice, "i");
-MODULE_PARM_DESC(snd_seq_default_timer_subdevice, "The default timer subdevice number.");
-MODULE_PARM(snd_seq_default_timer_resolution, "i");
-MODULE_PARM_DESC(snd_seq_default_timer_resolution, "The default timer resolution in Hz.");
+MODULE_PARM(seq_client_load, "1-64i");
+MODULE_PARM_DESC(seq_client_load, "The numbers of global (system) clients to load through kmod.");
+MODULE_PARM(seq_default_timer_class, "i");
+MODULE_PARM_DESC(seq_default_timer_class, "The default timer class.");
+MODULE_PARM(seq_default_timer_sclass, "i");
+MODULE_PARM_DESC(seq_default_timer_sclass, "The default timer slave class.");
+MODULE_PARM(seq_default_timer_card, "i");
+MODULE_PARM_DESC(seq_default_timer_card, "The default timer card number.");
+MODULE_PARM(seq_default_timer_device, "i");
+MODULE_PARM_DESC(seq_default_timer_device, "The default timer device number.");
+MODULE_PARM(seq_default_timer_subdevice, "i");
+MODULE_PARM_DESC(seq_default_timer_subdevice, "The default timer subdevice number.");
+MODULE_PARM(seq_default_timer_resolution, "i");
+MODULE_PARM_DESC(seq_default_timer_resolution, "The default timer resolution in Hz.");
 
 /*
  *  INIT PART
diff -Nru a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
--- a/sound/core/seq/seq_clientmgr.c	Wed Oct 30 16:44:22 2002
+++ b/sound/core/seq/seq_clientmgr.c	Wed Oct 30 16:44:22 2002
@@ -110,7 +110,7 @@
 	return clienttab[clientid];
 }
 
-extern int snd_seq_client_load[];
+extern int seq_client_load[];
 
 client_t *snd_seq_client_use_ptr(int clientid)
 {
@@ -141,9 +141,9 @@
 			if (! client_requested[clientid]) {
 				client_requested[clientid] = 1;
 				for (idx = 0; idx < 64; idx++) {
-					if (snd_seq_client_load[idx] < 0)
+					if (seq_client_load[idx] < 0)
 						break;
-					if (snd_seq_client_load[idx] == clientid) {
+					if (seq_client_load[idx] == clientid) {
 						sprintf(name, "snd-seq-client-%i", clientid);
 						request_module(name);
 						break;
diff -Nru a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
--- a/sound/core/seq/seq_timer.c	Wed Oct 30 16:44:31 2002
+++ b/sound/core/seq/seq_timer.c	Wed Oct 30 16:44:31 2002
@@ -27,12 +27,12 @@
 #include "seq_queue.h"
 #include "seq_info.h"
 
-extern int snd_seq_default_timer_class;
-extern int snd_seq_default_timer_sclass;
-extern int snd_seq_default_timer_card;
-extern int snd_seq_default_timer_device;
-extern int snd_seq_default_timer_subdevice;
-extern int snd_seq_default_timer_resolution;
+extern int seq_default_timer_class;
+extern int seq_default_timer_sclass;
+extern int seq_default_timer_card;
+extern int seq_default_timer_device;
+extern int seq_default_timer_subdevice;
+extern int seq_default_timer_resolution;
 
 #define SKEW_BASE	0x10000	/* 16bit shift */
 
@@ -103,12 +103,12 @@
 	tmr->running = 0;
 
 	tmr->type = SNDRV_SEQ_TIMER_ALSA;
-	tmr->alsa_id.dev_class = snd_seq_default_timer_class;
-	tmr->alsa_id.dev_sclass = snd_seq_default_timer_sclass;
-	tmr->alsa_id.card = snd_seq_default_timer_card;
-	tmr->alsa_id.device = snd_seq_default_timer_device;
-	tmr->alsa_id.subdevice = snd_seq_default_timer_subdevice;
-	tmr->preferred_resolution = snd_seq_default_timer_resolution;
+	tmr->alsa_id.dev_class = seq_default_timer_class;
+	tmr->alsa_id.dev_sclass = seq_default_timer_sclass;
+	tmr->alsa_id.card = seq_default_timer_card;
+	tmr->alsa_id.device = seq_default_timer_device;
+	tmr->alsa_id.subdevice = seq_default_timer_subdevice;
+	tmr->preferred_resolution = seq_default_timer_resolution;
 
 	tmr->skew = tmr->skew_base = SKEW_BASE;
 }
diff -Nru a/sound/core/sound.c b/sound/core/sound.c
--- a/sound/core/sound.c	Wed Oct 30 16:44:30 2002
+++ b/sound/core/sound.c	Wed Oct 30 16:44:30 2002
@@ -36,32 +36,32 @@
 
 #define SNDRV_OS_MINORS 256
 
-int snd_major = CONFIG_SND_MAJOR;
-static int snd_cards_limit = SNDRV_CARDS;
-int snd_device_mode = S_IFCHR | S_IRUGO | S_IWUGO;
-int snd_device_gid = 0;
-int snd_device_uid = 0;
+int major = CONFIG_SND_MAJOR;
+static int cards_limit = SNDRV_CARDS;
+int device_mode = S_IFCHR | S_IRUGO | S_IWUGO;
+int device_gid = 0;
+int device_uid = 0;
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards.");
 MODULE_LICENSE("GPL");
 MODULE_CLASSES("{sound}");
 MODULE_SUPPORTED_DEVICE("sound");
-MODULE_PARM(snd_major, "i");
-MODULE_PARM_DESC(snd_major, "Major # for sound driver.");
-MODULE_PARM_SYNTAX(snd_major, "default:116,skill:devel");
-MODULE_PARM(snd_cards_limit, "i");
-MODULE_PARM_DESC(snd_cards_limit, "Count of soundcards installed in the system.");
-MODULE_PARM_SYNTAX(snd_cards_limit, "default:8,skill:advanced");
-MODULE_PARM(snd_device_mode, "i");
-MODULE_PARM_DESC(snd_device_mode, "Device file permission mask for sound dynamic device filesystem.");
-MODULE_PARM_SYNTAX(snd_device_mode, "default:0666,base:8");
-MODULE_PARM(snd_device_gid, "i");
-MODULE_PARM_DESC(snd_device_gid, "Device file GID for sound dynamic device filesystem.");
-MODULE_PARM_SYNTAX(snd_device_gid, "default:0");
-MODULE_PARM(snd_device_uid, "i");
-MODULE_PARM_DESC(snd_device_uid, "Device file UID for sound dynamic device filesystem.");
-MODULE_PARM_SYNTAX(snd_device_uid, "default:0");
+MODULE_PARM(major, "i");
+MODULE_PARM_DESC(major, "Major # for sound driver.");
+MODULE_PARM_SYNTAX(major, "default:116,skill:devel");
+MODULE_PARM(cards_limit, "i");
+MODULE_PARM_DESC(cards_limit, "Count of soundcards installed in the system.");
+MODULE_PARM_SYNTAX(cards_limit, "default:8,skill:advanced");
+MODULE_PARM(device_mode, "i");
+MODULE_PARM_DESC(device_mode, "Device file permission mask for sound dynamic device filesystem.");
+MODULE_PARM_SYNTAX(device_mode, "default:0666,base:8");
+MODULE_PARM(device_gid, "i");
+MODULE_PARM_DESC(device_gid, "Device file GID for sound dynamic device filesystem.");
+MODULE_PARM_SYNTAX(device_gid, "default:0");
+MODULE_PARM(device_uid, "i");
+MODULE_PARM_DESC(device_uid, "Device file UID for sound dynamic device filesystem.");
+MODULE_PARM_SYNTAX(device_uid, "default:0");
 
 int snd_ecards_limit;
 
@@ -302,7 +302,7 @@
 #endif
 	int card;
 
-	snd_ecards_limit = snd_cards_limit;
+	snd_ecards_limit = cards_limit;
 	for (card = 0; card < SNDRV_CARDS; card++)
 		INIT_LIST_HEAD(&snd_minors_hash[card]);
 #ifdef CONFIG_SND_OSSEMUL
@@ -316,8 +316,8 @@
 	devfs_handle = devfs_mk_dir(NULL, "snd", NULL);
 #endif
 #endif
-	if (register_chrdev(snd_major, "alsa", &snd_fops)) {
-		snd_printk(KERN_ERR "unable to register native major device number %d\n", snd_major);
+	if (register_chrdev(major, "alsa", &snd_fops)) {
+		snd_printk(KERN_ERR "unable to register native major device number %d\n", major);
 		return -EIO;
 	}
 #ifdef CONFIG_SND_DEBUG_MEMORY
@@ -333,10 +333,10 @@
 	snd_info_minor_register();
 #endif
 #ifdef CONFIG_DEVFS_FS
-	for (controlnum = 0; controlnum < snd_cards_limit; controlnum++) {
+	for (controlnum = 0; controlnum < cards_limit; controlnum++) {
 		sprintf(controlname, "snd/controlC%d", controlnum);
 		devfs_register(NULL, controlname, DEVFS_FL_DEFAULT,
-				snd_major, controlnum<<5, snd_device_mode | S_IFCHR,
+				major, controlnum<<5, device_mode | S_IFCHR,
 				&snd_fops, NULL);
 	}
 #endif
@@ -355,7 +355,7 @@
 	char controlname[24];
 	short controlnum;
 
-	for (controlnum = 0; controlnum < snd_cards_limit; controlnum++) {
+	for (controlnum = 0; controlnum < cards_limit; controlnum++) {
 		sprintf(controlname, "snd/controlC%d", controlnum);
 		devfs_find_and_unregister(NULL, controlname, 0, 0, DEVFS_SPECIAL_CHR, 0);
 	}
@@ -371,8 +371,8 @@
 #ifdef CONFIG_SND_DEBUG_MEMORY
 	snd_memory_done();
 #endif
-	if (unregister_chrdev(snd_major, "alsa") != 0)
-		snd_printk(KERN_ERR "unable to unregister major device number %d\n", snd_major);
+	if (unregister_chrdev(major, "alsa") != 0)
+		snd_printk(KERN_ERR "unable to unregister major device number %d\n", major);
 #ifdef CONFIG_DEVFS_FS
 	devfs_unregister(devfs_handle);
 #endif
diff -Nru a/sound/core/timer.c b/sound/core/timer.c
--- a/sound/core/timer.c	Wed Oct 30 16:44:29 2002
+++ b/sound/core/timer.c	Wed Oct 30 16:44:29 2002
@@ -41,13 +41,13 @@
 #define DEFAULT_TIMER_LIMIT 2
 #endif
 
-int snd_timer_limit = DEFAULT_TIMER_LIMIT;
+int timer_limit = DEFAULT_TIMER_LIMIT;
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>, Takashi Iwai <tiwai@suse.de>");
 MODULE_DESCRIPTION("ALSA timer interface");
 MODULE_LICENSE("GPL");
 MODULE_CLASSES("{sound}");
-MODULE_PARM(snd_timer_limit, "i");
-MODULE_PARM_DESC(snd_timer_limit, "Maximum global timers in system.");
+MODULE_PARM(timer_limit, "i");
+MODULE_PARM_DESC(timer_limit, "Maximum global timers in system.");
 
 typedef struct {
 	snd_timer_instance_t *timeri;
@@ -152,7 +152,7 @@
 	
 	switch (tid->dev_class) {
 	case SNDRV_TIMER_CLASS_GLOBAL:
-		if (tid->device >= snd_timer_limit)
+		if (tid->device >= timer_limit)
 			return;
 		sprintf(str, "snd-timer-%i", tid->device);
 		break;
diff -Nru a/sound/core/wrappers.c b/sound/core/wrappers.c
--- a/sound/core/wrappers.c	Wed Oct 30 16:44:24 2002
+++ b/sound/core/wrappers.c	Wed Oct 30 16:44:24 2002
@@ -19,19 +19,8 @@
  *
  */
 
-#ifdef ALSA_BUILD
-#include "config.h"
-#endif
-
 #include <linux/version.h>
 #include <linux/config.h>
-#ifdef ALSA_BUILD
-#if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)
-#define MODVERSIONS
-#include <linux/modversions.h>
-#include "sndversions.h"
-#endif
-#endif
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
diff -Nru a/sound/drivers/Config.help b/sound/drivers/Config.help
--- a/sound/drivers/Config.help	Wed Oct 30 16:44:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,18 +0,0 @@
-CONFIG_SND_DUMMY
-  Say 'Y' or 'M' to include dummy driver. This driver does nothing, but
-  emulates various mixer controls and PCM devices.
-  
-CONFIG_SND_VIRMIDI
-  Say 'Y' or 'M' to include virtual MIDI driver. This driver allows to
-  connect applications using raw MIDI devices to sequencer.
-
-CONFIG_SND_MTPAV
-  Say 'Y' or 'M' to include support for MOTU MidiTimePiece AV multiport
-  MIDI adapter.
-
-CONFIG_SND_SERIAL_U16550
-  Say 'Y' or 'M' to include support for MIDI serial port driver. It works
-  with serial UARTs 16550 and better.
-
-CONFIG_SND_MPU401
-  Say 'Y' or 'M' to include support for MPU401 hardware using UART access.
diff -Nru a/sound/drivers/Config.in b/sound/drivers/Config.in
--- a/sound/drivers/Config.in	Wed Oct 30 16:44:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,12 +0,0 @@
-# ALSA generic drivers
-
-mainmenu_option next_comment
-comment 'Generic devices'
-
-dep_tristate 'Dummy (/dev/null) soundcard' CONFIG_SND_DUMMY $CONFIG_SND
-dep_tristate 'Virtual MIDI soundcard' CONFIG_SND_VIRMIDI $CONFIG_SND $CONFIG_SND_SEQUENCER
-dep_tristate 'MOTU MidiTimePiece AV multiport MIDI' CONFIG_SND_MTPAV $CONFIG_SND
-dep_tristate 'UART16550 - MIDI only driver' CONFIG_SND_SERIAL_U16550 $CONFIG_SND
-dep_tristate 'Generic MPU-401 UART driver' CONFIG_SND_MPU401 $CONFIG_SND
-
-endmenu
diff -Nru a/sound/drivers/Kconfig b/sound/drivers/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/drivers/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,42 @@
+# ALSA generic drivers
+
+menu "Generic devices"
+	depends on SND!=n
+
+config SND_DUMMY
+	tristate "Dummy (/dev/null) soundcard"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include dummy driver. This driver does nothing, but
+	  emulates various mixer controls and PCM devices.
+	  
+
+config SND_VIRMIDI
+	tristate "Virtual MIDI soundcard"
+	depends on SND_SEQUENCER
+	help
+	  Say 'Y' or 'M' to include virtual MIDI driver. This driver allows to
+	  connect applications using raw MIDI devices to sequencer.
+
+config SND_MTPAV
+	tristate "MOTU MidiTimePiece AV multiport MIDI"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for MOTU MidiTimePiece AV multiport
+	  MIDI adapter.
+
+config SND_SERIAL_U16550
+	tristate "UART16550 - MIDI only driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for MIDI serial port driver. It works
+	  with serial UARTs 16550 and better.
+
+config SND_MPU401
+	tristate "Generic MPU-401 UART driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for MPU401 hardware using UART access.
+
+endmenu
+
diff -Nru a/sound/drivers/dummy.c b/sound/drivers/dummy.c
--- a/sound/drivers/dummy.c	Wed Oct 30 16:44:33 2002
+++ b/sound/drivers/dummy.c	Wed Oct 30 16:44:33 2002
@@ -84,31 +84,31 @@
 #define USE_PERIODS_MAX 	1024
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_pcm_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-static int snd_pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
-//static int snd_midi_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for dummy soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for dummy soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable this dummy soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_pcm_devs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_devs, "PCM devices # (0-4) for dummy driver.");
-MODULE_PARM_SYNTAX(snd_pcm_devs, SNDRV_ENABLED ",allows:{{0,4}},default:1,dialog:list");
-MODULE_PARM(snd_pcm_substreams, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_substreams, "PCM substreams # (1-16) for dummy driver.");
-MODULE_PARM_SYNTAX(snd_pcm_substreams, SNDRV_ENABLED ",allows:{{1,16}},default:8,dialog:list");
-//MODULE_PARM(snd_midi_devs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-//MODULE_PARM_DESC(snd_midi_devs, "MIDI devices # (0-2) for dummy driver.");
-//MODULE_PARM_SYNTAX(snd_midi_devs, SNDRV_ENABLED ",allows:{{0,2}},default:8,dialog:list");
+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] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
+static int pcm_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
+//static int midi_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for dummy soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for dummy soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable this dummy soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(pcm_devs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_devs, "PCM devices # (0-4) for dummy driver.");
+MODULE_PARM_SYNTAX(pcm_devs, SNDRV_ENABLED ",allows:{{0,4}},default:1,dialog:list");
+MODULE_PARM(pcm_substreams, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-16) for dummy driver.");
+MODULE_PARM_SYNTAX(pcm_substreams, SNDRV_ENABLED ",allows:{{1,16}},default:8,dialog:list");
+//MODULE_PARM(midi_devs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+//MODULE_PARM_DESC(midi_devs, "MIDI devices # (0-2) for dummy driver.");
+//MODULE_PARM_SYNTAX(midi_devs, SNDRV_ENABLED ",allows:{{0,2}},default:8,dialog:list");
 
 #define MIXER_ADDR_MASTER	0
 #define MIXER_ADDR_LINE		1
@@ -537,20 +537,20 @@
 	struct snd_card_dummy *dummy;
 	int idx, err;
 
-	if (!snd_enable[dev])
+	if (!enable[dev])
 		return -ENODEV;
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_card_dummy));
 	if (card == NULL)
 		return -ENOMEM;
 	dummy = (struct snd_card_dummy *)card->private_data;
 	dummy->card = card;
-	for (idx = 0; idx < MAX_PCM_DEVICES && idx < snd_pcm_devs[dev]; idx++) {
-		if (snd_pcm_substreams[dev] < 1)
-			snd_pcm_substreams[dev] = 1;
-		if (snd_pcm_substreams[dev] > MAX_PCM_SUBSTREAMS)
-			snd_pcm_substreams[dev] = MAX_PCM_SUBSTREAMS;
-		if ((err = snd_card_dummy_pcm(dummy, idx, snd_pcm_substreams[dev])) < 0)
+	for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) {
+		if (pcm_substreams[dev] < 1)
+			pcm_substreams[dev] = 1;
+		if (pcm_substreams[dev] > MAX_PCM_SUBSTREAMS)
+			pcm_substreams[dev] = MAX_PCM_SUBSTREAMS;
+		if ((err = snd_card_dummy_pcm(dummy, idx, pcm_substreams[dev])) < 0)
 			goto __nodev;
 	}
 	if ((err = snd_card_dummy_new_mixer(dummy)) < 0)
@@ -571,7 +571,7 @@
 {
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++) {
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
 		if (snd_card_dummy_probe(dev) < 0) {
 #ifdef MODULE
 			printk(KERN_ERR "Dummy soundcard #%i not found or device busy\n", dev + 1);
@@ -602,8 +602,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-dummy=snd_enable,snd_index,snd_id,
-			snd_pcm_devs,snd_pcm_substreams */
+/* format is: snd-dummy=enable,index,id,
+			pcm_devs,pcm_substreams */
 
 static int __init alsa_card_dummy_setup(char *str)
 {
@@ -611,11 +611,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_devs[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_substreams[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_devs[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_substreams[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
--- a/sound/drivers/mpu401/mpu401.c	Wed Oct 30 16:44:30 2002
+++ b/sound/drivers/mpu401/mpu401.c	Wed Oct 30 16:44:30 2002
@@ -35,27 +35,27 @@
 MODULE_LICENSE("GPL");
 MODULE_CLASSES("{sound}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* MPU-401 port number */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* MPU-401 IRQ */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for MPU-401 device.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for MPU-401 device.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable MPU-401 device.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for MPU-401 device.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for MPU-401 device.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* MPU-401 port number */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* MPU-401 IRQ */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for MPU-401 device.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for MPU-401 device.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable MPU-401 device.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for MPU-401 device.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for MPU-401 device.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
 
 static snd_card_t *snd_mpu401_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -64,30 +64,30 @@
 	snd_card_t *card;
 	int err;
 
-	if (snd_port[dev] == SNDRV_AUTO_PORT) {
-		snd_printk("specify snd_port\n");
+	if (port[dev] == SNDRV_AUTO_PORT) {
+		snd_printk("specify port\n");
 		return -EINVAL;
 	}
-	if (snd_irq[dev] == SNDRV_AUTO_IRQ) {
+	if (irq[dev] == SNDRV_AUTO_IRQ) {
 		snd_printk("specify or disable IRQ port\n");
 		return -EINVAL;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
-				snd_port[dev], 0,
-				snd_irq[dev], snd_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) {
-		printk(KERN_ERR "MPU401 not detected at 0x%lx\n", snd_port[dev]);
+				port[dev], 0,
+				irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) {
+		printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]);
 		snd_card_free(card);
 		return -ENODEV;
 	}
 	strcpy(card->driver, "MPU-401 UART");
 	strcpy(card->shortname, card->driver);
-	sprintf(card->longname, "%s at 0x%lx, ", card->shortname, snd_port[dev]);
-	if (snd_irq[dev] >= 0) {
-		sprintf(card->longname + strlen(card->longname), "IRQ %d", snd_irq[dev]);
+	sprintf(card->longname, "%s at 0x%lx, ", card->shortname, port[dev]);
+	if (irq[dev] >= 0) {
+		sprintf(card->longname + strlen(card->longname), "IRQ %d", irq[dev]);
 	} else {
 		strcat(card->longname, "polled");
 	}
@@ -104,7 +104,7 @@
 	int dev, cards = 0;
 
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		if (snd_card_mpu401_probe(dev) >= 0)
 			cards++;
@@ -131,7 +131,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-mpu401=snd_enable,snd_index,snd_id,snd_port,snd_irq */
+/* format is: snd-mpu401=enable,index,id,port,irq */
 
 static int __init alsa_card_mpu401_setup(char *str)
 {
@@ -139,11 +139,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
--- a/sound/drivers/mtpav.c	Wed Oct 30 16:44:31 2002
+++ b/sound/drivers/mtpav.c	Wed Oct 30 16:44:31 2002
@@ -1,7 +1,7 @@
 /*
  *      MOTU Midi Timepiece ALSA Main routines
  *      Copyright by Michael T. Mayers (c) Jan 09, 2000
- *      mail: tweakoz@pacbell.net
+ *      mail: michael@tweakoz.com
  *      Thanks to John Galbraith
  *
  *      This program is free software; you can redistribute it and/or modify
@@ -44,7 +44,7 @@
  * Jun 11 2001	Takashi Iwai <tiwai@suse.de>
  *      - Recoded & debugged
  *      - Added timer interrupt for midi outputs
- *      - snd_hwports is between 1 and 8, which specifies the number of hardware ports.
+ *      - hwports is between 1 and 8, which specifies the number of hardware ports.
  *        The three global ports, computer, adat and broadcast ports, are created
  *        always after h/w and remote ports.
  *
@@ -75,27 +75,27 @@
 #define MTPAV_IRQ		7
 #define MTPAV_MAX_PORTS		8
 
-static int snd_index = SNDRV_DEFAULT_IDX1;
-static char *snd_id = SNDRV_DEFAULT_STR1;
-static long snd_port = MTPAV_IOBASE;	/* 0x378, 0x278 */
-static int snd_irq = MTPAV_IRQ;		/* 7, 5 */
-static int snd_hwports = MTPAV_MAX_PORTS;	/* use hardware ports 1-8 */
-
-MODULE_PARM(snd_index, "i");
-MODULE_PARM_DESC(snd_index, "Index value for MotuMTPAV MIDI.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "s");
-MODULE_PARM_DESC(snd_id, "ID string for MotuMTPAV MIDI.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_port, "l");
-MODULE_PARM_DESC(snd_port, "Parallel port # for MotuMTPAV MIDI.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x378},{0x278}},dialog:list");
-MODULE_PARM(snd_irq, "i");
-MODULE_PARM_DESC(snd_irq, "Parallel IRQ # for MotuMTPAV MIDI.");
-MODULE_PARM_SYNTAX(snd_irq,  SNDRV_ENABLED ",allows:{{7},{5}},dialog:list");
-MODULE_PARM(snd_hwports, "i");
-MODULE_PARM_DESC(snd_hwports, "Hardware ports # for MotuMTPAV MIDI.");
-MODULE_PARM_SYNTAX(snd_hwports, SNDRV_ENABLED ",allows:{{1,8}},dialog:list");
+static int index = SNDRV_DEFAULT_IDX1;
+static char *id = SNDRV_DEFAULT_STR1;
+static long port = MTPAV_IOBASE;	/* 0x378, 0x278 */
+static int irq = MTPAV_IRQ;		/* 7, 5 */
+static int hwports = MTPAV_MAX_PORTS;	/* use hardware ports 1-8 */
+
+MODULE_PARM(index, "i");
+MODULE_PARM_DESC(index, "Index value for MotuMTPAV MIDI.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "s");
+MODULE_PARM_DESC(id, "ID string for MotuMTPAV MIDI.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(port, "l");
+MODULE_PARM_DESC(port, "Parallel port # for MotuMTPAV MIDI.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x378},{0x278}},dialog:list");
+MODULE_PARM(irq, "i");
+MODULE_PARM_DESC(irq, "Parallel IRQ # for MotuMTPAV MIDI.");
+MODULE_PARM_SYNTAX(irq,  SNDRV_ENABLED ",allows:{{7},{5}},dialog:list");
+MODULE_PARM(hwports, "i");
+MODULE_PARM_DESC(hwports, "Hardware ports # for MotuMTPAV MIDI.");
+MODULE_PARM_SYNTAX(hwports, SNDRV_ENABLED ",allows:{{1,8}},dialog:list");
 
 /*
  *      defines
@@ -421,25 +421,19 @@
 	spin_unlock(&chip->spinlock);
 }
 
+/* spinlock held! */
 static void snd_mtpav_add_output_timer(mtpav_t *chip)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&chip->spinlock, flags);
 	chip->timer.function = snd_mtpav_output_timer;
 	chip->timer.data = (unsigned long) mtp_card;
 	chip->timer.expires = 1 + jiffies;
 	add_timer(&chip->timer);
-	spin_unlock_irqrestore(&chip->spinlock, flags);
 }
 
+/* spinlock held! */
 static void snd_mtpav_remove_output_timer(mtpav_t *chip)
 {
-	unsigned long flags;
-
-	spin_lock_irqsave(&chip->spinlock, flags);
 	del_timer(&chip->timer);
-	spin_unlock_irqrestore(&chip->spinlock, flags);
 }
 
 /*
@@ -510,8 +504,11 @@
 		return;
 
 	port = &mcrd->ports[mcrd->inmidiport];
-	if (port->mode & MTPAV_MODE_INPUT_TRIGGERED)
+	if (port->mode & MTPAV_MODE_INPUT_TRIGGERED) {
+		spin_unlock(&mcrd->spinlock);
 		snd_rawmidi_receive(port->input, &inbyte, 1);
+		spin_lock(&mcrd->spinlock);
+	}
 }
 
 static void snd_mtpav_inmidi_h(mtpav_t * mcrd, u8 inbyte)
@@ -588,16 +585,16 @@
  */
 static int snd_mtpav_get_ISA(mtpav_t * mcard)
 {
-	if ((mcard->res_port = request_region(snd_port, 3, "MotuMTPAV MIDI")) == NULL) {
-		snd_printk("MTVAP port 0x%lx is busy\n", snd_port);
+	if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
+		snd_printk("MTVAP port 0x%lx is busy\n", port);
 		return -EBUSY;
 	}
-	mcard->port = snd_port;
-	if (request_irq(snd_irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
-		snd_printk("MTVAP IRQ %d busy\n", snd_irq);
+	mcard->port = port;
+	if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
+		snd_printk("MTVAP IRQ %d busy\n", irq);
 		return -EBUSY;
 	}
-	mcard->irq = snd_irq;
+	mcard->irq = irq;
 	return 0;
 }
 
@@ -645,12 +642,12 @@
 
 	//printk("entering snd_mtpav_get_RAWMIDI\n");
 
-	if (snd_hwports < 1)
+	if (hwports < 1)
 		mcard->num_ports = 1;
-	else if (snd_hwports > 8)
+	else if (hwports > 8)
 		mcard->num_ports = 8;
 	else
-		mcard->num_ports = snd_hwports;
+		mcard->num_ports = hwports;
 
 	if ((rval = snd_rawmidi_new(mcard->card, "MotuMIDI", 0,
 				    mcard->num_ports * 2 + MTPAV_PIDX_BROADCAST + 1,
@@ -730,7 +727,7 @@
 	if (mtp_card == NULL)
 		return -ENOMEM;
 
-	mtp_card->card = snd_card_new(snd_index, snd_id, THIS_MODULE, 0);
+	mtp_card->card = snd_card_new(index, id, THIS_MODULE, 0);
 	if (mtp_card->card == NULL) {
 		free_mtpav(mtp_card);
 		return -ENOMEM;
@@ -760,7 +757,7 @@
 
 	snd_mtpav_portscan(mtp_card);
 
-	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", snd_irq, snd_port);
+	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
 
 	return 0;
 
@@ -790,19 +787,19 @@
 
 #ifndef MODULE
 
-/* format is: snd-mtpav=snd_enable,snd_index,snd_id,
-			snd_port,snd_irq,snd_hwports */
+/* format is: snd-mtpav=snd_enable,index,id,
+			port,irq,hwports */
 
 static int __init alsa_card_mtpav_setup(char *str)
 {
         int __attribute__ ((__unused__)) enable = 1;
 
 	(void)(get_option(&str,&enable) == 2 &&
-	       get_option(&str,&snd_index) == 2 &&
-	       get_id(&str,&snd_id) == 2 &&
-	       get_option(&str,(int *)&snd_port) == 2 &&
-	       get_option(&str,&snd_irq) == 2 &&
-	       get_option(&str,&snd_hwports) == 2);
+	       get_option(&str,&index) == 2 &&
+	       get_id(&str,&id) == 2 &&
+	       get_option(&str,(int *)&port) == 2 &&
+	       get_option(&str,&irq) == 2 &&
+	       get_option(&str,&hwports) == 2);
 	return 1;
 }
 
diff -Nru a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
--- a/sound/drivers/serial-u16550.c	Wed Oct 30 16:44:21 2002
+++ b/sound/drivers/serial-u16550.c	Wed Oct 30 16:44:21 2002
@@ -61,48 +61,48 @@
 	"Generic"
 };
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x3f8,0x2f8,0x3e8,0x2e8 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; 	/* 3,4,5,7,9,10,11,14,15 */
-static int snd_speed[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 38400}; /* 9600,19200,38400,57600,115200 */
-static int snd_base[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 115200}; /* baud base */
-static int snd_outs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};	 /* 1 to 16 */
-static int snd_ins[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};	/* 1 to 16 */
-static int snd_adaptor[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = SNDRV_SERIAL_SOUNDCANVAS};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Serial MIDI.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Serial MIDI.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_enable, "Enable UART16550A chip.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for UART16550A chip.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for UART16550A chip.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_speed, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_speed, "Speed in bauds.");
-MODULE_PARM_SYNTAX(snd_speed, SNDRV_ENABLED ",allows:{9600,19200,38400,57600,115200},dialog:list");
-MODULE_PARM(snd_base, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_base, "Base for divisor in bauds.");
-MODULE_PARM_SYNTAX(snd_base, SNDRV_ENABLED ",allows:{57600,115200,230400,460800},dialog:list");
-MODULE_PARM(snd_outs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_outs, "Number of MIDI outputs.");
-MODULE_PARM(snd_ins, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_ins, "Number of MIDI inputs.");
-
-MODULE_PARM_SYNTAX(snd_outs, SNDRV_ENABLED ",allows:{{1,16}},dialog:list");
-MODULE_PARM_SYNTAX(snd_ins, SNDRV_ENABLED ",allows:{{1,16}},dialog:list");
-MODULE_PARM(snd_adaptor, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_adaptor, "Type of adaptor.");
-MODULE_PARM_SYNTAX(snd_adaptor, SNDRV_ENABLED ",allows:{{0=Soundcanvas,1=MS-124T,2=MS-124W S/A,3=MS-124W M/B,4=Generic}},dialog:list");
+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; /* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x3f8,0x2f8,0x3e8,0x2e8 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; 	/* 3,4,5,7,9,10,11,14,15 */
+static int speed[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 38400}; /* 9600,19200,38400,57600,115200 */
+static int base[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 115200}; /* baud base */
+static int outs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};	 /* 1 to 16 */
+static int ins[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};	/* 1 to 16 */
+static int adaptor[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = SNDRV_SERIAL_SOUNDCANVAS};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Serial MIDI.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Serial MIDI.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(enable, "Enable UART16550A chip.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for UART16550A chip.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for UART16550A chip.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(speed, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(speed, "Speed in bauds.");
+MODULE_PARM_SYNTAX(speed, SNDRV_ENABLED ",allows:{9600,19200,38400,57600,115200},dialog:list");
+MODULE_PARM(base, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(base, "Base for divisor in bauds.");
+MODULE_PARM_SYNTAX(base, SNDRV_ENABLED ",allows:{57600,115200,230400,460800},dialog:list");
+MODULE_PARM(outs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(outs, "Number of MIDI outputs.");
+MODULE_PARM(ins, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(ins, "Number of MIDI inputs.");
+
+MODULE_PARM_SYNTAX(outs, SNDRV_ENABLED ",allows:{{1,16}},dialog:list");
+MODULE_PARM_SYNTAX(ins, SNDRV_ENABLED ",allows:{{1,16}},dialog:list");
+MODULE_PARM(adaptor, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(adaptor, "Type of adaptor.");
+MODULE_PARM_SYNTAX(adaptor, SNDRV_ENABLED ",allows:{{0=Soundcanvas,1=MS-124T,2=MS-124W S/A,3=MS-124W M/B,4=Generic}},dialog:list");
 
 /*#define SNDRV_SERIAL_MS124W_MB_NOCOMBO 1*/  /* Address outs as 0-3 instead of bitmap */
 
@@ -842,67 +842,67 @@
 	snd_uart16550_t *uart;
 	int err;
 
-	if (!snd_enable[dev])
+	if (!enable[dev])
 		return -ENOENT;
 
-	switch (snd_adaptor[dev]) {
+	switch (adaptor[dev]) {
 	case SNDRV_SERIAL_SOUNDCANVAS:
-		snd_ins[dev] = 1;
+		ins[dev] = 1;
 		break;
 	case SNDRV_SERIAL_MS124T:
 	case SNDRV_SERIAL_MS124W_SA:
-		snd_outs[dev] = 1;
-		snd_ins[dev] = 1;
+		outs[dev] = 1;
+		ins[dev] = 1;
 		break;
 	case SNDRV_SERIAL_MS124W_MB:
-		snd_outs[dev] = 16;
-		snd_ins[dev] = 1;
+		outs[dev] = 16;
+		ins[dev] = 1;
 		break;
 	case SNDRV_SERIAL_GENERIC:
 		break;
 	default:
 		snd_printk("Adaptor type is out of range 0-%d (%d)\n",
-			   SNDRV_SERIAL_MAX_ADAPTOR, snd_adaptor[dev]);
+			   SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]);
 		return -ENODEV;
 	}
 
-	if (snd_outs[dev] < 1 || snd_outs[dev] > SNDRV_SERIAL_MAX_OUTS) {
+	if (outs[dev] < 1 || outs[dev] > SNDRV_SERIAL_MAX_OUTS) {
 		snd_printk("Count of outputs is out of range 1-%d (%d)\n",
-			   SNDRV_SERIAL_MAX_OUTS, snd_outs[dev]);
+			   SNDRV_SERIAL_MAX_OUTS, outs[dev]);
 		return -ENODEV;
 	}
 
-	if (snd_ins[dev] < 1 || snd_ins[dev] > SNDRV_SERIAL_MAX_INS) {
+	if (ins[dev] < 1 || ins[dev] > SNDRV_SERIAL_MAX_INS) {
 		snd_printk("Count of inputs is out of range 1-%d (%d)\n",
-			   SNDRV_SERIAL_MAX_INS, snd_ins[dev]);
+			   SNDRV_SERIAL_MAX_INS, ins[dev]);
 		return -ENODEV;
 	}
 
-	card  = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card  = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
 	strcpy(card->driver, "Serial");
 	strcpy(card->shortname, "Serial midi (uart16550A)");
 
-	if ((err = snd_uart16550_detect(snd_port[dev])) <= 0) {
+	if ((err = snd_uart16550_detect(port[dev])) <= 0) {
 		snd_card_free(card);
-		printk(KERN_ERR "no UART detected at 0x%lx\n", (long)snd_port[dev]);
+		printk(KERN_ERR "no UART detected at 0x%lx\n", (long)port[dev]);
 		return err;
 	}
 
 	if ((err = snd_uart16550_create(card,
-					snd_port[dev],
-					snd_irq[dev],
-					snd_speed[dev],
-					snd_base[dev],
-					snd_adaptor[dev],
+					port[dev],
+					irq[dev],
+					speed[dev],
+					base[dev],
+					adaptor[dev],
 					&uart)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
 
-	if ((err = snd_uart16550_rmidi(uart, 0, snd_outs[dev], snd_ins[dev], &uart->rmidi)) < 0) {
+	if ((err = snd_uart16550_rmidi(uart, 0, outs[dev], ins[dev], &uart->rmidi)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -913,8 +913,8 @@
 		uart->irq,
 		uart->speed,
 		(int)uart->divisor,
-		snd_outs[dev],
-		snd_ins[dev],
+		outs[dev],
+		ins[dev],
 		adaptor_names[uart->adaptor]);
 
 	if ((err = snd_card_register(card)) < 0) {
@@ -959,9 +959,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-serial=snd_enable,snd_index,snd_id,
-			 snd_port,snd_irq,snd_speed,snd_base,snd_outs,
- 			 snd_ins,snd_adaptor */
+/* format is: snd-serial=enable,index,id,
+			 port,irq,speed,base,outs,
+ 			 ins,adaptor */
 
 static int __init alsa_card_serial_setup(char *str)
 {
@@ -969,16 +969,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_speed[nr_dev]) == 2 &&
-	       get_option(&str,&snd_base[nr_dev]) == 2 &&
-	       get_option(&str,&snd_outs[nr_dev]) == 2 &&
-	       get_option(&str,&snd_ins[nr_dev]) == 2 &&
-	       get_option(&str,&snd_adaptor[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&speed[nr_dev]) == 2 &&
+	       get_option(&str,&base[nr_dev]) == 2 &&
+	       get_option(&str,&outs[nr_dev]) == 2 &&
+	       get_option(&str,&ins[nr_dev]) == 2 &&
+	       get_option(&str,&adaptor[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
--- a/sound/drivers/virmidi.c	Wed Oct 30 16:44:26 2002
+++ b/sound/drivers/virmidi.c	Wed Oct 30 16:44:26 2002
@@ -30,7 +30,7 @@
  *
  * Typical usage is like following:
  * - Load snd-virmidi module.
- *	# modprobe snd-virmidi snd_index=2
+ *	# modprobe snd-virmidi index=2
  *   Then, sequencer clients 72:0 to 75:0 will be created, which are
  *   mapped from /dev/snd/midiC1D0 to /dev/snd/midiC1D3, respectively.
  *
@@ -59,23 +59,23 @@
 
 #define MAX_MIDI_DEVICES	8
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_midi_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for virmidi soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for virmidi soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable this soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_midi_devs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_midi_devs, "MIDI devices # (1-8)");
-MODULE_PARM_SYNTAX(snd_midi_devs, SNDRV_ENABLED ",allows:{{1,8}}");
+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] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
+static int midi_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for virmidi soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for virmidi soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable this soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(midi_devs, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(midi_devs, "MIDI devices # (1-8)");
+MODULE_PARM_SYNTAX(midi_devs, SNDRV_ENABLED ",allows:{{1,8}}");
 
 typedef struct snd_card_virmidi {
 	snd_card_t *card;
@@ -91,20 +91,20 @@
 	struct snd_card_virmidi *vmidi;
 	int idx, err;
 
-	if (!snd_enable[dev])
+	if (!enable[dev])
 		return -ENODEV;
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_card_virmidi));
 	if (card == NULL)
 		return -ENOMEM;
 	vmidi = (struct snd_card_virmidi *)card->private_data;
 	vmidi->card = card;
 
-	if (snd_midi_devs[dev] > MAX_MIDI_DEVICES) {
+	if (midi_devs[dev] > MAX_MIDI_DEVICES) {
 		snd_printk("too much midi devices for virmidi %d: force to use %d\n", dev, MAX_MIDI_DEVICES);
-		snd_midi_devs[dev] = MAX_MIDI_DEVICES;
+		midi_devs[dev] = MAX_MIDI_DEVICES;
 	}
-	for (idx = 0; idx < snd_midi_devs[dev]; idx++) {
+	for (idx = 0; idx < midi_devs[dev]; idx++) {
 		snd_rawmidi_t *rmidi;
 		snd_virmidi_dev_t *rdev;
 		if ((err = snd_virmidi_new(card, idx, &rmidi)) < 0)
@@ -131,7 +131,7 @@
 {
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++) {
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
 		if (snd_card_virmidi_probe(dev) < 0) {
 #ifdef MODULE
 			printk(KERN_ERR "Card-VirMIDI #%i not found or device busy\n", dev + 1);
@@ -162,7 +162,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-virmidi=snd_enable,snd_index,snd_id,snd_midi_devs */
+/* format is: snd-virmidi=enable,index,id,midi_devs */
 
 static int __init alsa_card_virmidi_setup(char *str)
 {
@@ -170,10 +170,10 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_midi_devs[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&midi_devs[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/Config.help b/sound/isa/Config.help
--- a/sound/isa/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,99 +0,0 @@
-CONFIG_SND_AD1816A
-  Say 'Y' or 'M' to include support for Analog Devices SoundPort AD1816A or
-  compatible sound chips.
-
-CONFIG_SND_AD1848
-  Say 'Y' or 'M' to include support for AD1848 (Analog Devices) or CS4248 
-  (Cirrus Logic - Crystal Semiconductors) chips. Please, for newer chips
-  from Cirrus Logic, use CS4231, CS4232 or CS4236+ driver.
-
-CONFIG_SND_CS4231
-  Say 'Y' or 'M' to include support for CS4231 chips from Cirrus Logic -
-  Crystal Semiconductors.
-
-CONFIG_SND_CS4232
-  Say 'Y' or 'M' to include support for CS4232 chips from Cirrus Logic -
-  Crystal Semiconductors.
-
-CONFIG_SND_CS4236
-  Say 'Y' or 'M' to include support for CS4235,CS4236,CS4237B,CS4238B,CS4239
-  chips from Cirrus Logic - Crystal Semiconductors.
-
-CONFIG_SND_ES968
-  Say 'Y' or 'M' to include support for ESS AudioDrive ES968 chip.
-
-CONFIG_SND_ES1688
-  Say 'Y' or 'M' to include support for ESS AudioDrive ES688 or ES1688 chips.
-
-CONFIG_SND_ES18XX
-  Say 'Y' or 'M' to include support for ESS AudioDrive ES18xx chips.
-
-CONFIG_SND_GUSCLASSIC
-  Say 'Y' or 'M' to include support for Gravis UltraSound Classic soundcard.
-
-CONFIG_SND_GUSEXTREME
-  Say 'Y' or 'M' to include support for Gravis UltraSound Extreme soundcard.
-
-CONFIG_SND_GUSMAX
-  Say 'Y' or 'M' to include support for Gravis UltraSound MAX soundcard.
-
-CONFIG_SND_INTERWAVE
-  Say 'Y' or 'M' to include support for AMD InterWave based soundcards
-  (Gravis UltraSound Plug & Play, STB SoundRage32, MED3210, Dynasonic Pro,
-  Panasonic PCA761AW).
-
-CONFIG_SND_INTERWAVE_STB
-  Say 'Y' or 'M' to include support for AMD InterWave based soundcards
-  with TEA6330T bass and treble regulator (UltraSound 32-Pro).
-
-CONFIG_SND_OPTI92X_AD1848
-  Say 'Y' or 'M' to include support for Opti92x soundcards equiped with
-  AD1848 codec.
-
-CONFIG_SND_OPTI92X_CS4231
-  Say 'Y' or 'M' to include support for Opti92x soundcards equiped with
-  CS4231 codec.
-
-CONFIG_SND_OPTI93X
-  Say 'Y' or 'M' to include support for Opti93x soundcards.
-
-CONFIG_SND_SB8
-  Say 'Y' or 'M' to include support for Sound Blaster 1.0/2.0/Pro (8-bit)
-  soundcards or 100% compatible from Creative.
-
-CONFIG_SND_SB16
-  Say 'Y' or 'M' to include support for Sound Blaster 16 (including
-  Plug and Play version).
-
-CONFIG_SND_SBAWE
-  Say 'Y' or 'M' to include support for Sound Blaster AWE (including
-  Plug and Play version).
-
-CONFIG_SND_SB16_CSP
-  Say 'Y' to include support for CSP core. This special coprocessor
-  can do variable tasks like various compression and decompression
-  algorithms.
-
-CONFIG_SND_WAVEFRONT
-  Say 'Y' or 'M' to include support for Turtle Beach Maui, Tropez
-  and Tropez+ soundcards based on Wavefront chip.
-
-CONFIG_SND_ALS100
-  Say 'Y' or 'M' to include support for Avance Logic ALS100, ALS110,
-  ALS120 and ALS200 soundcards.
-
-CONFIG_SND_AZT2320
-  Say 'Y' or 'M' to include support for Aztech Systems AZT2320 soundcard.
-
-CONFIG_SND_CMI8330
-  Say 'Y' or 'M' to include support for C-Media CMI8330 based soundcards.
-
-CONFIG_SND_DT019X
-  Say 'Y' or 'M' to include support for Diamond Technologies DT-019X and
-  Avance Logic ALS-007 soundcards.
-
-CONFIG_SND_OPL3SA2
-  Say 'Y' or 'M' to include support for Yamaha OPL3SA2 or OPL3SA3 chips.
-
-CONFIG_SND_SGALAXY
-  Say 'Y' or 'M' to include support for Aztech Sound Galaxy.
diff -Nru a/sound/isa/Config.in b/sound/isa/Config.in
--- a/sound/isa/Config.in	Wed Oct 30 16:44:31 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,36 +0,0 @@
-# ALSA ISA drivers
-
-mainmenu_option next_comment
-comment 'ISA devices'
-
-dep_tristate 'Analog Devices SoundPort AD1816A' CONFIG_SND_AD1816A $CONFIG_SND $CONFIG_ISAPNP
-dep_tristate 'Generic AD1848/CS4248 driver' CONFIG_SND_AD1848 $CONFIG_SND
-dep_tristate 'Generic Cirrus Logic CS4231 driver' CONFIG_SND_CS4231 $CONFIG_SND
-dep_tristate 'Generic Cirrus Logic CS4232 driver' CONFIG_SND_CS4232 $CONFIG_SND
-dep_tristate 'Generic Cirrus Logic CS4236+ driver' CONFIG_SND_CS4236 $CONFIG_SND
-dep_tristate 'Generic ESS ES968 driver' CONFIG_SND_ES968 $CONFIG_SND $CONFIG_ISAPNP
-dep_tristate 'Generic ESS ES688/ES1688 driver' CONFIG_SND_ES1688 $CONFIG_SND
-dep_tristate 'Generic ESS ES18xx driver' CONFIG_SND_ES18XX $CONFIG_SND
-dep_tristate 'Gravis UltraSound Classic' CONFIG_SND_GUSCLASSIC $CONFIG_SND
-dep_tristate 'Gravis UltraSound Extreme' CONFIG_SND_GUSEXTREME $CONFIG_SND
-dep_tristate 'Gravis UltraSound MAX' CONFIG_SND_GUSMAX $CONFIG_SND
-dep_tristate 'AMD InterWave, Gravis UltraSound PnP' CONFIG_SND_INTERWAVE $CONFIG_SND
-dep_tristate 'AMD InterWave + TEA6330T (UltraSound 32-Pro)' CONFIG_SND_INTERWAVE_STB $CONFIG_SND
-dep_tristate 'OPTi 82C92x - AD1848' CONFIG_SND_OPTI92X_AD1848 $CONFIG_SND
-dep_tristate 'OPTi 82C92x - CS4231' CONFIG_SND_OPTI92X_CS4231 $CONFIG_SND
-dep_tristate 'OPTi 82C93x' CONFIG_SND_OPTI93X $CONFIG_SND
-dep_tristate 'Sound Blaster 1.0/2.0/Pro (8-bit)' CONFIG_SND_SB8 $CONFIG_SND
-dep_tristate 'Sound Blaster 16 (PnP)' CONFIG_SND_SB16 $CONFIG_SND
-dep_tristate 'Sound Blaster AWE (32,64) (PnP)' CONFIG_SND_SBAWE $CONFIG_SND
-if [ "$CONFIG_SND_SB16" != "n" -o "$CONFIG_SND_SBAWE" != "n" ]; then
-  bool '  Sound Blaster 16/AWE CSP support' CONFIG_SND_SB16_CSP
-fi
-dep_tristate 'Turtle Beach Maui,Tropez,Tropez+ (Wavefront)' CONFIG_SND_WAVEFRONT $CONFIG_SND
-dep_tristate 'Avance Logic ALS100/ALS120' CONFIG_SND_ALS100 $CONFIG_SND $CONFIG_ISAPNP
-dep_tristate 'Aztech Systems AZT2320' CONFIG_SND_AZT2320 $CONFIG_SND $CONFIG_ISAPNP
-dep_tristate 'C-Media CMI8330' CONFIG_SND_CMI8330 $CONFIG_SND
-dep_tristate 'Diamond Technologies DT-019X, Avance Logic ALS-007' CONFIG_SND_DT019X $CONFIG_SND $CONFIG_ISAPNP
-dep_tristate 'Yamaha OPL3-SA2/SA3' CONFIG_SND_OPL3SA2 $CONFIG_SND
-dep_tristate 'Aztech Sound Galaxy' CONFIG_SND_SGALAXY $CONFIG_SND
-
-endmenu
diff -Nru a/sound/isa/Kconfig b/sound/isa/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/isa/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,188 @@
+# ALSA ISA drivers
+
+menu "ISA devices"
+	depends on SND!=n && ISA
+
+config SND_AD1816A
+	tristate "Analog Devices SoundPort AD1816A"
+	depends on SND && ISAPNP
+	help
+	  Say 'Y' or 'M' to include support for Analog Devices SoundPort AD1816A or
+	  compatible sound chips.
+
+config SND_AD1848
+	tristate "Generic AD1848/CS4248 driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for AD1848 (Analog Devices) or CS4248 
+	  (Cirrus Logic - Crystal Semiconductors) chips. Please, for newer chips
+	  from Cirrus Logic, use CS4231, CS4232 or CS4236+ driver.
+
+config SND_CS4231
+	tristate "Generic Cirrus Logic CS4231 driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for CS4231 chips from Cirrus Logic -
+	  Crystal Semiconductors.
+
+config SND_CS4232
+	tristate "Generic Cirrus Logic CS4232 driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for CS4232 chips from Cirrus Logic -
+	  Crystal Semiconductors.
+
+config SND_CS4236
+	tristate "Generic Cirrus Logic CS4236+ driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for CS4235,CS4236,CS4237B,CS4238B,CS4239
+	  chips from Cirrus Logic - Crystal Semiconductors.
+
+config SND_ES968
+	tristate "Generic ESS ES968 driver"
+	depends on SND && ISAPNP
+	help
+	  Say 'Y' or 'M' to include support for ESS AudioDrive ES968 chip.
+
+config SND_ES1688
+	tristate "Generic ESS ES688/ES1688 driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ESS AudioDrive ES688 or ES1688 chips.
+
+config SND_ES18XX
+	tristate "Generic ESS ES18xx driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ESS AudioDrive ES18xx chips.
+
+config SND_GUSCLASSIC
+	tristate "Gravis UltraSound Classic"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Gravis UltraSound Classic soundcard.
+
+config SND_GUSEXTREME
+	tristate "Gravis UltraSound Extreme"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Gravis UltraSound Extreme soundcard.
+
+config SND_GUSMAX
+	tristate "Gravis UltraSound MAX"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Gravis UltraSound MAX soundcard.
+
+config SND_INTERWAVE
+	tristate "AMD InterWave, Gravis UltraSound PnP"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for AMD InterWave based soundcards
+	  (Gravis UltraSound Plug & Play, STB SoundRage32, MED3210, Dynasonic Pro,
+	  Panasonic PCA761AW).
+
+config SND_INTERWAVE_STB
+	tristate "AMD InterWave + TEA6330T (UltraSound 32-Pro)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for AMD InterWave based soundcards
+	  with TEA6330T bass and treble regulator (UltraSound 32-Pro).
+
+config SND_OPTI92X_AD1848
+	tristate "OPTi 82C92x - AD1848"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Opti92x soundcards equiped with
+	  AD1848 codec.
+
+config SND_OPTI92X_CS4231
+	tristate "OPTi 82C92x - CS4231"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Opti92x soundcards equiped with
+	  CS4231 codec.
+
+config SND_OPTI93X
+	tristate "OPTi 82C93x"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Opti93x soundcards.
+
+config SND_SB8
+	tristate "Sound Blaster 1.0/2.0/Pro (8-bit)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Sound Blaster 1.0/2.0/Pro (8-bit)
+	  soundcards or 100% compatible from Creative.
+
+config SND_SB16
+	tristate "Sound Blaster 16 (PnP)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Sound Blaster 16 (including
+	  Plug and Play version).
+
+config SND_SBAWE
+	tristate "Sound Blaster AWE (32,64) (PnP)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Sound Blaster AWE (including
+	  Plug and Play version).
+
+config SND_SB16_CSP
+	bool "Sound Blaster 16/AWE CSP support"
+	depends on SND_SB16 || SND_SBAWE
+	help
+	  Say 'Y' to include support for CSP core. This special coprocessor
+	  can do variable tasks like various compression and decompression
+	  algorithms.
+
+config SND_WAVEFRONT
+	tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Turtle Beach Maui, Tropez
+	  and Tropez+ soundcards based on Wavefront chip.
+
+config SND_ALS100
+	tristate "Avance Logic ALS100/ALS120"
+	depends on SND && ISAPNP
+	help
+	  Say 'Y' or 'M' to include support for Avance Logic ALS100, ALS110,
+	  ALS120 and ALS200 soundcards.
+
+config SND_AZT2320
+	tristate "Aztech Systems AZT2320"
+	depends on SND && ISAPNP
+	help
+	  Say 'Y' or 'M' to include support for Aztech Systems AZT2320 soundcard.
+
+config SND_CMI8330
+	tristate "C-Media CMI8330"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for C-Media CMI8330 based soundcards.
+
+config SND_DT019X
+	tristate "Diamond Technologies DT-019X, Avance Logic ALS-007"
+	depends on SND && ISAPNP
+	help
+	  Say 'Y' or 'M' to include support for Diamond Technologies DT-019X and
+	  Avance Logic ALS-007 soundcards.
+
+config SND_OPL3SA2
+	tristate "Yamaha OPL3-SA2/SA3"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Yamaha OPL3SA2 or OPL3SA3 chips.
+
+config SND_SGALAXY
+	tristate "Aztech Sound Galaxy"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Aztech Sound Galaxy.
+
+endmenu
+
diff -Nru a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
--- a/sound/isa/ad1816a/ad1816a.c	Wed Oct 30 16:44:26 2002
+++ b/sound/isa/ad1816a/ad1816a.c	Wed Oct 30 16:44:26 2002
@@ -50,47 +50,47 @@
 		"{Aztech/Newcom SC-16 3D},"
 		"{Shark Predator ISA}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 1-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ad1816a based soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ad1816a based soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ad1816a based soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "1st DMA # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "2nd DMA # for ad1816a driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 1-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 */
+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;	/* Pnp setup */
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ad1816a based soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ad1816a based soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ad1816a based soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for ad1816a driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ad1816a driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for ad1816a driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for ad1816a driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ad1816a driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "1st DMA # for ad1816a driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "2nd DMA # for ad1816a driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
 
 struct snd_card_ad1816a {
 #ifdef __ISAPNP__
@@ -163,52 +163,52 @@
 	if (pdev->prepare(pdev) < 0)
 		return -EAGAIN;
 
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[2], snd_port[dev], 16);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_fm_port[dev], 4);
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev],
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[2], port[dev], 16);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], fm_port[dev], 4);
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev],
 			1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev],
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev],
 			1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 
 	if (pdev->activate(pdev) < 0) {
 		printk(KERN_ERR PFX "AUDIO isapnp configure failure\n");
 		return -EBUSY;
 	}
 
-	snd_port[dev] = pdev->resource[2].start;
-	snd_fm_port[dev] = pdev->resource[1].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	snd_dma2[dev] = pdev->dma_resource[1].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[2].start;
+	fm_port[dev] = pdev->resource[1].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	dma2[dev] = pdev->dma_resource[1].start;
+	irq[dev] = pdev->irq_resource[0].start;
 
 	pdev = acard->devmpu;
 	if (pdev == NULL || pdev->prepare(pdev) < 0) {
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		acard->devmpu = NULL;
 		return 0;
 	}
 
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_mpu_port[dev],
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], mpu_port[dev],
 			2);
-	if (snd_mpu_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_mpu_irq[dev],
+	if (mpu_irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], mpu_irq[dev],
 			1);
 
 	if (pdev->activate(pdev) < 0) {
 		/* not fatal error */
 		printk(KERN_ERR PFX "MPU-401 isapnp configure failure\n");
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		acard->devmpu = NULL;
 	} else {
-		snd_mpu_port[dev] = pdev->resource[0].start;
-		snd_mpu_irq[dev] = pdev->irq_resource[0].start;
+		mpu_port[dev] = pdev->resource[0].start;
+		mpu_irq[dev] = pdev->irq_resource[0].start;
 	}
 
 	return 0;
@@ -246,7 +246,7 @@
 	ad1816a_t *chip;
 	opl3_t *opl3;
 
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(struct snd_card_ad1816a))) == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_ad1816a *)card->private_data;
@@ -262,10 +262,10 @@
 	return -ENOSYS;
 #endif	/* __ISAPNP__ */
 
-	if ((error = snd_ad1816a_create(card, snd_port[dev],
-					snd_irq[dev],
-					snd_dma1[dev],
-					snd_dma2[dev],
+	if ((error = snd_ad1816a_create(card, port[dev],
+					irq[dev],
+					dma1[dev],
+					dma2[dev],
 					&chip)) < 0) {
 		snd_card_free(card);
 		return error;
@@ -281,18 +281,18 @@
 		return error;
 	}
 
-	if (snd_mpu_port[dev] > 0) {
+	if (mpu_port[dev] > 0) {
 		if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
-					snd_mpu_port[dev], 0, snd_mpu_irq[dev], SA_INTERRUPT,
+					mpu_port[dev], 0, mpu_irq[dev], SA_INTERRUPT,
 					NULL) < 0)
-			printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", snd_mpu_port[dev]);
+			printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", mpu_port[dev]);
 	}
 
-	if (snd_fm_port[dev] > 0) {
+	if (fm_port[dev] > 0) {
 		if (snd_opl3_create(card,
-				    snd_fm_port[dev], snd_fm_port[dev] + 2,
+				    fm_port[dev], fm_port[dev] + 2,
 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
-			printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", snd_fm_port[dev], snd_fm_port[dev] + 2);
+			printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2);
 		} else {
 			if ((error = snd_opl3_timer_new(opl3, 1, 2)) < 0) {
 				snd_card_free(card);
@@ -308,7 +308,7 @@
 	strcpy(card->driver, "AD1816A");
 	strcpy(card->shortname, "ADI SoundPort AD1816A");
 	sprintf(card->longname, "%s soundcard, SS at 0x%lx, irq %d, dma %d&%d",
-		card->shortname, chip->port, snd_irq[dev], snd_dma1[dev], snd_dma2[dev]);
+		card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]);
 
 	if ((error = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -326,7 +326,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		snd_ad1816a_isapnp_cards[dev] = card;
 		snd_ad1816a_isapnp_id[dev] = id;
@@ -369,9 +369,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-ad1816a=snd_enable,snd_index,snd_id,snd_port,
-			  snd_mpu_port,snd_fm_port,snd_irq,snd_mpu_irq,
-			  snd_dma1,snd_dma2 */
+/* format is: snd-ad1816a=enable,index,id,port,
+			  mpu_port,fm_port,irq,mpu_irq,
+			  dma1,dma2 */
 
 static int __init alsa_card_ad1816a_setup(char *str)
 {
@@ -379,16 +379,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
--- a/sound/isa/ad1848/ad1848.c	Wed Oct 30 16:44:29 2002
+++ b/sound/isa/ad1848/ad1848.c	Wed Oct 30 16:44:29 2002
@@ -40,31 +40,31 @@
 	        "{Analog Devices,AD1847},"
 		"{Crystal Semiconductors,CS4248}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for AD1848 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for AD1848 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable AD1848 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for AD1848 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for AD1848 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for AD1848 driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,11,12,15 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for AD1848 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for AD1848 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable AD1848 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for AD1848 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for AD1848 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for AD1848 driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
 
 static snd_card_t *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -76,26 +76,26 @@
 	snd_pcm_t *pcm;
 	int err;
 
-	if (snd_port[dev] == SNDRV_AUTO_PORT) {
-		snd_printk("specify snd_port\n");
+	if (port[dev] == SNDRV_AUTO_PORT) {
+		snd_printk("specify port\n");
 		return -EINVAL;
 	}
-	if (snd_irq[dev] == SNDRV_AUTO_IRQ) {
-		snd_printk("specify snd_irq\n");
+	if (irq[dev] == SNDRV_AUTO_IRQ) {
+		snd_printk("specify irq\n");
 		return -EINVAL;
 	}
-	if (snd_dma1[dev] == SNDRV_AUTO_DMA) {
-		snd_printk("specify snd_dma1\n");
+	if (dma1[dev] == SNDRV_AUTO_DMA) {
+		snd_printk("specify dma1\n");
 		return -EINVAL;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	if ((err = snd_ad1848_create(card, snd_port[dev],
-				     snd_irq[dev],
-				     snd_dma1[dev],
+	if ((err = snd_ad1848_create(card, port[dev],
+				     irq[dev],
+				     dma1[dev],
 				     AD1848_HW_DETECT,
 				     &chip)) < 0) {
 		snd_card_free(card);
@@ -114,7 +114,7 @@
 	strcpy(card->shortname, pcm->name);
 
 	sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
-		pcm->name, chip->port, snd_irq[dev], snd_dma1[dev]);
+		pcm->name, chip->port, irq[dev], dma1[dev]);
 
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -128,7 +128,7 @@
 {
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++)
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++)
 		if (snd_card_ad1848_probe(dev) >= 0)
 			cards++;
 
@@ -154,8 +154,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-ad1848=snd_enable,snd_index,snd_id,snd_port,
-			 snd_irq,snd_dma1 */
+/* format is: snd-ad1848=enable,index,id,port,
+			 irq,dma1 */
 
 static int __init alsa_card_ad1848_setup(char *str)
 {
@@ -163,12 +163,12 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/als100.c b/sound/isa/als100.c
--- a/sound/isa/als100.c	Wed Oct 30 16:44:21 2002
+++ b/sound/isa/als100.c	Wed Oct 30 16:44:21 2002
@@ -53,47 +53,47 @@
 	        "{Avance Logic,ALS120},"
 	        "{RTL,RTL3000}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* PnP setup */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* PnP setup */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-static int snd_dma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for als100 based soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for als100 based soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable als100 based soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
-MODULE_PARM(snd_dma16, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma16, "16-bit DMA # for als100 driver.");
-MODULE_PARM_SYNTAX(snd_dma16, SNDRV_DMA16_DESC);
+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 */
+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;	/* PnP setup */
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* PnP setup */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+static int dma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for als100 based soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for als100 based soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable als100 based soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for als100 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for als100 driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for als100 driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for als100 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for als100 driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for als100 driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
+MODULE_PARM(dma16, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma16, "16-bit DMA # for als100 driver.");
+MODULE_PARM_SYNTAX(dma16, SNDRV_DMA16_DESC);
 
 struct snd_card_als100 {
 #ifdef __ISAPNP__
@@ -165,64 +165,64 @@
 	if (pdev->prepare(pdev)<0)
 		return -EAGAIN;
 
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-	if (snd_dma8[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma8[dev],
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+	if (dma8[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma8[dev],
 			1);
-	if (snd_dma16[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma16[dev],
+	if (dma16[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma16[dev],
 			1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "AUDIO isapnp configure failure\n");
 		return -EBUSY;
 	}
 
-	snd_port[dev] = pdev->resource[0].start;
-	snd_dma8[dev] = pdev->dma_resource[1].start;
-	snd_dma16[dev] = pdev->dma_resource[0].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[0].start;
+	dma8[dev] = pdev->dma_resource[1].start;
+	dma16[dev] = pdev->dma_resource[0].start;
+	irq[dev] = pdev->irq_resource[0].start;
 
 	pdev = acard->devmpu;
 	if (pdev == NULL || pdev->prepare(pdev)<0) {
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		return 0;
 	}
 
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_mpu_port[dev],
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], mpu_port[dev],
 			2);
-	if (snd_mpu_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_mpu_irq[dev],
+	if (mpu_irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], mpu_irq[dev],
 			1);
 
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "MPU-401 isapnp configure failure\n");
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		acard->devmpu = NULL;
 	} else {
-		snd_mpu_port[dev] = pdev->resource[0].start;
-		snd_mpu_irq[dev] = pdev->irq_resource[0].start;
+		mpu_port[dev] = pdev->resource[0].start;
+		mpu_irq[dev] = pdev->irq_resource[0].start;
 	}
 
 	pdev = acard->devopl;
 	if (pdev == NULL || pdev->prepare(pdev)<0) {
-		snd_fm_port[dev] = -1;
+		fm_port[dev] = -1;
 		return 0;
 	}
 
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_fm_port[dev], 4);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], fm_port[dev], 4);
 
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "OPL isapnp configure failure\n");
-		snd_fm_port[dev] = -1;
+		fm_port[dev] = -1;
 		acard->devopl = NULL;
 	} else {
-		snd_fm_port[dev] = pdev->resource[0].start;
+		fm_port[dev] = pdev->resource[0].start;
 	}
 
 	return 0;
@@ -264,7 +264,7 @@
 	struct snd_card_als100 *acard;
 	opl3_t *opl3;
 
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(struct snd_card_als100))) == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_als100 *)card->private_data;
@@ -281,11 +281,11 @@
 	return -ENOSYS;
 #endif	/* __ISAPNP__ */
 
-	if ((error = snd_sbdsp_create(card, snd_port[dev],
-				      snd_irq[dev],
+	if ((error = snd_sbdsp_create(card, port[dev],
+				      irq[dev],
 				      snd_sb16dsp_interrupt,
-				      snd_dma8[dev],
-				      snd_dma16[dev],
+				      dma8[dev],
+				      dma16[dev],
 				      SB_HW_ALS100, &chip)) < 0) {
 		snd_card_free(card);
 		return error;
@@ -301,20 +301,20 @@
 		return error;
 	}
 
-	if (snd_mpu_port[dev] > 0) {
+	if (mpu_port[dev] > 0) {
 		if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100,
-					snd_mpu_port[dev], 0, 
-					snd_mpu_irq[dev], SA_INTERRUPT,
+					mpu_port[dev], 0, 
+					mpu_irq[dev], SA_INTERRUPT,
 					NULL) < 0)
-			printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", snd_mpu_port[dev]);
+			printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
 	}
 
-	if (snd_fm_port[dev] > 0) {
+	if (fm_port[dev] > 0) {
 		if (snd_opl3_create(card,
-				    snd_fm_port[dev], snd_fm_port[dev] + 2,
+				    fm_port[dev], fm_port[dev] + 2,
 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
 			printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n",
-				snd_fm_port[dev], snd_fm_port[dev] + 2);
+				fm_port[dev], fm_port[dev] + 2);
 		} else {
 			if ((error = snd_opl3_timer_new(opl3, 0, 1)) < 0) {
 				snd_card_free(card);
@@ -331,7 +331,7 @@
 	strcpy(card->shortname, "Avance Logic ALS100");
 	sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d&%d",
 		card->shortname, chip->name, chip->port,
-		snd_irq[dev], snd_dma8[dev], snd_dma16[dev]);
+		irq[dev], dma8[dev], dma16[dev]);
 	if ((error = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return error;
@@ -348,7 +348,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		snd_als100_isapnp_cards[dev] = card;
 		snd_als100_isapnp_id[dev] = id;
@@ -391,9 +391,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-als100=snd_enable,snd_index,snd_id,snd_port,
-			 snd_mpu_port,snd_fm_port,snd_irq,snd_mpu_irq,
-			 snd_dma8,snd_dma16 */
+/* format is: snd-als100=enable,index,id,port,
+			 mpu_port,fm_port,irq,mpu_irq,
+			 dma8,dma16 */
 
 static int __init alsa_card_als100_setup(char *str)
 {
@@ -401,16 +401,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma16[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2 &&
+	       get_option(&str,&dma16[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/azt2320.c b/sound/isa/azt2320.c
--- a/sound/isa/azt2320.c	Wed Oct 30 16:44:34 2002
+++ b/sound/isa/azt2320.c	Wed Oct 30 16:44:34 2002
@@ -62,51 +62,51 @@
 		"{Aztech Systems,AZT2320},"
 		"{Aztech Systems,AZT3000}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_wss_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for azt2320 based soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for azt2320 based soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable azt2320 based soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_wss_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_wss_port, "WSS Port # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_wss_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "1st DMA # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "2nd DMA # for azt2320 driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
+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 */
+static long wss_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+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;	/* Pnp setup */
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for azt2320 based soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for azt2320 based soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable azt2320 based soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for azt2320 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(wss_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(wss_port, "WSS Port # for azt2320 driver.");
+MODULE_PARM_SYNTAX(wss_port, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for azt2320 driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for azt2320 driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for azt2320 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for azt2320 driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "1st DMA # for azt2320 driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "2nd DMA # for azt2320 driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
 
 struct snd_card_azt2320 {
 #ifdef __ISAPNP__
@@ -174,55 +174,55 @@
 	if (pdev->prepare(pdev) < 0)
 		return -EAGAIN;
 
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_fm_port[dev], 4);
-	if (snd_wss_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[2], snd_wss_port[dev],
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], fm_port[dev], 4);
+	if (wss_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[2], wss_port[dev],
 			4);
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev],
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev],
 			1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev],
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev],
 			1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 
 	if (pdev->activate(pdev) < 0) {
 		printk(KERN_ERR PFX "AUDIO isapnp configure failure\n");
 		return -EBUSY;
 	}
 
-	snd_port[dev] = pdev->resource[0].start;
-	snd_fm_port[dev] = pdev->resource[1].start;
-	snd_wss_port[dev] = pdev->resource[2].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	snd_dma2[dev] = pdev->dma_resource[1].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[0].start;
+	fm_port[dev] = pdev->resource[1].start;
+	wss_port[dev] = pdev->resource[2].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	dma2[dev] = pdev->dma_resource[1].start;
+	irq[dev] = pdev->irq_resource[0].start;
 
 	pdev = acard->devmpu;
 	if (pdev == NULL || pdev->prepare(pdev) < 0) {
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		return 0;
 	}
 
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_mpu_port[dev],
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], mpu_port[dev],
 			2);
-	if (snd_mpu_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_mpu_irq[dev],
+	if (mpu_irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], mpu_irq[dev],
 			1);
 
 	if (pdev->activate(pdev) < 0) {
 		/* not fatal error */
 		printk(KERN_ERR PFX "MPU-401 isapnp configure failure\n");
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		acard->devmpu = NULL;
 	} else {
-		snd_mpu_port[dev] = pdev->resource[0].start;
-		snd_mpu_irq[dev] = pdev->irq_resource[0].start;
+		mpu_port[dev] = pdev->resource[0].start;
+		mpu_irq[dev] = pdev->irq_resource[0].start;
 	}
 
 	return 0;
@@ -284,7 +284,7 @@
 	cs4231_t *chip;
 	opl3_t *opl3;
 
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(struct snd_card_azt2320))) == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_azt2320 *)card->private_data;
@@ -297,15 +297,15 @@
 	}
 #endif	/* __ISAPNP__ */
 
-	if ((error = snd_card_azt2320_enable_wss(snd_port[dev]))) {
+	if ((error = snd_card_azt2320_enable_wss(port[dev]))) {
 		snd_card_free(card);
 		return error;
 	}
 
-	if ((error = snd_cs4231_create(card, snd_wss_port[dev], -1,
-				       snd_irq[dev],
-				       snd_dma1[dev],
-				       snd_dma2[dev],
+	if ((error = snd_cs4231_create(card, wss_port[dev], -1,
+				       irq[dev],
+				       dma1[dev],
+				       dma2[dev],
 				       CS4231_HW_DETECT, 0, &chip)) < 0) {
 		snd_card_free(card);
 		return error;
@@ -324,21 +324,21 @@
 		return error;
 	}
 
-	if (snd_mpu_port[dev] > 0) {
+	if (mpu_port[dev] > 0) {
 		if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320,
-				snd_mpu_port[dev], 0,
-				snd_mpu_irq[dev], SA_INTERRUPT,
+				mpu_port[dev], 0,
+				mpu_irq[dev], SA_INTERRUPT,
 				NULL) < 0)
 			printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n",
-				snd_mpu_port[dev]);
+				mpu_port[dev]);
 	}
 
-	if (snd_fm_port[dev] > 0) {
+	if (fm_port[dev] > 0) {
 		if (snd_opl3_create(card,
-				    snd_fm_port[dev], snd_fm_port[dev] + 2,
+				    fm_port[dev], fm_port[dev] + 2,
 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
 			printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n",
-				snd_fm_port[dev], snd_fm_port[dev] + 2);
+				fm_port[dev], fm_port[dev] + 2);
 		} else {
 			if ((error = snd_opl3_timer_new(opl3, 1, 2)) < 0) {
 				snd_card_free(card);
@@ -354,7 +354,7 @@
 	strcpy(card->driver, "AZT2320");
 	strcpy(card->shortname, "Aztech AZT2320");
 	sprintf(card->longname, "%s soundcard, WSS at 0x%lx, irq %i, dma %i&%i",
-		card->shortname, chip->port, snd_irq[dev], snd_dma1[dev], snd_dma2[dev]);
+		card->shortname, chip->port, irq[dev], dma1[dev], dma2[dev]);
 
 	if ((error = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -372,7 +372,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		snd_azt2320_isapnp_cards[dev] = card;
 		snd_azt2320_isapnp_id[dev] = id;
@@ -415,9 +415,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-azt2320=snd_enable,snd_index,snd_id,snd_port,
-			  snd_wss_port,snd_mpu_port,snd_fm_port,
-			  snd_irq,snd_mpu_irq,snd_dma1,snd_dma2 */
+/* format is: snd-azt2320=enable,index,id,port,
+			  wss_port,mpu_port,fm_port,
+			  irq,mpu_irq,dma1,dma2 */
 
 static int __init alsa_card_azt2320_setup(char *str)
 {
@@ -425,16 +425,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_wss_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&wss_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
--- a/sound/isa/cmi8330.c	Wed Oct 30 16:44:23 2002
+++ b/sound/isa/cmi8330.c	Wed Oct 30 16:44:23 2002
@@ -30,8 +30,8 @@
  *
  *  To quickly load the module,
  *
- *  modprobe -a snd-card-cmi8330 snd_sbport=0x220 snd_sbirq=5 snd_sbdma8=1
- *    snd_sbdma16=5 snd_wssport=0x530 snd_wssirq=11 snd_wssdma=0
+ *  modprobe -a snd-card-cmi8330 sbport=0x220 sbirq=5 sbdma8=1
+ *    sbdma16=5 wssport=0x530 wssirq=11 wssdma=0
  *
  *  This card has two mixers and two PCM devices.  I've cheesed it such
  *  that recording and playback can be done through the same device.
@@ -63,57 +63,57 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{C-Media,CMI8330,isapnp:{CMI0001,@@@0001,@X@0001}}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP;
-#ifdef __ISAPNP__
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-#endif
-static long snd_sbport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
-static int snd_sbirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
-static int snd_sbdma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
-static int snd_sbdma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
-static long snd_wssport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
-static int snd_wssirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
-static int snd_wssdma[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for CMI8330 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string  for CMI8330 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable CMI8330 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-#ifdef __ISAPNP__
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-#endif
-
-MODULE_PARM(snd_sbport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_sbport, "Port # for CMI8330 SB driver.");
-MODULE_PARM_SYNTAX(snd_sbport, SNDRV_ENABLED ",allows:{{0x220,0x280,0x20}},prefers:{0x220},base:16,dialog:list");
-MODULE_PARM(snd_sbirq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_sbirq, "IRQ # for CMI8330 SB driver.");
-MODULE_PARM_SYNTAX(snd_sbirq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10},{11},{12}},prefers:{5},dialog:list");
-MODULE_PARM(snd_sbdma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_sbdma8, "DMA8 for CMI8330 SB driver.");
-MODULE_PARM_SYNTAX(snd_sbdma8, SNDRV_DMA8_DESC ",prefers:{1}");
-MODULE_PARM(snd_sbdma16, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_sbdma16, "DMA16 for CMI8330 SB driver.");
-MODULE_PARM_SYNTAX(snd_sbdma16, SNDRV_ENABLED ",allows:{{5},{7}},prefers:{5},dialog:list");
-
-MODULE_PARM(snd_wssport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_wssport, "Port # for CMI8330 WSS driver.");
-MODULE_PARM_SYNTAX(snd_wssport, SNDRV_ENABLED ",allows:{{0x530},{0xe80,0xf40,0xc0}},prefers:{0x530},base:16,dialog:list");
-MODULE_PARM(snd_wssirq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_wssirq, "IRQ # for CMI8330 WSS driver.");
-MODULE_PARM_SYNTAX(snd_wssirq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10},{11},{12}},prefers:{11},dialog:list");
-MODULE_PARM(snd_wssdma, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_wssdma, "DMA for CMI8330 WSS driver.");
-MODULE_PARM_SYNTAX(snd_wssdma, SNDRV_DMA8_DESC ",prefers:{0}");
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP;
+#ifdef __ISAPNP__
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+#endif
+static long sbport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static int sbirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int sbdma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
+static int sbdma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
+static long wssport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static int wssirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;
+static int wssdma[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for CMI8330 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string  for CMI8330 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable CMI8330 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+#ifdef __ISAPNP__
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+#endif
+
+MODULE_PARM(sbport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(sbport, "Port # for CMI8330 SB driver.");
+MODULE_PARM_SYNTAX(sbport, SNDRV_ENABLED ",allows:{{0x220,0x280,0x20}},prefers:{0x220},base:16,dialog:list");
+MODULE_PARM(sbirq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(sbirq, "IRQ # for CMI8330 SB driver.");
+MODULE_PARM_SYNTAX(sbirq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10},{11},{12}},prefers:{5},dialog:list");
+MODULE_PARM(sbdma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(sbdma8, "DMA8 for CMI8330 SB driver.");
+MODULE_PARM_SYNTAX(sbdma8, SNDRV_DMA8_DESC ",prefers:{1}");
+MODULE_PARM(sbdma16, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(sbdma16, "DMA16 for CMI8330 SB driver.");
+MODULE_PARM_SYNTAX(sbdma16, SNDRV_ENABLED ",allows:{{5},{7}},prefers:{5},dialog:list");
+
+MODULE_PARM(wssport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(wssport, "Port # for CMI8330 WSS driver.");
+MODULE_PARM_SYNTAX(wssport, SNDRV_ENABLED ",allows:{{0x530},{0xe80,0xf40,0xc0}},prefers:{0x530},base:16,dialog:list");
+MODULE_PARM(wssirq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(wssirq, "IRQ # for CMI8330 WSS driver.");
+MODULE_PARM_SYNTAX(wssirq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10},{11},{12}},prefers:{11},dialog:list");
+MODULE_PARM(wssdma, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver.");
+MODULE_PARM_SYNTAX(wssdma, SNDRV_DMA8_DESC ",prefers:{0}");
 
 #define CMI8330_RMUX3D    16
 #define CMI8330_MUTEMUX   17
@@ -238,20 +238,20 @@
 	if (pdev->prepare(pdev)<0)
 		return -EAGAIN;
 	/* allocate AD1848 resources */
-	if (snd_wssport[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_wssport[dev], 8);
-	if (snd_wssdma[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_wssdma[dev], 1);
-	if (snd_wssirq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_wssirq[dev], 1);
+	if (wssport[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], wssport[dev], 8);
+	if (wssdma[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], wssdma[dev], 1);
+	if (wssirq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], wssirq[dev], 1);
 
 	if (pdev->activate(pdev)<0) {
 		snd_printk("(AD1848) PnP configure failure\n");
 		return -EBUSY;
 	}
-	snd_wssport[dev] = pdev->resource[0].start;
-	snd_wssdma[dev] = pdev->dma_resource[0].start;
-	snd_wssirq[dev] = pdev->irq_resource[0].start;
+	wssport[dev] = pdev->resource[0].start;
+	wssdma[dev] = pdev->dma_resource[0].start;
+	wssirq[dev] = pdev->irq_resource[0].start;
 
 	/* allocate SB16 resources */
 	pdev = acard->play;
@@ -259,24 +259,24 @@
 		acard->cap->deactivate(acard->cap);
 		return -EAGAIN;
 	}
-	if (snd_sbport[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_sbport[dev], 16);
-	if (snd_sbdma8[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_sbdma8[dev], 1);
-	if (snd_sbdma16[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_sbdma16[dev], 1);
-	if (snd_sbirq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_sbirq[dev], 1);
+	if (sbport[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], sbport[dev], 16);
+	if (sbdma8[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], sbdma8[dev], 1);
+	if (sbdma16[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], sbdma16[dev], 1);
+	if (sbirq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], sbirq[dev], 1);
 
 	if (pdev->activate(pdev)<0) {
 		snd_printk("CMI8330/C3D (SB16) PnP configure failure\n");
 		acard->cap->deactivate(acard->cap);
 		return -EBUSY;
 	}
-	snd_sbport[dev] = pdev->resource[0].start;
-	snd_sbdma8[dev] = pdev->dma_resource[0].start;
-	snd_sbdma16[dev] = pdev->dma_resource[1].start;
-	snd_sbirq[dev] = pdev->irq_resource[0].start;
+	sbport[dev] = pdev->resource[0].start;
+	sbdma8[dev] = pdev->dma_resource[0].start;
+	sbdma16[dev] = pdev->dma_resource[1].start;
+	sbirq[dev] = pdev->irq_resource[0].start;
 
 	return 0;
 }
@@ -317,20 +317,20 @@
 	snd_pcm_str_t *pstr;
 
 #ifdef __ISAPNP__
-	if (!snd_isapnp[dev]) {
+	if (!isapnp[dev]) {
 #endif
-		if (snd_wssport[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_wssport\n");
+		if (wssport[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify wssport\n");
 			return -EINVAL;
 		}
-		if (snd_sbport[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_sbport\n");
+		if (sbport[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify sbport\n");
 			return -EINVAL;
 		}
 #ifdef __ISAPNP__
 	}
 #endif
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_cmi8330));
 	if (card == NULL) {
 		snd_printk("could not get a new card\n");
@@ -340,7 +340,7 @@
 	card->private_free = snd_cmi8330_free;
 
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && (err = snd_cmi8330_isapnp(dev, acard)) < 0) {
+	if (isapnp[dev] && (err = snd_cmi8330_isapnp(dev, acard)) < 0) {
 		snd_printk("PnP detection failed\n");
 		snd_card_free(card);
 		return err;
@@ -348,9 +348,9 @@
 #endif
 
 	if ((err = snd_ad1848_create(card,
-				     snd_wssport[dev] + 4,
-				     snd_wssirq[dev],
-				     snd_wssdma[dev],
+				     wssport[dev] + 4,
+				     wssirq[dev],
+				     wssdma[dev],
 				     AD1848_HW_DETECT,
 				     &chip_wss)) < 0) {
 		snd_printk("(AD1848) device busy??\n");
@@ -368,11 +368,11 @@
 		return err;
 	}
 
-	if ((err = snd_sbdsp_create(card, snd_sbport[dev],
-				    snd_sbirq[dev],
+	if ((err = snd_sbdsp_create(card, sbport[dev],
+				    sbirq[dev],
 				    snd_sb16dsp_interrupt,
-				    snd_sbdma8[dev],
-				    snd_sbdma16[dev],
+				    sbdma8[dev],
+				    sbdma16[dev],
 				    SB_HW_AUTO, &chip_sb)) < 0) {
 		snd_printk("(SB16) device busy??\n");
 		snd_card_free(card);
@@ -429,8 +429,8 @@
 	sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
 		wss_pcm->name,
 		chip_wss->port,
-		snd_wssirq[dev],
-		snd_wssdma[dev]);
+		wssirq[dev],
+		wssdma[dev]);
 
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -457,7 +457,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || !snd_isapnp[dev])
+		if (!enable[dev] || !isapnp[dev])
 			continue;
 		snd_cmi8330_isapnp_cards[dev] = card;
 		snd_cmi8330_isapnp_id[dev] = id;
@@ -476,10 +476,10 @@
 	int dev, cards = 0;
 
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (snd_cmi8330_probe(dev) >= 0)
@@ -503,11 +503,11 @@
 
 #ifndef MODULE
 
-/* format is: snd-cmi8330=snd_enable,snd_index,snd_id,snd_isapnp,
-			  snd_sbport,snd_sbirq,
-			  snd_sbdma8,snd_sbdma16,
-			  snd_wssport,snd_wssirq,
-			  snd_wssdma */
+/* format is: snd-cmi8330=enable,index,id,isapnp,
+			  sbport,sbirq,
+			  sbdma8,sbdma16,
+			  wssport,wssirq,
+			  wssdma */
 
 static int __init alsa_card_cmi8330_setup(char *str)
 {
@@ -516,20 +516,20 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_sbport[nr_dev]) == 2 &&
-	       get_option(&str,&snd_sbirq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_sbdma8[nr_dev]) == 2 &&
-	       get_option(&str,&snd_sbdma16[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_wssport[nr_dev]) == 2 &&
-	       get_option(&str,&snd_wssirq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_wssdma[nr_dev]) == 2);
+	       get_option(&str,(int *)&sbport[nr_dev]) == 2 &&
+	       get_option(&str,&sbirq[nr_dev]) == 2 &&
+	       get_option(&str,&sbdma8[nr_dev]) == 2 &&
+	       get_option(&str,&sbdma16[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&wssport[nr_dev]) == 2 &&
+	       get_option(&str,&wssirq[nr_dev]) == 2 &&
+	       get_option(&str,&wssdma[nr_dev]) == 2);
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp[nr_dev] = pnp;
+		isapnp[nr_dev] = pnp;
 #endif
 	nr_dev++;
 	return 1;
diff -Nru a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
--- a/sound/isa/cs423x/cs4231.c	Wed Oct 30 16:44:17 2002
+++ b/sound/isa/cs423x/cs4231.c	Wed Oct 30 16:44:17 2002
@@ -38,43 +38,43 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Crystal Semiconductors,CS4231}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,11,12,15 */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for CS4231 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for CS4231 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable CS4231 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for CS4231 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for CS4231 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for CS4231 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for CS4231 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for CS4231 driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for CS4231 driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+static long mpu_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 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for CS4231 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for CS4231 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable CS4231 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for CS4231 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for CS4231 driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for CS4231 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for CS4231 driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
 
 static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -87,28 +87,28 @@
 	cs4231_t *chip;
 	int err;
 
-	if (snd_port[dev] == SNDRV_AUTO_PORT) {
-		snd_printk("specify snd_port\n");
+	if (port[dev] == SNDRV_AUTO_PORT) {
+		snd_printk("specify port\n");
 		return -EINVAL;
 	}
-	if (snd_irq[dev] == SNDRV_AUTO_IRQ) {
-		snd_printk("specify snd_irq\n");
+	if (irq[dev] == SNDRV_AUTO_IRQ) {
+		snd_printk("specify irq\n");
 		return -EINVAL;
 	}
-	if (snd_dma1[dev] == SNDRV_AUTO_DMA) {
-		snd_printk("specify snd_dma1\n");
+	if (dma1[dev] == SNDRV_AUTO_DMA) {
+		snd_printk("specify dma1\n");
 		return -EINVAL;
 	}
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_cs4231 *)card->private_data;
-	if (snd_mpu_port[dev] < 0)
-		snd_mpu_port[dev] = SNDRV_AUTO_PORT;
-	if ((err = snd_cs4231_create(card, snd_port[dev], -1,
-				     snd_irq[dev],
-				     snd_dma1[dev],
-				     snd_dma2[dev],
+	if (mpu_port[dev] < 0)
+		mpu_port[dev] = SNDRV_AUTO_PORT;
+	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);
@@ -128,19 +128,19 @@
 		return err;
 	}
 
-	if (snd_mpu_irq[dev] >= 0 && snd_mpu_irq[dev] != SNDRV_AUTO_IRQ) {
+	if (mpu_irq[dev] >= 0 && mpu_irq[dev] != SNDRV_AUTO_IRQ) {
 		if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
-					snd_mpu_port[dev], 0,
-					snd_mpu_irq[dev], SA_INTERRUPT,
+					mpu_port[dev], 0,
+					mpu_irq[dev], SA_INTERRUPT,
 					NULL) < 0)
 			printk(KERN_ERR "cs4231: MPU401 not detected\n");
 	}
 	strcpy(card->driver, "CS4231");
 	strcpy(card->shortname, pcm->name);
 	sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
-		pcm->name, chip->port, snd_irq[dev], snd_dma1[dev]);
-	if (snd_dma2[dev] >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%d", snd_dma2[dev]);
+		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;
@@ -153,7 +153,7 @@
 {
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++) {
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
 		if (snd_card_cs4231_probe(dev) >= 0)
 			cards++;
 	}
@@ -179,9 +179,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-cs4231=snd_enable,snd_index,snd_id,
-			 snd_port,snd_mpu_port,snd_irq,snd_mpu_irq,
-			 snd_dma1,snd_dma2 */
+/* format is: snd-cs4231=enable,index,id,
+			 port,mpu_port,irq,mpu_irq,
+			 dma1,dma2 */
 
 static int __init alsa_card_cs4231_setup(char *str)
 {
@@ -190,16 +190,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2);
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
--- a/sound/isa/cs423x/cs4236.c	Wed Oct 30 16:44:22 2002
+++ b/sound/isa/cs423x/cs4236.c	Wed Oct 30 16:44:22 2002
@@ -84,63 +84,63 @@
 #define IDENT "CS4236+"
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-#ifdef __ISAPNP__
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-#endif
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_cport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* PnP setup */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_sb_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,11,12,15 */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable " IDENT " soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-#ifdef __ISAPNP__
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-#endif
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_cport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_cport, "Control port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_cport, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_sb_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_sb_port, "SB port # for " IDENT " driver (optional).");
-MODULE_PARM_SYNTAX(snd_sb_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for " IDENT " driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
+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 */
+#ifdef __ISAPNP__
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+#endif
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+static long cport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* PnP setup */
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+static long sb_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 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for " IDENT " soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for " IDENT " soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable " IDENT " soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+#ifdef __ISAPNP__
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+#endif
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(cport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(cport, "Control port # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(cport, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(sb_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(sb_port, "SB port # for " IDENT " driver (optional).");
+MODULE_PARM_SYNTAX(sb_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
 
 struct snd_card_cs4236 {
 	struct resource *res_sb_port;
@@ -304,76 +304,76 @@
 	pdev = acard->wss;
 	if (pdev->prepare(pdev) < 0)
 		return -EAGAIN;
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 4);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT && snd_fm_port[dev] >= 0)
-		isapnp_resource_change(&pdev->resource[1], snd_fm_port[dev], 4);
-	if (snd_sb_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[2], snd_sb_port[dev], 16);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev], 1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev] < 0 ? 4 : snd_dma2[dev], 1);
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 4);
+	if (fm_port[dev] != SNDRV_AUTO_PORT && fm_port[dev] >= 0)
+		isapnp_resource_change(&pdev->resource[1], fm_port[dev], 4);
+	if (sb_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[2], sb_port[dev], 16);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev], 1);
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev] < 0 ? 4 : dma2[dev], 1);
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR IDENT " isapnp configure failed for WSS (out of resources?)\n");
 		return -EBUSY;
 	}
-	snd_port[dev] = pdev->resource[0].start;
-	if (snd_fm_port[dev] >= 0)
-		snd_fm_port[dev] = pdev->resource[1].start;
-	snd_sb_port[dev] = pdev->resource[2].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	snd_dma2[dev] = pdev->dma_resource[1].start == 4 ? -1 : pdev->dma_resource[1].start;
+	port[dev] = pdev->resource[0].start;
+	if (fm_port[dev] >= 0)
+		fm_port[dev] = pdev->resource[1].start;
+	sb_port[dev] = pdev->resource[2].start;
+	irq[dev] = pdev->irq_resource[0].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	dma2[dev] = pdev->dma_resource[1].start == 4 ? -1 : pdev->dma_resource[1].start;
 	snd_printdd("isapnp WSS: wss port=0x%lx, fm port=0x%lx, sb port=0x%lx\n",
-			snd_port[dev], snd_fm_port[dev], snd_sb_port[dev]);
+			port[dev], fm_port[dev], sb_port[dev]);
 	snd_printdd("isapnp WSS: irq=%i, dma1=%i, dma2=%i\n",
-			snd_irq[dev], snd_dma1[dev], snd_dma2[dev]);
+			irq[dev], dma1[dev], dma2[dev]);
 	/* CTRL initialization */
-	if (acard->ctrl && snd_cport[dev] >= 0) {
+	if (acard->ctrl && cport[dev] >= 0) {
 		pdev = acard->ctrl;
 		if (pdev->prepare(pdev) < 0) {
 			acard->wss->deactivate(acard->wss);
 			return -EAGAIN;
 		}
-		if (snd_cport[dev] != SNDRV_AUTO_PORT)
-			isapnp_resource_change(&pdev->resource[0], snd_cport[dev], 8);
+		if (cport[dev] != SNDRV_AUTO_PORT)
+			isapnp_resource_change(&pdev->resource[0], cport[dev], 8);
 		if (pdev->activate(pdev)<0) {
 			printk(KERN_ERR IDENT " isapnp configure failed for control (out of resources?)\n");
 			acard->wss->deactivate(acard->wss);
 			return -EBUSY;
 		}
-		snd_cport[dev] = pdev->resource[0].start;
-		snd_printdd("isapnp CTRL: control port=0x%lx\n", snd_cport[dev]);
+		cport[dev] = pdev->resource[0].start;
+		snd_printdd("isapnp CTRL: control port=0x%lx\n", cport[dev]);
 	}
 	/* MPU initialization */
-	if (acard->mpu && snd_mpu_port[dev] >= 0) {
+	if (acard->mpu && mpu_port[dev] >= 0) {
 		pdev = acard->mpu;
 		if (pdev->prepare(pdev) < 0) {
 			acard->wss->deactivate(acard->wss);
 			acard->ctrl->deactivate(acard->ctrl);
 			return -EAGAIN;
 		}
-		if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-			isapnp_resource_change(&pdev->resource[0], snd_mpu_port[dev], 2);
-		if (snd_mpu_irq[dev] != SNDRV_AUTO_IRQ && snd_mpu_irq[dev] >= 0)
-			isapnp_resource_change(&pdev->irq_resource[0], snd_mpu_irq[dev], 1);
+		if (mpu_port[dev] != SNDRV_AUTO_PORT)
+			isapnp_resource_change(&pdev->resource[0], mpu_port[dev], 2);
+		if (mpu_irq[dev] != SNDRV_AUTO_IRQ && mpu_irq[dev] >= 0)
+			isapnp_resource_change(&pdev->irq_resource[0], mpu_irq[dev], 1);
 		if (pdev->activate(pdev)<0) {
-			snd_mpu_port[dev] = SNDRV_AUTO_PORT;
-			snd_mpu_irq[dev] = SNDRV_AUTO_IRQ;
+			mpu_port[dev] = SNDRV_AUTO_PORT;
+			mpu_irq[dev] = SNDRV_AUTO_IRQ;
 			printk(KERN_ERR IDENT " isapnp configure failed for MPU (out of resources?)\n");
 		} else {
-			snd_mpu_port[dev] = pdev->resource[0].start;
+			mpu_port[dev] = pdev->resource[0].start;
 			if ((pdev->irq_resource[0].flags & IORESOURCE_IRQ) &&
-			    snd_mpu_irq[dev] >= 0) {
-				snd_mpu_irq[dev] = pdev->irq_resource[0].start;
+			    mpu_irq[dev] >= 0) {
+				mpu_irq[dev] = pdev->irq_resource[0].start;
 			} else {
-				snd_mpu_irq[dev] = -1;	/* disable interrupt */
+				mpu_irq[dev] = -1;	/* disable interrupt */
 			}
 		}
-		snd_printdd("isapnp MPU: port=0x%lx, irq=%i\n", snd_mpu_port[dev], snd_mpu_irq[dev]);
+		snd_printdd("isapnp MPU: port=0x%lx, irq=%i\n", mpu_port[dev], mpu_irq[dev]);
 	}
 	return 0;
 }
@@ -420,52 +420,52 @@
 	int err;
 
 #ifdef __ISAPNP__
-	if (!snd_isapnp[dev]) {
+	if (!isapnp[dev]) {
 #endif
-		if (snd_port[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_port\n");
+		if (port[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify port\n");
 			return -EINVAL;
 		}
-		if (snd_cport[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_cport\n");
+		if (cport[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify cport\n");
 			return -EINVAL;
 		}
 #ifdef __ISAPNP__
 	}
 #endif
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_card_cs4236));
 	if (card == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_cs4236 *)card->private_data;
 	card->private_free = snd_card_cs4236_free;
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && (err = snd_card_cs4236_isapnp(dev, acard))<0) {
+	if (isapnp[dev] && (err = snd_card_cs4236_isapnp(dev, acard))<0) {
 		printk(KERN_ERR "isapnp detection failed and probing for " IDENT " is not supported\n");
 		snd_card_free(card);
 		return -ENXIO;
 	}
 #endif
-	if (snd_mpu_port[dev] < 0)
-		snd_mpu_port[dev] = SNDRV_AUTO_PORT;
-	if (snd_fm_port[dev] < 0)
-		snd_fm_port[dev] = SNDRV_AUTO_PORT;
-	if (snd_sb_port[dev] < 0)
-		snd_sb_port[dev] = SNDRV_AUTO_PORT;
-	if (snd_sb_port[dev] != SNDRV_AUTO_PORT)
-		if ((acard->res_sb_port = request_region(snd_sb_port[dev], 16, IDENT " SB")) == NULL) {
-			printk(KERN_ERR IDENT ": unable to register SB port at 0x%lx\n", snd_sb_port[dev]);
+	if (mpu_port[dev] < 0)
+		mpu_port[dev] = SNDRV_AUTO_PORT;
+	if (fm_port[dev] < 0)
+		fm_port[dev] = SNDRV_AUTO_PORT;
+	if (sb_port[dev] < 0)
+		sb_port[dev] = SNDRV_AUTO_PORT;
+	if (sb_port[dev] != SNDRV_AUTO_PORT)
+		if ((acard->res_sb_port = request_region(sb_port[dev], 16, IDENT " SB")) == NULL) {
+			printk(KERN_ERR IDENT ": unable to register SB port at 0x%lx\n", sb_port[dev]);
 			snd_card_free(card);
 			return -ENOMEM;
 		}
 
 #ifdef CS4232
 	if ((err = snd_cs4231_create(card,
-				     snd_port[dev],
-				     snd_cport[dev],
-				     snd_irq[dev],
-				     snd_dma1[dev],
-				     snd_dma2[dev],
+				     port[dev],
+				     cport[dev],
+				     irq[dev],
+				     dma1[dev],
+				     dma2[dev],
 				     CS4231_HW_DETECT,
 				     0,
 				     &chip)) < 0) {
@@ -483,11 +483,11 @@
 
 #else /* CS4236 */
 	if ((err = snd_cs4236_create(card,
-				     snd_port[dev],
-				     snd_cport[dev],
-				     snd_irq[dev],
-				     snd_dma1[dev],
-				     snd_dma2[dev],
+				     port[dev],
+				     cport[dev],
+				     irq[dev],
+				     dma1[dev],
+				     dma2[dev],
 				     CS4231_HW_DETECT,
 				     0,
 				     &chip)) < 0) {
@@ -509,9 +509,9 @@
 		return err;
 	}
 
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT) {
+	if (fm_port[dev] != SNDRV_AUTO_PORT) {
 		if (snd_opl3_create(card,
-				    snd_fm_port[dev], snd_fm_port[dev] + 2,
+				    fm_port[dev], fm_port[dev] + 2,
 				    OPL3_HW_OPL3_CS, 0, &opl3) < 0) {
 			printk(KERN_ERR IDENT ": OPL3 not detected\n");
 		} else {
@@ -522,11 +522,11 @@
 		}
 	}
 
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT) {
+	if (mpu_port[dev] != SNDRV_AUTO_PORT) {
 		if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
-					snd_mpu_port[dev], 0,
-					snd_mpu_irq[dev],
-					snd_mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0)
+					mpu_port[dev], 0,
+					mpu_irq[dev],
+					mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0)
 			printk(KERN_ERR IDENT ": MPU401 not detected\n");
 	}
 	strcpy(card->driver, pcm->name);
@@ -534,10 +534,10 @@
 	sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i",
 		pcm->name,
 		chip->port,
-		snd_irq[dev],
-		snd_dma1[dev]);
-	if (snd_dma1[dev] >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%d", snd_dma2[dev]);
+		irq[dev],
+		dma1[dev]);
+	if (dma1[dev] >= 0)
+		sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -554,7 +554,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		snd_cs4236_isapnp_cards[dev] = card;
 		snd_cs4236_isapnp_id[dev] = id;
@@ -573,10 +573,10 @@
 	int dev, cards = 0;
 
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (snd_card_cs4236_probe(dev) >= 0)
@@ -607,14 +607,14 @@
 
 #ifndef MODULE
 
-/* format is: snd-cs4232=snd_enable,snd_index,snd_id,snd_isapnp,snd_port,
-			 snd_cport,snd_mpu_port,snd_fm_port,snd_sb_port,
-			 snd_irq,snd_mpu_irq,snd_dma1,snd_dma1_size,
-			 snd_dma2,snd_dma2_size */
-/* format is: snd-cs4236=snd_enable,snd_index,snd_id,snd_isapnp,snd_port,
-			 snd_cport,snd_mpu_port,snd_fm_port,snd_sb_port,
-			 snd_irq,snd_mpu_irq,snd_dma1,snd_dma1_size,
-			 snd_dma2,snd_dma2_size */
+/* format is: snd-cs4232=enable,index,id,isapnp,port,
+			 cport,mpu_port,fm_port,sb_port,
+			 irq,mpu_irq,dma1,dma1_size,
+			 dma2,dma2_size */
+/* format is: snd-cs4236=enable,index,id,isapnp,port,
+			 cport,mpu_port,fm_port,sb_port,
+			 irq,mpu_irq,dma1,dma1_size,
+			 dma2,dma2_size */
 
 static int __init alsa_card_cs423x_setup(char *str)
 {
@@ -623,22 +623,22 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_cport[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_sb_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2);
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&cport[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&sb_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2);
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp[nr_dev] = pnp;
+		isapnp[nr_dev] = pnp;
 #endif
 	nr_dev++;
 	return 1;
diff -Nru a/sound/isa/dt019x.c b/sound/isa/dt019x.c
--- a/sound/isa/dt019x.c	Wed Oct 30 16:44:27 2002
+++ b/sound/isa/dt019x.c	Wed Oct 30 16:44:27 2002
@@ -48,43 +48,43 @@
 MODULE_DEVICES("{{Diamond Technologies DT-019X},"
 	       "{Avance Logic ALS-007}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* PnP setup */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* PnP setup */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for DT-019X based soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for DT-019X based soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable DT-019X based soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for dt019x driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for dt019x driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for dt019x driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for dt019x driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for dt019x driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for dt019x driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+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;	/* PnP setup */
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* PnP setup */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for DT-019X based soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for DT-019X based soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable DT-019X based soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for dt019x driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for dt019x driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for dt019x driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for dt019x driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for dt019x driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for dt019x driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
 
 struct snd_card_dt019x {
 #ifdef __ISAPNP__
@@ -152,60 +152,60 @@
 	if (!pdev || pdev->prepare(pdev)<0)
 		return -EAGAIN;
 
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-	if (snd_dma8[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma8[dev],
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+	if (dma8[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma8[dev],
 			1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "DT-019X AUDIO isapnp configure failure\n");
 		return -EBUSY;
 	}
-	snd_port[dev] = pdev->resource[0].start;
-	snd_dma8[dev] = pdev->dma_resource[0].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[0].start;
+	dma8[dev] = pdev->dma_resource[0].start;
+	irq[dev] = pdev->irq_resource[0].start;
 	snd_printdd("dt019x: found audio interface: port=0x%lx, irq=0x%lx, dma=0x%lx\n",
-			snd_port[dev],snd_irq[dev],snd_dma8[dev]);
+			port[dev],irq[dev],dma8[dev]);
 
 	pdev = acard->devmpu;
 	if (!pdev || pdev->prepare(pdev)<0) 
 		return 0;
 
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_mpu_port[dev],
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], mpu_port[dev],
 			2);
-	if (snd_mpu_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_mpu_irq[dev],
+	if (mpu_irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], mpu_irq[dev],
 			1);
 
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "DT-019X MPU-401 isapnp configure failure\n");
-		snd_mpu_port[dev] = -1;
+		mpu_port[dev] = -1;
 		acard->devmpu = NULL;
 	} else {
-		snd_mpu_port[dev] = pdev->resource[0].start;
-		snd_mpu_irq[dev] = pdev->irq_resource[0].start;
+		mpu_port[dev] = pdev->resource[0].start;
+		mpu_irq[dev] = pdev->irq_resource[0].start;
 		snd_printdd("dt019x: found MPU-401: port=0x%lx, irq=0x%lx\n",
-			 	snd_mpu_port[dev],snd_mpu_irq[dev]);
+			 	mpu_port[dev],mpu_irq[dev]);
 	}
 
 	pdev = acard->devopl;
 	if (!pdev || pdev->prepare(pdev)<0)
 		return 0;
 
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_fm_port[dev], 4);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], fm_port[dev], 4);
 
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "DT-019X OPL3 isapnp configure failure\n");
-		snd_fm_port[dev] = -1;
+		fm_port[dev] = -1;
 		acard->devopl = NULL;
 	} else {
-		snd_fm_port[dev] = pdev->resource[0].start;
-		snd_printdd("dt019x: found OPL3 synth: port=0x%lx\n",snd_fm_port[dev]);
+		fm_port[dev] = pdev->resource[0].start;
+		snd_printdd("dt019x: found OPL3 synth: port=0x%lx\n",fm_port[dev]);
 	}
 
 	return 0;
@@ -247,7 +247,7 @@
 	struct snd_card_dt019x *acard;
 	opl3_t *opl3;
 
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(struct snd_card_dt019x))) == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_dt019x *)card->private_data;
@@ -264,10 +264,10 @@
 	return -ENOSYS;
 #endif	/* __ISAPNP__ */
 
-	if ((error = snd_sbdsp_create(card, snd_port[dev],
-				      snd_irq[dev],
+	if ((error = snd_sbdsp_create(card, port[dev],
+				      irq[dev],
 				      snd_sb16dsp_interrupt,
-				      snd_dma8[dev],
+				      dma8[dev],
 				      -1,
 				      SB_HW_DT019X,
 				      &chip)) < 0) {
@@ -284,25 +284,25 @@
 		return error;
 	}
 
-	if (snd_mpu_port[dev] > 0) {
+	if (mpu_port[dev] > 0) {
 		if (snd_mpu401_uart_new(card, 0,
 /*					MPU401_HW_SB,*/
 					MPU401_HW_MPU401,
-					snd_mpu_port[dev], 0,
-					snd_mpu_irq[dev],
+					mpu_port[dev], 0,
+					mpu_irq[dev],
 					SA_INTERRUPT,
 					NULL) < 0)
 			printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n",
-				snd_mpu_port[dev]);
+				mpu_port[dev]);
 	}
 
-	if (snd_fm_port[dev] > 0) {
+	if (fm_port[dev] > 0) {
 		if (snd_opl3_create(card,
-				    snd_fm_port[dev],
-				    snd_fm_port[dev] + 2,
+				    fm_port[dev],
+				    fm_port[dev] + 2,
 				    OPL3_HW_AUTO, 0, &opl3) < 0) {
 			printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx ?\n",
-				snd_fm_port[dev], snd_fm_port[dev] + 2);
+				fm_port[dev], fm_port[dev] + 2);
 		} else {
 			if ((error = snd_opl3_timer_new(opl3, 0, 1)) < 0) {
 				snd_card_free(card);
@@ -319,7 +319,7 @@
 	strcpy(card->shortname, "Diamond Tech. DT-019X");
 	sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d",
 		card->shortname, chip->name, chip->port,
-		snd_irq[dev], snd_dma8[dev]);
+		irq[dev], dma8[dev]);
 	if ((error = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return error;
@@ -336,7 +336,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		snd_dt019x_isapnp_cards[dev] = card;
 		snd_dt019x_isapnp_id[dev] = id;
@@ -379,9 +379,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-dt019x=snd_enable,snd_index,snd_id,snd_isapnp,
-			  snd_port,snd_mpu_port,snd_fm_port,
-			  snd_irq,snd_mpu_irq,snd_dma8,snd_dma8_size */
+/* format is: snd-dt019x=enable,index,id,snd_isapnp,
+			  port,mpu_port,fm_port,
+			  irq,mpu_irq,dma8,dma8_size */
 
 static int __init alsa_card_dt019x_setup(char *str)
 {
@@ -389,15 +389,15 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
--- a/sound/isa/es1688/es1688.c	Wed Oct 30 16:44:27 2002
+++ b/sound/isa/es1688/es1688.c	Wed Oct 30 16:44:27 2002
@@ -45,39 +45,39 @@
 	        "{ESS,ES688 AudioDrive,pnp:ESS6881},"
 	        "{ESS,ES1688 AudioDrive,pnp:ESS1681}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
-static long snd_mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ESx688 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ESx688 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ESx688 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for ESx688 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for ESx688 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for ESx688 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for ESx688 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for ESx688 driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
+static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ESx688 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ESx688 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ESx688 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for ESx688 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ESx688 driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for ESx688 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for ESx688 driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for ESx688 driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
 
 static snd_card_t *snd_audiodrive_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -86,37 +86,37 @@
 {
 	static int possible_irqs[] = {5, 9, 10, 7, -1};
 	static int possible_dmas[] = {1, 3, 0, -1};
-	int irq, dma, mpu_irq;
+	int xirq, xdma, xmpu_irq;
 	snd_card_t *card;
 	es1688_t *chip;
 	opl3_t *opl3;
 	snd_pcm_t *pcm;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	irq = snd_irq[dev];
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	xirq = irq[dev];
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-	mpu_irq = snd_mpu_irq[dev];
-	dma = snd_dma8[dev];
-	if (dma == SNDRV_AUTO_DMA) {
-		if ((dma = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xmpu_irq = mpu_irq[dev];
+	xdma = dma8[dev];
+	if (xdma == SNDRV_AUTO_DMA) {
+		if ((xdma = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA\n");
 			return -EBUSY;
 		}
 	}
 
-	if ((err = snd_es1688_create(card, snd_port[dev], snd_mpu_port[dev],
-				     irq, mpu_irq, dma,
+	if ((err = snd_es1688_create(card, port[dev], mpu_port[dev],
+				     xirq, xmpu_irq, xdma,
 				     ES1688_HW_AUTO, &chip)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -139,10 +139,10 @@
 		}
 	}
 
-	if (mpu_irq >= 0) {
+	if (xmpu_irq >= 0) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688,
 					       chip->mpu_port, 0,
-					       mpu_irq,
+					       xmpu_irq,
 					       SA_INTERRUPT,
 					       NULL)) < 0) {
 			snd_card_free(card);
@@ -151,7 +151,7 @@
 	}
 	strcpy(card->driver, "ES1688");
 	strcpy(card->shortname, pcm->name);
-	sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, chip->port, irq, dma);
+	sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, chip->port, xirq, xdma);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -161,18 +161,18 @@
 
 }
 
-static int __init snd_audiodrive_legacy_auto_probe(unsigned long port)
+static int __init snd_audiodrive_legacy_auto_probe(unsigned long xport)
 {
 	static int dev;
 	int res;
 	
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
 			continue;
-		snd_port[dev] = port;
+		port[dev] = xport;
 		res = snd_audiodrive_probe(dev);
 		if (res < 0)
-			snd_port[dev] = SNDRV_AUTO_PORT;
+			port[dev] = SNDRV_AUTO_PORT;
 		return res;
 	}
 	return -ENODEV;
@@ -183,8 +183,8 @@
 	static unsigned long possible_ports[] = {0x220, 0x240, 0x260, -1};
 	int dev, cards = 0;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++) {
-		if (snd_port[dev] == SNDRV_AUTO_PORT)
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
+		if (port[dev] == SNDRV_AUTO_PORT)
 			continue;
 		if (snd_audiodrive_probe(dev) >= 0)
 			cards++;
@@ -212,10 +212,10 @@
 
 #ifndef MODULE
 
-/* format is: snd-es1688=snd_enable,snd_index,snd_id,
-			 snd_port,snd_mpu_port,
-			 snd_irq,snd_mpu_irq,
-			 snd_dma8 */
+/* format is: snd-es1688=enable,index,id,
+			 port,mpu_port,
+			 irq,mpu_irq,
+			 dma8 */
 
 static int __init alsa_card_es1688_setup(char *str)
 {
@@ -223,14 +223,14 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/es18xx.c b/sound/isa/es18xx.c
--- a/sound/isa/es18xx.c	Wed Oct 30 16:44:27 2002
+++ b/sound/isa/es18xx.c	Wed Oct 30 16:44:27 2002
@@ -1897,55 +1897,55 @@
 		"{ESS,ES1887 AudioDrive},"
 		"{ESS,ES1888 AudioDrive}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
+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 */
 #ifdef __ISAPNP__
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 #endif
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260,0x280 */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260,0x280 */
 #ifndef __ISAPNP__
-static long snd_mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
+static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
 #else
-static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static long mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
 #endif
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ES18xx soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ES18xx soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ES18xx soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-#ifdef __ISAPNP__
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-#endif
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for ES18xx driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x220,0x280,0x20}},prefers:{0x220},base:16,dialog:list");
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for ES18xx driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_ENABLED ",allows:{{0x300,0x330,0x30},{0x800,0xffe,0x2}},prefers:{0x330,0x300},base:16,dialog:combo");
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for ES18xx driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_ENABLED ",allows:{{0x388},{0x800,0xffc,0x4}},prefers:{0x388},base:16,dialog:combo");
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for ES18xx driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC ",prefers:{5}");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA 1 # for ES18xx driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA8_DESC ",prefers:{1}");
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA 2 # for ES18xx driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_ENABLED ",allows:{{0},{1},{3},{5}},dialog:list,prefers:{0}");
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
+static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ES18xx soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ES18xx soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ES18xx soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+#ifdef __ISAPNP__
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+#endif
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for ES18xx driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220,0x280,0x20}},prefers:{0x220},base:16,dialog:list");
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for ES18xx driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0x300,0x330,0x30},{0x800,0xffe,0x2}},prefers:{0x330,0x300},base:16,dialog:combo");
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for ES18xx driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0x388},{0x800,0xffc,0x4}},prefers:{0x388},base:16,dialog:combo");
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for ES18xx driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC ",prefers:{5}");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA 1 # for ES18xx driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA8_DESC ",prefers:{1}");
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_ENABLED ",allows:{{0},{1},{3},{5}},dialog:list,prefers:{0}");
 
 struct snd_audiodrive {
 #ifdef __ISAPNP__
@@ -2019,18 +2019,18 @@
 		acard->devc->deactivate(acard->devc);
 		return -EAGAIN;
 	}
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_fm_port[dev], 4);
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[2], snd_mpu_port[dev], 2);
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev], 1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev], 1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], fm_port[dev], 4);
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[2], mpu_port[dev], 2);
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev], 1);
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "isapnp configure failure (out of resources?)\n");
 		acard->devc->deactivate(acard->devc);
@@ -2040,18 +2040,18 @@
 	/* skip csn and logdev initialization - already done in isapnp_configure */
 	isapnp_cfg_begin(pdev->bus->number, pdev->devfn);
 	isapnp_write_byte(0x27, pdev->irq_resource[0].start);	/* Hardware Volume IRQ Number */
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
 		isapnp_write_byte(0x28, pdev->irq);		/* MPU-401 IRQ Number */
 	isapnp_write_byte(0x72, pdev->irq_resource[0].start);	/* second IRQ */
 	isapnp_cfg_end();
-	snd_port[dev] = pdev->resource[0].start;
-	snd_fm_port[dev] = pdev->resource[1].start;
-	snd_mpu_port[dev] = pdev->resource[2].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	snd_dma2[dev] = pdev->dma_resource[1].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
-	snd_printdd("isapnp ES18xx: port=0x%lx, fm port=0x%lx, mpu port=0x%lx\n", snd_port[dev], snd_fm_port[dev], snd_mpu_port[dev]);
-	snd_printdd("isapnp ES18xx: dma1=%i, dma2=%i, irq=%i\n", snd_dma1[dev], snd_dma2[dev], snd_irq[dev]);
+	port[dev] = pdev->resource[0].start;
+	fm_port[dev] = pdev->resource[1].start;
+	mpu_port[dev] = pdev->resource[2].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	dma2[dev] = pdev->dma_resource[1].start;
+	irq[dev] = pdev->irq_resource[0].start;
+	snd_printdd("isapnp ES18xx: port=0x%lx, fm port=0x%lx, mpu port=0x%lx\n", port[dev], fm_port[dev], mpu_port[dev]);
+	snd_printdd("isapnp ES18xx: dma1=%i, dma2=%i, irq=%i\n", dma1[dev], dma2[dev], irq[dev]);
 	return 0;
 }
 
@@ -2083,7 +2083,7 @@
 {
 	static int possible_irqs[] = {5, 9, 10, 7, 11, 12, -1};
 	static int possible_dmas[] = {1, 0, 3, 5, -1};
-	int irq, dma1, dma2;
+	int xirq, xdma1, xdma2;
 	snd_card_t *card;
 	struct snd_audiodrive *acard;
 	snd_rawmidi_t *rmidi = NULL;
@@ -2091,38 +2091,38 @@
 	opl3_t *opl3;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_audiodrive));
 	if (card == NULL)
 		return -ENOMEM;
 	acard = (struct snd_audiodrive *)card->private_data;
 	card->private_free = snd_audiodrive_free;
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && (err = snd_audiodrive_isapnp(dev, acard)) < 0) {
+	if (isapnp[dev] && (err = snd_audiodrive_isapnp(dev, acard)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
 #endif
 
-	irq = snd_irq[dev];
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	xirq = irq[dev];
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-        dma1 = snd_dma1[dev];
-        if (dma1 == SNDRV_AUTO_DMA) {
-                if ((dma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma1 = dma1[dev];
+        if (xdma1 == SNDRV_AUTO_DMA) {
+                if ((xdma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
                         snd_card_free(card);
                         snd_printk("unable to find a free DMA1\n");
                         return -EBUSY;
                 }
         }
-        dma2 = snd_dma2[dev];
-        if (dma2 == SNDRV_AUTO_DMA) {
-                if ((dma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma2 = dma2[dev];
+        if (xdma2 == SNDRV_AUTO_DMA) {
+                if ((xdma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
                         snd_card_free(card);
                         snd_printk("unable to find a free DMA2\n");
                         return -EBUSY;
@@ -2130,10 +2130,10 @@
         }
 
 	if ((err = snd_es18xx_new_device(card,
-					 snd_port[dev],
-					 snd_mpu_port[dev],
-					 snd_fm_port[dev],
-					 irq, dma1, dma2,
+					 port[dev],
+					 mpu_port[dev],
+					 fm_port[dev],
+					 xirq, xdma1, xdma2,
 					 &chip)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -2147,7 +2147,7 @@
 		return err;
 	}
 
-	if (snd_fm_port[dev] > 0 && snd_fm_port[dev] != SNDRV_AUTO_PORT) {
+	if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
 		if (snd_opl3_create(card, chip->fm_port, chip->fm_port + 2, OPL3_HW_OPL3, 0, &opl3) < 0) {
 			printk(KERN_ERR PFX "opl3 not detected at 0x%lx\n", chip->fm_port);
 		} else {
@@ -2158,10 +2158,10 @@
 		}
 	}
 
-	if (snd_mpu_port[dev] > 0 && snd_mpu_port[dev] != SNDRV_AUTO_PORT) {
+	if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES18XX,
 					       chip->mpu_port, 0,
-					       irq, 0,
+					       xirq, 0,
 					       &rmidi)) < 0) {
 			snd_card_free(card);
 			return err;
@@ -2184,7 +2184,7 @@
 	sprintf(card->longname, "%s at 0x%lx, irq %d, dma1 %d, dma2 %d",
 		card->shortname,
 		chip->port,
-		irq, dma1, dma2);
+		xirq, xdma1, xdma2);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -2193,22 +2193,22 @@
 	return 0;
 }
 
-static int __init snd_audiodrive_probe_legacy_port(unsigned long port)
+static int __init snd_audiodrive_probe_legacy_port(unsigned long xport)
 {
 	static int dev;
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
-		snd_port[dev] = port;
+		port[dev] = xport;
 		res = snd_audiodrive_probe(dev);
 		if (res < 0)
-			snd_port[dev] = SNDRV_AUTO_PORT;
+			port[dev] = SNDRV_AUTO_PORT;
 		return res;
 	}
 	return -ENODEV;
@@ -2223,7 +2223,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || !snd_isapnp[dev])
+		if (!enable[dev] || !isapnp[dev])
 			continue;
 		snd_audiodrive_isapnp_cards[dev] = card;
                 snd_audiodrive_isapnp_id[dev] = id;
@@ -2245,10 +2245,10 @@
 
 	/* legacy non-auto cards at first */
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] == SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] == SNDRV_AUTO_PORT)
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (snd_audiodrive_probe(dev) >= 0)
@@ -2282,9 +2282,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-es18xx=snd_enable,snd_index,snd_id,snd_isapnp,
-			 snd_port,snd_mpu_port,snd_fm_port,snd_irq,
-			 snd_dma1,snd_dma2 */
+/* format is: snd-es18xx=enable,index,id,isapnp,
+			 port,mpu_port,fm_port,irq,
+			 dma1,dma2 */
 
 static int __init alsa_card_es18xx_setup(char *str)
 {
@@ -2293,19 +2293,19 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2);
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2);
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp[nr_dev] = pnp;
+		isapnp[nr_dev] = pnp;
 #endif
 	nr_dev++;
 	return 1;
diff -Nru a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
--- a/sound/isa/gus/gusclassic.c	Wed Oct 30 16:44:36 2002
+++ b/sound/isa/gus/gusclassic.c	Wed Oct 30 16:44:36 2002
@@ -38,48 +38,48 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Gravis,UltraSound Classic}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x230,0x240,0x250,0x260 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 3,5,9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
-static int snd_joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x230,0x240,0x250,0x260 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 3,5,9,11,12,15 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
+static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
+static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
 				/* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
-static int snd_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
-static int snd_pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
+static int channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
+static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
 
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for GUS Classic soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for GUS Classic soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable GUS Classic soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x220,0x260,0x10}},dialog:list");
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
-MODULE_PARM(snd_joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}");
-MODULE_PARM(snd_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_channels, "GF1 channels for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_channels,  SNDRV_ENABLED ",allows:{{14,32}}");
-MODULE_PARM(snd_pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_channels, "Reserved PCM channels for GUS Classic driver.");
-MODULE_PARM_SYNTAX(snd_pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for GUS Classic soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for GUS Classic soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable GUS Classic soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for GUS Classic driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220,0x260,0x10}},dialog:list");
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for GUS Classic driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for GUS Classic driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for GUS Classic driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
+MODULE_PARM(joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS Classic driver.");
+MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}");
+MODULE_PARM(channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(channels, "GF1 channels for GUS Classic driver.");
+MODULE_PARM_SYNTAX(channels,  SNDRV_ENABLED ",allows:{{14,32}}");
+MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Classic driver.");
+MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
 
 static snd_card_t *snd_gusclassic_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -125,45 +125,45 @@
 	gus->equal_irq = 0;
 	gus->codec_flag = 0;
 	gus->max_flag = 0;
-	gus->joystick_dac = snd_joystick_dac[dev];
+	gus->joystick_dac = joystick_dac[dev];
 }
 
 static int __init snd_gusclassic_probe(int dev)
 {
 	static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
 	static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
-	int irq, dma1, dma2;
+	int xirq, xdma1, xdma2;
 	snd_card_t *card;
 	struct snd_gusclassic *guscard;
 	snd_gus_card_t *gus = NULL;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	guscard = (struct snd_gusclassic *)card->private_data;
-	if (snd_pcm_channels[dev] < 2)
-		snd_pcm_channels[dev] = 2;
+	if (pcm_channels[dev] < 2)
+		pcm_channels[dev] = 2;
 
-	irq = snd_irq[dev];
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	xirq = irq[dev];
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-	dma1 = snd_dma1[dev];
-	if (dma1 == SNDRV_AUTO_DMA) {
-		if ((dma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma1 = dma1[dev];
+	if (xdma1 == SNDRV_AUTO_DMA) {
+		if ((xdma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA1\n");
 			return -EBUSY;
 		}
 	}
-	dma2 = snd_dma2[dev];
-	if (dma2 == SNDRV_AUTO_DMA) {
-		if ((dma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma2 = dma2[dev];
+	if (xdma2 == SNDRV_AUTO_DMA) {
+		if ((xdma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA2\n");
 			return -EBUSY;
@@ -172,9 +172,9 @@
 
 
 	if ((err = snd_gus_create(card,
-				  snd_port[dev],
-				  irq, dma1, dma2,
-			          0, snd_channels[dev], snd_pcm_channels[dev],
+				  port[dev],
+				  xirq, xdma1, xdma2,
+			          0, channels[dev], pcm_channels[dev],
 			          0, &gus)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -207,9 +207,9 @@
 			return err;
 		}
 	}
-	sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, irq, dma1);
+	sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, xirq, xdma1);
 	if (dma2 >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%d", dma2);
+		sprintf(card->longname + strlen(card->longname), "&%d", xdma2);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -218,18 +218,18 @@
 	return 0;
 }
 
-static int __init snd_gusclassic_legacy_auto_probe(unsigned long port)
+static int __init snd_gusclassic_legacy_auto_probe(unsigned long xport)
 {
 	static int dev;
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
 			continue;
-		snd_port[dev] = port;
+		port[dev] = xport;
 		res = snd_gusclassic_probe(dev);
 		if (res < 0)
-			snd_port[dev] = SNDRV_AUTO_PORT;
+			port[dev] = SNDRV_AUTO_PORT;
 		return res;
 	}
 	return -ENODEV;
@@ -240,8 +240,8 @@
 	static unsigned long possible_ports[] = {0x220, 0x230, 0x240, 0x250, 0x260, -1};
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++) {
-		if (snd_port[dev] == SNDRV_AUTO_PORT)
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
+		if (port[dev] == SNDRV_AUTO_PORT)
 			continue;
 		if (snd_gusclassic_probe(dev) >= 0)
 			cards++;
@@ -269,11 +269,11 @@
 
 #ifndef MODULE
 
-/* format is: snd-gusclassic=snd_enable,snd_index,snd_id,
-			     snd_port,snd_irq,
-			     snd_dma1,snd_dma2,
-			     snd_joystick_dac,
-			     snd_channels,snd_pcm_channels */
+/* format is: snd-gusclassic=enable,index,id,
+			     port,irq,
+			     dma1,dma2,
+			     joystick_dac,
+			     channels,pcm_channels */
 
 static int __init alsa_card_gusclassic_setup(char *str)
 {
@@ -281,16 +281,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2 &&
-	       get_option(&str,&snd_joystick_dac[nr_dev]) == 2 &&
-	       get_option(&str,&snd_channels[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_channels[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2 &&
+	       get_option(&str,&joystick_dac[nr_dev]) == 2 &&
+	       get_option(&str,&channels[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_channels[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
--- a/sound/isa/gus/gusextreme.c	Wed Oct 30 16:44:30 2002
+++ b/sound/isa/gus/gusextreme.c	Wed Oct 30 16:44:30 2002
@@ -41,64 +41,64 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Gravis,UltraSound Extreme}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
-static long snd_gf1_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x210,0x220,0x230,0x240,0x250,0x260,0x270 */
-static long snd_mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x300,0x310,0x320 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_gf1_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 2,3,5,9,11,12,15 */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
-static int snd_joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
+static long gf1_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x210,0x220,0x230,0x240,0x250,0x260,0x270 */
+static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x300,0x310,0x320 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int gf1_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 2,3,5,9,11,12,15 */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
+static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
 				/* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
-static int snd_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
-static int snd_pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
+static int channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
+static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
 
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for GUS Extreme soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for GUS Extreme soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable GUS Extreme soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x220,0x260,0x20}},dialog:list");
-MODULE_PARM(snd_gf1_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_gf1_port, "GF1 port # for GUS Extreme driver (optional).");
-MODULE_PARM_SYNTAX(snd_gf1_port, SNDRV_ENABLED ",allows:{{0x210,0x270,0x10}},dialog:list");
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_ENABLED ",allows:{{0x300,0x320,0x10}},dialog:list");
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10}},dialog:list");
-MODULE_PARM(snd_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 IRQ # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10}},dialog:list");
-MODULE_PARM(snd_gf1_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_gf1_irq, "GF1 IRQ # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_gf1_irq, SNDRV_ENABLED ",allows:{{2},{3},{5},{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "GF1 DMA # for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}");
-MODULE_PARM(snd_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_channels, "GF1 channels for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_channels, SNDRV_ENABLED ",allows:{{14,32}}");
-MODULE_PARM(snd_pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_channels, "Reserved PCM channels for GUS Extreme driver.");
-MODULE_PARM_SYNTAX(snd_pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for GUS Extreme soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for GUS Extreme soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable GUS Extreme soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220,0x260,0x20}},dialog:list");
+MODULE_PARM(gf1_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(gf1_port, "GF1 port # for GUS Extreme driver (optional).");
+MODULE_PARM_SYNTAX(gf1_port, SNDRV_ENABLED ",allows:{{0x210,0x270,0x10}},dialog:list");
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0x300,0x320,0x10}},dialog:list");
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10}},dialog:list");
+MODULE_PARM(mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{10}},dialog:list");
+MODULE_PARM(gf1_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(gf1_irq, "GF1 IRQ # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(gf1_irq, SNDRV_ENABLED ",allows:{{2},{3},{5},{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "GF1 DMA # for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}");
+MODULE_PARM(channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(channels, SNDRV_ENABLED ",allows:{{14,32}}");
+MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver.");
+MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
 
 static snd_card_t *snd_gusextreme_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -128,11 +128,11 @@
 	snd_es1688_mixer_write(es1688, 0x40, 0x0b);	/* don't change!!! */
 	spin_unlock_irqrestore(&es1688->mixer_lock, flags);
 	spin_lock_irqsave(&es1688->reg_lock, flags);
-	outb(snd_gf1_port[dev] & 0x040 ? 2 : 0, ES1688P(es1688, INIT1));
+	outb(gf1_port[dev] & 0x040 ? 2 : 0, ES1688P(es1688, INIT1));
 	outb(0, 0x201);
-	outb(snd_gf1_port[dev] & 0x020 ? 2 : 0, ES1688P(es1688, INIT1));
+	outb(gf1_port[dev] & 0x020 ? 2 : 0, ES1688P(es1688, INIT1));
 	outb(0, 0x201);
-	outb(snd_gf1_port[dev] & 0x010 ? 3 : 1, ES1688P(es1688, INIT1));
+	outb(gf1_port[dev] & 0x010 ? 3 : 1, ES1688P(es1688, INIT1));
 	spin_unlock_irqrestore(&es1688->reg_lock, flags);
 
 	udelay(100);
@@ -173,7 +173,7 @@
 
 static void __init snd_gusextreme_init(int dev, snd_gus_card_t * gus)
 {
-	gus->joystick_dac = snd_joystick_dac[dev];
+	gus->joystick_dac = joystick_dac[dev];
 }
 
 static int __init snd_gusextreme_mixer(es1688_t *chip)
@@ -204,7 +204,7 @@
 	static int possible_ess_dmas[] = {1, 3, 0, -1};
 	static int possible_gf1_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
 	static int possible_gf1_dmas[] = {5, 6, 7, 1, 3, -1};
-	int gf1_irq, gf1_dma, ess_irq, mpu_irq, ess_dma;
+	int xgf1_irq, xgf1_dma, xess_irq, xmpu_irq, xess_dma;
 	snd_card_t *card;
 	struct snd_gusextreme *acard;
 	snd_gus_card_t *gus;
@@ -212,64 +212,64 @@
 	opl3_t *opl3;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	acard = (struct snd_gusextreme *)card->private_data;
 
-	gf1_irq = snd_gf1_irq[dev];
-	if (gf1_irq == SNDRV_AUTO_IRQ) {
-		if ((gf1_irq = snd_legacy_find_free_irq(possible_gf1_irqs)) < 0) {
+	xgf1_irq = gf1_irq[dev];
+	if (xgf1_irq == SNDRV_AUTO_IRQ) {
+		if ((xgf1_irq = snd_legacy_find_free_irq(possible_gf1_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ for GF1\n");
 			return -EBUSY;
 		}
 	}
-	ess_irq = snd_irq[dev];
-	if (ess_irq == SNDRV_AUTO_IRQ) {
-		if ((ess_irq = snd_legacy_find_free_irq(possible_ess_irqs)) < 0) {
+	xess_irq = irq[dev];
+	if (xess_irq == SNDRV_AUTO_IRQ) {
+		if ((xess_irq = snd_legacy_find_free_irq(possible_ess_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ for ES1688\n");
 			return -EBUSY;
 		}
 	}
-	if (snd_mpu_port[dev] == SNDRV_AUTO_PORT)
-		snd_mpu_port[dev] = 0;
-	mpu_irq = snd_mpu_irq[dev];
-	if (mpu_irq > 15)
-		mpu_irq = -1;
-	gf1_dma = snd_dma1[dev];
-	if (gf1_dma == SNDRV_AUTO_DMA) {
-		if ((gf1_dma = snd_legacy_find_free_dma(possible_gf1_dmas)) < 0) {
+	if (mpu_port[dev] == SNDRV_AUTO_PORT)
+		mpu_port[dev] = 0;
+	xmpu_irq = mpu_irq[dev];
+	if (xmpu_irq > 15)
+		xmpu_irq = -1;
+	xgf1_dma = dma1[dev];
+	if (xgf1_dma == SNDRV_AUTO_DMA) {
+		if ((xgf1_dma = snd_legacy_find_free_dma(possible_gf1_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA for GF1\n");
 			return -EBUSY;
 		}
 	}
-	ess_dma = snd_dma8[dev];
-	if (ess_dma == SNDRV_AUTO_DMA) {
-		if ((ess_dma = snd_legacy_find_free_dma(possible_ess_dmas)) < 0) {
+	xess_dma = dma8[dev];
+	if (xess_dma == SNDRV_AUTO_DMA) {
+		if ((xess_dma = snd_legacy_find_free_dma(possible_ess_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA for ES1688\n");
 			return -EBUSY;
 		}
 	}
 
-	if ((err = snd_es1688_create(card, snd_port[dev], snd_mpu_port[dev],
-				     ess_irq, mpu_irq, ess_dma,
+	if ((err = snd_es1688_create(card, port[dev], mpu_port[dev],
+				     xess_irq, xmpu_irq, xess_dma,
 				     ES1688_HW_1688, &es1688)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
-	if (snd_gf1_port[dev] < 0)
-		snd_gf1_port[dev] = snd_port[dev] + 0x20;
+	if (gf1_port[dev] < 0)
+		gf1_port[dev] = port[dev] + 0x20;
 	if ((err = snd_gus_create(card,
-				  snd_gf1_port[dev],
-				  gf1_irq,
-				  gf1_dma,
+				  gf1_port[dev],
+				  xgf1_irq,
+				  xgf1_dma,
 				  -1,
-				  0, snd_channels[dev],
-				  snd_pcm_channels[dev], 0,
+				  0, channels[dev],
+				  pcm_channels[dev], 0,
 				  &gus)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -297,7 +297,7 @@
 		return err;
 	}
 	snd_component_add(card, "ES1688");
-	if (snd_pcm_channels[dev] > 0) {
+	if (pcm_channels[dev] > 0) {
 		if ((err = snd_gf1_pcm_new(gus, 1, 1, NULL)) < 0) {
 			snd_card_free(card);
 			return err;
@@ -325,7 +325,7 @@
 	if (es1688->mpu_port >= 0x300) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688,
 					       es1688->mpu_port, 0,
-					       mpu_irq,
+					       xmpu_irq,
 					       SA_INTERRUPT,
 					       NULL)) < 0) {
 			snd_card_free(card);
@@ -334,7 +334,7 @@
 	}
 
 	sprintf(card->longname, "Gravis UltraSound Extreme at 0x%lx, irq %i&%i, dma %i&%i",
-		es1688->port, gf1_irq, ess_irq, gf1_dma, ess_dma);
+		es1688->port, xgf1_irq, xess_irq, xgf1_dma, xess_dma);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -343,18 +343,18 @@
 	return 0;
 }
 
-static int __init snd_gusextreme_legacy_auto_probe(unsigned long port)
+static int __init snd_gusextreme_legacy_auto_probe(unsigned long xport)
 {
         static int dev;
         int res;
 
         for ( ; dev < SNDRV_CARDS; dev++) {
-                if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+                if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
                         continue;
-                snd_port[dev] = port;
+                port[dev] = xport;
                 res = snd_gusextreme_probe(dev);
                 if (res < 0)
-                        snd_port[dev] = SNDRV_AUTO_PORT;
+                        port[dev] = SNDRV_AUTO_PORT;
                 return res;
         }
         return -ENODEV;
@@ -365,8 +365,8 @@
 	static unsigned long possible_ports[] = {0x220, 0x240, 0x260, -1};
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev] > 0; dev++) {
-		if (snd_port[dev] == SNDRV_AUTO_PORT)
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev] > 0; dev++) {
+		if (port[dev] == SNDRV_AUTO_PORT)
 			continue;
 		if (snd_gusextreme_probe(dev) >= 0)
 			cards++;
@@ -401,12 +401,12 @@
 
 #ifndef MODULE
 
-/* format is: snd-gusextreme=snd_enable,snd_index,snd_id,
-			     snd_port,snd_gf1_port,snd_mpu_port,
-			     snd_irq,snd_gf1_irq,snd_mpu_irq,
-			     snd_dma8,snd_dma1,
-			     snd_joystick_dac,
-			     snd_channels,snd_pcm_channels */
+/* format is: snd-gusextreme=enable,index,id,
+			     port,gf1_port,mpu_port,
+			     irq,gf1_irq,mpu_irq,
+			     dma8,dma1,
+			     joystick_dac,
+			     channels,pcm_channels */
 
 static int __init alsa_card_gusextreme_setup(char *str)
 {
@@ -414,17 +414,17 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_gf1_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_gf1_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&gf1_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&gf1_irq[nr_dev]) == 2 &&
+	       get_option(&str,&mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
--- a/sound/isa/gus/gusmax.c	Wed Oct 30 16:44:29 2002
+++ b/sound/isa/gus/gusmax.c	Wed Oct 30 16:44:29 2002
@@ -39,48 +39,48 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Gravis,UltraSound MAX}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x230,0x240,0x250,0x260 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 2,3,5,9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
-static int snd_joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x230,0x240,0x250,0x260 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 2,3,5,9,11,12,15 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
+static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
+static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
 				/* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
-static int snd_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
-static int snd_pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
+static int channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
+static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
 
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for GUS MAX soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for GUS MAX soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable GUS MAX soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x220},{0x230},{0x240},{0x250},{0x260}},dialog:list");
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
-MODULE_PARM(snd_joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}");
-MODULE_PARM(snd_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_channels, "Used GF1 channels for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_channels, SNDRV_ENABLED ",allows:{{14,32}}");
-MODULE_PARM(snd_pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_channels, "Reserved PCM channels for GUS MAX driver.");
-MODULE_PARM_SYNTAX(snd_pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for GUS MAX soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for GUS MAX soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable GUS MAX soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for GUS MAX driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220},{0x230},{0x240},{0x250},{0x260}},dialog:list");
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for GUS MAX driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for GUS MAX driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for GUS MAX driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
+MODULE_PARM(joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for GUS MAX driver.");
+MODULE_PARM_SYNTAX(joystick_dac, SNDRV_ENABLED ",allows:{{0,31}}");
+MODULE_PARM(channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(channels, "Used GF1 channels for GUS MAX driver.");
+MODULE_PARM_SYNTAX(channels, SNDRV_ENABLED ",allows:{{14,32}}");
+MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS MAX driver.");
+MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
 
 struct snd_gusmax {
 	int irq;
@@ -151,7 +151,7 @@
 {
 	gus->equal_irq = 1;
 	gus->codec_flag = 1;
-	gus->joystick_dac = snd_joystick_dac[dev];
+	gus->joystick_dac = joystick_dac[dev];
 	/* init control register */
 	gus->max_cntrl_val = (gus->gf1.port >> 4) & 0x0f;
 	if (gus->gf1.dma1 > 3)
@@ -228,13 +228,13 @@
 {
 	static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
 	static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
-	int irq, dma1, dma2, err;
+	int xirq, xdma1, xdma2, err;
 	snd_card_t *card;
 	snd_gus_card_t *gus = NULL;
 	cs4231_t *cs4231;
 	struct snd_gusmax *maxcard;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_gusmax));
 	if (card == NULL)
 		return -ENOMEM;
@@ -243,25 +243,25 @@
 	maxcard->card = card;
 	maxcard->irq = -1;
 	
-	irq = snd_irq[dev];
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	xirq = irq[dev];
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-	dma1 = snd_dma1[dev];
-	if (dma1 == SNDRV_AUTO_DMA) {
-		if ((dma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma1 = dma1[dev];
+	if (xdma1 == SNDRV_AUTO_DMA) {
+		if ((xdma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA1\n");
 			return -EBUSY;
 		}
 	}
-	dma2 = snd_dma2[dev];
-	if (dma2 == SNDRV_AUTO_DMA) {
-		if ((dma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma2 = dma2[dev];
+	if (xdma2 == SNDRV_AUTO_DMA) {
+		if ((xdma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA2\n");
 			return -EBUSY;
@@ -269,10 +269,10 @@
 	}
 
 	if ((err = snd_gus_create(card,
-				  snd_port[dev],
-				  -irq, dma1, dma2,
-				  0, snd_channels[dev],
-				  snd_pcm_channels[dev],
+				  port[dev],
+				  -xirq, xdma1, xdma2,
+				  0, channels[dev],
+				  pcm_channels[dev],
 				  0, &gus)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -294,16 +294,16 @@
 		return -ENODEV;
 	}
 
-	if (request_irq(irq, snd_gusmax_interrupt, SA_INTERRUPT, "GUS MAX", (void *)maxcard)) {
+	if (request_irq(xirq, snd_gusmax_interrupt, SA_INTERRUPT, "GUS MAX", (void *)maxcard)) {
 		snd_card_free(card);
-		printk(KERN_ERR "gusmax: unable to grab IRQ %d\n", irq);
+		printk(KERN_ERR "gusmax: unable to grab IRQ %d\n", xirq);
 		return -EBUSY;
 	}
-	maxcard->irq = irq;
+	maxcard->irq = xirq;
 	
 	if ((err = snd_cs4231_create(card,
-				     gus->gf1.port + 0x10c, -1, irq,
-				     dma2 < 0 ? dma1 : dma2, dma1,
+				     gus->gf1.port + 0x10c, -1, xirq,
+				     xdma2 < 0 ? xdma1 : xdma2, xdma1,
 				     CS4231_HW_DETECT,
 				     CS4231_HWSHARE_IRQ |
 				     CS4231_HWSHARE_DMA1 |
@@ -324,7 +324,7 @@
 		snd_card_free(card);
 		return err;
 	}
-	if (snd_pcm_channels[dev] > 0) {
+	if (pcm_channels[dev] > 0) {
 		if ((err = snd_gf1_pcm_new(gus, 1, 1, NULL)) < 0) {
 			snd_card_free(card);
 			return err;
@@ -340,9 +340,9 @@
 		return err;
 	}
 
-	sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %i, dma %i", gus->gf1.port, irq, dma1);
-	if (dma2 >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%i", dma2);
+	sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %i, dma %i", gus->gf1.port, xirq, xdma1);
+	if (xdma2 >= 0)
+		sprintf(card->longname + strlen(card->longname), "&%i", xdma2);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -354,18 +354,18 @@
 	return 0;
 }
 
-static int __init snd_gusmax_legacy_auto_probe(unsigned long port)
+static int __init snd_gusmax_legacy_auto_probe(unsigned long xport)
 {
 	static int dev;
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
 			continue;
-		snd_port[dev] = port;
+		port[dev] = xport;
 		res = snd_gusmax_probe(dev);
 		if (res < 0)
-			snd_port[dev] = SNDRV_AUTO_PORT;
+			port[dev] = SNDRV_AUTO_PORT;
 		return res;
 	}
 	return -ENODEV;
@@ -376,8 +376,8 @@
 	static unsigned long possible_ports[] = {0x220, 0x230, 0x240, 0x250, 0x260, -1};
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev] > 0; dev++) {
-		if (snd_port[dev] == SNDRV_AUTO_PORT)
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev] > 0; dev++) {
+		if (port[dev] == SNDRV_AUTO_PORT)
 			continue;
 		if (snd_gusmax_probe(dev) >= 0)
 			cards++;
@@ -405,11 +405,11 @@
 
 #ifndef MODULE
 
-/* format is: snd-gusmax=snd_enable,snd_index,snd_id,
-			 snd_port,snd_irq,
-			 snd_dma1,snd_dma2,
-			 snd_joystick_dac,
-			 snd_channels,snd_pcm_channels */
+/* format is: snd-gusmax=enable,index,id,
+			 port,irq,
+			 dma1,dma2,
+			 joystick_dac,
+			 channels,pcm_channels */
 
 static int __init alsa_card_gusmax_setup(char *str)
 {
@@ -417,16 +417,16 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2 &&
-	       get_option(&str,&snd_joystick_dac[nr_dev]) == 2 &&
-	       get_option(&str,&snd_channels[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_channels[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2 &&
+	       get_option(&str,&joystick_dac[nr_dev]) == 2 &&
+	       get_option(&str,&channels[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_channels[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
--- a/sound/isa/gus/interwave.c	Wed Oct 30 16:44:29 2002
+++ b/sound/isa/gus/interwave.c	Wed Oct 30 16:44:29 2002
@@ -59,66 +59,66 @@
 MODULE_DEVICES("{{AMD,InterWave STB with TEA6330T}}");
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
+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 */
 #ifdef __ISAPNP__
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 #endif
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x210,0x220,0x230,0x240,0x250,0x260 */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x210,0x220,0x230,0x240,0x250,0x260 */
 #ifdef SNDRV_STB
-static long snd_port_tc[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x350,0x360,0x370,0x380 */
+static long port_tc[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x350,0x360,0x370,0x380 */
 #endif
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 2,3,5,9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3,5,6,7 */
-static int snd_joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 2,3,5,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 joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
 				/* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
-static int snd_midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
-static int snd_effect[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for InterWave soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for InterWave soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable InterWave soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x210,0x260,0x10}},dialog:list");
-#ifdef SNDRV_STB
-MODULE_PARM(snd_port_tc, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port_tc, "Tone control (TEA6330T - i2c bus) port # for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_port_tc, SNDRV_ENABLED ",allows:{{0x350,0x380,0x10}},dialog:list");
-#endif
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
-MODULE_PARM(snd_joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for InterWave driver.");
+static int midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
+static int effect[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for InterWave soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for InterWave soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable InterWave soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for InterWave driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x210,0x260,0x10}},dialog:list");
+#ifdef SNDRV_STB
+MODULE_PARM(port_tc, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port_tc, "Tone control (TEA6330T - i2c bus) port # for InterWave driver.");
+MODULE_PARM_SYNTAX(port_tc, SNDRV_ENABLED ",allows:{{0x350,0x380,0x10}},dialog:list");
+#endif
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for InterWave driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{3},{5},{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for InterWave driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for InterWave driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
+MODULE_PARM(joystick_dac, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for InterWave driver.");
 MODULE_PARM_SYNTAX(snd_joystic_dac, SNDRV_ENABLED ",allows:{{0,31}}");
-MODULE_PARM(snd_midi, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_midi, "MIDI UART enable for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_midi, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_channels, "Reserved PCM channels for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
-MODULE_PARM(snd_effect, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_effect, "Effects enable for InterWave driver.");
-MODULE_PARM_SYNTAX(snd_effect, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+MODULE_PARM(midi, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(midi, "MIDI UART enable for InterWave driver.");
+MODULE_PARM_SYNTAX(midi, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for InterWave driver.");
+MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",allows:{{2,16}}");
+MODULE_PARM(effect, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(effect, "Effects enable for InterWave driver.");
+MODULE_PARM_SYNTAX(effect, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
 
 struct snd_interwave {
 	int irq;
@@ -237,7 +237,7 @@
 	int err;
 
 	*rbus = NULL;
-	port = snd_port_tc[dev];
+	port = port_tc[dev];
 	if (port == SNDRV_AUTO_PORT) {
 		port = 0x350;
 		if (gus->gf1.port == 0x250) {
@@ -527,7 +527,7 @@
 	gus->codec_flag = 1;
 	gus->interwave = 1;
 	gus->max_flag = 1;
-	gus->joystick_dac = snd_joystick_dac[dev];
+	gus->joystick_dac = joystick_dac[dev];
 
 }
 
@@ -611,19 +611,19 @@
 	pdev = iwcard->dev;
 	if (pdev->prepare(pdev)<0)
 		return -EAGAIN;
-	if (snd_port[dev] != SNDRV_AUTO_PORT) {
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-		isapnp_resource_change(&pdev->resource[1], snd_port[dev] + 0x100, 12);
-		isapnp_resource_change(&pdev->resource[2], snd_port[dev] + 0x10c, 4);
-	}
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev], 1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev], 1);
-	if (snd_dma2[dev] < 0)
+	if (port[dev] != SNDRV_AUTO_PORT) {
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+		isapnp_resource_change(&pdev->resource[1], port[dev] + 0x100, 12);
+		isapnp_resource_change(&pdev->resource[2], port[dev] + 0x10c, 4);
+	}
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev], 1);
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev], 1);
+	if (dma2[dev] < 0)
 		isapnp_resource_change(&pdev->dma_resource[1], 4, 1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 	if (pdev->activate(pdev)<0) {
 		snd_printk("isapnp configure failure (out of resources?)\n");
 		return -EBUSY;
@@ -634,16 +634,16 @@
 		pdev->deactivate(pdev);
 		return -ENOENT;
 	}
-	snd_port[dev] = pdev->resource[0].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	if (snd_dma2[dev] >= 0)
-		snd_dma2[dev] = pdev->dma_resource[1].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[0].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	if (dma2[dev] >= 0)
+		dma2[dev] = pdev->dma_resource[1].start;
+	irq[dev] = pdev->irq_resource[0].start;
 	snd_printdd("isapnp IW: sb port=0x%lx, gf1 port=0x%lx, codec port=0x%lx\n",
 				pdev->resource[0].start,
 				pdev->resource[1].start,
 				pdev->resource[2].start);
-	snd_printdd("isapnp IW: dma1=%i, dma2=%i, irq=%i\n", snd_dma1[dev], snd_dma2[dev], snd_irq[dev]);
+	snd_printdd("isapnp IW: dma1=%i, dma2=%i, irq=%i\n", dma1[dev], dma2[dev], irq[dev]);
 #ifdef SNDRV_STB
 	/* Tone Control initialization */
 	pdev = iwcard->devtc;
@@ -651,15 +651,15 @@
 		iwcard->dev->deactivate(iwcard->dev);
 		return -EAGAIN;
 	}
-	if (snd_port_tc[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port_tc[dev], 1);
+	if (port_tc[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port_tc[dev], 1);
 	if (pdev->activate(pdev)<0) {
 		snd_printk("Tone Control isapnp configure failure (out of resources?)\n");
 		iwcard->dev->deactivate(iwcard->dev);
 		return -EBUSY;
 	}
-	snd_port_tc[dev] = pdev->resource[0].start;
-	snd_printdd("isapnp IW: tone control port=0x%lx\n", snd_port_tc[dev]);
+	port_tc[dev] = pdev->resource[0].start;
+	snd_printdd("isapnp IW: tone control port=0x%lx\n", port_tc[dev]);
 #endif
 	return 0;
 }
@@ -703,7 +703,7 @@
 {
 	static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
 	static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
-	int irq, dma1, dma2;
+	int xirq, xdma1, xdma2;
 	snd_card_t *card;
 	struct snd_interwave *iwcard;
 	cs4231_t *cs4231;
@@ -715,7 +715,7 @@
 	char *str;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_interwave));
 	if (card == NULL)
 		return -ENOMEM;
@@ -724,30 +724,30 @@
 	iwcard->irq = -1;
 	card->private_free = snd_interwave_free;
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && snd_interwave_isapnp(dev, iwcard)) {
+	if (isapnp[dev] && snd_interwave_isapnp(dev, iwcard)) {
 		snd_card_free(card);
 		return -ENODEV;
 	}
 #endif
-	irq = snd_irq[dev];
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	xirq = irq[dev];
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-	dma1 = snd_dma1[dev];
-	if (dma1 == SNDRV_AUTO_DMA) {
-		if ((dma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma1 = dma1[dev];
+	if (xdma1 == SNDRV_AUTO_DMA) {
+		if ((xdma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA1\n");
 			return -EBUSY;
 		}
 	}
-	dma2 = snd_dma2[dev];
-	if (dma2 == SNDRV_AUTO_DMA) {
-		if ((dma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma2 = dma2[dev];
+	if (xdma2 == SNDRV_AUTO_DMA) {
+		if ((xdma2 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA2\n");
 			return -EBUSY;
@@ -755,10 +755,10 @@
 	}
 
 	if ((err = snd_gus_create(card,
-				  snd_port[dev],
-				  -irq, dma1, dma2,
+				  port[dev],
+				  -xirq, xdma1, xdma2,
 				  0, 32,
-				  snd_pcm_channels[dev], snd_effect[dev], &gus)) < 0) {
+				  pcm_channels[dev], effect[dev], &gus)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -780,16 +780,16 @@
 		return err;
 	}
 
-	if (request_irq(irq, snd_interwave_interrupt, SA_INTERRUPT, "InterWave", (void *)iwcard)) {
+	if (request_irq(xirq, snd_interwave_interrupt, SA_INTERRUPT, "InterWave", (void *)iwcard)) {
 		snd_card_free(card);
 		snd_printk("unable to grab IRQ %d\n", irq);
 		return -EBUSY;
 	}
-	iwcard->irq = irq;
+	iwcard->irq = xirq;
 
 	if ((err = snd_cs4231_create(card,
-				     gus->gf1.port + 0x10c, -1, irq,
-				     dma2 < 0 ? dma1 : dma2, dma1,
+				     gus->gf1.port + 0x10c, -1, xirq,
+				     xdma2 < 0 ? xdma1 : xdma2, xdma1,
 				     CS4231_HW_INTERWAVE,
 				     CS4231_HWSHARE_IRQ |
 				     CS4231_HWSHARE_DMA1 |
@@ -812,7 +812,7 @@
 		snd_card_free(card);
 		return err;
 	}
-	if (snd_pcm_channels[dev] > 0) {
+	if (pcm_channels[dev] > 0) {
 		if ((err = snd_gf1_pcm_new(gus, 1, 1, NULL)) < 0) {
 			snd_card_free(card);
 			return err;
@@ -848,7 +848,7 @@
 	}
 #endif
 
-	gus->uart_enable = snd_midi[dev];
+	gus->uart_enable = midi[dev];
 	if ((err = snd_gf1_rawmidi_new(gus, 0, NULL)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -866,10 +866,10 @@
 	sprintf(card->longname, "%s at 0x%lx, irq %i, dma %d",
 		str,
 		gus->gf1.port,
-		irq,
-		dma1);
-	if (dma2 >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%d", dma2);
+		xirq,
+		xdma1);
+	if (xdma2 >= 0)
+		sprintf(card->longname + strlen(card->longname), "&%d", xdma2);
 
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -882,22 +882,22 @@
 	return 0;
 }
 
-static int __init snd_interwave_probe_legacy_port(unsigned long port)
+static int __init snd_interwave_probe_legacy_port(unsigned long xport)
 {
 	static int dev;
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
                         continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
-		snd_port[dev] = port;
+		port[dev] = xport;
 		res = snd_interwave_probe(dev);
 		if (res < 0)
-			snd_port[dev] = SNDRV_AUTO_PORT;
+			port[dev] = SNDRV_AUTO_PORT;
 		return res;
 	}
 	return -ENODEV;
@@ -912,7 +912,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || !snd_isapnp[dev])
+		if (!enable[dev] || !isapnp[dev])
 			continue;
 		snd_interwave_isapnp_cards[dev] = card;
 		snd_interwave_isapnp_id[dev] = id;
@@ -935,10 +935,10 @@
 	int dev;
 
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] == SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] == SNDRV_AUTO_PORT)
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (!snd_interwave_probe(dev)) {
@@ -946,7 +946,7 @@
 			continue;
 		}
 #ifdef MODULE
-		printk(KERN_ERR "InterWave soundcard #%i not found at 0x%lx or device busy\n", dev, snd_port[dev]);
+		printk(KERN_ERR "InterWave soundcard #%i not found at 0x%lx or device busy\n", dev, port[dev]);
 #endif
 	}
 	/* legacy auto configured cards */
@@ -978,11 +978,11 @@
 
 #ifndef MODULE
 
-/* format is: snd-interwave=snd_enable,snd_index,snd_id,snd_isapnp,
-			    snd_port[,snd_port_tc],snd_irq,
-			    snd_dma1,snd_dma2,
-			    snd_joystick_dac,snd_midi,
-			    snd_pcm_channels,snd_effect */
+/* format is: snd-interwave=enable,index,id,isapnp,
+			    port[,port_tc],irq,
+			    dma1,dma2,
+			    joystick_dac,midi,
+			    pcm_channels,effect */
 
 static int __init alsa_card_interwave_setup(char *str)
 {
@@ -991,24 +991,24 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
 #ifdef SNDRV_STB
-	       get_option(&str,(int *)&snd_port_tc[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port_tc[nr_dev]) == 2 &&
 #endif
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2 &&
-	       get_option(&str,&snd_joystick_dac[nr_dev]) == 2 &&
-	       get_option(&str,&snd_midi[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_channels[nr_dev]) == 2 &&
-	       get_option(&str,&snd_effect[nr_dev]) == 2);
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2 &&
+	       get_option(&str,&joystick_dac[nr_dev]) == 2 &&
+	       get_option(&str,&midi[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_channels[nr_dev]) == 2 &&
+	       get_option(&str,&effect[nr_dev]) == 2);
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp[nr_dev] = pnp;
+		isapnp[nr_dev] = pnp;
 #endif
 	nr_dev++;
 	return 1;
diff -Nru a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
--- a/sound/isa/opl3sa2.c	Wed Oct 30 16:44:34 2002
+++ b/sound/isa/opl3sa2.c	Wed Oct 30 16:44:34 2002
@@ -46,63 +46,63 @@
 		"{Intel,AL440LX sound},"
 	        "{NeoMagic,MagicWave 3DX}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-#ifdef __ISAPNP__
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-#endif
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0xf86,0x370,0x100 */
-static long snd_sb_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
-static long snd_wss_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* 0x530,0xe80,0xf40,0x604 */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x388 */
-static long snd_midi_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* 0x330,0x300 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 0,1,3,5,9,11,12,15 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
-static int snd_opl3sa3_ymode[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 };   /* 0,1,2,3 */ /*SL Added*/
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for OPL3-SA soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for OPL3-SA soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable OPL3-SA soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-#ifdef __ISAPNP__
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-#endif
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0xf86},{0x370},{0x100}},dialog:list");
-MODULE_PARM(snd_sb_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_sb_port, "SB port # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_sb_port, SNDRV_ENABLED ",allows:{{0x220},{0x240},{0x260}},dialog:list");
-MODULE_PARM(snd_wss_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_wss_port, "WSS port # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_wss_port, SNDRV_ENABLED ",allows:{{0x530},{0xe80},{0xf40},{0x604}},dialog:list");
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_ENABLED ",allows:{{0x388}},dialog:list");
-MODULE_PARM(snd_midi_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_midi_port, "MIDI port # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_midi_port, SNDRV_ENABLED ",allows:{{0x330},{0x300}},dialog:list");
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_ENABLED ",allows:{{0},{1},{3},{5},{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for OPL3-SA driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
-MODULE_PARM(snd_opl3sa3_ymode, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); /* SL Added */
-MODULE_PARM_DESC(snd_opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");
-MODULE_PARM_SYNTAX(snd_opl3sa3_ymode, SNDRV_ENABLED ",allows:{{0,3}},dialog:list");  /* SL Added */
+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 */
+#ifdef __ISAPNP__
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+#endif
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0xf86,0x370,0x100 */
+static long sb_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
+static long wss_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* 0x530,0xe80,0xf40,0x604 */
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x388 */
+static long midi_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* 0x330,0x300 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 0,1,3,5,9,11,12,15 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
+static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
+static int opl3sa3_ymode[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 };   /* 0,1,2,3 */ /*SL Added*/
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for OPL3-SA soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for OPL3-SA soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable OPL3-SA soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+#ifdef __ISAPNP__
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+#endif
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0xf86},{0x370},{0x100}},dialog:list");
+MODULE_PARM(sb_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(sb_port, "SB port # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(sb_port, SNDRV_ENABLED ",allows:{{0x220},{0x240},{0x260}},dialog:list");
+MODULE_PARM(wss_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(wss_port, "WSS port # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(wss_port, SNDRV_ENABLED ",allows:{{0x530},{0xe80},{0xf40},{0x604}},dialog:list");
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0x388}},dialog:list");
+MODULE_PARM(midi_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(midi_port, "MIDI port # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(midi_port, SNDRV_ENABLED ",allows:{{0x330},{0x300}},dialog:list");
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{0},{1},{3},{5},{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for OPL3-SA driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_ENABLED ",allows:{{1},{3},{5},{6},{7}},dialog:list");
+MODULE_PARM(opl3sa3_ymode, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); /* SL Added */
+MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");
+MODULE_PARM_SYNTAX(opl3sa3_ymode, SNDRV_ENABLED ",allows:{{0,3}},dialog:list");  /* SL Added */
 
 /* control ports */
 #define OPL3SA2_PM_CTRL		0x01
@@ -648,38 +648,38 @@
 	pdev = chip->dev;
 	if (pdev->prepare(pdev)<0)
 		return -EAGAIN;
-	if (snd_sb_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_sb_port[dev], 16);
-	if (snd_wss_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_wss_port[dev], 8);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[2], snd_fm_port[dev], 4);
-	if (snd_midi_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[3], snd_midi_port[dev], 2);
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[4], snd_port[dev], 2);
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev], 1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev], 1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (sb_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], sb_port[dev], 16);
+	if (wss_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], wss_port[dev], 8);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[2], fm_port[dev], 4);
+	if (midi_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[3], midi_port[dev], 2);
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[4], port[dev], 2);
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev], 1);
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 	if (pdev->activate(pdev)<0) {
 		snd_printk("isapnp configure failure (out of resources?)\n");
 		return -EBUSY;
 	}
-	snd_sb_port[dev] = pdev->resource[0].start;
-	snd_wss_port[dev] = pdev->resource[1].start;
-	snd_fm_port[dev] = pdev->resource[2].start;
-	snd_midi_port[dev] = pdev->resource[3].start;
-	snd_port[dev] = pdev->resource[4].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	snd_dma2[dev] = pdev->dma_resource[1].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	sb_port[dev] = pdev->resource[0].start;
+	wss_port[dev] = pdev->resource[1].start;
+	fm_port[dev] = pdev->resource[2].start;
+	midi_port[dev] = pdev->resource[3].start;
+	port[dev] = pdev->resource[4].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	dma2[dev] = pdev->dma_resource[1].start;
+	irq[dev] = pdev->irq_resource[0].start;
 	snd_printdd("isapnp OPL3-SA: sb port=0x%lx, wss port=0x%lx, fm port=0x%lx, midi port=0x%lx\n",
-		snd_sb_port[dev], snd_wss_port[dev], snd_fm_port[dev], snd_midi_port[dev]);
+		sb_port[dev], wss_port[dev], fm_port[dev], midi_port[dev]);
 	snd_printdd("isapnp OPL3-SA: control port=0x%lx, dma1=%i, dma2=%i, irq=%i\n",
-		snd_port[dev], snd_dma1[dev], snd_dma2[dev], snd_irq[dev]);
+		port[dev], dma1[dev], dma2[dev], irq[dev]);
 	return 0;
 }
 
@@ -719,7 +719,7 @@
 
 static int __init snd_opl3sa2_probe(int dev)
 {
-	int irq, dma1, dma2;
+	int xirq, xdma1, xdma2;
 	snd_card_t *card;
 	struct snd_opl3sa2 *chip;
 	cs4231_t *cs4231;
@@ -730,28 +730,28 @@
 	int err;
 
 #ifdef __ISAPNP__
-	if (!snd_isapnp[dev]) {
+	if (!isapnp[dev]) {
 #endif
-		if (snd_port[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_port\n");
+		if (port[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify port\n");
 			return -EINVAL;
 		}
-		if (snd_wss_port[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_wss_port\n");
+		if (wss_port[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify wss_port\n");
 			return -EINVAL;
 		}
-		if (snd_fm_port[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_fm_port\n");
+		if (fm_port[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify fm_port\n");
 			return -EINVAL;
 		}
-		if (snd_midi_port[dev] == SNDRV_AUTO_PORT) {
-			snd_printk("specify snd_midi_port\n");
+		if (midi_port[dev] == SNDRV_AUTO_PORT) {
+			snd_printk("specify midi_port\n");
 			return -EINVAL;
 		}
 #ifdef __ISAPNP__
 	}
 #endif
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	strcpy(card->driver, "OPL3SA2");
@@ -765,31 +765,31 @@
 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0)
 		goto __error;
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && (err = snd_opl3sa2_isapnp(dev, chip)) < 0)
+	if (isapnp[dev] && (err = snd_opl3sa2_isapnp(dev, chip)) < 0)
 		goto __error;
 #endif
-	chip->ymode = snd_opl3sa3_ymode[dev] & 0x03 ; /* initialise this card from supplied (or default) parameter*/ 
+	chip->ymode = opl3sa3_ymode[dev] & 0x03 ; /* initialise this card from supplied (or default) parameter*/ 
 	chip->card = card;
-	chip->port = snd_port[dev];
-	irq = snd_irq[dev];
-	dma1 = snd_dma1[dev];
-	dma2 = snd_dma2[dev];
-	if (dma2 < 0)
+	chip->port = port[dev];
+	xirq = irq[dev];
+	xdma1 = dma1[dev];
+	xdma2 = dma2[dev];
+	if (xdma2 < 0)
 		chip->single_dma = 1;
 	if ((err = snd_opl3sa2_detect(chip)) < 0)
 		goto __error;
-	if (request_irq(irq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2/3", (void *)chip)) {
+	if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2/3", (void *)chip)) {
 		err = -ENODEV;
 		goto __error;
 	}
-	chip->irq = irq;
+	chip->irq = xirq;
 	if ((err = snd_cs4231_create(card,
-				     snd_wss_port[dev] + 4, -1,
-				     irq, dma1, dma2,
+				     wss_port[dev] + 4, -1,
+				     xirq, xdma1, xdma2,
 				     CS4231_HW_OPL3SA2,
 				     CS4231_HWSHARE_IRQ,
 				     &cs4231)) < 0) {
-		snd_printd("Oops, WSS not detected at 0x%lx\n", snd_wss_port[dev] + 4);
+		snd_printd("Oops, WSS not detected at 0x%lx\n", wss_port[dev] + 4);
 		goto __error;
 	}
 	chip->cs4231 = cs4231;
@@ -801,9 +801,9 @@
 		goto __error;
 	if ((err = snd_cs4231_timer(cs4231, 0, NULL)) < 0)
 		goto __error;
-	if (snd_fm_port[dev] >= 0x340 && snd_fm_port[dev] < 0x400) {
-		if ((err = snd_opl3_create(card, snd_fm_port[dev],
-					   snd_fm_port[dev] + 2,
+	if (fm_port[dev] >= 0x340 && fm_port[dev] < 0x400) {
+		if ((err = snd_opl3_create(card, fm_port[dev],
+					   fm_port[dev] + 2,
 					   OPL3_HW_OPL3, 0, &opl3)) < 0)
 			goto __error;
 		if ((err = snd_opl3_timer_new(opl3, 1, 2)) < 0)
@@ -811,10 +811,10 @@
 		if ((err = snd_opl3_hwdep_new(opl3, 0, 1, &chip->synth)) < 0)
 			goto __error;
 	}
-	if (snd_midi_port[dev] >= 0x300 && snd_midi_port[dev] < 0x340) {
+	if (midi_port[dev] >= 0x300 && midi_port[dev] < 0x340) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_OPL3SA2,
-					       snd_midi_port[dev], 0,
-					       irq, 0, &chip->rmidi)) < 0)
+					       midi_port[dev], 0,
+					       xirq, 0, &chip->rmidi)) < 0)
 			goto __error;
 	}
 #ifdef CONFIG_PM
@@ -837,9 +837,9 @@
 #endif
 
 	sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
-		card->shortname, chip->port, irq, dma1);
+		card->shortname, chip->port, xirq, xdma1);
 	if (dma2 >= 0)
-		sprintf(card->longname + strlen(card->longname), "&%d", dma2);
+		sprintf(card->longname + strlen(card->longname), "&%d", xdma2);
 
 	if ((err = snd_card_register(card)) < 0)
 		goto __error;
@@ -860,7 +860,7 @@
         int res;
 
         for ( ; dev < SNDRV_CARDS; dev++) {
-                if (!snd_enable[dev])
+                if (!enable[dev])
                         continue;
                 snd_opl3sa2_isapnp_cards[dev] = card;
                 snd_opl3sa2_isapnp_id[dev] = id;
@@ -879,10 +879,10 @@
 	int dev, cards = 0;
 
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (snd_opl3sa2_probe(dev) >= 0)
@@ -913,10 +913,10 @@
 
 #ifndef MODULE
 
-/* format is: snd-opl3sa2=snd_enable,snd_index,snd_id,snd_isapnp,
-			  snd_port,snd_sb_port,snd_wss_port,snd_fm_port,
-			  snd_midi_port,snd_irq,snd_dma1,snd_dma2,
-			  snd_opl3sa3_ymode */
+/* format is: snd-opl3sa2=enable,index,id,isapnp,
+			  port,sb_port,wss_port,fm_port,
+			  midi_port,irq,dma1,dma2,
+			  opl3sa3_ymode */
 
 static int __init alsa_card_opl3sa2_setup(char *str)
 {
@@ -925,22 +925,22 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_sb_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_wss_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_midi_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2 &&
-	       get_option(&str,&snd_opl3sa3_ymode[nr_dev]) == 2);
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&sb_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&wss_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&midi_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2 &&
+	       get_option(&str,&opl3sa3_ymode[nr_dev]) == 2);
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp[nr_dev] = pnp;
+		isapnp[nr_dev] = pnp;
 #endif
 	nr_dev++;
 	return 1;
diff -Nru a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
--- a/sound/isa/opti9xx/opti92x-ad1848.c	Wed Oct 30 16:44:24 2002
+++ b/sound/isa/opti9xx/opti92x-ad1848.c	Wed Oct 30 16:44:24 2002
@@ -72,54 +72,54 @@
 #endif	/* CS4231 */
 #endif	/* OPTi93X */
 
-static int snd_index = SNDRV_DEFAULT_IDX1;	/* Index 0-MAX */
-static char *snd_id = SNDRV_DEFAULT_STR1;		/* ID for this card */
-//static int snd_enable = SNDRV_DEFAULT_ENABLE1;	/* Enable this card */
-static int snd_isapnp = 1;			/* Enable ISA PnP detection */
-static long snd_port = SNDRV_DEFAULT_PORT1; 	/* 0x530,0xe80,0xf40,0x604 */
-static long snd_mpu_port = SNDRV_DEFAULT_PORT1;	/* 0x300,0x310,0x320,0x330 */
-static long snd_fm_port = SNDRV_DEFAULT_PORT1;	/* 0x388 */
-static int snd_irq = SNDRV_DEFAULT_IRQ1;		/* 5,7,9,10,11 */
-static int snd_mpu_irq = SNDRV_DEFAULT_IRQ1;	/* 5,7,9,10 */
-static int snd_dma1 = SNDRV_DEFAULT_DMA1;		/* 0,1,3 */
+static int index = SNDRV_DEFAULT_IDX1;	/* Index 0-MAX */
+static char *id = SNDRV_DEFAULT_STR1;		/* ID for this card */
+//static int enable = SNDRV_DEFAULT_ENABLE1;	/* Enable this card */
+static int isapnp = 1;			/* Enable ISA PnP detection */
+static long port = SNDRV_DEFAULT_PORT1; 	/* 0x530,0xe80,0xf40,0x604 */
+static long mpu_port = SNDRV_DEFAULT_PORT1;	/* 0x300,0x310,0x320,0x330 */
+static long fm_port = SNDRV_DEFAULT_PORT1;	/* 0x388 */
+static int irq = SNDRV_DEFAULT_IRQ1;		/* 5,7,9,10,11 */
+static int mpu_irq = SNDRV_DEFAULT_IRQ1;	/* 5,7,9,10 */
+static int dma1 = SNDRV_DEFAULT_DMA1;		/* 0,1,3 */
 #if defined(CS4231) || defined(OPTi93X)
-static int snd_dma2 = SNDRV_DEFAULT_DMA1;		/* 0,1,3 */
+static int dma2 = SNDRV_DEFAULT_DMA1;		/* 0,1,3 */
 #endif	/* CS4231 || OPTi93X */
 
-MODULE_PARM(snd_index, "i");
-MODULE_PARM_DESC(snd_index, "Index value for opti9xx based soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "s");
-MODULE_PARM_DESC(snd_id, "ID string for opti9xx based soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-//MODULE_PARM(snd_enable, "i");
-//MODULE_PARM_DESC(snd_enable, "Enable opti9xx soundcard.");
-//MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_isapnp, "i");
-MODULE_PARM_DESC(snd_isapnp, "Enable ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-MODULE_PARM(snd_port, "l");
-MODULE_PARM_DESC(snd_port, "WSS port # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT_DESC);
-MODULE_PARM(snd_mpu_port, "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT_DESC);
-MODULE_PARM(snd_fm_port, "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT_DESC);
-MODULE_PARM(snd_irq, "i");
-MODULE_PARM_DESC(snd_irq, "WSS irq # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_mpu_irq, "i");
-MODULE_PARM_DESC(snd_mpu_irq, "MPU-401 irq # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_mpu_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma1, "i");
-MODULE_PARM_DESC(snd_dma1, "1st dma # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
+MODULE_PARM(index, "i");
+MODULE_PARM_DESC(index, "Index value for opti9xx based soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "s");
+MODULE_PARM_DESC(id, "ID string for opti9xx based soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+//MODULE_PARM(enable, "i");
+//MODULE_PARM_DESC(enable, "Enable opti9xx soundcard.");
+//MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(isapnp, "i");
+MODULE_PARM_DESC(isapnp, "Enable ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+MODULE_PARM(port, "l");
+MODULE_PARM_DESC(port, "WSS port # for opti9xx driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT_DESC);
+MODULE_PARM(mpu_port, "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for opti9xx driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT_DESC);
+MODULE_PARM(fm_port, "l");
+MODULE_PARM_DESC(fm_port, "FM port # for opti9xx driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT_DESC);
+MODULE_PARM(irq, "i");
+MODULE_PARM_DESC(irq, "WSS irq # for opti9xx driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(mpu_irq, "i");
+MODULE_PARM_DESC(mpu_irq, "MPU-401 irq # for opti9xx driver.");
+MODULE_PARM_SYNTAX(mpu_irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma1, "i");
+MODULE_PARM_DESC(dma1, "1st dma # for opti9xx driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
 #if defined(CS4231) || defined(OPTi93X)
-MODULE_PARM(snd_dma2, "i");
-MODULE_PARM_DESC(snd_dma2, "2nd dma # for opti9xx driver.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "i");
+MODULE_PARM_DESC(dma2, "2nd dma # for opti9xx driver.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
 #endif	/* CS4231 || OPTi93X */
 
 #define OPTi9XX_HW_DETECT	0
@@ -1729,22 +1729,22 @@
 		return -EAGAIN;
 
 #ifdef OPTi93X
-	if (snd_port != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port + 4, 4);
+	if (port != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port + 4, 4);
 #else
-	if ((pid->card_device != ISAPNP_DEVICE(0x0924)) && (snd_port != SNDRV_AUTO_PORT))
-		isapnp_resource_change(&pdev->resource[1], snd_port, 4);
+	if ((pid->card_device != ISAPNP_DEVICE(0x0924)) && (port != SNDRV_AUTO_PORT))
+		isapnp_resource_change(&pdev->resource[1], port, 4);
 #endif	/* OPTi93X */
-	if (snd_irq != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq, 1);
-	if (snd_dma1 != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1, 1);
+	if (irq != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq, 1);
+	if (dma1 != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1, 1);
 #if defined(CS4231) || defined(OPTi93X)
-	if (snd_dma2 != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2, 1);
+	if (dma2 != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2, 1);
 #endif	/* CS4231 || OPTi93X */
-	if (snd_fm_port != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_fm_port, 4);
+	if (fm_port != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], fm_port, 4);
 
 	if (pdev->activate(pdev) < 0) {
 		snd_printk("AUDIO isapnp configure failure\n");
@@ -1752,38 +1752,38 @@
 	}
 
 #ifdef OPTi93X
-	snd_port = pdev->resource[0].start - 4;
-	snd_fm_port = pdev->resource[1].start;
+	port = pdev->resource[0].start - 4;
+	fm_port = pdev->resource[1].start;
 #else
 	if (pid->card_device != ISAPNP_DEVICE(0x0924))
-		snd_port = pdev->resource[1].start;
-	snd_fm_port = pdev->resource[2].start;
+		port = pdev->resource[1].start;
+	fm_port = pdev->resource[2].start;
 #endif	/* OPTi93X */
-	snd_irq = pdev->irq_resource[0].start;
-	snd_dma1 = pdev->dma_resource[0].start;
+	irq = pdev->irq_resource[0].start;
+	dma1 = pdev->dma_resource[0].start;
 #if defined(CS4231) || defined(OPTi93X)
-	snd_dma2 = pdev->dma_resource[1].start;
+	dma2 = pdev->dma_resource[1].start;
 #endif	/* CS4231 || OPTi93X */
 
 	pdev = chip->devmpu;
 	if (pdev == NULL || pdev->prepare(pdev) < 0) {
-		snd_mpu_port = -1;
+		mpu_port = -1;
 		chip->devmpu = NULL;
 		return pid->card_device;
 	}
 
-	if (snd_mpu_port != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_mpu_port, 2);
-	if (snd_mpu_irq != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_mpu_irq, 1);
+	if (mpu_port != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], mpu_port, 2);
+	if (mpu_irq != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], mpu_irq, 1);
 
 	if (pdev->activate(pdev) < 0) {
 		snd_printk("MPU-401 isapnp configure failure\n");
-		snd_mpu_port = -1;
+		mpu_port = -1;
 		chip->devmpu = NULL;
 	} else {
-		snd_mpu_port = pdev->resource[0].start;
-		snd_mpu_irq = pdev->irq_resource[0].start;
+		mpu_port = pdev->resource[0].start;
+		mpu_irq = pdev->irq_resource[0].start;
 	}
 	return pid->card_device;
 }
@@ -1809,55 +1809,55 @@
 
 #ifndef OPTi93X
 	if (chip->chip->hardware == OPTi9XX_HW_82C928)
-		snd_mpu_port = -1;
+		mpu_port = -1;
 #endif	/* OPTi93X */
 	error = 0;
-	if (!pnp && (snd_mpu_port == SNDRV_DEFAULT_PORT1)) {
+	if (!pnp && (mpu_port == SNDRV_DEFAULT_PORT1)) {
 		for (i = 0; possible_mpu_ports[i] != -1; i++)
 			if (!snd_register_ioport(card, possible_mpu_ports[i], 2,
 					DRIVER_NAME" - MPU-401", NULL)) {
-				snd_mpu_port = possible_mpu_ports[i];
+				mpu_port = possible_mpu_ports[i];
 				break;
 			}
-		if (snd_mpu_port == SNDRV_DEFAULT_PORT1)
+		if (mpu_port == SNDRV_DEFAULT_PORT1)
 			error = -EBUSY;
 	}
 	else
-		error = (snd_mpu_port == -1) ? -ENODEV :
-			snd_register_ioport(card, snd_mpu_port, 2,
+		error = (mpu_port == -1) ? -ENODEV :
+			snd_register_ioport(card, mpu_port, 2,
 			DRIVER_NAME" - MPU-401", NULL);
 	if (error)
 		chip->chip->mpu_port = -1;
-	else if (pnp && (snd_irq == snd_mpu_irq))
-		chip->chip->mpu_irq = snd_mpu_irq;
+	else if (pnp && (irq == mpu_irq))
+		chip->chip->mpu_irq = mpu_irq;
 	else if (!snd_register_interrupt(card,
 			DRIVER_NAME" - MPU-401",
-			snd_mpu_irq, SNDRV_IRQ_TYPE_ISA,
+			mpu_irq, SNDRV_IRQ_TYPE_ISA,
 			snd_card_opti9xx_mpu_interrupt, chip,
 			pnp ? no_alternatives : possible_mpu_irqs,
 			&chip->mpuirqptr)) {
-		chip->chip->mpu_port = snd_mpu_port;
+		chip->chip->mpu_port = mpu_port;
 		chip->chip->mpu_irq = chip->mpuirqptr->irq;
 	}
 	else
 		chip->chip->mpu_port = -1;
 
-	if (!pnp && (snd_port == SNDRV_DEFAULT_PORT1)) {
+	if (!pnp && (port == SNDRV_DEFAULT_PORT1)) {
 		for (i = 0; possible_ports[i] != -1; i++)
 			if (!snd_register_ioport(card, possible_ports[i], 8,
 					DRIVER_NAME" - WSS", NULL)) {
-				snd_port = possible_ports[i];
+				port = possible_ports[i];
 				break;
 			}
-		if (snd_port == SNDRV_DEFAULT_PORT1)
+		if (port == SNDRV_DEFAULT_PORT1)
 			return -EBUSY;
 	}
-	else if ((error = snd_register_ioport(card, snd_port, 8,
+	else if ((error = snd_register_ioport(card, port, 8,
 			DRIVER_NAME" - WSS", NULL)) < 0)
 		return error;
-	chip->chip->wss_base = snd_port;
+	chip->chip->wss_base = port;
 	if ((error = snd_register_interrupt(card, DRIVER_NAME" - WSS",
-			snd_irq, SNDRV_IRQ_TYPE_ISA,
+			irq, SNDRV_IRQ_TYPE_ISA,
 			snd_card_opti9xx_interrupt, chip,
 			pnp ? no_alternatives : possible_irqs,
 			&chip->irqptr)) < 0)
@@ -1869,14 +1869,14 @@
 #else
 			DRIVER_NAME" - WSS",
 #endif	/* CS4231 || OPTi93X */
-			snd_dma1, SNDRV_DMA_TYPE_ISA, snd_dma1_size,
+			dma1, SNDRV_DMA_TYPE_ISA, dma1_size,
 			pnp ? no_alternatives : possible_dma1s,
 			&chip->dma1ptr)) < 0)
 		return error;
 	chip->chip->dma1 = chip->dma1ptr->dma;
 #if defined(CS4231) || defined(OPTi93X)
 	if ((error = snd_register_dma_channel(card, DRIVER_NAME" - WSS capture",
-			snd_dma2, SNDRV_DMA_TYPE_ISA, snd_dma2_size,
+			dma2, SNDRV_DMA_TYPE_ISA, dma2_size,
 			pnp ? no_alternatives :
 				possible_dma2s[chip->dma1ptr->dma],
 			&chip->dma2ptr)) < 0)
@@ -1885,10 +1885,10 @@
 #endif	/* CS4231 || OPTi93X */
 
 	if (snd_register_ioport(card,
-			pnp ? snd_fm_port : snd_fm_port = 0x388, 4,
+			pnp ? fm_port : fm_port = 0x388, 4,
 			DRIVER_NAME" - OPL", NULL) < 0)
-		snd_fm_port = -1;
-	chip->chip->fm_port = snd_fm_port;
+		fm_port = -1;
+	chip->chip->fm_port = fm_port;
 
 	return 0;
 }
@@ -1941,14 +1941,14 @@
 	int hw;
 #endif	/* __ISAPNP__ */
 
-	if (!(card = snd_card_new(snd_index, snd_id, THIS_MODULE,
+	if (!(card = snd_card_new(index, id, THIS_MODULE,
 				  sizeof(opti9xx_t))))
 		return -ENOMEM;
 	card->private_free = snd_card_opti9xx_free;
 	chip = (opti9xx_t *)card->private_data;
 
 #ifdef __ISAPNP__
-	if (snd_isapnp && (hw = snd_card_opti9xx_isapnp(chip)) > 0) {
+	if (isapnp && (hw = snd_card_opti9xx_isapnp(chip)) > 0) {
 		switch (hw) {
 		case ISAPNP_DEVICE(0x0924):
 			hw = OPTi9XX_HW_82C924;
@@ -1985,18 +1985,18 @@
 		return -ENOMEM;
 	}
 
-	chip->wss_base = snd_port;
-	chip->fm_port = snd_fm_port;
-	chip->mpu_port = snd_mpu_port;
-	chip->irq = snd_irq;
-	chip->mpu_irq = snd_mpu_irq;
-	chip->dma1 = snd_dma1;
+	chip->wss_base = port;
+	chip->fm_port = fm_port;
+	chip->mpu_port = mpu_port;
+	chip->irq = irq;
+	chip->mpu_irq = mpu_irq;
+	chip->dma1 = dma1;
 #if defined(CS4231) || defined(OPTi93X)
-	chip->dma2 = snd_dma2;
+	chip->dma2 = dma2;
 #endif
 
 #ifdef __ISAPNP__
-	if (!snd_isapnp) {
+	if (!isapnp) {
 #endif
 	if (chip->wss_base == SNDRV_AUTO_PORT) {
 		if ((chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4)) < 0) {
@@ -2183,10 +2183,10 @@
 
 #ifndef MODULE
 
-/* format is: snd-opti9xx=snd_enable,snd_index,snd_id,snd_isapnp,
-			  snd_port,snd_mpu_port,snd_fm_port,
-			  snd_irq,snd_mpu_irq,
-			  snd_dma1,[snd_dma2] */
+/* format is: snd-opti9xx=enable,index,id,isapnp,
+			  port,mpu_port,fm_port,
+			  irq,mpu_irq,
+			  dma1,[dma2] */
 
 static int __init alsa_card_opti9xx_setup(char *str)
 {
@@ -2194,23 +2194,23 @@
 	int __attribute__ ((__unused__)) pnp = INT_MAX;
 
 	(void)(get_option(&str,&enable) == 2 &&
-	       get_option(&str,&snd_index) == 2 &&
-	       get_id(&str,&snd_id) == 2 &&
+	       get_option(&str,&index) == 2 &&
+	       get_id(&str,&id) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port) == 2 &&
-	       get_option(&str,&snd_irq) == 2 &&
-	       get_option(&str,&snd_mpu_irq) == 2 &&
-	       get_option(&str,&snd_dma1) == 2
+	       get_option(&str,(int *)&port) == 2 &&
+	       get_option(&str,(int *)&mpu_port) == 2 &&
+	       get_option(&str,(int *)&fm_port) == 2 &&
+	       get_option(&str,&irq) == 2 &&
+	       get_option(&str,&mpu_irq) == 2 &&
+	       get_option(&str,&dma1) == 2
 #if defined(CS4231) || defined(OPTi93X)
 	       &&
-	       get_option(&str,&snd_dma2) == 2
+	       get_option(&str,&dma2) == 2
 #endif
 	       );
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp = pnp;
+		isapnp = pnp;
 #endif
 	return 1;
 }
diff -Nru a/sound/isa/sb/es968.c b/sound/isa/sb/es968.c
--- a/sound/isa/sb/es968.c	Wed Oct 30 16:44:28 2002
+++ b/sound/isa/sb/es968.c	Wed Oct 30 16:44:28 2002
@@ -41,31 +41,31 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{ESS,AudioDrive ES968}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for es968 based soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for es968 based soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable es968 based soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for es968 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for es968 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for es968 driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
+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 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* Pnp setup */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* PnP setup */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for es968 based soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for es968 based soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable es968 based soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for es968 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for es968 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for es968 driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
 
 struct snd_card_es968 {
 #ifdef __ISAPNP__
@@ -123,22 +123,22 @@
 	if (pdev->prepare(pdev)<0)
 		return -EAGAIN;
 
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-	if (snd_dma8[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma8[dev],
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+	if (dma8[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma8[dev],
 			1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 
 	if (pdev->activate(pdev)<0) {
 		snd_printk("AUDIO isapnp configure failure\n");
 		return -EBUSY;
 	}
 
-	snd_port[dev] = pdev->resource[0].start;
-	snd_dma8[dev] = pdev->dma_resource[0].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[0].start;
+	dma8[dev] = pdev->dma_resource[0].start;
+	irq[dev] = pdev->irq_resource[0].start;
 
 	return 0;
 }
@@ -170,7 +170,7 @@
 	snd_card_t *card;
 	struct snd_card_es968 *acard;
 
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(struct snd_card_es968))) == NULL)
 		return -ENOMEM;
 	acard = (struct snd_card_es968 *)card->private_data;
@@ -187,10 +187,10 @@
 	return -ENOSYS;
 #endif	/* __ISAPNP__ */
 
-	if ((error = snd_sbdsp_create(card, snd_port[dev],
-				      snd_irq[dev],
+	if ((error = snd_sbdsp_create(card, port[dev],
+				      irq[dev],
 				      snd_card_es968_interrupt,
-				      snd_dma8[dev],
+				      dma8[dev],
 				      -1,
 				      SB_HW_AUTO, &chip)) < 0) {
 		snd_card_free(card);
@@ -215,7 +215,7 @@
 	strcpy(card->driver, "ES968");
 	strcpy(card->shortname, "ESS ES968");
 	sprintf(card->longname, "%s soundcard, %s at 0x%lx, irq %d, dma %d",
-		card->shortname, chip->name, chip->port, snd_irq[dev], snd_dma8[dev]);
+		card->shortname, chip->name, chip->port, irq[dev], dma8[dev]);
 
 	if ((error = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -233,7 +233,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 		snd_es968_isapnp_cards[dev] = card;
 		snd_es968_isapnp_id[dev] = id;
@@ -276,8 +276,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-es968=snd_enable,snd_index,snd_id,
-			snd_port,snd_irq,snd_dma1 */
+/* format is: snd-es968=enable,index,id,
+			port,irq,snd_dma1 */
 
 static int __init alsa_card_es968_setup(char *str)
 {
@@ -285,12 +285,12 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
--- a/sound/isa/sb/sb16.c	Wed Oct 30 16:44:31 2002
+++ b/sound/isa/sb/sb16.c	Wed Oct 30 16:44:32 2002
@@ -74,78 +74,78 @@
 #define SNDRV_SBAWE_EMU8000
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_ISAPNP; /* Enable this card */
-#ifdef __ISAPNP__
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-#endif
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260,0x280 */
-static long snd_mpu_port[SNDRV_CARDS] = {0x330, 0x300,[2 ... (SNDRV_CARDS - 1)] = -1};
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
-#ifdef SNDRV_SBAWE_EMU8000
-static long snd_awe_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
-#endif
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
-static int snd_dma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 5,6,7 */
-static int snd_mic_agc[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+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 */
+#ifdef __ISAPNP__
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+#endif
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260,0x280 */
+static long mpu_port[SNDRV_CARDS] = {0x330, 0x300,[2 ... (SNDRV_CARDS - 1)] = -1};
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+#ifdef SNDRV_SBAWE_EMU8000
+static long awe_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;
+#endif
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
+static int dma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 5,6,7 */
+static int mic_agc[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
 #ifdef CONFIG_SND_SB16_CSP
-static int snd_csp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int csp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
 #endif
 #ifdef SNDRV_SBAWE_EMU8000
-static int snd_seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
+static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
 #endif
 
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for SoundBlaster 16 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for SoundBlaster 16 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable SoundBlaster 16 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-#ifdef __ISAPNP__
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for specified soundcard.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
-#endif
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for SB16 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_ENABLED ",allows:{{0x220},{0x240},{0x260},{0x280}},dialog:list");
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for SB16 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_ENABLED ",allows:{{0x330},{0x300}},dialog:list");
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port # for SB16 PnP driver.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_ENABLED ",allows:{{0x388},{0x38c},{0x390},{0x394}},dialog:list");
-#ifdef SNDRV_SBAWE_EMU8000
-MODULE_PARM(snd_awe_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_awe_port, "AWE port # for SB16 PnP driver.");
-MODULE_PARM_SYNTAX(snd_awe_port, SNDRV_ENABLED ",allows:{{0x620},{0x640},{0x660},{0x680}},dialog:list");
-#endif
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for SB16 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for SB16 driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
-MODULE_PARM(snd_dma16, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma16, "16-bit DMA # for SB16 driver.");
-MODULE_PARM_SYNTAX(snd_dma16, SNDRV_DMA16_DESC);
-MODULE_PARM(snd_mic_agc, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mic_agc, "Mic Auto-Gain-Control switch.");
-MODULE_PARM_SYNTAX(snd_mic_agc, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for SoundBlaster 16 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for SoundBlaster 16 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable SoundBlaster 16 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+#ifdef __ISAPNP__
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for specified soundcard.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
+#endif
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for SB16 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_ENABLED ",allows:{{0x220},{0x240},{0x260},{0x280}},dialog:list");
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port # for SB16 driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0x330},{0x300}},dialog:list");
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port # for SB16 PnP driver.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{0x388},{0x38c},{0x390},{0x394}},dialog:list");
+#ifdef SNDRV_SBAWE_EMU8000
+MODULE_PARM(awe_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(awe_port, "AWE port # for SB16 PnP driver.");
+MODULE_PARM_SYNTAX(awe_port, SNDRV_ENABLED ",allows:{{0x620},{0x640},{0x660},{0x680}},dialog:list");
+#endif
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for SB16 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for SB16 driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
+MODULE_PARM(dma16, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma16, "16-bit DMA # for SB16 driver.");
+MODULE_PARM_SYNTAX(dma16, SNDRV_DMA16_DESC);
+MODULE_PARM(mic_agc, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mic_agc, "Mic Auto-Gain-Control switch.");
+MODULE_PARM_SYNTAX(mic_agc, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
 #ifdef CONFIG_SND_SB16_CSP
-MODULE_PARM(snd_csp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_csp, "ASP/CSP chip support.");
-MODULE_PARM_SYNTAX(snd_csp, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+MODULE_PARM(csp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(csp, "ASP/CSP chip support.");
+MODULE_PARM_SYNTAX(csp, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
 #endif
 #ifdef SNDRV_SBAWE_EMU8000
-MODULE_PARM(snd_seq_ports, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_seq_ports, "Number of sequencer ports for WaveTable synth.");
-MODULE_PARM_SYNTAX(snd_seq_ports, SNDRV_ENABLED ",allows:{{0,8}},skill:advanced");
+MODULE_PARM(seq_ports, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(seq_ports, "Number of sequencer ports for WaveTable synth.");
+MODULE_PARM_SYNTAX(seq_ports, SNDRV_ENABLED ",allows:{{0,8}},skill:advanced");
 #endif
 
 struct snd_sb16 {
@@ -287,32 +287,32 @@
 	pdev = acard->dev;
 	if (pdev->prepare(pdev) < 0)
 		return -EAGAIN;
-	if (snd_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_port[dev], 16);
-	if (snd_mpu_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_mpu_port[dev], 2);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[2], snd_fm_port[dev], 4);
-	if (snd_dma8[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma8[dev], 1);
-	if (snd_dma16[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma16[dev], 1);
-	if (snd_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_irq[dev], 1);
+	if (port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], port[dev], 16);
+	if (mpu_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], mpu_port[dev], 2);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[2], fm_port[dev], 4);
+	if (dma8[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma8[dev], 1);
+	if (dma16[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma16[dev], 1);
+	if (irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], irq[dev], 1);
 	if (pdev->activate(pdev) < 0) {
 		printk(KERN_ERR PFX "isapnp configure failure (out of resources?)\n");
 		return -EBUSY;
 	}
-	snd_port[dev] = pdev->resource[0].start;
-	snd_mpu_port[dev] = pdev->resource[1].start;
-	snd_fm_port[dev] = pdev->resource[2].start;
-	snd_dma8[dev] = pdev->dma_resource[0].start;
-	snd_dma16[dev] = pdev->dma_resource[1].start;
-	snd_irq[dev] = pdev->irq_resource[0].start;
+	port[dev] = pdev->resource[0].start;
+	mpu_port[dev] = pdev->resource[1].start;
+	fm_port[dev] = pdev->resource[2].start;
+	dma8[dev] = pdev->dma_resource[0].start;
+	dma16[dev] = pdev->dma_resource[1].start;
+	irq[dev] = pdev->irq_resource[0].start;
 	snd_printdd("isapnp SB16: port=0x%lx, mpu port=0x%lx, fm port=0x%lx\n",
-			snd_port[dev], snd_mpu_port[dev], snd_fm_port[dev]);
+			port[dev], mpu_port[dev], fm_port[dev]);
 	snd_printdd("isapnp SB16: dma1=%i, dma2=%i, irq=%i\n",
-			snd_dma8[dev], snd_dma16[dev], snd_irq[dev]);
+			dma8[dev], dma16[dev], irq[dev]);
 #ifdef SNDRV_SBAWE_EMU8000
 	/* WaveTable initialization */
 	pdev = acard->devwt;
@@ -320,17 +320,17 @@
 		acard->dev->deactivate(acard->dev);
 		return -EAGAIN;
 	}
-	if (snd_awe_port[dev] != SNDRV_AUTO_PORT) {
-		isapnp_resource_change(&pdev->resource[0], snd_awe_port[dev], 4);
-		isapnp_resource_change(&pdev->resource[1], snd_awe_port[dev] + 0x400, 4);
-		isapnp_resource_change(&pdev->resource[2], snd_awe_port[dev] + 0x800, 4);
+	if (awe_port[dev] != SNDRV_AUTO_PORT) {
+		isapnp_resource_change(&pdev->resource[0], awe_port[dev], 4);
+		isapnp_resource_change(&pdev->resource[1], awe_port[dev] + 0x400, 4);
+		isapnp_resource_change(&pdev->resource[2], awe_port[dev] + 0x800, 4);
 	}
 	if (pdev->activate(pdev)<0) {
 		printk(KERN_ERR PFX "WaveTable isapnp configure failure (out of resources?)\n");
 		acard->dev->deactivate(acard->dev);		
 		return -EBUSY;
 	}
-	snd_awe_port[dev] = pdev->resource[0].start;
+	awe_port[dev] = pdev->resource[0].start;
 	snd_printdd("isapnp SB16: wavetable port=0x%lx\n", pdev->resource[0].start);
 #endif
 	return 0;
@@ -372,76 +372,76 @@
 	static int possible_irqs[] = {5, 9, 10, 7, -1};
 	static int possible_dmas8[] = {1, 3, 0, -1};
 	static int possible_dmas16[] = {5, 6, 7, -1};
-	int irq, dma8, dma16;
+	int xirq, xdma8, xdma16;
 	sb_t *chip;
 	snd_card_t *card;
 	struct snd_sb16 *acard;
 	opl3_t *opl3;
 	snd_hwdep_t *synth = NULL;
 #ifdef CONFIG_SND_SB16_CSP
-	snd_hwdep_t *csp = NULL;
+	snd_hwdep_t *xcsp = NULL;
 #endif
 	unsigned long flags;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_sb16));
 	if (card == NULL)
 		return -ENOMEM;
 	acard = (struct snd_sb16 *) card->private_data;
 	card->private_free = snd_sb16_free;
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && snd_sb16_isapnp(dev, acard) < 0) {
+	if (isapnp[dev] && snd_sb16_isapnp(dev, acard) < 0) {
 		snd_card_free(card);
 		return -EBUSY;
 	}
 #endif
 
-	irq = snd_irq[dev];
-	dma8 = snd_dma8[dev];
-	dma16 = snd_dma16[dev];
+	xirq = irq[dev];
+	xdma8 = dma8[dev];
+	xdma16 = dma16[dev];
 #ifdef __ISAPNP__
-	if (!snd_isapnp[dev]) {
+	if (!isapnp[dev]) {
 #endif
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			printk(KERN_ERR PFX "unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-	if (dma8 == SNDRV_AUTO_DMA) {
-		if ((dma8 = snd_legacy_find_free_dma(possible_dmas8)) < 0) {
+	if (xdma8 == SNDRV_AUTO_DMA) {
+		if ((xdma8 = snd_legacy_find_free_dma(possible_dmas8)) < 0) {
 			snd_card_free(card);
 			printk(KERN_ERR PFX "unable to find a free 8-bit DMA\n");
 			return -EBUSY;
 		}
 	}
-	if (dma16 == SNDRV_AUTO_DMA) {
-		if ((dma16 = snd_legacy_find_free_dma(possible_dmas16)) < 0) {
+	if (xdma16 == SNDRV_AUTO_DMA) {
+		if ((xdma16 = snd_legacy_find_free_dma(possible_dmas16)) < 0) {
 			snd_card_free(card);
 			printk(KERN_ERR PFX "unable to find a free 16-bit DMA\n");
 			return -EBUSY;
 		}
 	}
 	/* non-PnP FM port address is hardwired with base port address */
-	snd_fm_port[dev] = snd_port[dev];
+	fm_port[dev] = port[dev];
 	/* block the 0x388 port to avoid PnP conflicts */
 	acard->fm_res = request_region(0x388, 4, "SoundBlaster FM");
 #ifdef SNDRV_SBAWE_EMU8000
 	/* non-PnP AWE port address is hardwired with base port address */
-	snd_awe_port[dev] = snd_port[dev] + 0x400;
+	awe_port[dev] = port[dev] + 0x400;
 #endif
 #ifdef __ISAPNP__
 	}
 #endif
 
 	if ((err = snd_sbdsp_create(card,
-				    snd_port[dev],
-				    irq,
+				    port[dev],
+				    xirq,
 				    snd_sb16dsp_interrupt,
-				    dma8,
-				    dma16,
+				    xdma8,
+				    xdma16,
 				    SB_HW_AUTO,
 				    &chip)) < 0) {
 		snd_card_free(card);
@@ -449,12 +449,12 @@
 	}
 	if (chip->hardware != SB_HW_16) {
 		snd_card_free(card);
-		snd_printdd("SB 16 chip was not detected at 0x%lx\n", snd_port[dev]);
+		snd_printdd("SB 16 chip was not detected at 0x%lx\n", port[dev]);
 		return -ENODEV;
 	}
-	chip->mpu_port = snd_mpu_port[dev];
+	chip->mpu_port = mpu_port[dev];
 #ifdef __ISAPNP__
-	if (!snd_isapnp[dev] && (err = snd_sb16dsp_configure(chip)) < 0) {
+	if (!isapnp[dev] && (err = snd_sb16dsp_configure(chip)) < 0) {
 #else
 	if ((err = snd_sb16dsp_configure(chip)) < 0) {
 #endif
@@ -469,21 +469,22 @@
 	if (chip->mpu_port) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SB,
 					       chip->mpu_port, 0,
-					       irq, 0, &chip->rmidi)) < 0) {
+					       xirq, 0, &chip->rmidi)) < 0) {
 			snd_card_free(card);
 			return -ENXIO;
 		}
+		chip->rmidi_callback = snd_mpu401_uart_interrupt;
 	}
 
-	if (snd_fm_port[dev] > 0) {
-		if (snd_opl3_create(card, snd_fm_port[dev], snd_fm_port[dev] + 2,
-				    OPL3_HW_OPL3, snd_fm_port[dev] == snd_port[dev],
+	if (fm_port[dev] > 0) {
+		if (snd_opl3_create(card, fm_port[dev], fm_port[dev] + 2,
+				    OPL3_HW_OPL3, fm_port[dev] == port[dev],
 				    &opl3) < 0) {
 			printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n",
-				   snd_fm_port[dev], snd_fm_port[dev] + 2);
+				   fm_port[dev], fm_port[dev] + 2);
 		} else {
 #ifdef SNDRV_SBAWE_EMU8000
-			int seqdev = snd_awe_port[dev] > 0 ? 2 : 1;
+			int seqdev = awe_port[dev] > 0 ? 2 : 1;
 #else
 			int seqdev = 1;
 #endif
@@ -501,10 +502,10 @@
 
 #ifdef CONFIG_SND_SB16_CSP
 	/* CSP chip on SB16ASP/AWE32 */
-	if ((chip->hardware == SB_HW_16) && snd_csp[dev]) {
-		snd_sb_csp_new(chip, synth != NULL ? 1 : 0, &csp);
-		if (csp) {
-			chip->csp = csp->private_data;
+	if ((chip->hardware == SB_HW_16) && csp[dev]) {
+		snd_sb_csp_new(chip, synth != NULL ? 1 : 0, &xcsp);
+		if (xcsp) {
+			chip->csp = xcsp->private_data;
 			chip->hardware = SB_HW_16CSP;
 		} else {
 			printk(KERN_INFO PFX "warning - CSP chip not detected on soundcard #%i\n", dev + 1);
@@ -512,10 +513,10 @@
 	}
 #endif
 #ifdef SNDRV_SBAWE_EMU8000
-	if (snd_awe_port[dev] > 0) {
-		if (snd_emu8000_new(card, 1, snd_awe_port[dev],
-				    snd_seq_ports[dev], NULL) < 0) {
-			printk(KERN_ERR PFX "fatal error - EMU-8000 synthesizer not detected at 0x%lx\n", snd_awe_port[dev]);
+	if (awe_port[dev] > 0) {
+		if (snd_emu8000_new(card, 1, awe_port[dev],
+				    seq_ports[dev], NULL) < 0) {
+			printk(KERN_ERR PFX "fatal error - EMU-8000 synthesizer not detected at 0x%lx\n", awe_port[dev]);
 			snd_card_free(card);
 			return -ENXIO;
 		}
@@ -526,24 +527,24 @@
 	spin_lock_irqsave(&chip->mixer_lock, flags);
 	snd_sbmixer_write(chip, SB_DSP4_MIC_AGC,
 		(snd_sbmixer_read(chip, SB_DSP4_MIC_AGC) & 0x01) |
-		(snd_mic_agc[dev] ? 0x00 : 0x01));
+		(mic_agc[dev] ? 0x00 : 0x01));
 	spin_unlock_irqrestore(&chip->mixer_lock, flags);
 
 	strcpy(card->driver, 
 #ifdef SNDRV_SBAWE_EMU8000
-			snd_awe_port[dev] > 0 ? "SB AWE" :
+			awe_port[dev] > 0 ? "SB AWE" :
 #endif
 			"SB16");
 	strcpy(card->shortname, chip->name);
 	sprintf(card->longname, "%s at 0x%lx, irq %i, dma ",
 		chip->name,
 		chip->port,
-		irq);
-	if (dma8 >= 0)
-		sprintf(card->longname + strlen(card->longname), "%d", dma8);
-	if (dma16 >= 0)
+		xirq);
+	if (xdma8 >= 0)
+		sprintf(card->longname + strlen(card->longname), "%d", xdma8);
+	if (xdma16 >= 0)
 		sprintf(card->longname + strlen(card->longname), "%s%d",
-			dma8 >= 0 ? "&" : "", dma16);
+			xdma8 >= 0 ? "&" : "", xdma16);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -552,22 +553,22 @@
 	return 0;
 }
 
-static int __init snd_sb16_probe_legacy_port(unsigned long port)
+static int __init snd_sb16_probe_legacy_port(unsigned long xport)
 {
 	static int dev;
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
-		snd_port[dev] = port;
+		port[dev] = xport;
 		res = snd_sb16_probe(dev);
 		if (res < 0)
-			snd_port[dev] = SNDRV_AUTO_PORT;
+			port[dev] = SNDRV_AUTO_PORT;
 		return res;
 	}
 	return -ENODEV;
@@ -582,7 +583,7 @@
 	int res;
 
 	for ( ; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || !snd_isapnp[dev])
+		if (!enable[dev] || !isapnp[dev])
 			continue;
 		snd_sb16_isapnp_cards[dev] = card;
 		snd_sb16_isapnp_id[dev] = id;
@@ -605,10 +606,10 @@
 
 	/* legacy non-auto cards at first */
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev] || snd_port[dev] == SNDRV_AUTO_PORT)
+		if (!enable[dev] || port[dev] == SNDRV_AUTO_PORT)
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (!snd_sb16_probe(dev)) {
@@ -616,7 +617,7 @@
 			continue;
 		}
 #ifdef MODULE
-		printk(KERN_ERR "Sound Blaster 16+ soundcard #%i not found at 0x%lx or device busy\n", dev, snd_port[dev]);
+		printk(KERN_ERR "Sound Blaster 16+ soundcard #%i not found at 0x%lx or device busy\n", dev, port[dev]);
 #endif			
 	}
 	/* legacy auto configured cards */
@@ -653,11 +654,11 @@
 
 #ifndef MODULE
 
-/* format is: snd-sb16=snd_enable,snd_index,snd_id,snd_isapnp,
-		       snd_port,snd_mpu_port,snd_fm_port,
-		       snd_irq,snd_dma8,snd_dma16,
-		       snd_mic_agc,snd_csp,
-		       [snd_awe_port,snd_seq_ports] */
+/* format is: snd-sb16=enable,index,id,isapnp,
+		       port,mpu_port,fm_port,
+		       irq,dma8,dma16,
+		       mic_agc,csp,
+		       [awe_port,seq_ports] */
 
 static int __init alsa_card_sb16_setup(char *str)
 {
@@ -667,34 +668,34 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
 	       get_option(&str,&pnp) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma16[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mic_agc[nr_dev]) == 2
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2 &&
+	       get_option(&str,&dma16[nr_dev]) == 2 &&
+	       get_option(&str,&mic_agc[nr_dev]) == 2
 #ifdef CONFIG_SND_SB16_CSP
 	       &&
-	       get_option(&str,&snd_csp[nr_dev]) == 2
+	       get_option(&str,&csp[nr_dev]) == 2
 #endif
 #ifdef SNDRV_SBAWE_EMU8000
 	       &&
-	       get_option(&str,(int *)&snd_awe_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_seq_ports[nr_dev]) == 2
+	       get_option(&str,(int *)&awe_port[nr_dev]) == 2 &&
+	       get_option(&str,&seq_ports[nr_dev]) == 2
 #endif
 	       );
 #ifdef __ISAPNP__
 	if (pnp != INT_MAX)
-		snd_isapnp[nr_dev] = pnp;
+		isapnp[nr_dev] = pnp;
 #endif
 #ifdef CONFIG_SND_SB16_CSP
 	if (csp != INT_MAX)
-		snd_csp[nr_dev] = csp;
+		csp[nr_dev] = csp;
 #endif
 	nr_dev++;
 	return 1;
diff -Nru a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
--- a/sound/isa/sb/sb16_main.c	Wed Oct 30 16:44:28 2002
+++ b/sound/isa/sb/sb16_main.c	Wed Oct 30 16:44:28 2002
@@ -396,8 +396,8 @@
 	spin_lock(&chip->mixer_lock);
 	status = snd_sbmixer_read(chip, SB_DSP4_IRQSTATUS);
 	spin_unlock(&chip->mixer_lock);
-	if ((status & SB_IRQTYPE_MPUIN) && chip->rmidi)
-		snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs);
+	if ((status & SB_IRQTYPE_MPUIN) && chip->rmidi_callback)
+		chip->rmidi_callback(irq, chip->rmidi->private_data, regs);
 	if (status & SB_IRQTYPE_8BIT) {
 		ok = 0;
 		if (chip->mode & SB_MODE_PLAYBACK_8) {
diff -Nru a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
--- a/sound/isa/sb/sb8.c	Wed Oct 30 16:44:29 2002
+++ b/sound/isa/sb/sb8.c	Wed Oct 30 16:44:29 2002
@@ -38,31 +38,31 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Creative Labs,SB 1.0/SB 2.0/SB Pro}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
-static int snd_dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Sound Blaster soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Sound Blaster soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Sound Blaster soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_port, "Port # for SB8 driver.");
-MODULE_PARM_SYNTAX(snd_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for SB8 driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
-MODULE_PARM(snd_dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma8, "8-bit DMA # for SB8 driver.");
-MODULE_PARM_SYNTAX(snd_dma8, SNDRV_DMA8_DESC);
+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;	/* Enable this card */
+static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240,0x260 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 5,7,9,10 */
+static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Sound Blaster soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Sound Blaster soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Sound Blaster soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(port, "Port # for SB8 driver.");
+MODULE_PARM_SYNTAX(port, SNDRV_PORT12_DESC);
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for SB8 driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_IRQ_DESC);
+MODULE_PARM(dma8, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma8, "8-bit DMA # for SB8 driver.");
+MODULE_PARM_SYNTAX(dma8, SNDRV_DMA8_DESC);
 
 struct snd_sb8 {
 	struct resource *fm_res;	/* used to block FM i/o region for legacy cards */
@@ -101,7 +101,7 @@
 	opl3_t *opl3;
 	int err;
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(struct snd_sb8));
 	if (card == NULL)
 		return -ENOMEM;
@@ -111,9 +111,9 @@
 	/* block the 0x388 port to avoid PnP conflicts */
 	acard->fm_res = request_region(0x388, 4, "SoundBlaster FM");
 
-	if ((err = snd_sbdsp_create(card, snd_port[dev], snd_irq[dev],
+	if ((err = snd_sbdsp_create(card, port[dev], irq[dev],
 				    snd_sb8_interrupt,
-				    snd_dma8[dev],
+				    dma8[dev],
 				    -1,
 				    SB_HW_AUTO,
 				    &chip)) < 0) {
@@ -124,10 +124,10 @@
 		snd_card_free(card);
 		if (chip->hardware == SB_HW_ALS100)
 			snd_printdd("ALS100 chip detected at 0x%lx, try snd-card-als100 module\n",
-				    snd_port[dev]);
+				    port[dev]);
 		else
 			snd_printdd("SB 16 chip detected at 0x%lx, try snd-card-sb16 module\n",
-				    snd_port[dev]);
+				    port[dev]);
 		return -ENODEV;
 	}
 
@@ -170,7 +170,7 @@
 	sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
 		chip->name,
 		chip->port,
-		snd_irq[dev], snd_dma8[dev]);
+		irq[dev], dma8[dev]);
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -179,18 +179,18 @@
 	return 0;
 }
 
-static int __init snd_card_sb8_legacy_auto_probe(unsigned long port)
+static int __init snd_card_sb8_legacy_auto_probe(unsigned long xport)
 {
         static int dev;
         int res;
 
         for ( ; dev < SNDRV_CARDS; dev++) {
-                if (!snd_enable[dev] || snd_port[dev] != SNDRV_AUTO_PORT)
+                if (!enable[dev] || port[dev] != SNDRV_AUTO_PORT)
                         continue;
-                snd_port[dev] = port;
+                port[dev] = xport;
                 res = snd_sb8_probe(dev);
                 if (res < 0)
-                        snd_port[dev] = SNDRV_AUTO_PORT;
+                        port[dev] = SNDRV_AUTO_PORT;
                 return res;
         }
         return -ENODEV;
@@ -201,8 +201,8 @@
 	static unsigned long possible_ports[] = {0x220, 0x240, 0x260, -1};
 	int dev, cards;
 
-	for (dev = cards = 0; dev < SNDRV_CARDS && snd_enable[dev]; dev++) {
-		if (snd_port[dev] == SNDRV_AUTO_PORT)
+	for (dev = cards = 0; dev < SNDRV_CARDS && enable[dev]; dev++) {
+		if (port[dev] == SNDRV_AUTO_PORT)
 			continue;
 		if (snd_sb8_probe(dev) >= 0)
 			cards++;
@@ -230,8 +230,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-sb8=snd_enable,snd_index,snd_id,
-		      snd_port,snd_irq,snd_dma8 */
+/* format is: snd-sb8=enable,index,id,
+		      port,irq,dma8 */
 
 static int __init alsa_card_sb8_setup(char *str)
 {
@@ -239,12 +239,12 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma8[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&port[nr_dev]) == 2 &&
+	       get_option(&str,&irq[nr_dev]) == 2 &&
+	       get_option(&str,&dma8[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c
--- a/sound/isa/sgalaxy.c	Wed Oct 30 16:44:37 2002
+++ b/sound/isa/sgalaxy.c	Wed Oct 30 16:44:37 2002
@@ -41,32 +41,32 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Aztech Systems,Sound Galaxy}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
+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 snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
-static long snd_sbport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240 */
-static long snd_wssport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x530,0xe80,0xf40,0x604 */
-static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 7,9,10,11 */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Sound Galaxy soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Sound Galaxy soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_sbport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_sbport, "Port # for Sound Galaxy SB driver.");
-MODULE_PARM_SYNTAX(snd_sbport, SNDRV_ENABLED ",allows:{{0x220},{0x240}},dialog:list");
-MODULE_PARM(snd_wssport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_wssport, "Port # for Sound Galaxy WSS driver.");
-MODULE_PARM_SYNTAX(snd_wssport, SNDRV_ENABLED ",allows:{{0x530},{0xe80},{0xf40},{0x604}},dialog:list");
-MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_irq, "IRQ # for Sound Galaxy driver.");
-MODULE_PARM_SYNTAX(snd_irq, SNDRV_ENABLED ",allows:{{7},{9},{10},{11}},dialog:list");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for Sound Galaxy driver.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA8_DESC);
+static long sbport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x240 */
+static long wssport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x530,0xe80,0xf40,0x604 */
+static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 7,9,10,11 */
+static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 0,1,3 */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Sound Galaxy soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Sound Galaxy soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(sbport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(sbport, "Port # for Sound Galaxy SB driver.");
+MODULE_PARM_SYNTAX(sbport, SNDRV_ENABLED ",allows:{{0x220},{0x240}},dialog:list");
+MODULE_PARM(wssport, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(wssport, "Port # for Sound Galaxy WSS driver.");
+MODULE_PARM_SYNTAX(wssport, SNDRV_ENABLED ",allows:{{0x530},{0xe80},{0xf40},{0x604}},dialog:list");
+MODULE_PARM(irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(irq, "IRQ # for Sound Galaxy driver.");
+MODULE_PARM_SYNTAX(irq, SNDRV_ENABLED ",allows:{{7},{9},{10},{11}},dialog:list");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for Sound Galaxy driver.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA8_DESC);
 
 #define SGALAXY_AUXC_LEFT 18
 #define SGALAXY_AUXC_RIGHT 19
@@ -167,13 +167,13 @@
 #endif
 
 	/* switch to WSS mode */
-	snd_sgalaxy_sbdsp_reset(snd_sbport[dev]);
+	snd_sgalaxy_sbdsp_reset(sbport[dev]);
 
-	snd_sgalaxy_sbdsp_command(snd_sbport[dev], 9);
-	snd_sgalaxy_sbdsp_command(snd_sbport[dev], 0);
+	snd_sgalaxy_sbdsp_command(sbport[dev], 9);
+	snd_sgalaxy_sbdsp_command(sbport[dev], 0);
 
 	udelay(400);
-	return snd_sgalaxy_setup_wss(snd_wssport[dev], irq, dma);
+	return snd_sgalaxy_setup_wss(wssport[dev], irq, dma);
 }
 
 #define SGALAXY_CONTROLS 2
@@ -222,46 +222,46 @@
 {
 	static int possible_irqs[] = {7, 9, 10, 11, -1};
 	static int possible_dmas[] = {1, 3, 0, -1};
-	int err, irq, dma1;
+	int err, xirq, xdma1;
 	snd_card_t *card;
 	ad1848_t *chip;
 
-	if (snd_sbport[dev] == SNDRV_AUTO_PORT) {
+	if (sbport[dev] == SNDRV_AUTO_PORT) {
 		snd_printk("specify SB port\n");
 		return -EINVAL;
 	}
-	if (snd_wssport[dev] == SNDRV_AUTO_PORT) {
+	if (wssport[dev] == SNDRV_AUTO_PORT) {
 		snd_printk("specify WSS port\n");
 		return -EINVAL;
 	}
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	irq = snd_irq[dev];
-	if (irq == SNDRV_AUTO_IRQ) {
-		if ((irq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
+	xirq = irq[dev];
+	if (xirq == SNDRV_AUTO_IRQ) {
+		if ((xirq = snd_legacy_find_free_irq(possible_irqs)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free IRQ\n");
 			return -EBUSY;
 		}
 	}
-	dma1 = snd_dma1[dev];
-        if (dma1 == SNDRV_AUTO_DMA) {
-		if ((dma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
+	xdma1 = dma1[dev];
+        if (xdma1 == SNDRV_AUTO_DMA) {
+		if ((xdma1 = snd_legacy_find_free_dma(possible_dmas)) < 0) {
 			snd_card_free(card);
 			snd_printk("unable to find a free DMA\n");
 			return -EBUSY;
 		}
 	}
 
-	if ((err = snd_sgalaxy_detect(dev, irq, dma1)) < 0) {
+	if ((err = snd_sgalaxy_detect(dev, xirq, xdma1)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
 
-	if ((err = snd_ad1848_create(card, snd_wssport[dev] + 4,
-				     irq, dma1,
+	if ((err = snd_ad1848_create(card, wssport[dev] + 4,
+				     xirq, xdma1,
 				     AD1848_HW_DETECT, &chip)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -286,7 +286,7 @@
 	strcpy(card->driver, "Sound Galaxy");
 	strcpy(card->shortname, "Sound Galaxy");
 	sprintf(card->longname, "Sound Galaxy at 0x%lx, irq %d, dma %d",
-		snd_wssport[dev], irq, dma1);
+		wssport[dev], xirq, xdma1);
 
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -327,9 +327,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-sgalaxy=snd_enable,snd_index,snd_id,
-			  snd_sbport,snd_wssport,
-			  snd_irq,snd_dma1 */
+/* format is: snd-sgalaxy=snd_enable,index,id,
+			  sbport,wssport,
+			  irq,dma1 */
 
 static int __init alsa_card_sgalaxy_setup(char *str)
 {
@@ -338,12 +338,12 @@
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
 	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_sbport[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_wssport[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_irq[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_dma1[nr_dev]) == 2);
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&sbport[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&wssport[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&irq[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&dma1[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
--- a/sound/isa/wavefront/wavefront.c	Wed Oct 30 16:44:25 2002
+++ b/sound/isa/wavefront/wavefront.c	Wed Oct 30 16:44:25 2002
@@ -41,65 +41,65 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Turtle Beach,Maui/Tropez/Tropez+}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	    /* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	    /* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	    /* Enable this card */
-static int snd_isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-static long snd_cs4232_pcm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
-static int snd_cs4232_pcm_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,11,12,15 */
-static long snd_cs4232_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
-static int snd_cs4232_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 9,11,12,15 */
-static long snd_ics2115_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
-static int snd_ics2115_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;    /* 2,9,11,12,15 */
-static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	    /* PnP setup */
-static int snd_dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	    /* 0,1,3,5,6,7 */
-static int snd_dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	    /* 0,1,3,5,6,7 */
-static int snd_use_cs4232_midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; 
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for WaveFront soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for WaveFront soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable WaveFront soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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;	    /* Enable this card */
+static int isapnp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+static long cs4232_pcm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* PnP setup */
+static int cs4232_pcm_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,11,12,15 */
+static long cs4232_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
+static int cs4232_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 9,11,12,15 */
+static long ics2115_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
+static int ics2115_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;    /* 2,9,11,12,15 */
+static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	    /* PnP setup */
+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 use_cs4232_midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; 
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for WaveFront soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for WaveFront soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable WaveFront soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 #ifdef __ISAPNP__
-MODULE_PARM(snd_isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_isapnp, "ISA PnP detection for WaveFront soundcards.");
-MODULE_PARM_SYNTAX(snd_isapnp, SNDRV_ISAPNP_DESC);
+MODULE_PARM(isapnp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(isapnp, "ISA PnP detection for WaveFront soundcards.");
+MODULE_PARM_SYNTAX(isapnp, SNDRV_ISAPNP_DESC);
 #endif
-MODULE_PARM(snd_cs4232_pcm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_cs4232_pcm_port, "Port # for CS4232 PCM interface.");
-MODULE_PARM_SYNTAX(snd_cs4232_pcm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_cs4232_pcm_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_cs4232_pcm_irq, "IRQ # for CS4232 PCM interface.");
-MODULE_PARM_SYNTAX(snd_cs4232_pcm_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma1, "DMA1 # for CS4232 PCM interface.");
-MODULE_PARM_SYNTAX(snd_dma1, SNDRV_DMA_DESC);
-MODULE_PARM(snd_dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dma2, "DMA2 # for CS4232 PCM interface.");
-MODULE_PARM_SYNTAX(snd_dma2, SNDRV_DMA_DESC);
-MODULE_PARM(snd_cs4232_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_cs4232_mpu_port, "port # for CS4232 MPU-401 interface.");
-MODULE_PARM_SYNTAX(snd_cs4232_mpu_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_cs4232_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_cs4232_mpu_irq, "IRQ # for CS4232 MPU-401 interface.");
-MODULE_PARM_SYNTAX(snd_cs4232_mpu_irq, SNDRV_ENABLED ",allows:{{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_ics2115_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_ics2115_irq, "IRQ # for ICS2115.");
-MODULE_PARM_SYNTAX(snd_ics2115_irq, SNDRV_ENABLED ",allows:{{9},{11},{12},{15}},dialog:list");
-MODULE_PARM(snd_ics2115_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_ics2115_port, "Port # for ICS2115.");
-MODULE_PARM_SYNTAX(snd_ics2115_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port #.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
-MODULE_PARM(snd_use_cs4232_midi, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
-MODULE_PARM_SYNTAX(snd_use_cs4232_midi, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(cs4232_pcm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(cs4232_pcm_port, "Port # for CS4232 PCM interface.");
+MODULE_PARM_SYNTAX(cs4232_pcm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(cs4232_pcm_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(cs4232_pcm_irq, "IRQ # for CS4232 PCM interface.");
+MODULE_PARM_SYNTAX(cs4232_pcm_irq, SNDRV_ENABLED ",allows:{{5},{7},{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(dma1, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma1, "DMA1 # for CS4232 PCM interface.");
+MODULE_PARM_SYNTAX(dma1, SNDRV_DMA_DESC);
+MODULE_PARM(dma2, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dma2, "DMA2 # for CS4232 PCM interface.");
+MODULE_PARM_SYNTAX(dma2, SNDRV_DMA_DESC);
+MODULE_PARM(cs4232_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(cs4232_mpu_port, "port # for CS4232 MPU-401 interface.");
+MODULE_PARM_SYNTAX(cs4232_mpu_port, SNDRV_PORT12_DESC);
+MODULE_PARM(cs4232_mpu_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(cs4232_mpu_irq, "IRQ # for CS4232 MPU-401 interface.");
+MODULE_PARM_SYNTAX(cs4232_mpu_irq, SNDRV_ENABLED ",allows:{{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(ics2115_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(ics2115_irq, "IRQ # for ICS2115.");
+MODULE_PARM_SYNTAX(ics2115_irq, SNDRV_ENABLED ",allows:{{9},{11},{12},{15}},dialog:list");
+MODULE_PARM(ics2115_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(ics2115_port, "Port # for ICS2115.");
+MODULE_PARM_SYNTAX(ics2115_port, SNDRV_PORT12_DESC);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port #.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_PORT12_DESC);
+MODULE_PARM(use_cs4232_midi, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
+MODULE_PARM_SYNTAX(use_cs4232_midi, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 
 static snd_card_t *snd_wavefront_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 
@@ -157,7 +157,7 @@
 	   specifically requested. It is logical device 3.
 	*/
 
-	if (snd_use_cs4232_midi[dev]) {
+	if (use_cs4232_midi[dev]) {
 		acard->mpu = isapnp_find_dev(card, id->devs[2].vendor, id->devs[2].function, NULL);
 		if (acard->mpu->active) {
 			acard->wss = acard->synth = acard->mpu = NULL;
@@ -199,27 +199,27 @@
 
 	*/
 
-	if (snd_cs4232_pcm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[0], snd_cs4232_pcm_port[dev], 4);
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT)
-		isapnp_resource_change(&pdev->resource[1], snd_fm_port[dev], 4);
-	if (snd_dma1[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[0], snd_dma1[dev], 1);
-	if (snd_dma2[dev] != SNDRV_AUTO_DMA)
-		isapnp_resource_change(&pdev->dma_resource[1], snd_dma2[dev], 1);
-	if (snd_cs4232_pcm_irq[dev] != SNDRV_AUTO_IRQ)
-		isapnp_resource_change(&pdev->irq_resource[0], snd_cs4232_pcm_irq[dev], 1);
+	if (cs4232_pcm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[0], cs4232_pcm_port[dev], 4);
+	if (fm_port[dev] != SNDRV_AUTO_PORT)
+		isapnp_resource_change(&pdev->resource[1], fm_port[dev], 4);
+	if (dma1[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[0], dma1[dev], 1);
+	if (dma2[dev] != SNDRV_AUTO_DMA)
+		isapnp_resource_change(&pdev->dma_resource[1], dma2[dev], 1);
+	if (cs4232_pcm_irq[dev] != SNDRV_AUTO_IRQ)
+		isapnp_resource_change(&pdev->irq_resource[0], cs4232_pcm_irq[dev], 1);
 
 	if (pdev->activate(pdev)<0) {
 		snd_printk ("isapnp WSS activation failed\n");
 		return -EBUSY;
 	}
 
-	snd_cs4232_pcm_port[dev] = pdev->resource[0].start;
-	snd_fm_port[dev] = pdev->resource[1].start;
-	snd_dma1[dev] = pdev->dma_resource[0].start;
-	snd_dma2[dev] = pdev->dma_resource[1].start;
-	snd_cs4232_pcm_irq[dev] = pdev->irq_resource[0].start;
+	cs4232_pcm_port[dev] = pdev->resource[0].start;
+	fm_port[dev] = pdev->resource[1].start;
+	dma1[dev] = pdev->dma_resource[0].start;
+	dma2[dev] = pdev->dma_resource[1].start;
+	cs4232_pcm_irq[dev] = pdev->irq_resource[0].start;
 
 	/* Synth initialization */
 
@@ -234,12 +234,12 @@
 		snd_printk ("ICS2115 synth preparation failed\n");
 		return -EAGAIN;
 	}
-	if (snd_ics2115_port[dev] != SNDRV_AUTO_PORT) {
-		isapnp_resource_change(&pdev->resource[0], snd_ics2115_port[dev], 16);
+	if (ics2115_port[dev] != SNDRV_AUTO_PORT) {
+		isapnp_resource_change(&pdev->resource[0], ics2115_port[dev], 16);
 	}
 		
-	if (snd_ics2115_port[dev] != SNDRV_AUTO_IRQ) {
-		isapnp_resource_change(&pdev->irq_resource[0], snd_ics2115_irq[dev], 1);
+	if (ics2115_port[dev] != SNDRV_AUTO_IRQ) {
+		isapnp_resource_change(&pdev->irq_resource[0], ics2115_irq[dev], 1);
 	}
 
 	if (pdev->activate(pdev)<0) {
@@ -248,15 +248,15 @@
 		return -EBUSY;
 	}
 
-	snd_ics2115_port[dev] = pdev->resource[0].start;
-	snd_ics2115_irq[dev] = pdev->irq_resource[0].start;
+	ics2115_port[dev] = pdev->resource[0].start;
+	ics2115_irq[dev] = pdev->irq_resource[0].start;
 
 	/* CS4232 MPU initialization. Configure this only if
 	   explicitly requested, since its physically inaccessible and
 	   consumes another IRQ.
 	*/
 
-	if (snd_use_cs4232_midi[dev]) {
+	if (use_cs4232_midi[dev]) {
 
 		pdev = acard->mpu;
 
@@ -268,32 +268,32 @@
 			return -EAGAIN;
 		}
 
-		if (snd_cs4232_mpu_port[dev] != SNDRV_AUTO_PORT)
-			isapnp_resource_change(&pdev->resource[0], snd_cs4232_mpu_port[dev], 2);
-		if (snd_cs4232_mpu_irq[dev] != SNDRV_AUTO_IRQ)
-			isapnp_resource_change(&pdev->resource[0], snd_cs4232_mpu_irq[dev], 1);
+		if (cs4232_mpu_port[dev] != SNDRV_AUTO_PORT)
+			isapnp_resource_change(&pdev->resource[0], cs4232_mpu_port[dev], 2);
+		if (cs4232_mpu_irq[dev] != SNDRV_AUTO_IRQ)
+			isapnp_resource_change(&pdev->resource[0], cs4232_mpu_irq[dev], 1);
 
 		if (pdev->activate(pdev)<0) {
 			snd_printk("isapnp CS4232 MPU activation failed\n");
-			snd_cs4232_mpu_port[dev] = SNDRV_AUTO_PORT;
+			cs4232_mpu_port[dev] = SNDRV_AUTO_PORT;
 		} else {
-			snd_cs4232_mpu_port[dev] = pdev->resource[0].start;
-			snd_cs4232_mpu_irq[dev] = pdev->irq_resource[0].start;
+			cs4232_mpu_port[dev] = pdev->resource[0].start;
+			cs4232_mpu_irq[dev] = pdev->irq_resource[0].start;
 		}
 
 		snd_printk ("CS4232 MPU: port=0x%lx, irq=%i\n", 
-			    snd_cs4232_mpu_port[dev], 
-			    snd_cs4232_mpu_irq[dev]);
+			    cs4232_mpu_port[dev], 
+			    cs4232_mpu_irq[dev]);
 	}
 
 	snd_printdd ("CS4232: pcm port=0x%lx, fm port=0x%lx, dma1=%i, dma2=%i, irq=%i\nICS2115: port=0x%lx, irq=%i\n", 
-		    snd_cs4232_pcm_port[dev], 
-		    snd_fm_port[dev],
-		    snd_dma1[dev], 
-		    snd_dma2[dev], 
-		    snd_cs4232_pcm_irq[dev],
-		    snd_ics2115_port[dev], 
-		    snd_ics2115_irq[dev]);
+		    cs4232_pcm_port[dev], 
+		    fm_port[dev],
+		    dma1[dev], 
+		    dma2[dev], 
+		    cs4232_pcm_irq[dev],
+		    ics2115_port[dev], 
+		    ics2115_irq[dev]);
 	
 	return 0;
 }
@@ -464,29 +464,29 @@
 	snd_hwdep_t *fx_processor;
 	int hw_dev = 0, midi_dev = 0, err;
 
-	if (snd_cs4232_mpu_port[dev] < 0)
-		snd_cs4232_mpu_port[dev] = SNDRV_AUTO_PORT;
-	if (snd_fm_port[dev] < 0)
-		snd_fm_port[dev] = SNDRV_AUTO_PORT;
-	if (snd_ics2115_port[dev] < 0)
-		snd_ics2115_port[dev] = SNDRV_AUTO_PORT;
+	if (cs4232_mpu_port[dev] < 0)
+		cs4232_mpu_port[dev] = SNDRV_AUTO_PORT;
+	if (fm_port[dev] < 0)
+		fm_port[dev] = SNDRV_AUTO_PORT;
+	if (ics2115_port[dev] < 0)
+		ics2115_port[dev] = SNDRV_AUTO_PORT;
 
 #ifdef __ISAPNP__
-	if (!snd_isapnp[dev]) {
+	if (!isapnp[dev]) {
 #endif
-		if (snd_cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) {
+		if (cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) {
 			snd_printk("specify CS4232 port\n");
 			return -EINVAL;
 		}
-		if (snd_ics2115_port[dev] == SNDRV_AUTO_PORT) {
+		if (ics2115_port[dev] == SNDRV_AUTO_PORT) {
 			snd_printk("specify ICS2115 port\n");
 			return -ENODEV;
 		}
 #ifdef __ISAPNP__
 	}
 #endif
-	card = snd_card_new (snd_index[dev], 
-			     snd_id[dev],
+	card = snd_card_new (index[dev], 
+			     id[dev],
 			     THIS_MODULE,
 			     sizeof(snd_wavefront_card_t));
 
@@ -502,8 +502,8 @@
 	card->private_free = snd_wavefront_free;
 
 #ifdef __ISAPNP__
-	if (snd_isapnp[dev] && snd_wavefront_isapnp (dev, acard) < 0) {
-		if (snd_cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) {
+	if (isapnp[dev] && snd_wavefront_isapnp (dev, acard) < 0) {
+		if (cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) {
 			snd_printk ("isapnp detection failed\n");
 			snd_card_free (card);
 			return -ENODEV;
@@ -514,11 +514,11 @@
 	/* --------- PCM --------------- */
 
 	if ((err = snd_cs4231_create (card,
-				      snd_cs4232_pcm_port[dev],
+				      cs4232_pcm_port[dev],
 				      -1,
-				      snd_cs4232_pcm_irq[dev],
-				      snd_dma1[dev],
-				      snd_dma2[dev],
+				      cs4232_pcm_irq[dev],
+				      dma1[dev],
+				      dma2[dev],
 				      CS4231_HW_DETECT, 0, &chip)) < 0) {
 		snd_card_free(card);
 		snd_printk ("can't allocate CS4231 device\n");
@@ -536,12 +536,12 @@
 
 	/* ---------- OPL3 synth --------- */
 
-	if (snd_fm_port[dev] != SNDRV_AUTO_PORT) {
+	if (fm_port[dev] != SNDRV_AUTO_PORT) {
 		opl3_t *opl3;
 
 	        if ((err = snd_opl3_create(card,
-					   snd_fm_port[dev],
-					   snd_fm_port[dev] + 2,
+					   fm_port[dev],
+					   fm_port[dev] + 2,
 					   OPL3_HW_OPL3_CS,
 					   0, &opl3)) < 0) {
 			snd_printk ("can't allocate or detect OPL3 synth\n");
@@ -558,19 +558,19 @@
 
 	/* ------- ICS2115 Wavetable synth ------- */
 
-	if ((acard->wavefront.res_base = request_region(snd_ics2115_port[dev], 16, "ICS2115")) == NULL) {
-		snd_printk("unable to grab ICS2115 i/o region 0x%lx-0x%lx\n", snd_ics2115_port[dev], snd_ics2115_port[dev] + 16 - 1);
+	if ((acard->wavefront.res_base = request_region(ics2115_port[dev], 16, "ICS2115")) == NULL) {
+		snd_printk("unable to grab ICS2115 i/o region 0x%lx-0x%lx\n", ics2115_port[dev], ics2115_port[dev] + 16 - 1);
 		snd_card_free(card);
 		return -EBUSY;
 	}
-	if (request_irq(snd_ics2115_irq[dev], snd_wavefront_ics2115_interrupt, SA_INTERRUPT, "ICS2115", (void *)acard)) {
-		snd_printk("unable to use ICS2115 IRQ %d\n", snd_ics2115_irq[dev]);
+	if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt, SA_INTERRUPT, "ICS2115", (void *)acard)) {
+		snd_printk("unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]);
 		snd_card_free(card);
 		return -EBUSY;
 	}
 	
-	acard->wavefront.irq = snd_ics2115_irq[dev];
-	acard->wavefront.base = snd_ics2115_port[dev];
+	acard->wavefront.irq = ics2115_irq[dev];
+	acard->wavefront.base = ics2115_port[dev];
 
 	if ((wavefront_synth = snd_wavefront_new_synth (card, hw_dev, acard)) == NULL) {
 		snd_printk ("can't create WaveFront synth device\n");
@@ -592,10 +592,10 @@
 
 	/* -------- CS4232 MPU-401 interface -------- */
 
-	if (snd_cs4232_mpu_port[dev] > 0 && snd_cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) {
+	if (cs4232_mpu_port[dev] > 0 && cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) {
 		if ((err = snd_mpu401_uart_new(card, midi_dev, MPU401_HW_CS4232,
-					       snd_cs4232_mpu_port[dev], 0,
-					       snd_cs4232_mpu_irq[dev],
+					       cs4232_mpu_port[dev], 0,
+					       cs4232_mpu_irq[dev],
 					       SA_INTERRUPT,
 					       NULL)) < 0) {
 			snd_printk ("can't allocate CS4232 MPU-401 device\n");
@@ -607,12 +607,12 @@
 
 	/* ------ ICS2115 internal MIDI ------------ */
 
-	if (snd_ics2115_port[dev] >= 0 && snd_ics2115_port[dev] != SNDRV_AUTO_PORT) {
+	if (ics2115_port[dev] >= 0 && ics2115_port[dev] != SNDRV_AUTO_PORT) {
 		ics2115_internal_rmidi = 
 			snd_wavefront_new_midi (card, 
 						midi_dev,
 						acard,
-						snd_ics2115_port[dev],
+						ics2115_port[dev],
 						internal_mpu);
 		if (ics2115_internal_rmidi == NULL) {
 			snd_printk ("can't setup ICS2115 internal MIDI device\n");
@@ -624,12 +624,12 @@
 
 	/* ------ ICS2115 external MIDI ------------ */
 
-	if (snd_ics2115_port[dev] >= 0 && snd_ics2115_port[dev] != SNDRV_AUTO_PORT) {
+	if (ics2115_port[dev] >= 0 && ics2115_port[dev] != SNDRV_AUTO_PORT) {
 		ics2115_external_rmidi = 
 			snd_wavefront_new_midi (card, 
 						midi_dev,
 						acard,
-						snd_ics2115_port[dev],
+						ics2115_port[dev],
 						external_mpu);
 		if (ics2115_external_rmidi == NULL) {
 			snd_printk ("can't setup ICS2115 external MIDI device\n");
@@ -645,7 +645,7 @@
 		fx_processor = snd_wavefront_new_fx (card,
 						     hw_dev,
 						     acard,
-						     snd_ics2115_port[dev]);
+						     ics2115_port[dev]);
 		if (fx_processor == NULL) {
 			snd_printk ("can't setup FX device\n");
 			snd_card_free(card);
@@ -671,23 +671,23 @@
 	sprintf(card->longname, "%s PCM 0x%lx irq %d dma %d",
 		card->driver,
 		chip->port,
-		snd_cs4232_pcm_irq[dev],
-		snd_dma1[dev]);
+		cs4232_pcm_irq[dev],
+		dma1[dev]);
 
-	if (snd_dma2[dev] >= 0 && snd_dma2[dev] < 8)
-		sprintf(card->longname + strlen(card->longname), "&%d", snd_dma2[dev]);
+	if (dma2[dev] >= 0 && dma2[dev] < 8)
+		sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
 
-	if (snd_cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) {
+	if (cs4232_mpu_port[dev] != SNDRV_AUTO_PORT) {
 		sprintf (card->longname + strlen (card->longname), 
 			 " MPU-401 0x%lx irq %d",
-			 snd_cs4232_mpu_port[dev],
-			 snd_cs4232_mpu_irq[dev]);
+			 cs4232_mpu_port[dev],
+			 cs4232_mpu_irq[dev]);
 	}
 
 	sprintf (card->longname + strlen (card->longname), 
 		 " SYNTH 0x%lx irq %d",
-		 snd_ics2115_port[dev],
-		 snd_ics2115_irq[dev]);
+		 ics2115_port[dev],
+		 ics2115_irq[dev]);
 
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
@@ -706,7 +706,7 @@
         int res;
 
         for ( ; dev < SNDRV_CARDS; dev++) {
-                if (!snd_enable[dev] || !snd_isapnp[dev])
+                if (!enable[dev] || !isapnp[dev])
                         continue;
                 snd_wavefront_isapnp_cards[dev] = card;
                 snd_wavefront_isapnp_id[dev] = id;
@@ -727,10 +727,10 @@
 	int cards = 0;
 	int dev;
 	for (dev = 0; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev])
+		if (!enable[dev])
 			continue;
 #ifdef __ISAPNP__
-		if (snd_isapnp[dev])
+		if (isapnp[dev])
 			continue;
 #endif
 		if (snd_wavefront_probe(dev) >= 0)
@@ -761,13 +761,13 @@
 
 #ifndef MODULE
 
-/* format is: snd-wavefront=snd_enable,snd_index,snd_id,snd_isapnp,
-			    snd_cs4232_pcm_port,snd_cs4232_pcm_irq,
-			    snd_cs4232_mpu_port,snd_cs4232_mpu_irq,
-			    snd_ics2115_port,snd_ics2115_irq,
-			    snd_fm_port,
-			    snd_dma1,snd_dma2,
-			    snd_use_cs4232_midi */
+/* format is: snd-wavefront=enable,index,id,isapnp,
+			    cs4232_pcm_port,cs4232_pcm_irq,
+			    cs4232_mpu_port,cs4232_mpu_irq,
+			    ics2115_port,ics2115_irq,
+			    fm_port,
+			    dma1,dma2,
+			    use_cs4232_midi */
 
 static int __init alsa_card_wavefront_setup(char *str)
 {
@@ -775,20 +775,20 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_isapnp[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_cs4232_pcm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_cs4232_pcm_irq[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_cs4232_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_cs4232_mpu_irq[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_ics2115_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_ics2115_irq[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma1[nr_dev]) == 2 &&
-	       get_option(&str,&snd_dma2[nr_dev]) == 2 &&
-	       get_option(&str,&snd_use_cs4232_midi[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&isapnp[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&cs4232_pcm_port[nr_dev]) == 2 &&
+	       get_option(&str,&cs4232_pcm_irq[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&cs4232_mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,&cs4232_mpu_irq[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&ics2115_port[nr_dev]) == 2 &&
+	       get_option(&str,&ics2115_irq[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,&dma1[nr_dev]) == 2 &&
+	       get_option(&str,&dma2[nr_dev]) == 2 &&
+	       get_option(&str,&use_cs4232_midi[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/oss/Config.help b/sound/oss/Config.help
--- a/sound/oss/Config.help	Wed Oct 30 16:44:19 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,751 +0,0 @@
-CONFIG_SOUND
-  If you have a sound card in your computer, i.e. if it can say more
-  than an occasional beep, say Y.  Be sure to have all the information
-  about your sound card and its configuration down (I/O port,
-  interrupt and DMA channel), because you will be asked for it.
-
-  You want to read the Sound-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>. General information about
-  the modular sound system is contained in the files
-  <file:Documentation/sound/Introduction>.  The file
-  <file:Documentation/sound/README.OSS> contains some slightly
-  outdated but still useful information as well.
-
-  If you have a PnP sound card and you want to configure it at boot
-  time using the ISA PnP tools (read
-  <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
-  compile the sound card support as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want)
-  and load that module after the PnP configuration is finished.  To do
-  this, say M here and read <file:Documentation/modules.txt> as well
-  as <file:Documentation/sound/README.modules>; the module will be
-  called soundcore.o.
-
-  I'm told that even without a sound card, you can make your computer
-  say more than an occasional beep, by programming the PC speaker.
-  Kernel patches and supporting utilities to do that are in the pcsp
-  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
-
-CONFIG_INPUT_GAMEPORT
-  Gameport support is for the standard 15-pin PC gameport.  If you
-  have a joystick, gamepad, gameport card, a soundcard with a gameport
-  or anything else that uses the gameport, say Y or M here and also to
-  at least one of the hardware specific drivers.
-  Please read the file <file:Documentation/input/joystick.txt> which
-  contains more information and the location of the joystick package
-  that you'll need if you use the gameport with a joystick.
-
-  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 gameport.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt>.
-
-CONFIG_SOUND_OSS
-  OSS is the Open Sound System suite of sound card drivers.  They make
-  sound programming easier since they provide a common API.  Say Y or
-  M here (the module will be called sound.o) if you haven't found a
-  driver for your sound card above, then pick your driver from the
-  list below.
-
-CONFIG_SOUND_DMAP
-  Linux can often have problems allocating DMA buffers for ISA sound
-  cards on machines with more than 16MB of RAM. This is because ISA
-  DMA buffers must exist below the 16MB boundary and it is quite
-  possible that a large enough free block in this region cannot be
-  found after the machine has been running for a while. If you say Y
-  here the DMA buffers (64Kb) will be allocated at boot time and kept
-  until the shutdown. This option is only useful if you said Y to
-  "OSS sound modules", above. If you said M to "OSS sound modules"
-  then you can get the persistent DMA buffer functionality by passing
-  the command-line argument "dmabuf=1" to the sound.o module.
-
-  Say Y unless you have 16MB or more RAM or a PCI sound card.
-
-CONFIG_SOUND_SGALAXY
-  This module initializes the older non Plug and Play sound galaxy
-  cards from Aztech. It supports the Waverider Pro 32 - 3D and the
-  Galaxy Washington 16.
-
-  If you compile the driver into the kernel, you have to add
-  "sgalaxy=<io>,<irq>,<dma>,<dma2>,<sgbase>" to the kernel command
-  line.
-
-CONFIG_SOUND_AD1816
-  Say M here if you have a sound card based on the Analog Devices
-  AD1816(A) chip.
-
-  If you compile the driver into the kernel, you have to add
-  "ad1816=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
-
-CONFIG_SOUND_OPL3SA1
-  Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is
-  usually built into motherboards. Read
-  <file:Documentation/sound/OPL3-SA> for details.
-
-  If you compile the driver into the kernel, you have to add
-  "opl3sa=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel
-  command line.
-
-CONFIG_SOUND_PAS
-  Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio
-  16 or Logitech SoundMan 16 sound card. Answer N if you have some
-  other card made by Media Vision or Logitech since those are not
-  PAS16 compatible. Please read <file:Documentation/sound/PAS16>.
-  It is not necessary to add Sound Blaster support separately; it
-  is included in PAS support.
-
-  If you compile the driver into the kernel, you have to add
-  "pas2=<io>,<irq>,<dma>,<dma2>,<sbio>,<sbirq>,<sbdma>,<sbdma2>
-  to the kernel command line.
-
-CONFIG_PAS_JOYSTICK
-  Say Y here to enable the Pro Audio Spectrum 16's auxiliary joystick
-  port.
-
-CONFIG_SOUND_SB
-  Answer Y if you have an original Sound Blaster card made by Creative
-  Labs or a 100% hardware compatible clone (like the Thunderboard or
-  SM Games). For an unknown card you may answer Y if the card claims
-  to be Sound Blaster-compatible.
-
-  Please read the file <file:Documentation/sound/Soundblaster>.
-
-  You should also say Y here for cards based on the Avance Logic
-  ALS-007 and ALS-1X0 chips (read <file:Documentation/sound/ALS>) and
-  for cards based on ESS chips (read
-  <file:Documentation/sound/ESS1868> and
-  <file:Documentation/sound/ESS>). If you have an SB AWE 32 or SB AWE
-  64, say Y here and also to "AWE32 synth" below and read
-  <file:Documentation/sound/INSTALL.awe>. If you have an IBM Mwave
-  card, say Y here and read <file:Documentation/sound/mwave>.
-
-  If you compile the driver into the kernel and don't want to use
-  isapnp, you have to add "sb=<io>,<irq>,<dma>,<dma2>" to the kernel
-  command line.
-
-  You can say M here to compile this driver as a module; the module is
-  called sb.o.
-
-CONFIG_SOUND_GUS
-  Say Y here for any type of Gravis Ultrasound card, including the GUS
-  or GUS MAX.  See also <file:Documentation/sound/ultrasound> for more
-  information on configuring this card with modules.
-
-  If you compile the driver into the kernel, you have to add
-  "gus=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
-
-CONFIG_SOUND_MPU401
-  Be careful with this question.  The MPU401 interface is supported by
-  all sound cards.  However, some natively supported cards have their
-  own driver for MPU401.  Enabling this MPU401 option with these cards
-  will cause a conflict.  Also, enabling MPU401 on a system that
-  doesn't really have a MPU401 could cause some trouble.  If your card
-  was in the list of supported cards, look at the card specific
-  instructions in the <file:Documentation/sound/README.OSS> file.  It
-  is safe to answer Y if you have a true MPU401 MIDI interface card.
-
-  If you compile the driver into the kernel, you have to add
-  "mpu401=<io>,<irq>" to the kernel command line.
-
-CONFIG_SOUND_UART6850
-  This option enables support for MIDI interfaces based on the 6850
-  UART chip. This interface is rarely found on sound cards. It's safe
-  to answer N to this question.
-
-  If you compile the driver into the kernel, you have to add
-  "uart6850=<io>,<irq>" to the kernel command line.
-
-CONFIG_SOUND_PSS
-  Answer Y or M if you have an Orchid SW32, Cardinal DSP16, Beethoven
-  ADSP-16 or some other card based on the PSS chipset (AD1848 codec +
-  ADSP-2115 DSP chip + Echo ESC614 ASIC CHIP). For more information on
-  how to compile it into the kernel or as a module see the file
-  <file:Documentation/sound/PSS>.
-
-  If you compile the driver into the kernel, you have to add
-  "pss=<io>,<mssio>,<mssirq>,<mssdma>,<mpuio>,<mpuirq>" to the kernel
-  command line.
-
-CONFIG_PSS_MIXER
-  Answer Y for Beethoven ADSP-16. You may try to say Y also for other
-  cards if they have master volume, bass, treble, and you can't
-  control it under Linux. If you answer N for Beethoven ADSP-16, you
-  can't control master volume, bass, treble and synth volume.
-
-  If you said M to "PSS support" above, you may enable or disable this
-  PSS mixer with the module parameter pss_mixer. For more information
-  see the file <file:Documentation/sound/PSS>.
-
-CONFIG_PSS_HAVE_BOOT
-  If you have the DSPxxx.LD file or SYNTH.LD file for you card, say Y
-  to include this file. Without this file the synth device (OPL) may
-  not work.
-
-CONFIG_PSS_BOOT_FILE
-  Enter the full pathname of your DSPxxx.LD file or SYNTH.LD file,
-  starting from /.
-
-CONFIG_SOUND_MSS
-  Again think carefully before answering Y to this question.  It's
-  safe to answer Y if you have the original Windows Sound System card
-  made by Microsoft or Aztech SG 16 Pro (or NX16 Pro).  Also you may
-  say Y in case your card is NOT among these:
-
-     ATI Stereo F/X, AdLib, Audio Excell DSP16, Cardinal DSP16,
-     Ensoniq SoundScape (and compatibles made by Reveal and Spea),
-     Gravis Ultrasound, Gravis Ultrasound ACE, Gravis Ultrasound Max,
-     Gravis Ultrasound with 16 bit option, Logitech Sound Man 16,
-     Logitech SoundMan Games, Logitech SoundMan Wave, MAD16 Pro (OPTi
-     82C929), Media Vision Jazz16, MediaTriX AudioTriX Pro, Microsoft
-     Windows Sound System (MSS/WSS), Mozart (OAK OTI-601), Orchid
-     SW32, Personal Sound System (PSS), Pro Audio Spectrum 16, Pro
-     Audio Studio 16, Pro Sonic 16, Roland MPU-401 MIDI interface,
-     Sound Blaster 1.0, Sound Blaster 16, Sound Blaster 16ASP, Sound
-     Blaster 2.0, Sound Blaster AWE32, Sound Blaster Pro, TI TM4000M
-     notebook, ThunderBoard, Turtle Beach Tropez, Yamaha FM
-     synthesizers (OPL2, OPL3 and OPL4), 6850 UART MIDI Interface.
-
-  For cards having native support in VoxWare, consult the card
-  specific instructions in <file:Documentation/sound/README.OSS>.
-  Some drivers have their own MSS support and saying Y to this option
-  will cause a conflict.
-
-  If you compile the driver into the kernel, you have to add
-  "ad1848=<io>,<irq>,<dma>,<dma2>[,<type>]" to the kernel command
-  line.
-
-CONFIG_SOUND_VWSND
-  Say Y or M if you have an SGI Visual Workstation and you want to be
-  able to use its on-board audio.  Read
-  <file:Documentation/sound/vwsnd> for more info on this driver's
-  capabilities.
-
-CONFIG_SOUND_SSCAPE
-  Answer Y if you have a sound card based on the Ensoniq SoundScape
-  chipset. Such cards are being manufactured at least by Ensoniq, Spea
-  and Reveal (Reveal makes also other cards).
-
-  If you compile the driver into the kernel, you have to add
-  "sscape=<io>,<irq>,<dma>,<mpuio>,<mpuirq>" to the kernel command
-  line.
-
-CONFIG_SOUND_TRIX
-  Answer Y if you have the AudioTriX Pro sound card manufactured
-  by MediaTrix.
-
-CONFIG_TRIX_HAVE_BOOT
-  The MediaTrix AudioTrix Pro has an on-board microcontroller which
-  needs to be initialized by downloading the code from the file
-  TRXPRO.HEX in the DOS driver directory. If you don't have the
-  TRXPRO.HEX file handy you may skip this step. However, the SB and
-  MPU-401 modes of AudioTrix Pro will not work without this file!
-
-CONFIG_TRIX_BOOT_FILE
-  Enter the full pathname of your TRXPRO.HEX file, starting from /.
-
-CONFIG_SOUND_MAD16
-  Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
-  82C928 or 82C929 or 82C931) audio interface chip. These chips are
-  quite common so it's possible that many no-name cards have one of
-  them. In addition the MAD16 chip is used in some cards made by known
-  manufacturers such as Turtle Beach (Tropez), Reveal (some models)
-  and Diamond (latest ones). Note however that the Tropez sound cards
-  have their own driver; if you have one of those, say N here and Y or
-  M to "Full support for Turtle Beach WaveFront", below.
-
-  If you compile the driver into the kernel, you have to add
-  "mad16=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the
-  kernel command line.
-
-  See also <file:Documentation/sound/Opti> and
-  <file:Documentation/sound/MAD16> for more information on setting
-  these cards up as modules.
-
-CONFIG_SOUND_WAVEFRONT
-  Answer Y or M if you have a Tropez Plus, Tropez or Maui sound card
-  and read the files <file:Documentation/sound/Wavefront> and
-  <file:Documentation/sound/Tropez+>.
-
-CONFIG_MAD16_OLDCARD
-  Answer Y (or M) if you have an older card based on the C928 or
-  Mozart chipset and you want to have MIDI support. If you enable this
-  option you also need to enable support for Sound Blaster.
-
-CONFIG_SOUND_CS4232
-  Say Y here if you have a card based on the Crystal CS4232 chip set,
-  which uses its own Plug and Play protocol.
-
-  If you compile the driver into the kernel, you have to add
-  "cs4232=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel
-  command line.
-
-  See <file:Documentation/sound/CS4232> for more information on
-  configuring this card.
-
-CONFIG_SOUND_OPL3SA2
-  Say Y or M if you have a card based on one of these Yamaha sound
-  chipsets or the "SAx", which is actually a SA3. Read
-  <file:Documentation/sound/OPL3-SA2> for more information on
-  configuring these cards.
-
-  If you compile the driver into the kernel and do not also
-  configure in the optional ISA PnP support, you will have to add
-  "opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>" to the kernel
-  command line.
-
-CONFIG_SOUND_MAUI
-  Say Y here if you have a Turtle Beach Wave Front, Maui, or Tropez
-  sound card.
-
-  If you compile the driver into the kernel, you have to add
-  "maui=<io>,<irq>" to the kernel command line.
-
-CONFIG_MAUI_HAVE_BOOT
-  Turtle Beach Maui and Tropez sound cards have a microcontroller
-  which needs to be initialized prior to use. OSWF.MOT is a file
-  distributed with the card's DOS/Windows drivers. Answer Y if you
-  have this file.
-
-CONFIG_MAUI_BOOT_FILE
-  Enter the full pathname of your OSWF.MOT file, starting from /.
-
-CONFIG_SOUND_MSNDCLAS
-  Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or
-  Monterey (not for the Pinnacle or Fiji).
-
-  See <file:Documentation/sound/MultiSound> for important information
-  about this driver.  Note that it has been discontinued, but the
-  Voyetra Turtle Beach knowledge base entry for it is still available
-  at <http://www.voyetra-turtle-beach.com/site/kb_ftp/790.asp>.
-
-CONFIG_MSNDCLAS_IO
-  I/O port address for the MultiSound Classic and related cards.
-
-CONFIG_MSNDCLAS_IRQ
-  Interrupt Request line for the MultiSound Classic and related cards.
-
-CONFIG_MSNDCLAS_MEM
-  Memory-mapped I/O base address for the MultiSound Classic and
-  related cards.
-
-CONFIG_MSNDCLAS_INIT_FILE
-  The MultiSound cards have two firmware files which are required for
-  operation, and are not currently included. These files can be
-  obtained from Turtle Beach. See
-  <file:Documentation/sound/MultiSound> for information on how to
-  obtain this.
-
-CONFIG_MSNDCLAS_PERM_FILE
-  The MultiSound cards have two firmware files which are required for
-  operation, and are not currently included. These files can be
-  obtained from Turtle Beach. See
-  <file:Documentation/sound/MultiSound> for information on how to
-  obtain this.
-
-CONFIG_SOUND_MSNDPIN
-  Say M here if you have a Turtle Beach MultiSound Pinnacle or Fiji.
-  See <file:Documentation/sound/MultiSound> for important information
-  about this driver. Note that it has been discontinued, but the
-  Voyetra Turtle Beach knowledge base entry for it is still available
-  at <http://www.voyetra-turtle-beach.com/site/kb_ftp/600.asp>.
-
-CONFIG_MSNDPIN_IDE_IO0
-  CD-ROM drive 0 memory-mapped I/O base address for the MultiSound
-  Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_IDE_IO1
-  CD-ROM drive 1 memory-mapped I/O base address for the MultiSound
-  Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_IDE_IRQ
-  Interrupt request number for the IDE CD-ROM interface on the
-  MultiSound Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_IO
-  Memory-mapped I/O base address for the primary synthesizer on
-  MultiSound Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_MPU_IO
-  Memory-mapped I/O base address for the Kurzweil daughterboard
-  synthesizer on MultiSound Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_MPU_IRQ
-  Iinterrupt request number for the Kurzweil daughterboard
-  synthesizer on MultiSound Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_IRQ
-  Interrupt request line for the primary synthesizer on MultiSound
-  Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_JOYSTICK_IO
-  Memory-mapped I/O base address for the joystick port on MultiSound
-  Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_MEM
-  Memory-mapped I/O base address for the primary synthesizer on
-  MultiSound Pinnacle and Fiji sound cards.
-
-CONFIG_MSNDPIN_INIT_FILE
-  The MultiSound cards have two firmware files which are required
-  for operation, and are not currently included. These files can be
-  obtained from Turtle Beach. See
-  <file:Documentation/sound/MultiSound> for information on how to
-  obtain this.
-
-CONFIG_MSNDPIN_PERM_FILE
-  The MultiSound cards have two firmware files which are required for
-  operation, and are not currently included. These files can be
-  obtained from Turtle Beach. See
-  <file:Documentation/sound/MultiSound> for information on how to
-  obtain this.
-
-CONFIG_MSNDPIN_DIGITAL
-  If you have the S/PDIF daughter board for the Pinnacle or Fiji,
-  answer Y here; otherwise, say N. If you have this, you will be able
-  to play and record from the S/PDIF port (digital signal). See
-  <file:Documentation/sound/MultiSound> for information on how to make
-  use of this capability.
-
-CONFIG_MSNDPIN_NONPNP
-  The Pinnacle and Fiji card resources can be configured either with
-  PnP, or through a configuration port. Say Y here if your card is NOT
-  in PnP mode. For the Pinnacle, configuration in non-PnP mode allows
-  use of the IDE and joystick peripherals on the card as well; these
-  do not show up when the card is in PnP mode. Specifying zero for any
-  resource of a device will disable the device. If you are running the
-  card in PnP mode, you must say N here and use isapnptools to
-  configure the card's resources.
-
-CONFIG_MSNDPIN_CFG
-  This is the port which the Pinnacle and Fiji uses to configure the
-  card's resources when not in PnP mode. If your card is in PnP mode,
-  then be sure to say N to the previous option, "MSND Pinnacle Non-PnP
-  Mode".
-
-CONFIG_MSND_FIFOSIZE
-  Configures the size of each audio buffer, in kilobytes, for
-  recording and playing in the MultiSound drivers (both the Classic
-  and Pinnacle). Larger values reduce the chance of data overruns at
-  the expense of overall latency. If unsure, use the default.
-
-CONFIG_SOUND_YM3812
-  Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
-  Answering Y is usually a safe and recommended choice, however some
-  cards may have software (TSR) FM emulation. Enabling FM support with
-  these cards may cause trouble (I don't currently know of any such
-  cards, however). Please read the file
-  <file:Documentation/sound/OPL3> if your card has an OPL3 chip.
-
-  If you compile the driver into the kernel, you have to add
-  "opl3=<io>" to the kernel command line.
-
-  If unsure, say Y.
-
-CONFIG_SOUND_ACI_MIXER
-  ACI (Audio Command Interface) is a protocol used to communicate with
-  the microcontroller on some sound cards produced by miro and
-  Cardinal Technologies.  The main function of the ACI is to control
-  the mixer and to get a product identification.
-
-  This VoxWare ACI driver currently supports the ACI functions on the
-  miroSOUND PCM1-pro, PCM12 and PCM20 radio. On the PCM20 radio, ACI
-  also controls the radio tuner. This is supported in the video4linux
-  miropcm20 driver (say M or Y here and go back to "Multimedia
-  devices" -> "Radio Adapters").
-
-  This driver is also available as a module and will be called aci.o.
-
-CONFIG_SOUND_AWE32_SYNTH
-  Say Y here if you have a Sound Blaster SB32, AWE32-PnP, SB AWE64 or
-  similar sound card. See <file:Documentation/sound/README.awe>,
-  <file:Documentation/sound/AWE32> and the Soundblaster-AWE
-  mini-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>
-  for more info.
-
-CONFIG_SOUND_AEDSP16
-  Answer Y if you have a Gallant's Audio Excel DSP 16 card. This
-  driver supports Audio Excel DSP 16 but not the III nor PnP versions
-  of this card.
-
-  The Gallant's Audio Excel DSP 16 card can emulate either an SBPro or
-  a Microsoft Sound System card, so you should have said Y to either
-  "100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support"
-  or "Microsoft Sound System support", above, and you need to answer
-  the "MSS emulation" and "SBPro emulation" questions below
-  accordingly. You should say Y to one and only one of these two
-  questions.
-
-  Read the <file:Documentation/sound/README.OSS> file and the head of
-  <file:drivers/sound/aedsp16.c> as well as
-  <file:Documentation/sound/AudioExcelDSP16> to get more information
-  about this driver and its configuration.
-
-CONFIG_AEDSP16_SBPRO
-  Answer Y if you want your audio card to emulate Sound Blaster Pro.
-  You should then say Y to "100% Sound Blaster compatibles
-  (SB16/32/64, ESS, Jazz16) support" and N to "Audio Excel DSP 16 (MSS
-  emulation)".
-
-  If you compile the driver into the kernel, you have to add
-  "aedsp16=<io>,<irq>,<dma>,<mssio>,<mpuio>,<mouirq>" to the kernel
-  command line.
-
-CONFIG_AEDSP16_MSS
-  Answer Y if you want your audio card to emulate Microsoft Sound
-  System. You should then say Y to "Microsoft Sound System support"
-  and say N to "Audio Excel DSP 16 (SBPro emulation)".
-
-CONFIG_SC6600
-  The SC6600 is the new version of DSP mounted on the Audio Excel DSP
-  16 cards. Find in the manual the FCC ID of your audio card and
-  answer Y if you have an SC6600 DSP.
-
-CONFIG_SC6600_JOY
-  Say Y here in order to use the joystick interface of the Audio Excel
-  DSP 16 card.
-
-CONFIG_SC6600_CDROMBASE
-  Base I/O port address for the CD-ROM interface of the Audio Excel
-  DSP 16 card.
-
-CONFIG_AEDSP16_MPU401
-  Answer Y if you want your audio card to emulate the MPU-401 midi
-  interface. You should then also say Y to "MPU-401 support".
-
-  Note that the I/O base for MPU-401 support of aedsp16 is the same
-  you have selected for "MPU-401 support". If you are using this
-  driver as a module you have to specify the MPU I/O base address with
-  the parameter 'mpu_base=0xNNN'.
-
-CONFIG_SOUND_CMPCI
-  Say Y or M if you have a PCI sound card using the CMI8338
-  or the CMI8378 chipset.  Data on these chips are available at
-  <http://www.cmedia.com.tw/>.
-
-  A userspace utility to control some internal registers of these
-  chips is available at
-  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
-
-CONFIG_SOUND_CMPCI_CM8738
-  Say Y or M if you have a PCI sound card using the CMI8338
-  or the CMI8378 chipset.  Data on this chip is available at
-  <http://www.cmedia.com.tw/doc8738.htm>.
-
-  A userspace utility to control some internal registers of these
-  chips is available at
-  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
-
-CONFIG_SOUND_CMPCI_JOYSTICK
-  Say here in order to enable the joystick port on a sound crd using
-  the CMI8338 or the CMI8738 chipset.  Data on these chips are
-  available at <http://www.cmedia.com.tw/>.
-
-CONFIG_SOUND_CMPCI_SPEAKERS
-  Specify the number of speaker channels you want the card to drive,
-  as an integer.
-
-CONFIG_SOUND_CMPCI_SPDIFLOOP
-  Enable loopback from SPDIF in to SPDIF out.  For discussion, see
-  "The 8738 Audio SPDIF In/Out Technical Data" on the technical
-  support page at <http://www.cmedia.com.tw/>.
-
-  A userspace utility to control even more internal registers of these
-  chips is available at
-  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
-  This package will among other things help you enable SPDIF 
-  out/in/loop/monitor.
-
-CONFIG_SOUND_EMU10K1
-  Say Y or M if you have a PCI sound card using the EMU10K1 chipset,
-  such as the Creative SBLive!, SB PCI512 or Emu-APS.
-
-  For more information on this driver and the degree of support for the
-  different card models please check <http://opensource.creative.com/>.
-
-  It is now possible to load dsp microcode patches into the EMU10K1
-  chip.  These patches are used to implement real time sound
-  processing effects which include for example: signal routing,
-  bass/treble control, AC3 passthrough, ...
-  Userspace tools to create new patches and load/unload them can be
-  found at <http://opensource.creative.com/dist.html>.
-
-CONFIG_MIDI_EMU10K1
-  Say Y if you want to be able to use the OSS /dev/sequencer
-  interface.  This code is still experimental.
-
-CONFIG_SOUND_FUSION
-  This module drives the Crystal SoundFusion devices (CS4280/46xx
-  series) when wired as native sound drivers with AC97 codecs.  If
-  this driver does not work try the CS4232 driver.
-
-CONFIG_SOUND_ES1370
-  Say Y or M if you have a PCI sound card utilizing the Ensoniq
-  ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find
-  out if your sound card uses an ES1370 without removing your
-  computer's cover, use lspci -n and look for the PCI ID
-  1274:5000. Since Ensoniq was bought by Creative Labs,
-  Sound Blaster 64/PCI models are either ES1370 or ES1371 based.
-  This driver differs slightly from OSS/Free, so PLEASE READ
-  <file:Documentation/sound/es1370>.
-
-CONFIG_SOUND_ES1371
-  Say Y or M if you have a PCI sound card utilizing the Ensoniq
-  ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
-  your sound card uses an ES1371 without removing your computer's
-  cover, use lspci -n and look for the PCI ID 1274:1371. Since
-  Ensoniq was bought by Creative Labs, Sound Blaster 64/PCI
-  models are either ES1370 or ES1371 based. This driver differs
-  slightly from OSS/Free, so PLEASE READ
-  <file:Documentation/sound/es1371>.
-
-CONFIG_SOUND_ESSSOLO1
-  Say Y or M if you have a PCI sound card utilizing the ESS Technology
-  Solo1 chip. To find out if your sound card uses a
-  Solo1 chip without removing your computer's cover, use
-  lspci -n and look for the PCI ID 125D:1969. This driver
-  differs slightly from OSS/Free, so PLEASE READ
-  <file:Documentation/sound/solo1>.
-
-CONFIG_SOUND_SONICVIBES
-  Say Y or M if you have a PCI sound card utilizing the S3
-  SonicVibes chipset. To find out if your sound card uses a
-  SonicVibes chip without removing your computer's cover, use
-  lspci -n and look for the PCI ID 5333:CA00. This driver
-  differs slightly from OSS/Free, so PLEASE READ
-  <file:Documentation/sound/sonicvibes>.
-
-CONFIG_SOUND_TRIDENT
-  Say Y or M if you have a PCI sound card utilizing the Trident
-  4DWave-DX/NX chipset or your mother board chipset has SiS 7018
-  or ALi 5451 built-in. The SiS 7018 PCI Audio Core is embedded
-  in SiS960 Super South Bridge and SiS540/630 Single Chipset.
-  The ALi 5451 PCI Audio Core is embedded in ALi M1535, M1535D,
-  M1535+ or M1535D+ South Bridge.
-
-  Use lspci -n to find out if your sound card or chipset uses
-  Trident 4DWave or SiS 7018. PCI ID 1023:2000 or 1023:2001 stands
-  for Trident 4Dwave. PCI ID 1039:7018 stands for SiS7018. PCI ID
-  10B9:5451 stands for ALi5451.
-
-  This driver supports S/PDIF in/out (record/playback) for ALi 5451
-  embedded in ALi M1535+ and M1535D+. Note that they aren't all
-  enabled by default; you can enable them by saying Y to "/proc file
-  system support" and "Sysctl support", and after the /proc file
-  system has been mounted, executing the command
-
-	command			what is enabled
-
-  echo 0>/proc/ALi5451	pcm out is also set to S/PDIF out. (Default).
-
-  echo 1>/proc/ALi5451	use S/PDIF out to output pcm data.
-
-  echo 2>/proc/ALi5451	use S/PDIF out to output non-pcm data.
-                        (AC3...).
-
-  echo 3>/proc/ALi5451	record from Ac97 in(MIC, Line in...).
-                        (Default).
-
-  echo 4>/proc/ALi5451	no matter Ac97 settings, record from S/PDIF
-                        in.
-
-
-  This driver differs slightly from OSS/Free, so PLEASE READ the
-  comments at the top of <file:drivers/sound/trident.c>.
-
-CONFIG_SOUND_WAVEARTIST
-  Say Y here to include support for the Rockwell WaveArtist sound
-  system.  This driver is mainly for the NetWinder.
-
-CONFIG_SOUND_VIA82CXXX
-  Say Y here to include support for the audio codec found on VIA
-  82Cxxx-based chips. Typically these are built into a motherboard.
-
-  DO NOT select Sound Blaster or Adlib with this driver, unless
-  you have a Sound Blaster or Adlib card in addition to your VIA
-  audio chip.
-
-CONFIG_MIDI_VIA82CXXX
-  Answer Y to use the MIDI interface of the Via686. You may need to
-  enable this in the BIOS before it will work. This is for connection
-  to external MIDI hardware, and is not required for software playback
-  of MIDI files.
-
-CONFIG_SOUND_NM256
-  Say M here to include audio support for the NeoMagic 256AV/256ZX
-  chipsets. These are the audio chipsets found in the Sony
-  Z505S/SX/DX, some Sony F-series, and the Dell Latitude CPi and CPt
-  laptops. It includes support for an AC97-compatible mixer and an
-  apparently proprietary sound engine.
-
-  See <file:Documentation/sound/NM256> for further information.
-
-CONFIG_SOUND_MAESTRO
-  Say Y or M if you have a sound system driven by ESS's Maestro line
-  of PCI sound chips.  These include the Maestro 1, Maestro 2, and
-  Maestro 2E.  See <file:Documentation/sound/Maestro> for more
-  details.
-
-CONFIG_SOUND_MAESTRO3
-  Say Y or M if you have a sound system driven by ESS's Maestro 3
-  PCI sound chip.
-
-CONFIG_SOUND_ADLIB
-  Includes ASB 64 4D. Information on programming AdLib cards is
-  available at <http://www.itsnet.com/home/ldragon/Specs/adlib.html>.
-
-CONFIG_SOUND_CS4281
-  Picture and feature list at
-  <http://www.pcbroker.com/crystal4281.html>.
-
-CONFIG_SOUND_GUS16
-  Support for Gravis Ulstrasound (GUS) cards (other than the GUS),
-  sampling at 16-bit width.
-
-CONFIG_SOUND_GUSMAX
-  Support for Gravis Ulstrasound MAX.
-
-CONFIG_SOUND_ICH
-  Support for integral audio in Intel's I/O Controller Hub (ICH)
-  chipset, as used on the 810/820/840 motherboards.
-
-CONFIG_SOUND_TRACEINIT
-  Verbose soundcard initialization -- affects the format of autoprobe
-  and initialization messages at boot time.
-
-CONFIG_SOUND_TVMIXER
-  Support for audio mixer facilities on the BT848 TV frame-grabber
-  card.
-
-CONFIG_SOUND_VIDC
-  16-bit support for the VIDC onboard sound hardware found on Acorn
-  machines.
-
-CONFIG_SOUND_VMIDI
-  Support for MIDI loopback on port 1 or 2.
-
-CONFIG_SOUND_YMFPCI
-  Support for Yamaha cards including the YMF711, YMF715, YMF718,
-  YMF719, YMF724, Waveforce 192XG, and Waveforce 192 Digital.
-
-CONFIG_SOUND_YMFPCI_LEGACY
-  Support for YMF7xx PCI cards emulating an MP401.
-
-CONFIG_SOUND_RME96XX
-  Say Y or M if you have a Hammerfall, Hammerfall light or Hammerfall
-  DSP card from RME.
-
-CONFIG_SOUND_BT878
-  Audio DMA support for bt878 based grabber boards.  As you might have
-  already noticed, bt878 is listed with two functions in /proc/pci.
-  Function 0 does the video stuff (bt848 compatible), function 1 does
-  the same for audio data.  This is a driver for the audio part of
-  the chip.  If you say 'Y' here you get a oss-compatible dsp device
-  where you can record from.  If you want just watch TV you probably
-  don't need this driver as most TV cards handle sound with a short
-  cable from the TV card to your sound card's line-in.
-
-  This driver is available as a module called btaudio.o ( = code
-  which can be inserted in and removed from the running kernel
-  whenever you want). If you want to compile it as a module, say M
-  here and read <file:Documentation/modules.txt>.
-
diff -Nru a/sound/oss/Config.in b/sound/oss/Config.in
--- a/sound/oss/Config.in	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,212 +0,0 @@
-# drivers/sound/Config.in
-#
-# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
-# More hacking for modularisation.
-#
-
-# Prompt user for primary drivers.
-
-dep_tristate '  BT878 audio dma' CONFIG_SOUND_BT878 $CONFIG_SOUND
-dep_tristate '  C-Media PCI (CMI8338/8738)' CONFIG_SOUND_CMPCI $CONFIG_SOUND $CONFIG_PCI
-if [ "$CONFIG_SOUND_CMPCI" = "y" -o "$CONFIG_SOUND_CMPCI" = "m" ]; then
-    bool '    Enable legacy FM' CONFIG_SOUND_CMPCI_FM
-    if [ "$CONFIG_SOUND_CMPCI_FM" = "y" ]; then
-        hex '    FM I/O 388, 3C8, 3E0, 3E8' CONFIG_SOUND_CMPCI_FMIO 388
-    fi
-    bool '    Enable legacy MPU-401' CONFIG_SOUND_CMPCI_MIDI
-    if [ "$CONFIG_SOUND_CMPCI_MIDI" = "y" ]; then
-        hex '    MPU-401 I/O 330, 320, 310, 300' CONFIG_SOUND_CMPCI_MPUIO 330
-    fi
-    bool '    Enable joystick' CONFIG_SOUND_CMPCI_JOYSTICK
-    bool '    Support CMI8738 based audio cards' CONFIG_SOUND_CMPCI_CM8738
-    if [ "$CONFIG_SOUND_CMPCI_CM8738" = "y" ]; then
-	bool '      Inverse S/PDIF in for CMI8738' CONFIG_SOUND_CMPCI_SPDIFINVERSE
-	bool '      Enable S/PDIF loop for CMI8738' CONFIG_SOUND_CMPCI_SPDIFLOOP
-	int  '      Number of speakers 2, 4, 5, 6' CONFIG_SOUND_CMPCI_SPEAKERS 2
-	if [ "$CONFIG_SOUND_CMPCI_SPEAKERS" != "2" ]; then
-	    bool '        Use Line-in as Read-out' CONFIG_SOUND_CMPCI_LINE_REAR
-	    bool '        Use Line-in as Bass' CONFIG_SOUND_CMPCI_LINE_BASS
-	fi
-    fi
-fi
-dep_tristate '  Creative SBLive! (EMU10K1)' CONFIG_SOUND_EMU10K1 $CONFIG_SOUND $CONFIG_PCI
-dep_mbool    '    Creative SBLive! MIDI (EXPERIMENTAL)' CONFIG_MIDI_EMU10K1 $CONFIG_SOUND_EMU10K1 $CONFIG_EXPERIMENTAL
-dep_tristate '  Crystal SoundFusion (CS4280/461x)' CONFIG_SOUND_FUSION $CONFIG_SOUND
-dep_tristate '  Crystal Sound CS4281' CONFIG_SOUND_CS4281 $CONFIG_SOUND
-dep_tristate '  Ensoniq AudioPCI (ES1370)' CONFIG_SOUND_ES1370 $CONFIG_SOUND $CONFIG_PCI $CONFIG_SOUND_GAMEPORT
-dep_tristate '  Creative Ensoniq AudioPCI 97 (ES1371)' CONFIG_SOUND_ES1371 $CONFIG_SOUND $CONFIG_PCI $CONFIG_SOUND_GAMEPORT
-dep_tristate '  ESS Technology Solo1' CONFIG_SOUND_ESSSOLO1 $CONFIG_SOUND $CONFIG_SOUND_GAMEPORT
-dep_tristate '  ESS Maestro, Maestro2, Maestro2E driver' CONFIG_SOUND_MAESTRO $CONFIG_SOUND
-dep_tristate '  ESS Maestro3/Allegro driver (EXPERIMENTAL)' CONFIG_SOUND_MAESTRO3 $CONFIG_SOUND $CONFIG_PCI $CONFIG_EXPERIMENTAL
-dep_tristate '  Intel ICH (i8xx) audio support' CONFIG_SOUND_ICH $CONFIG_PCI
-dep_tristate '  RME Hammerfall (RME96XX) support (EXPERIMENTAL)' CONFIG_SOUND_RME96XX $CONFIG_SOUND $CONFIG_PCI $CONFIG_EXPERIMENTAL
-dep_tristate '  S3 SonicVibes' CONFIG_SOUND_SONICVIBES $CONFIG_SOUND $CONFIG_SOUND_GAMEPORT
-if [ "$CONFIG_VISWS" = "y" ]; then
-    dep_tristate '  SGI Visual Workstation Sound' CONFIG_SOUND_VWSND $CONFIG_SOUND
-fi
-if [ "$CONFIG_DDB5477" = "y" ]; then
-    dep_tristate '  NEC Vrc5477 AC97 sound' CONFIG_SOUND_VRC5477 $CONFIG_SOUND
-fi
-dep_tristate '  Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core' CONFIG_SOUND_TRIDENT $CONFIG_SOUND $CONFIG_SOUND_GAMEPORT
-
-dep_tristate '  Support for Turtle Beach MultiSound Classic, Tahiti, Monterey' CONFIG_SOUND_MSNDCLAS $CONFIG_SOUND
-if [ "$CONFIG_SOUND_MSNDCLAS" = "y" -o "$CONFIG_SOUND_MSNDCLAS" = "m" ]; then
-   if [ "$CONFIG_SOUND_MSNDCLAS" = "y" ]; then
-     comment '  Compiled-in MSND Classic support requires firmware during compilation.'
-     define_bool CONFIG_MSNDCLAS_HAVE_BOOT y
-   else
-     define_bool CONFIG_MSNDCLAS_HAVE_BOOT n
-   fi
-   string 'Full pathname of MSNDINIT.BIN firmware file' CONFIG_MSNDCLAS_INIT_FILE "/etc/sound/msndinit.bin"
-   string 'Full pathname of MSNDPERM.BIN firmware file' CONFIG_MSNDCLAS_PERM_FILE "/etc/sound/msndperm.bin"
-fi
-if [ "$CONFIG_SOUND_MSNDCLAS" = "y" ]; then
-   int '  MSND Classic IRQ 5, 7, 9, 10, 11, 12' CONFIG_MSNDCLAS_IRQ 5
-   hex '  MSND Classic memory B0000, C8000, D0000, D8000, E0000, E8000' CONFIG_MSNDCLAS_MEM D0000
-   hex '  MSND Classic I/O 210, 220, 230, 240, 250, 260, 290, 3E0' CONFIG_MSNDCLAS_IO 290
-fi
-
-dep_tristate '  Support for Turtle Beach MultiSound Pinnacle, Fiji' CONFIG_SOUND_MSNDPIN $CONFIG_SOUND
-if [ "$CONFIG_SOUND_MSNDPIN" = "y" -o "$CONFIG_SOUND_MSNDPIN" = "m" ]; then
-   if [ "$CONFIG_SOUND_MSNDPIN" = "y" ]; then
-     comment 'Compiled-in MSND Pinnacle support requires firmware during compilation.'
-     define_bool CONFIG_MSNDPIN_HAVE_BOOT y
-   else
-     define_bool CONFIG_MSNDPIN_HAVE_BOOT n
-   fi
-   string '  Full pathname of PNDSPINI.BIN firmware file' CONFIG_MSNDPIN_INIT_FILE "/etc/sound/pndspini.bin"
-   string '  Full pathname of PNDSPERM.BIN firmware file' CONFIG_MSNDPIN_PERM_FILE "/etc/sound/pndsperm.bin"
-fi
-if [ "$CONFIG_SOUND_MSNDPIN" = "y" ]; then
-   int '    MSND Pinnacle IRQ 5, 7, 9, 10, 11, 12' CONFIG_MSNDPIN_IRQ 5
-   hex '    MSND Pinnacle memory B0000, C8000, D0000, D8000, E0000, E8000' CONFIG_MSNDPIN_MEM D0000
-   hex 'MSND Pinnacle I/O 210, 220, 230, 240, 250, 260, 290, 3E0' CONFIG_MSNDPIN_IO 290
-   bool '  MSND Pinnacle has S/PDIF I/O' CONFIG_MSNDPIN_DIGITAL
-   bool '  MSND Pinnacle non-PnP Mode' CONFIG_MSNDPIN_NONPNP
-   if [ "$CONFIG_MSNDPIN_NONPNP" = "y" ]; then
-      comment 'MSND Pinnacle DSP section will be configured to above parameters.'
-      hex 'MSND Pinnacle config port 250,260,270' CONFIG_MSNDPIN_CFG 250
-      comment 'Pinnacle-specific Device Configuration (0 disables)'
-      hex 'MSND Pinnacle MPU I/O (e.g. 330)' CONFIG_MSNDPIN_MPU_IO 0
-      int 'MSND Pinnacle MPU IRQ (e.g. 9)' CONFIG_MSNDPIN_MPU_IRQ 0
-      hex 'MSND Pinnacle IDE I/O 0 (e.g. 170)' CONFIG_MSNDPIN_IDE_IO0 0
-      hex 'MSND Pinnacle IDE I/O 1 (e.g. 376)' CONFIG_MSNDPIN_IDE_IO1 0
-      int 'MSND Pinnacle IDE IRQ (e.g. 15)' CONFIG_MSNDPIN_IDE_IRQ 0
-      hex 'MSND Pinnacle joystick I/O (e.g. 200)' CONFIG_MSNDPIN_JOYSTICK_IO 0
-   fi
-fi
-if [ "$CONFIG_SOUND_MSNDPIN" = "y" -o "$CONFIG_SOUND_MSNDCLAS" = "y" ]; then
-   int 'MSND buffer size (kB)' CONFIG_MSND_FIFOSIZE 128
-fi
-
-dep_tristate '  VIA 82C686 Audio Codec' CONFIG_SOUND_VIA82CXXX $CONFIG_PCI
-dep_mbool    '  VIA 82C686 MIDI' CONFIG_MIDI_VIA82CXXX $CONFIG_SOUND_VIA82CXXX
-
-dep_tristate '  OSS sound modules' CONFIG_SOUND_OSS $CONFIG_SOUND
-
-if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
-   bool '      Verbose initialisation' CONFIG_SOUND_TRACEINIT
-   bool '      Persistent DMA buffers' CONFIG_SOUND_DMAP
-
-   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      dep_tristate '    AD1816(A) based cards (EXPERIMENTAL)' CONFIG_SOUND_AD1816 $CONFIG_SOUND_OSS
-   fi
-   dep_tristate '    Aztech Sound Galaxy (non-PnP) cards' CONFIG_SOUND_SGALAXY $CONFIG_SOUND_OSS
-   dep_tristate '    Adlib Cards' CONFIG_SOUND_ADLIB $CONFIG_SOUND_OSS
-   dep_tristate '    ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20)' CONFIG_SOUND_ACI_MIXER $CONFIG_SOUND_OSS
-   dep_tristate '    Crystal CS4232 based (PnP) cards' CONFIG_SOUND_CS4232 $CONFIG_SOUND_OSS
-   dep_tristate '    Ensoniq SoundScape support' CONFIG_SOUND_SSCAPE $CONFIG_SOUND_OSS
-   dep_tristate '    Gravis Ultrasound support' CONFIG_SOUND_GUS $CONFIG_SOUND_OSS
-   if [ "$CONFIG_SOUND_GUS" != "n" ]; then
-      bool '      16 bit sampling option of GUS (_NOT_ GUS MAX)' CONFIG_SOUND_GUS16 
-      bool '      GUS MAX support' CONFIG_SOUND_GUSMAX
-   fi
-   dep_tristate '    Loopback MIDI device support' CONFIG_SOUND_VMIDI $CONFIG_SOUND_OSS
-   dep_tristate '    MediaTrix AudioTrix Pro support' CONFIG_SOUND_TRIX $CONFIG_SOUND_OSS
-   if [ "$CONFIG_SOUND_TRIX" = "y" ]; then
-      bool '      Have TRXPRO.HEX firmware file' CONFIG_TRIX_HAVE_BOOT
-      if [ "$CONFIG_TRIX_HAVE_BOOT" = "y" ]; then
-  	string '  Full pathname of TRXPRO.HEX firmware file' CONFIG_TRIX_BOOT_FILE /etc/sound/trxpro.hex
-      fi
-   fi
-  
-   dep_tristate '    Microsoft Sound System support' CONFIG_SOUND_MSS $CONFIG_SOUND_OSS
-   dep_tristate '    MPU-401 support (NOT for SB16)' CONFIG_SOUND_MPU401 $CONFIG_SOUND_OSS
-   dep_tristate '    NM256AV/NM256ZX audio support' CONFIG_SOUND_NM256 $CONFIG_SOUND_OSS
-   dep_tristate '    OPTi MAD16 and/or Mozart based cards' CONFIG_SOUND_MAD16 $CONFIG_SOUND_OSS $CONFIG_SOUND_GAMEPORT
-   if [ "$CONFIG_SOUND_MAD16" = "y" -o "$CONFIG_SOUND_MAD16" = "m" ]; then
-     bool '      Support MIDI in older MAD16 based cards (requires SB)' CONFIG_MAD16_OLDCARD
-   fi
-   dep_tristate '    ProAudioSpectrum 16 support' CONFIG_SOUND_PAS $CONFIG_SOUND_OSS
-   dep_bool '      Enable PAS16 joystick port' CONFIG_PAS_JOYSTICK $CONFIG_SOUND_PAS
-
-   dep_tristate '    PSS (AD1848, ADSP-2115, ESC614) support' CONFIG_SOUND_PSS $CONFIG_SOUND_OSS
-   if [ "$CONFIG_SOUND_PSS" = "y" -o "$CONFIG_SOUND_PSS" = "m" ]; then
-      bool '      Enable PSS mixer (Beethoven ADSP-16 and other compatibile)' CONFIG_PSS_MIXER
-      bool '      Have DSPxxx.LD firmware file' CONFIG_PSS_HAVE_BOOT
-      if [ "$CONFIG_PSS_HAVE_BOOT" = "y" ]; then
-         string '        Full pathname of DSPxxx.LD firmware file' CONFIG_PSS_BOOT_FILE /etc/sound/dsp001.ld
-      fi
-   fi
-
-   dep_tristate '    100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support' CONFIG_SOUND_SB $CONFIG_SOUND_OSS
-   dep_tristate '    AWE32 synth' CONFIG_SOUND_AWE32_SYNTH $CONFIG_SOUND_OSS
-   dep_tristate '    Full support for Turtle Beach WaveFront (Tropez Plus, Tropez, Maui) synth/soundcards' CONFIG_SOUND_WAVEFRONT $CONFIG_SOUND_OSS m
-   dep_tristate '    Limited support for Turtle Beach Wave Front (Maui, Tropez) synthesizers' CONFIG_SOUND_MAUI $CONFIG_SOUND_OSS
-   if [ "$CONFIG_SOUND_MAUI" = "y" ]; then
-      bool '      Have OSWF.MOT firmware file' CONFIG_MAUI_HAVE_BOOT
-      if [ "$CONFIG_MAUI_HAVE_BOOT" = "y" ]; then
-  	 string '  Full pathname of OSWF.MOT firmware file' CONFIG_MAUI_BOOT_FILE /etc/sound/oswf.mot
-      fi
-   fi
-
-   dep_tristate '    Yamaha FM synthesizer (YM3812/OPL-3) support' CONFIG_SOUND_YM3812 $CONFIG_SOUND_OSS
-   dep_tristate '    Yamaha OPL3-SA1 audio controller' CONFIG_SOUND_OPL3SA1 $CONFIG_SOUND_OSS
-   dep_tristate '    Yamaha OPL3-SA2 and SA3 based PnP cards' CONFIG_SOUND_OPL3SA2 $CONFIG_SOUND_OSS
-   dep_tristate '    Yamaha YMF7xx PCI audio (native mode)' CONFIG_SOUND_YMFPCI $CONFIG_SOUND_OSS $CONFIG_PCI
-   dep_mbool '      Yamaha PCI legacy ports support' CONFIG_SOUND_YMFPCI_LEGACY $CONFIG_SOUND_YMFPCI
-   dep_tristate '    6850 UART support' CONFIG_SOUND_UART6850 $CONFIG_SOUND_OSS
-  
-   dep_tristate '    Gallant Audio Cards (SC-6000 and SC-6600 based)' CONFIG_SOUND_AEDSP16 $CONFIG_SOUND_OSS
-   if [ "$CONFIG_SOUND_AEDSP16" = "y" -o "$CONFIG_SOUND_AEDSP16" = "m" ]; then
-      bool '      SC-6600 based audio cards (new Audio Excel DSP 16)' CONFIG_SC6600
-      if [ "$CONFIG_SC6600" = "y" ]; then
-         bool '        Activate SC-6600 Joystick Interface' CONFIG_SC6600_JOY
-         int '        SC-6600 CDROM Interface (4=None, 3=IDE, 1=Panasonic, 0=?Sony?)' CONFIG_SC6600_CDROM 4
-         hex '        SC-6600 CDROM Interface I/O Address' CONFIG_SC6600_CDROMBASE 0
-      fi
-      if [ "$CONFIG_SOUND_SB" = "y" -o "$CONFIG_SOUND_SB" = "m" ]; then
-         if [ "$CONFIG_AEDSP16_MSS" != "y" ]; then
-            bool '      Audio Excel DSP 16 (SBPro emulation)' CONFIG_AEDSP16_SBPRO
-         fi
-      fi
-      if [ "$CONFIG_SOUND_MSS" = "y" -o "$CONFIG_SOUND_MSS" = "m" ]; then
-         if [ "$CONFIG_AEDSP16_SBPRO" != "y" ]; then
-            bool '      Audio Excel DSP 16 (MSS emulation)' CONFIG_AEDSP16_MSS
-         fi
-      fi
-      if [ "$CONFIG_SOUND_MPU401" = "y" -o "$CONFIG_SOUND_MPU401" = "m" ]; then
-         bool '      Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401
-      fi
-   fi
-	 
-   if [ "$CONFIG_ARM" = "y" ]; then
-      if [ "$CONFIG_ARCH_ACORN" = "y" -o "$CONFIG_ARCH_CLPS7500" = "y" ]; then
-         dep_tristate '    VIDC 16-bit sound' CONFIG_SOUND_VIDC $CONFIG_SOUND_OSS
-      fi
-      dep_tristate '    Netwinder WaveArtist' CONFIG_SOUND_WAVEARTIST $CONFIG_SOUND_OSS $CONFIG_ARCH_NETWINDER
-   fi
-
-fi
-
-dep_tristate '  TV card (bt848) mixer support' CONFIG_SOUND_TVMIXER $CONFIG_SOUND $CONFIG_I2C
-
-# A cross directory dependence. The sound modules will need gameport.o compiled in,
-# but it resides in the drivers/char/joystick directory. This define_tristate takes
-# care of that. --Vojtech
-
-if [ "$CONFIG_INPUT_GAMEPORT" != "n" ]; then
-  if [ "$CONFIG_SOUND_ESSSOLO1" = "y" -o "$CONFIG_SOUND_ES1370" = "y" -o "$CONFIG_SOUND_ES1371" = "y" -o "$CONFIG_SOUND_SONICVIBES" = "y" ]; then
-    define_tristate CONFIG_INPUT_GAMEPORT y
-  fi
-fi
diff -Nru a/sound/oss/Kconfig b/sound/oss/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/oss/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,1085 @@
+# drivers/sound/Config.in
+#
+# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
+# More hacking for modularisation.
+#
+# Prompt user for primary drivers.
+config SOUND_BT878
+	tristate "BT878 audio dma"
+	depends on SOUND_PRIME!=n && SOUND
+	---help---
+	  Audio DMA support for bt878 based grabber boards.  As you might have
+	  already noticed, bt878 is listed with two functions in /proc/pci.
+	  Function 0 does the video stuff (bt848 compatible), function 1 does
+	  the same for audio data.  This is a driver for the audio part of
+	  the chip.  If you say 'Y' here you get a oss-compatible dsp device
+	  where you can record from.  If you want just watch TV you probably
+	  don't need this driver as most TV cards handle sound with a short
+	  cable from the TV card to your sound card's line-in.
+
+	  This driver is available as a module called btaudio.o ( = code
+	  which can be inserted in and removed from the running kernel
+	  whenever you want). If you want to compile it as a module, say M
+	  here and read <file:Documentation/modules.txt>.
+
+config SOUND_CMPCI
+	tristate "C-Media PCI (CMI8338/8738)"
+	depends on SOUND_PRIME!=n && SOUND && PCI
+	help
+	  Say Y or M if you have a PCI sound card using the CMI8338
+	  or the CMI8378 chipset.  Data on these chips are available at
+	  <http://www.cmedia.com.tw/>.
+
+	  A userspace utility to control some internal registers of these
+	  chips is available at
+	  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
+
+config SOUND_CMPCI_FM
+	bool "Enable legacy FM"
+	depends on SOUND_CMPCI
+
+config SOUND_CMPCI_FMIO
+	hex "FM I/O 388, 3C8, 3E0, 3E8"
+	depends on SOUND_CMPCI_FM
+	default "388"
+
+config SOUND_CMPCI_MIDI
+	bool "Enable legacy MPU-401"
+	depends on SOUND_CMPCI
+
+config SOUND_CMPCI_MPUIO
+	hex "MPU-401 I/O 330, 320, 310, 300"
+	depends on SOUND_CMPCI_MIDI
+	default "330"
+
+config SOUND_CMPCI_JOYSTICK
+	bool "Enable joystick"
+	depends on SOUND_CMPCI
+	help
+	  Say here in order to enable the joystick port on a sound crd using
+	  the CMI8338 or the CMI8738 chipset.  Data on these chips are
+	  available at <http://www.cmedia.com.tw/>.
+
+config SOUND_CMPCI_CM8738
+	bool "Support CMI8738 based audio cards"
+	depends on SOUND_CMPCI
+	help
+	  Say Y or M if you have a PCI sound card using the CMI8338
+	  or the CMI8378 chipset.  Data on this chip is available at
+	  <http://www.cmedia.com.tw/doc8738.htm>.
+
+	  A userspace utility to control some internal registers of these
+	  chips is available at
+	  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
+
+config SOUND_CMPCI_SPDIFINVERSE
+	bool "Inverse S/PDIF in for CMI8738"
+	depends on SOUND_CMPCI_CM8738
+
+config SOUND_CMPCI_SPDIFLOOP
+	bool "Enable S/PDIF loop for CMI8738"
+	depends on SOUND_CMPCI_CM8738
+	help
+	  Enable loopback from SPDIF in to SPDIF out.  For discussion, see
+	  "The 8738 Audio SPDIF In/Out Technical Data" on the technical
+	  support page at <http://www.cmedia.com.tw/>.
+
+	  A userspace utility to control even more internal registers of these
+	  chips is available at
+	  <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>.
+	  This package will among other things help you enable SPDIF 
+	  out/in/loop/monitor.
+
+config SOUND_CMPCI_SPEAKERS
+	int "Number of speakers 2, 4, 5, 6"
+	depends on SOUND_CMPCI_CM8738
+	default "2"
+	help
+	  Specify the number of speaker channels you want the card to drive,
+	  as an integer.
+
+config SOUND_CMPCI_LINE_REAR
+	bool "Use Line-in as Read-out"
+	depends on SOUND_CMPCI_CM8738 && SOUND_CMPCI_SPEAKERS!=2
+
+config SOUND_CMPCI_LINE_BASS
+	bool "Use Line-in as Bass"
+	depends on SOUND_CMPCI_CM8738 && SOUND_CMPCI_SPEAKERS!=2
+
+config SOUND_EMU10K1
+	tristate "Creative SBLive! (EMU10K1)"
+	depends on SOUND_PRIME!=n && SOUND && PCI
+	---help---
+	  Say Y or M if you have a PCI sound card using the EMU10K1 chipset,
+	  such as the Creative SBLive!, SB PCI512 or Emu-APS.
+
+	  For more information on this driver and the degree of support for the
+	  different card models please check <http://opensource.creative.com/>.
+
+	  It is now possible to load dsp microcode patches into the EMU10K1
+	  chip.  These patches are used to implement real time sound
+	  processing effects which include for example: signal routing,
+	  bass/treble control, AC3 passthrough, ...
+	  Userspace tools to create new patches and load/unload them can be
+	  found at <http://opensource.creative.com/dist.html>.
+
+config MIDI_EMU10K1
+	bool "Creative SBLive! MIDI (EXPERIMENTAL)"
+	depends on SOUND_EMU10K1 && EXPERIMENTAL
+	help
+	  Say Y if you want to be able to use the OSS /dev/sequencer
+	  interface.  This code is still experimental.
+
+config SOUND_FUSION
+	tristate "Crystal SoundFusion (CS4280/461x)"
+	depends on SOUND_PRIME!=n && SOUND
+	help
+	  This module drives the Crystal SoundFusion devices (CS4280/46xx
+	  series) when wired as native sound drivers with AC97 codecs.  If
+	  this driver does not work try the CS4232 driver.
+
+config SOUND_CS4281
+	tristate "Crystal Sound CS4281"
+	depends on SOUND_PRIME!=n && SOUND
+	help
+	  Picture and feature list at
+	  <http://www.pcbroker.com/crystal4281.html>.
+
+config SOUND_ES1370
+	tristate "Ensoniq AudioPCI (ES1370)"
+	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	help
+	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
+	  ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find
+	  out if your sound card uses an ES1370 without removing your
+	  computer's cover, use lspci -n and look for the PCI ID
+	  1274:5000. Since Ensoniq was bought by Creative Labs,
+	  Sound Blaster 64/PCI models are either ES1370 or ES1371 based.
+	  This driver differs slightly from OSS/Free, so PLEASE READ
+	  <file:Documentation/sound/es1370>.
+
+config SOUND_ES1371
+	tristate "Creative Ensoniq AudioPCI 97 (ES1371)"
+	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	help
+	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
+	  ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
+	  your sound card uses an ES1371 without removing your computer's
+	  cover, use lspci -n and look for the PCI ID 1274:1371. Since
+	  Ensoniq was bought by Creative Labs, Sound Blaster 64/PCI
+	  models are either ES1370 or ES1371 based. This driver differs
+	  slightly from OSS/Free, so PLEASE READ
+	  <file:Documentation/sound/es1371>.
+
+config SOUND_ESSSOLO1
+	tristate "ESS Technology Solo1"
+	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	help
+	  Say Y or M if you have a PCI sound card utilizing the ESS Technology
+	  Solo1 chip. To find out if your sound card uses a
+	  Solo1 chip without removing your computer's cover, use
+	  lspci -n and look for the PCI ID 125D:1969. This driver
+	  differs slightly from OSS/Free, so PLEASE READ
+	  <file:Documentation/sound/solo1>.
+
+config SOUND_MAESTRO
+	tristate "ESS Maestro, Maestro2, Maestro2E driver"
+	depends on SOUND_PRIME!=n && SOUND
+	help
+	  Say Y or M if you have a sound system driven by ESS's Maestro line
+	  of PCI sound chips.  These include the Maestro 1, Maestro 2, and
+	  Maestro 2E.  See <file:Documentation/sound/Maestro> for more
+	  details.
+
+config SOUND_MAESTRO3
+	tristate "ESS Maestro3/Allegro driver (EXPERIMENTAL)"
+	depends on SOUND_PRIME!=n && SOUND && PCI && EXPERIMENTAL
+	help
+	  Say Y or M if you have a sound system driven by ESS's Maestro 3
+	  PCI sound chip.
+
+config SOUND_ICH
+	tristate "Intel ICH (i8xx) audio support"
+	depends on SOUND_PRIME!=n && PCI
+	help
+	  Support for integral audio in Intel's I/O Controller Hub (ICH)
+	  chipset, as used on the 810/820/840 motherboards.
+
+config SOUND_RME96XX
+	tristate "RME Hammerfall (RME96XX) support (EXPERIMENTAL)"
+	depends on SOUND_PRIME!=n && SOUND && PCI && EXPERIMENTAL
+	help
+	  Say Y or M if you have a Hammerfall, Hammerfall light or Hammerfall
+	  DSP card from RME.
+
+config SOUND_SONICVIBES
+	tristate "S3 SonicVibes"
+	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	help
+	  Say Y or M if you have a PCI sound card utilizing the S3
+	  SonicVibes chipset. To find out if your sound card uses a
+	  SonicVibes chip without removing your computer's cover, use
+	  lspci -n and look for the PCI ID 5333:CA00. This driver
+	  differs slightly from OSS/Free, so PLEASE READ
+	  <file:Documentation/sound/sonicvibes>.
+
+config SOUND_VWSND
+	tristate "SGI Visual Workstation Sound"
+	depends on SOUND_PRIME!=n && VISWS && SOUND
+	help
+	  Say Y or M if you have an SGI Visual Workstation and you want to be
+	  able to use its on-board audio.  Read
+	  <file:Documentation/sound/vwsnd> for more info on this driver's
+	  capabilities.
+
+config SOUND_VRC5477
+	tristate "NEC Vrc5477 AC97 sound"
+	depends on SOUND_PRIME!=n && DDB5477 && SOUND
+
+config SOUND_TRIDENT
+	tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
+	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	---help---
+	  Say Y or M if you have a PCI sound card utilizing the Trident
+	  4DWave-DX/NX chipset or your mother board chipset has SiS 7018
+	  or ALi 5451 built-in. The SiS 7018 PCI Audio Core is embedded
+	  in SiS960 Super South Bridge and SiS540/630 Single Chipset.
+	  The ALi 5451 PCI Audio Core is embedded in ALi M1535, M1535D,
+	  M1535+ or M1535D+ South Bridge.
+
+	  Use lspci -n to find out if your sound card or chipset uses
+	  Trident 4DWave or SiS 7018. PCI ID 1023:2000 or 1023:2001 stands
+	  for Trident 4Dwave. PCI ID 1039:7018 stands for SiS7018. PCI ID
+	  10B9:5451 stands for ALi5451.
+
+	  This driver supports S/PDIF in/out (record/playback) for ALi 5451
+	  embedded in ALi M1535+ and M1535D+. Note that they aren't all
+	  enabled by default; you can enable them by saying Y to "/proc file
+	  system support" and "Sysctl support", and after the /proc file
+	  system has been mounted, executing the command
+
+	  	command			what is enabled
+
+	  echo 0>/proc/ALi5451	pcm out is also set to S/PDIF out. (Default).
+
+	  echo 1>/proc/ALi5451	use S/PDIF out to output pcm data.
+
+	  echo 2>/proc/ALi5451	use S/PDIF out to output non-pcm data.
+	  (AC3...).
+
+	  echo 3>/proc/ALi5451	record from Ac97 in(MIC, Line in...).
+	  (Default).
+
+	  echo 4>/proc/ALi5451	no matter Ac97 settings, record from S/PDIF
+	  in.
+
+
+	  This driver differs slightly from OSS/Free, so PLEASE READ the
+	  comments at the top of <file:drivers/sound/trident.c>.
+
+config SOUND_MSNDCLAS
+	tristate "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey"
+	depends on SOUND_PRIME!=n && SOUND
+	help
+	  Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or
+	  Monterey (not for the Pinnacle or Fiji).
+
+	  See <file:Documentation/sound/MultiSound> for important information
+	  about this driver.  Note that it has been discontinued, but the
+	  Voyetra Turtle Beach knowledge base entry for it is still available
+	  at <http://www.voyetra-turtle-beach.com/site/kb_ftp/790.asp>.
+
+comment "Compiled-in MSND Classic support requires firmware during compilation."
+	depends on SOUND_PRIME && SOUND_MSNDCLAS=y
+
+config MSNDCLAS_HAVE_BOOT
+	bool
+	depends on SOUND_MSNDCLAS=y
+	default y
+
+config MSNDCLAS_INIT_FILE
+	string "Full pathname of MSNDINIT.BIN firmware file"
+	depends on SOUND_MSNDCLAS
+	default "/etc/sound/msndinit.bin"
+	help
+	  The MultiSound cards have two firmware files which are required for
+	  operation, and are not currently included. These files can be
+	  obtained from Turtle Beach. See
+	  <file:Documentation/sound/MultiSound> for information on how to
+	  obtain this.
+
+config MSNDCLAS_PERM_FILE
+	string "Full pathname of MSNDPERM.BIN firmware file"
+	depends on SOUND_MSNDCLAS
+	default "/etc/sound/msndperm.bin"
+	help
+	  The MultiSound cards have two firmware files which are required for
+	  operation, and are not currently included. These files can be
+	  obtained from Turtle Beach. See
+	  <file:Documentation/sound/MultiSound> for information on how to
+	  obtain this.
+
+config MSNDCLAS_IRQ
+	int "MSND Classic IRQ 5, 7, 9, 10, 11, 12"
+	depends on SOUND_MSNDCLAS=y
+	default "5"
+	help
+	  Interrupt Request line for the MultiSound Classic and related cards.
+
+config MSNDCLAS_MEM
+	hex "MSND Classic memory B0000, C8000, D0000, D8000, E0000, E8000"
+	depends on SOUND_MSNDCLAS=y
+	default "D0000"
+	help
+	  Memory-mapped I/O base address for the MultiSound Classic and
+	  related cards.
+
+config MSNDCLAS_IO
+	hex "MSND Classic I/O 210, 220, 230, 240, 250, 260, 290, 3E0"
+	depends on SOUND_MSNDCLAS=y
+	default "290"
+	help
+	  I/O port address for the MultiSound Classic and related cards.
+
+config SOUND_MSNDPIN
+	tristate "Support for Turtle Beach MultiSound Pinnacle, Fiji"
+	depends on SOUND_PRIME!=n && SOUND
+	help
+	  Say M here if you have a Turtle Beach MultiSound Pinnacle or Fiji.
+	  See <file:Documentation/sound/MultiSound> for important information
+	  about this driver. Note that it has been discontinued, but the
+	  Voyetra Turtle Beach knowledge base entry for it is still available
+	  at <http://www.voyetra-turtle-beach.com/site/kb_ftp/600.asp>.
+
+comment "Compiled-in MSND Pinnacle support requires firmware during compilation."
+	depends on SOUND_PRIME && SOUND_MSNDPIN=y
+
+config MSNDPIN_HAVE_BOOT
+	bool
+	depends on SOUND_MSNDPIN=y
+	default y
+
+config MSNDPIN_INIT_FILE
+	string "Full pathname of PNDSPINI.BIN firmware file"
+	depends on SOUND_MSNDPIN
+	default "/etc/sound/pndspini.bin"
+	help
+	  The MultiSound cards have two firmware files which are required
+	  for operation, and are not currently included. These files can be
+	  obtained from Turtle Beach. See
+	  <file:Documentation/sound/MultiSound> for information on how to
+	  obtain this.
+
+config MSNDPIN_PERM_FILE
+	string "Full pathname of PNDSPERM.BIN firmware file"
+	depends on SOUND_MSNDPIN
+	default "/etc/sound/pndsperm.bin"
+	help
+	  The MultiSound cards have two firmware files which are required for
+	  operation, and are not currently included. These files can be
+	  obtained from Turtle Beach. See
+	  <file:Documentation/sound/MultiSound> for information on how to
+	  obtain this.
+
+config MSNDPIN_IRQ
+	int "MSND Pinnacle IRQ 5, 7, 9, 10, 11, 12"
+	depends on SOUND_MSNDPIN=y
+	default "5"
+	help
+	  Interrupt request line for the primary synthesizer on MultiSound
+	  Pinnacle and Fiji sound cards.
+
+config MSNDPIN_MEM
+	hex "MSND Pinnacle memory B0000, C8000, D0000, D8000, E0000, E8000"
+	depends on SOUND_MSNDPIN=y
+	default "D0000"
+	help
+	  Memory-mapped I/O base address for the primary synthesizer on
+	  MultiSound Pinnacle and Fiji sound cards.
+
+config MSNDPIN_IO
+	hex "MSND Pinnacle I/O 210, 220, 230, 240, 250, 260, 290, 3E0"
+	depends on SOUND_MSNDPIN=y
+	default "290"
+	help
+	  Memory-mapped I/O base address for the primary synthesizer on
+	  MultiSound Pinnacle and Fiji sound cards.
+
+config MSNDPIN_DIGITAL
+	bool "MSND Pinnacle has S/PDIF I/O"
+	depends on SOUND_MSNDPIN=y
+	help
+	  If you have the S/PDIF daughter board for the Pinnacle or Fiji,
+	  answer Y here; otherwise, say N. If you have this, you will be able
+	  to play and record from the S/PDIF port (digital signal). See
+	  <file:Documentation/sound/MultiSound> for information on how to make
+	  use of this capability.
+
+config MSNDPIN_NONPNP
+	bool "MSND Pinnacle non-PnP Mode"
+	depends on SOUND_MSNDPIN=y
+	help
+	  The Pinnacle and Fiji card resources can be configured either with
+	  PnP, or through a configuration port. Say Y here if your card is NOT
+	  in PnP mode. For the Pinnacle, configuration in non-PnP mode allows
+	  use of the IDE and joystick peripherals on the card as well; these
+	  do not show up when the card is in PnP mode. Specifying zero for any
+	  resource of a device will disable the device. If you are running the
+	  card in PnP mode, you must say N here and use isapnptools to
+	  configure the card's resources.
+
+comment "MSND Pinnacle DSP section will be configured to above parameters."
+	depends on SOUND_PRIME && SOUND_MSNDPIN=y && MSNDPIN_NONPNP
+
+config MSNDPIN_CFG
+	hex "MSND Pinnacle config port 250,260,270"
+	depends on MSNDPIN_NONPNP
+	default "250"
+	help
+	  This is the port which the Pinnacle and Fiji uses to configure the
+	  card's resources when not in PnP mode. If your card is in PnP mode,
+	  then be sure to say N to the previous option, "MSND Pinnacle Non-PnP
+	  Mode".
+
+comment "Pinnacle-specific Device Configuration (0 disables)"
+	depends on SOUND_PRIME && SOUND_MSNDPIN=y && MSNDPIN_NONPNP
+
+config MSNDPIN_MPU_IO
+	hex "MSND Pinnacle MPU I/O (e.g. 330)"
+	depends on MSNDPIN_NONPNP
+	default "0"
+	help
+	  Memory-mapped I/O base address for the Kurzweil daughterboard
+	  synthesizer on MultiSound Pinnacle and Fiji sound cards.
+
+config MSNDPIN_MPU_IRQ
+	int "MSND Pinnacle MPU IRQ (e.g. 9)"
+	depends on MSNDPIN_NONPNP
+	default "0"
+	help
+	  Iinterrupt request number for the Kurzweil daughterboard
+	  synthesizer on MultiSound Pinnacle and Fiji sound cards.
+
+config MSNDPIN_IDE_IO0
+	hex "MSND Pinnacle IDE I/O 0 (e.g. 170)"
+	depends on MSNDPIN_NONPNP
+	default "0"
+	help
+	  CD-ROM drive 0 memory-mapped I/O base address for the MultiSound
+	  Pinnacle and Fiji sound cards.
+
+config MSNDPIN_IDE_IO1
+	hex "MSND Pinnacle IDE I/O 1 (e.g. 376)"
+	depends on MSNDPIN_NONPNP
+	default "0"
+	help
+	  CD-ROM drive 1 memory-mapped I/O base address for the MultiSound
+	  Pinnacle and Fiji sound cards.
+
+config MSNDPIN_IDE_IRQ
+	int "MSND Pinnacle IDE IRQ (e.g. 15)"
+	depends on MSNDPIN_NONPNP
+	default "0"
+	help
+	  Interrupt request number for the IDE CD-ROM interface on the
+	  MultiSound Pinnacle and Fiji sound cards.
+
+config MSNDPIN_JOYSTICK_IO
+	hex "MSND Pinnacle joystick I/O (e.g. 200)"
+	depends on MSNDPIN_NONPNP
+	default "0"
+	help
+	  Memory-mapped I/O base address for the joystick port on MultiSound
+	  Pinnacle and Fiji sound cards.
+
+config MSND_FIFOSIZE
+	int "MSND buffer size (kB)"
+	depends on SOUND_PRIME && (SOUND_MSNDPIN=y || SOUND_MSNDCLAS=y)
+	default "128"
+	help
+	  Configures the size of each audio buffer, in kilobytes, for
+	  recording and playing in the MultiSound drivers (both the Classic
+	  and Pinnacle). Larger values reduce the chance of data overruns at
+	  the expense of overall latency. If unsure, use the default.
+
+config SOUND_VIA82CXXX
+	tristate "VIA 82C686 Audio Codec"
+	depends on SOUND_PRIME!=n && PCI
+	help
+	  Say Y here to include support for the audio codec found on VIA
+	  82Cxxx-based chips. Typically these are built into a motherboard.
+
+	  DO NOT select Sound Blaster or Adlib with this driver, unless
+	  you have a Sound Blaster or Adlib card in addition to your VIA
+	  audio chip.
+
+config MIDI_VIA82CXXX
+	bool "VIA 82C686 MIDI"
+	depends on SOUND_VIA82CXXX
+	help
+	  Answer Y to use the MIDI interface of the Via686. You may need to
+	  enable this in the BIOS before it will work. This is for connection
+	  to external MIDI hardware, and is not required for software playback
+	  of MIDI files.
+
+config SOUND_OSS
+	tristate "OSS sound modules"
+	depends on SOUND_PRIME!=n && SOUND
+	help
+	  OSS is the Open Sound System suite of sound card drivers.  They make
+	  sound programming easier since they provide a common API.  Say Y or
+	  M here (the module will be called sound.o) if you haven't found a
+	  driver for your sound card above, then pick your driver from the
+	  list below.
+
+config SOUND_TRACEINIT
+	bool "Verbose initialisation"
+	depends on SOUND_OSS
+	help
+	  Verbose soundcard initialization -- affects the format of autoprobe
+	  and initialization messages at boot time.
+
+config SOUND_DMAP
+	bool "Persistent DMA buffers"
+	depends on SOUND_OSS
+	---help---
+	  Linux can often have problems allocating DMA buffers for ISA sound
+	  cards on machines with more than 16MB of RAM. This is because ISA
+	  DMA buffers must exist below the 16MB boundary and it is quite
+	  possible that a large enough free block in this region cannot be
+	  found after the machine has been running for a while. If you say Y
+	  here the DMA buffers (64Kb) will be allocated at boot time and kept
+	  until the shutdown. This option is only useful if you said Y to
+	  "OSS sound modules", above. If you said M to "OSS sound modules"
+	  then you can get the persistent DMA buffer functionality by passing
+	  the command-line argument "dmabuf=1" to the sound.o module.
+
+	  Say Y unless you have 16MB or more RAM or a PCI sound card.
+
+config SOUND_AD1816
+	tristate "AD1816(A) based cards (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && SOUND_OSS
+	help
+	  Say M here if you have a sound card based on the Analog Devices
+	  AD1816(A) chip.
+
+	  If you compile the driver into the kernel, you have to add
+	  "ad1816=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
+
+config SOUND_SGALAXY
+	tristate "Aztech Sound Galaxy (non-PnP) cards"
+	depends on SOUND_OSS
+	help
+	  This module initializes the older non Plug and Play sound galaxy
+	  cards from Aztech. It supports the Waverider Pro 32 - 3D and the
+	  Galaxy Washington 16.
+
+	  If you compile the driver into the kernel, you have to add
+	  "sgalaxy=<io>,<irq>,<dma>,<dma2>,<sgbase>" to the kernel command
+	  line.
+
+config SOUND_ADLIB
+	tristate "Adlib Cards"
+	depends on SOUND_OSS
+	help
+	  Includes ASB 64 4D. Information on programming AdLib cards is
+	  available at <http://www.itsnet.com/home/ldragon/Specs/adlib.html>.
+
+config SOUND_ACI_MIXER
+	tristate "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20)"
+	depends on SOUND_OSS
+	---help---
+	  ACI (Audio Command Interface) is a protocol used to communicate with
+	  the microcontroller on some sound cards produced by miro and
+	  Cardinal Technologies.  The main function of the ACI is to control
+	  the mixer and to get a product identification.
+
+	  This VoxWare ACI driver currently supports the ACI functions on the
+	  miroSOUND PCM1-pro, PCM12 and PCM20 radio. On the PCM20 radio, ACI
+	  also controls the radio tuner. This is supported in the video4linux
+	  miropcm20 driver (say M or Y here and go back to "Multimedia
+	  devices" -> "Radio Adapters").
+
+	  This driver is also available as a module and will be called aci.o.
+
+config SOUND_CS4232
+	tristate "Crystal CS4232 based (PnP) cards"
+	depends on SOUND_OSS
+	help
+	  Say Y here if you have a card based on the Crystal CS4232 chip set,
+	  which uses its own Plug and Play protocol.
+
+	  If you compile the driver into the kernel, you have to add
+	  "cs4232=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel
+	  command line.
+
+	  See <file:Documentation/sound/CS4232> for more information on
+	  configuring this card.
+
+config SOUND_SSCAPE
+	tristate "Ensoniq SoundScape support"
+	depends on SOUND_OSS
+	help
+	  Answer Y if you have a sound card based on the Ensoniq SoundScape
+	  chipset. Such cards are being manufactured at least by Ensoniq, Spea
+	  and Reveal (Reveal makes also other cards).
+
+	  If you compile the driver into the kernel, you have to add
+	  "sscape=<io>,<irq>,<dma>,<mpuio>,<mpuirq>" to the kernel command
+	  line.
+
+config SOUND_GUS
+	tristate "Gravis Ultrasound support"
+	depends on SOUND_OSS
+	help
+	  Say Y here for any type of Gravis Ultrasound card, including the GUS
+	  or GUS MAX.  See also <file:Documentation/sound/ultrasound> for more
+	  information on configuring this card with modules.
+
+	  If you compile the driver into the kernel, you have to add
+	  "gus=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
+
+config SOUND_GUS16
+	bool "16 bit sampling option of GUS (_NOT_ GUS MAX)"
+	depends on SOUND_GUS
+	help
+	  Support for Gravis Ulstrasound (GUS) cards (other than the GUS),
+	  sampling at 16-bit width.
+
+config SOUND_GUSMAX
+	bool "GUS MAX support"
+	depends on SOUND_GUS
+	help
+	  Support for Gravis Ulstrasound MAX.
+
+config SOUND_VMIDI
+	tristate "Loopback MIDI device support"
+	depends on SOUND_OSS
+	help
+	  Support for MIDI loopback on port 1 or 2.
+
+config SOUND_TRIX
+	tristate "MediaTrix AudioTrix Pro support"
+	depends on SOUND_OSS
+	help
+	  Answer Y if you have the AudioTriX Pro sound card manufactured
+	  by MediaTrix.
+
+config TRIX_HAVE_BOOT
+	bool "Have TRXPRO.HEX firmware file"
+	depends on SOUND_TRIX=y
+	help
+	  The MediaTrix AudioTrix Pro has an on-board microcontroller which
+	  needs to be initialized by downloading the code from the file
+	  TRXPRO.HEX in the DOS driver directory. If you don't have the
+	  TRXPRO.HEX file handy you may skip this step. However, the SB and
+	  MPU-401 modes of AudioTrix Pro will not work without this file!
+
+config TRIX_BOOT_FILE
+	string "Full pathname of TRXPRO.HEX firmware file"
+	depends on TRIX_HAVE_BOOT
+	default "/etc/sound/trxpro.hex"
+	help
+	  Enter the full pathname of your TRXPRO.HEX file, starting from /.
+
+config SOUND_MSS
+	tristate "Microsoft Sound System support"
+	depends on SOUND_OSS
+	---help---
+	  Again think carefully before answering Y to this question.  It's
+	  safe to answer Y if you have the original Windows Sound System card
+	  made by Microsoft or Aztech SG 16 Pro (or NX16 Pro).  Also you may
+	  say Y in case your card is NOT among these:
+
+	  ATI Stereo F/X, AdLib, Audio Excell DSP16, Cardinal DSP16,
+	  Ensoniq SoundScape (and compatibles made by Reveal and Spea),
+	  Gravis Ultrasound, Gravis Ultrasound ACE, Gravis Ultrasound Max,
+	  Gravis Ultrasound with 16 bit option, Logitech Sound Man 16,
+	  Logitech SoundMan Games, Logitech SoundMan Wave, MAD16 Pro (OPTi
+	  82C929), Media Vision Jazz16, MediaTriX AudioTriX Pro, Microsoft
+	  Windows Sound System (MSS/WSS), Mozart (OAK OTI-601), Orchid
+	  SW32, Personal Sound System (PSS), Pro Audio Spectrum 16, Pro
+	  Audio Studio 16, Pro Sonic 16, Roland MPU-401 MIDI interface,
+	  Sound Blaster 1.0, Sound Blaster 16, Sound Blaster 16ASP, Sound
+	  Blaster 2.0, Sound Blaster AWE32, Sound Blaster Pro, TI TM4000M
+	  notebook, ThunderBoard, Turtle Beach Tropez, Yamaha FM
+	  synthesizers (OPL2, OPL3 and OPL4), 6850 UART MIDI Interface.
+
+	  For cards having native support in VoxWare, consult the card
+	  specific instructions in <file:Documentation/sound/README.OSS>.
+	  Some drivers have their own MSS support and saying Y to this option
+	  will cause a conflict.
+
+	  If you compile the driver into the kernel, you have to add
+	  "ad1848=<io>,<irq>,<dma>,<dma2>[,<type>]" to the kernel command
+	  line.
+
+config SOUND_MPU401
+	tristate "MPU-401 support (NOT for SB16)"
+	depends on SOUND_OSS
+	---help---
+	  Be careful with this question.  The MPU401 interface is supported by
+	  all sound cards.  However, some natively supported cards have their
+	  own driver for MPU401.  Enabling this MPU401 option with these cards
+	  will cause a conflict.  Also, enabling MPU401 on a system that
+	  doesn't really have a MPU401 could cause some trouble.  If your card
+	  was in the list of supported cards, look at the card specific
+	  instructions in the <file:Documentation/sound/README.OSS> file.  It
+	  is safe to answer Y if you have a true MPU401 MIDI interface card.
+
+	  If you compile the driver into the kernel, you have to add
+	  "mpu401=<io>,<irq>" to the kernel command line.
+
+config SOUND_NM256
+	tristate "NM256AV/NM256ZX audio support"
+	depends on SOUND_OSS
+	help
+	  Say M here to include audio support for the NeoMagic 256AV/256ZX
+	  chipsets. These are the audio chipsets found in the Sony
+	  Z505S/SX/DX, some Sony F-series, and the Dell Latitude CPi and CPt
+	  laptops. It includes support for an AC97-compatible mixer and an
+	  apparently proprietary sound engine.
+
+	  See <file:Documentation/sound/NM256> for further information.
+
+config SOUND_MAD16
+	tristate "OPTi MAD16 and/or Mozart based cards"
+	depends on SOUND_OSS && SOUND_GAMEPORT
+	---help---
+	  Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
+	  82C928 or 82C929 or 82C931) audio interface chip. These chips are
+	  quite common so it's possible that many no-name cards have one of
+	  them. In addition the MAD16 chip is used in some cards made by known
+	  manufacturers such as Turtle Beach (Tropez), Reveal (some models)
+	  and Diamond (latest ones). Note however that the Tropez sound cards
+	  have their own driver; if you have one of those, say N here and Y or
+	  M to "Full support for Turtle Beach WaveFront", below.
+
+	  If you compile the driver into the kernel, you have to add
+	  "mad16=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the
+	  kernel command line.
+
+	  See also <file:Documentation/sound/Opti> and
+	  <file:Documentation/sound/MAD16> for more information on setting
+	  these cards up as modules.
+
+config MAD16_OLDCARD
+	bool "Support MIDI in older MAD16 based cards (requires SB)"
+	depends on SOUND_MAD16
+	help
+	  Answer Y (or M) if you have an older card based on the C928 or
+	  Mozart chipset and you want to have MIDI support. If you enable this
+	  option you also need to enable support for Sound Blaster.
+
+config SOUND_PAS
+	tristate "ProAudioSpectrum 16 support"
+	depends on SOUND_OSS
+	---help---
+	  Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio
+	  16 or Logitech SoundMan 16 sound card. Answer N if you have some
+	  other card made by Media Vision or Logitech since those are not
+	  PAS16 compatible. Please read <file:Documentation/sound/PAS16>.
+	  It is not necessary to add Sound Blaster support separately; it
+	  is included in PAS support.
+
+	  If you compile the driver into the kernel, you have to add
+	  "pas2=<io>,<irq>,<dma>,<dma2>,<sbio>,<sbirq>,<sbdma>,<sbdma2>
+	  to the kernel command line.
+
+config PAS_JOYSTICK
+	bool "Enable PAS16 joystick port"
+	depends on SOUND_PAS=y
+	help
+	  Say Y here to enable the Pro Audio Spectrum 16's auxiliary joystick
+	  port.
+
+config SOUND_PSS
+	tristate "PSS (AD1848, ADSP-2115, ESC614) support"
+	depends on SOUND_OSS
+	help
+	  Answer Y or M if you have an Orchid SW32, Cardinal DSP16, Beethoven
+	  ADSP-16 or some other card based on the PSS chipset (AD1848 codec +
+	  ADSP-2115 DSP chip + Echo ESC614 ASIC CHIP). For more information on
+	  how to compile it into the kernel or as a module see the file
+	  <file:Documentation/sound/PSS>.
+
+	  If you compile the driver into the kernel, you have to add
+	  "pss=<io>,<mssio>,<mssirq>,<mssdma>,<mpuio>,<mpuirq>" to the kernel
+	  command line.
+
+config PSS_MIXER
+	bool "Enable PSS mixer (Beethoven ADSP-16 and other compatibile)"
+	depends on SOUND_PSS
+	help
+	  Answer Y for Beethoven ADSP-16. You may try to say Y also for other
+	  cards if they have master volume, bass, treble, and you can't
+	  control it under Linux. If you answer N for Beethoven ADSP-16, you
+	  can't control master volume, bass, treble and synth volume.
+
+	  If you said M to "PSS support" above, you may enable or disable this
+	  PSS mixer with the module parameter pss_mixer. For more information
+	  see the file <file:Documentation/sound/PSS>.
+
+config PSS_HAVE_BOOT
+	bool "Have DSPxxx.LD firmware file"
+	depends on SOUND_PSS
+	help
+	  If you have the DSPxxx.LD file or SYNTH.LD file for you card, say Y
+	  to include this file. Without this file the synth device (OPL) may
+	  not work.
+
+config PSS_BOOT_FILE
+	string "Full pathname of DSPxxx.LD firmware file"
+	depends on PSS_HAVE_BOOT
+	default "/etc/sound/dsp001.ld"
+	help
+	  Enter the full pathname of your DSPxxx.LD file or SYNTH.LD file,
+	  starting from /.
+
+config SOUND_SB
+	tristate "100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support"
+	depends on SOUND_OSS
+	---help---
+	  Answer Y if you have an original Sound Blaster card made by Creative
+	  Labs or a 100% hardware compatible clone (like the Thunderboard or
+	  SM Games). For an unknown card you may answer Y if the card claims
+	  to be Sound Blaster-compatible.
+
+	  Please read the file <file:Documentation/sound/Soundblaster>.
+
+	  You should also say Y here for cards based on the Avance Logic
+	  ALS-007 and ALS-1X0 chips (read <file:Documentation/sound/ALS>) and
+	  for cards based on ESS chips (read
+	  <file:Documentation/sound/ESS1868> and
+	  <file:Documentation/sound/ESS>). If you have an SB AWE 32 or SB AWE
+	  64, say Y here and also to "AWE32 synth" below and read
+	  <file:Documentation/sound/INSTALL.awe>. If you have an IBM Mwave
+	  card, say Y here and read <file:Documentation/sound/mwave>.
+
+	  If you compile the driver into the kernel and don't want to use
+	  isapnp, you have to add "sb=<io>,<irq>,<dma>,<dma2>" to the kernel
+	  command line.
+
+	  You can say M here to compile this driver as a module; the module is
+	  called sb.o.
+
+config SOUND_AWE32_SYNTH
+	tristate "AWE32 synth"
+	depends on SOUND_OSS
+	help
+	  Say Y here if you have a Sound Blaster SB32, AWE32-PnP, SB AWE64 or
+	  similar sound card. See <file:Documentation/sound/README.awe>,
+	  <file:Documentation/sound/AWE32> and the Soundblaster-AWE
+	  mini-HOWTO, available from <http://www.linuxdoc.org/docs.html#howto>
+	  for more info.
+
+config SOUND_WAVEFRONT
+	tristate "Full support for Turtle Beach WaveFront (Tropez Plus, Tropez, Maui) synth/soundcards"
+	depends on SOUND_OSS && m
+	help
+	  Answer Y or M if you have a Tropez Plus, Tropez or Maui sound card
+	  and read the files <file:Documentation/sound/Wavefront> and
+	  <file:Documentation/sound/Tropez+>.
+
+config SOUND_MAUI
+	tristate "Limited support for Turtle Beach Wave Front (Maui, Tropez) synthesizers"
+	depends on SOUND_OSS
+	help
+	  Say Y here if you have a Turtle Beach Wave Front, Maui, or Tropez
+	  sound card.
+
+	  If you compile the driver into the kernel, you have to add
+	  "maui=<io>,<irq>" to the kernel command line.
+
+config MAUI_HAVE_BOOT
+	bool "Have OSWF.MOT firmware file"
+	depends on SOUND_MAUI=y
+	help
+	  Turtle Beach Maui and Tropez sound cards have a microcontroller
+	  which needs to be initialized prior to use. OSWF.MOT is a file
+	  distributed with the card's DOS/Windows drivers. Answer Y if you
+	  have this file.
+
+config MAUI_BOOT_FILE
+	string "Full pathname of OSWF.MOT firmware file"
+	depends on MAUI_HAVE_BOOT
+	default "/etc/sound/oswf.mot"
+	help
+	  Enter the full pathname of your OSWF.MOT file, starting from /.
+
+config SOUND_YM3812
+	tristate "Yamaha FM synthesizer (YM3812/OPL-3) support"
+	depends on SOUND_OSS
+	---help---
+	  Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
+	  Answering Y is usually a safe and recommended choice, however some
+	  cards may have software (TSR) FM emulation. Enabling FM support with
+	  these cards may cause trouble (I don't currently know of any such
+	  cards, however). Please read the file
+	  <file:Documentation/sound/OPL3> if your card has an OPL3 chip.
+
+	  If you compile the driver into the kernel, you have to add
+	  "opl3=<io>" to the kernel command line.
+
+	  If unsure, say Y.
+
+config SOUND_OPL3SA1
+	tristate "Yamaha OPL3-SA1 audio controller"
+	depends on SOUND_OSS
+	help
+	  Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is
+	  usually built into motherboards. Read
+	  <file:Documentation/sound/OPL3-SA> for details.
+
+	  If you compile the driver into the kernel, you have to add
+	  "opl3sa=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel
+	  command line.
+
+config SOUND_OPL3SA2
+	tristate "Yamaha OPL3-SA2 and SA3 based PnP cards"
+	depends on SOUND_OSS
+	help
+	  Say Y or M if you have a card based on one of these Yamaha sound
+	  chipsets or the "SAx", which is actually a SA3. Read
+	  <file:Documentation/sound/OPL3-SA2> for more information on
+	  configuring these cards.
+
+	  If you compile the driver into the kernel and do not also
+	  configure in the optional ISA PnP support, you will have to add
+	  "opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>" to the kernel
+	  command line.
+
+config SOUND_YMFPCI
+	tristate "Yamaha YMF7xx PCI audio (native mode)"
+	depends on SOUND_OSS && PCI
+	help
+	  Support for Yamaha cards including the YMF711, YMF715, YMF718,
+	  YMF719, YMF724, Waveforce 192XG, and Waveforce 192 Digital.
+
+config SOUND_YMFPCI_LEGACY
+	bool "Yamaha PCI legacy ports support"
+	depends on SOUND_YMFPCI
+	help
+	  Support for YMF7xx PCI cards emulating an MP401.
+
+config SOUND_UART6850
+	tristate "6850 UART support"
+	depends on SOUND_OSS
+	help
+	  This option enables support for MIDI interfaces based on the 6850
+	  UART chip. This interface is rarely found on sound cards. It's safe
+	  to answer N to this question.
+
+	  If you compile the driver into the kernel, you have to add
+	  "uart6850=<io>,<irq>" to the kernel command line.
+
+config SOUND_AEDSP16
+	tristate "Gallant Audio Cards (SC-6000 and SC-6600 based)"
+	depends on SOUND_OSS
+	---help---
+	  Answer Y if you have a Gallant's Audio Excel DSP 16 card. This
+	  driver supports Audio Excel DSP 16 but not the III nor PnP versions
+	  of this card.
+
+	  The Gallant's Audio Excel DSP 16 card can emulate either an SBPro or
+	  a Microsoft Sound System card, so you should have said Y to either
+	  "100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support"
+	  or "Microsoft Sound System support", above, and you need to answer
+	  the "MSS emulation" and "SBPro emulation" questions below
+	  accordingly. You should say Y to one and only one of these two
+	  questions.
+
+	  Read the <file:Documentation/sound/README.OSS> file and the head of
+	  <file:drivers/sound/aedsp16.c> as well as
+	  <file:Documentation/sound/AudioExcelDSP16> to get more information
+	  about this driver and its configuration.
+
+config SC6600
+	bool "SC-6600 based audio cards (new Audio Excel DSP 16)"
+	depends on SOUND_AEDSP16
+	help
+	  The SC6600 is the new version of DSP mounted on the Audio Excel DSP
+	  16 cards. Find in the manual the FCC ID of your audio card and
+	  answer Y if you have an SC6600 DSP.
+
+config SC6600_JOY
+	bool "Activate SC-6600 Joystick Interface"
+	depends on SC6600
+	help
+	  Say Y here in order to use the joystick interface of the Audio Excel
+	  DSP 16 card.
+
+config SC6600_CDROM
+	int "SC-6600 CDROM Interface (4=None, 3=IDE, 1=Panasonic, 0=?Sony?)"
+	depends on SC6600
+	default "4"
+
+config SC6600_CDROMBASE
+	hex "SC-6600 CDROM Interface I/O Address"
+	depends on SC6600
+	default "0"
+	help
+	  Base I/O port address for the CD-ROM interface of the Audio Excel
+	  DSP 16 card.
+
+choice
+	prompt "Audio Excel DSP 16"
+	optional
+	depends on SOUND_AEDSP16
+
+config AEDSP16_MSS
+	bool "MSS emulation"
+	depends on SOUND_MSS
+	help
+	  Answer Y if you want your audio card to emulate Microsoft Sound
+	  System. You should then say Y to "Microsoft Sound System support"
+	  and say N to "Audio Excel DSP 16 (SBPro emulation)".
+
+config AEDSP16_SBPRO
+	bool "SBPro emulation"
+	depends on SOUND_SB
+	help
+	  Answer Y if you want your audio card to emulate Sound Blaster Pro.
+	  You should then say Y to "100% Sound Blaster compatibles
+	  (SB16/32/64, ESS, Jazz16) support" and N to "Audio Excel DSP 16 (MSS
+	  emulation)".
+
+	  If you compile the driver into the kernel, you have to add
+	  "aedsp16=<io>,<irq>,<dma>,<mssio>,<mpuio>,<mouirq>" to the kernel
+	  command line.
+
+endchoice
+
+config AEDSP16_MPU401
+	bool "Audio Excel DSP 16 (MPU401 emulation)"
+	depends on SOUND_AEDSP16 && SOUND_MPU401
+	help
+	  Answer Y if you want your audio card to emulate the MPU-401 midi
+	  interface. You should then also say Y to "MPU-401 support".
+
+	  Note that the I/O base for MPU-401 support of aedsp16 is the same
+	  you have selected for "MPU-401 support". If you are using this
+	  driver as a module you have to specify the MPU I/O base address with
+	  the parameter 'mpu_base=0xNNN'.
+
+config SOUND_VIDC
+	tristate "VIDC 16-bit sound"
+	depends on ARM && (ARCH_ACORN || ARCH_CLPS7500) && SOUND_OSS
+	help
+	  16-bit support for the VIDC onboard sound hardware found on Acorn
+	  machines.
+
+config SOUND_WAVEARTIST
+	tristate "Netwinder WaveArtist"
+	depends on ARM && SOUND_OSS && ARCH_NETWINDER
+	help
+	  Say Y here to include support for the Rockwell WaveArtist sound
+	  system.  This driver is mainly for the NetWinder.
+
+config SOUND_TVMIXER
+	tristate "TV card (bt848) mixer support"
+	depends on SOUND_PRIME!=n && SOUND && I2C
+	help
+	  Support for audio mixer facilities on the BT848 TV frame-grabber
+	  card.
+
diff -Nru a/sound/oss/ad1848.c b/sound/oss/ad1848.c
--- a/sound/oss/ad1848.c	Wed Oct 30 16:44:29 2002
+++ b/sound/oss/ad1848.c	Wed Oct 30 16:44:29 2002
@@ -3026,8 +3026,6 @@
 {
 	char *busname = bus->name[0] ? bus->name : ad1848_isapnp_list[slot].name;
 
-	printk(KERN_INFO "ad1848: %s detected\n", busname);
-
 	/* Initialize this baby. */
 
 	if(ad1848_init_generic(bus, hw_config, slot)) {
@@ -3039,9 +3037,6 @@
 		       hw_config->dma2);
 		return 1;
 	}
-	else
-		printk(KERN_INFO "ad1848: Failed to initialize %s\n", busname);
-
 	return 0;
 }
 
diff -Nru a/sound/oss/cs4232.c b/sound/oss/cs4232.c
--- a/sound/oss/cs4232.c	Wed Oct 30 16:44:29 2002
+++ b/sound/oss/cs4232.c	Wed Oct 30 16:44:29 2002
@@ -46,7 +46,7 @@
  */
 
 #include <linux/config.h>
-#include <linux/isapnp.h>
+#include <linux/pnp.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -71,7 +71,7 @@
 static int synth_base = 0, synth_irq = 0;
 static int mpu_detected = 0;
 
-int __init probe_cs4232_mpu(struct address_info *hw_config)
+int probe_cs4232_mpu(struct address_info *hw_config)
 {
 	/*
 	 *	Just write down the config values.
@@ -83,7 +83,7 @@
 	return 1;
 }
 
-static unsigned char crystal_key[] __initdata =	/* A 32 byte magic key sequence */
+static unsigned char crystal_key[] =	/* A 32 byte magic key sequence */
 {
 	0x96, 0x35, 0x9a, 0xcd, 0xe6, 0xf3, 0x79, 0xbc,
 	0x5e, 0xaf, 0x57, 0x2b, 0x15, 0x8a, 0xc5, 0xe2,
@@ -97,7 +97,7 @@
 	schedule_timeout(howlong);
 }
 
-int __init probe_cs4232(struct address_info *hw_config, int isapnp_configured)
+int probe_cs4232(struct address_info *hw_config, int isapnp_configured)
 {
 	int i, n;
 	int base = hw_config->io_base, irq = hw_config->irq;
@@ -218,7 +218,7 @@
 	return 0;
 }
 
-void __init attach_cs4232(struct address_info *hw_config)
+void attach_cs4232(struct address_info *hw_config)
 {
 	int base = hw_config->io_base,
 		irq = hw_config->irq,
@@ -277,7 +277,7 @@
 	}
 }
 
-static void __exit unload_cs4232(struct address_info *hw_config)
+static void unload_cs4232(struct address_info *hw_config)
 {
 	int base = hw_config->io_base, irq = hw_config->irq;
 	int dma1 = hw_config->dma, dma2 = hw_config->dma2;
@@ -357,48 +357,24 @@
 
 /* All cs4232 based cards have the main ad1848 card either as CSC0000 or
  * CSC0100. */
-struct isapnp_device_id isapnp_cs4232_list[] __initdata = {
-	{       ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('C','S','C'), ISAPNP_FUNCTION(0x0100),
-		0 },
-	{       ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('C','S','C'), ISAPNP_FUNCTION(0x0000),
-		0 },
+static const struct pnp_id cs4232_pnp_table[] = {
+	{ .id = "CSC0100", .driver_data = 0 },
+	{ .id = "CSC0000", .driver_data = 0 },
 	/* Guillemot Turtlebeach something appears to be cs4232 compatible
 	 * (untested) */
-	{       ISAPNP_VENDOR('C','S','C'), ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('G','I','M'), ISAPNP_FUNCTION(0x0100),
-		0 },
-	{0}
+	{ .id = "GIM0100", .driver_data = 0 },
+	{ .id = ""}
 };
 
-MODULE_DEVICE_TABLE(isapnp, isapnp_cs4232_list);
+/*MODULE_DEVICE_TABLE(isapnp, isapnp_cs4232_list);*/
 
-int cs4232_isapnp_probe(struct pci_dev *dev, const struct isapnp_device_id *id)
+static int cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_id *card_id, const struct pnp_id *dev_id)
 {
-	int ret;
 	struct address_info *isapnpcfg;
 
 	isapnpcfg=(struct address_info*)kmalloc(sizeof(*isapnpcfg),GFP_KERNEL);
-	if (!isapnpcfg) 
+	if (!isapnpcfg)
 		return -ENOMEM;
-	/*
-	 * If device is active, assume configured with /proc/isapnp
-	 * and use anyway. Any other way to check this?
-	 */
-	ret = dev->prepare(dev);
-	if(ret && ret != -EBUSY) {
-		printk(KERN_ERR "cs4232: ISA PnP found device that could not be autoconfigured.\n");
-		kfree(isapnpcfg);
-		return -ENODEV;
-	}
-	if(ret != -EBUSY) {
-		if(dev->activate(dev) < 0) {
-			printk(KERN_WARNING "cs4232: ISA PnP activate failed\n");
-			kfree(isapnpcfg);
-			return -ENODEV;
-		}
-	} /* else subfunction is already activated */
 
 	isapnpcfg->irq		= dev->irq_resource[0].start;
 	isapnpcfg->dma		= dev->dma_resource[0].start;
@@ -409,10 +385,25 @@
 		return -ENODEV;
 	}
 	attach_cs4232(isapnpcfg);
-	pci_set_drvdata(dev,isapnpcfg);
+	dev->driver_data = isapnpcfg;
 	return 0;
 }
 
+static void cs4232_pnp_remove(struct pnp_dev *dev)
+{
+	struct address_info *cfg = (struct address_info*) dev->driver_data;
+	if (cfg)
+		unload_cs4232(cfg);
+}
+
+static struct pnp_driver cs4232_driver = {
+	.name		= "cs4232",
+	.card_id_table	= NULL,
+	.id_table	= cs4232_pnp_table,
+	.probe		= cs4232_pnp_probe,
+	.remove		= cs4232_pnp_remove,
+};
+
 static int __init init_cs4232(void)
 {
 #ifdef CONFIG_SOUND_WAVEFRONT_MODULE
@@ -420,7 +411,7 @@
 		printk(KERN_INFO "cs4232: set synthio and synthirq to use the wavefront facilities.\n");
 	else {
 		synth_base = synthio;
-		synth_irq =  synthirq;	
+		synth_irq =  synthirq;
 	}
 #else
 	if(synthio != -1)
@@ -429,7 +420,7 @@
 	cfg.irq = -1;
 
 	if (isapnp &&
-	    (isapnp_probe_devs(isapnp_cs4232_list, cs4232_isapnp_probe) > 0)
+	    (pnp_register_driver(&cs4232_driver) > 0)
 	)
 		return 0;
 
@@ -456,24 +447,13 @@
 	if (probe_cs4232(&cfg,FALSE) == 0)
 		return -ENODEV;
 	attach_cs4232(&cfg);
-	
-	return 0;
-}
 
-static int __exit cs4232_isapnp_remove(struct pci_dev *dev,
-			const struct isapnp_device_id *id)
-{
-	struct address_info *cfg = (struct address_info*)pci_get_drvdata(dev);
-	if (cfg)
-		unload_cs4232(cfg);
-	pci_set_drvdata(dev,NULL);
-	dev->deactivate(dev);
 	return 0;
 }
 
 static void __exit cleanup_cs4232(void)
 {
-	isapnp_probe_devs(isapnp_cs4232_list, cs4232_isapnp_remove);
+	pnp_unregister_driver(&cs4232_driver);
         if (cfg.irq != -1)
 		unload_cs4232(&cfg); /* Unloads global MPU as well, if needed */
 }
@@ -488,7 +468,7 @@
 	int ints[7];
 
 	/* If we have isapnp cards, no need for options */
-	if (isapnp_probe_devs(isapnp_cs4232_list, cs4232_isapnp_probe) > 0)
+	if (pnp_register_driver(&cs4232_driver) > 0)
 		return 1;
 	
 	str = get_options(str, ARRAY_SIZE(ints), ints);
diff -Nru a/sound/oss/dmasound/Config.help b/sound/oss/dmasound/Config.help
--- a/sound/oss/dmasound/Config.help	Wed Oct 30 16:44:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,47 +0,0 @@
-CONFIG_DMASOUND
-  Support built-in audio chips accessible by DMA on various machines
-  that have them.  Note that this symbol does not affect the kernel
-  directly; rather, it controls whether configuration questions
-  enabling DMA sound drivers for various specific machine
-  architectures will be used.
-
-CONFIG_DMASOUND_ATARI
-  If you want to use the internal audio of your Atari in Linux, answer
-  Y to this question. This will provide a Sun-like /dev/audio,
-  compatible with the Linux/i386 sound system. Otherwise, say N.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_DMASOUND_AWACS
-  If you want to use the internal audio of your PowerMac in Linux,
-  answer Y to this question. This will provide a Sun-like /dev/audio,
-  compatible with the Linux/i386 sound system. Otherwise, say N.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_DMASOUND_PAULA
-  If you want to use the internal audio of your Amiga in Linux, answer
-  Y to this question. This will provide a Sun-like /dev/audio,
-  compatible with the Linux/i386 sound system. Otherwise, say N.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
-CONFIG_DMASOUND_Q40
-  If you want to use the internal audio of your Q40 in Linux, answer
-  Y to this question. This will provide a Sun-like /dev/audio,
-  compatible with the Linux/i386 sound system. Otherwise, say N.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you
-  want). If you want to compile it as a module, say M here and read
-  <file:Documentation/modules.txt>.
-
diff -Nru a/sound/oss/dmasound/Config.in b/sound/oss/dmasound/Config.in
--- a/sound/oss/dmasound/Config.in	Wed Oct 30 16:44:20 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,27 +0,0 @@
-# drivers/sound/dmasound/Config.in
-
-if [ "$CONFIG_ATARI" = "y" ]; then
-   dep_tristate '  Atari DMA sound support' CONFIG_DMASOUND_ATARI $CONFIG_SOUND
-fi
-if [ "$CONFIG_ALL_PPC" = "y" ]; then
-   dep_tristate '  PowerMac DMA sound support' CONFIG_DMASOUND_AWACS $CONFIG_SOUND
-fi
-if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_APUS" = "y" ]; then
-   dep_tristate '  Amiga DMA sound support' CONFIG_DMASOUND_PAULA $CONFIG_SOUND
-fi
-if [ "$CONFIG_Q40" = "y" ]; then
-   dep_tristate '  Q40 sound support' CONFIG_DMASOUND_Q40 $CONFIG_SOUND
-fi
-if [ "$CONFIG_DMASOUND_ATARI" = "y" -o \
-     "$CONFIG_DMASOUND_AWACS" = "y" -o \
-     "$CONFIG_DMASOUND_PAULA" = "y" -o \
-     "$CONFIG_DMASOUND_Q40" = "y" ]; then
-   define_tristate CONFIG_DMASOUND y
-else
-   if [ "$CONFIG_DMASOUND_ATARI" = "m" -o \
-	"$CONFIG_DMASOUND_AWACS" = "m" -o \
-	"$CONFIG_DMASOUND_PAULA" = "m" -o \
-	"$CONFIG_DMASOUND_Q40" = "m" ]; then
-      define_tristate CONFIG_DMASOUND m
-   fi
-fi
diff -Nru a/sound/oss/dmasound/Kconfig b/sound/oss/dmasound/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/oss/dmasound/Kconfig	Wed Oct 30 16:44:39 2002
@@ -0,0 +1,65 @@
+# drivers/sound/dmasound/Config.in
+config DMASOUND_ATARI
+	tristate "Atari DMA sound support"
+	depends on ATARI && SOUND
+	help
+	  If you want to use the internal audio of your Atari in Linux, answer
+	  Y to this question. This will provide a Sun-like /dev/audio,
+	  compatible with the Linux/i386 sound system. Otherwise, say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config DMASOUND_AWACS
+	tristate "PowerMac DMA sound support"
+	depends on ALL_PPC && SOUND
+	help
+	  If you want to use the internal audio of your PowerMac in Linux,
+	  answer Y to this question. This will provide a Sun-like /dev/audio,
+	  compatible with the Linux/i386 sound system. Otherwise, say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config DMASOUND_PAULA
+	tristate "Amiga DMA sound support"
+	depends on (AMIGA || APUS) && SOUND
+	help
+	  If you want to use the internal audio of your Amiga in Linux, answer
+	  Y to this question. This will provide a Sun-like /dev/audio,
+	  compatible with the Linux/i386 sound system. Otherwise, say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config DMASOUND_Q40
+	tristate "Q40 sound support"
+	depends on Q40 && SOUND
+	help
+	  If you want to use the internal audio of your Q40 in Linux, answer
+	  Y to this question. This will provide a Sun-like /dev/audio,
+	  compatible with the Linux/i386 sound system. Otherwise, say N.
+
+	  This driver is also available as a module ( = code which can be
+	  inserted in and removed from the running kernel whenever you
+	  want). If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.
+
+config DMASOUND
+	tristate
+	depends on SOUND!=n
+	default m if DMASOUND_ATARI!=y && DMASOUND_AWACS!=y && DMASOUND_PAULA!=y && DMASOUND_Q40!=y && (DMASOUND_ATARI=m || DMASOUND_AWACS=m || DMASOUND_PAULA=m || DMASOUND_Q40=m)
+	default y if DMASOUND_ATARI=y || DMASOUND_AWACS=y || DMASOUND_PAULA=y || DMASOUND_Q40=y
+	help
+	  Support built-in audio chips accessible by DMA on various machines
+	  that have them.  Note that this symbol does not affect the kernel
+	  directly; rather, it controls whether configuration questions
+	  enabling DMA sound drivers for various specific machine
+	  architectures will be used.
+
diff -Nru a/sound/oss/sb_card.c b/sound/oss/sb_card.c
--- a/sound/oss/sb_card.c	Wed Oct 30 16:44:29 2002
+++ b/sound/oss/sb_card.c	Wed Oct 30 16:44:29 2002
@@ -17,7 +17,7 @@
  *  CMI 8330 support - Alessandro Zummo <azummo@ita.flashnet.it>
  *
  * 18-01-2000 Separated sb_card and sb_common
- *  Jeff Garzik <jgarzik@mandrakesoft.com>
+ *  Jeff Garzik <jgarzik@pobox.com>
  *
  * 04-02-2000 Added Soundblaster AWE 64 PnP support, isapnpjump
  *  Alessandro Zummo <azummo@ita.flashnet.it>
diff -Nru a/sound/oss/sb_common.c b/sound/oss/sb_common.c
--- a/sound/oss/sb_common.c	Wed Oct 30 16:44:19 2002
+++ b/sound/oss/sb_common.c	Wed Oct 30 16:44:19 2002
@@ -17,7 +17,7 @@
  * (fokkensr@vertis.nl)	 Which means: You can adjust the recording levels.
  *
  * 2000/01/18 - separated sb_card and sb_common -
- * Jeff Garzik <jgarzik@mandrakesoft.com>
+ * Jeff Garzik <jgarzik@pobox.com>
  *
  * 2000/09/18 - got rid of attach_uart401
  * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
diff -Nru a/sound/pci/Config.help b/sound/pci/Config.help
--- a/sound/pci/Config.help	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,86 +0,0 @@
-CONFIG_SND_ALI5451
-  Say 'Y' or 'M' to include support for ALI PCI Audio M5451 sound core.
-
-CONFIG_SND_CS46XX
-  Say 'Y' or 'M' to include support for Cirrus Logic CS4610 / CS4612 /
-  CS4614 / CS4615 / CS4622 / CS4624 / CS4630 / CS4280 chips.
-
-CONFIG_SND_CS46XX_NEW_DSP
-  Say 'Y' to use a new DSP image for SPDIF and dual codecs.
-
-CONFIG_SND_CS4281
-  Say 'Y' or 'M' to include support for Cirrus Logic CS4281.
-
-CONFIG_SND_EMU10K1
-  Say 'Y' or 'M' to include support for Sound Blaster PCI 512, Live!,
-  Audigy and E-mu APS (partially supported).
-
-CONFIG_SND_KORG1212
-  Say 'Y' or 'M' to include support for Korg 1212IO.
-
-CONFIG_SND_NM256
-  Say 'Y' or 'M' to include support for NeoMagic NM256AV/ZX chips.
-
-CONFIG_SND_RME96
-  Say 'Y' or 'M' to include support for RME Digi96, Digi96/8 and
-  Digi96/8 PRO/PAD/PST.
-
-CONFIG_SND_RME32
-  Say 'Y' or 'M' to include support for RME Digi32, Digi32/8 and
-  Digi32 PRO audio devices.
-
-CONFIG_SND_RME9652
-  Say 'Y' or 'M' to include support for RME Hammerfall (RME Digi9652 /
-  Digi9636) soundcards.
-
-CONFIG_SND_HDSP
-  Say 'Y' or 'M' to include support for RME Hammerfall DSP Audio
-  soundcards.
-
-CONFIG_SND_TRIDENT
-  Say 'Y' or 'M' to include support for Trident 4D-Wave DX/NX and
-  SiS 7018 soundcards.
-
-CONFIG_SND_YMFPCI
-  Say 'Y' or 'M' to include support for Yamaha PCI audio chips - 
-  YMF724, YMF724F, YMF740, YMF740C, YMF744, YMF754.
-
-CONFIG_SND_ALS4000
-  Say 'Y' or 'M' to include support for Avance Logic ALS4000.
-
-CONFIG_SND_CMIPCI
-  Say 'Y' or 'M' to include support for C-Media CMI8338 and 8738 PCI
-  soundcards.
-
-CONFIG_SND_ENS1370
-  Say 'Y' or 'M' to include support for Ensoniq AudioPCI ES1370.
-
-CONFIG_SND_ENS1371
-  Say 'Y' or 'M' to include support for Ensoniq AudioPCI ES1371 and
-  Sound Blaster PCI 64 or 128 soundcards.
-
-CONFIG_SND_ES1938
-  Say 'Y' or 'M' to include support for ESS Solo-1 (ES1938, ES1946)
-  soundcard.
-
-CONFIG_SND_ES1968
-  Say 'Y' or 'M' to include support for ESS Maestro 1/2/2E.
-
-CONFIG_SND_MAESTRO3
-  Say 'Y' or 'M' to include support for ESS Maestro 3 (Allegro) soundcard.
-
-CONFIG_SND_FM801
-  Say 'Y' or 'M' to include support for ForteMedia FM801 based soundcards.
-
-CONFIG_SND_ICE1712
-  Say 'Y' or 'M' to include support for ICE1712 (Envy24) based soundcards.
-
-CONFIG_SND_INTEL8X0
-  Say 'Y' or 'M' to include support for Intel8x0 based soundcards,
-  SiS 7012, AMD768/8111, NVidia NForce and ALi 5455 chips.
-
-CONFIG_SND_SONICVIBES
-  Say 'Y' or 'M' to include support for S3 SonicVibes based soundcards.
-
-CONFIG_SND_VIA82XX
-  Say 'Y' or 'M' to include support for VIA VT82C686A/B, VT8233 South Bridge.
diff -Nru a/sound/pci/Config.in b/sound/pci/Config.in
--- a/sound/pci/Config.in	Wed Oct 30 16:44:27 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,32 +0,0 @@
-# ALSA PCI drivers
-
-mainmenu_option next_comment
-comment 'PCI devices'
-
-dep_tristate 'ALi PCI Audio M5451' CONFIG_SND_ALI5451 $CONFIG_SND
-dep_tristate 'Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x' CONFIG_SND_CS46XX $CONFIG_SND $CONFIG_SOUND_GAMEPORT
-dep_mbool '  Cirrus Logic (Sound Fusion) New DSP support (EXPERIMENTAL)' CONFIG_SND_CS46XX_NEW_DSP $CONFIG_SND_CS46XX $CONFIG_EXPERIMENTAL
-dep_tristate 'Cirrus Logic (Sound Fusion) CS4281' CONFIG_SND_CS4281 $CONFIG_SND $CONFIG_SOUND_GAMEPORT
-dep_tristate 'EMU10K1 (SB Live! & Audigy, E-mu APS)' CONFIG_SND_EMU10K1 $CONFIG_SND
-dep_tristate 'Korg 1212 IO' CONFIG_SND_KORG1212 $CONFIG_SND
-dep_tristate 'NeoMagic NM256AV/ZX' CONFIG_SND_NM256 $CONFIG_SND
-dep_tristate 'RME Digi32, 32/8, 32 PRO' CONFIG_SND_RME32 $CONFIG_SND
-dep_tristate 'RME Digi96, 96/8, 96/8 PRO' CONFIG_SND_RME96 $CONFIG_SND
-dep_tristate 'RME Digi9652 (Hammerfall)' CONFIG_SND_RME9652 $CONFIG_SND
-dep_tristate 'RME Hammerfall DSP Audio' CONFIG_SND_HDSP $CONFIG_SND
-dep_tristate 'Trident 4D-Wave DX/NX; SiS 7018' CONFIG_SND_TRIDENT $CONFIG_SND $CONFIG_SOUND_GAMEPORT
-dep_tristate 'Yamaha YMF724/740/744/754' CONFIG_SND_YMFPCI $CONFIG_SND
-dep_tristate 'Avance Logic ALS4000' CONFIG_SND_ALS4000 $CONFIG_SND
-dep_tristate 'C-Media 8738, 8338' CONFIG_SND_CMIPCI $CONFIG_SND
-dep_tristate '(Creative) Ensoniq AudioPCI 1370' CONFIG_SND_ENS1370 $CONFIG_SND
-dep_tristate '(Creative) Ensoniq AudioPCI 1371/1373' CONFIG_SND_ENS1371 $CONFIG_SND
-dep_tristate 'ESS ES1938/1946 (Solo-1)' CONFIG_SND_ES1938 $CONFIG_SND $CONFIG_SOUND_GAMEPORT
-dep_tristate 'ESS ES1968/1978 (Maestro-1/2/2E)' CONFIG_SND_ES1968 $CONFIG_SND
-dep_tristate 'ESS Allegro/Maestro3' CONFIG_SND_MAESTRO3 $CONFIG_SND
-dep_tristate 'ForteMedia FM801' CONFIG_SND_FM801 $CONFIG_SND
-dep_tristate 'ICEnsemble ICE1712 (Envy24)' CONFIG_SND_ICE1712 $CONFIG_SND
-dep_tristate 'Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111' CONFIG_SND_INTEL8X0 $CONFIG_SND
-dep_tristate 'S3 SonicVibes' CONFIG_SND_SONICVIBES $CONFIG_SND $CONFIG_SOUND_GAMEPORT
-dep_tristate 'VIA 82C686A/B, 8233 South Bridge' CONFIG_SND_VIA82XX $CONFIG_SND
-
-endmenu
diff -Nru a/sound/pci/Kconfig b/sound/pci/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/pci/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,172 @@
+# ALSA PCI drivers
+
+menu "PCI devices"
+	depends on SND!=n && PCI
+
+config SND_ALI5451
+	tristate "ALi PCI Audio M5451"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ALI PCI Audio M5451 sound core.
+
+config SND_CS46XX
+	tristate "Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x"
+	depends on SND && SOUND_GAMEPORT
+	help
+	  Say 'Y' or 'M' to include support for Cirrus Logic CS4610 / CS4612 /
+	  CS4614 / CS4615 / CS4622 / CS4624 / CS4630 / CS4280 chips.
+
+config SND_CS46XX_NEW_DSP
+	bool "Cirrus Logic (Sound Fusion) New DSP support (EXPERIMENTAL)"
+	depends on SND_CS46XX && EXPERIMENTAL
+	help
+	  Say 'Y' to use a new DSP image for SPDIF and dual codecs.
+
+config SND_CS4281
+	tristate "Cirrus Logic (Sound Fusion) CS4281"
+	depends on SND && SOUND_GAMEPORT
+	help
+	  Say 'Y' or 'M' to include support for Cirrus Logic CS4281.
+
+config SND_EMU10K1
+	tristate "EMU10K1 (SB Live! & Audigy, E-mu APS)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Sound Blaster PCI 512, Live!,
+	  Audigy and E-mu APS (partially supported).
+
+config SND_KORG1212
+	tristate "Korg 1212 IO"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Korg 1212IO.
+
+config SND_NM256
+	tristate "NeoMagic NM256AV/ZX"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for NeoMagic NM256AV/ZX chips.
+
+config SND_RME32
+	tristate "RME Digi32, 32/8, 32 PRO"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for RME Digi32, Digi32/8 and
+	  Digi32 PRO audio devices.
+
+config SND_RME96
+	tristate "RME Digi96, 96/8, 96/8 PRO"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for RME Digi96, Digi96/8 and
+	  Digi96/8 PRO/PAD/PST.
+
+config SND_RME9652
+	tristate "RME Digi9652 (Hammerfall)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for RME Hammerfall (RME Digi9652 /
+	  Digi9636) soundcards.
+
+config SND_HDSP
+	tristate "RME Hammerfall DSP Audio"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for RME Hammerfall DSP Audio
+	  soundcards.
+
+config SND_TRIDENT
+	tristate "Trident 4D-Wave DX/NX; SiS 7018"
+	depends on SND && SOUND_GAMEPORT
+	help
+	  Say 'Y' or 'M' to include support for Trident 4D-Wave DX/NX and
+	  SiS 7018 soundcards.
+
+config SND_YMFPCI
+	tristate "Yamaha YMF724/740/744/754"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Yamaha PCI audio chips - 
+	  YMF724, YMF724F, YMF740, YMF740C, YMF744, YMF754.
+
+config SND_ALS4000
+	tristate "Avance Logic ALS4000"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Avance Logic ALS4000.
+
+config SND_CMIPCI
+	tristate "C-Media 8738, 8338"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for C-Media CMI8338 and 8738 PCI
+	  soundcards.
+
+config SND_ENS1370
+	tristate "(Creative) Ensoniq AudioPCI 1370"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Ensoniq AudioPCI ES1370.
+
+config SND_ENS1371
+	tristate "(Creative) Ensoniq AudioPCI 1371/1373"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Ensoniq AudioPCI ES1371 and
+	  Sound Blaster PCI 64 or 128 soundcards.
+
+config SND_ES1938
+	tristate "ESS ES1938/1946 (Solo-1)"
+	depends on SND && SOUND_GAMEPORT
+	help
+	  Say 'Y' or 'M' to include support for ESS Solo-1 (ES1938, ES1946)
+	  soundcard.
+
+config SND_ES1968
+	tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ESS Maestro 1/2/2E.
+
+config SND_MAESTRO3
+	tristate "ESS Allegro/Maestro3"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ESS Maestro 3 (Allegro) soundcard.
+
+config SND_FM801
+	tristate "ForteMedia FM801"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ForteMedia FM801 based soundcards.
+
+config SND_ICE1712
+	tristate "ICEnsemble ICE1712 (Envy24)"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for ICE1712 (Envy24) based soundcards.
+	  Currently supported hardware is: MidiMan M Audio - Delta 1010(LT), Dio 2496,
+	  Delta 66/44, Audiophile 24/96; Hoontech SoundTrack DSP 24 (Value);
+	  TerraTec - EWX 24/96, EWS 88MT, EWS 88D, DMX 6Fire.
+
+config SND_INTEL8X0
+	tristate "Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for Intel8x0 based soundcards,
+	  SiS 7012, AMD768/8111, NVidia NForce and ALi 5455 chips.
+
+config SND_SONICVIBES
+	tristate "S3 SonicVibes"
+	depends on SND && SOUND_GAMEPORT
+	help
+	  Say 'Y' or 'M' to include support for S3 SonicVibes based soundcards.
+
+config SND_VIA82XX
+	tristate "VIA 82C686A/B, 8233 South Bridge"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for VIA VT82C686A/B, VT8233 South Bridge.
+
+endmenu
+
diff -Nru a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
--- a/sound/pci/ali5451/ali5451.c	Wed Oct 30 16:44:34 2002
+++ b/sound/pci/ali5451/ali5451.c	Wed Oct 30 16:44:34 2002
@@ -48,23 +48,23 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{ALI,M5451,pci},{ALI,M5451}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
-static int snd_pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ALI M5451 PCI Audio.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ALI M5451 PCI Audio.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ALI 5451 PCI Audio.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_pcm_channels, "PCM Channels");
-MODULE_PARM_SYNTAX(snd_pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}");
+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_PNP;
+static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ALI M5451 PCI Audio.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ALI M5451 PCI Audio.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ALI 5451 PCI Audio.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(pcm_channels, "PCM Channels");
+MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}");
 
 /*
  *  Debug part definations
@@ -2174,7 +2174,7 @@
 }
 
 static int __devinit snd_ali_probe(struct pci_dev *pci,
-				   const struct pci_device_id *id)
+				   const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2185,16 +2185,16 @@
 
         if (dev >= SNDRV_CARDS)
                 return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	if ((err = snd_ali_create(card, pci, snd_pcm_channels[dev], &codec)) < 0) {
+	if ((err = snd_ali_create(card, pci, pcm_channels[dev], &codec)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -2269,7 +2269,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-ali5451=snd_enable,snd_index,snd_id,snd_pcm_channels */
+/* format is: snd-ali5451=enable,index,id,pcm_channels */
 
 static int __init alsa_card_ali_setup(char *str)
 {
@@ -2277,10 +2277,10 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_channels[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_channels[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/als4000.c b/sound/pci/als4000.c
--- a/sound/pci/als4000.c	Wed Oct 30 16:44:34 2002
+++ b/sound/pci/als4000.c	Wed Oct 30 16:44:34 2002
@@ -64,28 +64,28 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Avance Logic,ALS4000}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_joystick_port[SNDRV_CARDS] =
+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_PNP;	/* Enable this card */
+static int joystick_port[SNDRV_CARDS] =
 #ifdef CONFIG_ISA
 	{0x200};	/* enable as default */
 #else
 	{0};	/* disabled */
 #endif
 
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ALS4000 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ALS4000 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ALS4000 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_joystick_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_joystick_port, "Joystick port address for ALS4000 soundcard. (0 = disabled)");
-MODULE_PARM_SYNTAX(snd_joystick_port, SNDRV_ENABLED);
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ALS4000 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ALS4000 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ALS4000 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_INDEX_DESC);
+MODULE_PARM(joystick_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_port, "Joystick port address for ALS4000 soundcard. (0 = disabled)");
+MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED);
 
 #define chip_t sb_t
 
@@ -555,7 +555,7 @@
 }
 
 static int __devinit snd_card_als4k_probe(struct pci_dev *pci,
-					  const struct pci_device_id *id)
+					  const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -569,7 +569,7 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
@@ -596,9 +596,9 @@
 	pci_set_master(pci);
 	
 	/* disable all legacy ISA stuff except for joystick */
-	snd_als4000_set_addr(gcr, 0, 0, 0, snd_joystick_port[dev]);
+	snd_als4000_set_addr(gcr, 0, 0, 0, joystick_port[dev]);
 	
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 
 			    sizeof( snd_card_als4000_t ) );
 	if (card == NULL) {
 		release_resource(res_gcr_port);
@@ -708,7 +708,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-als4000=snd_enable,snd_index,snd_id */
+/* format is: snd-als4000=enable,index,id */
 
 static int __init alsa_card_als4000_setup(char *str)
 {
@@ -716,9 +716,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/cmipci.c b/sound/pci/cmipci.c
--- a/sound/pci/cmipci.c	Wed Oct 30 16:44:22 2002
+++ b/sound/pci/cmipci.c	Wed Oct 30 16:44:22 2002
@@ -44,27 +44,27 @@
 		"{C-Media,CMI8338A},"
 		"{C-Media,CMI8338B}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable switches */
-static long snd_mpu_port[SNDRV_CARDS] = {0x330, [1 ... (SNDRV_CARDS-1)]=-1};
-static long snd_fm_port[SNDRV_CARDS] = {0x388, [1 ... (SNDRV_CARDS-1)]=-1};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for C-Media PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for C-Media PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable C-Media PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_ENABLED ",allows:{{-1},{0x330},{0x320},{0x310},{0x300}},dialog:list");
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM port.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_ENABLED ",allows:{{-1},{0x388},{0x3c8},{0x3e0},{0x3e8}},dialog:list");
+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_PNP;	/* Enable switches */
+static long mpu_port[SNDRV_CARDS] = {0x330, [1 ... (SNDRV_CARDS-1)]=-1};
+static long fm_port[SNDRV_CARDS] = {0x388, [1 ... (SNDRV_CARDS-1)]=-1};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for C-Media PCI soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for C-Media PCI soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable C-Media PCI soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{-1},{0x330},{0x320},{0x310},{0x300}},dialog:list");
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM port.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED ",allows:{{-1},{0x388},{0x3c8},{0x3e0},{0x3e8}},dialog:list");
 
 #ifndef PCI_DEVICE_ID_CMEDIA_CM8738
 #define PCI_DEVICE_ID_CMEDIA_CM8738	0x0111
@@ -2678,7 +2678,7 @@
 MODULE_DEVICE_TABLE(pci, snd_cmipci_ids);
 
 static int __devinit snd_cmipci_probe(struct pci_dev *pci,
-				      const struct pci_device_id *id)
+				      const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2687,12 +2687,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (! snd_enable[dev]) {
+	if (! enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	
@@ -2711,8 +2711,8 @@
 	}
 
 	if ((err = snd_cmipci_create(card, pci,
-				     snd_mpu_port[dev],
-				     snd_fm_port[dev],
+				     mpu_port[dev],
+				     fm_port[dev],
 				     &cm)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -2774,8 +2774,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-cmipci=snd_enable,snd_index,snd_id,
-			 snd_mpu_port,snd_fm_port */
+/* format is: snd-cmipci=enable,index,id,
+			 mpu_port,fm_port */
 
 static int __init alsa_card_cmipci_setup(char *str)
 {
@@ -2783,11 +2783,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/cs4281.c b/sound/pci/cs4281.c
--- a/sound/pci/cs4281.c	Wed Oct 30 16:44:34 2002
+++ b/sound/pci/cs4281.c	Wed Oct 30 16:44:34 2002
@@ -45,23 +45,23 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{Cirrus Logic,CS4281}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable switches */
-static int snd_dual_codec[SNDRV_CARDS];	/* dual codec */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for CS4281 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for CS4281 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable CS4281 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_dual_codec, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_dual_codec, "Secondary Codec ID (0 = disabled).");
-MODULE_PARM_SYNTAX(snd_dual_codec, SNDRV_ENABLED ",allows:{{0,3}}");
+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_PNP;	/* Enable switches */
+static int dual_codec[SNDRV_CARDS];	/* dual codec */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for CS4281 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for CS4281 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable CS4281 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(dual_codec, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(dual_codec, "Secondary Codec ID (0 = disabled).");
+MODULE_PARM_SYNTAX(dual_codec, SNDRV_ENABLED ",allows:{{0,3}}");
 
 /*
  *
@@ -1479,7 +1479,7 @@
 	chip->ba1_addr = pci_resource_start(pci, 1);
 	pci_set_master(pci);
 	if (dual_codec < 0 || dual_codec > 3) {
-		snd_printk(KERN_ERR "invalid snd_dual_codec option %d\n", dual_codec);
+		snd_printk(KERN_ERR "invalid dual_codec option %d\n", dual_codec);
 		dual_codec = 0;
 	}
 	chip->dual_codec = dual_codec;
@@ -1990,7 +1990,7 @@
 
 
 static int __devinit snd_cs4281_probe(struct pci_dev *pci,
-				      const struct pci_device_id *id)
+				      const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2000,16 +2000,16 @@
 
         if (dev >= SNDRV_CARDS)
                 return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	if ((err = snd_cs4281_create(card, pci, &chip, snd_dual_codec[dev])) < 0) {
+	if ((err = snd_cs4281_create(card, pci, &chip, dual_codec[dev])) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -2253,7 +2253,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-cs4281=snd_enable,snd_index,snd_id */
+/* format is: snd-cs4281=enable,index,id */
 
 static int __init alsa_card_cs4281_setup(char *str)
 {
@@ -2261,9 +2261,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c
--- a/sound/pci/cs46xx/cs46xx.c	Wed Oct 30 16:44:35 2002
+++ b/sound/pci/cs46xx/cs46xx.c	Wed Oct 30 16:44:35 2002
@@ -46,31 +46,31 @@
 		"{Cirrus Logic,Sound Fusion (CS4624)},"
 		"{Cirrus Logic,Sound Fusion (CS4630)}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_thinkpad[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_mmap_valid[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for the CS46xx soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for the CS46xx soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable CS46xx soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_external_amp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_external_amp, "Force to enable external amplifer.");
-MODULE_PARM_SYNTAX(snd_external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
-MODULE_PARM(snd_thinkpad, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_thinkpad, "Force to enable Thinkpad's CLKRUN control.");
-MODULE_PARM_SYNTAX(snd_thinkpad, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
-MODULE_PARM(snd_mmap_valid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mmap_valid, "Support OSS mmap.");
-MODULE_PARM_SYNTAX(snd_mmap_valid, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+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_PNP;	/* Enable this card */
+static int external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int thinkpad[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int mmap_valid[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for the CS46xx soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for the CS46xx soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable CS46xx soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(external_amp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(external_amp, "Force to enable external amplifer.");
+MODULE_PARM_SYNTAX(external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(thinkpad, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control.");
+MODULE_PARM_SYNTAX(thinkpad, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(mmap_valid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mmap_valid, "Support OSS mmap.");
+MODULE_PARM_SYNTAX(mmap_valid, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 
 static struct pci_device_id snd_cs46xx_ids[] __devinitdata = {
         { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* CS4280 */
@@ -82,7 +82,7 @@
 MODULE_DEVICE_TABLE(pci, snd_cs46xx_ids);
 
 static int __devinit snd_card_cs46xx_probe(struct pci_dev *pci,
-					   const struct pci_device_id *id)
+					   const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -91,21 +91,21 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	if ((err = snd_cs46xx_create(card, pci,
-				     snd_external_amp[dev], snd_thinkpad[dev],
+				     external_amp[dev], thinkpad[dev],
 				     &chip)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
-	chip->accept_valid = snd_mmap_valid[dev];
+	chip->accept_valid = mmap_valid[dev];
 	if ((err = snd_cs46xx_pcm(chip, 0, NULL)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -207,7 +207,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-cs46xx=snd_enable,snd_index,snd_id */
+/* format is: snd-cs46xx=enable,index,id */
 
 static int __init alsa_card_cs46xx_setup(char *str)
 {
@@ -215,9 +215,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
--- a/sound/pci/emu10k1/emu10k1.c	Wed Oct 30 16:44:17 2002
+++ b/sound/pci/emu10k1/emu10k1.c	Wed Oct 30 16:44:17 2002
@@ -40,43 +40,43 @@
 #include <sound/emu10k1_synth.h>
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_extin[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_extout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
-static int snd_max_synth_voices[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 64};
-static int snd_max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128};
-static int snd_enable_ir[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for the EMU10K1 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for the EMU10K1 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable the EMU10K1 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_extin, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_extin, "Available external inputs for FX8010. Zero=default.");
-MODULE_PARM_SYNTAX(snd_extin, SNDRV_ENABLED "allows:{{0,0x0ffff}},base:16");
-MODULE_PARM(snd_extout, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_extout, "Available external outputs for FX8010. Zero=default.");
-MODULE_PARM_SYNTAX(snd_extout, SNDRV_ENABLED "allows:{{0,0x0ffff}},base:16");
-MODULE_PARM(snd_seq_ports, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_seq_ports, "Allocated sequencer ports for internal synthesizer.");
-MODULE_PARM_SYNTAX(snd_seq_ports, SNDRV_ENABLED "allows:{{0,32}}");
-MODULE_PARM(snd_max_synth_voices, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_max_synth_voices, "Maximum number of voices for WaveTable.");
-MODULE_PARM_SYNTAX(snd_max_synth_voices, SNDRV_ENABLED);
-MODULE_PARM(snd_max_buffer_size, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_max_buffer_size, "Maximum sample buffer size in MB.");
-MODULE_PARM_SYNTAX(snd_max_buffer_size, SNDRV_ENABLED);
-MODULE_PARM(snd_enable_ir, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable_ir, "Enable IR.");
-MODULE_PARM_SYNTAX(snd_enable_ir, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+static int extin[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int extout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4};
+static int max_synth_voices[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 64};
+static int max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128};
+static int enable_ir[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for the EMU10K1 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable the EMU10K1 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(extin, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(extin, "Available external inputs for FX8010. Zero=default.");
+MODULE_PARM_SYNTAX(extin, SNDRV_ENABLED "allows:{{0,0x0ffff}},base:16");
+MODULE_PARM(extout, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(extout, "Available external outputs for FX8010. Zero=default.");
+MODULE_PARM_SYNTAX(extout, SNDRV_ENABLED "allows:{{0,0x0ffff}},base:16");
+MODULE_PARM(seq_ports, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(seq_ports, "Allocated sequencer ports for internal synthesizer.");
+MODULE_PARM_SYNTAX(seq_ports, SNDRV_ENABLED "allows:{{0,32}}");
+MODULE_PARM(max_synth_voices, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(max_synth_voices, "Maximum number of voices for WaveTable.");
+MODULE_PARM_SYNTAX(max_synth_voices, SNDRV_ENABLED);
+MODULE_PARM(max_buffer_size, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(max_buffer_size, "Maximum sample buffer size in MB.");
+MODULE_PARM_SYNTAX(max_buffer_size, SNDRV_ENABLED);
+MODULE_PARM(enable_ir, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable_ir, "Enable IR.");
+MODULE_PARM_SYNTAX(enable_ir, SNDRV_ENABLE_DESC);
 
 static struct pci_device_id snd_emu10k1_ids[] __devinitdata = {
 	{ 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },	/* EMU10K1 */
@@ -87,7 +87,7 @@
 MODULE_DEVICE_TABLE(pci, snd_emu10k1_ids);
 
 static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci,
-					    const struct pci_device_id *id)
+					    const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -99,21 +99,21 @@
 
 	if (dev >= SNDRV_CARDS)
         	return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
-	if (snd_max_buffer_size[dev] < 32)
-		snd_max_buffer_size[dev] = 32;
-	else if (snd_max_buffer_size[dev] > 1024)
-		snd_max_buffer_size[dev] = 1024;
-	if ((err = snd_emu10k1_create(card, pci, snd_extin[dev], snd_extout[dev],
-				      (long)snd_max_buffer_size[dev] * 1024 * 1024,
-				      snd_enable_ir[dev],
+	if (max_buffer_size[dev] < 32)
+		max_buffer_size[dev] = 32;
+	else if (max_buffer_size[dev] > 1024)
+		max_buffer_size[dev] = 1024;
+	if ((err = snd_emu10k1_create(card, pci, extin[dev], extout[dev],
+				      (long)max_buffer_size[dev] * 1024 * 1024,
+				      enable_ir[dev],
 				      &emu)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -166,8 +166,8 @@
 		strcpy(wave->name, "Emu-10k1 Synth");
 		arg->hwptr = emu;
 		arg->index = 1;
-		arg->seq_ports = snd_seq_ports[dev];
-		arg->max_voices = snd_max_synth_voices[dev];
+		arg->seq_ports = seq_ports[dev];
+		arg->max_voices = max_synth_voices[dev];
 	}
 #endif
  
@@ -228,8 +228,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-emu10k1=snd_enable,snd_index,snd_id,
-			  snd_seq_ports,snd_max_synth_voices */
+/* format is: snd-emu10k1=enable,index,id,
+			  seq_ports,max_synth_voices */
 
 static int __init alsa_card_emu10k1_setup(char *str)
 {
@@ -237,11 +237,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_seq_ports[nr_dev]) == 2 &&
-	       get_option(&str,&snd_max_synth_voices[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&seq_ports[nr_dev]) == 2 &&
+	       get_option(&str,&max_synth_voices[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
--- a/sound/pci/emu10k1/emufx.c	Wed Oct 30 16:44:28 2002
+++ b/sound/pci/emu10k1/emufx.c	Wed Oct 30 16:44:28 2002
@@ -413,7 +413,7 @@
 	
 	snd_runtime_check(emu, return -EINVAL);
 	snd_runtime_check(handler, return -EINVAL);
-	irq = kmalloc(sizeof(*irq), GFP_KERNEL);
+	irq = kmalloc(sizeof(*irq), GFP_ATOMIC);
 	if (irq == NULL)
 		return -ENOMEM;
 	irq->handler = handler;
diff -Nru a/sound/pci/ens1370.c b/sound/pci/ens1370.c
--- a/sound/pci/ens1370.c	Wed Oct 30 16:44:26 2002
+++ b/sound/pci/ens1370.c	Wed Oct 30 16:44:26 2002
@@ -63,19 +63,19 @@
 		"{Ectiva,EV1938}}");
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable switches */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Ensoniq AudioPCI soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Ensoniq AudioPCI soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Ensoniq AudioPCI soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable switches */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Ensoniq AudioPCI soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Ensoniq AudioPCI soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Ensoniq AudioPCI soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 
 #ifndef PCI_DEVICE_ID_ENSONIQ_CT5880
 #define PCI_DEVICE_ID_ENSONIQ_CT5880    0x5880
@@ -593,7 +593,7 @@
 		}
 		spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
 	}
-	snd_printk("codec write timeout at 0x%lx [0x%lx]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
+	snd_printk("codec write timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
 }
 
 static unsigned short snd_es1371_codec_read(ac97_t *ac97,
@@ -641,14 +641,14 @@
 			}
 			spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
 			if (++fail > 10) {
-				snd_printk("codec read timeout (final) at 0x%lx, reg = 0x%x [0x%lx]\n", ES_REG(ensoniq, 1371_CODEC), reg, inl(ES_REG(ensoniq, 1371_CODEC)));
+				snd_printk("codec read timeout (final) at 0x%lx, reg = 0x%x [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), reg, inl(ES_REG(ensoniq, 1371_CODEC)));
 				return 0;
 			}
 			goto __again;
 		}
 		spin_unlock_irqrestore(&ensoniq->reg_lock, flags);
 	}
-	snd_printk("es1371: codec read timeout at 0x%lx [0x%lx]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
+	snd_printk("es1371: codec read timeout at 0x%lx [0x%x]\n", ES_REG(ensoniq, 1371_CODEC), inl(ES_REG(ensoniq, 1371_CODEC)));
 	return 0;
 }
 
@@ -1985,7 +1985,7 @@
 }
 
 static int __devinit snd_audiopci_probe(struct pci_dev *pci,
-					const struct pci_device_id *id)
+					const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -1994,12 +1994,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -2092,7 +2092,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-ens1370=snd_enable,snd_index,snd_id */
+/* format is: snd-ens1370=enable,index,id */
 
 static int __init alsa_card_ens137x_setup(char *str)
 {
@@ -2100,9 +2100,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/es1938.c b/sound/pci/es1938.c
--- a/sound/pci/es1938.c	Wed Oct 30 16:44:30 2002
+++ b/sound/pci/es1938.c	Wed Oct 30 16:44:30 2002
@@ -6,7 +6,7 @@
  *                   Abramo Bagnara <abramo@alsa-project.org>,
  *                   Markus Gruber <gruber@eikon.tum.de>
  * 
- * Rewritted from sonicvibes.c source.
+ * Rewritten from sonicvibes.c source.
  *
  *  TODO:
  *    Rewrite better spinlocks
@@ -38,7 +38,7 @@
     This is due to playback interrupts not generated.
     I suspect a timing issue.
   - Sometimes the interrupt handler is invoked wrongly during playback.
-    This generate some harmless "Unexpected hw_pointer: wrong interrupt
+    This generates some harmless "Unexpected hw_pointer: wrong interrupt
     acknowledge".
     I've seen that using small period sizes.
     Reproducible with:
@@ -81,19 +81,19 @@
 #define PCI_DEVICE_ID_ESS_ES1938	0x1969
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ESS Solo-1 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ESS Solo-1 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ESS Solo-1 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ESS Solo-1 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ESS Solo-1 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ESS Solo-1 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 
 #define SLIO_REG(chip, x) ((chip)->io_port + ESSIO_REG_##x)
 
@@ -573,7 +573,7 @@
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		/* According to the documentation this should be:
-		   0x13 but that value may random swap stereo channels */
+		   0x13 but that value may randomly swap stereo channels */
 		snd_es1938_mixer_write(chip, ESSSB_IREG_AUDIO2CONTROL1, 0x93);
 		outb(0x0a, SLIO_REG(chip, AUDIO2MODE));
 		chip->active |= DAC2;
@@ -1582,7 +1582,7 @@
        
 
 static int __devinit snd_es1938_probe(struct pci_dev *pci,
-				      const struct pci_device_id *id)
+				      const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -1593,12 +1593,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	for (idx = 0; idx < 5; idx++) {
@@ -1701,7 +1701,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-es1938=snd_enable,snd_index,snd_id */
+/* format is: snd-es1938=enable,index,id */
 
 static int __init alsa_card_es1938_setup(char *str)
 {
@@ -1709,9 +1709,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/es1968.c b/sound/pci/es1968.c
--- a/sound/pci/es1968.c	Wed Oct 30 16:44:30 2002
+++ b/sound/pci/es1968.c	Wed Oct 30 16:44:30 2002
@@ -122,35 +122,35 @@
 		"{ESS,Maestro 1},"
 		"{TerraTec,DMX}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 1-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_total_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1024 };
-static int snd_pcm_substreams_p[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4 };
-static int snd_pcm_substreams_c[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1 };
-static int snd_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_total_bufsize, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_total_bufsize, "Total buffer size in kB.");
-MODULE_PARM_SYNTAX(snd_total_bufsize, SNDRV_ENABLED ",allows:{{1,4096}},skill:advanced");
-MODULE_PARM(snd_pcm_substreams_p, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_substreams_p, "PCM Playback substreams for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_pcm_substreams_p, SNDRV_ENABLED ",allows:{{1,8}}");
-MODULE_PARM(snd_pcm_substreams_c, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_substreams_c, "PCM Capture substreams for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_pcm_substreams_c, SNDRV_ENABLED ",allows:{{0,8}}");
-MODULE_PARM(snd_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_clock, "Clock on " CARD_NAME " soundcard.  (0 = auto-detect)");
-MODULE_PARM_SYNTAX(snd_clock, SNDRV_ENABLED);
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 1-MAX */
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
+static int total_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1024 };
+static int pcm_substreams_p[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4 };
+static int pcm_substreams_c[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1 };
+static int clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(total_bufsize, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(total_bufsize, "Total buffer size in kB.");
+MODULE_PARM_SYNTAX(total_bufsize, SNDRV_ENABLED ",allows:{{1,4096}},skill:advanced");
+MODULE_PARM(pcm_substreams_p, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_substreams_p, "PCM Playback substreams for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(pcm_substreams_p, SNDRV_ENABLED ",allows:{{1,8}}");
+MODULE_PARM(pcm_substreams_c, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_substreams_c, "PCM Capture substreams for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(pcm_substreams_c, SNDRV_ENABLED ",allows:{{0,8}}");
+MODULE_PARM(clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(clock, "Clock on " CARD_NAME " soundcard.  (0 = auto-detect)");
+MODULE_PARM_SYNTAX(clock, SNDRV_ENABLED);
 
 
 /* PCI Dev ID's */
@@ -2667,7 +2667,7 @@
 /*
  */
 static int __devinit snd_es1968_probe(struct pci_dev *pci,
-				      const struct pci_device_id *id)
+				      const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2676,23 +2676,23 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (!card)
 		return -ENOMEM;
                 
-	if (snd_total_bufsize[dev] < 128)
-		snd_total_bufsize[dev] = 128;
-	if (snd_total_bufsize[dev] > 4096)
-		snd_total_bufsize[dev] = 4096;
+	if (total_bufsize[dev] < 128)
+		total_bufsize[dev] = 128;
+	if (total_bufsize[dev] > 4096)
+		total_bufsize[dev] = 4096;
 	if ((err = snd_es1968_create(card, pci,
-				     snd_total_bufsize[dev] * 1024, /* in bytes */
-				     snd_pcm_substreams_p[dev], 
-				     snd_pcm_substreams_c[dev],
+				     total_bufsize[dev] * 1024, /* in bytes */
+				     pcm_substreams_p[dev], 
+				     pcm_substreams_c[dev],
 				     &chip)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -2738,7 +2738,7 @@
 		}
 	}
 
-	chip->clock = snd_clock[dev];
+	chip->clock = clock[dev];
 	if (! chip->clock)
 		es1968_measure_clock(chip);
 
@@ -2817,11 +2817,11 @@
 
 #ifndef MODULE
 
-/* format is: snd-es1968=snd_enable,snd_index,snd_id,
-			 snd_total_bufsize,
-			 snd_pcm_substreams_p,
-			 snd_pcm_substreams_c,
-			 snd_clock
+/* format is: snd-es1968=enable,index,id,
+			 total_bufsize,
+			 pcm_substreams_p,
+			 pcm_substreams_c,
+			 clock
 */
 
 static int __init alsa_card_es1968_setup(char *str)
@@ -2830,13 +2830,13 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_total_bufsize[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_substreams_p[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_substreams_c[nr_dev]) == 2 &&
-	       get_option(&str,&snd_clock[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&total_bufsize[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_substreams_p[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_substreams_c[nr_dev]) == 2 &&
+	       get_option(&str,&clock[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/fm801.c b/sound/pci/fm801.c
--- a/sound/pci/fm801.c	Wed Oct 30 16:44:31 2002
+++ b/sound/pci/fm801.c	Wed Oct 30 16:44:31 2002
@@ -42,19 +42,19 @@
 MODULE_DEVICES("{{ForteMedia,FM801},"
 		"{Genius,SoundMaker Live 5.1}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for the FM801 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for the FM801 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable FM801 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for the FM801 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for the FM801 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable FM801 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 
 /*
  *  Direct registers
@@ -1022,7 +1022,7 @@
 }
 
 static int __devinit snd_card_fm801_probe(struct pci_dev *pci,
-					  const struct pci_device_id *id)
+					  const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -1032,12 +1032,12 @@
 
         if (dev >= SNDRV_CARDS)
                 return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	if ((err = snd_fm801_create(card, pci, &chip)) < 0) {
@@ -1120,7 +1120,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-fm801=snd_enable,snd_index,snd_id */
+/* format is: snd-fm801=enable,index,id */
 
 static int __init alsa_card_fm801_setup(char *str)
 {
@@ -1128,9 +1128,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/ice1712/ak4524.c b/sound/pci/ice1712/ak4524.c
--- a/sound/pci/ice1712/ak4524.c	Wed Oct 30 16:44:29 2002
+++ b/sound/pci/ice1712/ak4524.c	Wed Oct 30 16:44:29 2002
@@ -51,12 +51,18 @@
 
 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
 	tmp |= ak->add_flags;
-	if (ak->cif) {
-		tmp |= ak->codecs_mask; /* start without chip select */
-	}  else {
-		tmp &= ~ak->codecs_mask; /* chip select low */
-		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
-		udelay(1);
+	tmp &= ~ak->mask_flags;
+	if (ak->cs_mask == ak->cs_addr) {
+		if (ak->cif) {
+			tmp |= ak->cs_mask; /* start without chip select */
+		}  else {
+			tmp &= ~ak->cs_mask; /* chip select low */
+			snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
+			udelay(1);
+		}
+	} else {
+		tmp &= ~ak->cs_mask;
+		tmp |= ak->cs_addr;
 	}
 
 	addr &= 0x07;
@@ -79,13 +85,18 @@
 	else
 		ak->ipga_gain[chip][addr-4] = data;
 
-	if (ak->cif) {
-		/* assert a cs pulse to trigger */
-		tmp &= ~ak->codecs_mask;
-		snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
-		udelay(1);
+	if (ak->cs_mask == ak->cs_addr) {
+		if (ak->cif) {
+			/* assert a cs pulse to trigger */
+			tmp &= ~ak->cs_mask;
+			snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
+			udelay(1);
+		}
+		tmp |= ak->cs_mask; /* chip select high to trigger */
+	} else {
+		tmp &= ~ak->cs_mask;
+		tmp |= ak->cs_none; /* deselect address */
 	}
-	tmp |= ak->codecs_mask; /* chip select high to trigger */
 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
 	udelay(1);
 
diff -Nru a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c
--- a/sound/pci/ice1712/delta.c	Wed Oct 30 16:44:21 2002
+++ b/sound/pci/ice1712/delta.c	Wed Oct 30 16:44:21 2002
@@ -83,8 +83,13 @@
 {
 	unsigned char tmp;
 	tmp = snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
-	tmp |= ICE1712_DELTA_AP_CCLK | ICE1712_DELTA_AP_CS_CODEC;
-	tmp &= ~ICE1712_DELTA_AP_CS_DIGITAL;
+	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA1010LT) {
+		tmp &= ~ICE1712_DELTA_1010LT_CS;
+		tmp |= ICE1712_DELTA_1010LT_CCLK | ICE1712_DELTA_1010LT_CS_CS8427;
+	} else { /* Audiophile */
+		tmp |= ICE1712_DELTA_AP_CCLK | ICE1712_DELTA_AP_CS_CODEC;
+		tmp &= ~ICE1712_DELTA_AP_CS_DIGITAL;
+	}
 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
 	udelay(5);
 	return tmp;
@@ -93,7 +98,12 @@
 /* deassert chip select */
 static void ap_cs8427_codec_deassert(ice1712_t *ice, unsigned char tmp)
 {
-	tmp |= ICE1712_DELTA_AP_CS_DIGITAL;
+	if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DELTA1010LT) {
+		tmp &= ~ICE1712_DELTA_1010LT_CS;
+		tmp |= ICE1712_DELTA_1010LT_CS_NONE;
+	} else { /* Audiophile */
+		tmp |= ICE1712_DELTA_AP_CS_DIGITAL;
+	}
 	snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, tmp);
 }
 
@@ -227,12 +237,25 @@
 static int delta_ak4524_start(ice1712_t *ice, unsigned char *saved, int chip)
 {
 	snd_ice1712_save_gpio_status(ice, saved);
-	ice->ak4524.codecs_mask = chip == 0 ? ICE1712_DELTA_CODEC_CHIP_A : ICE1712_DELTA_CODEC_CHIP_B;
+	ice->ak4524.cs_mask =
+	ice->ak4524.cs_addr = chip == 0 ? ICE1712_DELTA_CODEC_CHIP_A :
+					  ICE1712_DELTA_CODEC_CHIP_B;
+	return 0;
+}
+
+/*
+ * AK4524 on Delta1010LT to choose the chip address
+ */
+static int delta1010lt_ak4524_start(ice1712_t *ice, unsigned char *saved, int chip)
+{
+	snd_ice1712_save_gpio_status(ice, saved);
+	ice->ak4524.cs_mask = ICE1712_DELTA_1010LT_CS;
+	ice->ak4524.cs_addr = chip << 4;
 	return 0;
 }
 
 /*
- * change the rate of AK4524 on Delta 44/66 and AP
+ * change the rate of AK4524 on Delta 44/66, AP, 1010LT
  */
 static void delta_ak4524_set_rate_val(ice1712_t *ice, unsigned char val)
 {
@@ -319,6 +342,7 @@
 		ice->num_total_dacs = ice->omni ? 8 : 4;
 		break;
 	case ICE1712_SUBDEVICE_DELTA1010:
+	case ICE1712_SUBDEVICE_DELTA1010LT:
 		ice->num_total_dacs = 8;
 		break;
 	}
@@ -326,6 +350,7 @@
 	/* initialize spdif */
 	switch (ice->eeprom.subvendor) {
 	case ICE1712_SUBDEVICE_AUDIOPHILE:
+	case ICE1712_SUBDEVICE_DELTA1010LT:
 		if ((err = snd_i2c_bus_create(ice->card, "ICE1712 GPIO 1", NULL, &ice->i2c)) < 0) {
 			snd_printk("unable to create I2C bus\n");
 			return err;
@@ -358,8 +383,23 @@
 		ak->cif = 0; /* the default level of the CIF pin from AK4524 */
 		ak->data_mask = ICE1712_DELTA_AP_DOUT;
 		ak->clk_mask = ICE1712_DELTA_AP_CCLK;
-		ak->codecs_mask = ICE1712_DELTA_AP_CS_CODEC; /* select AK4528 codec */
+		ak->cs_mask = ak->cs_addr = ICE1712_DELTA_AP_CS_CODEC; /* select AK4528 codec */
+		ak->cs_none = 0;
 		ak->add_flags = ICE1712_DELTA_AP_CS_DIGITAL; /* assert digital high */
+		ak->mask_flags = 0;
+		ak->ops.set_rate_val = delta_ak4524_set_rate_val;
+		snd_ice1712_ak4524_init(ice);
+		break;
+	case ICE1712_SUBDEVICE_DELTA1010LT:
+		ak->num_adcs = ak->num_dacs = 8;
+		ak->cif = 0; /* the default level of the CIF pin from AK4524 */
+		ak->data_mask = ICE1712_DELTA_1010LT_DOUT;
+		ak->clk_mask = ICE1712_DELTA_1010LT_CCLK;
+		ak->cs_mask = ak->cs_addr = 0; /* set later */
+		ak->cs_none = ICE1712_DELTA_1010LT_CS_NONE;
+		ak->add_flags = 0;
+		ak->mask_flags = 0;
+		ak->ops.start = delta1010lt_ak4524_start;
 		ak->ops.set_rate_val = delta_ak4524_set_rate_val;
 		snd_ice1712_ak4524_init(ice);
 		break;
@@ -369,8 +409,10 @@
 		ak->cif = 0; /* the default level of the CIF pin from AK4524 */
 		ak->data_mask = ICE1712_DELTA_CODEC_SERIAL_DATA;
 		ak->clk_mask = ICE1712_DELTA_CODEC_SERIAL_CLOCK;
-		ak->codecs_mask = 0; /* set later */
+		ak->cs_mask = ak->cs_addr = 0; /* set later */
+		ak->cs_none = 0;
 		ak->add_flags = 0;
+		ak->mask_flags = 0;
 		ak->ops.start = delta_ak4524_start;
 		ak->ops.set_rate_val = delta_ak4524_set_rate_val;
 		snd_ice1712_ak4524_init(ice);
@@ -387,6 +429,8 @@
 
 static snd_kcontrol_new_t snd_ice1712_delta1010_wordclock_select __devinitdata =
 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM, "Word Clock Sync", 0, ICE1712_DELTA_WORD_CLOCK_SELECT, 1, 0);
+static snd_kcontrol_new_t snd_ice1712_delta1010lt_wordclock_select __devinitdata =
+ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM, "Word Clock Sync", 0, ICE1712_DELTA_1010LT_WORDCLOCK, 1, 0);
 static snd_kcontrol_new_t snd_ice1712_delta1010_wordclock_status __devinitdata =
 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_PCM, "Word Clock Status", 0, ICE1712_DELTA_WORD_CLOCK_STATUS, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE);
 static snd_kcontrol_new_t snd_ice1712_deltadio2496_spdif_in_select __devinitdata =
@@ -414,6 +458,11 @@
 		if (err < 0)
 			return err;
 		break;
+	case ICE1712_SUBDEVICE_DELTA1010LT:
+		err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_ice1712_delta1010lt_wordclock_select, ice));
+		if (err < 0)
+			return err;
+		break;
 	}
 
 	/* normal spdif controls */
@@ -441,6 +490,7 @@
 
 	/* ak4524 controls */
 	switch (ice->eeprom.subvendor) {
+	case ICE1712_SUBDEVICE_DELTA1010LT:
 	case ICE1712_SUBDEVICE_AUDIOPHILE:
 	case ICE1712_SUBDEVICE_DELTA44:
 	case ICE1712_SUBDEVICE_DELTA66:
diff -Nru a/sound/pci/ice1712/delta.h b/sound/pci/ice1712/delta.h
--- a/sound/pci/ice1712/delta.h	Wed Oct 30 16:44:28 2002
+++ b/sound/pci/ice1712/delta.h	Wed Oct 30 16:44:28 2002
@@ -26,6 +26,7 @@
 
 #define DELTA_DEVICE_DESC \
 		"{MidiMan M Audio,Delta 1010},"\
+		"{MidiMan M Audio,Delta 1010LT},"\
 		"{MidiMan M Audio,Delta DiO 2496},"\
 		"{MidiMan M Audio,Delta 66},"\
 		"{MidiMan M Audio,Delta 44},"\
@@ -46,7 +47,7 @@
  *  MidiMan M-Audio Delta GPIO definitions
  */
 
-/* MidiMan M-Audio Delta1010 */
+/* MidiMan M-Audio Delta shared pins */
 #define ICE1712_DELTA_DFS 0x01		/* fast/slow sample rate mode */
 					/* (>48kHz must be 1) */
 #define ICE1712_DELTA_SPDIF_IN_STAT 0x02
@@ -116,5 +117,19 @@
 #define ICE1712_DELTA_AP_CS_CODEC 0x20	/* AK4528 chip select */
 					/* low signal = select */
 
+/* MidiMan M-Audio Delta1010LT definitions */
+/* thanks to Anders Johansson <ajh@watri.uwa.edu.au> */
+/* 0x01 = DFS */
+#define ICE1712_DELTA_1010LT_CCLK	0x02	/* SPI clock (AK4524 + CS8427) */
+#define ICE1712_DELTA_1010LT_DIN	0x04	/* data input (CS8427) */
+#define ICE1712_DELTA_1010LT_DOUT	0x08	/* data output (AK4524 + CS8427) */
+#define ICE1712_DELTA_1010LT_CS		0x70	/* mask for CS address */
+#define ICE1712_DELTA_1010LT_CS_CHIP_A	0x00	/* AK4524 #0 */
+#define ICE1712_DELTA_1010LT_CS_CHIP_B	0x10	/* AK4524 #1 */
+#define ICE1712_DELTA_1010LT_CS_CHIP_C	0x20	/* AK4524 #2 */
+#define ICE1712_DELTA_1010LT_CS_CHIP_D	0x30	/* AK4524 #3 */
+#define ICE1712_DELTA_1010LT_CS_CS8427	0x40	/* CS8427 */
+#define ICE1712_DELTA_1010LT_CS_NONE	0x50	/* nothing */
+#define ICE1712_DELTA_1010LT_WORDCLOCK 0x80	/* sample clock source: 0 = Word Clock Input, 1 = S/PDIF Input ??? */
 
 #endif /* __SOUND_DELTA_H */
diff -Nru a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c
--- a/sound/pci/ice1712/ews.c	Wed Oct 30 16:44:26 2002
+++ b/sound/pci/ice1712/ews.c	Wed Oct 30 16:44:26 2002
@@ -199,7 +199,7 @@
 {
 	unsigned char tmp;
 	snd_ice1712_save_gpio_status(ice, saved);
-	tmp = ice->ak4524.codecs_mask = (1 << chip) & ICE1712_6FIRE_AK4524_CS_MASK;
+	tmp = ice->ak4524.cs_mask = ice->ak4524.cs_addr = (1 << chip) & ICE1712_6FIRE_AK4524_CS_MASK;
 	tmp |= ICE1712_6FIRE_SERIAL_DATA |
 		ICE1712_6FIRE_SERIAL_CLOCK |
 		ICE1712_6FIRE_RW;
@@ -221,16 +221,17 @@
 	snd_i2c_lock(ice->i2c);
 	switch (ice->eeprom.subvendor) {
 	case ICE1712_SUBDEVICE_EWS88MT:
-		snd_runtime_check(snd_i2c_sendbytes(ice->cs8404, &bits, 1) == 1, snd_i2c_unlock(ice->i2c); return);
+		snd_runtime_check(snd_i2c_sendbytes(ice->cs8404, &bits, 1) == 1, goto _error);
 		break;
 	case ICE1712_SUBDEVICE_EWS88D:
-		snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) == 2, snd_i2c_unlock(ice->i2c); return);
+		snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) == 2, goto _error);
 		if (bits != bytes[1]) {
 			bytes[1] = bits;
-			snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) == 2, snd_i2c_unlock(ice->i2c); return);
+			snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) == 2, goto _error);
 		}
 		break;
 	}
+ _error:
 	snd_i2c_unlock(ice->i2c);
 }
 
@@ -408,8 +409,9 @@
 		ak->cif = 1; /* CIF high */
 		ak->data_mask = ICE1712_EWS88_SERIAL_DATA;
 		ak->clk_mask = ICE1712_EWS88_SERIAL_CLOCK;
-		ak->codecs_mask = 0; /* no chip select on gpio */
+		ak->cs_mask = ak->cs_addr = ak->cs_none = 0; /* no chip select on gpio */
 		ak->add_flags = ICE1712_EWS88_RW; /* set rw bit high */
+		ak->mask_flags = 0;
 		ak->ops.start = ews88mt_ak4524_start;
 		ak->ops.stop = ews88mt_ak4524_stop;
 		snd_ice1712_ak4524_init(ice);
@@ -419,8 +421,10 @@
 		ak->cif = 1; /* CIF high */
 		ak->data_mask = ICE1712_EWS88_SERIAL_DATA;
 		ak->clk_mask = ICE1712_EWS88_SERIAL_CLOCK;
-		ak->codecs_mask = ICE1712_EWX2496_AK4524_CS;
+		ak->cs_mask = ak->cs_addr = ICE1712_EWX2496_AK4524_CS;
+		ak->cs_none = 0;
 		ak->add_flags = ICE1712_EWS88_RW; /* set rw bit high */
+		ak->mask_flags = 0;
 		ak->ops.start = ewx2496_ak4524_start;
 		snd_ice1712_ak4524_init(ice);
 		break;
@@ -429,8 +433,10 @@
 		ak->cif = 1; /* CIF high */
 		ak->data_mask = ICE1712_6FIRE_SERIAL_DATA;
 		ak->clk_mask = ICE1712_6FIRE_SERIAL_CLOCK;
-		ak->codecs_mask = 0; /* set later */
+		ak->cs_mask = ak->cs_addr = 0; /* set later */
+		ak->cs_none = 0;
 		ak->add_flags = ICE1712_6FIRE_RW; /* set rw bit high */
+		ak->mask_flags = 0;
 		ak->ops.start = dmx6fire_ak4524_start;
 		snd_ice1712_ak4524_init(ice);
 		break;
@@ -562,6 +568,7 @@
 	}
 	/* reversed; high = +4dBu, low = -10dBV */
 	ucontrol->value.enumerated.item[0] = data & (1 << channel) ? 0 : 1;
+	snd_i2c_unlock(ice->i2c);
 	return 0;
 }
 
diff -Nru a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
--- a/sound/pci/ice1712/ice1712.c	Wed Oct 30 16:44:27 2002
+++ b/sound/pci/ice1712/ice1712.c	Wed Oct 30 16:44:27 2002
@@ -69,23 +69,23 @@
 		"{ICEnsemble,Generic ICE1712},"
 		"{ICEnsemble,Generic Envy24}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;		/* Enable this card */
-static int snd_omni[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};	/* Delta44 & 66 Omni I/O support */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for ICE1712 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for ICE1712 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable ICE1712 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_omni, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_omni, "Enable Midiman M-Audio Delta Omni I/O support.");
-MODULE_PARM_SYNTAX(snd_omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+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_PNP;		/* Enable this card */
+static int omni[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};	/* Delta44 & 66 Omni I/O support */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for ICE1712 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable ICE1712 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(omni, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support.");
+MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
 
 #ifndef PCI_VENDOR_ID_ICE
 #define PCI_VENDOR_ID_ICE		0x1412
@@ -2312,7 +2312,7 @@
 
 
 static int __devinit snd_ice1712_probe(struct pci_dev *pci,
-				       const struct pci_device_id *id)
+				       const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2322,19 +2322,19 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
 	strcpy(card->driver, "ICE1712");
 	strcpy(card->shortname, "ICEnsemble ICE1712");
 	
-	if ((err = snd_ice1712_create(card, pci, snd_omni[dev], &ice)) < 0) {
+	if ((err = snd_ice1712_create(card, pci, omni[dev], &ice)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -2457,7 +2457,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-ice1712=snd_enable,snd_index,snd_id */
+/* format is: snd-ice1712=enable,index,id */
 
 static int __init alsa_card_ice1712_setup(char *str)
 {
@@ -2465,9 +2465,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
--- a/sound/pci/ice1712/ice1712.h	Wed Oct 30 16:44:19 2002
+++ b/sound/pci/ice1712/ice1712.h	Wed Oct 30 16:44:19 2002
@@ -246,8 +246,11 @@
 	unsigned int cif: 1;
 	unsigned char data_mask;
 	unsigned char clk_mask;
-	unsigned char codecs_mask;
+	unsigned char cs_mask;
+	unsigned char cs_addr;
+	unsigned char cs_none;
 	unsigned char add_flags;
+	unsigned char mask_flags;
 	struct snd_ak4524_ops {
 		int (*start)(ice1712_t *, unsigned char *, int);
 		void (*stop)(ice1712_t *, unsigned char *);
diff -Nru a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
--- a/sound/pci/intel8x0.c	Wed Oct 30 16:44:29 2002
+++ b/sound/pci/intel8x0.c	Wed Oct 30 16:44:29 2002
@@ -60,12 +60,12 @@
 #define SUPPORT_JOYSTICK 1
 #define SUPPORT_MIDI 1
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+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_PNP;	/* Enable this card */
+static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
 #ifdef SUPPORT_JOYSTICK
-static int snd_joystick_port[SNDRV_CARDS] =
+static int joystick_port[SNDRV_CARDS] =
 #ifdef CONFIG_ISA
 	{0x200};	/* enable as default */
 #else
@@ -73,30 +73,30 @@
 #endif
 #endif
 #ifdef SUPPORT_MIDI
-static int snd_mpu_port[SNDRV_CARDS]; /* disabled */
+static int mpu_port[SNDRV_CARDS]; /* disabled */
 #endif
 
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Intel i8x0 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Intel i8x0 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Intel i8x0 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_ac97_clock, "AC'97 codec clock (0 = auto-detect).");
-MODULE_PARM_SYNTAX(snd_ac97_clock, SNDRV_ENABLED ",default:0");
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Intel i8x0 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Intel i8x0 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect).");
+MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:0");
 #ifdef SUPPORT_JOYSTICK
-MODULE_PARM(snd_joystick_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_joystick_port, "Joystick port address for Intel i8x0 soundcard. (0 = disabled)");
-MODULE_PARM_SYNTAX(snd_joystick_port, SNDRV_ENABLED ",allows:{{0},{0x200}},dialog:list");
+MODULE_PARM(joystick_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_port, "Joystick port address for Intel i8x0 soundcard. (0 = disabled)");
+MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED ",allows:{{0},{0x200}},dialog:list");
 #endif
 #ifdef SUPPORT_MIDI
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mpu_port, "MPU401 port # for Intel i8x0 driver.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x300}},dialog:list");
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mpu_port, "MPU401 port # for Intel i8x0 driver.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x300}},dialog:list");
 #endif
 
 /*
@@ -149,7 +149,7 @@
 DEFINE_REGSET(PO, 0x10);	/* PCM out */
 DEFINE_REGSET(MC, 0x20);	/* Mic in */
 
-/* ICH4 busmater blocks */
+/* ICH4 busmaster blocks */
 DEFINE_REGSET(MC2, 0x40);	/* Mic in 2 */
 DEFINE_REGSET(PI2, 0x50);	/* PCM in 2 */
 DEFINE_REGSET(SP, 0x60);	/* SPDIF out */
@@ -2305,7 +2305,7 @@
 };
 
 static int __devinit snd_intel8x0_probe(struct pci_dev *pci,
-					const struct pci_device_id *id)
+					const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2315,12 +2315,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -2333,12 +2333,12 @@
 		}
 	}
 
-	if ((err = snd_intel8x0_create(card, pci, id->driver_data, &chip)) < 0) {
+	if ((err = snd_intel8x0_create(card, pci, pci_id->driver_data, &chip)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
 
-	if ((err = snd_intel8x0_mixer(chip, snd_ac97_clock[dev])) < 0) {
+	if ((err = snd_intel8x0_mixer(chip, ac97_clock[dev])) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -2390,20 +2390,20 @@
 	}
 	
 	
-	if (snd_mpu_port[dev] == 0x300 || snd_mpu_port[dev] == 0x330) {
+	if (mpu_port[dev] == 0x300 || mpu_port[dev] == 0x330) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_INTEL8X0,
-					       snd_mpu_port[dev], 0,
+					       mpu_port[dev], 0,
 					       -1, 0, &chip->rmidi)) < 0) {
-			printk(KERN_ERR "intel8x0: no UART401 device at 0x%x, skipping.\n", snd_mpu_port[dev]);
-			snd_mpu_port[dev] = 0;
+			printk(KERN_ERR "intel8x0: no UART401 device at 0x%x, skipping.\n", mpu_port[dev]);
+			mpu_port[dev] = 0;
 		}
 	} else
-		snd_mpu_port[dev] = 0;
+		mpu_port[dev] = 0;
 
 	sprintf(card->longname, "%s at 0x%lx, irq %i",
 		card->shortname, chip->addr, chip->irq);
 
-	if (! snd_ac97_clock[dev])
+	if (! ac97_clock[dev])
 		intel8x0_measure_ac97_clock(chip);
 
 	if ((err = snd_card_register(card)) < 0) {
@@ -2446,24 +2446,24 @@
 	static int dev;
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	if (snd_joystick_port[dev] > 0 || snd_mpu_port[dev] > 0) {
+	if (joystick_port[dev] > 0 || mpu_port[dev] > 0) {
 		u16 val;
 		pci_read_config_word(pci, 0xe6, &val);
-		if (snd_joystick_port[dev] > 0)
+		if (joystick_port[dev] > 0)
 			val |= 0x100;
-		if (snd_mpu_port[dev] == 0x300 || snd_mpu_port[dev] == 0x330)
+		if (mpu_port[dev] == 0x300 || mpu_port[dev] == 0x330)
 			val |= 0x20;
 		pci_write_config_word(pci, 0xe6, val | 0x100);
 
-		if (snd_mpu_port[dev] == 0x300 || snd_mpu_port[dev] == 0x330) {
+		if (mpu_port[dev] == 0x300 || mpu_port[dev] == 0x330) {
 			u8 b;
 			pci_read_config_byte(pci, 0xe2, &b);
-			if (snd_mpu_port[dev] == 0x300)
+			if (mpu_port[dev] == 0x300)
 				b |= 0x08;
 			else
 				b &= ~0x08;
@@ -2522,7 +2522,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-intel8x0=snd_enable,snd_index,snd_id,snd_ac97_clock */
+/* format is: snd-intel8x0=enable,index,id,ac97_clock */
 
 static int __init alsa_card_intel8x0_setup(char *str)
 {
@@ -2530,10 +2530,10 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_ac97_clock[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&ac97_clock[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
--- a/sound/pci/korg1212/korg1212.c	Wed Oct 30 16:44:19 2002
+++ b/sound/pci/korg1212/korg1212.c	Wed Oct 30 16:44:19 2002
@@ -387,19 +387,19 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{KORG,korg1212}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	   /* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Korg 1212 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Korg 1212 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Korg 1212 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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; /* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Korg 1212 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Korg 1212 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>");
 
 static struct pci_device_id snd_korg1212_ids[] __devinitdata = {
@@ -2252,7 +2252,7 @@
 
 static int __devinit
 snd_korg1212_probe(struct pci_dev *pci,
-		const struct pci_device_id *id)
+		const struct pci_device_id *pci_id)
 {
 	static int dev;
 	korg1212_t *korg1212;
@@ -2262,11 +2262,11 @@
 	if (dev >= SNDRV_CARDS) {
 		return -ENODEV;
 	}
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(korg1212_t))) == NULL)
 		return -ENOMEM;
 
@@ -2334,7 +2334,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-korg1212=snd_enable,snd_index,snd_id */
+/* format is: snd-korg1212=enable,index,id */
 
 static int __init alsa_card_korg1212_setup(char *str)
 {
@@ -2342,9 +2342,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/maestro3.c b/sound/pci/maestro3.c
--- a/sound/pci/maestro3.c	Wed Oct 30 16:44:29 2002
+++ b/sound/pci/maestro3.c	Wed Oct 30 16:44:29 2002
@@ -57,27 +57,27 @@
 		"{ESS,Allegro-1 PCI},"
 	        "{ESS,Canyon3D-2/LE PCI}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* all enabled */
-static int snd_external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-static int snd_amp_gpio[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable this soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_external_amp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_external_amp, "Enable external amp for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
-MODULE_PARM(snd_amp_gpio, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_amp_gpio, "GPIO pin number for external amp. (default = -1)");
-MODULE_PARM_SYNTAX(snd_amp_gpio, SNDRV_ENABLED);
+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_PNP; /* all enabled */
+static int external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+static int amp_gpio[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable this soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(external_amp, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(external_amp, "Enable external amp for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(external_amp, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
+MODULE_PARM(amp_gpio, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(amp_gpio, "GPIO pin number for external amp. (default = -1)");
+MODULE_PARM_SYNTAX(amp_gpio, SNDRV_ENABLED);
 
 #define MAX_PLAYBACKS	2
 #define MAX_CAPTURES	1
@@ -2652,7 +2652,7 @@
 /*
  */
 static int __devinit
-snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *id)
+snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -2665,12 +2665,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -2689,8 +2689,8 @@
 	}
 
 	if ((err = snd_m3_create(card, pci,
-				 snd_external_amp[dev],
-				 snd_amp_gpio[dev],
+				 external_amp[dev],
+				 amp_gpio[dev],
 				 &chip)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -2752,7 +2752,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-maestro3=snd_enable,snd_index,snd_id,snd_external_amp,snd_amp_gpio */
+/* format is: snd-maestro3=enable,index,id,external_amp,amp_gpio */
 
 static int __init alsa_card_maestro3_setup(char *str)
 {
@@ -2760,11 +2760,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_external_amp[nr_dev]) == 2 &&
-	       get_option(&str,&snd_amp_gpio[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&external_amp[nr_dev]) == 2 &&
+	       get_option(&str,&amp_gpio[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
--- a/sound/pci/nm256/nm256.c	Wed Oct 30 16:44:32 2002
+++ b/sound/pci/nm256/nm256.c	Wed Oct 30 16:44:32 2002
@@ -53,43 +53,43 @@
  * some compile conditions.
  */
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
-static int snd_playback_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 16};
-static int snd_capture_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 16};
-static int snd_force_ac97[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled as default */
-static int snd_buffer_top[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* not specified */
-static int snd_use_cache[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled */
-static int snd_vaio_hack[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable this soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_playback_bufsize, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_playback_bufsize, "DAC frame size in kB for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_playback_bufsize, SNDRV_ENABLED);
-MODULE_PARM(snd_capture_bufsize, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_capture_bufsize, "ADC frame size in kB for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_capture_bufsize, SNDRV_ENABLED);
-MODULE_PARM(snd_force_ac97, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_force_ac97, "Force to use AC97 codec for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_force_ac97, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
-MODULE_PARM(snd_buffer_top, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_buffer_top, "Set the top address of audio buffer for " CARD_NAME " soundcard.");
-MODULE_PARM_SYNTAX(snd_buffer_top, SNDRV_ENABLED);
-MODULE_PARM(snd_use_cache, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_use_cache, "Enable the cache for coefficient table access.");
-MODULE_PARM_SYNTAX(snd_use_cache, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
-MODULE_PARM(snd_vaio_hack, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_vaio_hack, "Enable workaround for Sony VAIO notebooks.");
-MODULE_PARM_SYNTAX(snd_vaio_hack, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+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_PNP;
+static int playback_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 16};
+static int capture_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 16};
+static int force_ac97[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled as default */
+static int buffer_top[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* not specified */
+static int use_cache[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled */
+static int vaio_hack[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable this soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(playback_bufsize, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(playback_bufsize, "DAC frame size in kB for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(playback_bufsize, SNDRV_ENABLED);
+MODULE_PARM(capture_bufsize, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(capture_bufsize, "ADC frame size in kB for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(capture_bufsize, SNDRV_ENABLED);
+MODULE_PARM(force_ac97, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(force_ac97, "Force to use AC97 codec for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(force_ac97, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(buffer_top, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(buffer_top, "Set the top address of audio buffer for " CARD_NAME " soundcard.");
+MODULE_PARM_SYNTAX(buffer_top, SNDRV_ENABLED);
+MODULE_PARM(use_cache, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(use_cache, "Enable the cache for coefficient table access.");
+MODULE_PARM_SYNTAX(use_cache, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(vaio_hack, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(vaio_hack, "Enable workaround for Sony VAIO notebooks.");
+MODULE_PARM_SYNTAX(vaio_hack, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 
 /*
  * hw definitions
@@ -1448,7 +1448,7 @@
 			if (! force_load) {
 				printk(KERN_ERR "nm256: no ac97 is found!\n");
 				printk(KERN_ERR "  force the driver to load by passing in the module parameter\n");
-				printk(KERN_ERR "    snd_force_ac97=1\n");
+				printk(KERN_ERR "    force_ac97=1\n");
 				printk(KERN_ERR "  or try sb16 or cs423x drivers instead.\n");
 				err = -ENXIO;
 				goto __error;
@@ -1562,25 +1562,25 @@
 
 
 static int __devinit snd_nm256_probe(struct pci_dev *pci,
-				     const struct pci_device_id *id)
+				     const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
 	nm256_t *chip;
 	int err;
-	unsigned int buffer_top;
+	unsigned int xbuffer_top;
 
 	if ((err = pci_enable_device(pci)) < 0)
 		return err;
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -1597,25 +1597,25 @@
 		return -EINVAL;
 	}
 
-	if (snd_vaio_hack[dev])
-		buffer_top = 0x25a800;	/* this avoids conflicts with XFree86 server */
+	if (vaio_hack[dev])
+		xbuffer_top = 0x25a800;	/* this avoids conflicts with XFree86 server */
 	else
-		buffer_top = snd_buffer_top[dev];
+		xbuffer_top = buffer_top[dev];
 
-	if (snd_playback_bufsize[dev] < 4)
-		snd_playback_bufsize[dev] = 4;
-	if (snd_playback_bufsize[dev] > 128)
-		snd_playback_bufsize[dev] = 128;
-	if (snd_capture_bufsize[dev] < 4)
-		snd_capture_bufsize[dev] = 4;
-	if (snd_capture_bufsize[dev] > 128)
-		snd_capture_bufsize[dev] = 128;
+	if (playback_bufsize[dev] < 4)
+		playback_bufsize[dev] = 4;
+	if (playback_bufsize[dev] > 128)
+		playback_bufsize[dev] = 128;
+	if (capture_bufsize[dev] < 4)
+		capture_bufsize[dev] = 4;
+	if (capture_bufsize[dev] > 128)
+		capture_bufsize[dev] = 128;
 	if ((err = snd_nm256_create(card, pci,
-				    snd_playback_bufsize[dev] * 1024, /* in bytes */
-				    snd_capture_bufsize[dev] * 1024,  /* in bytes */
-				    snd_force_ac97[dev],
-				    buffer_top,
-				    snd_use_cache[dev],
+				    playback_bufsize[dev] * 1024, /* in bytes */
+				    capture_bufsize[dev] * 1024,  /* in bytes */
+				    force_ac97[dev],
+				    xbuffer_top,
+				    use_cache[dev],
 				    &chip)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -1679,9 +1679,9 @@
 
 #ifndef MODULE
 
-/* format is: snd-nm256=snd_enable,snd_index,snd_id,
-			snd_playback_bufsize,snd_capture_bufsize,
-			snd_force_ac97,snd_buffer_top,snd_use_cache */
+/* format is: snd-nm256=enable,index,id,
+			playback_bufsize,capture_bufsize,
+			force_ac97,buffer_top,use_cache */
 
 static int __init alsa_card_nm256_setup(char *str)
 {
@@ -1689,14 +1689,14 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_playback_bufsize[nr_dev]) == 2 &&
-	       get_option(&str,&snd_capture_bufsize[nr_dev]) == 2 &&
-	       get_option(&str,&snd_force_ac97[nr_dev]) == 2 &&
-	       get_option(&str,&snd_buffer_top[nr_dev]) == 2 &&
-	       get_option(&str,&snd_use_cache[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&playback_bufsize[nr_dev]) == 2 &&
+	       get_option(&str,&capture_bufsize[nr_dev]) == 2 &&
+	       get_option(&str,&force_ac97[nr_dev]) == 2 &&
+	       get_option(&str,&buffer_top[nr_dev]) == 2 &&
+	       get_option(&str,&use_cache[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/rme32.c b/sound/pci/rme32.c
--- a/sound/pci/rme32.c	Wed Oct 30 16:44:35 2002
+++ b/sound/pci/rme32.c	Wed Oct 30 16:44:35 2002
@@ -41,19 +41,19 @@
 #define SNDRV_GET_ID
 #include <sound/initval.h>
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for RME Digi32 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for RME Digi32 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable RME Digi32 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for RME Digi32 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for RME Digi32 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable RME Digi32 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 MODULE_AUTHOR("Martin Langer <martin-langer@gmx.de>");
 MODULE_DESCRIPTION("RME Digi32, Digi32/8, Digi32 PRO");
 MODULE_LICENSE("GPL");
@@ -1840,7 +1840,7 @@
 }
 
 static int __devinit
-snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *id)
+snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 {
 	static int dev = 0;
 	rme32_t *rme32;
@@ -1848,7 +1848,7 @@
 	int err;
 
 	for (; dev < SNDRV_CARDS; dev++) {
-		if (!snd_enable[dev]) {
+		if (!enable[dev]) {
 			dev++;
 			return -ENOENT;
 		}
@@ -1857,7 +1857,7 @@
 	if (dev >= SNDRV_CARDS) {
 		return -ENODEV;
 	}
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(rme32_t))) == NULL)
 		return -ENOMEM;
 	card->private_free = snd_rme32_card_free;
@@ -1935,9 +1935,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void) (get_option(&str, &snd_enable[nr_dev]) == 2 &&
-		get_option(&str, &snd_index[nr_dev]) == 2 &&
-		get_id(&str, &snd_id[nr_dev]) == 2);
+	(void) (get_option(&str, &enable[nr_dev]) == 2 &&
+		get_option(&str, &index[nr_dev]) == 2 &&
+		get_id(&str, &id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/rme96.c b/sound/pci/rme96.c
--- a/sound/pci/rme96.c	Wed Oct 30 16:44:27 2002
+++ b/sound/pci/rme96.c	Wed Oct 30 16:44:27 2002
@@ -51,19 +51,19 @@
 		"{RME,Digi96/8 PST},"
 		"{RME,Digi96/8 PAD}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for RME Digi96 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for RME Digi96 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable RME Digi96 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for RME Digi96 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for RME Digi96 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable RME Digi96 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 
 /*
  * Defines for RME Digi96 series, from internal RME reference documents
@@ -2411,7 +2411,7 @@
 
 static int __devinit
 snd_rme96_probe(struct pci_dev *pci,
-		const struct pci_device_id *id)
+		const struct pci_device_id *pci_id)
 {
 	static int dev;
 	rme96_t *rme96;
@@ -2422,11 +2422,11 @@
 	if (dev >= SNDRV_CARDS) {
 		return -ENODEV;
 	}
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
-	if ((card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 				 sizeof(rme96_t))) == NULL)
 		return -ENOMEM;
 	card->private_free = snd_rme96_card_free;
@@ -2506,7 +2506,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-rme96=snd_enable,snd_index,snd_id */
+/* format is: snd-rme96=enable,index,id */
 
 static int __init alsa_card_rme96_setup(char *str)
 {
@@ -2514,9 +2514,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/rme9652/hammerfall_mem.c b/sound/pci/rme9652/hammerfall_mem.c
--- a/sound/pci/rme9652/hammerfall_mem.c	Wed Oct 30 16:44:23 2002
+++ b/sound/pci/rme9652/hammerfall_mem.c	Wed Oct 30 16:44:23 2002
@@ -25,7 +25,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
-    $Id: hammerfall_mem.c,v 1.3 2002/09/12 09:03:28 tiwai Exp $
+    $Id: hammerfall_mem.c,v 1.4 2002/10/21 18:28:25 perex Exp $
 
 
     Tue Oct 17 2000  Jaroslav Kysela <perex@suse.cz>
@@ -48,9 +48,9 @@
 
 /* export */
 
-static int snd_enable[8] = {1,1,1,1,1,1,1,1};
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(HAMMERFALL_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable cards to allocate buffers for.");
+static int enable[8] = {1,1,1,1,1,1,1,1};
+MODULE_PARM(enable, "1-" __MODULE_STRING(HAMMERFALL_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable cards to allocate buffers for.");
 
 MODULE_AUTHOR("Winfried Ritsch, Paul Barton-Davis <pbd@op.net>");
 MODULE_DESCRIPTION("Memory allocator for RME Hammerfall");
@@ -236,7 +236,7 @@
 		if (pci->vendor != 0x10ee || (pci->device != 0x3fc4 && pci->device != 0x3fc5)) 
 			continue;
 
-		if (!snd_enable[i])
+		if (!enable[i])
 			continue;
 
 		for (k = 0; k < 2; ++k) {
diff -Nru a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
--- a/sound/pci/rme9652/hdsp.c	Wed Oct 30 16:44:27 2002
+++ b/sound/pci/rme9652/hdsp.c	Wed Oct 30 16:44:27 2002
@@ -38,31 +38,31 @@
 #include "multiface_firmware.dat"
 #include "digiface_firmware.dat"
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */
-static int snd_line_outs_monitor[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Send all inputs/playback to line outs */
-static int snd_force_firmware[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Force firmware reload */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for RME Hammerfall DSP interface.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for RME Hammerfall DSP interface.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable/disable specific Hammerfall DSP soundcards.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_precise_ptr, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_precise_ptr, "Enable precise pointer (doesn't work reliably).");
-MODULE_PARM_SYNTAX(snd_precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
-MODULE_PARM(snd_line_outs_monitor,"1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_line_outs_monitor, "Send all input and playback streams to line outs by default.");
-MODULE_PARM_SYNTAX(snd_line_outs_monitor, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
-MODULE_PARM(snd_force_firmware,"1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_force_firmware, "Force a reload of the I/O box firmware");
-MODULE_PARM_SYNTAX(snd_force_firmware, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+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_PNP;	/* Enable this card */
+static int precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */
+static int line_outs_monitor[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Send all inputs/playback to line outs */
+static int force_firmware[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Force firmware reload */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for RME Hammerfall DSP interface.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for RME Hammerfall DSP interface.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable/disable specific Hammerfall DSP soundcards.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(precise_ptr, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(precise_ptr, "Enable precise pointer (doesn't work reliably).");
+MODULE_PARM_SYNTAX(precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(line_outs_monitor,"1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(line_outs_monitor, "Send all input and playback streams to line outs by default.");
+MODULE_PARM_SYNTAX(line_outs_monitor, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(force_firmware,"1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(force_firmware, "Force a reload of the I/O box firmware");
+MODULE_PARM_SYNTAX(force_firmware, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 MODULE_AUTHOR("Paul Davis <pbd@op.net>");
 MODULE_DESCRIPTION("RME Hammerfall DSP");
 MODULE_LICENSE("GPL");
@@ -2190,7 +2190,7 @@
 	for (i = 0; i < 2048; i++)
 		hdsp_write_gain (hdsp, i, MINUS_INFINITY_GAIN);
 
-	if (snd_line_outs_monitor[hdsp->dev]) {
+	if (line_outs_monitor[hdsp->dev]) {
 		
 		snd_printk ("sending all inputs and playback streams to line outs.\n");
 
@@ -2848,7 +2848,7 @@
 		hdsp_write (hdsp, HDSP_outputEnable + (4 * i), 1);
 	}
 
-	if (snd_force_firmware[hdsp->dev] || (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
+	if (force_firmware[hdsp->dev] || (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
 
 		snd_printk ("loading firmware\n");
 
@@ -3068,7 +3068,7 @@
 }
 
 static int __devinit snd_hdsp_probe(struct pci_dev *pci,
-				    const struct pci_device_id *id)
+				    const struct pci_device_id *pci_id)
 {
 	static int dev;
 	hdsp_t *hdsp;
@@ -3077,12 +3077,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	if (!(card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, sizeof(hdsp_t))))
+	if (!(card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(hdsp_t))))
 		return -ENOMEM;
 
 	hdsp = (hdsp_t *) card->private_data;
@@ -3090,7 +3090,7 @@
 	hdsp->dev = dev;
 	hdsp->pci = pci;
 
-	if ((err = snd_hdsp_create(card, hdsp, snd_precise_ptr[dev])) < 0) {
+	if ((err = snd_hdsp_create(card, hdsp, precise_ptr[dev])) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -3143,7 +3143,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-hdsp=snd_enable,snd_index,snd_id */
+/* format is: snd-hdsp=enable,index,id */
 
 static int __init alsa_card_hdsp_setup(char *str)
 {
@@ -3151,9 +3151,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
--- a/sound/pci/rme9652/rme9652.c	Wed Oct 30 16:44:28 2002
+++ b/sound/pci/rme9652/rme9652.c	Wed Oct 30 16:44:28 2002
@@ -34,23 +34,23 @@
 #define SNDRV_GET_ID
 #include <sound/initval.h>
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for RME Digi9652 (Hammerfall) soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for RME Digi9652 (Hammerfall) soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable/disable specific RME96{52,36} soundcards.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_precise_ptr, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_precise_ptr, "Enable precise pointer (doesn't work reliably).");
-MODULE_PARM_SYNTAX(snd_precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+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_PNP;	/* Enable this card */
+static int precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for RME Digi9652 (Hammerfall) soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for RME Digi9652 (Hammerfall) soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable/disable specific RME96{52,36} soundcards.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(precise_ptr, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(precise_ptr, "Enable precise pointer (doesn't work reliably).");
+MODULE_PARM_SYNTAX(precise_ptr, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 MODULE_AUTHOR("Paul Davis <pbd@op.net>, Winfried Ritsch");
 MODULE_DESCRIPTION("RME Digi9652/Digi9636");
 MODULE_LICENSE("GPL");
@@ -2681,7 +2681,7 @@
 }
 
 static int __devinit snd_rme9652_probe(struct pci_dev *pci,
-				       const struct pci_device_id *id)
+				       const struct pci_device_id *pci_id)
 {
 	static int dev;
 	rme9652_t *rme9652;
@@ -2690,12 +2690,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE,
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE,
 			    sizeof(rme9652_t));
 
 	if (!card)
@@ -2706,7 +2706,7 @@
 	rme9652->dev = dev;
 	rme9652->pci = pci;
 
-	if ((err = snd_rme9652_create(card, rme9652, snd_precise_ptr[dev])) < 0) {
+	if ((err = snd_rme9652_create(card, rme9652, precise_ptr[dev])) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -2761,7 +2761,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-rme9652=snd_enable,snd_index,snd_id */
+/* format is: snd-rme9652=enable,index,id */
 
 static int __init alsa_card_rme9652_setup(char *str)
 {
@@ -2769,9 +2769,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
--- a/sound/pci/sonicvibes.c	Wed Oct 30 16:44:30 2002
+++ b/sound/pci/sonicvibes.c	Wed Oct 30 16:44:30 2002
@@ -53,31 +53,31 @@
 #define PCI_DEVICE_ID_S3_SONICVIBES  0xca00
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_reverb[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static int snd_mge[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
-static unsigned int snd_dmaio = 0x7a00;	/* DDMA i/o address */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for S3 SonicVibes soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for S3 SonicVibes soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable S3 SonicVibes soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_reverb, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_reverb, "Enable reverb (SRAM is present) for S3 SonicVibes soundcard.");
-MODULE_PARM_SYNTAX(snd_reverb, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_mge, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_mge, "MIC Gain Enable for S3 SonicVibes soundcard.");
-MODULE_PARM_SYNTAX(snd_mge, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_dmaio, "i");
-MODULE_PARM_DESC(snd_dmaio, "DDMA i/o base address for S3 SonicVibes soundcard.");
-MODULE_PARM_SYNTAX(snd_dmaio, "global," SNDRV_PORT_DESC);
+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_PNP;	/* Enable this card */
+static int reverb[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int mge[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static unsigned int dmaio = 0x7a00;	/* DDMA i/o address */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for S3 SonicVibes soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for S3 SonicVibes soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable S3 SonicVibes soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(reverb, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(reverb, "Enable reverb (SRAM is present) for S3 SonicVibes soundcard.");
+MODULE_PARM_SYNTAX(reverb, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+MODULE_PARM(mge, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(mge, "MIC Gain Enable for S3 SonicVibes soundcard.");
+MODULE_PARM_SYNTAX(mge, SNDRV_ENABLED "," SNDRV_ENABLE_DESC);
+MODULE_PARM(dmaio, "i");
+MODULE_PARM_DESC(dmaio, "DDMA i/o base address for S3 SonicVibes soundcard.");
+MODULE_PARM_SYNTAX(dmaio, "global," SNDRV_PORT_DESC);
 
 /*
  * Enhanced port direct registers
@@ -1313,17 +1313,17 @@
 
 	pci_read_config_dword(pci, 0x40, &dmaa);
 	pci_read_config_dword(pci, 0x48, &dmac);
-	snd_dmaio &= ~0x0f;
+	dmaio &= ~0x0f;
 	dmaa &= ~0x0f;
 	dmac &= ~0x0f;
 	if (!dmaa) {
-		dmaa = snd_dmaio;
-		snd_dmaio += 0x10;
+		dmaa = dmaio;
+		dmaio += 0x10;
 		snd_printk("BIOS did not allocate DDMA channel A i/o, allocated at 0x%x\n", dmaa);
 	}
 	if (!dmac) {
-		dmac = snd_dmaio;
-		snd_dmaio += 0x10;
+		dmac = dmaio;
+		dmaio += 0x10;
 		snd_printk("BIOS did not allocate DDMA channel C i/o, allocated at 0x%x\n", dmac);
 	}
 	pci_write_config_dword(pci, 0x40, dmaa);
@@ -1450,7 +1450,7 @@
 }
 
 static int __devinit snd_sonic_probe(struct pci_dev *pci,
-				     const struct pci_device_id *id)
+				     const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -1461,12 +1461,12 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
  
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 	for (idx = 0; idx < 5; idx++) {
@@ -1477,8 +1477,8 @@
 		}
 	}
 	if ((err = snd_sonicvibes_create(card, pci,
-					 snd_reverb[dev] ? 1 : 0,
-					 snd_mge[dev] ? 1 : 0,
+					 reverb[dev] ? 1 : 0,
+					 mge[dev] ? 1 : 0,
 					 &sonic)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -1567,8 +1567,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-sonicvibes=snd_enable,snd_index,snd_id,
-			     snd_reverb,snd_mge,snd_dmaio */
+/* format is: snd-sonicvibes=enable,index,id,
+			     reverb,mge,dmaio */
 
 static int __init alsa_card_sonicvibes_setup(char *str)
 {
@@ -1576,12 +1576,12 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_reverb[nr_dev]) == 2 &&
-	       get_option(&str,&snd_mge[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_dmaio) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&reverb[nr_dev]) == 2 &&
+	       get_option(&str,&mge[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&dmaio) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c
--- a/sound/pci/trident/trident.c	Wed Oct 30 16:44:17 2002
+++ b/sound/pci/trident/trident.c	Wed Oct 30 16:44:17 2002
@@ -47,27 +47,27 @@
 		"{Jaton,SonicWave 4D},"
 		"{Hoontech,SoundTrack Digital 4DWave NX}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32};
-static int snd_wavetable_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8192};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Trident 4DWave PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Trident 4DWave PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Trident 4DWave PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pcm_channels, "Number of hardware channels assigned for PCM.");
-MODULE_PARM_SYNTAX(snd_pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}");
-MODULE_PARM(snd_wavetable_size, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_wavetable_size, "Maximum memory size in kB for wavetable synth.");
-MODULE_PARM_SYNTAX(snd_wavetable_size, SNDRV_ENABLED ",default:8192,skill:advanced");
+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_PNP;	/* Enable this card */
+static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32};
+static int wavetable_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8192};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Trident 4DWave PCI soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Trident 4DWave PCI soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Trident 4DWave PCI soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(pcm_channels, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM.");
+MODULE_PARM_SYNTAX(pcm_channels, SNDRV_ENABLED ",default:32,allows:{{1,32}}");
+MODULE_PARM(wavetable_size, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
+MODULE_PARM_SYNTAX(wavetable_size, SNDRV_ENABLED ",default:8192,skill:advanced");
 
 static struct pci_device_id snd_trident_ids[] __devinitdata = {
 	{ 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },	/* Trident 4DWave DX PCI Audio */
@@ -79,7 +79,7 @@
 MODULE_DEVICE_TABLE(pci, snd_trident_ids);
 
 static int __devinit snd_trident_probe(struct pci_dev *pci,
-				       const struct pci_device_id *id)
+				       const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -89,19 +89,19 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
 	if ((err = snd_trident_create(card, pci,
-				      snd_pcm_channels[dev],
+				      pcm_channels[dev],
 				      2,
-				      snd_wavetable_size[dev],
+				      wavetable_size[dev],
 				      &trident)) < 0) {
 		snd_card_free(card);
 		return err;
@@ -243,8 +243,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-trident=snd_enable,snd_index,snd_id,
-			  snd_pcm_channels,snd_wavetable_size */
+/* format is: snd-trident=enable,index,id,
+			  pcm_channels,wavetable_size */
 
 static int __init alsa_card_trident_setup(char *str)
 {
@@ -252,11 +252,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,&snd_pcm_channels[nr_dev]) == 2 &&
-	       get_option(&str,&snd_wavetable_size[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,&pcm_channels[nr_dev]) == 2 &&
+	       get_option(&str,&wavetable_size[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/via82xx.c b/sound/pci/via82xx.c
--- a/sound/pci/via82xx.c	Wed Oct 30 16:44:26 2002
+++ b/sound/pci/via82xx.c	Wed Oct 30 16:44:26 2002
@@ -46,27 +46,27 @@
 MODULE_CLASSES("{sound}");
 MODULE_DEVICES("{{VIA,VT82C686A/B/C,pci},{VIA,VT8233A/B/C}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static long snd_mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
-static int snd_ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for VIA 82xx bridge.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for VIA 82xx bridge.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable audio part of VIA 82xx bridge.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT_DESC);
-MODULE_PARM(snd_ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_ac97_clock, "AC'97 codec clock (default 48000Hz).");
-MODULE_PARM_SYNTAX(snd_ac97_clock, SNDRV_ENABLED ",default:48000");
+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_PNP;	/* Enable this card */
+static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
+static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable audio part of VIA 82xx bridge.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 port.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT_DESC);
+MODULE_PARM(ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
+MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:48000");
 
 
 /* pci ids */
@@ -1168,7 +1168,7 @@
 }
 
 static int __devinit snd_via82xx_probe(struct pci_dev *pci,
-				       const struct pci_device_id *id)
+				       const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -1179,16 +1179,16 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	chip_type = id->driver_data;
+	chip_type = pci_id->driver_data;
 	switch (chip_type) {
 	case TYPE_VIA686:
 		strcpy(card->driver, "VIA686A");
@@ -1204,7 +1204,7 @@
 		return -EINVAL;
 	}
 		
-	if ((err = snd_via82xx_create(card, pci, chip_type, snd_ac97_clock[dev], &chip)) < 0) {
+	if ((err = snd_via82xx_create(card, pci, chip_type, ac97_clock[dev], &chip)) < 0) {
 		snd_card_free(card);
 		return err;
 	}
@@ -1243,44 +1243,44 @@
 		}
 		pci_write_config_byte(pci, 0x42, legacy);
 		pci_write_config_byte(pci, 0x43, legacy_cfg);
-		if (rev_h && snd_mpu_port[dev] >= 0x200) {	/* force MIDI */
+		if (rev_h && mpu_port[dev] >= 0x200) {	/* force MIDI */
 			legacy |= 0x02;	/* enable MPU */
-			pci_write_config_dword(pci, 0x18, (snd_mpu_port[dev] & 0xfffc) | 0x01);
+			pci_write_config_dword(pci, 0x18, (mpu_port[dev] & 0xfffc) | 0x01);
 		} else {
 			if (rev_h && (legacy & 0x02)) {
-				snd_mpu_port[dev] = pci_resource_start(pci, 2);
-				if (snd_mpu_port[dev] < 0x200)	/* bad value */
+				mpu_port[dev] = pci_resource_start(pci, 2);
+				if (mpu_port[dev] < 0x200)	/* bad value */
 					legacy &= ~0x02;	/* disable MIDI */
 			} else {
-				switch (snd_mpu_port[dev]) {	/* force MIDI */
+				switch (mpu_port[dev]) {	/* force MIDI */
 				case 0x300:
 				case 0x310:
 				case 0x320:
 				case 0x330:
 					legacy_cfg &= ~(3 << 2);
-					legacy_cfg |= (snd_mpu_port[dev] & 0x0030) >> 2;
+					legacy_cfg |= (mpu_port[dev] & 0x0030) >> 2;
 					legacy |= 0x02;
 					break;
 				default:			/* no, use BIOS settings */
 					if (legacy & 0x02)
-						snd_mpu_port[dev] = 0x300 + ((legacy_cfg & 0x000c) << 2);
+						mpu_port[dev] = 0x300 + ((legacy_cfg & 0x000c) << 2);
 				}
 			}
 		}
 		pci_write_config_byte(pci, 0x42, legacy);
 		pci_write_config_byte(pci, 0x43, legacy_cfg);
 		if (legacy & 0x02) {
-			if (check_region(snd_mpu_port[dev], 2)) {
-				printk(KERN_WARNING "unable to get MPU-401 port at 0x%lx, skipping\n", snd_mpu_port[dev]);
+			if (check_region(mpu_port[dev], 2)) {
+				printk(KERN_WARNING "unable to get MPU-401 port at 0x%lx, skipping\n", mpu_port[dev]);
 				legacy &= ~0x02;
 				pci_write_config_byte(pci, 0x42, legacy);
 				goto __skip_mpu;
 			}
 			if (snd_mpu401_uart_new(card, 0, MPU401_HW_VIA686A,
-						snd_mpu_port[dev], 0,
+						mpu_port[dev], 0,
 						pci->irq, 0,
 						&chip->rmidi) < 0) {
-				printk(KERN_WARNING "unable to initialize MPU-401 at 0x%lx, skipping\n", snd_mpu_port[dev]);
+				printk(KERN_WARNING "unable to initialize MPU-401 at 0x%lx, skipping\n", mpu_port[dev]);
 				legacy &= ~0x02;
 				pci_write_config_byte(pci, 0x42, legacy);
 				goto __skip_mpu;
@@ -1355,8 +1355,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-via82xx=snd_enable,snd_index,snd_id,
-			  snd_mpu_port,snd_ac97_clock */
+/* format is: snd-via82xx=enable,index,id,
+			  mpu_port,ac97_clock */
 
 static int __init alsa_card_via82xx_setup(char *str)
 {
@@ -1364,11 +1364,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
-	       get_option(&str,&snd_ac97_clock[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2 &&
+	       get_option(&str,&ac97_clock[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
--- a/sound/pci/ymfpci/ymfpci.c	Wed Oct 30 16:44:27 2002
+++ b/sound/pci/ymfpci/ymfpci.c	Wed Oct 30 16:44:27 2002
@@ -41,31 +41,31 @@
 		"{Yamaha,YMF744},"
 		"{Yamaha,YMF754}}");
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static long snd_fm_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
-static long snd_mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
-static int snd_rear_switch[SNDRV_CARDS];
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for the Yamaha DS-XG PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for the Yamaha DS-XG PCI soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Yamaha DS-XG soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_mpu_port, "MPU-401 Port.");
-MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_ENABLED);
-MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
-MODULE_PARM_DESC(snd_fm_port, "FM OPL-3 Port.");
-MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_ENABLED);
-MODULE_PARM(snd_rear_switch, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_rear_switch, "Enable shared rear/line-in switch");
-MODULE_PARM_SYNTAX(snd_rear_switch, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+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_PNP;	/* Enable this card */
+static long fm_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
+static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1};
+static int rear_switch[SNDRV_CARDS];
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for the Yamaha DS-XG PCI soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for the Yamaha DS-XG PCI soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Yamaha DS-XG soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(mpu_port, "MPU-401 Port.");
+MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED);
+MODULE_PARM(fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(fm_port, "FM OPL-3 Port.");
+MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED);
+MODULE_PARM(rear_switch, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch");
+MODULE_PARM_SYNTAX(rear_switch, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
 
 static struct pci_device_id snd_ymfpci_ids[] __devinitdata = {
         { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* YMF724 */
@@ -80,7 +80,7 @@
 MODULE_DEVICE_TABLE(pci, snd_ymfpci_ids);
 
 static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
-					   const struct pci_device_id *id)
+					   const struct pci_device_id *pci_id)
 {
 	static int dev;
 	snd_card_t *card;
@@ -92,16 +92,16 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
-	switch (id->device) {
+	switch (pci_id->device) {
 	case 0x0004: str = "YMF724"; break;
 	case 0x000d: str = "YMF724F"; break;
 	case 0x000a: str = "YMF740"; break;
@@ -114,54 +114,54 @@
 	legacy_ctrl = 0;
 	legacy_ctrl2 = 0x0800;	/* SMOD = 01 */
 
-	if (id->device >= 0x0010) { /* YMF 744/754 */
-		if (snd_fm_port[dev] < 0)
-			snd_fm_port[dev] = pci_resource_start(pci, 1);
-		else if (check_region(snd_fm_port[dev], 4))
-			snd_fm_port[dev] = -1;
-		if (snd_fm_port[dev] >= 0) {
+	if (pci_id->device >= 0x0010) { /* YMF 744/754 */
+		if (fm_port[dev] < 0)
+			fm_port[dev] = pci_resource_start(pci, 1);
+		else if (check_region(fm_port[dev], 4))
+			fm_port[dev] = -1;
+		if (fm_port[dev] >= 0) {
 			legacy_ctrl |= 2;
-			pci_write_config_word(pci, PCIR_DSXG_FMBASE, snd_fm_port[dev]);
+			pci_write_config_word(pci, PCIR_DSXG_FMBASE, fm_port[dev]);
 		}
-		if (snd_mpu_port[dev] < 0)
-			snd_mpu_port[dev] = pci_resource_start(pci, 1) + 0x20;
-		else if (check_region(snd_mpu_port[dev], 2))
-			snd_mpu_port[dev] = -1;
-		if (snd_mpu_port[dev] >= 0) {
+		if (mpu_port[dev] < 0)
+			mpu_port[dev] = pci_resource_start(pci, 1) + 0x20;
+		else if (check_region(mpu_port[dev], 2))
+			mpu_port[dev] = -1;
+		if (mpu_port[dev] >= 0) {
 			legacy_ctrl |= 8;
-			pci_write_config_word(pci, PCIR_DSXG_MPU401BASE, snd_mpu_port[dev]);
-			//snd_printd("MPU401 supported on 0x%lx\n", snd_mpu_port[dev]);
+			pci_write_config_word(pci, PCIR_DSXG_MPU401BASE, mpu_port[dev]);
+			//snd_printd("MPU401 supported on 0x%lx\n", mpu_port[dev]);
 		}
 	} else {
-		switch (snd_fm_port[dev]) {
+		switch (fm_port[dev]) {
 		case 0x388: legacy_ctrl2 |= 0; break;
 		case 0x398: legacy_ctrl2 |= 1; break;
 		case 0x3a0: legacy_ctrl2 |= 2; break;
 		case 0x3a8: legacy_ctrl2 |= 3; break;
-		default: snd_fm_port[dev] = -1; break;
+		default: fm_port[dev] = -1; break;
 		}
-		if (snd_fm_port[dev] > 0 && check_region(snd_fm_port[dev], 4) == 0)
+		if (fm_port[dev] > 0 && check_region(fm_port[dev], 4) == 0)
 			legacy_ctrl |= 2;
 		else {
 			legacy_ctrl2 &= ~3;
-			snd_fm_port[dev] = -1;
+			fm_port[dev] = -1;
 		}
-		switch (snd_mpu_port[dev]) {
+		switch (mpu_port[dev]) {
 		case 0x330: legacy_ctrl2 |= 0 << 4; break;
 		case 0x300: legacy_ctrl2 |= 1 << 4; break;
 		case 0x332: legacy_ctrl2 |= 2 << 4; break;
 		case 0x334: legacy_ctrl2 |= 3 << 4; break;
-		default: snd_mpu_port[dev] = -1; break;
+		default: mpu_port[dev] = -1; break;
 		}
-		if (snd_mpu_port[dev] > 0 && check_region(snd_mpu_port[dev], 2) == 0) {
-			//snd_printd("MPU401 supported on 0x%lx\n", snd_mpu_port[dev]);
+		if (mpu_port[dev] > 0 && check_region(mpu_port[dev], 2) == 0) {
+			//snd_printd("MPU401 supported on 0x%lx\n", mpu_port[dev]);
 			legacy_ctrl |= 8;
 		} else {
 			legacy_ctrl2 &= ~(3 << 4);
-			snd_mpu_port[dev] = -1;
+			mpu_port[dev] = -1;
 		}
 	}
-	if (snd_mpu_port[dev] > 0) {
+	if (mpu_port[dev] > 0) {
 		// this bit is for legacy mpu irqs
 		// legacy_ctrl |= 0x10; /* MPU401 irq enable */
 		legacy_ctrl2 |= 1 << 15; /* IMOD */
@@ -193,28 +193,28 @@
 		snd_card_free(card);
 		return err;
 	}
-	if ((err = snd_ymfpci_mixer(chip, snd_rear_switch[dev])) < 0) {
+	if ((err = snd_ymfpci_mixer(chip, rear_switch[dev])) < 0) {
 		snd_card_free(card);
 		return err;
 	}
-	if (snd_mpu_port[dev] > 0) {
+	if (mpu_port[dev] > 0) {
 		if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_YMFPCI,
-					       snd_mpu_port[dev], 0,
+					       mpu_port[dev], 0,
 					       pci->irq, 0, &chip->rawmidi)) < 0) {
-			printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", snd_mpu_port[dev]);
-			snd_mpu_port[dev] = 0;
+			printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", mpu_port[dev]);
+			mpu_port[dev] = 0;
 			// only for legacy mpu irqs
 			// legacy_ctrl &= ~0x10; /* disable MPU401 irq */
 			// pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl);
 		}
 	}
-	if (snd_fm_port[dev] > 0) {
+	if (fm_port[dev] > 0) {
 		if ((err = snd_opl3_create(card,
-					   snd_fm_port[dev],
-					   snd_fm_port[dev] + 2,
+					   fm_port[dev],
+					   fm_port[dev] + 2,
 					   OPL3_HW_OPL3, 0, &opl3)) < 0) {
-			printk(KERN_WARNING "ymfpci: cannot initialize FM OPL3 at 0x%lx, skipping...\n", snd_fm_port[dev]);
-			snd_fm_port[dev] = 0;
+			printk(KERN_WARNING "ymfpci: cannot initialize FM OPL3 at 0x%lx, skipping...\n", fm_port[dev]);
+			fm_port[dev] = 0;
 			legacy_ctrl &= ~2;
 			pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl);
 		} else if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
@@ -312,8 +312,8 @@
 
 #ifndef MODULE
 
-/* format is: snd-ymfpci=snd_enable,snd_index,snd_id,
-			 snd_fm_port,snd_mpu_port */
+/* format is: snd-ymfpci=enable,index,id,
+			 fm_port,mpu_port */
 
 static int __init alsa_card_ymfpci_setup(char *str)
 {
@@ -321,11 +321,11 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_enable[nr_dev]) == 2 &&
-	       get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_id(&str,&snd_id[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
-	       get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2);
+	(void)(get_option(&str,&enable[nr_dev]) == 2 &&
+	       get_option(&str,&index[nr_dev]) == 2 &&
+	       get_id(&str,&id[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&fm_port[nr_dev]) == 2 &&
+	       get_option(&str,(int *)&mpu_port[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/ppc/Config.in b/sound/ppc/Config.in
--- a/sound/ppc/Config.in	Wed Oct 30 16:44:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-# ALSA PowerMac drivers
-
-mainmenu_option next_comment
-comment 'ALSA PowerMac devices'
-
-dep_tristate 'PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)' CONFIG_SND_POWERMAC $CONFIG_SND
-
-endmenu
diff -Nru a/sound/ppc/Kconfig b/sound/ppc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/ppc/Kconfig	Wed Oct 30 16:44:38 2002
@@ -0,0 +1,11 @@
+# ALSA PowerMac drivers
+
+menu "ALSA PowerMac devices"
+	depends on SND!=n && PPC
+
+config SND_POWERMAC
+	tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)"
+	depends on SND
+
+endmenu
+
diff -Nru a/sound/ppc/powermac.c b/sound/ppc/powermac.c
--- a/sound/ppc/powermac.c	Wed Oct 30 16:44:36 2002
+++ b/sound/ppc/powermac.c	Wed Oct 30 16:44:36 2002
@@ -34,23 +34,23 @@
 MODULE_DEVICES("{{Apple,PowerMac}}");
 MODULE_LICENSE("GPL");
 
-static int snd_index = SNDRV_DEFAULT_IDX1;		/* Index 0-MAX */
-static char *snd_id = SNDRV_DEFAULT_STR1;		/* ID for this card */
-static int snd_enable = 1;
-static int snd_enable_beep = 1;
-
-MODULE_PARM(snd_index, "i");
-MODULE_PARM_DESC(snd_index, "Index value for " CHIP_NAME " soundchip.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "s");
-MODULE_PARM_DESC(snd_id, "ID string for " CHIP_NAME " soundchip.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "i");
-MODULE_PARM_DESC(snd_enable, "Enable this soundchip.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_enable_beep, "i");
-MODULE_PARM_DESC(snd_enable_beep, "Enable beep using PCM.");
-MODULE_PARM_SYNTAX(snd_enable_beep, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
+static int index = SNDRV_DEFAULT_IDX1;		/* Index 0-MAX */
+static char *id = SNDRV_DEFAULT_STR1;		/* ID for this card */
+static int enable = 1;
+static int enable_beep = 1;
+
+MODULE_PARM(index, "i");
+MODULE_PARM_DESC(index, "Index value for " CHIP_NAME " soundchip.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "s");
+MODULE_PARM_DESC(id, "ID string for " CHIP_NAME " soundchip.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "i");
+MODULE_PARM_DESC(enable, "Enable this soundchip.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(enable_beep, "i");
+MODULE_PARM_DESC(enable_beep, "Enable beep using PCM.");
+MODULE_PARM_SYNTAX(enable_beep, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
 
 
 /*
@@ -69,7 +69,7 @@
 	char *name_ext;
 	int err;
 
-	card = snd_card_new(snd_index, snd_id, THIS_MODULE, 0);
+	card = snd_card_new(index, id, THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -129,7 +129,7 @@
 		goto __error;
 
 	chip->initialized = 1;
-	if (snd_enable_beep)
+	if (enable_beep)
 		snd_pmac_attach_beep(chip);
 
 	if ((err = snd_card_register(card)) < 0)
@@ -172,15 +172,15 @@
 
 #ifndef MODULE
 
-/* format is: snd-pmac=snd_enable,snd_index,snd_id,snd_enable_beep
+/* format is: snd-pmac=enable,index,id,enable_beep
  */
 
 static int __init alsa_card_pmac_setup(char *str)
 {
-	(void)(get_option(&str,&snd_enable) == 2 &&
-	       get_option(&str,&snd_index) == 2 &&
-	       get_id(&str,&snd_id) == 2 &&
-	       get_option(&str,&snd_enable_beep) == 2
+	(void)(get_option(&str,&enable) == 2 &&
+	       get_option(&str,&index) == 2 &&
+	       get_id(&str,&id) == 2 &&
+	       get_option(&str,&enable_beep) == 2
 	       );
 	return 1;
 }
diff -Nru a/sound/sparc/Config.in b/sound/sparc/Config.in
--- a/sound/sparc/Config.in	Wed Oct 30 16:44:30 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,13 +0,0 @@
-# ALSA Sparc drivers
-
-mainmenu_option next_comment
-comment 'ALSA Sparc devices'
-
-if [ "$CONFIG_SBUS" != "n" ]; then
-  dep_tristate 'Sun AMD7930' CONFIG_SND_SUN_AMD7930 $CONFIG_SND
-#  dep_tristate 'Sun DBRI' CONFIG_SND_SUN_DBRI $CONFIG_SND
-fi
-
-dep_tristate 'Sun CS4231' CONFIG_SND_SUN_CS4231 $CONFIG_SND
-
-endmenu
diff -Nru a/sound/sparc/Kconfig b/sound/sparc/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/sparc/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,16 @@
+# ALSA Sparc drivers
+
+menu "ALSA Sparc devices"
+	depends on SND!=n && (SPARC32 || SPARC64)
+
+config SND_SUN_AMD7930
+	tristate "Sun AMD7930"
+	depends on SBUS && SND
+
+#  dep_tristate 'Sun DBRI' CONFIG_SND_SUN_DBRI $CONFIG_SND
+config SND_SUN_CS4231
+	tristate "Sun CS4231"
+	depends on SND
+
+endmenu
+
diff -Nru a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
--- a/sound/sparc/amd7930.c	Wed Oct 30 16:44:24 2002
+++ b/sound/sparc/amd7930.c	Wed Oct 30 16:44:24 2002
@@ -47,19 +47,19 @@
 #include <asm/irq.h>
 #include <asm/sbus.h>
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Sun AMD7930 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Sun AMD7930 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Sun AMD7930 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Sun AMD7930 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Sun AMD7930 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Sun AMD7930 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 MODULE_AUTHOR("Thomas K. Dyas and David S. Miller");
 MODULE_DESCRIPTION("Sun AMD7930");
 MODULE_LICENSE("GPL");
@@ -1042,7 +1042,7 @@
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
@@ -1070,7 +1070,7 @@
 		rp->flags = IORESOURCE_IO | (reg_prop.which_io & 0xff);
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -1151,7 +1151,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-sun-amd7930=snd_index,snd_id,snd_enable */
+/* format is: snd-sun-amd7930=index,id,enable */
 
 static int __init alsa_card_sun_amd7930_setup(char *str)
 {
@@ -1159,9 +1159,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_option(&str,&snd_id[nr_dev]) == 2 &&
-	       get_id(&str,&snd_enable[nr_dev]) == 2);
+	(void)(get_option(&str,&index[nr_dev]) == 2 &&
+	       get_option(&str,&id[nr_dev]) == 2 &&
+	       get_id(&str,&enable[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
--- a/sound/sparc/cs4231.c	Wed Oct 30 16:44:19 2002
+++ b/sound/sparc/cs4231.c	Wed Oct 30 16:44:19 2002
@@ -45,19 +45,19 @@
 #include <asm/ebus.h>
 #endif
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for Sun CS4231 soundcard.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for Sun CS4231 soundcard.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable Sun CS4231 soundcard.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
+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_PNP;	/* Enable this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for Sun CS4231 soundcard.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for Sun CS4231 soundcard.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable Sun CS4231 soundcard.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
 MODULE_AUTHOR("Jaroslav Kysela, Derrick J. Brashear and David S. Miller");
 MODULE_DESCRIPTION("Sun CS4231");
 MODULE_LICENSE("GPL");
@@ -1891,12 +1891,12 @@
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
 
-	if (!snd_enable[dev]) {
+	if (!enable[dev]) {
 		dev++;
 		return -ENOENT;
 	}
 
-	card = snd_card_new(snd_index[dev], snd_id[dev], THIS_MODULE, 0);
+	card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;
 
@@ -2251,7 +2251,7 @@
 
 #ifndef MODULE
 
-/* format is: snd-sun-cs4231=snd_index,snd_id,snd_enable */
+/* format is: snd-sun-cs4231=index,id,enable */
 
 static int __init alsa_card_sun_cs4231_setup(char *str)
 {
@@ -2259,9 +2259,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str,&snd_index[nr_dev]) == 2 &&
-	       get_option(&str,&snd_id[nr_dev]) == 2 &&
-	       get_id(&str,&snd_enable[nr_dev]) == 2);
+	(void)(get_option(&str,&index[nr_dev]) == 2 &&
+	       get_option(&str,&id[nr_dev]) == 2 &&
+	       get_id(&str,&enable[nr_dev]) == 2);
 	nr_dev++;
 	return 1;
 }
diff -Nru a/sound/usb/Config.help b/sound/usb/Config.help
--- a/sound/usb/Config.help	Wed Oct 30 16:44:34 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,4 +0,0 @@
-CONFIG_SND_USB_AUDIO
-  Say 'Y' or 'M' to include support for USB audio devices.
-  To support USB MIDI devices, you need to enable ALSA sequencer support
-  (CONFIG_SND_SEQUENCER).
diff -Nru a/sound/usb/Config.in b/sound/usb/Config.in
--- a/sound/usb/Config.in	Wed Oct 30 16:44:26 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,8 +0,0 @@
-# ALSA USB drivers
-
-mainmenu_option next_comment
-comment 'ALSA USB devices'
-
-dep_tristate 'USB Audio/MIDI driver' CONFIG_SND_USB_AUDIO $CONFIG_SND
-
-endmenu
diff -Nru a/sound/usb/Kconfig b/sound/usb/Kconfig
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/sound/usb/Kconfig	Wed Oct 30 16:44:40 2002
@@ -0,0 +1,13 @@
+# ALSA USB drivers
+
+menu "ALSA USB devices"
+	depends on SND!=n && USB!=n
+
+config SND_USB_AUDIO
+	tristate "USB Audio/MIDI driver"
+	depends on SND
+	help
+	  Say 'Y' or 'M' to include support for USB audio and USB MIDI devices.
+
+endmenu
+
diff -Nru a/sound/usb/Makefile b/sound/usb/Makefile
--- a/sound/usb/Makefile	Wed Oct 30 16:44:29 2002
+++ b/sound/usb/Makefile	Wed Oct 30 16:44:29 2002
@@ -2,15 +2,9 @@
 # Makefile for ALSA
 #
 
-snd-usb-audio-objs := usbaudio.o usbmixer.o
-ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
-snd-usb-midi-objs := usbmidi.o
-endif
+snd-usb-audio-objs := usbaudio.o usbmixer.o usbmidi.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-audio.o
-ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
-obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-midi.o
-endif
 
 include $(TOPDIR)/Rules.make
diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c	Wed Oct 30 16:44:30 2002
+++ b/sound/usb/usbaudio.c	Wed Oct 30 16:44:30 2002
@@ -50,27 +50,27 @@
 MODULE_DEVICES("{{Generic,USB Audio}}");
 
 
-static int snd_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
-static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
-static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;	/* Enable this card */
-static int snd_vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Vendor ID for this card */
-static int snd_pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Product ID for this card */
-
-MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_index, "Index value for the USB audio adapter.");
-MODULE_PARM_SYNTAX(snd_index, SNDRV_INDEX_DESC);
-MODULE_PARM(snd_id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
-MODULE_PARM_DESC(snd_id, "ID string for the USB audio adapter.");
-MODULE_PARM_SYNTAX(snd_id, SNDRV_ID_DESC);
-MODULE_PARM(snd_enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_enable, "Enable USB audio adapter.");
-MODULE_PARM_SYNTAX(snd_enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(snd_vid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_vid, "Vendor ID for the USB audio device.");
-MODULE_PARM_SYNTAX(snd_vid, SNDRV_ENABLED ",allows:{{-1,0xffff}},base:16");
-MODULE_PARM(snd_pid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(snd_pid, "Product ID for the USB audio device.");
-MODULE_PARM_SYNTAX(snd_pid, SNDRV_ENABLED ",allows:{{-1,0xffff}},base:16");
+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_PNP;	/* Enable this card */
+static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Vendor ID for this card */
+static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Product ID for this card */
+
+MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(index, "Index value for the USB audio adapter.");
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+MODULE_PARM_DESC(id, "ID string for the USB audio adapter.");
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(enable, "Enable USB audio adapter.");
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+MODULE_PARM(vid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(vid, "Vendor ID for the USB audio device.");
+MODULE_PARM_SYNTAX(vid, SNDRV_ENABLED ",allows:{{-1,0xffff}},base:16");
+MODULE_PARM(pid, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(pid, "Product ID for the USB audio device.");
+MODULE_PARM_SYNTAX(pid, SNDRV_ENABLED ",allows:{{-1,0xffff}},base:16");
 
 
 /*
@@ -82,7 +82,7 @@
 /* #define SND_USE_ASYNC_UNLINK */
 
 #ifdef SND_USB_ASYNC_UNLINK
-#define UNLINK_FLAGS	USB_ASYNC_UNLINK
+#define UNLINK_FLAGS	URB_ASYNC_UNLINK
 #else
 #define UNLINK_FLAGS	0
 #endif
@@ -867,7 +867,7 @@
 		}
 		u->urb->dev = subs->dev;
 		u->urb->pipe = subs->datapipe;
-		u->urb->transfer_flags = USB_ISO_ASAP | UNLINK_FLAGS;
+		u->urb->transfer_flags = URB_ISO_ASAP | UNLINK_FLAGS;
 		u->urb->number_of_packets = u->packets;
 		u->urb->context = u;
 		u->urb->complete = snd_complete_urb;
@@ -889,7 +889,7 @@
 			u->urb->transfer_buffer_length = NRPACKS * 3;
 			u->urb->dev = subs->dev;
 			u->urb->pipe = subs->syncpipe;
-			u->urb->transfer_flags = USB_ISO_ASAP | UNLINK_FLAGS;
+			u->urb->transfer_flags = URB_ISO_ASAP | UNLINK_FLAGS;
 			u->urb->number_of_packets = u->packets;
 			u->urb->context = u;
 			u->urb->complete = snd_complete_sync_urb;
@@ -933,8 +933,8 @@
 static int set_format(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime)
 {
 	struct usb_device *dev = subs->dev;
-	struct usb_config_descriptor *config = dev->actconfig;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_config *config = dev->actconfig;
+	struct usb_host_interface *alts;
 	struct usb_interface *iface;	
 	struct audioformat *fmt;
 	unsigned int ep, attr;
@@ -951,7 +951,7 @@
 
 	iface = &config->interface[fmt->iface];
 	alts = &iface->altsetting[fmt->altset_idx];
-	snd_assert(alts->bAlternateSetting == fmt->altsetting, return -EINVAL);
+	snd_assert(alts->desc.bAlternateSetting == fmt->altsetting, return -EINVAL);
 
 	/* close the old interface */
 	if (subs->interface >= 0 && subs->interface != fmt->iface) {
@@ -973,31 +973,31 @@
 	}
 
 	/* create a data pipe */
-	ep = alts->endpoint[0].bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+	ep = alts->endpoint[0].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
 	if (is_playback)
 		subs->datapipe = usb_sndisocpipe(dev, ep);
 	else
 		subs->datapipe = usb_rcvisocpipe(dev, ep);
 	subs->syncpipe = subs->syncinterval = 0;
-	subs->maxpacksize = alts->endpoint[0].wMaxPacketSize;
+	subs->maxpacksize = alts->endpoint[0].desc.wMaxPacketSize;
 	subs->maxframesize = bytes_to_frames(runtime, subs->maxpacksize);
 	subs->fill_max = 0;
 
 	/* we need a sync pipe in async OUT or adaptive IN mode */
-	attr = alts->endpoint[0].bmAttributes & EP_ATTR_MASK;
+	attr = alts->endpoint[0].desc.bmAttributes & EP_ATTR_MASK;
 	if ((is_playback && attr == EP_ATTR_ASYNC) ||
 	    (! is_playback && attr == EP_ATTR_ADAPTIVE)) {
 		/* check endpoint */
-		if (alts->bNumEndpoints < 2 ||
-		    alts->endpoint[1].bmAttributes != 0x01 ||
-		    alts->endpoint[1].bSynchAddress != 0) {
+		if (alts->desc.bNumEndpoints < 2 ||
+		    alts->endpoint[1].desc.bmAttributes != 0x01 ||
+		    alts->endpoint[1].desc.bSynchAddress != 0) {
 			snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n",
 				   dev->devnum, fmt->iface, fmt->altsetting);
 			return -EINVAL;
 		}
-		ep = alts->endpoint[1].bEndpointAddress;
-		if ((is_playback && ep != (alts->endpoint[0].bSynchAddress | USB_DIR_IN)) ||
-		    (! is_playback && ep != (alts->endpoint[0].bSynchAddress & ~USB_DIR_IN))) {
+		ep = alts->endpoint[1].desc.bEndpointAddress;
+		if ((is_playback && ep != (alts->endpoint[0].desc.bSynchAddress | USB_DIR_IN)) ||
+		    (! is_playback && ep != (alts->endpoint[0].desc.bSynchAddress & ~USB_DIR_IN))) {
 			snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n",
 				   dev->devnum, fmt->iface, fmt->altsetting);
 			return -EINVAL;
@@ -1007,10 +1007,10 @@
 			subs->syncpipe = usb_rcvisocpipe(dev, ep);
 		else
 			subs->syncpipe = usb_sndisocpipe(dev, ep);
-		subs->syncinterval = alts->endpoint[1].bRefresh;
+		subs->syncinterval = alts->endpoint[1].desc.bRefresh;
 	}
 
-	ep = alts->endpoint[0].bEndpointAddress;
+	ep = alts->endpoint[0].desc.bEndpointAddress;
 	/* if endpoint has pitch control, enable it */
 	if (fmt->attributes & EP_CS_ATTR_PITCH_CONTROL) {
 		data[0] = 1;
@@ -1673,9 +1673,9 @@
 static int parse_audio_endpoints(snd_usb_audio_t *chip, unsigned char *buffer, int buflen, int iface_no)
 {
 	struct usb_device *dev;
-	struct usb_config_descriptor *config;
+	struct usb_host_config *config;
 	struct usb_interface *iface;
-	struct usb_interface_descriptor *alts;
+	struct usb_host_interface *alts;
 	int i, altno, err, stream;
 	int channels, nr_rates, pcm_format, format;
 	struct audioformat *fp;
@@ -1689,18 +1689,18 @@
 	for (i = 0; i < iface->num_altsetting; i++) {
 		alts = &iface->altsetting[i];
 		/* skip invalid one */
-		if (alts->bInterfaceClass != USB_CLASS_AUDIO ||
-		    alts->bInterfaceSubClass != USB_SUBCLASS_AUDIO_STREAMING ||
-		    alts->bNumEndpoints < 1)
+		if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO ||
+		    alts->desc.bInterfaceSubClass != USB_SUBCLASS_AUDIO_STREAMING ||
+		    alts->desc.bNumEndpoints < 1)
 			continue;
 		/* must be isochronous */
-		if ((alts->endpoint[0].bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
+		if ((alts->endpoint[0].desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
 		    USB_ENDPOINT_XFER_ISOC)
 			continue;
 		/* check direction */
-		stream = (alts->endpoint[0].bEndpointAddress & USB_DIR_IN) ?
+		stream = (alts->endpoint[0].desc.bEndpointAddress & USB_DIR_IN) ?
 			SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
-		altno = alts->bAlternateSetting;
+		altno = alts->desc.bAlternateSetting;
 
 		/* get audio formats */
 		fmt = snd_usb_find_csint_desc(buffer, buflen, NULL, AS_GENERAL, iface_no, altno);
@@ -1767,8 +1767,8 @@
 		fp->altsetting = altno;
 		fp->altset_idx = i;
 		fp->format = pcm_format;
-		fp->endpoint = alts->endpoint[0].bEndpointAddress;
-		fp->ep_attr = alts->endpoint[0].bmAttributes;
+		fp->endpoint = alts->endpoint[0].desc.bEndpointAddress;
+		fp->ep_attr = alts->endpoint[0].desc.bmAttributes;
 		fp->channels = channels;
 		fp->attributes = csep[3];
 
@@ -1833,16 +1833,11 @@
 /*
  * parse audio control descriptor and create pcm/midi streams
  */
-
-static int snd_usb_create_midi_interface(snd_usb_audio_t *chip,
-					 struct usb_interface *iface,
-					 const snd_usb_audio_quirk_t *quirk);
-
 static int snd_usb_create_streams(snd_usb_audio_t *chip, int ctrlif,
 				  unsigned char *buffer, int buflen)
 {
 	struct usb_device *dev = chip->dev;
-	struct usb_config_descriptor *config;
+	struct usb_host_config *config;
 	struct usb_interface *iface;
 	unsigned char *p1;
 	int i, j;
@@ -1863,7 +1858,7 @@
 	config = dev->actconfig;
 	for (i = 0; i < p1[7]; i++) {
 		j = p1[8 + i];
-		if (j >= config->bNumInterfaces) {
+		if (j >= config->desc.bNumInterfaces) {
 			snd_printk(KERN_ERR "%d:%u:%d : does not exist\n",
 				   dev->devnum, ctrlif, j);
 			continue;
@@ -1873,8 +1868,8 @@
 			snd_printdd(KERN_INFO "%d:%d:%d: skipping, already claimed\n", dev->devnum, ctrlif, j);
 			continue;
 		}
-		if (iface->altsetting[0].bInterfaceClass == USB_CLASS_AUDIO &&
-		    iface->altsetting[0].bInterfaceSubClass == USB_SUBCLASS_MIDI_STREAMING) {
+		if (iface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO &&
+		    iface->altsetting[0].desc.bInterfaceSubClass == USB_SUBCLASS_MIDI_STREAMING) {
 			if (snd_usb_create_midi_interface(chip, iface, NULL) < 0) {
 				snd_printk(KERN_ERR "%d:%u:%d: cannot create sequencer device\n", dev->devnum, ctrlif, j);
 				continue;
@@ -1882,8 +1877,8 @@
 			usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1);
 			continue;
 		}
-		if (iface->altsetting[0].bInterfaceClass != USB_CLASS_AUDIO ||
-		    iface->altsetting[0].bInterfaceSubClass != USB_SUBCLASS_AUDIO_STREAMING) {
+		if (iface->altsetting[0].desc.bInterfaceClass != USB_CLASS_AUDIO ||
+		    iface->altsetting[0].desc.bInterfaceSubClass != USB_SUBCLASS_AUDIO_STREAMING) {
 			snd_printdd(KERN_ERR "%d:%u:%d: skipping non-supported interface %d\n", dev->devnum, ctrlif, j, iface->altsetting[0].bInterfaceClass);
 			/* skip non-supported classes */
 			continue;
@@ -1896,38 +1891,95 @@
 	return 0;
 }
 
-static int snd_usb_create_midi_interface(snd_usb_audio_t *chip,
-					 struct usb_interface *iface,
-					 const snd_usb_audio_quirk_t *quirk)
-{
-#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
-	snd_seq_device_t *seq_device;
-	snd_usb_midi_t *umidi;
+static int snd_usb_roland_ua100_hack_intf(snd_usb_audio_t *chip, int ifnum)
+{
+	struct audioformat *fp;
 	int err;
 
-	err = snd_seq_device_new(chip->card, chip->next_seq_device,
-				 SNDRV_SEQ_DEV_ID_USBMIDI,
-				 sizeof(snd_usb_midi_t), &seq_device);
-	if (err < 0)
+	fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+	if (! fp) {
+		snd_printk(KERN_ERR "cannot malloc\n");
+		return -ENOMEM;
+	}
+	memset(fp, 0, sizeof(*fp));
+	fp->format = SNDRV_PCM_FORMAT_S16_LE;
+	fp->channels = ifnum == 0 ? 4 : 2;
+	fp->iface = ifnum;
+	fp->altsetting = 1;
+	fp->altset_idx = 1;
+	fp->attributes = ifnum == 0 ? 0 : EP_CS_ATTR_FILL_MAX;
+	fp->endpoint = ifnum == 0 ? 0x01 : 0x81;
+	fp->ep_attr = ifnum == 0 ? 0x09 : 0x05;
+	fp->rates = SNDRV_PCM_RATE_CONTINUOUS;
+	fp->rate_min = fp->rate_max = 44100;
+
+	err = add_audio_endpoint(chip, ifnum == 0 ? SNDRV_PCM_STREAM_PLAYBACK
+				 : SNDRV_PCM_STREAM_CAPTURE, fp);
+	if (err < 0) {
+		kfree(fp);
 		return err;
-	chip->next_seq_device++;
-	strcpy(seq_device->name, chip->card->shortname);
-	umidi = (snd_usb_midi_t *)SNDRV_SEQ_DEVICE_ARGPTR(seq_device);
-	umidi->chip = chip;
-	umidi->iface = iface;
-	umidi->ifnum = iface->altsetting->bInterfaceNumber;
-	umidi->quirk = quirk;
-	umidi->seq_client = -1;
-#endif
+	}
+	usb_set_interface(chip->dev, ifnum, 0);
+	return 0;
+}
+
+static int snd_usb_roland_ua100_hack(snd_usb_audio_t *chip)
+{
+	static const snd_usb_midi_endpoint_info_t ep_quirk = {
+		.epnum = -1,
+		.out_cables = 0x0007,
+		.in_cables  = 0x0007
+	};
+	static const snd_usb_audio_quirk_t midi_quirk = {
+		.vendor_name = "Roland",
+		.product_name = "UA-100",
+		.ifnum = 2,
+		.type = QUIRK_MIDI_FIXED_ENDPOINT,
+		.data = &ep_quirk
+	};
+	struct usb_host_config *cfg = chip->dev->actconfig;
+	struct usb_interface *iface;
+	int err;
+
+	if (cfg->desc.bNumInterfaces != 3) {
+		snd_printdd(KERN_ERR "invalid UA-100 descriptor\n");
+		return -ENXIO;
+	}
+	/* if 0: output */
+	if ((err = snd_usb_roland_ua100_hack_intf(chip, 0)) < 0)
+		return err;
+	/* if 1: input */
+	iface = &cfg->interface[1];
+	if (! usb_interface_claimed(iface)) {
+		if ((err = snd_usb_roland_ua100_hack_intf(chip, 1)) < 0)
+			return err;
+		usb_driver_claim_interface(&usb_audio_driver, iface, (void*)-1);
+	}
+	/* if 2: MIDI */
+	iface = &cfg->interface[2];
+	if (! usb_interface_claimed(iface)) {
+		if ((err = snd_usb_create_midi_interface(chip, iface, &midi_quirk)) < 0)
+			return err;
+		usb_driver_claim_interface(&usb_audio_driver, iface, (void*)-1);
+	}
 	return 0;
 }
 
-static inline int snd_usb_create_quirk(snd_usb_audio_t *chip,
-				       struct usb_interface *iface,
-	       			       const snd_usb_audio_quirk_t *quirk)
+static int snd_usb_create_quirk(snd_usb_audio_t *chip,
+				struct usb_interface *iface,
+				const snd_usb_audio_quirk_t *quirk)
 {
-	/* in the future, there may be quirks for PCM devices */
-	return snd_usb_create_midi_interface(chip, iface, quirk);
+	switch (quirk->type) {
+	case QUIRK_MIDI_FIXED_ENDPOINT:
+	case QUIRK_MIDI_YAMAHA:
+	case QUIRK_MIDI_MIDIMAN:
+		return snd_usb_create_midi_interface(chip, iface, quirk);
+	case QUIRK_ROLAND_UA100:
+		return snd_usb_roland_ua100_hack(chip);
+	default:
+		snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
+		return -ENXIO;
+	}
 }
 
 
@@ -2080,20 +2132,20 @@
  */
 static void *snd_usb_audio_probe(struct usb_device *dev,
 				 struct usb_interface *intf,
-				 const struct usb_device_id *id)
+				 const struct usb_device_id *usb_id)
 {
-	struct usb_config_descriptor *config = dev->actconfig;	
-	const snd_usb_audio_quirk_t *quirk = (const snd_usb_audio_quirk_t *)id->driver_info;
+	struct usb_host_config *config = dev->actconfig;	
+	const snd_usb_audio_quirk_t *quirk = (const snd_usb_audio_quirk_t *)usb_id->driver_info;
 	int i;
 	snd_card_t *card;
 	snd_usb_audio_t *chip;
-	int ifnum = intf->altsetting->bInterfaceNumber;
+	int ifnum = intf->altsetting->desc.bInterfaceNumber;
 
 	if (quirk && quirk->ifnum != QUIRK_ANY_INTERFACE && ifnum != quirk->ifnum)
 		goto __err_val;
 
-	if (usb_set_configuration(dev, config->bConfigurationValue) < 0) {
-		snd_printk(KERN_ERR "cannot set configuration (value 0x%x)\n", config->bConfigurationValue);
+	if (usb_set_configuration(dev, config->desc.bConfigurationValue) < 0) {
+		snd_printk(KERN_ERR "cannot set configuration (value 0x%x)\n", config->desc.bConfigurationValue);
 		goto __err_val;
 	}
 
@@ -2115,10 +2167,10 @@
 		 * now look for an empty slot and create a new card instance
 		 */
 		for (i = 0; i < SNDRV_CARDS; i++)
-			if (snd_enable[i] && ! usb_chip[i] &&
-			    (snd_vid[i] == -1 || snd_vid[i] == dev->descriptor.idVendor) &&
-			    (snd_pid[i] == -1 || snd_pid[i] == dev->descriptor.idProduct)) {
-				card = snd_card_new(snd_index[i], snd_id[i], THIS_MODULE, 0);
+			if (enable[i] && ! usb_chip[i] &&
+			    (vid[i] == -1 || vid[i] == dev->descriptor.idVendor) &&
+			    (pid[i] == -1 || pid[i] == dev->descriptor.idProduct)) {
+				card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
 				if (card == NULL) {
 					snd_printk(KERN_ERR "cannot create a card instance %d\n", i);
 					goto __error;
@@ -2253,7 +2305,7 @@
 
 #ifndef MODULE
 /*
- * format is snd-usb-audio=snd_enable,snd_index,snd_id
+ * format is snd-usb-audio=enable,index,id
  */
 static int __init snd_usb_audio_module_setup(char* str)
 {
@@ -2261,9 +2313,9 @@
 
 	if (nr_dev >= SNDRV_CARDS)
 		return 0;
-	(void)(get_option(&str, &snd_enable[nr_dev]) == 2 &&
-	       get_option(&str, &snd_index[nr_dev]) == 2 &&
-	       get_id(&str, &snd_id[nr_dev]) == 2);
+	(void)(get_option(&str, &enable[nr_dev]) == 2 &&
+	       get_option(&str, &index[nr_dev]) == 2 &&
+	       get_id(&str, &id[nr_dev]) == 2);
 	++nr_dev;
 	return 1;
 }
diff -Nru a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
--- a/sound/usb/usbaudio.h	Wed Oct 30 16:44:29 2002
+++ b/sound/usb/usbaudio.h	Wed Oct 30 16:44:29 2002
@@ -123,8 +123,6 @@
 /* maximum number of endpoints per interface */
 #define MIDI_MAX_ENDPOINTS 2
 
-#define SNDRV_SEQ_DEV_ID_USBMIDI "usb-midi"
-
 /*
  */
 
@@ -140,9 +138,7 @@
 	struct list_head pcm_list;	/* list of pcm streams */
 	int pcm_devs;
 
-#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
-	int next_seq_device;
-#endif
+	int next_midi_device;
 };  
 
 /*
@@ -153,6 +149,7 @@
 #define QUIRK_MIDI_FIXED_ENDPOINT	0
 #define QUIRK_MIDI_YAMAHA		1
 #define QUIRK_MIDI_MIDIMAN		2
+#define QUIRK_ROLAND_UA100		3
 
 typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
 typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
@@ -176,30 +173,7 @@
 
 /* for QUIRK_MIDI_MIDIMAN, data is the number of ports */
 
-/*
- * USB MIDI sequencer device data
- */
-typedef struct snd_usb_midi snd_usb_midi_t;
-typedef struct snd_usb_midi_endpoint snd_usb_midi_endpoint_t;
-typedef struct snd_usb_midi_out_endpoint snd_usb_midi_out_endpoint_t;
-typedef struct snd_usb_midi_in_endpoint snd_usb_midi_in_endpoint_t;
-
-struct snd_usb_midi {
-	/* filled by usbaudio.c */
-	snd_usb_audio_t *chip;
-	struct usb_interface *iface;
-	int ifnum;
-	const snd_usb_audio_quirk_t *quirk;
-
-	/* used internally in usbmidi.c */
-	int seq_client;
-	struct snd_usb_midi_endpoint {
-		snd_usb_midi_out_endpoint_t *out;
-		snd_usb_midi_in_endpoint_t *in;
-		snd_rawmidi_t *rmidi[0x10];
-	} endpoints[MIDI_MAX_ENDPOINTS];
-};
-
+/* for QUIRK_ROLAND_UA100, data is NULL */
 
 /*
  */
@@ -214,5 +188,7 @@
 void *snd_usb_find_csint_desc(void *descstart, int desclen, void *after, u8 dsubtype, int iface, int altsetting);
 
 int snd_usb_create_mixer(snd_usb_audio_t *chip, int ctrlif, unsigned char *buffer, int buflen);
+
+int snd_usb_create_midi_interface(snd_usb_audio_t *chip, struct usb_interface *iface, const snd_usb_audio_quirk_t *quirk);
 
 #endif /* __USBAUDIO_H */
diff -Nru a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
--- a/sound/usb/usbmidi.c	Wed Oct 30 16:44:33 2002
+++ b/sound/usb/usbmidi.c	Wed Oct 30 16:44:33 2002
@@ -46,34 +46,9 @@
 #include <linux/usb.h>
 #include <sound/core.h>
 #include <sound/minors.h>
-#include <sound/asequencer.h>
-#include <sound/seq_device.h>
-#include <sound/seq_kernel.h>
-#include <sound/seq_virmidi.h>
-#include <sound/seq_midi_event.h>
-#include <sound/initval.h>
+#include <sound/rawmidi.h>
 #include "usbaudio.h"
 
-MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
-MODULE_DESCRIPTION("USB MIDI");
-MODULE_LICENSE("Dual BSD/GPL");
-MODULE_CLASSES("{sound}");
-
-/* size of the per-endpoint output buffer, must be a multiple of 4 */
-#define OUTPUT_BUFFER_SIZE 0x400
-
-/* max. size of incoming sysex messages */
-#define INPUT_BUFFER_SIZE 0x200
-
-typedef struct usb_driver usb_driver_t;
-typedef struct usb_device usb_device_t;
-typedef struct usb_device_id usb_device_id_t;
-typedef struct usb_interface usb_interface_t;
-typedef struct usb_interface_descriptor usb_interface_descriptor_t;
-typedef struct usb_ms_header_descriptor usb_ms_header_descriptor_t;
-typedef struct usb_endpoint_descriptor usb_endpoint_descriptor_t;
-typedef struct usb_ms_endpoint_descriptor usb_ms_endpoint_descriptor_t;
-
 struct usb_ms_header_descriptor {
 	__u8  bLength;
 	__u8  bDescriptorType;
@@ -90,35 +65,56 @@
 	__u8  baAssocJackID[0];
 } __attribute__ ((packed));
 
+typedef struct snd_usb_midi snd_usb_midi_t;
+typedef struct snd_usb_midi_endpoint snd_usb_midi_endpoint_t;
+typedef struct snd_usb_midi_out_endpoint snd_usb_midi_out_endpoint_t;
+typedef struct snd_usb_midi_in_endpoint snd_usb_midi_in_endpoint_t;
 typedef struct usbmidi_out_port usbmidi_out_port_t;
 typedef struct usbmidi_in_port usbmidi_in_port_t;
 
+struct snd_usb_midi {
+	snd_usb_audio_t *chip;
+	struct usb_interface *iface;
+	const snd_usb_audio_quirk_t *quirk;
+	snd_rawmidi_t* rmidi;
+
+	struct snd_usb_midi_endpoint {
+		snd_usb_midi_out_endpoint_t *out;
+		snd_usb_midi_in_endpoint_t *in;
+	} endpoints[MIDI_MAX_ENDPOINTS];
+};
+
 struct snd_usb_midi_out_endpoint {
 	snd_usb_midi_t* umidi;
 	struct urb* urb;
 	int max_transfer;		/* size of urb buffer */
 	struct tasklet_struct tasklet;
 
-	uint8_t buffer[OUTPUT_BUFFER_SIZE]; /* ring buffer */
-	int data_begin;
-	int data_size;
 	spinlock_t buffer_lock;
 
 	struct usbmidi_out_port {
 		snd_usb_midi_out_endpoint_t* ep;
+		snd_rawmidi_substream_t* substream;
+		int active;
 		uint8_t cable;		/* cable number << 4 */
-		uint8_t sysex_len;
-		uint8_t sysex[2];
+		uint8_t state;
+#define STATE_UNKNOWN	0
+#define STATE_1PARAM	1
+#define STATE_2PARAM_1	2
+#define STATE_2PARAM_2	3
+#define STATE_SYSEX_0	4
+#define STATE_SYSEX_1	5
+#define STATE_SYSEX_2	6
+		uint8_t data[2];
 	} ports[0x10];
 };
 
 struct snd_usb_midi_in_endpoint {
 	snd_usb_midi_t* umidi;
-	snd_usb_midi_endpoint_t* ep;
 	struct urb* urb;
 	struct usbmidi_in_port {
-		int seq_port;
-		snd_midi_event_t* midi_event;
+		snd_rawmidi_substream_t* substream;
+		int active;
 	} ports[0x10];
 };
 
@@ -155,28 +151,18 @@
 }
 
 /*
- * Converts a USB MIDI packet into an ALSA sequencer event.
+ * Receives a USB MIDI packet.
  */
 static void snd_usbmidi_input_packet(snd_usb_midi_in_endpoint_t* ep,
 				     uint8_t packet[4])
 {
 	int cable = packet[0] >> 4;
 	usbmidi_in_port_t* port = &ep->ports[cable];
-	snd_seq_event_t ev;
 
-	if (!port->midi_event)
+	if (!port->active)
 		return;
-	memset(&ev, 0, sizeof(ev));
-	if (snd_midi_event_encode(port->midi_event, &packet[1],
-				  snd_usbmidi_cin_length[packet[0] & 0x0f], &ev) > 0
-	    && ev.type != SNDRV_SEQ_EVENT_NONE) {
-		ev.source.port = port->seq_port;
-		ev.dest.client = SNDRV_SEQ_ADDRESS_SUBSCRIBERS;
-		snd_seq_kernel_client_dispatch(ep->umidi->seq_client,
-					       &ev, 1, 0);
-		if (ep->ep->rmidi[cable])
-			snd_virmidi_receive(ep->ep->rmidi[cable], &ev);
-	}
+	snd_rawmidi_receive(port->substream, &packet[1],
+			    snd_usbmidi_cin_length[packet[0] & 0x0f]);
 }
 
 /*
@@ -198,10 +184,8 @@
 			return;
 	}
 
-	if (!usb_pipeint(urb->pipe)) {
-		urb->dev = ep->umidi->chip->dev;
-		snd_usbmidi_submit_urb(urb, GFP_ATOMIC);
-	}
+	urb->dev = ep->umidi->chip->dev;
+	snd_usbmidi_submit_urb(urb, GFP_ATOMIC);
 }
 
 /*
@@ -239,15 +223,12 @@
 static void snd_usbmidi_out_urb_complete(struct urb* urb)
 {
 	snd_usb_midi_out_endpoint_t* ep = snd_magic_cast(snd_usb_midi_out_endpoint_t, urb->context, return);
-	unsigned long flags;
 
 	if (urb->status < 0) {
 		if (snd_usbmidi_urb_error(urb->status) < 0)
 			return;
 	}
-	spin_lock_irqsave(&ep->buffer_lock, flags);
 	snd_usbmidi_do_output(ep);
-	spin_unlock_irqrestore(&ep->buffer_lock, flags);
 }
 
 /*
@@ -268,261 +249,255 @@
 }
 
 /*
+ * Adds one USB MIDI packet to the output buffer.
+ */
+static inline void output_packet(struct urb* urb,
+	       			 uint8_t p0, uint8_t p1, uint8_t p2, uint8_t p3)
+{
+
+	uint8_t* buf = (uint8_t*)urb->transfer_buffer + urb->transfer_buffer_length;
+	buf[0] = p0;
+	buf[1] = p1;
+	buf[2] = p2;
+	buf[3] = p3;
+	urb->transfer_buffer_length += 4;
+}
+
+/*
+ * Converts MIDI commands to USB MIDI packets.
+ */
+static void snd_usbmidi_transmit_byte(usbmidi_out_port_t* port,
+				      uint8_t b, struct urb* urb)
+{
+	uint8_t p0 = port->cable;
+
+	if (b >= 0xf8) {
+		output_packet(urb, p0 | 0x0f, b, 0, 0);
+	} else if (b >= 0xf0) {
+		switch (b) {
+		case 0xf0:
+			port->data[0] = b;
+			port->state = STATE_SYSEX_1;
+			break;
+		case 0xf1:
+		case 0xf3:
+			port->data[0] = b;
+			port->state = STATE_1PARAM;
+			break;
+		case 0xf2:
+			port->data[0] = b;
+			port->state = STATE_2PARAM_1;
+			break;
+		case 0xf4:
+		case 0xf5:
+			port->state = STATE_UNKNOWN;
+			break;
+		case 0xf6:
+			output_packet(urb, p0 | 0x05, 0xf6, 0, 0);
+			port->state = STATE_UNKNOWN;
+			break;
+		case 0xf7:
+			switch (port->state) {
+			case STATE_SYSEX_0:
+				output_packet(urb, p0 | 0x05, 0xf7, 0, 0);
+				break;
+			case STATE_SYSEX_1:
+				output_packet(urb, p0 | 0x06, port->data[0], 0xf7, 0);
+				break;
+			case STATE_SYSEX_2:
+				output_packet(urb, p0 | 0x07, port->data[0], port->data[1], 0xf7);
+				break;
+			}
+			port->state = STATE_UNKNOWN;
+			break;
+		}
+	} else if (b >= 0x80) {
+		port->data[0] = b;
+		if (b >= 0xc0 && b <= 0xdf)
+			port->state = STATE_1PARAM;
+		else
+			port->state = STATE_2PARAM_1;
+	} else { /* b < 0x80 */
+		switch (port->state) {
+		case STATE_1PARAM:
+			if (port->data[0] < 0xf0) {
+				p0 |= port->data[0] >> 4;
+			} else {
+				p0 |= 0x02;
+				port->state = STATE_UNKNOWN;
+			}
+			output_packet(urb, p0, port->data[0], b, 0);
+			break;
+		case STATE_2PARAM_1:
+			port->data[1] = b;
+			port->state = STATE_2PARAM_2;
+			break;
+		case STATE_2PARAM_2:
+			if (port->data[0] < 0xf0) {
+				p0 |= port->data[0] >> 4;
+				port->state = STATE_2PARAM_1;
+			} else {
+				p0 |= 0x03;
+				port->state = STATE_UNKNOWN;
+			}
+			output_packet(urb, p0, port->data[0], port->data[1], b);
+			break;
+		case STATE_SYSEX_0:
+			port->data[0] = b;
+			port->state = STATE_SYSEX_1;
+			break;
+		case STATE_SYSEX_1:
+			port->data[1] = b;
+			port->state = STATE_SYSEX_2;
+			break;
+		case STATE_SYSEX_2:
+			output_packet(urb, p0 | 0x04, port->data[0], port->data[1], b);
+			port->state = STATE_SYSEX_0;
+			break;
+		}
+	}
+}
+
+/*
+ * Moves data from one substream buffer to the URB transfer buffer.
+ */
+static void snd_usbmidi_transmit(snd_usb_midi_out_endpoint_t* ep, int port_idx)
+{
+	struct urb* urb = ep->urb;
+	usbmidi_out_port_t* port = &ep->ports[port_idx];
+
+	while (urb->transfer_buffer_length < ep->max_transfer) {
+		uint8_t b;
+		if (snd_rawmidi_transmit_peek(port->substream, &b, 1) != 1) {
+			port->active = 0;
+			break;
+		}
+		snd_usbmidi_transmit_byte(port, b, urb);
+		snd_rawmidi_transmit_ack(port->substream, 1);
+	}
+}
+
+/*
  * This is called when some data should be transferred to the device
- * (after the reception of one or more sequencer events, or after completion
- * of the previous transfer). ep->buffer_lock must be held.
+ * (from one or more substreams).
  */
 static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep)
 {
-	int len;
-	uint8_t* buffer;
-
-	if (ep->urb->status == -EINPROGRESS ||
-	    ep->data_size == 0)
+	int p;
+	struct urb* urb = ep->urb;
+	unsigned long flags;
+	
+	spin_lock_irqsave(&ep->buffer_lock, flags);
+	if (urb->status == -EINPROGRESS) {
+		spin_unlock_irqrestore(&ep->buffer_lock, flags);
 		return;
-	buffer = (uint8_t*)ep->urb->transfer_buffer;
-
-	/* first chunk, up to the end of the buffer */
-	len = OUTPUT_BUFFER_SIZE - ep->data_begin;
-	if (len > ep->data_size)
-		len = ep->data_size;
-	if (len > ep->max_transfer)
-		len = ep->max_transfer;
-	if (len > 0) {
-		memcpy(buffer, ep->buffer + ep->data_begin, len);
-		ep->data_begin = (ep->data_begin + len) % OUTPUT_BUFFER_SIZE;
-		ep->data_size -= len;
-		buffer += len;
-		ep->urb->transfer_buffer_length = len;
-	}
-
-	/* second chunk (after wraparound) */
-	if (ep->data_begin == 0 && ep->data_size > 0 &&
-	    len < ep->max_transfer) {
-		len = ep->max_transfer - len;
-		if (len > ep->data_size)
-			len = ep->data_size;
-		memcpy(buffer, ep->buffer, len);
-		ep->data_begin = len;
-		ep->data_size -= len;
-		ep->urb->transfer_buffer_length += len;
 	}
 
-	if (len > 0) {
+	urb->transfer_buffer_length = 0;
+	for (p= 0; p < 0x10; ++p)
+		if (ep->ports[p].active)
+			snd_usbmidi_transmit(ep, p);
+
+	if (urb->transfer_buffer_length > 0) {
 		if (ep->umidi->quirk && ep->umidi->quirk->type == QUIRK_MIDI_MIDIMAN)
-			snd_usbmidi_convert_to_midiman(ep->urb);
+			snd_usbmidi_convert_to_midiman(urb);
 
-		ep->urb->dev = ep->umidi->chip->dev;
-		snd_usbmidi_submit_urb(ep->urb, GFP_ATOMIC);
+		urb->dev = ep->umidi->chip->dev;
+		snd_usbmidi_submit_urb(urb, GFP_ATOMIC);
 	}
+	spin_unlock_irqrestore(&ep->buffer_lock, flags);
 }
 
 static void snd_usbmidi_out_tasklet(unsigned long data)
 {
 	snd_usb_midi_out_endpoint_t* ep = snd_magic_cast(snd_usb_midi_out_endpoint_t, (void*)data, return);
-	unsigned long flags;
 	
-	spin_lock_irqsave(&ep->buffer_lock, flags);
 	snd_usbmidi_do_output(ep);
-	spin_unlock_irqrestore(&ep->buffer_lock, flags);
 }
 
-/*
- * Adds one USB MIDI packet to the output buffer.
- */
-static void output_packet(usbmidi_out_port_t* port,
-			  uint8_t p0, uint8_t p1, uint8_t p2, uint8_t p3)
+static int snd_usbmidi_output_open(snd_rawmidi_substream_t* substream)
 {
-	snd_usb_midi_out_endpoint_t* ep = port->ep;
-	unsigned long flags;
+	snd_usb_midi_t* umidi = snd_magic_cast(snd_usb_midi_t, substream->rmidi->private_data, return -ENXIO);
+	usbmidi_out_port_t* port = NULL;
+	int i, j;
 
-	spin_lock_irqsave(&ep->buffer_lock, flags);
-	if (ep->data_size < OUTPUT_BUFFER_SIZE) {
-		uint8_t* buf = ep->buffer + (ep->data_begin + ep->data_size) % OUTPUT_BUFFER_SIZE;
-		buf[0] = p0;
-		buf[1] = p1;
-		buf[2] = p2;
-		buf[3] = p3;
-		ep->data_size += 4;
-		if (ep->data_size == ep->max_transfer)
-			snd_usbmidi_do_output(ep);
-	}
-	spin_unlock_irqrestore(&ep->buffer_lock, flags);
+	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
+		if (umidi->endpoints[i].out)
+			for (j = 0; j < 0x10; ++j)
+				if (umidi->endpoints[i].out->ports[j].substream == substream) {
+					port = &umidi->endpoints[i].out->ports[j];
+					break;
+				}
+	if (!port)
+		return -ENXIO;
+	substream->runtime->private_data = port;
+	port->state = STATE_UNKNOWN;
+	return 0;
 }
 
-/*
- * Callback for snd_seq_dump_var_event.
- */
-static int snd_usbmidi_sysex_dump(void* ptr, void* buf, int count)
+static int snd_usbmidi_output_close(snd_rawmidi_substream_t* substream)
 {
-	usbmidi_out_port_t* port = (usbmidi_out_port_t*)ptr;
-	const uint8_t* dump = (const uint8_t*)buf;
+	return 0;
+}
 
-	for (; count; --count) {
-		uint8_t byte = *dump++;
-
-		if (byte == 0xf0 && port->sysex_len > 0) {
-			/*
-			 * The previous SysEx wasn't terminated correctly.
-			 * Send the last bytes anyway, and hope that the
-			 * receiving device won't be too upset about the
-			 * missing F7.
-			 */
-			output_packet(port,
-				      port->cable | (0x04 + port->sysex_len),
-				      port->sysex[0],
-				      port->sysex_len >= 2 ? port->sysex[1] : 0,
-				      0);
-			port->sysex_len = 0;
-		}
-		if (byte != 0xf7) {
-			if (port->sysex_len >= 2) {
-				output_packet(port,
-					      port->cable | 0x04,
-					      port->sysex[0],
-					      port->sysex[1],
-					      byte);
-				port->sysex_len = 0;
-			} else {
-				port->sysex[port->sysex_len++] = byte;
-			}
-		} else {
-			uint8_t cin, data[3];
-			int i;
+static void snd_usbmidi_output_trigger(snd_rawmidi_substream_t* substream, int up)
+{
+	usbmidi_out_port_t* port = (usbmidi_out_port_t*)substream->runtime->private_data;
 
-			for (i = 0; i < port->sysex_len; ++i)
-				data[i] = port->sysex[i];
-			data[i++] = 0xf7;
-			cin = port->cable | (0x04 + i);
-			for (; i < 3; ++i)
-				data[i] = 0;
-			/*
-			 * cin,data[] is x5,{F7 00 00}
-			 *            or x6,{xx F7 00}
-			 *            or x7,{xx xx F7}
-			 */
-			output_packet(port, cin, data[0], data[1], data[2]);
-			port->sysex_len = 0;
-		}
-	}
-	return 0;
+	port->active = up;
+	if (up)
+		tasklet_hi_schedule(&port->ep->tasklet);
 }
 
-/*
- * Converts an ALSA sequencer event into USB MIDI packets.
- */
-static int snd_usbmidi_event_input(snd_seq_event_t* ev, int direct,
-				   void* private_data, int atomic, int hop)
+static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream)
 {
-	usbmidi_out_port_t* port = (usbmidi_out_port_t*)private_data;
-	int err;
-	uint8_t p0, p1;
+	snd_usb_midi_t* umidi = snd_magic_cast(snd_usb_midi_t, substream->rmidi->private_data, return -ENXIO);
+	usbmidi_in_port_t* port = NULL;
+	int i, j;
 
-	p0 = port->cable;
-	p1 = ev->data.note.channel & 0xf;
+	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
+		if (umidi->endpoints[i].in)
+			for (j = 0; j < 0x10; ++j)
+				if (umidi->endpoints[i].in->ports[j].substream == substream) {
+					port = &umidi->endpoints[i].in->ports[j];
+					break;
+				}
+	if (!port)
+		return -ENXIO;
+	substream->runtime->private_data = port;
+	return 0;
+}
 
-	switch (ev->type) {
-	case SNDRV_SEQ_EVENT_NOTEON:
-		output_packet(port, p0 | 0x09, p1 | 0x90,
-			      ev->data.note.note & 0x7f,
-			      ev->data.note.velocity & 0x7f);
-		break;
-	case SNDRV_SEQ_EVENT_NOTEOFF:
-		output_packet(port, p0 | 0x08, p1 | 0x80,
-			      ev->data.note.note & 0x7f,
-			      ev->data.note.velocity & 0x7f);
-		break;
-	case SNDRV_SEQ_EVENT_KEYPRESS:
-		output_packet(port, p0 | 0x0a, p1 | 0xa0,
-			      ev->data.note.note & 0x7f,
-			      ev->data.note.velocity & 0x7f);
-		break;
-	case SNDRV_SEQ_EVENT_CONTROLLER:
-		output_packet(port, p0 | 0x0b, p1 | 0xb0,
-			      ev->data.control.param & 0x7f,
-			      ev->data.control.value & 0x7f);
-		break;
-	case SNDRV_SEQ_EVENT_PGMCHANGE:
-		output_packet(port, p0 | 0x0c, p1 | 0xc0,
-			      ev->data.control.value & 0x7f, 0);
-		break;
-	case SNDRV_SEQ_EVENT_CHANPRESS:
-		output_packet(port, p0 | 0x0d, p1 | 0xd0,
-			      ev->data.control.value & 0x7f, 0);
-		break;
-	case SNDRV_SEQ_EVENT_PITCHBEND:
-		output_packet(port, p0 | 0x0e, p1 | 0xe0,
-			      (ev->data.control.value + 0x2000) & 0x7f,
-			      ((ev->data.control.value + 0x2000) >> 7) & 0x7f);
-		break;
-	case SNDRV_SEQ_EVENT_CONTROL14:
-		if (ev->data.control.param < 0x20) {
-			output_packet(port, p0 | 0x0b, p1 | 0xb0,
-				      ev->data.control.param,
-				      (ev->data.control.value >> 7) & 0x7f);
-			output_packet(port, p0 | 0x0b, p1 | 0xb0,
-				      ev->data.control.param + 0x20,
-				      ev->data.control.value & 0x7f);
-		} else {
-			output_packet(port, p0 | 0x0b, p1 | 0xb0,
-				      ev->data.control.param & 0x7f,
-				      ev->data.control.value & 0x7f);
-		}
-		break;
-	case SNDRV_SEQ_EVENT_SONGPOS:
-		output_packet(port, p0 | 0x03, 0xf2,
-			      ev->data.control.value & 0x7f,
-			      (ev->data.control.value >> 7) & 0x7f);
-		break;
-	case SNDRV_SEQ_EVENT_SONGSEL:
-		output_packet(port, p0 | 0x02, 0xf3,
-			      ev->data.control.value & 0x7f, 0);
-		break;
-	case SNDRV_SEQ_EVENT_QFRAME:
-		output_packet(port, p0 | 0x02, 0xf1,
-			      ev->data.control.value & 0x7f, 0);
-		break;
-	case SNDRV_SEQ_EVENT_START:
-		output_packet(port, p0 | 0x0f, 0xfa, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_CONTINUE:
-		output_packet(port, p0 | 0x0f, 0xfb, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_STOP:
-		output_packet(port, p0 | 0x0f, 0xfc, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_CLOCK:
-		output_packet(port, p0 | 0x0f, 0xf8, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_TUNE_REQUEST:
-		output_packet(port, p0 | 0x05, 0xf6, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_RESET:
-		output_packet(port, p0 | 0x0f, 0xff, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_SENSING:
-		output_packet(port, p0 | 0x0f, 0xfe, 0, 0);
-		break;
-	case SNDRV_SEQ_EVENT_SYSEX:
-		err = snd_seq_dump_var_event(ev, snd_usbmidi_sysex_dump, port);
-		if (err < 0)
-			return err;
-		break;
-	default:
-		return 0;
-	}
-	tasklet_hi_schedule(&port->ep->tasklet);
+static int snd_usbmidi_input_close(snd_rawmidi_substream_t* substream)
+{
 	return 0;
 }
 
+static void snd_usbmidi_input_trigger(snd_rawmidi_substream_t* substream, int up)
+{
+	usbmidi_in_port_t* port = (usbmidi_in_port_t*)substream->runtime->private_data;
+
+	port->active = up;
+}
+
+static snd_rawmidi_ops_t snd_usbmidi_output_ops = {
+	.open = snd_usbmidi_output_open,
+	.close = snd_usbmidi_output_close,
+	.trigger = snd_usbmidi_output_trigger,
+};
+
+static snd_rawmidi_ops_t snd_usbmidi_input_ops = {
+	.open = snd_usbmidi_input_open,
+	.close = snd_usbmidi_input_close,
+	.trigger = snd_usbmidi_input_trigger
+};
+
 /*
  * Frees an input endpoint.
  * May be called when ep hasn't been initialized completely.
  */
 static void snd_usbmidi_in_endpoint_delete(snd_usb_midi_in_endpoint_t* ep)
 {
-	int i;
-
 	if (ep->urb) {
 		if (ep->urb->transfer_buffer) {
 			usb_unlink_urb(ep->urb);
@@ -530,9 +505,6 @@
 		}
 		usb_free_urb(ep->urb);
 	}
-	for (i = 0; i < 0x10; ++i)
-		if (ep->ports[i].midi_event)
-			snd_midi_event_free(ep->ports[i].midi_event);
 	snd_magic_kfree(ep);
 }
 
@@ -540,11 +512,10 @@
  * For Roland devices, use the alternate setting which uses interrupt
  * transfers for input.
  */
-static usb_endpoint_descriptor_t* snd_usbmidi_get_int_epd(snd_usb_midi_t* umidi,
-							  uint8_t epnum)
+static struct usb_endpoint_descriptor* snd_usbmidi_get_int_epd(snd_usb_midi_t* umidi)
 {
-	usb_interface_t* intf;
-	usb_interface_descriptor_t* intfd;
+	struct usb_interface* intf;
+	struct usb_host_interface* intfd;
 
 	if (umidi->chip->dev->descriptor.idVendor != 0x0582)
 		return NULL;
@@ -553,57 +524,53 @@
 		return NULL;
 
 	intfd = &intf->altsetting[0];
-	if (intfd->bNumEndpoints != 2 ||
-	    (intfd->endpoint[0].bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ||
-	    (intfd->endpoint[1].bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK)
+	if (intfd->desc.bNumEndpoints != 2 ||
+	    (intfd->endpoint[0].desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ||
+	    (intfd->endpoint[1].desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK)
 		return NULL;
 
 	intfd = &intf->altsetting[1];
-	if (intfd->bNumEndpoints != 2 ||
-	    (intfd->endpoint[0].bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ||
-	    (intfd->endpoint[1].bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT)
+	if (intfd->desc.bNumEndpoints != 2 ||
+	    (intfd->endpoint[0].desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ||
+	    (intfd->endpoint[1].desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT)
 		return NULL;
 
-	usb_set_interface(umidi->chip->dev, intfd->bInterfaceNumber,
-			  intfd->bAlternateSetting);
-	return &intfd->endpoint[1];
+	usb_set_interface(umidi->chip->dev, intfd->desc.bInterfaceNumber,
+			  intfd->desc.bAlternateSetting);
+	return &intfd->endpoint[1].desc;
 }
 
-static usb_endpoint_descriptor_t* snd_usbmidi_get_midiman_int_epd(snd_usb_midi_t* umidi)
+static struct usb_endpoint_descriptor* snd_usbmidi_get_midiman_int_epd(snd_usb_midi_t* umidi)
 {
-	usb_interface_t* intf = umidi->iface;
-	if (!intf)
+	struct usb_interface* intf = umidi->iface;
+	if (!intf || intf->altsetting[0].desc.bNumEndpoints < 1)
 		return NULL;
-	return &intf->altsetting[0].endpoint[0];
+	return &intf->altsetting[0].endpoint[0].desc;
 }
 
 /*
- * Creates an input endpoint, and initalizes input ports.
- * ALSA ports are created later.
+ * Creates an input endpoint.
  */
 static int snd_usbmidi_in_endpoint_create(snd_usb_midi_t* umidi,
 					  snd_usb_midi_endpoint_info_t* ep_info,
 					  snd_usb_midi_endpoint_t* rep)
 {
 	snd_usb_midi_in_endpoint_t* ep;
-	usb_endpoint_descriptor_t* int_epd;
+	struct usb_endpoint_descriptor* int_epd;
 	void* buffer;
 	unsigned int pipe;
-	int length, i, err;
+	int length;
 
 	rep->in = NULL;
 	ep = snd_magic_kcalloc(snd_usb_midi_in_endpoint_t, 0, GFP_KERNEL);
 	if (!ep)
 		return -ENOMEM;
 	ep->umidi = umidi;
-	ep->ep = rep;
-	for (i = 0; i < 0x10; ++i)
-		ep->ports[i].seq_port = -1;
 
 	if (umidi->quirk && umidi->quirk->type == QUIRK_MIDI_MIDIMAN)
 		int_epd = snd_usbmidi_get_midiman_int_epd(umidi);
 	else
-		int_epd = snd_usbmidi_get_int_epd(umidi, ep_info->epnum);
+		int_epd = snd_usbmidi_get_int_epd(umidi);
 
 	ep->urb = usb_alloc_urb(0, GFP_KERNEL);
 	if (!ep->urb) {
@@ -621,22 +588,12 @@
 		return -ENOMEM;
 	}
 	if (int_epd)
-		FILL_INT_URB(ep->urb, umidi->chip->dev, pipe, buffer, length,
+		usb_fill_int_urb(ep->urb, umidi->chip->dev, pipe, buffer, length,
 			     snd_usbmidi_in_urb_complete, ep, int_epd->bInterval);
 	else
-		FILL_BULK_URB(ep->urb, umidi->chip->dev, pipe, buffer, length,
+		usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer, length,
 			      snd_usbmidi_in_urb_complete, ep);
 
-	for (i = 0; i < 0x10; ++i)
-		if (ep_info->in_cables & (1 << i)) {
-			err = snd_midi_event_new(INPUT_BUFFER_SIZE,
-				 		 &ep->ports[i].midi_event);
-			if (err < 0) {
-				snd_usbmidi_in_endpoint_delete(ep);
-				return -ENOMEM;
-			}
-		}
-
 	rep->in = ep;
 	return 0;
 }
@@ -670,7 +627,6 @@
 
 /*
  * Creates an output endpoint, and initializes output ports.
- * ALSA ports are created later.
  */
 static int snd_usbmidi_out_endpoint_create(snd_usb_midi_t* umidi,
 					   snd_usb_midi_endpoint_info_t* ep_info,
@@ -699,7 +655,7 @@
 		snd_usbmidi_out_endpoint_delete(ep);
 		return -ENOMEM;
 	}
-	FILL_BULK_URB(ep->urb, umidi->chip->dev, pipe, buffer,
+	usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer,
 		      ep->max_transfer, snd_usbmidi_out_urb_complete, ep);
 
 	spin_lock_init(&ep->buffer_lock);
@@ -716,143 +672,54 @@
 }
 
 /*
- * Frees the sequencer client, endpoints and ports.
+ * Frees everything.
  */
-static int snd_usbmidi_seq_device_delete(snd_seq_device_t* seq_device)
+static void snd_usbmidi_free(snd_usb_midi_t* umidi)
 {
-	snd_usb_midi_t* umidi;
-	int i, j;
-
-	umidi = (snd_usb_midi_t*)SNDRV_SEQ_DEVICE_ARGPTR(seq_device);
+	int i;
 
-	if (umidi->seq_client >= 0) {
-		snd_seq_delete_kernel_client(umidi->seq_client);
-		umidi->seq_client = -1;
-	}
 	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
 		snd_usb_midi_endpoint_t* ep = &umidi->endpoints[i];
-		if (ep->out) {
+		if (ep->out)
 			snd_usbmidi_out_endpoint_delete(ep->out);
-			ep->out = NULL;
-		}
-		if (ep->in) {
+		if (ep->in)
 			snd_usbmidi_in_endpoint_delete(ep->in);
-			ep->in = NULL;
-		}
-		for (j = 0; j < 0x10; ++j)
-			if (ep->rmidi[j]) {
-				snd_device_free(umidi->chip->card, ep->rmidi[j]);
-				ep->rmidi[j] = NULL;
-			}
 	}
-	return 0;
+	snd_magic_kfree(umidi);
 }
 
-/*
- * Creates a sequencer port for an input/output cable pair.
- */
-static int snd_usbmidi_create_port(snd_usb_midi_t* umidi,
-				   snd_usb_midi_out_endpoint_t* out_ep,
-				   snd_usb_midi_in_endpoint_t* in_ep,
-				   int cable, int port_idx)
-{
-	int cap, type, port;
-	snd_seq_port_callback_t port_callback;
-	char port_name[48];
-
-	cap = 0;
-	memset(&port_callback, 0, sizeof(port_callback));
-	port_callback.owner = THIS_MODULE;
-	if (out_ep) {
-		port_callback.event_input = snd_usbmidi_event_input;
-		port_callback.private_data = &out_ep->ports[cable];
-		cap |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE;
-	}
-	if (in_ep) {
-		cap |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ;
-	}
-	if (out_ep && in_ep) {
-		cap |= SNDRV_SEQ_PORT_CAP_DUPLEX;
-	}
-	/* TODO: read type bits from element descriptor */
-	type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC;
-	/* TODO: read port name from jack descriptor */
-	snprintf(port_name, sizeof(port_name), "%s Port %d",
-		 umidi->chip->card->shortname, port_idx);
-	port = snd_seq_event_port_attach(umidi->seq_client, &port_callback,
-					 cap, type, port_name);
-	if (port < 0) {
-		snd_printk(KERN_ERR "cannot create port (error code %d)\n", port);
-		return port;
-	}
-	if (in_ep)
-		in_ep->ports[cable].seq_port = port;
-	return port;
+static void snd_usbmidi_rawmidi_free(snd_rawmidi_t* rmidi)
+{
+	snd_usb_midi_t* umidi = snd_magic_cast(snd_usb_midi_t, rmidi->private_data, return);
+	snd_usbmidi_free(umidi);
 }
 
-/*
- * Creates a virmidi port emulating rawmidi for the sequencer port.
- */
-static int snd_usbmidi_create_virmidi(snd_usb_midi_t* umidi, int port,
-				      int port_idx, snd_rawmidi_t** rrmidi)
+static snd_rawmidi_substream_t* snd_usbmidi_find_substream(snd_usb_midi_t* umidi,
+							   int stream, int number)
 {
-	snd_rawmidi_t *rmidi;
-	snd_virmidi_dev_t *rdev;
-	int err;
+	struct list_head* list;
 
-	*rrmidi = NULL;
-	err = snd_virmidi_new(umidi->chip->card, port_idx, &rmidi);
-	if (err < 0)
-		return err;
-	sprintf(rmidi->name, "%s MIDI %d", umidi->chip->card->shortname, port_idx);
-	rdev = snd_magic_cast(snd_virmidi_dev_t, rmidi->private_data, return -ENXIO);
-	rdev->seq_mode = SNDRV_VIRMIDI_SEQ_ATTACH;
-	rdev->client = umidi->seq_client;
-	rdev->port = port;
-	err = snd_device_register(umidi->chip->card, rmidi);
-	if (err < 0) {
-		snd_device_free(umidi->chip->card, rmidi);
-		return err;
+	list_for_each(list, &umidi->rmidi->streams[stream].substreams) {
+		snd_rawmidi_substream_t* substream = list_entry(list, snd_rawmidi_substream_t, list);
+		if (substream->number == number)
+			return substream;
 	}
-	*rrmidi = rmidi;
-	return 0;
+	return NULL;
 }
 
-/*
- * After input and output endpoints have been initialized, create
- * the ALSA port for each input/output port pair in the endpoint.
- * *port_idx is the port number, which must be unique over all endpoints.
- */
-static int snd_usbmidi_create_endpoint_ports(snd_usb_midi_t* umidi,
-					     snd_usb_midi_endpoint_t* endpoint,
-					     int* port_idx,
-					     snd_usb_midi_endpoint_info_t* ep_info)
-{
-	int cable;
-
-	for (cable = 0; cable < 0x10; ++cable) {
-		int port, err;
-		int out = ep_info->out_cables & (1 << cable);
-		int in = ep_info->in_cables & (1 << cable);
-		if (!(in || out))
-			continue;
-
-		port = snd_usbmidi_create_port(umidi,
-					       out ? endpoint->out : NULL,
-					       in ? endpoint->in : NULL,
-					       cable, *port_idx);
-		if (port < 0)
-			return port;
-
-		if (*port_idx < SNDRV_MINOR_RAWMIDIS) {
-			err = snd_usbmidi_create_virmidi(umidi, port, *port_idx,
-			      				 &endpoint->rmidi[cable]);
-			if (err < 0)
-				return err;
-		}
-		++*port_idx;
+static void snd_usbmidi_init_substream(snd_usb_midi_t* umidi,
+				       int stream, int number,
+				       snd_rawmidi_substream_t** rsubstream)
+{
+	snd_rawmidi_substream_t* substream = snd_usbmidi_find_substream(umidi, stream, number);
+	if (!substream) {
+		snd_printd(KERN_ERR "substream %d:%d not found\n", stream, number);
+		return;
 	}
-	return 0;
+	/* TODO: read port name from jack descriptor */
+	snprintf(substream->name, sizeof(substream->name),
+		 "%s Port %d", umidi->chip->card->shortname, number);
+	*rsubstream = substream;
 }
 
 /*
@@ -861,7 +728,8 @@
 static int snd_usbmidi_create_endpoints(snd_usb_midi_t* umidi,
 					snd_usb_midi_endpoint_info_t* endpoints)
 {
-	int i, err, port_idx = 0;
+	int i, j, err;
+	int out_ports = 0, in_ports = 0;
 
 	for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
 		if (!endpoints[i].epnum)
@@ -878,15 +746,22 @@
 			if (err < 0)
 				return err;
 		}
-		err = snd_usbmidi_create_endpoint_ports(umidi, &umidi->endpoints[i],
-							&port_idx, &endpoints[i]);
-		if (err < 0)
-			return err;
-		printk(KERN_INFO "snd-usb-midi: endpoint %d: created %d output and %d input ports\n",
-		       endpoints[i].epnum,
-		       snd_usbmidi_count_bits(endpoints[i].out_cables),
-		       snd_usbmidi_count_bits(endpoints[i].in_cables));
+
+		for (j = 0; j < 0x10; ++j) {
+			if (endpoints[i].out_cables & (1 << j)) {
+				snd_usbmidi_init_substream(umidi, SNDRV_RAWMIDI_STREAM_OUTPUT, out_ports,
+							   &umidi->endpoints[i].out->ports[j].substream);
+				++out_ports;
+			}
+			if (endpoints[i].in_cables & (1 << j)) {
+				snd_usbmidi_init_substream(umidi, SNDRV_RAWMIDI_STREAM_INPUT, in_ports,
+							   &umidi->endpoints[i].in->ports[j].substream);
+				++in_ports;
+			}
+		}
 	}
+	printk(KERN_INFO "snd-usb-midi: created %d output and %d input ports\n",
+	       out_ports, in_ports);
 	return 0;
 }
 
@@ -896,18 +771,18 @@
 static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi,
 			   	   snd_usb_midi_endpoint_info_t* endpoints)
 {
-	usb_interface_t* intf;
-	usb_interface_descriptor_t* intfd;
-	usb_ms_header_descriptor_t* ms_header;
-	usb_endpoint_descriptor_t* ep;
-	usb_ms_endpoint_descriptor_t* ms_ep;
+	struct usb_interface* intf;
+	struct usb_host_interface* intfd;
+	struct usb_ms_header_descriptor* ms_header;
+	struct usb_host_endpoint* ep;
+	struct usb_ms_endpoint_descriptor* ms_ep;
 	int i, epidx;
 
 	intf = umidi->iface;
 	if (!intf)
 		return -ENXIO;
 	intfd = &intf->altsetting[0];
-	ms_header = (usb_ms_header_descriptor_t*)intfd->extra;
+	ms_header = (struct usb_ms_header_descriptor*)intfd->extra;
 	if (intfd->extralen >= 7 &&
 	    ms_header->bLength >= 7 &&
 	    ms_header->bDescriptorType == USB_DT_CS_INTERFACE &&
@@ -918,33 +793,33 @@
 		printk(KERN_WARNING "snd-usb-midi: MIDIStreaming interface descriptor not found\n");
 
 	epidx = 0;
-	for (i = 0; i < intfd->bNumEndpoints; ++i) {
+	for (i = 0; i < intfd->desc.bNumEndpoints; ++i) {
 		ep = &intfd->endpoint[i];
-		if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK)
+		if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK)
 			continue;
-		ms_ep = (usb_ms_endpoint_descriptor_t*)ep->extra;
+		ms_ep = (struct usb_ms_endpoint_descriptor*)ep->extra;
 		if (ep->extralen < 4 ||
 		    ms_ep->bLength < 4 ||
 		    ms_ep->bDescriptorType != USB_DT_CS_ENDPOINT ||
 		    ms_ep->bDescriptorSubtype != MS_GENERAL)
 			continue;
 		if (endpoints[epidx].epnum != 0 &&
-		    endpoints[epidx].epnum != (ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK)) {
+		    endpoints[epidx].epnum != (ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK)) {
 			++epidx;
 			if (epidx >= MIDI_MAX_ENDPOINTS) {
 				printk(KERN_WARNING "snd-usb-midi: too many endpoints\n");
 				break;
 			}
 		}
-		endpoints[epidx].epnum = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-		if (ep->bEndpointAddress & USB_DIR_IN) {
+		endpoints[epidx].epnum = ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+		if (ep->desc.bEndpointAddress & USB_DIR_IN) {
 			endpoints[epidx].in_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1;
 		} else {
 			endpoints[epidx].out_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1;
 		}
 		printk(KERN_INFO "snd-usb-midi: detected %d %s jack(s) on endpoint %d\n",
 		       ms_ep->bNumEmbMIDIJack,
-		       ep->bEndpointAddress & USB_DIR_IN ? "input" : "output",
+		       ep->desc.bEndpointAddress & USB_DIR_IN ? "input" : "output",
 		       endpoints[epidx].epnum);
 	}
 	return 0;
@@ -957,18 +832,18 @@
 static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi, 
 			       	       snd_usb_midi_endpoint_info_t* endpoint)
 {
-	usb_interface_t* intf;
-	usb_interface_descriptor_t* intfd;
-	usb_endpoint_descriptor_t* epd;
+	struct usb_interface* intf;
+	struct usb_host_interface* intfd;
+	struct usb_endpoint_descriptor* epd;
 
 	if (endpoint->epnum == -1) {
 		intf = umidi->iface;
 		if (!intf || intf->num_altsetting < 1)
 			return -ENOENT;
 		intfd = intf->altsetting;
-		if (intfd->bNumEndpoints < 1)
+		if (intfd->desc.bNumEndpoints < 1)
 			return -ENOENT;
-		epd = intfd->endpoint;
+		epd = &intfd->endpoint [0].desc;
 		endpoint->epnum = epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
 	}
 	return 0;
@@ -980,15 +855,15 @@
 static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi, 
 				     snd_usb_midi_endpoint_info_t* endpoint)
 {
-	usb_interface_t* intf;
-	usb_interface_descriptor_t* intfd;
+	struct usb_interface* intf;
+	struct usb_host_interface* intfd;
 	uint8_t* cs_desc;
 
 	intf = umidi->iface;
 	if (!intf)
 		return -ENOENT;
 	intfd = intf->altsetting;
-	if (intfd->bNumEndpoints < 1)
+	if (intfd->desc.bNumEndpoints < 1)
 		return -ENOENT;
 
 	for (cs_desc = intfd->extra;
@@ -1014,34 +889,34 @@
 static int snd_usbmidi_create_endpoints_midiman(snd_usb_midi_t* umidi, int ports)
 {
 	snd_usb_midi_endpoint_info_t ep_info;
-	usb_interface_t* intf;
-	usb_interface_descriptor_t* intfd;
-	usb_endpoint_descriptor_t* epd;
+	struct usb_interface* intf;
+	struct usb_host_interface* intfd;
+	struct usb_endpoint_descriptor* epd;
 	int cable, err;
 
 	intf = umidi->iface;
 	if (!intf)
 		return -ENOENT;
 	intfd = intf->altsetting;
-	if (intfd->bNumEndpoints < (ports > 1 ? 5 : 3)) {
+	if (intfd->desc.bNumEndpoints < (ports > 1 ? 5 : 3)) {
 		snd_printdd(KERN_ERR "not enough endpoints\n");
 		return -ENOENT;
 	}
 
-	epd = &intfd->endpoint[0];
+	epd = &intfd->endpoint[0].desc;
 	if ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) != USB_DIR_IN ||
 	    (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT) {
 		snd_printdd(KERN_ERR "endpoint[0] isn't interrupt\n");
 		return -ENXIO;
 	}
-	epd = &intfd->endpoint[2];
+	epd = &intfd->endpoint[2].desc;
 	if ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) != USB_DIR_OUT ||
 	    (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK) {
 		snd_printdd(KERN_ERR "endpoint[2] isn't bulk output\n");
 		return -ENXIO;
 	}
 	if (ports > 1) {
-		epd = &intfd->endpoint[4];
+		epd = &intfd->endpoint[4].desc;
 		if ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) != USB_DIR_OUT ||
 		    (epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK) {
 			snd_printdd(KERN_ERR "endpoint[4] isn't bulk output\n");
@@ -1049,13 +924,13 @@
 		}
 	}
 
-	ep_info.epnum = intfd->endpoint[2].bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+	ep_info.epnum = intfd->endpoint[2].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
 	ep_info.out_cables = 0x5555 & ((1 << ports) - 1);
 	err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]);
 	if (err < 0)
 		return err;
 
-	ep_info.epnum = intfd->endpoint[0].bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+	ep_info.epnum = intfd->endpoint[0].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
 	ep_info.in_cables = (1 << ports) - 1;
 	err = snd_usbmidi_in_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]);
 	if (err < 0)
@@ -1063,7 +938,7 @@
 	umidi->endpoints[0].in->urb->complete = snd_usbmidi_in_midiman_complete;
 
 	if (ports > 1) {
-		ep_info.epnum = intfd->endpoint[4].bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+		ep_info.epnum = intfd->endpoint[4].desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
 		ep_info.out_cables = 0xaaaa & ((1 << ports) - 1);
 		err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[1]);
 		if (err < 0)
@@ -1071,77 +946,65 @@
 	}
 
 	for (cable = 0; cable < ports; ++cable) {
-		int port = snd_usbmidi_create_port(umidi,
-		    				   umidi->endpoints[cable & 1].out,
-		    				   umidi->endpoints[0].in,
-		    				   cable, cable);
-		if (port < 0)
-			return port;
-
-		if (cable < SNDRV_MINOR_RAWMIDIS) {
-			int err = snd_usbmidi_create_virmidi(umidi, port, cable,
-							     &umidi->endpoints[0].rmidi[cable]);
-			if (err < 0)
-				return err;
-		}
+		snd_usbmidi_init_substream(umidi, SNDRV_RAWMIDI_STREAM_OUTPUT, cable,
+					   &umidi->endpoints[cable & 1].out->ports[cable].substream);
+		snd_usbmidi_init_substream(umidi, SNDRV_RAWMIDI_STREAM_INPUT, cable,
+					   &umidi->endpoints[0].in->ports[cable].substream);
 	}
 	return 0;
 }
 
+static int snd_usbmidi_create_rawmidi(snd_usb_midi_t* umidi,
+				      int out_ports, int in_ports)
+{
+	snd_rawmidi_t* rmidi;
+	int err;
+
+	err = snd_rawmidi_new(umidi->chip->card, "USB MIDI",
+			      umidi->chip->next_midi_device++,
+			      out_ports, in_ports, &rmidi);
+	if (err < 0)
+		return err;
+	strcpy(rmidi->name, umidi->chip->card->longname);
+	rmidi->info_flags = SNDRV_RAWMIDI_INFO_OUTPUT |
+			    SNDRV_RAWMIDI_INFO_INPUT |
+			    SNDRV_RAWMIDI_INFO_DUPLEX;
+	rmidi->private_data = umidi;
+	rmidi->private_free = snd_usbmidi_rawmidi_free;
+	snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_usbmidi_output_ops);
+	snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_usbmidi_input_ops);
+
+	umidi->rmidi = rmidi;
+	return 0;
+}
+
 /*
- * Initialize the sequencer device.
+ * Creates and registers everything needed for a MIDI streaming interface.
  */
-static int snd_usbmidi_seq_device_new(snd_seq_device_t* seq_device)
+int snd_usb_create_midi_interface(snd_usb_audio_t* chip,
+				  struct usb_interface* iface,
+				  const snd_usb_audio_quirk_t* quirk)
 {
 	snd_usb_midi_t* umidi;
-	usb_device_t* dev;
-	snd_seq_client_callback_t client_callback;
-	snd_seq_client_info_t client_info;
 	snd_usb_midi_endpoint_info_t endpoints[MIDI_MAX_ENDPOINTS];
+	int out_ports, in_ports;
 	int i, err;
 
-	umidi = (snd_usb_midi_t*)SNDRV_SEQ_DEVICE_ARGPTR(seq_device);
-
-	memset(&client_callback, 0, sizeof(client_callback));
-	client_callback.allow_output = 1;
-	client_callback.allow_input = 1;
-	umidi->seq_client = snd_seq_create_kernel_client(umidi->chip->card, 0,
-							 &client_callback);
-	if (umidi->seq_client < 0)
-		return umidi->seq_client;
-
-	/* set the client name */
-	memset(&client_info, 0, sizeof(client_info));
-	client_info.client = umidi->seq_client;
-	client_info.type = KERNEL_CLIENT;
-	dev = umidi->chip->dev;
-	if (dev->descriptor.iProduct)
-		err = usb_string(dev, dev->descriptor.iProduct,
-				 client_info.name, sizeof(client_info.name));
-	else
-		err = 0;
-	if (err <= 0) {
-		if (umidi->quirk && umidi->quirk->product_name) {
-			strncpy(client_info.name, umidi->quirk->product_name,
-				sizeof(client_info.name) - 1);
-			client_info.name[sizeof(client_info.name) - 1] = '\0';
-		} else {
-			sprintf(client_info.name, "USB Device %#04x:%#04x",
-				dev->descriptor.idVendor, dev->descriptor.idProduct);
-		}
-	}
-	snd_seq_kernel_client_ctl(umidi->seq_client,
-				  SNDRV_SEQ_IOCTL_SET_CLIENT_INFO,
-				  &client_info);
+	umidi = snd_magic_kcalloc(snd_usb_midi_t, 0, GFP_KERNEL);
+	if (!umidi)
+		return -ENOMEM;
+	umidi->chip = chip;
+	umidi->iface = iface;
+	umidi->quirk = quirk;
 
 	/* detect the endpoint(s) to use */
 	memset(endpoints, 0, sizeof(endpoints));
-	if (!umidi->quirk) {
+	if (!quirk) {
 		err = snd_usbmidi_get_ms_info(umidi, endpoints);
 	} else {
-		switch (umidi->quirk->type) {
+		switch (quirk->type) {
 		case QUIRK_MIDI_FIXED_ENDPOINT:
-			memcpy(&endpoints[0], umidi->quirk->data,
+			memcpy(&endpoints[0], quirk->data,
 			       sizeof(snd_usb_midi_endpoint_info_t));
 			err = snd_usbmidi_detect_endpoint(umidi, &endpoints[0]);
 			break;
@@ -1152,21 +1015,40 @@
 			err = 0;
 			break;
 		default:
-			snd_printd(KERN_ERR "invalid quirk type %d\n", umidi->quirk->type);
+			snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
 			err = -ENXIO;
 			break;
 		}
 	}
+	if (err < 0) {
+		snd_magic_kfree(umidi);
+		return err;
+	}
 
-	/* create ports */
-	if (err >= 0) {
-		if (umidi->quirk && umidi->quirk->type == QUIRK_MIDI_MIDIMAN)
-			err = snd_usbmidi_create_endpoints_midiman(umidi, (int)umidi->quirk->data);
-		else
-			err = snd_usbmidi_create_endpoints(umidi, endpoints);
+	/* create rawmidi device */
+	if (quirk && quirk->type == QUIRK_MIDI_MIDIMAN) {
+		in_ports = out_ports = (int)quirk->data;
+	} else {
+		out_ports = 0;
+		in_ports = 0;
+		for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
+			out_ports += snd_usbmidi_count_bits(endpoints[i].out_cables);
+			in_ports += snd_usbmidi_count_bits(endpoints[i].in_cables);
+		}
 	}
+	err = snd_usbmidi_create_rawmidi(umidi, out_ports, in_ports);
 	if (err < 0) {
-		snd_usbmidi_seq_device_delete(seq_device);
+		snd_magic_kfree(umidi);
+		return err;
+	}
+
+	/* create endpoint/port structures */
+	if (quirk && quirk->type == QUIRK_MIDI_MIDIMAN)
+		err = snd_usbmidi_create_endpoints_midiman(umidi, (int)quirk->data);
+	else
+		err = snd_usbmidi_create_endpoints(umidi, endpoints);
+	if (err < 0) {
+		snd_usbmidi_free(umidi);
 		return err;
 	}
 
@@ -1176,22 +1058,3 @@
 					       GFP_KERNEL);
 	return 0;
 }
-
-static int __init snd_usbmidi_module_init(void)
-{
-	static snd_seq_dev_ops_t ops = {
-		snd_usbmidi_seq_device_new,
-		snd_usbmidi_seq_device_delete
-	};
-
-	return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_USBMIDI, &ops,
-	 				      sizeof(snd_usb_midi_t));
-}
-
-static void __exit snd_usbmidi_module_exit(void)
-{
-	snd_seq_device_unregister_driver(SNDRV_SEQ_DEV_ID_USBMIDI);
-}
-
-module_init(snd_usbmidi_module_init)
-module_exit(snd_usbmidi_module_exit)
diff -Nru a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h
--- a/sound/usb/usbquirks.h	Wed Oct 30 16:44:27 2002
+++ b/sound/usb/usbquirks.h	Wed Oct 30 16:44:27 2002
@@ -34,8 +34,6 @@
 	.idProduct = prod, \
 	.bInterfaceClass = USB_CLASS_VENDOR_SPEC
 
-#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
-
 /* Yamaha devices */
 {
 	USB_DEVICE(0x0499, 0x1000),
@@ -74,7 +72,7 @@
 	}
 },
 {
-	USB_DEVICE(0x0499, 0x1004),
+	USB_DEVICE_VENDOR_SPEC(0x0499, 0x1004),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "Yamaha",
 		.product_name = "UW500",
@@ -128,7 +126,7 @@
 	}
 },
 {
-	USB_DEVICE(0x0499, 0x100a),
+	USB_DEVICE_VENDOR_SPEC(0x0499, 0x100a),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "Yamaha",
 		.product_name = "EOS BX",
@@ -181,13 +179,8 @@
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "Roland",
 		.product_name = "UA-100",
-		.ifnum = 2,
-		.type = QUIRK_MIDI_FIXED_ENDPOINT,
-		.data = & (const snd_usb_midi_endpoint_info_t) {
-			.epnum = -1,
-			.out_cables = 0x0007,
-			.in_cables  = 0x0007
-		}
+		.ifnum = 0,
+		.type = QUIRK_ROLAND_UA100
 	}
 },
 {
@@ -373,6 +366,20 @@
 	}
 },
 {
+	USB_DEVICE_VENDOR_SPEC(0x0582, 0x0025),
+	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
+		.vendor_name = "EDIROL",
+		.product_name = "UA-20",
+		.ifnum = 3,
+		.type = QUIRK_MIDI_FIXED_ENDPOINT,
+		.data = & (const snd_usb_midi_endpoint_info_t) {
+			.epnum = -1,
+			.out_cables = 0x0001,
+			.in_cables  = 0x0001
+		}
+	}
+},
+{
 	USB_DEVICE(0x0582, 0x0027),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "EDIROL",
@@ -401,7 +408,7 @@
 	}
 },
 {
-	USB_DEVICE(0x0582, 0x002b),
+	USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "EDIROL",
 		.product_name = "UA-700",
@@ -467,7 +474,7 @@
 	}
 },
 {
-	USB_DEVICE(0x0763, 0x2001),
+	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "M-Audio",
 		.product_name = "Quattro",
@@ -477,7 +484,7 @@
 	}
 },
 {
-	USB_DEVICE(0x0763, 0x2003),
+	USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
 	.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
 		.vendor_name = "M-Audio",
 		.product_name = "AudioPhile",
@@ -486,7 +493,5 @@
 		.data = (void*) 1
 	}
 },
-
-#endif /* CONFIG_SND_SEQUENCER(_MODULE) */
 
 #undef USB_DEVICE_VENDOR_SPEC
